@tradecanvas/chart 1.84.1 → 2.0.0-beta.1
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/Chart.d.ts +13 -17
- package/dist/Chart.d.ts.map +1 -1
- package/dist/LayoutSession-CoYba3EO.cjs +2 -0
- package/dist/LayoutSession-CoYba3EO.cjs.map +1 -0
- package/dist/{LayoutSession-BhA7O3fL.js → LayoutSession-D1AIWXuH.js} +755 -721
- package/dist/LayoutSession-D1AIWXuH.js.map +1 -0
- package/dist/{WidgetCommandPalette-DHGvEl9n.js → WidgetCommandPalette-BRVQZRQe.js} +2 -2
- package/dist/{WidgetCommandPalette-DHGvEl9n.js.map → WidgetCommandPalette-BRVQZRQe.js.map} +1 -1
- package/dist/{WidgetCommandPalette-Ol8Z923q.cjs → WidgetCommandPalette-CdqVGBYg.cjs} +2 -2
- package/dist/{WidgetCommandPalette-Ol8Z923q.cjs.map → WidgetCommandPalette-CdqVGBYg.cjs.map} +1 -1
- package/dist/{WidgetDrawingSettings-XL1Z9-ly.cjs → WidgetDrawingSettings-CFksb9-G.cjs} +2 -2
- package/dist/{WidgetDrawingSettings-XL1Z9-ly.cjs.map → WidgetDrawingSettings-CFksb9-G.cjs.map} +1 -1
- package/dist/{WidgetDrawingSettings-CSB88SvC.js → WidgetDrawingSettings-DBBFUUg7.js} +2 -2
- package/dist/{WidgetDrawingSettings-CSB88SvC.js.map → WidgetDrawingSettings-DBBFUUg7.js.map} +1 -1
- package/dist/{WidgetIndicatorPicker-a4rpptDc.js → WidgetIndicatorPicker-CcIYSWPd.js} +2 -2
- package/dist/{WidgetIndicatorPicker-a4rpptDc.js.map → WidgetIndicatorPicker-CcIYSWPd.js.map} +1 -1
- package/dist/{WidgetIndicatorPicker-K01RJSLs.cjs → WidgetIndicatorPicker-DiB_819o.cjs} +2 -2
- package/dist/{WidgetIndicatorPicker-K01RJSLs.cjs.map → WidgetIndicatorPicker-DiB_819o.cjs.map} +1 -1
- package/dist/{WidgetIndicatorSettings-BmIFp19I.js → WidgetIndicatorSettings-DcRbZpJJ.js} +3 -3
- package/dist/{WidgetIndicatorSettings-BmIFp19I.js.map → WidgetIndicatorSettings-DcRbZpJJ.js.map} +1 -1
- package/dist/{WidgetIndicatorSettings-CJWR-x9q.cjs → WidgetIndicatorSettings-GnMFEumO.cjs} +2 -2
- package/dist/{WidgetIndicatorSettings-CJWR-x9q.cjs.map → WidgetIndicatorSettings-GnMFEumO.cjs.map} +1 -1
- package/dist/{WidgetSettings-D6COgRaB.cjs → WidgetSettings-BnXD_NEb.cjs} +2 -2
- package/dist/{WidgetSettings-D6COgRaB.cjs.map → WidgetSettings-BnXD_NEb.cjs.map} +1 -1
- package/dist/{WidgetSettings-9clgY3_1.js → WidgetSettings-Ds8LIQJL.js} +2 -2
- package/dist/{WidgetSettings-9clgY3_1.js.map → WidgetSettings-Ds8LIQJL.js.map} +1 -1
- package/dist/{WidgetSymbolSearch-6EB31v-O.cjs → WidgetSymbolSearch-CB27E553.cjs} +2 -2
- package/dist/{WidgetSymbolSearch-6EB31v-O.cjs.map → WidgetSymbolSearch-CB27E553.cjs.map} +1 -1
- package/dist/{WidgetSymbolSearch-DToOqJoG.js → WidgetSymbolSearch-W9ZoSxTR.js} +2 -2
- package/dist/{WidgetSymbolSearch-DToOqJoG.js.map → WidgetSymbolSearch-W9ZoSxTR.js.map} +1 -1
- package/dist/{i18n-nWmX3G55.js → i18n-BudCuwZD.js} +1 -3
- package/dist/i18n-BudCuwZD.js.map +1 -0
- package/dist/i18n-D8MhJwUv.cjs +2 -0
- package/dist/i18n-D8MhJwUv.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -18
- package/dist/{indicatorInputWords-D0SGBaUD.js → indicatorInputWords-BfiSCSB-.js} +2 -2
- package/dist/{indicatorInputWords-D0SGBaUD.js.map → indicatorInputWords-BfiSCSB-.js.map} +1 -1
- package/dist/{indicatorInputWords-HqTGFokF.cjs → indicatorInputWords-CdAL8a73.cjs} +2 -2
- package/dist/{indicatorInputWords-HqTGFokF.cjs.map → indicatorInputWords-CdAL8a73.cjs.map} +1 -1
- package/dist/layout/LayoutManager.d.ts +23 -0
- package/dist/layout/LayoutManager.d.ts.map +1 -1
- package/dist/model/PriceFit.d.ts +8 -3
- package/dist/model/PriceFit.d.ts.map +1 -1
- package/dist/widget/ChartWidget.d.ts +4 -3
- package/dist/widget/ChartWidget.d.ts.map +1 -1
- package/dist/widget/WidgetDock.d.ts +10 -1
- package/dist/widget/WidgetDock.d.ts.map +1 -1
- package/dist/widget/WidgetLegendView.d.ts +9 -2
- package/dist/widget/WidgetLegendView.d.ts.map +1 -1
- package/dist/widget/index.cjs +92 -33
- package/dist/widget/index.cjs.map +1 -1
- package/dist/widget/index.js +1193 -1128
- package/dist/widget/index.js.map +1 -1
- package/dist/widget/locales/ar.d.ts.map +1 -1
- package/dist/widget/locales/cs.d.ts.map +1 -1
- package/dist/widget/locales/da.d.ts.map +1 -1
- package/dist/widget/locales/de.d.ts.map +1 -1
- package/dist/widget/locales/el.d.ts.map +1 -1
- package/dist/widget/locales/en.d.ts +0 -2
- package/dist/widget/locales/en.d.ts.map +1 -1
- package/dist/widget/locales/es.d.ts.map +1 -1
- package/dist/widget/locales/et.d.ts.map +1 -1
- package/dist/widget/locales/fa.d.ts.map +1 -1
- package/dist/widget/locales/fr.d.ts.map +1 -1
- package/dist/widget/locales/he.d.ts.map +1 -1
- package/dist/widget/locales/hu.d.ts.map +1 -1
- package/dist/widget/locales/id.d.ts.map +1 -1
- package/dist/widget/locales/index.cjs +1 -1
- package/dist/widget/locales/index.cjs.map +1 -1
- package/dist/widget/locales/index.js +1 -29
- package/dist/widget/locales/index.js.map +1 -1
- package/dist/widget/locales/it.d.ts.map +1 -1
- package/dist/widget/locales/ja.d.ts.map +1 -1
- package/dist/widget/locales/ko.d.ts.map +1 -1
- package/dist/widget/locales/ms.d.ts.map +1 -1
- package/dist/widget/locales/nb.d.ts.map +1 -1
- package/dist/widget/locales/nl.d.ts.map +1 -1
- package/dist/widget/locales/pl.d.ts.map +1 -1
- package/dist/widget/locales/pt.d.ts.map +1 -1
- package/dist/widget/locales/ro.d.ts.map +1 -1
- package/dist/widget/locales/ru.d.ts.map +1 -1
- package/dist/widget/locales/sk.d.ts.map +1 -1
- package/dist/widget/locales/sv.d.ts.map +1 -1
- package/dist/widget/locales/th.d.ts.map +1 -1
- package/dist/widget/locales/tr.d.ts.map +1 -1
- package/dist/widget/locales/vi.d.ts.map +1 -1
- package/dist/widget/locales/zh.d.ts.map +1 -1
- package/dist/widget/locales/zhHant.d.ts.map +1 -1
- package/dist/widget/widgetUI.d.ts +22 -10
- package/dist/widget/widgetUI.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/LayoutSession-BhA7O3fL.js.map +0 -1
- package/dist/LayoutSession-Cj6jHPeY.cjs +0 -2
- package/dist/LayoutSession-Cj6jHPeY.cjs.map +0 -1
- package/dist/i18n-D0SPfH2s.cjs +0 -2
- package/dist/i18n-D0SPfH2s.cjs.map +0 -1
- package/dist/i18n-nWmX3G55.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./LayoutSession-Cj6jHPeY.cjs`);let t=require(`@tradecanvas/commons`),n=require(`@tradecanvas/core`);function r(e){let{id:t,params:n={},position:r=null}=typeof e==`string`?{id:e}:e;return JSON.stringify([t,Object.keys(n).sort().map(e=>[e,n[e]]),r])}function i(e,t,n){let i=new Map,a=t.map(e=>{let t=r(e),n=i.get(t)??0;return i.set(t,n+1),{spec:e,key:`${t}#${n}`}}),o=new Set(a.map(e=>e.key));for(let[t,r]of[...n])o.has(t)||(e.removeIndicator(r),n.delete(t));for(let{spec:t,key:r}of a){if(n.has(r))continue;let i=typeof t==`string`?e.addIndicator(t):t.position===void 0?e.addIndicator(t.id,t.params??{}):e.addIndicator(t.id,t.params??{},t.position);i&&n.set(r,i)}}var a=3,o=e=>({time:e.time,open:e.open,high:e.high,low:e.low,close:e.close,volume:e.volume}),s=e=>e.length>0?e[e.length-1]:null;function c(t,n,r){for(let i=0;i<r;i++)if(!e.P(t[i],n[i]))return!1;return!0}function l(e,t){if(e.isReplayActive())return!0;let n=s(e.getData());return t.inReplay?n?.time===t.last?.time:n===t.shownBar?n?.time===t.last?.time||!e.isExtendedHoursVisible():!1}function u(t,n,r){let i=[];for(let a=0;a<n.length;a++){let s=t[r+a];if(!e.P(s,n[a])){if(s.time!==n[a].time||!e.N(s))return null;i.push(o(s))}}return i}function d(e,t){if(t.length===0)return!0;if(!e.updateBar)return!1;for(let n of t)if(!e.updateBar(n))return!1;return!0}function f(e){return e.slice(Math.max(1,e.length-1-3),-1).map(o)}function p(t,n){let r=[];for(let i=n;i<t.length;i++){if(!e.N(t[i])||!(t[i].time>t[i-1].time))return null;r.push(o(t[i]))}return r}function m(t,n,r){let i=r.length;if(i===0||!r.last||!e.N(r.last)||n.length<i||!l(t,r))return!1;let a=r.recent??[],s=i-1-a.length;if(n!==r.source&&(r.source.length!==i||!c(r.source,n,s)))return!1;let f=n[i-1];if(f.time!==r.last.time||!e.N(f))return!1;let m=u(n,a,s),h=p(n,i);return!m||!h||!d(t,m)?!1:(e.P(f,r.last)||t.updateLastBar(o(f)),h.length===1?t.appendBar(h[0]):h.length>1&&t.appendBars(h),!0)}function h(e,t,n){(!n||!m(e,t,n))&&e.setData(t.map(o));let r=t.length>0?o(t[t.length-1]):null,i=e.isReplayActive();return{source:t,length:t.length,last:r,recent:f(t),shownBar:i?null:s(e.getData()),inReplay:i}}var g=`https://tradecanvas.dev`,_=`Powered by TradeCanvas`,v=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" aria-hidden="true" focusable="false"><path d="M186 70A82 82 0 1 0 186 186" fill="none" stroke="currentColor" stroke-width="22" stroke-linecap="round"/><rect x="92" y="74" width="72" height="20" rx="10" fill="currentColor"/><path fill="#E8961E" d="M119 94H137V108H144a10 10 0 0 1 10 10V164a10 10 0 0 1-10 10H137V190H119V174H112a10 10 0 0 1-10-10V118a10 10 0 0 1 10-10H119Z"/></svg>`,y=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 16 686 88" aria-hidden="true" focusable="false"><path fill="currentColor" transform="translate(0 101.64)" d="M27.24 0.00L27.24 -69.72L1.32 -69.72L1.32 -83.64L68.76 -83.64L68.76 -69.72L42.96 -69.72L42.96 0.00ZM70.90 0.00L70.90 -59.16L85.90 -59.16L85.90 -50.64Q86.26 -51.36 86.74 -51.96Q89.50 -55.92 93.52 -58.14Q97.54 -60.36 101.74 -60.36Q104.74 -60.36 107.44 -59.58Q110.14 -58.80 113.02 -57.00L105.82 -43.56Q104.50 -44.28 102.46 -44.88Q100.42 -45.48 98.38 -45.48Q95.98 -45.48 93.76 -44.64Q91.54 -43.80 89.80 -42.00Q88.06 -40.20 86.98 -37.20Q86.50 -35.52 86.20 -32.94Q85.90 -30.36 85.90 -25.44L85.90 0.00ZM156.44 0.00L155.36 -7.56Q155.00 -6.96 154.52 -6.36Q151.28 -2.40 147.20 -0.60Q143.12 1.20 138.56 1.20Q132.08 1.20 126.98 -1.20Q121.88 -3.60 118.94 -8.04Q116.00 -12.48 116.00 -18.24Q116.00 -23.40 118.10 -27.06Q120.20 -30.72 123.68 -32.64Q126.68 -34.44 130.34 -35.16Q134.00 -35.88 138.20 -35.88L155.24 -35.88L155.24 -37.32Q155.24 -42.60 151.94 -45.18Q148.64 -47.76 143.00 -47.76Q138.32 -47.76 133.46 -45.90Q128.60 -44.04 124.88 -40.68L117.32 -50.88Q123.56 -55.92 130.10 -58.14Q136.64 -60.36 144.20 -60.36Q156.44 -60.36 163.28 -54.24Q170.12 -48.12 170.12 -37.32L170.12 0.00ZM155.24 -24.84L140.36 -24.84Q138.44 -24.84 136.58 -24.54Q134.72 -24.24 133.40 -23.16Q132.20 -22.32 131.60 -21.06Q131.00 -19.80 131.00 -18.24Q131.00 -14.88 133.64 -12.84Q136.28 -10.80 140.72 -10.80Q144.68 -10.80 147.98 -12.54Q151.28 -14.28 153.26 -17.34Q155.24 -20.40 155.24 -24.36ZM202.98 1.20Q195.18 1.20 189.54 -2.82Q183.90 -6.84 180.84 -13.86Q177.78 -20.88 177.78 -29.64Q177.78 -39.36 181.20 -46.20Q184.62 -53.04 190.38 -56.70Q196.14 -60.36 202.98 -60.36Q207.78 -60.36 211.92 -58.38Q216.06 -56.40 219.06 -52.44Q219.54 -51.72 220.02 -51.00L220.02 -83.64L234.78 -83.64L234.78 0.00L220.02 0.00L220.02 -8.04Q219.54 -7.20 218.94 -6.48Q215.70 -2.28 211.56 -0.54Q207.42 1.20 202.98 1.20ZM207.06 -12.48Q211.50 -12.48 214.68 -14.64Q217.86 -16.80 219.60 -20.64Q221.34 -24.48 221.34 -29.64Q221.34 -34.80 219.60 -38.64Q217.86 -42.48 214.68 -44.58Q211.50 -46.68 207.06 -46.68Q202.74 -46.68 199.50 -44.58Q196.26 -42.48 194.52 -38.70Q192.78 -34.92 192.78 -29.64Q192.78 -24.36 194.52 -20.52Q196.26 -16.68 199.50 -14.58Q202.74 -12.48 207.06 -12.48ZM272.32 1.20Q264.64 1.20 259.12 -1.32Q253.60 -3.84 250.06 -8.10Q246.52 -12.36 244.84 -17.82Q243.16 -23.28 243.16 -29.28Q243.16 -35.04 244.84 -40.56Q246.52 -46.08 249.88 -50.52Q253.24 -54.96 258.58 -57.66Q263.92 -60.36 271.36 -60.36Q278.32 -60.36 283.48 -58.02Q288.64 -55.68 292.00 -51.54Q295.36 -47.40 297.10 -41.88Q298.84 -36.36 298.84 -30.12Q298.84 -29.28 298.78 -27.78Q298.72 -26.28 298.48 -24.60L258.04 -24.60Q258.64 -18.24 262.78 -15.00Q266.92 -11.76 273.16 -11.76Q277.72 -11.76 282.04 -13.38Q286.36 -15.00 289.72 -18.00L297.16 -7.92Q292.96 -4.68 289.24 -2.64Q285.52 -0.60 281.50 0.30Q277.48 1.20 272.32 1.20ZM284.68 -35.64Q284.68 -35.76 284.68 -35.76Q284.68 -38.28 283.72 -40.50Q282.76 -42.72 281.08 -44.40Q279.40 -46.08 277.06 -46.98Q274.72 -47.88 271.72 -47.88Q267.28 -47.88 264.28 -46.08Q261.28 -44.28 259.78 -41.46Q258.28 -38.64 257.92 -35.64ZM346.66 1.56Q335.02 1.56 326.20 -3.84Q317.38 -9.24 312.46 -19.08Q307.54 -28.92 307.54 -41.88Q307.54 -54.84 312.46 -64.62Q317.38 -74.40 326.20 -79.80Q335.02 -85.20 346.66 -85.20Q359.50 -85.20 368.92 -78.84Q378.34 -72.48 382.42 -61.20L371.02 -57.00Q368.02 -64.80 361.78 -69.18Q355.54 -73.56 346.66 -73.56Q338.50 -73.56 332.44 -69.66Q326.38 -65.76 323.08 -58.74Q319.78 -51.72 319.78 -41.88Q319.78 -32.04 323.08 -24.96Q326.38 -17.88 332.44 -13.98Q338.50 -10.08 346.66 -10.08Q355.54 -10.08 361.78 -14.46Q368.02 -18.84 371.02 -26.64L382.42 -22.56Q378.34 -11.40 368.92 -4.92Q359.50 1.56 346.66 1.56ZM429.04 0.00L428.32 -8.64Q428.20 -8.52 428.08 -8.40Q424.96 -3.72 420.34 -1.32Q415.72 1.08 409.96 1.08Q403.36 1.08 398.32 -1.32Q393.28 -3.72 390.52 -7.98Q387.76 -12.24 387.76 -17.88Q387.76 -22.80 389.80 -26.34Q391.84 -29.88 395.08 -31.80Q398.08 -33.72 401.98 -34.50Q405.88 -35.28 410.32 -35.28L428.08 -35.28L428.08 -37.20Q428.08 -43.44 424.48 -46.80Q420.88 -50.16 414.04 -50.16Q409.24 -50.16 404.86 -48.24Q400.48 -46.32 396.52 -42.00L389.20 -49.56Q394.48 -55.08 400.90 -57.66Q407.32 -60.24 414.88 -60.24Q426.76 -60.24 433.30 -54.18Q439.84 -48.12 439.84 -37.20L439.84 0.00ZM428.08 -26.40L412.00 -26.40Q409.60 -26.40 407.02 -25.98Q404.44 -25.56 402.64 -24.24Q401.20 -23.16 400.36 -21.54Q399.52 -19.92 399.52 -17.76Q399.52 -13.56 402.76 -11.04Q406.00 -8.52 411.40 -8.52Q415.96 -8.52 419.74 -10.62Q423.52 -12.72 425.80 -16.38Q428.08 -20.04 428.08 -24.72ZM451.94 0.00L451.94 -59.16L463.82 -59.16L463.82 -50.88Q464.78 -52.44 465.98 -53.76Q468.86 -56.88 472.88 -58.56Q476.90 -60.24 481.58 -60.24Q491.42 -60.24 497.00 -54.54Q502.58 -48.84 502.58 -37.92L502.58 0.00L490.82 0.00L490.82 -33.60Q490.82 -42.12 487.76 -46.08Q484.70 -50.04 478.34 -50.04Q473.54 -50.04 470.36 -47.88Q467.18 -45.72 465.50 -41.04Q463.82 -36.36 463.82 -29.16L463.82 0.00ZM533.28 0.00L509.04 -59.16L522.00 -59.16L538.08 -15.24L554.40 -59.16L567.12 -59.16L543.12 0.00ZM610.56 0.00L609.84 -8.64Q609.72 -8.52 609.60 -8.40Q606.48 -3.72 601.86 -1.32Q597.24 1.08 591.48 1.08Q584.88 1.08 579.84 -1.32Q574.80 -3.72 572.04 -7.98Q569.28 -12.24 569.28 -17.88Q569.28 -22.80 571.32 -26.34Q573.36 -29.88 576.60 -31.80Q579.60 -33.72 583.50 -34.50Q587.40 -35.28 591.84 -35.28L609.60 -35.28L609.60 -37.20Q609.60 -43.44 606.00 -46.80Q602.40 -50.16 595.56 -50.16Q590.76 -50.16 586.38 -48.24Q582.00 -46.32 578.04 -42.00L570.72 -49.56Q576.00 -55.08 582.42 -57.66Q588.84 -60.24 596.40 -60.24Q608.28 -60.24 614.82 -54.18Q621.36 -48.12 621.36 -37.20L621.36 0.00ZM609.60 -26.40L593.52 -26.40Q591.12 -26.40 588.54 -25.98Q585.96 -25.56 584.16 -24.24Q582.72 -23.16 581.88 -21.54Q581.04 -19.92 581.04 -17.76Q581.04 -13.56 584.28 -11.04Q587.52 -8.52 592.92 -8.52Q597.48 -8.52 601.26 -10.62Q605.04 -12.72 607.32 -16.38Q609.60 -20.04 609.60 -24.72ZM653.38 1.08Q647.14 1.08 642.34 -0.78Q637.54 -2.64 634.12 -5.58Q630.70 -8.52 628.66 -11.64L636.70 -18.60Q638.98 -14.52 643.24 -11.58Q647.50 -8.64 653.50 -8.64Q658.78 -8.64 661.84 -10.86Q664.90 -13.08 664.90 -16.68Q664.90 -19.56 662.98 -21.30Q661.06 -23.04 657.94 -24.18Q654.82 -25.32 651.10 -26.16Q647.74 -27.12 644.26 -28.32Q640.78 -29.52 637.96 -31.38Q635.14 -33.24 633.40 -36.18Q631.66 -39.12 631.66 -43.44Q631.66 -51.00 637.48 -55.62Q643.30 -60.24 652.90 -60.24Q659.74 -60.24 665.38 -57.42Q671.02 -54.60 674.14 -49.08L666.82 -43.44Q664.42 -47.40 660.64 -49.20Q656.86 -51.00 652.42 -51.00Q648.22 -51.00 645.40 -49.26Q642.58 -47.52 642.58 -44.52Q642.58 -42.36 643.84 -40.98Q645.10 -39.60 647.80 -38.58Q650.50 -37.56 654.46 -36.60Q658.18 -35.76 662.02 -34.56Q665.86 -33.36 669.10 -31.44Q672.34 -29.52 674.38 -26.28Q676.42 -23.04 676.42 -17.88Q676.42 -12.24 673.54 -7.98Q670.66 -3.72 665.50 -1.32Q660.34 1.08 653.38 1.08Z"/></svg>`,b=12,x=16,S=.58,C=10,ee=.56,te=686/88,ne=83.64/88,re=.25;function w(e=x){let t=Number.isFinite(e)?Math.max(b,e):x,n=T(t*ee/ne);return{height:t,fontSize:T(Math.max(C,t*S)),gap:T(t*re),wordmarkWidth:T(n*te),wordmarkHeight:n}}function T(e){return Math.round(e*10)/10}function E(e){return e.replace(/&/g,`&`).replace(/"/g,`"`).replace(/</g,`<`)}function D(e){return e&&(/^(https?:)?\/\//i.test(e)||e.startsWith(`/`))?e:g}function O(e){return!!e&&!/^_(self|parent|top)$/i.test(e)}function k(e,t,n){return e.replace(`<svg `,`<svg width="${t}" height="${n}" style="display:block;flex:none" `)}function A(e={}){let t=w(e.height),n=E(D(e.href)),r=e.target??`_blank`;return`<a class="tc-powered-by" href="${n}"${r?` target="${E(r)}"${O(r)?` rel="noopener noreferrer"`:``}`:``} aria-label="${_}" style="${`display:inline-flex;align-items:center;gap:${t.gap}px;height:${t.height}px;color:inherit;text-decoration:none;font-size:${t.fontSize}px;line-height:1;white-space:nowrap`}"><span aria-hidden="true">Powered by</span>`+k(v,t.height,t.height)+k(y,t.wordmarkWidth,t.wordmarkHeight)+`</a>`}function ie(e={},t=document){let n=t.createElement(`div`);return n.innerHTML=A(e),n.firstElementChild}function ae(e){let{viewport:t,data:r}=e,i=(0,n.priceToYMapper)(t),a=r.length-1,o=Math.max(0,Math.floor(t.visibleRange.from)),s=Math.min(a,Math.ceil(t.visibleRange.to)),c=e=>r.length>0?(0,n.timestampToBarIndex)(e,r):e;return{timeToX:e=>(0,n.barIndexToX)(c(e),t),xToTime:e=>{let i=(0,n.xToBarIndex)(e,t);return r.length>0?(0,n.barIndexToTime)(i,r):i},indexToX:e=>(0,n.barIndexToX)(e,t),xToIndex:e=>(0,n.xToBarIndex)(e,t),priceToY:i,yToPrice:e=>(0,n.yToPrice)(e,t),barWidth:t.barWidth,visible:s<o?{from:0,to:-1}:{from:o,to:s}}}var oe=class{root;cells=[];layout;options;destroyed=!1;syncing=!1;constructor(t,n={}){this.options=n,this.layout=e.d(n.layout)?n.layout:`2x2`,this.root=document.createElement(`div`),this.root.style.cssText=`display:grid;width:100%;height:100%;overflow:hidden;`,t.appendChild(this.root),this.applyLayout(),this.createCells()}applyLayout(){let{cols:t,rows:n}=e.s[this.layout],r=this.options.gap??1;this.root.style.gridTemplateColumns=`repeat(${t}, minmax(0, 1fr))`,this.root.style.gridTemplateRows=`repeat(${n}, minmax(0, 1fr))`,this.root.style.gap=`${r}px`,this.placeCells()}placeCells(){let t=e.c(e.s[this.layout]);this.cells.forEach((n,r)=>e.f(n.container,t[r]))}createCells(){let t=e.l(e.s[this.layout]);for(let e=0;e<t;e++)this.cells.push(this.createCell(e));this.placeCells()}createCell(t){let n=this.options.cells?.[t]??{},r=document.createElement(`div`);r.style.cssText=`position:relative;overflow:hidden;min-width:0;min-height:0;`,this.root.appendChild(r);let i=new e.h(r,{chartType:`candlestick`,autoScale:!0,features:{crosshair:!0,keyboard:!0,volume:!0,legend:!0,priceAxis:!0,timeAxis:!0,grid:!0},...this.options.chartOptions,...n.chartOptions,theme:this.options.theme}),a={container:r,chart:i,symbol:n.symbol??`Chart ${t+1}`,timeframe:n.timeframe??`5m`};return this.options.syncCrosshair!==!1&&(i.on(`crosshairMove`,e=>{let t=e.payload.bar?.time;if(t!==void 0)for(let e of this.cells)e.chart!==i&&e.chart.setCrosshairTime(t)}),i.on(`crosshairLeave`,()=>{for(let e of this.cells)e.chart!==i&&e.chart.setCrosshairTime(null)})),this.options.syncTimeAxis!==!1&&i.on(`visibleRangeChange`,e=>{if(this.syncing)return;this.syncing=!0;let{from:t,to:n}=e.payload,r=i.getData();if(r.length>0&&t>=0&&n<r.length){let e=r[t]?.time,a=r[n]?.time;if(e&&a)for(let t of this.cells)t.chart!==i&&t.chart.setVisibleRange(e,a)}this.syncing=!1}),a}setLayout(t){if(t===this.layout||!e.d(t))return;let n=this.cells.length,r=e.l(e.s[t]);if(r<n)for(let e=n-1;e>=r;e--){let t=this.cells[e];t.chart.destroy(),t.container.remove(),this.cells.pop()}this.layout=t,this.applyLayout();for(let e=n;e<r;e++)this.cells.push(this.createCell(e));this.placeCells()}getLayout(){return this.layout}getChart(e){return this.cells[e]?.chart??null}getCharts(){return this.cells.map(e=>e.chart)}getCellCount(){return this.cells.length}setData(e,t){this.cells[e]?.chart.setData(t)}setAllData(e){for(let t of this.cells)t.chart.setData(e)}async connectCell(e,t){let n=this.cells[e];n&&(n.symbol=t.symbol,n.timeframe=t.timeframe,await n.chart.connect(t))}async connectAll(e,t,r,i=500){let a=[];for(let o=0;o<this.cells.length&&o<t.length;o++)a.push(this.connectCell(o,{...typeof e==`function`?{adapter:e(t[o],o)}:(0,n.isDataFeed)(e)?{feed:e}:{adapter:e},symbol:t[o],timeframe:r,historyLimit:i}));await Promise.all(a)}setTheme(e){for(let t of this.cells)t.chart.setTheme(e)}destroy(){if(!this.destroyed){this.destroyed=!0;for(let e of this.cells)e.chart.destroy(),e.container.remove();this.cells=[],this.root.remove()}}},se=class extends n.BaseFinanceChart{options;constructor(e,t){super(e,t.theme),this.options=t,this.requestRender()}renderChart(e,t,r,i){(0,n.renderSparkline)(e,t,r,this.options,i)}update(e){this.options={...this.options,data:e},this.requestRender()}setOptions(e){this.options={...this.options,...e},this.requestRender()}},j=class extends n.BaseFinanceChart{options;crosshair=null;constructor(e,t){super(e,t.theme),this.options=t,t.crosshair!==!1&&(this.crosshair=new n.FinanceCrosshair(this.canvas,()=>this.requestRender())),this.requestRender()}renderChart(e,t,r,i){let a=this.crosshair?.getPosition()??null;(0,n.renderDepthChart)(e,t,r,this.options,i,a)}update(e){this.options={...this.options,data:e},this.requestRender()}setOptions(e){this.options={...this.options,...e},this.requestRender()}destroy(){this.crosshair?.destroy(),super.destroy()}},M=class extends n.BaseFinanceChart{options;crosshair=null;constructor(e,t){super(e,t.theme),this.options=t,t.crosshair!==!1&&(this.crosshair=new n.FinanceCrosshair(this.canvas,()=>this.requestRender())),this.requestRender()}renderChart(e,t,r,i){let a=this.crosshair?.getPosition()??null;(0,n.renderEquityCurve)(e,t,r,this.options,i,a)}update(e,t){this.options={...this.options,data:e},t!==void 0&&(this.options={...this.options,benchmark:t}),this.requestRender()}setOptions(e){this.options={...this.options,...e},this.requestRender()}destroy(){this.crosshair?.destroy(),super.destroy()}},N=class extends n.BaseFinanceChart{options;crosshair=null;cachedRects=[];cachedGroups=[];currentData=[];lastLayoutWidth=0;lastLayoutHeight=0;handleClick=null;constructor(e,t){super(e,t.theme),this.options=t,this.currentData=t.data??[],t.crosshair!==!1&&(this.crosshair=new n.FinanceCrosshair(this.canvas,()=>this.requestRender())),t.onCellClick&&(this.handleClick=e=>{let t=this.canvas.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;this.onCanvasClick(n,r)},this.canvas.addEventListener(`click`,this.handleClick)),this.applyLabel(),this.recomputeLayout(),this.requestRender()}applyLabel(){let e=new Set(this.currentData.map(e=>e.group).filter(Boolean)).size,t=this.options.grouped&&e>0?`Market map of ${this.currentData.length} cells in ${e} groups`:`Heatmap of ${this.currentData.length} cells`;this.setLabel(this.options.ariaLabel??t)}recomputeLayout(){let e={x:0,y:0,width:this.width,height:this.height},t=this.options.cellPadding??2;if(this.lastLayoutWidth=this.width,this.lastLayoutHeight=this.height,this.cachedGroups=[],this.options.grouped){let{groups:r,cells:i}=(0,n.layoutGroupedTreemap)(this.currentData.map(e=>({id:e.id,weight:e.weight??(Math.abs(e.value)||1),group:e.group,value:e.value})),e,t,n.GROUP_HEADER);this.cachedRects=i,this.cachedGroups=r}else if(this.options.weighted){let r=this.currentData.map(e=>({id:e.id,weight:e.weight??(Math.abs(e.value)||1)}));this.cachedRects=(0,n.layoutSquarifiedTreemap)(r,e,t)}else this.cachedRects=(0,n.layoutUniformGrid)(this.currentData.map(e=>({id:e.id})),e,t)}onCanvasClick(e,t){if(this.options.onCellClick)for(let n of this.cachedRects){let r=n.rect;if(e>=r.x&&e<=r.x+r.width&&t>=r.y&&t<=r.y+r.height){let e=this.currentData.find(e=>e.id===n.id);e&&this.options.onCellClick(e);return}}}renderChart(e,t,r,i){(t!==this.lastLayoutWidth||r!==this.lastLayoutHeight)&&this.recomputeLayout();let a=this.crosshair?.getPosition()??null;(0,n.renderHeatmap)(e,t,r,this.currentData,this.cachedRects,this.options,i,a,this.cachedGroups)}update(e){this.currentData=e,this.options={...this.options,data:e},this.applyLabel(),this.recomputeLayout(),this.requestRender()}setOptions(e){this.options={...this.options,...e},e.data&&(this.currentData=e.data),this.applyLabel(),this.recomputeLayout(),this.requestRender()}destroy(){this.crosshair?.destroy(),this.handleClick&&this.canvas.removeEventListener(`click`,this.handleClick),super.destroy()}},P=class extends n.BaseFinanceChart{options;crosshair=null;constructor(e,t){super(e,t.theme),this.options=t,t.crosshair!==!1&&(this.crosshair=new n.FinanceCrosshair(this.canvas,()=>this.requestRender())),this.requestRender()}renderChart(e,t,r,i){let a=this.crosshair?.getPosition()??null;(0,n.renderWaterfall)(e,t,r,this.options,i,a)}update(e){this.options={...this.options,data:e},this.requestRender()}setOptions(e){this.options={...this.options,...e},this.requestRender()}destroy(){this.crosshair?.destroy(),super.destroy()}},F=500;function I(e){let t=1-e;return 1-t*t*t}var L=class extends n.BaseFinanceChart{options;currentValue;targetValue;animationStart=null;animationFrom=0;animationFrameId=null;constructor(e,t){super(e,t.theme),this.options=t,this.currentValue=t.value,this.targetValue=t.value,this.requestRender()}renderChart(e,t,r,i){(0,n.renderGauge)(e,t,r,this.options,i,this.currentValue)}setValue(e){if(this.options.animate===!1){this.cancelAnimation(),this.currentValue=e,this.targetValue=e,this.options={...this.options,value:e},this.requestRender();return}this.targetValue=e,this.animationFrom=this.currentValue,this.animationStart=performance.now(),this.options={...this.options,value:e},this.startAnimationLoop()}setOptions(e){let t={...this.options,...e};if(e.value!==void 0&&e.value!==this.targetValue){this.options=t,this.setValue(e.value);return}this.options=t,this.requestRender()}startAnimationLoop(){if(this.animationFrameId!==null)return;let e=()=>{if(this.animationFrameId=null,this.animationStart===null)return;let t=this.options.animationDuration??F,n=performance.now()-this.animationStart,r=Math.min(1,n/Math.max(1,t)),i=I(r);this.currentValue=this.animationFrom+(this.targetValue-this.animationFrom)*i,this.requestRender(),r<1?this.animationFrameId=requestAnimationFrame(e):(this.currentValue=this.targetValue,this.animationStart=null)};this.animationFrameId=requestAnimationFrame(e)}cancelAnimation(){this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null),this.animationStart=null}destroy(){this.cancelAnimation(),super.destroy()}},R=class extends n.BaseFinanceChart{options;layout=null;layoutFor=null;crosshair;onClick=e=>{let t=this.canvas.getBoundingClientRect();this.layout&&this.clickAt(this.layout,e.clientX-t.left,e.clientY-t.top)};onMove=e=>{if(!this.layout||!this.clickable())return;let t=this.canvas.getBoundingClientRect();this.canvas.style.cursor=this.hits(this.layout,e.clientX-t.left,e.clientY-t.top)?`pointer`:``};constructor(e,t){super(e,t.theme),this.options=t,this.crosshair=new n.FinanceCrosshair(this.canvas,()=>this.requestRender()),this.canvas.addEventListener(`click`,this.onClick),this.canvas.addEventListener(`pointermove`,this.onMove),this.applyLabel(),this.requestRender()}renderChart(e,t,r,i){let a=this.options.crosshair===!1?null:this.crosshair.getPosition(),o=this.layoutFor;(!this.layout||!o||o.options!==this.options||o.width!==t||o.height!==r||o.theme!==i)&&(this.layout=this.compute(t,r,i,(0,n.canvasMeasure)(e,i)),this.layoutFor={options:this.options,width:t,height:r,theme:i}),this.draw(e,t,r,i,a,this.layout)}setOptions(e){this.options={...this.options,...e},`theme`in e&&this.setTheme(e.theme??`dark`),this.applyLabel(),this.requestRender()}applyLabel(){this.setLabel(this.options.ariaLabel??this.describe())}destroy(){this.crosshair.destroy(),this.canvas.removeEventListener(`click`,this.onClick),this.canvas.removeEventListener(`pointermove`,this.onMove),super.destroy()}},z=class extends R{compute(e,t,r,i){return(0,n.computeBarLayout)(this.options,e,t,r,i)}draw(e,t,r,i,a,o){(0,n.renderBarChart)(e,t,r,this.options,i,a,o)}describe(){return`Bar chart of ${this.options.series.map(e=>e.name).join(`, `)}, ${this.options.categories.length} categories`}clickable(){return this.options.onBarClick!==void 0}hits(e,t,r){return(0,n.hitBar)(e,t,r)!==null}clickAt(e,t,r){let i=(0,n.hitBar)(e,t,r);i&&this.options.onBarClick?.({category:i.category,series:i.series,value:i.value,index:i.index})}update(e,t){this.setOptions({categories:e,series:t})}},B=class extends R{compute(e,t,r,i){return(0,n.computeDonutLayout)(this.options,e,t,r,i)}draw(e,t,r,i,a,o){(0,n.renderDonut)(e,t,r,this.options,i,a,o)}describe(){let e=this.options.data.filter(e=>Number.isFinite(e.value)&&e.value>0).map(e=>e.label).join(`, `);return`${(this.options.innerRadius??.6)>0?`Donut`:`Pie`} chart of ${e}`}clickable(){return this.options.onSliceClick!==void 0}hits(e,t,r){return(0,n.hitSlice)(e,t,r)!==null}clickAt(e,t,r){let i=(0,n.hitSlice)(e,t,r);i&&this.options.onSliceClick?.(i.slice)}update(e){this.setOptions({data:e})}},V=class extends R{compute(e,t,r,i){return(0,n.computeScatterLayout)(this.options,e,t,r,i)}draw(e,t,r,i,a,o){(0,n.renderScatter)(e,t,r,this.options,i,a,o)}describe(){let e=this.options.series.reduce((e,t)=>e+t.points.length,0);return`Scatter chart${this.options.xLabel&&this.options.yLabel?` of ${this.options.yLabel} against ${this.options.xLabel}`:``}, ${e} points`}clickable(){return this.options.onPointClick!==void 0}hits(e,t,r){return(0,n.nearestPoint)(e,t,r)!==null}clickAt(e,t,r){let i=(0,n.nearestPoint)(e,t,r);i&&this.options.onPointClick?.(i.point,i.series)}update(e){this.setOptions({series:e})}},H=class extends R{compute(e,t,r,i){return(0,n.computeHistogramLayout)(this.options,e,t,r,i)}draw(e,t,r,i,a,o){(0,n.renderHistogram)(e,t,r,this.options,i,a,o)}describe(){return`Histogram of ${this.options.values.length} values`}clickable(){return!1}hits(){return!1}clickAt(){}update(e){this.setOptions({values:e})}},U=class extends R{compute(e,t,r,i){return(0,n.computeCalendarLayout)(this.options,e,t,r,i)}draw(e,t,r,i,a,o){(0,n.renderCalendar)(e,t,r,this.options,i,a,o)}describe(){let e=this.options.data.map(e=>e.date).filter(e=>/^\d{4}-\d{2}-\d{2}$/.test(e)).sort(),t=this.options.from??e[0],n=this.options.to??e[e.length-1];return t&&n?`Calendar of daily values from ${t} to ${n}`:`Calendar of daily values`}clickable(){return this.options.onDayClick!==void 0}hits(e,t,r){return(0,n.hitDay)(e,t,r)?.day!==void 0}clickAt(e,t,r){let i=(0,n.hitDay)(e,t,r)?.day;i&&this.options.onDayClick?.(i)}update(e){this.setOptions({data:e})}},W=12,G=class extends R{compute(e,t,r,i){return(0,n.computeMatrixLayout)(this.options,e,t,r,i)}draw(e,t,r,i,a,o){(0,n.renderMatrix)(e,t,r,this.options,i,a,o)}describe(){let{rows:e,columns:t}=this.options;return t?e.length+t.length<=W?`Matrix of ${e.join(`, `)} by ${t.join(`, `)}`:`Matrix of ${e.length} rows by ${t.length} columns`:e.length<=W?`Matrix of ${e.join(`, `)}`:`Matrix of ${e.length} rows`}clickable(){return this.options.onCellClick!==void 0}hits(e,t,r){return(0,n.hitMatrixCell)(e,t,r)!==null}clickAt(e,t,r){let i=(0,n.hitMatrixCell)(e,t,r);i&&this.options.onCellClick?.(i.cell)}update(e){this.setOptions({values:e})}},ce=class extends R{compute(e,t,r,i){return(0,n.computeCounterClockLayout)(this.options,e,t,r,i)}draw(e,t,r,i,a,o){(0,n.renderCounterClock)(e,t,r,this.options,i,a,o)}describe(){return`Counter-clock chart of price against volume, ${this.options.period??25}-bar averages`}clickable(){return this.options.onPointClick!==void 0}hits(e,t,r){return(0,n.nearestCounterClockPoint)(e,t,r)!==null}clickAt(e,t,r){let i=(0,n.nearestCounterClockPoint)(e,t,r);i&&this.options.onPointClick?.(i.point)}getPhase(){return(0,n.counterClockPhase)((0,n.counterClockPoints)(this.options.data,this.options.period??25,(0,n.shownCount)(this.options)))}update(e){this.setOptions({data:e})}},le=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`];function K(e){return e.map(e=>({time:e.time,value:e.equity}))}function q(e){let t=-1/0;return e.map(e=>{e.equity>t&&(t=e.equity);let n=t>0?(e.equity/t-1)*100:0;return{time:e.time,value:n}})}function J(e){if(e.length===0)return[];let n=[];for(let r of e){let e=(0,t.timeframeBucketStart)(r.time,`1M`),i=n[n.length-1];i&&i.key===e?i.close=r.equity:n.push({key:e,close:r.equity})}let r=e[0].equity,i=[];for(let e of n){let t=r===0?1:r,n=(e.close/t-1)*100;r=e.close;let a=new Date(e.key),o=a.getUTCFullYear(),s=a.getUTCMonth();i.push({id:`${o}-${String(s+1).padStart(2,`0`)}`,label:le[s],group:String(o),value:n})}return i}var Y=100;function X(e){return`${e>0?`+`:``}${e.toFixed(2)}%`}function Z(e){return e>0?`positive`:e<0?`negative`:`neutral`}function Q(e){return[{label:`Total Return`,value:X(e.totalReturnPct*Y),tone:Z(e.totalReturnPct)},{label:`CAGR`,value:X(e.cagr*Y),tone:Z(e.cagr)},{label:`Sharpe`,value:e.sharpe.toFixed(2),tone:Z(e.sharpe)},{label:`Sortino`,value:e.sortino.toFixed(2),tone:Z(e.sortino)},{label:`Max Drawdown`,value:X(-Math.abs(e.maxDrawdownPct)*Y),tone:`negative`},{label:`Win Rate`,value:`${(e.winRate*Y).toFixed(1)}%`,tone:`neutral`},{label:`Profit Factor`,value:Number.isFinite(e.profitFactor)?e.profitFactor.toFixed(2):`∞`,tone:Z(e.profitFactor-1)},{label:`Trades`,value:String(e.trades),tone:`neutral`}]}function $(e){return!e||e===`dark`?t.DARK_THEME:e===`light`?t.LIGHT_THEME:e}var ue=class{options;theme;root;equityChart=null;drawdownChart=null;heatmap=null;constructor(e,t){this.options=t,this.theme=$(t.theme),this.root=document.createElement(`div`),this.build(),e.appendChild(this.root)}build(){let e=this.theme,{result:t,title:n,subtitle:r}=this.options,i=this.panelBackground(),a=e.grid;if(this.root.style.cssText=[`display:flex`,`flex-direction:column`,`gap:14px`,`width:100%`,`box-sizing:border-box`,`padding:16px`,`background:${e.background}`,`color:${e.text}`,`font-family:${e.font.family}`].join(`;`),n||r){let t=document.createElement(`div`);if(n){let r=document.createElement(`div`);r.textContent=n,r.style.cssText=`font-size:${e.font.sizeLarge}px;font-weight:600;letter-spacing:-0.01em;`,t.appendChild(r)}if(r){let n=document.createElement(`div`);n.textContent=r,n.style.cssText=`font-size:${e.font.sizeSmall}px;color:${e.textSecondary};margin-top:2px;`,t.appendChild(n)}this.root.appendChild(t)}this.root.appendChild(this.buildStatsStrip(Q(t.metrics),i,a));let o=document.createElement(`div`);o.style.cssText=[`display:grid`,`grid-template-columns:repeat(auto-fit, minmax(280px, 1fr))`,`grid-auto-rows:220px`,`gap:14px`].join(`;`),this.root.appendChild(o);let s=this.buildPanel(`Equity Curve`,i,a);s.wrap.style.gridColumn=`1 / -1`,o.appendChild(s.wrap),this.equityChart=new M(s.body,{data:K(t.equityCurve),theme:e,lineColor:e.candleUp,fillArea:!0,crosshair:!0});let c=this.buildPanel(`Drawdown`,i,a);o.appendChild(c.wrap),this.drawdownChart=new M(c.body,{data:q(t.equityCurve),theme:e,lineColor:e.candleDown,fillArea:!0,crosshair:!0,valueFormat:e=>`${e.toFixed(1)}%`});let l=J(t.equityCurve),u=this.buildPanel(`Monthly Returns`,i,a);o.appendChild(u.wrap),this.heatmap=new N(u.body,{data:l,theme:e,showValues:!0,valueFormat:e=>`${e>=0?`+`:``}${e.toFixed(1)}`,colorScale:{negative:e.candleDown,zero:i,positive:e.candleUp}})}buildStatsStrip(e,t,n){let r=document.createElement(`div`);r.style.cssText=[`display:grid`,`grid-template-columns:repeat(auto-fit, minmax(120px, 1fr))`,`gap:10px`].join(`;`);let i=this.theme;for(let a of e){let e=document.createElement(`div`);e.style.cssText=[`background:${t}`,`border:1px solid ${n}`,`border-radius:10px`,`padding:10px 12px`,`display:flex`,`flex-direction:column`,`gap:4px`].join(`;`);let o=document.createElement(`div`);o.textContent=a.label,o.style.cssText=`font-size:${i.font.sizeSmall}px;color:${i.textSecondary};text-transform:uppercase;letter-spacing:0.04em;`;let s=document.createElement(`div`);s.textContent=a.value;let c=a.tone===`positive`?i.candleUp:a.tone===`negative`?i.candleDown:i.text;s.style.cssText=`font-size:${i.font.sizeLarge}px;font-weight:600;color:${c};font-variant-numeric:tabular-nums;`,e.appendChild(o),e.appendChild(s),r.appendChild(e)}return r}buildPanel(e,t,n){let r=this.theme,i=document.createElement(`div`);i.style.cssText=[`background:${t}`,`border:1px solid ${n}`,`border-radius:10px`,`overflow:hidden`,`display:flex`,`flex-direction:column`].join(`;`);let a=document.createElement(`div`);a.textContent=e,a.style.cssText=[`font-size:${r.font.sizeSmall}px`,`font-weight:600`,`color:${r.textSecondary}`,`padding:8px 12px`,`border-bottom:1px solid ${n}`,`text-transform:uppercase`,`letter-spacing:0.04em`].join(`;`);let o=document.createElement(`div`);return o.style.cssText=`flex:1;min-height:0;position:relative;`,i.appendChild(a),i.appendChild(o),{wrap:i,body:o}}panelBackground(){return this.theme.name===`light`?`rgba(0,0,0,0.02)`:`rgba(255,255,255,0.03)`}update(e){this.options={...this.options,result:e},this.destroyCharts(),this.root.replaceChildren(),this.build()}setTheme(e){this.theme=$(e),this.options={...this.options,theme:e},this.destroyCharts(),this.root.replaceChildren(),this.build()}destroyCharts(){this.equityChart?.destroy(),this.drawdownChart?.destroy(),this.heatmap?.destroy(),this.equityChart=null,this.drawdownChart=null,this.heatmap=null}destroy(){this.destroyCharts(),this.root.remove()}};Object.defineProperty(exports,`AlertManager`,{enumerable:!0,get:function(){return n.AlertManager}}),Object.defineProperty(exports,`Animator`,{enumerable:!0,get:function(){return n.Animator}}),exports.BarChart=z,Object.defineProperty(exports,`BarCountdown`,{enumerable:!0,get:function(){return n.BarCountdown}}),Object.defineProperty(exports,`BinanceAdapter`,{enumerable:!0,get:function(){return n.BinanceAdapter}}),Object.defineProperty(exports,`BybitAdapter`,{enumerable:!0,get:function(){return n.BybitAdapter}}),Object.defineProperty(exports,`CANDLE_PATTERNS`,{enumerable:!0,get:function(){return n.CANDLE_PATTERNS}}),Object.defineProperty(exports,`CHART_STYLE_KEYS`,{enumerable:!0,get:function(){return t.CHART_STYLE_KEYS}}),exports.CORRECTABLE_BARS=a,exports.CalendarChart=U,exports.Chart=e.h,exports.ChartGrid=oe,Object.defineProperty(exports,`ChartLegend`,{enumerable:!0,get:function(){return n.ChartLegend}}),Object.defineProperty(exports,`ChartStateManager`,{enumerable:!0,get:function(){return n.ChartStateManager}}),Object.defineProperty(exports,`CoinbaseAdapter`,{enumerable:!0,get:function(){return n.CoinbaseAdapter}}),Object.defineProperty(exports,`CompareRenderer`,{enumerable:!0,get:function(){return n.CompareRenderer}}),exports.CounterClockChart=ce,Object.defineProperty(exports,`CrosshairTooltip`,{enumerable:!0,get:function(){return n.CrosshairTooltip}}),Object.defineProperty(exports,`CurrentPriceLine`,{enumerable:!0,get:function(){return n.CurrentPriceLine}}),Object.defineProperty(exports,`DARK_PRICE_LIMITS`,{enumerable:!0,get:function(){return t.DARK_PRICE_LIMITS}}),Object.defineProperty(exports,`DARK_TERMINAL`,{enumerable:!0,get:function(){return t.DARK_TERMINAL}}),Object.defineProperty(exports,`DARK_THEME`,{enumerable:!0,get:function(){return t.DARK_THEME}}),Object.defineProperty(exports,`DEFAULT_DRAWING_STYLE`,{enumerable:!0,get:function(){return t.DEFAULT_DRAWING_STYLE}}),Object.defineProperty(exports,`DEFAULT_FONT_FAMILY`,{enumerable:!0,get:function(){return t.DEFAULT_FONT_FAMILY}}),exports.DEFAULT_HISTORY_PAGE_SIZE=e.A,Object.defineProperty(exports,`DEFAULT_LEGEND_CONFIG`,{enumerable:!0,get:function(){return n.DEFAULT_LEGEND_CONFIG}}),Object.defineProperty(exports,`DEFAULT_MAX_WEBGL_CHARTS`,{enumerable:!0,get:function(){return n.DEFAULT_MAX_WEBGL_CHARTS}}),Object.defineProperty(exports,`DEFAULT_RECONNECT`,{enumerable:!0,get:function(){return t.DEFAULT_RECONNECT}}),Object.defineProperty(exports,`DEFAULT_SESSION_HOURS`,{enumerable:!0,get:function(){return n.DEFAULT_SESSION_HOURS}}),Object.defineProperty(exports,`DEFAULT_SIGNAL_STYLE`,{enumerable:!0,get:function(){return t.DEFAULT_SIGNAL_STYLE}}),Object.defineProperty(exports,`DEFAULT_STREAM_CONFIG`,{enumerable:!0,get:function(){return t.DEFAULT_STREAM_CONFIG}}),Object.defineProperty(exports,`DEFAULT_TIMEFRAME_FAVORITES`,{enumerable:!0,get:function(){return t.DEFAULT_TIMEFRAME_FAVORITES}}),Object.defineProperty(exports,`DEFAULT_TRADE_ZONE_STYLE`,{enumerable:!0,get:function(){return t.DEFAULT_TRADE_ZONE_STYLE}}),Object.defineProperty(exports,`DEFAULT_TRADING_CONFIG`,{enumerable:!0,get:function(){return t.DEFAULT_TRADING_CONFIG}}),Object.defineProperty(exports,`DataExporter`,{enumerable:!0,get:function(){return n.DataExporter}}),exports.DataManager=e.M,exports.DepthChart=j,exports.DonutChart=B,exports.DragDropImporter=e.p,Object.defineProperty(exports,`DrawingBase`,{enumerable:!0,get:function(){return n.DrawingBase}}),exports.EXCHANGE_TIMEZONE=e.g,exports.EXCHANGE_TIME_ZONE=e._,Object.defineProperty(exports,`Easing`,{enumerable:!0,get:function(){return n.Easing}}),exports.EquityCurveChart=M,exports.GaugeChart=L,exports.HISTORY_RETRY_MS=e.j,Object.defineProperty(exports,`HNX_SESSIONS`,{enumerable:!0,get:function(){return t.HNX_SESSIONS}}),Object.defineProperty(exports,`HOSE_SESSIONS`,{enumerable:!0,get:function(){return t.HOSE_SESSIONS}}),exports.HeatmapChart=N,exports.HistogramChart=H,Object.defineProperty(exports,`INDICATOR_CATEGORIES`,{enumerable:!0,get:function(){return n.INDICATOR_CATEGORIES}}),Object.defineProperty(exports,`IndicatorBase`,{enumerable:!0,get:function(){return n.IndicatorBase}}),Object.defineProperty(exports,`IndicatorValueMap`,{enumerable:!0,get:function(){return n.IndicatorValueMap}}),Object.defineProperty(exports,`KEPT_BUCKETS`,{enumerable:!0,get:function(){return n.KEPT_BUCKETS}}),Object.defineProperty(exports,`KRX_SESSIONS`,{enumerable:!0,get:function(){return t.KRX_SESSIONS}}),Object.defineProperty(exports,`KR_COLORS`,{enumerable:!0,get:function(){return t.KR_COLORS}}),Object.defineProperty(exports,`KeyboardHandler`,{enumerable:!0,get:function(){return n.KeyboardHandler}}),Object.defineProperty(exports,`KrakenAdapter`,{enumerable:!0,get:function(){return n.KrakenAdapter}}),Object.defineProperty(exports,`LIGHT_PRICE_LIMITS`,{enumerable:!0,get:function(){return t.LIGHT_PRICE_LIMITS}}),Object.defineProperty(exports,`LIGHT_THEME`,{enumerable:!0,get:function(){return t.LIGHT_THEME}}),exports.LayoutManager=e.O,exports.LayoutSession=e.t,Object.defineProperty(exports,`MARKET_CRYPTO`,{enumerable:!0,get:function(){return t.MARKET_CRYPTO}}),Object.defineProperty(exports,`MARKET_HNX`,{enumerable:!0,get:function(){return t.MARKET_HNX}}),Object.defineProperty(exports,`MARKET_HOSE`,{enumerable:!0,get:function(){return t.MARKET_HOSE}}),Object.defineProperty(exports,`MARKET_HOSE_ETF`,{enumerable:!0,get:function(){return t.MARKET_HOSE_ETF}}),Object.defineProperty(exports,`MARKET_KRX`,{enumerable:!0,get:function(){return t.MARKET_KRX}}),Object.defineProperty(exports,`MARKET_NXT`,{enumerable:!0,get:function(){return t.MARKET_NXT}}),Object.defineProperty(exports,`MARKET_NYSE`,{enumerable:!0,get:function(){return t.MARKET_NYSE}}),Object.defineProperty(exports,`MARKET_UPBIT_KRW`,{enumerable:!0,get:function(){return t.MARKET_UPBIT_KRW}}),Object.defineProperty(exports,`MARKET_UPCOM`,{enumerable:!0,get:function(){return t.MARKET_UPCOM}}),Object.defineProperty(exports,`MARKET_VN30F`,{enumerable:!0,get:function(){return t.MARKET_VN30F}}),Object.defineProperty(exports,`MAX_ALERT_BARS`,{enumerable:!0,get:function(){return n.MAX_ALERT_BARS}}),exports.MAX_LAYOUT_NAME=e.n,Object.defineProperty(exports,`MIN_ALERT_BARS`,{enumerable:!0,get:function(){return n.MIN_ALERT_BARS}}),Object.defineProperty(exports,`MS_TIME_THRESHOLD`,{enumerable:!0,get:function(){return t.MS_TIME_THRESHOLD}}),Object.defineProperty(exports,`ManualFeed`,{enumerable:!0,get:function(){return n.ManualFeed}}),exports.MatrixChart=G,Object.defineProperty(exports,`MockAdapter`,{enumerable:!0,get:function(){return n.MockAdapter}}),Object.defineProperty(exports,`NXT_SESSIONS`,{enumerable:!0,get:function(){return t.NXT_SESSIONS}}),exports.PLUGIN_API_VERSION=e.T,exports.POWERED_BY_LABEL=_,Object.defineProperty(exports,`PRICE_SOURCES`,{enumerable:!0,get:function(){return t.PRICE_SOURCES}}),Object.defineProperty(exports,`PaperExecutionAdapter`,{enumerable:!0,get:function(){return n.PaperExecutionAdapter}}),exports.PerformanceDashboard=ue,exports.PluginManager=e.b,Object.defineProperty(exports,`PollingAdapter`,{enumerable:!0,get:function(){return n.PollingAdapter}}),Object.defineProperty(exports,`RANGE_PRESETS`,{enumerable:!0,get:function(){return n.RANGE_PRESETS}}),Object.defineProperty(exports,`ReconnectManager`,{enumerable:!0,get:function(){return n.ReconnectManager}}),Object.defineProperty(exports,`ReplayController`,{enumerable:!0,get:function(){return n.ReplayController}}),Object.defineProperty(exports,`ReplayManager`,{enumerable:!0,get:function(){return n.ReplayManager}}),Object.defineProperty(exports,`ResamplingAdapter`,{enumerable:!0,get:function(){return n.ResamplingAdapter}}),Object.defineProperty(exports,`ReshapeMemo`,{enumerable:!0,get:function(){return n.ReshapeMemo}}),Object.defineProperty(exports,`SANS_FONT_FAMILY`,{enumerable:!0,get:function(){return t.SANS_FONT_FAMILY}}),exports.ScatterChart=V,Object.defineProperty(exports,`Screenshot`,{enumerable:!0,get:function(){return n.Screenshot}}),Object.defineProperty(exports,`SessionBreaks`,{enumerable:!0,get:function(){return n.SessionBreaks}}),Object.defineProperty(exports,`SessionShading`,{enumerable:!0,get:function(){return n.SessionShading}}),Object.defineProperty(exports,`SignalMarkerManager`,{enumerable:!0,get:function(){return n.SignalMarkerManager}}),exports.SparklineChart=se,Object.defineProperty(exports,`StreamManager`,{enumerable:!0,get:function(){return n.StreamManager}}),Object.defineProperty(exports,`TC_PALETTE`,{enumerable:!0,get:function(){return t.TC_PALETTE}}),Object.defineProperty(exports,`TC_SERIES_COLORS`,{enumerable:!0,get:function(){return t.TC_SERIES_COLORS}}),Object.defineProperty(exports,`TIMEFRAMES_CRYPTO`,{enumerable:!0,get:function(){return t.TIMEFRAMES_CRYPTO}}),Object.defineProperty(exports,`TIMEFRAMES_FOREX`,{enumerable:!0,get:function(){return t.TIMEFRAMES_FOREX}}),Object.defineProperty(exports,`TIMEFRAMES_STOCK`,{enumerable:!0,get:function(){return t.TIMEFRAMES_STOCK}}),exports.TRADECANVAS_MARK_SVG=v,exports.TRADECANVAS_URL=g,exports.TRADECANVAS_WORDMARK_SVG=y,exports.ThemeManager=e.k,Object.defineProperty(exports,`TickAggregator`,{enumerable:!0,get:function(){return n.TickAggregator}}),Object.defineProperty(exports,`TickBarAdapter`,{enumerable:!0,get:function(){return n.TickBarAdapter}}),Object.defineProperty(exports,`TickBarBuilder`,{enumerable:!0,get:function(){return n.TickBarBuilder}}),Object.defineProperty(exports,`TradeZoneManager`,{enumerable:!0,get:function(){return n.TradeZoneManager}}),Object.defineProperty(exports,`UPCOM_SESSIONS`,{enumerable:!0,get:function(){return t.UPCOM_SESSIONS}}),Object.defineProperty(exports,`UndoRedoManager`,{enumerable:!0,get:function(){return n.UndoRedoManager}}),Object.defineProperty(exports,`UpbitAdapter`,{enumerable:!0,get:function(){return n.UpbitAdapter}}),Object.defineProperty(exports,`VN30F_SESSIONS`,{enumerable:!0,get:function(){return t.VN30F_SESSIONS}}),Object.defineProperty(exports,`VN_COLORS`,{enumerable:!0,get:function(){return t.VN_COLORS}}),Object.defineProperty(exports,`VOLUME_ALPHA`,{enumerable:!0,get:function(){return t.VOLUME_ALPHA}}),Object.defineProperty(exports,`VolumeRenderer`,{enumerable:!0,get:function(){return n.VolumeRenderer}}),exports.WaterfallChart=P,Object.defineProperty(exports,`Watermark`,{enumerable:!0,get:function(){return n.Watermark}}),Object.defineProperty(exports,`WebSocketAdapter`,{enumerable:!0,get:function(){return n.WebSocketAdapter}}),Object.defineProperty(exports,`adapterFromFeed`,{enumerable:!0,get:function(){return n.adapterFromFeed}}),Object.defineProperty(exports,`axisTimes`,{enumerable:!0,get:function(){return n.axisTimes}}),Object.defineProperty(exports,`barIndexToX`,{enumerable:!0,get:function(){return n.barIndexToX}}),Object.defineProperty(exports,`barTimeUnit`,{enumerable:!0,get:function(){return t.barTimeUnit}}),Object.defineProperty(exports,`barsAreDaily`,{enumerable:!0,get:function(){return t.barsAreDaily}}),exports.cleanLayoutName=e.r,exports.clearGlobalPlugins=e.x,exports.computeDrawdownCurve=q,exports.computeMonthlyReturns=J,Object.defineProperty(exports,`computePriceLimits`,{enumerable:!0,get:function(){return t.computePriceLimits}}),Object.defineProperty(exports,`contrastRatio`,{enumerable:!0,get:function(){return t.contrastRatio}}),Object.defineProperty(exports,`correlationMatrix`,{enumerable:!0,get:function(){return n.correlationMatrix}}),Object.defineProperty(exports,`counterClockPhase`,{enumerable:!0,get:function(){return n.counterClockPhase}}),Object.defineProperty(exports,`counterClockPoints`,{enumerable:!0,get:function(){return n.counterClockPoints}}),Object.defineProperty(exports,`createMarketTheme`,{enumerable:!0,get:function(){return t.createMarketTheme}}),exports.createPoweredBy=ie,Object.defineProperty(exports,`createVNTheme`,{enumerable:!0,get:function(){return t.createVNTheme}}),Object.defineProperty(exports,`describeInputs`,{enumerable:!0,get:function(){return n.describeInputs}}),Object.defineProperty(exports,`detectCandlePatterns`,{enumerable:!0,get:function(){return n.detectCandlePatterns}}),exports.feedBars=h,Object.defineProperty(exports,`feedFromAdapter`,{enumerable:!0,get:function(){return n.feedFromAdapter}}),Object.defineProperty(exports,`formatFraction`,{enumerable:!0,get:function(){return t.formatFraction}}),Object.defineProperty(exports,`formatNumber`,{enumerable:!0,get:function(){return t.formatNumber}}),Object.defineProperty(exports,`formatTooltipTime`,{enumerable:!0,get:function(){return n.formatTooltipTime}}),Object.defineProperty(exports,`formatVND`,{enumerable:!0,get:function(){return t.formatVND}}),Object.defineProperty(exports,`formatVolumeLoc`,{enumerable:!0,get:function(){return t.formatVolumeLoc}}),Object.defineProperty(exports,`fractionTick`,{enumerable:!0,get:function(){return t.fractionTick}}),Object.defineProperty(exports,`getCurrentSession`,{enumerable:!0,get:function(){return t.getCurrentSession}}),exports.getGlobalPlugins=e.S,Object.defineProperty(exports,`getLocale`,{enumerable:!0,get:function(){return t.getLocale}}),Object.defineProperty(exports,`histogramBins`,{enumerable:!0,get:function(){return n.histogramBins}}),Object.defineProperty(exports,`indicatorCategory`,{enumerable:!0,get:function(){return n.indicatorCategory}}),Object.defineProperty(exports,`indicatorSource`,{enumerable:!0,get:function(){return t.indicatorSource}}),Object.defineProperty(exports,`inkOn`,{enumerable:!0,get:function(){return t.inkOn}}),Object.defineProperty(exports,`isDataFeed`,{enumerable:!0,get:function(){return n.isDataFeed}}),Object.defineProperty(exports,`isPriceLevelAlert`,{enumerable:!0,get:function(){return n.isPriceLevelAlert}}),Object.defineProperty(exports,`isPriceSource`,{enumerable:!0,get:function(){return t.isPriceSource}}),Object.defineProperty(exports,`isTimeFrame`,{enumerable:!0,get:function(){return t.isTimeFrame}}),Object.defineProperty(exports,`isValidTimeZone`,{enumerable:!0,get:function(){return t.isValidTimeZone}}),exports.localStorageLayouts=e.i,Object.defineProperty(exports,`lttbDownsample`,{enumerable:!0,get:function(){return n.lttbDownsample}}),Object.defineProperty(exports,`lttbVisibleIndices`,{enumerable:!0,get:function(){return n.lttbVisibleIndices}}),Object.defineProperty(exports,`marketStatus`,{enumerable:!0,get:function(){return t.marketStatus}}),exports.memoryLayouts=e.a,Object.defineProperty(exports,`niceScale`,{enumerable:!0,get:function(){return n.niceScale}}),Object.defineProperty(exports,`normalizeBar`,{enumerable:!0,get:function(){return t.normalizeBar}}),Object.defineProperty(exports,`normalizeBarTime`,{enumerable:!0,get:function(){return t.normalizeBarTime}}),Object.defineProperty(exports,`offsetAt`,{enumerable:!0,get:function(){return t.offsetAt}}),exports.opensElsewhere=O,exports.overlayScale=ae,exports.overlaysForLayer=e.E,Object.defineProperty(exports,`parseIndicatorSource`,{enumerable:!0,get:function(){return t.parseIndicatorSource}}),exports.parseOHLCV=e.m,Object.defineProperty(exports,`parseTimeframe`,{enumerable:!0,get:function(){return t.parseTimeframe}}),Object.defineProperty(exports,`pickBaseTimeframe`,{enumerable:!0,get:function(){return t.pickBaseTimeframe}}),exports.pluginKey=e.D,exports.poweredByHtml=A,exports.poweredByLayout=w,Object.defineProperty(exports,`priceFormatterFor`,{enumerable:!0,get:function(){return t.priceFormatterFor}}),Object.defineProperty(exports,`priceStepAt`,{enumerable:!0,get:function(){return t.priceStepAt}}),Object.defineProperty(exports,`priceToY`,{enumerable:!0,get:function(){return n.priceToY}}),Object.defineProperty(exports,`priceToYMapper`,{enumerable:!0,get:function(){return n.priceToYMapper}}),Object.defineProperty(exports,`rangePresetStart`,{enumerable:!0,get:function(){return n.rangePresetStart}}),Object.defineProperty(exports,`rankSymbols`,{enumerable:!0,get:function(){return t.rankSymbols}}),Object.defineProperty(exports,`readNews`,{enumerable:!0,get:function(){return t.readNews}}),Object.defineProperty(exports,`readQuote`,{enumerable:!0,get:function(){return t.readQuote}}),Object.defineProperty(exports,`readableOn`,{enumerable:!0,get:function(){return t.readableOn}}),Object.defineProperty(exports,`registerLocale`,{enumerable:!0,get:function(){return t.registerLocale}}),exports.registerPlugin=e.C,Object.defineProperty(exports,`resampleBars`,{enumerable:!0,get:function(){return t.resampleBars}}),Object.defineProperty(exports,`roundToPriceStep`,{enumerable:!0,get:function(){return t.roundToPriceStep}}),exports.safeBadgeHref=D,Object.defineProperty(exports,`scaleMarketPrices`,{enumerable:!0,get:function(){return t.scaleMarketPrices}}),exports.selectKeyStats=Q,Object.defineProperty(exports,`servesTimeframe`,{enumerable:!0,get:function(){return n.servesTimeframe}}),Object.defineProperty(exports,`setLocale`,{enumerable:!0,get:function(){return t.setLocale}}),Object.defineProperty(exports,`setMaxWebGLCharts`,{enumerable:!0,get:function(){return n.setMaxWebGLCharts}}),Object.defineProperty(exports,`sourcePrice`,{enumerable:!0,get:function(){return t.sourcePrice}}),Object.defineProperty(exports,`stepDecimals`,{enumerable:!0,get:function(){return t.stepDecimals}}),Object.defineProperty(exports,`symbolTimeZone`,{enumerable:!0,get:function(){return t.symbolTimeZone}}),exports.syncIndicators=i,Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t.t}}),Object.defineProperty(exports,`tickBarCount`,{enumerable:!0,get:function(){return t.tickBarCount}}),Object.defineProperty(exports,`tickerOf`,{enumerable:!0,get:function(){return t.tickerOf}}),Object.defineProperty(exports,`timeToX`,{enumerable:!0,get:function(){return n.timeToX}}),Object.defineProperty(exports,`timeframeBucketStart`,{enumerable:!0,get:function(){return t.timeframeBucketStart}}),Object.defineProperty(exports,`timeframeToMs`,{enumerable:!0,get:function(){return t.timeframeToMs}}),Object.defineProperty(exports,`timestampToBarIndex`,{enumerable:!0,get:function(){return n.timestampToBarIndex}}),exports.toEquityPoints=K,Object.defineProperty(exports,`toHeikinAshi`,{enumerable:!0,get:function(){return n.toHeikinAshi}}),Object.defineProperty(exports,`toKagi`,{enumerable:!0,get:function(){return n.toKagi}}),Object.defineProperty(exports,`toLineBreak`,{enumerable:!0,get:function(){return n.toLineBreak}}),Object.defineProperty(exports,`toPointAndFigure`,{enumerable:!0,get:function(){return n.toPointAndFigure}}),Object.defineProperty(exports,`toRangeBars`,{enumerable:!0,get:function(){return n.toRangeBars}}),Object.defineProperty(exports,`toRenko`,{enumerable:!0,get:function(){return n.toRenko}}),exports.unregisterPlugin=e.w,Object.defineProperty(exports,`usesKoreanUnits`,{enumerable:!0,get:function(){return t.usesKoreanUnits}}),Object.defineProperty(exports,`vn30fContracts`,{enumerable:!0,get:function(){return t.vn30fContracts}}),Object.defineProperty(exports,`vn30fLastTradingDay`,{enumerable:!0,get:function(){return t.vn30fLastTradingDay}}),Object.defineProperty(exports,`volumeColor`,{enumerable:!0,get:function(){return t.volumeColor}}),Object.defineProperty(exports,`wallToUtc`,{enumerable:!0,get:function(){return t.wallToUtc}}),Object.defineProperty(exports,`withResampling`,{enumerable:!0,get:function(){return n.withResampling}}),Object.defineProperty(exports,`withTickBars`,{enumerable:!0,get:function(){return n.withTickBars}}),Object.defineProperty(exports,`xToBarIndex`,{enumerable:!0,get:function(){return n.xToBarIndex}}),Object.defineProperty(exports,`xToTime`,{enumerable:!0,get:function(){return n.xToTime}}),Object.defineProperty(exports,`yToPrice`,{enumerable:!0,get:function(){return n.yToPrice}}),Object.defineProperty(exports,`zoneOffsetMinutes`,{enumerable:!0,get:function(){return t.zoneOffsetMinutes}});
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./LayoutSession-CoYba3EO.cjs`);let t=require(`@tradecanvas/commons`),n=require(`@tradecanvas/core`);function r(e){let{id:t,params:n={},position:r=null}=typeof e==`string`?{id:e}:e;return JSON.stringify([t,Object.keys(n).sort().map(e=>[e,n[e]]),r])}function i(e,t,n){let i=new Map,a=t.map(e=>{let t=r(e),n=i.get(t)??0;return i.set(t,n+1),{spec:e,key:`${t}#${n}`}}),o=new Set(a.map(e=>e.key));for(let[t,r]of[...n])o.has(t)||(e.removeIndicator(r),n.delete(t));for(let{spec:t,key:r}of a){if(n.has(r))continue;let i=typeof t==`string`?e.addIndicator(t):t.position===void 0?e.addIndicator(t.id,t.params??{}):e.addIndicator(t.id,t.params??{},t.position);i&&n.set(r,i)}}var a=3,o=e=>({time:e.time,open:e.open,high:e.high,low:e.low,close:e.close,volume:e.volume}),s=e=>e.length>0?e[e.length-1]:null;function c(t,n,r){for(let i=0;i<r;i++)if(!e.N(t[i],n[i]))return!1;return!0}function l(e,t){if(e.isReplayActive())return!0;let n=s(e.getData());return t.inReplay?n?.time===t.last?.time:n===t.shownBar?n?.time===t.last?.time||!e.isExtendedHoursVisible():!1}function u(t,n,r){let i=[];for(let a=0;a<n.length;a++){let s=t[r+a];if(!e.N(s,n[a])){if(s.time!==n[a].time||!e.M(s))return null;i.push(o(s))}}return i}function d(e,t){if(t.length===0)return!0;if(!e.updateBar)return!1;for(let n of t)if(!e.updateBar(n))return!1;return!0}function f(e){return e.slice(Math.max(1,e.length-1-3),-1).map(o)}function p(t,n){let r=[];for(let i=n;i<t.length;i++){if(!e.M(t[i])||!(t[i].time>t[i-1].time))return null;r.push(o(t[i]))}return r}function m(t,n,r){let i=r.length;if(i===0||!r.last||!e.M(r.last)||n.length<i||!l(t,r))return!1;let a=r.recent??[],s=i-1-a.length;if(n!==r.source&&(r.source.length!==i||!c(r.source,n,s)))return!1;let f=n[i-1];if(f.time!==r.last.time||!e.M(f))return!1;let m=u(n,a,s),h=p(n,i);return!m||!h||!d(t,m)?!1:(e.N(f,r.last)||t.updateLastBar(o(f)),h.length===1?t.appendBar(h[0]):h.length>1&&t.appendBars(h),!0)}function h(e,t,n){(!n||!m(e,t,n))&&e.setData(t.map(o));let r=t.length>0?o(t[t.length-1]):null,i=e.isReplayActive();return{source:t,length:t.length,last:r,recent:f(t),shownBar:i?null:s(e.getData()),inReplay:i}}var g=`https://tradecanvas.dev`,_=`Powered by TradeCanvas`,v=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" aria-hidden="true" focusable="false"><path d="M186 70A82 82 0 1 0 186 186" fill="none" stroke="currentColor" stroke-width="22" stroke-linecap="round"/><rect x="92" y="74" width="72" height="20" rx="10" fill="currentColor"/><path fill="#E8961E" d="M119 94H137V108H144a10 10 0 0 1 10 10V164a10 10 0 0 1-10 10H137V190H119V174H112a10 10 0 0 1-10-10V118a10 10 0 0 1 10-10H119Z"/></svg>`,y=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 16 686 88" aria-hidden="true" focusable="false"><path fill="currentColor" transform="translate(0 101.64)" d="M27.24 0.00L27.24 -69.72L1.32 -69.72L1.32 -83.64L68.76 -83.64L68.76 -69.72L42.96 -69.72L42.96 0.00ZM70.90 0.00L70.90 -59.16L85.90 -59.16L85.90 -50.64Q86.26 -51.36 86.74 -51.96Q89.50 -55.92 93.52 -58.14Q97.54 -60.36 101.74 -60.36Q104.74 -60.36 107.44 -59.58Q110.14 -58.80 113.02 -57.00L105.82 -43.56Q104.50 -44.28 102.46 -44.88Q100.42 -45.48 98.38 -45.48Q95.98 -45.48 93.76 -44.64Q91.54 -43.80 89.80 -42.00Q88.06 -40.20 86.98 -37.20Q86.50 -35.52 86.20 -32.94Q85.90 -30.36 85.90 -25.44L85.90 0.00ZM156.44 0.00L155.36 -7.56Q155.00 -6.96 154.52 -6.36Q151.28 -2.40 147.20 -0.60Q143.12 1.20 138.56 1.20Q132.08 1.20 126.98 -1.20Q121.88 -3.60 118.94 -8.04Q116.00 -12.48 116.00 -18.24Q116.00 -23.40 118.10 -27.06Q120.20 -30.72 123.68 -32.64Q126.68 -34.44 130.34 -35.16Q134.00 -35.88 138.20 -35.88L155.24 -35.88L155.24 -37.32Q155.24 -42.60 151.94 -45.18Q148.64 -47.76 143.00 -47.76Q138.32 -47.76 133.46 -45.90Q128.60 -44.04 124.88 -40.68L117.32 -50.88Q123.56 -55.92 130.10 -58.14Q136.64 -60.36 144.20 -60.36Q156.44 -60.36 163.28 -54.24Q170.12 -48.12 170.12 -37.32L170.12 0.00ZM155.24 -24.84L140.36 -24.84Q138.44 -24.84 136.58 -24.54Q134.72 -24.24 133.40 -23.16Q132.20 -22.32 131.60 -21.06Q131.00 -19.80 131.00 -18.24Q131.00 -14.88 133.64 -12.84Q136.28 -10.80 140.72 -10.80Q144.68 -10.80 147.98 -12.54Q151.28 -14.28 153.26 -17.34Q155.24 -20.40 155.24 -24.36ZM202.98 1.20Q195.18 1.20 189.54 -2.82Q183.90 -6.84 180.84 -13.86Q177.78 -20.88 177.78 -29.64Q177.78 -39.36 181.20 -46.20Q184.62 -53.04 190.38 -56.70Q196.14 -60.36 202.98 -60.36Q207.78 -60.36 211.92 -58.38Q216.06 -56.40 219.06 -52.44Q219.54 -51.72 220.02 -51.00L220.02 -83.64L234.78 -83.64L234.78 0.00L220.02 0.00L220.02 -8.04Q219.54 -7.20 218.94 -6.48Q215.70 -2.28 211.56 -0.54Q207.42 1.20 202.98 1.20ZM207.06 -12.48Q211.50 -12.48 214.68 -14.64Q217.86 -16.80 219.60 -20.64Q221.34 -24.48 221.34 -29.64Q221.34 -34.80 219.60 -38.64Q217.86 -42.48 214.68 -44.58Q211.50 -46.68 207.06 -46.68Q202.74 -46.68 199.50 -44.58Q196.26 -42.48 194.52 -38.70Q192.78 -34.92 192.78 -29.64Q192.78 -24.36 194.52 -20.52Q196.26 -16.68 199.50 -14.58Q202.74 -12.48 207.06 -12.48ZM272.32 1.20Q264.64 1.20 259.12 -1.32Q253.60 -3.84 250.06 -8.10Q246.52 -12.36 244.84 -17.82Q243.16 -23.28 243.16 -29.28Q243.16 -35.04 244.84 -40.56Q246.52 -46.08 249.88 -50.52Q253.24 -54.96 258.58 -57.66Q263.92 -60.36 271.36 -60.36Q278.32 -60.36 283.48 -58.02Q288.64 -55.68 292.00 -51.54Q295.36 -47.40 297.10 -41.88Q298.84 -36.36 298.84 -30.12Q298.84 -29.28 298.78 -27.78Q298.72 -26.28 298.48 -24.60L258.04 -24.60Q258.64 -18.24 262.78 -15.00Q266.92 -11.76 273.16 -11.76Q277.72 -11.76 282.04 -13.38Q286.36 -15.00 289.72 -18.00L297.16 -7.92Q292.96 -4.68 289.24 -2.64Q285.52 -0.60 281.50 0.30Q277.48 1.20 272.32 1.20ZM284.68 -35.64Q284.68 -35.76 284.68 -35.76Q284.68 -38.28 283.72 -40.50Q282.76 -42.72 281.08 -44.40Q279.40 -46.08 277.06 -46.98Q274.72 -47.88 271.72 -47.88Q267.28 -47.88 264.28 -46.08Q261.28 -44.28 259.78 -41.46Q258.28 -38.64 257.92 -35.64ZM346.66 1.56Q335.02 1.56 326.20 -3.84Q317.38 -9.24 312.46 -19.08Q307.54 -28.92 307.54 -41.88Q307.54 -54.84 312.46 -64.62Q317.38 -74.40 326.20 -79.80Q335.02 -85.20 346.66 -85.20Q359.50 -85.20 368.92 -78.84Q378.34 -72.48 382.42 -61.20L371.02 -57.00Q368.02 -64.80 361.78 -69.18Q355.54 -73.56 346.66 -73.56Q338.50 -73.56 332.44 -69.66Q326.38 -65.76 323.08 -58.74Q319.78 -51.72 319.78 -41.88Q319.78 -32.04 323.08 -24.96Q326.38 -17.88 332.44 -13.98Q338.50 -10.08 346.66 -10.08Q355.54 -10.08 361.78 -14.46Q368.02 -18.84 371.02 -26.64L382.42 -22.56Q378.34 -11.40 368.92 -4.92Q359.50 1.56 346.66 1.56ZM429.04 0.00L428.32 -8.64Q428.20 -8.52 428.08 -8.40Q424.96 -3.72 420.34 -1.32Q415.72 1.08 409.96 1.08Q403.36 1.08 398.32 -1.32Q393.28 -3.72 390.52 -7.98Q387.76 -12.24 387.76 -17.88Q387.76 -22.80 389.80 -26.34Q391.84 -29.88 395.08 -31.80Q398.08 -33.72 401.98 -34.50Q405.88 -35.28 410.32 -35.28L428.08 -35.28L428.08 -37.20Q428.08 -43.44 424.48 -46.80Q420.88 -50.16 414.04 -50.16Q409.24 -50.16 404.86 -48.24Q400.48 -46.32 396.52 -42.00L389.20 -49.56Q394.48 -55.08 400.90 -57.66Q407.32 -60.24 414.88 -60.24Q426.76 -60.24 433.30 -54.18Q439.84 -48.12 439.84 -37.20L439.84 0.00ZM428.08 -26.40L412.00 -26.40Q409.60 -26.40 407.02 -25.98Q404.44 -25.56 402.64 -24.24Q401.20 -23.16 400.36 -21.54Q399.52 -19.92 399.52 -17.76Q399.52 -13.56 402.76 -11.04Q406.00 -8.52 411.40 -8.52Q415.96 -8.52 419.74 -10.62Q423.52 -12.72 425.80 -16.38Q428.08 -20.04 428.08 -24.72ZM451.94 0.00L451.94 -59.16L463.82 -59.16L463.82 -50.88Q464.78 -52.44 465.98 -53.76Q468.86 -56.88 472.88 -58.56Q476.90 -60.24 481.58 -60.24Q491.42 -60.24 497.00 -54.54Q502.58 -48.84 502.58 -37.92L502.58 0.00L490.82 0.00L490.82 -33.60Q490.82 -42.12 487.76 -46.08Q484.70 -50.04 478.34 -50.04Q473.54 -50.04 470.36 -47.88Q467.18 -45.72 465.50 -41.04Q463.82 -36.36 463.82 -29.16L463.82 0.00ZM533.28 0.00L509.04 -59.16L522.00 -59.16L538.08 -15.24L554.40 -59.16L567.12 -59.16L543.12 0.00ZM610.56 0.00L609.84 -8.64Q609.72 -8.52 609.60 -8.40Q606.48 -3.72 601.86 -1.32Q597.24 1.08 591.48 1.08Q584.88 1.08 579.84 -1.32Q574.80 -3.72 572.04 -7.98Q569.28 -12.24 569.28 -17.88Q569.28 -22.80 571.32 -26.34Q573.36 -29.88 576.60 -31.80Q579.60 -33.72 583.50 -34.50Q587.40 -35.28 591.84 -35.28L609.60 -35.28L609.60 -37.20Q609.60 -43.44 606.00 -46.80Q602.40 -50.16 595.56 -50.16Q590.76 -50.16 586.38 -48.24Q582.00 -46.32 578.04 -42.00L570.72 -49.56Q576.00 -55.08 582.42 -57.66Q588.84 -60.24 596.40 -60.24Q608.28 -60.24 614.82 -54.18Q621.36 -48.12 621.36 -37.20L621.36 0.00ZM609.60 -26.40L593.52 -26.40Q591.12 -26.40 588.54 -25.98Q585.96 -25.56 584.16 -24.24Q582.72 -23.16 581.88 -21.54Q581.04 -19.92 581.04 -17.76Q581.04 -13.56 584.28 -11.04Q587.52 -8.52 592.92 -8.52Q597.48 -8.52 601.26 -10.62Q605.04 -12.72 607.32 -16.38Q609.60 -20.04 609.60 -24.72ZM653.38 1.08Q647.14 1.08 642.34 -0.78Q637.54 -2.64 634.12 -5.58Q630.70 -8.52 628.66 -11.64L636.70 -18.60Q638.98 -14.52 643.24 -11.58Q647.50 -8.64 653.50 -8.64Q658.78 -8.64 661.84 -10.86Q664.90 -13.08 664.90 -16.68Q664.90 -19.56 662.98 -21.30Q661.06 -23.04 657.94 -24.18Q654.82 -25.32 651.10 -26.16Q647.74 -27.12 644.26 -28.32Q640.78 -29.52 637.96 -31.38Q635.14 -33.24 633.40 -36.18Q631.66 -39.12 631.66 -43.44Q631.66 -51.00 637.48 -55.62Q643.30 -60.24 652.90 -60.24Q659.74 -60.24 665.38 -57.42Q671.02 -54.60 674.14 -49.08L666.82 -43.44Q664.42 -47.40 660.64 -49.20Q656.86 -51.00 652.42 -51.00Q648.22 -51.00 645.40 -49.26Q642.58 -47.52 642.58 -44.52Q642.58 -42.36 643.84 -40.98Q645.10 -39.60 647.80 -38.58Q650.50 -37.56 654.46 -36.60Q658.18 -35.76 662.02 -34.56Q665.86 -33.36 669.10 -31.44Q672.34 -29.52 674.38 -26.28Q676.42 -23.04 676.42 -17.88Q676.42 -12.24 673.54 -7.98Q670.66 -3.72 665.50 -1.32Q660.34 1.08 653.38 1.08Z"/></svg>`,b=12,x=16,S=.58,C=10,ee=.56,te=686/88,ne=83.64/88,re=.25;function w(e=x){let t=Number.isFinite(e)?Math.max(b,e):x,n=T(t*ee/ne);return{height:t,fontSize:T(Math.max(C,t*S)),gap:T(t*re),wordmarkWidth:T(n*te),wordmarkHeight:n}}function T(e){return Math.round(e*10)/10}function E(e){return e.replace(/&/g,`&`).replace(/"/g,`"`).replace(/</g,`<`)}function D(e){return e&&(/^(https?:)?\/\//i.test(e)||e.startsWith(`/`))?e:g}function O(e){return!!e&&!/^_(self|parent|top)$/i.test(e)}function k(e,t,n){return e.replace(`<svg `,`<svg width="${t}" height="${n}" style="display:block;flex:none" `)}function A(e={}){let t=w(e.height),n=E(D(e.href)),r=e.target??`_blank`;return`<a class="tc-powered-by" href="${n}"${r?` target="${E(r)}"${O(r)?` rel="noopener noreferrer"`:``}`:``} aria-label="${_}" style="${`display:inline-flex;align-items:center;gap:${t.gap}px;height:${t.height}px;color:inherit;text-decoration:none;font-size:${t.fontSize}px;line-height:1;white-space:nowrap`}"><span aria-hidden="true">Powered by</span>`+k(v,t.height,t.height)+k(y,t.wordmarkWidth,t.wordmarkHeight)+`</a>`}function ie(e={},t=document){let n=t.createElement(`div`);return n.innerHTML=A(e),n.firstElementChild}function ae(e){let{viewport:t,data:r}=e,i=(0,n.priceToYMapper)(t),a=r.length-1,o=Math.max(0,Math.floor(t.visibleRange.from)),s=Math.min(a,Math.ceil(t.visibleRange.to)),c=e=>r.length>0?(0,n.timestampToBarIndex)(e,r):e;return{timeToX:e=>(0,n.barIndexToX)(c(e),t),xToTime:e=>{let i=(0,n.xToBarIndex)(e,t);return r.length>0?(0,n.barIndexToTime)(i,r):i},indexToX:e=>(0,n.barIndexToX)(e,t),xToIndex:e=>(0,n.xToBarIndex)(e,t),priceToY:i,yToPrice:e=>(0,n.yToPrice)(e,t),barWidth:t.barWidth,visible:s<o?{from:0,to:-1}:{from:o,to:s}}}var oe=class{root;cells=[];layout;options;destroyed=!1;syncing=!1;constructor(t,n={}){this.options=n,this.layout=e.d(n.layout)?n.layout:`2x2`,this.root=document.createElement(`div`),this.root.style.cssText=`display:grid;width:100%;height:100%;overflow:hidden;`,t.appendChild(this.root),this.applyLayout(),this.createCells()}applyLayout(){let{cols:t,rows:n}=e.s[this.layout],r=this.options.gap??1;this.root.style.gridTemplateColumns=`repeat(${t}, minmax(0, 1fr))`,this.root.style.gridTemplateRows=`repeat(${n}, minmax(0, 1fr))`,this.root.style.gap=`${r}px`,this.placeCells()}placeCells(){let t=e.c(e.s[this.layout]);this.cells.forEach((n,r)=>e.f(n.container,t[r]))}createCells(){let t=e.l(e.s[this.layout]);for(let e=0;e<t;e++)this.cells.push(this.createCell(e));this.placeCells()}createCell(t){let n=this.options.cells?.[t]??{},r=document.createElement(`div`);r.style.cssText=`position:relative;overflow:hidden;min-width:0;min-height:0;`,this.root.appendChild(r);let i=new e.h(r,{chartType:`candlestick`,autoScale:!0,features:{crosshair:!0,keyboard:!0,volume:!0,legend:!0,priceAxis:!0,timeAxis:!0,grid:!0},...this.options.chartOptions,...n.chartOptions,theme:this.options.theme}),a={container:r,chart:i,symbol:n.symbol??`Chart ${t+1}`,timeframe:n.timeframe??`5m`};return this.options.syncCrosshair!==!1&&(i.on(`crosshairMove`,e=>{let t=e.payload.bar?.time;if(t!==void 0)for(let e of this.cells)e.chart!==i&&e.chart.setCrosshairTime(t)}),i.on(`crosshairLeave`,()=>{for(let e of this.cells)e.chart!==i&&e.chart.setCrosshairTime(null)})),this.options.syncTimeAxis!==!1&&i.on(`visibleRangeChange`,e=>{if(this.syncing)return;this.syncing=!0;let{from:t,to:n}=e.payload,r=i.getData();if(r.length>0&&t>=0&&n<r.length){let e=r[t]?.time,a=r[n]?.time;if(e&&a)for(let t of this.cells)t.chart!==i&&t.chart.setVisibleRange(e,a)}this.syncing=!1}),a}setLayout(t){if(t===this.layout||!e.d(t))return;let n=this.cells.length,r=e.l(e.s[t]);if(r<n)for(let e=n-1;e>=r;e--){let t=this.cells[e];t.chart.destroy(),t.container.remove(),this.cells.pop()}this.layout=t,this.applyLayout();for(let e=n;e<r;e++)this.cells.push(this.createCell(e));this.placeCells()}getLayout(){return this.layout}getChart(e){return this.cells[e]?.chart??null}getCharts(){return this.cells.map(e=>e.chart)}getCellCount(){return this.cells.length}setData(e,t){this.cells[e]?.chart.setData(t)}setAllData(e){for(let t of this.cells)t.chart.setData(e)}async connectCell(e,t){let n=this.cells[e];n&&(n.symbol=t.symbol,n.timeframe=t.timeframe,await n.chart.connect(t))}async connectAll(e,t,r,i=500){let a=[];for(let o=0;o<this.cells.length&&o<t.length;o++)a.push(this.connectCell(o,{...typeof e==`function`?{adapter:e(t[o],o)}:(0,n.isDataFeed)(e)?{feed:e}:{adapter:e},symbol:t[o],timeframe:r,historyLimit:i}));await Promise.all(a)}setTheme(e){for(let t of this.cells)t.chart.setTheme(e)}destroy(){if(!this.destroyed){this.destroyed=!0;for(let e of this.cells)e.chart.destroy(),e.container.remove();this.cells=[],this.root.remove()}}},se=class extends n.BaseFinanceChart{options;constructor(e,t){super(e,t.theme),this.options=t,this.requestRender()}renderChart(e,t,r,i){(0,n.renderSparkline)(e,t,r,this.options,i)}update(e){this.options={...this.options,data:e},this.requestRender()}setOptions(e){this.options={...this.options,...e},this.requestRender()}},j=class extends n.BaseFinanceChart{options;crosshair=null;constructor(e,t){super(e,t.theme),this.options=t,t.crosshair!==!1&&(this.crosshair=new n.FinanceCrosshair(this.canvas,()=>this.requestRender())),this.requestRender()}renderChart(e,t,r,i){let a=this.crosshair?.getPosition()??null;(0,n.renderDepthChart)(e,t,r,this.options,i,a)}update(e){this.options={...this.options,data:e},this.requestRender()}setOptions(e){this.options={...this.options,...e},this.requestRender()}destroy(){this.crosshair?.destroy(),super.destroy()}},M=class extends n.BaseFinanceChart{options;crosshair=null;constructor(e,t){super(e,t.theme),this.options=t,t.crosshair!==!1&&(this.crosshair=new n.FinanceCrosshair(this.canvas,()=>this.requestRender())),this.requestRender()}renderChart(e,t,r,i){let a=this.crosshair?.getPosition()??null;(0,n.renderEquityCurve)(e,t,r,this.options,i,a)}update(e,t){this.options={...this.options,data:e},t!==void 0&&(this.options={...this.options,benchmark:t}),this.requestRender()}setOptions(e){this.options={...this.options,...e},this.requestRender()}destroy(){this.crosshair?.destroy(),super.destroy()}},N=class extends n.BaseFinanceChart{options;crosshair=null;cachedRects=[];cachedGroups=[];currentData=[];lastLayoutWidth=0;lastLayoutHeight=0;handleClick=null;constructor(e,t){super(e,t.theme),this.options=t,this.currentData=t.data??[],t.crosshair!==!1&&(this.crosshair=new n.FinanceCrosshair(this.canvas,()=>this.requestRender())),t.onCellClick&&(this.handleClick=e=>{let t=this.canvas.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;this.onCanvasClick(n,r)},this.canvas.addEventListener(`click`,this.handleClick)),this.applyLabel(),this.recomputeLayout(),this.requestRender()}applyLabel(){let e=new Set(this.currentData.map(e=>e.group).filter(Boolean)).size,t=this.options.grouped&&e>0?`Market map of ${this.currentData.length} cells in ${e} groups`:`Heatmap of ${this.currentData.length} cells`;this.setLabel(this.options.ariaLabel??t)}recomputeLayout(){let e={x:0,y:0,width:this.width,height:this.height},t=this.options.cellPadding??2;if(this.lastLayoutWidth=this.width,this.lastLayoutHeight=this.height,this.cachedGroups=[],this.options.grouped){let{groups:r,cells:i}=(0,n.layoutGroupedTreemap)(this.currentData.map(e=>({id:e.id,weight:e.weight??(Math.abs(e.value)||1),group:e.group,value:e.value})),e,t,n.GROUP_HEADER);this.cachedRects=i,this.cachedGroups=r}else if(this.options.weighted){let r=this.currentData.map(e=>({id:e.id,weight:e.weight??(Math.abs(e.value)||1)}));this.cachedRects=(0,n.layoutSquarifiedTreemap)(r,e,t)}else this.cachedRects=(0,n.layoutUniformGrid)(this.currentData.map(e=>({id:e.id})),e,t)}onCanvasClick(e,t){if(this.options.onCellClick)for(let n of this.cachedRects){let r=n.rect;if(e>=r.x&&e<=r.x+r.width&&t>=r.y&&t<=r.y+r.height){let e=this.currentData.find(e=>e.id===n.id);e&&this.options.onCellClick(e);return}}}renderChart(e,t,r,i){(t!==this.lastLayoutWidth||r!==this.lastLayoutHeight)&&this.recomputeLayout();let a=this.crosshair?.getPosition()??null;(0,n.renderHeatmap)(e,t,r,this.currentData,this.cachedRects,this.options,i,a,this.cachedGroups)}update(e){this.currentData=e,this.options={...this.options,data:e},this.applyLabel(),this.recomputeLayout(),this.requestRender()}setOptions(e){this.options={...this.options,...e},e.data&&(this.currentData=e.data),this.applyLabel(),this.recomputeLayout(),this.requestRender()}destroy(){this.crosshair?.destroy(),this.handleClick&&this.canvas.removeEventListener(`click`,this.handleClick),super.destroy()}},P=class extends n.BaseFinanceChart{options;crosshair=null;constructor(e,t){super(e,t.theme),this.options=t,t.crosshair!==!1&&(this.crosshair=new n.FinanceCrosshair(this.canvas,()=>this.requestRender())),this.requestRender()}renderChart(e,t,r,i){let a=this.crosshair?.getPosition()??null;(0,n.renderWaterfall)(e,t,r,this.options,i,a)}update(e){this.options={...this.options,data:e},this.requestRender()}setOptions(e){this.options={...this.options,...e},this.requestRender()}destroy(){this.crosshair?.destroy(),super.destroy()}},F=500;function I(e){let t=1-e;return 1-t*t*t}var L=class extends n.BaseFinanceChart{options;currentValue;targetValue;animationStart=null;animationFrom=0;animationFrameId=null;constructor(e,t){super(e,t.theme),this.options=t,this.currentValue=t.value,this.targetValue=t.value,this.requestRender()}renderChart(e,t,r,i){(0,n.renderGauge)(e,t,r,this.options,i,this.currentValue)}setValue(e){if(this.options.animate===!1){this.cancelAnimation(),this.currentValue=e,this.targetValue=e,this.options={...this.options,value:e},this.requestRender();return}this.targetValue=e,this.animationFrom=this.currentValue,this.animationStart=performance.now(),this.options={...this.options,value:e},this.startAnimationLoop()}setOptions(e){let t={...this.options,...e};if(e.value!==void 0&&e.value!==this.targetValue){this.options=t,this.setValue(e.value);return}this.options=t,this.requestRender()}startAnimationLoop(){if(this.animationFrameId!==null)return;let e=()=>{if(this.animationFrameId=null,this.animationStart===null)return;let t=this.options.animationDuration??F,n=performance.now()-this.animationStart,r=Math.min(1,n/Math.max(1,t)),i=I(r);this.currentValue=this.animationFrom+(this.targetValue-this.animationFrom)*i,this.requestRender(),r<1?this.animationFrameId=requestAnimationFrame(e):(this.currentValue=this.targetValue,this.animationStart=null)};this.animationFrameId=requestAnimationFrame(e)}cancelAnimation(){this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null),this.animationStart=null}destroy(){this.cancelAnimation(),super.destroy()}},R=class extends n.BaseFinanceChart{options;layout=null;layoutFor=null;crosshair;onClick=e=>{let t=this.canvas.getBoundingClientRect();this.layout&&this.clickAt(this.layout,e.clientX-t.left,e.clientY-t.top)};onMove=e=>{if(!this.layout||!this.clickable())return;let t=this.canvas.getBoundingClientRect();this.canvas.style.cursor=this.hits(this.layout,e.clientX-t.left,e.clientY-t.top)?`pointer`:``};constructor(e,t){super(e,t.theme),this.options=t,this.crosshair=new n.FinanceCrosshair(this.canvas,()=>this.requestRender()),this.canvas.addEventListener(`click`,this.onClick),this.canvas.addEventListener(`pointermove`,this.onMove),this.applyLabel(),this.requestRender()}renderChart(e,t,r,i){let a=this.options.crosshair===!1?null:this.crosshair.getPosition(),o=this.layoutFor;(!this.layout||!o||o.options!==this.options||o.width!==t||o.height!==r||o.theme!==i)&&(this.layout=this.compute(t,r,i,(0,n.canvasMeasure)(e,i)),this.layoutFor={options:this.options,width:t,height:r,theme:i}),this.draw(e,t,r,i,a,this.layout)}setOptions(e){this.options={...this.options,...e},`theme`in e&&this.setTheme(e.theme??`dark`),this.applyLabel(),this.requestRender()}applyLabel(){this.setLabel(this.options.ariaLabel??this.describe())}destroy(){this.crosshair.destroy(),this.canvas.removeEventListener(`click`,this.onClick),this.canvas.removeEventListener(`pointermove`,this.onMove),super.destroy()}},z=class extends R{compute(e,t,r,i){return(0,n.computeBarLayout)(this.options,e,t,r,i)}draw(e,t,r,i,a,o){(0,n.renderBarChart)(e,t,r,this.options,i,a,o)}describe(){return`Bar chart of ${this.options.series.map(e=>e.name).join(`, `)}, ${this.options.categories.length} categories`}clickable(){return this.options.onBarClick!==void 0}hits(e,t,r){return(0,n.hitBar)(e,t,r)!==null}clickAt(e,t,r){let i=(0,n.hitBar)(e,t,r);i&&this.options.onBarClick?.({category:i.category,series:i.series,value:i.value,index:i.index})}update(e,t){this.setOptions({categories:e,series:t})}},B=class extends R{compute(e,t,r,i){return(0,n.computeDonutLayout)(this.options,e,t,r,i)}draw(e,t,r,i,a,o){(0,n.renderDonut)(e,t,r,this.options,i,a,o)}describe(){let e=this.options.data.filter(e=>Number.isFinite(e.value)&&e.value>0).map(e=>e.label).join(`, `);return`${(this.options.innerRadius??.6)>0?`Donut`:`Pie`} chart of ${e}`}clickable(){return this.options.onSliceClick!==void 0}hits(e,t,r){return(0,n.hitSlice)(e,t,r)!==null}clickAt(e,t,r){let i=(0,n.hitSlice)(e,t,r);i&&this.options.onSliceClick?.(i.slice)}update(e){this.setOptions({data:e})}},V=class extends R{compute(e,t,r,i){return(0,n.computeScatterLayout)(this.options,e,t,r,i)}draw(e,t,r,i,a,o){(0,n.renderScatter)(e,t,r,this.options,i,a,o)}describe(){let e=this.options.series.reduce((e,t)=>e+t.points.length,0);return`Scatter chart${this.options.xLabel&&this.options.yLabel?` of ${this.options.yLabel} against ${this.options.xLabel}`:``}, ${e} points`}clickable(){return this.options.onPointClick!==void 0}hits(e,t,r){return(0,n.nearestPoint)(e,t,r)!==null}clickAt(e,t,r){let i=(0,n.nearestPoint)(e,t,r);i&&this.options.onPointClick?.(i.point,i.series)}update(e){this.setOptions({series:e})}},H=class extends R{compute(e,t,r,i){return(0,n.computeHistogramLayout)(this.options,e,t,r,i)}draw(e,t,r,i,a,o){(0,n.renderHistogram)(e,t,r,this.options,i,a,o)}describe(){return`Histogram of ${this.options.values.length} values`}clickable(){return!1}hits(){return!1}clickAt(){}update(e){this.setOptions({values:e})}},U=class extends R{compute(e,t,r,i){return(0,n.computeCalendarLayout)(this.options,e,t,r,i)}draw(e,t,r,i,a,o){(0,n.renderCalendar)(e,t,r,this.options,i,a,o)}describe(){let e=this.options.data.map(e=>e.date).filter(e=>/^\d{4}-\d{2}-\d{2}$/.test(e)).sort(),t=this.options.from??e[0],n=this.options.to??e[e.length-1];return t&&n?`Calendar of daily values from ${t} to ${n}`:`Calendar of daily values`}clickable(){return this.options.onDayClick!==void 0}hits(e,t,r){return(0,n.hitDay)(e,t,r)?.day!==void 0}clickAt(e,t,r){let i=(0,n.hitDay)(e,t,r)?.day;i&&this.options.onDayClick?.(i)}update(e){this.setOptions({data:e})}},W=12,G=class extends R{compute(e,t,r,i){return(0,n.computeMatrixLayout)(this.options,e,t,r,i)}draw(e,t,r,i,a,o){(0,n.renderMatrix)(e,t,r,this.options,i,a,o)}describe(){let{rows:e,columns:t}=this.options;return t?e.length+t.length<=W?`Matrix of ${e.join(`, `)} by ${t.join(`, `)}`:`Matrix of ${e.length} rows by ${t.length} columns`:e.length<=W?`Matrix of ${e.join(`, `)}`:`Matrix of ${e.length} rows`}clickable(){return this.options.onCellClick!==void 0}hits(e,t,r){return(0,n.hitMatrixCell)(e,t,r)!==null}clickAt(e,t,r){let i=(0,n.hitMatrixCell)(e,t,r);i&&this.options.onCellClick?.(i.cell)}update(e){this.setOptions({values:e})}},ce=class extends R{compute(e,t,r,i){return(0,n.computeCounterClockLayout)(this.options,e,t,r,i)}draw(e,t,r,i,a,o){(0,n.renderCounterClock)(e,t,r,this.options,i,a,o)}describe(){return`Counter-clock chart of price against volume, ${this.options.period??25}-bar averages`}clickable(){return this.options.onPointClick!==void 0}hits(e,t,r){return(0,n.nearestCounterClockPoint)(e,t,r)!==null}clickAt(e,t,r){let i=(0,n.nearestCounterClockPoint)(e,t,r);i&&this.options.onPointClick?.(i.point)}getPhase(){return(0,n.counterClockPhase)((0,n.counterClockPoints)(this.options.data,this.options.period??25,(0,n.shownCount)(this.options)))}update(e){this.setOptions({data:e})}},le=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`];function K(e){return e.map(e=>({time:e.time,value:e.equity}))}function q(e){let t=-1/0;return e.map(e=>{e.equity>t&&(t=e.equity);let n=t>0?(e.equity/t-1)*100:0;return{time:e.time,value:n}})}function J(e){if(e.length===0)return[];let n=[];for(let r of e){let e=(0,t.timeframeBucketStart)(r.time,`1M`),i=n[n.length-1];i&&i.key===e?i.close=r.equity:n.push({key:e,close:r.equity})}let r=e[0].equity,i=[];for(let e of n){let t=r===0?1:r,n=(e.close/t-1)*100;r=e.close;let a=new Date(e.key),o=a.getUTCFullYear(),s=a.getUTCMonth();i.push({id:`${o}-${String(s+1).padStart(2,`0`)}`,label:le[s],group:String(o),value:n})}return i}var Y=100;function X(e){return`${e>0?`+`:``}${e.toFixed(2)}%`}function Z(e){return e>0?`positive`:e<0?`negative`:`neutral`}function Q(e){return[{label:`Total Return`,value:X(e.totalReturnPct*Y),tone:Z(e.totalReturnPct)},{label:`CAGR`,value:X(e.cagr*Y),tone:Z(e.cagr)},{label:`Sharpe`,value:e.sharpe.toFixed(2),tone:Z(e.sharpe)},{label:`Sortino`,value:e.sortino.toFixed(2),tone:Z(e.sortino)},{label:`Max Drawdown`,value:X(-Math.abs(e.maxDrawdownPct)*Y),tone:`negative`},{label:`Win Rate`,value:`${(e.winRate*Y).toFixed(1)}%`,tone:`neutral`},{label:`Profit Factor`,value:Number.isFinite(e.profitFactor)?e.profitFactor.toFixed(2):`∞`,tone:Z(e.profitFactor-1)},{label:`Trades`,value:String(e.trades),tone:`neutral`}]}function $(e){return!e||e===`dark`?t.DARK_THEME:e===`light`?t.LIGHT_THEME:e}var ue=class{options;theme;root;equityChart=null;drawdownChart=null;heatmap=null;constructor(e,t){this.options=t,this.theme=$(t.theme),this.root=document.createElement(`div`),this.build(),e.appendChild(this.root)}build(){let e=this.theme,{result:t,title:n,subtitle:r}=this.options,i=this.panelBackground(),a=e.grid;if(this.root.style.cssText=[`display:flex`,`flex-direction:column`,`gap:14px`,`width:100%`,`box-sizing:border-box`,`padding:16px`,`background:${e.background}`,`color:${e.text}`,`font-family:${e.font.family}`].join(`;`),n||r){let t=document.createElement(`div`);if(n){let r=document.createElement(`div`);r.textContent=n,r.style.cssText=`font-size:${e.font.sizeLarge}px;font-weight:600;letter-spacing:-0.01em;`,t.appendChild(r)}if(r){let n=document.createElement(`div`);n.textContent=r,n.style.cssText=`font-size:${e.font.sizeSmall}px;color:${e.textSecondary};margin-top:2px;`,t.appendChild(n)}this.root.appendChild(t)}this.root.appendChild(this.buildStatsStrip(Q(t.metrics),i,a));let o=document.createElement(`div`);o.style.cssText=[`display:grid`,`grid-template-columns:repeat(auto-fit, minmax(280px, 1fr))`,`grid-auto-rows:220px`,`gap:14px`].join(`;`),this.root.appendChild(o);let s=this.buildPanel(`Equity Curve`,i,a);s.wrap.style.gridColumn=`1 / -1`,o.appendChild(s.wrap),this.equityChart=new M(s.body,{data:K(t.equityCurve),theme:e,lineColor:e.candleUp,fillArea:!0,crosshair:!0});let c=this.buildPanel(`Drawdown`,i,a);o.appendChild(c.wrap),this.drawdownChart=new M(c.body,{data:q(t.equityCurve),theme:e,lineColor:e.candleDown,fillArea:!0,crosshair:!0,valueFormat:e=>`${e.toFixed(1)}%`});let l=J(t.equityCurve),u=this.buildPanel(`Monthly Returns`,i,a);o.appendChild(u.wrap),this.heatmap=new N(u.body,{data:l,theme:e,showValues:!0,valueFormat:e=>`${e>=0?`+`:``}${e.toFixed(1)}`,colorScale:{negative:e.candleDown,zero:i,positive:e.candleUp}})}buildStatsStrip(e,t,n){let r=document.createElement(`div`);r.style.cssText=[`display:grid`,`grid-template-columns:repeat(auto-fit, minmax(120px, 1fr))`,`gap:10px`].join(`;`);let i=this.theme;for(let a of e){let e=document.createElement(`div`);e.style.cssText=[`background:${t}`,`border:1px solid ${n}`,`border-radius:10px`,`padding:10px 12px`,`display:flex`,`flex-direction:column`,`gap:4px`].join(`;`);let o=document.createElement(`div`);o.textContent=a.label,o.style.cssText=`font-size:${i.font.sizeSmall}px;color:${i.textSecondary};text-transform:uppercase;letter-spacing:0.04em;`;let s=document.createElement(`div`);s.textContent=a.value;let c=a.tone===`positive`?i.candleUp:a.tone===`negative`?i.candleDown:i.text;s.style.cssText=`font-size:${i.font.sizeLarge}px;font-weight:600;color:${c};font-variant-numeric:tabular-nums;`,e.appendChild(o),e.appendChild(s),r.appendChild(e)}return r}buildPanel(e,t,n){let r=this.theme,i=document.createElement(`div`);i.style.cssText=[`background:${t}`,`border:1px solid ${n}`,`border-radius:10px`,`overflow:hidden`,`display:flex`,`flex-direction:column`].join(`;`);let a=document.createElement(`div`);a.textContent=e,a.style.cssText=[`font-size:${r.font.sizeSmall}px`,`font-weight:600`,`color:${r.textSecondary}`,`padding:8px 12px`,`border-bottom:1px solid ${n}`,`text-transform:uppercase`,`letter-spacing:0.04em`].join(`;`);let o=document.createElement(`div`);return o.style.cssText=`flex:1;min-height:0;position:relative;`,i.appendChild(a),i.appendChild(o),{wrap:i,body:o}}panelBackground(){return this.theme.name===`light`?`rgba(0,0,0,0.02)`:`rgba(255,255,255,0.03)`}update(e){this.options={...this.options,result:e},this.destroyCharts(),this.root.replaceChildren(),this.build()}setTheme(e){this.theme=$(e),this.options={...this.options,theme:e},this.destroyCharts(),this.root.replaceChildren(),this.build()}destroyCharts(){this.equityChart?.destroy(),this.drawdownChart?.destroy(),this.heatmap?.destroy(),this.equityChart=null,this.drawdownChart=null,this.heatmap=null}destroy(){this.destroyCharts(),this.root.remove()}};Object.defineProperty(exports,`AlertManager`,{enumerable:!0,get:function(){return n.AlertManager}}),Object.defineProperty(exports,`Animator`,{enumerable:!0,get:function(){return n.Animator}}),exports.BarChart=z,Object.defineProperty(exports,`BarCountdown`,{enumerable:!0,get:function(){return n.BarCountdown}}),Object.defineProperty(exports,`BinanceAdapter`,{enumerable:!0,get:function(){return n.BinanceAdapter}}),Object.defineProperty(exports,`BybitAdapter`,{enumerable:!0,get:function(){return n.BybitAdapter}}),Object.defineProperty(exports,`CANDLE_PATTERNS`,{enumerable:!0,get:function(){return n.CANDLE_PATTERNS}}),Object.defineProperty(exports,`CHART_SPACING`,{enumerable:!0,get:function(){return t.CHART_SPACING}}),Object.defineProperty(exports,`CHART_STYLE_KEYS`,{enumerable:!0,get:function(){return t.CHART_STYLE_KEYS}}),exports.CORRECTABLE_BARS=a,exports.CalendarChart=U,exports.Chart=e.h,exports.ChartGrid=oe,Object.defineProperty(exports,`ChartLegend`,{enumerable:!0,get:function(){return n.ChartLegend}}),Object.defineProperty(exports,`ChartStateManager`,{enumerable:!0,get:function(){return n.ChartStateManager}}),Object.defineProperty(exports,`CoinbaseAdapter`,{enumerable:!0,get:function(){return n.CoinbaseAdapter}}),Object.defineProperty(exports,`CompareRenderer`,{enumerable:!0,get:function(){return n.CompareRenderer}}),exports.CounterClockChart=ce,Object.defineProperty(exports,`CrosshairTooltip`,{enumerable:!0,get:function(){return n.CrosshairTooltip}}),Object.defineProperty(exports,`CurrentPriceLine`,{enumerable:!0,get:function(){return n.CurrentPriceLine}}),Object.defineProperty(exports,`DARK_PRICE_LIMITS`,{enumerable:!0,get:function(){return t.DARK_PRICE_LIMITS}}),Object.defineProperty(exports,`DARK_TERMINAL`,{enumerable:!0,get:function(){return t.DARK_TERMINAL}}),Object.defineProperty(exports,`DARK_THEME`,{enumerable:!0,get:function(){return t.DARK_THEME}}),Object.defineProperty(exports,`DEFAULT_DRAWING_STYLE`,{enumerable:!0,get:function(){return t.DEFAULT_DRAWING_STYLE}}),Object.defineProperty(exports,`DEFAULT_FONT_FAMILY`,{enumerable:!0,get:function(){return t.DEFAULT_FONT_FAMILY}}),exports.DEFAULT_HISTORY_PAGE_SIZE=e.k,Object.defineProperty(exports,`DEFAULT_LEGEND_CONFIG`,{enumerable:!0,get:function(){return n.DEFAULT_LEGEND_CONFIG}}),Object.defineProperty(exports,`DEFAULT_MAX_WEBGL_CHARTS`,{enumerable:!0,get:function(){return n.DEFAULT_MAX_WEBGL_CHARTS}}),Object.defineProperty(exports,`DEFAULT_RECONNECT`,{enumerable:!0,get:function(){return t.DEFAULT_RECONNECT}}),Object.defineProperty(exports,`DEFAULT_SESSION_HOURS`,{enumerable:!0,get:function(){return n.DEFAULT_SESSION_HOURS}}),Object.defineProperty(exports,`DEFAULT_SIGNAL_STYLE`,{enumerable:!0,get:function(){return t.DEFAULT_SIGNAL_STYLE}}),Object.defineProperty(exports,`DEFAULT_STREAM_CONFIG`,{enumerable:!0,get:function(){return t.DEFAULT_STREAM_CONFIG}}),Object.defineProperty(exports,`DEFAULT_TIMEFRAME_FAVORITES`,{enumerable:!0,get:function(){return t.DEFAULT_TIMEFRAME_FAVORITES}}),Object.defineProperty(exports,`DEFAULT_TRADE_ZONE_STYLE`,{enumerable:!0,get:function(){return t.DEFAULT_TRADE_ZONE_STYLE}}),Object.defineProperty(exports,`DEFAULT_TRADING_CONFIG`,{enumerable:!0,get:function(){return t.DEFAULT_TRADING_CONFIG}}),Object.defineProperty(exports,`DataExporter`,{enumerable:!0,get:function(){return n.DataExporter}}),exports.DataManager=e.j,exports.DepthChart=j,exports.DonutChart=B,exports.DragDropImporter=e.p,Object.defineProperty(exports,`DrawingBase`,{enumerable:!0,get:function(){return n.DrawingBase}}),exports.EXCHANGE_TIME_ZONE=e.g,Object.defineProperty(exports,`Easing`,{enumerable:!0,get:function(){return n.Easing}}),exports.EquityCurveChart=M,exports.GaugeChart=L,exports.HISTORY_RETRY_MS=e.A,Object.defineProperty(exports,`HNX_SESSIONS`,{enumerable:!0,get:function(){return t.HNX_SESSIONS}}),Object.defineProperty(exports,`HOSE_SESSIONS`,{enumerable:!0,get:function(){return t.HOSE_SESSIONS}}),exports.HeatmapChart=N,exports.HistogramChart=H,Object.defineProperty(exports,`INDICATOR_CATEGORIES`,{enumerable:!0,get:function(){return n.INDICATOR_CATEGORIES}}),Object.defineProperty(exports,`IndicatorBase`,{enumerable:!0,get:function(){return n.IndicatorBase}}),Object.defineProperty(exports,`IndicatorValueMap`,{enumerable:!0,get:function(){return n.IndicatorValueMap}}),Object.defineProperty(exports,`KEPT_BUCKETS`,{enumerable:!0,get:function(){return n.KEPT_BUCKETS}}),Object.defineProperty(exports,`KRX_SESSIONS`,{enumerable:!0,get:function(){return t.KRX_SESSIONS}}),Object.defineProperty(exports,`KR_COLORS`,{enumerable:!0,get:function(){return t.KR_COLORS}}),Object.defineProperty(exports,`KeyboardHandler`,{enumerable:!0,get:function(){return n.KeyboardHandler}}),Object.defineProperty(exports,`KrakenAdapter`,{enumerable:!0,get:function(){return n.KrakenAdapter}}),Object.defineProperty(exports,`LIGHT_PRICE_LIMITS`,{enumerable:!0,get:function(){return t.LIGHT_PRICE_LIMITS}}),Object.defineProperty(exports,`LIGHT_THEME`,{enumerable:!0,get:function(){return t.LIGHT_THEME}}),exports.LayoutManager=e.D,exports.LayoutSession=e.t,Object.defineProperty(exports,`MARKET_CRYPTO`,{enumerable:!0,get:function(){return t.MARKET_CRYPTO}}),Object.defineProperty(exports,`MARKET_HNX`,{enumerable:!0,get:function(){return t.MARKET_HNX}}),Object.defineProperty(exports,`MARKET_HOSE`,{enumerable:!0,get:function(){return t.MARKET_HOSE}}),Object.defineProperty(exports,`MARKET_HOSE_ETF`,{enumerable:!0,get:function(){return t.MARKET_HOSE_ETF}}),Object.defineProperty(exports,`MARKET_KRX`,{enumerable:!0,get:function(){return t.MARKET_KRX}}),Object.defineProperty(exports,`MARKET_NXT`,{enumerable:!0,get:function(){return t.MARKET_NXT}}),Object.defineProperty(exports,`MARKET_NYSE`,{enumerable:!0,get:function(){return t.MARKET_NYSE}}),Object.defineProperty(exports,`MARKET_UPBIT_KRW`,{enumerable:!0,get:function(){return t.MARKET_UPBIT_KRW}}),Object.defineProperty(exports,`MARKET_UPCOM`,{enumerable:!0,get:function(){return t.MARKET_UPCOM}}),Object.defineProperty(exports,`MARKET_VN30F`,{enumerable:!0,get:function(){return t.MARKET_VN30F}}),Object.defineProperty(exports,`MAX_ALERT_BARS`,{enumerable:!0,get:function(){return n.MAX_ALERT_BARS}}),exports.MAX_LAYOUT_NAME=e.n,Object.defineProperty(exports,`MIN_ALERT_BARS`,{enumerable:!0,get:function(){return n.MIN_ALERT_BARS}}),Object.defineProperty(exports,`MS_TIME_THRESHOLD`,{enumerable:!0,get:function(){return t.MS_TIME_THRESHOLD}}),Object.defineProperty(exports,`ManualFeed`,{enumerable:!0,get:function(){return n.ManualFeed}}),exports.MatrixChart=G,Object.defineProperty(exports,`MockAdapter`,{enumerable:!0,get:function(){return n.MockAdapter}}),Object.defineProperty(exports,`NXT_SESSIONS`,{enumerable:!0,get:function(){return t.NXT_SESSIONS}}),exports.PLUGIN_API_VERSION=e.w,exports.POWERED_BY_LABEL=_,Object.defineProperty(exports,`PRICE_SOURCES`,{enumerable:!0,get:function(){return t.PRICE_SOURCES}}),Object.defineProperty(exports,`PaperExecutionAdapter`,{enumerable:!0,get:function(){return n.PaperExecutionAdapter}}),exports.PerformanceDashboard=ue,exports.PluginManager=e.y,Object.defineProperty(exports,`PollingAdapter`,{enumerable:!0,get:function(){return n.PollingAdapter}}),Object.defineProperty(exports,`RANGE_PRESETS`,{enumerable:!0,get:function(){return n.RANGE_PRESETS}}),Object.defineProperty(exports,`ReconnectManager`,{enumerable:!0,get:function(){return n.ReconnectManager}}),Object.defineProperty(exports,`ReplayController`,{enumerable:!0,get:function(){return n.ReplayController}}),Object.defineProperty(exports,`ReplayManager`,{enumerable:!0,get:function(){return n.ReplayManager}}),Object.defineProperty(exports,`ResamplingAdapter`,{enumerable:!0,get:function(){return n.ResamplingAdapter}}),Object.defineProperty(exports,`ReshapeMemo`,{enumerable:!0,get:function(){return n.ReshapeMemo}}),Object.defineProperty(exports,`SANS_FONT_FAMILY`,{enumerable:!0,get:function(){return t.SANS_FONT_FAMILY}}),exports.ScatterChart=V,Object.defineProperty(exports,`Screenshot`,{enumerable:!0,get:function(){return n.Screenshot}}),Object.defineProperty(exports,`SessionBreaks`,{enumerable:!0,get:function(){return n.SessionBreaks}}),Object.defineProperty(exports,`SessionShading`,{enumerable:!0,get:function(){return n.SessionShading}}),Object.defineProperty(exports,`SignalMarkerManager`,{enumerable:!0,get:function(){return n.SignalMarkerManager}}),exports.SparklineChart=se,Object.defineProperty(exports,`StreamManager`,{enumerable:!0,get:function(){return n.StreamManager}}),Object.defineProperty(exports,`TC_PALETTE`,{enumerable:!0,get:function(){return t.TC_PALETTE}}),Object.defineProperty(exports,`TC_SERIES_COLORS`,{enumerable:!0,get:function(){return t.TC_SERIES_COLORS}}),Object.defineProperty(exports,`TIMEFRAMES_CRYPTO`,{enumerable:!0,get:function(){return t.TIMEFRAMES_CRYPTO}}),Object.defineProperty(exports,`TIMEFRAMES_FOREX`,{enumerable:!0,get:function(){return t.TIMEFRAMES_FOREX}}),Object.defineProperty(exports,`TIMEFRAMES_STOCK`,{enumerable:!0,get:function(){return t.TIMEFRAMES_STOCK}}),exports.TRADECANVAS_MARK_SVG=v,exports.TRADECANVAS_URL=g,exports.TRADECANVAS_WORDMARK_SVG=y,exports.ThemeManager=e.O,Object.defineProperty(exports,`TickAggregator`,{enumerable:!0,get:function(){return n.TickAggregator}}),Object.defineProperty(exports,`TickBarAdapter`,{enumerable:!0,get:function(){return n.TickBarAdapter}}),Object.defineProperty(exports,`TickBarBuilder`,{enumerable:!0,get:function(){return n.TickBarBuilder}}),Object.defineProperty(exports,`TradeZoneManager`,{enumerable:!0,get:function(){return n.TradeZoneManager}}),Object.defineProperty(exports,`UPCOM_SESSIONS`,{enumerable:!0,get:function(){return t.UPCOM_SESSIONS}}),Object.defineProperty(exports,`UndoRedoManager`,{enumerable:!0,get:function(){return n.UndoRedoManager}}),Object.defineProperty(exports,`UpbitAdapter`,{enumerable:!0,get:function(){return n.UpbitAdapter}}),Object.defineProperty(exports,`VN30F_SESSIONS`,{enumerable:!0,get:function(){return t.VN30F_SESSIONS}}),Object.defineProperty(exports,`VN_COLORS`,{enumerable:!0,get:function(){return t.VN_COLORS}}),Object.defineProperty(exports,`VOLUME_ALPHA`,{enumerable:!0,get:function(){return t.VOLUME_ALPHA}}),Object.defineProperty(exports,`VolumeRenderer`,{enumerable:!0,get:function(){return n.VolumeRenderer}}),exports.WaterfallChart=P,Object.defineProperty(exports,`Watermark`,{enumerable:!0,get:function(){return n.Watermark}}),Object.defineProperty(exports,`WebSocketAdapter`,{enumerable:!0,get:function(){return n.WebSocketAdapter}}),Object.defineProperty(exports,`adapterFromFeed`,{enumerable:!0,get:function(){return n.adapterFromFeed}}),Object.defineProperty(exports,`axisTimes`,{enumerable:!0,get:function(){return n.axisTimes}}),Object.defineProperty(exports,`barIndexToX`,{enumerable:!0,get:function(){return n.barIndexToX}}),Object.defineProperty(exports,`barTimeUnit`,{enumerable:!0,get:function(){return t.barTimeUnit}}),Object.defineProperty(exports,`barsAreDaily`,{enumerable:!0,get:function(){return t.barsAreDaily}}),exports.cleanLayoutName=e.r,exports.clearGlobalPlugins=e.b,exports.computeDrawdownCurve=q,exports.computeMonthlyReturns=J,Object.defineProperty(exports,`computePriceLimits`,{enumerable:!0,get:function(){return t.computePriceLimits}}),Object.defineProperty(exports,`contrastRatio`,{enumerable:!0,get:function(){return t.contrastRatio}}),Object.defineProperty(exports,`correlationMatrix`,{enumerable:!0,get:function(){return n.correlationMatrix}}),Object.defineProperty(exports,`counterClockPhase`,{enumerable:!0,get:function(){return n.counterClockPhase}}),Object.defineProperty(exports,`counterClockPoints`,{enumerable:!0,get:function(){return n.counterClockPoints}}),Object.defineProperty(exports,`createMarketTheme`,{enumerable:!0,get:function(){return t.createMarketTheme}}),exports.createPoweredBy=ie,Object.defineProperty(exports,`createVNTheme`,{enumerable:!0,get:function(){return t.createVNTheme}}),Object.defineProperty(exports,`describeInputs`,{enumerable:!0,get:function(){return n.describeInputs}}),Object.defineProperty(exports,`detectCandlePatterns`,{enumerable:!0,get:function(){return n.detectCandlePatterns}}),exports.feedBars=h,Object.defineProperty(exports,`feedFromAdapter`,{enumerable:!0,get:function(){return n.feedFromAdapter}}),Object.defineProperty(exports,`formatFraction`,{enumerable:!0,get:function(){return t.formatFraction}}),Object.defineProperty(exports,`formatNumber`,{enumerable:!0,get:function(){return t.formatNumber}}),Object.defineProperty(exports,`formatTooltipTime`,{enumerable:!0,get:function(){return n.formatTooltipTime}}),Object.defineProperty(exports,`formatVND`,{enumerable:!0,get:function(){return t.formatVND}}),Object.defineProperty(exports,`formatVolumeLoc`,{enumerable:!0,get:function(){return t.formatVolumeLoc}}),Object.defineProperty(exports,`fractionTick`,{enumerable:!0,get:function(){return t.fractionTick}}),Object.defineProperty(exports,`getCurrentSession`,{enumerable:!0,get:function(){return t.getCurrentSession}}),exports.getGlobalPlugins=e.x,Object.defineProperty(exports,`getLocale`,{enumerable:!0,get:function(){return t.getLocale}}),Object.defineProperty(exports,`histogramBins`,{enumerable:!0,get:function(){return n.histogramBins}}),Object.defineProperty(exports,`indicatorCategory`,{enumerable:!0,get:function(){return n.indicatorCategory}}),Object.defineProperty(exports,`indicatorSource`,{enumerable:!0,get:function(){return t.indicatorSource}}),Object.defineProperty(exports,`inkOn`,{enumerable:!0,get:function(){return t.inkOn}}),Object.defineProperty(exports,`isDataFeed`,{enumerable:!0,get:function(){return n.isDataFeed}}),Object.defineProperty(exports,`isPriceLevelAlert`,{enumerable:!0,get:function(){return n.isPriceLevelAlert}}),Object.defineProperty(exports,`isPriceSource`,{enumerable:!0,get:function(){return t.isPriceSource}}),Object.defineProperty(exports,`isTimeFrame`,{enumerable:!0,get:function(){return t.isTimeFrame}}),Object.defineProperty(exports,`isValidTimeZone`,{enumerable:!0,get:function(){return t.isValidTimeZone}}),exports.localStorageLayouts=e.i,Object.defineProperty(exports,`lttbDownsample`,{enumerable:!0,get:function(){return n.lttbDownsample}}),Object.defineProperty(exports,`lttbVisibleIndices`,{enumerable:!0,get:function(){return n.lttbVisibleIndices}}),Object.defineProperty(exports,`marketStatus`,{enumerable:!0,get:function(){return t.marketStatus}}),exports.memoryLayouts=e.a,Object.defineProperty(exports,`niceScale`,{enumerable:!0,get:function(){return n.niceScale}}),Object.defineProperty(exports,`normalizeBar`,{enumerable:!0,get:function(){return t.normalizeBar}}),Object.defineProperty(exports,`normalizeBarTime`,{enumerable:!0,get:function(){return t.normalizeBarTime}}),Object.defineProperty(exports,`offsetAt`,{enumerable:!0,get:function(){return t.offsetAt}}),exports.opensElsewhere=O,exports.overlayScale=ae,exports.overlaysForLayer=e.T,Object.defineProperty(exports,`parseIndicatorSource`,{enumerable:!0,get:function(){return t.parseIndicatorSource}}),exports.parseOHLCV=e.m,Object.defineProperty(exports,`parseTimeframe`,{enumerable:!0,get:function(){return t.parseTimeframe}}),Object.defineProperty(exports,`pickBaseTimeframe`,{enumerable:!0,get:function(){return t.pickBaseTimeframe}}),exports.pluginKey=e.E,exports.poweredByHtml=A,exports.poweredByLayout=w,Object.defineProperty(exports,`priceFormatterFor`,{enumerable:!0,get:function(){return t.priceFormatterFor}}),Object.defineProperty(exports,`priceStepAt`,{enumerable:!0,get:function(){return t.priceStepAt}}),Object.defineProperty(exports,`priceToY`,{enumerable:!0,get:function(){return n.priceToY}}),Object.defineProperty(exports,`priceToYMapper`,{enumerable:!0,get:function(){return n.priceToYMapper}}),Object.defineProperty(exports,`rangePresetStart`,{enumerable:!0,get:function(){return n.rangePresetStart}}),Object.defineProperty(exports,`rankSymbols`,{enumerable:!0,get:function(){return t.rankSymbols}}),Object.defineProperty(exports,`readNews`,{enumerable:!0,get:function(){return t.readNews}}),Object.defineProperty(exports,`readQuote`,{enumerable:!0,get:function(){return t.readQuote}}),Object.defineProperty(exports,`readableOn`,{enumerable:!0,get:function(){return t.readableOn}}),Object.defineProperty(exports,`registerLocale`,{enumerable:!0,get:function(){return t.registerLocale}}),exports.registerPlugin=e.S,Object.defineProperty(exports,`resampleBars`,{enumerable:!0,get:function(){return t.resampleBars}}),Object.defineProperty(exports,`roundToPriceStep`,{enumerable:!0,get:function(){return t.roundToPriceStep}}),exports.safeBadgeHref=D,Object.defineProperty(exports,`scaleMarketPrices`,{enumerable:!0,get:function(){return t.scaleMarketPrices}}),exports.selectKeyStats=Q,Object.defineProperty(exports,`servesTimeframe`,{enumerable:!0,get:function(){return n.servesTimeframe}}),Object.defineProperty(exports,`setLocale`,{enumerable:!0,get:function(){return t.setLocale}}),Object.defineProperty(exports,`setMaxWebGLCharts`,{enumerable:!0,get:function(){return n.setMaxWebGLCharts}}),Object.defineProperty(exports,`sourcePrice`,{enumerable:!0,get:function(){return t.sourcePrice}}),Object.defineProperty(exports,`stepDecimals`,{enumerable:!0,get:function(){return t.stepDecimals}}),Object.defineProperty(exports,`symbolTimeZone`,{enumerable:!0,get:function(){return t.symbolTimeZone}}),exports.syncIndicators=i,Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t.t}}),Object.defineProperty(exports,`tickBarCount`,{enumerable:!0,get:function(){return t.tickBarCount}}),Object.defineProperty(exports,`tickerOf`,{enumerable:!0,get:function(){return t.tickerOf}}),Object.defineProperty(exports,`timeToX`,{enumerable:!0,get:function(){return n.timeToX}}),Object.defineProperty(exports,`timeframeBucketStart`,{enumerable:!0,get:function(){return t.timeframeBucketStart}}),Object.defineProperty(exports,`timeframeToMs`,{enumerable:!0,get:function(){return t.timeframeToMs}}),Object.defineProperty(exports,`timestampToBarIndex`,{enumerable:!0,get:function(){return n.timestampToBarIndex}}),exports.toEquityPoints=K,Object.defineProperty(exports,`toHeikinAshi`,{enumerable:!0,get:function(){return n.toHeikinAshi}}),Object.defineProperty(exports,`toKagi`,{enumerable:!0,get:function(){return n.toKagi}}),Object.defineProperty(exports,`toLineBreak`,{enumerable:!0,get:function(){return n.toLineBreak}}),Object.defineProperty(exports,`toPointAndFigure`,{enumerable:!0,get:function(){return n.toPointAndFigure}}),Object.defineProperty(exports,`toRangeBars`,{enumerable:!0,get:function(){return n.toRangeBars}}),Object.defineProperty(exports,`toRenko`,{enumerable:!0,get:function(){return n.toRenko}}),exports.unregisterPlugin=e.C,Object.defineProperty(exports,`usesKoreanUnits`,{enumerable:!0,get:function(){return t.usesKoreanUnits}}),Object.defineProperty(exports,`vn30fContracts`,{enumerable:!0,get:function(){return t.vn30fContracts}}),Object.defineProperty(exports,`vn30fLastTradingDay`,{enumerable:!0,get:function(){return t.vn30fLastTradingDay}}),Object.defineProperty(exports,`volumeColor`,{enumerable:!0,get:function(){return t.volumeColor}}),Object.defineProperty(exports,`wallToUtc`,{enumerable:!0,get:function(){return t.wallToUtc}}),Object.defineProperty(exports,`withResampling`,{enumerable:!0,get:function(){return n.withResampling}}),Object.defineProperty(exports,`withTickBars`,{enumerable:!0,get:function(){return n.withTickBars}}),Object.defineProperty(exports,`xToBarIndex`,{enumerable:!0,get:function(){return n.xToBarIndex}}),Object.defineProperty(exports,`xToTime`,{enumerable:!0,get:function(){return n.xToTime}}),Object.defineProperty(exports,`yToPrice`,{enumerable:!0,get:function(){return n.yToPrice}}),Object.defineProperty(exports,`zoneOffsetMinutes`,{enumerable:!0,get:function(){return t.zoneOffsetMinutes}});
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.ts
CHANGED
|
@@ -13,9 +13,9 @@ export { LayoutManager } from './layout/LayoutManager.js';
|
|
|
13
13
|
export * from './plugins/index.js';
|
|
14
14
|
export { parseOHLCV, DragDropImporter } from './io/index.js';
|
|
15
15
|
export type { ParseResult, DragDropImporterCallbacks } from './io/index.js';
|
|
16
|
-
export type { OHLCBar, DataSeries, TimeFrame, ChartOptions, BarLayout, FontConfig, ChartType, Theme, ThemeName, ChartEventType, ChartEvent, ChartEventMap, IndicatorPlugin, IndicatorDescriptor, IndicatorConfig, IndicatorOutput, IndicatorValue, BuiltInIndicators, BuiltInIndicatorId, IndicatorId, IndicatorParamsFor, IndicatorParamValues, NumberParam, TauriBridgeOptions, ViewportState, CrosshairMovePayload, CrosshairSyncPayload, BarClickPayload, VisibleRangeChangePayload, OrderModifyPayload, OrderCancelPayload, PositionModifyPayload, PositionClosePayload, OrderPlacePayload, IndicatorChangePayload, ThemeChangePayload, StyleChangePayload, ResizePayload, ZoomChangePayload, PriceRangeChangePayload, DrawingCreatePayload, DrawingRemovePayload, SignalMarkerAddPayload, ChartContextArea, ChartContextMenuPayload, PriceAxisAddPayload, SignalMarkerRemovePayload, TradeZoneAddPayload, TradeZoneRemovePayload, DrawingToolType, BuiltInDrawingToolType, DrawingState, DrawingStyle, DrawingPlugin, DrawingDescriptor, FeaturesConfig, SessionBreakOptions, PriceAxisOptions, TimeAxisOptions, AnchorPoint, PanelPosition, PanelConfig, ResolvedLayout, TradingOrder, TradingPosition, DepthData, DepthLevel, TradingConfig, OrderSide, OrderType, OrderStatus, OrderLabel, OrderPlaceIntent, OrderModifyIntent, OrderCancelIntent, PositionModifyIntent, PositionCloseIntent, PositionReverseIntent, TimeInForce, FillReason, ExecutionAdapter, ExecutionConfig, ExecutionEvent, ExecutionEventType, ExecutionListener, FillEvent, ExecutionError, Locale, LocaleStrings, MarketConfig, MarketType, StockExchange, MarketColorScheme, TradingSession, PriceLimitInfo, DataAdapter, DataAdapterConfig, DataAdapterEventType, DataFeed, BarsRequest, BarsSubscription, FeedSubscriber, StreamConfig, ConnectionState, ConnectionInfo, RawTick, AggregatedBar, ReconnectConfig, ResolvedIndicatorStyle, IndicatorStyleConfig, IndicatorPlotStyle, IndicatorIntervals, IntervalUnit, IndicatorCategory, ChartStyleKey, ChartStyleOverrides, ChartStyleOverridesPatch, ResolvedChartStyle, ResolvedLineLook, StyleLayer, StyleValueKind, PaneStyle, WatermarkConfig, GridOptions, CrosshairOptions, SignalMarker, SignalDirection, SignalMarkerStyle, TradeZone, TradeZoneDirection, TradeZoneStyle, CandlePatternInfo, CandlePatternMatch, CandlePatternOptions, CandlePatternDirection, CandlePatternKind, } from '@tradecanvas/commons';
|
|
16
|
+
export type { OHLCBar, DataSeries, TimeFrame, ChartOptions, BarLayout, ChartDensity, ChartSpacing, FontConfig, ChartType, Theme, ThemeName, ChartEventType, ChartEvent, ChartEventMap, IndicatorPlugin, IndicatorDescriptor, IndicatorConfig, IndicatorOutput, IndicatorValue, BuiltInIndicators, BuiltInIndicatorId, IndicatorId, IndicatorParamsFor, IndicatorParamValues, NumberParam, TauriBridgeOptions, ViewportState, CrosshairMovePayload, CrosshairSyncPayload, BarClickPayload, VisibleRangeChangePayload, OrderModifyPayload, OrderCancelPayload, PositionModifyPayload, PositionClosePayload, OrderPlacePayload, IndicatorChangePayload, ThemeChangePayload, StyleChangePayload, ResizePayload, ZoomChangePayload, PriceRangeChangePayload, DrawingCreatePayload, DrawingRemovePayload, SignalMarkerAddPayload, ChartContextArea, ChartContextMenuPayload, PriceAxisAddPayload, SignalMarkerRemovePayload, TradeZoneAddPayload, TradeZoneRemovePayload, DrawingToolType, BuiltInDrawingToolType, DrawingState, DrawingStyle, DrawingPlugin, DrawingDescriptor, FeaturesConfig, SessionBreakOptions, PriceAxisOptions, TimeAxisOptions, AnchorPoint, PanelPosition, PanelConfig, ResolvedLayout, TradingOrder, TradingPosition, DepthData, DepthLevel, TradingConfig, OrderSide, OrderType, OrderStatus, OrderLabel, OrderPlaceIntent, OrderModifyIntent, OrderCancelIntent, PositionModifyIntent, PositionCloseIntent, PositionReverseIntent, TimeInForce, FillReason, ExecutionAdapter, ExecutionConfig, ExecutionEvent, ExecutionEventType, ExecutionListener, FillEvent, ExecutionError, Locale, LocaleStrings, MarketConfig, MarketType, StockExchange, MarketColorScheme, TradingSession, PriceLimitInfo, DataAdapter, DataAdapterConfig, DataAdapterEventType, DataFeed, BarsRequest, BarsSubscription, FeedSubscriber, StreamConfig, ConnectionState, ConnectionInfo, RawTick, AggregatedBar, ReconnectConfig, ResolvedIndicatorStyle, IndicatorStyleConfig, IndicatorPlotStyle, IndicatorIntervals, IntervalUnit, IndicatorCategory, ChartStyleKey, ChartStyleOverrides, ChartStyleOverridesPatch, ResolvedChartStyle, ResolvedLineLook, StyleLayer, StyleValueKind, PaneStyle, WatermarkConfig, GridOptions, CrosshairOptions, SignalMarker, SignalDirection, SignalMarkerStyle, TradeZone, TradeZoneDirection, TradeZoneStyle, CandlePatternInfo, CandlePatternMatch, CandlePatternOptions, CandlePatternDirection, CandlePatternKind, } from '@tradecanvas/commons';
|
|
17
17
|
export { detectCandlePatterns, CANDLE_PATTERNS } from '@tradecanvas/core';
|
|
18
|
-
export { DARK_THEME, LIGHT_THEME, DARK_TERMINAL, DARK_PRICE_LIMITS, LIGHT_PRICE_LIMITS, TC_PALETTE, TC_SERIES_COLORS, volumeColor, VOLUME_ALPHA, CHART_STYLE_KEYS, DEFAULT_FONT_FAMILY, SANS_FONT_FAMILY, DEFAULT_DRAWING_STYLE, DEFAULT_TRADING_CONFIG, DEFAULT_SIGNAL_STYLE, DEFAULT_TRADE_ZONE_STYLE, TIMEFRAMES_CRYPTO, TIMEFRAMES_STOCK, TIMEFRAMES_FOREX, DEFAULT_TIMEFRAME_FAVORITES, } from '@tradecanvas/commons';
|
|
18
|
+
export { DARK_THEME, LIGHT_THEME, DARK_TERMINAL, DARK_PRICE_LIMITS, LIGHT_PRICE_LIMITS, TC_PALETTE, TC_SERIES_COLORS, volumeColor, VOLUME_ALPHA, CHART_STYLE_KEYS, DEFAULT_FONT_FAMILY, SANS_FONT_FAMILY, CHART_SPACING, DEFAULT_DRAWING_STYLE, DEFAULT_TRADING_CONFIG, DEFAULT_SIGNAL_STYLE, DEFAULT_TRADE_ZONE_STYLE, TIMEFRAMES_CRYPTO, TIMEFRAMES_STOCK, TIMEFRAMES_FOREX, DEFAULT_TIMEFRAME_FAVORITES, } from '@tradecanvas/commons';
|
|
19
19
|
export { normalizeBarTime, normalizeBar, barsAreDaily, barTimeUnit, MS_TIME_THRESHOLD } from '@tradecanvas/commons';
|
|
20
20
|
export type { BarTimeUnit } from '@tradecanvas/commons';
|
|
21
21
|
export { parseTimeframe, isTimeFrame, timeframeToMs, timeframeBucketStart, resampleBars, pickBaseTimeframe, isValidTimeZone, zoneOffsetMinutes, offsetAt, wallToUtc, } from '@tradecanvas/commons';
|
|
@@ -28,7 +28,7 @@ export type { ShapeConfig, PriceLimitColors } from '@tradecanvas/commons';
|
|
|
28
28
|
export { contrastRatio, readableOn, inkOn } from '@tradecanvas/commons';
|
|
29
29
|
export { readQuote, readNews, marketStatus, symbolTimeZone, tickBarCount } from '@tradecanvas/commons';
|
|
30
30
|
export type { Quote, QuoteSource, NewsItem, Trade, MarketStatus, ChartA11yLabels } from '@tradecanvas/commons';
|
|
31
|
-
export { EXCHANGE_TIME_ZONE
|
|
31
|
+
export { EXCHANGE_TIME_ZONE } from './Chart.js';
|
|
32
32
|
export { PRICE_SOURCES, isPriceSource, sourcePrice, indicatorSource, parseIndicatorSource } from '@tradecanvas/commons';
|
|
33
33
|
export type { PriceSource, IndicatorPlot, IndicatorPlotKind, IndicatorFill, IndicatorScale, IndicatorInputSpec, IndicatorInputKind, IndicatorSettingsChangePayload, } from '@tradecanvas/commons';
|
|
34
34
|
export { setLocale, getLocale, t, registerLocale, formatNumber, formatVND, formatVolumeLoc, usesKoreanUnits } from '@tradecanvas/commons';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACnF,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACtE,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,C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oBAAoB,CAAC;AAC5B,YAAY,EACV,uBAAuB,EACvB,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,YAAY,EACZ,WAAW,EACX,MAAM,EACN,eAAe,EACf,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,oBAAoB,EACpB,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as e, C as t, D as n, E as r, M as i, N as a, O as o,
|
|
2
|
-
import { CHART_STYLE_KEYS as he, DARK_PRICE_LIMITS as ge, DARK_TERMINAL as _e, DARK_THEME as ve, DARK_THEME as ye, DEFAULT_DRAWING_STYLE as be, DEFAULT_FONT_FAMILY as xe, DEFAULT_RECONNECT as Se, DEFAULT_SIGNAL_STYLE as Ce, DEFAULT_STREAM_CONFIG as we, DEFAULT_TIMEFRAME_FAVORITES as Te, DEFAULT_TRADE_ZONE_STYLE as Ee, DEFAULT_TRADING_CONFIG as De, HNX_SESSIONS as Oe, HOSE_SESSIONS as ke, KRX_SESSIONS as Ae, KR_COLORS as je, LIGHT_PRICE_LIMITS as Me, LIGHT_THEME as Ne, LIGHT_THEME as Pe, MARKET_CRYPTO as Fe, MARKET_HNX as Ie, MARKET_HOSE as Le, MARKET_HOSE_ETF as h, MARKET_KRX as g, MARKET_NXT as Re, MARKET_NYSE as ze, MARKET_UPBIT_KRW as Be, MARKET_UPCOM as Ve, MARKET_VN30F as He, MS_TIME_THRESHOLD as Ue, NXT_SESSIONS as We, PRICE_SOURCES as Ge, SANS_FONT_FAMILY as Ke, TC_PALETTE as qe, TC_SERIES_COLORS as Je, TIMEFRAMES_CRYPTO as Ye, TIMEFRAMES_FOREX as Xe, TIMEFRAMES_STOCK as Ze, UPCOM_SESSIONS as Qe, VN30F_SESSIONS as $e, VN_COLORS as et, VOLUME_ALPHA as tt, barTimeUnit as nt, barsAreDaily as rt, computePriceLimits as it, contrastRatio as at, createMarketTheme as ot, createVNTheme as st, formatFraction as ct, formatNumber as lt, formatVND as ut, formatVolumeLoc as dt, fractionTick as ft, getCurrentSession as pt, getLocale as mt, indicatorSource as ht, inkOn as gt, isPriceSource as _t, isTimeFrame as vt, isValidTimeZone as yt, marketStatus as bt, normalizeBar as xt, normalizeBarTime as St, offsetAt as Ct, parseIndicatorSource as wt, parseTimeframe as Tt, pickBaseTimeframe as Et, priceFormatterFor as Dt, priceStepAt as Ot, rankSymbols as kt, readNews as At, readQuote as jt, readableOn as Mt, registerLocale as Nt, resampleBars as Pt, roundToPriceStep as Ft, scaleMarketPrices as It, setLocale as Lt, sourcePrice as Rt, stepDecimals as zt, symbolTimeZone as Bt, t as Vt, tickBarCount as Ht, tickerOf as Ut, timeframeBucketStart as Wt, timeframeBucketStart as Gt, timeframeToMs as Kt, usesKoreanUnits as qt, vn30fContracts as Jt, vn30fLastTradingDay as Yt, volumeColor as Xt, wallToUtc as Zt, zoneOffsetMinutes as Qt } from "@tradecanvas/commons";
|
|
1
|
+
import { A as e, C as t, D as n, E as r, M as i, N as a, O as o, S as s, T as c, a as l, b as u, c as ee, d, f as te, g as ne, h as f, i as re, j as ie, k as ae, l as p, m as oe, n as se, p as ce, r as le, s as m, t as ue, w as de, x as fe, y as pe } from "./LayoutSession-D1AIWXuH.js";
|
|
2
|
+
import { CHART_SPACING as me, CHART_STYLE_KEYS as he, DARK_PRICE_LIMITS as ge, DARK_TERMINAL as _e, DARK_THEME as ve, DARK_THEME as ye, DEFAULT_DRAWING_STYLE as be, DEFAULT_FONT_FAMILY as xe, DEFAULT_RECONNECT as Se, DEFAULT_SIGNAL_STYLE as Ce, DEFAULT_STREAM_CONFIG as we, DEFAULT_TIMEFRAME_FAVORITES as Te, DEFAULT_TRADE_ZONE_STYLE as Ee, DEFAULT_TRADING_CONFIG as De, HNX_SESSIONS as Oe, HOSE_SESSIONS as ke, KRX_SESSIONS as Ae, KR_COLORS as je, LIGHT_PRICE_LIMITS as Me, LIGHT_THEME as Ne, LIGHT_THEME as Pe, MARKET_CRYPTO as Fe, MARKET_HNX as Ie, MARKET_HOSE as Le, MARKET_HOSE_ETF as h, MARKET_KRX as g, MARKET_NXT as Re, MARKET_NYSE as ze, MARKET_UPBIT_KRW as Be, MARKET_UPCOM as Ve, MARKET_VN30F as He, MS_TIME_THRESHOLD as Ue, NXT_SESSIONS as We, PRICE_SOURCES as Ge, SANS_FONT_FAMILY as Ke, TC_PALETTE as qe, TC_SERIES_COLORS as Je, TIMEFRAMES_CRYPTO as Ye, TIMEFRAMES_FOREX as Xe, TIMEFRAMES_STOCK as Ze, UPCOM_SESSIONS as Qe, VN30F_SESSIONS as $e, VN_COLORS as et, VOLUME_ALPHA as tt, barTimeUnit as nt, barsAreDaily as rt, computePriceLimits as it, contrastRatio as at, createMarketTheme as ot, createVNTheme as st, formatFraction as ct, formatNumber as lt, formatVND as ut, formatVolumeLoc as dt, fractionTick as ft, getCurrentSession as pt, getLocale as mt, indicatorSource as ht, inkOn as gt, isPriceSource as _t, isTimeFrame as vt, isValidTimeZone as yt, marketStatus as bt, normalizeBar as xt, normalizeBarTime as St, offsetAt as Ct, parseIndicatorSource as wt, parseTimeframe as Tt, pickBaseTimeframe as Et, priceFormatterFor as Dt, priceStepAt as Ot, rankSymbols as kt, readNews as At, readQuote as jt, readableOn as Mt, registerLocale as Nt, resampleBars as Pt, roundToPriceStep as Ft, scaleMarketPrices as It, setLocale as Lt, sourcePrice as Rt, stepDecimals as zt, symbolTimeZone as Bt, t as Vt, tickBarCount as Ht, tickerOf as Ut, timeframeBucketStart as Wt, timeframeBucketStart as Gt, timeframeToMs as Kt, usesKoreanUnits as qt, vn30fContracts as Jt, vn30fLastTradingDay as Yt, volumeColor as Xt, wallToUtc as Zt, zoneOffsetMinutes as Qt } from "@tradecanvas/commons";
|
|
3
3
|
import { AlertManager as $t, Animator as en, BarCountdown as tn, BaseFinanceChart as _, BinanceAdapter as nn, BybitAdapter as rn, CANDLE_PATTERNS as an, ChartLegend as on, ChartStateManager as sn, CoinbaseAdapter as cn, CompareRenderer as ln, CrosshairTooltip as un, CurrentPriceLine as dn, DEFAULT_LEGEND_CONFIG as fn, DEFAULT_MAX_WEBGL_CHARTS as pn, DEFAULT_SESSION_HOURS as mn, DataExporter as hn, DrawingBase as gn, Easing as _n, FinanceCrosshair as v, GROUP_HEADER as vn, INDICATOR_CATEGORIES as yn, IndicatorBase as bn, IndicatorValueMap as xn, KEPT_BUCKETS as Sn, KeyboardHandler as Cn, KrakenAdapter as wn, MAX_ALERT_BARS as Tn, MIN_ALERT_BARS as En, ManualFeed as Dn, MockAdapter as On, PaperExecutionAdapter as kn, PollingAdapter as An, RANGE_PRESETS as jn, ReconnectManager as Mn, ReplayController as Nn, ReplayManager as Pn, ResamplingAdapter as Fn, ReshapeMemo as In, Screenshot as Ln, SessionBreaks as Rn, SessionShading as zn, SignalMarkerManager as Bn, StreamManager as Vn, TickAggregator as Hn, TickBarAdapter as Un, TickBarBuilder as Wn, TradeZoneManager as Gn, UndoRedoManager as y, UpbitAdapter as Kn, VolumeRenderer as qn, Watermark as Jn, WebSocketAdapter as Yn, adapterFromFeed as Xn, axisTimes as Zn, barIndexToTime as Qn, barIndexToX as $n, barIndexToX as b, canvasMeasure as er, computeBarLayout as tr, computeCalendarLayout as nr, computeCounterClockLayout as rr, computeDonutLayout as ir, computeHistogramLayout as ar, computeMatrixLayout as or, computeScatterLayout as sr, correlationMatrix as cr, counterClockPhase as lr, counterClockPhase as ur, counterClockPoints as dr, counterClockPoints as fr, describeInputs as pr, detectCandlePatterns as mr, feedFromAdapter as hr, formatTooltipTime as gr, histogramBins as _r, hitBar as x, hitDay as S, hitMatrixCell as C, hitSlice as w, indicatorCategory as vr, isDataFeed as yr, isDataFeed as br, isPriceLevelAlert as xr, layoutGroupedTreemap as Sr, layoutSquarifiedTreemap as Cr, layoutUniformGrid as wr, lttbDownsample as Tr, lttbVisibleIndices as Er, nearestCounterClockPoint as T, nearestPoint as E, niceScale as Dr, priceToY as Or, priceToYMapper as kr, priceToYMapper as Ar, rangePresetStart as jr, renderBarChart as Mr, renderCalendar as Nr, renderCounterClock as Pr, renderDepthChart as Fr, renderDonut as Ir, renderEquityCurve as Lr, renderGauge as Rr, renderHeatmap as zr, renderHistogram as Br, renderMatrix as Vr, renderScatter as Hr, renderSparkline as Ur, renderWaterfall as Wr, servesTimeframe as Gr, setMaxWebGLCharts as Kr, shownCount as qr, timeToX as Jr, timestampToBarIndex as Yr, timestampToBarIndex as Xr, toHeikinAshi as Zr, toKagi as Qr, toLineBreak as $r, toPointAndFigure as ei, toRangeBars as ti, toRenko as ni, withResampling as ri, withTickBars as ii, xToBarIndex as ai, xToBarIndex as D, xToTime as oi, yToPrice as si, yToPrice as ci } from "@tradecanvas/core";
|
|
4
4
|
//#region src/frameworks/syncIndicators.ts
|
|
5
5
|
function li(e) {
|
|
@@ -36,7 +36,7 @@ var di = 3, O = (e) => ({
|
|
|
36
36
|
volume: e.volume
|
|
37
37
|
}), k = (e) => e.length > 0 ? e[e.length - 1] : null;
|
|
38
38
|
function fi(e, t, n) {
|
|
39
|
-
for (let r = 0; r < n; r++) if (!
|
|
39
|
+
for (let r = 0; r < n; r++) if (!a(e[r], t[r])) return !1;
|
|
40
40
|
return !0;
|
|
41
41
|
}
|
|
42
42
|
function pi(e, t) {
|
|
@@ -46,11 +46,11 @@ function pi(e, t) {
|
|
|
46
46
|
}
|
|
47
47
|
function mi(e, t, n) {
|
|
48
48
|
let r = [];
|
|
49
|
-
for (let
|
|
50
|
-
let
|
|
51
|
-
if (!s
|
|
52
|
-
if (
|
|
53
|
-
r.push(O(
|
|
49
|
+
for (let o = 0; o < t.length; o++) {
|
|
50
|
+
let s = e[n + o];
|
|
51
|
+
if (!a(s, t[o])) {
|
|
52
|
+
if (s.time !== t[o].time || !i(s)) return null;
|
|
53
|
+
r.push(O(s));
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
return r;
|
|
@@ -67,20 +67,20 @@ function gi(e) {
|
|
|
67
67
|
function _i(e, t) {
|
|
68
68
|
let n = [];
|
|
69
69
|
for (let r = t; r < e.length; r++) {
|
|
70
|
-
if (!
|
|
70
|
+
if (!i(e[r]) || !(e[r].time > e[r - 1].time)) return null;
|
|
71
71
|
n.push(O(e[r]));
|
|
72
72
|
}
|
|
73
73
|
return n;
|
|
74
74
|
}
|
|
75
75
|
function vi(e, t, n) {
|
|
76
76
|
let r = n.length;
|
|
77
|
-
if (r === 0 || !n.last || !
|
|
78
|
-
let
|
|
79
|
-
if (t !== n.source && (n.source.length !== r || !fi(n.source, t,
|
|
77
|
+
if (r === 0 || !n.last || !i(n.last) || t.length < r || !pi(e, n)) return !1;
|
|
78
|
+
let o = n.recent ?? [], s = r - 1 - o.length;
|
|
79
|
+
if (t !== n.source && (n.source.length !== r || !fi(n.source, t, s))) return !1;
|
|
80
80
|
let c = t[r - 1];
|
|
81
|
-
if (c.time !== n.last.time || !
|
|
82
|
-
let l = mi(t,
|
|
83
|
-
return !l || !u || !hi(e, l) ? !1 : (
|
|
81
|
+
if (c.time !== n.last.time || !i(c)) return !1;
|
|
82
|
+
let l = mi(t, o, s), u = _i(t, r);
|
|
83
|
+
return !l || !u || !hi(e, l) ? !1 : (a(c, n.last) || e.updateLastBar(O(c)), u.length === 1 ? e.appendBar(u[0]) : u.length > 1 && e.appendBars(u), !0);
|
|
84
84
|
}
|
|
85
85
|
function yi(e, t, n) {
|
|
86
86
|
(!n || !vi(e, t, n)) && e.setData(t.map(O));
|
|
@@ -171,8 +171,8 @@ var ki = class {
|
|
|
171
171
|
this.root.style.gridTemplateColumns = `repeat(${e}, minmax(0, 1fr))`, this.root.style.gridTemplateRows = `repeat(${t}, minmax(0, 1fr))`, this.root.style.gap = `${n}px`, this.placeCells();
|
|
172
172
|
}
|
|
173
173
|
placeCells() {
|
|
174
|
-
let e =
|
|
175
|
-
this.cells.forEach((t, n) =>
|
|
174
|
+
let e = ee(m[this.layout]);
|
|
175
|
+
this.cells.forEach((t, n) => te(t.container, e[n]));
|
|
176
176
|
}
|
|
177
177
|
createCells() {
|
|
178
178
|
let e = p(m[this.layout]);
|
|
@@ -970,6 +970,6 @@ var Wi = class {
|
|
|
970
970
|
}
|
|
971
971
|
};
|
|
972
972
|
//#endregion
|
|
973
|
-
export { $t as AlertManager, en as Animator, Ii as BarChart, tn as BarCountdown, nn as BinanceAdapter, rn as BybitAdapter, an as CANDLE_PATTERNS, he as CHART_STYLE_KEYS, di as CORRECTABLE_BARS, Bi as CalendarChart, f as Chart, ki as ChartGrid, on as ChartLegend, sn as ChartStateManager, cn as CoinbaseAdapter, ln as CompareRenderer, Hi as CounterClockChart, un as CrosshairTooltip, dn as CurrentPriceLine, ge as DARK_PRICE_LIMITS, _e as DARK_TERMINAL, ve as DARK_THEME, be as DEFAULT_DRAWING_STYLE, xe as DEFAULT_FONT_FAMILY,
|
|
973
|
+
export { $t as AlertManager, en as Animator, Ii as BarChart, tn as BarCountdown, nn as BinanceAdapter, rn as BybitAdapter, an as CANDLE_PATTERNS, me as CHART_SPACING, he as CHART_STYLE_KEYS, di as CORRECTABLE_BARS, Bi as CalendarChart, f as Chart, ki as ChartGrid, on as ChartLegend, sn as ChartStateManager, cn as CoinbaseAdapter, ln as CompareRenderer, Hi as CounterClockChart, un as CrosshairTooltip, dn as CurrentPriceLine, ge as DARK_PRICE_LIMITS, _e as DARK_TERMINAL, ve as DARK_THEME, be as DEFAULT_DRAWING_STYLE, xe as DEFAULT_FONT_FAMILY, ae as DEFAULT_HISTORY_PAGE_SIZE, fn as DEFAULT_LEGEND_CONFIG, pn as DEFAULT_MAX_WEBGL_CHARTS, Se as DEFAULT_RECONNECT, mn as DEFAULT_SESSION_HOURS, Ce as DEFAULT_SIGNAL_STYLE, we as DEFAULT_STREAM_CONFIG, Te as DEFAULT_TIMEFRAME_FAVORITES, Ee as DEFAULT_TRADE_ZONE_STYLE, De as DEFAULT_TRADING_CONFIG, hn as DataExporter, ie as DataManager, ji as DepthChart, Li as DonutChart, ce as DragDropImporter, gn as DrawingBase, ne as EXCHANGE_TIME_ZONE, _n as Easing, H as EquityCurveChart, Fi as GaugeChart, e as HISTORY_RETRY_MS, Oe as HNX_SESSIONS, ke as HOSE_SESSIONS, U as HeatmapChart, zi as HistogramChart, yn as INDICATOR_CATEGORIES, bn as IndicatorBase, xn as IndicatorValueMap, Sn as KEPT_BUCKETS, Ae as KRX_SESSIONS, je as KR_COLORS, Cn as KeyboardHandler, wn as KrakenAdapter, Me as LIGHT_PRICE_LIMITS, Ne as LIGHT_THEME, n as LayoutManager, ue as LayoutSession, Fe as MARKET_CRYPTO, Ie as MARKET_HNX, Le as MARKET_HOSE, h as MARKET_HOSE_ETF, g as MARKET_KRX, Re as MARKET_NXT, ze as MARKET_NYSE, Be as MARKET_UPBIT_KRW, Ve as MARKET_UPCOM, He as MARKET_VN30F, Tn as MAX_ALERT_BARS, se as MAX_LAYOUT_NAME, En as MIN_ALERT_BARS, Ue as MS_TIME_THRESHOLD, Dn as ManualFeed, Vi as MatrixChart, On as MockAdapter, We as NXT_SESSIONS, de as PLUGIN_API_VERSION, j as POWERED_BY_LABEL, Ge as PRICE_SOURCES, kn as PaperExecutionAdapter, Wi as PerformanceDashboard, pe as PluginManager, An as PollingAdapter, jn as RANGE_PRESETS, Mn as ReconnectManager, Nn as ReplayController, Pn as ReplayManager, Fn as ResamplingAdapter, In as ReshapeMemo, Ke as SANS_FONT_FAMILY, Ri as ScatterChart, Ln as Screenshot, Rn as SessionBreaks, zn as SessionShading, Bn as SignalMarkerManager, Ai as SparklineChart, Vn as StreamManager, qe as TC_PALETTE, Je as TC_SERIES_COLORS, Ye as TIMEFRAMES_CRYPTO, Xe as TIMEFRAMES_FOREX, Ze as TIMEFRAMES_STOCK, M as TRADECANVAS_MARK_SVG, A as TRADECANVAS_URL, N as TRADECANVAS_WORDMARK_SVG, o as ThemeManager, Hn as TickAggregator, Un as TickBarAdapter, Wn as TickBarBuilder, Gn as TradeZoneManager, Qe as UPCOM_SESSIONS, y as UndoRedoManager, Kn as UpbitAdapter, $e as VN30F_SESSIONS, et as VN_COLORS, tt as VOLUME_ALPHA, qn as VolumeRenderer, Mi as WaterfallChart, Jn as Watermark, Yn as WebSocketAdapter, Xn as adapterFromFeed, Zn as axisTimes, $n as barIndexToX, nt as barTimeUnit, rt as barsAreDaily, le as cleanLayoutName, u as clearGlobalPlugins, q as computeDrawdownCurve, J as computeMonthlyReturns, it as computePriceLimits, at as contrastRatio, cr as correlationMatrix, lr as counterClockPhase, dr as counterClockPoints, ot as createMarketTheme, Di as createPoweredBy, st as createVNTheme, pr as describeInputs, mr as detectCandlePatterns, yi as feedBars, hr as feedFromAdapter, ct as formatFraction, lt as formatNumber, gr as formatTooltipTime, ut as formatVND, dt as formatVolumeLoc, ft as fractionTick, pt as getCurrentSession, fe as getGlobalPlugins, mt as getLocale, _r as histogramBins, vr as indicatorCategory, ht as indicatorSource, gt as inkOn, yr as isDataFeed, xr as isPriceLevelAlert, _t as isPriceSource, vt as isTimeFrame, yt as isValidTimeZone, re as localStorageLayouts, Tr as lttbDownsample, Er as lttbVisibleIndices, bt as marketStatus, l as memoryLayouts, Dr as niceScale, xt as normalizeBar, St as normalizeBarTime, Ct as offsetAt, z as opensElsewhere, Oi as overlayScale, c as overlaysForLayer, wt as parseIndicatorSource, oe as parseOHLCV, Tt as parseTimeframe, Et as pickBaseTimeframe, r as pluginKey, V as poweredByHtml, F as poweredByLayout, Dt as priceFormatterFor, Ot as priceStepAt, Or as priceToY, kr as priceToYMapper, jr as rangePresetStart, kt as rankSymbols, At as readNews, jt as readQuote, Mt as readableOn, Nt as registerLocale, s as registerPlugin, Pt as resampleBars, Ft as roundToPriceStep, R as safeBadgeHref, It as scaleMarketPrices, Q as selectKeyStats, Gr as servesTimeframe, Lt as setLocale, Kr as setMaxWebGLCharts, Rt as sourcePrice, zt as stepDecimals, Bt as symbolTimeZone, ui as syncIndicators, Vt as t, Ht as tickBarCount, Ut as tickerOf, Jr as timeToX, Wt as timeframeBucketStart, Kt as timeframeToMs, Yr as timestampToBarIndex, K as toEquityPoints, Zr as toHeikinAshi, Qr as toKagi, $r as toLineBreak, ei as toPointAndFigure, ti as toRangeBars, ni as toRenko, t as unregisterPlugin, qt as usesKoreanUnits, Jt as vn30fContracts, Yt as vn30fLastTradingDay, Xt as volumeColor, Zt as wallToUtc, ri as withResampling, ii as withTickBars, ai as xToBarIndex, oi as xToTime, si as yToPrice, Qt as zoneOffsetMinutes };
|
|
974
974
|
|
|
975
975
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./indicatorLabel-BsidWCv1.js";
|
|
2
|
-
import { c as t } from "./i18n-
|
|
2
|
+
import { c as t } from "./i18n-BudCuwZD.js";
|
|
3
3
|
//#region src/widget/indicatorInputWords.ts
|
|
4
4
|
function n(e) {
|
|
5
5
|
return Object.prototype.hasOwnProperty.call(t, e);
|
|
@@ -22,4 +22,4 @@ function a(t, n) {
|
|
|
22
22
|
//#endregion
|
|
23
23
|
export { r as n, a as r, i as t };
|
|
24
24
|
|
|
25
|
-
//# sourceMappingURL=indicatorInputWords-
|
|
25
|
+
//# sourceMappingURL=indicatorInputWords-BfiSCSB-.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indicatorInputWords-
|
|
1
|
+
{"version":3,"file":"indicatorInputWords-BfiSCSB-.js","names":[],"sources":["../src/widget/indicatorInputWords.ts"],"sourcesContent":["import type { IndicatorDescriptor } from '@tradecanvas/commons';\nimport { indicatorChipLabel } from '../indicatorLabel.js';\nimport { EN_MESSAGES, type MessageKey, type Translator } from './i18n.js';\n\n/**\n * Words for an indicator's inputs in the widget's language: an input named\n * `anchor` is `indicatorInput.anchor`, its choice `'week'` is\n * `indicatorInput.anchor.week`. Only inputs the widget has words for; any\n * other keeps its own label and its values as they are.\n */\n\n/** Whether the widget has a message under `key`, one built from an input's name. */\nfunction isMessageKey(key: string): key is MessageKey {\n return Object.prototype.hasOwnProperty.call(EN_MESSAGES, key);\n}\n\n/** An input's label in the widget's language, or null for one it has no word for. */\nexport function inputLabel(name: string, t: Translator): string | null {\n const key = `indicatorInput.${name}`;\n return isMessageKey(key) ? t(key) : null;\n}\n\n/** A choice of an input in the widget's language, or null for one it has no word for. */\nexport function choiceLabel(name: string, choice: string | number, t: Translator): string | null {\n const key = `indicatorInput.${name}.${choice}`;\n return isMessageKey(key) ? t(key) : null;\n}\n\n/** An indicator on the chart, as the widget names it. */\nexport interface NamedIndicator {\n id: string;\n params: Record<string, unknown>;\n descriptor: Pick<IndicatorDescriptor, 'defaultConfig' | 'shortName' | 'inputs'>;\n}\n\n/**\n * The indicator's name in the legend, the chips and the Objects panel: its\n * chip label ('EMA 21'), then the word for each choice off its default, so\n * two read apart ('VWAP', 'VWAP Week'). The CSV column keeps the chip label.\n */\nexport function widgetIndicatorLabel(ind: NamedIndicator, t: Translator): string {\n const { defaultConfig, shortName, inputs } = ind.descriptor;\n const words = Object.entries(inputs ?? {}).flatMap(([name, spec]) => {\n const value = ind.params[name];\n if (!spec.options || (typeof value !== 'string' && typeof value !== 'number') || value === defaultConfig[name]) return [];\n return choiceLabel(name, value, t) ?? [];\n });\n return [indicatorChipLabel(ind.id, ind.params, defaultConfig, shortName), ...words].join(' ');\n}\n"],"mappings":";;;AAYA,SAAS,EAAa,GAAgC;AACpD,QAAO,OAAO,UAAU,eAAe,KAAK,GAAa,EAAI;;AAI/D,SAAgB,EAAW,GAAc,GAA8B;CACrE,IAAM,IAAM,kBAAkB;AAC9B,QAAO,EAAa,EAAI,GAAG,EAAE,EAAI,GAAG;;AAItC,SAAgB,EAAY,GAAc,GAAyB,GAA8B;CAC/F,IAAM,IAAM,kBAAkB,EAAK,GAAG;AACtC,QAAO,EAAa,EAAI,GAAG,EAAE,EAAI,GAAG;;AAetC,SAAgB,EAAqB,GAAqB,GAAuB;CAC/E,IAAM,EAAE,kBAAe,cAAW,cAAW,EAAI,YAC3C,IAAQ,OAAO,QAAQ,KAAU,EAAE,CAAC,CAAC,SAAS,CAAC,GAAM,OAAU;EACnE,IAAM,IAAQ,EAAI,OAAO;AAEzB,SADI,CAAC,EAAK,WAAY,OAAO,KAAU,YAAY,OAAO,KAAU,YAAa,MAAU,EAAc,KAAc,EAAE,GAClH,EAAY,GAAM,GAAO,EAAE,IAAI,EAAE;GACxC;AACF,QAAO,CAAC,EAAmB,EAAI,IAAI,EAAI,QAAQ,GAAe,EAAU,EAAE,GAAG,EAAM,CAAC,KAAK,IAAI"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(`./indicatorLabel-BQ6Kdry2.cjs`),t=require(`./i18n-
|
|
2
|
-
//# sourceMappingURL=indicatorInputWords-
|
|
1
|
+
const e=require(`./indicatorLabel-BQ6Kdry2.cjs`),t=require(`./i18n-D8MhJwUv.cjs`);function n(e){return Object.prototype.hasOwnProperty.call(t.c,e)}function r(e,t){let r=`indicatorInput.${e}`;return n(r)?t(r):null}function i(e,t,r){let i=`indicatorInput.${e}.${t}`;return n(i)?r(i):null}function a(t,n){let{defaultConfig:r,shortName:a,inputs:o}=t.descriptor,s=Object.entries(o??{}).flatMap(([e,a])=>{let o=t.params[e];return!a.options||typeof o!=`string`&&typeof o!=`number`||o===r[e]?[]:i(e,o,n)??[]});return[e.t(t.id,t.params,r,a),...s].join(` `)}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}});
|
|
2
|
+
//# sourceMappingURL=indicatorInputWords-CdAL8a73.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indicatorInputWords-
|
|
1
|
+
{"version":3,"file":"indicatorInputWords-CdAL8a73.cjs","names":[],"sources":["../src/widget/indicatorInputWords.ts"],"sourcesContent":["import type { IndicatorDescriptor } from '@tradecanvas/commons';\nimport { indicatorChipLabel } from '../indicatorLabel.js';\nimport { EN_MESSAGES, type MessageKey, type Translator } from './i18n.js';\n\n/**\n * Words for an indicator's inputs in the widget's language: an input named\n * `anchor` is `indicatorInput.anchor`, its choice `'week'` is\n * `indicatorInput.anchor.week`. Only inputs the widget has words for; any\n * other keeps its own label and its values as they are.\n */\n\n/** Whether the widget has a message under `key`, one built from an input's name. */\nfunction isMessageKey(key: string): key is MessageKey {\n return Object.prototype.hasOwnProperty.call(EN_MESSAGES, key);\n}\n\n/** An input's label in the widget's language, or null for one it has no word for. */\nexport function inputLabel(name: string, t: Translator): string | null {\n const key = `indicatorInput.${name}`;\n return isMessageKey(key) ? t(key) : null;\n}\n\n/** A choice of an input in the widget's language, or null for one it has no word for. */\nexport function choiceLabel(name: string, choice: string | number, t: Translator): string | null {\n const key = `indicatorInput.${name}.${choice}`;\n return isMessageKey(key) ? t(key) : null;\n}\n\n/** An indicator on the chart, as the widget names it. */\nexport interface NamedIndicator {\n id: string;\n params: Record<string, unknown>;\n descriptor: Pick<IndicatorDescriptor, 'defaultConfig' | 'shortName' | 'inputs'>;\n}\n\n/**\n * The indicator's name in the legend, the chips and the Objects panel: its\n * chip label ('EMA 21'), then the word for each choice off its default, so\n * two read apart ('VWAP', 'VWAP Week'). The CSV column keeps the chip label.\n */\nexport function widgetIndicatorLabel(ind: NamedIndicator, t: Translator): string {\n const { defaultConfig, shortName, inputs } = ind.descriptor;\n const words = Object.entries(inputs ?? {}).flatMap(([name, spec]) => {\n const value = ind.params[name];\n if (!spec.options || (typeof value !== 'string' && typeof value !== 'number') || value === defaultConfig[name]) return [];\n return choiceLabel(name, value, t) ?? [];\n });\n return [indicatorChipLabel(ind.id, ind.params, defaultConfig, shortName), ...words].join(' ');\n}\n"],"mappings":"kFAYA,SAAS,EAAa,EAAgC,CACpD,OAAO,OAAO,UAAU,eAAe,KAAK,EAAA,EAAa,EAAI,CAI/D,SAAgB,EAAW,EAAc,EAA8B,CACrE,IAAM,EAAM,kBAAkB,IAC9B,OAAO,EAAa,EAAI,CAAG,EAAE,EAAI,CAAG,KAItC,SAAgB,EAAY,EAAc,EAAyB,EAA8B,CAC/F,IAAM,EAAM,kBAAkB,EAAK,GAAG,IACtC,OAAO,EAAa,EAAI,CAAG,EAAE,EAAI,CAAG,KAetC,SAAgB,EAAqB,EAAqB,EAAuB,CAC/E,GAAM,CAAE,gBAAe,YAAW,UAAW,EAAI,WAC3C,EAAQ,OAAO,QAAQ,GAAU,EAAE,CAAC,CAAC,SAAS,CAAC,EAAM,KAAU,CACnE,IAAM,EAAQ,EAAI,OAAO,GAEzB,MADI,CAAC,EAAK,SAAY,OAAO,GAAU,UAAY,OAAO,GAAU,UAAa,IAAU,EAAc,GAAc,EAAE,CAClH,EAAY,EAAM,EAAO,EAAE,EAAI,EAAE,EACxC,CACF,MAAO,CAAC,EAAA,EAAmB,EAAI,GAAI,EAAI,OAAQ,EAAe,EAAU,CAAE,GAAG,EAAM,CAAC,KAAK,IAAI"}
|
|
@@ -3,6 +3,12 @@ import { PanelPosition, PanelConfig, ResolvedLayout, Rect } from '@tradecanvas/c
|
|
|
3
3
|
export declare const COLLAPSED_PANE_HEIGHT = 20;
|
|
4
4
|
/** The least the price pane keeps while a pane is maximised. */
|
|
5
5
|
export declare const MIN_MAIN_HEIGHT_WITH_MAXIMIZED = 48;
|
|
6
|
+
/**
|
|
7
|
+
* The least of the chart's height the price pane keeps, however many panes
|
|
8
|
+
* are open under and over it: the smaller golden part (38.2%). The panes
|
|
9
|
+
* share the rest.
|
|
10
|
+
*/
|
|
11
|
+
export declare const MIN_MAIN_SHARE = 0.382;
|
|
6
12
|
export declare class LayoutManager {
|
|
7
13
|
private panels;
|
|
8
14
|
private containerWidth;
|
|
@@ -52,6 +58,13 @@ export declare class LayoutManager {
|
|
|
52
58
|
orderPanels(ids: readonly string[]): void;
|
|
53
59
|
/** A pane's height (or width) on screen: folded, maximised or as set. */
|
|
54
60
|
private shownSize;
|
|
61
|
+
/**
|
|
62
|
+
* The heights the open top and bottom panes show at when together they ask
|
|
63
|
+
* for more than the price pane can give (`MIN_MAIN_SHARE`): each the same
|
|
64
|
+
* part of its own, never under its header. The size each was given stays
|
|
65
|
+
* its own, for a taller chart. Empty while they fit or one is maximised.
|
|
66
|
+
*/
|
|
67
|
+
private squeezed;
|
|
55
68
|
setPanelPosition(instanceId: string, position: PanelPosition): void;
|
|
56
69
|
/**
|
|
57
70
|
* Resize a pane; a folded pane opens, and a maximised layout goes back to
|
|
@@ -59,6 +72,16 @@ export declare class LayoutManager {
|
|
|
59
72
|
* for more).
|
|
60
73
|
*/
|
|
61
74
|
setPanelSize(instanceId: string, size: number): void;
|
|
75
|
+
/** What the open top and bottom panes have between them, with `folded` more showing their headers. */
|
|
76
|
+
private roomForOpen;
|
|
77
|
+
/**
|
|
78
|
+
* A pane dragged to `height` on screen. While the panes fit, that is its
|
|
79
|
+
* size. While they are giving way to the price pane, its size becomes the
|
|
80
|
+
* one that shows at that height among the others, so its edge stays under
|
|
81
|
+
* the pointer; the others take what is left by their own sizes, which stay
|
|
82
|
+
* as given. Dragged back to where it was, it has the size it had.
|
|
83
|
+
*/
|
|
84
|
+
setPanelHeightOnScreen(instanceId: string, height: number): void;
|
|
62
85
|
/** Width reserved for the price axis right of the main chart. */
|
|
63
86
|
setPriceAxisWidth(width: number): void;
|
|
64
87
|
/** Width reserved left of the plot for the left price scale (0 = none). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutManager.d.ts","sourceRoot":"","sources":["../../src/layout/LayoutManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAA8B,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAKzH,8FAA8F;AAC9F,eAAO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CAAC,GAAG,OAAO;IAMjD,OAAO,IAAI,cAAc;IAkGzB,gBAAgB,IAAI,IAAI;CAGzB"}
|
package/dist/model/PriceFit.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { DataSeries, ViewportState } from '@tradecanvas/commons';
|
|
1
|
+
import { ChartSpacing, DataSeries, ViewportState } from '@tradecanvas/commons';
|
|
2
|
+
/** The margins a fit leaves: above and below the prices, and between the volume band and the lowest candle. */
|
|
3
|
+
export type FitSpacing = Pick<ChartSpacing, 'priceMargin' | 'volumeGap'>;
|
|
2
4
|
export interface PriceRange {
|
|
3
5
|
min: number;
|
|
4
6
|
max: number;
|
|
@@ -42,7 +44,10 @@ export declare class PriceFit {
|
|
|
42
44
|
private pending;
|
|
43
45
|
/** The series began with no bars, so they come one by one: see `settle`. */
|
|
44
46
|
private arriving;
|
|
47
|
+
private spacing;
|
|
45
48
|
constructor(autoScale: boolean);
|
|
49
|
+
/** The margins the next fit leaves (the chart's density). */
|
|
50
|
+
setSpacing(spacing: FitSpacing): void;
|
|
46
51
|
isAuto(): boolean;
|
|
47
52
|
/** Whether this frame fits the scale. */
|
|
48
53
|
shouldFit(): boolean;
|
|
@@ -63,8 +68,8 @@ export declare class PriceFit {
|
|
|
63
68
|
settle(vs: ViewportState, shown: number): void;
|
|
64
69
|
/**
|
|
65
70
|
* Fit the scale to the bars on view, the overlay indicators and the compare
|
|
66
|
-
* lines, in
|
|
67
|
-
* at the bottom is left to it.
|
|
71
|
+
* lines, in the density's margins above and below; with volume on view, the
|
|
72
|
+
* band at the bottom is left to it, and a gap over it.
|
|
68
73
|
*/
|
|
69
74
|
fit(target: FitTarget, data: DataSeries, vs: ViewportState, sources: FitSources): void;
|
|
70
75
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PriceFit.d.ts","sourceRoot":"","sources":["../../src/model/PriceFit.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"PriceFit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