@guihz/trading-vue-editor-tes 0.0.209 → 0.0.210

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode(`.line-decoration_modified,.line-decoration_added,.line-decoration_removed{left:auto!important;right:20px;transform:scale(-1);width:4px!important}.line-modified:before{content:"";height:100%;left:0;position:absolute;top:0;transition:width .2s;width:3px;z-index:1;background-image:linear-gradient(-45deg,#2962ff 25%,#0000 0,#0000 50%,#2962ff 0,#2962ff 75%,#0000 0,#0000);background-size:3px 3px}.line-added:before{content:"";height:100%;left:0;position:absolute;top:0;transition:width .2s;width:3px;z-index:1;background:#089950}.modified-in-monaco-diff-editor .line-modified:before,.modified-in-monaco-diff-editor .line-added:before,.modified-in-monaco-diff-editor .line-decoration_removed:after{background:none}.line-modified:hover:before,.line-added:hover:before,.line-decoration_removed:hover:before{width:5px}.line-decoration_removed:hover:before{background-color:#f23645}.line-decoration_removed:hover:after{background:none}.line-decoration_removed:before{content:"";height:100%;left:0;position:absolute;top:0;transition:width .2s;width:3px;z-index:1}.line-decoration_removed:after{background:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='4'%20height='18'%20viewBox='0%200%204%2018'%20fill='%23F23645'%3e%3cpath%20d='M3.7%208.11a.5.5%200%200%201%200%20.67L.89%2012a.5.5%200%200%201-.88-.33V5.3a.5.5%200%200%201%20.87-.33L3.7%208.1Z'/%3e%3c/svg%3e") 50% no-repeat;background-size:5px 20px;content:"";height:10px;left:-4px;position:absolute;top:-3px;transform:scale(-1);width:10px}.vs-dark .content-popup{background-color:#1e222d}.content-popup{position:relative;border-bottom:1px solid;display:flex;flex-direction:column;height:100%;-webkit-user-select:none;user-select:none;background-color:#fff}.header-popup{align-items:center;position:relative;z-index:1;border-left:0;border-right:0;display:flex;height:22px;justify-content:space-between;margin-top:5px;border-bottom:1px solid #fff;border-top:1px solid #fff;background-color:#fff}.title-popup{font-size:13px;font-weight:400;line-height:18px;margin-left:27px}.actions-popup{align-items:center;display:flex}.button-popup{height:24px;cursor:pointer;justify-content:center;width:24px;display:flex;padding:0 5px;align-items:center;box-sizing:border-box;transition:background-color 60ms ease,opacity 60ms ease,color 60ms ease}.icon-popup{display:flex}.triangle-popup{position:absolute;left:55px;margin-top:1px;height:8px;z-index:0;transform:rotate(-45deg);width:8px}.triangle-modified-popup{background-color:#2962ff}.vs-dark .header-modified-popup{background-color:#1e222d}.header-modified-popup{background-color:#e3effd;border-color:#2962ff}.content-modified-popup{border-bottom-color:#2962ff}.triangle-added-popup{background-color:#089950}.vs-dark .header-added-popup{background-color:#1a3326}.header-added-popup{background-color:#daf2e6;border-color:#089950}.content-added-popup{border-bottom-color:#089950}.triangle-removed-popup{background-color:#f23645}.vs-dark .header-removed-popup{background-color:#331f20}.header-removed-popup{background-color:#ffebec;border-color:#f23645}.content-removed-popup{border-bottom-color:#f23645}.tvue-script .monaco-editor.vs-dark .quick-input-widget{background:#1e222d!important}.tvue-script .monaco-editor .monaco-inputbox:focus-within,.tvue-script .monaco-editor.vs-dark .monaco-inputbox:focus-within{border-color:#2962ff}.tvue-script .monaco-editor .quick-input-widget .monaco-inputbox{background-color:unset!important;border:unset!important}.tvue-script .monaco-editor .quick-input-widget .input:active,.tvue-script .monaco-editor .quick-input-widget .input:focus{border:2px solid #2962ff}.tvue-script .monaco-editor.vs-dark .quick-input-widget .input{background-color:#1e222d!important;color:#d1d4dc!important}.tvue-script .monaco-editor .monaco-inputbox .input{font-size:14px;line-height:18px;outline:none}.tvue-script .monaco-editor .quick-input-widget .input{background-color:#fff!important;border:1px solid #d1d4dc;border-radius:6px;color:#131722!important;height:28px;padding-bottom:5px}.tvue-script .monaco-editor .overflow-guard{overflow:hidden!important}.tvue-script .monaco-editor .find-widget .codicon.toggle:before{content:"";font-size:15px;transition:.3s ease-out}.tvue-script .monaco-editor .find-widget.replaceToggled{height:80px!important}.tvue-script .monaco-editor .find-widget{border-bottom-left-radius:6px;border-bottom-right-radius:6px;height:44px!important;width:450px!important;transition:.3s ease-out}.tvue-script .monaco-editor .find-widget.replaceToggled .find-part,.tvue-script .monaco-editor .find-widget.replaceToggled .replace-part{margin-left:17px}.tvue-script .monaco-editor .find-widget .codicon.toggle.codicon-find-expanded{height:77px}.tvue-script .monaco-editor .find-widget.replaceToggled .replace-part{margin-top:8px}.tvue-script .monaco-editor .find-widget .codicon.toggle{border-radius:4px;cursor:default;height:41px;left:2px;top:2px}.tvue-script .monaco-editor .find-widget .monaco-sash{display:none}.tvue-script .monaco-editor .find-widget .find-part{margin-top:8px}.tvue-script .monaco-editor .find-widget .monaco-findInput{width:255px}.tvue-script .monaco-editor .monaco-scrollable-element{--vscode-scrollbarSlider-background: #64646466;margin-bottom:-2px}.tvue-script .monaco-editor.vs-dark .find-widget .monaco-scrollable-element>.monaco-inputbox.idle{background-color:#1e222d!important}.tvue-script .monaco-editor.vs-dark .find-widget .monaco-scrollable-element>.monaco-inputbox.idle{border-color:#50535e!important}.tvue-script .monaco-editor .find-widget .monaco-scrollable-element>.monaco-inputbox.idle{background-color:#fff!important;border-color:#d1d4dc!important;border-radius:6px;height:28px}.tvue-script .monaco-editor.vs-dark .monaco-inputbox,.tvue-script .monaco-editor.vs-dark .monaco-inputbox.idle{border:2px solid #50535e}.tvue-script .monaco-editor .monaco-inputbox,.tvue-script .monaco-editor .monaco-inputbox.idle{border:2px solid #a3a6af;border-radius:4px;overflow:hidden}.tvue-script .monaco-editor .find-widget .button{box-sizing:content-box}.tvue-script .monaco-editor .find-widget>.button.codicon-widget-close{top:10px}.tvue-script .monaco-editor .find-widget .codicon.toggle.codicon-find-expanded:before{transform:rotate(180deg)}.tvue-script .monaco-editor .find-widget .monaco-scrollable-element>.monaco-inputbox.idle .ibwrapper>textarea.input{padding-top:4px}.tvue-script .monaco-editor .monaco-inputbox .input{line-height:18px}.tvue-script .monaco-editor.vs-dark .find-widget .monaco-scrollable-element>.monaco-inputbox.synthetic-focus{border:1px solid #2962ff!important}.tvue-script .monaco-editor .find-widget .monaco-scrollable-element>.monaco-inputbox.synthetic-focus{border:1px solid #2962ff!important;outline-color:#0000}.tvue-script .monaco-editor .monaco-inputbox:focus-within{border-color:#2962ff}.vs-dark .context-view .monaco-menu>.monaco-action-bar.vertical{background-color:#1e222d!important}.context-view .monaco-scrollable-element{box-shadow:0 2px 4px #0003!important}.context-view .monaco-menu>.monaco-action-bar.vertical{background-color:#fff!important}.vs-dark .context-view .monaco-menu>.monaco-action-bar.vertical .action-item .action-menu-item,.vs-dark .context-view .monaco-menu>.monaco-action-bar.vertical .action-item .submenu-indicator{color:#d1d4dc!important}.context-view .monaco-menu>.monaco-action-bar.vertical .action-item .action-menu-item,.context-view .monaco-menu>.monaco-action-bar.vertical .action-item .submenu-indicator{color:#131722!important}.context-view .monaco-menu>.monaco-action-bar.vertical .action-item .action-menu-item{border-radius:0;height:32px;margin:0}.vs-dark .context-view .monaco-menu>.monaco-action-bar.vertical .action-item.focused .action-menu-item,.vs-dark .context-view .monaco-menu>.monaco-action-bar.vertical .action-item.focused .submenu-indicator{background-color:#2a2e39!important;color:#d1d4dc!important}.context-view .monaco-menu>.monaco-action-bar.vertical .action-item.focused .action-menu-item,.context-view .monaco-menu>.monaco-action-bar.vertical .action-item.focused .submenu-indicator{background-color:#f0f3fa!important;color:#131722!important}.vs-dark .context-view .monaco-menu>.monaco-action-bar.vertical .action-label.separator{border-bottom:1px solid #434651!important}.context-view .monaco-menu>.monaco-action-bar.vertical .action-label.separator{border-bottom:1px solid #e0e3eb!important;margin-left:0!important;margin-right:0!important;opacity:1}.vs-dark .context-view .monaco-menu>.monaco-action-bar.vertical .action-item .action-menu-item span.keybinding{color:#5d606b}.context-view .monaco-menu>.monaco-action-bar.vertical .action-item .action-menu-item span.keybinding{color:#9598a1}.monaco-menu{max-height:calc(100vh - 35px)!important}.vs-dark.manual-warpper{color:#d1d4dc}.manual-warpper{display:flex;height:100%;text-align:left;color:#131722}.vs-dark .manual-left{border-right-color:#434651}.manual-left{border-right:1px solid #e0e3eb;display:flex;flex:0 0 240px;flex-direction:column;height:100%}.manual-right{flex:1;height:100%;overflow-y:auto;-webkit-user-select:text;user-select:text}.vs-dark .manual-search{border-bottom-color:#434651}.manual-search{display:flex;align-items:center;flex:0 0 47px;padding-left:16.5px;border-bottom:1px solid #e0e3eb}.manual-search-icon{height:18px;font-size:14px;opacity:.8;pointer-events:none;transition:opacity .35s ease}.manual-search-icon svg{fill:#a3a6af}.manual-search-input{background-color:transparent;color:inherit;height:29px;width:146px;margin-left:5px;border:none;outline:none}.vs-dark .manual-search-clear svg{fill:#d1d4dc}.manual-search-clear svg{fill:#434651}.manual-search-clear{cursor:pointer;opacity:.5;text-align:center;transition:opacity .35s ease;width:36px;font-size:14px}.manual-search-clear:hover{opacity:1;transition-duration:60ms}.manual-group-list{display:flex;flex:1 1 100%;flex-direction:column;overflow-y:auto;text-align:left}.manual-group-search-list{flex:1 1 100%;overflow-y:auto;text-align:left}.vs-dark .manual-content-separator{background-color:#363a45}.manual-content-separator{background-color:#e0e3eb;height:1px}.vs-dark .manual-group-title{color:#d1d4dc;border-bottom-color:#434651}.manual-group-title{box-sizing:border-box;color:#434651;cursor:default;display:block;flex:0 0 auto;font-size:14px;font-weight:700;margin:0;padding:12px;border-bottom:1px solid #e0e3eb;-webkit-user-select:none;user-select:none}.vs-dark .manual-group-title.active{background-color:#2a2e39;border-top-color:#2a2e39;color:#d1d4dc}.manual-group-title.active{background-color:#e3effd;border-top-color:#e3effd;color:#131722}.vs-dark .manual-group-body{border-bottom-color:#434651}.manual-group-body{display:block;flex:1 1 auto;pointer-events:auto;-webkit-user-select:text;user-select:text;overflow-x:hidden;overflow-y:auto;transform:translateZ(0);border-bottom:1px solid #e0e3eb}.manual-group-body.hide,.manual-search-clear.hide,.manual-group-list.hide,.manual-group-search-list.hide{display:none}.vs-dark .manual-group-body-item{color:#b2b5be}.manual-group-body-item{box-sizing:border-box;color:#5d606b;cursor:default;display:block;font-size:14px;letter-spacing:.3px;line-height:24px;padding:2px 8px 2px 12px;position:relative;transition:none;word-break:break-all;text-decoration:none}.vs-dark .manual-group-body-item-selected{fill:#2962ff;color:#2962ff}.manual-group-body-item-selected{color:#2962ff;fill:#2962ff}.manual-group-body-item-selected:before{background-color:#2962ff;bottom:0;content:"";display:block;left:0;position:absolute;top:0;width:4px}.manual-content-wrapper{box-sizing:border-box;padding:30px 25px 25px;position:relative}.manual-content-header{align-items:center;display:flex;justify-content:space-between;margin-bottom:2px}.vs-dark .manual-content-header-overloads{background-color:#2a2e39}.manual-content-header-overloads{background-color:#e3effd;border-radius:8px;display:inline-block;height:auto;margin-left:6px;padding:4px 8px;vertical-align:top}.vs-dark .manual-content-header-title{color:#d1d4dc}.manual-content-header-title{font-size:18px;line-height:26px;color:#131722;font-weight:700;display:inline-block;margin:0}.vs-dark .manual-content-btn{color:#d1d4dc}.manual-content-btn{align-items:center;background:#0000;border:none;border-radius:4px;box-sizing:initial;color:#131722;cursor:default;display:flex;height:34px;justify-content:center;margin:0;padding:0;width:34px}.vs-dark .manual-content-btn:hover{background-color:#2a2e39}.manual-content-btn:hover{background-color:#f0f3fa}.vs-dark .manual-content-args-label{color:#d1d4dc}.manual-content-args-label{color:#131722;font-weight:700}.vs-dark .manual-content-syntax{background-color:#2a2e39;color:#d1d4dc}.manual-content-syntax{background-color:#e3effd;border-radius:8px;color:#131722;font-family:Menlo,Ubuntu Mono,Consolas,source-code-pro,monospace;overflow:hidden;transition:opacity .1s ease;white-space:pre-wrap;font-size:14px;line-height:21px;margin-top:8px;padding:24px;-webkit-user-select:none;user-select:none}.with-overloads{opacity:.6}.with-overloads:hover{opacity:.8}.with-overloads.selected{box-shadow:0 0 0 2px #2962ff;opacity:1}.vs-dark .manual-content-text{color:#d1d4dc}.manual-content-text{font-size:14px;line-height:21px;color:#131722;margin-top:8px}.vs-dark .manual-content-text-link{fill:#5b9cf6;color:#5b9cf6}.vs-dark .manual-content-text-link:hover{fill:#3179f5;color:#3179f5}.manual-content-text-link{color:#2962ff;fill:#2962ff}.manual-content-text-link:hover{color:#1e53e5;fill:#1e53e5}.vs-dark .manual-content-text code{background-color:#2a2e39}.manual-content-text code{background-color:#e0e3eb;border-radius:3px;padding:0 .4em}.vs-dark .manual-content-sub-title{color:#868993}.manual-content-sub-title{color:#6a6d78;font-size:11px;letter-spacing:.4px;line-height:16px;margin-top:24px;text-transform:uppercase}.manual-content-example-header{align-items:center;display:flex;justify-content:space-between;margin-bottom:5px}.vs-dark .manual-content-example-copy{color:#868993}.manual-content-example-copy{color:#6a6d78}.vs-dark .manual-content-example{background-color:#2a2e39}.manual-content-example{background-color:#e3effd;border-radius:8px;box-shadow:none;margin-top:0;overflow:hidden}.manual-content-example code{display:block;font-family:Menlo,Ubuntu Mono,Consolas,source-code-pro,monospace;font-size:13px;line-height:18px;overflow-x:auto;padding:24px}.manual-content-see_also{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px;-webkit-user-select:none;user-select:none}.vs-dark .manual-content-see_also-tag{background-color:#1e222d;color:#d1d4dc}.vs-dark .manual-content-see_also-tag:hover{background-color:#363a45}.manual-content-see_also-tag{background-color:#f8f9fd;border-radius:3px;color:#131722;cursor:default;font-size:14px;line-height:21px;margin:0;padding:6px 8px}.manual-content-see_also-tag:hover{background-color:#f0f3fa}.manual-scroll::-webkit-scrollbar{height:5px;width:5px}.manual-scroll::-webkit-scrollbar-corner{display:none}.vs-dark .manual-scroll::-webkit-scrollbar-thumb,.vs-dark code::-webkit-scrollbar-thumb{background-color:#363a45}.manual-scroll::-webkit-scrollbar-thumb{background-clip:content-box;background-color:#9598a1;border:1px solid #0000;border-radius:3px}.manual-scroll::-webkit-scrollbar-track{background-color:initial;border-radius:3px}[data-tooltip]{position:relative;text-transform:none}[data-tooltip]:before,[data-tooltip]:after{position:absolute;opacity:0;z-index:1000;pointer-events:none;transition:.2s}[data-tooltip]:before{content:"";border:5px solid transparent;border-top-color:#2a2e39;-webkit-transform:translateX(-50%);transform:translate(-50%);bottom:100%;left:50%;margin-bottom:-5px}[data-tooltip]:after{content:attr(data-tooltip);background:#2a2e39;font:12px Microsoft YaHei;color:#fff;padding:4px 8px;border-radius:2px;box-shadow:3px 3px 6px #0000004d;bottom:100%;width:max-content;left:50%;transform:translate(-50%);margin-bottom:5px}[data-tooltip]:hover:before,[data-tooltip]:hover:after{opacity:1;-webkit-transition-delay:.15s;transition-delay:.15s}[data-tooltip=""]:before,[data-tooltip=""]:after{display:none!important}.vs-dark ::selection{background:#143a87}::selection{background:#bbd9fb}`)),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
2
  (function(I,O){typeof exports=="object"&&typeof module<"u"?O(exports,require("react"),require("monaco-editor"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","monaco-editor","react-dom"],O):(I=typeof globalThis<"u"?globalThis:I||self,O(I.vueEditor={},I.react,I["monaco-editor"],I["react-dom"]))})(this,function(I,O,ke,np){"use strict";var Bi=document.createElement("style");Bi.textContent=`.line-decoration_modified,.line-decoration_added,.line-decoration_removed{left:auto!important;right:20px;transform:scale(-1);width:4px!important}.line-modified:before{content:"";height:100%;left:0;position:absolute;top:0;transition:width .2s;width:3px;z-index:1;background-image:linear-gradient(-45deg,#2962ff 25%,#0000 0,#0000 50%,#2962ff 0,#2962ff 75%,#0000 0,#0000);background-size:3px 3px}.line-added:before{content:"";height:100%;left:0;position:absolute;top:0;transition:width .2s;width:3px;z-index:1;background:#089950}.modified-in-monaco-diff-editor .line-modified:before,.modified-in-monaco-diff-editor .line-added:before,.modified-in-monaco-diff-editor .line-decoration_removed:after{background:none}.line-modified:hover:before,.line-added:hover:before,.line-decoration_removed:hover:before{width:5px}.line-decoration_removed:hover:before{background-color:#f23645}.line-decoration_removed:hover:after{background:none}.line-decoration_removed:before{content:"";height:100%;left:0;position:absolute;top:0;transition:width .2s;width:3px;z-index:1}.line-decoration_removed:after{background:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='4'%20height='18'%20viewBox='0%200%204%2018'%20fill='%23F23645'%3e%3cpath%20d='M3.7%208.11a.5.5%200%200%201%200%20.67L.89%2012a.5.5%200%200%201-.88-.33V5.3a.5.5%200%200%201%20.87-.33L3.7%208.1Z'/%3e%3c/svg%3e") 50% no-repeat;background-size:5px 20px;content:"";height:10px;left:-4px;position:absolute;top:-3px;transform:scale(-1);width:10px}.vs-dark .content-popup{background-color:#1e222d}.content-popup{position:relative;border-bottom:1px solid;display:flex;flex-direction:column;height:100%;-webkit-user-select:none;user-select:none;background-color:#fff}.header-popup{align-items:center;position:relative;z-index:1;border-left:0;border-right:0;display:flex;height:22px;justify-content:space-between;margin-top:5px;border-bottom:1px solid #fff;border-top:1px solid #fff;background-color:#fff}.title-popup{font-size:13px;font-weight:400;line-height:18px;margin-left:27px}.actions-popup{align-items:center;display:flex}.button-popup{height:24px;cursor:pointer;justify-content:center;width:24px;display:flex;padding:0 5px;align-items:center;box-sizing:border-box;transition:background-color 60ms ease,opacity 60ms ease,color 60ms ease}.icon-popup{display:flex}.triangle-popup{position:absolute;left:55px;margin-top:1px;height:8px;z-index:0;transform:rotate(-45deg);width:8px}.triangle-modified-popup{background-color:#2962ff}.vs-dark .header-modified-popup{background-color:#1e222d}.header-modified-popup{background-color:#e3effd;border-color:#2962ff}.content-modified-popup{border-bottom-color:#2962ff}.triangle-added-popup{background-color:#089950}.vs-dark .header-added-popup{background-color:#1a3326}.header-added-popup{background-color:#daf2e6;border-color:#089950}.content-added-popup{border-bottom-color:#089950}.triangle-removed-popup{background-color:#f23645}.vs-dark .header-removed-popup{background-color:#331f20}.header-removed-popup{background-color:#ffebec;border-color:#f23645}.content-removed-popup{border-bottom-color:#f23645}.tvue-script .monaco-editor.vs-dark .quick-input-widget{background:#1e222d!important}.tvue-script .monaco-editor .monaco-inputbox:focus-within,.tvue-script .monaco-editor.vs-dark .monaco-inputbox:focus-within{border-color:#2962ff}.tvue-script .monaco-editor .quick-input-widget .monaco-inputbox{background-color:unset!important;border:unset!important}.tvue-script .monaco-editor .quick-input-widget .input:active,.tvue-script .monaco-editor .quick-input-widget .input:focus{border:2px solid #2962ff}.tvue-script .monaco-editor.vs-dark .quick-input-widget .input{background-color:#1e222d!important;color:#d1d4dc!important}.tvue-script .monaco-editor .monaco-inputbox .input{font-size:14px;line-height:18px;outline:none}.tvue-script .monaco-editor .quick-input-widget .input{background-color:#fff!important;border:1px solid #d1d4dc;border-radius:6px;color:#131722!important;height:28px;padding-bottom:5px}.tvue-script .monaco-editor .overflow-guard{overflow:hidden!important}.tvue-script .monaco-editor .find-widget .codicon.toggle:before{content:"";font-size:15px;transition:.3s ease-out}.tvue-script .monaco-editor .find-widget.replaceToggled{height:80px!important}.tvue-script .monaco-editor .find-widget{border-bottom-left-radius:6px;border-bottom-right-radius:6px;height:44px!important;width:450px!important;transition:.3s ease-out}.tvue-script .monaco-editor .find-widget.replaceToggled .find-part,.tvue-script .monaco-editor .find-widget.replaceToggled .replace-part{margin-left:17px}.tvue-script .monaco-editor .find-widget .codicon.toggle.codicon-find-expanded{height:77px}.tvue-script .monaco-editor .find-widget.replaceToggled .replace-part{margin-top:8px}.tvue-script .monaco-editor .find-widget .codicon.toggle{border-radius:4px;cursor:default;height:41px;left:2px;top:2px}.tvue-script .monaco-editor .find-widget .monaco-sash{display:none}.tvue-script .monaco-editor .find-widget .find-part{margin-top:8px}.tvue-script .monaco-editor .find-widget .monaco-findInput{width:255px}.tvue-script .monaco-editor .monaco-scrollable-element{--vscode-scrollbarSlider-background: #64646466;margin-bottom:-2px}.tvue-script .monaco-editor.vs-dark .find-widget .monaco-scrollable-element>.monaco-inputbox.idle{background-color:#1e222d!important}.tvue-script .monaco-editor.vs-dark .find-widget .monaco-scrollable-element>.monaco-inputbox.idle{border-color:#50535e!important}.tvue-script .monaco-editor .find-widget .monaco-scrollable-element>.monaco-inputbox.idle{background-color:#fff!important;border-color:#d1d4dc!important;border-radius:6px;height:28px}.tvue-script .monaco-editor.vs-dark .monaco-inputbox,.tvue-script .monaco-editor.vs-dark .monaco-inputbox.idle{border:2px solid #50535e}.tvue-script .monaco-editor .monaco-inputbox,.tvue-script .monaco-editor .monaco-inputbox.idle{border:2px solid #a3a6af;border-radius:4px;overflow:hidden}.tvue-script .monaco-editor .find-widget .button{box-sizing:content-box}.tvue-script .monaco-editor .find-widget>.button.codicon-widget-close{top:10px}.tvue-script .monaco-editor .find-widget .codicon.toggle.codicon-find-expanded:before{transform:rotate(180deg)}.tvue-script .monaco-editor .find-widget .monaco-scrollable-element>.monaco-inputbox.idle .ibwrapper>textarea.input{padding-top:4px}.tvue-script .monaco-editor .monaco-inputbox .input{line-height:18px}.tvue-script .monaco-editor.vs-dark .find-widget .monaco-scrollable-element>.monaco-inputbox.synthetic-focus{border:1px solid #2962ff!important}.tvue-script .monaco-editor .find-widget .monaco-scrollable-element>.monaco-inputbox.synthetic-focus{border:1px solid #2962ff!important;outline-color:#0000}.tvue-script .monaco-editor .monaco-inputbox:focus-within{border-color:#2962ff}.vs-dark .context-view .monaco-menu>.monaco-action-bar.vertical{background-color:#1e222d!important}.context-view .monaco-scrollable-element{box-shadow:0 2px 4px #0003!important}.context-view .monaco-menu>.monaco-action-bar.vertical{background-color:#fff!important}.vs-dark .context-view .monaco-menu>.monaco-action-bar.vertical .action-item .action-menu-item,.vs-dark .context-view .monaco-menu>.monaco-action-bar.vertical .action-item .submenu-indicator{color:#d1d4dc!important}.context-view .monaco-menu>.monaco-action-bar.vertical .action-item .action-menu-item,.context-view .monaco-menu>.monaco-action-bar.vertical .action-item .submenu-indicator{color:#131722!important}.context-view .monaco-menu>.monaco-action-bar.vertical .action-item .action-menu-item{border-radius:0;height:32px;margin:0}.vs-dark .context-view .monaco-menu>.monaco-action-bar.vertical .action-item.focused .action-menu-item,.vs-dark .context-view .monaco-menu>.monaco-action-bar.vertical .action-item.focused .submenu-indicator{background-color:#2a2e39!important;color:#d1d4dc!important}.context-view .monaco-menu>.monaco-action-bar.vertical .action-item.focused .action-menu-item,.context-view .monaco-menu>.monaco-action-bar.vertical .action-item.focused .submenu-indicator{background-color:#f0f3fa!important;color:#131722!important}.vs-dark .context-view .monaco-menu>.monaco-action-bar.vertical .action-label.separator{border-bottom:1px solid #434651!important}.context-view .monaco-menu>.monaco-action-bar.vertical .action-label.separator{border-bottom:1px solid #e0e3eb!important;margin-left:0!important;margin-right:0!important;opacity:1}.vs-dark .context-view .monaco-menu>.monaco-action-bar.vertical .action-item .action-menu-item span.keybinding{color:#5d606b}.context-view .monaco-menu>.monaco-action-bar.vertical .action-item .action-menu-item span.keybinding{color:#9598a1}.monaco-menu{max-height:calc(100vh - 35px)!important}.vs-dark.manual-warpper{color:#d1d4dc}.manual-warpper{display:flex;height:100%;text-align:left;color:#131722}.vs-dark .manual-left{border-right-color:#434651}.manual-left{border-right:1px solid #e0e3eb;display:flex;flex:0 0 240px;flex-direction:column;height:100%}.manual-right{flex:1;height:100%;overflow-y:auto;-webkit-user-select:text;user-select:text}.vs-dark .manual-search{border-bottom-color:#434651}.manual-search{display:flex;align-items:center;flex:0 0 47px;padding-left:16.5px;border-bottom:1px solid #e0e3eb}.manual-search-icon{height:18px;font-size:14px;opacity:.8;pointer-events:none;transition:opacity .35s ease}.manual-search-icon svg{fill:#a3a6af}.manual-search-input{background-color:transparent;color:inherit;height:29px;width:146px;margin-left:5px;border:none;outline:none}.vs-dark .manual-search-clear svg{fill:#d1d4dc}.manual-search-clear svg{fill:#434651}.manual-search-clear{cursor:pointer;opacity:.5;text-align:center;transition:opacity .35s ease;width:36px;font-size:14px}.manual-search-clear:hover{opacity:1;transition-duration:60ms}.manual-group-list{display:flex;flex:1 1 100%;flex-direction:column;overflow-y:auto;text-align:left}.manual-group-search-list{flex:1 1 100%;overflow-y:auto;text-align:left}.vs-dark .manual-content-separator{background-color:#363a45}.manual-content-separator{background-color:#e0e3eb;height:1px}.vs-dark .manual-group-title{color:#d1d4dc;border-bottom-color:#434651}.manual-group-title{box-sizing:border-box;color:#434651;cursor:default;display:block;flex:0 0 auto;font-size:14px;font-weight:700;margin:0;padding:12px;border-bottom:1px solid #e0e3eb;-webkit-user-select:none;user-select:none}.vs-dark .manual-group-title.active{background-color:#2a2e39;border-top-color:#2a2e39;color:#d1d4dc}.manual-group-title.active{background-color:#e3effd;border-top-color:#e3effd;color:#131722}.vs-dark .manual-group-body{border-bottom-color:#434651}.manual-group-body{display:block;flex:1 1 auto;pointer-events:auto;-webkit-user-select:text;user-select:text;overflow-x:hidden;overflow-y:auto;transform:translateZ(0);border-bottom:1px solid #e0e3eb}.manual-group-body.hide,.manual-search-clear.hide,.manual-group-list.hide,.manual-group-search-list.hide{display:none}.vs-dark .manual-group-body-item{color:#b2b5be}.manual-group-body-item{box-sizing:border-box;color:#5d606b;cursor:default;display:block;font-size:14px;letter-spacing:.3px;line-height:24px;padding:2px 8px 2px 12px;position:relative;transition:none;word-break:break-all;text-decoration:none}.vs-dark .manual-group-body-item-selected{fill:#2962ff;color:#2962ff}.manual-group-body-item-selected{color:#2962ff;fill:#2962ff}.manual-group-body-item-selected:before{background-color:#2962ff;bottom:0;content:"";display:block;left:0;position:absolute;top:0;width:4px}.manual-content-wrapper{box-sizing:border-box;padding:30px 25px 25px;position:relative}.manual-content-header{align-items:center;display:flex;justify-content:space-between;margin-bottom:2px}.vs-dark .manual-content-header-overloads{background-color:#2a2e39}.manual-content-header-overloads{background-color:#e3effd;border-radius:8px;display:inline-block;height:auto;margin-left:6px;padding:4px 8px;vertical-align:top}.vs-dark .manual-content-header-title{color:#d1d4dc}.manual-content-header-title{font-size:18px;line-height:26px;color:#131722;font-weight:700;display:inline-block;margin:0}.vs-dark .manual-content-btn{color:#d1d4dc}.manual-content-btn{align-items:center;background:#0000;border:none;border-radius:4px;box-sizing:initial;color:#131722;cursor:default;display:flex;height:34px;justify-content:center;margin:0;padding:0;width:34px}.vs-dark .manual-content-btn:hover{background-color:#2a2e39}.manual-content-btn:hover{background-color:#f0f3fa}.vs-dark .manual-content-args-label{color:#d1d4dc}.manual-content-args-label{color:#131722;font-weight:700}.vs-dark .manual-content-syntax{background-color:#2a2e39;color:#d1d4dc}.manual-content-syntax{background-color:#e3effd;border-radius:8px;color:#131722;font-family:Menlo,Ubuntu Mono,Consolas,source-code-pro,monospace;overflow:hidden;transition:opacity .1s ease;white-space:pre-wrap;font-size:14px;line-height:21px;margin-top:8px;padding:24px;-webkit-user-select:none;user-select:none}.with-overloads{opacity:.6}.with-overloads:hover{opacity:.8}.with-overloads.selected{box-shadow:0 0 0 2px #2962ff;opacity:1}.vs-dark .manual-content-text{color:#d1d4dc}.manual-content-text{font-size:14px;line-height:21px;color:#131722;margin-top:8px}.vs-dark .manual-content-text-link{fill:#5b9cf6;color:#5b9cf6}.vs-dark .manual-content-text-link:hover{fill:#3179f5;color:#3179f5}.manual-content-text-link{color:#2962ff;fill:#2962ff}.manual-content-text-link:hover{color:#1e53e5;fill:#1e53e5}.vs-dark .manual-content-text code{background-color:#2a2e39}.manual-content-text code{background-color:#e0e3eb;border-radius:3px;padding:0 .4em}.vs-dark .manual-content-sub-title{color:#868993}.manual-content-sub-title{color:#6a6d78;font-size:11px;letter-spacing:.4px;line-height:16px;margin-top:24px;text-transform:uppercase}.manual-content-example-header{align-items:center;display:flex;justify-content:space-between;margin-bottom:5px}.vs-dark .manual-content-example-copy{color:#868993}.manual-content-example-copy{color:#6a6d78}.vs-dark .manual-content-example{background-color:#2a2e39}.manual-content-example{background-color:#e3effd;border-radius:8px;box-shadow:none;margin-top:0;overflow:hidden}.manual-content-example code{display:block;font-family:Menlo,Ubuntu Mono,Consolas,source-code-pro,monospace;font-size:13px;line-height:18px;overflow-x:auto;padding:24px}.manual-content-see_also{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px;-webkit-user-select:none;user-select:none}.vs-dark .manual-content-see_also-tag{background-color:#1e222d;color:#d1d4dc}.vs-dark .manual-content-see_also-tag:hover{background-color:#363a45}.manual-content-see_also-tag{background-color:#f8f9fd;border-radius:3px;color:#131722;cursor:default;font-size:14px;line-height:21px;margin:0;padding:6px 8px}.manual-content-see_also-tag:hover{background-color:#f0f3fa}.manual-scroll::-webkit-scrollbar{height:5px;width:5px}.manual-scroll::-webkit-scrollbar-corner{display:none}.vs-dark .manual-scroll::-webkit-scrollbar-thumb,.vs-dark code::-webkit-scrollbar-thumb{background-color:#363a45}.manual-scroll::-webkit-scrollbar-thumb{background-clip:content-box;background-color:#9598a1;border:1px solid #0000;border-radius:3px}.manual-scroll::-webkit-scrollbar-track{background-color:initial;border-radius:3px}[data-tooltip]{position:relative;text-transform:none}[data-tooltip]:before,[data-tooltip]:after{position:absolute;opacity:0;z-index:1000;pointer-events:none;transition:.2s}[data-tooltip]:before{content:"";border:5px solid transparent;border-top-color:#2a2e39;-webkit-transform:translateX(-50%);transform:translate(-50%);bottom:100%;left:50%;margin-bottom:-5px}[data-tooltip]:after{content:attr(data-tooltip);background:#2a2e39;font:12px Microsoft YaHei;color:#fff;padding:4px 8px;border-radius:2px;box-shadow:3px 3px 6px #0000004d;bottom:100%;width:max-content;left:50%;transform:translate(-50%);margin-bottom:5px}[data-tooltip]:hover:before,[data-tooltip]:hover:after{opacity:1;-webkit-transition-delay:.15s;transition-delay:.15s}[data-tooltip=""]:before,[data-tooltip=""]:after{display:none!important}.vs-dark ::selection{background:#143a87}::selection{background:#bbd9fb}
3
- `,document.head.appendChild(Bi);var Us=typeof document<"u"?document.currentScript:null,Ui;(function(a){a.Comment="comment",a.Text="text",a.String="string",a.Paren="paren",a.StringInvalid="string.invalid",a.ConstantNumericInteger="constant.numeric.integer",a.ConstantNumericFloat="constant.numeric.float",a.ConstantLanguage="constant.language",a.ConstantLanguageBoolean="constant.other.boolean",a.ConstantOtherColor="constant.other.color",a.SupportVariable="support.variable",a.SupportType="support.type",a.Keyword="keyword",a.KeywordEquals="keyword.equals",a.KeywordOperator="keyword.operator",a.CustomType="entity.name.type",a.VariableOther="variable.other",a.Property="variable.other.property",a.SupportFunction="support.function",a.SupportMethod="support.method",a.ImportedFunction="meta.function-call",a.Function="entity.name.function",a.ImportName="entity.name.module",a.ImportAlias="entity.name.module.name",a.ExtensionMethod="entity.name.method",a.Annotation="comment.annotation",a.PunctuationOperator="punctuation.operator",a.Empty="empty",a.Source="source"})(Ui||(Ui={}));var et;(function(a){a.Type="type",a.Returns="Returns",a.Syntax="Syntax",a.Remarks="Remarks",a.Fields="Fields",a.Description="Description",a.Example="Example",a.EnumMembers="Enum members"})(et||(et={})),I.Actions=void 0,function(a){a.Save="save",a.Find="find",a.TriggerConsole="trigger.console",a.RunScript="runScript",a.Open="open",a.NewWindow="newWindow",a.NewTab="newTab"}(I.Actions||(I.Actions={}));var ss=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ip(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var en={exports:{}},as={};/**
3
+ `,document.head.appendChild(Bi);var Us=typeof document<"u"?document.currentScript:null,Ui;(function(a){a.Comment="comment",a.Text="text",a.String="string",a.Paren="paren",a.StringInvalid="string.invalid",a.ConstantNumericInteger="constant.numeric.integer",a.ConstantNumericFloat="constant.numeric.float",a.ConstantLanguage="constant.language",a.ConstantLanguageBoolean="constant.other.boolean",a.ConstantOtherColor="constant.other.color",a.SupportVariable="support.variable",a.SupportType="support.type",a.Keyword="keyword",a.KeywordEquals="keyword.equals",a.KeywordOperator="keyword.operator",a.CustomType="entity.name.type",a.VariableOther="variable.other",a.Property="variable.other.property",a.SupportFunction="support.function",a.SupportMethod="support.method",a.ImportedFunction="meta.function-call",a.Function="entity.name.function",a.ImportName="entity.name.module",a.ImportAlias="entity.name.module.name",a.ExtensionMethod="entity.name.method",a.Annotation="comment.annotation",a.PunctuationOperator="punctuation.operator",a.Empty="empty",a.Source="source"})(Ui||(Ui={}));var tt;(function(a){a.Type="type",a.Returns="Returns",a.Syntax="Syntax",a.Remarks="Remarks",a.Fields="Fields",a.Description="Description",a.Example="Example",a.EnumMembers="Enum members"})(tt||(tt={})),I.Actions=void 0,function(a){a.Save="save",a.Find="find",a.TriggerConsole="trigger.console",a.RunScript="runScript",a.Open="open",a.NewWindow="newWindow",a.NewTab="newTab"}(I.Actions||(I.Actions={}));var ss=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ip(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var en={exports:{}},as={};/**
4
4
  * @license React
5
5
  * react-jsx-runtime.production.min.js
6
6
  *
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * This source code is licensed under the MIT license found in the
10
10
  * LICENSE file in the root directory of this source tree.
11
- */var Ki;function op(){if(Ki)return as;Ki=1;var a=O,n=Symbol.for("react.element"),s=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,c=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function m(y,f,b){var h,T={},N=null,B=null;b!==void 0&&(N=""+b),f.key!==void 0&&(N=""+f.key),f.ref!==void 0&&(B=f.ref);for(h in f)o.call(f,h)&&!l.hasOwnProperty(h)&&(T[h]=f[h]);if(y&&y.defaultProps)for(h in f=y.defaultProps,f)T[h]===void 0&&(T[h]=f[h]);return{$$typeof:n,type:y,key:N,ref:B,props:T,_owner:c.current}}return as.Fragment=s,as.jsx=m,as.jsxs=m,as}var ns={};/**
11
+ */var Ki;function op(){if(Ki)return as;Ki=1;var a=O,n=Symbol.for("react.element"),s=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,c=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function m(y,f,b){var h,T={},N=null,F=null;b!==void 0&&(N=""+b),f.key!==void 0&&(N=""+f.key),f.ref!==void 0&&(F=f.ref);for(h in f)o.call(f,h)&&!l.hasOwnProperty(h)&&(T[h]=f[h]);if(y&&y.defaultProps)for(h in f=y.defaultProps,f)T[h]===void 0&&(T[h]=f[h]);return{$$typeof:n,type:y,key:N,ref:F,props:T,_owner:c.current}}return as.Fragment=s,as.jsx=m,as.jsxs=m,as}var ns={};/**
12
12
  * @license React
13
13
  * react-jsx-runtime.development.js
14
14
  *
@@ -16,18 +16,18 @@
16
16
  *
17
17
  * This source code is licensed under the MIT license found in the
18
18
  * LICENSE file in the root directory of this source tree.
19
- */var $i;function lp(){return $i||($i=1,process.env.NODE_ENV!=="production"&&function(){var a=O,n=Symbol.for("react.element"),s=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),m=Symbol.for("react.provider"),y=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),B=Symbol.for("react.offscreen"),E=Symbol.iterator,F="@@iterator";function H(g){if(g===null||typeof g!="object")return null;var P=E&&g[E]||g[F];return typeof P=="function"?P:null}var Y=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function G(g){{for(var P=arguments.length,$=new Array(P>1?P-1:0),te=1;te<P;te++)$[te-1]=arguments[te];K("error",g,$)}}function K(g,P,$){{var te=Y.ReactDebugCurrentFrame,fe=te.getStackAddendum();fe!==""&&(P+="%s",$=$.concat([fe]));var we=$.map(function(ue){return String(ue)});we.unshift("Warning: "+P),Function.prototype.apply.call(console[g],console,we)}}var U=!1,A=!1,q=!1,R=!1,V=!1,re;re=Symbol.for("react.module.reference");function ie(g){return!!(typeof g=="string"||typeof g=="function"||g===o||g===l||V||g===c||g===b||g===h||R||g===B||U||A||q||typeof g=="object"&&g!==null&&(g.$$typeof===N||g.$$typeof===T||g.$$typeof===m||g.$$typeof===y||g.$$typeof===f||g.$$typeof===re||g.getModuleId!==void 0))}function xt(g,P,$){var te=g.displayName;if(te)return te;var fe=P.displayName||P.name||"";return fe!==""?$+"("+fe+")":$}function St(g){return g.displayName||"Context"}function Ue(g){if(g==null)return null;if(typeof g.tag=="number"&&G("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof g=="function")return g.displayName||g.name||null;if(typeof g=="string")return g;switch(g){case o:return"Fragment";case s:return"Portal";case l:return"Profiler";case c:return"StrictMode";case b:return"Suspense";case h:return"SuspenseList"}if(typeof g=="object")switch(g.$$typeof){case y:var P=g;return St(P)+".Consumer";case m:var $=g;return St($._context)+".Provider";case f:return xt(g,g.render,"ForwardRef");case T:var te=g.displayName||null;return te!==null?te:Ue(g.type)||"Memo";case N:{var fe=g,we=fe._payload,ue=fe._init;try{return Ue(ue(we))}catch{return null}}}return null}var Ke=Object.assign,Z=0,be,Ee,Me,ct,Et,se,xe;function Re(){}Re.__reactDisabledLog=!0;function ht(){{if(Z===0){be=console.log,Ee=console.info,Me=console.warn,ct=console.error,Et=console.group,se=console.groupCollapsed,xe=console.groupEnd;var g={configurable:!0,enumerable:!0,value:Re,writable:!0};Object.defineProperties(console,{info:g,log:g,warn:g,error:g,group:g,groupCollapsed:g,groupEnd:g})}Z++}}function $e(){{if(Z--,Z===0){var g={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Ke({},g,{value:be}),info:Ke({},g,{value:Ee}),warn:Ke({},g,{value:Me}),error:Ke({},g,{value:ct}),group:Ke({},g,{value:Et}),groupCollapsed:Ke({},g,{value:se}),groupEnd:Ke({},g,{value:xe})})}Z<0&&G("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var nr=Y.ReactCurrentDispatcher,ys;function Bt(g,P,$){{if(ys===void 0)try{throw Error()}catch(fe){var te=fe.stack.trim().match(/\n( *(at )?)/);ys=te&&te[1]||""}return`
20
- `+ys+g}}var Ht=!1,Mr;{var Pr=typeof WeakMap=="function"?WeakMap:Map;Mr=new Pr}function hr(g,P){if(!g||Ht)return"";{var $=Mr.get(g);if($!==void 0)return $}var te;Ht=!0;var fe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var we;we=nr.current,nr.current=null,ht();try{if(P){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(rt){te=rt}Reflect.construct(g,[],ue)}else{try{ue.call()}catch(rt){te=rt}g.call(ue.prototype)}}else{try{throw Error()}catch(rt){te=rt}g()}}catch(rt){if(rt&&te&&typeof rt.stack=="string"){for(var de=rt.stack.split(`
21
- `),He=te.stack.split(`
22
- `),Ce=de.length-1,Ne=He.length-1;Ce>=1&&Ne>=0&&de[Ce]!==He[Ne];)Ne--;for(;Ce>=1&&Ne>=0;Ce--,Ne--)if(de[Ce]!==He[Ne]){if(Ce!==1||Ne!==1)do if(Ce--,Ne--,Ne<0||de[Ce]!==He[Ne]){var tt=`
23
- `+de[Ce].replace(" at new "," at ");return g.displayName&&tt.includes("<anonymous>")&&(tt=tt.replace("<anonymous>",g.displayName)),typeof g=="function"&&Mr.set(g,tt),tt}while(Ce>=1&&Ne>=0);break}}}finally{Ht=!1,nr.current=we,$e(),Error.prepareStackTrace=fe}var Lt=g?g.displayName||g.name:"",ua=Lt?Bt(Lt):"";return typeof g=="function"&&Mr.set(g,ua),ua}function aa(g,P,$){return hr(g,!1)}function pt(g){var P=g.prototype;return!!(P&&P.isReactComponent)}function Ut(g,P,$){if(g==null)return"";if(typeof g=="function")return hr(g,pt(g));if(typeof g=="string")return Bt(g);switch(g){case b:return Bt("Suspense");case h:return Bt("SuspenseList")}if(typeof g=="object")switch(g.$$typeof){case f:return aa(g.render);case T:return Ut(g.type,P,$);case N:{var te=g,fe=te._payload,we=te._init;try{return Ut(we(fe),P,$)}catch{}}}return""}var Or=Object.prototype.hasOwnProperty,wt={},_s=Y.ReactDebugCurrentFrame;function Rr(g){if(g){var P=g._owner,$=Ut(g.type,g._source,P?P.type:null);_s.setExtraStackFrame($)}else _s.setExtraStackFrame(null)}function wr(g,P,$,te,fe){{var we=Function.call.bind(Or);for(var ue in g)if(we(g,ue)){var de=void 0;try{if(typeof g[ue]!="function"){var He=Error((te||"React class")+": "+$+" type `"+ue+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof g[ue]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw He.name="Invariant Violation",He}de=g[ue](P,ue,te,$,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ce){de=Ce}de&&!(de instanceof Error)&&(Rr(fe),G("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",te||"React class",$,ue,typeof de),Rr(null)),de instanceof Error&&!(de.message in wt)&&(wt[de.message]=!0,Rr(fe),G("Failed %s type: %s",$,de.message),Rr(null))}}}var dt=Array.isArray;function Wt(g){return dt(g)}function Fr(g){{var P=typeof Symbol=="function"&&Symbol.toStringTag,$=P&&g[Symbol.toStringTag]||g.constructor.name||"Object";return $}}function Tn(g){try{return ir(g),!1}catch{return!0}}function ir(g){return""+g}function na(g){if(Tn(g))return G("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Fr(g)),ir(g)}var Nt=Y.ReactCurrentOwner,or={key:!0,ref:!0,__self:!0,__source:!0},Br,Ur,vr;vr={};function fs(g){if(Or.call(g,"ref")){var P=Object.getOwnPropertyDescriptor(g,"ref").get;if(P&&P.isReactWarning)return!1}return g.ref!==void 0}function gs(g){if(Or.call(g,"key")){var P=Object.getOwnPropertyDescriptor(g,"key").get;if(P&&P.isReactWarning)return!1}return g.key!==void 0}function bs(g,P){if(typeof g.ref=="string"&&Nt.current&&P&&Nt.current.stateNode!==P){var $=Ue(Nt.current.type);vr[$]||(G('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',Ue(Nt.current.type),g.ref),vr[$]=!0)}}function xs(g,P){{var $=function(){Br||(Br=!0,G("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",P))};$.isReactWarning=!0,Object.defineProperty(g,"key",{get:$,configurable:!0})}}function hs(g,P){{var $=function(){Ur||(Ur=!0,G("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",P))};$.isReactWarning=!0,Object.defineProperty(g,"ref",{get:$,configurable:!0})}}var ws=function(g,P,$,te,fe,we,ue){var de={$$typeof:n,type:g,key:P,ref:$,props:ue,_owner:we};return de._store={},Object.defineProperty(de._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(de,"_self",{configurable:!1,enumerable:!1,writable:!1,value:te}),Object.defineProperty(de,"_source",{configurable:!1,enumerable:!1,writable:!1,value:fe}),Object.freeze&&(Object.freeze(de.props),Object.freeze(de)),de};function Dn(g,P,$,te,fe){{var we,ue={},de=null,He=null;$!==void 0&&(na($),de=""+$),gs(P)&&(na(P.key),de=""+P.key),fs(P)&&(He=P.ref,bs(P,fe));for(we in P)Or.call(P,we)&&!or.hasOwnProperty(we)&&(ue[we]=P[we]);if(g&&g.defaultProps){var Ce=g.defaultProps;for(we in Ce)ue[we]===void 0&&(ue[we]=Ce[we])}if(de||He){var Ne=typeof g=="function"?g.displayName||g.name||"Unknown":g;de&&xs(ue,Ne),He&&hs(ue,Ne)}return ws(g,de,He,fe,te,Nt.current,ue)}}var vs=Y.ReactCurrentOwner,ia=Y.ReactDebugCurrentFrame;function Gt(g){if(g){var P=g._owner,$=Ut(g.type,g._source,P?P.type:null);ia.setExtraStackFrame($)}else ia.setExtraStackFrame(null)}var Kr;Kr=!1;function Ts(g){return typeof g=="object"&&g!==null&&g.$$typeof===n}function oa(){{if(vs.current){var g=Ue(vs.current.type);if(g)return`
19
+ */var $i;function lp(){return $i||($i=1,process.env.NODE_ENV!=="production"&&function(){var a=O,n=Symbol.for("react.element"),s=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),m=Symbol.for("react.provider"),y=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),F=Symbol.for("react.offscreen"),S=Symbol.iterator,R="@@iterator";function W(g){if(g===null||typeof g!="object")return null;var P=S&&g[S]||g[R];return typeof P=="function"?P:null}var V=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function Y(g){{for(var P=arguments.length,$=new Array(P>1?P-1:0),re=1;re<P;re++)$[re-1]=arguments[re];U("error",g,$)}}function U(g,P,$){{var re=V.ReactDebugCurrentFrame,fe=re.getStackAddendum();fe!==""&&(P+="%s",$=$.concat([fe]));var we=$.map(function(ue){return String(ue)});we.unshift("Warning: "+P),Function.prototype.apply.call(console[g],console,we)}}var K=!1,A=!1,B=!1,E=!1,H=!1,Q;Q=Symbol.for("react.module.reference");function ie(g){return!!(typeof g=="string"||typeof g=="function"||g===o||g===l||H||g===c||g===b||g===h||E||g===F||K||A||B||typeof g=="object"&&g!==null&&(g.$$typeof===N||g.$$typeof===T||g.$$typeof===m||g.$$typeof===y||g.$$typeof===f||g.$$typeof===Q||g.getModuleId!==void 0))}function Qe(g,P,$){var re=g.displayName;if(re)return re;var fe=P.displayName||P.name||"";return fe!==""?$+"("+fe+")":$}function St(g){return g.displayName||"Context"}function Ue(g){if(g==null)return null;if(typeof g.tag=="number"&&Y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof g=="function")return g.displayName||g.name||null;if(typeof g=="string")return g;switch(g){case o:return"Fragment";case s:return"Portal";case l:return"Profiler";case c:return"StrictMode";case b:return"Suspense";case h:return"SuspenseList"}if(typeof g=="object")switch(g.$$typeof){case y:var P=g;return St(P)+".Consumer";case m:var $=g;return St($._context)+".Provider";case f:return Qe(g,g.render,"ForwardRef");case T:var re=g.displayName||null;return re!==null?re:Ue(g.type)||"Memo";case N:{var fe=g,we=fe._payload,ue=fe._init;try{return Ue(ue(we))}catch{return null}}}return null}var Ke=Object.assign,J=0,be,Ee,Me,pt,ht,se,xe;function Pe(){}Pe.__reactDisabledLog=!0;function Et(){{if(J===0){be=console.log,Ee=console.info,Me=console.warn,pt=console.error,ht=console.group,se=console.groupCollapsed,xe=console.groupEnd;var g={configurable:!0,enumerable:!0,value:Pe,writable:!0};Object.defineProperties(console,{info:g,log:g,warn:g,error:g,group:g,groupCollapsed:g,groupEnd:g})}J++}}function $e(){{if(J--,J===0){var g={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Ke({},g,{value:be}),info:Ke({},g,{value:Ee}),warn:Ke({},g,{value:Me}),error:Ke({},g,{value:pt}),group:Ke({},g,{value:ht}),groupCollapsed:Ke({},g,{value:se}),groupEnd:Ke({},g,{value:xe})})}J<0&&Y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Nt=V.ReactCurrentDispatcher,ys;function Ut(g,P,$){{if(ys===void 0)try{throw Error()}catch(fe){var re=fe.stack.trim().match(/\n( *(at )?)/);ys=re&&re[1]||""}return`
20
+ `+ys+g}}var Wt=!1,Mr;{var Pr=typeof WeakMap=="function"?WeakMap:Map;Mr=new Pr}function hr(g,P){if(!g||Wt)return"";{var $=Mr.get(g);if($!==void 0)return $}var re;Wt=!0;var fe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var we;we=Nt.current,Nt.current=null,Et();try{if(P){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(st){re=st}Reflect.construct(g,[],ue)}else{try{ue.call()}catch(st){re=st}g.call(ue.prototype)}}else{try{throw Error()}catch(st){re=st}g()}}catch(st){if(st&&re&&typeof st.stack=="string"){for(var de=st.stack.split(`
21
+ `),He=re.stack.split(`
22
+ `),Ce=de.length-1,Ne=He.length-1;Ce>=1&&Ne>=0&&de[Ce]!==He[Ne];)Ne--;for(;Ce>=1&&Ne>=0;Ce--,Ne--)if(de[Ce]!==He[Ne]){if(Ce!==1||Ne!==1)do if(Ce--,Ne--,Ne<0||de[Ce]!==He[Ne]){var rt=`
23
+ `+de[Ce].replace(" at new "," at ");return g.displayName&&rt.includes("<anonymous>")&&(rt=rt.replace("<anonymous>",g.displayName)),typeof g=="function"&&Mr.set(g,rt),rt}while(Ce>=1&&Ne>=0);break}}}finally{Wt=!1,Nt.current=we,$e(),Error.prepareStackTrace=fe}var Mt=g?g.displayName||g.name:"",ua=Mt?Ut(Mt):"";return typeof g=="function"&&Mr.set(g,ua),ua}function aa(g,P,$){return hr(g,!1)}function dt(g){var P=g.prototype;return!!(P&&P.isReactComponent)}function Kt(g,P,$){if(g==null)return"";if(typeof g=="function")return hr(g,dt(g));if(typeof g=="string")return Ut(g);switch(g){case b:return Ut("Suspense");case h:return Ut("SuspenseList")}if(typeof g=="object")switch(g.$$typeof){case f:return aa(g.render);case T:return Kt(g.type,P,$);case N:{var re=g,fe=re._payload,we=re._init;try{return Kt(we(fe),P,$)}catch{}}}return""}var Or=Object.prototype.hasOwnProperty,wt={},_s=V.ReactDebugCurrentFrame;function Rr(g){if(g){var P=g._owner,$=Kt(g.type,g._source,P?P.type:null);_s.setExtraStackFrame($)}else _s.setExtraStackFrame(null)}function wr(g,P,$,re,fe){{var we=Function.call.bind(Or);for(var ue in g)if(we(g,ue)){var de=void 0;try{if(typeof g[ue]!="function"){var He=Error((re||"React class")+": "+$+" type `"+ue+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof g[ue]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw He.name="Invariant Violation",He}de=g[ue](P,ue,re,$,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ce){de=Ce}de&&!(de instanceof Error)&&(Rr(fe),Y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",re||"React class",$,ue,typeof de),Rr(null)),de instanceof Error&&!(de.message in wt)&&(wt[de.message]=!0,Rr(fe),Y("Failed %s type: %s",$,de.message),Rr(null))}}}var mt=Array.isArray;function Gt(g){return mt(g)}function Fr(g){{var P=typeof Symbol=="function"&&Symbol.toStringTag,$=P&&g[Symbol.toStringTag]||g.constructor.name||"Object";return $}}function Tn(g){try{return ir(g),!1}catch{return!0}}function ir(g){return""+g}function na(g){if(Tn(g))return Y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Fr(g)),ir(g)}var Lt=V.ReactCurrentOwner,or={key:!0,ref:!0,__self:!0,__source:!0},Br,Ur,vr;vr={};function fs(g){if(Or.call(g,"ref")){var P=Object.getOwnPropertyDescriptor(g,"ref").get;if(P&&P.isReactWarning)return!1}return g.ref!==void 0}function gs(g){if(Or.call(g,"key")){var P=Object.getOwnPropertyDescriptor(g,"key").get;if(P&&P.isReactWarning)return!1}return g.key!==void 0}function bs(g,P){if(typeof g.ref=="string"&&Lt.current&&P&&Lt.current.stateNode!==P){var $=Ue(Lt.current.type);vr[$]||(Y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',Ue(Lt.current.type),g.ref),vr[$]=!0)}}function xs(g,P){{var $=function(){Br||(Br=!0,Y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",P))};$.isReactWarning=!0,Object.defineProperty(g,"key",{get:$,configurable:!0})}}function hs(g,P){{var $=function(){Ur||(Ur=!0,Y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",P))};$.isReactWarning=!0,Object.defineProperty(g,"ref",{get:$,configurable:!0})}}var ws=function(g,P,$,re,fe,we,ue){var de={$$typeof:n,type:g,key:P,ref:$,props:ue,_owner:we};return de._store={},Object.defineProperty(de._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(de,"_self",{configurable:!1,enumerable:!1,writable:!1,value:re}),Object.defineProperty(de,"_source",{configurable:!1,enumerable:!1,writable:!1,value:fe}),Object.freeze&&(Object.freeze(de.props),Object.freeze(de)),de};function Dn(g,P,$,re,fe){{var we,ue={},de=null,He=null;$!==void 0&&(na($),de=""+$),gs(P)&&(na(P.key),de=""+P.key),fs(P)&&(He=P.ref,bs(P,fe));for(we in P)Or.call(P,we)&&!or.hasOwnProperty(we)&&(ue[we]=P[we]);if(g&&g.defaultProps){var Ce=g.defaultProps;for(we in Ce)ue[we]===void 0&&(ue[we]=Ce[we])}if(de||He){var Ne=typeof g=="function"?g.displayName||g.name||"Unknown":g;de&&xs(ue,Ne),He&&hs(ue,Ne)}return ws(g,de,He,fe,re,Lt.current,ue)}}var vs=V.ReactCurrentOwner,ia=V.ReactDebugCurrentFrame;function Xt(g){if(g){var P=g._owner,$=Kt(g.type,g._source,P?P.type:null);ia.setExtraStackFrame($)}else ia.setExtraStackFrame(null)}var Kr;Kr=!1;function Ts(g){return typeof g=="object"&&g!==null&&g.$$typeof===n}function oa(){{if(vs.current){var g=Ue(vs.current.type);if(g)return`
24
24
 
25
25
  Check the render method of \``+g+"`."}return""}}function kn(g){{if(g!==void 0){var P=g.fileName.replace(/^.*[\\\/]/,""),$=g.lineNumber;return`
26
26
 
27
27
  Check your code at `+P+":"+$+"."}return""}}var la={};function ca(g){{var P=oa();if(!P){var $=typeof g=="string"?g:g.displayName||g.name;$&&(P=`
28
28
 
29
- Check the top-level render call using <`+$+">.")}return P}}function pa(g,P){{if(!g._store||g._store.validated||g.key!=null)return;g._store.validated=!0;var $=ca(P);if(la[$])return;la[$]=!0;var te="";g&&g._owner&&g._owner!==vs.current&&(te=" It was passed a child from "+Ue(g._owner.type)+"."),Gt(g),G('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',$,te),Gt(null)}}function da(g,P){{if(typeof g!="object")return;if(Wt(g))for(var $=0;$<g.length;$++){var te=g[$];Ts(te)&&pa(te,P)}else if(Ts(g))g._store&&(g._store.validated=!0);else if(g){var fe=H(g);if(typeof fe=="function"&&fe!==g.entries)for(var we=fe.call(g),ue;!(ue=we.next()).done;)Ts(ue.value)&&pa(ue.value,P)}}}function In(g){{var P=g.type;if(P==null||typeof P=="string")return;var $;if(typeof P=="function")$=P.propTypes;else if(typeof P=="object"&&(P.$$typeof===f||P.$$typeof===T))$=P.propTypes;else return;if($){var te=Ue(P);wr($,g.props,"prop",te,g)}else if(P.PropTypes!==void 0&&!Kr){Kr=!0;var fe=Ue(P);G("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",fe||"Unknown")}typeof P.getDefaultProps=="function"&&!P.getDefaultProps.isReactClassApproved&&G("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ds(g){{for(var P=Object.keys(g.props),$=0;$<P.length;$++){var te=P[$];if(te!=="children"&&te!=="key"){Gt(g),G("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",te),Gt(null);break}}g.ref!==null&&(Gt(g),G("Invalid attribute `ref` supplied to `React.Fragment`."),Gt(null))}}function ma(g,P,$,te,fe,we){{var ue=ie(g);if(!ue){var de="";(g===void 0||typeof g=="object"&&g!==null&&Object.keys(g).length===0)&&(de+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var He=kn(fe);He?de+=He:de+=oa();var Ce;g===null?Ce="null":Wt(g)?Ce="array":g!==void 0&&g.$$typeof===n?(Ce="<"+(Ue(g.type)||"Unknown")+" />",de=" Did you accidentally export a JSX literal instead of a component?"):Ce=typeof g,G("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ce,de)}var Ne=Dn(g,P,$,fe,we);if(Ne==null)return Ne;if(ue){var tt=P.children;if(tt!==void 0)if(te)if(Wt(tt)){for(var Lt=0;Lt<tt.length;Lt++)da(tt[Lt],g);Object.freeze&&Object.freeze(tt)}else G("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else da(tt,g)}return g===o?Ds(Ne):In(Ne),Ne}}function ks(g,P,$){return ma(g,P,$,!0)}function An(g,P,$){return ma(g,P,$,!1)}var qn=An,Cn=ks;ns.Fragment=o,ns.jsx=qn,ns.jsxs=Cn}()),ns}process.env.NODE_ENV==="production"?en.exports=op():en.exports=lp();var M=en.exports;function cp(a,n,s){return n in a?Object.defineProperty(a,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[n]=s,a}function ji(a,n){var s=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);n&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),s.push.apply(s,o)}return s}function Hi(a){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?ji(Object(s),!0).forEach(function(o){cp(a,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(s)):ji(Object(s)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(s,o))})}return a}function pp(a,n){if(a==null)return{};var s={},o=Object.keys(a),c,l;for(l=0;l<o.length;l++)c=o[l],!(n.indexOf(c)>=0)&&(s[c]=a[c]);return s}function dp(a,n){if(a==null)return{};var s=pp(a,n),o,c;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);for(c=0;c<l.length;c++)o=l[c],!(n.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(a,o)&&(s[o]=a[o])}return s}function mp(a,n){return up(a)||yp(a,n)||_p(a,n)||fp()}function up(a){if(Array.isArray(a))return a}function yp(a,n){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(a)))){var s=[],o=!0,c=!1,l=void 0;try{for(var m=a[Symbol.iterator](),y;!(o=(y=m.next()).done)&&(s.push(y.value),!(n&&s.length===n));o=!0);}catch(f){c=!0,l=f}finally{try{!o&&m.return!=null&&m.return()}finally{if(c)throw l}}return s}}function _p(a,n){if(a){if(typeof a=="string")return Wi(a,n);var s=Object.prototype.toString.call(a).slice(8,-1);if(s==="Object"&&a.constructor&&(s=a.constructor.name),s==="Map"||s==="Set")return Array.from(a);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return Wi(a,n)}}function Wi(a,n){(n==null||n>a.length)&&(n=a.length);for(var s=0,o=new Array(n);s<n;s++)o[s]=a[s];return o}function fp(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
30
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gp(a,n,s){return n in a?Object.defineProperty(a,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[n]=s,a}function Gi(a,n){var s=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);n&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),s.push.apply(s,o)}return s}function Xi(a){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?Gi(Object(s),!0).forEach(function(o){gp(a,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(s)):Gi(Object(s)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(s,o))})}return a}function bp(){for(var a=arguments.length,n=new Array(a),s=0;s<a;s++)n[s]=arguments[s];return function(o){return n.reduceRight(function(c,l){return l(c)},o)}}function is(a){return function n(){for(var s=this,o=arguments.length,c=new Array(o),l=0;l<o;l++)c[l]=arguments[l];return c.length>=a.length?a.apply(this,c):function(){for(var m=arguments.length,y=new Array(m),f=0;f<m;f++)y[f]=arguments[f];return n.apply(s,[].concat(c,y))}}}function Ks(a){return{}.toString.call(a).includes("Object")}function xp(a){return!Object.keys(a).length}function os(a){return typeof a=="function"}function hp(a,n){return Object.prototype.hasOwnProperty.call(a,n)}function wp(a,n){return Ks(n)||sr("changeType"),Object.keys(n).some(function(s){return!hp(a,s)})&&sr("changeField"),n}function vp(a){os(a)||sr("selectorType")}function Tp(a){os(a)||Ks(a)||sr("handlerType"),Ks(a)&&Object.values(a).some(function(n){return!os(n)})&&sr("handlersType")}function Dp(a){a||sr("initialIsRequired"),Ks(a)||sr("initialType"),xp(a)&&sr("initialContent")}function kp(a,n){throw new Error(a[n]||a.default)}var Ip={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},sr=is(kp)(Ip),$s={changes:wp,selector:vp,handler:Tp,initial:Dp};function Ap(a){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};$s.initial(a),$s.handler(n);var s={current:a},o=is(zp)(s,n),c=is(Cp)(s),l=is($s.changes)(a),m=is(qp)(s);function y(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(h){return h};return $s.selector(b),b(s.current)}function f(b){bp(o,c,l,m)(b)}return[y,f]}function qp(a,n){return os(n)?n(a.current):n}function Cp(a,n){return a.current=Xi(Xi({},a.current),n),n}function zp(a,n,s){return os(n)?n(a.current):Object.keys(s).forEach(function(o){var c;return(c=n[o])===null||c===void 0?void 0:c.call(n,a.current[o])}),s}var Sp={create:Ap},Ep={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}};function Np(a){return function n(){for(var s=this,o=arguments.length,c=new Array(o),l=0;l<o;l++)c[l]=arguments[l];return c.length>=a.length?a.apply(this,c):function(){for(var m=arguments.length,y=new Array(m),f=0;f<m;f++)y[f]=arguments[f];return n.apply(s,[].concat(c,y))}}}function Lp(a){return{}.toString.call(a).includes("Object")}function Mp(a){return a||Yi("configIsRequired"),Lp(a)||Yi("configType"),a.urls?(Pp(),{paths:{vs:a.urls.monacoBase}}):a}function Pp(){console.warn(Vi.deprecation)}function Op(a,n){throw new Error(a[n]||a.default)}var Vi={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
29
+ Check the top-level render call using <`+$+">.")}return P}}function pa(g,P){{if(!g._store||g._store.validated||g.key!=null)return;g._store.validated=!0;var $=ca(P);if(la[$])return;la[$]=!0;var re="";g&&g._owner&&g._owner!==vs.current&&(re=" It was passed a child from "+Ue(g._owner.type)+"."),Xt(g),Y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',$,re),Xt(null)}}function da(g,P){{if(typeof g!="object")return;if(Gt(g))for(var $=0;$<g.length;$++){var re=g[$];Ts(re)&&pa(re,P)}else if(Ts(g))g._store&&(g._store.validated=!0);else if(g){var fe=W(g);if(typeof fe=="function"&&fe!==g.entries)for(var we=fe.call(g),ue;!(ue=we.next()).done;)Ts(ue.value)&&pa(ue.value,P)}}}function In(g){{var P=g.type;if(P==null||typeof P=="string")return;var $;if(typeof P=="function")$=P.propTypes;else if(typeof P=="object"&&(P.$$typeof===f||P.$$typeof===T))$=P.propTypes;else return;if($){var re=Ue(P);wr($,g.props,"prop",re,g)}else if(P.PropTypes!==void 0&&!Kr){Kr=!0;var fe=Ue(P);Y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",fe||"Unknown")}typeof P.getDefaultProps=="function"&&!P.getDefaultProps.isReactClassApproved&&Y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ds(g){{for(var P=Object.keys(g.props),$=0;$<P.length;$++){var re=P[$];if(re!=="children"&&re!=="key"){Xt(g),Y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",re),Xt(null);break}}g.ref!==null&&(Xt(g),Y("Invalid attribute `ref` supplied to `React.Fragment`."),Xt(null))}}function ma(g,P,$,re,fe,we){{var ue=ie(g);if(!ue){var de="";(g===void 0||typeof g=="object"&&g!==null&&Object.keys(g).length===0)&&(de+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var He=kn(fe);He?de+=He:de+=oa();var Ce;g===null?Ce="null":Gt(g)?Ce="array":g!==void 0&&g.$$typeof===n?(Ce="<"+(Ue(g.type)||"Unknown")+" />",de=" Did you accidentally export a JSX literal instead of a component?"):Ce=typeof g,Y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ce,de)}var Ne=Dn(g,P,$,fe,we);if(Ne==null)return Ne;if(ue){var rt=P.children;if(rt!==void 0)if(re)if(Gt(rt)){for(var Mt=0;Mt<rt.length;Mt++)da(rt[Mt],g);Object.freeze&&Object.freeze(rt)}else Y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else da(rt,g)}return g===o?Ds(Ne):In(Ne),Ne}}function ks(g,P,$){return ma(g,P,$,!0)}function An(g,P,$){return ma(g,P,$,!1)}var qn=An,Cn=ks;ns.Fragment=o,ns.jsx=qn,ns.jsxs=Cn}()),ns}process.env.NODE_ENV==="production"?en.exports=op():en.exports=lp();var M=en.exports;function cp(a,n,s){return n in a?Object.defineProperty(a,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[n]=s,a}function ji(a,n){var s=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);n&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),s.push.apply(s,o)}return s}function Hi(a){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?ji(Object(s),!0).forEach(function(o){cp(a,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(s)):ji(Object(s)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(s,o))})}return a}function pp(a,n){if(a==null)return{};var s={},o=Object.keys(a),c,l;for(l=0;l<o.length;l++)c=o[l],!(n.indexOf(c)>=0)&&(s[c]=a[c]);return s}function dp(a,n){if(a==null)return{};var s=pp(a,n),o,c;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);for(c=0;c<l.length;c++)o=l[c],!(n.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(a,o)&&(s[o]=a[o])}return s}function mp(a,n){return up(a)||yp(a,n)||_p(a,n)||fp()}function up(a){if(Array.isArray(a))return a}function yp(a,n){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(a)))){var s=[],o=!0,c=!1,l=void 0;try{for(var m=a[Symbol.iterator](),y;!(o=(y=m.next()).done)&&(s.push(y.value),!(n&&s.length===n));o=!0);}catch(f){c=!0,l=f}finally{try{!o&&m.return!=null&&m.return()}finally{if(c)throw l}}return s}}function _p(a,n){if(a){if(typeof a=="string")return Wi(a,n);var s=Object.prototype.toString.call(a).slice(8,-1);if(s==="Object"&&a.constructor&&(s=a.constructor.name),s==="Map"||s==="Set")return Array.from(a);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return Wi(a,n)}}function Wi(a,n){(n==null||n>a.length)&&(n=a.length);for(var s=0,o=new Array(n);s<n;s++)o[s]=a[s];return o}function fp(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
30
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gp(a,n,s){return n in a?Object.defineProperty(a,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[n]=s,a}function Gi(a,n){var s=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);n&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),s.push.apply(s,o)}return s}function Xi(a){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?Gi(Object(s),!0).forEach(function(o){gp(a,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(s)):Gi(Object(s)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(s,o))})}return a}function bp(){for(var a=arguments.length,n=new Array(a),s=0;s<a;s++)n[s]=arguments[s];return function(o){return n.reduceRight(function(c,l){return l(c)},o)}}function is(a){return function n(){for(var s=this,o=arguments.length,c=new Array(o),l=0;l<o;l++)c[l]=arguments[l];return c.length>=a.length?a.apply(this,c):function(){for(var m=arguments.length,y=new Array(m),f=0;f<m;f++)y[f]=arguments[f];return n.apply(s,[].concat(c,y))}}}function Ks(a){return{}.toString.call(a).includes("Object")}function xp(a){return!Object.keys(a).length}function os(a){return typeof a=="function"}function hp(a,n){return Object.prototype.hasOwnProperty.call(a,n)}function wp(a,n){return Ks(n)||ar("changeType"),Object.keys(n).some(function(s){return!hp(a,s)})&&ar("changeField"),n}function vp(a){os(a)||ar("selectorType")}function Tp(a){os(a)||Ks(a)||ar("handlerType"),Ks(a)&&Object.values(a).some(function(n){return!os(n)})&&ar("handlersType")}function Dp(a){a||ar("initialIsRequired"),Ks(a)||ar("initialType"),xp(a)&&ar("initialContent")}function kp(a,n){throw new Error(a[n]||a.default)}var Ip={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},ar=is(kp)(Ip),$s={changes:wp,selector:vp,handler:Tp,initial:Dp};function Ap(a){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};$s.initial(a),$s.handler(n);var s={current:a},o=is(zp)(s,n),c=is(Cp)(s),l=is($s.changes)(a),m=is(qp)(s);function y(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(h){return h};return $s.selector(b),b(s.current)}function f(b){bp(o,c,l,m)(b)}return[y,f]}function qp(a,n){return os(n)?n(a.current):n}function Cp(a,n){return a.current=Xi(Xi({},a.current),n),n}function zp(a,n,s){return os(n)?n(a.current):Object.keys(s).forEach(function(o){var c;return(c=n[o])===null||c===void 0?void 0:c.call(n,a.current[o])}),s}var Sp={create:Ap},Ep={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}};function Np(a){return function n(){for(var s=this,o=arguments.length,c=new Array(o),l=0;l<o;l++)c[l]=arguments[l];return c.length>=a.length?a.apply(this,c):function(){for(var m=arguments.length,y=new Array(m),f=0;f<m;f++)y[f]=arguments[f];return n.apply(s,[].concat(c,y))}}}function Lp(a){return{}.toString.call(a).includes("Object")}function Mp(a){return a||Yi("configIsRequired"),Lp(a)||Yi("configType"),a.urls?(Pp(),{paths:{vs:a.urls.monacoBase}}):a}function Pp(){console.warn(Vi.deprecation)}function Op(a,n){throw new Error(a[n]||a.default)}var Vi={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
31
31
  You are using deprecated way of configuration.
32
32
 
33
33
  Instead of using
@@ -36,7 +36,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
36
36
  monaco.config({ paths: { vs: '...' } })
37
37
 
38
38
  For more please check the link https://github.com/suren-atoyan/monaco-loader#config
39
- `},Yi=Np(Op)(Vi),Rp={config:Mp},Fp=function(){for(var n=arguments.length,s=new Array(n),o=0;o<n;o++)s[o]=arguments[o];return function(c){return s.reduceRight(function(l,m){return m(l)},c)}};function Qi(a,n){return Object.keys(n).forEach(function(s){n[s]instanceof Object&&a[s]&&Object.assign(n[s],Qi(a[s],n[s]))}),Hi(Hi({},a),n)}var Bp={type:"cancelation",msg:"operation is manually canceled"};function tn(a){var n=!1,s=new Promise(function(o,c){a.then(function(l){return n?c(Bp):o(l)}),a.catch(c)});return s.cancel=function(){return n=!0},s}var Up=Sp.create({config:Ep,isInitialized:!1,resolve:null,reject:null,monaco:null}),Zi=mp(Up,2),ls=Zi[0],js=Zi[1];function Kp(a){var n=Rp.config(a),s=n.monaco,o=dp(n,["monaco"]);js(function(c){return{config:Qi(c.config,o),monaco:s}})}function $p(){var a=ls(function(n){var s=n.monaco,o=n.isInitialized,c=n.resolve;return{monaco:s,isInitialized:o,resolve:c}});if(!a.isInitialized){if(js({isInitialized:!0}),a.monaco)return a.resolve(a.monaco),tn(rn);if(window.monaco&&window.monaco.editor)return Ji(window.monaco),a.resolve(window.monaco),tn(rn);Fp(jp,Wp)(Gp)}return tn(rn)}function jp(a){return document.body.appendChild(a)}function Hp(a){var n=document.createElement("script");return a&&(n.src=a),n}function Wp(a){var n=ls(function(o){var c=o.config,l=o.reject;return{config:c,reject:l}}),s=Hp("".concat(n.config.paths.vs,"/loader.js"));return s.onload=function(){return a()},s.onerror=n.reject,s}function Gp(){var a=ls(function(s){var o=s.config,c=s.resolve,l=s.reject;return{config:o,resolve:c,reject:l}}),n=window.require;n.config(a.config),n(["vs/editor/editor.main"],function(s){Ji(s),a.resolve(s)},function(s){a.reject(s)})}function Ji(a){ls().monaco||js({monaco:a})}function Xp(){return ls(function(a){var n=a.monaco;return n})}var rn=new Promise(function(a,n){return js({resolve:a,reject:n})}),sn={config:Kp,init:$p,__getMonacoInstance:Xp},Vp={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},an=Vp,Yp={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},Qp=Yp;function Zp({children:a}){return O.createElement("div",{style:Qp.container},a)}var Jp=Zp,ed=Jp;function td({width:a,height:n,isEditorReady:s,loading:o,_ref:c,className:l,wrapperProps:m}){return O.createElement("section",{style:{...an.wrapper,width:a,height:n},...m},!s&&O.createElement(ed,null,o),O.createElement("div",{ref:c,style:{...an.fullWidth,...!s&&an.hide},className:l}))}var rd=td,eo=O.memo(rd);function sd(a){O.useEffect(a,[])}var to=sd;function ad(a,n,s=!0){let o=O.useRef(!0);O.useEffect(o.current||!s?()=>{o.current=!1}:a,n)}var ot=ad;function cs(){}function Er(a,n,s,o){return nd(a,o)||id(a,n,s,o)}function nd(a,n){return a.editor.getModel(ro(a,n))}function id(a,n,s,o){return a.editor.createModel(n,s,o?ro(a,o):void 0)}function ro(a,n){return a.Uri.parse(n)}function od({original:a,modified:n,language:s,originalLanguage:o,modifiedLanguage:c,originalModelPath:l,modifiedModelPath:m,keepCurrentOriginalModel:y=!1,keepCurrentModifiedModel:f=!1,theme:b="light",loading:h="Loading...",options:T={},height:N="100%",width:B="100%",className:E,wrapperProps:F={},beforeMount:H=cs,onMount:Y=cs}){let[G,K]=O.useState(!1),[U,A]=O.useState(!0),q=O.useRef(null),R=O.useRef(null),V=O.useRef(null),re=O.useRef(Y),ie=O.useRef(H),xt=O.useRef(!1);to(()=>{let Z=sn.init();return Z.then(be=>(R.current=be)&&A(!1)).catch(be=>(be==null?void 0:be.type)!=="cancelation"&&console.error("Monaco initialization: error:",be)),()=>q.current?Ke():Z.cancel()}),ot(()=>{if(q.current&&R.current){let Z=q.current.getOriginalEditor(),be=Er(R.current,a||"",o||s||"text",l||"");be!==Z.getModel()&&Z.setModel(be)}},[l],G),ot(()=>{if(q.current&&R.current){let Z=q.current.getModifiedEditor(),be=Er(R.current,n||"",c||s||"text",m||"");be!==Z.getModel()&&Z.setModel(be)}},[m],G),ot(()=>{let Z=q.current.getModifiedEditor();Z.getOption(R.current.editor.EditorOption.readOnly)?Z.setValue(n||""):n!==Z.getValue()&&(Z.executeEdits("",[{range:Z.getModel().getFullModelRange(),text:n||"",forceMoveMarkers:!0}]),Z.pushUndoStop())},[n],G),ot(()=>{var Z,be;(be=(Z=q.current)==null?void 0:Z.getModel())==null||be.original.setValue(a||"")},[a],G),ot(()=>{let{original:Z,modified:be}=q.current.getModel();R.current.editor.setModelLanguage(Z,o||s||"text"),R.current.editor.setModelLanguage(be,c||s||"text")},[s,o,c],G),ot(()=>{var Z;(Z=R.current)==null||Z.editor.setTheme(b)},[b],G),ot(()=>{var Z;(Z=q.current)==null||Z.updateOptions(T)},[T],G);let St=O.useCallback(()=>{var Ee;if(!R.current)return;ie.current(R.current);let Z=Er(R.current,a||"",o||s||"text",l||""),be=Er(R.current,n||"",c||s||"text",m||"");(Ee=q.current)==null||Ee.setModel({original:Z,modified:be})},[s,n,c,a,o,l,m]),Ue=O.useCallback(()=>{var Z;!xt.current&&V.current&&(q.current=R.current.editor.createDiffEditor(V.current,{automaticLayout:!0,...T}),St(),(Z=R.current)==null||Z.editor.setTheme(b),K(!0),xt.current=!0)},[T,b,St]);O.useEffect(()=>{G&&re.current(q.current,R.current)},[G]),O.useEffect(()=>{!U&&!G&&Ue()},[U,G,Ue]);function Ke(){var be,Ee,Me,ct;let Z=(be=q.current)==null?void 0:be.getModel();y||((Ee=Z==null?void 0:Z.original)==null||Ee.dispose()),f||((Me=Z==null?void 0:Z.modified)==null||Me.dispose()),(ct=q.current)==null||ct.dispose()}return O.createElement(eo,{width:B,height:N,isEditorReady:G,loading:h,_ref:V,className:E,wrapperProps:F})}var ld=od,cd=O.memo(ld);function pd(a){let n=O.useRef();return O.useEffect(()=>{n.current=a},[a]),n.current}var dd=pd,Hs=new Map;function md({defaultValue:a,defaultLanguage:n,defaultPath:s,value:o,language:c,path:l,theme:m="light",line:y,loading:f="Loading...",options:b={},overrideServices:h={},saveViewState:T=!0,keepCurrentModel:N=!1,width:B="100%",height:E="100%",className:F,wrapperProps:H={},beforeMount:Y=cs,onMount:G=cs,onChange:K,onValidate:U=cs}){let[A,q]=O.useState(!1),[R,V]=O.useState(!0),re=O.useRef(null),ie=O.useRef(null),xt=O.useRef(null),St=O.useRef(G),Ue=O.useRef(Y),Ke=O.useRef(),Z=O.useRef(o),be=dd(l),Ee=O.useRef(!1),Me=O.useRef(!1);to(()=>{let se=sn.init();return se.then(xe=>(re.current=xe)&&V(!1)).catch(xe=>(xe==null?void 0:xe.type)!=="cancelation"&&console.error("Monaco initialization: error:",xe)),()=>ie.current?Et():se.cancel()}),ot(()=>{var xe,Re,ht,$e;let se=Er(re.current,a||o||"",n||c||"",l||s||"");se!==((xe=ie.current)==null?void 0:xe.getModel())&&(T&&Hs.set(be,(Re=ie.current)==null?void 0:Re.saveViewState()),(ht=ie.current)==null||ht.setModel(se),T&&(($e=ie.current)==null||$e.restoreViewState(Hs.get(l))))},[l],A),ot(()=>{var se;(se=ie.current)==null||se.updateOptions(b)},[b],A),ot(()=>{!ie.current||o===void 0||(ie.current.getOption(re.current.editor.EditorOption.readOnly)?ie.current.setValue(o):o!==ie.current.getValue()&&(Me.current=!0,ie.current.executeEdits("",[{range:ie.current.getModel().getFullModelRange(),text:o,forceMoveMarkers:!0}]),ie.current.pushUndoStop(),Me.current=!1))},[o],A),ot(()=>{var xe,Re;let se=(xe=ie.current)==null?void 0:xe.getModel();se&&c&&((Re=re.current)==null||Re.editor.setModelLanguage(se,c))},[c],A),ot(()=>{var se;y!==void 0&&((se=ie.current)==null||se.revealLine(y))},[y],A),ot(()=>{var se;(se=re.current)==null||se.editor.setTheme(m)},[m],A);let ct=O.useCallback(()=>{var se;if(!(!xt.current||!re.current)&&!Ee.current){Ue.current(re.current);let xe=l||s,Re=Er(re.current,o||a||"",n||c||"",xe||"");ie.current=(se=re.current)==null?void 0:se.editor.create(xt.current,{model:Re,automaticLayout:!0,...b},h),T&&ie.current.restoreViewState(Hs.get(xe)),re.current.editor.setTheme(m),y!==void 0&&ie.current.revealLine(y),q(!0),Ee.current=!0}},[a,n,s,o,c,l,b,h,T,m,y]);O.useEffect(()=>{A&&St.current(ie.current,re.current)},[A]),O.useEffect(()=>{!R&&!A&&ct()},[R,A,ct]),Z.current=o,O.useEffect(()=>{var se,xe;A&&K&&((se=Ke.current)==null||se.dispose(),Ke.current=(xe=ie.current)==null?void 0:xe.onDidChangeModelContent(Re=>{Me.current||K(ie.current.getValue(),Re)}))},[A,K]),O.useEffect(()=>{if(A){let se=re.current.editor.onDidChangeMarkers(xe=>{var ht;let Re=(ht=ie.current.getModel())==null?void 0:ht.uri;if(Re&&xe.find($e=>$e.path===Re.path)){let $e=re.current.editor.getModelMarkers({resource:Re});U==null||U($e)}});return()=>{se==null||se.dispose()}}return()=>{}},[A,U]);function Et(){var se,xe;(se=Ke.current)==null||se.dispose(),N?T&&Hs.set(l,ie.current.saveViewState()):(xe=ie.current.getModel())==null||xe.dispose(),ie.current.dispose()}return O.createElement(eo,{width:B,height:E,isEditorReady:A,loading:f,_ref:xt,className:F,wrapperProps:H})}var ud=md,yd=O.memo(ud);const so={keywords:[{name:"or",desc:["逻辑 OR。适用于布尔表达式。"],syntax:["expr1 or expr2"],returns:["布尔值,或一系列布尔值。"]},{name:"and",desc:["逻辑 AND。适用于布尔表达式。"],syntax:["expr1 and expr2"],returns:["布尔值,或一系列布尔值。"]},{name:"not",desc:["逻辑求反(NOT)。 适用于布尔表达式。"],syntax:["not expr1"],returns:["布尔值,或一系列布尔值。"]},{name:"if",desc:["If语句定义了在满足表达式条件时必须执行的语句块。","要访问和使用if语句,应在代码的第一行中指定>= 2的Pine Script®语言版本,例如://@version=5","Pine Script®语言的第四版允许您使用“else if”语法。","通用编码来自:"],syntax:[`var_declarationX = if condition
39
+ `},Yi=Np(Op)(Vi),Rp={config:Mp},Fp=function(){for(var n=arguments.length,s=new Array(n),o=0;o<n;o++)s[o]=arguments[o];return function(c){return s.reduceRight(function(l,m){return m(l)},c)}};function Qi(a,n){return Object.keys(n).forEach(function(s){n[s]instanceof Object&&a[s]&&Object.assign(n[s],Qi(a[s],n[s]))}),Hi(Hi({},a),n)}var Bp={type:"cancelation",msg:"operation is manually canceled"};function tn(a){var n=!1,s=new Promise(function(o,c){a.then(function(l){return n?c(Bp):o(l)}),a.catch(c)});return s.cancel=function(){return n=!0},s}var Up=Sp.create({config:Ep,isInitialized:!1,resolve:null,reject:null,monaco:null}),Zi=mp(Up,2),ls=Zi[0],js=Zi[1];function Kp(a){var n=Rp.config(a),s=n.monaco,o=dp(n,["monaco"]);js(function(c){return{config:Qi(c.config,o),monaco:s}})}function $p(){var a=ls(function(n){var s=n.monaco,o=n.isInitialized,c=n.resolve;return{monaco:s,isInitialized:o,resolve:c}});if(!a.isInitialized){if(js({isInitialized:!0}),a.monaco)return a.resolve(a.monaco),tn(rn);if(window.monaco&&window.monaco.editor)return Ji(window.monaco),a.resolve(window.monaco),tn(rn);Fp(jp,Wp)(Gp)}return tn(rn)}function jp(a){return document.body.appendChild(a)}function Hp(a){var n=document.createElement("script");return a&&(n.src=a),n}function Wp(a){var n=ls(function(o){var c=o.config,l=o.reject;return{config:c,reject:l}}),s=Hp("".concat(n.config.paths.vs,"/loader.js"));return s.onload=function(){return a()},s.onerror=n.reject,s}function Gp(){var a=ls(function(s){var o=s.config,c=s.resolve,l=s.reject;return{config:o,resolve:c,reject:l}}),n=window.require;n.config(a.config),n(["vs/editor/editor.main"],function(s){Ji(s),a.resolve(s)},function(s){a.reject(s)})}function Ji(a){ls().monaco||js({monaco:a})}function Xp(){return ls(function(a){var n=a.monaco;return n})}var rn=new Promise(function(a,n){return js({resolve:a,reject:n})}),sn={config:Kp,init:$p,__getMonacoInstance:Xp},Vp={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},an=Vp,Yp={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},Qp=Yp;function Zp({children:a}){return O.createElement("div",{style:Qp.container},a)}var Jp=Zp,ed=Jp;function td({width:a,height:n,isEditorReady:s,loading:o,_ref:c,className:l,wrapperProps:m}){return O.createElement("section",{style:{...an.wrapper,width:a,height:n},...m},!s&&O.createElement(ed,null,o),O.createElement("div",{ref:c,style:{...an.fullWidth,...!s&&an.hide},className:l}))}var rd=td,eo=O.memo(rd);function sd(a){O.useEffect(a,[])}var to=sd;function ad(a,n,s=!0){let o=O.useRef(!0);O.useEffect(o.current||!s?()=>{o.current=!1}:a,n)}var lt=ad;function cs(){}function Er(a,n,s,o){return nd(a,o)||id(a,n,s,o)}function nd(a,n){return a.editor.getModel(ro(a,n))}function id(a,n,s,o){return a.editor.createModel(n,s,o?ro(a,o):void 0)}function ro(a,n){return a.Uri.parse(n)}function od({original:a,modified:n,language:s,originalLanguage:o,modifiedLanguage:c,originalModelPath:l,modifiedModelPath:m,keepCurrentOriginalModel:y=!1,keepCurrentModifiedModel:f=!1,theme:b="light",loading:h="Loading...",options:T={},height:N="100%",width:F="100%",className:S,wrapperProps:R={},beforeMount:W=cs,onMount:V=cs}){let[Y,U]=O.useState(!1),[K,A]=O.useState(!0),B=O.useRef(null),E=O.useRef(null),H=O.useRef(null),Q=O.useRef(V),ie=O.useRef(W),Qe=O.useRef(!1);to(()=>{let J=sn.init();return J.then(be=>(E.current=be)&&A(!1)).catch(be=>(be==null?void 0:be.type)!=="cancelation"&&console.error("Monaco initialization: error:",be)),()=>B.current?Ke():J.cancel()}),lt(()=>{if(B.current&&E.current){let J=B.current.getOriginalEditor(),be=Er(E.current,a||"",o||s||"text",l||"");be!==J.getModel()&&J.setModel(be)}},[l],Y),lt(()=>{if(B.current&&E.current){let J=B.current.getModifiedEditor(),be=Er(E.current,n||"",c||s||"text",m||"");be!==J.getModel()&&J.setModel(be)}},[m],Y),lt(()=>{let J=B.current.getModifiedEditor();J.getOption(E.current.editor.EditorOption.readOnly)?J.setValue(n||""):n!==J.getValue()&&(J.executeEdits("",[{range:J.getModel().getFullModelRange(),text:n||"",forceMoveMarkers:!0}]),J.pushUndoStop())},[n],Y),lt(()=>{var J,be;(be=(J=B.current)==null?void 0:J.getModel())==null||be.original.setValue(a||"")},[a],Y),lt(()=>{let{original:J,modified:be}=B.current.getModel();E.current.editor.setModelLanguage(J,o||s||"text"),E.current.editor.setModelLanguage(be,c||s||"text")},[s,o,c],Y),lt(()=>{var J;(J=E.current)==null||J.editor.setTheme(b)},[b],Y),lt(()=>{var J;(J=B.current)==null||J.updateOptions(T)},[T],Y);let St=O.useCallback(()=>{var Ee;if(!E.current)return;ie.current(E.current);let J=Er(E.current,a||"",o||s||"text",l||""),be=Er(E.current,n||"",c||s||"text",m||"");(Ee=B.current)==null||Ee.setModel({original:J,modified:be})},[s,n,c,a,o,l,m]),Ue=O.useCallback(()=>{var J;!Qe.current&&H.current&&(B.current=E.current.editor.createDiffEditor(H.current,{automaticLayout:!0,...T}),St(),(J=E.current)==null||J.editor.setTheme(b),U(!0),Qe.current=!0)},[T,b,St]);O.useEffect(()=>{Y&&Q.current(B.current,E.current)},[Y]),O.useEffect(()=>{!K&&!Y&&Ue()},[K,Y,Ue]);function Ke(){var be,Ee,Me,pt;let J=(be=B.current)==null?void 0:be.getModel();y||((Ee=J==null?void 0:J.original)==null||Ee.dispose()),f||((Me=J==null?void 0:J.modified)==null||Me.dispose()),(pt=B.current)==null||pt.dispose()}return O.createElement(eo,{width:F,height:N,isEditorReady:Y,loading:h,_ref:H,className:S,wrapperProps:R})}var ld=od,cd=O.memo(ld);function pd(a){let n=O.useRef();return O.useEffect(()=>{n.current=a},[a]),n.current}var dd=pd,Hs=new Map;function md({defaultValue:a,defaultLanguage:n,defaultPath:s,value:o,language:c,path:l,theme:m="light",line:y,loading:f="Loading...",options:b={},overrideServices:h={},saveViewState:T=!0,keepCurrentModel:N=!1,width:F="100%",height:S="100%",className:R,wrapperProps:W={},beforeMount:V=cs,onMount:Y=cs,onChange:U,onValidate:K=cs}){let[A,B]=O.useState(!1),[E,H]=O.useState(!0),Q=O.useRef(null),ie=O.useRef(null),Qe=O.useRef(null),St=O.useRef(Y),Ue=O.useRef(V),Ke=O.useRef(),J=O.useRef(o),be=dd(l),Ee=O.useRef(!1),Me=O.useRef(!1);to(()=>{let se=sn.init();return se.then(xe=>(Q.current=xe)&&H(!1)).catch(xe=>(xe==null?void 0:xe.type)!=="cancelation"&&console.error("Monaco initialization: error:",xe)),()=>ie.current?ht():se.cancel()}),lt(()=>{var xe,Pe,Et,$e;let se=Er(Q.current,a||o||"",n||c||"",l||s||"");se!==((xe=ie.current)==null?void 0:xe.getModel())&&(T&&Hs.set(be,(Pe=ie.current)==null?void 0:Pe.saveViewState()),(Et=ie.current)==null||Et.setModel(se),T&&(($e=ie.current)==null||$e.restoreViewState(Hs.get(l))))},[l],A),lt(()=>{var se;(se=ie.current)==null||se.updateOptions(b)},[b],A),lt(()=>{!ie.current||o===void 0||(ie.current.getOption(Q.current.editor.EditorOption.readOnly)?ie.current.setValue(o):o!==ie.current.getValue()&&(Me.current=!0,ie.current.executeEdits("",[{range:ie.current.getModel().getFullModelRange(),text:o,forceMoveMarkers:!0}]),ie.current.pushUndoStop(),Me.current=!1))},[o],A),lt(()=>{var xe,Pe;let se=(xe=ie.current)==null?void 0:xe.getModel();se&&c&&((Pe=Q.current)==null||Pe.editor.setModelLanguage(se,c))},[c],A),lt(()=>{var se;y!==void 0&&((se=ie.current)==null||se.revealLine(y))},[y],A),lt(()=>{var se;(se=Q.current)==null||se.editor.setTheme(m)},[m],A);let pt=O.useCallback(()=>{var se;if(!(!Qe.current||!Q.current)&&!Ee.current){Ue.current(Q.current);let xe=l||s,Pe=Er(Q.current,o||a||"",n||c||"",xe||"");ie.current=(se=Q.current)==null?void 0:se.editor.create(Qe.current,{model:Pe,automaticLayout:!0,...b},h),T&&ie.current.restoreViewState(Hs.get(xe)),Q.current.editor.setTheme(m),y!==void 0&&ie.current.revealLine(y),B(!0),Ee.current=!0}},[a,n,s,o,c,l,b,h,T,m,y]);O.useEffect(()=>{A&&St.current(ie.current,Q.current)},[A]),O.useEffect(()=>{!E&&!A&&pt()},[E,A,pt]),J.current=o,O.useEffect(()=>{var se,xe;A&&U&&((se=Ke.current)==null||se.dispose(),Ke.current=(xe=ie.current)==null?void 0:xe.onDidChangeModelContent(Pe=>{Me.current||U(ie.current.getValue(),Pe)}))},[A,U]),O.useEffect(()=>{if(A){let se=Q.current.editor.onDidChangeMarkers(xe=>{var Et;let Pe=(Et=ie.current.getModel())==null?void 0:Et.uri;if(Pe&&xe.find($e=>$e.path===Pe.path)){let $e=Q.current.editor.getModelMarkers({resource:Pe});K==null||K($e)}});return()=>{se==null||se.dispose()}}return()=>{}},[A,K]);function ht(){var se,xe;(se=Ke.current)==null||se.dispose(),N?T&&Hs.set(l,ie.current.saveViewState()):(xe=ie.current.getModel())==null||xe.dispose(),ie.current.dispose()}return O.createElement(eo,{width:F,height:S,isEditorReady:A,loading:f,_ref:Qe,className:R,wrapperProps:W})}var ud=md,yd=O.memo(ud);const so={keywords:[{name:"or",desc:["逻辑 OR。适用于布尔表达式。"],syntax:["expr1 or expr2"],returns:["布尔值,或一系列布尔值。"]},{name:"and",desc:["逻辑 AND。适用于布尔表达式。"],syntax:["expr1 and expr2"],returns:["布尔值,或一系列布尔值。"]},{name:"not",desc:["逻辑求反(NOT)。 适用于布尔表达式。"],syntax:["not expr1"],returns:["布尔值,或一系列布尔值。"]},{name:"if",desc:["If语句定义了在满足表达式条件时必须执行的语句块。","要访问和使用if语句,应在代码的第一行中指定>= 2的Pine Script®语言版本,例如://@version=5","Pine Script®语言的第四版允许您使用“else if”语法。","通用编码来自:"],syntax:[`var_declarationX = if condition
40
40
  var_decl_then0
41
41
  var_decl_then1
42
42
 
@@ -103,49 +103,49 @@ else
103
103
  \${2:local_block_1}
104
104
  else
105
105
  \${3:local_block_2}
106
- `,kind:"statement"},{label:"for...to",insertText:"for ${1:i} = 1 to ${2:to_num} by 1\n ${3:local_block}\n",kind:"loop"},{label:"for...in",insertText:"for [${1:index}, ${2:value}] in ${3:arr}\n ${4:local_block}\n",kind:"loop"},{label:"while",insertText:"while ${1:condition}\n ${2:local_block}\n",kind:"statement"},{label:"switch",insertText:"switch ${1:condition}\n ${2:value_1} => ${3:local_block_1}\n ${4:value_2} => ${5:local_block_2}\n => ${6:default_local_block}\n",kind:"statement"}],ao=["in","as","continue","break","else","to","by"],ge={keywords:"keyword",functions:"built-in function",variables:"built-in variable",methods:"built-in method",types:"built-in type",annotations:"annotation",constants:"built-in constant",namespace:"namespace",userDefinedVariable:"user-defined variable",userDefinedType:"user-defined type",field:"field",enum:"enum",userDefinedMethod:"user-defined method",userDefinedFunction:"user-defined function",returns:"returns",parameter:"parameter",namespaceDesc:"**Namespaces** are immutable terms that act as prefixes for groups of identifiers. A dot and another term always follow a namespace when naming Tcc functions, variables, and methods.",toTriggerParameterHints:"to trigger parameters hint"},fd={clickOnKeywordForMoreHelp:"`click` on keyword for more help"};function gd(){const a={},n={};return Object.keys(so).reduce((s,o)=>{const c=so[o],l=ge[o],{mapObj:m,keys:y}=bd(c,l);return s.keyMapList[o]=m,s.keyList[o]=y,s},{keyList:a,keyMapList:n}),{keyList:a,keyMapList:n}}function bd(a,n){const s=new Map,o=[];return a.forEach(c=>{var m;c.title=n;const l=c.originalName||c.name;l!=="for...in"&&(s.has(l)?(m=s.get(l))==null||m.push(c):(o.push(l),s.set(l,[c])))}),{mapObj:s,keys:o}}const{keyList:no,keyMapList:lt}=gd(),ps=[{title:"Variables",key:"variables",prefix:"var"},{title:"Constants",key:"constants",prefix:"const"},{title:"Functions",key:"functions",prefix:"fun"},{title:"Keywords",key:"keywords",prefix:"kw"},{title:"Types",key:"types",prefix:"type"},{title:"Operators",key:"operators",prefix:"op"},{title:"Annotations",key:"annotations",prefix:"an"}];function xd(a){return a.replace(/<.*>/,"")}class hd{constructor(){Object.defineProperty(this,"delimiter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"lineBreak",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"paragraphBreak",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.delimiter="***",this.lineBreak=`
106
+ `,kind:"statement"},{label:"for...to",insertText:"for ${1:i} = 1 to ${2:to_num} by 1\n ${3:local_block}\n",kind:"loop"},{label:"for...in",insertText:"for [${1:index}, ${2:value}] in ${3:arr}\n ${4:local_block}\n",kind:"loop"},{label:"while",insertText:"while ${1:condition}\n ${2:local_block}\n",kind:"statement"},{label:"switch",insertText:"switch ${1:condition}\n ${2:value_1} => ${3:local_block_1}\n ${4:value_2} => ${5:local_block_2}\n => ${6:default_local_block}\n",kind:"statement"}],ao=["in","as","continue","break","else","to","by"],ge={keywords:"keyword",functions:"built-in function",variables:"built-in variable",methods:"built-in method",types:"built-in type",annotations:"annotation",constants:"built-in constant",namespace:"namespace",userDefinedVariable:"user-defined variable",userDefinedType:"user-defined type",field:"field",enum:"enum",userDefinedMethod:"user-defined method",userDefinedFunction:"user-defined function",returns:"returns",parameter:"parameter",namespaceDesc:"**Namespaces** are immutable terms that act as prefixes for groups of identifiers. A dot and another term always follow a namespace when naming Tcc functions, variables, and methods.",toTriggerParameterHints:"to trigger parameters hint"},fd={clickOnKeywordForMoreHelp:"`click` on keyword for more help"};function gd(){const a={},n={};return Object.keys(so).reduce((s,o)=>{const c=so[o],l=ge[o],{mapObj:m,keys:y}=bd(c,l);return s.keyMapList[o]=m,s.keyList[o]=y,s},{keyList:a,keyMapList:n}),{keyList:a,keyMapList:n}}function bd(a,n){const s=new Map,o=[];return a.forEach(c=>{var m;c.title=n;const l=c.originalName||c.name;l!=="for...in"&&(s.has(l)?(m=s.get(l))==null||m.push(c):(o.push(l),s.set(l,[c])))}),{mapObj:s,keys:o}}const{keyList:no,keyMapList:ct}=gd(),ps=[{title:"Variables",key:"variables",prefix:"var"},{title:"Constants",key:"constants",prefix:"const"},{title:"Functions",key:"functions",prefix:"fun"},{title:"Keywords",key:"keywords",prefix:"kw"},{title:"Types",key:"types",prefix:"type"},{title:"Operators",key:"operators",prefix:"op"},{title:"Annotations",key:"annotations",prefix:"an"}];function xd(a){return a.replace(/<.*>/,"")}class hd{constructor(){Object.defineProperty(this,"delimiter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"lineBreak",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"paragraphBreak",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.delimiter="***",this.lineBreak=`
107
107
  `,this.paragraphBreak=`
108
108
 
109
109
  `}bold(n){return`**${n}**`}italic(n){return`*${n.replace(">","&gt;").replace("<","&lt;")}*`}pineCode(n){return`\`\`\`
110
110
  ${n}
111
- \`\`\``}code(n){return`\`${n}\``}paragraph(...n){return[this.paragraphBreak,...n,this.paragraphBreak].join(this.lineBreak)}link(n,s){return`[${n}](${s.href})`}}const le=new hd;function wd(a){const{name:n,libraryName:s,desc:o}=a,c=[`${le.bold(n||s)} (library)`];return c.push(le.delimiter),o&&c.push(le.paragraph(le.bold(et.Description),le.lineBreak,o)),c.join(c.length===2?" ":le.lineBreak)}function vd(a,n=0,s=!0){const o=a[n];if(!o)return"";if(o.isEnumMember)return`${le.bold(o.name)} (enum member)${o.value===void 0?"":` = ${o.value}`}`;const c=/(Mac|iPhone|iPod|iPad)/i.test(window.navigator.userAgent),{name:l,title:m,desc:y,type:f,syntax:b,returns:h,remarks:T,fields:N,members:B}=o,E=[`${le.bold(l)} (${m})`];if(a.length>1&&E.push(le.italic(`+${a.length-1} overloads`)),E.push(le.delimiter),y&&E.push(le.paragraph(Array.isArray(y)?y.join(le.lineBreak):y||"")),f&&E.push(le.paragraph(le.bold(et.Type),le.italic(f))),b&&b.length&&E.push(le.paragraph(le.bold(et.Syntax),le.pineCode(b.join(le.lineBreak)))),h&&E.push(le.paragraph(le.bold(et.Returns),le.lineBreak,h.join(le.lineBreak))),T&&T.length&&a.length<=1){let F="";typeof T=="string"?F=T:F=T.join(le.lineBreak)||"",F.length<200&&E.push(le.paragraph(le.bold(et.Remarks),le.lineBreak,F))}if(N){const F=[];for(const H of N){const Y=H.desc?` - ${H.desc}`:"";F.push(`${H.name} (${H.type})${Y}`)}E.push(le.paragraph(le.bold(et.Fields),le.lineBreak,F.join(le.paragraphBreak)))}if(B){const F=[];for(const H of B){const Y=H.desc?` - ${H.desc}`:"";F.push(`${H.name}${H.value?` (${H.value})`:""}${Y}`)}E.push(le.paragraph(le.bold(et.EnumMembers),le.lineBreak,F.join(le.paragraphBreak)))}return s&&E.push(le.italic(`${le.code(c?"⌘":"Ctrl")} + ${fd.clickOnKeywordForMoreHelp}`)),E.join(E.length===2?" ":le.lineBreak)}const nn="tcc_cursor_position",Td=["submenuitem.EditorContextPeek","editor.action.peekDefinition"];function Dd(a){return a.replace(/<[^<>]+>/,"").replace(/(series|simple|const|input)\s+([\w\d.]+)/,"$2").replace(/\w[\w.\d]*\[\]/,"array")}function kd(a){const n=a.getContribution("editor.contrib.contextmenu"),s=n==null?void 0:n._getMenuActions;n._getMenuActions=function(){return s.apply(n,arguments).filter(function(c){return!Td.includes(c.id)})}}class Id{constructor(){Object.defineProperty(this,"bracketsPostfix",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_builtinSubtreeCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_formatter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_namespaceCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_suggestions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_outermostNsItems",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_funcArgsCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userSuggestions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userFuncArgsCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userNamespaceCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userOutermostNsItems",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_methodNamespaceCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userMethods",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userFunctions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_methodFuncs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userTypes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userEnums",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_nextIsBracket",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.bracketsPostfix="(${0})",this._builtinSubtreeCache={},this._formatter=le,this._namespaceCache=new Map,this._suggestions=[],this._outermostNsItems=new Map,this._funcArgsCache=new Map,this._userSuggestions=[],this._userFuncArgsCache=new Map,this._userNamespaceCache=new Map,this._userOutermostNsItems=new Map,this._methodNamespaceCache=new Map,this._userMethods=new Map,this._userTypes=new Map,this._methodFuncs=new Map,this._userFunctions=new Map,this._userEnums=new Map,this._nextIsBracket=!1}get methodFuncs(){return this._methodFuncs}get userFuncs(){return this._userFunctions}get userEnums(){return this._userEnums}set nextIsBracket(n){this._nextIsBracket=n}get nextIsBracket(){return this._nextIsBracket}get annotationSuggestions(){return this._getAnnotationCompletionItems(this._builtinSubtreeCache.annotations)}initBuiltinsTrees(){this._getBuiltinsCacheFragment(),this._suggestions=this._getAllCompletionItems(),this._getFuncArgumentsCompletionItemsToCache(this._builtinSubtreeCache.functions)}getArgSuggestions(n){return this._funcArgsCache.get(n)||this._userFuncArgsCache.get(n)}getSuggestions(n){return n?this._namespaceCache.get(n)||this._userNamespaceCache.get(n):this._suggestions.concat(this._userSuggestions)}_initUserDefind(){this._userFuncArgsCache.clear(),this._userNamespaceCache.clear(),this._userOutermostNsItems.clear(),this._methodNamespaceCache.clear(),this._methodFuncs.clear()}setUserDefind(n,s,o,c,l){this._initUserDefind();const m=this._mergeTreeSlices(this._generateTreeSlice(lt.methods,"method"),this._generateTreeSlice(c,"method"));this._getMethodNamespaceCache(m),this._userMethods=c,this._userTypes=s,this._userFunctions=n,this._userEnums=l;const y=this._generateTreeSlice(n,"fun");this._userSuggestions=this._getAllUserCompletionItems(y,this._generateTreeSlice(s,"type"),this._generateTreeSlice(o,"var"),this._generateTreeSlice(l,"enum")),this._getUserFuncArgumentsCompletionItemsToCache(y)}_getAllUserCompletionItems(n,s,o,c){const l=this._getEnumCompletionItems(c),m=this._getUserVariableCompletionItems(o),y=this._getTypeCompletionItems(s,!0),f=this._getFunctionCompletionItems(n,void 0,!0);return[...y,...f,...m,...l,...this._userOutermostNsItems.values()]}_getAllCompletionItems(){const{variables:n,keywords:s,types:o,functions:c}=this._builtinSubtreeCache,l=this._getVariableCompletionItems(n),m=this._getKeywordCompletionItems(s),y=this._getTypeCompletionItems(o),f=this._getFunctionCompletionItems(c),b=this._getSnippetsCompletionsList();return[...l,...m,...y,...f,...this._outermostNsItems.values(),...b]}_getNodeKey(n,s){return`${s}_${n}`}_mergeTreeSlices(...n){const s=new Map;for(const o of n)for(const[c,l]of o){const m=s.get(c);m?s.set(c,{...m,children:this._mergeTreeSlices(l.children,m.children)}):s.set(c,l)}return s}_mergeCompletions(n,s){const o=this._namespaceCache.get(n);o?this._namespaceCache.set(n,[...o,...s]):this._namespaceCache.set(n,s)}_mergeUserCompletions(n,s){const o=this._userNamespaceCache.get(n);o?this._userNamespaceCache.set(n,[...o,...s]):this._userNamespaceCache.set(n,s)}_generateTreeSlice(n,s){const o=new Map;for(const[c,l]of n){const[m,...y]=c.split("."),f=y.length>0,b=o.get(this._getNodeKey(m,f?"ns":s));let h=new Map,T=l.map(B=>({...B,name:c})),N=this._getNodeKey(c,s);if(f&&s!=="type"){const B=new Map([[y.join("."),l]]);T=[{name:m,title:ge.namespace}],N=this._getNodeKey(m,"ns"),h=this._generateTreeSlice(B,s)}b&&(T=[{name:m,title:ge.namespace}],h=this._mergeTreeSlices(b.children,h)),o.set(N,{value:T,children:h})}return o}_getBuiltinsCacheFragment(){const{keywords:n,variables:s,constants:o,types:c,functions:l,annotations:m}=lt,y=this._generateTreeSlice(m,"an");return y.delete("an_@version="),this._builtinSubtreeCache={keywords:this._generateTreeSlice(n,"key"),variables:this._mergeTreeSlices(this._generateTreeSlice(s,"var"),this._generateTreeSlice(o,"var")),types:this._generateTreeSlice(c,"type"),functions:this._generateTreeSlice(l,"fun"),annotations:y},this._builtinSubtreeCache}_getVariableCompletionItems(n,s){const o=[],c=[];for(const[l,m]of n){const{value:y,children:f}=m;if(l.startsWith("ns")){const b=this._getNamespaceCompletionItem(y[0]);if(s){c.push({...b});const T=`${s}.${b.label}`;b.label=T,b.insertText=T}const h=this._getVariableCompletionItems(f,b.label);s||this._outermostNsItems.set(l,b),o.push(...h)}else{const b=this._getVariableCompletionItem(y[0],s?3:2);if(s){c.push({...b});const{label:h}=b;b.label=`${s}.${h}`,b.insertText=`${s}.${b.insertText}`,b.filterText=`${h}\r`}o.push(b)}}return c.length&&s&&this._mergeCompletions(s,c),o}_setUserVariableSubItems(n,s){var b,h,T,N;let o=[];const c=Dd(n.type||""),l=this._methodNamespaceCache.get(c),m=s?`${s}.${n.name}`:n.name;l&&(o=l.filter(B=>{var Y;const E=`${c}.${B.label}`,F=lt.methods.get(E)||this._userMethods.get(E),H=F==null?void 0:F.some(G=>!G.thisType||G.thisType[0].includes("<>")||G.thisType.includes(n.type||""));if(H&&F){const G=this._getNamedArgumentsCompletionList(((Y=F[0])==null?void 0:Y.args)||[]),K=`${m}.${B.label}`;this._userFuncArgsCache.set(K,G),this._methodFuncs.set(K,F)}return H}));const{types:y}=lt,f=((h=(b=this._userTypes.get(c))==null?void 0:b[0])==null?void 0:h.fields)||((N=(T=y.get(c))==null?void 0:T[0])==null?void 0:N.fields);if(f)for(const B of f){const E=B.name,F=B.type,H=this._getInstanceTypeCompletionItemProp({name:E,type:F,desc:B.desc?[B.desc]:void 0});this._setUserVariableSubItems({name:E,type:F},n.name),o.push({...H})}o.length&&this._mergeUserCompletions(m,o)}_getUserVariableCompletionItems(n,s){const o=[],c=[];for(const[l,m]of n){const{value:y,children:f}=m;if(this._setUserVariableSubItems(y[0]),l.startsWith("ns")){const b=this._getNamespaceCompletionItem(y[0]);if(s){c.push({...b});const T=`${s}.${b.label}`;b.label=T,b.insertText=T}const h=this._getUserVariableCompletionItems(f,b.label);s||this._userOutermostNsItems.set(l,b),o.push(...h)}else{const b=this._getVariableCompletionItem(y[0],s?2:1,!1);if(s){c.push({...b});const{label:h}=b;b.label=`${s}.${h}`,b.insertText=`${s}.${b.insertText}`,b.filterText=`${h}\r`}o.push(b)}}return c.length&&s&&this._mergeUserCompletions(s,c),o}_getTypeCompletionItems(n,s=!1){const o=[];for(const[,c]of n){const{value:l}=c,m=s?this._getCustomTypeCompletionItem(l[0]):this._getTypeCompletionItem(l[0]);o.push(m)}return o}_getEnumCompletionItems(n){const s=[];for(const[,o]of n){const{value:c}=o,l=this._getEnumCompletionItem(c[0]);s.push(l);const m=c[0].members;m!=null&&m.length&&this._getEnumMemberCompletionItems(c[0].name,m)}return s}_getEnumMemberCompletionItems(n,s){const o=[];for(const c of s){const{name:l,desc:m,value:y}=c,f=this._getEnumMemberCompletionItem({name:l,desc:m?[m]:void 0,value:y});o.push(f)}o.length&&this._mergeUserCompletions(n,o)}_getAnnotationCompletionItems(n){const s=[];for(const[,o]of n){const{value:c}=o,l=this._getAnnotationCompletionItem(c[0]);s.push(l)}return s}_getKeywordCompletionItems(n){const s=[];for(const[,o]of n){const{value:c}=o,l=this._getKeywordCompletionItem(c[0]);s.push(l)}return s}_getMethodNamespaceCache(n,s){const o=[];for(const[c,l]of n){const{value:m,children:y}=l;if(c.startsWith("ns")){const f=this._getNamespaceCompletionItem(m[0]);if(s){o.push({...f});const b=`${s}.${f.label}`;f.label=b,f.insertText=b}this._getMethodNamespaceCache(y,f.label)}else{const f=this._getFunctionCompletionItem(m[0],s?3:2);if(m.length>1&&(f.detail=`${f.detail} (+${m.length-1} overloads)`),s){o.push({...f});const{label:b}=f;f.label=`${s}.${b}`,f.insertText=`${s}.${f.insertText}`,f.originInsertText=`${s}.${f.originInsertText}`,f.filterText=`${b}\r`}}}s&&this._methodNamespaceCache.set(s,o)}_getFunctionCompletionItems(n,s,o=!1){const c=[],l=[];for(const[m,y]of n){const{value:f,children:b}=y;if(m.startsWith("ns")){const h=this._getNamespaceCompletionItem(f[0]);if(s){l.push({...h});const N=`${s}.${h.label}`;h.label=N,h.insertText=N}const T=this._getFunctionCompletionItems(b,h.label,o);s||(o?this._userOutermostNsItems.set(m,h):this._outermostNsItems.set(m,h)),c.push(...T)}else{const h=this._getFunctionCompletionItem(f[0],s?3:2,!o);if(f.length>1&&(h.detail=`${h.detail} (+${f.length-1} overloads)`),s){l.push({...h});const{label:T}=h;h.label=`${s}.${T}`,h.insertText=`${s}.${h.insertText}`,h.originInsertText=`${s}.${h.originInsertText}`,h.filterText=`${T}\r`}c.push(h)}}return l.length&&s&&(o?this._mergeUserCompletions(s,l):this._mergeCompletions(s,l)),c}_getSnippetsCompletionsList(){return _d.map(n=>{const{label:s,kind:o,insertText:c}=n,l=s.charAt(0).toUpperCase()+s.substring(1),m={value:this._formatter.pineCode(c.replace(/\${\d:([^}]+)}|\${\d}/g,"$1"))};return{label:s,detail:`(${l} ${o})`,insertText:c,insertTextRules:ke.languages.CompletionItemInsertTextRule.InsertAsSnippet,sortText:`2_${s}`,kind:ke.languages.CompletionItemKind.Snippet,documentation:m}})}_getFuncArgumentsCompletionItemsToCache(n,s){for(const[o,c]of n){const{name:l}=c.value[0];if(o.startsWith("ns"))this._getFuncArgumentsCompletionItemsToCache(c.children,s?`${s}.${l}`:l);else{const m=new Map;c.value.reduce((b,h)=>{const T=h.args;return T&&T.length&&T.forEach(N=>{b.set(N.name,N)}),b},m);const y=this._getNamedArgumentsCompletionList([...m.values()]),f=s?`${s}.${l}`:l;this._funcArgsCache.set(f,y)}}}_getUserFuncArgumentsCompletionItemsToCache(n,s){for(const[o,c]of n){const{name:l}=c.value[0];if(o.startsWith("ns"))this._getUserFuncArgumentsCompletionItemsToCache(c.children,s?`${s}.${l}`:l);else{const m=new Map;c.value.reduce((b,h)=>{const T=h.args;return T&&T.length&&T.forEach(N=>{b.set(N.name,N)}),b},m);const y=this._getNamedArgumentsCompletionList([...m.values()]),f=s?`${s}.${l}`:l;this._userFuncArgsCache.set(f,y)}}}_getNamedArgumentsCompletionList(n){return n.map(s=>{const{name:o,desc:c,displayType:l}=s,m=`${o} = `,y=Array.isArray(c)?c.join(this._formatter.delimiter):c||"";return{label:m,documentation:{value:this._formatter.paragraph(this._formatter.bold(ge.Description),this._formatter.lineBreak,y)},insertText:m,detail:`(${ge.parameter}) ${ge.types} ${l}`,kind:ke.languages.CompletionItemKind.Text,sortText:`0_${m}`}})}_getVariableCompletionItem(n,s=2,o=!0){const c=this._extractExamples(n),l=this._extractDescription(n),m=[this._createDescriptionSection(l)];c.length?m.push(this._createExampleSection(c)):n.syntax&&n.syntax.length&&m.push(this._createSyntaxSection(n.syntax));const y={value:m.join(this._formatter.lineBreak)},f=o?ge.variables:ge.userDefinedVariable;return{documentation:y,label:n.name,insertText:n.name,kind:ke.languages.CompletionItemKind.Variable,sortText:`${s}_${n.name}`,detail:`(${f}) ${n.type}`}}_getKeywordCompletionItem(n,s=2){const o=this._extractExamples(n),c=this._extractDescription(n),l=[this._createDescriptionSection(c)];return o.length?l.push(this._createExampleSection(o)):n.syntax&&n.syntax.length&&l.push(this._createSyntaxSection(n.syntax)),{documentation:{value:l.join(this._formatter.lineBreak)},label:n.name,insertText:n.name,kind:ke.languages.CompletionItemKind.Keyword,sortText:`${s}_${n.name}`,detail:`(${ge.keywords})`}}_getTypeCompletionItem(n){const s=this._extractDescription(n);return{documentation:{value:this._createDescriptionSection(s)},label:n.name,insertText:n.name,kind:ke.languages.CompletionItemKind.Keyword,sortText:`1_${n.name}`,detail:`(${ge.types})`}}_getCustomTypeCompletionItem(n){const s=this._extractDescription(n);return{documentation:{value:this._createDescriptionSection(s)},label:n.name,insertText:n.name,kind:ke.languages.CompletionItemKind.Keyword,sortText:`2_${n.name}`,detail:`(${ge.userDefinedType})`}}_getEnumCompletionItem(n){const s=this._extractDescription(n);return{documentation:{value:this._createDescriptionSection(s)},label:n.name,insertText:n.name,kind:ke.languages.CompletionItemKind.Enum,sortText:`2_${n.name}`,detail:`(${ge.enum})`}}_getEnumMemberCompletionItem(n){const s=this._extractDescription(n);return{documentation:{value:this._createDescriptionSection(s)},label:n.name,insertText:n.name,kind:ke.languages.CompletionItemKind.EnumMember,sortText:`2_${n.name}`,detail:`(enum member) ${n.value?`${n.name} = ${n.value}`:`${n.name}`}`}}_getInstanceTypeCompletionItemProp(n){const s=this._extractDescription(n),o=[];return s&&o.push(this._formatter.paragraph(this._formatter.bold(et.Description),this._formatter.lineBreak,s)),{documentation:{value:o.join(this._formatter.lineBreak)},label:n.name,insertText:n.name,kind:ke.languages.CompletionItemKind.Field,sortText:`2_${n.name}`,detail:`(${ge.field}) ${n.type}`}}_getFunctionCompletionItem(n,s=2,o=!0){var B;const c=n.returnedTypes&&n.returnedTypes[0]||n.syntax&&n.syntax[0]&&((B=n.syntax[0].split("→").pop())==null?void 0:B.trim()),l=this._extractExamples(n),m=this._extractDescription(n),y=[this._createDescriptionSection(m)];l.length?y.push(this._createExampleSection(l)):n.syntax&&n.syntax.length&&y.push(this._createSyntaxSection(n.syntax)),n.returns&&n.returns.length&&y.push(this._createReturnSection(n.returns));const f={value:y.join(this._formatter.lineBreak)},b=n.name,h=o?ge.functions:ge.userDefinedFunction,T=n.template,N=T?`${xd(b)}<\${1}>`:b;return{documentation:f,label:T?`${b.replace(/<.+>/,"")}<type>`:b,kind:ke.languages.CompletionItemKind.Function,sortText:`${s}_${b}`,insertTextRules:ke.languages.CompletionItemInsertTextRule.InsertAsSnippet,insertText:N+this.bracketsPostfix,originInsertText:N,detail:`(${h}) ${ge.returns} ${c}`,command:{id:"tcc.editor.function",title:"",arguments:[T?"editor.action.triggerSuggest":"editor.action.triggerParameterHints"]}}}_getAnnotationCompletionItem(n){const s=this._extractDescription(n),o=this._extractExamples(n),c=[this._createDescriptionSection(s)];return o.length&&c.push(this._createExampleSection(o)),{documentation:{value:c.join(this._formatter.lineBreak)},label:n.name,insertText:n.name.replace("@",""),kind:ke.languages.CompletionItemKind.Keyword,detail:`(${ge.annotations})`}}_getNamespaceCompletionItem(n,s=2){const o=[this._createDescriptionSection(ge.namespaceDesc)];return{label:n.name,documentation:{value:o.join(this._formatter.lineBreak)},detail:`(${ge.namespace}) ${n.name}`,insertText:n.name,sortText:`${s}_${n.name}`,kind:ke.languages.CompletionItemKind.Module}}_extractExamples(n){let s;return n.examples||n.detailedDesc&&((s=n.detailedDesc[0])===null||s===void 0?void 0:s.examples)||[]}_extractDescription(n){return Array.isArray(n.desc)?n.desc.join(this._formatter.lineBreak):n.desc||""}_createExampleSection(n){return this._formatter.paragraph(this._formatter.bold(et.Example),this._formatter.pineCode(n.join(this._formatter.lineBreak)))}_createSyntaxSection(n){return this._formatter.paragraph(this._formatter.bold(et.Syntax),this._formatter.pineCode(n.join(this._formatter.lineBreak)))}_createReturnSection(n){return this._formatter.paragraph(this._formatter.bold(et.Returns),this._formatter.lineBreak,n.join(this._formatter.lineBreak))}_createDescriptionSection(n){return!n||n.trim().length===0?"":this._formatter.paragraph(this._formatter.bold(et.Description),this._formatter.lineBreak,n)}}const zt=new Id;class Ad{constructor(){Object.defineProperty(this,"_userFunctions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userVariables",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userTypes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userMethods",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userEnums",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_imports",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_overloadsFuncs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._userFunctions=new Map,this._userVariables=new Map,this._userTypes=new Map,this._userMethods=new Map,this._imports=new Map,this._userEnums=new Map,this._overloadsFuncs=[]}get overloadsFuncs(){return this._overloadsFuncs}setUserDefined(n,s){const{functions:o,variables:c,types:l,methods:m,imports:y,enums:f}=n;o&&(this._userFunctions=o),c&&(this._userVariables=c),l&&(this._userTypes=l),m&&(this._userMethods=m),y&&(this._imports=y),f&&(this._userEnums=f),this._overloadsFuncs=s}parseLineContentFuncVar(n,s,o,c){let l=(o==null?void 0:o.getLineContent(s))||"";const m=l.indexOf("//");if(this._removeString(l).indexOf("//")!==-1&&m<=n)return;l=l+" ";const y=this._getVariablesDocVal(l,n,s);if(y){if(y.isBuildIn){const h=o==null?void 0:o.getWordAtPosition(c||new ke.Position(s,n));if(((o==null?void 0:o.getValueInRange({startLineNumber:s,startColumn:(h==null?void 0:h.endColumn)||0,endLineNumber:s,endColumn:((h==null?void 0:h.endColumn)||0)+2}))||"").trim().startsWith("="))return null}return y}const f=this._getFuncsDocVal(l,n,s);if(f)return f;const b=l.match(/[a-zA-Z_][a-zA-Z_0-9]*(\s*\.\s*[a-zA-Z_][a-zA-Z_0-9]*)*(?=\s*<)/g);if(b){const h=this._matchContent(b,l,n);if(h){const T=this._getBuildInOther(h.name);if(T)return{docValue:T,isBuildIn:!0,index:0};{const N=this._getBuildInFunc(`${h.name}<type>`);if(N)return{docValue:N,isBuildIn:!0,index:0}}}}return this._getImportDocVal(l,n,s)}_getImportDocVal(n,s,o){const c=new RegExp("(?<=(import(\\s+)))([a-zA-Z\\d\\$_\\-\\.\\u00a1-\\uffff\\/]+)","g"),l=new RegExp("(?<=(as\\b)(\\s+))([a-zA-Z\\d\\_\\u00a1\\uffff\\/]+)","g"),m=n.match(c);if(m){const y=this._matchContent(m,n,s);if(y){const b=this._imports.get(y.name);if(b)return b}const f=n.match(l);if(f){const b=this._matchContent(f,n,s);if(b){for(const[h,T]of this._imports)if(T.name===b.name)return T}}}return null}_getBuildInFunc(n){return lt.functions.get(n)}_getBuildInMethod(n){return lt.methods.get(n)}_getBuildInOther(n){const{keywords:s,variables:o,constants:c,types:l}=lt;return s.get(n)||o.get(n)||c.get(n)||l.get(n)}parseCurrentInputFunc(n,s=!1,o=!1){let c=n.length-1,l=0,m=s,y=o;for(;c>=0;){const f=n.charAt(c);if(c-=1,/['"]/.test(f)){const b=f;if(f==="'"){if(m){m=!1;continue}}else if(y){y=!1;continue}for(;c>=0;){const h=n.charAt(c);if(c-=1,h===b)break}}if(!(m||y)&&(/\)/.test(f)&&(l+=1),/\(/.test(f))){if(l>0){l-=1;continue}let b="";for(;c>=0;){const h=n.charAt(c);if(/\s/.test(h)&&!b){c-=1;continue}if(/[^\w.]/.test(h))break;c-=1,b=h+b}if(b)return{funcName:b,startIndex:c+1}}}}parseCurrentInputFuncAndArg(n,s=!1,o=!1){const{funcName:c,startIndex:l}=this.parseCurrentInputFunc(n,s,o)||{};if(c&&typeof l=="number"){let m=n.slice(l+c.length).trim().slice(1),y=-1;if(s&&(y=m.lastIndexOf("'")),o){const h=m.lastIndexOf('"');(h!==-1&&h<y||y===-1)&&(y=h)}y!==-1&&(m=m.substring(0,y));const b=m.replace(/[\w.]+\(.*\)/g,"").split(",").map(h=>{const T=h.trim().split("=");return T.length<=1?"":T[0].trim()});return{startIndex:l,funcName:c,args:b}}}_removeString(n){return n.replace(/\\"|\\'/g,"").replace(/"[^"]*"|'[^']*'/g,"")}_getVariablesDocVal(n,s,o){const c=this._removeString(n).replace(/\/\/.*/g,"").match(/[a-zA-Z_][a-zA-Z_0-9]*(\s*\.\s*[a-zA-Z_][a-zA-Z_0-9]*)*(?=\s*[^(a-zA-Z_0-9."'<])/g);if(c){const l=this._matchContent(c,n,s);if(l){const m={docValue:void 0,isBuildIn:!0,index:0},y=this._getBuildInOther(l.name);if(y)return m.docValue=y,m;const f=this._getUserVariablesDocVal(l.name,s,o);if(f)return Object.assign(m,{docValue:[f],isBuildIn:!1});const b=this._getUserTypesDocVal(l.name);if(b)return Object.assign(m,{docValue:b,isBuildIn:!1});const h=this._getTypesAndFileds(n,l.name,s,o);if(h&&typeof h!="string")return Object.assign(m,{docValue:[h],isBuildIn:!1});const T=this._getUserEnumsDocVal(l,s);if(T)return Object.assign(m,{docValue:T,isBuildIn:!1})}}}_getUserVariablesDocVal(n,s,o){const m=[...this._userVariables.get(n)||[]].sort((y,f)=>(f.scope||0)-(y.scope||0)).find(y=>{const f=y.range;return((f==null?void 0:f.startColumn)||0)<=s&&((f==null?void 0:f.startLineNumber)||0)<=o&&((f==null?void 0:f.endLineNumber)||0)>=o});if(m)return m.title=ge.userDefinedVariable,m.type=this._arrayTypeTransform(m.type),m}_getUserTypesDocVal(n){const s=this._userTypes.get(n);if(s)return s[0].title=ge.userDefinedType,s}_getUserEnumsDocVal(n,s){var f;const{endIndex:o,name:c}=n,l=c.split(".");let m=l[0];l.length>2&&(m=l.slice(0,2).join("."));const y=this._userEnums.get(m);if(y&&y.length){y[0].title=ge.enum;const b=l[l.length-1],h=(f=y[0].members)==null?void 0:f.find(T=>T.name===b);if(!h||s<o-b.length)return y;if(s>o-b.length)return[h]}}_getTypesAndFileds(n,s,o,c){var l,m;if(s.includes(".")){const y=s.split(".");let f=y[0],b,h=null,T=n.indexOf(s,o-s.length)+1,N=T+f.length-1;for(const B of y.slice(1)){if(!h){const E=T<=o&&N>=o,F=this._getUserVariablesDocVal(f,o,c);if(E&&F)return F;h=F==null?void 0:F.type}if(h){b=h,T=N+2,N=N+B.length+1;const E=this._userTypes.get(h)||lt.types.get(h),F=(m=(l=E==null?void 0:E[0])==null?void 0:l.fields)==null?void 0:m.find(H=>H.name===B);if(F&&T<=o&&N>=o)return{name:`${h}.${B}`,desc:F.desc,type:this._arrayTypeTransform(F.type),title:ge.field};h=F==null?void 0:F.type}else f=`${f}.${B}`,N=N+B.length+1}return b}}_getFuncsDocVal(n,s,o){var l;const c=n.match(/[a-zA-Z_][a-zA-Z_0-9]*(\s*\.\s*[a-zA-Z_][a-zA-Z_0-9]*)*(?=\s*\()/g);if(c){const m=this._matchContent(c,n,s);if(m){const y={docValue:void 0,isBuildIn:!0,endIndex:m.endIndex,index:0},f=this._getBuildInFunc(m.name);if(f)return y.index=this._getOverloadsFuncIndex(f,s,m.name,o),Object.assign(y,{docValue:f});const b=this._getUserFuncsDocVal(m.name);if(b)return y.index=this._getOverloadsFuncIndex(b,s,m.name,o),Object.assign(y,{docValue:b,isBuildIn:!1});const h=this._getUserVarFuncsDocVal(n,m.name,s,o);if(h)return Object.assign(y,{docValue:[h],isBuildIn:!1});const T=m.name.split("."),N=((l=T.pop())==null?void 0:l.length)||0;if(s>m.endIndex-N-1)return;const B=this._getBuildInOther(T.join("."));if(B)return Object.assign(y,{docValue:B,endIndex:m.endIndex-N-1})}}}_getOverloadsFuncIndex(n,s,o,c){if(n.length>1){const l=this._overloadsFuncs.find(m=>m.name===o&&m.line===c&&m.startColumn<=s&&m.endColumn>=s);if(l)return l.index}return 0}_getUserFuncsDocVal(n){const s=this._userFunctions.get(n);if(s){for(const o of s)o.title=ge.userDefinedFunction;return s}}_getUserMethodsDocVal(n){const s=this._userMethods.get(n);if(s){for(const o of s)o.title=ge.userDefinedFunction;return s}}_getUserVarFuncsDocVal(n,s,o,c){var l;if(s.includes(".")){const m=s.split("."),y=this._getTypesAndFileds(n,s,o,c);if(typeof y=="string"){const b=`${this._arrayTypeTransform(y).replace(/<[^<>]+>/,"").replace(/(series|simple|const|input)\s+([\w\d.]+)/,"$2")}.${m.pop()}`,h=this._getBuildInMethod(b);if(h){const T=this._getOverloadsFuncIndex(h,o,b,c);return{...h[0],name:b,index:T}}return(l=this._getUserMethodsDocVal(b))==null?void 0:l[0]}else return y}}_arrayTypeTransform(n=""){return n.includes("[]")?`array<${n.replace("[]","")}>`:n}_matchContent(n,s,o){let c=0;for(const l of n){c=o-l.length;const m=s.indexOf(l,c);if(c=m+l.length,this._judgeVal(s,m,c)&&m+1<=o&&c>=o)return{name:l,endIndex:c}}}_judgeVal(n,s,o){const c=n.charAt(s-1),l=/[\w\d."']/;if(l.test(c))return!1;const m=n.charAt(o);return!l.test(m)}}const gr=new Ad;var Ws={exports:{}};/**
111
+ \`\`\``}code(n){return`\`${n}\``}paragraph(...n){return[this.paragraphBreak,...n,this.paragraphBreak].join(this.lineBreak)}link(n,s){return`[${n}](${s.href})`}}const le=new hd;function wd(a){const{name:n,libraryName:s,desc:o}=a,c=[`${le.bold(n||s)} (library)`];return c.push(le.delimiter),o&&c.push(le.paragraph(le.bold(tt.Description),le.lineBreak,o)),c.join(c.length===2?" ":le.lineBreak)}function vd(a,n=0,s=!0){const o=a[n];if(!o)return"";if(o.isEnumMember)return`${le.bold(o.name)} (enum member)${o.value===void 0?"":` = ${o.value}`}`;const c=/(Mac|iPhone|iPod|iPad)/i.test(window.navigator.userAgent),{name:l,title:m,desc:y,type:f,syntax:b,returns:h,remarks:T,fields:N,members:F}=o,S=[`${le.bold(l)} (${m})`];if(a.length>1&&S.push(le.italic(`+${a.length-1} overloads`)),S.push(le.delimiter),y&&S.push(le.paragraph(Array.isArray(y)?y.join(le.lineBreak):y||"")),f&&S.push(le.paragraph(le.bold(tt.Type),le.italic(f))),b&&b.length&&S.push(le.paragraph(le.bold(tt.Syntax),le.pineCode(b.join(le.lineBreak)))),h&&S.push(le.paragraph(le.bold(tt.Returns),le.lineBreak,h.join(le.lineBreak))),T&&T.length&&a.length<=1){let R="";typeof T=="string"?R=T:R=T.join(le.lineBreak)||"",R.length<200&&S.push(le.paragraph(le.bold(tt.Remarks),le.lineBreak,R))}if(N){const R=[];for(const W of N){const V=W.desc?` - ${W.desc}`:"";R.push(`${W.name} (${W.type})${V}`)}S.push(le.paragraph(le.bold(tt.Fields),le.lineBreak,R.join(le.paragraphBreak)))}if(F){const R=[];for(const W of F){const V=W.desc?` - ${W.desc}`:"";R.push(`${W.name}${W.value?` (${W.value})`:""}${V}`)}S.push(le.paragraph(le.bold(tt.EnumMembers),le.lineBreak,R.join(le.paragraphBreak)))}return s&&S.push(le.italic(`${le.code(c?"⌘":"Ctrl")} + ${fd.clickOnKeywordForMoreHelp}`)),S.join(S.length===2?" ":le.lineBreak)}const nn="tcc_cursor_position",Td=["submenuitem.EditorContextPeek","editor.action.peekDefinition"];function Dd(a){return a.replace(/<[^<>]+>/,"").replace(/(series|simple|const|input)\s+([\w\d.]+)/,"$2").replace(/\w[\w.\d]*\[\]/,"array")}function kd(a){const n=a.getContribution("editor.contrib.contextmenu"),s=n==null?void 0:n._getMenuActions;n._getMenuActions=function(){return s.apply(n,arguments).filter(function(c){return!Td.includes(c.id)})}}class Id{constructor(){Object.defineProperty(this,"bracketsPostfix",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_builtinSubtreeCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_formatter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_namespaceCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_suggestions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_outermostNsItems",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_funcArgsCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userSuggestions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userFuncArgsCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userNamespaceCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userOutermostNsItems",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_methodNamespaceCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userMethods",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userFunctions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_methodFuncs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userTypes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userEnums",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_nextIsBracket",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.bracketsPostfix="(${0})",this._builtinSubtreeCache={},this._formatter=le,this._namespaceCache=new Map,this._suggestions=[],this._outermostNsItems=new Map,this._funcArgsCache=new Map,this._userSuggestions=[],this._userFuncArgsCache=new Map,this._userNamespaceCache=new Map,this._userOutermostNsItems=new Map,this._methodNamespaceCache=new Map,this._userMethods=new Map,this._userTypes=new Map,this._methodFuncs=new Map,this._userFunctions=new Map,this._userEnums=new Map,this._nextIsBracket=!1}get methodFuncs(){return this._methodFuncs}get userFuncs(){return this._userFunctions}get userEnums(){return this._userEnums}set nextIsBracket(n){this._nextIsBracket=n}get nextIsBracket(){return this._nextIsBracket}get annotationSuggestions(){return this._getAnnotationCompletionItems(this._builtinSubtreeCache.annotations)}initBuiltinsTrees(){this._getBuiltinsCacheFragment(),this._suggestions=this._getAllCompletionItems(),this._getFuncArgumentsCompletionItemsToCache(this._builtinSubtreeCache.functions)}getArgSuggestions(n){return this._funcArgsCache.get(n)||this._userFuncArgsCache.get(n)}getSuggestions(n){return n?this._namespaceCache.get(n)||this._userNamespaceCache.get(n):this._suggestions.concat(this._userSuggestions)}_initUserDefind(){this._userFuncArgsCache.clear(),this._userNamespaceCache.clear(),this._userOutermostNsItems.clear(),this._methodNamespaceCache.clear(),this._methodFuncs.clear()}setUserDefind(n,s,o,c,l){this._initUserDefind();const m=this._mergeTreeSlices(this._generateTreeSlice(ct.methods,"method"),this._generateTreeSlice(c,"method"));this._getMethodNamespaceCache(m),this._userMethods=c,this._userTypes=s,this._userFunctions=n,this._userEnums=l;const y=this._generateTreeSlice(n,"fun");this._userSuggestions=this._getAllUserCompletionItems(y,this._generateTreeSlice(s,"type"),this._generateTreeSlice(o,"var"),this._generateTreeSlice(l,"enum")),this._getUserFuncArgumentsCompletionItemsToCache(y)}_getAllUserCompletionItems(n,s,o,c){const l=this._getEnumCompletionItems(c),m=this._getUserVariableCompletionItems(o),y=this._getTypeCompletionItems(s,!0),f=this._getFunctionCompletionItems(n,void 0,!0);return[...y,...f,...m,...l,...this._userOutermostNsItems.values()]}_getAllCompletionItems(){const{variables:n,keywords:s,types:o,functions:c}=this._builtinSubtreeCache,l=this._getVariableCompletionItems(n),m=this._getKeywordCompletionItems(s),y=this._getTypeCompletionItems(o),f=this._getFunctionCompletionItems(c),b=this._getSnippetsCompletionsList();return[...l,...m,...y,...f,...this._outermostNsItems.values(),...b]}_getNodeKey(n,s){return`${s}_${n}`}_mergeTreeSlices(...n){const s=new Map;for(const o of n)for(const[c,l]of o){const m=s.get(c);m?s.set(c,{...m,children:this._mergeTreeSlices(l.children,m.children)}):s.set(c,l)}return s}_mergeCompletions(n,s){const o=this._namespaceCache.get(n);o?this._namespaceCache.set(n,[...o,...s]):this._namespaceCache.set(n,s)}_mergeUserCompletions(n,s){const o=this._userNamespaceCache.get(n);o?this._userNamespaceCache.set(n,[...o,...s]):this._userNamespaceCache.set(n,s)}_generateTreeSlice(n,s){const o=new Map;for(const[c,l]of n){const[m,...y]=c.split("."),f=y.length>0,b=o.get(this._getNodeKey(m,f?"ns":s));let h=new Map,T=l.map(F=>({...F,name:c})),N=this._getNodeKey(c,s);if(f&&s!=="type"){const F=new Map([[y.join("."),l]]);T=[{name:m,title:ge.namespace}],N=this._getNodeKey(m,"ns"),h=this._generateTreeSlice(F,s)}b&&(T=[{name:m,title:ge.namespace}],h=this._mergeTreeSlices(b.children,h)),o.set(N,{value:T,children:h})}return o}_getBuiltinsCacheFragment(){const{keywords:n,variables:s,constants:o,types:c,functions:l,annotations:m}=ct,y=this._generateTreeSlice(m,"an");return y.delete("an_@version="),this._builtinSubtreeCache={keywords:this._generateTreeSlice(n,"key"),variables:this._mergeTreeSlices(this._generateTreeSlice(s,"var"),this._generateTreeSlice(o,"var")),types:this._generateTreeSlice(c,"type"),functions:this._generateTreeSlice(l,"fun"),annotations:y},this._builtinSubtreeCache}_getVariableCompletionItems(n,s){const o=[],c=[];for(const[l,m]of n){const{value:y,children:f}=m;if(l.startsWith("ns")){const b=this._getNamespaceCompletionItem(y[0]);if(s){c.push({...b});const T=`${s}.${b.label}`;b.label=T,b.insertText=T}const h=this._getVariableCompletionItems(f,b.label);s||this._outermostNsItems.set(l,b),o.push(...h)}else{const b=this._getVariableCompletionItem(y[0],s?3:2);if(s){c.push({...b});const{label:h}=b;b.label=`${s}.${h}`,b.insertText=`${s}.${b.insertText}`,b.filterText=`${h}\r`}o.push(b)}}return c.length&&s&&this._mergeCompletions(s,c),o}_setUserVariableSubItems(n,s){var b,h,T,N;let o=[];const c=Dd(n.type||""),l=this._methodNamespaceCache.get(c),m=s?`${s}.${n.name}`:n.name;l&&(o=l.filter(F=>{var V;const S=`${c}.${F.label}`,R=ct.methods.get(S)||this._userMethods.get(S),W=R==null?void 0:R.some(Y=>!Y.thisType||Y.thisType[0].includes("<>")||Y.thisType.includes(n.type||""));if(W&&R){const Y=this._getNamedArgumentsCompletionList(((V=R[0])==null?void 0:V.args)||[]),U=`${m}.${F.label}`;this._userFuncArgsCache.set(U,Y),this._methodFuncs.set(U,R)}return W}));const{types:y}=ct,f=((h=(b=this._userTypes.get(c))==null?void 0:b[0])==null?void 0:h.fields)||((N=(T=y.get(c))==null?void 0:T[0])==null?void 0:N.fields);if(f)for(const F of f){const S=F.name,R=F.type,W=this._getInstanceTypeCompletionItemProp({name:S,type:R,desc:F.desc?[F.desc]:void 0});this._setUserVariableSubItems({name:S,type:R},n.name),o.push({...W})}o.length&&this._mergeUserCompletions(m,o)}_getUserVariableCompletionItems(n,s){const o=[],c=[];for(const[l,m]of n){const{value:y,children:f}=m;if(this._setUserVariableSubItems(y[0]),l.startsWith("ns")){const b=this._getNamespaceCompletionItem(y[0]);if(s){c.push({...b});const T=`${s}.${b.label}`;b.label=T,b.insertText=T}const h=this._getUserVariableCompletionItems(f,b.label);s||this._userOutermostNsItems.set(l,b),o.push(...h)}else{const b=this._getVariableCompletionItem(y[0],s?2:1,!1);if(s){c.push({...b});const{label:h}=b;b.label=`${s}.${h}`,b.insertText=`${s}.${b.insertText}`,b.filterText=`${h}\r`}o.push(b)}}return c.length&&s&&this._mergeUserCompletions(s,c),o}_getTypeCompletionItems(n,s=!1){const o=[];for(const[,c]of n){const{value:l}=c,m=s?this._getCustomTypeCompletionItem(l[0]):this._getTypeCompletionItem(l[0]);o.push(m)}return o}_getEnumCompletionItems(n){const s=[];for(const[,o]of n){const{value:c}=o,l=this._getEnumCompletionItem(c[0]);s.push(l);const m=c[0].members;m!=null&&m.length&&this._getEnumMemberCompletionItems(c[0].name,m)}return s}_getEnumMemberCompletionItems(n,s){const o=[];for(const c of s){const{name:l,desc:m,value:y}=c,f=this._getEnumMemberCompletionItem({name:l,desc:m?[m]:void 0,value:y});o.push(f)}o.length&&this._mergeUserCompletions(n,o)}_getAnnotationCompletionItems(n){const s=[];for(const[,o]of n){const{value:c}=o,l=this._getAnnotationCompletionItem(c[0]);s.push(l)}return s}_getKeywordCompletionItems(n){const s=[];for(const[,o]of n){const{value:c}=o,l=this._getKeywordCompletionItem(c[0]);s.push(l)}return s}_getMethodNamespaceCache(n,s){const o=[];for(const[c,l]of n){const{value:m,children:y}=l;if(c.startsWith("ns")){const f=this._getNamespaceCompletionItem(m[0]);if(s){o.push({...f});const b=`${s}.${f.label}`;f.label=b,f.insertText=b}this._getMethodNamespaceCache(y,f.label)}else{const f=this._getFunctionCompletionItem(m[0],s?3:2);if(m.length>1&&(f.detail=`${f.detail} (+${m.length-1} overloads)`),s){o.push({...f});const{label:b}=f;f.label=`${s}.${b}`,f.insertText=`${s}.${f.insertText}`,f.originInsertText=`${s}.${f.originInsertText}`,f.filterText=`${b}\r`}}}s&&this._methodNamespaceCache.set(s,o)}_getFunctionCompletionItems(n,s,o=!1){const c=[],l=[];for(const[m,y]of n){const{value:f,children:b}=y;if(m.startsWith("ns")){const h=this._getNamespaceCompletionItem(f[0]);if(s){l.push({...h});const N=`${s}.${h.label}`;h.label=N,h.insertText=N}const T=this._getFunctionCompletionItems(b,h.label,o);s||(o?this._userOutermostNsItems.set(m,h):this._outermostNsItems.set(m,h)),c.push(...T)}else{const h=this._getFunctionCompletionItem(f[0],s?3:2,!o);if(f.length>1&&(h.detail=`${h.detail} (+${f.length-1} overloads)`),s){l.push({...h});const{label:T}=h;h.label=`${s}.${T}`,h.insertText=`${s}.${h.insertText}`,h.originInsertText=`${s}.${h.originInsertText}`,h.filterText=`${T}\r`}c.push(h)}}return l.length&&s&&(o?this._mergeUserCompletions(s,l):this._mergeCompletions(s,l)),c}_getSnippetsCompletionsList(){return _d.map(n=>{const{label:s,kind:o,insertText:c}=n,l=s.charAt(0).toUpperCase()+s.substring(1),m={value:this._formatter.pineCode(c.replace(/\${\d:([^}]+)}|\${\d}/g,"$1"))};return{label:s,detail:`(${l} ${o})`,insertText:c,insertTextRules:ke.languages.CompletionItemInsertTextRule.InsertAsSnippet,sortText:`2_${s}`,kind:ke.languages.CompletionItemKind.Snippet,documentation:m}})}_getFuncArgumentsCompletionItemsToCache(n,s){for(const[o,c]of n){const{name:l}=c.value[0];if(o.startsWith("ns"))this._getFuncArgumentsCompletionItemsToCache(c.children,s?`${s}.${l}`:l);else{const m=new Map;c.value.reduce((b,h)=>{const T=h.args;return T&&T.length&&T.forEach(N=>{b.set(N.name,N)}),b},m);const y=this._getNamedArgumentsCompletionList([...m.values()]),f=s?`${s}.${l}`:l;this._funcArgsCache.set(f,y)}}}_getUserFuncArgumentsCompletionItemsToCache(n,s){for(const[o,c]of n){const{name:l}=c.value[0];if(o.startsWith("ns"))this._getUserFuncArgumentsCompletionItemsToCache(c.children,s?`${s}.${l}`:l);else{const m=new Map;c.value.reduce((b,h)=>{const T=h.args;return T&&T.length&&T.forEach(N=>{b.set(N.name,N)}),b},m);const y=this._getNamedArgumentsCompletionList([...m.values()]),f=s?`${s}.${l}`:l;this._userFuncArgsCache.set(f,y)}}}_getNamedArgumentsCompletionList(n){return n.map(s=>{const{name:o,desc:c,displayType:l}=s,m=`${o} = `,y=Array.isArray(c)?c.join(this._formatter.delimiter):c||"";return{label:m,documentation:{value:this._formatter.paragraph(this._formatter.bold(ge.Description),this._formatter.lineBreak,y)},insertText:m,detail:`(${ge.parameter}) ${ge.types} ${l}`,kind:ke.languages.CompletionItemKind.Text,sortText:`0_${m}`}})}_getVariableCompletionItem(n,s=2,o=!0){const c=this._extractExamples(n),l=this._extractDescription(n),m=[this._createDescriptionSection(l)];c.length?m.push(this._createExampleSection(c)):n.syntax&&n.syntax.length&&m.push(this._createSyntaxSection(n.syntax));const y={value:m.join(this._formatter.lineBreak)},f=o?ge.variables:ge.userDefinedVariable;return{documentation:y,label:n.name,insertText:n.name,kind:ke.languages.CompletionItemKind.Variable,sortText:`${s}_${n.name}`,detail:`(${f}) ${n.type}`}}_getKeywordCompletionItem(n,s=2){const o=this._extractExamples(n),c=this._extractDescription(n),l=[this._createDescriptionSection(c)];return o.length?l.push(this._createExampleSection(o)):n.syntax&&n.syntax.length&&l.push(this._createSyntaxSection(n.syntax)),{documentation:{value:l.join(this._formatter.lineBreak)},label:n.name,insertText:n.name,kind:ke.languages.CompletionItemKind.Keyword,sortText:`${s}_${n.name}`,detail:`(${ge.keywords})`}}_getTypeCompletionItem(n){const s=this._extractDescription(n);return{documentation:{value:this._createDescriptionSection(s)},label:n.name,insertText:n.name,kind:ke.languages.CompletionItemKind.Keyword,sortText:`1_${n.name}`,detail:`(${ge.types})`}}_getCustomTypeCompletionItem(n){const s=this._extractDescription(n);return{documentation:{value:this._createDescriptionSection(s)},label:n.name,insertText:n.name,kind:ke.languages.CompletionItemKind.Keyword,sortText:`2_${n.name}`,detail:`(${ge.userDefinedType})`}}_getEnumCompletionItem(n){const s=this._extractDescription(n);return{documentation:{value:this._createDescriptionSection(s)},label:n.name,insertText:n.name,kind:ke.languages.CompletionItemKind.Enum,sortText:`2_${n.name}`,detail:`(${ge.enum})`}}_getEnumMemberCompletionItem(n){const s=this._extractDescription(n);return{documentation:{value:this._createDescriptionSection(s)},label:n.name,insertText:n.name,kind:ke.languages.CompletionItemKind.EnumMember,sortText:`2_${n.name}`,detail:`(enum member) ${n.value?`${n.name} = ${n.value}`:`${n.name}`}`}}_getInstanceTypeCompletionItemProp(n){const s=this._extractDescription(n),o=[];return s&&o.push(this._formatter.paragraph(this._formatter.bold(tt.Description),this._formatter.lineBreak,s)),{documentation:{value:o.join(this._formatter.lineBreak)},label:n.name,insertText:n.name,kind:ke.languages.CompletionItemKind.Field,sortText:`2_${n.name}`,detail:`(${ge.field}) ${n.type}`}}_getFunctionCompletionItem(n,s=2,o=!0){var F;const c=n.returnedTypes&&n.returnedTypes[0]||n.syntax&&n.syntax[0]&&((F=n.syntax[0].split("→").pop())==null?void 0:F.trim()),l=this._extractExamples(n),m=this._extractDescription(n),y=[this._createDescriptionSection(m)];l.length?y.push(this._createExampleSection(l)):n.syntax&&n.syntax.length&&y.push(this._createSyntaxSection(n.syntax)),n.returns&&n.returns.length&&y.push(this._createReturnSection(n.returns));const f={value:y.join(this._formatter.lineBreak)},b=n.name,h=o?ge.functions:ge.userDefinedFunction,T=n.template,N=T?`${xd(b)}<\${1}>`:b;return{documentation:f,label:T?`${b.replace(/<.+>/,"")}<type>`:b,kind:ke.languages.CompletionItemKind.Function,sortText:`${s}_${b}`,insertTextRules:ke.languages.CompletionItemInsertTextRule.InsertAsSnippet,insertText:N+this.bracketsPostfix,originInsertText:N,detail:`(${h}) ${ge.returns} ${c}`,command:{id:"tcc.editor.function",title:"",arguments:[T?"editor.action.triggerSuggest":"editor.action.triggerParameterHints"]}}}_getAnnotationCompletionItem(n){const s=this._extractDescription(n),o=this._extractExamples(n),c=[this._createDescriptionSection(s)];return o.length&&c.push(this._createExampleSection(o)),{documentation:{value:c.join(this._formatter.lineBreak)},label:n.name,insertText:n.name.replace("@",""),kind:ke.languages.CompletionItemKind.Keyword,detail:`(${ge.annotations})`}}_getNamespaceCompletionItem(n,s=2){const o=[this._createDescriptionSection(ge.namespaceDesc)];return{label:n.name,documentation:{value:o.join(this._formatter.lineBreak)},detail:`(${ge.namespace}) ${n.name}`,insertText:n.name,sortText:`${s}_${n.name}`,kind:ke.languages.CompletionItemKind.Module}}_extractExamples(n){let s;return n.examples||n.detailedDesc&&((s=n.detailedDesc[0])===null||s===void 0?void 0:s.examples)||[]}_extractDescription(n){return Array.isArray(n.desc)?n.desc.join(this._formatter.lineBreak):n.desc||""}_createExampleSection(n){return this._formatter.paragraph(this._formatter.bold(tt.Example),this._formatter.pineCode(n.join(this._formatter.lineBreak)))}_createSyntaxSection(n){return this._formatter.paragraph(this._formatter.bold(tt.Syntax),this._formatter.pineCode(n.join(this._formatter.lineBreak)))}_createReturnSection(n){return this._formatter.paragraph(this._formatter.bold(tt.Returns),this._formatter.lineBreak,n.join(this._formatter.lineBreak))}_createDescriptionSection(n){return!n||n.trim().length===0?"":this._formatter.paragraph(this._formatter.bold(tt.Description),this._formatter.lineBreak,n)}}const zt=new Id;class Ad{constructor(){Object.defineProperty(this,"_userFunctions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userVariables",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userTypes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userMethods",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userEnums",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_imports",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_overloadsFuncs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._userFunctions=new Map,this._userVariables=new Map,this._userTypes=new Map,this._userMethods=new Map,this._imports=new Map,this._userEnums=new Map,this._overloadsFuncs=[]}get overloadsFuncs(){return this._overloadsFuncs}setUserDefined(n,s){const{functions:o,variables:c,types:l,methods:m,imports:y,enums:f}=n;o&&(this._userFunctions=o),c&&(this._userVariables=c),l&&(this._userTypes=l),m&&(this._userMethods=m),y&&(this._imports=y),f&&(this._userEnums=f),this._overloadsFuncs=s}parseLineContentFuncVar(n,s,o,c){let l=(o==null?void 0:o.getLineContent(s))||"";const m=l.indexOf("//");if(this._removeString(l).indexOf("//")!==-1&&m<=n)return;l=l+" ";const y=this._getVariablesDocVal(l,n,s);if(y){if(y.isBuildIn){const h=o==null?void 0:o.getWordAtPosition(c||new ke.Position(s,n));if(((o==null?void 0:o.getValueInRange({startLineNumber:s,startColumn:(h==null?void 0:h.endColumn)||0,endLineNumber:s,endColumn:((h==null?void 0:h.endColumn)||0)+2}))||"").trim().startsWith("="))return null}return y}const f=this._getFuncsDocVal(l,n,s);if(f)return f;const b=l.match(/[a-zA-Z_][a-zA-Z_0-9]*(\s*\.\s*[a-zA-Z_][a-zA-Z_0-9]*)*(?=\s*<)/g);if(b){const h=this._matchContent(b,l,n);if(h){const T=this._getBuildInOther(h.name);if(T)return{docValue:T,isBuildIn:!0,index:0};{const N=this._getBuildInFunc(`${h.name}<type>`);if(N)return{docValue:N,isBuildIn:!0,index:0}}}}return this._getImportDocVal(l,n,s)}_getImportDocVal(n,s,o){const c=new RegExp("(?<=(import(\\s+)))([a-zA-Z\\d\\$_\\-\\.\\u00a1-\\uffff\\/]+)","g"),l=new RegExp("(?<=(as\\b)(\\s+))([a-zA-Z\\d\\_\\u00a1\\uffff\\/]+)","g"),m=n.match(c);if(m){const y=this._matchContent(m,n,s);if(y){const b=this._imports.get(y.name);if(b)return b}const f=n.match(l);if(f){const b=this._matchContent(f,n,s);if(b){for(const[h,T]of this._imports)if(T.name===b.name)return T}}}return null}_getBuildInFunc(n){return ct.functions.get(n)}_getBuildInMethod(n){return ct.methods.get(n)}_getBuildInOther(n){const{keywords:s,variables:o,constants:c,types:l}=ct;return s.get(n)||o.get(n)||c.get(n)||l.get(n)}parseCurrentInputFunc(n,s=!1,o=!1){let c=n.length-1,l=0,m=s,y=o;for(;c>=0;){const f=n.charAt(c);if(c-=1,/['"]/.test(f)){const b=f;if(f==="'"){if(m){m=!1;continue}}else if(y){y=!1;continue}for(;c>=0;){const h=n.charAt(c);if(c-=1,h===b)break}}if(!(m||y)&&(/\)/.test(f)&&(l+=1),/\(/.test(f))){if(l>0){l-=1;continue}let b="";for(;c>=0;){const h=n.charAt(c);if(/\s/.test(h)&&!b){c-=1;continue}if(/[^\w.]/.test(h))break;c-=1,b=h+b}if(b)return{funcName:b,startIndex:c+1}}}}parseCurrentInputFuncAndArg(n,s=!1,o=!1){const{funcName:c,startIndex:l}=this.parseCurrentInputFunc(n,s,o)||{};if(c&&typeof l=="number"){let m=n.slice(l+c.length).trim().slice(1),y=-1;if(s&&(y=m.lastIndexOf("'")),o){const h=m.lastIndexOf('"');(h!==-1&&h<y||y===-1)&&(y=h)}y!==-1&&(m=m.substring(0,y));const b=m.replace(/[\w.]+\(.*\)/g,"").split(",").map(h=>{const T=h.trim().split("=");return T.length<=1?"":T[0].trim()});return{startIndex:l,funcName:c,args:b}}}_removeString(n){return n.replace(/\\"|\\'/g,"").replace(/"[^"]*"|'[^']*'/g,"")}_getVariablesDocVal(n,s,o){const c=this._removeString(n).replace(/\/\/.*/g,"").match(/[a-zA-Z_][a-zA-Z_0-9]*(\s*\.\s*[a-zA-Z_][a-zA-Z_0-9]*)*(?=\s*[^(a-zA-Z_0-9."'<])/g);if(c){const l=this._matchContent(c,n,s);if(l){const m={docValue:void 0,isBuildIn:!0,index:0},y=this._getBuildInOther(l.name);if(y)return m.docValue=y,m;const f=this._getUserVariablesDocVal(l.name,s,o);if(f)return Object.assign(m,{docValue:[f],isBuildIn:!1});const b=this._getUserTypesDocVal(l.name);if(b)return Object.assign(m,{docValue:b,isBuildIn:!1});const h=this._getTypesAndFileds(n,l.name,s,o);if(h&&typeof h!="string")return Object.assign(m,{docValue:[h],isBuildIn:!1});const T=this._getUserEnumsDocVal(l,s);if(T)return Object.assign(m,{docValue:T,isBuildIn:!1})}}}_getUserVariablesDocVal(n,s,o){const m=[...this._userVariables.get(n)||[]].sort((y,f)=>(f.scope||0)-(y.scope||0)).find(y=>{const f=y.range;return((f==null?void 0:f.startColumn)||0)<=s&&((f==null?void 0:f.startLineNumber)||0)<=o&&((f==null?void 0:f.endLineNumber)||0)>=o});if(m)return m.title=ge.userDefinedVariable,m.type=this._arrayTypeTransform(m.type),m}_getUserTypesDocVal(n){const s=this._userTypes.get(n);if(s)return s[0].title=ge.userDefinedType,s}_getUserEnumsDocVal(n,s){var f;const{endIndex:o,name:c}=n,l=c.split(".");let m=l[0];l.length>2&&(m=l.slice(0,2).join("."));const y=this._userEnums.get(m);if(y&&y.length){y[0].title=ge.enum;const b=l[l.length-1],h=(f=y[0].members)==null?void 0:f.find(T=>T.name===b);if(!h||s<o-b.length)return y;if(s>o-b.length)return[h]}}_getTypesAndFileds(n,s,o,c){var l,m;if(s.includes(".")){const y=s.split(".");let f=y[0],b,h=null,T=n.indexOf(s,o-s.length)+1,N=T+f.length-1;for(const F of y.slice(1)){if(!h){const S=T<=o&&N>=o,R=this._getUserVariablesDocVal(f,o,c);if(S&&R)return R;h=R==null?void 0:R.type}if(h){b=h,T=N+2,N=N+F.length+1;const S=this._userTypes.get(h)||ct.types.get(h),R=(m=(l=S==null?void 0:S[0])==null?void 0:l.fields)==null?void 0:m.find(W=>W.name===F);if(R&&T<=o&&N>=o)return{name:`${h}.${F}`,desc:R.desc,type:this._arrayTypeTransform(R.type),title:ge.field};h=R==null?void 0:R.type}else f=`${f}.${F}`,N=N+F.length+1}return b}}_getFuncsDocVal(n,s,o){var l;const c=n.match(/[a-zA-Z_][a-zA-Z_0-9]*(\s*\.\s*[a-zA-Z_][a-zA-Z_0-9]*)*(?=\s*\()/g);if(c){const m=this._matchContent(c,n,s);if(m){const y={docValue:void 0,isBuildIn:!0,endIndex:m.endIndex,index:0},f=this._getBuildInFunc(m.name);if(f)return y.index=this._getOverloadsFuncIndex(f,s,m.name,o),Object.assign(y,{docValue:f});const b=this._getUserFuncsDocVal(m.name);if(b)return y.index=this._getOverloadsFuncIndex(b,s,m.name,o),Object.assign(y,{docValue:b,isBuildIn:!1});const h=this._getUserVarFuncsDocVal(n,m.name,s,o);if(h)return Object.assign(y,{docValue:[h],isBuildIn:!1});const T=m.name.split("."),N=((l=T.pop())==null?void 0:l.length)||0;if(s>m.endIndex-N-1)return;const F=this._getBuildInOther(T.join("."));if(F)return Object.assign(y,{docValue:F,endIndex:m.endIndex-N-1})}}}_getOverloadsFuncIndex(n,s,o,c){if(n.length>1){const l=this._overloadsFuncs.find(m=>m.name===o&&m.line===c&&m.startColumn<=s&&m.endColumn>=s);if(l)return l.index}return 0}_getUserFuncsDocVal(n){const s=this._userFunctions.get(n);if(s){for(const o of s)o.title=ge.userDefinedFunction;return s}}_getUserMethodsDocVal(n){const s=this._userMethods.get(n);if(s){for(const o of s)o.title=ge.userDefinedFunction;return s}}_getUserVarFuncsDocVal(n,s,o,c){var l;if(s.includes(".")){const m=s.split("."),y=this._getTypesAndFileds(n,s,o,c);if(typeof y=="string"){const b=`${this._arrayTypeTransform(y).replace(/<[^<>]+>/,"").replace(/(series|simple|const|input)\s+([\w\d.]+)/,"$2")}.${m.pop()}`,h=this._getBuildInMethod(b);if(h){const T=this._getOverloadsFuncIndex(h,o,b,c);return{...h[0],name:b,index:T}}return(l=this._getUserMethodsDocVal(b))==null?void 0:l[0]}else return y}}_arrayTypeTransform(n=""){return n.includes("[]")?`array<${n.replace("[]","")}>`:n}_matchContent(n,s,o){let c=0;for(const l of n){c=o-l.length;const m=s.indexOf(l,c);if(c=m+l.length,this._judgeVal(s,m,c)&&m+1<=o&&c>=o)return{name:l,endIndex:c}}}_judgeVal(n,s,o){const c=n.charAt(s-1),l=/[\w\d."']/;if(l.test(c))return!1;const m=n.charAt(o);return!l.test(m)}}const gr=new Ad;var Ws={exports:{}};/**
112
112
  * @license
113
113
  * Lodash <https://lodash.com/>
114
114
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
115
115
  * Released under MIT license <https://lodash.com/license>
116
116
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
117
117
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
118
- */Ws.exports,function(a,n){(function(){var s,o="4.17.21",c=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",m="Expected a function",y="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",b=500,h="__lodash_placeholder__",T=1,N=2,B=4,E=1,F=2,H=1,Y=2,G=4,K=8,U=16,A=32,q=64,R=128,V=256,re=512,ie=30,xt="...",St=800,Ue=16,Ke=1,Z=2,be=3,Ee=1/0,Me=9007199254740991,ct=17976931348623157e292,Et=NaN,se=4294967295,xe=se-1,Re=se>>>1,ht=[["ary",R],["bind",H],["bindKey",Y],["curry",K],["curryRight",U],["flip",re],["partial",A],["partialRight",q],["rearg",V]],$e="[object Arguments]",nr="[object Array]",ys="[object AsyncFunction]",Bt="[object Boolean]",Ht="[object Date]",Mr="[object DOMException]",Pr="[object Error]",hr="[object Function]",aa="[object GeneratorFunction]",pt="[object Map]",Ut="[object Number]",Or="[object Null]",wt="[object Object]",_s="[object Promise]",Rr="[object Proxy]",wr="[object RegExp]",dt="[object Set]",Wt="[object String]",Fr="[object Symbol]",Tn="[object Undefined]",ir="[object WeakMap]",na="[object WeakSet]",Nt="[object ArrayBuffer]",or="[object DataView]",Br="[object Float32Array]",Ur="[object Float64Array]",vr="[object Int8Array]",fs="[object Int16Array]",gs="[object Int32Array]",bs="[object Uint8Array]",xs="[object Uint8ClampedArray]",hs="[object Uint16Array]",ws="[object Uint32Array]",Dn=/\b__p \+= '';/g,vs=/\b(__p \+=) '' \+/g,ia=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Gt=/&(?:amp|lt|gt|quot|#39);/g,Kr=/[&<>"']/g,Ts=RegExp(Gt.source),oa=RegExp(Kr.source),kn=/<%-([\s\S]+?)%>/g,la=/<%([\s\S]+?)%>/g,ca=/<%=([\s\S]+?)%>/g,pa=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,da=/^\w*$/,In=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ds=/[\\^$.*+?()[\]{}|]/g,ma=RegExp(Ds.source),ks=/^\s+/,An=/\s/,qn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Cn=/\{\n\/\* \[wrapped with (.+)\] \*/,g=/,? & /,P=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,$=/[()=,{}\[\]\/\s]/,te=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,we=/\w*$/,ue=/^[-+]0x[0-9a-f]+$/i,de=/^0b[01]+$/i,He=/^\[object .+?Constructor\]$/,Ce=/^0o[0-7]+$/i,Ne=/^(?:0|[1-9]\d*)$/,tt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Lt=/($^)/,ua=/['\n\r\u2028\u2029\\]/g,rt="\\ud800-\\udfff",Km="\\u0300-\\u036f",$m="\\ufe20-\\ufe2f",jm="\\u20d0-\\u20ff",Lo=Km+$m+jm,Mo="\\u2700-\\u27bf",Po="a-z\\xdf-\\xf6\\xf8-\\xff",Hm="\\xac\\xb1\\xd7\\xf7",Wm="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Gm="\\u2000-\\u206f",Xm=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Oo="A-Z\\xc0-\\xd6\\xd8-\\xde",Ro="\\ufe0e\\ufe0f",Fo=Hm+Wm+Gm+Xm,zn="['’]",Vm="["+rt+"]",Bo="["+Fo+"]",ya="["+Lo+"]",Uo="\\d+",Ym="["+Mo+"]",Ko="["+Po+"]",$o="[^"+rt+Fo+Uo+Mo+Po+Oo+"]",Sn="\\ud83c[\\udffb-\\udfff]",Qm="(?:"+ya+"|"+Sn+")",jo="[^"+rt+"]",En="(?:\\ud83c[\\udde6-\\uddff]){2}",Nn="[\\ud800-\\udbff][\\udc00-\\udfff]",$r="["+Oo+"]",Ho="\\u200d",Wo="(?:"+Ko+"|"+$o+")",Zm="(?:"+$r+"|"+$o+")",Go="(?:"+zn+"(?:d|ll|m|re|s|t|ve))?",Xo="(?:"+zn+"(?:D|LL|M|RE|S|T|VE))?",Vo=Qm+"?",Yo="["+Ro+"]?",Jm="(?:"+Ho+"(?:"+[jo,En,Nn].join("|")+")"+Yo+Vo+")*",eu="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",tu="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Qo=Yo+Vo+Jm,ru="(?:"+[Ym,En,Nn].join("|")+")"+Qo,su="(?:"+[jo+ya+"?",ya,En,Nn,Vm].join("|")+")",au=RegExp(zn,"g"),nu=RegExp(ya,"g"),Ln=RegExp(Sn+"(?="+Sn+")|"+su+Qo,"g"),iu=RegExp([$r+"?"+Ko+"+"+Go+"(?="+[Bo,$r,"$"].join("|")+")",Zm+"+"+Xo+"(?="+[Bo,$r+Wo,"$"].join("|")+")",$r+"?"+Wo+"+"+Go,$r+"+"+Xo,tu,eu,Uo,ru].join("|"),"g"),ou=RegExp("["+Ho+rt+Lo+Ro+"]"),lu=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,cu=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],pu=-1,Ae={};Ae[Br]=Ae[Ur]=Ae[vr]=Ae[fs]=Ae[gs]=Ae[bs]=Ae[xs]=Ae[hs]=Ae[ws]=!0,Ae[$e]=Ae[nr]=Ae[Nt]=Ae[Bt]=Ae[or]=Ae[Ht]=Ae[Pr]=Ae[hr]=Ae[pt]=Ae[Ut]=Ae[wt]=Ae[wr]=Ae[dt]=Ae[Wt]=Ae[ir]=!1;var Ie={};Ie[$e]=Ie[nr]=Ie[Nt]=Ie[or]=Ie[Bt]=Ie[Ht]=Ie[Br]=Ie[Ur]=Ie[vr]=Ie[fs]=Ie[gs]=Ie[pt]=Ie[Ut]=Ie[wt]=Ie[wr]=Ie[dt]=Ie[Wt]=Ie[Fr]=Ie[bs]=Ie[xs]=Ie[hs]=Ie[ws]=!0,Ie[Pr]=Ie[hr]=Ie[ir]=!1;var du={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},mu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},uu={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},yu={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},_u=parseFloat,fu=parseInt,Zo=typeof ss=="object"&&ss&&ss.Object===Object&&ss,gu=typeof self=="object"&&self&&self.Object===Object&&self,We=Zo||gu||Function("return this")(),Mn=n&&!n.nodeType&&n,Tr=Mn&&!0&&a&&!a.nodeType&&a,Jo=Tr&&Tr.exports===Mn,Pn=Jo&&Zo.process,vt=function(){try{var w=Tr&&Tr.require&&Tr.require("util").types;return w||Pn&&Pn.binding&&Pn.binding("util")}catch{}}(),el=vt&&vt.isArrayBuffer,tl=vt&&vt.isDate,rl=vt&&vt.isMap,sl=vt&&vt.isRegExp,al=vt&&vt.isSet,nl=vt&&vt.isTypedArray;function mt(w,C,D){switch(D.length){case 0:return w.call(C);case 1:return w.call(C,D[0]);case 2:return w.call(C,D[0],D[1]);case 3:return w.call(C,D[0],D[1],D[2])}return w.apply(C,D)}function bu(w,C,D,W){for(var ae=-1,he=w==null?0:w.length;++ae<he;){var Fe=w[ae];C(W,Fe,D(Fe),w)}return W}function Tt(w,C){for(var D=-1,W=w==null?0:w.length;++D<W&&C(w[D],D,w)!==!1;);return w}function xu(w,C){for(var D=w==null?0:w.length;D--&&C(w[D],D,w)!==!1;);return w}function il(w,C){for(var D=-1,W=w==null?0:w.length;++D<W;)if(!C(w[D],D,w))return!1;return!0}function lr(w,C){for(var D=-1,W=w==null?0:w.length,ae=0,he=[];++D<W;){var Fe=w[D];C(Fe,D,w)&&(he[ae++]=Fe)}return he}function _a(w,C){var D=w==null?0:w.length;return!!D&&jr(w,C,0)>-1}function On(w,C,D){for(var W=-1,ae=w==null?0:w.length;++W<ae;)if(D(C,w[W]))return!0;return!1}function qe(w,C){for(var D=-1,W=w==null?0:w.length,ae=Array(W);++D<W;)ae[D]=C(w[D],D,w);return ae}function cr(w,C){for(var D=-1,W=C.length,ae=w.length;++D<W;)w[ae+D]=C[D];return w}function Rn(w,C,D,W){var ae=-1,he=w==null?0:w.length;for(W&&he&&(D=w[++ae]);++ae<he;)D=C(D,w[ae],ae,w);return D}function hu(w,C,D,W){var ae=w==null?0:w.length;for(W&&ae&&(D=w[--ae]);ae--;)D=C(D,w[ae],ae,w);return D}function Fn(w,C){for(var D=-1,W=w==null?0:w.length;++D<W;)if(C(w[D],D,w))return!0;return!1}var wu=Bn("length");function vu(w){return w.split("")}function Tu(w){return w.match(P)||[]}function ol(w,C,D){var W;return D(w,function(ae,he,Fe){if(C(ae,he,Fe))return W=he,!1}),W}function fa(w,C,D,W){for(var ae=w.length,he=D+(W?1:-1);W?he--:++he<ae;)if(C(w[he],he,w))return he;return-1}function jr(w,C,D){return C===C?Mu(w,C,D):fa(w,ll,D)}function Du(w,C,D,W){for(var ae=D-1,he=w.length;++ae<he;)if(W(w[ae],C))return ae;return-1}function ll(w){return w!==w}function cl(w,C){var D=w==null?0:w.length;return D?Kn(w,C)/D:Et}function Bn(w){return function(C){return C==null?s:C[w]}}function Un(w){return function(C){return w==null?s:w[C]}}function pl(w,C,D,W,ae){return ae(w,function(he,Fe,De){D=W?(W=!1,he):C(D,he,Fe,De)}),D}function ku(w,C){var D=w.length;for(w.sort(C);D--;)w[D]=w[D].value;return w}function Kn(w,C){for(var D,W=-1,ae=w.length;++W<ae;){var he=C(w[W]);he!==s&&(D=D===s?he:D+he)}return D}function $n(w,C){for(var D=-1,W=Array(w);++D<w;)W[D]=C(D);return W}function Iu(w,C){return qe(C,function(D){return[D,w[D]]})}function dl(w){return w&&w.slice(0,_l(w)+1).replace(ks,"")}function ut(w){return function(C){return w(C)}}function jn(w,C){return qe(C,function(D){return w[D]})}function Is(w,C){return w.has(C)}function ml(w,C){for(var D=-1,W=w.length;++D<W&&jr(C,w[D],0)>-1;);return D}function ul(w,C){for(var D=w.length;D--&&jr(C,w[D],0)>-1;);return D}function Au(w,C){for(var D=w.length,W=0;D--;)w[D]===C&&++W;return W}var qu=Un(du),Cu=Un(mu);function zu(w){return"\\"+yu[w]}function Su(w,C){return w==null?s:w[C]}function Hr(w){return ou.test(w)}function Eu(w){return lu.test(w)}function Nu(w){for(var C,D=[];!(C=w.next()).done;)D.push(C.value);return D}function Hn(w){var C=-1,D=Array(w.size);return w.forEach(function(W,ae){D[++C]=[ae,W]}),D}function yl(w,C){return function(D){return w(C(D))}}function pr(w,C){for(var D=-1,W=w.length,ae=0,he=[];++D<W;){var Fe=w[D];(Fe===C||Fe===h)&&(w[D]=h,he[ae++]=D)}return he}function ga(w){var C=-1,D=Array(w.size);return w.forEach(function(W){D[++C]=W}),D}function Lu(w){var C=-1,D=Array(w.size);return w.forEach(function(W){D[++C]=[W,W]}),D}function Mu(w,C,D){for(var W=D-1,ae=w.length;++W<ae;)if(w[W]===C)return W;return-1}function Pu(w,C,D){for(var W=D+1;W--;)if(w[W]===C)return W;return W}function Wr(w){return Hr(w)?Ru(w):wu(w)}function Mt(w){return Hr(w)?Fu(w):vu(w)}function _l(w){for(var C=w.length;C--&&An.test(w.charAt(C)););return C}var Ou=Un(uu);function Ru(w){for(var C=Ln.lastIndex=0;Ln.test(w);)++C;return C}function Fu(w){return w.match(Ln)||[]}function Bu(w){return w.match(iu)||[]}var Uu=function w(C){C=C==null?We:Gr.defaults(We.Object(),C,Gr.pick(We,cu));var D=C.Array,W=C.Date,ae=C.Error,he=C.Function,Fe=C.Math,De=C.Object,Wn=C.RegExp,Ku=C.String,Dt=C.TypeError,ba=D.prototype,$u=he.prototype,Xr=De.prototype,xa=C["__core-js_shared__"],ha=$u.toString,Te=Xr.hasOwnProperty,ju=0,fl=function(){var e=/[^.]+$/.exec(xa&&xa.keys&&xa.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),wa=Xr.toString,Hu=ha.call(De),Wu=We._,Gu=Wn("^"+ha.call(Te).replace(Ds,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),va=Jo?C.Buffer:s,dr=C.Symbol,Ta=C.Uint8Array,gl=va?va.allocUnsafe:s,Da=yl(De.getPrototypeOf,De),bl=De.create,xl=Xr.propertyIsEnumerable,ka=ba.splice,hl=dr?dr.isConcatSpreadable:s,As=dr?dr.iterator:s,Dr=dr?dr.toStringTag:s,Ia=function(){try{var e=Cr(De,"defineProperty");return e({},"",{}),e}catch{}}(),Xu=C.clearTimeout!==We.clearTimeout&&C.clearTimeout,Vu=W&&W.now!==We.Date.now&&W.now,Yu=C.setTimeout!==We.setTimeout&&C.setTimeout,Aa=Fe.ceil,qa=Fe.floor,Gn=De.getOwnPropertySymbols,Qu=va?va.isBuffer:s,wl=C.isFinite,Zu=ba.join,Ju=yl(De.keys,De),Be=Fe.max,Ve=Fe.min,ey=W.now,ty=C.parseInt,vl=Fe.random,ry=ba.reverse,Xn=Cr(C,"DataView"),qs=Cr(C,"Map"),Vn=Cr(C,"Promise"),Vr=Cr(C,"Set"),Cs=Cr(C,"WeakMap"),zs=Cr(De,"create"),Ca=Cs&&new Cs,Yr={},sy=zr(Xn),ay=zr(qs),ny=zr(Vn),iy=zr(Vr),oy=zr(Cs),za=dr?dr.prototype:s,Ss=za?za.valueOf:s,Tl=za?za.toString:s;function d(e){if(Le(e)&&!ne(e)&&!(e instanceof ye)){if(e instanceof kt)return e;if(Te.call(e,"__wrapped__"))return Dc(e)}return new kt(e)}var Qr=function(){function e(){}return function(t){if(!ze(t))return{};if(bl)return bl(t);e.prototype=t;var r=new e;return e.prototype=s,r}}();function Sa(){}function kt(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=s}d.templateSettings={escape:kn,evaluate:la,interpolate:ca,variable:"",imports:{_:d}},d.prototype=Sa.prototype,d.prototype.constructor=d,kt.prototype=Qr(Sa.prototype),kt.prototype.constructor=kt;function ye(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=se,this.__views__=[]}function ly(){var e=new ye(this.__wrapped__);return e.__actions__=st(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=st(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=st(this.__views__),e}function cy(){if(this.__filtered__){var e=new ye(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function py(){var e=this.__wrapped__.value(),t=this.__dir__,r=ne(e),i=t<0,p=r?e.length:0,u=v_(0,p,this.__views__),_=u.start,x=u.end,v=x-_,z=i?x:_-1,S=this.__iteratees__,L=S.length,j=0,X=Ve(v,this.__takeCount__);if(!r||!i&&p==v&&X==v)return Gl(e,this.__actions__);var J=[];e:for(;v--&&j<X;){z+=t;for(var ce=-1,ee=e[z];++ce<L;){var me=S[ce],_e=me.iteratee,ft=me.type,Je=_e(ee);if(ft==Z)ee=Je;else if(!Je){if(ft==Ke)continue e;break e}}J[j++]=ee}return J}ye.prototype=Qr(Sa.prototype),ye.prototype.constructor=ye;function kr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function dy(){this.__data__=zs?zs(null):{},this.size=0}function my(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function uy(e){var t=this.__data__;if(zs){var r=t[e];return r===f?s:r}return Te.call(t,e)?t[e]:s}function yy(e){var t=this.__data__;return zs?t[e]!==s:Te.call(t,e)}function _y(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=zs&&t===s?f:t,this}kr.prototype.clear=dy,kr.prototype.delete=my,kr.prototype.get=uy,kr.prototype.has=yy,kr.prototype.set=_y;function Xt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function fy(){this.__data__=[],this.size=0}function gy(e){var t=this.__data__,r=Ea(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():ka.call(t,r,1),--this.size,!0}function by(e){var t=this.__data__,r=Ea(t,e);return r<0?s:t[r][1]}function xy(e){return Ea(this.__data__,e)>-1}function hy(e,t){var r=this.__data__,i=Ea(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}Xt.prototype.clear=fy,Xt.prototype.delete=gy,Xt.prototype.get=by,Xt.prototype.has=xy,Xt.prototype.set=hy;function Vt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function wy(){this.size=0,this.__data__={hash:new kr,map:new(qs||Xt),string:new kr}}function vy(e){var t=ja(this,e).delete(e);return this.size-=t?1:0,t}function Ty(e){return ja(this,e).get(e)}function Dy(e){return ja(this,e).has(e)}function ky(e,t){var r=ja(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}Vt.prototype.clear=wy,Vt.prototype.delete=vy,Vt.prototype.get=Ty,Vt.prototype.has=Dy,Vt.prototype.set=ky;function Ir(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Vt;++t<r;)this.add(e[t])}function Iy(e){return this.__data__.set(e,f),this}function Ay(e){return this.__data__.has(e)}Ir.prototype.add=Ir.prototype.push=Iy,Ir.prototype.has=Ay;function Pt(e){var t=this.__data__=new Xt(e);this.size=t.size}function qy(){this.__data__=new Xt,this.size=0}function Cy(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function zy(e){return this.__data__.get(e)}function Sy(e){return this.__data__.has(e)}function Ey(e,t){var r=this.__data__;if(r instanceof Xt){var i=r.__data__;if(!qs||i.length<c-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Vt(i)}return r.set(e,t),this.size=r.size,this}Pt.prototype.clear=qy,Pt.prototype.delete=Cy,Pt.prototype.get=zy,Pt.prototype.has=Sy,Pt.prototype.set=Ey;function Dl(e,t){var r=ne(e),i=!r&&Sr(e),p=!r&&!i&&fr(e),u=!r&&!i&&!p&&ts(e),_=r||i||p||u,x=_?$n(e.length,Ku):[],v=x.length;for(var z in e)(t||Te.call(e,z))&&!(_&&(z=="length"||p&&(z=="offset"||z=="parent")||u&&(z=="buffer"||z=="byteLength"||z=="byteOffset")||Jt(z,v)))&&x.push(z);return x}function kl(e){var t=e.length;return t?e[ii(0,t-1)]:s}function Ny(e,t){return Ha(st(e),Ar(t,0,e.length))}function Ly(e){return Ha(st(e))}function Yn(e,t,r){(r!==s&&!Ot(e[t],r)||r===s&&!(t in e))&&Yt(e,t,r)}function Es(e,t,r){var i=e[t];(!(Te.call(e,t)&&Ot(i,r))||r===s&&!(t in e))&&Yt(e,t,r)}function Ea(e,t){for(var r=e.length;r--;)if(Ot(e[r][0],t))return r;return-1}function My(e,t,r,i){return mr(e,function(p,u,_){t(i,p,r(p),_)}),i}function Il(e,t){return e&&$t(t,je(t),e)}function Py(e,t){return e&&$t(t,nt(t),e)}function Yt(e,t,r){t=="__proto__"&&Ia?Ia(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Qn(e,t){for(var r=-1,i=t.length,p=D(i),u=e==null;++r<i;)p[r]=u?s:Si(e,t[r]);return p}function Ar(e,t,r){return e===e&&(r!==s&&(e=e<=r?e:r),t!==s&&(e=e>=t?e:t)),e}function It(e,t,r,i,p,u){var _,x=t&T,v=t&N,z=t&B;if(r&&(_=p?r(e,i,p,u):r(e)),_!==s)return _;if(!ze(e))return e;var S=ne(e);if(S){if(_=D_(e),!x)return st(e,_)}else{var L=Ye(e),j=L==hr||L==aa;if(fr(e))return Yl(e,x);if(L==wt||L==$e||j&&!p){if(_=v||j?{}:_c(e),!x)return v?u_(e,Py(_,e)):m_(e,Il(_,e))}else{if(!Ie[L])return p?e:{};_=k_(e,L,x)}}u||(u=new Pt);var X=u.get(e);if(X)return X;u.set(e,_),jc(e)?e.forEach(function(ee){_.add(It(ee,t,r,ee,e,u))}):Kc(e)&&e.forEach(function(ee,me){_.set(me,It(ee,t,r,me,e,u))});var J=z?v?gi:fi:v?nt:je,ce=S?s:J(e);return Tt(ce||e,function(ee,me){ce&&(me=ee,ee=e[me]),Es(_,me,It(ee,t,r,me,e,u))}),_}function Oy(e){var t=je(e);return function(r){return Al(r,e,t)}}function Al(e,t,r){var i=r.length;if(e==null)return!i;for(e=De(e);i--;){var p=r[i],u=t[p],_=e[p];if(_===s&&!(p in e)||!u(_))return!1}return!0}function ql(e,t,r){if(typeof e!="function")throw new Dt(m);return Fs(function(){e.apply(s,r)},t)}function Ns(e,t,r,i){var p=-1,u=_a,_=!0,x=e.length,v=[],z=t.length;if(!x)return v;r&&(t=qe(t,ut(r))),i?(u=On,_=!1):t.length>=c&&(u=Is,_=!1,t=new Ir(t));e:for(;++p<x;){var S=e[p],L=r==null?S:r(S);if(S=i||S!==0?S:0,_&&L===L){for(var j=z;j--;)if(t[j]===L)continue e;v.push(S)}else u(t,L,i)||v.push(S)}return v}var mr=tc(Kt),Cl=tc(Jn,!0);function Ry(e,t){var r=!0;return mr(e,function(i,p,u){return r=!!t(i,p,u),r}),r}function Na(e,t,r){for(var i=-1,p=e.length;++i<p;){var u=e[i],_=t(u);if(_!=null&&(x===s?_===_&&!_t(_):r(_,x)))var x=_,v=u}return v}function Fy(e,t,r,i){var p=e.length;for(r=oe(r),r<0&&(r=-r>p?0:p+r),i=i===s||i>p?p:oe(i),i<0&&(i+=p),i=r>i?0:Wc(i);r<i;)e[r++]=t;return e}function zl(e,t){var r=[];return mr(e,function(i,p,u){t(i,p,u)&&r.push(i)}),r}function Ge(e,t,r,i,p){var u=-1,_=e.length;for(r||(r=A_),p||(p=[]);++u<_;){var x=e[u];t>0&&r(x)?t>1?Ge(x,t-1,r,i,p):cr(p,x):i||(p[p.length]=x)}return p}var Zn=rc(),Sl=rc(!0);function Kt(e,t){return e&&Zn(e,t,je)}function Jn(e,t){return e&&Sl(e,t,je)}function La(e,t){return lr(t,function(r){return er(e[r])})}function qr(e,t){t=yr(t,e);for(var r=0,i=t.length;e!=null&&r<i;)e=e[jt(t[r++])];return r&&r==i?e:s}function El(e,t,r){var i=t(e);return ne(e)?i:cr(i,r(e))}function Qe(e){return e==null?e===s?Tn:Or:Dr&&Dr in De(e)?w_(e):L_(e)}function ei(e,t){return e>t}function By(e,t){return e!=null&&Te.call(e,t)}function Uy(e,t){return e!=null&&t in De(e)}function Ky(e,t,r){return e>=Ve(t,r)&&e<Be(t,r)}function ti(e,t,r){for(var i=r?On:_a,p=e[0].length,u=e.length,_=u,x=D(u),v=1/0,z=[];_--;){var S=e[_];_&&t&&(S=qe(S,ut(t))),v=Ve(S.length,v),x[_]=!r&&(t||p>=120&&S.length>=120)?new Ir(_&&S):s}S=e[0];var L=-1,j=x[0];e:for(;++L<p&&z.length<v;){var X=S[L],J=t?t(X):X;if(X=r||X!==0?X:0,!(j?Is(j,J):i(z,J,r))){for(_=u;--_;){var ce=x[_];if(!(ce?Is(ce,J):i(e[_],J,r)))continue e}j&&j.push(J),z.push(X)}}return z}function $y(e,t,r,i){return Kt(e,function(p,u,_){t(i,r(p),u,_)}),i}function Ls(e,t,r){t=yr(t,e),e=xc(e,t);var i=e==null?e:e[jt(qt(t))];return i==null?s:mt(i,e,r)}function Nl(e){return Le(e)&&Qe(e)==$e}function jy(e){return Le(e)&&Qe(e)==Nt}function Hy(e){return Le(e)&&Qe(e)==Ht}function Ms(e,t,r,i,p){return e===t?!0:e==null||t==null||!Le(e)&&!Le(t)?e!==e&&t!==t:Wy(e,t,r,i,Ms,p)}function Wy(e,t,r,i,p,u){var _=ne(e),x=ne(t),v=_?nr:Ye(e),z=x?nr:Ye(t);v=v==$e?wt:v,z=z==$e?wt:z;var S=v==wt,L=z==wt,j=v==z;if(j&&fr(e)){if(!fr(t))return!1;_=!0,S=!1}if(j&&!S)return u||(u=new Pt),_||ts(e)?mc(e,t,r,i,p,u):x_(e,t,v,r,i,p,u);if(!(r&E)){var X=S&&Te.call(e,"__wrapped__"),J=L&&Te.call(t,"__wrapped__");if(X||J){var ce=X?e.value():e,ee=J?t.value():t;return u||(u=new Pt),p(ce,ee,r,i,u)}}return j?(u||(u=new Pt),h_(e,t,r,i,p,u)):!1}function Gy(e){return Le(e)&&Ye(e)==pt}function ri(e,t,r,i){var p=r.length,u=p,_=!i;if(e==null)return!u;for(e=De(e);p--;){var x=r[p];if(_&&x[2]?x[1]!==e[x[0]]:!(x[0]in e))return!1}for(;++p<u;){x=r[p];var v=x[0],z=e[v],S=x[1];if(_&&x[2]){if(z===s&&!(v in e))return!1}else{var L=new Pt;if(i)var j=i(z,S,v,e,t,L);if(!(j===s?Ms(S,z,E|F,i,L):j))return!1}}return!0}function Ll(e){if(!ze(e)||C_(e))return!1;var t=er(e)?Gu:He;return t.test(zr(e))}function Xy(e){return Le(e)&&Qe(e)==wr}function Vy(e){return Le(e)&&Ye(e)==dt}function Yy(e){return Le(e)&&Qa(e.length)&&!!Ae[Qe(e)]}function Ml(e){return typeof e=="function"?e:e==null?it:typeof e=="object"?ne(e)?Rl(e[0],e[1]):Ol(e):sp(e)}function si(e){if(!Rs(e))return Ju(e);var t=[];for(var r in De(e))Te.call(e,r)&&r!="constructor"&&t.push(r);return t}function Qy(e){if(!ze(e))return N_(e);var t=Rs(e),r=[];for(var i in e)i=="constructor"&&(t||!Te.call(e,i))||r.push(i);return r}function ai(e,t){return e<t}function Pl(e,t){var r=-1,i=at(e)?D(e.length):[];return mr(e,function(p,u,_){i[++r]=t(p,u,_)}),i}function Ol(e){var t=xi(e);return t.length==1&&t[0][2]?gc(t[0][0],t[0][1]):function(r){return r===e||ri(r,e,t)}}function Rl(e,t){return wi(e)&&fc(t)?gc(jt(e),t):function(r){var i=Si(r,e);return i===s&&i===t?Ei(r,e):Ms(t,i,E|F)}}function Ma(e,t,r,i,p){e!==t&&Zn(t,function(u,_){if(p||(p=new Pt),ze(u))Zy(e,t,_,r,Ma,i,p);else{var x=i?i(Ti(e,_),u,_+"",e,t,p):s;x===s&&(x=u),Yn(e,_,x)}},nt)}function Zy(e,t,r,i,p,u,_){var x=Ti(e,r),v=Ti(t,r),z=_.get(v);if(z){Yn(e,r,z);return}var S=u?u(x,v,r+"",e,t,_):s,L=S===s;if(L){var j=ne(v),X=!j&&fr(v),J=!j&&!X&&ts(v);S=v,j||X||J?ne(x)?S=x:Pe(x)?S=st(x):X?(L=!1,S=Yl(v,!0)):J?(L=!1,S=Ql(v,!0)):S=[]:Bs(v)||Sr(v)?(S=x,Sr(x)?S=Gc(x):(!ze(x)||er(x))&&(S=_c(v))):L=!1}L&&(_.set(v,S),p(S,v,i,u,_),_.delete(v)),Yn(e,r,S)}function Fl(e,t){var r=e.length;if(r)return t+=t<0?r:0,Jt(t,r)?e[t]:s}function Bl(e,t,r){t.length?t=qe(t,function(u){return ne(u)?function(_){return qr(_,u.length===1?u[0]:u)}:u}):t=[it];var i=-1;t=qe(t,ut(Q()));var p=Pl(e,function(u,_,x){var v=qe(t,function(z){return z(u)});return{criteria:v,index:++i,value:u}});return ku(p,function(u,_){return d_(u,_,r)})}function Jy(e,t){return Ul(e,t,function(r,i){return Ei(e,i)})}function Ul(e,t,r){for(var i=-1,p=t.length,u={};++i<p;){var _=t[i],x=qr(e,_);r(x,_)&&Ps(u,yr(_,e),x)}return u}function e_(e){return function(t){return qr(t,e)}}function ni(e,t,r,i){var p=i?Du:jr,u=-1,_=t.length,x=e;for(e===t&&(t=st(t)),r&&(x=qe(e,ut(r)));++u<_;)for(var v=0,z=t[u],S=r?r(z):z;(v=p(x,S,v,i))>-1;)x!==e&&ka.call(x,v,1),ka.call(e,v,1);return e}function Kl(e,t){for(var r=e?t.length:0,i=r-1;r--;){var p=t[r];if(r==i||p!==u){var u=p;Jt(p)?ka.call(e,p,1):ci(e,p)}}return e}function ii(e,t){return e+qa(vl()*(t-e+1))}function t_(e,t,r,i){for(var p=-1,u=Be(Aa((t-e)/(r||1)),0),_=D(u);u--;)_[i?u:++p]=e,e+=r;return _}function oi(e,t){var r="";if(!e||t<1||t>Me)return r;do t%2&&(r+=e),t=qa(t/2),t&&(e+=e);while(t);return r}function pe(e,t){return Di(bc(e,t,it),e+"")}function r_(e){return kl(rs(e))}function s_(e,t){var r=rs(e);return Ha(r,Ar(t,0,r.length))}function Ps(e,t,r,i){if(!ze(e))return e;t=yr(t,e);for(var p=-1,u=t.length,_=u-1,x=e;x!=null&&++p<u;){var v=jt(t[p]),z=r;if(v==="__proto__"||v==="constructor"||v==="prototype")return e;if(p!=_){var S=x[v];z=i?i(S,v,x):s,z===s&&(z=ze(S)?S:Jt(t[p+1])?[]:{})}Es(x,v,z),x=x[v]}return e}var $l=Ca?function(e,t){return Ca.set(e,t),e}:it,a_=Ia?function(e,t){return Ia(e,"toString",{configurable:!0,enumerable:!1,value:Li(t),writable:!0})}:it;function n_(e){return Ha(rs(e))}function At(e,t,r){var i=-1,p=e.length;t<0&&(t=-t>p?0:p+t),r=r>p?p:r,r<0&&(r+=p),p=t>r?0:r-t>>>0,t>>>=0;for(var u=D(p);++i<p;)u[i]=e[i+t];return u}function i_(e,t){var r;return mr(e,function(i,p,u){return r=t(i,p,u),!r}),!!r}function Pa(e,t,r){var i=0,p=e==null?i:e.length;if(typeof t=="number"&&t===t&&p<=Re){for(;i<p;){var u=i+p>>>1,_=e[u];_!==null&&!_t(_)&&(r?_<=t:_<t)?i=u+1:p=u}return p}return li(e,t,it,r)}function li(e,t,r,i){var p=0,u=e==null?0:e.length;if(u===0)return 0;t=r(t);for(var _=t!==t,x=t===null,v=_t(t),z=t===s;p<u;){var S=qa((p+u)/2),L=r(e[S]),j=L!==s,X=L===null,J=L===L,ce=_t(L);if(_)var ee=i||J;else z?ee=J&&(i||j):x?ee=J&&j&&(i||!X):v?ee=J&&j&&!X&&(i||!ce):X||ce?ee=!1:ee=i?L<=t:L<t;ee?p=S+1:u=S}return Ve(u,xe)}function jl(e,t){for(var r=-1,i=e.length,p=0,u=[];++r<i;){var _=e[r],x=t?t(_):_;if(!r||!Ot(x,v)){var v=x;u[p++]=_===0?0:_}}return u}function Hl(e){return typeof e=="number"?e:_t(e)?Et:+e}function yt(e){if(typeof e=="string")return e;if(ne(e))return qe(e,yt)+"";if(_t(e))return Tl?Tl.call(e):"";var t=e+"";return t=="0"&&1/e==-Ee?"-0":t}function ur(e,t,r){var i=-1,p=_a,u=e.length,_=!0,x=[],v=x;if(r)_=!1,p=On;else if(u>=c){var z=t?null:g_(e);if(z)return ga(z);_=!1,p=Is,v=new Ir}else v=t?[]:x;e:for(;++i<u;){var S=e[i],L=t?t(S):S;if(S=r||S!==0?S:0,_&&L===L){for(var j=v.length;j--;)if(v[j]===L)continue e;t&&v.push(L),x.push(S)}else p(v,L,r)||(v!==x&&v.push(L),x.push(S))}return x}function ci(e,t){return t=yr(t,e),e=xc(e,t),e==null||delete e[jt(qt(t))]}function Wl(e,t,r,i){return Ps(e,t,r(qr(e,t)),i)}function Oa(e,t,r,i){for(var p=e.length,u=i?p:-1;(i?u--:++u<p)&&t(e[u],u,e););return r?At(e,i?0:u,i?u+1:p):At(e,i?u+1:0,i?p:u)}function Gl(e,t){var r=e;return r instanceof ye&&(r=r.value()),Rn(t,function(i,p){return p.func.apply(p.thisArg,cr([i],p.args))},r)}function pi(e,t,r){var i=e.length;if(i<2)return i?ur(e[0]):[];for(var p=-1,u=D(i);++p<i;)for(var _=e[p],x=-1;++x<i;)x!=p&&(u[p]=Ns(u[p]||_,e[x],t,r));return ur(Ge(u,1),t,r)}function Xl(e,t,r){for(var i=-1,p=e.length,u=t.length,_={};++i<p;){var x=i<u?t[i]:s;r(_,e[i],x)}return _}function di(e){return Pe(e)?e:[]}function mi(e){return typeof e=="function"?e:it}function yr(e,t){return ne(e)?e:wi(e,t)?[e]:Tc(ve(e))}var o_=pe;function _r(e,t,r){var i=e.length;return r=r===s?i:r,!t&&r>=i?e:At(e,t,r)}var Vl=Xu||function(e){return We.clearTimeout(e)};function Yl(e,t){if(t)return e.slice();var r=e.length,i=gl?gl(r):new e.constructor(r);return e.copy(i),i}function ui(e){var t=new e.constructor(e.byteLength);return new Ta(t).set(new Ta(e)),t}function l_(e,t){var r=t?ui(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function c_(e){var t=new e.constructor(e.source,we.exec(e));return t.lastIndex=e.lastIndex,t}function p_(e){return Ss?De(Ss.call(e)):{}}function Ql(e,t){var r=t?ui(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Zl(e,t){if(e!==t){var r=e!==s,i=e===null,p=e===e,u=_t(e),_=t!==s,x=t===null,v=t===t,z=_t(t);if(!x&&!z&&!u&&e>t||u&&_&&v&&!x&&!z||i&&_&&v||!r&&v||!p)return 1;if(!i&&!u&&!z&&e<t||z&&r&&p&&!i&&!u||x&&r&&p||!_&&p||!v)return-1}return 0}function d_(e,t,r){for(var i=-1,p=e.criteria,u=t.criteria,_=p.length,x=r.length;++i<_;){var v=Zl(p[i],u[i]);if(v){if(i>=x)return v;var z=r[i];return v*(z=="desc"?-1:1)}}return e.index-t.index}function Jl(e,t,r,i){for(var p=-1,u=e.length,_=r.length,x=-1,v=t.length,z=Be(u-_,0),S=D(v+z),L=!i;++x<v;)S[x]=t[x];for(;++p<_;)(L||p<u)&&(S[r[p]]=e[p]);for(;z--;)S[x++]=e[p++];return S}function ec(e,t,r,i){for(var p=-1,u=e.length,_=-1,x=r.length,v=-1,z=t.length,S=Be(u-x,0),L=D(S+z),j=!i;++p<S;)L[p]=e[p];for(var X=p;++v<z;)L[X+v]=t[v];for(;++_<x;)(j||p<u)&&(L[X+r[_]]=e[p++]);return L}function st(e,t){var r=-1,i=e.length;for(t||(t=D(i));++r<i;)t[r]=e[r];return t}function $t(e,t,r,i){var p=!r;r||(r={});for(var u=-1,_=t.length;++u<_;){var x=t[u],v=i?i(r[x],e[x],x,r,e):s;v===s&&(v=e[x]),p?Yt(r,x,v):Es(r,x,v)}return r}function m_(e,t){return $t(e,hi(e),t)}function u_(e,t){return $t(e,uc(e),t)}function Ra(e,t){return function(r,i){var p=ne(r)?bu:My,u=t?t():{};return p(r,e,Q(i,2),u)}}function Zr(e){return pe(function(t,r){var i=-1,p=r.length,u=p>1?r[p-1]:s,_=p>2?r[2]:s;for(u=e.length>3&&typeof u=="function"?(p--,u):s,_&&Ze(r[0],r[1],_)&&(u=p<3?s:u,p=1),t=De(t);++i<p;){var x=r[i];x&&e(t,x,i,u)}return t})}function tc(e,t){return function(r,i){if(r==null)return r;if(!at(r))return e(r,i);for(var p=r.length,u=t?p:-1,_=De(r);(t?u--:++u<p)&&i(_[u],u,_)!==!1;);return r}}function rc(e){return function(t,r,i){for(var p=-1,u=De(t),_=i(t),x=_.length;x--;){var v=_[e?x:++p];if(r(u[v],v,u)===!1)break}return t}}function y_(e,t,r){var i=t&H,p=Os(e);function u(){var _=this&&this!==We&&this instanceof u?p:e;return _.apply(i?r:this,arguments)}return u}function sc(e){return function(t){t=ve(t);var r=Hr(t)?Mt(t):s,i=r?r[0]:t.charAt(0),p=r?_r(r,1).join(""):t.slice(1);return i[e]()+p}}function Jr(e){return function(t){return Rn(tp(ep(t).replace(au,"")),e,"")}}function Os(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Qr(e.prototype),i=e.apply(r,t);return ze(i)?i:r}}function __(e,t,r){var i=Os(e);function p(){for(var u=arguments.length,_=D(u),x=u,v=es(p);x--;)_[x]=arguments[x];var z=u<3&&_[0]!==v&&_[u-1]!==v?[]:pr(_,v);if(u-=z.length,u<r)return lc(e,t,Fa,p.placeholder,s,_,z,s,s,r-u);var S=this&&this!==We&&this instanceof p?i:e;return mt(S,this,_)}return p}function ac(e){return function(t,r,i){var p=De(t);if(!at(t)){var u=Q(r,3);t=je(t),r=function(x){return u(p[x],x,p)}}var _=e(t,r,i);return _>-1?p[u?t[_]:_]:s}}function nc(e){return Zt(function(t){var r=t.length,i=r,p=kt.prototype.thru;for(e&&t.reverse();i--;){var u=t[i];if(typeof u!="function")throw new Dt(m);if(p&&!_&&$a(u)=="wrapper")var _=new kt([],!0)}for(i=_?i:r;++i<r;){u=t[i];var x=$a(u),v=x=="wrapper"?bi(u):s;v&&vi(v[0])&&v[1]==(R|K|A|V)&&!v[4].length&&v[9]==1?_=_[$a(v[0])].apply(_,v[3]):_=u.length==1&&vi(u)?_[x]():_.thru(u)}return function(){var z=arguments,S=z[0];if(_&&z.length==1&&ne(S))return _.plant(S).value();for(var L=0,j=r?t[L].apply(this,z):S;++L<r;)j=t[L].call(this,j);return j}})}function Fa(e,t,r,i,p,u,_,x,v,z){var S=t&R,L=t&H,j=t&Y,X=t&(K|U),J=t&re,ce=j?s:Os(e);function ee(){for(var me=arguments.length,_e=D(me),ft=me;ft--;)_e[ft]=arguments[ft];if(X)var Je=es(ee),gt=Au(_e,Je);if(i&&(_e=Jl(_e,i,p,X)),u&&(_e=ec(_e,u,_,X)),me-=gt,X&&me<z){var Oe=pr(_e,Je);return lc(e,t,Fa,ee.placeholder,r,_e,Oe,x,v,z-me)}var Rt=L?r:this,rr=j?Rt[e]:e;return me=_e.length,x?_e=M_(_e,x):J&&me>1&&_e.reverse(),S&&v<me&&(_e.length=v),this&&this!==We&&this instanceof ee&&(rr=ce||Os(rr)),rr.apply(Rt,_e)}return ee}function ic(e,t){return function(r,i){return $y(r,e,t(i),{})}}function Ba(e,t){return function(r,i){var p;if(r===s&&i===s)return t;if(r!==s&&(p=r),i!==s){if(p===s)return i;typeof r=="string"||typeof i=="string"?(r=yt(r),i=yt(i)):(r=Hl(r),i=Hl(i)),p=e(r,i)}return p}}function yi(e){return Zt(function(t){return t=qe(t,ut(Q())),pe(function(r){var i=this;return e(t,function(p){return mt(p,i,r)})})})}function Ua(e,t){t=t===s?" ":yt(t);var r=t.length;if(r<2)return r?oi(t,e):t;var i=oi(t,Aa(e/Wr(t)));return Hr(t)?_r(Mt(i),0,e).join(""):i.slice(0,e)}function f_(e,t,r,i){var p=t&H,u=Os(e);function _(){for(var x=-1,v=arguments.length,z=-1,S=i.length,L=D(S+v),j=this&&this!==We&&this instanceof _?u:e;++z<S;)L[z]=i[z];for(;v--;)L[z++]=arguments[++x];return mt(j,p?r:this,L)}return _}function oc(e){return function(t,r,i){return i&&typeof i!="number"&&Ze(t,r,i)&&(r=i=s),t=tr(t),r===s?(r=t,t=0):r=tr(r),i=i===s?t<r?1:-1:tr(i),t_(t,r,i,e)}}function Ka(e){return function(t,r){return typeof t=="string"&&typeof r=="string"||(t=Ct(t),r=Ct(r)),e(t,r)}}function lc(e,t,r,i,p,u,_,x,v,z){var S=t&K,L=S?_:s,j=S?s:_,X=S?u:s,J=S?s:u;t|=S?A:q,t&=~(S?q:A),t&G||(t&=~(H|Y));var ce=[e,t,p,X,L,J,j,x,v,z],ee=r.apply(s,ce);return vi(e)&&hc(ee,ce),ee.placeholder=i,wc(ee,e,t)}function _i(e){var t=Fe[e];return function(r,i){if(r=Ct(r),i=i==null?0:Ve(oe(i),292),i&&wl(r)){var p=(ve(r)+"e").split("e"),u=t(p[0]+"e"+(+p[1]+i));return p=(ve(u)+"e").split("e"),+(p[0]+"e"+(+p[1]-i))}return t(r)}}var g_=Vr&&1/ga(new Vr([,-0]))[1]==Ee?function(e){return new Vr(e)}:Oi;function cc(e){return function(t){var r=Ye(t);return r==pt?Hn(t):r==dt?Lu(t):Iu(t,e(t))}}function Qt(e,t,r,i,p,u,_,x){var v=t&Y;if(!v&&typeof e!="function")throw new Dt(m);var z=i?i.length:0;if(z||(t&=~(A|q),i=p=s),_=_===s?_:Be(oe(_),0),x=x===s?x:oe(x),z-=p?p.length:0,t&q){var S=i,L=p;i=p=s}var j=v?s:bi(e),X=[e,t,r,i,p,S,L,u,_,x];if(j&&E_(X,j),e=X[0],t=X[1],r=X[2],i=X[3],p=X[4],x=X[9]=X[9]===s?v?0:e.length:Be(X[9]-z,0),!x&&t&(K|U)&&(t&=~(K|U)),!t||t==H)var J=y_(e,t,r);else t==K||t==U?J=__(e,t,x):(t==A||t==(H|A))&&!p.length?J=f_(e,t,r,i):J=Fa.apply(s,X);var ce=j?$l:hc;return wc(ce(J,X),e,t)}function pc(e,t,r,i){return e===s||Ot(e,Xr[r])&&!Te.call(i,r)?t:e}function dc(e,t,r,i,p,u){return ze(e)&&ze(t)&&(u.set(t,e),Ma(e,t,s,dc,u),u.delete(t)),e}function b_(e){return Bs(e)?s:e}function mc(e,t,r,i,p,u){var _=r&E,x=e.length,v=t.length;if(x!=v&&!(_&&v>x))return!1;var z=u.get(e),S=u.get(t);if(z&&S)return z==t&&S==e;var L=-1,j=!0,X=r&F?new Ir:s;for(u.set(e,t),u.set(t,e);++L<x;){var J=e[L],ce=t[L];if(i)var ee=_?i(ce,J,L,t,e,u):i(J,ce,L,e,t,u);if(ee!==s){if(ee)continue;j=!1;break}if(X){if(!Fn(t,function(me,_e){if(!Is(X,_e)&&(J===me||p(J,me,r,i,u)))return X.push(_e)})){j=!1;break}}else if(!(J===ce||p(J,ce,r,i,u))){j=!1;break}}return u.delete(e),u.delete(t),j}function x_(e,t,r,i,p,u,_){switch(r){case or:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Nt:return!(e.byteLength!=t.byteLength||!u(new Ta(e),new Ta(t)));case Bt:case Ht:case Ut:return Ot(+e,+t);case Pr:return e.name==t.name&&e.message==t.message;case wr:case Wt:return e==t+"";case pt:var x=Hn;case dt:var v=i&E;if(x||(x=ga),e.size!=t.size&&!v)return!1;var z=_.get(e);if(z)return z==t;i|=F,_.set(e,t);var S=mc(x(e),x(t),i,p,u,_);return _.delete(e),S;case Fr:if(Ss)return Ss.call(e)==Ss.call(t)}return!1}function h_(e,t,r,i,p,u){var _=r&E,x=fi(e),v=x.length,z=fi(t),S=z.length;if(v!=S&&!_)return!1;for(var L=v;L--;){var j=x[L];if(!(_?j in t:Te.call(t,j)))return!1}var X=u.get(e),J=u.get(t);if(X&&J)return X==t&&J==e;var ce=!0;u.set(e,t),u.set(t,e);for(var ee=_;++L<v;){j=x[L];var me=e[j],_e=t[j];if(i)var ft=_?i(_e,me,j,t,e,u):i(me,_e,j,e,t,u);if(!(ft===s?me===_e||p(me,_e,r,i,u):ft)){ce=!1;break}ee||(ee=j=="constructor")}if(ce&&!ee){var Je=e.constructor,gt=t.constructor;Je!=gt&&"constructor"in e&&"constructor"in t&&!(typeof Je=="function"&&Je instanceof Je&&typeof gt=="function"&&gt instanceof gt)&&(ce=!1)}return u.delete(e),u.delete(t),ce}function Zt(e){return Di(bc(e,s,Ac),e+"")}function fi(e){return El(e,je,hi)}function gi(e){return El(e,nt,uc)}var bi=Ca?function(e){return Ca.get(e)}:Oi;function $a(e){for(var t=e.name+"",r=Yr[t],i=Te.call(Yr,t)?r.length:0;i--;){var p=r[i],u=p.func;if(u==null||u==e)return p.name}return t}function es(e){var t=Te.call(d,"placeholder")?d:e;return t.placeholder}function Q(){var e=d.iteratee||Mi;return e=e===Mi?Ml:e,arguments.length?e(arguments[0],arguments[1]):e}function ja(e,t){var r=e.__data__;return q_(t)?r[typeof t=="string"?"string":"hash"]:r.map}function xi(e){for(var t=je(e),r=t.length;r--;){var i=t[r],p=e[i];t[r]=[i,p,fc(p)]}return t}function Cr(e,t){var r=Su(e,t);return Ll(r)?r:s}function w_(e){var t=Te.call(e,Dr),r=e[Dr];try{e[Dr]=s;var i=!0}catch{}var p=wa.call(e);return i&&(t?e[Dr]=r:delete e[Dr]),p}var hi=Gn?function(e){return e==null?[]:(e=De(e),lr(Gn(e),function(t){return xl.call(e,t)}))}:Ri,uc=Gn?function(e){for(var t=[];e;)cr(t,hi(e)),e=Da(e);return t}:Ri,Ye=Qe;(Xn&&Ye(new Xn(new ArrayBuffer(1)))!=or||qs&&Ye(new qs)!=pt||Vn&&Ye(Vn.resolve())!=_s||Vr&&Ye(new Vr)!=dt||Cs&&Ye(new Cs)!=ir)&&(Ye=function(e){var t=Qe(e),r=t==wt?e.constructor:s,i=r?zr(r):"";if(i)switch(i){case sy:return or;case ay:return pt;case ny:return _s;case iy:return dt;case oy:return ir}return t});function v_(e,t,r){for(var i=-1,p=r.length;++i<p;){var u=r[i],_=u.size;switch(u.type){case"drop":e+=_;break;case"dropRight":t-=_;break;case"take":t=Ve(t,e+_);break;case"takeRight":e=Be(e,t-_);break}}return{start:e,end:t}}function T_(e){var t=e.match(Cn);return t?t[1].split(g):[]}function yc(e,t,r){t=yr(t,e);for(var i=-1,p=t.length,u=!1;++i<p;){var _=jt(t[i]);if(!(u=e!=null&&r(e,_)))break;e=e[_]}return u||++i!=p?u:(p=e==null?0:e.length,!!p&&Qa(p)&&Jt(_,p)&&(ne(e)||Sr(e)))}function D_(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Te.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function _c(e){return typeof e.constructor=="function"&&!Rs(e)?Qr(Da(e)):{}}function k_(e,t,r){var i=e.constructor;switch(t){case Nt:return ui(e);case Bt:case Ht:return new i(+e);case or:return l_(e,r);case Br:case Ur:case vr:case fs:case gs:case bs:case xs:case hs:case ws:return Ql(e,r);case pt:return new i;case Ut:case Wt:return new i(e);case wr:return c_(e);case dt:return new i;case Fr:return p_(e)}}function I_(e,t){var r=t.length;if(!r)return e;var i=r-1;return t[i]=(r>1?"& ":"")+t[i],t=t.join(r>2?", ":" "),e.replace(qn,`{
118
+ */Ws.exports,function(a,n){(function(){var s,o="4.17.21",c=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",m="Expected a function",y="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",b=500,h="__lodash_placeholder__",T=1,N=2,F=4,S=1,R=2,W=1,V=2,Y=4,U=8,K=16,A=32,B=64,E=128,H=256,Q=512,ie=30,Qe="...",St=800,Ue=16,Ke=1,J=2,be=3,Ee=1/0,Me=9007199254740991,pt=17976931348623157e292,ht=NaN,se=4294967295,xe=se-1,Pe=se>>>1,Et=[["ary",E],["bind",W],["bindKey",V],["curry",U],["curryRight",K],["flip",Q],["partial",A],["partialRight",B],["rearg",H]],$e="[object Arguments]",Nt="[object Array]",ys="[object AsyncFunction]",Ut="[object Boolean]",Wt="[object Date]",Mr="[object DOMException]",Pr="[object Error]",hr="[object Function]",aa="[object GeneratorFunction]",dt="[object Map]",Kt="[object Number]",Or="[object Null]",wt="[object Object]",_s="[object Promise]",Rr="[object Proxy]",wr="[object RegExp]",mt="[object Set]",Gt="[object String]",Fr="[object Symbol]",Tn="[object Undefined]",ir="[object WeakMap]",na="[object WeakSet]",Lt="[object ArrayBuffer]",or="[object DataView]",Br="[object Float32Array]",Ur="[object Float64Array]",vr="[object Int8Array]",fs="[object Int16Array]",gs="[object Int32Array]",bs="[object Uint8Array]",xs="[object Uint8ClampedArray]",hs="[object Uint16Array]",ws="[object Uint32Array]",Dn=/\b__p \+= '';/g,vs=/\b(__p \+=) '' \+/g,ia=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Xt=/&(?:amp|lt|gt|quot|#39);/g,Kr=/[&<>"']/g,Ts=RegExp(Xt.source),oa=RegExp(Kr.source),kn=/<%-([\s\S]+?)%>/g,la=/<%([\s\S]+?)%>/g,ca=/<%=([\s\S]+?)%>/g,pa=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,da=/^\w*$/,In=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ds=/[\\^$.*+?()[\]{}|]/g,ma=RegExp(Ds.source),ks=/^\s+/,An=/\s/,qn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Cn=/\{\n\/\* \[wrapped with (.+)\] \*/,g=/,? & /,P=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,$=/[()=,{}\[\]\/\s]/,re=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,we=/\w*$/,ue=/^[-+]0x[0-9a-f]+$/i,de=/^0b[01]+$/i,He=/^\[object .+?Constructor\]$/,Ce=/^0o[0-7]+$/i,Ne=/^(?:0|[1-9]\d*)$/,rt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Mt=/($^)/,ua=/['\n\r\u2028\u2029\\]/g,st="\\ud800-\\udfff",Km="\\u0300-\\u036f",$m="\\ufe20-\\ufe2f",jm="\\u20d0-\\u20ff",Lo=Km+$m+jm,Mo="\\u2700-\\u27bf",Po="a-z\\xdf-\\xf6\\xf8-\\xff",Hm="\\xac\\xb1\\xd7\\xf7",Wm="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Gm="\\u2000-\\u206f",Xm=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Oo="A-Z\\xc0-\\xd6\\xd8-\\xde",Ro="\\ufe0e\\ufe0f",Fo=Hm+Wm+Gm+Xm,zn="['’]",Vm="["+st+"]",Bo="["+Fo+"]",ya="["+Lo+"]",Uo="\\d+",Ym="["+Mo+"]",Ko="["+Po+"]",$o="[^"+st+Fo+Uo+Mo+Po+Oo+"]",Sn="\\ud83c[\\udffb-\\udfff]",Qm="(?:"+ya+"|"+Sn+")",jo="[^"+st+"]",En="(?:\\ud83c[\\udde6-\\uddff]){2}",Nn="[\\ud800-\\udbff][\\udc00-\\udfff]",$r="["+Oo+"]",Ho="\\u200d",Wo="(?:"+Ko+"|"+$o+")",Zm="(?:"+$r+"|"+$o+")",Go="(?:"+zn+"(?:d|ll|m|re|s|t|ve))?",Xo="(?:"+zn+"(?:D|LL|M|RE|S|T|VE))?",Vo=Qm+"?",Yo="["+Ro+"]?",Jm="(?:"+Ho+"(?:"+[jo,En,Nn].join("|")+")"+Yo+Vo+")*",eu="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",tu="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Qo=Yo+Vo+Jm,ru="(?:"+[Ym,En,Nn].join("|")+")"+Qo,su="(?:"+[jo+ya+"?",ya,En,Nn,Vm].join("|")+")",au=RegExp(zn,"g"),nu=RegExp(ya,"g"),Ln=RegExp(Sn+"(?="+Sn+")|"+su+Qo,"g"),iu=RegExp([$r+"?"+Ko+"+"+Go+"(?="+[Bo,$r,"$"].join("|")+")",Zm+"+"+Xo+"(?="+[Bo,$r+Wo,"$"].join("|")+")",$r+"?"+Wo+"+"+Go,$r+"+"+Xo,tu,eu,Uo,ru].join("|"),"g"),ou=RegExp("["+Ho+st+Lo+Ro+"]"),lu=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,cu=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],pu=-1,Ae={};Ae[Br]=Ae[Ur]=Ae[vr]=Ae[fs]=Ae[gs]=Ae[bs]=Ae[xs]=Ae[hs]=Ae[ws]=!0,Ae[$e]=Ae[Nt]=Ae[Lt]=Ae[Ut]=Ae[or]=Ae[Wt]=Ae[Pr]=Ae[hr]=Ae[dt]=Ae[Kt]=Ae[wt]=Ae[wr]=Ae[mt]=Ae[Gt]=Ae[ir]=!1;var Ie={};Ie[$e]=Ie[Nt]=Ie[Lt]=Ie[or]=Ie[Ut]=Ie[Wt]=Ie[Br]=Ie[Ur]=Ie[vr]=Ie[fs]=Ie[gs]=Ie[dt]=Ie[Kt]=Ie[wt]=Ie[wr]=Ie[mt]=Ie[Gt]=Ie[Fr]=Ie[bs]=Ie[xs]=Ie[hs]=Ie[ws]=!0,Ie[Pr]=Ie[hr]=Ie[ir]=!1;var du={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},mu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},uu={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},yu={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},_u=parseFloat,fu=parseInt,Zo=typeof ss=="object"&&ss&&ss.Object===Object&&ss,gu=typeof self=="object"&&self&&self.Object===Object&&self,We=Zo||gu||Function("return this")(),Mn=n&&!n.nodeType&&n,Tr=Mn&&!0&&a&&!a.nodeType&&a,Jo=Tr&&Tr.exports===Mn,Pn=Jo&&Zo.process,vt=function(){try{var w=Tr&&Tr.require&&Tr.require("util").types;return w||Pn&&Pn.binding&&Pn.binding("util")}catch{}}(),el=vt&&vt.isArrayBuffer,tl=vt&&vt.isDate,rl=vt&&vt.isMap,sl=vt&&vt.isRegExp,al=vt&&vt.isSet,nl=vt&&vt.isTypedArray;function ut(w,q,D){switch(D.length){case 0:return w.call(q);case 1:return w.call(q,D[0]);case 2:return w.call(q,D[0],D[1]);case 3:return w.call(q,D[0],D[1],D[2])}return w.apply(q,D)}function bu(w,q,D,G){for(var ae=-1,he=w==null?0:w.length;++ae<he;){var Fe=w[ae];q(G,Fe,D(Fe),w)}return G}function Tt(w,q){for(var D=-1,G=w==null?0:w.length;++D<G&&q(w[D],D,w)!==!1;);return w}function xu(w,q){for(var D=w==null?0:w.length;D--&&q(w[D],D,w)!==!1;);return w}function il(w,q){for(var D=-1,G=w==null?0:w.length;++D<G;)if(!q(w[D],D,w))return!1;return!0}function lr(w,q){for(var D=-1,G=w==null?0:w.length,ae=0,he=[];++D<G;){var Fe=w[D];q(Fe,D,w)&&(he[ae++]=Fe)}return he}function _a(w,q){var D=w==null?0:w.length;return!!D&&jr(w,q,0)>-1}function On(w,q,D){for(var G=-1,ae=w==null?0:w.length;++G<ae;)if(D(q,w[G]))return!0;return!1}function qe(w,q){for(var D=-1,G=w==null?0:w.length,ae=Array(G);++D<G;)ae[D]=q(w[D],D,w);return ae}function cr(w,q){for(var D=-1,G=q.length,ae=w.length;++D<G;)w[ae+D]=q[D];return w}function Rn(w,q,D,G){var ae=-1,he=w==null?0:w.length;for(G&&he&&(D=w[++ae]);++ae<he;)D=q(D,w[ae],ae,w);return D}function hu(w,q,D,G){var ae=w==null?0:w.length;for(G&&ae&&(D=w[--ae]);ae--;)D=q(D,w[ae],ae,w);return D}function Fn(w,q){for(var D=-1,G=w==null?0:w.length;++D<G;)if(q(w[D],D,w))return!0;return!1}var wu=Bn("length");function vu(w){return w.split("")}function Tu(w){return w.match(P)||[]}function ol(w,q,D){var G;return D(w,function(ae,he,Fe){if(q(ae,he,Fe))return G=he,!1}),G}function fa(w,q,D,G){for(var ae=w.length,he=D+(G?1:-1);G?he--:++he<ae;)if(q(w[he],he,w))return he;return-1}function jr(w,q,D){return q===q?Mu(w,q,D):fa(w,ll,D)}function Du(w,q,D,G){for(var ae=D-1,he=w.length;++ae<he;)if(G(w[ae],q))return ae;return-1}function ll(w){return w!==w}function cl(w,q){var D=w==null?0:w.length;return D?Kn(w,q)/D:ht}function Bn(w){return function(q){return q==null?s:q[w]}}function Un(w){return function(q){return w==null?s:w[q]}}function pl(w,q,D,G,ae){return ae(w,function(he,Fe,De){D=G?(G=!1,he):q(D,he,Fe,De)}),D}function ku(w,q){var D=w.length;for(w.sort(q);D--;)w[D]=w[D].value;return w}function Kn(w,q){for(var D,G=-1,ae=w.length;++G<ae;){var he=q(w[G]);he!==s&&(D=D===s?he:D+he)}return D}function $n(w,q){for(var D=-1,G=Array(w);++D<w;)G[D]=q(D);return G}function Iu(w,q){return qe(q,function(D){return[D,w[D]]})}function dl(w){return w&&w.slice(0,_l(w)+1).replace(ks,"")}function yt(w){return function(q){return w(q)}}function jn(w,q){return qe(q,function(D){return w[D]})}function Is(w,q){return w.has(q)}function ml(w,q){for(var D=-1,G=w.length;++D<G&&jr(q,w[D],0)>-1;);return D}function ul(w,q){for(var D=w.length;D--&&jr(q,w[D],0)>-1;);return D}function Au(w,q){for(var D=w.length,G=0;D--;)w[D]===q&&++G;return G}var qu=Un(du),Cu=Un(mu);function zu(w){return"\\"+yu[w]}function Su(w,q){return w==null?s:w[q]}function Hr(w){return ou.test(w)}function Eu(w){return lu.test(w)}function Nu(w){for(var q,D=[];!(q=w.next()).done;)D.push(q.value);return D}function Hn(w){var q=-1,D=Array(w.size);return w.forEach(function(G,ae){D[++q]=[ae,G]}),D}function yl(w,q){return function(D){return w(q(D))}}function pr(w,q){for(var D=-1,G=w.length,ae=0,he=[];++D<G;){var Fe=w[D];(Fe===q||Fe===h)&&(w[D]=h,he[ae++]=D)}return he}function ga(w){var q=-1,D=Array(w.size);return w.forEach(function(G){D[++q]=G}),D}function Lu(w){var q=-1,D=Array(w.size);return w.forEach(function(G){D[++q]=[G,G]}),D}function Mu(w,q,D){for(var G=D-1,ae=w.length;++G<ae;)if(w[G]===q)return G;return-1}function Pu(w,q,D){for(var G=D+1;G--;)if(w[G]===q)return G;return G}function Wr(w){return Hr(w)?Ru(w):wu(w)}function Pt(w){return Hr(w)?Fu(w):vu(w)}function _l(w){for(var q=w.length;q--&&An.test(w.charAt(q)););return q}var Ou=Un(uu);function Ru(w){for(var q=Ln.lastIndex=0;Ln.test(w);)++q;return q}function Fu(w){return w.match(Ln)||[]}function Bu(w){return w.match(iu)||[]}var Uu=function w(q){q=q==null?We:Gr.defaults(We.Object(),q,Gr.pick(We,cu));var D=q.Array,G=q.Date,ae=q.Error,he=q.Function,Fe=q.Math,De=q.Object,Wn=q.RegExp,Ku=q.String,Dt=q.TypeError,ba=D.prototype,$u=he.prototype,Xr=De.prototype,xa=q["__core-js_shared__"],ha=$u.toString,Te=Xr.hasOwnProperty,ju=0,fl=function(){var e=/[^.]+$/.exec(xa&&xa.keys&&xa.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),wa=Xr.toString,Hu=ha.call(De),Wu=We._,Gu=Wn("^"+ha.call(Te).replace(Ds,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),va=Jo?q.Buffer:s,dr=q.Symbol,Ta=q.Uint8Array,gl=va?va.allocUnsafe:s,Da=yl(De.getPrototypeOf,De),bl=De.create,xl=Xr.propertyIsEnumerable,ka=ba.splice,hl=dr?dr.isConcatSpreadable:s,As=dr?dr.iterator:s,Dr=dr?dr.toStringTag:s,Ia=function(){try{var e=Cr(De,"defineProperty");return e({},"",{}),e}catch{}}(),Xu=q.clearTimeout!==We.clearTimeout&&q.clearTimeout,Vu=G&&G.now!==We.Date.now&&G.now,Yu=q.setTimeout!==We.setTimeout&&q.setTimeout,Aa=Fe.ceil,qa=Fe.floor,Gn=De.getOwnPropertySymbols,Qu=va?va.isBuffer:s,wl=q.isFinite,Zu=ba.join,Ju=yl(De.keys,De),Be=Fe.max,Ve=Fe.min,ey=G.now,ty=q.parseInt,vl=Fe.random,ry=ba.reverse,Xn=Cr(q,"DataView"),qs=Cr(q,"Map"),Vn=Cr(q,"Promise"),Vr=Cr(q,"Set"),Cs=Cr(q,"WeakMap"),zs=Cr(De,"create"),Ca=Cs&&new Cs,Yr={},sy=zr(Xn),ay=zr(qs),ny=zr(Vn),iy=zr(Vr),oy=zr(Cs),za=dr?dr.prototype:s,Ss=za?za.valueOf:s,Tl=za?za.toString:s;function d(e){if(Le(e)&&!ne(e)&&!(e instanceof ye)){if(e instanceof kt)return e;if(Te.call(e,"__wrapped__"))return Dc(e)}return new kt(e)}var Qr=function(){function e(){}return function(t){if(!ze(t))return{};if(bl)return bl(t);e.prototype=t;var r=new e;return e.prototype=s,r}}();function Sa(){}function kt(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=s}d.templateSettings={escape:kn,evaluate:la,interpolate:ca,variable:"",imports:{_:d}},d.prototype=Sa.prototype,d.prototype.constructor=d,kt.prototype=Qr(Sa.prototype),kt.prototype.constructor=kt;function ye(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=se,this.__views__=[]}function ly(){var e=new ye(this.__wrapped__);return e.__actions__=at(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=at(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=at(this.__views__),e}function cy(){if(this.__filtered__){var e=new ye(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function py(){var e=this.__wrapped__.value(),t=this.__dir__,r=ne(e),i=t<0,p=r?e.length:0,u=v_(0,p,this.__views__),_=u.start,x=u.end,v=x-_,C=i?x:_-1,z=this.__iteratees__,L=z.length,j=0,X=Ve(v,this.__takeCount__);if(!r||!i&&p==v&&X==v)return Gl(e,this.__actions__);var ee=[];e:for(;v--&&j<X;){C+=t;for(var ce=-1,te=e[C];++ce<L;){var me=z[ce],_e=me.iteratee,gt=me.type,et=_e(te);if(gt==J)te=et;else if(!et){if(gt==Ke)continue e;break e}}ee[j++]=te}return ee}ye.prototype=Qr(Sa.prototype),ye.prototype.constructor=ye;function kr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function dy(){this.__data__=zs?zs(null):{},this.size=0}function my(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function uy(e){var t=this.__data__;if(zs){var r=t[e];return r===f?s:r}return Te.call(t,e)?t[e]:s}function yy(e){var t=this.__data__;return zs?t[e]!==s:Te.call(t,e)}function _y(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=zs&&t===s?f:t,this}kr.prototype.clear=dy,kr.prototype.delete=my,kr.prototype.get=uy,kr.prototype.has=yy,kr.prototype.set=_y;function Vt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function fy(){this.__data__=[],this.size=0}function gy(e){var t=this.__data__,r=Ea(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():ka.call(t,r,1),--this.size,!0}function by(e){var t=this.__data__,r=Ea(t,e);return r<0?s:t[r][1]}function xy(e){return Ea(this.__data__,e)>-1}function hy(e,t){var r=this.__data__,i=Ea(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}Vt.prototype.clear=fy,Vt.prototype.delete=gy,Vt.prototype.get=by,Vt.prototype.has=xy,Vt.prototype.set=hy;function Yt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function wy(){this.size=0,this.__data__={hash:new kr,map:new(qs||Vt),string:new kr}}function vy(e){var t=ja(this,e).delete(e);return this.size-=t?1:0,t}function Ty(e){return ja(this,e).get(e)}function Dy(e){return ja(this,e).has(e)}function ky(e,t){var r=ja(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}Yt.prototype.clear=wy,Yt.prototype.delete=vy,Yt.prototype.get=Ty,Yt.prototype.has=Dy,Yt.prototype.set=ky;function Ir(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Yt;++t<r;)this.add(e[t])}function Iy(e){return this.__data__.set(e,f),this}function Ay(e){return this.__data__.has(e)}Ir.prototype.add=Ir.prototype.push=Iy,Ir.prototype.has=Ay;function Ot(e){var t=this.__data__=new Vt(e);this.size=t.size}function qy(){this.__data__=new Vt,this.size=0}function Cy(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function zy(e){return this.__data__.get(e)}function Sy(e){return this.__data__.has(e)}function Ey(e,t){var r=this.__data__;if(r instanceof Vt){var i=r.__data__;if(!qs||i.length<c-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Yt(i)}return r.set(e,t),this.size=r.size,this}Ot.prototype.clear=qy,Ot.prototype.delete=Cy,Ot.prototype.get=zy,Ot.prototype.has=Sy,Ot.prototype.set=Ey;function Dl(e,t){var r=ne(e),i=!r&&Sr(e),p=!r&&!i&&fr(e),u=!r&&!i&&!p&&ts(e),_=r||i||p||u,x=_?$n(e.length,Ku):[],v=x.length;for(var C in e)(t||Te.call(e,C))&&!(_&&(C=="length"||p&&(C=="offset"||C=="parent")||u&&(C=="buffer"||C=="byteLength"||C=="byteOffset")||er(C,v)))&&x.push(C);return x}function kl(e){var t=e.length;return t?e[ii(0,t-1)]:s}function Ny(e,t){return Ha(at(e),Ar(t,0,e.length))}function Ly(e){return Ha(at(e))}function Yn(e,t,r){(r!==s&&!Rt(e[t],r)||r===s&&!(t in e))&&Qt(e,t,r)}function Es(e,t,r){var i=e[t];(!(Te.call(e,t)&&Rt(i,r))||r===s&&!(t in e))&&Qt(e,t,r)}function Ea(e,t){for(var r=e.length;r--;)if(Rt(e[r][0],t))return r;return-1}function My(e,t,r,i){return mr(e,function(p,u,_){t(i,p,r(p),_)}),i}function Il(e,t){return e&&jt(t,je(t),e)}function Py(e,t){return e&&jt(t,it(t),e)}function Qt(e,t,r){t=="__proto__"&&Ia?Ia(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Qn(e,t){for(var r=-1,i=t.length,p=D(i),u=e==null;++r<i;)p[r]=u?s:Si(e,t[r]);return p}function Ar(e,t,r){return e===e&&(r!==s&&(e=e<=r?e:r),t!==s&&(e=e>=t?e:t)),e}function It(e,t,r,i,p,u){var _,x=t&T,v=t&N,C=t&F;if(r&&(_=p?r(e,i,p,u):r(e)),_!==s)return _;if(!ze(e))return e;var z=ne(e);if(z){if(_=D_(e),!x)return at(e,_)}else{var L=Ye(e),j=L==hr||L==aa;if(fr(e))return Yl(e,x);if(L==wt||L==$e||j&&!p){if(_=v||j?{}:_c(e),!x)return v?u_(e,Py(_,e)):m_(e,Il(_,e))}else{if(!Ie[L])return p?e:{};_=k_(e,L,x)}}u||(u=new Ot);var X=u.get(e);if(X)return X;u.set(e,_),jc(e)?e.forEach(function(te){_.add(It(te,t,r,te,e,u))}):Kc(e)&&e.forEach(function(te,me){_.set(me,It(te,t,r,me,e,u))});var ee=C?v?gi:fi:v?it:je,ce=z?s:ee(e);return Tt(ce||e,function(te,me){ce&&(me=te,te=e[me]),Es(_,me,It(te,t,r,me,e,u))}),_}function Oy(e){var t=je(e);return function(r){return Al(r,e,t)}}function Al(e,t,r){var i=r.length;if(e==null)return!i;for(e=De(e);i--;){var p=r[i],u=t[p],_=e[p];if(_===s&&!(p in e)||!u(_))return!1}return!0}function ql(e,t,r){if(typeof e!="function")throw new Dt(m);return Fs(function(){e.apply(s,r)},t)}function Ns(e,t,r,i){var p=-1,u=_a,_=!0,x=e.length,v=[],C=t.length;if(!x)return v;r&&(t=qe(t,yt(r))),i?(u=On,_=!1):t.length>=c&&(u=Is,_=!1,t=new Ir(t));e:for(;++p<x;){var z=e[p],L=r==null?z:r(z);if(z=i||z!==0?z:0,_&&L===L){for(var j=C;j--;)if(t[j]===L)continue e;v.push(z)}else u(t,L,i)||v.push(z)}return v}var mr=tc($t),Cl=tc(Jn,!0);function Ry(e,t){var r=!0;return mr(e,function(i,p,u){return r=!!t(i,p,u),r}),r}function Na(e,t,r){for(var i=-1,p=e.length;++i<p;){var u=e[i],_=t(u);if(_!=null&&(x===s?_===_&&!ft(_):r(_,x)))var x=_,v=u}return v}function Fy(e,t,r,i){var p=e.length;for(r=oe(r),r<0&&(r=-r>p?0:p+r),i=i===s||i>p?p:oe(i),i<0&&(i+=p),i=r>i?0:Wc(i);r<i;)e[r++]=t;return e}function zl(e,t){var r=[];return mr(e,function(i,p,u){t(i,p,u)&&r.push(i)}),r}function Ge(e,t,r,i,p){var u=-1,_=e.length;for(r||(r=A_),p||(p=[]);++u<_;){var x=e[u];t>0&&r(x)?t>1?Ge(x,t-1,r,i,p):cr(p,x):i||(p[p.length]=x)}return p}var Zn=rc(),Sl=rc(!0);function $t(e,t){return e&&Zn(e,t,je)}function Jn(e,t){return e&&Sl(e,t,je)}function La(e,t){return lr(t,function(r){return tr(e[r])})}function qr(e,t){t=yr(t,e);for(var r=0,i=t.length;e!=null&&r<i;)e=e[Ht(t[r++])];return r&&r==i?e:s}function El(e,t,r){var i=t(e);return ne(e)?i:cr(i,r(e))}function Ze(e){return e==null?e===s?Tn:Or:Dr&&Dr in De(e)?w_(e):L_(e)}function ei(e,t){return e>t}function By(e,t){return e!=null&&Te.call(e,t)}function Uy(e,t){return e!=null&&t in De(e)}function Ky(e,t,r){return e>=Ve(t,r)&&e<Be(t,r)}function ti(e,t,r){for(var i=r?On:_a,p=e[0].length,u=e.length,_=u,x=D(u),v=1/0,C=[];_--;){var z=e[_];_&&t&&(z=qe(z,yt(t))),v=Ve(z.length,v),x[_]=!r&&(t||p>=120&&z.length>=120)?new Ir(_&&z):s}z=e[0];var L=-1,j=x[0];e:for(;++L<p&&C.length<v;){var X=z[L],ee=t?t(X):X;if(X=r||X!==0?X:0,!(j?Is(j,ee):i(C,ee,r))){for(_=u;--_;){var ce=x[_];if(!(ce?Is(ce,ee):i(e[_],ee,r)))continue e}j&&j.push(ee),C.push(X)}}return C}function $y(e,t,r,i){return $t(e,function(p,u,_){t(i,r(p),u,_)}),i}function Ls(e,t,r){t=yr(t,e),e=xc(e,t);var i=e==null?e:e[Ht(qt(t))];return i==null?s:ut(i,e,r)}function Nl(e){return Le(e)&&Ze(e)==$e}function jy(e){return Le(e)&&Ze(e)==Lt}function Hy(e){return Le(e)&&Ze(e)==Wt}function Ms(e,t,r,i,p){return e===t?!0:e==null||t==null||!Le(e)&&!Le(t)?e!==e&&t!==t:Wy(e,t,r,i,Ms,p)}function Wy(e,t,r,i,p,u){var _=ne(e),x=ne(t),v=_?Nt:Ye(e),C=x?Nt:Ye(t);v=v==$e?wt:v,C=C==$e?wt:C;var z=v==wt,L=C==wt,j=v==C;if(j&&fr(e)){if(!fr(t))return!1;_=!0,z=!1}if(j&&!z)return u||(u=new Ot),_||ts(e)?mc(e,t,r,i,p,u):x_(e,t,v,r,i,p,u);if(!(r&S)){var X=z&&Te.call(e,"__wrapped__"),ee=L&&Te.call(t,"__wrapped__");if(X||ee){var ce=X?e.value():e,te=ee?t.value():t;return u||(u=new Ot),p(ce,te,r,i,u)}}return j?(u||(u=new Ot),h_(e,t,r,i,p,u)):!1}function Gy(e){return Le(e)&&Ye(e)==dt}function ri(e,t,r,i){var p=r.length,u=p,_=!i;if(e==null)return!u;for(e=De(e);p--;){var x=r[p];if(_&&x[2]?x[1]!==e[x[0]]:!(x[0]in e))return!1}for(;++p<u;){x=r[p];var v=x[0],C=e[v],z=x[1];if(_&&x[2]){if(C===s&&!(v in e))return!1}else{var L=new Ot;if(i)var j=i(C,z,v,e,t,L);if(!(j===s?Ms(z,C,S|R,i,L):j))return!1}}return!0}function Ll(e){if(!ze(e)||C_(e))return!1;var t=tr(e)?Gu:He;return t.test(zr(e))}function Xy(e){return Le(e)&&Ze(e)==wr}function Vy(e){return Le(e)&&Ye(e)==mt}function Yy(e){return Le(e)&&Qa(e.length)&&!!Ae[Ze(e)]}function Ml(e){return typeof e=="function"?e:e==null?ot:typeof e=="object"?ne(e)?Rl(e[0],e[1]):Ol(e):sp(e)}function si(e){if(!Rs(e))return Ju(e);var t=[];for(var r in De(e))Te.call(e,r)&&r!="constructor"&&t.push(r);return t}function Qy(e){if(!ze(e))return N_(e);var t=Rs(e),r=[];for(var i in e)i=="constructor"&&(t||!Te.call(e,i))||r.push(i);return r}function ai(e,t){return e<t}function Pl(e,t){var r=-1,i=nt(e)?D(e.length):[];return mr(e,function(p,u,_){i[++r]=t(p,u,_)}),i}function Ol(e){var t=xi(e);return t.length==1&&t[0][2]?gc(t[0][0],t[0][1]):function(r){return r===e||ri(r,e,t)}}function Rl(e,t){return wi(e)&&fc(t)?gc(Ht(e),t):function(r){var i=Si(r,e);return i===s&&i===t?Ei(r,e):Ms(t,i,S|R)}}function Ma(e,t,r,i,p){e!==t&&Zn(t,function(u,_){if(p||(p=new Ot),ze(u))Zy(e,t,_,r,Ma,i,p);else{var x=i?i(Ti(e,_),u,_+"",e,t,p):s;x===s&&(x=u),Yn(e,_,x)}},it)}function Zy(e,t,r,i,p,u,_){var x=Ti(e,r),v=Ti(t,r),C=_.get(v);if(C){Yn(e,r,C);return}var z=u?u(x,v,r+"",e,t,_):s,L=z===s;if(L){var j=ne(v),X=!j&&fr(v),ee=!j&&!X&&ts(v);z=v,j||X||ee?ne(x)?z=x:Oe(x)?z=at(x):X?(L=!1,z=Yl(v,!0)):ee?(L=!1,z=Ql(v,!0)):z=[]:Bs(v)||Sr(v)?(z=x,Sr(x)?z=Gc(x):(!ze(x)||tr(x))&&(z=_c(v))):L=!1}L&&(_.set(v,z),p(z,v,i,u,_),_.delete(v)),Yn(e,r,z)}function Fl(e,t){var r=e.length;if(r)return t+=t<0?r:0,er(t,r)?e[t]:s}function Bl(e,t,r){t.length?t=qe(t,function(u){return ne(u)?function(_){return qr(_,u.length===1?u[0]:u)}:u}):t=[ot];var i=-1;t=qe(t,yt(Z()));var p=Pl(e,function(u,_,x){var v=qe(t,function(C){return C(u)});return{criteria:v,index:++i,value:u}});return ku(p,function(u,_){return d_(u,_,r)})}function Jy(e,t){return Ul(e,t,function(r,i){return Ei(e,i)})}function Ul(e,t,r){for(var i=-1,p=t.length,u={};++i<p;){var _=t[i],x=qr(e,_);r(x,_)&&Ps(u,yr(_,e),x)}return u}function e_(e){return function(t){return qr(t,e)}}function ni(e,t,r,i){var p=i?Du:jr,u=-1,_=t.length,x=e;for(e===t&&(t=at(t)),r&&(x=qe(e,yt(r)));++u<_;)for(var v=0,C=t[u],z=r?r(C):C;(v=p(x,z,v,i))>-1;)x!==e&&ka.call(x,v,1),ka.call(e,v,1);return e}function Kl(e,t){for(var r=e?t.length:0,i=r-1;r--;){var p=t[r];if(r==i||p!==u){var u=p;er(p)?ka.call(e,p,1):ci(e,p)}}return e}function ii(e,t){return e+qa(vl()*(t-e+1))}function t_(e,t,r,i){for(var p=-1,u=Be(Aa((t-e)/(r||1)),0),_=D(u);u--;)_[i?u:++p]=e,e+=r;return _}function oi(e,t){var r="";if(!e||t<1||t>Me)return r;do t%2&&(r+=e),t=qa(t/2),t&&(e+=e);while(t);return r}function pe(e,t){return Di(bc(e,t,ot),e+"")}function r_(e){return kl(rs(e))}function s_(e,t){var r=rs(e);return Ha(r,Ar(t,0,r.length))}function Ps(e,t,r,i){if(!ze(e))return e;t=yr(t,e);for(var p=-1,u=t.length,_=u-1,x=e;x!=null&&++p<u;){var v=Ht(t[p]),C=r;if(v==="__proto__"||v==="constructor"||v==="prototype")return e;if(p!=_){var z=x[v];C=i?i(z,v,x):s,C===s&&(C=ze(z)?z:er(t[p+1])?[]:{})}Es(x,v,C),x=x[v]}return e}var $l=Ca?function(e,t){return Ca.set(e,t),e}:ot,a_=Ia?function(e,t){return Ia(e,"toString",{configurable:!0,enumerable:!1,value:Li(t),writable:!0})}:ot;function n_(e){return Ha(rs(e))}function At(e,t,r){var i=-1,p=e.length;t<0&&(t=-t>p?0:p+t),r=r>p?p:r,r<0&&(r+=p),p=t>r?0:r-t>>>0,t>>>=0;for(var u=D(p);++i<p;)u[i]=e[i+t];return u}function i_(e,t){var r;return mr(e,function(i,p,u){return r=t(i,p,u),!r}),!!r}function Pa(e,t,r){var i=0,p=e==null?i:e.length;if(typeof t=="number"&&t===t&&p<=Pe){for(;i<p;){var u=i+p>>>1,_=e[u];_!==null&&!ft(_)&&(r?_<=t:_<t)?i=u+1:p=u}return p}return li(e,t,ot,r)}function li(e,t,r,i){var p=0,u=e==null?0:e.length;if(u===0)return 0;t=r(t);for(var _=t!==t,x=t===null,v=ft(t),C=t===s;p<u;){var z=qa((p+u)/2),L=r(e[z]),j=L!==s,X=L===null,ee=L===L,ce=ft(L);if(_)var te=i||ee;else C?te=ee&&(i||j):x?te=ee&&j&&(i||!X):v?te=ee&&j&&!X&&(i||!ce):X||ce?te=!1:te=i?L<=t:L<t;te?p=z+1:u=z}return Ve(u,xe)}function jl(e,t){for(var r=-1,i=e.length,p=0,u=[];++r<i;){var _=e[r],x=t?t(_):_;if(!r||!Rt(x,v)){var v=x;u[p++]=_===0?0:_}}return u}function Hl(e){return typeof e=="number"?e:ft(e)?ht:+e}function _t(e){if(typeof e=="string")return e;if(ne(e))return qe(e,_t)+"";if(ft(e))return Tl?Tl.call(e):"";var t=e+"";return t=="0"&&1/e==-Ee?"-0":t}function ur(e,t,r){var i=-1,p=_a,u=e.length,_=!0,x=[],v=x;if(r)_=!1,p=On;else if(u>=c){var C=t?null:g_(e);if(C)return ga(C);_=!1,p=Is,v=new Ir}else v=t?[]:x;e:for(;++i<u;){var z=e[i],L=t?t(z):z;if(z=r||z!==0?z:0,_&&L===L){for(var j=v.length;j--;)if(v[j]===L)continue e;t&&v.push(L),x.push(z)}else p(v,L,r)||(v!==x&&v.push(L),x.push(z))}return x}function ci(e,t){return t=yr(t,e),e=xc(e,t),e==null||delete e[Ht(qt(t))]}function Wl(e,t,r,i){return Ps(e,t,r(qr(e,t)),i)}function Oa(e,t,r,i){for(var p=e.length,u=i?p:-1;(i?u--:++u<p)&&t(e[u],u,e););return r?At(e,i?0:u,i?u+1:p):At(e,i?u+1:0,i?p:u)}function Gl(e,t){var r=e;return r instanceof ye&&(r=r.value()),Rn(t,function(i,p){return p.func.apply(p.thisArg,cr([i],p.args))},r)}function pi(e,t,r){var i=e.length;if(i<2)return i?ur(e[0]):[];for(var p=-1,u=D(i);++p<i;)for(var _=e[p],x=-1;++x<i;)x!=p&&(u[p]=Ns(u[p]||_,e[x],t,r));return ur(Ge(u,1),t,r)}function Xl(e,t,r){for(var i=-1,p=e.length,u=t.length,_={};++i<p;){var x=i<u?t[i]:s;r(_,e[i],x)}return _}function di(e){return Oe(e)?e:[]}function mi(e){return typeof e=="function"?e:ot}function yr(e,t){return ne(e)?e:wi(e,t)?[e]:Tc(ve(e))}var o_=pe;function _r(e,t,r){var i=e.length;return r=r===s?i:r,!t&&r>=i?e:At(e,t,r)}var Vl=Xu||function(e){return We.clearTimeout(e)};function Yl(e,t){if(t)return e.slice();var r=e.length,i=gl?gl(r):new e.constructor(r);return e.copy(i),i}function ui(e){var t=new e.constructor(e.byteLength);return new Ta(t).set(new Ta(e)),t}function l_(e,t){var r=t?ui(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function c_(e){var t=new e.constructor(e.source,we.exec(e));return t.lastIndex=e.lastIndex,t}function p_(e){return Ss?De(Ss.call(e)):{}}function Ql(e,t){var r=t?ui(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Zl(e,t){if(e!==t){var r=e!==s,i=e===null,p=e===e,u=ft(e),_=t!==s,x=t===null,v=t===t,C=ft(t);if(!x&&!C&&!u&&e>t||u&&_&&v&&!x&&!C||i&&_&&v||!r&&v||!p)return 1;if(!i&&!u&&!C&&e<t||C&&r&&p&&!i&&!u||x&&r&&p||!_&&p||!v)return-1}return 0}function d_(e,t,r){for(var i=-1,p=e.criteria,u=t.criteria,_=p.length,x=r.length;++i<_;){var v=Zl(p[i],u[i]);if(v){if(i>=x)return v;var C=r[i];return v*(C=="desc"?-1:1)}}return e.index-t.index}function Jl(e,t,r,i){for(var p=-1,u=e.length,_=r.length,x=-1,v=t.length,C=Be(u-_,0),z=D(v+C),L=!i;++x<v;)z[x]=t[x];for(;++p<_;)(L||p<u)&&(z[r[p]]=e[p]);for(;C--;)z[x++]=e[p++];return z}function ec(e,t,r,i){for(var p=-1,u=e.length,_=-1,x=r.length,v=-1,C=t.length,z=Be(u-x,0),L=D(z+C),j=!i;++p<z;)L[p]=e[p];for(var X=p;++v<C;)L[X+v]=t[v];for(;++_<x;)(j||p<u)&&(L[X+r[_]]=e[p++]);return L}function at(e,t){var r=-1,i=e.length;for(t||(t=D(i));++r<i;)t[r]=e[r];return t}function jt(e,t,r,i){var p=!r;r||(r={});for(var u=-1,_=t.length;++u<_;){var x=t[u],v=i?i(r[x],e[x],x,r,e):s;v===s&&(v=e[x]),p?Qt(r,x,v):Es(r,x,v)}return r}function m_(e,t){return jt(e,hi(e),t)}function u_(e,t){return jt(e,uc(e),t)}function Ra(e,t){return function(r,i){var p=ne(r)?bu:My,u=t?t():{};return p(r,e,Z(i,2),u)}}function Zr(e){return pe(function(t,r){var i=-1,p=r.length,u=p>1?r[p-1]:s,_=p>2?r[2]:s;for(u=e.length>3&&typeof u=="function"?(p--,u):s,_&&Je(r[0],r[1],_)&&(u=p<3?s:u,p=1),t=De(t);++i<p;){var x=r[i];x&&e(t,x,i,u)}return t})}function tc(e,t){return function(r,i){if(r==null)return r;if(!nt(r))return e(r,i);for(var p=r.length,u=t?p:-1,_=De(r);(t?u--:++u<p)&&i(_[u],u,_)!==!1;);return r}}function rc(e){return function(t,r,i){for(var p=-1,u=De(t),_=i(t),x=_.length;x--;){var v=_[e?x:++p];if(r(u[v],v,u)===!1)break}return t}}function y_(e,t,r){var i=t&W,p=Os(e);function u(){var _=this&&this!==We&&this instanceof u?p:e;return _.apply(i?r:this,arguments)}return u}function sc(e){return function(t){t=ve(t);var r=Hr(t)?Pt(t):s,i=r?r[0]:t.charAt(0),p=r?_r(r,1).join(""):t.slice(1);return i[e]()+p}}function Jr(e){return function(t){return Rn(tp(ep(t).replace(au,"")),e,"")}}function Os(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Qr(e.prototype),i=e.apply(r,t);return ze(i)?i:r}}function __(e,t,r){var i=Os(e);function p(){for(var u=arguments.length,_=D(u),x=u,v=es(p);x--;)_[x]=arguments[x];var C=u<3&&_[0]!==v&&_[u-1]!==v?[]:pr(_,v);if(u-=C.length,u<r)return lc(e,t,Fa,p.placeholder,s,_,C,s,s,r-u);var z=this&&this!==We&&this instanceof p?i:e;return ut(z,this,_)}return p}function ac(e){return function(t,r,i){var p=De(t);if(!nt(t)){var u=Z(r,3);t=je(t),r=function(x){return u(p[x],x,p)}}var _=e(t,r,i);return _>-1?p[u?t[_]:_]:s}}function nc(e){return Jt(function(t){var r=t.length,i=r,p=kt.prototype.thru;for(e&&t.reverse();i--;){var u=t[i];if(typeof u!="function")throw new Dt(m);if(p&&!_&&$a(u)=="wrapper")var _=new kt([],!0)}for(i=_?i:r;++i<r;){u=t[i];var x=$a(u),v=x=="wrapper"?bi(u):s;v&&vi(v[0])&&v[1]==(E|U|A|H)&&!v[4].length&&v[9]==1?_=_[$a(v[0])].apply(_,v[3]):_=u.length==1&&vi(u)?_[x]():_.thru(u)}return function(){var C=arguments,z=C[0];if(_&&C.length==1&&ne(z))return _.plant(z).value();for(var L=0,j=r?t[L].apply(this,C):z;++L<r;)j=t[L].call(this,j);return j}})}function Fa(e,t,r,i,p,u,_,x,v,C){var z=t&E,L=t&W,j=t&V,X=t&(U|K),ee=t&Q,ce=j?s:Os(e);function te(){for(var me=arguments.length,_e=D(me),gt=me;gt--;)_e[gt]=arguments[gt];if(X)var et=es(te),bt=Au(_e,et);if(i&&(_e=Jl(_e,i,p,X)),u&&(_e=ec(_e,u,_,X)),me-=bt,X&&me<C){var Re=pr(_e,et);return lc(e,t,Fa,te.placeholder,r,_e,Re,x,v,C-me)}var Ft=L?r:this,sr=j?Ft[e]:e;return me=_e.length,x?_e=M_(_e,x):ee&&me>1&&_e.reverse(),z&&v<me&&(_e.length=v),this&&this!==We&&this instanceof te&&(sr=ce||Os(sr)),sr.apply(Ft,_e)}return te}function ic(e,t){return function(r,i){return $y(r,e,t(i),{})}}function Ba(e,t){return function(r,i){var p;if(r===s&&i===s)return t;if(r!==s&&(p=r),i!==s){if(p===s)return i;typeof r=="string"||typeof i=="string"?(r=_t(r),i=_t(i)):(r=Hl(r),i=Hl(i)),p=e(r,i)}return p}}function yi(e){return Jt(function(t){return t=qe(t,yt(Z())),pe(function(r){var i=this;return e(t,function(p){return ut(p,i,r)})})})}function Ua(e,t){t=t===s?" ":_t(t);var r=t.length;if(r<2)return r?oi(t,e):t;var i=oi(t,Aa(e/Wr(t)));return Hr(t)?_r(Pt(i),0,e).join(""):i.slice(0,e)}function f_(e,t,r,i){var p=t&W,u=Os(e);function _(){for(var x=-1,v=arguments.length,C=-1,z=i.length,L=D(z+v),j=this&&this!==We&&this instanceof _?u:e;++C<z;)L[C]=i[C];for(;v--;)L[C++]=arguments[++x];return ut(j,p?r:this,L)}return _}function oc(e){return function(t,r,i){return i&&typeof i!="number"&&Je(t,r,i)&&(r=i=s),t=rr(t),r===s?(r=t,t=0):r=rr(r),i=i===s?t<r?1:-1:rr(i),t_(t,r,i,e)}}function Ka(e){return function(t,r){return typeof t=="string"&&typeof r=="string"||(t=Ct(t),r=Ct(r)),e(t,r)}}function lc(e,t,r,i,p,u,_,x,v,C){var z=t&U,L=z?_:s,j=z?s:_,X=z?u:s,ee=z?s:u;t|=z?A:B,t&=~(z?B:A),t&Y||(t&=~(W|V));var ce=[e,t,p,X,L,ee,j,x,v,C],te=r.apply(s,ce);return vi(e)&&hc(te,ce),te.placeholder=i,wc(te,e,t)}function _i(e){var t=Fe[e];return function(r,i){if(r=Ct(r),i=i==null?0:Ve(oe(i),292),i&&wl(r)){var p=(ve(r)+"e").split("e"),u=t(p[0]+"e"+(+p[1]+i));return p=(ve(u)+"e").split("e"),+(p[0]+"e"+(+p[1]-i))}return t(r)}}var g_=Vr&&1/ga(new Vr([,-0]))[1]==Ee?function(e){return new Vr(e)}:Oi;function cc(e){return function(t){var r=Ye(t);return r==dt?Hn(t):r==mt?Lu(t):Iu(t,e(t))}}function Zt(e,t,r,i,p,u,_,x){var v=t&V;if(!v&&typeof e!="function")throw new Dt(m);var C=i?i.length:0;if(C||(t&=~(A|B),i=p=s),_=_===s?_:Be(oe(_),0),x=x===s?x:oe(x),C-=p?p.length:0,t&B){var z=i,L=p;i=p=s}var j=v?s:bi(e),X=[e,t,r,i,p,z,L,u,_,x];if(j&&E_(X,j),e=X[0],t=X[1],r=X[2],i=X[3],p=X[4],x=X[9]=X[9]===s?v?0:e.length:Be(X[9]-C,0),!x&&t&(U|K)&&(t&=~(U|K)),!t||t==W)var ee=y_(e,t,r);else t==U||t==K?ee=__(e,t,x):(t==A||t==(W|A))&&!p.length?ee=f_(e,t,r,i):ee=Fa.apply(s,X);var ce=j?$l:hc;return wc(ce(ee,X),e,t)}function pc(e,t,r,i){return e===s||Rt(e,Xr[r])&&!Te.call(i,r)?t:e}function dc(e,t,r,i,p,u){return ze(e)&&ze(t)&&(u.set(t,e),Ma(e,t,s,dc,u),u.delete(t)),e}function b_(e){return Bs(e)?s:e}function mc(e,t,r,i,p,u){var _=r&S,x=e.length,v=t.length;if(x!=v&&!(_&&v>x))return!1;var C=u.get(e),z=u.get(t);if(C&&z)return C==t&&z==e;var L=-1,j=!0,X=r&R?new Ir:s;for(u.set(e,t),u.set(t,e);++L<x;){var ee=e[L],ce=t[L];if(i)var te=_?i(ce,ee,L,t,e,u):i(ee,ce,L,e,t,u);if(te!==s){if(te)continue;j=!1;break}if(X){if(!Fn(t,function(me,_e){if(!Is(X,_e)&&(ee===me||p(ee,me,r,i,u)))return X.push(_e)})){j=!1;break}}else if(!(ee===ce||p(ee,ce,r,i,u))){j=!1;break}}return u.delete(e),u.delete(t),j}function x_(e,t,r,i,p,u,_){switch(r){case or:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Lt:return!(e.byteLength!=t.byteLength||!u(new Ta(e),new Ta(t)));case Ut:case Wt:case Kt:return Rt(+e,+t);case Pr:return e.name==t.name&&e.message==t.message;case wr:case Gt:return e==t+"";case dt:var x=Hn;case mt:var v=i&S;if(x||(x=ga),e.size!=t.size&&!v)return!1;var C=_.get(e);if(C)return C==t;i|=R,_.set(e,t);var z=mc(x(e),x(t),i,p,u,_);return _.delete(e),z;case Fr:if(Ss)return Ss.call(e)==Ss.call(t)}return!1}function h_(e,t,r,i,p,u){var _=r&S,x=fi(e),v=x.length,C=fi(t),z=C.length;if(v!=z&&!_)return!1;for(var L=v;L--;){var j=x[L];if(!(_?j in t:Te.call(t,j)))return!1}var X=u.get(e),ee=u.get(t);if(X&&ee)return X==t&&ee==e;var ce=!0;u.set(e,t),u.set(t,e);for(var te=_;++L<v;){j=x[L];var me=e[j],_e=t[j];if(i)var gt=_?i(_e,me,j,t,e,u):i(me,_e,j,e,t,u);if(!(gt===s?me===_e||p(me,_e,r,i,u):gt)){ce=!1;break}te||(te=j=="constructor")}if(ce&&!te){var et=e.constructor,bt=t.constructor;et!=bt&&"constructor"in e&&"constructor"in t&&!(typeof et=="function"&&et instanceof et&&typeof bt=="function"&&bt instanceof bt)&&(ce=!1)}return u.delete(e),u.delete(t),ce}function Jt(e){return Di(bc(e,s,Ac),e+"")}function fi(e){return El(e,je,hi)}function gi(e){return El(e,it,uc)}var bi=Ca?function(e){return Ca.get(e)}:Oi;function $a(e){for(var t=e.name+"",r=Yr[t],i=Te.call(Yr,t)?r.length:0;i--;){var p=r[i],u=p.func;if(u==null||u==e)return p.name}return t}function es(e){var t=Te.call(d,"placeholder")?d:e;return t.placeholder}function Z(){var e=d.iteratee||Mi;return e=e===Mi?Ml:e,arguments.length?e(arguments[0],arguments[1]):e}function ja(e,t){var r=e.__data__;return q_(t)?r[typeof t=="string"?"string":"hash"]:r.map}function xi(e){for(var t=je(e),r=t.length;r--;){var i=t[r],p=e[i];t[r]=[i,p,fc(p)]}return t}function Cr(e,t){var r=Su(e,t);return Ll(r)?r:s}function w_(e){var t=Te.call(e,Dr),r=e[Dr];try{e[Dr]=s;var i=!0}catch{}var p=wa.call(e);return i&&(t?e[Dr]=r:delete e[Dr]),p}var hi=Gn?function(e){return e==null?[]:(e=De(e),lr(Gn(e),function(t){return xl.call(e,t)}))}:Ri,uc=Gn?function(e){for(var t=[];e;)cr(t,hi(e)),e=Da(e);return t}:Ri,Ye=Ze;(Xn&&Ye(new Xn(new ArrayBuffer(1)))!=or||qs&&Ye(new qs)!=dt||Vn&&Ye(Vn.resolve())!=_s||Vr&&Ye(new Vr)!=mt||Cs&&Ye(new Cs)!=ir)&&(Ye=function(e){var t=Ze(e),r=t==wt?e.constructor:s,i=r?zr(r):"";if(i)switch(i){case sy:return or;case ay:return dt;case ny:return _s;case iy:return mt;case oy:return ir}return t});function v_(e,t,r){for(var i=-1,p=r.length;++i<p;){var u=r[i],_=u.size;switch(u.type){case"drop":e+=_;break;case"dropRight":t-=_;break;case"take":t=Ve(t,e+_);break;case"takeRight":e=Be(e,t-_);break}}return{start:e,end:t}}function T_(e){var t=e.match(Cn);return t?t[1].split(g):[]}function yc(e,t,r){t=yr(t,e);for(var i=-1,p=t.length,u=!1;++i<p;){var _=Ht(t[i]);if(!(u=e!=null&&r(e,_)))break;e=e[_]}return u||++i!=p?u:(p=e==null?0:e.length,!!p&&Qa(p)&&er(_,p)&&(ne(e)||Sr(e)))}function D_(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Te.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function _c(e){return typeof e.constructor=="function"&&!Rs(e)?Qr(Da(e)):{}}function k_(e,t,r){var i=e.constructor;switch(t){case Lt:return ui(e);case Ut:case Wt:return new i(+e);case or:return l_(e,r);case Br:case Ur:case vr:case fs:case gs:case bs:case xs:case hs:case ws:return Ql(e,r);case dt:return new i;case Kt:case Gt:return new i(e);case wr:return c_(e);case mt:return new i;case Fr:return p_(e)}}function I_(e,t){var r=t.length;if(!r)return e;var i=r-1;return t[i]=(r>1?"& ":"")+t[i],t=t.join(r>2?", ":" "),e.replace(qn,`{
119
119
  /* [wrapped with `+t+`] */
120
- `)}function A_(e){return ne(e)||Sr(e)||!!(hl&&e&&e[hl])}function Jt(e,t){var r=typeof e;return t=t??Me,!!t&&(r=="number"||r!="symbol"&&Ne.test(e))&&e>-1&&e%1==0&&e<t}function Ze(e,t,r){if(!ze(r))return!1;var i=typeof t;return(i=="number"?at(r)&&Jt(t,r.length):i=="string"&&t in r)?Ot(r[t],e):!1}function wi(e,t){if(ne(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||_t(e)?!0:da.test(e)||!pa.test(e)||t!=null&&e in De(t)}function q_(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function vi(e){var t=$a(e),r=d[t];if(typeof r!="function"||!(t in ye.prototype))return!1;if(e===r)return!0;var i=bi(r);return!!i&&e===i[0]}function C_(e){return!!fl&&fl in e}var z_=xa?er:Fi;function Rs(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Xr;return e===r}function fc(e){return e===e&&!ze(e)}function gc(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==s||e in De(r))}}function S_(e){var t=Va(e,function(i){return r.size===b&&r.clear(),i}),r=t.cache;return t}function E_(e,t){var r=e[1],i=t[1],p=r|i,u=p<(H|Y|R),_=i==R&&r==K||i==R&&r==V&&e[7].length<=t[8]||i==(R|V)&&t[7].length<=t[8]&&r==K;if(!(u||_))return e;i&H&&(e[2]=t[2],p|=r&H?0:G);var x=t[3];if(x){var v=e[3];e[3]=v?Jl(v,x,t[4]):x,e[4]=v?pr(e[3],h):t[4]}return x=t[5],x&&(v=e[5],e[5]=v?ec(v,x,t[6]):x,e[6]=v?pr(e[5],h):t[6]),x=t[7],x&&(e[7]=x),i&R&&(e[8]=e[8]==null?t[8]:Ve(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=p,e}function N_(e){var t=[];if(e!=null)for(var r in De(e))t.push(r);return t}function L_(e){return wa.call(e)}function bc(e,t,r){return t=Be(t===s?e.length-1:t,0),function(){for(var i=arguments,p=-1,u=Be(i.length-t,0),_=D(u);++p<u;)_[p]=i[t+p];p=-1;for(var x=D(t+1);++p<t;)x[p]=i[p];return x[t]=r(_),mt(e,this,x)}}function xc(e,t){return t.length<2?e:qr(e,At(t,0,-1))}function M_(e,t){for(var r=e.length,i=Ve(t.length,r),p=st(e);i--;){var u=t[i];e[i]=Jt(u,r)?p[u]:s}return e}function Ti(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var hc=vc($l),Fs=Yu||function(e,t){return We.setTimeout(e,t)},Di=vc(a_);function wc(e,t,r){var i=t+"";return Di(e,I_(i,P_(T_(i),r)))}function vc(e){var t=0,r=0;return function(){var i=ey(),p=Ue-(i-r);if(r=i,p>0){if(++t>=St)return arguments[0]}else t=0;return e.apply(s,arguments)}}function Ha(e,t){var r=-1,i=e.length,p=i-1;for(t=t===s?i:t;++r<t;){var u=ii(r,p),_=e[u];e[u]=e[r],e[r]=_}return e.length=t,e}var Tc=S_(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(In,function(r,i,p,u){t.push(p?u.replace(te,"$1"):i||r)}),t});function jt(e){if(typeof e=="string"||_t(e))return e;var t=e+"";return t=="0"&&1/e==-Ee?"-0":t}function zr(e){if(e!=null){try{return ha.call(e)}catch{}try{return e+""}catch{}}return""}function P_(e,t){return Tt(ht,function(r){var i="_."+r[0];t&r[1]&&!_a(e,i)&&e.push(i)}),e.sort()}function Dc(e){if(e instanceof ye)return e.clone();var t=new kt(e.__wrapped__,e.__chain__);return t.__actions__=st(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function O_(e,t,r){(r?Ze(e,t,r):t===s)?t=1:t=Be(oe(t),0);var i=e==null?0:e.length;if(!i||t<1)return[];for(var p=0,u=0,_=D(Aa(i/t));p<i;)_[u++]=At(e,p,p+=t);return _}function R_(e){for(var t=-1,r=e==null?0:e.length,i=0,p=[];++t<r;){var u=e[t];u&&(p[i++]=u)}return p}function F_(){var e=arguments.length;if(!e)return[];for(var t=D(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return cr(ne(r)?st(r):[r],Ge(t,1))}var B_=pe(function(e,t){return Pe(e)?Ns(e,Ge(t,1,Pe,!0)):[]}),U_=pe(function(e,t){var r=qt(t);return Pe(r)&&(r=s),Pe(e)?Ns(e,Ge(t,1,Pe,!0),Q(r,2)):[]}),K_=pe(function(e,t){var r=qt(t);return Pe(r)&&(r=s),Pe(e)?Ns(e,Ge(t,1,Pe,!0),s,r):[]});function $_(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===s?1:oe(t),At(e,t<0?0:t,i)):[]}function j_(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===s?1:oe(t),t=i-t,At(e,0,t<0?0:t)):[]}function H_(e,t){return e&&e.length?Oa(e,Q(t,3),!0,!0):[]}function W_(e,t){return e&&e.length?Oa(e,Q(t,3),!0):[]}function G_(e,t,r,i){var p=e==null?0:e.length;return p?(r&&typeof r!="number"&&Ze(e,t,r)&&(r=0,i=p),Fy(e,t,r,i)):[]}function kc(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var p=r==null?0:oe(r);return p<0&&(p=Be(i+p,0)),fa(e,Q(t,3),p)}function Ic(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var p=i-1;return r!==s&&(p=oe(r),p=r<0?Be(i+p,0):Ve(p,i-1)),fa(e,Q(t,3),p,!0)}function Ac(e){var t=e==null?0:e.length;return t?Ge(e,1):[]}function X_(e){var t=e==null?0:e.length;return t?Ge(e,Ee):[]}function V_(e,t){var r=e==null?0:e.length;return r?(t=t===s?1:oe(t),Ge(e,t)):[]}function Y_(e){for(var t=-1,r=e==null?0:e.length,i={};++t<r;){var p=e[t];i[p[0]]=p[1]}return i}function qc(e){return e&&e.length?e[0]:s}function Q_(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var p=r==null?0:oe(r);return p<0&&(p=Be(i+p,0)),jr(e,t,p)}function Z_(e){var t=e==null?0:e.length;return t?At(e,0,-1):[]}var J_=pe(function(e){var t=qe(e,di);return t.length&&t[0]===e[0]?ti(t):[]}),ef=pe(function(e){var t=qt(e),r=qe(e,di);return t===qt(r)?t=s:r.pop(),r.length&&r[0]===e[0]?ti(r,Q(t,2)):[]}),tf=pe(function(e){var t=qt(e),r=qe(e,di);return t=typeof t=="function"?t:s,t&&r.pop(),r.length&&r[0]===e[0]?ti(r,s,t):[]});function rf(e,t){return e==null?"":Zu.call(e,t)}function qt(e){var t=e==null?0:e.length;return t?e[t-1]:s}function sf(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var p=i;return r!==s&&(p=oe(r),p=p<0?Be(i+p,0):Ve(p,i-1)),t===t?Pu(e,t,p):fa(e,ll,p,!0)}function af(e,t){return e&&e.length?Fl(e,oe(t)):s}var nf=pe(Cc);function Cc(e,t){return e&&e.length&&t&&t.length?ni(e,t):e}function of(e,t,r){return e&&e.length&&t&&t.length?ni(e,t,Q(r,2)):e}function lf(e,t,r){return e&&e.length&&t&&t.length?ni(e,t,s,r):e}var cf=Zt(function(e,t){var r=e==null?0:e.length,i=Qn(e,t);return Kl(e,qe(t,function(p){return Jt(p,r)?+p:p}).sort(Zl)),i});function pf(e,t){var r=[];if(!(e&&e.length))return r;var i=-1,p=[],u=e.length;for(t=Q(t,3);++i<u;){var _=e[i];t(_,i,e)&&(r.push(_),p.push(i))}return Kl(e,p),r}function ki(e){return e==null?e:ry.call(e)}function df(e,t,r){var i=e==null?0:e.length;return i?(r&&typeof r!="number"&&Ze(e,t,r)?(t=0,r=i):(t=t==null?0:oe(t),r=r===s?i:oe(r)),At(e,t,r)):[]}function mf(e,t){return Pa(e,t)}function uf(e,t,r){return li(e,t,Q(r,2))}function yf(e,t){var r=e==null?0:e.length;if(r){var i=Pa(e,t);if(i<r&&Ot(e[i],t))return i}return-1}function _f(e,t){return Pa(e,t,!0)}function ff(e,t,r){return li(e,t,Q(r,2),!0)}function gf(e,t){var r=e==null?0:e.length;if(r){var i=Pa(e,t,!0)-1;if(Ot(e[i],t))return i}return-1}function bf(e){return e&&e.length?jl(e):[]}function xf(e,t){return e&&e.length?jl(e,Q(t,2)):[]}function hf(e){var t=e==null?0:e.length;return t?At(e,1,t):[]}function wf(e,t,r){return e&&e.length?(t=r||t===s?1:oe(t),At(e,0,t<0?0:t)):[]}function vf(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===s?1:oe(t),t=i-t,At(e,t<0?0:t,i)):[]}function Tf(e,t){return e&&e.length?Oa(e,Q(t,3),!1,!0):[]}function Df(e,t){return e&&e.length?Oa(e,Q(t,3)):[]}var kf=pe(function(e){return ur(Ge(e,1,Pe,!0))}),If=pe(function(e){var t=qt(e);return Pe(t)&&(t=s),ur(Ge(e,1,Pe,!0),Q(t,2))}),Af=pe(function(e){var t=qt(e);return t=typeof t=="function"?t:s,ur(Ge(e,1,Pe,!0),s,t)});function qf(e){return e&&e.length?ur(e):[]}function Cf(e,t){return e&&e.length?ur(e,Q(t,2)):[]}function zf(e,t){return t=typeof t=="function"?t:s,e&&e.length?ur(e,s,t):[]}function Ii(e){if(!(e&&e.length))return[];var t=0;return e=lr(e,function(r){if(Pe(r))return t=Be(r.length,t),!0}),$n(t,function(r){return qe(e,Bn(r))})}function zc(e,t){if(!(e&&e.length))return[];var r=Ii(e);return t==null?r:qe(r,function(i){return mt(t,s,i)})}var Sf=pe(function(e,t){return Pe(e)?Ns(e,t):[]}),Ef=pe(function(e){return pi(lr(e,Pe))}),Nf=pe(function(e){var t=qt(e);return Pe(t)&&(t=s),pi(lr(e,Pe),Q(t,2))}),Lf=pe(function(e){var t=qt(e);return t=typeof t=="function"?t:s,pi(lr(e,Pe),s,t)}),Mf=pe(Ii);function Pf(e,t){return Xl(e||[],t||[],Es)}function Of(e,t){return Xl(e||[],t||[],Ps)}var Rf=pe(function(e){var t=e.length,r=t>1?e[t-1]:s;return r=typeof r=="function"?(e.pop(),r):s,zc(e,r)});function Sc(e){var t=d(e);return t.__chain__=!0,t}function Ff(e,t){return t(e),e}function Wa(e,t){return t(e)}var Bf=Zt(function(e){var t=e.length,r=t?e[0]:0,i=this.__wrapped__,p=function(u){return Qn(u,e)};return t>1||this.__actions__.length||!(i instanceof ye)||!Jt(r)?this.thru(p):(i=i.slice(r,+r+(t?1:0)),i.__actions__.push({func:Wa,args:[p],thisArg:s}),new kt(i,this.__chain__).thru(function(u){return t&&!u.length&&u.push(s),u}))});function Uf(){return Sc(this)}function Kf(){return new kt(this.value(),this.__chain__)}function $f(){this.__values__===s&&(this.__values__=Hc(this.value()));var e=this.__index__>=this.__values__.length,t=e?s:this.__values__[this.__index__++];return{done:e,value:t}}function jf(){return this}function Hf(e){for(var t,r=this;r instanceof Sa;){var i=Dc(r);i.__index__=0,i.__values__=s,t?p.__wrapped__=i:t=i;var p=i;r=r.__wrapped__}return p.__wrapped__=e,t}function Wf(){var e=this.__wrapped__;if(e instanceof ye){var t=e;return this.__actions__.length&&(t=new ye(this)),t=t.reverse(),t.__actions__.push({func:Wa,args:[ki],thisArg:s}),new kt(t,this.__chain__)}return this.thru(ki)}function Gf(){return Gl(this.__wrapped__,this.__actions__)}var Xf=Ra(function(e,t,r){Te.call(e,r)?++e[r]:Yt(e,r,1)});function Vf(e,t,r){var i=ne(e)?il:Ry;return r&&Ze(e,t,r)&&(t=s),i(e,Q(t,3))}function Yf(e,t){var r=ne(e)?lr:zl;return r(e,Q(t,3))}var Qf=ac(kc),Zf=ac(Ic);function Jf(e,t){return Ge(Ga(e,t),1)}function eg(e,t){return Ge(Ga(e,t),Ee)}function tg(e,t,r){return r=r===s?1:oe(r),Ge(Ga(e,t),r)}function Ec(e,t){var r=ne(e)?Tt:mr;return r(e,Q(t,3))}function Nc(e,t){var r=ne(e)?xu:Cl;return r(e,Q(t,3))}var rg=Ra(function(e,t,r){Te.call(e,r)?e[r].push(t):Yt(e,r,[t])});function sg(e,t,r,i){e=at(e)?e:rs(e),r=r&&!i?oe(r):0;var p=e.length;return r<0&&(r=Be(p+r,0)),Za(e)?r<=p&&e.indexOf(t,r)>-1:!!p&&jr(e,t,r)>-1}var ag=pe(function(e,t,r){var i=-1,p=typeof t=="function",u=at(e)?D(e.length):[];return mr(e,function(_){u[++i]=p?mt(t,_,r):Ls(_,t,r)}),u}),ng=Ra(function(e,t,r){Yt(e,r,t)});function Ga(e,t){var r=ne(e)?qe:Pl;return r(e,Q(t,3))}function ig(e,t,r,i){return e==null?[]:(ne(t)||(t=t==null?[]:[t]),r=i?s:r,ne(r)||(r=r==null?[]:[r]),Bl(e,t,r))}var og=Ra(function(e,t,r){e[r?0:1].push(t)},function(){return[[],[]]});function lg(e,t,r){var i=ne(e)?Rn:pl,p=arguments.length<3;return i(e,Q(t,4),r,p,mr)}function cg(e,t,r){var i=ne(e)?hu:pl,p=arguments.length<3;return i(e,Q(t,4),r,p,Cl)}function pg(e,t){var r=ne(e)?lr:zl;return r(e,Ya(Q(t,3)))}function dg(e){var t=ne(e)?kl:r_;return t(e)}function mg(e,t,r){(r?Ze(e,t,r):t===s)?t=1:t=oe(t);var i=ne(e)?Ny:s_;return i(e,t)}function ug(e){var t=ne(e)?Ly:n_;return t(e)}function yg(e){if(e==null)return 0;if(at(e))return Za(e)?Wr(e):e.length;var t=Ye(e);return t==pt||t==dt?e.size:si(e).length}function _g(e,t,r){var i=ne(e)?Fn:i_;return r&&Ze(e,t,r)&&(t=s),i(e,Q(t,3))}var fg=pe(function(e,t){if(e==null)return[];var r=t.length;return r>1&&Ze(e,t[0],t[1])?t=[]:r>2&&Ze(t[0],t[1],t[2])&&(t=[t[0]]),Bl(e,Ge(t,1),[])}),Xa=Vu||function(){return We.Date.now()};function gg(e,t){if(typeof t!="function")throw new Dt(m);return e=oe(e),function(){if(--e<1)return t.apply(this,arguments)}}function Lc(e,t,r){return t=r?s:t,t=e&&t==null?e.length:t,Qt(e,R,s,s,s,s,t)}function Mc(e,t){var r;if(typeof t!="function")throw new Dt(m);return e=oe(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=s),r}}var Ai=pe(function(e,t,r){var i=H;if(r.length){var p=pr(r,es(Ai));i|=A}return Qt(e,i,t,r,p)}),Pc=pe(function(e,t,r){var i=H|Y;if(r.length){var p=pr(r,es(Pc));i|=A}return Qt(t,i,e,r,p)});function Oc(e,t,r){t=r?s:t;var i=Qt(e,K,s,s,s,s,s,t);return i.placeholder=Oc.placeholder,i}function Rc(e,t,r){t=r?s:t;var i=Qt(e,U,s,s,s,s,s,t);return i.placeholder=Rc.placeholder,i}function Fc(e,t,r){var i,p,u,_,x,v,z=0,S=!1,L=!1,j=!0;if(typeof e!="function")throw new Dt(m);t=Ct(t)||0,ze(r)&&(S=!!r.leading,L="maxWait"in r,u=L?Be(Ct(r.maxWait)||0,t):u,j="trailing"in r?!!r.trailing:j);function X(Oe){var Rt=i,rr=p;return i=p=s,z=Oe,_=e.apply(rr,Rt),_}function J(Oe){return z=Oe,x=Fs(me,t),S?X(Oe):_}function ce(Oe){var Rt=Oe-v,rr=Oe-z,ap=t-Rt;return L?Ve(ap,u-rr):ap}function ee(Oe){var Rt=Oe-v,rr=Oe-z;return v===s||Rt>=t||Rt<0||L&&rr>=u}function me(){var Oe=Xa();if(ee(Oe))return _e(Oe);x=Fs(me,ce(Oe))}function _e(Oe){return x=s,j&&i?X(Oe):(i=p=s,_)}function ft(){x!==s&&Vl(x),z=0,i=v=p=x=s}function Je(){return x===s?_:_e(Xa())}function gt(){var Oe=Xa(),Rt=ee(Oe);if(i=arguments,p=this,v=Oe,Rt){if(x===s)return J(v);if(L)return Vl(x),x=Fs(me,t),X(v)}return x===s&&(x=Fs(me,t)),_}return gt.cancel=ft,gt.flush=Je,gt}var bg=pe(function(e,t){return ql(e,1,t)}),xg=pe(function(e,t,r){return ql(e,Ct(t)||0,r)});function hg(e){return Qt(e,re)}function Va(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new Dt(m);var r=function(){var i=arguments,p=t?t.apply(this,i):i[0],u=r.cache;if(u.has(p))return u.get(p);var _=e.apply(this,i);return r.cache=u.set(p,_)||u,_};return r.cache=new(Va.Cache||Vt),r}Va.Cache=Vt;function Ya(e){if(typeof e!="function")throw new Dt(m);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function wg(e){return Mc(2,e)}var vg=o_(function(e,t){t=t.length==1&&ne(t[0])?qe(t[0],ut(Q())):qe(Ge(t,1),ut(Q()));var r=t.length;return pe(function(i){for(var p=-1,u=Ve(i.length,r);++p<u;)i[p]=t[p].call(this,i[p]);return mt(e,this,i)})}),qi=pe(function(e,t){var r=pr(t,es(qi));return Qt(e,A,s,t,r)}),Bc=pe(function(e,t){var r=pr(t,es(Bc));return Qt(e,q,s,t,r)}),Tg=Zt(function(e,t){return Qt(e,V,s,s,s,t)});function Dg(e,t){if(typeof e!="function")throw new Dt(m);return t=t===s?t:oe(t),pe(e,t)}function kg(e,t){if(typeof e!="function")throw new Dt(m);return t=t==null?0:Be(oe(t),0),pe(function(r){var i=r[t],p=_r(r,0,t);return i&&cr(p,i),mt(e,this,p)})}function Ig(e,t,r){var i=!0,p=!0;if(typeof e!="function")throw new Dt(m);return ze(r)&&(i="leading"in r?!!r.leading:i,p="trailing"in r?!!r.trailing:p),Fc(e,t,{leading:i,maxWait:t,trailing:p})}function Ag(e){return Lc(e,1)}function qg(e,t){return qi(mi(t),e)}function Cg(){if(!arguments.length)return[];var e=arguments[0];return ne(e)?e:[e]}function zg(e){return It(e,B)}function Sg(e,t){return t=typeof t=="function"?t:s,It(e,B,t)}function Eg(e){return It(e,T|B)}function Ng(e,t){return t=typeof t=="function"?t:s,It(e,T|B,t)}function Lg(e,t){return t==null||Al(e,t,je(t))}function Ot(e,t){return e===t||e!==e&&t!==t}var Mg=Ka(ei),Pg=Ka(function(e,t){return e>=t}),Sr=Nl(function(){return arguments}())?Nl:function(e){return Le(e)&&Te.call(e,"callee")&&!xl.call(e,"callee")},ne=D.isArray,Og=el?ut(el):jy;function at(e){return e!=null&&Qa(e.length)&&!er(e)}function Pe(e){return Le(e)&&at(e)}function Rg(e){return e===!0||e===!1||Le(e)&&Qe(e)==Bt}var fr=Qu||Fi,Fg=tl?ut(tl):Hy;function Bg(e){return Le(e)&&e.nodeType===1&&!Bs(e)}function Ug(e){if(e==null)return!0;if(at(e)&&(ne(e)||typeof e=="string"||typeof e.splice=="function"||fr(e)||ts(e)||Sr(e)))return!e.length;var t=Ye(e);if(t==pt||t==dt)return!e.size;if(Rs(e))return!si(e).length;for(var r in e)if(Te.call(e,r))return!1;return!0}function Kg(e,t){return Ms(e,t)}function $g(e,t,r){r=typeof r=="function"?r:s;var i=r?r(e,t):s;return i===s?Ms(e,t,s,r):!!i}function Ci(e){if(!Le(e))return!1;var t=Qe(e);return t==Pr||t==Mr||typeof e.message=="string"&&typeof e.name=="string"&&!Bs(e)}function jg(e){return typeof e=="number"&&wl(e)}function er(e){if(!ze(e))return!1;var t=Qe(e);return t==hr||t==aa||t==ys||t==Rr}function Uc(e){return typeof e=="number"&&e==oe(e)}function Qa(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Me}function ze(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Le(e){return e!=null&&typeof e=="object"}var Kc=rl?ut(rl):Gy;function Hg(e,t){return e===t||ri(e,t,xi(t))}function Wg(e,t,r){return r=typeof r=="function"?r:s,ri(e,t,xi(t),r)}function Gg(e){return $c(e)&&e!=+e}function Xg(e){if(z_(e))throw new ae(l);return Ll(e)}function Vg(e){return e===null}function Yg(e){return e==null}function $c(e){return typeof e=="number"||Le(e)&&Qe(e)==Ut}function Bs(e){if(!Le(e)||Qe(e)!=wt)return!1;var t=Da(e);if(t===null)return!0;var r=Te.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&ha.call(r)==Hu}var zi=sl?ut(sl):Xy;function Qg(e){return Uc(e)&&e>=-Me&&e<=Me}var jc=al?ut(al):Vy;function Za(e){return typeof e=="string"||!ne(e)&&Le(e)&&Qe(e)==Wt}function _t(e){return typeof e=="symbol"||Le(e)&&Qe(e)==Fr}var ts=nl?ut(nl):Yy;function Zg(e){return e===s}function Jg(e){return Le(e)&&Ye(e)==ir}function eb(e){return Le(e)&&Qe(e)==na}var tb=Ka(ai),rb=Ka(function(e,t){return e<=t});function Hc(e){if(!e)return[];if(at(e))return Za(e)?Mt(e):st(e);if(As&&e[As])return Nu(e[As]());var t=Ye(e),r=t==pt?Hn:t==dt?ga:rs;return r(e)}function tr(e){if(!e)return e===0?e:0;if(e=Ct(e),e===Ee||e===-Ee){var t=e<0?-1:1;return t*ct}return e===e?e:0}function oe(e){var t=tr(e),r=t%1;return t===t?r?t-r:t:0}function Wc(e){return e?Ar(oe(e),0,se):0}function Ct(e){if(typeof e=="number")return e;if(_t(e))return Et;if(ze(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ze(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=dl(e);var r=de.test(e);return r||Ce.test(e)?fu(e.slice(2),r?2:8):ue.test(e)?Et:+e}function Gc(e){return $t(e,nt(e))}function sb(e){return e?Ar(oe(e),-Me,Me):e===0?e:0}function ve(e){return e==null?"":yt(e)}var ab=Zr(function(e,t){if(Rs(t)||at(t)){$t(t,je(t),e);return}for(var r in t)Te.call(t,r)&&Es(e,r,t[r])}),Xc=Zr(function(e,t){$t(t,nt(t),e)}),Ja=Zr(function(e,t,r,i){$t(t,nt(t),e,i)}),nb=Zr(function(e,t,r,i){$t(t,je(t),e,i)}),ib=Zt(Qn);function ob(e,t){var r=Qr(e);return t==null?r:Il(r,t)}var lb=pe(function(e,t){e=De(e);var r=-1,i=t.length,p=i>2?t[2]:s;for(p&&Ze(t[0],t[1],p)&&(i=1);++r<i;)for(var u=t[r],_=nt(u),x=-1,v=_.length;++x<v;){var z=_[x],S=e[z];(S===s||Ot(S,Xr[z])&&!Te.call(e,z))&&(e[z]=u[z])}return e}),cb=pe(function(e){return e.push(s,dc),mt(Vc,s,e)});function pb(e,t){return ol(e,Q(t,3),Kt)}function db(e,t){return ol(e,Q(t,3),Jn)}function mb(e,t){return e==null?e:Zn(e,Q(t,3),nt)}function ub(e,t){return e==null?e:Sl(e,Q(t,3),nt)}function yb(e,t){return e&&Kt(e,Q(t,3))}function _b(e,t){return e&&Jn(e,Q(t,3))}function fb(e){return e==null?[]:La(e,je(e))}function gb(e){return e==null?[]:La(e,nt(e))}function Si(e,t,r){var i=e==null?s:qr(e,t);return i===s?r:i}function bb(e,t){return e!=null&&yc(e,t,By)}function Ei(e,t){return e!=null&&yc(e,t,Uy)}var xb=ic(function(e,t,r){t!=null&&typeof t.toString!="function"&&(t=wa.call(t)),e[t]=r},Li(it)),hb=ic(function(e,t,r){t!=null&&typeof t.toString!="function"&&(t=wa.call(t)),Te.call(e,t)?e[t].push(r):e[t]=[r]},Q),wb=pe(Ls);function je(e){return at(e)?Dl(e):si(e)}function nt(e){return at(e)?Dl(e,!0):Qy(e)}function vb(e,t){var r={};return t=Q(t,3),Kt(e,function(i,p,u){Yt(r,t(i,p,u),i)}),r}function Tb(e,t){var r={};return t=Q(t,3),Kt(e,function(i,p,u){Yt(r,p,t(i,p,u))}),r}var Db=Zr(function(e,t,r){Ma(e,t,r)}),Vc=Zr(function(e,t,r,i){Ma(e,t,r,i)}),kb=Zt(function(e,t){var r={};if(e==null)return r;var i=!1;t=qe(t,function(u){return u=yr(u,e),i||(i=u.length>1),u}),$t(e,gi(e),r),i&&(r=It(r,T|N|B,b_));for(var p=t.length;p--;)ci(r,t[p]);return r});function Ib(e,t){return Yc(e,Ya(Q(t)))}var Ab=Zt(function(e,t){return e==null?{}:Jy(e,t)});function Yc(e,t){if(e==null)return{};var r=qe(gi(e),function(i){return[i]});return t=Q(t),Ul(e,r,function(i,p){return t(i,p[0])})}function qb(e,t,r){t=yr(t,e);var i=-1,p=t.length;for(p||(p=1,e=s);++i<p;){var u=e==null?s:e[jt(t[i])];u===s&&(i=p,u=r),e=er(u)?u.call(e):u}return e}function Cb(e,t,r){return e==null?e:Ps(e,t,r)}function zb(e,t,r,i){return i=typeof i=="function"?i:s,e==null?e:Ps(e,t,r,i)}var Qc=cc(je),Zc=cc(nt);function Sb(e,t,r){var i=ne(e),p=i||fr(e)||ts(e);if(t=Q(t,4),r==null){var u=e&&e.constructor;p?r=i?new u:[]:ze(e)?r=er(u)?Qr(Da(e)):{}:r={}}return(p?Tt:Kt)(e,function(_,x,v){return t(r,_,x,v)}),r}function Eb(e,t){return e==null?!0:ci(e,t)}function Nb(e,t,r){return e==null?e:Wl(e,t,mi(r))}function Lb(e,t,r,i){return i=typeof i=="function"?i:s,e==null?e:Wl(e,t,mi(r),i)}function rs(e){return e==null?[]:jn(e,je(e))}function Mb(e){return e==null?[]:jn(e,nt(e))}function Pb(e,t,r){return r===s&&(r=t,t=s),r!==s&&(r=Ct(r),r=r===r?r:0),t!==s&&(t=Ct(t),t=t===t?t:0),Ar(Ct(e),t,r)}function Ob(e,t,r){return t=tr(t),r===s?(r=t,t=0):r=tr(r),e=Ct(e),Ky(e,t,r)}function Rb(e,t,r){if(r&&typeof r!="boolean"&&Ze(e,t,r)&&(t=r=s),r===s&&(typeof t=="boolean"?(r=t,t=s):typeof e=="boolean"&&(r=e,e=s)),e===s&&t===s?(e=0,t=1):(e=tr(e),t===s?(t=e,e=0):t=tr(t)),e>t){var i=e;e=t,t=i}if(r||e%1||t%1){var p=vl();return Ve(e+p*(t-e+_u("1e-"+((p+"").length-1))),t)}return ii(e,t)}var Fb=Jr(function(e,t,r){return t=t.toLowerCase(),e+(r?Jc(t):t)});function Jc(e){return Ni(ve(e).toLowerCase())}function ep(e){return e=ve(e),e&&e.replace(tt,qu).replace(nu,"")}function Bb(e,t,r){e=ve(e),t=yt(t);var i=e.length;r=r===s?i:Ar(oe(r),0,i);var p=r;return r-=t.length,r>=0&&e.slice(r,p)==t}function Ub(e){return e=ve(e),e&&oa.test(e)?e.replace(Kr,Cu):e}function Kb(e){return e=ve(e),e&&ma.test(e)?e.replace(Ds,"\\$&"):e}var $b=Jr(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()}),jb=Jr(function(e,t,r){return e+(r?" ":"")+t.toLowerCase()}),Hb=sc("toLowerCase");function Wb(e,t,r){e=ve(e),t=oe(t);var i=t?Wr(e):0;if(!t||i>=t)return e;var p=(t-i)/2;return Ua(qa(p),r)+e+Ua(Aa(p),r)}function Gb(e,t,r){e=ve(e),t=oe(t);var i=t?Wr(e):0;return t&&i<t?e+Ua(t-i,r):e}function Xb(e,t,r){e=ve(e),t=oe(t);var i=t?Wr(e):0;return t&&i<t?Ua(t-i,r)+e:e}function Vb(e,t,r){return r||t==null?t=0:t&&(t=+t),ty(ve(e).replace(ks,""),t||0)}function Yb(e,t,r){return(r?Ze(e,t,r):t===s)?t=1:t=oe(t),oi(ve(e),t)}function Qb(){var e=arguments,t=ve(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var Zb=Jr(function(e,t,r){return e+(r?"_":"")+t.toLowerCase()});function Jb(e,t,r){return r&&typeof r!="number"&&Ze(e,t,r)&&(t=r=s),r=r===s?se:r>>>0,r?(e=ve(e),e&&(typeof t=="string"||t!=null&&!zi(t))&&(t=yt(t),!t&&Hr(e))?_r(Mt(e),0,r):e.split(t,r)):[]}var ex=Jr(function(e,t,r){return e+(r?" ":"")+Ni(t)});function tx(e,t,r){return e=ve(e),r=r==null?0:Ar(oe(r),0,e.length),t=yt(t),e.slice(r,r+t.length)==t}function rx(e,t,r){var i=d.templateSettings;r&&Ze(e,t,r)&&(t=s),e=ve(e),t=Ja({},t,i,pc);var p=Ja({},t.imports,i.imports,pc),u=je(p),_=jn(p,u),x,v,z=0,S=t.interpolate||Lt,L="__p += '",j=Wn((t.escape||Lt).source+"|"+S.source+"|"+(S===ca?fe:Lt).source+"|"+(t.evaluate||Lt).source+"|$","g"),X="//# sourceURL="+(Te.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++pu+"]")+`
121
- `;e.replace(j,function(ee,me,_e,ft,Je,gt){return _e||(_e=ft),L+=e.slice(z,gt).replace(ua,zu),me&&(x=!0,L+=`' +
120
+ `)}function A_(e){return ne(e)||Sr(e)||!!(hl&&e&&e[hl])}function er(e,t){var r=typeof e;return t=t??Me,!!t&&(r=="number"||r!="symbol"&&Ne.test(e))&&e>-1&&e%1==0&&e<t}function Je(e,t,r){if(!ze(r))return!1;var i=typeof t;return(i=="number"?nt(r)&&er(t,r.length):i=="string"&&t in r)?Rt(r[t],e):!1}function wi(e,t){if(ne(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ft(e)?!0:da.test(e)||!pa.test(e)||t!=null&&e in De(t)}function q_(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function vi(e){var t=$a(e),r=d[t];if(typeof r!="function"||!(t in ye.prototype))return!1;if(e===r)return!0;var i=bi(r);return!!i&&e===i[0]}function C_(e){return!!fl&&fl in e}var z_=xa?tr:Fi;function Rs(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Xr;return e===r}function fc(e){return e===e&&!ze(e)}function gc(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==s||e in De(r))}}function S_(e){var t=Va(e,function(i){return r.size===b&&r.clear(),i}),r=t.cache;return t}function E_(e,t){var r=e[1],i=t[1],p=r|i,u=p<(W|V|E),_=i==E&&r==U||i==E&&r==H&&e[7].length<=t[8]||i==(E|H)&&t[7].length<=t[8]&&r==U;if(!(u||_))return e;i&W&&(e[2]=t[2],p|=r&W?0:Y);var x=t[3];if(x){var v=e[3];e[3]=v?Jl(v,x,t[4]):x,e[4]=v?pr(e[3],h):t[4]}return x=t[5],x&&(v=e[5],e[5]=v?ec(v,x,t[6]):x,e[6]=v?pr(e[5],h):t[6]),x=t[7],x&&(e[7]=x),i&E&&(e[8]=e[8]==null?t[8]:Ve(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=p,e}function N_(e){var t=[];if(e!=null)for(var r in De(e))t.push(r);return t}function L_(e){return wa.call(e)}function bc(e,t,r){return t=Be(t===s?e.length-1:t,0),function(){for(var i=arguments,p=-1,u=Be(i.length-t,0),_=D(u);++p<u;)_[p]=i[t+p];p=-1;for(var x=D(t+1);++p<t;)x[p]=i[p];return x[t]=r(_),ut(e,this,x)}}function xc(e,t){return t.length<2?e:qr(e,At(t,0,-1))}function M_(e,t){for(var r=e.length,i=Ve(t.length,r),p=at(e);i--;){var u=t[i];e[i]=er(u,r)?p[u]:s}return e}function Ti(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var hc=vc($l),Fs=Yu||function(e,t){return We.setTimeout(e,t)},Di=vc(a_);function wc(e,t,r){var i=t+"";return Di(e,I_(i,P_(T_(i),r)))}function vc(e){var t=0,r=0;return function(){var i=ey(),p=Ue-(i-r);if(r=i,p>0){if(++t>=St)return arguments[0]}else t=0;return e.apply(s,arguments)}}function Ha(e,t){var r=-1,i=e.length,p=i-1;for(t=t===s?i:t;++r<t;){var u=ii(r,p),_=e[u];e[u]=e[r],e[r]=_}return e.length=t,e}var Tc=S_(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(In,function(r,i,p,u){t.push(p?u.replace(re,"$1"):i||r)}),t});function Ht(e){if(typeof e=="string"||ft(e))return e;var t=e+"";return t=="0"&&1/e==-Ee?"-0":t}function zr(e){if(e!=null){try{return ha.call(e)}catch{}try{return e+""}catch{}}return""}function P_(e,t){return Tt(Et,function(r){var i="_."+r[0];t&r[1]&&!_a(e,i)&&e.push(i)}),e.sort()}function Dc(e){if(e instanceof ye)return e.clone();var t=new kt(e.__wrapped__,e.__chain__);return t.__actions__=at(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function O_(e,t,r){(r?Je(e,t,r):t===s)?t=1:t=Be(oe(t),0);var i=e==null?0:e.length;if(!i||t<1)return[];for(var p=0,u=0,_=D(Aa(i/t));p<i;)_[u++]=At(e,p,p+=t);return _}function R_(e){for(var t=-1,r=e==null?0:e.length,i=0,p=[];++t<r;){var u=e[t];u&&(p[i++]=u)}return p}function F_(){var e=arguments.length;if(!e)return[];for(var t=D(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return cr(ne(r)?at(r):[r],Ge(t,1))}var B_=pe(function(e,t){return Oe(e)?Ns(e,Ge(t,1,Oe,!0)):[]}),U_=pe(function(e,t){var r=qt(t);return Oe(r)&&(r=s),Oe(e)?Ns(e,Ge(t,1,Oe,!0),Z(r,2)):[]}),K_=pe(function(e,t){var r=qt(t);return Oe(r)&&(r=s),Oe(e)?Ns(e,Ge(t,1,Oe,!0),s,r):[]});function $_(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===s?1:oe(t),At(e,t<0?0:t,i)):[]}function j_(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===s?1:oe(t),t=i-t,At(e,0,t<0?0:t)):[]}function H_(e,t){return e&&e.length?Oa(e,Z(t,3),!0,!0):[]}function W_(e,t){return e&&e.length?Oa(e,Z(t,3),!0):[]}function G_(e,t,r,i){var p=e==null?0:e.length;return p?(r&&typeof r!="number"&&Je(e,t,r)&&(r=0,i=p),Fy(e,t,r,i)):[]}function kc(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var p=r==null?0:oe(r);return p<0&&(p=Be(i+p,0)),fa(e,Z(t,3),p)}function Ic(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var p=i-1;return r!==s&&(p=oe(r),p=r<0?Be(i+p,0):Ve(p,i-1)),fa(e,Z(t,3),p,!0)}function Ac(e){var t=e==null?0:e.length;return t?Ge(e,1):[]}function X_(e){var t=e==null?0:e.length;return t?Ge(e,Ee):[]}function V_(e,t){var r=e==null?0:e.length;return r?(t=t===s?1:oe(t),Ge(e,t)):[]}function Y_(e){for(var t=-1,r=e==null?0:e.length,i={};++t<r;){var p=e[t];i[p[0]]=p[1]}return i}function qc(e){return e&&e.length?e[0]:s}function Q_(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var p=r==null?0:oe(r);return p<0&&(p=Be(i+p,0)),jr(e,t,p)}function Z_(e){var t=e==null?0:e.length;return t?At(e,0,-1):[]}var J_=pe(function(e){var t=qe(e,di);return t.length&&t[0]===e[0]?ti(t):[]}),ef=pe(function(e){var t=qt(e),r=qe(e,di);return t===qt(r)?t=s:r.pop(),r.length&&r[0]===e[0]?ti(r,Z(t,2)):[]}),tf=pe(function(e){var t=qt(e),r=qe(e,di);return t=typeof t=="function"?t:s,t&&r.pop(),r.length&&r[0]===e[0]?ti(r,s,t):[]});function rf(e,t){return e==null?"":Zu.call(e,t)}function qt(e){var t=e==null?0:e.length;return t?e[t-1]:s}function sf(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var p=i;return r!==s&&(p=oe(r),p=p<0?Be(i+p,0):Ve(p,i-1)),t===t?Pu(e,t,p):fa(e,ll,p,!0)}function af(e,t){return e&&e.length?Fl(e,oe(t)):s}var nf=pe(Cc);function Cc(e,t){return e&&e.length&&t&&t.length?ni(e,t):e}function of(e,t,r){return e&&e.length&&t&&t.length?ni(e,t,Z(r,2)):e}function lf(e,t,r){return e&&e.length&&t&&t.length?ni(e,t,s,r):e}var cf=Jt(function(e,t){var r=e==null?0:e.length,i=Qn(e,t);return Kl(e,qe(t,function(p){return er(p,r)?+p:p}).sort(Zl)),i});function pf(e,t){var r=[];if(!(e&&e.length))return r;var i=-1,p=[],u=e.length;for(t=Z(t,3);++i<u;){var _=e[i];t(_,i,e)&&(r.push(_),p.push(i))}return Kl(e,p),r}function ki(e){return e==null?e:ry.call(e)}function df(e,t,r){var i=e==null?0:e.length;return i?(r&&typeof r!="number"&&Je(e,t,r)?(t=0,r=i):(t=t==null?0:oe(t),r=r===s?i:oe(r)),At(e,t,r)):[]}function mf(e,t){return Pa(e,t)}function uf(e,t,r){return li(e,t,Z(r,2))}function yf(e,t){var r=e==null?0:e.length;if(r){var i=Pa(e,t);if(i<r&&Rt(e[i],t))return i}return-1}function _f(e,t){return Pa(e,t,!0)}function ff(e,t,r){return li(e,t,Z(r,2),!0)}function gf(e,t){var r=e==null?0:e.length;if(r){var i=Pa(e,t,!0)-1;if(Rt(e[i],t))return i}return-1}function bf(e){return e&&e.length?jl(e):[]}function xf(e,t){return e&&e.length?jl(e,Z(t,2)):[]}function hf(e){var t=e==null?0:e.length;return t?At(e,1,t):[]}function wf(e,t,r){return e&&e.length?(t=r||t===s?1:oe(t),At(e,0,t<0?0:t)):[]}function vf(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===s?1:oe(t),t=i-t,At(e,t<0?0:t,i)):[]}function Tf(e,t){return e&&e.length?Oa(e,Z(t,3),!1,!0):[]}function Df(e,t){return e&&e.length?Oa(e,Z(t,3)):[]}var kf=pe(function(e){return ur(Ge(e,1,Oe,!0))}),If=pe(function(e){var t=qt(e);return Oe(t)&&(t=s),ur(Ge(e,1,Oe,!0),Z(t,2))}),Af=pe(function(e){var t=qt(e);return t=typeof t=="function"?t:s,ur(Ge(e,1,Oe,!0),s,t)});function qf(e){return e&&e.length?ur(e):[]}function Cf(e,t){return e&&e.length?ur(e,Z(t,2)):[]}function zf(e,t){return t=typeof t=="function"?t:s,e&&e.length?ur(e,s,t):[]}function Ii(e){if(!(e&&e.length))return[];var t=0;return e=lr(e,function(r){if(Oe(r))return t=Be(r.length,t),!0}),$n(t,function(r){return qe(e,Bn(r))})}function zc(e,t){if(!(e&&e.length))return[];var r=Ii(e);return t==null?r:qe(r,function(i){return ut(t,s,i)})}var Sf=pe(function(e,t){return Oe(e)?Ns(e,t):[]}),Ef=pe(function(e){return pi(lr(e,Oe))}),Nf=pe(function(e){var t=qt(e);return Oe(t)&&(t=s),pi(lr(e,Oe),Z(t,2))}),Lf=pe(function(e){var t=qt(e);return t=typeof t=="function"?t:s,pi(lr(e,Oe),s,t)}),Mf=pe(Ii);function Pf(e,t){return Xl(e||[],t||[],Es)}function Of(e,t){return Xl(e||[],t||[],Ps)}var Rf=pe(function(e){var t=e.length,r=t>1?e[t-1]:s;return r=typeof r=="function"?(e.pop(),r):s,zc(e,r)});function Sc(e){var t=d(e);return t.__chain__=!0,t}function Ff(e,t){return t(e),e}function Wa(e,t){return t(e)}var Bf=Jt(function(e){var t=e.length,r=t?e[0]:0,i=this.__wrapped__,p=function(u){return Qn(u,e)};return t>1||this.__actions__.length||!(i instanceof ye)||!er(r)?this.thru(p):(i=i.slice(r,+r+(t?1:0)),i.__actions__.push({func:Wa,args:[p],thisArg:s}),new kt(i,this.__chain__).thru(function(u){return t&&!u.length&&u.push(s),u}))});function Uf(){return Sc(this)}function Kf(){return new kt(this.value(),this.__chain__)}function $f(){this.__values__===s&&(this.__values__=Hc(this.value()));var e=this.__index__>=this.__values__.length,t=e?s:this.__values__[this.__index__++];return{done:e,value:t}}function jf(){return this}function Hf(e){for(var t,r=this;r instanceof Sa;){var i=Dc(r);i.__index__=0,i.__values__=s,t?p.__wrapped__=i:t=i;var p=i;r=r.__wrapped__}return p.__wrapped__=e,t}function Wf(){var e=this.__wrapped__;if(e instanceof ye){var t=e;return this.__actions__.length&&(t=new ye(this)),t=t.reverse(),t.__actions__.push({func:Wa,args:[ki],thisArg:s}),new kt(t,this.__chain__)}return this.thru(ki)}function Gf(){return Gl(this.__wrapped__,this.__actions__)}var Xf=Ra(function(e,t,r){Te.call(e,r)?++e[r]:Qt(e,r,1)});function Vf(e,t,r){var i=ne(e)?il:Ry;return r&&Je(e,t,r)&&(t=s),i(e,Z(t,3))}function Yf(e,t){var r=ne(e)?lr:zl;return r(e,Z(t,3))}var Qf=ac(kc),Zf=ac(Ic);function Jf(e,t){return Ge(Ga(e,t),1)}function eg(e,t){return Ge(Ga(e,t),Ee)}function tg(e,t,r){return r=r===s?1:oe(r),Ge(Ga(e,t),r)}function Ec(e,t){var r=ne(e)?Tt:mr;return r(e,Z(t,3))}function Nc(e,t){var r=ne(e)?xu:Cl;return r(e,Z(t,3))}var rg=Ra(function(e,t,r){Te.call(e,r)?e[r].push(t):Qt(e,r,[t])});function sg(e,t,r,i){e=nt(e)?e:rs(e),r=r&&!i?oe(r):0;var p=e.length;return r<0&&(r=Be(p+r,0)),Za(e)?r<=p&&e.indexOf(t,r)>-1:!!p&&jr(e,t,r)>-1}var ag=pe(function(e,t,r){var i=-1,p=typeof t=="function",u=nt(e)?D(e.length):[];return mr(e,function(_){u[++i]=p?ut(t,_,r):Ls(_,t,r)}),u}),ng=Ra(function(e,t,r){Qt(e,r,t)});function Ga(e,t){var r=ne(e)?qe:Pl;return r(e,Z(t,3))}function ig(e,t,r,i){return e==null?[]:(ne(t)||(t=t==null?[]:[t]),r=i?s:r,ne(r)||(r=r==null?[]:[r]),Bl(e,t,r))}var og=Ra(function(e,t,r){e[r?0:1].push(t)},function(){return[[],[]]});function lg(e,t,r){var i=ne(e)?Rn:pl,p=arguments.length<3;return i(e,Z(t,4),r,p,mr)}function cg(e,t,r){var i=ne(e)?hu:pl,p=arguments.length<3;return i(e,Z(t,4),r,p,Cl)}function pg(e,t){var r=ne(e)?lr:zl;return r(e,Ya(Z(t,3)))}function dg(e){var t=ne(e)?kl:r_;return t(e)}function mg(e,t,r){(r?Je(e,t,r):t===s)?t=1:t=oe(t);var i=ne(e)?Ny:s_;return i(e,t)}function ug(e){var t=ne(e)?Ly:n_;return t(e)}function yg(e){if(e==null)return 0;if(nt(e))return Za(e)?Wr(e):e.length;var t=Ye(e);return t==dt||t==mt?e.size:si(e).length}function _g(e,t,r){var i=ne(e)?Fn:i_;return r&&Je(e,t,r)&&(t=s),i(e,Z(t,3))}var fg=pe(function(e,t){if(e==null)return[];var r=t.length;return r>1&&Je(e,t[0],t[1])?t=[]:r>2&&Je(t[0],t[1],t[2])&&(t=[t[0]]),Bl(e,Ge(t,1),[])}),Xa=Vu||function(){return We.Date.now()};function gg(e,t){if(typeof t!="function")throw new Dt(m);return e=oe(e),function(){if(--e<1)return t.apply(this,arguments)}}function Lc(e,t,r){return t=r?s:t,t=e&&t==null?e.length:t,Zt(e,E,s,s,s,s,t)}function Mc(e,t){var r;if(typeof t!="function")throw new Dt(m);return e=oe(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=s),r}}var Ai=pe(function(e,t,r){var i=W;if(r.length){var p=pr(r,es(Ai));i|=A}return Zt(e,i,t,r,p)}),Pc=pe(function(e,t,r){var i=W|V;if(r.length){var p=pr(r,es(Pc));i|=A}return Zt(t,i,e,r,p)});function Oc(e,t,r){t=r?s:t;var i=Zt(e,U,s,s,s,s,s,t);return i.placeholder=Oc.placeholder,i}function Rc(e,t,r){t=r?s:t;var i=Zt(e,K,s,s,s,s,s,t);return i.placeholder=Rc.placeholder,i}function Fc(e,t,r){var i,p,u,_,x,v,C=0,z=!1,L=!1,j=!0;if(typeof e!="function")throw new Dt(m);t=Ct(t)||0,ze(r)&&(z=!!r.leading,L="maxWait"in r,u=L?Be(Ct(r.maxWait)||0,t):u,j="trailing"in r?!!r.trailing:j);function X(Re){var Ft=i,sr=p;return i=p=s,C=Re,_=e.apply(sr,Ft),_}function ee(Re){return C=Re,x=Fs(me,t),z?X(Re):_}function ce(Re){var Ft=Re-v,sr=Re-C,ap=t-Ft;return L?Ve(ap,u-sr):ap}function te(Re){var Ft=Re-v,sr=Re-C;return v===s||Ft>=t||Ft<0||L&&sr>=u}function me(){var Re=Xa();if(te(Re))return _e(Re);x=Fs(me,ce(Re))}function _e(Re){return x=s,j&&i?X(Re):(i=p=s,_)}function gt(){x!==s&&Vl(x),C=0,i=v=p=x=s}function et(){return x===s?_:_e(Xa())}function bt(){var Re=Xa(),Ft=te(Re);if(i=arguments,p=this,v=Re,Ft){if(x===s)return ee(v);if(L)return Vl(x),x=Fs(me,t),X(v)}return x===s&&(x=Fs(me,t)),_}return bt.cancel=gt,bt.flush=et,bt}var bg=pe(function(e,t){return ql(e,1,t)}),xg=pe(function(e,t,r){return ql(e,Ct(t)||0,r)});function hg(e){return Zt(e,Q)}function Va(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new Dt(m);var r=function(){var i=arguments,p=t?t.apply(this,i):i[0],u=r.cache;if(u.has(p))return u.get(p);var _=e.apply(this,i);return r.cache=u.set(p,_)||u,_};return r.cache=new(Va.Cache||Yt),r}Va.Cache=Yt;function Ya(e){if(typeof e!="function")throw new Dt(m);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function wg(e){return Mc(2,e)}var vg=o_(function(e,t){t=t.length==1&&ne(t[0])?qe(t[0],yt(Z())):qe(Ge(t,1),yt(Z()));var r=t.length;return pe(function(i){for(var p=-1,u=Ve(i.length,r);++p<u;)i[p]=t[p].call(this,i[p]);return ut(e,this,i)})}),qi=pe(function(e,t){var r=pr(t,es(qi));return Zt(e,A,s,t,r)}),Bc=pe(function(e,t){var r=pr(t,es(Bc));return Zt(e,B,s,t,r)}),Tg=Jt(function(e,t){return Zt(e,H,s,s,s,t)});function Dg(e,t){if(typeof e!="function")throw new Dt(m);return t=t===s?t:oe(t),pe(e,t)}function kg(e,t){if(typeof e!="function")throw new Dt(m);return t=t==null?0:Be(oe(t),0),pe(function(r){var i=r[t],p=_r(r,0,t);return i&&cr(p,i),ut(e,this,p)})}function Ig(e,t,r){var i=!0,p=!0;if(typeof e!="function")throw new Dt(m);return ze(r)&&(i="leading"in r?!!r.leading:i,p="trailing"in r?!!r.trailing:p),Fc(e,t,{leading:i,maxWait:t,trailing:p})}function Ag(e){return Lc(e,1)}function qg(e,t){return qi(mi(t),e)}function Cg(){if(!arguments.length)return[];var e=arguments[0];return ne(e)?e:[e]}function zg(e){return It(e,F)}function Sg(e,t){return t=typeof t=="function"?t:s,It(e,F,t)}function Eg(e){return It(e,T|F)}function Ng(e,t){return t=typeof t=="function"?t:s,It(e,T|F,t)}function Lg(e,t){return t==null||Al(e,t,je(t))}function Rt(e,t){return e===t||e!==e&&t!==t}var Mg=Ka(ei),Pg=Ka(function(e,t){return e>=t}),Sr=Nl(function(){return arguments}())?Nl:function(e){return Le(e)&&Te.call(e,"callee")&&!xl.call(e,"callee")},ne=D.isArray,Og=el?yt(el):jy;function nt(e){return e!=null&&Qa(e.length)&&!tr(e)}function Oe(e){return Le(e)&&nt(e)}function Rg(e){return e===!0||e===!1||Le(e)&&Ze(e)==Ut}var fr=Qu||Fi,Fg=tl?yt(tl):Hy;function Bg(e){return Le(e)&&e.nodeType===1&&!Bs(e)}function Ug(e){if(e==null)return!0;if(nt(e)&&(ne(e)||typeof e=="string"||typeof e.splice=="function"||fr(e)||ts(e)||Sr(e)))return!e.length;var t=Ye(e);if(t==dt||t==mt)return!e.size;if(Rs(e))return!si(e).length;for(var r in e)if(Te.call(e,r))return!1;return!0}function Kg(e,t){return Ms(e,t)}function $g(e,t,r){r=typeof r=="function"?r:s;var i=r?r(e,t):s;return i===s?Ms(e,t,s,r):!!i}function Ci(e){if(!Le(e))return!1;var t=Ze(e);return t==Pr||t==Mr||typeof e.message=="string"&&typeof e.name=="string"&&!Bs(e)}function jg(e){return typeof e=="number"&&wl(e)}function tr(e){if(!ze(e))return!1;var t=Ze(e);return t==hr||t==aa||t==ys||t==Rr}function Uc(e){return typeof e=="number"&&e==oe(e)}function Qa(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Me}function ze(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Le(e){return e!=null&&typeof e=="object"}var Kc=rl?yt(rl):Gy;function Hg(e,t){return e===t||ri(e,t,xi(t))}function Wg(e,t,r){return r=typeof r=="function"?r:s,ri(e,t,xi(t),r)}function Gg(e){return $c(e)&&e!=+e}function Xg(e){if(z_(e))throw new ae(l);return Ll(e)}function Vg(e){return e===null}function Yg(e){return e==null}function $c(e){return typeof e=="number"||Le(e)&&Ze(e)==Kt}function Bs(e){if(!Le(e)||Ze(e)!=wt)return!1;var t=Da(e);if(t===null)return!0;var r=Te.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&ha.call(r)==Hu}var zi=sl?yt(sl):Xy;function Qg(e){return Uc(e)&&e>=-Me&&e<=Me}var jc=al?yt(al):Vy;function Za(e){return typeof e=="string"||!ne(e)&&Le(e)&&Ze(e)==Gt}function ft(e){return typeof e=="symbol"||Le(e)&&Ze(e)==Fr}var ts=nl?yt(nl):Yy;function Zg(e){return e===s}function Jg(e){return Le(e)&&Ye(e)==ir}function eb(e){return Le(e)&&Ze(e)==na}var tb=Ka(ai),rb=Ka(function(e,t){return e<=t});function Hc(e){if(!e)return[];if(nt(e))return Za(e)?Pt(e):at(e);if(As&&e[As])return Nu(e[As]());var t=Ye(e),r=t==dt?Hn:t==mt?ga:rs;return r(e)}function rr(e){if(!e)return e===0?e:0;if(e=Ct(e),e===Ee||e===-Ee){var t=e<0?-1:1;return t*pt}return e===e?e:0}function oe(e){var t=rr(e),r=t%1;return t===t?r?t-r:t:0}function Wc(e){return e?Ar(oe(e),0,se):0}function Ct(e){if(typeof e=="number")return e;if(ft(e))return ht;if(ze(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ze(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=dl(e);var r=de.test(e);return r||Ce.test(e)?fu(e.slice(2),r?2:8):ue.test(e)?ht:+e}function Gc(e){return jt(e,it(e))}function sb(e){return e?Ar(oe(e),-Me,Me):e===0?e:0}function ve(e){return e==null?"":_t(e)}var ab=Zr(function(e,t){if(Rs(t)||nt(t)){jt(t,je(t),e);return}for(var r in t)Te.call(t,r)&&Es(e,r,t[r])}),Xc=Zr(function(e,t){jt(t,it(t),e)}),Ja=Zr(function(e,t,r,i){jt(t,it(t),e,i)}),nb=Zr(function(e,t,r,i){jt(t,je(t),e,i)}),ib=Jt(Qn);function ob(e,t){var r=Qr(e);return t==null?r:Il(r,t)}var lb=pe(function(e,t){e=De(e);var r=-1,i=t.length,p=i>2?t[2]:s;for(p&&Je(t[0],t[1],p)&&(i=1);++r<i;)for(var u=t[r],_=it(u),x=-1,v=_.length;++x<v;){var C=_[x],z=e[C];(z===s||Rt(z,Xr[C])&&!Te.call(e,C))&&(e[C]=u[C])}return e}),cb=pe(function(e){return e.push(s,dc),ut(Vc,s,e)});function pb(e,t){return ol(e,Z(t,3),$t)}function db(e,t){return ol(e,Z(t,3),Jn)}function mb(e,t){return e==null?e:Zn(e,Z(t,3),it)}function ub(e,t){return e==null?e:Sl(e,Z(t,3),it)}function yb(e,t){return e&&$t(e,Z(t,3))}function _b(e,t){return e&&Jn(e,Z(t,3))}function fb(e){return e==null?[]:La(e,je(e))}function gb(e){return e==null?[]:La(e,it(e))}function Si(e,t,r){var i=e==null?s:qr(e,t);return i===s?r:i}function bb(e,t){return e!=null&&yc(e,t,By)}function Ei(e,t){return e!=null&&yc(e,t,Uy)}var xb=ic(function(e,t,r){t!=null&&typeof t.toString!="function"&&(t=wa.call(t)),e[t]=r},Li(ot)),hb=ic(function(e,t,r){t!=null&&typeof t.toString!="function"&&(t=wa.call(t)),Te.call(e,t)?e[t].push(r):e[t]=[r]},Z),wb=pe(Ls);function je(e){return nt(e)?Dl(e):si(e)}function it(e){return nt(e)?Dl(e,!0):Qy(e)}function vb(e,t){var r={};return t=Z(t,3),$t(e,function(i,p,u){Qt(r,t(i,p,u),i)}),r}function Tb(e,t){var r={};return t=Z(t,3),$t(e,function(i,p,u){Qt(r,p,t(i,p,u))}),r}var Db=Zr(function(e,t,r){Ma(e,t,r)}),Vc=Zr(function(e,t,r,i){Ma(e,t,r,i)}),kb=Jt(function(e,t){var r={};if(e==null)return r;var i=!1;t=qe(t,function(u){return u=yr(u,e),i||(i=u.length>1),u}),jt(e,gi(e),r),i&&(r=It(r,T|N|F,b_));for(var p=t.length;p--;)ci(r,t[p]);return r});function Ib(e,t){return Yc(e,Ya(Z(t)))}var Ab=Jt(function(e,t){return e==null?{}:Jy(e,t)});function Yc(e,t){if(e==null)return{};var r=qe(gi(e),function(i){return[i]});return t=Z(t),Ul(e,r,function(i,p){return t(i,p[0])})}function qb(e,t,r){t=yr(t,e);var i=-1,p=t.length;for(p||(p=1,e=s);++i<p;){var u=e==null?s:e[Ht(t[i])];u===s&&(i=p,u=r),e=tr(u)?u.call(e):u}return e}function Cb(e,t,r){return e==null?e:Ps(e,t,r)}function zb(e,t,r,i){return i=typeof i=="function"?i:s,e==null?e:Ps(e,t,r,i)}var Qc=cc(je),Zc=cc(it);function Sb(e,t,r){var i=ne(e),p=i||fr(e)||ts(e);if(t=Z(t,4),r==null){var u=e&&e.constructor;p?r=i?new u:[]:ze(e)?r=tr(u)?Qr(Da(e)):{}:r={}}return(p?Tt:$t)(e,function(_,x,v){return t(r,_,x,v)}),r}function Eb(e,t){return e==null?!0:ci(e,t)}function Nb(e,t,r){return e==null?e:Wl(e,t,mi(r))}function Lb(e,t,r,i){return i=typeof i=="function"?i:s,e==null?e:Wl(e,t,mi(r),i)}function rs(e){return e==null?[]:jn(e,je(e))}function Mb(e){return e==null?[]:jn(e,it(e))}function Pb(e,t,r){return r===s&&(r=t,t=s),r!==s&&(r=Ct(r),r=r===r?r:0),t!==s&&(t=Ct(t),t=t===t?t:0),Ar(Ct(e),t,r)}function Ob(e,t,r){return t=rr(t),r===s?(r=t,t=0):r=rr(r),e=Ct(e),Ky(e,t,r)}function Rb(e,t,r){if(r&&typeof r!="boolean"&&Je(e,t,r)&&(t=r=s),r===s&&(typeof t=="boolean"?(r=t,t=s):typeof e=="boolean"&&(r=e,e=s)),e===s&&t===s?(e=0,t=1):(e=rr(e),t===s?(t=e,e=0):t=rr(t)),e>t){var i=e;e=t,t=i}if(r||e%1||t%1){var p=vl();return Ve(e+p*(t-e+_u("1e-"+((p+"").length-1))),t)}return ii(e,t)}var Fb=Jr(function(e,t,r){return t=t.toLowerCase(),e+(r?Jc(t):t)});function Jc(e){return Ni(ve(e).toLowerCase())}function ep(e){return e=ve(e),e&&e.replace(rt,qu).replace(nu,"")}function Bb(e,t,r){e=ve(e),t=_t(t);var i=e.length;r=r===s?i:Ar(oe(r),0,i);var p=r;return r-=t.length,r>=0&&e.slice(r,p)==t}function Ub(e){return e=ve(e),e&&oa.test(e)?e.replace(Kr,Cu):e}function Kb(e){return e=ve(e),e&&ma.test(e)?e.replace(Ds,"\\$&"):e}var $b=Jr(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()}),jb=Jr(function(e,t,r){return e+(r?" ":"")+t.toLowerCase()}),Hb=sc("toLowerCase");function Wb(e,t,r){e=ve(e),t=oe(t);var i=t?Wr(e):0;if(!t||i>=t)return e;var p=(t-i)/2;return Ua(qa(p),r)+e+Ua(Aa(p),r)}function Gb(e,t,r){e=ve(e),t=oe(t);var i=t?Wr(e):0;return t&&i<t?e+Ua(t-i,r):e}function Xb(e,t,r){e=ve(e),t=oe(t);var i=t?Wr(e):0;return t&&i<t?Ua(t-i,r)+e:e}function Vb(e,t,r){return r||t==null?t=0:t&&(t=+t),ty(ve(e).replace(ks,""),t||0)}function Yb(e,t,r){return(r?Je(e,t,r):t===s)?t=1:t=oe(t),oi(ve(e),t)}function Qb(){var e=arguments,t=ve(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var Zb=Jr(function(e,t,r){return e+(r?"_":"")+t.toLowerCase()});function Jb(e,t,r){return r&&typeof r!="number"&&Je(e,t,r)&&(t=r=s),r=r===s?se:r>>>0,r?(e=ve(e),e&&(typeof t=="string"||t!=null&&!zi(t))&&(t=_t(t),!t&&Hr(e))?_r(Pt(e),0,r):e.split(t,r)):[]}var ex=Jr(function(e,t,r){return e+(r?" ":"")+Ni(t)});function tx(e,t,r){return e=ve(e),r=r==null?0:Ar(oe(r),0,e.length),t=_t(t),e.slice(r,r+t.length)==t}function rx(e,t,r){var i=d.templateSettings;r&&Je(e,t,r)&&(t=s),e=ve(e),t=Ja({},t,i,pc);var p=Ja({},t.imports,i.imports,pc),u=je(p),_=jn(p,u),x,v,C=0,z=t.interpolate||Mt,L="__p += '",j=Wn((t.escape||Mt).source+"|"+z.source+"|"+(z===ca?fe:Mt).source+"|"+(t.evaluate||Mt).source+"|$","g"),X="//# sourceURL="+(Te.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++pu+"]")+`
121
+ `;e.replace(j,function(te,me,_e,gt,et,bt){return _e||(_e=gt),L+=e.slice(C,bt).replace(ua,zu),me&&(x=!0,L+=`' +
122
122
  __e(`+me+`) +
123
- '`),Je&&(v=!0,L+=`';
124
- `+Je+`;
123
+ '`),et&&(v=!0,L+=`';
124
+ `+et+`;
125
125
  __p += '`),_e&&(L+=`' +
126
126
  ((__t = (`+_e+`)) == null ? '' : __t) +
127
- '`),z=gt+ee.length,ee}),L+=`';
128
- `;var J=Te.call(t,"variable")&&t.variable;if(!J)L=`with (obj) {
127
+ '`),C=bt+te.length,te}),L+=`';
128
+ `;var ee=Te.call(t,"variable")&&t.variable;if(!ee)L=`with (obj) {
129
129
  `+L+`
130
130
  }
131
- `;else if($.test(J))throw new ae(y);L=(v?L.replace(Dn,""):L).replace(vs,"$1").replace(ia,"$1;"),L="function("+(J||"obj")+`) {
132
- `+(J?"":`obj || (obj = {});
131
+ `;else if($.test(ee))throw new ae(y);L=(v?L.replace(Dn,""):L).replace(vs,"$1").replace(ia,"$1;"),L="function("+(ee||"obj")+`) {
132
+ `+(ee?"":`obj || (obj = {});
133
133
  `)+"var __t, __p = ''"+(x?", __e = _.escape":"")+(v?`, __j = Array.prototype.join;
134
134
  function print() { __p += __j.call(arguments, '') }
135
135
  `:`;
136
136
  `)+L+`return __p
137
- }`;var ce=rp(function(){return he(u,X+"return "+L).apply(s,_)});if(ce.source=L,Ci(ce))throw ce;return ce}function sx(e){return ve(e).toLowerCase()}function ax(e){return ve(e).toUpperCase()}function nx(e,t,r){if(e=ve(e),e&&(r||t===s))return dl(e);if(!e||!(t=yt(t)))return e;var i=Mt(e),p=Mt(t),u=ml(i,p),_=ul(i,p)+1;return _r(i,u,_).join("")}function ix(e,t,r){if(e=ve(e),e&&(r||t===s))return e.slice(0,_l(e)+1);if(!e||!(t=yt(t)))return e;var i=Mt(e),p=ul(i,Mt(t))+1;return _r(i,0,p).join("")}function ox(e,t,r){if(e=ve(e),e&&(r||t===s))return e.replace(ks,"");if(!e||!(t=yt(t)))return e;var i=Mt(e),p=ml(i,Mt(t));return _r(i,p).join("")}function lx(e,t){var r=ie,i=xt;if(ze(t)){var p="separator"in t?t.separator:p;r="length"in t?oe(t.length):r,i="omission"in t?yt(t.omission):i}e=ve(e);var u=e.length;if(Hr(e)){var _=Mt(e);u=_.length}if(r>=u)return e;var x=r-Wr(i);if(x<1)return i;var v=_?_r(_,0,x).join(""):e.slice(0,x);if(p===s)return v+i;if(_&&(x+=v.length-x),zi(p)){if(e.slice(x).search(p)){var z,S=v;for(p.global||(p=Wn(p.source,ve(we.exec(p))+"g")),p.lastIndex=0;z=p.exec(S);)var L=z.index;v=v.slice(0,L===s?x:L)}}else if(e.indexOf(yt(p),x)!=x){var j=v.lastIndexOf(p);j>-1&&(v=v.slice(0,j))}return v+i}function cx(e){return e=ve(e),e&&Ts.test(e)?e.replace(Gt,Ou):e}var px=Jr(function(e,t,r){return e+(r?" ":"")+t.toUpperCase()}),Ni=sc("toUpperCase");function tp(e,t,r){return e=ve(e),t=r?s:t,t===s?Eu(e)?Bu(e):Tu(e):e.match(t)||[]}var rp=pe(function(e,t){try{return mt(e,s,t)}catch(r){return Ci(r)?r:new ae(r)}}),dx=Zt(function(e,t){return Tt(t,function(r){r=jt(r),Yt(e,r,Ai(e[r],e))}),e});function mx(e){var t=e==null?0:e.length,r=Q();return e=t?qe(e,function(i){if(typeof i[1]!="function")throw new Dt(m);return[r(i[0]),i[1]]}):[],pe(function(i){for(var p=-1;++p<t;){var u=e[p];if(mt(u[0],this,i))return mt(u[1],this,i)}})}function ux(e){return Oy(It(e,T))}function Li(e){return function(){return e}}function yx(e,t){return e==null||e!==e?t:e}var _x=nc(),fx=nc(!0);function it(e){return e}function Mi(e){return Ml(typeof e=="function"?e:It(e,T))}function gx(e){return Ol(It(e,T))}function bx(e,t){return Rl(e,It(t,T))}var xx=pe(function(e,t){return function(r){return Ls(r,e,t)}}),hx=pe(function(e,t){return function(r){return Ls(e,r,t)}});function Pi(e,t,r){var i=je(t),p=La(t,i);r==null&&!(ze(t)&&(p.length||!i.length))&&(r=t,t=e,e=this,p=La(t,je(t)));var u=!(ze(r)&&"chain"in r)||!!r.chain,_=er(e);return Tt(p,function(x){var v=t[x];e[x]=v,_&&(e.prototype[x]=function(){var z=this.__chain__;if(u||z){var S=e(this.__wrapped__),L=S.__actions__=st(this.__actions__);return L.push({func:v,args:arguments,thisArg:e}),S.__chain__=z,S}return v.apply(e,cr([this.value()],arguments))})}),e}function wx(){return We._===this&&(We._=Wu),this}function Oi(){}function vx(e){return e=oe(e),pe(function(t){return Fl(t,e)})}var Tx=yi(qe),Dx=yi(il),kx=yi(Fn);function sp(e){return wi(e)?Bn(jt(e)):e_(e)}function Ix(e){return function(t){return e==null?s:qr(e,t)}}var Ax=oc(),qx=oc(!0);function Ri(){return[]}function Fi(){return!1}function Cx(){return{}}function zx(){return""}function Sx(){return!0}function Ex(e,t){if(e=oe(e),e<1||e>Me)return[];var r=se,i=Ve(e,se);t=Q(t),e-=se;for(var p=$n(i,t);++r<e;)t(r);return p}function Nx(e){return ne(e)?qe(e,jt):_t(e)?[e]:st(Tc(ve(e)))}function Lx(e){var t=++ju;return ve(e)+t}var Mx=Ba(function(e,t){return e+t},0),Px=_i("ceil"),Ox=Ba(function(e,t){return e/t},1),Rx=_i("floor");function Fx(e){return e&&e.length?Na(e,it,ei):s}function Bx(e,t){return e&&e.length?Na(e,Q(t,2),ei):s}function Ux(e){return cl(e,it)}function Kx(e,t){return cl(e,Q(t,2))}function $x(e){return e&&e.length?Na(e,it,ai):s}function jx(e,t){return e&&e.length?Na(e,Q(t,2),ai):s}var Hx=Ba(function(e,t){return e*t},1),Wx=_i("round"),Gx=Ba(function(e,t){return e-t},0);function Xx(e){return e&&e.length?Kn(e,it):0}function Vx(e,t){return e&&e.length?Kn(e,Q(t,2)):0}return d.after=gg,d.ary=Lc,d.assign=ab,d.assignIn=Xc,d.assignInWith=Ja,d.assignWith=nb,d.at=ib,d.before=Mc,d.bind=Ai,d.bindAll=dx,d.bindKey=Pc,d.castArray=Cg,d.chain=Sc,d.chunk=O_,d.compact=R_,d.concat=F_,d.cond=mx,d.conforms=ux,d.constant=Li,d.countBy=Xf,d.create=ob,d.curry=Oc,d.curryRight=Rc,d.debounce=Fc,d.defaults=lb,d.defaultsDeep=cb,d.defer=bg,d.delay=xg,d.difference=B_,d.differenceBy=U_,d.differenceWith=K_,d.drop=$_,d.dropRight=j_,d.dropRightWhile=H_,d.dropWhile=W_,d.fill=G_,d.filter=Yf,d.flatMap=Jf,d.flatMapDeep=eg,d.flatMapDepth=tg,d.flatten=Ac,d.flattenDeep=X_,d.flattenDepth=V_,d.flip=hg,d.flow=_x,d.flowRight=fx,d.fromPairs=Y_,d.functions=fb,d.functionsIn=gb,d.groupBy=rg,d.initial=Z_,d.intersection=J_,d.intersectionBy=ef,d.intersectionWith=tf,d.invert=xb,d.invertBy=hb,d.invokeMap=ag,d.iteratee=Mi,d.keyBy=ng,d.keys=je,d.keysIn=nt,d.map=Ga,d.mapKeys=vb,d.mapValues=Tb,d.matches=gx,d.matchesProperty=bx,d.memoize=Va,d.merge=Db,d.mergeWith=Vc,d.method=xx,d.methodOf=hx,d.mixin=Pi,d.negate=Ya,d.nthArg=vx,d.omit=kb,d.omitBy=Ib,d.once=wg,d.orderBy=ig,d.over=Tx,d.overArgs=vg,d.overEvery=Dx,d.overSome=kx,d.partial=qi,d.partialRight=Bc,d.partition=og,d.pick=Ab,d.pickBy=Yc,d.property=sp,d.propertyOf=Ix,d.pull=nf,d.pullAll=Cc,d.pullAllBy=of,d.pullAllWith=lf,d.pullAt=cf,d.range=Ax,d.rangeRight=qx,d.rearg=Tg,d.reject=pg,d.remove=pf,d.rest=Dg,d.reverse=ki,d.sampleSize=mg,d.set=Cb,d.setWith=zb,d.shuffle=ug,d.slice=df,d.sortBy=fg,d.sortedUniq=bf,d.sortedUniqBy=xf,d.split=Jb,d.spread=kg,d.tail=hf,d.take=wf,d.takeRight=vf,d.takeRightWhile=Tf,d.takeWhile=Df,d.tap=Ff,d.throttle=Ig,d.thru=Wa,d.toArray=Hc,d.toPairs=Qc,d.toPairsIn=Zc,d.toPath=Nx,d.toPlainObject=Gc,d.transform=Sb,d.unary=Ag,d.union=kf,d.unionBy=If,d.unionWith=Af,d.uniq=qf,d.uniqBy=Cf,d.uniqWith=zf,d.unset=Eb,d.unzip=Ii,d.unzipWith=zc,d.update=Nb,d.updateWith=Lb,d.values=rs,d.valuesIn=Mb,d.without=Sf,d.words=tp,d.wrap=qg,d.xor=Ef,d.xorBy=Nf,d.xorWith=Lf,d.zip=Mf,d.zipObject=Pf,d.zipObjectDeep=Of,d.zipWith=Rf,d.entries=Qc,d.entriesIn=Zc,d.extend=Xc,d.extendWith=Ja,Pi(d,d),d.add=Mx,d.attempt=rp,d.camelCase=Fb,d.capitalize=Jc,d.ceil=Px,d.clamp=Pb,d.clone=zg,d.cloneDeep=Eg,d.cloneDeepWith=Ng,d.cloneWith=Sg,d.conformsTo=Lg,d.deburr=ep,d.defaultTo=yx,d.divide=Ox,d.endsWith=Bb,d.eq=Ot,d.escape=Ub,d.escapeRegExp=Kb,d.every=Vf,d.find=Qf,d.findIndex=kc,d.findKey=pb,d.findLast=Zf,d.findLastIndex=Ic,d.findLastKey=db,d.floor=Rx,d.forEach=Ec,d.forEachRight=Nc,d.forIn=mb,d.forInRight=ub,d.forOwn=yb,d.forOwnRight=_b,d.get=Si,d.gt=Mg,d.gte=Pg,d.has=bb,d.hasIn=Ei,d.head=qc,d.identity=it,d.includes=sg,d.indexOf=Q_,d.inRange=Ob,d.invoke=wb,d.isArguments=Sr,d.isArray=ne,d.isArrayBuffer=Og,d.isArrayLike=at,d.isArrayLikeObject=Pe,d.isBoolean=Rg,d.isBuffer=fr,d.isDate=Fg,d.isElement=Bg,d.isEmpty=Ug,d.isEqual=Kg,d.isEqualWith=$g,d.isError=Ci,d.isFinite=jg,d.isFunction=er,d.isInteger=Uc,d.isLength=Qa,d.isMap=Kc,d.isMatch=Hg,d.isMatchWith=Wg,d.isNaN=Gg,d.isNative=Xg,d.isNil=Yg,d.isNull=Vg,d.isNumber=$c,d.isObject=ze,d.isObjectLike=Le,d.isPlainObject=Bs,d.isRegExp=zi,d.isSafeInteger=Qg,d.isSet=jc,d.isString=Za,d.isSymbol=_t,d.isTypedArray=ts,d.isUndefined=Zg,d.isWeakMap=Jg,d.isWeakSet=eb,d.join=rf,d.kebabCase=$b,d.last=qt,d.lastIndexOf=sf,d.lowerCase=jb,d.lowerFirst=Hb,d.lt=tb,d.lte=rb,d.max=Fx,d.maxBy=Bx,d.mean=Ux,d.meanBy=Kx,d.min=$x,d.minBy=jx,d.stubArray=Ri,d.stubFalse=Fi,d.stubObject=Cx,d.stubString=zx,d.stubTrue=Sx,d.multiply=Hx,d.nth=af,d.noConflict=wx,d.noop=Oi,d.now=Xa,d.pad=Wb,d.padEnd=Gb,d.padStart=Xb,d.parseInt=Vb,d.random=Rb,d.reduce=lg,d.reduceRight=cg,d.repeat=Yb,d.replace=Qb,d.result=qb,d.round=Wx,d.runInContext=w,d.sample=dg,d.size=yg,d.snakeCase=Zb,d.some=_g,d.sortedIndex=mf,d.sortedIndexBy=uf,d.sortedIndexOf=yf,d.sortedLastIndex=_f,d.sortedLastIndexBy=ff,d.sortedLastIndexOf=gf,d.startCase=ex,d.startsWith=tx,d.subtract=Gx,d.sum=Xx,d.sumBy=Vx,d.template=rx,d.times=Ex,d.toFinite=tr,d.toInteger=oe,d.toLength=Wc,d.toLower=sx,d.toNumber=Ct,d.toSafeInteger=sb,d.toString=ve,d.toUpper=ax,d.trim=nx,d.trimEnd=ix,d.trimStart=ox,d.truncate=lx,d.unescape=cx,d.uniqueId=Lx,d.upperCase=px,d.upperFirst=Ni,d.each=Ec,d.eachRight=Nc,d.first=qc,Pi(d,function(){var e={};return Kt(d,function(t,r){Te.call(d.prototype,r)||(e[r]=t)}),e}(),{chain:!1}),d.VERSION=o,Tt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){d[e].placeholder=d}),Tt(["drop","take"],function(e,t){ye.prototype[e]=function(r){r=r===s?1:Be(oe(r),0);var i=this.__filtered__&&!t?new ye(this):this.clone();return i.__filtered__?i.__takeCount__=Ve(r,i.__takeCount__):i.__views__.push({size:Ve(r,se),type:e+(i.__dir__<0?"Right":"")}),i},ye.prototype[e+"Right"]=function(r){return this.reverse()[e](r).reverse()}}),Tt(["filter","map","takeWhile"],function(e,t){var r=t+1,i=r==Ke||r==be;ye.prototype[e]=function(p){var u=this.clone();return u.__iteratees__.push({iteratee:Q(p,3),type:r}),u.__filtered__=u.__filtered__||i,u}}),Tt(["head","last"],function(e,t){var r="take"+(t?"Right":"");ye.prototype[e]=function(){return this[r](1).value()[0]}}),Tt(["initial","tail"],function(e,t){var r="drop"+(t?"":"Right");ye.prototype[e]=function(){return this.__filtered__?new ye(this):this[r](1)}}),ye.prototype.compact=function(){return this.filter(it)},ye.prototype.find=function(e){return this.filter(e).head()},ye.prototype.findLast=function(e){return this.reverse().find(e)},ye.prototype.invokeMap=pe(function(e,t){return typeof e=="function"?new ye(this):this.map(function(r){return Ls(r,e,t)})}),ye.prototype.reject=function(e){return this.filter(Ya(Q(e)))},ye.prototype.slice=function(e,t){e=oe(e);var r=this;return r.__filtered__&&(e>0||t<0)?new ye(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==s&&(t=oe(t),r=t<0?r.dropRight(-t):r.take(t-e)),r)},ye.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},ye.prototype.toArray=function(){return this.take(se)},Kt(ye.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),p=d[i?"take"+(t=="last"?"Right":""):t],u=i||/^find/.test(t);p&&(d.prototype[t]=function(){var _=this.__wrapped__,x=i?[1]:arguments,v=_ instanceof ye,z=x[0],S=v||ne(_),L=function(me){var _e=p.apply(d,cr([me],x));return i&&j?_e[0]:_e};S&&r&&typeof z=="function"&&z.length!=1&&(v=S=!1);var j=this.__chain__,X=!!this.__actions__.length,J=u&&!j,ce=v&&!X;if(!u&&S){_=ce?_:new ye(this);var ee=e.apply(_,x);return ee.__actions__.push({func:Wa,args:[L],thisArg:s}),new kt(ee,j)}return J&&ce?e.apply(this,x):(ee=this.thru(L),J?i?ee.value()[0]:ee.value():ee)})}),Tt(["pop","push","shift","sort","splice","unshift"],function(e){var t=ba[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);d.prototype[e]=function(){var p=arguments;if(i&&!this.__chain__){var u=this.value();return t.apply(ne(u)?u:[],p)}return this[r](function(_){return t.apply(ne(_)?_:[],p)})}}),Kt(ye.prototype,function(e,t){var r=d[t];if(r){var i=r.name+"";Te.call(Yr,i)||(Yr[i]=[]),Yr[i].push({name:t,func:r})}}),Yr[Fa(s,Y).name]=[{name:"wrapper",func:s}],ye.prototype.clone=ly,ye.prototype.reverse=cy,ye.prototype.value=py,d.prototype.at=Bf,d.prototype.chain=Uf,d.prototype.commit=Kf,d.prototype.next=$f,d.prototype.plant=Hf,d.prototype.reverse=Wf,d.prototype.toJSON=d.prototype.valueOf=d.prototype.value=Gf,d.prototype.first=d.prototype.head,As&&(d.prototype[As]=jf),d},Gr=Uu();Tr?((Tr.exports=Gr)._=Gr,Mn._=Gr):We._=Gr}).call(ss)}(Ws,Ws.exports);var qd=Ws.exports;const Se="tccScript",Nr={builtinFunctions:/strategy\.closedtrades\.max_drawdown_percent|strategy\.opentrades\.max_drawdown_percent|strategy\.risk\.max_intraday_filled_orders|strategy\.closedtrades\.max_runup_percent|array\.percentile_linear_interpolation|strategy\.closedtrades\.entry_bar_index|strategy\.opentrades\.max_runup_percent|strategy\.closedtrades\.exit_bar_index|strategy\.closedtrades\.profit_percent|strategy\.closedtrades\.entry_comment|strategy\.opentrades\.entry_bar_index|strategy\.closedtrades\.exit_comment|strategy\.closedtrades\.max_drawdown|strategy\.opentrades\.profit_percent|ta\.percentile_linear_interpolation|strategy\.closedtrades\.entry_price|strategy\.opentrades\.entry_comment|strategy\.closedtrades\.commission|strategy\.closedtrades\.entry_time|strategy\.closedtrades\.exit_price|strategy\.opentrades\.max_drawdown|strategy\.risk\.max_cons_loss_days|strategy\.closedtrades\.exit_time|strategy\.closedtrades\.max_runup|strategy\.opentrades\.entry_price|strategy\.risk\.max_intraday_loss|strategy\.risk\.max_position_size|table\.cell_set_text_font_family|strategy\.closedtrades\.entry_id|strategy\.opentrades\.commission|strategy\.opentrades\.entry_time|array\.binary_search_rightmost|array\.percentile_nearest_rank|strategy\.closedtrades\.exit_id|strategy\.opentrades\.max_runup|array\.binary_search_leftmost|strategy\.closedtrades\.profit|strategy\.opentrades\.entry_id|strategy\.risk\.allow_entry_in|strategy\.convert_to_account|box\.set_bottom_right_point|label\.set_text_font_family|strategy\.closedtrades\.size|strategy\.convert_to_symbol|strategy\.default_entry_qty|strategy\.opentrades\.profit|strategy\.risk\.max_drawdown|ta\.percentile_nearest_rank|table\.cell_set_text_halign|table\.cell_set_text_valign|request\.security_lower_tf|table\.cell_set_text_color|box\.set_text_font_family|strategy\.opentrades\.size|table\.cell_set_text_size|matrix\.is_antisymmetric|box\.set_top_left_point|chart\.point\.from_index|matrix\.is_antidiagonal|table\.cell_set_bgcolor|table\.cell_set_tooltip|table\.set_border_color|table\.set_border_width|timeframe\.from_seconds|chart\.point\.from_time|line\.set_second_point|math\.round_to_mintick|matrix\.elements_count|request\.currency_rate|ta\.pivot_point_levels|table\.cell_set_height|table\.set_frame_color|table\.set_frame_width|box\.set_border_color|box\.set_border_style|box\.set_border_width|line\.set_first_point|matrix\.is_stochastic|matrix\.is_triangular|table\.cell_set_width|timeframe\.in_seconds|array\.binary_search|box\.set_rightbottom|box\.set_text_halign|box\.set_text_valign|color\.from_gradient|label\.set_textalign|label\.set_textcolor|matrix\.eigenvectors|matrix\.is_symmetric|matrix\.swap_columns|strategy\.cancel_all|table\.cell_set_text|array\.new_linefill|array\.sort_indices|box\.set_text_color|linefill\.get_line1|linefill\.get_line2|linefill\.set_color|matrix\.eigenvalues|matrix\.is_diagonal|matrix\.is_identity|strategy\.close_all|table\.set_position|ticker\.pointfigure|array\.lastindexof|array\.percentrank|array\.standardize|box\.set_text_size|box\.set_text_wrap|label\.set_tooltip|matrix\.remove_col|matrix\.remove_row|request\.dividends|request\.financial|table\.merge_cells|table\.set_bgcolor|ticker\.heikinashi|array\.covariance|array\.new_string|chart\.point\.copy|matrix\.is_binary|matrix\.is_square|matrix\.submatrix|matrix\.swap_rows|matrix\.transpose|request\.earnings|request\.economic|request\.security|ticker\.linebreak|timeframe\.change|array\.new_color|array\.new_float|array\.new_label|array\.new_table|box\.set_bgcolor|box\.set_lefttop|chart\.point\.new|chart\.point\.now|input\.text_area|input\.timeframe|label\.set_color|label\.set_point|label\.set_style|line\.set_extend|linefill\.delete|polyline\.delete|str\.format_time|str\.replace_all|strategy\.cancel|ticker\.standard|alertcondition|array\.includes|array\.new_bool|array\.new_line|array\.variance|box\.get_bottom|box\.set_bottom|box\.set_extend|label\.get_text|label\.set_size|label\.set_text|label\.set_xloc|label\.set_yloc|line\.get_price|line\.set_color|line\.set_style|line\.set_width|math\.todegrees|math\.toradians|matrix\.add_col|matrix\.add_row|matrix\.columns|matrix\.is_zero|matrix\.reshape|matrix\.reverse|request\.quandl|request\.splits|str\.startswith|strategy\.close|strategy\.entry|strategy\.order|syminfo\.prefix|syminfo\.ticker|ta\.correlation|ta\.highestbars|ta\.percentrank|ticker\.inherit|array\.indexof|array\.new_box|array\.new_int|array\.reverse|array\.unshift|box\.get_right|box\.set_right|input\.session|line\.set_xloc|matrix\.concat|matrix\.median|max_bars_back|runtime\.error|str\.substring|strategy\.exit|ta\.crossunder|ta\.lowestbars|ta\.supertrend|ticker\.modify|array\.concat|array\.insert|array\.median|array\.remove|box\.get_left|box\.set_left|box\.set_text|input\.source|input\.string|input\.symbol|label\.delete|label\.set_xy|line\.set_xy1|line\.set_xy2|linefill\.new|map\.contains|matrix\.trace|polyline\.new|request\.seed|str\.contains|str\.endswith|str\.tonumber|str\.tostring|ta\.barssince|ta\.crossover|ta\.pivothigh|ta\.valuewhen|table\.delete|ticker\.renko|array\.clear|array\.every|array\.first|array\.range|array\.shift|array\.slice|array\.stdev|box\.get_top|box\.set_top|input\.color|input\.float|input\.price|label\.get_x|label\.get_y|label\.set_x|label\.set_y|line\.delete|line\.get_x1|line\.get_x2|line\.get_y1|line\.get_y2|line\.set_x1|line\.set_x2|line\.set_y1|line\.set_y2|log\.warning|map\.put_all|math\.random|matrix\.copy|matrix\.diff|matrix\.fill|matrix\.kron|matrix\.mode|matrix\.mult|matrix\.pinv|matrix\.rank|matrix\.rows|matrix\.sort|str\.replace|ta\.pivotlow|ta\.variance|table\.clear|ticker\.kagi|array\.copy|array\.fill|array\.from|array\.join|array\.last|array\.mode|array\.push|array\.size|array\.some|array\.sort|box\.delete|dayofmonth|input\.bool|input\.time|label\.copy|map\.remove|map\.values|math\.floor|math\.log10|math\.round|matrix\.avg|matrix\.col|matrix\.det|matrix\.get|matrix\.inv|matrix\.max|matrix\.min|matrix\.new|matrix\.pow|matrix\.row|matrix\.set|matrix\.sum|plotcandle|str\.format|str\.length|ta\.falling|ta\.highest|table\.cell|ticker\.new|time_close|weekofyear|array\.abs|array\.avg|array\.get|array\.max|array\.min|array\.new|array\.pop|array\.set|array\.sum|color\.new|color\.rgb|dayofweek|indicator|input\.int|label\.new|line\.copy|log\.error|map\.clear|math\.acos|math\.asin|math\.atan|input\.enum|math\.ceil|math\.sign|math\.sqrt|plotarrow|plotshape|str\.lower|str\.match|str\.split|str\.upper|ta\.change|ta\.linreg|ta\.lowest|ta\.median|ta\.rising|table\.new|timestamp|barcolor|box\.copy|line\.new|linefill|log\.info|map\.copy|map\.keys|map\.size|math\.abs|math\.avg|math\.cos|math\.exp|math\.log|math\.max|math\.min|math\.pow|math\.sin|math\.sum|math\.tan|plotchar|strategy|ta\.cross|ta\.range|ta\.stdev|ta\.stoch|bgcolor|box\.new|color\.b|color\.g|color\.r|color\.t|library|map\.get|map\.new|map\.put|plotbar|str\.pos|ta\.alma|ta\.macd|ta\.mode|ta\.swma|ta\.vwap|ta\.vwma|fixnan|minute|second|string|ta\.atr|ta\.bbw|ta\.cci|ta\.cmo|ta\.cog|ta\.cum|ta\.dev|ta\.dmi|ta\.ema|ta\.hma|ta\.kcw|ta\.max|ta\.mfi|ta\.min|ta\.mom|ta\.rma|ta\.roc|ta\.rsi|ta\.sar|ta\.sma|ta\.tsi|ta\.wma|ta\.wpr|alert|color|float|hline|input|label|month|ta\.bb|ta\.kc|ta\.tr|table|bool|fill|hour|line|plot|time|year|box|int|na|nz/,keywords:/continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to/,tokenizer:{root:[[/\/\/\s*(?=@)/,"comment","@comments"],[/\/\/.*(?!@).*/,"comment"],[/\'([^\'\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/\"/,{token:"string",bracket:"@open",next:"@stringDouble"}],[/(type|enum)\s+[a-zA-Z]\w*/,"entity.name.type"],[/'/,{token:"string",bracket:"@open",next:"@stringSingle"}],[/(@builtinFunctions)(?=\s*\(|\s*<.*>)/,{token:"support.function",next:"@template"}],[/@punctuation/,{token:"punctuation.operator",next:"@property"}],[/(varip|var)\b(\s+)((?!(?:chart\.point|linefill|polyline|matrix|series|simple|string|array|color|const|float|label|table|bool|line|box|int|map|continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)[\w.\d_$]+)(\[\]|)(\s+)((?!(?:continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)[\w\d_$]+)/,[{token:"keyword"},{token:"source"},{token:"entity.name.type"},{token:"paren"},{token:"source"},{token:"variable.other"}]],[/\b(?:@builtinTypes)(?=(\s*)[\[|<|(]|(?=\s+(?=[^.=][\w\(]*))|\s*$)/,{token:"support.type",next:"@template"}],[/^(\s*)\b(?!(?:chart\.point|linefill|polyline|matrix|series|simple|string|array|color|const|float|label|table|bool|line|box|int|map|continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)([\w.\d_$]+)(\[\]|)(\s+)((?!(?:continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)[\w\d_$]+)(\s+)(\=)/,[{token:"source"},{token:"entity.name.type"},{token:"paren"},{token:"source"},{token:"variable.other"},{token:"source"},{token:"keyword.equals"}]],[/(\((?:\s+))?((?!(?:chart\.point|linefill|polyline|continue|for\.\.\.in|matrix|series|simple|string|export|import|method|switch|array|color|const|float|label|table|break|varip|while|bool|line|else|type|enum|box|int|map|and|for|not|var|as|by|if|in|or|to)\b)\b[\w.\d_$]+(?=[\[\]]*(?:\s+)(?:[\w\d_$]+\s*(?:\,|\))+\s*).+(?:\=\>|\→)))/,"entity.name.type"],[/import(?=\s+@importName)/,{token:"keyword",next:"@import"}],[/import(?=\s+[a-zA-Z\d\$_\-\.\u00a1-\uffff\/]+)/,"keyword"],[/[+-]?\d+\.\d*([eE][\-+]?\d+)?(?!\w+)/,"constant.numeric.float"],[/[+-]?\.\d+([eE][\-+]?\d+)?(?!\w+)/,"constant.numeric.float"],[/([+-]?(\d+))(?!\w+)(?!\w+)/,"constant.numeric.integer"],[/(?:true|false)\b/,"constant.other.boolean"],[/#[0-9a-fA-F]{6,8}\b/,"constant.other.color"],[/\+=|\-=|\*=|\/=|%=|[\/%*+\-]|==|!=|<=|>=|=>|<|>|\?|\:=|\:|\,/,"keyword.operator"],[/\b(?:continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b/,"keyword"],[/^[a-zA-Z_][a-zA-Z_0-9]+(?=\s*\()/,"entity.name.function"],[/[0-9]+\b/,"constant.numeric.integer"],[/=/,"keyword.equals"],[/\b(?:strategy\.commission\.cash_per_contract|strategy\.avg_winning_trade_percent|strategy\.avg_winning_trade|strategy\.avg_losing_trade_percent|strategy\.avg_losing_trade|syminfo\.recommendations_sell_strong|syminfo\.recommendations_buy_strong|strategy\.commission\.cash_per_order|strategy\.margin_liquidation_price|strategy\.max_contracts_held_short|strategy\.max_contracts_held_long|syminfo\.shares_outstanding_float|syminfo\.shares_outstanding_total|barstate\.islastconfirmedhistory|earnings\.future_period_end_time|strategy\.max_contracts_held_all|syminfo\.target_price_estimates|strategy\.max_drawdown_percent|syminfo\.recommendations_total|alert\.freq_once_per_bar_close|label\.style_label_lower_right|label\.style_label_upper_right|chart\.right_visible_bar_time|strategy\.grossprofit_percent|strategy\.position_entry_name|syminfo\.recommendations_date|syminfo\.recommendations_hold|syminfo\.recommendations_sell|syminfo\.target_price_average|label\.style_label_lower_left|label\.style_label_upper_left|chart\.left_visible_bar_time|strategy\.openprofit_percent|strategy\.position_avg_price|syminfo\.recommendations_buy|syminfo\.target_price_median|plot\.style_stepline_diamond|strategy\.commission\.percent|session\.isfirstbar_regular|strategy\.grossloss_percent|strategy\.max_runup_percent|strategy\.netprofit_percent|strategy\.percent_of_equity|session\.islastbar_regular|strategy\.account_currency|syminfo\.target_price_date|syminfo\.target_price_high|dividends\.future_pay_date|strategy\.initial_capital|syminfo\.target_price_low|dividends\.future_ex_date|label\.style_label_center|label\.style_text_outline|label\.style_triangledown|strategy\.direction\.short|earnings\.future_revenue|alert\.freq_once_per_bar|dividends\.future_amount|label\.style_label_right|strategy\.direction\.long|strategy\.position_size|barmerge\.lookahead_off|label\.style_label_down|label\.style_label_left|label\.style_triangleup|line\.style_arrow_right|position\.bottom_center|position\.middle_center|strategy\.direction\.all|strategy\.closedtrades|strategy\.max_drawdown|barmerge\.lookahead_on|earnings\.standardized|font\.family_monospace|label\.style_arrowdown|line\.style_arrow_both|line\.style_arrow_left|plot\.style_steplinebr|position\.bottom_right|position\.middle_right|barstate\.isconfirmed|earnings\.future_time|session\.ispostmarket|strategy\.grossprofit|syminfo\.basecurrency|syminfo\.shareholders|timeframe\.isintraday|timeframe\.multiplier|adjustment\.dividends|label\.style_label_up|plot\.style_histogram|position\.bottom_left|position\.middle_left|barstate\.isrealtime|chart\.is_heikinashi|earnings\.future_eps|session\.ispremarket|strategy\.eventrades|strategy\.losstrades|strategy\.openprofit|strategy\.opentrades\.capital_held|strategy\.opentrades|syminfo\.description|timeframe\.isminutes|timeframe\.ismonthly|timeframe\.isseconds|dayofweek\.wednesday|display\.data_window|display\.price_scale|display\.status_line|font\.family_default|label\.style_arrowup|label\.style_diamond|plot\.style_stepline|position\.top_center|strategy\.oca\.cancel|strategy\.oca\.reduce|barstate\.ishistory|chart\.is_linebreak|session\.isfirstbar|strategy\.grossloss|strategy\.max_runup|strategy\.netprofit|strategy\.wintrades|syminfo\.pointvalue|syminfo\.pricescale|syminfo\.volumetype|timeframe\.isweekly|dayofweek\.saturday|dayofweek\.thursday|hline\.style_dashed|hline\.style_dotted|label\.style_circle|label\.style_square|label\.style_xcross|plot\.style_circles|plot\.style_columns|position\.top_right|shape\.triangledown|splits\.denominator|chart\.is_standard|session\.islastbar|syminfo\.employees|timeframe\.isdaily|adjustment\.splits|barmerge\.gaps_off|dayofweek\.tuesday|earnings\.estimate|hline\.style_solid|label\.style_cross|line\.style_dashed|line\.style_dotted|location\.abovebar|location\.absolute|location\.belowbar|plot\.style_areabr|plot\.style_linebr|position\.top_left|strategy\.oca\.none|text\.align_bottom|text\.align_center|barstate\.isfirst|session\.ismarket|syminfo\.currency|syminfo\.industry|syminfo\.tickerid|syminfo\.timezone|timeframe\.period|barmerge\.gaps_on|dayofweek\.friday|dayofweek\.monday|dayofweek\.sunday|label\.style_flag|label\.style_none|line\.style_solid|order\.descending|plot\.style_cross|session\.extended|shape\.triangleup|splits\.numerator|text\.align_right|barstate\.islast|strategy\.equity|syminfo\.country|syminfo\.minmove|syminfo\.mintick|syminfo\.session|time_tradingday|timeframe\.isdwm|adjustment\.none|dividends\.gross|earnings\.actual|location\.bottom|order\.ascending|plot\.style_area|plot\.style_line|session\.regular|shape\.arrowdown|shape\.labeldown|text\.align_left|barstate\.isnew|chart\.bg_color|chart\.fg_color|chart\.is_range|chart\.is_renko|last_bar_index|strategy\.short|syminfo\.prefix|syminfo\.sector|syminfo\.ticker|alert\.freq_all|format\.inherit|format\.mintick|format\.percent|strategy\.fixed|text\.align_top|text\.wrap_auto|text\.wrap_none|xloc\.bar_index|chart\.is_kagi|last_bar_time|strategy\.long|color\.fuchsia|currency\.NONE|currency\.USDT|dividends\.net|format\.volume|shape\.arrowup|shape\.diamond|shape\.labelup|strategy\.cash|xloc\.bar_time|yloc\.abovebar|yloc\.belowbar|chart\.is_pnf|linefill\.all|polyline\.all|syminfo\.root|syminfo\.type|color\.maroon|color\.orange|color\.purple|color\.silver|color\.yellow|currency\.AUD|currency\.BTC|currency\.CAD|currency\.CHF|currency\.ETH|currency\.EUR|currency\.GBP|currency\.HKD|currency\.INR|currency\.JPY|currency\.KRW|currency\.MYR|currency\.NOK|currency\.NZD|currency\.RUB|currency\.SEK|currency\.SGD|currency\.TRY|currency\.USD|currency\.ZAR|display\.none|display\.pane|extend\.right|format\.price|location\.top|shape\.circle|shape\.square|shape\.xcross|color\.black|color\.green|color\.olive|color\.white|display\.all|extend\.both|extend\.left|extend\.none|scale\.right|shape\.cross|size\.normal|dayofmonth|ta\.accdist|time_close|weekofyear|color\.aqua|color\.blue|color\.gray|color\.lime|color\.navy|color\.teal|scale\.left|scale\.none|shape\.flag|size\.large|size\.small|yloc\.price|bar_index|dayofweek|label\.all|table\.all|color\.red|math\.rphi|size\.auto|size\.huge|size\.tiny|line\.all|math\.phi|box\.all|ta\.vwap|ta\.wvad|timenow|math\.pi|minute|second|ta\.iii|ta\.nvi|ta\.obv|ta\.pvi|ta\.pvt|ta\.wad|volume|math\.e|close|hlcc4|month|ohlc4|ta\.tr|false|high|hlc3|hour|open|time|year|true|hl2|low|na)\b(?!\s*=\s*\w+)/,"support.variable"],[/[(|)|\[|\]]/,"paren"],[/[a-zA-Z_][a-zA-Z_0-9]*(?=\s*\()/,{token:"entity.name.method"}],[/\w+\b/,"variable.other"]],comments:[[/@[A-Za-z]+(\s*=\s*)?$/,{token:"comment.annotation",next:"@pop"}],[/@[A-Za-z]+(\s*=\s*)?/,{token:"comment.annotation"}],[/(?!\s*@[A-Za-z]+).+$/,{token:"comment",next:"@pop"}]],stringDouble:[[/[^\\\"]+/,"string"],[/\\./,"string.invalid"],[/\"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],stringSingle:[[/[^\\']+/,"string"],[/\\./,"string.invalid"],[/'/,{token:"string",bracket:"@close",next:"@pop"}]],template:[[/(@builtinTypes)/,{token:"support.type"}],[/(\((?:\s+))?((?!(?:chart\.point|linefill|polyline|continue|for\.\.\.in|matrix|series|simple|string|export|import|method|switch|array|color|const|float|label|table|break|varip|while|bool|line|else|type|enum|box|int|map|and|for|not|var|as|by|if|in|or|to)\b)\b[\w.\d_$]+(?=[\[\]]*(?:\s+)(?:[\w\d_$]+\s*(?:\,|\))+\s*).+(?:\=\>|\→)))/,"entity.name.type"],[/\(|\)|\[|\]|\=|\>/,{token:"paren",next:"@pop"}],[/(\,)(\s+)/,["keyword.operator","source"]],[/(\,)/,{token:"keyword.operator"}],[/([\w.\d$]+)/,{token:"entity.name.type"}],[/(<|>)/,{token:"paren"}],[/\s(?=\w)|$/,{token:"source",next:"@pop"}]],property:[[/@punctuation/,{token:"punctuation.operator"}],[/(@builtinTypes)(?=\s*[(])/,{token:"support.method",next:"@pop"}],[/[a-zA-Z_][a-zA-Z_0-9]+(?=\s*\()/,{token:"entity.name.method",next:"@pop"}],[/[a-zA-Z0-9_]+/,{token:"variable.other.property",next:"@pop"}],[/@empty/,{token:"source",next:"@pop"}]],import:[[/\s+/,{token:"source"}],[/(@importName)(\s+)(as\b)(\s+)(@importAlias)/,[{token:"entity.name.module"},{token:"source"},{token:"keyword"},{token:"source"},{token:"entity.name.module.name",next:"@pop"}]],[/@importName/,{token:"entity.name.module",next:"@pop"}]]},builtinTypes:/chart\.point|linefill|polyline|matrix|series|simple|string|array|color|const|float|label|table|bool|line|box|int|map/,punctuation:/[.](?![.])/,importName:/[a-zA-Z\d\$_\-\.\u00a1-\uffff\/]+/,importAlias:/[a-zA-Z\d\_\u00a1\uffff\/]+/,empty:/^$/};var bt;(function(a){a[a.None=0]="None",a[a.Indent=1]="Indent",a[a.IndentOutdent=2]="IndentOutdent",a[a.Outdent=3]="Outdent"})(bt||(bt={}));const on={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["(",")"],["[","]"]],folding:{markers:{start:/(\/\/#region)|(\/\/.*{($|\s))/,end:/(\/\/#endregion)|(\/\/.*}($|\s))/}},autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],onEnterRules:[{beforeText:/\)\s*=>\s*$/,action:{indentAction:bt.Indent}},{beforeText:/if\s+.*\s*$/,action:{indentAction:bt.Indent}},{beforeText:/else/,action:{indentAction:bt.Indent}},{beforeText:/for\s+\S+\s*=\s*\S+\s+to\s+\S+(?:\s+by\s+\S+)?\s*$/,action:{indentAction:bt.Indent}},{beforeText:/for\s+(?:\[\S+\s+\S+]|\S+)\s+in\s+\S+\s*$/,action:{indentAction:bt.Indent}},{beforeText:/switch\s+.*\s*$/,action:{indentAction:bt.Indent}},{beforeText:/while\s+.*\s*$/,action:{indentAction:bt.Indent}},{beforeText:/type\s+\w+/,action:{indentAction:bt.Indent}},{beforeText:/enum\s+\w+/,action:{indentAction:bt.Indent}},{beforeText:/^\s*$/,action:{indentAction:bt.Outdent}}]},k={"color-white":"#ffffff","color-black":"#000000","color-transparent":"#00000000","color-cold-gray-50":"#F8F9FD","color-cold-gray-100":"#F0F3FA","color-cold-gray-150":"#E0E3EB","color-cold-gray-200":"#D1D4DC","color-cold-gray-250":"#C1C4CD","color-cold-gray-300":"#B2B5BE","color-cold-gray-350":"#A3A6AF","color-cold-gray-400":"#9598A1","color-cold-gray-450":"#868993","color-cold-gray-500":"#787B86","color-cold-gray-550":"#6A6D78","color-cold-gray-600":"#5D606B","color-cold-gray-650":"#50535E","color-cold-gray-700":"#434651","color-cold-gray-750":"#363A45","color-cold-gray-800":"#2A2E39","color-cold-gray-850":"#1E222D","color-cold-gray-900":"#131722","color-cold-gray-950":"#0C0E15","color-ripe-red-50":"#FFEBEC","color-ripe-red-100":"#FCCBCD","color-ripe-red-200":"#FAA1A4","color-ripe-red-300":"#F77C80","color-ripe-red-400":"#F7525F","color-ripe-red-500":"#F23645","color-ripe-red-600":"#CC2F3C","color-ripe-red-700":"#B22833","color-ripe-red-800":"#991F29","color-ripe-red-900":"#801922","color-ripe-red-a100":"#FF8080","color-ripe-red-a200":"#FF5252","color-ripe-red-a400":"#FF3333","color-ripe-red-a600":"#CC2929","color-ripe-red-a700":"#802028","color-ripe-red-a800":"#4D191D","color-ripe-red-a900":"#331F20","color-tan-orange-50":"#FFF3E0","color-tan-orange-100":"#FFE0B2","color-tan-orange-200":"#FFCC80","color-tan-orange-300":"#ffb74d","color-tan-orange-400":"#FFA726","color-tan-orange-500":"#FF9800","color-tan-orange-600":"#FB8C00","color-tan-orange-700":"#F57C00","color-tan-orange-800":"#EF6C00","color-tan-orange-900":"#e65100","color-tan-orange-a200":"#ffab40","color-tan-orange-a400":"#FF9100","color-tan-orange-a600":"#CC7014","color-tan-orange-a700":"#8C541C","color-tan-orange-a800":"#593A1B","color-tan-orange-a900":"#33261A","color-iguana-green-100":"#C8E6C9","color-iguana-green-200":"#A5D6A7","color-iguana-green-300":"#81c784","color-iguana-green-400":"#66BB6A","color-iguana-green-500":"#4caf50","color-iguana-green-600":"#43a047","color-iguana-green-700":"#388e3c","color-iguana-green-800":"#2E7D32","color-iguana-green-900":"#1B5E20","color-iguana-green-a700":"#00c853","color-banana-yellow-100":"#FFF9C4","color-banana-yellow-200":"#FFF59D","color-banana-yellow-300":"#FFF176","color-banana-yellow-400":"#ffee58","color-banana-yellow-500":"#ffeb3b","color-banana-yellow-600":"#fdd835","color-banana-yellow-700":"#fbc02d","color-banana-yellow-800":"#f9a825","color-banana-yellow-900":"#F57F17","color-banana-yellow-a400":"#ffea00","color-banana-yellow-a700":"#EEDA01","color-tv-blue-50":"#E3EFFD","color-tv-blue-100":"#BBD9FB","color-tv-blue-200":"#90BFF9","color-tv-blue-300":"#5B9CF6","color-tv-blue-400":"#3179F5","color-tv-blue-500":"#2962FF","color-tv-blue-600":"#1E53E5","color-tv-blue-700":"#1848CC","color-tv-blue-800":"#143EB3","color-tv-blue-900":"#0C3299","color-tv-blue-a100":"#82b1ff","color-tv-blue-a200":"#448aff","color-tv-blue-a400":"#2979ff","color-tv-blue-a600":"#2962FF","color-tv-blue-a700":"#143A87","color-tv-blue-a800":"#142E61","color-tv-blue-a900":"#132042","color-deep-blue-50":"#EDE7F6","color-deep-blue-100":"#D1C4E9","color-deep-blue-200":"#B39DDB","color-deep-blue-300":"#9575cd","color-deep-blue-400":"#7e57c2","color-deep-blue-500":"#673ab7","color-deep-blue-700":"#512da8","color-deep-blue-800":"#4527A0","color-deep-blue-900":"#311B92","color-deep-blue-a100":"#b388ff","color-deep-blue-a200":"#7C4DFF","color-deep-blue-a400":"#651FFF","color-deep-blue-a700":"#6200EA","color-minty-green-50":"#DAF2EE","color-minty-green-100":"#ACE5DC","color-minty-green-200":"#70CCBD","color-minty-green-300":"#42BDA8","color-minty-green-400":"#22AB94","color-minty-green-500":"#089981","color-minty-green-600":"#06806B","color-minty-green-700":"#056656","color-minty-green-800":"#004D40","color-minty-green-900":"#00332A","color-minty-green-a400":"#2BD9BC","color-minty-green-a600":"#24B29B","color-minty-green-a700":"#1B7667","color-minty-green-a800":"#10443B","color-minty-green-a900":"#082621","color-grapes-purple-50":"#F3E5F5","color-grapes-purple-100":"#E1BEE7","color-grapes-purple-200":"#CE93D8","color-grapes-purple-300":"#ba68c8","color-grapes-purple-400":"#ab47bc","color-grapes-purple-500":"#9c27b0","color-grapes-purple-600":"#8e24aa","color-grapes-purple-700":"#7b1fa2","color-grapes-purple-800":"#6A1B9A","color-grapes-purple-900":"#4A148C","color-grapes-purple-a100":"#EA80FC","color-grapes-purple-a200":"#E040FB","color-grapes-purple-a400":"#D500F9","color-grapes-purple-a700":"#aa00ff","color-berry-pink-100":"#F8BBD0","color-berry-pink-200":"#f48fb1","color-berry-pink-300":"#f06292","color-berry-pink-400":"#ec407a","color-berry-pink-500":"#e91e63","color-berry-pink-600":"#D81B60","color-berry-pink-700":"#C2185B","color-berry-pink-800":"#AD1457","color-berry-pink-900":"#880E4F","color-berry-pink-a100":"#ff80ab","color-berry-pink-a200":"#ff4081","color-berry-pink-a400":"#f50057","color-sky-blue-100":"#B2EBF2","color-sky-blue-200":"#80DEEA","color-sky-blue-300":"#4dd0e1","color-sky-blue-400":"#26c6da","color-sky-blue-500":"#00bcd4","color-sky-blue-600":"#00acc1","color-sky-blue-700":"#0097A7","color-sky-blue-800":"#00838F","color-sky-blue-900":"#006064","color-sky-blue-a400":"#00e5ff","color-sky-blue-a700":"#00B8D4","color-deep-blue-600":"#5E35B1","color-forest-green-50":"#DAF2E6","color-forest-green-100":"#ACE5C9","color-forest-green-200":"#70CC9E","color-forest-green-300":"#42BD7F","color-forest-green-400":"#22AB67","color-forest-green-500":"#089950","color-forest-green-600":"#068043","color-forest-green-700":"#056636","color-forest-green-800":"#004D27","color-forest-green-900":"#1A3326","color-facebook":"#1877F2","color-deep-facebook":"#1564CA","color-twitter":"#1DA1F2","color-deep-twitter":"#188CD3","color-youtube":"#FF0000","color-linkedin":"#007BB5","color-seeking-alpha-brand":"#ff7200"};function Ft(a,n=1){return a+Math.round(255*Math.min(Math.max(n,0),1)).toString(16).toUpperCase().padStart(2,"0")}const ln={base:"vs",inherit:!0,rules:[{token:"comment",foreground:k["color-cold-gray-400"]},{token:"comment.annotation",fontStyle:"bold"},{token:"text",foreground:k["color-cold-gray-900"]},{token:"string",foreground:k["color-iguana-green-700"]},{token:"constant.numeric",foreground:k["color-banana-yellow-900"]},{token:"constant.language",foreground:k["color-ripe-red-a600"]},{token:"constant.other.color",foreground:k["color-ripe-red-a600"]},{token:"constant.other",foreground:k["color-ripe-red-a600"]},{token:"support.variable",foreground:k["color-ripe-red-a600"]},{token:"support.function",foreground:k["color-tv-blue-a600"]},{token:"support.type",foreground:k["color-minty-green-400"],fontStyle:"bold"},{token:"entity.name.type",foreground:k["color-minty-green-400"],fontStyle:"bold"},{token:"support.method",foreground:k["color-tv-blue-a600"]},{token:"keyword.equals",foreground:k["color-minty-green-400"]},{token:"keyword.operator",foreground:k["color-minty-green-400"]},{token:"keyword.other",foreground:k["color-minty-green-400"]},{token:"keyword",foreground:k["color-minty-green-400"]},{token:"variable.other",foreground:k["color-cold-gray-800"]},{token:"variable.other.property",foreground:k["color-cold-gray-800"]},{token:"paren",foreground:k["color-black"]},{token:"entity.name.function",foreground:k["color-tv-blue-900"]},{token:"entity.name.method",foreground:k["color-tv-blue-900"]},{token:"meta.function-call",foreground:k["color-grapes-purple-600"]},{token:"entity.name.module.name",foreground:k["color-grapes-purple-600"]},{token:"entity.name.module",foreground:k["color-tv-blue-a600"]},{token:"",background:k["color-white"]}],colors:{"editor.foreground":k["color-cold-gray-900"],"editor.background":"#00000000","editorLineNumber.foreground":k["color-cold-gray-400"],"editorLineNumber.activeForeground":k["color-cold-gray-700"],"editorHoverWidget.background":k["color-white"],"editorHoverWidget.statusBarBackground":k["color-cold-gray-150"],"editorHoverWidget.foreground":k["color-cold-gray-900"],"editorWidget.background":k["color-white"],"editorWidget.foreground":k["color-cold-gray-900"],"editorGutter.background":"#00000000","editor.foldBackground":Ft(k["color-cold-gray-200"],.5),"editor.lineHighlightBackground":k["color-tv-blue-50"],"editor.lineHighlightBorder":k["color-tv-blue-50"],"editor.rangeHighlightBackground":k["color-tv-blue-a800"],"editorBracketMatch.background":k["color-cold-gray-150"],"editor.selectionBackground":k["color-tv-blue-100"],"editor.selectionHighlightBackground":k["color-tv-blue-50"],"editor.findMatchBackground":k["color-tan-orange-100"],"editor.findMatchHighlightBackground":k["color-tan-orange-100"],"editor.findMatchBorder":k["color-tan-orange-500"],"list.foreground":k["color-cold-gray-900"],"list.hoverForeground":k["color-cold-gray-900"],"list.activeSelectionBackground":k["color-tv-blue-500"],"list.hoverBackground":k["color-tv-blue-50"],"list.focusHighlightForeground":k["color-tv-blue-100"],"list.inactiveSelectionBackground":k["color-tv-blue-500"],"keybindingLabel.background":k["color-white"],"keybindingLabel.foreground":k["color-cold-gray-900"],"keybindingLabel.border":k["color-cold-gray-150"],"input.foreground":k["color-cold-gray-900"],"textLink.foreground":k["color-tv-blue-500"],"textLink.activeForeground":k["color-tv-blue-600"],"peekViewEditor.matchHighlightBackground":k["color-tan-orange-100"],"peekViewResult.lineForeground":k["color-cold-gray-900"],"editorMarkerNavigationWarning.background":k["color-banana-yellow-800"],"inputValidation.warningBackground":k["color-banana-yellow-800"],"diffEditor.insertedTextBackground":Ft(k["color-forest-green-500"],.3),"diffEditor.insertedLineBackground":Ft(k["color-forest-green-500"],.15),"diffEditor.removedTextBackground":Ft(k["color-ripe-red-500"],.3),"diffEditor.removedLineBackground":Ft(k["color-ripe-red-500"],.15),"editorInlayHint.background":k["color-cold-gray-150"],"editorInlayHint.foreground":k["color-cold-gray-550"],"editorError.foreground":k["color-ripe-red-500"],"editorWarning.foreground":k["color-tan-orange-500"]}},cn={base:"vs-dark",inherit:!0,rules:[{token:"comment",foreground:k["color-cold-gray-500"]},{token:"comment.annotation",fontStyle:"bold"},{token:"text",foreground:k["color-white"]},{token:"string",foreground:k["color-iguana-green-700"]},{token:"constant.numeric",foreground:k["color-banana-yellow-900"]},{token:"constant.language",foreground:k["color-ripe-red-300"]},{token:"constant.other.color",foreground:k["color-ripe-red-300"]},{token:"constant.other",foreground:k["color-ripe-red-300"]},{token:"support.variable",foreground:k["color-ripe-red-300"]},{token:"support.function",foreground:k["color-tv-blue-300"]},{token:"support.method",foreground:k["color-tv-blue-300"]},{token:"support.type",foreground:k["color-minty-green-300"],fontStyle:"bold"},{token:"entity.name.type",foreground:k["color-minty-green-300"],fontStyle:"bold"},{token:"keyword.equals",foreground:k["color-minty-green-300"]},{token:"keyword.operator",foreground:k["color-minty-green-300"]},{token:"keyword.other",foreground:k["color-minty-green-300"]},{token:"keyword",foreground:k["color-minty-green-300"]},{token:"variable.other",foreground:k["color-cold-gray-200"]},{token:"variable.other.property",foreground:k["color-cold-gray-200"]},{token:"paren",foreground:k["color-white"]},{token:"entity.name.function",foreground:k["color-tv-blue-400"]},{token:"entity.name.method",foreground:k["color-tv-blue-400"]},{token:"meta.function-call",foreground:k["color-grapes-purple-300"]},{token:"entity.name.module.name",foreground:k["color-grapes-purple-300"]},{token:"entity.name.module",foreground:k["color-tv-blue-300"]},{token:"",background:k["color-cold-gray-900"]}],colors:{"editor.foreground":k["color-white"],"editor.background":k["color-cold-gray-900"],"editorLineNumber.foreground":k["color-cold-gray-500"],"editorLineNumber.activeForeground":k["color-cold-gray-300"],"editorWidget.background":k["color-cold-gray-850"],"editorHoverWidget.background":k["color-cold-gray-850"],"editorHoverWidget.foreground":k["color-cold-gray-300"],"editorHoverWidget.statusBarBackground":k["color-cold-gray-900"],"editorWidget.foreground":k["color-cold-gray-300"],"editorGutter.background":k["color-cold-gray-900"],"editor.foldBackground":Ft(k["color-cold-gray-700"],.5),"editor.lineHighlightBackground":k["color-tv-blue-a900"],"editor.lineHighlightBorder":k["color-tv-blue-a900"],"editor.rangeHighlightBackground":k["color-tv-blue-a800"],"editorBracketMatch.background":k["color-cold-gray-750"],"editor.selectionBackground":k["color-tv-blue-a800"],"editor.selectionHighlightBackground":k["color-cold-gray-800"],"list.foreground":k["color-cold-gray-350"],"list.hoverForeground":k["color-cold-gray-350"],"list.activeSelectionBackground":k["color-tv-blue-500"],"list.hoverBackground":k["color-tv-blue-900"],"list.focusHighlightForeground":k["color-tv-blue-300"],"list.inactiveSelectionBackground":k["color-tv-blue-500"],"keybindingLabel.background":k["color-cold-gray-800"],"keybindingLabel.foreground":k["color-cold-gray-300"],"keybindingLabel.border":k["color-cold-gray-700"],"input.foreground":k["color-cold-gray-350"],"textLink.foreground":k["color-tv-blue-500"],"textLink.activeForeground":k["color-tv-blue-600"],"peekViewEditor.matchHighlightBackground":k["color-tan-orange-a800"],"peekViewResult.lineForeground":k["color-cold-gray-350"],"diffEditor.insertedTextBackground":Ft(k["color-iguana-green-a700"],.3),"diffEditor.insertedLineBackground":Ft(k["color-iguana-green-a700"],.15),"diffEditor.removedTextBackground":Ft(k["color-ripe-red-a400"],.3),"diffEditor.removedLineBackground":Ft(k["color-ripe-red-a400"],.15),"editorInlayHint.background":k["color-cold-gray-800"],"editorInlayHint.foreground":k["color-cold-gray-400"],"editorError.foreground":k["color-ripe-red-500"],"editorWarning.foreground":k["color-tan-orange-700"]}},Cd=/(\\(?:[\\'"]))|(\\$)|("|$)|($)/g,zd=/(\\(?:[\\'"]))|(\\$)|('|$)|($)/g,io={"color.aqua":"#00BCD4","color.black":"#363A45","color.blue":"#2196F3","color.fuchsia":"#E040FB","color.gray":"#787B86","color.green":"#4CAF50","color.lime":"#00E676","color.maroon":"#880E4F","color.navy":"#311B92","color.olive":"#808000","color.orange":"#FF9800","color.purple":"#9C27B0","color.red":"#FF5252","color.silver":"#B2B5BE","color.teal":"#00897B","color.white":"#FFFFFF","color.yellow":"#FFEB3B"};class Sd{constructor(n){Object.defineProperty(this,"_formatter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isMac",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_getSignatureParams",{enumerable:!0,configurable:!0,writable:!0,value:(s=[],o)=>{const c=new Map,l=o.indexOf("(");for(let m=l+1,y=l;m<o.length;m++)o[m]!==","&&o[m]!==")"||(y++,c.set(o.slice(y,m),y),y=m+1);return s.map(({name:m="",displayType:y,desc:f})=>{const b=[],h=c.get(m),T=h+m.length;return b.push(this._formatter.paragraph(this._formatter.bold(m),this._formatter.italic(y||""))),f&&b.push(Array.isArray(f)?f.join(this._formatter.lineBreak):f),{label:[h,T],documentation:{value:b.join(this._formatter.lineBreak)}}})}}),this._formatter=le,this._isMac=/(Mac|iPhone|iPod|iPad)/i.test(n)}getSignatureHelpValues(n,s,o=0,c=0){var b;const l=this._getFuncItems(n);if(!(l!=null&&l.length))return null;const m=this._getSequentialSignatures(n,l),y=this._getActiveIndex(l,s),f=(b=gr.overloadsFuncs)==null?void 0:b.find(h=>h.name===n&&h.startColumn===o&&c===h.line);return f&&(y.activeSignature=Number(f.index)),{signatures:m,...y}}_getActiveIndex(n,s=[]){let o=0,c=-1;s.some(m=>!!m)||(c=s.length-1);const l=s.pop();if(l)for(const[m,y]of n.entries()){const{args:f}=y;if(f&&f.length){const b=f.findIndex(h=>h.name===l);if(b!=-1){c=b,o=m;break}}}return{activeParameter:c,activeSignature:o}}_getFuncItems(n){return lt.functions.get(n)||zt.userFuncs.get(n)||zt.methodFuncs.get(n)}_getSequentialSignatures(n,s){return s.map(o=>{const c=this._getSignatureLabel(n,o);return{label:c,documentation:this._getFormattedSignatureDocumentation(o),parameters:this._getSignatureParams(o.args,c)}})}_getSignatureLabel(n,s,o=!1){const c=[n];return o&&c.push("<type>"),s.args&&(c.push("("),c.push(s.args.map(({name:l})=>l).join(", ")),c.push(")")),c.join("")}_getFormattedSignatureDocumentation(n){const{desc:s}=n,o=[];s&&o.push(Array.isArray(s)?s.join(this._formatter.lineBreak):s);const c=`${this._formatter.code(this._isMac?"⌘":"Ctrl")} +
137
+ }`;var ce=rp(function(){return he(u,X+"return "+L).apply(s,_)});if(ce.source=L,Ci(ce))throw ce;return ce}function sx(e){return ve(e).toLowerCase()}function ax(e){return ve(e).toUpperCase()}function nx(e,t,r){if(e=ve(e),e&&(r||t===s))return dl(e);if(!e||!(t=_t(t)))return e;var i=Pt(e),p=Pt(t),u=ml(i,p),_=ul(i,p)+1;return _r(i,u,_).join("")}function ix(e,t,r){if(e=ve(e),e&&(r||t===s))return e.slice(0,_l(e)+1);if(!e||!(t=_t(t)))return e;var i=Pt(e),p=ul(i,Pt(t))+1;return _r(i,0,p).join("")}function ox(e,t,r){if(e=ve(e),e&&(r||t===s))return e.replace(ks,"");if(!e||!(t=_t(t)))return e;var i=Pt(e),p=ml(i,Pt(t));return _r(i,p).join("")}function lx(e,t){var r=ie,i=Qe;if(ze(t)){var p="separator"in t?t.separator:p;r="length"in t?oe(t.length):r,i="omission"in t?_t(t.omission):i}e=ve(e);var u=e.length;if(Hr(e)){var _=Pt(e);u=_.length}if(r>=u)return e;var x=r-Wr(i);if(x<1)return i;var v=_?_r(_,0,x).join(""):e.slice(0,x);if(p===s)return v+i;if(_&&(x+=v.length-x),zi(p)){if(e.slice(x).search(p)){var C,z=v;for(p.global||(p=Wn(p.source,ve(we.exec(p))+"g")),p.lastIndex=0;C=p.exec(z);)var L=C.index;v=v.slice(0,L===s?x:L)}}else if(e.indexOf(_t(p),x)!=x){var j=v.lastIndexOf(p);j>-1&&(v=v.slice(0,j))}return v+i}function cx(e){return e=ve(e),e&&Ts.test(e)?e.replace(Xt,Ou):e}var px=Jr(function(e,t,r){return e+(r?" ":"")+t.toUpperCase()}),Ni=sc("toUpperCase");function tp(e,t,r){return e=ve(e),t=r?s:t,t===s?Eu(e)?Bu(e):Tu(e):e.match(t)||[]}var rp=pe(function(e,t){try{return ut(e,s,t)}catch(r){return Ci(r)?r:new ae(r)}}),dx=Jt(function(e,t){return Tt(t,function(r){r=Ht(r),Qt(e,r,Ai(e[r],e))}),e});function mx(e){var t=e==null?0:e.length,r=Z();return e=t?qe(e,function(i){if(typeof i[1]!="function")throw new Dt(m);return[r(i[0]),i[1]]}):[],pe(function(i){for(var p=-1;++p<t;){var u=e[p];if(ut(u[0],this,i))return ut(u[1],this,i)}})}function ux(e){return Oy(It(e,T))}function Li(e){return function(){return e}}function yx(e,t){return e==null||e!==e?t:e}var _x=nc(),fx=nc(!0);function ot(e){return e}function Mi(e){return Ml(typeof e=="function"?e:It(e,T))}function gx(e){return Ol(It(e,T))}function bx(e,t){return Rl(e,It(t,T))}var xx=pe(function(e,t){return function(r){return Ls(r,e,t)}}),hx=pe(function(e,t){return function(r){return Ls(e,r,t)}});function Pi(e,t,r){var i=je(t),p=La(t,i);r==null&&!(ze(t)&&(p.length||!i.length))&&(r=t,t=e,e=this,p=La(t,je(t)));var u=!(ze(r)&&"chain"in r)||!!r.chain,_=tr(e);return Tt(p,function(x){var v=t[x];e[x]=v,_&&(e.prototype[x]=function(){var C=this.__chain__;if(u||C){var z=e(this.__wrapped__),L=z.__actions__=at(this.__actions__);return L.push({func:v,args:arguments,thisArg:e}),z.__chain__=C,z}return v.apply(e,cr([this.value()],arguments))})}),e}function wx(){return We._===this&&(We._=Wu),this}function Oi(){}function vx(e){return e=oe(e),pe(function(t){return Fl(t,e)})}var Tx=yi(qe),Dx=yi(il),kx=yi(Fn);function sp(e){return wi(e)?Bn(Ht(e)):e_(e)}function Ix(e){return function(t){return e==null?s:qr(e,t)}}var Ax=oc(),qx=oc(!0);function Ri(){return[]}function Fi(){return!1}function Cx(){return{}}function zx(){return""}function Sx(){return!0}function Ex(e,t){if(e=oe(e),e<1||e>Me)return[];var r=se,i=Ve(e,se);t=Z(t),e-=se;for(var p=$n(i,t);++r<e;)t(r);return p}function Nx(e){return ne(e)?qe(e,Ht):ft(e)?[e]:at(Tc(ve(e)))}function Lx(e){var t=++ju;return ve(e)+t}var Mx=Ba(function(e,t){return e+t},0),Px=_i("ceil"),Ox=Ba(function(e,t){return e/t},1),Rx=_i("floor");function Fx(e){return e&&e.length?Na(e,ot,ei):s}function Bx(e,t){return e&&e.length?Na(e,Z(t,2),ei):s}function Ux(e){return cl(e,ot)}function Kx(e,t){return cl(e,Z(t,2))}function $x(e){return e&&e.length?Na(e,ot,ai):s}function jx(e,t){return e&&e.length?Na(e,Z(t,2),ai):s}var Hx=Ba(function(e,t){return e*t},1),Wx=_i("round"),Gx=Ba(function(e,t){return e-t},0);function Xx(e){return e&&e.length?Kn(e,ot):0}function Vx(e,t){return e&&e.length?Kn(e,Z(t,2)):0}return d.after=gg,d.ary=Lc,d.assign=ab,d.assignIn=Xc,d.assignInWith=Ja,d.assignWith=nb,d.at=ib,d.before=Mc,d.bind=Ai,d.bindAll=dx,d.bindKey=Pc,d.castArray=Cg,d.chain=Sc,d.chunk=O_,d.compact=R_,d.concat=F_,d.cond=mx,d.conforms=ux,d.constant=Li,d.countBy=Xf,d.create=ob,d.curry=Oc,d.curryRight=Rc,d.debounce=Fc,d.defaults=lb,d.defaultsDeep=cb,d.defer=bg,d.delay=xg,d.difference=B_,d.differenceBy=U_,d.differenceWith=K_,d.drop=$_,d.dropRight=j_,d.dropRightWhile=H_,d.dropWhile=W_,d.fill=G_,d.filter=Yf,d.flatMap=Jf,d.flatMapDeep=eg,d.flatMapDepth=tg,d.flatten=Ac,d.flattenDeep=X_,d.flattenDepth=V_,d.flip=hg,d.flow=_x,d.flowRight=fx,d.fromPairs=Y_,d.functions=fb,d.functionsIn=gb,d.groupBy=rg,d.initial=Z_,d.intersection=J_,d.intersectionBy=ef,d.intersectionWith=tf,d.invert=xb,d.invertBy=hb,d.invokeMap=ag,d.iteratee=Mi,d.keyBy=ng,d.keys=je,d.keysIn=it,d.map=Ga,d.mapKeys=vb,d.mapValues=Tb,d.matches=gx,d.matchesProperty=bx,d.memoize=Va,d.merge=Db,d.mergeWith=Vc,d.method=xx,d.methodOf=hx,d.mixin=Pi,d.negate=Ya,d.nthArg=vx,d.omit=kb,d.omitBy=Ib,d.once=wg,d.orderBy=ig,d.over=Tx,d.overArgs=vg,d.overEvery=Dx,d.overSome=kx,d.partial=qi,d.partialRight=Bc,d.partition=og,d.pick=Ab,d.pickBy=Yc,d.property=sp,d.propertyOf=Ix,d.pull=nf,d.pullAll=Cc,d.pullAllBy=of,d.pullAllWith=lf,d.pullAt=cf,d.range=Ax,d.rangeRight=qx,d.rearg=Tg,d.reject=pg,d.remove=pf,d.rest=Dg,d.reverse=ki,d.sampleSize=mg,d.set=Cb,d.setWith=zb,d.shuffle=ug,d.slice=df,d.sortBy=fg,d.sortedUniq=bf,d.sortedUniqBy=xf,d.split=Jb,d.spread=kg,d.tail=hf,d.take=wf,d.takeRight=vf,d.takeRightWhile=Tf,d.takeWhile=Df,d.tap=Ff,d.throttle=Ig,d.thru=Wa,d.toArray=Hc,d.toPairs=Qc,d.toPairsIn=Zc,d.toPath=Nx,d.toPlainObject=Gc,d.transform=Sb,d.unary=Ag,d.union=kf,d.unionBy=If,d.unionWith=Af,d.uniq=qf,d.uniqBy=Cf,d.uniqWith=zf,d.unset=Eb,d.unzip=Ii,d.unzipWith=zc,d.update=Nb,d.updateWith=Lb,d.values=rs,d.valuesIn=Mb,d.without=Sf,d.words=tp,d.wrap=qg,d.xor=Ef,d.xorBy=Nf,d.xorWith=Lf,d.zip=Mf,d.zipObject=Pf,d.zipObjectDeep=Of,d.zipWith=Rf,d.entries=Qc,d.entriesIn=Zc,d.extend=Xc,d.extendWith=Ja,Pi(d,d),d.add=Mx,d.attempt=rp,d.camelCase=Fb,d.capitalize=Jc,d.ceil=Px,d.clamp=Pb,d.clone=zg,d.cloneDeep=Eg,d.cloneDeepWith=Ng,d.cloneWith=Sg,d.conformsTo=Lg,d.deburr=ep,d.defaultTo=yx,d.divide=Ox,d.endsWith=Bb,d.eq=Rt,d.escape=Ub,d.escapeRegExp=Kb,d.every=Vf,d.find=Qf,d.findIndex=kc,d.findKey=pb,d.findLast=Zf,d.findLastIndex=Ic,d.findLastKey=db,d.floor=Rx,d.forEach=Ec,d.forEachRight=Nc,d.forIn=mb,d.forInRight=ub,d.forOwn=yb,d.forOwnRight=_b,d.get=Si,d.gt=Mg,d.gte=Pg,d.has=bb,d.hasIn=Ei,d.head=qc,d.identity=ot,d.includes=sg,d.indexOf=Q_,d.inRange=Ob,d.invoke=wb,d.isArguments=Sr,d.isArray=ne,d.isArrayBuffer=Og,d.isArrayLike=nt,d.isArrayLikeObject=Oe,d.isBoolean=Rg,d.isBuffer=fr,d.isDate=Fg,d.isElement=Bg,d.isEmpty=Ug,d.isEqual=Kg,d.isEqualWith=$g,d.isError=Ci,d.isFinite=jg,d.isFunction=tr,d.isInteger=Uc,d.isLength=Qa,d.isMap=Kc,d.isMatch=Hg,d.isMatchWith=Wg,d.isNaN=Gg,d.isNative=Xg,d.isNil=Yg,d.isNull=Vg,d.isNumber=$c,d.isObject=ze,d.isObjectLike=Le,d.isPlainObject=Bs,d.isRegExp=zi,d.isSafeInteger=Qg,d.isSet=jc,d.isString=Za,d.isSymbol=ft,d.isTypedArray=ts,d.isUndefined=Zg,d.isWeakMap=Jg,d.isWeakSet=eb,d.join=rf,d.kebabCase=$b,d.last=qt,d.lastIndexOf=sf,d.lowerCase=jb,d.lowerFirst=Hb,d.lt=tb,d.lte=rb,d.max=Fx,d.maxBy=Bx,d.mean=Ux,d.meanBy=Kx,d.min=$x,d.minBy=jx,d.stubArray=Ri,d.stubFalse=Fi,d.stubObject=Cx,d.stubString=zx,d.stubTrue=Sx,d.multiply=Hx,d.nth=af,d.noConflict=wx,d.noop=Oi,d.now=Xa,d.pad=Wb,d.padEnd=Gb,d.padStart=Xb,d.parseInt=Vb,d.random=Rb,d.reduce=lg,d.reduceRight=cg,d.repeat=Yb,d.replace=Qb,d.result=qb,d.round=Wx,d.runInContext=w,d.sample=dg,d.size=yg,d.snakeCase=Zb,d.some=_g,d.sortedIndex=mf,d.sortedIndexBy=uf,d.sortedIndexOf=yf,d.sortedLastIndex=_f,d.sortedLastIndexBy=ff,d.sortedLastIndexOf=gf,d.startCase=ex,d.startsWith=tx,d.subtract=Gx,d.sum=Xx,d.sumBy=Vx,d.template=rx,d.times=Ex,d.toFinite=rr,d.toInteger=oe,d.toLength=Wc,d.toLower=sx,d.toNumber=Ct,d.toSafeInteger=sb,d.toString=ve,d.toUpper=ax,d.trim=nx,d.trimEnd=ix,d.trimStart=ox,d.truncate=lx,d.unescape=cx,d.uniqueId=Lx,d.upperCase=px,d.upperFirst=Ni,d.each=Ec,d.eachRight=Nc,d.first=qc,Pi(d,function(){var e={};return $t(d,function(t,r){Te.call(d.prototype,r)||(e[r]=t)}),e}(),{chain:!1}),d.VERSION=o,Tt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){d[e].placeholder=d}),Tt(["drop","take"],function(e,t){ye.prototype[e]=function(r){r=r===s?1:Be(oe(r),0);var i=this.__filtered__&&!t?new ye(this):this.clone();return i.__filtered__?i.__takeCount__=Ve(r,i.__takeCount__):i.__views__.push({size:Ve(r,se),type:e+(i.__dir__<0?"Right":"")}),i},ye.prototype[e+"Right"]=function(r){return this.reverse()[e](r).reverse()}}),Tt(["filter","map","takeWhile"],function(e,t){var r=t+1,i=r==Ke||r==be;ye.prototype[e]=function(p){var u=this.clone();return u.__iteratees__.push({iteratee:Z(p,3),type:r}),u.__filtered__=u.__filtered__||i,u}}),Tt(["head","last"],function(e,t){var r="take"+(t?"Right":"");ye.prototype[e]=function(){return this[r](1).value()[0]}}),Tt(["initial","tail"],function(e,t){var r="drop"+(t?"":"Right");ye.prototype[e]=function(){return this.__filtered__?new ye(this):this[r](1)}}),ye.prototype.compact=function(){return this.filter(ot)},ye.prototype.find=function(e){return this.filter(e).head()},ye.prototype.findLast=function(e){return this.reverse().find(e)},ye.prototype.invokeMap=pe(function(e,t){return typeof e=="function"?new ye(this):this.map(function(r){return Ls(r,e,t)})}),ye.prototype.reject=function(e){return this.filter(Ya(Z(e)))},ye.prototype.slice=function(e,t){e=oe(e);var r=this;return r.__filtered__&&(e>0||t<0)?new ye(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==s&&(t=oe(t),r=t<0?r.dropRight(-t):r.take(t-e)),r)},ye.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},ye.prototype.toArray=function(){return this.take(se)},$t(ye.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),p=d[i?"take"+(t=="last"?"Right":""):t],u=i||/^find/.test(t);p&&(d.prototype[t]=function(){var _=this.__wrapped__,x=i?[1]:arguments,v=_ instanceof ye,C=x[0],z=v||ne(_),L=function(me){var _e=p.apply(d,cr([me],x));return i&&j?_e[0]:_e};z&&r&&typeof C=="function"&&C.length!=1&&(v=z=!1);var j=this.__chain__,X=!!this.__actions__.length,ee=u&&!j,ce=v&&!X;if(!u&&z){_=ce?_:new ye(this);var te=e.apply(_,x);return te.__actions__.push({func:Wa,args:[L],thisArg:s}),new kt(te,j)}return ee&&ce?e.apply(this,x):(te=this.thru(L),ee?i?te.value()[0]:te.value():te)})}),Tt(["pop","push","shift","sort","splice","unshift"],function(e){var t=ba[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);d.prototype[e]=function(){var p=arguments;if(i&&!this.__chain__){var u=this.value();return t.apply(ne(u)?u:[],p)}return this[r](function(_){return t.apply(ne(_)?_:[],p)})}}),$t(ye.prototype,function(e,t){var r=d[t];if(r){var i=r.name+"";Te.call(Yr,i)||(Yr[i]=[]),Yr[i].push({name:t,func:r})}}),Yr[Fa(s,V).name]=[{name:"wrapper",func:s}],ye.prototype.clone=ly,ye.prototype.reverse=cy,ye.prototype.value=py,d.prototype.at=Bf,d.prototype.chain=Uf,d.prototype.commit=Kf,d.prototype.next=$f,d.prototype.plant=Hf,d.prototype.reverse=Wf,d.prototype.toJSON=d.prototype.valueOf=d.prototype.value=Gf,d.prototype.first=d.prototype.head,As&&(d.prototype[As]=jf),d},Gr=Uu();Tr?((Tr.exports=Gr)._=Gr,Mn._=Gr):We._=Gr}).call(ss)}(Ws,Ws.exports);var qd=Ws.exports;const Se="tccScript",Nr={builtinFunctions:/strategy\.closedtrades\.max_drawdown_percent|strategy\.opentrades\.max_drawdown_percent|strategy\.risk\.max_intraday_filled_orders|strategy\.closedtrades\.max_runup_percent|array\.percentile_linear_interpolation|strategy\.closedtrades\.entry_bar_index|strategy\.opentrades\.max_runup_percent|strategy\.closedtrades\.exit_bar_index|strategy\.closedtrades\.profit_percent|strategy\.closedtrades\.entry_comment|strategy\.opentrades\.entry_bar_index|strategy\.closedtrades\.exit_comment|strategy\.closedtrades\.max_drawdown|strategy\.opentrades\.profit_percent|ta\.percentile_linear_interpolation|strategy\.closedtrades\.entry_price|strategy\.opentrades\.entry_comment|strategy\.closedtrades\.commission|strategy\.closedtrades\.entry_time|strategy\.closedtrades\.exit_price|strategy\.opentrades\.max_drawdown|strategy\.risk\.max_cons_loss_days|strategy\.closedtrades\.exit_time|strategy\.closedtrades\.max_runup|strategy\.opentrades\.entry_price|strategy\.risk\.max_intraday_loss|strategy\.risk\.max_position_size|table\.cell_set_text_font_family|strategy\.closedtrades\.entry_id|strategy\.opentrades\.commission|strategy\.opentrades\.entry_time|array\.binary_search_rightmost|array\.percentile_nearest_rank|strategy\.closedtrades\.exit_id|strategy\.opentrades\.max_runup|array\.binary_search_leftmost|strategy\.closedtrades\.profit|strategy\.opentrades\.entry_id|strategy\.risk\.allow_entry_in|strategy\.convert_to_account|box\.set_bottom_right_point|label\.set_text_font_family|strategy\.closedtrades\.size|strategy\.convert_to_symbol|strategy\.default_entry_qty|strategy\.opentrades\.profit|strategy\.risk\.max_drawdown|ta\.percentile_nearest_rank|table\.cell_set_text_halign|table\.cell_set_text_valign|request\.security_lower_tf|table\.cell_set_text_color|box\.set_text_font_family|strategy\.opentrades\.size|table\.cell_set_text_size|matrix\.is_antisymmetric|box\.set_top_left_point|chart\.point\.from_index|matrix\.is_antidiagonal|table\.cell_set_bgcolor|table\.cell_set_tooltip|table\.set_border_color|table\.set_border_width|timeframe\.from_seconds|chart\.point\.from_time|line\.set_second_point|math\.round_to_mintick|matrix\.elements_count|request\.currency_rate|ta\.pivot_point_levels|table\.cell_set_height|table\.set_frame_color|table\.set_frame_width|box\.set_border_color|box\.set_border_style|box\.set_border_width|line\.set_first_point|matrix\.is_stochastic|matrix\.is_triangular|table\.cell_set_width|timeframe\.in_seconds|array\.binary_search|box\.set_rightbottom|box\.set_text_halign|box\.set_text_valign|color\.from_gradient|label\.set_textalign|label\.set_textcolor|matrix\.eigenvectors|matrix\.is_symmetric|matrix\.swap_columns|strategy\.cancel_all|table\.cell_set_text|array\.new_linefill|array\.sort_indices|box\.set_text_color|linefill\.get_line1|linefill\.get_line2|linefill\.set_color|matrix\.eigenvalues|matrix\.is_diagonal|matrix\.is_identity|strategy\.close_all|table\.set_position|ticker\.pointfigure|array\.lastindexof|array\.percentrank|array\.standardize|box\.set_text_size|box\.set_text_wrap|label\.set_tooltip|matrix\.remove_col|matrix\.remove_row|request\.dividends|request\.financial|table\.merge_cells|table\.set_bgcolor|ticker\.heikinashi|array\.covariance|array\.new_string|chart\.point\.copy|matrix\.is_binary|matrix\.is_square|matrix\.submatrix|matrix\.swap_rows|matrix\.transpose|request\.earnings|request\.economic|request\.security|ticker\.linebreak|timeframe\.change|array\.new_color|array\.new_float|array\.new_label|array\.new_table|box\.set_bgcolor|box\.set_lefttop|chart\.point\.new|chart\.point\.now|input\.text_area|input\.timeframe|label\.set_color|label\.set_point|label\.set_style|line\.set_extend|linefill\.delete|polyline\.delete|str\.format_time|str\.replace_all|strategy\.cancel|ticker\.standard|alertcondition|array\.includes|array\.new_bool|array\.new_line|array\.variance|box\.get_bottom|box\.set_bottom|box\.set_extend|label\.get_text|label\.set_size|label\.set_text|label\.set_xloc|label\.set_yloc|line\.get_price|line\.set_color|line\.set_style|line\.set_width|math\.todegrees|math\.toradians|matrix\.add_col|matrix\.add_row|matrix\.columns|matrix\.is_zero|matrix\.reshape|matrix\.reverse|request\.quandl|request\.splits|str\.startswith|strategy\.close|strategy\.entry|strategy\.order|syminfo\.prefix|syminfo\.ticker|ta\.correlation|ta\.highestbars|ta\.percentrank|ticker\.inherit|array\.indexof|array\.new_box|array\.new_int|array\.reverse|array\.unshift|box\.get_right|box\.set_right|input\.session|line\.set_xloc|matrix\.concat|matrix\.median|max_bars_back|runtime\.error|str\.substring|strategy\.exit|ta\.crossunder|ta\.lowestbars|ta\.supertrend|ticker\.modify|array\.concat|array\.insert|array\.median|array\.remove|box\.get_left|box\.set_left|box\.set_text|input\.source|input\.string|input\.symbol|label\.delete|label\.set_xy|line\.set_xy1|line\.set_xy2|linefill\.new|map\.contains|matrix\.trace|polyline\.new|request\.seed|str\.contains|str\.endswith|str\.tonumber|str\.tostring|ta\.barssince|ta\.crossover|ta\.pivothigh|ta\.valuewhen|table\.delete|ticker\.renko|array\.clear|array\.every|array\.first|array\.range|array\.shift|array\.slice|array\.stdev|box\.get_top|box\.set_top|input\.color|input\.float|input\.price|label\.get_x|label\.get_y|label\.set_x|label\.set_y|line\.delete|line\.get_x1|line\.get_x2|line\.get_y1|line\.get_y2|line\.set_x1|line\.set_x2|line\.set_y1|line\.set_y2|log\.warning|map\.put_all|math\.random|matrix\.copy|matrix\.diff|matrix\.fill|matrix\.kron|matrix\.mode|matrix\.mult|matrix\.pinv|matrix\.rank|matrix\.rows|matrix\.sort|str\.replace|ta\.pivotlow|ta\.variance|table\.clear|ticker\.kagi|array\.copy|array\.fill|array\.from|array\.join|array\.last|array\.mode|array\.push|array\.size|array\.some|array\.sort|box\.delete|dayofmonth|input\.bool|input\.time|label\.copy|map\.remove|map\.values|math\.floor|math\.log10|math\.round|matrix\.avg|matrix\.col|matrix\.det|matrix\.get|matrix\.inv|matrix\.max|matrix\.min|matrix\.new|matrix\.pow|matrix\.row|matrix\.set|matrix\.sum|plotcandle|str\.format|str\.length|ta\.falling|ta\.highest|table\.cell|ticker\.new|time_close|weekofyear|array\.abs|array\.avg|array\.get|array\.max|array\.min|array\.new|array\.pop|array\.set|array\.sum|color\.new|color\.rgb|dayofweek|indicator|input\.int|label\.new|line\.copy|log\.error|map\.clear|math\.acos|math\.asin|math\.atan|input\.enum|math\.ceil|math\.sign|math\.sqrt|plotarrow|plotshape|str\.lower|str\.match|str\.split|str\.upper|ta\.change|ta\.linreg|ta\.lowest|ta\.median|ta\.rising|table\.new|timestamp|barcolor|box\.copy|line\.new|linefill|log\.info|map\.copy|map\.keys|map\.size|math\.abs|math\.avg|math\.cos|math\.exp|math\.log|math\.max|math\.min|math\.pow|math\.sin|math\.sum|math\.tan|plotchar|strategy|ta\.cross|ta\.range|ta\.stdev|ta\.stoch|bgcolor|box\.new|color\.b|color\.g|color\.r|color\.t|library|map\.get|map\.new|map\.put|plotbar|str\.pos|ta\.alma|ta\.macd|ta\.mode|ta\.swma|ta\.vwap|ta\.vwma|fixnan|minute|second|string|ta\.atr|ta\.bbw|ta\.cci|ta\.cmo|ta\.cog|ta\.cum|ta\.dev|ta\.dmi|ta\.ema|ta\.hma|ta\.kcw|ta\.max|ta\.mfi|ta\.min|ta\.mom|ta\.rma|ta\.roc|ta\.rsi|ta\.sar|ta\.sma|ta\.tsi|ta\.wma|ta\.wpr|alert|color|float|hline|input|label|month|ta\.bb|ta\.kc|ta\.tr|table|bool|fill|hour|line|plot|time|year|box|int|na|nz/,keywords:/continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to/,tokenizer:{root:[[/\/\/\s*(?=@)/,"comment","@comments"],[/\/\/.*(?!@).*/,"comment"],[/\'([^\'\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/\"/,{token:"string",bracket:"@open",next:"@stringDouble"}],[/(type|enum)\s+[a-zA-Z]\w*/,"entity.name.type"],[/'/,{token:"string",bracket:"@open",next:"@stringSingle"}],[/(@builtinFunctions)(?=\s*\(|\s*<.*>)/,{token:"support.function",next:"@template"}],[/@punctuation/,{token:"punctuation.operator",next:"@property"}],[/(varip|var)\b(\s+)((?!(?:chart\.point|linefill|polyline|matrix|series|simple|string|array|color|const|float|label|table|bool|line|box|int|map|continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)[\w.\d_$]+)(\[\]|)(\s+)((?!(?:continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)[\w\d_$]+)/,[{token:"keyword"},{token:"source"},{token:"entity.name.type"},{token:"paren"},{token:"source"},{token:"variable.other"}]],[/\b(?:@builtinTypes)(?=(\s*)[\[|<|(]|(?=\s+(?=[^.=][\w\(]*))|\s*$)/,{token:"support.type",next:"@template"}],[/^(\s*)\b(?!(?:chart\.point|linefill|polyline|matrix|series|simple|string|array|color|const|float|label|table|bool|line|box|int|map|continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)([\w.\d_$]+)(\[\]|)(\s+)((?!(?:continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)[\w\d_$]+)(\s+)(\=)/,[{token:"source"},{token:"entity.name.type"},{token:"paren"},{token:"source"},{token:"variable.other"},{token:"source"},{token:"keyword.equals"}]],[/(\((?:\s+))?((?!(?:chart\.point|linefill|polyline|continue|for\.\.\.in|matrix|series|simple|string|export|import|method|switch|array|color|const|float|label|table|break|varip|while|bool|line|else|type|enum|box|int|map|and|for|not|var|as|by|if|in|or|to)\b)\b[\w.\d_$]+(?=[\[\]]*(?:\s+)(?:[\w\d_$]+\s*(?:\,|\))+\s*).+(?:\=\>|\→)))/,"entity.name.type"],[/import(?=\s+@importName)/,{token:"keyword",next:"@import"}],[/import(?=\s+[a-zA-Z\d\$_\-\.\u00a1-\uffff\/]+)/,"keyword"],[/[+-]?\d+\.\d*([eE][\-+]?\d+)?(?!\w+)/,"constant.numeric.float"],[/[+-]?\.\d+([eE][\-+]?\d+)?(?!\w+)/,"constant.numeric.float"],[/([+-]?(\d+))(?!\w+)(?!\w+)/,"constant.numeric.integer"],[/(?:true|false)\b/,"constant.other.boolean"],[/#[0-9a-fA-F]{6,8}\b/,"constant.other.color"],[/\+=|\-=|\*=|\/=|%=|[\/%*+\-]|==|!=|<=|>=|=>|<|>|\?|\:=|\:|\,/,"keyword.operator"],[/\b(?:continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b/,"keyword"],[/^[a-zA-Z_][a-zA-Z_0-9]+(?=\s*\()/,"entity.name.function"],[/[0-9]+\b/,"constant.numeric.integer"],[/=/,"keyword.equals"],[/\b(?:strategy\.commission\.cash_per_contract|strategy\.avg_winning_trade_percent|strategy\.avg_winning_trade|strategy\.avg_losing_trade_percent|strategy\.avg_losing_trade|syminfo\.recommendations_sell_strong|syminfo\.recommendations_buy_strong|strategy\.commission\.cash_per_order|strategy\.margin_liquidation_price|strategy\.max_contracts_held_short|strategy\.max_contracts_held_long|syminfo\.shares_outstanding_float|syminfo\.shares_outstanding_total|barstate\.islastconfirmedhistory|earnings\.future_period_end_time|strategy\.max_contracts_held_all|syminfo\.target_price_estimates|strategy\.max_drawdown_percent|syminfo\.recommendations_total|alert\.freq_once_per_bar_close|label\.style_label_lower_right|label\.style_label_upper_right|chart\.right_visible_bar_time|strategy\.grossprofit_percent|strategy\.position_entry_name|syminfo\.recommendations_date|syminfo\.recommendations_hold|syminfo\.recommendations_sell|syminfo\.target_price_average|label\.style_label_lower_left|label\.style_label_upper_left|chart\.left_visible_bar_time|strategy\.openprofit_percent|strategy\.position_avg_price|syminfo\.recommendations_buy|syminfo\.target_price_median|plot\.style_stepline_diamond|strategy\.commission\.percent|session\.isfirstbar_regular|strategy\.grossloss_percent|strategy\.max_runup_percent|strategy\.netprofit_percent|strategy\.percent_of_equity|session\.islastbar_regular|strategy\.account_currency|syminfo\.target_price_date|syminfo\.target_price_high|dividends\.future_pay_date|strategy\.initial_capital|syminfo\.target_price_low|dividends\.future_ex_date|label\.style_label_center|label\.style_text_outline|label\.style_triangledown|strategy\.direction\.short|earnings\.future_revenue|alert\.freq_once_per_bar|dividends\.future_amount|label\.style_label_right|strategy\.direction\.long|strategy\.position_size|barmerge\.lookahead_off|label\.style_label_down|label\.style_label_left|label\.style_triangleup|line\.style_arrow_right|position\.bottom_center|position\.middle_center|strategy\.direction\.all|strategy\.closedtrades|strategy\.max_drawdown|barmerge\.lookahead_on|earnings\.standardized|font\.family_monospace|label\.style_arrowdown|line\.style_arrow_both|line\.style_arrow_left|plot\.style_steplinebr|position\.bottom_right|position\.middle_right|barstate\.isconfirmed|earnings\.future_time|session\.ispostmarket|strategy\.grossprofit|syminfo\.basecurrency|syminfo\.shareholders|timeframe\.isintraday|timeframe\.multiplier|adjustment\.dividends|label\.style_label_up|plot\.style_histogram|position\.bottom_left|position\.middle_left|barstate\.isrealtime|chart\.is_heikinashi|earnings\.future_eps|session\.ispremarket|strategy\.eventrades|strategy\.losstrades|strategy\.openprofit|strategy\.opentrades\.capital_held|strategy\.opentrades|syminfo\.description|timeframe\.isminutes|timeframe\.ismonthly|timeframe\.isseconds|dayofweek\.wednesday|display\.data_window|display\.price_scale|display\.status_line|font\.family_default|label\.style_arrowup|label\.style_diamond|plot\.style_stepline|position\.top_center|strategy\.oca\.cancel|strategy\.oca\.reduce|barstate\.ishistory|chart\.is_linebreak|session\.isfirstbar|strategy\.grossloss|strategy\.max_runup|strategy\.netprofit|strategy\.wintrades|syminfo\.pointvalue|syminfo\.pricescale|syminfo\.volumetype|timeframe\.isweekly|dayofweek\.saturday|dayofweek\.thursday|hline\.style_dashed|hline\.style_dotted|label\.style_circle|label\.style_square|label\.style_xcross|plot\.style_circles|plot\.style_columns|position\.top_right|shape\.triangledown|splits\.denominator|chart\.is_standard|session\.islastbar|syminfo\.employees|timeframe\.isdaily|adjustment\.splits|barmerge\.gaps_off|dayofweek\.tuesday|earnings\.estimate|hline\.style_solid|label\.style_cross|line\.style_dashed|line\.style_dotted|location\.abovebar|location\.absolute|location\.belowbar|plot\.style_areabr|plot\.style_linebr|position\.top_left|strategy\.oca\.none|text\.align_bottom|text\.align_center|barstate\.isfirst|session\.ismarket|syminfo\.currency|syminfo\.industry|syminfo\.tickerid|syminfo\.timezone|timeframe\.period|barmerge\.gaps_on|dayofweek\.friday|dayofweek\.monday|dayofweek\.sunday|label\.style_flag|label\.style_none|line\.style_solid|order\.descending|plot\.style_cross|session\.extended|shape\.triangleup|splits\.numerator|text\.align_right|barstate\.islast|strategy\.equity|syminfo\.country|syminfo\.minmove|syminfo\.mintick|syminfo\.session|time_tradingday|timeframe\.isdwm|adjustment\.none|dividends\.gross|earnings\.actual|location\.bottom|order\.ascending|plot\.style_area|plot\.style_line|session\.regular|shape\.arrowdown|shape\.labeldown|text\.align_left|barstate\.isnew|chart\.bg_color|chart\.fg_color|chart\.is_range|chart\.is_renko|last_bar_index|strategy\.short|syminfo\.prefix|syminfo\.sector|syminfo\.ticker|alert\.freq_all|format\.inherit|format\.mintick|format\.percent|strategy\.fixed|text\.align_top|text\.wrap_auto|text\.wrap_none|xloc\.bar_index|chart\.is_kagi|last_bar_time|strategy\.long|color\.fuchsia|currency\.NONE|currency\.USDT|dividends\.net|format\.volume|shape\.arrowup|shape\.diamond|shape\.labelup|strategy\.cash|xloc\.bar_time|yloc\.abovebar|yloc\.belowbar|chart\.is_pnf|linefill\.all|polyline\.all|syminfo\.root|syminfo\.type|color\.maroon|color\.orange|color\.purple|color\.silver|color\.yellow|currency\.AUD|currency\.BTC|currency\.CAD|currency\.CHF|currency\.ETH|currency\.EUR|currency\.GBP|currency\.HKD|currency\.INR|currency\.JPY|currency\.KRW|currency\.MYR|currency\.NOK|currency\.NZD|currency\.RUB|currency\.SEK|currency\.SGD|currency\.TRY|currency\.USD|currency\.ZAR|display\.none|display\.pane|extend\.right|format\.price|location\.top|shape\.circle|shape\.square|shape\.xcross|color\.black|color\.green|color\.olive|color\.white|display\.all|extend\.both|extend\.left|extend\.none|scale\.right|shape\.cross|size\.normal|dayofmonth|ta\.accdist|time_close|weekofyear|color\.aqua|color\.blue|color\.gray|color\.lime|color\.navy|color\.teal|scale\.left|scale\.none|shape\.flag|size\.large|size\.small|yloc\.price|bar_index|dayofweek|label\.all|table\.all|color\.red|math\.rphi|size\.auto|size\.huge|size\.tiny|line\.all|math\.phi|box\.all|ta\.vwap|ta\.wvad|timenow|math\.pi|minute|second|ta\.iii|ta\.nvi|ta\.obv|ta\.pvi|ta\.pvt|ta\.wad|volume|math\.e|close|hlcc4|month|ohlc4|ta\.tr|false|high|hlc3|hour|open|time|year|true|hl2|low|na)\b(?!\s*=\s*\w+)/,"support.variable"],[/[(|)|\[|\]]/,"paren"],[/[a-zA-Z_][a-zA-Z_0-9]*(?=\s*\()/,{token:"entity.name.method"}],[/\w+\b/,"variable.other"]],comments:[[/@[A-Za-z]+(\s*=\s*)?$/,{token:"comment.annotation",next:"@pop"}],[/@[A-Za-z]+(\s*=\s*)?/,{token:"comment.annotation"}],[/(?!\s*@[A-Za-z]+).+$/,{token:"comment",next:"@pop"}]],stringDouble:[[/[^\\\"]+/,"string"],[/\\./,"string.invalid"],[/\"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],stringSingle:[[/[^\\']+/,"string"],[/\\./,"string.invalid"],[/'/,{token:"string",bracket:"@close",next:"@pop"}]],template:[[/(@builtinTypes)/,{token:"support.type"}],[/(\((?:\s+))?((?!(?:chart\.point|linefill|polyline|continue|for\.\.\.in|matrix|series|simple|string|export|import|method|switch|array|color|const|float|label|table|break|varip|while|bool|line|else|type|enum|box|int|map|and|for|not|var|as|by|if|in|or|to)\b)\b[\w.\d_$]+(?=[\[\]]*(?:\s+)(?:[\w\d_$]+\s*(?:\,|\))+\s*).+(?:\=\>|\→)))/,"entity.name.type"],[/\(|\)|\[|\]|\=|\>/,{token:"paren",next:"@pop"}],[/(\,)(\s+)/,["keyword.operator","source"]],[/(\,)/,{token:"keyword.operator"}],[/([\w.\d$]+)/,{token:"entity.name.type"}],[/(<|>)/,{token:"paren"}],[/\s(?=\w)|$/,{token:"source",next:"@pop"}]],property:[[/@punctuation/,{token:"punctuation.operator"}],[/(@builtinTypes)(?=\s*[(])/,{token:"support.method",next:"@pop"}],[/[a-zA-Z_][a-zA-Z_0-9]+(?=\s*\()/,{token:"entity.name.method",next:"@pop"}],[/[a-zA-Z0-9_]+/,{token:"variable.other.property",next:"@pop"}],[/@empty/,{token:"source",next:"@pop"}]],import:[[/\s+/,{token:"source"}],[/(@importName)(\s+)(as\b)(\s+)(@importAlias)/,[{token:"entity.name.module"},{token:"source"},{token:"keyword"},{token:"source"},{token:"entity.name.module.name",next:"@pop"}]],[/@importName/,{token:"entity.name.module",next:"@pop"}]]},builtinTypes:/chart\.point|linefill|polyline|matrix|series|simple|string|array|color|const|float|label|table|bool|line|box|int|map/,punctuation:/[.](?![.])/,importName:/[a-zA-Z\d\$_\-\.\u00a1-\uffff\/]+/,importAlias:/[a-zA-Z\d\_\u00a1\uffff\/]+/,empty:/^$/};var xt;(function(a){a[a.None=0]="None",a[a.Indent=1]="Indent",a[a.IndentOutdent=2]="IndentOutdent",a[a.Outdent=3]="Outdent"})(xt||(xt={}));const on={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["(",")"],["[","]"]],folding:{markers:{start:/(\/\/#region)|(\/\/.*{($|\s))/,end:/(\/\/#endregion)|(\/\/.*}($|\s))/}},autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],onEnterRules:[{beforeText:/\)\s*=>\s*$/,action:{indentAction:xt.Indent}},{beforeText:/if\s+.*\s*$/,action:{indentAction:xt.Indent}},{beforeText:/else/,action:{indentAction:xt.Indent}},{beforeText:/for\s+\S+\s*=\s*\S+\s+to\s+\S+(?:\s+by\s+\S+)?\s*$/,action:{indentAction:xt.Indent}},{beforeText:/for\s+(?:\[\S+\s+\S+]|\S+)\s+in\s+\S+\s*$/,action:{indentAction:xt.Indent}},{beforeText:/switch\s+.*\s*$/,action:{indentAction:xt.Indent}},{beforeText:/while\s+.*\s*$/,action:{indentAction:xt.Indent}},{beforeText:/type\s+\w+/,action:{indentAction:xt.Indent}},{beforeText:/enum\s+\w+/,action:{indentAction:xt.Indent}},{beforeText:/^\s*$/,action:{indentAction:xt.Outdent}}]},k={"color-white":"#ffffff","color-black":"#000000","color-transparent":"#00000000","color-cold-gray-50":"#F8F9FD","color-cold-gray-100":"#F0F3FA","color-cold-gray-150":"#E0E3EB","color-cold-gray-200":"#D1D4DC","color-cold-gray-250":"#C1C4CD","color-cold-gray-300":"#B2B5BE","color-cold-gray-350":"#A3A6AF","color-cold-gray-400":"#9598A1","color-cold-gray-450":"#868993","color-cold-gray-500":"#787B86","color-cold-gray-550":"#6A6D78","color-cold-gray-600":"#5D606B","color-cold-gray-650":"#50535E","color-cold-gray-700":"#434651","color-cold-gray-750":"#363A45","color-cold-gray-800":"#2A2E39","color-cold-gray-850":"#1E222D","color-cold-gray-900":"#131722","color-cold-gray-950":"#0C0E15","color-ripe-red-50":"#FFEBEC","color-ripe-red-100":"#FCCBCD","color-ripe-red-200":"#FAA1A4","color-ripe-red-300":"#F77C80","color-ripe-red-400":"#F7525F","color-ripe-red-500":"#F23645","color-ripe-red-600":"#CC2F3C","color-ripe-red-700":"#B22833","color-ripe-red-800":"#991F29","color-ripe-red-900":"#801922","color-ripe-red-a100":"#FF8080","color-ripe-red-a200":"#FF5252","color-ripe-red-a400":"#FF3333","color-ripe-red-a600":"#CC2929","color-ripe-red-a700":"#802028","color-ripe-red-a800":"#4D191D","color-ripe-red-a900":"#331F20","color-tan-orange-50":"#FFF3E0","color-tan-orange-100":"#FFE0B2","color-tan-orange-200":"#FFCC80","color-tan-orange-300":"#ffb74d","color-tan-orange-400":"#FFA726","color-tan-orange-500":"#FF9800","color-tan-orange-600":"#FB8C00","color-tan-orange-700":"#F57C00","color-tan-orange-800":"#EF6C00","color-tan-orange-900":"#e65100","color-tan-orange-a200":"#ffab40","color-tan-orange-a400":"#FF9100","color-tan-orange-a600":"#CC7014","color-tan-orange-a700":"#8C541C","color-tan-orange-a800":"#593A1B","color-tan-orange-a900":"#33261A","color-iguana-green-100":"#C8E6C9","color-iguana-green-200":"#A5D6A7","color-iguana-green-300":"#81c784","color-iguana-green-400":"#66BB6A","color-iguana-green-500":"#4caf50","color-iguana-green-600":"#43a047","color-iguana-green-700":"#388e3c","color-iguana-green-800":"#2E7D32","color-iguana-green-900":"#1B5E20","color-iguana-green-a700":"#00c853","color-banana-yellow-100":"#FFF9C4","color-banana-yellow-200":"#FFF59D","color-banana-yellow-300":"#FFF176","color-banana-yellow-400":"#ffee58","color-banana-yellow-500":"#ffeb3b","color-banana-yellow-600":"#fdd835","color-banana-yellow-700":"#fbc02d","color-banana-yellow-800":"#f9a825","color-banana-yellow-900":"#F57F17","color-banana-yellow-a400":"#ffea00","color-banana-yellow-a700":"#EEDA01","color-tv-blue-50":"#E3EFFD","color-tv-blue-100":"#BBD9FB","color-tv-blue-200":"#90BFF9","color-tv-blue-300":"#5B9CF6","color-tv-blue-400":"#3179F5","color-tv-blue-500":"#2962FF","color-tv-blue-600":"#1E53E5","color-tv-blue-700":"#1848CC","color-tv-blue-800":"#143EB3","color-tv-blue-900":"#0C3299","color-tv-blue-a100":"#82b1ff","color-tv-blue-a200":"#448aff","color-tv-blue-a400":"#2979ff","color-tv-blue-a600":"#2962FF","color-tv-blue-a700":"#143A87","color-tv-blue-a800":"#142E61","color-tv-blue-a900":"#132042","color-deep-blue-50":"#EDE7F6","color-deep-blue-100":"#D1C4E9","color-deep-blue-200":"#B39DDB","color-deep-blue-300":"#9575cd","color-deep-blue-400":"#7e57c2","color-deep-blue-500":"#673ab7","color-deep-blue-700":"#512da8","color-deep-blue-800":"#4527A0","color-deep-blue-900":"#311B92","color-deep-blue-a100":"#b388ff","color-deep-blue-a200":"#7C4DFF","color-deep-blue-a400":"#651FFF","color-deep-blue-a700":"#6200EA","color-minty-green-50":"#DAF2EE","color-minty-green-100":"#ACE5DC","color-minty-green-200":"#70CCBD","color-minty-green-300":"#42BDA8","color-minty-green-400":"#22AB94","color-minty-green-500":"#089981","color-minty-green-600":"#06806B","color-minty-green-700":"#056656","color-minty-green-800":"#004D40","color-minty-green-900":"#00332A","color-minty-green-a400":"#2BD9BC","color-minty-green-a600":"#24B29B","color-minty-green-a700":"#1B7667","color-minty-green-a800":"#10443B","color-minty-green-a900":"#082621","color-grapes-purple-50":"#F3E5F5","color-grapes-purple-100":"#E1BEE7","color-grapes-purple-200":"#CE93D8","color-grapes-purple-300":"#ba68c8","color-grapes-purple-400":"#ab47bc","color-grapes-purple-500":"#9c27b0","color-grapes-purple-600":"#8e24aa","color-grapes-purple-700":"#7b1fa2","color-grapes-purple-800":"#6A1B9A","color-grapes-purple-900":"#4A148C","color-grapes-purple-a100":"#EA80FC","color-grapes-purple-a200":"#E040FB","color-grapes-purple-a400":"#D500F9","color-grapes-purple-a700":"#aa00ff","color-berry-pink-100":"#F8BBD0","color-berry-pink-200":"#f48fb1","color-berry-pink-300":"#f06292","color-berry-pink-400":"#ec407a","color-berry-pink-500":"#e91e63","color-berry-pink-600":"#D81B60","color-berry-pink-700":"#C2185B","color-berry-pink-800":"#AD1457","color-berry-pink-900":"#880E4F","color-berry-pink-a100":"#ff80ab","color-berry-pink-a200":"#ff4081","color-berry-pink-a400":"#f50057","color-sky-blue-100":"#B2EBF2","color-sky-blue-200":"#80DEEA","color-sky-blue-300":"#4dd0e1","color-sky-blue-400":"#26c6da","color-sky-blue-500":"#00bcd4","color-sky-blue-600":"#00acc1","color-sky-blue-700":"#0097A7","color-sky-blue-800":"#00838F","color-sky-blue-900":"#006064","color-sky-blue-a400":"#00e5ff","color-sky-blue-a700":"#00B8D4","color-deep-blue-600":"#5E35B1","color-forest-green-50":"#DAF2E6","color-forest-green-100":"#ACE5C9","color-forest-green-200":"#70CC9E","color-forest-green-300":"#42BD7F","color-forest-green-400":"#22AB67","color-forest-green-500":"#089950","color-forest-green-600":"#068043","color-forest-green-700":"#056636","color-forest-green-800":"#004D27","color-forest-green-900":"#1A3326","color-facebook":"#1877F2","color-deep-facebook":"#1564CA","color-twitter":"#1DA1F2","color-deep-twitter":"#188CD3","color-youtube":"#FF0000","color-linkedin":"#007BB5","color-seeking-alpha-brand":"#ff7200"};function Bt(a,n=1){return a+Math.round(255*Math.min(Math.max(n,0),1)).toString(16).toUpperCase().padStart(2,"0")}const ln={base:"vs",inherit:!0,rules:[{token:"comment",foreground:k["color-cold-gray-400"]},{token:"comment.annotation",fontStyle:"bold"},{token:"text",foreground:k["color-cold-gray-900"]},{token:"string",foreground:k["color-iguana-green-700"]},{token:"constant.numeric",foreground:k["color-banana-yellow-900"]},{token:"constant.language",foreground:k["color-ripe-red-a600"]},{token:"constant.other.color",foreground:k["color-ripe-red-a600"]},{token:"constant.other",foreground:k["color-ripe-red-a600"]},{token:"support.variable",foreground:k["color-ripe-red-a600"]},{token:"support.function",foreground:k["color-tv-blue-a600"]},{token:"support.type",foreground:k["color-minty-green-400"],fontStyle:"bold"},{token:"entity.name.type",foreground:k["color-minty-green-400"],fontStyle:"bold"},{token:"support.method",foreground:k["color-tv-blue-a600"]},{token:"keyword.equals",foreground:k["color-minty-green-400"]},{token:"keyword.operator",foreground:k["color-minty-green-400"]},{token:"keyword.other",foreground:k["color-minty-green-400"]},{token:"keyword",foreground:k["color-minty-green-400"]},{token:"variable.other",foreground:k["color-cold-gray-800"]},{token:"variable.other.property",foreground:k["color-cold-gray-800"]},{token:"paren",foreground:k["color-black"]},{token:"entity.name.function",foreground:k["color-tv-blue-900"]},{token:"entity.name.method",foreground:k["color-tv-blue-900"]},{token:"meta.function-call",foreground:k["color-grapes-purple-600"]},{token:"entity.name.module.name",foreground:k["color-grapes-purple-600"]},{token:"entity.name.module",foreground:k["color-tv-blue-a600"]},{token:"",background:k["color-white"]}],colors:{"editor.foreground":k["color-cold-gray-900"],"editor.background":"#00000000","editorLineNumber.foreground":k["color-cold-gray-400"],"editorLineNumber.activeForeground":k["color-cold-gray-700"],"editorHoverWidget.background":k["color-white"],"editorHoverWidget.statusBarBackground":k["color-cold-gray-150"],"editorHoverWidget.foreground":k["color-cold-gray-900"],"editorWidget.background":k["color-white"],"editorWidget.foreground":k["color-cold-gray-900"],"editorGutter.background":"#00000000","editor.foldBackground":Bt(k["color-cold-gray-200"],.5),"editor.lineHighlightBackground":k["color-tv-blue-50"],"editor.lineHighlightBorder":k["color-tv-blue-50"],"editor.rangeHighlightBackground":k["color-tv-blue-a800"],"editorBracketMatch.background":k["color-cold-gray-150"],"editor.selectionBackground":k["color-tv-blue-100"],"editor.selectionHighlightBackground":k["color-tv-blue-50"],"editor.findMatchBackground":k["color-tan-orange-100"],"editor.findMatchHighlightBackground":k["color-tan-orange-100"],"editor.findMatchBorder":k["color-tan-orange-500"],"list.foreground":k["color-cold-gray-900"],"list.hoverForeground":k["color-cold-gray-900"],"list.activeSelectionBackground":k["color-tv-blue-500"],"list.hoverBackground":k["color-tv-blue-50"],"list.focusHighlightForeground":k["color-tv-blue-100"],"list.inactiveSelectionBackground":k["color-tv-blue-500"],"keybindingLabel.background":k["color-white"],"keybindingLabel.foreground":k["color-cold-gray-900"],"keybindingLabel.border":k["color-cold-gray-150"],"input.foreground":k["color-cold-gray-900"],"textLink.foreground":k["color-tv-blue-500"],"textLink.activeForeground":k["color-tv-blue-600"],"peekViewEditor.matchHighlightBackground":k["color-tan-orange-100"],"peekViewResult.lineForeground":k["color-cold-gray-900"],"editorMarkerNavigationWarning.background":k["color-banana-yellow-800"],"inputValidation.warningBackground":k["color-banana-yellow-800"],"diffEditor.insertedTextBackground":Bt(k["color-forest-green-500"],.3),"diffEditor.insertedLineBackground":Bt(k["color-forest-green-500"],.15),"diffEditor.removedTextBackground":Bt(k["color-ripe-red-500"],.3),"diffEditor.removedLineBackground":Bt(k["color-ripe-red-500"],.15),"editorInlayHint.background":k["color-cold-gray-150"],"editorInlayHint.foreground":k["color-cold-gray-550"],"editorError.foreground":k["color-ripe-red-500"],"editorWarning.foreground":k["color-tan-orange-500"]}},cn={base:"vs-dark",inherit:!0,rules:[{token:"comment",foreground:k["color-cold-gray-500"]},{token:"comment.annotation",fontStyle:"bold"},{token:"text",foreground:k["color-white"]},{token:"string",foreground:k["color-iguana-green-700"]},{token:"constant.numeric",foreground:k["color-banana-yellow-900"]},{token:"constant.language",foreground:k["color-ripe-red-300"]},{token:"constant.other.color",foreground:k["color-ripe-red-300"]},{token:"constant.other",foreground:k["color-ripe-red-300"]},{token:"support.variable",foreground:k["color-ripe-red-300"]},{token:"support.function",foreground:k["color-tv-blue-300"]},{token:"support.method",foreground:k["color-tv-blue-300"]},{token:"support.type",foreground:k["color-minty-green-300"],fontStyle:"bold"},{token:"entity.name.type",foreground:k["color-minty-green-300"],fontStyle:"bold"},{token:"keyword.equals",foreground:k["color-minty-green-300"]},{token:"keyword.operator",foreground:k["color-minty-green-300"]},{token:"keyword.other",foreground:k["color-minty-green-300"]},{token:"keyword",foreground:k["color-minty-green-300"]},{token:"variable.other",foreground:k["color-cold-gray-200"]},{token:"variable.other.property",foreground:k["color-cold-gray-200"]},{token:"paren",foreground:k["color-white"]},{token:"entity.name.function",foreground:k["color-tv-blue-400"]},{token:"entity.name.method",foreground:k["color-tv-blue-400"]},{token:"meta.function-call",foreground:k["color-grapes-purple-300"]},{token:"entity.name.module.name",foreground:k["color-grapes-purple-300"]},{token:"entity.name.module",foreground:k["color-tv-blue-300"]},{token:"",background:k["color-cold-gray-900"]}],colors:{"editor.foreground":k["color-white"],"editor.background":k["color-cold-gray-900"],"editorLineNumber.foreground":k["color-cold-gray-500"],"editorLineNumber.activeForeground":k["color-cold-gray-300"],"editorWidget.background":k["color-cold-gray-850"],"editorHoverWidget.background":k["color-cold-gray-850"],"editorHoverWidget.foreground":k["color-cold-gray-300"],"editorHoverWidget.statusBarBackground":k["color-cold-gray-900"],"editorWidget.foreground":k["color-cold-gray-300"],"editorGutter.background":k["color-cold-gray-900"],"editor.foldBackground":Bt(k["color-cold-gray-700"],.5),"editor.lineHighlightBackground":k["color-tv-blue-a900"],"editor.lineHighlightBorder":k["color-tv-blue-a900"],"editor.rangeHighlightBackground":k["color-tv-blue-a800"],"editorBracketMatch.background":k["color-cold-gray-750"],"editor.selectionBackground":k["color-tv-blue-a800"],"editor.selectionHighlightBackground":k["color-cold-gray-800"],"list.foreground":k["color-cold-gray-350"],"list.hoverForeground":k["color-cold-gray-350"],"list.activeSelectionBackground":k["color-tv-blue-500"],"list.hoverBackground":k["color-tv-blue-900"],"list.focusHighlightForeground":k["color-tv-blue-300"],"list.inactiveSelectionBackground":k["color-tv-blue-500"],"keybindingLabel.background":k["color-cold-gray-800"],"keybindingLabel.foreground":k["color-cold-gray-300"],"keybindingLabel.border":k["color-cold-gray-700"],"input.foreground":k["color-cold-gray-350"],"textLink.foreground":k["color-tv-blue-500"],"textLink.activeForeground":k["color-tv-blue-600"],"peekViewEditor.matchHighlightBackground":k["color-tan-orange-a800"],"peekViewResult.lineForeground":k["color-cold-gray-350"],"diffEditor.insertedTextBackground":Bt(k["color-iguana-green-a700"],.3),"diffEditor.insertedLineBackground":Bt(k["color-iguana-green-a700"],.15),"diffEditor.removedTextBackground":Bt(k["color-ripe-red-a400"],.3),"diffEditor.removedLineBackground":Bt(k["color-ripe-red-a400"],.15),"editorInlayHint.background":k["color-cold-gray-800"],"editorInlayHint.foreground":k["color-cold-gray-400"],"editorError.foreground":k["color-ripe-red-500"],"editorWarning.foreground":k["color-tan-orange-700"]}},Cd=/(\\(?:[\\'"]))|(\\$)|("|$)|($)/g,zd=/(\\(?:[\\'"]))|(\\$)|('|$)|($)/g,io={"color.aqua":"#00BCD4","color.black":"#363A45","color.blue":"#2196F3","color.fuchsia":"#E040FB","color.gray":"#787B86","color.green":"#4CAF50","color.lime":"#00E676","color.maroon":"#880E4F","color.navy":"#311B92","color.olive":"#808000","color.orange":"#FF9800","color.purple":"#9C27B0","color.red":"#FF5252","color.silver":"#B2B5BE","color.teal":"#00897B","color.white":"#FFFFFF","color.yellow":"#FFEB3B"};class Sd{constructor(n){Object.defineProperty(this,"_formatter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isMac",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_getSignatureParams",{enumerable:!0,configurable:!0,writable:!0,value:(s=[],o)=>{const c=new Map,l=o.indexOf("(");for(let m=l+1,y=l;m<o.length;m++)o[m]!==","&&o[m]!==")"||(y++,c.set(o.slice(y,m),y),y=m+1);return s.map(({name:m="",displayType:y,desc:f})=>{const b=[],h=c.get(m),T=h+m.length;return b.push(this._formatter.paragraph(this._formatter.bold(m),this._formatter.italic(y||""))),f&&b.push(Array.isArray(f)?f.join(this._formatter.lineBreak):f),{label:[h,T],documentation:{value:b.join(this._formatter.lineBreak)}}})}}),this._formatter=le,this._isMac=/(Mac|iPhone|iPod|iPad)/i.test(n)}getSignatureHelpValues(n,s,o=0,c=0){var b;const l=this._getFuncItems(n);if(!(l!=null&&l.length))return null;const m=this._getSequentialSignatures(n,l),y=this._getActiveIndex(l,s),f=(b=gr.overloadsFuncs)==null?void 0:b.find(h=>h.name===n&&h.startColumn===o&&c===h.line);return f&&(y.activeSignature=Number(f.index)),{signatures:m,...y}}_getActiveIndex(n,s=[]){let o=0,c=-1;s.some(m=>!!m)||(c=s.length-1);const l=s.pop();if(l)for(const[m,y]of n.entries()){const{args:f}=y;if(f&&f.length){const b=f.findIndex(h=>h.name===l);if(b!=-1){c=b,o=m;break}}}return{activeParameter:c,activeSignature:o}}_getFuncItems(n){return ct.functions.get(n)||zt.userFuncs.get(n)||zt.methodFuncs.get(n)}_getSequentialSignatures(n,s){return s.map(o=>{const c=this._getSignatureLabel(n,o);return{label:c,documentation:this._getFormattedSignatureDocumentation(o),parameters:this._getSignatureParams(o.args,c)}})}_getSignatureLabel(n,s,o=!1){const c=[n];return o&&c.push("<type>"),s.args&&(c.push("("),c.push(s.args.map(({name:l})=>l).join(", ")),c.push(")")),c.join("")}_getFormattedSignatureDocumentation(n){const{desc:s}=n,o=[];s&&o.push(Array.isArray(s)?s.join(this._formatter.lineBreak):s);const c=`${this._formatter.code(this._isMac?"⌘":"Ctrl")} +
138
138
  ${this._formatter.code("Shift")} +
139
- ${this._formatter.code("Space")}`;return o.push(this._formatter.lineBreak),o.push(this._formatter.italic(`${c} ${ge.toTriggerParameterHints}`)),{value:this._formatter.paragraph(...o)}}}const Ed=new Sd(window.navigator.userAgent);class Nd{constructor(){Object.defineProperty(this,"_colors",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_count",{enumerable:!0,configurable:!0,writable:!0,value:0}),this._colors=io}getDocumentColors(n){this._count++;const s=[];return n.forEach(o=>{const{range:c}=o;let{matches:l}=o;l=l||[];const m=l[0]||"";let y=null;this._isHexToken(m)?y=this._hexToColor(m):this._isRgbColor(m)?y=this._rgbToColor(m):this._colors[m]?y=this._hexToColor(this._colors[m]):this._isColorExpression(m)&&l[1]&&l[6]&&(y=this._extractNewExpression(l[1],Number(l[6]))),y&&s.push({color:y,range:c})}),s}get _defultColorsRegStr(){return Object.keys(io).reduce((n,s)=>`${n}|${s}`,"")}get colorMatchesRegStr(){const n=`#[0-9a-fA-F]{6,8}|(\\b(color.rgb\\s*\\((\\s*\\d+\\s*,\\s*){2}(\\s*\\d+\\s*,{0,1}){1,2}\\s*\\)${this._defultColorsRegStr}))`;return`color.new\\s*\\(\\s*(${n})\\s*,\\s*(\\d+)\\s*\\)|${n}`}getDocumentColorPresentations(n,{color:s,range:o}){const c=n.getValueInRange(o);if(this._isHexToken(c)||this._colors[c])return[{label:this._colorRgbRepresentation(s)},{label:this._colorHexRepresentation(s)}];if(this._isColorExpression(c)||this._isRgbColor(c)){const l=this._isColorExpression(c)?this._colorNewRepresentation(s):this._colorRgbRepresentation(s);if(!l)return[];const m=this._colorHexRepresentation(s);return[{label:l,textEdit:{text:l,range:o}},{label:m,textEdit:{text:m,range:o}}]}return null}_hexFromNumber(n){const s=this._denormalize(n).toString(16);return s.length===1?`0${s}`:s}_normalize(n){return n/255}_denormalize(n){return Math.round(255*n)}_normalizeAlpha(n){return(100-n)/100}_denormalizeAlpha(n){return 100-Math.round(100*n)}_extractNewExpression(n,s){let o=null;return this._isHexToken(n)?o=this._hexToColor(n):this._isRgbColor(n)?o=this._rgbToColor(n):this._colors[n]&&(o=this._hexToColor(this._colors[n])),o&&!Number.isNaN(s)?{...o,alpha:this._normalizeAlpha(s)}:null}_colorHexRepresentation(n){const s=this._hexFromNumber(n.red),o=this._hexFromNumber(n.green),c=this._hexFromNumber(n.blue),l=this._hexFromNumber(n.alpha);return`#${s}${o}${c}${n.alpha===1?"":l}`}_colorRgbRepresentation(n){const s=this._denormalize(n.red),o=this._denormalize(n.green),c=this._denormalize(n.blue),l=this._denormalizeAlpha(n.alpha),m=[s,o,c];return l>0&&m.push(l),`color.rgb(${m.join(", ")})`}_colorNewRepresentation(n){const s={...n,alpha:1};return`color.new(${this._colorHexRepresentation(s)}, ${this._denormalizeAlpha(n.alpha)})`}_hexToColor(n){const s=(n=this._isHexToken(n)?n.slice(1):n).length===3||n.length===4,o=s?`${n.slice(0,1)}${n.slice(0,1)}`:n.slice(0,2),c=s?`${n.slice(1,2)}${n.slice(1,2)}`:n.slice(2,4),l=s?`${n.slice(2,3)}${n.slice(2,3)}`:n.slice(4,6),m=(s?`${n.slice(3,4)}${n.slice(3,4)}`:n.slice(6,8))||"ff";return{red:this._normalize(parseInt(o,16)),green:this._normalize(parseInt(c,16)),blue:this._normalize(parseInt(l,16)),alpha:this._normalize(parseInt(m,16))}}_rgbToColor(n){const s=n.replace(/[^\d,]/g,"").split(","),o=this._normalize(Number(s[0])),c=this._normalize(Number(s[1])),l=this._normalize(Number(s[2])),m=this._normalizeAlpha(Number(s[3]))||1;return isNaN(o)||isNaN(c)||isNaN(l)?null:{red:o,green:c,blue:l,alpha:m}}_isHexToken(n){return n.charAt(0)==="#"}_isRgbColor(n){return n.startsWith("color.rgb")}_isColorExpression(n){return n.startsWith("color.new")}}const pn=new Nd;I.VType=void 0,function(a){a.BOOL="bool",a.INT="int",a.FLOAT="float",a.ARRAY="array",a.BOX="box",a.CHART_POINT="chart.point",a.COLOR="color",a.CONST="const",a.LABEL="label",a.LINE="line",a.LINEFILL="linefill",a.MAP="map",a.MATRIX="matrix",a.POLYLINE="polyline",a.SERIES="series",a.SIMPLE="simple",a.STRING="string",a.TABLE="table",a.UNDETERMINED="undetermined type",a.INPUT="input",a.NA="na",a.VOID="void",a.ENUM="enum"}(I.VType||(I.VType={})),I.VRuleType=void 0,function(a){a.FlowStmt="FlowStmt",a.DeclareAssign="DeclareAssign",a.VarBlockStmt="VarBlockStmt",a.VarSingle="VarSingle",a.VarMultiple="VarMultiple",a.ParenthesizedExpression="ParenthesizedExpression",a.AdditiveExpression="AdditiveExpression",a.RelationalExpression="RelationalExpression",a.EqualityExpression="EqualityExpression",a.TernaryExpression="TernaryExpression",a.UnaryExpression="UnaryExpression",a.NotExpression="NotExpression",a.MemberIndexExpression="MemberIndexExpression",a.MethodExpression="MethodExpression",a.LogicalAndExpression="LogicalAndExpression",a.LogicalOrExpression="LogicalOrExpression",a.MultiplicativeExpression="MultiplicativeExpression",a.Brackethesized="Brackethesized",a.IfStatement="IfStatement",a.ForToStatement="ForToStatement",a.ForInStatement="ForInStatement",a.SwitchStatement="SwitchStatement",a.CaseClause="CaseClause",a.DefaultCaluse="DefaultCaluse",a.WhileStatement="WhileStatement",a.ImportElement="ImportElement",a.Literal="Literal",a.ArrowFunction="ArrowFunction",a.ArrowMethod="ArrowMethod",a.TypeStatement="TypeStatement",a.Name="Name",a.AgainAssign="AgainAssign",a.EnumStatement="EnumStatement"}(I.VRuleType||(I.VRuleType={})),I.VAdjustment=void 0,function(a){a.dividends="dividends",a.none="none",a.splits="splits"}(I.VAdjustment||(I.VAdjustment={})),I.VAlert=void 0,function(a){a.freqAll="freq_all",a.freqOncePerBar="freq_once_per_bar",a.freqOncePerBarClose="freq_once_per_bar_close"}(I.VAlert||(I.VAlert={})),I.VBarmergeGaps=void 0,function(a){a.gapsOff="gaps_off",a.gapsOn="gaps_on",a.lookaheadOff="lookahead_off",a.lookaheadOn="lookahead_on"}(I.VBarmergeGaps||(I.VBarmergeGaps={})),I.VPlotDisplay=void 0,function(a){a.all="all",a.dataWindow="data_window",a.none="none",a.pane="pane",a.priceScale="price_scale",a.statusLine="status_line"}(I.VPlotDisplay||(I.VPlotDisplay={})),I.VExtend=void 0,function(a){a.both="both",a.left="left",a.none="none",a.right="right"}(I.VExtend||(I.VExtend={})),I.VFormatType=void 0,function(a){a.inherit="inherit",a.mintick="mintick",a.percent="percent",a.price="price",a.volume="volume"}(I.VFormatType||(I.VFormatType={})),I.VHlineStyle=void 0,function(a){a.styleDashed="style_dashed",a.styleDotted="style_dotted",a.styleSolid="style_solid"}(I.VHlineStyle||(I.VHlineStyle={})),I.VLabelStyle=void 0,function(a){a.styleArrowdown="style_arrowdown",a.styleArrowup="style_arrowup",a.styleCircle="style_circle",a.styleCross="style_cross",a.styleDiamond="style_diamond",a.styleFlag="style_flag",a.styleLabelCenter="style_label_center",a.styleLabelDown="style_label_down",a.styleLabelLeft="style_label_left",a.styleLabelLowerLeft="style_label_lower_left",a.styleLabelLowerRight="style_label_lower_right",a.styleLabelRight="style_label_right",a.styleLabelUp="style_label_up",a.styleLabelUpperLeft="style_label_upper_left",a.styleLabelUpperRight="style_label_upper_right",a.styleNone="style_none",a.styleSquare="style_square",a.styleTextOutline="style_text_outline",a.styleTriangledown="style_triangledown",a.styleTriangleup="style_triangleup",a.styleXcross="style_xcross"}(I.VLabelStyle||(I.VLabelStyle={})),I.VLineStyle=void 0,function(a){a.styleArrowBoth="style_arrow_both",a.styleArrowLeft="style_arrow_left",a.styleArrowRight="style_arrow_right",a.styleDashed="style_dashed",a.styleDotted="style_dotted",a.styleSolid="style_solid"}(I.VLineStyle||(I.VLineStyle={})),I.VLocation=void 0,function(a){a.abovebar="abovebar",a.absolute="absolute",a.belowbar="belowbar",a.bottom="bottom",a.top="top"}(I.VLocation||(I.VLocation={})),I.VSortOrder=void 0,function(a){a.ascending="ascending",a.descending="descending"}(I.VSortOrder||(I.VSortOrder={})),I.VPlotStyle=void 0,function(a){a.styleArea="Area",a.styleAreabr="Area With Breaks",a.styleCircles="Circles",a.styleColumns="Columns",a.styleCross="Cross",a.styleHistogram="Histogram",a.styleLine="Line",a.styleLinebr="Line With Breaks",a.styleStepline="Step Line",a.styleSteplineDiamond="Step Line With Diamonds",a.styleSteplinebr="Step line with Breaks"}(I.VPlotStyle||(I.VPlotStyle={})),I.VPosition=void 0,function(a){a.bottomCenter="bottom_center",a.bottomLeft="bottom_left",a.bottomRight="bottom_right",a.middleCenter="middle_center",a.middleLeft="middle_left",a.middleRight="middle_right",a.topCenter="top_center",a.topLeft="top_left",a.topRight="top_right"}(I.VPosition||(I.VPosition={})),I.VScale=void 0,function(a){a.left="left",a.none="none",a.right="right"}(I.VScale||(I.VScale={})),I.VSession=void 0,function(a){a.extended="extended",a.regular="regular"}(I.VSession||(I.VSession={})),I.VShape=void 0,function(a){a.arrowdown="arrowdown",a.arrowup="arrowup",a.circle="circle",a.cross="cross",a.diamond="diamond",a.flag="flag",a.labeldown="labeldown",a.labelup="labelup",a.square="square",a.triangledown="triangledown",a.triangleup="triangleup",a.xcross="xcross"}(I.VShape||(I.VShape={})),I.VSize=void 0,function(a){a.auto="auto",a.huge="huge",a.large="large",a.normal="normal",a.small="small",a.tiny="tiny"}(I.VSize||(I.VSize={})),I.VFont=void 0,function(a){a.familyDefault="default",a.familyMonospace="monospace"}(I.VFont||(I.VFont={})),I.VStrategy=void 0,function(a){a.cash="cash",a.fixed="fixed",a.percentOfEquity="percent_of_equity"}(I.VStrategy||(I.VStrategy={})),I.VCommission=void 0,function(a){a.cashPerContract="cash_per_contract",a.cashPerOrder="cash_per_order",a.percent="percent"}(I.VCommission||(I.VCommission={})),I.VDirection=void 0,function(a){a.all="all",a.long="long",a.short="short"}(I.VDirection||(I.VDirection={})),I.VOca=void 0,function(a){a.cancel="cancel",a.none="none",a.reduce="reduce"}(I.VOca||(I.VOca={})),I.VText=void 0,function(a){a.alignBottom="align_bottom",a.alignCenter="align_center",a.alignLeft="align_left",a.alignRight="align_right",a.alignTop="align_top",a.wrapAuto="wrap_auto",a.wrapNone="wrap_none"}(I.VText||(I.VText={})),I.VXloc=void 0,function(a){a.bar_index="bar_index",a.bar_time="bar_time"}(I.VXloc||(I.VXloc={})),I.VYloc=void 0,function(a){a.abovebar="abovebar",a.belowbar="belowbar",a.price="price"}(I.VYloc||(I.VYloc={})),I.VEarnings=void 0,function(a){a.actual="actual",a.estimate="estimate",a.standardized="standardized"}(I.VEarnings||(I.VEarnings={})),I.VPivotType=void 0,function(a){a.traditional="Traditional",a.fibonacci="Fibonacci",a.woodie="Woodie",a.classic="Classic",a.dm="DM",a.camarilla="Camarilla"}(I.VPivotType||(I.VPivotType={})),I.VInputType=void 0,function(a){a.INT="int",a.BOOL="bool",a.TIME="time",a.COLOR="color",a.FLOAT="float",a.PRICE="price",a.SOURCE="source",a.STRING="string",a.SYMBOL="symbol",a.SESSION="session",a.TEXT_AREA="text_area",a.TIMEFRAME="timeframe",a.ENUM="enum"}(I.VInputType||(I.VInputType={}));var oo;(function(a){a.description="description",a.field="field",a.function="function",a.param="param",a.returns="returns",a.type="type",a.variable="variable",a.enum="enum"})(oo||(oo={})),I.VScriptType=void 0,function(a){a.library="library",a.indicator="indicator",a.strategy="strategy"}(I.VScriptType||(I.VScriptType={})),I.VType.SERIES,I.VType.SIMPLE,I.VType.INPUT,I.VType.CONST,I.VType.INT,I.VType.FLOAT,I.VType.BOOL,I.VType.COLOR,I.VType.STRING;const Ld={domReadOnly:!0,scrollBeyondLastLine:!1,readOnly:!0,minimap:{enabled:!1},scrollbar:{vertical:"hidden",horizontal:"hidden",alwaysConsumeMouseWheel:!1},contextmenu:!1},lo={functions:[{name:"calcBB",desc:["Computes Bollinger Band values from an array of data."],args:[{name:"srcArray",desc:"(array<float>) The array where the queue is maintained.",required:!0,allowedTypeIDs:["float[]","int[]"],displayType:"float[]"},{name:"mult",required:!0,allowedTypeIDs:["series int","series float","simple int","simple float","input int","input float","const int","const float"],displayType:"series float"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],syntax:["calcBB(float[] srcArray, series float mult, series bool calculate) → [series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:10,column:14},isUser:!0,returnedTypes:["[series float, series float, series float]"],returns:["A tuple containing the basis, upper band, and lower band respectively."]},{name:"calcBB",args:[{name:"srcArray",required:!0,allowedTypeIDs:["float[]","int[]"],displayType:"float[]"},{name:"mult",required:!0,allowedTypeIDs:["series int","simple int","input int","const int"],displayType:"series int"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],syntax:["calcBB(float[] srcArray, series int mult, series bool calculate) → [series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:19,column:14},isUser:!0,returnedTypes:["[series float, series float, series float]"],index:1},{name:"Scanner.new",args:[{name:"enabled",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"},{name:"ticker",required:!1,allowedTypeIDs:["series string","simple string","input string","const string"],displayType:"series string"},{name:"timeframe",required:!1,allowedTypeIDs:["series string","simple string","input string","const string"],displayType:"series string"}],returnedTypes:["Scanner"],pos:{lineNumber:30,column:12},syntax:["Scanner.new(series bool enabled, series string ticker, series string timeframe) → Scanner"]},{name:"Scanner.copy",args:[{name:"object",required:!0,allowedTypeIDs:["Scanner"],displayType:"Scanner"}],returnedTypes:["Scanner"],pos:{lineNumber:30,column:12},info:"The identifier of the object to be copied.",syntax:["Scanner.copy(Scanner object) → Scanner"]}],methods:[{name:"calcBB",args:[{name:"mult",required:!0,allowedTypeIDs:["series int","series float","simple int","simple float","input int","input float","const int","const float"],displayType:"series float"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],desc:["Computes Bollinger Band values from an array of data."],originalName:"array.calcBB",syntax:["calcBB(series float mult, series bool calculate) → [series float, series float, series float]"],returnedTypes:["[series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:10,column:14},thisType:["float[]"],returns:["A tuple containing the basis, upper band, and lower band respectively."]},{name:"calcBB",args:[{name:"mult",required:!0,allowedTypeIDs:["series int","simple int","input int","const int"],displayType:"series int"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],originalName:"array.calcBB",syntax:["calcBB(series int mult, series bool calculate) → [series float, series float, series float]"],returnedTypes:["[series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:19,column:14},thisType:["float[]"],index:1},{name:"Scanner.copy",args:[],returnedTypes:["Scanner"],thisType:["Scanner"],pos:{lineNumber:30,column:12},syntax:["Scanner.copy() → Scanner"]}],types:[{fields:[{name:"enabled",type:"series bool"},{name:"ticker",type:"series string"},{name:"timeframe",type:"series string"}],name:"Scanner",pos:{lineNumber:30,column:12}}],description:"Provides a tool to quickly output a label on the chart.",codeStr:'const $name={calcBB:({srcArray:a,mult:r,calculate:_=!0},e)=>{let v=$_var.getVarValue("mean",e+"_14_12","var")||$_var.setVarValue("mean",e+"_14_12",$_var.na,"var"),s=$_var.getVarValue("dev",e+"_14_13","var")||$_var.setVarValue("dev",e+"_14_13",$_var.na,"var");return _&&($_var.againAssignParse(v,a.avg(e+"_16_16")),v=a.avg(e+"_16_16"),$_var.setVarValue("mean",e+"_14_12",v,"var"),$_var.againAssignParse(s,a.stdev(e+"_17_16")*r),s=a.stdev(e+"_17_16")*r,$_var.setVarValue("dev",e+"_14_13",s,"var")),[v,$_var.add(v,s),$_var.sub(v,s)]},calcBB$1:({srcArray:a,mult:r,calculate:_=!0},e)=>{let v=$_var.getVarValue("mean",e+"_14_21","var")||$_var.setVarValue("mean",e+"_14_21",$_var.na,"var"),s=$_var.getVarValue("dev",e+"_14_22","var")||$_var.setVarValue("dev",e+"_14_22",$_var.na,"var");return _&&($_var.againAssignParse(v,a.avg(e+"_25_16")),v=a.avg(e+"_25_16"),$_var.setVarValue("mean",e+"_14_21",v,"var"),$_var.againAssignParse(s,a.stdev(e+"_26_16")*r),s=a.stdev(e+"_26_16")*r,$_var.setVarValue("dev",e+"_14_22",s,"var")),[v,$_var.add(v,s),$_var.sub(v,s)]},Scanner:$_var.getTypeInstance({enabled:void 0,ticker:void 0,timeframe:void 0},[])};'};class Md{constructor(){Object.defineProperty(this,"_inlayHints",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_editor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_importCompleteLibrary",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_funcs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._inlayHints=new Map,this._importCompleteLibrary=new Map,this._funcs=new Map}get inlayHints(){return[...this._inlayHints.values()]}setEditor(n){this._editor=n}async setInlayHints(n){const{endLine:s,endColumn:o,name:c,libraryId:l,libraryName:m}=n;if(this._importCompleteLibrary.has(l)){const y=this._funcs.get(l);return((y==null?void 0:y.name)!==c||!c&&!this._inlayHints.has(l))&&(this._updateFuncNames(c||m,l),this._inlayHintsHandle(n)),this._importCompleteLibrary.get(l)}return this._importCompleteLibrary.set(l,lo),this._inlayHints.set(l,{label:"载入中...",position:{column:o,lineNumber:s},paddingLeft:!0}),this.triggerInlayHints(),this._updateFuncNames(c||m,l),setTimeout(()=>{this._inlayHints.has(l)&&this._inlayHintsHandle(n)},2e3),lo}deleteInlayHints(n){this._inlayHints.delete(n)}clearInlayHints(){this._inlayHints.clear()}triggerInlayHints(){this._editor&&this._editor.updateOptions({inlayHints:{fontFamily:String(Date.now())}})}_updateFuncNames(n,s){const o=this._importCompleteLibrary.get(s);if(!o)return;const c=o.functions.map(l=>`${n}.${l.name}`);this._funcs.set(s,{name:n,funcs:c}),this._updateMonarchTokens()}_setNoNameInlayHints(n){const{endLine:s,endColumn:o,libraryId:c,libraryName:l}=n;this._inlayHints.set(c,{label:`as ${l}`,position:{column:o,lineNumber:s},paddingLeft:!0})}_inlayHintsHandle(n){const{name:s,libraryId:o}=n;s?this._inlayHints.delete(o):this._setNoNameInlayHints(n),this.triggerInlayHints()}_updateMonarchTokens(){const n=[...this._funcs.values()].map(c=>c.funcs.join("|")),s=new RegExp("\\b("+n.join("|")+")(?=\\s*\\()"),o=[...Nr.tokenizer.root];o.splice(15,0,[s,"meta.function-call"]),ke.languages.setMonarchTokensProvider(Se,{...Nr,tokenizer:{...Nr.tokenizer,root:o}})}}const Gs=new Md;function Pd(a,n,s){var B;const o={startLineNumber:n.lineNumber,startColumn:1,endLineNumber:n.lineNumber,endColumn:n.column},c=a.getValueInRange(o);if(/^\/\/\s*@/.test(c))return{suggestions:zt.annotationSuggestions};if(s.triggerCharacter==="@")return{suggestions:[]};const l=c.match(/([\w.]+)$/)||[];if(!l.length)return{suggestions:[]};const m=(B=l[0])==null?void 0:B.match(/.*[^\w.]+([\w.]+)(?=\.)|([\w.]+)(?=\.)/),y=m?m[1]?m[1]:m[2]?m[2]:void 0:void 0,f=a.getWordUntilPosition(n),b=gr.parseCurrentInputFunc(c),h={startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:f.startColumn,endColumn:f.endColumn},T=a.getValueInRange({...h,startColumn:f.endColumn,endColumn:f.endColumn+1});zt.nextIsBracket=T==="(";let N=co(zt.getSuggestions(y)||[],h);if(l[0]==="."&&(N=[]),b&&!y&&!/=\s*\w+$/.test(c)){const E=co(zt.getArgSuggestions(b.funcName)||[],h);N=N.concat(E)}return{suggestions:N||[],dispose:()=>{}}}function Od(a){if(a.kind!==1)return a;const{originInsertText:n}=a;return zt.nextIsBracket?a.insertText=n:a.insertText=n+zt.bracketsPostfix,a}function Rd(a,n){var o;const s=gr.parseLineContentFuncVar(n.column,n.lineNumber,a,n);if(s!=null&&s.libraryId)return{contents:[{value:wd(s)}]};if((o=s==null?void 0:s.docValue)!=null&&o.length){const c=vd(s.docValue,s.index,s.isBuildIn);if(c)return{contents:[{value:c}]}}return{contents:[]}}function Fd(a,n){var T,N;const s={startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:1,endColumn:n.column},o=a.getValueInRange(s),c=a.findMatches(String(Cd),s,!0,!1,null,!0),l=a.findMatches(String(zd),s,!0,!1,null,!0),m=(T=c.pop())==null?void 0:T.matches,y=(N=l.pop())==null?void 0:N.matches;let f=!1;c.length%2===0?m&&m[0]==='"'&&(f=!0):m&&!m[0]&&(f=!0);let b=!1;l.length%2===0?y&&y[0]==="'"&&(b=!0):y&&!y[0]&&(b=!0);const h=gr.parseCurrentInputFuncAndArg(o,b,f);if(h){const{funcName:B,args:E,startIndex:F}=h,H=Ed.getSignatureHelpValues(B,E,F+1,n.lineNumber);if(H)return{value:H,dispose:()=>{}}}return null}function Bd(a){let n=a.findMatches(pn.colorMatchesRegStr,!0,!0,!1,null,!0);return n=n.filter(o=>{const c=a.getValueInRange({...o.range,startColumn:0});return c.indexOf("//")===-1||c.indexOf("//")>o.range.endColumn}),pn.getDocumentColors(n)}function Ud(a,n){return pn.getDocumentColorPresentations(a,n)||[]}function Kd(a,n){var y,f;const s=a.getModel(),o=gr.parseLineContentFuncVar(n.startColumn+1,n.startLineNumber,s);if(!o||o.isBuildIn||!o.docValue||!o.docValue[0].pos)return o!=null&&o.isBuildIn||(f=(y=o==null?void 0:o.docValue)==null?void 0:y[0].title)!=null&&f.startsWith("built-in")?o:void 0;const{lineNumber:c,column:l}=o.docValue[0].pos,m={startLineNumber:c,endLineNumber:c,startColumn:l,endColumn:l};a.revealRangeInCenterIfOutsideViewport(m),a.setSelection(m)}function $d(a,n){return gr.parseLineContentFuncVar(n.column,n.lineNumber,a,n)?{uri:a.uri,range:{startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:n.column-1,endColumn:n.column-1}}:null}function co(a,n){return a.map(s=>(s.range=n,s))}function jd(){return{hints:Gs.inlayHints,dispose:()=>{}}}var ds={},ms=np;if(process.env.NODE_ENV==="production")ds.createRoot=ms.createRoot,ds.hydrateRoot=ms.hydrateRoot;else{var Xs=ms.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;ds.createRoot=function(a,n){Xs.usingClientEntryPoint=!0;try{return ms.createRoot(a,n)}finally{Xs.usingClientEntryPoint=!1}},ds.hydrateRoot=function(a,n,s){Xs.usingClientEntryPoint=!0;try{return ms.hydrateRoot(a,n,s)}finally{Xs.usingClientEntryPoint=!1}}}var Xe;(function(a){a.added="added",a.removed="removed",a.modified="modified"})(Xe||(Xe={}));const Hd=(a,n)=>{const{close:s,retracement:o}=a,[c,l]=O.useState("modified");return O.useImperativeHandle(n,()=>({updateType(m){l(m)}})),M.jsxs("div",{className:`content-popup content-${c}-popup`,children:[M.jsx("div",{className:`triangle-popup triangle-${c}-popup`}),M.jsxs("div",{className:`header-popup header-${c}-popup`,children:[M.jsx("div",{className:"title-popup",children:"Local working changes"}),M.jsx("div",{className:"actions-popup",children:M.jsx("div",{onClick:s,"data-role":"button",className:"button-popup","data-name":"button-close-diff",children:M.jsx("span",{className:"icon-popup",role:"img",children:M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",width:"12",height:"12",children:M.jsx("path",{stroke:"currentColor",strokeWidth:"1.2",d:"m1.5 1.5 9 9m0-9-9 9"})})})})})]}),M.jsx("div",{id:"diffEditorContainer",style:{height:"100%"}})]})},Wd=O.forwardRef(Hd);class Gd{constructor(n,s,o=!0){Object.defineProperty(this,"_domNode",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_top",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_content",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._id=n,this._domNode=document.createElement("div"),this._domNode.style.display="none",this._domNode.style.width=o?"calc(100% - 134px)":"calc(100% - 14px)",this._domNode.style.height="200px",s==null||s.onDidScrollChange(this.scrollChangeHandler.bind(this)),ds.createRoot(this._domNode).render(M.jsx(Wd,{ref:c=>this._content=c,close:()=>this._close(),retracement:this._retracement})),this._top=0}_close(){this._domNode.style.display="none"}_retracement(){}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}show(n,s,o){var c;this._top=s,(c=this._content)==null||c.updateType(o),this._domNode.style.top=`${n}px`,this._domNode.style.display="block"}hide(){this._domNode.style.display="none"}scrollChangeHandler(n){const s=n.scrollTop;this._domNode.style.top=`${this._top-s}px`}}function ar(){}ar.prototype={diff:function(n,s){var o,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=c.callback;typeof c=="function"&&(l=c,c={}),this.options=c;var m=this;function y(U){return l?(setTimeout(function(){l(void 0,U)},0),!0):U}n=this.castInput(n),s=this.castInput(s),n=this.removeEmpty(this.tokenize(n)),s=this.removeEmpty(this.tokenize(s));var f=s.length,b=n.length,h=1,T=f+b;c.maxEditLength&&(T=Math.min(T,c.maxEditLength));var N=(o=c.timeout)!==null&&o!==void 0?o:1/0,B=Date.now()+N,E=[{oldPos:-1,lastComponent:void 0}],F=this.extractCommon(E[0],s,n,0);if(E[0].oldPos+1>=b&&F+1>=f)return y([{value:this.join(s),count:s.length}]);var H=-1/0,Y=1/0;function G(){for(var U=Math.max(H,-h);U<=Math.min(Y,h);U+=2){var A=void 0,q=E[U-1],R=E[U+1];q&&(E[U-1]=void 0);var V=!1;if(R){var re=R.oldPos-U;V=R&&0<=re&&re<f}var ie=q&&q.oldPos+1<b;if(!V&&!ie){E[U]=void 0;continue}if(!ie||V&&q.oldPos+1<R.oldPos?A=m.addToPath(R,!0,void 0,0):A=m.addToPath(q,void 0,!0,1),F=m.extractCommon(A,s,n,U),A.oldPos+1>=b&&F+1>=f)return y(Xd(m,A.lastComponent,s,n,m.useLongestToken));E[U]=A,A.oldPos+1>=b&&(Y=Math.min(Y,U-1)),F+1>=f&&(H=Math.max(H,U+1))}h++}if(l)(function U(){setTimeout(function(){if(h>T||Date.now()>B)return l();G()||U()},0)})();else for(;h<=T&&Date.now()<=B;){var K=G();if(K)return K}},addToPath:function(n,s,o,c){var l=n.lastComponent;return l&&l.added===s&&l.removed===o?{oldPos:n.oldPos+c,lastComponent:{count:l.count+1,added:s,removed:o,previousComponent:l.previousComponent}}:{oldPos:n.oldPos+c,lastComponent:{count:1,added:s,removed:o,previousComponent:l}}},extractCommon:function(n,s,o,c){for(var l=s.length,m=o.length,y=n.oldPos,f=y-c,b=0;f+1<l&&y+1<m&&this.equals(s[f+1],o[y+1]);)f++,y++,b++;return b&&(n.lastComponent={count:b,previousComponent:n.lastComponent}),n.oldPos=y,f},equals:function(n,s){return this.options.comparator?this.options.comparator(n,s):n===s||this.options.ignoreCase&&n.toLowerCase()===s.toLowerCase()},removeEmpty:function(n){for(var s=[],o=0;o<n.length;o++)n[o]&&s.push(n[o]);return s},castInput:function(n){return n},tokenize:function(n){return n.split("")},join:function(n){return n.join("")}};function Xd(a,n,s,o,c){for(var l=[],m;n;)l.push(n),m=n.previousComponent,delete n.previousComponent,n=m;l.reverse();for(var y=0,f=l.length,b=0,h=0;y<f;y++){var T=l[y];if(T.removed){if(T.value=a.join(o.slice(h,h+T.count)),h+=T.count,y&&l[y-1].added){var B=l[y-1];l[y-1]=l[y],l[y]=B}}else{if(!T.added&&c){var N=s.slice(b,b+T.count);N=N.map(function(F,H){var Y=o[h+H];return Y.length>F.length?Y:F}),T.value=a.join(N)}else T.value=a.join(s.slice(b,b+T.count));b+=T.count,T.added||(h+=T.count)}}var E=l[f-1];return f>1&&typeof E.value=="string"&&(E.added||E.removed)&&a.equals("",E.value)&&(l[f-2].value+=E.value,l.pop()),l}var po=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,mo=/\S/,uo=new ar;uo.equals=function(a,n){return this.options.ignoreCase&&(a=a.toLowerCase(),n=n.toLowerCase()),a===n||this.options.ignoreWhitespace&&!mo.test(a)&&!mo.test(n)},uo.tokenize=function(a){for(var n=a.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),s=0;s<n.length-1;s++)!n[s+1]&&n[s+2]&&po.test(n[s])&&po.test(n[s+2])&&(n[s]+=n[s+2],n.splice(s+1,2),s--);return n};var dn=new ar;dn.tokenize=function(a){this.options.stripTrailingCr&&(a=a.replace(/\r\n/g,`
140
- `));var n=[],s=a.split(/(\n|\r\n)/);s[s.length-1]||s.pop();for(var o=0;o<s.length;o++){var c=s[o];o%2&&!this.options.newlineIsToken?n[n.length-1]+=c:(this.options.ignoreWhitespace&&(c=c.trim()),n.push(c))}return n};function Vd(a,n,s){return dn.diff(a,n,s)}var Yd=new ar;Yd.tokenize=function(a){return a.split(/(\S.+?[.!?])(?=\s+|$)/)};var Qd=new ar;Qd.tokenize=function(a){return a.split(/([{}:;,]|\s+)/)};function Vs(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Vs=function(n){return typeof n}:Vs=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Vs(a)}var Zd=Object.prototype.toString,us=new ar;us.useLongestToken=!0,us.tokenize=dn.tokenize,us.castInput=function(a){var n=this.options,s=n.undefinedReplacement,o=n.stringifyReplacer,c=o===void 0?function(l,m){return typeof m>"u"?s:m}:o;return typeof a=="string"?a:JSON.stringify(mn(a,null,null,c),c," ")},us.equals=function(a,n){return ar.prototype.equals.call(us,a.replace(/,([\r\n])/g,"$1"),n.replace(/,([\r\n])/g,"$1"))};function mn(a,n,s,o,c){n=n||[],s=s||[],o&&(a=o(c,a));var l;for(l=0;l<n.length;l+=1)if(n[l]===a)return s[l];var m;if(Zd.call(a)==="[object Array]"){for(n.push(a),m=new Array(a.length),s.push(m),l=0;l<a.length;l+=1)m[l]=mn(a[l],n,s,o,c);return n.pop(),s.pop(),m}if(a&&a.toJSON&&(a=a.toJSON()),Vs(a)==="object"&&a!==null){n.push(a),m={},s.push(m);var y=[],f;for(f in a)a.hasOwnProperty(f)&&y.push(f);for(y.sort(),l=0;l<y.length;l+=1)f=y[l],m[f]=mn(a[f],n,s,o,f);n.pop(),s.pop()}else m=a;return m}var un=new ar;un.tokenize=function(a){return a.slice()},un.join=un.removeEmpty=function(a){return a};class Jd{constructor(n,s,o=""){Object.defineProperty(this,"_editor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_monaco",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_originalModel",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_oldDecorations",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_diffEditor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_diffPopupWidget",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_didChangeListener",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_onMouseDownListener",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._editor=n,this._monaco=s,this._originalModel=this._monaco.editor.createModel(o,Se),this._oldDecorations=[],this._init(),this._eventListening()}_init(){var n;this._changeEvent(),this._didChangeListener=(n=this._editor.getModel())==null?void 0:n.onDidChangeContent(()=>this._changeEvent())}update(n){var s,o;if(this._originalModel=this._monaco.editor.createModel(n,Se),n!==((s=this._editor.getModel())==null?void 0:s.getValue())){this._changeEvent();return}(o=this._editor.getModel())==null||o.deltaDecorations(this._oldDecorations,[]),this._oldDecorations=[]}dispose(){var n,s,o,c;this._diffPopupWidget&&(this._diffPopupWidget.hide(),this._editor.removeOverlayWidget(this._diffPopupWidget)),(n=this._didChangeListener)==null||n.dispose(),(s=this._onMouseDownListener)==null||s.dispose(),(o=this._editor.getModel())==null||o.deltaDecorations(this._oldDecorations,[]),this._oldDecorations=[],(c=this._diffEditor)==null||c.dispose(),this._diffEditor=void 0}_changesHandle(n){let s=0,o;const c=[];let l=0;for(const m of n){const{added:y,removed:f,count:b=1,value:h}=m;y?o&&o.removed?(s=this._changeHandle(c,s,l,b,Xe.modified),l=0,o=void 0):(o&&o.added&&(s=this._changeHandle(c,s,l,o.count||1,Xe.added),l=0),o=m):f?o&&o.added?(s=this._changeHandle(c,s,l,o.count||1,Xe.modified),l=0,o=void 0):(o&&o.removed&&this._addDecorationList(c,s,Xe.removed),o=m):/^\n+$/.test(h)?o&&(o.added||o.removed)?l=b:s+=b:(o&&o.added?(s=this._changeHandle(c,s,l,o.count||1,Xe.added),l=0,o=void 0):o&&o.removed&&(this._addDecorationList(c,s,Xe.removed),o=void 0),s+=b)}return o&&o.added?s=this._changeHandle(c,s,l,o.count||1,Xe.added):o&&o.removed&&this._addDecorationList(c,s,Xe.removed),c}_changeHandle(n,s,o,c,l){for(let m=1;m<=c;m++)this._addDecorationList(n,s+m,l);return s+=c+o,s}_addDecorationList(n,s,o){n.push({range:new this._monaco.Range(s,1,s,1),options:{isWholeLine:!0,linesDecorationsClassName:`line-${o} line-decoration_${o}`}})}_changeEvent(){var c,l;const n=Vd(this._originalModel.getValue(),((c=this._editor.getModel())==null?void 0:c.getValue())||""),s=this._changesHandle(n),o=((l=this._editor.getModel())==null?void 0:l.deltaDecorations(this._oldDecorations,s))||[];this._oldDecorations=o}_eventListening(){const n=new Gd("diff.popup.widget",this._editor);this._editor.addOverlayWidget(n),this._onMouseDownListener=this._editor.onMouseDown(s=>this._onMouseDownHandle(s)),this._diffPopupWidget=n}_onMouseDownHandle(n){var m,y,f,b,h,T;const s=(m=n.target.element)==null?void 0:m.classList,o=s==null?void 0:s.contains(`line-${Xe.added}`),c=s==null?void 0:s.contains(`line-${Xe.modified}`),l=s==null?void 0:s.contains(`line-${Xe.removed}`);if(o||c||l){const N=((f=(y=n==null?void 0:n.target)==null?void 0:y.position)==null?void 0:f.lineNumber)||0,B=((b=this._editor)==null?void 0:b.getTopForLineNumber(N+1))||0,E=((h=this._editor)==null?void 0:h.getScrollTop())||0,F=o?Xe.added:c?Xe.modified:Xe.removed;(T=this._diffPopupWidget)==null||T.show(B-E,B,F),this._diffEditor||(this._diffEditor=this._createDiffEditor()),this._diffEditor.setModel({original:this._originalModel,modified:this._editor.getModel()}),this._diffEditor.revealLineInCenter(N+1)}}_createDiffEditor(){return this._monaco.editor.createDiffEditor(document.getElementById("diffEditorContainer"),{renderSideBySide:!1,quickSuggestions:!1,suggestOnTriggerCharacters:!1,hover:{enabled:!1},parameterHints:{enabled:!1}})}}class em{constructor(n,s,o){Object.defineProperty(this,"_editor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_monaco",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_decorations",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_changPositionListener",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_originalScript",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_onActionTrigger",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_onLinkOpen",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_registerList",{enumerable:!0,configurable:!0,writable:!0,value:[]}),this._editor=n,this._monaco=s,this._onActionTrigger=o,this._init()}addLinkOpenFunc(n){this._onLinkOpen=n}updateActionTrigger(n){this._onActionTrigger=n}setModelMarkers(n){this._monaco.editor.setModelMarkers(this._editor.getModel(),"owner",n)}addDiffDecorations(){this._decorations||(this._decorations=new Jd(this._editor,this._monaco,this._originalScript))}removeDiffDecorations(){var n;(n=this._decorations)==null||n.dispose(),this._decorations=void 0}setValue(n){this._editor.setValue(n),this._editor.setScrollTop(0),this.focus()}setPosition(n){var s,o;(s=this._editor)==null||s.setPosition(n),(o=this._editor)==null||o.revealPositionInCenter(n),this.focus()}focus(){var n;(n=this._editor)==null||n.focus()}setOriginalScript(n){var s;this._originalScript=n,(s=this._decorations)==null||s.update(n)}getEditorLayout(){var o;const n=this._editor.getContentHeight(),s=(o=this._editor.getModel())==null?void 0:o.getLineCount();return{contentHeight:n,lineCount:s}}setEditorLayout(n,s){var o,c;(c=this._editor)==null||c.layout({height:n,width:s||((o=this._editor)==null?void 0:o.getContainerDomNode().clientWidth)})}_init(){this._register(),this._setOptions(),this._addCommands(),this._addActions(),this._setCursorPosition(),this._onTabSizeChange()}_onTabSizeChange(){const n=this._editor.getModel();n==null||n.onDidChangeOptions(s=>{if(s.tabSize&&!s.indentSize){const o=(n==null?void 0:n.getOptions().tabSize)||4;n==null||n.updateOptions({indentSize:o})}})}_setCursorPosition(){const n=localStorage.getItem(nn);this._editor.setPosition(n?JSON.parse(n):{lineNumber:1,column:1}),this._editor.focus()}_register(){this._monaco.languages.register({id:Se});const n=this._monaco.languages.registerCompletionItemProvider(Se,{triggerCharacters:[".","@"],provideCompletionItems:Pd,resolveCompletionItem:Od});this._registerList.push(n);const s=this._monaco.languages.registerHoverProvider(Se,{provideHover:Rd});this._registerList.push(s);const o=this._monaco.languages.registerSignatureHelpProvider(Se,{signatureHelpTriggerCharacters:["(",","],provideSignatureHelp:Fd});this._registerList.push(o);const c=this._monaco.languages.registerColorProvider(Se,{provideColorPresentations:Ud,provideDocumentColors:Bd});this._registerList.push(c);const l=this._monaco.editor.registerEditorOpener({openCodeEditor:(b,h,T)=>{const N=Kd(b,T);if(N){const{index:B,docValue:E}=N,{title:F,name:H}=E[B];let Y="";switch(F){case ge.keywords:Y="kw";break;case ge.methods:case ge.functions:Y="fun";break;case ge.variables:Y="var";break;case ge.types:Y="type";break;case ge.constants:Y="const";break}this._onLinkOpen&&this._onLinkOpen(`${Y}_${H}`,B)}return!0}});this._registerList.push(l);const m=this._monaco.editor.registerLinkOpener({open:b=>(this._onLinkOpen&&b.fragment&&this._onLinkOpen(b.fragment),!!b.fragment)});this._registerList.push(m);const y=this._monaco.languages.registerDefinitionProvider(Se,{provideDefinition:$d});this._registerList.push(y);const f=this._monaco.languages.registerInlayHintsProvider(Se,{provideInlayHints:jd});this._registerList.push(f)}_setOptions(){this._monaco.editor.defineTheme("vs-dark",cn),this._monaco.editor.defineTheme("vs",ln),this._monaco.languages.setMonarchTokensProvider(Se,Nr),this._monaco.languages.setLanguageConfiguration(Se,on)}_addCommands(){this._monaco.editor.addCommand({id:"tcc.editor.function",run:(n,s)=>{var o;if(zt.nextIsBracket){const c=this._editor.getPosition();c&&this._editor.setPosition(Object.assign(c,{column:c.column+1}))}(o=this._editor.getAction(s))==null||o.run()}})}_addActions(){this._editor.addAction({id:"tcc-save-script",label:"保存脚本",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.KeyS],contextMenuGroupId:"9_modification",contextMenuOrder:1,run:()=>{this._onActionTrigger&&this._onActionTrigger(I.Actions.Save)}}),this._editor.addAction({id:"tcc-find-replace-line",label:"寻找/替换",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.KeyF],contextMenuGroupId:"9_cutcopypaste",contextMenuOrder:5,run:()=>{this.openFind(),this._onActionTrigger&&this._onActionTrigger(I.Actions.Find)}}),this._editor.addAction({id:"tcc-trigger-console-script",label:"切换控制台",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.Backquote],contextMenuGroupId:"z_commands",contextMenuOrder:0,run:()=>{this._onActionTrigger&&this._onActionTrigger(I.Actions.TriggerConsole)}}),this._editor.addAction({id:"tcc-run-script",label:"运行脚本",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.Enter],run:()=>{this._onActionTrigger&&this._onActionTrigger(I.Actions.RunScript)}}),this._editor.addAction({id:"tcc-open-script",label:"打开脚本",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.KeyO],contextMenuGroupId:"9_modification",contextMenuOrder:2,run:()=>{this._onActionTrigger&&this._onActionTrigger(I.Actions.Open)}}),this._editor.addAction({id:"tcc-new-window-script",label:"在新窗口中打开",keybindings:[this._monaco.KeyMod.Shift|this._monaco.KeyMod.Alt|this._monaco.KeyCode.KeyW],contextMenuGroupId:"9_modification",contextMenuOrder:3,run:()=>{this._onActionTrigger&&this._onActionTrigger(I.Actions.NewWindow)}}),this._editor.addAction({id:"tcc-new-tab-script",label:"在新标签页中打开",keybindings:[this._monaco.KeyMod.Shift|this._monaco.KeyMod.Alt|this._monaco.KeyCode.KeyT],contextMenuGroupId:"9_modification",contextMenuOrder:4,run:()=>{this._onActionTrigger&&this._onActionTrigger(I.Actions.NewTab)}})}openFind(){this.focus(),this._editor.trigger("click","actions.find",null)}gotoLine(){this.focus(),this._editor.trigger("click","editor.action.gotoLine",null)}onChangeCursorPosition(n){this._changPositionListener&&this._changPositionListener.dispose();const s=localStorage.getItem(nn);n&&n(s?JSON.parse(s):{lineNumber:1,column:1}),this._changPositionListener=this._editor.onDidChangeCursorPosition(o=>{localStorage.setItem(nn,JSON.stringify(o.position)),n&&n(o.position)})}dispose(){var n;for(const s of this._registerList)s.dispose();(n=this._editor)==null||n.dispose()}}/**
139
+ ${this._formatter.code("Space")}`;return o.push(this._formatter.lineBreak),o.push(this._formatter.italic(`${c} ${ge.toTriggerParameterHints}`)),{value:this._formatter.paragraph(...o)}}}const Ed=new Sd(window.navigator.userAgent);class Nd{constructor(){Object.defineProperty(this,"_colors",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_count",{enumerable:!0,configurable:!0,writable:!0,value:0}),this._colors=io}getDocumentColors(n){this._count++;const s=[];return n.forEach(o=>{const{range:c}=o;let{matches:l}=o;l=l||[];const m=l[0]||"";let y=null;this._isHexToken(m)?y=this._hexToColor(m):this._isRgbColor(m)?y=this._rgbToColor(m):this._colors[m]?y=this._hexToColor(this._colors[m]):this._isColorExpression(m)&&l[1]&&l[6]&&(y=this._extractNewExpression(l[1],Number(l[6]))),y&&s.push({color:y,range:c})}),s}get _defultColorsRegStr(){return Object.keys(io).reduce((n,s)=>`${n}|${s}`,"")}get colorMatchesRegStr(){const n=`#[0-9a-fA-F]{6,8}|(\\b(color.rgb\\s*\\((\\s*\\d+\\s*,\\s*){2}(\\s*\\d+\\s*,{0,1}){1,2}\\s*\\)${this._defultColorsRegStr}))`;return`color.new\\s*\\(\\s*(${n})\\s*,\\s*(\\d+)\\s*\\)|${n}`}getDocumentColorPresentations(n,{color:s,range:o}){const c=n.getValueInRange(o);if(this._isHexToken(c)||this._colors[c])return[{label:this._colorRgbRepresentation(s)},{label:this._colorHexRepresentation(s)}];if(this._isColorExpression(c)||this._isRgbColor(c)){const l=this._isColorExpression(c)?this._colorNewRepresentation(s):this._colorRgbRepresentation(s);if(!l)return[];const m=this._colorHexRepresentation(s);return[{label:l,textEdit:{text:l,range:o}},{label:m,textEdit:{text:m,range:o}}]}return null}_hexFromNumber(n){const s=this._denormalize(n).toString(16);return s.length===1?`0${s}`:s}_normalize(n){return n/255}_denormalize(n){return Math.round(255*n)}_normalizeAlpha(n){return(100-n)/100}_denormalizeAlpha(n){return 100-Math.round(100*n)}_extractNewExpression(n,s){let o=null;return this._isHexToken(n)?o=this._hexToColor(n):this._isRgbColor(n)?o=this._rgbToColor(n):this._colors[n]&&(o=this._hexToColor(this._colors[n])),o&&!Number.isNaN(s)?{...o,alpha:this._normalizeAlpha(s)}:null}_colorHexRepresentation(n){const s=this._hexFromNumber(n.red),o=this._hexFromNumber(n.green),c=this._hexFromNumber(n.blue),l=this._hexFromNumber(n.alpha);return`#${s}${o}${c}${n.alpha===1?"":l}`}_colorRgbRepresentation(n){const s=this._denormalize(n.red),o=this._denormalize(n.green),c=this._denormalize(n.blue),l=this._denormalizeAlpha(n.alpha),m=[s,o,c];return l>0&&m.push(l),`color.rgb(${m.join(", ")})`}_colorNewRepresentation(n){const s={...n,alpha:1};return`color.new(${this._colorHexRepresentation(s)}, ${this._denormalizeAlpha(n.alpha)})`}_hexToColor(n){const s=(n=this._isHexToken(n)?n.slice(1):n).length===3||n.length===4,o=s?`${n.slice(0,1)}${n.slice(0,1)}`:n.slice(0,2),c=s?`${n.slice(1,2)}${n.slice(1,2)}`:n.slice(2,4),l=s?`${n.slice(2,3)}${n.slice(2,3)}`:n.slice(4,6),m=(s?`${n.slice(3,4)}${n.slice(3,4)}`:n.slice(6,8))||"ff";return{red:this._normalize(parseInt(o,16)),green:this._normalize(parseInt(c,16)),blue:this._normalize(parseInt(l,16)),alpha:this._normalize(parseInt(m,16))}}_rgbToColor(n){const s=n.replace(/[^\d,]/g,"").split(","),o=this._normalize(Number(s[0])),c=this._normalize(Number(s[1])),l=this._normalize(Number(s[2])),m=this._normalizeAlpha(Number(s[3]))||1;return isNaN(o)||isNaN(c)||isNaN(l)?null:{red:o,green:c,blue:l,alpha:m}}_isHexToken(n){return n.charAt(0)==="#"}_isRgbColor(n){return n.startsWith("color.rgb")}_isColorExpression(n){return n.startsWith("color.new")}}const pn=new Nd;I.VType=void 0,function(a){a.BOOL="bool",a.INT="int",a.FLOAT="float",a.ARRAY="array",a.BOX="box",a.CHART_POINT="chart.point",a.COLOR="color",a.CONST="const",a.LABEL="label",a.LINE="line",a.LINEFILL="linefill",a.MAP="map",a.MATRIX="matrix",a.POLYLINE="polyline",a.SERIES="series",a.SIMPLE="simple",a.STRING="string",a.TABLE="table",a.UNDETERMINED="undetermined type",a.INPUT="input",a.NA="na",a.VOID="void",a.ENUM="enum"}(I.VType||(I.VType={})),I.VRuleType=void 0,function(a){a.FlowStmt="FlowStmt",a.DeclareAssign="DeclareAssign",a.VarBlockStmt="VarBlockStmt",a.VarSingle="VarSingle",a.VarMultiple="VarMultiple",a.ParenthesizedExpression="ParenthesizedExpression",a.AdditiveExpression="AdditiveExpression",a.RelationalExpression="RelationalExpression",a.EqualityExpression="EqualityExpression",a.TernaryExpression="TernaryExpression",a.UnaryExpression="UnaryExpression",a.NotExpression="NotExpression",a.MemberIndexExpression="MemberIndexExpression",a.MethodExpression="MethodExpression",a.LogicalAndExpression="LogicalAndExpression",a.LogicalOrExpression="LogicalOrExpression",a.MultiplicativeExpression="MultiplicativeExpression",a.Brackethesized="Brackethesized",a.IfStatement="IfStatement",a.ForToStatement="ForToStatement",a.ForInStatement="ForInStatement",a.SwitchStatement="SwitchStatement",a.CaseClause="CaseClause",a.DefaultCaluse="DefaultCaluse",a.WhileStatement="WhileStatement",a.ImportElement="ImportElement",a.Literal="Literal",a.ArrowFunction="ArrowFunction",a.ArrowMethod="ArrowMethod",a.TypeStatement="TypeStatement",a.Name="Name",a.AgainAssign="AgainAssign",a.EnumStatement="EnumStatement"}(I.VRuleType||(I.VRuleType={})),I.VAdjustment=void 0,function(a){a.dividends="dividends",a.none="none",a.splits="splits"}(I.VAdjustment||(I.VAdjustment={})),I.VAlert=void 0,function(a){a.freqAll="freq_all",a.freqOncePerBar="freq_once_per_bar",a.freqOncePerBarClose="freq_once_per_bar_close"}(I.VAlert||(I.VAlert={})),I.VBarmergeGaps=void 0,function(a){a.gapsOff="gaps_off",a.gapsOn="gaps_on",a.lookaheadOff="lookahead_off",a.lookaheadOn="lookahead_on"}(I.VBarmergeGaps||(I.VBarmergeGaps={})),I.VPlotDisplay=void 0,function(a){a.all="all",a.dataWindow="data_window",a.none="none",a.pane="pane",a.priceScale="price_scale",a.statusLine="status_line"}(I.VPlotDisplay||(I.VPlotDisplay={})),I.VExtend=void 0,function(a){a.both="both",a.left="left",a.none="none",a.right="right"}(I.VExtend||(I.VExtend={})),I.VFormatType=void 0,function(a){a.inherit="inherit",a.mintick="mintick",a.percent="percent",a.price="price",a.volume="volume"}(I.VFormatType||(I.VFormatType={})),I.VHlineStyle=void 0,function(a){a.styleDashed="style_dashed",a.styleDotted="style_dotted",a.styleSolid="style_solid"}(I.VHlineStyle||(I.VHlineStyle={})),I.VLabelStyle=void 0,function(a){a.styleArrowdown="style_arrowdown",a.styleArrowup="style_arrowup",a.styleCircle="style_circle",a.styleCross="style_cross",a.styleDiamond="style_diamond",a.styleFlag="style_flag",a.styleLabelCenter="style_label_center",a.styleLabelDown="style_label_down",a.styleLabelLeft="style_label_left",a.styleLabelLowerLeft="style_label_lower_left",a.styleLabelLowerRight="style_label_lower_right",a.styleLabelRight="style_label_right",a.styleLabelUp="style_label_up",a.styleLabelUpperLeft="style_label_upper_left",a.styleLabelUpperRight="style_label_upper_right",a.styleNone="style_none",a.styleSquare="style_square",a.styleTextOutline="style_text_outline",a.styleTriangledown="style_triangledown",a.styleTriangleup="style_triangleup",a.styleXcross="style_xcross"}(I.VLabelStyle||(I.VLabelStyle={})),I.VLineStyle=void 0,function(a){a.styleArrowBoth="style_arrow_both",a.styleArrowLeft="style_arrow_left",a.styleArrowRight="style_arrow_right",a.styleDashed="style_dashed",a.styleDotted="style_dotted",a.styleSolid="style_solid"}(I.VLineStyle||(I.VLineStyle={})),I.VLocation=void 0,function(a){a.abovebar="abovebar",a.absolute="absolute",a.belowbar="belowbar",a.bottom="bottom",a.top="top"}(I.VLocation||(I.VLocation={})),I.VSortOrder=void 0,function(a){a.ascending="ascending",a.descending="descending"}(I.VSortOrder||(I.VSortOrder={})),I.VPlotStyle=void 0,function(a){a.styleArea="Area",a.styleAreabr="Area With Breaks",a.styleCircles="Circles",a.styleColumns="Columns",a.styleCross="Cross",a.styleHistogram="Histogram",a.styleLine="Line",a.styleLinebr="Line With Breaks",a.styleStepline="Step Line",a.styleSteplineDiamond="Step Line With Diamonds",a.styleSteplinebr="Step line with Breaks"}(I.VPlotStyle||(I.VPlotStyle={})),I.VPosition=void 0,function(a){a.bottomCenter="bottom_center",a.bottomLeft="bottom_left",a.bottomRight="bottom_right",a.middleCenter="middle_center",a.middleLeft="middle_left",a.middleRight="middle_right",a.topCenter="top_center",a.topLeft="top_left",a.topRight="top_right"}(I.VPosition||(I.VPosition={})),I.VScale=void 0,function(a){a.left="left",a.none="none",a.right="right"}(I.VScale||(I.VScale={})),I.VSession=void 0,function(a){a.extended="extended",a.regular="regular"}(I.VSession||(I.VSession={})),I.VShape=void 0,function(a){a.arrowdown="arrowdown",a.arrowup="arrowup",a.circle="circle",a.cross="cross",a.diamond="diamond",a.flag="flag",a.labeldown="labeldown",a.labelup="labelup",a.square="square",a.triangledown="triangledown",a.triangleup="triangleup",a.xcross="xcross"}(I.VShape||(I.VShape={})),I.VSize=void 0,function(a){a.auto="auto",a.huge="huge",a.large="large",a.normal="normal",a.small="small",a.tiny="tiny"}(I.VSize||(I.VSize={})),I.VFont=void 0,function(a){a.familyDefault="default",a.familyMonospace="monospace"}(I.VFont||(I.VFont={})),I.VStrategy=void 0,function(a){a.cash="cash",a.fixed="fixed",a.percentOfEquity="percent_of_equity"}(I.VStrategy||(I.VStrategy={})),I.VCommission=void 0,function(a){a.cashPerContract="cash_per_contract",a.cashPerOrder="cash_per_order",a.percent="percent"}(I.VCommission||(I.VCommission={})),I.VDirection=void 0,function(a){a.all="all",a.long="long",a.short="short"}(I.VDirection||(I.VDirection={})),I.VOca=void 0,function(a){a.cancel="cancel",a.none="none",a.reduce="reduce"}(I.VOca||(I.VOca={})),I.VText=void 0,function(a){a.alignBottom="align_bottom",a.alignCenter="align_center",a.alignLeft="align_left",a.alignRight="align_right",a.alignTop="align_top",a.wrapAuto="wrap_auto",a.wrapNone="wrap_none"}(I.VText||(I.VText={})),I.VXloc=void 0,function(a){a.bar_index="bar_index",a.bar_time="bar_time"}(I.VXloc||(I.VXloc={})),I.VYloc=void 0,function(a){a.abovebar="abovebar",a.belowbar="belowbar",a.price="price"}(I.VYloc||(I.VYloc={})),I.VEarnings=void 0,function(a){a.actual="actual",a.estimate="estimate",a.standardized="standardized"}(I.VEarnings||(I.VEarnings={})),I.VPivotType=void 0,function(a){a.traditional="Traditional",a.fibonacci="Fibonacci",a.woodie="Woodie",a.classic="Classic",a.dm="DM",a.camarilla="Camarilla"}(I.VPivotType||(I.VPivotType={})),I.VInputType=void 0,function(a){a.INT="int",a.BOOL="bool",a.TIME="time",a.COLOR="color",a.FLOAT="float",a.PRICE="price",a.SOURCE="source",a.STRING="string",a.SYMBOL="symbol",a.SESSION="session",a.TEXT_AREA="text_area",a.TIMEFRAME="timeframe",a.ENUM="enum"}(I.VInputType||(I.VInputType={}));var oo;(function(a){a.description="description",a.field="field",a.function="function",a.param="param",a.returns="returns",a.type="type",a.variable="variable",a.enum="enum"})(oo||(oo={})),I.VScriptType=void 0,function(a){a.library="library",a.indicator="indicator",a.strategy="strategy"}(I.VScriptType||(I.VScriptType={})),I.VType.SERIES,I.VType.SIMPLE,I.VType.INPUT,I.VType.CONST,I.VType.INT,I.VType.FLOAT,I.VType.BOOL,I.VType.COLOR,I.VType.STRING;const Ld={domReadOnly:!0,scrollBeyondLastLine:!1,readOnly:!0,minimap:{enabled:!1},scrollbar:{vertical:"hidden",horizontal:"hidden",alwaysConsumeMouseWheel:!1},contextmenu:!1},lo={functions:[{name:"calcBB",desc:["Computes Bollinger Band values from an array of data."],args:[{name:"srcArray",desc:"(array<float>) The array where the queue is maintained.",required:!0,allowedTypeIDs:["float[]","int[]"],displayType:"float[]"},{name:"mult",required:!0,allowedTypeIDs:["series int","series float","simple int","simple float","input int","input float","const int","const float"],displayType:"series float"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],syntax:["calcBB(float[] srcArray, series float mult, series bool calculate) → [series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:10,column:14},isUser:!0,returnedTypes:["[series float, series float, series float]"],returns:["A tuple containing the basis, upper band, and lower band respectively."]},{name:"calcBB",args:[{name:"srcArray",required:!0,allowedTypeIDs:["float[]","int[]"],displayType:"float[]"},{name:"mult",required:!0,allowedTypeIDs:["series int","simple int","input int","const int"],displayType:"series int"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],syntax:["calcBB(float[] srcArray, series int mult, series bool calculate) → [series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:19,column:14},isUser:!0,returnedTypes:["[series float, series float, series float]"],index:1},{name:"Scanner.new",args:[{name:"enabled",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"},{name:"ticker",required:!1,allowedTypeIDs:["series string","simple string","input string","const string"],displayType:"series string"},{name:"timeframe",required:!1,allowedTypeIDs:["series string","simple string","input string","const string"],displayType:"series string"}],returnedTypes:["Scanner"],pos:{lineNumber:30,column:12},syntax:["Scanner.new(series bool enabled, series string ticker, series string timeframe) → Scanner"]},{name:"Scanner.copy",args:[{name:"object",required:!0,allowedTypeIDs:["Scanner"],displayType:"Scanner"}],returnedTypes:["Scanner"],pos:{lineNumber:30,column:12},info:"The identifier of the object to be copied.",syntax:["Scanner.copy(Scanner object) → Scanner"]}],methods:[{name:"calcBB",args:[{name:"mult",required:!0,allowedTypeIDs:["series int","series float","simple int","simple float","input int","input float","const int","const float"],displayType:"series float"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],desc:["Computes Bollinger Band values from an array of data."],originalName:"array.calcBB",syntax:["calcBB(series float mult, series bool calculate) → [series float, series float, series float]"],returnedTypes:["[series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:10,column:14},thisType:["float[]"],returns:["A tuple containing the basis, upper band, and lower band respectively."]},{name:"calcBB",args:[{name:"mult",required:!0,allowedTypeIDs:["series int","simple int","input int","const int"],displayType:"series int"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],originalName:"array.calcBB",syntax:["calcBB(series int mult, series bool calculate) → [series float, series float, series float]"],returnedTypes:["[series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:19,column:14},thisType:["float[]"],index:1},{name:"Scanner.copy",args:[],returnedTypes:["Scanner"],thisType:["Scanner"],pos:{lineNumber:30,column:12},syntax:["Scanner.copy() → Scanner"]}],types:[{fields:[{name:"enabled",type:"series bool"},{name:"ticker",type:"series string"},{name:"timeframe",type:"series string"}],name:"Scanner",pos:{lineNumber:30,column:12}}],description:"Provides a tool to quickly output a label on the chart.",codeStr:'const $name={calcBB:({srcArray:a,mult:r,calculate:_=!0},e)=>{let v=$_var.getVarValue("mean",e+"_14_12","var")||$_var.setVarValue("mean",e+"_14_12",$_var.na,"var"),s=$_var.getVarValue("dev",e+"_14_13","var")||$_var.setVarValue("dev",e+"_14_13",$_var.na,"var");return _&&($_var.againAssignParse(v,a.avg(e+"_16_16")),v=a.avg(e+"_16_16"),$_var.setVarValue("mean",e+"_14_12",v,"var"),$_var.againAssignParse(s,a.stdev(e+"_17_16")*r),s=a.stdev(e+"_17_16")*r,$_var.setVarValue("dev",e+"_14_13",s,"var")),[v,$_var.add(v,s),$_var.sub(v,s)]},calcBB$1:({srcArray:a,mult:r,calculate:_=!0},e)=>{let v=$_var.getVarValue("mean",e+"_14_21","var")||$_var.setVarValue("mean",e+"_14_21",$_var.na,"var"),s=$_var.getVarValue("dev",e+"_14_22","var")||$_var.setVarValue("dev",e+"_14_22",$_var.na,"var");return _&&($_var.againAssignParse(v,a.avg(e+"_25_16")),v=a.avg(e+"_25_16"),$_var.setVarValue("mean",e+"_14_21",v,"var"),$_var.againAssignParse(s,a.stdev(e+"_26_16")*r),s=a.stdev(e+"_26_16")*r,$_var.setVarValue("dev",e+"_14_22",s,"var")),[v,$_var.add(v,s),$_var.sub(v,s)]},Scanner:$_var.getTypeInstance({enabled:void 0,ticker:void 0,timeframe:void 0},[])};'};class Md{constructor(){Object.defineProperty(this,"_inlayHints",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_editor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_importCompleteLibrary",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_funcs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._inlayHints=new Map,this._importCompleteLibrary=new Map,this._funcs=new Map}get inlayHints(){return[...this._inlayHints.values()]}setEditor(n){this._editor=n}async setInlayHints(n){const{endLine:s,endColumn:o,name:c,libraryId:l,libraryName:m}=n;if(this._importCompleteLibrary.has(l)){const y=this._funcs.get(l);return((y==null?void 0:y.name)!==c||!c&&!this._inlayHints.has(l))&&(this._updateFuncNames(c||m,l),this._inlayHintsHandle(n)),this._importCompleteLibrary.get(l)}return this._importCompleteLibrary.set(l,lo),this._inlayHints.set(l,{label:"载入中...",position:{column:o,lineNumber:s},paddingLeft:!0}),this.triggerInlayHints(),this._updateFuncNames(c||m,l),setTimeout(()=>{this._inlayHints.has(l)&&this._inlayHintsHandle(n)},2e3),lo}deleteInlayHints(n){this._inlayHints.delete(n)}clearInlayHints(){this._inlayHints.clear()}triggerInlayHints(){this._editor&&this._editor.updateOptions({inlayHints:{fontFamily:String(Date.now())}})}_updateFuncNames(n,s){const o=this._importCompleteLibrary.get(s);if(!o)return;const c=o.functions.map(l=>`${n}.${l.name}`);this._funcs.set(s,{name:n,funcs:c}),this._updateMonarchTokens()}_setNoNameInlayHints(n){const{endLine:s,endColumn:o,libraryId:c,libraryName:l}=n;this._inlayHints.set(c,{label:`as ${l}`,position:{column:o,lineNumber:s},paddingLeft:!0})}_inlayHintsHandle(n){const{name:s,libraryId:o}=n;s?this._inlayHints.delete(o):this._setNoNameInlayHints(n),this.triggerInlayHints()}_updateMonarchTokens(){const n=[...this._funcs.values()].map(c=>c.funcs.join("|")),s=new RegExp("\\b("+n.join("|")+")(?=\\s*\\()"),o=[...Nr.tokenizer.root];o.splice(15,0,[s,"meta.function-call"]),ke.languages.setMonarchTokensProvider(Se,{...Nr,tokenizer:{...Nr.tokenizer,root:o}})}}const Gs=new Md;function Pd(a,n,s){var F;const o={startLineNumber:n.lineNumber,startColumn:1,endLineNumber:n.lineNumber,endColumn:n.column},c=a.getValueInRange(o);if(/^\/\/\s*@/.test(c))return{suggestions:zt.annotationSuggestions};if(s.triggerCharacter==="@")return{suggestions:[]};const l=c.match(/([\w.]+)$/)||[];if(!l.length)return{suggestions:[]};const m=(F=l[0])==null?void 0:F.match(/.*[^\w.]+([\w.]+)(?=\.)|([\w.]+)(?=\.)/),y=m?m[1]?m[1]:m[2]?m[2]:void 0:void 0,f=a.getWordUntilPosition(n),b=gr.parseCurrentInputFunc(c),h={startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:f.startColumn,endColumn:f.endColumn},T=a.getValueInRange({...h,startColumn:f.endColumn,endColumn:f.endColumn+1});zt.nextIsBracket=T==="(";let N=co(zt.getSuggestions(y)||[],h);if(l[0]==="."&&(N=[]),b&&!y&&!/=\s*\w+$/.test(c)){const S=co(zt.getArgSuggestions(b.funcName)||[],h);N=N.concat(S)}return{suggestions:N||[],dispose:()=>{}}}function Od(a){if(a.kind!==1)return a;const{originInsertText:n}=a;return zt.nextIsBracket?a.insertText=n:a.insertText=n+zt.bracketsPostfix,a}function Rd(a,n){var o;const s=gr.parseLineContentFuncVar(n.column,n.lineNumber,a,n);if(s!=null&&s.libraryId)return{contents:[{value:wd(s)}]};if((o=s==null?void 0:s.docValue)!=null&&o.length){const c=vd(s.docValue,s.index,s.isBuildIn);if(c)return{contents:[{value:c}]}}return{contents:[]}}function Fd(a,n){var T,N;const s={startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:1,endColumn:n.column},o=a.getValueInRange(s),c=a.findMatches(String(Cd),s,!0,!1,null,!0),l=a.findMatches(String(zd),s,!0,!1,null,!0),m=(T=c.pop())==null?void 0:T.matches,y=(N=l.pop())==null?void 0:N.matches;let f=!1;c.length%2===0?m&&m[0]==='"'&&(f=!0):m&&!m[0]&&(f=!0);let b=!1;l.length%2===0?y&&y[0]==="'"&&(b=!0):y&&!y[0]&&(b=!0);const h=gr.parseCurrentInputFuncAndArg(o,b,f);if(h){const{funcName:F,args:S,startIndex:R}=h,W=Ed.getSignatureHelpValues(F,S,R+1,n.lineNumber);if(W)return{value:W,dispose:()=>{}}}return null}function Bd(a){let n=a.findMatches(pn.colorMatchesRegStr,!0,!0,!1,null,!0);return n=n.filter(o=>{const c=a.getValueInRange({...o.range,startColumn:0});return c.indexOf("//")===-1||c.indexOf("//")>o.range.endColumn}),pn.getDocumentColors(n)}function Ud(a,n){return pn.getDocumentColorPresentations(a,n)||[]}function Kd(a,n){var y,f;const s=a.getModel(),o=gr.parseLineContentFuncVar(n.startColumn+1,n.startLineNumber,s);if(!o||o.isBuildIn||!o.docValue||!o.docValue[0].pos)return o!=null&&o.isBuildIn||(f=(y=o==null?void 0:o.docValue)==null?void 0:y[0].title)!=null&&f.startsWith("built-in")?o:void 0;const{lineNumber:c,column:l}=o.docValue[0].pos,m={startLineNumber:c,endLineNumber:c,startColumn:l,endColumn:l};a.revealRangeInCenterIfOutsideViewport(m),a.setSelection(m)}function $d(a,n){return gr.parseLineContentFuncVar(n.column,n.lineNumber,a,n)?{uri:a.uri,range:{startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:n.column-1,endColumn:n.column-1}}:null}function co(a,n){return a.map(s=>(s.range=n,s))}function jd(){return{hints:Gs.inlayHints,dispose:()=>{}}}var ds={},ms=np;if(process.env.NODE_ENV==="production")ds.createRoot=ms.createRoot,ds.hydrateRoot=ms.hydrateRoot;else{var Xs=ms.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;ds.createRoot=function(a,n){Xs.usingClientEntryPoint=!0;try{return ms.createRoot(a,n)}finally{Xs.usingClientEntryPoint=!1}},ds.hydrateRoot=function(a,n,s){Xs.usingClientEntryPoint=!0;try{return ms.hydrateRoot(a,n,s)}finally{Xs.usingClientEntryPoint=!1}}}var Xe;(function(a){a.added="added",a.removed="removed",a.modified="modified"})(Xe||(Xe={}));const Hd=(a,n)=>{const{close:s,retracement:o}=a,[c,l]=O.useState("modified");return O.useImperativeHandle(n,()=>({updateType(m){l(m)}})),M.jsxs("div",{className:`content-popup content-${c}-popup`,children:[M.jsx("div",{className:`triangle-popup triangle-${c}-popup`}),M.jsxs("div",{className:`header-popup header-${c}-popup`,children:[M.jsx("div",{className:"title-popup",children:"Local working changes"}),M.jsx("div",{className:"actions-popup",children:M.jsx("div",{onClick:s,"data-role":"button",className:"button-popup","data-name":"button-close-diff",children:M.jsx("span",{className:"icon-popup",role:"img",children:M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",width:"12",height:"12",children:M.jsx("path",{stroke:"currentColor",strokeWidth:"1.2",d:"m1.5 1.5 9 9m0-9-9 9"})})})})})]}),M.jsx("div",{id:"diffEditorContainer",style:{height:"100%"}})]})},Wd=O.forwardRef(Hd);class Gd{constructor(n,s,o=!0){Object.defineProperty(this,"_domNode",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_top",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_content",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._id=n,this._domNode=document.createElement("div"),this._domNode.style.display="none",this._domNode.style.width=o?"calc(100% - 134px)":"calc(100% - 14px)",this._domNode.style.height="200px",s==null||s.onDidScrollChange(this.scrollChangeHandler.bind(this)),ds.createRoot(this._domNode).render(M.jsx(Wd,{ref:c=>this._content=c,close:()=>this._close(),retracement:this._retracement})),this._top=0}_close(){this._domNode.style.display="none"}_retracement(){}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}show(n,s,o){var c;this._top=s,(c=this._content)==null||c.updateType(o),this._domNode.style.top=`${n}px`,this._domNode.style.display="block"}hide(){this._domNode.style.display="none"}scrollChangeHandler(n){const s=n.scrollTop;this._domNode.style.top=`${this._top-s}px`}}function nr(){}nr.prototype={diff:function(n,s){var o,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=c.callback;typeof c=="function"&&(l=c,c={}),this.options=c;var m=this;function y(K){return l?(setTimeout(function(){l(void 0,K)},0),!0):K}n=this.castInput(n),s=this.castInput(s),n=this.removeEmpty(this.tokenize(n)),s=this.removeEmpty(this.tokenize(s));var f=s.length,b=n.length,h=1,T=f+b;c.maxEditLength&&(T=Math.min(T,c.maxEditLength));var N=(o=c.timeout)!==null&&o!==void 0?o:1/0,F=Date.now()+N,S=[{oldPos:-1,lastComponent:void 0}],R=this.extractCommon(S[0],s,n,0);if(S[0].oldPos+1>=b&&R+1>=f)return y([{value:this.join(s),count:s.length}]);var W=-1/0,V=1/0;function Y(){for(var K=Math.max(W,-h);K<=Math.min(V,h);K+=2){var A=void 0,B=S[K-1],E=S[K+1];B&&(S[K-1]=void 0);var H=!1;if(E){var Q=E.oldPos-K;H=E&&0<=Q&&Q<f}var ie=B&&B.oldPos+1<b;if(!H&&!ie){S[K]=void 0;continue}if(!ie||H&&B.oldPos+1<E.oldPos?A=m.addToPath(E,!0,void 0,0):A=m.addToPath(B,void 0,!0,1),R=m.extractCommon(A,s,n,K),A.oldPos+1>=b&&R+1>=f)return y(Xd(m,A.lastComponent,s,n,m.useLongestToken));S[K]=A,A.oldPos+1>=b&&(V=Math.min(V,K-1)),R+1>=f&&(W=Math.max(W,K+1))}h++}if(l)(function K(){setTimeout(function(){if(h>T||Date.now()>F)return l();Y()||K()},0)})();else for(;h<=T&&Date.now()<=F;){var U=Y();if(U)return U}},addToPath:function(n,s,o,c){var l=n.lastComponent;return l&&l.added===s&&l.removed===o?{oldPos:n.oldPos+c,lastComponent:{count:l.count+1,added:s,removed:o,previousComponent:l.previousComponent}}:{oldPos:n.oldPos+c,lastComponent:{count:1,added:s,removed:o,previousComponent:l}}},extractCommon:function(n,s,o,c){for(var l=s.length,m=o.length,y=n.oldPos,f=y-c,b=0;f+1<l&&y+1<m&&this.equals(s[f+1],o[y+1]);)f++,y++,b++;return b&&(n.lastComponent={count:b,previousComponent:n.lastComponent}),n.oldPos=y,f},equals:function(n,s){return this.options.comparator?this.options.comparator(n,s):n===s||this.options.ignoreCase&&n.toLowerCase()===s.toLowerCase()},removeEmpty:function(n){for(var s=[],o=0;o<n.length;o++)n[o]&&s.push(n[o]);return s},castInput:function(n){return n},tokenize:function(n){return n.split("")},join:function(n){return n.join("")}};function Xd(a,n,s,o,c){for(var l=[],m;n;)l.push(n),m=n.previousComponent,delete n.previousComponent,n=m;l.reverse();for(var y=0,f=l.length,b=0,h=0;y<f;y++){var T=l[y];if(T.removed){if(T.value=a.join(o.slice(h,h+T.count)),h+=T.count,y&&l[y-1].added){var F=l[y-1];l[y-1]=l[y],l[y]=F}}else{if(!T.added&&c){var N=s.slice(b,b+T.count);N=N.map(function(R,W){var V=o[h+W];return V.length>R.length?V:R}),T.value=a.join(N)}else T.value=a.join(s.slice(b,b+T.count));b+=T.count,T.added||(h+=T.count)}}var S=l[f-1];return f>1&&typeof S.value=="string"&&(S.added||S.removed)&&a.equals("",S.value)&&(l[f-2].value+=S.value,l.pop()),l}var po=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,mo=/\S/,uo=new nr;uo.equals=function(a,n){return this.options.ignoreCase&&(a=a.toLowerCase(),n=n.toLowerCase()),a===n||this.options.ignoreWhitespace&&!mo.test(a)&&!mo.test(n)},uo.tokenize=function(a){for(var n=a.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),s=0;s<n.length-1;s++)!n[s+1]&&n[s+2]&&po.test(n[s])&&po.test(n[s+2])&&(n[s]+=n[s+2],n.splice(s+1,2),s--);return n};var dn=new nr;dn.tokenize=function(a){this.options.stripTrailingCr&&(a=a.replace(/\r\n/g,`
140
+ `));var n=[],s=a.split(/(\n|\r\n)/);s[s.length-1]||s.pop();for(var o=0;o<s.length;o++){var c=s[o];o%2&&!this.options.newlineIsToken?n[n.length-1]+=c:(this.options.ignoreWhitespace&&(c=c.trim()),n.push(c))}return n};function Vd(a,n,s){return dn.diff(a,n,s)}var Yd=new nr;Yd.tokenize=function(a){return a.split(/(\S.+?[.!?])(?=\s+|$)/)};var Qd=new nr;Qd.tokenize=function(a){return a.split(/([{}:;,]|\s+)/)};function Vs(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Vs=function(n){return typeof n}:Vs=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Vs(a)}var Zd=Object.prototype.toString,us=new nr;us.useLongestToken=!0,us.tokenize=dn.tokenize,us.castInput=function(a){var n=this.options,s=n.undefinedReplacement,o=n.stringifyReplacer,c=o===void 0?function(l,m){return typeof m>"u"?s:m}:o;return typeof a=="string"?a:JSON.stringify(mn(a,null,null,c),c," ")},us.equals=function(a,n){return nr.prototype.equals.call(us,a.replace(/,([\r\n])/g,"$1"),n.replace(/,([\r\n])/g,"$1"))};function mn(a,n,s,o,c){n=n||[],s=s||[],o&&(a=o(c,a));var l;for(l=0;l<n.length;l+=1)if(n[l]===a)return s[l];var m;if(Zd.call(a)==="[object Array]"){for(n.push(a),m=new Array(a.length),s.push(m),l=0;l<a.length;l+=1)m[l]=mn(a[l],n,s,o,c);return n.pop(),s.pop(),m}if(a&&a.toJSON&&(a=a.toJSON()),Vs(a)==="object"&&a!==null){n.push(a),m={},s.push(m);var y=[],f;for(f in a)a.hasOwnProperty(f)&&y.push(f);for(y.sort(),l=0;l<y.length;l+=1)f=y[l],m[f]=mn(a[f],n,s,o,f);n.pop(),s.pop()}else m=a;return m}var un=new nr;un.tokenize=function(a){return a.slice()},un.join=un.removeEmpty=function(a){return a};class Jd{constructor(n,s,o=""){Object.defineProperty(this,"_editor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_monaco",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_originalModel",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_oldDecorations",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_diffEditor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_diffPopupWidget",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_didChangeListener",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_onMouseDownListener",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._editor=n,this._monaco=s,this._originalModel=this._monaco.editor.createModel(o,Se),this._oldDecorations=[],this._init(),this._eventListening()}_init(){var n;this._changeEvent(),this._didChangeListener=(n=this._editor.getModel())==null?void 0:n.onDidChangeContent(()=>this._changeEvent())}update(n){var s,o;if(this._originalModel=this._monaco.editor.createModel(n,Se),n!==((s=this._editor.getModel())==null?void 0:s.getValue())){this._changeEvent();return}(o=this._editor.getModel())==null||o.deltaDecorations(this._oldDecorations,[]),this._oldDecorations=[]}dispose(){var n,s,o,c;this._diffPopupWidget&&(this._diffPopupWidget.hide(),this._editor.removeOverlayWidget(this._diffPopupWidget)),(n=this._didChangeListener)==null||n.dispose(),(s=this._onMouseDownListener)==null||s.dispose(),(o=this._editor.getModel())==null||o.deltaDecorations(this._oldDecorations,[]),this._oldDecorations=[],(c=this._diffEditor)==null||c.dispose(),this._diffEditor=void 0}_changesHandle(n){let s=0,o;const c=[];let l=0;for(const m of n){const{added:y,removed:f,count:b=1,value:h}=m;y?o&&o.removed?(s=this._changeHandle(c,s,l,b,Xe.modified),l=0,o=void 0):(o&&o.added&&(s=this._changeHandle(c,s,l,o.count||1,Xe.added),l=0),o=m):f?o&&o.added?(s=this._changeHandle(c,s,l,o.count||1,Xe.modified),l=0,o=void 0):(o&&o.removed&&this._addDecorationList(c,s,Xe.removed),o=m):/^\n+$/.test(h)?o&&(o.added||o.removed)?l=b:s+=b:(o&&o.added?(s=this._changeHandle(c,s,l,o.count||1,Xe.added),l=0,o=void 0):o&&o.removed&&(this._addDecorationList(c,s,Xe.removed),o=void 0),s+=b)}return o&&o.added?s=this._changeHandle(c,s,l,o.count||1,Xe.added):o&&o.removed&&this._addDecorationList(c,s,Xe.removed),c}_changeHandle(n,s,o,c,l){for(let m=1;m<=c;m++)this._addDecorationList(n,s+m,l);return s+=c+o,s}_addDecorationList(n,s,o){n.push({range:new this._monaco.Range(s,1,s,1),options:{isWholeLine:!0,linesDecorationsClassName:`line-${o} line-decoration_${o}`}})}_changeEvent(){var c,l;const n=Vd(this._originalModel.getValue(),((c=this._editor.getModel())==null?void 0:c.getValue())||""),s=this._changesHandle(n),o=((l=this._editor.getModel())==null?void 0:l.deltaDecorations(this._oldDecorations,s))||[];this._oldDecorations=o}_eventListening(){const n=new Gd("diff.popup.widget",this._editor);this._editor.addOverlayWidget(n),this._onMouseDownListener=this._editor.onMouseDown(s=>this._onMouseDownHandle(s)),this._diffPopupWidget=n}_onMouseDownHandle(n){var m,y,f,b,h,T;const s=(m=n.target.element)==null?void 0:m.classList,o=s==null?void 0:s.contains(`line-${Xe.added}`),c=s==null?void 0:s.contains(`line-${Xe.modified}`),l=s==null?void 0:s.contains(`line-${Xe.removed}`);if(o||c||l){const N=((f=(y=n==null?void 0:n.target)==null?void 0:y.position)==null?void 0:f.lineNumber)||0,F=((b=this._editor)==null?void 0:b.getTopForLineNumber(N+1))||0,S=((h=this._editor)==null?void 0:h.getScrollTop())||0,R=o?Xe.added:c?Xe.modified:Xe.removed;(T=this._diffPopupWidget)==null||T.show(F-S,F,R),this._diffEditor||(this._diffEditor=this._createDiffEditor()),this._diffEditor.setModel({original:this._originalModel,modified:this._editor.getModel()}),this._diffEditor.revealLineInCenter(N+1)}}_createDiffEditor(){return this._monaco.editor.createDiffEditor(document.getElementById("diffEditorContainer"),{renderSideBySide:!1,quickSuggestions:!1,suggestOnTriggerCharacters:!1,hover:{enabled:!1},parameterHints:{enabled:!1}})}}class em{constructor(n,s,o){Object.defineProperty(this,"_editor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_monaco",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_decorations",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_changPositionListener",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_originalScript",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_onActionTrigger",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_onLinkOpen",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_registerList",{enumerable:!0,configurable:!0,writable:!0,value:[]}),this._editor=n,this._monaco=s,this._onActionTrigger=o,this._init()}addLinkOpenFunc(n){this._onLinkOpen=n}updateActionTrigger(n){this._onActionTrigger=n}setModelMarkers(n){this._monaco.editor.setModelMarkers(this._editor.getModel(),"owner",n)}addDiffDecorations(){this._decorations||(this._decorations=new Jd(this._editor,this._monaco,this._originalScript))}removeDiffDecorations(){var n;(n=this._decorations)==null||n.dispose(),this._decorations=void 0}setValue(n){this._editor.setValue(n),this._editor.setScrollTop(0),this.focus()}setPosition(n){var s,o;(s=this._editor)==null||s.setPosition(n),(o=this._editor)==null||o.revealPositionInCenter(n),this.focus()}focus(){var n;(n=this._editor)==null||n.focus()}setOriginalScript(n){var s;this._originalScript=n,(s=this._decorations)==null||s.update(n)}getEditorLayout(){var o;const n=this._editor.getContentHeight(),s=(o=this._editor.getModel())==null?void 0:o.getLineCount();return{contentHeight:n,lineCount:s}}setEditorLayout(n,s){var o,c;(c=this._editor)==null||c.layout({height:n,width:s||((o=this._editor)==null?void 0:o.getContainerDomNode().clientWidth)})}_init(){this._register(),this._setOptions(),this._addCommands(),this._addActions(),this._setCursorPosition(),this._onTabSizeChange()}_onTabSizeChange(){const n=this._editor.getModel();n==null||n.onDidChangeOptions(s=>{if(s.tabSize&&!s.indentSize){const o=(n==null?void 0:n.getOptions().tabSize)||4;n==null||n.updateOptions({indentSize:o})}})}_setCursorPosition(){const n=localStorage.getItem(nn);this._editor.setPosition(n?JSON.parse(n):{lineNumber:1,column:1}),this._editor.focus()}_register(){this._monaco.languages.register({id:Se});const n=this._monaco.languages.registerCompletionItemProvider(Se,{triggerCharacters:[".","@"],provideCompletionItems:Pd,resolveCompletionItem:Od});this._registerList.push(n);const s=this._monaco.languages.registerHoverProvider(Se,{provideHover:Rd});this._registerList.push(s);const o=this._monaco.languages.registerSignatureHelpProvider(Se,{signatureHelpTriggerCharacters:["(",","],provideSignatureHelp:Fd});this._registerList.push(o);const c=this._monaco.languages.registerColorProvider(Se,{provideColorPresentations:Ud,provideDocumentColors:Bd});this._registerList.push(c);const l=this._monaco.editor.registerEditorOpener({openCodeEditor:(b,h,T)=>{const N=Kd(b,T);if(N){const{index:F,docValue:S}=N,{title:R,name:W}=S[F];let V="";switch(R){case ge.keywords:V="kw";break;case ge.methods:case ge.functions:V="fun";break;case ge.variables:V="var";break;case ge.types:V="type";break;case ge.constants:V="const";break}this._onLinkOpen&&this._onLinkOpen(`${V}_${W}`,F)}return!0}});this._registerList.push(l);const m=this._monaco.editor.registerLinkOpener({open:b=>(this._onLinkOpen&&b.fragment&&this._onLinkOpen(b.fragment),!!b.fragment)});this._registerList.push(m);const y=this._monaco.languages.registerDefinitionProvider(Se,{provideDefinition:$d});this._registerList.push(y);const f=this._monaco.languages.registerInlayHintsProvider(Se,{provideInlayHints:jd});this._registerList.push(f)}_setOptions(){this._monaco.editor.defineTheme("vs-dark",cn),this._monaco.editor.defineTheme("vs",ln),this._monaco.languages.setMonarchTokensProvider(Se,Nr),this._monaco.languages.setLanguageConfiguration(Se,on)}_addCommands(){this._monaco.editor.addCommand({id:"tcc.editor.function",run:(n,s)=>{var o;if(zt.nextIsBracket){const c=this._editor.getPosition();c&&this._editor.setPosition(Object.assign(c,{column:c.column+1}))}(o=this._editor.getAction(s))==null||o.run()}})}_addActions(){this._editor.addAction({id:"tcc-save-script",label:"保存脚本",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.KeyS],contextMenuGroupId:"9_modification",contextMenuOrder:1,run:()=>{this._onActionTrigger&&this._onActionTrigger(I.Actions.Save)}}),this._editor.addAction({id:"tcc-find-replace-line",label:"寻找/替换",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.KeyF],contextMenuGroupId:"9_cutcopypaste",contextMenuOrder:5,run:()=>{this.openFind(),this._onActionTrigger&&this._onActionTrigger(I.Actions.Find)}}),this._editor.addAction({id:"tcc-trigger-console-script",label:"切换控制台",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.Backquote],contextMenuGroupId:"z_commands",contextMenuOrder:0,run:()=>{this._onActionTrigger&&this._onActionTrigger(I.Actions.TriggerConsole)}}),this._editor.addAction({id:"tcc-run-script",label:"运行脚本",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.Enter],run:()=>{this._onActionTrigger&&this._onActionTrigger(I.Actions.RunScript)}}),this._editor.addAction({id:"tcc-open-script",label:"打开脚本",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.KeyO],contextMenuGroupId:"9_modification",contextMenuOrder:2,run:()=>{this._onActionTrigger&&this._onActionTrigger(I.Actions.Open)}}),this._editor.addAction({id:"tcc-new-window-script",label:"在新窗口中打开",keybindings:[this._monaco.KeyMod.Shift|this._monaco.KeyMod.Alt|this._monaco.KeyCode.KeyW],contextMenuGroupId:"9_modification",contextMenuOrder:3,run:()=>{this._onActionTrigger&&this._onActionTrigger(I.Actions.NewWindow)}}),this._editor.addAction({id:"tcc-new-tab-script",label:"在新标签页中打开",keybindings:[this._monaco.KeyMod.Shift|this._monaco.KeyMod.Alt|this._monaco.KeyCode.KeyT],contextMenuGroupId:"9_modification",contextMenuOrder:4,run:()=>{this._onActionTrigger&&this._onActionTrigger(I.Actions.NewTab)}})}openFind(){this.focus(),this._editor.trigger("click","actions.find",null)}gotoLine(){this.focus(),this._editor.trigger("click","editor.action.gotoLine",null)}onChangeCursorPosition(n){this._changPositionListener&&this._changPositionListener.dispose();const s=localStorage.getItem(nn);n&&n(s?JSON.parse(s):{lineNumber:1,column:1}),this._changPositionListener=this._editor.onDidChangeCursorPosition(o=>{localStorage.setItem(nn,JSON.stringify(o.position)),n&&n(o.position)})}dispose(){var n;for(const s of this._registerList)s.dispose();(n=this._editor)==null||n.dispose()}}/**
141
141
  * @license
142
142
  * Copyright 2019 Google LLC
143
143
  * SPDX-License-Identifier: Apache-2.0
144
- */const yo=Symbol("Comlink.proxy"),tm=Symbol("Comlink.endpoint"),rm=Symbol("Comlink.releaseProxy"),yn=Symbol("Comlink.finalizer"),Ys=Symbol("Comlink.thrown"),_o=a=>typeof a=="object"&&a!==null||typeof a=="function",sm={canHandle:a=>_o(a)&&a[yo],serialize(a){const{port1:n,port2:s}=new MessageChannel;return go(a,n),[s,[s]]},deserialize(a){return a.start(),_n(a)}},am={canHandle:a=>_o(a)&&Ys in a,serialize({value:a}){let n;return a instanceof Error?n={isError:!0,value:{message:a.message,name:a.name,stack:a.stack}}:n={isError:!1,value:a},[n,[]]},deserialize(a){throw a.isError?Object.assign(new Error(a.value.message),a.value):a.value}},fo=new Map([["proxy",sm],["throw",am]]);function nm(a,n){for(const s of a)if(n===s||s==="*"||s instanceof RegExp&&s.test(n))return!0;return!1}function go(a,n=globalThis,s=["*"]){n.addEventListener("message",function o(c){if(!c||!c.data)return;if(!nm(s,c.origin)){console.warn(`Invalid origin '${c.origin}' for comlink proxy`);return}const{id:l,type:m,path:y}=Object.assign({path:[]},c.data),f=(c.data.argumentList||[]).map(br);let b;try{const h=y.slice(0,-1).reduce((N,B)=>N[B],a),T=y.reduce((N,B)=>N[B],a);switch(m){case"GET":b=T;break;case"SET":h[y.slice(-1)[0]]=br(c.data.value),b=!0;break;case"APPLY":b=T.apply(h,f);break;case"CONSTRUCT":{const N=new T(...f);b=gn(N)}break;case"ENDPOINT":{const{port1:N,port2:B}=new MessageChannel;go(a,B),b=pm(N,[N])}break;case"RELEASE":b=void 0;break;default:return}}catch(h){b={value:h,[Ys]:0}}Promise.resolve(b).catch(h=>({value:h,[Ys]:0})).then(h=>{const[T,N]=ea(h);n.postMessage(Object.assign(Object.assign({},T),{id:l}),N),m==="RELEASE"&&(n.removeEventListener("message",o),bo(n),yn in a&&typeof a[yn]=="function"&&a[yn]())}).catch(h=>{const[T,N]=ea({value:new TypeError("Unserializable return value"),[Ys]:0});n.postMessage(Object.assign(Object.assign({},T),{id:l}),N)})}),n.start&&n.start()}function im(a){return a.constructor.name==="MessagePort"}function bo(a){im(a)&&a.close()}function _n(a,n){return fn(a,[],n)}function Qs(a){if(a)throw new Error("Proxy has been released and is not useable")}function xo(a){return Lr(a,{type:"RELEASE"}).then(()=>{bo(a)})}const Zs=new WeakMap,Js="FinalizationRegistry"in globalThis&&new FinalizationRegistry(a=>{const n=(Zs.get(a)||0)-1;Zs.set(a,n),n===0&&xo(a)});function om(a,n){const s=(Zs.get(n)||0)+1;Zs.set(n,s),Js&&Js.register(a,n,a)}function lm(a){Js&&Js.unregister(a)}function fn(a,n=[],s=function(){}){let o=!1;const c=new Proxy(s,{get(l,m){if(Qs(o),m===rm)return()=>{lm(c),xo(a),o=!0};if(m==="then"){if(n.length===0)return{then:()=>c};const y=Lr(a,{type:"GET",path:n.map(f=>f.toString())}).then(br);return y.then.bind(y)}return fn(a,[...n,m])},set(l,m,y){Qs(o);const[f,b]=ea(y);return Lr(a,{type:"SET",path:[...n,m].map(h=>h.toString()),value:f},b).then(br)},apply(l,m,y){Qs(o);const f=n[n.length-1];if(f===tm)return Lr(a,{type:"ENDPOINT"}).then(br);if(f==="bind")return fn(a,n.slice(0,-1));const[b,h]=ho(y);return Lr(a,{type:"APPLY",path:n.map(T=>T.toString()),argumentList:b},h).then(br)},construct(l,m){Qs(o);const[y,f]=ho(m);return Lr(a,{type:"CONSTRUCT",path:n.map(b=>b.toString()),argumentList:y},f).then(br)}});return om(c,a),c}function cm(a){return Array.prototype.concat.apply([],a)}function ho(a){const n=a.map(ea);return[n.map(s=>s[0]),cm(n.map(s=>s[1]))]}const wo=new WeakMap;function pm(a,n){return wo.set(a,n),a}function gn(a){return Object.assign(a,{[yo]:!0})}function ea(a){for(const[n,s]of fo)if(s.canHandle(a)){const[o,c]=s.serialize(a);return[{type:"HANDLER",name:n,value:o},c]}return[{type:"RAW",value:a},wo.get(a)||[]]}function br(a){switch(a.type){case"HANDLER":return fo.get(a.name).deserialize(a.value);case"RAW":return a.value}}function Lr(a,n,s){return new Promise(o=>{const c=dm();a.addEventListener("message",function l(m){!m.data||!m.data.id||m.data.id!==c||(a.removeEventListener("message",l),o(m.data))}),a.start&&a.start(),a.postMessage(Object.assign({id:c},n),s)})}function dm(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const vo=new Worker(new URL(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/scriptsRunWorker-xG1IsMq4.js").href:new URL("assets/scriptsRunWorker-xG1IsMq4.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href),typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Us&&Us.src||new URL("trading-vue-editor.umd.cjs",document.baseURI).href),{type:"module",name:"Run TccScript Server"});vo.onerror=a=>{console.error(a)};async function To(a){return await Gs.setInlayHints(a)}const Do=_n(vo),ko=_n(new Worker(new URL(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/parserTccWorker-DSWibZa_.js").href:new URL("assets/parserTccWorker-DSWibZa_.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href),typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Us&&Us.src||new URL("trading-vue-editor.umd.cjs",document.baseURI).href),{type:"module",name:"Parser TccScript Server"}));async function Io(a,n=!1){const{functions:s,types:o,constants:c,variables:l,methods:m}=lt;return await ko.parseTcc(a,n,gn(To),{functions:Object.fromEntries(s),methods:Object.fromEntries(m),types:Object.fromEntries(o),constants:Object.fromEntries(c),variables:Object.fromEntries(l)})}async function mm(a,n){const{functions:s,types:o,constants:c,variables:l,methods:m}=lt;return await ko.parseLibraryCode(a,n,gn(To),{functions:Object.fromEntries(s),methods:Object.fromEntries(m),types:Object.fromEntries(o),constants:Object.fromEntries(c),variables:Object.fromEntries(l)})}async function um(a,n,s=!0){return await Do.runScript(a,n,s)}async function ym(a){return await Do.removeScript(a)}function _m(a){return new Worker(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/editor.worker-CT5Cb1wO.js").href:new URL("assets/editor.worker-CT5Cb1wO.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href),{name:a==null?void 0:a.name})}self.MonacoEnvironment={getWorker(){return new _m({name:"Editor Worker"})}},sn.config({paths:{vs:"https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.45.0/min/vs"},"vs/nls":{availableLanguages:{"*":"zh-cn"}}});const fm=(a,n)=>{const{height:s,width:o,theme:c,options:l,hasDiff:m,readOnly:y,defaultValue:f,onChange:b,onLinkOpen:h,onCursorPositionChange:T,onActionTrigger:N,onEditorDidMount:B}=a,E=O.useRef(null),F=O.useRef(null),H=O.useRef(!1);O.useImperativeHandle(n,()=>({setOriginalScript(q){var R;(R=E.current)==null||R.setOriginalScript(q)},setScript(q){var R;(R=E.current)==null||R.setValue(q)},gotoLine(){var q;(q=E.current)==null||q.gotoLine()},getEditorLayout(){var q;return(q=E.current)==null?void 0:q.getEditorLayout()},setPosition(q,R){var V;(V=E.current)==null||V.setPosition({column:q,lineNumber:R})},setModelMarkers(q){var R;(R=E.current)==null||R.setModelMarkers(q)},focus(){var q;(q=E.current)==null||q.focus()}})),O.useEffect(()=>{var q,R;m?(R=E.current)==null||R.addDiffDecorations():(q=E.current)==null||q.removeDiffDecorations()},[m]),O.useEffect(()=>{c&&ke.editor.setTheme(c)},[c]),O.useEffect(()=>{var q;(q=E.current)==null||q.updateActionTrigger(N)},[N]),O.useEffect(()=>{var q;h&&((q=E.current)==null||q.addLinkOpenFunc(h))},[h]);function Y(q,R){var re,ie;zt.initBuiltinsTrees(),Gs.setEditor(q),E.current=new em(q,R,N),h&&((re=E.current)==null||re.addLinkOpenFunc(h)),m&&((ie=E.current)==null||ie.addDiffDecorations()),kd(q),requestAnimationFrame(A);const V=q.getValue();E.current.onChangeCursorPosition(T),b&&b(V),!y&&G(V),B&&B()}const G=O.useCallback(async q=>{var ht;const R=Date.now();H.current=!1;const{errors:V,functions:re,methods:ie,types:xt,variables:St,overloadsFuncs:Ue,imports:Ke,enums:Z}=await Io(q),be=new Map(Object.entries(re)),Ee=new Map(Object.entries(ie)),Me=new Map(Object.entries(xt)),ct=new Map(Object.entries(St)),Et=new Map(Object.entries(Ke)),se=new Map(Object.entries(Z));gr.setUserDefined({functions:be,methods:Ee,types:Me,variables:ct,imports:Et,enums:se},Ue),zt.setUserDefind(be,Me,ct,Ee,se);const xe=V.map($e=>({...$e,severity:$e.type||ke.MarkerSeverity.Error}));if(y)return;!H.current&&xe.length&&((ht=E.current)==null||ht.setModelMarkers(xe));const Re=Date.now();console.log((Re-R)/1e3)},[y]),K=O.useMemo(()=>qd.debounce(G,1500),[G]);function U(q){var R;if(y){G(q||"");return}H.current=!0,Gs.clearInlayHints(),(R=E.current)==null||R.setModelMarkers([]),q!==void 0&&(b&&b(q),K(q))}const A=O.useCallback(()=>{var R,V;const q=(R=F.current)==null?void 0:R.getBoundingClientRect();(V=E.current)==null||V.setEditorLayout((q==null?void 0:q.height)||0,q==null?void 0:q.width)},[]);return O.useEffect(()=>{const q=()=>{window.requestAnimationFrame(A)},R=new ResizeObserver(q);return F.current&&R.observe(F.current),()=>{var V;F.current&&R.unobserve(F.current),R.disconnect(),(V=E.current)==null||V.dispose()}},[]),M.jsx("div",{ref:F,children:M.jsx(yd,{height:s,width:o||"100%",defaultLanguage:Se,defaultValue:f||`indicator("我的脚本")
144
+ */const yo=Symbol("Comlink.proxy"),tm=Symbol("Comlink.endpoint"),rm=Symbol("Comlink.releaseProxy"),yn=Symbol("Comlink.finalizer"),Ys=Symbol("Comlink.thrown"),_o=a=>typeof a=="object"&&a!==null||typeof a=="function",sm={canHandle:a=>_o(a)&&a[yo],serialize(a){const{port1:n,port2:s}=new MessageChannel;return go(a,n),[s,[s]]},deserialize(a){return a.start(),_n(a)}},am={canHandle:a=>_o(a)&&Ys in a,serialize({value:a}){let n;return a instanceof Error?n={isError:!0,value:{message:a.message,name:a.name,stack:a.stack}}:n={isError:!1,value:a},[n,[]]},deserialize(a){throw a.isError?Object.assign(new Error(a.value.message),a.value):a.value}},fo=new Map([["proxy",sm],["throw",am]]);function nm(a,n){for(const s of a)if(n===s||s==="*"||s instanceof RegExp&&s.test(n))return!0;return!1}function go(a,n=globalThis,s=["*"]){n.addEventListener("message",function o(c){if(!c||!c.data)return;if(!nm(s,c.origin)){console.warn(`Invalid origin '${c.origin}' for comlink proxy`);return}const{id:l,type:m,path:y}=Object.assign({path:[]},c.data),f=(c.data.argumentList||[]).map(br);let b;try{const h=y.slice(0,-1).reduce((N,F)=>N[F],a),T=y.reduce((N,F)=>N[F],a);switch(m){case"GET":b=T;break;case"SET":h[y.slice(-1)[0]]=br(c.data.value),b=!0;break;case"APPLY":b=T.apply(h,f);break;case"CONSTRUCT":{const N=new T(...f);b=gn(N)}break;case"ENDPOINT":{const{port1:N,port2:F}=new MessageChannel;go(a,F),b=pm(N,[N])}break;case"RELEASE":b=void 0;break;default:return}}catch(h){b={value:h,[Ys]:0}}Promise.resolve(b).catch(h=>({value:h,[Ys]:0})).then(h=>{const[T,N]=ea(h);n.postMessage(Object.assign(Object.assign({},T),{id:l}),N),m==="RELEASE"&&(n.removeEventListener("message",o),bo(n),yn in a&&typeof a[yn]=="function"&&a[yn]())}).catch(h=>{const[T,N]=ea({value:new TypeError("Unserializable return value"),[Ys]:0});n.postMessage(Object.assign(Object.assign({},T),{id:l}),N)})}),n.start&&n.start()}function im(a){return a.constructor.name==="MessagePort"}function bo(a){im(a)&&a.close()}function _n(a,n){return fn(a,[],n)}function Qs(a){if(a)throw new Error("Proxy has been released and is not useable")}function xo(a){return Lr(a,{type:"RELEASE"}).then(()=>{bo(a)})}const Zs=new WeakMap,Js="FinalizationRegistry"in globalThis&&new FinalizationRegistry(a=>{const n=(Zs.get(a)||0)-1;Zs.set(a,n),n===0&&xo(a)});function om(a,n){const s=(Zs.get(n)||0)+1;Zs.set(n,s),Js&&Js.register(a,n,a)}function lm(a){Js&&Js.unregister(a)}function fn(a,n=[],s=function(){}){let o=!1;const c=new Proxy(s,{get(l,m){if(Qs(o),m===rm)return()=>{lm(c),xo(a),o=!0};if(m==="then"){if(n.length===0)return{then:()=>c};const y=Lr(a,{type:"GET",path:n.map(f=>f.toString())}).then(br);return y.then.bind(y)}return fn(a,[...n,m])},set(l,m,y){Qs(o);const[f,b]=ea(y);return Lr(a,{type:"SET",path:[...n,m].map(h=>h.toString()),value:f},b).then(br)},apply(l,m,y){Qs(o);const f=n[n.length-1];if(f===tm)return Lr(a,{type:"ENDPOINT"}).then(br);if(f==="bind")return fn(a,n.slice(0,-1));const[b,h]=ho(y);return Lr(a,{type:"APPLY",path:n.map(T=>T.toString()),argumentList:b},h).then(br)},construct(l,m){Qs(o);const[y,f]=ho(m);return Lr(a,{type:"CONSTRUCT",path:n.map(b=>b.toString()),argumentList:y},f).then(br)}});return om(c,a),c}function cm(a){return Array.prototype.concat.apply([],a)}function ho(a){const n=a.map(ea);return[n.map(s=>s[0]),cm(n.map(s=>s[1]))]}const wo=new WeakMap;function pm(a,n){return wo.set(a,n),a}function gn(a){return Object.assign(a,{[yo]:!0})}function ea(a){for(const[n,s]of fo)if(s.canHandle(a)){const[o,c]=s.serialize(a);return[{type:"HANDLER",name:n,value:o},c]}return[{type:"RAW",value:a},wo.get(a)||[]]}function br(a){switch(a.type){case"HANDLER":return fo.get(a.name).deserialize(a.value);case"RAW":return a.value}}function Lr(a,n,s){return new Promise(o=>{const c=dm();a.addEventListener("message",function l(m){!m.data||!m.data.id||m.data.id!==c||(a.removeEventListener("message",l),o(m.data))}),a.start&&a.start(),a.postMessage(Object.assign({id:c},n),s)})}function dm(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const vo=new Worker(new URL(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/scriptsRunWorker-BwEbT22J.js").href:new URL("assets/scriptsRunWorker-BwEbT22J.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href),typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Us&&Us.src||new URL("trading-vue-editor.umd.cjs",document.baseURI).href),{type:"module",name:"Run TccScript Server"});vo.onerror=a=>{console.error(a)};async function To(a){return await Gs.setInlayHints(a)}const Do=_n(vo),ko=_n(new Worker(new URL(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/parserTccWorker-IINe7Q3C.js").href:new URL("assets/parserTccWorker-IINe7Q3C.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href),typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Us&&Us.src||new URL("trading-vue-editor.umd.cjs",document.baseURI).href),{type:"module",name:"Parser TccScript Server"}));async function Io(a,n=!1){const{functions:s,types:o,constants:c,variables:l,methods:m}=ct;return await ko.parseTcc(a,n,gn(To),{functions:Object.fromEntries(s),methods:Object.fromEntries(m),types:Object.fromEntries(o),constants:Object.fromEntries(c),variables:Object.fromEntries(l)})}async function mm(a,n){const{functions:s,types:o,constants:c,variables:l,methods:m}=ct;return await ko.parseLibraryCode(a,n,gn(To),{functions:Object.fromEntries(s),methods:Object.fromEntries(m),types:Object.fromEntries(o),constants:Object.fromEntries(c),variables:Object.fromEntries(l)})}async function um(a,n,s=!0){return await Do.runScript(a,n,s)}async function ym(a){return await Do.removeScript(a)}function _m(a){return new Worker(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/editor.worker-CT5Cb1wO.js").href:new URL("assets/editor.worker-CT5Cb1wO.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href),{name:a==null?void 0:a.name})}self.MonacoEnvironment={getWorker(){return new _m({name:"Editor Worker"})}},sn.config({paths:{vs:"https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.45.0/min/vs"},"vs/nls":{availableLanguages:{"*":"zh-cn"}}});const fm=(a,n)=>{const{height:s,width:o,theme:c,options:l,hasDiff:m,readOnly:y,defaultValue:f,onChange:b,onLinkOpen:h,onCursorPositionChange:T,onActionTrigger:N,onEditorDidMount:F}=a,S=O.useRef(null),R=O.useRef(null),W=O.useRef(!1),V=O.useRef(!1);O.useImperativeHandle(n,()=>({setOriginalScript(E){var H;(H=S.current)==null||H.setOriginalScript(E)},setScript(E){var H;(H=S.current)==null||H.setValue(E)},gotoLine(){var E;(E=S.current)==null||E.gotoLine()},getEditorLayout(){var E;return(E=S.current)==null?void 0:E.getEditorLayout()},setPosition(E,H){var Q;(Q=S.current)==null||Q.setPosition({column:E,lineNumber:H})},setModelMarkers(E){var H;V.current=!0,(H=S.current)==null||H.setModelMarkers(E),setTimeout(()=>{V.current=!1},2e3)},focus(){var E;(E=S.current)==null||E.focus()}})),O.useEffect(()=>{var E,H;m?(H=S.current)==null||H.addDiffDecorations():(E=S.current)==null||E.removeDiffDecorations()},[m]),O.useEffect(()=>{c&&ke.editor.setTheme(c)},[c]),O.useEffect(()=>{var E;(E=S.current)==null||E.updateActionTrigger(N)},[N]),O.useEffect(()=>{var E;h&&((E=S.current)==null||E.addLinkOpenFunc(h))},[h]);function Y(E,H){var ie,Qe;zt.initBuiltinsTrees(),Gs.setEditor(E),S.current=new em(E,H,N),h&&((ie=S.current)==null||ie.addLinkOpenFunc(h)),m&&((Qe=S.current)==null||Qe.addDiffDecorations()),kd(E),requestAnimationFrame(B);const Q=E.getValue();S.current.onChangeCursorPosition(T),b&&b(Q),!y&&U(Q),F&&F()}const U=O.useCallback(async E=>{var $e;const H=Date.now();W.current=!1;const{errors:Q,functions:ie,methods:Qe,types:St,variables:Ue,overloadsFuncs:Ke,imports:J,enums:be}=await Io(E),Ee=new Map(Object.entries(ie)),Me=new Map(Object.entries(Qe)),pt=new Map(Object.entries(St)),ht=new Map(Object.entries(Ue)),se=new Map(Object.entries(J)),xe=new Map(Object.entries(be));gr.setUserDefined({functions:Ee,methods:Me,types:pt,variables:ht,imports:se,enums:xe},Ke),zt.setUserDefind(Ee,pt,ht,Me,xe);const Pe=Q.map(Nt=>({...Nt,severity:Nt.type||ke.MarkerSeverity.Error}));if(y)return;!W.current&&!V.current&&Pe.length&&(($e=S.current)==null||$e.setModelMarkers(Pe));const Et=Date.now();console.log((Et-H)/1e3)},[y]),K=O.useMemo(()=>qd.debounce(U,1500),[U]);function A(E){var H;if(y){U(E||"");return}W.current=!0,Gs.clearInlayHints(),(H=S.current)==null||H.setModelMarkers([]),E!==void 0&&(b&&b(E),K(E))}const B=O.useCallback(()=>{var H,Q;const E=(H=R.current)==null?void 0:H.getBoundingClientRect();(Q=S.current)==null||Q.setEditorLayout((E==null?void 0:E.height)||0,E==null?void 0:E.width)},[]);return O.useEffect(()=>{const E=()=>{window.requestAnimationFrame(B)},H=new ResizeObserver(E);return R.current&&H.observe(R.current),()=>{var Q;R.current&&H.unobserve(R.current),H.disconnect(),(Q=S.current)==null||Q.dispose()}},[]),M.jsx("div",{ref:R,children:M.jsx(yd,{height:s,width:o||"100%",defaultLanguage:Se,defaultValue:f||`indicator("我的脚本")
145
145
  plot(close)
146
- `,theme:c||"vs-dark",className:`tvue-script ${c||"vs-dark"}`,options:{colorDecorators:!0,useShadowDOM:!1,matchOnWordStartOnly:!0,automaticLayout:!1,unicodeHighlight:{allowedCharacters:{" ":!0}},suggest:{filterGraceful:!0},fontSize:13,...y?Ld:{},readOnlyMessage:{value:"该脚本是只读的。它无法被编辑。"},...l},onMount:Y,onChange:U})})},gm=O.forwardRef(fm),bm=a=>{const{theme:n,modified:s,original:o,height:c,width:l,renderSideBySide:m=!0}=a,y=O.useCallback((f,b)=>{b.languages.register({id:Se}),b.editor.defineTheme("vs-dark",cn),b.editor.defineTheme("vs",ln),b.languages.setMonarchTokensProvider(Se,Nr),b.languages.setLanguageConfiguration(Se,on)},[]);return M.jsx(cd,{height:c||"90vh",width:l||"100%",theme:n||"vs-dark",options:{readOnly:!0,renderSideBySide:m,scrollBeyondLastLine:!1},language:Se,modified:s,original:o,onMount:y})};I.VMarkerSeverity=void 0,function(a){a[a.Hint=1]="Hint",a[a.Info=2]="Info",a[a.Warning=4]="Warning",a[a.Error=8]="Error"}(I.VMarkerSeverity||(I.VMarkerSeverity={}));var ta={},xm=function(){var a=document.getSelection();if(!a.rangeCount)return function(){};for(var n=document.activeElement,s=[],o=0;o<a.rangeCount;o++)s.push(a.getRangeAt(o));switch(n.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":n.blur();break;default:n=null;break}return a.removeAllRanges(),function(){a.type==="Caret"&&a.removeAllRanges(),a.rangeCount||s.forEach(function(c){a.addRange(c)}),n&&n.focus()}},hm=xm,Ao={"text/plain":"Text","text/html":"Url",default:"Text"},wm="Copy to clipboard: #{key}, Enter";function vm(a){var n=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return a.replace(/#{\s*key\s*}/g,n)}function Tm(a,n){var s,o,c,l,m,y,f=!1;n||(n={}),s=n.debug||!1;try{c=hm(),l=document.createRange(),m=document.getSelection(),y=document.createElement("span"),y.textContent=a,y.ariaHidden="true",y.style.all="unset",y.style.position="fixed",y.style.top=0,y.style.clip="rect(0, 0, 0, 0)",y.style.whiteSpace="pre",y.style.webkitUserSelect="text",y.style.MozUserSelect="text",y.style.msUserSelect="text",y.style.userSelect="text",y.addEventListener("copy",function(h){if(h.stopPropagation(),n.format)if(h.preventDefault(),typeof h.clipboardData>"u"){s&&console.warn("unable to use e.clipboardData"),s&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var T=Ao[n.format]||Ao.default;window.clipboardData.setData(T,a)}else h.clipboardData.clearData(),h.clipboardData.setData(n.format,a);n.onCopy&&(h.preventDefault(),n.onCopy(h.clipboardData))}),document.body.appendChild(y),l.selectNodeContents(y),m.addRange(l);var b=document.execCommand("copy");if(!b)throw new Error("copy command was unsuccessful");f=!0}catch(h){s&&console.error("unable to copy using execCommand: ",h),s&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(n.format||"text",a),n.onCopy&&n.onCopy(window.clipboardData),f=!0}catch(T){s&&console.error("unable to copy using clipboardData: ",T),s&&console.error("falling back to prompt"),o=vm("message"in n?n.message:wm),window.prompt(o,a)}}finally{m&&(typeof m.removeRange=="function"?m.removeRange(l):m.removeAllRanges()),y&&document.body.removeChild(y),c()}return f}var Dm=Tm;function bn(a){"@babel/helpers - typeof";return bn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},bn(a)}Object.defineProperty(ta,"__esModule",{value:!0}),ta.CopyToClipboard=void 0;var ra=qo(O),km=qo(Dm),Im=["text","onCopy","options","children"];function qo(a){return a&&a.__esModule?a:{default:a}}function Co(a,n){var s=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);n&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),s.push.apply(s,o)}return s}function zo(a){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?Co(Object(s),!0).forEach(function(o){hn(a,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(s)):Co(Object(s)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(s,o))})}return a}function Am(a,n){if(a==null)return{};var s=qm(a,n),o,c;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);for(c=0;c<l.length;c++)o=l[c],!(n.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(a,o)&&(s[o]=a[o])}return s}function qm(a,n){if(a==null)return{};var s={},o=Object.keys(a),c,l;for(l=0;l<o.length;l++)c=o[l],!(n.indexOf(c)>=0)&&(s[c]=a[c]);return s}function Cm(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function So(a,n){for(var s=0;s<n.length;s++){var o=n[s];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(a,o.key,o)}}function zm(a,n,s){return n&&So(a.prototype,n),s&&So(a,s),Object.defineProperty(a,"prototype",{writable:!1}),a}function Sm(a,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(n&&n.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),n&&xn(a,n)}function xn(a,n){return xn=Object.setPrototypeOf||function(o,c){return o.__proto__=c,o},xn(a,n)}function Em(a){var n=Lm();return function(){var o=sa(a),c;if(n){var l=sa(this).constructor;c=Reflect.construct(o,arguments,l)}else c=o.apply(this,arguments);return Nm(this,c)}}function Nm(a,n){if(n&&(bn(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Eo(a)}function Eo(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function Lm(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function sa(a){return sa=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)},sa(a)}function hn(a,n,s){return n in a?Object.defineProperty(a,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[n]=s,a}var No=function(a){Sm(s,a);var n=Em(s);function s(){var o;Cm(this,s);for(var c=arguments.length,l=new Array(c),m=0;m<c;m++)l[m]=arguments[m];return o=n.call.apply(n,[this].concat(l)),hn(Eo(o),"onClick",function(y){var f=o.props,b=f.text,h=f.onCopy,T=f.children,N=f.options,B=ra.default.Children.only(T),E=(0,km.default)(b,N);h&&h(b,E),B&&B.props&&typeof B.props.onClick=="function"&&B.props.onClick(y)}),o}return zm(s,[{key:"render",value:function(){var c=this.props;c.text,c.onCopy,c.options;var l=c.children,m=Am(c,Im),y=ra.default.Children.only(l);return ra.default.cloneElement(y,zo(zo({},m),{},{onClick:this.onClick}))}}]),s}(ra.default.PureComponent);ta.CopyToClipboard=No,hn(No,"defaultProps",{onCopy:void 0,options:void 0});var Mm=ta,wn=Mm.CopyToClipboard;wn.CopyToClipboard=wn;var Pm=wn;const vn=ip(Pm);async function Om(a,n=0){const s=a[n];if(!s)return;const{name:o,args:c,type:l,desc:m,examples:y,remarks:f,seeAlso:b,syntax:h,detailedDesc:T,fields:N,returns:B}=s,E={name:o};if(a.length>1&&(E.overloads=`${a.length} overloads`),l&&(E.type=l),c&&(E.name=`${o}()`,E.args=c.map(F=>{const{name:H,desc:Y,displayType:G}=F;return{label:`${H} (${G})`,desc:Y&&xr(Y)}})),m&&(E.desc=m.map(F=>xr(F))),y&&(E.originalExample=y.join(`
147
- `),E.examples=await ke.editor.colorize(E.originalExample,Se,{tabSize:4})),T){E.detailedDesc=[];for(const F of T){const{desc:H,examples:Y}=F;let G=H.map(A=>xr(A)),K,U;Y&&(U=Y.join(`
148
- `),K=await ke.editor.colorize(U,Se,{tabSize:4})),E.detailedDesc.push({desc:G,examples:K,originalExample:U})}}return B&&(E.returns=B.map(F=>xr(F))),f&&(E.remarks=typeof f=="string"?[xr(f)]:f.map(F=>xr(F))),h&&(E.syntax=a.map(F=>{var H;return(H=F.syntax)==null?void 0:H[0]})),N&&(E.fields=N.map(F=>{const{name:H,desc:Y,type:G}=F;return{label:`${H} (${G})`,desc:Y&&xr(Y)}})),b&&(E.seeAlso=b.map(F=>Rm(F))),E}function Rm(a){const s=/\[([^\[\]]+)\]\(([^\(\)]+)\)/g.exec(a);if(s){const[o,c,l]=s;return{name:c,link:l}}}function xr(a){const n=/\*\*([^\*]+)\*\*/g,s=/\`([^\`]+)\`/g,o=/\[([^\[\]]+)\]\(([^\(\)]+)\)/g;return a.replace(n,(c,l)=>`<strong>${l}</strong>`).replace(s,(c,l)=>`<code>${l}</code>`).replace(o,(c,l,m)=>`<a ${m.startsWith("#")?`data-name="${l}"`:'target="_blank"'} class="manual-content-text-link" href="${m}">${l}</a>`)}function Fm(a){var c;const n=[];let s=0;const o=[];for(const l of ps){for(let m of no[l.key].sort()){if(ao.includes(m))continue;let y=m;l.prefix==="fun"&&(y=`${m}()`),y.includes(a)&&(y.startsWith(a)?(y.includes(".")?n.splice(s,0,{label:y,group:l,key:`${l.prefix}_${m}`}):n.unshift({label:y,group:l,key:`${l.prefix}_${m}`}),s++):n.push({label:y,group:l,key:`${l.prefix}_${m}`}))}for(const[m,y]of lt[l.key])for(const f of y){const{name:b,args:h,type:T,desc:N,examples:B,remarks:E,seeAlso:F,syntax:H,detailedDesc:Y,fields:G,returns:K}=f,U={label:b,group:l,key:`${l.prefix}_${b}`};if(l.prefix==="fun"&&(U.label=`${b}()`),U.label.includes(a))break;if(h){let A=!1;for(const q of h){const{name:R,desc:V,displayType:re}=q;if(R.includes(a)||V!=null&&V.includes(a)||re!=null&&re.includes(a)){o.push(U),A=!0;break}}if(A)break}if(T&&T.includes(a)){o.push(U);break}if(N){let A=!1;for(const q of N)if(q.includes(a)){o.push(U),A=!0;break}if(A)break}if(B){let A=!1;for(const q of B)if(q.includes(a)){o.push(U),A=!0;break}if(A)break}if(E&&(typeof E=="string"?E:E.join(`
149
- `)).includes(a)){o.push(U);break}if(H){let A=!1;for(const q of H)if(q.includes(a)){o.push(U),A=!0;break}if(A)break}if(Y){let A=!1;for(const q of Y){const{desc:R,examples:V}=q;if(R.join(`
150
- `).includes(a)){o.push(U),A=!0;break}if((c=V==null?void 0:V.join(`
151
- `))!=null&&c.includes(a)){o.push(U),A=!0;break}}if(A)break}if(G){let A=!1;for(const q of G){const{name:R,desc:V,type:re}=q;if(R.includes(a)||V!=null&&V.includes(a)||re!=null&&re.includes(a)){o.push(U),A=!0;break}}if(A)break}if(K){let A=!1;for(const q of K)if(q.includes(a)){o.push(U),A=!0;break}if(A)break}}}return{labelList:n,contentList:o}}const Bm=a=>{var G;const{group:n,itemKey:s,onItemClick:o,currentIndex:c}=a,[l,m]=O.useState(),[y,f]=O.useState(0),[b,h]=O.useState("Copy code"),[T,N]=O.useState("Copy link");O.useEffect(()=>{B(c)},[s]);const B=K=>{const U=s.replace(`${n==null?void 0:n.prefix}_`,""),A=lt[n==null?void 0:n.key].get(U);f(K),A&&Om(A,K).then(q=>{m(q)})},E=K=>{B(K)},F=K=>{var U,A;if(K.target.localName==="a"&&K.target.hash&&((A=(U=K.target)==null?void 0:U.dataset)!=null&&A.name)){K.preventDefault();const{hash:q}=K.target;o(q.replace("#",""))}},H=()=>{h("Copied"),setTimeout(()=>{h("Copy code")},1e3)},Y=()=>{N("Link copied"),setTimeout(()=>{N("Copy link")},3e3)};return M.jsx("div",{onClick:F,id:`#${s}`,children:M.jsxs("div",{className:"manual-content-wrapper",children:[M.jsxs("div",{className:"manual-content-header",children:[M.jsxs("div",{children:[M.jsx("h3",{className:"manual-content-header-title",children:l==null?void 0:l.name}),!!(l!=null&&l.overloads)&&M.jsx("span",{className:"manual-content-header-overloads",children:l==null?void 0:l.overloads})]}),M.jsx(vn,{text:(l==null?void 0:l.name)||"",onCopy:Y,children:M.jsx("div",{"data-tooltip":T,className:"manual-content-btn",children:M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28",width:"28",height:"28",children:M.jsxs("g",{fill:"currentColor",children:[M.jsx("path",{fillRule:"nonzero",d:"M15.039 5.969l-.019-.019-2.828 2.828.707.707 2.474-2.474c1.367-1.367 3.582-1.367 4.949 0s1.367 3.582 0 4.949l-2.474 2.474.707.707 2.828-2.828-.019-.019c1.415-1.767 1.304-4.352-.334-5.99-1.638-1.638-4.224-1.749-5.99-.334zM5.97 15.038l-.019-.019 2.828-2.828.707.707-2.475 2.475c-1.367 1.367-1.367 3.582 0 4.949s3.582 1.367 4.949 0l2.474-2.474.707.707-2.828 2.828-.019-.019c-1.767 1.415-4.352 1.304-5.99-.334-1.638-1.638-1.749-4.224-.334-5.99z"}),M.jsx("path",{d:"M10.485 16.141l5.656-5.656.707.707-5.656 5.656z"})]})})})})]}),(G=l==null?void 0:l.desc)==null?void 0:G.map((K,U)=>M.jsx("div",{dangerouslySetInnerHTML:{__html:K},className:"manual-content-text"},U)),(l==null?void 0:l.type)&&M.jsxs(O.Fragment,{children:[M.jsx("div",{className:"manual-content-sub-title",children:"type"}),M.jsx("div",{className:"manual-content-text",children:l.type})]}),(l==null?void 0:l.syntax)&&M.jsxs(O.Fragment,{children:[M.jsxs("div",{className:"manual-content-sub-title",children:["Syntax ",!!(l!=null&&l.overloads)&&"& Overloads"]}),l.syntax.map((K,U)=>{var A;return(((A=l.syntax)==null?void 0:A.length)||0)>1?M.jsx("div",{onClick:()=>E(U),children:M.jsx("pre",{className:`manual-content-syntax with-overloads ${U===y?"selected":""}`,children:K})},U):M.jsx("pre",{className:"manual-content-syntax",children:K},U)})]}),(l==null?void 0:l.args)&&M.jsxs(O.Fragment,{children:[M.jsx("div",{className:"manual-content-sub-title",children:"arguments"}),l.args.map((K,U)=>M.jsxs("div",{className:"manual-content-text",children:[M.jsx("span",{className:"manual-content-args-label",children:K.label})," ",M.jsx("span",{dangerouslySetInnerHTML:{__html:K.desc||""}})]},U))]}),(l==null?void 0:l.fields)&&M.jsxs(O.Fragment,{children:[M.jsx("div",{className:"manual-content-sub-title",children:"fields"}),l.fields.map((K,U)=>M.jsxs("div",{className:"manual-content-text",children:[M.jsx("span",{className:"manual-content-args-label",children:K.label})," ",M.jsx("span",{dangerouslySetInnerHTML:{__html:K.desc||""}})]},U))]}),(l==null?void 0:l.examples)&&M.jsxs(O.Fragment,{children:[M.jsxs("div",{className:"manual-content-sub-title manual-content-example-header",children:[M.jsx("div",{children:M.jsx("span",{children:"example"})}),M.jsx(vn,{text:l.originalExample||"",onCopy:H,children:M.jsx("div",{"data-tooltip":b,className:"manual-content-btn manual-content-example-copy",children:M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",fill:"none",children:M.jsx("path",{stroke:"currentColor",d:"M8 9.5H6.5a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1V20m-8-1.5h11a1 1 0 0 0 1-1v-11a1 1 0 0 0-1-1h-11a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1z"})})})})]}),M.jsx("pre",{className:"manual-content-example",children:M.jsx("code",{dangerouslySetInnerHTML:{__html:l.examples}})})]}),(l==null?void 0:l.detailedDesc)&&l.detailedDesc.map((K,U)=>M.jsxs(O.Fragment,{children:[K.desc.map((A,q)=>M.jsx("div",{className:"manual-content-text",dangerouslySetInnerHTML:{__html:A}},q)),M.jsxs("div",{className:"manual-content-sub-title manual-content-example-header",children:[M.jsx("div",{children:M.jsx("span",{children:"example"})}),M.jsx(vn,{text:K.originalExample||"",onCopy:H,children:M.jsx("div",{"data-tooltip":b,className:"manual-content-btn manual-content-example-copy",children:M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",fill:"none",children:M.jsx("path",{stroke:"currentColor",d:"M8 9.5H6.5a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1V20m-8-1.5h11a1 1 0 0 0 1-1v-11a1 1 0 0 0-1-1h-11a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1z"})})})})]}),M.jsx("pre",{className:"manual-content-example",children:M.jsx("code",{dangerouslySetInnerHTML:{__html:K.examples||""}})})]},U)),(l==null?void 0:l.returns)&&M.jsxs(O.Fragment,{children:[M.jsx("div",{className:"manual-content-sub-title",children:"returns"}),l.returns.map((K,U)=>M.jsx("div",{className:"manual-content-text",dangerouslySetInnerHTML:{__html:K}},U))]}),(l==null?void 0:l.remarks)&&M.jsxs(O.Fragment,{children:[M.jsx("div",{className:"manual-content-sub-title",children:"remarks"}),l.remarks.map((K,U)=>M.jsx("div",{className:"manual-content-text",dangerouslySetInnerHTML:{__html:K}},U))]}),(l==null?void 0:l.seeAlso)&&M.jsxs(O.Fragment,{children:[M.jsx("div",{className:"manual-content-sub-title",children:"see Also"}),M.jsx("div",{className:"manual-content-see_also",children:l.seeAlso.map((K,U)=>M.jsx("a",{className:"manual-content-see_also-tag","data-name":K==null?void 0:K.name,href:K==null?void 0:K.link,children:K==null?void 0:K.name},U))})]})]})})};ke.languages.register({id:Se}),ke.editor.defineTheme("vs-dark",cn),ke.editor.defineTheme("vs",ln),ke.languages.setMonarchTokensProvider(Se,Nr),ke.languages.setLanguageConfiguration(Se,on);const Um=({theme:a="vs-dark",currentValue:n})=>{const[s,o]=O.useState(ps[0]),[c,l]=O.useState(null),[m,y]=O.useState(0),[f,b]=O.useState(""),[h,T]=O.useState("var_bar_index"),N=O.useRef(null),B=O.useRef(null),E=O.useRef(null),F=A=>{var q;A.key===(s==null?void 0:s.key)&&!(s!=null&&s.isHidden)?o({...A,isHidden:!0}):o(A),(q=N.current)==null||q.focus()};O.useEffect(()=>{ke.editor.setTheme(a)},[a]),O.useEffect(()=>{var A;if(n.value){const[q]=n.value.split("_"),R=ps.find(V=>q===V.prefix);R&&(y(n.index||0),K(R,n.value)),(A=N.current)==null||A.focus()}},[n]),O.useEffect(()=>{var A;(A=N.current)==null||A.focus()},[N.current]);const H=(A,q)=>{var R,V;A!==h&&(q&&o(q),y(0),T(A),(R=E.current)==null||R.scrollTo({top:0}),(V=N.current)==null||V.focus())},Y=A=>{if(A.target.value.trim()==="")G();else{b(A.target.value);const q=Fm(A.target.value);l(q)}},G=()=>{var A;b(""),l(null),setTimeout(()=>{var q,R;(R=(q=B.current)==null?void 0:q.querySelector(`a[data-href="${h}"]`))==null||R.scrollIntoView(!0)},10),(A=N.current)==null||A.focus()},K=(A,q)=>{var R;o(A),T(q),setTimeout(()=>{var V,re;(re=(V=B.current)==null?void 0:V.querySelector(`a[data-href="${q}"]`))==null||re.scrollIntoView(!0)},10),(R=E.current)==null||R.scrollTo({top:0})},U=A=>{var R;const q=ps.find(V=>A.startsWith(V.prefix));q&&(y(0),K(q,A),(R=N.current)==null||R.focus())};return M.jsxs("div",{className:`${a} manual-warpper`,children:[M.jsxs("div",{className:"manual-left",children:[M.jsxs("div",{className:"manual-search",children:[M.jsx("span",{className:"manual-search-icon",children:M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18",width:"18px",height:"18px",children:M.jsx("path",{fillRule:"evenodd",d:"M12.5 11h-.79l-.28-.27A6.47 6.47 0 0 0 13 6.5 6.5 6.5 0 1 0 6.5 13c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L17.49 16l-4.99-5zm-6 0C4.01 11 2 8.99 2 6.5S4.01 2 6.5 2 11 4.01 11 6.5 8.99 11 6.5 11z"})})}),M.jsx("input",{onChange:Y,ref:N,spellCheck:"false",value:f,className:"manual-search-input",autoComplete:"off",placeholder:"Search",type:"text"}),M.jsx("span",{onClick:G,className:`manual-search-clear ${f?"":"hide"}`,children:M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 95.939 95.939",width:"9",height:"9",children:M.jsx("path",{d:"M62.82 47.97l32.53-32.534a2 2 0 0 0 0-2.828L83.332.586a2 2 0 0 0-2.827 0L47.97 33.12 15.435.587c-.75-.75-2.078-.75-2.828 0L.587 12.607a2 2 0 0 0 0 2.83L33.12 47.97.588 80.504a2 2 0 0 0 0 2.828l12.02 12.02a1.997 1.997 0 0 0 2.83 0L47.97 62.818l32.535 32.535a2 2 0 0 0 2.827 0l12.02-12.02c.78-.783.78-2.05 0-2.83L62.82 47.97z"})})})]}),M.jsx("div",{className:`manual-group-search-list manual-scroll ${f?"":"hide"}`,children:M.jsxs("div",{children:[c==null?void 0:c.labelList.map(A=>M.jsx("a",{onClick:q=>{q.preventDefault(),H(A.key,A.group)},className:`manual-group-body-item ${A.key===h?"manual-group-body-item-selected":""}`,"data-href":A.key,href:`#${A.key}`,children:A.label},`search_${A.key}`)),M.jsx("div",{className:"manual-content-separator"}),c==null?void 0:c.contentList.map(A=>M.jsx("a",{onClick:q=>{q.preventDefault(),H(A.key,A.group)},className:`manual-group-body-item ${A.key===h?"manual-group-body-item-selected":""}`,"data-href":A.key,href:`#${A.key}`,children:A.label},`search_${A.key}`))]})}),M.jsx("div",{className:`manual-group-list manual-scroll ${f?"hide":""}`,ref:B,children:ps.map(A=>{var q,R;return M.jsxs(O.Fragment,{children:[M.jsx("div",{onClick:()=>F(A),className:`manual-group-title ${A.key===(s==null?void 0:s.key)&&!(s!=null&&s.isHidden)?"active":""}`,children:A.title}),M.jsx("div",{className:`manual-group-body manual-scroll ${A.key!==(s==null?void 0:s.key)||s!=null&&s.isHidden?"hide":""}`,children:(R=(q=no[A.key])==null?void 0:q.sort().filter(V=>!ao.includes(V)))==null?void 0:R.map(V=>{const re=`${A.prefix}_${V}`;return M.jsx("a",{onClick:ie=>{ie.preventDefault(),H(re)},className:`manual-group-body-item ${re===h?"manual-group-body-item-selected":""}`,"data-href":re,href:`#${re}`,children:`${V}${A.prefix==="fun"?"()":""}`},re)})})]},A.key)})})]}),M.jsx("div",{ref:E,className:"manual-right manual-scroll",children:M.jsx(Bm,{currentIndex:m,group:s,itemKey:h,onItemClick:U})})]})};I.ReferenceManual=Um,I.TradingVueDiffEditor=bm,I.TradingVueEditor=gm,I.parseLibrary=mm,I.parseTcc=Io,I.removeScript=ym,I.scriptsRun=um,Object.defineProperty(I,Symbol.toStringTag,{value:"Module"})});
146
+ `,theme:c||"vs-dark",className:`tvue-script ${c||"vs-dark"}`,options:{colorDecorators:!0,useShadowDOM:!1,matchOnWordStartOnly:!0,automaticLayout:!1,unicodeHighlight:{allowedCharacters:{" ":!0}},suggest:{filterGraceful:!0},fontSize:13,...y?Ld:{},readOnlyMessage:{value:"该脚本是只读的。它无法被编辑。"},...l},onMount:Y,onChange:A})})},gm=O.forwardRef(fm),bm=a=>{const{theme:n,modified:s,original:o,height:c,width:l,renderSideBySide:m=!0}=a,y=O.useCallback((f,b)=>{b.languages.register({id:Se}),b.editor.defineTheme("vs-dark",cn),b.editor.defineTheme("vs",ln),b.languages.setMonarchTokensProvider(Se,Nr),b.languages.setLanguageConfiguration(Se,on)},[]);return M.jsx(cd,{height:c||"90vh",width:l||"100%",theme:n||"vs-dark",options:{readOnly:!0,renderSideBySide:m,scrollBeyondLastLine:!1},language:Se,modified:s,original:o,onMount:y})};I.VMarkerSeverity=void 0,function(a){a[a.Hint=1]="Hint",a[a.Info=2]="Info",a[a.Warning=4]="Warning",a[a.Error=8]="Error"}(I.VMarkerSeverity||(I.VMarkerSeverity={}));var ta={},xm=function(){var a=document.getSelection();if(!a.rangeCount)return function(){};for(var n=document.activeElement,s=[],o=0;o<a.rangeCount;o++)s.push(a.getRangeAt(o));switch(n.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":n.blur();break;default:n=null;break}return a.removeAllRanges(),function(){a.type==="Caret"&&a.removeAllRanges(),a.rangeCount||s.forEach(function(c){a.addRange(c)}),n&&n.focus()}},hm=xm,Ao={"text/plain":"Text","text/html":"Url",default:"Text"},wm="Copy to clipboard: #{key}, Enter";function vm(a){var n=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return a.replace(/#{\s*key\s*}/g,n)}function Tm(a,n){var s,o,c,l,m,y,f=!1;n||(n={}),s=n.debug||!1;try{c=hm(),l=document.createRange(),m=document.getSelection(),y=document.createElement("span"),y.textContent=a,y.ariaHidden="true",y.style.all="unset",y.style.position="fixed",y.style.top=0,y.style.clip="rect(0, 0, 0, 0)",y.style.whiteSpace="pre",y.style.webkitUserSelect="text",y.style.MozUserSelect="text",y.style.msUserSelect="text",y.style.userSelect="text",y.addEventListener("copy",function(h){if(h.stopPropagation(),n.format)if(h.preventDefault(),typeof h.clipboardData>"u"){s&&console.warn("unable to use e.clipboardData"),s&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var T=Ao[n.format]||Ao.default;window.clipboardData.setData(T,a)}else h.clipboardData.clearData(),h.clipboardData.setData(n.format,a);n.onCopy&&(h.preventDefault(),n.onCopy(h.clipboardData))}),document.body.appendChild(y),l.selectNodeContents(y),m.addRange(l);var b=document.execCommand("copy");if(!b)throw new Error("copy command was unsuccessful");f=!0}catch(h){s&&console.error("unable to copy using execCommand: ",h),s&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(n.format||"text",a),n.onCopy&&n.onCopy(window.clipboardData),f=!0}catch(T){s&&console.error("unable to copy using clipboardData: ",T),s&&console.error("falling back to prompt"),o=vm("message"in n?n.message:wm),window.prompt(o,a)}}finally{m&&(typeof m.removeRange=="function"?m.removeRange(l):m.removeAllRanges()),y&&document.body.removeChild(y),c()}return f}var Dm=Tm;function bn(a){"@babel/helpers - typeof";return bn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},bn(a)}Object.defineProperty(ta,"__esModule",{value:!0}),ta.CopyToClipboard=void 0;var ra=qo(O),km=qo(Dm),Im=["text","onCopy","options","children"];function qo(a){return a&&a.__esModule?a:{default:a}}function Co(a,n){var s=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);n&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),s.push.apply(s,o)}return s}function zo(a){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?Co(Object(s),!0).forEach(function(o){hn(a,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(s)):Co(Object(s)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(s,o))})}return a}function Am(a,n){if(a==null)return{};var s=qm(a,n),o,c;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);for(c=0;c<l.length;c++)o=l[c],!(n.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(a,o)&&(s[o]=a[o])}return s}function qm(a,n){if(a==null)return{};var s={},o=Object.keys(a),c,l;for(l=0;l<o.length;l++)c=o[l],!(n.indexOf(c)>=0)&&(s[c]=a[c]);return s}function Cm(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function So(a,n){for(var s=0;s<n.length;s++){var o=n[s];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(a,o.key,o)}}function zm(a,n,s){return n&&So(a.prototype,n),s&&So(a,s),Object.defineProperty(a,"prototype",{writable:!1}),a}function Sm(a,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(n&&n.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),n&&xn(a,n)}function xn(a,n){return xn=Object.setPrototypeOf||function(o,c){return o.__proto__=c,o},xn(a,n)}function Em(a){var n=Lm();return function(){var o=sa(a),c;if(n){var l=sa(this).constructor;c=Reflect.construct(o,arguments,l)}else c=o.apply(this,arguments);return Nm(this,c)}}function Nm(a,n){if(n&&(bn(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Eo(a)}function Eo(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function Lm(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function sa(a){return sa=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)},sa(a)}function hn(a,n,s){return n in a?Object.defineProperty(a,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[n]=s,a}var No=function(a){Sm(s,a);var n=Em(s);function s(){var o;Cm(this,s);for(var c=arguments.length,l=new Array(c),m=0;m<c;m++)l[m]=arguments[m];return o=n.call.apply(n,[this].concat(l)),hn(Eo(o),"onClick",function(y){var f=o.props,b=f.text,h=f.onCopy,T=f.children,N=f.options,F=ra.default.Children.only(T),S=(0,km.default)(b,N);h&&h(b,S),F&&F.props&&typeof F.props.onClick=="function"&&F.props.onClick(y)}),o}return zm(s,[{key:"render",value:function(){var c=this.props;c.text,c.onCopy,c.options;var l=c.children,m=Am(c,Im),y=ra.default.Children.only(l);return ra.default.cloneElement(y,zo(zo({},m),{},{onClick:this.onClick}))}}]),s}(ra.default.PureComponent);ta.CopyToClipboard=No,hn(No,"defaultProps",{onCopy:void 0,options:void 0});var Mm=ta,wn=Mm.CopyToClipboard;wn.CopyToClipboard=wn;var Pm=wn;const vn=ip(Pm);async function Om(a,n=0){const s=a[n];if(!s)return;const{name:o,args:c,type:l,desc:m,examples:y,remarks:f,seeAlso:b,syntax:h,detailedDesc:T,fields:N,returns:F}=s,S={name:o};if(a.length>1&&(S.overloads=`${a.length} overloads`),l&&(S.type=l),c&&(S.name=`${o}()`,S.args=c.map(R=>{const{name:W,desc:V,displayType:Y}=R;return{label:`${W} (${Y})`,desc:V&&xr(V)}})),m&&(S.desc=m.map(R=>xr(R))),y&&(S.originalExample=y.join(`
147
+ `),S.examples=await ke.editor.colorize(S.originalExample,Se,{tabSize:4})),T){S.detailedDesc=[];for(const R of T){const{desc:W,examples:V}=R;let Y=W.map(A=>xr(A)),U,K;V&&(K=V.join(`
148
+ `),U=await ke.editor.colorize(K,Se,{tabSize:4})),S.detailedDesc.push({desc:Y,examples:U,originalExample:K})}}return F&&(S.returns=F.map(R=>xr(R))),f&&(S.remarks=typeof f=="string"?[xr(f)]:f.map(R=>xr(R))),h&&(S.syntax=a.map(R=>{var W;return(W=R.syntax)==null?void 0:W[0]})),N&&(S.fields=N.map(R=>{const{name:W,desc:V,type:Y}=R;return{label:`${W} (${Y})`,desc:V&&xr(V)}})),b&&(S.seeAlso=b.map(R=>Rm(R))),S}function Rm(a){const s=/\[([^\[\]]+)\]\(([^\(\)]+)\)/g.exec(a);if(s){const[o,c,l]=s;return{name:c,link:l}}}function xr(a){const n=/\*\*([^\*]+)\*\*/g,s=/\`([^\`]+)\`/g,o=/\[([^\[\]]+)\]\(([^\(\)]+)\)/g;return a.replace(n,(c,l)=>`<strong>${l}</strong>`).replace(s,(c,l)=>`<code>${l}</code>`).replace(o,(c,l,m)=>`<a ${m.startsWith("#")?`data-name="${l}"`:'target="_blank"'} class="manual-content-text-link" href="${m}">${l}</a>`)}function Fm(a){var c;const n=[];let s=0;const o=[];for(const l of ps){for(let m of no[l.key].sort()){if(ao.includes(m))continue;let y=m;l.prefix==="fun"&&(y=`${m}()`),y.includes(a)&&(y.startsWith(a)?(y.includes(".")?n.splice(s,0,{label:y,group:l,key:`${l.prefix}_${m}`}):n.unshift({label:y,group:l,key:`${l.prefix}_${m}`}),s++):n.push({label:y,group:l,key:`${l.prefix}_${m}`}))}for(const[m,y]of ct[l.key])for(const f of y){const{name:b,args:h,type:T,desc:N,examples:F,remarks:S,seeAlso:R,syntax:W,detailedDesc:V,fields:Y,returns:U}=f,K={label:b,group:l,key:`${l.prefix}_${b}`};if(l.prefix==="fun"&&(K.label=`${b}()`),K.label.includes(a))break;if(h){let A=!1;for(const B of h){const{name:E,desc:H,displayType:Q}=B;if(E.includes(a)||H!=null&&H.includes(a)||Q!=null&&Q.includes(a)){o.push(K),A=!0;break}}if(A)break}if(T&&T.includes(a)){o.push(K);break}if(N){let A=!1;for(const B of N)if(B.includes(a)){o.push(K),A=!0;break}if(A)break}if(F){let A=!1;for(const B of F)if(B.includes(a)){o.push(K),A=!0;break}if(A)break}if(S&&(typeof S=="string"?S:S.join(`
149
+ `)).includes(a)){o.push(K);break}if(W){let A=!1;for(const B of W)if(B.includes(a)){o.push(K),A=!0;break}if(A)break}if(V){let A=!1;for(const B of V){const{desc:E,examples:H}=B;if(E.join(`
150
+ `).includes(a)){o.push(K),A=!0;break}if((c=H==null?void 0:H.join(`
151
+ `))!=null&&c.includes(a)){o.push(K),A=!0;break}}if(A)break}if(Y){let A=!1;for(const B of Y){const{name:E,desc:H,type:Q}=B;if(E.includes(a)||H!=null&&H.includes(a)||Q!=null&&Q.includes(a)){o.push(K),A=!0;break}}if(A)break}if(U){let A=!1;for(const B of U)if(B.includes(a)){o.push(K),A=!0;break}if(A)break}}}return{labelList:n,contentList:o}}const Bm=a=>{var Y;const{group:n,itemKey:s,onItemClick:o,currentIndex:c}=a,[l,m]=O.useState(),[y,f]=O.useState(0),[b,h]=O.useState("Copy code"),[T,N]=O.useState("Copy link");O.useEffect(()=>{F(c)},[s]);const F=U=>{const K=s.replace(`${n==null?void 0:n.prefix}_`,""),A=ct[n==null?void 0:n.key].get(K);f(U),A&&Om(A,U).then(B=>{m(B)})},S=U=>{F(U)},R=U=>{var K,A;if(U.target.localName==="a"&&U.target.hash&&((A=(K=U.target)==null?void 0:K.dataset)!=null&&A.name)){U.preventDefault();const{hash:B}=U.target;o(B.replace("#",""))}},W=()=>{h("Copied"),setTimeout(()=>{h("Copy code")},1e3)},V=()=>{N("Link copied"),setTimeout(()=>{N("Copy link")},3e3)};return M.jsx("div",{onClick:R,id:`#${s}`,children:M.jsxs("div",{className:"manual-content-wrapper",children:[M.jsxs("div",{className:"manual-content-header",children:[M.jsxs("div",{children:[M.jsx("h3",{className:"manual-content-header-title",children:l==null?void 0:l.name}),!!(l!=null&&l.overloads)&&M.jsx("span",{className:"manual-content-header-overloads",children:l==null?void 0:l.overloads})]}),M.jsx(vn,{text:(l==null?void 0:l.name)||"",onCopy:V,children:M.jsx("div",{"data-tooltip":T,className:"manual-content-btn",children:M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28",width:"28",height:"28",children:M.jsxs("g",{fill:"currentColor",children:[M.jsx("path",{fillRule:"nonzero",d:"M15.039 5.969l-.019-.019-2.828 2.828.707.707 2.474-2.474c1.367-1.367 3.582-1.367 4.949 0s1.367 3.582 0 4.949l-2.474 2.474.707.707 2.828-2.828-.019-.019c1.415-1.767 1.304-4.352-.334-5.99-1.638-1.638-4.224-1.749-5.99-.334zM5.97 15.038l-.019-.019 2.828-2.828.707.707-2.475 2.475c-1.367 1.367-1.367 3.582 0 4.949s3.582 1.367 4.949 0l2.474-2.474.707.707-2.828 2.828-.019-.019c-1.767 1.415-4.352 1.304-5.99-.334-1.638-1.638-1.749-4.224-.334-5.99z"}),M.jsx("path",{d:"M10.485 16.141l5.656-5.656.707.707-5.656 5.656z"})]})})})})]}),(Y=l==null?void 0:l.desc)==null?void 0:Y.map((U,K)=>M.jsx("div",{dangerouslySetInnerHTML:{__html:U},className:"manual-content-text"},K)),(l==null?void 0:l.type)&&M.jsxs(O.Fragment,{children:[M.jsx("div",{className:"manual-content-sub-title",children:"type"}),M.jsx("div",{className:"manual-content-text",children:l.type})]}),(l==null?void 0:l.syntax)&&M.jsxs(O.Fragment,{children:[M.jsxs("div",{className:"manual-content-sub-title",children:["Syntax ",!!(l!=null&&l.overloads)&&"& Overloads"]}),l.syntax.map((U,K)=>{var A;return(((A=l.syntax)==null?void 0:A.length)||0)>1?M.jsx("div",{onClick:()=>S(K),children:M.jsx("pre",{className:`manual-content-syntax with-overloads ${K===y?"selected":""}`,children:U})},K):M.jsx("pre",{className:"manual-content-syntax",children:U},K)})]}),(l==null?void 0:l.args)&&M.jsxs(O.Fragment,{children:[M.jsx("div",{className:"manual-content-sub-title",children:"arguments"}),l.args.map((U,K)=>M.jsxs("div",{className:"manual-content-text",children:[M.jsx("span",{className:"manual-content-args-label",children:U.label})," ",M.jsx("span",{dangerouslySetInnerHTML:{__html:U.desc||""}})]},K))]}),(l==null?void 0:l.fields)&&M.jsxs(O.Fragment,{children:[M.jsx("div",{className:"manual-content-sub-title",children:"fields"}),l.fields.map((U,K)=>M.jsxs("div",{className:"manual-content-text",children:[M.jsx("span",{className:"manual-content-args-label",children:U.label})," ",M.jsx("span",{dangerouslySetInnerHTML:{__html:U.desc||""}})]},K))]}),(l==null?void 0:l.examples)&&M.jsxs(O.Fragment,{children:[M.jsxs("div",{className:"manual-content-sub-title manual-content-example-header",children:[M.jsx("div",{children:M.jsx("span",{children:"example"})}),M.jsx(vn,{text:l.originalExample||"",onCopy:W,children:M.jsx("div",{"data-tooltip":b,className:"manual-content-btn manual-content-example-copy",children:M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",fill:"none",children:M.jsx("path",{stroke:"currentColor",d:"M8 9.5H6.5a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1V20m-8-1.5h11a1 1 0 0 0 1-1v-11a1 1 0 0 0-1-1h-11a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1z"})})})})]}),M.jsx("pre",{className:"manual-content-example",children:M.jsx("code",{dangerouslySetInnerHTML:{__html:l.examples}})})]}),(l==null?void 0:l.detailedDesc)&&l.detailedDesc.map((U,K)=>M.jsxs(O.Fragment,{children:[U.desc.map((A,B)=>M.jsx("div",{className:"manual-content-text",dangerouslySetInnerHTML:{__html:A}},B)),M.jsxs("div",{className:"manual-content-sub-title manual-content-example-header",children:[M.jsx("div",{children:M.jsx("span",{children:"example"})}),M.jsx(vn,{text:U.originalExample||"",onCopy:W,children:M.jsx("div",{"data-tooltip":b,className:"manual-content-btn manual-content-example-copy",children:M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",fill:"none",children:M.jsx("path",{stroke:"currentColor",d:"M8 9.5H6.5a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1V20m-8-1.5h11a1 1 0 0 0 1-1v-11a1 1 0 0 0-1-1h-11a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1z"})})})})]}),M.jsx("pre",{className:"manual-content-example",children:M.jsx("code",{dangerouslySetInnerHTML:{__html:U.examples||""}})})]},K)),(l==null?void 0:l.returns)&&M.jsxs(O.Fragment,{children:[M.jsx("div",{className:"manual-content-sub-title",children:"returns"}),l.returns.map((U,K)=>M.jsx("div",{className:"manual-content-text",dangerouslySetInnerHTML:{__html:U}},K))]}),(l==null?void 0:l.remarks)&&M.jsxs(O.Fragment,{children:[M.jsx("div",{className:"manual-content-sub-title",children:"remarks"}),l.remarks.map((U,K)=>M.jsx("div",{className:"manual-content-text",dangerouslySetInnerHTML:{__html:U}},K))]}),(l==null?void 0:l.seeAlso)&&M.jsxs(O.Fragment,{children:[M.jsx("div",{className:"manual-content-sub-title",children:"see Also"}),M.jsx("div",{className:"manual-content-see_also",children:l.seeAlso.map((U,K)=>M.jsx("a",{className:"manual-content-see_also-tag","data-name":U==null?void 0:U.name,href:U==null?void 0:U.link,children:U==null?void 0:U.name},K))})]})]})})};ke.languages.register({id:Se}),ke.editor.defineTheme("vs-dark",cn),ke.editor.defineTheme("vs",ln),ke.languages.setMonarchTokensProvider(Se,Nr),ke.languages.setLanguageConfiguration(Se,on);const Um=({theme:a="vs-dark",currentValue:n})=>{const[s,o]=O.useState(ps[0]),[c,l]=O.useState(null),[m,y]=O.useState(0),[f,b]=O.useState(""),[h,T]=O.useState("var_bar_index"),N=O.useRef(null),F=O.useRef(null),S=O.useRef(null),R=A=>{var B;A.key===(s==null?void 0:s.key)&&!(s!=null&&s.isHidden)?o({...A,isHidden:!0}):o(A),(B=N.current)==null||B.focus()};O.useEffect(()=>{ke.editor.setTheme(a)},[a]),O.useEffect(()=>{var A;if(n.value){const[B]=n.value.split("_"),E=ps.find(H=>B===H.prefix);E&&(y(n.index||0),U(E,n.value)),(A=N.current)==null||A.focus()}},[n]),O.useEffect(()=>{var A;(A=N.current)==null||A.focus()},[N.current]);const W=(A,B)=>{var E,H;A!==h&&(B&&o(B),y(0),T(A),(E=S.current)==null||E.scrollTo({top:0}),(H=N.current)==null||H.focus())},V=A=>{if(A.target.value.trim()==="")Y();else{b(A.target.value);const B=Fm(A.target.value);l(B)}},Y=()=>{var A;b(""),l(null),setTimeout(()=>{var B,E;(E=(B=F.current)==null?void 0:B.querySelector(`a[data-href="${h}"]`))==null||E.scrollIntoView(!0)},10),(A=N.current)==null||A.focus()},U=(A,B)=>{var E;o(A),T(B),setTimeout(()=>{var H,Q;(Q=(H=F.current)==null?void 0:H.querySelector(`a[data-href="${B}"]`))==null||Q.scrollIntoView(!0)},10),(E=S.current)==null||E.scrollTo({top:0})},K=A=>{var E;const B=ps.find(H=>A.startsWith(H.prefix));B&&(y(0),U(B,A),(E=N.current)==null||E.focus())};return M.jsxs("div",{className:`${a} manual-warpper`,children:[M.jsxs("div",{className:"manual-left",children:[M.jsxs("div",{className:"manual-search",children:[M.jsx("span",{className:"manual-search-icon",children:M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18",width:"18px",height:"18px",children:M.jsx("path",{fillRule:"evenodd",d:"M12.5 11h-.79l-.28-.27A6.47 6.47 0 0 0 13 6.5 6.5 6.5 0 1 0 6.5 13c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L17.49 16l-4.99-5zm-6 0C4.01 11 2 8.99 2 6.5S4.01 2 6.5 2 11 4.01 11 6.5 8.99 11 6.5 11z"})})}),M.jsx("input",{onChange:V,ref:N,spellCheck:"false",value:f,className:"manual-search-input",autoComplete:"off",placeholder:"Search",type:"text"}),M.jsx("span",{onClick:Y,className:`manual-search-clear ${f?"":"hide"}`,children:M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 95.939 95.939",width:"9",height:"9",children:M.jsx("path",{d:"M62.82 47.97l32.53-32.534a2 2 0 0 0 0-2.828L83.332.586a2 2 0 0 0-2.827 0L47.97 33.12 15.435.587c-.75-.75-2.078-.75-2.828 0L.587 12.607a2 2 0 0 0 0 2.83L33.12 47.97.588 80.504a2 2 0 0 0 0 2.828l12.02 12.02a1.997 1.997 0 0 0 2.83 0L47.97 62.818l32.535 32.535a2 2 0 0 0 2.827 0l12.02-12.02c.78-.783.78-2.05 0-2.83L62.82 47.97z"})})})]}),M.jsx("div",{className:`manual-group-search-list manual-scroll ${f?"":"hide"}`,children:M.jsxs("div",{children:[c==null?void 0:c.labelList.map(A=>M.jsx("a",{onClick:B=>{B.preventDefault(),W(A.key,A.group)},className:`manual-group-body-item ${A.key===h?"manual-group-body-item-selected":""}`,"data-href":A.key,href:`#${A.key}`,children:A.label},`search_${A.key}`)),M.jsx("div",{className:"manual-content-separator"}),c==null?void 0:c.contentList.map(A=>M.jsx("a",{onClick:B=>{B.preventDefault(),W(A.key,A.group)},className:`manual-group-body-item ${A.key===h?"manual-group-body-item-selected":""}`,"data-href":A.key,href:`#${A.key}`,children:A.label},`search_${A.key}`))]})}),M.jsx("div",{className:`manual-group-list manual-scroll ${f?"hide":""}`,ref:F,children:ps.map(A=>{var B,E;return M.jsxs(O.Fragment,{children:[M.jsx("div",{onClick:()=>R(A),className:`manual-group-title ${A.key===(s==null?void 0:s.key)&&!(s!=null&&s.isHidden)?"active":""}`,children:A.title}),M.jsx("div",{className:`manual-group-body manual-scroll ${A.key!==(s==null?void 0:s.key)||s!=null&&s.isHidden?"hide":""}`,children:(E=(B=no[A.key])==null?void 0:B.sort().filter(H=>!ao.includes(H)))==null?void 0:E.map(H=>{const Q=`${A.prefix}_${H}`;return M.jsx("a",{onClick:ie=>{ie.preventDefault(),W(Q)},className:`manual-group-body-item ${Q===h?"manual-group-body-item-selected":""}`,"data-href":Q,href:`#${Q}`,children:`${H}${A.prefix==="fun"?"()":""}`},Q)})})]},A.key)})})]}),M.jsx("div",{ref:S,className:"manual-right manual-scroll",children:M.jsx(Bm,{currentIndex:m,group:s,itemKey:h,onItemClick:K})})]})};I.ReferenceManual=Um,I.TradingVueDiffEditor=bm,I.TradingVueEditor=gm,I.parseLibrary=mm,I.parseTcc=Io,I.removeScript=ym,I.scriptsRun=um,Object.defineProperty(I,Symbol.toStringTag,{value:"Module"})});