@tradecanvas/commons 1.46.0 → 1.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=function(e){return e[e.Background=0]=`Background`,e[e.Main=1]=`Main`,e[e.Panel=2]=`Panel`,e[e.Overlay=3]=`Overlay`,e[e.UI=4]=`UI`,e[e.Hover=5]=`Hover`,e}({}),t={"background.color":`color`,"panes.background":`color`,"panes.separatorColor":`color`,"panes.titleColor":`color`,"grid.horizontal.visible":`boolean`,"grid.horizontal.color":`color`,"grid.horizontal.style":`lineStyle`,"grid.horizontal.width":`width`,"grid.vertical.visible":`boolean`,"grid.vertical.color":`color`,"grid.vertical.style":`lineStyle`,"grid.vertical.width":`width`,"crosshair.horizontal.visible":`boolean`,"crosshair.horizontal.color":`color`,"crosshair.horizontal.style":`lineStyle`,"crosshair.horizontal.width":`width`,"crosshair.vertical.visible":`boolean`,"crosshair.vertical.color":`color`,"crosshair.vertical.style":`lineStyle`,"crosshair.vertical.width":`width`,"crosshair.labelBackground":`color`,"crosshair.labelTextColor":`color`,"axis.price.lineColor":`color`,"axis.price.textColor":`color`,"axis.time.lineColor":`color`,"axis.time.textColor":`color`,"legend.textColor":`color`,"legend.labelColor":`color`,"watermark.color":`color`,"lastPrice.visible":`boolean`,"lastPrice.upColor":`color`,"lastPrice.downColor":`color`,"lastPrice.style":`lineStyle`,"lastPrice.width":`width`,"volume.upColor":`color`,"volume.downColor":`color`,"sessionBreaks.color":`color`,"sessionBreaks.style":`lineStyle`,"sessionBreaks.width":`width`,"highLow.color":`color`,"trading.buyColor":`color`,"trading.sellColor":`color`,"trading.profitColor":`color`,"trading.lossColor":`color`,"trading.entryColor":`color`,"markers.longColor":`color`,"markers.shortColor":`color`,"markers.neutralColor":`color`,"tradeZones.profitColor":`color`,"tradeZones.lossColor":`color`,"tradeZones.activeColor":`color`,"drawings.handleColor":`color`,"series.candlestick.upColor":`color`,"series.candlestick.downColor":`color`,"series.candlestick.wickUpColor":`color`,"series.candlestick.wickDownColor":`color`,"series.heikinAshi.upColor":`color`,"series.heikinAshi.downColor":`color`,"series.heikinAshi.wickUpColor":`color`,"series.heikinAshi.wickDownColor":`color`,"series.hollowCandle.upColor":`color`,"series.hollowCandle.downColor":`color`,"series.volumeCandles.upColor":`color`,"series.volumeCandles.downColor":`color`,"series.volumeCandles.wickUpColor":`color`,"series.volumeCandles.wickDownColor":`color`,"series.equivolume.upColor":`color`,"series.equivolume.downColor":`color`,"series.equivolume.wickUpColor":`color`,"series.equivolume.wickDownColor":`color`,"series.bar.upColor":`color`,"series.bar.downColor":`color`,"series.hiLo.upColor":`color`,"series.hiLo.downColor":`color`,"series.renko.upColor":`color`,"series.renko.downColor":`color`,"series.lineBreak.upColor":`color`,"series.lineBreak.downColor":`color`,"series.rangeBars.upColor":`color`,"series.rangeBars.downColor":`color`,"series.kagi.upColor":`color`,"series.kagi.downColor":`color`,"series.pointAndFigure.upColor":`color`,"series.pointAndFigure.downColor":`color`,"series.baseline.upColor":`color`,"series.baseline.downColor":`color`,"series.baseline.lineWidth":`width`,"series.line.color":`color`,"series.line.lineWidth":`width`,"series.stepLine.color":`color`,"series.stepLine.lineWidth":`width`,"series.lineWithMarkers.color":`color`,"series.lineWithMarkers.lineWidth":`width`,"series.area.lineColor":`color`,"series.area.lineWidth":`width`,"series.area.topColor":`color`,"series.area.bottomColor":`color`,"series.hlcArea.lineColor":`color`,"series.hlcArea.lineWidth":`width`,"series.hlcArea.topColor":`color`,"series.hlcArea.bottomColor":`color`},n={color:`#4c8dff`,lineWidth:1,lineStyle:`solid`,fillColor:`rgba(76, 141, 255, 0.1)`,fillOpacity:.1,fontSize:12},r={enabled:!0,orderColors:{buy:`#1fa874`,sell:`#e8505b`},positionColors:{profit:`#1fa874`,loss:`#e8505b`,entry:`#4c8dff`},depthOverlay:{enabled:!1,bidColor:`rgba(31, 168, 116,0.15)`,askColor:`rgba(232, 80, 91,0.15)`,maxWidth:100},contextMenu:{enabled:!0},lineButtons:{cancel:!0,close:!0,reverse:!0,removeStops:!0},fillMarks:!0,dragThreshold:3},i={longColor:`#1fa874`,shortColor:`#e8505b`,neutralColor:`#9E9E9E`,arrowSize:12,showLabel:!0,showConfidence:!0},a={profitColor:`#1fa874`,lossColor:`#e8505b`,activeColor:`#4c8dff`,fillOpacity:.12,borderWidth:1,showLabel:!0,showPnl:!0},o={enabled:!0,maxRetries:1/0,baseDelay:1e3,maxDelay:3e4,backoffMultiplier:2},s={historyLimit:500,autoScroll:!0,showCurrentPriceLine:!0,aggregateTicks:!1},c=[`change`,`changePercent`,`open`,`high`,`low`,`prevClose`,`volume`,`bid`,`ask`,`time`];function l(e){if(!e||typeof e!=`object`)return null;let t=e,n=typeof t.symbol==`string`?t.symbol.trim():``;if(!n||n.length>64||!u(t.last))return null;let r={symbol:n,last:t.last};for(let e of c){let n=t[e];u(n)&&(r[e]=n)}let i=r.prevClose??r.open;if(r.change===void 0&&i!==void 0&&(r.change=r.last-i),r.changePercent===void 0&&r.change!==void 0){let e=r.last-r.change;e!==0&&(r.changePercent=r.change/e*100)}return r}function u(e){return typeof e==`number`&&Number.isFinite(e)}var d=300,f=1e3,p=(e,t)=>{if(typeof e!=`string`)return;let n=e.trim();return n?n.slice(0,t):void 0},ee=e=>{if(typeof e==`string`)try{let t=new URL(e);return t.protocol===`https:`||t.protocol===`http:`?t.href:void 0}catch{return}};function te(e,t=20){if(!Array.isArray(e))return[];let n=[];for(let t of e){if(!t||typeof t!=`object`)continue;let e=t,r=p(e.title,d);if(!r||typeof e.time!=`number`||!Number.isFinite(e.time))continue;let i={title:r,time:e.time},a=ee(e.url);a&&(i.url=a);let o=p(e.source,d);o&&(i.source=o);let s=p(e.summary,f);s&&(i.summary=s);let c=p(e.id,d);c&&(i.id=c),n.push(i)}return n.sort((e,t)=>t.time-e.time).slice(0,Math.max(0,t))}function ne(e,t,n){return Math.max(t,Math.min(n,e))}function re(e,t,n){return e+(t-e)*n}function ie(e,t,n){return e===t?0:(n-e)/(t-e)}function ae(e,t){return Math.round(e/t)*t}function m(e,t){let n=Math.floor(Math.log10(e)),r=e/10**n,i;return i=t?r<1.5?1:r<3?2:r<7?5:10:r<=1?1:r<=2?2:r<=5?5:10,i*10**n}function oe(e,t,n){return m(m(t-e,!1)/(n-1),!0)}var se=1e11;function ce(e){let t=e.length>0?e[e.length-1].time:NaN;return Number.isFinite(t)?Math.abs(t)>=1e11?1:1e3:1}function le(e,t){return t===void 0?Math.abs(e)>=1e11?e:e*1e3:e*t}function ue(e){return{time:le(e.time??e.t??0),open:e.open??e.o??0,high:e.high??e.h??0,low:e.low??e.l??0,close:e.close??e.c??0,volume:e.volume??e.v??0}}function de(e,t,n){let r=Math.max(0,t),i=Math.min(e.length,n+1);return e.slice(r,i)}function fe(e,t){let n=0,r=e.length-1;for(;n<=r;){let i=n+r>>>1;if(e[i].time<t)n=i+1;else if(e[i].time>t)r=i-1;else return i}return n}function pe(e,t,n,r=!1){let i=r&&e>0&&t>0?Math.log(t/e):NaN;if(Number.isFinite(i)){let r=i||Math.log(1+2*n),a=Math.exp(r*n);return{min:e/a,max:t*a}}let a=t-e||1;return{min:e-a*n,max:t+a*n}}function me(e,t,n,r=!1){let i=Math.max(1-n.top-n.bottom,2**-52),a=r&&e>0&&t>0?Math.log(t/e):NaN;if(Number.isFinite(a)){let r=(a||Math.log(1.01))/i;return{min:e/Math.exp(r*n.bottom),max:t*Math.exp(r*n.top)}}let o=(t-e||1)/i;return{min:e-o*n.bottom,max:t+o*n.top}}function he(e,t,n,r=.05,i=!1){if(e.length===0)return{min:0,max:1};let a=Math.max(0,t),o=Math.min(e.length-1,n),s=1/0,c=-1/0;for(let t=a;t<=o;t++)e[t].low<s&&(s=e[t].low),e[t].high>c&&(c=e[t].high);return s===1/0?{min:0,max:1}:pe(s,c,r,i)}function ge(e,t){return{...e,high:Math.max(e.high,t.price),low:Math.min(e.low,t.price),close:t.price,volume:e.volume+(t.volume??0),time:t.time}}function _e(e,t=1){let n=e.slice(1);return(n.length===3||n.length===4)&&(n=[...n.slice(0,3)].map(e=>e+e).join(``)),`rgba(${parseInt(n.slice(0,2),16)}, ${parseInt(n.slice(2,4),16)}, ${parseInt(n.slice(4,6),16)}, ${t})`}function h(e,t){let n=e.trim();if(/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(n))return _e(n,t);let r=n.match(/^rgba?\(\s*(\d+(?:\.\d+)?)[\s,]+(\d+(?:\.\d+)?)[\s,]+(\d+(?:\.\d+)?)/i);return r?`rgba(${r[1]}, ${r[2]}, ${r[3]}, ${t})`:e}function ve(e,t,n){let r=e=>(e=e.replace(`#`,``),e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16)}),i=r(e),a=r(t);return`rgb(${Math.round(i.r+(a.r-i.r)*n)},${Math.round(i.g+(a.g-i.g)*n)},${Math.round(i.b+(a.b-i.b)*n)})`}var g=6e4,_=1440*g,v=15*g,ye=8192,y=7*_,be=4096,xe=new Set([`UTC`,`Etc/UTC`,`GMT`,`Etc/GMT`,`UCT`,`Etc/UCT`,`Universal`,`Etc/Universal`,`Zulu`,`Etc/Zulu`]),Se=new Map,b=new Map,Ce=new Map;function we(e){let t=Se.get(e);return t||(t=new Intl.DateTimeFormat(`en-US`,{timeZone:e,hourCycle:`h23`,year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`}),Se.set(e,t)),t}function x(e){if(!e)return!1;try{return we(e),!0}catch{return!1}}function S(e,t){if(!Number.isFinite(t)||xe.has(e))return 0;let n=Ce.get(e);n||(n=new Map,Ce.set(e,n));let r=Math.floor(t/y),i=n.get(r);return i||(i=Te(e,r*y),n.size>=be&&n.clear(),n.set(r,i)),t<i.change?i.before:i.after}function Te(e,t){let n=C(e,t),r=t+y-v,i=C(e,r);if(i===n)return{before:n,change:1/0,after:i};let a=t;for(;r-a>v;){let t=a+Math.floor((r-a)/v/2)*v;C(e,t)===n?a=t:r=t}return{before:n,change:r,after:i}}function C(e,t){let n=Math.floor(t/v),r=`${e}|${n}`,i=b.get(r);if(i!==void 0)return i;let a=n*v,o=1970,s=1,c=1,l=0,u=0,d=0;for(let t of we(e).formatToParts(new Date(a))){let e=Number(t.value);switch(t.type){case`year`:o=e;break;case`month`:s=e;break;case`day`:c=e;break;case`hour`:l=e%24;break;case`minute`:u=e;break;case`second`:d=e;break}}let f=Math.round((Date.UTC(o,s-1,c,l,u,d)-a)/g);return b.size>=ye&&b.clear(),b.set(r,f),f}function w(e,t){return e===null?-new Date(t).getTimezoneOffset():typeof e==`number`?e:S(e,t)}function Ee(e,t){let n=e-w(t,e-_)*g;if(n+w(t,n)*g===e)return n;let r=e-w(t,e+_)*g;return r+w(t,r)*g===e?r:n}var De=new Map;function Oe(e,t,n){let r=`${e}|${JSON.stringify(t)}|${n===null?`local`:typeof n==`number`?`fixed:${n}`:n}`,i=De.get(r);if(i)return i;let a=n===null?void 0:typeof n==`number`?`UTC`:n,o;try{o=new Intl.DateTimeFormat(e,{...t,timeZone:a})}catch{o=new Intl.DateTimeFormat(`en-US`,{...t,timeZone:a})}let s=typeof n==`number`?n*g:0;return i=e=>o.format(new Date(e+s)),De.set(r,i),i}var ke={"1s":1e3,"5s":5e3,"15s":15e3,"30s":3e4,"1m":6e4,"3m":18e4,"5m":3e5,"15m":9e5,"30m":18e5,"45m":27e5,"1h":36e5,"2h":72e5,"3h":108e5,"4h":144e5,"6h":216e5,"8h":288e5,"12h":432e5,"1d":864e5,"2d":1728e5,"3d":2592e5,"1w":6048e5,"2w":12096e5,"1M":2592e6,"3M":7776e6,"6M":15552e6,"12M":31536e6},Ae={s:1e3,m:6e4,h:36e5,d:864e5,w:6048e5,M:2592e6},je=/^([1-9]\d*)([smhdwM])$/;function T(e){let t=je.exec(e);if(!t)return null;let n=Number(t[1]);return Number.isSafeInteger(n)?{count:n,unit:t[2]}:null}var Me=1e6;function Ne(e){let t=/^([1-9]\d*)T$/.exec(e);if(!t)return null;let n=Number(t[1]);return Number.isSafeInteger(n)&&n<=Me?n:null}function Pe(e){return T(e)!==null}function E(e){let t=ke[e];if(t!==void 0)return t;let n=T(e);return n?n.count*Ae[n.unit]:NaN}function Fe(e,t){let n=new Date(e),r=E(t);return r>=864e5?n.toLocaleDateString(void 0,{month:`short`,day:`numeric`}):r>=36e5?n.toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`}):n.toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function Ie(e,t){let n=E(t);return Math.floor(e/n)*n}function Le(e,t){if(t===null){let t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hours:t.getHours(),minutes:t.getMinutes()}}let n=new Date(e+w(t,e)*6e4);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hours:n.getUTCHours(),minutes:n.getUTCMinutes()}}function Re(e){return e.hours===0&&e.minutes===0}var ze=20*36e5;function Be(e){let t=Math.min(e.length,64);if(t<2)return;let n=ce(e),r=1/0;for(let i=1;i<t;i++){let t=Math.abs(e[i].time-e[i-1].time)*n;t>0&&t<r&&(r=t)}return r===1/0?void 0:r>=ze}function Ve(e,t=Date.now()){let n=w(e,t),r=n>=0?`+`:`-`,i=Math.abs(n),a=Math.floor(i/60),o=i%60;return o===0?`UTC${r}${a}`:`UTC${r}${a}:${String(o).padStart(2,`0`)}`}var He=Date.UTC(1970,0,5);function Ue(e,t,n=1){let{count:r,unit:i}=T(t)??{count:1,unit:`m`};if(i===`s`||i===`m`||i===`h`||i===`d`){let t=r*Ae[i];return Math.floor(e/t)*t}let a=new Date(e);if(i===`w`){let e=Ae.d,t=(a.getUTCDay()-n+7)%7,i=Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()-t);if(r<=1)return i;let o=Math.floor((i-He)/(7*e));return He+Math.floor(o/r)*r*7*e}let o=a.getUTCFullYear()*12+a.getUTCMonth(),s=Math.floor(o/r)*r;return Date.UTC(Math.floor(s/12),s%12,1)}var We=64,D=new Map;function Ge(e,t){let n=`${e}|${t}`,r=D.get(n);return r||(D.size>=We&&D.clear(),r=new Intl.NumberFormat(e,{minimumFractionDigits:t,maximumFractionDigits:t}),D.set(n,r)),r}function Ke(e,t,n){return t.formatPrice?t.formatPrice(e):O(e,n??qe(t.priceRange.min,t.priceRange.max),t.numberLocale??`en-US`)}function O(e,t=2,n=`en-US`){return Ge(n,t).format(e)}function qe(e,t){if(!(t>e)||!Number.isFinite(e)||!Number.isFinite(t))return 2;let n=oe(e,t,8);return n>0&&n<1?Math.ceil(-Math.log10(n))+1:2}function Je(e,t,n,r=2,i=`en-US`){if((t===`percentage`||t===`indexedTo100`)&&n&&n!==0){if(t===`percentage`){let t=(e/n-1)*100;return`${t>0?`+`:``}${t.toFixed(2)}%`}return O(e/n*100,2,i)}return O(e,r,i)}function Ye(e,t,n=1){let r=Number.isInteger(n)&&n>1?n:1;if(!Number.isFinite(e)||!Number.isInteger(t)||t<2)return String(e);let i=t*r,a=Math.round(Math.abs(e)*i),o=Math.floor(a/i),s=a-o*i,c=Math.floor(s/r),l=String(t-1).length,u=r>1?String(Math.floor((s-c*r)/r*10)):``;return`${e<0&&a>0?`-`:``}${o}'${String(c).padStart(l,`0`)}${u}`}function Xe(e){if(!Number.isInteger(e.denominator)||e.denominator<2)return null;let t=Number.isInteger(e.subDenominator)&&(e.subDenominator??0)>1?e.subDenominator:1;return 1/(e.denominator*t)}function Ze(e){return e?typeof e==`function`?e:Xe(e)===null?null:t=>Ye(t,e.denominator,e.subDenominator):null}function Qe(e){return e>=1e9?(e/1e9).toFixed(2)+`B`:e>=1e6?(e/1e6).toFixed(2)+`M`:e>=1e3?(e/1e3).toFixed(2)+`K`:e.toFixed(0)}function $e(e){let t=0;for(let n of e){let e=n.toString(),r=e.indexOf(`.`);r>=0&&(t=Math.max(t,e.length-r-1))}return Math.min(t,8)}var et=[`close`,`open`,`high`,`low`,`hl2`,`hlc3`,`ohlc4`,`hlcc4`];function tt(e){return typeof e==`string`&&et.includes(e)}function nt(e,t){switch(t){case`open`:return e.open;case`high`:return e.high;case`low`:return e.low;case`hl2`:return(e.high+e.low)/2;case`hlc3`:return(e.high+e.low+e.close)/3;case`ohlc4`:return(e.open+e.high+e.low+e.close)/4;case`hlcc4`:return(e.high+e.low+2*e.close)/4;default:return e.close}}var rt=/^ind:([^:]+):(.+)$/;function it(e,t){return`ind:${e}:${t}`}function at(e){if(typeof e!=`string`)return null;let t=rt.exec(e);return t?{instanceId:t[1],key:t[2]}:null}var ot=864e5;function st(e,t,n=1){let r=[],i=null;for(let a of e){let e=Ue(a.time,t,n);i===null||e!==i.time?(i={time:e,open:a.open,high:a.high,low:a.low,close:a.close,volume:a.volume},r.push(i)):(a.high>i.high&&(i.high=a.high),a.low<i.low&&(i.low=a.low),i.close=a.close,i.volume+=a.volume)}return r}var k=e=>e===`s`||e===`m`||e===`h`||e===`d`;function ct(e,t){let n=T(e),r=T(t);if(!n||!r)return!1;let i=E(e);return n.unit===`d`&&n.count>1?!1:k(r.unit)?k(n.unit)&&E(t)%i===0:n.unit===r.unit?r.count%n.count===0:k(n.unit)&&ot%i===0}function lt(e,t){let n=null,r=0;for(let i of t){if(!ct(i,e))continue;let t=E(i);t>r&&(n=i,r=t)}return n}function ut(e,t){if(!e)return 0;if(e===t)return 1e3;if(e.startsWith(t))return 600-Math.min(100,e.length-t.length);let n=e.indexOf(t);return n>=0?300-Math.min(100,n):0}function dt(e,t,n=50,r){let i=t.trim().toUpperCase();if(!i)return e.slice(0,n);let a=[];for(let t of e){let e=Math.max(ut(t.symbol.toUpperCase(),i),ut((t.description??``).toUpperCase(),i)*.8);e>0&&a.push({info:t,score:e+(r?.(t)??0)})}return a.sort((e,t)=>t.score-e.score||e.info.symbol.localeCompare(t.info.symbol)),a.slice(0,n).map(e=>e.info)}function ft(e){let t=typeof e==`number`?e:Number(e);if(!Number.isFinite(t)||t<=0)return 0;for(let e=0;e<=12;e++){let n=t*10**e;if(Math.abs(n-Math.round(n))<1e-9*Math.max(1,n))return e}return 12}function A(e){let t=/^(\d{1,2}):(\d{2})$/.exec(e.trim());if(!t)return null;let n=Number(t[1]),r=Number(t[2]);return n===24&&r===0?1440:n<24&&r<60?n*60+r:null}var j=864e5,M=6e4,pt=8;function mt(e,t){let n=e?.timezone,r=(e?.sessions??[]).flatMap(e=>{let t=A(e.start),n=A(e.end);return t===null||n===null||t===n?[]:[{start:t,end:n,days:Array.isArray(e.days)?e.days:null}]});if(!n||!x(n)||r.length===0||!Number.isFinite(t))return{state:`always`,next:null};let i=S(n,t)*M,a=Math.floor((t+i)/j)*j,o=e=>e-S(n,e-S(n,e-i)*M)*M,s=[];for(let e=-1;e<=pt;e++){let t=a+e*j,n=(Math.floor(t/j)+4)%7;for(let e of r){if(e.days&&!e.days.includes(n))continue;let r=t+e.start*M,i=(e.end>e.start?t:t+j)+e.end*M;s.push([o(r),o(i)])}}s.sort((e,t)=>e[0]-t[0]);let c=[];for(let[e,t]of s){let n=c[c.length-1];n&&e<=n[1]?c[c.length-1]=[n[0],Math.max(n[1],t)]:c.push([e,t])}let l=c.find(([e,n])=>e<=t&&t<n);if(l)return{state:`open`,next:l[1]};let u=c.find(([e])=>e>t);return{state:`closed`,next:u?u[0]:null}}var ht=48,gt=2e3,_t=1e4;function vt(e){if(!Array.isArray(e))return;let t=[];for(let n of e){if(t.length>=ht)break;if(typeof n!=`object`||!n)continue;let{value:e,visible:r,color:i}=n;if(typeof e!=`number`||!Number.isFinite(e)||Math.abs(e)>_t||r!==void 0&&typeof r!=`boolean`)continue;let a={value:e,visible:r??!0};typeof i==`string`&&i&&(a.color=i),t.push(a)}return t}function yt(e,t){switch(e.kind){case`boolean`:return typeof t==`boolean`?t:void 0;case`number`:return typeof t!=`number`||!Number.isFinite(t)?void 0:Math.min(e.max??1/0,Math.max(e.min??-1/0,t));case`choice`:return typeof t==`string`&&e.choices.some(e=>e.value===t)?t:void 0;case`levels`:return vt(t);case`text`:return typeof t==`string`?t.slice(0,gt):void 0}}function bt(e,t){if(!e||typeof t!=`object`||!t)return{};let n={};for(let[r,i]of Object.entries(t)){let t=e[r];if(!t)continue;let a=yt(t,i);a!==void 0&&(n[r]=a)}return n}function xt(e){return Array.isArray(e)?e.map(e=>({...e})):e}function St(e,t,n){let r=e?.[n];return r?xt((t&&n in t?yt(r,t[n]):void 0)??r.default):t?.[n]}function Ct(e,t){let n={};for(let r of Object.keys(e??{}))n[r]=St(e,t,r);return n}var wt=[`solid`,`dashed`,`dotted`],Tt=64,Et=2e3,Dt=20,Ot=200;function kt(e,t,n){return typeof e==`number`&&Number.isFinite(e)?Math.min(n,Math.max(t,e)):void 0}function At(e){return typeof e==`string`&&e.length>0&&e.length<=Tt?e:void 0}function jt(e){if(typeof e!=`object`||!e)return{};let t=e,n={},r=At(t.color);r!==void 0&&(n.color=r);let i=kt(t.lineWidth,.5,Dt);i!==void 0&&(n.lineWidth=i),wt.includes(t.lineStyle)&&(n.lineStyle=t.lineStyle);let a=At(t.fillColor);a!==void 0&&(n.fillColor=a);let o=kt(t.fillOpacity,0,1);o!==void 0&&(n.fillOpacity=o);let s=kt(t.fontSize,6,Ot);return s!==void 0&&(n.fontSize=s),typeof t.text==`string`&&(n.text=t.text.slice(0,Et)),n}var N=e=>typeof e==`number`&&Number.isFinite(e)&&e>0,P=(e,t,n)=>typeof e==`number`&&Number.isInteger(e)&&e>=t&&e<=n,F=e=>typeof e==`object`&&!!e&&!Array.isArray(e);function Mt(e){if(!F(e))return{};let t={};if(F(e.renko)){let{boxSize:n,atrPeriod:r}=e.renko;t.renko={...N(n)||n===`atr`?{boxSize:n}:{},...P(r,1,500)?{atrPeriod:r}:{}}}if(F(e.lineBreak)){let{lines:n}=e.lineBreak;t.lineBreak=P(n,1,10)?{lines:n}:{}}if(F(e.kagi)){let{reversal:n,reversalType:r}=e.kagi;t.kagi={...N(n)?{reversal:n}:{},...r===`percent`||r===`price`?{reversalType:r}:{}}}if(F(e.pointAndFigure)){let{boxSize:n,reversal:r}=e.pointAndFigure;t.pointAndFigure={...N(n)||n===`auto`?{boxSize:n}:{},...P(r,1,10)?{reversal:r}:{}}}if(F(e.rangeBars)){let{range:n}=e.rangeBars;t.rangeBars=N(n)||n===`auto`?{range:n}:{}}return t}var Nt=`'Cascadia Mono', 'SF Mono', ui-monospace, Menlo, Consolas, monospace`,Pt={family:Nt,sizeSmall:11,sizeMedium:13,sizeLarge:15},I={amber:`#f2a93b`,up:`#1c9e6d`,down:`#e8505b`,ochre:`#c07c12`,blue:`#4688fa`,violet:`#9c73f8`,cyan:`#1398a8`,rose:`#e25592`,neutral:`#7d8696`,ink:`#131416`},Ft=.22;function L(e){return h(e,Ft)}var It=`#fbfaf6`,R=`#1b1d21`,Lt=`#131416`,z=`#e6e3dc`,Rt=`#1f7a5c`,zt=`#b8423f`,Bt=`#4fae8a`,Vt=`#e2706b`,Ht=`#6a6966`,Ut=`#8d8a84`,Wt=[I.blue,I.ochre,I.violet,I.cyan,I.rose],Gt={name:`dark`,background:Lt,text:z,textSecondary:`#8d8b86`,grid:`#1d1e21`,crosshair:Ht,candleUp:Bt,candleDown:Vt,candleUpWick:Bt,candleDownWick:Vt,lineColor:z,areaTopColor:h(z,.14),areaBottomColor:h(z,0),volumeUp:h(z,.14),volumeDown:h(z,.08),axisLine:`#2a2b2f`,axisLabel:`#a9a6a0`,axisLabelBackground:`#232427`,font:Pt},Kt={name:`light`,background:It,text:R,textSecondary:`#6b6f76`,grid:`#ece8df`,crosshair:Ut,candleUp:Rt,candleDown:zt,candleUpWick:Rt,candleDownWick:zt,lineColor:R,areaTopColor:h(R,.12),areaBottomColor:h(R,0),volumeUp:h(R,.13),volumeDown:h(R,.08),axisLine:`#cfcac0`,axisLabel:`#4a4e57`,axisLabelBackground:`#eeebe3`,font:Pt},qt={name:`terminal`,background:`#0E0E0E`,text:`#C0C0C0`,textSecondary:`#8A8A8A`,grid:`#1A1A1A`,crosshair:`#666666`,candleUp:`#00FF87`,candleDown:`#FF3B4D`,candleUpWick:`#00FF87`,candleDownWick:`#FF3B4D`,lineColor:`#3D8BFD`,areaTopColor:`rgba(61, 139, 253, 0.3)`,areaBottomColor:`rgba(61, 139, 253, 0.0)`,volumeUp:L(`#00FF87`),volumeDown:L(`#FF3B4D`),axisLine:`#1A1A1A`,axisLabel:`#8A8A8A`,axisLabelBackground:`#1A1A1A`,font:{family:`'Roboto Mono', 'JetBrains Mono', 'SF Mono', Consolas, monospace`,sizeSmall:10,sizeMedium:12,sizeLarge:14}},Jt=new Set([qt.volumeUp,qt.volumeDown]);function B(e){let t=(e,t)=>{if(!Jt.has(e))return e;let n=L(t);return n===t?e:n};return{up:t(e.volumeUp,e.candleUp),down:t(e.volumeDown,e.candleDown)}}var Yt=[`solid`,`dashed`,`dotted`],Xt=20,Zt=64,Qt=2,$t=[/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,/^[a-z]{3,30}$/i,/^(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color)\([0-9a-z.,%/\s-]*\)$/i];function V(e){return typeof e==`string`&&e.length<=Zt&&$t.some(t=>t.test(e.trim()))}function en(e,t){switch(e){case`color`:return V(t);case`lineStyle`:return Yt.includes(t);case`width`:return typeof t==`number`&&Number.isFinite(t)&&t>0&&t<=Xt;case`boolean`:return typeof t==`boolean`}}function tn(e){return Object.prototype.hasOwnProperty.call(t,e)}function nn(e){let n={},r=[];if(typeof e!=`object`||!e||Array.isArray(e))return{overrides:{},rejected:r};for(let[i,a]of Object.entries(e))tn(i)?a===null?n[i]=null:en(t[i],a)?n[i]=a:r.push(i):r.push(i);return{overrides:n,rejected:r}}function rn(e){if(typeof e!=`object`||!e||Array.isArray(e))return null;let{background:t,separator:n}=e,r={...V(t)?{background:t}:{},...V(n)?{separator:n}:{}};return Object.keys(r).length>0?r:null}var an=/^[A-Za-z0-9_]{1,32}$/;function on(e){if(typeof e!=`object`||!e||Array.isArray(e))return;let t={};for(let[n,r]of Object.entries(e)){if(!an.test(n)||typeof r!=`object`||!r)continue;let{lineStyle:e,visible:i}=r,a={...Yt.includes(e)?{lineStyle:e}:{},...typeof i==`boolean`?{visible:i}:{}};Object.keys(a).length>0&&(t[n]=a)}return Object.keys(t).length>0?t:void 0}function sn(e,t,n=1){return e===`solid`?[]:e===`dotted`?[n,n*2]:[...t]}function cn(e,t,n){let r=e=>t(`series.${n}.${e}`),i=r(`upColor`)??t(`series.candlestick.upColor`),a=r(`downColor`)??t(`series.candlestick.downColor`),o=i??e.candleUp,s=a??e.candleDown;return{up:o,down:s,wickUp:r(`wickUpColor`)??t(`series.candlestick.wickUpColor`)??(i===void 0?e.candleUpWick:o),wickDown:r(`wickDownColor`)??t(`series.candlestick.wickDownColor`)??(a===void 0?e.candleDownWick:s),line:r(`color`)??r(`lineColor`)??t(`series.line.color`)??e.lineColor,lineWidth:r(`lineWidth`)??t(`series.line.lineWidth`)??Qt,top:r(`topColor`)??t(`series.area.topColor`)??e.areaTopColor,bottom:r(`bottomColor`)??t(`series.area.bottomColor`)??e.areaBottomColor}}function H(e,t,n){return{visible:e(`${t}.visible`)??n.visible,color:e(`${t}.color`)??n.color,style:e(`${t}.style`)??n.style,width:e(`${t}.width`)??n.width}}function ln(e,t,n){let{style:r,...i}=e,a=n,o=e=>a[e],s=cn(i,o,t),c=o(`background.color`)??i.background,l=(e,t)=>o(e)??t,u=e=>o(e)??null,d={panes:{background:l(`panes.background`,c),separator:l(`panes.separatorColor`,i.axisLine),title:l(`panes.titleColor`,i.textSecondary)},grid:{horizontal:H(o,`grid.horizontal`,{visible:!0,color:i.grid,style:`solid`,width:1}),vertical:H(o,`grid.vertical`,{visible:!0,color:i.grid,style:`solid`,width:1})},crosshair:{horizontal:H(o,`crosshair.horizontal`,{visible:!0,color:i.crosshair,style:`solid`,width:1}),vertical:H(o,`crosshair.vertical`,{visible:!0,color:i.crosshair,style:`solid`,width:1}),labelBackground:l(`crosshair.labelBackground`,i.text),labelText:l(`crosshair.labelTextColor`,c)},axis:{price:{line:l(`axis.price.lineColor`,i.axisLine),text:l(`axis.price.textColor`,i.axisLabel)},time:{line:l(`axis.time.lineColor`,i.axisLine),text:l(`axis.time.textColor`,i.axisLabel)}},legend:{text:l(`legend.textColor`,i.text),label:l(`legend.labelColor`,i.textSecondary)},watermark:{color:o(`watermark.color`)??null},lastPrice:{visible:o(`lastPrice.visible`)??!0,up:l(`lastPrice.upColor`,s.up),down:l(`lastPrice.downColor`,s.down),style:o(`lastPrice.style`)??`solid`,width:o(`lastPrice.width`)??1},sessionBreaks:{color:o(`sessionBreaks.color`)??null,style:o(`sessionBreaks.style`)??null,width:o(`sessionBreaks.width`)??null},highLow:{color:o(`highLow.color`)??null},series:{lineWidth:s.lineWidth},trading:{buy:u(`trading.buyColor`),sell:u(`trading.sellColor`),profit:u(`trading.profitColor`),loss:u(`trading.lossColor`),entry:u(`trading.entryColor`)},markers:{long:u(`markers.longColor`),short:u(`markers.shortColor`),neutral:u(`markers.neutralColor`)},tradeZones:{profit:u(`tradeZones.profitColor`),loss:u(`tradeZones.lossColor`),active:u(`tradeZones.activeColor`)},drawings:{handle:u(`drawings.handleColor`)}};return{...i,background:c,candleUp:s.up,candleDown:s.down,candleUpWick:s.wickUp,candleDownWick:s.wickDown,lineColor:s.line,areaTopColor:s.top,areaBottomColor:s.bottom,volumeUp:l(`volume.upColor`,i.volumeUp),volumeDown:l(`volume.downColor`,i.volumeDown),style:d}}var un={"background.color":e=>e.background,"panes.background":(e,t)=>t.panes.background,"panes.separatorColor":(e,t)=>t.panes.separator,"panes.titleColor":(e,t)=>t.panes.title,"crosshair.labelBackground":(e,t)=>t.crosshair.labelBackground,"crosshair.labelTextColor":(e,t)=>t.crosshair.labelText,"axis.price.lineColor":(e,t)=>t.axis.price.line,"axis.price.textColor":(e,t)=>t.axis.price.text,"axis.time.lineColor":(e,t)=>t.axis.time.line,"axis.time.textColor":(e,t)=>t.axis.time.text,"legend.textColor":(e,t)=>t.legend.text,"legend.labelColor":(e,t)=>t.legend.label,"watermark.color":(e,t)=>t.watermark.color,"lastPrice.visible":(e,t)=>t.lastPrice.visible,"lastPrice.upColor":(e,t)=>t.lastPrice.up,"lastPrice.downColor":(e,t)=>t.lastPrice.down,"lastPrice.style":(e,t)=>t.lastPrice.style,"lastPrice.width":(e,t)=>t.lastPrice.width,"volume.upColor":e=>B(e).up,"volume.downColor":e=>B(e).down,"sessionBreaks.color":(e,t)=>t.sessionBreaks.color,"sessionBreaks.style":(e,t)=>t.sessionBreaks.style,"sessionBreaks.width":(e,t)=>t.sessionBreaks.width,"highLow.color":(e,t)=>t.highLow.color,"trading.buyColor":(e,t)=>t.trading.buy,"trading.sellColor":(e,t)=>t.trading.sell,"trading.profitColor":(e,t)=>t.trading.profit,"trading.lossColor":(e,t)=>t.trading.loss,"trading.entryColor":(e,t)=>t.trading.entry,"markers.longColor":(e,t)=>t.markers.long,"markers.shortColor":(e,t)=>t.markers.short,"markers.neutralColor":(e,t)=>t.markers.neutral,"tradeZones.profitColor":(e,t)=>t.tradeZones.profit,"tradeZones.lossColor":(e,t)=>t.tradeZones.loss,"tradeZones.activeColor":(e,t)=>t.tradeZones.active,"drawings.handleColor":(e,t)=>t.drawings.handle},dn={visible:`visible`,color:`color`,style:`style`,width:`width`};function fn(e,t,n,r=`candlestick`){let i=n.split(`.`);if(i[0]===`series`){let n=cn(e,e=>t[e],i[1]);switch(i[2]){case`upColor`:return n.up;case`downColor`:return n.down;case`wickUpColor`:return n.wickUp;case`wickDownColor`:return n.wickDown;case`color`:case`lineColor`:return n.line;case`lineWidth`:return n.lineWidth;case`topColor`:return n.top;case`bottomColor`:return n.bottom}}let a=ln(e,r,t),o=a.style;return i[0]===`grid`||i[0]===`crosshair`&&(i[1]===`horizontal`||i[1]===`vertical`)?(i[0]===`grid`?o.grid:o.crosshair)[i[1]][dn[i[2]]]:un[n]?.(a,o)??null}var pn={autoScale:!0,rightMargin:5,minBarSpacing:2,maxBarSpacing:30,grid:{visible:!0,hLineStyle:`solid`,vLineStyle:`solid`},crosshair:{mode:`magnet`}},mn=[`1s`,`1m`,`3m`,`5m`,`15m`,`30m`,`1h`,`2h`,`4h`,`6h`,`8h`,`12h`,`1d`,`3d`,`1w`,`1M`],hn=[`1m`,`5m`,`15m`,`30m`,`1h`,`2h`,`4h`,`1d`,`1w`,`1M`,`3M`,`6M`,`12M`],gn=[`1m`,`5m`,`15m`,`30m`,`1h`,`4h`,`1d`,`1w`,`1M`],_n=[`1m`,`5m`,`15m`,`1h`,`4h`,`1d`,`1w`],vn=8,yn=2,bn=70,xn=30,Sn=60,Cn=120,wn=(1+Math.sqrt(5))/2,Tn=[1,2,3,5,8,13,21,34,55,89];function En(e,t,n=1){return Math.round(e*wn**(t/n))}var U={candlestick:`Candlestick`,line:`Line`,area:`Area`,bar:`OHLC Bar`,price:`Price`,volume:`Volume`,time:`Time`,open:`Open`,high:`High`,low:`Low`,close:`Close`,sma:`SMA`,ema:`EMA`,bollingerBands:`Bollinger Bands`,vwap:`VWAP`,ichimoku:`Ichimoku Cloud`,parabolicSAR:`Parabolic SAR`,supertrend:`Supertrend`,keltnerChannel:`Keltner Channel`,donchianChannel:`Donchian Channel`,rsi:`RSI`,macd:`MACD`,stochastic:`Stochastic`,atr:`ATR`,adx:`ADX`,obv:`OBV`,williamsR:`Williams %R`,cci:`CCI`,mfi:`MFI`,aroon:`Aroon`,roc:`ROC`,tsi:`TSI`,cmf:`CMF`,stddev:`Std Dev`,volumeProfile:`Volume Profile`,accumulationDistribution:`A/D Line`,vroc:`VROC`,trendLine:`Trend Line`,horizontalLine:`Horizontal Line`,verticalLine:`Vertical Line`,ray:`Ray`,extendedLine:`Extended Line`,parallelChannel:`Parallel Channel`,regressionChannel:`Regression Channel`,fibRetracement:`Fibonacci Retracement`,fibExtension:`Fibonacci Extension`,rectangle:`Rectangle`,ellipse:`Ellipse`,triangle:`Triangle`,pitchfork:`Andrews' Pitchfork`,elliottWave:`Elliott Wave`,priceRange:`Price Range`,dateRange:`Date Range`,measure:`Measure`,textTool:`Text`,arrow:`Arrow`,clearAll:`Clear All`,buy:`Buy`,sell:`Sell`,buyLimit:`Buy Limit`,sellLimit:`Sell Limit`,buyStop:`Buy Stop`,sellStop:`Sell Stop`,stopLoss:`Stop Loss`,takeProfit:`Take Profit`,market:`Market`,limit:`Limit`,stop:`Stop`,cancel:`Cancel`,modify:`Modify`,quantity:`Qty`,pnl:`P&L`,activeOrders:`Active Orders`,positions:`Positions`,noOrders:`No active orders`,noPositions:`No open positions`,placeOrder:`Place Order`,rightClickToTrade:`Right-click chart to place orders`,ceiling:`Ceiling`,floor:`Floor`,reference:`Reference`,session:`Session`,preOpen:`Pre-Open`,continuous:`Continuous`,preClose:`Pre-Close`,closed:`Closed`,settings:`Settings`,theme:`Theme`,darkTheme:`Dark`,lightTheme:`Light`,tools:`Tools`,indicators:`Indicators`,overlays:`Overlays`,panels:`Panels`,orders:`Orders`,autoScale:`Auto Scale`,crosshair:`Crosshair`,grid:`Grid`,loading:`Loading...`,error:`Error`,numberDecimalSeparator:`.`,numberGroupSeparator:`,`},Dn={candlestick:`Nến`,line:`Đường`,area:`Vùng`,bar:`Thanh OHLC`,price:`Giá`,volume:`Khối lượng`,time:`Thời gian`,open:`Mở`,high:`Cao`,low:`Thấp`,close:`Đóng`,sma:`SMA`,ema:`EMA`,bollingerBands:`Dải Bollinger`,vwap:`VWAP`,ichimoku:`Mây Ichimoku`,parabolicSAR:`Parabolic SAR`,supertrend:`Supertrend`,keltnerChannel:`Kênh Keltner`,donchianChannel:`Kênh Donchian`,rsi:`RSI`,macd:`MACD`,stochastic:`Stochastic`,atr:`ATR`,adx:`ADX`,obv:`OBV`,williamsR:`Williams %R`,cci:`CCI`,mfi:`MFI`,aroon:`Aroon`,roc:`ROC`,tsi:`TSI`,cmf:`CMF`,stddev:`Độ lệch chuẩn`,volumeProfile:`Phân bổ KL`,accumulationDistribution:`Tích lũy/Phân phối`,vroc:`VROC`,trendLine:`Đường xu hướng`,horizontalLine:`Đường ngang`,verticalLine:`Đường dọc`,ray:`Tia`,extendedLine:`Đường kéo dài`,parallelChannel:`Kênh song song`,regressionChannel:`Kênh hồi quy`,fibRetracement:`Fibonacci thoái lui`,fibExtension:`Fibonacci mở rộng`,rectangle:`Hình chữ nhật`,ellipse:`Hình elip`,triangle:`Tam giác`,pitchfork:`Chĩa ba Andrews`,elliottWave:`Sóng Elliott`,priceRange:`Khoảng giá`,dateRange:`Khoảng thời gian`,measure:`Đo lường`,textTool:`Chữ`,arrow:`Mũi tên`,clearAll:`Xóa tất cả`,buy:`Mua`,sell:`Bán`,buyLimit:`Mua giới hạn`,sellLimit:`Bán giới hạn`,buyStop:`Mua chặn`,sellStop:`Bán chặn`,stopLoss:`Cắt lỗ`,takeProfit:`Chốt lời`,market:`Thị trường`,limit:`Giới hạn`,stop:`Dừng`,cancel:`Hủy`,modify:`Sửa`,quantity:`KL`,pnl:`Lãi/Lỗ`,activeOrders:`Lệnh chờ`,positions:`Vị thế`,noOrders:`Không có lệnh chờ`,noPositions:`Không có vị thế mở`,placeOrder:`Đặt lệnh`,rightClickToTrade:`Nhấp chuột phải để đặt lệnh`,ceiling:`Trần`,floor:`Sàn`,reference:`Tham chiếu`,session:`Phiên`,preOpen:`Trước giờ mở`,continuous:`Liên tục`,preClose:`Trước giờ đóng`,closed:`Đóng cửa`,settings:`Cài đặt`,theme:`Giao diện`,darkTheme:`Tối`,lightTheme:`Sáng`,tools:`Công cụ`,indicators:`Chỉ báo`,overlays:`Phủ lên`,panels:`Bảng`,orders:`Lệnh`,autoScale:`Tự co giãn`,crosshair:`Chữ thập`,grid:`Lưới`,loading:`Đang tải...`,error:`Lỗi`,numberDecimalSeparator:`,`,numberGroupSeparator:`.`},W=new Map([[`en`,U],[`vi`,Dn]]),G=`en`,On=U;function kn(e){G=e,On=W.get(e)??U}function An(){return G}function jn(e){return On[e]??U[e]??e}function Mn(e,t){W.set(e,t)}function Nn(e){return W.get(e??G)??U}function K(e,t=2,n){let r=W.get(n??G)??U,i=r.numberDecimalSeparator,a=r.numberGroupSeparator,[o,s]=e.toFixed(t).split(`.`),c=o.startsWith(`-`),l=c?o.slice(1):o,u=``;for(let e=l.length-1,t=0;e>=0;e--,t++)t>0&&t%3==0&&(u=a+u),u=l[e]+u;return c&&(u=`-`+u),s?u+i+s:u}function Pn(e){return K(e,0,`vi`)}function Fn(e,t){return e>=1e9?K(e/1e9,2,t??G)+`B`:e>=1e6?K(e/1e6,2,t??G)+`M`:e>=1e3?K(e/1e3,2,t??G)+`K`:K(e,0,t??G)}var q={up:`#22C55E`,down:`#EF4444`,unchanged:`#EAB308`,ceiling:`#D946EF`,floor:`#06B6D4`,reference:`#EAB308`},J=`Asia/Ho_Chi_Minh`,In=[{name:`ATO`,startTime:`09:00`,endTime:`09:15`,type:`preOpen`},{name:`Phiên 1`,startTime:`09:15`,endTime:`11:30`,type:`continuous`},{name:`Nghỉ trưa`,startTime:`11:30`,endTime:`13:00`,type:`closed`},{name:`Phiên 2`,startTime:`13:00`,endTime:`14:30`,type:`continuous`},{name:`ATC`,startTime:`14:30`,endTime:`14:45`,type:`preClose`}],Ln=[{name:`Phiên 1`,startTime:`09:15`,endTime:`11:30`,type:`continuous`},{name:`Nghỉ trưa`,startTime:`11:30`,endTime:`13:00`,type:`closed`},{name:`Phiên 2`,startTime:`13:00`,endTime:`14:30`,type:`continuous`},{name:`ATC`,startTime:`14:30`,endTime:`14:45`,type:`preClose`},{name:`PLO`,startTime:`14:45`,endTime:`15:00`,type:`postClose`}],Rn=[{name:`Phiên 1`,startTime:`09:15`,endTime:`11:30`,type:`continuous`},{name:`Nghỉ trưa`,startTime:`11:30`,endTime:`13:00`,type:`closed`},{name:`Phiên 2`,startTime:`13:00`,endTime:`14:30`,type:`continuous`}],zn=[{name:`ATO`,startTime:`08:45`,endTime:`09:00`,type:`preOpen`},{name:`Phiên 1`,startTime:`09:00`,endTime:`11:30`,type:`continuous`},{name:`Nghỉ trưa`,startTime:`11:30`,endTime:`13:00`,type:`closed`},{name:`Phiên 2`,startTime:`13:00`,endTime:`14:30`,type:`continuous`},{name:`ATC`,startTime:`14:30`,endTime:`14:45`,type:`preClose`}],Bn={type:`stock`,exchange:`HOSE`,currency:`VND`,pricePrecision:2,volumeUnit:100,priceStep:.01,priceSteps:[{from:0,step:.01},{from:10,step:.05},{from:50,step:.1}],timeZone:J,priceLimits:{enabled:!0,ceilingPercent:7,floorPercent:7},sessions:In,colorScheme:q},Vn={...Bn,priceSteps:void 0},Hn={type:`stock`,exchange:`HNX`,currency:`VND`,pricePrecision:1,volumeUnit:100,priceStep:.1,timeZone:J,priceLimits:{enabled:!0,ceilingPercent:10,floorPercent:10},sessions:Ln,colorScheme:q},Un={type:`stock`,exchange:`UPCOM`,currency:`VND`,pricePrecision:1,volumeUnit:100,priceStep:.1,timeZone:J,priceLimits:{enabled:!0,ceilingPercent:15,floorPercent:15},sessions:Rn,colorScheme:q},Wn={type:`futures`,exchange:`HNX`,currency:`VND`,pricePrecision:1,volumeUnit:1,priceStep:.1,contractMultiplier:1e5,timeZone:J,priceLimits:{enabled:!0,ceilingPercent:7,floorPercent:7},sessions:zn,colorScheme:q},Gn={type:`crypto`,currency:`USDT`,pricePrecision:2,priceLimits:{enabled:!1}},Kn={type:`stock`,exchange:`NYSE`,currency:`USD`,pricePrecision:2,priceStep:.01,timeZone:`America/New_York`,priceLimits:{enabled:!1},sessions:[{name:`Pre-Market`,startTime:`04:00`,endTime:`09:30`,type:`preOpen`},{name:`Regular`,startTime:`09:30`,endTime:`16:00`,type:`continuous`},{name:`After-Hours`,startTime:`16:00`,endTime:`20:00`,type:`postClose`}]};function qn(e){return{...e,candleUp:q.up,candleDown:q.down,candleUpWick:q.up,candleDownWick:q.down}}var Y=1e-9;function X(e,t){let n=t.priceStep;for(let r of t.priceSteps??[])e+Y>=r.from&&(n=r.step);return n!==void 0&&n>0?n:void 0}function Jn(e,t){let n=t.priceStep;for(let r of t.priceSteps??[])e-Y>r.from&&(n=r.step);return n!==void 0&&n>0?n:void 0}function Z(e,t,n=`nearest`){let r=X(e,t);if(r===void 0||!Number.isFinite(e))return e;let i=e/r,a=n===`down`?Math.floor(i+Y):n===`up`?Math.ceil(i-Y):Math.round(i);return Number((a*r).toFixed(ft(r)))}function Yn(e,t){if(!t.priceLimits?.enabled||!t.priceLimits.ceilingPercent)return null;let n=t.priceLimits.ceilingPercent/100,r=(t.priceLimits.floorPercent??t.priceLimits.ceilingPercent)/100,i=e,a=i*(1+n),o=i*(1-r),s=X(i,t);if(s===void 0)return{ceiling:a,floor:o,reference:i};let c=Z(i+s,t);if(Math.abs(i-s)<Y)return{ceiling:c,floor:i,reference:i};let l=Z(a,t,`down`),u=Z(o,t,`up`);return l<=i&&(l=c),u>=i&&(u=Z(i-(Jn(i,t)??s),t)),u<=0&&(u=i),{ceiling:l,floor:u,reference:i}}var Q=(e,t)=>Math.round(e*t*1e9)/1e9;function Xn(e,t){let n=Math.round(Math.log10(t));return{...e,pricePrecision:e.pricePrecision===void 0?void 0:Math.max(0,e.pricePrecision-n),priceStep:e.priceStep===void 0?void 0:Q(e.priceStep,t),priceSteps:e.priceSteps?.map(e=>({from:Q(e.from,t),step:Q(e.step,t)})),priceLimits:e.priceLimits&&{...e.priceLimits,referencePrice:e.priceLimits.referencePrice===void 0?void 0:Q(e.priceLimits.referencePrice,t)}}}var Zn=6e4,Qn=864e5;function $n(e,t){let n,r;if(t){let i=new Date(e+S(t,e)*Zn);n=i.getUTCHours(),r=i.getUTCMinutes()}else{let t=new Date(e);n=t.getHours(),r=t.getMinutes()}return`${String(n).padStart(2,`0`)}:${String(r).padStart(2,`0`)}`}function er(e,t=Date.now(),n){if(n!==void 0&&!x(n))return null;let r=$n(t,n);for(let t of e)if(r>=t.startTime&&r<t.endTime)return t;return null}var $=e=>String(e).padStart(2,`0`),tr=e=>{let t=new Date(e);return`${t.getUTCFullYear()}-${$(t.getUTCMonth()+1)}-${$(t.getUTCDate())}`},nr=4,rr=7*36e5;function ir(e,t,n){let r=Date.UTC(e,t-1,1),i=1+(nr-new Date(r).getUTCDay()+7)%7,a=Date.UTC(e,t-1,i+14),o=e=>{let t=new Date(e).getUTCDay();return t===0||t===6||(n?.(tr(e))??!1)};for(;o(a);)a-=Qn;return tr(a)}function ar(e,t){let n=tr(e+rr),r=(e,n)=>({symbol:`VN30F${$(e%100)}${$(n)}`,year:e,month:n,lastTradingDay:ir(e,n,t)}),i=e=>e.month===12?r(e.year+1,1):r(e.year,e.month+1),a=new Date(e+rr),o=r(a.getUTCFullYear(),a.getUTCMonth()+1);n>o.lastTradingDay&&(o=i(o));let s=[o,i(o)],c=i(s[1]);for(;s.length<4;)c.month%3==0&&s.push(c),c=i(c);return s}var or={cursor:{d:`M6 3.5L18.5 12.5L12.6 13.6L9.7 19.4z`},trendingUp:{d:`M3 17L9 11L13 14.5L21 6.5M15 6.5H21V12.5`},trendingDown:{d:`M3 7L9 13L13 9.5L21 17.5M15 17.5H21V11.5`},minus:{d:`M5 12H19`},plus:{d:`M12 5V19M5 12H19`},penLine:{d:`M14.5 5.5L18.5 9.5M4 20L5 15.5L15.8 4.7a2 2 0 0 1 2.83 0l.67.67a2 2 0 0 1 0 2.83L8.5 19z`},zigzag:{d:`M3 17L8 9L13 15L21 6`},hash:{d:`M5 9H19M5 15H19M10 4L8.5 20M15.5 4L14 20`},square:{d:`M6.5 4.5h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2h-11a2 2 0 0 1-2-2v-11a2 2 0 0 1 2-2z`},gitBranch:{d:`M6 3V15M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM18 9a9 9 0 0 1-9 9`},ruler:{d:`M3.5 16.5L16.5 3.5L20.5 7.5L7.5 20.5zM6.5 13.5L8 15M9.5 10.5L11.5 12.5M12.5 7.5L14 9`},type:{d:`M6 6V4.5H18V6M12 4.5V19.5M9.5 19.5H14.5`},magnet:{d:`M6 4V11a6 6 0 0 0 12 0V4M6 4h3.5v7a2.5 2.5 0 0 0 5 0V4H18M6 8h3.5M14.5 8H18`},magnetStrong:{d:`M6 4V11a6 6 0 0 0 12 0V4M6 4h3.5v7a2.5 2.5 0 0 0 5 0V4H18`,fills:[`M6 4h3.5v4H6z`,`M14.5 4H18v4h-3.5z`]},eraser:{d:`M8.5 19.5L3.9 14.9a1.5 1.5 0 0 1 0-2.1l8.5-8.5a1.5 1.5 0 0 1 2.1 0l5.2 5.2a1.5 1.5 0 0 1 0 2.1L12 19.5zM8 9l7 7M12 19.5H20`},zoomIn:{d:`M16.5 10.5a6 6 0 1 1-12 0 6 6 0 0 1 12 0zM15 15L20.5 20.5M10.5 7.5V13.5M7.5 10.5H13.5`},undo:{d:`M9 14L4 9L9 4M4 9H14.5a5.5 5.5 0 0 1 0 11H11`},redo:{d:`M15 14L20 9L15 4M20 9H9.5a5.5 5.5 0 0 0 0 11H13`},trash:{d:`M4 7H20M9.5 7V4.5h5V7M6.5 7l.8 12.2A1.5 1.5 0 0 0 8.8 20.6h6.4a1.5 1.5 0 0 0 1.5-1.4L17.5 7M10 11v6M14 11v6`},camera:{d:`M4.5 7.5h3L9 5h6l1.5 2.5h3A1.5 1.5 0 0 1 21 9v9.5a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 3 18.5V9a1.5 1.5 0 0 1 1.5-1.5zM15.5 13.5a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0z`},settings:{d:`M4 7H14M18 7H20M4 17H8M12 17H20M18 7a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM12 17a2 2 0 1 1-4 0 2 2 0 0 1 4 0z`},moon:{d:`M20 14.5A8 8 0 1 1 9.5 4a6.5 6.5 0 0 0 10.5 10.5z`},sun:{d:`M16 12a4 4 0 1 1-8 0 4 4 0 0 1 8 0zM12 2.5v2M12 19.5v2M4.6 4.6l1.4 1.4M18 18l1.4 1.4M2.5 12h2M19.5 12h2M4.6 19.4L6 18M18 6l1.4-1.4`},chevronDown:{d:`M6 9L12 15L18 9`},chevronUp:{d:`M6 15L12 9L18 15`},barChart:{d:`M5 20V13M12 20V5M19 20V10`},x:{d:`M6 6L18 18M18 6L6 18`},play:{d:`M7 4.5v15L19.5 12z`},pause:{d:`M8 5V19M16 5V19`},stop:{d:`M7.5 6h9A1.5 1.5 0 0 1 18 7.5v9a1.5 1.5 0 0 1-1.5 1.5h-9A1.5 1.5 0 0 1 6 16.5v-9A1.5 1.5 0 0 1 7.5 6z`},receipt:{d:`M6 3.5h12v17l-2-1.25-2 1.25-2-1.25-2 1.25-2-1.25-2 1.25zM9 8h6M9 12h6M9 16h3`},bell:{d:`M6 16.5V11a6 6 0 0 1 12 0v5.5l1.5 2H4.5zM10 20.5a2.2 2.2 0 0 0 4 0`},layers:{d:`M12 3.5L21 8.5L12 13.5L3 8.5zM3 12.5L12 17.5L21 12.5M3 16.5L12 21.5L21 16.5`},list:{d:`M9 6.5H20M9 12H20M9 17.5H20`,dots:[[4.75,6.5,1.25],[4.75,12,1.25],[4.75,17.5,1.25]]},table:{d:`M5.5 4.5h13a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2h-13a2 2 0 0 1-2-2v-11a2 2 0 0 1 2-2zM3.5 9.5H20.5M3.5 14.5H20.5M10 9.5V19.5`},eye:{d:`M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12zM15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0z`},eyeOff:{d:`M4 4L20 20M9.9 5.8A9.6 9.6 0 0 1 12 5.5c6 0 9.5 6.5 9.5 6.5a16 16 0 0 1-2.3 3.1M6.6 7.1C3.9 8.9 2.5 12 2.5 12S6 18.5 12 18.5a9.3 9.3 0 0 0 4.7-1.3M10 10.1a3 3 0 0 0 4 4`},lock:{d:`M7 10.5h10a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2zM8 10.5V7.5a4 4 0 0 1 8 0v3`},unlock:{d:`M7 10.5h10a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2zM8 10.5V7.5a4 4 0 0 1 7.7-1.5`},palette:{d:`M12 3.5a8.5 8.5 0 0 0 0 17c1.1 0 1.6-.8 1.6-1.6 0-.5-.2-.9-.5-1.2a1.6 1.6 0 0 1 1.2-2.7h1.9a4.3 4.3 0 0 0 4.3-4.3C20.5 6.9 16.7 3.5 12 3.5z`,dots:[[7.5,11.5,1.25],[9.5,7.75,1.25],[14,7.25,1.25]]},check:{d:`M5 12.5L10 17.5L19 7`},maximize:{d:`M8 4H5a1 1 0 0 0-1 1v3M16 4h3a1 1 0 0 1 1 1v3M20 16v3a1 1 0 0 1-1 1h-3M8 20H5a1 1 0 0 1-1-1v-3`},minimize:{d:`M4 8h3a1 1 0 0 0 1-1V4M16 4v3a1 1 0 0 0 1 1h3M20 16h-3a1 1 0 0 0-1 1v3M8 20v-3a1 1 0 0 0-1-1H4`},repeat:{d:`M17 3.5L20.5 7L17 10.5M3.5 11.5V10a3 3 0 0 1 3-3h14M7 20.5L3.5 17L7 13.5M20.5 12.5V14a3 3 0 0 1-3 3h-14`},info:{d:`M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0zM12 11V16.5`,dots:[[12,7.75,1.25]]},chevronLeft:{d:`M15 5L8 12L15 19`},chevronRight:{d:`M9 5L16 12L9 19`},reset:{d:`M4.5 12a7.5 7.5 0 1 0 2.2-5.3M4.5 4v4.5H9`},calendar:{d:`M5.5 5h13a2 2 0 0 1 2 2v11.5a2 2 0 0 1-2 2h-13a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2zM3.5 10H20.5M8 3V7M16 3V7`},star:{d:`M12 3.5L14.6 9L20.5 9.6L16 13.6L17.3 19.5L12 16.5L6.7 19.5L8 13.6L3.5 9.6L9.4 9z`},pin:{d:`M8 3.5h8M9.5 3.5v5.5L5.5 14h13l-4-5v-5.5M12 14v6.5`},search:{d:`M16.5 10.5a6 6 0 1 1-12 0 6 6 0 0 1 12 0zM15 15L20.5 20.5`},enter:{d:`M19 5v6.5a3 3 0 0 1-3 3H5.5M9.5 10L5 14.5L9.5 19`},stepBack:{d:`M6 5v14M18.5 5.5v13L8.5 12z`},stepForward:{d:`M18 5v14M5.5 5.5v13l10-6.5z`},ladder:{d:`M4 6H11M13 6H17M6 10H11M13 10H20M8 14H11M13 14H15M5 18H11M13 18H19`},save:{d:`M5.5 3.5h10.5l4.5 4.5v10.5a2 2 0 0 1-2 2h-13a2 2 0 0 1-2-2v-13a2 2 0 0 1 2-2zM8 3.5v5h7v-5M7.5 20.5v-6h9v6`},folder:{d:`M3.5 7a2 2 0 0 1 2-2h4l2 2.5h7a2 2 0 0 1 2 2V17a2 2 0 0 1-2 2h-13a2 2 0 0 1-2-2z`},link:{d:`M10 14a4 4 0 0 0 5.66 0l3-3a4 4 0 0 0-5.66-5.66l-1.2 1.2M14 10a4 4 0 0 0-5.66 0l-3 3a4 4 0 0 0 5.66 5.66l1.2-1.2`},arrowUp:{d:`M12 19V5M6 11L12 5L18 11`},arrowDown:{d:`M12 5V19M6 13L12 19L18 13`},arrowUpDown:{d:`M8.5 19V5M5 8.5L8.5 5L12 8.5M15.5 5V19M12 15.5L15.5 19L19 15.5`},more:{dots:[[6,12,1.6],[12,12,1.6],[18,12,1.6]]},layoutGrid:{d:`M5 4.5h4.5a.5.5 0 0 1 .5.5v4.5a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5zM14.5 4.5H19a.5.5 0 0 1 .5.5v4.5a.5.5 0 0 1-.5.5h-4.5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5zM5 14h4.5a.5.5 0 0 1 .5.5V19a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5v-4.5A.5.5 0 0 1 5 14zM14.5 14H19a.5.5 0 0 1 .5.5V19a.5.5 0 0 1-.5.5h-4.5a.5.5 0 0 1-.5-.5v-4.5a.5.5 0 0 1 .5-.5z`}},sr={trendLine:{d:`M5 18L19 6`,dots:[[5,18],[19,6]]},ray:{d:`M5 17L21 5M17.5 4.81L21 5L20.2 8.41`,dots:[[5,17],[11,12.5]]},extendedLine:{d:`M3 18.5L21 5M17.5 4.81L21 5L20.2 8.41M6.5 18.69L3 18.5L3.8 15.09`,dots:[[9,14],[15,9.5]]},infoLine:{d:`M5 20L19 10M4.5 3.5h9a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-9a1 1 0 0 1-1-1v-4a1 1 0 0 1 1-1zM6.5 6.5h5`,dots:[[5,20],[19,10]]},trendAngle:{d:`M5 18L19 7M5 18H20M11 18A6 6 0 0 0 9.71 14.29`,dots:[[5,18],[19,7]]},horizontalLine:{d:`M3 12H21`,dots:[[12,12]]},horizontalRay:{d:`M7 12H21M18.5 9.5L21 12L18.5 14.5`,dots:[[7,12]]},verticalLine:{d:`M12 3V21`,dots:[[12,12]]},crossLine:{d:`M3 12H21M12 3V21`,dots:[[12,12]]},parallelChannel:{d:`M3 15L15 5M9 19L21 9`,dots:[[3,15],[15,5],[9,19]]},regressionChannel:{d:`M3 12L21 4M3 20L21 12`,dash:`M3 16L21 8`,dots:[[3,16],[21,8]]},fibRetracement:{d:`M3 4H21M3 9H21M3 13H21M3 20H21`,dots:[[5,20],[19,4]]},fibExtension:{d:`M3 20L8 10L12 16M14 4H21M14 8H21M14 12H21`,dots:[[3,20],[8,10],[12,16]]},fibChannel:{d:`M3 9L21 3M3 13L21 7M3 16L21 10M3 21L21 15`,dots:[[3,21],[21,15],[3,9]]},fibTimeZones:{d:`M3 4V20M6 4V20M9.5 4V20M14 4V20M20.5 4V20`,dots:[[3,20],[6,20]]},fibSpeedResistanceFan:{d:`M4 20L20 4M4 20L20 11M4 20L20 16M4 20L11 4`,dash:`M4 4H20V20`,dots:[[4,20],[20,4]]},rectangle:{d:`M5.5 6h13A1.5 1.5 0 0 1 20 7.5v9a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 4 16.5v-9A1.5 1.5 0 0 1 5.5 6z`,dots:[[4,6],[20,18]]},circle:{d:`M19.5 12a7.5 7.5 0 1 1-15 0 7.5 7.5 0 0 1 15 0z`,dots:[[12,12],[19.5,12]]},ellipse:{d:`M20.5 12c0 3-3.8 5.5-8.5 5.5S3.5 15 3.5 12 7.3 6.5 12 6.5s8.5 2.5 8.5 5.5z`,dots:[[3.5,12],[20.5,12]]},triangle:{d:`M12 4.5L20 19H4z`,dots:[[12,4.5],[20,19],[4,19]]},pitchfork:{d:`M4 20L16.75 3M7 9L11.5 3M13 15L21 4.33M7 9L13 15`,dots:[[4,20],[7,9],[13,15]]},schiffPitchfork:{d:`M4 14.5L21 7.42M7 9L21 3.17M13 15L21 11.67M7 9L13 15`,dash:`M4 20V14.5`,dots:[[4,14.5],[7,9],[13,15]]},modifiedSchiffPitchfork:{d:`M5.5 14.5L21 5.89M7 9L17.8 3M13 15L21 10.56M7 9L13 15`,dash:`M4 20L5.5 14.5`,dots:[[5.5,14.5],[7,9],[13,15]]},gannFan:{d:`M4 20L20 4M4 20L20 12M4 20L12 4M4 20L20 16.5M4 20L7.5 4`,dots:[[4,20],[20,4]]},gannBox:{d:`M4 4H20V20H4zM4 20L20 4M4 4L20 20M12 4V20`,dots:[[4,20],[20,4]]},cyclicLines:{d:`M4 4V20M9 4V20M14 4V20M19 4V20`,dots:[[4,20],[9,20]]},xabcdPattern:{d:`M3 18L7 6L11 13L15 8L21 19`,dash:`M3 18L11 13L21 19`,dots:[[3,18],[7,6],[11,13],[15,8],[21,19]]},abcdPattern:{d:`M4 19L9 8L13 14L20 4`,dots:[[4,19],[9,8],[13,14],[20,4]]},headAndShoulders:{d:`M3 19L6 11L8.5 15L12 5L15.5 15L18 11L21 19`,dash:`M4.5 15H19.5`,dots:[[6,11],[12,5],[18,11]]},elliottWave:{d:`M3 19L6 13L8.5 16L14 6L16 10L21 4`,dots:[[3,19],[21,4]]},priceRange:{d:`M5 4H19M5 20H19M12 6.5V17.5M9 9.5L12 6.5L15 9.5M9 14.5L12 17.5L15 14.5`},dateRange:{d:`M4 5V19M20 5V19M6.5 12H17.5M9.5 9L6.5 12L9.5 15M14.5 9L17.5 12L14.5 15`},dateAndPriceRange:{d:`M6 18V4M3 7L6 4L9 7M6 18H20M17 15L20 18L17 21`,dash:`M6 4H20V18`},measure:{d:`M3.5 16.5L16.5 3.5L20.5 7.5L7.5 20.5zM6.5 13.5L8 15M9.5 10.5L11.5 12.5M12.5 7.5L14 9`},text:{d:`M6 6V4.5H18V6M12 4.5V19.5M9.5 19.5H14.5`},priceLabel:{d:`M9 5H19a1.5 1.5 0 0 1 1.5 1.5v11A1.5 1.5 0 0 1 19 19H9L3.5 12zM11 12H17`},arrow:{d:`M5 19L19 5M10 5H19V14`},riskReward:{d:`M5 12V4H19V12M3 12H21`,dash:`M5 12V18H19V12`,dots:[[5,12]]},anchoredVWAP:{d:`M4 18C9 17 12 10 20 7M4 20.5V18`,dots:[[4,18]]},volumeProfileRange:{d:`M6 7H12M6 10.5H17M6 14H15M6 17.5H10`,dash:`M3.5 4V20M20.5 4V20`,dots:[[3.5,20],[20.5,20]]},note:{d:`M5.5 4.5h13v9l-5 5h-8zM13.5 18.5v-5h5M8.5 8.5h7M8.5 11.5h4`},callout:{d:`M10.5 4h9a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1h-9a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zM12 12L5 19M12.5 8h5`,dots:[[5,19]]},flag:{d:`M6 21V4M6 4.5h11l-2.5 3.75L17 12H6`,soft:`M6 4.5h11l-2.5 3.75L17 12H6z`,dots:[[6,21]]},arrowMark:{d:`M12 4L18 11H14.5V20H9.5V11H6z`},icon:{d:`M12 3.5l2.6 5.3 5.9.85-4.25 4.15 1 5.85L12 16.9l-5.25 2.75 1-5.85L3.5 9.65l5.9-.85z`},brush:{d:`M3.5 17c2.5 0 3-5 6-5s2.5 5 5.5 5 3.5-6 5.5-9`},highlighter:{d:`M14.5 4.5l5 5L11 18H6v-5zM12 7l5 5M4 21h8`},path:{d:`M4 18L9 10L14 14L20 6M16.2 6.6L20 6L19.6 9.8`,dots:[[4,18],[9,10],[14,14]]},polyline:{d:`M5 17L8 6L16 4L20 14L12 20z`,soft:`M5 17L8 6L16 4L20 14L12 20z`,dots:[[5,17],[8,6],[16,4],[20,14],[12,20]]},curve:{d:`M4 18C8 4 16 4 20 18`,dots:[[4,18],[20,18],[12,7.5]]},arc:{d:`M4 17a8 8 0 0 1 16 0`,dots:[[4,17],[20,17],[12,9]]},fibCircles:{d:`M14 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM16.5 12a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0zM20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0z`,dots:[[12,12],[20,12]]},fibSpiral:{d:`M12 12a1.5 1.5 0 0 1 1.5 1.5 3 3 0 0 1-3 3A4.5 4.5 0 0 1 6 12a6 6 0 0 1 6-6 8 8 0 0 1 8 8`,dots:[[12,12]]},fibArcs:{d:`M10 20a6 6 0 0 0-6-6M14 20a10 10 0 0 0-10-10M18 20a14 14 0 0 0-14-14`,dash:`M4 20L18 6`,dots:[[4,20],[18,6]]},fibWedge:{d:`M4 19L20 7M4 19L20 16M10.4 14.2A8 8 0 0 1 11.86 17.53M14.4 11.2A13 13 0 0 1 16.78 16.6`,dots:[[4,19],[20,7],[20,16]]},pitchfan:{d:`M4 20L14 4M4 20L20 14M4 20L17 9`,dash:`M14 4L20 14`,dots:[[4,20],[14,4],[20,14]]},gannSquare:{d:`M4 4H20V20H4zM4 20L20 4M4 12H20M12 4V20M4 12a8 8 0 0 1 8 8`,dots:[[4,20],[20,4]]},elliottImpulse:{d:`M3 19L7 12L10 15L15 5L17.5 9L21 3`,dots:[[3,19],[21,3]]},elliottCorrection:{d:`M4 5L10 17L14 11L20 20`,dots:[[4,5],[20,20]]},elliottTriangle:{d:`M3 6L7 17L11 9L15 15L18 11L21 13`,dots:[[3,6],[21,13]]},elliottDoubleCombo:{d:`M4 5L9 14L13 9L20 19`,dots:[[4,5],[9,14],[13,9],[20,19]]},elliottTripleCombo:{d:`M3 5L7 13L10 9L14 16L17 12L21 20`,dots:[[3,5],[21,20]]},threeDrives:{d:`M3 20L7 12L9.5 15L14 7L16.5 10L21 3`,dash:`M7 12L14 7L21 3`,dots:[[7,12],[14,7],[21,3]]},cypherPattern:{d:`M3 19L7 9L10 14L15 5L20 16`,dash:`M3 19L10 14L20 16`,dots:[[3,19],[7,9],[10,14],[15,5],[20,16]]},timeCycles:{d:`M3 18a4.5 4.5 0 0 1 9 0a4.5 4.5 0 0 1 9 0`,dots:[[3,18],[12,18]]},sineLine:{d:`M3 12C5 5 7.5 5 9 12S13 19 15 12 19.5 5 21 12`,dots:[[6,6.75],[12,17.25]]},forecast:{d:`M4 18L15.2 7.8M19.5 6a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0z`,dots:[[4,18]]},projection:{d:`M12 19L18 11M15.2 11.3L18 11L17.8 13.8`,dash:`M3 17L9 9`,dots:[[3,17],[9,9],[12,19]]},barsPattern:{d:`M5 6V14M9 9V18M15 4V12M19 7V16`,fills:[`M4 8h2v4H4z`,`M8 11h2v5H8z`,`M14 6h2v4h-2z`,`M18 9h2v5h-2z`],dash:`M12 3V21`}},cr={candlestick:{d:`M8 3.5V7M8 16V20.5M16 5V8.5M16 15.5V19`,fills:[`M6.5 7h3a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1h-3a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1z`,`M14.5 8.5h3a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1h-3a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1z`]},hollowCandle:{d:`M8 3.5V7M8 16V20.5M16 5V8.5M16 15.5V19M6.5 7h3a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1h-3a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1zM14.5 8.5h3a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1h-3a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1z`},heikinAshi:{d:`M5.5 9.5V12M5.5 18V20M12 5.5V8M12 14V16M18.5 3V4.5M18.5 10.5V12.5`,fills:[`M4 12h3a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-.5.5H4a.5.5 0 0 1-.5-.5v-5A.5.5 0 0 1 4 12z`,`M10.5 8h3a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-5a.5.5 0 0 1 .5-.5z`,`M17 4.5h3a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5z`]},bar:{d:`M8 4V20M5 8H8M8 16H11M16 6V18M13 15H16M16 9H19`},volumeCandles:{d:`M6.5 5V8M6.5 16V19M15.5 3.5V6M15.5 16V20`,fills:[`M5.5 8h2a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1-.5-.5v-7a.5.5 0 0 1 .5-.5z`,`M11.5 6h8a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-8a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5z`]},equivolume:{d:`M4.5 10h2a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-6a1 1 0 0 1 1-1zM10 6h5a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1h-5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zM18.5 4h1a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1z`},line:{d:`M3 17L8 11L12 14L21 5`},area:{d:`M3 17L8 11L12 14L21 5`,soft:`M3 17L8 11L12 14L21 5V20H3z`},baseline:{d:`M3 16L7 9L11 14L15 7L21 15`,dash:`M3 12H21`},hlcArea:{d:`M3 9L8 6L13 9L21 4M3 15L8 13L13 16L21 11`,dash:`M3 12L8 9.5L13 12.5L21 7.5`,soft:`M3 9L8 6L13 9L21 4V11L13 16L8 13L3 15z`},stepLine:{d:`M3 18H8V12H12V15H16V7H21`},lineWithMarkers:{d:`M4 17L9 10L14 14L20 6`,dots:[[4,17],[9,10],[14,14],[20,6]]},hiLo:{d:`M6 7V17M12 4V14M18 9V20`,fills:[`M5 7h2v10H5z`,`M11 4h2v10h-2z`,`M17 9h2v11h-2z`]},renko:{d:`M3.5 15.5h4v4h-4zM7.5 11.5h4v4h-4zM11.5 7.5h4v4h-4zM15.5 11.5h4v4h-4z`},lineBreak:{d:`M4 14h4v5H4zM8 10h4v4H8zM16 9h4v8h-4z`,fills:[`M12 5h4v5h-4z`]},kagi:{d:`M4 19V11H9V16H14V5H20V13`},pointAndFigure:{d:`M5.5 5.5l3 3M8.5 5.5l-3 3M5.5 10.5l3 3M8.5 10.5l-3 3M5.5 15.5l3 3M8.5 15.5l-3 3M14.5 9a1.5 1.5 0 1 0 3 0a1.5 1.5 0 1 0-3 0M14.5 14a1.5 1.5 0 1 0 3 0a1.5 1.5 0 1 0-3 0`},rangeBars:{d:`M6.5 11V12M6.5 18V19M12 7V8M12 14V15M17.5 3.5V4.5M17.5 10.5V11.5`,fills:[`M5 12h3v6H5z`,`M10.5 8h3v6h-3z`,`M16 4.5h3v6h-3z`]}},lr=1.75,ur=.22,dr=new WeakMap;function fr(e){let t=dr.get(e);if(t)return t;let n=``;e.soft&&(n+=`<path d="${e.soft}" fill="currentColor" fill-opacity="${ur}" stroke="none"/>`);for(let t of e.fills??[])n+=`<path d="${t}" fill="currentColor" stroke="none"/>`;e.d&&(n+=`<path d="${e.d}"/>`),e.dash&&(n+=`<path d="${e.dash}" stroke-dasharray="2 2.5"/>`);for(let[t,r,i=lr]of e.dots??[])n+=`<circle cx="${t}" cy="${r}" r="${i}" fill="currentColor" stroke="none"/>`;return dr.set(e,n),n}function pr(e,t){return`<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${t}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">${fr(e)}</svg>`}exports.CHART_STYLE_KEYS=t,exports.CHART_TYPE_ICONS=cr,exports.DARK_TERMINAL=qt,exports.DARK_THEME=Gt,exports.DEFAULT_BAR_SPACING=yn,exports.DEFAULT_BAR_WIDTH=vn,exports.DEFAULT_CHART_OPTIONS=pn,exports.DEFAULT_DRAWING_STYLE=n,exports.DEFAULT_FONT_FAMILY=Nt,exports.DEFAULT_PANEL_HEIGHT=Cn,exports.DEFAULT_RECONNECT=o,exports.DEFAULT_SIGNAL_STYLE=i,exports.DEFAULT_STREAM_CONFIG=s,exports.DEFAULT_TIMEFRAME_FAVORITES=_n,exports.DEFAULT_TRADE_ZONE_STYLE=a,exports.DEFAULT_TRADING_CONFIG=r,exports.DRAWING_TOOL_ICONS=sr,exports.FIBONACCI=Tn,exports.HNX_SESSIONS=Ln,exports.HOSE_SESSIONS=In,exports.ICON_DOT_RADIUS=lr,exports.ICON_SOFT_OPACITY=ur,exports.LIGHT_THEME=Kt,exports.LayerType=e,exports.MARKET_CRYPTO=Gn,exports.MARKET_HNX=Hn,exports.MARKET_HOSE=Bn,exports.MARKET_HOSE_ETF=Vn,exports.MARKET_NYSE=Kn,exports.MARKET_UPCOM=Un,exports.MARKET_VN30F=Wn,exports.MIN_PANEL_HEIGHT=Sn,exports.MS_TIME_THRESHOLD=se,exports.PHI=wn,exports.PRICE_AXIS_WIDTH=bn,exports.PRICE_SOURCES=et,exports.TC_PALETTE=I,exports.TC_SERIES_COLORS=Wt,exports.TIMEFRAMES_CRYPTO=mn,exports.TIMEFRAMES_FOREX=gn,exports.TIMEFRAMES_STOCK=hn,exports.TIME_AXIS_HEIGHT=xn,exports.UI_ICONS=or,exports.UPCOM_SESSIONS=Rn,exports.VN30F_SESSIONS=zn,exports.VN_COLORS=q,exports.VOLUME_ALPHA=Ft,exports.alignToTimeframe=Ie,exports.autoPricePrecision=qe,exports.barTimeUnit=ce,exports.barsAreDaily=Be,exports.chartStyleValue=fn,exports.clamp=ne,exports.computePriceLimits=Yn,exports.computePriceRange=he,exports.computeTickStep=oe,exports.createVNTheme=qn,exports.detectPrecision=$e,exports.drawingOption=St,exports.en=U,exports.findBarIndex=fe,exports.fitPriceRange=me,exports.formatFraction=Ye,exports.formatNumber=K,exports.formatPrice=O,exports.formatPriceScaleLabel=Je,exports.formatTimestamp=Fe,exports.formatVND=Pn,exports.formatVolume=Qe,exports.formatVolumeLoc=Fn,exports.fractionTick=Xe,exports.getCurrentSession=er,exports.getLocale=An,exports.getLocaleStrings=Nn,exports.hexToRgba=_e,exports.iconSvg=pr,exports.indicatorSource=it,exports.inverseLerp=ie,exports.isDateOnly=Re,exports.isPriceSource=tt,exports.isTimeFrame=Pe,exports.isValidTimeZone=x,exports.lerp=re,exports.lerpColor=ve,exports.lineDash=sn,exports.marketStatus=mt,exports.mergeBar=ge,exports.niceNumber=m,exports.normalizeBar=ue,exports.normalizeBarTime=le,exports.offsetAt=w,exports.padPriceRange=pe,exports.parseIndicatorSource=at,exports.parseTimeframe=T,exports.phiStep=En,exports.pickBaseTimeframe=lt,exports.priceFormatterFor=Ze,exports.priceStepAt=X,exports.priceTagText=Ke,exports.rankSymbols=dt,exports.readChartStyleOverrides=nn,exports.readChartTypeOptions=Mt,exports.readIndicatorPlotStyles=on,exports.readNews=te,exports.readPaneStyle=rn,exports.readQuote=l,exports.registerLocale=Mn,exports.resampleBars=st,exports.resolveChartTheme=ln,exports.resolveDrawingOptions=Ct,exports.resolveVolumeColors=B,exports.roundToPriceStep=Z,exports.roundToStep=ae,exports.sanitizeDrawingOptions=bt,exports.sanitizeDrawingStyle=jt,exports.scaleMarketPrices=Xn,exports.sessionMinute=A,exports.setLocale=kn,exports.sliceVisibleData=de,exports.sourcePrice=nt,exports.stepDecimals=ft,exports.t=jn,exports.tickBarCount=Ne,exports.timeParts=Le,exports.timeframeBucketStart=Ue,exports.timeframeToMs=E,exports.tzLabel=Ve,exports.vi=Dn,exports.vn30fContracts=ar,exports.vn30fLastTradingDay=ir,exports.volumeColor=L,exports.wallToUtc=Ee,exports.withAlpha=h,exports.zoneOffsetMinutes=S,exports.zonedDateFormatter=Oe;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=function(e){return e[e.Background=0]=`Background`,e[e.Main=1]=`Main`,e[e.Panel=2]=`Panel`,e[e.Overlay=3]=`Overlay`,e[e.UI=4]=`UI`,e[e.Hover=5]=`Hover`,e}({}),t={"background.color":`color`,"panes.background":`color`,"panes.separatorColor":`color`,"panes.titleColor":`color`,"grid.horizontal.visible":`boolean`,"grid.horizontal.color":`color`,"grid.horizontal.style":`lineStyle`,"grid.horizontal.width":`width`,"grid.vertical.visible":`boolean`,"grid.vertical.color":`color`,"grid.vertical.style":`lineStyle`,"grid.vertical.width":`width`,"crosshair.horizontal.visible":`boolean`,"crosshair.horizontal.color":`color`,"crosshair.horizontal.style":`lineStyle`,"crosshair.horizontal.width":`width`,"crosshair.vertical.visible":`boolean`,"crosshair.vertical.color":`color`,"crosshair.vertical.style":`lineStyle`,"crosshair.vertical.width":`width`,"crosshair.labelBackground":`color`,"crosshair.labelTextColor":`color`,"axis.price.lineColor":`color`,"axis.price.textColor":`color`,"axis.time.lineColor":`color`,"axis.time.textColor":`color`,"legend.textColor":`color`,"legend.labelColor":`color`,"watermark.color":`color`,"lastPrice.visible":`boolean`,"lastPrice.upColor":`color`,"lastPrice.downColor":`color`,"lastPrice.style":`lineStyle`,"lastPrice.width":`width`,"volume.upColor":`color`,"volume.downColor":`color`,"sessionBreaks.color":`color`,"sessionBreaks.style":`lineStyle`,"sessionBreaks.width":`width`,"highLow.color":`color`,"trading.buyColor":`color`,"trading.sellColor":`color`,"trading.profitColor":`color`,"trading.lossColor":`color`,"trading.entryColor":`color`,"markers.longColor":`color`,"markers.shortColor":`color`,"markers.neutralColor":`color`,"tradeZones.profitColor":`color`,"tradeZones.lossColor":`color`,"tradeZones.activeColor":`color`,"drawings.handleColor":`color`,"series.candlestick.upColor":`color`,"series.candlestick.downColor":`color`,"series.candlestick.wickUpColor":`color`,"series.candlestick.wickDownColor":`color`,"series.heikinAshi.upColor":`color`,"series.heikinAshi.downColor":`color`,"series.heikinAshi.wickUpColor":`color`,"series.heikinAshi.wickDownColor":`color`,"series.hollowCandle.upColor":`color`,"series.hollowCandle.downColor":`color`,"series.volumeCandles.upColor":`color`,"series.volumeCandles.downColor":`color`,"series.volumeCandles.wickUpColor":`color`,"series.volumeCandles.wickDownColor":`color`,"series.equivolume.upColor":`color`,"series.equivolume.downColor":`color`,"series.equivolume.wickUpColor":`color`,"series.equivolume.wickDownColor":`color`,"series.bar.upColor":`color`,"series.bar.downColor":`color`,"series.hiLo.upColor":`color`,"series.hiLo.downColor":`color`,"series.renko.upColor":`color`,"series.renko.downColor":`color`,"series.lineBreak.upColor":`color`,"series.lineBreak.downColor":`color`,"series.rangeBars.upColor":`color`,"series.rangeBars.downColor":`color`,"series.kagi.upColor":`color`,"series.kagi.downColor":`color`,"series.pointAndFigure.upColor":`color`,"series.pointAndFigure.downColor":`color`,"series.baseline.upColor":`color`,"series.baseline.downColor":`color`,"series.baseline.lineWidth":`width`,"series.line.color":`color`,"series.line.lineWidth":`width`,"series.stepLine.color":`color`,"series.stepLine.lineWidth":`width`,"series.lineWithMarkers.color":`color`,"series.lineWithMarkers.lineWidth":`width`,"series.area.lineColor":`color`,"series.area.lineWidth":`width`,"series.area.topColor":`color`,"series.area.bottomColor":`color`,"series.hlcArea.lineColor":`color`,"series.hlcArea.lineWidth":`width`,"series.hlcArea.topColor":`color`,"series.hlcArea.bottomColor":`color`},n={color:`#4c8dff`,lineWidth:1,lineStyle:`solid`,fillColor:`rgba(76, 141, 255, 0.1)`,fillOpacity:.1,fontSize:12},r={enabled:!0,orderColors:{buy:`#1fa874`,sell:`#e8505b`},positionColors:{profit:`#1fa874`,loss:`#e8505b`,entry:`#4c8dff`},depthOverlay:{enabled:!1,bidColor:`rgba(31, 168, 116,0.15)`,askColor:`rgba(232, 80, 91,0.15)`,maxWidth:100},contextMenu:{enabled:!0},lineButtons:{cancel:!0,close:!0,reverse:!0,removeStops:!0},fillMarks:!0,dragThreshold:3},i={longColor:`#1fa874`,shortColor:`#e8505b`,neutralColor:`#9E9E9E`,arrowSize:12,showLabel:!0,showConfidence:!0},a={profitColor:`#1fa874`,lossColor:`#e8505b`,activeColor:`#4c8dff`,fillOpacity:.12,borderWidth:1,showLabel:!0,showPnl:!0},o={enabled:!0,maxRetries:1/0,baseDelay:1e3,maxDelay:3e4,backoffMultiplier:2},s={historyLimit:500,autoScroll:!0,showCurrentPriceLine:!0,aggregateTicks:!1},c=[`change`,`changePercent`,`open`,`high`,`low`,`prevClose`,`volume`,`bid`,`ask`,`time`];function l(e){if(!e||typeof e!=`object`)return null;let t=e,n=typeof t.symbol==`string`?t.symbol.trim():``;if(!n||n.length>64||!u(t.last))return null;let r={symbol:n,last:t.last};for(let e of c){let n=t[e];u(n)&&(r[e]=n)}let i=r.prevClose??r.open;if(r.change===void 0&&i!==void 0&&(r.change=r.last-i),r.changePercent===void 0&&r.change!==void 0){let e=r.last-r.change;e!==0&&(r.changePercent=r.change/e*100)}return r}function u(e){return typeof e==`number`&&Number.isFinite(e)}var d=300,f=1e3,p=(e,t)=>{if(typeof e!=`string`)return;let n=e.trim();return n?n.slice(0,t):void 0},ee=e=>{if(typeof e==`string`)try{let t=new URL(e);return t.protocol===`https:`||t.protocol===`http:`?t.href:void 0}catch{return}};function te(e,t=20){if(!Array.isArray(e))return[];let n=[];for(let t of e){if(!t||typeof t!=`object`)continue;let e=t,r=p(e.title,d);if(!r||typeof e.time!=`number`||!Number.isFinite(e.time))continue;let i={title:r,time:e.time},a=ee(e.url);a&&(i.url=a);let o=p(e.source,d);o&&(i.source=o);let s=p(e.summary,f);s&&(i.summary=s);let c=p(e.id,d);c&&(i.id=c),n.push(i)}return n.sort((e,t)=>t.time-e.time).slice(0,Math.max(0,t))}function ne(e,t,n){return Math.max(t,Math.min(n,e))}function re(e,t,n){return e+(t-e)*n}function ie(e,t,n){return e===t?0:(n-e)/(t-e)}function ae(e,t){return Math.round(e/t)*t}function m(e,t){let n=Math.floor(Math.log10(e)),r=e/10**n,i;return i=t?r<1.5?1:r<3?2:r<7?5:10:r<=1?1:r<=2?2:r<=5?5:10,i*10**n}function oe(e,t,n){return m(m(t-e,!1)/(n-1),!0)}var se=1e11;function ce(e){let t=e.length>0?e[e.length-1].time:NaN;return Number.isFinite(t)?Math.abs(t)>=1e11?1:1e3:1}function le(e,t){return t===void 0?Math.abs(e)>=1e11?e:e*1e3:e*t}function ue(e){return{time:le(e.time??e.t??0),open:e.open??e.o??0,high:e.high??e.h??0,low:e.low??e.l??0,close:e.close??e.c??0,volume:e.volume??e.v??0}}function de(e,t,n){let r=Math.max(0,t),i=Math.min(e.length,n+1);return e.slice(r,i)}function fe(e,t){let n=0,r=e.length-1;for(;n<=r;){let i=n+r>>>1;if(e[i].time<t)n=i+1;else if(e[i].time>t)r=i-1;else return i}return n}function pe(e,t,n,r=!1){let i=r&&e>0&&t>0?Math.log(t/e):NaN;if(Number.isFinite(i)){let r=i||Math.log(1+2*n),a=Math.exp(r*n);return{min:e/a,max:t*a}}let a=t-e||1;return{min:e-a*n,max:t+a*n}}function me(e,t,n,r=!1){let i=Math.max(1-n.top-n.bottom,2**-52),a=r&&e>0&&t>0?Math.log(t/e):NaN;if(Number.isFinite(a)){let r=(a||Math.log(1.01))/i;return{min:e/Math.exp(r*n.bottom),max:t*Math.exp(r*n.top)}}let o=(t-e||1)/i;return{min:e-o*n.bottom,max:t+o*n.top}}function he(e,t,n,r=.05,i=!1){if(e.length===0)return{min:0,max:1};let a=Math.max(0,t),o=Math.min(e.length-1,n),s=1/0,c=-1/0;for(let t=a;t<=o;t++)e[t].low<s&&(s=e[t].low),e[t].high>c&&(c=e[t].high);return s===1/0?{min:0,max:1}:pe(s,c,r,i)}function ge(e,t){return{...e,high:Math.max(e.high,t.price),low:Math.min(e.low,t.price),close:t.price,volume:e.volume+(t.volume??0),time:t.time}}function _e(e,t=1){let n=e.slice(1);return(n.length===3||n.length===4)&&(n=[...n.slice(0,3)].map(e=>e+e).join(``)),`rgba(${parseInt(n.slice(0,2),16)}, ${parseInt(n.slice(2,4),16)}, ${parseInt(n.slice(4,6),16)}, ${t})`}function h(e,t){let n=e.trim();if(/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(n))return _e(n,t);let r=n.match(/^rgba?\(\s*(\d+(?:\.\d+)?)[\s,]+(\d+(?:\.\d+)?)[\s,]+(\d+(?:\.\d+)?)/i);return r?`rgba(${r[1]}, ${r[2]}, ${r[3]}, ${t})`:e}function ve(e,t,n){let r=e=>(e=e.replace(`#`,``),e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16)}),i=r(e),a=r(t);return`rgb(${Math.round(i.r+(a.r-i.r)*n)},${Math.round(i.g+(a.g-i.g)*n)},${Math.round(i.b+(a.b-i.b)*n)})`}var g=6e4,ye=1440*g,_=15*g,be=8192,xe=7*ye,Se=4096,Ce=new Set([`UTC`,`Etc/UTC`,`GMT`,`Etc/GMT`,`UCT`,`Etc/UCT`,`Universal`,`Etc/Universal`,`Zulu`,`Etc/Zulu`]),we=new Map,v=new Map,Te=new Map;function Ee(e){let t=we.get(e);return t||(t=new Intl.DateTimeFormat(`en-US`,{timeZone:e,hourCycle:`h23`,year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`}),we.set(e,t)),t}function y(e){if(!e)return!1;try{return Ee(e),!0}catch{return!1}}function b(e,t){if(!Number.isFinite(t)||Ce.has(e))return 0;let n=Te.get(e);n||(n=new Map,Te.set(e,n));let r=Math.floor(t/xe),i=n.get(r);return i||(i=De(e,r*xe),n.size>=Se&&n.clear(),n.set(r,i)),t<i.change?i.before:i.after}function De(e,t){let n=x(e,t),r=t+xe-_,i=x(e,r);if(i===n)return{before:n,change:1/0,after:i};let a=t;for(;r-a>_;){let t=a+Math.floor((r-a)/_/2)*_;x(e,t)===n?a=t:r=t}return{before:n,change:r,after:i}}function x(e,t){let n=Math.floor(t/_),r=`${e}|${n}`,i=v.get(r);if(i!==void 0)return i;let a=n*_,o=1970,s=1,c=1,l=0,u=0,d=0;for(let t of Ee(e).formatToParts(new Date(a))){let e=Number(t.value);switch(t.type){case`year`:o=e;break;case`month`:s=e;break;case`day`:c=e;break;case`hour`:l=e%24;break;case`minute`:u=e;break;case`second`:d=e;break}}let f=Math.round((Date.UTC(o,s-1,c,l,u,d)-a)/g);return v.size>=be&&v.clear(),v.set(r,f),f}function S(e,t){return e===null?-new Date(t).getTimezoneOffset():typeof e==`number`?e:b(e,t)}function Oe(e,t){let n=e-S(t,e-ye)*g;if(n+S(t,n)*g===e)return n;let r=e-S(t,e+ye)*g;return r+S(t,r)*g===e?r:n}var ke=new Map;function Ae(e,t,n){let r=`${e}|${JSON.stringify(t)}|${n===null?`local`:typeof n==`number`?`fixed:${n}`:n}`,i=ke.get(r);if(i)return i;let a=n===null?void 0:typeof n==`number`?`UTC`:n,o;try{o=new Intl.DateTimeFormat(e,{...t,timeZone:a})}catch{o=new Intl.DateTimeFormat(`en-US`,{...t,timeZone:a})}let s=typeof n==`number`?n*g:0;return i=e=>o.format(new Date(e+s)),ke.set(r,i),i}var je={"1s":1e3,"5s":5e3,"15s":15e3,"30s":3e4,"1m":6e4,"3m":18e4,"5m":3e5,"15m":9e5,"30m":18e5,"45m":27e5,"1h":36e5,"2h":72e5,"3h":108e5,"4h":144e5,"6h":216e5,"8h":288e5,"12h":432e5,"1d":864e5,"2d":1728e5,"3d":2592e5,"1w":6048e5,"2w":12096e5,"1M":2592e6,"3M":7776e6,"6M":15552e6,"12M":31536e6},C={s:1e3,m:6e4,h:36e5,d:864e5,w:6048e5,M:2592e6},Me=/^([1-9]\d*)([smhdwM])$/;function w(e){let t=Me.exec(e);if(!t)return null;let n=Number(t[1]);return Number.isSafeInteger(n)?{count:n,unit:t[2]}:null}var Ne=1e6;function Pe(e){let t=/^([1-9]\d*)T$/.exec(e);if(!t)return null;let n=Number(t[1]);return Number.isSafeInteger(n)&&n<=Ne?n:null}function Fe(e){return w(e)!==null}function T(e){let t=je[e];if(t!==void 0)return t;let n=w(e);return n?n.count*C[n.unit]:NaN}function Ie(e,t){let n=new Date(e),r=T(t);return r>=864e5?n.toLocaleDateString(void 0,{month:`short`,day:`numeric`}):r>=36e5?n.toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`}):n.toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function Le(e,t){let n=T(t);return Math.floor(e/n)*n}function Re(e,t){if(t===null){let t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hours:t.getHours(),minutes:t.getMinutes()}}let n=new Date(e+S(t,e)*6e4);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hours:n.getUTCHours(),minutes:n.getUTCMinutes()}}function ze(e){return e.hours===0&&e.minutes===0}var Be=20*36e5;function Ve(e){let t=Math.min(e.length,64);if(t<2)return;let n=ce(e),r=1/0;for(let i=1;i<t;i++){let t=Math.abs(e[i].time-e[i-1].time)*n;t>0&&t<r&&(r=t)}return r===1/0?void 0:r>=Be}function He(e,t=Date.now()){let n=S(e,t),r=n>=0?`+`:`-`,i=Math.abs(n),a=Math.floor(i/60),o=i%60;return o===0?`UTC${r}${a}`:`UTC${r}${a}:${String(o).padStart(2,`0`)}`}var Ue=Date.UTC(1970,0,5);function We(e,t,n=1){let{count:r,unit:i}=w(t)??{count:1,unit:`m`};if(i===`s`||i===`m`||i===`h`||i===`d`){let t=r*C[i];return Math.floor(e/t)*t}let a=new Date(e);if(i===`w`){let e=C.d,t=(a.getUTCDay()-n+7)%7,i=Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()-t);if(r<=1)return i;let o=Math.floor((i-Ue)/(7*e));return Ue+Math.floor(o/r)*r*7*e}let o=a.getUTCFullYear()*12+a.getUTCMonth(),s=Math.floor(o/r)*r;return Date.UTC(Math.floor(s/12),s%12,1)}var Ge=64,E=new Map;function Ke(e,t){let n=`${e}|${t}`,r=E.get(n);return r||(E.size>=Ge&&E.clear(),r=new Intl.NumberFormat(e,{minimumFractionDigits:t,maximumFractionDigits:t}),E.set(n,r)),r}function qe(e,t,n){return t.formatPrice?t.formatPrice(e):D(e,n??Je(t.priceRange.min,t.priceRange.max),t.numberLocale??`en-US`)}function D(e,t=2,n=`en-US`){return Ke(n,t).format(e)}function Je(e,t){if(!(t>e)||!Number.isFinite(e)||!Number.isFinite(t))return 2;let n=oe(e,t,8);return n>0&&n<1?Math.ceil(-Math.log10(n))+1:2}function Ye(e,t,n,r=2,i=`en-US`){if((t===`percentage`||t===`indexedTo100`)&&n&&n!==0){if(t===`percentage`){let t=(e/n-1)*100;return`${t>0?`+`:``}${t.toFixed(2)}%`}return D(e/n*100,2,i)}return D(e,r,i)}function Xe(e,t,n=1){let r=Number.isInteger(n)&&n>1?n:1;if(!Number.isFinite(e)||!Number.isInteger(t)||t<2)return String(e);let i=t*r,a=Math.round(Math.abs(e)*i),o=Math.floor(a/i),s=a-o*i,c=Math.floor(s/r),l=String(t-1).length,u=r>1?String(Math.floor((s-c*r)/r*10)):``;return`${e<0&&a>0?`-`:``}${o}'${String(c).padStart(l,`0`)}${u}`}function Ze(e){if(!Number.isInteger(e.denominator)||e.denominator<2)return null;let t=Number.isInteger(e.subDenominator)&&(e.subDenominator??0)>1?e.subDenominator:1;return 1/(e.denominator*t)}function Qe(e){return e?typeof e==`function`?e:Ze(e)===null?null:t=>Xe(t,e.denominator,e.subDenominator):null}function $e(e){return e>=1e9?(e/1e9).toFixed(2)+`B`:e>=1e6?(e/1e6).toFixed(2)+`M`:e>=1e3?(e/1e3).toFixed(2)+`K`:e.toFixed(0)}function et(e){let t=0;for(let n of e){let e=n.toString(),r=e.indexOf(`.`);r>=0&&(t=Math.max(t,e.length-r-1))}return Math.min(t,8)}var tt=[`close`,`open`,`high`,`low`,`hl2`,`hlc3`,`ohlc4`,`hlcc4`];function nt(e){return typeof e==`string`&&tt.includes(e)}function rt(e,t){switch(t){case`open`:return e.open;case`high`:return e.high;case`low`:return e.low;case`hl2`:return(e.high+e.low)/2;case`hlc3`:return(e.high+e.low+e.close)/3;case`ohlc4`:return(e.open+e.high+e.low+e.close)/4;case`hlcc4`:return(e.high+e.low+2*e.close)/4;default:return e.close}}var it=/^ind:([^:]+):(.+)$/;function at(e,t){return`ind:${e}:${t}`}function ot(e){if(typeof e!=`string`)return null;let t=it.exec(e);return t?{instanceId:t[1],key:t[2]}:null}var st=864e5;function ct(e,t,n=1){let r=[],i=null;for(let a of e){let e=We(a.time,t,n);i===null||e!==i.time?(i={time:e,open:a.open,high:a.high,low:a.low,close:a.close,volume:a.volume},r.push(i)):(a.high>i.high&&(i.high=a.high),a.low<i.low&&(i.low=a.low),i.close=a.close,i.volume+=a.volume)}return r}var O=e=>e===`s`||e===`m`||e===`h`||e===`d`;function lt(e,t){let n=w(e),r=w(t);if(!n||!r)return!1;let i=T(e);return n.unit===`d`&&n.count>1?!1:O(r.unit)?O(n.unit)&&T(t)%i===0:n.unit===r.unit?r.count%n.count===0:O(n.unit)&&st%i===0}function ut(e,t){let n=null,r=0;for(let i of t){if(!lt(i,e))continue;let t=T(i);t>r&&(n=i,r=t)}return n}function dt(e,t){if(!e)return 0;if(e===t)return 1e3;if(e.startsWith(t))return 600-Math.min(100,e.length-t.length);let n=e.indexOf(t);return n>=0?300-Math.min(100,n):0}function ft(e,t,n=50,r){let i=t.trim().toUpperCase();if(!i)return e.slice(0,n);let a=[];for(let t of e){let e=Math.max(dt(t.symbol.toUpperCase(),i),dt((t.description??``).toUpperCase(),i)*.8);e>0&&a.push({info:t,score:e+(r?.(t)??0)})}return a.sort((e,t)=>t.score-e.score||e.info.symbol.localeCompare(t.info.symbol)),a.slice(0,n).map(e=>e.info)}function pt(e){let t=typeof e==`number`?e:Number(e);if(!Number.isFinite(t)||t<=0)return 0;for(let e=0;e<=12;e++){let n=t*10**e;if(Math.abs(n-Math.round(n))<1e-9*Math.max(1,n))return e}return 12}function mt(e){return e?.timeZone??e?.timezone}function k(e){let t=/^(\d{1,2}):(\d{2})$/.exec(e.trim());if(!t)return null;let n=Number(t[1]),r=Number(t[2]);return n===24&&r===0?1440:n<24&&r<60?n*60+r:null}var A=864e5,j=6e4,ht=8;function gt(e,t){let n=mt(e),r=(e?.sessions??[]).flatMap(e=>{let t=k(e.start),n=k(e.end);return t===null||n===null||t===n?[]:[{start:t,end:n,days:Array.isArray(e.days)?e.days:null}]});if(!n||!y(n)||r.length===0||!Number.isFinite(t))return{state:`always`,next:null};let i=b(n,t)*j,a=Math.floor((t+i)/A)*A,o=e=>e-b(n,e-b(n,e-i)*j)*j,s=[];for(let e=-1;e<=ht;e++){let t=a+e*A,n=(Math.floor(t/A)+4)%7;for(let e of r){if(e.days&&!e.days.includes(n))continue;let r=t+e.start*j,i=(e.end>e.start?t:t+A)+e.end*j;s.push([o(r),o(i)])}}s.sort((e,t)=>e[0]-t[0]);let c=[];for(let[e,t]of s){let n=c[c.length-1];n&&e<=n[1]?c[c.length-1]=[n[0],Math.max(n[1],t)]:c.push([e,t])}let l=c.find(([e,n])=>e<=t&&t<n);if(l)return{state:`open`,next:l[1]};let u=c.find(([e])=>e>t);return{state:`closed`,next:u?u[0]:null}}var _t=48,vt=2e3,yt=1e4;function bt(e){if(!Array.isArray(e))return;let t=[];for(let n of e){if(t.length>=_t)break;if(typeof n!=`object`||!n)continue;let{value:e,visible:r,color:i}=n;if(typeof e!=`number`||!Number.isFinite(e)||Math.abs(e)>yt||r!==void 0&&typeof r!=`boolean`)continue;let a={value:e,visible:r??!0};typeof i==`string`&&i&&(a.color=i),t.push(a)}return t}function xt(e,t){switch(e.kind){case`boolean`:return typeof t==`boolean`?t:void 0;case`number`:return typeof t!=`number`||!Number.isFinite(t)?void 0:Math.min(e.max??1/0,Math.max(e.min??-1/0,t));case`choice`:return typeof t==`string`&&e.choices.some(e=>e.value===t)?t:void 0;case`levels`:return bt(t);case`text`:return typeof t==`string`?t.slice(0,vt):void 0}}function St(e,t){if(!e||typeof t!=`object`||!t)return{};let n={};for(let[r,i]of Object.entries(t)){let t=e[r];if(!t)continue;let a=xt(t,i);a!==void 0&&(n[r]=a)}return n}function Ct(e){return Array.isArray(e)?e.map(e=>({...e})):e}function wt(e,t,n){let r=e?.[n];return r?Ct((t&&n in t?xt(r,t[n]):void 0)??r.default):t?.[n]}function Tt(e,t){let n={};for(let r of Object.keys(e??{}))n[r]=wt(e,t,r);return n}var Et=[`solid`,`dashed`,`dotted`],Dt=64,Ot=2e3,kt=20,At=200;function M(e,t,n){return typeof e==`number`&&Number.isFinite(e)?Math.min(n,Math.max(t,e)):void 0}function jt(e){return typeof e==`string`&&e.length>0&&e.length<=Dt?e:void 0}function Mt(e){if(typeof e!=`object`||!e)return{};let t=e,n={},r=jt(t.color);r!==void 0&&(n.color=r);let i=M(t.lineWidth,.5,kt);i!==void 0&&(n.lineWidth=i),Et.includes(t.lineStyle)&&(n.lineStyle=t.lineStyle);let a=jt(t.fillColor);a!==void 0&&(n.fillColor=a);let o=M(t.fillOpacity,0,1);o!==void 0&&(n.fillOpacity=o);let s=M(t.fontSize,6,At);return s!==void 0&&(n.fontSize=s),typeof t.text==`string`&&(n.text=t.text.slice(0,Ot)),n}var N=e=>typeof e==`number`&&Number.isFinite(e)&&e>0,P=(e,t,n)=>typeof e==`number`&&Number.isInteger(e)&&e>=t&&e<=n,F=e=>typeof e==`object`&&!!e&&!Array.isArray(e);function Nt(e){if(!F(e))return{};let t={};if(F(e.renko)){let{boxSize:n,atrPeriod:r}=e.renko;t.renko={...N(n)||n===`atr`?{boxSize:n}:{},...P(r,1,500)?{atrPeriod:r}:{}}}if(F(e.lineBreak)){let{lines:n}=e.lineBreak;t.lineBreak=P(n,1,10)?{lines:n}:{}}if(F(e.kagi)){let{reversal:n,reversalType:r}=e.kagi;t.kagi={...N(n)?{reversal:n}:{},...r===`percent`||r===`price`?{reversalType:r}:{}}}if(F(e.pointAndFigure)){let{boxSize:n,reversal:r}=e.pointAndFigure;t.pointAndFigure={...N(n)||n===`auto`?{boxSize:n}:{},...P(r,1,10)?{reversal:r}:{}}}if(F(e.rangeBars)){let{range:n}=e.rangeBars;t.rangeBars=N(n)||n===`auto`?{range:n}:{}}return t}var Pt=`'Cascadia Mono', 'SF Mono', ui-monospace, Menlo, Consolas, monospace`,Ft={family:Pt,sizeSmall:11,sizeMedium:13,sizeLarge:15},I={amber:`#f2a93b`,up:`#1c9e6d`,down:`#e8505b`,ochre:`#c07c12`,blue:`#4688fa`,violet:`#9c73f8`,cyan:`#1398a8`,rose:`#e25592`,neutral:`#7d8696`,ink:`#131416`},It=.22;function L(e){return h(e,It)}var Lt=`#fbfaf6`,R=`#1b1d21`,Rt=`#131416`,z=`#e6e3dc`,zt=`#1f7a5c`,Bt=`#b8423f`,Vt=`#4fae8a`,Ht=`#e2706b`,Ut=`#6a6966`,Wt=`#8d8a84`,Gt=[I.blue,I.ochre,I.violet,I.cyan,I.rose],Kt={name:`dark`,background:Rt,text:z,textSecondary:`#8d8b86`,grid:`#1d1e21`,crosshair:Ut,candleUp:Vt,candleDown:Ht,candleUpWick:Vt,candleDownWick:Ht,lineColor:z,areaTopColor:h(z,.14),areaBottomColor:h(z,0),volumeUp:h(z,.14),volumeDown:h(z,.08),axisLine:`#2a2b2f`,axisLabel:`#a9a6a0`,axisLabelBackground:`#232427`,font:Ft},qt={name:`light`,background:Lt,text:R,textSecondary:`#6b6f76`,grid:`#ece8df`,crosshair:Wt,candleUp:zt,candleDown:Bt,candleUpWick:zt,candleDownWick:Bt,lineColor:R,areaTopColor:h(R,.12),areaBottomColor:h(R,0),volumeUp:h(R,.13),volumeDown:h(R,.08),axisLine:`#cfcac0`,axisLabel:`#4a4e57`,axisLabelBackground:`#eeebe3`,font:Ft},B={name:`terminal`,background:`#0E0E0E`,text:`#C0C0C0`,textSecondary:`#8A8A8A`,grid:`#1A1A1A`,crosshair:`#666666`,candleUp:`#00FF87`,candleDown:`#FF3B4D`,candleUpWick:`#00FF87`,candleDownWick:`#FF3B4D`,lineColor:`#3D8BFD`,areaTopColor:`rgba(61, 139, 253, 0.3)`,areaBottomColor:`rgba(61, 139, 253, 0.0)`,volumeUp:L(`#00FF87`),volumeDown:L(`#FF3B4D`),axisLine:`#1A1A1A`,axisLabel:`#8A8A8A`,axisLabelBackground:`#1A1A1A`,font:{family:`'Roboto Mono', 'JetBrains Mono', 'SF Mono', Consolas, monospace`,sizeSmall:10,sizeMedium:12,sizeLarge:14}},Jt=new Set([B.volumeUp,B.volumeDown]);function V(e){let t=(e,t)=>{if(!Jt.has(e))return e;let n=L(t);return n===t?e:n};return{up:t(e.volumeUp,e.candleUp),down:t(e.volumeDown,e.candleDown)}}var Yt=[`solid`,`dashed`,`dotted`],Xt=20,Zt=64,Qt=2,$t=[/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,/^[a-z]{3,30}$/i,/^(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color)\([0-9a-z.,%/\s-]*\)$/i];function en(e){return typeof e==`string`&&e.length<=Zt&&$t.some(t=>t.test(e.trim()))}function tn(e,t){switch(e){case`color`:return en(t);case`lineStyle`:return Yt.includes(t);case`width`:return typeof t==`number`&&Number.isFinite(t)&&t>0&&t<=Xt;case`boolean`:return typeof t==`boolean`}}function nn(e){return Object.prototype.hasOwnProperty.call(t,e)}function rn(e){let n={},r=[];if(typeof e!=`object`||!e||Array.isArray(e))return{overrides:{},rejected:r};for(let[i,a]of Object.entries(e))nn(i)?a===null?n[i]=null:tn(t[i],a)?n[i]=a:r.push(i):r.push(i);return{overrides:n,rejected:r}}function an(e){if(typeof e!=`object`||!e||Array.isArray(e))return null;let{background:t,separator:n}=e,r={...en(t)?{background:t}:{},...en(n)?{separator:n}:{}};return Object.keys(r).length>0?r:null}var on=/^[A-Za-z0-9_]{1,32}$/;function sn(e){if(typeof e!=`object`||!e||Array.isArray(e))return;let t={};for(let[n,r]of Object.entries(e)){if(!on.test(n)||typeof r!=`object`||!r)continue;let{lineStyle:e,visible:i}=r,a={...Yt.includes(e)?{lineStyle:e}:{},...typeof i==`boolean`?{visible:i}:{}};Object.keys(a).length>0&&(t[n]=a)}return Object.keys(t).length>0?t:void 0}function cn(e,t,n=1){return e===`solid`?[]:e===`dotted`?[n,n*2]:[...t]}function ln(e,t,n){let r=e=>t(`series.${n}.${e}`),i=r(`upColor`)??t(`series.candlestick.upColor`),a=r(`downColor`)??t(`series.candlestick.downColor`),o=i??e.candleUp,s=a??e.candleDown;return{up:o,down:s,wickUp:r(`wickUpColor`)??t(`series.candlestick.wickUpColor`)??(i===void 0?e.candleUpWick:o),wickDown:r(`wickDownColor`)??t(`series.candlestick.wickDownColor`)??(a===void 0?e.candleDownWick:s),line:r(`color`)??r(`lineColor`)??t(`series.line.color`)??e.lineColor,lineWidth:r(`lineWidth`)??t(`series.line.lineWidth`)??Qt,top:r(`topColor`)??t(`series.area.topColor`)??e.areaTopColor,bottom:r(`bottomColor`)??t(`series.area.bottomColor`)??e.areaBottomColor}}function H(e,t,n){return{visible:e(`${t}.visible`)??n.visible,color:e(`${t}.color`)??n.color,style:e(`${t}.style`)??n.style,width:e(`${t}.width`)??n.width}}function un(e,t,n){let{style:r,...i}=e,a=n,o=e=>a[e],s=ln(i,o,t),c=o(`background.color`)??i.background,l=(e,t)=>o(e)??t,u=e=>o(e)??null,d={panes:{background:l(`panes.background`,c),separator:l(`panes.separatorColor`,i.axisLine),title:l(`panes.titleColor`,i.textSecondary)},grid:{horizontal:H(o,`grid.horizontal`,{visible:!0,color:i.grid,style:`solid`,width:1}),vertical:H(o,`grid.vertical`,{visible:!0,color:i.grid,style:`solid`,width:1})},crosshair:{horizontal:H(o,`crosshair.horizontal`,{visible:!0,color:i.crosshair,style:`solid`,width:1}),vertical:H(o,`crosshair.vertical`,{visible:!0,color:i.crosshair,style:`solid`,width:1}),labelBackground:l(`crosshair.labelBackground`,i.text),labelText:l(`crosshair.labelTextColor`,c)},axis:{price:{line:l(`axis.price.lineColor`,i.axisLine),text:l(`axis.price.textColor`,i.axisLabel)},time:{line:l(`axis.time.lineColor`,i.axisLine),text:l(`axis.time.textColor`,i.axisLabel)}},legend:{text:l(`legend.textColor`,i.text),label:l(`legend.labelColor`,i.textSecondary)},watermark:{color:o(`watermark.color`)??null},lastPrice:{visible:o(`lastPrice.visible`)??!0,up:l(`lastPrice.upColor`,s.up),down:l(`lastPrice.downColor`,s.down),style:o(`lastPrice.style`)??`solid`,width:o(`lastPrice.width`)??1},sessionBreaks:{color:o(`sessionBreaks.color`)??null,style:o(`sessionBreaks.style`)??null,width:o(`sessionBreaks.width`)??null},highLow:{color:o(`highLow.color`)??null},series:{lineWidth:s.lineWidth},trading:{buy:u(`trading.buyColor`),sell:u(`trading.sellColor`),profit:u(`trading.profitColor`),loss:u(`trading.lossColor`),entry:u(`trading.entryColor`)},markers:{long:u(`markers.longColor`),short:u(`markers.shortColor`),neutral:u(`markers.neutralColor`)},tradeZones:{profit:u(`tradeZones.profitColor`),loss:u(`tradeZones.lossColor`),active:u(`tradeZones.activeColor`)},drawings:{handle:u(`drawings.handleColor`)}};return{...i,background:c,candleUp:s.up,candleDown:s.down,candleUpWick:s.wickUp,candleDownWick:s.wickDown,lineColor:s.line,areaTopColor:s.top,areaBottomColor:s.bottom,volumeUp:l(`volume.upColor`,i.volumeUp),volumeDown:l(`volume.downColor`,i.volumeDown),style:d}}var dn={"background.color":e=>e.background,"panes.background":(e,t)=>t.panes.background,"panes.separatorColor":(e,t)=>t.panes.separator,"panes.titleColor":(e,t)=>t.panes.title,"crosshair.labelBackground":(e,t)=>t.crosshair.labelBackground,"crosshair.labelTextColor":(e,t)=>t.crosshair.labelText,"axis.price.lineColor":(e,t)=>t.axis.price.line,"axis.price.textColor":(e,t)=>t.axis.price.text,"axis.time.lineColor":(e,t)=>t.axis.time.line,"axis.time.textColor":(e,t)=>t.axis.time.text,"legend.textColor":(e,t)=>t.legend.text,"legend.labelColor":(e,t)=>t.legend.label,"watermark.color":(e,t)=>t.watermark.color,"lastPrice.visible":(e,t)=>t.lastPrice.visible,"lastPrice.upColor":(e,t)=>t.lastPrice.up,"lastPrice.downColor":(e,t)=>t.lastPrice.down,"lastPrice.style":(e,t)=>t.lastPrice.style,"lastPrice.width":(e,t)=>t.lastPrice.width,"volume.upColor":e=>V(e).up,"volume.downColor":e=>V(e).down,"sessionBreaks.color":(e,t)=>t.sessionBreaks.color,"sessionBreaks.style":(e,t)=>t.sessionBreaks.style,"sessionBreaks.width":(e,t)=>t.sessionBreaks.width,"highLow.color":(e,t)=>t.highLow.color,"trading.buyColor":(e,t)=>t.trading.buy,"trading.sellColor":(e,t)=>t.trading.sell,"trading.profitColor":(e,t)=>t.trading.profit,"trading.lossColor":(e,t)=>t.trading.loss,"trading.entryColor":(e,t)=>t.trading.entry,"markers.longColor":(e,t)=>t.markers.long,"markers.shortColor":(e,t)=>t.markers.short,"markers.neutralColor":(e,t)=>t.markers.neutral,"tradeZones.profitColor":(e,t)=>t.tradeZones.profit,"tradeZones.lossColor":(e,t)=>t.tradeZones.loss,"tradeZones.activeColor":(e,t)=>t.tradeZones.active,"drawings.handleColor":(e,t)=>t.drawings.handle},fn={visible:`visible`,color:`color`,style:`style`,width:`width`};function pn(e,t,n,r=`candlestick`){let i=n.split(`.`);if(i[0]===`series`){let n=ln(e,e=>t[e],i[1]);switch(i[2]){case`upColor`:return n.up;case`downColor`:return n.down;case`wickUpColor`:return n.wickUp;case`wickDownColor`:return n.wickDown;case`color`:case`lineColor`:return n.line;case`lineWidth`:return n.lineWidth;case`topColor`:return n.top;case`bottomColor`:return n.bottom}}let a=un(e,r,t),o=a.style;return i[0]===`grid`||i[0]===`crosshair`&&(i[1]===`horizontal`||i[1]===`vertical`)?(i[0]===`grid`?o.grid:o.crosshair)[i[1]][fn[i[2]]]:dn[n]?.(a,o)??null}var mn={autoScale:!0,rightMargin:5,minBarSpacing:2,maxBarSpacing:30,grid:{visible:!0,hLineStyle:`solid`,vLineStyle:`solid`},crosshair:{mode:`magnet`}},hn=[`1s`,`1m`,`3m`,`5m`,`15m`,`30m`,`1h`,`2h`,`4h`,`6h`,`8h`,`12h`,`1d`,`3d`,`1w`,`1M`],gn=[`1m`,`5m`,`15m`,`30m`,`1h`,`2h`,`4h`,`1d`,`1w`,`1M`,`3M`,`6M`,`12M`],_n=[`1m`,`5m`,`15m`,`30m`,`1h`,`4h`,`1d`,`1w`,`1M`],vn=[`1m`,`5m`,`15m`,`1h`,`4h`,`1d`,`1w`],yn=8,bn=2,xn=70,Sn=30,Cn=60,wn=120,Tn=(1+Math.sqrt(5))/2,En=[1,2,3,5,8,13,21,34,55,89];function Dn(e,t,n=1){return Math.round(e*Tn**(t/n))}var U={candlestick:`Candlestick`,line:`Line`,area:`Area`,bar:`OHLC Bar`,price:`Price`,volume:`Volume`,time:`Time`,open:`Open`,high:`High`,low:`Low`,close:`Close`,sma:`SMA`,ema:`EMA`,bollingerBands:`Bollinger Bands`,vwap:`VWAP`,ichimoku:`Ichimoku Cloud`,parabolicSAR:`Parabolic SAR`,supertrend:`Supertrend`,keltnerChannel:`Keltner Channel`,donchianChannel:`Donchian Channel`,rsi:`RSI`,macd:`MACD`,stochastic:`Stochastic`,atr:`ATR`,adx:`ADX`,obv:`OBV`,williamsR:`Williams %R`,cci:`CCI`,mfi:`MFI`,aroon:`Aroon`,roc:`ROC`,tsi:`TSI`,cmf:`CMF`,stddev:`Std Dev`,volumeProfile:`Volume Profile`,accumulationDistribution:`A/D Line`,vroc:`VROC`,trendLine:`Trend Line`,horizontalLine:`Horizontal Line`,verticalLine:`Vertical Line`,ray:`Ray`,extendedLine:`Extended Line`,parallelChannel:`Parallel Channel`,regressionChannel:`Regression Channel`,fibRetracement:`Fibonacci Retracement`,fibExtension:`Fibonacci Extension`,rectangle:`Rectangle`,ellipse:`Ellipse`,triangle:`Triangle`,pitchfork:`Andrews' Pitchfork`,elliottWave:`Elliott Wave`,priceRange:`Price Range`,dateRange:`Date Range`,measure:`Measure`,textTool:`Text`,arrow:`Arrow`,clearAll:`Clear All`,buy:`Buy`,sell:`Sell`,buyLimit:`Buy Limit`,sellLimit:`Sell Limit`,buyStop:`Buy Stop`,sellStop:`Sell Stop`,stopLoss:`Stop Loss`,takeProfit:`Take Profit`,market:`Market`,limit:`Limit`,stop:`Stop`,cancel:`Cancel`,modify:`Modify`,quantity:`Qty`,pnl:`P&L`,activeOrders:`Active Orders`,positions:`Positions`,noOrders:`No active orders`,noPositions:`No open positions`,placeOrder:`Place Order`,rightClickToTrade:`Right-click chart to place orders`,ceiling:`Ceiling`,floor:`Floor`,reference:`Reference`,session:`Session`,preOpen:`Pre-Open`,continuous:`Continuous`,preClose:`Pre-Close`,closed:`Closed`,settings:`Settings`,theme:`Theme`,darkTheme:`Dark`,lightTheme:`Light`,tools:`Tools`,indicators:`Indicators`,overlays:`Overlays`,panels:`Panels`,orders:`Orders`,autoScale:`Auto Scale`,crosshair:`Crosshair`,grid:`Grid`,loading:`Loading...`,error:`Error`,numberDecimalSeparator:`.`,numberGroupSeparator:`,`},On={candlestick:`Nến`,line:`Đường`,area:`Vùng`,bar:`Thanh OHLC`,price:`Giá`,volume:`Khối lượng`,time:`Thời gian`,open:`Mở`,high:`Cao`,low:`Thấp`,close:`Đóng`,sma:`SMA`,ema:`EMA`,bollingerBands:`Dải Bollinger`,vwap:`VWAP`,ichimoku:`Mây Ichimoku`,parabolicSAR:`Parabolic SAR`,supertrend:`Supertrend`,keltnerChannel:`Kênh Keltner`,donchianChannel:`Kênh Donchian`,rsi:`RSI`,macd:`MACD`,stochastic:`Stochastic`,atr:`ATR`,adx:`ADX`,obv:`OBV`,williamsR:`Williams %R`,cci:`CCI`,mfi:`MFI`,aroon:`Aroon`,roc:`ROC`,tsi:`TSI`,cmf:`CMF`,stddev:`Độ lệch chuẩn`,volumeProfile:`Phân bổ KL`,accumulationDistribution:`Tích lũy/Phân phối`,vroc:`VROC`,trendLine:`Đường xu hướng`,horizontalLine:`Đường ngang`,verticalLine:`Đường dọc`,ray:`Tia`,extendedLine:`Đường kéo dài`,parallelChannel:`Kênh song song`,regressionChannel:`Kênh hồi quy`,fibRetracement:`Fibonacci thoái lui`,fibExtension:`Fibonacci mở rộng`,rectangle:`Hình chữ nhật`,ellipse:`Hình elip`,triangle:`Tam giác`,pitchfork:`Chĩa ba Andrews`,elliottWave:`Sóng Elliott`,priceRange:`Khoảng giá`,dateRange:`Khoảng thời gian`,measure:`Đo lường`,textTool:`Chữ`,arrow:`Mũi tên`,clearAll:`Xóa tất cả`,buy:`Mua`,sell:`Bán`,buyLimit:`Mua giới hạn`,sellLimit:`Bán giới hạn`,buyStop:`Mua chặn`,sellStop:`Bán chặn`,stopLoss:`Cắt lỗ`,takeProfit:`Chốt lời`,market:`Thị trường`,limit:`Giới hạn`,stop:`Dừng`,cancel:`Hủy`,modify:`Sửa`,quantity:`KL`,pnl:`Lãi/Lỗ`,activeOrders:`Lệnh chờ`,positions:`Vị thế`,noOrders:`Không có lệnh chờ`,noPositions:`Không có vị thế mở`,placeOrder:`Đặt lệnh`,rightClickToTrade:`Nhấp chuột phải để đặt lệnh`,ceiling:`Trần`,floor:`Sàn`,reference:`Tham chiếu`,session:`Phiên`,preOpen:`Trước giờ mở`,continuous:`Liên tục`,preClose:`Trước giờ đóng`,closed:`Đóng cửa`,settings:`Cài đặt`,theme:`Giao diện`,darkTheme:`Tối`,lightTheme:`Sáng`,tools:`Công cụ`,indicators:`Chỉ báo`,overlays:`Phủ lên`,panels:`Bảng`,orders:`Lệnh`,autoScale:`Tự co giãn`,crosshair:`Chữ thập`,grid:`Lưới`,loading:`Đang tải...`,error:`Lỗi`,numberDecimalSeparator:`,`,numberGroupSeparator:`.`},W=new Map([[`en`,U],[`vi`,On]]),G=`en`,kn=U;function An(e){G=e,kn=W.get(e)??U}function jn(){return G}function Mn(e){return kn[e]??U[e]??e}function Nn(e,t){W.set(e,t)}function Pn(e){return W.get(e??G)??U}function K(e,t=2,n){let r=W.get(n??G)??U,i=r.numberDecimalSeparator,a=r.numberGroupSeparator,[o,s]=e.toFixed(t).split(`.`),c=o.startsWith(`-`),l=c?o.slice(1):o,u=``;for(let e=l.length-1,t=0;e>=0;e--,t++)t>0&&t%3==0&&(u=a+u),u=l[e]+u;return c&&(u=`-`+u),s?u+i+s:u}function Fn(e){return K(e,0,`vi`)}function In(e,t){return e>=1e9?K(e/1e9,2,t??G)+`B`:e>=1e6?K(e/1e6,2,t??G)+`M`:e>=1e3?K(e/1e3,2,t??G)+`K`:K(e,0,t??G)}var q={up:`#22C55E`,down:`#EF4444`,unchanged:`#EAB308`,ceiling:`#D946EF`,floor:`#06B6D4`,reference:`#EAB308`},J=`Asia/Ho_Chi_Minh`,Ln=[{name:`ATO`,startTime:`09:00`,endTime:`09:15`,type:`preOpen`},{name:`Phiên 1`,startTime:`09:15`,endTime:`11:30`,type:`continuous`},{name:`Nghỉ trưa`,startTime:`11:30`,endTime:`13:00`,type:`closed`},{name:`Phiên 2`,startTime:`13:00`,endTime:`14:30`,type:`continuous`},{name:`ATC`,startTime:`14:30`,endTime:`14:45`,type:`preClose`}],Rn=[{name:`Phiên 1`,startTime:`09:15`,endTime:`11:30`,type:`continuous`},{name:`Nghỉ trưa`,startTime:`11:30`,endTime:`13:00`,type:`closed`},{name:`Phiên 2`,startTime:`13:00`,endTime:`14:30`,type:`continuous`},{name:`ATC`,startTime:`14:30`,endTime:`14:45`,type:`preClose`},{name:`PLO`,startTime:`14:45`,endTime:`15:00`,type:`postClose`}],zn=[{name:`Phiên 1`,startTime:`09:15`,endTime:`11:30`,type:`continuous`},{name:`Nghỉ trưa`,startTime:`11:30`,endTime:`13:00`,type:`closed`},{name:`Phiên 2`,startTime:`13:00`,endTime:`14:30`,type:`continuous`}],Bn=[{name:`ATO`,startTime:`08:45`,endTime:`09:00`,type:`preOpen`},{name:`Phiên 1`,startTime:`09:00`,endTime:`11:30`,type:`continuous`},{name:`Nghỉ trưa`,startTime:`11:30`,endTime:`13:00`,type:`closed`},{name:`Phiên 2`,startTime:`13:00`,endTime:`14:30`,type:`continuous`},{name:`ATC`,startTime:`14:30`,endTime:`14:45`,type:`preClose`}],Vn={type:`stock`,exchange:`HOSE`,currency:`VND`,pricePrecision:2,volumeUnit:100,priceStep:.01,priceSteps:[{from:0,step:.01},{from:10,step:.05},{from:50,step:.1}],timeZone:J,priceLimits:{enabled:!0,ceilingPercent:7,floorPercent:7},sessions:Ln,colorScheme:q},Hn={...Vn,priceSteps:void 0},Un={type:`stock`,exchange:`HNX`,currency:`VND`,pricePrecision:1,volumeUnit:100,priceStep:.1,timeZone:J,priceLimits:{enabled:!0,ceilingPercent:10,floorPercent:10},sessions:Rn,colorScheme:q},Wn={type:`stock`,exchange:`UPCOM`,currency:`VND`,pricePrecision:1,volumeUnit:100,priceStep:.1,timeZone:J,priceLimits:{enabled:!0,ceilingPercent:15,floorPercent:15},sessions:zn,colorScheme:q},Gn={type:`futures`,exchange:`HNX`,currency:`VND`,pricePrecision:1,volumeUnit:1,priceStep:.1,contractMultiplier:1e5,timeZone:J,priceLimits:{enabled:!0,ceilingPercent:7,floorPercent:7},sessions:Bn,colorScheme:q},Kn={type:`crypto`,currency:`USDT`,pricePrecision:2,priceLimits:{enabled:!1}},qn={type:`stock`,exchange:`NYSE`,currency:`USD`,pricePrecision:2,priceStep:.01,timeZone:`America/New_York`,priceLimits:{enabled:!1},sessions:[{name:`Pre-Market`,startTime:`04:00`,endTime:`09:30`,type:`preOpen`},{name:`Regular`,startTime:`09:30`,endTime:`16:00`,type:`continuous`},{name:`After-Hours`,startTime:`16:00`,endTime:`20:00`,type:`postClose`}]};function Jn(e){return{...e,candleUp:q.up,candleDown:q.down,candleUpWick:q.up,candleDownWick:q.down}}var Y=1e-9;function Yn(e,t){let n=t.priceStep;for(let r of t.priceSteps??[])e+Y>=r.from&&(n=r.step);return n!==void 0&&n>0?n:void 0}function Xn(e,t){let n=t.priceStep;for(let r of t.priceSteps??[])e-Y>r.from&&(n=r.step);return n!==void 0&&n>0?n:void 0}function X(e,t,n=`nearest`){let r=Yn(e,t);if(r===void 0||!Number.isFinite(e))return e;let i=e/r,a=n===`down`?Math.floor(i+Y):n===`up`?Math.ceil(i-Y):Math.round(i);return Number((a*r).toFixed(pt(r)))}function Zn(e,t){if(!t.priceLimits?.enabled||!t.priceLimits.ceilingPercent)return null;let n=t.priceLimits.ceilingPercent/100,r=(t.priceLimits.floorPercent??t.priceLimits.ceilingPercent)/100,i=e,a=i*(1+n),o=i*(1-r),s=Yn(i,t);if(s===void 0)return{ceiling:a,floor:o,reference:i};let c=X(i+s,t);if(Math.abs(i-s)<Y)return{ceiling:c,floor:i,reference:i};let l=X(a,t,`down`),u=X(o,t,`up`);return l<=i&&(l=c),u>=i&&(u=X(i-(Xn(i,t)??s),t)),u<=0&&(u=i),{ceiling:l,floor:u,reference:i}}var Z=(e,t)=>Math.round(e*t*1e9)/1e9;function Qn(e,t){let n=Math.round(Math.log10(t));return{...e,pricePrecision:e.pricePrecision===void 0?void 0:Math.max(0,e.pricePrecision-n),priceStep:e.priceStep===void 0?void 0:Z(e.priceStep,t),priceSteps:e.priceSteps?.map(e=>({from:Z(e.from,t),step:Z(e.step,t)})),priceLimits:e.priceLimits&&{...e.priceLimits,referencePrice:e.priceLimits.referencePrice===void 0?void 0:Z(e.priceLimits.referencePrice,t)}}}var $n=6e4,er=864e5;function tr(e,t){let n,r;if(t){let i=new Date(e+b(t,e)*$n);n=i.getUTCHours(),r=i.getUTCMinutes()}else{let t=new Date(e);n=t.getHours(),r=t.getMinutes()}return`${String(n).padStart(2,`0`)}:${String(r).padStart(2,`0`)}`}function nr(e,t=Date.now(),n){if(n!==void 0&&!y(n))return null;let r=tr(t,n);for(let t of e)if(r>=t.startTime&&r<t.endTime)return t;return null}var Q=e=>String(e).padStart(2,`0`),$=e=>{let t=new Date(e);return`${t.getUTCFullYear()}-${Q(t.getUTCMonth()+1)}-${Q(t.getUTCDate())}`},rr=4,ir=7*36e5;function ar(e,t,n){let r=Date.UTC(e,t-1,1),i=1+(rr-new Date(r).getUTCDay()+7)%7,a=Date.UTC(e,t-1,i+14),o=e=>{let t=new Date(e).getUTCDay();return t===0||t===6||(n?.($(e))??!1)};for(;o(a);)a-=er;return $(a)}function or(e,t){let n=$(e+ir),r=(e,n)=>({symbol:`VN30F${Q(e%100)}${Q(n)}`,year:e,month:n,lastTradingDay:ar(e,n,t)}),i=e=>e.month===12?r(e.year+1,1):r(e.year,e.month+1),a=new Date(e+ir),o=r(a.getUTCFullYear(),a.getUTCMonth()+1);n>o.lastTradingDay&&(o=i(o));let s=[o,i(o)],c=i(s[1]);for(;s.length<4;)c.month%3==0&&s.push(c),c=i(c);return s}var sr={cursor:{d:`M6 3.5L18.5 12.5L12.6 13.6L9.7 19.4z`},trendingUp:{d:`M3 17L9 11L13 14.5L21 6.5M15 6.5H21V12.5`},trendingDown:{d:`M3 7L9 13L13 9.5L21 17.5M15 17.5H21V11.5`},minus:{d:`M5 12H19`},plus:{d:`M12 5V19M5 12H19`},penLine:{d:`M14.5 5.5L18.5 9.5M4 20L5 15.5L15.8 4.7a2 2 0 0 1 2.83 0l.67.67a2 2 0 0 1 0 2.83L8.5 19z`},zigzag:{d:`M3 17L8 9L13 15L21 6`},hash:{d:`M5 9H19M5 15H19M10 4L8.5 20M15.5 4L14 20`},square:{d:`M6.5 4.5h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2h-11a2 2 0 0 1-2-2v-11a2 2 0 0 1 2-2z`},gitBranch:{d:`M6 3V15M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM18 9a9 9 0 0 1-9 9`},ruler:{d:`M3.5 16.5L16.5 3.5L20.5 7.5L7.5 20.5zM6.5 13.5L8 15M9.5 10.5L11.5 12.5M12.5 7.5L14 9`},type:{d:`M6 6V4.5H18V6M12 4.5V19.5M9.5 19.5H14.5`},magnet:{d:`M6 4V11a6 6 0 0 0 12 0V4M6 4h3.5v7a2.5 2.5 0 0 0 5 0V4H18M6 8h3.5M14.5 8H18`},magnetStrong:{d:`M6 4V11a6 6 0 0 0 12 0V4M6 4h3.5v7a2.5 2.5 0 0 0 5 0V4H18`,fills:[`M6 4h3.5v4H6z`,`M14.5 4H18v4h-3.5z`]},eraser:{d:`M8.5 19.5L3.9 14.9a1.5 1.5 0 0 1 0-2.1l8.5-8.5a1.5 1.5 0 0 1 2.1 0l5.2 5.2a1.5 1.5 0 0 1 0 2.1L12 19.5zM8 9l7 7M12 19.5H20`},zoomIn:{d:`M16.5 10.5a6 6 0 1 1-12 0 6 6 0 0 1 12 0zM15 15L20.5 20.5M10.5 7.5V13.5M7.5 10.5H13.5`},undo:{d:`M9 14L4 9L9 4M4 9H14.5a5.5 5.5 0 0 1 0 11H11`},redo:{d:`M15 14L20 9L15 4M20 9H9.5a5.5 5.5 0 0 0 0 11H13`},trash:{d:`M4 7H20M9.5 7V4.5h5V7M6.5 7l.8 12.2A1.5 1.5 0 0 0 8.8 20.6h6.4a1.5 1.5 0 0 0 1.5-1.4L17.5 7M10 11v6M14 11v6`},camera:{d:`M4.5 7.5h3L9 5h6l1.5 2.5h3A1.5 1.5 0 0 1 21 9v9.5a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 3 18.5V9a1.5 1.5 0 0 1 1.5-1.5zM15.5 13.5a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0z`},settings:{d:`M4 7H14M18 7H20M4 17H8M12 17H20M18 7a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM12 17a2 2 0 1 1-4 0 2 2 0 0 1 4 0z`},moon:{d:`M20 14.5A8 8 0 1 1 9.5 4a6.5 6.5 0 0 0 10.5 10.5z`},sun:{d:`M16 12a4 4 0 1 1-8 0 4 4 0 0 1 8 0zM12 2.5v2M12 19.5v2M4.6 4.6l1.4 1.4M18 18l1.4 1.4M2.5 12h2M19.5 12h2M4.6 19.4L6 18M18 6l1.4-1.4`},chevronDown:{d:`M6 9L12 15L18 9`},chevronUp:{d:`M6 15L12 9L18 15`},barChart:{d:`M5 20V13M12 20V5M19 20V10`},x:{d:`M6 6L18 18M18 6L6 18`},play:{d:`M7 4.5v15L19.5 12z`},pause:{d:`M8 5V19M16 5V19`},stop:{d:`M7.5 6h9A1.5 1.5 0 0 1 18 7.5v9a1.5 1.5 0 0 1-1.5 1.5h-9A1.5 1.5 0 0 1 6 16.5v-9A1.5 1.5 0 0 1 7.5 6z`},receipt:{d:`M6 3.5h12v17l-2-1.25-2 1.25-2-1.25-2 1.25-2-1.25-2 1.25zM9 8h6M9 12h6M9 16h3`},bell:{d:`M6 16.5V11a6 6 0 0 1 12 0v5.5l1.5 2H4.5zM10 20.5a2.2 2.2 0 0 0 4 0`},layers:{d:`M12 3.5L21 8.5L12 13.5L3 8.5zM3 12.5L12 17.5L21 12.5M3 16.5L12 21.5L21 16.5`},list:{d:`M9 6.5H20M9 12H20M9 17.5H20`,dots:[[4.75,6.5,1.25],[4.75,12,1.25],[4.75,17.5,1.25]]},table:{d:`M5.5 4.5h13a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2h-13a2 2 0 0 1-2-2v-11a2 2 0 0 1 2-2zM3.5 9.5H20.5M3.5 14.5H20.5M10 9.5V19.5`},eye:{d:`M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12zM15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0z`},eyeOff:{d:`M4 4L20 20M9.9 5.8A9.6 9.6 0 0 1 12 5.5c6 0 9.5 6.5 9.5 6.5a16 16 0 0 1-2.3 3.1M6.6 7.1C3.9 8.9 2.5 12 2.5 12S6 18.5 12 18.5a9.3 9.3 0 0 0 4.7-1.3M10 10.1a3 3 0 0 0 4 4`},lock:{d:`M7 10.5h10a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2zM8 10.5V7.5a4 4 0 0 1 8 0v3`},unlock:{d:`M7 10.5h10a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2zM8 10.5V7.5a4 4 0 0 1 7.7-1.5`},palette:{d:`M12 3.5a8.5 8.5 0 0 0 0 17c1.1 0 1.6-.8 1.6-1.6 0-.5-.2-.9-.5-1.2a1.6 1.6 0 0 1 1.2-2.7h1.9a4.3 4.3 0 0 0 4.3-4.3C20.5 6.9 16.7 3.5 12 3.5z`,dots:[[7.5,11.5,1.25],[9.5,7.75,1.25],[14,7.25,1.25]]},check:{d:`M5 12.5L10 17.5L19 7`},maximize:{d:`M8 4H5a1 1 0 0 0-1 1v3M16 4h3a1 1 0 0 1 1 1v3M20 16v3a1 1 0 0 1-1 1h-3M8 20H5a1 1 0 0 1-1-1v-3`},minimize:{d:`M4 8h3a1 1 0 0 0 1-1V4M16 4v3a1 1 0 0 0 1 1h3M20 16h-3a1 1 0 0 0-1 1v3M8 20v-3a1 1 0 0 0-1-1H4`},repeat:{d:`M17 3.5L20.5 7L17 10.5M3.5 11.5V10a3 3 0 0 1 3-3h14M7 20.5L3.5 17L7 13.5M20.5 12.5V14a3 3 0 0 1-3 3h-14`},info:{d:`M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0zM12 11V16.5`,dots:[[12,7.75,1.25]]},chevronLeft:{d:`M15 5L8 12L15 19`},chevronRight:{d:`M9 5L16 12L9 19`},reset:{d:`M4.5 12a7.5 7.5 0 1 0 2.2-5.3M4.5 4v4.5H9`},calendar:{d:`M5.5 5h13a2 2 0 0 1 2 2v11.5a2 2 0 0 1-2 2h-13a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2zM3.5 10H20.5M8 3V7M16 3V7`},star:{d:`M12 3.5L14.6 9L20.5 9.6L16 13.6L17.3 19.5L12 16.5L6.7 19.5L8 13.6L3.5 9.6L9.4 9z`},pin:{d:`M8 3.5h8M9.5 3.5v5.5L5.5 14h13l-4-5v-5.5M12 14v6.5`},search:{d:`M16.5 10.5a6 6 0 1 1-12 0 6 6 0 0 1 12 0zM15 15L20.5 20.5`},enter:{d:`M19 5v6.5a3 3 0 0 1-3 3H5.5M9.5 10L5 14.5L9.5 19`},stepBack:{d:`M6 5v14M18.5 5.5v13L8.5 12z`},stepForward:{d:`M18 5v14M5.5 5.5v13l10-6.5z`},ladder:{d:`M4 6H11M13 6H17M6 10H11M13 10H20M8 14H11M13 14H15M5 18H11M13 18H19`},save:{d:`M5.5 3.5h10.5l4.5 4.5v10.5a2 2 0 0 1-2 2h-13a2 2 0 0 1-2-2v-13a2 2 0 0 1 2-2zM8 3.5v5h7v-5M7.5 20.5v-6h9v6`},folder:{d:`M3.5 7a2 2 0 0 1 2-2h4l2 2.5h7a2 2 0 0 1 2 2V17a2 2 0 0 1-2 2h-13a2 2 0 0 1-2-2z`},link:{d:`M10 14a4 4 0 0 0 5.66 0l3-3a4 4 0 0 0-5.66-5.66l-1.2 1.2M14 10a4 4 0 0 0-5.66 0l-3 3a4 4 0 0 0 5.66 5.66l1.2-1.2`},arrowUp:{d:`M12 19V5M6 11L12 5L18 11`},arrowDown:{d:`M12 5V19M6 13L12 19L18 13`},arrowUpDown:{d:`M8.5 19V5M5 8.5L8.5 5L12 8.5M15.5 5V19M12 15.5L15.5 19L19 15.5`},more:{dots:[[6,12,1.6],[12,12,1.6],[18,12,1.6]]},layoutGrid:{d:`M5 4.5h4.5a.5.5 0 0 1 .5.5v4.5a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5zM14.5 4.5H19a.5.5 0 0 1 .5.5v4.5a.5.5 0 0 1-.5.5h-4.5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5zM5 14h4.5a.5.5 0 0 1 .5.5V19a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5v-4.5A.5.5 0 0 1 5 14zM14.5 14H19a.5.5 0 0 1 .5.5V19a.5.5 0 0 1-.5.5h-4.5a.5.5 0 0 1-.5-.5v-4.5a.5.5 0 0 1 .5-.5z`}},cr={trendLine:{d:`M5 18L19 6`,dots:[[5,18],[19,6]]},ray:{d:`M5 17L21 5M17.5 4.81L21 5L20.2 8.41`,dots:[[5,17],[11,12.5]]},extendedLine:{d:`M3 18.5L21 5M17.5 4.81L21 5L20.2 8.41M6.5 18.69L3 18.5L3.8 15.09`,dots:[[9,14],[15,9.5]]},infoLine:{d:`M5 20L19 10M4.5 3.5h9a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-9a1 1 0 0 1-1-1v-4a1 1 0 0 1 1-1zM6.5 6.5h5`,dots:[[5,20],[19,10]]},trendAngle:{d:`M5 18L19 7M5 18H20M11 18A6 6 0 0 0 9.71 14.29`,dots:[[5,18],[19,7]]},horizontalLine:{d:`M3 12H21`,dots:[[12,12]]},horizontalRay:{d:`M7 12H21M18.5 9.5L21 12L18.5 14.5`,dots:[[7,12]]},verticalLine:{d:`M12 3V21`,dots:[[12,12]]},crossLine:{d:`M3 12H21M12 3V21`,dots:[[12,12]]},parallelChannel:{d:`M3 15L15 5M9 19L21 9`,dots:[[3,15],[15,5],[9,19]]},regressionChannel:{d:`M3 12L21 4M3 20L21 12`,dash:`M3 16L21 8`,dots:[[3,16],[21,8]]},fibRetracement:{d:`M3 4H21M3 9H21M3 13H21M3 20H21`,dots:[[5,20],[19,4]]},fibExtension:{d:`M3 20L8 10L12 16M14 4H21M14 8H21M14 12H21`,dots:[[3,20],[8,10],[12,16]]},fibChannel:{d:`M3 9L21 3M3 13L21 7M3 16L21 10M3 21L21 15`,dots:[[3,21],[21,15],[3,9]]},fibTimeZones:{d:`M3 4V20M6 4V20M9.5 4V20M14 4V20M20.5 4V20`,dots:[[3,20],[6,20]]},fibSpeedResistanceFan:{d:`M4 20L20 4M4 20L20 11M4 20L20 16M4 20L11 4`,dash:`M4 4H20V20`,dots:[[4,20],[20,4]]},rectangle:{d:`M5.5 6h13A1.5 1.5 0 0 1 20 7.5v9a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 4 16.5v-9A1.5 1.5 0 0 1 5.5 6z`,dots:[[4,6],[20,18]]},circle:{d:`M19.5 12a7.5 7.5 0 1 1-15 0 7.5 7.5 0 0 1 15 0z`,dots:[[12,12],[19.5,12]]},ellipse:{d:`M20.5 12c0 3-3.8 5.5-8.5 5.5S3.5 15 3.5 12 7.3 6.5 12 6.5s8.5 2.5 8.5 5.5z`,dots:[[3.5,12],[20.5,12]]},triangle:{d:`M12 4.5L20 19H4z`,dots:[[12,4.5],[20,19],[4,19]]},pitchfork:{d:`M4 20L16.75 3M7 9L11.5 3M13 15L21 4.33M7 9L13 15`,dots:[[4,20],[7,9],[13,15]]},schiffPitchfork:{d:`M4 14.5L21 7.42M7 9L21 3.17M13 15L21 11.67M7 9L13 15`,dash:`M4 20V14.5`,dots:[[4,14.5],[7,9],[13,15]]},modifiedSchiffPitchfork:{d:`M5.5 14.5L21 5.89M7 9L17.8 3M13 15L21 10.56M7 9L13 15`,dash:`M4 20L5.5 14.5`,dots:[[5.5,14.5],[7,9],[13,15]]},gannFan:{d:`M4 20L20 4M4 20L20 12M4 20L12 4M4 20L20 16.5M4 20L7.5 4`,dots:[[4,20],[20,4]]},gannBox:{d:`M4 4H20V20H4zM4 20L20 4M4 4L20 20M12 4V20`,dots:[[4,20],[20,4]]},cyclicLines:{d:`M4 4V20M9 4V20M14 4V20M19 4V20`,dots:[[4,20],[9,20]]},xabcdPattern:{d:`M3 18L7 6L11 13L15 8L21 19`,dash:`M3 18L11 13L21 19`,dots:[[3,18],[7,6],[11,13],[15,8],[21,19]]},abcdPattern:{d:`M4 19L9 8L13 14L20 4`,dots:[[4,19],[9,8],[13,14],[20,4]]},headAndShoulders:{d:`M3 19L6 11L8.5 15L12 5L15.5 15L18 11L21 19`,dash:`M4.5 15H19.5`,dots:[[6,11],[12,5],[18,11]]},elliottWave:{d:`M3 19L6 13L8.5 16L14 6L16 10L21 4`,dots:[[3,19],[21,4]]},priceRange:{d:`M5 4H19M5 20H19M12 6.5V17.5M9 9.5L12 6.5L15 9.5M9 14.5L12 17.5L15 14.5`},dateRange:{d:`M4 5V19M20 5V19M6.5 12H17.5M9.5 9L6.5 12L9.5 15M14.5 9L17.5 12L14.5 15`},dateAndPriceRange:{d:`M6 18V4M3 7L6 4L9 7M6 18H20M17 15L20 18L17 21`,dash:`M6 4H20V18`},measure:{d:`M3.5 16.5L16.5 3.5L20.5 7.5L7.5 20.5zM6.5 13.5L8 15M9.5 10.5L11.5 12.5M12.5 7.5L14 9`},text:{d:`M6 6V4.5H18V6M12 4.5V19.5M9.5 19.5H14.5`},priceLabel:{d:`M9 5H19a1.5 1.5 0 0 1 1.5 1.5v11A1.5 1.5 0 0 1 19 19H9L3.5 12zM11 12H17`},arrow:{d:`M5 19L19 5M10 5H19V14`},riskReward:{d:`M5 12V4H19V12M3 12H21`,dash:`M5 12V18H19V12`,dots:[[5,12]]},anchoredVWAP:{d:`M4 18C9 17 12 10 20 7M4 20.5V18`,dots:[[4,18]]},volumeProfileRange:{d:`M6 7H12M6 10.5H17M6 14H15M6 17.5H10`,dash:`M3.5 4V20M20.5 4V20`,dots:[[3.5,20],[20.5,20]]},note:{d:`M5.5 4.5h13v9l-5 5h-8zM13.5 18.5v-5h5M8.5 8.5h7M8.5 11.5h4`},callout:{d:`M10.5 4h9a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1h-9a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zM12 12L5 19M12.5 8h5`,dots:[[5,19]]},flag:{d:`M6 21V4M6 4.5h11l-2.5 3.75L17 12H6`,soft:`M6 4.5h11l-2.5 3.75L17 12H6z`,dots:[[6,21]]},arrowMark:{d:`M12 4L18 11H14.5V20H9.5V11H6z`},icon:{d:`M12 3.5l2.6 5.3 5.9.85-4.25 4.15 1 5.85L12 16.9l-5.25 2.75 1-5.85L3.5 9.65l5.9-.85z`},brush:{d:`M3.5 17c2.5 0 3-5 6-5s2.5 5 5.5 5 3.5-6 5.5-9`},highlighter:{d:`M14.5 4.5l5 5L11 18H6v-5zM12 7l5 5M4 21h8`},path:{d:`M4 18L9 10L14 14L20 6M16.2 6.6L20 6L19.6 9.8`,dots:[[4,18],[9,10],[14,14]]},polyline:{d:`M5 17L8 6L16 4L20 14L12 20z`,soft:`M5 17L8 6L16 4L20 14L12 20z`,dots:[[5,17],[8,6],[16,4],[20,14],[12,20]]},curve:{d:`M4 18C8 4 16 4 20 18`,dots:[[4,18],[20,18],[12,7.5]]},arc:{d:`M4 17a8 8 0 0 1 16 0`,dots:[[4,17],[20,17],[12,9]]},fibCircles:{d:`M14 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM16.5 12a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0zM20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0z`,dots:[[12,12],[20,12]]},fibSpiral:{d:`M12 12a1.5 1.5 0 0 1 1.5 1.5 3 3 0 0 1-3 3A4.5 4.5 0 0 1 6 12a6 6 0 0 1 6-6 8 8 0 0 1 8 8`,dots:[[12,12]]},fibArcs:{d:`M10 20a6 6 0 0 0-6-6M14 20a10 10 0 0 0-10-10M18 20a14 14 0 0 0-14-14`,dash:`M4 20L18 6`,dots:[[4,20],[18,6]]},fibWedge:{d:`M4 19L20 7M4 19L20 16M10.4 14.2A8 8 0 0 1 11.86 17.53M14.4 11.2A13 13 0 0 1 16.78 16.6`,dots:[[4,19],[20,7],[20,16]]},pitchfan:{d:`M4 20L14 4M4 20L20 14M4 20L17 9`,dash:`M14 4L20 14`,dots:[[4,20],[14,4],[20,14]]},gannSquare:{d:`M4 4H20V20H4zM4 20L20 4M4 12H20M12 4V20M4 12a8 8 0 0 1 8 8`,dots:[[4,20],[20,4]]},elliottImpulse:{d:`M3 19L7 12L10 15L15 5L17.5 9L21 3`,dots:[[3,19],[21,3]]},elliottCorrection:{d:`M4 5L10 17L14 11L20 20`,dots:[[4,5],[20,20]]},elliottTriangle:{d:`M3 6L7 17L11 9L15 15L18 11L21 13`,dots:[[3,6],[21,13]]},elliottDoubleCombo:{d:`M4 5L9 14L13 9L20 19`,dots:[[4,5],[9,14],[13,9],[20,19]]},elliottTripleCombo:{d:`M3 5L7 13L10 9L14 16L17 12L21 20`,dots:[[3,5],[21,20]]},threeDrives:{d:`M3 20L7 12L9.5 15L14 7L16.5 10L21 3`,dash:`M7 12L14 7L21 3`,dots:[[7,12],[14,7],[21,3]]},cypherPattern:{d:`M3 19L7 9L10 14L15 5L20 16`,dash:`M3 19L10 14L20 16`,dots:[[3,19],[7,9],[10,14],[15,5],[20,16]]},timeCycles:{d:`M3 18a4.5 4.5 0 0 1 9 0a4.5 4.5 0 0 1 9 0`,dots:[[3,18],[12,18]]},sineLine:{d:`M3 12C5 5 7.5 5 9 12S13 19 15 12 19.5 5 21 12`,dots:[[6,6.75],[12,17.25]]},forecast:{d:`M4 18L15.2 7.8M19.5 6a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0z`,dots:[[4,18]]},projection:{d:`M12 19L18 11M15.2 11.3L18 11L17.8 13.8`,dash:`M3 17L9 9`,dots:[[3,17],[9,9],[12,19]]},barsPattern:{d:`M5 6V14M9 9V18M15 4V12M19 7V16`,fills:[`M4 8h2v4H4z`,`M8 11h2v5H8z`,`M14 6h2v4h-2z`,`M18 9h2v5h-2z`],dash:`M12 3V21`}},lr={candlestick:{d:`M8 3.5V7M8 16V20.5M16 5V8.5M16 15.5V19`,fills:[`M6.5 7h3a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1h-3a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1z`,`M14.5 8.5h3a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1h-3a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1z`]},hollowCandle:{d:`M8 3.5V7M8 16V20.5M16 5V8.5M16 15.5V19M6.5 7h3a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1h-3a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1zM14.5 8.5h3a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1h-3a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1z`},heikinAshi:{d:`M5.5 9.5V12M5.5 18V20M12 5.5V8M12 14V16M18.5 3V4.5M18.5 10.5V12.5`,fills:[`M4 12h3a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-.5.5H4a.5.5 0 0 1-.5-.5v-5A.5.5 0 0 1 4 12z`,`M10.5 8h3a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-5a.5.5 0 0 1 .5-.5z`,`M17 4.5h3a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5z`]},bar:{d:`M8 4V20M5 8H8M8 16H11M16 6V18M13 15H16M16 9H19`},volumeCandles:{d:`M6.5 5V8M6.5 16V19M15.5 3.5V6M15.5 16V20`,fills:[`M5.5 8h2a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1-.5-.5v-7a.5.5 0 0 1 .5-.5z`,`M11.5 6h8a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-8a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5z`]},equivolume:{d:`M4.5 10h2a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-6a1 1 0 0 1 1-1zM10 6h5a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1h-5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zM18.5 4h1a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1z`},line:{d:`M3 17L8 11L12 14L21 5`},area:{d:`M3 17L8 11L12 14L21 5`,soft:`M3 17L8 11L12 14L21 5V20H3z`},baseline:{d:`M3 16L7 9L11 14L15 7L21 15`,dash:`M3 12H21`},hlcArea:{d:`M3 9L8 6L13 9L21 4M3 15L8 13L13 16L21 11`,dash:`M3 12L8 9.5L13 12.5L21 7.5`,soft:`M3 9L8 6L13 9L21 4V11L13 16L8 13L3 15z`},stepLine:{d:`M3 18H8V12H12V15H16V7H21`},lineWithMarkers:{d:`M4 17L9 10L14 14L20 6`,dots:[[4,17],[9,10],[14,14],[20,6]]},hiLo:{d:`M6 7V17M12 4V14M18 9V20`,fills:[`M5 7h2v10H5z`,`M11 4h2v10h-2z`,`M17 9h2v11h-2z`]},renko:{d:`M3.5 15.5h4v4h-4zM7.5 11.5h4v4h-4zM11.5 7.5h4v4h-4zM15.5 11.5h4v4h-4z`},lineBreak:{d:`M4 14h4v5H4zM8 10h4v4H8zM16 9h4v8h-4z`,fills:[`M12 5h4v5h-4z`]},kagi:{d:`M4 19V11H9V16H14V5H20V13`},pointAndFigure:{d:`M5.5 5.5l3 3M8.5 5.5l-3 3M5.5 10.5l3 3M8.5 10.5l-3 3M5.5 15.5l3 3M8.5 15.5l-3 3M14.5 9a1.5 1.5 0 1 0 3 0a1.5 1.5 0 1 0-3 0M14.5 14a1.5 1.5 0 1 0 3 0a1.5 1.5 0 1 0-3 0`},rangeBars:{d:`M6.5 11V12M6.5 18V19M12 7V8M12 14V15M17.5 3.5V4.5M17.5 10.5V11.5`,fills:[`M5 12h3v6H5z`,`M10.5 8h3v6h-3z`,`M16 4.5h3v6h-3z`]}},ur=1.75,dr=.22,fr=new WeakMap;function pr(e){let t=fr.get(e);if(t)return t;let n=``;e.soft&&(n+=`<path d="${e.soft}" fill="currentColor" fill-opacity="${dr}" stroke="none"/>`);for(let t of e.fills??[])n+=`<path d="${t}" fill="currentColor" stroke="none"/>`;e.d&&(n+=`<path d="${e.d}"/>`),e.dash&&(n+=`<path d="${e.dash}" stroke-dasharray="2 2.5"/>`);for(let[t,r,i=ur]of e.dots??[])n+=`<circle cx="${t}" cy="${r}" r="${i}" fill="currentColor" stroke="none"/>`;return fr.set(e,n),n}function mr(e,t){return`<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${t}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">${pr(e)}</svg>`}exports.CHART_STYLE_KEYS=t,exports.CHART_TYPE_ICONS=lr,exports.DARK_TERMINAL=B,exports.DARK_THEME=Kt,exports.DEFAULT_BAR_SPACING=bn,exports.DEFAULT_BAR_WIDTH=yn,exports.DEFAULT_CHART_OPTIONS=mn,exports.DEFAULT_DRAWING_STYLE=n,exports.DEFAULT_FONT_FAMILY=Pt,exports.DEFAULT_PANEL_HEIGHT=wn,exports.DEFAULT_RECONNECT=o,exports.DEFAULT_SIGNAL_STYLE=i,exports.DEFAULT_STREAM_CONFIG=s,exports.DEFAULT_TIMEFRAME_FAVORITES=vn,exports.DEFAULT_TRADE_ZONE_STYLE=a,exports.DEFAULT_TRADING_CONFIG=r,exports.DRAWING_TOOL_ICONS=cr,exports.FIBONACCI=En,exports.HNX_SESSIONS=Rn,exports.HOSE_SESSIONS=Ln,exports.ICON_DOT_RADIUS=ur,exports.ICON_SOFT_OPACITY=dr,exports.LIGHT_THEME=qt,exports.LayerType=e,exports.MARKET_CRYPTO=Kn,exports.MARKET_HNX=Un,exports.MARKET_HOSE=Vn,exports.MARKET_HOSE_ETF=Hn,exports.MARKET_NYSE=qn,exports.MARKET_UPCOM=Wn,exports.MARKET_VN30F=Gn,exports.MIN_PANEL_HEIGHT=Cn,exports.MS_TIME_THRESHOLD=se,exports.PHI=Tn,exports.PRICE_AXIS_WIDTH=xn,exports.PRICE_SOURCES=tt,exports.TC_PALETTE=I,exports.TC_SERIES_COLORS=Gt,exports.TIMEFRAMES_CRYPTO=hn,exports.TIMEFRAMES_FOREX=_n,exports.TIMEFRAMES_STOCK=gn,exports.TIME_AXIS_HEIGHT=Sn,exports.UI_ICONS=sr,exports.UPCOM_SESSIONS=zn,exports.VN30F_SESSIONS=Bn,exports.VN_COLORS=q,exports.VOLUME_ALPHA=It,exports.alignToTimeframe=Le,exports.autoPricePrecision=Je,exports.barTimeUnit=ce,exports.barsAreDaily=Ve,exports.chartStyleValue=pn,exports.clamp=ne,exports.computePriceLimits=Zn,exports.computePriceRange=he,exports.computeTickStep=oe,exports.createVNTheme=Jn,exports.detectPrecision=et,exports.drawingOption=wt,exports.en=U,exports.findBarIndex=fe,exports.fitPriceRange=me,exports.formatFraction=Xe,exports.formatNumber=K,exports.formatPrice=D,exports.formatPriceScaleLabel=Ye,exports.formatTimestamp=Ie,exports.formatVND=Fn,exports.formatVolume=$e,exports.formatVolumeLoc=In,exports.fractionTick=Ze,exports.getCurrentSession=nr,exports.getLocale=jn,exports.getLocaleStrings=Pn,exports.hexToRgba=_e,exports.iconSvg=mr,exports.indicatorSource=at,exports.inverseLerp=ie,exports.isDateOnly=ze,exports.isPriceSource=nt,exports.isTimeFrame=Fe,exports.isValidTimeZone=y,exports.lerp=re,exports.lerpColor=ve,exports.lineDash=cn,exports.marketStatus=gt,exports.mergeBar=ge,exports.niceNumber=m,exports.normalizeBar=ue,exports.normalizeBarTime=le,exports.offsetAt=S,exports.padPriceRange=pe,exports.parseIndicatorSource=ot,exports.parseTimeframe=w,exports.phiStep=Dn,exports.pickBaseTimeframe=ut,exports.priceFormatterFor=Qe,exports.priceStepAt=Yn,exports.priceTagText=qe,exports.rankSymbols=ft,exports.readChartStyleOverrides=rn,exports.readChartTypeOptions=Nt,exports.readIndicatorPlotStyles=sn,exports.readNews=te,exports.readPaneStyle=an,exports.readQuote=l,exports.registerLocale=Nn,exports.resampleBars=ct,exports.resolveChartTheme=un,exports.resolveDrawingOptions=Tt,exports.resolveVolumeColors=V,exports.roundToPriceStep=X,exports.roundToStep=ae,exports.sanitizeDrawingOptions=St,exports.sanitizeDrawingStyle=Mt,exports.scaleMarketPrices=Qn,exports.sessionMinute=k,exports.setLocale=An,exports.sliceVisibleData=de,exports.sourcePrice=rt,exports.stepDecimals=pt,exports.symbolTimeZone=mt,exports.t=Mn,exports.tickBarCount=Pe,exports.timeParts=Re,exports.timeframeBucketStart=We,exports.timeframeToMs=T,exports.tzLabel=He,exports.vi=On,exports.vn30fContracts=or,exports.vn30fLastTradingDay=ar,exports.volumeColor=L,exports.wallToUtc=Oe,exports.withAlpha=h,exports.zoneOffsetMinutes=b,exports.zonedDateFormatter=Ae;
2
2
  //# sourceMappingURL=index.cjs.map