"use strict";(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[49708],{461909:(t,e,i)=>{function r(t){if(void 0===t)return null;const e=t.match(/(delayed_streaming)_([\d]{1,4})/);return null===e?null:{mode:e[1],interval:parseInt(e[2])}}function o(t){const e=r(t.update_mode);return null===e||(t.update_mode=e.mode,t.update_mode_seconds=e.interval),t}i.r(e),i.d(e,{parseUpdateMode:()=>r,normalizeUpdateMode:()=>o})},632446:(t,e,i)=>{i.d(e,{enabled:()=>_,getConfig:()=>c}) ;const r=JSON.parse('{"free":{"CHART_STORAGE":{"limit":1},"MULTIPLE_CHARTS":{"limit":1},"INDICATORS_ON_CHART":{"limit":3},"HISTORICAL_BARS":{"limit":5},"STUDY_ON_STUDY":{"limit":270,"child_limit":1},"SERVER_SIDE_ALERTS":{"limit":1},"SCREENER_ALERTS":{"limit":1},"SCREENER_INTERVALS":{"interval":["1D","1W","1M"]},"STUDY_TEMPLATES":{"limit":1},"SIMULTANEOUS_CONNECTIONS":{"limit":1},"BACKEND_CONNECTIONS":{"limit":2},"IDEA_SOCIAL_LINKS":{"socials":["Twitter","Youtube"]},"MULTICOLOR_FLAGGED_SYMBOLS":{"limit":1}},"__legacy_pro":{"CHART_STORAGE":{"limit":99999},"MULTIPLE_CHARTS":{"limit":8},"CUSTOM_INTERVALS":{},"MULTIPLE_WATCHLISTS":{},"IMPORT_WATCHLISTS":{},"EXPORT_WATCHLISTS":{},"INDICATORS_ON_CHART":{"limit":99999},"TV_PROSTUDIES":{"study_packages":["tv-chartpatterns"]},"HISTORICAL_BARS":{"limit":10},"TV_VOLUMEBYPRICE":{"study_packages":["tv-volumebyprice"]},"STUDY_ON_STUDY":{"limit":270,"child_limit":99999},"TICK_BY_TICK_PUSH_DATA":{},"SERVER_SIDE_ALERTS":{"limit":20},"SCREENER_ALERTS":{"limit":99999},"SCREENER_AUTO_REFRESH":{},"SCREENER_EXPORT_DATA":{},"SCREENER_INTERVALS":{"interval":["1m","5m","15m","30m","1h","2h","4h","1D","1W","1M"]},"NO_SPONSORED_ADS":{},"STUDY_TEMPLATES":{"limit":99999},"SIMULTANEOUS_CONNECTIONS":{"limit":1},"BACKEND_CONNECTIONS":{"limit":10},"IDC_AVAILABLE_DELAY":{},"STATUS":{"disable_on_trial":true},"MULTIFLAGGED_SYMBOLS_LISTS":{},"BAR_REPLAY_INTRADAY":{},"SHOWS":{"disable_on_trial":true},"ALERTS_WEBHOOK":{},"DEEP_FUNDAMENTALS_HISTORY":{},"IDEA_SOCIAL_LINKS":{"socials":["Twitter","Youtube"]},"EXTENDED_SOCIAL_LINKS":{"socials":["Facebook","Instagram"],"disable_on_trial":true},"MULTI_MONITOR":{},"PUBLISH_PROTECTED_SCRIPTS":{"disable_on_trial":true},"STREAMS_ACCESS":{"followers":10}},"__legacy_pro_realtime":{"extends":"__legacy_pro","BACKEND_CONNECTIONS":{"limit":20},"TV_PROSTUDIES":{"study_packages":["tv-prostudies","tv-chartpatterns"]},"SERVER_SIDE_ALERTS":{"limit":1000},"CAN_EDIT_PUBLIC_CHATS":{"disable_on_trial":true},"EXPORT_CHART_DATA":{},"CUSTOM_FORMULAS":{},"INTRADAY_EXOTIC_CHARTS":{},"BACKTESTING_EXPORT":{}},"__legacy_pro_premium":{"extends":"__legacy_pro_realtime","BACKEND_CONNECTIONS":{"limit":50},"USE_BAR_MAGNIFIER":{},"HISTORICAL_BARS":{"limit":20},"IDEA_SIGNATURE":{"disable_on_trial":true},"PROFILE_WEBSITE_FIELD":{"disable_on_trial":true},"ALERTS_NO_EXPIRATION":{},"PUBLISH_INVITE_ONLY_SCRIPTS":{"disable_on_trial":true},"EXPORT_CHART_DATA":{},"DEEP_HISTORY_BACKTEST":{},"ALERTS_ON_SECONDS":{},"PERMANENT_STREAM_RECORDS":{},"EXTENDED_SOCIAL_LINKS":{"socials":["Facebook","Instagram","Website"],"disable_on_trial":true},"SECONDS_INTERVALS":{}},"pro":{"CHART_STORAGE":{"limit":5},"MULTIPLE_CHARTS":{"limit":2},"CUSTOM_INTERVALS":{},"MULTIPLE_WATCHLISTS":{},"IMPORT_WATCHLISTS":{},"EXPORT_WATCHLISTS":{},"INDICATORS_ON_CHART":{"limit":5},"TV_PROSTUDIES":{"study_packages":["tv-chartpatterns"]},"HISTORICAL_BARS":{"limit":10},"TV_VOLUMEBYPRICE":{"study_packages":["tv-volumebyprice"]},"STUDY_ON_STUDY":{"limit":270,"child_limit":1},"TICK_BY_TICK_PUSH_DATA":{},"SERVER_SIDE_ALERTS":{"limit":20},"SCREENER_ALERTS":{"limit":99999},"SCREENER_AUTO_REFRESH":{},"SCREENER_EXPORT_DATA":{},"SCREENER_INTERVALS":{"interval":["1m","5m","15m","30m","1h","2h","4h","1D","1W","1M"]},"NO_SPONSORED_ADS":{},"STUDY_TEMPLATES":{"limit":99999},"SIMULTANEOUS_CONNECTIONS":{"limit":1},"BACKEND_CONNECTIONS":{"limit":10},"IDC_AVAILABLE_DELAY":{},"STATUS":{"disable_on_trial":true},"BAR_REPLAY_INTRADAY":{},"MULTIFLAGGED_SYMBOLS_LISTS":{},"SHOWS":{"disable_on_trial":true},"ALERTS_WEBHOOK":{},"DEEP_FUNDAMENTALS_HISTORY":{},"PUBLISH_PROTECTED_SCRIPTS":{"disable_on_trial":true},"IDEA_SOCIAL_LINKS":{"socials":["Twitter","Youtube"]},"EXTENDED_SOCIAL_LINKS":{"socials":["Facebook","Instagram"],"disable_on_trial":true},"MULTI_MONITOR":{},"MULTICOLOR_FLAGGED_SYMBOLS":{"limit":7},"INTRADAY_EXCHANGE":{},"VOLUME_PROFILE":{},"STREAMS_ACCESS":{"followers":10}},"pro_realtime":{"extends":"pro","CHART_STORAGE":{"limit":10},"MULTIPLE_CHARTS":{"limit":4},"INDICATORS_ON_CHART":{"limit":10},"TV_PROSTUDIES":{"study_packages":["tv-prostudies","tv-chartpatterns"]},"STUDY_ON_STUDY":{"limit":270,"child_limit":9},"SERVER_SIDE_ALERTS":{"limit":100},"CAN_EDIT_PUBLIC_CHATS":{"disable_on_trial":true},"SIMULTANEOUS_CONNECTIONS":{"limit":2},"BACKEND_CONNECTIONS":{"limit":20},"EXPORT_CHART_DATA":{},"CUSTOM_FORMULAS":{},"INTRADAY_EXOTIC_CHARTS":{},"KAGI_RENKO":{},"INTRADAY_SPREAD":{},"CUSTOM_CHATS":{},"BACKTESTING_EXPORT":{}},"pro_premium":{"extends":"pro_realtime","USE_BAR_MAGNIFIER":{},"CHART_STORAGE":{"limit":99999},"MULTIPLE_CHARTS":{"limit":8},"INDICATORS_ON_CHART":{"limit":25},"HISTORICAL_BARS":{"limit":20},"STUDY_ON_STUDY":{"limit":270,"child_limit":24},"SERVER_SIDE_ALERTS":{"limit":400},"SIMULTANEOUS_CONNECTIONS":{"limit":5},"BACKEND_CONNECTIONS":{"limit":50},"IDEA_SIGNATURE":{"disable_on_trial":true},"PROFILE_WEBSITE_FIELD":{"disable_on_trial":true},"ALERTS_NO_EXPIRATION":{},"PUBLISH_INVITE_ONLY_SCRIPTS":{"disable_on_trial":true},"EXPORT_CHART_DATA":{},"DEEP_HISTORY_BACKTEST":{},"ALERTS_ON_SECONDS":{},"PERMANENT_STREAM_RECORDS":{},"EXTENDED_SOCIAL_LINKS":{"socials":["Facebook","Instagram","Website"],"disable_on_trial":true},"SECONDS_INTERVALS":{}},"pro_mini_alerts":{"extends":"free","SERVER_SIDE_ALERTS":{"limit":30},"SCREENER_ALERTS":{"limit":99999},"SHOWS":{"disable_on_trial":true},"IDC_AVAILABLE_DELAY":{},"DEEP_FUNDAMENTALS_HISTORY":{}},"pro_mini_ads":{"extends":"free","NO_SPONSORED_ADS":{},"SHOWS":{"disable_on_trial":true},"IDC_AVAILABLE_DELAY":{},"DEEP_FUNDAMENTALS_HISTORY":{}},"pro_mini_layouts":{"extends":"free","MULTIPLE_CHARTS":{"limit":8},"SHOWS":{"disable_on_trial":true},"IDC_AVAILABLE_DELAY":{},"DEEP_FUNDAMENTALS_HISTORY":{}},"pro_edu":{"extends":"free","CHART_STORAGE":{"limit":3},"MULTIPLE_CHARTS":{"limit":2},"MULTIPLE_WATCHLISTS":{},"IMPORT_WATCHLISTS":{},"EXPORT_WATCHLISTS":{},"TICK_BY_TICK_PUSH_DATA":{},"SERVER_SIDE_ALERTS":{"limit":5},"SCREENER_ALERTS":{"limit":99999},"SHOWS":{"disable_on_trial":true},"IDC_AVAILABLE_DELAY":{},"DEEP_FUNDAMENTALS_HISTORY":{}}}'),o=JSON.parse('{"cme":{"INDICATORS_ON_CHART":{"limit":99999}},"bovespa":{"INDICATORS_ON_CHART":{"limit":99999}},"qecomqa":{"INDICATORS_ON_CHART":{"limit":99999}}}') ;var s=i(833813),n=i(960254),a=i(919490);function _(t,e,i){let r=window.user;i&&(r=i);const o=c(t,e,r);return!!o&&!(o[s.ProductFeatures.DISABLE_ON_TRIAL]&&(!r||r.is_trial))}function l(t){const e=r[t];return e?e.extends?Object.assign({},l(e.extends),e):e:null}function c(t,e,i){var r;let s=l(e||function(t){let e=window.user;t&&(e=t);let i=(null==e?void 0:e.pro_plan)||n.ProPlans.Free;const r=i!==n.ProPlans.Free&&!(0,a.isTrialProduct)(i);return r||(i=(0,a.getProductForTrial)(i)),r&&e&&!e.is_pro_limited&&!e.new_pro_product_line&&(i=`__legacy_${i}`),i}(i));if(!s)return null;const _=null===(r=window.TradingView)||void 0===r?void 0:r.widgetCustomer;return _&&o[_]&&(s=Object.assign({},s,o[_])),s&&s[t]||null}},833813:(t,e,i)=>{var r;i.d(e,{ProductFeatures:()=>r,UNLIMITED_FEATURE_LIMIT:()=>o}),function(t){t.DISABLE_ON_TRIAL="disable_on_trial",t.CUSTOM_INTERVALS="CUSTOM_INTERVALS",t.CHART_STORAGE="CHART_STORAGE",t.MULTIPLE_CHARTS="MULTIPLE_CHARTS",t.MULTIPLE_WATCHLISTS="MULTIPLE_WATCHLISTS",t.IMPORT_WATCHLISTS="IMPORT_WATCHLISTS",t.EXPORT_WATCHLISTS="EXPORT_WATCHLISTS",t.INDICATORS_ON_CHART="INDICATORS_ON_CHART",t.STUDY_ON_STUDY="STUDY_ON_STUDY",t.TICK_BY_TICK_PUSH_DATA="TICK_BY_TICK_PUSH_DATA",t.SERVER_SIDE_ALERTS="SERVER_SIDE_ALERTS",t.PUBLISH_INVITE_ONLY_SCRIPTS="PUBLISH_INVITE_ONLY_SCRIPTS",t.PUBLISH_PROTECTED_SCRIPTS="PUBLISH_PROTECTED_SCRIPTS",t.SCREENER_ALERTS="SCREENER_ALERTS",t.SCREENER_AUTO_REFRESH="SCREENER_AUTO_REFRESH",t.SCREENER_EXPORT_DATA="SCREENER_EXPORT_DATA",t.SCREENER_INTERVALS="SCREENER_INTERVALS",t.SIMULTANEOUS_CONNECTIONS="SIMULTANEOUS_CONNECTIONS",t.STUDY_TEMPLATES="STUDY_TEMPLATES",t.CAN_EDIT_PUBLIC_CHATS="CAN_EDIT_PUBLIC_CHATS",t.NO_SPONSORED_ADS="NO_SPONSORED_ADS",t.IDC_AVAILABLE_DELAY="IDC_AVAILABLE_DELAY",t.STATUS="STATUS",t.ALERTS_NO_EXPIRATION="ALERTS_NO_EXPIRATION",t.MULTIFLAGGED_SYMBOLS_LISTS="MULTIFLAGGED_SYMBOLS_LISTS",t.BAR_REPLAY_INTRADAY="BAR_REPLAY_INTRADAY",t.TV_VOLUMEBYPRICE="TV_VOLUMEBYPRICE",t.ALERTS_WEBHOOK="ALERTS_WEBHOOK",t.DEEP_FUNDAMENTALS_HISTORY="DEEP_FUNDAMENTALS_HISTORY",t.EXPORT_CHART_DATA="EXPORT_CHART_DATA",t.ALERTS_ON_SECONDS="ALERTS_ON_SECONDS",t.PERMANENT_STREAM_RECORDS="PERMANENT_STREAM_RECORDS",t.IDEA_SOCIAL_LINKS="IDEA_SOCIAL_LINKS",t.EXTENDED_SOCIAL_LINKS="EXTENDED_SOCIAL_LINKS",t.DEEP_HISTORY_BACKTEST="DEEP_HISTORY_BACKTEST",t.BACKTESTING_EXPORT="BACKTESTING_EXPORT",t.USE_BAR_MAGNIFIER="USE_BAR_MAGNIFIER",t.HISTORICAL_BARS="HISTORICAL_BARS",t.KAGI_RENKO="KAGI_RENKO",t.INTRADAY_SPREAD="INTRADAY_SPREAD",t.SECONDS_INTERVALS="SECONDS_INTERVALS",t.MULTICOLOR_FLAGGED_SYMBOLS="MULTICOLOR_FLAGGED_SYMBOLS",t.INTRADAY_EXCHANGE="INTRADAY_EXCHANGE",t.CUSTOM_CHATS="CUSTOM_CHATS",t.VOLUME_PROFILE="VOLUME_PROFILE",t.PRIMITIVE_ALERTS="PRIMITIVE_ALERTS",t.COMPLEX_ALERTS="COMPLEX_ALERTS"}(r||(r={}));const o=99999},175203:(t,e,i)=>{i.d(e,{telemetry:()=>u});var r=i(869403),o=i.n(r),s=i(890740),n=i(638456),a=i(314802);i(659863);const _=(0,i(272001).getLogger)("Common.Telemetry"),l={default:15e3,site:3e5 },c=["before_websocket_connection_time_frame","websocket_connection_time_frame","first_series_full_time_frame","page_full_load_time_frame","page_load_time_frame"];const u=new class{constructor(){this.reportSent=new(o()),this.timeCounters={series:{marks:[]},study:{},pine:{}},this._timeoutIds={},this._commonAdditionalData={cluster:null,userId:"0"},this._reportStash={}}setSessionInfo(t){const e=this._parseCluster(t);null!==e&&(this._commonAdditionalData.cluster=e)}sendReport(t,e,i){var r;if(!this._isAbleToSendReport(e))return;const o=this._getSubserviceType(t),s=this._getHost(t,o);if(null!==s){if(i=void 0===i?{count:1}:i,this._addReportToStash(i,e,s),!this._timeoutIds[t]){const e=null!==(r=l[t])&&void 0!==r?r:l.default;this._timeoutIds[t]=setTimeout(this._sendTelemetryToService.bind(this,t,s),e)}}else _.logError(`Unable to get host for counter: ${e}, metric type: ${t}, serivce type: ${o}`)}sendChartReport(t,e,i=!0){this._sendServiceSpecifiedReport("charts",t,e,i)}sendLineToolsStorageReport(t,e,i=!0){this._sendServiceSpecifiedReport("line_tools_storage",t,e,i)}_sendServiceSpecifiedReport(t,e,i,r=!0){this._updateUserInfo(),i=void 0===i?{count:1}:i,r&&(i=this._appendCommonAdditionalInfo(i,["cluster","userId"])),this.sendReport(t,e,i)}_updateUserInfo(){const t="user"in window&&"id"in window.user?window.user.id:"0";this._commonAdditionalData.userId=String(t)}_isAbleToSendReport(t){const e=window.TELEMETRY_HOSTS,i=c.includes(t),r=Boolean(window.TradingView.onChartPage||(0,n.onWidget)());return e&&(!i||r)}_sendTelemetryToService(t,e){if(this._reportStash.hasOwnProperty(e)){const t=this._cropParams(this._reportStash[e]),i=this._renameAllParams(t),r={event:"report_stash",params:this._cleanAllParams(i)};_.logDebug(`Report to host: ${e}; stash: ${JSON.stringify(this._reportStash[e])}`),this.reportSent.fire(this._reportStash[e]),delete this._reportStash[e],(0,s.fetch)(`${e}/report`,{method:"POST",body:JSON.stringify(r)})}this._timeoutIds[t]=null}_getHost(t,e){const i=window.TELEMETRY_HOSTS,r=i[t]&&i[t][e];return Boolean(r)?r:null}_getSubserviceType(t){if(!["charts","site"].includes(t))return"all";let e="free";const i=window.user.is_pro;return"charts"===t&&(0,a.isOnMobileAppPage)("old")?e=i?"ios_pro":"ios_free":"charts"===t&&(0,a.isOnMobileAppPage)("new")?e=i?"android_pro":"android_free":(0,n.onWidget)()?e="widget":i&&(e="pro"),e}_parseCluster(t){let e;try{e=JSON.parse(t).session_id}catch(t){return _.logError("Could not parse cluster id (session id)"),null}const i=/(.*@)(.*)/gi.exec(e);return null!==i&&i.length>=3?i[2]:null}_appendCommonAdditionalInfo(t,e){return e.forEach((e=>{e in this._commonAdditionalData&&(t.additional=t.additional||{},t.additional[e]=this._commonAdditionalData[e])})),t}_cropParams(t){var e;for(const i in t)t.hasOwnProperty(i)&&t[i].length>1e3&&(t.too_much_metrics_frame=null!==(e=t.too_much_metrics_frame)&&void 0!==e?e:[],t.too_much_metrics_frame.push({value:t[i].length,additional:{event:i}}),delete t[i]);return t}_renameAllParams(t){const e={};for(const i in t)t.hasOwnProperty(i)&&(e[i]=[],t[i].forEach((t=>{ e[i].push(this._renameEntryParams(t))})));return e}_renameEntryParams(t){const e={count:"c",value:"v",text:"t",additional:"a"};return Object.keys(t).reduce(((i,r)=>(i[e[r]]=t[r],i)),{})}_cleanAllParams(t){const e={};for(const i in t)if(t.hasOwnProperty(i)){e[i]=[];const r={c:0};t[i].forEach((t=>{const o=this._cleanEntryParams(t),s=Object.keys(o).length;1===s&&void 0!==o.c?r.c+=o.c:s>0&&e[i].push(o)})),r.c>0&&e[i].push(r),0===e[i].length&&delete e[i]}return e}_cleanEntryParams(t){const e=Object.keys(t).reduce(((e,i)=>"c"!==i&&"t"!==i||t[i]?(e[i]=t[i],e):e),{});return"c"in e||"v"in e||"t"in e?e:{}}_addReportToStash(t,e,i){i in this._reportStash||(this._reportStash[i]={}),e in this._reportStash[i]||(this._reportStash[i][e]=[]),Object.keys(t).length>0&&this._reportStash[i][e].push(t)}}},779923:(t,e,i)=>{async function r(t,e){const r=await Promise.all([i.e(93404),i.e(82507),i.e(68726),i.e(56305),i.e(3954),i.e(20772),i.e(95460),i.e(53053),i.e(55925),i.e(19453),i.e(49078),i.e(90095),i.e(962),i.e(27582),i.e(38890)]).then(i.bind(i,918728));return r.showSimpleDialog(t,r.renameModule,e)}async function o(t,e){const r=await Promise.all([i.e(93404),i.e(82507),i.e(68726),i.e(56305),i.e(3954),i.e(20772),i.e(95460),i.e(53053),i.e(55925),i.e(19453),i.e(49078),i.e(90095),i.e(962),i.e(27582),i.e(38890)]).then(i.bind(i,918728));return r.showSimpleDialog(t,r.confirmModule,e)}async function s(t,e){const r=await Promise.all([i.e(93404),i.e(82507),i.e(68726),i.e(56305),i.e(3954),i.e(20772),i.e(95460),i.e(53053),i.e(55925),i.e(19453),i.e(49078),i.e(90095),i.e(962),i.e(27582),i.e(38890)]).then(i.bind(i,918728));return r.showSimpleDialog(t,r.warningModule,e)}i.r(e),i.d(e,{showRename:()=>r,showConfirm:()=>o,showWarning:()=>s})},736844:(t,e,i)=>{i.r(e),i.d(e,{QuoteCache:()=>o,QUOTE_FIELDS:()=>s,QUOTE_FIELDS_CACHE:()=>n});var r=i(650151);class o{constructor(t){this._cache=new Map,this._fields=[...t.fields]}update(t,e,i){const o=(0,r.ensureDefined)(t.symbolname);if(this._cache.has(o)||this._cache.set(o,{symbolname:o,status:t.status,values:{}}),"error"===t.status)return;const s=(0,r.ensureDefined)(this._cache.get(o));s.status=t.status;for(const r of this._fields)e.has(r)&&(i||void 0!==t.values[r])&&(s.values[r]=t.values[r])}get(t){var e;return null!==(e=this._cache.get(t))&&void 0!==e?e:null}fields(){return this._fields}} const s=new Set(["pro_name","base_name","logoid","currency-logoid","base-currency-logoid","short_name","description","exchange","listed_exchange","type","country_code","provider_id","sector","typespecs","industry","currency_id","last_price","fractional","minmov","minmove2","pricescale","change","change_percent","volume","average_volume","market_cap_basic","total_revenue","earnings_per_share_basic_ttm","price_earnings_ttm","beta_1_year","dps_common_stock_prim_issue_fy","dividends_yield","earnings_release_next_date","earnings_per_share_forecast_next_fq","earnings_release_date","earnings_per_share_fq","fundamental_currency_code","symbol-primaryname","currency_code","rates_mc","rates_fy","rates_ttm","value_unit_id","update_mode","language","local_description","short_description","source","source2","format","recommendation_mark"]),n=new o({fields:s})},947809:(t,e,i)=>{i.r(e),i.d(e,{getQuoteSessionInstance:()=>n,setQuoteSessionInstance:()=>a,getQuoteSessionNoEnsure:()=>_,destroyQuoteSessions:()=>l});var r=i(291670),o=i.n(r);const s={};function n(t="full"){return s[t]||a(t,new(o())(t)),s[t]}function a(t="full",e){s[t]=e}function _(t="full"){return s[t]}function l(){for(const t in s)if(s.hasOwnProperty(t)){const e=s[t];void 0!==e&&e.destroy(),delete s[t]}}},801669:(t,e,i)=>{i.d(e,{QuoteSession:()=>o});var r=i(777491);class o{constructor(t,e=(0,r.randomHash)()){this._sessionstarted=!1,this._globalHandler=null,this._chartApi=t,this._sessionid="qs_"+e}destroy(){this._sessionstarted&&(this._chartApi.quoteDeleteSession(this._sessionid),this._sessionstarted=!1)}connected(){return this._chartApi.connected()}connect(t){this._globalHandler=t,this._chartApi.createSession(this._sessionid,this),this._chartApi.connect()}disconnect(){this._chartApi.disconnect()}quoteAddSymbols(t){this._chartApi.quoteAddSymbols(this._sessionid,t)}quoteRemoveSymbols(t){this._chartApi.quoteRemoveSymbols(this._sessionid,t)}quoteFastSymbols(t){this._chartApi.quoteFastSymbols(this._sessionid,t)}quoteSetFields(t){this._chartApi.quoteSetFields(this._sessionid,t)}onMessage(t){var e;switch(t.method){case"connected":this._sessionstarted||(this._chartApi.quoteCreateSession(this._sessionid),this._sessionstarted=!0);break;case"disconnected":this._sessionstarted=!1}null===(e=this._globalHandler)||void 0===e||e.call(this,t)}quoteHibernateAll(){this._chartApi.quoteHibernateAll(this._sessionid)}}window.TradingView.QuoteSession=o},291670:(t,e,i)=>{t=i.nmd(t);var r=i(869403),o=i(343370).default,s=i(12481).default,n=i(368725).PriceFormatter;const{uniq:a}=i(588565);var _=i(777491);const{normalizeUpdateMode:l}=i(461909);var c=i(120149).deepExtend;const{QUOTE_FIELDS_CACHE:u,QUOTE_FIELDS:S}=i(736844);var d;function h(t,e){this.options=Object.assign({throttleTimeout:125},e),this._connected=!1,this._symbol_data={},this._subscriptions={},this.onConnect=new r,this.onDisconnect=new r,this._quoteApi=new d(window.ChartApiInstance),this._type=t||"full",this._delayUpdateFastSymbols=s(this._updateFastSymbols,250),this._throttledSymbolData={},this._formatterValuesCache={}, this._waitingForFormatters={},this._snapshotValuesCache={},this._waitingForSnapshot={},this.connect()}d=i(801669).QuoteSession,h.prototype.destroy=function(){this._quoteApi.destroy(),this._quoteApi=null,this._connected=!1,this.onDisconnect.fire()},h.prototype.typeFields={},h.prototype.typeFields.simple=["base-currency-logoid","ch","chp","currency-logoid","currency_code","currency_id","base_currency_id","current_session","description","exchange","format","fractional","is_tradable","language","local_description","listed_exchange","logoid","lp","lp_time","minmov","minmove2","original_name","pricescale","pro_name","short_name","type","typespecs","update_mode","volume","value_unit_id"],h.prototype.typeFields.simpleDetailed=[].concat(h.prototype.typeFields.simple,["ask","bid","fundamentals","high_price","is_tradable","low_price","open_price","prev_close_price","rch","rchp","rtc","rtc_time","status","basic_eps_net_income","beta_1_year","earnings_per_share_basic_ttm","industry","market_cap_basic","price_earnings_ttm","sector","volume","dividends_yield","timezone"]),h.prototype.typeFields.full=[],h.prototype.typeFields.watchlist=[].concat(h.prototype.typeFields.simple,["rchp","rtc","country_code","provider_id"]),h.prototype.typeFields.portfolio=["pro_name","short_name","exchange","listed_exchange","description","sector","type","typespecs","industry","currency_code","currency_id","ch","chp","logoid","currency-logoid","base-currency-logoid","earnings_per_share_forecast_next_fq","earnings_release_next_date","earnings_release_date","earnings_per_share_fq","lp","fractional","minmov","minmove2","pricescale","volume","average_volume","market_cap_basic","total_revenue","earnings_per_share_basic_ttm","price_earnings_ttm","beta_1_year","dps_common_stock_prim_issue_fy","dividends_yield","fundamental_currency_code","rates_mc","rates_fy","rates_ttm","format"],h.prototype.typeFields.notes=["short_name","pro_name","logoid","currency-logoid","base-currency-logoid","symbol-primaryname","type","typespecs"],h.prototype.connect=function(t){this._quoteApi.connect(this.quoteHandler.bind(this))},h.prototype.quoteHandler=function(t){var e=t.method,i=t.params;switch(e){case"connected":this._connected||(this._connected=!0,this.onConnected());break;case"quote_list_fields":break;case"quote_symbol_data":this._connected&&this.onSymbolData(i[0]);break;case"quote_completed":this._connected&&this.onSymbolData({symbolname:i[0],complete:performance.now(),values:{}});break;case"disconnected":this._connected&&(this._connected=!1,this.onDisconnect.fire())}},h.prototype.onConnected=function(){this.setFields();var t=Object.keys(this._symbol_data);t.length&&(this._quoteApi.quoteAddSymbols(t),this._delayUpdateFastSymbols()),this.onConnect.fire()},h.prototype.setFields=function(){var t=h.prototype.typeFields[this._type];t&&t.length&&this._quoteApi.quoteSetFields(t)},h.prototype.onSymbolData=function(t){try{t.status&&u.update(t,S,!1)}catch(t){}var e=t.symbolname,i=this._throttledSymbolData[e];i||(i=this._throttledSymbolData[e]={ fnDispatch:o(this.dipatchSymbolData.bind(this),this.options.throttleTimeout)}),i.cache?c(i.cache,t):i.cache=t,i.fnDispatch(e)},h.prototype._parseUpdateMode=function(t){l(t)},h.prototype.dipatchSymbolData=function(t){var e=this._symbol_data[t],i=this._throttledSymbolData[t].cache;if(delete this._throttledSymbolData[t].cache,this._symbol_data[t])for(var r in c(e,i),e.values&&this._parseUpdateMode(e.values),this._subscriptions){var o=this._subscriptions[r];o.has(t)&&o.get(t).forEach((function(t){t(e,i)}))}},h.prototype.subscribe=function(t,e,i){this._subscriptions[t]=this._subscriptions[t]||new Map;var r=this._subscriptions[t];e=[].concat(e);var o=[];e.forEach((function(t){this._symbol_data[t]?r&&r.has(t)||this._symbol_data[t].subscribers_count++:(this._symbol_data[t]={subscribers_count:1},o.push(t)),r.has(t)||r.set(t,[]),r.get(t).push(i),r.get(t).fast=!0,this._symbol_data[t]&&this._symbol_data[t].values&&i(this._symbol_data[t],this._symbol_data[t])}),this),o.length&&this._connected&&(this._quoteApi.quoteAddSymbols(o),this._delayUpdateFastSymbols())},h.prototype.unsubscribe=function(t,e,i){e=[].concat(e);for(var r=this._subscriptions[t],o=[],s=0;s{i.d(e,{PriceFormatter:()=>h,formatterOptions:()=>l,numberToStringWithLeadingZero:()=>d});var r=i(777754),o=i(960521),s=i(758337);var n=i(768038);const a=(0,i(272001).getLogger)("Chart.PriceFormatter"),_=new RegExp(/^(-?)[0-9]+$/),l={decimalSign:".",decimalSignFractional:"'"},c=new Map;const u=new Map;function S(t,e,i,r){let o=0;if(t>0&&e>0){let e=t;for(i&&r&&(e/=r);e>1;)e/=10,o++}return o}function d(t,e){if(!(0,s.isNumber)(t))return"n/a";if(!(0,s.isInteger)(e))throw new TypeError("invalid length");if(e<0||e>24)throw new TypeError("invalid length");if(0===e)return t.toString();return("0000000000000000"+t.toString()).slice(-e)}class h{constructor(t,e,n,_,l){if(this.type="price",this._formatterErrors={custom:r.t(null,void 0,i(332061)),fraction:r.t(null,void 0,i(142015)),secondFraction:r.t(null,void 0,i(643247))},e||(e=1),(0,s.isNumber)(t)&&(0,s.isInteger)(t)||(t=100),t<0)throw new TypeError("invalid base");this._priceScale=t,this._minMove=e,this._minMove2=_,this._variableMinTickData=n||void 0===l?void 0:function(t,e){var i,r,n,a,_;const l=e.split(" ").map(Number);if((0,s.isEven)(l.length)||l.some(Number.isNaN))return[{minTick:t,price:1/0,maxIndex:1/0}];const c=[];for(let t=0;t0&&2!==_&&4!==_&&8!==_?a.logDebug("invalid minmove2"):(this._fractional=n,this._fractionalLength=S(this._priceScale,this._minMove,this._fractional,this._minMove2))}isFractional(){return!!this._fractional}state(){return{fractional:this._fractional,fractionalLength:this._fractionalLength,minMove:this._minMove,minMove2:this._minMove2,priceScale:this._priceScale}}format(t,e,i,r=!0,s=!0,a=!1){let _="";t<0?(_=!1===r?"":"−",t=-t):t&&!0===e&&(_="+");let l,c=this._priceScale,u=this._minMove,d=this._fractionalLength;if(void 0!==this._variableMinTickData){const e=function(t){const{minTick:e,price:i,variableMinTickData:r,shouldCheckForEquality:o}=t;return void 0===r?e:function(t,e,i=!1){for(let r=0;r1e10)return this._formatAsExponential(e);let _;_=this._fractional?Math.pow(10,s):Math.pow(10,n)*i/(a?1:r);const c=1/_;let u;if(_>1)u=Math.floor(e);else{const t=Math.floor(Math.round(e/c)*c);u=0===Math.round((e-t)/c)?t:t+c}let S="";if(_>1){let t=a?new o.Big(e).mul(_).round(void 0,0).minus(new o.Big(u).mul(_)).toNumber():parseFloat((Math.round(e*_)-u*_).toFixed(s));t>=_&&(t-=_,u+=1);const i=a?new o.Big(t).round(s,0).toNumber():parseFloat(t.toFixed(s))*r;S=l.decimalSign+d(i,s+n),S=this._removeEndingZeros(S,n)}return u.toString()+S}_getFractPart(t,e,i){const r=[0,5],o=[0,2,5,7],s=[0,1,2,3,5,6,7,8];return 2===i?void 0===r[t]?-1:r[t]:4===i?void 0===o[t]?-1:o[t]:8===i&&2===e?void 0===s[t]?-1:s[t]:t}_formatAsFractional(t,e){const i=this._priceScale/this._minMove;let r=Math.floor(t),o=e?Math.floor(t*i)-r*i:Math.round(t*i)-r*i;o===i&&(o=0,r+=1);let s="";if(e){let n=(t-r-o/i)*i;n=Math.round(n*Math.pow(10,e)),s=d(n,e),s=this._removeEndingZeros(s,e)}if(!this._fractionalLength)throw new Error("_fractionalLength is not calculated");let n="";if(this._minMove2){const t=o%this._minMove2;o=(o-t)/this._minMove2;const e=d(o,this._fractionalLength),i=this._getFractPart(t,2,this._minMove2);n=e+l.decimalSignFractional+i}else o=this._getFractPart(o,1,this._priceScale),n=d(o*this._minMove,this._fractionalLength);return r.toString()+l.decimalSignFractional+n+s}_removeEndingZeros(t,e){for(let i=0;i=r||o<0)return{error:this._formatterErrors.fraction,res:!1};let s=i+o/r;return t&&(s=-s),{value:s,res:!0,suggest:this.format(s)}}return{error:this._formatterErrors.custom,res:!1}}_parseAsDoubleFractional(t){let e=_.exec(t);if(e){const e=parseFloat(t);return{value:e,res:!0,suggest:this.format(e)}}if(e=new RegExp("^(-?)([0-9]+)\\"+l.decimalSignFractional+"([0-9]+)\\"+l.decimalSignFractional+"([0-9]+)$").exec(t),e){const t=!!e[1],i=parseInt(e[2]),r=void 0!==this._minMove2?this._minMove2:NaN,o=this._priceScale/r,s=this._minMove2,n=this._patchFractPart(parseInt(e[3]),1,o),a=this._patchFractPart(parseInt(e[4]),2,s);if(n>=o||n<0)return{error:this._formatterErrors.fraction,res:!1};if(void 0!==s&&a>=s||a<0)return{error:this._formatterErrors.secondFraction,res:!1};let _=void 0!==s?i+n/o+a/(o*s):NaN;return t&&(_=-_),{value:_,res:!0,suggest:this.format(_)}}return{error:this._formatterErrors.custom,res:!1}}}},960489:(t,e,i)=>{var r;i.d(e,{BillingCycle:()=>r}),function(t){t.Monthly="m",t.ThreeMonths="3m",t.OneYear="y",t.TwoYears="2y"}(r||(r={}))},960254:(t,e,i)=>{var r,o,s;i.d(e,{ProPlans:()=>r,BrokerPlansIds:()=>s}),function(t){t.Free="free",t.Pro="pro",t.ProTrial="pro_trial",t.ProRealtime="pro_realtime",t.ProRealtimeTrial="pro_realtime_trial",t.ProPremium="pro_premium",t.ProPremiumTrial="pro_premium_trial",t.ProMiniAlerts="pro_mini_alerts",t.ProMiniAds="pro_mini_ads",t.ProMiniLayouts="pro_mini_layouts",t.ProEdu="pro_edu"}(r||(r={})),function(t){t.Platinum="platinum",t.Gold="gold",t.Silver="silver",t.Free="free"}(o||(o={})),function(t){t[t.Platinum=3]="Platinum",t[t.Gold=2]="Gold",t[t.Silver=1]="Silver",t[t.Free=0]="Free"}(s||(s={}))},919490:(t,e,i)=>{i.r(e),i.d(e,{TRIAL_SUFFIX:()=>n,EA_SUFFIX:()=>a,CUSTOM_SUFFIX:()=>_,billingCycleToTimeUnit:()=>l,getReadableCycle:()=>c,getReadableNumericCycle:()=>u,billingPeriodText:()=>S,isEarlyAccess:()=>d,isTrialProduct:()=>h,getProductForTrial:()=>E,getDiscountFromEarlyAccess:()=>m,toEarlyAccess:()=>T,humanizeProPlan:()=>p,humanizeCardPlan:()=>A,getAmountOfDaysForBillingCycle:()=>R,countDiscountByBillingCycle:()=>I,billingCycleToMonth:()=>f,round2:()=>O,round0:()=>C,floor0:()=>g,round2or0:()=>L,round1or0:()=>N,roundMinimal:()=>y,getPlanName:()=>P});i(984919);var r=i(777754),o=i(960254),s=i(960489);const n="_trial",a="_discount",_="_custom";function l(t){return{y:r.t(null,{plural:"years",count:1},i(870659)),m:r.t(null,{plural:"months",count:1},i(99062)), "3m":r.t(null,void 0,i(252656)),"2y":r.t(null,void 0,i(943350))}[t]}function c(t){return{m:r.t(null,void 0,i(438144)),y:r.t(null,void 0,i(739048)),"3m":r.t(null,void 0,i(490227)),"2y":r.t(null,void 0,i(565851))}[t]||""}function u(t){return{[s.BillingCycle.Monthly]:r.t(null,void 0,i(438144)),[s.BillingCycle.OneYear]:r.t(null,void 0,i(187534)),[s.BillingCycle.ThreeMonths]:r.t(null,void 0,i(490227)),[s.BillingCycle.TwoYears]:r.t(null,void 0,i(122354))}[t]||""}function S(t){var e;return null!==(e={y:r.t(null,void 0,i(304183)),m:r.t(null,void 0,i(432950)),"2y":r.t(null,void 0,i(89571))}[t])&&void 0!==e?e:""}function d(t){return/\d{0,2}_discount$/.test(t)}function h(t){return new RegExp(n+"$").test(t)}function E(t){return t.split(n)[0]}function m(t){const e=t.match(new RegExp("^(d{0,2})"+a+"$"));return e?+e[1]||50:0}function T(t,e){return`${t}_${e}${a}`}function p(t,e){let s=t;switch(t){case o.ProPlans.Free:s="Basic";break;case o.ProPlans.Pro:s="Pro";break;case o.ProPlans.ProRealtime:s="Pro+";break;case o.ProPlans.ProPremium:s="Premium";break;case o.ProPlans.ProMiniAds:case o.ProPlans.ProMiniLayouts:case o.ProPlans.ProMiniAlerts:s=r.t(null,void 0,i(956106));break;case o.ProPlans.ProEdu:s=r.t(null,void 0,i(279107))}return e&&(s+=" "+r.t(null,void 0,i(679372))),s}function A(t){let e=t;switch(t){case o.ProPlans.Pro:e="Pro";break;case o.ProPlans.ProRealtime:e="Pro+";break;case o.ProPlans.ProPremium:e="Premium";break;case o.ProPlans.Free:e="Basic"}return e}function R(t){switch(t){case s.BillingCycle.TwoYears:return 730;case s.BillingCycle.OneYear:return 365;case s.BillingCycle.ThreeMonths:return 90;case s.BillingCycle.Monthly:return 30;default:return 1}}function I(t,e,i){return Math.round((e-t)*f(i))}function f(t){switch(t){case s.BillingCycle.TwoYears:return 24;case s.BillingCycle.OneYear:return 12;default:return 1}}function O(t){return(Math.round(100*t)/100).toFixed(2)}function C(t){const e=Math.round(100*t)/100;return Math.round(e).toFixed(0)}function g(t){return Math.floor(t).toString()}function L(t){const e=Math.round(100*t)/100,i=Math.round(e);return Math.abs(e-i)>0?e.toFixed(2):i.toFixed(0)}function N(t){return Number.isInteger(t)?t.toFixed(0):(Math.round(10*t)/10).toFixed(1)}function y(t){const e=Math.round(100*t)/100,i=Math.round(10*t)/10,r=Math.round(e);return Math.abs(e-r)>0?Math.abs(e-i)>0?e.toFixed(2):i.toFixed(1):r.toFixed(0)}function P(t){const e=r.t(null,void 0,i(133011));if(h(t)){const i=p(E(t));return e.format({proPlanName:i})}return p(t)}},120149:(t,e,i)=>{function r(t,...e){return t&&"object"==typeof t?(0===e.length||e.forEach((e=>{null!=e&&"object"==typeof e&&Object.keys(e).forEach((i=>{const s=t[i],n=e[i];if(n===t)return;const a=Array.isArray(n);if(n&&(o(n)||a)){let e;e=a?s&&Array.isArray(s)?s:[]:s&&o(s)?s:{},t[i]=r(e,n)}else void 0!==n&&(t[i]=n)}))})),t):t}function o(t){if(!t||"[object Object]"!==Object.prototype.toString.call(t))return!1;const e=Object.getPrototypeOf(t);if(!e)return!0;const i=Object.hasOwnProperty.toString,r=e.hasOwnProperty("constructor")&&e.constructor ;return"function"==typeof r&&i.call(r)===i.call(Object)}i.d(e,{deepExtend:()=>r})},588565:(t,e,i)=>{function r(t){return t.reduce((function(t,e,i){return~t.indexOf(e)||t.push(e),t}),[])}i.r(e),i.d(e,{uniq:()=>r})}}]);