forked from tvjsx/trading-vue-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
trading-vue.min.js
6 lines (6 loc) · 258 KB
/
trading-vue.min.js
1
2
3
4
5
6
/*! TradingVue.JS - v1.0.2 - Thu Mar 18 2021
https://github.com/tvjsx/trading-vue-js
Copyright (c) 2019 C451 Code's All Right;
Licensed under the MIT license */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.TradingVueJs=e():t.TradingVueJs=e()}(self,(function(){return(()=>{var t={757:(t,e,n)=>{t.exports=n(666)},546:t=>{t.exports={numcmp:function(t,e){return t-e},strcmp:function(t,e){return t<e?-1:t>e?1:0}}},678:(t,e,n)=>{var i=n(500),r=n(546),o=n(101);function s(t,e){if(!i.isSortableArrayLike(t))throw new Error("Invalid data");if(!e||t.length>0&&!(e in t[0]))throw new Error("Invalid index");this.data=t,this.index=e,this.setBoundaries(),this.compare="number"==typeof this.minv?r.numcmp:r.strcmp,this.search=o.search,this.valpos={},this.cursor=null,this.nextlow=null,this.nexthigh=null}t.exports=s,s.prototype.setCompare=function(t){if("function"!=typeof t)throw new Error("Invalid argument");return this.compare=t,this},s.prototype.setSearch=function(t){if("function"!=typeof t)throw new Error("Invalid argument");return this.search=t,this},s.prototype.sort=function(){var t=this,e=this.index;return this.data.sort((function(n,i){return t.compare(n[e],i[e])})),this.setBoundaries(),this},s.prototype.setBoundaries=function(){var t=this.data,e=this.index;return this.minv=t.length&&t[0][e],this.maxv=t.length&&t[t.length-1][e],this},s.prototype.fetch=function(t){if(0===this.data.length)return this.cursor=null,this.nextlow=null,this.nexthigh=null,this;if(-1===this.compare(t,this.minv))return this.cursor=null,this.nextlow=null,this.nexthigh=0,this;if(1===this.compare(t,this.maxv))return this.cursor=null,this.nextlow=this.data.length-1,this.nexthigh=null,this;var e=this.valpos[t];if(e)return e.found?(this.cursor=e.index,this.nextlow=null,this.nexthigh=null):(this.cursor=null,this.nextlow=e.prev,this.nexthigh=e.next),this;var n=this.search.call(this,t);return this.cursor=n.index,this.nextlow=n.prev,this.nexthigh=n.next,this},s.prototype.get=function(t){t&&this.fetch(t);var e=this.cursor;return null!==e?this.data[e]:null},s.prototype.getRange=function(t,e){if(1===this.compare(t,e))return[];this.fetch(t);var n=this.cursor||this.nexthigh;this.fetch(e);var i=this.cursor||this.nextlow;return null===n||null===i?[]:this.data.slice(n,i+1)}},101:t=>{function e(t,n,i,r,o){var s=i+n>>>1,a=this.compare(t[s][this.index],r);return a?n>=i?o[r]={found:!1,index:null,prev:a<0?i:i-1,next:a<0?i+1:i}:a>0?e.call(this,t,n,s-1,r,o):e.call(this,t,s+1,i,r,o):o[r]={found:!0,index:s,prev:null,next:null}}t.exports.search=function(t){var n=this.data;return e.call(this,n,0,n.length-1,t,this.valpos)}},500:t=>{t.exports.isSortableArrayLike=function(t){return function(t){return!!(t&&"object"==typeof t&&isFinite(t.length)&&t.length>=0&&t.length===Math.floor(t.length)&&t.length<4294967296)}(t)&&function(t){return!(!t||"object"!=typeof t||"function"!=typeof t.sort)}(t)}},851:(t,e,n)=>{"use strict";n.r(e),n.d(e,{Candle:()=>Qt,Constants:()=>y,DataCube:()=>ii,Interface:()=>ri,Overlay:()=>mt,Tool:()=>Wt,TradingVue:()=>Rn,Utils:()=>C,Volbar:()=>Rt,default:()=>si,layout_cnv:()=>Tt,layout_vol:()=>Ot,primitives:()=>oi});var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"trading-vue",style:{color:this.chart_props.colors.text,font:this.font_comp,width:this.width+"px",height:this.height+"px"},attrs:{id:t.id},on:{mousedown:t.mousedown,mouseleave:t.mouseleave}},[t.toolbar?n("toolbar",t._b({ref:"toolbar",attrs:{config:t.chart_config},on:{"custom-event":t.custom_event}},"toolbar",t.chart_props,!1)):t._e(),t._v(" "),t.controllers.length?n("widgets",{ref:"widgets",attrs:{map:t.ws,width:t.width,height:t.height,tv:this,dc:t.data}}):t._e(),t._v(" "),n("chart",t._b({key:t.reset,ref:"chart",attrs:{tv_id:t.id,config:t.chart_config},on:{"custom-event":t.custom_event,"range-changed":t.range_changed,"legend-button-click":t.legend_button}},"chart",t.chart_props,!1)),t._v(" "),n("transition",{attrs:{name:"tvjs-drift"}},[t.tip?n("the-tip",{attrs:{data:t.tip},on:{"remove-me":function(e){t.tip=null}}}):t._e()],1)],1)};function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function o(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}function s(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||o(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}i._withStripped=!0;var a=1e3,c=6e4,u=3e5,h=9e5,l=18e5,d=36e5,f=4*d,p=24*d,g=7*p,v=4*g,A=365*p,m={SBMIN:60,SBMAX:1/0,TOOLBAR:57,TB_ICON:25,TB_ITEM_M:6,TB_ICON_BRI:1,TB_ICON_HOLD:420,TB_BORDER:1,TB_B_STYLE:"dotted",TOOL_COLL:7,EXPAND:.15,CANDLEW:.6,GRIDX:100,GRIDY:47,BOTBAR:28,PANHEIGHT:22,DEFAULT_LEN:50,MINIMUM_LEN:5,MIN_ZOOM:25,MAX_ZOOM:1e3,VOLSCALE:.15,UX_OPACITY:.9,ZOOM_MODE:"tv",L_BTN_SIZE:21,L_BTN_MARGIN:"-6px 0 -6px 0",SCROLL_WHEEL:"prevent",FONT:"11px -apple-system,BlinkMacSystemFont,\n Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,\n Fira Sans,Droid Sans,Helvetica Neue,\n sans-serif"};const y={SECOND:a,MINUTE:c,MINUTE5:u,MINUTE15:h,MINUTE30:l,HOUR:d,HOUR4:f,DAY:p,WEEK:g,MONTH:v,YEAR:A,MONTHMAP:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],TIMESCALES:[10*A,5*A,3*A,2*A,A,6*v,4*v,3*v,2*v,v,15*p,10*p,7*p,5*p,3*p,2*p,p,12*d,6*d,3*d,54e5,d,l,h,6e5,u,12e4,c],$SCALES:[.05,.1,.2,.25,.5,.8,1,2,5],ChartConfig:m,map_unit:{"1s":a,"5s":5e3,"10s":1e4,"20s":2e4,"30s":3e4,"1m":c,"3m":18e4,"5m":u,"15m":h,"30m":l,"1H":d,"2H":2*d,"3H":3*d,"4H":f,"12H":432e5,"1D":p,"1W":g,"1M":v,"1Y":A},IB_TF_WARN:"When using IB mode you should specify timeframe ('tf' filed in 'chart' object),otherwise you can get an unexpected behaviour"};var _=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"trading-vue-chart",style:t.styles},[n("keyboard",{ref:"keyboard"}),t._v(" "),t._l(this._layout.grids,(function(e,i){return n("grid-section",{key:e.id,ref:"sec",refInFor:!0,attrs:{common:t.section_props(i),grid_id:i},on:{"register-kb-listener":t.register_kb,"remove-kb-listener":t.remove_kb,"range-changed":t.range_changed,"cursor-changed":t.cursor_changed,"cursor-locked":t.cursor_locked,"sidebar-transform":t.set_ytransform,"layer-meta-props":t.layer_meta_props,"custom-event":t.emit_custom_event,"legend-button-click":t.legend_button_click}})})),t._v(" "),n("botbar",t._b({attrs:{shaders:t.shaders,timezone:t.timezone}},"botbar",t.botbar_props,!1))],2)};function w(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{i||null==a.return||a.return()}finally{if(r)throw o}}return n}}(t,e)||o(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}_._withStripped=!0;const b=function(t){var e=document.createElement("canvas").getContext("2d");return e.font=t.font,e};var x=n(678),k=n.n(x);const C={clamp:function(t,e,n){return t<=e?e:t>=n?n:t},add_zero:function(t){return t<10&&(t="0"+t),t},day_start:function(t){return new Date(t).setUTCHours(0,0,0,0)},month_start:function(t){var e=new Date(t);return Date.UTC(e.getFullYear(),e.getMonth(),1)},year_start:function(t){return Date.UTC(new Date(t).getFullYear())},get_year:function(t){if(t)return new Date(t).getUTCFullYear()},get_month:function(t){if(t)return new Date(t).getUTCMonth()},nearest_a:function(t,e){for(var n=1/0,i=null,r=-1,o=0;o<e.length;o++){var s=e[o];Math.abs(s-t)<n&&(n=Math.abs(s-t),i=s,r=o)}return[r,i]},round:function(t,e){return void 0===e&&(e=8),parseFloat(t.toFixed(e))},strip:function(t){return parseFloat(parseFloat(t).toPrecision(12))},get_day:function(t){return t?new Date(t).getDate():null},overwrite:function(t,e){t.splice.apply(t,[0,t.length].concat(s(e)))},copy_layout:function(t,e){for(var n in t)if(Array.isArray(t[n])){if(t[n].length!==e[n].length){this.overwrite(t[n],e[n]);continue}for(var i in t[n])Object.assign(t[n][i],e[n][i])}else Object.assign(t[n],e[n])},detect_interval:function(t){var e=Math.min(t.length-1,99),n=1/0;return t.slice(0,e).forEach((function(e,i){var r=t[i+1][0]-e[0];r==r&&r<n&&(n=r)})),n>=y.MONTH&&n<=30*y.DAY?31*y.DAY:n},get_num_id:function(t){return parseInt(t.split("_").pop())},fast_filter:function(t,e,n){if(!t.length)return[t,void 0];try{var i=new(k())(t,"0");return[i.getRange(e,n),i.valpos[e].next]}catch(i){return[t.filter((function(t){return t[0]>=e&&t[0]<=n})),0]}},fast_filter_i:function(t,e,n){if(!t.length)return[t,void 0];var i=Math.floor(e);i<0&&(i=0);var r=Math.floor(n+1);return[t.slice(i,r),i]},fast_nearest:function(t,e){var n=new(k())(t,"0");return n.fetch(e),[n.nextlow,n.nexthigh]},now:function(){return(new Date).getTime()},pause:function(t){return new Promise((function(e,n){return setTimeout(e,t)}))},smart_wheel:function(t){var e=Math.abs(t);return e>500?(200+Math.log(e))*Math.sign(t):t},get_deltaX:function(t){return t.originalEvent.deltaX/12},get_deltaY:function(t){return t.originalEvent.deltaY/12},apply_opacity:function(t,e){if(7===t.length){var n=Math.floor(255*e);t+=(n=this.clamp(n,0,255)).toString(16)}return t},parse_tf:function(t){return"string"==typeof t?y.map_unit[t]:t},index_shift:function(t,e){if(!e.length)return 0;for(var n,i=e[0][0],r=1;r<e.length;r++)if(e[r][0]!==i){n=e[r][0];break}for(var o=0;o<t.length;o++)if(t[o][0]===n)return o-r;return 0},measureText:function(t,e,n){var i=t.measureTextOrg(e);if(0===i.width){var r=document,o="tvjs-measure-text",s=r.getElementById(o);if(!s){var a=r.getElementById(n);(s=r.createElement("div")).id=o,s.style.position="absolute",s.style.top="-1000px",a.appendChild(s)}return t.font&&(s.style.font=t.font),s.innerText=e.replace(/ /g,"."),{width:s.offsetWidth}}return i},uuid:function(t){return void 0===t&&(t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"),t.replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))},uuid2:function(){return this.uuid("xxxxxxxxxxxx")},warn:function(t,e,n){void 0===n&&(n=0),setTimeout((function(){t()&&console.warn(e)}),n)},is_scr_props_upd:function(t,e){var n=e.find((function(e){return e.v.$uuid===t.v.$uuid}));if(!n)return!1;var i=t.p.settings.$props;return!!i&&i.some((function(e){return t.v[e]!==n.v[e]}))},delayed_exec:function(t){if(!t.script||!t.script.execInterval)return!0;var e=this.now(),n=t.script.execInterval;return(!t.settings.$last_exec||e>t.settings.$last_exec+n)&&(t.settings.$last_exec=e,!0)},format_name:function(t){if(t.name){var e=t.name;for(var n in t.settings||{}){var i=t.settings[n],r=new RegExp("\\$".concat(n),"g");e=e.replace(r,i)}return e}},xmode:function(){return this.is_mobile?"explore":"default"},default_prevented:function(t){return t.original?t.original.defaultPrevented:t.defaultPrevented},is_mobile:(B="undefined"!=typeof window?window:{},"onorientationchange"in B&&(!!navigator.maxTouchPoints||!!navigator.msMaxTouchPoints||"ontouchstart"in B||B.DocumentTouch&&document instanceof B.DocumentTouch))};var B;const E={point2line:function(t,e,n){var i=this.tri(t,e,n),r=i.area,o=i.base;return Math.abs(this.tri_h(r,o))},point2seg:function(t,e,n){var i=this.tri(t,e,n),r=i.area,o=i.base,s=this.dot_prod(t,e,n)/o,a=Math.max(-s,0),c=Math.max(s-o,0),u=Math.abs(this.tri_h(r,o));return Math.max(u,a,c)},point2ray:function(t,e,n){var i=this.tri(t,e,n),r=i.area,o=i.base,s=this.dot_prod(t,e,n)/o,a=Math.max(-s,0),c=Math.abs(this.tri_h(r,o));return Math.max(c,a)},tri:function(t,e,n){var i=this.area(t,e,n),r=n[0]-e[0],o=n[1]-e[1];return{area:i,base:Math.sqrt(r*r+o*o)}},area:function(t,e,n){return t[0]*(e[1]-n[1])+e[0]*(n[1]-t[1])+n[0]*(t[1]-e[1])},tri_h:function(t,e){return t/e},dot_prod:function(t,e,n){var i=[n[0]-e[0],n[1]-e[1]],r=[t[0]-e[0],t[1]-e[1]];return i[0]*r[0]+i[1]*r[1]},log:function(t){return Math.sign(t)*Math.log(Math.abs(t)+1)},exp:function(t){return Math.sign(t)*(Math.exp(Math.abs(t))-1)},log_mid:function(t,e){var n=this.log(t[0]),i=n-e/2*(n-this.log(t[1]))/e;return this.exp(i)},re_range:function(t,e,n){var i=this.log(t[0]),r=this.log(t[1]),o=this.log(e),s=this.log(n),a=(o-s)*(i-r)/(i-s);return this.exp(o-a)}};const I=function(t,e,n,i){return{x:e,w:t.px_step*i.config.CANDLEW,o:Math.floor(E.log(n[1])*t.A+t.B),h:Math.floor(E.log(n[2])*t.A+t.B),l:Math.floor(E.log(n[3])*t.A+t.B),c:Math.floor(E.log(n[4])*t.A+t.B),raw:n}},S=function(t,e){var n=-e/(E.log(t.$_hi)-E.log(t.$_lo)),i=-E.log(t.$_hi)*n,r=.1*-e,o=1.1*e;t.$_hi=E.exp((r-i)/n),t.$_lo=E.exp((o-i)/n)};var M=y.TIMESCALES,T=y.$SCALES,O=y.WEEK,D=y.MONTH,Q=y.YEAR,R=y.HOUR,Y=y.DAY,j=Number.MAX_SAFE_INTEGER;const U=function(t,e,n){void 0===n&&(n=null);var i=e.sub,r=e.interval,o=e.range,s=e.ctx,a=e.$p,c=e.layers_meta,u=e.height,h=e.y_t,l=e.ti_map,d=e.grid,f=e.timezone,p={ti_map:l},g=c[t],v=null,A=d.logScale;if(g&&Object.keys(g).length){var m=Object.values(g).filter((function(t){return t.y_range}));m.length&&(v=m[0].y_range)}function y(){var t=function(){var t=Math.min(p.B,u);if(t<a.config.GRIDY)return 1;var e=t/a.config.GRIDY,n=p.$_hi;if(p.$_lo>0)var i=p.$_hi/p.$_lo;else i=p.$_hi/1;a.config.GRIDY,parseInt(n.toExponential().split("e")[1]);return Math.pow(i,1/e)}(),e=function(){var t=Math.min(u-p.B,u);if(t<a.config.GRIDY)return 1;var e=t/a.config.GRIDY,n=Math.abs(p.$_lo);if(p.$_hi<0&&p.$_lo<0)var i=Math.abs(p.$_lo/p.$_hi);else i=Math.abs(p.$_lo)/1;a.config.GRIDY,parseInt(n.toExponential().split("e")[1]);return Math.pow(i,1/e)}();return Math.max(t,e)}function _(){if(n)p.t_step=n.t_step,p.px_step=n.px_step,p.startx=n.startx,p.xs=n.xs;else{p.t_step=(f=l.ib?6e4:1,g=(o[1]-o[0])*f*(a.config.GRIDX/a.width),v=M,C.nearest_a(g,v)[1]/f),p.xs=[];for(var t=o[1]-o[0],e=p.spacex/t,s=0;s<i.length;s++){var c=i[s],u=i[s-1]||[],h=p.xs[p.xs.length-1]||[0,[]];b(u,c,Math.floor((c[0]-o[0])*e));var d=p.xs[p.xs.length-1]||[0,[]];h!==d&&(d[1][0]-h[1][0]<.8*p.t_step&&(d[2]<=h[2]?p.xs.pop():p.xs.splice(p.xs.length-2,1)))}r<O&&e>0&&(function(t,e){if(!p.xs.length||!isFinite(e))return;var n=p.xs[0][1][0];for(;;){n-=p.t_step;var i=Math.floor((n-o[0])*e);if(i<0)break;n%r==0&&p.xs.unshift([i,[n],r])}}(0,e),function(t,e){if(!p.xs.length||!isFinite(e))return;var n=p.xs[p.xs.length-1][1][0];for(;;){n+=p.t_step;var i=Math.floor((n-o[0])*e);if(i>p.spacex)break;n%r==0&&p.xs.push([i,[n],r])}}(0,e))}var f,g,v}function b(t,e,n,i){var o=l.ib?l.i2t(t[0]):t[0],s=l.ib?l.i2t(e[0]):e[0];l.tf<Y&&(o+=f*R,s+=f*R);!t[0]&&r!==Q||C.get_year(s)===C.get_year(o)?t[0]&&C.get_month(s)!==C.get_month(o)?p.xs.push([n,e,D]):C.day_start(s)===s?p.xs.push([n,e,Y]):e[0]%p.t_step==0&&p.xs.push([n,e,r]):p.xs.push([n,e,Q])}function x(){var t=Math.pow(10,-p.prec);p.$_step=Math.max(t,function(){var t=p.$_hi-p.$_lo,e=t*(a.config.GRIDY/u),n=parseInt(t.toExponential().split("e")[1]),i=Math.pow(10,n),r=T.map((function(t){return t*i}));return C.strip(C.nearest_a(e,r)[1])}()),p.ys=[];for(var e=p.$_lo-p.$_lo%p.$_step;e<=p.$_hi;e+=p.$_step){var n=Math.floor(e*p.A+p.B);n>u||p.ys.push([n,C.strip(e)])}}function k(){if(p.$_mult=y(),p.ys=[],i.length){for(var t=Math.abs(i[i.length-1][1]||1),e=function(t){var e=u/a.config.GRIDY,n=1/0,i=t,r=0;for(;n>0;)if(n=Math.floor(E.log(i)*p.A+p.B),i*=p.$_mult,r++>3*e)return 0;return i}(t),n=function(t){var e=u/a.config.GRIDY,n=-1/0,i=t,r=0;for(;n<u&&(n=Math.floor(E.log(i)*p.A+p.B),i*=p.$_mult,!(r++>3*e)););return i}(-t),r=-1/0,o=u/a.config.GRIDY,s=1+(p.$_mult-1)/2,c=e;c>0;c/=p.$_mult){c=B(c,s);var h=Math.floor(E.log(c)*p.A+p.B);if(p.ys.push([h,C.strip(c)]),h>u)break;if(h-r<.7*a.config.GRIDY)break;if(p.ys.length>o+1)break;r=h}r=1/0;for(c=n;c<0;c/=p.$_mult){c=B(c,s);var l=Math.floor(E.log(c)*p.A+p.B);if(r-l<.7*a.config.GRIDY)break;if(p.ys.push([l,C.strip(c)]),l<0)break;if(p.ys.length>3*o+1)break;r=l}}}function B(t,e){var n=Math.sign(t);if((t=Math.abs(t))>10){for(var i=10;i<j;i*=10){if(t/(Math.floor(t/i)*i)>e)break}return i/=10,n*Math.floor(t/i)*i}if(t<1){for(var r=10;r>=1;r--){if(t/C.round(t,r)>e)break}return n*C.round(t,r+1)}return n*Math.floor(t)}return function(){if(n){c=-1/0,l=1/0;for(d=0;d<i.length;d++)for(var t=1;t<i[d].length;t++){var e=i[d][t];e>c&&(c=e),e<l&&(l=e)}if(v)var r=w(v(c,l),3),o=(c=r[0],l=r[1],r[2])}else if(v)var s=w(v(c,l),2),c=s[0],l=s[1];else{c=-1/0,l=1/0;for(var d=0,f=i.length;d<f;d++){var g=i[d];g[2]>c&&(c=g[2]),g[3]<l&&(l=g[3])}}h&&!h.auto&&h.range?(p.$_hi=h.range[0],p.$_lo=h.range[1]):(A?(p.$_hi=c,p.$_lo=l,S(p,u)):(o=!1===o?0:1,p.$_hi=c+(c-l)*a.config.EXPAND*o,p.$_lo=l-(c-l)*a.config.EXPAND*o),p.$_hi===p.$_lo&&(A?S(p,u):(p.$_hi*=1.05,p.$_lo*=.95)))}(),function(){if(i.length<2)return p.prec=0,void(p.sb=a.config.SBMIN);p.prec=function(t){for(var e=0,n=0,i=1/0,r=-1/0,o=0,s=t.length;o<s;o++){var a=t[o];a[1]>r?r=a[1]:a[1]<i&&(i=a[1])}[i,r].forEach((function(t){var i=null!=t?t.toString():"";if(t<1e-6){var r=w(i.split("e-"),2),o=r[0],s=r[1],a=w(o.split("."),2),c=a[0];(h=a[1])||(h=""),h={length:h.length+parseInt(s)||0}}else var u=w(i.split("."),2),h=(c=u[0],u[1]);h&&h.length>e&&(e=h.length),c&&c.length>n&&(n=c.length)}));var c=e-e%2+2;if(1===n)return Math.min(8,Math.max(2,c));if(n<=2)return Math.min(4,Math.max(2,c));return 2}(i);var t=[];t.push(p.$_hi.toFixed(p.prec).length),t.push(p.$_lo.toFixed(p.prec).length);var e="0".repeat(Math.max.apply(Math,t))+" ";p.sb=s.measureText(e).width,p.sb=Math.max(Math.floor(p.sb),a.config.SBMIN),p.sb=Math.min(p.sb,a.config.SBMAX)}(),{create:function(){return function(){if(!(i.length<2)){var t=o[1]-o[0];p.spacex=a.width-p.sb;var e=t/r;p.px_step=p.spacex/e;var n=p.spacex/t;p.startx=(i[0][0]-o[0])*n,d.logScale?(p.A=-u/(E.log(p.$_hi)-E.log(p.$_lo)),p.B=-E.log(p.$_hi)*p.A):(p.A=-u/(p.$_hi-p.$_lo),p.B=-p.$_hi*p.A)}}(),_(),d.logScale?k():x(),p.width=a.width-p.sb,p.height=u,n&&(p.master_grid=n),p.grid=d,function(t,e){var n=t.ti_map.ib,i=e[1]-e[0],r=t.spacex/i,o=t.grid.logScale||!1;return Object.assign(t,{t2screen:function(i){return n&&(i=t.ti_map.smth2i(i)),Math.floor((i-e[0])*r)-.5},$2screen:function(e){return o&&(e=E.log(e)),Math.floor(e*t.A+t.B)-.5},t_magnet:function(e){n&&(e=t.ti_map.smth2i(e));var i=t.candles||t.master_grid.candles,r=i.map((function(t){return t.raw[0]})),o=C.nearest_a(e,r)[0];if(i[o])return Math.floor(i[o].x)-.5},screen2$:function(e){return o?E.exp((e-t.B)/t.A):(e-t.B)/t.A},screen2t:function(t){return e[0]+t/r},$_magnet:function(t){},c_magnet:function(e){var n=t.candles||t.master_grid.candles,i=n.map((function(t){return t.raw[0]}));return n[C.nearest_a(e,i)[0]]},data_magnet:function(t){}}),t}(p,o)},get_layout:function(){return p},set_sidebar:function(t){return p.sb=t},get_sidebar:function(){return p.sb}}};function L(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return N(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function N(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}const F=function(t){var e=t.chart,n=t.sub,i=t.offsub,r=t.interval,o=t.range,a=t.ctx,c=t.layers_meta,u=t.ti_map,h=t.$props,l=t.y_transforms,d=e.grid||{};i=i.filter((function(t,e){return!(t.grid&&t.grid.id)}));var f,p=function(){var t=h.height-h.config.BOTBAR;if(d.height||i.find((function(t){return t.grid.height})))return function(t,e){var n=[{grid:t}].concat(s(i)).map((function(t){return t.grid.height||1})),r=n.reduce((function(t,e){return t+e}),0);n=n.map((function(t){return Math.floor(t/r*e)})),r=n.reduce((function(t,e){return t+e}),0);for(var o=0;o<e-r;o++)n[o%n.length]++;return n}(d,t);var e=i.length,n=2*Math.sqrt(e)/7/(e||1),r=Math.floor(t*n);return[t-r*e].concat(Array(e).fill(r))}(),g={sub:n,interval:r,range:o,ctx:a,$p:h,layers_meta:c,ti_map:u,height:p[0],y_t:l[0],grid:d,timezone:h.timezone},v=[new U(0,g)],A=L(i.entries());try{for(A.s();!(f=A.n()).done;){var m=w(f.value,2),y=m[0],_=m[1],b=_.data,x=_.grid;g.sub=b,g.height=p[y+1],g.y_t=l[y+1],g.grid=x||{},v.push(new U(y+1,g,v[0].get_layout()))}}catch(t){A.e(t)}finally{A.f()}var k=Math.max.apply(Math,s(v.map((function(t){return t.get_sidebar()})))),C=[],B=0;for(y=0;y<v.length;y++)v[y].set_sidebar(k),C.push(v[y].create()),C[y].id=y,C[y].offset=B,B+=C[y].height;var E=C[0];return function(){E.candles=[],E.volume=[];for(var t,e,i,o=Math.max.apply(Math,s(n.map((function(t){return t[5]})))),a=h.config.VOLSCALE*h.height/o,c=void 0,u=E.px_step>5?1:0,l=.5*E.px_step,f=0;f<n.length;f++){var p=n[f];i=E.t2screen(p[0])+.5,E.candles.push(d.logScale?I(E,i,p,h):{x:i,w:E.px_step*h.config.CANDLEW,o:Math.floor(p[1]*E.A+E.B),h:Math.floor(p[2]*E.A+E.B),l:Math.floor(p[3]*E.A+E.B),c:Math.floor(p[4]*E.A+E.B),raw:p}),n[f-1]&&p[0]-n[f-1][0]>r&&(c=null),t=c||Math.floor(i-l),e=Math.floor(i+l)-.5,E.volume.push({x1:t,x2:e,h:p[5]*a,green:p[4]>=p[1],raw:p}),c=e+u}}(),{grids:C,botbar:{width:h.width,height:h.config.BOTBAR,offset:B,xs:C[0]?C[0].xs:[]}}};function G(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function K(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function H(t,e,n){return e&&K(t.prototype,e),n&&K(t,n),t}function J(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return P(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return P(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function P(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}const z=function(){function t(e){G(this,t),this.comp=e,this.grids=e._layout.grids,this.cursor=e.cursor}return H(t,[{key:"sync",value:function(t){this.cursor.grid_id=t.grid_id;var e,n=!0,i=J(this.grids);try{for(i.s();!(e=i.n()).done;){var r=e.value,o=this.cursor_data(r,t);this.cursor.locked||(n&&(this.cursor.t=this.cursor_time(r,t,o),this.cursor.t&&(n=!1)),o.values&&this.comp.$set(this.cursor.values,r.id,o.values)),r.id===t.grid_id&&(this.cursor.x=r.t2screen(this.cursor.t),this.cursor.y=o.y,this.cursor.y$=o.y$)}}catch(t){i.e(t)}finally{i.f()}}},{key:"overlay_data",value:function(t,e){var n=0===t.id?"main_section":"sub_section",i=this.comp[n].data;if(t.id>0){var r=i.filter((function(t){return void 0===t.grid.id})),o=i.filter((function(e){return e.grid.id===t.id}));i=[r[t.id-1]].concat(s(o))}var a,c=t.screen2t(e.x),u={},h={},l=J(i);try{for(l.s();!(a=l.n()).done;){var d=a.value,f=d.data.map((function(t){return t[0]})),p=C.nearest_a(c,f)[0];d.type in u?u[d.type]++:u[d.type]=0,h["".concat(d.type,"_").concat(u[d.type])]=d.data[p]}}catch(t){l.e(t)}finally{l.f()}return h}},{key:"cursor_data",value:function(t,e){var n=this.comp.main_section.sub,i=n.map((function(e){return t.t2screen(e[0])+.5})),r=C.nearest_a(e.x,i)[0];return i[r]?{x:Math.floor(i[r])-.5,y:Math.floor(e.y-2)-.5-t.offset,y$:t.screen2$(e.y-2-t.offset),t:(n[r]||[])[0],values:Object.assign({ohlcv:0===t.id?n[r]:void 0},this.overlay_data(t,e))}:{}}},{key:"cursor_time",value:function(t,e,n){var i=t.screen2t(e.x),r=Math.abs((i-n.t)/this.comp.interval),o=Math.sign(i-n.t);if(r>=.5){var s=Math.round(r);return n.t+s*this.comp.interval*o}return n.t}}]),t}();var $=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"trading-vue-section"},[n("chart-legend",{ref:"legend",attrs:{values:t.section_values,grid_id:t.grid_id,common:t.legend_props,meta_props:t.get_meta_props},on:{"legend-button-click":t.button_click}}),t._v(" "),n("grid",t._b({ref:"grid",attrs:{grid_id:t.grid_id},on:{"register-kb-listener":t.register_kb,"remove-kb-listener":t.remove_kb,"range-changed":t.range_changed,"cursor-changed":t.cursor_changed,"cursor-locked":t.cursor_locked,"layer-meta-props":t.emit_meta_props,"custom-event":t.emit_custom_event,"sidebar-transform":t.sidebar_transform,"rezoom-range":t.rezoom_range}},"grid",t.grid_props,!1)),t._v(" "),n("sidebar",t._b({ref:"sb-"+t.grid_id,attrs:{grid_id:t.grid_id,rerender:t.rerender},on:{"sidebar-transform":t.sidebar_transform}},"sidebar",t.sidebar_props,!1))],1)};$._withStripped=!0;var q=function(){function t(e){var n=this;G(this,t),this.t0=this.t=C.now(),this.id=setInterval((function(){C.now()-n.t>100||(C.now()-n.t0>1200&&n.stop(),n.id&&e(n),n.t=C.now())}),16)}return H(t,[{key:"stop",value:function(){clearInterval(this.id),this.id=null}}]),t}(),W=n(840),X=n(981),V=n.n(X);function Z(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return tt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tt(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function tt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var et=function(){function t(e,n){G(this,t),this.MIN_ZOOM=n.config.MIN_ZOOM,this.MAX_ZOOM=n.config.MAX_ZOOM,C.is_mobile&&(this.MIN_ZOOM*=.5),this.canvas=e,this.ctx=e.getContext("2d"),this.comp=n,this.$p=n.$props,this.data=this.$p.sub,this.range=this.$p.range,this.id=this.$p.grid_id,this.layout=this.$p.layout.grids[this.id],this.interval=this.$p.interval,this.cursor=n.$props.cursor,this.offset_x=0,this.offset_y=0,this.deltas=0,this.wmode=this.$p.config.SCROLL_WHEEL,this.listeners(),this.overlays=[]}return H(t,[{key:"listeners",value:function(){var t=this;this.hm=V()(this.canvas),this.hm.wheel((function(e,n){return t.mousezoom(50*-n,e)}));var e=this.mc=new W.Manager(this.canvas),n=C.is_mobile?10:0;e.add(new W.Pan({threshold:n})),e.add(new W.Tap),e.add(new W.Pinch({threshold:0})),e.get("pinch").set({enable:!0}),C.is_mobile&&e.add(new W.Press),e.on("panstart",(function(e){if(!t.cursor.scroll_lock){if("aim"===t.cursor.mode)return t.emit_cursor_coord(e);var n=t.$p.y_transform;t.drug={x:e.center.x+t.offset_x,y:e.center.y+t.offset_y,r:t.range.slice(),t:t.range[1]-t.range[0],o:n&&n.offset||0,y_r:n&&n.range?n.range.slice():void 0,B:t.layout.B,t0:C.now()},t.comp.$emit("cursor-changed",{grid_id:t.id,x:e.center.x+t.offset_x,y:e.center.y+t.offset_y}),t.comp.$emit("cursor-locked",!0)}})),e.on("panmove",(function(e){C.is_mobile&&(t.calc_offset(),t.propagate("mousemove",t.touch2mouse(e))),t.drug?(t.mousedrag(t.drug.x+e.deltaX,t.drug.y+e.deltaY),t.comp.$emit("cursor-changed",{grid_id:t.id,x:e.center.x+t.offset_x,y:e.center.y+t.offset_y})):"aim"===t.cursor.mode&&t.emit_cursor_coord(e)})),e.on("panend",(function(e){C.is_mobile&&t.drug&&t.pan_fade(e),t.drug=null,t.comp.$emit("cursor-locked",!1)})),e.on("tap",(function(e){C.is_mobile&&(t.sim_mousedown(e),t.fade&&t.fade.stop(),t.comp.$emit("cursor-changed",{}),t.comp.$emit("cursor-changed",{mode:"explore"}),t.update())})),e.on("pinchstart",(function(){t.drug=null,t.pinch={t:t.range[1]-t.range[0],r:t.range.slice()}})),e.on("pinchend",(function(){t.pinch=null})),e.on("pinch",(function(e){t.pinch&&t.pinchzoom(e.scale)})),e.on("press",(function(e){C.is_mobile&&(t.fade&&t.fade.stop(),t.calc_offset(),t.emit_cursor_coord(e,{mode:"aim"}),setTimeout((function(){return t.update()})),t.sim_mousedown(e))}));var i=addEventListener;i("gesturestart",this.gesturestart),i("gesturechange",this.gesturechange),i("gestureend",this.gestureend)}},{key:"gesturestart",value:function(t){t.preventDefault()}},{key:"gesturechange",value:function(t){t.preventDefault()}},{key:"gestureend",value:function(t){t.preventDefault()}},{key:"mousemove",value:function(t){C.is_mobile||(this.comp.$emit("cursor-changed",{grid_id:this.id,x:t.layerX,y:t.layerY+this.layout.offset}),this.calc_offset(),this.propagate("mousemove",t))}},{key:"mouseout",value:function(t){C.is_mobile||(this.comp.$emit("cursor-changed",{}),this.propagate("mouseout",t))}},{key:"mouseup",value:function(t){this.drug=null,this.comp.$emit("cursor-locked",!1),this.propagate("mouseup",t)}},{key:"mousedown",value:function(t){C.is_mobile||(this.propagate("mousedown",t),this.comp.$emit("cursor-locked",!0),t.defaultPrevented||this.comp.$emit("custom-event",{event:"grid-mousedown",args:[this.id,t]}))}},{key:"sim_mousedown",value:function(t){var e=this;t.srcEvent.defaultPrevented||(this.comp.$emit("custom-event",{event:"grid-mousedown",args:[this.id,t]}),this.propagate("mousemove",this.touch2mouse(t)),this.update(),this.propagate("mousedown",this.touch2mouse(t)),setTimeout((function(){e.propagate("click",e.touch2mouse(t))})))}},{key:"touch2mouse",value:function(t){return this.calc_offset(),{original:t.srcEvent,layerX:t.center.x+this.offset_x,layerY:t.center.y+this.offset_y,preventDefault:function(){this.original.preventDefault()}}}},{key:"click",value:function(t){this.propagate("click",t)}},{key:"emit_cursor_coord",value:function(t,e){void 0===e&&(e={}),this.comp.$emit("cursor-changed",Object.assign({grid_id:this.id,x:t.center.x+this.offset_x,y:t.center.y+this.offset_y+this.layout.offset},e))}},{key:"pan_fade",value:function(t){var e=this,n=C.now()-this.drug.t0,i=42*(this.range[1]-this.drug.r[1])/n,r=Math.abs(.01*i);n>500||(this.fade&&this.fade.stop(),this.fade=new q((function(t){i*=.85,Math.abs(i)<r&&t.stop(),e.range[0]+=i,e.range[1]+=i,e.change_range()})))}},{key:"calc_offset",value:function(){var t=this.canvas.getBoundingClientRect();this.offset_x=-t.x,this.offset_y=-t.y}},{key:"new_layer",value:function(t){"crosshair"===t.name?this.crosshair=t:this.overlays.push(t),this.update()}},{key:"del_layer",value:function(t){this.overlays=this.overlays.filter((function(e){return e.id!==t})),this.update()}},{key:"show_hide_layer",value:function(t){var e=this.overlays.filter((function(e){return e.id===t.id}));e.length&&(e[0].display=t.display)}},{key:"update",value:function(){var t=this;if(this.layout=this.$p.layout.grids[this.id],this.interval=this.$p.interval,this.layout){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.$p.shaders.length&&this.apply_shaders(),this.grid();var e=[];e.push.apply(e,s(this.overlays)),e.sort((function(t,e){return t.z-e.z})),e.forEach((function(e){if(e.display){t.ctx.save();var n=e.renderer;n.pre_draw&&n.pre_draw(t.ctx),n.draw(t.ctx),n.post_draw&&n.post_draw(t.ctx),t.ctx.restore()}})),this.crosshair&&this.crosshair.renderer.draw(this.ctx)}}},{key:"apply_shaders",value:function(){var t,e=this.$p.layout.grids[this.id],n={layout:e,range:this.range,interval:this.interval,tf:e.ti_map.tf,cursor:this.cursor,colors:this.$p.colors,sub:this.data,font:this.$p.font,config:this.$p.config,meta:this.$p.meta},i=Z(this.$p.shaders);try{for(i.s();!(t=i.n()).done;){var r=t.value;this.ctx.save(),r.draw(this.ctx,n),this.ctx.restore()}}catch(t){i.e(t)}finally{i.f()}}},{key:"grid",value:function(){this.ctx.strokeStyle=this.$p.colors.grid,this.ctx.beginPath();var t,e=this.layout.height,n=Z(this.layout.xs);try{for(n.s();!(t=n.n()).done;){var i=w(t.value,2),r=i[0];i[1];this.ctx.moveTo(r-.5,0),this.ctx.lineTo(r-.5,e)}}catch(t){n.e(t)}finally{n.f()}var o,s=Z(this.layout.ys);try{for(s.s();!(o=s.n()).done;){var a=w(o.value,2),c=a[0];a[1];this.ctx.moveTo(0,c-.5),this.ctx.lineTo(this.layout.width,c-.5)}}catch(t){s.e(t)}finally{s.f()}this.ctx.stroke(),this.$p.grid_id&&this.upper_border()}},{key:"upper_border",value:function(){this.ctx.strokeStyle=this.$p.colors.scale,this.ctx.beginPath(),this.ctx.moveTo(0,.5),this.ctx.lineTo(this.layout.width,.5),this.ctx.stroke()}},{key:"mousezoom",value:function(t,e){if("pass"!==this.wmode){if("click"===this.wmode&&!this.$p.meta.activated)return;e.originalEvent.preventDefault(),e.preventDefault()}if(e.deltaX=e.deltaX||C.get_deltaX(e),e.deltaY=e.deltaY||C.get_deltaY(e),Math.abs(e.deltaX)>0&&(this.trackpad=!0,Math.abs(e.deltaX)>=Math.abs(e.deltaY)&&(t*=.1),this.trackpad_scroll(e)),this.trackpad&&(t*=.032),!((t=C.smart_wheel(t))<0&&this.data.length<=this.MIN_ZOOM||t>0&&this.data.length>this.MAX_ZOOM)){var n=t*(this.interval/1e3)*this.data.length,i="tl"===this.comp.config.ZOOM_MODE;if(e.originalEvent.ctrlKey||i){var r=e.originalEvent.offsetX/(this.canvas.width-1)*n,o=n-r;this.range[0]-=r,this.range[1]+=o}else this.range[0]-=n;if(i){var s=e.originalEvent.offsetY/(this.canvas.height-1)*2,a=2-s,c=n/(this.range[1]-this.range[0]);this.comp.$emit("rezoom-range",{grid_id:this.id,z:c,diff1:s,diff2:a})}this.change_range()}}},{key:"mousedrag",value:function(t,e){var n=this.drug.t*(this.drug.x-t)/this.layout.width,i=this.layout.$_hi-this.layout.$_lo;i*=(this.drug.y-e)/this.layout.height;var r=this.drug.o+i,o=this.layout.grid.logScale;if(o&&this.drug.y_r){var s=this.drug.y-e,a=this.drug.y_r.slice();a[0]=E.exp((0-this.drug.B+s)/this.layout.A),a[1]=E.exp((this.layout.height-this.drug.B+s)/this.layout.A)}this.drug.y_r&&this.$p.y_transform&&!this.$p.y_transform.auto&&this.comp.$emit("sidebar-transform",{grid_id:this.id,range:o?a||this.drug.y_r:[this.drug.y_r[0]-r,this.drug.y_r[1]-r]}),this.range[0]=this.drug.r[0]+n,this.range[1]=this.drug.r[1]+n,this.change_range()}},{key:"pinchzoom",value:function(t){if(!(t>1&&this.data.length<=this.MIN_ZOOM||t<1&&this.data.length>this.MAX_ZOOM)){var e=this.pinch.t,n=1*e/t;this.range[0]=this.pinch.r[0]-.5*(n-e),this.range[1]=this.pinch.r[1]+.5*(n-e),this.change_range()}}},{key:"trackpad_scroll",value:function(t){var e=this.range[1]-this.range[0];this.range[0]+=t.deltaX*e*.011,this.range[1]+=t.deltaX*e*.011,this.change_range()}},{key:"change_range",value:function(){if(this.range.length&&!(this.data.length<2)){var t=this.data.length-1,e=this.data,n=this.range;n[0]=C.clamp(n[0],-1/0,e[t][0]-5.5*this.interval),n[1]=C.clamp(n[1],e[0][0]+5.5*this.interval,1/0),this.comp.$emit("range-changed",n)}}},{key:"propagate",value:function(t,e){var n,i=Z(this.overlays);try{for(i.s();!(n=i.n()).done;){var r=n.value;r.renderer[t]&&r.renderer[t](e);var o=r.renderer.mouse,s=r.renderer.keys;o.listeners&&o.emit(t,e),s&&s.listeners&&s.emit(t,e)}}catch(t){i.e(t)}finally{i.f()}}},{key:"destroy",value:function(){var t=removeEventListener;t("gesturestart",this.gesturestart),t("gesturechange",this.gesturechange),t("gestureend",this.gestureend),this.mc&&this.mc.destroy(),this.hm&&this.hm.unwheel()}}]),t}();const nt={methods:{setup:function(){var t=this,e="".concat(this.$props.tv_id,"-").concat(this._id,"-canvas"),n=document.getElementById(e),i=window.devicePixelRatio||1;n.style.width="".concat(this._attrs.width,"px"),n.style.height="".concat(this._attrs.height,"px"),i<1&&(i=1),this.$nextTick((function(){var e=n.getBoundingClientRect();n.width=e.width*i,n.height=e.height*i;var r=n.getContext("2d",{});r.scale(i,i),t.redraw(),r.measureTextOrg||(r.measureTextOrg=r.measureText),r.measureText=function(e){return C.measureText(r,e,t.$props.tv_id)}}))},create_canvas:function(t,e,n){var i=this;return this._id=e,this._attrs=n.attrs,t("div",{class:"trading-vue-".concat(e),style:{left:n.position.x+"px",top:n.position.y+"px",position:"absolute"}},[t("canvas",{on:{mousemove:function(t){return i.renderer.mousemove(t)},mouseout:function(t){return i.renderer.mouseout(t)},mouseup:function(t){return i.renderer.mouseup(t)},mousedown:function(t){return i.renderer.mousedown(t)}},attrs:Object.assign({id:"".concat(this.$props.tv_id,"-").concat(e,"-canvas")},n.attrs),ref:"canvas",style:n.style})].concat(n.hs||[]))},redraw:function(){this.renderer&&this.renderer.update()}},watch:{width:function(t){this._attrs.width=t,this.setup()},height:function(t){this._attrs.height=t,this.setup()}}};var it=function(){function t(e){G(this,t),this.comp=e,this.$p=e.$props,this.data=this.$p.sub,this._visible=!1,this.locked=!1,this.layout=this.$p.layout}return H(t,[{key:"draw",value:function(t){this.layout=this.$p.layout;var e=this.comp.$props.cursor;(this.visible||"explore"!==e.mode)&&(this.x=this.$p.cursor.x,this.y=this.$p.cursor.y,t.save(),t.strokeStyle=this.$p.colors.cross,t.beginPath(),t.setLineDash([5]),this.$p.cursor.grid_id===this.layout.id&&(t.moveTo(0,this.y),t.lineTo(this.layout.width-.5,this.y)),t.moveTo(this.x,0),t.lineTo(this.x,this.layout.height),t.stroke(),t.restore())}},{key:"hide",value:function(){this.visible=!1,this.x=void 0,this.y=void 0}},{key:"visible",get:function(){return this._visible},set:function(t){this._visible=t}}]),t}();function rt(t,e,n,i,r,o,s,a){var c,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),i&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),s?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},u._ssrRegister=c):r&&(c=a?function(){r.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:r),c)if(u.functional){u._injectStyles=c;var h=u.render;u.render=function(t,e){return c.call(e),h(t,e)}}else{var l=u.beforeCreate;u.beforeCreate=l?[].concat(l,c):[c]}return{exports:t,options:u}}var ot=rt({name:"Crosshair",props:["cursor","colors","layout","sub"],methods:{create:function(){this.ch=new it(this),this.$emit("new-grid-layer",{name:"crosshair",renderer:this.ch})}},watch:{cursor:{handler:function(){this.ch||this.create();var t=this.$props.cursor,e="explore"===t.mode;if(!t.x||!t.y)return this.ch.hide(),void this.$emit("redraw-grid");this.ch.visible=!e},deep:!0}},render:function(t){return t()}},undefined,undefined,!1,null,null,null);ot.options.__file="src/components/Crosshair.vue";const st=ot.exports;var at=rt({name:"KeyboardListener",render:function(t){return t()},created:function(){this.$emit("register-kb-listener",{id:this._uid,keydown:this.keydown,keyup:this.keyup,keypress:this.keypress})},beforeDestroy:function(){this.$emit("remove-kb-listener",{id:this._uid})},methods:{keydown:function(t){this.$emit("keydown",t)},keyup:function(t){this.$emit("keyup",t)},keypress:function(t){this.$emit("keypress",t)}}},undefined,undefined,!1,null,null,null);at.options.__file="src/components/KeyboardListener.vue";const ct=at.exports;var ut=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{class:"trading-vue-grid-ux-"+t.id,style:t.style},t._l(t.uxs,(function(e){return n("ux-wrapper",{key:e.uuid,attrs:{ux:e,updater:t.updater,colors:t.colors,config:t.config},on:{"custom-event":t.on_custom_event}})})),1)};ut._withStripped=!0;var ht=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.visible?n("div",{staticClass:"trading-vue-ux-wrapper",style:t.style,attrs:{id:"tvjs-ux-wrapper-"+t.ux.uuid}},[n(t.ux.component,{tag:"component",attrs:{ux:t.ux,updater:t.updater,wrapper:t.wrapper,colors:t.colors},on:{"custom-event":t.on_custom_event}}),t._v(" "),t.ux.show_pin?n("div",{staticClass:"tvjs-ux-wrapper-pin",style:t.pin_style}):t._e(),t._v(" "),!1!==t.ux.win_header?n("div",{staticClass:"tvjs-ux-wrapper-head"},[n("div",{staticClass:"tvjs-ux-wrapper-close",style:t.btn_style,on:{click:t.close}},[t._v("×")])]):t._e()],1):t._e()};ht._withStripped=!0;const lt={name:"UxWrapper",props:["ux","updater","colors","config"],mounted:function(){this.self=document.getElementById(this.uuid),this.w=this.self.offsetWidth,this.h=this.self.offsetHeight,this.update_position()},created:function(){this.mouse.on("mousemove",this.mousemove),this.mouse.on("mouseout",this.mouseout)},beforeDestroy:function(){this.mouse.off("mousemove",this.mousemove),this.mouse.off("mouseout",this.mouseout)},methods:{update_position:function(){if(!this.uxr.hidden){var t=this.layout.width,e=this.layout.height,n=this.uxr.pin;switch(n[0]){case"cursor":var i=this.uxr.overlay.cursor.x;break;case"mouse":i=this.mouse.x;break;default:i="string"==typeof n[0]?this.parse_coord(n[0],t):this.layout.t2screen(n[0])}switch(n[1]){case"cursor":var r=this.uxr.overlay.cursor.y;break;case"mouse":r=this.mouse.y;break;default:r="string"==typeof n[1]?this.parse_coord(n[1],e):this.layout.$2screen(n[1])}this.x=i+this.ox,this.y=r+this.oy}},parse_coord:function(t,e){if("0"===(t=t.trim())||""===t)return 0;var n=t.split("+");if(2===n.length)return this.parse_coord(n[0],e)+this.parse_coord(n[1],e);var i=t.split("-");if(2===i.length)return this.parse_coord(i[0],e)-this.parse_coord(i[1],e);var r=t.split("%");if(2===r.length)return e*parseInt(r[0])/100;var o=t.split("px");return 2===o.length?parseInt(o[0]):void 0},mousemove:function(){this.update_position(),this.visible=!0},mouseout:function(){(this.uxr.pin.includes("cursor")||this.uxr.pin.includes("mouse"))&&(this.visible=!1)},on_custom_event:function(t){this.$emit("custom-event",t),"modify-interface"===t.event&&(this.self&&(this.w=this.self.offsetWidth,this.h=this.self.offsetHeight),this.update_position())},close:function(){this.$emit("custom-event",{event:"close-interface",args:[this.$props.ux.uuid]})}},computed:{uxr:function(){return this.$props.ux},layout:function(){return this.$props.ux.overlay.layout},settings:function(){return this.$props.ux.overlay.settings},uuid:function(){return"tvjs-ux-wrapper-".concat(this.uxr.uuid)},mouse:function(){return this.uxr.overlay.mouse},style:function(){var t={display:this.uxr.hidden?"none":void 0,left:"".concat(this.x,"px"),top:"".concat(this.y,"px"),"pointer-events":this.uxr.pointer_events||"all","z-index":this.z_index};return!1!==this.uxr.win_styling&&(t=Object.assign(t,{border:"1px solid ".concat(this.$props.colors.grid),"border-radius":"3px",background:"".concat(this.background)})),t},pin_style:function(){return{left:"".concat(-this.ox,"px"),top:"".concat(-this.oy,"px"),"background-color":this.uxr.pin_color}},btn_style:function(){return{background:"".concat(this.inactive_btn_color),color:"".concat(this.inactive_btn_color)}},pin_pos:function(){return this.uxr.pin_position?this.uxr.pin_position.split(","):["0","0"]},ox:function(){if(2===this.pin_pos.length)return-this.parse_coord(this.pin_pos[0],this.w)},oy:function(){if(2===this.pin_pos.length)return-this.parse_coord(this.pin_pos[1],this.h)},z_index:function(){return(this.settings["z-index"]||this.settings.zIndex||0)+(this.uxr.z_index||0)},background:function(){var t=this.uxr.background||this.$props.colors.back;return C.apply_opacity(t,this.uxr.background_opacity||this.$props.config.UX_OPACITY)},inactive_btn_color:function(){return this.uxr.inactive_btn_color||this.$props.colors.grid},wrapper:function(){return{x:this.x,y:this.y,pin_x:this.x-this.ox,pin_y:this.y-this.oy}}},watch:{updater:function(){this.update_position()}},data:function(){return{x:0,y:0,w:0,h:0,visible:!0}}};n(565);var dt=rt(lt,ht,[],!1,null,null,null);dt.options.__file="src/components/UxWrapper.vue";var ft=rt({name:"UxLayer",props:["tv_id","id","uxs","updater","colors","config"],components:{UxWrapper:dt.exports},created:function(){},mounted:function(){},beforeDestroy:function(){},methods:{on_custom_event:function(t){this.$emit("custom-event",t)}},computed:{style:function(){return{top:0!==this.$props.id?"1px":0,left:0,width:"100%",height:"calc(100% - 2px)",position:"absolute","z-index":"1","pointer-events":"none",overflow:"hidden"}}}},ut,[],!1,null,null,null);ft.options.__file="src/components/UxLayer.vue";const pt=ft.exports;function gt(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return vt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vt(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function vt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var At=function(){function t(e){G(this,t),this.comp=e,this.map={},this.listeners=0,this.pressed=!1,this.x=e.$props.cursor.x,this.y=e.$props.cursor.y,this.t=e.$props.cursor.t,this.y$=e.$props.cursor.y$}return H(t,[{key:"on",value:function(t,e,n){void 0===n&&(n="unshift"),e&&(this.map[t]=this.map[t]||[],this.map[t][n](e),this.listeners++)}},{key:"off",value:function(t,e){if(this.map[t]){var n=this.map[t].indexOf(e);n<0||(this.map[t].splice(n,1),this.listeners--)}}},{key:"emit",value:function(t,e){var n=this.comp.layout;if(t in this.map){var i,r=gt(this.map[t]);try{for(r.s();!(i=r.n()).done;){(0,i.value)(e)}}catch(t){r.e(t)}finally{r.f()}}"mousemove"===t&&(this.x=e.layerX,this.y=e.layerY,this.t=n.screen2t(this.x),this.y$=n.screen2$(this.y)),"mousedown"===t&&(this.pressed=!0),"mouseup"===t&&(this.pressed=!1)}}]),t}();const mt={props:["id","num","interval","cursor","colors","layout","sub","data","settings","grid_id","font","config","meta","tf","i0","last"],mounted:function(){this.draw||(this.draw=function(t){console.warn("EARLY ADOPTER BUG: reload the browser & enjoy")});var t=this.$props.sub===this.$props.data;this.meta_info();try{new Function("return "+this.$emit)(),this._$emit=this.$emit,this.$emit=this.custom_event}catch(t){return}this._$emit("new-grid-layer",{name:this.$options.name,id:this.$props.id,renderer:this,display:!("display"in this.$props.settings)||this.$props.settings.display,z:this.$props.settings["z-index"]||this.$props.settings.zIndex||(t?0:-1)}),this._$emit("layer-meta-props",{grid_id:this.$props.grid_id,layer_id:this.$props.id,legend:this.legend,data_colors:this.data_colors,y_range:this.y_range}),this.exec_script(),this.mouse=new At(this),this.init_tool&&this.init_tool(),this.init&&this.init()},beforeDestroy:function(){this.destroy&&this.destroy(),this._$emit("delete-grid-layer",this.$props.id)},methods:{use_for:function(){console.warn("use_for() should be implemented"),console.warn("Format: use_for() {\n return ['type1', 'type2', ...]\n }")},meta_info:function(){var t=this.$props.id;console.warn("".concat(t," meta_info() is req. for publishing")),console.warn("Format: meta_info() {\n author: 'Satoshi Smith',\n version: '1.0.0',\n contact (opt) '<email>'\n github: (opt) '<GitHub Page>',\n }")},custom_event:function(t){if("hook"!==t.split(":")[0]){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];"change-settings"!==t&&"object-selected"!==t&&"new-shader"!==t&&"new-interface"!==t&&"remove-tool"!==t||(n.push(this.grid_id,this.id),this.$props.settings.$uuid&&n.push(this.$props.settings.$uuid)),"new-interface"===t&&(n[0].overlay=this,n[0].uuid=this.last_ux_id="".concat(this.grid_id,"-").concat(this.id,"-").concat(this.uxs_count++)),"custom-event"!==t&&this._$emit("custom-event",{event:t,args:n})}},exec_script:function(){this.calc&&this.$emit("exec-script",{grid_id:this.$props.grid_id,layer_id:this.$props.id,src:this.calc(),use_for:this.use_for()})}},watch:{settings:{handler:function(t,e){this.watch_uuid&&this.watch_uuid(t,e),this._$emit("show-grid-layer",{id:this.$props.id,display:!("display"in this.$props.settings)||this.$props.settings.display})},deep:!0}},data:function(){return{uxs_count:0,last_ux_id:null}},render:function(t){return t()}};var yt=rt({name:"Spline",mixins:[mt],methods:{meta_info:function(){return{author:"C451",version:"1.1.2"}},draw:function(t){t.lineWidth=this.line_width,t.strokeStyle=this.color,t.beginPath();var e=this.$props.layout,n=this.data_index,i=this.$props.data;if(this.skip_nan){var r=!1;for(c=0,u=i.length;c<u;c++){var o=i[c],s=e.t2screen(o[0]),a=e.$2screen(o[n]);null==o[n]||a!=a?r=!0:(r&&t.moveTo(s,a),t.lineTo(s,a),r=!1)}}else for(var c=0,u=i.length;c<u;c++){var h=i[c],l=e.t2screen(h[0]),d=e.$2screen(h[n]);t.lineTo(l,d)}t.stroke()},use_for:function(){return["Spline","EMA","SMA"]},data_colors:function(){return[this.color]}},computed:{sett:function(){return this.$props.settings},line_width:function(){return this.sett.lineWidth||.75},color:function(){var t=this.$props.num%5;return this.sett.color||this.COLORS[t]},data_index:function(){return this.sett.dataIndex||1},skip_nan:function(){return this.sett.skipNaN}},data:function(){return{COLORS:["#42b28a","#5691ce","#612ff9","#d50b90","#ff2316"]}}},undefined,undefined,!1,null,null,null);yt.options.__file="src/components/overlays/Spline.vue";const _t=yt.exports;var wt=rt({name:"Splines",mixins:[mt],methods:{meta_info:function(){return{author:"C451",version:"1.1.0"}},draw:function(t){for(var e=0;e<this.lines_num;e++){var n=e%this.clrx.length;t.strokeStyle=this.clrx[n],t.lineWidth=this.widths[e]||this.line_width,t.beginPath(),this.draw_spline(t,e),t.stroke()}},draw_spline:function(t,e){var n=this.$props.layout,i=this.$props.data;if(this.skip_nan){var r=!1;for(c=0,u=i.length;c<u;c++){var o=i[c],s=n.t2screen(o[0]),a=n.$2screen(o[e+1]);null==o[e+1]||a!=a?r=!0:(r&&t.moveTo(s,a),t.lineTo(s,a),r=!1)}}else for(var c=0,u=i.length;c<u;c++){var h=i[c],l=n.t2screen(h[0]),d=n.$2screen(h[e+1]);t.lineTo(l,d)}},use_for:function(){return["Splines","DMI"]},data_colors:function(){return this.clrx}},computed:{sett:function(){return this.$props.settings},line_width:function(){return this.sett.lineWidth||.75},widths:function(){return this.sett.lineWidths||[]},clrx:function(){var t=this.sett.colors||[],e=this.$props.num;if(!t.length)for(var n=0;n<this.lines_num;n++)t.push(this.COLORS[(e+n)%5]);return t},lines_num:function(){return this.$props.data[0]?this.$props.data[0].length-1:0},skip_nan:function(){return this.sett.skipNaN}},data:function(){return{COLORS:["#42b28a","#5691ce","#612ff9","#d50b90","#ff2316"]}}},undefined,undefined,!1,null,null,null);wt.options.__file="src/components/overlays/Splines.vue";const bt=wt.exports;var xt=rt({name:"Range",mixins:[mt],methods:{meta_info:function(){return{author:"C451",version:"1.0.1"}},draw:function(t){var e=this.$props.layout,n=e.$2screen(this.sett.upper||70),i=e.$2screen(this.sett.lower||30),r=this.$props.data;t.lineWidth=this.line_width,t.strokeStyle=this.color,t.beginPath();for(var o=0,s=r.length;o<s;o++){var a=r[o],c=e.t2screen(a[0]),u=e.$2screen(a[1]);t.lineTo(c,u)}t.stroke(),t.strokeStyle=this.band_color,t.setLineDash([5]),t.beginPath(),t.fillStyle=this.back_color,t.fillRect(0,n,e.width,i-n),t.moveTo(0,n),t.lineTo(e.width,n),t.moveTo(0,i),t.lineTo(e.width,i),t.stroke()},use_for:function(){return["Range","RSI"]},data_colors:function(){return[this.color]},y_range:function(t,e){return[Math.max(t,this.sett.upper||70),Math.min(e,this.sett.lower||30)]}},computed:{sett:function(){return this.$props.settings},line_width:function(){return this.sett.lineWidth||.75},color:function(){return this.sett.color||"#ec206e"},band_color:function(){return this.sett.bandColor||"#ddd"},back_color:function(){return this.sett.backColor||"#381e9c16"}}},undefined,undefined,!1,null,null,null);xt.options.__file="src/components/overlays/Range.vue";const kt=xt.exports;var Ct=rt({name:"Trades",mixins:[mt],methods:{meta_info:function(){return{author:"C451",version:"1.0.2"}},draw:function(t){var e=this.$props.layout,n=this.$props.data;t.lineWidth=1.5,t.strokeStyle="black";for(var i=0,r=n.length;i<r;i++){var o=n[i];t.fillStyle=o[1]?this.buy_color:this.sell_color,t.beginPath();var s=e.t2screen(o[0]),a=e.$2screen(o[2]);t.arc(s,a,this.marker_size+.5,0,2*Math.PI,!0),t.fill(),t.stroke(),this.show_label&&o[3]&&this.draw_label(t,s,a,o)}},draw_label:function(t,e,n,i){t.fillStyle=this.label_color,t.font=this.new_font,t.textAlign="center",t.fillText(i[3],e,n-25)},use_for:function(){return["Trades"]},legend:function(t){switch(t[1]){case 0:var e="Sell";break;case 1:e="Buy";break;default:e="Unknown"}return[{value:e},{value:t[2].toFixed(4),color:this.$props.colors.text}].concat(t[3]?[{value:t[3]}]:[])}},computed:{sett:function(){return this.$props.settings},default_font:function(){return"12px "+this.$props.font.split("px").pop()},buy_color:function(){return this.sett.buyColor||"#63df89"},sell_color:function(){return this.sett.sellColor||"#ec4662"},label_color:function(){return this.sett.labelColor||"#999"},marker_size:function(){return this.sett.markerSize||5},show_label:function(){return!1!==this.sett.showLabel},new_font:function(){return this.sett.font||this.default_font}}},undefined,undefined,!1,null,null,null);Ct.options.__file="src/components/overlays/Trades.vue";const Bt=Ct.exports;var Et=rt({name:"Channel",mixins:[mt],methods:{meta_info:function(){return{author:"C451",version:"1.0.1"}},draw:function(t){var e=this.data,n=this.layout;t.beginPath(),t.fillStyle=this.back_color;for(var i=0;i<e.length;i++){var r=e[i],o=n.t2screen(r[0]),s=n.$2screen(r[1]||void 0);t.lineTo(o,s)}for(i=e.length-1;i>=0;i--){var a=e[i],c=n.t2screen(a[0]),u=n.$2screen(a[3]||void 0);t.lineTo(c,u)}t.fill(),t.lineWidth=this.line_width,t.strokeStyle=this.color,t.beginPath();for(i=0;i<e.length;i++){var h=e[i],l=n.t2screen(h[0]),d=n.$2screen(h[1]||void 0);t.lineTo(l,d)}t.stroke(),t.beginPath();for(i=0;i<e.length;i++){var f=e[i],p=n.t2screen(f[0]),g=n.$2screen(f[3]||void 0);t.lineTo(p,g)}if(t.stroke(),this.show_mid){t.beginPath();for(i=0;i<e.length;i++){var v=e[i],A=n.t2screen(v[0]),m=n.$2screen(v[2]||void 0);t.lineTo(A,m)}t.stroke()}},mapp:function(t){var e=this.$props.layout;return t&&{x:e.t2screen(t[0]),y1:e.$2screen(t[1]),y2:e.$2screen(t[2]),y3:e.$2screen(t[3])}},use_for:function(){return["Channel","KC","BB"]},data_colors:function(){return[this.color,this.color,this.color]}},computed:{sett:function(){return this.$props.settings},line_width:function(){return this.sett.lineWidth||.75},color:function(){var t=this.$props.num%5;return this.sett.color||this.COLORS[t]},show_mid:function(){return!("showMid"in this.sett)||this.sett.showMid},back_color:function(){return this.sett.backColor||this.color+"11"}},data:function(){return{COLORS:["#42b28a","#5691ce","#612ff9","#d50b90","#ff2316"]}}},undefined,undefined,!1,null,null,null);Et.options.__file="src/components/overlays/Channel.vue";const It=Et.exports;var St=rt({name:"Segment",mixins:[mt],methods:{meta_info:function(){return{author:"C451",version:"1.0.0"}},draw:function(t){if(this.p1&&this.p2){t.lineWidth=this.line_width,t.strokeStyle=this.color,t.beginPath();var e=this.$props.layout,n=e.t2screen(this.p1[0]),i=e.$2screen(this.p1[1]);t.moveTo(n,i);var r=e.t2screen(this.p2[0]),o=e.$2screen(this.p2[1]);t.lineTo(r,o),t.stroke()}},use_for:function(){return["Segment"]},data_colors:function(){return[this.color]}},computed:{sett:function(){return this.$props.settings},p1:function(){return this.$props.settings.p1},p2:function(){return this.$props.settings.p2},line_width:function(){return this.sett.lineWidth||.9},color:function(){var t=this.$props.num%5;return this.sett.color||this.COLORS[t]}},data:function(){return{COLORS:["#42b28a","#5691ce","#612ff9","#d50b90","#ff2316"]}}},undefined,undefined,!1,null,null,null);St.options.__file="src/components/overlays/Segment.vue";const Mt=St.exports;function Tt(t){for(var e,n,i,r=t.$props,o=r.data,a=r.layout.t2screen,c=r.layout,u=[],h=[],l=Math.max.apply(Math,s(o.map((function(t){return t[5]})))),d=r.config.VOLSCALE*c.height/l,f=void 0,p=w(Dt(c,r,o),2),g=p[0],v=p[1],A=c.px_step*v,m=A>5?1:0,y=0;y<o.length;y++){var _=o[y];i=a(_[0])+1,o[y-1]&&_[0]-o[y-1][0]>g&&(f=null),e=f||Math.floor(i-.5*A),n=Math.floor(i+.5*A)-.5,u.push({x:i,w:c.px_step*r.config.CANDLEW*v,o:Math.floor(_[1]*c.A+c.B),h:Math.floor(_[2]*c.A+c.B),l:Math.floor(_[3]*c.A+c.B),c:Math.floor(_[4]*c.A+c.B),raw:_}),h.push({x1:e,x2:n,h:_[5]*d,green:_[4]>=_[1],raw:_}),f=n+m}return{candles:u,volume:h}}function Ot(t){var e=t.$props,n=e.data,i=e.layout.t2screen,r=e.layout,o=[],a=n[0]?n[0].length:0;t._i1=a<6?1:5,t._i2=a<6?function(t){return t[2]}:function(t){return t[4]>=t[1]};for(var c,u,h,l=Math.max.apply(Math,s(n.map((function(e){return e[t._i1]})))),d=(t.volscale||e.config.VOLSCALE)*r.height/l,f=void 0,p=w(Dt(r,e,n),2),g=p[0],v=p[1],A=r.px_step*v,m=A>5?1:0,y=0;y<n.length;y++){var _=n[y];h=i(_[0])+1,n[y-1]&&_[0]-n[y-1][0]>g&&(f=null),c=f||Math.floor(h-.5*A),u=Math.floor(h+.5*A)-.5,o.push({x1:c,x2:u,h:_[t._i1]*d,green:t._i2(_),raw:_}),f=u+m}return o}function Dt(t,e,n){if(t.ti_map.ib)if(e.tf)i=r=e.tf/t.ti_map.tf;else r=(i=C.detect_interval(n))/e.interval;else var i,r=(i=e.tf||C.detect_interval(n))/e.interval;return[i,r]}var Qt=function(){function t(e,n,i){G(this,t),this.ctx=n,this.self=e,this.style=i.raw[6]||this.self,this.draw(i)}return H(t,[{key:"draw",value:function(t){var e=t.raw[4]>=t.raw[1],n=e?this.style.colorCandleUp:this.style.colorCandleDw,i=e?this.style.colorWickUp:this.style.colorWickDw,r=Math.max(t.w,1),o=Math.max(Math.floor(.5*r),1),s=Math.abs(t.o-t.c),a=t.c===t.o?1:2,c=Math.floor(t.x)-.5;if(this.ctx.strokeStyle=i,this.ctx.beginPath(),this.ctx.moveTo(c,Math.floor(t.h)),this.ctx.lineTo(c,Math.floor(t.l)),this.ctx.stroke(),t.w>1.5){this.ctx.fillStyle=n;var u=e?1:-1;this.ctx.fillRect(Math.floor(t.x-o-1),t.c,Math.floor(2*o+1),u*Math.max(s,a))}else this.ctx.strokeStyle=n,this.ctx.beginPath(),this.ctx.moveTo(c,Math.floor(Math.min(t.o,t.c))),this.ctx.lineTo(c,Math.floor(Math.max(t.o,t.c))+(t.o===t.c?1:0)),this.ctx.stroke()}}]),t}(),Rt=function(){function t(e,n,i){G(this,t),this.ctx=n,this.$p=e.$props,this.self=e,this.style=i.raw[6]||this.self,this.draw(i)}return H(t,[{key:"draw",value:function(t){var e=this.$p.layout.height,n=t.x2-t.x1,i=Math.floor(t.h);this.ctx.fillStyle=t.green?this.style.colorVolUp:this.style.colorVolDw,this.ctx.fillRect(Math.floor(t.x1),Math.floor(e-i-.5),Math.floor(n),Math.floor(i+1))}}]),t}(),Yt=function(){function t(e){G(this,t),this.comp=e}return H(t,[{key:"init_shader",value:function(){var t=this,e=this.comp.$props.layout,n=this.comp.$props.config,i=this.comp;this.comp.$emit("new-shader",{target:"sidebar",draw:function(r){var o=t.last_bar();if(o){var s=r.canvas.width,a=n.PANHEIGHT,c=o.price.toFixed(e.prec);r.fillStyle=o.color;var u=o.y-.5*a-.5;r.fillRect(-1,u,s+1,a),r.fillStyle=i.$props.colors.textHL,r.textAlign="left",r.fillText(c,7,u+15)}}}),this.shader=!0}},{key:"draw",value:function(t){if(this.comp.$props.meta.last){this.shader||this.init_shader();var e=this.comp.$props.layout,n=this.comp.$props.last,i=n[4]>=n[1],r=i?this.green():this.red(),o=e.$2screen(n[4])+(i?1:0);t.strokeStyle=r,t.setLineDash([1,1]),t.beginPath(),t.moveTo(0,o),t.lineTo(e.width,o),t.stroke(),t.setLineDash([])}}},{key:"last_bar",value:function(){if(this.comp.data.length){var t=this.comp.$props.layout,e=this.comp.data[this.comp.data.length-1];return{y:t.$2screen(e[4]),price:e[4],color:e[4]>=e[1]?this.green():this.red()}}}},{key:"last_price",value:function(){return this.comp.$props.meta.last?this.comp.$props.meta.last[4]:void 0}},{key:"green",value:function(){return this.comp.colorCandleUp}},{key:"red",value:function(){return this.comp.colorCandleDw}}]),t}();var jt=rt({name:"Candles",mixins:[mt],methods:{meta_info:function(){return{author:"C451",version:"1.2.1"}},init:function(){this.price=new Yt(this)},draw:function(t){if(this.$props.sub===this.$props.data)var e={candles:this.$props.layout.candles,volume:this.$props.layout.volume};else e=Tt(this);if(this.show_volume)for(var n=e.volume,i=0,r=n.length;i<r;i++)new Rt(this,t,n[i]);var o=e.candles;for(i=0,r=o.length;i<r;i++)new Qt(this,t,o[i]);this.price_line&&this.price.draw(t)},use_for:function(){return["Candles"]},y_range:function(){for(var t=-1/0,e=1/0,n=0,i=this.sub.length;n<i;n++){var r=this.sub[n];r[2]>t&&(t=r[2]),r[3]<e&&(e=r[3])}return[t,e]}},computed:{sett:function(){return this.$props.settings},show_volume:function(){return!("showVolume"in this.sett)||this.sett.showVolume},price_line:function(){return!("priceLine"in this.sett)||this.sett.priceLine},colorCandleUp:function(){return this.sett.colorCandleUp||this.$props.colors.candleUp},colorCandleDw:function(){return this.sett.colorCandleDw||this.$props.colors.candleDw},colorWickUp:function(){return this.sett.colorWickUp||this.$props.colors.wickUp},colorWickDw:function(){return this.sett.colorWickDw||this.$props.colors.wickDw},colorWickSm:function(){return this.sett.colorWickSm||this.$props.colors.wickSm},colorVolUp:function(){return this.sett.colorVolUp||this.$props.colors.volUp},colorVolDw:function(){return this.sett.colorVolDw||this.$props.colors.volDw}},data:function(){return{price:{}}}},undefined,undefined,!1,null,null,null);jt.options.__file="src/components/overlays/Candles.vue";const Ut=jt.exports;function Lt(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Nt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nt(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function Nt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var Ft=rt({name:"Volume",mixins:[mt],methods:{meta_info:function(){return{author:"C451",version:"1.1.0"}},draw:function(t){var e,n=Lt(Ot(this));try{for(n.s();!(e=n.n()).done;){var i=e.value;new Rt(this,t,i)}}catch(t){n.e(t)}finally{n.f()}},use_for:function(){return["Volume"]},legend:function(t){var e=(this._i2?this._i2(t):t[2])?this.colorVolUpLegend:this.colorVolDwLegend;return[{value:t[this._i1||1],color:e}]},y_range:function(t,e){var n=this;if(5===this._i1){var i=this.$props.sub;return[Math.max.apply(Math,s(i.map((function(t){return t[n._i1]})))),Math.min.apply(Math,s(i.map((function(t){return t[n._i1]}))))]}return[t,e]}},computed:{sett:function(){return this.$props.settings},colorVolUp:function(){return this.sett.colorVolUp||this.$props.colors.volUp},colorVolDw:function(){return this.sett.colorVolDw||this.$props.colors.volDw},colorVolUpLegend:function(){return this.sett.colorVolUpLegend||this.$props.colors.candleUp},colorVolDwLegend:function(){return this.sett.colorVolDwLegend||this.$props.colors.candleDw},volscale:function(){return this.sett.volscale||this.$props.grid_id>0?.85:this.$props.config.VOLSCALE}},data:function(){return{}}},undefined,undefined,!1,null,null,null);Ft.options.__file="src/components/overlays/Volume.vue";const Gt=Ft.exports;var Kt=rt({name:"Splitters",mixins:[mt],methods:{meta_info:function(){return{author:"C451",version:"1.0.1"}},draw:function(t){var e=this,n=this.$props.layout;t.lineWidth=this.line_width,t.strokeStyle=this.line_color,this.$props.data.forEach((function(i,r){t.beginPath();var o=n.t2screen(i[0]);t.setLineDash([10,10]),t.moveTo(o,0),t.lineTo(o,e.layout.height),t.stroke(),i[1]&&e.draw_label(t,o,i)}))},draw_label:function(t,e,n){var i=n[2]?1:-1;e+=2.5*i,t.font=this.new_font;var r=n[4]||this.y_position,o=t.measureText(n[1]).width+10,s=this.layout.height*(1-r);s=Math.floor(s),t.fillStyle=n[3]||this.flag_color,t.beginPath(),t.moveTo(e,s),t.lineTo(e+10*i,s-10*i),t.lineTo(e+(o+10)*i,s-10*i),t.lineTo(e+(o+10)*i,s+10*i),t.lineTo(e+10*i,s+10*i),t.closePath(),t.fill(),t.fillStyle=this.label_color,t.textAlign=i<0?"right":"left",t.fillText(n[1],e+15*i,s+4)},use_for:function(){return["Splitters"]}},computed:{sett:function(){return this.$props.settings},new_font:function(){return this.sett.font||"12px "+this.$props.font.split("px").pop()},flag_color:function(){return this.sett.flagColor||"#4285f4"},label_color:function(){return this.sett.labelColor||"#fff"},line_color:function(){return this.sett.lineColor||"#4285f4"},line_width:function(){return this.sett.lineWidth||1},y_position:function(){return this.sett.yPosition||.9}},data:function(){return{}}},undefined,undefined,!1,null,null,null);Kt.options.__file="src/components/overlays/Splitters.vue";const Ht=Kt.exports;function Jt(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Pt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pt(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function Pt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var zt=function(){function t(e){G(this,t),this.comp=e,this.map={},this.listeners=0,this.keymap={}}return H(t,[{key:"on",value:function(t,e){e&&(this.map[t]=this.map[t]||[],this.map[t].push(e),this.listeners++)}},{key:"emit",value:function(t,e){if(t in this.map){var n,i=Jt(this.map[t]);try{for(i.s();!(n=i.n()).done;){(0,n.value)(e)}}catch(t){i.e(t)}finally{i.f()}}"keydown"===t&&(this.keymap[e.key]||this.emit(e.key),this.keymap[e.key]=!0),"keyup"===t&&(this.keymap[e.key]=!1)}},{key:"pressed",value:function(t){return this.keymap[t]}}]),t}();function $t(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return qt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qt(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function qt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}const Wt={methods:{init_tool:function(){var t=this;this.collisions=[],this.pins=[],this.mouse.on("mousemove",(function(e){t.collisions.some((function(e){return e(t.mouse.x,t.mouse.y)}))?t.show_pins=!0:t.show_pins=!1,t.drag&&t.drag_update()})),this.mouse.on("mousedown",(function(e){C.default_prevented(e)||t.collisions.some((function(e){return e(t.mouse.x,t.mouse.y)}))&&(t.selected||t.$emit("object-selected"),t.start_drag(),e.preventDefault(),t.pins.forEach((function(t){return t.mousedown(e,!0)})))})),this.mouse.on("mouseup",(function(e){t.drag=null,t.$emit("scroll-lock",!1)})),this.keys=new zt(this),this.keys.on("Delete",this.remove_tool),this.keys.on("Backspace",this.remove_tool),this.show_pins=!1,this.drag=null},render_pins:function(t){(this.selected||this.show_pins)&&this.pins.forEach((function(e){return e.draw(t)}))},set_state:function(t){this.$emit("change-settings",{$state:t})},watch_uuid:function(t,e){if(t.$uuid!==e.$uuid){var n,i=$t(this.pins);try{for(i.s();!(n=i.n()).done;){(e=n.value).re_init()}}catch(t){i.e(t)}finally{i.f()}this.collisions=[],this.show_pins=!1,this.drag=null}},pre_draw:function(){this.collisions=[]},remove_tool:function(){this.selected&&this.$emit("remove-tool")},start_drag:function(){this.$emit("scroll-lock",!0);var t=this.$props.cursor;this.drag={t:t.t,y$:t.y$},this.pins.forEach((function(t){return t.rec_position()}))},drag_update:function(){var t=this.$props.cursor.t-this.drag.t,e=this.$props.cursor.y$-this.drag.y$;this.pins.forEach((function(n){return n.update_from([n.t1+t,n.y$1+e],!0)}))}},computed:{selected:function(){return this.$props.settings.$selected},state:function(){return this.$props.settings.$state}}},Xt=JSON.parse('{"extended.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZAQMAAAD+JxcgAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAZQTFRFAAAATU1NkJ+rOQAAAAJ0Uk5TAP9bkSK1AAAANElEQVR4nGNggABGEMEEIlhABAeI+AASF0AlHmAqA4kzKAAx8wGQuAMKwd6AoYzBAWonAwAcLwTgNfJ3RQAAAABJRU5ErkJggg==","ray.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZAQMAAAD+JxcgAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAZQTFRFAAAATU1NkJ+rOQAAAAJ0Uk5TAP9bkSK1AAAAMklEQVR4nGNgQAJMIIIFRHCACAEQoQAiHICYvQEkjkrwYypjAIkzwk2zAREuqIQFzD4AE3kE4BEmGggAAAAASUVORK5CYII=","segment.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZAgMAAAC5h23wAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAlQTFRFAAAATU1NJCQkCxcHIQAAAAN0Uk5TAP8SmutI5AAAACxJREFUeJxjYMACGAMgNAsLdpoVKi8AVe8A1QblQlWRKt0AoULw2w1zGxoAABdiAviQhF/mAAAAAElFTkSuQmCC","add.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAMAAADyHTlpAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAH5QTFRFAAAAAAAAAAAAAAAAAAAAAAAAAAAACgoKBgYGGxsbKioqPz8/Pj4+BQUFCQkJAQEBZGRkh4eHAgICEBAQNjY2g4ODgYGBAAAAAwMDeXl5d3d3GBgYERERgICAgICANDQ0PDw8Y2NjCAgIhYWFGhoaJycnOjo6YWFhgICAdXV14Y16sQAAACp0Uk5TAAILDxIKESEnJiYoKCgTKSkpKCAnKSkFKCkpJiDl/ycpKSA2JyYpKSkpOkQ+xgAAARdJREFUeJzllNt2gyAQRTWiRsHLoDU0GpPYmMv//2BMS+sgl6Z9bM8bi73gnJkBz/sn8lcBIUHofwtG8TpJKUuTLI6cYF7QEqRKynP71VX9AkhNXVlsbMQrLLQVGyPZLsGHWgPrCxMJwHUPlXa79NBp2et5d9f3u3m1XxatQNn7SagOXCUjCjYUDuqxcWlHj4MSfw12FDJchFViRN8+1qcQoUH6lR1L1mEMEErofB6WzEUwylzomfzOQGiOJdXiWH7mQoUyMa4WXJQWOBvLFvPCGxt6FSr5kyH0qi0YddNG2/pgCsOjff4ZTizXPNwKIzl56OoGg9d9Z/+5cs6On+CFCfevFQ3ZaTycx1YMbvDdRvjkp/lHdAcPXzokxcwfDwAAAABJRU5ErkJggg==","cursor.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZAgMAAAC5h23wAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAxQTFRFAAAATU1NTU1NTU1NwlMHHwAAAAR0Uk5TAOvhxbpPrUkAAAAkSURBVHicY2BgYHBggAByabxg1WoGBq2pRCk9AKUbcND43AEAufYHlSuusE4AAAAASUVORK5CYII=","display_off.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAMAAADyHTlpAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAU1QTFRFAAAAh4eHh4eHAAAAAAAAAAAAAwMDAAAAAAAAhoaGGBgYgYGBAAAAPz8/AgICg4ODCQkJhISEh4eHh4eHPj4+NjY2gYGBg4ODgYGBgYGBgoKCAQEBJycngoKChYWFEBAQg4ODCAgIKioqZGRkCgoKBQUFERERd3d3gYGBGxsbNDQ0hISEgYGBPDw8gYGBgYGBh4eHh4eHhYWFh4eHgoKChYWFgYGBgYGBg4ODhoaGg4ODYWFhgoKCBgYGdXV1goKCg4ODgYGBgICAgYGBAAAAg4ODhYWFhISEh4eHgoKChYWFOjo6goKCGhoah4eHh4eHh4eHgoKCh4eHeXl5hoaGgoKChISEgYGBgYGBgoKCY2NjgYGBgoKCh4eHgoKCgYGBhoaGg4ODhoaGhYWFh4eHgYGBhoaGhoaGhoaGg4ODgoKChISEgoKChYWFh4eHfKktUwAAAG90Uk5TACn/AhEFKA8SLCbxCigoVBNKUTYoJ/lh3PyAKSaTNiBtICYpISggKSkmJ0LEKef3lGxA8rn//+pcMSkpnCcptHPJKe0LUjnx5LzKKaMnX73hl64pLnhkzNSgKeLv17LQ+liIzaLe7PfTw5tFpz3K1fXR/gAAAgBJREFUeJzllNdXwjAUxknB0lIoCKVsGTIFQRAZ7r333nuv///R3LZ4mlDQZ/0ekp7b37n5bnITk+mfy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AAAAgICAgICAgICAf39/Li4ugICAcHBwgoKCgICAgoKCgICAg4ODgYGBPj4+goKCgICAhISEgYGBgICAgoKCgICAgYGBgYGBf39/gICAgICAIdPQHAAAADd0Uk5TACn/KAIRIBMFDwooKyApKSknKSYmzCcmKfL7JRCUi2L3J7IpcLUrr0VbKXntNEnkMbxrUcG56CMpi50AAAFZSURBVHic5ZRpf4MgDIeFKFatWm/tfW091u7evv9Hm1Acoujm2y0vFPH5Jf+EEE37J6bblmlatv4jaBCI4rMfR0CMXtAEJ0fccgfM7tAkQHXzArdDxggmqGETGCnJWROkNlOwOqhIhKCtgbSicw1uK/dATSK0aRatIzytA8ik4XSiyJnLSm+VPxULgeyLI3uHRJH+qcB4WZGrKb4c20WwI7b3iUt74OS6XD+xZWrXUCtme0uKTvfcJ65CZFa9VOebqwXmft+oT8yF+/VymT4XeGB+Xx8L+j4gBcoFIDT+oMz6Qp93Y74pCeBpUXaLuW0rUk6r1iv3nP322ewYkgv2nZIvgpSPQDrY5wTjRJDNg9XAE/+uSXIVX812GdKEmtvR2rtWaw+5MAOuofJy79SXu9TgBl4d9DZdI0NjgyiswNCB/qk1J5Bmvp+lQOa9IJNhW4bxm6H5R+wLQYMSQXZNzbcAAAAASUVORK5CYII=","price_range.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZAQMAAAD+JxcgAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAZQTFRFAAAATU1NkJ+rOQAAAAJ0Uk5TAP9bkSK1AAAAIUlEQVR4nGNggAPm/w9gTA4QIQMitECEJ1yMEgLNDiAAADfgBMRu78GgAAAAAElFTkSuQmCC","price_time.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZAQMAAAD+JxcgAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAZQTFRFAAAATU1NkJ+rOQAAAAJ0Uk5TAP9bkSK1AAAAOklEQVR4nGNggAPm/w9gTA4QIQPEClpMQMITRHCACScQoQQihBgY9P//grKgYk5wdTACYhQHFjuAAABZFAlc4e1fcQAAAABJRU5ErkJggg==","remove.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAMAAADyHTlpAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAK5QTFRFAAAAh4eHgICAAAAAAAAAh4eHAAAAAwMDAAAAAAAAgICAGBgYAAAAPz8/AgICgICACQkJhoaGhoaGgICAPj4+NjY2gYGBg4ODgYGBAQEBJycngoKCEBAQgICAgICACAgIKioqZGRkCgoKBQUFERERd3d3gYGBGxsbNDQ0gICAPDw8YWFhBgYGdXV1gICAg4ODgICAAAAAOjo6GhoaeXl5gICAhYWFY2NjhYWFgICA9O0oCgAAADp0Uk5TACn/AhErBSgPEvEmCigowxMuMcgoJ7hWrCkmdCD6vSAmKSEoICkpJie6KSknKSkp0wspJynCMik11rrLte8AAAFwSURBVHic5ZTXkoIwFIZNAAPSpKkoRQV7Wcva3v/FFiRmEwise7t7bs7MP98k/ylJq/VPQjjKiiJrwo+gON0uxro7XiRTsRHs+voE4JjoRrf+6sD7AFTMvaDGRht9glLMUJtLqmUwD5XDCohHAmBUPQSV27GHtFK7xycBWJab5uPaR+Hlmue7GfZxHwyWFHVMQghXFgD2A8IOZtfssdNJIXcyFEaSfchzp9BuMVP+Fhvr5Qh0nGfqYTGhm3BcYFUaQBKOhMWzRqHyGFRY03ppQ5lCFZ30RloVZGQTaa3QqEt0OyrQnkSkk8I1YJkvAwPCMgY0UpbzXRZhVbosIWGbZTLNQszGMCM42FJEjWDDjIAMtp+xj6x2K+/DqNDc0r4Yc8yGl3uer2aIyT1iyd8sYSuY8cldZbVrH4zPebTvP8OMNSoedj6XzDyk3pwG98u0/ufqGu7tBW5c1PxriXFyHq5PQxXFzeDThvbmp/lH4gt6WxfZ03H8DwAAAABJRU5ErkJggg==","settings.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUg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r+6RtjIOlgbCjMBUdzc2t7ZzbJ7zAQ4p6GSfRVNwkeKLsvCg31w2JBdjlT0GDxZNzEnpcQ+xWfnFxeXVyp6Tay07gq+L/YUOoBvbomV0V8skiq//DutWfeEfJD1JPLCED4+Pb8kX986tApNQ4iqfSJT76bRzvlgBPODQXW/foYqK5lyeBeYJEL1gaoeGnwIBhjRoQ9SZgTAdEbO/9cKRfmZ+MpGPCVHQ3nBzzS4hKIkuNyh/5g+ALiAXSSas9hwAAAAAElFTkSuQmCC","time_range.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZAQMAAAD+JxcgAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAZQTFRFAAAATU1NkJ+rOQAAAAJ0Uk5TAP9bkSK1AAAAJElEQVR4nGNgwAsUGJhQCScQoQQihBgY9P//grKgYk4YOvACACOpBKG6Svj+AAAAAElFTkSuQmCC","trash.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZAQMAAAD+JxcgAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAZQTFRFAAAATU1NkJ+rOQAAAAJ0Uk5TAP9bkSK1AAAALUlEQVR4nGNgAIN6ENHQACX4//9gYBBgYIESYC4LkA0lPEkmGFAI5v8PILYCAHygDJxlK0RUAAAAAElFTkSuQmCC","up.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAMAAADyHTlpAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAMZQTFRFAAAAh4eHgICAAAAAAAAAAAAAAwMDAAAAAAAAGBgYAAAAPz8/AgICCQkJgICAh4eHPj4+NjY2AQEBJycnEBAQgICAgICACAgIKioqZGRkCgoKBQUFgYGBERERd3d3gYGBGxsbNDQ0gICAgYGBPDw8gYGBh4eHgICAYWFhBgYGgYGBdXV1goKCg4ODhYWFgICAgoKCAAAAhISEOjo6gICAGhoagYGBeXl5hoaGgICAY2Njg4ODgoKCgoKCgYGBgoKCg4ODgoKC64uw1gAAAEJ0Uk5TACn/AhEFKA8SJgooKBP7KignKSYg9c0gJikhKLQgKSkmJ7ywKY8s5SknlClxKTMpXwtFKe0neiku8ClKWmSbbFFjM5GHSgAAAW5JREFUeJzllGd/gjAQxk3AMFWWOHDvVa2rVbu//5cqhJWQQO3b9nkVjv/v7rnLKJX+iYS9JMuSKvwIiu3loKkZzYHXFgvBiqW1QKSWplfySzvmAyDUN50cG2X0DDLqoTKXVLJgIIXDCohHAqCzHhymeuShy/Ru8kkAhtmhWUTvW9fdEnPQaVLU0n8XF0L3kn5P6LTtZPKgNoK+RrUkcGtQ7S9TsgOxxinrkUPYD+LwLCIh7CTsWSVQqRmTuPqpitlZFLQlApXjrsYBc335wOw47ksmUSMMrgKi/gnAE/awCqNHmTUwDf5X34LlBuedsgbUsK15kPMxTIXzzvFSIdsSPBw7nGD1K+7bL3F9xStEnZhoCw71TbpL71GBBbUF1MZmZWTOi97PI3eIJn9zCEtOj0+umaOde2EszqW9/xr6rM54WFtc0vfQNak57Ibd/Jerohu3GFwYqPjVEhve2Z4cbQU1ikFsQ73z0fwj+ga3VBezGuggFQAAAABJRU5ErkJggg=="}');function Vt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Zt=function(){function t(e,n,i){var r=this;void 0===i&&(i={}),G(this,t),this.RADIUS=e.$props.config.PIN_RADIUS||5.5,this.RADIUS_SQ=Math.pow(this.RADIUS+7,2),C.is_mobile&&(this.RADIUS+=2,this.RADIUS_SQ*=2.5),this.COLOR_BACK=e.$props.colors.back,this.COLOR_BR=e.$props.colors.text,this.comp=e,this.layout=e.layout,this.mouse=e.mouse,this.name=n,this.state=i.state||"settled",this.hidden=i.hidden||!1,this.mouse.on("mousemove",(function(t){return r.mousemove(t)})),this.mouse.on("mousedown",(function(t){return r.mousedown(t)})),this.mouse.on("mouseup",(function(t){return r.mouseup(t)})),"finished"===e.state?(this.state="settled",this.update_from(e.$props.settings[n])):this.update(),"settled"!==this.state&&this.comp.$emit("scroll-lock",!0)}return H(t,[{key:"re_init",value:function(){this.update_from(this.comp.$props.settings[this.name])}},{key:"draw",value:function(t){if(!this.hidden)switch(this.state){case"tracking":break;case"dragging":this.moved||this.draw_circle(t);break;case"settled":this.draw_circle(t)}}},{key:"draw_circle",value:function(t){if(this.layout=this.comp.layout,this.comp.selected)var e=this.RADIUS,n=1.5;else e=.95*this.RADIUS,n=1;t.lineWidth=n,t.strokeStyle=this.COLOR_BR,t.fillStyle=this.COLOR_BACK,t.beginPath(),t.arc(this.x=this.layout.t2screen(this.t),this.y=this.layout.$2screen(this.y$),e+.5,0,2*Math.PI,!0),t.fill(),t.stroke()}},{key:"update",value:function(){this.y$=this.comp.$props.cursor.y$,this.y=this.comp.$props.cursor.y,this.t=this.comp.$props.cursor.t,this.x=this.comp.$props.cursor.x,this.comp.$emit("change-settings",Vt({},this.name,[this.t,this.y$]))}},{key:"update_from",value:function(t,e){void 0===e&&(e=!1),t&&(this.layout=this.comp.layout,this.y$=t[1],this.y=this.layout.$2screen(this.y$),this.t=t[0],this.x=this.layout.t2screen(this.t),e&&this.comp.$emit("change-settings",Vt({},this.name,[this.t,this.y$])))}},{key:"rec_position",value:function(){this.t1=this.t,this.y$1=this.y$}},{key:"mousemove",value:function(t){switch(this.state){case"tracking":case"dragging":this.moved=!0,this.update()}}},{key:"mousedown",value:function(t,e){if(void 0===e&&(e=!1),!C.default_prevented(t)||e){switch(this.state){case"tracking":this.state="settled",this.on_settled&&this.on_settled(),this.comp.$emit("scroll-lock",!1);break;case"settled":if(this.hidden)return;this.hover()&&(this.state="dragging",this.moved=!1,this.comp.$emit("scroll-lock",!0),this.comp.$emit("object-selected"))}this.hover()&&t.preventDefault()}}},{key:"mouseup",value:function(t){switch(this.state){case"dragging":this.state="settled",this.on_settled&&this.on_settled(),this.comp.$emit("scroll-lock",!1)}}},{key:"on",value:function(t,e){switch(t){case"settled":this.on_settled=e}}},{key:"hover",value:function(){var t=this.x,e=this.y;return(t-this.mouse.x)*(t-this.mouse.x)+(e-this.mouse.y)*(e-this.mouse.y)<this.RADIUS_SQ}}]),t}(),te=function(){function t(e,n){G(this,t),this.ctx=n,this.comp=e,this.T=e.$props.config.TOOL_COLL,C.is_mobile&&(this.T*=2)}return H(t,[{key:"draw",value:function(t,e){var n=this.comp.$props.layout,i=n.t2screen(t[0]),r=n.$2screen(t[1]),o=n.t2screen(e[0]),s=n.$2screen(e[1]);this.ctx.moveTo(i,r),this.ctx.lineTo(o,s),this.comp.collisions.push(this.make([i,r],[o,s]))}},{key:"make",value:function(t,e){var n=this;return function(i,r){return E.point2seg([i,r],t,e)<n.T}}}]),t}(),ee=function(){function t(e,n){G(this,t),this.ctx=n,this.comp=e,this.T=e.$props.config.TOOL_COLL,C.is_mobile&&(this.T*=2)}return H(t,[{key:"draw",value:function(t,e){var n=this.comp.$props.layout,i=n.t2screen(t[0]),r=n.$2screen(t[1]),o=n.t2screen(e[0]),s=n.$2screen(e[1]);this.ctx.moveTo(i,r),this.ctx.lineTo(o,s);var a=n.width,c=n.height,u=(s-r)/(o-i),h=Math.sign(o-i||s-r),l=a*h*2,d=a*u*h*2;d===1/0&&(l=0,d=c*h),this.ctx.moveTo(o,s),this.ctx.lineTo(o+l,s+d),this.ray||(this.ctx.moveTo(i,r),this.ctx.lineTo(i-l,r-d)),this.comp.collisions.push(this.make([i,r],[o,s]))}},{key:"make",value:function(t,e){var n=this,i=this.ray?E.point2ray.bind(E):E.point2line.bind(E);return function(r,o){return i([r,o],t,e)<n.T}}}]),t}();function ne(t,e){return(ne=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ie(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ne(t,e)}function re(t){return(re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function oe(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function se(t,e){return!e||"object"!==re(e)&&"function"!=typeof e?oe(t):e}function ae(t){return(ae=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ce(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=ae(t);if(e){var r=ae(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return se(this,n)}}var ue=function(t){ie(n,t);var e=ce(n);function n(t,i){var r;return G(this,n),(r=e.call(this,t,i)).ray=!0,r}return n}(ee);var he=rt({name:"LineTool",mixins:[mt,Wt],methods:{meta_info:function(){return{author:"C451",version:"1.1.0"}},tool:function(){return{group:"Lines",icon:Xt["segment.png"],type:"Segment",hint:"This hint will be shown on hover",data:[],settings:{},mods:{Extended:{settings:{extended:!0},icon:Xt["extended.png"]},Ray:{settings:{ray:!0},icon:Xt["ray.png"]}}}},init:function(){var t=this;this.pins.push(new Zt(this,"p1")),this.pins.push(new Zt(this,"p2",{state:"tracking"})),this.pins[1].on("settled",(function(){t.set_state("finished"),t.$emit("drawing-mode-off")}))},draw:function(t){this.p1&&this.p2&&(t.lineWidth=this.line_width,t.strokeStyle=this.color,t.beginPath(),this.sett.ray?new ue(this,t).draw(this.p1,this.p2):this.sett.extended?new ee(this,t).draw(this.p1,this.p2):new te(this,t).draw(this.p1,this.p2),t.stroke(),this.render_pins(t))},use_for:function(){return["LineTool"]},data_colors:function(){return[this.color]}},computed:{sett:function(){return this.$props.settings},p1:function(){return this.$props.settings.p1},p2:function(){return this.$props.settings.p2},line_width:function(){return this.sett.lineWidth||.9},color:function(){return this.sett.color||"#42b28a"}},data:function(){return{}}},undefined,undefined,!1,null,null,null);he.options.__file="src/components/overlays/LineTool.vue";const le=he.exports;var de=rt({name:"RangeTool",mixins:[mt,Wt],methods:{meta_info:function(){return{author:"C451",version:"2.0.1"}},tool:function(){return{group:"Measurements",icon:Xt["price_range.png"],type:"Price",hint:"Price Range",data:[],settings:{},mods:{Time:{icon:Xt["time_range.png"],settings:{price:!1,time:!0}},PriceTime:{icon:Xt["price_time.png"],settings:{price:!0,time:!0}},ShiftMode:{settings:{price:!0,time:!0,shiftMode:!0},hidden:!0}}}},init:function(){var t=this;this.pins.push(new Zt(this,"p1",{hidden:this.shift})),this.pins.push(new Zt(this,"p2",{state:"tracking",hidden:this.shift})),this.pins[1].on("settled",(function(){t.set_state("finished"),t.$emit("drawing-mode-off"),t.shift&&t._$emit("custom-event",{event:"object-selected",args:[]})}))},draw:function(t){if(this.p1&&this.p2){var e=Math.sign(this.p2[1]-this.p1[1]),n=this.$props.layout,i=n.t2screen(.5*(this.p1[0]+this.p2[0]));t.lineWidth=this.line_width,t.strokeStyle=this.color,t.fillStyle=this.back_color;var r=n.t2screen(this.p1[0]),o=n.$2screen(this.p1[1]),s=n.t2screen(this.p2[0]),a=n.$2screen(this.p2[1]);t.fillRect(r,o,s-r,a-o),this.price&&this.vertical(t,r,o,s,a,i),this.time&&this.horizontal(t,r,o,s,a,i),this.draw_value(t,e,i,a),this.render_pins(t)}},vertical:function(t,e,n,i,r,o){this.$props.layout;var s=Math.sign(this.p2[1]-this.p1[1]);t.beginPath(),this.shift||(new te(this,t).draw([this.p1[0],this.p2[1]],[this.p2[0],this.p2[1]]),new te(this,t).draw([this.p1[0],this.p1[1]],[this.p2[0],this.p1[1]])),t.moveTo(o-4,r+5*s),t.lineTo(o,r),t.lineTo(o+4,r+5*s),t.stroke(),t.beginPath(),t.setLineDash([5,5]),new te(this,t).draw([.5*(this.p1[0]+this.p2[0]),this.p2[1]],[.5*(this.p1[0]+this.p2[0]),this.p1[1]]),t.stroke(),t.setLineDash([])},horizontal:function(t,e,n,i,r,o){var s=this.$props.layout,a=Math.sign(this.p2[0]-this.p1[0]),c=(s.$2screen(this.p1[1])+s.$2screen(this.p2[1]))/2;t.beginPath(),this.shift||(new te(this,t).draw([this.p1[0],this.p1[1]],[this.p1[0],this.p2[1]]),new te(this,t).draw([this.p2[0],this.p1[1]],[this.p2[0],this.p2[1]])),t.moveTo(i-5*a,c-4),t.lineTo(i,c),t.lineTo(i-5*a,c+4),t.stroke(),t.beginPath(),t.setLineDash([5,5]),t.moveTo(e,c),t.lineTo(i,c),t.stroke(),t.setLineDash([])},draw_value:function(t,e,n,i){var r=this;t.font=this.new_font;var o=(this.p2[1]-this.p1[1]).toFixed(this.prec),a=(100*(this.p2[1]/this.p1[1]-1)).toFixed(this.prec),c=function(t){return r.layout.ti_map.smth2t(t)},u=c(this.p2[0])-c(this.p1[0]),h=(this.layout.ti_map.tf,function(t){var e=r.layout.c_magnet(t);return(r.layout.candles||r.layout.master_grid.candles).indexOf(e)}),l=h(this.p2[0])-h(this.p1[0]),d=this.t2str(u),f=[];this.price&&f.push("".concat(o," (").concat(a,"%)")),this.time&&f.push("".concat(l," bars, ").concat(d));var p=(f=f.join("\n")).split("\n"),g=Math.max.apply(Math,s(p.map((function(e){return t.measureText(e).width+20}))).concat([100])),v=p.length,A=20*v;t.fillStyle=this.value_back,t.fillRect(n-.5*g,i-(10+A)*e,g,A*e),t.fillStyle=this.value_color,t.textAlign="center",p.forEach((function(r,o){t.fillText(r,n,i+(e>0?20*o-20*v+5:20*o+25))}))},t2str:function(t){for(var e=Math.sign(t),n=Math.abs(t),i=[[1e3,"s",60],[6e4,"m",60],[36e5,"h",24],[864e5,"D",7],[6048e5,"W",4],[2592e6,"M",12],[31536e6,"Y",1/0],[1/0,"Eternity",1/0]],r=0;r<i.length;r++)if(i[r][0]=Math.floor(n/i[r][0]),0===i[r][0]){var o=i[r-1],s=i[r-2],a=e<0?"-":"";o&&(a+=o.slice(0,2).join(""));var c=s?s[0]-o[0]*s[2]:0;return s&&c&&(a+=" ",a+="".concat(c).concat(s[1])),a}},use_for:function(){return["RangeTool"]},data_colors:function(){return[this.color]}},computed:{sett:function(){return this.$props.settings},p1:function(){return this.$props.settings.p1},p2:function(){return this.$props.settings.p2},line_width:function(){return this.sett.lineWidth||.9},color:function(){return this.sett.color||this.$props.colors.cross},back_color:function(){return this.sett.backColor||"#9b9ba316"},value_back:function(){return this.sett.valueBack||"#9b9ba316"},value_color:function(){return this.sett.valueColor||this.$props.colors.text},prec:function(){return this.sett.precision||2},new_font:function(){return"12px "+this.$props.font.split("px").pop()},price:function(){return!("price"in this.sett)||this.sett.price},time:function(){return"time"in this.sett&&this.sett.time},shift:function(){return this.sett.shiftMode}},data:function(){return{}}},undefined,undefined,!1,null,null,null);de.options.__file="src/components/overlays/RangeTool.vue";const fe=de.exports;function pe(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return ge(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ge(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function ge(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var ve=rt({name:"Grid",props:["sub","layout","range","interval","cursor","colors","overlays","width","height","data","grid_id","y_transform","font","tv_id","config","meta","shaders"],mixins:[nt,{methods:{on_ux_event:function(t,e){if("new-interface"===t.event)t.args[0].target===e&&(t.args[0].vars=t.args[0].vars||{},t.args[0].grid_id=t.args[1],t.args[0].overlay_id=t.args[2],this.uxs.push(t.args[0]));else if("close-interface"===t.event)this.uxs=this.uxs.filter((function(e){return e.uuid!==t.args[0]}));else if("modify-interface"===t.event){var n=this.uxs.filter((function(e){return e.uuid===t.args[0]}));n.length&&this.modify(n[0],t.args[1])}else if("hide-interface"===t.event){var i=this.uxs.filter((function(e){return e.uuid===t.args[0]}));i.length&&(i[0].hidden=!0,this.modify(i[0],{hidden:!0}))}else{if("show-interface"!==t.event)return t;var r=this.uxs.filter((function(e){return e.uuid===t.args[0]}));r.length&&this.modify(r[0],{hidden:!1})}},modify:function(t,e){for(var n in void 0===e&&(e={}),e)n in t&&this.$set(t,n,e[n])},remove_all_ux:function(t){this.uxs=this.uxs.filter((function(e){return e.overlay.id!==t}))}},data:function(){return{uxs:[]}}}],components:{Crosshair:st,KeyboardListener:ct},created:function(){var t=this;this._list=[_t,bt,kt,Bt,It,Mt,Ut,Gt,Ht,le,fe].concat(this.$props.overlays),this._registry={};var e=[];this._list.forEach((function(n,i){var r=n.methods.use_for();n.methods.tool&&e.push({use_for:r,info:n.methods.tool()}),r.forEach((function(e){t._registry[e]=i}))})),this.$emit("custom-event",{event:"register-tools",args:e}),this.$on("custom-event",(function(e){return t.on_ux_event(e,"grid")}))},beforeDestroy:function(){this.renderer&&this.renderer.destroy()},mounted:function(){var t=this,e=this.$refs.canvas;this.renderer=new et(e,this),this.setup(),this.$nextTick((function(){return t.redraw()}))},render:function(t){var e=this.$props.grid_id,n=this.$props.layout.grids[e];return this.create_canvas(t,"grid-".concat(e),{position:{x:0,y:n.offset||0},attrs:{width:n.width,height:n.height,overflow:"hidden"},style:{backgroundColor:this.$props.colors.back},hs:[t(st,{props:this.common_props(),on:this.layer_events}),t(ct,{on:this.keyboard_events}),t(pt,{props:{id:e,tv_id:this.$props.tv_id,uxs:this.uxs,colors:this.$props.colors,config:this.$props.config,updater:Math.random()},on:{"custom-event":this.emit_ux_event}})].concat(this.get_overlays(t))})},methods:{new_layer:function(t){var e=this;this.$nextTick((function(){return e.renderer.new_layer(t)}))},del_layer:function(t){var e=this;this.$nextTick((function(){return e.renderer.del_layer(t)}));var n=this.$props.grid_id;this.$emit("custom-event",{event:"remove-shaders",args:[n,t]}),this.$emit("custom-event",{event:"remove-layer-meta",args:[n,t]}),this.remove_all_ux(t)},get_overlays:function(t){var e,n=this,i=[],r={},o=pe(this.$props.data);try{for(o.s();!(e=o.n()).done;){var s=e.value,a=this._list[this._registry[s.type]];a&&(a.methods.calc&&(a=this.inject_renderer(a)),i.push({cls:a,type:s.type,data:s.data,settings:s.settings,i0:s.i0,tf:s.tf,last:s.last}),r[s.type]=0)}}catch(t){o.e(t)}finally{o.f()}return i.map((function(e,i){return t(e.cls,{on:n.layer_events,attrs:Object.assign(n.common_props(),{id:"".concat(e.type,"_").concat(r[e.type]++),type:e.type,data:e.data,settings:e.settings,i0:e.i0,tf:e.tf,num:i,grid_id:n.$props.grid_id,meta:n.$props.meta,last:e.last})})}))},common_props:function(){return{cursor:this.$props.cursor,colors:this.$props.colors,layout:this.$props.layout.grids[this.$props.grid_id],interval:this.$props.interval,sub:this.$props.sub,font:this.$props.font,config:this.$props.config}},emit_ux_event:function(t){this.on_ux_event(t,"grid")&&this.$emit("custom-event",t)},inject_renderer:function(t){var e=t.methods.calc();if(!e.conf||!e.conf.renderer||t.__renderer__)return t;var n=this._list.find((function(t){return t.name===e.conf.renderer}));return n?(t.mixins.push(n),t.__renderer__=e.conf.renderer,t):t}},computed:{is_active:function(){return void 0!==this.$props.cursor.t&&this.$props.cursor.grid_id===this.$props.grid_id}},watch:{range:{handler:function(){var t=this;this.$nextTick((function(){return t.redraw()}))},deep:!0},cursor:{handler:function(){this.$props.cursor.locked||this.redraw()},deep:!0},overlays:{handler:function(t){var e,n=pe(t);try{for(n.s();!(e=n.n()).done;){var i,r=e.value,o=pe(this.$children);try{for(o.s();!(i=o.n()).done;){var s=i.value;if("string"==typeof s.id){var a=s.id.split("_");if(a.pop(),a.join("_")===r.name){if(s.calc=r.methods.calc,!s.calc)continue;var c=s.calc.toString();c!==r.__prevscript__&&s.exec_script(),r.__prevscript__=c}}}}catch(t){o.e(t)}finally{o.f()}}}catch(t){n.e(t)}finally{n.f()}},deep:!0},shaders:function(t,e){this.redraw()}},data:function(){var t=this;return{layer_events:{"new-grid-layer":this.new_layer,"delete-grid-layer":this.del_layer,"show-grid-layer":function(e){t.renderer.show_hide_layer(e),t.redraw()},"redraw-grid":this.redraw,"layer-meta-props":function(e){return t.$emit("layer-meta-props",e)},"custom-event":function(e){return t.$emit("custom-event",e)}},keyboard_events:{"register-kb-listener":function(e){t.$emit("register-kb-listener",e)},"remove-kb-listener":function(e){t.$emit("remove-kb-listener",e)},keyup:function(e){t.is_active&&t.renderer.propagate("keyup",e)},keydown:function(e){t.is_active&&t.renderer.propagate("keydown",e)},keypress:function(e){t.is_active&&t.renderer.propagate("keypress",e)}}}}},undefined,undefined,!1,null,null,null);ve.options.__file="src/components/Grid.vue";const Ae=ve.exports;function me(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return ye(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ye(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function ye(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var _e,we=function(){function t(e,n,i){void 0===i&&(i="right"),G(this,t),_e=n.config.PANHEIGHT,this.canvas=e,this.ctx=e.getContext("2d"),this.comp=n,this.$p=n.$props,this.data=this.$p.sub,this.range=this.$p.range,this.id=this.$p.grid_id,this.layout=this.$p.layout.grids[this.id],this.side=i,this.listeners()}return H(t,[{key:"listeners",value:function(){var t=this,e=this.mc=new W.Manager(this.canvas);e.add(new W.Pan({direction:W.DIRECTION_VERTICAL,threshold:0})),e.add(new W.Tap({event:"doubletap",taps:2,posThreshold:50})),e.on("panstart",(function(e){t.$p.y_transform?t.zoom=t.$p.y_transform.zoom:t.zoom=1,t.y_range=[t.layout.$_hi,t.layout.$_lo],t.drug={y:e.center.y,z:t.zoom,mid:E.log_mid(t.y_range,t.layout.height),A:t.layout.A,B:t.layout.B}})),e.on("panmove",(function(e){t.drug&&(t.zoom=t.calc_zoom(e),t.comp.$emit("sidebar-transform",{grid_id:t.id,zoom:t.zoom,auto:!1,range:t.calc_range(),drugging:!0}),t.update())})),e.on("panend",(function(){t.drug=null,t.comp.$emit("sidebar-transform",{grid_id:t.id,drugging:!1})})),e.on("doubletap",(function(){t.comp.$emit("sidebar-transform",{grid_id:t.id,zoom:1,auto:!0}),t.zoom=1,t.update()}))}},{key:"update",value:function(){this.layout=this.$p.layout.grids[this.id];var t,e,n,i,r=this.layout.ys,o=this.side,s=this.layout.sb;switch(this.ctx.font=this.$p.font,o){case"left":case"right":t=0,e=0,n=Math.floor(s),i=this.layout.height,this.ctx.clearRect(t,e,n,i),this.ctx.strokeStyle=this.$p.colors.scale,this.ctx.beginPath(),this.ctx.moveTo(t+.5,0),this.ctx.lineTo(t+.5,i),this.ctx.stroke()}this.ctx.fillStyle=this.$p.colors.text,this.ctx.beginPath();var a,c=me(r);try{for(c.s();!(a=c.n()).done;){var u=a.value;if(!(u[0]>this.layout.height)){var h="left"===o?n-.5:t-.5,l="left"===o?h-4.5:h+4.5;this.ctx.moveTo(h,u[0]-.5),this.ctx.lineTo(l,u[0]-.5);var d="left"===o?-10:10;this.ctx.textAlign="left"===o?"end":"start";var f=this.layout.prec;this.ctx.fillText(u[1].toFixed(f),h+d,u[0]+4)}}}catch(t){c.e(t)}finally{c.f()}this.ctx.stroke(),this.$p.grid_id&&this.upper_border(),this.apply_shaders(),this.$p.cursor.y&&this.$p.cursor.y$&&this.panel()}},{key:"apply_shaders",value:function(){var t,e={layout:this.$p.layout.grids[this.id],cursor:this.$p.cursor},n=me(this.$p.shaders);try{for(n.s();!(t=n.n()).done;){var i=t.value;this.ctx.save(),i.draw(this.ctx,e),this.ctx.restore()}}catch(t){n.e(t)}finally{n.f()}}},{key:"upper_border",value:function(){this.ctx.strokeStyle=this.$p.colors.scale,this.ctx.beginPath(),this.ctx.moveTo(0,.5),this.ctx.lineTo(this.layout.width,.5),this.ctx.stroke()}},{key:"panel",value:function(){if(this.$p.cursor.grid_id===this.layout.id){var t=this.$p.cursor.y$.toFixed(this.layout.prec);this.ctx.fillStyle=this.$p.colors.panel;var e=this.layout.sb+1,n=this.$p.cursor.y-.5*_e-.5;this.ctx.fillRect(-1,n,e,_e),this.ctx.fillStyle=this.$p.colors.textHL,this.ctx.textAlign="left",this.ctx.fillText(t,7,n+15)}}},{key:"calc_zoom",value:function(t){var e=this.drug.y-t.center.y,n=1+(e>0?3:1)*e/this.layout.height;return C.clamp(this.drug.z*n,.005,100)}},{key:"calc_range",value:function(t,e){var n=this;void 0===t&&(t=1),void 0===e&&(e=1);var i=this.zoom/this.drug.z,r=(1/i-1)/2,o=this.y_range.slice(),s=o[0]-o[1];if(this.layout.grid.logScale){var a=this.layout.height/2,c=a-a*(1/i),u=a+a*(1/i),h=function(t){return E.exp((t-n.drug.B)/n.drug.A)};o.slice();o[0]=h(c),o[1]=h(u)}else o[0]=o[0]+s*r*t,o[1]=o[1]-s*r*e;return o}},{key:"rezoom_range",value:function(t,e,n){this.$p.y_transform&&!this.$p.y_transform.auto&&(this.zoom=1,t<0&&(t/=3.75),t*=.25,this.y_range=[this.layout.$_hi,this.layout.$_lo],this.drug={y:0,z:this.zoom,mid:E.log_mid(this.y_range,this.layout.height),A:this.layout.A,B:this.layout.B},this.zoom=this.calc_zoom({center:{y:t*this.layout.height}}),this.comp.$emit("sidebar-transform",{grid_id:this.id,zoom:this.zoom,auto:!1,range:this.calc_range(e,n),drugging:!0}),this.drug=null,this.comp.$emit("sidebar-transform",{grid_id:this.id,drugging:!1}))}},{key:"destroy",value:function(){this.mc&&this.mc.destroy()}},{key:"mousemove",value:function(){}},{key:"mouseout",value:function(){}},{key:"mouseup",value:function(){}},{key:"mousedown",value:function(){}}]),t}();var be=rt({name:"Sidebar",props:["sub","layout","range","interval","cursor","colors","font","width","height","grid_id","rerender","y_transform","tv_id","config","shaders"],mixins:[nt],mounted:function(){var t=this.$refs.canvas;this.renderer=new we(t,this),this.setup(),this.redraw()},render:function(t){var e=this.$props.grid_id,n=this.$props.layout.grids[e];return this.create_canvas(t,"sidebar-".concat(e),{position:{x:n.width,y:n.offset||0},attrs:{rerender:this.$props.rerender,width:this.$props.width,height:n.height},style:{backgroundColor:this.$props.colors.back}})},watch:{range:{handler:function(){this.redraw()},deep:!0},cursor:{handler:function(){this.redraw()},deep:!0},rerender:function(){var t=this;this.$nextTick((function(){return t.redraw()}))}},beforeDestroy:function(){this.renderer&&this.renderer.destroy()}},undefined,undefined,!1,null,null,null);be.options.__file="src/components/Sidebar.vue";const xe=be.exports;var ke=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"trading-vue-legend",style:t.calc_style},[0===t.grid_id?n("div",{staticClass:"trading-vue-ohlcv",style:{"max-width":t.common.width+"px"}},[n("span",{staticClass:"t-vue-title",style:{color:t.common.colors.title}},[t._v("\n "+t._s(t.common.title_txt)+"\n ")]),t._v(" "),t.show_values?n("span",[t._v("\n O"),n("span",{staticClass:"t-vue-lspan"},[t._v(t._s(t.ohlcv[0]))]),t._v("\n H"),n("span",{staticClass:"t-vue-lspan"},[t._v(t._s(t.ohlcv[1]))]),t._v("\n L"),n("span",{staticClass:"t-vue-lspan"},[t._v(t._s(t.ohlcv[2]))]),t._v("\n C"),n("span",{staticClass:"t-vue-lspan"},[t._v(t._s(t.ohlcv[3]))]),t._v("\n V"),n("span",{staticClass:"t-vue-lspan"},[t._v(t._s(t.ohlcv[4]))])]):t._e(),t._v(" "),t.show_values?t._e():n("span",{staticClass:"t-vue-lspan",style:{color:t.common.colors.text}},[t._v("\n "+t._s((t.common.meta.last||[])[4])+"\n ")])]):t._e(),t._v(" "),t._l(this.indicators,(function(e){return n("div",{staticClass:"t-vue-ind"},[n("span",{staticClass:"t-vue-iname"},[t._v(t._s(e.name))]),t._v(" "),n("button-group",{attrs:{buttons:t.common.buttons,config:t.common.config,ov_id:e.id,grid_id:t.grid_id,index:e.index,tv_id:t.common.tv_id,display:e.v},on:{"legend-button-click":t.button_click}}),t._v(" "),e.v?n("span",{staticClass:"t-vue-ivalues"},t._l(e.values,(function(e){return t.show_values?n("span",{staticClass:"t-vue-lspan t-vue-ivalue",style:{color:e.color}},[t._v("\n "+t._s(e.value)+"\n ")]):t._e()})),0):t._e(),t._v(" "),e.unk?n("span",{staticClass:"t-vue-unknown"},[t._v("\n (Unknown type)\n ")]):t._e(),t._v(" "),n("transition",{attrs:{name:"tvjs-appear"}},[e.loading?n("spinner",{attrs:{colors:t.common.colors}}):t._e()],1)],1)}))],2)};ke._withStripped=!0;var Ce=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"t-vue-lbtn-grp"},t._l(t.buttons,(function(e,i){return n("legend-button",{key:i,attrs:{id:e.name||e,tv_id:t.tv_id,ov_id:t.ov_id,grid_id:t.grid_id,index:t.index,display:t.display,icon:e.icon,config:t.config},on:{"legend-button-click":t.button_click}})})),1)};Ce._withStripped=!0;var Be=function(){var t=this,e=t.$createElement;return(t._self._c||e)("img",{staticClass:"t-vue-lbtn",style:{width:t.config.L_BTN_SIZE+"px",height:t.config.L_BTN_SIZE+"px",margin:t.config.L_BTN_MARGIN},attrs:{src:t.base64,id:t.uuid},on:{click:t.onclick}})};Be._withStripped=!0;const Ee={name:"LegendButton",props:["id","tv_id","grid_id","ov_id","index","display","icon","config"],mounted:function(){},computed:{base64:function(){return this.icon||Xt[this.file_name]},file_name:function(){var t=this.$props.id;return"display"===this.$props.id&&(t=this.$props.display?"display_on":"display_off"),t+".png"},uuid:function(){var t=this.$props.tv_id,e=this.$props.grid_id,n=this.$props.ov_id;return"".concat(t,"-btn-g").concat(e,"-").concat(n)},data_type:function(){return 0===this.$props.grid_id?"onchart":"offchart"},data_index:function(){return this.$props.index}},methods:{onclick:function(){this.$emit("legend-button-click",{button:this.$props.id,type:this.data_type,dataIndex:this.data_index,grid:this.$props.grid_id,overlay:this.$props.ov_id})}}};n(169);var Ie=rt(Ee,Be,[],!1,null,null,null);Ie.options.__file="src/components/LegendButton.vue";const Se={name:"ButtonGroup",props:["buttons","tv_id","ov_id","grid_id","index","display","config"],components:{LegendButton:Ie.exports},methods:{button_click:function(t){this.$emit("legend-button-click",t)}}};n(886);var Me=rt(Se,Ce,[],!1,null,null,null);Me.options.__file="src/components/ButtonGroup.vue";const Te=Me.exports;var Oe=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"tvjs-spinner"},t._l(4,(function(e){return n("div",{key:e,style:{background:t.colors.text}})})),0)};Oe._withStripped=!0;const De={name:"Spinner",props:["colors"]};n(372);var Qe=rt(De,Oe,[],!1,null,null,null);Qe.options.__file="src/components/Spinner.vue";const Re={name:"ChartLegend",props:["common","values","grid_id","meta_props"],components:{ButtonGroup:Te,Spinner:Qe.exports},computed:{ohlcv:function(){if(!this.$props.values||!this.$props.values.ohlcv)return Array(6).fill("n/a");var t=this.layout.prec,e=this.main_type+"_0",n=this.$props.meta_props[e]||{};return n.legend?(n.legend()||[]).map((function(t){return t.value})):[this.$props.values.ohlcv[1].toFixed(t),this.$props.values.ohlcv[2].toFixed(t),this.$props.values.ohlcv[3].toFixed(t),this.$props.values.ohlcv[4].toFixed(t),this.$props.values.ohlcv[5]?this.$props.values.ohlcv[5].toFixed(2):"n/a"]},indicators:function(){var t=this,e=this.$props.values,n=this.format,i={};return this.json_data.filter((function(t){return!1!==t.settings.legend&&!t.main})).map((function(r){r.type in i||(i[r.type]=0);var o=r.type+"_".concat(i[r.type]++);return{v:!("display"in r.settings)||r.settings.display,name:r.name||o,index:(t.off_data||t.json_data).indexOf(r),id:o,values:e?n(o,e):t.n_a(1),unk:!(o in(t.$props.meta_props||{})),loading:r.loading}}))},calc_style:function(){var t=this.layout.height>150?10:5,e=this.$props.common.layout.grids,n=e[0]?e[0].width:void 0;return{top:"".concat(this.layout.offset+t,"px"),width:"".concat(n-20,"px")}},layout:function(){var t=this.$props.grid_id;return this.$props.common.layout.grids[t]},json_data:function(){return this.$props.common.data},off_data:function(){return this.$props.common.offchart},main_type:function(){var t=this.common.data.find((function(t){return t.main}));return t?t.type:void 0},show_values:function(){return"explore"!==this.common.cursor.mode}},methods:{format:function(t,e){var n=this.$props.meta_props[t]||{};return e[t]?n.legend?n.legend(e[t]):e[t].slice(1).map((function(t,e){var i=n.data_colors?n.data_colors():[];return"number"==typeof t&&(t=t.toFixed(Math.abs(t)>.001?4:8)),{value:t,color:i?i[e%i.length]:void 0}})):this.n_a(1)},n_a:function(t){return Array(t).fill({value:"n/a"})},button_click:function(t){this.$emit("legend-button-click",t)}}};n(600);var Ye=rt(Re,ke,[],!1,null,null,null);Ye.options.__file="src/components/Legend.vue";function je(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Ue(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ue(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function Ue(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}const Le={methods:{init_shaders:function(t,e){if(t!==e){e&&(this.shaders=this.shaders.filter((function(t){return t.owner!==e.id})));var n,i=je(t.shaders);try{for(i.s();!(n=i.n()).done;){var r=new(0,n.value);r.owner=t.id,this.shaders.push(r)}}catch(t){i.e(t)}finally{i.f()}}},on_shader_event:function(t,e){if("new-shader"===t.event&&t.args[0].target===e&&(t.args[0].id="".concat(t.args[1],"-").concat(t.args[2]),this.shaders.push(t.args[0]),this.rerender++),"remove-shaders"===t.event){var n=t.args.join("-");this.shaders=this.shaders.filter((function(t){return t.id!==n}))}}},watch:{skin:function(t,e){this.init_shaders(t,e)}},data:function(){return{shaders:[]}}},Ne={name:"GridSection",props:["common","grid_id"],mixins:[Le],components:{Grid:Ae,Sidebar:xe,ChartLegend:Ye.exports},mounted:function(){this.init_shaders(this.$props.common.skin)},methods:{range_changed:function(t){this.$emit("range-changed",t)},cursor_changed:function(t){t.grid_id=this.$props.grid_id,this.$emit("cursor-changed",t)},cursor_locked:function(t){this.$emit("cursor-locked",t)},sidebar_transform:function(t){this.$emit("sidebar-transform",t)},emit_meta_props:function(t){this.$set(this.meta_props,t.layer_id,t),this.$emit("layer-meta-props",t)},emit_custom_event:function(t){this.on_shader_event(t,"sidebar"),this.$emit("custom-event",t)},button_click:function(t){this.$emit("legend-button-click",t)},register_kb:function(t){this.$emit("register-kb-listener",t)},remove_kb:function(t){this.$emit("remove-kb-listener",t)},rezoom_range:function(t){var e="sb-"+t.grid_id;this.$refs[e]&&this.$refs[e].renderer.rezoom_range(t.z,t.diff1,t.diff2)},ghash:function(t){return t.layout.grids.map((function(t){return t.height})).reduce((function(t,e){return t+e}),"")}},computed:{grid_props:function(){var t=this.$props.grid_id,e=Object.assign({},this.$props.common);if(t>0){var n,i=e.data;e.data=[e.data[t-1]],(n=e.data).push.apply(n,s(i.filter((function(e){return e.grid&&e.grid.id===t}))))}return e.width=e.layout.grids[t].width,e.height=e.layout.grids[t].height,e.y_transform=e.y_ts[t],e.shaders=this.grid_shaders,e},sidebar_props:function(){var t=this.$props.grid_id,e=Object.assign({},this.$props.common);return e.width=e.layout.grids[t].sb,e.height=e.layout.grids[t].height,e.y_transform=e.y_ts[t],e.shaders=this.sb_shaders,e},section_values:function(){var t=this.$props.grid_id,e=Object.assign({},this.$props.common);return e.width=e.layout.grids[t].width,e.cursor.values[t]},legend_props:function(){var t=this.$props.grid_id,e=Object.assign({},this.$props.common);if(t>0){var n,i=e.data;e.offchart=i,e.data=[e.data[t-1]],(n=e.data).push.apply(n,s(i.filter((function(e){return e.grid&&e.grid.id===t}))))}return e},get_meta_props:function(){return this.meta_props},grid_shaders:function(){return this.shaders.filter((function(t){return"grid"===t.target}))},sb_shaders:function(){return this.shaders.filter((function(t){return"sidebar"===t.target}))}},watch:{common:{handler:function(t,e){var n=this.ghash(t);n!==this.last_ghash&&this.rerender++,t.data.length!==e.data.length&&this.rerender++,this.last_ghash=n},deep:!0}},data:function(){return{meta_props:{},rerender:0,last_ghash:""}}};n(11);var Fe=rt(Ne,$,[],!1,null,null,null);Fe.options.__file="src/components/Section.vue";const Ge=Fe.exports;function Ke(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return He(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return He(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function He(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var Je=y.MINUTE15,Pe=(y.MINUTE,y.HOUR),ze=y.DAY,$e=y.WEEK,qe=y.MONTH,We=y.YEAR,Xe=y.MONTHMAP,Ve=function(){function t(e,n){G(this,t),this.canvas=e,this.ctx=e.getContext("2d"),this.comp=n,this.$p=n.$props,this.data=this.$p.sub,this.range=this.$p.range,this.layout=this.$p.layout}return H(t,[{key:"update",value:function(){this.grid_0=this.layout.grids[0];var t=this.layout.botbar.width,e=this.layout.botbar.height,n=this.layout.grids[0].sb;this.ctx.font=this.$p.font,this.ctx.clearRect(0,0,t,e),this.ctx.strokeStyle=this.$p.colors.scale,this.ctx.beginPath(),this.ctx.moveTo(0,.5),this.ctx.lineTo(Math.floor(t+1),.5),this.ctx.stroke(),this.ctx.fillStyle=this.$p.colors.text,this.ctx.beginPath();var i,r=Ke(this.layout.botbar.xs);try{for(r.s();!(i=r.n()).done;){var o=i.value,s=this.format_date(o);o[0]>t-n||(this.ctx.moveTo(o[0]-.5,0),this.ctx.lineTo(o[0]-.5,4.5),this.lbl_highlight(o[1][0])||(this.ctx.globalAlpha=.85),this.ctx.textAlign="center",this.ctx.fillText(s,o[0],18),this.ctx.globalAlpha=1)}}catch(t){r.e(t)}finally{r.f()}this.ctx.stroke(),this.apply_shaders(),this.$p.cursor.x&&void 0!==this.$p.cursor.t&&this.panel()}},{key:"apply_shaders",value:function(){var t,e={layout:this.layout.grids[0],cursor:this.$p.cursor},n=Ke(this.comp.bot_shaders);try{for(n.s();!(t=n.n()).done;){var i=t.value;this.ctx.save(),i.draw(this.ctx,e),this.ctx.restore()}}catch(t){n.e(t)}finally{n.f()}}},{key:"panel",value:function(){var t=this.format_cursor_x();this.ctx.fillStyle=this.$p.colors.panel;var e=this.ctx.measureText(t+" "),n=Math.floor(e.width),i=this.$p.cursor.x,r=Math.floor(i-.5*n),o=this.comp.config.PANHEIGHT;this.ctx.fillRect(r,-.5,n,o+.5),this.ctx.fillStyle=this.$p.colors.textHL,this.ctx.textAlign="center",this.ctx.fillText(t,i,15.5)}},{key:"format_date",value:function(t){var e=t[1][0],n=(e=this.grid_0.ti_map.i2t(e))+(this.$p.layout.grids[0].ti_map.tf<ze?1:0)*this.$p.timezone*Pe,i=new Date(n);return t[2]===We||C.year_start(e)===e?i.getUTCFullYear():t[2]===qe||C.month_start(e)===e?Xe[i.getUTCMonth()]:C.day_start(n)===n?i.getUTCDate():C.add_zero(i.getUTCHours())+":"+C.add_zero(i.getUTCMinutes())}},{key:"format_cursor_x",value:function(){var t=this.$p.cursor.t;t=this.grid_0.ti_map.i2t(t);var e=this.$p.layout.grids[0].ti_map.tf,n=new Date(t+(e<ze?1:0)*this.$p.timezone*Pe);if(e===We)return n.getUTCFullYear();if(e<We)var i="`"+"".concat(n.getUTCFullYear()).slice(-2),r=Xe[n.getUTCMonth()],o="01";e<=$e&&(o=n.getUTCDate());var s="".concat(o," ").concat(r," ").concat(i),a="";e<ze&&(a=C.add_zero(n.getUTCHours())+":"+C.add_zero(n.getUTCMinutes()));return"".concat(s," ").concat(a)}},{key:"lbl_highlight",value:function(t){var e=this.$p.interval;return 0===t||(C.month_start(t)===t||(C.day_start(t)===t||e<=Je&&t%Pe==0))}},{key:"mousemove",value:function(){}},{key:"mouseout",value:function(){}},{key:"mouseup",value:function(){}},{key:"mousedown",value:function(){}}]),t}();const Ze={name:"Botbar",props:["sub","layout","range","interval","cursor","colors","font","width","height","rerender","tv_id","config","shaders","timezone"],mixins:[nt],mounted:function(){var t=this.$refs.canvas;this.renderer=new Ve(t,this),this.setup(),this.redraw()},render:function(t){var e=this.$props.layout.botbar;return this.create_canvas(t,"botbar",{position:{x:0,y:e.offset||0},attrs:{rerender:this.$props.rerender,width:e.width,height:e.height},style:{backgroundColor:this.$props.colors.back}})},computed:{bot_shaders:function(){return this.$props.shaders.filter((function(t){return"botbar"===t.target}))}},watch:{range:{handler:function(){this.redraw()},deep:!0},cursor:{handler:function(){this.redraw()},deep:!0},rerender:function(){var t=this;this.$nextTick((function(){return t.redraw()}))}}};n(124);var tn=rt(Ze,undefined,undefined,!1,null,null,null);tn.options.__file="src/components/Botbar.vue";const en=tn.exports;var nn=rt({name:"Keyboard",created:function(){window.addEventListener("keydown",this.keydown),window.addEventListener("keyup",this.keyup),window.addEventListener("keypress",this.keypress),this._listeners={}},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown),window.removeEventListener("keyup",this.keyup),window.removeEventListener("keypress",this.keypress)},render:function(t){return t()},methods:{keydown:function(t){for(var e in this._listeners){var n=this._listeners[e];n&&n.keydown?n.keydown(t):console.warn("No 'keydown' listener for ".concat(e))}},keyup:function(t){for(var e in this._listeners){var n=this._listeners[e];n&&n.keyup?n.keyup(t):console.warn("No 'keyup' listener for ".concat(e))}},keypress:function(t){for(var e in this._listeners){var n=this._listeners[e];n&&n.keypress?n.keypress(t):console.warn("No 'keypress' listener for ".concat(e))}},register:function(t){this._listeners[t.id]=t},remove:function(t){delete this._listeners[t.id]}}},undefined,undefined,!1,null,null,null);nn.options.__file="src/components/Keyboard.vue";const rn=nn.exports,on={methods:{data_changed:function(){var t=this.ohlcv,e=!1;return this._data_n0!==t[0]&&this._data_len!==t.length&&(e=!0),this.check_all_data(e),this.ti_map.ib&&this.reindex_delta(t[0],this._data_n0),this._data_n0=t[0],this._data_len=t.length,this.save_data_t(),e},check_all_data:function(t){var e=this._data_len||0;(Math.abs(this.ohlcv.length-e)>1||this._data_n0!==this.ohlcv[0])&&this.$emit("custom-event",{event:"data-len-changed",args:[]})},reindex_delta:function(t,e){if(e=e||[[0]],0!==(t=t||[[0]])[0]-e[0]&&this._data_t)try{var n=this._data_t+.01,i=C.fast_nearest(this.ohlcv,n),r=(n-this.ohlcv[i[0]][0])/this.interval_ms;this.goto(i[0]+r)}catch(t){this.goto(this.ti_map.t2i(this._data_t))}},save_data_t:function(){this._data_t=this.ti_map.i2t(this.range[1])}},data:function(){return{_data_n0:null,_data_len:0,_data_t:0}}};var sn=Math.pow(2,32),an=function(){function t(){G(this,t),this.ib=!1}return H(t,[{key:"init",value:function(t,e){t.sub,t.interval;var n=t.meta,i=(t.$props,t.interval_ms),r=t.sub_start,o=t.ib;this.ti_map=[],this.it_map=[],this.sub_i=[],this.ib=o,this.sub=e,this.ss=r,this.tf=i;n.sub_start;this.ib&&this.map_sub(e)}},{key:"map_sub",value:function(t){for(var e=0;e<t.length;e++){var n=t[e][0],i=this.ss+e;this.ti_map[n]=i,this.it_map[i]=n;var r=s(t[e]);r[0]=i,this.sub_i.push(r)}}},{key:"parse",value:function(t,e){if(!this.ib||!this.sub[0]||"data"===e)return t;var n=[],i=0;if("calc"===e){for(var r=C.index_shift(this.sub,t),o=0;o<t.length;o++){var a=this.ss+o,c=s(t[o]);c[0]=a+r,n.push(c)}return n}if(t.length)try{var u=C.fast_nearest(this.sub,t[0][0])[0];null!==u&&u>=0&&(i=u)}catch(t){}var h=this.sub[0][0],l=this.sub[this.sub.length-1][0];for(o=0;o<t.length;o++){var d=s(t[o]),f=this.sub[i][0],p=t[o][0],g=this.ti_map[p];if(void 0===g)if(p<h||p>l)g=this.ss+i-(f-p)/this.tf,p=t[o+1]?t[o+1][0]:void 0;else{var v=this.sub[i+1][0];g=f===v?this.ss+i:this.ss+i+(p-f)/(v-f),p=t[o+1]?t[o+1][0]:void 0}for(;i+1<this.sub.length-1&&p>this.sub[i+1][0];)i++,f=this.sub[i][0];d[0]=g,n.push(d)}return n}},{key:"i2t",value:function(t){if(!this.ib||!this.sub.length)return t;var e=this.it_map[t];if(void 0!==e)return e;if(t>=this.ss+this.sub_i.length){var n=t-(this.ss+this.sub_i.length)+1;return this.sub[this.sub.length-1][0]+n*this.tf}if(t<this.ss){var i=t-this.ss;return this.sub[0][0]+i*this.tf}var r=Math.floor(t)-this.ss,o=r+1,s=this.sub.length;o>=s&&(o=s-1);var a=this.sub[r],c=this.sub[o];if(a&&c){var u=a[0];return u+(c[0]-u)*(t-r-this.ss)}}},{key:"i2t_mode",value:function(t,e){return"data"===e?t:this.i2t(t)}},{key:"t2i",value:function(t){if(this.sub.length){var e=this.ti_map[t];if(void 0!==e)return e;var n=this.sub[0][0],i=this.sub[this.sub.length-1][0];if(t<n)return this.ss-(n-t)/this.tf;if(t>i){var r=this.sub.length-1;return this.ss+r-(i-t)/this.tf}try{var o=C.fast_nearest(this.sub,t),s=this.sub[o[0]][0],a=(t-s)/(this.sub[o[1]][0]-s);return this.ss+o[0]+a*(o[1]-o[0])}catch(t){}}}},{key:"smth2i",value:function(t){return t>sn?this.t2i(t):t}},{key:"smth2t",value:function(t){return t<sn?this.i2t(t):t}},{key:"gt2i",value:function(t,e){if(t>sn){var n=w(C.fast_nearest(e,t+.1),2),i=n[0];n[1];return"number"==typeof i?i:this.t2i(t)}return t}}]),t}();var cn=rt({name:"Chart",props:["title_txt","data","width","height","font","colors","overlays","tv_id","config","buttons","toolbar","ib","skin","timezone"],mixins:[Le,on],components:{GridSection:Ge,Botbar:en,Keyboard:rn},created:function(){this.ctx=new b(this.$props),this.init_range(),this.sub=this.subset(),C.overwrite(this.range,this.range),this._layout=new F(this),this.updater=new z(this),this.update_last_values(),this.init_shaders(this.skin)},methods:{range_changed:function(t){var e=this.subset(t);C.overwrite(this.range,t),C.overwrite(this.sub,e),this.update_layout(),this.$emit("range-changed",t),this.$props.ib&&this.save_data_t()},goto:function(t){var e=this.range[1]-this.range[0];this.range_changed([t-e,t])},setRange:function(t,e){this.range_changed([t,e])},cursor_changed:function(t){t.mode&&(this.cursor.mode=t.mode),"explore"!==this.cursor.mode&&this.updater.sync(t),this._hook_xchanged&&this.ce("?x-changed",t)},cursor_locked:function(t){this.cursor.scroll_lock&&t||(this.cursor.locked=t,this._hook_xlocked&&this.ce("?x-locked",t))},calc_interval:function(){var t=this,e=C.parse_tf(this.forced_tf);this.ohlcv.length<2&&!e||(this.interval_ms=e||C.detect_interval(this.ohlcv),this.interval=this.$props.ib?1:this.interval_ms,C.warn((function(){return t.$props.ib&&!t.chart.tf}),y.IB_TF_WARN,y.SECOND))},set_ytransform:function(t){var e=this.y_transforms[t.grid_id]||{};Object.assign(e,t),this.$set(this.y_transforms,t.grid_id,e),this.update_layout(),C.overwrite(this.range,this.range)},default_range:function(){var t=this.$props.config.DEFAULT_LEN,e=this.$props.config.MINIMUM_LEN+.5,n=this.ohlcv.length-1;if(!(this.ohlcv.length<2)){if(this.ohlcv.length<=t)var i=0,r=e;else i=n-t,r=.5;this.$props.ib?C.overwrite(this.range,[i-this.interval*r,n+this.interval*e]):C.overwrite(this.range,[this.ohlcv[i][0]-this.interval*r,this.ohlcv[n][0]+this.interval*e])}},subset:function(t){void 0===t&&(t=this.range);var e=w(this.filter(this.ohlcv,t[0]-this.interval,t[1]),2),n=e[0],i=e[1];return this.ti_map=new an,n?(this.sub_start=i,this.ti_map.init(this,n),this.$props.ib?this.ti_map.sub_i:n||[]):[]},common_props:function(){return{title_txt:this.chart.name||this.$props.title_txt,layout:this._layout,sub:this.sub,range:this.range,interval:this.interval,cursor:this.cursor,colors:this.$props.colors,font:this.$props.font,y_ts:this.y_transforms,tv_id:this.$props.tv_id,config:this.$props.config,buttons:this.$props.buttons,meta:this.meta,skin:this.$props.skin}},overlay_subset:function(t,e){var n=this;return t.map((function(t,i){var r=C.fast_filter(t.data,n.ti_map.i2t_mode(n.range[0]-n.interval,t.indexSrc),n.ti_map.i2t_mode(n.range[1],t.indexSrc));return{type:t.type,name:C.format_name(t),data:n.ti_map.parse(r[0]||[],t.indexSrc||"map"),settings:t.settings||n.settings_ov,grid:t.grid||{},tf:C.parse_tf(t.tf),i0:r[1],loading:t.loading,last:(n.last_values[e]||[])[i]}}))},section_props:function(t){return 0===t?this.main_section:this.sub_section},init_range:function(){this.calc_interval(),this.default_range()},layer_meta_props:function(t){t.grid_id in this.layers_meta||this.$set(this.layers_meta,t.grid_id,{}),this.$set(this.layers_meta[t.grid_id],t.layer_id,t),this.update_layout()},remove_meta_props:function(t,e){t in this.layers_meta&&this.$delete(this.layers_meta[t],e)},emit_custom_event:function(t){this.on_shader_event(t,"botbar"),this.$emit("custom-event",t),"remove-layer-meta"===t.event&&this.remove_meta_props.apply(this,s(t.args))},update_layout:function(t){t&&this.calc_interval();var e=new F(this);C.copy_layout(this._layout,e),this._hook_update&&this.ce("?chart-update",e)},legend_button_click:function(t){this.$emit("legend-button-click",t)},register_kb:function(t){this.$refs.keyboard&&this.$refs.keyboard.register(t)},remove_kb:function(t){this.$refs.keyboard&&this.$refs.keyboard.remove(t)},update_last_values:function(){var t=this;this.last_candle=this.ohlcv?this.ohlcv[this.ohlcv.length-1]:void 0,this.last_values={onchart:[],offchart:[]},this.onchart.forEach((function(e,n){var i=e.data||[];t.last_values.onchart[n]=i[i.length-1]})),this.offchart.forEach((function(e,n){var i=e.data||[];t.last_values.offchart[n]=i[i.length-1]}))},ce:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];this.emit_custom_event({event:t,args:n})},hooks:function(){for(var t=this,e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];n.forEach((function(e){return t["_hook_".concat(e)]=!0}))}},computed:{main_section:function(){var t=Object.assign({},this.common_props());return t.data=this.overlay_subset(this.onchart,"onchart"),t.data.push({type:this.chart.type||"Candles",main:!0,data:this.sub,i0:this.sub_start,settings:this.chart.settings||this.settings_ohlcv,grid:this.chart.grid||{},last:this.last_candle}),t.overlays=this.$props.overlays,t},sub_section:function(){var t=Object.assign({},this.common_props());return t.data=this.overlay_subset(this.offchart,"offchart"),t.overlays=this.$props.overlays,t},botbar_props:function(){var t=Object.assign({},this.common_props());return t.width=t.layout.botbar.width,t.height=t.layout.botbar.height,t.rerender=this.rerender,t},offsub:function(){return this.overlay_subset(this.offchart,"offchart")},ohlcv:function(){return this.$props.data.ohlcv||this.chart.data||[]},chart:function(){return this.$props.data.chart||{grid:{}}},onchart:function(){return this.$props.data.onchart||[]},offchart:function(){return this.$props.data.offchart||[]},filter:function(){return this.$props.ib?C.fast_filter_i:C.fast_filter},styles:function(){var t=this.$props.toolbar?this.$props.config.TOOLBAR:0;return{"margin-left":"".concat(t,"px")}},meta:function(){return{last:this.last_candle,sub_start:this.sub_start,activated:this.activated}},forced_tf:function(){return this.chart.tf}},data:function(){return{sub:[],range:[],interval:0,cursor:{x:null,y:null,t:null,y$:null,grid_id:null,locked:!1,values:{},scroll_lock:!1,mode:C.xmode()},rerender:0,layers_meta:{},y_transforms:{},settings_ohlcv:{},settings_ov:{},last_candle:[],last_values:{},sub_start:void 0,activated:!1}},watch:{width:function(){this.update_layout(),this._hook_resize&&this.ce("?chart-resize")},height:function(){this.update_layout(),this._hook_resize&&this.ce("?chart-resize")},ib:function(t){if(t)this.init_range(),C.overwrite(this.range,this.range),this.interval=1;else{var e=this.ti_map.i2t(this.range[0]),n=this.ti_map.i2t(this.range[1]);C.overwrite(this.range,[e,n]),this.interval=this.interval_ms}var i=this.subset();C.overwrite(this.sub,i),this.update_layout()},timezone:function(){this.update_layout()},colors:function(){C.overwrite(this.range,this.range)},forced_tf:function(t,e){this.update_layout(!0),this.ce("exec-all-scripts")},data:{handler:function(t,e){this.sub.length||this.init_range();var n=this.subset();(this.sub.length||n.length)&&C.overwrite(this.sub,n);var i=this.data_changed();this.update_layout(i),C.overwrite(this.range,this.range),this.cursor.scroll_lock=!!t.scrollLock,t.scrollLock&&this.cursor.locked&&(this.cursor.locked=!1),this._hook_data&&this.ce("?chart-data",i),this.update_last_values(),this.rerender++},deep:!0}}},_,[],!1,null,null,null);cn.options.__file="src/components/Chart.vue";const un=cn.exports;var hn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{key:t.tool_count,staticClass:"trading-vue-toolbar",style:t.styles},t._l(t.groups,(function(e,i){return e.icon&&!e.hidden?n("toolbar-item",{key:i,attrs:{data:e,subs:t.sub_map,dc:t.data,config:t.config,colors:t.colors,selected:t.is_selected(e)},on:{"item-selected":t.selected}}):t._e()})),1)};hn._withStripped=!0;var ln=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:["trading-vue-tbitem",t.selected?"selected-item":""],style:t.item_style,on:{click:function(e){return t.emit_selected("click")},mousedown:t.mousedown,touchstart:t.mousedown,touchend:function(e){return t.emit_selected("touch")}}},[n("div",{staticClass:"trading-vue-tbicon tvjs-pixelated",style:t.icon_style}),t._v(" "),t.data.group?n("div",{staticClass:"trading-vue-tbitem-exp",style:t.exp_style,on:{click:t.exp_click,mousedown:t.expmousedown,mouseover:t.expmouseover,mouseleave:t.expmouseleave}},[t._v("\n ᐳ\n ")]):t._e(),t._v(" "),t.show_exp_list?n("item-list",{attrs:{config:t.config,items:t.data.items,colors:t.colors,dc:t.dc},on:{"close-list":t.close_list,"item-selected":t.emit_selected_sub}}):t._e()],1)};ln._withStripped=!0;var dn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"tvjs-item-list",style:t.list_style(),on:{mousedown:t.thismousedown}},t._l(t.items,(function(e){return e.hidden?t._e():n("div",{class:t.item_class(e),style:t.item_style(e),on:{click:function(n){return t.item_click(n,e)}}},[n("div",{staticClass:"trading-vue-tbicon tvjs-pixelated",style:t.icon_style(e)}),t._v(" "),n("div",[t._v(t._s(e.type))])])})),0)};dn._withStripped=!0;const fn={name:"ItemList",props:["config","items","colors","dc"],mounted:function(){window.addEventListener("mousedown",this.onmousedown)},beforeDestroy:function(){window.removeEventListener("mousedown",this.onmousedown)},methods:{list_style:function(){var t=this.$props.config.TOOLBAR,e=this.colors.tbListBorder||this.colors.grid,n="1px solid ".concat(e);return{left:"".concat(t,"px"),background:this.colors.back,borderTop:n,borderRight:n,borderBottom:n}},item_class:function(t){return this.dc.tool===t.type?"tvjs-item-list-item selected-item":"tvjs-item-list-item"},item_style:function(t){var e=this.$props.config,n=e.TB_ICON+2*e.TB_ITEM_M+8,i=this.dc.tool===t.type;return{height:"".concat(n,"px"),color:i?void 0:"#888888"}},icon_style:function(t){var e=this.$props.config,n=e.TB_ICON_BRI,i=e.TB_ITEM_M;return{"background-image":"url(".concat(t.icon,")"),width:"25px",height:"25px",margin:"".concat(i,"px"),filter:"brightness(".concat(n,")")}},item_click:function(t,e){t.cancelBubble=!0,this.$emit("item-selected",e),this.$emit("close-list")},onmousedown:function(){this.$emit("close-list")},thismousedown:function(t){t.stopPropagation()}},computed:{},data:function(){return{}}};n(807);var pn=rt(fn,dn,[],!1,null,null,null);pn.options.__file="src/components/ItemList.vue";const gn={name:"ToolbarItem",props:["data","selected","colors","tv_id","config","dc","subs"],components:{ItemList:pn.exports},mounted:function(){if(this.data.group){var t=this.subs[this.data.group],e=this.data.items.find((function(e){return e.type===t}));e&&(this.sub_item=e)}},methods:{mousedown:function(t){var e=this;this.click_start=C.now(),this.click_id=setTimeout((function(){e.show_exp_list=!0}),this.config.TB_ICON_HOLD)},expmouseover:function(){this.exp_hover=!0},expmouseleave:function(){this.exp_hover=!1},expmousedown:function(t){this.show_exp_list&&t.stopPropagation()},emit_selected:function(t){if(!(C.now()-this.click_start>this.config.TB_ICON_HOLD))if(clearTimeout(this.click_id),this.data.group){var e=this.sub_item||this.data.items[0];this.$emit("item-selected",e)}else this.$emit("item-selected",this.data)},emit_selected_sub:function(t){this.$emit("item-selected",t),this.sub_item=t},exp_click:function(t){this.data.group&&(t.cancelBubble=!0,this.show_exp_list=!this.show_exp_list)},close_list:function(){this.show_exp_list=!1}},computed:{item_style:function(){if("System:Splitter"===this.$props.data.type)return this.splitter;var t=this.$props.config,e=t.TB_ITEM_M,n=.5*(t.TOOLBAR-t.TB_ICON)-e,i=t.TB_ICON+2*e,r=this.exp_hover?0:3;return{width:"".concat(i,"px"),height:"".concat(i,"px"),margin:"8px ".concat(n,"px 0px ").concat(n,"px"),"border-radius":"3px ".concat(r,"px ").concat(r,"px 3px")}},icon_style:function(){if("System:Splitter"===this.$props.data.type)return{};var t=this.$props.config,e=t.TB_ICON_BRI,n=t.TB_ICON,i=t.TB_ITEM_M,r=this.sub_item?this.sub_item.icon:this.$props.data.icon;return{"background-image":"url(".concat(r,")"),width:"".concat(n,"px"),height:"".concat(n,"px"),margin:"".concat(i,"px"),filter:"brightness(".concat(e,")")}},exp_style:function(){var t=this.$props.config,e=t.TB_ITEM_M,n=.5*t.TB_ICON+e,i=(t.TOOLBAR-2*n)/4;return{padding:"".concat(n,"px ").concat(i,"px"),transform:this.show_exp_list?"scale(-0.6, 1)":"scaleX(0.6)"}},splitter:function(){var t=this.$props.config,e=this.$props.colors.grid,n=t.TB_ITEM_M,i=.5*(t.TOOLBAR-t.TB_ICON)-n,r=t.TB_ICON+2*n;return{width:"".concat(r,"px"),height:"1px",margin:"8px ".concat(i,"px 8px ").concat(i,"px"),"background-color":e}}},data:function(){return{exp_hover:!1,show_exp_list:!1,sub_item:null}}};n(501);var vn=rt(gn,ln,[],!1,null,null,null);vn.options.__file="src/components/ToolbarItem.vue";function An(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return mn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mn(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function mn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}const yn={name:"Toolbar",props:["data","height","colors","tv_id","config"],components:{ToolbarItem:vn.exports},mounted:function(){},methods:{selected:function(t){this.$emit("custom-event",{event:"tool-selected",args:[t.type]}),t.group&&(this.sub_map[t.group]=t.type)},is_selected:function(t){var e=this;return t.group?!!t.items.find((function(t){return t.type===e.data.tool})):t.type===this.data.tool}},computed:{styles:function(){var t=this.$props.colors,e=this.$props.config.TB_BORDER,n=this.$props.config.TOOLBAR-e,i=(t.grid,t.tbBack||t.back),r=t.tbBorder||t.scale,o=this.$props.config.TB_B_STYLE;return{width:"".concat(n,"px"),height:"".concat(this.$props.height-3,"px"),"background-color":i,"border-right":"".concat(e,"px ").concat(o," ").concat(r)}},groups:function(){var t,e=[],n=An(this.data.tools||[]);try{for(n.s();!(t=n.n()).done;){var i=t.value;if(i.group){var r=e.find((function(t){return t.group===i.group}));r?r.items.push(i):e.push({group:i.group,icon:i.icon,items:[i]})}else e.push(i)}}catch(t){n.e(t)}finally{n.f()}return e}},watch:{data:{handler:function(t){t.tools&&(this.tool_count=t.tools.length)},deep:!0}},data:function(){return{tool_count:0,sub_map:{}}}};n(153);var _n=rt(yn,hn,[],!1,null,null,null);_n.options.__file="src/components/Toolbar.vue";const wn=_n.exports;var bn=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"tvjs-widgets",style:{width:t.width+"px",height:t.height+"px"}},t._l(Object.keys(t.map),(function(e){return n(t.initw(e),{key:e,tag:"component",attrs:{id:e,main:t.map[e].ctrl,data:t.map[e].data,tv:t.tv,dc:t.dc}})})),1)};bn._withStripped=!0;const xn={name:"Widgets",props:["width","height","map","tv","dc"],methods:{initw:function(t){return this.$props.map[t].cls}}};n(5);var kn=rt(xn,bn,[],!1,null,null,null);kn.options.__file="src/components/Widgets.vue";const Cn=kn.exports;var Bn=function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"tvjs-the-tip",style:t.style,domProps:{innerHTML:t._s(t.data.text)},on:{mousedown:function(e){return t.$emit("remove-me")}}})};Bn._withStripped=!0;const En={name:"TheTip",props:["data"],mounted:function(){var t=this;setTimeout((function(){return t.$emit("remove-me")}),3e3)},computed:{style:function(){return{background:this.data.color}}}};n(477);var In=rt(En,Bn,[],!1,null,null,null);In.options.__file="src/components/TheTip.vue";function Sn(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Mn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mn(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function Mn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function Tn(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return On(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return On(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function On(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}const Dn={name:"TradingVue",components:{Chart:un,Toolbar:wn,Widgets:Cn,TheTip:In.exports},mixins:[{mounted:function(){this.ctrllist(),this.skin_styles()},methods:{ctrllist:function(){this.ctrl_destroy(),this.controllers=[];var t,e=Sn(this.$props.extensions);try{for(e.s();!(t=e.n()).done;){var n=t.value,i=n.Main.__name__;this.xSettings[i]||this.$set(this.xSettings,i,{});var r=new n.Main(this,this.data,this.xSettings[i]);r.name=i,this.controllers.push(r)}}catch(t){e.e(t)}finally{e.f()}return this.controllers},pre_dc:function(t){var e,n=Sn(this.controllers);try{for(n.s();!(e=n.n()).done;){var i=e.value;i.update&&i.update(t)}}catch(t){n.e(t)}finally{n.f()}},post_dc:function(t){var e,n=Sn(this.controllers);try{for(n.s();!(e=n.n()).done;){var i=e.value;i.post_update&&i.post_update(t)}}catch(t){n.e(t)}finally{n.f()}},ctrl_destroy:function(){var t,e=Sn(this.controllers);try{for(e.s();!(t=e.n()).done;){var n=t.value;n.destroy&&n.destroy()}}catch(t){e.e(t)}finally{e.f()}},skin_styles:function(){var t="tvjs-skin-styles",e=document.getElementById(t);e&&e.parentNode.removeChild(e);if(this.skin_proto&&this.skin_proto.styles){var n=document.createElement("style");n.setAttribute("id",t),n.innerHTML=this.skin_proto.styles,this.$el.appendChild(n)}}},computed:{ws:function(){var t,e={},n=Sn(this.controllers);try{for(n.s();!(t=n.n()).done;){var i=t.value;if(i.widgets)for(var r in i.widgets)e[r]=i.widgets[r],e[r].ctrl=i}}catch(t){n.e(t)}finally{n.f()}return e},skins:function(){var t,e={},n=Sn(this.$props.extensions);try{for(n.s();!(t=n.n()).done;){var i=t.value;for(var r in i.skins||{})e[r]=i.skins[r]}}catch(t){n.e(t)}finally{n.f()}return e},skin_proto:function(){return this.skins[this.$props.skin]},colorpack:function(){var t=this.skins[this.$props.skin];return t?t.colors:void 0}},watch:{skin:function(t,e){t!==e&&this.resetChart(),this.skin_styles()},extensions:function(){this.ctrllist()},xSettings:{handler:function(t,e){var n,i=Sn(this.controllers);try{for(i.s();!(n=i.n()).done;){var r=n.value;r.onsettings&&r.onsettings(t,e)}}catch(t){i.e(t)}finally{i.f()}},deep:!0}},data:function(){return{controllers:[]}}}],props:{titleTxt:{type:String,default:"TradingVue.js"},id:{type:String,default:"trading-vue-js"},width:{type:Number,default:800},height:{type:Number,default:421},colorTitle:{type:String,default:"#42b883"},colorBack:{type:String,default:"#121826"},colorGrid:{type:String,default:"#2f3240"},colorText:{type:String,default:"#dedddd"},colorTextHL:{type:String,default:"#fff"},colorScale:{type:String,default:"#838383"},colorCross:{type:String,default:"#8091a0"},colorCandleUp:{type:String,default:"#23a776"},colorCandleDw:{type:String,default:"#e54150"},colorWickUp:{type:String,default:"#23a77688"},colorWickDw:{type:String,default:"#e5415088"},colorWickSm:{type:String,default:"transparent"},colorVolUp:{type:String,default:"#79999e42"},colorVolDw:{type:String,default:"#ef535042"},colorPanel:{type:String,default:"#565c68"},colorTbBack:{type:String},colorTbBorder:{type:String,default:"#8282827d"},colors:{type:Object},font:{type:String,default:y.ChartConfig.FONT},toolbar:{type:Boolean,default:!1},data:{type:Object,required:!0},overlays:{type:Array,default:function(){return[]}},chartConfig:{type:Object,default:function(){return{}}},legendButtons:{type:Array,default:function(){return[]}},indexBased:{type:Boolean,default:!1},extensions:{type:Array,default:function(){return[]}},xSettings:{type:Object,default:function(){return{}}},skin:{type:String},timezone:{type:Number,default:0}},computed:{chart_props:function(){var t=this.$props.toolbar?this.chart_config.TOOLBAR:0,e={title_txt:this.$props.titleTxt,overlays:this.$props.overlays.concat(this.mod_ovs),data:this.decubed,width:this.$props.width-t,height:this.$props.height,font:this.font_comp,buttons:this.$props.legendButtons,toolbar:this.$props.toolbar,ib:this.$props.indexBased||this.index_based||!1,colors:Object.assign({},this.$props.colors||this.colorpack),skin:this.skin_proto,timezone:this.$props.timezone};return this.parse_colors(e.colors),e},chart_config:function(){return Object.assign({},y.ChartConfig,this.$props.chartConfig)},decubed:function(){var t=this.$props.data;return void 0!==t.data?(t.init_tvjs(this),t.data):t},index_based:function(){var t=this.$props.data;return t.chart?t.chart.indexBased:!!t.data&&t.data.chart.indexBased},mod_ovs:function(){var t,e=[],n=Tn(this.$props.extensions);try{for(n.s();!(t=n.n()).done;){var i=t.value;e.push.apply(e,s(Object.values(i.overlays)))}}catch(t){n.e(t)}finally{n.f()}return e},font_comp:function(){return this.skin_proto&&this.skin_proto.font?this.skin_proto.font:this.font}},data:function(){return{reset:0,tip:null}},beforeDestroy:function(){this.custom_event({event:"before-destroy"}),this.ctrl_destroy()},methods:{resetChart:function(t){var e=this;void 0===t&&(t=!0),this.reset++;var n=this.getRange();!t&&n[0]&&n[1]&&this.$nextTick((function(){return e.setRange.apply(e,s(n))})),this.$nextTick((function(){return e.custom_event({event:"chart-reset",args:[]})}))},goto:function(t){this.chart_props.ib&&(t=this.$refs.chart.ti_map.gt2i(t,this.$refs.chart.ohlcv));this.$refs.chart.goto(t)},setRange:function(t,e){if(this.chart_props.ib){var n=this.$refs.chart.ti_map,i=this.$refs.chart.ohlcv;t=n.gt2i(t,i),e=n.gt2i(e,i)}this.$refs.chart.setRange(t,e)},getRange:function(){if(this.chart_props.ib){var t=this.$refs.chart.ti_map;return this.$refs.chart.range.map((function(e){return t.i2t(e)}))}return this.$refs.chart.range},getCursor:function(){var t=this.$refs.chart.cursor;if(this.chart_props.ib){var e=this.$refs.chart.ti_map,n=Object.assign({},t);return n.i=n.t,n.t=e.i2t(n.t),n}return t},showTheTip:function(t,e){void 0===e&&(e="orange"),this.tip={text:t,color:e}},legend_button:function(t){this.custom_event({event:"legend-button-click",args:[t]})},custom_event:function(t){"args"in t?this.$emit.apply(this,[t.event].concat(s(t.args))):this.$emit(t.event);var e=this.$props.data,n=0!==this.controllers.length;n&&this.pre_dc(t),e.tv&&e.on_custom_event(t.event,t.args),n&&this.post_dc(t)},range_changed:function(t){if(this.chart_props.ib){var e=this.$refs.chart.ti_map;t=t.map((function(t){return e.i2t(t)}))}this.$emit("range-changed",t),this.custom_event({event:"range-changed",args:[t]}),this.onrange&&this.onrange(t)},set_loader:function(t){var e=this;this.onrange=function(n){var i=e.chart_props.ib?"_ms":"",r=e.$refs.chart["interval"+i];t.range_changed(n,r)}},parse_colors:function(t){for(var e in this.$props)if(0===e.indexOf("color")&&"colors"!==e){var n=e.replace("color","");if(t[n=n[0].toLowerCase()+n.slice(1)])continue;t[n]=this.$props[e]}},mousedown:function(){this.$refs.chart.activated=!0},mouseleave:function(){this.$refs.chart.activated=!1}}};n(863);var Qn=rt(Dn,i,[],!1,null,null,null);Qn.options.__file="src/TradingVue.vue";const Rn=Qn.exports;function Yn(t,e,n,i,r,o,s){try{var a=t[o](s),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(i,r)}function jn(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function s(t){Yn(o,i,r,s,a,"next",t)}function a(t){Yn(o,i,r,s,a,"throw",t)}s(void 0)}))}}var Un=n(757),Ln=n.n(Un);const Nn=JSON.parse('["BTCUF4D4G8DcEMBOACALuaB2ArJgXMKgDQCmRAdhDKgHQkAeADgPaKoDO45wAbH6AF8i2ACw886anSasOGcgFcAtgGMljPADMF5FagCWzbsRKhoiEqgWJyaALQkh7VIjUbtug0cKkzFqzZoADwkAPx2AIwSkGFRAAwCiUQ8mAAcBCYUVHBIyIhcwNhxcaBE+gWiPKXwBRFxEaAA3B56hrbsPqbQ+prAAISINPrsAMqy8ABGADYkAIKIiPAAngAy+gDWJISgoKgAFojMAO7I5CQnAKILrMAARACS5AhT+gAmyK/wqPC3TT39JAAPoDaDNyABzfaQOIAMhhfWAJGQ+lsqAA2nEALo7faHE5nS7XRB3R7PN7I8ivBi/Rr7YY0T7fcDEOnsIaUhjgMismjsSwAIWYOk+iH0JA6pR5KmY6iQJHAt0USgmJEQt3AzKWjBIzE0aD29KUKNgoX0NCVbjwZucrnURB5fKQKj24HgvJITr29oNbOeLE40CEUus7FYXAUUym3vpZ3oqCmx3DkejbNjdPBLsUkYEtAYLDYnHYRDZjEOqGYqC1JHdqAAwjLGHLwC0vMYzP9bi22rc+prtbq0LsDsdTudkFdDsSHk94C93khwcoSORUDT/NZUT6aNLZRZmSmnDRSxWK1WayMPa4XV3vKh271OzpWkYe32dXq77iRwTx0SSTO52QBclxXNdLA3fV6UdK991ZQ9j3LSttV5WRmyfVswByFB0FZUhmS3FEqXoRp10CHlGTdUM2BAG9uHIIhED8cCyO3Bs5WAcg0RITEGK47EBB2FMa0FYUkDFCUD2LI8y1PZC+VQETKTE8U0M8NpMIQbD8PpCi8J5QiGBI5jN0NY1mRoMFIT2OF0SxPihKUeB6FgczLP2Gy0VBZcrMiTF7LgqSENk6tNEsZ1VOfNtul6OINW0tkKI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78ZaZfjaNRgKedRgTdtg/gVwbT4dhSbg6d6OAKkG4g2770mD3I9jMsGJQRDzd1HcH04Z2Z44LwYvABrz7gy0Ftmed47AY8EqgtsyAGfpxhVVoFjghwCW+AVyxgyPyJg7gRCArH6BmJ+D9OS8G3fQQYngtszimOEBKGDOqwQxCG+HGdZ6wRMF5A1ihpg80bOgjkFbAAd5lgwAye+OsGeQV8GrYEbKtAiiDyQVJJPsUBBFgzdAiUUsGUQscZjbCiDIQk0EUQ6sFugRDyCWMbAwQyiEmTXiHorLiHorPsEtAyoFDgzkwQZCSTbMC/JYg/0Gfg8MFtmYMF6EUMFoQt0CRgqg5M/dl5aQ9NY97AcGxbXIFVYOwAgYGtQogJeBKQ0UEqQoUzqQ3EbGwMMFCmBM4zrET5IRPUGO+PFytg0T5xmOvJeQ+A68QwHyOzSkBhsXwAsIZTZ1mIuoOPcDK2qQVwxQlG6cmFlyK3YCSZHFlwgZIOSuzJG55STlwAQuKGYbQnLO+DXyXEXCGjjdMEugoiHu+aCpCgwj44cDnAEKAABQ0QwAAxLUhJEnnBH2JwUIQDZIVgHqR0XkcAfnkcBWAPt17JjdcgAA=="]');var Fn=n(961),Gn=n.n(Fn);const Kn=function(){function t(e){G(this,t),this.dc=e,this.tasks={},this.onevent=function(){},this.start()}var e,n;return H(t,[{key:"start",value:function(){var t=this;this.worker&&this.worker.terminate(),window.URL=window.URL||window.webkitURL;var e,n=Gn().decompressFromBase64(Nn[0]);try{e=new Blob([n],{type:"application/javascript"})}catch(t){window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,(e=new BlobBuilder).append(n),e=e.getBlob()}this.worker=new Worker(URL.createObjectURL(e)),this.worker.onmessage=function(e){return t.onmessage(e)}}},{key:"start_socket",value:function(){var t=this;this.dc.sett.node_url&&(this.socket=new WebSocket(this.dc.sett.node_url),this.socket.addEventListener("message",(function(e){t.onmessage({data:JSON.parse(e.data)})})),this.msg_queue=[])}},{key:"send",value:function(t,e){if(this.dc.sett.node_url)return this.send_node(t,e);if(e){var n=e.map((function(e){return t.data[e]}));this.worker.postMessage(t,n)}else this.worker.postMessage(t)}},{key:"send_node",value:function(t,e){if(this.socket||this.start_socket(),this.socket&&this.socket.readyState){for(;this.msg_queue.length;){var n=this.msg_queue.shift();this.socket.send(JSON.stringify(n))}this.socket.send(JSON.stringify(t))}else this.msg_queue.push(t)}},{key:"onmessage",value:function(t){t.data.id in this.tasks?(this.tasks[t.data.id](t.data.data),delete this.tasks[t.data.id]):this.onevent(t)}},{key:"exec",value:(n=jn(Ln().mark((function t(e,n,i){var r=this;return Ln().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,o){var s=C.uuid();r.send({type:e,id:s,data:n},i),r.tasks[s]=function(e){t(e)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e,i){return n.apply(this,arguments)})},{key:"just",value:function(t,e,n){var i=C.uuid();this.send({type:t,id:i,data:e},n)}},{key:"relay",value:(e=jn(Ln().mark((function t(e,n){var i=this;return Ln().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===n&&(n=!1),t.abrupt("return",new Promise((function(t,r){i.send(e,e.tx_keys),n||(i.tasks[e.id]=function(e){t(e)})})));case 2:case"end":return t.stop()}}),t)}))),function(t,n){return e.apply(this,arguments)})},{key:"destroy",value:function(){this.worker&&this.worker.terminate()}}]),t}();function Hn(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Jn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jn(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function Jn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var Pn=function(){function t(e,n){G(this,t),this.type=n.type,this.id=n.id,this.dc=e,n.data&&(this.dc.ww.just("upload-data",Vt({},this.id,n)),delete n.data);var i=Object.getPrototypeOf(this);Object.setPrototypeOf(n,i),Object.defineProperty(n,"dc",{get:function(){return e}})}var e;return H(t,[{key:"set",value:function(t,e){void 0===e&&(e=!0),this.dc.ww.just("dataset-op",{id:this.id,type:"set",data:t,exec:e})}},{key:"update",value:function(t){this.dc.ww.just("update-data",Vt({},this.id,t))}},{key:"merge",value:function(t,e){void 0===e&&(e=!0),this.dc.ww.just("dataset-op",{id:this.id,type:"mrg",data:t,exec:e})}},{key:"remove",value:function(t){void 0===t&&(t=!0),this.dc.del("datasets.".concat(this.id)),this.dc.ww.just("dataset-op",{id:this.id,type:"del",exec:t}),delete this.dc.dss[this.id]}},{key:"data",value:(e=jn(Ln().mark((function t(){var e;return Ln().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.dc.ww.exec("get-dataset",this.id);case 2:if(e=t.sent){t.next=5;break}return t.abrupt("return");case 5:return t.abrupt("return",e.data);case 6:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})}],[{key:"watcher",value:function(e,n){var i,r=e.map((function(t){return t.id})),o=n.map((function(t){return t.id})),s=Hn(r);try{for(s.s();!(i=s.n()).done;){var a=i.value;if(!o.includes(a)){var c=e.filter((function(t){return t.id===a}))[0];this.dss[a]=new t(this,c)}}}catch(t){s.e(t)}finally{s.f()}var u,h=Hn(o);try{for(h.s();!(u=h.n()).done;){a=u.value;!r.includes(a)&&this.dss[a]&&this.dss[a].remove()}}catch(t){h.e(t)}finally{h.f()}}},{key:"make_tx",value:function(t,e){var n=t.data.chart.data,i={};return e.find((function(t){return"OHLCV"===t.type}))&&(i={ohlcv:n}),i}}]),t}();function zn(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return $n(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $n(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function $n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function qn(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Wn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wn(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function Wn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function Xn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=ae(t);if(e){var r=ae(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return se(this,n)}}var Vn=function(t){ie(i,t);var e,n=Xn(i);function i(){return G(this,i),n.apply(this,arguments)}return H(i,[{key:"init_tvjs",value:function(t){var e=this;this.tv||(this.tv=t,this.init_data(),this.update_ids(),this.tv.$watch((function(){return e.get_by_query(".settings")}),(function(t,n){return e.on_settings(t,n)})),this.tv.$watch((function(){return e.get(".").map((function(t){return t.settings.$uuid}))}),(function(t,n){return e.on_ids_changed(t,n)})),this.tv.$watch((function(){return e.get("datasets")}),Pn.watcher.bind(this)))}},{key:"init_data",value:function(t){"chart"in this.data||this.tv.$set(this.data,"chart",{type:"Candles",data:this.data.ohlcv||[]}),"onchart"in this.data||this.tv.$set(this.data,"onchart",[]),"offchart"in this.data||this.tv.$set(this.data,"offchart",[]),this.data.chart.settings||this.tv.$set(this.data.chart,"settings",{}),delete this.data.ohlcv,"datasets"in this.data||this.tv.$set(this.data,"datasets",[]);var e,n=qn(this.data.datasets);try{for(n.s();!(e=n.n()).done;){var i=e.value;this.dss||(this.dss={}),this.dss[i.id]=new Pn(this,i)}}catch(t){n.e(t)}finally{n.f()}}},{key:"range_changed",value:(e=jn(Ln().mark((function t(e,n,i){var r,o,s=this;return Ln().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0===i&&(i=!1),this.loader){t.next=3;break}return t.abrupt("return");case 3:if(this.loading){t.next=19;break}if(r=this.data.chart.data[0][0],!(e[0]<r)){t.next=19;break}return this.loading=!0,t.next=9,C.pause(250);case 9:if((e=e.slice())[0]=Math.floor(e[0]),e[1]=Math.floor(r),!(o=this.loader(e,n,(function(t){s.chunk_loaded(t)})))||!o.then){t.next=19;break}return t.t0=this,t.next=17,o;case 17:t.t1=t.sent,t.t0.chunk_loaded.call(t.t0,t.t1);case 19:i||(this.last_chunk=[e,n]);case 20:case"end":return t.stop()}}),t,this)}))),function(t,n,i){return e.apply(this,arguments)})},{key:"chunk_loaded",value:function(t){if(Array.isArray(t))this.merge("chart.data",t);else for(var e in t)this.merge(e,t[e]);this.loading=!1,this.last_chunk&&(this.range_changed.apply(this,s(this.last_chunk).concat([!0])),this.last_chunk=null)}},{key:"update_ids",value:function(){this.data.chart.id="chart.".concat(this.data.chart.type);var t={};this.gldc={},this.dcgl={};var e,n=qn(this.data.onchart);try{for(n.s();!(e=n.n()).done;){void 0===t[(c=e.value).type]&&(t[c.type]=0);var i=t[c.type]++;c.id="onchart.".concat(c.type).concat(i),c.name||(c.name=c.type+" ".concat(i)),c.settings||this.tv.$set(c,"settings",{}),this.gldc["g0_".concat(c.type,"_").concat(i)]=c.id,this.dcgl[c.id]="g0_".concat(c.type,"_").concat(i)}}catch(t){n.e(t)}finally{n.f()}t={};var r,o=[{}],s=0,a=qn(this.data.offchart);try{for(a.s();!(r=a.n()).done;){var c;void 0===t[(c=r.value).type]&&(t[c.type]=0);var u=t[c.type]++;c.id="offchart.".concat(c.type).concat(u),c.name||(c.name=c.type+" ".concat(u)),c.settings||this.tv.$set(c,"settings",{}),s++;var h=(c.grid||{}).id||s;(c.grid||{}).id&&s--,o[h]||(o[h]={}),void 0===o[h][c.type]&&(o[h][c.type]=0);var l=o[h][c.type]++;this.gldc["g".concat(h,"_").concat(c.type,"_").concat(l)]=c.id,this.dcgl[c.id]="g".concat(h,"_").concat(c.type,"_").concat(l)}}catch(t){a.e(t)}finally{a.f()}}},{key:"update_candle",value:function(t){var e=this.data.chart.data,n=e[e.length-1],i=t.candle,r=this.tv.$refs.chart.interval_ms,o=n[0]+r,a=t.t||C.now(),c=a>=o?a-a%r:n[0];return i.length>=6?c=i[0]:i=[c].concat(s(i)),this.agg.push("ohlcv",i),this.update_overlays(t,c,r),c>=o}},{key:"update_tick",value:function(t){var e=this.data.chart.data,n=e[e.length-1],i=t.price,r=t.volume||0,o=this.tv.$refs.chart.interval_ms;if(!o)return console.warn("Define the main timeframe");var s=t.t||C.now();n||(n=[s-s%o]);var a=n[0]+o,c=s>=a?s-s%o:n[0];if((c>=a||!e.length)&&void 0!==i){var u=[c,i,i,i,i,r];this.agg.push("ohlcv",u,o),e.push(u),this.scroll_to(c)}else void 0!==i&&(n[2]=Math.max(i,n[2]),n[3]=Math.min(i,n[3]),n[4]=i,n[5]+=r,this.agg.push("ohlcv",n,o));return this.update_overlays(t,c,o),c>=a}},{key:"update_overlays",value:function(t,e,n){for(var i in t)if("price"!==i&&"volume"!==i&&"candle"!==i&&"t"!==i)if(i.includes("datasets."))this.agg.push(i,t[i],n);else{if(Array.isArray(t[i]))r=t[i];else var r=[t[i]];i.includes(".data")||(i+=".data"),this.agg.push(i,[e].concat(s(r)),n)}}},{key:"get_by_query",value:function(t,e){var n=t.split(".");switch(n[0]){case"chart":var i=this.chart_as_piv(n);break;case"onchart":case"offchart":i=this.query_search(t,n);break;case"datasets":var r,o=qn(i=this.query_search(t,n));try{for(o.s();!(r=o.n()).done;){var a=r.value;"data"===a.i&&(a.v=this.dss[a.p.id].data())}}catch(t){o.e(t)}finally{o.f()}break;default:var c=this.query_search(t,["onchart",n[0],n[1]]),u=this.query_search(t,["offchart",n[0],n[1]]);i=[].concat(s(c),s(u))}return i.filter((function(t){return!(t.v||{}).locked||e}))}},{key:"chart_as_piv",value:function(t){var e=t[1];return e?[{p:this.data.chart,i:e,v:this.data.chart[e]}]:[{p:this.data,i:"chart",v:this.data.chart}]}},{key:"query_search",value:function(t,e){var n=this,i=e[0],r=e[1]||"",o=e[2],s=this.data[i].filter((function(e){return e.id===t||e.id&&e.id.includes(r)||e.name===t||e.name&&e.name.includes(r)||t.includes((e.settings||{}).$uuid)}));return o?s.map((function(t){return{p:t,i:o,v:t[o]}})):s.map((function(t,e){return{p:n.data[i],i:n.data[i].indexOf(t),v:t}}))}},{key:"merge_objects",value:function(t,e,n){void 0===n&&(n={}),Object.assign(n,t.v),Object.assign(n,e),this.tv.$set(t.p,t.i,n)}},{key:"merge_ts",value:function(t,e){if(!e.length)return t.v;var n=[t.v[0][0],t.v[t.v.length-1][0]],i=[e[0][0],e[e.length-1][0]],r=[Math.max(n[0],i[0]),Math.min(n[1],i[1])];if(r[1]>=r[0]){var o,a,c=this.ts_overlap(t.v,e,r),u=c.od,h=c.d1,l=c.d2;if((o=t.v).splice.apply(o,s(h)),(a=e).splice.apply(a,s(l)),!t.v.length&&!e.length)return this.tv.$set(t.p,t.i,u),t.v;e.length||(e=t.v.splice(h[0])),t.v.length||(t.v=e.splice(l[0])),this.tv.$set(t.p,t.i,this.combine(t.v,u,e))}else this.tv.$set(t.p,t.i,this.combine(t.v,[],e));return t.v}},{key:"ts_overlap",value:function(t,e,n){for(var i=n[0],r=n[1],o={},s=t.filter((function(t){return t[0]>=i&&t[0]<=r})),a=e.filter((function(t){return t[0]>=i&&t[0]<=r})),c=t.indexOf(s[0]),u=t.indexOf(s[s.length-1]),h=e.indexOf(a[0]),l=e.indexOf(a[a.length-1]),d=0;d<s.length;d++)o[s[d][0]]=s[d];for(d=0;d<a.length;d++)o[a[d][0]]=a[d];return{od:Object.keys(o).sort().map((function(t){return o[t]})),d1:[c,u-c+1],d2:[h,l-h+1]}}},{key:"combine",value:function(t,e,n){function i(t){return t[t.length-1][0]}return t.length||(t=e,e=[]),n.length||(n=e,e=[]),n[0][0]>=t[0][0]&&i(n)<=i(t)?Object.assign(t,e):i(n)>i(t)?e.length<1e5&&n.length<1e5?((r=t).push.apply(r,s(e).concat(s(n))),t):t.concat(e,n):n[0][0]<t[0][0]?e.length<1e5&&n.length<1e5?((o=n).push.apply(o,s(e).concat(s(t))),n):n.concat(e,t):[];var r,o}},{key:"fast_merge",value:function(t,e,n){if(void 0===n&&(n=!0),t){var i=(t[t.length-1]||[])[0],r=e[0];!t.length||r>i?(t.push(e),n&&this.sett.auto_scroll&&this.scroll_to(r)):r===i&&(n?this.tv.$set(t,t.length-1,e):t[t.length-1]=e)}}},{key:"scroll_to",value:function(t){if(!this.tv.$refs.chart.cursor.locked){var e=this.tv.$refs.chart.last_candle;if(e){var n=e[0],i=this.tv.getRange()[1]-n;i>0&&this.tv.goto(t+i)}}}}]),i}(function(){function t(){var e=this;G(this,t),this.ww=new Kn(this),this.ww.onevent=function(t){var n,i=zn(e.tv.controllers);try{for(i.s();!(n=i.n()).done;){(a=n.value).ww&&a.ww(t.data)}}catch(t){i.e(t)}finally{i.f()}switch(t.data.type){case"request-data":if(e.ww._data_uploading)break;var r=Pn.make_tx(e,t.data.data);e.send_meta_2_ww(),e.ww.just("upload-data",r),e.ww._data_uploading=!0;break;case"overlay-data":e.on_overlay_data(t.data.data);break;case"overlay-update":e.on_overlay_update(t.data.data);break;case"data-uploaded":e.ww._data_uploading=!1;break;case"engine-state":e.se_state=Object.assign(e.se_state||{},t.data.data);break;case"modify-overlay":e.modify_overlay(t.data.data);break;case"script-signal":e.tv.$emit("signal",t.data.data)}var o,s=zn(e.tv.controllers);try{for(s.s();!(o=s.n()).done;){var a;(a=o.value).post_ww&&a.post_ww(t.data)}}catch(t){s.e(t)}finally{s.f()}}}return H(t,[{key:"on_custom_event",value:function(t,e){switch(t){case"register-tools":this.register_tools(e);break;case"exec-script":this.exec_script(e);break;case"exec-all-scripts":this.exec_all_scripts();break;case"data-len-changed":this.data_changed(e);break;case"tool-selected":if(!e[0])break;if("System"===e[0].split(":")[0]){this.system_tool(e[0].split(":")[1]);break}this.tv.$set(this.data,"tool",e[0]),"Cursor"===e[0]&&this.drawing_mode_off();break;case"grid-mousedown":this.grid_mousedown(e);break;case"drawing-mode-off":this.drawing_mode_off();break;case"change-settings":this.change_settings(e);break;case"range-changed":this.scripts_onrange.apply(this,s(e));break;case"scroll-lock":this.on_scroll_lock(e[0]);break;case"object-selected":this.object_selected(e);break;case"remove-tool":this.system_tool("Remove");break;case"before-destroy":this.before_destroy()}}},{key:"on_settings",value:function(t,e){var n=this;if(this.sett.scripts){for(var i={},r=!1,o=function(){var o=t[s];if(!e.filter((function(t){return t.v===o.v})).length&&o.p.settings.$props){var a=o.p.settings.$uuid;C.is_scr_props_upd(o,e)&&C.delayed_exec(o.p)&&(i[a]=o.v,r=!0,n.tv.$set(o.p,"loading",!0))}},s=0;s<t.length;s++)o();if(r&&Object.keys(i).length){var a=this.tv.$refs.chart.interval_ms||this.data.chart.tf,c=this.tv.getRange();this.ww.just("update-ov-settings",{delta:i,tf:a,range:c})}}}},{key:"on_ids_changed",value:function(t,e){var n=e.filter((function(e){return void 0!==e&&!t.includes(e)}));n.length&&this.ww.just("remove-scripts",n)}},{key:"register_tools",value:function(t){var e,n={},i=zn(this.data.tools||[]);try{for(i.s();!(e=i.n()).done;){n[(a=e.value).type]=a,delete a.type}}catch(t){i.e(t)}finally{i.f()}this.tv.$set(this.data,"tools",[]);var r,o=[{type:"Cursor",icon:Xt["cursor.png"]}],s=zn(t);try{for(s.s();!(r=s.n()).done;){var a=r.value,c=Object.assign({},a.info),u=a.info.type||"Default";for(var h in c.type="".concat(a.use_for,":").concat(u),this.merge_presets(c,n[a.use_for]),this.merge_presets(c,n[c.type]),delete c.mods,o.push(c),a.info.mods){var l=Object.assign({},c);(l=Object.assign(l,a.info.mods[h])).type="".concat(a.use_for,":").concat(h),this.merge_presets(l,n[a.use_for]),this.merge_presets(l,n[l.type]),o.push(l)}}}catch(t){s.e(t)}finally{s.f()}this.tv.$set(this.data,"tools",o),this.tv.$set(this.data,"tool","Cursor")}},{key:"exec_script",value:function(t){if(t.length&&this.sett.scripts){var e=this.get_overlay(t[0]);if(!e||!1===e.scripts)return;e.script&&e.script.src&&(t[0].src=e.script.src);var n=e.settings,i=t[0].src.props||{};for(var r in n.$uuid||(n.$uuid="".concat(e.type,"-").concat(C.uuid2())),t[0].uuid=n.$uuid,t[0].sett=n,i||{}){var o=i[r];if(void 0===n[r]){if(void 0===o.def)return void console.error("Overlay ".concat(e.id,": script prop '").concat(r,"' ")+"doesn't have a default value");n[r]=o.val=o.def}else o.val=n[r]}if(n.$props)for(var r in n)n.$props.includes(r)&&!(r in i)&&delete n[r];n.$props=Object.keys(t[0].src.props||{}),this.tv.$set(e,"loading",!0);var s=this.tv.$refs.chart.interval_ms||this.data.chart.tf,a=this.tv.getRange();e.script&&null!=e.script.output&&(t[0].output=e.script.output),this.ww.just("exec-script",{s:t[0],tf:s,range:a})}}},{key:"exec_all_scripts",value:function(){if(this.sett.scripts){this.set_loading(!0);var t=this.tv.$refs.chart.interval_ms||this.data.chart.tf,e=this.tv.getRange();this.ww.just("exec-all-scripts",{tf:t,range:e})}}},{key:"scripts_onrange",value:function(t){if(this.sett.scripts){var e={};if(this.get(".").forEach((function(t){t.script&&t.script.execOnRange&&t.settings.$uuid&&C.delayed_exec(t)&&(e[t.settings.$uuid]=t.settings)})),Object.keys(e).length){var n=this.tv.$refs.chart.interval_ms||this.data.chart.tf,i=this.tv.getRange();this.ww.just("update-ov-settings",{delta:e,tf:n,range:i})}}}},{key:"modify_overlay",value:function(t){var e=this.get_overlay(t);if(e)for(var n in t.fields||{})"object"===re(e[n])?this.merge("".concat(t.uuid,".").concat(n),t.fields[n]):this.tv.$set(e,n,t.fields[n])}},{key:"data_changed",value:function(t){if(this.sett.scripts&&!1!==this.sett.data_change_exec){var e=this.data.chart.data;this.ww._data_uploading||this.se_state.scripts&&(this.send_meta_2_ww(),this.ww.just("upload-data",{ohlcv:e}),this.ww._data_uploading=!0,this.set_loading(!0))}}},{key:"set_loading",value:function(t){var e,n=zn(this.get(".").filter((function(t){return t.settings.$props})));try{for(n.s();!(e=n.n()).done;){var i=e.value;this.merge("".concat(i.id),{loading:t})}}catch(t){n.e(t)}finally{n.f()}}},{key:"send_meta_2_ww",value:function(){var t=this.tv.$refs.chart.interval_ms||this.data.chart.tf,e=this.tv.getRange();this.ww.just("send-meta-info",{tf:t,range:e})}},{key:"merge_presets",value:function(t,e){if(e)for(var n in e)"settings"===n?Object.assign(t[n],e[n]):t[n]=e[n]}},{key:"grid_mousedown",value:function(t){var e=this;this.object_selected([]);var n=function(){return e.get("RangeTool").filter((function(t){return t.settings.shiftMode})).forEach((function(t){return e.del(t.id)}))};this.data.tool&&"Cursor"!==this.data.tool&&!this.data.drawingMode?"tap"!==t[1].type?(this.tv.$set(this.data,"drawingMode",!0),this.build_tool(t[0])):this.tv.showTheTip("<b>Hodl</b>+<b>Drug</b> to create, <b>Tap</b> to finish a tool"):this.sett.shift_measure&&t[1].shiftKey?(n(),this.tv.$nextTick((function(){return e.build_tool(t[0],"RangeTool:ShiftMode")}))):n()}},{key:"drawing_mode_off",value:function(){this.tv.$set(this.data,"drawingMode",!1),this.tv.$set(this.data,"tool","Cursor")}},{key:"build_tool",value:function(t,e){var n=this.data.tools;e=e||this.data.tool;var i=n.find((function(t){return t.type===e}));if(i){var r=Object.assign({},i.settings||{}),o=(i.data||[]).slice();"legend"in r||(r.legend=!1),"z-index"in r||(r["z-index"]=100),r.$selected=!0,r.$state="wip";var s=t?"offchart":"onchart",a=this.add(s,{name:i.name,type:e.split(":")[0],settings:r,data:o,grid:{id:t}});r.$uuid="".concat(a,"-").concat(C.now()),this.tv.$set(this.data,"selected",r.$uuid),this.add_trash_icon()}}},{key:"system_tool",value:function(t){switch(t){case"Remove":this.data.selected&&(this.del(this.data.selected),this.remove_trash_icon(),this.drawing_mode_off(),this.on_scroll_lock(!1))}}},{key:"change_settings",value:function(t){var e=t[0];delete e.id;t[1];this.merge("".concat(t[3],".settings"),e)}},{key:"on_scroll_lock",value:function(t){this.tv.$set(this.data,"scrollLock",t)}},{key:"object_selected",value:function(t){var e=this.data.selected;e&&(this.merge("".concat(e,".settings"),{$selected:!1}),this.remove_trash_icon()),this.tv.$set(this.data,"selected",null),t.length&&(this.tv.$set(this.data,"selected",t[2]),this.merge("".concat(t[2],".settings"),{$selected:!0}),this.add_trash_icon())}},{key:"add_trash_icon",value:function(){var t="System:Remove";this.data.tools.find((function(e){return e.type===t}))||this.data.tools.push({type:t,icon:Xt["trash.png"]})}},{key:"remove_trash_icon",value:function(){C.overwrite(this.data.tools,this.data.tools.filter((function(t){return"System:Remove"!==t.type})))}},{key:"on_overlay_data",value:function(t){var e=this;this.get(".").forEach((function(t){t.settings.$synth&&e.del("".concat(t.id))}));var n,i=zn(t);try{for(i.s();!(n=i.n()).done;){var r=n.value,o=this.get_one("".concat(r.id));if(o){if(this.tv.$set(o,"loading",!1),!r.data)continue;o.data=r.data}if(r.new_ovs){for(var s in r.new_ovs.onchart)this.get_one("onchart.".concat(s))||this.add("onchart",r.new_ovs.onchart[s]);for(var s in r.new_ovs.offchart)this.get_one("offchart.".concat(s))||this.add("offchart",r.new_ovs.offchart[s])}}}catch(t){i.e(t)}finally{i.f()}}},{key:"on_overlay_update",value:function(t){var e,n=zn(t);try{for(n.s();!(e=n.n()).done;){var i=e.value;if(i.data){var r=this.get_one("".concat(i.id));r&&this.fast_merge(r.data,i.data,!1)}}}catch(t){n.e(t)}finally{n.f()}}},{key:"before_destroy",value:function(){var t=function(t){return!t.settings.$state||"finished"===t.settings.$state};this.data.onchart=this.data.onchart.filter(t),this.data.offchart=this.data.offchart.filter(t),this.drawing_mode_off(),this.on_scroll_lock(!1),this.object_selected([]),this.ww.destroy()}},{key:"get_overlay",value:function(t){var e=t.id||"g".concat(t.grid_id,"_").concat(t.layer_id),n=t.uuid||this.gldc[e];return this.get_one("".concat(n))}}]),t}());var Zn=function(){function t(e,n){void 0===n&&(n=100),G(this,t),this.symbols={},this.int=n,this.dc=e,this.st_id=null,this.data_changed=!1}return H(t,[{key:"push",value:function(t,e,n){var i=this;this.st_id||(this.st_id=setTimeout((function(){return i.update()}))),n=parseInt(n);var r=this.symbols[t],o=C.now(),s=t.includes("datasets.");this.data_changed=!0,r?e[0]>=r.upd[0]+n&&!s?(this.refine(t,r.upd.slice()),this.symbols[t]={upd:e,t:o,data:[]}):(this.symbols[t].upd=e,this.symbols[t].t=o):this.symbols[t]={upd:e,t:o,data:[]},s&&this.symbols[t].data.push(e)}},{key:"update",value:function(){var t=this,e={};for(var n in this.symbols){var i=this.symbols[n].upd;switch(n){case"ohlcv":var r=this.dc.data.chart.data;this.dc.fast_merge(r,i),e.ohlcv=r.slice(-2);break;default:if(n.includes("datasets.")){this.update_ds(n,e);continue}if(!(r=this.dc.get_one("".concat(n))))continue;this.dc.fast_merge(r,i,!1)}}this.data_changed&&(this.dc.ww.just("update-data",e),this.data_changed=!1),setTimeout((function(){return t.update()}),this.int)}},{key:"refine",value:function(t,e){if("ohlcv"===t){var n=this.dc.data.chart.data;this.dc.fast_merge(n,e)}else{if(!(n=this.dc.get_one("".concat(t))))return;this.dc.fast_merge(n,e,!1)}}},{key:"update_ds",value:function(t,e){var n=this.symbols[t].data;n.length&&(e[t]=n,this.symbols[t].data=[])}},{key:"clear",value:function(){this.symbols={}}}]),t}();function ti(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return ei(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ei(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function ei(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function ni(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=ae(t);if(e){var r=ae(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return se(this,n)}}var ii=function(t){ie(n,t);var e=ni(n);function n(t,i){var r;void 0===t&&(t={}),void 0===i&&(i={}),G(this,n);return i=Object.assign({aggregation:100,script_depth:0,auto_scroll:!0,scripts:!0,ww_ram_limit:0,node_url:null,shift_measure:!0},i),(r=e.call(this)).sett=i,r.data=t,r.sett=function(t,e){var n={get:function(t,e){return t[e]},set:function(t,n,i){return t[n]=i,e.just("update-dc-settings",t),!0}};return e.just("update-dc-settings",t),new Proxy(t,n)}(i,r.ww),r.agg=new Zn(oe(r),i.aggregation),r.se_state={},r}return H(n,[{key:"add",value:function(t,e){if("onchart"===t||"offchart"===t||"datasets"===t)return this.data[t].push(e),this.update_ids(),e.id}},{key:"get",value:function(t){return this.get_by_query(t).map((function(t){return t.v}))}},{key:"get_one",value:function(t){return this.get_by_query(t).map((function(t){return t.v}))[0]}},{key:"set",value:function(t,e){var n,i=ti(this.get_by_query(t));try{for(i.s();!(n=i.n()).done;){var r=n.value,o=void 0!==r.i?r.i:r.p.indexOf(r.v);-1!==o&&this.tv.$set(r.p,o,e)}}catch(t){i.e(t)}finally{i.f()}this.update_ids()}},{key:"merge",value:function(t,e){var n,i=ti(this.get_by_query(t));try{for(i.s();!(n=i.n()).done;){var r=n.value;if(Array.isArray(r.v)){if(!Array.isArray(e))continue;r.v[0]&&r.v[0].length>=2?this.merge_ts(r,e):this.merge_objects(r,e,[])}else"object"===re(r.v)&&this.merge_objects(r,e)}}catch(t){i.e(t)}finally{i.f()}this.update_ids()}},{key:"del",value:function(t){var e,n=ti(this.get_by_query(t));try{for(n.s();!(e=n.n()).done;){var i=e.value,r="number"!=typeof i.i?i.i:i.p.indexOf(i.v);-1!==r&&this.tv.$delete(i.p,r)}}catch(t){n.e(t)}finally{n.f()}this.update_ids()}},{key:"update",value:function(t){return t.candle?this.update_candle(t):this.update_tick(t)}},{key:"lock",value:function(t){this.get_by_query(t).forEach((function(t){t.v&&t.v.id&&t.v.type&&(t.v.locked=!0)}))}},{key:"unlock",value:function(t){this.get_by_query(t,!0).forEach((function(t){t.v&&t.v.id&&t.v.type&&(t.v.locked=!1)}))}},{key:"show",value:function(t){"offchart"===t||"onchart"===t?t+=".":"."===t&&(t=""),this.merge(t+".settings",{display:!0})}},{key:"hide",value:function(t){"offchart"===t||"onchart"===t?t+=".":"."===t&&(t=""),this.merge(t+".settings",{display:!1})}},{key:"onrange",value:function(t){var e=this;this.loader=t,setTimeout((function(){return e.tv.set_loader(t?e:null)}),0)}}]),n}(Vn);const ri={props:["ux","updater","colors","wrapper"],mounted:function(){this._$emit=this.$emit,this.$emit=this.custom_event,this.init&&this.init()},methods:{close:function(){this.$emit("custom-event",{event:"close-interface",args:[this.$props.ux.uuid]})},modify:function(t){this.$emit("custom-event",{event:"modify-interface",args:[this.$props.ux.uuid,t]})},custom_event:function(t){if("hook"!==t.split(":")[0]){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];this._$emit("custom-event",{event:t,args:n})}}},computed:{overlay:function(){return this.$props.ux.overlay},layout:function(){return this.overlay.layout},uxr:function(){return this.$props.ux}},data:function(){return{}}};var oi={Candle:Qt,Volbar:Rt,Line:ee,Pin:Zt,Price:Yt,Ray:ue,Seg:te};Rn.install=function(t){t.component(Rn.name,Rn)},"undefined"!=typeof window&&window.Vue&&(window.Vue.use(Rn),window.TradingVueLib={TradingVue:Rn,Overlay:mt,Utils:C,Constants:y,Candle:Qt,Volbar:Rt,layout_cnv:Tt,layout_vol:Ot,DataCube:ii,Tool:Wt,Interface:ri,primitives:oi});const si=Rn},418:(t,e,n)=>{(e=n(645)(!1)).push([t.id,"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* Anit-boostrap tactix */\n.trading-vue *, ::after, ::before {\n box-sizing: content-box;\n}\n.trading-vue img {\n vertical-align: initial;\n}\n",""]),t.exports=e},976:(t,e,n)=>{(e=n(645)(!1)).push([t.id,"\n.trading-vue-botbar {\n position: relative !important;\n}\n",""]),t.exports=e},449:(t,e,n)=>{(e=n(645)(!1)).push([t.id,"\n.t-vue-lbtn-grp {\n margin-left: 0.5em;\n}\n",""]),t.exports=e},108:(t,e,n)=>{(e=n(645)(!1)).push([t.id,"\n.tvjs-item-list {\n position: absolute;\n user-select: none;\n margin-top: -5px;\n}\n.tvjs-item-list-item {\n display: flex;\n align-items: center;\n padding-right: 20px;\n font-size: 1.15em;\n letter-spacing: 0.05em;\n}\n.tvjs-item-list-item:hover {\n background-color: #76878319;\n}\n.tvjs-item-list-item * {\n position: relative !important;\n}\n",""]),t.exports=e},988:(t,e,n)=>{(e=n(645)(!1)).push([t.id,"\n.trading-vue-legend {\n position: relative;\n z-index: 100;\n font-size: 1.25em;\n margin-left: 10px;\n pointer-events: none;\n text-align: left;\n user-select: none;\n font-weight: 300;\n}\n@media (min-resolution: 2x) {\n.trading-vue-legend {\n font-weight: 400;\n}\n}\n.trading-vue-ohlcv {\n pointer-events: none;\n margin-bottom: 0.5em;\n}\n.t-vue-lspan {\n font-variant-numeric: tabular-nums;\n font-size: 0.95em;\n color: #999999; /* TODO: move => params */\n margin-left: 0.1em;\n margin-right: 0.2em;\n}\n.t-vue-title {\n margin-right: 0.25em;\n font-size: 1.45em;\n}\n.t-vue-ind {\n margin-left: 0.2em;\n margin-bottom: 0.5em;\n font-size: 1.0em;\n margin-top: 0.3em;\n}\n.t-vue-ivalue {\n margin-left: 0.5em;\n}\n.t-vue-unknown {\n color: #999999; /* TODO: move => params */\n}\n.tvjs-appear-enter-active,\n.tvjs-appear-leave-active\n{\n transition: all .25s ease;\n}\n.tvjs-appear-enter, .tvjs-appear-leave-to\n{\n opacity: 0;\n}\n",""]),t.exports=e},423:(t,e,n)=>{(e=n(645)(!1)).push([t.id,"\n.t-vue-lbtn {\n z-index: 100;\n pointer-events: all;\n cursor: pointer;\n}\n",""]),t.exports=e},661:(t,e,n)=>{(e=n(645)(!1)).push([t.id,"\n.trading-vue-section {\n height: 0;\n position: absolute;\n}\n",""]),t.exports=e},168:(t,e,n)=>{(e=n(645)(!1)).push([t.id,"\n.tvjs-spinner {\n display: inline-block;\n position: relative;\n width: 20px;\n height: 16px;\n margin: -4px 0px -1px 0px;\n opacity: 0.7;\n}\n.tvjs-spinner div {\n position: absolute;\n top: 8px;\n width: 4px;\n height: 4px;\n border-radius: 50%;\n animation-timing-function: cubic-bezier(1, 1, 1, 1);\n}\n.tvjs-spinner div:nth-child(1) {\n left: 2px;\n animation: tvjs-spinner1 0.6s infinite;\n opacity: 0.9;\n}\n.tvjs-spinner div:nth-child(2) {\n left: 2px;\n animation: tvjs-spinner2 0.6s infinite;\n}\n.tvjs-spinner div:nth-child(3) {\n left: 9px;\n animation: tvjs-spinner2 0.6s infinite;\n}\n.tvjs-spinner div:nth-child(4) {\n left: 16px;\n animation: tvjs-spinner3 0.6s infinite;\n opacity: 0.9;\n}\n@keyframes tvjs-spinner1 {\n0% {\n transform: scale(0);\n}\n100% {\n transform: scale(1);\n}\n}\n@keyframes tvjs-spinner3 {\n0% {\n transform: scale(1);\n}\n100% {\n transform: scale(0);\n}\n}\n@keyframes tvjs-spinner2 {\n0% {\n transform: translate(0, 0);\n}\n100% {\n transform: translate(7px, 0);\n}\n}\n",""]),t.exports=e},29:(t,e,n)=>{(e=n(645)(!1)).push([t.id,"\n.tvjs-drift-enter-active {\n transition: all .3s ease;\n}\n.tvjs-drift-leave-active {\n transition: all .8s cubic-bezier(1.0, 0.5, 0.8, 1.0);\n}\n.tvjs-drift-enter, .tvjs-drift-leave-to\n{\n transform: translateX(10px);\n opacity: 0;\n}\n.tvjs-the-tip {\n position: absolute;\n width: 200px;\n text-align: center;\n z-index: 10001;\n color: #ffffff;\n font-size: 1.5em;\n line-height: 1.15em;\n padding: 10px;\n border-radius: 3px;\n right: 70px;\n top: 10px;\n text-shadow: 1px 1px black;\n}\n",""]),t.exports=e},935:(t,e,n)=>{(e=n(645)(!1)).push([t.id,"\n.trading-vue-toolbar {\n position: absolute;\n border-right: 1px solid black;\n z-index: 101;\n padding-top: 3px;\n user-select: none;\n}\n",""]),t.exports=e},379:(t,e,n)=>{(e=n(645)(!1)).push([t.id,"\n.trading-vue-tbitem {\n}\n.trading-vue-tbitem:hover {\n background-color: #76878319;\n}\n.trading-vue-tbitem-exp {\n position: absolute;\n right: -3px;\n padding: 18.5px 5px;\n font-stretch: extra-condensed;\n transform: scaleX(0.6);\n font-size: 0.6em;\n opacity: 0.0;\n user-select: none;\n line-height: 0;\n}\n.trading-vue-tbitem:hover\n.trading-vue-tbitem-exp {\n opacity: 0.5;\n}\n.trading-vue-tbitem-exp:hover {\n background-color: #76878330;\n opacity: 0.9 !important;\n}\n.trading-vue-tbicon {\n position: absolute;\n}\n.trading-vue-tbitem.selected-item > .trading-vue-tbicon,\n.tvjs-item-list-item.selected-item > .trading-vue-tbicon {\n filter: brightness(1.45) sepia(1) hue-rotate(90deg) saturate(4.5) !important;\n}\n.tvjs-pixelated {\n -ms-interpolation-mode: nearest-neighbor;\n image-rendering: -webkit-optimize-contrast;\n image-rendering: -webkit-crisp-edges;\n image-rendering: -moz-crisp-edges;\n image-rendering: -o-crisp-edges;\n image-rendering: pixelated;\n}\n\n",""]),t.exports=e},72:(t,e,n)=>{(e=n(645)(!1)).push([t.id,"\n.trading-vue-ux-wrapper {\n position: absolute;\n display: flex;\n}\n.tvjs-ux-wrapper-pin {\n position: absolute;\n width: 9px;\n height: 9px;\n z-index: 100;\n background-color: #23a776;\n border-radius: 10px;\n margin-left: -6px;\n margin-top: -6px;\n pointer-events: none;\n}\n.tvjs-ux-wrapper-head {\n position: absolute;\n height: 23px;\n width: 100%;\n}\n.tvjs-ux-wrapper-close {\n position: absolute;\n width: 11px;\n height: 11px;\n font-size: 1.5em;\n line-height: 0.5em;\n padding: 1px 1px 1px 1px;\n border-radius: 10px;\n right: 5px;\n top: 5px;\n user-select: none;\n text-align: center;\n z-index: 100;\n}\n.tvjs-ux-wrapper-close-hb {\n}\n.tvjs-ux-wrapper-close:hover {\n background-color: #FF605C !important;\n color: #692324 !important;\n}\n.tvjs-ux-wrapper-full {\n}\n",""]),t.exports=e},983:(t,e,n)=>{(e=n(645)(!1)).push([t.id,"\n.tvjs-widgets {\n position: absolute;\n z-index: 1000;\n pointer-events: none;\n}\n",""]),t.exports=e},645:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",i=t[3];if(!i)return n;if(e&&"function"==typeof btoa){var r=(s=i,a=btoa(unescape(encodeURIComponent(JSON.stringify(s)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),"/*# ".concat(c," */")),o=i.sources.map((function(t){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(t," */")}));return[n].concat(o).concat([r]).join("\n")}var s,a,c;return[n].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,i){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(i)for(var o=0;o<this.length;o++){var s=this[o][0];null!=s&&(r[s]=!0)}for(var a=0;a<t.length;a++){var c=[].concat(t[a]);i&&r[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),e.push(c))}},e}},840:(t,e,n)=>{var i;!function(r,o,s,a){"use strict";var c,u=["","webkit","Moz","MS","ms","o"],h=o.createElement("div"),l=Math.round,d=Math.abs,f=Date.now;function p(t,e,n){return setTimeout(w(t,n),e)}function g(t,e,n){return!!Array.isArray(t)&&(v(t,n[e],n),!0)}function v(t,e,n){var i;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==a)for(i=0;i<t.length;)e.call(n,t[i],i,t),i++;else for(i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i,t)}function A(t,e,n){var i="DEPRECATED METHOD: "+e+"\n"+n+" AT \n";return function(){var e=new Error("get-stack-trace"),n=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=r.console&&(r.console.warn||r.console.log);return o&&o.call(r.console,i,n),t.apply(this,arguments)}}c="function"!=typeof Object.assign?function(t){if(t===a||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(i!==a&&null!==i)for(var r in i)i.hasOwnProperty(r)&&(e[r]=i[r])}return e}:Object.assign;var m=A((function(t,e,n){for(var i=Object.keys(e),r=0;r<i.length;)(!n||n&&t[i[r]]===a)&&(t[i[r]]=e[i[r]]),r++;return t}),"extend","Use `assign`."),y=A((function(t,e){return m(t,e,!0)}),"merge","Use `assign`.");function _(t,e,n){var i,r=e.prototype;(i=t.prototype=Object.create(r)).constructor=t,i._super=r,n&&c(i,n)}function w(t,e){return function(){return t.apply(e,arguments)}}function b(t,e){return"function"==typeof t?t.apply(e&&e[0]||a,e):t}function x(t,e){return t===a?e:t}function k(t,e,n){v(I(e),(function(e){t.addEventListener(e,n,!1)}))}function C(t,e,n){v(I(e),(function(e){t.removeEventListener(e,n,!1)}))}function B(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function E(t,e){return t.indexOf(e)>-1}function I(t){return t.trim().split(/\s+/g)}function S(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var i=0;i<t.length;){if(n&&t[i][n]==e||!n&&t[i]===e)return i;i++}return-1}function M(t){return Array.prototype.slice.call(t,0)}function T(t,e,n){for(var i=[],r=[],o=0;o<t.length;){var s=e?t[o][e]:t[o];S(r,s)<0&&i.push(t[o]),r[o]=s,o++}return n&&(i=e?i.sort((function(t,n){return t[e]>n[e]})):i.sort()),i}function O(t,e){for(var n,i,r=e[0].toUpperCase()+e.slice(1),o=0;o<u.length;){if((i=(n=u[o])?n+r:e)in t)return i;o++}return a}var D=1;function Q(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||r}var R="ontouchstart"in r,Y=O(r,"PointerEvent")!==a,j=R&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),U="touch",L="mouse",N=24,F=["x","y"],G=["clientX","clientY"];function K(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){b(t.options.enable,[t])&&n.handler(e)},this.init()}function H(t,e,n){var i=n.pointers.length,r=n.changedPointers.length,o=1&e&&i-r==0,s=12&e&&i-r==0;n.isFirst=!!o,n.isFinal=!!s,o&&(t.session={}),n.eventType=e,function(t,e){var n=t.session,i=e.pointers,r=i.length;n.firstInput||(n.firstInput=J(e));r>1&&!n.firstMultiple?n.firstMultiple=J(e):1===r&&(n.firstMultiple=!1);var o=n.firstInput,s=n.firstMultiple,c=s?s.center:o.center,u=e.center=P(i);e.timeStamp=f(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=W(c,u),e.distance=q(c,u),function(t,e){var n=e.center,i=t.offsetDelta||{},r=t.prevDelta||{},o=t.prevInput||{};1!==e.eventType&&4!==o.eventType||(r=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=t.offsetDelta={x:n.x,y:n.y});e.deltaX=r.x+(n.x-i.x),e.deltaY=r.y+(n.y-i.y)}(n,e),e.offsetDirection=$(e.deltaX,e.deltaY);var h=z(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=h.x,e.overallVelocityY=h.y,e.overallVelocity=d(h.x)>d(h.y)?h.x:h.y,e.scale=s?(l=s.pointers,p=i,q(p[0],p[1],G)/q(l[0],l[1],G)):1,e.rotation=s?function(t,e){return W(e[1],e[0],G)+W(t[1],t[0],G)}(s.pointers,i):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,i,r,o,s=t.lastInterval||e,c=e.timeStamp-s.timeStamp;if(8!=e.eventType&&(c>25||s.velocity===a)){var u=e.deltaX-s.deltaX,h=e.deltaY-s.deltaY,l=z(c,u,h);i=l.x,r=l.y,n=d(l.x)>d(l.y)?l.x:l.y,o=$(u,h),t.lastInterval=e}else n=s.velocity,i=s.velocityX,r=s.velocityY,o=s.direction;e.velocity=n,e.velocityX=i,e.velocityY=r,e.direction=o}(n,e);var l,p;var g=t.element;B(e.srcEvent.target,g)&&(g=e.srcEvent.target);e.target=g}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function J(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:l(t.pointers[n].clientX),clientY:l(t.pointers[n].clientY)},n++;return{timeStamp:f(),pointers:e,center:P(e),deltaX:t.deltaX,deltaY:t.deltaY}}function P(t){var e=t.length;if(1===e)return{x:l(t[0].clientX),y:l(t[0].clientY)};for(var n=0,i=0,r=0;r<e;)n+=t[r].clientX,i+=t[r].clientY,r++;return{x:l(n/e),y:l(i/e)}}function z(t,e,n){return{x:e/t||0,y:n/t||0}}function $(t,e){return t===e?1:d(t)>=d(e)?t<0?2:4:e<0?8:16}function q(t,e,n){n||(n=F);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return Math.sqrt(i*i+r*r)}function W(t,e,n){n||(n=F);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return 180*Math.atan2(r,i)/Math.PI}K.prototype={handler:function(){},init:function(){this.evEl&&k(this.element,this.evEl,this.domHandler),this.evTarget&&k(this.target,this.evTarget,this.domHandler),this.evWin&&k(Q(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&C(this.element,this.evEl,this.domHandler),this.evTarget&&C(this.target,this.evTarget,this.domHandler),this.evWin&&C(Q(this.element),this.evWin,this.domHandler)}};var X={mousedown:1,mousemove:2,mouseup:4},V="mousedown",Z="mousemove mouseup";function tt(){this.evEl=V,this.evWin=Z,this.pressed=!1,K.apply(this,arguments)}_(tt,K,{handler:function(t){var e=X[t.type];1&e&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:L,srcEvent:t}))}});var et={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},nt={2:U,3:"pen",4:L,5:"kinect"},it="pointerdown",rt="pointermove pointerup pointercancel";function ot(){this.evEl=it,this.evWin=rt,K.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}r.MSPointerEvent&&!r.PointerEvent&&(it="MSPointerDown",rt="MSPointerMove MSPointerUp MSPointerCancel"),_(ot,K,{handler:function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),r=et[i],o=nt[t.pointerType]||t.pointerType,s=o==U,a=S(e,t.pointerId,"pointerId");1&r&&(0===t.button||s)?a<0&&(e.push(t),a=e.length-1):12&r&&(n=!0),a<0||(e[a]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),n&&e.splice(a,1))}});var st={touchstart:1,touchmove:2,touchend:4,touchcancel:8},at="touchstart",ct="touchstart touchmove touchend touchcancel";function ut(){this.evTarget=at,this.evWin=ct,this.started=!1,K.apply(this,arguments)}function ht(t,e){var n=M(t.touches),i=M(t.changedTouches);return 12&e&&(n=T(n.concat(i),"identifier",!0)),[n,i]}_(ut,K,{handler:function(t){var e=st[t.type];if(1===e&&(this.started=!0),this.started){var n=ht.call(this,t,e);12&e&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:U,srcEvent:t})}}});var lt={touchstart:1,touchmove:2,touchend:4,touchcancel:8},dt="touchstart touchmove touchend touchcancel";function ft(){this.evTarget=dt,this.targetIds={},K.apply(this,arguments)}function pt(t,e){var n=M(t.touches),i=this.targetIds;if(3&e&&1===n.length)return i[n[0].identifier]=!0,[n,n];var r,o,s=M(t.changedTouches),a=[],c=this.target;if(o=n.filter((function(t){return B(t.target,c)})),1===e)for(r=0;r<o.length;)i[o[r].identifier]=!0,r++;for(r=0;r<s.length;)i[s[r].identifier]&&a.push(s[r]),12&e&&delete i[s[r].identifier],r++;return a.length?[T(o.concat(a),"identifier",!0),a]:void 0}_(ft,K,{handler:function(t){var e=lt[t.type],n=pt.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:U,srcEvent:t})}});function gt(){K.apply(this,arguments);var t=w(this.handler,this);this.touch=new ft(this.manager,t),this.mouse=new tt(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function vt(t,e){1&t?(this.primaryTouch=e.changedPointers[0].identifier,At.call(this,e)):12&t&&At.call(this,e)}function At(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY};this.lastTouches.push(n);var i=this.lastTouches;setTimeout((function(){var t=i.indexOf(n);t>-1&&i.splice(t,1)}),2500)}}function mt(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],o=Math.abs(e-r.x),s=Math.abs(n-r.y);if(o<=25&&s<=25)return!0}return!1}_(gt,K,{handler:function(t,e,n){var i=n.pointerType==U,r=n.pointerType==L;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)vt.call(this,e,n);else if(r&&mt.call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var yt=O(h.style,"touchAction"),_t=yt!==a,wt="compute",bt="auto",xt="manipulation",kt="none",Ct="pan-x",Bt="pan-y",Et=function(){if(!_t)return!1;var t={},e=r.CSS&&r.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(n){t[n]=!e||r.CSS.supports("touch-action",n)})),t}();function It(t,e){this.manager=t,this.set(e)}It.prototype={set:function(t){t==wt&&(t=this.compute()),_t&&this.manager.element.style&&Et[t]&&(this.manager.element.style[yt]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return v(this.manager.recognizers,(function(e){b(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),function(t){if(E(t,kt))return kt;var e=E(t,Ct),n=E(t,Bt);if(e&&n)return kt;if(e||n)return e?Ct:Bt;if(E(t,xt))return xt;return bt}(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var i=this.actions,r=E(i,kt)&&!Et.none,o=E(i,Bt)&&!Et["pan-y"],s=E(i,Ct)&&!Et["pan-x"];if(r){var a=1===t.pointers.length,c=t.distance<2,u=t.deltaTime<250;if(a&&c&&u)return}if(!s||!o)return r||o&&6&n||s&&n&N?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var St=32;function Mt(t){this.options=c({},this.defaults,t||{}),this.id=D++,this.manager=null,this.options.enable=x(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function Tt(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}function Ot(t){return 16==t?"down":8==t?"up":2==t?"left":4==t?"right":""}function Dt(t,e){var n=e.manager;return n?n.get(t):t}function Qt(){Mt.apply(this,arguments)}function Rt(){Qt.apply(this,arguments),this.pX=null,this.pY=null}function Yt(){Qt.apply(this,arguments)}function jt(){Mt.apply(this,arguments),this._timer=null,this._input=null}function Ut(){Qt.apply(this,arguments)}function Lt(){Qt.apply(this,arguments)}function Nt(){Mt.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Ft(t,e){return(e=e||{}).recognizers=x(e.recognizers,Ft.defaults.preset),new Gt(t,e)}Mt.prototype={defaults:{},set:function(t){return c(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(g(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=Dt(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return g(t,"dropRecognizeWith",this)||(t=Dt(t,this),delete this.simultaneous[t.id]),this},requireFailure:function(t){if(g(t,"requireFailure",this))return this;var e=this.requireFail;return-1===S(e,t=Dt(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(g(t,"dropRequireFailure",this))return this;t=Dt(t,this);var e=S(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,n=this.state;function i(n){e.manager.emit(n,t)}n<8&&i(e.options.event+Tt(n)),i(e.options.event),t.additionalEvent&&i(t.additionalEvent),n>=8&&i(e.options.event+Tt(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=St},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},recognize:function(t){var e=c({},t);if(!b(this.options.enable,[this,e]))return this.reset(),void(this.state=St);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},process:function(t){},getTouchAction:function(){},reset:function(){}},_(Qt,Mt,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,n=t.eventType,i=6&e,r=this.attrTest(t);return i&&(8&n||!r)?16|e:i||r?4&n?8|e:2&e?4|e:2:St}}),_(Rt,Qt,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var t=this.options.direction,e=[];return 6&t&&e.push(Bt),t&N&&e.push(Ct),e},directionTest:function(t){var e=this.options,n=!0,i=t.distance,r=t.direction,o=t.deltaX,s=t.deltaY;return r&e.direction||(6&e.direction?(r=0===o?1:o<0?2:4,n=o!=this.pX,i=Math.abs(t.deltaX)):(r=0===s?1:s<0?8:16,n=s!=this.pY,i=Math.abs(t.deltaY))),t.direction=r,n&&i>e.threshold&&r&e.direction},attrTest:function(t){return Qt.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Ot(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),_(Yt,Qt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[kt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),_(jt,Mt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[bt]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,r=t.deltaTime>e.time;if(this._input=t,!i||!n||12&t.eventType&&!r)this.reset();else if(1&t.eventType)this.reset(),this._timer=p((function(){this.state=8,this.tryEmit()}),e.time,this);else if(4&t.eventType)return 8;return St},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=f(),this.manager.emit(this.options.event,this._input)))}}),_(Ut,Qt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[kt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),_(Lt,Qt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return Rt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return 30&n?e=t.overallVelocity:6&n?e=t.overallVelocityX:n&N&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&d(e)>this.options.velocity&&4&t.eventType},emit:function(t){var e=Ot(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),_(Nt,Mt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[xt]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,r=t.deltaTime<e.time;if(this.reset(),1&t.eventType&&0===this.count)return this.failTimeout();if(i&&r&&n){if(4!=t.eventType)return this.failTimeout();var o=!this.pTime||t.timeStamp-this.pTime<e.interval,s=!this.pCenter||q(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,s&&o?this.count+=1:this.count=1,this._input=t,0===this.count%e.taps)return this.hasRequireFailures()?(this._timer=p((function(){this.state=8,this.tryEmit()}),e.interval,this),2):8}return St},failTimeout:function(){return this._timer=p((function(){this.state=St}),this.options.interval,this),St},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Ft.VERSION="2.0.7",Ft.defaults={domEvents:!1,touchAction:wt,enable:!0,inputTarget:null,inputClass:null,preset:[[Ut,{enable:!1}],[Yt,{enable:!1},["rotate"]],[Lt,{direction:6}],[Rt,{direction:6},["swipe"]],[Nt],[Nt,{event:"doubletap",taps:2},["tap"]],[jt]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function Gt(t,e){var n;this.options=c({},Ft.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((n=this).options.inputClass||(Y?ot:j?ft:R?gt:tt))(n,H),this.touchAction=new It(this,this.options.touchAction),Kt(this,!0),v(this.options.recognizers,(function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])}),this)}function Kt(t,e){var n,i=t.element;i.style&&(v(t.options.cssProps,(function(r,o){n=O(i.style,o),e?(t.oldCssProps[n]=i.style[n],i.style[n]=r):i.style[n]=t.oldCssProps[n]||""})),e||(t.oldCssProps={}))}Gt.prototype={set:function(t){return c(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){var n;this.touchAction.preventDefaults(t);var i=this.recognizers,r=e.curRecognizer;(!r||r&&8&r.state)&&(r=e.curRecognizer=null);for(var o=0;o<i.length;)n=i[o],2===e.stopped||r&&n!=r&&!n.canRecognizeWith(r)?n.reset():n.recognize(t),!r&&14&n.state&&(r=e.curRecognizer=n),o++}},get:function(t){if(t instanceof Mt)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event==t)return e[n];return null},add:function(t){if(g(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(g(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,n=S(e,t);-1!==n&&(e.splice(n,1),this.touchAction.update())}return this},on:function(t,e){if(t!==a&&e!==a){var n=this.handlers;return v(I(t),(function(t){n[t]=n[t]||[],n[t].push(e)})),this}},off:function(t,e){if(t!==a){var n=this.handlers;return v(I(t),(function(t){e?n[t]&&n[t].splice(S(n[t],e),1):delete n[t]})),this}},emit:function(t,e){this.options.domEvents&&function(t,e){var n=o.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=e,e.target.dispatchEvent(n)}(t,e);var n=this.handlers[t]&&this.handlers[t].slice();if(n&&n.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var i=0;i<n.length;)n[i](e),i++}},destroy:function(){this.element&&Kt(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},c(Ft,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:St,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:N,DIRECTION_ALL:30,Manager:Gt,Input:K,TouchAction:It,TouchInput:ft,MouseInput:tt,PointerEventInput:ot,TouchMouseInput:gt,SingleTouchInput:ut,Recognizer:Mt,AttrRecognizer:Qt,Tap:Nt,Pan:Rt,Swipe:Lt,Pinch:Yt,Rotate:Ut,Press:jt,on:k,off:C,each:v,merge:y,extend:m,assign:c,inherit:_,bindFn:w,prefixed:O}),(void 0!==r?r:"undefined"!=typeof self?self:{}).Hammer=Ft,(i=function(){return Ft}.call(e,n,e,t))===a||(t.exports=i)}(window,document)},981:t=>{!function(e,n){"use strict";var i,r,o=function(t){return new o.Instance(t)};o.SUPPORT="wheel",o.ADD_EVENT="addEventListener",o.REMOVE_EVENT="removeEventListener",o.PREFIX="",o.READY=!1,o.Instance=function(t){return o.READY||(o.normalise.browser(),o.READY=!0),this.element=t,this.handlers=[],this},o.Instance.prototype={wheel:function(t,e){return o.event.add(this,o.SUPPORT,t,e),"DOMMouseScroll"===o.SUPPORT&&o.event.add(this,"MozMousePixelScroll",t,e),this},unwheel:function(t,e){return void 0===t&&(t=this.handlers.slice(-1)[0])&&(t=t.original),o.event.remove(this,o.SUPPORT,t,e),"DOMMouseScroll"===o.SUPPORT&&o.event.remove(this,"MozMousePixelScroll",t,e),this}},o.event={add:function(t,n,i,r){var s=i;i=function(t){t||(t=e.event);var n=o.normalise.event(t),i=o.normalise.delta(t);return s(n,i[0],i[1],i[2])},t.element[o.ADD_EVENT](o.PREFIX+n,i,r||!1),t.handlers.push({original:s,normalised:i})},remove:function(t,e,n,i){for(var r,s=n,a={},c=0,u=t.handlers.length;c<u;++c)a[t.handlers[c].original]=t.handlers[c];for(var h in n=(r=a[s]).normalised,t.element[o.REMOVE_EVENT](o.PREFIX+e,n,i||!1),t.handlers)if(t.handlers[h]==r){t.handlers.splice(h,1);break}}},o.normalise={browser:function(){"onwheel"in n||n.documentMode>=9||(o.SUPPORT=void 0!==n.onmousewheel?"mousewheel":"DOMMouseScroll"),e.addEventListener||(o.ADD_EVENT="attachEvent",o.REMOVE_EVENT="detachEvent",o.PREFIX="on")},event:function(t){var e={originalEvent:t,target:t.target||t.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"===t.type?0:1,deltaX:0,deltaZ:0,preventDefault:function(){t.preventDefault?t.preventDefault():t.returnValue=!1},stopPropagation:function(){t.stopPropagation?t.stopPropagation():t.cancelBubble=!1}};return t.wheelDelta&&(e.deltaY=-1/40*t.wheelDelta),t.wheelDeltaX&&(e.deltaX=-1/40*t.wheelDeltaX),t.detail&&(e.deltaY=t.detail),e},delta:function(t){var e,n,o,s=0,a=0,c=0;return t.deltaY&&(s=c=-1*t.deltaY),t.deltaX&&(s=-1*(a=t.deltaX)),t.wheelDelta&&(s=t.wheelDelta),t.wheelDeltaY&&(c=t.wheelDeltaY),t.wheelDeltaX&&(a=-1*t.wheelDeltaX),t.detail&&(s=-1*t.detail),0===s?[0,0,0]:(e=Math.abs(s),(!i||e<i)&&(i=e),n=Math.max(Math.abs(c),Math.abs(a)),(!r||n<r)&&(r=n),o=s>0?"floor":"ceil",[s=Math[o](s/i),a=Math[o](a/r),c=Math[o](c/r)])}},"function"==typeof e.define&&e.define.amd?e.define("hamster",[],(function(){return o})):t.exports=o}(window,window.document)},961:(t,e,n)=>{var i,r=function(){var t=String.fromCharCode,e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",i={};function r(t,e){if(!i[t]){i[t]={};for(var n=0;n<t.length;n++)i[t][t.charAt(n)]=n}return i[t][e]}var o={compressToBase64:function(t){if(null==t)return"";var n=o._compress(t,6,(function(t){return e.charAt(t)}));switch(n.length%4){default:case 0:return n;case 1:return n+"===";case 2:return n+"==";case 3:return n+"="}},decompressFromBase64:function(t){return null==t?"":""==t?null:o._decompress(t.length,32,(function(n){return r(e,t.charAt(n))}))},compressToUTF16:function(e){return null==e?"":o._compress(e,15,(function(e){return t(e+32)}))+" "},decompressFromUTF16:function(t){return null==t?"":""==t?null:o._decompress(t.length,16384,(function(e){return t.charCodeAt(e)-32}))},compressToUint8Array:function(t){for(var e=o.compress(t),n=new Uint8Array(2*e.length),i=0,r=e.length;i<r;i++){var s=e.charCodeAt(i);n[2*i]=s>>>8,n[2*i+1]=s%256}return n},decompressFromUint8Array:function(e){if(null==e)return o.decompress(e);for(var n=new Array(e.length/2),i=0,r=n.length;i<r;i++)n[i]=256*e[2*i]+e[2*i+1];var s=[];return n.forEach((function(e){s.push(t(e))})),o.decompress(s.join(""))},compressToEncodedURIComponent:function(t){return null==t?"":o._compress(t,6,(function(t){return n.charAt(t)}))},decompressFromEncodedURIComponent:function(t){return null==t?"":""==t?null:(t=t.replace(/ /g,"+"),o._decompress(t.length,32,(function(e){return r(n,t.charAt(e))})))},compress:function(e){return o._compress(e,16,(function(e){return t(e)}))},_compress:function(t,e,n){if(null==t)return"";var i,r,o,s={},a={},c="",u="",h="",l=2,d=3,f=2,p=[],g=0,v=0;for(o=0;o<t.length;o+=1)if(c=t.charAt(o),Object.prototype.hasOwnProperty.call(s,c)||(s[c]=d++,a[c]=!0),u=h+c,Object.prototype.hasOwnProperty.call(s,u))h=u;else{if(Object.prototype.hasOwnProperty.call(a,h)){if(h.charCodeAt(0)<256){for(i=0;i<f;i++)g<<=1,v==e-1?(v=0,p.push(n(g)),g=0):v++;for(r=h.charCodeAt(0),i=0;i<8;i++)g=g<<1|1&r,v==e-1?(v=0,p.push(n(g)),g=0):v++,r>>=1}else{for(r=1,i=0;i<f;i++)g=g<<1|r,v==e-1?(v=0,p.push(n(g)),g=0):v++,r=0;for(r=h.charCodeAt(0),i=0;i<16;i++)g=g<<1|1&r,v==e-1?(v=0,p.push(n(g)),g=0):v++,r>>=1}0==--l&&(l=Math.pow(2,f),f++),delete a[h]}else for(r=s[h],i=0;i<f;i++)g=g<<1|1&r,v==e-1?(v=0,p.push(n(g)),g=0):v++,r>>=1;0==--l&&(l=Math.pow(2,f),f++),s[u]=d++,h=String(c)}if(""!==h){if(Object.prototype.hasOwnProperty.call(a,h)){if(h.charCodeAt(0)<256){for(i=0;i<f;i++)g<<=1,v==e-1?(v=0,p.push(n(g)),g=0):v++;for(r=h.charCodeAt(0),i=0;i<8;i++)g=g<<1|1&r,v==e-1?(v=0,p.push(n(g)),g=0):v++,r>>=1}else{for(r=1,i=0;i<f;i++)g=g<<1|r,v==e-1?(v=0,p.push(n(g)),g=0):v++,r=0;for(r=h.charCodeAt(0),i=0;i<16;i++)g=g<<1|1&r,v==e-1?(v=0,p.push(n(g)),g=0):v++,r>>=1}0==--l&&(l=Math.pow(2,f),f++),delete a[h]}else for(r=s[h],i=0;i<f;i++)g=g<<1|1&r,v==e-1?(v=0,p.push(n(g)),g=0):v++,r>>=1;0==--l&&(l=Math.pow(2,f),f++)}for(r=2,i=0;i<f;i++)g=g<<1|1&r,v==e-1?(v=0,p.push(n(g)),g=0):v++,r>>=1;for(;;){if(g<<=1,v==e-1){p.push(n(g));break}v++}return p.join("")},decompress:function(t){return null==t?"":""==t?null:o._decompress(t.length,32768,(function(e){return t.charCodeAt(e)}))},_decompress:function(e,n,i){var r,o,s,a,c,u,h,l=[],d=4,f=4,p=3,g="",v=[],A={val:i(0),position:n,index:1};for(r=0;r<3;r+=1)l[r]=r;for(s=0,c=Math.pow(2,2),u=1;u!=c;)a=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=i(A.index++)),s|=(a>0?1:0)*u,u<<=1;switch(s){case 0:for(s=0,c=Math.pow(2,8),u=1;u!=c;)a=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=i(A.index++)),s|=(a>0?1:0)*u,u<<=1;h=t(s);break;case 1:for(s=0,c=Math.pow(2,16),u=1;u!=c;)a=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=i(A.index++)),s|=(a>0?1:0)*u,u<<=1;h=t(s);break;case 2:return""}for(l[3]=h,o=h,v.push(h);;){if(A.index>e)return"";for(s=0,c=Math.pow(2,p),u=1;u!=c;)a=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=i(A.index++)),s|=(a>0?1:0)*u,u<<=1;switch(h=s){case 0:for(s=0,c=Math.pow(2,8),u=1;u!=c;)a=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=i(A.index++)),s|=(a>0?1:0)*u,u<<=1;l[f++]=t(s),h=f-1,d--;break;case 1:for(s=0,c=Math.pow(2,16),u=1;u!=c;)a=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=i(A.index++)),s|=(a>0?1:0)*u,u<<=1;l[f++]=t(s),h=f-1,d--;break;case 2:return v.join("")}if(0==d&&(d=Math.pow(2,p),p++),l[h])g=l[h];else{if(h!==f)return null;g=o+o.charAt(0)}v.push(g),l[f++]=o+g.charAt(0),o=g,0==--d&&(d=Math.pow(2,p),p++)}}};return o}();void 0===(i=function(){return r}.call(e,n,e,t))||(t.exports=i)},666:t=>{var e=function(t){"use strict";var e,n=Object.prototype,i=n.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",s=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,i){var r=e&&e.prototype instanceof v?e:v,o=Object.create(r.prototype),s=new I(i||[]);return o._invoke=function(t,e,n){var i=l;return function(r,o){if(i===f)throw new Error("Generator is already running");if(i===p){if("throw"===r)throw o;return M()}for(n.method=r,n.arg=o;;){var s=n.delegate;if(s){var a=C(s,n);if(a){if(a===g)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===l)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=f;var c=h(t,e,n);if("normal"===c.type){if(i=n.done?p:d,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=p,n.method="throw",n.arg=c.arg)}}}(t,n,s),o}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l="suspendedStart",d="suspendedYield",f="executing",p="completed",g={};function v(){}function A(){}function m(){}var y={};y[o]=function(){return this};var _=Object.getPrototypeOf,w=_&&_(_(S([])));w&&w!==n&&i.call(w,o)&&(y=w);var b=m.prototype=v.prototype=Object.create(y);function x(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function n(r,o,s,a){var c=h(t[r],t,o);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==typeof l&&i.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,s,a)}),(function(t){n("throw",t,s,a)})):e.resolve(l).then((function(t){u.value=t,s(u)}),(function(t){return n("throw",t,s,a)}))}a(c.arg)}var r;this._invoke=function(t,i){function o(){return new e((function(e,r){n(t,i,e,r)}))}return r=r?r.then(o,o):o()}}function C(t,n){var i=t.iterator[n.method];if(i===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method))return g;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var r=h(i,t.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,g;var o=r.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function B(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(B,this),this.reset(!0)}function S(t){if(t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,s=function n(){for(;++r<t.length;)if(i.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return s.next=s}}return{next:M}}function M(){return{value:e,done:!0}}return A.prototype=b.constructor=m,m.constructor=A,A.displayName=c(m,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===A||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,c(t,a,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},x(k.prototype),k.prototype[s]=function(){return this},t.AsyncIterator=k,t.async=function(e,n,i,r,o){void 0===o&&(o=Promise);var s=new k(u(e,n,i,r),o);return t.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},x(b),c(b,a,"Generator"),b[o]=function(){return this},b.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var i=e.pop();if(i in t)return n.value=i,n.done=!1,n}return n.done=!0,n}},t.values=S,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!t)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(i,r){return a.type="throw",a.arg=t,n.next=i,r&&(n.method="next",n.arg=e),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var c=i.call(s,"catchLoc"),u=i.call(s,"finallyLoc");if(c&&u){if(this.prev<s.catchLoc)return r(s.catchLoc,!0);if(this.prev<s.finallyLoc)return r(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return r(s.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return r(s.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var r=i.arg;E(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,i){return this.delegate={iterator:S(t),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}},863:(t,e,n)=>{var i=n(418);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);(0,n(346).Z)("550b47ab",i,!1,{})},124:(t,e,n)=>{var i=n(976);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);(0,n(346).Z)("1b34bfeb",i,!1,{})},886:(t,e,n)=>{var i=n(449);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);(0,n(346).Z)("9895d3a6",i,!1,{})},807:(t,e,n)=>{var i=n(108);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);(0,n(346).Z)("8139036a",i,!1,{})},600:(t,e,n)=>{var i=n(988);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);(0,n(346).Z)("1db01c0b",i,!1,{})},169:(t,e,n)=>{var i=n(423);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);(0,n(346).Z)("68f243ea",i,!1,{})},11:(t,e,n)=>{var i=n(661);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);(0,n(346).Z)("12d2309d",i,!1,{})},372:(t,e,n)=>{var i=n(168);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);(0,n(346).Z)("5b620605",i,!1,{})},477:(t,e,n)=>{var i=n(29);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);(0,n(346).Z)("143dffab",i,!1,{})},153:(t,e,n)=>{var i=n(935);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);(0,n(346).Z)("f32fd36e",i,!1,{})},501:(t,e,n)=>{var i=n(379);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);(0,n(346).Z)("604bf5ef",i,!1,{})},565:(t,e,n)=>{var i=n(72);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);(0,n(346).Z)("21fde573",i,!1,{})},5:(t,e,n)=>{var i=n(983);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);(0,n(346).Z)("fd83689e",i,!1,{})},346:(t,e,n)=>{"use strict";function i(t,e){for(var n=[],i={},r=0;r<e.length;r++){var o=e[r],s=o[0],a={id:t+":"+r,css:o[1],media:o[2],sourceMap:o[3]};i[s]?i[s].parts.push(a):n.push(i[s]={id:s,parts:[a]})}return n}n.d(e,{Z:()=>p});var r="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!r)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var o={},s=r&&(document.head||document.getElementsByTagName("head")[0]),a=null,c=0,u=!1,h=function(){},l=null,d="data-vue-ssr-id",f="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function p(t,e,n,r){u=n,l=r||{};var s=i(t,e);return g(s),function(e){for(var n=[],r=0;r<s.length;r++){var a=s[r];(c=o[a.id]).refs--,n.push(c)}e?g(s=i(t,e)):s=[];for(r=0;r<n.length;r++){var c;if(0===(c=n[r]).refs){for(var u=0;u<c.parts.length;u++)c.parts[u]();delete o[c.id]}}}}function g(t){for(var e=0;e<t.length;e++){var n=t[e],i=o[n.id];if(i){i.refs++;for(var r=0;r<i.parts.length;r++)i.parts[r](n.parts[r]);for(;r<n.parts.length;r++)i.parts.push(A(n.parts[r]));i.parts.length>n.parts.length&&(i.parts.length=n.parts.length)}else{var s=[];for(r=0;r<n.parts.length;r++)s.push(A(n.parts[r]));o[n.id]={id:n.id,refs:1,parts:s}}}}function v(){var t=document.createElement("style");return t.type="text/css",s.appendChild(t),t}function A(t){var e,n,i=document.querySelector("style["+d+'~="'+t.id+'"]');if(i){if(u)return h;i.parentNode.removeChild(i)}if(f){var r=c++;i=a||(a=v()),e=_.bind(null,i,r,!1),n=_.bind(null,i,r,!0)}else i=v(),e=w.bind(null,i),n=function(){i.parentNode.removeChild(i)};return e(t),function(i){if(i){if(i.css===t.css&&i.media===t.media&&i.sourceMap===t.sourceMap)return;e(t=i)}else n()}}var m,y=(m=[],function(t,e){return m[t]=e,m.filter(Boolean).join("\n")});function _(t,e,n,i){var r=n?"":i.css;if(t.styleSheet)t.styleSheet.cssText=y(e,r);else{var o=document.createTextNode(r),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(o,s[e]):t.appendChild(o)}}function w(t,e){var n=e.css,i=e.media,r=e.sourceMap;if(i&&t.setAttribute("media",i),l.ssrId&&t.setAttribute(d,e.id),r&&(n+="\n/*# sourceURL="+r.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}}},e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={id:i,exports:{}};return t[i](r,r.exports,n),r.exports}return n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(851)})()}));
//# sourceMappingURL=trading-vue.min.js.map