@guihz/trading-vue-editor-tes 0.0.40 → 0.0.41

Sign up to get free protection for your applications and to get access to all the features.
@@ -66016,7 +66016,11 @@ class fb {
66016
66016
  }
66017
66017
  update(i) {
66018
66018
  var a, o;
66019
- this._originalModel = this._monaco.editor.createModel(i, Qe), i !== ((a = this._editor.getModel()) == null ? void 0 : a.getValue()) && this._changeEvent(), (o = this._editor.getModel()) == null || o.deltaDecorations(this._oldDecorations, []), this._oldDecorations = [];
66019
+ if (this._originalModel = this._monaco.editor.createModel(i, Qe), i !== ((a = this._editor.getModel()) == null ? void 0 : a.getValue())) {
66020
+ this._changeEvent();
66021
+ return;
66022
+ }
66023
+ (o = this._editor.getModel()) == null || o.deltaDecorations(this._oldDecorations, []), this._oldDecorations = [];
66020
66024
  }
66021
66025
  dispose() {
66022
66026
  var i, a, o, u;
@@ -131,7 +131,7 @@ function print() { __p += __j.call(arguments, '') }
131
131
  }`;var te=nu(function(){return pe(d,L+"return "+C).apply(a,f)});if(te.source=C,fn(te))throw te;return te}function Rg(e){return ye(e).toLowerCase()}function Mg(e){return ye(e).toUpperCase()}function Lg(e,t,r){if(e=ye(e),e&&(r||t===a))return yl(e);if(!e||!(t=pt(t)))return e;var n=Nt(e),l=Nt(t),d=hl(n,l),f=_l(n,l)+1;return hr(n,d,f).join("")}function Fg(e,t,r){if(e=ye(e),e&&(r||t===a))return e.slice(0,bl(e)+1);if(!e||!(t=pt(t)))return e;var n=Nt(e),l=_l(n,Nt(t))+1;return hr(n,0,l).join("")}function Bg(e,t,r){if(e=ye(e),e&&(r||t===a))return e.replace(Ta,"");if(!e||!(t=pt(t)))return e;var n=Nt(e),l=hl(n,Nt(t));return hr(n,l).join("")}function jg(e,t){var r=ne,n=_t;if(ke(t)){var l="separator"in t?t.separator:l;r="length"in t?Z(t.length):r,n="omission"in t?pt(t.omission):n}e=ye(e);var d=e.length;if(Wr(e)){var f=Nt(e);d=f.length}if(r>=d)return e;var h=r-Hr(n);if(h<1)return n;var x=f?hr(f,0,h).join(""):e.slice(0,h);if(l===a)return x+n;if(f&&(h+=x.length-h),yn(l)){if(e.slice(h).search(l)){var A,q=x;for(l.global||(l=Si(l.source,ye(fe.exec(l))+"g")),l.lastIndex=0;A=l.exec(q);)var C=A.index;x=x.slice(0,C===a?h:C)}}else if(e.indexOf(pt(l),h)!=h){var O=x.lastIndexOf(l);O>-1&&(x=x.slice(0,O))}return x+n}function Ug(e){return e=ye(e),e&&va.test(e)?e.replace(Yt,hm):e}var Wg=Qr(function(e,t,r){return e+(r?" ":"")+t.toUpperCase()}),gn=oc("toUpperCase");function iu(e,t,r){return e=ye(e),t=r?a:t,t===a?dm(e)?bm(e):rm(e):e.match(t)||[]}var nu=re(function(e,t){try{return ut(e,a,t)}catch(r){return fn(r)?r:new K(r)}}),Hg=Zt(function(e,t){return vt(t,function(r){r=Wt(r),Qt(e,r,pn(e[r],e))}),e});function $g(e){var t=e==null?0:e.length,r=W();return e=t?Te(e,function(n){if(typeof n[1]!="function")throw new wt(m);return[r(n[0]),n[1]]}):[],re(function(n){for(var l=-1;++l<t;){var d=e[l];if(ut(d[0],this,n))return ut(d[1],this,n)}})}function Gg(e){return _f(It(e,k))}function bn(e){return function(){return e}}function Xg(e,t){return e==null||e!==e?t:e}var Yg=cc(),Vg=cc(!0);function it(e){return e}function xn(e){return Fl(typeof e=="function"?e:It(e,k))}function Kg(e){return jl(It(e,k))}function Qg(e,t){return Ul(e,It(t,k))}var Jg=re(function(e,t){return function(r){return Na(r,e,t)}}),Zg=re(function(e,t){return function(r){return Na(e,r,t)}});function vn(e,t,r){var n=je(t),l=qs(t,n);r==null&&!(ke(t)&&(l.length||!n.length))&&(r=t,t=e,e=this,l=qs(t,je(t)));var d=!(ke(r)&&"chain"in r)||!!r.chain,f=tr(e);return vt(l,function(h){var x=t[h];e[h]=x,f&&(e.prototype[h]=function(){var A=this.__chain__;if(d||A){var q=e(this.__wrapped__),C=q.__actions__=rt(this.__actions__);return C.push({func:x,args:arguments,thisArg:e}),q.__chain__=A,q}return x.apply(e,ur([this.value()],arguments))})}),e}function eb(){return We._===this&&(We._=Dm),this}function wn(){}function tb(e){return e=Z(e),re(function(t){return Wl(t,e)})}var rb=Ji(Te),ab=Ji(ul),sb=Ji(Ti);function ou(e){return nn(e)?Ii(Wt(e)):Pf(e)}function ib(e){return function(t){return e==null?a:Ar(e,t)}}var nb=dc(),ob=dc(!0);function Tn(){return[]}function In(){return!1}function lb(){return{}}function cb(){return""}function ub(){return!0}function db(e,t){if(e=Z(e),e<1||e>ze)return[];var r=V,n=Ge(e,V);t=W(t),e-=V;for(var l=Ai(n,t);++r<e;)t(r);return l}function pb(e){return Q(e)?Te(e,Wt):mt(e)?[e]:rt(Ac(ye(e)))}function mb(e){var t=++Tm;return ye(e)+t}var fb=Ps(function(e,t){return e+t},0),yb=Zi("ceil"),hb=Ps(function(e,t){return e/t},1),_b=Zi("floor");function gb(e){return e&&e.length?As(e,it,Li):a}function bb(e,t){return e&&e.length?As(e,W(t,2),Li):a}function xb(e){return ml(e,it)}function vb(e,t){return ml(e,W(t,2))}function wb(e){return e&&e.length?As(e,it,Ui):a}function Tb(e,t){return e&&e.length?As(e,W(t,2),Ui):a}var Ib=Ps(function(e,t){return e*t},1),Db=Zi("round"),kb=Ps(function(e,t){return e-t},0);function Ab(e){return e&&e.length?ki(e,it):0}function qb(e,t){return e&&e.length?ki(e,W(t,2)):0}return c.after=Kh,c.ary=Lc,c.assign=M_,c.assignIn=Jc,c.assignInWith=Xs,c.assignWith=L_,c.at=F_,c.before=Fc,c.bind=pn,c.bindAll=Hg,c.bindKey=Bc,c.castArray=l_,c.chain=Ec,c.chunk=_y,c.compact=gy,c.concat=by,c.cond=$g,c.conforms=Gg,c.constant=bn,c.countBy=Ah,c.create=B_,c.curry=jc,c.curryRight=Uc,c.debounce=Wc,c.defaults=j_,c.defaultsDeep=U_,c.defer=Qh,c.delay=Jh,c.difference=xy,c.differenceBy=vy,c.differenceWith=wy,c.drop=Ty,c.dropRight=Iy,c.dropRightWhile=Dy,c.dropWhile=ky,c.fill=Ay,c.filter=Ch,c.flatMap=Nh,c.flatMapDeep=Oh,c.flatMapDepth=Ph,c.flatten=zc,c.flattenDeep=qy,c.flattenDepth=Cy,c.flip=Zh,c.flow=Yg,c.flowRight=Vg,c.fromPairs=Sy,c.functions=V_,c.functionsIn=K_,c.groupBy=Eh,c.initial=Ny,c.intersection=Oy,c.intersectionBy=Py,c.intersectionWith=Ey,c.invert=J_,c.invertBy=Z_,c.invokeMap=Mh,c.iteratee=xn,c.keyBy=Lh,c.keys=je,c.keysIn=st,c.map=js,c.mapKeys=tg,c.mapValues=rg,c.matches=Kg,c.matchesProperty=Qg,c.memoize=Ws,c.merge=ag,c.mergeWith=Zc,c.method=Jg,c.methodOf=Zg,c.mixin=vn,c.negate=Hs,c.nthArg=tb,c.omit=sg,c.omitBy=ig,c.once=e_,c.orderBy=Fh,c.over=rb,c.overArgs=t_,c.overEvery=ab,c.overSome=sb,c.partial=mn,c.partialRight=Hc,c.partition=Bh,c.pick=ng,c.pickBy=eu,c.property=ou,c.propertyOf=ib,c.pull=Fy,c.pullAll=Oc,c.pullAllBy=By,c.pullAllWith=jy,c.pullAt=Uy,c.range=nb,c.rangeRight=ob,c.rearg=r_,c.reject=Wh,c.remove=Wy,c.rest=a_,c.reverse=un,c.sampleSize=$h,c.set=lg,c.setWith=cg,c.shuffle=Gh,c.slice=Hy,c.sortBy=Vh,c.sortedUniq=Qy,c.sortedUniqBy=Jy,c.split=Ng,c.spread=s_,c.tail=Zy,c.take=eh,c.takeRight=th,c.takeRightWhile=rh,c.takeWhile=ah,c.tap=gh,c.throttle=i_,c.thru=Bs,c.toArray=Vc,c.toPairs=tu,c.toPairsIn=ru,c.toPath=pb,c.toPlainObject=Qc,c.transform=ug,c.unary=n_,c.union=sh,c.unionBy=ih,c.unionWith=nh,c.uniq=oh,c.uniqBy=lh,c.uniqWith=ch,c.unset=dg,c.unzip=dn,c.unzipWith=Pc,c.update=pg,c.updateWith=mg,c.values=ea,c.valuesIn=fg,c.without=uh,c.words=iu,c.wrap=o_,c.xor=dh,c.xorBy=ph,c.xorWith=mh,c.zip=fh,c.zipObject=yh,c.zipObjectDeep=hh,c.zipWith=_h,c.entries=tu,c.entriesIn=ru,c.extend=Jc,c.extendWith=Xs,vn(c,c),c.add=fb,c.attempt=nu,c.camelCase=gg,c.capitalize=au,c.ceil=yb,c.clamp=yg,c.clone=c_,c.cloneDeep=d_,c.cloneDeepWith=p_,c.cloneWith=u_,c.conformsTo=m_,c.deburr=su,c.defaultTo=Xg,c.divide=hb,c.endsWith=bg,c.eq=Pt,c.escape=xg,c.escapeRegExp=vg,c.every=qh,c.find=Sh,c.findIndex=Cc,c.findKey=W_,c.findLast=zh,c.findLastIndex=Sc,c.findLastKey=H_,c.floor=_b,c.forEach=Rc,c.forEachRight=Mc,c.forIn=$_,c.forInRight=G_,c.forOwn=X_,c.forOwnRight=Y_,c.get=hn,c.gt=f_,c.gte=y_,c.has=Q_,c.hasIn=_n,c.head=Nc,c.identity=it,c.includes=Rh,c.indexOf=zy,c.inRange=hg,c.invoke=eg,c.isArguments=Sr,c.isArray=Q,c.isArrayBuffer=h_,c.isArrayLike=at,c.isArrayLikeObject=Ne,c.isBoolean=__,c.isBuffer=_r,c.isDate=g_,c.isElement=b_,c.isEmpty=x_,c.isEqual=v_,c.isEqualWith=w_,c.isError=fn,c.isFinite=T_,c.isFunction=tr,c.isInteger=$c,c.isLength=$s,c.isMap=Gc,c.isMatch=I_,c.isMatchWith=D_,c.isNaN=k_,c.isNative=A_,c.isNil=C_,c.isNull=q_,c.isNumber=Xc,c.isObject=ke,c.isObjectLike=Ce,c.isPlainObject=La,c.isRegExp=yn,c.isSafeInteger=S_,c.isSet=Yc,c.isString=Gs,c.isSymbol=mt,c.isTypedArray=Zr,c.isUndefined=z_,c.isWeakMap=N_,c.isWeakSet=O_,c.join=Ry,c.kebabCase=wg,c.last=kt,c.lastIndexOf=My,c.lowerCase=Tg,c.lowerFirst=Ig,c.lt=P_,c.lte=E_,c.max=gb,c.maxBy=bb,c.mean=xb,c.meanBy=vb,c.min=wb,c.minBy=Tb,c.stubArray=Tn,c.stubFalse=In,c.stubObject=lb,c.stubString=cb,c.stubTrue=ub,c.multiply=Ib,c.nth=Ly,c.noConflict=eb,c.noop=wn,c.now=Us,c.pad=Dg,c.padEnd=kg,c.padStart=Ag,c.parseInt=qg,c.random=_g,c.reduce=jh,c.reduceRight=Uh,c.repeat=Cg,c.replace=Sg,c.result=og,c.round=Db,c.runInContext=_,c.sample=Hh,c.size=Xh,c.snakeCase=zg,c.some=Yh,c.sortedIndex=$y,c.sortedIndexBy=Gy,c.sortedIndexOf=Xy,c.sortedLastIndex=Yy,c.sortedLastIndexBy=Vy,c.sortedLastIndexOf=Ky,c.startCase=Og,c.startsWith=Pg,c.subtract=kb,c.sum=Ab,c.sumBy=qb,c.template=Eg,c.times=db,c.toFinite=rr,c.toInteger=Z,c.toLength=Kc,c.toLower=Rg,c.toNumber=At,c.toSafeInteger=R_,c.toString=ye,c.toUpper=Mg,c.trim=Lg,c.trimEnd=Fg,c.trimStart=Bg,c.truncate=jg,c.unescape=Ug,c.uniqueId=mb,c.upperCase=Wg,c.upperFirst=gn,c.each=Rc,c.eachRight=Mc,c.first=Nc,vn(c,function(){var e={};return jt(c,function(t,r){_e.call(c.prototype,r)||(e[r]=t)}),e}(),{chain:!1}),c.VERSION=o,vt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){c[e].placeholder=c}),vt(["drop","take"],function(e,t){le.prototype[e]=function(r){r=r===a?1:Le(Z(r),0);var n=this.__filtered__&&!t?new le(this):this.clone();return n.__filtered__?n.__takeCount__=Ge(r,n.__takeCount__):n.__views__.push({size:Ge(r,V),type:e+(n.__dir__<0?"Right":"")}),n},le.prototype[e+"Right"]=function(r){return this.reverse()[e](r).reverse()}}),vt(["filter","map","takeWhile"],function(e,t){var r=t+1,n=r==Re||r==de;le.prototype[e]=function(l){var d=this.clone();return d.__iteratees__.push({iteratee:W(l,3),type:r}),d.__filtered__=d.__filtered__||n,d}}),vt(["head","last"],function(e,t){var r="take"+(t?"Right":"");le.prototype[e]=function(){return this[r](1).value()[0]}}),vt(["initial","tail"],function(e,t){var r="drop"+(t?"":"Right");le.prototype[e]=function(){return this.__filtered__?new le(this):this[r](1)}}),le.prototype.compact=function(){return this.filter(it)},le.prototype.find=function(e){return this.filter(e).head()},le.prototype.findLast=function(e){return this.reverse().find(e)},le.prototype.invokeMap=re(function(e,t){return typeof e=="function"?new le(this):this.map(function(r){return Na(r,e,t)})}),le.prototype.reject=function(e){return this.filter(Hs(W(e)))},le.prototype.slice=function(e,t){e=Z(e);var r=this;return r.__filtered__&&(e>0||t<0)?new le(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==a&&(t=Z(t),r=t<0?r.dropRight(-t):r.take(t-e)),r)},le.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},le.prototype.toArray=function(){return this.take(V)},jt(le.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),l=c[n?"take"+(t=="last"?"Right":""):t],d=n||/^find/.test(t);l&&(c.prototype[t]=function(){var f=this.__wrapped__,h=n?[1]:arguments,x=f instanceof le,A=h[0],q=x||Q(f),C=function(se){var ce=l.apply(c,ur([se],h));return n&&O?ce[0]:ce};q&&r&&typeof A=="function"&&A.length!=1&&(x=q=!1);var O=this.__chain__,L=!!this.__actions__.length,H=d&&!O,te=x&&!L;if(!d&&q){f=te?f:new le(this);var $=e.apply(f,h);return $.__actions__.push({func:Bs,args:[C],thisArg:a}),new Tt($,O)}return H&&te?e.apply(this,h):($=this.thru(C),H?n?$.value()[0]:$.value():$)})}),vt(["pop","push","shift","sort","splice","unshift"],function(e){var t=ps[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);c.prototype[e]=function(){var l=arguments;if(n&&!this.__chain__){var d=this.value();return t.apply(Q(d)?d:[],l)}return this[r](function(f){return t.apply(Q(f)?f:[],l)})}}),jt(le.prototype,function(e,t){var r=c[t];if(r){var n=r.name+"";_e.call(Yr,n)||(Yr[n]=[]),Yr[n].push({name:t,func:r})}}),Yr[Os(a,me).name]=[{name:"wrapper",func:a}],le.prototype.clone=jm,le.prototype.reverse=Um,le.prototype.value=Wm,c.prototype.at=bh,c.prototype.chain=xh,c.prototype.commit=vh,c.prototype.next=wh,c.prototype.plant=Ih,c.prototype.reverse=Dh,c.prototype.toJSON=c.prototype.valueOf=c.prototype.value=kh,c.prototype.first=c.prototype.head,Da&&(c.prototype[Da]=Th),c},$r=xm();wr?((wr.exports=$r)._=$r,bi._=$r):We._=$r}).call(ta)}(Ha,Ha.exports);var Nd=Ha.exports;const Ye="tccScript",Wn={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|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|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\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|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|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|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|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|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|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|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 qt;(function(s){s[s.None=0]="None",s[s.Indent=1]="Indent",s[s.IndentOutdent=2]="IndentOutdent",s[s.Outdent=3]="Outdent"})(qt||(qt={}));const Hn={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:qt.Indent}},{beforeText:/if\s+.*\s*$/,action:{indentAction:qt.Indent}},{beforeText:/else/,action:{indentAction:qt.Indent}},{beforeText:/for\s+\S+\s*=\s*\S+\s+to\s+\S+(?:\s+by\s+\S+)?\s*$/,action:{indentAction:qt.Indent}},{beforeText:/for\s+(?:\[\S+\s+\S+]|\S+)\s+in\s+\S+\s*$/,action:{indentAction:qt.Indent}},{beforeText:/switch\s+.*\s*$/,action:{indentAction:qt.Indent}},{beforeText:/while\s+.*\s*$/,action:{indentAction:qt.Indent}},{beforeText:/type\s+\w+/,action:{indentAction:qt.Indent}},{beforeText:/^\s*$/,action:{indentAction:qt.Outdent}}]},I={"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 Lt(s,i=1){return s+Math.round(255*Math.min(Math.max(i,0),1)).toString(16).toUpperCase().padStart(2,"0")}const $n={base:"vs",inherit:!0,rules:[{token:"comment",foreground:I["color-cold-gray-400"]},{token:"comment.annotation",fontStyle:"bold"},{token:"text",foreground:I["color-cold-gray-900"]},{token:"string",foreground:I["color-iguana-green-700"]},{token:"constant.numeric",foreground:I["color-banana-yellow-900"]},{token:"constant.language",foreground:I["color-ripe-red-a600"]},{token:"constant.other.color",foreground:I["color-ripe-red-a600"]},{token:"constant.other",foreground:I["color-ripe-red-a600"]},{token:"support.variable",foreground:I["color-ripe-red-a600"]},{token:"support.function",foreground:I["color-tv-blue-a600"]},{token:"support.type",foreground:I["color-minty-green-400"],fontStyle:"bold"},{token:"entity.name.type",foreground:I["color-minty-green-400"],fontStyle:"bold"},{token:"support.method",foreground:I["color-tv-blue-a600"]},{token:"keyword.equals",foreground:I["color-minty-green-400"]},{token:"keyword.operator",foreground:I["color-minty-green-400"]},{token:"keyword.other",foreground:I["color-minty-green-400"]},{token:"keyword",foreground:I["color-minty-green-400"]},{token:"variable.other",foreground:I["color-cold-gray-800"]},{token:"variable.other.property",foreground:I["color-cold-gray-800"]},{token:"paren",foreground:I["color-black"]},{token:"entity.name.function",foreground:I["color-tv-blue-900"]},{token:"entity.name.method",foreground:I["color-tv-blue-900"]},{token:"meta.function-call",foreground:I["color-grapes-purple-600"]},{token:"entity.name.module.name",foreground:I["color-grapes-purple-600"]},{token:"entity.name.module",foreground:I["color-tv-blue-a600"]},{token:"",background:I["color-white"]}],colors:{"editor.foreground":I["color-cold-gray-900"],"editor.background":"#00000000","editorLineNumber.foreground":I["color-cold-gray-400"],"editorLineNumber.activeForeground":I["color-cold-gray-700"],"editorHoverWidget.background":I["color-white"],"editorHoverWidget.statusBarBackground":I["color-cold-gray-150"],"editorHoverWidget.foreground":I["color-cold-gray-900"],"editorWidget.background":I["color-white"],"editorWidget.foreground":I["color-cold-gray-900"],"editorGutter.background":"#00000000","editor.foldBackground":Lt(I["color-cold-gray-200"],.5),"editor.lineHighlightBackground":I["color-tv-blue-50"],"editor.lineHighlightBorder":I["color-tv-blue-50"],"editor.rangeHighlightBackground":I["color-tv-blue-a800"],"editorBracketMatch.background":I["color-cold-gray-150"],"editor.selectionBackground":I["color-tv-blue-100"],"editor.selectionHighlightBackground":I["color-tv-blue-50"],"editor.findMatchBackground":I["color-tan-orange-100"],"editor.findMatchHighlightBackground":I["color-tan-orange-100"],"editor.findMatchBorder":I["color-tan-orange-500"],"list.foreground":I["color-cold-gray-900"],"list.hoverForeground":I["color-cold-gray-900"],"list.activeSelectionBackground":I["color-tv-blue-500"],"list.hoverBackground":I["color-tv-blue-50"],"list.focusHighlightForeground":I["color-tv-blue-100"],"list.inactiveSelectionBackground":I["color-tv-blue-500"],"keybindingLabel.background":I["color-white"],"keybindingLabel.foreground":I["color-cold-gray-900"],"keybindingLabel.border":I["color-cold-gray-150"],"input.foreground":I["color-cold-gray-900"],"textLink.foreground":I["color-tv-blue-500"],"textLink.activeForeground":I["color-tv-blue-600"],"peekViewEditor.matchHighlightBackground":I["color-tan-orange-100"],"peekViewResult.lineForeground":I["color-cold-gray-900"],"editorMarkerNavigationWarning.background":I["color-banana-yellow-800"],"inputValidation.warningBackground":I["color-banana-yellow-800"],"diffEditor.insertedTextBackground":Lt(I["color-forest-green-500"],.3),"diffEditor.insertedLineBackground":Lt(I["color-forest-green-500"],.15),"diffEditor.removedTextBackground":Lt(I["color-ripe-red-500"],.3),"diffEditor.removedLineBackground":Lt(I["color-ripe-red-500"],.15),"editorInlayHint.background":I["color-cold-gray-150"],"editorInlayHint.foreground":I["color-cold-gray-550"],"editorError.foreground":I["color-ripe-red-500"],"editorWarning.foreground":I["color-tan-orange-500"]}},Gn={base:"vs-dark",inherit:!0,rules:[{token:"comment",foreground:I["color-cold-gray-500"]},{token:"comment.annotation",fontStyle:"bold"},{token:"text",foreground:I["color-white"]},{token:"string",foreground:I["color-iguana-green-700"]},{token:"constant.numeric",foreground:I["color-banana-yellow-900"]},{token:"constant.language",foreground:I["color-ripe-red-300"]},{token:"constant.other.color",foreground:I["color-ripe-red-300"]},{token:"constant.other",foreground:I["color-ripe-red-300"]},{token:"support.variable",foreground:I["color-ripe-red-300"]},{token:"support.function",foreground:I["color-tv-blue-300"]},{token:"support.method",foreground:I["color-tv-blue-300"]},{token:"support.type",foreground:I["color-minty-green-300"],fontStyle:"bold"},{token:"entity.name.type",foreground:I["color-minty-green-300"],fontStyle:"bold"},{token:"keyword.equals",foreground:I["color-minty-green-300"]},{token:"keyword.operator",foreground:I["color-minty-green-300"]},{token:"keyword.other",foreground:I["color-minty-green-300"]},{token:"keyword",foreground:I["color-minty-green-300"]},{token:"variable.other",foreground:I["color-cold-gray-200"]},{token:"variable.other.property",foreground:I["color-cold-gray-200"]},{token:"paren",foreground:I["color-white"]},{token:"entity.name.function",foreground:I["color-tv-blue-400"]},{token:"entity.name.method",foreground:I["color-tv-blue-400"]},{token:"meta.function-call",foreground:I["color-grapes-purple-300"]},{token:"entity.name.module.name",foreground:I["color-grapes-purple-300"]},{token:"entity.name.module",foreground:I["color-tv-blue-300"]},{token:"",background:I["color-cold-gray-900"]}],colors:{"editor.foreground":I["color-white"],"editor.background":I["color-cold-gray-900"],"editorLineNumber.foreground":I["color-cold-gray-500"],"editorLineNumber.activeForeground":I["color-cold-gray-300"],"editorWidget.background":I["color-cold-gray-850"],"editorHoverWidget.background":I["color-cold-gray-850"],"editorHoverWidget.foreground":I["color-cold-gray-300"],"editorHoverWidget.statusBarBackground":I["color-cold-gray-900"],"editorWidget.foreground":I["color-cold-gray-300"],"editorGutter.background":I["color-cold-gray-900"],"editor.foldBackground":Lt(I["color-cold-gray-700"],.5),"editor.lineHighlightBackground":I["color-tv-blue-a900"],"editor.lineHighlightBorder":I["color-tv-blue-a900"],"editor.rangeHighlightBackground":I["color-tv-blue-a800"],"editorBracketMatch.background":I["color-cold-gray-750"],"editor.selectionBackground":I["color-tv-blue-a800"],"editor.selectionHighlightBackground":I["color-cold-gray-800"],"list.foreground":I["color-cold-gray-350"],"list.hoverForeground":I["color-cold-gray-350"],"list.activeSelectionBackground":I["color-tv-blue-500"],"list.hoverBackground":I["color-tv-blue-900"],"list.focusHighlightForeground":I["color-tv-blue-300"],"list.inactiveSelectionBackground":I["color-tv-blue-500"],"keybindingLabel.background":I["color-cold-gray-800"],"keybindingLabel.foreground":I["color-cold-gray-300"],"keybindingLabel.border":I["color-cold-gray-700"],"input.foreground":I["color-cold-gray-350"],"textLink.foreground":I["color-tv-blue-500"],"textLink.activeForeground":I["color-tv-blue-600"],"peekViewEditor.matchHighlightBackground":I["color-tan-orange-a800"],"peekViewResult.lineForeground":I["color-cold-gray-350"],"diffEditor.insertedTextBackground":Lt(I["color-iguana-green-a700"],.3),"diffEditor.insertedLineBackground":Lt(I["color-iguana-green-a700"],.15),"diffEditor.removedTextBackground":Lt(I["color-ripe-red-a400"],.3),"diffEditor.removedLineBackground":Lt(I["color-ripe-red-a400"],.15),"editorInlayHint.background":I["color-cold-gray-800"],"editorInlayHint.foreground":I["color-cold-gray-400"],"editorError.foreground":I["color-ripe-red-500"],"editorWarning.foreground":I["color-tan-orange-700"]}},Od=/(\\(?:[\\'"]))|(\\$)|("|$)|($)/g,Pd=/(\\(?:[\\'"]))|(\\$)|('|$)|($)/g,Xn={"color.aqua":"#00BCD4","color.black":"#363A45","color.blue":"#2196F3","color.fuchsia":"#E040FB","color.gray":"#787B86","color.green":"#4CAF50","color.lime":"#00E676","color.maroon":"#880E4F","color.navy":"#311B92","color.olive":"#808000","color.orange":"#FF9800","color.purple":"#9C27B0","color.red":"#FF5252","color.silver":"#B2B5BE","color.teal":"#00897B","color.white":"#FFFFFF","color.yellow":"#FFEB3B"};class Ed{constructor(i){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:(a=[],o)=>{const u=new Map,p=o.indexOf("(");for(let m=p+1,g=p;m<o.length;m++)o[m]!==","&&o[m]!==")"||(g++,u.set(o.slice(g,m),g),g=m+1);return a.map(({name:m,displayType:g,desc:v})=>{const b=[],w=u.get(m),k=w+m.length;return b.push(this._formatter.paragraph(this._formatter.bold(m),this._formatter.italic(g||""))),v&&b.push(Array.isArray(v)?v.join(this._formatter.lineBreak):v),{label:[w,k],documentation:{value:b.join(this._formatter.lineBreak)}}})}}),this._formatter=he,this._isMac=/(Mac|iPhone|iPod|iPad)/i.test(i)}getSignatureHelpValues(i,a){const o=this._getFuncItems(i);if(!(o!=null&&o.length))return null;const u=this._getSequentialSignatures(i,o),p=this._getActiveIndex(o,a);return{signatures:u,...p}}_getActiveIndex(i,a=[]){let o=0,u=-1;a.some(m=>!!m)||(u=a.length-1);const p=a.pop();if(p)for(const[m,g]of i.entries()){const{args:v}=g;if(v&&v.length){const b=v.findIndex(w=>w.name===p);if(b!=-1){u=b,o=m;break}}}return{activeParameter:u,activeSignature:o}}_getFuncItems(i){return Rt.functions.get(i)||Mt.userFuncs.get(i)||Mt.methodFuncs.get(i)}_getSequentialSignatures(i,a){return a.map(o=>{const u=this._getSignatureLabel(i,o);return{label:u,documentation:this._getFormattedSignatureDocumentation(o),parameters:this._getSignatureParams(o.args,u)}})}_getSignatureLabel(i,a,o=!1){const u=[i];return o&&u.push("<type>"),a.args&&(u.push("("),u.push(a.args.map(({name:p})=>p).join(", ")),u.push(")")),u.join("")}_getFormattedSignatureDocumentation(i){const{desc:a}=i,o=[];a&&o.push(Array.isArray(a)?a.join(this._formatter.lineBreak):a);const u=`${this._formatter.code(this._isMac?"⌘":"Ctrl")} +
