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

Sign up to get free protection for your applications and to get access to all the features.
@@ -47,5 +47,12 @@ declare const _default: {
47
47
  'to trigger parameters hint': string;
48
48
  library: string;
49
49
  'enum member': string;
50
+ Returns: string;
51
+ Syntax: string;
52
+ Remarks: string;
53
+ Fields: string;
54
+ Description: string;
55
+ Example: string;
56
+ EnumMembers: string;
50
57
  };
51
58
  export default _default;
@@ -45,5 +45,14 @@ declare const _default: {
45
45
  parameter: string;
46
46
  "**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.": string;
47
47
  'to trigger parameters hint': string;
48
+ library: string;
49
+ 'enum member': string;
50
+ Returns: string;
51
+ Syntax: string;
52
+ Remarks: string;
53
+ Fields: string;
54
+ Description: string;
55
+ Example: string;
56
+ EnumMembers: string;
48
57
  };
49
58
  export default _default;
@@ -69628,7 +69628,14 @@ const rv = (a, s) => {
69628
69628
  "**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.",
69629
69629
  "to trigger parameters hint": "to trigger parameters hint",
69630
69630
  library: "library",
69631
- "enum member": "enum member"
69631
+ "enum member": "enum member",
69632
+ Returns: "Returns",
69633
+ Syntax: "Syntax",
69634
+ Remarks: "Remarks",
69635
+ Fields: "Fields",
69636
+ Description: "Description",
69637
+ Example: "Example",
69638
+ EnumMembers: "Enum members"
69632
69639
  }, iv = {
69633
69640
  type: "类型",
69634
69641
  syntax: "语法",
@@ -69675,11 +69682,20 @@ const rv = (a, s) => {
69675
69682
  "user-defined function": "用户自定义函数",
69676
69683
  parameter: "参数",
69677
69684
  "**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函数、变量和方法时,点和另一个术语始终遵循命名空间。",
69678
- "to trigger parameters hint": "触发参数提示"
69685
+ "to trigger parameters hint": "触发参数提示",
69686
+ library: "脚本库",
69687
+ "enum member": "枚举成员",
69688
+ Returns: "返回值",
69689
+ Syntax: "语法",
69690
+ Remarks: "备注",
69691
+ Fields: "字段",
69692
+ Description: "描述",
69693
+ Example: "例子",
69694
+ EnumMembers: "枚举成员"
69679
69695
  };
69680
69696
  Se.use(Nd).use(ev).init({
69681
69697
  debug: !0,
69682
- fallbackLng: "zh",
69698
+ fallbackLng: "zh-CN",
69683
69699
  interpolation: {
69684
69700
  escapeValue: !1
69685
69701
  },
@@ -69687,7 +69703,7 @@ Se.use(Nd).use(ev).init({
69687
69703
  en: {
69688
69704
  translation: nv
69689
69705
  },
69690
- zh: {
69706
+ "zh-CN": {
69691
69707
  translation: iv
69692
69708
  }
69693
69709
  }
@@ -141,7 +141,7 @@ function print() { __p += __j.call(arguments, '') }
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"},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":"触发参数提示"};Se.use(fl).use(ay).init({debug:!0,fallbackLng:"zh",interpolation:{escapeValue:!1},resources:{en:{translation:cy},zh:{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"),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("我的脚本")
145
145
  plot(close)
146
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
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(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guihz/trading-vue-editor-tes",
3
- "version": "0.0.217",
3
+ "version": "0.0.218",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "lib"