(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[9103],{677217:t=>{t.exports={"common-tooltip":"common-tooltip-C8z_hVli","common-tooltip--hidden":"common-tooltip--hidden-C8z_hVli","common-tooltip--horizontal":"common-tooltip--horizontal-C8z_hVli","common-tooltip--farther":"common-tooltip--farther-C8z_hVli","common-tooltip--vertical":"common-tooltip--vertical-C8z_hVli","common-tooltip-farther":"common-tooltip-farther-C8z_hVli","common-tooltip--direction_normal":"common-tooltip--direction_normal-C8z_hVli","common-tooltip__body":"common-tooltip__body-C8z_hVli","common-tooltip__button-container":"common-tooltip__button-container-C8z_hVli","common-tooltip__body--no-buttons":"common-tooltip__body--no-buttons-C8z_hVli","common-tooltip__button":"common-tooltip__button-C8z_hVli","common-tooltip--direction_reversed":"common-tooltip--direction_reversed-C8z_hVli","common-tooltip__ear-holder":"common-tooltip__ear-holder-C8z_hVli","common-tooltip__ear-holder--below":"common-tooltip__ear-holder--below-C8z_hVli","common-tooltip__ear-holder--above":"common-tooltip__ear-holder--above-C8z_hVli","common-tooltip__ear-holder--before":"common-tooltip__ear-holder--before-C8z_hVli","common-tooltip__ear-holder--after":"common-tooltip__ear-holder--after-C8z_hVli","common-tooltip__body--with-hotkey":"common-tooltip__body--with-hotkey-C8z_hVli","common-tooltip__body--width_wide":"common-tooltip__body--width_wide-C8z_hVli","common-tooltip__body--width_narrow":"common-tooltip__body--width_narrow-C8z_hVli","common-tooltip__body--no-padding":"common-tooltip__body--no-padding-C8z_hVli","common-tooltip__hotkey-block":"common-tooltip__hotkey-block-C8z_hVli","common-tooltip__hotkey-block--divider":"common-tooltip__hotkey-block--divider-C8z_hVli","common-tooltip__hotkey-text":"common-tooltip__hotkey-text-C8z_hVli","common-tooltip__hotkey-button":"common-tooltip__hotkey-button-C8z_hVli","common-tooltip__plus-sign":"common-tooltip__plus-sign-C8z_hVli"}},591800:(t,e,o)=>{"use strict";o.d(e,{isMacKeyboard:()=>i,Modifiers:()=>r,modifiersFromEvent:()=>s,hashFromEvent:()=>l,hashShiftPlusEnter:()=>a,humanReadableModifiers:()=>c,humanReadableHash:()=>u});var n=o(167175);const i=n.isMac||n.isIOS;var r;function s(t){let e=0;return t.shiftKey&&(e+=1024),t.altKey&&(e+=512),t.ctrlKey&&(e+=256),t.metaKey&&(e+=2048),e}function l(t){return s(t)|t.keyCode}!function(t){t[t.None=0]="None",t[t.Alt=512]="Alt",t[t.Shift=1024]="Shift",t[t.Mod=i?2048:256]="Mod",t[t.Control=256]="Control",t[t.Meta=2048]="Meta"}(r||(r={}));const a=1037;function c(t,e=!i){let o="";return 256&t&&(o+=i?"^":"Ctrl",e&&(o+=" + ")),512&t&&(o+=i?"⌥":"Alt",e&&(o+=" + ")),1024&t&&(o+=i?"⇧":"Shift",e&&(o+=" + ")),2048&t&&(o+=i?"⌘":"Win",e&&(o+=" + ")),o}const d={9:"⇥",13:"↵",27:"Esc",8:i?"⌫":"Backspace",32:"Space",35:"End",36:"Home",37:"←",38:"↑",39:"→",40:"↓",45:"Ins",46:"Del",188:",",191:"/"};for(let t=1;t<=16;t++)d[t+111]=`F${t}`;function u(t){let e=c(t);const o=255&t;return e+=o in d?d[o]:String.fromCharCode(o),e}},607423:(t,e,o)=>{"use strict";o.d(e,{isTextEditingField:()=>i,
isNativeUIInteraction:()=>r});var n=o(591800);function i(t){if("INPUT"===t.tagName){const 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;const 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){const t=e.ownerDocument&&e.ownerDocument.getSelection();if(t&&!t.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){const 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}},499994:(t,e,o)=>{"use strict";o.d(e,{getTooltipData:()=>i,setTooltipData:()=>r});const n=new WeakMap;function i(t,e){const o=n.get(t);return o instanceof Function?o(e):o&&o[e]}function r(t,e,o){if(o instanceof Function)return void n.set(t,o);const i=n.get(t),r=void 0===i||i instanceof Function?{}:i;r[e]=o,n.set(t,r)}},604286:(t,e,o)=>{"use strict";o.d(e,{hotKeySerialize:()=>i,hotKeyDeserialize:()=>r});var n=o(809350);function i(t){return(0,n.clean)(JSON.stringify(t))}function r(t){return JSON.parse((0,n.clean)(t,!0))}},309103:(t,e,o)=>{"use strict";o.r(e),o.d(e,{hide:()=>j,show:()=>R,showOnElement:()=>F,tooltipClickHandler:()=>q,updateTooltipText:()=>U});var n=o(778785);let i=0,r=0,s=0;function l(){clearTimeout(i),clearTimeout(r),clearTimeout(s)}function a(t,e){i=setTimeout(t,e)}const c="tooltip-root-element";let d;function u(){const t=document.getElementById(c);t?d=t:(d=document.createElement("div"),d.id=c,document.body.appendChild(d))}function m(){d&&(d.innerHTML="")}"interactive"===document.readyState?u():document.addEventListener("DOMContentLoaded",u);var h=o(650151);const p={default:"",white:"theme-white","round-shadow":"theme-round-shadow"},_=Object.keys(p);var f=o(499994),g=o(604286),y=o(878134),v=o(768038),b=(o(984919),o(587080)),w=o(43329),E=o(638456),L=o(677217);function k(t){const e=t.hasAttribute("data-tooltip")?t.getAttribute("data-tooltip"):t.getAttribute("title");return e&&((0,f.setTooltipData)(t,"text",e),t.removeAttribute("title")),(0,f.getTooltipData)(t,"text")||""}function C(t){const e=N.cloneNode(!0),o=K(e),{content:n}=t;switch(n.type){case"element":o.innerHTML="",o.appendChild(n.data);break;case"html":o.innerHTML=n.data;break;case"text":if(t.hotkey){const t=S.cloneNode(!0);t.innerText=n.data,o.appendChild(t)}else o.innerText=n.data}if(t.hotkey){const e="none"!==n.type,i=z.cloneNode(!0),r=(0,g.hotKeyDeserialize)(t.hotkey),s=r.keys.map((t=>`${t}`));i.innerHTML=function(t,e){const o=/{\d}|{hotkey_\d}/gi
;return t.replace(o,(t=>{const o=Number(t.match(/\d/));return e[o]}))}(r.text,s).replace(/\s\+\s/g,`+`),o.classList.add(L["common-tooltip__body--with-hotkey"]),e&&i.classList.add(L["common-tooltip__hotkey-block--divider"]),o.appendChild(i)}return e.addEventListener("contextmenu",b.preventDefault),e}function T(t,e){const o=e.rect;if(!o)return;!function(t,e){const o=_.includes(e)?p[e]:"";t.classList.remove(..._.map((t=>p[t])).filter((t=>!!t))),o&&!t.classList.contains(o)&&t.classList.add(o)}(t,e.colorTheme||"default"),e.addClass&&t.classList.add(e.addClass);const n=K(t),i=t.querySelector(`.${L["common-tooltip__button-container"]}`);n.classList.toggle(L["common-tooltip__body--width_wide"],Boolean(e.wide)),n.classList.toggle(L["common-tooltip__body--no-padding"],Boolean(e.noPadding)),n.classList.toggle(L["common-tooltip__body--width_narrow"],Boolean(e.narrow)),n.classList.toggle(L["common-tooltip__body--no-buttons"],!0),n.style.left=D(0),n.style.width=D(n.clientWidth+(Boolean(e.noPadding)?0:2));const r=document.body.clientWidth,s=E.CheckMobile.iOS()||(0,E.supportTouch)()&&(0,E.isMac)()?window.innerHeight:document.body.clientHeight,l=e.vertical,a=e.extendMargin||l&&o.w<20||!l&&o.h<20;t.classList.toggle(L["common-tooltip--farther"],a),t.classList.toggle(L["common-tooltip--vertical"],l),t.classList.toggle(L["common-tooltip--horizontal"],!l);const c=function(t){return t.querySelector(`.${L["common-tooltip__ear-holder"]}`)}(t),d=t.offsetHeight;if(l){const l=10,a=s-10,u=12,m=l+u,h=a-u,p=(0,w.clamp)(o.y+o.h/2,m,h)-d/2,_=p+d;t.style.left=D(o.x+o.w),t.style.top=D(p),pa&&(n.style.top=i.style.top=D(a-_));const{right:f}=(t.querySelector(":last-child")||n).getBoundingClientRect(),g=f+10>r;t.classList.toggle(L["common-tooltip--direction_reversed"],g),t.classList.toggle(L["common-tooltip--direction_normal"],!g);let y=g?"after":"before";(0,v.isRtl)()?(y=e.otr?"after":y,y=e.otl?"before":y):(y=e.otr?"before":y,y=e.otl?"after":y),c.classList.toggle(L["common-tooltip__ear-holder--before"],"before"===y),c.classList.toggle(L["common-tooltip__ear-holder--after"],"after"===y),"after"===y&&(t.style.left="auto",t.style.right=D(r-o.x))}else{const l=o.x-(n.offsetWidth-o.w)/2,a=r-10-t.offsetWidth,u=Math.max(10,Math.min(l,a));t.style.left=D(u);const m=a\n\t\t\n\t\t\n\t\n`,x=`\n\t\n`,H=`\n\t\n`,N=(0,y.parseHtmlElement)(V),z=(0,y.parseHtmlElement)(x),S=(0,y.parseHtmlElement)(H);function K(t){return t.querySelector(`.${L["common-tooltip__body"]}`)}function A(t,e){return 10+t{$&&($.destroy(),$=null)};for(const e of i){if("buttons"in t){if(1&t.buttons)continue}else if(1===t.which)continue;const o=()=>F(e);if(o()){const t=t=>{t.target instanceof Element&&t.target.contains(e)&&n(null,!0)},n=(i,s=!1)=>{e.removeEventListener("common-tooltip-update",o),e.removeEventListener("mouseleave",n),e.removeEventListener("mousedown",n),document.removeEventListener("scroll",t,{capture:!0}),r(),j(s)};e.addEventListener("common-tooltip-update",o),e.addEventListener("mouseleave",n),e.addEventListener("mousedown",n),document.addEventListener("scroll",t,{capture:!0}),null===$&&($=(0,O.createGroup)({desc:"Tooltip"}),$.add({desc:"Hide",hotkey:27,handler:n}));break}}}),!0);const W=new MutationObserver((()=>{if(I&&I.options.target){let t;t="isConnected"in I.options.target?I.options.target.isConnected:document.body.contains(I.options.target),t||j()}})),F=(t,e={})=>{const{content:o,...n}=Q(e),i=function(t){const e=k(t),o=t.getBoundingClientRect(),n={h:o.height,w:o.width,x:o.left,y:o.top},i=t.getAttribute("data-color-theme")||"",r=t.classList.contains("common-tooltip-html"),s=parseInt(t.getAttribute("data-tooltip-delay")||""),l=parseInt(t.getAttribute("data-tooltip-debounce")||"");let a={type:"none"};return e&&(a={type:r?"html":"text",data:e}),{above:t.classList.contains("common-tooltip-above"),below:t.classList.contains("common-tooltip-below"),otl:t.classList.contains("common-tooltip-otl"),otr:t.classList.contains("common-tooltip-otr"),vertical:t.classList.contains("common-tooltip-vertical"),hotkey:t.getAttribute("data-tooltip-hotkey"),narrow:t.classList.contains("common-tooltip-narrow"),wide:t.classList.contains("common-tooltip-wide"),colorTheme:i,tooltipDelay:s,tooltipDebounce:l,rect:n,content:a,target:t}}(t),r=Object.assign(i,n);return"none"!==o.type&&(r.content=o),!("none"===r.content.type&&!r.hotkey)&&(r.target=t,R(r),!0)},R=t=>{const e=Q(t),o=C(e);var n;if(I={options:e,element:o},n=o,m(),d&&d.appendChild(n),l(),!B)return M(o),
void a((()=>J(o)),function(t){return"number"!=typeof t.tooltipDelay||isNaN(t.tooltipDelay)?500:t.tooltipDelay}(e));const{tooltipDebounce:i}=t;"number"!=typeof i||isNaN(i)?J(o):a((()=>J(o)),i)},U=t=>k(t);function q(t){n.mobiletouch&&(F(t.currentTarget,{tooltipDelay:0}),document.addEventListener("scroll",G),document.addEventListener("touchstart",G))}function G(){document.removeEventListener("scroll",G),document.removeEventListener("touchstart",G),j()}function P(){m(),B=!1,I=null}const j=t=>{if(l(),W.disconnect(),!I)return;if(!t&&!B)return;const{element:e,options:o}=I,n=()=>{e.removeEventListener("mouseleave",n),M(e),t?P():s=setTimeout((()=>{P()}),250)};var i,a;o.tooltipHideDelay?(i=()=>{e.querySelector(":hover")?e.addEventListener("mouseleave",n):n()},a=o.tooltipHideDelay,r=setTimeout(i,a)):n()};function J(t){const{options:e}=(0,h.ensureNotNull)(I);if(T(t,e),function(t){t.classList.toggle(L["common-tooltip--hidden"],!1)}(t),W.observe(document,{childList:!0,subtree:!0}),B=!0,e.forceHideOnMove){const t=()=>{document.removeEventListener("mousemove",t),j()};document.addEventListener("mousemove",t)}}function X(t){return t&&(t.nodeType===Node.ELEMENT_NODE?t:null)}function Q(t){if(function(t){return"content"in t}(t))return t;const{inner:e,html:o,text:n,...i}=t;let r={type:"none"};return e&&(r={type:"element",data:e}),n&&(r={type:o?"html":"text",data:n}),{content:r,...i}}},177161:(t,e,o)=>{"use strict";o.r(e),o.d(e,{Modifiers:()=>n.Modifiers,createGroup:()=>d,pressedKeys:()=>c,registerWindow:()=>u,unregisterWindow:()=>m});var n=o(591800),i=o(607423),r=o(91679);class s{constructor(t,e){this._group=t,this.hotkey=e.hotkey,this.handler=e.handler,this.desc=e.desc,this.element=e.element||null,e.isDisabled?"function"==typeof e.isDisabled?this.isDisabled=e.isDisabled:this.isDisabled=()=>!0:this.isDisabled=()=>!1}destroy(){this._group&&(this._group.remove(this),this._group=null)}}class l{constructor(t,e){this._actions=[],this._manager=t,this.modal=!(!e||!e.modal),e&&(this.desc=e.desc),e&&e.isDisabled?"function"==typeof e.isDisabled?this.isDisabled=e.isDisabled:this.isDisabled=()=>!0:this.isDisabled=()=>!1,this._manager.registerGroup(this)}add(t){const e=new s(this,t);return this._actions.push(e),e}remove(t){for(let e=this._actions.length;e-- >0;)this._actions[e]===t&&this._actions.splice(e,1)}handleHotkey(t,e){for(let o=this._actions.length;o-- >0;){const n=this._actions[o];if(n.hotkey===t&&((!n.element||e.target&&n.element.contains(e.target))&&!n.isDisabled()))return n.handler(e),e.preventDefault(),this._callMatchedHotkeyHandler(t),!0}return!1}promote(){this._manager.promoteGroup(this)}destroy(){this._actions.length=0,this._manager.unregisterGroup(this)}static setMatchedHotkeyHandler(t){l._matchedHotkeyHandler=t}_callMatchedHotkeyHandler(t){l._matchedHotkeyHandler&&l._matchedHotkeyHandler(t)}}const a=new class{constructor(){this._groups=[],this._pressedKeys=new r.WatchedValue(0),this._keyDownListener=t=>{if(t.defaultPrevented)return;const e=(0,n.hashFromEvent)(t);if(this._pressedKeys.setValue(e),!(0,
i.isNativeUIInteraction)(e,t.target))for(let o=this._groups.length;o-- >0;){const n=this._groups[o];if(!n.isDisabled()){if(n.handleHotkey(e,t))return;if(n.modal)return}}},this._keyUpListener=t=>{const e=(0,n.hashFromEvent)(t);this._pressedKeys.setValue(e)},this._blurEvent=()=>{this._pressedKeys.setValue(0)},this._mouseEvent=t=>{var e;const o=(0,n.modifiersFromEvent)(t),i=255&(null!==(e=this._pressedKeys.value())&&void 0!==e?e:0);this._pressedKeys.setValue(o|i)}}listen(t){t.addEventListener("keydown",this._keyDownListener),t.addEventListener("keyup",this._keyUpListener),t.addEventListener("blur",this._blurEvent),t.addEventListener("mousemove",this._mouseEvent)}unlisten(t){t.removeEventListener("keydown",this._keyDownListener),t.removeEventListener("keyup",this._keyUpListener),t.removeEventListener("blur",this._blurEvent),t.removeEventListener("mousemove",this._mouseEvent)}registerGroup(t){this._groups.push(t)}unregisterGroup(t){for(let e=this._groups.length;e--;)this._groups[e]===t&&this._groups.splice(e,1)}promoteGroup(t){let e=this._groups.length-1;for(let o=this._groups.length;o--;){if(this._groups[o]===t)return void(o!==e&&(this._groups.splice(o,1),this._groups.splice(e,0,t)));this._groups[o].modal&&(e=o-1)}}pressedKeys(){return this._pressedKeys}},c=a.pressedKeys().readonly();function d(t){return new l(a,t)}function u(t){a.listen(t)}function m(t){a.unlisten(t)}var h=o(345848);u(window),l.setMatchedHotkeyHandler((t=>{(0,h.trackEvent)("Keyboard Shortcuts",(0,n.humanReadableHash)(t))}))},345848:(t,e,o)=>{"use strict";o.d(e,{trackEvent:()=>a});var n=o(251954),i=o(495046);const r=(0,o(272001).getLogger)("Common.TrackEvent"),s=[/Study_(Drawing)_(.*)/,/(Study)_(.*)@tv-basicstudies/,/(Study)_(.*)/,/(Chart Style) (.*)/];let l=!1;const a=(t,e,o)=>{if(l)return;if(i.enabled("charting_library_base"))return void((t,e,o)=>{e=e||t||o||"";let i="";for(let t=0;t{"use strict";function n(t,e){return t<=e}function i(t,e){return t>=e}function r(t,e,o){return Math.min(Math.max(t,e),o)}function s(t){return t<0?-1:t>0?1:0}function l(t){if(t<0)return!1;if(t>1e18)return!0;for(let e=t;e>1;e/=10)if(e%10!=0)return!1;return!0}function a(t,e,o){return e-t<=o}function c(t,e,o){return Math.abs(t-e)e?1:0}function m(t,e=u){if(t.length<1)throw Error("array is empty");let o=t[0];for(let n=0;n0&&(o=t[n]);return o}function p(t){const e=Math.ceil(t);return e%2!=0?e-1:e}
function _(t){return t>0?Math.floor(t):Math.ceil(t)}o.r(e),o.d(e,{lessThan:()=>n,greaterThan:()=>i,clamp:()=>r,sign:()=>s,isBaseDecimal:()=>l,greaterOrEqual:()=>a,equal:()=>c,log10:()=>d,defComparator:()=>u,min:()=>m,max:()=>h,ceiledEven:()=>p,toInt:()=>_})},809350:(t,e,o)=>{t=o.nmd(t),TradingView.cleanButAmpersand=function(t,e){var o=e?["&"]:["&"];return TradingView.clean(t,e,o)},TradingView.strip_tags=function(t){return t&&t.replace?t.replace(/(<([^>]+)>)/gi,""):t},TradingView.encodeSpread=function(t){return encodeURIComponent(t)},TradingView.clean=function(t,e,o){var n=[["&","&"],["<","<"],[">",">"],['"',"""],["'","'"],["'","'"]],i=t;if(!t||!t.replace)return i;for(var r=0;r{"use strict";o.d(e,{parseHtml:()=>i,parseHtmlElement:()=>r});const n=new WeakMap;function i(t,e){let o,i;return o=null==e?document.documentElement:9===e.nodeType?e.documentElement:e,n&&(i=n.get(o)),i||(i=o.ownerDocument.createRange(),i.selectNodeContents(o),n&&n.set(o,i)),i.createContextualFragment(t)}function r(t,e){const o=i(t,e),n=o.firstElementChild;return null!==n&&o.removeChild(n),n}},587080:(t,e,o)=>{"use strict";function n(t){t.preventDefault()}o.d(e,{preventDefault:()=>n,preventDefaultForContextMenu:()=>r});const i=["input:not([type])",'input[type="text"]','input[type="email"]','input[type="password"]','input[type="search"]','input[type="number"]','input[type="url"]',"textarea","a[href]",'*[contenteditable="true"]',"[data-allow-context-menu]"];function r(t){const e=t.target;e&&!e.closest(i.join(", "))&&t.preventDefault()}}}]);