132
132
  ${this._formatter.code("Shift")} +
133
133
  ${this._formatter.code("Space")}`;return o.push(this._formatter.lineBreak),o.push(this._formatter.italic(`${u} ${Ie.toTriggerParameterHints}`)),{value:this._formatter.paragraph(...o)}}}const Rd=new Ed(window.navigator.userAgent);class Md{constructor(){Object.defineProperty(this,"_colors",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._colors=Xn}getDocumentColors(i){const a=[];return i.forEach(o=>{const{range:u}=o;let{matches:p}=o;p=p||[];const m=p[0]||"";let g=null;this._isHexToken(m)?g=this._hexToColor(m):this._isRgbColor(m)?g=this._rgbToColor(m):this._colors[m]?g=this._hexToColor(this._colors[m]):this._isColorExpression(m)&&p[1]&&p[6]&&(g=this._extractNewExpression(p[1],Number(p[6]))),g&&a.push({color:g,range:u})}),a}get _defultColorsRegStr(){return Object.keys(Xn).reduce((i,a)=>`${i}|${a}`,"")}get colorMatchesRegStr(){const i=`#[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*(${i})\\s*,\\s*(\\d+)\\s*\\)|${i}`}getDocumentColorPresentations(i,{color:a,range:o}){const u=i.getValueInRange(o);if(this._isHexToken(u)||this._colors[u])return[{label:this._colorRgbRepresentation(a)},{label:this._colorHexRepresentation(a)}];if(this._isColorExpression(u)||this._isRgbColor(u)){const p=this._isColorExpression(u)?this._colorNewRepresentation(a):this._colorRgbRepresentation(a);if(!p)return[];const m=this._colorHexRepresentation(a);return[{label:p,textEdit:{text:p,range:o}},{label:m,textEdit:{text:m,range:o}}]}return null}_hexFromNumber(i){const a=this._denormalize(i).toString(16);return a.length===1?`0${a}`:a}_normalize(i){return i/255}_denormalize(i){return Math.round(255*i)}_normalizeAlpha(i){return(100-i)/100}_denormalizeAlpha(i){return 100-Math.round(100*i)}_extractNewExpression(i,a){let o=null;return this._isHexToken(i)?o=this._hexToColor(i):this._isRgbColor(i)?o=this._rgbToColor(i):this._colors[i]&&(o=this._hexToColor(this._colors[i])),o&&!Number.isNaN(a)?{...o,alpha:this._normalizeAlpha(a)}:null}_colorHexRepresentation(i){const a=this._hexFromNumber(i.red),o=this._hexFromNumber(i.green),u=this._hexFromNumber(i.blue),p=this._hexFromNumber(i.alpha);return`#${a}${o}${u}${i.alpha===1?"":p}`}_colorRgbRepresentation(i){const a=this._denormalize(i.red),o=this._denormalize(i.green),u=this._denormalize(i.blue),p=this._denormalizeAlpha(i.alpha),m=[a,o,u];return p>0&&m.push(p),`color.rgb(${m.join(", ")})`}_colorNewRepresentation(i){const a={...i,alpha:1};return`color.new(${this._colorHexRepresentation(a)}, ${this._denormalizeAlpha(i.alpha)})`}_hexToColor(i){const a=(i=this._isHexToken(i)?i.slice(1):i).length===3||i.length===4,o=a?`${i.slice(0,1)}${i.slice(0,1)}`:i.slice(0,2),u=a?`${i.slice(1,2)}${i.slice(1,2)}`:i.slice(2,4),p=a?`${i.slice(2,3)}${i.slice(2,3)}`:i.slice(4,6),m=(a?`${i.slice(3,4)}${i.slice(3,4)}`:i.slice(6,8))||"ff";return{red:this._normalize(parseInt(o,16)),green:this._normalize(parseInt(u,16)),blue:this._normalize(parseInt(p,16)),alpha:this._normalize(parseInt(m,16))}}_rgbToColor(i){const a=i.replace(/[^\d,]/g,"").split(","),o=this._normalize(Number(a[0])),u=this._normalize(Number(a[1])),p=this._normalize(Number(a[2])),m=this._normalizeAlpha(Number(a[3]))||1;return isNaN(o)||isNaN(u)||isNaN(p)?null:{red:o,green:u,blue:p,alpha:m}}_isHexToken(i){return i.charAt(0)==="#"}_isRgbColor(i){return i.startsWith("color.rgb")}_isColorExpression(i){return i.startsWith("color.new")}}const ei=new Md;function Ld(s,i){var z;const a={startLineNumber:i.lineNumber,startColumn:1,endLineNumber:i.lineNumber,endColumn:i.column},o=s.getValueInRange(a),u=o.match(/([\w.]+)$/)||[],p=(z=u[0])==null?void 0:z.match(/.*[^\w.]+([\w.]+)(?=\.)|([\w.]+)(?=\.)/),m=p?p[1]?p[1]:p[2]?p[2]:void 0:void 0,g=s.getWordUntilPosition(i),v=la.parseCurrentInputFunc(o),b={startLineNumber:i.lineNumber,endLineNumber:i.lineNumber,startColumn:g.startColumn,endColumn:g.endColumn},w=s.getValueInRange({...b,startColumn:g.endColumn,endColumn:g.endColumn+1});Mt.nextIsBracket=w==="(";let k=Yn(Mt.getSuggestions(m)||[],b);if(u[0]==="."&&(k=[]),v&&!m&&!/=\s*\w+$/.test(o)){const E=Yn(Mt.getArgSuggestions(v.funcName)||[],b);k=k.concat(E)}return{suggestions:k||[]}}function Fd(s){if(s.kind!==1)return s;const{originInsertText:i}=s;return Mt.nextIsBracket?s.insertText=i:s.insertText=i+Mt.bracketsPostfix,s}function Bd(s,i){const a=la.parseLineContentFuncVar(i.column,i.lineNumber,s,i);if(a&&a.docValue.length){const o=kd(a.docValue,a.index,a.isBuildIn);if(o)return{contents:[{value:o}]}}return{contents:[]}}function jd(s,i){var k,z;const a={startLineNumber:i.lineNumber,endLineNumber:i.lineNumber,startColumn:1,endColumn:i.column},o=s.getValueInRange(a),u=s.findMatches(String(Od),a,!0,!1,null,!0),p=s.findMatches(String(Pd),a,!0,!1,null,!0),m=(k=u.pop())==null?void 0:k.matches,g=(z=p.pop())==null?void 0:z.matches;let v=!1;u.length%2===0?m&&m[0]==='"'&&(v=!0):m&&!m[0]&&(v=!0);let b=!1;p.length%2===0?g&&g[0]==="'"&&(b=!0):g&&!g[0]&&(b=!0);const w=la.parseCurrentInputFuncAndArg(o,b,v);if(w){const{funcName:E,args:P}=w,j=Rd.getSignatureHelpValues(E,P);if(j)return{value:j,dispose:()=>{console.log("dispose")}}}return null}function Ud(s){let i=s.findMatches(ei.colorMatchesRegStr,!0,!0,!1,null,!0);return i=i.filter(o=>{const u=s.getValueInRange({...o.range,startColumn:0});return u.indexOf("//")===-1||u.indexOf("//")>o.range.endColumn}),ei.getDocumentColors(i)}function Wd(s,i){return ei.getDocumentColorPresentations(s,i)||[]}function Hd(s,i,a){const o=s.getModel(),u=la.parseLineContentFuncVar(a.startColumn+1,a.startLineNumber,o);if(!u||u.isBuildIn||!u.docValue||!u.docValue[0].pos)return!0;const{lineNumber:p,column:m}=u.docValue[0].pos,g={startLineNumber:p,endLineNumber:p,startColumn:m,endColumn:m};return s.revealRangeInCenterIfOutsideViewport(g),s.setSelection(g),!0}function $d(s,i){return{uri:s.uri,range:{startLineNumber:i.lineNumber,endLineNumber:i.lineNumber,startColumn:i.column-1,endColumn:i.column-1}}}function Yn(s,i){return s.map(a=>(a.range=i,a))}var ca={},ua=cu;if(process.env.NODE_ENV==="production")ca.createRoot=ua.createRoot,ca.hydrateRoot=ua.hydrateRoot;else{var $a=ua.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;ca.createRoot=function(s,i){$a.usingClientEntryPoint=!0;try{return ua.createRoot(s,i)}finally{$a.usingClientEntryPoint=!1}},ca.hydrateRoot=function(s,i,a){$a.usingClientEntryPoint=!0;try{return ua.hydrateRoot(s,i,a)}finally{$a.usingClientEntryPoint=!1}}}var $e;(function(s){s.added="added",s.removed="removed",s.modified="modified"})($e||($e={}));const Gd=(s,i)=>{const{close:a,retracement:o}=s,[u,p]=M.useState("modified");return M.useImperativeHandle(i,()=>({updateType(m){p(m)}})),nt.jsxs("div",{className:`content-popup content-${u}-popup`,children:[nt.jsx("div",{className:`triangle-popup triangle-${u}-popup`}),nt.jsxs("div",{className:`header-popup header-${u}-popup`,children:[nt.jsx("div",{className:"title-popup",children:"Local working changes"}),nt.jsx("div",{className:"actions-popup",children:nt.jsx("div",{onClick:a,"data-role":"button",className:"button-popup","data-name":"button-close-diff",children:nt.jsx("span",{className:"icon-popup",role:"img",children:nt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",width:"12",height:"12",children:nt.jsx("path",{stroke:"currentColor",strokeWidth:"1.2",d:"m1.5 1.5 9 9m0-9-9 9"})})})})})]}),nt.jsx("div",{id:"diffEditorContainer",style:{height:"100%"}})]})},Xd=M.forwardRef(Gd);class Yd{constructor(i,a,o=!0){Object.defineProperty(this,"_domNode",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_top",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_content",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._id=i,this._domNode=document.createElement("div"),this._domNode.style.display="none",this._domNode.style.width=o?"calc(100% - 134px)":"calc(100% - 14px)",this._domNode.style.height="200px",a==null||a.onDidScrollChange(this.scrollChangeHandler.bind(this)),ca.createRoot(this._domNode).render(nt.jsx(Xd,{ref:u=>this._content=u,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(i,a,o){var u;this._top=a,(u=this._content)==null||u.updateType(o),this._domNode.style.top=`${i}px`,this._domNode.style.display="block"}hide(){this._domNode.style.display="none"}scrollChangeHandler(i){const a=i.scrollTop;this._domNode.style.top=`${this._top-a}px`}}function ir(){}ir.prototype={diff:function(i,a){var o,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p=u.callback;typeof u=="function"&&(p=u,u={}),this.options=u;var m=this;function g(B){return p?(setTimeout(function(){p(void 0,B)},0),!0):B}i=this.castInput(i),a=this.castInput(a),i=this.removeEmpty(this.tokenize(i)),a=this.removeEmpty(this.tokenize(a));var v=a.length,b=i.length,w=1,k=v+b;u.maxEditLength&&(k=Math.min(k,u.maxEditLength));var z=(o=u.timeout)!==null&&o!==void 0?o:1/0,E=Date.now()+z,P=[{oldPos:-1,lastComponent:void 0}],j=this.extractCommon(P[0],a,i,0);if(P[0].oldPos+1>=b&&j+1>=v)return g([{value:this.join(a),count:a.length}]);var ee=-1/0,me=1/0;function Y(){for(var B=Math.max(ee,-w);B<=Math.min(me,w);B+=2){var G=void 0,ie=P[B-1],J=P[B+1];ie&&(P[B-1]=void 0);var Pe=!1;if(J){var be=J.oldPos-B;Pe=J&&0<=be&&be<v}var ne=ie&&ie.oldPos+1<b;if(!Pe&&!ne){P[B]=void 0;continue}if(!ne||Pe&&ie.oldPos+1<J.oldPos?G=m.addToPath(J,!0,void 0,0):G=m.addToPath(ie,void 0,!0,1),j=m.extractCommon(G,a,i,B),G.oldPos+1>=b&&j+1>=v)return g(Vd(m,G.lastComponent,a,i,m.useLongestToken));P[B]=G,G.oldPos+1>=b&&(me=Math.min(me,B-1)),j+1>=v&&(ee=Math.max(ee,B+1))}w++}if(p)(function B(){setTimeout(function(){if(w>k||Date.now()>E)return p();Y()||B()},0)})();else for(;w<=k&&Date.now()<=E;){var F=Y();if(F)return F}},addToPath:function(i,a,o,u){var p=i.lastComponent;return p&&p.added===a&&p.removed===o?{oldPos:i.oldPos+u,lastComponent:{count:p.count+1,added:a,removed:o,previousComponent:p.previousComponent}}:{oldPos:i.oldPos+u,lastComponent:{count:1,added:a,removed:o,previousComponent:p}}},extractCommon:function(i,a,o,u){for(var p=a.length,m=o.length,g=i.oldPos,v=g-u,b=0;v+1<p&&g+1<m&&this.equals(a[v+1],o[g+1]);)v++,g++,b++;return b&&(i.lastComponent={count:b,previousComponent:i.lastComponent}),i.oldPos=g,v},equals:function(i,a){return this.options.comparator?this.options.comparator(i,a):i===a||this.options.ignoreCase&&i.toLowerCase()===a.toLowerCase()},removeEmpty:function(i){for(var a=[],o=0;o<i.length;o++)i[o]&&a.push(i[o]);return a},castInput:function(i){return i},tokenize:function(i){return i.split("")},join:function(i){return i.join("")}};function Vd(s,i,a,o,u){for(var p=[],m;i;)p.push(i),m=i.previousComponent,delete i.previousComponent,i=m;p.reverse();for(var g=0,v=p.length,b=0,w=0;g<v;g++){var k=p[g];if(k.removed){if(k.value=s.join(o.slice(w,w+k.count)),w+=k.count,g&&p[g-1].added){var E=p[g-1];p[g-1]=p[g],p[g]=E}}else{if(!k.added&&u){var z=a.slice(b,b+k.count);z=z.map(function(j,ee){var me=o[w+ee];return me.length>j.length?me:j}),k.value=s.join(z)}else k.value=s.join(a.slice(b,b+k.count));b+=k.count,k.added||(w+=k.count)}}var P=p[v-1];return v>1&&typeof P.value=="string"&&(P.added||P.removed)&&s.equals("",P.value)&&(p[v-2].value+=P.value,p.pop()),p}var Vn=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Kn=/\S/,Qn=new ir;Qn.equals=function(s,i){return this.options.ignoreCase&&(s=s.toLowerCase(),i=i.toLowerCase()),s===i||this.options.ignoreWhitespace&&!Kn.test(s)&&!Kn.test(i)},Qn.tokenize=function(s){for(var i=s.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),a=0;a<i.length-1;a++)!i[a+1]&&i[a+2]&&Vn.test(i[a])&&Vn.test(i[a+2])&&(i[a]+=i[a+2],i.splice(a+1,2),a--);return i};var ti=new ir;ti.tokenize=function(s){this.options.stripTrailingCr&&(s=s.replace(/\r\n/g,`
