@guihz/trading-vue-editor-tes 0.0.218 → 0.0.219

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
- (function(q,F){typeof exports=="object"&&typeof module<"u"?F(exports,require("react"),require("monaco-editor"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","monaco-editor","react-dom"],F):(q=typeof globalThis<"u"?globalThis:q||self,F(q.vueEditor={},q.react,q["monaco-editor"],q["react-dom"]))})(this,function(q,F,qe,ed){"use strict";var uo=document.createElement("style");uo.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(uo);var Jr=typeof document<"u"?document.currentScript:null,mo;(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"})(mo||(mo={}));var ot;(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"})(ot||(ot={})),q.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"}(q.Actions||(q.Actions={}));var pr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function td(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var xn={exports:{}},dr={};/**
2
+ (function(q,F){typeof exports=="object"&&typeof module<"u"?F(exports,require("react"),require("monaco-editor"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","monaco-editor","react-dom"],F):(q=typeof globalThis<"u"?globalThis:q||self,F(q.vueEditor={},q.react,q["monaco-editor"],q["react-dom"]))})(this,function(q,F,qe,ed){"use strict";var mo=document.createElement("style");mo.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(mo);var ea=typeof document<"u"?document.currentScript:null,yo;(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"})(yo||(yo={}));var ot;(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"})(ot||(ot={})),q.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"}(q.Actions||(q.Actions={}));var dr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function td(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var hn={exports:{}},ur={};/**
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 yo;function sd(){if(yo)return dr;yo=1;var a=F,s=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function p(u,m,_){var g,h={},w=null,k=null;_!==void 0&&(w=""+_),m.key!==void 0&&(w=""+m.key),m.ref!==void 0&&(k=m.ref);for(g in m)n.call(m,g)&&!l.hasOwnProperty(g)&&(h[g]=m[g]);if(u&&u.defaultProps)for(g in m=u.defaultProps,m)h[g]===void 0&&(h[g]=m[g]);return{$$typeof:s,type:u,key:w,ref:k,props:h,_owner:o.current}}return dr.Fragment=r,dr.jsx=p,dr.jsxs=p,dr}var ur={};/**
11
+ */var _o;function sd(){if(_o)return ur;_o=1;var a=F,s=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function p(u,m,_){var g,h={},w=null,k=null;_!==void 0&&(w=""+_),m.key!==void 0&&(w=""+m.key),m.ref!==void 0&&(k=m.ref);for(g in m)n.call(m,g)&&!l.hasOwnProperty(g)&&(h[g]=m[g]);if(u&&u.defaultProps)for(g in m=u.defaultProps,m)h[g]===void 0&&(h[g]=m[g]);return{$$typeof:s,type:u,key:w,ref:k,props:h,_owner:o.current}}return ur.Fragment=r,ur.jsx=p,ur.jsxs=p,ur}var mr={};/**
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 _o;function rd(){return _o||(_o=1,process.env.NODE_ENV!=="production"&&function(){var a=F,s=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),u=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),k=Symbol.for("react.offscreen"),S=Symbol.iterator,C="@@iterator";function B(x){if(x===null||typeof x!="object")return null;var K=S&&x[S]||x[C];return typeof K=="function"?K:null}var W=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function H(x){{for(var K=arguments.length,V=new Array(K>1?K-1:0),ae=1;ae<K;ae++)V[ae-1]=arguments[ae];ee("error",x,V)}}function ee(x,K,V){{var ae=W.ReactDebugCurrentFrame,he=ae.getStackAddendum();he!==""&&(K+="%s",V=V.concat([he]));var De=V.map(function(_e){return String(_e)});De.unshift("Warning: "+K),Function.prototype.apply.call(console[x],console,De)}}var N=!1,M=!1,E=!1,$=!1,P=!1,j;j=Symbol.for("react.module.reference");function X(x){return!!(typeof x=="string"||typeof x=="function"||x===n||x===l||P||x===o||x===_||x===g||$||x===k||N||M||E||typeof x=="object"&&x!==null&&(x.$$typeof===w||x.$$typeof===h||x.$$typeof===p||x.$$typeof===u||x.$$typeof===m||x.$$typeof===j||x.getModuleId!==void 0))}function xe(x,K,V){var ae=x.displayName;if(ae)return ae;var he=K.displayName||K.name||"";return he!==""?V+"("+he+")":V}function rt(x){return x.displayName||"Context"}function He(x){if(x==null)return null;if(typeof x.tag=="number"&&H("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof x=="function")return x.displayName||x.name||null;if(typeof x=="string")return x;switch(x){case n:return"Fragment";case r:return"Portal";case l:return"Profiler";case o:return"StrictMode";case _:return"Suspense";case g:return"SuspenseList"}if(typeof x=="object")switch(x.$$typeof){case u:var K=x;return rt(K)+".Consumer";case p:var V=x;return rt(V._context)+".Provider";case m:return xe(x,x.render,"ForwardRef");case h:var ae=x.displayName||null;return ae!==null?ae:He(x.type)||"Memo";case w:{var he=x,De=he._payload,_e=he._init;try{return He(_e(De))}catch{return null}}}return null}var Ee=Object.assign,Z=0,ye,ze,ge,Ue,Ge,re,ve;function Ke(){}Ke.__reactDisabledLog=!0;function kt(){{if(Z===0){ye=console.log,ze=console.info,ge=console.warn,Ue=console.error,Ge=console.group,re=console.groupCollapsed,ve=console.groupEnd;var x={configurable:!0,enumerable:!0,value:Ke,writable:!0};Object.defineProperties(console,{info:x,log:x,warn:x,error:x,group:x,groupCollapsed:x,groupEnd:x})}Z++}}function Xe(){{if(Z--,Z===0){var x={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Ee({},x,{value:ye}),info:Ee({},x,{value:ze}),warn:Ee({},x,{value:ge}),error:Ee({},x,{value:Ue}),group:Ee({},x,{value:Ge}),groupCollapsed:Ee({},x,{value:re}),groupEnd:Ee({},x,{value:ve})})}Z<0&&H("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var cs=W.ReactCurrentDispatcher,Ir;function jt(x,K,V){{if(Ir===void 0)try{throw Error()}catch(he){var ae=he.stack.trim().match(/\n( *(at )?)/);Ir=ae&&ae[1]||""}return`
20
- `+Ir+x}}var Xt=!1,Ks;{var $s=typeof WeakMap=="function"?WeakMap:Map;Ks=new $s}function ks(x,K){if(!x||Xt)return"";{var V=Ks.get(x);if(V!==void 0)return V}var ae;Xt=!0;var he=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var De;De=cs.current,cs.current=null,kt();try{if(K){var _e=function(){throw Error()};if(Object.defineProperty(_e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(_e,[])}catch(ct){ae=ct}Reflect.construct(x,[],_e)}else{try{_e.call()}catch(ct){ae=ct}x.call(_e.prototype)}}else{try{throw Error()}catch(ct){ae=ct}x()}}catch(ct){if(ct&&ae&&typeof ct.stack=="string"){for(var ue=ct.stack.split(`
19
+ */var fo;function rd(){return fo||(fo=1,process.env.NODE_ENV!=="production"&&function(){var a=F,s=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),u=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),k=Symbol.for("react.offscreen"),S=Symbol.iterator,C="@@iterator";function B(x){if(x===null||typeof x!="object")return null;var K=S&&x[S]||x[C];return typeof K=="function"?K:null}var W=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function H(x){{for(var K=arguments.length,V=new Array(K>1?K-1:0),ae=1;ae<K;ae++)V[ae-1]=arguments[ae];ee("error",x,V)}}function ee(x,K,V){{var ae=W.ReactDebugCurrentFrame,he=ae.getStackAddendum();he!==""&&(K+="%s",V=V.concat([he]));var De=V.map(function(_e){return String(_e)});De.unshift("Warning: "+K),Function.prototype.apply.call(console[x],console,De)}}var N=!1,M=!1,E=!1,$=!1,P=!1,j;j=Symbol.for("react.module.reference");function X(x){return!!(typeof x=="string"||typeof x=="function"||x===n||x===l||P||x===o||x===_||x===g||$||x===k||N||M||E||typeof x=="object"&&x!==null&&(x.$$typeof===w||x.$$typeof===h||x.$$typeof===p||x.$$typeof===u||x.$$typeof===m||x.$$typeof===j||x.getModuleId!==void 0))}function xe(x,K,V){var ae=x.displayName;if(ae)return ae;var he=K.displayName||K.name||"";return he!==""?V+"("+he+")":V}function rt(x){return x.displayName||"Context"}function He(x){if(x==null)return null;if(typeof x.tag=="number"&&H("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof x=="function")return x.displayName||x.name||null;if(typeof x=="string")return x;switch(x){case n:return"Fragment";case r:return"Portal";case l:return"Profiler";case o:return"StrictMode";case _:return"Suspense";case g:return"SuspenseList"}if(typeof x=="object")switch(x.$$typeof){case u:var K=x;return rt(K)+".Consumer";case p:var V=x;return rt(V._context)+".Provider";case m:return xe(x,x.render,"ForwardRef");case h:var ae=x.displayName||null;return ae!==null?ae:He(x.type)||"Memo";case w:{var he=x,De=he._payload,_e=he._init;try{return He(_e(De))}catch{return null}}}return null}var Ee=Object.assign,Z=0,ye,ze,ge,Ue,Ge,re,ve;function Ke(){}Ke.__reactDisabledLog=!0;function It(){{if(Z===0){ye=console.log,ze=console.info,ge=console.warn,Ue=console.error,Ge=console.group,re=console.groupCollapsed,ve=console.groupEnd;var x={configurable:!0,enumerable:!0,value:Ke,writable:!0};Object.defineProperties(console,{info:x,log:x,warn:x,error:x,group:x,groupCollapsed:x,groupEnd:x})}Z++}}function Xe(){{if(Z--,Z===0){var x={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Ee({},x,{value:ye}),info:Ee({},x,{value:ze}),warn:Ee({},x,{value:ge}),error:Ee({},x,{value:Ue}),group:Ee({},x,{value:Ge}),groupCollapsed:Ee({},x,{value:re}),groupEnd:Ee({},x,{value:ve})})}Z<0&&H("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ps=W.ReactCurrentDispatcher,Ar;function Ht(x,K,V){{if(Ar===void 0)try{throw Error()}catch(he){var ae=he.stack.trim().match(/\n( *(at )?)/);Ar=ae&&ae[1]||""}return`
20
+ `+Ar+x}}var Yt=!1,$s;{var js=typeof WeakMap=="function"?WeakMap:Map;$s=new js}function Is(x,K){if(!x||Yt)return"";{var V=$s.get(x);if(V!==void 0)return V}var ae;Yt=!0;var he=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var De;De=ps.current,ps.current=null,It();try{if(K){var _e=function(){throw Error()};if(Object.defineProperty(_e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(_e,[])}catch(ct){ae=ct}Reflect.construct(x,[],_e)}else{try{_e.call()}catch(ct){ae=ct}x.call(_e.prototype)}}else{try{throw Error()}catch(ct){ae=ct}x()}}catch(ct){if(ct&&ae&&typeof ct.stack=="string"){for(var ue=ct.stack.split(`
21
21
  `),Qe=ae.stack.split(`
22
22
  `),Oe=ue.length-1,Fe=Qe.length-1;Oe>=1&&Fe>=0&&ue[Oe]!==Qe[Fe];)Fe--;for(;Oe>=1&&Fe>=0;Oe--,Fe--)if(ue[Oe]!==Qe[Fe]){if(Oe!==1||Fe!==1)do if(Oe--,Fe--,Fe<0||ue[Oe]!==Qe[Fe]){var lt=`
23
- `+ue[Oe].replace(" at new "," at ");return x.displayName&&lt.includes("<anonymous>")&&(lt=lt.replace("<anonymous>",x.displayName)),typeof x=="function"&&Ks.set(x,lt),lt}while(Oe>=1&&Fe>=0);break}}}finally{Xt=!1,cs.current=De,Xe(),Error.prepareStackTrace=he}var Mt=x?x.displayName||x.name:"",za=Mt?jt(Mt):"";return typeof x=="function"&&Ks.set(x,za),za}function va(x,K,V){return ks(x,!1)}function ft(x){var K=x.prototype;return!!(K&&K.isReactComponent)}function Ht(x,K,V){if(x==null)return"";if(typeof x=="function")return ks(x,ft(x));if(typeof x=="string")return jt(x);switch(x){case _:return jt("Suspense");case g:return jt("SuspenseList")}if(typeof x=="object")switch(x.$$typeof){case m:return va(x.render);case h:return Ht(x.type,K,V);case w:{var ae=x,he=ae._payload,De=ae._init;try{return Ht(De(he),K,V)}catch{}}}return""}var js=Object.prototype.hasOwnProperty,It={},Ar=W.ReactDebugCurrentFrame;function Hs(x){if(x){var K=x._owner,V=Ht(x.type,x._source,K?K.type:null);Ar.setExtraStackFrame(V)}else Ar.setExtraStackFrame(null)}function Is(x,K,V,ae,he){{var De=Function.call.bind(js);for(var _e in x)if(De(x,_e)){var ue=void 0;try{if(typeof x[_e]!="function"){var Qe=Error((ae||"React class")+": "+V+" type `"+_e+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof x[_e]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Qe.name="Invariant Violation",Qe}ue=x[_e](K,_e,ae,V,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Oe){ue=Oe}ue&&!(ue instanceof Error)&&(Hs(he),H("%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).",ae||"React class",V,_e,typeof ue),Hs(null)),ue instanceof Error&&!(ue.message in It)&&(It[ue.message]=!0,Hs(he),H("Failed %s type: %s",V,ue.message),Hs(null))}}}var gt=Array.isArray;function Yt(x){return gt(x)}function Ws(x){{var K=typeof Symbol=="function"&&Symbol.toStringTag,V=K&&x[Symbol.toStringTag]||x.constructor.name||"Object";return V}}function Gn(x){try{return ps(x),!1}catch{return!0}}function ps(x){return""+x}function Ta(x){if(Gn(x))return H("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ws(x)),ps(x)}var Pt=W.ReactCurrentOwner,ds={key:!0,ref:!0,__self:!0,__source:!0},Vs,Gs,As;As={};function qr(x){if(js.call(x,"ref")){var K=Object.getOwnPropertyDescriptor(x,"ref").get;if(K&&K.isReactWarning)return!1}return x.ref!==void 0}function Cr(x){if(js.call(x,"key")){var K=Object.getOwnPropertyDescriptor(x,"key").get;if(K&&K.isReactWarning)return!1}return x.key!==void 0}function Sr(x,K){if(typeof x.ref=="string"&&Pt.current&&K&&Pt.current.stateNode!==K){var V=He(Pt.current.type);As[V]||(H('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',He(Pt.current.type),x.ref),As[V]=!0)}}function zr(x,K){{var V=function(){Vs||(Vs=!0,H("%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)",K))};V.isReactWarning=!0,Object.defineProperty(x,"key",{get:V,configurable:!0})}}function Nr(x,K){{var V=function(){Gs||(Gs=!0,H("%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)",K))};V.isReactWarning=!0,Object.defineProperty(x,"ref",{get:V,configurable:!0})}}var Er=function(x,K,V,ae,he,De,_e){var ue={$$typeof:s,type:x,key:K,ref:V,props:_e,_owner:De};return ue._store={},Object.defineProperty(ue._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ue,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ae}),Object.defineProperty(ue,"_source",{configurable:!1,enumerable:!1,writable:!1,value:he}),Object.freeze&&(Object.freeze(ue.props),Object.freeze(ue)),ue};function Xn(x,K,V,ae,he){{var De,_e={},ue=null,Qe=null;V!==void 0&&(Ta(V),ue=""+V),Cr(K)&&(Ta(K.key),ue=""+K.key),qr(K)&&(Qe=K.ref,Sr(K,he));for(De in K)js.call(K,De)&&!ds.hasOwnProperty(De)&&(_e[De]=K[De]);if(x&&x.defaultProps){var Oe=x.defaultProps;for(De in Oe)_e[De]===void 0&&(_e[De]=Oe[De])}if(ue||Qe){var Fe=typeof x=="function"?x.displayName||x.name||"Unknown":x;ue&&zr(_e,Fe),Qe&&Nr(_e,Fe)}return Er(x,ue,Qe,he,ae,Pt.current,_e)}}var Lr=W.ReactCurrentOwner,Da=W.ReactDebugCurrentFrame;function Qt(x){if(x){var K=x._owner,V=Ht(x.type,x._source,K?K.type:null);Da.setExtraStackFrame(V)}else Da.setExtraStackFrame(null)}var Xs;Xs=!1;function Or(x){return typeof x=="object"&&x!==null&&x.$$typeof===s}function ka(){{if(Lr.current){var x=He(Lr.current.type);if(x)return`
23
+ `+ue[Oe].replace(" at new "," at ");return x.displayName&&lt.includes("<anonymous>")&&(lt=lt.replace("<anonymous>",x.displayName)),typeof x=="function"&&$s.set(x,lt),lt}while(Oe>=1&&Fe>=0);break}}}finally{Yt=!1,ps.current=De,Xe(),Error.prepareStackTrace=he}var Rt=x?x.displayName||x.name:"",Na=Rt?Ht(Rt):"";return typeof x=="function"&&$s.set(x,Na),Na}function Ta(x,K,V){return Is(x,!1)}function ft(x){var K=x.prototype;return!!(K&&K.isReactComponent)}function Wt(x,K,V){if(x==null)return"";if(typeof x=="function")return Is(x,ft(x));if(typeof x=="string")return Ht(x);switch(x){case _:return Ht("Suspense");case g:return Ht("SuspenseList")}if(typeof x=="object")switch(x.$$typeof){case m:return Ta(x.render);case h:return Wt(x.type,K,V);case w:{var ae=x,he=ae._payload,De=ae._init;try{return Wt(De(he),K,V)}catch{}}}return""}var Hs=Object.prototype.hasOwnProperty,At={},qr=W.ReactDebugCurrentFrame;function Ws(x){if(x){var K=x._owner,V=Wt(x.type,x._source,K?K.type:null);qr.setExtraStackFrame(V)}else qr.setExtraStackFrame(null)}function As(x,K,V,ae,he){{var De=Function.call.bind(Hs);for(var _e in x)if(De(x,_e)){var ue=void 0;try{if(typeof x[_e]!="function"){var Qe=Error((ae||"React class")+": "+V+" type `"+_e+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof x[_e]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Qe.name="Invariant Violation",Qe}ue=x[_e](K,_e,ae,V,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Oe){ue=Oe}ue&&!(ue instanceof Error)&&(Ws(he),H("%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).",ae||"React class",V,_e,typeof ue),Ws(null)),ue instanceof Error&&!(ue.message in At)&&(At[ue.message]=!0,Ws(he),H("Failed %s type: %s",V,ue.message),Ws(null))}}}var gt=Array.isArray;function Qt(x){return gt(x)}function Vs(x){{var K=typeof Symbol=="function"&&Symbol.toStringTag,V=K&&x[Symbol.toStringTag]||x.constructor.name||"Object";return V}}function Xn(x){try{return ds(x),!1}catch{return!0}}function ds(x){return""+x}function Da(x){if(Xn(x))return H("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Vs(x)),ds(x)}var Mt=W.ReactCurrentOwner,us={key:!0,ref:!0,__self:!0,__source:!0},Gs,Xs,qs;qs={};function Cr(x){if(Hs.call(x,"ref")){var K=Object.getOwnPropertyDescriptor(x,"ref").get;if(K&&K.isReactWarning)return!1}return x.ref!==void 0}function Sr(x){if(Hs.call(x,"key")){var K=Object.getOwnPropertyDescriptor(x,"key").get;if(K&&K.isReactWarning)return!1}return x.key!==void 0}function zr(x,K){if(typeof x.ref=="string"&&Mt.current&&K&&Mt.current.stateNode!==K){var V=He(Mt.current.type);qs[V]||(H('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',He(Mt.current.type),x.ref),qs[V]=!0)}}function Nr(x,K){{var V=function(){Gs||(Gs=!0,H("%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)",K))};V.isReactWarning=!0,Object.defineProperty(x,"key",{get:V,configurable:!0})}}function Er(x,K){{var V=function(){Xs||(Xs=!0,H("%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)",K))};V.isReactWarning=!0,Object.defineProperty(x,"ref",{get:V,configurable:!0})}}var Lr=function(x,K,V,ae,he,De,_e){var ue={$$typeof:s,type:x,key:K,ref:V,props:_e,_owner:De};return ue._store={},Object.defineProperty(ue._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ue,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ae}),Object.defineProperty(ue,"_source",{configurable:!1,enumerable:!1,writable:!1,value:he}),Object.freeze&&(Object.freeze(ue.props),Object.freeze(ue)),ue};function Yn(x,K,V,ae,he){{var De,_e={},ue=null,Qe=null;V!==void 0&&(Da(V),ue=""+V),Sr(K)&&(Da(K.key),ue=""+K.key),Cr(K)&&(Qe=K.ref,zr(K,he));for(De in K)Hs.call(K,De)&&!us.hasOwnProperty(De)&&(_e[De]=K[De]);if(x&&x.defaultProps){var Oe=x.defaultProps;for(De in Oe)_e[De]===void 0&&(_e[De]=Oe[De])}if(ue||Qe){var Fe=typeof x=="function"?x.displayName||x.name||"Unknown":x;ue&&Nr(_e,Fe),Qe&&Er(_e,Fe)}return Lr(x,ue,Qe,he,ae,Mt.current,_e)}}var Or=W.ReactCurrentOwner,ka=W.ReactDebugCurrentFrame;function Zt(x){if(x){var K=x._owner,V=Wt(x.type,x._source,K?K.type:null);ka.setExtraStackFrame(V)}else ka.setExtraStackFrame(null)}var Ys;Ys=!1;function Pr(x){return typeof x=="object"&&x!==null&&x.$$typeof===s}function Ia(){{if(Or.current){var x=He(Or.current.type);if(x)return`
24
24
 
25
- Check the render method of \``+x+"`."}return""}}function Yn(x){{if(x!==void 0){var K=x.fileName.replace(/^.*[\\\/]/,""),V=x.lineNumber;return`
25
+ Check the render method of \``+x+"`."}return""}}function Qn(x){{if(x!==void 0){var K=x.fileName.replace(/^.*[\\\/]/,""),V=x.lineNumber;return`
26
26
 
27
- Check your code at `+K+":"+V+"."}return""}}var Ia={};function Aa(x){{var K=ka();if(!K){var V=typeof x=="string"?x:x.displayName||x.name;V&&(K=`
27
+ Check your code at `+K+":"+V+"."}return""}}var Aa={};function qa(x){{var K=Ia();if(!K){var V=typeof x=="string"?x:x.displayName||x.name;V&&(K=`
28
28
 
29
- Check the top-level render call using <`+V+">.")}return K}}function qa(x,K){{if(!x._store||x._store.validated||x.key!=null)return;x._store.validated=!0;var V=Aa(K);if(Ia[V])return;Ia[V]=!0;var ae="";x&&x._owner&&x._owner!==Lr.current&&(ae=" It was passed a child from "+He(x._owner.type)+"."),Qt(x),H('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',V,ae),Qt(null)}}function Ca(x,K){{if(typeof x!="object")return;if(Yt(x))for(var V=0;V<x.length;V++){var ae=x[V];Or(ae)&&qa(ae,K)}else if(Or(x))x._store&&(x._store.validated=!0);else if(x){var he=B(x);if(typeof he=="function"&&he!==x.entries)for(var De=he.call(x),_e;!(_e=De.next()).done;)Or(_e.value)&&qa(_e.value,K)}}}function Qn(x){{var K=x.type;if(K==null||typeof K=="string")return;var V;if(typeof K=="function")V=K.propTypes;else if(typeof K=="object"&&(K.$$typeof===m||K.$$typeof===h))V=K.propTypes;else return;if(V){var ae=He(K);Is(V,x.props,"prop",ae,x)}else if(K.PropTypes!==void 0&&!Xs){Xs=!0;var he=He(K);H("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",he||"Unknown")}typeof K.getDefaultProps=="function"&&!K.getDefaultProps.isReactClassApproved&&H("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Pr(x){{for(var K=Object.keys(x.props),V=0;V<K.length;V++){var ae=K[V];if(ae!=="children"&&ae!=="key"){Qt(x),H("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ae),Qt(null);break}}x.ref!==null&&(Qt(x),H("Invalid attribute `ref` supplied to `React.Fragment`."),Qt(null))}}function Sa(x,K,V,ae,he,De){{var _e=X(x);if(!_e){var ue="";(x===void 0||typeof x=="object"&&x!==null&&Object.keys(x).length===0)&&(ue+=" 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 Qe=Yn(he);Qe?ue+=Qe:ue+=ka();var Oe;x===null?Oe="null":Yt(x)?Oe="array":x!==void 0&&x.$$typeof===s?(Oe="<"+(He(x.type)||"Unknown")+" />",ue=" Did you accidentally export a JSX literal instead of a component?"):Oe=typeof x,H("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Oe,ue)}var Fe=Xn(x,K,V,he,De);if(Fe==null)return Fe;if(_e){var lt=K.children;if(lt!==void 0)if(ae)if(Yt(lt)){for(var Mt=0;Mt<lt.length;Mt++)Ca(lt[Mt],x);Object.freeze&&Object.freeze(lt)}else H("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 Ca(lt,x)}return x===n?Pr(Fe):Qn(Fe),Fe}}function Mr(x,K,V){return Sa(x,K,V,!0)}function Zn(x,K,V){return Sa(x,K,V,!1)}var Jn=Zn,ei=Mr;ur.Fragment=n,ur.jsx=Jn,ur.jsxs=ei}()),ur}process.env.NODE_ENV==="production"?xn.exports=sd():xn.exports=rd();var U=xn.exports;function ad(a,s,r){return s in a?Object.defineProperty(a,s,{value:r,enumerable:!0,configurable:!0,writable:!0}):a[s]=r,a}function fo(a,s){var r=Object.keys(a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);s&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(a,o).enumerable})),r.push.apply(r,n)}return r}function go(a){for(var s=1;s<arguments.length;s++){var r=arguments[s]!=null?arguments[s]:{};s%2?fo(Object(r),!0).forEach(function(n){ad(a,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(r)):fo(Object(r)).forEach(function(n){Object.defineProperty(a,n,Object.getOwnPropertyDescriptor(r,n))})}return a}function nd(a,s){if(a==null)return{};var r={},n=Object.keys(a),o,l;for(l=0;l<n.length;l++)o=n[l],!(s.indexOf(o)>=0)&&(r[o]=a[o]);return r}function id(a,s){if(a==null)return{};var r=nd(a,s),n,o;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);for(o=0;o<l.length;o++)n=l[o],!(s.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(a,n)&&(r[n]=a[n])}return r}function od(a,s){return ld(a)||cd(a,s)||pd(a,s)||dd()}function ld(a){if(Array.isArray(a))return a}function cd(a,s){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(a)))){var r=[],n=!0,o=!1,l=void 0;try{for(var p=a[Symbol.iterator](),u;!(n=(u=p.next()).done)&&(r.push(u.value),!(s&&r.length===s));n=!0);}catch(m){o=!0,l=m}finally{try{!n&&p.return!=null&&p.return()}finally{if(o)throw l}}return r}}function pd(a,s){if(a){if(typeof a=="string")return bo(a,s);var r=Object.prototype.toString.call(a).slice(8,-1);if(r==="Object"&&a.constructor&&(r=a.constructor.name),r==="Map"||r==="Set")return Array.from(a);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bo(a,s)}}function bo(a,s){(s==null||s>a.length)&&(s=a.length);for(var r=0,n=new Array(s);r<s;r++)n[r]=a[r];return n}function dd(){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 ud(a,s,r){return s in a?Object.defineProperty(a,s,{value:r,enumerable:!0,configurable:!0,writable:!0}):a[s]=r,a}function xo(a,s){var r=Object.keys(a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);s&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(a,o).enumerable})),r.push.apply(r,n)}return r}function ho(a){for(var s=1;s<arguments.length;s++){var r=arguments[s]!=null?arguments[s]:{};s%2?xo(Object(r),!0).forEach(function(n){ud(a,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(r)):xo(Object(r)).forEach(function(n){Object.defineProperty(a,n,Object.getOwnPropertyDescriptor(r,n))})}return a}function md(){for(var a=arguments.length,s=new Array(a),r=0;r<a;r++)s[r]=arguments[r];return function(n){return s.reduceRight(function(o,l){return l(o)},n)}}function mr(a){return function s(){for(var r=this,n=arguments.length,o=new Array(n),l=0;l<n;l++)o[l]=arguments[l];return o.length>=a.length?a.apply(this,o):function(){for(var p=arguments.length,u=new Array(p),m=0;m<p;m++)u[m]=arguments[m];return s.apply(r,[].concat(o,u))}}}function ea(a){return{}.toString.call(a).includes("Object")}function yd(a){return!Object.keys(a).length}function yr(a){return typeof a=="function"}function _d(a,s){return Object.prototype.hasOwnProperty.call(a,s)}function fd(a,s){return ea(s)||os("changeType"),Object.keys(s).some(function(r){return!_d(a,r)})&&os("changeField"),s}function gd(a){yr(a)||os("selectorType")}function bd(a){yr(a)||ea(a)||os("handlerType"),ea(a)&&Object.values(a).some(function(s){return!yr(s)})&&os("handlersType")}function xd(a){a||os("initialIsRequired"),ea(a)||os("initialType"),yd(a)&&os("initialContent")}function hd(a,s){throw new Error(a[s]||a.default)}var wd={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"},os=mr(hd)(wd),ta={changes:fd,selector:gd,handler:bd,initial:xd};function vd(a){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ta.initial(a),ta.handler(s);var r={current:a},n=mr(kd)(r,s),o=mr(Dd)(r),l=mr(ta.changes)(a),p=mr(Td)(r);function u(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(g){return g};return ta.selector(_),_(r.current)}function m(_){md(n,o,l,p)(_)}return[u,m]}function Td(a,s){return yr(s)?s(a.current):s}function Dd(a,s){return a.current=ho(ho({},a.current),s),s}function kd(a,s,r){return yr(s)?s(a.current):Object.keys(r).forEach(function(n){var o;return(o=s[n])===null||o===void 0?void 0:o.call(s,a.current[n])}),r}var Id={create:vd},Ad={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}};function qd(a){return function s(){for(var r=this,n=arguments.length,o=new Array(n),l=0;l<n;l++)o[l]=arguments[l];return o.length>=a.length?a.apply(this,o):function(){for(var p=arguments.length,u=new Array(p),m=0;m<p;m++)u[m]=arguments[m];return s.apply(r,[].concat(o,u))}}}function Cd(a){return{}.toString.call(a).includes("Object")}function Sd(a){return a||vo("configIsRequired"),Cd(a)||vo("configType"),a.urls?(zd(),{paths:{vs:a.urls.monacoBase}}):a}function zd(){console.warn(wo.deprecation)}function Nd(a,s){throw new Error(a[s]||a.default)}var wo={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 <`+V+">.")}return K}}function Ca(x,K){{if(!x._store||x._store.validated||x.key!=null)return;x._store.validated=!0;var V=qa(K);if(Aa[V])return;Aa[V]=!0;var ae="";x&&x._owner&&x._owner!==Or.current&&(ae=" It was passed a child from "+He(x._owner.type)+"."),Zt(x),H('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',V,ae),Zt(null)}}function Sa(x,K){{if(typeof x!="object")return;if(Qt(x))for(var V=0;V<x.length;V++){var ae=x[V];Pr(ae)&&Ca(ae,K)}else if(Pr(x))x._store&&(x._store.validated=!0);else if(x){var he=B(x);if(typeof he=="function"&&he!==x.entries)for(var De=he.call(x),_e;!(_e=De.next()).done;)Pr(_e.value)&&Ca(_e.value,K)}}}function Zn(x){{var K=x.type;if(K==null||typeof K=="string")return;var V;if(typeof K=="function")V=K.propTypes;else if(typeof K=="object"&&(K.$$typeof===m||K.$$typeof===h))V=K.propTypes;else return;if(V){var ae=He(K);As(V,x.props,"prop",ae,x)}else if(K.PropTypes!==void 0&&!Ys){Ys=!0;var he=He(K);H("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",he||"Unknown")}typeof K.getDefaultProps=="function"&&!K.getDefaultProps.isReactClassApproved&&H("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Mr(x){{for(var K=Object.keys(x.props),V=0;V<K.length;V++){var ae=K[V];if(ae!=="children"&&ae!=="key"){Zt(x),H("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ae),Zt(null);break}}x.ref!==null&&(Zt(x),H("Invalid attribute `ref` supplied to `React.Fragment`."),Zt(null))}}function za(x,K,V,ae,he,De){{var _e=X(x);if(!_e){var ue="";(x===void 0||typeof x=="object"&&x!==null&&Object.keys(x).length===0)&&(ue+=" 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 Qe=Qn(he);Qe?ue+=Qe:ue+=Ia();var Oe;x===null?Oe="null":Qt(x)?Oe="array":x!==void 0&&x.$$typeof===s?(Oe="<"+(He(x.type)||"Unknown")+" />",ue=" Did you accidentally export a JSX literal instead of a component?"):Oe=typeof x,H("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Oe,ue)}var Fe=Yn(x,K,V,he,De);if(Fe==null)return Fe;if(_e){var lt=K.children;if(lt!==void 0)if(ae)if(Qt(lt)){for(var Rt=0;Rt<lt.length;Rt++)Sa(lt[Rt],x);Object.freeze&&Object.freeze(lt)}else H("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 Sa(lt,x)}return x===n?Mr(Fe):Zn(Fe),Fe}}function Rr(x,K,V){return za(x,K,V,!0)}function Jn(x,K,V){return za(x,K,V,!1)}var ei=Jn,ti=Rr;mr.Fragment=n,mr.jsx=ei,mr.jsxs=ti}()),mr}process.env.NODE_ENV==="production"?hn.exports=sd():hn.exports=rd();var U=hn.exports;function ad(a,s,r){return s in a?Object.defineProperty(a,s,{value:r,enumerable:!0,configurable:!0,writable:!0}):a[s]=r,a}function go(a,s){var r=Object.keys(a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);s&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(a,o).enumerable})),r.push.apply(r,n)}return r}function bo(a){for(var s=1;s<arguments.length;s++){var r=arguments[s]!=null?arguments[s]:{};s%2?go(Object(r),!0).forEach(function(n){ad(a,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(r)):go(Object(r)).forEach(function(n){Object.defineProperty(a,n,Object.getOwnPropertyDescriptor(r,n))})}return a}function nd(a,s){if(a==null)return{};var r={},n=Object.keys(a),o,l;for(l=0;l<n.length;l++)o=n[l],!(s.indexOf(o)>=0)&&(r[o]=a[o]);return r}function id(a,s){if(a==null)return{};var r=nd(a,s),n,o;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);for(o=0;o<l.length;o++)n=l[o],!(s.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(a,n)&&(r[n]=a[n])}return r}function od(a,s){return ld(a)||cd(a,s)||pd(a,s)||dd()}function ld(a){if(Array.isArray(a))return a}function cd(a,s){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(a)))){var r=[],n=!0,o=!1,l=void 0;try{for(var p=a[Symbol.iterator](),u;!(n=(u=p.next()).done)&&(r.push(u.value),!(s&&r.length===s));n=!0);}catch(m){o=!0,l=m}finally{try{!n&&p.return!=null&&p.return()}finally{if(o)throw l}}return r}}function pd(a,s){if(a){if(typeof a=="string")return xo(a,s);var r=Object.prototype.toString.call(a).slice(8,-1);if(r==="Object"&&a.constructor&&(r=a.constructor.name),r==="Map"||r==="Set")return Array.from(a);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return xo(a,s)}}function xo(a,s){(s==null||s>a.length)&&(s=a.length);for(var r=0,n=new Array(s);r<s;r++)n[r]=a[r];return n}function dd(){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 ud(a,s,r){return s in a?Object.defineProperty(a,s,{value:r,enumerable:!0,configurable:!0,writable:!0}):a[s]=r,a}function ho(a,s){var r=Object.keys(a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);s&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(a,o).enumerable})),r.push.apply(r,n)}return r}function wo(a){for(var s=1;s<arguments.length;s++){var r=arguments[s]!=null?arguments[s]:{};s%2?ho(Object(r),!0).forEach(function(n){ud(a,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(r)):ho(Object(r)).forEach(function(n){Object.defineProperty(a,n,Object.getOwnPropertyDescriptor(r,n))})}return a}function md(){for(var a=arguments.length,s=new Array(a),r=0;r<a;r++)s[r]=arguments[r];return function(n){return s.reduceRight(function(o,l){return l(o)},n)}}function yr(a){return function s(){for(var r=this,n=arguments.length,o=new Array(n),l=0;l<n;l++)o[l]=arguments[l];return o.length>=a.length?a.apply(this,o):function(){for(var p=arguments.length,u=new Array(p),m=0;m<p;m++)u[m]=arguments[m];return s.apply(r,[].concat(o,u))}}}function ta(a){return{}.toString.call(a).includes("Object")}function yd(a){return!Object.keys(a).length}function _r(a){return typeof a=="function"}function _d(a,s){return Object.prototype.hasOwnProperty.call(a,s)}function fd(a,s){return ta(s)||ls("changeType"),Object.keys(s).some(function(r){return!_d(a,r)})&&ls("changeField"),s}function gd(a){_r(a)||ls("selectorType")}function bd(a){_r(a)||ta(a)||ls("handlerType"),ta(a)&&Object.values(a).some(function(s){return!_r(s)})&&ls("handlersType")}function xd(a){a||ls("initialIsRequired"),ta(a)||ls("initialType"),yd(a)&&ls("initialContent")}function hd(a,s){throw new Error(a[s]||a.default)}var wd={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"},ls=yr(hd)(wd),sa={changes:fd,selector:gd,handler:bd,initial:xd};function vd(a){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};sa.initial(a),sa.handler(s);var r={current:a},n=yr(kd)(r,s),o=yr(Dd)(r),l=yr(sa.changes)(a),p=yr(Td)(r);function u(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(g){return g};return sa.selector(_),_(r.current)}function m(_){md(n,o,l,p)(_)}return[u,m]}function Td(a,s){return _r(s)?s(a.current):s}function Dd(a,s){return a.current=wo(wo({},a.current),s),s}function kd(a,s,r){return _r(s)?s(a.current):Object.keys(r).forEach(function(n){var o;return(o=s[n])===null||o===void 0?void 0:o.call(s,a.current[n])}),r}var Id={create:vd},Ad={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}};function qd(a){return function s(){for(var r=this,n=arguments.length,o=new Array(n),l=0;l<n;l++)o[l]=arguments[l];return o.length>=a.length?a.apply(this,o):function(){for(var p=arguments.length,u=new Array(p),m=0;m<p;m++)u[m]=arguments[m];return s.apply(r,[].concat(o,u))}}}function Cd(a){return{}.toString.call(a).includes("Object")}function Sd(a){return a||To("configIsRequired"),Cd(a)||To("configType"),a.urls?(zd(),{paths:{vs:a.urls.monacoBase}}):a}function zd(){console.warn(vo.deprecation)}function Nd(a,s){throw new Error(a[s]||a.default)}var vo={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
- `},vo=qd(Nd)(wo),Ed={config:Sd},Ld=function(){for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return function(o){return r.reduceRight(function(l,p){return p(l)},o)}};function To(a,s){return Object.keys(s).forEach(function(r){s[r]instanceof Object&&a[r]&&Object.assign(s[r],To(a[r],s[r]))}),go(go({},a),s)}var Od={type:"cancelation",msg:"operation is manually canceled"};function hn(a){var s=!1,r=new Promise(function(n,o){a.then(function(l){return s?o(Od):n(l)}),a.catch(o)});return r.cancel=function(){return s=!0},r}var Pd=Id.create({config:Ad,isInitialized:!1,resolve:null,reject:null,monaco:null}),Do=od(Pd,2),_r=Do[0],sa=Do[1];function Md(a){var s=Ed.config(a),r=s.monaco,n=id(s,["monaco"]);sa(function(o){return{config:To(o.config,n),monaco:r}})}function Rd(){var a=_r(function(s){var r=s.monaco,n=s.isInitialized,o=s.resolve;return{monaco:r,isInitialized:n,resolve:o}});if(!a.isInitialized){if(sa({isInitialized:!0}),a.monaco)return a.resolve(a.monaco),hn(wn);if(window.monaco&&window.monaco.editor)return ko(window.monaco),a.resolve(window.monaco),hn(wn);Ld(Fd,Ud)(Kd)}return hn(wn)}function Fd(a){return document.body.appendChild(a)}function Bd(a){var s=document.createElement("script");return a&&(s.src=a),s}function Ud(a){var s=_r(function(n){var o=n.config,l=n.reject;return{config:o,reject:l}}),r=Bd("".concat(s.config.paths.vs,"/loader.js"));return r.onload=function(){return a()},r.onerror=s.reject,r}function Kd(){var a=_r(function(r){var n=r.config,o=r.resolve,l=r.reject;return{config:n,resolve:o,reject:l}}),s=window.require;s.config(a.config),s(["vs/editor/editor.main"],function(r){ko(r),a.resolve(r)},function(r){a.reject(r)})}function ko(a){_r().monaco||sa({monaco:a})}function $d(){return _r(function(a){var s=a.monaco;return s})}var wn=new Promise(function(a,s){return sa({resolve:a,reject:s})}),vn={config:Md,init:Rd,__getMonacoInstance:$d},jd={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},Tn=jd,Hd={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},Wd=Hd;function Vd({children:a}){return F.createElement("div",{style:Wd.container},a)}var Gd=Vd,Xd=Gd;function Yd({width:a,height:s,isEditorReady:r,loading:n,_ref:o,className:l,wrapperProps:p}){return F.createElement("section",{style:{...Tn.wrapper,width:a,height:s},...p},!r&&F.createElement(Xd,null,n),F.createElement("div",{ref:o,style:{...Tn.fullWidth,...!r&&Tn.hide},className:l}))}var Qd=Yd,Io=F.memo(Qd);function Zd(a){F.useEffect(a,[])}var Ao=Zd;function Jd(a,s,r=!0){let n=F.useRef(!0);F.useEffect(n.current||!r?()=>{n.current=!1}:a,s)}var yt=Jd;function fr(){}function Ms(a,s,r,n){return eu(a,n)||tu(a,s,r,n)}function eu(a,s){return a.editor.getModel(qo(a,s))}function tu(a,s,r,n){return a.editor.createModel(s,r,n?qo(a,n):void 0)}function qo(a,s){return a.Uri.parse(s)}function su({original:a,modified:s,language:r,originalLanguage:n,modifiedLanguage:o,originalModelPath:l,modifiedModelPath:p,keepCurrentOriginalModel:u=!1,keepCurrentModifiedModel:m=!1,theme:_="light",loading:g="Loading...",options:h={},height:w="100%",width:k="100%",className:S,wrapperProps:C={},beforeMount:B=fr,onMount:W=fr}){let[H,ee]=F.useState(!1),[N,M]=F.useState(!0),E=F.useRef(null),$=F.useRef(null),P=F.useRef(null),j=F.useRef(W),X=F.useRef(B),xe=F.useRef(!1);Ao(()=>{let Z=vn.init();return Z.then(ye=>($.current=ye)&&M(!1)).catch(ye=>(ye==null?void 0:ye.type)!=="cancelation"&&console.error("Monaco initialization: error:",ye)),()=>E.current?Ee():Z.cancel()}),yt(()=>{if(E.current&&$.current){let Z=E.current.getOriginalEditor(),ye=Ms($.current,a||"",n||r||"text",l||"");ye!==Z.getModel()&&Z.setModel(ye)}},[l],H),yt(()=>{if(E.current&&$.current){let Z=E.current.getModifiedEditor(),ye=Ms($.current,s||"",o||r||"text",p||"");ye!==Z.getModel()&&Z.setModel(ye)}},[p],H),yt(()=>{let Z=E.current.getModifiedEditor();Z.getOption($.current.editor.EditorOption.readOnly)?Z.setValue(s||""):s!==Z.getValue()&&(Z.executeEdits("",[{range:Z.getModel().getFullModelRange(),text:s||"",forceMoveMarkers:!0}]),Z.pushUndoStop())},[s],H),yt(()=>{var Z,ye;(ye=(Z=E.current)==null?void 0:Z.getModel())==null||ye.original.setValue(a||"")},[a],H),yt(()=>{let{original:Z,modified:ye}=E.current.getModel();$.current.editor.setModelLanguage(Z,n||r||"text"),$.current.editor.setModelLanguage(ye,o||r||"text")},[r,n,o],H),yt(()=>{var Z;(Z=$.current)==null||Z.editor.setTheme(_)},[_],H),yt(()=>{var Z;(Z=E.current)==null||Z.updateOptions(h)},[h],H);let rt=F.useCallback(()=>{var ze;if(!$.current)return;X.current($.current);let Z=Ms($.current,a||"",n||r||"text",l||""),ye=Ms($.current,s||"",o||r||"text",p||"");(ze=E.current)==null||ze.setModel({original:Z,modified:ye})},[r,s,o,a,n,l,p]),He=F.useCallback(()=>{var Z;!xe.current&&P.current&&(E.current=$.current.editor.createDiffEditor(P.current,{automaticLayout:!0,...h}),rt(),(Z=$.current)==null||Z.editor.setTheme(_),ee(!0),xe.current=!0)},[h,_,rt]);F.useEffect(()=>{H&&j.current(E.current,$.current)},[H]),F.useEffect(()=>{!N&&!H&&He()},[N,H,He]);function Ee(){var ye,ze,ge,Ue;let Z=(ye=E.current)==null?void 0:ye.getModel();u||((ze=Z==null?void 0:Z.original)==null||ze.dispose()),m||((ge=Z==null?void 0:Z.modified)==null||ge.dispose()),(Ue=E.current)==null||Ue.dispose()}return F.createElement(Io,{width:k,height:w,isEditorReady:H,loading:g,_ref:P,className:S,wrapperProps:C})}var ru=su,au=F.memo(ru);function nu(a){let s=F.useRef();return F.useEffect(()=>{s.current=a},[a]),s.current}var iu=nu,ra=new Map;function ou({defaultValue:a,defaultLanguage:s,defaultPath:r,value:n,language:o,path:l,theme:p="light",line:u,loading:m="Loading...",options:_={},overrideServices:g={},saveViewState:h=!0,keepCurrentModel:w=!1,width:k="100%",height:S="100%",className:C,wrapperProps:B={},beforeMount:W=fr,onMount:H=fr,onChange:ee,onValidate:N=fr}){let[M,E]=F.useState(!1),[$,P]=F.useState(!0),j=F.useRef(null),X=F.useRef(null),xe=F.useRef(null),rt=F.useRef(H),He=F.useRef(W),Ee=F.useRef(),Z=F.useRef(n),ye=iu(l),ze=F.useRef(!1),ge=F.useRef(!1);Ao(()=>{let re=vn.init();return re.then(ve=>(j.current=ve)&&P(!1)).catch(ve=>(ve==null?void 0:ve.type)!=="cancelation"&&console.error("Monaco initialization: error:",ve)),()=>X.current?Ge():re.cancel()}),yt(()=>{var ve,Ke,kt,Xe;let re=Ms(j.current,a||n||"",s||o||"",l||r||"");re!==((ve=X.current)==null?void 0:ve.getModel())&&(h&&ra.set(ye,(Ke=X.current)==null?void 0:Ke.saveViewState()),(kt=X.current)==null||kt.setModel(re),h&&((Xe=X.current)==null||Xe.restoreViewState(ra.get(l))))},[l],M),yt(()=>{var re;(re=X.current)==null||re.updateOptions(_)},[_],M),yt(()=>{!X.current||n===void 0||(X.current.getOption(j.current.editor.EditorOption.readOnly)?X.current.setValue(n):n!==X.current.getValue()&&(ge.current=!0,X.current.executeEdits("",[{range:X.current.getModel().getFullModelRange(),text:n,forceMoveMarkers:!0}]),X.current.pushUndoStop(),ge.current=!1))},[n],M),yt(()=>{var ve,Ke;let re=(ve=X.current)==null?void 0:ve.getModel();re&&o&&((Ke=j.current)==null||Ke.editor.setModelLanguage(re,o))},[o],M),yt(()=>{var re;u!==void 0&&((re=X.current)==null||re.revealLine(u))},[u],M),yt(()=>{var re;(re=j.current)==null||re.editor.setTheme(p)},[p],M);let Ue=F.useCallback(()=>{var re;if(!(!xe.current||!j.current)&&!ze.current){He.current(j.current);let ve=l||r,Ke=Ms(j.current,n||a||"",s||o||"",ve||"");X.current=(re=j.current)==null?void 0:re.editor.create(xe.current,{model:Ke,automaticLayout:!0,..._},g),h&&X.current.restoreViewState(ra.get(ve)),j.current.editor.setTheme(p),u!==void 0&&X.current.revealLine(u),E(!0),ze.current=!0}},[a,s,r,n,o,l,_,g,h,p,u]);F.useEffect(()=>{M&&rt.current(X.current,j.current)},[M]),F.useEffect(()=>{!$&&!M&&Ue()},[$,M,Ue]),Z.current=n,F.useEffect(()=>{var re,ve;M&&ee&&((re=Ee.current)==null||re.dispose(),Ee.current=(ve=X.current)==null?void 0:ve.onDidChangeModelContent(Ke=>{ge.current||ee(X.current.getValue(),Ke)}))},[M,ee]),F.useEffect(()=>{if(M){let re=j.current.editor.onDidChangeMarkers(ve=>{var kt;let Ke=(kt=X.current.getModel())==null?void 0:kt.uri;if(Ke&&ve.find(Xe=>Xe.path===Ke.path)){let Xe=j.current.editor.getModelMarkers({resource:Ke});N==null||N(Xe)}});return()=>{re==null||re.dispose()}}return()=>{}},[M,N]);function Ge(){var re,ve;(re=Ee.current)==null||re.dispose(),w?h&&ra.set(l,X.current.saveViewState()):(ve=X.current.getModel())==null||ve.dispose(),X.current.dispose()}return F.createElement(Io,{width:k,height:S,isEditorReady:M,loading:m,_ref:xe,className:C,wrapperProps:B})}var lu=ou,cu=F.memo(lu);const Co={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
+ `},To=qd(Nd)(vo),Ed={config:Sd},Ld=function(){for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return function(o){return r.reduceRight(function(l,p){return p(l)},o)}};function Do(a,s){return Object.keys(s).forEach(function(r){s[r]instanceof Object&&a[r]&&Object.assign(s[r],Do(a[r],s[r]))}),bo(bo({},a),s)}var Od={type:"cancelation",msg:"operation is manually canceled"};function wn(a){var s=!1,r=new Promise(function(n,o){a.then(function(l){return s?o(Od):n(l)}),a.catch(o)});return r.cancel=function(){return s=!0},r}var Pd=Id.create({config:Ad,isInitialized:!1,resolve:null,reject:null,monaco:null}),ko=od(Pd,2),fr=ko[0],ra=ko[1];function Md(a){var s=Ed.config(a),r=s.monaco,n=id(s,["monaco"]);ra(function(o){return{config:Do(o.config,n),monaco:r}})}function Rd(){var a=fr(function(s){var r=s.monaco,n=s.isInitialized,o=s.resolve;return{monaco:r,isInitialized:n,resolve:o}});if(!a.isInitialized){if(ra({isInitialized:!0}),a.monaco)return a.resolve(a.monaco),wn(vn);if(window.monaco&&window.monaco.editor)return Io(window.monaco),a.resolve(window.monaco),wn(vn);Ld(Fd,Ud)(Kd)}return wn(vn)}function Fd(a){return document.body.appendChild(a)}function Bd(a){var s=document.createElement("script");return a&&(s.src=a),s}function Ud(a){var s=fr(function(n){var o=n.config,l=n.reject;return{config:o,reject:l}}),r=Bd("".concat(s.config.paths.vs,"/loader.js"));return r.onload=function(){return a()},r.onerror=s.reject,r}function Kd(){var a=fr(function(r){var n=r.config,o=r.resolve,l=r.reject;return{config:n,resolve:o,reject:l}}),s=window.require;s.config(a.config),s(["vs/editor/editor.main"],function(r){Io(r),a.resolve(r)},function(r){a.reject(r)})}function Io(a){fr().monaco||ra({monaco:a})}function $d(){return fr(function(a){var s=a.monaco;return s})}var vn=new Promise(function(a,s){return ra({resolve:a,reject:s})}),Tn={config:Md,init:Rd,__getMonacoInstance:$d},jd={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},Dn=jd,Hd={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},Wd=Hd;function Vd({children:a}){return F.createElement("div",{style:Wd.container},a)}var Gd=Vd,Xd=Gd;function Yd({width:a,height:s,isEditorReady:r,loading:n,_ref:o,className:l,wrapperProps:p}){return F.createElement("section",{style:{...Dn.wrapper,width:a,height:s},...p},!r&&F.createElement(Xd,null,n),F.createElement("div",{ref:o,style:{...Dn.fullWidth,...!r&&Dn.hide},className:l}))}var Qd=Yd,Ao=F.memo(Qd);function Zd(a){F.useEffect(a,[])}var qo=Zd;function Jd(a,s,r=!0){let n=F.useRef(!0);F.useEffect(n.current||!r?()=>{n.current=!1}:a,s)}var yt=Jd;function gr(){}function Rs(a,s,r,n){return eu(a,n)||tu(a,s,r,n)}function eu(a,s){return a.editor.getModel(Co(a,s))}function tu(a,s,r,n){return a.editor.createModel(s,r,n?Co(a,n):void 0)}function Co(a,s){return a.Uri.parse(s)}function su({original:a,modified:s,language:r,originalLanguage:n,modifiedLanguage:o,originalModelPath:l,modifiedModelPath:p,keepCurrentOriginalModel:u=!1,keepCurrentModifiedModel:m=!1,theme:_="light",loading:g="Loading...",options:h={},height:w="100%",width:k="100%",className:S,wrapperProps:C={},beforeMount:B=gr,onMount:W=gr}){let[H,ee]=F.useState(!1),[N,M]=F.useState(!0),E=F.useRef(null),$=F.useRef(null),P=F.useRef(null),j=F.useRef(W),X=F.useRef(B),xe=F.useRef(!1);qo(()=>{let Z=Tn.init();return Z.then(ye=>($.current=ye)&&M(!1)).catch(ye=>(ye==null?void 0:ye.type)!=="cancelation"&&console.error("Monaco initialization: error:",ye)),()=>E.current?Ee():Z.cancel()}),yt(()=>{if(E.current&&$.current){let Z=E.current.getOriginalEditor(),ye=Rs($.current,a||"",n||r||"text",l||"");ye!==Z.getModel()&&Z.setModel(ye)}},[l],H),yt(()=>{if(E.current&&$.current){let Z=E.current.getModifiedEditor(),ye=Rs($.current,s||"",o||r||"text",p||"");ye!==Z.getModel()&&Z.setModel(ye)}},[p],H),yt(()=>{let Z=E.current.getModifiedEditor();Z.getOption($.current.editor.EditorOption.readOnly)?Z.setValue(s||""):s!==Z.getValue()&&(Z.executeEdits("",[{range:Z.getModel().getFullModelRange(),text:s||"",forceMoveMarkers:!0}]),Z.pushUndoStop())},[s],H),yt(()=>{var Z,ye;(ye=(Z=E.current)==null?void 0:Z.getModel())==null||ye.original.setValue(a||"")},[a],H),yt(()=>{let{original:Z,modified:ye}=E.current.getModel();$.current.editor.setModelLanguage(Z,n||r||"text"),$.current.editor.setModelLanguage(ye,o||r||"text")},[r,n,o],H),yt(()=>{var Z;(Z=$.current)==null||Z.editor.setTheme(_)},[_],H),yt(()=>{var Z;(Z=E.current)==null||Z.updateOptions(h)},[h],H);let rt=F.useCallback(()=>{var ze;if(!$.current)return;X.current($.current);let Z=Rs($.current,a||"",n||r||"text",l||""),ye=Rs($.current,s||"",o||r||"text",p||"");(ze=E.current)==null||ze.setModel({original:Z,modified:ye})},[r,s,o,a,n,l,p]),He=F.useCallback(()=>{var Z;!xe.current&&P.current&&(E.current=$.current.editor.createDiffEditor(P.current,{automaticLayout:!0,...h}),rt(),(Z=$.current)==null||Z.editor.setTheme(_),ee(!0),xe.current=!0)},[h,_,rt]);F.useEffect(()=>{H&&j.current(E.current,$.current)},[H]),F.useEffect(()=>{!N&&!H&&He()},[N,H,He]);function Ee(){var ye,ze,ge,Ue;let Z=(ye=E.current)==null?void 0:ye.getModel();u||((ze=Z==null?void 0:Z.original)==null||ze.dispose()),m||((ge=Z==null?void 0:Z.modified)==null||ge.dispose()),(Ue=E.current)==null||Ue.dispose()}return F.createElement(Ao,{width:k,height:w,isEditorReady:H,loading:g,_ref:P,className:S,wrapperProps:C})}var ru=su,au=F.memo(ru);function nu(a){let s=F.useRef();return F.useEffect(()=>{s.current=a},[a]),s.current}var iu=nu,aa=new Map;function ou({defaultValue:a,defaultLanguage:s,defaultPath:r,value:n,language:o,path:l,theme:p="light",line:u,loading:m="Loading...",options:_={},overrideServices:g={},saveViewState:h=!0,keepCurrentModel:w=!1,width:k="100%",height:S="100%",className:C,wrapperProps:B={},beforeMount:W=gr,onMount:H=gr,onChange:ee,onValidate:N=gr}){let[M,E]=F.useState(!1),[$,P]=F.useState(!0),j=F.useRef(null),X=F.useRef(null),xe=F.useRef(null),rt=F.useRef(H),He=F.useRef(W),Ee=F.useRef(),Z=F.useRef(n),ye=iu(l),ze=F.useRef(!1),ge=F.useRef(!1);qo(()=>{let re=Tn.init();return re.then(ve=>(j.current=ve)&&P(!1)).catch(ve=>(ve==null?void 0:ve.type)!=="cancelation"&&console.error("Monaco initialization: error:",ve)),()=>X.current?Ge():re.cancel()}),yt(()=>{var ve,Ke,It,Xe;let re=Rs(j.current,a||n||"",s||o||"",l||r||"");re!==((ve=X.current)==null?void 0:ve.getModel())&&(h&&aa.set(ye,(Ke=X.current)==null?void 0:Ke.saveViewState()),(It=X.current)==null||It.setModel(re),h&&((Xe=X.current)==null||Xe.restoreViewState(aa.get(l))))},[l],M),yt(()=>{var re;(re=X.current)==null||re.updateOptions(_)},[_],M),yt(()=>{!X.current||n===void 0||(X.current.getOption(j.current.editor.EditorOption.readOnly)?X.current.setValue(n):n!==X.current.getValue()&&(ge.current=!0,X.current.executeEdits("",[{range:X.current.getModel().getFullModelRange(),text:n,forceMoveMarkers:!0}]),X.current.pushUndoStop(),ge.current=!1))},[n],M),yt(()=>{var ve,Ke;let re=(ve=X.current)==null?void 0:ve.getModel();re&&o&&((Ke=j.current)==null||Ke.editor.setModelLanguage(re,o))},[o],M),yt(()=>{var re;u!==void 0&&((re=X.current)==null||re.revealLine(u))},[u],M),yt(()=>{var re;(re=j.current)==null||re.editor.setTheme(p)},[p],M);let Ue=F.useCallback(()=>{var re;if(!(!xe.current||!j.current)&&!ze.current){He.current(j.current);let ve=l||r,Ke=Rs(j.current,n||a||"",s||o||"",ve||"");X.current=(re=j.current)==null?void 0:re.editor.create(xe.current,{model:Ke,automaticLayout:!0,..._},g),h&&X.current.restoreViewState(aa.get(ve)),j.current.editor.setTheme(p),u!==void 0&&X.current.revealLine(u),E(!0),ze.current=!0}},[a,s,r,n,o,l,_,g,h,p,u]);F.useEffect(()=>{M&&rt.current(X.current,j.current)},[M]),F.useEffect(()=>{!$&&!M&&Ue()},[$,M,Ue]),Z.current=n,F.useEffect(()=>{var re,ve;M&&ee&&((re=Ee.current)==null||re.dispose(),Ee.current=(ve=X.current)==null?void 0:ve.onDidChangeModelContent(Ke=>{ge.current||ee(X.current.getValue(),Ke)}))},[M,ee]),F.useEffect(()=>{if(M){let re=j.current.editor.onDidChangeMarkers(ve=>{var It;let Ke=(It=X.current.getModel())==null?void 0:It.uri;if(Ke&&ve.find(Xe=>Xe.path===Ke.path)){let Xe=j.current.editor.getModelMarkers({resource:Ke});N==null||N(Xe)}});return()=>{re==null||re.dispose()}}return()=>{}},[M,N]);function Ge(){var re,ve;(re=Ee.current)==null||re.dispose(),w?h&&aa.set(l,X.current.saveViewState()):(ve=X.current.getModel())==null||ve.dispose(),X.current.dispose()}return F.createElement(Ao,{width:k,height:S,isEditorReady:M,loading:m,_ref:xe,className:C,wrapperProps:B})}var lu=ou,cu=F.memo(lu);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,22 +103,22 @@ 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"}],So=["in","as","continue","break","else","to","by"],we={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"},du={clickOnKeywordForMoreHelp:"`click` on keyword for more help"};function uu(){const a={},s={};return Object.keys(Co).reduce((r,n)=>{const o=Co[n],l=we[n],{mapObj:p,keys:u}=mu(o,l);return r.keyMapList[n]=p,r.keyList[n]=u,r},{keyList:a,keyMapList:s}),{keyList:a,keyMapList:s}}function mu(a,s){const r=new Map,n=[];return a.forEach(o=>{var p;o.title=s;const l=o.originalName||o.name;l!=="for...in"&&(r.has(l)?(p=r.get(l))==null||p.push(o):(n.push(l),r.set(l,[o])))}),{mapObj:r,keys:n}}const{keyList:zo,keyMapList:_t}=uu(),gr=[{title:"内置变量",key:"variables",prefix:"var"},{title:"常量",key:"constants",prefix:"const"},{title:"函数",key:"functions",prefix:"fun"},{title:"关键词",key:"keywords",prefix:"kw"},{title:"类型",key:"types",prefix:"type"},{title:"运算符",key:"operators",prefix:"op"},{title:"注释",key:"annotations",prefix:"an"}],ne=a=>typeof a=="string",br=()=>{let a,s;const r=new Promise((n,o)=>{a=n,s=o});return r.resolve=a,r.reject=s,r},No=a=>a==null?"":""+a,yu=(a,s,r)=>{a.forEach(n=>{s[n]&&(r[n]=s[n])})},_u=/###/g,Eo=a=>a&&a.indexOf("###")>-1?a.replace(_u,"."):a,Lo=a=>!a||ne(a),xr=(a,s,r)=>{const n=ne(s)?s.split("."):s;let o=0;for(;o<n.length-1;){if(Lo(a))return{};const l=Eo(n[o]);!a[l]&&r&&(a[l]=new r),Object.prototype.hasOwnProperty.call(a,l)?a=a[l]:a={},++o}return Lo(a)?{}:{obj:a,k:Eo(n[o])}},Oo=(a,s,r)=>{const{obj:n,k:o}=xr(a,s,Object);if(n!==void 0||s.length===1){n[o]=r;return}let l=s[s.length-1],p=s.slice(0,s.length-1),u=xr(a,p,Object);for(;u.obj===void 0&&p.length;)l=`${p[p.length-1]}.${l}`,p=p.slice(0,p.length-1),u=xr(a,p,Object),u&&u.obj&&typeof u.obj[`${u.k}.${l}`]<"u"&&(u.obj=void 0);u.obj[`${u.k}.${l}`]=r},fu=(a,s,r,n)=>{const{obj:o,k:l}=xr(a,s,Object);o[l]=o[l]||[],o[l].push(r)},aa=(a,s)=>{const{obj:r,k:n}=xr(a,s);if(r)return r[n]},gu=(a,s,r)=>{const n=aa(a,r);return n!==void 0?n:aa(s,r)},Po=(a,s,r)=>{for(const n in s)n!=="__proto__"&&n!=="constructor"&&(n in a?ne(a[n])||a[n]instanceof String||ne(s[n])||s[n]instanceof String?r&&(a[n]=s[n]):Po(a[n],s[n],r):a[n]=s[n]);return a},Rs=a=>a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var bu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const xu=a=>ne(a)?a.replace(/[&<>"'\/]/g,s=>bu[s]):a;class hu{constructor(s){this.capacity=s,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(s){const r=this.regExpMap.get(s);if(r!==void 0)return r;const n=new RegExp(s);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(s,n),this.regExpQueue.push(s),n}}const wu=[" ",",","?","!",";"],vu=new hu(20),Tu=(a,s,r)=>{s=s||"",r=r||"";const n=wu.filter(p=>s.indexOf(p)<0&&r.indexOf(p)<0);if(n.length===0)return!0;const o=vu.getRegExp(`(${n.map(p=>p==="?"?"\\?":p).join("|")})`);let l=!o.test(a);if(!l){const p=a.indexOf(r);p>0&&!o.test(a.substring(0,p))&&(l=!0)}return l},Dn=function(a,s){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!a)return;if(a[s])return a[s];const n=s.split(r);let o=a;for(let l=0;l<n.length;){if(!o||typeof o!="object")return;let p,u="";for(let m=l;m<n.length;++m)if(m!==l&&(u+=r),u+=n[m],p=o[u],p!==void 0){if(["string","number","boolean"].indexOf(typeof p)>-1&&m<n.length-1)continue;l+=m-l+1;break}o=p}return o},na=a=>a&&a.replace("_","-"),Du={type:"logger",log(a){this.output("log",a)},warn(a){this.output("warn",a)},error(a){this.output("error",a)},output(a,s){console&&console[a]&&console[a].apply(console,s)}};class ia{constructor(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(s,r)}init(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=s||Du,this.options=r,this.debug=r.debug}log(){for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return this.forward(r,"log","",!0)}warn(){for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return this.forward(r,"warn","",!0)}error(){for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return this.forward(r,"error","")}deprecate(){for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}forward(s,r,n,o){return o&&!this.debug?null:(ne(s[0])&&(s[0]=`${n}${this.prefix} ${s[0]}`),this.logger[r](s))}create(s){return new ia(this.logger,{prefix:`${this.prefix}:${s}:`,...this.options})}clone(s){return s=s||this.options,s.prefix=s.prefix||this.prefix,new ia(this.logger,s)}}var Kt=new ia;class oa{constructor(){this.observers={}}on(s,r){return s.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const o=this.observers[n].get(r)||0;this.observers[n].set(r,o+1)}),this}off(s,r){if(this.observers[s]){if(!r){delete this.observers[s];return}this.observers[s].delete(r)}}emit(s){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];this.observers[s]&&Array.from(this.observers[s].entries()).forEach(p=>{let[u,m]=p;for(let _=0;_<m;_++)u(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(p=>{let[u,m]=p;for(let _=0;_<m;_++)u.apply(u,[s,...n])})}}class Mo extends oa{constructor(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=s||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(s){this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}removeNamespaces(s){const r=this.options.ns.indexOf(s);r>-1&&this.options.ns.splice(r,1)}getResource(s,r,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const l=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,p=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let u;s.indexOf(".")>-1?u=s.split("."):(u=[s,r],n&&(Array.isArray(n)?u.push(...n):ne(n)&&l?u.push(...n.split(l)):u.push(n)));const m=aa(this.data,u);return!m&&!r&&!n&&s.indexOf(".")>-1&&(s=u[0],r=u[1],n=u.slice(2).join(".")),m||!p||!ne(n)?m:Dn(this.data&&this.data[s]&&this.data[s][r],n,l)}addResource(s,r,n,o){let l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const p=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator;let u=[s,r];n&&(u=u.concat(p?n.split(p):n)),s.indexOf(".")>-1&&(u=s.split("."),o=r,r=u[1]),this.addNamespaces(r),Oo(this.data,u,o),l.silent||this.emit("added",s,r,n,o)}addResources(s,r,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const l in n)(ne(n[l])||Array.isArray(n[l]))&&this.addResource(s,r,l,n[l],{silent:!0});o.silent||this.emit("added",s,r,n)}addResourceBundle(s,r,n,o,l){let p=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},u=[s,r];s.indexOf(".")>-1&&(u=s.split("."),o=n,n=r,r=u[1]),this.addNamespaces(r);let m=aa(this.data,u)||{};p.skipCopy||(n=JSON.parse(JSON.stringify(n))),o?Po(m,n,l):m={...m,...n},Oo(this.data,u,m),p.silent||this.emit("added",s,r,n)}removeResourceBundle(s,r){this.hasResourceBundle(s,r)&&delete this.data[s][r],this.removeNamespaces(r),this.emit("removed",s,r)}hasResourceBundle(s,r){return this.getResource(s,r)!==void 0}getResourceBundle(s,r){return r||(r=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(s,r)}:this.getResource(s,r)}getDataByLanguage(s){return this.data[s]}hasLanguageSomeTranslations(s){const r=this.getDataByLanguage(s);return!!(r&&Object.keys(r)||[]).find(o=>r[o]&&Object.keys(r[o]).length>0)}toJSON(){return this.data}}var Ro={processors:{},addPostProcessor(a){this.processors[a.name]=a},handle(a,s,r,n,o){return a.forEach(l=>{this.processors[l]&&(s=this.processors[l].process(s,r,n,o))}),s}};const Fo={};class la extends oa{constructor(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),yu(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],s,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Kt.create("translator")}changeLanguage(s){s&&(this.language=s)}exists(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(s==null)return!1;const n=this.resolve(s,r);return n&&n.res!==void 0}extractFromKey(s,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let l=r.ns||this.options.defaultNS||[];const p=n&&s.indexOf(n)>-1,u=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!Tu(s,n,o);if(p&&!u){const m=s.match(this.interpolator.nestingRegexp);if(m&&m.length>0)return{key:s,namespaces:ne(l)?[l]:l};const _=s.split(n);(n!==o||n===o&&this.options.ns.indexOf(_[0])>-1)&&(l=_.shift()),s=_.join(o)}return{key:s,namespaces:ne(l)?[l]:l}}translate(s,r,n){if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),s==null)return"";Array.isArray(s)||(s=[String(s)]);const o=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,l=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:p,namespaces:u}=this.extractFromKey(s[s.length-1],r),m=u[u.length-1],_=r.lng||this.language,g=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(_&&_.toLowerCase()==="cimode"){if(g){const N=r.nsSeparator||this.options.nsSeparator;return o?{res:`${m}${N}${p}`,usedKey:p,exactUsedKey:p,usedLng:_,usedNS:m,usedParams:this.getUsedParamsDetails(r)}:`${m}${N}${p}`}return o?{res:p,usedKey:p,exactUsedKey:p,usedLng:_,usedNS:m,usedParams:this.getUsedParamsDetails(r)}:p}const h=this.resolve(s,r);let w=h&&h.res;const k=h&&h.usedKey||p,S=h&&h.exactUsedKey||p,C=Object.prototype.toString.apply(w),B=["[object Number]","[object Function]","[object RegExp]"],W=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,H=!this.i18nFormat||this.i18nFormat.handleAsObject,ee=!ne(w)&&typeof w!="boolean"&&typeof w!="number";if(H&&w&&ee&&B.indexOf(C)<0&&!(ne(W)&&Array.isArray(w))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const N=this.options.returnedObjectHandler?this.options.returnedObjectHandler(k,w,{...r,ns:u}):`key '${p} (${this.language})' returned an object instead of string.`;return o?(h.res=N,h.usedParams=this.getUsedParamsDetails(r),h):N}if(l){const N=Array.isArray(w),M=N?[]:{},E=N?S:k;for(const $ in w)if(Object.prototype.hasOwnProperty.call(w,$)){const P=`${E}${l}${$}`;M[$]=this.translate(P,{...r,joinArrays:!1,ns:u}),M[$]===P&&(M[$]=w[$])}w=M}}else if(H&&ne(W)&&Array.isArray(w))w=w.join(W),w&&(w=this.extendTranslation(w,s,r,n));else{let N=!1,M=!1;const E=r.count!==void 0&&!ne(r.count),$=la.hasDefaultValue(r),P=E?this.pluralResolver.getSuffix(_,r.count,r):"",j=r.ordinal&&E?this.pluralResolver.getSuffix(_,r.count,{ordinal:!1}):"",X=E&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),xe=X&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${P}`]||r[`defaultValue${j}`]||r.defaultValue;!this.isValidLookup(w)&&$&&(N=!0,w=xe),this.isValidLookup(w)||(M=!0,w=p);const He=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&M?void 0:w,Ee=$&&xe!==w&&this.options.updateMissing;if(M||N||Ee){if(this.logger.log(Ee?"updateKey":"missingKey",_,m,p,Ee?xe:w),l){const ge=this.resolve(p,{...r,keySeparator:!1});ge&&ge.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let Z=[];const ye=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ye&&ye[0])for(let ge=0;ge<ye.length;ge++)Z.push(ye[ge]);else this.options.saveMissingTo==="all"?Z=this.languageUtils.toResolveHierarchy(r.lng||this.language):Z.push(r.lng||this.language);const ze=(ge,Ue,Ge)=>{const re=$&&Ge!==w?Ge:He;this.options.missingKeyHandler?this.options.missingKeyHandler(ge,m,Ue,re,Ee,r):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(ge,m,Ue,re,Ee,r),this.emit("missingKey",ge,m,Ue,w)};this.options.saveMissing&&(this.options.saveMissingPlurals&&E?Z.forEach(ge=>{const Ue=this.pluralResolver.getSuffixes(ge,r);X&&r[`defaultValue${this.options.pluralSeparator}zero`]&&Ue.indexOf(`${this.options.pluralSeparator}zero`)<0&&Ue.push(`${this.options.pluralSeparator}zero`),Ue.forEach(Ge=>{ze([ge],p+Ge,r[`defaultValue${Ge}`]||xe)})}):ze(Z,p,xe))}w=this.extendTranslation(w,s,r,h,n),M&&w===p&&this.options.appendNamespaceToMissingKey&&(w=`${m}:${p}`),(M||N)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?w=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${m}:${p}`:p,N?w:void 0):w=this.options.parseMissingKeyHandler(w))}return o?(h.res=w,h.usedParams=this.getUsedParamsDetails(r),h):w}extendTranslation(s,r,n,o,l){var p=this;if(this.i18nFormat&&this.i18nFormat.parse)s=this.i18nFormat.parse(s,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const _=ne(s)&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let g;if(_){const w=s.match(this.interpolator.nestingRegexp);g=w&&w.length}let h=n.replace&&!ne(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),s=this.interpolator.interpolate(s,h,n.lng||this.language||o.usedLng,n),_){const w=s.match(this.interpolator.nestingRegexp),k=w&&w.length;g<k&&(n.nest=!1)}!n.lng&&this.options.compatibilityAPI!=="v1"&&o&&o.res&&(n.lng=this.language||o.usedLng),n.nest!==!1&&(s=this.interpolator.nest(s,function(){for(var w=arguments.length,k=new Array(w),S=0;S<w;S++)k[S]=arguments[S];return l&&l[0]===k[0]&&!n.context?(p.logger.warn(`It seems you are nesting recursively key: ${k[0]} in key: ${r[0]}`),null):p.translate(...k,r)},n)),n.interpolation&&this.interpolator.reset()}const u=n.postProcess||this.options.postProcess,m=ne(u)?[u]:u;return s!=null&&m&&m.length&&n.applyPostProcessor!==!1&&(s=Ro.handle(m,s,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),s}resolve(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,o,l,p,u;return ne(s)&&(s=[s]),s.forEach(m=>{if(this.isValidLookup(n))return;const _=this.extractFromKey(m,r),g=_.key;o=g;let h=_.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const w=r.count!==void 0&&!ne(r.count),k=w&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),S=r.context!==void 0&&(ne(r.context)||typeof r.context=="number")&&r.context!=="",C=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);h.forEach(B=>{this.isValidLookup(n)||(u=B,!Fo[`${C[0]}-${B}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(u)&&(Fo[`${C[0]}-${B}`]=!0,this.logger.warn(`key "${o}" for languages "${C.join(", ")}" won't get resolved as namespace "${u}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),C.forEach(W=>{if(this.isValidLookup(n))return;p=W;const H=[g];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(H,g,W,B,r);else{let N;w&&(N=this.pluralResolver.getSuffix(W,r.count,r));const M=`${this.options.pluralSeparator}zero`,E=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(w&&(H.push(g+N),r.ordinal&&N.indexOf(E)===0&&H.push(g+N.replace(E,this.options.pluralSeparator)),k&&H.push(g+M)),S){const $=`${g}${this.options.contextSeparator}${r.context}`;H.push($),w&&(H.push($+N),r.ordinal&&N.indexOf(E)===0&&H.push($+N.replace(E,this.options.pluralSeparator)),k&&H.push($+M))}}let ee;for(;ee=H.pop();)this.isValidLookup(n)||(l=ee,n=this.getResource(W,B,ee,r))}))})}),{res:n,usedKey:o,exactUsedKey:l,usedLng:p,usedNS:u}}isValidLookup(s){return s!==void 0&&!(!this.options.returnNull&&s===null)&&!(!this.options.returnEmptyString&&s==="")}getResource(s,r,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(s,r,n,o):this.resourceStore.getResource(s,r,n,o)}getUsedParamsDetails(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=s.replace&&!ne(s.replace);let o=n?s.replace:s;if(n&&typeof s.count<"u"&&(o.count=s.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!n){o={...o};for(const l of r)delete o[l]}return o}static hasDefaultValue(s){const r="defaultValue";for(const n in s)if(Object.prototype.hasOwnProperty.call(s,n)&&r===n.substring(0,r.length)&&s[n]!==void 0)return!0;return!1}}const kn=a=>a.charAt(0).toUpperCase()+a.slice(1);class Bo{constructor(s){this.options=s,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Kt.create("languageUtils")}getScriptPartFromCode(s){if(s=na(s),!s||s.indexOf("-")<0)return null;const r=s.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(s){if(s=na(s),!s||s.indexOf("-")<0)return s;const r=s.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(s){if(ne(s)&&s.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let o=Intl.getCanonicalLocales(s)[0];if(o&&this.options.lowerCaseLng&&(o=o.toLowerCase()),o)return o}catch{}const r=["hans","hant","latn","cyrl","cans","mong","arab"];let n=s.split("-");return this.options.lowerCaseLng?n=n.map(o=>o.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=kn(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=kn(n[1].toLowerCase())),r.indexOf(n[2].toLowerCase())>-1&&(n[2]=kn(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?s.toLowerCase():s}isSupportedCode(s){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(s=this.getLanguagePartFromCode(s)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(s)>-1}getBestMatchFromCodes(s){if(!s)return null;let r;return s.forEach(n=>{if(r)return;const o=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(o))&&(r=o)}),!r&&this.options.supportedLngs&&s.forEach(n=>{if(r)return;const o=this.getLanguagePartFromCode(n);if(this.isSupportedCode(o))return r=o;r=this.options.supportedLngs.find(l=>{if(l===o)return l;if(!(l.indexOf("-")<0&&o.indexOf("-")<0)&&(l.indexOf("-")>0&&o.indexOf("-")<0&&l.substring(0,l.indexOf("-"))===o||l.indexOf(o)===0&&o.length>1))return l})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(s,r){if(!s)return[];if(typeof s=="function"&&(s=s(r)),ne(s)&&(s=[s]),Array.isArray(s))return s;if(!r)return s.default||[];let n=s[r];return n||(n=s[this.getScriptPartFromCode(r)]),n||(n=s[this.formatLanguageCode(r)]),n||(n=s[this.getLanguagePartFromCode(r)]),n||(n=s.default),n||[]}toResolveHierarchy(s,r){const n=this.getFallbackCodes(r||this.options.fallbackLng||[],s),o=[],l=p=>{p&&(this.isSupportedCode(p)?o.push(p):this.logger.warn(`rejecting language code not found in supportedLngs: ${p}`))};return ne(s)&&(s.indexOf("-")>-1||s.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&l(this.formatLanguageCode(s)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&l(this.getScriptPartFromCode(s)),this.options.load!=="currentOnly"&&l(this.getLanguagePartFromCode(s))):ne(s)&&l(this.formatLanguageCode(s)),n.forEach(p=>{o.indexOf(p)<0&&l(this.formatLanguageCode(p))}),o}}let ku=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Iu={1:a=>+(a>1),2:a=>+(a!=1),3:a=>0,4:a=>a%10==1&&a%100!=11?0:a%10>=2&&a%10<=4&&(a%100<10||a%100>=20)?1:2,5:a=>a==0?0:a==1?1:a==2?2:a%100>=3&&a%100<=10?3:a%100>=11?4:5,6:a=>a==1?0:a>=2&&a<=4?1:2,7:a=>a==1?0:a%10>=2&&a%10<=4&&(a%100<10||a%100>=20)?1:2,8:a=>a==1?0:a==2?1:a!=8&&a!=11?2:3,9:a=>+(a>=2),10:a=>a==1?0:a==2?1:a<7?2:a<11?3:4,11:a=>a==1||a==11?0:a==2||a==12?1:a>2&&a<20?2:3,12:a=>+(a%10!=1||a%100==11),13:a=>+(a!==0),14:a=>a==1?0:a==2?1:a==3?2:3,15:a=>a%10==1&&a%100!=11?0:a%10>=2&&(a%100<10||a%100>=20)?1:2,16:a=>a%10==1&&a%100!=11?0:a!==0?1:2,17:a=>a==1||a%10==1&&a%100!=11?0:1,18:a=>a==0?0:a==1?1:2,19:a=>a==1?0:a==0||a%100>1&&a%100<11?1:a%100>10&&a%100<20?2:3,20:a=>a==1?0:a==0||a%100>0&&a%100<20?1:2,21:a=>a%100==1?1:a%100==2?2:a%100==3||a%100==4?3:0,22:a=>a==1?0:a==2?1:(a<0||a>10)&&a%10==0?2:3};const Au=["v1","v2","v3"],qu=["v4"],Uo={zero:0,one:1,two:2,few:3,many:4,other:5},Cu=()=>{const a={};return ku.forEach(s=>{s.lngs.forEach(r=>{a[r]={numbers:s.nr,plurals:Iu[s.fc]}})}),a};class Su{constructor(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=s,this.options=r,this.logger=Kt.create("pluralResolver"),(!this.options.compatibilityJSON||qu.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Cu(),this.pluralRulesCache={}}addRule(s,r){this.rules[s]=r}clearCache(){this.pluralRulesCache={}}getRule(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const n=na(s==="dev"?"en":s),o=r.ordinal?"ordinal":"cardinal",l=JSON.stringify({cleanedCode:n,type:o});if(l in this.pluralRulesCache)return this.pluralRulesCache[l];const p=new Intl.PluralRules(n,{type:o});return this.pluralRulesCache[l]=p,p}catch{return}return this.rules[s]||this.rules[this.languageUtils.getLanguagePartFromCode(s)]}needsPlural(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(s,r);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(s,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(s,n).map(o=>`${r}${o}`)}getSuffixes(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(s,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((o,l)=>Uo[o]-Uo[l]).map(o=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o}`):n.numbers.map(o=>this.getSuffix(s,o,r)):[]}getSuffix(s,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(s,n);return o?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o.select(r)}`:this.getSuffixRetroCompatible(o,r):(this.logger.warn(`no plural rule found for: ${s}`),"")}getSuffixRetroCompatible(s,r){const n=s.noAbs?s.plurals(r):s.plurals(Math.abs(r));let o=s.numbers[n];this.options.simplifyPluralSuffix&&s.numbers.length===2&&s.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));const l=()=>this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString();return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?`_plural_${o.toString()}`:l():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&s.numbers.length===2&&s.numbers[0]===1?l():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!Au.includes(this.options.compatibilityJSON)}}const Ko=function(a,s,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,l=gu(a,s,r);return!l&&o&&ne(r)&&(l=Dn(a,r,n),l===void 0&&(l=Dn(s,r,n))),l},In=a=>a.replace(/\$/g,"$$$$");class zu{constructor(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Kt.create("interpolator"),this.options=s,this.format=s.interpolation&&s.interpolation.format||(r=>r),this.init(s)}init(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};s.interpolation||(s.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:o,prefix:l,prefixEscaped:p,suffix:u,suffixEscaped:m,formatSeparator:_,unescapeSuffix:g,unescapePrefix:h,nestingPrefix:w,nestingPrefixEscaped:k,nestingSuffix:S,nestingSuffixEscaped:C,nestingOptionsSeparator:B,maxReplaces:W,alwaysFormat:H}=s.interpolation;this.escape=r!==void 0?r:xu,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=l?Rs(l):p||"{{",this.suffix=u?Rs(u):m||"}}",this.formatSeparator=_||",",this.unescapePrefix=g?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":g||"",this.nestingPrefix=w?Rs(w):k||Rs("$t("),this.nestingSuffix=S?Rs(S):C||Rs(")"),this.nestingOptionsSeparator=B||",",this.maxReplaces=W||1e3,this.alwaysFormat=H!==void 0?H:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const s=(r,n)=>r&&r.source===n?(r.lastIndex=0,r):new RegExp(n,"g");this.regexp=s(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=s(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=s(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(s,r,n,o){let l,p,u;const m=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},_=k=>{if(k.indexOf(this.formatSeparator)<0){const W=Ko(r,m,k,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(W,void 0,n,{...o,...r,interpolationkey:k}):W}const S=k.split(this.formatSeparator),C=S.shift().trim(),B=S.join(this.formatSeparator).trim();return this.format(Ko(r,m,C,this.options.keySeparator,this.options.ignoreJSONStructure),B,n,{...o,...r,interpolationkey:C})};this.resetRegExp();const g=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,h=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:k=>In(k)},{regex:this.regexp,safeValue:k=>this.escapeValue?In(this.escape(k)):In(k)}].forEach(k=>{for(u=0;l=k.regex.exec(s);){const S=l[1].trim();if(p=_(S),p===void 0)if(typeof g=="function"){const B=g(s,l,o);p=ne(B)?B:""}else if(o&&Object.prototype.hasOwnProperty.call(o,S))p="";else if(h){p=l[0];continue}else this.logger.warn(`missed to pass in variable ${S} for interpolating ${s}`),p="";else!ne(p)&&!this.useRawValueToEscape&&(p=No(p));const C=k.safeValue(p);if(s=s.replace(l[0],C),h?(k.regex.lastIndex+=p.length,k.regex.lastIndex-=l[0].length):k.regex.lastIndex=0,u++,u>=this.maxReplaces)break}}),s}nest(s,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,l,p;const u=(m,_)=>{const g=this.nestingOptionsSeparator;if(m.indexOf(g)<0)return m;const h=m.split(new RegExp(`${g}[ ]*{`));let w=`{${h[1]}`;m=h[0],w=this.interpolate(w,p);const k=w.match(/'/g),S=w.match(/"/g);(k&&k.length%2===0&&!S||S.length%2!==0)&&(w=w.replace(/'/g,'"'));try{p=JSON.parse(w),_&&(p={..._,...p})}catch(C){return this.logger.warn(`failed parsing options string in nesting for key ${m}`,C),`${m}${g}${w}`}return p.defaultValue&&p.defaultValue.indexOf(this.prefix)>-1&&delete p.defaultValue,m};for(;o=this.nestingRegexp.exec(s);){let m=[];p={...n},p=p.replace&&!ne(p.replace)?p.replace:p,p.applyPostProcessor=!1,delete p.defaultValue;let _=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const g=o[1].split(this.formatSeparator).map(h=>h.trim());o[1]=g.shift(),m=g,_=!0}if(l=r(u.call(this,o[1].trim(),p),p),l&&o[0]===s&&!ne(l))return l;ne(l)||(l=No(l)),l||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${s}`),l=""),_&&(l=m.reduce((g,h)=>this.format(g,h,n.lng,{...n,interpolationkey:o[1].trim()}),l.trim())),s=s.replace(o[0],l),this.regexp.lastIndex=0}return s}}const Nu=a=>{let s=a.toLowerCase().trim();const r={};if(a.indexOf("(")>-1){const n=a.split("(");s=n[0].toLowerCase().trim();const o=n[1].substring(0,n[1].length-1);s==="currency"&&o.indexOf(":")<0?r.currency||(r.currency=o.trim()):s==="relativetime"&&o.indexOf(":")<0?r.range||(r.range=o.trim()):o.split(";").forEach(p=>{if(p){const[u,...m]=p.split(":"),_=m.join(":").trim().replace(/^'+|'+$/g,""),g=u.trim();r[g]||(r[g]=_),_==="false"&&(r[g]=!1),_==="true"&&(r[g]=!0),isNaN(_)||(r[g]=parseInt(_,10))}})}return{formatName:s,formatOptions:r}},Fs=a=>{const s={};return(r,n,o)=>{let l=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(l={...l,[o.interpolationkey]:void 0});const p=n+JSON.stringify(l);let u=s[p];return u||(u=a(na(n),o),s[p]=u),u(r)}};class Eu{constructor(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Kt.create("formatter"),this.options=s,this.formats={number:Fs((r,n)=>{const o=new Intl.NumberFormat(r,{...n});return l=>o.format(l)}),currency:Fs((r,n)=>{const o=new Intl.NumberFormat(r,{...n,style:"currency"});return l=>o.format(l)}),datetime:Fs((r,n)=>{const o=new Intl.DateTimeFormat(r,{...n});return l=>o.format(l)}),relativetime:Fs((r,n)=>{const o=new Intl.RelativeTimeFormat(r,{...n});return l=>o.format(l,n.range||"day")}),list:Fs((r,n)=>{const o=new Intl.ListFormat(r,{...n});return l=>o.format(l)})},this.init(s)}init(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=r.interpolation.formatSeparator||","}add(s,r){this.formats[s.toLowerCase().trim()]=r}addCached(s,r){this.formats[s.toLowerCase().trim()]=Fs(r)}format(s,r,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const l=r.split(this.formatSeparator);if(l.length>1&&l[0].indexOf("(")>1&&l[0].indexOf(")")<0&&l.find(u=>u.indexOf(")")>-1)){const u=l.findIndex(m=>m.indexOf(")")>-1);l[0]=[l[0],...l.splice(1,u)].join(this.formatSeparator)}return l.reduce((u,m)=>{const{formatName:_,formatOptions:g}=Nu(m);if(this.formats[_]){let h=u;try{const w=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},k=w.locale||w.lng||o.locale||o.lng||n;h=this.formats[_](u,k,{...g,...o,...w})}catch(w){this.logger.warn(w)}return h}else this.logger.warn(`there was no format function for ${_}`);return u},s)}}const Lu=(a,s)=>{a.pending[s]!==void 0&&(delete a.pending[s],a.pendingCount--)};class Ou extends oa{constructor(s,r,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=s,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=o,this.logger=Kt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,o.backend,o)}queueLoad(s,r,n,o){const l={},p={},u={},m={};return s.forEach(_=>{let g=!0;r.forEach(h=>{const w=`${_}|${h}`;!n.reload&&this.store.hasResourceBundle(_,h)?this.state[w]=2:this.state[w]<0||(this.state[w]===1?p[w]===void 0&&(p[w]=!0):(this.state[w]=1,g=!1,p[w]===void 0&&(p[w]=!0),l[w]===void 0&&(l[w]=!0),m[h]===void 0&&(m[h]=!0)))}),g||(u[_]=!0)}),(Object.keys(l).length||Object.keys(p).length)&&this.queue.push({pending:p,pendingCount:Object.keys(p).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(l),pending:Object.keys(p),toLoadLanguages:Object.keys(u),toLoadNamespaces:Object.keys(m)}}loaded(s,r,n){const o=s.split("|"),l=o[0],p=o[1];r&&this.emit("failedLoading",l,p,r),!r&&n&&this.store.addResourceBundle(l,p,n,void 0,void 0,{skipCopy:!0}),this.state[s]=r?-1:2,r&&n&&(this.state[s]=0);const u={};this.queue.forEach(m=>{fu(m.loaded,[l],p),Lu(m,s),r&&m.errors.push(r),m.pendingCount===0&&!m.done&&(Object.keys(m.loaded).forEach(_=>{u[_]||(u[_]={});const g=m.loaded[_];g.length&&g.forEach(h=>{u[_][h]===void 0&&(u[_][h]=!0)})}),m.done=!0,m.errors.length?m.callback(m.errors):m.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(m=>!m.done)}read(s,r,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,p=arguments.length>5?arguments[5]:void 0;if(!s.length)return p(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:s,ns:r,fcName:n,tried:o,wait:l,callback:p});return}this.readingCalls++;const u=(_,g)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(_&&g&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,s,r,n,o+1,l*2,p)},l);return}p(_,g)},m=this.backend[n].bind(this.backend);if(m.length===2){try{const _=m(s,r);_&&typeof _.then=="function"?_.then(g=>u(null,g)).catch(u):u(null,_)}catch(_){u(_)}return}return m(s,r,u)}prepareLoading(s,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();ne(s)&&(s=this.languageUtils.toResolveHierarchy(s)),ne(r)&&(r=[r]);const l=this.queueLoad(s,r,n,o);if(!l.toLoad.length)return l.pending.length||o(),null;l.toLoad.forEach(p=>{this.loadOne(p)})}load(s,r,n){this.prepareLoading(s,r,{},n)}reload(s,r,n){this.prepareLoading(s,r,{reload:!0},n)}loadOne(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=s.split("|"),o=n[0],l=n[1];this.read(o,l,"read",void 0,void 0,(p,u)=>{p&&this.logger.warn(`${r}loading namespace ${l} for language ${o} failed`,p),!p&&u&&this.logger.log(`${r}loaded namespace ${l} for language ${o}`,u),this.loaded(s,p,u)})}saveMissing(s,r,n,o,l){let p=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},u=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${n}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend&&this.backend.create){const m={...p,isUpdate:l},_=this.backend.create.bind(this.backend);if(_.length<6)try{let g;_.length===5?g=_(s,r,n,o,m):g=_(s,r,n,o),g&&typeof g.then=="function"?g.then(h=>u(null,h)).catch(u):u(null,g)}catch(g){u(g)}else _(s,r,n,o,u,m)}!s||!s[0]||this.store.addResource(s[0],r,n,o)}}}const $o=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:a=>{let s={};if(typeof a[1]=="object"&&(s=a[1]),ne(a[1])&&(s.defaultValue=a[1]),ne(a[2])&&(s.tDescription=a[2]),typeof a[2]=="object"||typeof a[3]=="object"){const r=a[3]||a[2];Object.keys(r).forEach(n=>{s[n]=r[n]})}return s},interpolation:{escapeValue:!0,format:a=>a,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),jo=a=>(ne(a.ns)&&(a.ns=[a.ns]),ne(a.fallbackLng)&&(a.fallbackLng=[a.fallbackLng]),ne(a.fallbackNS)&&(a.fallbackNS=[a.fallbackNS]),a.supportedLngs&&a.supportedLngs.indexOf("cimode")<0&&(a.supportedLngs=a.supportedLngs.concat(["cimode"])),a),ca=()=>{},Pu=a=>{Object.getOwnPropertyNames(Object.getPrototypeOf(a)).forEach(r=>{typeof a[r]=="function"&&(a[r]=a[r].bind(a))})};class hr extends oa{constructor(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(super(),this.options=jo(s),this.services={},this.logger=Kt,this.modules={external:[]},Pu(this),r&&!this.isInitialized&&!s.isClone){if(!this.options.initImmediate)return this.init(s,r),this;setTimeout(()=>{this.init(s,r)},0)}}init(){var s=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(n=r,r={}),!r.defaultNS&&r.defaultNS!==!1&&r.ns&&(ne(r.ns)?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const o=$o();this.options={...o,...this.options,...jo(r)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);const l=g=>g?typeof g=="function"?new g:g:null;if(!this.options.isClone){this.modules.logger?Kt.init(l(this.modules.logger),this.options):Kt.init(null,this.options);let g;this.modules.formatter?g=this.modules.formatter:typeof Intl<"u"&&(g=Eu);const h=new Bo(this.options);this.store=new Mo(this.options.resources,this.options);const w=this.services;w.logger=Kt,w.resourceStore=this.store,w.languageUtils=h,w.pluralResolver=new Su(h,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),g&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(w.formatter=l(g),w.formatter.init(w,this.options),this.options.interpolation.format=w.formatter.format.bind(w.formatter)),w.interpolator=new zu(this.options),w.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},w.backendConnector=new Ou(l(this.modules.backend),w.resourceStore,w,this.options),w.backendConnector.on("*",function(k){for(var S=arguments.length,C=new Array(S>1?S-1:0),B=1;B<S;B++)C[B-1]=arguments[B];s.emit(k,...C)}),this.modules.languageDetector&&(w.languageDetector=l(this.modules.languageDetector),w.languageDetector.init&&w.languageDetector.init(w,this.options.detection,this.options)),this.modules.i18nFormat&&(w.i18nFormat=l(this.modules.i18nFormat),w.i18nFormat.init&&w.i18nFormat.init(this)),this.translator=new la(this.services,this.options),this.translator.on("*",function(k){for(var S=arguments.length,C=new Array(S>1?S-1:0),B=1;B<S;B++)C[B-1]=arguments[B];s.emit(k,...C)}),this.modules.external.forEach(k=>{k.init&&k.init(this)})}if(this.format=this.options.interpolation.format,n||(n=ca),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const g=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);g.length>0&&g[0]!=="dev"&&(this.options.lng=g[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(g=>{this[g]=function(){return s.store[g](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(g=>{this[g]=function(){return s.store[g](...arguments),s}});const m=br(),_=()=>{const g=(h,w)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),m.resolve(w),n(h,w)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return g(null,this.t.bind(this));this.changeLanguage(this.options.lng,g)};return this.options.resources||!this.options.initImmediate?_():setTimeout(_,0),m}loadResources(s){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ca;const o=ne(s)?s:this.language;if(typeof s=="function"&&(n=s),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const l=[],p=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(_=>{_!=="cimode"&&l.indexOf(_)<0&&l.push(_)})};o?p(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(m=>p(m)),this.options.preload&&this.options.preload.forEach(u=>p(u)),this.services.backendConnector.load(l,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(u)})}else n(null)}reloadResources(s,r,n){const o=br();return typeof s=="function"&&(n=s,s=void 0),typeof r=="function"&&(n=r,r=void 0),s||(s=this.languages),r||(r=this.options.ns),n||(n=ca),this.services.backendConnector.reload(s,r,l=>{o.resolve(),n(l)}),o}use(s){if(!s)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!s.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return s.type==="backend"&&(this.modules.backend=s),(s.type==="logger"||s.log&&s.warn&&s.error)&&(this.modules.logger=s),s.type==="languageDetector"&&(this.modules.languageDetector=s),s.type==="i18nFormat"&&(this.modules.i18nFormat=s),s.type==="postProcessor"&&Ro.addPostProcessor(s),s.type==="formatter"&&(this.modules.formatter=s),s.type==="3rdParty"&&this.modules.external.push(s),this}setResolvedLanguage(s){if(!(!s||!this.languages)&&!(["cimode","dev"].indexOf(s)>-1))for(let r=0;r<this.languages.length;r++){const n=this.languages[r];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(s,r){var n=this;this.isLanguageChangingTo=s;const o=br();this.emit("languageChanging",s);const l=m=>{this.language=m,this.languages=this.services.languageUtils.toResolveHierarchy(m),this.resolvedLanguage=void 0,this.setResolvedLanguage(m)},p=(m,_)=>{_?(l(_),this.translator.changeLanguage(_),this.isLanguageChangingTo=void 0,this.emit("languageChanged",_),this.logger.log("languageChanged",_)):this.isLanguageChangingTo=void 0,o.resolve(function(){return n.t(...arguments)}),r&&r(m,function(){return n.t(...arguments)})},u=m=>{!s&&!m&&this.services.languageDetector&&(m=[]);const _=ne(m)?m:this.services.languageUtils.getBestMatchFromCodes(m);_&&(this.language||l(_),this.translator.language||this.translator.changeLanguage(_),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(_)),this.loadResources(_,g=>{p(g,_)})};return!s&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!s&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(s),o}getFixedT(s,r,n){var o=this;const l=function(p,u){let m;if(typeof u!="object"){for(var _=arguments.length,g=new Array(_>2?_-2:0),h=2;h<_;h++)g[h-2]=arguments[h];m=o.options.overloadTranslationOptionHandler([p,u].concat(g))}else m={...u};m.lng=m.lng||l.lng,m.lngs=m.lngs||l.lngs,m.ns=m.ns||l.ns,m.keyPrefix!==""&&(m.keyPrefix=m.keyPrefix||n||l.keyPrefix);const w=o.options.keySeparator||".";let k;return m.keyPrefix&&Array.isArray(p)?k=p.map(S=>`${m.keyPrefix}${w}${S}`):k=m.keyPrefix?`${m.keyPrefix}${w}${p}`:p,o.t(k,m)};return ne(s)?l.lng=s:l.lngs=s,l.ns=r,l.keyPrefix=n,l}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(s){this.options.defaultNS=s}hasLoadedNamespace(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=r.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,l=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const p=(u,m)=>{const _=this.services.backendConnector.state[`${u}|${m}`];return _===-1||_===0||_===2};if(r.precheck){const u=r.precheck(this,p);if(u!==void 0)return u}return!!(this.hasResourceBundle(n,s)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||p(n,s)&&(!o||p(l,s)))}loadNamespaces(s,r){const n=br();return this.options.ns?(ne(s)&&(s=[s]),s.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{n.resolve(),r&&r(o)}),n):(r&&r(),Promise.resolve())}loadLanguages(s,r){const n=br();ne(s)&&(s=[s]);const o=this.options.preload||[],l=s.filter(p=>o.indexOf(p)<0&&this.services.languageUtils.isSupportedCode(p));return l.length?(this.options.preload=o.concat(l),this.loadResources(p=>{n.resolve(),r&&r(p)}),n):(r&&r(),Promise.resolve())}dir(s){if(s||(s=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!s)return"rtl";const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services&&this.services.languageUtils||new Bo($o());return r.indexOf(n.getLanguagePartFromCode(s))>-1||s.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new hr(s,r)}cloneInstance(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ca;const n=s.forkResourceStore;n&&delete s.forkResourceStore;const o={...this.options,...s,isClone:!0},l=new hr(o);return(s.debug!==void 0||s.prefix!==void 0)&&(l.logger=l.logger.clone(s)),["store","services","language"].forEach(u=>{l[u]=this[u]}),l.services={...this.services},l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},n&&(l.store=new Mo(this.store.data,o),l.services.resourceStore=l.store),l.translator=new la(l.services,o),l.translator.on("*",function(u){for(var m=arguments.length,_=new Array(m>1?m-1:0),g=1;g<m;g++)_[g-1]=arguments[g];l.emit(u,..._)}),l.init(o,r),l.translator.options=o,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Se=hr.createInstance();Se.createInstance=hr.createInstance,Se.createInstance,Se.dir,Se.init,Se.loadResources,Se.reloadResources,Se.use,Se.changeLanguage,Se.getFixedT,Se.t,Se.exists,Se.setDefaultNamespace,Se.hasLoadedNamespace,Se.loadNamespaces,Se.loadLanguages;const{t:Ho}=Se;function Mu(a){return a.replace(/<.*>/,"")}class Ru{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"}],zo=["in","as","continue","break","else","to","by"],we={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"},du={clickOnKeywordForMoreHelp:"`click` on keyword for more help"};function uu(){const a={},s={};return Object.keys(So).reduce((r,n)=>{const o=So[n],l=we[n],{mapObj:p,keys:u}=mu(o,l);return r.keyMapList[n]=p,r.keyList[n]=u,r},{keyList:a,keyMapList:s}),{keyList:a,keyMapList:s}}function mu(a,s){const r=new Map,n=[];return a.forEach(o=>{var p;o.title=s;const l=o.originalName||o.name;l!=="for...in"&&(r.has(l)?(p=r.get(l))==null||p.push(o):(n.push(l),r.set(l,[o])))}),{mapObj:r,keys:n}}const{keyList:No,keyMapList:_t}=uu(),br=[{title:"内置变量",key:"variables",prefix:"var"},{title:"常量",key:"constants",prefix:"const"},{title:"函数",key:"functions",prefix:"fun"},{title:"关键词",key:"keywords",prefix:"kw"},{title:"类型",key:"types",prefix:"type"},{title:"运算符",key:"operators",prefix:"op"},{title:"注释",key:"annotations",prefix:"an"}],ne=a=>typeof a=="string",xr=()=>{let a,s;const r=new Promise((n,o)=>{a=n,s=o});return r.resolve=a,r.reject=s,r},Eo=a=>a==null?"":""+a,yu=(a,s,r)=>{a.forEach(n=>{s[n]&&(r[n]=s[n])})},_u=/###/g,Lo=a=>a&&a.indexOf("###")>-1?a.replace(_u,"."):a,Oo=a=>!a||ne(a),hr=(a,s,r)=>{const n=ne(s)?s.split("."):s;let o=0;for(;o<n.length-1;){if(Oo(a))return{};const l=Lo(n[o]);!a[l]&&r&&(a[l]=new r),Object.prototype.hasOwnProperty.call(a,l)?a=a[l]:a={},++o}return Oo(a)?{}:{obj:a,k:Lo(n[o])}},Po=(a,s,r)=>{const{obj:n,k:o}=hr(a,s,Object);if(n!==void 0||s.length===1){n[o]=r;return}let l=s[s.length-1],p=s.slice(0,s.length-1),u=hr(a,p,Object);for(;u.obj===void 0&&p.length;)l=`${p[p.length-1]}.${l}`,p=p.slice(0,p.length-1),u=hr(a,p,Object),u&&u.obj&&typeof u.obj[`${u.k}.${l}`]<"u"&&(u.obj=void 0);u.obj[`${u.k}.${l}`]=r},fu=(a,s,r,n)=>{const{obj:o,k:l}=hr(a,s,Object);o[l]=o[l]||[],o[l].push(r)},na=(a,s)=>{const{obj:r,k:n}=hr(a,s);if(r)return r[n]},gu=(a,s,r)=>{const n=na(a,r);return n!==void 0?n:na(s,r)},Mo=(a,s,r)=>{for(const n in s)n!=="__proto__"&&n!=="constructor"&&(n in a?ne(a[n])||a[n]instanceof String||ne(s[n])||s[n]instanceof String?r&&(a[n]=s[n]):Mo(a[n],s[n],r):a[n]=s[n]);return a},Fs=a=>a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var bu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const xu=a=>ne(a)?a.replace(/[&<>"'\/]/g,s=>bu[s]):a;class hu{constructor(s){this.capacity=s,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(s){const r=this.regExpMap.get(s);if(r!==void 0)return r;const n=new RegExp(s);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(s,n),this.regExpQueue.push(s),n}}const wu=[" ",",","?","!",";"],vu=new hu(20),Tu=(a,s,r)=>{s=s||"",r=r||"";const n=wu.filter(p=>s.indexOf(p)<0&&r.indexOf(p)<0);if(n.length===0)return!0;const o=vu.getRegExp(`(${n.map(p=>p==="?"?"\\?":p).join("|")})`);let l=!o.test(a);if(!l){const p=a.indexOf(r);p>0&&!o.test(a.substring(0,p))&&(l=!0)}return l},kn=function(a,s){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!a)return;if(a[s])return a[s];const n=s.split(r);let o=a;for(let l=0;l<n.length;){if(!o||typeof o!="object")return;let p,u="";for(let m=l;m<n.length;++m)if(m!==l&&(u+=r),u+=n[m],p=o[u],p!==void 0){if(["string","number","boolean"].indexOf(typeof p)>-1&&m<n.length-1)continue;l+=m-l+1;break}o=p}return o},ia=a=>a&&a.replace("_","-"),Du={type:"logger",log(a){this.output("log",a)},warn(a){this.output("warn",a)},error(a){this.output("error",a)},output(a,s){console&&console[a]&&console[a].apply(console,s)}};class oa{constructor(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(s,r)}init(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=s||Du,this.options=r,this.debug=r.debug}log(){for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return this.forward(r,"log","",!0)}warn(){for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return this.forward(r,"warn","",!0)}error(){for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return this.forward(r,"error","")}deprecate(){for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}forward(s,r,n,o){return o&&!this.debug?null:(ne(s[0])&&(s[0]=`${n}${this.prefix} ${s[0]}`),this.logger[r](s))}create(s){return new oa(this.logger,{prefix:`${this.prefix}:${s}:`,...this.options})}clone(s){return s=s||this.options,s.prefix=s.prefix||this.prefix,new oa(this.logger,s)}}var $t=new oa;class la{constructor(){this.observers={}}on(s,r){return s.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const o=this.observers[n].get(r)||0;this.observers[n].set(r,o+1)}),this}off(s,r){if(this.observers[s]){if(!r){delete this.observers[s];return}this.observers[s].delete(r)}}emit(s){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];this.observers[s]&&Array.from(this.observers[s].entries()).forEach(p=>{let[u,m]=p;for(let _=0;_<m;_++)u(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(p=>{let[u,m]=p;for(let _=0;_<m;_++)u.apply(u,[s,...n])})}}class Ro extends la{constructor(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=s||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(s){this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}removeNamespaces(s){const r=this.options.ns.indexOf(s);r>-1&&this.options.ns.splice(r,1)}getResource(s,r,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const l=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,p=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let u;s.indexOf(".")>-1?u=s.split("."):(u=[s,r],n&&(Array.isArray(n)?u.push(...n):ne(n)&&l?u.push(...n.split(l)):u.push(n)));const m=na(this.data,u);return!m&&!r&&!n&&s.indexOf(".")>-1&&(s=u[0],r=u[1],n=u.slice(2).join(".")),m||!p||!ne(n)?m:kn(this.data&&this.data[s]&&this.data[s][r],n,l)}addResource(s,r,n,o){let l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const p=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator;let u=[s,r];n&&(u=u.concat(p?n.split(p):n)),s.indexOf(".")>-1&&(u=s.split("."),o=r,r=u[1]),this.addNamespaces(r),Po(this.data,u,o),l.silent||this.emit("added",s,r,n,o)}addResources(s,r,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const l in n)(ne(n[l])||Array.isArray(n[l]))&&this.addResource(s,r,l,n[l],{silent:!0});o.silent||this.emit("added",s,r,n)}addResourceBundle(s,r,n,o,l){let p=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},u=[s,r];s.indexOf(".")>-1&&(u=s.split("."),o=n,n=r,r=u[1]),this.addNamespaces(r);let m=na(this.data,u)||{};p.skipCopy||(n=JSON.parse(JSON.stringify(n))),o?Mo(m,n,l):m={...m,...n},Po(this.data,u,m),p.silent||this.emit("added",s,r,n)}removeResourceBundle(s,r){this.hasResourceBundle(s,r)&&delete this.data[s][r],this.removeNamespaces(r),this.emit("removed",s,r)}hasResourceBundle(s,r){return this.getResource(s,r)!==void 0}getResourceBundle(s,r){return r||(r=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(s,r)}:this.getResource(s,r)}getDataByLanguage(s){return this.data[s]}hasLanguageSomeTranslations(s){const r=this.getDataByLanguage(s);return!!(r&&Object.keys(r)||[]).find(o=>r[o]&&Object.keys(r[o]).length>0)}toJSON(){return this.data}}var Fo={processors:{},addPostProcessor(a){this.processors[a.name]=a},handle(a,s,r,n,o){return a.forEach(l=>{this.processors[l]&&(s=this.processors[l].process(s,r,n,o))}),s}};const Bo={};class ca extends la{constructor(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),yu(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],s,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=$t.create("translator")}changeLanguage(s){s&&(this.language=s)}exists(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(s==null)return!1;const n=this.resolve(s,r);return n&&n.res!==void 0}extractFromKey(s,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let l=r.ns||this.options.defaultNS||[];const p=n&&s.indexOf(n)>-1,u=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!Tu(s,n,o);if(p&&!u){const m=s.match(this.interpolator.nestingRegexp);if(m&&m.length>0)return{key:s,namespaces:ne(l)?[l]:l};const _=s.split(n);(n!==o||n===o&&this.options.ns.indexOf(_[0])>-1)&&(l=_.shift()),s=_.join(o)}return{key:s,namespaces:ne(l)?[l]:l}}translate(s,r,n){if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),s==null)return"";Array.isArray(s)||(s=[String(s)]);const o=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,l=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:p,namespaces:u}=this.extractFromKey(s[s.length-1],r),m=u[u.length-1],_=r.lng||this.language,g=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(_&&_.toLowerCase()==="cimode"){if(g){const N=r.nsSeparator||this.options.nsSeparator;return o?{res:`${m}${N}${p}`,usedKey:p,exactUsedKey:p,usedLng:_,usedNS:m,usedParams:this.getUsedParamsDetails(r)}:`${m}${N}${p}`}return o?{res:p,usedKey:p,exactUsedKey:p,usedLng:_,usedNS:m,usedParams:this.getUsedParamsDetails(r)}:p}const h=this.resolve(s,r);let w=h&&h.res;const k=h&&h.usedKey||p,S=h&&h.exactUsedKey||p,C=Object.prototype.toString.apply(w),B=["[object Number]","[object Function]","[object RegExp]"],W=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,H=!this.i18nFormat||this.i18nFormat.handleAsObject,ee=!ne(w)&&typeof w!="boolean"&&typeof w!="number";if(H&&w&&ee&&B.indexOf(C)<0&&!(ne(W)&&Array.isArray(w))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const N=this.options.returnedObjectHandler?this.options.returnedObjectHandler(k,w,{...r,ns:u}):`key '${p} (${this.language})' returned an object instead of string.`;return o?(h.res=N,h.usedParams=this.getUsedParamsDetails(r),h):N}if(l){const N=Array.isArray(w),M=N?[]:{},E=N?S:k;for(const $ in w)if(Object.prototype.hasOwnProperty.call(w,$)){const P=`${E}${l}${$}`;M[$]=this.translate(P,{...r,joinArrays:!1,ns:u}),M[$]===P&&(M[$]=w[$])}w=M}}else if(H&&ne(W)&&Array.isArray(w))w=w.join(W),w&&(w=this.extendTranslation(w,s,r,n));else{let N=!1,M=!1;const E=r.count!==void 0&&!ne(r.count),$=ca.hasDefaultValue(r),P=E?this.pluralResolver.getSuffix(_,r.count,r):"",j=r.ordinal&&E?this.pluralResolver.getSuffix(_,r.count,{ordinal:!1}):"",X=E&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),xe=X&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${P}`]||r[`defaultValue${j}`]||r.defaultValue;!this.isValidLookup(w)&&$&&(N=!0,w=xe),this.isValidLookup(w)||(M=!0,w=p);const He=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&M?void 0:w,Ee=$&&xe!==w&&this.options.updateMissing;if(M||N||Ee){if(this.logger.log(Ee?"updateKey":"missingKey",_,m,p,Ee?xe:w),l){const ge=this.resolve(p,{...r,keySeparator:!1});ge&&ge.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let Z=[];const ye=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ye&&ye[0])for(let ge=0;ge<ye.length;ge++)Z.push(ye[ge]);else this.options.saveMissingTo==="all"?Z=this.languageUtils.toResolveHierarchy(r.lng||this.language):Z.push(r.lng||this.language);const ze=(ge,Ue,Ge)=>{const re=$&&Ge!==w?Ge:He;this.options.missingKeyHandler?this.options.missingKeyHandler(ge,m,Ue,re,Ee,r):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(ge,m,Ue,re,Ee,r),this.emit("missingKey",ge,m,Ue,w)};this.options.saveMissing&&(this.options.saveMissingPlurals&&E?Z.forEach(ge=>{const Ue=this.pluralResolver.getSuffixes(ge,r);X&&r[`defaultValue${this.options.pluralSeparator}zero`]&&Ue.indexOf(`${this.options.pluralSeparator}zero`)<0&&Ue.push(`${this.options.pluralSeparator}zero`),Ue.forEach(Ge=>{ze([ge],p+Ge,r[`defaultValue${Ge}`]||xe)})}):ze(Z,p,xe))}w=this.extendTranslation(w,s,r,h,n),M&&w===p&&this.options.appendNamespaceToMissingKey&&(w=`${m}:${p}`),(M||N)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?w=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${m}:${p}`:p,N?w:void 0):w=this.options.parseMissingKeyHandler(w))}return o?(h.res=w,h.usedParams=this.getUsedParamsDetails(r),h):w}extendTranslation(s,r,n,o,l){var p=this;if(this.i18nFormat&&this.i18nFormat.parse)s=this.i18nFormat.parse(s,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const _=ne(s)&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let g;if(_){const w=s.match(this.interpolator.nestingRegexp);g=w&&w.length}let h=n.replace&&!ne(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),s=this.interpolator.interpolate(s,h,n.lng||this.language||o.usedLng,n),_){const w=s.match(this.interpolator.nestingRegexp),k=w&&w.length;g<k&&(n.nest=!1)}!n.lng&&this.options.compatibilityAPI!=="v1"&&o&&o.res&&(n.lng=this.language||o.usedLng),n.nest!==!1&&(s=this.interpolator.nest(s,function(){for(var w=arguments.length,k=new Array(w),S=0;S<w;S++)k[S]=arguments[S];return l&&l[0]===k[0]&&!n.context?(p.logger.warn(`It seems you are nesting recursively key: ${k[0]} in key: ${r[0]}`),null):p.translate(...k,r)},n)),n.interpolation&&this.interpolator.reset()}const u=n.postProcess||this.options.postProcess,m=ne(u)?[u]:u;return s!=null&&m&&m.length&&n.applyPostProcessor!==!1&&(s=Fo.handle(m,s,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),s}resolve(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,o,l,p,u;return ne(s)&&(s=[s]),s.forEach(m=>{if(this.isValidLookup(n))return;const _=this.extractFromKey(m,r),g=_.key;o=g;let h=_.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const w=r.count!==void 0&&!ne(r.count),k=w&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),S=r.context!==void 0&&(ne(r.context)||typeof r.context=="number")&&r.context!=="",C=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);h.forEach(B=>{this.isValidLookup(n)||(u=B,!Bo[`${C[0]}-${B}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(u)&&(Bo[`${C[0]}-${B}`]=!0,this.logger.warn(`key "${o}" for languages "${C.join(", ")}" won't get resolved as namespace "${u}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),C.forEach(W=>{if(this.isValidLookup(n))return;p=W;const H=[g];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(H,g,W,B,r);else{let N;w&&(N=this.pluralResolver.getSuffix(W,r.count,r));const M=`${this.options.pluralSeparator}zero`,E=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(w&&(H.push(g+N),r.ordinal&&N.indexOf(E)===0&&H.push(g+N.replace(E,this.options.pluralSeparator)),k&&H.push(g+M)),S){const $=`${g}${this.options.contextSeparator}${r.context}`;H.push($),w&&(H.push($+N),r.ordinal&&N.indexOf(E)===0&&H.push($+N.replace(E,this.options.pluralSeparator)),k&&H.push($+M))}}let ee;for(;ee=H.pop();)this.isValidLookup(n)||(l=ee,n=this.getResource(W,B,ee,r))}))})}),{res:n,usedKey:o,exactUsedKey:l,usedLng:p,usedNS:u}}isValidLookup(s){return s!==void 0&&!(!this.options.returnNull&&s===null)&&!(!this.options.returnEmptyString&&s==="")}getResource(s,r,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(s,r,n,o):this.resourceStore.getResource(s,r,n,o)}getUsedParamsDetails(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=s.replace&&!ne(s.replace);let o=n?s.replace:s;if(n&&typeof s.count<"u"&&(o.count=s.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!n){o={...o};for(const l of r)delete o[l]}return o}static hasDefaultValue(s){const r="defaultValue";for(const n in s)if(Object.prototype.hasOwnProperty.call(s,n)&&r===n.substring(0,r.length)&&s[n]!==void 0)return!0;return!1}}const In=a=>a.charAt(0).toUpperCase()+a.slice(1);class Uo{constructor(s){this.options=s,this.supportedLngs=this.options.supportedLngs||!1,this.logger=$t.create("languageUtils")}getScriptPartFromCode(s){if(s=ia(s),!s||s.indexOf("-")<0)return null;const r=s.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(s){if(s=ia(s),!s||s.indexOf("-")<0)return s;const r=s.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(s){if(ne(s)&&s.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let o=Intl.getCanonicalLocales(s)[0];if(o&&this.options.lowerCaseLng&&(o=o.toLowerCase()),o)return o}catch{}const r=["hans","hant","latn","cyrl","cans","mong","arab"];let n=s.split("-");return this.options.lowerCaseLng?n=n.map(o=>o.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=In(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=In(n[1].toLowerCase())),r.indexOf(n[2].toLowerCase())>-1&&(n[2]=In(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?s.toLowerCase():s}isSupportedCode(s){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(s=this.getLanguagePartFromCode(s)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(s)>-1}getBestMatchFromCodes(s){if(!s)return null;let r;return s.forEach(n=>{if(r)return;const o=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(o))&&(r=o)}),!r&&this.options.supportedLngs&&s.forEach(n=>{if(r)return;const o=this.getLanguagePartFromCode(n);if(this.isSupportedCode(o))return r=o;r=this.options.supportedLngs.find(l=>{if(l===o)return l;if(!(l.indexOf("-")<0&&o.indexOf("-")<0)&&(l.indexOf("-")>0&&o.indexOf("-")<0&&l.substring(0,l.indexOf("-"))===o||l.indexOf(o)===0&&o.length>1))return l})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(s,r){if(!s)return[];if(typeof s=="function"&&(s=s(r)),ne(s)&&(s=[s]),Array.isArray(s))return s;if(!r)return s.default||[];let n=s[r];return n||(n=s[this.getScriptPartFromCode(r)]),n||(n=s[this.formatLanguageCode(r)]),n||(n=s[this.getLanguagePartFromCode(r)]),n||(n=s.default),n||[]}toResolveHierarchy(s,r){const n=this.getFallbackCodes(r||this.options.fallbackLng||[],s),o=[],l=p=>{p&&(this.isSupportedCode(p)?o.push(p):this.logger.warn(`rejecting language code not found in supportedLngs: ${p}`))};return ne(s)&&(s.indexOf("-")>-1||s.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&l(this.formatLanguageCode(s)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&l(this.getScriptPartFromCode(s)),this.options.load!=="currentOnly"&&l(this.getLanguagePartFromCode(s))):ne(s)&&l(this.formatLanguageCode(s)),n.forEach(p=>{o.indexOf(p)<0&&l(this.formatLanguageCode(p))}),o}}let ku=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Iu={1:a=>+(a>1),2:a=>+(a!=1),3:a=>0,4:a=>a%10==1&&a%100!=11?0:a%10>=2&&a%10<=4&&(a%100<10||a%100>=20)?1:2,5:a=>a==0?0:a==1?1:a==2?2:a%100>=3&&a%100<=10?3:a%100>=11?4:5,6:a=>a==1?0:a>=2&&a<=4?1:2,7:a=>a==1?0:a%10>=2&&a%10<=4&&(a%100<10||a%100>=20)?1:2,8:a=>a==1?0:a==2?1:a!=8&&a!=11?2:3,9:a=>+(a>=2),10:a=>a==1?0:a==2?1:a<7?2:a<11?3:4,11:a=>a==1||a==11?0:a==2||a==12?1:a>2&&a<20?2:3,12:a=>+(a%10!=1||a%100==11),13:a=>+(a!==0),14:a=>a==1?0:a==2?1:a==3?2:3,15:a=>a%10==1&&a%100!=11?0:a%10>=2&&(a%100<10||a%100>=20)?1:2,16:a=>a%10==1&&a%100!=11?0:a!==0?1:2,17:a=>a==1||a%10==1&&a%100!=11?0:1,18:a=>a==0?0:a==1?1:2,19:a=>a==1?0:a==0||a%100>1&&a%100<11?1:a%100>10&&a%100<20?2:3,20:a=>a==1?0:a==0||a%100>0&&a%100<20?1:2,21:a=>a%100==1?1:a%100==2?2:a%100==3||a%100==4?3:0,22:a=>a==1?0:a==2?1:(a<0||a>10)&&a%10==0?2:3};const Au=["v1","v2","v3"],qu=["v4"],Ko={zero:0,one:1,two:2,few:3,many:4,other:5},Cu=()=>{const a={};return ku.forEach(s=>{s.lngs.forEach(r=>{a[r]={numbers:s.nr,plurals:Iu[s.fc]}})}),a};class Su{constructor(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=s,this.options=r,this.logger=$t.create("pluralResolver"),(!this.options.compatibilityJSON||qu.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Cu(),this.pluralRulesCache={}}addRule(s,r){this.rules[s]=r}clearCache(){this.pluralRulesCache={}}getRule(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const n=ia(s==="dev"?"en":s),o=r.ordinal?"ordinal":"cardinal",l=JSON.stringify({cleanedCode:n,type:o});if(l in this.pluralRulesCache)return this.pluralRulesCache[l];const p=new Intl.PluralRules(n,{type:o});return this.pluralRulesCache[l]=p,p}catch{return}return this.rules[s]||this.rules[this.languageUtils.getLanguagePartFromCode(s)]}needsPlural(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(s,r);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(s,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(s,n).map(o=>`${r}${o}`)}getSuffixes(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(s,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((o,l)=>Ko[o]-Ko[l]).map(o=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o}`):n.numbers.map(o=>this.getSuffix(s,o,r)):[]}getSuffix(s,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(s,n);return o?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o.select(r)}`:this.getSuffixRetroCompatible(o,r):(this.logger.warn(`no plural rule found for: ${s}`),"")}getSuffixRetroCompatible(s,r){const n=s.noAbs?s.plurals(r):s.plurals(Math.abs(r));let o=s.numbers[n];this.options.simplifyPluralSuffix&&s.numbers.length===2&&s.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));const l=()=>this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString();return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?`_plural_${o.toString()}`:l():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&s.numbers.length===2&&s.numbers[0]===1?l():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!Au.includes(this.options.compatibilityJSON)}}const $o=function(a,s,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,l=gu(a,s,r);return!l&&o&&ne(r)&&(l=kn(a,r,n),l===void 0&&(l=kn(s,r,n))),l},An=a=>a.replace(/\$/g,"$$$$");class zu{constructor(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=$t.create("interpolator"),this.options=s,this.format=s.interpolation&&s.interpolation.format||(r=>r),this.init(s)}init(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};s.interpolation||(s.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:o,prefix:l,prefixEscaped:p,suffix:u,suffixEscaped:m,formatSeparator:_,unescapeSuffix:g,unescapePrefix:h,nestingPrefix:w,nestingPrefixEscaped:k,nestingSuffix:S,nestingSuffixEscaped:C,nestingOptionsSeparator:B,maxReplaces:W,alwaysFormat:H}=s.interpolation;this.escape=r!==void 0?r:xu,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=l?Fs(l):p||"{{",this.suffix=u?Fs(u):m||"}}",this.formatSeparator=_||",",this.unescapePrefix=g?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":g||"",this.nestingPrefix=w?Fs(w):k||Fs("$t("),this.nestingSuffix=S?Fs(S):C||Fs(")"),this.nestingOptionsSeparator=B||",",this.maxReplaces=W||1e3,this.alwaysFormat=H!==void 0?H:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const s=(r,n)=>r&&r.source===n?(r.lastIndex=0,r):new RegExp(n,"g");this.regexp=s(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=s(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=s(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(s,r,n,o){let l,p,u;const m=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},_=k=>{if(k.indexOf(this.formatSeparator)<0){const W=$o(r,m,k,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(W,void 0,n,{...o,...r,interpolationkey:k}):W}const S=k.split(this.formatSeparator),C=S.shift().trim(),B=S.join(this.formatSeparator).trim();return this.format($o(r,m,C,this.options.keySeparator,this.options.ignoreJSONStructure),B,n,{...o,...r,interpolationkey:C})};this.resetRegExp();const g=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,h=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:k=>An(k)},{regex:this.regexp,safeValue:k=>this.escapeValue?An(this.escape(k)):An(k)}].forEach(k=>{for(u=0;l=k.regex.exec(s);){const S=l[1].trim();if(p=_(S),p===void 0)if(typeof g=="function"){const B=g(s,l,o);p=ne(B)?B:""}else if(o&&Object.prototype.hasOwnProperty.call(o,S))p="";else if(h){p=l[0];continue}else this.logger.warn(`missed to pass in variable ${S} for interpolating ${s}`),p="";else!ne(p)&&!this.useRawValueToEscape&&(p=Eo(p));const C=k.safeValue(p);if(s=s.replace(l[0],C),h?(k.regex.lastIndex+=p.length,k.regex.lastIndex-=l[0].length):k.regex.lastIndex=0,u++,u>=this.maxReplaces)break}}),s}nest(s,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,l,p;const u=(m,_)=>{const g=this.nestingOptionsSeparator;if(m.indexOf(g)<0)return m;const h=m.split(new RegExp(`${g}[ ]*{`));let w=`{${h[1]}`;m=h[0],w=this.interpolate(w,p);const k=w.match(/'/g),S=w.match(/"/g);(k&&k.length%2===0&&!S||S.length%2!==0)&&(w=w.replace(/'/g,'"'));try{p=JSON.parse(w),_&&(p={..._,...p})}catch(C){return this.logger.warn(`failed parsing options string in nesting for key ${m}`,C),`${m}${g}${w}`}return p.defaultValue&&p.defaultValue.indexOf(this.prefix)>-1&&delete p.defaultValue,m};for(;o=this.nestingRegexp.exec(s);){let m=[];p={...n},p=p.replace&&!ne(p.replace)?p.replace:p,p.applyPostProcessor=!1,delete p.defaultValue;let _=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const g=o[1].split(this.formatSeparator).map(h=>h.trim());o[1]=g.shift(),m=g,_=!0}if(l=r(u.call(this,o[1].trim(),p),p),l&&o[0]===s&&!ne(l))return l;ne(l)||(l=Eo(l)),l||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${s}`),l=""),_&&(l=m.reduce((g,h)=>this.format(g,h,n.lng,{...n,interpolationkey:o[1].trim()}),l.trim())),s=s.replace(o[0],l),this.regexp.lastIndex=0}return s}}const Nu=a=>{let s=a.toLowerCase().trim();const r={};if(a.indexOf("(")>-1){const n=a.split("(");s=n[0].toLowerCase().trim();const o=n[1].substring(0,n[1].length-1);s==="currency"&&o.indexOf(":")<0?r.currency||(r.currency=o.trim()):s==="relativetime"&&o.indexOf(":")<0?r.range||(r.range=o.trim()):o.split(";").forEach(p=>{if(p){const[u,...m]=p.split(":"),_=m.join(":").trim().replace(/^'+|'+$/g,""),g=u.trim();r[g]||(r[g]=_),_==="false"&&(r[g]=!1),_==="true"&&(r[g]=!0),isNaN(_)||(r[g]=parseInt(_,10))}})}return{formatName:s,formatOptions:r}},Bs=a=>{const s={};return(r,n,o)=>{let l=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(l={...l,[o.interpolationkey]:void 0});const p=n+JSON.stringify(l);let u=s[p];return u||(u=a(ia(n),o),s[p]=u),u(r)}};class Eu{constructor(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=$t.create("formatter"),this.options=s,this.formats={number:Bs((r,n)=>{const o=new Intl.NumberFormat(r,{...n});return l=>o.format(l)}),currency:Bs((r,n)=>{const o=new Intl.NumberFormat(r,{...n,style:"currency"});return l=>o.format(l)}),datetime:Bs((r,n)=>{const o=new Intl.DateTimeFormat(r,{...n});return l=>o.format(l)}),relativetime:Bs((r,n)=>{const o=new Intl.RelativeTimeFormat(r,{...n});return l=>o.format(l,n.range||"day")}),list:Bs((r,n)=>{const o=new Intl.ListFormat(r,{...n});return l=>o.format(l)})},this.init(s)}init(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=r.interpolation.formatSeparator||","}add(s,r){this.formats[s.toLowerCase().trim()]=r}addCached(s,r){this.formats[s.toLowerCase().trim()]=Bs(r)}format(s,r,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const l=r.split(this.formatSeparator);if(l.length>1&&l[0].indexOf("(")>1&&l[0].indexOf(")")<0&&l.find(u=>u.indexOf(")")>-1)){const u=l.findIndex(m=>m.indexOf(")")>-1);l[0]=[l[0],...l.splice(1,u)].join(this.formatSeparator)}return l.reduce((u,m)=>{const{formatName:_,formatOptions:g}=Nu(m);if(this.formats[_]){let h=u;try{const w=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},k=w.locale||w.lng||o.locale||o.lng||n;h=this.formats[_](u,k,{...g,...o,...w})}catch(w){this.logger.warn(w)}return h}else this.logger.warn(`there was no format function for ${_}`);return u},s)}}const Lu=(a,s)=>{a.pending[s]!==void 0&&(delete a.pending[s],a.pendingCount--)};class Ou extends la{constructor(s,r,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=s,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=o,this.logger=$t.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,o.backend,o)}queueLoad(s,r,n,o){const l={},p={},u={},m={};return s.forEach(_=>{let g=!0;r.forEach(h=>{const w=`${_}|${h}`;!n.reload&&this.store.hasResourceBundle(_,h)?this.state[w]=2:this.state[w]<0||(this.state[w]===1?p[w]===void 0&&(p[w]=!0):(this.state[w]=1,g=!1,p[w]===void 0&&(p[w]=!0),l[w]===void 0&&(l[w]=!0),m[h]===void 0&&(m[h]=!0)))}),g||(u[_]=!0)}),(Object.keys(l).length||Object.keys(p).length)&&this.queue.push({pending:p,pendingCount:Object.keys(p).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(l),pending:Object.keys(p),toLoadLanguages:Object.keys(u),toLoadNamespaces:Object.keys(m)}}loaded(s,r,n){const o=s.split("|"),l=o[0],p=o[1];r&&this.emit("failedLoading",l,p,r),!r&&n&&this.store.addResourceBundle(l,p,n,void 0,void 0,{skipCopy:!0}),this.state[s]=r?-1:2,r&&n&&(this.state[s]=0);const u={};this.queue.forEach(m=>{fu(m.loaded,[l],p),Lu(m,s),r&&m.errors.push(r),m.pendingCount===0&&!m.done&&(Object.keys(m.loaded).forEach(_=>{u[_]||(u[_]={});const g=m.loaded[_];g.length&&g.forEach(h=>{u[_][h]===void 0&&(u[_][h]=!0)})}),m.done=!0,m.errors.length?m.callback(m.errors):m.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(m=>!m.done)}read(s,r,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,p=arguments.length>5?arguments[5]:void 0;if(!s.length)return p(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:s,ns:r,fcName:n,tried:o,wait:l,callback:p});return}this.readingCalls++;const u=(_,g)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(_&&g&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,s,r,n,o+1,l*2,p)},l);return}p(_,g)},m=this.backend[n].bind(this.backend);if(m.length===2){try{const _=m(s,r);_&&typeof _.then=="function"?_.then(g=>u(null,g)).catch(u):u(null,_)}catch(_){u(_)}return}return m(s,r,u)}prepareLoading(s,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();ne(s)&&(s=this.languageUtils.toResolveHierarchy(s)),ne(r)&&(r=[r]);const l=this.queueLoad(s,r,n,o);if(!l.toLoad.length)return l.pending.length||o(),null;l.toLoad.forEach(p=>{this.loadOne(p)})}load(s,r,n){this.prepareLoading(s,r,{},n)}reload(s,r,n){this.prepareLoading(s,r,{reload:!0},n)}loadOne(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=s.split("|"),o=n[0],l=n[1];this.read(o,l,"read",void 0,void 0,(p,u)=>{p&&this.logger.warn(`${r}loading namespace ${l} for language ${o} failed`,p),!p&&u&&this.logger.log(`${r}loaded namespace ${l} for language ${o}`,u),this.loaded(s,p,u)})}saveMissing(s,r,n,o,l){let p=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},u=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${n}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend&&this.backend.create){const m={...p,isUpdate:l},_=this.backend.create.bind(this.backend);if(_.length<6)try{let g;_.length===5?g=_(s,r,n,o,m):g=_(s,r,n,o),g&&typeof g.then=="function"?g.then(h=>u(null,h)).catch(u):u(null,g)}catch(g){u(g)}else _(s,r,n,o,u,m)}!s||!s[0]||this.store.addResource(s[0],r,n,o)}}}const jo=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:a=>{let s={};if(typeof a[1]=="object"&&(s=a[1]),ne(a[1])&&(s.defaultValue=a[1]),ne(a[2])&&(s.tDescription=a[2]),typeof a[2]=="object"||typeof a[3]=="object"){const r=a[3]||a[2];Object.keys(r).forEach(n=>{s[n]=r[n]})}return s},interpolation:{escapeValue:!0,format:a=>a,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Ho=a=>(ne(a.ns)&&(a.ns=[a.ns]),ne(a.fallbackLng)&&(a.fallbackLng=[a.fallbackLng]),ne(a.fallbackNS)&&(a.fallbackNS=[a.fallbackNS]),a.supportedLngs&&a.supportedLngs.indexOf("cimode")<0&&(a.supportedLngs=a.supportedLngs.concat(["cimode"])),a),pa=()=>{},Pu=a=>{Object.getOwnPropertyNames(Object.getPrototypeOf(a)).forEach(r=>{typeof a[r]=="function"&&(a[r]=a[r].bind(a))})};class wr extends la{constructor(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Ho(s),this.services={},this.logger=$t,this.modules={external:[]},Pu(this),r&&!this.isInitialized&&!s.isClone){if(!this.options.initImmediate)return this.init(s,r),this;setTimeout(()=>{this.init(s,r)},0)}}init(){var s=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(n=r,r={}),!r.defaultNS&&r.defaultNS!==!1&&r.ns&&(ne(r.ns)?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const o=jo();this.options={...o,...this.options,...Ho(r)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);const l=g=>g?typeof g=="function"?new g:g:null;if(!this.options.isClone){this.modules.logger?$t.init(l(this.modules.logger),this.options):$t.init(null,this.options);let g;this.modules.formatter?g=this.modules.formatter:typeof Intl<"u"&&(g=Eu);const h=new Uo(this.options);this.store=new Ro(this.options.resources,this.options);const w=this.services;w.logger=$t,w.resourceStore=this.store,w.languageUtils=h,w.pluralResolver=new Su(h,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),g&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(w.formatter=l(g),w.formatter.init(w,this.options),this.options.interpolation.format=w.formatter.format.bind(w.formatter)),w.interpolator=new zu(this.options),w.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},w.backendConnector=new Ou(l(this.modules.backend),w.resourceStore,w,this.options),w.backendConnector.on("*",function(k){for(var S=arguments.length,C=new Array(S>1?S-1:0),B=1;B<S;B++)C[B-1]=arguments[B];s.emit(k,...C)}),this.modules.languageDetector&&(w.languageDetector=l(this.modules.languageDetector),w.languageDetector.init&&w.languageDetector.init(w,this.options.detection,this.options)),this.modules.i18nFormat&&(w.i18nFormat=l(this.modules.i18nFormat),w.i18nFormat.init&&w.i18nFormat.init(this)),this.translator=new ca(this.services,this.options),this.translator.on("*",function(k){for(var S=arguments.length,C=new Array(S>1?S-1:0),B=1;B<S;B++)C[B-1]=arguments[B];s.emit(k,...C)}),this.modules.external.forEach(k=>{k.init&&k.init(this)})}if(this.format=this.options.interpolation.format,n||(n=pa),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const g=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);g.length>0&&g[0]!=="dev"&&(this.options.lng=g[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(g=>{this[g]=function(){return s.store[g](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(g=>{this[g]=function(){return s.store[g](...arguments),s}});const m=xr(),_=()=>{const g=(h,w)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),m.resolve(w),n(h,w)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return g(null,this.t.bind(this));this.changeLanguage(this.options.lng,g)};return this.options.resources||!this.options.initImmediate?_():setTimeout(_,0),m}loadResources(s){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pa;const o=ne(s)?s:this.language;if(typeof s=="function"&&(n=s),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const l=[],p=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(_=>{_!=="cimode"&&l.indexOf(_)<0&&l.push(_)})};o?p(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(m=>p(m)),this.options.preload&&this.options.preload.forEach(u=>p(u)),this.services.backendConnector.load(l,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(u)})}else n(null)}reloadResources(s,r,n){const o=xr();return typeof s=="function"&&(n=s,s=void 0),typeof r=="function"&&(n=r,r=void 0),s||(s=this.languages),r||(r=this.options.ns),n||(n=pa),this.services.backendConnector.reload(s,r,l=>{o.resolve(),n(l)}),o}use(s){if(!s)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!s.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return s.type==="backend"&&(this.modules.backend=s),(s.type==="logger"||s.log&&s.warn&&s.error)&&(this.modules.logger=s),s.type==="languageDetector"&&(this.modules.languageDetector=s),s.type==="i18nFormat"&&(this.modules.i18nFormat=s),s.type==="postProcessor"&&Fo.addPostProcessor(s),s.type==="formatter"&&(this.modules.formatter=s),s.type==="3rdParty"&&this.modules.external.push(s),this}setResolvedLanguage(s){if(!(!s||!this.languages)&&!(["cimode","dev"].indexOf(s)>-1))for(let r=0;r<this.languages.length;r++){const n=this.languages[r];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(s,r){var n=this;this.isLanguageChangingTo=s;const o=xr();this.emit("languageChanging",s);const l=m=>{this.language=m,this.languages=this.services.languageUtils.toResolveHierarchy(m),this.resolvedLanguage=void 0,this.setResolvedLanguage(m)},p=(m,_)=>{_?(l(_),this.translator.changeLanguage(_),this.isLanguageChangingTo=void 0,this.emit("languageChanged",_),this.logger.log("languageChanged",_)):this.isLanguageChangingTo=void 0,o.resolve(function(){return n.t(...arguments)}),r&&r(m,function(){return n.t(...arguments)})},u=m=>{!s&&!m&&this.services.languageDetector&&(m=[]);const _=ne(m)?m:this.services.languageUtils.getBestMatchFromCodes(m);_&&(this.language||l(_),this.translator.language||this.translator.changeLanguage(_),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(_)),this.loadResources(_,g=>{p(g,_)})};return!s&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!s&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(s),o}getFixedT(s,r,n){var o=this;const l=function(p,u){let m;if(typeof u!="object"){for(var _=arguments.length,g=new Array(_>2?_-2:0),h=2;h<_;h++)g[h-2]=arguments[h];m=o.options.overloadTranslationOptionHandler([p,u].concat(g))}else m={...u};m.lng=m.lng||l.lng,m.lngs=m.lngs||l.lngs,m.ns=m.ns||l.ns,m.keyPrefix!==""&&(m.keyPrefix=m.keyPrefix||n||l.keyPrefix);const w=o.options.keySeparator||".";let k;return m.keyPrefix&&Array.isArray(p)?k=p.map(S=>`${m.keyPrefix}${w}${S}`):k=m.keyPrefix?`${m.keyPrefix}${w}${p}`:p,o.t(k,m)};return ne(s)?l.lng=s:l.lngs=s,l.ns=r,l.keyPrefix=n,l}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(s){this.options.defaultNS=s}hasLoadedNamespace(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=r.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,l=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const p=(u,m)=>{const _=this.services.backendConnector.state[`${u}|${m}`];return _===-1||_===0||_===2};if(r.precheck){const u=r.precheck(this,p);if(u!==void 0)return u}return!!(this.hasResourceBundle(n,s)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||p(n,s)&&(!o||p(l,s)))}loadNamespaces(s,r){const n=xr();return this.options.ns?(ne(s)&&(s=[s]),s.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{n.resolve(),r&&r(o)}),n):(r&&r(),Promise.resolve())}loadLanguages(s,r){const n=xr();ne(s)&&(s=[s]);const o=this.options.preload||[],l=s.filter(p=>o.indexOf(p)<0&&this.services.languageUtils.isSupportedCode(p));return l.length?(this.options.preload=o.concat(l),this.loadResources(p=>{n.resolve(),r&&r(p)}),n):(r&&r(),Promise.resolve())}dir(s){if(s||(s=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!s)return"rtl";const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services&&this.services.languageUtils||new Uo(jo());return r.indexOf(n.getLanguagePartFromCode(s))>-1||s.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new wr(s,r)}cloneInstance(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pa;const n=s.forkResourceStore;n&&delete s.forkResourceStore;const o={...this.options,...s,isClone:!0},l=new wr(o);return(s.debug!==void 0||s.prefix!==void 0)&&(l.logger=l.logger.clone(s)),["store","services","language"].forEach(u=>{l[u]=this[u]}),l.services={...this.services},l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},n&&(l.store=new Ro(this.store.data,o),l.services.resourceStore=l.store),l.translator=new ca(l.services,o),l.translator.on("*",function(u){for(var m=arguments.length,_=new Array(m>1?m-1:0),g=1;g<m;g++)_[g-1]=arguments[g];l.emit(u,..._)}),l.init(o,r),l.translator.options=o,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Se=wr.createInstance();Se.createInstance=wr.createInstance,Se.createInstance,Se.dir,Se.init,Se.loadResources,Se.reloadResources,Se.use,Se.changeLanguage,Se.getFixedT,Se.t,Se.exists,Se.setDefaultNamespace,Se.hasLoadedNamespace,Se.loadNamespaces,Se.loadLanguages;const{t:Dt}=Se;function Mu(a){return a.replace(/<.*>/,"")}class Ru{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(s){return`**${s}**`}italic(s){return`*${s.replace(">","&gt;").replace("<","&lt;")}*`}pineCode(s){return`\`\`\`
110
110
  ${s}
111
- \`\`\``}code(s){return`\`${s}\``}paragraph(...s){return[this.paragraphBreak,...s,this.paragraphBreak].join(this.lineBreak)}link(s,r){return`[${s}](${r.href})`}}const ce=new Ru;function Fu(a){const{name:s,libraryName:r,desc:n}=a,o=[`${ce.bold(s||r)} (${Ho("library")})`];return o.push(ce.delimiter),n&&o.push(ce.paragraph(ce.bold(ot.Description),ce.lineBreak,n)),o.join(o.length===2?" ":ce.lineBreak)}function Bu(a,s=0,r=!0){const n=a[s];if(!n)return"";if(n.isEnumMember)return`${ce.bold(n.name)} (${Ho("enum member")})${n.value===void 0?"":` = ${n.value}`}`;const o=/(Mac|iPhone|iPod|iPad)/i.test(window.navigator.userAgent),{name:l,title:p,desc:u,type:m,syntax:_,returns:g,remarks:h,fields:w,members:k}=n,S=[`${ce.bold(l)} (${p})`];if(a.length>1&&S.push(ce.italic(`+${a.length-1} overloads`)),S.push(ce.delimiter),u&&S.push(ce.paragraph(Array.isArray(u)?u.join(ce.lineBreak):u||"")),m&&S.push(ce.paragraph(ce.bold(ot.Type),ce.italic(m))),_&&_.length&&S.push(ce.paragraph(ce.bold(ot.Syntax),ce.pineCode(_.join(ce.lineBreak)))),g&&S.push(ce.paragraph(ce.bold(ot.Returns),ce.lineBreak,g.join(ce.lineBreak))),h&&h.length&&a.length<=1){let C="";typeof h=="string"?C=h:C=h.join(ce.lineBreak)||"",C.length<200&&S.push(ce.paragraph(ce.bold(ot.Remarks),ce.lineBreak,C))}if(w){const C=[];for(const B of w){const W=B.desc?` - ${B.desc}`:"";C.push(`${B.name} (${B.type})${W}`)}S.push(ce.paragraph(ce.bold(ot.Fields),ce.lineBreak,C.join(ce.paragraphBreak)))}if(k){const C=[];for(const B of k){const W=B.desc?` - ${B.desc}`:"";C.push(`${B.name}${B.value?` (${B.value})`:""}${W}`)}S.push(ce.paragraph(ce.bold(ot.EnumMembers),ce.lineBreak,C.join(ce.paragraphBreak)))}return r&&S.push(ce.italic(`${ce.code(o?"⌘":"Ctrl")} + ${du.clickOnKeywordForMoreHelp}`)),S.join(S.length===2?" ":ce.lineBreak)}const An="tcc_cursor_position",Uu=["submenuitem.EditorContextPeek","editor.action.peekDefinition"];function Ku(a){return a.replace(/<[^<>]+>/,"").replace(/(series|simple|const|input)\s+([\w\d.]+)/,"$2").replace(/\w[\w.\d]*\[\]/,"array")}function $u(a){const s=a.getContribution("editor.contrib.contextmenu"),r=s==null?void 0:s._getMenuActions;s._getMenuActions=function(){return r.apply(s,arguments).filter(function(o){return!Uu.includes(o.id)})}}const{t:Me}=Se;class ju{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=ce,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(s){this._nextIsBracket=s}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(s){return this._funcArgsCache.get(s)||this._userFuncArgsCache.get(s)}getSuggestions(s){return s?this._namespaceCache.get(s)||this._userNamespaceCache.get(s):this._suggestions.concat(this._userSuggestions)}_initUserDefind(){this._userFuncArgsCache.clear(),this._userNamespaceCache.clear(),this._userOutermostNsItems.clear(),this._methodNamespaceCache.clear(),this._methodFuncs.clear()}setUserDefind(s,r,n,o,l){this._initUserDefind();const p=this._mergeTreeSlices(this._generateTreeSlice(_t.methods,"method"),this._generateTreeSlice(o,"method"));this._getMethodNamespaceCache(p),this._userMethods=o,this._userTypes=r,this._userFunctions=s,this._userEnums=l;const u=this._generateTreeSlice(s,"fun");this._userSuggestions=this._getAllUserCompletionItems(u,this._generateTreeSlice(r,"type"),this._generateTreeSlice(n,"var"),this._generateTreeSlice(l,"enum")),this._getUserFuncArgumentsCompletionItemsToCache(u)}_getAllUserCompletionItems(s,r,n,o){const l=this._getEnumCompletionItems(o),p=this._getUserVariableCompletionItems(n),u=this._getTypeCompletionItems(r,!0),m=this._getFunctionCompletionItems(s,void 0,!0);return[...u,...m,...p,...l,...this._userOutermostNsItems.values()]}_getAllCompletionItems(){const{variables:s,keywords:r,types:n,functions:o}=this._builtinSubtreeCache,l=this._getVariableCompletionItems(s),p=this._getKeywordCompletionItems(r),u=this._getTypeCompletionItems(n),m=this._getFunctionCompletionItems(o),_=this._getSnippetsCompletionsList();return[...l,...p,...u,...m,...this._outermostNsItems.values(),..._]}_getNodeKey(s,r){return`${r}_${s}`}_mergeTreeSlices(...s){const r=new Map;for(const n of s)for(const[o,l]of n){const p=r.get(o);p?r.set(o,{...p,children:this._mergeTreeSlices(l.children,p.children)}):r.set(o,l)}return r}_mergeCompletions(s,r){const n=this._namespaceCache.get(s);n?this._namespaceCache.set(s,[...n,...r]):this._namespaceCache.set(s,r)}_mergeUserCompletions(s,r){const n=this._userNamespaceCache.get(s);n?this._userNamespaceCache.set(s,[...n,...r]):this._userNamespaceCache.set(s,r)}_generateTreeSlice(s,r){const n=new Map;for(const[o,l]of s){const[p,...u]=o.split("."),m=u.length>0,_=n.get(this._getNodeKey(p,m?"ns":r));let g=new Map,h=l.map(k=>({...k,name:o})),w=this._getNodeKey(o,r);if(m&&r!=="type"){const k=new Map([[u.join("."),l]]);h=[{name:p,title:we.namespace}],w=this._getNodeKey(p,"ns"),g=this._generateTreeSlice(k,r)}_&&(h=[{name:p,title:we.namespace}],g=this._mergeTreeSlices(_.children,g)),n.set(w,{value:h,children:g})}return n}_getBuiltinsCacheFragment(){const{keywords:s,variables:r,constants:n,types:o,functions:l,annotations:p}=_t,u=this._generateTreeSlice(p,"an");return u.delete("an_@version="),this._builtinSubtreeCache={keywords:this._generateTreeSlice(s,"key"),variables:this._mergeTreeSlices(this._generateTreeSlice(r,"var"),this._generateTreeSlice(n,"var")),types:this._generateTreeSlice(o,"type"),functions:this._generateTreeSlice(l,"fun"),annotations:u},this._builtinSubtreeCache}_getVariableCompletionItems(s,r){const n=[],o=[];for(const[l,p]of s){const{value:u,children:m}=p;if(l.startsWith("ns")){const _=this._getNamespaceCompletionItem(u[0]);if(r){o.push({..._});const h=`${r}.${_.label}`;_.label=h,_.insertText=h}const g=this._getVariableCompletionItems(m,_.label);r||this._outermostNsItems.set(l,_),n.push(...g)}else{const _=this._getVariableCompletionItem(u[0],r?3:2);if(r){o.push({..._});const{label:g}=_;_.label=`${r}.${g}`,_.insertText=`${r}.${_.insertText}`,_.filterText=`${g}\r`}n.push(_)}}return o.length&&r&&this._mergeCompletions(r,o),n}_setUserVariableSubItems(s,r){var _,g,h,w;let n=[];const o=Ku(s.type||""),l=this._methodNamespaceCache.get(o),p=r?`${r}.${s.name}`:s.name;l&&(n=l.filter(k=>{var W;const S=`${o}.${k.label}`,C=_t.methods.get(S)||this._userMethods.get(S),B=C==null?void 0:C.some(H=>!H.thisType||H.thisType[0].includes("<>")||H.thisType.includes(s.type||""));if(B&&C){const H=this._getNamedArgumentsCompletionList(((W=C[0])==null?void 0:W.args)||[]),ee=`${p}.${k.label}`;this._userFuncArgsCache.set(ee,H),this._methodFuncs.set(ee,C)}return B}));const{types:u}=_t,m=((g=(_=this._userTypes.get(o))==null?void 0:_[0])==null?void 0:g.fields)||((w=(h=u.get(o))==null?void 0:h[0])==null?void 0:w.fields);if(m)for(const k of m){const S=k.name,C=k.type,B=this._getInstanceTypeCompletionItemProp({name:S,type:C,desc:k.desc?[k.desc]:void 0});this._setUserVariableSubItems({name:S,type:C},s.name),n.push({...B})}n.length&&this._mergeUserCompletions(p,n)}_getUserVariableCompletionItems(s,r){const n=[],o=[];for(const[l,p]of s){const{value:u,children:m}=p;if(this._setUserVariableSubItems(u[0]),l.startsWith("ns")){const _=this._getNamespaceCompletionItem(u[0]);if(r){o.push({..._});const h=`${r}.${_.label}`;_.label=h,_.insertText=h}const g=this._getUserVariableCompletionItems(m,_.label);r||this._userOutermostNsItems.set(l,_),n.push(...g)}else{const _=this._getVariableCompletionItem(u[0],r?2:1,!1);if(r){o.push({..._});const{label:g}=_;_.label=`${r}.${g}`,_.insertText=`${r}.${_.insertText}`,_.filterText=`${g}\r`}n.push(_)}}return o.length&&r&&this._mergeUserCompletions(r,o),n}_getTypeCompletionItems(s,r=!1){const n=[];for(const[,o]of s){const{value:l}=o,p=r?this._getCustomTypeCompletionItem(l[0]):this._getTypeCompletionItem(l[0]);n.push(p)}return n}_getEnumCompletionItems(s){const r=[];for(const[,n]of s){const{value:o}=n,l=this._getEnumCompletionItem(o[0]);r.push(l);const p=o[0].members;p!=null&&p.length&&this._getEnumMemberCompletionItems(o[0].name,p)}return r}_getEnumMemberCompletionItems(s,r){const n=[];for(const o of r){const{name:l,desc:p,value:u}=o,m=this._getEnumMemberCompletionItem({name:l,desc:p?[p]:void 0,value:u});n.push(m)}n.length&&this._mergeUserCompletions(s,n)}_getAnnotationCompletionItems(s){const r=[];for(const[,n]of s){const{value:o}=n,l=this._getAnnotationCompletionItem(o[0]);r.push(l)}return r}_getKeywordCompletionItems(s){const r=[];for(const[,n]of s){const{value:o}=n,l=this._getKeywordCompletionItem(o[0]);r.push(l)}return r}_getMethodNamespaceCache(s,r){const n=[];for(const[o,l]of s){const{value:p,children:u}=l;if(o.startsWith("ns")){const m=this._getNamespaceCompletionItem(p[0]);if(r){n.push({...m});const _=`${r}.${m.label}`;m.label=_,m.insertText=_}this._getMethodNamespaceCache(u,m.label)}else{const m=this._getFunctionCompletionItem(p[0],r?3:2);if(p.length>1&&(m.detail=`${m.detail} (+${p.length-1} overloads)`),r){n.push({...m});const{label:_}=m;m.label=`${r}.${_}`,m.insertText=`${r}.${m.insertText}`,m.originInsertText=`${r}.${m.originInsertText}`,m.filterText=`${_}\r`}}}r&&this._methodNamespaceCache.set(r,n)}_getFunctionCompletionItems(s,r,n=!1){const o=[],l=[];for(const[p,u]of s){const{value:m,children:_}=u;if(p.startsWith("ns")){const g=this._getNamespaceCompletionItem(m[0]);if(r){l.push({...g});const w=`${r}.${g.label}`;g.label=w,g.insertText=w}const h=this._getFunctionCompletionItems(_,g.label,n);r||(n?this._userOutermostNsItems.set(p,g):this._outermostNsItems.set(p,g)),o.push(...h)}else{const g=this._getFunctionCompletionItem(m[0],r?3:2,!n);if(m.length>1&&(g.detail=`${g.detail} (+${m.length-1} overloads)`),r){l.push({...g});const{label:h}=g;g.label=`${r}.${h}`,g.insertText=`${r}.${g.insertText}`,g.originInsertText=`${r}.${g.originInsertText}`,g.filterText=`${h}\r`}o.push(g)}}return l.length&&r&&(n?this._mergeUserCompletions(r,l):this._mergeCompletions(r,l)),o}_getSnippetsCompletionsList(){return pu.map(s=>{const{label:r,kind:n,insertText:o}=s,l=r.charAt(0).toUpperCase()+r.substring(1),p={value:this._formatter.pineCode(o.replace(/\${\d:([^}]+)}|\${\d}/g,"$1"))};return{label:r,detail:`(${l} ${Me(n)})`,insertText:o,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,sortText:`2_${r}`,kind:qe.languages.CompletionItemKind.Snippet,documentation:p}})}_getFuncArgumentsCompletionItemsToCache(s,r){for(const[n,o]of s){const{name:l}=o.value[0];if(n.startsWith("ns"))this._getFuncArgumentsCompletionItemsToCache(o.children,r?`${r}.${l}`:l);else{const p=new Map;o.value.reduce((_,g)=>{const h=g.args;return h&&h.length&&h.forEach(w=>{_.set(w.name,w)}),_},p);const u=this._getNamedArgumentsCompletionList([...p.values()]),m=r?`${r}.${l}`:l;this._funcArgsCache.set(m,u)}}}_getUserFuncArgumentsCompletionItemsToCache(s,r){for(const[n,o]of s){const{name:l}=o.value[0];if(n.startsWith("ns"))this._getUserFuncArgumentsCompletionItemsToCache(o.children,r?`${r}.${l}`:l);else{const p=new Map;o.value.reduce((_,g)=>{const h=g.args;return h&&h.length&&h.forEach(w=>{_.set(w.name,w)}),_},p);const u=this._getNamedArgumentsCompletionList([...p.values()]),m=r?`${r}.${l}`:l;this._userFuncArgsCache.set(m,u)}}}_getNamedArgumentsCompletionList(s){return s.map(r=>{const{name:n,desc:o,displayType:l}=r,p=`${n} = `,u=Array.isArray(o)?o.join(this._formatter.delimiter):o||"";return{label:p,documentation:{value:this._formatter.paragraph(this._formatter.bold(Me(we.Description)),this._formatter.lineBreak,u)},insertText:p,detail:`(${Me(we.parameter)}) ${Me(we.types)} ${l}`,kind:qe.languages.CompletionItemKind.Text,sortText:`0_${p}`}})}_getVariableCompletionItem(s,r=2,n=!0){const o=this._extractExamples(s),l=this._extractDescription(s),p=[this._createDescriptionSection(l)];o.length?p.push(this._createExampleSection(o)):s.syntax&&s.syntax.length&&p.push(this._createSyntaxSection(s.syntax));const u={value:p.join(this._formatter.lineBreak)},m=Me(n?we.variables:we.userDefinedVariable);return{documentation:u,label:s.name,insertText:s.name,kind:qe.languages.CompletionItemKind.Variable,sortText:`${r}_${s.name}`,detail:`(${m}) ${s.type}`}}_getKeywordCompletionItem(s,r=2){const n=this._extractExamples(s),o=this._extractDescription(s),l=[this._createDescriptionSection(o)];return n.length?l.push(this._createExampleSection(n)):s.syntax&&s.syntax.length&&l.push(this._createSyntaxSection(s.syntax)),{documentation:{value:l.join(this._formatter.lineBreak)},label:s.name,insertText:s.name,kind:qe.languages.CompletionItemKind.Keyword,sortText:`${r}_${s.name}`,detail:`(${Me(we.keywords)})`}}_getTypeCompletionItem(s){const r=this._extractDescription(s);return{documentation:{value:this._createDescriptionSection(r)},label:s.name,insertText:s.name,kind:qe.languages.CompletionItemKind.Keyword,sortText:`1_${s.name}`,detail:`(${Me(we.types)})`}}_getCustomTypeCompletionItem(s){const r=this._extractDescription(s);return{documentation:{value:this._createDescriptionSection(r)},label:s.name,insertText:s.name,kind:qe.languages.CompletionItemKind.Keyword,sortText:`2_${s.name}`,detail:`(${Me(we.userDefinedType)})`}}_getEnumCompletionItem(s){const r=this._extractDescription(s);return{documentation:{value:this._createDescriptionSection(r)},label:s.name,insertText:s.name,kind:qe.languages.CompletionItemKind.Enum,sortText:`2_${s.name}`,detail:`(${Me(we.enum)})`}}_getEnumMemberCompletionItem(s){const r=this._extractDescription(s);return{documentation:{value:this._createDescriptionSection(r)},label:s.name,insertText:s.name,kind:qe.languages.CompletionItemKind.EnumMember,sortText:`2_${s.name}`,detail:`(${Me("enum member")}) ${s.value?`${s.name} = ${s.value}`:`${s.name}`}`}}_getInstanceTypeCompletionItemProp(s){const r=this._extractDescription(s),n=[];return r&&n.push(this._formatter.paragraph(this._formatter.bold(Me(ot.Description)),this._formatter.lineBreak,r)),{documentation:{value:n.join(this._formatter.lineBreak)},label:s.name,insertText:s.name,kind:qe.languages.CompletionItemKind.Field,sortText:`2_${s.name}`,detail:`(${Me(we.field)}) ${s.type}`}}_getFunctionCompletionItem(s,r=2,n=!0){var k;const o=s.returnedTypes&&s.returnedTypes[0]||s.syntax&&s.syntax[0]&&((k=s.syntax[0].split("→").pop())==null?void 0:k.trim()),l=this._extractExamples(s),p=this._extractDescription(s),u=[this._createDescriptionSection(p)];l.length?u.push(this._createExampleSection(l)):s.syntax&&s.syntax.length&&u.push(this._createSyntaxSection(s.syntax)),s.returns&&s.returns.length&&u.push(this._createReturnSection(s.returns));const m={value:u.join(this._formatter.lineBreak)},_=s.name,g=n?we.functions:we.userDefinedFunction,h=s.template,w=h?`${Mu(_)}<\${1}>`:_;return{documentation:m,label:h?`${_.replace(/<.+>/,"")}<type>`:_,kind:qe.languages.CompletionItemKind.Function,sortText:`${r}_${_}`,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,insertText:w+this.bracketsPostfix,originInsertText:w,detail:`(${Me(g)}) ${Me(we.returns)} ${o}`,command:{id:"tcc.editor.function",title:"",arguments:[h?"editor.action.triggerSuggest":"editor.action.triggerParameterHints"]}}}_getAnnotationCompletionItem(s){const r=this._extractDescription(s),n=this._extractExamples(s),o=[this._createDescriptionSection(r)];return n.length&&o.push(this._createExampleSection(n)),{documentation:{value:o.join(this._formatter.lineBreak)},label:s.name,insertText:s.name.replace("@",""),kind:qe.languages.CompletionItemKind.Keyword,detail:`(${Me(we.annotations)})`}}_getNamespaceCompletionItem(s,r=2){const n=[this._createDescriptionSection(Me(we.namespaceDesc))];return{label:s.name,documentation:{value:n.join(this._formatter.lineBreak)},detail:`(${Me(we.namespace)}) ${s.name}`,insertText:s.name,sortText:`${r}_${s.name}`,kind:qe.languages.CompletionItemKind.Module}}_extractExamples(s){let r;return s.examples||s.detailedDesc&&((r=s.detailedDesc[0])===null||r===void 0?void 0:r.examples)||[]}_extractDescription(s){return Array.isArray(s.desc)?s.desc.join(this._formatter.lineBreak):s.desc||""}_createExampleSection(s){return this._formatter.paragraph(this._formatter.bold(Me(ot.Example)),this._formatter.pineCode(s.join(this._formatter.lineBreak)))}_createSyntaxSection(s){return this._formatter.paragraph(this._formatter.bold(Me(ot.Syntax)),this._formatter.pineCode(s.join(this._formatter.lineBreak)))}_createReturnSection(s){return this._formatter.paragraph(this._formatter.bold(Me(ot.Returns)),this._formatter.lineBreak,s.join(this._formatter.lineBreak))}_createDescriptionSection(s){return!s||s.trim().length===0?"":this._formatter.paragraph(this._formatter.bold(Me(ot.Description)),this._formatter.lineBreak,s)}}const Ot=new ju;class Hu{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(s,r){const{functions:n,variables:o,types:l,methods:p,imports:u,enums:m}=s;n&&(this._userFunctions=n),o&&(this._userVariables=o),l&&(this._userTypes=l),p&&(this._userMethods=p),u&&(this._imports=u),m&&(this._userEnums=m),this._overloadsFuncs=r}parseLineContentFuncVar(s,r,n,o){let l=(n==null?void 0:n.getLineContent(r))||"";const p=l.indexOf("//");if(this._removeString(l).indexOf("//")!==-1&&p<=s)return;l=l+" ";const u=this._getVariablesDocVal(l,s,r);if(u){if(u.isBuildIn){const g=n==null?void 0:n.getWordAtPosition(o||new qe.Position(r,s));if(((n==null?void 0:n.getValueInRange({startLineNumber:r,startColumn:(g==null?void 0:g.endColumn)||0,endLineNumber:r,endColumn:((g==null?void 0:g.endColumn)||0)+2}))||"").trim().startsWith("="))return null}return u}const m=this._getFuncsDocVal(l,s,r);if(m)return m;const _=l.match(/[a-zA-Z_][a-zA-Z_0-9]*(\s*\.\s*[a-zA-Z_][a-zA-Z_0-9]*)*(?=\s*<)/g);if(_){const g=this._matchContent(_,l,s);if(g){const h=this._getBuildInOther(g.name);if(h)return{docValue:h,isBuildIn:!0,index:0};{const w=this._getBuildInFunc(`${g.name}<type>`);if(w)return{docValue:w,isBuildIn:!0,index:0}}}}return this._getImportDocVal(l,s,r)}_getImportDocVal(s,r,n){const o=new RegExp("(?<=(import(\\s+)))([a-zA-Z\\d\\$_\\-\\.\\u00a1-\\uffff\\/]+)","g"),l=new RegExp("(?<=(as\\b)(\\s+))([a-zA-Z\\d\\_\\u00a1\\uffff\\/]+)","g"),p=s.match(o);if(p){const u=this._matchContent(p,s,r);if(u){const _=this._imports.get(u.name);if(_)return _}const m=s.match(l);if(m){const _=this._matchContent(m,s,r);if(_){for(const[g,h]of this._imports)if(h.name===_.name)return h}}}return null}_getBuildInFunc(s){return _t.functions.get(s)}_getBuildInMethod(s){return _t.methods.get(s)}_getBuildInOther(s){const{keywords:r,variables:n,constants:o,types:l}=_t;return r.get(s)||n.get(s)||o.get(s)||l.get(s)}parseCurrentInputFunc(s,r=!1,n=!1){let o=s.length-1,l=0,p=r,u=n;for(;o>=0;){const m=s.charAt(o);if(o-=1,/['"]/.test(m)){const _=m;if(m==="'"){if(p){p=!1;continue}}else if(u){u=!1;continue}for(;o>=0;){const g=s.charAt(o);if(o-=1,g===_)break}}if(!(p||u)&&(/\)/.test(m)&&(l+=1),/\(/.test(m))){if(l>0){l-=1;continue}let _="";for(;o>=0;){const g=s.charAt(o);if(/\s/.test(g)&&!_){o-=1;continue}if(/[^\w.]/.test(g))break;o-=1,_=g+_}if(_)return{funcName:_,startIndex:o+1}}}}parseCurrentInputFuncAndArg(s,r=!1,n=!1){const{funcName:o,startIndex:l}=this.parseCurrentInputFunc(s,r,n)||{};if(o&&typeof l=="number"){let p=s.slice(l+o.length).trim().slice(1),u=-1;if(r&&(u=p.lastIndexOf("'")),n){const g=p.lastIndexOf('"');(g!==-1&&g<u||u===-1)&&(u=g)}u!==-1&&(p=p.substring(0,u));const _=p.replace(/[\w.]+\(.*\)/g,"").split(",").map(g=>{const h=g.trim().split("=");return h.length<=1?"":h[0].trim()});return{startIndex:l,funcName:o,args:_}}}_removeString(s){return s.replace(/\\"|\\'/g,"").replace(/"[^"]*"|'[^']*'/g,"")}_getVariablesDocVal(s,r,n){const o=this._removeString(s).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(o){const l=this._matchContent(o,s,r);if(l){const p={docValue:void 0,isBuildIn:!0,index:0},u=this._getBuildInOther(l.name);if(u)return p.docValue=u,p;const m=this._getUserVariablesDocVal(l.name,r,n);if(m)return Object.assign(p,{docValue:[m],isBuildIn:!1});const _=this._getUserTypesDocVal(l.name);if(_)return Object.assign(p,{docValue:_,isBuildIn:!1});const g=this._getTypesAndFileds(s,l.name,r,n);if(g&&typeof g!="string")return Object.assign(p,{docValue:[g],isBuildIn:!1});const h=this._getUserEnumsDocVal(l,r);if(h)return Object.assign(p,{docValue:h,isBuildIn:!1})}}}_getUserVariablesDocVal(s,r,n){const p=[...this._userVariables.get(s)||[]].sort((u,m)=>(m.scope||0)-(u.scope||0)).find(u=>{const m=u.range;return((m==null?void 0:m.startColumn)||0)<=r&&((m==null?void 0:m.startLineNumber)||0)<=n&&((m==null?void 0:m.endLineNumber)||0)>=n});if(p)return p.title=we.userDefinedVariable,p.type=this._arrayTypeTransform(p.type),p}_getUserTypesDocVal(s){const r=this._userTypes.get(s);if(r)return r[0].title=we.userDefinedType,r}_getUserEnumsDocVal(s,r){var m;const{endIndex:n,name:o}=s,l=o.split(".");let p=l[0];l.length>2&&(p=l.slice(0,2).join("."));const u=this._userEnums.get(p);if(u&&u.length){u[0].title=we.enum;const _=l[l.length-1],g=(m=u[0].members)==null?void 0:m.find(h=>h.name===_);if(!g||r<n-_.length)return u;if(r>n-_.length)return[g]}}_getTypesAndFileds(s,r,n,o){var l,p;if(r.includes(".")){const u=r.split(".");let m=u[0],_,g=null,h=s.indexOf(r,n-r.length)+1,w=h+m.length-1;for(const k of u.slice(1)){if(!g){const S=h<=n&&w>=n,C=this._getUserVariablesDocVal(m,n,o);if(S&&C)return C;g=C==null?void 0:C.type}if(g){_=g,h=w+2,w=w+k.length+1;const S=this._userTypes.get(g)||_t.types.get(g),C=(p=(l=S==null?void 0:S[0])==null?void 0:l.fields)==null?void 0:p.find(B=>B.name===k);if(C&&h<=n&&w>=n)return{name:`${g}.${k}`,desc:C.desc,type:this._arrayTypeTransform(C.type),title:we.field};g=C==null?void 0:C.type}else m=`${m}.${k}`,w=w+k.length+1}return _}}_getFuncsDocVal(s,r,n){var l;const o=s.match(/[a-zA-Z_][a-zA-Z_0-9]*(\s*\.\s*[a-zA-Z_][a-zA-Z_0-9]*)*(?=\s*\()/g);if(o){const p=this._matchContent(o,s,r);if(p){const u={docValue:void 0,isBuildIn:!0,endIndex:p.endIndex,index:0},m=this._getBuildInFunc(p.name);if(m)return u.index=this._getOverloadsFuncIndex(m,r,p.name,n),Object.assign(u,{docValue:m});const _=this._getUserFuncsDocVal(p.name);if(_)return u.index=this._getOverloadsFuncIndex(_,r,p.name,n),Object.assign(u,{docValue:_,isBuildIn:!1});const g=this._getUserVarFuncsDocVal(s,p.name,r,n);if(g)return Object.assign(u,{docValue:[g],isBuildIn:!1});const h=p.name.split("."),w=((l=h.pop())==null?void 0:l.length)||0;if(r>p.endIndex-w-1)return;const k=this._getBuildInOther(h.join("."));if(k)return Object.assign(u,{docValue:k,endIndex:p.endIndex-w-1})}}}_getOverloadsFuncIndex(s,r,n,o){if(s.length>1){const l=this._overloadsFuncs.find(p=>p.name===n&&p.line===o&&p.startColumn<=r&&p.endColumn>=r);if(l)return l.index}return 0}_getUserFuncsDocVal(s){const r=this._userFunctions.get(s);if(r){for(const n of r)n.title=we.userDefinedFunction;return r}}_getUserMethodsDocVal(s){const r=this._userMethods.get(s);if(r){for(const n of r)n.title=we.userDefinedFunction;return r}}_getUserVarFuncsDocVal(s,r,n,o){var l;if(r.includes(".")){const p=r.split("."),u=this._getTypesAndFileds(s,r,n,o);if(typeof u=="string"){const _=`${this._arrayTypeTransform(u).replace(/<[^<>]+>/,"").replace(/(series|simple|const|input)\s+([\w\d.]+)/,"$2")}.${p.pop()}`,g=this._getBuildInMethod(_);if(g){const h=this._getOverloadsFuncIndex(g,n,_,o);return{...g[0],name:_,index:h}}return(l=this._getUserMethodsDocVal(_))==null?void 0:l[0]}else return u}}_arrayTypeTransform(s=""){return s.includes("[]")?`array<${s.replace("[]","")}>`:s}_matchContent(s,r,n){let o=0;for(const l of s){o=n-l.length;const p=r.indexOf(l,o);if(o=p+l.length,this._judgeVal(r,p,o)&&p+1<=n&&o>=n)return{name:l,endIndex:o}}}_judgeVal(s,r,n){const o=s.charAt(r-1),l=/[\w\d."']/;if(l.test(o))return!1;const p=s.charAt(n);return!l.test(p)}}const ws=new Hu;var pa={exports:{}};/**
111
+ \`\`\``}code(s){return`\`${s}\``}paragraph(...s){return[this.paragraphBreak,...s,this.paragraphBreak].join(this.lineBreak)}link(s,r){return`[${s}](${r.href})`}}const ce=new Ru;function Fu(a){const{name:s,libraryName:r,desc:n}=a,o=[`${ce.bold(s||r)} (${Dt("library")})`];return o.push(ce.delimiter),n&&o.push(ce.paragraph(ce.bold(Dt(ot.Description)),ce.lineBreak,n)),o.join(o.length===2?" ":ce.lineBreak)}function Bu(a,s=0,r=!0){const n=a[s];if(!n)return"";if(n.isEnumMember)return`${ce.bold(n.name)} (${Dt("enum member")})${n.value===void 0?"":` = ${n.value}`}`;const o=/(Mac|iPhone|iPod|iPad)/i.test(window.navigator.userAgent),{name:l,title:p="",desc:u,type:m,syntax:_,returns:g,remarks:h,fields:w,members:k}=n,S=[`${ce.bold(l)} (${Dt(p)})`];if(a.length>1&&S.push(ce.italic(`+${a.length-1} ${Dt("overloads")}`)),S.push(ce.delimiter),u&&S.push(ce.paragraph(Array.isArray(u)?u.join(ce.lineBreak):u||"")),m&&S.push(ce.paragraph(ce.bold(Dt(ot.Type)),ce.italic(m))),_&&_.length&&S.push(ce.paragraph(ce.bold(Dt(ot.Syntax)),ce.pineCode(_.join(ce.lineBreak)))),g&&S.push(ce.paragraph(ce.bold(Dt(ot.Returns)),ce.lineBreak,g.join(ce.lineBreak))),h&&h.length&&a.length<=1){let C="";typeof h=="string"?C=h:C=h.join(ce.lineBreak)||"",C.length<200&&S.push(ce.paragraph(ce.bold(Dt(ot.Remarks)),ce.lineBreak,C))}if(w){const C=[];for(const B of w){const W=B.desc?` - ${B.desc}`:"";C.push(`${B.name} (${B.type})${W}`)}S.push(ce.paragraph(ce.bold(Dt(ot.Fields)),ce.lineBreak,C.join(ce.paragraphBreak)))}if(k){const C=[];for(const B of k){const W=B.desc?` - ${B.desc}`:"";C.push(`${B.name}${B.value?` (${B.value})`:""}${W}`)}S.push(ce.paragraph(ce.bold(Dt(ot.EnumMembers)),ce.lineBreak,C.join(ce.paragraphBreak)))}return r&&S.push(ce.italic(`${ce.code(o?"⌘":"Ctrl")} + ${Dt(du.clickOnKeywordForMoreHelp)}`)),S.join(S.length===2?" ":ce.lineBreak)}const qn="tcc_cursor_position",Uu=["submenuitem.EditorContextPeek","editor.action.peekDefinition"];function Ku(a){return a.replace(/<[^<>]+>/,"").replace(/(series|simple|const|input)\s+([\w\d.]+)/,"$2").replace(/\w[\w.\d]*\[\]/,"array")}function $u(a){const s=a.getContribution("editor.contrib.contextmenu"),r=s==null?void 0:s._getMenuActions;s._getMenuActions=function(){return r.apply(s,arguments).filter(function(o){return!Uu.includes(o.id)})}}const{t:Me}=Se;class ju{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=ce,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(s){this._nextIsBracket=s}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(s){return this._funcArgsCache.get(s)||this._userFuncArgsCache.get(s)}getSuggestions(s){return s?this._namespaceCache.get(s)||this._userNamespaceCache.get(s):this._suggestions.concat(this._userSuggestions)}_initUserDefind(){this._userFuncArgsCache.clear(),this._userNamespaceCache.clear(),this._userOutermostNsItems.clear(),this._methodNamespaceCache.clear(),this._methodFuncs.clear()}setUserDefind(s,r,n,o,l){this._initUserDefind();const p=this._mergeTreeSlices(this._generateTreeSlice(_t.methods,"method"),this._generateTreeSlice(o,"method"));this._getMethodNamespaceCache(p),this._userMethods=o,this._userTypes=r,this._userFunctions=s,this._userEnums=l;const u=this._generateTreeSlice(s,"fun");this._userSuggestions=this._getAllUserCompletionItems(u,this._generateTreeSlice(r,"type"),this._generateTreeSlice(n,"var"),this._generateTreeSlice(l,"enum")),this._getUserFuncArgumentsCompletionItemsToCache(u)}_getAllUserCompletionItems(s,r,n,o){const l=this._getEnumCompletionItems(o),p=this._getUserVariableCompletionItems(n),u=this._getTypeCompletionItems(r,!0),m=this._getFunctionCompletionItems(s,void 0,!0);return[...u,...m,...p,...l,...this._userOutermostNsItems.values()]}_getAllCompletionItems(){const{variables:s,keywords:r,types:n,functions:o}=this._builtinSubtreeCache,l=this._getVariableCompletionItems(s),p=this._getKeywordCompletionItems(r),u=this._getTypeCompletionItems(n),m=this._getFunctionCompletionItems(o),_=this._getSnippetsCompletionsList();return[...l,...p,...u,...m,...this._outermostNsItems.values(),..._]}_getNodeKey(s,r){return`${r}_${s}`}_mergeTreeSlices(...s){const r=new Map;for(const n of s)for(const[o,l]of n){const p=r.get(o);p?r.set(o,{...p,children:this._mergeTreeSlices(l.children,p.children)}):r.set(o,l)}return r}_mergeCompletions(s,r){const n=this._namespaceCache.get(s);n?this._namespaceCache.set(s,[...n,...r]):this._namespaceCache.set(s,r)}_mergeUserCompletions(s,r){const n=this._userNamespaceCache.get(s);n?this._userNamespaceCache.set(s,[...n,...r]):this._userNamespaceCache.set(s,r)}_generateTreeSlice(s,r){const n=new Map;for(const[o,l]of s){const[p,...u]=o.split("."),m=u.length>0,_=n.get(this._getNodeKey(p,m?"ns":r));let g=new Map,h=l.map(k=>({...k,name:o})),w=this._getNodeKey(o,r);if(m&&r!=="type"){const k=new Map([[u.join("."),l]]);h=[{name:p,title:we.namespace}],w=this._getNodeKey(p,"ns"),g=this._generateTreeSlice(k,r)}_&&(h=[{name:p,title:we.namespace}],g=this._mergeTreeSlices(_.children,g)),n.set(w,{value:h,children:g})}return n}_getBuiltinsCacheFragment(){const{keywords:s,variables:r,constants:n,types:o,functions:l,annotations:p}=_t,u=this._generateTreeSlice(p,"an");return u.delete("an_@version="),this._builtinSubtreeCache={keywords:this._generateTreeSlice(s,"key"),variables:this._mergeTreeSlices(this._generateTreeSlice(r,"var"),this._generateTreeSlice(n,"var")),types:this._generateTreeSlice(o,"type"),functions:this._generateTreeSlice(l,"fun"),annotations:u},this._builtinSubtreeCache}_getVariableCompletionItems(s,r){const n=[],o=[];for(const[l,p]of s){const{value:u,children:m}=p;if(l.startsWith("ns")){const _=this._getNamespaceCompletionItem(u[0]);if(r){o.push({..._});const h=`${r}.${_.label}`;_.label=h,_.insertText=h}const g=this._getVariableCompletionItems(m,_.label);r||this._outermostNsItems.set(l,_),n.push(...g)}else{const _=this._getVariableCompletionItem(u[0],r?3:2);if(r){o.push({..._});const{label:g}=_;_.label=`${r}.${g}`,_.insertText=`${r}.${_.insertText}`,_.filterText=`${g}\r`}n.push(_)}}return o.length&&r&&this._mergeCompletions(r,o),n}_setUserVariableSubItems(s,r){var _,g,h,w;let n=[];const o=Ku(s.type||""),l=this._methodNamespaceCache.get(o),p=r?`${r}.${s.name}`:s.name;l&&(n=l.filter(k=>{var W;const S=`${o}.${k.label}`,C=_t.methods.get(S)||this._userMethods.get(S),B=C==null?void 0:C.some(H=>!H.thisType||H.thisType[0].includes("<>")||H.thisType.includes(s.type||""));if(B&&C){const H=this._getNamedArgumentsCompletionList(((W=C[0])==null?void 0:W.args)||[]),ee=`${p}.${k.label}`;this._userFuncArgsCache.set(ee,H),this._methodFuncs.set(ee,C)}return B}));const{types:u}=_t,m=((g=(_=this._userTypes.get(o))==null?void 0:_[0])==null?void 0:g.fields)||((w=(h=u.get(o))==null?void 0:h[0])==null?void 0:w.fields);if(m)for(const k of m){const S=k.name,C=k.type,B=this._getInstanceTypeCompletionItemProp({name:S,type:C,desc:k.desc?[k.desc]:void 0});this._setUserVariableSubItems({name:S,type:C},s.name),n.push({...B})}n.length&&this._mergeUserCompletions(p,n)}_getUserVariableCompletionItems(s,r){const n=[],o=[];for(const[l,p]of s){const{value:u,children:m}=p;if(this._setUserVariableSubItems(u[0]),l.startsWith("ns")){const _=this._getNamespaceCompletionItem(u[0]);if(r){o.push({..._});const h=`${r}.${_.label}`;_.label=h,_.insertText=h}const g=this._getUserVariableCompletionItems(m,_.label);r||this._userOutermostNsItems.set(l,_),n.push(...g)}else{const _=this._getVariableCompletionItem(u[0],r?2:1,!1);if(r){o.push({..._});const{label:g}=_;_.label=`${r}.${g}`,_.insertText=`${r}.${_.insertText}`,_.filterText=`${g}\r`}n.push(_)}}return o.length&&r&&this._mergeUserCompletions(r,o),n}_getTypeCompletionItems(s,r=!1){const n=[];for(const[,o]of s){const{value:l}=o,p=r?this._getCustomTypeCompletionItem(l[0]):this._getTypeCompletionItem(l[0]);n.push(p)}return n}_getEnumCompletionItems(s){const r=[];for(const[,n]of s){const{value:o}=n,l=this._getEnumCompletionItem(o[0]);r.push(l);const p=o[0].members;p!=null&&p.length&&this._getEnumMemberCompletionItems(o[0].name,p)}return r}_getEnumMemberCompletionItems(s,r){const n=[];for(const o of r){const{name:l,desc:p,value:u}=o,m=this._getEnumMemberCompletionItem({name:l,desc:p?[p]:void 0,value:u});n.push(m)}n.length&&this._mergeUserCompletions(s,n)}_getAnnotationCompletionItems(s){const r=[];for(const[,n]of s){const{value:o}=n,l=this._getAnnotationCompletionItem(o[0]);r.push(l)}return r}_getKeywordCompletionItems(s){const r=[];for(const[,n]of s){const{value:o}=n,l=this._getKeywordCompletionItem(o[0]);r.push(l)}return r}_getMethodNamespaceCache(s,r){const n=[];for(const[o,l]of s){const{value:p,children:u}=l;if(o.startsWith("ns")){const m=this._getNamespaceCompletionItem(p[0]);if(r){n.push({...m});const _=`${r}.${m.label}`;m.label=_,m.insertText=_}this._getMethodNamespaceCache(u,m.label)}else{const m=this._getFunctionCompletionItem(p[0],r?3:2);if(p.length>1&&(m.detail=`${m.detail} (+${p.length-1} overloads)`),r){n.push({...m});const{label:_}=m;m.label=`${r}.${_}`,m.insertText=`${r}.${m.insertText}`,m.originInsertText=`${r}.${m.originInsertText}`,m.filterText=`${_}\r`}}}r&&this._methodNamespaceCache.set(r,n)}_getFunctionCompletionItems(s,r,n=!1){const o=[],l=[];for(const[p,u]of s){const{value:m,children:_}=u;if(p.startsWith("ns")){const g=this._getNamespaceCompletionItem(m[0]);if(r){l.push({...g});const w=`${r}.${g.label}`;g.label=w,g.insertText=w}const h=this._getFunctionCompletionItems(_,g.label,n);r||(n?this._userOutermostNsItems.set(p,g):this._outermostNsItems.set(p,g)),o.push(...h)}else{const g=this._getFunctionCompletionItem(m[0],r?3:2,!n);if(m.length>1&&(g.detail=`${g.detail} (+${m.length-1} overloads)`),r){l.push({...g});const{label:h}=g;g.label=`${r}.${h}`,g.insertText=`${r}.${g.insertText}`,g.originInsertText=`${r}.${g.originInsertText}`,g.filterText=`${h}\r`}o.push(g)}}return l.length&&r&&(n?this._mergeUserCompletions(r,l):this._mergeCompletions(r,l)),o}_getSnippetsCompletionsList(){return pu.map(s=>{const{label:r,kind:n,insertText:o}=s,l=r.charAt(0).toUpperCase()+r.substring(1),p={value:this._formatter.pineCode(o.replace(/\${\d:([^}]+)}|\${\d}/g,"$1"))};return{label:r,detail:`(${l} ${Me(n)})`,insertText:o,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,sortText:`2_${r}`,kind:qe.languages.CompletionItemKind.Snippet,documentation:p}})}_getFuncArgumentsCompletionItemsToCache(s,r){for(const[n,o]of s){const{name:l}=o.value[0];if(n.startsWith("ns"))this._getFuncArgumentsCompletionItemsToCache(o.children,r?`${r}.${l}`:l);else{const p=new Map;o.value.reduce((_,g)=>{const h=g.args;return h&&h.length&&h.forEach(w=>{_.set(w.name,w)}),_},p);const u=this._getNamedArgumentsCompletionList([...p.values()]),m=r?`${r}.${l}`:l;this._funcArgsCache.set(m,u)}}}_getUserFuncArgumentsCompletionItemsToCache(s,r){for(const[n,o]of s){const{name:l}=o.value[0];if(n.startsWith("ns"))this._getUserFuncArgumentsCompletionItemsToCache(o.children,r?`${r}.${l}`:l);else{const p=new Map;o.value.reduce((_,g)=>{const h=g.args;return h&&h.length&&h.forEach(w=>{_.set(w.name,w)}),_},p);const u=this._getNamedArgumentsCompletionList([...p.values()]),m=r?`${r}.${l}`:l;this._userFuncArgsCache.set(m,u)}}}_getNamedArgumentsCompletionList(s){return s.map(r=>{const{name:n,desc:o,displayType:l}=r,p=`${n} = `,u=Array.isArray(o)?o.join(this._formatter.delimiter):o||"";return{label:p,documentation:{value:this._formatter.paragraph(this._formatter.bold(Me(we.Description)),this._formatter.lineBreak,u)},insertText:p,detail:`(${Me(we.parameter)}) ${Me(we.types)} ${l}`,kind:qe.languages.CompletionItemKind.Text,sortText:`0_${p}`}})}_getVariableCompletionItem(s,r=2,n=!0){const o=this._extractExamples(s),l=this._extractDescription(s),p=[this._createDescriptionSection(l)];o.length?p.push(this._createExampleSection(o)):s.syntax&&s.syntax.length&&p.push(this._createSyntaxSection(s.syntax));const u={value:p.join(this._formatter.lineBreak)},m=Me(n?we.variables:we.userDefinedVariable);return{documentation:u,label:s.name,insertText:s.name,kind:qe.languages.CompletionItemKind.Variable,sortText:`${r}_${s.name}`,detail:`(${m}) ${s.type}`}}_getKeywordCompletionItem(s,r=2){const n=this._extractExamples(s),o=this._extractDescription(s),l=[this._createDescriptionSection(o)];return n.length?l.push(this._createExampleSection(n)):s.syntax&&s.syntax.length&&l.push(this._createSyntaxSection(s.syntax)),{documentation:{value:l.join(this._formatter.lineBreak)},label:s.name,insertText:s.name,kind:qe.languages.CompletionItemKind.Keyword,sortText:`${r}_${s.name}`,detail:`(${Me(we.keywords)})`}}_getTypeCompletionItem(s){const r=this._extractDescription(s);return{documentation:{value:this._createDescriptionSection(r)},label:s.name,insertText:s.name,kind:qe.languages.CompletionItemKind.Keyword,sortText:`1_${s.name}`,detail:`(${Me(we.types)})`}}_getCustomTypeCompletionItem(s){const r=this._extractDescription(s);return{documentation:{value:this._createDescriptionSection(r)},label:s.name,insertText:s.name,kind:qe.languages.CompletionItemKind.Keyword,sortText:`2_${s.name}`,detail:`(${Me(we.userDefinedType)})`}}_getEnumCompletionItem(s){const r=this._extractDescription(s);return{documentation:{value:this._createDescriptionSection(r)},label:s.name,insertText:s.name,kind:qe.languages.CompletionItemKind.Enum,sortText:`2_${s.name}`,detail:`(${Me(we.enum)})`}}_getEnumMemberCompletionItem(s){const r=this._extractDescription(s);return{documentation:{value:this._createDescriptionSection(r)},label:s.name,insertText:s.name,kind:qe.languages.CompletionItemKind.EnumMember,sortText:`2_${s.name}`,detail:`(${Me("enum member")}) ${s.value?`${s.name} = ${s.value}`:`${s.name}`}`}}_getInstanceTypeCompletionItemProp(s){const r=this._extractDescription(s),n=[];return r&&n.push(this._formatter.paragraph(this._formatter.bold(Me(ot.Description)),this._formatter.lineBreak,r)),{documentation:{value:n.join(this._formatter.lineBreak)},label:s.name,insertText:s.name,kind:qe.languages.CompletionItemKind.Field,sortText:`2_${s.name}`,detail:`(${Me(we.field)}) ${s.type}`}}_getFunctionCompletionItem(s,r=2,n=!0){var k;const o=s.returnedTypes&&s.returnedTypes[0]||s.syntax&&s.syntax[0]&&((k=s.syntax[0].split("→").pop())==null?void 0:k.trim()),l=this._extractExamples(s),p=this._extractDescription(s),u=[this._createDescriptionSection(p)];l.length?u.push(this._createExampleSection(l)):s.syntax&&s.syntax.length&&u.push(this._createSyntaxSection(s.syntax)),s.returns&&s.returns.length&&u.push(this._createReturnSection(s.returns));const m={value:u.join(this._formatter.lineBreak)},_=s.name,g=n?we.functions:we.userDefinedFunction,h=s.template,w=h?`${Mu(_)}<\${1}>`:_;return{documentation:m,label:h?`${_.replace(/<.+>/,"")}<type>`:_,kind:qe.languages.CompletionItemKind.Function,sortText:`${r}_${_}`,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,insertText:w+this.bracketsPostfix,originInsertText:w,detail:`(${Me(g)}) ${Me(we.returns)} ${o}`,command:{id:"tcc.editor.function",title:"",arguments:[h?"editor.action.triggerSuggest":"editor.action.triggerParameterHints"]}}}_getAnnotationCompletionItem(s){const r=this._extractDescription(s),n=this._extractExamples(s),o=[this._createDescriptionSection(r)];return n.length&&o.push(this._createExampleSection(n)),{documentation:{value:o.join(this._formatter.lineBreak)},label:s.name,insertText:s.name.replace("@",""),kind:qe.languages.CompletionItemKind.Keyword,detail:`(${Me(we.annotations)})`}}_getNamespaceCompletionItem(s,r=2){const n=[this._createDescriptionSection(Me(we.namespaceDesc))];return{label:s.name,documentation:{value:n.join(this._formatter.lineBreak)},detail:`(${Me(we.namespace)}) ${s.name}`,insertText:s.name,sortText:`${r}_${s.name}`,kind:qe.languages.CompletionItemKind.Module}}_extractExamples(s){let r;return s.examples||s.detailedDesc&&((r=s.detailedDesc[0])===null||r===void 0?void 0:r.examples)||[]}_extractDescription(s){return Array.isArray(s.desc)?s.desc.join(this._formatter.lineBreak):s.desc||""}_createExampleSection(s){return this._formatter.paragraph(this._formatter.bold(Me(ot.Example)),this._formatter.pineCode(s.join(this._formatter.lineBreak)))}_createSyntaxSection(s){return this._formatter.paragraph(this._formatter.bold(Me(ot.Syntax)),this._formatter.pineCode(s.join(this._formatter.lineBreak)))}_createReturnSection(s){return this._formatter.paragraph(this._formatter.bold(Me(ot.Returns)),this._formatter.lineBreak,s.join(this._formatter.lineBreak))}_createDescriptionSection(s){return!s||s.trim().length===0?"":this._formatter.paragraph(this._formatter.bold(Me(ot.Description)),this._formatter.lineBreak,s)}}const Pt=new ju;class Hu{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(s,r){const{functions:n,variables:o,types:l,methods:p,imports:u,enums:m}=s;n&&(this._userFunctions=n),o&&(this._userVariables=o),l&&(this._userTypes=l),p&&(this._userMethods=p),u&&(this._imports=u),m&&(this._userEnums=m),this._overloadsFuncs=r}parseLineContentFuncVar(s,r,n,o){let l=(n==null?void 0:n.getLineContent(r))||"";const p=l.indexOf("//");if(this._removeString(l).indexOf("//")!==-1&&p<=s)return;l=l+" ";const u=this._getVariablesDocVal(l,s,r);if(u){if(u.isBuildIn){const g=n==null?void 0:n.getWordAtPosition(o||new qe.Position(r,s));if(((n==null?void 0:n.getValueInRange({startLineNumber:r,startColumn:(g==null?void 0:g.endColumn)||0,endLineNumber:r,endColumn:((g==null?void 0:g.endColumn)||0)+2}))||"").trim().startsWith("="))return null}return u}const m=this._getFuncsDocVal(l,s,r);if(m)return m;const _=l.match(/[a-zA-Z_][a-zA-Z_0-9]*(\s*\.\s*[a-zA-Z_][a-zA-Z_0-9]*)*(?=\s*<)/g);if(_){const g=this._matchContent(_,l,s);if(g){const h=this._getBuildInOther(g.name);if(h)return{docValue:h,isBuildIn:!0,index:0};{const w=this._getBuildInFunc(`${g.name}<type>`);if(w)return{docValue:w,isBuildIn:!0,index:0}}}}return this._getImportDocVal(l,s,r)}_getImportDocVal(s,r,n){const o=new RegExp("(?<=(import(\\s+)))([a-zA-Z\\d\\$_\\-\\.\\u00a1-\\uffff\\/]+)","g"),l=new RegExp("(?<=(as\\b)(\\s+))([a-zA-Z\\d\\_\\u00a1\\uffff\\/]+)","g"),p=s.match(o);if(p){const u=this._matchContent(p,s,r);if(u){const _=this._imports.get(u.name);if(_)return _}const m=s.match(l);if(m){const _=this._matchContent(m,s,r);if(_){for(const[g,h]of this._imports)if(h.name===_.name)return h}}}return null}_getBuildInFunc(s){return _t.functions.get(s)}_getBuildInMethod(s){return _t.methods.get(s)}_getBuildInOther(s){const{keywords:r,variables:n,constants:o,types:l}=_t;return r.get(s)||n.get(s)||o.get(s)||l.get(s)}parseCurrentInputFunc(s,r=!1,n=!1){let o=s.length-1,l=0,p=r,u=n;for(;o>=0;){const m=s.charAt(o);if(o-=1,/['"]/.test(m)){const _=m;if(m==="'"){if(p){p=!1;continue}}else if(u){u=!1;continue}for(;o>=0;){const g=s.charAt(o);if(o-=1,g===_)break}}if(!(p||u)&&(/\)/.test(m)&&(l+=1),/\(/.test(m))){if(l>0){l-=1;continue}let _="";for(;o>=0;){const g=s.charAt(o);if(/\s/.test(g)&&!_){o-=1;continue}if(/[^\w.]/.test(g))break;o-=1,_=g+_}if(_)return{funcName:_,startIndex:o+1}}}}parseCurrentInputFuncAndArg(s,r=!1,n=!1){const{funcName:o,startIndex:l}=this.parseCurrentInputFunc(s,r,n)||{};if(o&&typeof l=="number"){let p=s.slice(l+o.length).trim().slice(1),u=-1;if(r&&(u=p.lastIndexOf("'")),n){const g=p.lastIndexOf('"');(g!==-1&&g<u||u===-1)&&(u=g)}u!==-1&&(p=p.substring(0,u));const _=p.replace(/[\w.]+\(.*\)/g,"").split(",").map(g=>{const h=g.trim().split("=");return h.length<=1?"":h[0].trim()});return{startIndex:l,funcName:o,args:_}}}_removeString(s){return s.replace(/\\"|\\'/g,"").replace(/"[^"]*"|'[^']*'/g,"")}_getVariablesDocVal(s,r,n){const o=this._removeString(s).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(o){const l=this._matchContent(o,s,r);if(l){const p={docValue:void 0,isBuildIn:!0,index:0},u=this._getBuildInOther(l.name);if(u)return p.docValue=u,p;const m=this._getUserVariablesDocVal(l.name,r,n);if(m)return Object.assign(p,{docValue:[m],isBuildIn:!1});const _=this._getUserTypesDocVal(l.name);if(_)return Object.assign(p,{docValue:_,isBuildIn:!1});const g=this._getTypesAndFileds(s,l.name,r,n);if(g&&typeof g!="string")return Object.assign(p,{docValue:[g],isBuildIn:!1});const h=this._getUserEnumsDocVal(l,r);if(h)return Object.assign(p,{docValue:h,isBuildIn:!1})}}}_getUserVariablesDocVal(s,r,n){const p=[...this._userVariables.get(s)||[]].sort((u,m)=>(m.scope||0)-(u.scope||0)).find(u=>{const m=u.range;return((m==null?void 0:m.startColumn)||0)<=r&&((m==null?void 0:m.startLineNumber)||0)<=n&&((m==null?void 0:m.endLineNumber)||0)>=n});if(p)return p.title=we.userDefinedVariable,p.type=this._arrayTypeTransform(p.type),p}_getUserTypesDocVal(s){const r=this._userTypes.get(s);if(r)return r[0].title=we.userDefinedType,r}_getUserEnumsDocVal(s,r){var m;const{endIndex:n,name:o}=s,l=o.split(".");let p=l[0];l.length>2&&(p=l.slice(0,2).join("."));const u=this._userEnums.get(p);if(u&&u.length){u[0].title=we.enum;const _=l[l.length-1],g=(m=u[0].members)==null?void 0:m.find(h=>h.name===_);if(!g||r<n-_.length)return u;if(r>n-_.length)return[g]}}_getTypesAndFileds(s,r,n,o){var l,p;if(r.includes(".")){const u=r.split(".");let m=u[0],_,g=null,h=s.indexOf(r,n-r.length)+1,w=h+m.length-1;for(const k of u.slice(1)){if(!g){const S=h<=n&&w>=n,C=this._getUserVariablesDocVal(m,n,o);if(S&&C)return C;g=C==null?void 0:C.type}if(g){_=g,h=w+2,w=w+k.length+1;const S=this._userTypes.get(g)||_t.types.get(g),C=(p=(l=S==null?void 0:S[0])==null?void 0:l.fields)==null?void 0:p.find(B=>B.name===k);if(C&&h<=n&&w>=n)return{name:`${g}.${k}`,desc:C.desc,type:this._arrayTypeTransform(C.type),title:we.field};g=C==null?void 0:C.type}else m=`${m}.${k}`,w=w+k.length+1}return _}}_getFuncsDocVal(s,r,n){var l;const o=s.match(/[a-zA-Z_][a-zA-Z_0-9]*(\s*\.\s*[a-zA-Z_][a-zA-Z_0-9]*)*(?=\s*\()/g);if(o){const p=this._matchContent(o,s,r);if(p){const u={docValue:void 0,isBuildIn:!0,endIndex:p.endIndex,index:0},m=this._getBuildInFunc(p.name);if(m)return u.index=this._getOverloadsFuncIndex(m,r,p.name,n),Object.assign(u,{docValue:m});const _=this._getUserFuncsDocVal(p.name);if(_)return u.index=this._getOverloadsFuncIndex(_,r,p.name,n),Object.assign(u,{docValue:_,isBuildIn:!1});const g=this._getUserVarFuncsDocVal(s,p.name,r,n);if(g)return Object.assign(u,{docValue:[g],isBuildIn:!1});const h=p.name.split("."),w=((l=h.pop())==null?void 0:l.length)||0;if(r>p.endIndex-w-1)return;const k=this._getBuildInOther(h.join("."));if(k)return Object.assign(u,{docValue:k,endIndex:p.endIndex-w-1})}}}_getOverloadsFuncIndex(s,r,n,o){if(s.length>1){const l=this._overloadsFuncs.find(p=>p.name===n&&p.line===o&&p.startColumn<=r&&p.endColumn>=r);if(l)return l.index}return 0}_getUserFuncsDocVal(s){const r=this._userFunctions.get(s);if(r){for(const n of r)n.title=we.userDefinedFunction;return r}}_getUserMethodsDocVal(s){const r=this._userMethods.get(s);if(r){for(const n of r)n.title=we.userDefinedFunction;return r}}_getUserVarFuncsDocVal(s,r,n,o){var l;if(r.includes(".")){const p=r.split("."),u=this._getTypesAndFileds(s,r,n,o);if(typeof u=="string"){const _=`${this._arrayTypeTransform(u).replace(/<[^<>]+>/,"").replace(/(series|simple|const|input)\s+([\w\d.]+)/,"$2")}.${p.pop()}`,g=this._getBuildInMethod(_);if(g){const h=this._getOverloadsFuncIndex(g,n,_,o);return{...g[0],name:_,index:h}}return(l=this._getUserMethodsDocVal(_))==null?void 0:l[0]}else return u}}_arrayTypeTransform(s=""){return s.includes("[]")?`array<${s.replace("[]","")}>`:s}_matchContent(s,r,n){let o=0;for(const l of s){o=n-l.length;const p=r.indexOf(l,o);if(o=p+l.length,this._judgeVal(r,p,o)&&p+1<=n&&o>=n)return{name:l,endIndex:o}}}_judgeVal(s,r,n){const o=s.charAt(r-1),l=/[\w\d."']/;if(l.test(o))return!1;const p=s.charAt(n);return!l.test(p)}}const vs=new Hu;var da={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
- */pa.exports,function(a,s){(function(){var r,n="4.17.21",o=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",p="Expected a function",u="Invalid `variable` option passed into `_.template`",m="__lodash_hash_undefined__",_=500,g="__lodash_placeholder__",h=1,w=2,k=4,S=1,C=2,B=1,W=2,H=4,ee=8,N=16,M=32,E=64,$=128,P=256,j=512,X=30,xe="...",rt=800,He=16,Ee=1,Z=2,ye=3,ze=1/0,ge=9007199254740991,Ue=17976931348623157e292,Ge=NaN,re=4294967295,ve=re-1,Ke=re>>>1,kt=[["ary",$],["bind",B],["bindKey",W],["curry",ee],["curryRight",N],["flip",j],["partial",M],["partialRight",E],["rearg",P]],Xe="[object Arguments]",cs="[object Array]",Ir="[object AsyncFunction]",jt="[object Boolean]",Xt="[object Date]",Ks="[object DOMException]",$s="[object Error]",ks="[object Function]",va="[object GeneratorFunction]",ft="[object Map]",Ht="[object Number]",js="[object Null]",It="[object Object]",Ar="[object Promise]",Hs="[object Proxy]",Is="[object RegExp]",gt="[object Set]",Yt="[object String]",Ws="[object Symbol]",Gn="[object Undefined]",ps="[object WeakMap]",Ta="[object WeakSet]",Pt="[object ArrayBuffer]",ds="[object DataView]",Vs="[object Float32Array]",Gs="[object Float64Array]",As="[object Int8Array]",qr="[object Int16Array]",Cr="[object Int32Array]",Sr="[object Uint8Array]",zr="[object Uint8ClampedArray]",Nr="[object Uint16Array]",Er="[object Uint32Array]",Xn=/\b__p \+= '';/g,Lr=/\b(__p \+=) '' \+/g,Da=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Qt=/&(?:amp|lt|gt|quot|#39);/g,Xs=/[&<>"']/g,Or=RegExp(Qt.source),ka=RegExp(Xs.source),Yn=/<%-([\s\S]+?)%>/g,Ia=/<%([\s\S]+?)%>/g,Aa=/<%=([\s\S]+?)%>/g,qa=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ca=/^\w*$/,Qn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pr=/[\\^$.*+?()[\]{}|]/g,Sa=RegExp(Pr.source),Mr=/^\s+/,Zn=/\s/,Jn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ei=/\{\n\/\* \[wrapped with (.+)\] \*/,x=/,? & /,K=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,V=/[()=,{}\[\]\/\s]/,ae=/\\(\\)?/g,he=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,De=/\w*$/,_e=/^[-+]0x[0-9a-f]+$/i,ue=/^0b[01]+$/i,Qe=/^\[object .+?Constructor\]$/,Oe=/^0o[0-7]+$/i,Fe=/^(?:0|[1-9]\d*)$/,lt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Mt=/($^)/,za=/['\n\r\u2028\u2029\\]/g,ct="\\ud800-\\udfff",My="\\u0300-\\u036f",Ry="\\ufe20-\\ufe2f",Fy="\\u20d0-\\u20ff",Cl=My+Ry+Fy,Sl="\\u2700-\\u27bf",zl="a-z\\xdf-\\xf6\\xf8-\\xff",By="\\xac\\xb1\\xd7\\xf7",Uy="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ky="\\u2000-\\u206f",$y=" \\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",Nl="A-Z\\xc0-\\xd6\\xd8-\\xde",El="\\ufe0e\\ufe0f",Ll=By+Uy+Ky+$y,ti="['’]",jy="["+ct+"]",Ol="["+Ll+"]",Na="["+Cl+"]",Pl="\\d+",Hy="["+Sl+"]",Ml="["+zl+"]",Rl="[^"+ct+Ll+Pl+Sl+zl+Nl+"]",si="\\ud83c[\\udffb-\\udfff]",Wy="(?:"+Na+"|"+si+")",Fl="[^"+ct+"]",ri="(?:\\ud83c[\\udde6-\\uddff]){2}",ai="[\\ud800-\\udbff][\\udc00-\\udfff]",Ys="["+Nl+"]",Bl="\\u200d",Ul="(?:"+Ml+"|"+Rl+")",Vy="(?:"+Ys+"|"+Rl+")",Kl="(?:"+ti+"(?:d|ll|m|re|s|t|ve))?",$l="(?:"+ti+"(?:D|LL|M|RE|S|T|VE))?",jl=Wy+"?",Hl="["+El+"]?",Gy="(?:"+Bl+"(?:"+[Fl,ri,ai].join("|")+")"+Hl+jl+")*",Xy="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Yy="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Wl=Hl+jl+Gy,Qy="(?:"+[Hy,ri,ai].join("|")+")"+Wl,Zy="(?:"+[Fl+Na+"?",Na,ri,ai,jy].join("|")+")",Jy=RegExp(ti,"g"),e_=RegExp(Na,"g"),ni=RegExp(si+"(?="+si+")|"+Zy+Wl,"g"),t_=RegExp([Ys+"?"+Ml+"+"+Kl+"(?="+[Ol,Ys,"$"].join("|")+")",Vy+"+"+$l+"(?="+[Ol,Ys+Ul,"$"].join("|")+")",Ys+"?"+Ul+"+"+Kl,Ys+"+"+$l,Yy,Xy,Pl,Qy].join("|"),"g"),s_=RegExp("["+Bl+ct+Cl+El+"]"),r_=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,a_=["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"],n_=-1,Ne={};Ne[Vs]=Ne[Gs]=Ne[As]=Ne[qr]=Ne[Cr]=Ne[Sr]=Ne[zr]=Ne[Nr]=Ne[Er]=!0,Ne[Xe]=Ne[cs]=Ne[Pt]=Ne[jt]=Ne[ds]=Ne[Xt]=Ne[$s]=Ne[ks]=Ne[ft]=Ne[Ht]=Ne[It]=Ne[Is]=Ne[gt]=Ne[Yt]=Ne[ps]=!1;var Ce={};Ce[Xe]=Ce[cs]=Ce[Pt]=Ce[ds]=Ce[jt]=Ce[Xt]=Ce[Vs]=Ce[Gs]=Ce[As]=Ce[qr]=Ce[Cr]=Ce[ft]=Ce[Ht]=Ce[It]=Ce[Is]=Ce[gt]=Ce[Yt]=Ce[Ws]=Ce[Sr]=Ce[zr]=Ce[Nr]=Ce[Er]=!0,Ce[$s]=Ce[ks]=Ce[ps]=!1;var i_={À:"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"},o_={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},l_={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},c_={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},p_=parseFloat,d_=parseInt,Vl=typeof pr=="object"&&pr&&pr.Object===Object&&pr,u_=typeof self=="object"&&self&&self.Object===Object&&self,Ze=Vl||u_||Function("return this")(),ii=s&&!s.nodeType&&s,qs=ii&&!0&&a&&!a.nodeType&&a,Gl=qs&&qs.exports===ii,oi=Gl&&Vl.process,At=function(){try{var T=qs&&qs.require&&qs.require("util").types;return T||oi&&oi.binding&&oi.binding("util")}catch{}}(),Xl=At&&At.isArrayBuffer,Yl=At&&At.isDate,Ql=At&&At.isMap,Zl=At&&At.isRegExp,Jl=At&&At.isSet,ec=At&&At.isTypedArray;function bt(T,z,I){switch(I.length){case 0:return T.call(z);case 1:return T.call(z,I[0]);case 2:return T.call(z,I[0],I[1]);case 3:return T.call(z,I[0],I[1],I[2])}return T.apply(z,I)}function m_(T,z,I,Y){for(var ie=-1,Te=T==null?0:T.length;++ie<Te;){var We=T[ie];z(Y,We,I(We),T)}return Y}function qt(T,z){for(var I=-1,Y=T==null?0:T.length;++I<Y&&z(T[I],I,T)!==!1;);return T}function y_(T,z){for(var I=T==null?0:T.length;I--&&z(T[I],I,T)!==!1;);return T}function tc(T,z){for(var I=-1,Y=T==null?0:T.length;++I<Y;)if(!z(T[I],I,T))return!1;return!0}function us(T,z){for(var I=-1,Y=T==null?0:T.length,ie=0,Te=[];++I<Y;){var We=T[I];z(We,I,T)&&(Te[ie++]=We)}return Te}function Ea(T,z){var I=T==null?0:T.length;return!!I&&Qs(T,z,0)>-1}function li(T,z,I){for(var Y=-1,ie=T==null?0:T.length;++Y<ie;)if(I(z,T[Y]))return!0;return!1}function Le(T,z){for(var I=-1,Y=T==null?0:T.length,ie=Array(Y);++I<Y;)ie[I]=z(T[I],I,T);return ie}function ms(T,z){for(var I=-1,Y=z.length,ie=T.length;++I<Y;)T[ie+I]=z[I];return T}function ci(T,z,I,Y){var ie=-1,Te=T==null?0:T.length;for(Y&&Te&&(I=T[++ie]);++ie<Te;)I=z(I,T[ie],ie,T);return I}function __(T,z,I,Y){var ie=T==null?0:T.length;for(Y&&ie&&(I=T[--ie]);ie--;)I=z(I,T[ie],ie,T);return I}function pi(T,z){for(var I=-1,Y=T==null?0:T.length;++I<Y;)if(z(T[I],I,T))return!0;return!1}var f_=di("length");function g_(T){return T.split("")}function b_(T){return T.match(K)||[]}function sc(T,z,I){var Y;return I(T,function(ie,Te,We){if(z(ie,Te,We))return Y=Te,!1}),Y}function La(T,z,I,Y){for(var ie=T.length,Te=I+(Y?1:-1);Y?Te--:++Te<ie;)if(z(T[Te],Te,T))return Te;return-1}function Qs(T,z,I){return z===z?S_(T,z,I):La(T,rc,I)}function x_(T,z,I,Y){for(var ie=I-1,Te=T.length;++ie<Te;)if(Y(T[ie],z))return ie;return-1}function rc(T){return T!==T}function ac(T,z){var I=T==null?0:T.length;return I?mi(T,z)/I:Ge}function di(T){return function(z){return z==null?r:z[T]}}function ui(T){return function(z){return T==null?r:T[z]}}function nc(T,z,I,Y,ie){return ie(T,function(Te,We,Ae){I=Y?(Y=!1,Te):z(I,Te,We,Ae)}),I}function h_(T,z){var I=T.length;for(T.sort(z);I--;)T[I]=T[I].value;return T}function mi(T,z){for(var I,Y=-1,ie=T.length;++Y<ie;){var Te=z(T[Y]);Te!==r&&(I=I===r?Te:I+Te)}return I}function yi(T,z){for(var I=-1,Y=Array(T);++I<T;)Y[I]=z(I);return Y}function w_(T,z){return Le(z,function(I){return[I,T[I]]})}function ic(T){return T&&T.slice(0,pc(T)+1).replace(Mr,"")}function xt(T){return function(z){return T(z)}}function _i(T,z){return Le(z,function(I){return T[I]})}function Rr(T,z){return T.has(z)}function oc(T,z){for(var I=-1,Y=T.length;++I<Y&&Qs(z,T[I],0)>-1;);return I}function lc(T,z){for(var I=T.length;I--&&Qs(z,T[I],0)>-1;);return I}function v_(T,z){for(var I=T.length,Y=0;I--;)T[I]===z&&++Y;return Y}var T_=ui(i_),D_=ui(o_);function k_(T){return"\\"+c_[T]}function I_(T,z){return T==null?r:T[z]}function Zs(T){return s_.test(T)}function A_(T){return r_.test(T)}function q_(T){for(var z,I=[];!(z=T.next()).done;)I.push(z.value);return I}function fi(T){var z=-1,I=Array(T.size);return T.forEach(function(Y,ie){I[++z]=[ie,Y]}),I}function cc(T,z){return function(I){return T(z(I))}}function ys(T,z){for(var I=-1,Y=T.length,ie=0,Te=[];++I<Y;){var We=T[I];(We===z||We===g)&&(T[I]=g,Te[ie++]=I)}return Te}function Oa(T){var z=-1,I=Array(T.size);return T.forEach(function(Y){I[++z]=Y}),I}function C_(T){var z=-1,I=Array(T.size);return T.forEach(function(Y){I[++z]=[Y,Y]}),I}function S_(T,z,I){for(var Y=I-1,ie=T.length;++Y<ie;)if(T[Y]===z)return Y;return-1}function z_(T,z,I){for(var Y=I+1;Y--;)if(T[Y]===z)return Y;return Y}function Js(T){return Zs(T)?E_(T):f_(T)}function Rt(T){return Zs(T)?L_(T):g_(T)}function pc(T){for(var z=T.length;z--&&Zn.test(T.charAt(z)););return z}var N_=ui(l_);function E_(T){for(var z=ni.lastIndex=0;ni.test(T);)++z;return z}function L_(T){return T.match(ni)||[]}function O_(T){return T.match(t_)||[]}var P_=function T(z){z=z==null?Ze:er.defaults(Ze.Object(),z,er.pick(Ze,a_));var I=z.Array,Y=z.Date,ie=z.Error,Te=z.Function,We=z.Math,Ae=z.Object,gi=z.RegExp,M_=z.String,Ct=z.TypeError,Pa=I.prototype,R_=Te.prototype,tr=Ae.prototype,Ma=z["__core-js_shared__"],Ra=R_.toString,Ie=tr.hasOwnProperty,F_=0,dc=function(){var e=/[^.]+$/.exec(Ma&&Ma.keys&&Ma.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Fa=tr.toString,B_=Ra.call(Ae),U_=Ze._,K_=gi("^"+Ra.call(Ie).replace(Pr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ba=Gl?z.Buffer:r,_s=z.Symbol,Ua=z.Uint8Array,uc=Ba?Ba.allocUnsafe:r,Ka=cc(Ae.getPrototypeOf,Ae),mc=Ae.create,yc=tr.propertyIsEnumerable,$a=Pa.splice,_c=_s?_s.isConcatSpreadable:r,Fr=_s?_s.iterator:r,Cs=_s?_s.toStringTag:r,ja=function(){try{var e=Ls(Ae,"defineProperty");return e({},"",{}),e}catch{}}(),$_=z.clearTimeout!==Ze.clearTimeout&&z.clearTimeout,j_=Y&&Y.now!==Ze.Date.now&&Y.now,H_=z.setTimeout!==Ze.setTimeout&&z.setTimeout,Ha=We.ceil,Wa=We.floor,bi=Ae.getOwnPropertySymbols,W_=Ba?Ba.isBuffer:r,fc=z.isFinite,V_=Pa.join,G_=cc(Ae.keys,Ae),Ve=We.max,tt=We.min,X_=Y.now,Y_=z.parseInt,gc=We.random,Q_=Pa.reverse,xi=Ls(z,"DataView"),Br=Ls(z,"Map"),hi=Ls(z,"Promise"),sr=Ls(z,"Set"),Ur=Ls(z,"WeakMap"),Kr=Ls(Ae,"create"),Va=Ur&&new Ur,rr={},Z_=Os(xi),J_=Os(Br),ef=Os(hi),tf=Os(sr),sf=Os(Ur),Ga=_s?_s.prototype:r,$r=Ga?Ga.valueOf:r,bc=Ga?Ga.toString:r;function y(e){if(Be(e)&&!oe(e)&&!(e instanceof fe)){if(e instanceof St)return e;if(Ie.call(e,"__wrapped__"))return xp(e)}return new St(e)}var ar=function(){function e(){}return function(t){if(!Pe(t))return{};if(mc)return mc(t);e.prototype=t;var i=new e;return e.prototype=r,i}}();function Xa(){}function St(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}y.templateSettings={escape:Yn,evaluate:Ia,interpolate:Aa,variable:"",imports:{_:y}},y.prototype=Xa.prototype,y.prototype.constructor=y,St.prototype=ar(Xa.prototype),St.prototype.constructor=St;function fe(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=re,this.__views__=[]}function rf(){var e=new fe(this.__wrapped__);return e.__actions__=pt(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=pt(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=pt(this.__views__),e}function af(){if(this.__filtered__){var e=new fe(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function nf(){var e=this.__wrapped__.value(),t=this.__dir__,i=oe(e),c=t<0,d=i?e.length:0,f=bg(0,d,this.__views__),b=f.start,v=f.end,D=v-b,L=c?v:b-1,O=this.__iteratees__,R=O.length,G=0,Q=tt(D,this.__takeCount__);if(!i||!c&&d==D&&Q==D)return Kc(e,this.__actions__);var te=[];e:for(;D--&&G<Q;){L+=t;for(var pe=-1,se=e[L];++pe<R;){var me=O[pe],be=me.iteratee,vt=me.type,it=be(se);if(vt==Z)se=it;else if(!it){if(vt==Ee)continue e;break e}}te[G++]=se}return te}fe.prototype=ar(Xa.prototype),fe.prototype.constructor=fe;function Ss(e){var t=-1,i=e==null?0:e.length;for(this.clear();++t<i;){var c=e[t];this.set(c[0],c[1])}}function of(){this.__data__=Kr?Kr(null):{},this.size=0}function lf(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function cf(e){var t=this.__data__;if(Kr){var i=t[e];return i===m?r:i}return Ie.call(t,e)?t[e]:r}function pf(e){var t=this.__data__;return Kr?t[e]!==r:Ie.call(t,e)}function df(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=Kr&&t===r?m:t,this}Ss.prototype.clear=of,Ss.prototype.delete=lf,Ss.prototype.get=cf,Ss.prototype.has=pf,Ss.prototype.set=df;function Zt(e){var t=-1,i=e==null?0:e.length;for(this.clear();++t<i;){var c=e[t];this.set(c[0],c[1])}}function uf(){this.__data__=[],this.size=0}function mf(e){var t=this.__data__,i=Ya(t,e);if(i<0)return!1;var c=t.length-1;return i==c?t.pop():$a.call(t,i,1),--this.size,!0}function yf(e){var t=this.__data__,i=Ya(t,e);return i<0?r:t[i][1]}function _f(e){return Ya(this.__data__,e)>-1}function ff(e,t){var i=this.__data__,c=Ya(i,e);return c<0?(++this.size,i.push([e,t])):i[c][1]=t,this}Zt.prototype.clear=uf,Zt.prototype.delete=mf,Zt.prototype.get=yf,Zt.prototype.has=_f,Zt.prototype.set=ff;function Jt(e){var t=-1,i=e==null?0:e.length;for(this.clear();++t<i;){var c=e[t];this.set(c[0],c[1])}}function gf(){this.size=0,this.__data__={hash:new Ss,map:new(Br||Zt),string:new Ss}}function bf(e){var t=cn(this,e).delete(e);return this.size-=t?1:0,t}function xf(e){return cn(this,e).get(e)}function hf(e){return cn(this,e).has(e)}function wf(e,t){var i=cn(this,e),c=i.size;return i.set(e,t),this.size+=i.size==c?0:1,this}Jt.prototype.clear=gf,Jt.prototype.delete=bf,Jt.prototype.get=xf,Jt.prototype.has=hf,Jt.prototype.set=wf;function zs(e){var t=-1,i=e==null?0:e.length;for(this.__data__=new Jt;++t<i;)this.add(e[t])}function vf(e){return this.__data__.set(e,m),this}function Tf(e){return this.__data__.has(e)}zs.prototype.add=zs.prototype.push=vf,zs.prototype.has=Tf;function Ft(e){var t=this.__data__=new Zt(e);this.size=t.size}function Df(){this.__data__=new Zt,this.size=0}function kf(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i}function If(e){return this.__data__.get(e)}function Af(e){return this.__data__.has(e)}function qf(e,t){var i=this.__data__;if(i instanceof Zt){var c=i.__data__;if(!Br||c.length<o-1)return c.push([e,t]),this.size=++i.size,this;i=this.__data__=new Jt(c)}return i.set(e,t),this.size=i.size,this}Ft.prototype.clear=Df,Ft.prototype.delete=kf,Ft.prototype.get=If,Ft.prototype.has=Af,Ft.prototype.set=qf;function xc(e,t){var i=oe(e),c=!i&&Ps(e),d=!i&&!c&&hs(e),f=!i&&!c&&!d&&lr(e),b=i||c||d||f,v=b?yi(e.length,M_):[],D=v.length;for(var L in e)(t||Ie.call(e,L))&&!(b&&(L=="length"||d&&(L=="offset"||L=="parent")||f&&(L=="buffer"||L=="byteLength"||L=="byteOffset")||rs(L,D)))&&v.push(L);return v}function hc(e){var t=e.length;return t?e[zi(0,t-1)]:r}function Cf(e,t){return pn(pt(e),Ns(t,0,e.length))}function Sf(e){return pn(pt(e))}function wi(e,t,i){(i!==r&&!Bt(e[t],i)||i===r&&!(t in e))&&es(e,t,i)}function jr(e,t,i){var c=e[t];(!(Ie.call(e,t)&&Bt(c,i))||i===r&&!(t in e))&&es(e,t,i)}function Ya(e,t){for(var i=e.length;i--;)if(Bt(e[i][0],t))return i;return-1}function zf(e,t,i,c){return fs(e,function(d,f,b){t(c,d,i(d),b)}),c}function wc(e,t){return e&&Vt(t,Ye(t),e)}function Nf(e,t){return e&&Vt(t,ut(t),e)}function es(e,t,i){t=="__proto__"&&ja?ja(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}function vi(e,t){for(var i=-1,c=t.length,d=I(c),f=e==null;++i<c;)d[i]=f?r:so(e,t[i]);return d}function Ns(e,t,i){return e===e&&(i!==r&&(e=e<=i?e:i),t!==r&&(e=e>=t?e:t)),e}function zt(e,t,i,c,d,f){var b,v=t&h,D=t&w,L=t&k;if(i&&(b=d?i(e,c,d,f):i(e)),b!==r)return b;if(!Pe(e))return e;var O=oe(e);if(O){if(b=hg(e),!v)return pt(e,b)}else{var R=st(e),G=R==ks||R==va;if(hs(e))return Hc(e,v);if(R==It||R==Xe||G&&!d){if(b=D||G?{}:pp(e),!v)return D?cg(e,Nf(b,e)):lg(e,wc(b,e))}else{if(!Ce[R])return d?e:{};b=wg(e,R,v)}}f||(f=new Ft);var Q=f.get(e);if(Q)return Q;f.set(e,b),Fp(e)?e.forEach(function(se){b.add(zt(se,t,i,se,e,f))}):Mp(e)&&e.forEach(function(se,me){b.set(me,zt(se,t,i,me,e,f))});var te=L?D?Ki:Ui:D?ut:Ye,pe=O?r:te(e);return qt(pe||e,function(se,me){pe&&(me=se,se=e[me]),jr(b,me,zt(se,t,i,me,e,f))}),b}function Ef(e){var t=Ye(e);return function(i){return vc(i,e,t)}}function vc(e,t,i){var c=i.length;if(e==null)return!c;for(e=Ae(e);c--;){var d=i[c],f=t[d],b=e[d];if(b===r&&!(d in e)||!f(b))return!1}return!0}function Tc(e,t,i){if(typeof e!="function")throw new Ct(p);return Qr(function(){e.apply(r,i)},t)}function Hr(e,t,i,c){var d=-1,f=Ea,b=!0,v=e.length,D=[],L=t.length;if(!v)return D;i&&(t=Le(t,xt(i))),c?(f=li,b=!1):t.length>=o&&(f=Rr,b=!1,t=new zs(t));e:for(;++d<v;){var O=e[d],R=i==null?O:i(O);if(O=c||O!==0?O:0,b&&R===R){for(var G=L;G--;)if(t[G]===R)continue e;D.push(O)}else f(t,R,c)||D.push(O)}return D}var fs=Yc(Wt),Dc=Yc(Di,!0);function Lf(e,t){var i=!0;return fs(e,function(c,d,f){return i=!!t(c,d,f),i}),i}function Qa(e,t,i){for(var c=-1,d=e.length;++c<d;){var f=e[c],b=t(f);if(b!=null&&(v===r?b===b&&!wt(b):i(b,v)))var v=b,D=f}return D}function Of(e,t,i,c){var d=e.length;for(i=le(i),i<0&&(i=-i>d?0:d+i),c=c===r||c>d?d:le(c),c<0&&(c+=d),c=i>c?0:Up(c);i<c;)e[i++]=t;return e}function kc(e,t){var i=[];return fs(e,function(c,d,f){t(c,d,f)&&i.push(c)}),i}function Je(e,t,i,c,d){var f=-1,b=e.length;for(i||(i=Tg),d||(d=[]);++f<b;){var v=e[f];t>0&&i(v)?t>1?Je(v,t-1,i,c,d):ms(d,v):c||(d[d.length]=v)}return d}var Ti=Qc(),Ic=Qc(!0);function Wt(e,t){return e&&Ti(e,t,Ye)}function Di(e,t){return e&&Ic(e,t,Ye)}function Za(e,t){return us(t,function(i){return as(e[i])})}function Es(e,t){t=bs(t,e);for(var i=0,c=t.length;e!=null&&i<c;)e=e[Gt(t[i++])];return i&&i==c?e:r}function Ac(e,t,i){var c=t(e);return oe(e)?c:ms(c,i(e))}function at(e){return e==null?e===r?Gn:js:Cs&&Cs in Ae(e)?gg(e):Sg(e)}function ki(e,t){return e>t}function Pf(e,t){return e!=null&&Ie.call(e,t)}function Mf(e,t){return e!=null&&t in Ae(e)}function Rf(e,t,i){return e>=tt(t,i)&&e<Ve(t,i)}function Ii(e,t,i){for(var c=i?li:Ea,d=e[0].length,f=e.length,b=f,v=I(f),D=1/0,L=[];b--;){var O=e[b];b&&t&&(O=Le(O,xt(t))),D=tt(O.length,D),v[b]=!i&&(t||d>=120&&O.length>=120)?new zs(b&&O):r}O=e[0];var R=-1,G=v[0];e:for(;++R<d&&L.length<D;){var Q=O[R],te=t?t(Q):Q;if(Q=i||Q!==0?Q:0,!(G?Rr(G,te):c(L,te,i))){for(b=f;--b;){var pe=v[b];if(!(pe?Rr(pe,te):c(e[b],te,i)))continue e}G&&G.push(te),L.push(Q)}}return L}function Ff(e,t,i,c){return Wt(e,function(d,f,b){t(c,i(d),f,b)}),c}function Wr(e,t,i){t=bs(t,e),e=yp(e,t);var c=e==null?e:e[Gt(Et(t))];return c==null?r:bt(c,e,i)}function qc(e){return Be(e)&&at(e)==Xe}function Bf(e){return Be(e)&&at(e)==Pt}function Uf(e){return Be(e)&&at(e)==Xt}function Vr(e,t,i,c,d){return e===t?!0:e==null||t==null||!Be(e)&&!Be(t)?e!==e&&t!==t:Kf(e,t,i,c,Vr,d)}function Kf(e,t,i,c,d,f){var b=oe(e),v=oe(t),D=b?cs:st(e),L=v?cs:st(t);D=D==Xe?It:D,L=L==Xe?It:L;var O=D==It,R=L==It,G=D==L;if(G&&hs(e)){if(!hs(t))return!1;b=!0,O=!1}if(G&&!O)return f||(f=new Ft),b||lr(e)?op(e,t,i,c,d,f):_g(e,t,D,i,c,d,f);if(!(i&S)){var Q=O&&Ie.call(e,"__wrapped__"),te=R&&Ie.call(t,"__wrapped__");if(Q||te){var pe=Q?e.value():e,se=te?t.value():t;return f||(f=new Ft),d(pe,se,i,c,f)}}return G?(f||(f=new Ft),fg(e,t,i,c,d,f)):!1}function $f(e){return Be(e)&&st(e)==ft}function Ai(e,t,i,c){var d=i.length,f=d,b=!c;if(e==null)return!f;for(e=Ae(e);d--;){var v=i[d];if(b&&v[2]?v[1]!==e[v[0]]:!(v[0]in e))return!1}for(;++d<f;){v=i[d];var D=v[0],L=e[D],O=v[1];if(b&&v[2]){if(L===r&&!(D in e))return!1}else{var R=new Ft;if(c)var G=c(L,O,D,e,t,R);if(!(G===r?Vr(O,L,S|C,c,R):G))return!1}}return!0}function Cc(e){if(!Pe(e)||kg(e))return!1;var t=as(e)?K_:Qe;return t.test(Os(e))}function jf(e){return Be(e)&&at(e)==Is}function Hf(e){return Be(e)&&st(e)==gt}function Wf(e){return Be(e)&&fn(e.length)&&!!Ne[at(e)]}function Sc(e){return typeof e=="function"?e:e==null?mt:typeof e=="object"?oe(e)?Ec(e[0],e[1]):Nc(e):Zp(e)}function qi(e){if(!Yr(e))return G_(e);var t=[];for(var i in Ae(e))Ie.call(e,i)&&i!="constructor"&&t.push(i);return t}function Vf(e){if(!Pe(e))return Cg(e);var t=Yr(e),i=[];for(var c in e)c=="constructor"&&(t||!Ie.call(e,c))||i.push(c);return i}function Ci(e,t){return e<t}function zc(e,t){var i=-1,c=dt(e)?I(e.length):[];return fs(e,function(d,f,b){c[++i]=t(d,f,b)}),c}function Nc(e){var t=ji(e);return t.length==1&&t[0][2]?up(t[0][0],t[0][1]):function(i){return i===e||Ai(i,e,t)}}function Ec(e,t){return Wi(e)&&dp(t)?up(Gt(e),t):function(i){var c=so(i,e);return c===r&&c===t?ro(i,e):Vr(t,c,S|C)}}function Ja(e,t,i,c,d){e!==t&&Ti(t,function(f,b){if(d||(d=new Ft),Pe(f))Gf(e,t,b,i,Ja,c,d);else{var v=c?c(Gi(e,b),f,b+"",e,t,d):r;v===r&&(v=f),wi(e,b,v)}},ut)}function Gf(e,t,i,c,d,f,b){var v=Gi(e,i),D=Gi(t,i),L=b.get(D);if(L){wi(e,i,L);return}var O=f?f(v,D,i+"",e,t,b):r,R=O===r;if(R){var G=oe(D),Q=!G&&hs(D),te=!G&&!Q&&lr(D);O=D,G||Q||te?oe(v)?O=v:$e(v)?O=pt(v):Q?(R=!1,O=Hc(D,!0)):te?(R=!1,O=Wc(D,!0)):O=[]:Zr(D)||Ps(D)?(O=v,Ps(v)?O=Kp(v):(!Pe(v)||as(v))&&(O=pp(D))):R=!1}R&&(b.set(D,O),d(O,D,c,f,b),b.delete(D)),wi(e,i,O)}function Lc(e,t){var i=e.length;if(i)return t+=t<0?i:0,rs(t,i)?e[t]:r}function Oc(e,t,i){t.length?t=Le(t,function(f){return oe(f)?function(b){return Es(b,f.length===1?f[0]:f)}:f}):t=[mt];var c=-1;t=Le(t,xt(J()));var d=zc(e,function(f,b,v){var D=Le(t,function(L){return L(f)});return{criteria:D,index:++c,value:f}});return h_(d,function(f,b){return og(f,b,i)})}function Xf(e,t){return Pc(e,t,function(i,c){return ro(e,c)})}function Pc(e,t,i){for(var c=-1,d=t.length,f={};++c<d;){var b=t[c],v=Es(e,b);i(v,b)&&Gr(f,bs(b,e),v)}return f}function Yf(e){return function(t){return Es(t,e)}}function Si(e,t,i,c){var d=c?x_:Qs,f=-1,b=t.length,v=e;for(e===t&&(t=pt(t)),i&&(v=Le(e,xt(i)));++f<b;)for(var D=0,L=t[f],O=i?i(L):L;(D=d(v,O,D,c))>-1;)v!==e&&$a.call(v,D,1),$a.call(e,D,1);return e}function Mc(e,t){for(var i=e?t.length:0,c=i-1;i--;){var d=t[i];if(i==c||d!==f){var f=d;rs(d)?$a.call(e,d,1):Li(e,d)}}return e}function zi(e,t){return e+Wa(gc()*(t-e+1))}function Qf(e,t,i,c){for(var d=-1,f=Ve(Ha((t-e)/(i||1)),0),b=I(f);f--;)b[c?f:++d]=e,e+=i;return b}function Ni(e,t){var i="";if(!e||t<1||t>ge)return i;do t%2&&(i+=e),t=Wa(t/2),t&&(e+=e);while(t);return i}function de(e,t){return Xi(mp(e,t,mt),e+"")}function Zf(e){return hc(cr(e))}function Jf(e,t){var i=cr(e);return pn(i,Ns(t,0,i.length))}function Gr(e,t,i,c){if(!Pe(e))return e;t=bs(t,e);for(var d=-1,f=t.length,b=f-1,v=e;v!=null&&++d<f;){var D=Gt(t[d]),L=i;if(D==="__proto__"||D==="constructor"||D==="prototype")return e;if(d!=b){var O=v[D];L=c?c(O,D,v):r,L===r&&(L=Pe(O)?O:rs(t[d+1])?[]:{})}jr(v,D,L),v=v[D]}return e}var Rc=Va?function(e,t){return Va.set(e,t),e}:mt,eg=ja?function(e,t){return ja(e,"toString",{configurable:!0,enumerable:!1,value:no(t),writable:!0})}:mt;function tg(e){return pn(cr(e))}function Nt(e,t,i){var c=-1,d=e.length;t<0&&(t=-t>d?0:d+t),i=i>d?d:i,i<0&&(i+=d),d=t>i?0:i-t>>>0,t>>>=0;for(var f=I(d);++c<d;)f[c]=e[c+t];return f}function sg(e,t){var i;return fs(e,function(c,d,f){return i=t(c,d,f),!i}),!!i}function en(e,t,i){var c=0,d=e==null?c:e.length;if(typeof t=="number"&&t===t&&d<=Ke){for(;c<d;){var f=c+d>>>1,b=e[f];b!==null&&!wt(b)&&(i?b<=t:b<t)?c=f+1:d=f}return d}return Ei(e,t,mt,i)}function Ei(e,t,i,c){var d=0,f=e==null?0:e.length;if(f===0)return 0;t=i(t);for(var b=t!==t,v=t===null,D=wt(t),L=t===r;d<f;){var O=Wa((d+f)/2),R=i(e[O]),G=R!==r,Q=R===null,te=R===R,pe=wt(R);if(b)var se=c||te;else L?se=te&&(c||G):v?se=te&&G&&(c||!Q):D?se=te&&G&&!Q&&(c||!pe):Q||pe?se=!1:se=c?R<=t:R<t;se?d=O+1:f=O}return tt(f,ve)}function Fc(e,t){for(var i=-1,c=e.length,d=0,f=[];++i<c;){var b=e[i],v=t?t(b):b;if(!i||!Bt(v,D)){var D=v;f[d++]=b===0?0:b}}return f}function Bc(e){return typeof e=="number"?e:wt(e)?Ge:+e}function ht(e){if(typeof e=="string")return e;if(oe(e))return Le(e,ht)+"";if(wt(e))return bc?bc.call(e):"";var t=e+"";return t=="0"&&1/e==-ze?"-0":t}function gs(e,t,i){var c=-1,d=Ea,f=e.length,b=!0,v=[],D=v;if(i)b=!1,d=li;else if(f>=o){var L=t?null:mg(e);if(L)return Oa(L);b=!1,d=Rr,D=new zs}else D=t?[]:v;e:for(;++c<f;){var O=e[c],R=t?t(O):O;if(O=i||O!==0?O:0,b&&R===R){for(var G=D.length;G--;)if(D[G]===R)continue e;t&&D.push(R),v.push(O)}else d(D,R,i)||(D!==v&&D.push(R),v.push(O))}return v}function Li(e,t){return t=bs(t,e),e=yp(e,t),e==null||delete e[Gt(Et(t))]}function Uc(e,t,i,c){return Gr(e,t,i(Es(e,t)),c)}function tn(e,t,i,c){for(var d=e.length,f=c?d:-1;(c?f--:++f<d)&&t(e[f],f,e););return i?Nt(e,c?0:f,c?f+1:d):Nt(e,c?f+1:0,c?d:f)}function Kc(e,t){var i=e;return i instanceof fe&&(i=i.value()),ci(t,function(c,d){return d.func.apply(d.thisArg,ms([c],d.args))},i)}function Oi(e,t,i){var c=e.length;if(c<2)return c?gs(e[0]):[];for(var d=-1,f=I(c);++d<c;)for(var b=e[d],v=-1;++v<c;)v!=d&&(f[d]=Hr(f[d]||b,e[v],t,i));return gs(Je(f,1),t,i)}function $c(e,t,i){for(var c=-1,d=e.length,f=t.length,b={};++c<d;){var v=c<f?t[c]:r;i(b,e[c],v)}return b}function Pi(e){return $e(e)?e:[]}function Mi(e){return typeof e=="function"?e:mt}function bs(e,t){return oe(e)?e:Wi(e,t)?[e]:bp(ke(e))}var rg=de;function xs(e,t,i){var c=e.length;return i=i===r?c:i,!t&&i>=c?e:Nt(e,t,i)}var jc=$_||function(e){return Ze.clearTimeout(e)};function Hc(e,t){if(t)return e.slice();var i=e.length,c=uc?uc(i):new e.constructor(i);return e.copy(c),c}function Ri(e){var t=new e.constructor(e.byteLength);return new Ua(t).set(new Ua(e)),t}function ag(e,t){var i=t?Ri(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}function ng(e){var t=new e.constructor(e.source,De.exec(e));return t.lastIndex=e.lastIndex,t}function ig(e){return $r?Ae($r.call(e)):{}}function Wc(e,t){var i=t?Ri(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}function Vc(e,t){if(e!==t){var i=e!==r,c=e===null,d=e===e,f=wt(e),b=t!==r,v=t===null,D=t===t,L=wt(t);if(!v&&!L&&!f&&e>t||f&&b&&D&&!v&&!L||c&&b&&D||!i&&D||!d)return 1;if(!c&&!f&&!L&&e<t||L&&i&&d&&!c&&!f||v&&i&&d||!b&&d||!D)return-1}return 0}function og(e,t,i){for(var c=-1,d=e.criteria,f=t.criteria,b=d.length,v=i.length;++c<b;){var D=Vc(d[c],f[c]);if(D){if(c>=v)return D;var L=i[c];return D*(L=="desc"?-1:1)}}return e.index-t.index}function Gc(e,t,i,c){for(var d=-1,f=e.length,b=i.length,v=-1,D=t.length,L=Ve(f-b,0),O=I(D+L),R=!c;++v<D;)O[v]=t[v];for(;++d<b;)(R||d<f)&&(O[i[d]]=e[d]);for(;L--;)O[v++]=e[d++];return O}function Xc(e,t,i,c){for(var d=-1,f=e.length,b=-1,v=i.length,D=-1,L=t.length,O=Ve(f-v,0),R=I(O+L),G=!c;++d<O;)R[d]=e[d];for(var Q=d;++D<L;)R[Q+D]=t[D];for(;++b<v;)(G||d<f)&&(R[Q+i[b]]=e[d++]);return R}function pt(e,t){var i=-1,c=e.length;for(t||(t=I(c));++i<c;)t[i]=e[i];return t}function Vt(e,t,i,c){var d=!i;i||(i={});for(var f=-1,b=t.length;++f<b;){var v=t[f],D=c?c(i[v],e[v],v,i,e):r;D===r&&(D=e[v]),d?es(i,v,D):jr(i,v,D)}return i}function lg(e,t){return Vt(e,Hi(e),t)}function cg(e,t){return Vt(e,lp(e),t)}function sn(e,t){return function(i,c){var d=oe(i)?m_:zf,f=t?t():{};return d(i,e,J(c,2),f)}}function nr(e){return de(function(t,i){var c=-1,d=i.length,f=d>1?i[d-1]:r,b=d>2?i[2]:r;for(f=e.length>3&&typeof f=="function"?(d--,f):r,b&&nt(i[0],i[1],b)&&(f=d<3?r:f,d=1),t=Ae(t);++c<d;){var v=i[c];v&&e(t,v,c,f)}return t})}function Yc(e,t){return function(i,c){if(i==null)return i;if(!dt(i))return e(i,c);for(var d=i.length,f=t?d:-1,b=Ae(i);(t?f--:++f<d)&&c(b[f],f,b)!==!1;);return i}}function Qc(e){return function(t,i,c){for(var d=-1,f=Ae(t),b=c(t),v=b.length;v--;){var D=b[e?v:++d];if(i(f[D],D,f)===!1)break}return t}}function pg(e,t,i){var c=t&B,d=Xr(e);function f(){var b=this&&this!==Ze&&this instanceof f?d:e;return b.apply(c?i:this,arguments)}return f}function Zc(e){return function(t){t=ke(t);var i=Zs(t)?Rt(t):r,c=i?i[0]:t.charAt(0),d=i?xs(i,1).join(""):t.slice(1);return c[e]()+d}}function ir(e){return function(t){return ci(Yp(Xp(t).replace(Jy,"")),e,"")}}function Xr(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 i=ar(e.prototype),c=e.apply(i,t);return Pe(c)?c:i}}function dg(e,t,i){var c=Xr(e);function d(){for(var f=arguments.length,b=I(f),v=f,D=or(d);v--;)b[v]=arguments[v];var L=f<3&&b[0]!==D&&b[f-1]!==D?[]:ys(b,D);if(f-=L.length,f<i)return rp(e,t,rn,d.placeholder,r,b,L,r,r,i-f);var O=this&&this!==Ze&&this instanceof d?c:e;return bt(O,this,b)}return d}function Jc(e){return function(t,i,c){var d=Ae(t);if(!dt(t)){var f=J(i,3);t=Ye(t),i=function(v){return f(d[v],v,d)}}var b=e(t,i,c);return b>-1?d[f?t[b]:b]:r}}function ep(e){return ss(function(t){var i=t.length,c=i,d=St.prototype.thru;for(e&&t.reverse();c--;){var f=t[c];if(typeof f!="function")throw new Ct(p);if(d&&!b&&ln(f)=="wrapper")var b=new St([],!0)}for(c=b?c:i;++c<i;){f=t[c];var v=ln(f),D=v=="wrapper"?$i(f):r;D&&Vi(D[0])&&D[1]==($|ee|M|P)&&!D[4].length&&D[9]==1?b=b[ln(D[0])].apply(b,D[3]):b=f.length==1&&Vi(f)?b[v]():b.thru(f)}return function(){var L=arguments,O=L[0];if(b&&L.length==1&&oe(O))return b.plant(O).value();for(var R=0,G=i?t[R].apply(this,L):O;++R<i;)G=t[R].call(this,G);return G}})}function rn(e,t,i,c,d,f,b,v,D,L){var O=t&$,R=t&B,G=t&W,Q=t&(ee|N),te=t&j,pe=G?r:Xr(e);function se(){for(var me=arguments.length,be=I(me),vt=me;vt--;)be[vt]=arguments[vt];if(Q)var it=or(se),Tt=v_(be,it);if(c&&(be=Gc(be,c,d,Q)),f&&(be=Xc(be,f,b,Q)),me-=Tt,Q&&me<L){var je=ys(be,it);return rp(e,t,rn,se.placeholder,i,be,je,v,D,L-me)}var Ut=R?i:this,is=G?Ut[e]:e;return me=be.length,v?be=zg(be,v):te&&me>1&&be.reverse(),O&&D<me&&(be.length=D),this&&this!==Ze&&this instanceof se&&(is=pe||Xr(is)),is.apply(Ut,be)}return se}function tp(e,t){return function(i,c){return Ff(i,e,t(c),{})}}function an(e,t){return function(i,c){var d;if(i===r&&c===r)return t;if(i!==r&&(d=i),c!==r){if(d===r)return c;typeof i=="string"||typeof c=="string"?(i=ht(i),c=ht(c)):(i=Bc(i),c=Bc(c)),d=e(i,c)}return d}}function Fi(e){return ss(function(t){return t=Le(t,xt(J())),de(function(i){var c=this;return e(t,function(d){return bt(d,c,i)})})})}function nn(e,t){t=t===r?" ":ht(t);var i=t.length;if(i<2)return i?Ni(t,e):t;var c=Ni(t,Ha(e/Js(t)));return Zs(t)?xs(Rt(c),0,e).join(""):c.slice(0,e)}function ug(e,t,i,c){var d=t&B,f=Xr(e);function b(){for(var v=-1,D=arguments.length,L=-1,O=c.length,R=I(O+D),G=this&&this!==Ze&&this instanceof b?f:e;++L<O;)R[L]=c[L];for(;D--;)R[L++]=arguments[++v];return bt(G,d?i:this,R)}return b}function sp(e){return function(t,i,c){return c&&typeof c!="number"&&nt(t,i,c)&&(i=c=r),t=ns(t),i===r?(i=t,t=0):i=ns(i),c=c===r?t<i?1:-1:ns(c),Qf(t,i,c,e)}}function on(e){return function(t,i){return typeof t=="string"&&typeof i=="string"||(t=Lt(t),i=Lt(i)),e(t,i)}}function rp(e,t,i,c,d,f,b,v,D,L){var O=t&ee,R=O?b:r,G=O?r:b,Q=O?f:r,te=O?r:f;t|=O?M:E,t&=~(O?E:M),t&H||(t&=~(B|W));var pe=[e,t,d,Q,R,te,G,v,D,L],se=i.apply(r,pe);return Vi(e)&&_p(se,pe),se.placeholder=c,fp(se,e,t)}function Bi(e){var t=We[e];return function(i,c){if(i=Lt(i),c=c==null?0:tt(le(c),292),c&&fc(i)){var d=(ke(i)+"e").split("e"),f=t(d[0]+"e"+(+d[1]+c));return d=(ke(f)+"e").split("e"),+(d[0]+"e"+(+d[1]-c))}return t(i)}}var mg=sr&&1/Oa(new sr([,-0]))[1]==ze?function(e){return new sr(e)}:lo;function ap(e){return function(t){var i=st(t);return i==ft?fi(t):i==gt?C_(t):w_(t,e(t))}}function ts(e,t,i,c,d,f,b,v){var D=t&W;if(!D&&typeof e!="function")throw new Ct(p);var L=c?c.length:0;if(L||(t&=~(M|E),c=d=r),b=b===r?b:Ve(le(b),0),v=v===r?v:le(v),L-=d?d.length:0,t&E){var O=c,R=d;c=d=r}var G=D?r:$i(e),Q=[e,t,i,c,d,O,R,f,b,v];if(G&&qg(Q,G),e=Q[0],t=Q[1],i=Q[2],c=Q[3],d=Q[4],v=Q[9]=Q[9]===r?D?0:e.length:Ve(Q[9]-L,0),!v&&t&(ee|N)&&(t&=~(ee|N)),!t||t==B)var te=pg(e,t,i);else t==ee||t==N?te=dg(e,t,v):(t==M||t==(B|M))&&!d.length?te=ug(e,t,i,c):te=rn.apply(r,Q);var pe=G?Rc:_p;return fp(pe(te,Q),e,t)}function np(e,t,i,c){return e===r||Bt(e,tr[i])&&!Ie.call(c,i)?t:e}function ip(e,t,i,c,d,f){return Pe(e)&&Pe(t)&&(f.set(t,e),Ja(e,t,r,ip,f),f.delete(t)),e}function yg(e){return Zr(e)?r:e}function op(e,t,i,c,d,f){var b=i&S,v=e.length,D=t.length;if(v!=D&&!(b&&D>v))return!1;var L=f.get(e),O=f.get(t);if(L&&O)return L==t&&O==e;var R=-1,G=!0,Q=i&C?new zs:r;for(f.set(e,t),f.set(t,e);++R<v;){var te=e[R],pe=t[R];if(c)var se=b?c(pe,te,R,t,e,f):c(te,pe,R,e,t,f);if(se!==r){if(se)continue;G=!1;break}if(Q){if(!pi(t,function(me,be){if(!Rr(Q,be)&&(te===me||d(te,me,i,c,f)))return Q.push(be)})){G=!1;break}}else if(!(te===pe||d(te,pe,i,c,f))){G=!1;break}}return f.delete(e),f.delete(t),G}function _g(e,t,i,c,d,f,b){switch(i){case ds:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Pt:return!(e.byteLength!=t.byteLength||!f(new Ua(e),new Ua(t)));case jt:case Xt:case Ht:return Bt(+e,+t);case $s:return e.name==t.name&&e.message==t.message;case Is:case Yt:return e==t+"";case ft:var v=fi;case gt:var D=c&S;if(v||(v=Oa),e.size!=t.size&&!D)return!1;var L=b.get(e);if(L)return L==t;c|=C,b.set(e,t);var O=op(v(e),v(t),c,d,f,b);return b.delete(e),O;case Ws:if($r)return $r.call(e)==$r.call(t)}return!1}function fg(e,t,i,c,d,f){var b=i&S,v=Ui(e),D=v.length,L=Ui(t),O=L.length;if(D!=O&&!b)return!1;for(var R=D;R--;){var G=v[R];if(!(b?G in t:Ie.call(t,G)))return!1}var Q=f.get(e),te=f.get(t);if(Q&&te)return Q==t&&te==e;var pe=!0;f.set(e,t),f.set(t,e);for(var se=b;++R<D;){G=v[R];var me=e[G],be=t[G];if(c)var vt=b?c(be,me,G,t,e,f):c(me,be,G,e,t,f);if(!(vt===r?me===be||d(me,be,i,c,f):vt)){pe=!1;break}se||(se=G=="constructor")}if(pe&&!se){var it=e.constructor,Tt=t.constructor;it!=Tt&&"constructor"in e&&"constructor"in t&&!(typeof it=="function"&&it instanceof it&&typeof Tt=="function"&&Tt instanceof Tt)&&(pe=!1)}return f.delete(e),f.delete(t),pe}function ss(e){return Xi(mp(e,r,vp),e+"")}function Ui(e){return Ac(e,Ye,Hi)}function Ki(e){return Ac(e,ut,lp)}var $i=Va?function(e){return Va.get(e)}:lo;function ln(e){for(var t=e.name+"",i=rr[t],c=Ie.call(rr,t)?i.length:0;c--;){var d=i[c],f=d.func;if(f==null||f==e)return d.name}return t}function or(e){var t=Ie.call(y,"placeholder")?y:e;return t.placeholder}function J(){var e=y.iteratee||io;return e=e===io?Sc:e,arguments.length?e(arguments[0],arguments[1]):e}function cn(e,t){var i=e.__data__;return Dg(t)?i[typeof t=="string"?"string":"hash"]:i.map}function ji(e){for(var t=Ye(e),i=t.length;i--;){var c=t[i],d=e[c];t[i]=[c,d,dp(d)]}return t}function Ls(e,t){var i=I_(e,t);return Cc(i)?i:r}function gg(e){var t=Ie.call(e,Cs),i=e[Cs];try{e[Cs]=r;var c=!0}catch{}var d=Fa.call(e);return c&&(t?e[Cs]=i:delete e[Cs]),d}var Hi=bi?function(e){return e==null?[]:(e=Ae(e),us(bi(e),function(t){return yc.call(e,t)}))}:co,lp=bi?function(e){for(var t=[];e;)ms(t,Hi(e)),e=Ka(e);return t}:co,st=at;(xi&&st(new xi(new ArrayBuffer(1)))!=ds||Br&&st(new Br)!=ft||hi&&st(hi.resolve())!=Ar||sr&&st(new sr)!=gt||Ur&&st(new Ur)!=ps)&&(st=function(e){var t=at(e),i=t==It?e.constructor:r,c=i?Os(i):"";if(c)switch(c){case Z_:return ds;case J_:return ft;case ef:return Ar;case tf:return gt;case sf:return ps}return t});function bg(e,t,i){for(var c=-1,d=i.length;++c<d;){var f=i[c],b=f.size;switch(f.type){case"drop":e+=b;break;case"dropRight":t-=b;break;case"take":t=tt(t,e+b);break;case"takeRight":e=Ve(e,t-b);break}}return{start:e,end:t}}function xg(e){var t=e.match(ei);return t?t[1].split(x):[]}function cp(e,t,i){t=bs(t,e);for(var c=-1,d=t.length,f=!1;++c<d;){var b=Gt(t[c]);if(!(f=e!=null&&i(e,b)))break;e=e[b]}return f||++c!=d?f:(d=e==null?0:e.length,!!d&&fn(d)&&rs(b,d)&&(oe(e)||Ps(e)))}function hg(e){var t=e.length,i=new e.constructor(t);return t&&typeof e[0]=="string"&&Ie.call(e,"index")&&(i.index=e.index,i.input=e.input),i}function pp(e){return typeof e.constructor=="function"&&!Yr(e)?ar(Ka(e)):{}}function wg(e,t,i){var c=e.constructor;switch(t){case Pt:return Ri(e);case jt:case Xt:return new c(+e);case ds:return ag(e,i);case Vs:case Gs:case As:case qr:case Cr:case Sr:case zr:case Nr:case Er:return Wc(e,i);case ft:return new c;case Ht:case Yt:return new c(e);case Is:return ng(e);case gt:return new c;case Ws:return ig(e)}}function vg(e,t){var i=t.length;if(!i)return e;var c=i-1;return t[c]=(i>1?"& ":"")+t[c],t=t.join(i>2?", ":" "),e.replace(Jn,`{
118
+ */da.exports,function(a,s){(function(){var r,n="4.17.21",o=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",p="Expected a function",u="Invalid `variable` option passed into `_.template`",m="__lodash_hash_undefined__",_=500,g="__lodash_placeholder__",h=1,w=2,k=4,S=1,C=2,B=1,W=2,H=4,ee=8,N=16,M=32,E=64,$=128,P=256,j=512,X=30,xe="...",rt=800,He=16,Ee=1,Z=2,ye=3,ze=1/0,ge=9007199254740991,Ue=17976931348623157e292,Ge=NaN,re=4294967295,ve=re-1,Ke=re>>>1,It=[["ary",$],["bind",B],["bindKey",W],["curry",ee],["curryRight",N],["flip",j],["partial",M],["partialRight",E],["rearg",P]],Xe="[object Arguments]",ps="[object Array]",Ar="[object AsyncFunction]",Ht="[object Boolean]",Yt="[object Date]",$s="[object DOMException]",js="[object Error]",Is="[object Function]",Ta="[object GeneratorFunction]",ft="[object Map]",Wt="[object Number]",Hs="[object Null]",At="[object Object]",qr="[object Promise]",Ws="[object Proxy]",As="[object RegExp]",gt="[object Set]",Qt="[object String]",Vs="[object Symbol]",Xn="[object Undefined]",ds="[object WeakMap]",Da="[object WeakSet]",Mt="[object ArrayBuffer]",us="[object DataView]",Gs="[object Float32Array]",Xs="[object Float64Array]",qs="[object Int8Array]",Cr="[object Int16Array]",Sr="[object Int32Array]",zr="[object Uint8Array]",Nr="[object Uint8ClampedArray]",Er="[object Uint16Array]",Lr="[object Uint32Array]",Yn=/\b__p \+= '';/g,Or=/\b(__p \+=) '' \+/g,ka=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Zt=/&(?:amp|lt|gt|quot|#39);/g,Ys=/[&<>"']/g,Pr=RegExp(Zt.source),Ia=RegExp(Ys.source),Qn=/<%-([\s\S]+?)%>/g,Aa=/<%([\s\S]+?)%>/g,qa=/<%=([\s\S]+?)%>/g,Ca=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Sa=/^\w*$/,Zn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Mr=/[\\^$.*+?()[\]{}|]/g,za=RegExp(Mr.source),Rr=/^\s+/,Jn=/\s/,ei=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ti=/\{\n\/\* \[wrapped with (.+)\] \*/,x=/,? & /,K=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,V=/[()=,{}\[\]\/\s]/,ae=/\\(\\)?/g,he=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,De=/\w*$/,_e=/^[-+]0x[0-9a-f]+$/i,ue=/^0b[01]+$/i,Qe=/^\[object .+?Constructor\]$/,Oe=/^0o[0-7]+$/i,Fe=/^(?:0|[1-9]\d*)$/,lt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Rt=/($^)/,Na=/['\n\r\u2028\u2029\\]/g,ct="\\ud800-\\udfff",My="\\u0300-\\u036f",Ry="\\ufe20-\\ufe2f",Fy="\\u20d0-\\u20ff",Cl=My+Ry+Fy,Sl="\\u2700-\\u27bf",zl="a-z\\xdf-\\xf6\\xf8-\\xff",By="\\xac\\xb1\\xd7\\xf7",Uy="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ky="\\u2000-\\u206f",$y=" \\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",Nl="A-Z\\xc0-\\xd6\\xd8-\\xde",El="\\ufe0e\\ufe0f",Ll=By+Uy+Ky+$y,si="['’]",jy="["+ct+"]",Ol="["+Ll+"]",Ea="["+Cl+"]",Pl="\\d+",Hy="["+Sl+"]",Ml="["+zl+"]",Rl="[^"+ct+Ll+Pl+Sl+zl+Nl+"]",ri="\\ud83c[\\udffb-\\udfff]",Wy="(?:"+Ea+"|"+ri+")",Fl="[^"+ct+"]",ai="(?:\\ud83c[\\udde6-\\uddff]){2}",ni="[\\ud800-\\udbff][\\udc00-\\udfff]",Qs="["+Nl+"]",Bl="\\u200d",Ul="(?:"+Ml+"|"+Rl+")",Vy="(?:"+Qs+"|"+Rl+")",Kl="(?:"+si+"(?:d|ll|m|re|s|t|ve))?",$l="(?:"+si+"(?:D|LL|M|RE|S|T|VE))?",jl=Wy+"?",Hl="["+El+"]?",Gy="(?:"+Bl+"(?:"+[Fl,ai,ni].join("|")+")"+Hl+jl+")*",Xy="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Yy="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Wl=Hl+jl+Gy,Qy="(?:"+[Hy,ai,ni].join("|")+")"+Wl,Zy="(?:"+[Fl+Ea+"?",Ea,ai,ni,jy].join("|")+")",Jy=RegExp(si,"g"),e_=RegExp(Ea,"g"),ii=RegExp(ri+"(?="+ri+")|"+Zy+Wl,"g"),t_=RegExp([Qs+"?"+Ml+"+"+Kl+"(?="+[Ol,Qs,"$"].join("|")+")",Vy+"+"+$l+"(?="+[Ol,Qs+Ul,"$"].join("|")+")",Qs+"?"+Ul+"+"+Kl,Qs+"+"+$l,Yy,Xy,Pl,Qy].join("|"),"g"),s_=RegExp("["+Bl+ct+Cl+El+"]"),r_=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,a_=["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"],n_=-1,Ne={};Ne[Gs]=Ne[Xs]=Ne[qs]=Ne[Cr]=Ne[Sr]=Ne[zr]=Ne[Nr]=Ne[Er]=Ne[Lr]=!0,Ne[Xe]=Ne[ps]=Ne[Mt]=Ne[Ht]=Ne[us]=Ne[Yt]=Ne[js]=Ne[Is]=Ne[ft]=Ne[Wt]=Ne[At]=Ne[As]=Ne[gt]=Ne[Qt]=Ne[ds]=!1;var Ce={};Ce[Xe]=Ce[ps]=Ce[Mt]=Ce[us]=Ce[Ht]=Ce[Yt]=Ce[Gs]=Ce[Xs]=Ce[qs]=Ce[Cr]=Ce[Sr]=Ce[ft]=Ce[Wt]=Ce[At]=Ce[As]=Ce[gt]=Ce[Qt]=Ce[Vs]=Ce[zr]=Ce[Nr]=Ce[Er]=Ce[Lr]=!0,Ce[js]=Ce[Is]=Ce[ds]=!1;var i_={À:"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"},o_={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},l_={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},c_={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},p_=parseFloat,d_=parseInt,Vl=typeof dr=="object"&&dr&&dr.Object===Object&&dr,u_=typeof self=="object"&&self&&self.Object===Object&&self,Ze=Vl||u_||Function("return this")(),oi=s&&!s.nodeType&&s,Cs=oi&&!0&&a&&!a.nodeType&&a,Gl=Cs&&Cs.exports===oi,li=Gl&&Vl.process,qt=function(){try{var T=Cs&&Cs.require&&Cs.require("util").types;return T||li&&li.binding&&li.binding("util")}catch{}}(),Xl=qt&&qt.isArrayBuffer,Yl=qt&&qt.isDate,Ql=qt&&qt.isMap,Zl=qt&&qt.isRegExp,Jl=qt&&qt.isSet,ec=qt&&qt.isTypedArray;function bt(T,z,I){switch(I.length){case 0:return T.call(z);case 1:return T.call(z,I[0]);case 2:return T.call(z,I[0],I[1]);case 3:return T.call(z,I[0],I[1],I[2])}return T.apply(z,I)}function m_(T,z,I,Y){for(var ie=-1,Te=T==null?0:T.length;++ie<Te;){var We=T[ie];z(Y,We,I(We),T)}return Y}function Ct(T,z){for(var I=-1,Y=T==null?0:T.length;++I<Y&&z(T[I],I,T)!==!1;);return T}function y_(T,z){for(var I=T==null?0:T.length;I--&&z(T[I],I,T)!==!1;);return T}function tc(T,z){for(var I=-1,Y=T==null?0:T.length;++I<Y;)if(!z(T[I],I,T))return!1;return!0}function ms(T,z){for(var I=-1,Y=T==null?0:T.length,ie=0,Te=[];++I<Y;){var We=T[I];z(We,I,T)&&(Te[ie++]=We)}return Te}function La(T,z){var I=T==null?0:T.length;return!!I&&Zs(T,z,0)>-1}function ci(T,z,I){for(var Y=-1,ie=T==null?0:T.length;++Y<ie;)if(I(z,T[Y]))return!0;return!1}function Le(T,z){for(var I=-1,Y=T==null?0:T.length,ie=Array(Y);++I<Y;)ie[I]=z(T[I],I,T);return ie}function ys(T,z){for(var I=-1,Y=z.length,ie=T.length;++I<Y;)T[ie+I]=z[I];return T}function pi(T,z,I,Y){var ie=-1,Te=T==null?0:T.length;for(Y&&Te&&(I=T[++ie]);++ie<Te;)I=z(I,T[ie],ie,T);return I}function __(T,z,I,Y){var ie=T==null?0:T.length;for(Y&&ie&&(I=T[--ie]);ie--;)I=z(I,T[ie],ie,T);return I}function di(T,z){for(var I=-1,Y=T==null?0:T.length;++I<Y;)if(z(T[I],I,T))return!0;return!1}var f_=ui("length");function g_(T){return T.split("")}function b_(T){return T.match(K)||[]}function sc(T,z,I){var Y;return I(T,function(ie,Te,We){if(z(ie,Te,We))return Y=Te,!1}),Y}function Oa(T,z,I,Y){for(var ie=T.length,Te=I+(Y?1:-1);Y?Te--:++Te<ie;)if(z(T[Te],Te,T))return Te;return-1}function Zs(T,z,I){return z===z?S_(T,z,I):Oa(T,rc,I)}function x_(T,z,I,Y){for(var ie=I-1,Te=T.length;++ie<Te;)if(Y(T[ie],z))return ie;return-1}function rc(T){return T!==T}function ac(T,z){var I=T==null?0:T.length;return I?yi(T,z)/I:Ge}function ui(T){return function(z){return z==null?r:z[T]}}function mi(T){return function(z){return T==null?r:T[z]}}function nc(T,z,I,Y,ie){return ie(T,function(Te,We,Ae){I=Y?(Y=!1,Te):z(I,Te,We,Ae)}),I}function h_(T,z){var I=T.length;for(T.sort(z);I--;)T[I]=T[I].value;return T}function yi(T,z){for(var I,Y=-1,ie=T.length;++Y<ie;){var Te=z(T[Y]);Te!==r&&(I=I===r?Te:I+Te)}return I}function _i(T,z){for(var I=-1,Y=Array(T);++I<T;)Y[I]=z(I);return Y}function w_(T,z){return Le(z,function(I){return[I,T[I]]})}function ic(T){return T&&T.slice(0,pc(T)+1).replace(Rr,"")}function xt(T){return function(z){return T(z)}}function fi(T,z){return Le(z,function(I){return T[I]})}function Fr(T,z){return T.has(z)}function oc(T,z){for(var I=-1,Y=T.length;++I<Y&&Zs(z,T[I],0)>-1;);return I}function lc(T,z){for(var I=T.length;I--&&Zs(z,T[I],0)>-1;);return I}function v_(T,z){for(var I=T.length,Y=0;I--;)T[I]===z&&++Y;return Y}var T_=mi(i_),D_=mi(o_);function k_(T){return"\\"+c_[T]}function I_(T,z){return T==null?r:T[z]}function Js(T){return s_.test(T)}function A_(T){return r_.test(T)}function q_(T){for(var z,I=[];!(z=T.next()).done;)I.push(z.value);return I}function gi(T){var z=-1,I=Array(T.size);return T.forEach(function(Y,ie){I[++z]=[ie,Y]}),I}function cc(T,z){return function(I){return T(z(I))}}function _s(T,z){for(var I=-1,Y=T.length,ie=0,Te=[];++I<Y;){var We=T[I];(We===z||We===g)&&(T[I]=g,Te[ie++]=I)}return Te}function Pa(T){var z=-1,I=Array(T.size);return T.forEach(function(Y){I[++z]=Y}),I}function C_(T){var z=-1,I=Array(T.size);return T.forEach(function(Y){I[++z]=[Y,Y]}),I}function S_(T,z,I){for(var Y=I-1,ie=T.length;++Y<ie;)if(T[Y]===z)return Y;return-1}function z_(T,z,I){for(var Y=I+1;Y--;)if(T[Y]===z)return Y;return Y}function er(T){return Js(T)?E_(T):f_(T)}function Ft(T){return Js(T)?L_(T):g_(T)}function pc(T){for(var z=T.length;z--&&Jn.test(T.charAt(z)););return z}var N_=mi(l_);function E_(T){for(var z=ii.lastIndex=0;ii.test(T);)++z;return z}function L_(T){return T.match(ii)||[]}function O_(T){return T.match(t_)||[]}var P_=function T(z){z=z==null?Ze:tr.defaults(Ze.Object(),z,tr.pick(Ze,a_));var I=z.Array,Y=z.Date,ie=z.Error,Te=z.Function,We=z.Math,Ae=z.Object,bi=z.RegExp,M_=z.String,St=z.TypeError,Ma=I.prototype,R_=Te.prototype,sr=Ae.prototype,Ra=z["__core-js_shared__"],Fa=R_.toString,Ie=sr.hasOwnProperty,F_=0,dc=function(){var e=/[^.]+$/.exec(Ra&&Ra.keys&&Ra.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Ba=sr.toString,B_=Fa.call(Ae),U_=Ze._,K_=bi("^"+Fa.call(Ie).replace(Mr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ua=Gl?z.Buffer:r,fs=z.Symbol,Ka=z.Uint8Array,uc=Ua?Ua.allocUnsafe:r,$a=cc(Ae.getPrototypeOf,Ae),mc=Ae.create,yc=sr.propertyIsEnumerable,ja=Ma.splice,_c=fs?fs.isConcatSpreadable:r,Br=fs?fs.iterator:r,Ss=fs?fs.toStringTag:r,Ha=function(){try{var e=Os(Ae,"defineProperty");return e({},"",{}),e}catch{}}(),$_=z.clearTimeout!==Ze.clearTimeout&&z.clearTimeout,j_=Y&&Y.now!==Ze.Date.now&&Y.now,H_=z.setTimeout!==Ze.setTimeout&&z.setTimeout,Wa=We.ceil,Va=We.floor,xi=Ae.getOwnPropertySymbols,W_=Ua?Ua.isBuffer:r,fc=z.isFinite,V_=Ma.join,G_=cc(Ae.keys,Ae),Ve=We.max,tt=We.min,X_=Y.now,Y_=z.parseInt,gc=We.random,Q_=Ma.reverse,hi=Os(z,"DataView"),Ur=Os(z,"Map"),wi=Os(z,"Promise"),rr=Os(z,"Set"),Kr=Os(z,"WeakMap"),$r=Os(Ae,"create"),Ga=Kr&&new Kr,ar={},Z_=Ps(hi),J_=Ps(Ur),ef=Ps(wi),tf=Ps(rr),sf=Ps(Kr),Xa=fs?fs.prototype:r,jr=Xa?Xa.valueOf:r,bc=Xa?Xa.toString:r;function y(e){if(Be(e)&&!oe(e)&&!(e instanceof fe)){if(e instanceof zt)return e;if(Ie.call(e,"__wrapped__"))return xp(e)}return new zt(e)}var nr=function(){function e(){}return function(t){if(!Pe(t))return{};if(mc)return mc(t);e.prototype=t;var i=new e;return e.prototype=r,i}}();function Ya(){}function zt(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}y.templateSettings={escape:Qn,evaluate:Aa,interpolate:qa,variable:"",imports:{_:y}},y.prototype=Ya.prototype,y.prototype.constructor=y,zt.prototype=nr(Ya.prototype),zt.prototype.constructor=zt;function fe(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=re,this.__views__=[]}function rf(){var e=new fe(this.__wrapped__);return e.__actions__=pt(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=pt(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=pt(this.__views__),e}function af(){if(this.__filtered__){var e=new fe(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function nf(){var e=this.__wrapped__.value(),t=this.__dir__,i=oe(e),c=t<0,d=i?e.length:0,f=bg(0,d,this.__views__),b=f.start,v=f.end,D=v-b,L=c?v:b-1,O=this.__iteratees__,R=O.length,G=0,Q=tt(D,this.__takeCount__);if(!i||!c&&d==D&&Q==D)return Kc(e,this.__actions__);var te=[];e:for(;D--&&G<Q;){L+=t;for(var pe=-1,se=e[L];++pe<R;){var me=O[pe],be=me.iteratee,vt=me.type,it=be(se);if(vt==Z)se=it;else if(!it){if(vt==Ee)continue e;break e}}te[G++]=se}return te}fe.prototype=nr(Ya.prototype),fe.prototype.constructor=fe;function zs(e){var t=-1,i=e==null?0:e.length;for(this.clear();++t<i;){var c=e[t];this.set(c[0],c[1])}}function of(){this.__data__=$r?$r(null):{},this.size=0}function lf(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function cf(e){var t=this.__data__;if($r){var i=t[e];return i===m?r:i}return Ie.call(t,e)?t[e]:r}function pf(e){var t=this.__data__;return $r?t[e]!==r:Ie.call(t,e)}function df(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=$r&&t===r?m:t,this}zs.prototype.clear=of,zs.prototype.delete=lf,zs.prototype.get=cf,zs.prototype.has=pf,zs.prototype.set=df;function Jt(e){var t=-1,i=e==null?0:e.length;for(this.clear();++t<i;){var c=e[t];this.set(c[0],c[1])}}function uf(){this.__data__=[],this.size=0}function mf(e){var t=this.__data__,i=Qa(t,e);if(i<0)return!1;var c=t.length-1;return i==c?t.pop():ja.call(t,i,1),--this.size,!0}function yf(e){var t=this.__data__,i=Qa(t,e);return i<0?r:t[i][1]}function _f(e){return Qa(this.__data__,e)>-1}function ff(e,t){var i=this.__data__,c=Qa(i,e);return c<0?(++this.size,i.push([e,t])):i[c][1]=t,this}Jt.prototype.clear=uf,Jt.prototype.delete=mf,Jt.prototype.get=yf,Jt.prototype.has=_f,Jt.prototype.set=ff;function es(e){var t=-1,i=e==null?0:e.length;for(this.clear();++t<i;){var c=e[t];this.set(c[0],c[1])}}function gf(){this.size=0,this.__data__={hash:new zs,map:new(Ur||Jt),string:new zs}}function bf(e){var t=pn(this,e).delete(e);return this.size-=t?1:0,t}function xf(e){return pn(this,e).get(e)}function hf(e){return pn(this,e).has(e)}function wf(e,t){var i=pn(this,e),c=i.size;return i.set(e,t),this.size+=i.size==c?0:1,this}es.prototype.clear=gf,es.prototype.delete=bf,es.prototype.get=xf,es.prototype.has=hf,es.prototype.set=wf;function Ns(e){var t=-1,i=e==null?0:e.length;for(this.__data__=new es;++t<i;)this.add(e[t])}function vf(e){return this.__data__.set(e,m),this}function Tf(e){return this.__data__.has(e)}Ns.prototype.add=Ns.prototype.push=vf,Ns.prototype.has=Tf;function Bt(e){var t=this.__data__=new Jt(e);this.size=t.size}function Df(){this.__data__=new Jt,this.size=0}function kf(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i}function If(e){return this.__data__.get(e)}function Af(e){return this.__data__.has(e)}function qf(e,t){var i=this.__data__;if(i instanceof Jt){var c=i.__data__;if(!Ur||c.length<o-1)return c.push([e,t]),this.size=++i.size,this;i=this.__data__=new es(c)}return i.set(e,t),this.size=i.size,this}Bt.prototype.clear=Df,Bt.prototype.delete=kf,Bt.prototype.get=If,Bt.prototype.has=Af,Bt.prototype.set=qf;function xc(e,t){var i=oe(e),c=!i&&Ms(e),d=!i&&!c&&ws(e),f=!i&&!c&&!d&&cr(e),b=i||c||d||f,v=b?_i(e.length,M_):[],D=v.length;for(var L in e)(t||Ie.call(e,L))&&!(b&&(L=="length"||d&&(L=="offset"||L=="parent")||f&&(L=="buffer"||L=="byteLength"||L=="byteOffset")||as(L,D)))&&v.push(L);return v}function hc(e){var t=e.length;return t?e[Ni(0,t-1)]:r}function Cf(e,t){return dn(pt(e),Es(t,0,e.length))}function Sf(e){return dn(pt(e))}function vi(e,t,i){(i!==r&&!Ut(e[t],i)||i===r&&!(t in e))&&ts(e,t,i)}function Hr(e,t,i){var c=e[t];(!(Ie.call(e,t)&&Ut(c,i))||i===r&&!(t in e))&&ts(e,t,i)}function Qa(e,t){for(var i=e.length;i--;)if(Ut(e[i][0],t))return i;return-1}function zf(e,t,i,c){return gs(e,function(d,f,b){t(c,d,i(d),b)}),c}function wc(e,t){return e&&Gt(t,Ye(t),e)}function Nf(e,t){return e&&Gt(t,ut(t),e)}function ts(e,t,i){t=="__proto__"&&Ha?Ha(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}function Ti(e,t){for(var i=-1,c=t.length,d=I(c),f=e==null;++i<c;)d[i]=f?r:ro(e,t[i]);return d}function Es(e,t,i){return e===e&&(i!==r&&(e=e<=i?e:i),t!==r&&(e=e>=t?e:t)),e}function Nt(e,t,i,c,d,f){var b,v=t&h,D=t&w,L=t&k;if(i&&(b=d?i(e,c,d,f):i(e)),b!==r)return b;if(!Pe(e))return e;var O=oe(e);if(O){if(b=hg(e),!v)return pt(e,b)}else{var R=st(e),G=R==Is||R==Ta;if(ws(e))return Hc(e,v);if(R==At||R==Xe||G&&!d){if(b=D||G?{}:pp(e),!v)return D?cg(e,Nf(b,e)):lg(e,wc(b,e))}else{if(!Ce[R])return d?e:{};b=wg(e,R,v)}}f||(f=new Bt);var Q=f.get(e);if(Q)return Q;f.set(e,b),Fp(e)?e.forEach(function(se){b.add(Nt(se,t,i,se,e,f))}):Mp(e)&&e.forEach(function(se,me){b.set(me,Nt(se,t,i,me,e,f))});var te=L?D?$i:Ki:D?ut:Ye,pe=O?r:te(e);return Ct(pe||e,function(se,me){pe&&(me=se,se=e[me]),Hr(b,me,Nt(se,t,i,me,e,f))}),b}function Ef(e){var t=Ye(e);return function(i){return vc(i,e,t)}}function vc(e,t,i){var c=i.length;if(e==null)return!c;for(e=Ae(e);c--;){var d=i[c],f=t[d],b=e[d];if(b===r&&!(d in e)||!f(b))return!1}return!0}function Tc(e,t,i){if(typeof e!="function")throw new St(p);return Zr(function(){e.apply(r,i)},t)}function Wr(e,t,i,c){var d=-1,f=La,b=!0,v=e.length,D=[],L=t.length;if(!v)return D;i&&(t=Le(t,xt(i))),c?(f=ci,b=!1):t.length>=o&&(f=Fr,b=!1,t=new Ns(t));e:for(;++d<v;){var O=e[d],R=i==null?O:i(O);if(O=c||O!==0?O:0,b&&R===R){for(var G=L;G--;)if(t[G]===R)continue e;D.push(O)}else f(t,R,c)||D.push(O)}return D}var gs=Yc(Vt),Dc=Yc(ki,!0);function Lf(e,t){var i=!0;return gs(e,function(c,d,f){return i=!!t(c,d,f),i}),i}function Za(e,t,i){for(var c=-1,d=e.length;++c<d;){var f=e[c],b=t(f);if(b!=null&&(v===r?b===b&&!wt(b):i(b,v)))var v=b,D=f}return D}function Of(e,t,i,c){var d=e.length;for(i=le(i),i<0&&(i=-i>d?0:d+i),c=c===r||c>d?d:le(c),c<0&&(c+=d),c=i>c?0:Up(c);i<c;)e[i++]=t;return e}function kc(e,t){var i=[];return gs(e,function(c,d,f){t(c,d,f)&&i.push(c)}),i}function Je(e,t,i,c,d){var f=-1,b=e.length;for(i||(i=Tg),d||(d=[]);++f<b;){var v=e[f];t>0&&i(v)?t>1?Je(v,t-1,i,c,d):ys(d,v):c||(d[d.length]=v)}return d}var Di=Qc(),Ic=Qc(!0);function Vt(e,t){return e&&Di(e,t,Ye)}function ki(e,t){return e&&Ic(e,t,Ye)}function Ja(e,t){return ms(t,function(i){return ns(e[i])})}function Ls(e,t){t=xs(t,e);for(var i=0,c=t.length;e!=null&&i<c;)e=e[Xt(t[i++])];return i&&i==c?e:r}function Ac(e,t,i){var c=t(e);return oe(e)?c:ys(c,i(e))}function at(e){return e==null?e===r?Xn:Hs:Ss&&Ss in Ae(e)?gg(e):Sg(e)}function Ii(e,t){return e>t}function Pf(e,t){return e!=null&&Ie.call(e,t)}function Mf(e,t){return e!=null&&t in Ae(e)}function Rf(e,t,i){return e>=tt(t,i)&&e<Ve(t,i)}function Ai(e,t,i){for(var c=i?ci:La,d=e[0].length,f=e.length,b=f,v=I(f),D=1/0,L=[];b--;){var O=e[b];b&&t&&(O=Le(O,xt(t))),D=tt(O.length,D),v[b]=!i&&(t||d>=120&&O.length>=120)?new Ns(b&&O):r}O=e[0];var R=-1,G=v[0];e:for(;++R<d&&L.length<D;){var Q=O[R],te=t?t(Q):Q;if(Q=i||Q!==0?Q:0,!(G?Fr(G,te):c(L,te,i))){for(b=f;--b;){var pe=v[b];if(!(pe?Fr(pe,te):c(e[b],te,i)))continue e}G&&G.push(te),L.push(Q)}}return L}function Ff(e,t,i,c){return Vt(e,function(d,f,b){t(c,i(d),f,b)}),c}function Vr(e,t,i){t=xs(t,e),e=yp(e,t);var c=e==null?e:e[Xt(Lt(t))];return c==null?r:bt(c,e,i)}function qc(e){return Be(e)&&at(e)==Xe}function Bf(e){return Be(e)&&at(e)==Mt}function Uf(e){return Be(e)&&at(e)==Yt}function Gr(e,t,i,c,d){return e===t?!0:e==null||t==null||!Be(e)&&!Be(t)?e!==e&&t!==t:Kf(e,t,i,c,Gr,d)}function Kf(e,t,i,c,d,f){var b=oe(e),v=oe(t),D=b?ps:st(e),L=v?ps:st(t);D=D==Xe?At:D,L=L==Xe?At:L;var O=D==At,R=L==At,G=D==L;if(G&&ws(e)){if(!ws(t))return!1;b=!0,O=!1}if(G&&!O)return f||(f=new Bt),b||cr(e)?op(e,t,i,c,d,f):_g(e,t,D,i,c,d,f);if(!(i&S)){var Q=O&&Ie.call(e,"__wrapped__"),te=R&&Ie.call(t,"__wrapped__");if(Q||te){var pe=Q?e.value():e,se=te?t.value():t;return f||(f=new Bt),d(pe,se,i,c,f)}}return G?(f||(f=new Bt),fg(e,t,i,c,d,f)):!1}function $f(e){return Be(e)&&st(e)==ft}function qi(e,t,i,c){var d=i.length,f=d,b=!c;if(e==null)return!f;for(e=Ae(e);d--;){var v=i[d];if(b&&v[2]?v[1]!==e[v[0]]:!(v[0]in e))return!1}for(;++d<f;){v=i[d];var D=v[0],L=e[D],O=v[1];if(b&&v[2]){if(L===r&&!(D in e))return!1}else{var R=new Bt;if(c)var G=c(L,O,D,e,t,R);if(!(G===r?Gr(O,L,S|C,c,R):G))return!1}}return!0}function Cc(e){if(!Pe(e)||kg(e))return!1;var t=ns(e)?K_:Qe;return t.test(Ps(e))}function jf(e){return Be(e)&&at(e)==As}function Hf(e){return Be(e)&&st(e)==gt}function Wf(e){return Be(e)&&gn(e.length)&&!!Ne[at(e)]}function Sc(e){return typeof e=="function"?e:e==null?mt:typeof e=="object"?oe(e)?Ec(e[0],e[1]):Nc(e):Zp(e)}function Ci(e){if(!Qr(e))return G_(e);var t=[];for(var i in Ae(e))Ie.call(e,i)&&i!="constructor"&&t.push(i);return t}function Vf(e){if(!Pe(e))return Cg(e);var t=Qr(e),i=[];for(var c in e)c=="constructor"&&(t||!Ie.call(e,c))||i.push(c);return i}function Si(e,t){return e<t}function zc(e,t){var i=-1,c=dt(e)?I(e.length):[];return gs(e,function(d,f,b){c[++i]=t(d,f,b)}),c}function Nc(e){var t=Hi(e);return t.length==1&&t[0][2]?up(t[0][0],t[0][1]):function(i){return i===e||qi(i,e,t)}}function Ec(e,t){return Vi(e)&&dp(t)?up(Xt(e),t):function(i){var c=ro(i,e);return c===r&&c===t?ao(i,e):Gr(t,c,S|C)}}function en(e,t,i,c,d){e!==t&&Di(t,function(f,b){if(d||(d=new Bt),Pe(f))Gf(e,t,b,i,en,c,d);else{var v=c?c(Xi(e,b),f,b+"",e,t,d):r;v===r&&(v=f),vi(e,b,v)}},ut)}function Gf(e,t,i,c,d,f,b){var v=Xi(e,i),D=Xi(t,i),L=b.get(D);if(L){vi(e,i,L);return}var O=f?f(v,D,i+"",e,t,b):r,R=O===r;if(R){var G=oe(D),Q=!G&&ws(D),te=!G&&!Q&&cr(D);O=D,G||Q||te?oe(v)?O=v:$e(v)?O=pt(v):Q?(R=!1,O=Hc(D,!0)):te?(R=!1,O=Wc(D,!0)):O=[]:Jr(D)||Ms(D)?(O=v,Ms(v)?O=Kp(v):(!Pe(v)||ns(v))&&(O=pp(D))):R=!1}R&&(b.set(D,O),d(O,D,c,f,b),b.delete(D)),vi(e,i,O)}function Lc(e,t){var i=e.length;if(i)return t+=t<0?i:0,as(t,i)?e[t]:r}function Oc(e,t,i){t.length?t=Le(t,function(f){return oe(f)?function(b){return Ls(b,f.length===1?f[0]:f)}:f}):t=[mt];var c=-1;t=Le(t,xt(J()));var d=zc(e,function(f,b,v){var D=Le(t,function(L){return L(f)});return{criteria:D,index:++c,value:f}});return h_(d,function(f,b){return og(f,b,i)})}function Xf(e,t){return Pc(e,t,function(i,c){return ao(e,c)})}function Pc(e,t,i){for(var c=-1,d=t.length,f={};++c<d;){var b=t[c],v=Ls(e,b);i(v,b)&&Xr(f,xs(b,e),v)}return f}function Yf(e){return function(t){return Ls(t,e)}}function zi(e,t,i,c){var d=c?x_:Zs,f=-1,b=t.length,v=e;for(e===t&&(t=pt(t)),i&&(v=Le(e,xt(i)));++f<b;)for(var D=0,L=t[f],O=i?i(L):L;(D=d(v,O,D,c))>-1;)v!==e&&ja.call(v,D,1),ja.call(e,D,1);return e}function Mc(e,t){for(var i=e?t.length:0,c=i-1;i--;){var d=t[i];if(i==c||d!==f){var f=d;as(d)?ja.call(e,d,1):Oi(e,d)}}return e}function Ni(e,t){return e+Va(gc()*(t-e+1))}function Qf(e,t,i,c){for(var d=-1,f=Ve(Wa((t-e)/(i||1)),0),b=I(f);f--;)b[c?f:++d]=e,e+=i;return b}function Ei(e,t){var i="";if(!e||t<1||t>ge)return i;do t%2&&(i+=e),t=Va(t/2),t&&(e+=e);while(t);return i}function de(e,t){return Yi(mp(e,t,mt),e+"")}function Zf(e){return hc(pr(e))}function Jf(e,t){var i=pr(e);return dn(i,Es(t,0,i.length))}function Xr(e,t,i,c){if(!Pe(e))return e;t=xs(t,e);for(var d=-1,f=t.length,b=f-1,v=e;v!=null&&++d<f;){var D=Xt(t[d]),L=i;if(D==="__proto__"||D==="constructor"||D==="prototype")return e;if(d!=b){var O=v[D];L=c?c(O,D,v):r,L===r&&(L=Pe(O)?O:as(t[d+1])?[]:{})}Hr(v,D,L),v=v[D]}return e}var Rc=Ga?function(e,t){return Ga.set(e,t),e}:mt,eg=Ha?function(e,t){return Ha(e,"toString",{configurable:!0,enumerable:!1,value:io(t),writable:!0})}:mt;function tg(e){return dn(pr(e))}function Et(e,t,i){var c=-1,d=e.length;t<0&&(t=-t>d?0:d+t),i=i>d?d:i,i<0&&(i+=d),d=t>i?0:i-t>>>0,t>>>=0;for(var f=I(d);++c<d;)f[c]=e[c+t];return f}function sg(e,t){var i;return gs(e,function(c,d,f){return i=t(c,d,f),!i}),!!i}function tn(e,t,i){var c=0,d=e==null?c:e.length;if(typeof t=="number"&&t===t&&d<=Ke){for(;c<d;){var f=c+d>>>1,b=e[f];b!==null&&!wt(b)&&(i?b<=t:b<t)?c=f+1:d=f}return d}return Li(e,t,mt,i)}function Li(e,t,i,c){var d=0,f=e==null?0:e.length;if(f===0)return 0;t=i(t);for(var b=t!==t,v=t===null,D=wt(t),L=t===r;d<f;){var O=Va((d+f)/2),R=i(e[O]),G=R!==r,Q=R===null,te=R===R,pe=wt(R);if(b)var se=c||te;else L?se=te&&(c||G):v?se=te&&G&&(c||!Q):D?se=te&&G&&!Q&&(c||!pe):Q||pe?se=!1:se=c?R<=t:R<t;se?d=O+1:f=O}return tt(f,ve)}function Fc(e,t){for(var i=-1,c=e.length,d=0,f=[];++i<c;){var b=e[i],v=t?t(b):b;if(!i||!Ut(v,D)){var D=v;f[d++]=b===0?0:b}}return f}function Bc(e){return typeof e=="number"?e:wt(e)?Ge:+e}function ht(e){if(typeof e=="string")return e;if(oe(e))return Le(e,ht)+"";if(wt(e))return bc?bc.call(e):"";var t=e+"";return t=="0"&&1/e==-ze?"-0":t}function bs(e,t,i){var c=-1,d=La,f=e.length,b=!0,v=[],D=v;if(i)b=!1,d=ci;else if(f>=o){var L=t?null:mg(e);if(L)return Pa(L);b=!1,d=Fr,D=new Ns}else D=t?[]:v;e:for(;++c<f;){var O=e[c],R=t?t(O):O;if(O=i||O!==0?O:0,b&&R===R){for(var G=D.length;G--;)if(D[G]===R)continue e;t&&D.push(R),v.push(O)}else d(D,R,i)||(D!==v&&D.push(R),v.push(O))}return v}function Oi(e,t){return t=xs(t,e),e=yp(e,t),e==null||delete e[Xt(Lt(t))]}function Uc(e,t,i,c){return Xr(e,t,i(Ls(e,t)),c)}function sn(e,t,i,c){for(var d=e.length,f=c?d:-1;(c?f--:++f<d)&&t(e[f],f,e););return i?Et(e,c?0:f,c?f+1:d):Et(e,c?f+1:0,c?d:f)}function Kc(e,t){var i=e;return i instanceof fe&&(i=i.value()),pi(t,function(c,d){return d.func.apply(d.thisArg,ys([c],d.args))},i)}function Pi(e,t,i){var c=e.length;if(c<2)return c?bs(e[0]):[];for(var d=-1,f=I(c);++d<c;)for(var b=e[d],v=-1;++v<c;)v!=d&&(f[d]=Wr(f[d]||b,e[v],t,i));return bs(Je(f,1),t,i)}function $c(e,t,i){for(var c=-1,d=e.length,f=t.length,b={};++c<d;){var v=c<f?t[c]:r;i(b,e[c],v)}return b}function Mi(e){return $e(e)?e:[]}function Ri(e){return typeof e=="function"?e:mt}function xs(e,t){return oe(e)?e:Vi(e,t)?[e]:bp(ke(e))}var rg=de;function hs(e,t,i){var c=e.length;return i=i===r?c:i,!t&&i>=c?e:Et(e,t,i)}var jc=$_||function(e){return Ze.clearTimeout(e)};function Hc(e,t){if(t)return e.slice();var i=e.length,c=uc?uc(i):new e.constructor(i);return e.copy(c),c}function Fi(e){var t=new e.constructor(e.byteLength);return new Ka(t).set(new Ka(e)),t}function ag(e,t){var i=t?Fi(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}function ng(e){var t=new e.constructor(e.source,De.exec(e));return t.lastIndex=e.lastIndex,t}function ig(e){return jr?Ae(jr.call(e)):{}}function Wc(e,t){var i=t?Fi(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}function Vc(e,t){if(e!==t){var i=e!==r,c=e===null,d=e===e,f=wt(e),b=t!==r,v=t===null,D=t===t,L=wt(t);if(!v&&!L&&!f&&e>t||f&&b&&D&&!v&&!L||c&&b&&D||!i&&D||!d)return 1;if(!c&&!f&&!L&&e<t||L&&i&&d&&!c&&!f||v&&i&&d||!b&&d||!D)return-1}return 0}function og(e,t,i){for(var c=-1,d=e.criteria,f=t.criteria,b=d.length,v=i.length;++c<b;){var D=Vc(d[c],f[c]);if(D){if(c>=v)return D;var L=i[c];return D*(L=="desc"?-1:1)}}return e.index-t.index}function Gc(e,t,i,c){for(var d=-1,f=e.length,b=i.length,v=-1,D=t.length,L=Ve(f-b,0),O=I(D+L),R=!c;++v<D;)O[v]=t[v];for(;++d<b;)(R||d<f)&&(O[i[d]]=e[d]);for(;L--;)O[v++]=e[d++];return O}function Xc(e,t,i,c){for(var d=-1,f=e.length,b=-1,v=i.length,D=-1,L=t.length,O=Ve(f-v,0),R=I(O+L),G=!c;++d<O;)R[d]=e[d];for(var Q=d;++D<L;)R[Q+D]=t[D];for(;++b<v;)(G||d<f)&&(R[Q+i[b]]=e[d++]);return R}function pt(e,t){var i=-1,c=e.length;for(t||(t=I(c));++i<c;)t[i]=e[i];return t}function Gt(e,t,i,c){var d=!i;i||(i={});for(var f=-1,b=t.length;++f<b;){var v=t[f],D=c?c(i[v],e[v],v,i,e):r;D===r&&(D=e[v]),d?ts(i,v,D):Hr(i,v,D)}return i}function lg(e,t){return Gt(e,Wi(e),t)}function cg(e,t){return Gt(e,lp(e),t)}function rn(e,t){return function(i,c){var d=oe(i)?m_:zf,f=t?t():{};return d(i,e,J(c,2),f)}}function ir(e){return de(function(t,i){var c=-1,d=i.length,f=d>1?i[d-1]:r,b=d>2?i[2]:r;for(f=e.length>3&&typeof f=="function"?(d--,f):r,b&&nt(i[0],i[1],b)&&(f=d<3?r:f,d=1),t=Ae(t);++c<d;){var v=i[c];v&&e(t,v,c,f)}return t})}function Yc(e,t){return function(i,c){if(i==null)return i;if(!dt(i))return e(i,c);for(var d=i.length,f=t?d:-1,b=Ae(i);(t?f--:++f<d)&&c(b[f],f,b)!==!1;);return i}}function Qc(e){return function(t,i,c){for(var d=-1,f=Ae(t),b=c(t),v=b.length;v--;){var D=b[e?v:++d];if(i(f[D],D,f)===!1)break}return t}}function pg(e,t,i){var c=t&B,d=Yr(e);function f(){var b=this&&this!==Ze&&this instanceof f?d:e;return b.apply(c?i:this,arguments)}return f}function Zc(e){return function(t){t=ke(t);var i=Js(t)?Ft(t):r,c=i?i[0]:t.charAt(0),d=i?hs(i,1).join(""):t.slice(1);return c[e]()+d}}function or(e){return function(t){return pi(Yp(Xp(t).replace(Jy,"")),e,"")}}function Yr(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 i=nr(e.prototype),c=e.apply(i,t);return Pe(c)?c:i}}function dg(e,t,i){var c=Yr(e);function d(){for(var f=arguments.length,b=I(f),v=f,D=lr(d);v--;)b[v]=arguments[v];var L=f<3&&b[0]!==D&&b[f-1]!==D?[]:_s(b,D);if(f-=L.length,f<i)return rp(e,t,an,d.placeholder,r,b,L,r,r,i-f);var O=this&&this!==Ze&&this instanceof d?c:e;return bt(O,this,b)}return d}function Jc(e){return function(t,i,c){var d=Ae(t);if(!dt(t)){var f=J(i,3);t=Ye(t),i=function(v){return f(d[v],v,d)}}var b=e(t,i,c);return b>-1?d[f?t[b]:b]:r}}function ep(e){return rs(function(t){var i=t.length,c=i,d=zt.prototype.thru;for(e&&t.reverse();c--;){var f=t[c];if(typeof f!="function")throw new St(p);if(d&&!b&&cn(f)=="wrapper")var b=new zt([],!0)}for(c=b?c:i;++c<i;){f=t[c];var v=cn(f),D=v=="wrapper"?ji(f):r;D&&Gi(D[0])&&D[1]==($|ee|M|P)&&!D[4].length&&D[9]==1?b=b[cn(D[0])].apply(b,D[3]):b=f.length==1&&Gi(f)?b[v]():b.thru(f)}return function(){var L=arguments,O=L[0];if(b&&L.length==1&&oe(O))return b.plant(O).value();for(var R=0,G=i?t[R].apply(this,L):O;++R<i;)G=t[R].call(this,G);return G}})}function an(e,t,i,c,d,f,b,v,D,L){var O=t&$,R=t&B,G=t&W,Q=t&(ee|N),te=t&j,pe=G?r:Yr(e);function se(){for(var me=arguments.length,be=I(me),vt=me;vt--;)be[vt]=arguments[vt];if(Q)var it=lr(se),Tt=v_(be,it);if(c&&(be=Gc(be,c,d,Q)),f&&(be=Xc(be,f,b,Q)),me-=Tt,Q&&me<L){var je=_s(be,it);return rp(e,t,an,se.placeholder,i,be,je,v,D,L-me)}var Kt=R?i:this,os=G?Kt[e]:e;return me=be.length,v?be=zg(be,v):te&&me>1&&be.reverse(),O&&D<me&&(be.length=D),this&&this!==Ze&&this instanceof se&&(os=pe||Yr(os)),os.apply(Kt,be)}return se}function tp(e,t){return function(i,c){return Ff(i,e,t(c),{})}}function nn(e,t){return function(i,c){var d;if(i===r&&c===r)return t;if(i!==r&&(d=i),c!==r){if(d===r)return c;typeof i=="string"||typeof c=="string"?(i=ht(i),c=ht(c)):(i=Bc(i),c=Bc(c)),d=e(i,c)}return d}}function Bi(e){return rs(function(t){return t=Le(t,xt(J())),de(function(i){var c=this;return e(t,function(d){return bt(d,c,i)})})})}function on(e,t){t=t===r?" ":ht(t);var i=t.length;if(i<2)return i?Ei(t,e):t;var c=Ei(t,Wa(e/er(t)));return Js(t)?hs(Ft(c),0,e).join(""):c.slice(0,e)}function ug(e,t,i,c){var d=t&B,f=Yr(e);function b(){for(var v=-1,D=arguments.length,L=-1,O=c.length,R=I(O+D),G=this&&this!==Ze&&this instanceof b?f:e;++L<O;)R[L]=c[L];for(;D--;)R[L++]=arguments[++v];return bt(G,d?i:this,R)}return b}function sp(e){return function(t,i,c){return c&&typeof c!="number"&&nt(t,i,c)&&(i=c=r),t=is(t),i===r?(i=t,t=0):i=is(i),c=c===r?t<i?1:-1:is(c),Qf(t,i,c,e)}}function ln(e){return function(t,i){return typeof t=="string"&&typeof i=="string"||(t=Ot(t),i=Ot(i)),e(t,i)}}function rp(e,t,i,c,d,f,b,v,D,L){var O=t&ee,R=O?b:r,G=O?r:b,Q=O?f:r,te=O?r:f;t|=O?M:E,t&=~(O?E:M),t&H||(t&=~(B|W));var pe=[e,t,d,Q,R,te,G,v,D,L],se=i.apply(r,pe);return Gi(e)&&_p(se,pe),se.placeholder=c,fp(se,e,t)}function Ui(e){var t=We[e];return function(i,c){if(i=Ot(i),c=c==null?0:tt(le(c),292),c&&fc(i)){var d=(ke(i)+"e").split("e"),f=t(d[0]+"e"+(+d[1]+c));return d=(ke(f)+"e").split("e"),+(d[0]+"e"+(+d[1]-c))}return t(i)}}var mg=rr&&1/Pa(new rr([,-0]))[1]==ze?function(e){return new rr(e)}:co;function ap(e){return function(t){var i=st(t);return i==ft?gi(t):i==gt?C_(t):w_(t,e(t))}}function ss(e,t,i,c,d,f,b,v){var D=t&W;if(!D&&typeof e!="function")throw new St(p);var L=c?c.length:0;if(L||(t&=~(M|E),c=d=r),b=b===r?b:Ve(le(b),0),v=v===r?v:le(v),L-=d?d.length:0,t&E){var O=c,R=d;c=d=r}var G=D?r:ji(e),Q=[e,t,i,c,d,O,R,f,b,v];if(G&&qg(Q,G),e=Q[0],t=Q[1],i=Q[2],c=Q[3],d=Q[4],v=Q[9]=Q[9]===r?D?0:e.length:Ve(Q[9]-L,0),!v&&t&(ee|N)&&(t&=~(ee|N)),!t||t==B)var te=pg(e,t,i);else t==ee||t==N?te=dg(e,t,v):(t==M||t==(B|M))&&!d.length?te=ug(e,t,i,c):te=an.apply(r,Q);var pe=G?Rc:_p;return fp(pe(te,Q),e,t)}function np(e,t,i,c){return e===r||Ut(e,sr[i])&&!Ie.call(c,i)?t:e}function ip(e,t,i,c,d,f){return Pe(e)&&Pe(t)&&(f.set(t,e),en(e,t,r,ip,f),f.delete(t)),e}function yg(e){return Jr(e)?r:e}function op(e,t,i,c,d,f){var b=i&S,v=e.length,D=t.length;if(v!=D&&!(b&&D>v))return!1;var L=f.get(e),O=f.get(t);if(L&&O)return L==t&&O==e;var R=-1,G=!0,Q=i&C?new Ns:r;for(f.set(e,t),f.set(t,e);++R<v;){var te=e[R],pe=t[R];if(c)var se=b?c(pe,te,R,t,e,f):c(te,pe,R,e,t,f);if(se!==r){if(se)continue;G=!1;break}if(Q){if(!di(t,function(me,be){if(!Fr(Q,be)&&(te===me||d(te,me,i,c,f)))return Q.push(be)})){G=!1;break}}else if(!(te===pe||d(te,pe,i,c,f))){G=!1;break}}return f.delete(e),f.delete(t),G}function _g(e,t,i,c,d,f,b){switch(i){case us:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Mt:return!(e.byteLength!=t.byteLength||!f(new Ka(e),new Ka(t)));case Ht:case Yt:case Wt:return Ut(+e,+t);case js:return e.name==t.name&&e.message==t.message;case As:case Qt:return e==t+"";case ft:var v=gi;case gt:var D=c&S;if(v||(v=Pa),e.size!=t.size&&!D)return!1;var L=b.get(e);if(L)return L==t;c|=C,b.set(e,t);var O=op(v(e),v(t),c,d,f,b);return b.delete(e),O;case Vs:if(jr)return jr.call(e)==jr.call(t)}return!1}function fg(e,t,i,c,d,f){var b=i&S,v=Ki(e),D=v.length,L=Ki(t),O=L.length;if(D!=O&&!b)return!1;for(var R=D;R--;){var G=v[R];if(!(b?G in t:Ie.call(t,G)))return!1}var Q=f.get(e),te=f.get(t);if(Q&&te)return Q==t&&te==e;var pe=!0;f.set(e,t),f.set(t,e);for(var se=b;++R<D;){G=v[R];var me=e[G],be=t[G];if(c)var vt=b?c(be,me,G,t,e,f):c(me,be,G,e,t,f);if(!(vt===r?me===be||d(me,be,i,c,f):vt)){pe=!1;break}se||(se=G=="constructor")}if(pe&&!se){var it=e.constructor,Tt=t.constructor;it!=Tt&&"constructor"in e&&"constructor"in t&&!(typeof it=="function"&&it instanceof it&&typeof Tt=="function"&&Tt instanceof Tt)&&(pe=!1)}return f.delete(e),f.delete(t),pe}function rs(e){return Yi(mp(e,r,vp),e+"")}function Ki(e){return Ac(e,Ye,Wi)}function $i(e){return Ac(e,ut,lp)}var ji=Ga?function(e){return Ga.get(e)}:co;function cn(e){for(var t=e.name+"",i=ar[t],c=Ie.call(ar,t)?i.length:0;c--;){var d=i[c],f=d.func;if(f==null||f==e)return d.name}return t}function lr(e){var t=Ie.call(y,"placeholder")?y:e;return t.placeholder}function J(){var e=y.iteratee||oo;return e=e===oo?Sc:e,arguments.length?e(arguments[0],arguments[1]):e}function pn(e,t){var i=e.__data__;return Dg(t)?i[typeof t=="string"?"string":"hash"]:i.map}function Hi(e){for(var t=Ye(e),i=t.length;i--;){var c=t[i],d=e[c];t[i]=[c,d,dp(d)]}return t}function Os(e,t){var i=I_(e,t);return Cc(i)?i:r}function gg(e){var t=Ie.call(e,Ss),i=e[Ss];try{e[Ss]=r;var c=!0}catch{}var d=Ba.call(e);return c&&(t?e[Ss]=i:delete e[Ss]),d}var Wi=xi?function(e){return e==null?[]:(e=Ae(e),ms(xi(e),function(t){return yc.call(e,t)}))}:po,lp=xi?function(e){for(var t=[];e;)ys(t,Wi(e)),e=$a(e);return t}:po,st=at;(hi&&st(new hi(new ArrayBuffer(1)))!=us||Ur&&st(new Ur)!=ft||wi&&st(wi.resolve())!=qr||rr&&st(new rr)!=gt||Kr&&st(new Kr)!=ds)&&(st=function(e){var t=at(e),i=t==At?e.constructor:r,c=i?Ps(i):"";if(c)switch(c){case Z_:return us;case J_:return ft;case ef:return qr;case tf:return gt;case sf:return ds}return t});function bg(e,t,i){for(var c=-1,d=i.length;++c<d;){var f=i[c],b=f.size;switch(f.type){case"drop":e+=b;break;case"dropRight":t-=b;break;case"take":t=tt(t,e+b);break;case"takeRight":e=Ve(e,t-b);break}}return{start:e,end:t}}function xg(e){var t=e.match(ti);return t?t[1].split(x):[]}function cp(e,t,i){t=xs(t,e);for(var c=-1,d=t.length,f=!1;++c<d;){var b=Xt(t[c]);if(!(f=e!=null&&i(e,b)))break;e=e[b]}return f||++c!=d?f:(d=e==null?0:e.length,!!d&&gn(d)&&as(b,d)&&(oe(e)||Ms(e)))}function hg(e){var t=e.length,i=new e.constructor(t);return t&&typeof e[0]=="string"&&Ie.call(e,"index")&&(i.index=e.index,i.input=e.input),i}function pp(e){return typeof e.constructor=="function"&&!Qr(e)?nr($a(e)):{}}function wg(e,t,i){var c=e.constructor;switch(t){case Mt:return Fi(e);case Ht:case Yt:return new c(+e);case us:return ag(e,i);case Gs:case Xs:case qs:case Cr:case Sr:case zr:case Nr:case Er:case Lr:return Wc(e,i);case ft:return new c;case Wt:case Qt:return new c(e);case As:return ng(e);case gt:return new c;case Vs:return ig(e)}}function vg(e,t){var i=t.length;if(!i)return e;var c=i-1;return t[c]=(i>1?"& ":"")+t[c],t=t.join(i>2?", ":" "),e.replace(ei,`{
119
119
  /* [wrapped with `+t+`] */
120
- `)}function Tg(e){return oe(e)||Ps(e)||!!(_c&&e&&e[_c])}function rs(e,t){var i=typeof e;return t=t??ge,!!t&&(i=="number"||i!="symbol"&&Fe.test(e))&&e>-1&&e%1==0&&e<t}function nt(e,t,i){if(!Pe(i))return!1;var c=typeof t;return(c=="number"?dt(i)&&rs(t,i.length):c=="string"&&t in i)?Bt(i[t],e):!1}function Wi(e,t){if(oe(e))return!1;var i=typeof e;return i=="number"||i=="symbol"||i=="boolean"||e==null||wt(e)?!0:Ca.test(e)||!qa.test(e)||t!=null&&e in Ae(t)}function Dg(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Vi(e){var t=ln(e),i=y[t];if(typeof i!="function"||!(t in fe.prototype))return!1;if(e===i)return!0;var c=$i(i);return!!c&&e===c[0]}function kg(e){return!!dc&&dc in e}var Ig=Ma?as:po;function Yr(e){var t=e&&e.constructor,i=typeof t=="function"&&t.prototype||tr;return e===i}function dp(e){return e===e&&!Pe(e)}function up(e,t){return function(i){return i==null?!1:i[e]===t&&(t!==r||e in Ae(i))}}function Ag(e){var t=yn(e,function(c){return i.size===_&&i.clear(),c}),i=t.cache;return t}function qg(e,t){var i=e[1],c=t[1],d=i|c,f=d<(B|W|$),b=c==$&&i==ee||c==$&&i==P&&e[7].length<=t[8]||c==($|P)&&t[7].length<=t[8]&&i==ee;if(!(f||b))return e;c&B&&(e[2]=t[2],d|=i&B?0:H);var v=t[3];if(v){var D=e[3];e[3]=D?Gc(D,v,t[4]):v,e[4]=D?ys(e[3],g):t[4]}return v=t[5],v&&(D=e[5],e[5]=D?Xc(D,v,t[6]):v,e[6]=D?ys(e[5],g):t[6]),v=t[7],v&&(e[7]=v),c&$&&(e[8]=e[8]==null?t[8]:tt(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=d,e}function Cg(e){var t=[];if(e!=null)for(var i in Ae(e))t.push(i);return t}function Sg(e){return Fa.call(e)}function mp(e,t,i){return t=Ve(t===r?e.length-1:t,0),function(){for(var c=arguments,d=-1,f=Ve(c.length-t,0),b=I(f);++d<f;)b[d]=c[t+d];d=-1;for(var v=I(t+1);++d<t;)v[d]=c[d];return v[t]=i(b),bt(e,this,v)}}function yp(e,t){return t.length<2?e:Es(e,Nt(t,0,-1))}function zg(e,t){for(var i=e.length,c=tt(t.length,i),d=pt(e);c--;){var f=t[c];e[c]=rs(f,i)?d[f]:r}return e}function Gi(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var _p=gp(Rc),Qr=H_||function(e,t){return Ze.setTimeout(e,t)},Xi=gp(eg);function fp(e,t,i){var c=t+"";return Xi(e,vg(c,Ng(xg(c),i)))}function gp(e){var t=0,i=0;return function(){var c=X_(),d=He-(c-i);if(i=c,d>0){if(++t>=rt)return arguments[0]}else t=0;return e.apply(r,arguments)}}function pn(e,t){var i=-1,c=e.length,d=c-1;for(t=t===r?c:t;++i<t;){var f=zi(i,d),b=e[f];e[f]=e[i],e[i]=b}return e.length=t,e}var bp=Ag(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Qn,function(i,c,d,f){t.push(d?f.replace(ae,"$1"):c||i)}),t});function Gt(e){if(typeof e=="string"||wt(e))return e;var t=e+"";return t=="0"&&1/e==-ze?"-0":t}function Os(e){if(e!=null){try{return Ra.call(e)}catch{}try{return e+""}catch{}}return""}function Ng(e,t){return qt(kt,function(i){var c="_."+i[0];t&i[1]&&!Ea(e,c)&&e.push(c)}),e.sort()}function xp(e){if(e instanceof fe)return e.clone();var t=new St(e.__wrapped__,e.__chain__);return t.__actions__=pt(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function Eg(e,t,i){(i?nt(e,t,i):t===r)?t=1:t=Ve(le(t),0);var c=e==null?0:e.length;if(!c||t<1)return[];for(var d=0,f=0,b=I(Ha(c/t));d<c;)b[f++]=Nt(e,d,d+=t);return b}function Lg(e){for(var t=-1,i=e==null?0:e.length,c=0,d=[];++t<i;){var f=e[t];f&&(d[c++]=f)}return d}function Og(){var e=arguments.length;if(!e)return[];for(var t=I(e-1),i=arguments[0],c=e;c--;)t[c-1]=arguments[c];return ms(oe(i)?pt(i):[i],Je(t,1))}var Pg=de(function(e,t){return $e(e)?Hr(e,Je(t,1,$e,!0)):[]}),Mg=de(function(e,t){var i=Et(t);return $e(i)&&(i=r),$e(e)?Hr(e,Je(t,1,$e,!0),J(i,2)):[]}),Rg=de(function(e,t){var i=Et(t);return $e(i)&&(i=r),$e(e)?Hr(e,Je(t,1,$e,!0),r,i):[]});function Fg(e,t,i){var c=e==null?0:e.length;return c?(t=i||t===r?1:le(t),Nt(e,t<0?0:t,c)):[]}function Bg(e,t,i){var c=e==null?0:e.length;return c?(t=i||t===r?1:le(t),t=c-t,Nt(e,0,t<0?0:t)):[]}function Ug(e,t){return e&&e.length?tn(e,J(t,3),!0,!0):[]}function Kg(e,t){return e&&e.length?tn(e,J(t,3),!0):[]}function $g(e,t,i,c){var d=e==null?0:e.length;return d?(i&&typeof i!="number"&&nt(e,t,i)&&(i=0,c=d),Of(e,t,i,c)):[]}function hp(e,t,i){var c=e==null?0:e.length;if(!c)return-1;var d=i==null?0:le(i);return d<0&&(d=Ve(c+d,0)),La(e,J(t,3),d)}function wp(e,t,i){var c=e==null?0:e.length;if(!c)return-1;var d=c-1;return i!==r&&(d=le(i),d=i<0?Ve(c+d,0):tt(d,c-1)),La(e,J(t,3),d,!0)}function vp(e){var t=e==null?0:e.length;return t?Je(e,1):[]}function jg(e){var t=e==null?0:e.length;return t?Je(e,ze):[]}function Hg(e,t){var i=e==null?0:e.length;return i?(t=t===r?1:le(t),Je(e,t)):[]}function Wg(e){for(var t=-1,i=e==null?0:e.length,c={};++t<i;){var d=e[t];c[d[0]]=d[1]}return c}function Tp(e){return e&&e.length?e[0]:r}function Vg(e,t,i){var c=e==null?0:e.length;if(!c)return-1;var d=i==null?0:le(i);return d<0&&(d=Ve(c+d,0)),Qs(e,t,d)}function Gg(e){var t=e==null?0:e.length;return t?Nt(e,0,-1):[]}var Xg=de(function(e){var t=Le(e,Pi);return t.length&&t[0]===e[0]?Ii(t):[]}),Yg=de(function(e){var t=Et(e),i=Le(e,Pi);return t===Et(i)?t=r:i.pop(),i.length&&i[0]===e[0]?Ii(i,J(t,2)):[]}),Qg=de(function(e){var t=Et(e),i=Le(e,Pi);return t=typeof t=="function"?t:r,t&&i.pop(),i.length&&i[0]===e[0]?Ii(i,r,t):[]});function Zg(e,t){return e==null?"":V_.call(e,t)}function Et(e){var t=e==null?0:e.length;return t?e[t-1]:r}function Jg(e,t,i){var c=e==null?0:e.length;if(!c)return-1;var d=c;return i!==r&&(d=le(i),d=d<0?Ve(c+d,0):tt(d,c-1)),t===t?z_(e,t,d):La(e,rc,d,!0)}function eb(e,t){return e&&e.length?Lc(e,le(t)):r}var tb=de(Dp);function Dp(e,t){return e&&e.length&&t&&t.length?Si(e,t):e}function sb(e,t,i){return e&&e.length&&t&&t.length?Si(e,t,J(i,2)):e}function rb(e,t,i){return e&&e.length&&t&&t.length?Si(e,t,r,i):e}var ab=ss(function(e,t){var i=e==null?0:e.length,c=vi(e,t);return Mc(e,Le(t,function(d){return rs(d,i)?+d:d}).sort(Vc)),c});function nb(e,t){var i=[];if(!(e&&e.length))return i;var c=-1,d=[],f=e.length;for(t=J(t,3);++c<f;){var b=e[c];t(b,c,e)&&(i.push(b),d.push(c))}return Mc(e,d),i}function Yi(e){return e==null?e:Q_.call(e)}function ib(e,t,i){var c=e==null?0:e.length;return c?(i&&typeof i!="number"&&nt(e,t,i)?(t=0,i=c):(t=t==null?0:le(t),i=i===r?c:le(i)),Nt(e,t,i)):[]}function ob(e,t){return en(e,t)}function lb(e,t,i){return Ei(e,t,J(i,2))}function cb(e,t){var i=e==null?0:e.length;if(i){var c=en(e,t);if(c<i&&Bt(e[c],t))return c}return-1}function pb(e,t){return en(e,t,!0)}function db(e,t,i){return Ei(e,t,J(i,2),!0)}function ub(e,t){var i=e==null?0:e.length;if(i){var c=en(e,t,!0)-1;if(Bt(e[c],t))return c}return-1}function mb(e){return e&&e.length?Fc(e):[]}function yb(e,t){return e&&e.length?Fc(e,J(t,2)):[]}function _b(e){var t=e==null?0:e.length;return t?Nt(e,1,t):[]}function fb(e,t,i){return e&&e.length?(t=i||t===r?1:le(t),Nt(e,0,t<0?0:t)):[]}function gb(e,t,i){var c=e==null?0:e.length;return c?(t=i||t===r?1:le(t),t=c-t,Nt(e,t<0?0:t,c)):[]}function bb(e,t){return e&&e.length?tn(e,J(t,3),!1,!0):[]}function xb(e,t){return e&&e.length?tn(e,J(t,3)):[]}var hb=de(function(e){return gs(Je(e,1,$e,!0))}),wb=de(function(e){var t=Et(e);return $e(t)&&(t=r),gs(Je(e,1,$e,!0),J(t,2))}),vb=de(function(e){var t=Et(e);return t=typeof t=="function"?t:r,gs(Je(e,1,$e,!0),r,t)});function Tb(e){return e&&e.length?gs(e):[]}function Db(e,t){return e&&e.length?gs(e,J(t,2)):[]}function kb(e,t){return t=typeof t=="function"?t:r,e&&e.length?gs(e,r,t):[]}function Qi(e){if(!(e&&e.length))return[];var t=0;return e=us(e,function(i){if($e(i))return t=Ve(i.length,t),!0}),yi(t,function(i){return Le(e,di(i))})}function kp(e,t){if(!(e&&e.length))return[];var i=Qi(e);return t==null?i:Le(i,function(c){return bt(t,r,c)})}var Ib=de(function(e,t){return $e(e)?Hr(e,t):[]}),Ab=de(function(e){return Oi(us(e,$e))}),qb=de(function(e){var t=Et(e);return $e(t)&&(t=r),Oi(us(e,$e),J(t,2))}),Cb=de(function(e){var t=Et(e);return t=typeof t=="function"?t:r,Oi(us(e,$e),r,t)}),Sb=de(Qi);function zb(e,t){return $c(e||[],t||[],jr)}function Nb(e,t){return $c(e||[],t||[],Gr)}var Eb=de(function(e){var t=e.length,i=t>1?e[t-1]:r;return i=typeof i=="function"?(e.pop(),i):r,kp(e,i)});function Ip(e){var t=y(e);return t.__chain__=!0,t}function Lb(e,t){return t(e),e}function dn(e,t){return t(e)}var Ob=ss(function(e){var t=e.length,i=t?e[0]:0,c=this.__wrapped__,d=function(f){return vi(f,e)};return t>1||this.__actions__.length||!(c instanceof fe)||!rs(i)?this.thru(d):(c=c.slice(i,+i+(t?1:0)),c.__actions__.push({func:dn,args:[d],thisArg:r}),new St(c,this.__chain__).thru(function(f){return t&&!f.length&&f.push(r),f}))});function Pb(){return Ip(this)}function Mb(){return new St(this.value(),this.__chain__)}function Rb(){this.__values__===r&&(this.__values__=Bp(this.value()));var e=this.__index__>=this.__values__.length,t=e?r:this.__values__[this.__index__++];return{done:e,value:t}}function Fb(){return this}function Bb(e){for(var t,i=this;i instanceof Xa;){var c=xp(i);c.__index__=0,c.__values__=r,t?d.__wrapped__=c:t=c;var d=c;i=i.__wrapped__}return d.__wrapped__=e,t}function Ub(){var e=this.__wrapped__;if(e instanceof fe){var t=e;return this.__actions__.length&&(t=new fe(this)),t=t.reverse(),t.__actions__.push({func:dn,args:[Yi],thisArg:r}),new St(t,this.__chain__)}return this.thru(Yi)}function Kb(){return Kc(this.__wrapped__,this.__actions__)}var $b=sn(function(e,t,i){Ie.call(e,i)?++e[i]:es(e,i,1)});function jb(e,t,i){var c=oe(e)?tc:Lf;return i&&nt(e,t,i)&&(t=r),c(e,J(t,3))}function Hb(e,t){var i=oe(e)?us:kc;return i(e,J(t,3))}var Wb=Jc(hp),Vb=Jc(wp);function Gb(e,t){return Je(un(e,t),1)}function Xb(e,t){return Je(un(e,t),ze)}function Yb(e,t,i){return i=i===r?1:le(i),Je(un(e,t),i)}function Ap(e,t){var i=oe(e)?qt:fs;return i(e,J(t,3))}function qp(e,t){var i=oe(e)?y_:Dc;return i(e,J(t,3))}var Qb=sn(function(e,t,i){Ie.call(e,i)?e[i].push(t):es(e,i,[t])});function Zb(e,t,i,c){e=dt(e)?e:cr(e),i=i&&!c?le(i):0;var d=e.length;return i<0&&(i=Ve(d+i,0)),gn(e)?i<=d&&e.indexOf(t,i)>-1:!!d&&Qs(e,t,i)>-1}var Jb=de(function(e,t,i){var c=-1,d=typeof t=="function",f=dt(e)?I(e.length):[];return fs(e,function(b){f[++c]=d?bt(t,b,i):Wr(b,t,i)}),f}),ex=sn(function(e,t,i){es(e,i,t)});function un(e,t){var i=oe(e)?Le:zc;return i(e,J(t,3))}function tx(e,t,i,c){return e==null?[]:(oe(t)||(t=t==null?[]:[t]),i=c?r:i,oe(i)||(i=i==null?[]:[i]),Oc(e,t,i))}var sx=sn(function(e,t,i){e[i?0:1].push(t)},function(){return[[],[]]});function rx(e,t,i){var c=oe(e)?ci:nc,d=arguments.length<3;return c(e,J(t,4),i,d,fs)}function ax(e,t,i){var c=oe(e)?__:nc,d=arguments.length<3;return c(e,J(t,4),i,d,Dc)}function nx(e,t){var i=oe(e)?us:kc;return i(e,_n(J(t,3)))}function ix(e){var t=oe(e)?hc:Zf;return t(e)}function ox(e,t,i){(i?nt(e,t,i):t===r)?t=1:t=le(t);var c=oe(e)?Cf:Jf;return c(e,t)}function lx(e){var t=oe(e)?Sf:tg;return t(e)}function cx(e){if(e==null)return 0;if(dt(e))return gn(e)?Js(e):e.length;var t=st(e);return t==ft||t==gt?e.size:qi(e).length}function px(e,t,i){var c=oe(e)?pi:sg;return i&&nt(e,t,i)&&(t=r),c(e,J(t,3))}var dx=de(function(e,t){if(e==null)return[];var i=t.length;return i>1&&nt(e,t[0],t[1])?t=[]:i>2&&nt(t[0],t[1],t[2])&&(t=[t[0]]),Oc(e,Je(t,1),[])}),mn=j_||function(){return Ze.Date.now()};function ux(e,t){if(typeof t!="function")throw new Ct(p);return e=le(e),function(){if(--e<1)return t.apply(this,arguments)}}function Cp(e,t,i){return t=i?r:t,t=e&&t==null?e.length:t,ts(e,$,r,r,r,r,t)}function Sp(e,t){var i;if(typeof t!="function")throw new Ct(p);return e=le(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=r),i}}var Zi=de(function(e,t,i){var c=B;if(i.length){var d=ys(i,or(Zi));c|=M}return ts(e,c,t,i,d)}),zp=de(function(e,t,i){var c=B|W;if(i.length){var d=ys(i,or(zp));c|=M}return ts(t,c,e,i,d)});function Np(e,t,i){t=i?r:t;var c=ts(e,ee,r,r,r,r,r,t);return c.placeholder=Np.placeholder,c}function Ep(e,t,i){t=i?r:t;var c=ts(e,N,r,r,r,r,r,t);return c.placeholder=Ep.placeholder,c}function Lp(e,t,i){var c,d,f,b,v,D,L=0,O=!1,R=!1,G=!0;if(typeof e!="function")throw new Ct(p);t=Lt(t)||0,Pe(i)&&(O=!!i.leading,R="maxWait"in i,f=R?Ve(Lt(i.maxWait)||0,t):f,G="trailing"in i?!!i.trailing:G);function Q(je){var Ut=c,is=d;return c=d=r,L=je,b=e.apply(is,Ut),b}function te(je){return L=je,v=Qr(me,t),O?Q(je):b}function pe(je){var Ut=je-D,is=je-L,Jp=t-Ut;return R?tt(Jp,f-is):Jp}function se(je){var Ut=je-D,is=je-L;return D===r||Ut>=t||Ut<0||R&&is>=f}function me(){var je=mn();if(se(je))return be(je);v=Qr(me,pe(je))}function be(je){return v=r,G&&c?Q(je):(c=d=r,b)}function vt(){v!==r&&jc(v),L=0,c=D=d=v=r}function it(){return v===r?b:be(mn())}function Tt(){var je=mn(),Ut=se(je);if(c=arguments,d=this,D=je,Ut){if(v===r)return te(D);if(R)return jc(v),v=Qr(me,t),Q(D)}return v===r&&(v=Qr(me,t)),b}return Tt.cancel=vt,Tt.flush=it,Tt}var mx=de(function(e,t){return Tc(e,1,t)}),yx=de(function(e,t,i){return Tc(e,Lt(t)||0,i)});function _x(e){return ts(e,j)}function yn(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new Ct(p);var i=function(){var c=arguments,d=t?t.apply(this,c):c[0],f=i.cache;if(f.has(d))return f.get(d);var b=e.apply(this,c);return i.cache=f.set(d,b)||f,b};return i.cache=new(yn.Cache||Jt),i}yn.Cache=Jt;function _n(e){if(typeof e!="function")throw new Ct(p);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 fx(e){return Sp(2,e)}var gx=rg(function(e,t){t=t.length==1&&oe(t[0])?Le(t[0],xt(J())):Le(Je(t,1),xt(J()));var i=t.length;return de(function(c){for(var d=-1,f=tt(c.length,i);++d<f;)c[d]=t[d].call(this,c[d]);return bt(e,this,c)})}),Ji=de(function(e,t){var i=ys(t,or(Ji));return ts(e,M,r,t,i)}),Op=de(function(e,t){var i=ys(t,or(Op));return ts(e,E,r,t,i)}),bx=ss(function(e,t){return ts(e,P,r,r,r,t)});function xx(e,t){if(typeof e!="function")throw new Ct(p);return t=t===r?t:le(t),de(e,t)}function hx(e,t){if(typeof e!="function")throw new Ct(p);return t=t==null?0:Ve(le(t),0),de(function(i){var c=i[t],d=xs(i,0,t);return c&&ms(d,c),bt(e,this,d)})}function wx(e,t,i){var c=!0,d=!0;if(typeof e!="function")throw new Ct(p);return Pe(i)&&(c="leading"in i?!!i.leading:c,d="trailing"in i?!!i.trailing:d),Lp(e,t,{leading:c,maxWait:t,trailing:d})}function vx(e){return Cp(e,1)}function Tx(e,t){return Ji(Mi(t),e)}function Dx(){if(!arguments.length)return[];var e=arguments[0];return oe(e)?e:[e]}function kx(e){return zt(e,k)}function Ix(e,t){return t=typeof t=="function"?t:r,zt(e,k,t)}function Ax(e){return zt(e,h|k)}function qx(e,t){return t=typeof t=="function"?t:r,zt(e,h|k,t)}function Cx(e,t){return t==null||vc(e,t,Ye(t))}function Bt(e,t){return e===t||e!==e&&t!==t}var Sx=on(ki),zx=on(function(e,t){return e>=t}),Ps=qc(function(){return arguments}())?qc:function(e){return Be(e)&&Ie.call(e,"callee")&&!yc.call(e,"callee")},oe=I.isArray,Nx=Xl?xt(Xl):Bf;function dt(e){return e!=null&&fn(e.length)&&!as(e)}function $e(e){return Be(e)&&dt(e)}function Ex(e){return e===!0||e===!1||Be(e)&&at(e)==jt}var hs=W_||po,Lx=Yl?xt(Yl):Uf;function Ox(e){return Be(e)&&e.nodeType===1&&!Zr(e)}function Px(e){if(e==null)return!0;if(dt(e)&&(oe(e)||typeof e=="string"||typeof e.splice=="function"||hs(e)||lr(e)||Ps(e)))return!e.length;var t=st(e);if(t==ft||t==gt)return!e.size;if(Yr(e))return!qi(e).length;for(var i in e)if(Ie.call(e,i))return!1;return!0}function Mx(e,t){return Vr(e,t)}function Rx(e,t,i){i=typeof i=="function"?i:r;var c=i?i(e,t):r;return c===r?Vr(e,t,r,i):!!c}function eo(e){if(!Be(e))return!1;var t=at(e);return t==$s||t==Ks||typeof e.message=="string"&&typeof e.name=="string"&&!Zr(e)}function Fx(e){return typeof e=="number"&&fc(e)}function as(e){if(!Pe(e))return!1;var t=at(e);return t==ks||t==va||t==Ir||t==Hs}function Pp(e){return typeof e=="number"&&e==le(e)}function fn(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ge}function Pe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Be(e){return e!=null&&typeof e=="object"}var Mp=Ql?xt(Ql):$f;function Bx(e,t){return e===t||Ai(e,t,ji(t))}function Ux(e,t,i){return i=typeof i=="function"?i:r,Ai(e,t,ji(t),i)}function Kx(e){return Rp(e)&&e!=+e}function $x(e){if(Ig(e))throw new ie(l);return Cc(e)}function jx(e){return e===null}function Hx(e){return e==null}function Rp(e){return typeof e=="number"||Be(e)&&at(e)==Ht}function Zr(e){if(!Be(e)||at(e)!=It)return!1;var t=Ka(e);if(t===null)return!0;var i=Ie.call(t,"constructor")&&t.constructor;return typeof i=="function"&&i instanceof i&&Ra.call(i)==B_}var to=Zl?xt(Zl):jf;function Wx(e){return Pp(e)&&e>=-ge&&e<=ge}var Fp=Jl?xt(Jl):Hf;function gn(e){return typeof e=="string"||!oe(e)&&Be(e)&&at(e)==Yt}function wt(e){return typeof e=="symbol"||Be(e)&&at(e)==Ws}var lr=ec?xt(ec):Wf;function Vx(e){return e===r}function Gx(e){return Be(e)&&st(e)==ps}function Xx(e){return Be(e)&&at(e)==Ta}var Yx=on(Ci),Qx=on(function(e,t){return e<=t});function Bp(e){if(!e)return[];if(dt(e))return gn(e)?Rt(e):pt(e);if(Fr&&e[Fr])return q_(e[Fr]());var t=st(e),i=t==ft?fi:t==gt?Oa:cr;return i(e)}function ns(e){if(!e)return e===0?e:0;if(e=Lt(e),e===ze||e===-ze){var t=e<0?-1:1;return t*Ue}return e===e?e:0}function le(e){var t=ns(e),i=t%1;return t===t?i?t-i:t:0}function Up(e){return e?Ns(le(e),0,re):0}function Lt(e){if(typeof e=="number")return e;if(wt(e))return Ge;if(Pe(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Pe(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=ic(e);var i=ue.test(e);return i||Oe.test(e)?d_(e.slice(2),i?2:8):_e.test(e)?Ge:+e}function Kp(e){return Vt(e,ut(e))}function Zx(e){return e?Ns(le(e),-ge,ge):e===0?e:0}function ke(e){return e==null?"":ht(e)}var Jx=nr(function(e,t){if(Yr(t)||dt(t)){Vt(t,Ye(t),e);return}for(var i in t)Ie.call(t,i)&&jr(e,i,t[i])}),$p=nr(function(e,t){Vt(t,ut(t),e)}),bn=nr(function(e,t,i,c){Vt(t,ut(t),e,c)}),eh=nr(function(e,t,i,c){Vt(t,Ye(t),e,c)}),th=ss(vi);function sh(e,t){var i=ar(e);return t==null?i:wc(i,t)}var rh=de(function(e,t){e=Ae(e);var i=-1,c=t.length,d=c>2?t[2]:r;for(d&&nt(t[0],t[1],d)&&(c=1);++i<c;)for(var f=t[i],b=ut(f),v=-1,D=b.length;++v<D;){var L=b[v],O=e[L];(O===r||Bt(O,tr[L])&&!Ie.call(e,L))&&(e[L]=f[L])}return e}),ah=de(function(e){return e.push(r,ip),bt(jp,r,e)});function nh(e,t){return sc(e,J(t,3),Wt)}function ih(e,t){return sc(e,J(t,3),Di)}function oh(e,t){return e==null?e:Ti(e,J(t,3),ut)}function lh(e,t){return e==null?e:Ic(e,J(t,3),ut)}function ch(e,t){return e&&Wt(e,J(t,3))}function ph(e,t){return e&&Di(e,J(t,3))}function dh(e){return e==null?[]:Za(e,Ye(e))}function uh(e){return e==null?[]:Za(e,ut(e))}function so(e,t,i){var c=e==null?r:Es(e,t);return c===r?i:c}function mh(e,t){return e!=null&&cp(e,t,Pf)}function ro(e,t){return e!=null&&cp(e,t,Mf)}var yh=tp(function(e,t,i){t!=null&&typeof t.toString!="function"&&(t=Fa.call(t)),e[t]=i},no(mt)),_h=tp(function(e,t,i){t!=null&&typeof t.toString!="function"&&(t=Fa.call(t)),Ie.call(e,t)?e[t].push(i):e[t]=[i]},J),fh=de(Wr);function Ye(e){return dt(e)?xc(e):qi(e)}function ut(e){return dt(e)?xc(e,!0):Vf(e)}function gh(e,t){var i={};return t=J(t,3),Wt(e,function(c,d,f){es(i,t(c,d,f),c)}),i}function bh(e,t){var i={};return t=J(t,3),Wt(e,function(c,d,f){es(i,d,t(c,d,f))}),i}var xh=nr(function(e,t,i){Ja(e,t,i)}),jp=nr(function(e,t,i,c){Ja(e,t,i,c)}),hh=ss(function(e,t){var i={};if(e==null)return i;var c=!1;t=Le(t,function(f){return f=bs(f,e),c||(c=f.length>1),f}),Vt(e,Ki(e),i),c&&(i=zt(i,h|w|k,yg));for(var d=t.length;d--;)Li(i,t[d]);return i});function wh(e,t){return Hp(e,_n(J(t)))}var vh=ss(function(e,t){return e==null?{}:Xf(e,t)});function Hp(e,t){if(e==null)return{};var i=Le(Ki(e),function(c){return[c]});return t=J(t),Pc(e,i,function(c,d){return t(c,d[0])})}function Th(e,t,i){t=bs(t,e);var c=-1,d=t.length;for(d||(d=1,e=r);++c<d;){var f=e==null?r:e[Gt(t[c])];f===r&&(c=d,f=i),e=as(f)?f.call(e):f}return e}function Dh(e,t,i){return e==null?e:Gr(e,t,i)}function kh(e,t,i,c){return c=typeof c=="function"?c:r,e==null?e:Gr(e,t,i,c)}var Wp=ap(Ye),Vp=ap(ut);function Ih(e,t,i){var c=oe(e),d=c||hs(e)||lr(e);if(t=J(t,4),i==null){var f=e&&e.constructor;d?i=c?new f:[]:Pe(e)?i=as(f)?ar(Ka(e)):{}:i={}}return(d?qt:Wt)(e,function(b,v,D){return t(i,b,v,D)}),i}function Ah(e,t){return e==null?!0:Li(e,t)}function qh(e,t,i){return e==null?e:Uc(e,t,Mi(i))}function Ch(e,t,i,c){return c=typeof c=="function"?c:r,e==null?e:Uc(e,t,Mi(i),c)}function cr(e){return e==null?[]:_i(e,Ye(e))}function Sh(e){return e==null?[]:_i(e,ut(e))}function zh(e,t,i){return i===r&&(i=t,t=r),i!==r&&(i=Lt(i),i=i===i?i:0),t!==r&&(t=Lt(t),t=t===t?t:0),Ns(Lt(e),t,i)}function Nh(e,t,i){return t=ns(t),i===r?(i=t,t=0):i=ns(i),e=Lt(e),Rf(e,t,i)}function Eh(e,t,i){if(i&&typeof i!="boolean"&&nt(e,t,i)&&(t=i=r),i===r&&(typeof t=="boolean"?(i=t,t=r):typeof e=="boolean"&&(i=e,e=r)),e===r&&t===r?(e=0,t=1):(e=ns(e),t===r?(t=e,e=0):t=ns(t)),e>t){var c=e;e=t,t=c}if(i||e%1||t%1){var d=gc();return tt(e+d*(t-e+p_("1e-"+((d+"").length-1))),t)}return zi(e,t)}var Lh=ir(function(e,t,i){return t=t.toLowerCase(),e+(i?Gp(t):t)});function Gp(e){return ao(ke(e).toLowerCase())}function Xp(e){return e=ke(e),e&&e.replace(lt,T_).replace(e_,"")}function Oh(e,t,i){e=ke(e),t=ht(t);var c=e.length;i=i===r?c:Ns(le(i),0,c);var d=i;return i-=t.length,i>=0&&e.slice(i,d)==t}function Ph(e){return e=ke(e),e&&ka.test(e)?e.replace(Xs,D_):e}function Mh(e){return e=ke(e),e&&Sa.test(e)?e.replace(Pr,"\\$&"):e}var Rh=ir(function(e,t,i){return e+(i?"-":"")+t.toLowerCase()}),Fh=ir(function(e,t,i){return e+(i?" ":"")+t.toLowerCase()}),Bh=Zc("toLowerCase");function Uh(e,t,i){e=ke(e),t=le(t);var c=t?Js(e):0;if(!t||c>=t)return e;var d=(t-c)/2;return nn(Wa(d),i)+e+nn(Ha(d),i)}function Kh(e,t,i){e=ke(e),t=le(t);var c=t?Js(e):0;return t&&c<t?e+nn(t-c,i):e}function $h(e,t,i){e=ke(e),t=le(t);var c=t?Js(e):0;return t&&c<t?nn(t-c,i)+e:e}function jh(e,t,i){return i||t==null?t=0:t&&(t=+t),Y_(ke(e).replace(Mr,""),t||0)}function Hh(e,t,i){return(i?nt(e,t,i):t===r)?t=1:t=le(t),Ni(ke(e),t)}function Wh(){var e=arguments,t=ke(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var Vh=ir(function(e,t,i){return e+(i?"_":"")+t.toLowerCase()});function Gh(e,t,i){return i&&typeof i!="number"&&nt(e,t,i)&&(t=i=r),i=i===r?re:i>>>0,i?(e=ke(e),e&&(typeof t=="string"||t!=null&&!to(t))&&(t=ht(t),!t&&Zs(e))?xs(Rt(e),0,i):e.split(t,i)):[]}var Xh=ir(function(e,t,i){return e+(i?" ":"")+ao(t)});function Yh(e,t,i){return e=ke(e),i=i==null?0:Ns(le(i),0,e.length),t=ht(t),e.slice(i,i+t.length)==t}function Qh(e,t,i){var c=y.templateSettings;i&&nt(e,t,i)&&(t=r),e=ke(e),t=bn({},t,c,np);var d=bn({},t.imports,c.imports,np),f=Ye(d),b=_i(d,f),v,D,L=0,O=t.interpolate||Mt,R="__p += '",G=gi((t.escape||Mt).source+"|"+O.source+"|"+(O===Aa?he:Mt).source+"|"+(t.evaluate||Mt).source+"|$","g"),Q="//# sourceURL="+(Ie.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++n_+"]")+`
121
- `;e.replace(G,function(se,me,be,vt,it,Tt){return be||(be=vt),R+=e.slice(L,Tt).replace(za,k_),me&&(v=!0,R+=`' +
120
+ `)}function Tg(e){return oe(e)||Ms(e)||!!(_c&&e&&e[_c])}function as(e,t){var i=typeof e;return t=t??ge,!!t&&(i=="number"||i!="symbol"&&Fe.test(e))&&e>-1&&e%1==0&&e<t}function nt(e,t,i){if(!Pe(i))return!1;var c=typeof t;return(c=="number"?dt(i)&&as(t,i.length):c=="string"&&t in i)?Ut(i[t],e):!1}function Vi(e,t){if(oe(e))return!1;var i=typeof e;return i=="number"||i=="symbol"||i=="boolean"||e==null||wt(e)?!0:Sa.test(e)||!Ca.test(e)||t!=null&&e in Ae(t)}function Dg(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Gi(e){var t=cn(e),i=y[t];if(typeof i!="function"||!(t in fe.prototype))return!1;if(e===i)return!0;var c=ji(i);return!!c&&e===c[0]}function kg(e){return!!dc&&dc in e}var Ig=Ra?ns:uo;function Qr(e){var t=e&&e.constructor,i=typeof t=="function"&&t.prototype||sr;return e===i}function dp(e){return e===e&&!Pe(e)}function up(e,t){return function(i){return i==null?!1:i[e]===t&&(t!==r||e in Ae(i))}}function Ag(e){var t=_n(e,function(c){return i.size===_&&i.clear(),c}),i=t.cache;return t}function qg(e,t){var i=e[1],c=t[1],d=i|c,f=d<(B|W|$),b=c==$&&i==ee||c==$&&i==P&&e[7].length<=t[8]||c==($|P)&&t[7].length<=t[8]&&i==ee;if(!(f||b))return e;c&B&&(e[2]=t[2],d|=i&B?0:H);var v=t[3];if(v){var D=e[3];e[3]=D?Gc(D,v,t[4]):v,e[4]=D?_s(e[3],g):t[4]}return v=t[5],v&&(D=e[5],e[5]=D?Xc(D,v,t[6]):v,e[6]=D?_s(e[5],g):t[6]),v=t[7],v&&(e[7]=v),c&$&&(e[8]=e[8]==null?t[8]:tt(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=d,e}function Cg(e){var t=[];if(e!=null)for(var i in Ae(e))t.push(i);return t}function Sg(e){return Ba.call(e)}function mp(e,t,i){return t=Ve(t===r?e.length-1:t,0),function(){for(var c=arguments,d=-1,f=Ve(c.length-t,0),b=I(f);++d<f;)b[d]=c[t+d];d=-1;for(var v=I(t+1);++d<t;)v[d]=c[d];return v[t]=i(b),bt(e,this,v)}}function yp(e,t){return t.length<2?e:Ls(e,Et(t,0,-1))}function zg(e,t){for(var i=e.length,c=tt(t.length,i),d=pt(e);c--;){var f=t[c];e[c]=as(f,i)?d[f]:r}return e}function Xi(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var _p=gp(Rc),Zr=H_||function(e,t){return Ze.setTimeout(e,t)},Yi=gp(eg);function fp(e,t,i){var c=t+"";return Yi(e,vg(c,Ng(xg(c),i)))}function gp(e){var t=0,i=0;return function(){var c=X_(),d=He-(c-i);if(i=c,d>0){if(++t>=rt)return arguments[0]}else t=0;return e.apply(r,arguments)}}function dn(e,t){var i=-1,c=e.length,d=c-1;for(t=t===r?c:t;++i<t;){var f=Ni(i,d),b=e[f];e[f]=e[i],e[i]=b}return e.length=t,e}var bp=Ag(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Zn,function(i,c,d,f){t.push(d?f.replace(ae,"$1"):c||i)}),t});function Xt(e){if(typeof e=="string"||wt(e))return e;var t=e+"";return t=="0"&&1/e==-ze?"-0":t}function Ps(e){if(e!=null){try{return Fa.call(e)}catch{}try{return e+""}catch{}}return""}function Ng(e,t){return Ct(It,function(i){var c="_."+i[0];t&i[1]&&!La(e,c)&&e.push(c)}),e.sort()}function xp(e){if(e instanceof fe)return e.clone();var t=new zt(e.__wrapped__,e.__chain__);return t.__actions__=pt(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function Eg(e,t,i){(i?nt(e,t,i):t===r)?t=1:t=Ve(le(t),0);var c=e==null?0:e.length;if(!c||t<1)return[];for(var d=0,f=0,b=I(Wa(c/t));d<c;)b[f++]=Et(e,d,d+=t);return b}function Lg(e){for(var t=-1,i=e==null?0:e.length,c=0,d=[];++t<i;){var f=e[t];f&&(d[c++]=f)}return d}function Og(){var e=arguments.length;if(!e)return[];for(var t=I(e-1),i=arguments[0],c=e;c--;)t[c-1]=arguments[c];return ys(oe(i)?pt(i):[i],Je(t,1))}var Pg=de(function(e,t){return $e(e)?Wr(e,Je(t,1,$e,!0)):[]}),Mg=de(function(e,t){var i=Lt(t);return $e(i)&&(i=r),$e(e)?Wr(e,Je(t,1,$e,!0),J(i,2)):[]}),Rg=de(function(e,t){var i=Lt(t);return $e(i)&&(i=r),$e(e)?Wr(e,Je(t,1,$e,!0),r,i):[]});function Fg(e,t,i){var c=e==null?0:e.length;return c?(t=i||t===r?1:le(t),Et(e,t<0?0:t,c)):[]}function Bg(e,t,i){var c=e==null?0:e.length;return c?(t=i||t===r?1:le(t),t=c-t,Et(e,0,t<0?0:t)):[]}function Ug(e,t){return e&&e.length?sn(e,J(t,3),!0,!0):[]}function Kg(e,t){return e&&e.length?sn(e,J(t,3),!0):[]}function $g(e,t,i,c){var d=e==null?0:e.length;return d?(i&&typeof i!="number"&&nt(e,t,i)&&(i=0,c=d),Of(e,t,i,c)):[]}function hp(e,t,i){var c=e==null?0:e.length;if(!c)return-1;var d=i==null?0:le(i);return d<0&&(d=Ve(c+d,0)),Oa(e,J(t,3),d)}function wp(e,t,i){var c=e==null?0:e.length;if(!c)return-1;var d=c-1;return i!==r&&(d=le(i),d=i<0?Ve(c+d,0):tt(d,c-1)),Oa(e,J(t,3),d,!0)}function vp(e){var t=e==null?0:e.length;return t?Je(e,1):[]}function jg(e){var t=e==null?0:e.length;return t?Je(e,ze):[]}function Hg(e,t){var i=e==null?0:e.length;return i?(t=t===r?1:le(t),Je(e,t)):[]}function Wg(e){for(var t=-1,i=e==null?0:e.length,c={};++t<i;){var d=e[t];c[d[0]]=d[1]}return c}function Tp(e){return e&&e.length?e[0]:r}function Vg(e,t,i){var c=e==null?0:e.length;if(!c)return-1;var d=i==null?0:le(i);return d<0&&(d=Ve(c+d,0)),Zs(e,t,d)}function Gg(e){var t=e==null?0:e.length;return t?Et(e,0,-1):[]}var Xg=de(function(e){var t=Le(e,Mi);return t.length&&t[0]===e[0]?Ai(t):[]}),Yg=de(function(e){var t=Lt(e),i=Le(e,Mi);return t===Lt(i)?t=r:i.pop(),i.length&&i[0]===e[0]?Ai(i,J(t,2)):[]}),Qg=de(function(e){var t=Lt(e),i=Le(e,Mi);return t=typeof t=="function"?t:r,t&&i.pop(),i.length&&i[0]===e[0]?Ai(i,r,t):[]});function Zg(e,t){return e==null?"":V_.call(e,t)}function Lt(e){var t=e==null?0:e.length;return t?e[t-1]:r}function Jg(e,t,i){var c=e==null?0:e.length;if(!c)return-1;var d=c;return i!==r&&(d=le(i),d=d<0?Ve(c+d,0):tt(d,c-1)),t===t?z_(e,t,d):Oa(e,rc,d,!0)}function eb(e,t){return e&&e.length?Lc(e,le(t)):r}var tb=de(Dp);function Dp(e,t){return e&&e.length&&t&&t.length?zi(e,t):e}function sb(e,t,i){return e&&e.length&&t&&t.length?zi(e,t,J(i,2)):e}function rb(e,t,i){return e&&e.length&&t&&t.length?zi(e,t,r,i):e}var ab=rs(function(e,t){var i=e==null?0:e.length,c=Ti(e,t);return Mc(e,Le(t,function(d){return as(d,i)?+d:d}).sort(Vc)),c});function nb(e,t){var i=[];if(!(e&&e.length))return i;var c=-1,d=[],f=e.length;for(t=J(t,3);++c<f;){var b=e[c];t(b,c,e)&&(i.push(b),d.push(c))}return Mc(e,d),i}function Qi(e){return e==null?e:Q_.call(e)}function ib(e,t,i){var c=e==null?0:e.length;return c?(i&&typeof i!="number"&&nt(e,t,i)?(t=0,i=c):(t=t==null?0:le(t),i=i===r?c:le(i)),Et(e,t,i)):[]}function ob(e,t){return tn(e,t)}function lb(e,t,i){return Li(e,t,J(i,2))}function cb(e,t){var i=e==null?0:e.length;if(i){var c=tn(e,t);if(c<i&&Ut(e[c],t))return c}return-1}function pb(e,t){return tn(e,t,!0)}function db(e,t,i){return Li(e,t,J(i,2),!0)}function ub(e,t){var i=e==null?0:e.length;if(i){var c=tn(e,t,!0)-1;if(Ut(e[c],t))return c}return-1}function mb(e){return e&&e.length?Fc(e):[]}function yb(e,t){return e&&e.length?Fc(e,J(t,2)):[]}function _b(e){var t=e==null?0:e.length;return t?Et(e,1,t):[]}function fb(e,t,i){return e&&e.length?(t=i||t===r?1:le(t),Et(e,0,t<0?0:t)):[]}function gb(e,t,i){var c=e==null?0:e.length;return c?(t=i||t===r?1:le(t),t=c-t,Et(e,t<0?0:t,c)):[]}function bb(e,t){return e&&e.length?sn(e,J(t,3),!1,!0):[]}function xb(e,t){return e&&e.length?sn(e,J(t,3)):[]}var hb=de(function(e){return bs(Je(e,1,$e,!0))}),wb=de(function(e){var t=Lt(e);return $e(t)&&(t=r),bs(Je(e,1,$e,!0),J(t,2))}),vb=de(function(e){var t=Lt(e);return t=typeof t=="function"?t:r,bs(Je(e,1,$e,!0),r,t)});function Tb(e){return e&&e.length?bs(e):[]}function Db(e,t){return e&&e.length?bs(e,J(t,2)):[]}function kb(e,t){return t=typeof t=="function"?t:r,e&&e.length?bs(e,r,t):[]}function Zi(e){if(!(e&&e.length))return[];var t=0;return e=ms(e,function(i){if($e(i))return t=Ve(i.length,t),!0}),_i(t,function(i){return Le(e,ui(i))})}function kp(e,t){if(!(e&&e.length))return[];var i=Zi(e);return t==null?i:Le(i,function(c){return bt(t,r,c)})}var Ib=de(function(e,t){return $e(e)?Wr(e,t):[]}),Ab=de(function(e){return Pi(ms(e,$e))}),qb=de(function(e){var t=Lt(e);return $e(t)&&(t=r),Pi(ms(e,$e),J(t,2))}),Cb=de(function(e){var t=Lt(e);return t=typeof t=="function"?t:r,Pi(ms(e,$e),r,t)}),Sb=de(Zi);function zb(e,t){return $c(e||[],t||[],Hr)}function Nb(e,t){return $c(e||[],t||[],Xr)}var Eb=de(function(e){var t=e.length,i=t>1?e[t-1]:r;return i=typeof i=="function"?(e.pop(),i):r,kp(e,i)});function Ip(e){var t=y(e);return t.__chain__=!0,t}function Lb(e,t){return t(e),e}function un(e,t){return t(e)}var Ob=rs(function(e){var t=e.length,i=t?e[0]:0,c=this.__wrapped__,d=function(f){return Ti(f,e)};return t>1||this.__actions__.length||!(c instanceof fe)||!as(i)?this.thru(d):(c=c.slice(i,+i+(t?1:0)),c.__actions__.push({func:un,args:[d],thisArg:r}),new zt(c,this.__chain__).thru(function(f){return t&&!f.length&&f.push(r),f}))});function Pb(){return Ip(this)}function Mb(){return new zt(this.value(),this.__chain__)}function Rb(){this.__values__===r&&(this.__values__=Bp(this.value()));var e=this.__index__>=this.__values__.length,t=e?r:this.__values__[this.__index__++];return{done:e,value:t}}function Fb(){return this}function Bb(e){for(var t,i=this;i instanceof Ya;){var c=xp(i);c.__index__=0,c.__values__=r,t?d.__wrapped__=c:t=c;var d=c;i=i.__wrapped__}return d.__wrapped__=e,t}function Ub(){var e=this.__wrapped__;if(e instanceof fe){var t=e;return this.__actions__.length&&(t=new fe(this)),t=t.reverse(),t.__actions__.push({func:un,args:[Qi],thisArg:r}),new zt(t,this.__chain__)}return this.thru(Qi)}function Kb(){return Kc(this.__wrapped__,this.__actions__)}var $b=rn(function(e,t,i){Ie.call(e,i)?++e[i]:ts(e,i,1)});function jb(e,t,i){var c=oe(e)?tc:Lf;return i&&nt(e,t,i)&&(t=r),c(e,J(t,3))}function Hb(e,t){var i=oe(e)?ms:kc;return i(e,J(t,3))}var Wb=Jc(hp),Vb=Jc(wp);function Gb(e,t){return Je(mn(e,t),1)}function Xb(e,t){return Je(mn(e,t),ze)}function Yb(e,t,i){return i=i===r?1:le(i),Je(mn(e,t),i)}function Ap(e,t){var i=oe(e)?Ct:gs;return i(e,J(t,3))}function qp(e,t){var i=oe(e)?y_:Dc;return i(e,J(t,3))}var Qb=rn(function(e,t,i){Ie.call(e,i)?e[i].push(t):ts(e,i,[t])});function Zb(e,t,i,c){e=dt(e)?e:pr(e),i=i&&!c?le(i):0;var d=e.length;return i<0&&(i=Ve(d+i,0)),bn(e)?i<=d&&e.indexOf(t,i)>-1:!!d&&Zs(e,t,i)>-1}var Jb=de(function(e,t,i){var c=-1,d=typeof t=="function",f=dt(e)?I(e.length):[];return gs(e,function(b){f[++c]=d?bt(t,b,i):Vr(b,t,i)}),f}),ex=rn(function(e,t,i){ts(e,i,t)});function mn(e,t){var i=oe(e)?Le:zc;return i(e,J(t,3))}function tx(e,t,i,c){return e==null?[]:(oe(t)||(t=t==null?[]:[t]),i=c?r:i,oe(i)||(i=i==null?[]:[i]),Oc(e,t,i))}var sx=rn(function(e,t,i){e[i?0:1].push(t)},function(){return[[],[]]});function rx(e,t,i){var c=oe(e)?pi:nc,d=arguments.length<3;return c(e,J(t,4),i,d,gs)}function ax(e,t,i){var c=oe(e)?__:nc,d=arguments.length<3;return c(e,J(t,4),i,d,Dc)}function nx(e,t){var i=oe(e)?ms:kc;return i(e,fn(J(t,3)))}function ix(e){var t=oe(e)?hc:Zf;return t(e)}function ox(e,t,i){(i?nt(e,t,i):t===r)?t=1:t=le(t);var c=oe(e)?Cf:Jf;return c(e,t)}function lx(e){var t=oe(e)?Sf:tg;return t(e)}function cx(e){if(e==null)return 0;if(dt(e))return bn(e)?er(e):e.length;var t=st(e);return t==ft||t==gt?e.size:Ci(e).length}function px(e,t,i){var c=oe(e)?di:sg;return i&&nt(e,t,i)&&(t=r),c(e,J(t,3))}var dx=de(function(e,t){if(e==null)return[];var i=t.length;return i>1&&nt(e,t[0],t[1])?t=[]:i>2&&nt(t[0],t[1],t[2])&&(t=[t[0]]),Oc(e,Je(t,1),[])}),yn=j_||function(){return Ze.Date.now()};function ux(e,t){if(typeof t!="function")throw new St(p);return e=le(e),function(){if(--e<1)return t.apply(this,arguments)}}function Cp(e,t,i){return t=i?r:t,t=e&&t==null?e.length:t,ss(e,$,r,r,r,r,t)}function Sp(e,t){var i;if(typeof t!="function")throw new St(p);return e=le(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=r),i}}var Ji=de(function(e,t,i){var c=B;if(i.length){var d=_s(i,lr(Ji));c|=M}return ss(e,c,t,i,d)}),zp=de(function(e,t,i){var c=B|W;if(i.length){var d=_s(i,lr(zp));c|=M}return ss(t,c,e,i,d)});function Np(e,t,i){t=i?r:t;var c=ss(e,ee,r,r,r,r,r,t);return c.placeholder=Np.placeholder,c}function Ep(e,t,i){t=i?r:t;var c=ss(e,N,r,r,r,r,r,t);return c.placeholder=Ep.placeholder,c}function Lp(e,t,i){var c,d,f,b,v,D,L=0,O=!1,R=!1,G=!0;if(typeof e!="function")throw new St(p);t=Ot(t)||0,Pe(i)&&(O=!!i.leading,R="maxWait"in i,f=R?Ve(Ot(i.maxWait)||0,t):f,G="trailing"in i?!!i.trailing:G);function Q(je){var Kt=c,os=d;return c=d=r,L=je,b=e.apply(os,Kt),b}function te(je){return L=je,v=Zr(me,t),O?Q(je):b}function pe(je){var Kt=je-D,os=je-L,Jp=t-Kt;return R?tt(Jp,f-os):Jp}function se(je){var Kt=je-D,os=je-L;return D===r||Kt>=t||Kt<0||R&&os>=f}function me(){var je=yn();if(se(je))return be(je);v=Zr(me,pe(je))}function be(je){return v=r,G&&c?Q(je):(c=d=r,b)}function vt(){v!==r&&jc(v),L=0,c=D=d=v=r}function it(){return v===r?b:be(yn())}function Tt(){var je=yn(),Kt=se(je);if(c=arguments,d=this,D=je,Kt){if(v===r)return te(D);if(R)return jc(v),v=Zr(me,t),Q(D)}return v===r&&(v=Zr(me,t)),b}return Tt.cancel=vt,Tt.flush=it,Tt}var mx=de(function(e,t){return Tc(e,1,t)}),yx=de(function(e,t,i){return Tc(e,Ot(t)||0,i)});function _x(e){return ss(e,j)}function _n(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new St(p);var i=function(){var c=arguments,d=t?t.apply(this,c):c[0],f=i.cache;if(f.has(d))return f.get(d);var b=e.apply(this,c);return i.cache=f.set(d,b)||f,b};return i.cache=new(_n.Cache||es),i}_n.Cache=es;function fn(e){if(typeof e!="function")throw new St(p);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 fx(e){return Sp(2,e)}var gx=rg(function(e,t){t=t.length==1&&oe(t[0])?Le(t[0],xt(J())):Le(Je(t,1),xt(J()));var i=t.length;return de(function(c){for(var d=-1,f=tt(c.length,i);++d<f;)c[d]=t[d].call(this,c[d]);return bt(e,this,c)})}),eo=de(function(e,t){var i=_s(t,lr(eo));return ss(e,M,r,t,i)}),Op=de(function(e,t){var i=_s(t,lr(Op));return ss(e,E,r,t,i)}),bx=rs(function(e,t){return ss(e,P,r,r,r,t)});function xx(e,t){if(typeof e!="function")throw new St(p);return t=t===r?t:le(t),de(e,t)}function hx(e,t){if(typeof e!="function")throw new St(p);return t=t==null?0:Ve(le(t),0),de(function(i){var c=i[t],d=hs(i,0,t);return c&&ys(d,c),bt(e,this,d)})}function wx(e,t,i){var c=!0,d=!0;if(typeof e!="function")throw new St(p);return Pe(i)&&(c="leading"in i?!!i.leading:c,d="trailing"in i?!!i.trailing:d),Lp(e,t,{leading:c,maxWait:t,trailing:d})}function vx(e){return Cp(e,1)}function Tx(e,t){return eo(Ri(t),e)}function Dx(){if(!arguments.length)return[];var e=arguments[0];return oe(e)?e:[e]}function kx(e){return Nt(e,k)}function Ix(e,t){return t=typeof t=="function"?t:r,Nt(e,k,t)}function Ax(e){return Nt(e,h|k)}function qx(e,t){return t=typeof t=="function"?t:r,Nt(e,h|k,t)}function Cx(e,t){return t==null||vc(e,t,Ye(t))}function Ut(e,t){return e===t||e!==e&&t!==t}var Sx=ln(Ii),zx=ln(function(e,t){return e>=t}),Ms=qc(function(){return arguments}())?qc:function(e){return Be(e)&&Ie.call(e,"callee")&&!yc.call(e,"callee")},oe=I.isArray,Nx=Xl?xt(Xl):Bf;function dt(e){return e!=null&&gn(e.length)&&!ns(e)}function $e(e){return Be(e)&&dt(e)}function Ex(e){return e===!0||e===!1||Be(e)&&at(e)==Ht}var ws=W_||uo,Lx=Yl?xt(Yl):Uf;function Ox(e){return Be(e)&&e.nodeType===1&&!Jr(e)}function Px(e){if(e==null)return!0;if(dt(e)&&(oe(e)||typeof e=="string"||typeof e.splice=="function"||ws(e)||cr(e)||Ms(e)))return!e.length;var t=st(e);if(t==ft||t==gt)return!e.size;if(Qr(e))return!Ci(e).length;for(var i in e)if(Ie.call(e,i))return!1;return!0}function Mx(e,t){return Gr(e,t)}function Rx(e,t,i){i=typeof i=="function"?i:r;var c=i?i(e,t):r;return c===r?Gr(e,t,r,i):!!c}function to(e){if(!Be(e))return!1;var t=at(e);return t==js||t==$s||typeof e.message=="string"&&typeof e.name=="string"&&!Jr(e)}function Fx(e){return typeof e=="number"&&fc(e)}function ns(e){if(!Pe(e))return!1;var t=at(e);return t==Is||t==Ta||t==Ar||t==Ws}function Pp(e){return typeof e=="number"&&e==le(e)}function gn(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ge}function Pe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Be(e){return e!=null&&typeof e=="object"}var Mp=Ql?xt(Ql):$f;function Bx(e,t){return e===t||qi(e,t,Hi(t))}function Ux(e,t,i){return i=typeof i=="function"?i:r,qi(e,t,Hi(t),i)}function Kx(e){return Rp(e)&&e!=+e}function $x(e){if(Ig(e))throw new ie(l);return Cc(e)}function jx(e){return e===null}function Hx(e){return e==null}function Rp(e){return typeof e=="number"||Be(e)&&at(e)==Wt}function Jr(e){if(!Be(e)||at(e)!=At)return!1;var t=$a(e);if(t===null)return!0;var i=Ie.call(t,"constructor")&&t.constructor;return typeof i=="function"&&i instanceof i&&Fa.call(i)==B_}var so=Zl?xt(Zl):jf;function Wx(e){return Pp(e)&&e>=-ge&&e<=ge}var Fp=Jl?xt(Jl):Hf;function bn(e){return typeof e=="string"||!oe(e)&&Be(e)&&at(e)==Qt}function wt(e){return typeof e=="symbol"||Be(e)&&at(e)==Vs}var cr=ec?xt(ec):Wf;function Vx(e){return e===r}function Gx(e){return Be(e)&&st(e)==ds}function Xx(e){return Be(e)&&at(e)==Da}var Yx=ln(Si),Qx=ln(function(e,t){return e<=t});function Bp(e){if(!e)return[];if(dt(e))return bn(e)?Ft(e):pt(e);if(Br&&e[Br])return q_(e[Br]());var t=st(e),i=t==ft?gi:t==gt?Pa:pr;return i(e)}function is(e){if(!e)return e===0?e:0;if(e=Ot(e),e===ze||e===-ze){var t=e<0?-1:1;return t*Ue}return e===e?e:0}function le(e){var t=is(e),i=t%1;return t===t?i?t-i:t:0}function Up(e){return e?Es(le(e),0,re):0}function Ot(e){if(typeof e=="number")return e;if(wt(e))return Ge;if(Pe(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Pe(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=ic(e);var i=ue.test(e);return i||Oe.test(e)?d_(e.slice(2),i?2:8):_e.test(e)?Ge:+e}function Kp(e){return Gt(e,ut(e))}function Zx(e){return e?Es(le(e),-ge,ge):e===0?e:0}function ke(e){return e==null?"":ht(e)}var Jx=ir(function(e,t){if(Qr(t)||dt(t)){Gt(t,Ye(t),e);return}for(var i in t)Ie.call(t,i)&&Hr(e,i,t[i])}),$p=ir(function(e,t){Gt(t,ut(t),e)}),xn=ir(function(e,t,i,c){Gt(t,ut(t),e,c)}),eh=ir(function(e,t,i,c){Gt(t,Ye(t),e,c)}),th=rs(Ti);function sh(e,t){var i=nr(e);return t==null?i:wc(i,t)}var rh=de(function(e,t){e=Ae(e);var i=-1,c=t.length,d=c>2?t[2]:r;for(d&&nt(t[0],t[1],d)&&(c=1);++i<c;)for(var f=t[i],b=ut(f),v=-1,D=b.length;++v<D;){var L=b[v],O=e[L];(O===r||Ut(O,sr[L])&&!Ie.call(e,L))&&(e[L]=f[L])}return e}),ah=de(function(e){return e.push(r,ip),bt(jp,r,e)});function nh(e,t){return sc(e,J(t,3),Vt)}function ih(e,t){return sc(e,J(t,3),ki)}function oh(e,t){return e==null?e:Di(e,J(t,3),ut)}function lh(e,t){return e==null?e:Ic(e,J(t,3),ut)}function ch(e,t){return e&&Vt(e,J(t,3))}function ph(e,t){return e&&ki(e,J(t,3))}function dh(e){return e==null?[]:Ja(e,Ye(e))}function uh(e){return e==null?[]:Ja(e,ut(e))}function ro(e,t,i){var c=e==null?r:Ls(e,t);return c===r?i:c}function mh(e,t){return e!=null&&cp(e,t,Pf)}function ao(e,t){return e!=null&&cp(e,t,Mf)}var yh=tp(function(e,t,i){t!=null&&typeof t.toString!="function"&&(t=Ba.call(t)),e[t]=i},io(mt)),_h=tp(function(e,t,i){t!=null&&typeof t.toString!="function"&&(t=Ba.call(t)),Ie.call(e,t)?e[t].push(i):e[t]=[i]},J),fh=de(Vr);function Ye(e){return dt(e)?xc(e):Ci(e)}function ut(e){return dt(e)?xc(e,!0):Vf(e)}function gh(e,t){var i={};return t=J(t,3),Vt(e,function(c,d,f){ts(i,t(c,d,f),c)}),i}function bh(e,t){var i={};return t=J(t,3),Vt(e,function(c,d,f){ts(i,d,t(c,d,f))}),i}var xh=ir(function(e,t,i){en(e,t,i)}),jp=ir(function(e,t,i,c){en(e,t,i,c)}),hh=rs(function(e,t){var i={};if(e==null)return i;var c=!1;t=Le(t,function(f){return f=xs(f,e),c||(c=f.length>1),f}),Gt(e,$i(e),i),c&&(i=Nt(i,h|w|k,yg));for(var d=t.length;d--;)Oi(i,t[d]);return i});function wh(e,t){return Hp(e,fn(J(t)))}var vh=rs(function(e,t){return e==null?{}:Xf(e,t)});function Hp(e,t){if(e==null)return{};var i=Le($i(e),function(c){return[c]});return t=J(t),Pc(e,i,function(c,d){return t(c,d[0])})}function Th(e,t,i){t=xs(t,e);var c=-1,d=t.length;for(d||(d=1,e=r);++c<d;){var f=e==null?r:e[Xt(t[c])];f===r&&(c=d,f=i),e=ns(f)?f.call(e):f}return e}function Dh(e,t,i){return e==null?e:Xr(e,t,i)}function kh(e,t,i,c){return c=typeof c=="function"?c:r,e==null?e:Xr(e,t,i,c)}var Wp=ap(Ye),Vp=ap(ut);function Ih(e,t,i){var c=oe(e),d=c||ws(e)||cr(e);if(t=J(t,4),i==null){var f=e&&e.constructor;d?i=c?new f:[]:Pe(e)?i=ns(f)?nr($a(e)):{}:i={}}return(d?Ct:Vt)(e,function(b,v,D){return t(i,b,v,D)}),i}function Ah(e,t){return e==null?!0:Oi(e,t)}function qh(e,t,i){return e==null?e:Uc(e,t,Ri(i))}function Ch(e,t,i,c){return c=typeof c=="function"?c:r,e==null?e:Uc(e,t,Ri(i),c)}function pr(e){return e==null?[]:fi(e,Ye(e))}function Sh(e){return e==null?[]:fi(e,ut(e))}function zh(e,t,i){return i===r&&(i=t,t=r),i!==r&&(i=Ot(i),i=i===i?i:0),t!==r&&(t=Ot(t),t=t===t?t:0),Es(Ot(e),t,i)}function Nh(e,t,i){return t=is(t),i===r?(i=t,t=0):i=is(i),e=Ot(e),Rf(e,t,i)}function Eh(e,t,i){if(i&&typeof i!="boolean"&&nt(e,t,i)&&(t=i=r),i===r&&(typeof t=="boolean"?(i=t,t=r):typeof e=="boolean"&&(i=e,e=r)),e===r&&t===r?(e=0,t=1):(e=is(e),t===r?(t=e,e=0):t=is(t)),e>t){var c=e;e=t,t=c}if(i||e%1||t%1){var d=gc();return tt(e+d*(t-e+p_("1e-"+((d+"").length-1))),t)}return Ni(e,t)}var Lh=or(function(e,t,i){return t=t.toLowerCase(),e+(i?Gp(t):t)});function Gp(e){return no(ke(e).toLowerCase())}function Xp(e){return e=ke(e),e&&e.replace(lt,T_).replace(e_,"")}function Oh(e,t,i){e=ke(e),t=ht(t);var c=e.length;i=i===r?c:Es(le(i),0,c);var d=i;return i-=t.length,i>=0&&e.slice(i,d)==t}function Ph(e){return e=ke(e),e&&Ia.test(e)?e.replace(Ys,D_):e}function Mh(e){return e=ke(e),e&&za.test(e)?e.replace(Mr,"\\$&"):e}var Rh=or(function(e,t,i){return e+(i?"-":"")+t.toLowerCase()}),Fh=or(function(e,t,i){return e+(i?" ":"")+t.toLowerCase()}),Bh=Zc("toLowerCase");function Uh(e,t,i){e=ke(e),t=le(t);var c=t?er(e):0;if(!t||c>=t)return e;var d=(t-c)/2;return on(Va(d),i)+e+on(Wa(d),i)}function Kh(e,t,i){e=ke(e),t=le(t);var c=t?er(e):0;return t&&c<t?e+on(t-c,i):e}function $h(e,t,i){e=ke(e),t=le(t);var c=t?er(e):0;return t&&c<t?on(t-c,i)+e:e}function jh(e,t,i){return i||t==null?t=0:t&&(t=+t),Y_(ke(e).replace(Rr,""),t||0)}function Hh(e,t,i){return(i?nt(e,t,i):t===r)?t=1:t=le(t),Ei(ke(e),t)}function Wh(){var e=arguments,t=ke(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var Vh=or(function(e,t,i){return e+(i?"_":"")+t.toLowerCase()});function Gh(e,t,i){return i&&typeof i!="number"&&nt(e,t,i)&&(t=i=r),i=i===r?re:i>>>0,i?(e=ke(e),e&&(typeof t=="string"||t!=null&&!so(t))&&(t=ht(t),!t&&Js(e))?hs(Ft(e),0,i):e.split(t,i)):[]}var Xh=or(function(e,t,i){return e+(i?" ":"")+no(t)});function Yh(e,t,i){return e=ke(e),i=i==null?0:Es(le(i),0,e.length),t=ht(t),e.slice(i,i+t.length)==t}function Qh(e,t,i){var c=y.templateSettings;i&&nt(e,t,i)&&(t=r),e=ke(e),t=xn({},t,c,np);var d=xn({},t.imports,c.imports,np),f=Ye(d),b=fi(d,f),v,D,L=0,O=t.interpolate||Rt,R="__p += '",G=bi((t.escape||Rt).source+"|"+O.source+"|"+(O===qa?he:Rt).source+"|"+(t.evaluate||Rt).source+"|$","g"),Q="//# sourceURL="+(Ie.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++n_+"]")+`
121
+ `;e.replace(G,function(se,me,be,vt,it,Tt){return be||(be=vt),R+=e.slice(L,Tt).replace(Na,k_),me&&(v=!0,R+=`' +
122
122
  __e(`+me+`) +
123
123
  '`),it&&(D=!0,R+=`';
124
124
  `+it+`;
@@ -128,24 +128,24 @@ __p += '`),be&&(R+=`' +
128
128
  `;var te=Ie.call(t,"variable")&&t.variable;if(!te)R=`with (obj) {
129
129
  `+R+`
130
130
  }
131
- `;else if(V.test(te))throw new ie(u);R=(D?R.replace(Xn,""):R).replace(Lr,"$1").replace(Da,"$1;"),R="function("+(te||"obj")+`) {
131
+ `;else if(V.test(te))throw new ie(u);R=(D?R.replace(Yn,""):R).replace(Or,"$1").replace(ka,"$1;"),R="function("+(te||"obj")+`) {
132
132
  `+(te?"":`obj || (obj = {});
133
133
  `)+"var __t, __p = ''"+(v?", __e = _.escape":"")+(D?`, __j = Array.prototype.join;
134
134
  function print() { __p += __j.call(arguments, '') }
135
135
  `:`;
136
136
  `)+R+`return __p
137
- }`;var pe=Qp(function(){return Te(f,Q+"return "+R).apply(r,b)});if(pe.source=R,eo(pe))throw pe;return pe}function Zh(e){return ke(e).toLowerCase()}function Jh(e){return ke(e).toUpperCase()}function ew(e,t,i){if(e=ke(e),e&&(i||t===r))return ic(e);if(!e||!(t=ht(t)))return e;var c=Rt(e),d=Rt(t),f=oc(c,d),b=lc(c,d)+1;return xs(c,f,b).join("")}function tw(e,t,i){if(e=ke(e),e&&(i||t===r))return e.slice(0,pc(e)+1);if(!e||!(t=ht(t)))return e;var c=Rt(e),d=lc(c,Rt(t))+1;return xs(c,0,d).join("")}function sw(e,t,i){if(e=ke(e),e&&(i||t===r))return e.replace(Mr,"");if(!e||!(t=ht(t)))return e;var c=Rt(e),d=oc(c,Rt(t));return xs(c,d).join("")}function rw(e,t){var i=X,c=xe;if(Pe(t)){var d="separator"in t?t.separator:d;i="length"in t?le(t.length):i,c="omission"in t?ht(t.omission):c}e=ke(e);var f=e.length;if(Zs(e)){var b=Rt(e);f=b.length}if(i>=f)return e;var v=i-Js(c);if(v<1)return c;var D=b?xs(b,0,v).join(""):e.slice(0,v);if(d===r)return D+c;if(b&&(v+=D.length-v),to(d)){if(e.slice(v).search(d)){var L,O=D;for(d.global||(d=gi(d.source,ke(De.exec(d))+"g")),d.lastIndex=0;L=d.exec(O);)var R=L.index;D=D.slice(0,R===r?v:R)}}else if(e.indexOf(ht(d),v)!=v){var G=D.lastIndexOf(d);G>-1&&(D=D.slice(0,G))}return D+c}function aw(e){return e=ke(e),e&&Or.test(e)?e.replace(Qt,N_):e}var nw=ir(function(e,t,i){return e+(i?" ":"")+t.toUpperCase()}),ao=Zc("toUpperCase");function Yp(e,t,i){return e=ke(e),t=i?r:t,t===r?A_(e)?O_(e):b_(e):e.match(t)||[]}var Qp=de(function(e,t){try{return bt(e,r,t)}catch(i){return eo(i)?i:new ie(i)}}),iw=ss(function(e,t){return qt(t,function(i){i=Gt(i),es(e,i,Zi(e[i],e))}),e});function ow(e){var t=e==null?0:e.length,i=J();return e=t?Le(e,function(c){if(typeof c[1]!="function")throw new Ct(p);return[i(c[0]),c[1]]}):[],de(function(c){for(var d=-1;++d<t;){var f=e[d];if(bt(f[0],this,c))return bt(f[1],this,c)}})}function lw(e){return Ef(zt(e,h))}function no(e){return function(){return e}}function cw(e,t){return e==null||e!==e?t:e}var pw=ep(),dw=ep(!0);function mt(e){return e}function io(e){return Sc(typeof e=="function"?e:zt(e,h))}function uw(e){return Nc(zt(e,h))}function mw(e,t){return Ec(e,zt(t,h))}var yw=de(function(e,t){return function(i){return Wr(i,e,t)}}),_w=de(function(e,t){return function(i){return Wr(e,i,t)}});function oo(e,t,i){var c=Ye(t),d=Za(t,c);i==null&&!(Pe(t)&&(d.length||!c.length))&&(i=t,t=e,e=this,d=Za(t,Ye(t)));var f=!(Pe(i)&&"chain"in i)||!!i.chain,b=as(e);return qt(d,function(v){var D=t[v];e[v]=D,b&&(e.prototype[v]=function(){var L=this.__chain__;if(f||L){var O=e(this.__wrapped__),R=O.__actions__=pt(this.__actions__);return R.push({func:D,args:arguments,thisArg:e}),O.__chain__=L,O}return D.apply(e,ms([this.value()],arguments))})}),e}function fw(){return Ze._===this&&(Ze._=U_),this}function lo(){}function gw(e){return e=le(e),de(function(t){return Lc(t,e)})}var bw=Fi(Le),xw=Fi(tc),hw=Fi(pi);function Zp(e){return Wi(e)?di(Gt(e)):Yf(e)}function ww(e){return function(t){return e==null?r:Es(e,t)}}var vw=sp(),Tw=sp(!0);function co(){return[]}function po(){return!1}function Dw(){return{}}function kw(){return""}function Iw(){return!0}function Aw(e,t){if(e=le(e),e<1||e>ge)return[];var i=re,c=tt(e,re);t=J(t),e-=re;for(var d=yi(c,t);++i<e;)t(i);return d}function qw(e){return oe(e)?Le(e,Gt):wt(e)?[e]:pt(bp(ke(e)))}function Cw(e){var t=++F_;return ke(e)+t}var Sw=an(function(e,t){return e+t},0),zw=Bi("ceil"),Nw=an(function(e,t){return e/t},1),Ew=Bi("floor");function Lw(e){return e&&e.length?Qa(e,mt,ki):r}function Ow(e,t){return e&&e.length?Qa(e,J(t,2),ki):r}function Pw(e){return ac(e,mt)}function Mw(e,t){return ac(e,J(t,2))}function Rw(e){return e&&e.length?Qa(e,mt,Ci):r}function Fw(e,t){return e&&e.length?Qa(e,J(t,2),Ci):r}var Bw=an(function(e,t){return e*t},1),Uw=Bi("round"),Kw=an(function(e,t){return e-t},0);function $w(e){return e&&e.length?mi(e,mt):0}function jw(e,t){return e&&e.length?mi(e,J(t,2)):0}return y.after=ux,y.ary=Cp,y.assign=Jx,y.assignIn=$p,y.assignInWith=bn,y.assignWith=eh,y.at=th,y.before=Sp,y.bind=Zi,y.bindAll=iw,y.bindKey=zp,y.castArray=Dx,y.chain=Ip,y.chunk=Eg,y.compact=Lg,y.concat=Og,y.cond=ow,y.conforms=lw,y.constant=no,y.countBy=$b,y.create=sh,y.curry=Np,y.curryRight=Ep,y.debounce=Lp,y.defaults=rh,y.defaultsDeep=ah,y.defer=mx,y.delay=yx,y.difference=Pg,y.differenceBy=Mg,y.differenceWith=Rg,y.drop=Fg,y.dropRight=Bg,y.dropRightWhile=Ug,y.dropWhile=Kg,y.fill=$g,y.filter=Hb,y.flatMap=Gb,y.flatMapDeep=Xb,y.flatMapDepth=Yb,y.flatten=vp,y.flattenDeep=jg,y.flattenDepth=Hg,y.flip=_x,y.flow=pw,y.flowRight=dw,y.fromPairs=Wg,y.functions=dh,y.functionsIn=uh,y.groupBy=Qb,y.initial=Gg,y.intersection=Xg,y.intersectionBy=Yg,y.intersectionWith=Qg,y.invert=yh,y.invertBy=_h,y.invokeMap=Jb,y.iteratee=io,y.keyBy=ex,y.keys=Ye,y.keysIn=ut,y.map=un,y.mapKeys=gh,y.mapValues=bh,y.matches=uw,y.matchesProperty=mw,y.memoize=yn,y.merge=xh,y.mergeWith=jp,y.method=yw,y.methodOf=_w,y.mixin=oo,y.negate=_n,y.nthArg=gw,y.omit=hh,y.omitBy=wh,y.once=fx,y.orderBy=tx,y.over=bw,y.overArgs=gx,y.overEvery=xw,y.overSome=hw,y.partial=Ji,y.partialRight=Op,y.partition=sx,y.pick=vh,y.pickBy=Hp,y.property=Zp,y.propertyOf=ww,y.pull=tb,y.pullAll=Dp,y.pullAllBy=sb,y.pullAllWith=rb,y.pullAt=ab,y.range=vw,y.rangeRight=Tw,y.rearg=bx,y.reject=nx,y.remove=nb,y.rest=xx,y.reverse=Yi,y.sampleSize=ox,y.set=Dh,y.setWith=kh,y.shuffle=lx,y.slice=ib,y.sortBy=dx,y.sortedUniq=mb,y.sortedUniqBy=yb,y.split=Gh,y.spread=hx,y.tail=_b,y.take=fb,y.takeRight=gb,y.takeRightWhile=bb,y.takeWhile=xb,y.tap=Lb,y.throttle=wx,y.thru=dn,y.toArray=Bp,y.toPairs=Wp,y.toPairsIn=Vp,y.toPath=qw,y.toPlainObject=Kp,y.transform=Ih,y.unary=vx,y.union=hb,y.unionBy=wb,y.unionWith=vb,y.uniq=Tb,y.uniqBy=Db,y.uniqWith=kb,y.unset=Ah,y.unzip=Qi,y.unzipWith=kp,y.update=qh,y.updateWith=Ch,y.values=cr,y.valuesIn=Sh,y.without=Ib,y.words=Yp,y.wrap=Tx,y.xor=Ab,y.xorBy=qb,y.xorWith=Cb,y.zip=Sb,y.zipObject=zb,y.zipObjectDeep=Nb,y.zipWith=Eb,y.entries=Wp,y.entriesIn=Vp,y.extend=$p,y.extendWith=bn,oo(y,y),y.add=Sw,y.attempt=Qp,y.camelCase=Lh,y.capitalize=Gp,y.ceil=zw,y.clamp=zh,y.clone=kx,y.cloneDeep=Ax,y.cloneDeepWith=qx,y.cloneWith=Ix,y.conformsTo=Cx,y.deburr=Xp,y.defaultTo=cw,y.divide=Nw,y.endsWith=Oh,y.eq=Bt,y.escape=Ph,y.escapeRegExp=Mh,y.every=jb,y.find=Wb,y.findIndex=hp,y.findKey=nh,y.findLast=Vb,y.findLastIndex=wp,y.findLastKey=ih,y.floor=Ew,y.forEach=Ap,y.forEachRight=qp,y.forIn=oh,y.forInRight=lh,y.forOwn=ch,y.forOwnRight=ph,y.get=so,y.gt=Sx,y.gte=zx,y.has=mh,y.hasIn=ro,y.head=Tp,y.identity=mt,y.includes=Zb,y.indexOf=Vg,y.inRange=Nh,y.invoke=fh,y.isArguments=Ps,y.isArray=oe,y.isArrayBuffer=Nx,y.isArrayLike=dt,y.isArrayLikeObject=$e,y.isBoolean=Ex,y.isBuffer=hs,y.isDate=Lx,y.isElement=Ox,y.isEmpty=Px,y.isEqual=Mx,y.isEqualWith=Rx,y.isError=eo,y.isFinite=Fx,y.isFunction=as,y.isInteger=Pp,y.isLength=fn,y.isMap=Mp,y.isMatch=Bx,y.isMatchWith=Ux,y.isNaN=Kx,y.isNative=$x,y.isNil=Hx,y.isNull=jx,y.isNumber=Rp,y.isObject=Pe,y.isObjectLike=Be,y.isPlainObject=Zr,y.isRegExp=to,y.isSafeInteger=Wx,y.isSet=Fp,y.isString=gn,y.isSymbol=wt,y.isTypedArray=lr,y.isUndefined=Vx,y.isWeakMap=Gx,y.isWeakSet=Xx,y.join=Zg,y.kebabCase=Rh,y.last=Et,y.lastIndexOf=Jg,y.lowerCase=Fh,y.lowerFirst=Bh,y.lt=Yx,y.lte=Qx,y.max=Lw,y.maxBy=Ow,y.mean=Pw,y.meanBy=Mw,y.min=Rw,y.minBy=Fw,y.stubArray=co,y.stubFalse=po,y.stubObject=Dw,y.stubString=kw,y.stubTrue=Iw,y.multiply=Bw,y.nth=eb,y.noConflict=fw,y.noop=lo,y.now=mn,y.pad=Uh,y.padEnd=Kh,y.padStart=$h,y.parseInt=jh,y.random=Eh,y.reduce=rx,y.reduceRight=ax,y.repeat=Hh,y.replace=Wh,y.result=Th,y.round=Uw,y.runInContext=T,y.sample=ix,y.size=cx,y.snakeCase=Vh,y.some=px,y.sortedIndex=ob,y.sortedIndexBy=lb,y.sortedIndexOf=cb,y.sortedLastIndex=pb,y.sortedLastIndexBy=db,y.sortedLastIndexOf=ub,y.startCase=Xh,y.startsWith=Yh,y.subtract=Kw,y.sum=$w,y.sumBy=jw,y.template=Qh,y.times=Aw,y.toFinite=ns,y.toInteger=le,y.toLength=Up,y.toLower=Zh,y.toNumber=Lt,y.toSafeInteger=Zx,y.toString=ke,y.toUpper=Jh,y.trim=ew,y.trimEnd=tw,y.trimStart=sw,y.truncate=rw,y.unescape=aw,y.uniqueId=Cw,y.upperCase=nw,y.upperFirst=ao,y.each=Ap,y.eachRight=qp,y.first=Tp,oo(y,function(){var e={};return Wt(y,function(t,i){Ie.call(y.prototype,i)||(e[i]=t)}),e}(),{chain:!1}),y.VERSION=n,qt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){y[e].placeholder=y}),qt(["drop","take"],function(e,t){fe.prototype[e]=function(i){i=i===r?1:Ve(le(i),0);var c=this.__filtered__&&!t?new fe(this):this.clone();return c.__filtered__?c.__takeCount__=tt(i,c.__takeCount__):c.__views__.push({size:tt(i,re),type:e+(c.__dir__<0?"Right":"")}),c},fe.prototype[e+"Right"]=function(i){return this.reverse()[e](i).reverse()}}),qt(["filter","map","takeWhile"],function(e,t){var i=t+1,c=i==Ee||i==ye;fe.prototype[e]=function(d){var f=this.clone();return f.__iteratees__.push({iteratee:J(d,3),type:i}),f.__filtered__=f.__filtered__||c,f}}),qt(["head","last"],function(e,t){var i="take"+(t?"Right":"");fe.prototype[e]=function(){return this[i](1).value()[0]}}),qt(["initial","tail"],function(e,t){var i="drop"+(t?"":"Right");fe.prototype[e]=function(){return this.__filtered__?new fe(this):this[i](1)}}),fe.prototype.compact=function(){return this.filter(mt)},fe.prototype.find=function(e){return this.filter(e).head()},fe.prototype.findLast=function(e){return this.reverse().find(e)},fe.prototype.invokeMap=de(function(e,t){return typeof e=="function"?new fe(this):this.map(function(i){return Wr(i,e,t)})}),fe.prototype.reject=function(e){return this.filter(_n(J(e)))},fe.prototype.slice=function(e,t){e=le(e);var i=this;return i.__filtered__&&(e>0||t<0)?new fe(i):(e<0?i=i.takeRight(-e):e&&(i=i.drop(e)),t!==r&&(t=le(t),i=t<0?i.dropRight(-t):i.take(t-e)),i)},fe.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},fe.prototype.toArray=function(){return this.take(re)},Wt(fe.prototype,function(e,t){var i=/^(?:filter|find|map|reject)|While$/.test(t),c=/^(?:head|last)$/.test(t),d=y[c?"take"+(t=="last"?"Right":""):t],f=c||/^find/.test(t);d&&(y.prototype[t]=function(){var b=this.__wrapped__,v=c?[1]:arguments,D=b instanceof fe,L=v[0],O=D||oe(b),R=function(me){var be=d.apply(y,ms([me],v));return c&&G?be[0]:be};O&&i&&typeof L=="function"&&L.length!=1&&(D=O=!1);var G=this.__chain__,Q=!!this.__actions__.length,te=f&&!G,pe=D&&!Q;if(!f&&O){b=pe?b:new fe(this);var se=e.apply(b,v);return se.__actions__.push({func:dn,args:[R],thisArg:r}),new St(se,G)}return te&&pe?e.apply(this,v):(se=this.thru(R),te?c?se.value()[0]:se.value():se)})}),qt(["pop","push","shift","sort","splice","unshift"],function(e){var t=Pa[e],i=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",c=/^(?:pop|shift)$/.test(e);y.prototype[e]=function(){var d=arguments;if(c&&!this.__chain__){var f=this.value();return t.apply(oe(f)?f:[],d)}return this[i](function(b){return t.apply(oe(b)?b:[],d)})}}),Wt(fe.prototype,function(e,t){var i=y[t];if(i){var c=i.name+"";Ie.call(rr,c)||(rr[c]=[]),rr[c].push({name:t,func:i})}}),rr[rn(r,W).name]=[{name:"wrapper",func:r}],fe.prototype.clone=rf,fe.prototype.reverse=af,fe.prototype.value=nf,y.prototype.at=Ob,y.prototype.chain=Pb,y.prototype.commit=Mb,y.prototype.next=Rb,y.prototype.plant=Bb,y.prototype.reverse=Ub,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=Kb,y.prototype.first=y.prototype.head,Fr&&(y.prototype[Fr]=Fb),y},er=P_();qs?((qs.exports=er)._=er,ii._=er):Ze._=er}).call(pr)}(pa,pa.exports);var Wu=pa.exports;const Re="tccScript",Bs={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 Dt;(function(a){a[a.None=0]="None",a[a.Indent=1]="Indent",a[a.IndentOutdent=2]="IndentOutdent",a[a.Outdent=3]="Outdent"})(Dt||(Dt={}));const qn={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:Dt.Indent}},{beforeText:/if\s+.*\s*$/,action:{indentAction:Dt.Indent}},{beforeText:/else/,action:{indentAction:Dt.Indent}},{beforeText:/for\s+\S+\s*=\s*\S+\s+to\s+\S+(?:\s+by\s+\S+)?\s*$/,action:{indentAction:Dt.Indent}},{beforeText:/for\s+(?:\[\S+\s+\S+]|\S+)\s+in\s+\S+\s*$/,action:{indentAction:Dt.Indent}},{beforeText:/switch\s+.*\s*$/,action:{indentAction:Dt.Indent}},{beforeText:/while\s+.*\s*$/,action:{indentAction:Dt.Indent}},{beforeText:/type\s+\w+/,action:{indentAction:Dt.Indent}},{beforeText:/enum\s+\w+/,action:{indentAction:Dt.Indent}},{beforeText:/^\s*$/,action:{indentAction:Dt.Outdent}}]},A={"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 $t(a,s=1){return a+Math.round(255*Math.min(Math.max(s,0),1)).toString(16).toUpperCase().padStart(2,"0")}const Cn={base:"vs",inherit:!0,rules:[{token:"comment",foreground:A["color-cold-gray-400"]},{token:"comment.annotation",fontStyle:"bold"},{token:"text",foreground:A["color-cold-gray-900"]},{token:"string",foreground:A["color-iguana-green-700"]},{token:"constant.numeric",foreground:A["color-banana-yellow-900"]},{token:"constant.language",foreground:A["color-ripe-red-a600"]},{token:"constant.other.color",foreground:A["color-ripe-red-a600"]},{token:"constant.other",foreground:A["color-ripe-red-a600"]},{token:"support.variable",foreground:A["color-ripe-red-a600"]},{token:"support.function",foreground:A["color-tv-blue-a600"]},{token:"support.type",foreground:A["color-minty-green-400"],fontStyle:"bold"},{token:"entity.name.type",foreground:A["color-minty-green-400"],fontStyle:"bold"},{token:"support.method",foreground:A["color-tv-blue-a600"]},{token:"keyword.equals",foreground:A["color-minty-green-400"]},{token:"keyword.operator",foreground:A["color-minty-green-400"]},{token:"keyword.other",foreground:A["color-minty-green-400"]},{token:"keyword",foreground:A["color-minty-green-400"]},{token:"variable.other",foreground:A["color-cold-gray-800"]},{token:"variable.other.property",foreground:A["color-cold-gray-800"]},{token:"paren",foreground:A["color-black"]},{token:"entity.name.function",foreground:A["color-tv-blue-900"]},{token:"entity.name.method",foreground:A["color-tv-blue-900"]},{token:"meta.function-call",foreground:A["color-grapes-purple-600"]},{token:"entity.name.module.name",foreground:A["color-grapes-purple-600"]},{token:"entity.name.module",foreground:A["color-tv-blue-a600"]},{token:"",background:A["color-white"]}],colors:{"editor.foreground":A["color-cold-gray-900"],"editor.background":"#00000000","editorLineNumber.foreground":A["color-cold-gray-400"],"editorLineNumber.activeForeground":A["color-cold-gray-700"],"editorHoverWidget.background":A["color-white"],"editorHoverWidget.statusBarBackground":A["color-cold-gray-150"],"editorHoverWidget.foreground":A["color-cold-gray-900"],"editorWidget.background":A["color-white"],"editorWidget.foreground":A["color-cold-gray-900"],"editorGutter.background":"#00000000","editor.foldBackground":$t(A["color-cold-gray-200"],.5),"editor.lineHighlightBackground":A["color-tv-blue-50"],"editor.lineHighlightBorder":A["color-tv-blue-50"],"editor.rangeHighlightBackground":A["color-tv-blue-a800"],"editorBracketMatch.background":A["color-cold-gray-150"],"editor.selectionBackground":A["color-tv-blue-100"],"editor.selectionHighlightBackground":A["color-tv-blue-50"],"editor.findMatchBackground":A["color-tan-orange-100"],"editor.findMatchHighlightBackground":A["color-tan-orange-100"],"editor.findMatchBorder":A["color-tan-orange-500"],"list.foreground":A["color-cold-gray-900"],"list.hoverForeground":A["color-cold-gray-900"],"list.activeSelectionBackground":A["color-tv-blue-500"],"list.hoverBackground":A["color-tv-blue-50"],"list.focusHighlightForeground":A["color-tv-blue-100"],"list.inactiveSelectionBackground":A["color-tv-blue-500"],"keybindingLabel.background":A["color-white"],"keybindingLabel.foreground":A["color-cold-gray-900"],"keybindingLabel.border":A["color-cold-gray-150"],"input.foreground":A["color-cold-gray-900"],"textLink.foreground":A["color-tv-blue-500"],"textLink.activeForeground":A["color-tv-blue-600"],"peekViewEditor.matchHighlightBackground":A["color-tan-orange-100"],"peekViewResult.lineForeground":A["color-cold-gray-900"],"editorMarkerNavigationWarning.background":A["color-banana-yellow-800"],"inputValidation.warningBackground":A["color-banana-yellow-800"],"diffEditor.insertedTextBackground":$t(A["color-forest-green-500"],.3),"diffEditor.insertedLineBackground":$t(A["color-forest-green-500"],.15),"diffEditor.removedTextBackground":$t(A["color-ripe-red-500"],.3),"diffEditor.removedLineBackground":$t(A["color-ripe-red-500"],.15),"editorInlayHint.background":A["color-cold-gray-150"],"editorInlayHint.foreground":A["color-cold-gray-550"],"editorError.foreground":A["color-ripe-red-500"],"editorWarning.foreground":A["color-tan-orange-500"]}},Sn={base:"vs-dark",inherit:!0,rules:[{token:"comment",foreground:A["color-cold-gray-500"]},{token:"comment.annotation",fontStyle:"bold"},{token:"text",foreground:A["color-white"]},{token:"string",foreground:A["color-iguana-green-700"]},{token:"constant.numeric",foreground:A["color-banana-yellow-900"]},{token:"constant.language",foreground:A["color-ripe-red-300"]},{token:"constant.other.color",foreground:A["color-ripe-red-300"]},{token:"constant.other",foreground:A["color-ripe-red-300"]},{token:"support.variable",foreground:A["color-ripe-red-300"]},{token:"support.function",foreground:A["color-tv-blue-300"]},{token:"support.method",foreground:A["color-tv-blue-300"]},{token:"support.type",foreground:A["color-minty-green-300"],fontStyle:"bold"},{token:"entity.name.type",foreground:A["color-minty-green-300"],fontStyle:"bold"},{token:"keyword.equals",foreground:A["color-minty-green-300"]},{token:"keyword.operator",foreground:A["color-minty-green-300"]},{token:"keyword.other",foreground:A["color-minty-green-300"]},{token:"keyword",foreground:A["color-minty-green-300"]},{token:"variable.other",foreground:A["color-cold-gray-200"]},{token:"variable.other.property",foreground:A["color-cold-gray-200"]},{token:"paren",foreground:A["color-white"]},{token:"entity.name.function",foreground:A["color-tv-blue-400"]},{token:"entity.name.method",foreground:A["color-tv-blue-400"]},{token:"meta.function-call",foreground:A["color-grapes-purple-300"]},{token:"entity.name.module.name",foreground:A["color-grapes-purple-300"]},{token:"entity.name.module",foreground:A["color-tv-blue-300"]},{token:"",background:A["color-cold-gray-900"]}],colors:{"editor.foreground":A["color-white"],"editor.background":A["color-cold-gray-900"],"editorLineNumber.foreground":A["color-cold-gray-500"],"editorLineNumber.activeForeground":A["color-cold-gray-300"],"editorWidget.background":A["color-cold-gray-850"],"editorHoverWidget.background":A["color-cold-gray-850"],"editorHoverWidget.foreground":A["color-cold-gray-300"],"editorHoverWidget.statusBarBackground":A["color-cold-gray-900"],"editorWidget.foreground":A["color-cold-gray-300"],"editorGutter.background":A["color-cold-gray-900"],"editor.foldBackground":$t(A["color-cold-gray-700"],.5),"editor.lineHighlightBackground":A["color-tv-blue-a900"],"editor.lineHighlightBorder":A["color-tv-blue-a900"],"editor.rangeHighlightBackground":A["color-tv-blue-a800"],"editorBracketMatch.background":A["color-cold-gray-750"],"editor.selectionBackground":A["color-tv-blue-a800"],"editor.selectionHighlightBackground":A["color-cold-gray-800"],"list.foreground":A["color-cold-gray-350"],"list.hoverForeground":A["color-cold-gray-350"],"list.activeSelectionBackground":A["color-tv-blue-500"],"list.hoverBackground":A["color-tv-blue-900"],"list.focusHighlightForeground":A["color-tv-blue-300"],"list.inactiveSelectionBackground":A["color-tv-blue-500"],"keybindingLabel.background":A["color-cold-gray-800"],"keybindingLabel.foreground":A["color-cold-gray-300"],"keybindingLabel.border":A["color-cold-gray-700"],"input.foreground":A["color-cold-gray-350"],"textLink.foreground":A["color-tv-blue-500"],"textLink.activeForeground":A["color-tv-blue-600"],"peekViewEditor.matchHighlightBackground":A["color-tan-orange-a800"],"peekViewResult.lineForeground":A["color-cold-gray-350"],"diffEditor.insertedTextBackground":$t(A["color-iguana-green-a700"],.3),"diffEditor.insertedLineBackground":$t(A["color-iguana-green-a700"],.15),"diffEditor.removedTextBackground":$t(A["color-ripe-red-a400"],.3),"diffEditor.removedLineBackground":$t(A["color-ripe-red-a400"],.15),"editorInlayHint.background":A["color-cold-gray-800"],"editorInlayHint.foreground":A["color-cold-gray-400"],"editorError.foreground":A["color-ripe-red-500"],"editorWarning.foreground":A["color-tan-orange-700"]}},Vu=/(\\(?:[\\'"]))|(\\$)|("|$)|($)/g,Gu=/(\\(?:[\\'"]))|(\\$)|('|$)|($)/g,Wo={"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"},{t:Xu}=Se;class Yu{constructor(s){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:(r=[],n)=>{const o=new Map,l=n.indexOf("(");for(let p=l+1,u=l;p<n.length;p++)n[p]!==","&&n[p]!==")"||(u++,o.set(n.slice(u,p),u),u=p+1);return r.map(({name:p="",displayType:u,desc:m})=>{const _=[],g=o.get(p),h=g+p.length;return _.push(this._formatter.paragraph(this._formatter.bold(p),this._formatter.italic(u||""))),m&&_.push(Array.isArray(m)?m.join(this._formatter.lineBreak):m),{label:[g,h],documentation:{value:_.join(this._formatter.lineBreak)}}})}}),this._formatter=ce,this._isMac=/(Mac|iPhone|iPod|iPad)/i.test(s)}getSignatureHelpValues(s,r,n=0,o=0){var _;const l=this._getFuncItems(s);if(!(l!=null&&l.length))return null;const p=this._getSequentialSignatures(s,l),u=this._getActiveIndex(l,r),m=(_=ws.overloadsFuncs)==null?void 0:_.find(g=>g.name===s&&g.startColumn===n&&o===g.line);return m&&(u.activeSignature=Number(m.index)),{signatures:p,...u}}_getActiveIndex(s,r=[]){let n=0,o=-1;r.some(p=>!!p)||(o=r.length-1);const l=r.pop();if(l)for(const[p,u]of s.entries()){const{args:m}=u;if(m&&m.length){const _=m.findIndex(g=>g.name===l);if(_!=-1){o=_,n=p;break}}}return{activeParameter:o,activeSignature:n}}_getFuncItems(s){return _t.functions.get(s)||Ot.userFuncs.get(s)||Ot.methodFuncs.get(s)}_getSequentialSignatures(s,r){return r.map(n=>{const o=this._getSignatureLabel(s,n);return{label:o,documentation:this._getFormattedSignatureDocumentation(n),parameters:this._getSignatureParams(n.args,o)}})}_getSignatureLabel(s,r,n=!1){const o=[s];return n&&o.push("<type>"),r.args&&(o.push("("),o.push(r.args.map(({name:l})=>l).join(", ")),o.push(")")),o.join("")}_getFormattedSignatureDocumentation(s){const{desc:r}=s,n=[];r&&n.push(Array.isArray(r)?r.join(this._formatter.lineBreak):r);const o=`${this._formatter.code(this._isMac?"⌘":"Ctrl")} +
137
+ }`;var pe=Qp(function(){return Te(f,Q+"return "+R).apply(r,b)});if(pe.source=R,to(pe))throw pe;return pe}function Zh(e){return ke(e).toLowerCase()}function Jh(e){return ke(e).toUpperCase()}function ew(e,t,i){if(e=ke(e),e&&(i||t===r))return ic(e);if(!e||!(t=ht(t)))return e;var c=Ft(e),d=Ft(t),f=oc(c,d),b=lc(c,d)+1;return hs(c,f,b).join("")}function tw(e,t,i){if(e=ke(e),e&&(i||t===r))return e.slice(0,pc(e)+1);if(!e||!(t=ht(t)))return e;var c=Ft(e),d=lc(c,Ft(t))+1;return hs(c,0,d).join("")}function sw(e,t,i){if(e=ke(e),e&&(i||t===r))return e.replace(Rr,"");if(!e||!(t=ht(t)))return e;var c=Ft(e),d=oc(c,Ft(t));return hs(c,d).join("")}function rw(e,t){var i=X,c=xe;if(Pe(t)){var d="separator"in t?t.separator:d;i="length"in t?le(t.length):i,c="omission"in t?ht(t.omission):c}e=ke(e);var f=e.length;if(Js(e)){var b=Ft(e);f=b.length}if(i>=f)return e;var v=i-er(c);if(v<1)return c;var D=b?hs(b,0,v).join(""):e.slice(0,v);if(d===r)return D+c;if(b&&(v+=D.length-v),so(d)){if(e.slice(v).search(d)){var L,O=D;for(d.global||(d=bi(d.source,ke(De.exec(d))+"g")),d.lastIndex=0;L=d.exec(O);)var R=L.index;D=D.slice(0,R===r?v:R)}}else if(e.indexOf(ht(d),v)!=v){var G=D.lastIndexOf(d);G>-1&&(D=D.slice(0,G))}return D+c}function aw(e){return e=ke(e),e&&Pr.test(e)?e.replace(Zt,N_):e}var nw=or(function(e,t,i){return e+(i?" ":"")+t.toUpperCase()}),no=Zc("toUpperCase");function Yp(e,t,i){return e=ke(e),t=i?r:t,t===r?A_(e)?O_(e):b_(e):e.match(t)||[]}var Qp=de(function(e,t){try{return bt(e,r,t)}catch(i){return to(i)?i:new ie(i)}}),iw=rs(function(e,t){return Ct(t,function(i){i=Xt(i),ts(e,i,Ji(e[i],e))}),e});function ow(e){var t=e==null?0:e.length,i=J();return e=t?Le(e,function(c){if(typeof c[1]!="function")throw new St(p);return[i(c[0]),c[1]]}):[],de(function(c){for(var d=-1;++d<t;){var f=e[d];if(bt(f[0],this,c))return bt(f[1],this,c)}})}function lw(e){return Ef(Nt(e,h))}function io(e){return function(){return e}}function cw(e,t){return e==null||e!==e?t:e}var pw=ep(),dw=ep(!0);function mt(e){return e}function oo(e){return Sc(typeof e=="function"?e:Nt(e,h))}function uw(e){return Nc(Nt(e,h))}function mw(e,t){return Ec(e,Nt(t,h))}var yw=de(function(e,t){return function(i){return Vr(i,e,t)}}),_w=de(function(e,t){return function(i){return Vr(e,i,t)}});function lo(e,t,i){var c=Ye(t),d=Ja(t,c);i==null&&!(Pe(t)&&(d.length||!c.length))&&(i=t,t=e,e=this,d=Ja(t,Ye(t)));var f=!(Pe(i)&&"chain"in i)||!!i.chain,b=ns(e);return Ct(d,function(v){var D=t[v];e[v]=D,b&&(e.prototype[v]=function(){var L=this.__chain__;if(f||L){var O=e(this.__wrapped__),R=O.__actions__=pt(this.__actions__);return R.push({func:D,args:arguments,thisArg:e}),O.__chain__=L,O}return D.apply(e,ys([this.value()],arguments))})}),e}function fw(){return Ze._===this&&(Ze._=U_),this}function co(){}function gw(e){return e=le(e),de(function(t){return Lc(t,e)})}var bw=Bi(Le),xw=Bi(tc),hw=Bi(di);function Zp(e){return Vi(e)?ui(Xt(e)):Yf(e)}function ww(e){return function(t){return e==null?r:Ls(e,t)}}var vw=sp(),Tw=sp(!0);function po(){return[]}function uo(){return!1}function Dw(){return{}}function kw(){return""}function Iw(){return!0}function Aw(e,t){if(e=le(e),e<1||e>ge)return[];var i=re,c=tt(e,re);t=J(t),e-=re;for(var d=_i(c,t);++i<e;)t(i);return d}function qw(e){return oe(e)?Le(e,Xt):wt(e)?[e]:pt(bp(ke(e)))}function Cw(e){var t=++F_;return ke(e)+t}var Sw=nn(function(e,t){return e+t},0),zw=Ui("ceil"),Nw=nn(function(e,t){return e/t},1),Ew=Ui("floor");function Lw(e){return e&&e.length?Za(e,mt,Ii):r}function Ow(e,t){return e&&e.length?Za(e,J(t,2),Ii):r}function Pw(e){return ac(e,mt)}function Mw(e,t){return ac(e,J(t,2))}function Rw(e){return e&&e.length?Za(e,mt,Si):r}function Fw(e,t){return e&&e.length?Za(e,J(t,2),Si):r}var Bw=nn(function(e,t){return e*t},1),Uw=Ui("round"),Kw=nn(function(e,t){return e-t},0);function $w(e){return e&&e.length?yi(e,mt):0}function jw(e,t){return e&&e.length?yi(e,J(t,2)):0}return y.after=ux,y.ary=Cp,y.assign=Jx,y.assignIn=$p,y.assignInWith=xn,y.assignWith=eh,y.at=th,y.before=Sp,y.bind=Ji,y.bindAll=iw,y.bindKey=zp,y.castArray=Dx,y.chain=Ip,y.chunk=Eg,y.compact=Lg,y.concat=Og,y.cond=ow,y.conforms=lw,y.constant=io,y.countBy=$b,y.create=sh,y.curry=Np,y.curryRight=Ep,y.debounce=Lp,y.defaults=rh,y.defaultsDeep=ah,y.defer=mx,y.delay=yx,y.difference=Pg,y.differenceBy=Mg,y.differenceWith=Rg,y.drop=Fg,y.dropRight=Bg,y.dropRightWhile=Ug,y.dropWhile=Kg,y.fill=$g,y.filter=Hb,y.flatMap=Gb,y.flatMapDeep=Xb,y.flatMapDepth=Yb,y.flatten=vp,y.flattenDeep=jg,y.flattenDepth=Hg,y.flip=_x,y.flow=pw,y.flowRight=dw,y.fromPairs=Wg,y.functions=dh,y.functionsIn=uh,y.groupBy=Qb,y.initial=Gg,y.intersection=Xg,y.intersectionBy=Yg,y.intersectionWith=Qg,y.invert=yh,y.invertBy=_h,y.invokeMap=Jb,y.iteratee=oo,y.keyBy=ex,y.keys=Ye,y.keysIn=ut,y.map=mn,y.mapKeys=gh,y.mapValues=bh,y.matches=uw,y.matchesProperty=mw,y.memoize=_n,y.merge=xh,y.mergeWith=jp,y.method=yw,y.methodOf=_w,y.mixin=lo,y.negate=fn,y.nthArg=gw,y.omit=hh,y.omitBy=wh,y.once=fx,y.orderBy=tx,y.over=bw,y.overArgs=gx,y.overEvery=xw,y.overSome=hw,y.partial=eo,y.partialRight=Op,y.partition=sx,y.pick=vh,y.pickBy=Hp,y.property=Zp,y.propertyOf=ww,y.pull=tb,y.pullAll=Dp,y.pullAllBy=sb,y.pullAllWith=rb,y.pullAt=ab,y.range=vw,y.rangeRight=Tw,y.rearg=bx,y.reject=nx,y.remove=nb,y.rest=xx,y.reverse=Qi,y.sampleSize=ox,y.set=Dh,y.setWith=kh,y.shuffle=lx,y.slice=ib,y.sortBy=dx,y.sortedUniq=mb,y.sortedUniqBy=yb,y.split=Gh,y.spread=hx,y.tail=_b,y.take=fb,y.takeRight=gb,y.takeRightWhile=bb,y.takeWhile=xb,y.tap=Lb,y.throttle=wx,y.thru=un,y.toArray=Bp,y.toPairs=Wp,y.toPairsIn=Vp,y.toPath=qw,y.toPlainObject=Kp,y.transform=Ih,y.unary=vx,y.union=hb,y.unionBy=wb,y.unionWith=vb,y.uniq=Tb,y.uniqBy=Db,y.uniqWith=kb,y.unset=Ah,y.unzip=Zi,y.unzipWith=kp,y.update=qh,y.updateWith=Ch,y.values=pr,y.valuesIn=Sh,y.without=Ib,y.words=Yp,y.wrap=Tx,y.xor=Ab,y.xorBy=qb,y.xorWith=Cb,y.zip=Sb,y.zipObject=zb,y.zipObjectDeep=Nb,y.zipWith=Eb,y.entries=Wp,y.entriesIn=Vp,y.extend=$p,y.extendWith=xn,lo(y,y),y.add=Sw,y.attempt=Qp,y.camelCase=Lh,y.capitalize=Gp,y.ceil=zw,y.clamp=zh,y.clone=kx,y.cloneDeep=Ax,y.cloneDeepWith=qx,y.cloneWith=Ix,y.conformsTo=Cx,y.deburr=Xp,y.defaultTo=cw,y.divide=Nw,y.endsWith=Oh,y.eq=Ut,y.escape=Ph,y.escapeRegExp=Mh,y.every=jb,y.find=Wb,y.findIndex=hp,y.findKey=nh,y.findLast=Vb,y.findLastIndex=wp,y.findLastKey=ih,y.floor=Ew,y.forEach=Ap,y.forEachRight=qp,y.forIn=oh,y.forInRight=lh,y.forOwn=ch,y.forOwnRight=ph,y.get=ro,y.gt=Sx,y.gte=zx,y.has=mh,y.hasIn=ao,y.head=Tp,y.identity=mt,y.includes=Zb,y.indexOf=Vg,y.inRange=Nh,y.invoke=fh,y.isArguments=Ms,y.isArray=oe,y.isArrayBuffer=Nx,y.isArrayLike=dt,y.isArrayLikeObject=$e,y.isBoolean=Ex,y.isBuffer=ws,y.isDate=Lx,y.isElement=Ox,y.isEmpty=Px,y.isEqual=Mx,y.isEqualWith=Rx,y.isError=to,y.isFinite=Fx,y.isFunction=ns,y.isInteger=Pp,y.isLength=gn,y.isMap=Mp,y.isMatch=Bx,y.isMatchWith=Ux,y.isNaN=Kx,y.isNative=$x,y.isNil=Hx,y.isNull=jx,y.isNumber=Rp,y.isObject=Pe,y.isObjectLike=Be,y.isPlainObject=Jr,y.isRegExp=so,y.isSafeInteger=Wx,y.isSet=Fp,y.isString=bn,y.isSymbol=wt,y.isTypedArray=cr,y.isUndefined=Vx,y.isWeakMap=Gx,y.isWeakSet=Xx,y.join=Zg,y.kebabCase=Rh,y.last=Lt,y.lastIndexOf=Jg,y.lowerCase=Fh,y.lowerFirst=Bh,y.lt=Yx,y.lte=Qx,y.max=Lw,y.maxBy=Ow,y.mean=Pw,y.meanBy=Mw,y.min=Rw,y.minBy=Fw,y.stubArray=po,y.stubFalse=uo,y.stubObject=Dw,y.stubString=kw,y.stubTrue=Iw,y.multiply=Bw,y.nth=eb,y.noConflict=fw,y.noop=co,y.now=yn,y.pad=Uh,y.padEnd=Kh,y.padStart=$h,y.parseInt=jh,y.random=Eh,y.reduce=rx,y.reduceRight=ax,y.repeat=Hh,y.replace=Wh,y.result=Th,y.round=Uw,y.runInContext=T,y.sample=ix,y.size=cx,y.snakeCase=Vh,y.some=px,y.sortedIndex=ob,y.sortedIndexBy=lb,y.sortedIndexOf=cb,y.sortedLastIndex=pb,y.sortedLastIndexBy=db,y.sortedLastIndexOf=ub,y.startCase=Xh,y.startsWith=Yh,y.subtract=Kw,y.sum=$w,y.sumBy=jw,y.template=Qh,y.times=Aw,y.toFinite=is,y.toInteger=le,y.toLength=Up,y.toLower=Zh,y.toNumber=Ot,y.toSafeInteger=Zx,y.toString=ke,y.toUpper=Jh,y.trim=ew,y.trimEnd=tw,y.trimStart=sw,y.truncate=rw,y.unescape=aw,y.uniqueId=Cw,y.upperCase=nw,y.upperFirst=no,y.each=Ap,y.eachRight=qp,y.first=Tp,lo(y,function(){var e={};return Vt(y,function(t,i){Ie.call(y.prototype,i)||(e[i]=t)}),e}(),{chain:!1}),y.VERSION=n,Ct(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){y[e].placeholder=y}),Ct(["drop","take"],function(e,t){fe.prototype[e]=function(i){i=i===r?1:Ve(le(i),0);var c=this.__filtered__&&!t?new fe(this):this.clone();return c.__filtered__?c.__takeCount__=tt(i,c.__takeCount__):c.__views__.push({size:tt(i,re),type:e+(c.__dir__<0?"Right":"")}),c},fe.prototype[e+"Right"]=function(i){return this.reverse()[e](i).reverse()}}),Ct(["filter","map","takeWhile"],function(e,t){var i=t+1,c=i==Ee||i==ye;fe.prototype[e]=function(d){var f=this.clone();return f.__iteratees__.push({iteratee:J(d,3),type:i}),f.__filtered__=f.__filtered__||c,f}}),Ct(["head","last"],function(e,t){var i="take"+(t?"Right":"");fe.prototype[e]=function(){return this[i](1).value()[0]}}),Ct(["initial","tail"],function(e,t){var i="drop"+(t?"":"Right");fe.prototype[e]=function(){return this.__filtered__?new fe(this):this[i](1)}}),fe.prototype.compact=function(){return this.filter(mt)},fe.prototype.find=function(e){return this.filter(e).head()},fe.prototype.findLast=function(e){return this.reverse().find(e)},fe.prototype.invokeMap=de(function(e,t){return typeof e=="function"?new fe(this):this.map(function(i){return Vr(i,e,t)})}),fe.prototype.reject=function(e){return this.filter(fn(J(e)))},fe.prototype.slice=function(e,t){e=le(e);var i=this;return i.__filtered__&&(e>0||t<0)?new fe(i):(e<0?i=i.takeRight(-e):e&&(i=i.drop(e)),t!==r&&(t=le(t),i=t<0?i.dropRight(-t):i.take(t-e)),i)},fe.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},fe.prototype.toArray=function(){return this.take(re)},Vt(fe.prototype,function(e,t){var i=/^(?:filter|find|map|reject)|While$/.test(t),c=/^(?:head|last)$/.test(t),d=y[c?"take"+(t=="last"?"Right":""):t],f=c||/^find/.test(t);d&&(y.prototype[t]=function(){var b=this.__wrapped__,v=c?[1]:arguments,D=b instanceof fe,L=v[0],O=D||oe(b),R=function(me){var be=d.apply(y,ys([me],v));return c&&G?be[0]:be};O&&i&&typeof L=="function"&&L.length!=1&&(D=O=!1);var G=this.__chain__,Q=!!this.__actions__.length,te=f&&!G,pe=D&&!Q;if(!f&&O){b=pe?b:new fe(this);var se=e.apply(b,v);return se.__actions__.push({func:un,args:[R],thisArg:r}),new zt(se,G)}return te&&pe?e.apply(this,v):(se=this.thru(R),te?c?se.value()[0]:se.value():se)})}),Ct(["pop","push","shift","sort","splice","unshift"],function(e){var t=Ma[e],i=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",c=/^(?:pop|shift)$/.test(e);y.prototype[e]=function(){var d=arguments;if(c&&!this.__chain__){var f=this.value();return t.apply(oe(f)?f:[],d)}return this[i](function(b){return t.apply(oe(b)?b:[],d)})}}),Vt(fe.prototype,function(e,t){var i=y[t];if(i){var c=i.name+"";Ie.call(ar,c)||(ar[c]=[]),ar[c].push({name:t,func:i})}}),ar[an(r,W).name]=[{name:"wrapper",func:r}],fe.prototype.clone=rf,fe.prototype.reverse=af,fe.prototype.value=nf,y.prototype.at=Ob,y.prototype.chain=Pb,y.prototype.commit=Mb,y.prototype.next=Rb,y.prototype.plant=Bb,y.prototype.reverse=Ub,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=Kb,y.prototype.first=y.prototype.head,Br&&(y.prototype[Br]=Fb),y},tr=P_();Cs?((Cs.exports=tr)._=tr,oi._=tr):Ze._=tr}).call(dr)}(da,da.exports);var Wu=da.exports;const Re="tccScript",Us={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 kt;(function(a){a[a.None=0]="None",a[a.Indent=1]="Indent",a[a.IndentOutdent=2]="IndentOutdent",a[a.Outdent=3]="Outdent"})(kt||(kt={}));const Cn={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:kt.Indent}},{beforeText:/if\s+.*\s*$/,action:{indentAction:kt.Indent}},{beforeText:/else/,action:{indentAction:kt.Indent}},{beforeText:/for\s+\S+\s*=\s*\S+\s+to\s+\S+(?:\s+by\s+\S+)?\s*$/,action:{indentAction:kt.Indent}},{beforeText:/for\s+(?:\[\S+\s+\S+]|\S+)\s+in\s+\S+\s*$/,action:{indentAction:kt.Indent}},{beforeText:/switch\s+.*\s*$/,action:{indentAction:kt.Indent}},{beforeText:/while\s+.*\s*$/,action:{indentAction:kt.Indent}},{beforeText:/type\s+\w+/,action:{indentAction:kt.Indent}},{beforeText:/enum\s+\w+/,action:{indentAction:kt.Indent}},{beforeText:/^\s*$/,action:{indentAction:kt.Outdent}}]},A={"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 jt(a,s=1){return a+Math.round(255*Math.min(Math.max(s,0),1)).toString(16).toUpperCase().padStart(2,"0")}const Sn={base:"vs",inherit:!0,rules:[{token:"comment",foreground:A["color-cold-gray-400"]},{token:"comment.annotation",fontStyle:"bold"},{token:"text",foreground:A["color-cold-gray-900"]},{token:"string",foreground:A["color-iguana-green-700"]},{token:"constant.numeric",foreground:A["color-banana-yellow-900"]},{token:"constant.language",foreground:A["color-ripe-red-a600"]},{token:"constant.other.color",foreground:A["color-ripe-red-a600"]},{token:"constant.other",foreground:A["color-ripe-red-a600"]},{token:"support.variable",foreground:A["color-ripe-red-a600"]},{token:"support.function",foreground:A["color-tv-blue-a600"]},{token:"support.type",foreground:A["color-minty-green-400"],fontStyle:"bold"},{token:"entity.name.type",foreground:A["color-minty-green-400"],fontStyle:"bold"},{token:"support.method",foreground:A["color-tv-blue-a600"]},{token:"keyword.equals",foreground:A["color-minty-green-400"]},{token:"keyword.operator",foreground:A["color-minty-green-400"]},{token:"keyword.other",foreground:A["color-minty-green-400"]},{token:"keyword",foreground:A["color-minty-green-400"]},{token:"variable.other",foreground:A["color-cold-gray-800"]},{token:"variable.other.property",foreground:A["color-cold-gray-800"]},{token:"paren",foreground:A["color-black"]},{token:"entity.name.function",foreground:A["color-tv-blue-900"]},{token:"entity.name.method",foreground:A["color-tv-blue-900"]},{token:"meta.function-call",foreground:A["color-grapes-purple-600"]},{token:"entity.name.module.name",foreground:A["color-grapes-purple-600"]},{token:"entity.name.module",foreground:A["color-tv-blue-a600"]},{token:"",background:A["color-white"]}],colors:{"editor.foreground":A["color-cold-gray-900"],"editor.background":"#00000000","editorLineNumber.foreground":A["color-cold-gray-400"],"editorLineNumber.activeForeground":A["color-cold-gray-700"],"editorHoverWidget.background":A["color-white"],"editorHoverWidget.statusBarBackground":A["color-cold-gray-150"],"editorHoverWidget.foreground":A["color-cold-gray-900"],"editorWidget.background":A["color-white"],"editorWidget.foreground":A["color-cold-gray-900"],"editorGutter.background":"#00000000","editor.foldBackground":jt(A["color-cold-gray-200"],.5),"editor.lineHighlightBackground":A["color-tv-blue-50"],"editor.lineHighlightBorder":A["color-tv-blue-50"],"editor.rangeHighlightBackground":A["color-tv-blue-a800"],"editorBracketMatch.background":A["color-cold-gray-150"],"editor.selectionBackground":A["color-tv-blue-100"],"editor.selectionHighlightBackground":A["color-tv-blue-50"],"editor.findMatchBackground":A["color-tan-orange-100"],"editor.findMatchHighlightBackground":A["color-tan-orange-100"],"editor.findMatchBorder":A["color-tan-orange-500"],"list.foreground":A["color-cold-gray-900"],"list.hoverForeground":A["color-cold-gray-900"],"list.activeSelectionBackground":A["color-tv-blue-500"],"list.hoverBackground":A["color-tv-blue-50"],"list.focusHighlightForeground":A["color-tv-blue-100"],"list.inactiveSelectionBackground":A["color-tv-blue-500"],"keybindingLabel.background":A["color-white"],"keybindingLabel.foreground":A["color-cold-gray-900"],"keybindingLabel.border":A["color-cold-gray-150"],"input.foreground":A["color-cold-gray-900"],"textLink.foreground":A["color-tv-blue-500"],"textLink.activeForeground":A["color-tv-blue-600"],"peekViewEditor.matchHighlightBackground":A["color-tan-orange-100"],"peekViewResult.lineForeground":A["color-cold-gray-900"],"editorMarkerNavigationWarning.background":A["color-banana-yellow-800"],"inputValidation.warningBackground":A["color-banana-yellow-800"],"diffEditor.insertedTextBackground":jt(A["color-forest-green-500"],.3),"diffEditor.insertedLineBackground":jt(A["color-forest-green-500"],.15),"diffEditor.removedTextBackground":jt(A["color-ripe-red-500"],.3),"diffEditor.removedLineBackground":jt(A["color-ripe-red-500"],.15),"editorInlayHint.background":A["color-cold-gray-150"],"editorInlayHint.foreground":A["color-cold-gray-550"],"editorError.foreground":A["color-ripe-red-500"],"editorWarning.foreground":A["color-tan-orange-500"]}},zn={base:"vs-dark",inherit:!0,rules:[{token:"comment",foreground:A["color-cold-gray-500"]},{token:"comment.annotation",fontStyle:"bold"},{token:"text",foreground:A["color-white"]},{token:"string",foreground:A["color-iguana-green-700"]},{token:"constant.numeric",foreground:A["color-banana-yellow-900"]},{token:"constant.language",foreground:A["color-ripe-red-300"]},{token:"constant.other.color",foreground:A["color-ripe-red-300"]},{token:"constant.other",foreground:A["color-ripe-red-300"]},{token:"support.variable",foreground:A["color-ripe-red-300"]},{token:"support.function",foreground:A["color-tv-blue-300"]},{token:"support.method",foreground:A["color-tv-blue-300"]},{token:"support.type",foreground:A["color-minty-green-300"],fontStyle:"bold"},{token:"entity.name.type",foreground:A["color-minty-green-300"],fontStyle:"bold"},{token:"keyword.equals",foreground:A["color-minty-green-300"]},{token:"keyword.operator",foreground:A["color-minty-green-300"]},{token:"keyword.other",foreground:A["color-minty-green-300"]},{token:"keyword",foreground:A["color-minty-green-300"]},{token:"variable.other",foreground:A["color-cold-gray-200"]},{token:"variable.other.property",foreground:A["color-cold-gray-200"]},{token:"paren",foreground:A["color-white"]},{token:"entity.name.function",foreground:A["color-tv-blue-400"]},{token:"entity.name.method",foreground:A["color-tv-blue-400"]},{token:"meta.function-call",foreground:A["color-grapes-purple-300"]},{token:"entity.name.module.name",foreground:A["color-grapes-purple-300"]},{token:"entity.name.module",foreground:A["color-tv-blue-300"]},{token:"",background:A["color-cold-gray-900"]}],colors:{"editor.foreground":A["color-white"],"editor.background":A["color-cold-gray-900"],"editorLineNumber.foreground":A["color-cold-gray-500"],"editorLineNumber.activeForeground":A["color-cold-gray-300"],"editorWidget.background":A["color-cold-gray-850"],"editorHoverWidget.background":A["color-cold-gray-850"],"editorHoverWidget.foreground":A["color-cold-gray-300"],"editorHoverWidget.statusBarBackground":A["color-cold-gray-900"],"editorWidget.foreground":A["color-cold-gray-300"],"editorGutter.background":A["color-cold-gray-900"],"editor.foldBackground":jt(A["color-cold-gray-700"],.5),"editor.lineHighlightBackground":A["color-tv-blue-a900"],"editor.lineHighlightBorder":A["color-tv-blue-a900"],"editor.rangeHighlightBackground":A["color-tv-blue-a800"],"editorBracketMatch.background":A["color-cold-gray-750"],"editor.selectionBackground":A["color-tv-blue-a800"],"editor.selectionHighlightBackground":A["color-cold-gray-800"],"list.foreground":A["color-cold-gray-350"],"list.hoverForeground":A["color-cold-gray-350"],"list.activeSelectionBackground":A["color-tv-blue-500"],"list.hoverBackground":A["color-tv-blue-900"],"list.focusHighlightForeground":A["color-tv-blue-300"],"list.inactiveSelectionBackground":A["color-tv-blue-500"],"keybindingLabel.background":A["color-cold-gray-800"],"keybindingLabel.foreground":A["color-cold-gray-300"],"keybindingLabel.border":A["color-cold-gray-700"],"input.foreground":A["color-cold-gray-350"],"textLink.foreground":A["color-tv-blue-500"],"textLink.activeForeground":A["color-tv-blue-600"],"peekViewEditor.matchHighlightBackground":A["color-tan-orange-a800"],"peekViewResult.lineForeground":A["color-cold-gray-350"],"diffEditor.insertedTextBackground":jt(A["color-iguana-green-a700"],.3),"diffEditor.insertedLineBackground":jt(A["color-iguana-green-a700"],.15),"diffEditor.removedTextBackground":jt(A["color-ripe-red-a400"],.3),"diffEditor.removedLineBackground":jt(A["color-ripe-red-a400"],.15),"editorInlayHint.background":A["color-cold-gray-800"],"editorInlayHint.foreground":A["color-cold-gray-400"],"editorError.foreground":A["color-ripe-red-500"],"editorWarning.foreground":A["color-tan-orange-700"]}},Vu=/(\\(?:[\\'"]))|(\\$)|("|$)|($)/g,Gu=/(\\(?:[\\'"]))|(\\$)|('|$)|($)/g,Wo={"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"},{t:Xu}=Se;class Yu{constructor(s){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:(r=[],n)=>{const o=new Map,l=n.indexOf("(");for(let p=l+1,u=l;p<n.length;p++)n[p]!==","&&n[p]!==")"||(u++,o.set(n.slice(u,p),u),u=p+1);return r.map(({name:p="",displayType:u,desc:m})=>{const _=[],g=o.get(p),h=g+p.length;return _.push(this._formatter.paragraph(this._formatter.bold(p),this._formatter.italic(u||""))),m&&_.push(Array.isArray(m)?m.join(this._formatter.lineBreak):m),{label:[g,h],documentation:{value:_.join(this._formatter.lineBreak)}}})}}),this._formatter=ce,this._isMac=/(Mac|iPhone|iPod|iPad)/i.test(s)}getSignatureHelpValues(s,r,n=0,o=0){var _;const l=this._getFuncItems(s);if(!(l!=null&&l.length))return null;const p=this._getSequentialSignatures(s,l),u=this._getActiveIndex(l,r),m=(_=vs.overloadsFuncs)==null?void 0:_.find(g=>g.name===s&&g.startColumn===n&&o===g.line);return m&&(u.activeSignature=Number(m.index)),{signatures:p,...u}}_getActiveIndex(s,r=[]){let n=0,o=-1;r.some(p=>!!p)||(o=r.length-1);const l=r.pop();if(l)for(const[p,u]of s.entries()){const{args:m}=u;if(m&&m.length){const _=m.findIndex(g=>g.name===l);if(_!=-1){o=_,n=p;break}}}return{activeParameter:o,activeSignature:n}}_getFuncItems(s){return _t.functions.get(s)||Pt.userFuncs.get(s)||Pt.methodFuncs.get(s)}_getSequentialSignatures(s,r){return r.map(n=>{const o=this._getSignatureLabel(s,n);return{label:o,documentation:this._getFormattedSignatureDocumentation(n),parameters:this._getSignatureParams(n.args,o)}})}_getSignatureLabel(s,r,n=!1){const o=[s];return n&&o.push("<type>"),r.args&&(o.push("("),o.push(r.args.map(({name:l})=>l).join(", ")),o.push(")")),o.join("")}_getFormattedSignatureDocumentation(s){const{desc:r}=s,n=[];r&&n.push(Array.isArray(r)?r.join(this._formatter.lineBreak):r);const o=`${this._formatter.code(this._isMac?"⌘":"Ctrl")} +
138
138
  ${this._formatter.code("Shift")} +
139
- ${this._formatter.code("Space")}`;return n.push(this._formatter.lineBreak),n.push(this._formatter.italic(`${o} ${Xu(we.toTriggerParameterHints)}`)),{value:this._formatter.paragraph(...n)}}}const Qu=new Yu(window.navigator.userAgent);class Zu{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=Wo}getDocumentColors(s){this._count++;const r=[];return s.forEach(n=>{const{range:o}=n;let{matches:l}=n;l=l||[];const p=l[0]||"";let u=null;this._isHexToken(p)?u=this._hexToColor(p):this._isRgbColor(p)?u=this._rgbToColor(p):this._colors[p]?u=this._hexToColor(this._colors[p]):this._isColorExpression(p)&&l[1]&&l[6]&&(u=this._extractNewExpression(l[1],Number(l[6]))),u&&r.push({color:u,range:o})}),r}get _defultColorsRegStr(){return Object.keys(Wo).reduce((s,r)=>`${s}|${r}`,"")}get colorMatchesRegStr(){const s=`#[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*(${s})\\s*,\\s*(\\d+)\\s*\\)|${s}`}getDocumentColorPresentations(s,{color:r,range:n}){const o=s.getValueInRange(n);if(this._isHexToken(o)||this._colors[o])return[{label:this._colorRgbRepresentation(r)},{label:this._colorHexRepresentation(r)}];if(this._isColorExpression(o)||this._isRgbColor(o)){const l=this._isColorExpression(o)?this._colorNewRepresentation(r):this._colorRgbRepresentation(r);if(!l)return[];const p=this._colorHexRepresentation(r);return[{label:l,textEdit:{text:l,range:n}},{label:p,textEdit:{text:p,range:n}}]}return null}_hexFromNumber(s){const r=this._denormalize(s).toString(16);return r.length===1?`0${r}`:r}_normalize(s){return s/255}_denormalize(s){return Math.round(255*s)}_normalizeAlpha(s){return(100-s)/100}_denormalizeAlpha(s){return 100-Math.round(100*s)}_extractNewExpression(s,r){let n=null;return this._isHexToken(s)?n=this._hexToColor(s):this._isRgbColor(s)?n=this._rgbToColor(s):this._colors[s]&&(n=this._hexToColor(this._colors[s])),n&&!Number.isNaN(r)?{...n,alpha:this._normalizeAlpha(r)}:null}_colorHexRepresentation(s){const r=this._hexFromNumber(s.red),n=this._hexFromNumber(s.green),o=this._hexFromNumber(s.blue),l=this._hexFromNumber(s.alpha);return`#${r}${n}${o}${s.alpha===1?"":l}`}_colorRgbRepresentation(s){const r=this._denormalize(s.red),n=this._denormalize(s.green),o=this._denormalize(s.blue),l=this._denormalizeAlpha(s.alpha),p=[r,n,o];return l>0&&p.push(l),`color.rgb(${p.join(", ")})`}_colorNewRepresentation(s){const r={...s,alpha:1};return`color.new(${this._colorHexRepresentation(r)}, ${this._denormalizeAlpha(s.alpha)})`}_hexToColor(s){const r=(s=this._isHexToken(s)?s.slice(1):s).length===3||s.length===4,n=r?`${s.slice(0,1)}${s.slice(0,1)}`:s.slice(0,2),o=r?`${s.slice(1,2)}${s.slice(1,2)}`:s.slice(2,4),l=r?`${s.slice(2,3)}${s.slice(2,3)}`:s.slice(4,6),p=(r?`${s.slice(3,4)}${s.slice(3,4)}`:s.slice(6,8))||"ff";return{red:this._normalize(parseInt(n,16)),green:this._normalize(parseInt(o,16)),blue:this._normalize(parseInt(l,16)),alpha:this._normalize(parseInt(p,16))}}_rgbToColor(s){const r=s.replace(/[^\d,]/g,"").split(","),n=this._normalize(Number(r[0])),o=this._normalize(Number(r[1])),l=this._normalize(Number(r[2])),p=this._normalizeAlpha(Number(r[3]))||1;return isNaN(n)||isNaN(o)||isNaN(l)?null:{red:n,green:o,blue:l,alpha:p}}_isHexToken(s){return s.charAt(0)==="#"}_isRgbColor(s){return s.startsWith("color.rgb")}_isColorExpression(s){return s.startsWith("color.new")}}const zn=new Zu;q.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"}(q.VType||(q.VType={})),q.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"}(q.VRuleType||(q.VRuleType={})),q.VAdjustment=void 0,function(a){a.dividends="dividends",a.none="none",a.splits="splits"}(q.VAdjustment||(q.VAdjustment={})),q.VAlert=void 0,function(a){a.freqAll="freq_all",a.freqOncePerBar="freq_once_per_bar",a.freqOncePerBarClose="freq_once_per_bar_close"}(q.VAlert||(q.VAlert={})),q.VBarmergeGaps=void 0,function(a){a.gapsOff="gaps_off",a.gapsOn="gaps_on",a.lookaheadOff="lookahead_off",a.lookaheadOn="lookahead_on"}(q.VBarmergeGaps||(q.VBarmergeGaps={})),q.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"}(q.VPlotDisplay||(q.VPlotDisplay={})),q.VExtend=void 0,function(a){a.both="both",a.left="left",a.none="none",a.right="right"}(q.VExtend||(q.VExtend={})),q.VFormatType=void 0,function(a){a.inherit="inherit",a.mintick="mintick",a.percent="percent",a.price="price",a.volume="volume"}(q.VFormatType||(q.VFormatType={})),q.VHlineStyle=void 0,function(a){a.styleDashed="style_dashed",a.styleDotted="style_dotted",a.styleSolid="style_solid"}(q.VHlineStyle||(q.VHlineStyle={})),q.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"}(q.VLabelStyle||(q.VLabelStyle={})),q.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"}(q.VLineStyle||(q.VLineStyle={})),q.VLocation=void 0,function(a){a.abovebar="abovebar",a.absolute="absolute",a.belowbar="belowbar",a.bottom="bottom",a.top="top"}(q.VLocation||(q.VLocation={})),q.VSortOrder=void 0,function(a){a.ascending="ascending",a.descending="descending"}(q.VSortOrder||(q.VSortOrder={})),q.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"}(q.VPlotStyle||(q.VPlotStyle={})),q.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"}(q.VPosition||(q.VPosition={})),q.VScale=void 0,function(a){a.left="left",a.none="none",a.right="right"}(q.VScale||(q.VScale={})),q.VSession=void 0,function(a){a.extended="extended",a.regular="regular"}(q.VSession||(q.VSession={})),q.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"}(q.VShape||(q.VShape={})),q.VSize=void 0,function(a){a.auto="auto",a.huge="huge",a.large="large",a.normal="normal",a.small="small",a.tiny="tiny"}(q.VSize||(q.VSize={})),q.VFont=void 0,function(a){a.familyDefault="default",a.familyMonospace="monospace"}(q.VFont||(q.VFont={})),q.VStrategy=void 0,function(a){a.cash="cash",a.fixed="fixed",a.percentOfEquity="percent_of_equity"}(q.VStrategy||(q.VStrategy={})),q.VCommission=void 0,function(a){a.cashPerContract="cash_per_contract",a.cashPerOrder="cash_per_order",a.percent="percent"}(q.VCommission||(q.VCommission={})),q.VDirection=void 0,function(a){a.all="all",a.long="long",a.short="short"}(q.VDirection||(q.VDirection={})),q.VOca=void 0,function(a){a.cancel="cancel",a.none="none",a.reduce="reduce"}(q.VOca||(q.VOca={})),q.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"}(q.VText||(q.VText={})),q.VXloc=void 0,function(a){a.bar_index="bar_index",a.bar_time="bar_time"}(q.VXloc||(q.VXloc={})),q.VYloc=void 0,function(a){a.abovebar="abovebar",a.belowbar="belowbar",a.price="price"}(q.VYloc||(q.VYloc={})),q.VEarnings=void 0,function(a){a.actual="actual",a.estimate="estimate",a.standardized="standardized"}(q.VEarnings||(q.VEarnings={})),q.VPivotType=void 0,function(a){a.traditional="Traditional",a.fibonacci="Fibonacci",a.woodie="Woodie",a.classic="Classic",a.dm="DM",a.camarilla="Camarilla"}(q.VPivotType||(q.VPivotType={})),q.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"}(q.VInputType||(q.VInputType={}));var Vo;(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"})(Vo||(Vo={})),q.VScriptType=void 0,function(a){a.library="library",a.indicator="indicator",a.strategy="strategy"}(q.VScriptType||(q.VScriptType={})),q.VType.SERIES,q.VType.SIMPLE,q.VType.INPUT,q.VType.CONST,q.VType.INT,q.VType.FLOAT,q.VType.BOOL,q.VType.COLOR,q.VType.STRING;const Ju={domReadOnly:!0,scrollBeyondLastLine:!1,readOnly:!0,minimap:{enabled:!1},scrollbar:{vertical:"hidden",horizontal:"hidden",alwaysConsumeMouseWheel:!1},contextmenu:!1},Go={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 em{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(s){this._editor=s}async setInlayHints(s){const{endLine:r,endColumn:n,name:o,libraryId:l,libraryName:p}=s;if(this._importCompleteLibrary.has(l)){const u=this._funcs.get(l);return((u==null?void 0:u.name)!==o||!o&&!this._inlayHints.has(l))&&(this._updateFuncNames(o||p,l),this._inlayHintsHandle(s)),this._importCompleteLibrary.get(l)}return this._importCompleteLibrary.set(l,Go),this._inlayHints.set(l,{label:"loading...",position:{column:n,lineNumber:r},paddingLeft:!0}),this.triggerInlayHints(),this._updateFuncNames(o||p,l),setTimeout(()=>{this._inlayHints.has(l)&&this._inlayHintsHandle(s)},2e3),Go}deleteInlayHints(s){this._inlayHints.delete(s)}clearInlayHints(){this._inlayHints.clear()}triggerInlayHints(){this._editor&&this._editor.updateOptions({inlayHints:{fontFamily:String(Date.now())}})}_updateFuncNames(s,r){const n=this._importCompleteLibrary.get(r);if(!n)return;const o=n.functions.map(l=>`${s}.${l.name}`);this._funcs.set(r,{name:s,funcs:o}),this._updateMonarchTokens()}_setNoNameInlayHints(s){const{endLine:r,endColumn:n,libraryId:o,libraryName:l}=s;this._inlayHints.set(o,{label:`as ${l}`,position:{column:n,lineNumber:r},paddingLeft:!0})}_inlayHintsHandle(s){const{name:r,libraryId:n}=s;r?this._inlayHints.delete(n):this._setNoNameInlayHints(s),this.triggerInlayHints()}_updateMonarchTokens(){const s=[...this._funcs.values()].map(o=>o.funcs.join("|")),r=new RegExp("\\b("+s.join("|")+")(?=\\s*\\()"),n=[...Bs.tokenizer.root];n.splice(15,0,[r,"meta.function-call"]),qe.languages.setMonarchTokensProvider(Re,{...Bs,tokenizer:{...Bs.tokenizer,root:n}})}}const da=new em;function tm(a,s,r){var k;const n={startLineNumber:s.lineNumber,startColumn:1,endLineNumber:s.lineNumber,endColumn:s.column},o=a.getValueInRange(n);if(/^\/\/\s*@/.test(o))return{suggestions:Ot.annotationSuggestions};if(r.triggerCharacter==="@")return{suggestions:[]};const l=o.match(/([\w.]+)$/)||[];if(!l.length)return{suggestions:[]};const p=(k=l[0])==null?void 0:k.match(/.*[^\w.]+([\w.]+)(?=\.)|([\w.]+)(?=\.)/),u=p?p[1]?p[1]:p[2]?p[2]:void 0:void 0,m=a.getWordUntilPosition(s),_=ws.parseCurrentInputFunc(o),g={startLineNumber:s.lineNumber,endLineNumber:s.lineNumber,startColumn:m.startColumn,endColumn:m.endColumn},h=a.getValueInRange({...g,startColumn:m.endColumn,endColumn:m.endColumn+1});Ot.nextIsBracket=h==="(";let w=Xo(Ot.getSuggestions(u)||[],g);if(l[0]==="."&&(w=[]),_&&!u&&!/=\s*\w+$/.test(o)){const S=Xo(Ot.getArgSuggestions(_.funcName)||[],g);w=w.concat(S)}return{suggestions:w||[],dispose:()=>{}}}function sm(a){if(a.kind!==1)return a;const{originInsertText:s}=a;return Ot.nextIsBracket?a.insertText=s:a.insertText=s+Ot.bracketsPostfix,a}function rm(a,s){var n;const r=ws.parseLineContentFuncVar(s.column,s.lineNumber,a,s);if(r!=null&&r.libraryId)return{contents:[{value:Fu(r)}]};if((n=r==null?void 0:r.docValue)!=null&&n.length){const o=Bu(r.docValue,r.index,r.isBuildIn);if(o)return{contents:[{value:o}]}}return{contents:[]}}function am(a,s){var h,w;const r={startLineNumber:s.lineNumber,endLineNumber:s.lineNumber,startColumn:1,endColumn:s.column},n=a.getValueInRange(r),o=a.findMatches(String(Vu),r,!0,!1,null,!0),l=a.findMatches(String(Gu),r,!0,!1,null,!0),p=(h=o.pop())==null?void 0:h.matches,u=(w=l.pop())==null?void 0:w.matches;let m=!1;o.length%2===0?p&&p[0]==='"'&&(m=!0):p&&!p[0]&&(m=!0);let _=!1;l.length%2===0?u&&u[0]==="'"&&(_=!0):u&&!u[0]&&(_=!0);const g=ws.parseCurrentInputFuncAndArg(n,_,m);if(g){const{funcName:k,args:S,startIndex:C}=g,B=Qu.getSignatureHelpValues(k,S,C+1,s.lineNumber);if(B)return{value:B,dispose:()=>{}}}return null}function nm(a){let s=a.findMatches(zn.colorMatchesRegStr,!0,!0,!1,null,!0);return s=s.filter(n=>{const o=a.getValueInRange({...n.range,startColumn:0});return o.indexOf("//")===-1||o.indexOf("//")>n.range.endColumn}),zn.getDocumentColors(s)}function im(a,s){return zn.getDocumentColorPresentations(a,s)||[]}function om(a,s){var u,m;const r=a.getModel(),n=ws.parseLineContentFuncVar(s.startColumn+1,s.startLineNumber,r);if(!n||n.isBuildIn||!n.docValue||!n.docValue[0].pos)return n!=null&&n.isBuildIn||(m=(u=n==null?void 0:n.docValue)==null?void 0:u[0].title)!=null&&m.startsWith("built-in")?n:void 0;const{lineNumber:o,column:l}=n.docValue[0].pos,p={startLineNumber:o,endLineNumber:o,startColumn:l,endColumn:l};a.revealRangeInCenterIfOutsideViewport(p),a.setSelection(p)}function lm(a,s){return ws.parseLineContentFuncVar(s.column,s.lineNumber,a,s)?{uri:a.uri,range:{startLineNumber:s.lineNumber,endLineNumber:s.lineNumber,startColumn:s.column-1,endColumn:s.column-1}}:null}function Xo(a,s){return a.map(r=>(r.range=s,r))}function cm(){return{hints:da.inlayHints,dispose:()=>{}}}var wr={},vr=ed;if(process.env.NODE_ENV==="production")wr.createRoot=vr.createRoot,wr.hydrateRoot=vr.hydrateRoot;else{var ua=vr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;wr.createRoot=function(a,s){ua.usingClientEntryPoint=!0;try{return vr.createRoot(a,s)}finally{ua.usingClientEntryPoint=!1}},wr.hydrateRoot=function(a,s,r){ua.usingClientEntryPoint=!0;try{return vr.hydrateRoot(a,s,r)}finally{ua.usingClientEntryPoint=!1}}}var et;(function(a){a.added="added",a.removed="removed",a.modified="modified"})(et||(et={}));const pm=(a,s)=>{const{close:r,retracement:n}=a,[o,l]=F.useState("modified");return F.useImperativeHandle(s,()=>({updateType(p){l(p)}})),U.jsxs("div",{className:`content-popup content-${o}-popup`,children:[U.jsx("div",{className:`triangle-popup triangle-${o}-popup`}),U.jsxs("div",{className:`header-popup header-${o}-popup`,children:[U.jsx("div",{className:"title-popup",children:"Local working changes"}),U.jsx("div",{className:"actions-popup",children:U.jsx("div",{onClick:r,"data-role":"button",className:"button-popup","data-name":"button-close-diff",children:U.jsx("span",{className:"icon-popup",role:"img",children:U.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",width:"12",height:"12",children:U.jsx("path",{stroke:"currentColor",strokeWidth:"1.2",d:"m1.5 1.5 9 9m0-9-9 9"})})})})})]}),U.jsx("div",{id:"diffEditorContainer",style:{height:"100%"}})]})},dm=F.forwardRef(pm);class um{constructor(s,r,n=!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=s,this._domNode=document.createElement("div"),this._domNode.style.display="none",this._domNode.style.width=n?"calc(100% - 134px)":"calc(100% - 14px)",this._domNode.style.height="200px",r==null||r.onDidScrollChange(this.scrollChangeHandler.bind(this)),wr.createRoot(this._domNode).render(U.jsx(dm,{ref:o=>this._content=o,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(s,r,n){var o;this._top=r,(o=this._content)==null||o.updateType(n),this._domNode.style.top=`${s}px`,this._domNode.style.display="block"}hide(){this._domNode.style.display="none"}scrollChangeHandler(s){const r=s.scrollTop;this._domNode.style.top=`${this._top-r}px`}}function ls(){}ls.prototype={diff:function(s,r){var n,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=o.callback;typeof o=="function"&&(l=o,o={}),this.options=o;var p=this;function u(N){return l?(setTimeout(function(){l(void 0,N)},0),!0):N}s=this.castInput(s),r=this.castInput(r),s=this.removeEmpty(this.tokenize(s)),r=this.removeEmpty(this.tokenize(r));var m=r.length,_=s.length,g=1,h=m+_;o.maxEditLength&&(h=Math.min(h,o.maxEditLength));var w=(n=o.timeout)!==null&&n!==void 0?n:1/0,k=Date.now()+w,S=[{oldPos:-1,lastComponent:void 0}],C=this.extractCommon(S[0],r,s,0);if(S[0].oldPos+1>=_&&C+1>=m)return u([{value:this.join(r),count:r.length}]);var B=-1/0,W=1/0;function H(){for(var N=Math.max(B,-g);N<=Math.min(W,g);N+=2){var M=void 0,E=S[N-1],$=S[N+1];E&&(S[N-1]=void 0);var P=!1;if($){var j=$.oldPos-N;P=$&&0<=j&&j<m}var X=E&&E.oldPos+1<_;if(!P&&!X){S[N]=void 0;continue}if(!X||P&&E.oldPos+1<$.oldPos?M=p.addToPath($,!0,void 0,0):M=p.addToPath(E,void 0,!0,1),C=p.extractCommon(M,r,s,N),M.oldPos+1>=_&&C+1>=m)return u(mm(p,M.lastComponent,r,s,p.useLongestToken));S[N]=M,M.oldPos+1>=_&&(W=Math.min(W,N-1)),C+1>=m&&(B=Math.max(B,N+1))}g++}if(l)(function N(){setTimeout(function(){if(g>h||Date.now()>k)return l();H()||N()},0)})();else for(;g<=h&&Date.now()<=k;){var ee=H();if(ee)return ee}},addToPath:function(s,r,n,o){var l=s.lastComponent;return l&&l.added===r&&l.removed===n?{oldPos:s.oldPos+o,lastComponent:{count:l.count+1,added:r,removed:n,previousComponent:l.previousComponent}}:{oldPos:s.oldPos+o,lastComponent:{count:1,added:r,removed:n,previousComponent:l}}},extractCommon:function(s,r,n,o){for(var l=r.length,p=n.length,u=s.oldPos,m=u-o,_=0;m+1<l&&u+1<p&&this.equals(r[m+1],n[u+1]);)m++,u++,_++;return _&&(s.lastComponent={count:_,previousComponent:s.lastComponent}),s.oldPos=u,m},equals:function(s,r){return this.options.comparator?this.options.comparator(s,r):s===r||this.options.ignoreCase&&s.toLowerCase()===r.toLowerCase()},removeEmpty:function(s){for(var r=[],n=0;n<s.length;n++)s[n]&&r.push(s[n]);return r},castInput:function(s){return s},tokenize:function(s){return s.split("")},join:function(s){return s.join("")}};function mm(a,s,r,n,o){for(var l=[],p;s;)l.push(s),p=s.previousComponent,delete s.previousComponent,s=p;l.reverse();for(var u=0,m=l.length,_=0,g=0;u<m;u++){var h=l[u];if(h.removed){if(h.value=a.join(n.slice(g,g+h.count)),g+=h.count,u&&l[u-1].added){var k=l[u-1];l[u-1]=l[u],l[u]=k}}else{if(!h.added&&o){var w=r.slice(_,_+h.count);w=w.map(function(C,B){var W=n[g+B];return W.length>C.length?W:C}),h.value=a.join(w)}else h.value=a.join(r.slice(_,_+h.count));_+=h.count,h.added||(g+=h.count)}}var S=l[m-1];return m>1&&typeof S.value=="string"&&(S.added||S.removed)&&a.equals("",S.value)&&(l[m-2].value+=S.value,l.pop()),l}var Yo=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Qo=/\S/,Zo=new ls;Zo.equals=function(a,s){return this.options.ignoreCase&&(a=a.toLowerCase(),s=s.toLowerCase()),a===s||this.options.ignoreWhitespace&&!Qo.test(a)&&!Qo.test(s)},Zo.tokenize=function(a){for(var s=a.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),r=0;r<s.length-1;r++)!s[r+1]&&s[r+2]&&Yo.test(s[r])&&Yo.test(s[r+2])&&(s[r]+=s[r+2],s.splice(r+1,2),r--);return s};var Nn=new ls;Nn.tokenize=function(a){this.options.stripTrailingCr&&(a=a.replace(/\r\n/g,`
140
- `));var s=[],r=a.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var n=0;n<r.length;n++){var o=r[n];n%2&&!this.options.newlineIsToken?s[s.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),s.push(o))}return s};function ym(a,s,r){return Nn.diff(a,s,r)}var _m=new ls;_m.tokenize=function(a){return a.split(/(\S.+?[.!?])(?=\s+|$)/)};var fm=new ls;fm.tokenize=function(a){return a.split(/([{}:;,]|\s+)/)};function ma(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ma=function(s){return typeof s}:ma=function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},ma(a)}var gm=Object.prototype.toString,Tr=new ls;Tr.useLongestToken=!0,Tr.tokenize=Nn.tokenize,Tr.castInput=function(a){var s=this.options,r=s.undefinedReplacement,n=s.stringifyReplacer,o=n===void 0?function(l,p){return typeof p>"u"?r:p}:n;return typeof a=="string"?a:JSON.stringify(En(a,null,null,o),o," ")},Tr.equals=function(a,s){return ls.prototype.equals.call(Tr,a.replace(/,([\r\n])/g,"$1"),s.replace(/,([\r\n])/g,"$1"))};function En(a,s,r,n,o){s=s||[],r=r||[],n&&(a=n(o,a));var l;for(l=0;l<s.length;l+=1)if(s[l]===a)return r[l];var p;if(gm.call(a)==="[object Array]"){for(s.push(a),p=new Array(a.length),r.push(p),l=0;l<a.length;l+=1)p[l]=En(a[l],s,r,n,o);return s.pop(),r.pop(),p}if(a&&a.toJSON&&(a=a.toJSON()),ma(a)==="object"&&a!==null){s.push(a),p={},r.push(p);var u=[],m;for(m in a)a.hasOwnProperty(m)&&u.push(m);for(u.sort(),l=0;l<u.length;l+=1)m=u[l],p[m]=En(a[m],s,r,n,m);s.pop(),r.pop()}else p=a;return p}var Ln=new ls;Ln.tokenize=function(a){return a.slice()},Ln.join=Ln.removeEmpty=function(a){return a};class bm{constructor(s,r,n=""){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=s,this._monaco=r,this._originalModel=this._monaco.editor.createModel(n,Re),this._oldDecorations=[],this._init(),this._eventListening()}_init(){var s;this._changeEvent(),this._didChangeListener=(s=this._editor.getModel())==null?void 0:s.onDidChangeContent(()=>this._changeEvent())}update(s){var r,n;if(this._originalModel=this._monaco.editor.createModel(s,Re),s!==((r=this._editor.getModel())==null?void 0:r.getValue())){this._changeEvent();return}(n=this._editor.getModel())==null||n.deltaDecorations(this._oldDecorations,[]),this._oldDecorations=[]}dispose(){var s,r,n,o;this._diffPopupWidget&&(this._diffPopupWidget.hide(),this._editor.removeOverlayWidget(this._diffPopupWidget)),(s=this._didChangeListener)==null||s.dispose(),(r=this._onMouseDownListener)==null||r.dispose(),(n=this._editor.getModel())==null||n.deltaDecorations(this._oldDecorations,[]),this._oldDecorations=[],(o=this._diffEditor)==null||o.dispose(),this._diffEditor=void 0}_changesHandle(s){let r=0,n;const o=[];let l=0;for(const p of s){const{added:u,removed:m,count:_=1,value:g}=p;u?n&&n.removed?(r=this._changeHandle(o,r,l,_,et.modified),l=0,n=void 0):(n&&n.added&&(r=this._changeHandle(o,r,l,n.count||1,et.added),l=0),n=p):m?n&&n.added?(r=this._changeHandle(o,r,l,n.count||1,et.modified),l=0,n=void 0):(n&&n.removed&&this._addDecorationList(o,r,et.removed),n=p):/^\n+$/.test(g)?n&&(n.added||n.removed)?l=_:r+=_:(n&&n.added?(r=this._changeHandle(o,r,l,n.count||1,et.added),l=0,n=void 0):n&&n.removed&&(this._addDecorationList(o,r,et.removed),n=void 0),r+=_)}return n&&n.added?r=this._changeHandle(o,r,l,n.count||1,et.added):n&&n.removed&&this._addDecorationList(o,r,et.removed),o}_changeHandle(s,r,n,o,l){for(let p=1;p<=o;p++)this._addDecorationList(s,r+p,l);return r+=o+n,r}_addDecorationList(s,r,n){s.push({range:new this._monaco.Range(r,1,r,1),options:{isWholeLine:!0,linesDecorationsClassName:`line-${n} line-decoration_${n}`}})}_changeEvent(){var o,l;const s=ym(this._originalModel.getValue(),((o=this._editor.getModel())==null?void 0:o.getValue())||""),r=this._changesHandle(s),n=((l=this._editor.getModel())==null?void 0:l.deltaDecorations(this._oldDecorations,r))||[];this._oldDecorations=n}_eventListening(){const s=new um("diff.popup.widget",this._editor);this._editor.addOverlayWidget(s),this._onMouseDownListener=this._editor.onMouseDown(r=>this._onMouseDownHandle(r)),this._diffPopupWidget=s}_onMouseDownHandle(s){var p,u,m,_,g,h;const r=(p=s.target.element)==null?void 0:p.classList,n=r==null?void 0:r.contains(`line-${et.added}`),o=r==null?void 0:r.contains(`line-${et.modified}`),l=r==null?void 0:r.contains(`line-${et.removed}`);if(n||o||l){const w=((m=(u=s==null?void 0:s.target)==null?void 0:u.position)==null?void 0:m.lineNumber)||0,k=((_=this._editor)==null?void 0:_.getTopForLineNumber(w+1))||0,S=((g=this._editor)==null?void 0:g.getScrollTop())||0,C=n?et.added:o?et.modified:et.removed;(h=this._diffPopupWidget)==null||h.show(k-S,k,C),this._diffEditor||(this._diffEditor=this._createDiffEditor()),this._diffEditor.setModel({original:this._originalModel,modified:this._editor.getModel()}),this._diffEditor.revealLineInCenter(w+1)}}_createDiffEditor(){return this._monaco.editor.createDiffEditor(document.getElementById("diffEditorContainer"),{renderSideBySide:!1,quickSuggestions:!1,suggestOnTriggerCharacters:!1,hover:{enabled:!1},parameterHints:{enabled:!1}})}}class xm{constructor(s,r,n){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=s,this._monaco=r,this._onActionTrigger=n,this._init()}addLinkOpenFunc(s){this._onLinkOpen=s}updateActionTrigger(s){this._onActionTrigger=s}setModelMarkers(s){this._monaco.editor.setModelMarkers(this._editor.getModel(),"owner",s)}addDiffDecorations(){this._decorations||(this._decorations=new bm(this._editor,this._monaco,this._originalScript))}removeDiffDecorations(){var s;(s=this._decorations)==null||s.dispose(),this._decorations=void 0}setValue(s){this._editor.setValue(s),this._editor.setScrollTop(0),this.focus()}setPosition(s){var r,n;(r=this._editor)==null||r.setPosition(s),(n=this._editor)==null||n.revealPositionInCenter(s),this.focus()}focus(){var s;(s=this._editor)==null||s.focus()}setOriginalScript(s){var r;this._originalScript=s,(r=this._decorations)==null||r.update(s)}getEditorLayout(){var n;const s=this._editor.getContentHeight(),r=(n=this._editor.getModel())==null?void 0:n.getLineCount();return{contentHeight:s,lineCount:r}}setEditorLayout(s,r){var n,o;(o=this._editor)==null||o.layout({height:s,width:r||((n=this._editor)==null?void 0:n.getContainerDomNode().clientWidth)})}_init(){this._register(),this._setOptions(),this._addCommands(),this._addActions(),this._setCursorPosition(),this._onTabSizeChange()}_onTabSizeChange(){const s=this._editor.getModel();s==null||s.onDidChangeOptions(r=>{if(r.tabSize&&!r.indentSize){const n=(s==null?void 0:s.getOptions().tabSize)||4;s==null||s.updateOptions({indentSize:n})}})}_setCursorPosition(){const s=localStorage.getItem(An);this._editor.setPosition(s?JSON.parse(s):{lineNumber:1,column:1}),this._editor.focus()}_register(){this._monaco.languages.register({id:Re});const s=this._monaco.languages.registerCompletionItemProvider(Re,{triggerCharacters:[".","@"],provideCompletionItems:tm,resolveCompletionItem:sm});this._registerList.push(s);const r=this._monaco.languages.registerHoverProvider(Re,{provideHover:rm});this._registerList.push(r);const n=this._monaco.languages.registerSignatureHelpProvider(Re,{signatureHelpTriggerCharacters:["(",","],provideSignatureHelp:am});this._registerList.push(n);const o=this._monaco.languages.registerColorProvider(Re,{provideColorPresentations:im,provideDocumentColors:nm});this._registerList.push(o);const l=this._monaco.editor.registerEditorOpener({openCodeEditor:(_,g,h)=>{const w=om(_,h);if(w){const{index:k,docValue:S}=w,{title:C,name:B}=S[k];let W="";switch(C){case we.keywords:W="kw";break;case we.methods:case we.functions:W="fun";break;case we.variables:W="var";break;case we.types:W="type";break;case we.constants:W="const";break}this._onLinkOpen&&this._onLinkOpen(`${W}_${B}`,k)}return!0}});this._registerList.push(l);const p=this._monaco.editor.registerLinkOpener({open:_=>(this._onLinkOpen&&_.fragment&&this._onLinkOpen(_.fragment),!!_.fragment)});this._registerList.push(p);const u=this._monaco.languages.registerDefinitionProvider(Re,{provideDefinition:lm});this._registerList.push(u);const m=this._monaco.languages.registerInlayHintsProvider(Re,{provideInlayHints:cm});this._registerList.push(m)}_setOptions(){this._monaco.editor.defineTheme("vs-dark",Sn),this._monaco.editor.defineTheme("vs",Cn),this._monaco.languages.setMonarchTokensProvider(Re,Bs),this._monaco.languages.setLanguageConfiguration(Re,qn)}_addCommands(){this._monaco.editor.addCommand({id:"tcc.editor.function",run:(s,r)=>{var n;if(Ot.nextIsBracket){const o=this._editor.getPosition();o&&this._editor.setPosition(Object.assign(o,{column:o.column+1}))}(n=this._editor.getAction(r))==null||n.run()}})}_addActions(){this._editor.addAction({id:"tcc-save-script",label:Se.t("save script"),keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.KeyS],contextMenuGroupId:"9_modification",contextMenuOrder:1,run:()=>{this._onActionTrigger&&this._onActionTrigger(q.Actions.Save)}}),this._editor.addAction({id:"tcc-find-replace-line",label:Se.t("find/replace"),keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.KeyF],contextMenuGroupId:"9_cutcopypaste",contextMenuOrder:5,run:()=>{this.openFind(),this._onActionTrigger&&this._onActionTrigger(q.Actions.Find)}}),this._editor.addAction({id:"tcc-trigger-console-script",label:Se.t("toggle console"),keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.Backquote],contextMenuGroupId:"z_commands",contextMenuOrder:0,run:()=>{this._onActionTrigger&&this._onActionTrigger(q.Actions.TriggerConsole)}}),this._editor.addAction({id:"tcc-run-script",label:"运行脚本",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.Enter],run:()=>{this._onActionTrigger&&this._onActionTrigger(q.Actions.RunScript)}}),this._editor.addAction({id:"tcc-open-script",label:Se.t("open script"),keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.KeyO],contextMenuGroupId:"9_modification",contextMenuOrder:2,run:()=>{this._onActionTrigger&&this._onActionTrigger(q.Actions.Open)}}),this._editor.addAction({id:"tcc-new-window-script",label:Se.t("open editor in new window"),keybindings:[this._monaco.KeyMod.Shift|this._monaco.KeyMod.Alt|this._monaco.KeyCode.KeyW],contextMenuGroupId:"9_modification",contextMenuOrder:3,run:()=>{this._onActionTrigger&&this._onActionTrigger(q.Actions.NewWindow)}}),this._editor.addAction({id:"tcc-new-tab-script",label:Se.t("open editor in new tab"),keybindings:[this._monaco.KeyMod.Shift|this._monaco.KeyMod.Alt|this._monaco.KeyCode.KeyT],contextMenuGroupId:"9_modification",contextMenuOrder:4,run:()=>{this._onActionTrigger&&this._onActionTrigger(q.Actions.NewTab)}})}openFind(){this.focus(),this._editor.trigger("click","actions.find",null)}gotoLine(){this.focus(),this._editor.trigger("click","editor.action.gotoLine",null)}onChangeCursorPosition(s){this._changPositionListener&&this._changPositionListener.dispose();const r=localStorage.getItem(An);s&&s(r?JSON.parse(r):{lineNumber:1,column:1}),this._changPositionListener=this._editor.onDidChangeCursorPosition(n=>{localStorage.setItem(An,JSON.stringify(n.position)),s&&s(n.position)})}dispose(){var s;for(const r of this._registerList)r.dispose();(s=this._editor)==null||s.dispose()}}/**
139
+ ${this._formatter.code("Space")}`;return n.push(this._formatter.lineBreak),n.push(this._formatter.italic(`${o} ${Xu(we.toTriggerParameterHints)}`)),{value:this._formatter.paragraph(...n)}}}const Qu=new Yu(window.navigator.userAgent);class Zu{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=Wo}getDocumentColors(s){this._count++;const r=[];return s.forEach(n=>{const{range:o}=n;let{matches:l}=n;l=l||[];const p=l[0]||"";let u=null;this._isHexToken(p)?u=this._hexToColor(p):this._isRgbColor(p)?u=this._rgbToColor(p):this._colors[p]?u=this._hexToColor(this._colors[p]):this._isColorExpression(p)&&l[1]&&l[6]&&(u=this._extractNewExpression(l[1],Number(l[6]))),u&&r.push({color:u,range:o})}),r}get _defultColorsRegStr(){return Object.keys(Wo).reduce((s,r)=>`${s}|${r}`,"")}get colorMatchesRegStr(){const s=`#[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*(${s})\\s*,\\s*(\\d+)\\s*\\)|${s}`}getDocumentColorPresentations(s,{color:r,range:n}){const o=s.getValueInRange(n);if(this._isHexToken(o)||this._colors[o])return[{label:this._colorRgbRepresentation(r)},{label:this._colorHexRepresentation(r)}];if(this._isColorExpression(o)||this._isRgbColor(o)){const l=this._isColorExpression(o)?this._colorNewRepresentation(r):this._colorRgbRepresentation(r);if(!l)return[];const p=this._colorHexRepresentation(r);return[{label:l,textEdit:{text:l,range:n}},{label:p,textEdit:{text:p,range:n}}]}return null}_hexFromNumber(s){const r=this._denormalize(s).toString(16);return r.length===1?`0${r}`:r}_normalize(s){return s/255}_denormalize(s){return Math.round(255*s)}_normalizeAlpha(s){return(100-s)/100}_denormalizeAlpha(s){return 100-Math.round(100*s)}_extractNewExpression(s,r){let n=null;return this._isHexToken(s)?n=this._hexToColor(s):this._isRgbColor(s)?n=this._rgbToColor(s):this._colors[s]&&(n=this._hexToColor(this._colors[s])),n&&!Number.isNaN(r)?{...n,alpha:this._normalizeAlpha(r)}:null}_colorHexRepresentation(s){const r=this._hexFromNumber(s.red),n=this._hexFromNumber(s.green),o=this._hexFromNumber(s.blue),l=this._hexFromNumber(s.alpha);return`#${r}${n}${o}${s.alpha===1?"":l}`}_colorRgbRepresentation(s){const r=this._denormalize(s.red),n=this._denormalize(s.green),o=this._denormalize(s.blue),l=this._denormalizeAlpha(s.alpha),p=[r,n,o];return l>0&&p.push(l),`color.rgb(${p.join(", ")})`}_colorNewRepresentation(s){const r={...s,alpha:1};return`color.new(${this._colorHexRepresentation(r)}, ${this._denormalizeAlpha(s.alpha)})`}_hexToColor(s){const r=(s=this._isHexToken(s)?s.slice(1):s).length===3||s.length===4,n=r?`${s.slice(0,1)}${s.slice(0,1)}`:s.slice(0,2),o=r?`${s.slice(1,2)}${s.slice(1,2)}`:s.slice(2,4),l=r?`${s.slice(2,3)}${s.slice(2,3)}`:s.slice(4,6),p=(r?`${s.slice(3,4)}${s.slice(3,4)}`:s.slice(6,8))||"ff";return{red:this._normalize(parseInt(n,16)),green:this._normalize(parseInt(o,16)),blue:this._normalize(parseInt(l,16)),alpha:this._normalize(parseInt(p,16))}}_rgbToColor(s){const r=s.replace(/[^\d,]/g,"").split(","),n=this._normalize(Number(r[0])),o=this._normalize(Number(r[1])),l=this._normalize(Number(r[2])),p=this._normalizeAlpha(Number(r[3]))||1;return isNaN(n)||isNaN(o)||isNaN(l)?null:{red:n,green:o,blue:l,alpha:p}}_isHexToken(s){return s.charAt(0)==="#"}_isRgbColor(s){return s.startsWith("color.rgb")}_isColorExpression(s){return s.startsWith("color.new")}}const Nn=new Zu;q.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"}(q.VType||(q.VType={})),q.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"}(q.VRuleType||(q.VRuleType={})),q.VAdjustment=void 0,function(a){a.dividends="dividends",a.none="none",a.splits="splits"}(q.VAdjustment||(q.VAdjustment={})),q.VAlert=void 0,function(a){a.freqAll="freq_all",a.freqOncePerBar="freq_once_per_bar",a.freqOncePerBarClose="freq_once_per_bar_close"}(q.VAlert||(q.VAlert={})),q.VBarmergeGaps=void 0,function(a){a.gapsOff="gaps_off",a.gapsOn="gaps_on",a.lookaheadOff="lookahead_off",a.lookaheadOn="lookahead_on"}(q.VBarmergeGaps||(q.VBarmergeGaps={})),q.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"}(q.VPlotDisplay||(q.VPlotDisplay={})),q.VExtend=void 0,function(a){a.both="both",a.left="left",a.none="none",a.right="right"}(q.VExtend||(q.VExtend={})),q.VFormatType=void 0,function(a){a.inherit="inherit",a.mintick="mintick",a.percent="percent",a.price="price",a.volume="volume"}(q.VFormatType||(q.VFormatType={})),q.VHlineStyle=void 0,function(a){a.styleDashed="style_dashed",a.styleDotted="style_dotted",a.styleSolid="style_solid"}(q.VHlineStyle||(q.VHlineStyle={})),q.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"}(q.VLabelStyle||(q.VLabelStyle={})),q.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"}(q.VLineStyle||(q.VLineStyle={})),q.VLocation=void 0,function(a){a.abovebar="abovebar",a.absolute="absolute",a.belowbar="belowbar",a.bottom="bottom",a.top="top"}(q.VLocation||(q.VLocation={})),q.VSortOrder=void 0,function(a){a.ascending="ascending",a.descending="descending"}(q.VSortOrder||(q.VSortOrder={})),q.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"}(q.VPlotStyle||(q.VPlotStyle={})),q.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"}(q.VPosition||(q.VPosition={})),q.VScale=void 0,function(a){a.left="left",a.none="none",a.right="right"}(q.VScale||(q.VScale={})),q.VSession=void 0,function(a){a.extended="extended",a.regular="regular"}(q.VSession||(q.VSession={})),q.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"}(q.VShape||(q.VShape={})),q.VSize=void 0,function(a){a.auto="auto",a.huge="huge",a.large="large",a.normal="normal",a.small="small",a.tiny="tiny"}(q.VSize||(q.VSize={})),q.VFont=void 0,function(a){a.familyDefault="default",a.familyMonospace="monospace"}(q.VFont||(q.VFont={})),q.VStrategy=void 0,function(a){a.cash="cash",a.fixed="fixed",a.percentOfEquity="percent_of_equity"}(q.VStrategy||(q.VStrategy={})),q.VCommission=void 0,function(a){a.cashPerContract="cash_per_contract",a.cashPerOrder="cash_per_order",a.percent="percent"}(q.VCommission||(q.VCommission={})),q.VDirection=void 0,function(a){a.all="all",a.long="long",a.short="short"}(q.VDirection||(q.VDirection={})),q.VOca=void 0,function(a){a.cancel="cancel",a.none="none",a.reduce="reduce"}(q.VOca||(q.VOca={})),q.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"}(q.VText||(q.VText={})),q.VXloc=void 0,function(a){a.bar_index="bar_index",a.bar_time="bar_time"}(q.VXloc||(q.VXloc={})),q.VYloc=void 0,function(a){a.abovebar="abovebar",a.belowbar="belowbar",a.price="price"}(q.VYloc||(q.VYloc={})),q.VEarnings=void 0,function(a){a.actual="actual",a.estimate="estimate",a.standardized="standardized"}(q.VEarnings||(q.VEarnings={})),q.VPivotType=void 0,function(a){a.traditional="Traditional",a.fibonacci="Fibonacci",a.woodie="Woodie",a.classic="Classic",a.dm="DM",a.camarilla="Camarilla"}(q.VPivotType||(q.VPivotType={})),q.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"}(q.VInputType||(q.VInputType={}));var Vo;(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"})(Vo||(Vo={})),q.VScriptType=void 0,function(a){a.library="library",a.indicator="indicator",a.strategy="strategy"}(q.VScriptType||(q.VScriptType={})),q.VType.SERIES,q.VType.SIMPLE,q.VType.INPUT,q.VType.CONST,q.VType.INT,q.VType.FLOAT,q.VType.BOOL,q.VType.COLOR,q.VType.STRING;const Ju={domReadOnly:!0,scrollBeyondLastLine:!1,readOnly:!0,minimap:{enabled:!1},scrollbar:{vertical:"hidden",horizontal:"hidden",alwaysConsumeMouseWheel:!1},contextmenu:!1},Go={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 em{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(s){this._editor=s}async setInlayHints(s){const{endLine:r,endColumn:n,name:o,libraryId:l,libraryName:p}=s;if(this._importCompleteLibrary.has(l)){const u=this._funcs.get(l);return((u==null?void 0:u.name)!==o||!o&&!this._inlayHints.has(l))&&(this._updateFuncNames(o||p,l),this._inlayHintsHandle(s)),this._importCompleteLibrary.get(l)}return this._importCompleteLibrary.set(l,Go),this._inlayHints.set(l,{label:"loading...",position:{column:n,lineNumber:r},paddingLeft:!0}),this.triggerInlayHints(),this._updateFuncNames(o||p,l),setTimeout(()=>{this._inlayHints.has(l)&&this._inlayHintsHandle(s)},2e3),Go}deleteInlayHints(s){this._inlayHints.delete(s)}clearInlayHints(){this._inlayHints.clear()}triggerInlayHints(){this._editor&&this._editor.updateOptions({inlayHints:{fontFamily:String(Date.now())}})}_updateFuncNames(s,r){const n=this._importCompleteLibrary.get(r);if(!n)return;const o=n.functions.map(l=>`${s}.${l.name}`);this._funcs.set(r,{name:s,funcs:o}),this._updateMonarchTokens()}_setNoNameInlayHints(s){const{endLine:r,endColumn:n,libraryId:o,libraryName:l}=s;this._inlayHints.set(o,{label:`as ${l}`,position:{column:n,lineNumber:r},paddingLeft:!0})}_inlayHintsHandle(s){const{name:r,libraryId:n}=s;r?this._inlayHints.delete(n):this._setNoNameInlayHints(s),this.triggerInlayHints()}_updateMonarchTokens(){const s=[...this._funcs.values()].map(o=>o.funcs.join("|")),r=new RegExp("\\b("+s.join("|")+")(?=\\s*\\()"),n=[...Us.tokenizer.root];n.splice(15,0,[r,"meta.function-call"]),qe.languages.setMonarchTokensProvider(Re,{...Us,tokenizer:{...Us.tokenizer,root:n}})}}const ua=new em;function tm(a,s,r){var k;const n={startLineNumber:s.lineNumber,startColumn:1,endLineNumber:s.lineNumber,endColumn:s.column},o=a.getValueInRange(n);if(/^\/\/\s*@/.test(o))return{suggestions:Pt.annotationSuggestions};if(r.triggerCharacter==="@")return{suggestions:[]};const l=o.match(/([\w.]+)$/)||[];if(!l.length)return{suggestions:[]};const p=(k=l[0])==null?void 0:k.match(/.*[^\w.]+([\w.]+)(?=\.)|([\w.]+)(?=\.)/),u=p?p[1]?p[1]:p[2]?p[2]:void 0:void 0,m=a.getWordUntilPosition(s),_=vs.parseCurrentInputFunc(o),g={startLineNumber:s.lineNumber,endLineNumber:s.lineNumber,startColumn:m.startColumn,endColumn:m.endColumn},h=a.getValueInRange({...g,startColumn:m.endColumn,endColumn:m.endColumn+1});Pt.nextIsBracket=h==="(";let w=Xo(Pt.getSuggestions(u)||[],g);if(l[0]==="."&&(w=[]),_&&!u&&!/=\s*\w+$/.test(o)){const S=Xo(Pt.getArgSuggestions(_.funcName)||[],g);w=w.concat(S)}return{suggestions:w||[],dispose:()=>{}}}function sm(a){if(a.kind!==1)return a;const{originInsertText:s}=a;return Pt.nextIsBracket?a.insertText=s:a.insertText=s+Pt.bracketsPostfix,a}function rm(a,s){var n;const r=vs.parseLineContentFuncVar(s.column,s.lineNumber,a,s);if(r!=null&&r.libraryId)return{contents:[{value:Fu(r)}]};if((n=r==null?void 0:r.docValue)!=null&&n.length){const o=Bu(r.docValue,r.index,r.isBuildIn);if(o)return{contents:[{value:o}]}}return{contents:[]}}function am(a,s){var h,w;const r={startLineNumber:s.lineNumber,endLineNumber:s.lineNumber,startColumn:1,endColumn:s.column},n=a.getValueInRange(r),o=a.findMatches(String(Vu),r,!0,!1,null,!0),l=a.findMatches(String(Gu),r,!0,!1,null,!0),p=(h=o.pop())==null?void 0:h.matches,u=(w=l.pop())==null?void 0:w.matches;let m=!1;o.length%2===0?p&&p[0]==='"'&&(m=!0):p&&!p[0]&&(m=!0);let _=!1;l.length%2===0?u&&u[0]==="'"&&(_=!0):u&&!u[0]&&(_=!0);const g=vs.parseCurrentInputFuncAndArg(n,_,m);if(g){const{funcName:k,args:S,startIndex:C}=g,B=Qu.getSignatureHelpValues(k,S,C+1,s.lineNumber);if(B)return{value:B,dispose:()=>{}}}return null}function nm(a){let s=a.findMatches(Nn.colorMatchesRegStr,!0,!0,!1,null,!0);return s=s.filter(n=>{const o=a.getValueInRange({...n.range,startColumn:0});return o.indexOf("//")===-1||o.indexOf("//")>n.range.endColumn}),Nn.getDocumentColors(s)}function im(a,s){return Nn.getDocumentColorPresentations(a,s)||[]}function om(a,s){var u,m;const r=a.getModel(),n=vs.parseLineContentFuncVar(s.startColumn+1,s.startLineNumber,r);if(!n||n.isBuildIn||!n.docValue||!n.docValue[0].pos)return n!=null&&n.isBuildIn||(m=(u=n==null?void 0:n.docValue)==null?void 0:u[0].title)!=null&&m.startsWith("built-in")?n:void 0;const{lineNumber:o,column:l}=n.docValue[0].pos,p={startLineNumber:o,endLineNumber:o,startColumn:l,endColumn:l};a.revealRangeInCenterIfOutsideViewport(p),a.setSelection(p)}function lm(a,s){return vs.parseLineContentFuncVar(s.column,s.lineNumber,a,s)?{uri:a.uri,range:{startLineNumber:s.lineNumber,endLineNumber:s.lineNumber,startColumn:s.column-1,endColumn:s.column-1}}:null}function Xo(a,s){return a.map(r=>(r.range=s,r))}function cm(){return{hints:ua.inlayHints,dispose:()=>{}}}var vr={},Tr=ed;if(process.env.NODE_ENV==="production")vr.createRoot=Tr.createRoot,vr.hydrateRoot=Tr.hydrateRoot;else{var ma=Tr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;vr.createRoot=function(a,s){ma.usingClientEntryPoint=!0;try{return Tr.createRoot(a,s)}finally{ma.usingClientEntryPoint=!1}},vr.hydrateRoot=function(a,s,r){ma.usingClientEntryPoint=!0;try{return Tr.hydrateRoot(a,s,r)}finally{ma.usingClientEntryPoint=!1}}}var et;(function(a){a.added="added",a.removed="removed",a.modified="modified"})(et||(et={}));const pm=(a,s)=>{const{close:r,retracement:n}=a,[o,l]=F.useState("modified");return F.useImperativeHandle(s,()=>({updateType(p){l(p)}})),U.jsxs("div",{className:`content-popup content-${o}-popup`,children:[U.jsx("div",{className:`triangle-popup triangle-${o}-popup`}),U.jsxs("div",{className:`header-popup header-${o}-popup`,children:[U.jsx("div",{className:"title-popup",children:"Local working changes"}),U.jsx("div",{className:"actions-popup",children:U.jsx("div",{onClick:r,"data-role":"button",className:"button-popup","data-name":"button-close-diff",children:U.jsx("span",{className:"icon-popup",role:"img",children:U.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",width:"12",height:"12",children:U.jsx("path",{stroke:"currentColor",strokeWidth:"1.2",d:"m1.5 1.5 9 9m0-9-9 9"})})})})})]}),U.jsx("div",{id:"diffEditorContainer",style:{height:"100%"}})]})},dm=F.forwardRef(pm);class um{constructor(s,r,n=!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=s,this._domNode=document.createElement("div"),this._domNode.style.display="none",this._domNode.style.width=n?"calc(100% - 134px)":"calc(100% - 14px)",this._domNode.style.height="200px",r==null||r.onDidScrollChange(this.scrollChangeHandler.bind(this)),vr.createRoot(this._domNode).render(U.jsx(dm,{ref:o=>this._content=o,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(s,r,n){var o;this._top=r,(o=this._content)==null||o.updateType(n),this._domNode.style.top=`${s}px`,this._domNode.style.display="block"}hide(){this._domNode.style.display="none"}scrollChangeHandler(s){const r=s.scrollTop;this._domNode.style.top=`${this._top-r}px`}}function cs(){}cs.prototype={diff:function(s,r){var n,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=o.callback;typeof o=="function"&&(l=o,o={}),this.options=o;var p=this;function u(N){return l?(setTimeout(function(){l(void 0,N)},0),!0):N}s=this.castInput(s),r=this.castInput(r),s=this.removeEmpty(this.tokenize(s)),r=this.removeEmpty(this.tokenize(r));var m=r.length,_=s.length,g=1,h=m+_;o.maxEditLength&&(h=Math.min(h,o.maxEditLength));var w=(n=o.timeout)!==null&&n!==void 0?n:1/0,k=Date.now()+w,S=[{oldPos:-1,lastComponent:void 0}],C=this.extractCommon(S[0],r,s,0);if(S[0].oldPos+1>=_&&C+1>=m)return u([{value:this.join(r),count:r.length}]);var B=-1/0,W=1/0;function H(){for(var N=Math.max(B,-g);N<=Math.min(W,g);N+=2){var M=void 0,E=S[N-1],$=S[N+1];E&&(S[N-1]=void 0);var P=!1;if($){var j=$.oldPos-N;P=$&&0<=j&&j<m}var X=E&&E.oldPos+1<_;if(!P&&!X){S[N]=void 0;continue}if(!X||P&&E.oldPos+1<$.oldPos?M=p.addToPath($,!0,void 0,0):M=p.addToPath(E,void 0,!0,1),C=p.extractCommon(M,r,s,N),M.oldPos+1>=_&&C+1>=m)return u(mm(p,M.lastComponent,r,s,p.useLongestToken));S[N]=M,M.oldPos+1>=_&&(W=Math.min(W,N-1)),C+1>=m&&(B=Math.max(B,N+1))}g++}if(l)(function N(){setTimeout(function(){if(g>h||Date.now()>k)return l();H()||N()},0)})();else for(;g<=h&&Date.now()<=k;){var ee=H();if(ee)return ee}},addToPath:function(s,r,n,o){var l=s.lastComponent;return l&&l.added===r&&l.removed===n?{oldPos:s.oldPos+o,lastComponent:{count:l.count+1,added:r,removed:n,previousComponent:l.previousComponent}}:{oldPos:s.oldPos+o,lastComponent:{count:1,added:r,removed:n,previousComponent:l}}},extractCommon:function(s,r,n,o){for(var l=r.length,p=n.length,u=s.oldPos,m=u-o,_=0;m+1<l&&u+1<p&&this.equals(r[m+1],n[u+1]);)m++,u++,_++;return _&&(s.lastComponent={count:_,previousComponent:s.lastComponent}),s.oldPos=u,m},equals:function(s,r){return this.options.comparator?this.options.comparator(s,r):s===r||this.options.ignoreCase&&s.toLowerCase()===r.toLowerCase()},removeEmpty:function(s){for(var r=[],n=0;n<s.length;n++)s[n]&&r.push(s[n]);return r},castInput:function(s){return s},tokenize:function(s){return s.split("")},join:function(s){return s.join("")}};function mm(a,s,r,n,o){for(var l=[],p;s;)l.push(s),p=s.previousComponent,delete s.previousComponent,s=p;l.reverse();for(var u=0,m=l.length,_=0,g=0;u<m;u++){var h=l[u];if(h.removed){if(h.value=a.join(n.slice(g,g+h.count)),g+=h.count,u&&l[u-1].added){var k=l[u-1];l[u-1]=l[u],l[u]=k}}else{if(!h.added&&o){var w=r.slice(_,_+h.count);w=w.map(function(C,B){var W=n[g+B];return W.length>C.length?W:C}),h.value=a.join(w)}else h.value=a.join(r.slice(_,_+h.count));_+=h.count,h.added||(g+=h.count)}}var S=l[m-1];return m>1&&typeof S.value=="string"&&(S.added||S.removed)&&a.equals("",S.value)&&(l[m-2].value+=S.value,l.pop()),l}var Yo=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Qo=/\S/,Zo=new cs;Zo.equals=function(a,s){return this.options.ignoreCase&&(a=a.toLowerCase(),s=s.toLowerCase()),a===s||this.options.ignoreWhitespace&&!Qo.test(a)&&!Qo.test(s)},Zo.tokenize=function(a){for(var s=a.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),r=0;r<s.length-1;r++)!s[r+1]&&s[r+2]&&Yo.test(s[r])&&Yo.test(s[r+2])&&(s[r]+=s[r+2],s.splice(r+1,2),r--);return s};var En=new cs;En.tokenize=function(a){this.options.stripTrailingCr&&(a=a.replace(/\r\n/g,`
140
+ `));var s=[],r=a.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var n=0;n<r.length;n++){var o=r[n];n%2&&!this.options.newlineIsToken?s[s.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),s.push(o))}return s};function ym(a,s,r){return En.diff(a,s,r)}var _m=new cs;_m.tokenize=function(a){return a.split(/(\S.+?[.!?])(?=\s+|$)/)};var fm=new cs;fm.tokenize=function(a){return a.split(/([{}:;,]|\s+)/)};function ya(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ya=function(s){return typeof s}:ya=function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},ya(a)}var gm=Object.prototype.toString,Dr=new cs;Dr.useLongestToken=!0,Dr.tokenize=En.tokenize,Dr.castInput=function(a){var s=this.options,r=s.undefinedReplacement,n=s.stringifyReplacer,o=n===void 0?function(l,p){return typeof p>"u"?r:p}:n;return typeof a=="string"?a:JSON.stringify(Ln(a,null,null,o),o," ")},Dr.equals=function(a,s){return cs.prototype.equals.call(Dr,a.replace(/,([\r\n])/g,"$1"),s.replace(/,([\r\n])/g,"$1"))};function Ln(a,s,r,n,o){s=s||[],r=r||[],n&&(a=n(o,a));var l;for(l=0;l<s.length;l+=1)if(s[l]===a)return r[l];var p;if(gm.call(a)==="[object Array]"){for(s.push(a),p=new Array(a.length),r.push(p),l=0;l<a.length;l+=1)p[l]=Ln(a[l],s,r,n,o);return s.pop(),r.pop(),p}if(a&&a.toJSON&&(a=a.toJSON()),ya(a)==="object"&&a!==null){s.push(a),p={},r.push(p);var u=[],m;for(m in a)a.hasOwnProperty(m)&&u.push(m);for(u.sort(),l=0;l<u.length;l+=1)m=u[l],p[m]=Ln(a[m],s,r,n,m);s.pop(),r.pop()}else p=a;return p}var On=new cs;On.tokenize=function(a){return a.slice()},On.join=On.removeEmpty=function(a){return a};class bm{constructor(s,r,n=""){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=s,this._monaco=r,this._originalModel=this._monaco.editor.createModel(n,Re),this._oldDecorations=[],this._init(),this._eventListening()}_init(){var s;this._changeEvent(),this._didChangeListener=(s=this._editor.getModel())==null?void 0:s.onDidChangeContent(()=>this._changeEvent())}update(s){var r,n;if(this._originalModel=this._monaco.editor.createModel(s,Re),s!==((r=this._editor.getModel())==null?void 0:r.getValue())){this._changeEvent();return}(n=this._editor.getModel())==null||n.deltaDecorations(this._oldDecorations,[]),this._oldDecorations=[]}dispose(){var s,r,n,o;this._diffPopupWidget&&(this._diffPopupWidget.hide(),this._editor.removeOverlayWidget(this._diffPopupWidget)),(s=this._didChangeListener)==null||s.dispose(),(r=this._onMouseDownListener)==null||r.dispose(),(n=this._editor.getModel())==null||n.deltaDecorations(this._oldDecorations,[]),this._oldDecorations=[],(o=this._diffEditor)==null||o.dispose(),this._diffEditor=void 0}_changesHandle(s){let r=0,n;const o=[];let l=0;for(const p of s){const{added:u,removed:m,count:_=1,value:g}=p;u?n&&n.removed?(r=this._changeHandle(o,r,l,_,et.modified),l=0,n=void 0):(n&&n.added&&(r=this._changeHandle(o,r,l,n.count||1,et.added),l=0),n=p):m?n&&n.added?(r=this._changeHandle(o,r,l,n.count||1,et.modified),l=0,n=void 0):(n&&n.removed&&this._addDecorationList(o,r,et.removed),n=p):/^\n+$/.test(g)?n&&(n.added||n.removed)?l=_:r+=_:(n&&n.added?(r=this._changeHandle(o,r,l,n.count||1,et.added),l=0,n=void 0):n&&n.removed&&(this._addDecorationList(o,r,et.removed),n=void 0),r+=_)}return n&&n.added?r=this._changeHandle(o,r,l,n.count||1,et.added):n&&n.removed&&this._addDecorationList(o,r,et.removed),o}_changeHandle(s,r,n,o,l){for(let p=1;p<=o;p++)this._addDecorationList(s,r+p,l);return r+=o+n,r}_addDecorationList(s,r,n){s.push({range:new this._monaco.Range(r,1,r,1),options:{isWholeLine:!0,linesDecorationsClassName:`line-${n} line-decoration_${n}`}})}_changeEvent(){var o,l;const s=ym(this._originalModel.getValue(),((o=this._editor.getModel())==null?void 0:o.getValue())||""),r=this._changesHandle(s),n=((l=this._editor.getModel())==null?void 0:l.deltaDecorations(this._oldDecorations,r))||[];this._oldDecorations=n}_eventListening(){const s=new um("diff.popup.widget",this._editor);this._editor.addOverlayWidget(s),this._onMouseDownListener=this._editor.onMouseDown(r=>this._onMouseDownHandle(r)),this._diffPopupWidget=s}_onMouseDownHandle(s){var p,u,m,_,g,h;const r=(p=s.target.element)==null?void 0:p.classList,n=r==null?void 0:r.contains(`line-${et.added}`),o=r==null?void 0:r.contains(`line-${et.modified}`),l=r==null?void 0:r.contains(`line-${et.removed}`);if(n||o||l){const w=((m=(u=s==null?void 0:s.target)==null?void 0:u.position)==null?void 0:m.lineNumber)||0,k=((_=this._editor)==null?void 0:_.getTopForLineNumber(w+1))||0,S=((g=this._editor)==null?void 0:g.getScrollTop())||0,C=n?et.added:o?et.modified:et.removed;(h=this._diffPopupWidget)==null||h.show(k-S,k,C),this._diffEditor||(this._diffEditor=this._createDiffEditor()),this._diffEditor.setModel({original:this._originalModel,modified:this._editor.getModel()}),this._diffEditor.revealLineInCenter(w+1)}}_createDiffEditor(){return this._monaco.editor.createDiffEditor(document.getElementById("diffEditorContainer"),{renderSideBySide:!1,quickSuggestions:!1,suggestOnTriggerCharacters:!1,hover:{enabled:!1},parameterHints:{enabled:!1}})}}class xm{constructor(s,r,n){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=s,this._monaco=r,this._onActionTrigger=n,this._init()}addLinkOpenFunc(s){this._onLinkOpen=s}updateActionTrigger(s){this._onActionTrigger=s}setModelMarkers(s){this._monaco.editor.setModelMarkers(this._editor.getModel(),"owner",s)}addDiffDecorations(){this._decorations||(this._decorations=new bm(this._editor,this._monaco,this._originalScript))}removeDiffDecorations(){var s;(s=this._decorations)==null||s.dispose(),this._decorations=void 0}setValue(s){this._editor.setValue(s),this._editor.setScrollTop(0),this.focus()}setPosition(s){var r,n;(r=this._editor)==null||r.setPosition(s),(n=this._editor)==null||n.revealPositionInCenter(s),this.focus()}focus(){var s;(s=this._editor)==null||s.focus()}setOriginalScript(s){var r;this._originalScript=s,(r=this._decorations)==null||r.update(s)}getEditorLayout(){var n;const s=this._editor.getContentHeight(),r=(n=this._editor.getModel())==null?void 0:n.getLineCount();return{contentHeight:s,lineCount:r}}setEditorLayout(s,r){var n,o;(o=this._editor)==null||o.layout({height:s,width:r||((n=this._editor)==null?void 0:n.getContainerDomNode().clientWidth)})}_init(){this._register(),this._setOptions(),this._addCommands(),this._addActions(),this._setCursorPosition(),this._onTabSizeChange()}_onTabSizeChange(){const s=this._editor.getModel();s==null||s.onDidChangeOptions(r=>{if(r.tabSize&&!r.indentSize){const n=(s==null?void 0:s.getOptions().tabSize)||4;s==null||s.updateOptions({indentSize:n})}})}_setCursorPosition(){const s=localStorage.getItem(qn);this._editor.setPosition(s?JSON.parse(s):{lineNumber:1,column:1}),this._editor.focus()}_register(){this._monaco.languages.register({id:Re});const s=this._monaco.languages.registerCompletionItemProvider(Re,{triggerCharacters:[".","@"],provideCompletionItems:tm,resolveCompletionItem:sm});this._registerList.push(s);const r=this._monaco.languages.registerHoverProvider(Re,{provideHover:rm});this._registerList.push(r);const n=this._monaco.languages.registerSignatureHelpProvider(Re,{signatureHelpTriggerCharacters:["(",","],provideSignatureHelp:am});this._registerList.push(n);const o=this._monaco.languages.registerColorProvider(Re,{provideColorPresentations:im,provideDocumentColors:nm});this._registerList.push(o);const l=this._monaco.editor.registerEditorOpener({openCodeEditor:(_,g,h)=>{const w=om(_,h);if(w){const{index:k,docValue:S}=w,{title:C,name:B}=S[k];let W="";switch(C){case we.keywords:W="kw";break;case we.methods:case we.functions:W="fun";break;case we.variables:W="var";break;case we.types:W="type";break;case we.constants:W="const";break}this._onLinkOpen&&this._onLinkOpen(`${W}_${B}`,k)}return!0}});this._registerList.push(l);const p=this._monaco.editor.registerLinkOpener({open:_=>(this._onLinkOpen&&_.fragment&&this._onLinkOpen(_.fragment),!!_.fragment)});this._registerList.push(p);const u=this._monaco.languages.registerDefinitionProvider(Re,{provideDefinition:lm});this._registerList.push(u);const m=this._monaco.languages.registerInlayHintsProvider(Re,{provideInlayHints:cm});this._registerList.push(m)}_setOptions(){this._monaco.editor.defineTheme("vs-dark",zn),this._monaco.editor.defineTheme("vs",Sn),this._monaco.languages.setMonarchTokensProvider(Re,Us),this._monaco.languages.setLanguageConfiguration(Re,Cn)}_addCommands(){this._monaco.editor.addCommand({id:"tcc.editor.function",run:(s,r)=>{var n;if(Pt.nextIsBracket){const o=this._editor.getPosition();o&&this._editor.setPosition(Object.assign(o,{column:o.column+1}))}(n=this._editor.getAction(r))==null||n.run()}})}_addActions(){this._editor.addAction({id:"tcc-save-script",label:Se.t("save script"),keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.KeyS],contextMenuGroupId:"9_modification",contextMenuOrder:1,run:()=>{this._onActionTrigger&&this._onActionTrigger(q.Actions.Save)}}),this._editor.addAction({id:"tcc-find-replace-line",label:Se.t("find/replace"),keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.KeyF],contextMenuGroupId:"9_cutcopypaste",contextMenuOrder:5,run:()=>{this.openFind(),this._onActionTrigger&&this._onActionTrigger(q.Actions.Find)}}),this._editor.addAction({id:"tcc-trigger-console-script",label:Se.t("toggle console"),keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.Backquote],contextMenuGroupId:"z_commands",contextMenuOrder:0,run:()=>{this._onActionTrigger&&this._onActionTrigger(q.Actions.TriggerConsole)}}),this._editor.addAction({id:"tcc-run-script",label:"运行脚本",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.Enter],run:()=>{this._onActionTrigger&&this._onActionTrigger(q.Actions.RunScript)}}),this._editor.addAction({id:"tcc-open-script",label:Se.t("open script"),keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.KeyO],contextMenuGroupId:"9_modification",contextMenuOrder:2,run:()=>{this._onActionTrigger&&this._onActionTrigger(q.Actions.Open)}}),this._editor.addAction({id:"tcc-new-window-script",label:Se.t("open editor in new window"),keybindings:[this._monaco.KeyMod.Shift|this._monaco.KeyMod.Alt|this._monaco.KeyCode.KeyW],contextMenuGroupId:"9_modification",contextMenuOrder:3,run:()=>{this._onActionTrigger&&this._onActionTrigger(q.Actions.NewWindow)}}),this._editor.addAction({id:"tcc-new-tab-script",label:Se.t("open editor in new tab"),keybindings:[this._monaco.KeyMod.Shift|this._monaco.KeyMod.Alt|this._monaco.KeyCode.KeyT],contextMenuGroupId:"9_modification",contextMenuOrder:4,run:()=>{this._onActionTrigger&&this._onActionTrigger(q.Actions.NewTab)}})}openFind(){this.focus(),this._editor.trigger("click","actions.find",null)}gotoLine(){this.focus(),this._editor.trigger("click","editor.action.gotoLine",null)}onChangeCursorPosition(s){this._changPositionListener&&this._changPositionListener.dispose();const r=localStorage.getItem(qn);s&&s(r?JSON.parse(r):{lineNumber:1,column:1}),this._changPositionListener=this._editor.onDidChangeCursorPosition(n=>{localStorage.setItem(qn,JSON.stringify(n.position)),s&&s(n.position)})}dispose(){var s;for(const r of this._registerList)r.dispose();(s=this._editor)==null||s.dispose()}}/**
141
141
  * @license
142
142
  * Copyright 2019 Google LLC
143
143
  * SPDX-License-Identifier: Apache-2.0
144
- */const Jo=Symbol("Comlink.proxy"),hm=Symbol("Comlink.endpoint"),wm=Symbol("Comlink.releaseProxy"),On=Symbol("Comlink.finalizer"),ya=Symbol("Comlink.thrown"),el=a=>typeof a=="object"&&a!==null||typeof a=="function",vm={canHandle:a=>el(a)&&a[Jo],serialize(a){const{port1:s,port2:r}=new MessageChannel;return sl(a,s),[r,[r]]},deserialize(a){return a.start(),Pn(a)}},Tm={canHandle:a=>el(a)&&ya in a,serialize({value:a}){let s;return a instanceof Error?s={isError:!0,value:{message:a.message,name:a.name,stack:a.stack}}:s={isError:!1,value:a},[s,[]]},deserialize(a){throw a.isError?Object.assign(new Error(a.value.message),a.value):a.value}},tl=new Map([["proxy",vm],["throw",Tm]]);function Dm(a,s){for(const r of a)if(s===r||r==="*"||r instanceof RegExp&&r.test(s))return!0;return!1}function sl(a,s=globalThis,r=["*"]){s.addEventListener("message",function n(o){if(!o||!o.data)return;if(!Dm(r,o.origin)){console.warn(`Invalid origin '${o.origin}' for comlink proxy`);return}const{id:l,type:p,path:u}=Object.assign({path:[]},o.data),m=(o.data.argumentList||[]).map(vs);let _;try{const g=u.slice(0,-1).reduce((w,k)=>w[k],a),h=u.reduce((w,k)=>w[k],a);switch(p){case"GET":_=h;break;case"SET":g[u.slice(-1)[0]]=vs(o.data.value),_=!0;break;case"APPLY":_=h.apply(g,m);break;case"CONSTRUCT":{const w=new h(...m);_=Rn(w)}break;case"ENDPOINT":{const{port1:w,port2:k}=new MessageChannel;sl(a,k),_=Cm(w,[w])}break;case"RELEASE":_=void 0;break;default:return}}catch(g){_={value:g,[ya]:0}}Promise.resolve(_).catch(g=>({value:g,[ya]:0})).then(g=>{const[h,w]=ba(g);s.postMessage(Object.assign(Object.assign({},h),{id:l}),w),p==="RELEASE"&&(s.removeEventListener("message",n),rl(s),On in a&&typeof a[On]=="function"&&a[On]())}).catch(g=>{const[h,w]=ba({value:new TypeError("Unserializable return value"),[ya]:0});s.postMessage(Object.assign(Object.assign({},h),{id:l}),w)})}),s.start&&s.start()}function km(a){return a.constructor.name==="MessagePort"}function rl(a){km(a)&&a.close()}function Pn(a,s){return Mn(a,[],s)}function _a(a){if(a)throw new Error("Proxy has been released and is not useable")}function al(a){return Us(a,{type:"RELEASE"}).then(()=>{rl(a)})}const fa=new WeakMap,ga="FinalizationRegistry"in globalThis&&new FinalizationRegistry(a=>{const s=(fa.get(a)||0)-1;fa.set(a,s),s===0&&al(a)});function Im(a,s){const r=(fa.get(s)||0)+1;fa.set(s,r),ga&&ga.register(a,s,a)}function Am(a){ga&&ga.unregister(a)}function Mn(a,s=[],r=function(){}){let n=!1;const o=new Proxy(r,{get(l,p){if(_a(n),p===wm)return()=>{Am(o),al(a),n=!0};if(p==="then"){if(s.length===0)return{then:()=>o};const u=Us(a,{type:"GET",path:s.map(m=>m.toString())}).then(vs);return u.then.bind(u)}return Mn(a,[...s,p])},set(l,p,u){_a(n);const[m,_]=ba(u);return Us(a,{type:"SET",path:[...s,p].map(g=>g.toString()),value:m},_).then(vs)},apply(l,p,u){_a(n);const m=s[s.length-1];if(m===hm)return Us(a,{type:"ENDPOINT"}).then(vs);if(m==="bind")return Mn(a,s.slice(0,-1));const[_,g]=nl(u);return Us(a,{type:"APPLY",path:s.map(h=>h.toString()),argumentList:_},g).then(vs)},construct(l,p){_a(n);const[u,m]=nl(p);return Us(a,{type:"CONSTRUCT",path:s.map(_=>_.toString()),argumentList:u},m).then(vs)}});return Im(o,a),o}function qm(a){return Array.prototype.concat.apply([],a)}function nl(a){const s=a.map(ba);return[s.map(r=>r[0]),qm(s.map(r=>r[1]))]}const il=new WeakMap;function Cm(a,s){return il.set(a,s),a}function Rn(a){return Object.assign(a,{[Jo]:!0})}function ba(a){for(const[s,r]of tl)if(r.canHandle(a)){const[n,o]=r.serialize(a);return[{type:"HANDLER",name:s,value:n},o]}return[{type:"RAW",value:a},il.get(a)||[]]}function vs(a){switch(a.type){case"HANDLER":return tl.get(a.name).deserialize(a.value);case"RAW":return a.value}}function Us(a,s,r){return new Promise(n=>{const o=Sm();a.addEventListener("message",function l(p){!p.data||!p.data.id||p.data.id!==o||(a.removeEventListener("message",l),n(p.data))}),a.start&&a.start(),a.postMessage(Object.assign({id:o},s),r)})}function Sm(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const ol=new Worker(new URL(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/scriptsRunWorker-B3l8bZZ1.js").href:new URL("assets/scriptsRunWorker-B3l8bZZ1.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:Jr&&Jr.src||new URL("trading-vue-editor.umd.cjs",document.baseURI).href),{type:"module",name:"Run TccScript Server"});ol.onerror=a=>{console.error(a)};async function ll(a){return await da.setInlayHints(a)}const cl=Pn(ol),pl=Pn(new Worker(new URL(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/parserTccWorker-DVfTw1lJ.js").href:new URL("assets/parserTccWorker-DVfTw1lJ.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:Jr&&Jr.src||new URL("trading-vue-editor.umd.cjs",document.baseURI).href),{type:"module",name:"Parser TccScript Server"}));async function dl(a,s=!1){const{functions:r,types:n,constants:o,variables:l,methods:p}=_t;return await pl.parseTcc(a,s,Rn(ll),{functions:Object.fromEntries(r),methods:Object.fromEntries(p),types:Object.fromEntries(n),constants:Object.fromEntries(o),variables:Object.fromEntries(l)})}async function zm(a,s){const{functions:r,types:n,constants:o,variables:l,methods:p}=_t;return await pl.parseLibraryCode(a,s,Rn(ll),{functions:Object.fromEntries(r),methods:Object.fromEntries(p),types:Object.fromEntries(n),constants:Object.fromEntries(o),variables:Object.fromEntries(l)})}async function Nm(a,s,r=!0){return await cl.runScript(a,s,r)}async function Em(a){return await cl.removeScript(a)}function Lm(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})}const{slice:Om,forEach:Pm}=[];function Mm(a){return Pm.call(Om.call(arguments,1),s=>{if(s)for(const r in s)a[r]===void 0&&(a[r]=s[r])}),a}const ul=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Rm=(a,s,r)=>{const n=r||{};n.path=n.path||"/";const o=encodeURIComponent(s);let l=`${a}=${o}`;if(n.maxAge>0){const p=n.maxAge-0;if(Number.isNaN(p))throw new Error("maxAge should be a Number");l+=`; Max-Age=${Math.floor(p)}`}if(n.domain){if(!ul.test(n.domain))throw new TypeError("option domain is invalid");l+=`; Domain=${n.domain}`}if(n.path){if(!ul.test(n.path))throw new TypeError("option path is invalid");l+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");l+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(l+="; HttpOnly"),n.secure&&(l+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"strict":l+="; SameSite=Strict";break;case"none":l+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return l},ml={create(a,s,r,n){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+r*60*1e3)),n&&(o.domain=n),document.cookie=Rm(a,encodeURIComponent(s),o)},read(a){const s=`${a}=`,r=document.cookie.split(";");for(let n=0;n<r.length;n++){let o=r[n];for(;o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(s)===0)return o.substring(s.length,o.length)}return null},remove(a){this.create(a,"",-1)}};var Fm={name:"cookie",lookup(a){let{lookupCookie:s}=a;if(s&&typeof document<"u")return ml.read(s)||void 0},cacheUserLanguage(a,s){let{lookupCookie:r,cookieMinutes:n,cookieDomain:o,cookieOptions:l}=s;r&&typeof document<"u"&&ml.create(r,a,n,o,l)}},Bm={name:"querystring",lookup(a){var n;let{lookupQuerystring:s}=a,r;if(typeof window<"u"){let{search:o}=window.location;!window.location.search&&((n=window.location.hash)==null?void 0:n.indexOf("?"))>-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));const p=o.substring(1).split("&");for(let u=0;u<p.length;u++){const m=p[u].indexOf("=");m>0&&p[u].substring(0,m)===s&&(r=p[u].substring(m+1))}}return r}};let Dr=null;const yl=()=>{if(Dr!==null)return Dr;try{Dr=window!=="undefined"&&window.localStorage!==null;const a="i18next.translate.boo";window.localStorage.setItem(a,"foo"),window.localStorage.removeItem(a)}catch{Dr=!1}return Dr};var Um={name:"localStorage",lookup(a){let{lookupLocalStorage:s}=a;if(s&&yl())return window.localStorage.getItem(s)||void 0},cacheUserLanguage(a,s){let{lookupLocalStorage:r}=s;r&&yl()&&window.localStorage.setItem(r,a)}};let kr=null;const _l=()=>{if(kr!==null)return kr;try{kr=window!=="undefined"&&window.sessionStorage!==null;const a="i18next.translate.boo";window.sessionStorage.setItem(a,"foo"),window.sessionStorage.removeItem(a)}catch{kr=!1}return kr};var Km={name:"sessionStorage",lookup(a){let{lookupSessionStorage:s}=a;if(s&&_l())return window.sessionStorage.getItem(s)||void 0},cacheUserLanguage(a,s){let{lookupSessionStorage:r}=s;r&&_l()&&window.sessionStorage.setItem(r,a)}},$m={name:"navigator",lookup(a){const s=[];if(typeof navigator<"u"){const{languages:r,userLanguage:n,language:o}=navigator;if(r)for(let l=0;l<r.length;l++)s.push(r[l]);n&&s.push(n),o&&s.push(o)}return s.length>0?s:void 0}},jm={name:"htmlTag",lookup(a){let{htmlTag:s}=a,r;const n=s||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(r=n.getAttribute("lang")),r}},Hm={name:"path",lookup(a){var o;let{lookupFromPathIndex:s}=a;if(typeof window>"u")return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(r)?(o=r[typeof s=="number"?s:0])==null?void 0:o.replace("/",""):void 0}},Wm={name:"subdomain",lookup(a){var o,l;let{lookupFromSubdomainIndex:s}=a;const r=typeof s=="number"?s+1:1,n=typeof window<"u"&&((l=(o=window.location)==null?void 0:o.hostname)==null?void 0:l.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(n)return n[r]}};function Vm(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:a=>a}}class fl{constructor(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(s,r)}init(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=s||{languageUtils:{}},this.options=Mm(r,this.options||{},Vm()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Fm),this.addDetector(Bm),this.addDetector(Um),this.addDetector(Km),this.addDetector($m),this.addDetector(jm),this.addDetector(Hm),this.addDetector(Wm)}addDetector(s){return this.detectors[s.name]=s,this}detect(s){s||(s=this.options.order);let r=[];return s.forEach(n=>{if(this.detectors[n]){let o=this.detectors[n].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(r=r.concat(o))}}),r=r.map(n=>this.options.convertDetectedLanguage(n)),this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}cacheUserLanguage(s,r){r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(s)>-1||r.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(s,this.options)}))}}fl.type="languageDetector";const Gm=(...a)=>{console!=null&&console.warn&&(Ts(a[0])&&(a[0]=`react-i18next:: ${a[0]}`),console.warn(...a))},gl={},Fn=(...a)=>{Ts(a[0])&&gl[a[0]]||(Ts(a[0])&&(gl[a[0]]=new Date),Gm(...a))},bl=(a,s)=>()=>{if(a.isInitialized)s();else{const r=()=>{setTimeout(()=>{a.off("initialized",r)},0),s()};a.on("initialized",r)}},Bn=(a,s,r)=>{a.loadNamespaces(s,bl(a,r))},xl=(a,s,r,n)=>{if(Ts(r)&&(r=[r]),a.options.preload&&a.options.preload.indexOf(s)>-1)return Bn(a,r,n);r.forEach(o=>{a.options.ns.indexOf(o)<0&&a.options.ns.push(o)}),a.loadLanguages(s,bl(a,n))},Xm=(a,s,r={})=>!s.languages||!s.languages.length?(Fn("i18n.languages were undefined or empty",s.languages),!0):s.hasLoadedNamespace(a,{lng:r.lng,precheck:(n,o)=>{var l;if(((l=r.bindI18n)==null?void 0:l.indexOf("languageChanging"))>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!o(n.isLanguageChangingTo,a))return!1}}),Ts=a=>typeof a=="string",Ym=a=>typeof a=="object"&&a!==null,Qm=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Zm={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},Jm=a=>Zm[a];let Un={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:a=>a.replace(Qm,Jm)};const ey=(a={})=>{Un={...Un,...a}},ty=()=>Un;let hl;const sy=a=>{hl=a},ry=()=>hl,ay={type:"3rdParty",init(a){ey(a.options.react),sy(a)}},ny=F.createContext();class iy{constructor(){this.usedNamespaces={}}addUsedNamespaces(s){s.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const oy=(a,s)=>{const r=F.useRef();return F.useEffect(()=>{r.current=s?r.current:a},[a,s]),r.current},wl=(a,s,r,n)=>a.getFixedT(s,r,n),ly=(a,s,r,n)=>F.useCallback(wl(a,s,r,n),[a,s,r,n]),Kn=(a,s={})=>{var N,M,E,$;const{i18n:r}=s,{i18n:n,defaultNS:o}=F.useContext(ny)||{},l=r||n||ry();if(l&&!l.reportNamespaces&&(l.reportNamespaces=new iy),!l){Fn("You will need to pass in an i18next instance by using initReactI18next");const P=(X,xe)=>Ts(xe)?xe:Ym(xe)&&Ts(xe.defaultValue)?xe.defaultValue:Array.isArray(X)?X[X.length-1]:X,j=[P,{},!1];return j.t=P,j.i18n={},j.ready=!1,j}(N=l.options.react)!=null&&N.wait&&Fn("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const p={...ty(),...l.options.react,...s},{useSuspense:u,keyPrefix:m}=p;let _=a||o||((M=l.options)==null?void 0:M.defaultNS);_=Ts(_)?[_]:_||["translation"],($=(E=l.reportNamespaces).addUsedNamespaces)==null||$.call(E,_);const g=(l.isInitialized||l.initializedStoreOnce)&&_.every(P=>Xm(P,l,p)),h=ly(l,s.lng||null,p.nsMode==="fallback"?_:_[0],m),w=()=>h,k=()=>wl(l,s.lng||null,p.nsMode==="fallback"?_:_[0],m),[S,C]=F.useState(w);let B=_.join();s.lng&&(B=`${s.lng}${B}`);const W=oy(B),H=F.useRef(!0);F.useEffect(()=>{const{bindI18n:P,bindI18nStore:j}=p;H.current=!0,!g&&!u&&(s.lng?xl(l,s.lng,_,()=>{H.current&&C(k)}):Bn(l,_,()=>{H.current&&C(k)})),g&&W&&W!==B&&H.current&&C(k);const X=()=>{H.current&&C(k)};return P&&(l==null||l.on(P,X)),j&&(l==null||l.store.on(j,X)),()=>{H.current=!1,l&&(P==null||P.split(" ").forEach(xe=>l.off(xe,X))),j&&l&&j.split(" ").forEach(xe=>l.store.off(xe,X))}},[l,B]),F.useEffect(()=>{H.current&&g&&C(w)},[l,m,g]);const ee=[S,l,g];if(ee.t=S,ee.i18n=l,ee.ready=g,g||!g&&!u)return ee;throw new Promise(P=>{s.lng?xl(l,s.lng,_,()=>P()):Bn(l,_,()=>P())})},cy={type:"type",syntax:"syntax",overloads:"overloads",arguments:"arguments",fields:"fields",example:"example",returns:"returns",remarks:"remarks","see also":"see also","Copy code":"Copy code","Copy link":"Copy link",Copied:"Copied","Link copied":"Link copied",variables:"Variables",constants:"Constants",functions:"Functions",keywords:"Keywords",types:"Types",operators:"Operators",annotations:"Annotations",search:"Search","Mine Script® v1 Reference Manual":"Mine Script® v1 Reference Manual","This script is read-only. It cannot be edited.":"This script is read-only. It cannot be edited.","save script":"Save script","open script":"Open script","find/replace":"Find/Replace","toggle console":"Toggle console","open editor in new tab":"Open editor in new tab","open editor in new window":"Open editor in new window",keyword:"keyword","built-in function":"built-in function","built-in variable":"built-in variable","built-in method":"built-in method","built-in type":"built-in type",annotation:"annotation","built-in constant":"built-in constant",namespace:"namespace","user-defined variable":"user-defined variable","user-defined type":"user-defined type",field:"field",enum:"enum","user-defined method":"user-defined method","user-defined function":"user-defined function",parameter:"parameter","**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.":"**Namespaces** are immutable terms that act as prefixes for groups of identifiers. A dot and another term always follow a namespace when naming Mine functions, variables, and methods.","to trigger parameters hint":"to trigger parameters hint",library:"library","enum member":"enum member",Returns:"Returns",Syntax:"Syntax",Remarks:"Remarks",Fields:"Fields",Description:"Description",Example:"Example",EnumMembers:"Enum members"},py={type:"类型",syntax:"语法",overloads:"重载",arguments:"参数",fields:"字段",example:"例子",returns:"返回值",remarks:"备注","see also":"另见","Copy code":"复制代码","Copy link":"复制链接",Copied:"已复制","Link copied":"链接已复制",variables:"内置变量",constants:"常量",functions:"函数",keywords:"关键词",types:"类型",operators:"运算符",annotations:"注释",search:"搜索","Mine Script® v1 Reference Manual":"Mine Script™ v1参考手册","This script is read-only. It cannot be edited.":"该脚本是只读的。它无法被编辑。","save script":"保存脚本","open script":"打开脚本","find/replace":"寻找/替换","toggle console":"切换控制台","open editor in new tab":"在新标签页中打开","open editor in new window":"在新窗口中打开",keyword:"关键词","built-in function":"内置函数","built-in variable":"内置变量","built-in method":"内置方法","built-in type":"内置类型",annotation:"注释","built-in constant":"内置常量",namespace:"命名空间","user-defined variable":"用户自定义变量","user-defined type":"用户自定义类型",field:"字段",enum:"枚举","user-defined method":"用户自定义方法","user-defined function":"用户自定义函数",parameter:"参数","**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.":"命名空间是不可变的术语,充当标识符组的前缀。在命名Mine函数、变量和方法时,点和另一个术语始终遵循命名空间。","to trigger parameters hint":"触发参数提示",library:"脚本库","enum member":"枚举成员",Returns:"返回值",Syntax:"语法",Remarks:"备注",Fields:"字段",Description:"描述",Example:"例子",EnumMembers:"枚举成员"};Se.use(fl).use(ay).init({debug:!0,fallbackLng:"zh-CN",interpolation:{escapeValue:!1},resources:{en:{translation:cy},"zh-CN":{translation:py}}}),self.MonacoEnvironment={getWorker(){return new Lm({name:"Editor Worker"})}},vn.config({paths:{vs:"https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.45.0/min/vs"},"vs/nls":{availableLanguages:{"*":"zh-cn"}}});const dy=(a,s)=>{const{height:r,width:n,theme:o,options:l,hasDiff:p,readOnly:u,defaultValue:m,onChange:_,onLinkOpen:g,onCursorPositionChange:h,onActionTrigger:w,onEditorDidMount:k}=a,{t:S}=Kn(),C=F.useRef(null),B=F.useRef(null),W=F.useRef(!1),H=F.useRef(!1);F.useImperativeHandle(s,()=>({setOriginalScript(P){var j;(j=C.current)==null||j.setOriginalScript(P)},setScript(P){var j;(j=C.current)==null||j.setValue(P)},gotoLine(){var P;(P=C.current)==null||P.gotoLine()},getEditorLayout(){var P;return(P=C.current)==null?void 0:P.getEditorLayout()},setPosition(P,j){var X;(X=C.current)==null||X.setPosition({column:P,lineNumber:j})},setModelMarkers(P){var j;H.current=!0,(j=C.current)==null||j.setModelMarkers(P),setTimeout(()=>{H.current=!1},2e3)},focus(){var P;(P=C.current)==null||P.focus()}})),F.useEffect(()=>{var P,j;p?(j=C.current)==null||j.addDiffDecorations():(P=C.current)==null||P.removeDiffDecorations()},[p]),F.useEffect(()=>{o&&qe.editor.setTheme(o)},[o]),F.useEffect(()=>{var P;(P=C.current)==null||P.updateActionTrigger(w)},[w]),F.useEffect(()=>{var P;g&&((P=C.current)==null||P.addLinkOpenFunc(g))},[g]);function ee(P,j){var xe,rt;Ot.initBuiltinsTrees(),da.setEditor(P),C.current=new xm(P,j,w),g&&((xe=C.current)==null||xe.addLinkOpenFunc(g)),p&&((rt=C.current)==null||rt.addDiffDecorations()),$u(P),requestAnimationFrame($);const X=P.getValue();C.current.onChangeCursorPosition(h),_&&_(X),!u&&N(X),k&&k()}const N=F.useCallback(async P=>{var kt;W.current=!1;const{errors:j,functions:X,methods:xe,types:rt,variables:He,overloadsFuncs:Ee,imports:Z,enums:ye}=await dl(P),ze=new Map(Object.entries(X)),ge=new Map(Object.entries(xe)),Ue=new Map(Object.entries(rt)),Ge=new Map(Object.entries(He)),re=new Map(Object.entries(Z)),ve=new Map(Object.entries(ye));ws.setUserDefined({functions:ze,methods:ge,types:Ue,variables:Ge,imports:re,enums:ve},Ee),Ot.setUserDefind(ze,Ue,Ge,ge,ve);const Ke=j.map(Xe=>({...Xe,severity:Xe.type||qe.MarkerSeverity.Error}));u||!W.current&&!H.current&&Ke.length&&((kt=C.current)==null||kt.setModelMarkers(Ke))},[u]),M=F.useMemo(()=>Wu.debounce(N,1500),[N]);function E(P){var j;if(u){N(P||"");return}W.current=!0,da.clearInlayHints(),(j=C.current)==null||j.setModelMarkers([]),P!==void 0&&(_&&_(P),M(P))}const $=F.useCallback(()=>{var j,X;const P=(j=B.current)==null?void 0:j.getBoundingClientRect();(X=C.current)==null||X.setEditorLayout((P==null?void 0:P.height)||0,P==null?void 0:P.width)},[]);return F.useEffect(()=>{const P=()=>{window.requestAnimationFrame($)},j=new ResizeObserver(P);return B.current&&j.observe(B.current),()=>{var X;B.current&&j.unobserve(B.current),j.disconnect(),(X=C.current)==null||X.dispose()}},[]),U.jsx("div",{ref:B,children:U.jsx(cu,{height:r,width:n||"100%",defaultLanguage:Re,defaultValue:m||`indicator("我的脚本")
144
+ */const Jo=Symbol("Comlink.proxy"),hm=Symbol("Comlink.endpoint"),wm=Symbol("Comlink.releaseProxy"),Pn=Symbol("Comlink.finalizer"),_a=Symbol("Comlink.thrown"),el=a=>typeof a=="object"&&a!==null||typeof a=="function",vm={canHandle:a=>el(a)&&a[Jo],serialize(a){const{port1:s,port2:r}=new MessageChannel;return sl(a,s),[r,[r]]},deserialize(a){return a.start(),Mn(a)}},Tm={canHandle:a=>el(a)&&_a in a,serialize({value:a}){let s;return a instanceof Error?s={isError:!0,value:{message:a.message,name:a.name,stack:a.stack}}:s={isError:!1,value:a},[s,[]]},deserialize(a){throw a.isError?Object.assign(new Error(a.value.message),a.value):a.value}},tl=new Map([["proxy",vm],["throw",Tm]]);function Dm(a,s){for(const r of a)if(s===r||r==="*"||r instanceof RegExp&&r.test(s))return!0;return!1}function sl(a,s=globalThis,r=["*"]){s.addEventListener("message",function n(o){if(!o||!o.data)return;if(!Dm(r,o.origin)){console.warn(`Invalid origin '${o.origin}' for comlink proxy`);return}const{id:l,type:p,path:u}=Object.assign({path:[]},o.data),m=(o.data.argumentList||[]).map(Ts);let _;try{const g=u.slice(0,-1).reduce((w,k)=>w[k],a),h=u.reduce((w,k)=>w[k],a);switch(p){case"GET":_=h;break;case"SET":g[u.slice(-1)[0]]=Ts(o.data.value),_=!0;break;case"APPLY":_=h.apply(g,m);break;case"CONSTRUCT":{const w=new h(...m);_=Fn(w)}break;case"ENDPOINT":{const{port1:w,port2:k}=new MessageChannel;sl(a,k),_=Cm(w,[w])}break;case"RELEASE":_=void 0;break;default:return}}catch(g){_={value:g,[_a]:0}}Promise.resolve(_).catch(g=>({value:g,[_a]:0})).then(g=>{const[h,w]=xa(g);s.postMessage(Object.assign(Object.assign({},h),{id:l}),w),p==="RELEASE"&&(s.removeEventListener("message",n),rl(s),Pn in a&&typeof a[Pn]=="function"&&a[Pn]())}).catch(g=>{const[h,w]=xa({value:new TypeError("Unserializable return value"),[_a]:0});s.postMessage(Object.assign(Object.assign({},h),{id:l}),w)})}),s.start&&s.start()}function km(a){return a.constructor.name==="MessagePort"}function rl(a){km(a)&&a.close()}function Mn(a,s){return Rn(a,[],s)}function fa(a){if(a)throw new Error("Proxy has been released and is not useable")}function al(a){return Ks(a,{type:"RELEASE"}).then(()=>{rl(a)})}const ga=new WeakMap,ba="FinalizationRegistry"in globalThis&&new FinalizationRegistry(a=>{const s=(ga.get(a)||0)-1;ga.set(a,s),s===0&&al(a)});function Im(a,s){const r=(ga.get(s)||0)+1;ga.set(s,r),ba&&ba.register(a,s,a)}function Am(a){ba&&ba.unregister(a)}function Rn(a,s=[],r=function(){}){let n=!1;const o=new Proxy(r,{get(l,p){if(fa(n),p===wm)return()=>{Am(o),al(a),n=!0};if(p==="then"){if(s.length===0)return{then:()=>o};const u=Ks(a,{type:"GET",path:s.map(m=>m.toString())}).then(Ts);return u.then.bind(u)}return Rn(a,[...s,p])},set(l,p,u){fa(n);const[m,_]=xa(u);return Ks(a,{type:"SET",path:[...s,p].map(g=>g.toString()),value:m},_).then(Ts)},apply(l,p,u){fa(n);const m=s[s.length-1];if(m===hm)return Ks(a,{type:"ENDPOINT"}).then(Ts);if(m==="bind")return Rn(a,s.slice(0,-1));const[_,g]=nl(u);return Ks(a,{type:"APPLY",path:s.map(h=>h.toString()),argumentList:_},g).then(Ts)},construct(l,p){fa(n);const[u,m]=nl(p);return Ks(a,{type:"CONSTRUCT",path:s.map(_=>_.toString()),argumentList:u},m).then(Ts)}});return Im(o,a),o}function qm(a){return Array.prototype.concat.apply([],a)}function nl(a){const s=a.map(xa);return[s.map(r=>r[0]),qm(s.map(r=>r[1]))]}const il=new WeakMap;function Cm(a,s){return il.set(a,s),a}function Fn(a){return Object.assign(a,{[Jo]:!0})}function xa(a){for(const[s,r]of tl)if(r.canHandle(a)){const[n,o]=r.serialize(a);return[{type:"HANDLER",name:s,value:n},o]}return[{type:"RAW",value:a},il.get(a)||[]]}function Ts(a){switch(a.type){case"HANDLER":return tl.get(a.name).deserialize(a.value);case"RAW":return a.value}}function Ks(a,s,r){return new Promise(n=>{const o=Sm();a.addEventListener("message",function l(p){!p.data||!p.data.id||p.data.id!==o||(a.removeEventListener("message",l),n(p.data))}),a.start&&a.start(),a.postMessage(Object.assign({id:o},s),r)})}function Sm(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const ol=new Worker(new URL(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/scriptsRunWorker-B3l8bZZ1.js").href:new URL("assets/scriptsRunWorker-B3l8bZZ1.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:ea&&ea.src||new URL("trading-vue-editor.umd.cjs",document.baseURI).href),{type:"module",name:"Run TccScript Server"});ol.onerror=a=>{console.error(a)};async function ll(a){return await ua.setInlayHints(a)}const cl=Mn(ol),pl=Mn(new Worker(new URL(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/parserTccWorker-DVfTw1lJ.js").href:new URL("assets/parserTccWorker-DVfTw1lJ.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:ea&&ea.src||new URL("trading-vue-editor.umd.cjs",document.baseURI).href),{type:"module",name:"Parser TccScript Server"}));async function dl(a,s=!1){const{functions:r,types:n,constants:o,variables:l,methods:p}=_t;return await pl.parseTcc(a,s,Fn(ll),{functions:Object.fromEntries(r),methods:Object.fromEntries(p),types:Object.fromEntries(n),constants:Object.fromEntries(o),variables:Object.fromEntries(l)})}async function zm(a,s){const{functions:r,types:n,constants:o,variables:l,methods:p}=_t;return await pl.parseLibraryCode(a,s,Fn(ll),{functions:Object.fromEntries(r),methods:Object.fromEntries(p),types:Object.fromEntries(n),constants:Object.fromEntries(o),variables:Object.fromEntries(l)})}async function Nm(a,s,r=!0){return await cl.runScript(a,s,r)}async function Em(a){return await cl.removeScript(a)}function Lm(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})}const{slice:Om,forEach:Pm}=[];function Mm(a){return Pm.call(Om.call(arguments,1),s=>{if(s)for(const r in s)a[r]===void 0&&(a[r]=s[r])}),a}const ul=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Rm=(a,s,r)=>{const n=r||{};n.path=n.path||"/";const o=encodeURIComponent(s);let l=`${a}=${o}`;if(n.maxAge>0){const p=n.maxAge-0;if(Number.isNaN(p))throw new Error("maxAge should be a Number");l+=`; Max-Age=${Math.floor(p)}`}if(n.domain){if(!ul.test(n.domain))throw new TypeError("option domain is invalid");l+=`; Domain=${n.domain}`}if(n.path){if(!ul.test(n.path))throw new TypeError("option path is invalid");l+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");l+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(l+="; HttpOnly"),n.secure&&(l+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"strict":l+="; SameSite=Strict";break;case"none":l+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return l},ml={create(a,s,r,n){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+r*60*1e3)),n&&(o.domain=n),document.cookie=Rm(a,encodeURIComponent(s),o)},read(a){const s=`${a}=`,r=document.cookie.split(";");for(let n=0;n<r.length;n++){let o=r[n];for(;o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(s)===0)return o.substring(s.length,o.length)}return null},remove(a){this.create(a,"",-1)}};var Fm={name:"cookie",lookup(a){let{lookupCookie:s}=a;if(s&&typeof document<"u")return ml.read(s)||void 0},cacheUserLanguage(a,s){let{lookupCookie:r,cookieMinutes:n,cookieDomain:o,cookieOptions:l}=s;r&&typeof document<"u"&&ml.create(r,a,n,o,l)}},Bm={name:"querystring",lookup(a){var n;let{lookupQuerystring:s}=a,r;if(typeof window<"u"){let{search:o}=window.location;!window.location.search&&((n=window.location.hash)==null?void 0:n.indexOf("?"))>-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));const p=o.substring(1).split("&");for(let u=0;u<p.length;u++){const m=p[u].indexOf("=");m>0&&p[u].substring(0,m)===s&&(r=p[u].substring(m+1))}}return r}};let kr=null;const yl=()=>{if(kr!==null)return kr;try{kr=window!=="undefined"&&window.localStorage!==null;const a="i18next.translate.boo";window.localStorage.setItem(a,"foo"),window.localStorage.removeItem(a)}catch{kr=!1}return kr};var Um={name:"localStorage",lookup(a){let{lookupLocalStorage:s}=a;if(s&&yl())return window.localStorage.getItem(s)||void 0},cacheUserLanguage(a,s){let{lookupLocalStorage:r}=s;r&&yl()&&window.localStorage.setItem(r,a)}};let Ir=null;const _l=()=>{if(Ir!==null)return Ir;try{Ir=window!=="undefined"&&window.sessionStorage!==null;const a="i18next.translate.boo";window.sessionStorage.setItem(a,"foo"),window.sessionStorage.removeItem(a)}catch{Ir=!1}return Ir};var Km={name:"sessionStorage",lookup(a){let{lookupSessionStorage:s}=a;if(s&&_l())return window.sessionStorage.getItem(s)||void 0},cacheUserLanguage(a,s){let{lookupSessionStorage:r}=s;r&&_l()&&window.sessionStorage.setItem(r,a)}},$m={name:"navigator",lookup(a){const s=[];if(typeof navigator<"u"){const{languages:r,userLanguage:n,language:o}=navigator;if(r)for(let l=0;l<r.length;l++)s.push(r[l]);n&&s.push(n),o&&s.push(o)}return s.length>0?s:void 0}},jm={name:"htmlTag",lookup(a){let{htmlTag:s}=a,r;const n=s||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(r=n.getAttribute("lang")),r}},Hm={name:"path",lookup(a){var o;let{lookupFromPathIndex:s}=a;if(typeof window>"u")return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(r)?(o=r[typeof s=="number"?s:0])==null?void 0:o.replace("/",""):void 0}},Wm={name:"subdomain",lookup(a){var o,l;let{lookupFromSubdomainIndex:s}=a;const r=typeof s=="number"?s+1:1,n=typeof window<"u"&&((l=(o=window.location)==null?void 0:o.hostname)==null?void 0:l.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(n)return n[r]}};function Vm(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:a=>a}}class fl{constructor(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(s,r)}init(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=s||{languageUtils:{}},this.options=Mm(r,this.options||{},Vm()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Fm),this.addDetector(Bm),this.addDetector(Um),this.addDetector(Km),this.addDetector($m),this.addDetector(jm),this.addDetector(Hm),this.addDetector(Wm)}addDetector(s){return this.detectors[s.name]=s,this}detect(s){s||(s=this.options.order);let r=[];return s.forEach(n=>{if(this.detectors[n]){let o=this.detectors[n].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(r=r.concat(o))}}),r=r.map(n=>this.options.convertDetectedLanguage(n)),this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}cacheUserLanguage(s,r){r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(s)>-1||r.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(s,this.options)}))}}fl.type="languageDetector";const Gm=(...a)=>{console!=null&&console.warn&&(Ds(a[0])&&(a[0]=`react-i18next:: ${a[0]}`),console.warn(...a))},gl={},Bn=(...a)=>{Ds(a[0])&&gl[a[0]]||(Ds(a[0])&&(gl[a[0]]=new Date),Gm(...a))},bl=(a,s)=>()=>{if(a.isInitialized)s();else{const r=()=>{setTimeout(()=>{a.off("initialized",r)},0),s()};a.on("initialized",r)}},Un=(a,s,r)=>{a.loadNamespaces(s,bl(a,r))},xl=(a,s,r,n)=>{if(Ds(r)&&(r=[r]),a.options.preload&&a.options.preload.indexOf(s)>-1)return Un(a,r,n);r.forEach(o=>{a.options.ns.indexOf(o)<0&&a.options.ns.push(o)}),a.loadLanguages(s,bl(a,n))},Xm=(a,s,r={})=>!s.languages||!s.languages.length?(Bn("i18n.languages were undefined or empty",s.languages),!0):s.hasLoadedNamespace(a,{lng:r.lng,precheck:(n,o)=>{var l;if(((l=r.bindI18n)==null?void 0:l.indexOf("languageChanging"))>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!o(n.isLanguageChangingTo,a))return!1}}),Ds=a=>typeof a=="string",Ym=a=>typeof a=="object"&&a!==null,Qm=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Zm={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},Jm=a=>Zm[a];let Kn={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:a=>a.replace(Qm,Jm)};const ey=(a={})=>{Kn={...Kn,...a}},ty=()=>Kn;let hl;const sy=a=>{hl=a},ry=()=>hl,ay={type:"3rdParty",init(a){ey(a.options.react),sy(a)}},ny=F.createContext();class iy{constructor(){this.usedNamespaces={}}addUsedNamespaces(s){s.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const oy=(a,s)=>{const r=F.useRef();return F.useEffect(()=>{r.current=s?r.current:a},[a,s]),r.current},wl=(a,s,r,n)=>a.getFixedT(s,r,n),ly=(a,s,r,n)=>F.useCallback(wl(a,s,r,n),[a,s,r,n]),$n=(a,s={})=>{var N,M,E,$;const{i18n:r}=s,{i18n:n,defaultNS:o}=F.useContext(ny)||{},l=r||n||ry();if(l&&!l.reportNamespaces&&(l.reportNamespaces=new iy),!l){Bn("You will need to pass in an i18next instance by using initReactI18next");const P=(X,xe)=>Ds(xe)?xe:Ym(xe)&&Ds(xe.defaultValue)?xe.defaultValue:Array.isArray(X)?X[X.length-1]:X,j=[P,{},!1];return j.t=P,j.i18n={},j.ready=!1,j}(N=l.options.react)!=null&&N.wait&&Bn("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const p={...ty(),...l.options.react,...s},{useSuspense:u,keyPrefix:m}=p;let _=a||o||((M=l.options)==null?void 0:M.defaultNS);_=Ds(_)?[_]:_||["translation"],($=(E=l.reportNamespaces).addUsedNamespaces)==null||$.call(E,_);const g=(l.isInitialized||l.initializedStoreOnce)&&_.every(P=>Xm(P,l,p)),h=ly(l,s.lng||null,p.nsMode==="fallback"?_:_[0],m),w=()=>h,k=()=>wl(l,s.lng||null,p.nsMode==="fallback"?_:_[0],m),[S,C]=F.useState(w);let B=_.join();s.lng&&(B=`${s.lng}${B}`);const W=oy(B),H=F.useRef(!0);F.useEffect(()=>{const{bindI18n:P,bindI18nStore:j}=p;H.current=!0,!g&&!u&&(s.lng?xl(l,s.lng,_,()=>{H.current&&C(k)}):Un(l,_,()=>{H.current&&C(k)})),g&&W&&W!==B&&H.current&&C(k);const X=()=>{H.current&&C(k)};return P&&(l==null||l.on(P,X)),j&&(l==null||l.store.on(j,X)),()=>{H.current=!1,l&&(P==null||P.split(" ").forEach(xe=>l.off(xe,X))),j&&l&&j.split(" ").forEach(xe=>l.store.off(xe,X))}},[l,B]),F.useEffect(()=>{H.current&&g&&C(w)},[l,m,g]);const ee=[S,l,g];if(ee.t=S,ee.i18n=l,ee.ready=g,g||!g&&!u)return ee;throw new Promise(P=>{s.lng?xl(l,s.lng,_,()=>P()):Un(l,_,()=>P())})},cy={type:"type",syntax:"syntax",overloads:"overloads",arguments:"arguments",fields:"fields",example:"example",returns:"returns",remarks:"remarks","see also":"see also","Copy code":"Copy code","Copy link":"Copy link",Copied:"Copied","Link copied":"Link copied",variables:"Variables",constants:"Constants",functions:"Functions",keywords:"Keywords",types:"Types",operators:"Operators",annotations:"Annotations",search:"Search","Mine Script® v1 Reference Manual":"Mine Script® v1 Reference Manual","This script is read-only. It cannot be edited.":"This script is read-only. It cannot be edited.","save script":"Save script","open script":"Open script","find/replace":"Find/Replace","toggle console":"Toggle console","open editor in new tab":"Open editor in new tab","open editor in new window":"Open editor in new window",keyword:"keyword","built-in function":"built-in function","built-in variable":"built-in variable","built-in method":"built-in method","built-in type":"built-in type",annotation:"annotation","built-in constant":"built-in constant",namespace:"namespace","user-defined variable":"user-defined variable","user-defined type":"user-defined type",field:"field",enum:"enum","user-defined method":"user-defined method","user-defined function":"user-defined function",parameter:"parameter","**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.":"**Namespaces** are immutable terms that act as prefixes for groups of identifiers. A dot and another term always follow a namespace when naming Mine functions, variables, and methods.","to trigger parameters hint":"to trigger parameters hint",library:"library","enum member":"enum member",Returns:"Returns",Syntax:"Syntax",Remarks:"Remarks",Fields:"Fields",Description:"Description",Example:"Example","Enum members":"Enum members",statement:"statement",loop:"loop","`click` on keyword for more help":"`click` on keyword for more help"},py={type:"类型",syntax:"语法",overloads:"重载",arguments:"参数",fields:"字段",example:"例子",returns:"返回值",remarks:"备注","see also":"另见","Copy code":"复制代码","Copy link":"复制链接",Copied:"已复制","Link copied":"链接已复制",variables:"内置变量",constants:"常量",functions:"函数",keywords:"关键词",types:"类型",operators:"运算符",annotations:"注释",search:"搜索","Mine Script® v1 Reference Manual":"Mine Script™ v1参考手册","This script is read-only. It cannot be edited.":"该脚本是只读的。它无法被编辑。","save script":"保存脚本","open script":"打开脚本","find/replace":"寻找/替换","toggle console":"切换控制台","open editor in new tab":"在新标签页中打开","open editor in new window":"在新窗口中打开",keyword:"关键词","built-in function":"内置函数","built-in variable":"内置变量","built-in method":"内置方法","built-in type":"内置类型",annotation:"注释","built-in constant":"内置常量",namespace:"命名空间","user-defined variable":"用户自定义变量","user-defined type":"用户自定义类型",field:"字段",enum:"枚举","user-defined method":"用户自定义方法","user-defined function":"用户自定义函数",parameter:"参数","**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.":"命名空间是不可变的术语,充当标识符组的前缀。在命名Mine函数、变量和方法时,点和另一个术语始终遵循命名空间。","to trigger parameters hint":"触发参数提示",library:"脚本库","enum member":"枚举成员",Returns:"返回值",Syntax:"语法",Remarks:"备注",Fields:"字段",Description:"描述",Example:"例子","Enum members":"枚举成员",statement:"声明",loop:"循环","`click` on keyword for more help":"“点击”关键词以获得更多帮助"};Se.use(fl).use(ay).init({debug:!0,fallbackLng:"en",interpolation:{escapeValue:!1},resources:{en:{translation:cy},"zh-CN":{translation:py}}}),self.MonacoEnvironment={getWorker(){return new Lm({name:"Editor Worker"})}},Tn.config({paths:{vs:"https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.45.0/min/vs"},"vs/nls":{availableLanguages:{"*":"zh-cn"}}});const dy=(a,s)=>{const{height:r,width:n,theme:o,options:l,hasDiff:p,readOnly:u,defaultValue:m,onChange:_,onLinkOpen:g,onCursorPositionChange:h,onActionTrigger:w,onEditorDidMount:k}=a,{t:S}=$n(),C=F.useRef(null),B=F.useRef(null),W=F.useRef(!1),H=F.useRef(!1);F.useImperativeHandle(s,()=>({setOriginalScript(P){var j;(j=C.current)==null||j.setOriginalScript(P)},setScript(P){var j;(j=C.current)==null||j.setValue(P)},gotoLine(){var P;(P=C.current)==null||P.gotoLine()},getEditorLayout(){var P;return(P=C.current)==null?void 0:P.getEditorLayout()},setPosition(P,j){var X;(X=C.current)==null||X.setPosition({column:P,lineNumber:j})},setModelMarkers(P){var j;H.current=!0,(j=C.current)==null||j.setModelMarkers(P),setTimeout(()=>{H.current=!1},2e3)},focus(){var P;(P=C.current)==null||P.focus()}})),F.useEffect(()=>{var P,j;p?(j=C.current)==null||j.addDiffDecorations():(P=C.current)==null||P.removeDiffDecorations()},[p]),F.useEffect(()=>{o&&qe.editor.setTheme(o)},[o]),F.useEffect(()=>{var P;(P=C.current)==null||P.updateActionTrigger(w)},[w]),F.useEffect(()=>{var P;g&&((P=C.current)==null||P.addLinkOpenFunc(g))},[g]);function ee(P,j){var xe,rt;Pt.initBuiltinsTrees(),ua.setEditor(P),C.current=new xm(P,j,w),g&&((xe=C.current)==null||xe.addLinkOpenFunc(g)),p&&((rt=C.current)==null||rt.addDiffDecorations()),$u(P),requestAnimationFrame($);const X=P.getValue();C.current.onChangeCursorPosition(h),_&&_(X),!u&&N(X),k&&k()}const N=F.useCallback(async P=>{var It;W.current=!1;const{errors:j,functions:X,methods:xe,types:rt,variables:He,overloadsFuncs:Ee,imports:Z,enums:ye}=await dl(P),ze=new Map(Object.entries(X)),ge=new Map(Object.entries(xe)),Ue=new Map(Object.entries(rt)),Ge=new Map(Object.entries(He)),re=new Map(Object.entries(Z)),ve=new Map(Object.entries(ye));vs.setUserDefined({functions:ze,methods:ge,types:Ue,variables:Ge,imports:re,enums:ve},Ee),Pt.setUserDefind(ze,Ue,Ge,ge,ve);const Ke=j.map(Xe=>({...Xe,severity:Xe.type||qe.MarkerSeverity.Error}));u||!W.current&&!H.current&&Ke.length&&((It=C.current)==null||It.setModelMarkers(Ke))},[u]),M=F.useMemo(()=>Wu.debounce(N,1500),[N]);function E(P){var j;if(u){N(P||"");return}W.current=!0,ua.clearInlayHints(),(j=C.current)==null||j.setModelMarkers([]),P!==void 0&&(_&&_(P),M(P))}const $=F.useCallback(()=>{var j,X;const P=(j=B.current)==null?void 0:j.getBoundingClientRect();(X=C.current)==null||X.setEditorLayout((P==null?void 0:P.height)||0,P==null?void 0:P.width)},[]);return F.useEffect(()=>{const P=()=>{window.requestAnimationFrame($)},j=new ResizeObserver(P);return B.current&&j.observe(B.current),()=>{var X;B.current&&j.unobserve(B.current),j.disconnect(),(X=C.current)==null||X.dispose()}},[]),U.jsx("div",{ref:B,children:U.jsx(cu,{height:r,width:n||"100%",defaultLanguage:Re,defaultValue:m||`indicator("我的脚本")
145
145
  plot(close)
146
- `,theme:o||"vs-dark",className:`tvue-script ${o||"vs-dark"}`,options:{colorDecorators:!0,useShadowDOM:!1,matchOnWordStartOnly:!0,automaticLayout:!1,unicodeHighlight:{allowedCharacters:{" ":!0}},suggest:{filterGraceful:!0},fontSize:13,...u?Ju:{},readOnlyMessage:{value:S("This script is read-only. It cannot be edited.")},...l},onMount:ee,onChange:E})})},uy=F.forwardRef(dy),my=a=>{const{theme:s,modified:r,original:n,height:o,width:l,renderSideBySide:p=!0}=a,u=F.useCallback((m,_)=>{_.languages.register({id:Re}),_.editor.defineTheme("vs-dark",Sn),_.editor.defineTheme("vs",Cn),_.languages.setMonarchTokensProvider(Re,Bs),_.languages.setLanguageConfiguration(Re,qn)},[]);return U.jsx(au,{height:o||"90vh",width:l||"100%",theme:s||"vs-dark",options:{readOnly:!0,renderSideBySide:p,scrollBeyondLastLine:!1},language:Re,modified:r,original:n,onMount:u})};q.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"}(q.VMarkerSeverity||(q.VMarkerSeverity={}));var xa={},yy=function(){var a=document.getSelection();if(!a.rangeCount)return function(){};for(var s=document.activeElement,r=[],n=0;n<a.rangeCount;n++)r.push(a.getRangeAt(n));switch(s.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":s.blur();break;default:s=null;break}return a.removeAllRanges(),function(){a.type==="Caret"&&a.removeAllRanges(),a.rangeCount||r.forEach(function(o){a.addRange(o)}),s&&s.focus()}},_y=yy,vl={"text/plain":"Text","text/html":"Url",default:"Text"},fy="Copy to clipboard: #{key}, Enter";function gy(a){var s=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return a.replace(/#{\s*key\s*}/g,s)}function by(a,s){var r,n,o,l,p,u,m=!1;s||(s={}),r=s.debug||!1;try{o=_y(),l=document.createRange(),p=document.getSelection(),u=document.createElement("span"),u.textContent=a,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",function(g){if(g.stopPropagation(),s.format)if(g.preventDefault(),typeof g.clipboardData>"u"){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var h=vl[s.format]||vl.default;window.clipboardData.setData(h,a)}else g.clipboardData.clearData(),g.clipboardData.setData(s.format,a);s.onCopy&&(g.preventDefault(),s.onCopy(g.clipboardData))}),document.body.appendChild(u),l.selectNodeContents(u),p.addRange(l);var _=document.execCommand("copy");if(!_)throw new Error("copy command was unsuccessful");m=!0}catch(g){r&&console.error("unable to copy using execCommand: ",g),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(s.format||"text",a),s.onCopy&&s.onCopy(window.clipboardData),m=!0}catch(h){r&&console.error("unable to copy using clipboardData: ",h),r&&console.error("falling back to prompt"),n=gy("message"in s?s.message:fy),window.prompt(n,a)}}finally{p&&(typeof p.removeRange=="function"?p.removeRange(l):p.removeAllRanges()),u&&document.body.removeChild(u),o()}return m}var xy=by;function $n(a){"@babel/helpers - typeof";return $n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},$n(a)}Object.defineProperty(xa,"__esModule",{value:!0}),xa.CopyToClipboard=void 0;var ha=Tl(F),hy=Tl(xy),wy=["text","onCopy","options","children"];function Tl(a){return a&&a.__esModule?a:{default:a}}function Dl(a,s){var r=Object.keys(a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);s&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(a,o).enumerable})),r.push.apply(r,n)}return r}function kl(a){for(var s=1;s<arguments.length;s++){var r=arguments[s]!=null?arguments[s]:{};s%2?Dl(Object(r),!0).forEach(function(n){Hn(a,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(r)):Dl(Object(r)).forEach(function(n){Object.defineProperty(a,n,Object.getOwnPropertyDescriptor(r,n))})}return a}function vy(a,s){if(a==null)return{};var r=Ty(a,s),n,o;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);for(o=0;o<l.length;o++)n=l[o],!(s.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(a,n)&&(r[n]=a[n])}return r}function Ty(a,s){if(a==null)return{};var r={},n=Object.keys(a),o,l;for(l=0;l<n.length;l++)o=n[l],!(s.indexOf(o)>=0)&&(r[o]=a[o]);return r}function Dy(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")}function Il(a,s){for(var r=0;r<s.length;r++){var n=s[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(a,n.key,n)}}function ky(a,s,r){return s&&Il(a.prototype,s),r&&Il(a,r),Object.defineProperty(a,"prototype",{writable:!1}),a}function Iy(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),s&&jn(a,s)}function jn(a,s){return jn=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},jn(a,s)}function Ay(a){var s=Cy();return function(){var n=wa(a),o;if(s){var l=wa(this).constructor;o=Reflect.construct(n,arguments,l)}else o=n.apply(this,arguments);return qy(this,o)}}function qy(a,s){if(s&&($n(s)==="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Al(a)}function Al(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function Cy(){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 wa(a){return wa=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},wa(a)}function Hn(a,s,r){return s in a?Object.defineProperty(a,s,{value:r,enumerable:!0,configurable:!0,writable:!0}):a[s]=r,a}var ql=function(a){Iy(r,a);var s=Ay(r);function r(){var n;Dy(this,r);for(var o=arguments.length,l=new Array(o),p=0;p<o;p++)l[p]=arguments[p];return n=s.call.apply(s,[this].concat(l)),Hn(Al(n),"onClick",function(u){var m=n.props,_=m.text,g=m.onCopy,h=m.children,w=m.options,k=ha.default.Children.only(h),S=(0,hy.default)(_,w);g&&g(_,S),k&&k.props&&typeof k.props.onClick=="function"&&k.props.onClick(u)}),n}return ky(r,[{key:"render",value:function(){var o=this.props;o.text,o.onCopy,o.options;var l=o.children,p=vy(o,wy),u=ha.default.Children.only(l);return ha.default.cloneElement(u,kl(kl({},p),{},{onClick:this.onClick}))}}]),r}(ha.default.PureComponent);xa.CopyToClipboard=ql,Hn(ql,"defaultProps",{onCopy:void 0,options:void 0});var Sy=xa,Wn=Sy.CopyToClipboard;Wn.CopyToClipboard=Wn;var zy=Wn;const Vn=td(zy);async function Ny(a,s=0){const r=a[s];if(!r)return;const{name:n,args:o,type:l,desc:p,examples:u,remarks:m,seeAlso:_,syntax:g,detailedDesc:h,fields:w,returns:k}=r,S={name:n};if(a.length>1&&(S.overloads=`${a.length} overloads`),l&&(S.type=l),o&&(S.name=`${n}()`,S.args=o.map(C=>{const{name:B,desc:W,displayType:H}=C;return{label:`${B} (${H})`,desc:W&&Ds(W)}})),p&&(S.desc=p.map(C=>Ds(C))),u&&(S.originalExample=u.join(`
147
- `),S.examples=await qe.editor.colorize(S.originalExample,Re,{tabSize:4})),h){S.detailedDesc=[];for(const C of h){const{desc:B,examples:W}=C;let H=B.map(M=>Ds(M)),ee,N;W&&(N=W.join(`
148
- `),ee=await qe.editor.colorize(N,Re,{tabSize:4})),S.detailedDesc.push({desc:H,examples:ee,originalExample:N})}}return k&&(S.returns=k.map(C=>Ds(C))),m&&(S.remarks=typeof m=="string"?[Ds(m)]:m.map(C=>Ds(C))),g&&(S.syntax=a.map(C=>{var B;return(B=C.syntax)==null?void 0:B[0]})),w&&(S.fields=w.map(C=>{const{name:B,desc:W,type:H}=C;return{label:`${B} (${H})`,desc:W&&Ds(W)}})),_&&(S.seeAlso=_.map(C=>Ey(C))),S}function Ey(a){const r=/\[([^\[\]]+)\]\(([^\(\)]+)\)/g.exec(a);if(r){const[n,o,l]=r;return{name:o,link:l}}}function Ds(a){const s=/\*\*([^\*]+)\*\*/g,r=/\`([^\`]+)\`/g,n=/\[([^\[\]]+)\]\(([^\(\)]+)\)/g;return a.replace(s,(o,l)=>`<strong>${l}</strong>`).replace(r,(o,l)=>`<code>${l}</code>`).replace(n,(o,l,p)=>`<a ${p.startsWith("#")?`data-name="${l}"`:'target="_blank"'} class="manual-content-text-link" href="${p}">${l}</a>`)}function Ly(a){var o;const s=[];let r=0;const n=[];for(const l of gr){for(let p of zo[l.key].sort()){if(So.includes(p))continue;let u=p;l.prefix==="fun"&&(u=`${p}()`),u.includes(a)&&(u.startsWith(a)?(u.includes(".")?s.splice(r,0,{label:u,group:l,key:`${l.prefix}_${p}`}):s.unshift({label:u,group:l,key:`${l.prefix}_${p}`}),r++):s.push({label:u,group:l,key:`${l.prefix}_${p}`}))}for(const[p,u]of _t[l.key])for(const m of u){const{name:_,args:g,type:h,desc:w,examples:k,remarks:S,seeAlso:C,syntax:B,detailedDesc:W,fields:H,returns:ee}=m,N={label:_,group:l,key:`${l.prefix}_${_}`};if(l.prefix==="fun"&&(N.label=`${_}()`),N.label.includes(a))break;if(g){let M=!1;for(const E of g){const{name:$,desc:P,displayType:j}=E;if($.includes(a)||P!=null&&P.includes(a)||j!=null&&j.includes(a)){n.push(N),M=!0;break}}if(M)break}if(h&&h.includes(a)){n.push(N);break}if(w){let M=!1;for(const E of w)if(E.includes(a)){n.push(N),M=!0;break}if(M)break}if(k){let M=!1;for(const E of k)if(E.includes(a)){n.push(N),M=!0;break}if(M)break}if(S&&(typeof S=="string"?S:S.join(`
146
+ `,theme:o||"vs-dark",className:`tvue-script ${o||"vs-dark"}`,options:{colorDecorators:!0,useShadowDOM:!1,matchOnWordStartOnly:!0,automaticLayout:!1,unicodeHighlight:{allowedCharacters:{" ":!0}},suggest:{filterGraceful:!0},fontSize:13,...u?Ju:{},readOnlyMessage:{value:S("This script is read-only. It cannot be edited.")},...l},onMount:ee,onChange:E})})},uy=F.forwardRef(dy),my=a=>{const{theme:s,modified:r,original:n,height:o,width:l,renderSideBySide:p=!0}=a,u=F.useCallback((m,_)=>{_.languages.register({id:Re}),_.editor.defineTheme("vs-dark",zn),_.editor.defineTheme("vs",Sn),_.languages.setMonarchTokensProvider(Re,Us),_.languages.setLanguageConfiguration(Re,Cn)},[]);return U.jsx(au,{height:o||"90vh",width:l||"100%",theme:s||"vs-dark",options:{readOnly:!0,renderSideBySide:p,scrollBeyondLastLine:!1},language:Re,modified:r,original:n,onMount:u})};q.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"}(q.VMarkerSeverity||(q.VMarkerSeverity={}));var ha={},yy=function(){var a=document.getSelection();if(!a.rangeCount)return function(){};for(var s=document.activeElement,r=[],n=0;n<a.rangeCount;n++)r.push(a.getRangeAt(n));switch(s.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":s.blur();break;default:s=null;break}return a.removeAllRanges(),function(){a.type==="Caret"&&a.removeAllRanges(),a.rangeCount||r.forEach(function(o){a.addRange(o)}),s&&s.focus()}},_y=yy,vl={"text/plain":"Text","text/html":"Url",default:"Text"},fy="Copy to clipboard: #{key}, Enter";function gy(a){var s=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return a.replace(/#{\s*key\s*}/g,s)}function by(a,s){var r,n,o,l,p,u,m=!1;s||(s={}),r=s.debug||!1;try{o=_y(),l=document.createRange(),p=document.getSelection(),u=document.createElement("span"),u.textContent=a,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",function(g){if(g.stopPropagation(),s.format)if(g.preventDefault(),typeof g.clipboardData>"u"){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var h=vl[s.format]||vl.default;window.clipboardData.setData(h,a)}else g.clipboardData.clearData(),g.clipboardData.setData(s.format,a);s.onCopy&&(g.preventDefault(),s.onCopy(g.clipboardData))}),document.body.appendChild(u),l.selectNodeContents(u),p.addRange(l);var _=document.execCommand("copy");if(!_)throw new Error("copy command was unsuccessful");m=!0}catch(g){r&&console.error("unable to copy using execCommand: ",g),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(s.format||"text",a),s.onCopy&&s.onCopy(window.clipboardData),m=!0}catch(h){r&&console.error("unable to copy using clipboardData: ",h),r&&console.error("falling back to prompt"),n=gy("message"in s?s.message:fy),window.prompt(n,a)}}finally{p&&(typeof p.removeRange=="function"?p.removeRange(l):p.removeAllRanges()),u&&document.body.removeChild(u),o()}return m}var xy=by;function jn(a){"@babel/helpers - typeof";return jn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},jn(a)}Object.defineProperty(ha,"__esModule",{value:!0}),ha.CopyToClipboard=void 0;var wa=Tl(F),hy=Tl(xy),wy=["text","onCopy","options","children"];function Tl(a){return a&&a.__esModule?a:{default:a}}function Dl(a,s){var r=Object.keys(a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);s&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(a,o).enumerable})),r.push.apply(r,n)}return r}function kl(a){for(var s=1;s<arguments.length;s++){var r=arguments[s]!=null?arguments[s]:{};s%2?Dl(Object(r),!0).forEach(function(n){Wn(a,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(r)):Dl(Object(r)).forEach(function(n){Object.defineProperty(a,n,Object.getOwnPropertyDescriptor(r,n))})}return a}function vy(a,s){if(a==null)return{};var r=Ty(a,s),n,o;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);for(o=0;o<l.length;o++)n=l[o],!(s.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(a,n)&&(r[n]=a[n])}return r}function Ty(a,s){if(a==null)return{};var r={},n=Object.keys(a),o,l;for(l=0;l<n.length;l++)o=n[l],!(s.indexOf(o)>=0)&&(r[o]=a[o]);return r}function Dy(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")}function Il(a,s){for(var r=0;r<s.length;r++){var n=s[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(a,n.key,n)}}function ky(a,s,r){return s&&Il(a.prototype,s),r&&Il(a,r),Object.defineProperty(a,"prototype",{writable:!1}),a}function Iy(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),s&&Hn(a,s)}function Hn(a,s){return Hn=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Hn(a,s)}function Ay(a){var s=Cy();return function(){var n=va(a),o;if(s){var l=va(this).constructor;o=Reflect.construct(n,arguments,l)}else o=n.apply(this,arguments);return qy(this,o)}}function qy(a,s){if(s&&(jn(s)==="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Al(a)}function Al(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function Cy(){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 va(a){return va=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},va(a)}function Wn(a,s,r){return s in a?Object.defineProperty(a,s,{value:r,enumerable:!0,configurable:!0,writable:!0}):a[s]=r,a}var ql=function(a){Iy(r,a);var s=Ay(r);function r(){var n;Dy(this,r);for(var o=arguments.length,l=new Array(o),p=0;p<o;p++)l[p]=arguments[p];return n=s.call.apply(s,[this].concat(l)),Wn(Al(n),"onClick",function(u){var m=n.props,_=m.text,g=m.onCopy,h=m.children,w=m.options,k=wa.default.Children.only(h),S=(0,hy.default)(_,w);g&&g(_,S),k&&k.props&&typeof k.props.onClick=="function"&&k.props.onClick(u)}),n}return ky(r,[{key:"render",value:function(){var o=this.props;o.text,o.onCopy,o.options;var l=o.children,p=vy(o,wy),u=wa.default.Children.only(l);return wa.default.cloneElement(u,kl(kl({},p),{},{onClick:this.onClick}))}}]),r}(wa.default.PureComponent);ha.CopyToClipboard=ql,Wn(ql,"defaultProps",{onCopy:void 0,options:void 0});var Sy=ha,Vn=Sy.CopyToClipboard;Vn.CopyToClipboard=Vn;var zy=Vn;const Gn=td(zy);async function Ny(a,s=0){const r=a[s];if(!r)return;const{name:n,args:o,type:l,desc:p,examples:u,remarks:m,seeAlso:_,syntax:g,detailedDesc:h,fields:w,returns:k}=r,S={name:n};if(a.length>1&&(S.overloads=`${a.length} overloads`),l&&(S.type=l),o&&(S.name=`${n}()`,S.args=o.map(C=>{const{name:B,desc:W,displayType:H}=C;return{label:`${B} (${H})`,desc:W&&ks(W)}})),p&&(S.desc=p.map(C=>ks(C))),u&&(S.originalExample=u.join(`
147
+ `),S.examples=await qe.editor.colorize(S.originalExample,Re,{tabSize:4})),h){S.detailedDesc=[];for(const C of h){const{desc:B,examples:W}=C;let H=B.map(M=>ks(M)),ee,N;W&&(N=W.join(`
148
+ `),ee=await qe.editor.colorize(N,Re,{tabSize:4})),S.detailedDesc.push({desc:H,examples:ee,originalExample:N})}}return k&&(S.returns=k.map(C=>ks(C))),m&&(S.remarks=typeof m=="string"?[ks(m)]:m.map(C=>ks(C))),g&&(S.syntax=a.map(C=>{var B;return(B=C.syntax)==null?void 0:B[0]})),w&&(S.fields=w.map(C=>{const{name:B,desc:W,type:H}=C;return{label:`${B} (${H})`,desc:W&&ks(W)}})),_&&(S.seeAlso=_.map(C=>Ey(C))),S}function Ey(a){const r=/\[([^\[\]]+)\]\(([^\(\)]+)\)/g.exec(a);if(r){const[n,o,l]=r;return{name:o,link:l}}}function ks(a){const s=/\*\*([^\*]+)\*\*/g,r=/\`([^\`]+)\`/g,n=/\[([^\[\]]+)\]\(([^\(\)]+)\)/g;return a.replace(s,(o,l)=>`<strong>${l}</strong>`).replace(r,(o,l)=>`<code>${l}</code>`).replace(n,(o,l,p)=>`<a ${p.startsWith("#")?`data-name="${l}"`:'target="_blank"'} class="manual-content-text-link" href="${p}">${l}</a>`)}function Ly(a){var o;const s=[];let r=0;const n=[];for(const l of br){for(let p of No[l.key].sort()){if(zo.includes(p))continue;let u=p;l.prefix==="fun"&&(u=`${p}()`),u.includes(a)&&(u.startsWith(a)?(u.includes(".")?s.splice(r,0,{label:u,group:l,key:`${l.prefix}_${p}`}):s.unshift({label:u,group:l,key:`${l.prefix}_${p}`}),r++):s.push({label:u,group:l,key:`${l.prefix}_${p}`}))}for(const[p,u]of _t[l.key])for(const m of u){const{name:_,args:g,type:h,desc:w,examples:k,remarks:S,seeAlso:C,syntax:B,detailedDesc:W,fields:H,returns:ee}=m,N={label:_,group:l,key:`${l.prefix}_${_}`};if(l.prefix==="fun"&&(N.label=`${_}()`),N.label.includes(a))break;if(g){let M=!1;for(const E of g){const{name:$,desc:P,displayType:j}=E;if($.includes(a)||P!=null&&P.includes(a)||j!=null&&j.includes(a)){n.push(N),M=!0;break}}if(M)break}if(h&&h.includes(a)){n.push(N);break}if(w){let M=!1;for(const E of w)if(E.includes(a)){n.push(N),M=!0;break}if(M)break}if(k){let M=!1;for(const E of k)if(E.includes(a)){n.push(N),M=!0;break}if(M)break}if(S&&(typeof S=="string"?S:S.join(`
149
149
  `)).includes(a)){n.push(N);break}if(B){let M=!1;for(const E of B)if(E.includes(a)){n.push(N),M=!0;break}if(M)break}if(W){let M=!1;for(const E of W){const{desc:$,examples:P}=E;if($.join(`
150
150
  `).includes(a)){n.push(N),M=!0;break}if((o=P==null?void 0:P.join(`
151
- `))!=null&&o.includes(a)){n.push(N),M=!0;break}}if(M)break}if(H){let M=!1;for(const E of H){const{name:$,desc:P,type:j}=E;if($.includes(a)||P!=null&&P.includes(a)||j!=null&&j.includes(a)){n.push(N),M=!0;break}}if(M)break}if(ee){let M=!1;for(const E of ee)if(E.includes(a)){n.push(N),M=!0;break}if(M)break}}}return{labelList:s,contentList:n}}const Oy=a=>{var ee;const{group:s,itemKey:r,onItemClick:n,currentIndex:o}=a,{t:l}=Kn(),[p,u]=F.useState(),[m,_]=F.useState(0),[g,h]=F.useState(l("Copy code")),[w,k]=F.useState(l("Copy link"));F.useEffect(()=>{S(o)},[r]);const S=N=>{const M=r.replace(`${s==null?void 0:s.prefix}_`,""),E=_t[s==null?void 0:s.key].get(M);_(N),E&&Ny(E,N).then($=>{u($)})},C=N=>{S(N)},B=N=>{var M,E;if(N.target.localName==="a"&&N.target.hash&&((E=(M=N.target)==null?void 0:M.dataset)!=null&&E.name)){N.preventDefault();const{hash:$}=N.target;n($.replace("#",""))}},W=()=>{h(l("Copied")),setTimeout(()=>{h(l("Copy code"))},1e3)},H=()=>{k(l("Link copied")),setTimeout(()=>{k(l("Copy link"))},3e3)};return U.jsx("div",{onClick:B,id:`#${r}`,children:U.jsxs("div",{className:"manual-content-wrapper",children:[U.jsxs("div",{className:"manual-content-header",children:[U.jsxs("div",{children:[U.jsx("h3",{className:"manual-content-header-title",children:p==null?void 0:p.name}),!!(p!=null&&p.overloads)&&U.jsx("span",{className:"manual-content-header-overloads",children:p==null?void 0:p.overloads})]}),U.jsx(Vn,{text:(p==null?void 0:p.name)||"",onCopy:H,children:U.jsx("div",{"data-tooltip":w,className:"manual-content-btn",children:U.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28",width:"28",height:"28",children:U.jsxs("g",{fill:"currentColor",children:[U.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"}),U.jsx("path",{d:"M10.485 16.141l5.656-5.656.707.707-5.656 5.656z"})]})})})})]}),(ee=p==null?void 0:p.desc)==null?void 0:ee.map((N,M)=>U.jsx("div",{dangerouslySetInnerHTML:{__html:N},className:"manual-content-text"},M)),(p==null?void 0:p.type)&&U.jsxs(F.Fragment,{children:[U.jsx("div",{className:"manual-content-sub-title",children:l("type")}),U.jsx("div",{className:"manual-content-text",children:p.type})]}),(p==null?void 0:p.syntax)&&U.jsxs(F.Fragment,{children:[U.jsxs("div",{className:"manual-content-sub-title",children:[l("syntax")," ",!!(p!=null&&p.overloads)&&`& ${l("overloads")}`]}),p.syntax.map((N,M)=>{var E;return(((E=p.syntax)==null?void 0:E.length)||0)>1?U.jsx("div",{onClick:()=>C(M),children:U.jsx("pre",{className:`manual-content-syntax with-overloads ${M===m?"selected":""}`,children:N})},M):U.jsx("pre",{className:"manual-content-syntax",children:N},M)})]}),(p==null?void 0:p.args)&&U.jsxs(F.Fragment,{children:[U.jsx("div",{className:"manual-content-sub-title",children:l("arguments")}),p.args.map((N,M)=>U.jsxs("div",{className:"manual-content-text",children:[U.jsx("span",{className:"manual-content-args-label",children:N.label})," ",U.jsx("span",{dangerouslySetInnerHTML:{__html:N.desc||""}})]},M))]}),(p==null?void 0:p.fields)&&U.jsxs(F.Fragment,{children:[U.jsx("div",{className:"manual-content-sub-title",children:l("fields")}),p.fields.map((N,M)=>U.jsxs("div",{className:"manual-content-text",children:[U.jsx("span",{className:"manual-content-args-label",children:N.label})," ",U.jsx("span",{dangerouslySetInnerHTML:{__html:N.desc||""}})]},M))]}),(p==null?void 0:p.examples)&&U.jsxs(F.Fragment,{children:[U.jsxs("div",{className:"manual-content-sub-title manual-content-example-header",children:[U.jsx("div",{children:U.jsx("span",{children:l("example")})}),U.jsx(Vn,{text:p.originalExample||"",onCopy:W,children:U.jsx("div",{"data-tooltip":g,className:"manual-content-btn manual-content-example-copy",children:U.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",fill:"none",children:U.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"})})})})]}),U.jsx("pre",{className:"manual-content-example",children:U.jsx("code",{dangerouslySetInnerHTML:{__html:p.examples}})})]}),(p==null?void 0:p.detailedDesc)&&p.detailedDesc.map((N,M)=>U.jsxs(F.Fragment,{children:[N.desc.map((E,$)=>U.jsx("div",{className:"manual-content-text",dangerouslySetInnerHTML:{__html:E}},$)),U.jsxs("div",{className:"manual-content-sub-title manual-content-example-header",children:[U.jsx("div",{children:U.jsx("span",{children:l("example")})}),U.jsx(Vn,{text:N.originalExample||"",onCopy:W,children:U.jsx("div",{"data-tooltip":g,className:"manual-content-btn manual-content-example-copy",children:U.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",fill:"none",children:U.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"})})})})]}),U.jsx("pre",{className:"manual-content-example",children:U.jsx("code",{dangerouslySetInnerHTML:{__html:N.examples||""}})})]},M)),(p==null?void 0:p.returns)&&U.jsxs(F.Fragment,{children:[U.jsx("div",{className:"manual-content-sub-title",children:l("returns")}),p.returns.map((N,M)=>U.jsx("div",{className:"manual-content-text",dangerouslySetInnerHTML:{__html:N}},M))]}),(p==null?void 0:p.remarks)&&U.jsxs(F.Fragment,{children:[U.jsx("div",{className:"manual-content-sub-title",children:l("remarks")}),p.remarks.map((N,M)=>U.jsx("div",{className:"manual-content-text",dangerouslySetInnerHTML:{__html:N}},M))]}),(p==null?void 0:p.seeAlso)&&U.jsxs(F.Fragment,{children:[U.jsx("div",{className:"manual-content-sub-title",children:l("see also")}),U.jsx("div",{className:"manual-content-see_also",children:p.seeAlso.map((N,M)=>U.jsx("a",{className:"manual-content-see_also-tag","data-name":N==null?void 0:N.name,href:N==null?void 0:N.link,children:N==null?void 0:N.name},M))})]})]})})};qe.languages.register({id:Re}),qe.editor.defineTheme("vs-dark",Sn),qe.editor.defineTheme("vs",Cn),qe.languages.setMonarchTokensProvider(Re,Bs),qe.languages.setLanguageConfiguration(Re,qn);const Py=({theme:a="vs-dark",currentValue:s})=>{const{t:r}=Kn(),[n,o]=F.useState(gr[0]),[l,p]=F.useState(null),[u,m]=F.useState(0),[_,g]=F.useState(""),[h,w]=F.useState("var_bar_index"),k=F.useRef(null),S=F.useRef(null),C=F.useRef(null),B=E=>{var $;E.key===(n==null?void 0:n.key)&&!(n!=null&&n.isHidden)?o({...E,isHidden:!0}):o(E),($=k.current)==null||$.focus()};F.useEffect(()=>{qe.editor.setTheme(a)},[a]),F.useEffect(()=>{var E;if(s.value){const[$]=s.value.split("_"),P=gr.find(j=>$===j.prefix);P&&(m(s.index||0),N(P,s.value)),(E=k.current)==null||E.focus()}},[s]),F.useEffect(()=>{var E;(E=k.current)==null||E.focus()},[k.current]);const W=(E,$)=>{var P,j;E!==h&&($&&o($),m(0),w(E),(P=C.current)==null||P.scrollTo({top:0}),(j=k.current)==null||j.focus())},H=E=>{if(E.target.value.trim()==="")ee();else{g(E.target.value);const $=Ly(E.target.value);p($)}},ee=()=>{var E;g(""),p(null),setTimeout(()=>{var $,P;(P=($=S.current)==null?void 0:$.querySelector(`a[data-href="${h}"]`))==null||P.scrollIntoView(!0)},10),(E=k.current)==null||E.focus()},N=(E,$)=>{var P;o(E),w($),setTimeout(()=>{var j,X;(X=(j=S.current)==null?void 0:j.querySelector(`a[data-href="${$}"]`))==null||X.scrollIntoView(!0)},10),(P=C.current)==null||P.scrollTo({top:0})},M=E=>{var P;const $=gr.find(j=>E.startsWith(j.prefix));$&&(m(0),N($,E),(P=k.current)==null||P.focus())};return U.jsxs("div",{className:`${a} manual-warpper`,children:[U.jsxs("div",{className:"manual-left",children:[U.jsxs("div",{className:"manual-search",children:[U.jsx("span",{className:"manual-search-icon",children:U.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18",width:"18px",height:"18px",children:U.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"})})}),U.jsx("input",{onChange:H,ref:k,spellCheck:"false",value:_,className:"manual-search-input",autoComplete:"off",placeholder:r("Search"),type:"text"}),U.jsx("span",{onClick:ee,className:`manual-search-clear ${_?"":"hide"}`,children:U.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 95.939 95.939",width:"9",height:"9",children:U.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"})})})]}),U.jsx("div",{className:`manual-group-search-list manual-scroll ${_?"":"hide"}`,children:U.jsxs("div",{children:[l==null?void 0:l.labelList.map(E=>U.jsx("a",{onClick:$=>{$.preventDefault(),W(E.key,E.group)},className:`manual-group-body-item ${E.key===h?"manual-group-body-item-selected":""}`,"data-href":E.key,href:`#${E.key}`,children:E.label},`search_${E.key}`)),U.jsx("div",{className:"manual-content-separator"}),l==null?void 0:l.contentList.map(E=>U.jsx("a",{onClick:$=>{$.preventDefault(),W(E.key,E.group)},className:`manual-group-body-item ${E.key===h?"manual-group-body-item-selected":""}`,"data-href":E.key,href:`#${E.key}`,children:E.label},`search_${E.key}`))]})}),U.jsx("div",{className:`manual-group-list manual-scroll ${_?"hide":""}`,ref:S,children:gr.map(E=>{var $,P;return U.jsxs(F.Fragment,{children:[U.jsx("div",{onClick:()=>B(E),className:`manual-group-title ${E.key===(n==null?void 0:n.key)&&!(n!=null&&n.isHidden)?"active":""}`,children:r(E.key)}),U.jsx("div",{className:`manual-group-body manual-scroll ${E.key!==(n==null?void 0:n.key)||n!=null&&n.isHidden?"hide":""}`,children:(P=($=zo[E.key])==null?void 0:$.sort().filter(j=>!So.includes(j)))==null?void 0:P.map(j=>{const X=`${E.prefix}_${j}`;return U.jsx("a",{onClick:xe=>{xe.preventDefault(),W(X)},className:`manual-group-body-item ${X===h?"manual-group-body-item-selected":""}`,"data-href":X,href:`#${X}`,children:`${j}${E.prefix==="fun"?"()":""}`},X)})})]},E.key)})})]}),U.jsx("div",{ref:C,className:"manual-right manual-scroll",children:U.jsx(Oy,{currentIndex:u,group:n,itemKey:h,onItemClick:M})})]})};q.ReferenceManual=Py,q.TradingVueDiffEditor=my,q.TradingVueEditor=uy,q.parseLibrary=zm,q.parseTcc=dl,q.removeScript=Em,q.scriptsRun=Nm,Object.defineProperty(q,Symbol.toStringTag,{value:"Module"})});
151
+ `))!=null&&o.includes(a)){n.push(N),M=!0;break}}if(M)break}if(H){let M=!1;for(const E of H){const{name:$,desc:P,type:j}=E;if($.includes(a)||P!=null&&P.includes(a)||j!=null&&j.includes(a)){n.push(N),M=!0;break}}if(M)break}if(ee){let M=!1;for(const E of ee)if(E.includes(a)){n.push(N),M=!0;break}if(M)break}}}return{labelList:s,contentList:n}}const Oy=a=>{var ee;const{group:s,itemKey:r,onItemClick:n,currentIndex:o}=a,{t:l}=$n(),[p,u]=F.useState(),[m,_]=F.useState(0),[g,h]=F.useState(l("Copy code")),[w,k]=F.useState(l("Copy link"));F.useEffect(()=>{S(o)},[r]);const S=N=>{const M=r.replace(`${s==null?void 0:s.prefix}_`,""),E=_t[s==null?void 0:s.key].get(M);_(N),E&&Ny(E,N).then($=>{u($)})},C=N=>{S(N)},B=N=>{var M,E;if(N.target.localName==="a"&&N.target.hash&&((E=(M=N.target)==null?void 0:M.dataset)!=null&&E.name)){N.preventDefault();const{hash:$}=N.target;n($.replace("#",""))}},W=()=>{h(l("Copied")),setTimeout(()=>{h(l("Copy code"))},1e3)},H=()=>{k(l("Link copied")),setTimeout(()=>{k(l("Copy link"))},3e3)};return U.jsx("div",{onClick:B,id:`#${r}`,children:U.jsxs("div",{className:"manual-content-wrapper",children:[U.jsxs("div",{className:"manual-content-header",children:[U.jsxs("div",{children:[U.jsx("h3",{className:"manual-content-header-title",children:p==null?void 0:p.name}),!!(p!=null&&p.overloads)&&U.jsx("span",{className:"manual-content-header-overloads",children:p==null?void 0:p.overloads})]}),U.jsx(Gn,{text:(p==null?void 0:p.name)||"",onCopy:H,children:U.jsx("div",{"data-tooltip":w,className:"manual-content-btn",children:U.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28",width:"28",height:"28",children:U.jsxs("g",{fill:"currentColor",children:[U.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"}),U.jsx("path",{d:"M10.485 16.141l5.656-5.656.707.707-5.656 5.656z"})]})})})})]}),(ee=p==null?void 0:p.desc)==null?void 0:ee.map((N,M)=>U.jsx("div",{dangerouslySetInnerHTML:{__html:N},className:"manual-content-text"},M)),(p==null?void 0:p.type)&&U.jsxs(F.Fragment,{children:[U.jsx("div",{className:"manual-content-sub-title",children:l("type")}),U.jsx("div",{className:"manual-content-text",children:p.type})]}),(p==null?void 0:p.syntax)&&U.jsxs(F.Fragment,{children:[U.jsxs("div",{className:"manual-content-sub-title",children:[l("syntax")," ",!!(p!=null&&p.overloads)&&`& ${l("overloads")}`]}),p.syntax.map((N,M)=>{var E;return(((E=p.syntax)==null?void 0:E.length)||0)>1?U.jsx("div",{onClick:()=>C(M),children:U.jsx("pre",{className:`manual-content-syntax with-overloads ${M===m?"selected":""}`,children:N})},M):U.jsx("pre",{className:"manual-content-syntax",children:N},M)})]}),(p==null?void 0:p.args)&&U.jsxs(F.Fragment,{children:[U.jsx("div",{className:"manual-content-sub-title",children:l("arguments")}),p.args.map((N,M)=>U.jsxs("div",{className:"manual-content-text",children:[U.jsx("span",{className:"manual-content-args-label",children:N.label})," ",U.jsx("span",{dangerouslySetInnerHTML:{__html:N.desc||""}})]},M))]}),(p==null?void 0:p.fields)&&U.jsxs(F.Fragment,{children:[U.jsx("div",{className:"manual-content-sub-title",children:l("fields")}),p.fields.map((N,M)=>U.jsxs("div",{className:"manual-content-text",children:[U.jsx("span",{className:"manual-content-args-label",children:N.label})," ",U.jsx("span",{dangerouslySetInnerHTML:{__html:N.desc||""}})]},M))]}),(p==null?void 0:p.examples)&&U.jsxs(F.Fragment,{children:[U.jsxs("div",{className:"manual-content-sub-title manual-content-example-header",children:[U.jsx("div",{children:U.jsx("span",{children:l("example")})}),U.jsx(Gn,{text:p.originalExample||"",onCopy:W,children:U.jsx("div",{"data-tooltip":g,className:"manual-content-btn manual-content-example-copy",children:U.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",fill:"none",children:U.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"})})})})]}),U.jsx("pre",{className:"manual-content-example",children:U.jsx("code",{dangerouslySetInnerHTML:{__html:p.examples}})})]}),(p==null?void 0:p.detailedDesc)&&p.detailedDesc.map((N,M)=>U.jsxs(F.Fragment,{children:[N.desc.map((E,$)=>U.jsx("div",{className:"manual-content-text",dangerouslySetInnerHTML:{__html:E}},$)),U.jsxs("div",{className:"manual-content-sub-title manual-content-example-header",children:[U.jsx("div",{children:U.jsx("span",{children:l("example")})}),U.jsx(Gn,{text:N.originalExample||"",onCopy:W,children:U.jsx("div",{"data-tooltip":g,className:"manual-content-btn manual-content-example-copy",children:U.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",fill:"none",children:U.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"})})})})]}),U.jsx("pre",{className:"manual-content-example",children:U.jsx("code",{dangerouslySetInnerHTML:{__html:N.examples||""}})})]},M)),(p==null?void 0:p.returns)&&U.jsxs(F.Fragment,{children:[U.jsx("div",{className:"manual-content-sub-title",children:l("returns")}),p.returns.map((N,M)=>U.jsx("div",{className:"manual-content-text",dangerouslySetInnerHTML:{__html:N}},M))]}),(p==null?void 0:p.remarks)&&U.jsxs(F.Fragment,{children:[U.jsx("div",{className:"manual-content-sub-title",children:l("remarks")}),p.remarks.map((N,M)=>U.jsx("div",{className:"manual-content-text",dangerouslySetInnerHTML:{__html:N}},M))]}),(p==null?void 0:p.seeAlso)&&U.jsxs(F.Fragment,{children:[U.jsx("div",{className:"manual-content-sub-title",children:l("see also")}),U.jsx("div",{className:"manual-content-see_also",children:p.seeAlso.map((N,M)=>U.jsx("a",{className:"manual-content-see_also-tag","data-name":N==null?void 0:N.name,href:N==null?void 0:N.link,children:N==null?void 0:N.name},M))})]})]})})};qe.languages.register({id:Re}),qe.editor.defineTheme("vs-dark",zn),qe.editor.defineTheme("vs",Sn),qe.languages.setMonarchTokensProvider(Re,Us),qe.languages.setLanguageConfiguration(Re,Cn);const Py=({theme:a="vs-dark",currentValue:s})=>{const{t:r}=$n(),[n,o]=F.useState(br[0]),[l,p]=F.useState(null),[u,m]=F.useState(0),[_,g]=F.useState(""),[h,w]=F.useState("var_bar_index"),k=F.useRef(null),S=F.useRef(null),C=F.useRef(null),B=E=>{var $;E.key===(n==null?void 0:n.key)&&!(n!=null&&n.isHidden)?o({...E,isHidden:!0}):o(E),($=k.current)==null||$.focus()};F.useEffect(()=>{qe.editor.setTheme(a)},[a]),F.useEffect(()=>{var E;if(s.value){const[$]=s.value.split("_"),P=br.find(j=>$===j.prefix);P&&(m(s.index||0),N(P,s.value)),(E=k.current)==null||E.focus()}},[s]),F.useEffect(()=>{var E;(E=k.current)==null||E.focus()},[k.current]);const W=(E,$)=>{var P,j;E!==h&&($&&o($),m(0),w(E),(P=C.current)==null||P.scrollTo({top:0}),(j=k.current)==null||j.focus())},H=E=>{if(E.target.value.trim()==="")ee();else{g(E.target.value);const $=Ly(E.target.value);p($)}},ee=()=>{var E;g(""),p(null),setTimeout(()=>{var $,P;(P=($=S.current)==null?void 0:$.querySelector(`a[data-href="${h}"]`))==null||P.scrollIntoView(!0)},10),(E=k.current)==null||E.focus()},N=(E,$)=>{var P;o(E),w($),setTimeout(()=>{var j,X;(X=(j=S.current)==null?void 0:j.querySelector(`a[data-href="${$}"]`))==null||X.scrollIntoView(!0)},10),(P=C.current)==null||P.scrollTo({top:0})},M=E=>{var P;const $=br.find(j=>E.startsWith(j.prefix));$&&(m(0),N($,E),(P=k.current)==null||P.focus())};return U.jsxs("div",{className:`${a} manual-warpper`,children:[U.jsxs("div",{className:"manual-left",children:[U.jsxs("div",{className:"manual-search",children:[U.jsx("span",{className:"manual-search-icon",children:U.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18",width:"18px",height:"18px",children:U.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"})})}),U.jsx("input",{onChange:H,ref:k,spellCheck:"false",value:_,className:"manual-search-input",autoComplete:"off",placeholder:r("Search"),type:"text"}),U.jsx("span",{onClick:ee,className:`manual-search-clear ${_?"":"hide"}`,children:U.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 95.939 95.939",width:"9",height:"9",children:U.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"})})})]}),U.jsx("div",{className:`manual-group-search-list manual-scroll ${_?"":"hide"}`,children:U.jsxs("div",{children:[l==null?void 0:l.labelList.map(E=>U.jsx("a",{onClick:$=>{$.preventDefault(),W(E.key,E.group)},className:`manual-group-body-item ${E.key===h?"manual-group-body-item-selected":""}`,"data-href":E.key,href:`#${E.key}`,children:E.label},`search_${E.key}`)),U.jsx("div",{className:"manual-content-separator"}),l==null?void 0:l.contentList.map(E=>U.jsx("a",{onClick:$=>{$.preventDefault(),W(E.key,E.group)},className:`manual-group-body-item ${E.key===h?"manual-group-body-item-selected":""}`,"data-href":E.key,href:`#${E.key}`,children:E.label},`search_${E.key}`))]})}),U.jsx("div",{className:`manual-group-list manual-scroll ${_?"hide":""}`,ref:S,children:br.map(E=>{var $,P;return U.jsxs(F.Fragment,{children:[U.jsx("div",{onClick:()=>B(E),className:`manual-group-title ${E.key===(n==null?void 0:n.key)&&!(n!=null&&n.isHidden)?"active":""}`,children:r(E.key)}),U.jsx("div",{className:`manual-group-body manual-scroll ${E.key!==(n==null?void 0:n.key)||n!=null&&n.isHidden?"hide":""}`,children:(P=($=No[E.key])==null?void 0:$.sort().filter(j=>!zo.includes(j)))==null?void 0:P.map(j=>{const X=`${E.prefix}_${j}`;return U.jsx("a",{onClick:xe=>{xe.preventDefault(),W(X)},className:`manual-group-body-item ${X===h?"manual-group-body-item-selected":""}`,"data-href":X,href:`#${X}`,children:`${j}${E.prefix==="fun"?"()":""}`},X)})})]},E.key)})})]}),U.jsx("div",{ref:C,className:"manual-right manual-scroll",children:U.jsx(Oy,{currentIndex:u,group:n,itemKey:h,onItemClick:M})})]})};q.ReferenceManual=Py,q.TradingVueDiffEditor=my,q.TradingVueEditor=uy,q.parseLibrary=zm,q.parseTcc=dl,q.removeScript=Em,q.scriptsRun=Nm,Object.defineProperty(q,Symbol.toStringTag,{value:"Module"})});