',actions:[{name:"ok",type:"primary",text:window.t("Ok"),method:"close",key:[13,32]}]});function r(t){return new Promise((function(e){Promise.all([o.e("vendors_embed"),o.e("dialogs-core"),o.e(1),o.e(2),o.e(7),o.e(17),o.e(12),o.e(16),o.e(182),o.e("create-dialog")]).then(function(r){var s=o("YDhE").createDialog;e(s(Object(n.__assign)(Object(n.__assign)({},i),t)))}.bind(null,o)).catch(void 0)}))}function s(t){r(t).then((function(t){return t.open()}))}},c2JX:function(t,e,o){"use strict";o.r(e),o.d(e,"renderSpinnerTemplate",(function(){return r})),o.d(e,"Spinner",(function(){return a}));o("SzKR");var n=o("TzTt"),i=o("Owlf");function r(t){return void 0===t&&(t=""),'\n\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\x3c!--\n\t\t\t\t--\x3e
\n\t\t\t
\n\t\t
\n\t'}var s=Object(n.parseHtmlElement)(r()),a=function(){function t(t){this._shown=!1,this._el=s.cloneNode(!0),this.setSize(t||i.a)}return t.prototype.spin=function(t){return this._el.classList.add("tv-spinner--shown"),void 0===this._container&&(this._container=t,void 0!==t&&t.appendChild(this._el)),this._shown=!0,this},t.prototype.stop=function(t){return t&&void 0!==this._container&&this._container.removeChild(this._el),this._el.classList.remove("tv-spinner--shown"),this._shown=!1,this},t.prototype.setStyle=function(t){var e=this;return Object.keys(t).forEach((function(o){var n=t[o];void 0!==n&&e._el.style.setProperty(o,n)})),this},t.prototype.setSize=function(t){var e=void 0!==t?"tv-spinner--size_"+t:"";return this._el.className="tv-spinner "+e+" "+(this._shown?"tv-spinner--shown":""),this},t.prototype.getEl=function(){return this._el},t.prototype.destroy=function(){this.stop(),delete this._el,delete this._container},t}()},c6oQ:function(t,e,o){},d700:function(t,e,o){"use strict";o.d(e,"b",(function(){return i})),o.d(e,"a",(function(){return r}));var n=o("/3z9");function i(t){if("INPUT"===t.tagName){var e=t.type;return"text"===e||"email"===e||"number"===e||"password"===e||"search"===e||"tel"===e||"url"===e}return"TEXTAREA"===t.tagName||t.isContentEditable}function r(t,e){if(!e)return!1;var o=255&t
;if(27===o||o>>>4==7)return!1;switch(t^o){case n.Modifiers.Alt:return(38===o||40===o)&&"SELECT"===e.tagName||i(e);case n.Modifiers.Alt+n.Modifiers.Shift:return i(e);case n.Modifiers.Mod:if(67===o||!n.isMacKeyboard&&45===o){var r=e.ownerDocument&&e.ownerDocument.getSelection();if(r&&!r.isCollapsed)return!0}return i(e);case n.Modifiers.Mod+n.Modifiers.Shift:return o>=33&&o<=40&&i(e);case n.Modifiers.Shift:case 0:return!!(9!==o||e.ownerDocument&&e!==e.ownerDocument.body&&e!==e.ownerDocument.documentElement)&&((13===o||32===o||!function(t){if("BUTTON"===t.tagName)return!0;if("INPUT"===t.tagName){var e=t.type;if("submit"===e||"button"===e||"reset"===e||"checkbox"===e||"radio"===e)return!0}return!1}(e))&&("form"in e||e.isContentEditable))}return!1}},dJ3D:function(t,e,o){"use strict";(function(t){var e=o("x+tH").WSMode,n=!1,i=!1,r=Date.now()-3e5,s=o("7MZv").showTooManyStudiesNotice,a=o("XzZr"),l=a.ChartApiInterface,c=a.HandlerInfo,u=o("hGxK"),d=o("Wt0y"),h=o("xlbu").telemetry,p=o("i4z7"),_=null,f=o("Kxc7"),g=o("ePL1");o("iSkW");var m=o("NP3r").enabled,v=o("NP3r").getConfig,y=o("bKsZ").ProductFeatures,b=o("ogJP").requireFullInterfaceImplementation,w=o("+GxX").isFeatureEnabled,S=o("0waE").randomHash,C=o("pP4S").ResponseMethods,E=o("mNbo").isOnMobileAppPage,T=o("uOxu"),x=T.getLogger("ChartApi.Core",{color:"#706"}),A=T.getLogger("ChartApi.ChartSession",{color:"#706"}),k=T.getLogger("ChartApi.ChartSession",{highRate:!0,maxCount:100,color:"#706"}),I=T.getLogger("ChartApi.ChartSession",{maxCount:0,color:"#706"}),O=T.getLogger("ChartApi.ChartSession",{maxCount:50,color:"#706"}),N=T.getLogger("ChartApi.QuoteSession",{maxCount:50,color:"#660"}),D=T.getLogger("ChartApi.QuoteSession",{highRate:!0,maxCount:10,color:"#660"}),M=T.getLogger("ChartApi.TrafficMeter",{maxCount:20,color:"#268"}),L=o("rOif"),R=o("lt96").exchanges,P=o("BlPY"),F=o("0UyP").getTracker,B=o("iWlB").BackendSessionEventType,j=o("Cf1E").errorToString,U=o("ONPi"),H=Number(window.TELEMETRY_SERVER_TIME_DIFF_THRESHOLD)||3e3;function V(t){if(this._isAuthTokenLoaded=!1,this._authTokenDfd=null,this._notificationHandlers={},this._sessions={},this._dataHandleModule=null,this.studyCounter=0,this.childStudyCounter=0,this._sendingQueuedRequestsCount=0,this._pendingMessagesQueue=[],this._wasConnectedAtLeastOnce=!1,this._trafficStats={total:0,sinceConnect:0,lastChunk:0},this._wsBackendConnection=t,this._wsBackendConnection.onReconnect(this._bindSocketEvents.bind(this)),this._wsBackendConnection.setLogger(x,T.getLogHistory),this._wsBackendConnection.setTelemetry(h),this._bindSocketEvents(),this._lowQualityEnabled=!1,this._turnaroundPrefix=S(),this._turnaroundIndex=0,null===_){x.logInfo("Delayed loading protobuf handler after 6000ms"),setTimeout(this._loadProtobufHandler.bind(this),6e3)}else x.logInfo("Protobuf handler is loaded already");function e(t){if(0===t)return"0";var e=parseInt(Math.floor(Math.log(t)/Math.log(1024)));return Math.round(t/Math.pow(1024,e),2)+["","KB","MB","GB","TB"][e]}setInterval(function(){
M.logNormal("Last 30 seconds:"+e(this._trafficStats.lastChunk)+" Since last connect:"+e(this._trafficStats.sinceConnect)+" Total traffic:"+e(this._trafficStats.total)),this._trafficStats.lastChunk=0}.bind(this),3e4)}V.prototype.defaultWatchlistSymbols=function(){var t=L[window.locale];return void 0===t&&(t=L.default),t},V.prototype.defaultResolutions=function(){var t=["1","3","5","15","30","45","60","120","180","240","1D","1W","1M","1000R","100R","10R","1R"];if(!f.enabled("widget")&&w("seconds_bars")){return["1S","5S","15S","30S"].concat(t)}return t},V.prototype.availableCurrencies=function(){return Promise.resolve(["USD","RUB","EUR","CAD"])},V.prototype.supportedSymbolsTypes=function(){return"bovespa"===TradingView.widgetCustomer?P.filter((function(t){return-1!==["","stock","futures","index"].indexOf(t.value)})):"cme"===TradingView.widgetCustomer?P.filter((function(t){return t.value!==g.types.QUANDL})):P},V.prototype.supportedExchangesList=function(){return R},V.prototype.futuresRegex=function(){return/^(.+?)([12]!|\w\d{4})?$/},V.prototype.enableLowQualityMode=function(){this._lowQualityEnabled=!0,this._sendLowQualityModeIfEnabled()},V.prototype._sendLowQualityModeIfEnabled=function(){this._lowQualityEnabled&&this.connected()&&this._sendRequest("set_data_quality",[])},V.prototype.setLoadNew=function(t){this._loadNewBars=!!t},V.prototype.quoteCreateSession=function(t){return this._sendRequest("quote_create_session",[t])},V.prototype.quoteDeleteSession=function(t){return this._sendRequest("quote_delete_session",[t])},V.prototype.quoteSetFields=function(t,e){return this._sendRequest("quote_set_fields",[t,e])},V.prototype.quoteAddSymbols=function(t,e){return this._sendRequest("quote_add_symbols",[t,e])},V.prototype.quoteRemoveSymbols=function(t,e){return this._sendRequest("quote_remove_symbols",[t,e])},V.prototype.quoteFastSymbols=function(t,e){return this._sendRequest("quote_fast_symbols",[t,e])},V.prototype.quoteHibernateAll=function(t){return this._sendRequest("quote_hibernate_all",[t])},V.prototype.depthCreateSession=function(t,e,o){return this._sendRequest("depth_create_session",[t,e,o])},V.prototype.depthDeleteSession=function(t){return this._sendRequest("depth_delete_session",[t])},V.prototype.depthSetSymbol=function(t,e){return this._sendRequest("depth_set_symbol",[t,e])},V.prototype.depthClearSymbol=function(t){return this._sendRequest("depth_clear_symbol",[t])},V.prototype.depthSetScale=function(t,e){return this._sendRequest("depth_set_scale",[t,e])},V.prototype.chartCreateSession=function(t,e){return this._sendRequest("chart_create_session",[t,e])},V.prototype.chartDeleteSession=function(t){return this._sendRequest("chart_delete_session",[t])},V.prototype.createSession=function(t,e){this._sessions[t]=e,this._notificationHandlers[t]={},this.connected()&&this._isAuthTokenLoaded&&e.onMessage({method:"connected",params:[]})},V.prototype.removeSession=function(t){delete this._sessions[t],delete this._notificationHandlers[t]},V.prototype.connected=function(){return!!this._isConnected},
V.prototype._bindSocketEvents=function(){var t=this;this.connectDfd=new Promise((function(e,o){t._wsBackendConnection.on("connect",(function(){t._onConnect(),e()})),t._wsBackendConnection.on("message",t._onMessage.bind(t)),t._wsBackendConnection.on("disconnect",(function(){t._authTokenDfd&&(t._authTokenDfd=null),delete t._isConnected,t.studyCounter=0,t._notifySessions({method:"disconnected",params:[]}),delete t._metadataCallback,t._disconnectCount=(t._disconnectCount||0)+1,t._wsBackendConnection.isConnected()&&(t._telemetryDisconnectTimeout=setTimeout((function(){h.sendChartReport("disconnect")}),5e3),t._wsBackendConnection.isMaxReconnects()&&(t._notifySessions({method:"reconnect_bailout",params:[]}),o(),h.sendChartReport("reconnect_bailout")))}))}))},V.prototype.serverTimeOffset=function(){return this._serverTimeOffset?this._serverTimeOffset:0},V.disconnectReason=function(t){return 1e3===t?"Normal closure, meaning that the purpose for which the connection was established has been fulfilled.":1001===t?'An endpoint is "going away", such as a server going down or a browser having navigated away from a page.':1002===t?"An endpoint is terminating the connection due to a protocol error":1003===t?"An endpoint is terminating the connection because it has received a type of data it cannot accept (e.g., an endpoint that understands only text data MAY send this if it receives a binary message).":1004===t?"Reserved. The specific meaning might be defined in the future.":1005===t?"No status code was actually present.":1006===t?"The connection was closed abnormally, e.g., without sending or receiving a Close control frame":1007===t?"An endpoint is terminating the connection because it has received data within a message that was not consistent with the type of the message (e.g., non-UTF-8 [http://tools.ietf.org/html/rfc3629] data within a text message).":1008===t?'An endpoint is terminating the connection because it has received a message that "violates its policy". This reason is given either if there is no other sutible reason, or if there is a need to hide specific details about the policy.':1009===t?"An endpoint is terminating the connection because it has received a message that is too big for it to process.":1010===t?"An endpoint (client) is terminating the connection because it has expected the server to negotiate one or more extension, but the server didn't return them in the response message of the WebSocket handshake.
Specifically, the extensions that are needed are: "+event.reason:1011===t?"A server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request.":1015===t?"The connection was closed due to a failure to perform a TLS handshake (e.g., the server certificate can't be verified).":"Unknown reason"},V.prototype._getAuthTokenDfd=function(t){if(this._loadNewBars)return Promise.resolve("load_new_token");if(f.enabled("widget")||-1!==window.location.search.indexOf("widget_token")||-1!==window.location.hash.indexOf("widget_token")){
var e=window.TradingView&&window.TradingView.widgetCustomer||"";return Promise.resolve(U[e]||"widget_user_token")}if(E("any")){if(!window.is_authenticated)return Promise.resolve("widget_user_token-mobile-app");if(window.shopConf&&!window.user.is_pro&&!window.shopConf.offers.length)return Promise.resolve("widget_user_token-mobile-app-free")}if(!window.is_authenticated)return Promise.resolve("unauthorized_user_token");var o=this;if(!o._authTokenManager){var n=new u;o._authTokenManager=n,o._authTokenManager.invalidated.subscribe(null,(function(t){o._authTokenManager.get().then((function(t){t&&o.connected()&&o._sendRequest("set_auth_token",[t])}))}))}return o._authTokenManager.get(t)},V.prototype._onConnect=function(){if(!this.connected()){this._trafficStats.sinceConnect=0,this._isAuthTokenLoaded=!1;var t=this;this._connectOnlyOptions=this._connectOnlyOptions||{},this._authTokenDfd=this._getAuthTokenDfd(this._connectOnlyOptions.tokenGrabSession),this._connectOnlyOptions={};var e=this._wsBackendConnection.getConnectionStart(),o=this._wsBackendConnection.getConnectionDuration();if(this._changeHandlerToJson(),this.sessionid=this._wsBackendConnection.getSessionId(),this.sessionid&&!this._isConnected){this._pendingMessagesQueue=[],this._sendingQueuedRequestsCount=0,this._isConnected=!0;var n=JSON.parse(this.sessionid),s=this._wasConnectedAtLeastOnce?B.Reconnect:B.Connect;this._wasConnectedAtLeastOnce=!0,F().then((function(t){null!==t&&t.trackBackendSession(s,n.session_id)})),this._sendLowQualityModeIfEnabled(),this._switchWSProtocol(),this._metadataServerHash=n.studies_metadata_hash||null;try{var a=n.timestamp-(new Date).valueOf()/1e3;this._serverTimeOffset=a}catch(c){this._serverTimeOffset=0}if(x.logInfo("Time shift with server:"+Math.round(this._serverTimeOffset)+" seconds."),this._authTokenDfd){this._sendingQueuedRequestsCount+=1,x.logInfo("Wait for auth token before send messages");var l=this._authTokenDfd;l.then((function(e){null!==t._authTokenDfd&&t._authTokenDfd===l?(x.logNormal("Auth token request is finished, token: "+Boolean(e)),t._authTokenDfd=null,e&&t._pendingMessagesQueue.unshift({method:"set_auth_token",args:[e]}),t._onSendingQueueRequestFinished(),t._isAuthTokenLoaded=!0,t._notifySessions({method:"connected",params:[]})):x.logNormal("Comes auth token after requesting new token or after socket disconnected")})).catch((function(t){x.logNormal(j(t))}))}else x.logWarn("Deferred auth token object is not valid"),this._isAuthTokenLoaded=!0;TradingView.WEB_SOCKET_WAS_CONNECTED=!0,h.setSessionInfo(this.sessionid),h.sendChartReport("websocket_connected"),h.sendChartReport("websocket_connection_time_frame",{value:o}),h.timeCounters.series.wsConnected=e+o,h.sendChartReport("reconnect_count_frame",{value:this._wsBackendConnection.getReconnectCount()}),h.sendChartReport("redirect_count_frame",{value:this._wsBackendConnection.getRedirectCount()}),!i&&window.performance&&window.performance.timing&&window.performance.timing.requestStart>r&&(i=!0,h.sendChartReport("before_websocket_connection_time_frame",{
value:e-window.performance.timing.requestStart})),this._wsBackendConnection.resetCounters(),clearTimeout(this._telemetryDisconnectTimeout)}}},V.prototype.connect=function(t){this._connectOnlyOptions=t,this._wsBackendConnection.isConnected()||this._wsBackendConnection.isConnecting()||this._wsBackendConnection.connect()},V.prototype.disconnect=function(t){return this._wsBackendConnection.disconnect(),!0},V.prototype.switchTimezone=function(t,e){return this._sendRequest("switch_timezone",[t,e])},V.prototype.resolveSymbol=function(t,e,o,n){return h.timeCounters.series["resolve_symbol_"+t]=Date.now(),this._notificationHandlers[t][e]=new c(n,e),this._sendRequest("resolve_symbol",[t,e,o])},V.prototype.createSeries=function(t,e,o,n,i,r,s){return this._notificationHandlers[t][e]=new c(s,e),h.timeCounters.series.marks.push("create_series_"+t),this._sendRequest("create_series",[t,e,o,n,i,r])},V.prototype.removeSeries=function(t,e,o){return this._notificationHandlers[t][e]=new c(o,e),this._sendRequest("remove_series",[t,e])},V.prototype.modifySeries=function(t,e,o,n,i,r){return this._notificationHandlers[t][e]=new c(r,e),this._sendRequest("modify_series",[t,e,o,n,i])},V.prototype.requestMoreData=function(t,e,o,n){return this._notificationHandlers[t][e]=new c(n,e),this._sendRequest("request_more_data",[t,e,o])},V.prototype.requestMetadata=function(t,e,o){var n=this;if(n._metadataCallback)n._metadataCallback.handlers.push(o);else{var i=f.enabled("widget"),r=i?"studies_metadata_widget":"studies_metadata",s=[];n._metadataCallback=function(t){n._metadataCallback=null,TVLocalForage.setItem(r,TradingView.clone(t)).then((function(){if(x.logNormal("Updated studies_metadata cache"),!i){var t=pro.hash();TVLocalForage.setItem("pro_hash",TradingView.clone(t)).then((function(){x.logNormal("Updated pro_hash cache")})).catch((function(t){x.logError("Cannot update pro_hash cache, reason: "+t)}))}})).catch((function(t){x.logError("Cannot update studies_metadata cache, reason: "+t)}));for(var e=0;e
0:o.session){var l="json"===this._protocol?o[0]:o.session;l.startsWith("qs_")?N.logNormal("send: "+a):l.startsWith("cs_")&&A.logNormal("send: "+a)}else x.logNormal("send: "+a);var c=this._dataHandleModule.prepareEncodeMessage(t,o);return this._wsBackendConnection.send(c)},V.prototype._onMessage=function(t){this._calcTrafficStats(t);var e=this.unpack(t);if("protocol_switched"===e.method&&e.params[0]!==this._protocol)return x.logInfo("Protocol changing accepted. Change handler and try flush queue"),this._changeHandlerToProtobuf(),void this._onSendingQueueRequestFinished();this._dispathNotification(e,t)},V.prototype._onSendingQueueRequestFinished=function(){this._sendingQueuedRequestsCount-=1,x.logInfo("Sending queue request finished. Remaining pending requests="+this._sendingQueuedRequestsCount),this._sendingQueuedRequestsCount<0&&x.logError("Invalid queue state="+this._sendingQueuedRequestsCount),0===this._sendingQueuedRequestsCount&&this._flushPendingMessages()},V.prototype._convertTimescaleResponse=function(t){return this._dataHandleModule.convertTimescaleResponse(t)},V.prototype._appendDuration=function(t,e){return t?e+", duration: "+Math.round(Date.now()/1e3-t+this._serverTimeOffset)+"s":e},V.prototype._dispathNotification=function(t,e){var o=t.params.shift();if(this._notificationHandlers[o]){var i=t.params[0];if("symbol_resolved"===t.method){var s=t.params[1].full_name;h.sendChartReport("symbol_resolved",{count:1,additional:{symbol:s}});var a=h.timeCounters.series["resolve_symbol_"+o];if("number"==typeof a){var l=Date.now()-a,c=t.params[t.params.length-1];if(c){var u=Math.round(1e3*(c-this.serverTimeOffset()))-a,d=u>0&&l-u>=H;h.sendChartReport("symbol_resolve_server_time_frame",{value:d?u:l,additional:{symbol:s}})}h.sendChartReport("symbol_resolve_time_frame",{value:l,additional:{symbol:s}})}}if(["series_error","series_completed"].includes(t.method)&&h.timeCounters.series.marks.length>0){var p="create_series_"+o,_=h.timeCounters.series.marks.indexOf(p);_>=0&&h.timeCounters.series.marks.splice(_,1)}if(h.timeCounters.series.wsConnected&&"series_error"===t.method&&0===h.timeCounters.series.marks.length&&delete h.timeCounters.series.wsConnected,h.timeCounters.series.wsConnected&&"series_completed"===t.method&&(h.sendChartReport("first_series_full_time_frame",{value:Date.now()-h.timeCounters.series.wsConnected}),delete h.timeCounters.series.wsConnected,h.timeCounters.series.marks=[],!n&&window.performance&&window.performance.timing&&window.performance.timing.requestStart>r&&(n=!0,h.sendChartReport("page_full_load_time_frame",{value:Date.now()-window.performance.timing.requestStart}))),o.startsWith("cs_")){
var f="recv: "+("json"===this._protocol?e:JSON.stringify({m:t.m,s:o,p:t.p}));"data_update"===t.method?(f=T.isHighRateEnabled()?f:f.slice(0,500),k.logNormal(this._appendDuration(t.time,f))):"study_loading"===t.method?I.logNormal(this._appendDuration(t.time,f)):"tickmark_update"===t.method?O.logNormal(this._appendDuration(t.time,f)):A.logNormal(this._appendDuration(t.time,f))}if(o.startsWith("qs_"))("quote_symbol_data"===t.method?D.logNormal:N.logNormal)("recv: "+("json"===this._protocol?e:JSON.stringify({m:t.m,s:o,p:t.p})));switch(t.method){case"timescale_update":var g=this._dataHandleModule.getTimescaleObjects(t),m=this._dataHandleModule.getTimescaleChangeset(t);(v=this._convertTimescaleResponse(m)).clear=0===v.changes.length&&0===v.index_diff.length&&0===v.marks.length,this._sessions[o].onMessage({method:"timescale_update",params:v}),this._dataHandleModule.prepareDataUpdateObjects(o,g,function(t,e,o){this._invokeNotificationHandler(t,e,o)}.bind(this));break;case"tickmark_update":var v;(v=this._convertTimescaleResponse(t.params[0])).changes=[],this._sessions[o].onMessage({method:"timescale_update",params:v});break;case"data_update":g=this._dataHandleModule.getDataUpdateObjects(t);this._dataHandleModule.prepareDataUpdateObjects(o,g,function(t,e,o){this._invokeNotificationHandler(t,e,o)}.bind(this));break;case"index_update":for(var y in t.params[0]){var b={method:"index_update",params:t.params[0][y]};this._invokeNotificationHandler(o,y,b)}break;case"critical_error":x.logInfo(new Date+" critical_error session:"+this.sessionid+" reason:"+t.params[0]),h.sendChartReport("critical_error"),this._sessions[o].onMessage({method:"critical_error",params:t.params});break;case"quote_symbol_data":case"quote_list_fields":case"depth_symbol_error":case"depth_symbol_success":case"dd":case"dpu":case"depth_bar_last_value":this._sessions[o].onMessage({method:t.method,params:t.params});break;case C.point:case C.resolutions:case C.endOfData:case C.instanceId:this._sessions[o].onMessage(t);break;default:this._invokeNotificationHandler(o,i,t)}}},V.prototype._isStrategy=function(t,e){var o=this._notificationHandlers[t][e];return o&&o.handler&&o.handler.isTVScriptStrategy},V.prototype._invokeNotificationHandler=function(t,e,o){if(void 0!==e){var n=this._notificationHandlers[t][e];"series_deleted"!==o.method&&"study_deleted"!==o.method&&0!==o.method.indexOf("replay_")||delete this._notificationHandlers[t][e],void 0!==n&&this._invokeHandler(n.handler,o)}},V.prototype._notifySessions=function(t){for(var e in this._sessions){if(!this._sessions.hasOwnProperty(e))return;var o=this._sessions[e];"function"==typeof o.onMessage&&o.onMessage(t)}},V.prototype.unpack=function(t){return this._dataHandleModule.unpack(t)},V.prototype._symbolSearchRequest=null,V.prototype.searchSymbols=function(t,e,o,n,i,r,s,a,l,c){var u=this;this._symbolSearchRequest&&this._symbolSearchRequest.abort();var p=location.protocol+"//"+window.SS_HOST;d.isProd()?p+="/symbol_search/":p+="/local_search/",window.SS_URL&&(p=window.SS_URL);var _={text:t,exchange:e,type:o,hl:i,lang:n}
;window.SS_DOMAIN_PARAMETER&&(_.domain=window.SS_DOMAIN_PARAMETER),r&&(_.strict=1),o===g.types.QUANDL&&(p="https://quandlapi.tradingview.com/api/v3/datasets.json",_={query:t,database_code:e}),s&&(_.broker=s,a&&(_.tradable=!0),l&&(_.unhide=l));var f=Object.keys(_).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(_[t])})).join("&"),m=new XMLHttpRequest;m.open("GET",p+"?"+f);var v=(new Date).getTime();function y(){var t=(new Date).getTime()-v;h.sendChartReport("symbol_search_time_frame",{value:t})}function b(){y(),h.sendChartReport("symbol_search_http_error"),u._symbolSearchRequest=null}m.addEventListener("load",(function(){var t=JSON.parse(m.responseText);c&&c(t),y(),h.sendChartReport("symbol_search_http_status",{value:m.status}),u._symbolSearchRequest=null})),m.addEventListener("error",b),m.addEventListener("timeout",b),this._symbolSearchRequest=m,m.send()},V.prototype.getMarks=function(t,e,o,n,i){throw Error("This method is not implemented")},V.prototype.getTimescaleMarks=function(t,e,o,n,i){throw Error("This method is not implemented")},V.prototype.getPingInfo=function(){return this._wsBackendConnection.getPingInfo()},V.prototype._calcTrafficStats=function(t){var e="protobuf"===this._protocol?t.byteLength:t.length;this._trafficStats.total+=e,this._trafficStats.sinceConnect+=e,this._trafficStats.lastChunk+=e},b(V,"TVChartApi",l,"ChartApiInterface"),window.ChartApiInstance=new V(window.WSBackendConnection),t&&t.exports&&(t.exports=V)}).call(this,o("YuTi")(t))},dTSQ:function(t,e,o){"use strict";function n(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}o.r(e),o.d(e,"regExpEscape",(function(){return n}))},eJTA:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o("ivNn");function i(t,e,o){return n.isNaN(e)||eo?o:Math.round(e)}function r(t,e,o){return n.isNaN(e)||eo?o:Math.round(1e4*e)/1e4}function s(t){return i(0,t,255)}function a(t){return i(0,t,255)}function l(t){return i(0,t,255)}function c(t){return r(0,t,1)}function u(t){return r(0,t,1)}function d(t){return r(0,t,1)}function h(t){return r(0,t,1)}function p(t){return r(0,t,1)}function _(t){return r(0,t,1)}function f(t){var e=t[0]/255,o=t[1]/255,n=t[2]/255,i=Math.min(e,o,n),r=Math.max(e,o,n),s=0,a=0,l=(i+r)/2;if(i===r)s=0,a=0;else{var c=r-i;switch(a=l>.5?c/(2-r-i):c/(r+i),r){case e:s=((o-n)/c+(o1&&(o-=1),o<1/6?t+6*(e-t)*o:o<.5?e:o<2/3?t+(e-t)*(2/3-o)*6:t}function m(t){var e,o,n,i=t[0],r=t[1],c=t[2];if(0===r)e=o=n=c;else{var u=c<.5?c*(1+r):c+r-c*r,d=2*c-u;e=g(d,u,i+1/3),o=g(d,u,i),n=g(d,u,i-1/3)}return[s(255*e),a(255*o),l(255*n)]}e.normalizeRedComponent=s,e.normalizeGreenComponent=a,e.normalizeBlueComponent=l,e.normalizeAlphaComponent=c,e.rgb=function(t,e,o){return[s(t),a(e),l(o)]},e.areEqualRgb=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},e.rgba=function(t,e,o,n){if(Array.isArray(t)){var i=t;return n=e,[i[0],i[1],i[2],c(n)]}var r=e;return o=o||0,n=n||0,
[s(t),a(r),l(o),c(n)]},e.areEqualRgba=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]},e.normalizeHue=u,e.normalizeHslSaturation=d,e.normalizeHsvSaturation=h,e.normalizeLightness=p,e.normalizeValue=_,e.hsl=function(t,e,o){return[u(t),d(e),p(o)]},e.areEqualHsl=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},e.hsv=function(t,e,o){return[u(t),h(e),_(o)]},e.areEqualHsv=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},e.rgbToHsl=f,e.hslToRgb=m,e.rgbToHsv=function(t){var e=t[0],o=t[1],n=t[2],i=e/255,r=o/255,s=n/255,a=Math.min(i,r,s),l=Math.max(i,r,s),c=l-a,u=0,d=0===l?0:c/l,h=l;if(l===a)u=0;else switch(l){case e:u=((r-s)/c+(r255)throw new Error("invalid threshold value, valid values are [0, 255]");return y(t)>=e?"white":"black"},e.tryParseRgb=M,e.parseRgb=function(t){var e=M(t);if(null!==e)return e;throw new Error("Passed color string does not match any of the known color representations")},e.tryParseRgba=L,e.parseRgba=R},ePL1:function(t,e,o){"use strict";o.r(e),o.d(e,"types",(function(){return n}));var n={ECONOMIC:"economic",QUANDL:"quandl"}},ei7k:function(t,e,o){"use strict";o.d(e,"b",(function(){return i})),o.d(e,"a",(function(){return r}));var n=o("CLNU");function i(t){return Object(n.clean)(JSON.stringify(t))}function r(t){return JSON.parse(Object(n.clean)(t,!0))}},"f+Sq":function(t,e,o){"use strict";function n(t){if(void 0===t)throw new Error("Value is undefined");return t}function i(t){if(null===t)throw new Error("Value is null");return t}Object.defineProperty(e,"__esModule",{value:!0}),e.assert=function(t,e){if(!t)throw new Error("Assertion failed"+(e?": "+e:""))},e.ensureDefined=n,e.ensureNotNull=i,e.ensure=function(t){return i(n(t))}},fgbt:function(t,e,o){"use strict";o.r(e),o.d(e,"isIDCExchangeByProductId",(function(){return n})),o.d(e,"isIDCExchange",(function(){return i}));o("bSeV");function n(t,e){void 0===e&&(e=!1);var o=window.pro,n=o.getProduct(t);return!!o.isProductDefined(n)&&(e?!!n.idc_service_codes_delay:!!n.idc_service_codes)}function i(t,e){if(void 0===e&&(e=!1),t&&t.startsWith("exchange-"))return n(t,e);var o=(t||"").toLowerCase();return window.pro.getIDCExchanges(e).includes(o)}},glKZ:function(t,e,o){"use strict";o.r(e);var n=o("mrSG"),i=(o("bf9a"),0),r=0,s=0;function a(){clearTimeout(i),clearTimeout(r),clearTimeout(s)}var l,c="tooltip-root-element";function u(){var t=document.getElementById(c);t?l=t:((l=document.createElement("div")).id=c,document.body.appendChild(l))}function d(){l&&(l.innerHTML="")}"interactive"===document.readyState?u():document.addEventListener("DOMContentLoaded",u);var h=o("Eyy1"),p={default:"",white:"theme-white","round-shadow":"theme-round-shadow"},_=Object.keys(p);var f=o("ljE9"),g=o("ei7k"),m=o("TzTt"),v=o("Ialn"),y=(o("HbRj"),o("XAms")),b=o("Wo0S");function w(t){var e=t.getAttribute("title");return e&&(Object(f.setTooltipData)(t,"text",e),
t.removeAttribute("title")),Object(f.getTooltipData)(t,"text")||""}function S(t){var e,o=I.cloneNode(!0),n=D(o),i=t.content;switch(i.type){case"element":n.innerHTML="",n.appendChild(i.data);break;case"html":n.innerHTML=i.data;break;case"text":if(t.hotkey){var r=N.cloneNode(!0);r.innerText=i.data,n.appendChild(r)}else n.innerText=i.data}if(t.hotkey){var s="none"!==i.type,a=O.cloneNode(!0),l=Object(g.a)(t.hotkey),c=l.keys.map((function(t){return''+t+""}));a.innerHTML=(e=l.text).format.apply(e,c).replace(/\s\+\s/g,'+'),n.classList.add(b["common-tooltip__body--with-hotkey"]),s&&a.classList.add(b["common-tooltip__hotkey-block--divider"]),n.appendChild(a)}return o.addEventListener("contextmenu",y.a),o}function C(t,e){var o=e.rect;if(o){!function(t,e){var o,n=_.includes(e)?p[e]:"";(o=t.classList).remove.apply(o,_.map((function(t){return p[t]})).filter((function(t){return!!t}))),n&&!t.classList.contains(n)&&t.classList.add(n)}(t,e.colorTheme||"default"),e.addClass&&t.classList.add(e.addClass);var n=D(t);n.classList.toggle(b["common-tooltip__body--width_wide"],Boolean(e.wide)),n.classList.toggle(b["common-tooltip__body--no-padding"],Boolean(e.noPadding)),n.classList.toggle(b["common-tooltip__body--width_narrow"],Boolean(e.narrow)),n.classList.toggle(b["common-tooltip__body--no-buttons"],!0),t.classList.toggle(b["common-tooltip--no-pointer-events"],!Modernizr.pointerevents),n.style.left=T(0),n.style.width=T(n.clientWidth+(Boolean(e.noPadding)?0:2));var i=document.body.clientWidth,r=window.innerHeight,s=e.vertical,a=e.extendMargin||s&&o.w<20||!s&&o.h<20;t.classList.toggle(b["common-tooltip--farther"],a),t.classList.toggle(b["common-tooltip--vertical"],s),t.classList.toggle(b["common-tooltip--horizontal"],!s);var l=t.querySelector("."+b["common-tooltip__ear-holder"]),c="";if(s){t.style.left=T(o.x+o.w),t.style.top=T(o.y-(t.offsetHeight-o.h)/2);var u=(t.querySelector(":last-child")||n).getBoundingClientRect().right+10>i;t.classList.toggle(b["common-tooltip--direction_reversed"],u),t.classList.toggle(b["common-tooltip--direction_normal"],!u),c=u?"after":"before",Object(v.isRtl)()?(c=e.otr?"after":c,c=e.otl?"before":c):(c=e.otr?"before":c,c=e.otl?"after":c),l.classList.toggle(b["common-tooltip__ear-holder--before"],"before"===c),l.classList.toggle(b["common-tooltip__ear-holder--after"],"after"===c),"after"===c&&(t.style.left="auto",t.style.right=T(i-o.x))}else{var d=o.x-(n.offsetWidth-o.w)/2,h=i-10-t.offsetWidth,f=Math.max(10,Math.min(d,h));t.style.bottom=T(r-o.y),t.style.left=T(f);u=h\n\t\t\n\t\t\n\t \n',A='\n\t