opencandle 0.11.1 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (678) hide show
  1. package/README.md +50 -186
  2. package/dist/analysts/contracts.js +0 -1
  3. package/dist/analysts/orchestrator.js +0 -1
  4. package/dist/cli-main.js +22 -15
  5. package/dist/cli-options.d.ts +4 -0
  6. package/dist/cli-options.js +33 -0
  7. package/dist/cli.js +8 -3
  8. package/dist/config.d.ts +4 -0
  9. package/dist/config.js +1 -1
  10. package/dist/doctor/cli-command.js +9 -5
  11. package/dist/doctor/render.js +0 -1
  12. package/dist/doctor/report.js +53 -11
  13. package/dist/gui/server/ask-user-bridge.d.ts +19 -0
  14. package/dist/gui/server/ask-user-bridge.js +55 -0
  15. package/dist/gui/server/automation-heartbeat.d.ts +25 -0
  16. package/dist/gui/server/automation-heartbeat.js +61 -0
  17. package/dist/gui/server/background-quotes.d.ts +39 -0
  18. package/dist/gui/server/background-quotes.js +71 -0
  19. package/dist/gui/server/chat-event-adapter.d.ts +16 -0
  20. package/dist/gui/server/chat-event-adapter.js +388 -0
  21. package/dist/gui/server/gui-session-manager.d.ts +2 -0
  22. package/dist/gui/server/gui-session-manager.js +4 -0
  23. package/dist/gui/server/history-snapshot-store.d.ts +8 -0
  24. package/dist/gui/server/history-snapshot-store.js +43 -0
  25. package/dist/gui/server/http-routes.d.ts +71 -0
  26. package/dist/gui/server/http-routes.js +1033 -0
  27. package/dist/gui/server/invoke-tool.d.ts +47 -0
  28. package/dist/gui/server/invoke-tool.js +373 -0
  29. package/dist/gui/server/live-chat-event-adapter.d.ts +21 -0
  30. package/dist/gui/server/live-chat-event-adapter.js +224 -0
  31. package/dist/gui/server/local-session-coordinator.d.ts +26 -0
  32. package/dist/gui/server/local-session-coordinator.js +53 -0
  33. package/dist/gui/server/market-indices-api.d.ts +21 -0
  34. package/dist/gui/server/market-indices-api.js +26 -0
  35. package/dist/gui/server/market-indices-snapshot-store.d.ts +12 -0
  36. package/dist/gui/server/market-indices-snapshot-store.js +56 -0
  37. package/dist/gui/server/market-state-api.d.ts +250 -0
  38. package/dist/gui/server/market-state-api.js +597 -0
  39. package/dist/gui/server/model-setup.d.ts +55 -0
  40. package/dist/gui/server/model-setup.js +154 -0
  41. package/dist/gui/server/private-api-access.d.ts +6 -0
  42. package/dist/gui/server/private-api-access.js +53 -0
  43. package/dist/gui/server/projector.d.ts +49 -0
  44. package/dist/gui/server/projector.js +296 -0
  45. package/dist/gui/server/prompt-observation.d.ts +8 -0
  46. package/dist/gui/server/prompt-observation.js +43 -0
  47. package/dist/gui/server/quote-snapshot-store.d.ts +14 -0
  48. package/dist/gui/server/quote-snapshot-store.js +49 -0
  49. package/dist/gui/server/server.d.ts +1 -0
  50. package/dist/gui/server/server.js +262 -0
  51. package/dist/gui/server/session-actions.d.ts +60 -0
  52. package/dist/gui/server/session-actions.js +218 -0
  53. package/dist/gui/server/session-entry-wait.d.ts +27 -0
  54. package/dist/gui/server/session-entry-wait.js +129 -0
  55. package/dist/gui/server/session-list.d.ts +2 -0
  56. package/dist/gui/server/session-list.js +11 -0
  57. package/dist/gui/server/shutdown.d.ts +10 -0
  58. package/dist/gui/server/shutdown.js +29 -0
  59. package/dist/gui/server/tool-invoke-ack.d.ts +17 -0
  60. package/dist/gui/server/tool-invoke-ack.js +26 -0
  61. package/dist/gui/server/tool-metadata.d.ts +93 -0
  62. package/dist/gui/server/tool-metadata.js +148 -0
  63. package/dist/gui/server/websocket.d.ts +9 -0
  64. package/dist/gui/server/websocket.js +124 -0
  65. package/dist/gui/server/writer-lock.d.ts +1 -0
  66. package/dist/gui/server/writer-lock.js +1 -0
  67. package/dist/gui/server/ws-hub.d.ts +50 -0
  68. package/dist/gui/server/ws-hub.js +284 -0
  69. package/dist/gui/shared/chat-events.d.ts +174 -0
  70. package/dist/gui/shared/chat-events.js +13 -0
  71. package/dist/gui/shared/event-reducer.d.ts +3 -0
  72. package/dist/gui/shared/event-reducer.js +187 -0
  73. package/dist/index.js +0 -1
  74. package/dist/infra/cache.d.ts +4 -0
  75. package/dist/infra/cache.js +4 -1
  76. package/dist/infra/freshness.js +0 -1
  77. package/dist/infra/http-client.js +1 -2
  78. package/dist/infra/index.js +0 -1
  79. package/dist/infra/lse-byte-budget.d.ts +10 -0
  80. package/dist/infra/lse-byte-budget.js +47 -0
  81. package/dist/infra/market-calendar.js +0 -1
  82. package/dist/infra/native-dependencies.js +0 -1
  83. package/dist/infra/node-version.js +0 -1
  84. package/dist/infra/open-url.js +0 -1
  85. package/dist/infra/opencandle-paths.js +0 -1
  86. package/dist/infra/rate-limiter.js +1 -1
  87. package/dist/market-state/alert-conditions.js +0 -1
  88. package/dist/market-state/alert-runner.d.ts +1 -0
  89. package/dist/market-state/alert-runner.js +5 -4
  90. package/dist/market-state/daily-report.js +0 -1
  91. package/dist/market-state/local-automation-service.js +0 -1
  92. package/dist/market-state/notification-delivery.js +0 -1
  93. package/dist/market-state/resolve-for-mutation.js +0 -1
  94. package/dist/market-state/resolve.js +0 -1
  95. package/dist/market-state/service.d.ts +26 -21
  96. package/dist/market-state/service.js +175 -36
  97. package/dist/market-state/summaries.js +1 -13
  98. package/dist/memory/index.js +0 -1
  99. package/dist/memory/manager.js +0 -1
  100. package/dist/memory/preference-extractor.js +0 -1
  101. package/dist/memory/retrieval.js +0 -1
  102. package/dist/memory/sqlite.js +60 -11
  103. package/dist/memory/storage.js +0 -1
  104. package/dist/memory/tool-defaults.js +0 -1
  105. package/dist/memory/types.js +0 -1
  106. package/dist/monitor.js +0 -1
  107. package/dist/onboarding/connect.js +0 -1
  108. package/dist/onboarding/credential-interceptor.js +0 -1
  109. package/dist/onboarding/degradation-accumulator.js +0 -1
  110. package/dist/onboarding/prompt-user.d.ts +1 -1
  111. package/dist/onboarding/prompt-user.js +0 -1
  112. package/dist/onboarding/provider-status.js +0 -1
  113. package/dist/onboarding/providers.d.ts +16 -1
  114. package/dist/onboarding/providers.js +20 -1
  115. package/dist/onboarding/state.js +0 -1
  116. package/dist/onboarding/tool-helpers.js +0 -1
  117. package/dist/onboarding/tool-tags.js +0 -1
  118. package/dist/onboarding/validate-model-key.d.ts +17 -0
  119. package/dist/onboarding/validate-model-key.js +86 -0
  120. package/dist/onboarding/validation.js +8 -1
  121. package/dist/pi/opencandle-extension.d.ts +2 -1
  122. package/dist/pi/opencandle-extension.js +4 -4
  123. package/dist/pi/session-action-dedupe.js +0 -1
  124. package/dist/pi/session-storage.js +0 -1
  125. package/dist/pi/session-writer-lock.js +0 -1
  126. package/dist/pi/session.d.ts +2 -3
  127. package/dist/pi/session.js +7 -6
  128. package/dist/pi/setup.d.ts +4 -2
  129. package/dist/pi/setup.js +60 -61
  130. package/dist/pi/tool-adapter.js +0 -1
  131. package/dist/pi/tui-session-coordinator.js +0 -1
  132. package/dist/prompts/context-builder.js +1 -2
  133. package/dist/prompts/disclaimer.js +0 -1
  134. package/dist/prompts/policy-cards.js +0 -1
  135. package/dist/prompts/sections.js +0 -1
  136. package/dist/prompts/symbol-preflight.js +0 -1
  137. package/dist/prompts/workflow-prompts.js +16 -15
  138. package/dist/providers/alpha-vantage.js +2 -3
  139. package/dist/providers/coingecko.js +0 -1
  140. package/dist/providers/errors.js +0 -1
  141. package/dist/providers/exa-search.js +11 -10
  142. package/dist/providers/external-tool-command.js +0 -1
  143. package/dist/providers/external-tool-error.js +0 -1
  144. package/dist/providers/fear-greed.js +0 -1
  145. package/dist/providers/finnhub.js +0 -1
  146. package/dist/providers/fred.js +0 -1
  147. package/dist/providers/index.d.ts +1 -0
  148. package/dist/providers/index.js +1 -1
  149. package/dist/providers/lse.d.ts +35 -0
  150. package/dist/providers/lse.js +284 -0
  151. package/dist/providers/polymarket.js +22 -6
  152. package/dist/providers/provider-credential-error.js +0 -1
  153. package/dist/providers/reddit-cli.js +0 -1
  154. package/dist/providers/reddit.js +0 -1
  155. package/dist/providers/sec-edgar.js +0 -1
  156. package/dist/providers/tradingview.js +1 -2
  157. package/dist/providers/twitter-cli.js +0 -1
  158. package/dist/providers/twitter.js +0 -1
  159. package/dist/providers/web-search.js +15 -12
  160. package/dist/providers/with-fallback.js +0 -1
  161. package/dist/providers/wrap-provider.js +1 -1
  162. package/dist/providers/yahoo-finance.js +68 -4
  163. package/dist/routing/classify-intent.js +0 -1
  164. package/dist/routing/defaults.js +0 -1
  165. package/dist/routing/entity-extractor.js +2 -3
  166. package/dist/routing/fund-symbols.js +0 -1
  167. package/dist/routing/horizon.js +0 -1
  168. package/dist/routing/index.js +0 -1
  169. package/dist/routing/legacy-rule-router.js +0 -1
  170. package/dist/routing/planning.js +0 -1
  171. package/dist/routing/route-manifest.js +1 -1
  172. package/dist/routing/router-llm-client.d.ts +2 -2
  173. package/dist/routing/router-llm-client.js +0 -1
  174. package/dist/routing/router-prompt.js +0 -1
  175. package/dist/routing/router-types.js +0 -1
  176. package/dist/routing/router.js +9 -3
  177. package/dist/routing/slot-resolver.js +0 -1
  178. package/dist/routing/symbol-disambiguator.js +0 -1
  179. package/dist/routing/turn-context.js +0 -1
  180. package/dist/routing/types.js +0 -1
  181. package/dist/runtime/answer-contracts.js +0 -1
  182. package/dist/runtime/artifact-contracts.js +0 -1
  183. package/dist/runtime/evidence.d.ts +1 -0
  184. package/dist/runtime/evidence.js +1 -2
  185. package/dist/runtime/numeric-claims.js +0 -1
  186. package/dist/runtime/planning-evidence.js +0 -1
  187. package/dist/runtime/prompt-step.js +0 -1
  188. package/dist/runtime/provider-tracker.js +0 -1
  189. package/dist/runtime/run-context.js +0 -1
  190. package/dist/runtime/session-coordinator.d.ts +2 -2
  191. package/dist/runtime/session-coordinator.js +2 -3
  192. package/dist/runtime/session-title.js +0 -1
  193. package/dist/runtime/tool-defaults-wrapper.js +0 -1
  194. package/dist/runtime/validation.js +0 -1
  195. package/dist/runtime/workflow-events.js +0 -1
  196. package/dist/runtime/workflow-runner.d.ts +1 -0
  197. package/dist/runtime/workflow-runner.js +8 -3
  198. package/dist/runtime/workflow-types.js +0 -1
  199. package/dist/sentiment/adapters/finnhub.js +0 -1
  200. package/dist/sentiment/adapters/reddit.js +0 -1
  201. package/dist/sentiment/adapters/twitter.js +0 -1
  202. package/dist/sentiment/adapters/web.js +0 -1
  203. package/dist/sentiment/index.js +4 -2
  204. package/dist/sentiment/insights.js +0 -1
  205. package/dist/sentiment/keywords.js +0 -1
  206. package/dist/sentiment/pipeline.js +0 -1
  207. package/dist/sentiment/scorer.js +0 -1
  208. package/dist/sentiment/store.js +0 -1
  209. package/dist/sentiment/trends.js +0 -1
  210. package/dist/sentiment/types.js +0 -1
  211. package/dist/system-prompt.js +0 -1
  212. package/dist/tool-kit.js +0 -1
  213. package/dist/tools/fundamentals/company-overview.d.ts +1 -1
  214. package/dist/tools/fundamentals/company-overview.js +2 -1
  215. package/dist/tools/fundamentals/comps.js +6 -4
  216. package/dist/tools/fundamentals/dcf.js +37 -9
  217. package/dist/tools/fundamentals/earnings.d.ts +1 -1
  218. package/dist/tools/fundamentals/earnings.js +2 -1
  219. package/dist/tools/fundamentals/financials.js +88 -9
  220. package/dist/tools/fundamentals/sec-filings.js +0 -1
  221. package/dist/tools/index.d.ts +121 -2
  222. package/dist/tools/index.js +3 -1
  223. package/dist/tools/interaction/ask-user.js +11 -1
  224. package/dist/tools/macro/event-probabilities.js +0 -1
  225. package/dist/tools/macro/fear-greed.d.ts +1 -1
  226. package/dist/tools/macro/fear-greed.js +0 -1
  227. package/dist/tools/macro/fred-data.d.ts +1 -1
  228. package/dist/tools/macro/fred-data.js +2 -1
  229. package/dist/tools/market/crypto-history.js +0 -1
  230. package/dist/tools/market/crypto-price.d.ts +2 -2
  231. package/dist/tools/market/crypto-price.js +0 -1
  232. package/dist/tools/market/price-comparison.d.ts +30 -0
  233. package/dist/tools/market/price-comparison.js +202 -0
  234. package/dist/tools/market/screen-stocks.js +0 -1
  235. package/dist/tools/market/search-ticker.js +1 -2
  236. package/dist/tools/market/stock-history.d.ts +18 -3
  237. package/dist/tools/market/stock-history.js +132 -18
  238. package/dist/tools/market/stock-quote.d.ts +2 -2
  239. package/dist/tools/market/stock-quote.js +0 -1
  240. package/dist/tools/options/greeks.js +0 -1
  241. package/dist/tools/options/option-chain.d.ts +2 -2
  242. package/dist/tools/options/option-chain.js +0 -1
  243. package/dist/tools/portfolio/alerts.d.ts +2 -1
  244. package/dist/tools/portfolio/alerts.js +228 -2
  245. package/dist/tools/portfolio/correlation.d.ts +1 -1
  246. package/dist/tools/portfolio/correlation.js +23 -5
  247. package/dist/tools/portfolio/daily-report.js +0 -1
  248. package/dist/tools/portfolio/holdings-overlap.js +0 -1
  249. package/dist/tools/portfolio/notifications.js +0 -1
  250. package/dist/tools/portfolio/risk-analysis.d.ts +2 -2
  251. package/dist/tools/portfolio/risk-analysis.js +0 -1
  252. package/dist/tools/portfolio/tracker.d.ts +3 -1
  253. package/dist/tools/portfolio/tracker.js +57 -10
  254. package/dist/tools/portfolio/watchlist.d.ts +3 -6
  255. package/dist/tools/portfolio/watchlist.js +101 -110
  256. package/dist/tools/sentiment/insight-format.js +0 -1
  257. package/dist/tools/sentiment/query-match.js +0 -1
  258. package/dist/tools/sentiment/reddit-sentiment.js +0 -1
  259. package/dist/tools/sentiment/sentiment-summary.js +8 -4
  260. package/dist/tools/sentiment/sentiment-trend.d.ts +5 -1
  261. package/dist/tools/sentiment/sentiment-trend.js +6 -2
  262. package/dist/tools/sentiment/twitter-sentiment.js +0 -1
  263. package/dist/tools/sentiment/untrusted-text.js +0 -1
  264. package/dist/tools/sentiment/web-search.d.ts +1 -1
  265. package/dist/tools/sentiment/web-search.js +0 -1
  266. package/dist/tools/sentiment/web-sentiment.js +0 -1
  267. package/dist/tools/technical/backtest.js +0 -1
  268. package/dist/tools/technical/indicators.js +0 -1
  269. package/dist/types/fundamentals.js +0 -1
  270. package/dist/types/index.js +0 -1
  271. package/dist/types/macro.js +0 -1
  272. package/dist/types/market.d.ts +8 -0
  273. package/dist/types/market.js +0 -1
  274. package/dist/types/options.js +0 -1
  275. package/dist/types/portfolio.js +0 -1
  276. package/dist/types/prediction-markets.js +0 -1
  277. package/dist/types/sentiment.js +0 -1
  278. package/dist/workflows/compare-assets.js +0 -1
  279. package/dist/workflows/index.js +0 -1
  280. package/dist/workflows/options-screener.js +0 -1
  281. package/dist/workflows/portfolio-builder.js +0 -1
  282. package/gui/web/dist/assets/CatalogOverlay-Cy8Fq0fn.js +1 -0
  283. package/gui/web/dist/assets/allocation-donut-DgBRIKCk.js +52 -0
  284. package/gui/web/dist/assets/index-DIlFyIOO.js +66 -0
  285. package/gui/web/dist/assets/index-DS4jESOB.css +2 -0
  286. package/gui/web/dist/assets/market-chart-DammaCjH.js +1 -0
  287. package/gui/web/dist/assets/utils-CnADgYgh.js +1 -0
  288. package/gui/web/dist/index.html +3 -2
  289. package/package.json +23 -26
  290. package/dist/analysts/contracts.js.map +0 -1
  291. package/dist/analysts/orchestrator.js.map +0 -1
  292. package/dist/cli-main.js.map +0 -1
  293. package/dist/cli.js.map +0 -1
  294. package/dist/config.js.map +0 -1
  295. package/dist/doctor/cli-command.js.map +0 -1
  296. package/dist/doctor/render.js.map +0 -1
  297. package/dist/doctor/report.js.map +0 -1
  298. package/dist/index.js.map +0 -1
  299. package/dist/infra/cache.js.map +0 -1
  300. package/dist/infra/freshness.js.map +0 -1
  301. package/dist/infra/http-client.js.map +0 -1
  302. package/dist/infra/index.js.map +0 -1
  303. package/dist/infra/market-calendar.js.map +0 -1
  304. package/dist/infra/native-dependencies.js.map +0 -1
  305. package/dist/infra/node-version.js.map +0 -1
  306. package/dist/infra/open-url.js.map +0 -1
  307. package/dist/infra/opencandle-paths.js.map +0 -1
  308. package/dist/infra/rate-limiter.js.map +0 -1
  309. package/dist/market-state/alert-conditions.js.map +0 -1
  310. package/dist/market-state/alert-runner.js.map +0 -1
  311. package/dist/market-state/daily-report.js.map +0 -1
  312. package/dist/market-state/local-automation-service.js.map +0 -1
  313. package/dist/market-state/notification-delivery.js.map +0 -1
  314. package/dist/market-state/resolve-for-mutation.js.map +0 -1
  315. package/dist/market-state/resolve.js.map +0 -1
  316. package/dist/market-state/service.js.map +0 -1
  317. package/dist/market-state/summaries.js.map +0 -1
  318. package/dist/memory/index.js.map +0 -1
  319. package/dist/memory/manager.js.map +0 -1
  320. package/dist/memory/preference-extractor.js.map +0 -1
  321. package/dist/memory/retrieval.js.map +0 -1
  322. package/dist/memory/sqlite.js.map +0 -1
  323. package/dist/memory/storage.js.map +0 -1
  324. package/dist/memory/tool-defaults.js.map +0 -1
  325. package/dist/memory/types.js.map +0 -1
  326. package/dist/monitor.js.map +0 -1
  327. package/dist/onboarding/connect.js.map +0 -1
  328. package/dist/onboarding/credential-interceptor.js.map +0 -1
  329. package/dist/onboarding/degradation-accumulator.js.map +0 -1
  330. package/dist/onboarding/prompt-user.js.map +0 -1
  331. package/dist/onboarding/provider-status.js.map +0 -1
  332. package/dist/onboarding/providers.js.map +0 -1
  333. package/dist/onboarding/state.js.map +0 -1
  334. package/dist/onboarding/tool-helpers.js.map +0 -1
  335. package/dist/onboarding/tool-tags.js.map +0 -1
  336. package/dist/onboarding/validation.js.map +0 -1
  337. package/dist/pi/opencandle-extension.js.map +0 -1
  338. package/dist/pi/session-action-dedupe.js.map +0 -1
  339. package/dist/pi/session-storage.js.map +0 -1
  340. package/dist/pi/session-writer-lock.js.map +0 -1
  341. package/dist/pi/session.js.map +0 -1
  342. package/dist/pi/setup.js.map +0 -1
  343. package/dist/pi/tool-adapter.js.map +0 -1
  344. package/dist/pi/tui-session-coordinator.js.map +0 -1
  345. package/dist/prompts/context-builder.js.map +0 -1
  346. package/dist/prompts/disclaimer.js.map +0 -1
  347. package/dist/prompts/policy-cards.js.map +0 -1
  348. package/dist/prompts/sections.js.map +0 -1
  349. package/dist/prompts/symbol-preflight.js.map +0 -1
  350. package/dist/prompts/workflow-prompts.js.map +0 -1
  351. package/dist/providers/alpha-vantage.js.map +0 -1
  352. package/dist/providers/coingecko.js.map +0 -1
  353. package/dist/providers/errors.js.map +0 -1
  354. package/dist/providers/exa-search.js.map +0 -1
  355. package/dist/providers/external-tool-command.js.map +0 -1
  356. package/dist/providers/external-tool-error.js.map +0 -1
  357. package/dist/providers/fear-greed.js.map +0 -1
  358. package/dist/providers/finnhub.js.map +0 -1
  359. package/dist/providers/fred.js.map +0 -1
  360. package/dist/providers/index.js.map +0 -1
  361. package/dist/providers/polymarket.js.map +0 -1
  362. package/dist/providers/provider-credential-error.js.map +0 -1
  363. package/dist/providers/reddit-cli.js.map +0 -1
  364. package/dist/providers/reddit.js.map +0 -1
  365. package/dist/providers/sec-edgar.js.map +0 -1
  366. package/dist/providers/tradingview.js.map +0 -1
  367. package/dist/providers/twitter-cli.js.map +0 -1
  368. package/dist/providers/twitter.js.map +0 -1
  369. package/dist/providers/web-search.js.map +0 -1
  370. package/dist/providers/with-fallback.js.map +0 -1
  371. package/dist/providers/wrap-provider.js.map +0 -1
  372. package/dist/providers/yahoo-finance.js.map +0 -1
  373. package/dist/routing/classify-intent.js.map +0 -1
  374. package/dist/routing/defaults.js.map +0 -1
  375. package/dist/routing/entity-extractor.js.map +0 -1
  376. package/dist/routing/fund-symbols.js.map +0 -1
  377. package/dist/routing/horizon.js.map +0 -1
  378. package/dist/routing/index.js.map +0 -1
  379. package/dist/routing/legacy-rule-router.js.map +0 -1
  380. package/dist/routing/planning.js.map +0 -1
  381. package/dist/routing/route-manifest.js.map +0 -1
  382. package/dist/routing/router-llm-client.js.map +0 -1
  383. package/dist/routing/router-prompt.js.map +0 -1
  384. package/dist/routing/router-types.js.map +0 -1
  385. package/dist/routing/router.js.map +0 -1
  386. package/dist/routing/slot-resolver.js.map +0 -1
  387. package/dist/routing/symbol-disambiguator.js.map +0 -1
  388. package/dist/routing/turn-context.js.map +0 -1
  389. package/dist/routing/types.js.map +0 -1
  390. package/dist/runtime/answer-contracts.js.map +0 -1
  391. package/dist/runtime/artifact-contracts.js.map +0 -1
  392. package/dist/runtime/evidence.js.map +0 -1
  393. package/dist/runtime/numeric-claims.js.map +0 -1
  394. package/dist/runtime/planning-evidence.js.map +0 -1
  395. package/dist/runtime/prompt-step.js.map +0 -1
  396. package/dist/runtime/provider-tracker.js.map +0 -1
  397. package/dist/runtime/run-context.js.map +0 -1
  398. package/dist/runtime/session-coordinator.js.map +0 -1
  399. package/dist/runtime/session-title.js.map +0 -1
  400. package/dist/runtime/tool-defaults-wrapper.js.map +0 -1
  401. package/dist/runtime/validation.js.map +0 -1
  402. package/dist/runtime/workflow-events.js.map +0 -1
  403. package/dist/runtime/workflow-runner.js.map +0 -1
  404. package/dist/runtime/workflow-types.js.map +0 -1
  405. package/dist/sentiment/adapters/finnhub.js.map +0 -1
  406. package/dist/sentiment/adapters/reddit.js.map +0 -1
  407. package/dist/sentiment/adapters/twitter.js.map +0 -1
  408. package/dist/sentiment/adapters/web.js.map +0 -1
  409. package/dist/sentiment/index.js.map +0 -1
  410. package/dist/sentiment/insights.js.map +0 -1
  411. package/dist/sentiment/keywords.js.map +0 -1
  412. package/dist/sentiment/pipeline.js.map +0 -1
  413. package/dist/sentiment/scorer.js.map +0 -1
  414. package/dist/sentiment/store.js.map +0 -1
  415. package/dist/sentiment/trends.js.map +0 -1
  416. package/dist/sentiment/types.js.map +0 -1
  417. package/dist/system-prompt.js.map +0 -1
  418. package/dist/tool-kit.js.map +0 -1
  419. package/dist/tools/fundamentals/company-overview.js.map +0 -1
  420. package/dist/tools/fundamentals/comps.js.map +0 -1
  421. package/dist/tools/fundamentals/dcf.js.map +0 -1
  422. package/dist/tools/fundamentals/earnings.js.map +0 -1
  423. package/dist/tools/fundamentals/financials.js.map +0 -1
  424. package/dist/tools/fundamentals/sec-filings.js.map +0 -1
  425. package/dist/tools/index.js.map +0 -1
  426. package/dist/tools/interaction/ask-user.js.map +0 -1
  427. package/dist/tools/macro/event-probabilities.js.map +0 -1
  428. package/dist/tools/macro/fear-greed.js.map +0 -1
  429. package/dist/tools/macro/fred-data.js.map +0 -1
  430. package/dist/tools/market/crypto-history.js.map +0 -1
  431. package/dist/tools/market/crypto-price.js.map +0 -1
  432. package/dist/tools/market/screen-stocks.js.map +0 -1
  433. package/dist/tools/market/search-ticker.js.map +0 -1
  434. package/dist/tools/market/stock-history.js.map +0 -1
  435. package/dist/tools/market/stock-quote.js.map +0 -1
  436. package/dist/tools/options/greeks.js.map +0 -1
  437. package/dist/tools/options/option-chain.js.map +0 -1
  438. package/dist/tools/portfolio/alerts.js.map +0 -1
  439. package/dist/tools/portfolio/correlation.js.map +0 -1
  440. package/dist/tools/portfolio/daily-report.js.map +0 -1
  441. package/dist/tools/portfolio/holdings-overlap.js.map +0 -1
  442. package/dist/tools/portfolio/notifications.js.map +0 -1
  443. package/dist/tools/portfolio/risk-analysis.js.map +0 -1
  444. package/dist/tools/portfolio/tracker.js.map +0 -1
  445. package/dist/tools/portfolio/watchlist.js.map +0 -1
  446. package/dist/tools/sentiment/insight-format.js.map +0 -1
  447. package/dist/tools/sentiment/query-match.js.map +0 -1
  448. package/dist/tools/sentiment/reddit-sentiment.js.map +0 -1
  449. package/dist/tools/sentiment/sentiment-summary.js.map +0 -1
  450. package/dist/tools/sentiment/sentiment-trend.js.map +0 -1
  451. package/dist/tools/sentiment/twitter-sentiment.js.map +0 -1
  452. package/dist/tools/sentiment/untrusted-text.js.map +0 -1
  453. package/dist/tools/sentiment/web-search.js.map +0 -1
  454. package/dist/tools/sentiment/web-sentiment.js.map +0 -1
  455. package/dist/tools/technical/backtest.js.map +0 -1
  456. package/dist/tools/technical/indicators.js.map +0 -1
  457. package/dist/types/fundamentals.js.map +0 -1
  458. package/dist/types/index.js.map +0 -1
  459. package/dist/types/macro.js.map +0 -1
  460. package/dist/types/market.js.map +0 -1
  461. package/dist/types/options.js.map +0 -1
  462. package/dist/types/portfolio.js.map +0 -1
  463. package/dist/types/prediction-markets.js.map +0 -1
  464. package/dist/types/sentiment.js.map +0 -1
  465. package/dist/workflows/compare-assets.js.map +0 -1
  466. package/dist/workflows/index.js.map +0 -1
  467. package/dist/workflows/options-screener.js.map +0 -1
  468. package/dist/workflows/portfolio-builder.js.map +0 -1
  469. package/gui/server/ask-user-bridge.ts +0 -89
  470. package/gui/server/automation-heartbeat.ts +0 -97
  471. package/gui/server/background-quotes.ts +0 -127
  472. package/gui/server/chat-event-adapter.ts +0 -294
  473. package/gui/server/gui-session-manager.ts +0 -5
  474. package/gui/server/http-routes.ts +0 -1201
  475. package/gui/server/invoke-tool.ts +0 -490
  476. package/gui/server/live-chat-event-adapter.ts +0 -243
  477. package/gui/server/local-session-coordinator.ts +0 -97
  478. package/gui/server/market-state-api.ts +0 -331
  479. package/gui/server/model-setup.ts +0 -254
  480. package/gui/server/package.json +0 -5
  481. package/gui/server/private-api-access.ts +0 -62
  482. package/gui/server/projector.ts +0 -392
  483. package/gui/server/prompt-observation.ts +0 -58
  484. package/gui/server/quote-snapshot-store.ts +0 -50
  485. package/gui/server/server.ts +0 -289
  486. package/gui/server/session-actions.ts +0 -323
  487. package/gui/server/session-entry-wait.ts +0 -179
  488. package/gui/server/shutdown.ts +0 -47
  489. package/gui/server/tool-invoke-ack.ts +0 -49
  490. package/gui/server/tool-metadata.ts +0 -167
  491. package/gui/server/websocket.ts +0 -138
  492. package/gui/server/writer-lock.ts +0 -1
  493. package/gui/server/ws-hub.ts +0 -403
  494. package/gui/shared/chat-events.ts +0 -165
  495. package/gui/shared/event-reducer.ts +0 -220
  496. package/gui/web/dist/assets/CatalogOverlay-DZ1niyQm.js +0 -1
  497. package/gui/web/dist/assets/index-D4F9AJnn.css +0 -2
  498. package/gui/web/dist/assets/index-DtqMMBTr.js +0 -65
  499. package/src/analysts/contracts.ts +0 -176
  500. package/src/analysts/orchestrator.ts +0 -244
  501. package/src/cli-main.ts +0 -510
  502. package/src/cli.ts +0 -17
  503. package/src/config.ts +0 -272
  504. package/src/doctor/cli-command.ts +0 -83
  505. package/src/doctor/render.ts +0 -37
  506. package/src/doctor/report.ts +0 -638
  507. package/src/index.ts +0 -5
  508. package/src/infra/cache.ts +0 -127
  509. package/src/infra/freshness.ts +0 -165
  510. package/src/infra/http-client.ts +0 -134
  511. package/src/infra/index.ts +0 -14
  512. package/src/infra/market-calendar.ts +0 -193
  513. package/src/infra/native-dependencies.ts +0 -84
  514. package/src/infra/node-version.ts +0 -23
  515. package/src/infra/open-url.ts +0 -28
  516. package/src/infra/opencandle-paths.ts +0 -53
  517. package/src/infra/rate-limiter.ts +0 -77
  518. package/src/market-state/alert-conditions.ts +0 -82
  519. package/src/market-state/alert-runner.ts +0 -863
  520. package/src/market-state/daily-report.ts +0 -237
  521. package/src/market-state/local-automation-service.ts +0 -162
  522. package/src/market-state/notification-delivery.ts +0 -158
  523. package/src/market-state/resolve-for-mutation.ts +0 -24
  524. package/src/market-state/resolve.ts +0 -112
  525. package/src/market-state/service.ts +0 -2208
  526. package/src/market-state/summaries.ts +0 -75
  527. package/src/memory/index.ts +0 -10
  528. package/src/memory/manager.ts +0 -190
  529. package/src/memory/preference-extractor.ts +0 -106
  530. package/src/memory/retrieval.ts +0 -71
  531. package/src/memory/sqlite.ts +0 -577
  532. package/src/memory/storage.ts +0 -195
  533. package/src/memory/tool-defaults.ts +0 -108
  534. package/src/memory/types.ts +0 -71
  535. package/src/monitor.ts +0 -123
  536. package/src/onboarding/connect.ts +0 -177
  537. package/src/onboarding/credential-interceptor.ts +0 -122
  538. package/src/onboarding/degradation-accumulator.ts +0 -77
  539. package/src/onboarding/prompt-user.ts +0 -85
  540. package/src/onboarding/provider-status.ts +0 -382
  541. package/src/onboarding/providers.ts +0 -442
  542. package/src/onboarding/state.ts +0 -216
  543. package/src/onboarding/tool-helpers.ts +0 -104
  544. package/src/onboarding/tool-tags.ts +0 -244
  545. package/src/onboarding/validation.ts +0 -152
  546. package/src/pi/opencandle-extension.ts +0 -1294
  547. package/src/pi/session-action-dedupe.ts +0 -155
  548. package/src/pi/session-storage.ts +0 -5
  549. package/src/pi/session-writer-lock.ts +0 -426
  550. package/src/pi/session.ts +0 -84
  551. package/src/pi/setup.ts +0 -399
  552. package/src/pi/tool-adapter.ts +0 -49
  553. package/src/pi/tui-session-coordinator.ts +0 -351
  554. package/src/prompts/context-builder.ts +0 -326
  555. package/src/prompts/disclaimer.ts +0 -9
  556. package/src/prompts/policy-cards.ts +0 -228
  557. package/src/prompts/sections.ts +0 -46
  558. package/src/prompts/symbol-preflight.ts +0 -80
  559. package/src/prompts/workflow-prompts.ts +0 -504
  560. package/src/providers/alpha-vantage.ts +0 -340
  561. package/src/providers/coingecko.ts +0 -95
  562. package/src/providers/errors.ts +0 -9
  563. package/src/providers/exa-search.ts +0 -375
  564. package/src/providers/external-tool-command.ts +0 -164
  565. package/src/providers/external-tool-error.ts +0 -20
  566. package/src/providers/fear-greed.ts +0 -45
  567. package/src/providers/finnhub.ts +0 -125
  568. package/src/providers/fred.ts +0 -83
  569. package/src/providers/index.ts +0 -17
  570. package/src/providers/polymarket.ts +0 -214
  571. package/src/providers/provider-credential-error.ts +0 -23
  572. package/src/providers/reddit-cli.ts +0 -286
  573. package/src/providers/reddit.ts +0 -106
  574. package/src/providers/sec-edgar.ts +0 -326
  575. package/src/providers/tradingview.ts +0 -399
  576. package/src/providers/twitter-cli.ts +0 -202
  577. package/src/providers/twitter.ts +0 -102
  578. package/src/providers/web-search.ts +0 -303
  579. package/src/providers/with-fallback.ts +0 -42
  580. package/src/providers/wrap-provider.ts +0 -105
  581. package/src/providers/yahoo-finance.ts +0 -984
  582. package/src/routing/classify-intent.ts +0 -380
  583. package/src/routing/defaults.ts +0 -29
  584. package/src/routing/entity-extractor.ts +0 -557
  585. package/src/routing/fund-symbols.ts +0 -58
  586. package/src/routing/horizon.ts +0 -7
  587. package/src/routing/index.ts +0 -70
  588. package/src/routing/legacy-rule-router.ts +0 -13
  589. package/src/routing/planning.ts +0 -829
  590. package/src/routing/route-manifest.ts +0 -308
  591. package/src/routing/router-llm-client.ts +0 -64
  592. package/src/routing/router-prompt.ts +0 -159
  593. package/src/routing/router-types.ts +0 -84
  594. package/src/routing/router.ts +0 -1332
  595. package/src/routing/slot-resolver.ts +0 -213
  596. package/src/routing/symbol-disambiguator.ts +0 -72
  597. package/src/routing/turn-context.ts +0 -108
  598. package/src/routing/types.ts +0 -77
  599. package/src/runtime/answer-contracts.ts +0 -693
  600. package/src/runtime/artifact-contracts.ts +0 -77
  601. package/src/runtime/evidence.ts +0 -78
  602. package/src/runtime/numeric-claims.ts +0 -108
  603. package/src/runtime/planning-evidence.ts +0 -597
  604. package/src/runtime/prompt-step.ts +0 -185
  605. package/src/runtime/provider-tracker.ts +0 -40
  606. package/src/runtime/run-context.ts +0 -32
  607. package/src/runtime/session-coordinator.ts +0 -1037
  608. package/src/runtime/session-title.ts +0 -60
  609. package/src/runtime/tool-defaults-wrapper.ts +0 -43
  610. package/src/runtime/validation.ts +0 -211
  611. package/src/runtime/workflow-events.ts +0 -77
  612. package/src/runtime/workflow-runner.ts +0 -182
  613. package/src/runtime/workflow-types.ts +0 -105
  614. package/src/sentiment/adapters/finnhub.ts +0 -49
  615. package/src/sentiment/adapters/reddit.ts +0 -65
  616. package/src/sentiment/adapters/twitter.ts +0 -36
  617. package/src/sentiment/adapters/web.ts +0 -44
  618. package/src/sentiment/index.ts +0 -49
  619. package/src/sentiment/insights.ts +0 -269
  620. package/src/sentiment/keywords.ts +0 -31
  621. package/src/sentiment/pipeline.ts +0 -91
  622. package/src/sentiment/scorer.ts +0 -89
  623. package/src/sentiment/store.ts +0 -260
  624. package/src/sentiment/trends.ts +0 -96
  625. package/src/sentiment/types.ts +0 -112
  626. package/src/system-prompt.ts +0 -115
  627. package/src/tool-kit.ts +0 -69
  628. package/src/tools/AGENTS.md +0 -36
  629. package/src/tools/fundamentals/company-overview.ts +0 -64
  630. package/src/tools/fundamentals/comps.ts +0 -180
  631. package/src/tools/fundamentals/dcf.ts +0 -447
  632. package/src/tools/fundamentals/earnings.ts +0 -57
  633. package/src/tools/fundamentals/financials.ts +0 -63
  634. package/src/tools/fundamentals/sec-filings.ts +0 -105
  635. package/src/tools/index.ts +0 -104
  636. package/src/tools/interaction/ask-user.ts +0 -93
  637. package/src/tools/macro/event-probabilities.ts +0 -141
  638. package/src/tools/macro/fear-greed.ts +0 -41
  639. package/src/tools/macro/fred-data.ts +0 -92
  640. package/src/tools/market/crypto-history.ts +0 -72
  641. package/src/tools/market/crypto-price.ts +0 -65
  642. package/src/tools/market/screen-stocks.ts +0 -290
  643. package/src/tools/market/search-ticker.ts +0 -254
  644. package/src/tools/market/stock-history.ts +0 -104
  645. package/src/tools/market/stock-quote.ts +0 -73
  646. package/src/tools/options/greeks.ts +0 -81
  647. package/src/tools/options/option-chain.ts +0 -134
  648. package/src/tools/portfolio/alerts.ts +0 -457
  649. package/src/tools/portfolio/correlation.ts +0 -189
  650. package/src/tools/portfolio/daily-report.ts +0 -107
  651. package/src/tools/portfolio/holdings-overlap.ts +0 -139
  652. package/src/tools/portfolio/notifications.ts +0 -45
  653. package/src/tools/portfolio/risk-analysis.ts +0 -173
  654. package/src/tools/portfolio/tracker.ts +0 -308
  655. package/src/tools/portfolio/watchlist.ts +0 -288
  656. package/src/tools/sentiment/insight-format.ts +0 -50
  657. package/src/tools/sentiment/query-match.ts +0 -117
  658. package/src/tools/sentiment/reddit-sentiment.ts +0 -403
  659. package/src/tools/sentiment/sentiment-summary.ts +0 -383
  660. package/src/tools/sentiment/sentiment-trend.ts +0 -75
  661. package/src/tools/sentiment/twitter-sentiment.ts +0 -287
  662. package/src/tools/sentiment/untrusted-text.ts +0 -21
  663. package/src/tools/sentiment/web-search.ts +0 -186
  664. package/src/tools/sentiment/web-sentiment.ts +0 -96
  665. package/src/tools/technical/backtest.ts +0 -336
  666. package/src/tools/technical/indicators.ts +0 -281
  667. package/src/types/fundamentals.ts +0 -47
  668. package/src/types/index.ts +0 -26
  669. package/src/types/macro.ts +0 -27
  670. package/src/types/market.ts +0 -46
  671. package/src/types/options.ts +0 -53
  672. package/src/types/portfolio.ts +0 -83
  673. package/src/types/prediction-markets.ts +0 -13
  674. package/src/types/sentiment.ts +0 -129
  675. package/src/workflows/compare-assets.ts +0 -89
  676. package/src/workflows/index.ts +0 -3
  677. package/src/workflows/options-screener.ts +0 -125
  678. package/src/workflows/portfolio-builder.ts +0 -63
@@ -0,0 +1 @@
1
+ import{a as e,l as t,o as n,t as r}from"./utils-CnADgYgh.js";import{F as i,L as a,M as o,N as s,P as c,c as l,d as u,i as d,j as f,l as p,n as m,p as h,r as g,s as ee,t as _}from"./index-DIlFyIOO.js";function v(e){var t=e.width,n=e.height;if(t<0)throw Error(`Negative width is not allowed for Size`);if(n<0)throw Error(`Negative height is not allowed for Size`);return{width:t,height:n}}function y(e,t){return e.width===t.width&&e.height===t.height}var b=function(){function e(e){var t=this;this._resolutionListener=function(){return t._onResolutionChanged()},this._resolutionMediaQueryList=null,this._observers=[],this._window=e,this._installResolutionListener()}return e.prototype.dispose=function(){this._uninstallResolutionListener(),this._window=null},Object.defineProperty(e.prototype,"value",{get:function(){return this._window.devicePixelRatio},enumerable:!1,configurable:!0}),e.prototype.subscribe=function(e){var t=this,n={next:e};return this._observers.push(n),{unsubscribe:function(){t._observers=t._observers.filter(function(e){return e!==n})}}},e.prototype._installResolutionListener=function(){if(this._resolutionMediaQueryList!==null)throw Error(`Resolution listener is already installed`);var e=this._window.devicePixelRatio;this._resolutionMediaQueryList=this._window.matchMedia(`all and (resolution: ${e}dppx)`),this._resolutionMediaQueryList.addListener(this._resolutionListener)},e.prototype._uninstallResolutionListener=function(){this._resolutionMediaQueryList!==null&&(this._resolutionMediaQueryList.removeListener(this._resolutionListener),this._resolutionMediaQueryList=null)},e.prototype._reinstallResolutionListener=function(){this._uninstallResolutionListener(),this._installResolutionListener()},e.prototype._onResolutionChanged=function(){var e=this;this._observers.forEach(function(t){return t.next(e._window.devicePixelRatio)}),this._reinstallResolutionListener()},e}();function x(e){return new b(e)}var S=function(){function e(e,t,n){this._canvasElement=null,this._bitmapSizeChangedListeners=[],this._suggestedBitmapSize=null,this._suggestedBitmapSizeChangedListeners=[],this._devicePixelRatioObservable=null,this._canvasElementResizeObserver=null,this._canvasElement=e,this._canvasElementClientSize=v({width:this._canvasElement.clientWidth,height:this._canvasElement.clientHeight}),this._transformBitmapSize=t??(function(e){return e}),this._allowResizeObserver=n?.allowResizeObserver??!0,this._chooseAndInitObserver()}return e.prototype.dispose=function(){var e,t;if(this._canvasElement===null)throw Error(`Object is disposed`);(e=this._canvasElementResizeObserver)==null||e.disconnect(),this._canvasElementResizeObserver=null,(t=this._devicePixelRatioObservable)==null||t.dispose(),this._devicePixelRatioObservable=null,this._suggestedBitmapSizeChangedListeners.length=0,this._bitmapSizeChangedListeners.length=0,this._canvasElement=null},Object.defineProperty(e.prototype,"canvasElement",{get:function(){if(this._canvasElement===null)throw Error(`Object is disposed`);return this._canvasElement},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"canvasElementClientSize",{get:function(){return this._canvasElementClientSize},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bitmapSize",{get:function(){return v({width:this.canvasElement.width,height:this.canvasElement.height})},enumerable:!1,configurable:!0}),e.prototype.resizeCanvasElement=function(e){this._canvasElementClientSize=v(e),this.canvasElement.style.width=`${this._canvasElementClientSize.width}px`,this.canvasElement.style.height=`${this._canvasElementClientSize.height}px`,this._invalidateBitmapSize()},e.prototype.subscribeBitmapSizeChanged=function(e){this._bitmapSizeChangedListeners.push(e)},e.prototype.unsubscribeBitmapSizeChanged=function(e){this._bitmapSizeChangedListeners=this._bitmapSizeChangedListeners.filter(function(t){return t!==e})},Object.defineProperty(e.prototype,"suggestedBitmapSize",{get:function(){return this._suggestedBitmapSize},enumerable:!1,configurable:!0}),e.prototype.subscribeSuggestedBitmapSizeChanged=function(e){this._suggestedBitmapSizeChangedListeners.push(e)},e.prototype.unsubscribeSuggestedBitmapSizeChanged=function(e){this._suggestedBitmapSizeChangedListeners=this._suggestedBitmapSizeChangedListeners.filter(function(t){return t!==e})},e.prototype.applySuggestedBitmapSize=function(){if(this._suggestedBitmapSize!==null){var e=this._suggestedBitmapSize;this._suggestedBitmapSize=null,this._resizeBitmap(e),this._emitSuggestedBitmapSizeChanged(e,this._suggestedBitmapSize)}},e.prototype._resizeBitmap=function(e){var t=this.bitmapSize;y(t,e)||(this.canvasElement.width=e.width,this.canvasElement.height=e.height,this._emitBitmapSizeChanged(t,e))},e.prototype._emitBitmapSizeChanged=function(e,t){var n=this;this._bitmapSizeChangedListeners.forEach(function(r){return r.call(n,e,t)})},e.prototype._suggestNewBitmapSize=function(e){var t=this._suggestedBitmapSize,n=v(this._transformBitmapSize(e,this._canvasElementClientSize)),r=y(this.bitmapSize,n)?null:n;t===null&&r===null||t!==null&&r!==null&&y(t,r)||(this._suggestedBitmapSize=r,this._emitSuggestedBitmapSizeChanged(t,r))},e.prototype._emitSuggestedBitmapSizeChanged=function(e,t){var n=this;this._suggestedBitmapSizeChangedListeners.forEach(function(r){return r.call(n,e,t)})},e.prototype._chooseAndInitObserver=function(){var e=this;if(!this._allowResizeObserver){this._initDevicePixelRatioObservable();return}ne().then(function(t){return t?e._initResizeObserver():e._initDevicePixelRatioObservable()})},e.prototype._initDevicePixelRatioObservable=function(){var e=this;if(this._canvasElement!==null){var t=C(this._canvasElement);if(t===null)throw Error(`No window is associated with the canvas`);this._devicePixelRatioObservable=x(t),this._devicePixelRatioObservable.subscribe(function(){return e._invalidateBitmapSize()}),this._invalidateBitmapSize()}},e.prototype._invalidateBitmapSize=function(){if(this._canvasElement!==null){var e=C(this._canvasElement);if(e!==null){var t=this._devicePixelRatioObservable?.value??e.devicePixelRatio,n=this._canvasElement.getClientRects(),r=n[0]===void 0?v({width:this._canvasElementClientSize.width*t,height:this._canvasElementClientSize.height*t}):re(n[0],t);this._suggestNewBitmapSize(r)}}},e.prototype._initResizeObserver=function(){var e=this;this._canvasElement!==null&&(this._canvasElementResizeObserver=new ResizeObserver(function(t){var n=t.find(function(t){return t.target===e._canvasElement});if(!(!n||!n.devicePixelContentBoxSize||!n.devicePixelContentBoxSize[0])){var r=n.devicePixelContentBoxSize[0],i=v({width:r.inlineSize,height:r.blockSize});e._suggestNewBitmapSize(i)}}),this._canvasElementResizeObserver.observe(this._canvasElement,{box:`device-pixel-content-box`}))},e}();function te(e,t){if(t.type===`device-pixel-content-box`)return new S(e,t.transform,t.options);throw Error(`Unsupported binding target`)}function C(e){return e.ownerDocument.defaultView}function ne(){return new Promise(function(e){var t=new ResizeObserver(function(n){e(n.every(function(e){return`devicePixelContentBoxSize`in e})),t.disconnect()});t.observe(document.body,{box:`device-pixel-content-box`})}).catch(function(){return!1})}function re(e,t){return v({width:Math.round(e.left*t+e.width*t)-Math.round(e.left*t),height:Math.round(e.top*t+e.height*t)-Math.round(e.top*t)})}var ie=function(){function e(e,t,n){if(t.width===0||t.height===0)throw TypeError(`Rendering target could only be created on a media with positive width and height`);if(this._mediaSize=t,n.width===0||n.height===0)throw TypeError(`Rendering target could only be created using a bitmap with positive integer width and height`);this._bitmapSize=n,this._context=e}return e.prototype.useMediaCoordinateSpace=function(e){try{return this._context.save(),this._context.setTransform(1,0,0,1,0,0),this._context.scale(this._horizontalPixelRatio,this._verticalPixelRatio),e({context:this._context,mediaSize:this._mediaSize})}finally{this._context.restore()}},e.prototype.useBitmapCoordinateSpace=function(e){try{return this._context.save(),this._context.setTransform(1,0,0,1,0,0),e({context:this._context,mediaSize:this._mediaSize,bitmapSize:this._bitmapSize,horizontalPixelRatio:this._horizontalPixelRatio,verticalPixelRatio:this._verticalPixelRatio})}finally{this._context.restore()}},Object.defineProperty(e.prototype,"_horizontalPixelRatio",{get:function(){return this._bitmapSize.width/this._mediaSize.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_verticalPixelRatio",{get:function(){return this._bitmapSize.height/this._mediaSize.height},enumerable:!1,configurable:!0}),e}();function w(e,t){var n=e.canvasElementClientSize;if(n.width===0||n.height===0)return null;var r=e.bitmapSize;if(r.width===0||r.height===0)return null;var i=e.canvasElement.getContext(`2d`,t);return i===null?null:new ie(i,n,r)}var T={title:``,visible:!0,hitTestTolerance:3,lastValueVisible:!0,priceLineVisible:!0,priceLineSource:0,priceLineWidth:1,priceLineColor:``,priceLineStyle:2,baseLineVisible:!0,baseLineWidth:1,baseLineColor:`#B2B5BE`,baseLineStyle:0,priceFormat:{type:`price`,precision:2,minMove:.01}},ae,E;function D(e,t){let n=function(e,t){switch(e){case 0:default:return[];case 1:return[t,t];case 2:return[2*t,2*t];case 3:return[6*t,6*t];case 4:return[t,4*t]}}(t,e.lineWidth);return e.setLineDash(n),n}function oe(e,t,n,r){e.beginPath();let i=e.lineWidth%2?.5:0;e.moveTo(n,t+i),e.lineTo(r,t+i),e.stroke()}function O(e,t){if(!e)throw Error(`Assertion failed`+(t?`: `+t:``))}function k(e){if(e===void 0)throw Error(`Value is undefined`);return e}function A(e){if(e===null)throw Error(`Value is null`);return e}function j(e){return A(k(e))}(function(e){e[e.Simple=0]=`Simple`,e[e.WithSteps=1]=`WithSteps`,e[e.Curved=2]=`Curved`})(ae||={}),function(e){e[e.Solid=0]=`Solid`,e[e.Dotted=1]=`Dotted`,e[e.Dashed=2]=`Dashed`,e[e.LargeDashed=3]=`LargeDashed`,e[e.SparseDotted=4]=`SparseDotted`}(E||={});var M=class{constructor(){this.t=[]}i(e,t,n){let r={h:e,l:t,o:!0===n};this.t.push(r)}_(e){let t=this.t.findIndex((t=>e===t.h));t>-1&&this.t.splice(t,1)}u(e){this.t=this.t.filter((t=>t.l!==e))}p(e,t,n){let r=[...this.t];this.t=this.t.filter((e=>!e.o)),r.forEach((r=>r.h(e,t,n)))}v(){return this.t.length>0}m(){this.t=[]}};function N(e,...t){for(let n of t)for(let t in n)n[t]!==void 0&&Object.prototype.hasOwnProperty.call(n,t)&&![`__proto__`,`constructor`,`prototype`].includes(t)&&(typeof n[t]!=`object`||e[t]===void 0||Array.isArray(n[t])?e[t]=n[t]:N(e[t],n[t]));return e}function P(e){return typeof e==`number`&&isFinite(e)}function se(e){return typeof e==`number`&&e%1==0}function ce(e){return typeof e==`string`}function le(e){return typeof e==`boolean`}function F(e){let t=e;if(!t||typeof t!=`object`)return t;let n,r,i;for(r in n=Array.isArray(t)?[]:{},t)t.hasOwnProperty(r)&&(i=t[r],n[r]=i&&typeof i==`object`?F(i):i);return n}function ue(e){return e!==null}function de(e){return e===null?void 0:e}var fe=`-apple-system, BlinkMacSystemFont, 'Trebuchet MS', Roboto, Ubuntu, sans-serif`;function pe(e,t,n){return t===void 0&&(t=fe),`${n=n===void 0?``:`${n} `}${e}px ${t}`}var me=class{constructor(e){this.M={S:1,C:5,k:NaN,P:``,T:``,R:``,D:``,I:0,V:0,B:0,A:0,L:0},this.O=e}N(){let e=this.M,t=this.F(),n=this.W();return e.k===t&&e.T===n||(e.k=t,e.T=n,e.P=pe(t,n),e.A=2.5/12*t,e.I=e.A,e.V=t/12*e.C,e.B=t/12*e.C,e.L=0),e.R=this.H(),e.D=this.U(),this.M}H(){return this.O.N().layout.textColor}U(){return this.O.$()}F(){return this.O.N().layout.fontSize}W(){return this.O.N().layout.fontFamily}};function he(e){return e<0?0:e>255?255:Math.round(e)||0}function ge(e){return .199*e[0]+.687*e[1]+.114*e[2]}var _e=class{constructor(e,t){this.j=new Map,this.q=e,t&&(this.j=t)}Y(e,t){if(e===`transparent`)return e;let n=this.K(e),r=n[3];return`rgba(${n[0]}, ${n[1]}, ${n[2]}, ${t*r})`}Z(e){let t=this.K(e);return{G:`rgb(${t[0]}, ${t[1]}, ${t[2]})`,X:ge(t)>160?`black`:`white`}}J(e){return ge(this.K(e))}tt(e,t,n){let[r,i,a,o]=this.K(e),[s,c,l,u]=this.K(t),d=[he(r+n*(s-r)),he(i+n*(c-i)),he(a+n*(l-a)),(f=o+n*(u-o),f<=0||f>1?Math.min(Math.max(f,0),1):Math.round(1e4*f)/1e4)];var f;return`rgba(${d[0]}, ${d[1]}, ${d[2]}, ${d[3]})`}K(e){let t=this.j.get(e);if(t)return t;let n=function(e){let t=document.createElement(`div`);t.style.display=`none`,document.body.appendChild(t),t.style.color=e;let n=window.getComputedStyle(t).color;return document.body.removeChild(t),n}(e).match(/^rgba?\s*\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d+))?\)$/);if(!n){if(this.q.length)for(let t of this.q){let n=t(e);if(n)return this.j.set(e,n),n}throw Error(`Failed to parse color: ${e}`)}let r=[parseInt(n[1],10),parseInt(n[2],10),parseInt(n[3],10),n[4]?parseFloat(n[4]):1];return this.j.set(e,r),r}},ve=class{constructor(){this.it=[]}nt(e){this.it=e}st(e,t,n){this.it.forEach((r=>{r.st(e,t,n)}))}},I=class{st(e,t,n){e.useBitmapCoordinateSpace((e=>this.et(e,t,n)))}},ye=class extends I{constructor(){super(...arguments),this.rt=null}ht(e){this.rt=e}et({context:e,horizontalPixelRatio:t,verticalPixelRatio:n}){if(this.rt===null||this.rt.lt===null)return;let r=this.rt.lt,i=this.rt,a=Math.max(1,Math.floor(t))%2/2,o=o=>{e.beginPath();for(let s=r.to-1;s>=r.from;--s){let r=i.ot[s],c=Math.round(r._t*t)+a,l=r.ut*n,u=o*n+a;e.moveTo(c,l),e.arc(c,l,u,0,2*Math.PI)}e.fill()};i.ct>0&&(e.fillStyle=i.dt,o(i.ft+i.ct)),e.fillStyle=i.vt,o(i.ft)}};function be(){return{ot:[{_t:0,ut:0,wt:0,Mt:0}],vt:``,dt:``,ft:0,ct:0,lt:null}}var xe={from:0,to:1},Se=class{constructor(e,t,n){this.gt=new ve,this.bt=[],this.St=[],this.xt=!0,this.O=e,this.Ct=t,this.yt=n,this.gt.nt(this.bt)}kt(e){this.Pt(),this.xt=!0}Tt(){return this.xt&&=(this.Rt(),!1),this.gt}Pt(){let e=this.yt.Dt();e.length!==this.bt.length&&(this.St=e.map(be),this.bt=this.St.map((e=>{let t=new ye;return t.ht(e),t})),this.gt.nt(this.bt))}Rt(){let e=this.Ct.N().mode===2||!this.Ct.It(),t=this.yt.Vt(),n=this.Ct.Bt(),r=this.O.Et();this.Pt(),t.forEach(((t,i)=>{let a=this.St[i],o=t.At(n),s=t.Lt();!e&&o!==null&&t.It()&&s!==null?(a.vt=o.zt,a.ft=o.ft,a.ct=o.Ot,a.ot[0].Mt=o.Mt,a.ot[0].ut=t.Ft().Nt(o.Mt,s.Wt),a.dt=o.Ht??this.O.Ut(a.ot[0].ut/t.Ft().$t()),a.ot[0].wt=n,a.ot[0]._t=r.jt(n),a.lt=xe):a.lt=null}))}},Ce=class extends I{constructor(e){super(),this.qt=e}et({context:e,bitmapSize:t,horizontalPixelRatio:n,verticalPixelRatio:r}){if(this.qt===null)return;let i=this.qt.Yt.It,a=this.qt.Kt.It;if(!i&&!a)return;let o=Math.round(this.qt._t*n),s=Math.round(this.qt.ut*r);e.lineCap=`butt`,i&&o>=0&&(e.lineWidth=Math.floor(this.qt.Yt.ct*n),e.strokeStyle=this.qt.Yt.R,e.fillStyle=this.qt.Yt.R,D(e,this.qt.Yt.Zt),function(e,t,n,r){e.beginPath();let i=e.lineWidth%2?.5:0;e.moveTo(t+i,n),e.lineTo(t+i,r),e.stroke()}(e,o,0,t.height)),a&&s>=0&&(e.lineWidth=Math.floor(this.qt.Kt.ct*r),e.strokeStyle=this.qt.Kt.R,e.fillStyle=this.qt.Kt.R,D(e,this.qt.Kt.Zt),oe(e,s,0,t.width))}},we=class{constructor(e,t){this.xt=!0,this.Gt={Yt:{ct:1,Zt:0,R:``,It:!1},Kt:{ct:1,Zt:0,R:``,It:!1},_t:0,ut:0},this.Xt=new Ce(this.Gt),this.Jt=e,this.yt=t}kt(){this.xt=!0}Tt(e){return this.xt&&=(this.Rt(),!1),this.Xt}Rt(){let e=this.Jt.It(),t=this.yt.Qt().N().crosshair,n=this.Gt;if(t.mode===2)return n.Kt.It=!1,void(n.Yt.It=!1);n.Kt.It=e&&this.Jt.ti(this.yt),n.Yt.It=e&&this.Jt.ii(),n.Kt.ct=t.horzLine.width,n.Kt.Zt=t.horzLine.style,n.Kt.R=t.horzLine.color,n.Yt.ct=t.vertLine.width,n.Yt.Zt=t.vertLine.style,n.Yt.R=t.vertLine.color,n._t=this.Jt.ni(),n.ut=this.Jt.si()}};function Te(e,t,n,r,i,a){e.fillRect(t+a,n,r-2*a,a),e.fillRect(t+a,n+i-a,r-2*a,a),e.fillRect(t,n,a,i),e.fillRect(t+r-a,n,a,i)}function Ee(e,t,n,r,i,a){e.save(),e.globalCompositeOperation=`copy`,e.fillStyle=a,e.fillRect(t,n,r,i),e.restore()}function De(e,t,n,r,i,a){e.beginPath(),e.roundRect?e.roundRect(t,n,r,i,a):(e.lineTo(t+r-a[1],n),a[1]!==0&&e.arcTo(t+r,n,t+r,n+a[1],a[1]),e.lineTo(t+r,n+i-a[2]),a[2]!==0&&e.arcTo(t+r,n+i,t+r-a[2],n+i,a[2]),e.lineTo(t+a[3],n+i),a[3]!==0&&e.arcTo(t,n+i,t,n+i-a[3],a[3]),e.lineTo(t,n+a[0]),a[0]!==0&&e.arcTo(t,n,t+a[0],n,a[0]))}function Oe(e,t,n,r,i,a,o=0,s=[0,0,0,0],c=``){if(e.save(),!o||!c||c===a)return De(e,t,n,r,i,s),e.fillStyle=a,e.fill(),void e.restore();let l=o/2;var u;De(e,t+l,n+l,r-o,i-o,(u=-l,s.map((e=>e===0?e:e+u)))),a!==`transparent`&&(e.fillStyle=a,e.fill()),c!==`transparent`&&(e.lineWidth=o,e.strokeStyle=c,e.closePath(),e.stroke()),e.restore()}function ke(e,t,n,r,i,a,o){e.save(),e.globalCompositeOperation=`copy`;let s=e.createLinearGradient(0,0,0,i);s.addColorStop(0,a),s.addColorStop(1,o),e.fillStyle=s,e.fillRect(t,n,r,i),e.restore()}var Ae=class{constructor(e,t){this.ht(e,t)}ht(e,t){this.qt=e,this.ei=t}$t(e,t){return this.qt.It?e.k+e.A+e.I:0}st(e,t,n,r){if(!this.qt.It||this.qt.ri.length===0)return;let i=this.qt.R,a=this.ei.G,o=e.useBitmapCoordinateSpace((e=>{let o=e.context;o.font=t.P;let s=this.hi(e,t,n,r),c=s.ai;return s.li?Oe(o,c.oi,c._i,c.ui,c.ci,a,c.di,[c.ft,0,0,c.ft],a):Oe(o,c.fi,c._i,c.ui,c.ci,a,c.di,[0,c.ft,c.ft,0],a),this.qt.pi&&(o.fillStyle=i,o.fillRect(c.fi,c.mi,c.wi-c.fi,c.Mi)),this.qt.gi&&(o.fillStyle=t.D,o.fillRect(s.li?c.bi-c.di:0,c._i,c.di,c.Si-c._i)),s}));e.useMediaCoordinateSpace((({context:e})=>{let n=o.xi;e.font=t.P,e.textAlign=o.li?`right`:`left`,e.textBaseline=`middle`,e.fillStyle=i,e.fillText(this.qt.ri,n.Ci,(n._i+n.Si)/2+n.yi)}))}hi(e,t,n,r){let{context:i,bitmapSize:a,mediaSize:o,horizontalPixelRatio:s,verticalPixelRatio:c}=e,l=this.qt.pi||!this.qt.ki?t.C:0,u=this.qt.Pi?t.S:0,d=t.A+this.ei.Ti,f=t.I+this.ei.Ri,p=t.V,m=t.B,h=this.qt.ri,g=t.k,ee=n.Di(i,h),_=Math.ceil(n.Ii(i,h)),v=g+d+f,y=t.S+p+m+_+l,b=Math.max(1,Math.floor(c)),x=Math.round(v*c);x%2!=b%2&&(x+=1);let S=u>0?Math.max(1,Math.floor(u*s)):0,te=Math.round(y*s),C=Math.round(l*s),ne=this.ei.Vi??this.ei.Bi??this.ei.Ei,re=Math.round(ne*c)-Math.floor(.5*c),ie=Math.floor(re+b/2-x/2),w=ie+x,T=r===`right`,ae=T?o.width-u:u,E=T?a.width-S:S,D,oe,O;return T?(D=E-te,oe=E-C,O=ae-l-p-u):(D=E+te,oe=E+C,O=ae+l+p),{li:T,ai:{_i:ie,mi:re,Si:w,ui:te,ci:x,ft:2*s,di:S,oi:D,fi:E,wi:oe,Mi:b,bi:a.width},xi:{_i:ie/c,Si:w/c,Ci:O,yi:ee}}}},je=class{constructor(e){this.Ai={Ei:0,G:`#000`,Ri:0,Ti:0},this.Li={ri:``,It:!1,pi:!0,ki:!1,Ht:``,R:`#FFF`,gi:!1,Pi:!1},this.zi={ri:``,It:!1,pi:!1,ki:!0,Ht:``,R:`#FFF`,gi:!0,Pi:!0},this.xt=!0,this.Oi=new(e||Ae)(this.Li,this.Ai),this.Ni=new(e||Ae)(this.zi,this.Ai)}ri(){return this.Fi(),this.Li.ri}Ei(){return this.Fi(),this.Ai.Ei}kt(){this.xt=!0}$t(e,t=!1){return Math.max(this.Oi.$t(e,t),this.Ni.$t(e,t))}Wi(){return this.Ai.Vi??null}Hi(){return this.Ai.Vi??this.Ai.Bi??this.Ei()}Ui(e){this.Ai.Bi=e??void 0}$i(){return this.Fi(),this.Li.It||this.zi.It}ji(){return this.Fi(),this.Li.It}Tt(e){return this.Fi(),this.Li.pi=this.Li.pi&&e.N().ticksVisible,this.zi.pi=this.zi.pi&&e.N().ticksVisible,this.Oi.ht(this.Li,this.Ai),this.Ni.ht(this.zi,this.Ai),this.Oi}qi(){return this.Fi(),this.Oi.ht(this.Li,this.Ai),this.Ni.ht(this.zi,this.Ai),this.Ni}Fi(){this.xt&&(this.Li.pi=!0,this.zi.pi=!1,this.Yi(this.Li,this.zi,this.Ai))}},Me=class extends je{constructor(e,t,n){super(),this.Jt=e,this.Ki=t,this.Zi=n}Yi(e,t,n){if(e.It=!1,this.Jt.N().mode===2)return;let r=this.Jt.N().horzLine;if(!r.labelVisible)return;let i=this.Ki.Lt();if(!this.Jt.It()||this.Ki.Gi()||i===null)return;let a=this.Ki.Xi().Z(r.labelBackgroundColor);n.G=a.G,e.R=a.X;let o=2/12*this.Ki.k();n.Ti=o,n.Ri=o;let s=this.Zi(this.Ki);n.Ei=s.Ei,e.ri=this.Ki.Ji(s.Mt,i),e.It=!0}},Ne=/[1-9]/g,Pe=class{constructor(){this.qt=null}ht(e){this.qt=e}st(e,t){if(this.qt===null||!1===this.qt.It||this.qt.ri.length===0)return;let n=e.useMediaCoordinateSpace((({context:e})=>(e.font=t.P,Math.round(t.Qi.Ii(e,A(this.qt).ri,Ne)))));if(n<=0)return;let r=t.tn,i=n+2*r,a=i/2,o=this.qt.nn,s=this.qt.Ei,c=Math.floor(s-a)+.5;c<0?(s+=Math.abs(0-c),c=Math.floor(s-a)+.5):c+i>o&&(s-=Math.abs(o-(c+i)),c=Math.floor(s-a)+.5);let l=c+i,u=Math.ceil(0+t.S+t.C+t.A+t.k+t.I);e.useBitmapCoordinateSpace((({context:e,horizontalPixelRatio:n,verticalPixelRatio:r})=>{let i=A(this.qt);e.fillStyle=i.G;let a=Math.round(c*n),o=Math.round(0*r),s=Math.round(l*n),d=Math.round(u*r),f=Math.round(2*n);if(e.beginPath(),e.moveTo(a,o),e.lineTo(a,d-f),e.arcTo(a,d,a+f,d,f),e.lineTo(s-f,d),e.arcTo(s,d,s,d-f,f),e.lineTo(s,o),e.fill(),i.pi){let a=Math.round(i.Ei*n),s=o,c=Math.round((s+t.C)*r);e.fillStyle=i.R;let l=Math.max(1,Math.floor(n)),u=Math.floor(.5*n);e.fillRect(a-u,s,l,c-s)}})),e.useMediaCoordinateSpace((({context:e})=>{let n=A(this.qt),i=0+t.S+t.C+t.A+t.k/2;e.font=t.P,e.textAlign=`left`,e.textBaseline=`middle`,e.fillStyle=n.R;let a=t.Qi.Di(e,`Apr0`);e.translate(c+r,i+a),e.fillText(n.ri,0,0)}))}},Fe=class{constructor(e,t,n){this.xt=!0,this.Xt=new Pe,this.Gt={It:!1,G:`#4c525e`,R:`white`,ri:``,nn:0,Ei:NaN,pi:!0},this.Ct=e,this.sn=t,this.Zi=n}kt(){this.xt=!0}Tt(){return this.xt&&=(this.Rt(),!1),this.Xt.ht(this.Gt),this.Xt}Rt(){let e=this.Gt;if(e.It=!1,this.Ct.N().mode===2)return;let t=this.Ct.N().vertLine;if(!t.labelVisible)return;let n=this.sn.Et();if(n.Gi())return;e.nn=n.nn();let r=this.Zi();if(r===null)return;e.Ei=r.Ei;let i=n.en(this.Ct.Bt());e.ri=n.rn(A(i)),e.It=!0;let a=this.sn.Xi().Z(t.labelBackgroundColor);e.G=a.G,e.R=a.X,e.pi=n.N().ticksVisible}},Ie=class{constructor(){this.hn=null,this.an=0}ln(){return this.an}_n(e){this.an=e}Ft(){return this.hn}un(e){this.hn=e}cn(e){return[]}dn(){return[]}It(){return!0}},Le;(function(e){e[e.Normal=0]=`Normal`,e[e.Magnet=1]=`Magnet`,e[e.Hidden=2]=`Hidden`,e[e.MagnetOHLC=3]=`MagnetOHLC`})(Le||={});var Re=class extends Ie{constructor(e,t){super(),this.yt=null,this.fn=NaN,this.pn=0,this.vn=!1,this.mn=new Map,this.wn=!1,this.Mn=new WeakMap,this.gn=new WeakMap,this.bn=NaN,this.Sn=NaN,this.xn=NaN,this.Cn=NaN,this.sn=e,this.yn=t,this.kn=((e,t)=>n=>{let r=t(),i=e();if(n===A(this.yt).Pn())return{Mt:i,Ei:r};{let e=A(n.Lt());return{Mt:n.Tn(r,e),Ei:r}}})((()=>this.fn),(()=>this.Sn));let n=((e,t)=>()=>{let n=this.sn.Et().Rn(e()),r=t();return n&&Number.isFinite(r)?{wt:n,Ei:r}:null})((()=>this.pn),(()=>this.ni()));this.Dn=new Fe(this,e,n)}N(){return this.yn}In(e,t){this.xn=e,this.Cn=t}Vn(){this.xn=NaN,this.Cn=NaN}Bn(){return this.xn}En(){return this.Cn}An(e,t,n){this.wn||=!0,this.vn=!0,this.Ln(e,t,n)}Bt(){return this.pn}ni(){return this.bn}si(){return this.Sn}It(){return this.vn}zn(){this.vn=!1,this.On(),this.fn=NaN,this.bn=NaN,this.Sn=NaN,this.yt=null,this.Vn(),this.Nn()}Fn(e){if(!this.yn.doNotSnapToHiddenSeriesIndices)return e;let t=this.sn,n=t.Et(),r=null,i=null;for(let n of t.Wn()){let t=n.Un().Hn(e,-1);if(t){if(t.$n===e)return e;(r===null||t.$n>r)&&(r=t.$n)}let a=n.Un().Hn(e,1);if(a){if(a.$n===e)return e;(i===null||a.$n<i)&&(i=a.$n)}}let a=[r,i].filter(ue);if(a.length===0)return e;let o=n.jt(e),s=a.map((e=>Math.abs(o-n.jt(e))));return a[s.indexOf(Math.min(...s))]}jn(e){let t=this.Mn.get(e);t||(t=new we(this,e),this.Mn.set(e,t));let n=this.gn.get(e);return n||(n=new Se(this.sn,this,e),this.gn.set(e,n)),[t,n]}ti(e){return e===this.yt&&this.yn.horzLine.visible}ii(){return this.yn.vertLine.visible}qn(e,t){this.vn&&this.yt===e||this.mn.clear();let n=[];return this.yt===e&&n.push(this.Yn(this.mn,t,this.kn)),n}dn(){return this.vn?[this.Dn]:[]}Kn(){return this.yt}Nn(){this.sn.Zn().forEach((e=>{this.Mn.get(e)?.kt(),this.gn.get(e)?.kt()})),this.mn.forEach((e=>e.kt())),this.Dn.kt()}Gn(e){return e&&!e.Pn().Gi()?e.Pn():null}Ln(e,t,n){this.Xn(e,t,n)&&this.Nn()}Xn(e,t,n){let r=this.bn,i=this.Sn,a=this.fn,o=this.pn,s=this.yt,c=this.Gn(n);this.pn=e,this.bn=isNaN(e)?NaN:this.sn.Et().jt(e),this.yt=n;let l=c===null?null:c.Lt();return c!==null&&l!==null?(this.fn=t,this.Sn=c.Nt(t,l)):(this.fn=NaN,this.Sn=NaN),r!==this.bn||i!==this.Sn||o!==this.pn||a!==this.fn||s!==this.yt}On(){let e=this.sn.Jn().map((e=>e.Un().Qn())).filter(ue),t=e.length===0?null:Math.max(...e);this.pn=t===null?NaN:t}Yn(e,t,n){let r=e.get(t);return r===void 0&&(r=new Me(this,t,n),e.set(t,r)),r}};function ze(e){return e===`left`||e===`right`}var L=class e{constructor(e){this.ts=new Map,this.ns=[],this.ss=e}es(e,t){let n=function(e,t){return e===void 0?t:{rs:Math.max(e.rs,t.rs),hs:e.hs||t.hs}}(this.ts.get(e),t);this.ts.set(e,n)}ls(){return this.ss}_s(e){let t=this.ts.get(e);return t===void 0?{rs:this.ss}:{rs:Math.max(this.ss,t.rs),hs:t.hs}}us(){this.cs(),this.ns=[{ds:0}]}fs(e){this.cs(),this.ns=[{ds:1,Wt:e}]}ps(e){this.vs(),this.ns.push({ds:5,Wt:e})}cs(){this.vs(),this.ns.push({ds:6})}ws(){this.cs(),this.ns=[{ds:4}]}Ms(e){this.cs(),this.ns.push({ds:2,Wt:e})}gs(e){this.cs(),this.ns.push({ds:3,Wt:e})}bs(){return this.ns}Ss(e){for(let t of e.ns)this.xs(t);this.ss=Math.max(this.ss,e.ss),e.ts.forEach(((e,t)=>{this.es(t,e)}))}static Cs(){return new e(2)}static ys(){return new e(3)}xs(e){switch(e.ds){case 0:this.us();break;case 1:this.fs(e.Wt);break;case 2:this.Ms(e.Wt);break;case 3:this.gs(e.Wt);break;case 4:this.ws();break;case 5:this.ps(e.Wt);break;case 6:this.vs()}}vs(){let e=this.ns.findIndex((e=>e.ds===5));e!==-1&&this.ns.splice(e,1)}},Be=class{formatTickmarks(e){return e.map((e=>this.format(e)))}},Ve=`.`;function R(e,t){if(!P(e))return`n/a`;if(!se(t)||t<0||t>16)throw TypeError(`invalid length`);return t===0?e.toString():(`0000000000000000`+e.toString()).slice(-t)}var He=class extends Be{constructor(e,t){if(super(),t||=1,P(e)&&se(e)||(e=100),e<0)throw TypeError(`invalid base`);this.Ki=e,this.ks=t,this.Ps()}format(e){let t=e<0?`−`:``;return e=Math.abs(e),t+this.Ts(e)}Ps(){if(this.Rs=0,this.Ki>0&&this.ks>0){let e=this.Ki;for(;e>1;)e/=10,this.Rs++}}Ts(e){let t=this.Ki/this.ks,n=Math.floor(e),r=``,i=this.Rs===void 0?NaN:this.Rs;if(t>1){let a=+(Math.round(e*t)-n*t).toFixed(this.Rs);a>=t&&(a-=t,n+=1),r=Ve+R(+a.toFixed(this.Rs)*this.ks,i)}else n=Math.round(n*t)/t,i>0&&(r=Ve+R(0,i));return n.toFixed(0)+r}},Ue=class extends He{constructor(e=100){super(e)}format(e){return`${super.format(e)}%`}},We=class extends Be{constructor(e){super(),this.Ds=e}format(e){let t=``;return e<0&&(t=`-`,e=-e),e<995?t+this.Is(e):e<999995?t+this.Is(e/1e3)+`K`:e<999999995?(e=1e3*Math.round(e/1e3),t+this.Is(e/1e6)+`M`):(e=1e6*Math.round(e/1e6),t+this.Is(e/1e9)+`B`)}Is(e){let t,n=10**this.Ds;return t=(e=Math.round(e*n)/n)>=1e-15&&e<1?e.toFixed(this.Ds).replace(/\.?0+$/,``):String(e),t.replace(/(\.[1-9]*)0+$/,((e,t)=>t))}},Ge=/[2-9]/g,Ke=class{constructor(e=50){this.Vs=0,this.Bs=1,this.Es=1,this.As={},this.Ls=new Map,this.zs=e}Os(){this.Vs=0,this.Ls.clear(),this.Bs=1,this.Es=1,this.As={}}Ii(e,t,n){return this.Ns(e,t,n).width}Di(e,t,n){let r=this.Ns(e,t,n);return((r.actualBoundingBoxAscent||0)-(r.actualBoundingBoxDescent||0))/2}Ns(e,t,n){let r=n||Ge,i=String(t).replace(r,`0`);if(this.Ls.has(i))return k(this.Ls.get(i)).Fs;if(this.Vs===this.zs){let e=this.As[this.Es];delete this.As[this.Es],this.Ls.delete(e),this.Es++,this.Vs--}e.save(),e.textBaseline=`middle`;let a=e.measureText(i);return e.restore(),a.width===0&&t.length||(this.Ls.set(i,{Fs:a,Ws:this.Bs}),this.As[this.Bs]=i,this.Vs++,this.Bs++),a}},qe=class{constructor(e){this.Hs=null,this.M=null,this.Us=`right`,this.$s=e}js(e,t,n){this.Hs=e,this.M=t,this.Us=n}st(e){this.M!==null&&this.Hs!==null&&this.Hs.st(e,this.M,this.$s,this.Us)}},Je=class{constructor(e,t,n){this.qs=e,this.$s=new Ke(50),this.Ys=t,this.O=n,this.F=-1,this.Xt=new qe(this.$s)}Tt(){let e=this.O.Ks(this.Ys);if(e===null)return null;let t=e.Zs(this.Ys)?e.Gs():this.Ys.Ft();if(t===null)return null;let n=e.Xs(t);if(n===`overlay`)return null;let r=this.O.Js();return r.k!==this.F&&(this.F=r.k,this.$s.Os()),this.Xt.js(this.qs.qi(),r,n),this.Xt}},Ye=class extends I{constructor(){super(...arguments),this.qt=null}ht(e){this.qt=e}Qs(e,t){if(!this.qt?.It)return null;let{ut:n,ct:r,te:i}=this.qt;return t>=n-r-7&&t<=n+r+7?{ie:this.qt,ne:Math.abs(t-n),se:2,ee:`price-line`,te:i}:null}et({context:e,bitmapSize:t,horizontalPixelRatio:n,verticalPixelRatio:r}){if(this.qt===null||!1===this.qt.It)return;let i=Math.round(this.qt.ut*r);i<0||i>t.height||(e.lineCap=`butt`,e.strokeStyle=this.qt.R,e.lineWidth=Math.floor(this.qt.ct*n),D(e,this.qt.Zt),oe(e,i,0,t.width))}},Xe=class{constructor(e){this.re={ut:0,R:`rgba(0, 0, 0, 0)`,ct:1,Zt:0,It:!1},this.he=new Ye,this.xt=!0,this.ae=e,this.le=e.Qt(),this.he.ht(this.re)}kt(){this.xt=!0}Tt(){return this.ae.It()?(this.xt&&=(this.oe(),!1),this.he):null}},Ze=class extends Xe{constructor(e){super(e)}oe(){this.re.It=!1;let e=this.ae.Ft(),t=e._e()._e;if(t!==2&&t!==3)return;let n=this.ae.N();if(!n.baseLineVisible||!this.ae.It())return;let r=this.ae.Lt();r!==null&&(this.re.It=!0,this.re.ut=e.Nt(r.Wt,r.Wt),this.re.R=n.baseLineColor,this.re.ct=n.baseLineWidth,this.re.Zt=n.baseLineStyle)}},Qe=class extends I{constructor(){super(...arguments),this.qt=null}ht(e){this.qt=e}ue(){return this.qt}et({context:e,horizontalPixelRatio:t,verticalPixelRatio:n}){let r=this.qt;if(r===null)return;let i=Math.max(1,Math.floor(t)),a=i%2/2,o=Math.round(r.ce.x*t)+a,s=r.ce.y*n;e.fillStyle=r.de,e.beginPath();let c=Math.max(2,1.5*r.fe)*t;e.arc(o,s,c,0,2*Math.PI,!1),e.fill(),e.fillStyle=r.pe,e.beginPath(),e.arc(o,s,r.ft*t,0,2*Math.PI,!1),e.fill(),e.lineWidth=i,e.strokeStyle=r.ve,e.beginPath(),e.arc(o,s,r.ft*t+i/2,0,2*Math.PI,!1),e.stroke()}},$e=[{me:0,we:.25,Me:4,ge:10,be:.25,Se:0,xe:.4,Ce:.8},{me:.25,we:.525,Me:10,ge:14,be:0,Se:0,xe:.8,Ce:0},{me:.525,we:1,Me:14,ge:14,be:0,Se:0,xe:0,Ce:0}],et=class{constructor(e){this.Xt=new Qe,this.xt=!0,this.ye=!0,this.ke=performance.now(),this.Pe=this.ke-1,this.Te=e}Re(){this.Pe=this.ke-1,this.kt()}De(){if(this.kt(),this.Te.N().lastPriceAnimation===2){let e=performance.now(),t=this.Pe-e;if(t>0)return void(t<650&&(this.Pe+=2600));this.ke=e,this.Pe=e+2600}}kt(){this.xt=!0}Ie(){this.ye=!0}It(){return this.Te.N().lastPriceAnimation!==0}Ve(){switch(this.Te.N().lastPriceAnimation){case 0:return!1;case 1:return!0;case 2:return performance.now()<=this.Pe}}Tt(){return this.xt?(this.Rt(),this.xt=!1,this.ye=!1):this.ye&&=(this.Be(),!1),this.Xt}Rt(){this.Xt.ht(null);let e=this.Te.Qt().Et(),t=e.Ee(),n=this.Te.Lt();if(t===null||n===null)return;let r=this.Te.Ae(!0);if(r.Le||!t.ze(r.$n))return;let i={x:e.jt(r.$n),y:this.Te.Ft().Nt(r.Mt,n.Wt)},a=r.R,o=this.Te.N().lineWidth,s=this.Oe(this.Ne(),a);this.Xt.ht({de:a,fe:o,pe:s.pe,ve:s.ve,ft:s.ft,ce:i})}Be(){let e=this.Xt.ue();if(e!==null){let t=this.Oe(this.Ne(),e.de);e.pe=t.pe,e.ve=t.ve,e.ft=t.ft}}Ne(){return this.Ve()?performance.now()-this.ke:2599}Fe(e,t,n,r){let i=n+(r-n)*t;return this.Te.Qt().Xi().Y(e,i)}Oe(e,t){let n=e%2600/2600,r;for(let e of $e)if(n>=e.me&&n<=e.we){r=e;break}O(r!==void 0,`Last price animation internal logic error`);let i=(n-r.me)/(r.we-r.me);return{pe:this.Fe(t,i,r.be,r.Se),ve:this.Fe(t,i,r.xe,r.Ce),ft:(a=i,o=r.Me,s=r.ge,o+(s-o)*a)};var a,o,s}},tt=class extends Xe{constructor(e){super(e)}oe(){let e=this.re;e.It=!1;let t=this.ae.N();if(!t.priceLineVisible||!this.ae.It())return;let n=this.ae.Ae(t.priceLineSource===0);n.Le||(e.It=!0,e.ut=n.Ei,e.R=this.ae.We(n.R),e.ct=t.priceLineWidth,e.Zt=t.priceLineStyle)}},nt=class extends je{constructor(e){super(),this.Jt=e}Yi(e,t,n){e.It=!1,t.It=!1;let r=this.Jt;if(!r.It())return;let i=r.N(),a=i.lastValueVisible,o=r.He()!==``,s=i.seriesLastValueMode===0,c=r.Ae(!1);if(c.Le)return;a&&(e.ri=this.Ue(c,a,s),e.It=e.ri.length!==0),(o||s)&&(t.ri=this.$e(c,a,o,s),t.It=t.ri.length>0);let l=r.We(c.R),u=this.Jt.Qt().Xi().Z(l);n.G=u.G,n.Ei=c.Ei,t.Ht=r.Qt().Ut(c.Ei/r.Ft().$t()),e.Ht=l,e.R=u.X,t.R=u.X}$e(e,t,n,r){let i=``,a=this.Jt.He();return n&&a.length!==0&&(i+=`${a} `),t&&r&&(i+=this.Jt.Ft().je()?e.qe:e.Ye),i.trim()}Ue(e,t,n){return t?n?this.Jt.Ft().je()?e.Ye:e.qe:e.ri:``}};function rt(e,t,n,r){let i=Number.isFinite(t),a=Number.isFinite(n);return i&&a?e(t,n):i||a?i?t:n:r}var z=class e{constructor(e,t){this.Ke=e,this.Ze=t}Ge(e){return e!==null&&this.Ke===e.Ke&&this.Ze===e.Ze}Xe(){return new e(this.Ke,this.Ze)}Je(){return this.Ke}Qe(){return this.Ze}tr(){return this.Ze-this.Ke}Gi(){return this.Ze===this.Ke||Number.isNaN(this.Ze)||Number.isNaN(this.Ke)}Ss(t){return t===null?this:new e(rt(Math.min,this.Je(),t.Je(),-1/0),rt(Math.max,this.Qe(),t.Qe(),1/0))}ir(e){if(!P(e)||this.Ze-this.Ke===0)return;let t=.5*(this.Ze+this.Ke),n=this.Ze-t,r=this.Ke-t;n*=e,r*=e,this.Ze=t+n,this.Ke=t+r}nr(e){P(e)&&(this.Ze+=e,this.Ke+=e)}sr(){return{minValue:this.Ke,maxValue:this.Ze}}static er(t){return t===null?null:new e(t.minValue,t.maxValue)}},it=class e{constructor(e,t){this.rr=e,this.hr=t||null}ar(){return this.rr}lr(){return this.hr}sr(){return{priceRange:this.rr===null?null:this.rr.sr(),margins:this.hr||void 0}}static er(t){return t===null?null:new e(z.er(t.priceRange),t.margins)}},at=[2,4,8,16,32,64,128,256,512],ot=`Custom series with conflation reducer must have a priceValueBuilder method`,st=class extends Xe{constructor(e,t){super(e),this._r=t}oe(){let e=this.re;e.It=!1;let t=this._r.N();if(!this.ae.It()||!t.lineVisible)return;let n=this._r.ur();n!==null&&(e.It=!0,e.ut=n,e.R=t.color,e.ct=t.lineWidth,e.Zt=t.lineStyle,e.te=this._r.N().id)}},ct=class extends je{constructor(e,t){super(),this.Te=e,this._r=t}Yi(e,t,n){e.It=!1,t.It=!1;let r=this._r.N(),i=r.axisLabelVisible,a=r.title!==``,o=this.Te;if(!i||!o.It())return;let s=this._r.ur();if(s===null)return;a&&(t.ri=r.title,t.It=!0),t.Ht=o.Qt().Ut(s/o.Ft().$t()),e.ri=this.cr(r.price),e.It=!0;let c=this.Te.Qt().Xi().Z(r.axisLabelColor||r.color);n.G=c.G;let l=r.axisLabelTextColor||c.X;e.R=l,t.R=l,n.Ei=s}cr(e){let t=this.Te.Lt();return t===null?``:this.Te.Ft().Ji(e,t.Wt)}},lt=class{constructor(e,t){this.Te=e,this.yn=t,this.dr=new st(e,this),this.qs=new ct(e,this),this.pr=new Je(this.qs,e,e.Qt())}vr(e){N(this.yn,e),this.kt(),this.Te.Qt().mr()}N(){return this.yn}wr(){return this.dr}Mr(){return this.pr}gr(){return this.qs}kt(){this.dr.kt(),this.qs.kt()}ur(){let e=this.Te,t=e.Ft();if(e.Qt().Et().Gi()||t.Gi())return null;let n=e.Lt();return n===null?null:t.Nt(this.yn.price,n.Wt)}},ut=class{constructor(){this.br=new WeakMap}Sr(e,t,n){let r=1/t*n;if(e>=r)return 1;let i=r/e;return Math.min(2**Math.floor(Math.log2(i)),512)}Cr(e,t,n,r=!1,i){if(e.length===0||t<=1)return e;let a=this.yr(t);if(a<=1)return e;let o=this.kr(e),s=o.Pr.get(a);return s!==void 0||(s=this.Tr(e,a,n,r,i,o.Pr),o.Pr.set(a,s)),s}Rr(e,t,n,r,i=!1,a){if(n<1||e.length===0)return e;let o=this.kr(e),s=o.Pr.get(n);if(!s)return this.Cr(e,n,r,i,a);let c=this.Dr(e,t,n,s,i,r,a);return o.Pr.set(n,c),c}yr(e){if(e<=2)return 2;for(let t of at)if(e<=t)return t;return 512}Ir(e){if(e.length===0)return 0;let t=e[0],n=e[e.length-1];return 31*e.length+17*t.$n+13*n.$n}Tr(e,t,n,r=!1,i,a=new Map){if(t===2)return this.Vr(e,2,n,r,i);let o=t/2,s=a.get(o);return s||(s=this.Tr(e,o,n,r,i,a),a.set(o,s)),this.Br(s,n,r,i)}Vr(e,t,n,r=!1,i){let a=this.Er(e,t,n,r,i);return this.Ar(a,r)}Br(e,t,n=!1,r){let i=this.Er(e,2,t,n,r);return this.Ar(i,n)}Er(e,t,n,r=!1,i){let a=[];for(let o=0;o<e.length;o+=t)if(e.length-o>=t){let t=this.Lr(e[o],e[o+1],n,r,i);t.zr=!1,a.push(t)}else if(a.length===0)a.push(this.Or(e[o],!0));else{let t=a[a.length-1];a[a.length-1]=this.Nr(t,e[o],n,r,i)}return a}Fr(e,t){return(e??1)+(t??1)}Lr(e,t,n,r=!1,i){if(!r||!n||!i){let n=e.Wt[1]>t.Wt[1]?e.Wt[1]:t.Wt[1],r=e.Wt[2]<t.Wt[2]?e.Wt[2]:t.Wt[2];return{Wr:e.$n,Hr:t.$n,Ur:e.wt,$r:t.wt,jr:e.Wt[0],qr:n,Yr:r,Kr:t.Wt[3],Zr:this.Fr(e.Zr,t.Zr),Gr:void 0,zr:!1}}let a=n(this.Xr(e,i),this.Xr(t,i)),o=i(a),s=o.length?o[o.length-1]:0;return{Wr:e.$n,Hr:t.$n,Ur:e.wt,$r:t.wt,jr:e.Wt[0],qr:Math.max(e.Wt[1],s),Yr:Math.min(e.Wt[2],s),Kr:s,Zr:this.Fr(e.Zr,t.Zr),Gr:a,zr:!1}}Nr(e,t,n,r=!1,i){if(!r||!n||!i)return{Wr:e.Wr,Hr:t.$n,Ur:e.Ur,$r:t.wt,jr:e.jr,qr:e.qr>t.Wt[1]?e.qr:t.Wt[1],Yr:e.Yr<t.Wt[2]?e.Yr:t.Wt[2],Kr:t.Wt[3],Zr:e.Zr+(t.Zr??1),Gr:e.Gr,zr:!1};let a=e.Gr,o=this.Xr(t,i),s=a?{data:a,index:e.Wr,originalTime:e.Ur,time:e.Ur,priceValues:i(a)}:null,c=s?n(s,o):o.data,l=s?i(c):o.priceValues,u=l.length?l[l.length-1]:0;return{Wr:e.Wr,Hr:t.$n,Ur:e.Ur,$r:t.wt,jr:e.jr,qr:Math.max(e.qr,u),Yr:Math.min(e.Yr,u),Kr:u,Zr:e.Zr+(t.Zr??1),Gr:c,zr:!1}}Jr(e,t,n,r,i,a,o=!1,s){let c=t===r?i:e[t];if(n-t==1)return this.Or(c,!0);let l=t+1===r?i:e[t+1],u=this.Lr(c,l,a,o,s);for(let c=t+2;c<n;c++){let t=c===r?i:e[c];u=this.Nr(u,t,a,o,s)}return u}Xr(e,t){let n=e.ue??{};return{data:e.ue,index:e.$n,originalTime:e.Qr,time:e.wt,priceValues:t(n)}}th(e,t=!1){let n=!0===t,r=!!e.Gr;return{$n:e.Wr,wt:e.Ur,Qr:e.Ur,Wt:[n?e.Kr:e.jr,e.qr,e.Yr,e.Kr],Zr:e.Zr,ue:n?r?e.Gr:{wt:e.Ur}:void 0}}Ar(e,t=!1){return e.map((e=>this.th(e,t)))}Dr(e,t,n,r,i=!1,a,o){if(r.length===0)return r;let s=e.length-1,c=Math.floor(s/n)*n;if(Math.min(c+n,e.length)-c<n&&e.length>n){let r=e.slice();return r[r.length-1]=t,this.Cr(r,n,a,i,o)}if(Math.floor((s-1)/n)===Math.floor(s/n)||r.length===1){let l=Math.min(c+n,e.length),u=l-c;if(u<=0)return r;let d=u===1?this.Or(c===s?t:e[c],!0):this.Jr(e,c,l,s,t,a,i,o);return r[r.length-1]=this.th(d,i),r}{let r=e.slice();return r[r.length-1]=t,this.Cr(r,n,a,i,o)}}Or(e,t=!1){return{Wr:e.$n,Hr:e.$n,Ur:e.wt,$r:e.wt,jr:e.Wt[0],qr:e.Wt[1],Yr:e.Wt[2],Kr:e.Wt[3],Zr:e.Zr??1,Gr:e.ue,zr:t}}kr(e){let t=this.ih(e),n=this.Ir(e);return t.nh!==n&&(t.Pr.clear(),t.nh=n),t}ih(e){let t=this.br.get(e);return t===void 0&&(t={nh:this.Ir(e),Pr:new Map},this.br.set(e,t)),t}},dt=class extends Ie{constructor(e){super(),this.sn=e}Qt(){return this.sn}},ft={Bar:(e,t,n,r)=>{let i=t.upColor,a=t.downColor,o=A(e(n,r)),s=j(o.Wt[0])<=j(o.Wt[3]);return{sh:o.R??(s?i:a)}},Candlestick:(e,t,n,r)=>{let i=t.upColor,a=t.downColor,o=t.borderUpColor,s=t.borderDownColor,c=t.wickUpColor,l=t.wickDownColor,u=A(e(n,r)),d=j(u.Wt[0])<=j(u.Wt[3]);return{sh:u.R??(d?i:a),eh:u.Ht??(d?o:s),rh:u.hh??(d?c:l)}},Custom:(e,t,n,r)=>({sh:A(e(n,r)).R??t.color}),Area:(e,t,n,r)=>{let i=A(e(n,r));return{sh:i.vt??t.lineColor,vt:i.vt??t.lineColor,ah:i.ah??t.topColor,oh:i.oh??t.bottomColor}},Baseline:(e,t,n,r)=>{let i=A(e(n,r));return{sh:i.Wt[3]>=t.baseValue.price?t.topLineColor:t.bottomLineColor,_h:i._h??t.topLineColor,uh:i.uh??t.bottomLineColor,dh:i.dh??t.topFillColor1,fh:i.fh??t.topFillColor2,ph:i.ph??t.bottomFillColor1,mh:i.mh??t.bottomFillColor2}},Line:(e,t,n,r)=>{let i=A(e(n,r));return{sh:i.R??t.color,vt:i.R??t.color}},Histogram:(e,t,n,r)=>({sh:A(e(n,r)).R??t.color})},pt=class{constructor(e){this.wh=(e,t)=>t===void 0?this.Te.Un().Mh(e):t.Wt,this.Te=e,this.gh=ft[e.bh()]}Sh(e,t){return this.gh(this.wh,this.Te.N(),e,t)}};function mt(e,t,n,r,i=0,a=t.length){let o=a-i;for(;0<o;){let a=o>>1,s=i+a;r(t[s],n)===e?(i=s+1,o-=a+1):o=a}return i}var B=mt.bind(null,!0),ht=mt.bind(null,!1),gt;(function(e){e[e.NearestLeft=-1]=`NearestLeft`,e[e.None=0]=`None`,e[e.NearestRight=1]=`NearestRight`})(gt||={});var V=30,_t=class{constructor(){this.xh=[],this.Ch=new Map,this.yh=new Map,this.kh=[]}Ph(){return this.Th()>0?this.xh[this.xh.length-1]:null}Rh(){return this.Th()>0?this.Dh(0):null}Qn(){return this.Th()>0?this.Dh(this.xh.length-1):null}Th(){return this.xh.length}Gi(){return this.Th()===0}ze(e){return this.Ih(e,0)!==null}Mh(e){return this.Hn(e)}Hn(e,t=0){let n=this.Ih(e,t);return n===null?null:{...this.Vh(n),$n:this.Dh(n)}}Bh(){return this.xh}Eh(e,t,n){if(this.Gi())return null;let r=null;for(let i of n)r=vt(r,this.Ah(e,t,i));return r}ht(e){this.yh.clear(),this.Ch.clear(),this.xh=e,this.kh=e.map((e=>e.$n))}Lh(){return this.kh}Dh(e){return this.xh[e].$n}Vh(e){return this.xh[e]}Ih(e,t){let n=this.zh(e);if(n===null&&t!==0)switch(t){case-1:return this.Oh(e);case 1:return this.Nh(e);default:throw TypeError(`Unknown search mode`)}return n}Oh(e){let t=this.Fh(e);return t>0&&--t,t!==this.xh.length&&this.Dh(t)<e?t:null}Nh(e){let t=this.Wh(e);return t!==this.xh.length&&e<this.Dh(t)?t:null}zh(e){let t=this.Fh(e);return t===this.xh.length||e<this.xh[t].$n?null:t}Fh(e){return B(this.xh,e,((e,t)=>e.$n<t))}Wh(e){return ht(this.xh,e,((e,t)=>e.$n>t))}Hh(e,t,n){let r=null;for(let i=e;i<t;i++){let e=this.xh[i].Wt[n];Number.isNaN(e)||(r===null?r={Uh:e,$h:e}:(e<r.Uh&&(r.Uh=e),e>r.$h&&(r.$h=e)))}return r}Ah(e,t,n){if(this.Gi())return null;let r=null,i=A(this.Rh()),a=A(this.Qn()),o=Math.max(e,i),s=Math.min(t,a),c=Math.ceil(o/V)*V,l=Math.max(c,Math.floor(s/V)*V);{let e=this.Fh(o),i=this.Wh(Math.min(s,c,t));r=vt(r,this.Hh(e,i,n))}let u=this.Ch.get(n);u===void 0&&(u=new Map,this.Ch.set(n,u));for(let e=Math.max(c+1,o);e<l;e+=V){let t=Math.floor(e/V),i=u.get(t);if(i===void 0){let e=this.Fh(t*V),r=this.Wh((t+1)*V-1);i=this.Hh(e,r,n),u.set(t,i)}r=vt(r,i)}{let e=this.Fh(l),t=this.Wh(s);r=vt(r,this.Hh(e,t,n))}return r}};function vt(e,t){return e===null?t:t===null?e:{Uh:Math.min(e.Uh,t.Uh),$h:Math.max(e.$h,t.$h)}}function yt(){return new _t}var bt={setLineStyle:D},xt=class{constructor(e){this.jh=e}st(e,t,n){this.jh.draw(e,bt)}qh(e,t,n){this.jh.drawBackground?.(e,bt)}},St=class{constructor(e){this.Ls=null,this.Yh=e}Tt(){let e=this.Yh.renderer();if(e===null)return null;if(this.Ls?.Kh===e)return this.Ls.Zh;let t=new xt(e);return this.Ls={Kh:e,Zh:t},t}Gh(){return this.Yh.zOrder?.()??`normal`}},Ct=class{constructor(e){this.Xh=null,this.Jh=e}Qh(){return this.Jh}Nn(){this.Jh.updateAllViews?.()}jn(){let e=this.Jh.paneViews?.()??[];if(this.Xh?.Kh===e)return this.Xh.Zh;let t=e.map((e=>new St(e)));return this.Xh={Kh:e,Zh:t},t}Qs(e,t){return this.Jh.hitTest?.(e,t)??null}},wt=class extends Ct{cn(){return[]}},Tt=class{constructor(e){this.jh=e}st(e,t,n){this.jh.draw(e,bt)}qh(e,t,n){this.jh.drawBackground?.(e,bt)}},Et=class{constructor(e){this.Ls=null,this.Yh=e}Tt(){let e=this.Yh.renderer();if(e===null)return null;if(this.Ls?.Kh===e)return this.Ls.Zh;let t=new Tt(e);return this.Ls={Kh:e,Zh:t},t}Gh(){return this.Yh.zOrder?.()??`normal`}};function Dt(e){return{ri:e.text(),Ei:e.coordinate(),Vi:e.fixedCoordinate?.(),R:e.textColor(),G:e.backColor(),It:e.visible?.()??!0,pi:e.tickVisible?.()??!0}}var Ot=class{constructor(e,t){this.Xt=new Pe,this.ta=e,this.ia=t}Tt(){return this.Xt.ht({nn:this.ia.nn(),...Dt(this.ta)}),this.Xt}},kt=class extends je{constructor(e,t){super(),this.ta=e,this.Ki=t}Yi(e,t,n){let r=Dt(this.ta);n.G=r.G,e.R=r.R;let i=2/12*this.Ki.k();n.Ti=i,n.Ri=i,n.Ei=r.Ei,n.Vi=r.Vi,e.ri=r.ri,e.It=r.It,e.pi=r.pi}},At=class extends Ct{constructor(e,t){super(e),this.na=null,this.sa=null,this.ea=null,this.ra=null,this.Te=t}dn(){let e=this.Jh.timeAxisViews?.()??[];if(this.na?.Kh===e)return this.na.Zh;let t=this.Te.Qt().Et(),n=e.map((e=>new Ot(e,t)));return this.na={Kh:e,Zh:n},n}qn(){let e=this.Jh.priceAxisViews?.()??[];if(this.sa?.Kh===e)return this.sa.Zh;let t=this.Te.Ft(),n=e.map((e=>new kt(e,t)));return this.sa={Kh:e,Zh:n},n}ha(){let e=this.Jh.priceAxisPaneViews?.()??[];if(this.ea?.Kh===e)return this.ea.Zh;let t=e.map((e=>new Et(e)));return this.ea={Kh:e,Zh:t},t}aa(){let e=this.Jh.timeAxisPaneViews?.()??[];if(this.ra?.Kh===e)return this.ra.Zh;let t=e.map((e=>new Et(e)));return this.ra={Kh:e,Zh:t},t}la(e,t){return this.Jh.autoscaleInfo?.(e,t)??null}};function jt(e,t,n,r){e.forEach((e=>{t(e).forEach((e=>{e.Gh()===n&&r.push(e)}))}))}function Mt(e){return e.jn()}function Nt(e){return e.ha()}function Pt(e){return e.aa()}var Ft=[`Area`,`Line`,`Baseline`],It=class extends dt{constructor(e,t,n,r,i){super(e),this.qt=yt(),this.dr=new tt(this),this.oa=[],this._a=new Ze(this),this.ua=null,this.ca=null,this.da=null,this.fa=[],this.pa=new ut,this.va=new Map,this.ma=null,this.yn=n,this.wa=t;let a=new nt(this);if(this.mn=[a],this.pr=new Je(a,this,e),Ft.includes(this.wa)&&(this.ua=new et(this)),this.Ma(),this.Yh=r(this,this.Qt(),i),this.wa===`Custom`){let e=this.Yh;e.ga&&this.ba(e.ga)}}m(){this.da!==null&&clearTimeout(this.da)}We(e){return this.yn.priceLineColor||e}Ae(e){let t={Le:!0},n=this.Ft();if(this.Qt().Et().Gi()||n.Gi()||this.qt.Gi())return t;let r=this.Qt().Et().Ee(),i=this.Lt();if(r===null||i===null)return t;let a,o;if(e){let e=this.qt.Ph();if(e===null)return t;a=e,o=e.$n}else{let e=this.qt.Hn(r.bi(),-1);if(e===null||(a=this.qt.Mh(e.$n),a===null))return t;o=e.$n}let s=a.Wt[3],c=this.Sa().Sh(o,{Wt:a}),l=n.Nt(s,i.Wt);return{Le:!1,Mt:s,ri:n.Ji(s,i.Wt),qe:n.xa(s),Ye:n.Ca(s,i.Wt),R:c.sh,Ei:l,$n:o}}Sa(){return this.ca!==null||(this.ca=new pt(this)),this.ca}N(){return this.yn}vr(e){let t=this.Qt(),{priceScaleId:n,visible:r,priceFormat:i}=e;n!==void 0&&n!==this.yn.priceScaleId&&t.ya(this,n),r!==void 0&&r!==this.yn.visible&&t.ka();let a=e.conflationThresholdFactor!==void 0;N(this.yn,e),a&&(this.va.clear(),this.Qt().mr()),i!==void 0&&(this.Ma(),t.Pa()),t.Ta(this),t.Ra(),this.Yh.kt(`options`)}ht(e,t){this.qt.ht(e),this.va.clear();let n=this.Qt().Et().N();n.enableConflation&&n.precomputeConflationOnInit&&this.Da(n.precomputeConflationPriority),this.Yh.kt(`data`),this.ua!==null&&(t&&t.Ia?this.ua.De():e.length===0&&this.ua.Re());let r=this.Qt().Ks(this);this.Qt().Va(r),this.Qt().Ta(this),this.Qt().Ra(),this.Qt().mr()}Ba(e){let t=new lt(this,e);return this.oa.push(t),this.Qt().Ta(this),t}Ea(e){let t=this.oa.indexOf(e);t!==-1&&this.oa.splice(t,1),this.Qt().Ta(this)}Aa(){return this.oa}bh(){return this.wa}Lt(){let e=this.La();return e===null?null:{Wt:e.Wt[3],za:e.wt}}La(){let e=this.Qt().Et().Ee();if(e===null)return null;let t=e.Oa();return this.qt.Hn(t,1)}Un(){return this.qt}ba(e){this.ma=e,this.va.clear()}Na(){return!!this.Qt().Et().N().enableConflation&&this.Fa()>1}Rr(e){if(!this.Na())return;let t=this.Fa();if(!this.va.has(t))return;let n=this.wa===`Custom`,r=n&&this.ma||void 0,i=n&&this.Yh.Wa?e=>{let t=e,n=this.Yh.Wa(t);return Array.isArray(n)?n:[typeof n==`number`?n:0]}:void 0,a=this.pa.Rr(this.qt.Bh(),e,t,r,n,i),o=yt();o.ht(a),this.va.set(t,o)}Ha(){let e=this.Qt().Et().N().enableConflation;if(this.wa===`Custom`&&this.ma===null||!e)return this.qt;let t=this.Fa();return this.va.get(t)||(this.Ua(t),this.va.get(t)??this.qt)}$a(e){let t=this.qt.Mh(e);return t===null?null:this.wa===`Bar`||this.wa===`Candlestick`||this.wa===`Custom`?{jr:t.Wt[0],qr:t.Wt[1],Yr:t.Wt[2],Kr:t.Wt[3]}:t.Wt[3]}ja(e){let t=[];jt(this.fa,Mt,`top`,t);let n=this.ua;return n!==null&&n.It()?(this.da===null&&n.Ve()&&(this.da=setTimeout((()=>{this.da=null,this.Qt().qa()}),0)),n.Ie(),t.unshift(n),t):t}jn(){let e=[];this.Ya()||e.push(this._a),e.push(this.Yh,this.dr);let t=this.oa.map((e=>e.wr()));return e.push(...t),jt(this.fa,Mt,`normal`,e),e}Ka(){return this.Za(Mt,`bottom`)}Ga(e){return this.Za(Nt,e)}Xa(e){return this.Za(Pt,e)}Ja(e,t){return this.fa.map((n=>n.Qs(e,t))).filter((e=>e!==null))}cn(){return[this.pr,...this.oa.map((e=>e.Mr()))]}qn(e,t){if(t!==this.hn&&!this.Ya())return[];let n=[...this.mn];for(let e of this.oa)n.push(e.gr());return this.fa.forEach((e=>{n.push(...e.qn())})),n}dn(){let e=[];return this.fa.forEach((t=>{e.push(...t.dn())})),e}la(e,t){if(this.yn.autoscaleInfoProvider!==void 0){let n=this.yn.autoscaleInfoProvider((()=>{let n=this.Qa(e,t);return n===null?null:n.sr()}));return it.er(n)}return this.Qa(e,t)}Kh(){let e=this.yn.priceFormat;return e.base??1/e.minMove}tl(){return this.il}Nn(){this.Yh.kt();for(let e of this.mn)e.kt();for(let e of this.oa)e.kt();this.dr.kt(),this._a.kt(),this.ua?.kt(),this.fa.forEach((e=>e.Nn()))}Ft(){return A(super.Ft())}At(e){if(!((this.wa===`Line`||this.wa===`Area`||this.wa===`Baseline`)&&this.yn.crosshairMarkerVisible))return null;let t=this.qt.Mh(e);return t===null?null:{Mt:t.Wt[3],ft:this.nl(),Ht:this.sl(),Ot:this.el(),zt:this.rl(e)}}He(){return this.yn.title}It(){return this.yn.visible}hl(e){this.fa.push(new At(e,this))}al(e){this.fa=this.fa.filter((t=>t.Qh()!==e))}ll(){if(this.wa===`Custom`)return e=>this.Yh.Wa(e)}ol(){if(this.wa===`Custom`)return e=>this.Yh._l(e)}ul(){return this.qt.Lh()}Ya(){return!ze(this.Ft().cl())}Qa(e,t){if(!se(e)||!se(t)||this.qt.Gi())return null;let n=this.wa===`Line`||this.wa===`Area`||this.wa===`Baseline`||this.wa===`Histogram`?[3]:[2,1],r=this.qt.Eh(e,t,n),i=r===null?null:new z(r.Uh,r.$h),a=null;if(this.bh()===`Histogram`){let e=this.yn.base,t=new z(e,e);i=i===null?t:i.Ss(t)}return this.fa.forEach((n=>{let r=n.la(e,t);if(r?.priceRange){let e=new z(r.priceRange.minValue,r.priceRange.maxValue);i=i===null?e:i.Ss(e)}r?.margins&&(a=r.margins)})),new it(i,a)}nl(){switch(this.wa){case`Line`:case`Area`:case`Baseline`:return this.yn.crosshairMarkerRadius}return 0}sl(){switch(this.wa){case`Line`:case`Area`:case`Baseline`:{let e=this.yn.crosshairMarkerBorderColor;if(e.length!==0)return e}}return null}el(){switch(this.wa){case`Line`:case`Area`:case`Baseline`:return this.yn.crosshairMarkerBorderWidth}return 0}rl(e){switch(this.wa){case`Line`:case`Area`:case`Baseline`:{let e=this.yn.crosshairMarkerBackgroundColor;if(e.length!==0)return e}}return this.Sa().Sh(e).sh}Ma(){switch(this.yn.priceFormat.type){case`custom`:{let e=this.yn.priceFormat.formatter;this.il={format:e,formatTickmarks:this.yn.priceFormat.tickmarksFormatter??(t=>t.map(e))};break}case`volume`:this.il=new We(this.yn.priceFormat.precision);break;case`percent`:this.il=new Ue(this.yn.priceFormat.precision);break;default:{let e=10**this.yn.priceFormat.precision;this.il=new He(e,this.yn.priceFormat.minMove*e)}}this.hn!==null&&this.hn.dl()}Za(e,t){let n=[];return jt(this.fa,e,t,n),n}Fa(){let{fl:e,pl:t,vl:n}=this.ml();return this.pa.Sr(e,t,n)}ml(){let e=this.Qt().Et(),t=e.fl(),n=window.devicePixelRatio||1,r=e.N().conflationThresholdFactor;return{fl:t,pl:n,vl:this.yn.conflationThresholdFactor??r??1}}wl(e){let t=this.qt.Bh(),n;if(this.wa===`Custom`&&this.ma!==null){let r=this.ll();if(!r)throw Error(ot);n=this.pa.Cr(t,e,this.ma,!0,(e=>r(e)))}else n=this.pa.Cr(t,e);let r=yt();return r.ht(n),r}Ua(e){let t=this.wl(e);this.va.set(e,t)}Da(e){if(this.wa===`Custom`&&(this.ma===null||!this.ll()))return;this.va.clear();let t=this.Qt().Et().Ml();for(let n of t){let t=()=>{this.gl(n)},r=typeof window==`object`&&window||typeof self==`object`&&self;r?.Sl?.bl?r.Sl.bl((()=>{t()}),{se:e}):Promise.resolve().then((()=>t()))}}gl(e){if(this.va.has(e)||this.qt.Bh().length===0)return;let t=this.wl(e);this.va.set(e,t)}},Lt=[3],Rt=[0,1,2,3],zt=class{constructor(e){this.yn=e}xl(e,t,n){let r=e;if(this.yn.mode===0)return r;let i=n.Pn(),a=i.Lt();if(a===null)return r;let o=i.Nt(e,a),s=n.Cl().filter((e=>e instanceof It)).reduce(((e,r)=>{if(n.Zs(r)||!r.It())return e;let i=r.Ft(),a=r.Un();if(i.Gi()||!a.ze(t))return e;let o=a.Mh(t);if(o===null)return e;let s=j(r.Lt()),c=this.yn.mode===3?Rt:Lt;return e.concat(c.map((e=>i.Nt(o.Wt[e],s.Wt))))}),[]);if(s.length===0)return r;s.sort(((e,t)=>Math.abs(e-o)-Math.abs(t-o)));let c=s[0];return r=i.Tn(c,a),r}};function H(e,t,n){return Math.min(Math.max(e,t),n)}function Bt(e,t,n){return t-e<=n}var Vt=class extends I{constructor(){super(...arguments),this.qt=null}ht(e){this.qt=e}et({context:e,bitmapSize:t,horizontalPixelRatio:n,verticalPixelRatio:r}){if(this.qt===null)return;let i=Math.max(1,Math.floor(n));e.lineWidth=i,function(e,t){e.save(),e.lineWidth%2&&e.translate(.5,.5),t(),e.restore()}(e,(()=>{let a=A(this.qt);if(a.yl){e.strokeStyle=a.kl,D(e,a.Pl),e.beginPath();for(let r of a.Tl){let a=Math.round(r.Rl*n);e.moveTo(a,-i),e.lineTo(a,t.height+i)}e.stroke()}if(a.Dl){e.strokeStyle=a.Il,D(e,a.Vl),e.beginPath();for(let n of a.Bl){let a=Math.round(n.Rl*r);e.moveTo(-i,a),e.lineTo(t.width+i,a)}e.stroke()}}))}},Ht=class{constructor(e){this.Xt=new Vt,this.xt=!0,this.yt=e}kt(){this.xt=!0}Tt(){if(this.xt){let e=this.yt.Qt().N().grid,t={Dl:e.horzLines.visible,yl:e.vertLines.visible,Il:e.horzLines.color,kl:e.vertLines.color,Vl:e.horzLines.style,Pl:e.vertLines.style,Bl:this.yt.Pn().El(),Tl:(this.yt.Qt().Et().El()||[]).map((e=>({Rl:e.coord})))};this.Xt.ht(t),this.xt=!1}return this.Xt}},Ut=class{constructor(e){this.Yh=new Ht(e)}wr(){return this.Yh}},Wt={Al:4,Ll:1e-4};function U(e,t){let n=100*(e-t)/t;return t<0?-n:n}function Gt(e,t){return new z(U(e.Je(),t),U(e.Qe(),t))}function Kt(e,t){let n=100*(e-t)/t+100;return t<0?-n:n}function qt(e,t){return new z(Kt(e.Je(),t),Kt(e.Qe(),t))}function Jt(e,t){let n=Math.abs(e);if(n<1e-15)return 0;let r=Math.log10(n+t.Ll)+t.Al;return e<0?-r:r}function Yt(e,t){let n=Math.abs(e);if(n<1e-15)return 0;let r=10**(n-t.Al)-t.Ll;return e<0?-r:r}function Xt(e,t){return e===null?null:new z(Jt(e.Je(),t),Jt(e.Qe(),t))}function W(e,t){return e===null?null:new z(Yt(e.Je(),t),Yt(e.Qe(),t))}function Zt(e){if(e===null)return Wt;let t=Math.abs(e.Qe()-e.Je());if(t>=1||t<1e-15)return Wt;let n=Math.ceil(Math.abs(Math.log10(t))),r=Wt.Al+n;return{Al:r,Ll:1/10**r}}var Qt=class{constructor(e,t){if(this.zl=e,this.Ol=t,function(e){if(e<0)return!1;if(e>0xde0b6b3a7640000)return!0;for(let t=e;t>1;t/=10)if(t%10!=0)return!1;return!0}(this.zl))this.Nl=[2,2.5,2];else{this.Nl=[];for(let e=this.zl;e!==1;){if(e%2==0)this.Nl.push(2),e/=2;else{if(e%5!=0)throw Error(`unexpected base`);this.Nl.push(2,2.5),e/=5}if(this.Nl.length>100)throw Error(`something wrong with base`)}}}Fl(e,t,n){let r=this.zl===0?0:1/this.zl,i=10**Math.max(0,Math.ceil(Math.log10(e-t))),a=0,o=this.Ol[0];for(;;){let e=Bt(i,r,1e-14)&&i>r+1e-14,t=Bt(i,n*o,1e-14),s=Bt(i,1,1e-14);if(!(e&&t&&s))break;i/=o,o=this.Ol[++a%this.Ol.length]}if(i<=r+1e-14&&(i=r),i=Math.max(1,i),this.Nl.length>0&&(s=i,c=1,l=1e-14,Math.abs(s-c)<l))for(a=0,o=this.Nl[0];Bt(i,n*o,1e-14)&&i>r+1e-14;)i/=o,o=this.Nl[++a%this.Nl.length];var s,c,l;return i}},$t=class{constructor(e,t,n,r){this.Wl=[],this.Ki=e,this.zl=t,this.Hl=n,this.Ul=r}Fl(e,t){if(e<t)throw Error(`high < low`);let n=this.Ki.$t(),r=(e-t)*this.$l()/n,i=new Qt(this.zl,[2,2.5,2]),a=new Qt(this.zl,[2,2,2.5]),o=new Qt(this.zl,[2.5,2,2]),s=[];return s.push(i.Fl(e,t,r),a.Fl(e,t,r),o.Fl(e,t,r)),function(e){if(e.length<1)throw Error(`array is empty`);let t=e[0];for(let n=1;n<e.length;++n)e[n]<t&&(t=e[n]);return t}(s)}jl(){let e=this.Ki,t=e.Lt();if(t===null)return void(this.Wl=[]);let n=e.$t(),r=this.Hl(n-1,t),i=this.Hl(0,t),a=this.Ki.N().entireTextOnly?this.ql()/2:0,o=a,s=n-1-a,c=Math.max(r,i),l=Math.min(r,i);if(c===l)return void(this.Wl=[]);let u=this.Fl(c,l);if(this.Yl(t,u,c,l,o,s),e.Kl()&&this.Zl(u,l,c)){let e=this.Ki.Gl();this.Xl(t,u,o,s,e,2*e)}let d=this.Wl.map((e=>e.Jl)),f=this.Ki.Ql(d);for(let e=0;e<this.Wl.length;e++)this.Wl[e].io=f[e]}El(){return this.Wl}ql(){return this.Ki.k()}$l(){return Math.ceil(this.ql()*this.Ki.N().tickMarkDensity)}Yl(e,t,n,r,i,a){let o=this.Wl,s=this.Ki,c=n%t;c+=c<0?t:0;let l=n>=r?1:-1,u=null,d=0;for(let f=n-c;f>r;f-=t){let n=this.Ul(f,e,!0);u!==null&&Math.abs(n-u)<this.$l()||n<i||n>a||(d<o.length?(o[d].Rl=n,o[d].io=s.no(f),o[d].Jl=f):o.push({Rl:n,io:s.no(f),Jl:f}),d++,u=n,s.so()&&(t=this.Fl(f*l,r)))}o.length=d}Xl(e,t,n,r,i,a){let o=this.Wl,s=this.eo(e,n,i,a),c=this.eo(e,r,-a,-i),l=this.Ul(0,e,!0)-this.Ul(t,e,!0);o.length>0&&o[0].Rl-s.Rl<l/2&&o.shift(),o.length>0&&c.Rl-o[o.length-1].Rl<l/2&&o.pop(),o.unshift(s),o.push(c)}eo(e,t,n,r){let i=(n+r)/2,a=this.Hl(t+n,e),o=this.Hl(t+r,e),s=Math.min(a,o),c=Math.max(a,o),l=Math.max(.1,this.Fl(c,s)),u=this.Hl(t+i,e),d=u-u%l,f=this.Ul(d,e,!0);return{io:this.Ki.no(d),Rl:f,Jl:d}}Zl(e,t,n){let r=j(this.Ki.ar());return this.Ki.so()&&(r=W(r,this.Ki.ro())),r.Je()-t<e&&n-r.Qe()<e}};function en(e){return e.slice().sort(((e,t)=>A(e.ln())-A(t.ln())))}var tn;(function(e){e[e.Normal=0]=`Normal`,e[e.Logarithmic=1]=`Logarithmic`,e[e.Percentage=2]=`Percentage`,e[e.IndexedTo100=3]=`IndexedTo100`})(tn||={});var nn=new Ue,rn=new He(100,1),an=class{constructor(e,t,n,r,i){this.ho=0,this.ao=null,this.rr=null,this.lo=null,this.oo={_o:!1,uo:null},this.co=!1,this.do=0,this.fo=0,this.po=new M,this.vo=new M,this.mo=[],this.wo=null,this.Mo=null,this.bo=null,this.So=null,this.xo=null,this.il=rn,this.Co=Zt(null),this.yo=e,this.yn=t,this.ko=n,this.Po=r,this.To=i,this.Ro=new $t(this,100,this.Do.bind(this),this.Io.bind(this))}cl(){return this.yo}N(){return this.yn}vr(e){if(N(this.yn,e),this.dl(),e.mode!==void 0&&this.Vo({_e:e.mode}),e.scaleMargins!==void 0){let t=k(e.scaleMargins.top),n=k(e.scaleMargins.bottom);if(t<0||t>1)throw Error(`Invalid top margin - expect value between 0 and 1, given=${t}`);if(n<0||n>1)throw Error(`Invalid bottom margin - expect value between 0 and 1, given=${n}`);if(t+n>1)throw Error(`Invalid margins - sum of margins must be less than 1, given=${t+n}`);this.Bo(),this.bo=null}}Eo(){return this.yn.autoScale}Ao(){return this.co}so(){return this.yn.mode===1}je(){return this.yn.mode===2}Lo(){return this.yn.mode===3}ro(){return this.Co}_e(){return{hs:this.yn.autoScale,zo:this.yn.invertScale,_e:this.yn.mode}}Vo(e){let t=this._e(),n=null;e.hs!==void 0&&(this.yn.autoScale=e.hs),e._e!==void 0&&(this.yn.mode=e._e,e._e!==2&&e._e!==3||(this.yn.autoScale=!0),this.oo._o=!1),t._e===1&&e._e!==t._e&&(function(e,t){if(e===null)return!1;let n=Yt(e.Je(),t),r=Yt(e.Qe(),t);return isFinite(n)&&isFinite(r)}(this.rr,this.Co)?(n=W(this.rr,this.Co),n!==null&&this.Oo(n)):this.yn.autoScale=!0),e._e===1&&e._e!==t._e&&(n=Xt(this.rr,this.Co),n!==null&&this.Oo(n));let r=t._e!==this.yn.mode;r&&(t._e===2||this.je())&&this.dl(),r&&(t._e===3||this.Lo())&&this.dl(),e.zo!==void 0&&t.zo!==e.zo&&(this.yn.invertScale=e.zo,this.No()),this.vo.p(t,this._e())}Fo(){return this.vo}k(){return this.ko.fontSize}$t(){return this.ho}Wo(e){this.ho!==e&&(this.ho=e,this.Bo(),this.bo=null)}Ho(){if(this.ao)return this.ao;let e=this.$t()-this.Uo()-this.$o();return this.ao=e,e}ar(){return this.jo(),this.rr}Oo(e,t){let n=this.rr;(t||n===null&&e!==null||n!==null&&!n.Ge(e))&&(this.bo=null,this.rr=e)}qo(e){this.Oo(e),this.Yo(e!==null)}Gi(){return this.jo(),this.ho===0||!this.rr||this.rr.Gi()}Ko(e){return this.zo()?e:this.$t()-1-e}Nt(e,t){return this.je()?e=U(e,t):this.Lo()&&(e=Kt(e,t)),this.Io(e,t)}Zo(e,t,n){this.jo();let r=this.$o(),i=A(this.ar()),a=i.Je(),o=i.Qe(),s=this.Ho()-1,c=this.zo(),l=s/(o-a),u=n===void 0?0:n.from,d=n===void 0?e.length:n.to,f=this.Go();for(let n=u;n<d;n++){let i=e[n],o=i.Mt;if(isNaN(o))continue;let s=o;f!==null&&(s=f(i.Mt,t));let u=r+l*(s-a);i.ut=c?u:this.ho-1-u}}Xo(e,t,n){this.jo();let r=this.$o(),i=A(this.ar()),a=i.Je(),o=i.Qe(),s=this.Ho()-1,c=this.zo(),l=s/(o-a),u=n===void 0?0:n.from,d=n===void 0?e.length:n.to,f=this.Go();for(let n=u;n<d;n++){let i=e[n],o=i.jr,s=i.qr,u=i.Yr,d=i.Kr;f!==null&&(o=f(i.jr,t),s=f(i.qr,t),u=f(i.Yr,t),d=f(i.Kr,t));let p=r+l*(o-a),m=c?p:this.ho-1-p;i.Jo=m,p=r+l*(s-a),m=c?p:this.ho-1-p,i.Qo=m,p=r+l*(u-a),m=c?p:this.ho-1-p,i.t_=m,p=r+l*(d-a),m=c?p:this.ho-1-p,i.i_=m}}Tn(e,t){let n=this.Do(e,t);return this.n_(n,t)}n_(e,t){let n=e;return this.je()?n=function(e,t){return t<0&&(e=-e),e/100*t+t}(n,t):this.Lo()&&(n=function(e,t){return e-=100,t<0&&(e=-e),e/100*t+t}(n,t)),n}Cl(){return this.mo}Dt(){return this.Mo||=en(this.mo),this.Mo}s_(e){this.mo.indexOf(e)===-1&&(this.mo.push(e),this.dl(),this.e_())}r_(e){let t=this.mo.indexOf(e);if(t===-1)throw Error(`source is not attached to scale`);this.mo.splice(t,1),this.mo.length===0&&(this.Vo({hs:!0}),this.Oo(null)),this.dl(),this.e_()}Lt(){let e=null;for(let t of this.mo){let n=t.Lt();n!==null&&(e===null||n.za<e.za)&&(e=n)}return e===null?null:e.Wt}zo(){return this.yn.invertScale}El(){let e=this.Lt()===null;if(this.bo!==null&&(e||this.bo.h_===e))return this.bo.El;this.Ro.jl();let t=this.Ro.El();return this.bo={El:t,h_:e},this.po.p(),t}a_(){return this.po}l_(e){this.je()||this.Lo()||this.So===null&&this.lo===null&&(this.Gi()||(this.So=this.ho-e,this.lo=A(this.ar()).Xe()))}o_(e){if(this.je()||this.Lo()||this.So===null)return;this.Vo({hs:!1}),(e=this.ho-e)<0&&(e=0);let t=(this.So+.2*(this.ho-1))/(e+.2*(this.ho-1)),n=A(this.lo).Xe();t=Math.max(t,.1),n.ir(t),this.Oo(n)}__(){this.je()||this.Lo()||(this.So=null,this.lo=null)}u_(e){this.Eo()||this.xo===null&&this.lo===null&&(this.Gi()||(this.xo=e,this.lo=A(this.ar()).Xe()))}c_(e){if(this.Eo()||this.xo===null)return;let t=A(this.ar()).tr()/(this.Ho()-1),n=e-this.xo;this.zo()&&(n*=-1);let r=n*t,i=A(this.lo).Xe();i.nr(r),this.Oo(i,!0),this.bo=null}d_(){this.Eo()||this.xo!==null&&(this.xo=null,this.lo=null)}tl(){return this.il||this.dl(),this.il}Ji(e,t){switch(this.yn.mode){case 2:return this.f_(U(e,t));case 3:return this.tl().format(Kt(e,t));default:return this.cr(e)}}no(e){switch(this.yn.mode){case 2:return this.f_(e);case 3:return this.tl().format(e);default:return this.cr(e)}}Ql(e){switch(this.yn.mode){case 2:return this.p_(e);case 3:return this.tl().formatTickmarks(e);default:return this.v_(e)}}xa(e){return this.cr(e,A(this.wo).tl())}Ca(e,t){return e=U(e,t),this.f_(e,nn)}m_(){return this.mo}w_(e){this.oo={uo:e,_o:!1}}Nn(){this.mo.forEach((e=>e.Nn()))}Kl(){return this.yn.ensureEdgeTickMarksVisible&&this.Eo()}Gl(){return this.k()/2}dl(){this.bo=null;let e=1/0;this.wo=null;for(let t of this.mo)t.ln()<e&&(e=t.ln(),this.wo=t);let t=100;this.wo!==null&&(t=Math.round(this.wo.Kh())),this.il=rn,this.je()?(this.il=nn,t=100):this.Lo()?(this.il=new He(100,1),t=100):this.wo!==null&&(this.il=this.wo.tl()),this.Ro=new $t(this,t,this.Do.bind(this),this.Io.bind(this)),this.Ro.jl()}e_(){this.Mo=null}M_(){return this.wo===null||this.je()||this.Lo()?1:1/this.wo.Kh()}Xi(){return this.To}Yo(e){this.co=e}Uo(){return this.zo()?this.yn.scaleMargins.bottom*this.$t()+this.fo:this.yn.scaleMargins.top*this.$t()+this.do}$o(){return this.zo()?this.yn.scaleMargins.top*this.$t()+this.do:this.yn.scaleMargins.bottom*this.$t()+this.fo}jo(){this.oo._o||(this.oo._o=!0,this.g_())}Bo(){this.ao=null}Io(e,t){if(this.jo(),this.Gi())return 0;e=this.so()&&e?Jt(e,this.Co):e;let n=A(this.ar()),r=this.$o()+(this.Ho()-1)*(e-n.Je())/n.tr();return this.Ko(r)}Do(e,t){if(this.jo(),this.Gi())return 0;let n=this.Ko(e),r=A(this.ar()),i=r.Je()+r.tr()*((n-this.$o())/(this.Ho()-1));return this.so()?Yt(i,this.Co):i}No(){this.bo=null,this.Ro.jl()}g_(){if(this.Ao()&&!this.Eo())return;let e=this.oo.uo;if(e===null)return;let t=null,n=this.m_(),r=0,i=0;for(let a of n){if(!a.It())continue;let n=a.Lt();if(n===null)continue;let o=a.la(e.Oa(),e.bi()),s=o&&o.ar();if(s!==null){switch(this.yn.mode){case 1:s=Xt(s,this.Co);break;case 2:s=Gt(s,n.Wt);break;case 3:s=qt(s,n.Wt)}if(t=t===null?s:t.Ss(A(s)),o!==null){let e=o.lr();e!==null&&(r=Math.max(r,e.above),i=Math.max(i,e.below))}}}if(this.Kl()&&(r=Math.max(r,this.Gl()),i=Math.max(i,this.Gl())),r===this.do&&i===this.fo||(this.do=r,this.fo=i,this.bo=null,this.Bo()),t!==null){if(t.Je()===t.Qe()){let e=5*this.M_();this.so()&&(t=W(t,this.Co)),t=new z(t.Je()-e,t.Qe()+e),this.so()&&(t=Xt(t,this.Co))}if(this.so()){let e=W(t,this.Co),n=Zt(e);if(a=n,o=this.Co,a.Al!==o.Al||a.Ll!==o.Ll){let r=this.lo===null?null:W(this.lo,this.Co);this.Co=n,t=Xt(e,n),r!==null&&(this.lo=Xt(r,n))}}this.Oo(t)}else this.rr===null&&(this.Oo(new z(-.5,.5)),this.Co=Zt(null));var a,o}Go(){return this.je()?U:this.Lo()?Kt:this.so()?e=>Jt(e,this.Co):null}b_(e,t,n){return t===void 0?(n===void 0&&(n=this.tl()),n.format(e)):t(e)}S_(e,t,n){return t===void 0?(n===void 0&&(n=this.tl()),n.formatTickmarks(e)):t(e)}cr(e,t){return this.b_(e,this.Po.priceFormatter,t)}v_(e,t){let n=this.Po.priceFormatter;return this.S_(e,this.Po.tickmarksPriceFormatter??(n?e=>e.map(n):void 0),t)}f_(e,t){return this.b_(e,this.Po.percentageFormatter,t)}p_(e,t){let n=this.Po.percentageFormatter;return this.S_(e,this.Po.tickmarksPercentageFormatter??(n?e=>e.map(n):void 0),t)}};function on(e){return e instanceof It}var sn=class{constructor(e,t){this.mo=[],this.x_=new Map,this.ho=0,this.C_=0,this.y_=1,this.Mo=null,this.k_=null,this.P_=!1,this.T_=new M,this.fa=[],this.ia=e,this.sn=t,this.R_=new Ut(this);let n=t.N();this.D_=this.I_(`left`,n.leftPriceScale),this.V_=this.I_(`right`,n.rightPriceScale),this.D_.Fo().i(this.B_.bind(this,this.D_),this),this.V_.Fo().i(this.B_.bind(this,this.V_),this),this.E_(n)}E_(e){if(e.leftPriceScale&&this.D_.vr(e.leftPriceScale),e.rightPriceScale&&this.V_.vr(e.rightPriceScale),e.localization&&(this.D_.dl(),this.V_.dl()),e.overlayPriceScales){let t=Array.from(this.x_.values());for(let n of t){let t=A(n[0].Ft());t.vr(e.overlayPriceScales),e.localization&&t.dl()}}}A_(e){switch(e){case`left`:return this.D_;case`right`:return this.V_}return this.x_.has(e)?k(this.x_.get(e))[0].Ft():null}m(){this.Qt().L_().u(this),this.D_.Fo().u(this),this.V_.Fo().u(this),this.mo.forEach((e=>{e.m&&e.m()})),this.fa=this.fa.filter((e=>{let t=e.Qh();return t.detached&&t.detached(),!1})),this.T_.p()}z_(){return this.y_}O_(e){this.y_=e}Qt(){return this.sn}nn(){return this.C_}$t(){return this.ho}N_(e){this.C_=e,this.F_()}Wo(e){this.ho=e,this.D_.Wo(e),this.V_.Wo(e),this.mo.forEach((t=>{if(this.Zs(t)){let n=t.Ft();n!==null&&n.Wo(e)}})),this.F_()}W_(e){this.P_=e}H_(){return this.P_}U_(){return this.mo.filter(on)}Cl(){return this.mo}Zs(e){let t=e.Ft();return t===null||this.D_!==t&&this.V_!==t}s_(e,t,n){this.j_(e,t,n?e.ln():this.mo.length)}r_(e,t){let n=this.mo.indexOf(e);O(n!==-1,`removeDataSource: invalid data source`),this.mo.splice(n,1),t||this.mo.forEach(((e,t)=>e._n(t)));let r=A(e.Ft()).cl();if(this.x_.has(r)){let t=k(this.x_.get(r)),n=t.indexOf(e);n!==-1&&(t.splice(n,1),t.length===0&&this.x_.delete(r))}let i=e.Ft();i&&i.Cl().indexOf(e)>=0&&(i.r_(e),this.q_(i)),this.Y_()}Xs(e){return e===this.D_?`left`:e===this.V_?`right`:`overlay`}K_(){return this.D_}Z_(){return this.V_}G_(e,t){e.l_(t)}X_(e,t){e.o_(t),this.F_()}J_(e){e.__()}Q_(e,t){e.u_(t)}tu(e,t){e.c_(t),this.F_()}iu(e){e.d_()}F_(){this.mo.forEach((e=>{e.Nn()}))}Pn(){let[e,t]=this.nu(),n=null;return e.N().visible&&e.Cl().length!==0?n=e:t.N().visible&&t.Cl().length!==0?n=t:this.mo.length!==0&&(n=this.mo[0].Ft()),n===null&&(n=this.Gs()??e),n}Gs(){let[e,t]=this.nu();return e.N().visible?e:t.N().visible?t:null}q_(e){e!==null&&e.Eo()&&this.su(e)}eu(e){let t=this.ia.Ee();e.Vo({hs:!0}),t!==null&&e.w_(t),this.F_()}ru(){this.su(this.D_),this.su(this.V_)}hu(){this.q_(this.D_),this.q_(this.V_),this.mo.forEach((e=>{this.Zs(e)&&this.q_(e.Ft())})),this.F_(),this.sn.mr()}Dt(){return this.Mo===null&&(this.Mo=en(this.mo)),this.Mo}au(){let e=this.Dt(),t=this.sn.ou()?.lu,n=this.sn.N().hoveredSeriesOnTop,r=this.k_;if(r!==null&&r.Kh===e&&r._u===t&&r.uu===n)return r.cu;let i=function(e,t,n){if(!n)return e;let r=e.indexOf(t);if(r===-1||r===e.length-1)return e;let i=[];for(let t=0;t<e.length;t++)t!==r&&i.push(e[t]);return i.push(e[r]),i}(e,t,n);return this.k_={Kh:e,_u:t,uu:n,cu:i},i}du(e,t){t=H(t,0,this.mo.length-1);let n=this.mo.indexOf(e);O(n!==-1,`setSeriesOrder: invalid data source`),this.mo.splice(n,1),this.mo.splice(t,0,e),this.mo.forEach(((e,t)=>e._n(t))),this.Y_();for(let e of[this.D_,this.V_])e.e_(),e.dl();this.sn.mr()}Vt(){return this.Dt().filter(on)}fu(){return this.T_}pu(){return this.R_}hl(e){this.fa.push(new wt(e))}al(e){this.fa=this.fa.filter((t=>t.Qh()!==e)),e.detached&&e.detached(),this.sn.mr()}vu(){return this.fa}Ja(e,t){return this.fa.map((n=>n.Qs(e,t))).filter((e=>e!==null))}su(e){let t=e.m_();if(t&&t.length>0&&!this.ia.Gi()){let t=this.ia.Ee();t!==null&&e.w_(t)}e.Nn()}j_(e,t,n){let r=this.A_(t);if(r===null&&(r=this.I_(t,this.sn.N().overlayPriceScales)),this.mo.splice(n,0,e),!ze(t)){let n=this.x_.get(t)||[];n.push(e),this.x_.set(t,n)}e._n(n),r.s_(e),e.un(r),this.q_(r),this.Y_()}Y_(){this.Mo=null,this.k_=null}nu(){return this.sn.N().defaultVisiblePriceScaleId===`left`?[this.D_,this.V_]:[this.V_,this.D_]}B_(e,t,n){t._e!==n._e&&this.su(e)}I_(e,t){let n=new an(e,{visible:!0,autoScale:!0,...F(t)},this.sn.N().layout,this.sn.N().localization,this.sn.Xi());return n.Wo(this.$t()),n}};function cn(e,t){return t===null||e.se===2&&t.se!==2||(t.se!==2||e.se===2)&&e.ne!==t.ne&&e.ne<t.ne}function ln(e){return{te:e.te,ie:e.ie}}function un(e){return{ne:e.distance??0,se:e.hitTestPriority??(e.itemType===`marker`?2:0),ee:e.itemType??`primitive`,mu:e.cursorStyle,te:e.externalId}}function dn(e){return{lu:e.lu,wu:ln(e.Mu),mu:e.Mu.mu,ee:e.Mu.ee??`primitive`}}function fn(e,t,n,r){let i=null;for(let a of e){let e=a.Qs?.(t,n,r)??null;if(e===null){let i=a.Tt(r);e=i!==null&&i.Qs?i.Qs(t,n):null}if(e!==null){let t={gu:a,Mu:e};(i===null||cn(t.Mu,i.Mu))&&(i=t)}}return i}function pn(e){return e.jn!==void 0}function mn(e,t,n){let r=[e,...e.Dt()].reverse(),i=function(e,t,n){let r,i,a;for(let c of e){let e=c.Ja?.(t,n)??[];for(let t of e){let e=un(t);o=t.zOrder,s=r?.zOrder,(!s||o===`top`&&s!==`top`||o===`normal`&&s===`bottom`||t.zOrder===r?.zOrder&&i!==void 0&&cn(e,i)||t.zOrder===r?.zOrder&&i===void 0)&&(r=t,i=e,a=c)}}var o,s;return r&&a&&i?{Mu:i,bu:r,lu:a}:null}(r,t,n);if(i?.bu.zOrder===`top`)return dn(i);let a=null,o=null;for(let s of r){if(i&&i.lu===s&&i.bu.zOrder!==`bottom`&&!i.bu.isBackground)return a??dn(i);if(pn(s)){let r=fn(s.jn(e),t,n,e);if(r!==null){let e={lu:s,gu:r.gu,wu:ln(r.Mu),mu:r.Mu.mu,ee:r.Mu.ee??`primitive`};(a===null||cn(r.Mu,o))&&(a=e,o=r.Mu)}}if(i&&i.lu===s&&i.bu.zOrder!==`bottom`&&i.bu.isBackground)return a??dn(i)}return a===null?i?.bu?dn(i):null:a}var hn=class{constructor(e,t,n=50){this.Vs=0,this.Bs=1,this.Es=1,this.Ls=new Map,this.As=new Map,this.Su=e,this.xu=t,this.zs=n}Cu(e){let t=e.time,n=this.xu.cacheKey(t),r=this.Ls.get(n);if(r!==void 0)return r.yu;if(this.Vs===this.zs){let e=this.As.get(this.Es);this.As.delete(this.Es),this.Ls.delete(k(e)),this.Es++,this.Vs--}let i=this.Su(e);return this.Ls.set(n,{yu:i,Ws:this.Bs}),this.As.set(this.Bs,n),this.Vs++,this.Bs++,i}},gn=class{constructor(e,t){O(e<=t,`right should be >= left`),this.ku=e,this.Pu=t}Oa(){return this.ku}bi(){return this.Pu}Tu(){return this.Pu-this.ku+1}ze(e){return this.ku<=e&&e<=this.Pu}Ge(e){return this.ku===e.Oa()&&this.Pu===e.bi()}};function _n(e,t){return e===null||t===null?e===t:e.Ge(t)}var vn=class{constructor(){this.Ru=new Map,this.Ls=null,this.Du=!1}Iu(e){this.Du=e,this.Ls=null}Vu(e,t){this.Bu(t),this.Ls=null;for(let n=t;n<e.length;++n){let t=e[n],r=this.Ru.get(t.timeWeight);r===void 0&&(r=[],this.Ru.set(t.timeWeight,r)),r.push({index:n,time:t.time,weight:t.timeWeight,originalTime:t.originalTime})}}Eu(e,t,n,r,i){let a=Math.ceil(t/e);return this.Ls!==null&&this.Ls.Au===a&&i===this.Ls.Lu&&n===this.Ls.zu||(this.Ls={Lu:i,zu:n,El:this.Ou(a,n,r),Au:a}),this.Ls.El}Bu(e){if(e===0)return void this.Ru.clear();let t=[];this.Ru.forEach(((n,r)=>{e<=n[0].index?t.push(r):n.splice(B(n,e,(t=>t.index<e)),1/0)}));for(let e of t)this.Ru.delete(e)}Ou(e,t,n){let r=[],i=e=>!t||n.has(e.index);for(let t of Array.from(this.Ru.keys()).sort(((e,t)=>t-e))){if(!this.Ru.get(t))continue;let n=r;r=[];let a=n.length,o=0,s=k(this.Ru.get(t)),c=s.length,l=1/0,u=-1/0;for(let t=0;t<c;t++){let c=s[t],d=c.index;for(;o<a;){let e=n[o],t=e.index;if(!(t<d&&i(e))){l=t;break}o++,r.push(e),u=t,l=1/0}if(l-d>=e&&d-u>=e&&i(c))r.push(c),u=d;else if(this.Du)return n}for(;o<a;o++)i(n[o])&&r.push(n[o])}return r}},yn=class e{constructor(e){this.Nu=e}Fu(){return this.Nu===null?null:new gn(Math.floor(this.Nu.Oa()),Math.ceil(this.Nu.bi()))}Wu(){return this.Nu}static Hu(){return new e(null)}};function bn(e,t){return e.weight>t.weight?e:t}var xn=class{constructor(e,t,n,r){this.C_=0,this.Uu=null,this.$u=[],this.xo=null,this.So=null,this.ju=new vn,this.qu=new Map,this.Yu=yn.Hu(),this.Ku=!0,this.Zu=new M,this.Gu=new M,this.Xu=new M,this.Ju=null,this.Qu=null,this.tc=new Map,this.nc=-1,this.sc=[],this.ec=1,this.yn=t,this.Po=n,this.rc=t.rightOffset,this.hc=t.barSpacing,this.sn=e,this.ac(t),this.xu=r,this.lc(),this.ju.Iu(t.uniformDistribution),this.oc(),this._c()}N(){return this.yn}uc(e){N(this.Po,e),this.cc(),this.lc()}vr(e,t){N(this.yn,e),this.yn.fixLeftEdge&&this.dc(),this.yn.fixRightEdge&&this.fc(),e.barSpacing!==void 0&&this.sn.Ms(e.barSpacing),e.rightOffset!==void 0&&this.sn.gs(e.rightOffset),this.ac(e),e.minBarSpacing===void 0&&e.maxBarSpacing===void 0||this.sn.Ms(e.barSpacing??this.hc),e.ignoreWhitespaceIndices!==void 0&&e.ignoreWhitespaceIndices!==this.yn.ignoreWhitespaceIndices&&this._c(),this.cc(),this.lc(),e.enableConflation===void 0&&e.conflationThresholdFactor===void 0||this.oc(),this.Xu.p()}Rn(e){return this.$u[e]?.time??null}en(e){return this.$u[e]??null}vc(e,t){if(this.$u.length<1)return null;if(this.xu.key(e)>this.xu.key(this.$u[this.$u.length-1].time))return t?this.$u.length-1:null;let n=B(this.$u,this.xu.key(e),((e,t)=>this.xu.key(e.time)<t));return this.xu.key(e)<this.xu.key(this.$u[n].time)?t?n:null:n}Gi(){return this.C_===0||this.$u.length===0||this.Uu===null}mc(){return this.$u.length>0}Ee(){return this.wc(),this.Yu.Fu()}Mc(){return this.wc(),this.Yu.Wu()}gc(){let e=this.Ee();if(e===null)return null;let t={from:e.Oa(),to:e.bi()};return this.bc(t)}bc(e){let t=Math.round(e.from),n=Math.round(e.to),r=A(this.Sc()),i=A(this.xc());return{from:A(this.en(Math.max(r,t))),to:A(this.en(Math.min(i,n)))}}Cc(e){return{from:A(this.vc(e.from,!0)),to:A(this.vc(e.to,!0))}}nn(){return this.C_}N_(e){if(!isFinite(e)||e<=0||this.C_===e)return;let t=this.Mc(),n=this.C_;if(this.C_=e,this.Ku=!0,this.yn.lockVisibleTimeRangeOnResize&&n!==0){let t=this.hc*e/n;this.hc=t}if(this.yn.fixLeftEdge&&t!==null&&t.Oa()<=0){let t=n-e;this.rc-=Math.round(t/this.hc)+1,this.Ku=!0}this.yc(),this.kc()}jt(e){if(this.Gi()||!se(e))return 0;let t=this.Pc()+this.rc-e;return this.C_-(t+.5)*this.hc-1}Tc(e,t){let n=this.Pc(),r=t===void 0?0:t.from,i=t===void 0?e.length:t.to;for(let t=r;t<i;t++){let r=e[t].wt,i=n+this.rc-r,a=this.C_-(i+.5)*this.hc-1;e[t]._t=a}}Rc(e,t){let n=Math.ceil(this.Dc(e));return t&&this.yn.ignoreWhitespaceIndices&&!this.Ic(n)?this.Vc(n):n}gs(e){this.Ku=!0,this.rc=e,this.kc(),this.sn.Bc(),this.sn.mr()}fl(){return this.hc}Ms(e){let t=this.hc;if(this.Ec(e),this.yn.rightOffsetPixels!==void 0&&t!==0){let e=this.rc*t/this.hc;this.rc=e}this.kc(),this.sn.Bc(),this.sn.mr()}Ac(){return this.rc}El(){if(this.Gi())return null;if(this.Qu!==null)return this.Qu;let e=this.hc,t=5*(this.sn.N().layout.fontSize+4)/8*(this.yn.tickMarkMaxCharacterLength||8),n=Math.round(t/e),r=A(this.Ee()),i=Math.max(r.Oa(),r.Oa()-n),a=Math.max(r.bi(),r.bi()-n),o=this.ju.Eu(e,t,this.yn.ignoreWhitespaceIndices,this.tc,this.nc),s=this.Sc()+n,c=this.xc()-n,l=this.Lc(),u=this.yn.fixLeftEdge||l,d=this.yn.fixRightEdge||l,f=0;for(let e of o){if(!(i<=e.index&&e.index<=a))continue;let n;f<this.sc.length?(n=this.sc[f],n.coord=this.jt(e.index),n.label=this.zc(e),n.weight=e.weight):(n={needAlignCoordinate:!1,coord:this.jt(e.index),label:this.zc(e),weight:e.weight},this.sc.push(n)),this.hc>t/2&&!l?n.needAlignCoordinate=!1:n.needAlignCoordinate=u&&e.index<=s||d&&e.index>=c,f++}return this.sc.length=f,this.Qu=this.sc,this.sc}Oc(){let e;this.Ku=!0,this.Ms(this.yn.barSpacing),e=this.yn.rightOffsetPixels===void 0?this.yn.rightOffset:this.yn.rightOffsetPixels/this.fl(),this.gs(e)}Nc(e){this.Ku=!0,this.Uu=e,this.kc(),this.dc()}Fc(e,t){let n=this.Dc(e),r=this.fl(),i=r+r/10*t;this.Ms(i),this.yn.rightBarStaysOnScroll||this.gs(this.Ac()+(n-this.Dc(e)))}l_(e){this.xo&&this.d_(),this.So===null&&this.Ju===null&&(this.Gi()||(this.So=e,this.Wc()))}o_(e){if(this.Ju===null)return;let t=H(this.C_-e,0,this.C_),n=H(this.C_-A(this.So),0,this.C_);t!==0&&n!==0&&this.Ms(this.Ju.fl*t/n)}__(){this.So!==null&&(this.So=null,this.Hc())}u_(e){this.xo===null&&this.Ju===null&&(this.Gi()||(this.xo=e,this.Wc()))}c_(e){if(this.xo===null)return;let t=(this.xo-e)/this.fl();this.rc=A(this.Ju).Ac+t,this.Ku=!0,this.kc()}d_(){this.xo!==null&&(this.xo=null,this.Hc())}Uc(){this.$c(this.yn.rightOffset)}$c(e,t=400){if(!isFinite(e))throw RangeError(`offset is required and must be finite number`);if(!isFinite(t)||t<=0)throw RangeError(`animationDuration (optional) must be finite positive number`);let n=this.rc,r=performance.now();this.sn.ps({jc:e=>(e-r)/t>=1,qc:i=>{let a=(i-r)/t;return a>=1?e:n+(e-n)*a}})}kt(e,t){this.Ku=!0,this.$u=e,this.ju.Vu(e,t),this.kc()}Yc(){return this.Zu}Kc(){return this.Gu}Zc(){return this.Xu}Pc(){return this.Uu||0}Gc(e,t){let n=e.Tu(),r=t&&this.yn.rightOffsetPixels||0;this.Ec((this.C_-r)/n),this.rc=e.bi()-this.Pc(),t&&(this.rc=r?r/this.fl():this.yn.rightOffset),this.kc(),this.Ku=!0,this.sn.Bc(),this.sn.mr()}Xc(){let e=this.Sc(),t=this.xc();if(e===null||t===null)return;let n=!this.yn.rightOffsetPixels&&this.yn.rightOffset||0;this.Gc(new gn(e,t+n),!0)}Jc(e){let t=new gn(e.from,e.to);this.Gc(t)}rn(e){return this.Po.timeFormatter===void 0?this.xu.formatHorzItem(e.time):this.Po.timeFormatter(e.originalTime)}_c(){if(!this.yn.ignoreWhitespaceIndices)return;this.tc.clear();let e=this.sn.Jn();for(let t of e)for(let e of t.ul())this.tc.set(e,!0);this.nc++}Qc(){return this.ec}Ml(){let e=1/(window.devicePixelRatio||1),t=this.yn.minBarSpacing;if(t>=e)return[1];let n=[1],r=2;for(;r<=512;)t<e/r&&n.push(r),r*=2;return n}Lc(){let e=this.sn.N().handleScroll,t=this.sn.N().handleScale;return!(e.horzTouchDrag||e.mouseWheel||e.pressedMouseMove||e.vertTouchDrag||t.axisDoubleClickReset.time||t.axisPressedMouseMove.time||t.mouseWheel||t.pinch)}Sc(){return this.$u.length===0?null:0}xc(){return this.$u.length===0?null:this.$u.length-1}td(e){return(this.C_-1-e)/this.hc}Dc(e){let t=this.td(e),n=this.Pc()+this.rc-t;return Math.round(1e6*n)/1e6}Ec(e){let t=this.hc;this.hc=e,this.yc(),t!==this.hc&&(this.Ku=!0,this.nd(),this.oc())}wc(){if(!this.Ku)return;if(this.Ku=!1,this.Gi())return void this.sd(yn.Hu());let e=this.Pc(),t=this.C_/this.hc,n=this.rc+e,r=new gn(n-t+1,n);this.sd(new yn(r))}yc(){let e=H(this.hc,this.ed(),this.rd());this.hc!==e&&(this.hc=e,this.Ku=!0)}rd(){return this.yn.maxBarSpacing>0?this.yn.maxBarSpacing:.5*this.C_}ed(){return this.yn.fixLeftEdge&&this.yn.fixRightEdge&&this.$u.length!==0?this.C_/this.$u.length:this.yn.minBarSpacing}oc(){if(!this.yn.enableConflation)return void(this.ec=1);let e=1/(window.devicePixelRatio||1)*(this.yn.conflationThresholdFactor??1);if(this.hc>=e)return void(this.ec=1);let t=e/this.hc,n=2**Math.floor(Math.log2(t));this.ec=Math.min(n,512)}kc(){let e=this.hd();e!==null&&this.rc<e&&(this.rc=e,this.Ku=!0);let t=this.ad();this.rc>t&&(this.rc=t,this.Ku=!0)}hd(){let e=this.Sc(),t=this.Uu;return e===null||t===null?null:e-t-1+(this.yn.fixLeftEdge?this.C_/this.hc:Math.min(2,this.$u.length))}ad(){return this.yn.fixRightEdge?0:this.C_/this.hc-Math.min(2,this.$u.length)}Wc(){this.Ju={fl:this.fl(),Ac:this.Ac()}}Hc(){this.Ju=null}zc(e){let t=this.qu.get(e.weight);return t===void 0&&(t=new hn((e=>this.ld(e)),this.xu),this.qu.set(e.weight,t)),t.Cu(e)}ld(e){return this.xu.formatTickmark(e,this.Po)}sd(e){let t=this.Yu;this.Yu=e,_n(t.Fu(),this.Yu.Fu())||this.Zu.p(),_n(t.Wu(),this.Yu.Wu())||this.Gu.p(),this.nd()}nd(){this.Qu=null}cc(){this.nd(),this.qu.clear()}lc(){this.xu.updateFormatter(this.Po)}dc(){if(!this.yn.fixLeftEdge)return;let e=this.Sc();if(e===null)return;let t=this.Ee();if(t===null)return;let n=t.Oa()-e;if(n<0){let e=this.rc-n-1;this.gs(e)}this.yc()}fc(){this.kc(),this.yc()}Ic(e){return!this.yn.ignoreWhitespaceIndices||this.tc.get(e)||!1}Vc(e){let t=function*(e){let t=Math.round(e),n=t<e,r=1;for(;;)n?(yield t+r,yield t-r):(yield t-r,yield t+r),r++}(e),n=this.xc();for(;n;){let e=t.next().value;if(this.tc.get(e))return e;if(e<0||e>n)break}return e}ac(e){if(e.rightOffsetPixels!==void 0){let t=e.rightOffsetPixels/(e.barSpacing||this.hc);this.sn.gs(t)}}},Sn,Cn,wn,Tn,En;(function(e){e[e.OnTouchEnd=0]=`OnTouchEnd`,e[e.OnNextTap=1]=`OnNextTap`})(Sn||={});var Dn=class{constructor(e,t,n){this.od=[],this._d=[],this.ud=null,this.C_=0,this.dd=null,this.fd=new M,this.pd=new M,this.vd=null,this.md=e,this.yn=t,this.xu=n,this.To=new _e(this.yn.layout.colorParsers),this.wd=new me(this),this.ia=new xn(this,t.timeScale,this.yn.localization,n),this.Ct=new Re(this,t.crosshair),this.Md=new zt(t.crosshair),t.addDefaultPane&&(this.gd(0),this.od[0].O_(2)),this.bd=this.Sd(0),this.xd=this.Sd(1)}Pa(){this.Cd(L.ys())}mr(){this.Cd(L.Cs())}qa(){this.Cd(new L(1))}Ta(e){let t=this.yd(e);this.Cd(t)}ou(){return this.dd}kd(e){if(this.dd?.lu===e?.lu&&this.dd?.wu?.te===e?.wu?.te&&this.dd?.wu?.ie===e?.wu?.ie&&this.dd?.mu===e?.mu&&this.dd?.ee===e?.ee)return;let t=this.dd;this.dd=e,t!==null&&this.Ta(t.lu),e!==null&&e.lu!==t?.lu&&this.Ta(e.lu)}N(){return this.yn}vr(e){N(this.yn,e),this.od.forEach((t=>t.E_(e))),e.timeScale!==void 0&&this.ia.vr(e.timeScale),e.localization!==void 0&&this.ia.uc(e.localization),(e.leftPriceScale||e.rightPriceScale)&&this.fd.p(),this.bd=this.Sd(0),this.xd=this.Sd(1),this.Pa()}Pd(e,t,n=0){let r=this.od[n];if(r===void 0)return;if(e===`left`)return N(this.yn,{leftPriceScale:t}),r.E_({leftPriceScale:t}),this.fd.p(),void this.Pa();if(e===`right`)return N(this.yn,{rightPriceScale:t}),r.E_({rightPriceScale:t}),this.fd.p(),void this.Pa();let i=this.Td(e,n);i!==null&&(i.Ft.vr(t),this.fd.p())}Td(e,t){let n=this.od[t];if(n===void 0)return null;let r=n.A_(e);return r===null?null:{Kn:n,Ft:r}}Et(){return this.ia}Zn(){return this.od}Rd(){return this.Ct}Dd(){return this.pd}Id(e,t){e.Wo(t),this.Bc()}N_(e){this.C_=e,this.ia.N_(this.C_),this.od.forEach((t=>t.N_(e))),this.Bc()}Vd(e){this.od.length!==1&&(O(e>=0&&e<this.od.length,`Invalid pane index`),this.od.splice(e,1),this.Pa())}Bd(e,t){if(this.od.length<2)return;O(e>=0&&e<this.od.length,`Invalid pane index`);let n=this.od[e],r=this.od.reduce(((e,t)=>e+t.z_()),0),i=this.od.reduce(((e,t)=>e+t.$t()),0),a=i-30*(this.od.length-1);t=Math.min(a,Math.max(30,t));let o=r/i,s=n.$t();n.O_(t*o);let c=t-s,l=this.od.length-1;for(let e of this.od)if(e!==n){let t=Math.min(a,Math.max(30,e.$t()-c/l));c-=e.$t()-t,--l;let n=t*o;e.O_(n)}this.Pa()}Ed(e,t){O(e>=0&&e<this.od.length&&t>=0&&t<this.od.length,`Invalid pane index`);let n=this.od[e],r=this.od[t];this.od[e]=r,this.od[t]=n,this.Pa()}Ad(e,t){if(O(e>=0&&e<this.od.length&&t>=0&&t<this.od.length,`Invalid pane index`),e===t)return;let[n]=this.od.splice(e,1);this.od.splice(t,0,n),this.Pa()}G_(e,t,n){e.G_(t,n)}X_(e,t,n){e.X_(t,n),this.Ra(),this.Cd(this.Ld(e,2))}J_(e,t){e.J_(t),this.Cd(this.Ld(e,2))}Q_(e,t,n){t.Eo()||e.Q_(t,n)}tu(e,t,n){t.Eo()||(e.tu(t,n),this.Ra(),this.Cd(this.Ld(e,2)))}iu(e,t){t.Eo()||(e.iu(t),this.Cd(this.Ld(e,2)))}eu(e,t){e.eu(t),this.Cd(this.Ld(e,2))}zd(e){this.ia.l_(e)}Od(e,t){let n=this.Et();if(n.Gi()||t===0)return;let r=n.nn();e=Math.max(1,Math.min(e,r)),n.Fc(e,t),this.Bc()}Nd(e){this.Fd(0),this.Wd(e),this.Hd()}Ud(e){this.ia.o_(e),this.Bc()}$d(){this.ia.__(),this.mr()}Fd(e){this.ia.u_(e)}Wd(e){this.ia.c_(e),this.Bc()}Hd(){this.ia.d_(),this.mr()}Jn(){return this._d}Wn(){return this.ud===null&&(this.ud=this._d.filter((e=>e.It()))),this.ud}ka(){this.ud=null}jd(e,t,n,r,i){this.Ct.In(e,t);let a=NaN,o=this.ia.Rc(e,!0),s=this.ia.Ee();s!==null&&(o=Math.min(Math.max(s.Oa(),o),s.bi())),o=this.Ct.Fn(o);let c=r.Pn(),l=c.Lt();if(l!==null&&(a=c.Tn(t,l)),a=this.Md.xl(a,o,r),this.Ct.An(o,a,r),this.qa(),!i){let i=mn(r,e,t);this.kd(i&&{lu:i.lu,wu:i.wu,mu:i.mu||null,ee:i.ee}),this.pd.p(this.Ct.Bt(),{x:e,y:t},n)}}qd(e,t,n){let r=n.Pn(),i=r.Lt(),a=r.Nt(e,A(i)),o=this.ia.vc(t,!0),s=this.ia.jt(A(o));this.jd(s,a,null,n,!0)}Yd(e){this.Rd().zn(),this.qa(),e||this.pd.p(null,null,null)}Ra(){let e=this.Ct.Kn();if(e!==null){let t=this.Ct.Bn(),n=this.Ct.En();this.jd(t,n,null,e)}this.Ct.Nn()}Kd(e,t,n){let r=this.ia.Rn(0);t!==void 0&&n!==void 0&&this.ia.kt(t,n);let i=this.ia.Rn(0),a=this.ia.Pc(),o=this.ia.Ee();if(o!==null&&r!==null&&i!==null){let t=o.ze(a),s=this.xu.key(r)>this.xu.key(i),c=e!==null&&e>a&&!s,l=this.ia.N().allowShiftVisibleRangeOnWhitespaceReplacement,u=t&&(n!==void 0||l)&&this.ia.N().shiftVisibleRangeOnNewBar;if(c&&!u){let t=e-a;this.ia.gs(this.ia.Ac()-t)}}this.ia.Nc(e)}Va(e){e!==null&&e.hu()}Ks(e){if(function(e){return e instanceof sn}(e))return e;let t=this.od.find((t=>t.Dt().includes(e)));return t===void 0?null:t}Bc(){this.od.forEach((e=>e.hu())),this.Ra()}m(){this.od.forEach((e=>e.m())),this.od.length=0,this.yn.localization.priceFormatter=void 0,this.yn.localization.percentageFormatter=void 0,this.yn.localization.timeFormatter=void 0}Zd(){return this.wd}Js(){return this.wd.N()}L_(){return this.fd}Gd(e,t){let n=this.gd(t);this.Xd(e,n),this._d.push(e),this.ka(),this._d.length===1?this.Pa():this.mr()}Jd(e){let t=this.Ks(e),n=this._d.indexOf(e);O(n!==-1,`Series not found`);let r=A(t);this._d.splice(n,1),r.r_(e),e.m&&e.m(),this.ka(),this.ia._c(),this.Qd(r)}ya(e,t){let n=A(this.Ks(e));n.r_(e,!0),n.s_(e,t,!0)}Xc(){let e=L.Cs();e.us(),this.Cd(e)}tf(e){let t=L.Cs();t.fs(e),this.Cd(t)}ws(){let e=L.Cs();e.ws(),this.Cd(e)}Ms(e){let t=L.Cs();t.Ms(e),this.Cd(t)}gs(e){let t=L.Cs();t.gs(e),this.Cd(t)}ps(e){let t=L.Cs();t.ps(e),this.Cd(t)}cs(){let e=L.Cs();e.cs(),this.Cd(e)}if(){let e=this.yn.defaultVisiblePriceScaleId,t=this.yn.leftPriceScale.visible;return t===this.yn.rightPriceScale.visible?e:t?`left`:`right`}nf(e,t){if(O(t>=0,`Index should be greater or equal to 0`),t===this.sf(e))return;let n=A(this.Ks(e));n.r_(e);let r=this.gd(t);this.Xd(e,r);let i=!1;n.Cl().length===0&&(i=this.Qd(n)),i||this.Pa()}ef(){return this.xd}$(){return this.bd}Ut(e){let t=this.xd,n=this.bd;if(t===n)return t;if(e=Math.max(0,Math.min(100,Math.round(100*e))),this.vd===null||this.vd.ah!==n||this.vd.oh!==t)this.vd={ah:n,oh:t,rf:new Map};else{let t=this.vd.rf.get(e);if(t!==void 0)return t}let r=this.To.tt(n,t,e/100);return this.vd.rf.set(e,r),r}hf(e){return this.od.indexOf(e)}Xi(){return this.To}af(){return this.lf()}lf(e){let t=new sn(this.ia,this);this.od.push(t);let n=e??this.od.length-1,r=L.ys();return r.es(n,{rs:0,hs:!0}),this.Cd(r),t}gd(e){return O(e>=0,`Index should be greater or equal to 0`),(e=Math.min(this.od.length,e))<this.od.length?this.od[e]:this.lf(e)}sf(e){return this.od.findIndex((t=>t.U_().includes(e)))}Ld(e,t){let n=new L(t);if(e!==null){let r=this.od.indexOf(e);n.es(r,{rs:t})}return n}yd(e,t){return t===void 0&&(t=2),this.Ld(this.Ks(e),t)}Cd(e){this.md&&this.md(e),this.od.forEach((e=>e.pu().wr().kt()))}Xd(e,t){let n=e.N().priceScaleId,r=n===void 0?this.if():n;t.s_(e,r),ze(r)||e.vr(e.N())}Sd(e){let t=this.yn.layout;return t.background.type===`gradient`?e===0?t.background.topColor:t.background.bottomColor:t.background.color}Qd(e){return!e.H_()&&e.Cl().length===0&&this.od.length>1&&(this.od.splice(this.hf(e),1),this.Pa(),!0)}};function On(e){if(e>=1)return 0;let t=0;for(;t<8;t++){if(Math.abs(Math.round(e)-e)<1e-8)return t;e*=10}return t}function kn(e){return!P(e)&&!ce(e)}function An(e){return P(e)}(function(e){e[e.Disabled=0]=`Disabled`,e[e.Continuous=1]=`Continuous`,e[e.OnDataUpdate=2]=`OnDataUpdate`})(Cn||={}),function(e){e[e.LastBar=0]=`LastBar`,e[e.LastVisible=1]=`LastVisible`}(wn||={}),function(e){e.Solid=`solid`,e.VerticalGradient=`gradient`}(Tn||={}),function(e){e[e.Year=0]=`Year`,e[e.Month=1]=`Month`,e[e.DayOfMonth=2]=`DayOfMonth`,e[e.Time=3]=`Time`,e[e.TimeWithSeconds=4]=`TimeWithSeconds`}(En||={});var jn=e=>e.getUTCFullYear();function Mn(e,t,n){return t.replace(/yyyy/g,(e=>R(jn(e),4))(e)).replace(/yy/g,(e=>R(jn(e)%100,2))(e)).replace(/MMMM/g,((e,t)=>new Date(e.getUTCFullYear(),e.getUTCMonth(),1).toLocaleString(t,{month:`long`}))(e,n)).replace(/MMM/g,((e,t)=>new Date(e.getUTCFullYear(),e.getUTCMonth(),1).toLocaleString(t,{month:`short`}))(e,n)).replace(/MM/g,(e=>R((e=>e.getUTCMonth()+1)(e),2))(e)).replace(/dd/g,(e=>R((e=>e.getUTCDate())(e),2))(e))}var Nn=class{constructor(e=`yyyy-MM-dd`,t=`default`){this._f=e,this.uf=t}Cu(e){return Mn(e,this._f,this.uf)}},Pn=class{constructor(e){this.cf=e||`%h:%m:%s`}Cu(e){return this.cf.replace(`%h`,R(e.getUTCHours(),2)).replace(`%m`,R(e.getUTCMinutes(),2)).replace(`%s`,R(e.getUTCSeconds(),2))}},Fn={df:`yyyy-MM-dd`,ff:`%h:%m:%s`,pf:` `,vf:`default`},In=class{constructor(e={}){let t={...Fn,...e};this.mf=new Nn(t.df,t.vf),this.wf=new Pn(t.ff),this.Mf=t.pf}Cu(e){return`${this.mf.Cu(e)}${this.Mf}${this.wf.Cu(e)}`}};function Ln(e){return 60*e*60*1e3}function Rn(e){return 60*e*1e3}var zn=[{gf:(Bn=1,1e3*Bn),bf:10},{gf:Rn(1),bf:20},{gf:Rn(5),bf:21},{gf:Rn(30),bf:22},{gf:Ln(1),bf:30},{gf:Ln(3),bf:31},{gf:Ln(6),bf:32},{gf:Ln(12),bf:33}],Bn;function Vn(e,t){if(e.getUTCFullYear()!==t.getUTCFullYear())return 70;if(e.getUTCMonth()!==t.getUTCMonth())return 60;if(e.getUTCDate()!==t.getUTCDate())return 50;for(let n=zn.length-1;n>=0;--n)if(Math.floor(t.getTime()/zn[n].gf)!==Math.floor(e.getTime()/zn[n].gf))return zn[n].bf;return 0}function Hn(e){let t=e;if(ce(e)&&(t=Wn(e)),!kn(t))throw Error(`time must be of type BusinessDay`);let n=new Date(Date.UTC(t.year,t.month-1,t.day,0,0,0,0));return{Sf:Math.round(n.getTime()/1e3),xf:t}}function Un(e){if(!An(e))throw Error(`time must be of type isUTCTimestamp`);return{Sf:e}}function Wn(e){let t=new Date(e);if(isNaN(t.getTime()))throw Error(`Invalid date string=${e}, expected format=yyyy-mm-dd`);return{day:t.getUTCDate(),month:t.getUTCMonth()+1,year:t.getUTCFullYear()}}function Gn(e){ce(e.time)&&(e.time=Wn(e.time))}var Kn=class{options(){return this.yn}setOptions(e){this.yn=e,this.updateFormatter(e.localization)}preprocessData(e){Array.isArray(e)?function(e){e.forEach(Gn)}(e):Gn(e)}createConverterToInternalObj(e){return A(function(e){return e.length===0?null:kn(e[0].time)||ce(e[0].time)?Hn:Un}(e))}key(e){return typeof e==`object`&&`Sf`in e?e.Sf:this.key(this.convertHorzItemToInternal(e))}cacheKey(e){let t=e;return t.xf===void 0?new Date(1e3*t.Sf).getTime():new Date(Date.UTC(t.xf.year,t.xf.month-1,t.xf.day)).getTime()}convertHorzItemToInternal(e){return An(t=e)?Un(t):kn(t)?Hn(t):Hn(Wn(t));var t}updateFormatter(e){if(!this.yn)return;let t=e.dateFormat;this.yn.timeScale.timeVisible?this.Cf=new In({df:t,ff:this.yn.timeScale.secondsVisible?`%h:%m:%s`:`%h:%m`,pf:` `,vf:e.locale}):this.Cf=new Nn(t,e.locale)}formatHorzItem(e){let t=e;return this.Cf.Cu(new Date(1e3*t.Sf))}formatTickmark(e,t){let n=function(e,t,n){switch(e){case 0:case 10:return t?n?4:3:2;case 20:case 21:case 22:case 30:case 31:case 32:case 33:return t?3:2;case 50:return 2;case 60:return 1;case 70:return 0}}(e.weight,this.yn.timeScale.timeVisible,this.yn.timeScale.secondsVisible),r=this.yn.timeScale;if(r.tickMarkFormatter!==void 0){let i=r.tickMarkFormatter(e.originalTime,n,t.locale);if(i!==null)return i}return function(e,t,n){let r={};switch(t){case 0:r.year=`numeric`;break;case 1:r.month=`short`;break;case 2:r.day=`numeric`;break;case 3:r.hour12=!1,r.hour=`2-digit`,r.minute=`2-digit`;break;case 4:r.hour12=!1,r.hour=`2-digit`,r.minute=`2-digit`,r.second=`2-digit`}let i=e.xf===void 0?new Date(1e3*e.Sf):new Date(Date.UTC(e.xf.year,e.xf.month-1,e.xf.day));return new Date(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate(),i.getUTCHours(),i.getUTCMinutes(),i.getUTCSeconds(),i.getUTCMilliseconds()).toLocaleString(n,r)}(e.time,n,t.locale)}maxTickMarkWeight(e){let t=e.reduce(bn,e[0]).weight;return t>30&&t<50&&(t=30),t}fillWeightsForPoints(e,t){(function(e,t=0){if(e.length===0)return;let n=t===0?null:e[t-1].time.Sf,r=n===null?null:new Date(1e3*n),i=0;for(let a=t;a<e.length;++a){let t=e[a],o=new Date(1e3*t.time.Sf);r!==null&&(t.timeWeight=Vn(o,r)),i+=t.time.Sf-(n||t.time.Sf),n=t.time.Sf,r=o}if(t===0&&e.length>1){let t=Math.ceil(i/(e.length-1)),n=new Date(1e3*(e[0].time.Sf-t));e[0].timeWeight=Vn(new Date(1e3*e[0].time.Sf),n)}})(e,t)}static yf(e){return N({localization:{dateFormat:`dd MMM 'yy`}},e??{})}},G=typeof window<`u`;function qn(){return!!G&&window.navigator.userAgent.toLowerCase().indexOf(`firefox`)>-1}function Jn(){return!!G&&/iPhone|iPad|iPod/.test(window.navigator.platform)}function Yn(e,t){switch(e){case`custom`:return t===void 0?`series`:`custom-object`;case`price-line`:return`custom-price-line`;case`marker`:return`series-marker`;case`primitive`:return`primitive`;default:return`series`}}function Xn(e){return e+e%2}function Zn(e){G&&window.chrome!==void 0&&e.addEventListener(`mousedown`,(e=>{if(e.button===1)return e.preventDefault(),!1}))}var Qn=class{constructor(e,t,n){this.kf=0,this.Pf=null,this.Tf={_t:-1/0,ut:1/0},this.Rf=0,this.Df=null,this.If={_t:-1/0,ut:1/0},this.Vf=null,this.Bf=!1,this.Ef=null,this.Af=null,this.Lf=!1,this.zf=!1,this.Of=!1,this.Nf=null,this.Ff=null,this.Wf=null,this.Hf=null,this.Uf=null,this.$f=null,this.jf=null,this.qf=0,this.Yf=!1,this.Kf=!1,this.Zf=!1,this.Gf=0,this.Xf=null,this.Jf=!Jn(),this.Qf=e=>{this.tp(e)},this.ip=e=>{if(this.np(e)){let t=this.sp(e);if(++this.Rf,this.Df&&this.Rf>1){let{ep:n}=this.rp(q(e),this.If);n<30&&!this.Of&&this.hp(t,this.lp.ap),this.op()}}else{let t=this.sp(e);if(++this.kf,this.Pf&&this.kf>1){let{ep:n}=this.rp(q(e),this.Tf);n<5&&!this.zf&&this._p(t,this.lp.up),this.cp()}}},this.dp=e,this.lp=t,this.yn=n,this.fp()}m(){this.Nf!==null&&(this.Nf(),this.Nf=null),this.Ff!==null&&(this.Ff(),this.Ff=null),this.Hf!==null&&(this.Hf(),this.Hf=null),this.Uf!==null&&(this.Uf(),this.Uf=null),this.$f!==null&&(this.$f(),this.$f=null),this.Wf!==null&&(this.Wf(),this.Wf=null),this.pp(),this.cp()}vp(e){this.Hf&&this.Hf();let t=this.mp.bind(this);if(this.Hf=()=>{this.dp.removeEventListener(`mousemove`,t)},this.dp.addEventListener(`mousemove`,t),this.np(e))return;let n=this.sp(e);this._p(n,this.lp.wp),this.Jf=!0}cp(){this.Pf!==null&&clearTimeout(this.Pf),this.kf=0,this.Pf=null,this.Tf={_t:-1/0,ut:1/0}}op(){this.Df!==null&&clearTimeout(this.Df),this.Rf=0,this.Df=null,this.If={_t:-1/0,ut:1/0}}mp(e){if(this.Zf||this.Af!==null||this.np(e))return;let t=this.sp(e);this._p(t,this.lp.Mp),this.Jf=!0}gp(e){let t=tr(e.changedTouches,A(this.Xf));if(t===null||(this.Gf=er(e),this.jf!==null)||this.Kf)return;this.Yf=!0;let{bp:n,Sp:r,ep:i}=this.rp(q(t),A(this.Af));if(this.Lf||!(i<5)){if(!this.Lf){let e=.5*n,t=r>=e&&!this.yn.xp(),i=e>r&&!this.yn.Cp();t||i||(this.Kf=!0),this.Lf=!0,this.Of=!0,this.pp(),this.op()}if(!this.Kf){let n=this.sp(e,t);this.hp(n,this.lp.yp),K(e)}}}kp(e){if(e.button!==0)return;let{ep:t}=this.rp(q(e),A(this.Ef));if(t>=5&&(this.zf=!0,this.cp()),this.zf){let t=this.sp(e);this._p(t,this.lp.Pp)}}rp(e,t){let n=Math.abs(t._t-e._t),r=Math.abs(t.ut-e.ut);return{bp:n,Sp:r,ep:n+r}}Tp(e){let t=tr(e.changedTouches,A(this.Xf));if(t===null&&e.touches.length===0&&(t=e.changedTouches[0]),t===null)return;this.Xf=null,this.Gf=er(e),this.pp(),this.Af=null,this.$f&&=(this.$f(),null);let n=this.sp(e,t);if(this.hp(n,this.lp.Rp),++this.Rf,this.Df&&this.Rf>1){let{ep:e}=this.rp(q(t),this.If);e<30&&!this.Of&&this.hp(n,this.lp.ap),this.op()}else this.Of||(this.hp(n,this.lp.Dp),this.lp.Dp&&K(e));this.Rf===0&&K(e),e.touches.length===0&&this.Bf&&(this.Bf=!1,K(e))}tp(e){if(e.button!==0)return;let t=this.sp(e);if(this.Ef=null,this.Zf=!1,this.Uf&&=(this.Uf(),null),qn()&&this.dp.ownerDocument.documentElement.removeEventListener(`mouseleave`,this.Qf),!this.np(e))if(this._p(t,this.lp.Ip),++this.kf,this.Pf&&this.kf>1){let{ep:n}=this.rp(q(e),this.Tf);n<5&&!this.zf&&this._p(t,this.lp.up),this.cp()}else this.zf||this._p(t,this.lp.Vp)}pp(){this.Vf!==null&&(clearTimeout(this.Vf),this.Vf=null)}Bp(e){if(this.Xf!==null)return;let t=e.changedTouches[0];this.Xf=t.identifier,this.Gf=er(e);let n=this.dp.ownerDocument.documentElement;this.Of=!1,this.Lf=!1,this.Kf=!1,this.Af=q(t),this.$f&&=(this.$f(),null);{let t=this.gp.bind(this),r=this.Tp.bind(this);this.$f=()=>{n.removeEventListener(`touchmove`,t),n.removeEventListener(`touchend`,r)},n.addEventListener(`touchmove`,t,{passive:!1}),n.addEventListener(`touchend`,r,{passive:!1}),this.pp(),this.Vf=setTimeout(this.Ep.bind(this,e),240)}let r=this.sp(e,t);this.hp(r,this.lp.Ap),this.Df||(this.Rf=0,this.Df=setTimeout(this.op.bind(this),500),this.If=q(t))}Lp(e){if(e.button!==0)return;let t=this.dp.ownerDocument.documentElement;qn()&&t.addEventListener(`mouseleave`,this.Qf),this.zf=!1,this.Ef=q(e),this.Uf&&=(this.Uf(),null);{let e=this.kp.bind(this),n=this.tp.bind(this);this.Uf=()=>{t.removeEventListener(`mousemove`,e),t.removeEventListener(`mouseup`,n)},t.addEventListener(`mousemove`,e),t.addEventListener(`mouseup`,n)}if(this.Zf=!0,this.np(e))return;let n=this.sp(e);this._p(n,this.lp.zp),this.Pf||(this.kf=0,this.Pf=setTimeout(this.cp.bind(this),500),this.Tf=q(e))}fp(){this.dp.addEventListener(`mouseenter`,this.vp.bind(this)),this.dp.addEventListener(`touchcancel`,this.pp.bind(this));{let e=this.dp.ownerDocument,t=e=>{this.lp.Op&&(e.composed&&this.dp.contains(e.composedPath()[0])||e.target&&this.dp.contains(e.target)||this.lp.Op())};this.Ff=()=>{e.removeEventListener(`touchstart`,t)},this.Nf=()=>{e.removeEventListener(`mousedown`,t)},e.addEventListener(`mousedown`,t),e.addEventListener(`touchstart`,t,{passive:!0})}Jn()&&(this.Wf=()=>{this.dp.removeEventListener(`dblclick`,this.ip)},this.dp.addEventListener(`dblclick`,this.ip)),this.dp.addEventListener(`mouseleave`,this.Np.bind(this)),this.dp.addEventListener(`touchstart`,this.Bp.bind(this),{passive:!0}),Zn(this.dp),this.dp.addEventListener(`mousedown`,this.Lp.bind(this)),this.Fp(),this.dp.addEventListener(`touchmove`,(()=>{}),{passive:!1})}Fp(){this.lp.Wp===void 0&&this.lp.Hp===void 0&&this.lp.Up===void 0||(this.dp.addEventListener(`touchstart`,(e=>this.$p(e.touches)),{passive:!0}),this.dp.addEventListener(`touchmove`,(e=>{if(e.touches.length===2&&this.jf!==null&&this.lp.Hp!==void 0){let t=$n(e.touches[0],e.touches[1])/this.qf;this.lp.Hp(this.jf,t),K(e)}}),{passive:!1}),this.dp.addEventListener(`touchend`,(e=>{this.$p(e.touches)})))}$p(e){e.length===1&&(this.Yf=!1),e.length!==2||this.Yf||this.Bf?this.jp():this.qp(e)}qp(e){let t=this.dp.getBoundingClientRect()||{left:0,top:0};this.jf={_t:(e[0].clientX-t.left+(e[1].clientX-t.left))/2,ut:(e[0].clientY-t.top+(e[1].clientY-t.top))/2},this.qf=$n(e[0],e[1]),this.lp.Wp!==void 0&&this.lp.Wp(),this.pp()}jp(){this.jf!==null&&(this.jf=null,this.lp.Up!==void 0&&this.lp.Up())}Np(e){if(this.Hf&&this.Hf(),this.np(e)||!this.Jf)return;let t=this.sp(e);this._p(t,this.lp.Yp),this.Jf=!Jn()}Ep(e){let t=tr(e.touches,A(this.Xf));if(t===null)return;let n=this.sp(e,t);this.hp(n,this.lp.Kp),this.Of=!0,this.Bf=!0}np(e){return e.sourceCapabilities&&e.sourceCapabilities.firesTouchEvents!==void 0?e.sourceCapabilities.firesTouchEvents:er(e)<this.Gf+500}hp(e,t){t&&t.call(this.lp,e)}_p(e,t){t&&t.call(this.lp,e)}sp(e,t){let n=t||e,r=this.dp.getBoundingClientRect()||{left:0,top:0};return{clientX:n.clientX,clientY:n.clientY,pageX:n.pageX,pageY:n.pageY,screenX:n.screenX,screenY:n.screenY,localX:n.clientX-r.left,localY:n.clientY-r.top,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey,Zp:!e.type.startsWith(`mouse`)&&e.type!==`contextmenu`&&e.type!==`click`,Gp:e.type,Xp:n.target,gu:e.view,Jp:()=>{e.type!==`touchstart`&&K(e)}}}};function $n(e,t){let n=e.clientX-t.clientX,r=e.clientY-t.clientY;return Math.sqrt(n*n+r*r)}function K(e){e.cancelable&&e.preventDefault()}function q(e){return{_t:e.pageX,ut:e.pageY}}function er(e){return e.timeStamp||performance.now()}function tr(e,t){for(let n=0;n<e.length;++n)if(e[n].identifier===t)return e[n];return null}var nr=class{constructor(e,t,n){this.Qp=null,this.tv=null,this.iv=!0,this.nv=null,this.sv=e,this.ev=e.rv()[t],this.hv=e.rv()[n],this.av=document.createElement(`tr`),this.av.style.height=`1px`,this.lv=document.createElement(`td`),this.lv.style.position=`relative`,this.lv.style.padding=`0`,this.lv.style.margin=`0`,this.lv.setAttribute(`colspan`,`3`),this.ov(),this.av.appendChild(this.lv),this.iv=this.sv.N().layout.panes.enableResize,this.iv?this._v():(this.Qp=null,this.tv=null)}m(){this.tv!==null&&this.tv.m()}uv(){return this.av}cv(){return v({width:this.ev.cv().width,height:1})}dv(){return v({width:this.ev.dv().width,height:1*window.devicePixelRatio})}fv(e,t,n){let r=this.dv();e.fillStyle=this.sv.N().layout.panes.separatorColor,e.fillRect(t,n,r.width,r.height)}kt(){this.ov(),this.sv.N().layout.panes.enableResize!==this.iv&&(this.iv=this.sv.N().layout.panes.enableResize,this.iv?this._v():(this.Qp!==null&&(this.lv.removeChild(this.Qp.pv),this.lv.removeChild(this.Qp.vv),this.Qp=null),this.tv!==null&&(this.tv.m(),this.tv=null)))}_v(){let e=document.createElement(`div`),t=e.style;t.position=`fixed`,t.display=`none`,t.zIndex=`49`,t.top=`0`,t.left=`0`,t.width=`100%`,t.height=`100%`,t.cursor=`row-resize`,this.lv.appendChild(e);let n=document.createElement(`div`),r=n.style;r.position=`absolute`,r.zIndex=`50`,r.top=`-4px`,r.height=`9px`,r.width=`100%`,r.backgroundColor=``,r.cursor=`row-resize`,this.lv.appendChild(n);let i={wp:this.mv.bind(this),Yp:this.wv.bind(this),zp:this.Mv.bind(this),Ap:this.Mv.bind(this),Pp:this.gv.bind(this),yp:this.gv.bind(this),Ip:this.bv.bind(this),Rp:this.bv.bind(this)};this.tv=new Qn(n,i,{xp:()=>!1,Cp:()=>!0}),this.Qp={vv:n,pv:e}}ov(){this.lv.style.background=this.sv.N().layout.panes.separatorColor}mv(e){this.Qp!==null&&(this.Qp.vv.style.backgroundColor=this.sv.N().layout.panes.separatorHoverColor)}wv(e){this.Qp!==null&&this.nv===null&&(this.Qp.vv.style.backgroundColor=``)}Mv(e){if(this.Qp===null)return;let t=this.ev.Sv().z_()+this.hv.Sv().z_(),n=t/(this.ev.cv().height+this.hv.cv().height),r=30*n;t<=2*r||(this.nv={xv:e.pageY,Cv:this.ev.Sv().z_(),yv:t-r,kv:t,Pv:n,Tv:r},this.Qp.pv.style.display=`block`)}gv(e){let t=this.nv;if(t===null)return;let n=(e.pageY-t.xv)*t.Pv,r=H(t.Cv+n,t.Tv,t.yv);this.ev.Sv().O_(r),this.hv.Sv().O_(t.kv-r),this.sv.Qt().Pa()}bv(e){this.nv!==null&&this.Qp!==null&&(this.nv=null,this.Qp.pv.style.display=`none`)}};function rr(e,t){return e.Rv-t.Rv}function ir(e,t,n){let r=(e.Rv-t.Rv)/(e.wt-t.wt);return Math.sign(r)*Math.min(Math.abs(r),n)}var ar=class{constructor(e,t,n,r){this.Dv=null,this.Iv=null,this.Vv=null,this.Bv=null,this.Ev=null,this.Av=0,this.Lv=0,this.zv=e,this.Ov=t,this.Nv=n,this.ks=r}Fv(e,t){if(this.Dv!==null){if(this.Dv.wt===t)return void(this.Dv.Rv=e);if(Math.abs(this.Dv.Rv-e)<this.ks)return}this.Bv=this.Vv,this.Vv=this.Iv,this.Iv=this.Dv,this.Dv={wt:t,Rv:e}}me(e,t){if(this.Dv===null||this.Iv===null||t-this.Dv.wt>50)return;let n=0,r=ir(this.Dv,this.Iv,this.Ov),i=rr(this.Dv,this.Iv),a=[r],o=[i];if(n+=i,this.Vv!==null){let e=ir(this.Iv,this.Vv,this.Ov);if(Math.sign(e)===Math.sign(r)){let t=rr(this.Iv,this.Vv);if(a.push(e),o.push(t),n+=t,this.Bv!==null){let e=ir(this.Vv,this.Bv,this.Ov);if(Math.sign(e)===Math.sign(r)){let t=rr(this.Vv,this.Bv);a.push(e),o.push(t),n+=t}}}}let s=0;for(let e=0;e<a.length;++e)s+=o[e]/n*a[e];Math.abs(s)<this.zv||(this.Ev={Rv:e,wt:t},this.Lv=s,this.Av=function(e,t){let n=Math.log(t);return Math.log(1*n/-e)/n}(Math.abs(s),this.Nv))}qc(e){let t=A(this.Ev),n=e-t.wt;return t.Rv+this.Lv*(this.Nv**+n-1)/Math.log(this.Nv)}jc(e){return this.Ev===null||this.Wv(e)===this.Av}Wv(e){let t=e-A(this.Ev).wt;return Math.min(t,this.Av)}},or=class{constructor(e,t){this.Hv=void 0,this.Uv=void 0,this.$v=void 0,this.vn=!1,this.jv=e,this.qv=t,this.Yv()}kt(){this.Yv()}Kv(){this.Hv&&this.jv.removeChild(this.Hv),this.Uv&&this.jv.removeChild(this.Uv),this.Hv=void 0,this.Uv=void 0}Zv(){return this.vn!==this.Gv()||this.$v!==this.Xv()}Xv(){return this.qv.Qt().Xi().J(this.qv.N().layout.textColor)>160?`dark`:`light`}Gv(){return this.qv.N().layout.attributionLogo}Jv(){let e=new URL(location.href);return e.hostname?`&utm_source=`+e.hostname+e.pathname:``}Yv(){this.Zv()&&(this.Kv(),this.vn=this.Gv(),this.vn&&(this.$v=this.Xv(),this.Uv=document.createElement(`style`),this.Uv.innerText=`a#tv-attr-logo{--fill:#131722;--stroke:#fff;position:absolute;left:10px;bottom:10px;height:19px;width:35px;margin:0;padding:0;border:0;z-index:3;}a#tv-attr-logo[data-dark]{--fill:#D1D4DC;--stroke:#131722;}`,this.Hv=document.createElement(`a`),this.Hv.href=`https://www.tradingview.com/?utm_medium=lwc-link&utm_campaign=lwc-chart${this.Jv()}`,this.Hv.title=`Charting by TradingView`,this.Hv.id=`tv-attr-logo`,this.Hv.target=`_blank`,this.Hv.innerHTML=`<svg xmlns="http://www.w3.org/2000/svg" width="35" height="19" fill="none"><g fill-rule="evenodd" clip-path="url(#a)" clip-rule="evenodd"><path fill="var(--stroke)" d="M2 0H0v10h6v9h21.4l.5-1.3 6-15 1-2.7H23.7l-.5 1.3-.2.6a5 5 0 0 0-7-.9V0H2Zm20 17h4l5.2-13 .8-2h-7l-1 2.5-.2.5-1.5 3.8-.3.7V17Zm-.8-10a3 3 0 0 0 .7-2.7A3 3 0 1 0 16.8 7h4.4ZM14 7V2H2v6h6v9h4V7h2Z"/><path fill="var(--fill)" d="M14 2H2v6h6v9h6V2Zm12 15h-7l6-15h7l-6 15Zm-7-9a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"/></g><defs><clipPath id="a"><path fill="var(--stroke)" d="M0 0h35v19H0z"/></clipPath></defs></svg>`,this.Hv.toggleAttribute(`data-dark`,this.$v===`dark`),this.jv.appendChild(this.Uv),this.jv.appendChild(this.Hv)))}};function J(e,t){let n=A(e.ownerDocument).createElement(`canvas`);e.appendChild(n);let r=te(n,{type:`device-pixel-content-box`,options:{allowResizeObserver:!0},transform:(e,t)=>({width:Math.max(e.width,t.width),height:Math.max(e.height,t.height)})});return r.resizeCanvasElement(t),r}function Y(e){e.width=1,e.height=1,e.getContext(`2d`)?.clearRect(0,0,1,1)}function sr(e,t,n,r){e.qh&&e.qh(t,n,r)}function cr(e,t,n,r){e.st(t,n,r)}function lr(e,t,n,r){let i=e(n,r);for(let e of i){let n=e.Tt(r);n!==null&&t(n)}}function ur(e,t){return n=>function(e){return e.Ft!==void 0}(n)&&(n.Ft()?.cl()??``)===t?n.Ga?.(e)??[]:[]}function dr(e,t,n,r){if(!e.length)return;let i=0,a=e[0].$t(r,!0),o=t===1?n/2-(e[0].Hi()-a/2):e[0].Hi()-a/2-n/2;o=Math.max(0,o);for(let a=1;a<e.length;a++){let s=e[a],c=e[a-1],l=c.$t(r,!1),u=s.Hi(),d=c.Hi();if(t===1?u>d-l:u<d+l){let r=d-l*t;s.Ui(r);let a=r-t*l/2;if((t===1?a<0:a>n)&&o>0){let r=t===1?-1-a:a-n,s=Math.min(r,o);for(let n=i;n<e.length;n++)e[n].Ui(e[n].Hi()+t*s);o-=s}}else i=a,o=t===1?d-l-u:u-(d+l)}}var fr=class{constructor(e,t,n,r){this.Ki=null,this.Qv=null,this.tm=!1,this.im=new Ke(200),this.nm=null,this.sm=0,this.rm=!1,this.hm=()=>{this.rm||this.yt.am().Qt().mr()},this.lm=()=>{this.rm||this.yt.am().Qt().mr()},this.yt=e,this.yn=t,this.ko=t.layout,this.wd=n,this.om=r===`left`,this._m=ur(`normal`,r),this.um=ur(`top`,r),this.dm=ur(`bottom`,r),this.lv=document.createElement(`div`),this.lv.style.height=`100%`,this.lv.style.overflow=`hidden`,this.lv.style.width=`25px`,this.lv.style.left=`0`,this.lv.style.position=`relative`,this.fm=J(this.lv,v({width:16,height:16})),this.fm.subscribeSuggestedBitmapSizeChanged(this.hm);let i=this.fm.canvasElement;i.style.position=`absolute`,i.style.zIndex=`1`,i.style.left=`0`,i.style.top=`0`,this.pm=J(this.lv,v({width:16,height:16})),this.pm.subscribeSuggestedBitmapSizeChanged(this.lm);let a=this.pm.canvasElement;a.style.position=`absolute`,a.style.zIndex=`2`,a.style.left=`0`,a.style.top=`0`;let o={zp:this.Mv.bind(this),Ap:this.Mv.bind(this),Pp:this.gv.bind(this),yp:this.gv.bind(this),Op:this.vm.bind(this),Ip:this.bv.bind(this),Rp:this.bv.bind(this),up:this.wm.bind(this),ap:this.wm.bind(this),wp:this.Mm.bind(this),Yp:this.wv.bind(this)};this.tv=new Qn(this.pm.canvasElement,o,{xp:()=>!this.yn.handleScroll.vertTouchDrag,Cp:()=>!0})}m(){this.tv.m(),this.pm.unsubscribeSuggestedBitmapSizeChanged(this.lm),Y(this.pm.canvasElement),this.pm.dispose(),this.fm.unsubscribeSuggestedBitmapSizeChanged(this.hm),Y(this.fm.canvasElement),this.fm.dispose(),this.Ki!==null&&this.Ki.a_().u(this),this.Ki=null}uv(){return this.lv}k(){return this.ko.fontSize}gm(){let e=this.wd.N();return this.nm!==e.P&&(this.im.Os(),this.nm=e.P),e}bm(){if(this.Ki===null)return 0;let e=0,t=this.gm(),n=A(this.fm.canvasElement.getContext(`2d`,{colorSpace:this.yt.am().N().layout.colorSpace}));n.save();let r=this.Ki.El();n.font=this.Sm(),r.length>0&&(e=Math.max(this.im.Ii(n,r[0].io),this.im.Ii(n,r[r.length-1].io)));let i=this.xm();for(let t=i.length;t--;){let r=this.im.Ii(n,i[t].ri());r>e&&(e=r)}let a=this.Ki.Lt();if(a!==null&&this.Qv!==null&&(o=this.yn.crosshair).mode!==2&&o.horzLine.visible&&o.horzLine.labelVisible){let t=this.Ki.Tn(1,a),r=this.Ki.Tn(this.Qv.height-2,a);e=Math.max(e,this.im.Ii(n,this.Ki.Ji(Math.floor(Math.min(t,r))+.11111111111111,a)),this.im.Ii(n,this.Ki.Ji(Math.ceil(Math.max(t,r))-.11111111111111,a)))}var o;n.restore();let s=e||34;return Xn(Math.ceil(t.S+t.C+t.V+t.B+5+s))}Cm(e){this.Qv!==null&&y(this.Qv,e)||(this.Qv=e,this.rm=!0,this.fm.resizeCanvasElement(e),this.pm.resizeCanvasElement(e),this.rm=!1,this.lv.style.width=`${e.width}px`,this.lv.style.height=`${e.height}px`)}ym(){return A(this.Qv).width}un(e){this.Ki!==e&&(this.Ki!==null&&this.Ki.a_().u(this),this.Ki=e,e.a_().i(this.po.bind(this),this))}Ft(){return this.Ki}Os(){let e=this.yt.Sv();this.yt.am().Qt().eu(e,A(this.Ft()))}km(e){if(this.Qv===null)return;let t={colorSpace:this.yt.am().N().layout.colorSpace};if(e!==1){this.Pm(),this.fm.applySuggestedBitmapSize();let e=w(this.fm,t);e!==null&&(e.useBitmapCoordinateSpace((e=>{this.Tm(e),this.Rm(e)})),this.yt.Dm(e,this.dm),this.Im(e),this.yt.Dm(e,this._m),this.Vm(e))}this.pm.applySuggestedBitmapSize();let n=w(this.pm,t);n!==null&&(n.useBitmapCoordinateSpace((({context:e,bitmapSize:t})=>{e.clearRect(0,0,t.width,t.height)})),this.Bm(n),this.yt.Dm(n,this.um))}dv(){return this.fm.bitmapSize}fv(e,t,n,r){let i=this.dv();if(i.width>0&&i.height>0&&(e.drawImage(this.fm.canvasElement,t,n),r)){let r=this.pm.canvasElement;e.drawImage(r,t,n)}}kt(){this.Ki?.El()}Mv(e){if(this.Ki===null||this.Ki.Gi()||!this.yn.handleScale.axisPressedMouseMove.price)return;let t=this.yt.am().Qt(),n=this.yt.Sv();this.tm=!0,t.G_(n,this.Ki,e.localY)}gv(e){if(this.Ki===null||!this.yn.handleScale.axisPressedMouseMove.price)return;let t=this.yt.am().Qt(),n=this.yt.Sv(),r=this.Ki;t.X_(n,r,e.localY)}vm(){if(this.Ki===null||!this.yn.handleScale.axisPressedMouseMove.price)return;let e=this.yt.am().Qt(),t=this.yt.Sv(),n=this.Ki;this.tm&&(this.tm=!1,e.J_(t,n))}bv(e){if(this.Ki===null||!this.yn.handleScale.axisPressedMouseMove.price)return;let t=this.yt.am().Qt(),n=this.yt.Sv();this.tm=!1,t.J_(n,this.Ki)}wm(e){this.yn.handleScale.axisDoubleClickReset.price&&this.Os()}Mm(e){this.Ki!==null&&(!this.yt.am().Qt().N().handleScale.axisPressedMouseMove.price||this.Ki.je()||this.Ki.Lo()||this.Em(1))}wv(e){this.Em(0)}xm(){let e=[],t=this.Ki===null?void 0:this.Ki;return(n=>{for(let r=0;r<n.length;++r){let i=n[r].qn(this.yt.Sv(),t);for(let t=0;t<i.length;t++)e.push(i[t])}})(this.yt.Sv().Dt()),e}Tm({context:e,bitmapSize:t}){let{width:n,height:r}=t,i=this.yt.Sv().Qt(),a=i.$(),o=i.ef();a===o?Ee(e,0,0,n,r,a):ke(e,0,0,n,r,a,o)}Rm({context:e,bitmapSize:t,horizontalPixelRatio:n}){if(this.Qv===null||this.Ki===null||!this.Ki.N().borderVisible)return;e.fillStyle=this.Ki.N().borderColor;let r=Math.max(1,Math.floor(this.gm().S*n)),i;i=this.om?t.width-r:0,e.fillRect(i,0,r,t.height)}Im(e){if(this.Qv===null||this.Ki===null)return;let t=this.Ki.El(),n=this.Ki.N(),r=this.gm(),i=this.om?this.Qv.width-r.C:0;n.borderVisible&&n.ticksVisible&&e.useBitmapCoordinateSpace((({context:e,horizontalPixelRatio:a,verticalPixelRatio:o})=>{e.fillStyle=n.borderColor;let s=Math.max(1,Math.floor(o)),c=Math.floor(.5*o),l=Math.round(r.C*a);e.beginPath();for(let n of t)e.rect(Math.floor(i*a),Math.round(n.Rl*o)-c,l,s);e.fill()})),e.useMediaCoordinateSpace((({context:e})=>{e.font=this.Sm(),e.fillStyle=n.textColor??this.ko.textColor,e.textAlign=this.om?`right`:`left`,e.textBaseline=`middle`;let a=this.om?Math.round(i-r.V):Math.round(i+r.C+r.V),o=t.map((t=>this.im.Di(e,t.io)));for(let n=t.length;n--;){let r=t[n];e.fillText(r.io,a,r.Rl+o[n])}}))}Pm(){if(this.Qv===null||this.Ki===null)return;let e=this.Qv.height/2,t=[],n=this.Ki.Dt().slice(),r=this.yt.Sv(),i=this.gm();this.Ki===r.Gs()&&this.yt.Sv().Dt().forEach((e=>{r.Zs(e)&&n.push(e)}));let a=this.Ki.Cl()[0],o=this.Ki;n.forEach((n=>{let i=n.qn(r,o);i.forEach((e=>{e.$i()&&e.Wi()===null&&(e.Ui(null),t.push(e))})),a===n&&i.length>0&&(e=i[0].Ei())})),this.Ki.N().alignLabels&&this.Am(t,i,e)}Am(e,t,n){if(this.Qv===null)return;let r=e.filter((e=>e.Ei()<=n)),i=e.filter((e=>e.Ei()>n));r.sort(((e,t)=>t.Ei()-e.Ei())),r.length&&i.length&&i.push(r[0]),i.sort(((e,t)=>e.Ei()-t.Ei()));for(let n of e){let e=Math.floor(n.$t(t)/2),r=n.Ei();r>-e&&r<e&&n.Ui(e),r>this.Qv.height-e&&r<this.Qv.height+e&&n.Ui(this.Qv.height-e)}dr(r,1,this.Qv.height,t),dr(i,-1,this.Qv.height,t)}Vm(e){if(this.Qv===null)return;let t=this.xm(),n=this.gm(),r=this.om?`right`:`left`;t.forEach((t=>{t.ji()&&t.Tt(A(this.Ki)).st(e,n,this.im,r)}))}Bm(e){if(this.Qv===null||this.Ki===null)return;let t=this.yt.am().Qt(),n=[],r=this.yt.Sv(),i=t.Rd().qn(r,this.Ki);i.length&&n.push(i);let a=this.gm(),o=this.om?`right`:`left`;n.forEach((t=>{t.forEach((t=>{t.Tt(A(this.Ki)).st(e,a,this.im,o)}))}))}Em(e){this.lv.style.cursor=e===1?`ns-resize`:`default`}po(){let e=this.bm();this.sm<e&&this.yt.am().Qt().Pa(),this.sm=e}Sm(){return pe(this.ko.fontSize,this.ko.fontFamily)}};function pr(e,t){return e.Ka?.(t)??[]}function mr(e,t){return e.jn?.(t)??[]}function hr(e,t){return e.cn?.(t)??[]}function gr(e,t){return e.ja?.(t)??[]}var _r=class e{constructor(e,t){this.Qv=v({width:0,height:0}),this.Lm=null,this.zm=null,this.Om=null,this.Nm=null,this.Fm=!1,this.Wm=new M,this.Hm=new M,this.Um=0,this.$m=!1,this.jm=null,this.qm=!1,this.Ym=null,this.Km=null,this.rm=!1,this.hm=()=>{this.rm||this.Zm===null||this.sn().mr()},this.lm=()=>{this.rm||this.Zm===null||this.sn().mr()},this.qv=e,this.Zm=t,this.Zm.fu().i(this.Gm.bind(this),this,!0),this.Xm=document.createElement(`td`),this.Xm.style.padding=`0`,this.Xm.style.position=`relative`;let n=document.createElement(`div`);n.style.width=`100%`,n.style.height=`100%`,n.style.position=`relative`,n.style.overflow=`hidden`,this.Jm=document.createElement(`td`),this.Jm.style.padding=`0`,this.Qm=document.createElement(`td`),this.Qm.style.padding=`0`,this.Xm.appendChild(n),this.fm=J(n,v({width:16,height:16})),this.fm.subscribeSuggestedBitmapSizeChanged(this.hm);let r=this.fm.canvasElement;r.style.position=`absolute`,r.style.zIndex=`1`,r.style.left=`0`,r.style.top=`0`,this.pm=J(n,v({width:16,height:16})),this.pm.subscribeSuggestedBitmapSizeChanged(this.lm);let i=this.pm.canvasElement;i.style.position=`absolute`,i.style.zIndex=`2`,i.style.left=`0`,i.style.top=`0`,this.av=document.createElement(`tr`),this.av.appendChild(this.Jm),this.av.appendChild(this.Xm),this.av.appendChild(this.Qm),this.tw(),this.tv=new Qn(this.pm.canvasElement,this,{xp:()=>this.jm===null&&!this.qv.N().handleScroll.vertTouchDrag,Cp:()=>this.jm===null&&!this.qv.N().handleScroll.horzTouchDrag})}m(){this.Lm!==null&&this.Lm.m(),this.zm!==null&&this.zm.m(),this.Om=null,this.pm.unsubscribeSuggestedBitmapSizeChanged(this.lm),Y(this.pm.canvasElement),this.pm.dispose(),this.fm.unsubscribeSuggestedBitmapSizeChanged(this.hm),Y(this.fm.canvasElement),this.fm.dispose(),this.Zm!==null&&(this.Zm.fu().u(this),this.Zm.m()),this.tv.m()}Sv(){return A(this.Zm)}iw(t){this.Zm!==null&&this.Zm.fu().u(this),this.Zm=t,this.Zm!==null&&this.Zm.fu().i(e.prototype.Gm.bind(this),this,!0),this.tw(),this.qv.rv().indexOf(this)===this.qv.rv().length-1?(this.Om=this.Om??new or(this.Xm,this.qv),this.Om.kt()):(this.Om?.Kv(),this.Om=null)}am(){return this.qv}uv(){return this.av}tw(){if(this.Zm!==null&&(this.nw(),this.sn().Jn().length!==0)){if(this.Lm!==null){let e=this.Zm.K_();this.Lm.un(A(e))}if(this.zm!==null){let e=this.Zm.Z_();this.zm.un(A(e))}}}sw(){this.Lm!==null&&this.Lm.kt(),this.zm!==null&&this.zm.kt()}z_(){return this.Zm===null?0:this.Zm.z_()}O_(e){this.Zm&&this.Zm.O_(e)}wp(e){if(!this.Zm)return;this.ew();let t=e.localX,n=e.localY;this.rw(t,n,e)}zp(e){this.ew(),this.hw(),this.rw(e.localX,e.localY,e)}Mp(e){if(!this.Zm)return;this.ew();let t=e.localX,n=e.localY;this.rw(t,n,e)}Vp(e){this.Zm!==null&&(this.ew(),this.rw(e.localX,e.localY,e),this.aw(e))}up(e){this.Zm!==null&&this.lw(this.Hm,e)}ap(e){this.up(e)}Pp(e){this.ew(),this.ow(e),this.rw(e.localX,e.localY,e)}Ip(e){this.Zm!==null&&(this.ew(),this.$m=!1,this._w(e))}Dp(e){this.Zm!==null&&this.aw(e)}Kp(e){if(this.$m=!0,this.jm===null){let t={x:e.localX,y:e.localY};this.uw(t,t,e)}}Yp(e){this.Zm!==null&&(this.ew(),this.Zm.Qt().kd(null),this.cw())}dw(){return this.Wm}fw(){return this.Hm}Wp(){this.Um=1,this.sn().cs()}Hp(e,t){if(!this.qv.N().handleScale.pinch)return;let n=5*(t-this.Um);this.Um=t,this.sn().Od(e._t,n)}Ap(e){this.$m=!1,this.qm=this.jm!==null,this.hw();let t=this.sn().Rd();this.jm!==null&&t.It()&&(this.Ym={x:t.ni(),y:t.si()},this.jm={x:e.localX,y:e.localY})}yp(e){if(this.Zm===null)return;let t=e.localX,n=e.localY;if(this.jm===null)this.ow(e);else{this.qm=!1;let r=A(this.Ym),i=r.x+(t-this.jm.x),a=r.y+(n-this.jm.y);this.rw(i,a,e)}}Rp(e){this.am().N().trackingMode.exitMode===0&&(this.qm=!0),this.pw(),this._w(e)}Qs(e,t){let n=this.Zm;return n===null?null:mn(n,e,t)}mw(e,t){A(t===`left`?this.Lm:this.zm).Cm(v({width:e,height:this.Qv.height}))}cv(){return this.Qv}Cm(e){y(this.Qv,e)||(this.Qv=e,this.rm=!0,this.fm.resizeCanvasElement(e),this.pm.resizeCanvasElement(e),this.rm=!1,this.Xm.style.width=e.width+`px`,this.Xm.style.height=e.height+`px`)}ww(){let e=A(this.Zm);e.q_(e.K_()),e.q_(e.Z_());for(let t of e.Cl())if(e.Zs(t)){let n=t.Ft();n!==null&&e.q_(n),t.Nn()}for(let t of e.vu())t.Nn()}dv(){return this.fm.bitmapSize}fv(e,t,n,r){let i=this.dv();if(i.width>0&&i.height>0&&(e.drawImage(this.fm.canvasElement,t,n),r)){let r=this.pm.canvasElement;e!==null&&e.drawImage(r,t,n)}}km(e){if(e===0||this.Zm===null)return;e>1&&this.ww(),this.Lm!==null&&this.Lm.km(e),this.zm!==null&&this.zm.km(e);let t={colorSpace:this.qv.N().layout.colorSpace};if(e!==1){this.fm.applySuggestedBitmapSize();let e=w(this.fm,t);e!==null&&(e.useBitmapCoordinateSpace((e=>{this.Tm(e)})),this.Zm&&(this.Mw(e,pr),this.gw(e),this.Mw(e,mr),this.Mw(e,hr)))}this.pm.applySuggestedBitmapSize();let n=w(this.pm,t);n!==null&&(n.useBitmapCoordinateSpace((({context:e,bitmapSize:t})=>{e.clearRect(0,0,t.width,t.height)})),this.bw(n),this.Mw(n,gr),this.Mw(n,hr))}Sw(){return this.Lm}xw(){return this.zm}Dm(e,t){this.Mw(e,t)}Gm(){this.Zm!==null&&this.Zm.fu().u(this),this.Zm=null}aw(e){this.lw(this.Wm,e)}lw(e,t){let n=t.localX,r=t.localY;e.v()&&e.p(this.sn().Et().Rc(n),{x:n,y:r},t)}Tm({context:e,bitmapSize:t}){let{width:n,height:r}=t,i=this.sn(),a=i.$(),o=i.ef();a===o?Ee(e,0,0,n,r,o):ke(e,0,0,n,r,a,o)}gw(e){let t=A(this.Zm),n=t.pu().wr().Tt(t);n!==null&&n.st(e,!1)}bw(e){this.Cw(e,mr,cr,this.sn().Rd())}Mw(e,t){let n=A(this.Zm),r=n.au(),i=n.vu();for(let n of i)this.Cw(e,t,sr,n);for(let n of r)this.Cw(e,t,sr,n);for(let n of i)this.Cw(e,t,cr,n);for(let n of r)this.Cw(e,t,cr,n)}Cw(e,t,n,r){let i=A(this.Zm),a=i.Qt().ou(),o=a!==null&&a.lu===r,s=a!==null&&o&&a.wu!==void 0?a.wu.ie:void 0;lr(t,(t=>n(t,e,o,s)),r,i)}nw(){if(this.Zm===null)return;let e=this.qv,t=this.Zm.K_().N().visible,n=this.Zm.Z_().N().visible;t||this.Lm===null||(this.Jm.removeChild(this.Lm.uv()),this.Lm.m(),this.Lm=null),n||this.zm===null||(this.Qm.removeChild(this.zm.uv()),this.zm.m(),this.zm=null);let r=e.Qt().Zd();t&&this.Lm===null&&(this.Lm=new fr(this,e.N(),r,`left`),this.Jm.appendChild(this.Lm.uv())),n&&this.zm===null&&(this.zm=new fr(this,e.N(),r,`right`),this.Qm.appendChild(this.zm.uv()))}yw(e){return e.Zp&&this.$m||this.jm!==null}rw(e,t,n){e=Math.max(0,Math.min(e,this.Qv.width-1)),t=Math.max(0,Math.min(t,this.Qv.height-1)),this.sn().jd(e,t,n,A(this.Zm))}cw(){this.sn().Yd()}pw(){this.qm&&(this.jm=null,this.cw())}uw(e,t,n){this.jm=e,this.qm=!1,this.rw(t.x,t.y,n);let r=this.sn().Rd();this.Ym={x:r.ni(),y:r.si()}}sn(){return this.qv.Qt()}_w(e){if(!this.Fm)return;let t=this.sn(),n=this.Sv();if(t.iu(n,n.Pn()),this.Nm=null,this.Fm=!1,t.Hd(),this.Km!==null){let e=performance.now(),n=t.Et();this.Km.me(n.Ac(),e),this.Km.jc(e)||t.ps(this.Km)}}ew(){this.jm=null}hw(){if(this.Zm){if(this.sn().cs(),document.activeElement!==document.body&&document.activeElement!==document.documentElement)A(document.activeElement).blur();else{let e=document.getSelection();e!==null&&e.removeAllRanges()}!this.Zm.Pn().Gi()&&this.sn().Et().Gi()}}ow(e){if(this.Zm===null)return;let t=this.sn(),n=t.Et();if(n.Gi())return;let r=this.qv.N(),i=r.handleScroll,a=r.kineticScroll;if((!i.pressedMouseMove||e.Zp)&&(!i.horzTouchDrag&&!i.vertTouchDrag||!e.Zp))return;let o=this.Zm.Pn(),s=performance.now();if(this.Nm!==null||this.yw(e)||(this.Nm={x:e.clientX,y:e.clientY,Sf:s,kw:e.localX,Pw:e.localY}),this.Nm!==null&&!this.Fm&&(this.Nm.x!==e.clientX||this.Nm.y!==e.clientY)){if(e.Zp&&a.touch||!e.Zp&&a.mouse){let e=n.fl();this.Km=new ar(.2/e,7/e,.997,15/e),this.Km.Fv(n.Ac(),this.Nm.Sf)}else this.Km=null;o.Gi()||t.Q_(this.Zm,o,e.localY),t.Fd(e.localX),this.Fm=!0}this.Fm&&(o.Gi()||t.tu(this.Zm,o,e.localY),t.Wd(e.localX),this.Km!==null&&this.Km.Fv(n.Ac(),s))}},vr=class{constructor(e,t,n,r,i){this.xt=!0,this.Qv=v({width:0,height:0}),this.hm=()=>this.km(3),this.om=e===`left`,this.wd=n.Zd,this.yn=t,this.Tw=r,this.Rw=i,this.lv=document.createElement(`div`),this.lv.style.width=`25px`,this.lv.style.height=`100%`,this.lv.style.overflow=`hidden`,this.fm=J(this.lv,v({width:16,height:16})),this.fm.subscribeSuggestedBitmapSizeChanged(this.hm)}m(){this.fm.unsubscribeSuggestedBitmapSizeChanged(this.hm),Y(this.fm.canvasElement),this.fm.dispose()}uv(){return this.lv}cv(){return this.Qv}Cm(e){y(this.Qv,e)||(this.Qv=e,this.fm.resizeCanvasElement(e),this.lv.style.width=`${e.width}px`,this.lv.style.height=`${e.height}px`,this.xt=!0)}km(e){if(e<3&&!this.xt||this.Qv.width===0||this.Qv.height===0)return;this.xt=!1,this.fm.applySuggestedBitmapSize();let t=w(this.fm,{colorSpace:this.yn.layout.colorSpace});t!==null&&t.useBitmapCoordinateSpace((e=>{this.Tm(e),this.Rm(e)}))}dv(){return this.fm.bitmapSize}fv(e,t,n){let r=this.dv();r.width>0&&r.height>0&&e.drawImage(this.fm.canvasElement,t,n)}Rm({context:e,bitmapSize:t,horizontalPixelRatio:n,verticalPixelRatio:r}){if(!this.Tw())return;e.fillStyle=this.yn.timeScale.borderColor;let i=Math.floor(this.wd.N().S*n),a=Math.floor(this.wd.N().S*r),o=this.om?t.width-i:0;e.fillRect(o,0,i,a)}Tm({context:e,bitmapSize:t}){Ee(e,0,0,t.width,t.height,this.Rw())}};function yr(e){return t=>t.Xa?.(e)??[]}var br=yr(`normal`),xr=yr(`top`),Sr=yr(`bottom`),Cr=class{constructor(e,t){this.Dw=null,this.Iw=null,this.M=null,this.Vw=!1,this.Qv=v({width:0,height:0}),this.Bw=new M,this.im=new Ke(5),this.rm=!1,this.hm=()=>{this.rm||this.qv.Qt().mr()},this.lm=()=>{this.rm||this.qv.Qt().mr()},this.qv=e,this.xu=t,this.yn=e.N().layout,this.Hv=document.createElement(`tr`),this.Ew=document.createElement(`td`),this.Ew.style.padding=`0`,this.Aw=document.createElement(`td`),this.Aw.style.padding=`0`,this.lv=document.createElement(`td`),this.lv.style.height=`25px`,this.lv.style.padding=`0`,this.Lw=document.createElement(`div`),this.Lw.style.width=`100%`,this.Lw.style.height=`100%`,this.Lw.style.position=`relative`,this.Lw.style.overflow=`hidden`,this.lv.appendChild(this.Lw),this.fm=J(this.Lw,v({width:16,height:16})),this.fm.subscribeSuggestedBitmapSizeChanged(this.hm);let n=this.fm.canvasElement;n.style.position=`absolute`,n.style.zIndex=`1`,n.style.left=`0`,n.style.top=`0`,this.pm=J(this.Lw,v({width:16,height:16})),this.pm.subscribeSuggestedBitmapSizeChanged(this.lm);let r=this.pm.canvasElement;r.style.position=`absolute`,r.style.zIndex=`2`,r.style.left=`0`,r.style.top=`0`,this.Hv.appendChild(this.Ew),this.Hv.appendChild(this.lv),this.Hv.appendChild(this.Aw),this.zw(),this.qv.Qt().L_().i(this.zw.bind(this),this),this.tv=new Qn(this.pm.canvasElement,this,{xp:()=>!0,Cp:()=>!this.qv.N().handleScroll.horzTouchDrag})}m(){this.tv.m(),this.Dw!==null&&this.Dw.m(),this.Iw!==null&&this.Iw.m(),this.pm.unsubscribeSuggestedBitmapSizeChanged(this.lm),Y(this.pm.canvasElement),this.pm.dispose(),this.fm.unsubscribeSuggestedBitmapSizeChanged(this.hm),Y(this.fm.canvasElement),this.fm.dispose()}uv(){return this.Hv}Ow(){return this.Dw}Nw(){return this.Iw}zp(e){if(this.Vw)return;this.Vw=!0;let t=this.qv.Qt();!t.Et().Gi()&&this.qv.N().handleScale.axisPressedMouseMove.time&&t.zd(e.localX)}Ap(e){this.zp(e)}Op(){let e=this.qv.Qt();!e.Et().Gi()&&this.Vw&&(this.Vw=!1,this.qv.N().handleScale.axisPressedMouseMove.time&&e.$d())}Pp(e){let t=this.qv.Qt();!t.Et().Gi()&&this.qv.N().handleScale.axisPressedMouseMove.time&&t.Ud(e.localX)}yp(e){this.Pp(e)}Ip(){this.Vw=!1;let e=this.qv.Qt();e.Et().Gi()&&!this.qv.N().handleScale.axisPressedMouseMove.time||e.$d()}Rp(){this.Ip()}up(){this.qv.N().handleScale.axisDoubleClickReset.time&&this.qv.Qt().ws()}ap(){this.up()}wp(){this.qv.Qt().N().handleScale.axisPressedMouseMove.time&&this.Em(1)}Yp(){this.Em(0)}cv(){return this.Qv}Fw(){return this.Bw}Ww(e,t,n){y(this.Qv,e)||(this.Qv=e,this.rm=!0,this.fm.resizeCanvasElement(e),this.pm.resizeCanvasElement(e),this.rm=!1,this.lv.style.width=`${e.width}px`,this.lv.style.height=`${e.height}px`,this.Bw.p(e)),this.Dw!==null&&this.Dw.Cm(v({width:t,height:e.height})),this.Iw!==null&&this.Iw.Cm(v({width:n,height:e.height}))}Hw(){let e=this.Uw();return Math.ceil(e.S+e.C+e.k+e.A+e.I+e.$w)}kt(){this.qv.Qt().Et().El()}dv(){return this.fm.bitmapSize}fv(e,t,n,r){let i=this.dv();if(i.width>0&&i.height>0&&(e.drawImage(this.fm.canvasElement,t,n),r)){let r=this.pm.canvasElement;e.drawImage(r,t,n)}}km(e){if(e===0)return;let t={colorSpace:this.yn.colorSpace};if(e!==1){this.fm.applySuggestedBitmapSize();let n=w(this.fm,t);n!==null&&(n.useBitmapCoordinateSpace((e=>{this.Tm(e),this.Rm(e),this.jw(n,Sr)})),this.Im(n),this.jw(n,br)),this.Dw!==null&&this.Dw.km(e),this.Iw!==null&&this.Iw.km(e)}this.pm.applySuggestedBitmapSize();let n=w(this.pm,t);n!==null&&(n.useBitmapCoordinateSpace((({context:e,bitmapSize:t})=>{e.clearRect(0,0,t.width,t.height)})),this.qw([...this.qv.Qt().Jn(),this.qv.Qt().Rd()],n),this.jw(n,xr))}jw(e,t){let n=this.qv.Qt().Jn();for(let r of n)lr(t,(t=>sr(t,e,!1,void 0)),r,void 0);for(let r of n)lr(t,(t=>cr(t,e,!1,void 0)),r,void 0)}Tm({context:e,bitmapSize:t}){Ee(e,0,0,t.width,t.height,this.qv.Qt().ef())}Rm({context:e,bitmapSize:t,verticalPixelRatio:n}){if(this.qv.N().timeScale.borderVisible){e.fillStyle=this.Yw();let r=Math.max(1,Math.floor(this.Uw().S*n));e.fillRect(0,0,t.width,r)}}Im(e){let t=this.qv.Qt().Et(),n=t.El();if(!n||n.length===0)return;let r=this.xu.maxTickMarkWeight(n),i=this.Uw(),a=t.N();a.borderVisible&&a.ticksVisible&&e.useBitmapCoordinateSpace((({context:e,horizontalPixelRatio:t,verticalPixelRatio:r})=>{e.strokeStyle=this.Yw(),e.fillStyle=this.Yw();let a=Math.max(1,Math.floor(t)),o=Math.floor(.5*t);e.beginPath();let s=Math.round(i.C*r);for(let r=n.length;r--;){let i=Math.round(n[r].coord*t);e.rect(i-o,0,a,s)}e.fill()})),e.useMediaCoordinateSpace((({context:e})=>{let t=i.S+i.C+i.A+i.k/2;e.textAlign=`center`,e.textBaseline=`middle`,e.fillStyle=this.H(),e.font=this.Sm();for(let i of n)if(i.weight<r){let n=i.needAlignCoordinate?this.Kw(e,i.coord,i.label):i.coord;e.fillText(i.label,n,t)}this.qv.N().timeScale.allowBoldLabels&&(e.font=this.Zw());for(let i of n)if(i.weight>=r){let n=i.needAlignCoordinate?this.Kw(e,i.coord,i.label):i.coord;e.fillText(i.label,n,t)}}))}Kw(e,t,n){let r=this.im.Ii(e,n),i=r/2,a=Math.floor(t-i)+.5;return a<0?t+=Math.abs(0-a):a+r>this.Qv.width&&(t-=Math.abs(this.Qv.width-(a+r))),t}qw(e,t){let n=this.Uw();for(let r of e)for(let e of r.dn())e.Tt().st(t,n)}Yw(){return this.qv.N().timeScale.borderColor}H(){return this.yn.textColor}F(){return this.yn.fontSize}Sm(){return pe(this.F(),this.yn.fontFamily)}Zw(){return pe(this.F(),this.yn.fontFamily,`bold`)}Uw(){this.M===null&&(this.M={S:1,L:NaN,A:NaN,I:NaN,tn:NaN,C:5,k:NaN,P:``,Qi:new Ke,$w:0});let e=this.M,t=this.Sm();if(e.P!==t){let n=this.F();e.k=n,e.P=t,e.A=3*n/12,e.I=3*n/12,e.tn=9*n/12,e.L=0,e.$w=4*n/12,e.Qi.Os()}return this.M}Em(e){this.lv.style.cursor=e===1?`ew-resize`:`default`}zw(){let e=this.qv.Qt(),t=e.N();t.leftPriceScale.visible||this.Dw===null||(this.Ew.removeChild(this.Dw.uv()),this.Dw.m(),this.Dw=null),t.rightPriceScale.visible||this.Iw===null||(this.Aw.removeChild(this.Iw.uv()),this.Iw.m(),this.Iw=null);let n={Zd:this.qv.Qt().Zd()},r=()=>t.leftPriceScale.borderVisible&&e.Et().N().borderVisible,i=()=>e.ef();t.leftPriceScale.visible&&this.Dw===null&&(this.Dw=new vr(`left`,t,n,r,i),this.Ew.appendChild(this.Dw.uv())),t.rightPriceScale.visible&&this.Iw===null&&(this.Iw=new vr(`right`,t,n,r,i),this.Aw.appendChild(this.Iw.uv()))}},wr=!!G&&!!navigator.userAgentData&&navigator.userAgentData.brands.some((e=>e.brand.includes(`Chromium`)))&&!!G&&(navigator?.userAgentData?.platform?navigator.userAgentData.platform===`Windows`:navigator.userAgent.toLowerCase().indexOf(`win`)>=0),Tr=class{constructor(e,t,n){var r;this.Gw=[],this.Xw=[],this.Jw=0,this.ho=0,this.C_=0,this.Qw=0,this.tM=0,this.iM=null,this.nM=!1,this.Wm=new M,this.Hm=new M,this.pd=new M,this.sM=null,this.eM=null,this.jv=e,this.yn=t,this.xu=n,this.Hv=document.createElement(`div`),this.Hv.classList.add(`tv-lightweight-charts`),this.Hv.style.overflow=`hidden`,this.Hv.style.direction=`ltr`,this.Hv.style.width=`100%`,this.Hv.style.height=`100%`,(r=this.Hv).style.userSelect=`none`,r.style.webkitUserSelect=`none`,r.style.msUserSelect=`none`,r.style.MozUserSelect=`none`,r.style.webkitTapHighlightColor=`transparent`,this.rM=document.createElement(`table`),this.rM.setAttribute(`cellspacing`,`0`),this.Hv.appendChild(this.rM),this.hM=this.aM.bind(this),Er(this.yn)&&this.lM(!0),this.sn=new Dn(this.md.bind(this),this.yn,n),this.Qt().Dd().i(this.oM.bind(this),this),this._M=new Cr(this,this.xu),this.rM.appendChild(this._M.uv());let i=t.autoSize&&this.uM(),a=this.yn.width,o=this.yn.height;if(i||a===0||o===0){let t=e.getBoundingClientRect();a||=t.width,o||=t.height}this.cM(a,o),this.dM(),e.appendChild(this.Hv),this.fM(),this.sn.Et().Zc().i(this.sn.Pa.bind(this.sn),this),this.sn.L_().i(this.sn.Pa.bind(this.sn),this)}Qt(){return this.sn}N(){return this.yn}rv(){return this.Gw}pM(){return this._M}m(){this.lM(!1),this.Jw!==0&&window.cancelAnimationFrame(this.Jw),this.sn.Dd().u(this),this.sn.Et().Zc().u(this),this.sn.L_().u(this),this.sn.m();for(let e of this.Gw)this.rM.removeChild(e.uv()),e.dw().u(this),e.fw().u(this),e.m();this.Gw=[];for(let e of this.Xw)this.vM(e);this.Xw=[],A(this._M).m(),this.Hv.parentElement!==null&&this.Hv.parentElement.removeChild(this.Hv),this.pd.m(),this.Wm.m(),this.Hm.m(),this.mM()}cM(e,t,n=!1){if(this.ho===t&&this.C_===e)return;let r=function(e){let t=Math.floor(e.width),n=Math.floor(e.height);return v({width:t-t%2,height:n-n%2})}(v({width:e,height:t}));this.ho=r.height,this.C_=r.width;let i=this.ho+`px`,a=this.C_+`px`;if(this.wM()||(A(this.Hv).style.height=i,A(this.Hv).style.width=a),this.rM.style.height=i,this.rM.style.width=a,n){this.Jw!==0&&(window.cancelAnimationFrame(this.Jw),this.Jw=0),this.nM=!1;let e=L.ys();this.iM!==null&&(e.Ss(this.iM),this.iM=null),this.MM(e,performance.now())}else this.sn.Pa()}km(e){e===void 0&&(e=L.ys());for(let t=0;t<this.Gw.length;t++)this.Gw[t].km(e._s(t).rs);this.yn.timeScale.visible&&this._M.km(e.ls())}vr(e){let t=Er(this.yn);this.sn.vr(e);let n=Er(this.yn);n!==t&&this.lM(n),e.layout?.panes&&this.gM(),this.fM(),this.bM(e)}dw(){return this.Wm}fw(){return this.Hm}Dd(){return this.pd}SM(e=!1){this.iM!==null&&(this.MM(this.iM,performance.now()),this.iM=null);let t=this.xM(null),n=document.createElement(`canvas`);n.width=t.width,n.height=t.height;let r=A(n.getContext(`2d`));return this.xM(r,e),n}CM(e){return e===`left`&&!this.yM()||e===`right`&&!this.kM()||this.Gw.length===0?0:A(e===`left`?this.Gw[0].Sw():this.Gw[0].xw()).ym()}wM(){return this.yn.autoSize&&this.sM!==null}vv(){return this.Hv}PM(e){this.eM=e,this.eM?this.vv().style.setProperty(`cursor`,e):this.vv().style.removeProperty(`cursor`)}TM(){return this.eM}RM(e){return k(this.Gw[e]).cv()}gM(){this.Xw.forEach((e=>{e.kt()}))}bM(e){(e.autoSize!==void 0||!this.sM||e.width===void 0&&e.height===void 0)&&(e.autoSize&&!this.sM&&this.uM(),!1===e.autoSize&&this.sM!==null&&this.mM(),e.autoSize||e.width===void 0&&e.height===void 0||this.cM(e.width||this.C_,e.height||this.ho))}xM(e,t){let n=0,r=0,i=this.Gw[0],a=(n,r)=>{let i=0;for(let a=0;a<this.Gw.length;a++){let o=this.Gw[a],s=A(n===`left`?o.Sw():o.xw()),c=s.dv();if(e!==null&&s.fv(e,r,i,t),i+=c.height,a<this.Gw.length-1){let t=this.Xw[a],n=t.dv();e!==null&&t.fv(e,r,i),i+=n.height}}};this.yM()&&(a(`left`,0),n+=A(i.Sw()).dv().width);for(let i=0;i<this.Gw.length;i++){let a=this.Gw[i],o=a.dv();if(e!==null&&a.fv(e,n,r,t),r+=o.height,i<this.Gw.length-1){let t=this.Xw[i],a=t.dv();e!==null&&t.fv(e,n,r),r+=a.height}}n+=i.dv().width,this.kM()&&(a(`right`,n),n+=A(i.xw()).dv().width);let o=(t,n,r)=>{A(t===`left`?this._M.Ow():this._M.Nw()).fv(A(e),n,r)};if(this.yn.timeScale.visible){let n=this._M.dv();if(e!==null){let a=0;this.yM()&&(o(`left`,a,r),a=A(i.Sw()).dv().width),this._M.fv(e,a,r,t),a+=n.width,this.kM()&&o(`right`,a,r)}r+=n.height}return v({width:n,height:r})}DM(){let e=0,t=0,n=0;for(let r of this.Gw)this.yM()&&(t=Math.max(t,A(r.Sw()).bm(),this.yn.leftPriceScale.minimumWidth)),this.kM()&&(n=Math.max(n,A(r.xw()).bm(),this.yn.rightPriceScale.minimumWidth)),e+=r.z_();t=Xn(t),n=Xn(n);let r=this.C_,i=this.ho,a=Math.max(r-t-n,0),o=1*this.Xw.length,s=this.yn.timeScale.visible,c=s?Math.max(this._M.Hw(),this.yn.timeScale.minimumHeight):0;var l;c=(l=c)+l%2;let u=o+c,d=i<u?0:i-u,f=d/e,p=0,m=window.devicePixelRatio||1;for(let e=0;e<this.Gw.length;++e){let r=this.Gw[e];r.iw(this.sn.Zn()[e]);let i=0,o=0;o=e===this.Gw.length-1?Math.ceil((d-p)*m)/m:Math.round(r.z_()*f*m)/m,i=Math.max(o,2),p+=i,r.Cm(v({width:a,height:i})),this.yM()&&r.mw(t,`left`),this.kM()&&r.mw(n,`right`),r.Sv()&&this.sn.Id(r.Sv(),i)}this._M.Ww(v({width:s?a:0,height:c}),s?t:0,s?n:0),this.sn.N_(a),this.Qw!==t&&(this.Qw=t),this.tM!==n&&(this.tM=n)}lM(e){e?this.Hv.addEventListener(`wheel`,this.hM,{passive:!1}):this.Hv.removeEventListener(`wheel`,this.hM)}IM(e){switch(e.deltaMode){case e.DOM_DELTA_PAGE:return 120;case e.DOM_DELTA_LINE:return 32}return wr?1/window.devicePixelRatio:1}aM(e){if(!(e.deltaX!==0&&this.yn.handleScroll.mouseWheel||e.deltaY!==0&&this.yn.handleScale.mouseWheel))return;let t=this.IM(e),n=t*e.deltaX/100,r=-t*e.deltaY/100;if(e.cancelable&&e.preventDefault(),r!==0&&this.yn.handleScale.mouseWheel){let t=Math.sign(r)*Math.min(1,Math.abs(r)),n=e.clientX-this.Hv.getBoundingClientRect().left;this.Qt().Od(n,t)}n!==0&&this.yn.handleScroll.mouseWheel&&this.Qt().Nd(-80*n)}MM(e,t){let n=e.ls();n===3&&this.VM(),n!==3&&n!==2||(this.BM(e),this.EM(e,t),this._M.kt(),this.Gw.forEach((e=>{e.sw()})),this.iM?.ls()===3&&(this.iM.Ss(e),this.VM(),this.BM(this.iM),this.EM(this.iM,t),e=this.iM,this.iM=null)),this.km(e)}EM(e,t){for(let n of e.bs())this.xs(n,t)}BM(e){let t=this.sn.Zn();for(let n=0;n<t.length;n++)e._s(n).hs&&t[n].ru()}xs(e,t){let n=this.sn.Et();switch(e.ds){case 0:n.Xc();break;case 1:n.Jc(e.Wt);break;case 2:n.Ms(e.Wt);break;case 3:n.gs(e.Wt);break;case 4:n.Oc();break;case 5:e.Wt.jc(t)||n.gs(e.Wt.qc(t))}}md(e){this.iM===null?this.iM=e:this.iM.Ss(e),this.nM||(this.nM=!0,this.Jw=window.requestAnimationFrame((e=>{if(this.nM=!1,this.Jw=0,this.iM!==null){let t=this.iM;this.iM=null,this.MM(t,e);for(let n of t.bs())if(n.ds===5&&!n.Wt.jc(e)){this.Qt().ps(n.Wt);break}}})))}VM(){this.dM()}vM(e){this.rM.removeChild(e.uv()),e.m()}dM(){let e=this.sn.Zn(),t=e.length,n=this.Gw.length;for(let e=t;e<n;e++){let e=k(this.Gw.pop());this.rM.removeChild(e.uv()),e.dw().u(this),e.fw().u(this),e.m();let t=this.Xw.pop();t!==void 0&&this.vM(t)}for(let r=n;r<t;r++){let t=new _r(this,e[r]);if(t.dw().i(this.AM.bind(this,t),this),t.fw().i(this.LM.bind(this,t),this),this.Gw.push(t),r>0){let e=new nr(this,r-1,r);this.Xw.push(e),this.rM.insertBefore(e.uv(),this._M.uv())}this.rM.insertBefore(t.uv(),this._M.uv())}for(let n=0;n<t;n++){let t=e[n],r=this.Gw[n];r.Sv()===t?r.tw():r.iw(t)}this.fM(),this.DM()}zM(e,t,n,r){let i=new Map;e!==null&&this.sn.Jn().forEach((t=>{let n=t.Un().Hn(e);n!==null&&i.set(t,n)}));let a;if(e!==null){let t=this.sn.Et().en(e)?.originalTime;t!==void 0&&(a=t)}let o=this.Qt().ou(),s=this.OM(r),c=function(e,t){let n=e!==null&&e.lu instanceof It?e.lu:void 0,r=e?.wu?.te,i=t!==void 0&&t!==-1?t:void 0;return e===null||e.ee===void 0?{NM:n,FM:r}:{NM:n,FM:r,WM:{ds:e.ee,HM:(a=e.lu,o=e.ee,a instanceof sn?`pane-primitive`:o===`marker`||o===`primitive`?`series-primitive`:`series`),UM:Yn(e.ee,r),U_:n,$M:r,jM:i}};var a,o}(o,s);return{Qr:a,$n:e??void 0,qM:t??void 0,jM:s===-1?void 0:s,NM:c.NM,YM:i,FM:c.FM,WM:c.WM,KM:n??void 0}}OM(e){let t=-1;if(e)t=this.Gw.indexOf(e);else{let e=this.Qt().Rd().Kn();e!==null&&(t=this.Qt().Zn().indexOf(e))}return t}AM(e,t,n,r){this.Wm.p((()=>this.zM(t,n,r,e)))}LM(e,t,n,r){this.Hm.p((()=>this.zM(t,n,r,e)))}oM(e,t,n){this.PM(this.Qt().ou()?.mu??null),this.pd.p((()=>this.zM(e,t,n)))}fM(){let e=this.yn.timeScale.visible?``:`none`;this._M.uv().style.display=e}yM(){return this.Gw[0].Sv().K_().N().visible}kM(){return this.Gw[0].Sv().Z_().N().visible}uM(){return`ResizeObserver`in window&&(this.sM=new ResizeObserver((e=>{let t=e[e.length-1];if(!t)return;let n=t.contentRect.width,r=t.contentRect.height;this.cM(n,r,!0)})),this.sM.observe(this.jv,{box:`border-box`}),!0)}mM(){this.sM!==null&&this.sM.disconnect(),this.sM=null}};function Er(e){return!!(e.handleScroll.mouseWheel||e.handleScale.mouseWheel)}function Dr(e){return e.open===void 0&&e.value===void 0}function Or(e){return function(e){return e.open!==void 0}(e)||function(e){return e.value!==void 0}(e)}function kr(e,t,n,r){let i=n.value,a={$n:t,wt:e,Wt:[i,i,i,i],Qr:r};return n.color!==void 0&&(a.R=n.color),a}function Ar(e,t,n,r){let i=n.value,a={$n:t,wt:e,Wt:[i,i,i,i],Qr:r};return n.lineColor!==void 0&&(a.vt=n.lineColor),n.topColor!==void 0&&(a.ah=n.topColor),n.bottomColor!==void 0&&(a.oh=n.bottomColor),a}function jr(e,t,n,r){let i=n.value,a={$n:t,wt:e,Wt:[i,i,i,i],Qr:r};return n.topLineColor!==void 0&&(a._h=n.topLineColor),n.bottomLineColor!==void 0&&(a.uh=n.bottomLineColor),n.topFillColor1!==void 0&&(a.dh=n.topFillColor1),n.topFillColor2!==void 0&&(a.fh=n.topFillColor2),n.bottomFillColor1!==void 0&&(a.ph=n.bottomFillColor1),n.bottomFillColor2!==void 0&&(a.mh=n.bottomFillColor2),a}function Mr(e,t,n,r){let i={$n:t,wt:e,Wt:[n.open,n.high,n.low,n.close],Qr:r};return n.color!==void 0&&(i.R=n.color),i}function Nr(e,t,n,r){let i={$n:t,wt:e,Wt:[n.open,n.high,n.low,n.close],Qr:r};return n.color!==void 0&&(i.R=n.color),n.borderColor!==void 0&&(i.Ht=n.borderColor),n.wickColor!==void 0&&(i.hh=n.wickColor),i}function Pr(e,t,n,r,i){let a=k(i)(n),o=Math.max(...a),s=Math.min(...a),c=a[a.length-1],l=[c,o,s,c],{time:u,color:d,...f}=n;return{$n:t,wt:e,Wt:l,Qr:r,ue:f,R:d}}function X(e){return e.Wt!==void 0}function Fr(e,t){return t.customValues!==void 0&&(e.ZM=t.customValues),e}function Z(e){return(t,n,r,i,a,o)=>function(e,t){return t?t(e):Dr(e)}(r,o)?Fr({wt:t,$n:n,Qr:i},r):Fr(e(t,n,r,i,a),r)}function Ir(e){return{Candlestick:Z(Nr),Bar:Z(Mr),Area:Z(Ar),Baseline:Z(jr),Histogram:Z(kr),Line:Z(kr),Custom:Z(Pr)}[e]}function Lr(e){return{$n:0,GM:new Map,za:e}}function Rr(e,t){if(e!==void 0&&e.length!==0)return{XM:t.key(e[0].wt),JM:t.key(e[e.length-1].wt)}}function zr(e){let t;return e.forEach((e=>{t===void 0&&(t=e.Qr)})),k(t)}var Br=class{constructor(e){this.QM=new Map,this.tg=new Map,this.ig=new Map,this.ng=[],this.xu=e}m(){this.QM.clear(),this.tg.clear(),this.ig.clear(),this.ng=[]}sg(e,t){let n=this.QM.size!==0,r=!1,i=this.tg.get(e);if(i!==void 0)if(this.tg.size===1)n=!1,r=!0,this.QM.clear();else for(let t of this.ng)t.pointData.GM.delete(e)&&(r=!0);let a=[];if(t.length!==0){let n=t.map((e=>e.time)),i=this.xu.createConverterToInternalObj(t),o=Ir(e.bh()),s=e.ll(),c=e.ol();a=t.map(((t,a)=>{let l=i(t.time),u=this.xu.key(l),d=this.QM.get(u);d===void 0&&(d=Lr(l),this.QM.set(u,d),r=!0);let f=o(l,d.$n,t,n[a],s,c);return d.GM.set(e,f),f}))}n&&this.eg(),this.rg(e,a);let o=-1;if(r){let e=[];this.QM.forEach((t=>{e.push({timeWeight:0,time:t.za,pointData:t,originalTime:zr(t.GM)})})),e.sort(((e,t)=>this.xu.key(e.time)-this.xu.key(t.time))),o=this.hg(e)}return this.ag(e,o,function(e,t,n){let r=Rr(e,n),i=Rr(t,n);if(r!==void 0&&i!==void 0)return{lg:!1,Ia:r.JM>=i.JM&&r.XM>=i.XM}}(this.tg.get(e),i,this.xu))}Jd(e){return this.sg(e,[])}og(e,t,n){if(n&&e.Na())throw Error(`Historical updates are not supported when conflation is enabled. Conflation requires data to be processed in order.`);let r=t;(function(e){e.Qr===void 0&&(e.Qr=e.time)})(r),this.xu.preprocessData(t);let i=this.xu.createConverterToInternalObj([t])(t.time),a=this.ig.get(e);if(!n&&a!==void 0&&this.xu.key(i)<this.xu.key(a))throw Error(`Cannot update oldest data, last time=${a}, new time=${i}`);let o=this.QM.get(this.xu.key(i));if(n&&o===void 0)throw Error(`Cannot update non-existing data point when historicalUpdate is true`);let s=o===void 0;o===void 0&&(o=Lr(i),this.QM.set(this.xu.key(i),o));let c=Ir(e.bh()),l=e.ll(),u=e.ol(),d=c(i,o.$n,t,r.Qr,l,u),f=!n&&!s&&a!==void 0&&this.xu.key(i)===this.xu.key(a);o.GM.set(e,d),n?this._g(e,d,o.$n):(f&&e.Na()&&X(d)&&e.Rr(d),this.ug(e,d));let p={Ia:X(d),lg:n};if(!s)return this.ag(e,-1,p);let m={timeWeight:0,time:o.za,pointData:o,originalTime:zr(o.GM)},h=B(this.ng,this.xu.key(m.time),((e,t)=>this.xu.key(e.time)<t));this.ng.splice(h,0,m);for(let e=h;e<this.ng.length;++e)Vr(this.ng[e].pointData,e);return this.xu.fillWeightsForPoints(this.ng,h),this.ag(e,h,p)}cg(e,t){let n=this.tg.get(e);if(n===void 0||t<=0)return[[],this.dg()];t=Math.min(t,n.length);let r=n.splice(-t).reverse();n.length===0?this.ig.delete(e):this.ig.set(e,n[n.length-1].wt);for(let t of r){let n=this.QM.get(this.xu.key(t.wt));if(n&&(n.GM.delete(e),n.GM.size===0)){this.QM.delete(this.xu.key(n.za)),this.ng.splice(n.$n,1);for(let e=n.$n;e<this.ng.length;++e)Vr(this.ng[e].pointData,e)}}return[r,this.ag(e,this.ng.length-1,{lg:!1,Ia:!1})]}ug(e,t){let n=this.tg.get(e);n===void 0&&(n=[],this.tg.set(e,n));let r=n.length===0?null:n[n.length-1];r===null||this.xu.key(t.wt)>this.xu.key(r.wt)?X(t)&&n.push(t):X(t)?n[n.length-1]=t:n.splice(-1,1),this.ig.set(e,t.wt)}_g(e,t,n){let r=this.tg.get(e);if(r===void 0)return;let i=B(r,n,((e,t)=>e.$n<t));X(t)?r[i]=t:r.splice(i,1)}rg(e,t){t.length===0?(this.tg.delete(e),this.ig.delete(e)):(this.tg.set(e,t.filter(X)),this.ig.set(e,t[t.length-1].wt))}eg(){for(let e of this.ng)e.pointData.GM.size===0&&this.QM.delete(this.xu.key(e.time))}hg(e){let t=-1;for(let n=0;n<this.ng.length&&n<e.length;++n){let r=this.ng[n],i=e[n];if(this.xu.key(r.time)!==this.xu.key(i.time)){t=n;break}i.timeWeight=r.timeWeight,Vr(i.pointData,n)}if(t===-1&&this.ng.length!==e.length&&(t=Math.min(this.ng.length,e.length)),t===-1)return-1;for(let n=t;n<e.length;++n)Vr(e[n].pointData,n);return this.xu.fillWeightsForPoints(e,t),this.ng=e,t}fg(){if(this.tg.size===0)return null;let e=0;return this.tg.forEach((t=>{t.length!==0&&(e=Math.max(e,t[t.length-1].$n))})),e}ag(e,t,n){let r=this.dg();if(t!==-1)this.tg.forEach(((t,i)=>{r.U_.set(i,{ue:t,pg:i===e?n:void 0})})),this.tg.has(e)||r.U_.set(e,{ue:[],pg:n}),r.Et.vg=this.ng,r.Et.mg=t;else{let t=this.tg.get(e);r.U_.set(e,{ue:t||[],pg:n})}return r}dg(){return{U_:new Map,Et:{Pc:this.fg()}}}};function Vr(e,t){e.$n=t,e.GM.forEach((e=>{e.$n=t}))}function Hr(e,t){return e._t<t}function Ur(e,t){return t<e._t}function Wr(e,t,n,r){return B(e,t,Hr,n,r)}function Gr(e,t,n,r){return ht(e,t,Ur,n,r)}function Kr(e,t,n){return{ne:e,se:t,ee:n}}function qr(e,t,n,r){return e>=t-r&&e<=n+r}function Jr(e,t,n,r,i,a){let o=i-n,s=a-r;if(o===0&&s===0)return Math.hypot(e-n,t-r);let c=((e-n)*o+(t-r)*s)/(o*o+s*s),l=Math.max(0,Math.min(1,c)),u=n+o*l,d=r+s*l;return Math.hypot(e-u,t-d)}var Yr=[0,0];function Xr(e,t,n){return t===void 0||t.wt!==e.wt-1?e._t-n/2:(t._t+e._t)/2}function Zr(e,t,n){return t===void 0||t.wt!==e.wt+1?e._t+n/2:(e._t+t._t)/2}function Qr(e,t,n,r,i,a,o){if(t===null||t.from>=t.to||e.length===0)return null;let s=i/2+a,c=Wr(e,n-s,t.from,t.to),l=Gr(e,n+s,c,t.to);if(c>=l)return null;let u=1/0;for(let s=c;s<l;s++){let c=e[s],l=s>t.from?e[s-1]:void 0,d=s<t.to-1?e[s+1]:void 0,f=Xr(c,l,i)-a,p=Zr(c,d,i)+a;if(n<f||n>p)continue;o(c,Yr);let m=Yr[0],h=Yr[1],g=Math.min(m,h),ee=Math.max(m,h),_=g-a,v=ee+a;if(r>=g&&r<=ee)u=Math.min(u,0);else if(r>=_&&r<=v){let e=Math.min(Math.abs(r-g),Math.abs(ee-r));u=Math.min(u,e)}}return Number.isFinite(u)?Kr(u,0,`series-range`):null}function $r(e,t){return e.wt<t}function ei(e,t){return t<e.wt}function ti(e,t,n){let r=t.Oa(),i=t.bi(),a=B(e,r,$r),o=ht(e,i,ei);if(!n)return{from:a,to:o};let s=a,c=o;return a>0&&a<e.length&&e[a].wt>=r&&(s=a-1),o>0&&o<e.length&&e[o-1].wt<=i&&(c=o+1),{from:s,to:c}}var ni=class{constructor(e,t,n){this.wg=!0,this.Mg=!0,this.gg=!0,this.bg=[],this.Sg=null,this.xg=-1,this.ae=e,this.le=t,this.Cg=n}kt(e){this.wg=!0,e===`data`&&(this.Mg=!0),e===`options`&&(this.gg=!0)}Tt(){return this.ae.It()?(this.yg(),this.Sg===null?null:this.kg):null}Qs(e,t){return this.ae.It()?(this.yg(),this.Sg===null?null:this.Pg(e,t)):null}Pg(e,t){return null}Tg(){this.bg=this.bg.map((e=>({...e,...this.ae.Sa().Sh(e.wt)})))}Rg(){this.Sg=null}yg(){let e=this.le.Et(),t=e.N().enableConflation?e.Qc():0;t!==this.xg&&(this.Mg=!0,this.xg=t),this.Mg&&=(this.Dg(),!1),this.gg&&=(this.Tg(),!1),this.wg&&=(this.Ig(),!1)}Ig(){let e=this.ae.Ft(),t=this.le.Et();if(this.Rg(),t.Gi()||e.Gi())return;let n=t.Ee();if(n===null||this.ae.Un().Th()===0)return;let r=this.ae.Lt();r!==null&&(this.Sg=ti(this.bg,n,this.Cg),this.Vg(e,t,r.Wt),this.Bg())}},ri=class{constructor(e,t){this.Eg=e,this.Ki=t}st(e,t,n){this.Eg.draw(e,this.Ki,t,n)}};function ii(e){switch(e){case`point`:return 2;case`range`:return 0;default:return 1}}var ai=class extends ni{constructor(e,t,n){super(e,t,!1),this.Yh=n,this.Eg=this.Yh.renderer(),this.kg=new ri(this.Eg,(e=>this.Ag(e)))}get ga(){return this.Yh.conflationReducer}Wa(e){return this.Yh.priceValueBuilder(e)}_l(e){return this.Yh.isWhitespace(e)}Pg(e,t){let n=this.Eg.hitTest?.(e,t,(e=>this.Ag(e)));if(n!=null)return{ne:(r=n).distance,se:ii(r.type),ee:`custom`,mu:r.cursorStyle,te:r.objectId,ie:r.hitTestData};var r;let i=Qr(this.bg,this.Sg,e,t,this.le.Et().fl(),this.ae.N().hitTestTolerance,((e,t)=>{let n=e.Lg,r=NaN,i=NaN;if(n!==void 0&&!this.Yh.isWhitespace(n))for(let e of this.Yh.priceValueBuilder(n)){let t=this.Ag(e);t!==null&&(r=Number.isNaN(r)?t:Math.min(r,t),i=Number.isNaN(i)?t:Math.max(i,t))}t[0]=r,t[1]=i}));return i===null?null:{...i,ee:`custom`}}Dg(){let e=this.ae.Sa();this.bg=this.ae.Ha().Bh().map((t=>({wt:t.$n,_t:NaN,...e.Sh(t.$n),Lg:t.ue})))}Vg(e,t){t.Tc(this.bg,de(this.Sg))}Bg(){this.Yh.update({bars:this.bg.map(oi),barSpacing:this.le.Et().fl(),visibleRange:this.Sg,conflationFactor:this.le.Et().Qc()},this.ae.N())}Ag(e){let t=this.ae.Lt();return t===null?null:this.ae.Ft().Nt(e,t.Wt)}};function oi(e){return{x:e._t,time:e.wt,originalData:e.Lg,barColor:e.sh}}var si={color:`#2196f3`},ci=(e,t,n)=>new ai(e,t,j(n));function li(e){let t={value:e.Wt[3],time:e.Qr};return e.ZM!==void 0&&(t.customValues=e.ZM),t}function ui(e){let t=li(e);return e.R!==void 0&&(t.color=e.R),t}function di(e){let t=li(e);return e.vt!==void 0&&(t.lineColor=e.vt),e.ah!==void 0&&(t.topColor=e.ah),e.oh!==void 0&&(t.bottomColor=e.oh),t}function fi(e){let t=li(e);return e._h!==void 0&&(t.topLineColor=e._h),e.uh!==void 0&&(t.bottomLineColor=e.uh),e.dh!==void 0&&(t.topFillColor1=e.dh),e.fh!==void 0&&(t.topFillColor2=e.fh),e.ph!==void 0&&(t.bottomFillColor1=e.ph),e.mh!==void 0&&(t.bottomFillColor2=e.mh),t}function pi(e){let t={open:e.Wt[0],high:e.Wt[1],low:e.Wt[2],close:e.Wt[3],time:e.Qr};return e.ZM!==void 0&&(t.customValues=e.ZM),t}function mi(e){let t=pi(e);return e.R!==void 0&&(t.color=e.R),t}function hi(e){let t=pi(e),{R:n,Ht:r,hh:i}=e;return n!==void 0&&(t.color=n),r!==void 0&&(t.borderColor=r),i!==void 0&&(t.wickColor=i),t}function gi(e){return{Area:di,Line:ui,Baseline:fi,Histogram:ui,Bar:mi,Candlestick:hi,Custom:_i}[e]}function _i(e){let t=e.Qr;return{...e.ue,time:t}}var vi={vertLine:{color:`#9598A1`,width:1,style:3,visible:!0,labelVisible:!0,labelBackgroundColor:`#131722`},horzLine:{color:`#9598A1`,width:1,style:3,visible:!0,labelVisible:!0,labelBackgroundColor:`#131722`},mode:1,doNotSnapToHiddenSeriesIndices:!1},yi={vertLines:{color:`#D6DCDE`,style:0,visible:!0},horzLines:{color:`#D6DCDE`,style:0,visible:!0}},bi={background:{type:`solid`,color:`#FFFFFF`},textColor:`#191919`,fontSize:12,fontFamily:fe,panes:{enableResize:!0,separatorColor:`#E0E3EB`,separatorHoverColor:`rgba(178, 181, 189, 0.2)`},attributionLogo:!0,colorSpace:`srgb`,colorParsers:[]},xi={autoScale:!0,mode:0,invertScale:!1,alignLabels:!0,borderVisible:!0,borderColor:`#2B2B43`,entireTextOnly:!1,visible:!1,ticksVisible:!1,scaleMargins:{bottom:.1,top:.2},minimumWidth:0,ensureEdgeTickMarksVisible:!1,tickMarkDensity:2.5},Si={rightOffset:0,barSpacing:6,minBarSpacing:.5,maxBarSpacing:0,fixLeftEdge:!1,fixRightEdge:!1,lockVisibleTimeRangeOnResize:!1,rightBarStaysOnScroll:!1,borderVisible:!0,borderColor:`#2B2B43`,visible:!0,timeVisible:!1,secondsVisible:!0,shiftVisibleRangeOnNewBar:!0,allowShiftVisibleRangeOnWhitespaceReplacement:!1,ticksVisible:!1,uniformDistribution:!1,minimumHeight:0,allowBoldLabels:!0,ignoreWhitespaceIndices:!1,enableConflation:!1,conflationThresholdFactor:1,precomputeConflationOnInit:!1,precomputeConflationPriority:`background`};function Ci(){return{addDefaultPane:!0,hoveredSeriesOnTop:!0,width:0,height:0,autoSize:!1,layout:bi,crosshair:vi,grid:yi,overlayPriceScales:{...xi},leftPriceScale:{...xi,visible:!1},rightPriceScale:{...xi,visible:!0},defaultVisiblePriceScaleId:`right`,timeScale:Si,localization:{locale:G?navigator.language:``,dateFormat:`dd MMM 'yy`},handleScroll:{mouseWheel:!0,pressedMouseMove:!0,horzTouchDrag:!0,vertTouchDrag:!0},handleScale:{axisPressedMouseMove:{time:!0,price:!0},axisDoubleClickReset:{time:!0,price:!0},mouseWheel:!0,pinch:!0},kineticScroll:{mouse:!1,touch:!0},trackingMode:{exitMode:1}}}var wi=class{constructor(e,t,n){this.sv=e,this.zg=t,this.Og=n??0}applyOptions(e){this.sv.Qt().Pd(this.zg,e,this.Og)}options(){return this.Ki().N()}width(){return ze(this.zg)?this.sv.CM(this.zg):0}setVisibleRange(e){this.setAutoScale(!1),this.Ki().qo(new z(e.from,e.to))}getVisibleRange(){let e,t,n=this.Ki().ar();if(n===null)return null;if(this.Ki().so()){let r=this.Ki().M_(),i=On(r);n=W(n,this.Ki().ro()),e=Number((Math.round(n.Je()/r)*r).toFixed(i)),t=Number((Math.round(n.Qe()/r)*r).toFixed(i))}else e=n.Je(),t=n.Qe();return{from:e,to:t}}setAutoScale(e){this.applyOptions({autoScale:e})}Ki(){return A(this.sv.Qt().Td(this.zg,this.Og)).Ft}},Ti=class{constructor(e,t,n,r){this.sv=e,this.yt=n,this.Ng=t,this.Fg=r}getHeight(){return this.yt.$t()}setHeight(e){let t=this.sv.Qt(),n=t.hf(this.yt);t.Bd(n,e)}getStretchFactor(){return this.yt.z_()}setStretchFactor(e){this.yt.O_(e),this.sv.Qt().Pa()}paneIndex(){return this.sv.Qt().hf(this.yt)}moveTo(e){let t=this.paneIndex();t!==e&&(O(e>=0&&e<this.sv.rv().length,`Invalid pane index`),this.sv.Qt().Ad(t,e))}getSeries(){return this.yt.U_().map((e=>this.Ng(e)))??[]}getHTMLElement(){let e=this.sv.rv();return e&&e.length!==0&&e[this.paneIndex()]?e[this.paneIndex()].uv():null}attachPrimitive(e){this.yt.hl(e),e.attached&&e.attached({chart:this.Fg,requestUpdate:()=>this.yt.Qt().Pa()})}detachPrimitive(e){this.yt.al(e)}priceScale(e){if(this.yt.A_(e)===null)throw Error(`Cannot find price scale with id: ${e}`);return new wi(this.sv,e,this.paneIndex())}setPreserveEmptyPane(e){this.yt.W_(e)}preserveEmptyPane(){return this.yt.H_()}addCustomSeries(e,t={},n=0){return this.Fg.addCustomSeries(e,t,n)}addSeries(e,t={}){return this.Fg.addSeries(e,t,this.paneIndex())}},Ei={color:`#FF0000`,price:0,lineStyle:2,lineWidth:1,lineVisible:!0,axisLabelVisible:!0,title:``,axisLabelColor:``,axisLabelTextColor:``},Di=class{constructor(e){this._r=e}applyOptions(e){this._r.vr(e)}options(){return this._r.N()}Wg(){return this._r}},Oi=class{constructor(e,t,n,r,i,a){this.Hg=new M,this.ae=e,this.Ug=t,this.$g=n,this.xu=i,this.Fg=r,this.jg=a}m(){this.Hg.m()}priceFormatter(){return this.ae.tl()}priceToCoordinate(e){let t=this.ae.Lt();return t===null?null:this.ae.Ft().Nt(e,t.Wt)}coordinateToPrice(e){let t=this.ae.Lt();return t===null?null:this.ae.Ft().Tn(e,t.Wt)}barsInLogicalRange(e){if(e===null)return null;let t=new yn(new gn(e.from,e.to)).Fu(),n=this.ae.Un();if(n.Gi())return null;let r=n.Hn(t.Oa(),1),i=n.Hn(t.bi(),-1),a=A(n.Rh()),o=A(n.Qn());if(r!==null&&i!==null&&r.$n>i.$n)return{barsBefore:e.from-a,barsAfter:o-e.to};let s={barsBefore:r===null||r.$n===a?e.from-a:r.$n-a,barsAfter:i===null||i.$n===o?o-e.to:o-i.$n};return r!==null&&i!==null&&(s.from=r.Qr,s.to=i.Qr),s}setData(e){this.xu,this.ae.bh(),this.Ug.qg(this.ae,e),this.Yg(`full`)}update(e,t=!1){this.ae.bh(),this.Ug.Kg(this.ae,e,t),this.Yg(`update`)}pop(e=1){let t=this.Ug.Zg(this.ae,e);t.length!==0&&this.Yg(`update`);let n=gi(this.seriesType());return t.map((e=>n(e)))}dataByIndex(e,t){let n=this.ae.Un().Hn(e,t);return n===null?null:gi(this.seriesType())(n)}data(){let e=gi(this.seriesType());return this.ae.Un().Bh().map((t=>e(t)))}subscribeDataChanged(e){this.Hg.i(e)}unsubscribeDataChanged(e){this.Hg._(e)}applyOptions(e){this.ae.vr(e)}options(){return F(this.ae.N())}priceScale(){return this.$g.priceScale(this.ae.Ft().cl(),this.getPane().paneIndex())}createPriceLine(e){let t=N(F(Ei),e);return new Di(this.ae.Ba(t))}removePriceLine(e){this.ae.Ea(e.Wg())}priceLines(){return this.ae.Aa().map((e=>new Di(e)))}seriesType(){return this.ae.bh()}lastValueData(e){let t=this.ae.Ae(e);return t.Le?{noData:!0}:{noData:!1,price:t.Mt,color:t.R}}attachPrimitive(e){this.ae.hl(e),e.attached&&e.attached({chart:this.Fg,series:this,requestUpdate:()=>this.ae.Qt().Pa(),horzScaleBehavior:this.xu})}detachPrimitive(e){this.ae.al(e),e.detached&&e.detached(),this.ae.Qt().Pa()}getPane(){let e=this.ae,t=A(this.ae.Qt().Ks(e));return this.jg(t)}moveToPane(e){this.ae.Qt().nf(this.ae,e)}seriesOrder(){let e=this.ae.Qt().Ks(this.ae);return e===null?-1:e.U_().indexOf(this.ae)}setSeriesOrder(e){let t=this.ae.Qt().Ks(this.ae);t!==null&&t.du(this.ae,e)}Yg(e){this.Hg.v()&&this.Hg.p(e)}},ki=class{constructor(e,t,n){this.Gg=new M,this.Gu=new M,this.Bw=new M,this.sn=e,this.ia=e.Et(),this._M=t,this.ia.Yc().i(this.Xg.bind(this)),this.ia.Kc().i(this.Jg.bind(this)),this._M.Fw().i(this.Qg.bind(this)),this.xu=n}m(){this.ia.Yc().u(this),this.ia.Kc().u(this),this._M.Fw().u(this),this.Gg.m(),this.Gu.m(),this.Bw.m()}scrollPosition(){return this.ia.Ac()}scrollToPosition(e,t){t?this.ia.$c(e,1e3):this.sn.gs(e)}scrollToRealTime(){this.ia.Uc()}getVisibleRange(){let e=this.ia.gc();return e===null?null:{from:e.from.originalTime,to:e.to.originalTime}}setVisibleRange(e){let t={from:this.xu.convertHorzItemToInternal(e.from),to:this.xu.convertHorzItemToInternal(e.to)},n=this.ia.Cc(t);this.sn.tf(n)}getVisibleLogicalRange(){let e=this.ia.Mc();return e===null?null:{from:e.Oa(),to:e.bi()}}setVisibleLogicalRange(e){O(e.from<=e.to,`The from index cannot be after the to index.`),this.sn.tf(e)}resetTimeScale(){this.sn.ws()}fitContent(){this.sn.Xc()}logicalToCoordinate(e){let t=this.sn.Et();return t.Gi()?null:t.jt(e)}coordinateToLogical(e){return this.ia.Gi()?null:this.ia.Rc(e)}timeToIndex(e,t){let n=this.xu.convertHorzItemToInternal(e);return this.ia.vc(n,t)}timeToCoordinate(e){let t=this.timeToIndex(e,!1);return t===null?null:this.ia.jt(t)}coordinateToTime(e){let t=this.sn.Et(),n=t.Rc(e),r=t.en(n);return r===null?null:r.originalTime}width(){return this._M.cv().width}height(){return this._M.cv().height}subscribeVisibleTimeRangeChange(e){this.Gg.i(e)}unsubscribeVisibleTimeRangeChange(e){this.Gg._(e)}subscribeVisibleLogicalRangeChange(e){this.Gu.i(e)}unsubscribeVisibleLogicalRangeChange(e){this.Gu._(e)}subscribeSizeChange(e){this.Bw.i(e)}unsubscribeSizeChange(e){this.Bw._(e)}applyOptions(e){this.ia.vr(e)}options(){return{...F(this.ia.N()),barSpacing:this.ia.fl()}}Xg(){this.Gg.v()&&this.Gg.p(this.getVisibleRange())}Jg(){this.Gu.v()&&this.Gu.p(this.getVisibleLogicalRange())}Qg(e){this.Bw.p(e.width,e.height)}};function Ai(e){return function(e){if(le(e.handleScale)){let t=e.handleScale;e.handleScale={axisDoubleClickReset:{time:t,price:t},axisPressedMouseMove:{time:t,price:t},mouseWheel:t,pinch:t}}else if(e.handleScale!==void 0){let{axisPressedMouseMove:t,axisDoubleClickReset:n}=e.handleScale;le(t)&&(e.handleScale.axisPressedMouseMove={time:t,price:t}),le(n)&&(e.handleScale.axisDoubleClickReset={time:n,price:n})}let t=e.handleScroll;le(t)&&(e.handleScroll={horzTouchDrag:t,vertTouchDrag:t,mouseWheel:t,pressedMouseMove:t})}(e),e}var ji=class{constructor(e,t,n){this.tb=new Map,this.ib=new Map,this.nb=new M,this.sb=new M,this.eb=new M,this.od=new WeakMap,this.rb=new Br(t);let r=n===void 0?F(Ci()):N(F(Ci()),Ai(n));this.hb=t,this.sv=new Tr(e,r,t),this.sv.dw().i((e=>{this.nb.v()&&this.nb.p(this.ab(e()))}),this),this.sv.fw().i((e=>{this.sb.v()&&this.sb.p(this.ab(e()))}),this),this.sv.Dd().i((e=>{this.eb.v()&&this.eb.p(this.ab(e()))}),this);let i=this.sv.Qt();this.lb=new ki(i,this.sv.pM(),this.hb)}remove(){this.sv.dw().u(this),this.sv.fw().u(this),this.sv.Dd().u(this),this.lb.m(),this.sv.m(),this.tb.clear(),this.ib.clear(),this.nb.m(),this.sb.m(),this.eb.m(),this.rb.m()}resize(e,t,n){this.autoSizeActive()||this.sv.cM(e,t,n)}addCustomSeries(e,t={},n=0){let r=(e=>({type:`Custom`,isBuiltIn:!1,defaultOptions:{...si,...e.defaultOptions()},ob:ci,_b:e}))(j(e));return this.ub(r,t,n)}addSeries(e,t={},n=0){return this.ub(e,t,n)}removeSeries(e){let t=k(this.tb.get(e)),n=this.rb.Jd(t);this.sv.Qt().Jd(t),this.cb(n),this.tb.delete(e),this.ib.delete(t)}qg(e,t){this.cb(this.rb.sg(e,t))}Kg(e,t,n){this.cb(this.rb.og(e,t,n))}Zg(e,t){let[n,r]=this.rb.cg(e,t);return n.length!==0&&this.cb(r),n}subscribeClick(e){this.nb.i(e)}unsubscribeClick(e){this.nb._(e)}subscribeCrosshairMove(e){this.eb.i(e)}unsubscribeCrosshairMove(e){this.eb._(e)}subscribeDblClick(e){this.sb.i(e)}unsubscribeDblClick(e){this.sb._(e)}priceScale(e,t=0){return new wi(this.sv,e,t)}timeScale(){return this.lb}applyOptions(e){this.sv.vr(Ai(e))}options(){return this.sv.N()}takeScreenshot(e=!1,t=!1){let n,r;try{t||(n=this.sv.Qt().N().crosshair.mode,this.sv.vr({crosshair:{mode:2}})),r=this.sv.SM(e)}finally{t||n===void 0||this.sv.Qt().vr({crosshair:{mode:n}})}return r}addPane(e=!1){let t=this.sv.Qt().af();return t.W_(e),this.fb(t)}removePane(e){this.sv.Qt().Vd(e)}swapPanes(e,t){this.sv.Qt().Ed(e,t)}autoSizeActive(){return this.sv.wM()}chartElement(){return this.sv.vv()}panes(){return this.sv.Qt().Zn().map((e=>this.fb(e)))}paneSize(e=0){let t=this.sv.RM(e);return{height:t.height,width:t.width}}setCrosshairPosition(e,t,n){let r=this.tb.get(n);if(r===void 0)return;let i=this.sv.Qt().Ks(r);i!==null&&this.sv.Qt().qd(e,t,i)}clearCrosshairPosition(){this.sv.Qt().Yd(!0)}horzBehaviour(){return this.hb}ub(e,t={},n=0){O(e.ob!==void 0),function(e){if(e===void 0||e.type===`custom`)return;let t=e;t.minMove!==void 0&&t.precision===void 0&&(t.precision=On(t.minMove))}(t.priceFormat),e.type===`Candlestick`&&function(e){e.borderColor!==void 0&&(e.borderUpColor=e.borderColor,e.borderDownColor=e.borderColor),e.wickColor!==void 0&&(e.wickUpColor=e.wickColor,e.wickDownColor=e.wickColor)}(t);let r=N(F(T),F(e.defaultOptions),t),i=e.ob,a=new It(this.sv.Qt(),e.type,r,i,e._b);this.sv.Qt().Gd(a,n);let o=new Oi(a,this,this,this,this.hb,(e=>this.fb(e)));return this.tb.set(o,a),this.ib.set(a,o),o}cb(e){let t=this.sv.Qt();t.Kd(e.Et.Pc,e.Et.vg,e.Et.mg),e.U_.forEach(((e,t)=>t.ht(e.ue,e.pg))),t.Et()._c(),t.Bc()}pb(e){return k(this.ib.get(e))}mb(e){return e!==void 0&&this.ib.has(e)?this.pb(e):void 0}ab(e){let t=new Map;e.YM.forEach(((e,n)=>{let r=n.bh(),i=gi(r)(e);if(r!==`Custom`)O(Or(i));else{let e=n.ol();O(!e||!1===e(i))}t.set(this.pb(n),i)}));let n=this.mb(e.NM),r=e.WM===void 0?void 0:{type:e.WM.ds,sourceKind:e.WM.HM,objectKind:e.WM.UM,series:this.mb(e.WM.U_),objectId:e.WM.$M,paneIndex:e.WM.jM};return{time:e.Qr,logical:e.$n,point:e.qM,paneIndex:e.jM,hoveredInfo:r,hoveredSeries:n,hoveredObjectId:e.FM,seriesData:t,sourceEvent:e.KM}}fb(e){let t=this.od.get(e);return t||(t=new Ti(this.sv,(e=>this.pb(e)),e,this),this.od.set(e,t)),t}};function Mi(e){if(ce(e)){let t=document.getElementById(e);return O(t!==null,`Cannot find element in DOM with id=${e}`),t}return e}function Ni(e,t,n){let r=new ji(Mi(e),t,n);return t.setOptions(r.options()),r}function Pi(e,t){return Ni(e,new Kn,Kn.yf(t))}function Fi(e,t,n,r){return Math.hypot(n-e,r-t)}function Ii(e,t,n,r,i,a,o,s=0){if(t.length===0||r.from>=t.length||r.to<=0)return;let{context:c,horizontalPixelRatio:l,verticalPixelRatio:u}=e,d=t[r.from],f=a(e,d),p=d;if(r.to-r.from<2){let t=i/2;c.beginPath();let n={_t:d._t-t,ut:d.ut},r={_t:d._t+t,ut:d.ut};c.moveTo(n._t*l,n.ut*u),c.lineTo(r._t*l,r.ut*u),o(e,f,n,r)}else{let i=s>0,m=0,h=(t,n)=>{if(o(e,f,p,n),c.beginPath(),f=t,p=n,i){let e=m%s;c.lineDashOffset=e,m=e}},g=p;c.beginPath(),c.moveTo(d._t*l,d.ut*u);for(let o=r.from+1;o<r.to;++o){g=t[o];let r=g._t*l,s=g.ut*u,d=a(e,g);switch(n){case 0:if(c.lineTo(r,s),i){let e=t[o-1],n=e._t*l,i=e.ut*u;m+=Fi(n,i,r,s)}break;case 1:{let e=t[o-1],n=e.ut*u;c.lineTo(r,n),i&&(m+=Math.abs(g._t-e._t)*l),d!==f&&(h(d,g),c.lineTo(r,n)),c.lineTo(r,s),i&&(m+=Math.abs(g.ut-e.ut)*u);break}case 2:{let[e,n]=Bi(t,o-1,o),a=e._t*l,d=e.ut*u,f=n._t*l,p=n.ut*u;if(c.bezierCurveTo(a,d,f,p,r,s),i){let e=t[o-1],n=e._t*l,i=e.ut*u,c=Fi(n,i,r,s),h=Fi(n,i,a,d)+Fi(a,d,f,p)+Fi(f,p,r,s);m+=(c+h)/2}break}}n!==1&&d!==f&&(h(d,g),c.moveTo(r,s))}(p!==g||p===g&&n===1)&&o(e,f,p,g),i&&(c.lineDashOffset=0)}}var Li=6;function Ri(e,t){return{_t:e._t-t._t,ut:e.ut-t.ut}}function zi(e,t){return{_t:e._t/t,ut:e.ut/t}}function Bi(e,t,n){let r=Math.max(0,t-1),i=Math.min(e.length-1,n+1);var a,o;return[(a=e[t],o=zi(Ri(e[n],e[r]),Li),{_t:a._t+o._t,ut:a.ut+o.ut}),Ri(e[n],zi(Ri(e[i],e[t]),Li))]}function Vi(e,t){let n=e.context;n.strokeStyle=t,n.stroke()}var Hi=class extends I{constructor(){super(...arguments),this.rt=null}ht(e){this.rt=e}et(e){if(this.rt===null)return;let{ot:t,lt:n,wb:r,Mb:i,ct:a,Zt:o,gb:s}=this.rt;if(n===null)return;let c=e.context;c.lineCap=`butt`,c.lineWidth=a*e.verticalPixelRatio;let l=D(c,o);c.lineJoin=`round`;let u=this.bb.bind(this),d=function(e){return e.reduce(((e,t)=>e+t),0)}(l);i!==void 0&&Ii(e,t,i,n,r,u,Vi,d),s&&function(e,t,n,r,i){if(r.to-r.from<=0)return;let{horizontalPixelRatio:a,verticalPixelRatio:o,context:s}=e,c=null,l=Math.max(1,Math.floor(a))%2/2,u=n*o+l;for(let n=r.to-1;n>=r.from;--n){let r=t[n];if(r){let t=i(e,r);t!==c&&(c!==null&&s.fill(),s.beginPath(),s.fillStyle=t,c=t);let n=Math.round(r._t*a)+l,d=r.ut*o;s.moveTo(n,d),s.arc(n,d,u,0,2*Math.PI)}}s.fill()}(e,t,s,n,u)}},Ui=class extends Hi{bb(e,t){return t.vt}};function Wi(e,t,n,r,i){let a=1-i;return a*a*a*e+3*a*a*i*t+3*a*i*i*n+i*i*i*r}function Gi(e,t,n,r,i){if(n===2){let[n,a]=Bi(r,i-1,i);return[Math.min(e._t,t._t,n._t,a._t),Math.max(e._t,t._t,n._t,a._t)]}return[Math.min(e._t,t._t),Math.max(e._t,t._t)]}function Ki(e,t,n,r,i,a,o,s){switch(i){case 1:{let i=Jr(e,t,n._t,n.ut,r._t,n.ut),a=Jr(e,t,r._t,n.ut,r._t,r.ut),o=Math.min(i,a);return o<=s?o:null}case 2:{let[i,c]=Bi(a,o-1,o),l=function(e,t,n){let r=1/0,i=n[0];for(let a=1;a<=12;a++){let o=a/12,s={_t:Wi(n[0]._t,n[1]._t,n[2]._t,n[3]._t,o),ut:Wi(n[0].ut,n[1].ut,n[2].ut,n[3].ut,o)};r=Math.min(r,Jr(e,t,i._t,i.ut,s._t,s.ut)),i=s}return r}(e,t,[n,i,c,r]);return l<=s?l:null}default:{let i=Jr(e,t,n._t,n.ut,r._t,r.ut);return i<=s?i:null}}}var qi=class extends ni{constructor(e,t){super(e,t,!0)}Vg(e,t,n){t.Tc(this.bg,de(this.Sg)),e.Zo(this.bg,n,de(this.Sg))}Sb(e,t){return{wt:e,Mt:t,_t:NaN,ut:NaN}}Dg(){let e=this.ae.Sa();this.bg=this.ae.Ha().Bh().map((t=>{let n;if((t.Zr??1)>1){let e=t.Wt[1],r=t.Wt[2],i=t.Wt[3];n=Math.abs(e-i)>Math.abs(r-i)?e:r}else n=t.Wt[3];return this.xb(t.$n,n,e)}))}},Ji=class extends qi{Pg(e,t){let n=this.ae.N();return function(e,t,n,r,i,a,o,s=0,c=0){if(t===null||t.from>=t.to||e.length===0)return null;let l=Math.max(a/2,o??0)+c,u=1/0;if(o!==void 0){let i=o+c,a=Wr(e,n-i,t.from,t.to),s=Gr(e,n+i,a,t.to);for(let t=a;t<s;t++){let i=e[t];if(!qr(n,i._t,i._t,o+c))continue;let a=Math.hypot(n-i._t,r-i.ut);a<=o+c&&(u=Math.min(u,a))}}if(t.to-t.from<2){let i=e[t.from],a=Math.max(s/2,l),o=Jr(n,r,i._t-a,i.ut,i._t+a,i.ut);return o<=l&&(u=Math.min(u,o)),Number.isFinite(u)?Kr(u,2,`series-point`):null}let d=1/0,f=Wr(e,n-l,t.from,t.to),p=Gr(e,n+l,f,t.to),m=Math.max(t.from+1,f),h=Math.min(t.to,p+1);for(let t=m;t<h;t++){let a=e[t-1],o=e[t],[s,c]=Gi(a,o,i,e,t);if(!qr(n,s,c,l))continue;let u=Ki(n,r,a,o,i,e,t,l);u!==null&&(d=Math.min(d,u))}return Number.isFinite(u)?Kr(u,2,`series-point`):Number.isFinite(d)?Kr(d,1,`series-line`):null}(this.bg,this.Sg,e,t,n.lineType,n.lineVisible?n.lineWidth:1,n.pointMarkersVisible?n.pointMarkersRadius||n.lineWidth/2+2:void 0,this.le.Et().fl(),n.hitTestTolerance)}},Yi=class extends Ji{constructor(){super(...arguments),this.kg=new Ui}xb(e,t,n){return{...this.Sb(e,t),...n.Sh(e)}}Bg(){let e=this.ae.N(),t={ot:this.bg,Zt:e.lineStyle,Mb:e.lineVisible?e.lineType:void 0,ct:e.lineWidth,gb:e.pointMarkersVisible?e.pointMarkersRadius||e.lineWidth/2+2:void 0,lt:this.Sg,wb:this.le.Et().fl()};this.kg.ht(t)}},Xi={type:`Line`,isBuiltIn:!0,defaultOptions:{color:`#2196f3`,lineStyle:0,lineWidth:3,lineType:0,lineVisible:!0,crosshairMarkerVisible:!0,crosshairMarkerRadius:4,crosshairMarkerBorderColor:``,crosshairMarkerBorderWidth:2,crosshairMarkerBackgroundColor:``,lastPriceAnimation:0,pointMarkersVisible:!1},ob:(e,t)=>new Yi(e,t)};function Zi(e,t,n,r,i){let{context:a,horizontalPixelRatio:o,verticalPixelRatio:s}=t;a.lineTo(i._t*o,e*s),a.lineTo(r._t*o,e*s),a.closePath(),a.fillStyle=n,a.fill()}var Qi=class extends I{constructor(){super(...arguments),this.rt=null}ht(e){this.rt=e}et(e){if(this.rt===null)return;let{ot:t,lt:n,wb:r,ct:i,Zt:a,Mb:o}=this.rt,s=this.rt.Db??(this.rt.Ib?0:e.mediaSize.height);if(n===null)return;let c=e.context;c.lineCap=`butt`,c.lineJoin=`round`,c.lineWidth=i,D(c,a),c.lineWidth=1,Ii(e,t,o,n,r,this.Vb.bind(this),Zi.bind(null,s))}},$i=class{Bb(e,t){let n=this.Eb,{Ab:r,Lb:i,zb:a,Ob:o,Db:s,Nb:c,Fb:l}=t;if(this.Wb===void 0||n===void 0||n.Ab!==r||n.Lb!==i||n.zb!==a||n.Ob!==o||n.Db!==s||n.Nb!==c||n.Fb!==l){let{verticalPixelRatio:n}=e,u=s||c>0?n:1,d=c*u,f=l===e.bitmapSize.height?l:l*u,p=(s??0)*u,m=e.context.createLinearGradient(0,d,0,f);if(m.addColorStop(0,r),s!=null){let e=H((p-d)/(f-d),0,1);m.addColorStop(e,i),m.addColorStop(e,a)}m.addColorStop(1,o),this.Wb=m,this.Eb=t}return this.Wb}},ea=class extends Qi{constructor(){super(...arguments),this.Hb=new $i}Vb(e,t){return this.Hb.Bb(e,{Ab:t.ah,Lb:``,zb:``,Ob:t.oh,Nb:this.rt?.Nb??0,Fb:e.bitmapSize.height})}},ta=class extends Ji{constructor(e,t){super(e,t),this.kg=new ve,this.qb=new ea,this.Yb=new Ui,this.kg.nt([this.qb,this.Yb])}xb(e,t,n){return{...this.Sb(e,t),...n.Sh(e)}}Bg(){let e=this.ae.N();if(this.Sg===null||this.bg.length===0)return;let t;if(e.relativeGradient){t=this.bg[this.Sg.from].ut;for(let e=this.Sg.from;e<this.Sg.to;e++){let n=this.bg[e];n.ut<t&&(t=n.ut)}}this.qb.ht({Mb:e.lineType,ot:this.bg,Zt:e.lineStyle,ct:e.lineWidth,Db:null,Nb:t,Ib:e.invertFilledArea,lt:this.Sg,wb:this.le.Et().fl()}),this.Yb.ht({Mb:e.lineVisible?e.lineType:void 0,ot:this.bg,Zt:e.lineStyle,ct:e.lineWidth,lt:this.Sg,wb:this.le.Et().fl(),gb:e.pointMarkersVisible?e.pointMarkersRadius||e.lineWidth/2+2:void 0})}},na={type:`Area`,isBuiltIn:!0,defaultOptions:{topColor:`rgba( 46, 220, 135, 0.4)`,bottomColor:`rgba( 40, 221, 100, 0)`,invertFilledArea:!1,relativeGradient:!1,lineColor:`#33D778`,lineStyle:0,lineWidth:3,lineType:0,lineVisible:!0,crosshairMarkerVisible:!0,crosshairMarkerRadius:4,crosshairMarkerBorderColor:``,crosshairMarkerBorderWidth:2,crosshairMarkerBackgroundColor:``,lastPriceAnimation:0,pointMarkersVisible:!1},ob:(e,t)=>new ta(e,t)},ra=class extends ni{constructor(e,t){super(e,t,!1)}Pg(e,t){return Qr(this.bg,this.Sg,e,t,this.le.Et().fl(),this.ae.N().hitTestTolerance,((e,t)=>{t[0]=e.Qo,t[1]=e.t_}))}Vg(e,t,n){t.Tc(this.bg,de(this.Sg)),e.Xo(this.bg,n,de(this.Sg))}Qb(e,t,n){return{wt:e,jr:t.Wt[0],qr:t.Wt[1],Yr:t.Wt[2],Kr:t.Wt[3],_t:NaN,Jo:NaN,Qo:NaN,t_:NaN,i_:NaN}}Dg(){let e=this.ae.Sa();this.bg=this.ae.Ha().Bh().map((t=>this.xb(t.$n,t,e)))}},ia=class extends I{constructor(){super(...arguments),this.qt=null,this.Kb=0}ht(e){this.qt=e}et(e){if(this.qt===null||this.qt.Un.length===0||this.qt.lt===null)return;let{horizontalPixelRatio:t}=e;this.Kb=function(e,t){if(e>=2.5&&e<=4)return Math.floor(3*t);let n=1-.2*Math.atan(Math.max(4,e)-4)/(.5*Math.PI),r=Math.floor(e*n*t),i=Math.floor(e*t);return Math.max(Math.floor(t),Math.min(r,i))}(this.qt.fl,t),this.Kb>=2&&Math.floor(t)%2!=this.Kb%2&&this.Kb--;let n=this.qt.Un;this.qt.tS&&this.iS(e,n,this.qt.lt),this.qt.gi&&this.Rm(e,n,this.qt.lt);let r=this.nS(t);(!this.qt.gi||this.Kb>2*r)&&this.sS(e,n,this.qt.lt)}iS(e,t,n){if(this.qt===null)return;let{context:r,horizontalPixelRatio:i,verticalPixelRatio:a}=e,o=``,s=Math.min(Math.floor(i),Math.floor(this.qt.fl*i));s=Math.max(Math.floor(i),Math.min(s,this.Kb));let c=Math.floor(.5*s),l=null;for(let e=n.from;e<n.to;e++){let n=t[e];n.rh!==o&&(r.fillStyle=n.rh,o=n.rh);let u=Math.round(Math.min(n.Jo,n.i_)*a),d=Math.round(Math.max(n.Jo,n.i_)*a),f=Math.round(n.Qo*a),p=Math.round(n.t_*a),m=Math.round(i*n._t)-c,h=m+s-1;l!==null&&(m=Math.max(l+1,m),m=Math.min(m,h));let g=h-m+1;r.fillRect(m,f,g,u-f),r.fillRect(m,d+1,g,p-d),l=h}}nS(e){let t=Math.floor(1*e);this.Kb<=2*t&&(t=Math.floor(.5*(this.Kb-1)));let n=Math.max(Math.floor(e),t);return this.Kb<=2*n?Math.max(Math.floor(e),Math.floor(1*e)):n}Rm(e,t,n){if(this.qt===null)return;let{context:r,horizontalPixelRatio:i,verticalPixelRatio:a}=e,o=``,s=this.nS(i),c=null;for(let e=n.from;e<n.to;e++){let n=t[e];n.eh!==o&&(r.fillStyle=n.eh,o=n.eh);let l=Math.round(n._t*i)-Math.floor(.5*this.Kb),u=l+this.Kb-1,d=Math.round(Math.min(n.Jo,n.i_)*a),f=Math.round(Math.max(n.Jo,n.i_)*a);if(c!==null&&(l=Math.max(c+1,l),l=Math.min(l,u)),this.qt.fl*i>2*s)Te(r,l,d,u-l+1,f-d+1,s);else{let e=u-l+1;r.fillRect(l,d,e,f-d+1)}c=u}}sS(e,t,n){if(this.qt===null)return;let{context:r,horizontalPixelRatio:i,verticalPixelRatio:a}=e,o=``,s=this.nS(i);for(let e=n.from;e<n.to;e++){let n=t[e],c=Math.round(Math.min(n.Jo,n.i_)*a),l=Math.round(Math.max(n.Jo,n.i_)*a),u=Math.round(n._t*i)-Math.floor(.5*this.Kb),d=u+this.Kb-1;if(n.sh!==o){let e=n.sh;r.fillStyle=e,o=e}this.qt.gi&&(u+=s,c+=s,d-=s,l-=s),c>l||r.fillRect(u,c,d-u+1,l-c+1)}}},aa=class extends ra{constructor(){super(...arguments),this.kg=new ia}xb(e,t,n){return{...this.Qb(e,t,n),...n.Sh(e)}}Bg(){let e=this.ae.N();this.kg.ht({Un:this.bg,fl:this.le.Et().fl(),tS:e.wickVisible,gi:e.borderVisible,lt:this.Sg})}},oa={type:`Candlestick`,isBuiltIn:!0,defaultOptions:{upColor:`#26a69a`,downColor:`#ef5350`,wickVisible:!0,borderVisible:!0,borderColor:`#378658`,borderUpColor:`#26a69a`,borderDownColor:`#ef5350`,wickColor:`#737375`,wickUpColor:`#26a69a`,wickDownColor:`#ef5350`},ob:(e,t)=>new aa(e,t)},sa=class extends I{constructor(){super(...arguments),this.qt=null,this.eS=[]}ht(e){this.qt=e,this.eS=[]}et({context:e,horizontalPixelRatio:t,verticalPixelRatio:n}){if(this.qt===null||this.qt.ot.length===0||this.qt.lt===null)return;this.eS.length||this.rS(t);let r=Math.max(1,Math.floor(n)),i=Math.round(this.qt.hS*n)-Math.floor(r/2),a=i+r;for(let t=this.qt.lt.from;t<this.qt.lt.to;t++){let o=this.qt.ot[t],s=this.eS[t-this.qt.lt.from],c=Math.round(o.ut*n),l,u;e.fillStyle=o.sh,c<=i?(l=c,u=a):(l=i,u=c-Math.floor(r/2)+r),e.fillRect(s.Oa,l,s.bi-s.Oa+1,u-l)}}rS(e){if(this.qt===null||this.qt.ot.length===0||this.qt.lt===null)return void(this.eS=[]);let t=Math.ceil(this.qt.fl*e)<=1?0:Math.max(1,Math.floor(e)),n=Math.round(this.qt.fl*e)-t;this.eS=Array(this.qt.lt.to-this.qt.lt.from);for(let t=this.qt.lt.from;t<this.qt.lt.to;t++){let r=this.qt.ot[t],i=Math.round(r._t*e),a,o;if(n%2){let e=(n-1)/2;a=i-e,o=i+e}else{let e=n/2;a=i-e,o=i+e-1}this.eS[t-this.qt.lt.from]={Oa:a,bi:o,aS:i,ce:r._t*e,wt:r.wt}}for(let e=this.qt.lt.from+1;e<this.qt.lt.to;e++){let n=this.eS[e-this.qt.lt.from],r=this.eS[e-this.qt.lt.from-1];n.wt===r.wt+1&&n.Oa-r.bi!==t+1&&(r.aS>r.ce?r.bi=n.Oa-t-1:n.Oa=r.bi+t+1)}let r=Math.ceil(this.qt.fl*e);for(let e=this.qt.lt.from;e<this.qt.lt.to;e++){let t=this.eS[e-this.qt.lt.from];t.bi<t.Oa&&(t.bi=t.Oa);let n=t.bi-t.Oa+1;r=Math.min(n,r)}if(t>0&&r<4)for(let e=this.qt.lt.from;e<this.qt.lt.to;e++){let t=this.eS[e-this.qt.lt.from];t.bi-t.Oa+1>r&&(t.aS>t.ce?--t.bi:t.Oa+=1)}}},ca=class extends qi{constructor(){super(...arguments),this.kg=new sa}Pg(e,t){let n=this.ae.Ft().Nt(this.ae.N().base,A(this.ae.Lt()).Wt);return n===null?null:Qr(this.bg,this.Sg,e,t,this.le.Et().fl(),this.ae.N().hitTestTolerance,((e,t)=>{t[0]=e.ut,t[1]=n}))}xb(e,t,n){return{...this.Sb(e,t),...n.Sh(e)}}Bg(){let e={ot:this.bg,fl:this.le.Et().fl(),lt:this.Sg,hS:this.ae.Ft().Nt(this.ae.N().base,A(this.ae.Lt()).Wt)};this.kg.ht(e)}},la={type:`Histogram`,isBuiltIn:!0,defaultOptions:{color:`#26a69a`,base:0},ob:(e,t)=>new ca(e,t)};({...T});var Q=t(n(),1),ua=.05,da={top:.12,bottom:.08};function fa(e,t,n=ua){if(t===`indexed`||!Array.isArray(e)||e.length===0)return null;let r=1/0,i=-1/0,a=t===`candlestick`;for(let t of e){let e=a?t?.low:t?.close,n=a?t?.high:t?.close;Number.isFinite(e)&&(r=Math.min(r,e)),Number.isFinite(n)&&(i=Math.max(i,n))}if(!Number.isFinite(r)||!Number.isFinite(i))return null;let o=Number.isFinite(n)&&n>=0?n:ua,s=i-r,c=(s>0?s:Math.max(Math.abs(r),Math.abs(i),1))*o,l=r-c,u=i+c,d=1-da.top-da.bottom,f=da.bottom/d,p=da.top/d,m=l-f*(u-l);r>0&&m<=0&&(l=(Math.max(r-c,r*.5)+f*u)/(1+f));let h=u+p*(u-l);return i<0&&h>=0&&(u=(Math.min(i+c,i*.5)+p*l)/(1+p)),{priceRange:{minValue:l,maxValue:u}}}var $=e(),pa=`Tabs`,[ma,ha]=i(pa,[g]),ga=g(),[_a,va]=ma(pa),ya=Q.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:l,activationMode:u=`automatic`,...p}=e,m=d(l),[h,g]=f({prop:r,onChange:i,defaultProp:a??``,caller:pa});return(0,$.jsx)(_a,{scope:n,baseId:s(),value:h,onValueChange:g,orientation:o,dir:m,activationMode:u,children:(0,$.jsx)(c.div,{dir:m,"data-orientation":o,...p,ref:t})})});ya.displayName=pa;var ba=`TabsList`,xa=Q.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=va(ba,n),o=ga(n);return(0,$.jsx)(m,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,$.jsx)(c.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});xa.displayName=ba;var Sa=`TabsTrigger`,Ca=Q.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,s=va(Sa,n),l=ga(n),u=Ea(s.baseId,r),d=Da(s.baseId,r),f=r===s.value;return(0,$.jsx)(_,{asChild:!0,...l,focusable:!i,active:f,children:(0,$.jsx)(c.button,{type:`button`,role:`tab`,"aria-selected":f,"aria-controls":d,"data-state":f?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:u,...o,ref:t,onMouseDown:a(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?s.onValueChange(r):e.preventDefault()}),onKeyDown:a(e.onKeyDown,e=>{i||e.target!==e.currentTarget||[` `,`Enter`].includes(e.key)&&s.onValueChange(r)}),onFocus:a(e.onFocus,()=>{let e=s.activationMode!==`manual`;!f&&!i&&e&&s.onValueChange(r)})})})});Ca.displayName=Sa;var wa=`TabsContent`,Ta=Q.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...s}=e,l=va(wa,n),u=Ea(l.baseId,r),d=Da(l.baseId,r),f=r===l.value,p=Q.useRef(f);return Q.useEffect(()=>{let e=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,$.jsx)(o,{present:i||f,children:({present:n})=>(0,$.jsx)(c.div,{"data-state":f?`active`:`inactive`,"data-orientation":l.orientation,role:`tabpanel`,"aria-labelledby":u,hidden:!n,id:d,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:p.current?`0s`:void 0},children:n&&a})})});Ta.displayName=wa;function Ea(e,t){return`${e}-trigger-${t}`}function Da(e,t){return`${e}-content-${t}`}var Oa=ya,ka=xa,Aa=Ca,ja=Ta,Ma=Oa,Na=(0,Q.forwardRef)(function({className:e,...t},n){return(0,$.jsx)(ka,{ref:n,"data-slot":`tabs-list`,className:r(`inline-flex min-h-12 items-center justify-center rounded-md bg-secondary p-1 text-muted-foreground`,e),...t})}),Pa=(0,Q.forwardRef)(function({className:e,...t},n){return(0,$.jsx)(Aa,{ref:n,"data-slot":`tabs-trigger`,className:r(`inline-flex min-h-10 items-center justify-center whitespace-nowrap rounded-md px-3 text-[13px] font-medium transition-[background-color,color,box-shadow,transform,scale] duration-150 ease-out active:scale-[0.96] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-card data-[state=active]:text-foreground data-[state=active]:shadow-subtle-xs`,e),...t})});(0,Q.forwardRef)(function({className:e,...t},n){return(0,$.jsx)(ja,{ref:n,"data-slot":`tabs-content`,className:r(`mt-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background`,e),...t})});var Fa=[`1D`,`5D`,`1M`,`6M`,`YTD`,`1Y`,`5Y`,`MAX`],Ia=[`20`,`40`,`60`,`80`,`100`],La=[`foreground`,`muted-foreground`,`border`,`card`,`background`,`secondary`,`success`,`destructive`];function Ra(){let e=getComputedStyle(document.documentElement),t=Object.fromEntries(La.map(t=>{let n=e.getPropertyValue(`--tw-${t}`).trim();return[t.replaceAll(`-`,`_`),`hsl(${n})`]})),n=e.getPropertyValue(`--tw-muted-foreground`).trim();return{...t,volume:`hsl(${n} / 0.35)`}}function za(e){return{autoSize:!0,layout:{background:{type:`solid`,color:e.card},textColor:e.muted_foreground,attributionLogo:!1},grid:{vertLines:{visible:!1},horzLines:{visible:!1}},localization:{priceFormatter:l},rightPriceScale:{visible:!0,minimumWidth:56,borderColor:e.border,scaleMargins:{...da}},timeScale:{borderColor:e.border},crosshair:{vertLine:{color:e.muted_foreground,labelBackgroundColor:e.secondary},horzLine:{color:e.muted_foreground,labelBackgroundColor:e.secondary}}}}function Ba(e,t,n){let r=fa(t,e),i=()=>r;if(e===`candlestick`)return{autoscaleInfoProvider:i,upColor:n.success,downColor:n.destructive,borderUpColor:n.success,borderDownColor:n.destructive,wickUpColor:n.success,wickDownColor:n.destructive};let a=(t.at(-1)?.close??0)>=(t[0]?.close??0)?n.success:n.destructive;return{autoscaleInfoProvider:i,lineColor:a,topColor:a,bottomColor:n.card}}function Va(e){return{priceScaleId:`volume`,priceFormat:{type:`volume`},priceLineVisible:!1,lastValueVisible:!1,color:e.volume}}function Ha(e){return e.map(({time:e,close:t})=>({time:e,value:t}))}function Ua(e){return e.map(({time:e,open:t,high:n,low:r,close:i})=>({time:e,open:t,high:n,low:r,close:i}))}function Wa(e){let t=e.bars[0]?.close;return e.bars.map((n,r)=>({time:n.time,value:e.indexed?.[r]??(Number.isFinite(t)&&t!==0?n.close/t*100:0)}))}function Ga(e){return h(e,null)}function Ka(e){return Number.isFinite(e)?u(e,{maximumFractionDigits:4}):`unavailable`}function qa(e,t){let n=new Date(Number(e)*1e3).toISOString();return t?`${n.slice(0,10)} ${n.slice(11,16)}`:n.slice(0,10)}function Ja(e){return e.length>1&&Number(e[1].time)-Number(e[0].time)<86400}function Ya(e,t){let n=e[0],r=n?.bars[0]?.close,i=n?.bars.at(-1)?.close,a=Number.isFinite(r)&&Number.isFinite(i)?i-r:NaN,o=Number.isFinite(a)?`${a>=0?`+`:``}${Ka(a)}`:`unavailable`;return[`${e.map(e=>e.symbol).join(`, `)} market chart`,t?`${t} range`:null,`latest close ${Ka(i)}`,`change ${o}`].filter(Boolean).join(`, `)}function Xa({series:e,mode:t,prevClose:n,range:i,onRangeChange:a,showVolume:o=!1,height:s=320,className:c}){let l=(0,Q.useMemo)(()=>t===`indexed`?e.slice(0,6):e.slice(0,1),[t,e]),u=(0,Q.useRef)(null),d=(0,Q.useRef)(null),f=(0,Q.useRef)(null),m=(0,Q.useRef)(null),h=(0,Q.useRef)(null),g=(0,Q.useRef)(null),_=(0,Q.useRef)(null),v=(0,Q.useRef)(null),y=(0,Q.useRef)(()=>{}),b=(0,Q.useRef)({mode:t,renderedSeries:l}),[x,S]=(0,Q.useState)(null);if(m.current??=new Map,_.current??=new Map,v.current??=new Map,t===`indexed`){let e=new Set(l.flatMap(e=>{let t=_.current.get(e.symbol);return t?[t]:[]}));l.forEach(t=>{if(!_.current.has(t.symbol)){let n=ee.find(t=>!e.has(t));n&&(_.current.set(t.symbol,n),e.add(n))}})}(0,Q.useEffect)(()=>{b.current={mode:t,renderedSeries:l},y.current=()=>{let e=d.current,n=t===`indexed`&&l.length>=2&&l.length<=4;if(!e||!n)return;let r=e.timeScale(),i=[];for(let e of l){let t=v.current.get(e.symbol),n=m.current.get(e.symbol),a=Wa(e).at(-1);if(!t||!n||!a)continue;let o=n.api.priceToCoordinate(a.value),s=r.timeToCoordinate(a.time);if(o==null||s==null){i.push({element:t,top:null,left:null});continue}i.push({element:t,top:o,left:s})}for(let{element:e,top:t,left:n}of i)e.hidden=t==null||n==null,e.hidden||(e.style.cssText=`top: ${t}px; left: ${n}px;`)},y.current()},[t,l]),(0,Q.useEffect)(()=>{let e=u.current;if(!e)return;let t=Ra();f.current=t;let n=Pi(e,za(t));d.current=n;let r=e=>{if(!e?.point||e.time==null){S(null);return}let t=b.current,n=t.renderedSeries[0],r=Ja(n?.bars??[]),i=[qa(e.time,r)];if(t.mode===`indexed`)for(let n of t.renderedSeries){let t=m.current.get(n.symbol),r=t?e.seriesData?.get(t.api):null;r&&Number.isFinite(r.value)&&i.push(`${n.symbol} ${Ga(r.value)}`)}else{let r=n?m.current.get(n.symbol):null,a=r?e.seriesData?.get(r.api):null;a&&t.mode===`candlestick`?i.push(`O ${Ga(a.open)} H ${Ga(a.high)} L ${Ga(a.low)} C ${Ga(a.close)}`):a&&Number.isFinite(a.value)&&i.push(`Price ${Ga(a.value)}`)}let a=n?.bars.find(t=>t.time===e.time);Number.isFinite(a?.volume)&&i.push(`Volume ${p(a.volume)}`),S({x:e.point.x,y:e.point.y,lines:i})};n.subscribeCrosshairMove(r);let i=n.timeScale(),a=()=>y.current();i.subscribeVisibleTimeRangeChange(a);let o=typeof ResizeObserver>`u`?null:new ResizeObserver(a);o?.observe(e);let s=new MutationObserver(()=>{let e=Ra();f.current=e,n.applyOptions(za(e));let t=b.current,r=new Map(t.renderedSeries.map(e=>[e.symbol,e]));for(let[n,i]of m.current)if(t.mode===`indexed`)i.api.applyOptions({color:_.current.get(n)});else{let a=r.get(n);i.api.applyOptions(Ba(t.mode,a?.bars??[],e))}h.current?.applyOptions(Va(e))});return s.observe(document.documentElement,{attributes:!0,attributeFilter:[`class`,`data-theme`]}),()=>{s.disconnect(),o?.disconnect(),i.unsubscribeVisibleTimeRangeChange(a),n.unsubscribeCrosshairMove(r),n.remove(),d.current===n&&(d.current=null),m.current.clear(),h.current=null,g.current=null}},[]),(0,Q.useEffect)(()=>{let e=d.current,r=f.current;if(!e||!r)return;if(g.current!==t){for(let t of m.current.values())e.removeSeries(t.api);m.current.clear(),h.current&&e.removeSeries(h.current),h.current=null,g.current=t}let i=new Set(l.map(e=>e.symbol));for(let[t,n]of m.current)i.has(t)||(e.removeSeries(n.api),m.current.delete(t));for(let i of l){let a=m.current.get(i.symbol);if(a)t===`indexed`?a.api.applyOptions({color:_.current.get(i.symbol)}):a.api.applyOptions(Ba(t,i.bars,r));else{let n=t===`area`?na:t===`candlestick`?oa:Xi,o=t===`indexed`?{color:_.current.get(i.symbol)}:Ba(t,i.bars,r);a={api:e.addSeries(n,o),previousClose:null,priceLine:null},m.current.set(i.symbol,a)}let o=t===`area`?Ha(i.bars):t===`candlestick`?Ua(i.bars):Wa(i);a.api.setData(o),t!==`indexed`&&(Number.isFinite(n)&&a.previousClose!==n?(a.priceLine&&a.api.removePriceLine(a.priceLine),a.priceLine=a.api.createPriceLine({price:n,color:r.muted_foreground,title:`Prev close`}),a.previousClose=n):!Number.isFinite(n)&&a.priceLine&&(a.api.removePriceLine(a.priceLine),a.priceLine=null,a.previousClose=null))}let a=l[0];t!==`indexed`&&o&&a?(h.current||(h.current=e.addSeries(la,Va(r)),e.priceScale(`volume`).applyOptions({scaleMargins:{top:.82,bottom:.02}})),h.current.setData(a.bars.map(({time:e,volume:t})=>({time:e,value:t??0})))):h.current&&=(e.removeSeries(h.current),null),e.timeScale().fitContent(),y.current()},[t,n,l,o]);let te=Ya(l,i),C=Fa.includes(i)?i:Fa[0];return(0,$.jsxs)(`section`,{"aria-label":te,"data-slot":`market-chart`,className:r(`relative flex min-h-0 flex-col overflow-hidden tabular-nums`,c),style:{height:s},children:[a?(0,$.jsxs)(Ma,{value:C,onValueChange:a,"data-slot":`market-chart-range-selector`,className:`relative flex min-h-12 flex-none items-center justify-end border-b border-border bg-card`,children:[(0,$.jsx)(`div`,{"data-slot":`market-chart-range-scroll`,className:`min-w-0 flex-1 overflow-x-auto overscroll-x-contain px-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,children:(0,$.jsx)(Na,{className:`ml-auto h-10 w-max min-w-full justify-end bg-transparent p-0`,children:Fa.map(e=>(0,$.jsx)(Pa,{value:e,tabIndex:e===C?0:-1,className:`min-h-10 min-w-10 px-2 text-xs transition-[background-color,color,box-shadow,transform,scale] duration-150 ease-out active:scale-[0.96]`,children:e},e))})}),(0,$.jsx)(`span`,{"data-slot":`market-chart-range-fade`,"aria-hidden":`true`,className:`pointer-events-none absolute inset-y-0 right-0 w-6 bg-gradient-to-l from-card to-transparent sm:hidden`})]}):null,(0,$.jsxs)(`div`,{"data-slot":`market-chart-plot`,className:`relative min-h-0 flex-1 overflow-hidden`,children:[(0,$.jsx)(`div`,{ref:u,className:`absolute inset-0`,"aria-hidden":`true`}),(0,$.jsx)(`div`,{"data-slot":`market-chart-horizontal-grid`,"aria-hidden":`true`,className:`pointer-events-none absolute bottom-7 left-0 right-14 top-0 z-[1] grid grid-rows-5`,children:Ia.map(e=>(0,$.jsx)(`span`,{"data-slot":`market-chart-grid-row`,className:`border-b border-border/45`},e))}),l.length>=2?(0,$.jsx)(`div`,{"data-slot":`market-chart-legend`,className:`pointer-events-none absolute left-2 top-2 z-10 flex flex-wrap gap-x-3 gap-y-1 rounded-md bg-card/90 px-2 py-1 text-xs tabular-nums`,children:l.map(e=>(0,$.jsxs)(`div`,{"data-symbol":e.symbol,className:`inline-flex items-center gap-1.5`,children:[(0,$.jsx)(`span`,{"data-slot":`series-color-dot`,className:`size-2 rounded-full`,style:{backgroundColor:_.current.get(e.symbol)},"aria-hidden":`true`}),(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:e.symbol})]},e.symbol))}):null,t===`indexed`&&l.length>=2&&l.length<=4?(0,$.jsx)(`div`,{className:`pointer-events-none absolute inset-0 z-10`,"aria-hidden":`true`,children:l.map(e=>(0,$.jsxs)(`div`,{ref:t=>{t?v.current.set(e.symbol,t):v.current.delete(e.symbol)},"data-slot":`market-chart-line-label`,className:`absolute inline-flex -translate-y-1/2 items-center gap-1 rounded bg-card/90 px-1.5 py-0.5 text-[11px] tabular-nums text-foreground`,children:[(0,$.jsx)(`span`,{className:`size-1.5 rounded-full`,style:{backgroundColor:_.current.get(e.symbol)}}),(0,$.jsx)(`span`,{children:e.symbol})]},e.symbol))}):null,x?(0,$.jsx)(`div`,{"data-slot":`market-chart-tooltip`,className:`pointer-events-none absolute z-20 rounded-md border border-border bg-card/95 px-2 py-1 text-xs tabular-nums text-foreground shadow-subtle-xs`,style:{left:x.x+12,top:x.y+12},children:x.lines.map(e=>(0,$.jsx)(`div`,{children:e},e))}):null]}),(0,$.jsx)(`div`,{"data-slot":`market-chart-attribution`,className:`flex h-10 flex-none items-center border-t border-border bg-card px-2`,children:(0,$.jsx)(`a`,{href:`https://www.tradingview.com/`,target:`_blank`,rel:`noreferrer`,className:`inline-flex min-h-10 items-center rounded-sm px-1 text-[10px] text-muted-foreground transition-[color,transform,scale] duration-150 ease-out hover:text-foreground active:scale-[0.96] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:`Charts by TradingView`})})]})}export{Xa as MarketChart};
@@ -0,0 +1 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),ee=Symbol.for(`react.activity`),f=Symbol.iterator;function p(e){return typeof e!=`object`||!e?null:(e=f&&e[f]||e[`@@iterator`],typeof e==`function`?e:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function _(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function v(){}v.prototype=_.prototype;function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}var b=y.prototype=new v;b.constructor=y,h(b,_.prototype),b.isPureReactComponent=!0;var x=Array.isArray;function S(){}var C={H:null,A:null,T:null,S:null},w=Object.prototype.hasOwnProperty;function T(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function te(e,t){return T(e.type,t,e.props)}function E(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function D(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var O=/\/+/g;function k(e,t){return typeof e==`object`&&e&&e.key!=null?D(``+e.key):t.toString(36)}function A(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(S,S):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function j(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,j(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+k(e,0):a,x(o)?(i=``,c!=null&&(i=c.replace(O,`$&/`)+`/`),j(o,r,i,``,function(e){return e})):o!=null&&(E(o)&&(o=te(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(O,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(x(e))for(var u=0;u<e.length;u++)a=e[u],s=l+k(a,u),c+=j(a,r,i,s,o);else if(u=p(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+k(a,u++),c+=j(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return j(A(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function M(e,t,n){if(e==null)return e;var r=[],i=0;return j(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function N(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var P=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},F={map:M,forEach:function(e,t,n){M(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return M(e,function(){t++}),t},toArray:function(e){return M(e,function(e){return e})||[]},only:function(e){if(!E(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=ee,e.Children=F,e.Component=_,e.Fragment=r,e.Profiler=a,e.PureComponent=y,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=C,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return C.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=h({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!w.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return T(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)w.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return T(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=E,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:N}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=C.T,n={};C.T=n;try{var r=e(),i=C.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(S,P)}catch(e){P(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),C.T=t}},e.unstable_useCacheRefresh=function(){return C.H.useCacheRefresh()},e.use=function(e){return C.H.use(e)},e.useActionState=function(e,t,n){return C.H.useActionState(e,t,n)},e.useCallback=function(e,t){return C.H.useCallback(e,t)},e.useContext=function(e){return C.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return C.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return C.H.useEffect(e,t)},e.useEffectEvent=function(e){return C.H.useEffectEvent(e)},e.useId=function(){return C.H.useId()},e.useImperativeHandle=function(e,t,n){return C.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return C.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return C.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return C.H.useMemo(e,t)},e.useOptimistic=function(e,t){return C.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return C.H.useReducer(e,t,n)},e.useRef=function(e){return C.H.useRef(e)},e.useState=function(e){return C.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return C.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return C.H.useTransition()},e.version=`19.2.7`})),d=o(((e,t)=>{t.exports=u()})),ee=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),f=o(((e,t)=>{t.exports=ee()})),p=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.7`})),m=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()}));function h(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=h(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function g(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=h(e))&&(r&&(r+=` `),r+=t);return r}var _=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},v=(e,t)=>({classGroupId:e,validator:t}),y=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),b=`-`,x=[],S=`arbitrary..`,C=e=>{let t=te(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return T(e);let n=e.split(b);return w(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?_(i,t):t:i||x}return n[e]||x}}},w=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=w(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(b):e.slice(t).join(b),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},T=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?S+r:void 0})(),te=e=>{let{theme:t,classGroups:n}=e;return E(n,t)},E=(e,t)=>{let n=y();for(let r in e){let i=e[r];D(i,n,r,t)}return n},D=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];O(i,t,n,r)}},O=(e,t,n,r)=>{if(typeof e==`string`){k(e,t,n);return}if(typeof e==`function`){A(e,t,n,r);return}j(e,t,n,r)},k=(e,t,n)=>{let r=e===``?t:M(t,e);r.classGroupId=n},A=(e,t,n,r)=>{if(N(e)){D(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(v(n,e))},j=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];D(o,M(t,a),n,r)}},M=(e,t)=>{let n=e,r=t.split(b),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=y(),n.nextPart.set(t,i)),n=i}return n},N=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,P=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},F=`!`,ne=`:`,re=[],I=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),L=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===ne){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(F)?(c=s.slice(0,-1),l=!0):s.startsWith(F)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return I(t,l,c,u)};if(t){let e=t+ne,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):I(re,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},R=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},ie=e=>({cache:P(e.cacheSize),parseClassName:L(e),sortModifiers:R(e),postfixLookupClassGroupIds:ae(e),...C(e)}),ae=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},z=/\s+/,oe=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(z),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:ee,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let m=!!p,h;if(m){h=r(f.substring(0,p));let e=h&&o[h]?r(f):void 0;e&&e!==h&&(h=e,m=!1)}else h=r(f);if(!h){if(!m){l=t+(l.length>0?` `+l:l);continue}if(h=r(f),!h){l=t+(l.length>0?` `+l:l);continue}m=!1}let g=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),_=ee?g+F:g,v=_+h;if(s.indexOf(v)>-1)continue;s.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];s.push(_+t)}l=t+(l.length>0?` `+l:l)}return l},B=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=V(n))&&(i&&(i+=` `),i+=r);return i},V=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=V(e[r]))&&(n&&(n+=` `),n+=t);return n},se=(e,...t)=>{let n,r,i,a,o=o=>(n=ie(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=oe(e,n);return i(e,a),a};return a=o,(...e)=>a(B(...e))},H=[],U=e=>{let t=t=>t[e]||H;return t.isThemeGetter=!0,t},ce=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,le=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ue=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,de=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,fe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,pe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,me=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,he=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,W=e=>ue.test(e),G=e=>!!e&&!Number.isNaN(Number(e)),K=e=>!!e&&Number.isInteger(Number(e)),ge=e=>e.endsWith(`%`)&&G(e.slice(0,-1)),q=e=>de.test(e),_e=()=>!0,ve=e=>fe.test(e)&&!pe.test(e),ye=()=>!1,be=e=>me.test(e),xe=e=>he.test(e),Se=e=>!J(e)&&!X(e),Ce=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),we=e=>Q(e,ze,ye),J=e=>ce.test(e),Y=e=>Q(e,Be,ve),Te=e=>Q(e,Ve,G),Ee=e=>Q(e,Ue,_e),De=e=>Q(e,He,ye),Oe=e=>Q(e,Le,ye),ke=e=>Q(e,Re,xe),Ae=e=>Q(e,We,be),X=e=>le.test(e),Z=e=>$(e,Be),je=e=>$(e,He),Me=e=>$(e,Le),Ne=e=>$(e,ze),Pe=e=>$(e,Re),Fe=e=>$(e,We,!0),Ie=e=>$(e,Ue,!0),Q=(e,t,n)=>{let r=ce.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},$=(e,t,n=!1)=>{let r=le.exec(e);return r?r[1]?t(r[1]):n:!1},Le=e=>e===`position`||e===`percentage`,Re=e=>e===`image`||e===`url`,ze=e=>e===`length`||e===`size`||e===`bg-size`,Be=e=>e===`length`,Ve=e=>e===`number`,He=e=>e===`family-name`,Ue=e=>e===`number`||e===`weight`,We=e=>e===`shadow`,Ge=se(()=>{let e=U(`color`),t=U(`font`),n=U(`text`),r=U(`font-weight`),i=U(`tracking`),a=U(`leading`),o=U(`breakpoint`),s=U(`container`),c=U(`spacing`),l=U(`radius`),u=U(`shadow`),d=U(`inset-shadow`),ee=U(`text-shadow`),f=U(`drop-shadow`),p=U(`blur`),m=U(`perspective`),h=U(`aspect`),g=U(`ease`),_=U(`animate`),v=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],y=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],b=()=>[...y(),X,J],x=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],S=()=>[`auto`,`contain`,`none`],C=()=>[X,J,c],w=()=>[W,`full`,`auto`,...C()],T=()=>[K,`none`,`subgrid`,X,J],te=()=>[`auto`,{span:[`full`,K,X,J]},K,X,J],E=()=>[K,`auto`,X,J],D=()=>[`auto`,`min`,`max`,`fr`,X,J],O=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],k=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],A=()=>[`auto`,...C()],j=()=>[W,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...C()],M=()=>[W,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...C()],N=()=>[W,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...C()],P=()=>[e,X,J],F=()=>[...y(),Me,Oe,{position:[X,J]}],ne=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],re=()=>[`auto`,`cover`,`contain`,Ne,we,{size:[X,J]}],I=()=>[ge,Z,Y],L=()=>[``,`none`,`full`,l,X,J],R=()=>[``,G,Z,Y],ie=()=>[`solid`,`dashed`,`dotted`,`double`],ae=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],z=()=>[G,ge,Me,Oe],oe=()=>[``,`none`,p,X,J],B=()=>[`none`,G,X,J],V=()=>[`none`,G,X,J],se=()=>[G,X,J],H=()=>[W,`full`,...C()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[q],breakpoint:[q],color:[_e],container:[q],"drop-shadow":[q],ease:[`in`,`out`,`in-out`],font:[Se],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[q],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[q],shadow:[q],spacing:[`px`,G],text:[q],"text-shadow":[q],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,W,J,X,h]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,X,J]}],"container-named":[Ce],columns:[{columns:[G,J,X,s]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:b()}],overflow:[{overflow:x()}],"overflow-x":[{"overflow-x":x()}],"overflow-y":[{"overflow-y":x()}],overscroll:[{overscroll:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{"inset-s":w(),start:w()}],end:[{"inset-e":w(),end:w()}],"inset-bs":[{"inset-bs":w()}],"inset-be":[{"inset-be":w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[K,`auto`,X,J]}],basis:[{basis:[W,`full`,`auto`,s,...C()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[G,W,`auto`,`initial`,`none`,J]}],grow:[{grow:[``,G,X,J]}],shrink:[{shrink:[``,G,X,J]}],order:[{order:[K,`first`,`last`,`none`,X,J]}],"grid-cols":[{"grid-cols":T()}],"col-start-end":[{col:te()}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":T()}],"row-start-end":[{row:te()}],"row-start":[{"row-start":E()}],"row-end":[{"row-end":E()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":D()}],"auto-rows":[{"auto-rows":D()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...O(),`normal`]}],"justify-items":[{"justify-items":[...k(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...k()]}],"align-content":[{content:[`normal`,...O()]}],"align-items":[{items:[...k(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...k(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":O()}],"place-items":[{"place-items":[...k(),`baseline`]}],"place-self":[{"place-self":[`auto`,...k()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pbs:[{pbs:C()}],pbe:[{pbe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mbs:[{mbs:A()}],mbe:[{mbe:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":C()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":C()}],"space-y-reverse":[`space-y-reverse`],size:[{size:j()}],"inline-size":[{inline:[`auto`,...M()]}],"min-inline-size":[{"min-inline":[`auto`,...M()]}],"max-inline-size":[{"max-inline":[`none`,...M()]}],"block-size":[{block:[`auto`,...N()]}],"min-block-size":[{"min-block":[`auto`,...N()]}],"max-block-size":[{"max-block":[`none`,...N()]}],w:[{w:[s,`screen`,...j()]}],"min-w":[{"min-w":[s,`screen`,`none`,...j()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...j()]}],h:[{h:[`screen`,`lh`,...j()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...j()]}],"max-h":[{"max-h":[`screen`,`lh`,...j()]}],"font-size":[{text:[`base`,n,Z,Y]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Ie,Ee]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,ge,J]}],"font-family":[{font:[je,De,t]}],"font-features":[{"font-features":[J]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,X,J]}],"line-clamp":[{"line-clamp":[G,`none`,X,Te]}],leading:[{leading:[a,...C()]}],"list-image":[{"list-image":[`none`,X,J]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,X,J]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ie(),`wavy`]}],"text-decoration-thickness":[{decoration:[G,`from-font`,`auto`,X,Y]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[G,`auto`,X,J]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:C()}],"tab-size":[{tab:[K,X,J]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,X,J]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,X,J]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:re()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},K,X,J],radial:[``,X,J],conic:[K,X,J]},Pe,ke]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:I()}],"gradient-via-pos":[{via:I()}],"gradient-to-pos":[{to:I()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:R()}],"border-w-x":[{"border-x":R()}],"border-w-y":[{"border-y":R()}],"border-w-s":[{"border-s":R()}],"border-w-e":[{"border-e":R()}],"border-w-bs":[{"border-bs":R()}],"border-w-be":[{"border-be":R()}],"border-w-t":[{"border-t":R()}],"border-w-r":[{"border-r":R()}],"border-w-b":[{"border-b":R()}],"border-w-l":[{"border-l":R()}],"divide-x":[{"divide-x":R()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":R()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ie(),`hidden`,`none`]}],"divide-style":[{divide:[...ie(),`hidden`,`none`]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...ie(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[G,X,J]}],"outline-w":[{outline:[``,G,Z,Y]}],"outline-color":[{outline:P()}],shadow:[{shadow:[``,`none`,u,Fe,Ae]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":[`none`,d,Fe,Ae]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:R()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[G,Y]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":R()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":[`none`,ee,Fe,Ae]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[G,X,J]}],"mix-blend":[{"mix-blend":[...ae(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ae()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[G]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[X,J]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":y()}],"mask-image-conic-pos":[{"mask-conic":[G]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:re()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,X,J]}],filter:[{filter:[``,`none`,X,J]}],blur:[{blur:oe()}],brightness:[{brightness:[G,X,J]}],contrast:[{contrast:[G,X,J]}],"drop-shadow":[{"drop-shadow":[``,`none`,f,Fe,Ae]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:[``,G,X,J]}],"hue-rotate":[{"hue-rotate":[G,X,J]}],invert:[{invert:[``,G,X,J]}],saturate:[{saturate:[G,X,J]}],sepia:[{sepia:[``,G,X,J]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,X,J]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[G,X,J]}],"backdrop-contrast":[{"backdrop-contrast":[G,X,J]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,G,X,J]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[G,X,J]}],"backdrop-invert":[{"backdrop-invert":[``,G,X,J]}],"backdrop-opacity":[{"backdrop-opacity":[G,X,J]}],"backdrop-saturate":[{"backdrop-saturate":[G,X,J]}],"backdrop-sepia":[{"backdrop-sepia":[``,G,X,J]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,X,J]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[G,`initial`,X,J]}],ease:[{ease:[`linear`,`initial`,g,X,J]}],delay:[{delay:[G,X,J]}],animate:[{animate:[`none`,_,X,J]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[m,X,J]}],"perspective-origin":[{"perspective-origin":b()}],rotate:[{rotate:B()}],"rotate-x":[{"rotate-x":B()}],"rotate-y":[{"rotate-y":B()}],"rotate-z":[{"rotate-z":B()}],scale:[{scale:V()}],"scale-x":[{"scale-x":V()}],"scale-y":[{"scale-y":V()}],"scale-z":[{"scale-z":V()}],"scale-3d":[`scale-3d`],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[X,J,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:b()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:H()}],"translate-x":[{"translate-x":H()}],"translate-y":[{"translate-y":H()}],"translate-z":[{"translate-z":H()}],"translate-none":[`translate-none`],zoom:[{zoom:[K,X,J]}],accent:[{accent:P()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,X,J]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":P()}],"scrollbar-track-color":[{"scrollbar-track":P()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mbs":[{"scroll-mbs":C()}],"scroll-mbe":[{"scroll-mbe":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pbs":[{"scroll-pbs":C()}],"scroll-pbe":[{"scroll-pbe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,X,J]}],fill:[{fill:[`none`,...P()]}],"stroke-w":[{stroke:[G,Z,Y,Te]}],stroke:[{stroke:[`none`,...P()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function Ke(...e){return Ge(g(e))}export{f as a,s as c,m as i,l,Ge as n,d as o,g as r,o as s,Ke as t};
@@ -8,8 +8,9 @@
8
8
  <link rel="preconnect" href="https://fonts.googleapis.com" />
9
9
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
10
10
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
11
- <script type="module" crossorigin src="/assets/index-DtqMMBTr.js"></script>
12
- <link rel="stylesheet" crossorigin href="/assets/index-D4F9AJnn.css">
11
+ <script type="module" crossorigin src="/assets/index-DIlFyIOO.js"></script>
12
+ <link rel="modulepreload" crossorigin href="/assets/utils-CnADgYgh.js">
13
+ <link rel="stylesheet" crossorigin href="/assets/index-DS4jESOB.css">
13
14
  </head>
14
15
  <body>
15
16
  <div id="root"></div>