webpackJsonp([7,32],{1044:function(e,t){e.exports={wrap:"wrap-18oKCBRc-"}},1045:function(e,t){e.exports={button:"button-1IIz2ju4-",first:"first-bfrNico9-",last:"last-3h-LFsOr-"}},1046:function(e,t){e.exports={menu:"menu-16FRUKka-"}},1047:function(e,t){e.exports={button:"button-YsN2vRuA-",withText:"withText-JhQdRoPu-",withoutText:"withoutText-f6SoijeW-"}},1048:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><g fill="none" stroke="currentColor" transform="translate(2 4)"><path d="M16.5 14.5c0 1.657 0 4 3 4s3-2.343 3-4"/><path stroke-linejoin="round" d="M19.5 9.5l-3 5h6z"/><path d="M.5 14.5c0 1.657 0 4 3 4s3-2.343 3-4"/><path stroke-linejoin="round" d="M3.5 9.5l-3 5h6z"/><path d="M3.5 9.5h6m10 0h-6"/><circle cx="11.5" cy="9.5" r="2"/><path d="M11.5 4.5v3"/><rect width="2" height="4" rx="1" x="10.5" y=".5"/></g></svg>'},1049:function(e,t){e.exports={button:"button-2-lC3gh4-"}},1050:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><g fill="currentColor"><path d="M21 7v4h1V6h-5v1z"/><path d="M16.854 11.854l5-5-.708-.708-5 5zM7 7v4H6V6h5v1z"/><path d="M11.146 11.854l-5-5 .708-.708 5 5zM21 21v-4h1v5h-5v-1z"/><path d="M16.854 16.146l5 5-.708.708-5-5z"/><g><path d="M7 21v-4H6v5h5v-1z"/><path d="M11.146 16.146l-5 5 .708.708 5-5z"/></g></g></svg>'},1051:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path d="M5.5 18.207l4.65-4.65a1.906 1.906 0 0 1 2.7 0l2.593 2.593a2.906 2.906 0 0 0 4.114 0l4.65-4.65-.707-.707-4.65 4.65a1.906 1.906 0 0 1-2.7 0l-2.593-2.593a2.906 2.906 0 0 0-4.114 0l-4.65 4.65.707.707z"/></svg>'},1052:function(e,t){e.exports={value:"value-DWZXOdoK-",selected:"selected-2V87KUXm-",metric:"metric-uxyW5qk0-",capitalized:"capitalized-OlFzHeUi-"}},1053:function(e,t){e.exports={form:"form-2itceCqS-",interacting:"interacting-3joY26dg-",input:"input-z46tLQgj-",menu:"menu-35lWsSKr-",add:"add-1NrfSAvb-",hovered:"hovered-1nwOcWv8-",wrap:"wrap-1oB2WI2R-"}},1054:function(e,t){e.exports={button:"button-1scLo53s-",hidden:"hidden-2GRQzIQ1-"}},1055:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11 11" width="11" height="11"><path fill="none" stroke="currentColor" d="M1 1l9 9m0-9l-9 9"/></svg>'},1056:function(e,t){e.exports={interval:"interval-1GDsfL5i-",showGroup:"showGroup-1N6m7h-N-",button:"button-1XkSWU32-",first:"first-2UbSFGzF-",last:"last-1rdUnwE6-",menu:"menu-1fA401bY-",dropdown:"dropdown-1zOBoqnG-",menuContent:"menuContent-1vyIDg3J-"}},1057:function(e,t){e.exports={button:"button-3wAyKO3i-"}},1058:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 21 21" width="21" height="21"><g fill="none" stroke="currentColor"><path d="M18.5 11v5.5a2 2 0 0 1-2 2h-13a2 2 0 0 1-2-2v-13a2 2 0 0 1 2-2H9"/><path stroke-linecap="square" d="M18 2l-8.5 8.5m4-9h5v5"/></g></svg>'},1059:function(e,t){
e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><g fill="currentColor" fill-rule="evenodd"><path fill-rule="nonzero" d="M14 17a3 3 0 1 1 0-6 3 3 0 0 1 0 6zm0-1a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"/><path d="M5.005 16A1.003 1.003 0 0 1 4 14.992v-1.984A.998.998 0 0 1 5 12h1.252a7.87 7.87 0 0 1 .853-2.06l-.919-.925c-.356-.397-.348-1 .03-1.379l1.42-1.42a1 1 0 0 1 1.416.007l.889.882A7.96 7.96 0 0 1 12 6.253V5c0-.514.46-1 1-1h2c.557 0 1 .44 1 1v1.253a7.96 7.96 0 0 1 2.06.852l.888-.882a1 1 0 0 1 1.416-.006l1.42 1.42a.999.999 0 0 1 .029 1.377s-.4.406-.918.926a7.87 7.87 0 0 1 .853 2.06H23c.557 0 1 .447 1 1.008v1.984A.998.998 0 0 1 23 16h-1.252a7.87 7.87 0 0 1-.853 2.06l.882.888a1 1 0 0 1 .006 1.416l-1.42 1.42a1 1 0 0 1-1.415-.007l-.889-.882a7.96 7.96 0 0 1-2.059.852v1.248c0 .56-.45 1.005-1.008 1.005h-1.984A1.004 1.004 0 0 1 12 22.995v-1.248a7.96 7.96 0 0 1-2.06-.852l-.888.882a1 1 0 0 1-1.416.006l-1.42-1.42a1 1 0 0 1 .007-1.415l.882-.888A7.87 7.87 0 0 1 6.252 16H5.005zm3.378-6.193l-.227.34A6.884 6.884 0 0 0 7.14 12.6l-.082.4H5.005C5.002 13 5 13.664 5 14.992c0 .005.686.008 2.058.008l.082.4c.18.883.52 1.71 1.016 2.453l.227.34-1.45 1.46c-.004.003.466.477 1.41 1.422l1.464-1.458.34.227a6.959 6.959 0 0 0 2.454 1.016l.399.083v2.052c0 .003.664.005 1.992.005.005 0 .008-.686.008-2.057l.399-.083a6.959 6.959 0 0 0 2.454-1.016l.34-.227 1.46 1.45c.003.004.477-.466 1.422-1.41l-1.458-1.464.227-.34A6.884 6.884 0 0 0 20.86 15.4l.082-.4h2.053c.003 0 .005-.664.005-1.992 0-.005-.686-.008-2.058-.008l-.082-.4a6.884 6.884 0 0 0-1.016-2.453l-.227-.34 1.376-1.384.081-.082-1.416-1.416-1.465 1.458-.34-.227a6.959 6.959 0 0 0-2.454-1.016L15 7.057V5c0-.003-.664-.003-1.992 0-.005 0-.008.686-.008 2.057l-.399.083a6.959 6.959 0 0 0-2.454 1.016l-.34.227-1.46-1.45c-.003-.004-.477.466-1.421 1.408l1.457 1.466z"/></g></svg>'},1060:function(e,t){e.exports={dottedCloud:"dottedCloud-1Vw3lVny-",check:"check-3V48_rMp-",spinningCloud:"spinningCloud-2fkbB-rw-",arrow:"arrow-1zkKEROH-",arrowGap:"arrowGap-gjAe6jEn-",container:"container-riYIb01a-",unsaved:"unsaved-2Kg_w3Vw-",hovered:"hovered-18DzoW0E-",saving:"saving-31YVVfHU-",saved:"saved-2kLd4nmd-"}},1061:function(e,t){e.exports={menu:"menu-92vrwS4x-",opened:"opened-GQFVkrpV-",autoSaveWrapper:"autoSaveWrapper-1MJY41zr-"}},1062:function(e,t){e.exports={button:"button-1EU5-JL7-",isDisabled:"isDisabled-1RjJSnJ7-",text:"text-1HWeUAzA-"}},1063:function(e,t){e.exports={button:"button-3zsRYmii-",blue:"blue-pwiZpV6t-",green:"green-3Nv9iVIZ-",isInteractive:"isInteractive-12fBlRGf-",hovered:"hovered-Kk1N76Nt-"}},1064:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 21 17" width="21" height="17"><g fill="none" stroke="currentColor"><path d="M2.5 2.5h3.691a.5.5 0 0 0 .447-.276l.586-1.171A1 1 0 0 1 8.118.5h4.764a1 1 0 0 1 .894.553l.586 1.17a.5.5 0 0 0 .447.277H18.5a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-16a2 2 0 0 1-2-2v-10a2 2 0 0 1 2-2z"/><circle cx="10.5" cy="9.5" r="4"/></g></svg>'},1076:function(e,t){e.exports={wrap:"wrap-CUt4Mg1V-",inner:"inner-32OP7ejC-",
actions:"actions-1cGPn1dW-",input:"input-3lfOzLDc-",isExpanded:"isExpanded-1pdStI5Z-"}},1077:function(e,t){e.exports={label:"label-1LxfyrID-",icon:"icon-3bTRbX0U-",text:"text-2BJe_3ce-"}},1078:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 17 14" width="17" height="14"><path d="M1 9v1.5A2.5 2.5 0 0 0 3.5 13h10a2.5 2.5 0 0 0 2.5-2.5V9h-1v1.5a1.5 1.5 0 0 1-1.5 1.5h-10A1.5 1.5 0 0 1 2 10.5V9H1z"/><path fill-rule="evenodd" d="M8 1h1v8H8z"/><path d="M5.354 5.646l-.708.708L8.5 10.207l3.854-3.853-.708-.708L8.5 8.793z"/></svg>'},1079:function(e,t){e.exports={item:"item-b8AKccvl-",hovered:"hovered-2SpHqnXp-"}},1080:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path d="M12 22v-6h-1v6zm3 0v-4h-1v4zm3 0v-2h-1v2zm3 0v-4h-1v4zm3 0v-7h-1v7zM9 22v-4H8v4zm-3 0v-1H5v1z"/><path d="M5.5 17.207l4.65-4.65a1.906 1.906 0 0 1 2.7 0l2.593 2.593a2.906 2.906 0 0 0 4.114 0l4.65-4.65-.707-.707-4.65 4.65a1.906 1.906 0 0 1-2.7 0l-2.593-2.593a2.906 2.906 0 0 0-4.114 0l-4.65 4.65.707.707z"/><path d="M5.5 12.207l4.65-4.65a1.906 1.906 0 0 1 2.7 0l2.593 2.593a2.906 2.906 0 0 0 4.114 0l4.65-4.65-.707-.707-4.65 4.65a1.906 1.906 0 0 1-2.7 0L13.557 6.85a2.906 2.906 0 0 0-4.114 0l-4.65 4.65.707.707z"/></svg>'},1081:function(e,t){e.exports={wrap:"wrap-15BhAobm-",opened:"opened-1yAGeGGi-",full:"full-2VMT2UlC-",first:"first-1vAzGgSq-",last:"last-xMjAcadb-",medium:"medium-1BEsHMFf-",loader:"loader-1uURoPBh-"}},1082:function(e,t){e.exports={buttonUndo:"buttonUndo-342XpPC1-",buttonRedo:"buttonRedo-3o_XdU_J-"}},1083:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path d="M20 19v-1.5a5.5 5.5 0 0 0-5.5-5.5h-6v1h6a4.5 4.5 0 0 1 4.5 4.5V19h1z"/><path d="M12.354 8.854l-.708-.708L7.293 12.5l4.353 4.354.708-.708L8.707 12.5z"/></svg>'},1084:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path d="M9 19v-1.5a4.5 4.5 0 0 1 4.5-4.5h6v-1h-6A5.5 5.5 0 0 0 8 17.5V19h1z"/><path d="M15.646 16.146l.708.708 4.353-4.354-4.353-4.354-.708.708 3.647 3.646z"/></svg>'},698:function(e,t,n){"use strict";function o(e){var t=e.text,n=e.className,o=e.displayMode,i=e.collapseWhen,a=void 0===i?["medium","small"]:i,r=p.e(e,["text","className","displayMode","collapseWhen"]),s=!a.includes(o);return v.createElement(x.a,p.a({},r,{text:s?t:void 0,className:b(n,L.button,s?L.withText:L.withoutText)}))}function i(e){var t=e.className,n=p.e(e,["className"]);return v.createElement(x.a,p.a({},n,{className:b(t,D.button)}))}function a(e){var t,n=e.metric.charAt(0),o=n.toUpperCase()===n;return v.createElement("div",{className:b(J.value,(t={},t[J.selected]=e.isSelected,t))},e.value,v.createElement("span",{className:b(J.metric,o&&J.capitalized)},e.metric))}function r(e,t){return Math.max(1,Math.min(e,Object(Q.getMaxResolutionValue)(t)))}function s(e){
var t,n=l(he.ResolutionKind.Seconds),o=l(he.ResolutionKind.Minutes),i=l(he.ResolutionKind.Hours),a=l(he.ResolutionKind.Days,!0),r=l(he.ResolutionKind.Weeks,!0),s=l(he.ResolutionKind.Months,!0),c=l(he.ResolutionKind.Range);return e.forEach(function(e){var t=new he.Interval(e);t.isHours()?i.items.push(e):t.isMinutes()?Object(Q.isHour)(+t.multiplier())?i.items.push(e):o.items.push(e):t.isSeconds()?n.items.push(e):t.isDays()?a.items.push(e):t.isWeeks()?r.items.push(e):t.isMonths()?s.items.push(e):t.isRange()&&c.items.push(e)}),t=[n,o,i,a,r,s,c],t.filter(function(e){return 0!==e.items.length})}function l(e,t){return void 0===t&&(t=!1),{name:ue[e],items:[],mayOmitSeparator:t}}function c(e){var t=!1;return e.filter(function(e,n,o){var i=!0;return e.type===A.a&&(0!==n&&n!==o.length-1||(i=!1),t&&(i=!1)),t=e.type===A.a,i})}function h(e){return v.createElement(y.a,{label:v.createElement("div",{className:st.label},v.createElement(_.a,{className:st.icon,icon:lt}),v.createElement("div",{className:st.text},ct.text)),onClick:e.onClick})}function d(){var e;return{Bars:u.enabled("header_chart_type")?I:void 0,Compare:u.enabled("header_compare")?F:void 0,Custom:At,Fullscreen:u.enabled("header_fullscreen_button")?P:void 0,Indicators:u.enabled("header_indicators")?G:void 0,Intervals:u.enabled("header_resolutions")?fe:void 0,OpenPopup:ye,Properties:u.enabled("header_settings")&&u.enabled("show_chart_property_page")?Se:void 0,SaveLoad:u.enabled("header_saveload")?Ge:void 0,Screenshot:u.enabled("header_screenshot")?tt:void 0,SymbolSearch:u.enabled("header_symbol_search")?at:void 0,Templates:u.enabled("study_templates")?ft:void 0,UndoRedo:u.enabled("header_undo_redo")?Et:void 0,Layout:e}}var u,p,v,m,f,g,C,_,y,w,b,S,k,x,E,M,A,O,z,R,T,I,L,N,H,F,D,W,j,P,B,U,V,K,Y,G,q,Q,J,X,Z,$,ee,te,ne,oe,ie,ae,re,se,le,ce,he,de,ue,pe,ve,me,fe,ge,Ce,_e,ye,we,be,Se,ke,xe,Ee,Me,Ae,Oe,ze,Re,Te,Ie,Le,Ne,He,Fe,De,We,je,Pe,Be,Ue,Ve,Ke,Ye,Ge,qe,Qe,Je,Xe,Ze,$e,et,tt,nt,ot,it,at,rt,st,lt,ct,ht,dt,ut,pt,vt,mt,ft,gt,Ct,_t,yt,wt,bt,St,kt,xt,Et,Mt,At;Object.defineProperty(t,"__esModule",{value:!0}),u=n(5),p=n(1),v=n(20),m=n(104),f=n(40),g=n(974),C=n(878),_=n(300),y=n(846),w=n(880),b=n(102),S=n(1044),k=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p.c(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.className,o=p.e(e,["children","className"]);return v.createElement("div",p.a({className:b(n,S.wrap)},o),t)},t}(v.PureComponent),x=n(848),E=n(1045),M=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._handleClick=function(){var e=t.props,n=e.onClick,o=e.onClickArg;n&&n(o)},t}return p.c(t,e),t.prototype.render=function(){var e,t=this.props,n=t.isFirst,o=t.isLast,i=t.hint,a=t.text,r=t.icon,s=t.isActive,l=t.isDisabled,c=t.className;return v.createElement(x.a,{icon:r,text:a,title:i,isDisabled:l,isActive:s,onClick:this._handleClick,className:b(c,E.button,(e={},e[E.first]=n,e[E.last]=o,e))})},t}(v.PureComponent),A=n(849),O=n(1046),z={},z[f.STYLE_BARS]=window.t("Bars"),
z[f.STYLE_CANDLES]=window.t("Candles"),z[f.STYLE_HOLLOW_CANDLES]=window.t("Hollow Candles"),z[f.STYLE_HEIKEN_ASHI]=window.t("Heikin Ashi"),z[f.STYLE_LINE]=window.t("Line"),z[f.STYLE_AREA]=window.t("Area"),z[f.STYLE_BASELINE]=window.t("Baseline"),R=z,T={barsStyle:window.t("Bar's Style"),labels:R},I=function(e){function t(t,n){var o,i,a,r,s,l=e.call(this,t,n)||this;return l._handleChangeStyle=function(e){var t=l.state,n=t.favorites,o=t.lastSelectedNotFavorite,i=t.activeStyle;l.setState({activeStyle:e,lastSelectedNotFavorite:n.includes(i)?o:i})},l._handleSelectStyle=function(e){var t=l.context.chartWidgetCollection;e!==t.activeChartStyle.value()&&t.trySetChartStyleToActiveWidget(e)},l._handleClickFavorite=function(e){l._isStyleFavorited(e)?l._handleRemoveFavorite(e):l._handleAddFavorite(e)},o=n.chartWidgetCollection,i=n.favoriteChartStylesService,a=o.activeChartStyle.value(),r=i.get(),u.enabled("japanese_chart_styles"),s=[],l.state={activeStyle:a,favorites:r,styles:[f.STYLE_BARS,f.STYLE_CANDLES,f.STYLE_HOLLOW_CANDLES,f.STYLE_HEIKEN_ASHI,f.STYLE_LINE,f.STYLE_AREA,f.STYLE_BASELINE],japaneseStyles:s},l}return p.c(t,e),t.prototype.componentDidMount=function(){var e=this.context,t=e.chartWidgetCollection,n=e.favoriteChartStylesService;t.activeChartStyle.subscribe(this._handleChangeStyle),n.getOnChange().subscribe(this,this._handleChangeSettings)},t.prototype.componentWillUnmount=function(){var e=this.context,t=e.chartWidgetCollection,n=e.favoriteChartStylesService;t.activeChartStyle.unsubscribe(this._handleChangeStyle),n.getOnChange().unsubscribe(this,this._handleChangeSettings)},t.prototype.render=function(){var e,t,n,o=this,i=this.props,a=i.isShownQuicks,r=i.displayMode,s=void 0===r?"full":r,l=i.id,c=this.state,h=c.activeStyle,d=c.favorites,u=c.styles,p=c.japaneseStyles,m=c.lastSelectedNotFavorite,f="small"!==s&&a&&0!==d.length,C=d.slice();return C.includes(h)?void 0!==m&&C.push(m):C.push(h),e=f&&C.length>1,t=u.map(function(e){return o._renderPopupMenuItem(e,e===h)}),n=p.map(function(e){return o._renderPopupMenuItem(e,e===h)}),v.createElement(k,{id:l},e&&C.map(function(e,t){return v.createElement(M,{icon:g.SERIES_ICONS[e],isActive:f&&h===e,key:t,hint:T.labels[e],isFirst:0===t,isLast:t===C.length-1,onClick:f?o._handleSelectStyle:void 0,onClickArg:e})}),v.createElement(w.a,{arrow:!!e,content:e?void 0:v.createElement(k,null,v.createElement(_.a,{icon:g.SERIES_ICONS[h]})),title:e?T.barsStyle:T.labels[h],className:O.menu},t,!!n.length&&v.createElement(A.a,null),n))},t.prototype._renderPopupMenuItem=function(e,t){var n=this.props.isFavoritingAllowed,o=this._isStyleFavorited(e);return v.createElement(y.a,{key:e,icon:g.SERIES_ICONS[e],isActive:t,label:T.labels[e]||"",onClick:this._handleSelectStyle,onClickArg:e,showToolboxOnHover:!o,toolbox:n&&v.createElement(C.a,{isFilled:o,onClick:this._handleClickFavorite,onClickArg:e})})},t.prototype._handleChangeSettings=function(e){this.setState({lastSelectedNotFavorite:void 0,favorites:e})},t.prototype._isStyleFavorited=function(e){return-1!==this.state.favorites.indexOf(e)},
t.prototype._handleAddFavorite=function(e){var t=this.state.favorites;this.context.favoriteChartStylesService.set(t.concat([e]))},t.prototype._handleRemoveFavorite=function(e){var t=this.state.favorites;this.context.favoriteChartStylesService.set(t.filter(function(t){return t!==e}))},t.contextTypes={chartWidgetCollection:m.object.isRequired,favoriteChartStylesService:m.object.isRequired},t}(v.PureComponent),n(11),L=n(1047),N=n(1048),H={compare:window.t("Compare"),compareOrAddSymbol:window.t("Compare or Add Symbol")},F=function(e){function t(t,n){var o=e.call(this,t,n)||this;return o._handleClick=function(){o.setState({isActive:!0}),o.context.chartWidgetCollection.showAddCompareDialog().then(function(e){e.on("afterOpen",function(){return o.setState({isActive:!0})}),e.on("beforeClose",function(){return o.setState({isActive:!1})})})},o.state={isActive:!1},o}return p.c(t,e),t.prototype.render=function(){var e=this.state.isActive;return v.createElement(o,p.a({},this.props,{icon:N,isOpened:e,onClick:this._handleClick,text:H.compare,title:H.compareOrAddSymbol}))},t.contextTypes={chartWidgetCollection:m.object.isRequired},t}(v.PureComponent),D=n(1049),W=n(1050),j={hint:window.t("Fullscreen mode")},P=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._handleClick=function(){t.context.chartWidgetCollection.startFullscreen()},t}return p.c(t,e),t.prototype.render=function(){var e=this.props.className;return v.createElement(i,{icon:W,onClick:this._handleClick,title:j.hint,className:b(e)})},t.contextTypes={chartWidgetCollection:m.object.isRequired},t}(v.PureComponent),B=n(106),U=n(1051),V=n(306),K={text:window.t("Indicators"),hint:u.enabled("study_dialog_fundamentals_economy_addons")?Object(B.isFeatureEnabled)("hide_fundamentals")?window.t("Indicators, Strategies and Economy"):window.t("Indicators, Strategies, Fundamentals and Economy"):window.t("Indicators")},Y=Object(V.b)({keys:["/"],text:"{0}"}),G=function(e){function t(t){var n=e.call(this,t)||this;return n._handleClick=function(){var e=n.props.studyMarket;n.setState({isActive:!0},function(){e.isVisible()?e.hide():e.show()})},n.state={isActive:!1},n}return p.c(t,e),t.prototype.componentDidMount=function(){this.props.studyMarket.visibilityChanged.subscribe(this,this._setActiveState)},t.prototype.componentWillUnmount=function(){this.props.studyMarket.visibilityChanged.unsubscribe(this,this._setActiveState)},t.prototype.render=function(){var e=this.state.isActive,t=this.props,n=t.className,i=t.displayMode,a=t.id;return v.createElement(o,{id:a,displayMode:i,className:n,icon:U,isOpened:e,onClick:this._handleClick,text:K.text,title:K.hint,"data-tooltip-hotkey":Y})},t.prototype._setActiveState=function(e){this.setState({isActive:e})},t}(v.PureComponent),q=n(62),Q=n(61),J=n(1052),X=n(7),Z=n(872),$=n(975),ee=n(1053),te={add:window.t("Add")},ne=[{name:"1",label:window.t("minutes",{context:"interval"})},{name:"H",label:window.t("hours",{context:"interval"})},{name:"D",label:window.t("days",{context:"interval"})},{name:"W",label:window.t("weeks",{
context:"interval"})},{name:"M",label:window.t("months",{context:"interval"})},{name:"R",label:window.t("range",{context:"interval"})}],oe=function(e){function t(t){var n=e.call(this,t)||this;return n._timeMenu=null,n._setMenuRef=function(e){n._timeMenu=e},n._handleChangeInput=function(e){var t=e.currentTarget.value;/^[0-9]*$/.test(t)&&n.setState({inputValue:t})},n._handleSelectTime=function(e){n.setState({selectedTime:e}),n._closeMenu()},n._handleClickAdd=function(){var e=n.state,t=e.inputValue,o=e.selectedTime,i=parseInt(t);i===r(i,o)&&n.props.onAdd(isNaN(parseInt(o))?i+""+o:i*+o+"")},n._toggleMenu=function(){n.state.isOpenedMenu?n._closeMenu():n._openMenu()},n._closeMenu=function(){n.props.onCloseMenu(),n.setState({isOpenedMenu:!1})},n._openMenu=function(){n.props.onOpenMenu(),n.setState({isOpenedMenu:!0})},n._getMenuPosition=function(){var e=Object(X.ensureNotNull)(n._timeMenu),t=e.getBoundingClientRect();return{overrideWidth:t.width,x:t.left,y:t.bottom+1}},n.state={inputValue:"1",isOpenedMenu:!1,selectedTime:ne[0].name},n}return p.c(t,e),t.prototype.render=function(){var e,t=this,n=this.state,o=n.inputValue,i=n.isOpenedMenu,a=n.menuWidth,r=n.selectedTime;return v.createElement("div",{className:b(ee.form,(e={},e[ee.interacting]=i,e))},v.createElement("input",{className:ee.input,maxLength:4,onChange:this._handleChangeInput,value:o}),v.createElement("div",{className:ee.menu,onClick:this._toggleMenu,ref:this._setMenuRef},ne.find(function(e){return e.name===r}).label,v.createElement($.a,{dropped:i})),v.createElement("div",{className:ee.add,onClick:this._handleClickAdd},te.add),v.createElement(Z.a,{doNotCloseOn:this,isOpened:i,minWidth:a,onClose:this._closeMenu,position:this._getMenuPosition},ne.map(function(e){return v.createElement(y.a,{dontClosePopup:!0,key:e.name,label:e.label,onClick:t._handleSelectTime,onClickArg:e.name})})))},t}(v.PureComponent),ie=n(127),ae=n(1054),re=n(1055),se={remove:window.t("Remove")},le=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._handleClick=function(e){var n=t.props,o=n.onClick,i=n.onClickArg;o&&o(i,e)},t}return p.c(t,e),t.prototype.render=function(){return v.createElement("span",{className:b(ae.button,"apply-common-tooltip",this.props.hidden&&ae.hidden),dangerouslySetInnerHTML:{__html:re},onClick:this._handleClick,title:se.remove})},t}(v.PureComponent),ce=function(e){function t(t){var n=e.call(this,t)||this;return n._handleMouseEnter=function(){n.setState({isHovered:!0})},n._handleMouseLeave=function(){n.setState({isHovered:!1})},n.state={isHovered:!1},n}return p.c(t,e),t.prototype.render=function(){var e=this.props,t=e.interval,n=e.hint,o=e.isActive,i=e.isDisabled,a=e.isFavorite,r=e.isSignaling,s=e.onClick;return v.createElement("div",{onMouseEnter:this._handleMouseEnter,onMouseLeave:this._handleMouseLeave},v.createElement(y.a,{isActive:o,isDisabled:i,isHovered:r,onClick:s,onClickArg:t,toolbox:this._toolbox(),showToolboxOnHover:!a,label:n}))},t.prototype._toolbox=function(){
var e=this.props,t=e.interval,n=e.isDisabled,o=e.isFavorite,i=e.isRemovable,a=e.isFavoritingAllowed,r=e.onClickFavorite,s=e.onClickRemove,l=this.state.isHovered,c=v.createElement(le,{key:"remove",hidden:!Modernizr.touch&&!l,onClick:s,onClickArg:t}),h=v.createElement(C.a,{key:"favorite",isFilled:o,onClick:r,onClickArg:t});return[i&&c,!n&&a&&h]},t}(v.PureComponent),he=n(15),de={},de[he.ResolutionKind.Seconds]=window.t("Second",{context:"interval_group_name"}),de[he.ResolutionKind.Minutes]=window.t("Minute",{context:"interval_group_name"}),de[he.ResolutionKind.Hours]=window.t("Hour",{context:"interval_group_name"}),de[he.ResolutionKind.Days]=window.t("Day",{context:"interval_group_name"}),de[he.ResolutionKind.Weeks]=window.t("Week",{context:"interval_group_name"}),de[he.ResolutionKind.Months]=window.t("Month",{context:"interval_group_name"}),de[he.ResolutionKind.Range]=window.t("Range",{context:"interval_group_name"}),de[he.ResolutionKind.Invalid]="",ue=de,pe=n(1056),ve={openDialog:window.t("Open Interval Dialog"),timeInterval:window.t("Time Interval")},me=Object(V.b)({keys:[","],text:window.t("Number or {0}")}),fe=function(e){function t(t,n){var o,i,a,r,s,l,c,h=e.call(this,t,n)||this;return h._renderResolutionsGroup=function(e){var t=e.items.map(function(e){return h._renderPopupMenuItem(e)});return(!e.mayOmitSeparator||e.items.length>1)&&(t.unshift(v.createElement(A.a,{key:"begin-"+e.name})),t.push(v.createElement(A.a,{key:"end-"+e.name}))),t},h._handleChangeInterval=function(e){var t=h.state,n=t.activeInterval,o=t.lastNotQuicked,i=h._getQuicks();h.setState({activeInterval:Object(Q.normalizeIntervalString)(e),lastNotQuicked:void 0===n||i.includes(n)?o:n})},h._handleCloseMenu=function(){h.setState({isOpenedFormMenu:!1})},h._handleOpenMenu=function(){h.setState({isOpenedFormMenu:!0})},h._bindedForceUpdate=function(){h.forceUpdate()},h._handleSelectInterval=function(e){void 0!==e&&e!==q.linking.interval.value()&&(Object(Q.setLastUsedResolution)(e),q.linking.interval.setValue(e))},h._handleClickFavorite=function(e){e=Object(X.ensureDefined)(e),h._isIntervalFavorite(e)?h._handleRemoveFavorite(e):h._handleAddFavorite(e)},h._handleAddFavorite=function(e){var t=h.state.favorites;h.context.favoriteIntervalsService.set(t.concat([e]))},h._handleRemoveFavorite=function(e){var t=h.state.favorites;h.context.favoriteIntervalsService.set(t.filter(function(t){return t!==e}))},h._handleAddInterval=function(e){},h._handleRemoveInterval=function(e){},o=n.chartApiInstance,i=n.favoriteIntervalsService,a=n.customIntervalsService,h._customIntervals=u.enabled("custom_resolutions_box"),r=q.linking.interval.value(),s=r&&Object(Q.normalizeIntervalString)(r),l=i.get(),c=void 0!==a?a.get():[],h._defaultsIntervals=o.defaultResolutions().map(Q.normalizeIntervalString),h.state={isOpenedFormMenu:!1,activeInterval:s,favorites:l,customs:c},h}return p.c(t,e),t.prototype.componentDidMount=function(){var e=this.context,t=e.favoriteIntervalsService,n=e.customIntervalsService;t.getOnChange().subscribe(this,this._handleChangeFavorites),
void 0!==n&&n.getOnChange().subscribe(this,this._handleChangeCustoms),q.linking.interval.subscribe(this._handleChangeInterval),q.linking.intraday.subscribe(this._bindedForceUpdate),q.linking.supportedResolutions.subscribe(this._bindedForceUpdate)},t.prototype.componentWillUnmount=function(){var e=this.context,t=e.favoriteIntervalsService,n=e.customIntervalsService;t.getOnChange().unsubscribe(this,this._handleChangeFavorites),n&&n.getOnChange().unsubscribe(this,this._handleChangeCustoms),q.linking.interval.unsubscribe(this._handleChangeInterval),q.linking.intraday.unsubscribe(this._bindedForceUpdate),q.linking.supportedResolutions.unsubscribe(this._bindedForceUpdate)},t.prototype.componentDidUpdate=function(e,t){var n=this;this.state.lastAddedInterval&&setTimeout(function(){return n.setState({lastAddedInterval:void 0})},400)},t.prototype.render=function(){var e,t,n,o,i,r,s=this,l=this.props,c=l.isShownQuicks,h=l.id,d=this.state,u=d.activeInterval,p=d.customs,m=d.isOpenedFormMenu,f=d.lastNotQuicked,g=this._defaultsIntervals,C=this._getQuicks(),_=Object(Q.sortResolutions)(C.slice());return void 0!==u&&_.includes(u)?void 0!==f&&_.push(f):void 0!==u&&_.push(u),e=!(!c||0===C.length)||void 0,t=e&&_.length>1,n={},o=Object(Q.mergeResolutions)(g,p),(void 0!==u?o.concat(u):o).filter(Q.isAvailable).forEach(function(e){return n[e]=!0}),i=this._createMenuItems(o).concat(this._createIntervalForm()),r=void 0!==u?Object(Q.getTranslatedResolutionModel)(u):null,v.createElement(k,{id:h},t&&_.map(function(e,t){var o,i=Object(Q.getTranslatedResolutionModel)(e);return v.createElement(M,{key:t,className:b(pe.button,(o={},o[pe.first]=0===t,o[pe.last]=t===_.length-1,o)),text:v.createElement(a,{value:i.mayOmitMultiplier?void 0:i.multiplier,metric:i.shortKind}),hint:i.hint,isActive:u===e,isDisabled:!n[e]&&e!==f,onClick:s._handleSelectInterval,onClickArg:e})}),v.createElement(w.a,{arrow:!!t,closeOnClickOutside:!m,content:t||null===r?void 0:v.createElement(k,{className:pe.menuContent},v.createElement(a,{value:r.mayOmitMultiplier?void 0:r.multiplier,metric:r.shortKind})),title:t||null===r?ve.timeInterval:r.hint,hotKey:t?me:void 0,className:pe.menu},v.createElement("div",{className:pe.dropdown},i)))},t.prototype._createMenuItems=function(e){var t,n=s(e).map(this._renderResolutionsGroup);return c((t=[]).concat.apply(t,n))},t.prototype._createIntervalForm=function(){return this._customIntervals?[v.createElement(A.a,{key:"custom-interval-separator"}),v.createElement(oe,{key:"add-form",onAdd:this._handleAddInterval,onCloseMenu:this._handleCloseMenu,onOpenMenu:this._handleOpenMenu})]:[]},t.prototype._handleChangeFavorites=function(e){this.setState({lastNotQuicked:void 0,favorites:e})},t.prototype._handleChangeCustoms=function(e){this.setState({customs:e})},t.prototype._renderPopupMenuItem=function(e){var t=this.props.isFavoritingAllowed,n=this.state,o=n.activeInterval,i=n.lastAddedInterval,a=e===o,r=Object(Q.isAvailable)(e),s=this._isIntervalFavorite(e),l=this._isIntervalDefault(e),c=Object(Q.getTranslatedResolutionModel)(e);return v.createElement(ce,{
key:e,interval:e,hint:c.hint,isSignaling:i===e,isFavoritingAllowed:t,isDisabled:!r,isFavorite:s,isRemovable:!l,isActive:a,onClick:this._handleSelectInterval,onClickRemove:this._handleRemoveInterval,onClickFavorite:this._handleClickFavorite})},t.prototype._isIntervalDefault=function(e){return this._defaultsIntervals.includes(e)},t.prototype._isIntervalFavorite=function(e){return this.state.favorites.includes(e)},t.prototype._getQuicks=function(e){var t,n=this;return this.props.isShownQuicks&&"small"!==this.props.displayMode?(t=void 0===e?this.state.favorites:e,t.filter(function(e){return n._isIntervalDefault(e)})):[]},t.contextTypes={chartApiInstance:m.object.isRequired,favoriteIntervalsService:m.object.isRequired,customIntervalsService:m.object},t}(v.PureComponent),ge=n(1057),Ce=n(1058),_e={hint:window.t("Open chart in popup")},ye=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._handleClick=function(){var e=t.context,n=e.chartWidgetCollection,o=e.windowMessageService,i=e.isFundamental,a=n.activeChartWidget.value();a.withModel(null,function(){o.post(parent,"openChartInPopup",{symbol:a.model().mainSeries().actualSymbol(),interval:a.model().mainSeries().interval(),fundamental:i})})},t}return p.c(t,e),t.prototype.render=function(){var e=this.props.className;return v.createElement(i,{className:b(e,ge.button),icon:Ce,onClick:this._handleClick,title:_e.hint})},t.contextTypes={isFundamental:m.bool,chartWidgetCollection:m.object.isRequired,windowMessageService:m.object.isRequired},t}(v.PureComponent),we=n(1059),be={hint:window.t("Chart Properties")},Se=function(e){function t(t){var n=e.call(this,t)||this;return n._handleClick=function(){var e=n.context.chartWidgetCollection;n.setState({isActive:!0}),setTimeout(function(){return e.activeChartWidget.value().showChartProperties().then(n._resolveDialogState)},0)},n._resolveDialogState=function(e){null!==e?(n.setState({isActive:!0}),e.on("destroy",function(){return n.setState({isActive:!1})})):n.setState({isActive:!1})},n.state={isActive:!1},n}return p.c(t,e),t.prototype.render=function(){var e=this.state.isActive;return v.createElement(i,p.a({},this.props,{icon:we,title:be.hint,onClick:this._handleClick,isOpened:e}))},t.contextTypes={chartWidgetCollection:m.object.isRequired},t}(v.PureComponent),ke=n(14),xe=n(194),Ee=n(184),Me=n(1060),Ae="M21.5 21.5h-14a5 5 0 1 1 .42-9.983 7.5 7.5 0 0 1 14.57 2.106 4.002 4.002 0 0 1-.99 7.877z",Oe=62.332908630371094,ze=.8*Oe,Re=.21*Oe,Te=.79*Oe,Ie={strokeDashOffset:Te,strokeDash:ze,strokeGap:Re,strokeDashCheck:0},Le={strokeDashOffset:Re+ze,strokeGap:0,strokeDash:ze+Re,strokeDashCheck:200},Ne=function(e){function t(t){var n=e.call(this,t)||this;return n.state=Ie,n}return p.c(t,e),t.prototype.componentDidMount=function(){"saved"===this.props.state?this.setState(Le):this._goToNextState(this.props.state)},t.prototype.componentWillUnmount=function(){this._currentAnimation=void 0},t.prototype.componentWillReceiveProps=function(e){this.props.state!==e.state&&this._goToNextState(e.state)},t.prototype.render=function(){
var e,t=this.state,n=t.strokeDashOffset,o=t.strokeDash,i=t.strokeGap,a=t.strokeDashCheck,r=this.props,s=r.className,l=r.size,c=r.onClick,h=r.state,d=r.isHovered,u=void 0!==d&&d,p=b(Me.container,s,u&&Me.hovered,(e={},e[Me.unsaved]="unsaved"===h,e[Me.saving]="saving"===h,e[Me.saved]="saved"===h,e));return v.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:p,version:"1.1",width:l,height:l,viewBox:"0 0 28 28",onClick:c},v.createElement("g",{fill:"none"},v.createElement("path",{className:Me.dottedCloud,stroke:"currentColor",strokeDasharray:"3.5,2.5",d:Ae}),v.createElement("path",{className:Me.spinningCloud,stroke:"currentColor",strokeDasharray:o+" "+i,strokeDashoffset:n,d:Ae}),v.createElement("path",{className:Me.arrowGap,d:"M11 20h6v5h-6z"}),v.createElement("g",{className:Me.arrow,stroke:"currentColor"},v.createElement("path",{strokeLinecap:"square",d:"M14.5 14.5v10"}),v.createElement("path",{d:"M11 17l3.5-3.5L18 17"})),v.createElement("g",{className:Me.check,stroke:"currentColor"},v.createElement("path",{strokeDasharray:a+"% "+(200-a)+"%",d:"M10 15l2.5 2.5L18 12"}))))},t.prototype._goToNextState=function(e){var t=this;switch(e){case"unsaved":this.setState(Ie);break;case"saving":"unsaved"!==this.props.state&&this.setState(Ie),this._currentAnimation=Promise.resolve(this._currentAnimation).then(function(){return t._createSpinAnimationWhile(function(){return"saving"===t.props.state})});break;case"saved":this._currentAnimation=Promise.resolve(this._currentAnimation).then(this._createFillGapAnimation.bind(this)).then(this._createCheckAnimation.bind(this))}},t.prototype._createSpinAnimationWhile=function(e){var t=this;return this._createSpinAnimation().then(function(){return e()?t._createSpinAnimationWhile(e):Promise.resolve()})},t.prototype._createSpinAnimation=function(){var e=this;return new Promise(function(t){Object(xe.doAnimate)({onStep:function(t,n){void 0!==e._currentAnimation&&e.setState({strokeDashOffset:n})},onComplete:function(){return t()},from:Te,to:Te+Oe,easing:Ee.easingFunc.linear,duration:1e3})})},t.prototype._createCheckAnimation=function(){var e=this;return new Promise(function(t){Object(xe.doAnimate)({onStep:function(t,n){void 0!==e._currentAnimation&&e.setState({strokeDashCheck:Math.round(n)})},onComplete:function(){return t()},from:0,to:200,easing:Ee.easingFunc.linear,duration:1e3})})},t.prototype._createFillGapAnimation=function(){var e=this;return new Promise(function(t){Object(xe.doAnimate)({onStep:function(t,n){void 0!==e._currentAnimation&&e.setState({strokeDashOffset:Re+ze-n,strokeGap:n,strokeDash:ze+Re-n})},onComplete:function(){return t()},from:Re,to:0,easing:Ee.easingFunc.linear,duration:200})})},t}(v.PureComponent),He=n(882),Fe=n(1061),De=n(855),We=n(1062),je=u.enabled("widget"),Pe=Object(He.a)(De,We),Be=p.a({},De,Pe),Ue={copy:window.t("Copy"),makeCopy:window.t("Make a Copy"),newChartLayout:window.t("New Chart Layout"),loadChartLayout:window.t("Load Chart Layout..."),rename:window.t("Rename..."),renameChartLayout:window.t("Rename Chart Layout"),saveAs:window.t("Make a Copy..."),
saveChartLayout:window.t("Save"),saveChartLayoutLong:window.t("Save all charts for all symbols and intervals on your layout")},Ve=[],Ke=Object(V.b)({keys:["Ctrl","S"],text:"{0} + {1}"}),Ye=function(e){function t(t){var n=e.call(this,t)||this;return n._handleSaveHoverBegin=function(){n.setState({iconHovered:!0})},n._handleSaveHoverEnd=function(){n.setState({iconHovered:!1})},n.state={iconHovered:!1},n}return p.c(t,e),t.prototype.render=function(){var e=this.props,t=e.id,n=e.isReadOnly,i=e.displayMode,a=e.isProcessing,r=e.title,s=e.chartId,l=e.wasChanges,c=e.onCloneChart,h=e.onSaveChart,d=e.hideMenu,u=this.state.iconHovered,p=!n&&!d,m="saved";return!l&&r||(m="unsaved"),a&&(m="saving"),v.createElement(k,null,n?v.createElement(k,null,v.createElement(o,{id:t,displayMode:i,icon:v.createElement(Ne,{size:28,state:"unsaved",isHovered:u}),isDisabled:a,onClick:c,text:Ue.copy,title:Ue.makeCopy,onMouseEnter:this._handleSaveHoverBegin,onMouseLeave:this._handleSaveHoverEnd,collapseWhen:Ve})):v.createElement(k,null,v.createElement(o,{id:t,displayMode:i,icon:v.createElement(Ne,{size:28,state:m,isHovered:u}),isDisabled:s&&!l||a,onClick:h,text:r||Ue.saveChartLayout,title:Ue.saveChartLayoutLong,onMouseEnter:this._handleSaveHoverBegin,onMouseLeave:this._handleSaveHoverEnd,theme:Be,collapseWhen:Ve,"data-tooltip-hotkey":je?"":Ke}),p&&v.createElement(w.a,{className:b(Fe.menu,"js-save-load-menu-open-button"),arrow:!0},this._renderMenuItems())))},t.prototype._renderMenuItems=function(){var e=this.props,t=e.wasChanges,n=e.isProcessing,o=e.chartId,i=e.onSaveChart,a=e.onRenameChart,r=e.onSaveAsChart,s=e.onLoadChart,l=(e.onNewChart,e.isAutoSaveEnabled,e.autoSaveId,e.onAutoSaveChanged,[]);return l.push(v.createElement(y.a,{key:"save",isDisabled:!!(n||!t&&o),label:Ue.saveChartLayout,onClick:i,hint:"Ctrl+S"})),o&&l.push.apply(l,[v.createElement(A.a,{key:"existing-chart-section-begin"}),v.createElement(y.a,{key:"rename",label:Ue.rename,onClick:a}),v.createElement(y.a,{key:"save-as",label:Ue.saveAs,onClick:r})]),l.push(v.createElement(A.a,{key:"platform-section-begin"})),l.push(v.createElement(y.a,{key:"load-chart",className:"js-save-load-menu-item-load-chart",label:Ue.loadChartLayout,onClick:s})),l},t}(v.PureComponent),Ge=function(e){function t(t,n){var o,i,a=e.call(this,t,n)||this;return a._syncState=function(e){a.setState(e)},a._onChangeHasChanges=function(e){a.setState({wasChanges:e})},a._onChangeAutoSaveEnabled=function(e){},a._onChangeTitle=function(e){a.setState({title:e})},a._onChangeId=function(e){a.setState({id:e})},a._onChartAboutToBeSaved=function(){a.setState({isProcessing:!0})},a._onChartSaved=function(){a.setState({isProcessing:!1})},a._handleAutoSaveEnabled=function(e){},a._handleClickSave=function(){a.context.saveChartService.saveChartOrShowTitleDialog()},a._handleClickClone=function(){a.context.saveChartService.cloneChart()},a._handleClickSaveAs=function(){a.context.saveChartService.saveChartAs()},a._handleClickNew=function(){},a._handleClickLoad=function(){a.context.loadChartService.showLoadDialog()},a._handleHotkey=function(e){
return!e.ctrlKey&&e.target===document.body&&(190===e.keyCode&&(a.context.loadChartService.showLoadDialog(),e.preventDefault(),e.stopPropagation(),!0))},a._handleClickRename=function(){a.context.saveChartService.renameChart()},o=n.chartWidgetCollection,i=n.chartChangesWatcher,n.saveChartService,a.state={isAuthenticated:window.is_authenticated,isProcessing:!1,id:o.metaInfo.id.value(),title:o.metaInfo.name.value(),wasChanges:i.hasChanges(),iconHovered:!1},a}return p.c(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.chartSaver,n=e.isFake,o=e.stateSyncEmitter,i=this.context,a=i.chartWidgetCollection,r=i.chartChangesWatcher;i.saveChartService;n?o.on("change",this._syncState):(r.getOnChange().subscribe(this,this._onChangeHasChanges),a.metaInfo.name.subscribe(this._onChangeTitle),a.metaInfo.id.subscribe(this._onChangeId),document.addEventListener("keydown",this._handleHotkey),t.chartSaved().subscribe(this,this._onChartSaved),t.chartAboutToBeSaved().subscribe(this,this._onChartAboutToBeSaved),window.loginStateChange.subscribe(this,this._onLoginStateChange))},t.prototype.componentDidUpdate=function(e,t){this.props.isFake||t!==this.state&&this.props.stateSyncEmitter.emit("change",this.state)},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.chartSaver,n=e.isFake,o=e.stateSyncEmitter,i=this.context,a=i.chartWidgetCollection,r=i.chartChangesWatcher;i.saveChartService;n?o.off("change",this._syncState):(r.getOnChange().unsubscribe(this,this._onChangeHasChanges),a.metaInfo.name.unsubscribe(this._onChangeTitle),a.metaInfo.id.unsubscribe(this._onChangeId),document.removeEventListener("keydown",this._handleHotkey),t.chartSaved().unsubscribe(this,this._onChartSaved),t.chartAboutToBeSaved().unsubscribe(this,this._onChartAboutToBeSaved),window.loginStateChange.unsubscribe(this,this._onLoginStateChange))},t.prototype.render=function(){var e=this.props,t=e.isReadOnly,n=e.displayMode,o=e.id,i=(e.isFake,this.state),a=i.isProcessing,r=i.isAuthenticated,s=i.title,l=i.id,c=i.wasChanges,h=(i.isAutoSaveEnabled,{displayMode:n,isReadOnly:t,isAuthenticated:r,isProcessing:a,wasChanges:c,title:s,id:o,chartId:null!==l?l:void 0,onCloneChart:this._handleClickClone,onSaveChart:this._handleClickSave,onRenameChart:this._handleClickRename,onSaveAsChart:this._handleClickSaveAs,onLoadChart:this._handleClickLoad});return v.createElement(Ye,p.a({},h))},t.prototype._onLoginStateChange=function(){this.setState({isAuthenticated:window.is_authenticated})},t.contextTypes={chartWidgetCollection:m.object.isRequired,chartChangesWatcher:m.object.isRequired,saveChartService:m.object.isRequired,loadChartService:m.object.isRequired},t}(v.PureComponent),qe=n(31),Qe=n(1063),Je=n(1064),Xe=Object(He.a)(De,Qe),Ze=p.a({},De,Xe),$e={takeSnapshot:window.t("Take a snapshot")},et=Object(V.b)({keys:["Alt","S"],text:"{0} + {1}"}),tt=function(e){function t(t,n){var o=e.call(this,t,n)||this;return o._handleClick=function(){if(!u.enabled("show_dialog_on_snapshot_ready")){if(o.state.isProcessing)return;o.setState({isProcessing:!0}),
qe.subscribe("onScreenshotReady",function(){return o.setState({isProcessing:!1})},null,!0)}o.context.chartWidgetCollection.takeScreenshot()},o.state={isProcessing:!1},o}return p.c(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.color;return v.createElement(x.a,{icon:Je,isDisabled:this.state.isProcessing,onClick:this._handleClick,title:$e.takeSnapshot,theme:Ze,"data-tooltip-hotkey":et,className:b(t,n&&Ze[n])})},t.contextTypes={chartWidgetCollection:m.object.isRequired},t}(v.PureComponent),nt=n(128),ot=n(311),it=n(1076),at=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._actions=null,t._input=null,t._preventDefault=function(e){e.preventDefault()},t}return p.c(t,e),t.prototype.componentDidMount=function(){var e=Object(X.ensureNotNull)(this._input);Object(nt.bindToInput)(e,{spreadActions:this._actions||void 0,syncWithChartWidget:!0,syncOnBlur:!0}),null!==this._actions&&Array.from(this._actions.querySelectorAll("button")).forEach(function(e){return e.tabIndex=-1})},t.prototype.render=function(){var e,t=this,n=this.props,o=n.isActionsVisible,i=n.isExpanded,a=n.onFocus,r=n.onBlur,s=n.id;return v.createElement("div",{id:s,className:it.wrap},v.createElement("div",{className:b(it.inner,(e={},e[it.isExpanded]=i,e))},v.createElement("input",{className:it.input,maxLength:1e3,onBlur:r,onFocus:a,ref:function(e){return t._input=e},type:"text",tabIndex:-1}),Object(ot.canShowSpreadActions)()&&o&&v.createElement("div",{className:it.actions,onMouseDown:this._preventDefault,ref:function(e){return t._actions=e}})))},t}(v.PureComponent),rt=n(59),st=n(1077),lt=n(1078),ct={text:window.t("Save Indicator Template...")},ht=function(e){function t(t){var n=e.call(this,t)||this;return n._handleMouseEnter=function(){n.setState({isHovered:!0})},n._handleMouseLeave=function(){n.setState({isHovered:!1})},n._handleApply=function(){var e=n.props,t=e.item;(0,e.onApply)(t)},n._handleRemove=function(){var e=n.props,t=e.item;(0,e.onRemove)(t)},n._handleFavor=function(){var e=n.props,t=e.item,o=e.onFavor;o&&o(t)},n.state={isHovered:!1},n}return p.c(t,e),t.prototype.render=function(){var e=this.props,t=e.item,n=e.onFavor,o=e.favorite,i=e.isFavoritingAllowed,a=this.state.isHovered;return v.createElement("div",{onMouseEnter:this._handleMouseEnter,onMouseLeave:this._handleMouseLeave},v.createElement(y.a,{label:t.name,showToolboxOnHover:!o,onClick:this._handleApply,toolbox:[v.createElement(le,{key:"remove",hidden:!Modernizr.touch&&!a,onClick:this._handleRemove}),!!n&&i&&v.createElement(C.a,{key:"favorite",isFilled:!!o,onClick:this._handleFavor})]}))},t}(v.PureComponent),dt=n(1079),ut=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._handleClick=function(e){e.stopPropagation();var n=t.props;(0,n.onApply)(n.item)},t}return p.c(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.item;return v.createElement("div",{className:b(t,dt.item,"apply-common-tooltip"),onClick:this._handleClick,title:n.name},n.name.length>0?n.name[0].toUpperCase():" ")},t}(v.PureComponent),
pt=n(1080),vt=n(1081),mt={title:window.t("Templates"),tooltip:window.t("Study Templates")},ft=function(e){function t(t,n){var o,i,a,r,s=e.call(this,t)||this;return s._handleFavorTemplate=function(e){if(s.props.isShownQuicks){var t=e.name;s._isTemplateFavorite(t)?s._removeFavoriteTemplate(t):s._addFavoriteTemplate(t)}},s._handleSaveTemplate=function(){s.context.studyTemplates.showSaveAsDialog()},s._handleApplyTemplate=function(e){s._handleClose(),s.context.studyTemplates.applyTemplate(e.name)},s._handleRemoveTemplate=function(e){s._handleClose(),s.context.studyTemplates.deleteStudyTemplate(e.name)},s._handleClose=function(){s._handleToggleDropdown(!1)},s._handleClick=function(e){e.stopPropagation(),s._handleToggleDropdown()},s._handleToggleDropdown=function(e){var t=s.state.isActive,n="boolean"==typeof e?e:!t;s.setState({isActive:n})},s._getDropdownPosition=function(){var e=rt.findDOMNode(s._wrapControl).getBoundingClientRect();return{x:e.left,y:e.bottom+2}},s._getWrapRef=function(e){return s._wrapControl=e},s._syncStateChange=function(e){s.setState(e)},o=n.favoriteStudyTemplatesService,i=n.studyTemplates,a=void 0!==o?o.get():[],r=i.list(),s.state={isActive:!1,studyTemplatesList:r,favorites:a},s}return p.c(t,e),t.prototype.componentDidMount=function(){if(this.props.isFake)this.props.stateSyncEmitter.on("change",this._syncStateChange);else{var e=this.context,t=e.favoriteStudyTemplatesService,n=e.studyTemplates;n.getOnChange().subscribe(this,this._handleTemplatesChange),n.refreshStudyTemplateList(),void 0!==t&&t.getOnChange().subscribe(this,this._handleFavoritesChange)}},t.prototype.componentWillUnmount=function(){if(this.props.isFake)this.props.stateSyncEmitter.off("change",this._syncStateChange);else{var e=this.context,t=e.favoriteStudyTemplatesService;e.studyTemplates.getOnChange().unsubscribe(this,this._handleTemplatesChange),void 0!==t&&t.getOnChange().unsubscribe(this,this._handleFavoritesChange)}},t.prototype.componentDidUpdate=function(e,t){this.props.isFake||t===this.state||this.props.stateSyncEmitter.emit("change",{favorites:this.state.favorites,studyTemplatesList:this.state.studyTemplatesList})},t.prototype.render=function(){var e,t=this.state,n=t.isActive,i=t.studyTemplatesList,a=t.favorites,r=this.props,s=r.isShownQuicks,l=r.className,c=r.displayMode,d=r.id,u=i.filter(function(e){return a.includes(e.name)}),p="small"!==c&&s&&u.length>0,m=b(l,vt.wrap,n&&vt.opened,(e={},e[vt.full]="full"===c,e[vt.medium]="medium"===c,e));return v.createElement(k,{id:d,className:m,onClick:this._handleClick,ref:this._getWrapRef},v.createElement(o,{displayMode:c,icon:pt,text:mt.title,title:mt.tooltip,onClick:this._handleClick}),p&&this._renderQuicks(u),v.createElement(Z.a,{closeOnClickOutside:!0,doNotCloseOn:this,isOpened:n,onClose:this._handleClose,position:this._getDropdownPosition},v.createElement(h,{onClick:this._handleSaveTemplate}),i.length>0&&v.createElement(A.a,null),this._renderMenuItems()))},t.prototype._renderQuicks=function(e){var t=this;return e.map(function(e,n,o){var i;return v.createElement(ut,{key:e.name,item:e,
onApply:t._handleApplyTemplate,className:b((i={},i[vt.first]=0===n,i[vt.last]=n===o.length-1,i))})})},t.prototype._renderMenuItems=function(){var e=this,t=this.state.studyTemplatesList,n=this.props.isFavoritingAllowed;return t.map(function(t){return v.createElement(ht,{key:t.name,item:t,isFavoritingAllowed:n,favorite:e._isTemplateFavorite(t.name),onApply:e._handleApplyTemplate,onFavor:e._handleFavorTemplate,onRemove:e._handleRemoveTemplate})})},t.prototype._handleTemplatesChange=function(){this.setState({studyTemplatesList:this.context.studyTemplates.list()})},t.prototype._handleFavoritesChange=function(e){this.props.isShownQuicks&&this.setState({favorites:e})},t.prototype._removeFavoriteTemplate=function(e){var t,n=this.context.favoriteStudyTemplatesService;void 0!==n&&(t=this.state.favorites,n.set(t.filter(function(t){return t!==e})))},t.prototype._addFavoriteTemplate=function(e){var t,n=this.context.favoriteStudyTemplatesService;void 0!==n&&(t=this.state.favorites,n.set(t.concat([e])))},t.prototype._isTemplateFavorite=function(e){return this.state.favorites.includes(e)},t.contextTypes={favoriteStudyTemplatesService:m.object,studyTemplates:m.object.isRequired},t}(v.PureComponent),n(85),gt=n(39),Ct=n(1082),_t=n(1083),yt=n(1084),wt={undoHint:window.t("Undo {0}"),redoHint:window.t("Redo {0}")},bt={undoHotKey:Object(V.b)({keys:["Ctrl","Z"],text:"{0} + {1}"}),redoHotKey:Object(V.b)({keys:["Ctrl","Y"],text:"{0} + {1}"})},St=Object(He.a)(De,Ct,{buttonUndo:"button",buttonRedo:"button"}),kt=p.a({},De,{button:St.buttonUndo}),xt=p.a({},De,{button:St.buttonRedo}),Et=function(e){function t(t,n){var o=e.call(this,t,n)||this;return o._handleClickUndo=function(){Object(gt.trackEvent)("GUI","Undo"),o.context.chartWidgetCollection.undoHistory.undo()},o._handleClickRedo=function(){Object(gt.trackEvent)("GUI","Redo"),o.context.chartWidgetCollection.undoHistory.redo()},o.state=o._getStateFromUndoHistory(),o}return p.c(t,e),t.prototype.componentDidMount=function(){var e=this.context.chartWidgetCollection;e.undoHistory.redoStack().onChange().subscribe(this,this._onChangeStack),e.undoHistory.undoStack().onChange().subscribe(this,this._onChangeStack)},t.prototype.componentWillUnmount=function(){var e=this.context.chartWidgetCollection;e.undoHistory.redoStack().onChange().unsubscribe(this,this._onChangeStack),e.undoHistory.undoStack().onChange().unsubscribe(this,this._onChangeStack)},t.prototype.render=function(){var e=this.props.id,t=this.state,n=t.isEnabledRedo,o=t.isEnabledUndo,i=t.redoStack,a=t.undoStack;return v.createElement(k,{id:e},v.createElement(x.a,{icon:_t,isDisabled:!o,onClick:this._handleClickUndo,title:o?wt.undoHint.format(a):void 0,"data-tooltip-hotkey":o?bt.undoHotKey:void 0,theme:kt}),v.createElement(x.a,{icon:yt,isDisabled:!n,onClick:this._handleClickRedo,title:n?wt.redoHint.format(i):void 0,"data-tooltip-hotkey":n?bt.redoHotKey:void 0,theme:xt}))},t.prototype._onChangeStack=function(){var e=this._getStateFromUndoHistory();this.setState(e)},t.prototype._getStateFromUndoHistory=function(){
var e=this.context.chartWidgetCollection,t=e.undoHistory.undoStack(),n=e.undoHistory.redoStack(),o=n.head(),i=t.head();return{isEnabledRedo:!n.isEmpty(),isEnabledUndo:!t.isEmpty(),redoStack:o?o.text():"",undoStack:i?i.text():""}},t.contextTypes={chartWidgetCollection:m.object.isRequired},t}(v.PureComponent),Mt=n(313),At=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._ref=null,t._update=function(){t.forceUpdate()},t._setRef=function(e){t._ref=e},t._handleMeasure=function(e){var n=e.width;t.props.width.setValue(n)},t}return p.c(t,e),t.prototype.componentDidMount=function(){var e,t=this.props,n=t.element,o=t.isFake,i=t.width;o?i.subscribe(this._update):(e=Object(X.ensureNotNull)(this._ref),rt.findDOMNode(e).appendChild(n))},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.width;e.isFake&&t.unsubscribe(this._update)},t.prototype.render=function(){var e=this.props,t=e.isFake,n=void 0!==t&&t,o=e.width;return v.createElement(Mt,{shouldMeasure:!n,whitelist:["width"],onMeasure:this._handleMeasure},v.createElement(k,{ref:this._setRef,style:n?{width:o.value()}:void 0}))},t}(v.PureComponent),t.getRestrictedToolSet=d},836:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 8" width="16" height="8"><path d="M0 1.475l7.396 6.04.596.485.593-.49L16 1.39 14.807 0 7.393 6.122 8.58 6.12 1.186.08z"/></svg>'},844:function(e,t,n){"use strict";function o(){p.fire()}var i,a,r,s,l,c,h,d,u,p;n.d(t,"a",function(){return u}),t.b=o,i=n(1),a=n(20),n.n(a),r=n(102),n.n(r),s=n(7),n.n(s),l=n(50),c=n(871),n.n(c),h=n(8),d=n.n(h),u=function(e){function t(t){var n=e.call(this,t)||this;return n._containerRef=null,n._scrollWrapRef=null,n._handleContainerRef=function(e){return n._containerRef=e},n._handleScrollWrapRef=function(e){return n._scrollWrapRef=e},n._handleMeasure=function(){var e,t,o,i,a,r,c,h,d,u,p,v,m,f,g,C,_;n.state.isMeasureValid||(e=n.props.position,t=Object(s.ensureNotNull)(n._containerRef),o=t.getBoundingClientRect(),i=document.documentElement.clientHeight,a=document.documentElement.clientWidth,r=i-10,c=o.height>r,c&&(h=Object(s.ensureNotNull)(n._scrollWrapRef),h.style.overflowY="scroll",o=t.getBoundingClientRect()),d=o.width,u=o.height,p="function"==typeof e?e(d,u):e,v=5,m=a-d-5,f=Object(l.clamp)(p.x,v,Math.max(v,m)),g=5,C=i-u-5,_=Object(l.clamp)(p.y,g,Math.max(g,C)),n.setState({appearingMenuHeight:c?r:void 0,appearingMenuWidth:p.overrideWidth,appearingPosition:{x:f,y:_},isMeasureValid:!0}))},n._handleGlobalClose=function(){n.props.onClose()},n.state={},n}return i.c(t,e),t.prototype.componentWillReceiveProps=function(e){this.props.isOpened&&!e.isOpened&&this.setState({isMeasureValid:void 0})},t.prototype.componentDidMount=function(){this._handleMeasure(),p.subscribe(this,this._handleGlobalClose)},t.prototype.componentDidUpdate=function(){this._handleMeasure()},t.prototype.componentWillUnmount=function(){p.unsubscribe(this,this._handleGlobalClose)},t.prototype.render=function(){
var e,t=this.props,n=t.children,o=t.minWidth,i=t.theme,s=void 0===i?c:i,l=t.className,h=this.state,d=h.appearingMenuHeight,u=h.appearingMenuWidth,p=h.appearingPosition,v=h.isMeasureValid;return a.createElement("div",{className:r(l,s.menuWrap,(e={},e[s.isMeasuring]=!v,e)),style:{height:d,left:p&&p.x,minWidth:o,position:"fixed",top:p&&p.y,width:u},ref:this._handleContainerRef},a.createElement("div",{className:s.scrollWrap,style:{overflowY:void 0!==d?"scroll":"auto"},ref:this._handleScrollWrapRef},a.createElement("div",{className:s.menuBox},n)))},t}(a.PureComponent),p=new d.a},846:function(e,t,n){"use strict";function o(e){return r.createElement(e.href?"a":"div",e)}function i(e){e.stopPropagation()}var a,r,s,l,c,h;n.d(t,"a",function(){return h}),a=n(1),r=n(20),n.n(r),s=n(102),n.n(s),l=n(844),c=n(879),n.n(c),h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._handleClick=function(e){var n=t.props,o=n.dontClosePopup,i=n.isDisabled,a=n.onClick,r=n.onClickArg;i||(a&&a(r,e),o||Object(l.b)())},t}return a.c(t,e),t.prototype.render=function(){var e,t,n=this.props,a=n.className,l=n.forceShowHint,h=n.hint,d=n.icon,u=n.isActive,p=n.isDisabled,v=n.isHovered,m=n.appearAsDisabled,f=n.label,g=n.link,C=n.showToolboxOnHover,_=n.target,y=n.toolbox,w=n.theme,b=void 0===w?c:w;return r.createElement(o,{className:s(a,b.item,d&&b.withIcon,(e={},e[b.isActive]=u,e[b.isDisabled]=p||m,e[b.hovered]=v,e)),href:g,target:_,onClick:this._handleClick},void 0!==d&&r.createElement("div",{className:b.icon,dangerouslySetInnerHTML:{__html:d}}),r.createElement("div",{className:b.labelRow},r.createElement("div",{className:b.label},f)),(void 0!==h||l)&&r.createElement("div",{className:b.hint},h),void 0!==y&&r.createElement("div",{onClick:i,className:s(b.toolbox,(t={},t[b.showOnHover]=C,t))},y))},t}(r.PureComponent)},848:function(e,t,n){"use strict";function o(e){var t,n=e.icon,o=e.isActive,c=e.isOpened,h=e.isDisabled,d=e.onClick,u=e.text,p=e.textBeforeIcon,v=e.title,m=e.theme,f=void 0===m?l:m,g=e.className,C=e.forceInteractive,_=i.e(e,["icon","isActive","isOpened","isDisabled","onClick","text","textBeforeIcon","title","theme","className","forceInteractive"]),y=r(g,f.button,v&&"apply-common-tooltip",(t={},t[f.isActive]=o,t[f.isOpened]=c,t[f.isInteractive]=(C||!!d)&&!h,t[f.isDisabled]=h,t)),w=n&&("string"==typeof n?a.createElement(s.a,{className:f.icon,icon:n}):a.cloneElement(n,{className:f.icon}));return a.createElement("div",i.a({},_,{className:y,onClick:h?void 0:d,title:v}),p&&u&&a.createElement("div",{className:r("js-button-text",f.text)},u),w,!p&&u&&a.createElement("div",{className:r("js-button-text",f.text)},u))}var i,a,r,s,l;t.a=o,i=n(1),a=n(20),n.n(a),r=n(102),n.n(r),s=n(300),l=n(855),n.n(l)},849:function(e,t,n){"use strict";function o(e){return i.createElement("div",{className:a.separator})}var i,a;t.a=o,i=n(20),n.n(i),a=n(881),n.n(a)},855:function(e,t){e.exports={button:"button-2ioYhFEY-",isInteractive:"isInteractive-20uLObIc-",hovered:"hovered-3perbaxJ-",isActive:"isActive-22S-lGpa-",isOpened:"isOpened-p-Ume5l9-",
isDisabled:"isDisabled-1_tmrLfP-",text:"text-1sK7vbvh-",icon:"icon-beK_KS0k-"}},869:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14" width="14" height="14"><path fill-rule="evenodd" d="M10.893 9.512l.458 3.624c.014.105-.006.16-.02.176-.028.03-.109.005-.182-.03L7.812 11.73a1.973 1.973 0 0 0-.811-.16c-.302 0-.59.057-.81.16l-3.338 1.552c-.118.056-.164.051-.182.03-.014-.016-.034-.07-.02-.178L3.11 9.51c.06-.503-.162-1.18-.505-1.54L.087 5.302c-.085-.091-.09-.148-.086-.158.003-.01.04-.053.16-.077l3.621-.689c.491-.09 1.069-.506 1.315-.948L7.004 0l1.902 3.43c.246.442.824.859 1.312.947l3.617.69c.123.024.162.068.164.077.003.01-.003.066-.089.157L11.4 7.97c-.348.367-.57 1.045-.506 1.543z"/></svg>'},870:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14" width="14" height="14"><path d="M9.901 9.639c-.102-.797.218-1.775.77-2.356l1.438-1.527-2.07-.395c-.784-.142-1.615-.742-2.008-1.446L7.003 2.06 5.97 3.917c-.391.702-1.222 1.301-2 1.443l-2.08.396 1.44 1.526c.547.577.866 1.549.77 2.353l-.262 2.086 1.93-.897a2.95 2.95 0 0 1 1.233-.254c.44 0 .87.085 1.233.254l1.93.897-.263-2.082zm.992-.127l.458 3.624c.014.105-.006.16-.02.176-.028.03-.109.005-.182-.03L7.812 11.73a1.973 1.973 0 0 0-.811-.16c-.302 0-.59.057-.81.16l-3.338 1.552c-.118.056-.164.051-.182.03-.014-.016-.034-.07-.02-.178L3.11 9.51c.06-.503-.162-1.18-.505-1.54L.087 5.302c-.085-.091-.09-.148-.086-.158.003-.01.04-.053.16-.077l3.621-.689c.491-.09 1.069-.506 1.315-.948L7.004 0l1.902 3.43c.246.442.824.859 1.312.947l3.617.69c.123.024.162.068.164.077.003.01-.003.066-.089.157L11.4 7.97c-.348.367-.57 1.045-.506 1.543z"/></svg>'},871:function(e,t){e.exports={menuWrap:"menuWrap-1gEtmoET-",isMeasuring:"isMeasuring-FZ0EJCM2-",scrollWrap:"scrollWrap-1B5MfTJt-",menuBox:"menuBox-20sJGjtG-",isHidden:"isHidden-2vLQpR1t-"}},872:function(e,t,n){"use strict";function o(e){var t=u(e),n=document.getElementById(t);return n||(n=document.createElement("div"),n.id=t,document.body.appendChild(n)),d[e]=(d[e]||0)+1,n}function i(e){var t=u(e),n=document.getElementById(t);d[e]&&(d[e]-=1),n&&0===d[e]&&document.body.removeChild(n)}var a,r=n(1),s=(n(127),n(20)),l=n(59),c=n(304),h=0,d={},u=function(e){return"__outside-render-"+e},p=function(e){function t(t){return e.call(this,t)||this}return r.c(t,e),t.prototype.componentDidMount=function(){this._rememberLayer(),this._renderLayer()},t.prototype.componentDidUpdate=function(e){this.props.layerId!==e.layerId&&(i(this._layerId),this._rememberLayer()),this._renderLayer()},t.prototype.componentWillUnmount=function(){l.unmountComponentAtNode(this._layer),i(this._layerId)},t.prototype.render=function(){return null},t.prototype._rememberLayer=function(){var e=this.props.layerId,t=void 0===e?h+++"":e;this._layerId=t,this._layer=o(t)},t.prototype._renderLayer=function(){l.render(s.createElement("div",null,this.props.children),this._layer)},t}(s.Component),v=n(844);n.d(t,"a",function(){return a}),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._handleClose=function(){
t.props.onClose()},t._handleClickOutside=function(e){var n=t.props,o=n.closeOnClickOutside,i=n.onClickOutside,a=n.doNotCloseOn;i&&i(e),!o||void 0!==a&&l.findDOMNode(a).contains(e.target)||t._handleClose()},t}return r.c(t,e),t.prototype.componentWillReceiveProps=function(e){this.props.isOpened&&!e.isOpened&&this.setState({isMeasureValid:void 0})},t.prototype.render=function(){var e=this.props,t=e.children,n=e.isOpened,o=(e.closeOnClickOutside,e.doNotCloseOn,e.onClickOutside,e.onClose,r.e(e,["children","isOpened","closeOnClickOutside","doNotCloseOn","onClickOutside","onClose"]));return n?s.createElement(p,null,s.createElement(c.a,{handler:this._handleClickOutside,mouseDown:!0,touchStart:!0,ctor:"div"},s.createElement(v.a,r.a({},o,{isOpened:n,onClose:this._handleClose}),t))):null},t.defaultProps={closeOnClickOutside:!0},t}(s.PureComponent)},878:function(e,t,n){"use strict";var o,i,a,r,s,l,c,h;n.d(t,"a",function(){return h}),o=n(1),n(11),i=n(20),n.n(i),a=n(102),n.n(a),r=n(987),n.n(r),s=n(869),n.n(s),l=n(870),n.n(l),c={add:window.t("Add to favorites"),remove:window.t("Remove from favorites")},h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._handleClick=function(e){var n=t.props,o=n.onClick,i=n.onClickArg;o&&o(i,e)},t}return o.c(t,e),t.prototype.render=function(){var e,t=this.props.isFilled;return i.createElement("span",{className:a(r.star,"apply-common-tooltip",(e={},e[r.checked]=t,e)),dangerouslySetInnerHTML:{__html:t?s:l},onClick:this._handleClick,title:t?c.remove:c.add})},t}(i.PureComponent)},879:function(e,t){e.exports={item:"item-2xPVYue0-",hovered:"hovered-1uf45E05-",isDisabled:"isDisabled-1wLqKupj-",isActive:"isActive-2j-GhQs_-",icon:"icon-2Qm7YIcz-",hint:"hint-1IhIvLPB-",toolbox:"toolbox-3ulPxfe--",withIcon:"withIcon-1xBjf-oB-",labelRow:"labelRow-3Q0rdE8--",label:"label-3Xqxy756-",showOnHover:"showOnHover-1q6ySzZc-"}},880:function(e,t,n){"use strict";var o,i,a,r,s,l,c,h,d,u,p,v;n.d(t,"b",function(){return h}),n.d(t,"c",function(){return u}),n.d(t,"a",function(){return v}),o=n(1),i=n(20),n.n(i),a=n(102),n.n(a),r=n(872),s=n(975),l=n(7),n.n(l),c=n(989),n.n(c),function(e){e[e.Top=0]="Top",e[e.Bottom=1]="Bottom"}(h||(h={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right"}(d||(d={})),function(e){e[e.FromTopToBottom=0]="FromTopToBottom",e[e.FromBottomToTop=1]="FromBottomToTop"}(u||(u={})),function(e){e[e.FromLeftToRight=0]="FromLeftToRight",e[e.FromRightToLeft=1]="FromRightToLeft"}(p||(p={})),v=function(e){function t(t){var n=e.call(this,t)||this;return n._wrapperRef=null,n._handleWrapperRef=function(e){return n._wrapperRef=e},n._handleClick=function(){n._handleToggleDropdown()},n._handleToggleDropdown=function(e){var t=n.state.isOpened,o="boolean"==typeof e?e:!t;n.setState({isOpened:o})},n._handleClose=function(){n._handleToggleDropdown(!1)},n._getDropdownPosition=function(e,t){
var o=Object(l.ensureNotNull)(n._wrapperRef).getBoundingClientRect(),i=n.props,a=i.verticalAttachEdge,r=i.verticalDropDirection,s=i.horizontalAttachEdge,c=i.horizontalDropDirection,v=i.horizontalMargin,m=void 0===v?0:v,f=i.verticalMargin,g=void 0===f?2:f,C=a===h.Top?-1*g:g,_=s===d.Right?o.right:o.left,y=a===h.Top?o.top:o.bottom;return{x:_-(c===p.FromRightToLeft?e:0)+m,y:y-(r===u.FromBottomToTop?t:0)+C}},n.state={isOpened:!1},n}return o.c(t,e),t.prototype.render=function(){var e,t=this.props,n=t.id,o=t.arrow,l=t.children,h=t.content,d=t.isDisabled,u=t.minWidth,p=t.title,v=t.className,m=t.hotKey,f=this.state.isOpened,g=a(v,c.button,"apply-common-tooltip",(e={},e[c.isDisabled]=d,e[c.isOpened]=f,e));return i.createElement("div",{id:n,className:g,onClick:d?void 0:this._handleClick,title:p,"data-tooltip-hotkey":m,ref:this._handleWrapperRef},h,o&&i.createElement("div",{className:c.arrow},i.createElement("div",{className:c.arrowWrap},i.createElement(s.a,{dropped:f}))),i.createElement(r.a,{closeOnClickOutside:this.props.closeOnClickOutside,doNotCloseOn:this,isOpened:f,minWidth:u,onClose:this._handleClose,position:this._getDropdownPosition},l))},t.defaultProps={arrow:!0,closeOnClickOutside:!0,verticalAttachEdge:h.Bottom,horizontalAttachEdge:d.Left,verticalDropDirection:u.FromTopToBottom,horizontalDropDirection:p.FromLeftToRight},t}(i.PureComponent)},881:function(e,t){e.exports={separator:"separator-25lkUpN--"}},882:function(e,t,n){"use strict";function o(e,t,n){var o,i,a,r,s;for(void 0===n&&(n={}),o=Object.assign({},t),i=0,a=Object.keys(t);i<a.length;i++)r=a[i],(s=n[r]||r)in e&&(o[r]=[e[s],t[r]].join(" "));return o}t.a=o},974:function(e,t,n){"use strict";var o,i,a,r,s,l,c,h,d,u;Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"SERIES_ICONS",function(){return u}),o=n(980),n.n(o),i=n(981),n.n(i),a=n(982),n.n(a),r=n(983),n.n(r),s=n(984),n.n(s),l=n(985),n.n(l),c=n(986),n.n(c),h=n(40),d={},d[h.STYLE_AREA]=o,d[h.STYLE_BARS]=i,d[h.STYLE_CANDLES]=a,d[h.STYLE_HEIKEN_ASHI]=r,d[h.STYLE_HOLLOW_CANDLES]=s,d[h.STYLE_LINE]=l,d[h.STYLE_BASELINE]=c,u=d},975:function(e,t,n){"use strict";function o(e){var t,n=e.dropped,o=e.className;return i.createElement(r.a,{className:a(o,s.icon,(t={},t[s.dropped]=n,t)),icon:l})}var i,a,r,s,l;t.a=o,i=n(20),n.n(i),a=n(102),n.n(a),r=n(300),s=n(988),n.n(s),l=n(836),n.n(l)},980:function(e,t){
e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path d="M12.5 17.207L18.707 11h2l3.647-3.646-.708-.708L20.293 10h-2L12.5 15.793l-3-3-4.854 4.853.708.708L9.5 14.207z"/><path d="M9 16h1v1H9zm1 1h1v1h-1zm-1 1h1v1H9zm2 0h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1H9zm2 0h1v1h-1zm-3-3h1v1H8zm-1 1h1v1H7zm-1 1h1v1H6zm2 0h1v1H8zm-1 1h1v1H7zm-2 0h1v1H5zm17-9h1v1h-1zm1-1h1v1h-1zm0 2h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-5-7h1v1h-1zm2 0h1v1h-1zm1-1h1v1h-1zm-2 2h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-1 1h1v1h-1zm-2-6h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-3-3h1v1h-1zm-1 1h1v1h-1zm-1 1h1v1h-1zm2 0h1v1h-1zm-1 1h1v1h-1z"/></svg>'},981:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><g fill="none" stroke="currentColor" stroke-linecap="square"><path d="M10.5 7.5v15M7.5 20.5H10M13.5 11.5H11M19.5 6.5v15M16.5 9.5H19M22.5 16.5H20"/></g></svg>'},982:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path d="M17 11v6h3v-6h-3zm-.5-1h4a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-.5.5h-4a.5.5 0 0 1-.5-.5v-7a.5.5 0 0 1 .5-.5z"/><path d="M18 7h1v3.5h-1zm0 10.5h1V21h-1z"/><path d="M9 8v12h3V8H9zm-.5-1h4a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-.5.5h-4a.5.5 0 0 1-.5-.5v-13a.5.5 0 0 1 .5-.5z"/><path d="M10 4h1v3.5h-1zm0 16.5h1V24h-1z"/></svg>'},983:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path d="M9 8v12h3V8H9zm-1-.502C8 7.223 8.215 7 8.498 7h4.004c.275 0 .498.22.498.498v13.004a.493.493 0 0 1-.498.498H8.498A.496.496 0 0 1 8 20.502V7.498z"/><path d="M10 4h1v3.5h-1z"/><path d="M17 6v6h3V6h-3zm-1-.5c0-.276.215-.5.498-.5h4.004c.275 0 .498.23.498.5v7c0 .276-.215.5-.498.5h-4.004a.503.503 0 0 1-.498-.5v-7z"/><path d="M18 2h1v3.5h-1z"/></svg>'},984:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path d="M17 11v6h3v-6h-3zm-.5-1h4a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-.5.5h-4a.5.5 0 0 1-.5-.5v-7a.5.5 0 0 1 .5-.5z"/><path d="M18 7h1v3.5h-1zm0 10.5h1V21h-1z"/><path d="M9 8v11h3V8H9zm-.5-1h4a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5h-4a.5.5 0 0 1-.5-.5v-12a.5.5 0 0 1 .5-.5z"/><path d="M10 4h1v5h-1zm0 14h1v5h-1zM8.5 9H10v1H8.5zM11 9h1.5v1H11zm-1 1h1v1h-1zm-1.5 1H10v1H8.5zm2.5 0h1.5v1H11zm-1 1h1v1h-1zm-1.5 1H10v1H8.5zm2.5 0h1.5v1H11zm-1 1h1v1h-1zm-1.5 1H10v1H8.5zm2.5 0h1.5v1H11zm-1 1h1v1h-1zm-1.5 1H10v1H8.5zm2.5 0h1.5v1H11z"/></svg>'},985:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path d="M11.982 16.689L17.192 12h3.033l4.149-4.668-.748-.664L19.776 11h-2.968l-4.79 4.311L9 12.293l-4.354 4.353.708.708L9 13.707z"/></svg>'},986:function(e,t){
e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><g fill="none" stroke="currentColor"><path stroke-dasharray="1,1" d="M4 14.5h22"/><path stroke-linecap="round" stroke-linejoin="round" d="M7.5 12.5l2-4 1 2 2-4 3 6"/><path stroke-linecap="round" d="M5.5 16.5l-1 2"/><path stroke-linecap="round" stroke-linejoin="round" d="M17.5 16.5l2 4 2-4m2-4l1-2-1 2z"/></g></svg>'},987:function(e,t){e.exports={star:"star-uhAI7sV4-",checked:"checked-2bhy04CF-"}},988:function(e,t){e.exports={icon:"icon-16JOogW_-",dropped:"dropped-1WSGLaYJ-"}},989:function(e,t){e.exports={button:"button-13wlLwhJ-",hovered:"hovered-FUo4RNOC-",arrow:"arrow-2pXEy7ej-",arrowWrap:"arrowWrap-r5l5nQXU-",isOpened:"isOpened-1939ai3F-"}}});