(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[3555],{97754:(e,t)=>{var o;!function(){"use strict";var r={}.hasOwnProperty;function n(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var a=typeof o;if("string"===a||"number"===a)e.push(o);else if(Array.isArray(o)&&o.length){var i=n.apply(null,o);i&&e.push(i)}else if("object"===a)for(var c in o)r.call(o,c)&&o[c]&&e.push(c)}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):void 0===(o=function(){return n}.apply(t,[]))||(e.exports=o)}()},65455:e=>{e.exports={priceScaleModeButton:"priceScaleModeButton-okRV4Kjm",priceScaleModeButton_activated:"priceScaleModeButton_activated-okRV4Kjm"}},87896:(e,t,o)=>{"use strict";o.d(t,{createReactRoot:()=>u});var r=o(50959),n=o(32227),a=o(4237);const i=(0,r.createContext)({isOnMobileAppPage:()=>!1,isRtl:!1,locale:"en",renderMode:"legacy"});var c=o(84015),s=o(24640);const l={iOs:"old",android:"new",old:"old",new:"new",any:"any"};function d(e){const[t]=(0,r.useState)({isOnMobileAppPage:e=>(0,c.isOnMobileAppPage)(l[e]),isRtl:(0,s.isRtl)(),locale:window.locale,renderMode:e.renderMode??"legacy"});return r.createElement(i.Provider,{value:t},e.children)}function u(e,t,o="legacy"){const i=r.createElement(d,{renderMode:o},e);if("modern"===o){const e=(0,a.createRoot)(t);return e.render(i),{render(t){e.render(r.createElement(d,{renderMode:o},t))},unmount(){e.unmount()}}}return n.render(i,t),{render(e){n.render(r.createElement(d,{renderMode:o},e),t)},unmount(){n.unmountComponentAtNode(t)}}}},4237:(e,t,o)=>{"use strict";var r=o(32227);t.createRoot=r.createRoot,r.hydrateRoot},93880:e=>{e.exports={priceScaleModeButtons:"priceScaleModeButtons-PEm49B2T",priceScaleModeButtons__buttonWrapper:"priceScaleModeButtons__buttonWrapper-PEm49B2T",priceScaleModeButtons__button:"priceScaleModeButtons__button-PEm49B2T"}},34419:(e,t,o)=>{"use strict";o.r(t),o.d(t,{PriceScaleModeButtonsRenderer:()=>p});var r=o(50959),n=o(11542),a=o(49483),i=o(87896),c=o(97754),s=o.n(c),l=o(65455);function d(e){const{activated:t,onClick:o,content:n,tooltip:a,ariaLabel:i,className:c}=e;return r.createElement("button",{className:s()(l.priceScaleModeButton,t&&l.priceScaleModeButton_activated,c,a&&"apply-common-tooltip"),onClick:o,"data-tooltip":a,"aria-label":i},n)}var u=o(93880);class p{constructor({setMode:e,getMode:t,className:o=""}){this._reactRoot=null,this._setAutoMode=()=>this._setModeFunction("auto"),this._setLogarithmMode=()=>this._setModeFunction("log"),this._setModeFunction=e,this._getModeFunction=t;const r=this._wrapper=document.createElement("div");r.classList.add(o),r.addEventListener("dblclick",this._stopPropagation,{capture:!0}),r.addEventListener("touchstart",this._stopPropagation,{capture:!0}),this._render()}destroy(){this._reactRoot?.unmount(),this._wrapper.removeEventListener("dblclick",this._stopPropagation),this._wrapper.removeEventListener("touchstart",this._stopPropagation),this._wrapper.remove()}element(){return this._wrapper}width(){return 52}update(){this._render()}_render(){
const e=a.CheckMobile.any(),{autoScale:t=!1,log:c=!1}=this._getModeFunction()||{},s=r.createElement("div",{className:u.priceScaleModeButtons},r.createElement("div",{className:u.priceScaleModeButtons__buttonWrapper,onClick:e?this._setAutoMode:void 0,"aria-label":e?n.t(null,void 0,o(94465)):void 0},r.createElement(d,{activated:t,content:n.t(null,{context:'The first letter of the "auto" word'},o(94073)),tooltip:n.t(null,void 0,o(24157)),onClick:e?void 0:this._setAutoMode,ariaLabel:e?void 0:n.t(null,void 0,o(94465)),className:u.priceScaleModeButtons__button})),r.createElement("div",{className:u.priceScaleModeButtons__buttonWrapper,onClick:e?this._setLogarithmMode:void 0,"aria-label":e?n.t(null,void 0,o(46992)):void 0},r.createElement(d,{activated:c,content:n.t(null,{context:'The first letter of the "logarithmic" word'},o(66384)),tooltip:n.t(null,void 0,o(16170)),onClick:e?void 0:this._setLogarithmMode,ariaLabel:e?void 0:n.t(null,void 0,o(46992)),className:u.priceScaleModeButtons__button})));this._reactRoot?this._reactRoot.render(s):this._reactRoot=(0,i.createReactRoot)(s,this._wrapper,"modern")}_stopPropagation(e){e.stopPropagation()}}}}]);