134
- `));var i=[],a=s.split(/(\n|\r\n)/);a[a.length-1]||a.pop();for(var o=0;o<a.length;o++){var u=a[o];o%2&&!this.options.newlineIsToken?i[i.length-1]+=u:(this.options.ignoreWhitespace&&(u=u.trim()),i.push(u))}return i};function Kd(s,i,a){return ti.diff(s,i,a)}var Qd=new ir;Qd.tokenize=function(s){return s.split(/(\S.+?[.!?])(?=\s+|$)/)};var Jd=new ir;Jd.tokenize=function(s){return s.split(/([{}:;,]|\s+)/)};function Ga(s){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ga=function(i){return typeof i}:Ga=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Ga(s)}var Zd=Object.prototype.toString,da=new ir;da.useLongestToken=!0,da.tokenize=ti.tokenize,da.castInput=function(s){var i=this.options,a=i.undefinedReplacement,o=i.stringifyReplacer,u=o===void 0?function(p,m){return typeof m>"u"?a:m}:o;return typeof s=="string"?s:JSON.stringify(ri(s,null,null,u),u," ")},da.equals=function(s,i){return ir.prototype.equals.call(da,s.replace(/,([\r\n])/g,"$1"),i.replace(/,([\r\n])/g,"$1"))};function ri(s,i,a,o,u){i=i||[],a=a||[],o&&(s=o(u,s));var p;for(p=0;p<i.length;p+=1)if(i[p]===s)return a[p];var m;if(Zd.call(s)==="[object Array]"){for(i.push(s),m=new Array(s.length),a.push(m),p=0;p<s.length;p+=1)m[p]=ri(s[p],i,a,o,u);return i.pop(),a.pop(),m}if(s&&s.toJSON&&(s=s.toJSON()),Ga(s)==="object"&&s!==null){i.push(s),m={},a.push(m);var g=[],v;for(v in s)s.hasOwnProperty(v)&&g.push(v);for(g.sort(),p=0;p<g.length;p+=1)v=g[p],m[v]=ri(s[v],i,a,o,v);i.pop(),a.pop()}else m=s;return m}var ai=new ir;ai.tokenize=function(s){return s.slice()},ai.join=ai.removeEmpty=function(s){return s};class ep{constructor(i,a,o){Object.defineProperty(this,"_editor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_monaco",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_originalModel",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_oldDecorations",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_diffEditor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_diffPopupWidget",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_didChangeListener",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_onMouseDownListener",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._editor=i,this._monaco=a,this._originalModel=this._monaco.editor.createModel("",Ye),this._oldDecorations=[],this._init(),this._eventListening(o)}_init(){var i;this._changeEvent(),this._didChangeListener=(i=this._editor.getModel())==null?void 0:i.onDidChangeContent(()=>this._changeEvent())}update(i){var a,o;this._originalModel=this._monaco.editor.createModel(i,Ye),i!==((a=this._editor.getModel())==null?void 0:a.getValue())&&this._changeEvent(),(o=this._editor.getModel())==null||o.deltaDecorations(this._oldDecorations,[]),this._oldDecorations=[]}dispose(){var i,a,o,u;this._diffPopupWidget&&(this._diffPopupWidget.hide(),this._editor.removeOverlayWidget(this._diffPopupWidget)),(i=this._didChangeListener)==null||i.dispose(),(a=this._onMouseDownListener)==null||a.dispose(),(o=this._editor.getModel())==null||o.deltaDecorations(this._oldDecorations,[]),this._oldDecorations=[],(u=this._diffEditor)==null||u.dispose(),this._diffEditor=void 0}_changesHandle(i){let a=0,o;const u=[];let p=0;for(const m of i){const{added:g,removed:v,count:b=1,value:w}=m;g?o&&o.removed?(a=this._changeHandle(u,a,p,b,$e.modified),p=0,o=void 0):(o&&o.added&&(a=this._changeHandle(u,a,p,o.count||1,$e.added),p=0),o=m):v?o&&o.added?(a=this._changeHandle(u,a,p,o.count||1,$e.modified),p=0,o=void 0):(o&&o.removed&&this._addDecorationList(u,a,$e.removed),o=m):/^\n+$/.test(w)?o&&(o.added||o.removed)?p=b:a+=b:(o&&o.added?(a=this._changeHandle(u,a,p,o.count||1,$e.added),p=0,o=void 0):o&&o.removed&&(this._addDecorationList(u,a,$e.removed),o=void 0),a+=b)}return o&&o.added?a=this._changeHandle(u,a,p,o.count||1,$e.added):o&&o.removed&&this._addDecorationList(u,a,$e.removed),u}_changeHandle(i,a,o,u,p){for(let m=1;m<=u;m++)this._addDecorationList(i,a+m,p);return a+=u+o,a}_addDecorationList(i,a,o){i.push({range:new this._monaco.Range(a,1,a,1),options:{isWholeLine:!0,linesDecorationsClassName:`line-${o} line-decoration_${o}`}})}_changeEvent(){var u,p;const i=Kd(this._originalModel.getValue(),((u=this._editor.getModel())==null?void 0:u.getValue())||""),a=this._changesHandle(i),o=((p=this._editor.getModel())==null?void 0:p.deltaDecorations(this._oldDecorations,a))||[];this._oldDecorations=o}_eventListening(i){const a=new Yd("diff.popup.widget",this._editor);this._editor.addOverlayWidget(a),this._onMouseDownListener=this._editor.onMouseDown(o=>this._onMouseDownHandle(o,i)),this._diffPopupWidget=a}_onMouseDownHandle(i,a){var g,v,b,w,k,z;const o=(g=i.target.element)==null?void 0:g.classList,u=o==null?void 0:o.contains(`line-${$e.added}`),p=o==null?void 0:o.contains(`line-${$e.modified}`),m=o==null?void 0:o.contains(`line-${$e.removed}`);if(u||p||m){const E=((b=(v=i==null?void 0:i.target)==null?void 0:v.position)==null?void 0:b.lineNumber)||0,P=((w=this._editor)==null?void 0:w.getTopForLineNumber(E+1))||0,j=((k=this._editor)==null?void 0:k.getScrollTop())||0,ee=u?$e.added:p?$e.modified:$e.removed;(z=this._diffPopupWidget)==null||z.show(P-j,P,ee),this._diffEditor||(this._diffEditor=this._createDiffEditor(a)),this._diffEditor.setModel({original:this._originalModel,modified:this._editor.getModel()}),this._diffEditor.revealLineInCenter(E+1)}}_createDiffEditor(i="vs-dark"){return this._monaco.editor.createDiffEditor(document.getElementById("diffEditorContainer"),{theme:i,renderSideBySide:!1,quickSuggestions:!1,suggestOnTriggerCharacters:!1,hover:{enabled:!1},parameterHints:{enabled:!1}})}}class tp{constructor(i,a,o){Object.defineProperty(this,"_editor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_monaco",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_decorations",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_changPositionListener",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_onActionTrigger",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._editor=i,this._monaco=a,this._onActionTrigger=o,this._init()}updateActionTrigger(i){this._onActionTrigger=i}setModelMarkers(i){this._monaco.editor.setModelMarkers(this._editor.getModel(),"owner",i)}addDiffDecorations(){this._decorations||(this._decorations=new ep(this._editor,this._monaco))}removeDiffDecorations(){var i;(i=this._decorations)==null||i.dispose(),this._decorations=void 0}setValue(i){this._editor.setValue(i)}setPosition(i){var a,o,u;(a=this._editor)==null||a.setPosition(i),(o=this._editor)==null||o.revealPositionInCenter(i),(u=this._editor)==null||u.focus()}setOriginalScript(i){var a;(a=this._decorations)==null||a.update(i)}getEditorLayout(){var o;const i=this._editor.getContentHeight(),a=(o=this._editor.getModel())==null?void 0:o.getLineCount();return{contentHeight:i,lineCount:a}}setEditorLayout(i){var a,o;(o=this._editor)==null||o.layout({height:i,width:(a=this._editor)==null?void 0:a.getContainerDomNode().clientWidth})}_init(){this._register(),this._setOptions(),this._addCommands(),this._addActions(),this._setCursorPosition()}_setCursorPosition(){const i=localStorage.getItem(Zs);this._editor.setPosition(i?JSON.parse(i):{lineNumber:1,column:1}),this._editor.focus()}_register(){this._monaco.languages.register({id:Ye}),this._monaco.languages.registerCompletionItemProvider(Ye,{triggerCharacters:["."],provideCompletionItems:Ld,resolveCompletionItem:Fd}),this._monaco.languages.registerHoverProvider(Ye,{provideHover:Bd}),this._monaco.languages.registerSignatureHelpProvider(Ye,{signatureHelpTriggerCharacters:["(",","],provideSignatureHelp:jd}),this._monaco.languages.registerColorProvider(Ye,{provideColorPresentations:Wd,provideDocumentColors:Ud}),this._monaco.editor.registerEditorOpener({openCodeEditor:Hd}),this._monaco.languages.registerDefinitionProvider(Ye,{provideDefinition:$d})}_setOptions(){this._monaco.editor.defineTheme("vs-dark",Gn),this._monaco.editor.defineTheme("vs",$n),this._monaco.languages.setMonarchTokensProvider(Ye,Wn),this._monaco.languages.setLanguageConfiguration(Ye,Hn)}_addCommands(){this._monaco.editor.addCommand({id:"tcc.editor.function",run:(i,a)=>{var o;if(Mt.nextIsBracket){const u=this._editor.getPosition();u&&this._editor.setPosition(Object.assign(u,{column:u.column+1}))}(o=this._editor.getAction(a))==null||o.run()}})}_addActions(){this._editor.addAction({id:"tcc-save-script",label:"保存脚本",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.KeyS],contextMenuGroupId:"9_modification",contextMenuOrder:1,run:()=>{this._onActionTrigger&&this._onActionTrigger(Ae.Actions.Save)}}),this._editor.addAction({id:"tcc-find-replace-line",label:"寻找/替换",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.KeyF],contextMenuGroupId:"9_cutcopypaste",contextMenuOrder:5,run:()=>{this.openFind(),this._onActionTrigger&&this._onActionTrigger(Ae.Actions.Find)}}),this._editor.addAction({id:"tcc-trigger-console-script",label:"切换控制台",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.Backquote],contextMenuGroupId:"9_modification-c",contextMenuOrder:2,run:()=>{this._onActionTrigger&&this._onActionTrigger(Ae.Actions.TriggerConsole)}})}openFind(){this._editor.focus(),this._editor.trigger("click","actions.find",null)}gotoLine(){this._editor.focus(),this._editor.trigger("click","editor.action.gotoLine",null)}onChangeCursorPosition(i){this._changPositionListener&&this._changPositionListener.dispose();const a=localStorage.getItem(Zs);i&&i(a?JSON.parse(a):{lineNumber:1,column:1}),this._changPositionListener=this._editor.onDidChangeCursorPosition(o=>{localStorage.setItem(Zs,JSON.stringify(o.position)),i&&i(o.position)})}}/**
134
+ `));var i=[],a=s.split(/(\n|\r\n)/);a[a.length-1]||a.pop();for(var o=0;o<a.length;o++){var u=a[o];o%2&&!this.options.newlineIsToken?i[i.length-1]+=u:(this.options.ignoreWhitespace&&(u=u.trim()),i.push(u))}return i};function Kd(s,i,a){return ti.diff(s,i,a)}var Qd=new ir;Qd.tokenize=function(s){return s.split(/(\S.+?[.!?])(?=\s+|$)/)};var Jd=new ir;Jd.tokenize=function(s){return s.split(/([{}:;,]|\s+)/)};function Ga(s){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ga=function(i){return typeof i}:Ga=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Ga(s)}var Zd=Object.prototype.toString,da=new ir;da.useLongestToken=!0,da.tokenize=ti.tokenize,da.castInput=function(s){var i=this.options,a=i.undefinedReplacement,o=i.stringifyReplacer,u=o===void 0?function(p,m){return typeof m>"u"?a:m}:o;return typeof s=="string"?s:JSON.stringify(ri(s,null,null,u),u," ")},da.equals=function(s,i){return ir.prototype.equals.call(da,s.replace(/,([\r\n])/g,"$1"),i.replace(/,([\r\n])/g,"$1"))};function ri(s,i,a,o,u){i=i||[],a=a||[],o&&(s=o(u,s));var p;for(p=0;p<i.length;p+=1)if(i[p]===s)return a[p];var m;if(Zd.call(s)==="[object Array]"){for(i.push(s),m=new Array(s.length),a.push(m),p=0;p<s.length;p+=1)m[p]=ri(s[p],i,a,o,u);return i.pop(),a.pop(),m}if(s&&s.toJSON&&(s=s.toJSON()),Ga(s)==="object"&&s!==null){i.push(s),m={},a.push(m);var g=[],v;for(v in s)s.hasOwnProperty(v)&&g.push(v);for(g.sort(),p=0;p<g.length;p+=1)v=g[p],m[v]=ri(s[v],i,a,o,v);i.pop(),a.pop()}else m=s;return m}var ai=new ir;ai.tokenize=function(s){return s.slice()},ai.join=ai.removeEmpty=function(s){return s};class ep{constructor(i,a,o){Object.defineProperty(this,"_editor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_monaco",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_originalModel",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_oldDecorations",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_diffEditor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_diffPopupWidget",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_didChangeListener",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_onMouseDownListener",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._editor=i,this._monaco=a,this._originalModel=this._monaco.editor.createModel("",Ye),this._oldDecorations=[],this._init(),this._eventListening(o)}_init(){var i;this._changeEvent(),this._didChangeListener=(i=this._editor.getModel())==null?void 0:i.onDidChangeContent(()=>this._changeEvent())}update(i){var a,o;if(this._originalModel=this._monaco.editor.createModel(i,Ye),i!==((a=this._editor.getModel())==null?void 0:a.getValue())){this._changeEvent();return}(o=this._editor.getModel())==null||o.deltaDecorations(this._oldDecorations,[]),this._oldDecorations=[]}dispose(){var i,a,o,u;this._diffPopupWidget&&(this._diffPopupWidget.hide(),this._editor.removeOverlayWidget(this._diffPopupWidget)),(i=this._didChangeListener)==null||i.dispose(),(a=this._onMouseDownListener)==null||a.dispose(),(o=this._editor.getModel())==null||o.deltaDecorations(this._oldDecorations,[]),this._oldDecorations=[],(u=this._diffEditor)==null||u.dispose(),this._diffEditor=void 0}_changesHandle(i){let a=0,o;const u=[];let p=0;for(const m of i){const{added:g,removed:v,count:b=1,value:w}=m;g?o&&o.removed?(a=this._changeHandle(u,a,p,b,$e.modified),p=0,o=void 0):(o&&o.added&&(a=this._changeHandle(u,a,p,o.count||1,$e.added),p=0),o=m):v?o&&o.added?(a=this._changeHandle(u,a,p,o.count||1,$e.modified),p=0,o=void 0):(o&&o.removed&&this._addDecorationList(u,a,$e.removed),o=m):/^\n+$/.test(w)?o&&(o.added||o.removed)?p=b:a+=b:(o&&o.added?(a=this._changeHandle(u,a,p,o.count||1,$e.added),p=0,o=void 0):o&&o.removed&&(this._addDecorationList(u,a,$e.removed),o=void 0),a+=b)}return o&&o.added?a=this._changeHandle(u,a,p,o.count||1,$e.added):o&&o.removed&&this._addDecorationList(u,a,$e.removed),u}_changeHandle(i,a,o,u,p){for(let m=1;m<=u;m++)this._addDecorationList(i,a+m,p);return a+=u+o,a}_addDecorationList(i,a,o){i.push({range:new this._monaco.Range(a,1,a,1),options:{isWholeLine:!0,linesDecorationsClassName:`line-${o} line-decoration_${o}`}})}_changeEvent(){var u,p;const i=Kd(this._originalModel.getValue(),((u=this._editor.getModel())==null?void 0:u.getValue())||""),a=this._changesHandle(i),o=((p=this._editor.getModel())==null?void 0:p.deltaDecorations(this._oldDecorations,a))||[];this._oldDecorations=o}_eventListening(i){const a=new Yd("diff.popup.widget",this._editor);this._editor.addOverlayWidget(a),this._onMouseDownListener=this._editor.onMouseDown(o=>this._onMouseDownHandle(o,i)),this._diffPopupWidget=a}_onMouseDownHandle(i,a){var g,v,b,w,k,z;const o=(g=i.target.element)==null?void 0:g.classList,u=o==null?void 0:o.contains(`line-${$e.added}`),p=o==null?void 0:o.contains(`line-${$e.modified}`),m=o==null?void 0:o.contains(`line-${$e.removed}`);if(u||p||m){const E=((b=(v=i==null?void 0:i.target)==null?void 0:v.position)==null?void 0:b.lineNumber)||0,P=((w=this._editor)==null?void 0:w.getTopForLineNumber(E+1))||0,j=((k=this._editor)==null?void 0:k.getScrollTop())||0,ee=u?$e.added:p?$e.modified:$e.removed;(z=this._diffPopupWidget)==null||z.show(P-j,P,ee),this._diffEditor||(this._diffEditor=this._createDiffEditor(a)),this._diffEditor.setModel({original:this._originalModel,modified:this._editor.getModel()}),this._diffEditor.revealLineInCenter(E+1)}}_createDiffEditor(i="vs-dark"){return this._monaco.editor.createDiffEditor(document.getElementById("diffEditorContainer"),{theme:i,renderSideBySide:!1,quickSuggestions:!1,suggestOnTriggerCharacters:!1,hover:{enabled:!1},parameterHints:{enabled:!1}})}}class tp{constructor(i,a,o){Object.defineProperty(this,"_editor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_monaco",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_decorations",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_changPositionListener",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_onActionTrigger",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._editor=i,this._monaco=a,this._onActionTrigger=o,this._init()}updateActionTrigger(i){this._onActionTrigger=i}setModelMarkers(i){this._monaco.editor.setModelMarkers(this._editor.getModel(),"owner",i)}addDiffDecorations(){this._decorations||(this._decorations=new ep(this._editor,this._monaco))}removeDiffDecorations(){var i;(i=this._decorations)==null||i.dispose(),this._decorations=void 0}setValue(i){this._editor.setValue(i)}setPosition(i){var a,o,u;(a=this._editor)==null||a.setPosition(i),(o=this._editor)==null||o.revealPositionInCenter(i),(u=this._editor)==null||u.focus()}setOriginalScript(i){var a;(a=this._decorations)==null||a.update(i)}getEditorLayout(){var o;const i=this._editor.getContentHeight(),a=(o=this._editor.getModel())==null?void 0:o.getLineCount();return{contentHeight:i,lineCount:a}}setEditorLayout(i){var a,o;(o=this._editor)==null||o.layout({height:i,width:(a=this._editor)==null?void 0:a.getContainerDomNode().clientWidth})}_init(){this._register(),this._setOptions(),this._addCommands(),this._addActions(),this._setCursorPosition()}_setCursorPosition(){const i=localStorage.getItem(Zs);this._editor.setPosition(i?JSON.parse(i):{lineNumber:1,column:1}),this._editor.focus()}_register(){this._monaco.languages.register({id:Ye}),this._monaco.languages.registerCompletionItemProvider(Ye,{triggerCharacters:["."],provideCompletionItems:Ld,resolveCompletionItem:Fd}),this._monaco.languages.registerHoverProvider(Ye,{provideHover:Bd}),this._monaco.languages.registerSignatureHelpProvider(Ye,{signatureHelpTriggerCharacters:["(",","],provideSignatureHelp:jd}),this._monaco.languages.registerColorProvider(Ye,{provideColorPresentations:Wd,provideDocumentColors:Ud}),this._monaco.editor.registerEditorOpener({openCodeEditor:Hd}),this._monaco.languages.registerDefinitionProvider(Ye,{provideDefinition:$d})}_setOptions(){this._monaco.editor.defineTheme("vs-dark",Gn),this._monaco.editor.defineTheme("vs",$n),this._monaco.languages.setMonarchTokensProvider(Ye,Wn),this._monaco.languages.setLanguageConfiguration(Ye,Hn)}_addCommands(){this._monaco.editor.addCommand({id:"tcc.editor.function",run:(i,a)=>{var o;if(Mt.nextIsBracket){const u=this._editor.getPosition();u&&this._editor.setPosition(Object.assign(u,{column:u.column+1}))}(o=this._editor.getAction(a))==null||o.run()}})}_addActions(){this._editor.addAction({id:"tcc-save-script",label:"保存脚本",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.KeyS],contextMenuGroupId:"9_modification",contextMenuOrder:1,run:()=>{this._onActionTrigger&&this._onActionTrigger(Ae.Actions.Save)}}),this._editor.addAction({id:"tcc-find-replace-line",label:"寻找/替换",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.KeyF],contextMenuGroupId:"9_cutcopypaste",contextMenuOrder:5,run:()=>{this.openFind(),this._onActionTrigger&&this._onActionTrigger(Ae.Actions.Find)}}),this._editor.addAction({id:"tcc-trigger-console-script",label:"切换控制台",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.Backquote],contextMenuGroupId:"9_modification-c",contextMenuOrder:2,run:()=>{this._onActionTrigger&&this._onActionTrigger(Ae.Actions.TriggerConsole)}})}openFind(){this._editor.focus(),this._editor.trigger("click","actions.find",null)}gotoLine(){this._editor.focus(),this._editor.trigger("click","editor.action.gotoLine",null)}onChangeCursorPosition(i){this._changPositionListener&&this._changPositionListener.dispose();const a=localStorage.getItem(Zs);i&&i(a?JSON.parse(a):{lineNumber:1,column:1}),this._changPositionListener=this._editor.onDidChangeCursorPosition(o=>{localStorage.setItem(Zs,JSON.stringify(o.position)),i&&i(o.position)})}}/**
135
135
  * @license
136
136
  * Copyright 2019 Google LLC
137
137
  * SPDX-License-Identifier: Apache-2.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guihz/trading-vue-editor-tes",
3
- "version": "0.0.040",
3
+ "version": "0.0.041",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "lib"