(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[69262,78775,79274],{598611:e=>{e.exports={"tv-spinner__container-rotate":"tv-spinner__container-rotate-aLqboHuu"}},129592:(e,t,i)=>{"use strict";i.d(t,{createGroup:()=>l,keyboardPressedKeysState:()=>a,pressedKeys:()=>s,registerWindow:()=>d,unregisterWindow:()=>u});var n=i(163586),r=i(764250);i(591800);const o=new n.ActionManager,s=o.pressedKeys(),a=o.keyboardPressedKeysState();function l(e){return new r.ActionGroup(o,e)}function d(e){o.listen(e)}function u(e){o.unlisten(e)}},685023:(e,t,i)=>{"use strict";i.d(t,{DEFAULT_SIZE:()=>n,spinnerSizeMap:()=>r});const n="large",r={mini:"xsmall",xxsmall:"xxsmall",xsmall:"xsmall",small:"small",medium:"medium",large:"large"}},500521:(e,t,i)=>{"use strict";e.exports.pushChartPage=async function(e){const{default:t}=await Promise.all([i.e(72456),i.e(71670),i.e(16240),i.e(69366),i.e(27157),i.e(16743),i.e(2511),i.e(86842),i.e(25977),i.e(90940),i.e(86),i.e(28813),i.e(34629)]).then(i.t.bind(i,55244,23)),n=new t.ChartPage(e);TradingView.historyManager.push(n)}},607436:(e,t,i)=>{"use strict";i.d(t,{DEFAULT_SIZE:()=>n.DEFAULT_SIZE,spinnerSizeMap:()=>n.spinnerSizeMap});var n=i(685023)},941285:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Spinner:()=>a,renderSpinnerTemplate:()=>o});i(598611);var n=i(571690),r=i(607436);function o(e=""){return`
`}const s=(0,n.parseHtmlElement)(o());class a{constructor(e){this._shown=!1,this._el=s.cloneNode(!0),this.setSize(r.spinnerSizeMap[e||r.DEFAULT_SIZE])}spin(e){return this._el.classList.add("tv-spinner--shown"),void 0===this._container&&(this._container=e,void 0!==e&&e.appendChild(this._el)),this._shown=!0,this}stop(e){return e&&void 0!==this._container&&this._container.removeChild(this._el),this._el&&this._el.classList.remove("tv-spinner--shown"),this._shown=!1,this}setStyle(e){return Object.keys(e).forEach((t=>{const i=e[t];void 0!==i&&this._el.style.setProperty(t,i)})),this}style(){return this._el.style}setSize(e){const t=void 0!==e?`tv-spinner--size_${e}`:"";return this._el.className=`tv-spinner ${t} ${this._shown?"tv-spinner--shown":""}`,this}getEl(){return this._el}destroy(){this.stop(),delete this._el,delete this._container}}},43464:(e,t,i)=>{"use strict";i.r(t),i.d(t,{bannerPrivacyPreferenceKey:()=>m,checkCookiePolicy:()=>I,checkCookiePolicyInLs:()=>w,cookieBannerDelegate:()=>_,cookieBannerDomain:()=>h,initCookiesNotification:()=>C,oldBannerKey:()=>p,onAccept:()=>T,removeOldCookieBannerKey:()=>y,setCookiePolicy:()=>S,showCookiesNotification:()=>b});var n=i(49437),r=i(314802),o=(i(659863),i(268222)),s=i(220563),a=i(261030),l=i(634786),d=i(66974),u=i(16188);const c=window.location.hostname.split("."),h=(0,d.isLocal)()?"":"."+c.slice(1,c.length).join("."),p="cookieBanner",m=(0,d.isProd)()?"cookiePrivacyPreferenceBannerProduction":"cookiePrivacyPreferenceBannerLocal",v="accepted",f="ignored",g="notApplicable",_=(0,o.createDeferredPromise)();function y(){return n.TVLocalStorage.removeItem(p)}function I(e){ return u.get(e)===v||u.get(e)===g}function w(e){return n.TVLocalStorage.getItem(e)===v||n.TVLocalStorage.getItem(e)===g}function T(){S(v)}function S(e){u.set(m,e,3653,"/",h)}let x=!1;async function b(){if(x)return;const{setCookieStageStatus:e}=await Promise.all([i.e(58768),i.e(38697),i.e(47821),i.e(7071),i.e(28128),i.e(8368),i.e(99031),i.e(59255),i.e(21041),i.e(43447),i.e(38869)]).then(i.bind(i,625551));x=!0;const t=await Promise.all([i.e(58768),i.e(38697),i.e(47821),i.e(7071),i.e(28128),i.e(8368),i.e(99031),i.e(59255),i.e(21041),i.e(43447),i.e(38869)]).then(i.bind(i,718463));await t.showCookiesNotification()&&(T(),(0,l.trackCookies)("click","accept_all")),e(!0),x=!1}const P=["/symbols"];async function C(){const{setCookieStageStatus:e}=await Promise.all([i.e(58768),i.e(38697),i.e(47821),i.e(7071),i.e(28128),i.e(8368),i.e(99031),i.e(59255),i.e(21041),i.e(43447),i.e(38869)]).then(i.bind(i,625551));if(I(m)||((0,r.isOnMobileAppPage)("any")||/^\/streams\/(.+)\/embed/.test(window.location.pathname)||/^\/widget-wizard\//.test(window.location.pathname)))e(!0);else{const i=document.querySelector(".js-main-page-promo-container"),n=P.find((e=>window.location.pathname.includes(e)));if(i||n||_.resolve(),n&&window.addEventListener("scroll",(function e(){window.scrollY>=.2*document.documentElement.scrollHeight&&(_.resolve(),window.removeEventListener("scroll",e))})),u.get(m)===f)return a.cookieSettingsReady.resolve(),_.promise.then((()=>b()));{const i=await(0,s.userGeoInfo)();if(i.is_in_european_union||(t=i.country_code,["is","li","no","gb"].includes(t)))return S(f),a.cookieSettingsReady.resolve(),_.promise.then((()=>b()));e(!0),S(g),(0,a.setCookieSetting)(a.CookieSettings.Analytics,!0),(0,a.setCookieSetting)(a.CookieSettings.Advertising,!0)}}var t;a.cookieSettingsReady.resolve()}},975420:(e,t,i)=>{"use strict";i.d(t,{trackTiming:()=>u});var n=i(251954),r=i(261030),o=i(588948),s=i(638456),a=i(691805);let l=!1;function d(){if(l)return;(0,o.updateInitData)();const e=(0,o.getInitData)();if(!e.gaId)return void(window.gtag=()=>{});l=!0,(0,a.appendScript)(`https://www.googletagmanager.com/gtag/js?id=${(0,o.getInitData)().gaId}`),window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},window.gtag("js",new Date);const t={anonymize_ip:!0};window.TVD&&(t.app_name="TVD",t.app_version=(0,s.desktopAppVersion)()),e.gaVars&&window.gtag("set",e.gaVars),window.gtag("consent","default",{analytics_storage:(0,r.getCookieSetting)(r.CookieSettings.Analytics)?"granted":"denied"}),window.gtag("config",e.gaId,t),n.subscribe(r.cookieSettingsChangeEvent,((e,t)=>{e===r.CookieSettings.Analytics&&window.gtag("consent","update",{analytics_storage:t?"granted":"denied"})}),null)}function u(e,t,i,n){d(),window.gtag("event","timing_complete",{name:t,value:i,event_category:e,event_label:n})}},207678:(e,t,i)=>{"use strict";i.d(t,{breakpoints:()=>n,mobileFirstBreakpoints:()=>r,mobileFirstLegacyBreakpoints:()=>o});const n={desktop:1/0,desktopHd:1919,phone:767,"phone-vertical":479,tablet:1019},r={base:0, "media-mf-phone-vertical":320,"media-mf-phone-landscape":568,"media-mf-tablet-vertical":768,"media-mf-tablet-landscape":1024,"media-mf-laptop":1280,"media-mf-desktop-medium":1440,"media-mf-desktop-large":1920,"media-mf-desktop-extra-large":2560},o={"media-mf-legacy-phone-vertical":330,"media-mf-legacy-phone":480,"media-mf-legacy-notebook":1020,"media-mf-legacy-desktop-medium":1480,"media-mf-legacy-desktop":1531}},76107:(e,t,i)=>{"use strict";i.d(t,{getCSSProperty:()=>a,getCSSPropertyNumericValue:()=>l,getContentWidth:()=>o,getScrollbarWidth:()=>n,matchMediaMinMax:()=>r,setStyle:()=>s});const n=(()=>{let e;return()=>{var t;if(void 0===e){const i=document.createElement("div"),n=i.style;n.visibility="hidden",n.width="100px",n.msOverflowStyle="scrollbar",document.body.appendChild(i);const r=i.offsetWidth;i.style.overflow="scroll";const o=document.createElement("div");o.style.width="100%",i.appendChild(o);const s=o.offsetWidth;null===(t=i.parentNode)||void 0===t||t.removeChild(i),e=r-s}return e}})();function r(e,t){return t===1/0?window.matchMedia(`(min-width: ${e}px)`):window.matchMedia(`(min-width: ${e}px) and (max-width: ${t}px)`)}function o(e){return l(e,"width")-l(e,"padding-left")-l(e,"padding-right")}function s(e,t,i){null!==e&&e.style.setProperty(t,i)}function a(e,t){return getComputedStyle(e,null).getPropertyValue(t)}function l(e,t){return parseInt(a(e,t))}},850775:(e,t,i)=>{"use strict";i.d(t,{mediaState:()=>d});var n=i(685459),r=i.n(n),o=i(49336),s=i(207678),a=i(76107);class l extends(r()){constructor(){super(),this.width=0,this.height=0,this.device=null,this.breakpoints=s.breakpoints,this._checkDevice(),window.addEventListener("resize",this._checkDevice),Object.entries(s.breakpoints).sort((([e,t],[i,n])=>t-n)).forEach((([e,t],i,n)=>{let r;if(0!==i){const[,e]=n[i-1];r=e+1}else r=0;const o=(0,a.matchMediaMinMax)(r,t);o.matches&&this._setNewDevice(e),o.addListener((t=>{t.matches&&(this._checkDevice(),this._setNewDevice(e))}))})),(0,o.whenDocumentReady)(this._checkDevice.bind(this)),this.isPhoneSizeDevice.bind(this)}isPhoneSizeDevice(){return"phone"===this.device||"phone-vertical"===this.device}_checkDevice(){this.width=window.innerWidth,this.height=window.innerHeight}_setNewDevice(e){const t=this.device;this.device=e,this.trigger("changeDevice",[e,t])}}const d=new l},197677:(e,t,i)=>{"use strict";i.d(t,{pineFacadeFetch:()=>h});var n=i(444372),r=i(120780),o=i(294142),s=i(881992),a=i(129586),l=i(175203),d=i(791488);function u(e,t){const i=new URL(function(e){return e.split("/").map((e=>encodeURIComponent(e))).join("/")}(e),(0,s.getPineFacadeUrl)());for(const e in t){const n=t[e];(0,a.isAbsentParam)(n)||i.searchParams.set(e,String(n))}return i.toString()}function c(e,t,i=!1){const n={method:e,mode:"cors"};return"POST"===e&&t&&(n.body=function(e){const t=new FormData;for(const i of Object.keys(e))t.append(i,e[i]);return t}(t)),i||(n.credentials="include"),n}async function h({urlPath:e,urlParams:t,data:s,withoutCredentials:a,method:h="GET"}){const p=u(e,t),m=c(h,s,a),v=function(e){ o.log.logNormal(`Requesting pine facade scripts, url: ${e}`);const t=e.split("/")[0],i=d.pineTelemetryGroups.get(t),n=Date.now();return t=>{const r=Date.now()-n;if(l.telemetry.sendReport("pine",`${i}_group_time_frame`,{value:r}),t)return l.telemetry.sendReport("pine",`${i}_group_ok`),void o.log.logNormal(`Requesting pine facade scripts finished, url: ${e}`);l.telemetry.sendReport("pine",`${i}_group_error`),o.log.logError(`Requesting pine facade scripts failed, url: ${e}`)}}(e);try{const e=await(0,r.fetch)(p,m);if(!e.ok)throw function(e){return e.status>=500?n.t(null,void 0,i(740920)):e.status>=413?n.t(null,void 0,i(434754)):e.status>=400?n.t(null,void 0,i(191421)):n.t(null,void 0,i(456670))}(e);const t=await e.json();return v(!0),t}catch(e){throw v(!1),e}}},175203:(e,t,i)=>{"use strict";i.d(t,{telemetry:()=>u});var n=i(707957),r=i(120780),o=i(638456),s=i(314802);i(659863);const a=(0,i(201089).getLogger)("Common.Telemetry"),l={default:15e3,site:3e5},d=["before_websocket_connection_time_frame","websocket_connection_time_frame","first_series_full_time_frame","page_full_load_time_frame","page_load_time_frame"];const u=new class{constructor(){this.reportSent=new n.Delegate,this.timeCounters={series:{marks:[]},study:{},pine:{}},this._timeoutIds={},this._commonAdditionalData={cluster:null,userId:"0"},this._reportStash={}}setSessionInfo(e){const t=this._parseCluster(e);null!==t&&(this._commonAdditionalData.cluster=t)}sendReport(e,t,i){var n;if(!this._isAbleToSendReport(t))return;const r=this._getSubserviceType(e),o=this._getHost(e,r);if(null!==o){if(i=void 0===i?{count:1}:i,this._addReportToStash(i,t,o),!this._timeoutIds[e]){const t=null!==(n=l[e])&&void 0!==n?n:l.default;this._timeoutIds[e]=setTimeout(this._sendTelemetryToService.bind(this,e,o),t)}}else a.logError(`Unable to get host for counter: ${t}, metric type: ${e}, serivce type: ${r}`)}sendChartReport(e,t,i=!0){this._sendServiceSpecifiedReport("charts",e,t,i)}sendLineToolsStorageReport(e,t,i=!0){this._sendServiceSpecifiedReport("line_tools_storage",e,t,i)}_sendServiceSpecifiedReport(e,t,i,n=!0){this._updateUserInfo(),i=void 0===i?{count:1}:i,n&&(i=this._appendCommonAdditionalInfo(i,["cluster","userId"])),this.sendReport(e,t,i)}_updateUserInfo(){const e="user"in window&&"id"in window.user?window.user.id:"0";this._commonAdditionalData.userId=String(e)}_isAbleToSendReport(e){const t=window.TELEMETRY_HOSTS,i=d.includes(e),n=Boolean(window.TradingView.onChartPage||(0,o.onWidget)());return t&&(!i||n)}_sendTelemetryToService(e,t){if(this._reportStash.hasOwnProperty(t)){const e=this._cropParams(this._reportStash[t]),i=this._renameAllParams(e),n={event:"report_stash",params:this._cleanAllParams(i)};a.logDebug(`Report to host: ${t}; stash: ${JSON.stringify(this._reportStash[t])}`),this.reportSent.fire(this._reportStash[t]),delete this._reportStash[t],(0,r.fetch)(`${t}/report`,{method:"POST",body:JSON.stringify(n)})}this._timeoutIds[e]=null}_getHost(e,t){const i=window.TELEMETRY_HOSTS,n=i[e]&&i[e][t];return Boolean(n)?n:null}_getSubserviceType(e){ if(!["charts","site"].includes(e))return"all";let t="free";const i=window.user.is_pro;return"charts"===e&&(0,s.isOnMobileAppPage)("old")?t=i?"ios_pro":"ios_free":"charts"===e&&(0,s.isOnMobileAppPage)("new")?t=i?"android_pro":"android_free":(0,o.onWidget)()?t="widget":i&&(t="pro"),t}_parseCluster(e){let t;try{t=JSON.parse(e).session_id}catch(e){return a.logError("Could not parse cluster id (session id)"),null}const i=/(.*@)(.*)/gi.exec(t);return null!==i&&i.length>=3?i[2]:null}_appendCommonAdditionalInfo(e,t){return t.forEach((t=>{t in this._commonAdditionalData&&(e.additional=e.additional||{},e.additional[t]=this._commonAdditionalData[t])})),e}_cropParams(e){var t;for(const i in e)e.hasOwnProperty(i)&&e[i].length>1e3&&(e.too_much_metrics_frame=null!==(t=e.too_much_metrics_frame)&&void 0!==t?t:[],e.too_much_metrics_frame.push({value:e[i].length,additional:{event:i}}),delete e[i]);return e}_renameAllParams(e){const t={};for(const i in e)e.hasOwnProperty(i)&&(t[i]=[],e[i].forEach((e=>{t[i].push(this._renameEntryParams(e))})));return t}_renameEntryParams(e){const t={count:"c",value:"v",text:"t",additional:"a"};return Object.keys(e).reduce(((i,n)=>(i[t[n]]=e[n],i)),{})}_cleanAllParams(e){const t={};for(const i in e)if(e.hasOwnProperty(i)){t[i]=[];const n={c:0};e[i].forEach((e=>{const r=this._cleanEntryParams(e),o=Object.keys(r).length;1===o&&void 0!==r.c?n.c+=r.c:o>0&&t[i].push(r)})),n.c>0&&t[i].push(n),0===t[i].length&&delete t[i]}return t}_cleanEntryParams(e){const t=Object.keys(e).reduce(((t,i)=>"c"!==i&&"t"!==i||e[i]?(t[i]=e[i],t):t),{});return"c"in t||"v"in t||"t"in t?t:{}}_addReportToStash(e,t,i){i in this._reportStash||(this._reportStash[i]={}),t in this._reportStash[i]||(this._reportStash[i][t]=[]),Object.keys(e).length>0&&this._reportStash[i][t].push(e)}}},61499:(e,t,i)=>{"use strict";var n;i.d(t,{StdTheme:()=>n}),function(e){e.Light="light",e.Dark="dark"}(n||(n={}))},226722:(e,t,i)=>{"use strict";i.d(t,{TVXWindowEvents:()=>s});i(586463);var n=i(201089),r=i(49437);const o=(0,n.getLogger)("XWindowEvents");var s;!function(e){const t="tvxwevents.",i={};let n;window.BroadcastChannel?(n=new BroadcastChannel("tvxwevents"),n.addEventListener("message",(function(e){const{data:{event:t,value:n}}=e;i[t]&&i[t].forEach((e=>{e(n)}))})),function(){const e=[],i=performance.now();for(let i=0;i{t(e.newValue)}));r.TVLocalStorage.removeItem(o)})),e.on=function(e,t){i[e]||(i[e]=[]),i[e].push(t) },e.off=function(e,t){if(!i[e])return;const n=i[e].indexOf(t);-1!==n&&(1===i[e].length?delete i[e]:i[e].splice(n,1))},e.emit=function(e,i=Date.now()){try{n?n.postMessage({event:e,value:i}):r.TVLocalStorage.setItem(t+e,i.toString())}catch(e){o.logError(e.message)}}}(s||(s={}))},279274:(e,t,i)=>{e.exports=[{value:"",name:"All Exchanges",desc:i.tf(null,void 0,i(18383)),flag:"",country:"",group:"AllExchanges",providerId:""},{value:"BISWAP",name:"Biswap v2 (BNB chain)",desc:i.tf(null,void 0,i(395526)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"biswap"},{value:"BITHUMB",name:"Bithumb",desc:i.tf(null,void 0,i(906984)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"bithumb"},{value:"BITKUB",name:"BITKUB",desc:i.tf(null,void 0,i(973073)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"bitkub"},{value:"BITRUE",name:"Bitrue",desc:i.tf(null,void 0,i(921076)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"bitrue"},{value:"BITMART",name:"Bitmart",desc:i.tf(null,void 0,i(193921)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"bitmart"},{value:"COINMETRICS",name:"Coin Metrics",desc:i.tf(null,void 0,i(476804)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"coinmetrics"},{value:"MEXC",name:"MEXC Global",desc:i.tf(null,void 0,i(42257)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"mexc"},{value:"GATEIO",name:"Gate.io",desc:i.tf(null,void 0,i(434055)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"gateio"},{value:"HTX",name:"HTX",desc:i.tf(null,void 0,i(380187)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"htx"},{value:"796",name:"796",desc:i.tf(null,void 0,i(883762)),flag:"bitcoin",group:"Cryptocurrency",hideInSymbolSearch:!0,country:"",providerId:""},{value:"DERIBIT",name:"Deribit",desc:i.tf(null,void 0,i(864518)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"deribit"},{value:"DEFILLAMA",name:"Defi Llama",desc:i.tf(null,void 0,i(70240)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"defillama"},{value:"GLASSNODE",name:"Glassnode",desc:i.tf(null,void 0,i(934859)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"glassnode"},{value:"OKX",name:"OKX",desc:i.tf(null,void 0,i(308995)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"okx"},{value:"OSMOSIS",name:"Osmosis",desc:i.tf(null,void 0,i(220606)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"osmosis"},{value:"PANGOLIN",name:"Pangolin v2 (Avalanche)",desc:i.tf(null,void 0,i(802948)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"pangolin"},{value:"PANCAKESWAP",name:"PancakeSwap v2 (BNB chain)",desc:i.tf(null,void 0,i(587129)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"pancakeswap"},{value:"PIONEX",name:"Pionex",desc:i.tf(null,void 0,i(392381)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"pionex"},{value:"PYTH",name:"Pyth",desc:i.tf(null,void 0,i(403221)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"pyth"},{value:"SPOOKYSWAP", name:"SpookySwap v2 (Fantom)",desc:i.tf(null,void 0,i(245708)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"spookyswap"},{value:"WAGYUSWAP",name:"WagyuSwap v2 (Velas)",desc:i.tf(null,void 0,i(20582)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"wagyuswap"},{value:"WHITEBIT",name:"WhiteBIT",desc:i.tf(null,void 0,i(592774)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"whitebit"},{value:"WOONETWORK",name:"WOO",desc:i.tf(null,void 0,i(839751)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"woonetwork"},{value:"DYDX",name:"dYdX",desc:i.tf(null,void 0,i(105453)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"dydx"},{value:"VERSEETH",name:"Verse (Ethereum)",desc:i.tf(null,void 0,i(173335)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"verseeth"},{value:"VOLMEX",name:"Volmex",desc:i.tf(null,void 0,i(620656)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"volmex"},{value:"ZOOMEX",name:"Zoomex",desc:i.tf(null,void 0,i(825619)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"zoomex"},{value:"ADX",name:"ADX",desc:i.tf(null,void 0,i(936934)),flag:"ae",group:"Middle East / Africa",country:"ae",providerId:"",searchTerms:[i.tf(null,void 0,i(975308)),i.tf(null,void 0,i(287916))]},{value:"DFM",name:"DFM",desc:i.tf(null,void 0,i(535232)),flag:"ae",group:"Middle East / Africa",country:"ae",providerId:"",searchTerms:[i.tf(null,void 0,i(975308)),i.tf(null,void 0,i(287916))]},{value:"NASDAQDUBAI",name:"NASDAQ",desc:i.tf(null,void 0,i(229359)),flag:"ae",group:"Middle East / Africa",country:"ae",priorityInGroup:1,providerId:"",searchTerms:[i.tf(null,void 0,i(975308)),i.tf(null,void 0,i(287916))]},{value:"LSE",name:"LSE",desc:i.tf(null,void 0,i(454623)),flag:"uk",group:"Europe",country:"uk",providerId:"",searchTerms:[i.tf(null,void 0,i(846792)),i.tf(null,void 0,i(606994))]},{value:"LME",name:"LME",desc:i.tf(null,void 0,i(21353)),flag:"uk",group:"Europe",country:"uk",providerId:"",searchTerms:[i.tf(null,void 0,i(846792)),i.tf(null,void 0,i(606994))]},{value:"LSIN",name:"LSIN",desc:i.tf(null,void 0,i(249934)),flag:"uk",group:"Europe",country:"uk",providerId:"",searchTerms:[i.tf(null,void 0,i(846792)),i.tf(null,void 0,i(606994))]},{value:"TURQUOISE",name:"Turquoise",desc:i.tf(null,void 0,i(258419)),flag:"uk",group:"Europe",country:"uk",providerId:"",searchTerms:[i.tf(null,void 0,i(846792)),i.tf(null,void 0,i(606994))]},{value:"FTSE",name:"FTSE",desc:i.tf(null,void 0,i(749711)),flag:"uk",group:"Europe",country:"uk",providerId:"",searchTerms:[i.tf(null,void 0,i(846792)),i.tf(null,void 0,i(606994))]},{value:"EUREX",name:"EUREX",desc:i.tf(null,void 0,i(376029)),flag:"europe",group:"Europe",country:"eu",providerId:""},{value:"MGEX",name:"MGEX",desc:i.tf(null,void 0,i(14406)),flag:"usa",hideInSymbolSearch:!0,group:"North America",country:"us",providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"NASDAQ",name:"NASDAQ",desc:i.tf(null,void 0,i(227691)),flag:"usa",group:"North America",country:"us", priorityInGroup:1,providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"NYSE",name:"NYSE",desc:i.tf(null,void 0,i(872667)),flag:"usa",group:"North America",country:"us",priorityInGroup:2,providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"AMEX",name:"Arca",desc:i.tf(null,void 0,i(468841)),flag:"usa",group:"North America",country:"us",priorityInGroup:3,providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"OTC",name:"OTC",desc:i.tf(null,void 0,i(448920)),flag:"usa",group:"North America",country:"us",priorityInGroup:4,providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"DJ",name:"DJ",desc:i.tf(null,void 0,i(623778)),flag:"usa",group:"North America",country:"us",priorityInGroup:5,providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"SP",name:"SP",desc:i.tf(null,void 0,i(662397)),flag:"usa",group:"North America",country:"us",priorityInGroup:6,providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"CBOE",name:"CBOE",desc:i.tf(null,void 0,i(1596)),flag:"usa",group:"North America",country:"us",priorityInGroup:7,providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"CBOEEU",name:"CBOE EU",desc:i.tf(null,void 0,i(975674)),flag:"europe",group:"Europe",country:"eu",providerId:""},{value:"CBOT",name:"CBOT",desc:i.tf(null,void 0,i(581563)),flag:"usa",group:"North America",country:"us",priorityInGroup:8,providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"CME",name:"CME GLOBEX",desc:i.tf(null,void 0,i(425193)),flag:"usa",group:"North America",country:"us",priorityInGroup:9,providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"COMEX",name:"COMEX",desc:i.tf(null,void 0,i(584533)),flag:"usa",group:"North America",country:"us",priorityInGroup:10,providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"NYMEX",name:"NYMEX",desc:i.tf(null,void 0,i(336499)),flag:"usa",group:"North America",country:"us",priorityInGroup:11,providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"ICEUS",name:"ICEUS",desc:i.tf(null,void 0,i(403509)),flag:"usa",group:"North America",country:"us",priorityInGroup:12,providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"FAIRX",name:"FairX",desc:i.tf(null,void 0,i(187464)),flag:"usa",group:"North America",country:"us",priorityInGroup:13,providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"CSE",name:"CSE",desc:i.tf(null,void 0,i(465782)),flag:"canada",group:"North America",country:"ca",priorityInGroup:13,providerId:"",searchTerms:[i.tf(null,void 0,i(280206))]},{value:"NEO",name:"NEO",desc:i.tf(null,void 0,i(278436)),flag:"canada",group:"North America",country:"ca",priorityInGroup:14,providerId:"", searchTerms:[i.tf(null,void 0,i(280206))]},{value:"TSX",name:"TSX",desc:i.tf(null,void 0,i(949042)),flag:"canada",group:"North America",country:"ca",priorityInGroup:15,providerId:"",searchTerms:[i.tf(null,void 0,i(280206))]},{value:"TSXV",name:"TSXV",desc:i.tf(null,void 0,i(12815)),flag:"canada",group:"North America",country:"ca",priorityInGroup:16,providerId:"",searchTerms:[i.tf(null,void 0,i(280206))]},{value:"MOEX",name:"MOEX",desc:i.tf(null,void 0,i(73467)),flag:"russia",group:"Europe",country:"ru",providerId:"",searchTerms:[i.tf(null,void 0,i(238201))]},{value:"MYX",name:"MYX",desc:i.tf(null,void 0,i(887964)),flag:"malaysia",group:"Asia / Pacific",country:"my",providerId:"",searchTerms:[i.tf(null,void 0,i(622622))]},{value:"FTSEMYX",name:"FTSE",desc:i.tf(null,void 0,i(40698)),flag:"malaysia",group:"Asia / Pacific",country:"my",providerId:"",searchTerms:[i.tf(null,void 0,i(622622))]},{value:"HOSE",name:"HOSE",desc:i.tf(null,void 0,i(34416)),flag:"vietnam",group:"Asia / Pacific",country:"vn",providerId:"",searchTerms:[i.tf(null,void 0,i(450049))]},{value:"HNX",name:"HNX",desc:i.tf(null,void 0,i(653194)),flag:"vietnam",group:"Asia / Pacific",country:"vn",providerId:"",searchTerms:[i.tf(null,void 0,i(450049))]},{value:"UPCOM",name:"HNX UPCoM",desc:i.tf(null,void 0,i(696591)),flag:"vietnam",group:"Asia / Pacific",country:"vn",providerId:"",searchTerms:[i.tf(null,void 0,i(450049))]},{value:"CSELK",name:"CSE",desc:i.tf(null,void 0,i(429971)),flag:"sri_lanka",group:"Asia / Pacific",country:"lk",providerId:"",searchTerms:[i.tf(null,void 0,i(567835))]},{value:"BITSTAMP",name:"Bitstamp",desc:i.tf(null,void 0,i(42285)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"bitstamp"},{value:"ACTIVTRADES",name:"ActivTrades",desc:i.tf(null,void 0,i(34342)),flag:"forex",group:"Forex",country:"",providerId:"activtrades"},{value:"AFTERPRIME",name:"Afterprime",desc:i.tf(null,void 0,i(268986)),flag:"forex",group:"Forex",country:"",providerId:"afterprime"},{value:"BLACKBULL",name:"BlackBull Markets",desc:i.tf(null,void 0,i(802620)),flag:"forex",group:"Forex",country:"",providerId:"blackbullmarkets"},{value:"FPMARKETS",name:"FP Markets",desc:i.tf(null,void 0,i(382398)),flag:"forex",group:"Forex",country:"",providerId:"fpmarkets"},{value:"FUSIONMARKETS",name:"Fusion Markets",desc:i.tf(null,void 0,i(488869)),flag:"forex",group:"Forex",country:"",providerId:"fusionmarkets"},{value:"VANTAGE",name:"Vantage",desc:i.tf(null,void 0,i(606582)),flag:"forex",group:"Forex",country:"",providerId:"vantagefx"},{value:"VELOCITY",name:"Velocity Trade",desc:i.tf(null,void 0,i(650469)),flag:"forex",group:"Forex",country:"",providerId:"velocitytrade"},{value:"FX",name:"FXCM",desc:i.tf(null,void 0,i(592901)),flag:"forex",group:"Forex",country:"",providerId:"fxcm"},{value:"FXOPEN",name:"FXOpen",desc:i.tf(null,void 0,i(638398)),flag:"forex",group:"Forex",country:"",providerId:"fxopen"},{value:"EIGHTCAP",name:"Eightcap",desc:i.tf(null,void 0,i(910807)),flag:"forex",group:"Forex",country:"",providerId:"eightcap"},{value:"BTCE",name:"BTC-e", desc:i.tf(null,void 0,i(675334)),flag:"bitcoin",group:"Cryptocurrency",hideInSymbolSearch:!0,country:"",providerId:""},{value:"HONEYSWAP",name:"Honeyswap v2 (xDai)",desc:i.tf(null,void 0,i(776649)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"honeyswap"},{value:"HONEYSWAPPOLYGON",name:"Honeyswap v2 (Polygon)",desc:i.tf(null,void 0,i(703053)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"honeyswap"},{value:"BSE",name:"BSE",desc:i.tf(null,void 0,i(799931)),flag:"india",group:"Asia / Pacific",country:"in",providerId:"",searchTerms:[i.tf(null,void 0,i(16207))]},{value:"MSEI",name:"MSE",desc:i.tf(null,void 0,i(693081)),flag:"india",group:"Asia / Pacific",country:"in",providerId:"",searchTerms:[i.tf(null,void 0,i(16207))]},{value:"NYMEX_MINI",name:"NYMEX",desc:i.tf(null,void 0,i(336499)),flag:"usa",group:"North America",hideInSymbolSearch:!0,country:"us",providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"COMEX_MINI",name:"COMEX",desc:i.tf(null,void 0,i(584533)),flag:"usa",group:"North America",hideInSymbolSearch:!0,country:"us",providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"ICEEURFIN",name:"ICEEUR",desc:i.tf(null,void 0,i(845951)),flag:"europe",group:"Europe",country:"eu",providerId:""},{value:"ICEEURCOMM",name:"ICEEUR",desc:i.tf(null,void 0,i(166982)),flag:"europe",group:"Europe",country:"eu",providerId:""},{value:"NSE",name:"NSE",desc:i.tf(null,void 0,i(803867)),flag:"india",group:"Asia / Pacific",country:"in",providerId:"",searchTerms:[i.tf(null,void 0,i(16207))]},{value:"MCX",name:"MCX",desc:i.tf(null,void 0,i(753577)),flag:"india",group:"Asia / Pacific",country:"in",providerId:"",searchTerms:[i.tf(null,void 0,i(16207))]},{value:"NCDEX",name:"NCDEX",desc:i.tf(null,void 0,i(915091)),flag:"india",group:"Asia / Pacific",country:"in",providerId:"",searchTerms:[i.tf(null,void 0,i(16207))]},{value:"KCBT",name:"KCBT",desc:i.tf(null,void 0,i(610871)),flag:"usa",hideInSymbolSearch:!0,group:"North America",country:"us",providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"OKCOIN",name:"OKCoin",desc:i.tf(null,void 0,i(798361)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"okcoin"},{value:"CBOT_MINI",name:"CBOT",desc:i.tf(null,void 0,i(581563)),flag:"usa",group:"North America",hideInSymbolSearch:!0,country:"us",providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"KRAKEN",name:"Kraken",desc:i.tf(null,void 0,i(961932)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"kraken"},{value:"KUCOIN",name:"KuCoin",desc:i.tf(null,void 0,i(850627)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"kucoin"},{value:"XEXCHANGE",name:"xExchange",desc:i.tf(null,void 0,i(734830)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"xexchange"},{value:"CME_MINI",name:"CME",desc:i.tf(null,void 0,i(425193)),flag:"usa",group:"North America",hideInSymbolSearch:!0,country:"us",providerId:"", searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"DJ",name:"DJ",desc:i.tf(null,void 0,i(973151)),flag:"usa",hideInSymbolSearch:!0,group:"North America",country:"us",providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"SP",name:"SP",desc:i.tf(null,void 0,i(869919)),flag:"usa",hideInSymbolSearch:!0,group:"North America",country:"us",providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"BTCCHINA",name:"BTC China",desc:i.tf(null,void 0,i(599193)),flag:"bitcoin",group:"Cryptocurrency",hideInSymbolSearch:!0,country:"",providerId:""},{value:"TIMEX",name:"TimeX",desc:i.tf(null,void 0,i(773557)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"timex"},{value:"ANX",name:"ANX",desc:i.tf(null,void 0,i(198372)),flag:"bitcoin",group:"Cryptocurrency",hideInSymbolSearch:!0,country:"",providerId:""},{value:"MEXBT",name:"meXBT",desc:i.tf(null,void 0,i(668490)),flag:"bitcoin",group:"Cryptocurrency",hideInSymbolSearch:!0,country:"",providerId:""},{value:"GEMINI",name:"Gemini",desc:i.tf(null,void 0,i(201367)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"gemini"},{value:"BITVC",name:"BitVC",desc:i.tf(null,void 0,i(357531)),flag:"bitcoin",group:"Cryptocurrency",hideInSymbolSearch:!0,country:"",providerId:""},{value:"BITYES",name:"BitYes",desc:i.tf(null,void 0,i(945663)),flag:"bitcoin",group:"Cryptocurrency",hideInSymbolSearch:!0,country:"",providerId:""},{value:"BITFLYER",name:"bitFlyer",desc:i.tf(null,void 0,i(704862)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"bitflyer"},{value:"BYBIT",name:"Bybit",desc:i.tf(null,void 0,i(801800)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"bybit"},{value:"BITMEX",name:"BitMEX",desc:i.tf(null,void 0,i(890561)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"bitmex"},{value:"CAPITALCOM",name:"Capital.com",desc:i.tf(null,void 0,i(148674)),flag:"forex",group:"Forex",country:"",providerId:"capitalcom"},{value:"CFI",name:"CFI",desc:i.tf(null,void 0,i(730317)),flag:"forex",group:"Forex",country:"",providerId:"cfifinancial"},{value:"COINEX",name:"CoinEx",desc:i.tf(null,void 0,i(328681)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"coinex"},{value:"EXMO",name:"EXMO",desc:i.tf(null,void 0,i(924753)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"exmo2"},{value:"INTOTHEBLOCK",name:"IntoTheBlock",desc:i.tf(null,void 0,i(830996)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"intotheblock"},{value:"EASYMARKETS",name:"easyMarkets",desc:i.tf(null,void 0,i(339210)),flag:"forex",group:"Forex",country:"",providerId:"easymarkets"},{value:"FOREXCOM",name:"FOREX.com",desc:i.tf(null,void 0,i(395068)),flag:"forex",group:"Forex",country:"",providerId:"gain"},{value:"FX_IDC",name:"ICE",desc:i.tf(null,void 0,i(89446)),flag:"forex",group:"Forex",country:"",providerId:"ice"},{value:"IBKR",name:"Interactive Brokers",desc:i.tf(null,void 0,i(508662)),flag:"forex",group:"Forex",country:"",providerId:"ibkr"},{ value:"IBROKER",name:"iBroker",desc:i.tf(null,void 0,i(51966)),flag:"forex",group:"Forex",country:"",providerId:"ibroker"},{value:"ICMARKETS",name:"IC Markets",desc:i.tf(null,void 0,i(81698)),flag:"forex",group:"Forex",country:"",providerId:"icmarkets"},{value:"BITFINEX",name:"Bitfinex",desc:i.tf(null,void 0,i(572762)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"bitfinex"},{value:"MTGOX",name:"Mt.Gox",desc:i.tf(null,void 0,i(808754)),flag:"bitcoin",group:"Cryptocurrency",hideInSymbolSearch:!0,country:"",providerId:"mtgox"},{value:"PHEMEX",name:"Phemex",desc:i.tf(null,void 0,i(972718)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"phemex"},{value:"POLONIEX",name:"Poloniex",desc:i.tf(null,void 0,i(311014)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"poloniex"},{value:"QUICKSWAP",name:"QuickSwap v2 (Polygon)",desc:i.tf(null,void 0,i(523815)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"quickswap"},{value:"SUSHISWAP",name:"SushiSwap v2 (Ethereum)",desc:i.tf(null,void 0,i(691727)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"sushiswap"},{value:"SUSHISWAPPOLYGON",name:"SushiSwap v2 (Polygon)",desc:i.tf(null,void 0,i(276133)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"sushiswap"},{value:"TRADERJOE",name:"Trader Joe v2 (Avalanche)",desc:i.tf(null,void 0,i(923068)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"traderjoe"},{value:"UNISWAP",name:"Uniswap v2 (Ethereum)",desc:i.tf(null,void 0,i(725990)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"uniswap"},{value:"UNISWAP3ETH",name:"Uniswap v3 (Ethereum)",desc:i.tf(null,void 0,i(670485)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"uniswap3"},{value:"UNISWAP3POLYGON",name:"Uniswap v3 (Polygon)",desc:i.tf(null,void 0,i(96266)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"uniswap3"},{value:"UNISWAP3ARBITRUM",name:"Uniswap v3 (Arbitrum)",desc:i.tf(null,void 0,i(419861)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"uniswap3"},{value:"UNISWAP3OPTIMISM",name:"Uniswap v3 (Optimism)",desc:i.tf(null,void 0,i(754635)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"uniswap3"},{value:"UPBIT",name:"UpBit",desc:i.tf(null,void 0,i(310430)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"upbit"},{value:"BINGX",name:"BingX",desc:i.tf(null,void 0,i(932032)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"bingx"},{value:"BTSE",name:"BTSE",desc:i.tf(null,void 0,i(621363)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"btse"},{value:"BITTREX",name:"Bittrex",desc:i.tf(null,void 0,i(611622)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"bittrex"},{value:"BINANCE",name:"Binance",desc:i.tf(null,void 0,i(778260)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"binance"},{value:"BITGET",name:"Bitget",desc:i.tf(null,void 0,i(151805)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"bitget"},{value:"BINANCEUS",name:"Binance US", desc:i.tf(null,void 0,i(376868)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"binance"},{value:"DELTA",name:"Delta",desc:i.tf(null,void 0,i(527223)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"delta"},{value:"BLOFIN",name:"Blofin",desc:i.tf(null,void 0,i(429494)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"blofin"},{value:"BNC",name:"Brave New Coin",desc:i.tf(null,void 0,i(46336)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"bnc"},{value:"BCBA",name:"BYMA",desc:i.tf(null,void 0,i(731613)),flag:"argentina",group:"Mexico and South America",country:"ar",providerId:"",searchTerms:[i.tf(null,void 0,i(834742))]},{value:"MATBAROFEX",name:"ROFEX",desc:i.tf(null,void 0,i(477911)),flag:"argentina",group:"Mexico and South America",country:"ar",providerId:"",searchTerms:[i.tf(null,void 0,i(834742))]},{value:"BMFBOVESPA",name:"B3",desc:i.tf(null,void 0,i(866247)),flag:"brasil",group:"Mexico and South America",country:"br",providerId:"",searchTerms:[i.tf(null,void 0,i(228867))]},{value:"BMV",name:"BMV",desc:i.tf(null,void 0,i(203947)),flag:"mexico",group:"Mexico and South America",country:"mx",providerId:"",searchTerms:[i.tf(null,void 0,i(555087))]},{value:"BIVA",name:"BIVA",desc:i.tf(null,void 0,i(219594)),flag:"mexico",group:"Mexico and South America",country:"mx",providerId:"",searchTerms:[i.tf(null,void 0,i(555087))]},{value:"BVL",name:"BVL",desc:i.tf(null,void 0,i(505138)),flag:"peru",group:"Mexico and South America",country:"pe",providerId:"",searchTerms:[i.tf(null,void 0,i(622979))]},{value:"BCS",name:"SSE",desc:i.tf(null,void 0,i(949722)),flag:"chile",group:"Mexico and South America",country:"cl",providerId:"",searchTerms:[i.tf(null,void 0,i(141840))]},{value:"BVC",name:"BVC",desc:i.tf(null,void 0,i(388142)),flag:"colombia",group:"Mexico and South America",country:"co",providerId:"",searchTerms:[i.tf(null,void 0,i(731144))]},{value:"BVCV",name:"BVC",desc:i.tf(null,void 0,i(478271)),flag:"venezuela",group:"Mexico and South America",country:"ve",providerId:"",searchTerms:[i.tf(null,void 0,i(739055))]},{value:"NAG",name:"NSE",desc:i.tf(null,void 0,i(862549)),flag:"japan",group:"Asia / Pacific",country:"jp",providerId:"",searchTerms:[i.tf(null,void 0,i(692443))]},{value:"TSE",name:"TSE",desc:i.tf(null,void 0,i(453617)),flag:"japan",group:"Asia / Pacific",country:"jp",providerId:"",searchTerms:[i.tf(null,void 0,i(692443))]},{value:"TFEX",name:"TFEX",desc:i.tf(null,void 0,i(197400)),flag:"thailand",group:"Asia / Pacific",country:"th",providerId:"",searchTerms:[i.tf(null,void 0,i(433138))]},{value:"TFX",name:"TFX",desc:i.tf(null,void 0,i(753572)),flag:"japan",group:"Asia / Pacific",country:"jp",providerId:"",searchTerms:[i.tf(null,void 0,i(692443))]},{value:"TOCOM",name:"TOCOM",desc:i.tf(null,void 0,i(30453)),flag:"japan",group:"Asia / Pacific",country:"jp",providerId:"",searchTerms:[i.tf(null,void 0,i(692443))]},{value:"OSE",name:"OSE",desc:i.tf(null,void 0,i(517199)),flag:"japan",group:"Asia / Pacific",country:"jp",providerId:"", searchTerms:[i.tf(null,void 0,i(692443))]},{value:"SGX",name:"SGX",desc:i.tf(null,void 0,i(919973)),flag:"singapore",group:"Asia / Pacific",country:"sg",providerId:"",searchTerms:[i.tf(null,void 0,i(156683))]},{value:"ICESG",name:"ICE Futures Singapore",desc:i.tf(null,void 0,i(448044)),flag:"singapore",group:"Asia / Pacific",country:"sg",providerId:"",searchTerms:[i.tf(null,void 0,i(156683))]},{value:"FTSEST",name:"FTSE ST",desc:i.tf(null,void 0,i(582927)),flag:"singapore",group:"Asia / Pacific",country:"sg",providerId:"",searchTerms:[i.tf(null,void 0,i(156683))]},{value:"SAPSE",name:"SSE",desc:i.tf(null,void 0,i(253961)),flag:"japan",group:"Asia / Pacific",country:"jp",providerId:"",searchTerms:[i.tf(null,void 0,i(692443))]},{value:"FSE",name:"FSE",desc:i.tf(null,void 0,i(461659)),flag:"japan",group:"Asia / Pacific",country:"jp",providerId:"",searchTerms:[i.tf(null,void 0,i(692443))]},{value:"TPEX",name:"TPEx",desc:i.tf(null,void 0,i(215751)),flag:"taiwan",group:"Asia / Pacific",country:"tw",providerId:"",searchTerms:[i.tf(null,void 0,i(460919))]},{value:"TAIFEX",name:"TAIFEX",desc:i.tf(null,void 0,i(686094)),flag:"taiwan",group:"Asia / Pacific",country:"tw",providerId:"",searchTerms:[i.tf(null,void 0,i(460919))]},{value:"TWSE",name:"TWSE",desc:i.tf(null,void 0,i(974013)),flag:"taiwan",group:"Asia / Pacific",country:"tw",providerId:"",searchTerms:[i.tf(null,void 0,i(460919))]},{value:"SET",name:"SET",desc:i.tf(null,void 0,i(905107)),flag:"thailand",group:"Asia / Pacific",country:"th",providerId:"",searchTerms:[i.tf(null,void 0,i(433138))]},{value:"KRX",name:"KRX",desc:i.tf(null,void 0,i(116699)),flag:"south_korea",group:"Asia / Pacific",country:"kr",providerId:"",searchTerms:[i.tf(null,void 0,i(173160))]},{value:"BAHRAIN",name:"BHB",desc:i.tf(null,void 0,i(98343)),flag:"bahrain",group:"Middle East / Africa",country:"bh",providerId:"",searchTerms:[i.tf(null,void 0,i(53260))]},{value:"KSE",name:"KSE",desc:i.tf(null,void 0,i(542319)),flag:"kuwait",group:"Middle East / Africa",country:"kw",providerId:"",searchTerms:[i.tf(null,void 0,i(872374))]},{value:"CSECY",name:"CSE",desc:i.tf(null,void 0,i(4287)),flag:"cyprus",group:"Europe",country:"cy",providerId:"",searchTerms:[i.tf(null,void 0,i(551017))]},{value:"BVMT",name:"BVMT",desc:i.tf(null,void 0,i(923628)),flag:"tunisia",group:"Middle East / Africa",country:"tn",providerId:"",searchTerms:[i.tf(null,void 0,i(420638))]},{value:"ATHEX",name:"ATHEX",desc:i.tf(null,void 0,i(852002)),flag:"greece",group:"Europe",country:"gr",providerId:""},{value:"BELEX",name:"BELEX",desc:i.tf(null,void 0,i(525246)),flag:"serbia",group:"Europe",country:"rs",providerId:"",searchTerms:[i.tf(null,void 0,i(896573))]},{value:"EGX",name:"EGX",desc:i.tf(null,void 0,i(493792)),flag:"egypt",group:"Middle East / Africa",country:"eg",providerId:"",searchTerms:[i.tf(null,void 0,i(205390))]},{value:"TADAWUL",name:"Tadawul",desc:i.tf(null,void 0,i(401175)),flag:"saudi_arabia",group:"Middle East / Africa",country:"sa",providerId:"",searchTerms:[i.tf(null,void 0,i(936261))]},{value:"CSEMA",name:"CSE", desc:i.tf(null,void 0,i(88329)),flag:"morocco",group:"Middle East / Africa",country:"ma",providerId:"",searchTerms:[i.tf(null,void 0,i(216641))]},{value:"IDX",name:"IDX",desc:i.tf(null,void 0,i(75088)),flag:"indonesia",group:"Asia / Pacific",country:"id",providerId:"",searchTerms:[i.tf(null,void 0,i(609759))]},{value:"HSI",name:"HSI",desc:i.tf(null,void 0,i(259952)),flag:"hong_kong",group:"Asia / Pacific",country:"hk",providerId:"",searchTerms:[i.tf(null,void 0,i(532918))]},{value:"QSE",name:"QSE",desc:i.tf(null,void 0,i(844449)),flag:"qatar",group:"Middle East / Africa",country:"qa",providerId:"",searchTerms:[i.tf(null,void 0,i(619056))]},{value:"OANDA",name:"OANDA",desc:i.tf(null,void 0,i(398585)),flag:"forex",group:"Forex",country:"",providerId:"oanda"},{value:"SAXO",name:"Saxo",desc:i.tf(null,void 0,i(780276)),flag:"forex",group:"Forex",country:"",providerId:"saxobank"},{value:"PEPPERSTONE",name:"Pepperstone",desc:i.tf(null,void 0,i(341557)),flag:"forex",group:"Forex",country:"",providerId:"pepperstone"},{value:"PHILLIPNOVA",name:"Phillip Nova",desc:i.tf(null,void 0,i(574893)),flag:"forex",group:"Forex",country:"",providerId:"phillipnova"},{value:"SKILLING",name:"SKILLING",desc:i.tf(null,void 0,i(434119)),flag:"forex",group:"Forex",country:"",providerId:"skilling"},{value:"SPREADEX",name:"Spreadex",desc:i.tf(null,void 0,i(822963)),flag:"forex",group:"Forex",country:"",providerId:"spreadex"},{value:"GBEBROKERS",name:"GBE brokers",desc:i.tf(null,void 0,i(512579)),flag:"forex",group:"Forex",country:"",providerId:"gbebrokers"},{value:"EURONEXT",name:"Euronext",desc:i.tf(null,void 0,i(70082)),flag:"europe",group:"Europe",country:"eu",providerId:""},{value:"EURONEXTAMS",name:"EURONEXTAMS",desc:i.tf(null,void 0,i(841444)),flag:"netherlands",group:"Europe",country:"nl",providerId:"",searchTerms:[i.tf(null,void 0,i(353770))]},{value:"EURONEXTBRU",name:"EURONEXTBRU",desc:i.tf(null,void 0,i(166201)),flag:"belgium",group:"Europe",country:"be",providerId:"",searchTerms:[i.tf(null,void 0,i(637653))]},{value:"EURONEXTLIS",name:"EURONEXTLIS",desc:i.tf(null,void 0,i(232729)),flag:"portugal",group:"Europe",country:"pt",providerId:"",searchTerms:[i.tf(null,void 0,i(123496))]},{value:"EURONEXTPAR",name:"EURONEXTPAR",desc:i.tf(null,void 0,i(515894)),flag:"france",group:"Europe",country:"fr",providerId:"",searchTerms:[i.tf(null,void 0,i(696013))]},{value:"OSL",name:"EURONEXTOSE",desc:i.tf(null,void 0,i(255361)),flag:"norway",group:"Europe",country:"no",providerId:"",searchTerms:[i.tf(null,void 0,i(145075))]},{value:"OMX",name:"OMX",desc:i.tf(null,void 0,i(74125)),flag:"europe",group:"Europe",country:"eu",providerId:""},{value:"FWB",name:"FWB",desc:i.tf(null,void 0,i(670183)),flag:"germany",group:"Europe",country:"de",providerId:"",searchTerms:[i.tf(null,void 0,i(159985))]},{value:"FRA",name:"FRA",desc:i.tf(null,void 0,i(551785)),flag:"germany",hideInSymbolSearch:!0,group:"Europe",country:"de",providerId:"",searchTerms:[i.tf(null,void 0,i(159985))]},{value:"SWB",name:"SWB",desc:i.tf(null,void 0,i(17644)),flag:"germany",group:"Europe", country:"de",providerId:"",searchTerms:[i.tf(null,void 0,i(159985))]},{value:"XETR",name:"XETR",desc:i.tf(null,void 0,i(141173)),flag:"germany",group:"Europe",country:"de",providerId:"",searchTerms:[i.tf(null,void 0,i(159985))]},{value:"BME",name:"BME",desc:i.tf(null,void 0,i(889143)),flag:"spain",group:"Europe",country:"es",providerId:"",searchTerms:[i.tf(null,void 0,i(792334))]},{value:"BSSE",name:"BSSE",desc:i.tf(null,void 0,i(433137)),flag:"slovakia",group:"Europe",country:"sk",providerId:"",searchTerms:[i.tf(null,void 0,i(506262))]},{value:"BVB",name:"BVB",desc:i.tf(null,void 0,i(273573)),flag:"romania",group:"Europe",country:"ro",providerId:"",searchTerms:[i.tf(null,void 0,i(385646))]},{value:"BET",name:"BET",desc:i.tf(null,void 0,i(386479)),flag:"hungary",group:"Europe",country:"hu",providerId:"",searchTerms:[i.tf(null,void 0,i(930646))]},{value:"GPW",name:"GPW",desc:i.tf(null,void 0,i(128008)),flag:"poland",group:"Europe",country:"pl",providerId:"",searchTerms:[i.tf(null,void 0,i(210119))]},{value:"NEWCONNECT",name:"GPW — NewConnect",desc:i.tf(null,void 0,i(253127)),flag:"poland",group:"Europe",country:"pl",providerId:"",searchTerms:[i.tf(null,void 0,i(210119))]},{value:"LUXSE",name:"LUXSE",desc:i.tf(null,void 0,i(299724)),flag:"luxembourg",group:"Europe",country:"lu",providerId:"",searchTerms:[i.tf(null,void 0,i(164352))]},{value:"MIL",name:"MIL",desc:i.tf(null,void 0,i(16930)),flag:"italy",group:"Europe",country:"it",providerId:"",searchTerms:[i.tf(null,void 0,i(43246))]},{value:"NGM",name:"NGM",desc:i.tf(null,void 0,i(414327)),flag:"sweden",group:"Europe",country:"se",providerId:"",searchTerms:[i.tf(null,void 0,i(182404))]},{value:"BER",name:"BER",desc:i.tf(null,void 0,i(320197)),flag:"germany",group:"Europe",country:"de",providerId:"",searchTerms:[i.tf(null,void 0,i(159985))]},{value:"DUS",name:"DUS",desc:i.tf(null,void 0,i(803884)),flag:"germany",group:"Europe",country:"de",providerId:"",searchTerms:[i.tf(null,void 0,i(159985))]},{value:"HAM",name:"HAM",desc:i.tf(null,void 0,i(373414)),flag:"germany",group:"Europe",country:"de",providerId:"",searchTerms:[i.tf(null,void 0,i(159985))]},{value:"HAN",name:"HAN",desc:i.tf(null,void 0,i(988211)),flag:"germany",group:"Europe",country:"de",providerId:"",searchTerms:[i.tf(null,void 0,i(159985))]},{value:"MUN",name:"MUN",desc:i.tf(null,void 0,i(186042)),flag:"germany",group:"Europe",country:"de",providerId:"",searchTerms:[i.tf(null,void 0,i(159985))]},{value:"TRADEGATE",name:"TRADEGATE",desc:i.tf(null,void 0,i(280394)),flag:"germany",group:"Europe",country:"de",providerId:"",searchTerms:[i.tf(null,void 0,i(159985))]},{value:"GETTEX",name:"GETTEX",desc:i.tf(null,void 0,i(881365)),flag:"germany",group:"Europe",country:"de",providerId:"finanzen",searchTerms:[i.tf(null,void 0,i(159985))]},{value:"MILSEDEX",name:"MILSEDEX",desc:i.tf(null,void 0,i(948741)),flag:"italy",group:"Europe",hideInSymbolSearch:!0,country:"it",providerId:"",searchTerms:[i.tf(null,void 0,i(43246))]},{value:"IST",name:"IST",desc:i.tf(null,void 0,i(757451)),flag:"turkey",hideInSymbolSearch:!0, group:"Europe",country:"tr",providerId:"",searchTerms:[i.tf(null,void 0,i(694398))]},{value:"BIST",name:"BIST",desc:i.tf(null,void 0,i(833187)),flag:"turkey",group:"Europe",country:"tr",providerId:"",searchTerms:[i.tf(null,void 0,i(694398))]},{value:"TASE",name:"TASE",desc:i.tf(null,void 0,i(932457)),flag:"israel",group:"Middle East / Africa",country:"il",providerId:"",searchTerms:[i.tf(null,void 0,i(261935))]},{value:"SIX",name:"SIX",desc:i.tf(null,void 0,i(460854)),flag:"switzerland",group:"Europe",country:"ch",providerId:"",searchTerms:[i.tf(null,void 0,i(440414))]},{value:"BX",name:"BX",desc:i.tf(null,void 0,i(283300)),flag:"switzerland",group:"Europe",country:"ch",providerId:"",searchTerms:[i.tf(null,void 0,i(440414))]},{value:"PSECZ",name:"PSE",desc:i.tf(null,void 0,i(475511)),flag:"czech",group:"Europe",country:"cz",providerId:"",searchTerms:[i.tf(null,void 0,i(342054))]},{value:"ASX",name:"ASX",desc:i.tf(null,void 0,i(252673)),flag:"australia",group:"Asia / Pacific",country:"au",providerId:"",searchTerms:[i.tf(null,void 0,i(50132))]},{value:"CHIXAU",name:"Cboe Australia",desc:i.tf(null,void 0,i(685147)),flag:"australia",group:"Asia / Pacific",country:"au",providerId:"",searchTerms:[i.tf(null,void 0,i(50132))]},{value:"VIE",name:"WB",desc:i.tf(null,void 0,i(791370)),flag:"austria",group:"Europe",country:"at",providerId:"",searchTerms:[i.tf(null,void 0,i(226505))]},{value:"DSEBD",name:"DSE",desc:i.tf(null,void 0,i(105736)),flag:"bangladesh",group:"Asia / Pacific",country:"bd",providerId:"",searchTerms:[i.tf(null,void 0,i(61587))]},{value:"NZX",name:"NZX",desc:i.tf(null,void 0,i(164062)),flag:"new_zealand",group:"Asia / Pacific",country:"nz",providerId:"",searchTerms:[i.tf(null,void 0,i(824143))]},{value:"SSE",name:"SSE",desc:i.tf(null,void 0,i(531385)),flag:"china",group:"Asia / Pacific",country:"cn",providerId:"",searchTerms:[i.tf(null,void 0,i(420844))]},{value:"SHFE",name:"SHFE",desc:i.tf(null,void 0,i(19261)),flag:"china",group:"Asia / Pacific",country:"cn",providerId:"",searchTerms:[i.tf(null,void 0,i(420844))]},{value:"SZSE",name:"SZSE",desc:i.tf(null,void 0,i(117992)),flag:"china",group:"Asia / Pacific",country:"cn",providerId:"",searchTerms:[i.tf(null,void 0,i(420844))]},{value:"HKEX",name:"HKEX",desc:i.tf(null,void 0,i(686471)),flag:"hong_kong",group:"Asia / Pacific",country:"hk",providerId:"",searchTerms:[i.tf(null,void 0,i(532918))]},{value:"PSE",name:"PSE",desc:i.tf(null,void 0,i(300290)),flag:"philippines",group:"Asia / Pacific",country:"ph",providerId:"",searchTerms:[i.tf(null,void 0,i(226813))]},{value:"PSX",name:"PSX",desc:i.tf(null,void 0,i(871277)),flag:"pakistan",group:"Asia / Pacific",country:"pk",providerId:"",searchTerms:[i.tf(null,void 0,i(49145))]},{value:"NSENG",name:"NSE",desc:i.tf(null,void 0,i(410100)),flag:"nigeria",group:"Middle East / Africa",country:"ng",providerId:"",searchTerms:[i.tf(null,void 0,i(62410))]},{value:"NSEKE",name:"NSE",desc:i.tf(null,void 0,i(297570)),flag:"kenya",group:"Middle East / Africa",country:"ke",providerId:"",searchTerms:[i.tf(null,void 0,i(89080))]},{ value:"JSE",name:"JSE",desc:i.tf(null,void 0,i(456781)),flag:"south_africa",group:"Middle East / Africa",country:"za",providerId:"",searchTerms:[i.tf(null,void 0,i(528900))]},{value:"JFX",name:"JFX",desc:i.tf(null,void 0,i(80661)),flag:"forex",group:"Forex",country:"",providerId:"jfx"},{value:"COINBASE",name:"Coinbase",desc:i.tf(null,void 0,i(740182)),flag:"bitcoin",group:"Cryptocurrency",country:"",providerId:"coinbase"},{value:"CITYINDEX",name:"City Index",desc:i.tf(null,void 0,i(858746)),flag:"forex",group:"Forex",country:"",providerId:"cityindex"},{value:"USI",name:"USI",desc:i.tf(null,void 0,i(787839)),flag:"usa",hideInSymbolSearch:!0,group:"North America",country:"us",providerId:"",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"OMXHEX",name:"HEX",desc:i.tf(null,void 0,i(261969)),flag:"finland",group:"Europe",country:"fi",providerId:"",searchTerms:[i.tf(null,void 0,i(936693))]},{value:"OMXICE",name:"ICEX",desc:i.tf(null,void 0,i(443662)),flag:"iceland",group:"Europe",country:"is",providerId:"",searchTerms:[i.tf(null,void 0,i(664150))]},{value:"OMXCOP",name:"CSE",desc:i.tf(null,void 0,i(290311)),flag:"denmark",group:"Europe",country:"dk",providerId:"",searchTerms:[i.tf(null,void 0,i(64901))]},{value:"OMXSTO",name:"STO",desc:i.tf(null,void 0,i(826846)),flag:"sweden",group:"Europe",country:"se",providerId:"",searchTerms:[i.tf(null,void 0,i(182404))]},{value:"OMXVSE",name:"VSE",desc:i.tf(null,void 0,i(453525)),flag:"lithuania",group:"Europe",country:"lt",providerId:"",searchTerms:[i.tf(null,void 0,i(529113))]},{value:"OMXTSE",name:"TALSE",desc:i.tf(null,void 0,i(807486)),flag:"estonia",group:"Europe",country:"ee",providerId:"",searchTerms:[i.tf(null,void 0,i(959823))]},{value:"OMXRSE",name:"OMXR",desc:i.tf(null,void 0,i(268976)),flag:"latvia",group:"Europe",country:"lv",providerId:"",searchTerms:[i.tf(null,void 0,i(484045))]},{value:"OMXNORDIC",name:"OMXNORDIC",desc:i.tf(null,void 0,i(641835)),flag:"europe",hideInSymbolSearch:!0,group:"Europe",country:"eu",providerId:""},{value:"OMXBALTIC",name:"OMXBALTIC",desc:i.tf(null,void 0,i(220309)),flag:"europe",hideInSymbolSearch:!0,group:"Europe",country:"eu",providerId:""},{value:"FRED",name:"FRED",desc:i.tf(null,void 0,i(90661)),flag:"usa",group:"Economy",country:"",providerId:"fred2",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"ISM",name:"ISM",desc:i.tf(null,void 0,i(647511)),flag:"usa",group:"Economy",country:"",providerId:"quandl_ism",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"FRBNY",name:"FRBNY",desc:i.tf(null,void 0,i(889838)),flag:"usa",group:"Economy",country:"",providerId:"quandl_frbny",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"FRBP",name:"FRBP",desc:i.tf(null,void 0,i(343244)),flag:"usa",group:"Economy",country:"",providerId:"quandl_frbp",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"ECONOMICS",name:"Trading Economics",desc:i.tf(null,void 0,i(651425)),flag:"usa",group:"Economy",country:"", providerId:"economics",searchTerms:[i.tf(null,void 0,i(787935)),i.tf(null,void 0,i(216977))]},{value:"WHSELFINVEST",name:"WH SelfInvest",desc:i.tf(null,void 0,i(160923)),flag:"forex",group:"Forex",country:"",providerId:"whselfinvest"}]},963456:(e,t,i)=>{"use strict";i.d(t,{formatStudyError:()=>o,triesTranslateError:()=>r});var n=i(444372);function r(e){return s.get(e)||e}function o(e){return e.format({boldHighlightStart:"",boldHighlightEnd:""})}const s=new Map([["You cannot see this pivot timeframe on this resolution",n.t(null,void 0,i(717126))],["The data vendor doesn't provide volume data for this symbol.",n.t(null,void 0,i(529198))],['Histogram is too large, please increase "Row Size" input.',n.t(null,void 0,i(634041))],["Histogram is too large, please reduce 'Row Size' input.",n.t(null,void 0,i(177607))],['Histogram is too large, please increase "Ticks Per Row" input.',n.t(null,void 0,i(469274))],["This script is invite-only. To request access, please contact its author.",n.t(null,void 0,i(874986))],["Volume Profile indicator available only on our upgraded plans.",n.t(null,void 0,i(961022))],["VOLUME_BIST_MIXED",n.t(null,void 0,i(482772))]])},401580:(e,t,i)=>{"use strict";i.d(t,{WatchedValue:()=>l});var n=i(428123),r=i(194582),o=i(805377);const s=(0,r.getLogger)("Common.WatchedValue");function a(e){s.logError(`${e&&(e.stack||e.message)}`)}class l{constructor(...e){this._listeners=[],e.length>0&&(this._value=e[0])}destroy(){this.unsubscribe()}value(){return this._owner?this._owner._value:this._value}setValue(e,t){const i=this._owner?this._owner:this;if("function"==typeof i.hook&&(e=i.hook(e)),i.writeLock)return;const n=i._value===e||Number.isNaN(i._value)&&Number.isNaN(e);if(!t&&n&&i.hasOwnProperty("_value"))return;i._value=e;const r=i._listeners.slice();let o=0;for(let t=0;tthis.spawn(e).readonly(),destroy:this.destroy.bind(this)};return this._readonlyInstance=e,e}spawn(e){return new d(this._owner||this,e)}when(e){(0,o.callWhen)(this,(e=>Boolean(e)),(()=>{try{e(this.value())}catch(e){a(e)}}))}assertNoSubscriptions(){0}ownership(){return(0,n.ownership)(this)}spawnOwnership(){ return(0,n.ownership)(this.spawn())}weakReference(){return(0,n.weakReference)(this)}}class d extends l{constructor(e,t){super(),delete this._listeners,this._owner=e,this._onDestroy=t}destroy(){var e;try{null===(e=this._onDestroy)||void 0===e||e.call(this)}catch(e){a(e)}super.destroy()}readonly(){return super.readonly()}}},877009:(e,t,i)=>{"use strict";i.d(t,{InvalidationLevel:()=>n,InvalidationMask:()=>a,defaultInvalidationLevel:()=>s});var n,r=i(650151),o=i(522991);!function(e){e[e.None=0]="None",e[e.Cursor=1]="Cursor",e[e.Light=2]="Light",e[e.Full=3]="Full"}(n||(n={}));const s=n.None;class a{constructor(e=s){this._panesOrderChanged=!1,this._keepVisibleTimeRangeOnResize=!1,this._timeAxisInvalidationLevel=s,this._invalidatedPanes=new Map,this._additionalActions=[],this._timeScaleInvalidations=[],this._invalidationLevel=e}invalidateAll(e){this._invalidationLevel!==e&&(this._invalidationLevel=Math.max(this._invalidationLevel,e),this._invalidatedPanes.forEach((e=>{e.invalidateAll(this._invalidationLevel)})))}invalidateAllPane(e,t){this._invalidatedPanes.has(e)||this._invalidatedPanes.set(e,new o.PaneInvalidationMask(this._invalidationLevel)),(0,r.ensureDefined)(this._invalidatedPanes.get(e)).invalidateAll(t)}invalidatePriceScale(e,t,i,n){this._invalidatedPanes.has(e)||this._invalidatedPanes.set(e,new o.PaneInvalidationMask(this._invalidationLevel)),(0,r.ensureDefined)(this._invalidatedPanes.get(e)).invalidatePriceScale(t,i,n)}invalidateTimeScale(e){this._timeAxisInvalidationLevel=Math.max(this._timeAxisInvalidationLevel,e)}invalidatePanesOrder(){this._panesOrderChanged=!0}lockVisibleTimeRangeOnResize(){this._keepVisibleTimeRangeOnResize=!0}fullInvalidation(){return this._invalidationLevel}maxPaneInvalidation(){const e=[];return this._invalidatedPanes.forEach((t=>{e.push(t.fullInvalidation())})),Math.max(...e,this._invalidationLevel)}invalidateForPane(e){return this._invalidatedPanes.get(e)||new o.PaneInvalidationMask(this._invalidationLevel)}invalidateForTimeScale(){return Math.max(this._timeAxisInvalidationLevel,this._invalidationLevel)}validationActions(){return this._additionalActions}addValidationAction(e){this._additionalActions.push(e)}merge(e){this._invalidationLevel=Math.max(this._invalidationLevel,e._invalidationLevel),this._panesOrderChanged=this._panesOrderChanged||e._panesOrderChanged,this._keepVisibleTimeRangeOnResize=this._keepVisibleTimeRangeOnResize||e._keepVisibleTimeRangeOnResize,this._invalidatedPanes.forEach((e=>{e.invalidateAll(this._invalidationLevel)})),e._invalidatedPanes.forEach(((e,t)=>{this._invalidatedPanes.has(t)||this._invalidatedPanes.set(t,new o.PaneInvalidationMask(this._invalidationLevel)),(0,r.ensureDefined)(this._invalidatedPanes.get(t)).merge(e)})),this._timeAxisInvalidationLevel=Math.max(this._timeAxisInvalidationLevel,e._timeAxisInvalidationLevel);for(let t=0;t0===e.type));if(-1!==i){const[n]=this._timeScaleInvalidations.splice(i,1);null===(t=(e=n.value).onFinish)||void 0===t||t.call(e,!1)}}}},27005:(e,t,i)=>{"use strict";i.d(t,{isUserStudyWithLogs:()=>o,openPineLogsInRightPanel:()=>r});var n=i(971417);function r(e){var t,i,n,r,o,s,a,l;const d=null===(i=null===(t=window.widgetbar)||void 0===t?void 0:t.tradingPanelAccessor)||void 0===i?void 0:i.tradingPanel,u=!(null===(r=null===(n=window.widgetbar)||void 0===n?void 0:n.layout)||void 0===r?void 0:r.canOpen());(null==d?void 0:d.isOpened)&&u&&d.close();const c=null===(o=window.widgetbar)||void 0===o?void 0:o.setPage("pine_logs");null===(l=null===(a=null===(s=window.widgetbar)||void 0===s?void 0:s.layout)||void 0===a?void 0:a.widgetBar)||void 0===l||l.saveToTVSettings();const h=null==c?void 0:c.widget("pine_logs"),p=null==h?void 0:h.widgetObject;e?null==p||p.onSelectStudyFromChart(e):null==p||p.onOpenFromEditor()}function o(e){if(null==e?void 0:e.metaInfo){const t=null==e?void 0:e.metaInfo(),i=t.graphics.logs,r=(0,n.extractPineId)(t.id),o=t.pine;return Boolean(o&&r&&(0,n.isCustomPineId)(r)&&i)}return!1}},395098:(e,t,i)=>{"use strict";i.d(t,{getIntervalsVisibilitiesForMode:()=>p,isActualInterval:()=>u,makeIntervalsVisibilitiesVisibleAtInterval:()=>l,mergeIntervalVisibilitiesDefaults:()=>h,nonDefaultIntervalsVisibilities:()=>c});var n=i(852290),r=i(822914),o=i(650151),s=i(223699),a=i(808068);function l(e,t){let i=t.multiplier();if(t.isTicks()&&(e.ticks=!0),t.isSeconds()&&(i<60?(e.seconds=!0,e.secondsFrom=Math.min(e.secondsFrom,i),e.secondsTo=Math.max(e.secondsTo,i)):(i=Math.floor(i/60),t=new s.Interval(s.ResolutionKind.Minutes,i))),t.isMinutes())if(i<60)e.minutes=!0,e.minutesFrom=Math.min(e.minutesFrom,i),e.minutesTo=Math.max(e.minutesTo,i);else{const t=Math.floor(i/60);e.hours=!0,e.hoursFrom=Math.min(e.hoursFrom,t),e.hoursTo=Math.max(e.hoursTo,t)}t.isDays()&&(e.days=!0,e.daysFrom=Math.min(e.daysFrom,i),e.daysTo=Math.max(e.daysTo,i)),t.isWeeks()&&(e.weeks=!0, e.weeksFrom=Math.min(e.weeksFrom,i),e.weeksTo=Math.max(e.weeksTo,i)),t.isMonths()&&(e.months=!0,e.monthsFrom=Math.min(e.monthsFrom,i),e.monthsTo=Math.max(e.monthsTo,i)),t.isRange()&&(e.ranges=!0)}function d(e,t,i,n){return e&&n>=t&&n<=i}function u(e,t){const i=t.childs();switch(e.kind()){case s.ResolutionKind.Ticks:return i.ticks.value();case s.ResolutionKind.Seconds:if(e.multiplier()<60)return d(i.seconds.value(),i.secondsFrom.value(),i.secondsTo.value(),e.multiplier());{const t=Math.floor(e.multiplier()/60);return d(i.minutes.value(),i.minutesFrom.value(),i.minutesTo.value(),t)}case s.ResolutionKind.Minutes:if(e.multiplier()<60)return d(i.minutes.value(),i.minutesFrom.value(),i.minutesTo.value(),e.multiplier());{const t=Math.floor(e.multiplier()/60);return d(i.hours.value(),i.hoursFrom.value(),i.hoursTo.value(),t)}case s.ResolutionKind.Days:return d(i.days.value(),i.daysFrom.value(),i.daysTo.value(),e.multiplier());case s.ResolutionKind.Weeks:return d(i.weeks.value(),i.weeksFrom.value(),i.weeksTo.value(),e.multiplier());case s.ResolutionKind.Months:return d(i.months.value(),i.monthsFrom.value(),i.monthsTo.value(),e.multiplier());case s.ResolutionKind.Range:return i.ranges.value()}return(0,o.assert)(!1,`Unsupported resolution: ${e.value()}`),!1}function c(e){const t=Object.keys(e).filter((t=>a.intervalsVisibilitiesDefaults[t]!==e[t]));return 0===t.length?null:t.reduce(((t,i)=>(t[i]=e[i],t)),{})}function h(e){return(0,n.default)((0,r.default)(a.intervalsVisibilitiesDefaults),null!=e?e:{})}function p(e,t){if(0===t||e.isTicks()&&3===t||e.isRange()&&2===t)return h();let i=!1;const n={ticks:!1,seconds:!1,minutes:!1,hours:!1,days:!1,weeks:!1,months:!1,ranges:!1},r=e=>e.multiplier();return[{checker:e=>e.isTicks(),getIntervalMultiplier:r,markIntervalAsVisible:(e,t)=>{n.ticks=!0}},{checker:e=>e.isSeconds()&&e.multiplier()<60,getIntervalMultiplier:r,markIntervalAsVisible:(e,t)=>{n.seconds=!0,n.secondsFrom=e,n.secondsTo=t}},{checker:e=>e.isSeconds()&&e.multiplier()>=60,getIntervalMultiplier:e=>Math.floor(e.multiplier()/60),markIntervalAsVisible:(e,t)=>{n.minutes=!0,n.minutesFrom=e,n.minutesTo=t}},{checker:e=>e.isMinutes()&&e.multiplier()<60,getIntervalMultiplier:r,markIntervalAsVisible:(e,t)=>{n.minutes=!0,n.minutesFrom=e,n.minutesTo=t}},{checker:e=>e.isMinutes()&&e.multiplier()>=60,getIntervalMultiplier:e=>Math.floor(e.multiplier()/60),markIntervalAsVisible:(e,t)=>{n.hours=!0,n.hoursFrom=e,n.hoursTo=t}},{checker:e=>e.isDays(),getIntervalMultiplier:r,markIntervalAsVisible:(e,t)=>{n.days=!0,n.daysFrom=e,n.daysTo=t}},{checker:e=>e.isWeeks(),getIntervalMultiplier:r,markIntervalAsVisible:(e,t)=>{n.weeks=!0,n.weeksFrom=e,n.weeksTo=t}},{checker:e=>e.isMonths(),getIntervalMultiplier:r,markIntervalAsVisible:(e,t)=>{n.months=!0,n.monthsFrom=e,n.monthsTo=t}},{checker:e=>e.isRange(),getIntervalMultiplier:r,markIntervalAsVisible:(e,t)=>{n.ranges=!0}}].forEach((n=>{if(n.checker(e)){i=!0;const r=n.getIntervalMultiplier(e);1===t?n.markIntervalAsVisible(r,r):3===t?n.markIntervalAsVisible(r,void 0):n.markIntervalAsVisible(void 0,r) }else(!i&&2===t||i&&3===t)&&n.markIntervalAsVisible(void 0,void 0)})),h(n)}},138886:(e,t,i)=>{"use strict";i.d(t,{InplaceTextLineDataSource:()=>u});var n=i(650151),r=i(86441),o=i(316230),s=i(401580),a=i(821979),l=i(964824),d=i(653657);class u extends a.LineDataSource{constructor(e,t,n,r){super(e,t,n,r),this._container=null,this._activateTextEditingEl=null,this._selectionData={},this._editableText=new s.WatchedValue(this.properties().childs().text.value()),this._editableText.subscribe((()=>{this.updateAllViewsAndRedraw((0,l.sourceChangeEvent)(this.id()))})),Promise.all([i.e(39232),i.e(33193),i.e(99898),i.e(76792),i.e(77028),i.e(51583)]).then(i.bind(i,721683)).then((t=>{this._cursorPaneView=new t.InplaceTextCursorPaneView(this,e)}))}destroy(){this._editableText.unsubscribe(),this._closeTextEditor(),super.destroy()}topPaneViews(){return window.TradingView.printing||!this._cursorPaneView?null:(this._cursorPaneView.update(),[this._cursorPaneView])}editableText(){return this._editableText}textEditingEl(){return this._activateTextEditingEl}activateTextEditingOn(e){this._activateTextEditingEl=e,this.updateAllViewsAndRedraw((0,l.sourceChangeEvent)(this.id()))}onSelectionChange(e){const t={};void 0!==e&&(e.start===e.end?t.cursorPosition=e.start:t.selectionRange=[Math.min(e.start,e.end),Math.max(e.start,e.end)]),(0,o.default)(t,this._selectionData)||(this._selectionData=t,this._paneViews.forEach((e=>{e.forEach((e=>{(0,d.isInplaceTextLineSourcePaneView)(e)&&e.setSelectionRange(t.selectionRange)}))})),this._cursorPaneView.setCursorPosition(t.cursorPosition),this.updateAllViewsAndRedraw((0,l.sourceChangeEvent)(this.id())))}setAdditionalCursorData(e,t){this._cursorPaneView.setAdditionalCursorData(e,t)}async _openTextEditor(e,t,o,s,a){if(null!==this._container)return;this._activateTextEditingEl=null;const d=this.isFixed()?(0,n.ensureDefined)(this.fixedPoint()):(0,n.ensureNotNull)(this.pointToScreenPoint(this._points[0])),u=new r.Point(d.x,d.y);this._container=document.createElement("div"),this._container.style.position="absolute",this._container.style.top="0",this._container.style.bottom="0",this._container.style.left="0",this._container.style.right="0",this._container.style.overflow="hidden",this._container.style.pointerEvents="none",e.appendChild(this._container);const{updateChartEditorText:c,closeChartEditorText:h}=await Promise.all([i.e(20010),i.e(90385),i.e(15592)]).then(i.bind(i,353028));if(null===this._container||this._isDestroyed)return;this._closeChartEditorText=h;const p=this.properties().childs();this._editableText.setValue(p.text.value());const m={position:u,textInfo:t,placeholder:o,text:this._editableText,textColor:p.textsColors,wordWrap:p.wordWrap,onClose:s,onSelectionChange:a};c(this._container,m),this.updateAllViewsAndRedraw((0,l.sourceChangeEvent)(this.id()))}_closeTextEditor(){var e;null===this._container||this._isDestroyed||(this.properties().childs().text.setValue(this._editableText.value()),this.onSelectionChange(),null===(e=this._closeChartEditorText)||void 0===e||e.call(this,this._container), this._closeChartEditorText=void 0,this._container.remove(),this._container=null,this.updateAllViewsAndRedraw((0,l.sourceChangeEvent)(this.id())))}}},821979:(e,t,i)=>{"use strict";i.d(t,{LineDataSource:()=>U});var n=i(86441),r=i(650151),o=i(251954),s=i(201089),a=i(244842),l=i(242558),d=i(988124),u=i(707957),c=i(103221),h=i(389137),p=i(558793),m=i(695242),v=i(735337),f=i(811630),g=i(394093),_=i(401580),y=i(877009),I=i(276871),w=i(395098),T=i(808068),S=i(444331),x=i(502141),b=i(223699),P=i(354950),C=i(885482),A=i(996986),E=i(312449),L=i(964824),M=i(981107),k=i(68626),V=i(517067),B=i(902214),D=i(837202),N=i(31712),O=i(918208),R=i(42292);const z=(0,s.getLogger)("Chart.LineDataSource"),F=a.enabled("datasource_copypaste");class H{constructor(){this._states=[]}start(e){this._states.push(e)}finish(e){const t=(0,r.ensureDefined)(this._states.pop());return n=t,(i=e).length!==n.length?{indexesChanged:!0,pricesChanged:!0}:i.reduce(((e,t,i)=>{const r=n[i];return e.indexesChanged=e.indexesChanged||t.index!==r.index,e.pricesChanged=e.pricesChanged||t.price!==r.price,e}),{indexesChanged:!1,pricesChanged:!1});var i,n}isEmpty(){return 0===this._states.length}}let X=0;class U extends A.DataSource{constructor(e,t,i,n){if(super(n),this.version=1,this.toolname="",this.customization={forcePriceAxisLabel:!1,disableErasing:!1,disableSave:!1,showInObjectsTree:!0},this._currentPointsetAndSymbolId=null,this._pointChanged=new u.Delegate,this._pointAdded=new u.Delegate,this._priceAxisViews=[],this._timeAxisViews=[],this._timePoint=[],this._points=[],this._lastPoint=null,this._paneViews=new Map,this._normalizedPointsChanged=new u.Delegate,this._fixedPointsChanged=new u.Delegate,this._changeStatesStack=new H,this._startMovingPoint=null,this._currentMovingPoint=null,this._isActualSymbol=!1,this._isActualInterval=!1,this._isActualCurrency=!1,this._isActualUnit=!1,this._sharingMode=new _.WatchedValue(0),this._onTemplateApplying=new u.Delegate,this._onTemplateApplied=new u.Delegate,this._syncStateExclusions=[],this._definitionsViewModel=null,this._syncLineStyleMuted=!1,this._onIsActualIntervalChange=new u.Delegate,this._onPointsetUpdatedDelegate=new u.Delegate,this._linkKey=new _.WatchedValue(null),this._serverUpdateTime=null,this._boundCalcIsActualSymbol=this.calcIsActualSymbol.bind(this),this._alignerCache=null,this._alertUndoMode=!1,this._model=e,this._properties=t,this._localAndServerAlertsMismatch=!1,this._properties.hasChild("interval")||this._properties.addChild("interval",new P.Property(e.mainSeries().interval())),this.calcIsActualSymbol(),this._properties.childs().intervalsVisibilities.listeners().subscribe(this,this.calcIsActualSymbol),this._properties.subscribe(this,(()=>this.propertiesChanged())),this._createPointsProperties(),this.pointsCount()>0)for(let e=0;e{const t=!1===(0,C.hideAllDrawings)().value() ;e.value()?e.value()&&t&&o.emit("drawing_event",this._id,"show"):(this._model.selection().isSelected(this)&&this._model.selectionMacro((e=>{e.removeSourceFromSelection(this)})),t&&o.emit("drawing_event",this._id,"hide")),this._onSourceHiddenMayChange()})),(0,C.hideAllDrawings)().subscribe(this,this._onSourceHiddenMayChange),this._sessionConnected=this._model.chartApi().isConnected().spawn(),this._sessionConnected.subscribe((e=>{e||(this._currentPointsetAndSymbolId=null)})),this._definitionsViewModel=null}destroy(){this._paneViews.forEach(((e,t)=>this._destroyPanePaneViews(t))),this.stop(),null!==this._definitionsViewModel&&(this._definitionsViewModel.destroy(),this._definitionsViewModel=null),null!==this._ownerSource&&(this._ownerSource.currencyChanged().unsubscribeAll(this),this._ownerSource.unitChanged().unsubscribeAll(this),(0,M.isSymbolSource)(this._ownerSource)&&(this._ownerSource.symbolResolved().subscribe(this,this._boundCalcIsActualSymbol),this._ownerSource.isActingAsSymbolSource().unsubscribe(this._boundCalcIsActualSymbol))),this.ownerSourceChanged().unsubscribeAll(this),(0,C.hideAllDrawings)().unsubscribeAll(this),this.deleteAlert(),this._sessionConnected.destroy(),super.destroy()}priceScale(){return this._ownerSource?this._ownerSource.priceScale():null}createPriceAxisView(e){return new D.LineToolPriceAxisView(this,{pointIndex:e})}model(){return this._model}symbol(){return this._properties.childs().symbol.value()}linkKey(){return this._linkKey}serverUpdateTime(){return this._serverUpdateTime}setServerUpdateTime(e){this._serverUpdateTime=e}boundToSymbol(){return!0}isAvailableInFloatingWidget(){return!0}points(){const e=[];for(let t=0;t{const i=(0,r.ensureNotNull)(this.pointToScreenPoint(t)),o=i.x/this._model.timeScale().width(),s=i.y/e.height();return new n.Point(o,s)}))}widthsProperty(){var e;return null!==(e=this._properties.childs().linesWidths)&&void 0!==e?e:null}lineColorsProperty(){var e ;return null!==(e=this._properties.childs().linesColors)&&void 0!==e?e:null}backgroundColorsProperty(){var e;return null!==(e=this._properties.childs().backgroundsColors)&&void 0!==e?e:null}textColorsProperty(){var e;return null!==(e=this._properties.childs().textsColors)&&void 0!==e?e:null}pointsProperty(){return this._pointsProperty}hasEditableCoordinates(){return!0}startMoving(e,t,i,n){this.isFixed()&&this.restoreFixedPoint(),this._startMovingPoint=e}move(e,t,i,n){if(i&&(i.shiftOnly()||i.modShift()))if(this.isFixed()){const t=this._alignScreenPointHorizontallyOrVertically((0,r.ensureDefined)(e.screen));this._currentMovingPoint={screen:t}}else{const t=this._alignPointHorizontallyOrVertically((0,r.ensureDefined)(e.logical)),i=(0,r.ensureNotNull)(this.pointToScreenPoint(t));this._currentMovingPoint={logical:t,screen:i}}else this._currentMovingPoint=e;this.updateAllViews((0,L.sourceChangeEvent)(this.id()))}endMoving(e,t,i){let n=!1,s=!1;if(this._currentMovingPoint&&this._startMovingPoint){if(this.isFixed()){const e=this._correctFixedPoint((0,r.ensureDefined)(this._fixedPoint));e.didCorrect&&(this._fixedPoint=e.point,this._fixedPointsChanged.fire())}else{const e=(0,r.ensureDefined)(this._currentMovingPoint.logical),t=(0,r.ensureDefined)(this._startMovingPoint.logical);n=e.index!==t.index,s=e.price!==t.price;if(this._correctPoints(this._points,i)){o.emit("drawing_event",this._id,"move"),o.emit("drawing_event",this._id,"points_changed");for(let e=0;e0&&(this._points=e)}restorePoints(e,t,i){const n=this._timePoint.length>0&&!(0,h.deepEquals)(this._timePoint,e)[0];this._timePoint=(0,c.deepCopy)(e),this._points=t,i||this.denormalizeTimePoints(),n&&this._normalizedPointsChanged.fire()}restorePositionPercents(e){this._positionPercents=e}calcIsActualSymbol(){const e=this.ownerSource();if(null===e)this._isActualSymbol=!1;else{const t=(0,r.ensureNotNull)(e.symbolSource()),i=t.symbolInfo();if(i){this._migrateSymbolProperty(i);const e=this._properties.childs().symbol,n=e.value();if(this._isActualSymbol=t.symbolSameAsCurrent(n),this._isActualSymbol){const r=(0,S.extractLineToolSymbolFromSymbolInfo)(i,t.symbol());(0,x.areEqualSymbols)(n,r)||(z.logWarn('Possible drawing "migrating" detected from "'+n+'" to "'+r+'"'),z.logWarn("Series symbolInfo: "+JSON.stringify(t.symbolInfo())),z.logWarn(`${(new Error).stack}`)),e.setValue(r)}}}this.calcIsActualInterval(),this.calcIsActualCurrency(),this.calcIsActualUnit(),this._onSourceHiddenMayChange()}calcIsActualCurrency(){const e=this.ownerSource();if(null===e)return void(this._isActualCurrency=!1);let t=this._properties.childs().currencyId.value();if(null!==t){const i=e.symbolSource();"pct"===t&&(this._properties.childs().currencyId.setValue(null),t=null),this._isActualCurrency=t===(0,S.symbolCurrency)(i.symbolInfo(),void 0,!0)}else{const t=(0,r.ensureNotNull)(e.symbolSource());this._isActualCurrency=null!==t.symbolInfo()&&!t.isConvertedToOtherCurrency()}this._onSourceHiddenMayChange()}calcIsActualUnit(){const e=this.ownerSource();if(null===e)return void(this._isActualUnit=!1);const t=this._properties.childs().unitId.value();if(null!==t)this._isActualUnit=t===(0,r.ensureNotNull)(e.symbolSource()).unit();else{const t=(0,r.ensureNotNull)(e.symbolSource());this._isActualUnit=null!==t.symbolInfo()&&!t.isConvertedToOtherUnit()}this._onSourceHiddenMayChange()}calcIsActualInterval(){const e=this._isActualInterval,t=this._properties,i=this._model.mainSeries();this._isActualInterval=(0,w.isActualInterval)(b.Interval.parse(i.interval()),t.childs().intervalsVisibilities),!this._isActualInterval&&this._model.selection().isSelected(this)&&this._model.selectionMacro((e=>e.removeSourceFromSelection(this))), this._isActualInterval!==e&&this._onIsActualIntervalChange.fire(),this._onSourceHiddenMayChange()}paneViews(e){if(this.isSourceHidden())return null;const t=this._getPaneViews(this.isMultiPaneAvailable()?e:void 0);if(null===t)return null;if(1===t.length)return[t[0]];const i=[];for(let e=t.length-1;e>=0;--e)i.push(t[e]);return i}priceAxisViews(e,t){if(t!==this.priceScale()||this.isSourceHidden())return null;if(this._model.lineBeingEdited()===this){const e=this._model.linePointBeingEdited();if(null!==e&&e{if(!e)return z.logError("Failed to get alert, alert will not be saved with drawing in chart"),Promise.reject("got_no_alert");if(this._removeAlertSubscriptions(),this._addAlertSubscriptions(e),null==t?void 0:t.syncAlertFocus){const t=this._model.selection().isSelected(this);e.setSelected(t)}else if(null==t?void 0:t.syncFocusFromAlert){const t=e.selected().value();this._model.selectionMacro((e=>{t?e.addSourceToSelection(this):e.removeSourceFromSelection(this)}))}return this._onAlertData(e),e})).then((()=>{const e=this.linkKey().value();null===e||i||(0,C.changeLineStyle)({linkKey:e,model:this._model,state:{},alertId:n})})).catch((e=>{if(this._removeAlertSubscriptions(),"not_exists"===e){if(null==t?void 0:t.ignoreNonExistingAlert)return;(0,p.getChartAlertsFacade)().then((e=>{e.removeAlertFromAllChartsSilently(this.id(),n)}))}else z.logError("Getting alert or Saving chart failed: "+e)}))}editAlert(e){this.hasAlert().value()&&(0,p.getChartAlertsFacade)().then((t=>{t.openEditDialog((0,r.ensureDefined)(this._alertId),{dataSourceHub:this._model,actionSource:e,onAborted:e=>{e===g.AlertEditorAbortReason.AlertIsInvalid&&this.removeAlert()} })}))}getAlert(){return new Promise((async(e,t)=>{(await(0,p.getChartAlertsFacade)()).getAlert((0,r.ensureDefined)(this._alertId),{success:e,error:t})}))}getAlertSync(){var e;if(!this._alertId)return null;const t=(0,p.getChartAlertsFacadeIfCreatedBefore)();return null===t?null:null!==(e=t.getAlertSync(this._alertId))&&void 0!==e?e:null}synchronizeAlert(e){(this.hasAlert().value()||this._pendingAlertIdPromise)&&setTimeout((async()=>{if(!this._isDestroyed)try{await this.waitSettingAlertId(),this._synchronizeAlert(e)}catch(e){}}),0)}syncAlert(e){this.hasAlert().value()||this.setAlert(e,{sync:!0})}stateForAlert(){if(!this.canHasAlert())return null;const e={...this.state(),id:this.idForAlert(),uniqueId:this.idForAlert(),title:this.translatedType(),interval:this._model.mainSeries().interval()},t=this._getAlertPlots();return t&&t.length>0&&(e.plots=t),e}getAlertIsActive(){if(!this._alertId)return!1;const e=this.getAlertSync();return Boolean(e&&e.active().value())}detachAlert(){this._removeAlertSubscriptions(),this._hasAlert.setValue(!1),this._alertId=void 0}removeAlert(){this._alertId=void 0,this._hasAlert.setValue(!1),this._removeAlertSubscriptions()}deleteAlert(){if(!this.hasAlert().value()||void 0===this._alertId)return;const e=(0,p.getChartAlertsFacadeIfCreatedBefore)();e&&e.deleteAlert(this._alertId),this.removeAlert()}areLocalAndServerAlertsMismatch(){return this._localAndServerAlertsMismatch}showInObjectTree(){return this.customization.showInObjectsTree}setShowInObjectsTreeEnabled(e){this.customization.showInObjectsTree=e}start(){this.createServerPoints()}processHibernate(){this.canBeHibernated()?this.isStarted()&&this.stop():this.isStarted()||this.start()}canBeHibernated(){return this.isSourceHidden()}onData(e){"pointset_error"!==e.method?e.params.customId===this._currentPointsetIdWithPrefix()&&this._onPointsetUpdated(e.params.plots):z.logError(`Error getting pointset: ${e.params[0]} ${e.params[1]}`)}isBeingEdited(){return this===this._model.lineBeingEdited()}isActualSymbol(){return this._isActualSymbol}isActualCurrency(){return this._isActualCurrency}isActualInterval(){return this._isActualInterval}isActualUnit(){return this._isActualUnit}onIsActualIntervalChange(){return this._onIsActualIntervalChange}setOwnerSource(e){null!==this._ownerSource&&(this._ownerSource.currencyChanged().unsubscribeAll(this),this._ownerSource.unitChanged().unsubscribeAll(this)),null!==this._ownerSource&&(0,M.isSymbolSource)(this._ownerSource)&&(this._ownerSource.symbolResolved().unsubscribe(this,this._boundCalcIsActualSymbol),this._ownerSource.isActingAsSymbolSource().unsubscribe(this._boundCalcIsActualSymbol)),super.setOwnerSource(e),e&&(this.setPriceScale(e.priceScale()),e.currencyChanged().subscribe(this,this.calcIsActualCurrency),e.unitChanged().subscribe(this,this.calcIsActualUnit),this.calcIsActualSymbol(),this._migrateZOrder(),this._updateAlertCreationAvailable()),(0,M.isSymbolSource)(e)&&(e.symbolResolved().subscribe(this,this._boundCalcIsActualSymbol),e.isActingAsSymbolSource().subscribe(this._boundCalcIsActualSymbol))} dataAndViewsReady(){return this._paneViews.size>0}pointAdded(){return this._pointAdded}pointChanged(){return this._pointChanged}pointsetUpdated(){return this._onPointsetUpdatedDelegate}pointToScreenPoint(e){var t;const i=this._model.timeScale(),r=this.priceScale(),o=null===(t=this.ownerSource())||void 0===t?void 0:t.firstValue();if(!r||r.isEmpty()||i.isEmpty()||null==o)return null;const s=i.indexToCoordinate(e.index),a=r.priceToCoordinate(e.price,o);return new n.Point(s,a)}screenPointToPoint(e){var t;const i=this.priceScale(),n=null===(t=this.ownerSource())||void 0===t?void 0:t.firstValue();if(null==n||!isFinite(n)||null===i)return null;const r=this._model.timeScale().coordinateToIndex(e.x);return{price:i.coordinateToPrice(e.y,n),index:r}}calcMiddlePoint(e,t){return new n.Point((e.x+t.x)/2,(e.y+t.y)/2)}addPoint(e,t,i){const n=this._preparePoint(e,t);return this._addPointIntenal(n,t,i)}addFixedPoint(e){return this._fixedPoint=e,this.calcPositionPercents(),!0}calcPositionPercents(){const e=this.priceScale();if(!e||e.isEmpty()||void 0===this._fixedPoint)return;const t=this._fixedPoint.x/this._model.timeScale().width(),i=this._fixedPoint.y/e.height();return this._positionPercents={x:t,y:i},this._positionPercents}restoreFixedPoint(){this._fixedPoint=this.fixedPoint()}propertiesChanged(e){this.calcIsActualInterval(),this.updateAllViewsAndRedraw((0,L.sourceChangeEvent)(this.id())),e||this._syncLineStyleIfNeeded(),void 0===this._pendingPropertyChangedEvent&&(this._pendingPropertyChangedEvent=setTimeout((()=>{this._pendingPropertyChangedEvent=void 0,o.emit("drawing_event",this._id,"properties_changed")}),0))}state(e){var t;const i={type:this.toolname,id:this.id(),state:this.properties().state(this._propertiesStateExclusions()),points:(0,c.deepCopy)(this._timePoint),zorder:this.zorder(),ownerSource:null===(t=this.ownerSource())||void 0===t?void 0:t.id()};return this.linkKey().value()&&(i.linkKey=this.linkKey().value()),0!==this._sharingMode.value()&&(i.sharingMode=this._sharingMode.value()),delete i.state.points,e&&(i.indexes=this._points),this.isFixed()&&(i.positionPercents=this._positionPercents||this.calcPositionPercents()),"version"in this&&1!==this.version&&(i.version=this.version),this._saveAlertIdInState()&&this.hasAlert().value()&&void 0!==this._alertId&&(i.alertId=this._alertId),i}updateAllViews(e){this._isActualSymbol&&this._isActualCurrency&&this._isActualUnit&&this._isActualInterval&&this._properties.childs().visible.value()&&(this._updateAllPaneViews(e),this._priceAxisViews.forEach((t=>t.update(e))),this._timeAxisViews.forEach((t=>t.update(e))))}updateAllViewsAndRedraw(e){this.updateAllViews(e),this._model.updateSource(this)}tags(){return[this.toolname]}properties(){return this._properties}restoreExternalPoints(e,t){if(this._timePoint=(0,c.deepCopy)(e.points),t.indexesChanged){if(this.properties().childs().interval.setValue(e.interval),!this.isActualSymbol())return this._clearServerPoints(),void this._normalizedPointsChanged.fire();this.createServerPoints()}else{ const t=Math.min(this._points.length,e.points.length);for(let i=0;i0&&this._normalizePoints(),!this._readyToCreatePointset())return;const e=this._pointsForPointset();if(0===e.length)return;++X,this._currentPointsetAndSymbolId={pointsetId:X,symbolId:(0,r.ensureNotNull)(this._model.mainSeries().seriesSource().symbolInstanceId())};const t=(0,I.getServerInterval)(this.properties().childs().interval.value());this._model.chartApi().createPointset(this._currentPointsetIdWithPrefix(),"turnaround",this._currentPointsetAndSymbolId.symbolId,t,e,this.onData.bind(this))}finish(){}realign(){var e;this.calcIsActualSymbol(),this.isFixed()||this.isSourceHidden()||this._model.lineBeingCreated()===this||this._model.lineBeingEdited()===this||(null===(e=this._currentPointsetAndSymbolId)||void 0===e?void 0:e.symbolId)===this._model.mainSeries().seriesSource().symbolInstanceId()||this._clearServerPoints(),null===this._model.mainSeries().symbolInfo()&&(this._alignerCache=null),this.updateAllViews((0,L.sourceChangeEvent)(this.id()))}stop(){this._clearServerPoints()}restart(){this.isFixed()||(this._currentPointsetAndSymbolId=null,this.createServerPoints())}isStarted(){return null!==this._currentPointsetAndSymbolId}convertYCoordinateToPriceForMoving(e,t){var i;const n=(0,r.ensureNotNull)(this.priceScale());if(n.isEmpty())return null;const o=this.ownerSource(),s=(0,r.ensure)(null===(i=o||t)||void 0===i?void 0:i.firstValue()) ;return n.coordinateToPrice(e,s)}syncMultichartState(e){const t={points:this._timePoint,interval:this._model.mainSeries().interval()},i=this.linkKey().value();if(null!==i&&this.isSynchronizable()){const n={model:this._model,linkKey:i,symbol:this._model.mainSeries().symbol(),finalState:t,changes:e};(0,C.finishChangingLineTool)(n)}}enableCurrentIntervalVisibility(){let e=this.properties().childs().intervalsVisibilities.state();void 0!==e&&(e=(0,w.mergeIntervalVisibilitiesDefaults)(e),(0,w.makeIntervalsVisibilitiesVisibleAtInterval)(e,this._model.mainSeries().intervalObj()),this.properties().childs().intervalsVisibilities.mergeAndFire(e))}clonePositionOffset(){return this.isFixed()?{barOffset:0,xCoordOffset:20,yCoordOffset:20}:{barOffset:0,xCoordOffset:0,yCoordOffset:-40}}sharingMode(){return this._sharingMode}share(e){this.isSynchronizable()&&this._sharingMode.setValue(e)}syncLineStyleState(){const e=this.properties().state(this._syncStateExclusions);return delete e.interval,e.intervalsVisibilities=(0,w.mergeIntervalVisibilitiesDefaults)(e.intervalsVisibilities),e}moveLineTool(e){e.forEach(((e,t)=>this._setPoint(t,e))),this._normalizePoints()}_setPoint(e,t){this._points[e].index===t.index?this._points[e].price=t.price:this._points[e]=t,this._pointChanged.fire(e)}_correctLastPoint(e){return(0,h.clone)(e)}_pointsForPointset(){return this._timePoint.map((e=>[e.time_t,e.offset]))}_snapPoint45Degree(e,t,i){const n=this._model.timeScale(),o=n.indexToCoordinate(t.index),s=n.indexToCoordinate(e.index)-o,a=(0,r.ensureNotNull)(this.priceScale()),l=t.price,d=e.price,u=(0,r.ensureNotNull)((0,r.ensureNotNull)(this.ownerSource()).firstValue()),c=a.priceToCoordinate(l,u),h=a.priceToCoordinate(d,u)-c,p=Math.round(Math.atan2(s,h)/Math.PI*4);if(2===Math.abs(p))i||(e.price=l);else if(0===Math.abs(p)||4===Math.abs(p))i||(e.index=t.index);else{const t=Math.sqrt(s*s+h*h),i=s<0?-1:1,r=h<0?-1:1;let l=Math.max(Math.abs(h),Math.abs(s));l/=l*Math.sqrt(2)/t;const d=Math.round(n.coordinateToIndex(o+l*i)),p=Math.abs(n.indexToCoordinate(d)-o),m=a.coordinateToPrice(c+p*r,u);e.index=d,e.price=m}}_normalizePoint(e){return{...this._model.timeScale().normalizeBarIndex(e.index),price:e.price}}_normalizePoints(){this._timePoint=[];for(let e=0;ethis._destroyPanePaneViews(t))),this._model.lightUpdate()}_getPaneViews(e){return this._paneViews.get(e)||null}_updateAllPaneViews(e){this._paneViews.forEach((t=>{for(const i of t)i.update(e)}))}_alignPointHorizontallyOrVertically(e){const t=(0,r.ensureNotNull)(this.pointToScreenPoint(e)),i=(0,r.ensureDefined)((0,r.ensureNotNull)(this._startMovingPoint).logical),n=(0,r.ensureDefined)((0,r.ensureNotNull)(this._startMovingPoint).screen),o=Math.abs(n.x-t.x),s=Math.abs(n.y-t.y);if(o<10&&s<10)return e;return{index:o=1?{didCorrect:!0,point:e.add(n)}:{didCorrect:!1,point:e}}_currentPointsetIdWithPrefix(){return"pointset_"+(0,r.ensureNotNull)(this._currentPointsetAndSymbolId).pointsetId}_clearServerPoints(){null!==this._currentPointsetAndSymbolId&&this._model.chartApi().isConnected().value()&&this._model.chartApi().removePointset(this._currentPointsetIdWithPrefix()),this._currentPointsetAndSymbolId=null}_createPointProperty(e){const t=this._pointsProperty.childs().points;t.addProperty(""+e,{});const i=t[e];i.addChild("price",new V.LineDataSourcePointPriceProperty(this,e)),i.addChild("bar",new k.LineDataSourcePointIndexProperty(this,e))}_createPointsProperties(){this._pointsProperty=new P.Property,this._pointsProperty.addChild("points",new P.Property);for(let e=0;e=2&&this._snapTo45DegreesAvailable()&&this._snapPoint45Degree(i,this.points()[this.points().length-2]),i}_addPointIntenal(e,t,i){this._points.push(e);const n=this._points.length===this.pointsCount();return n?(this._lastPoint=null,i||(this._normalizePoints(),this.createServerPoints())):this._lastPoint=e,this._pointAdded.fire(this._points.length-1),n}_onSourceHiddenMayChange(){this._model.invalidate(y.InvalidationMask.validateAction((()=>{this!==this._model.lineBeingCreated()&&(this._isDestroyed||this.processHibernate())})))}_saveAlertIdInState(){return!0}_onPointsetUpdated(e){if(0!==e.length){for(let t=0;t0}_onAlertData(e){}_propertiesStateExclusions(){return[]}_syncLineStyleIfNeeded(){const e=this.linkKey().value();!this._syncLineStyleMuted&&e&&(0,C.changeLineStyle)({linkKey:e,state:this.syncLineStyleState(),model:this._model})}_muteSyncLineStyle(){this._syncLineStyleMuted=!0}_unmuteSyncLineStyleWithoutApplyingChanges(){this.propertiesChanged(),this._syncLineStyleMuted=!1}_applyTemplateImpl(e){e.intervalsVisibilities=(0,w.mergeIntervalVisibilitiesDefaults)(e.intervalsVisibilities);const t=this.properties();t.applyTemplate(e,(0,R.factoryDefaults)(this.toolname.toLowerCase())),t.saveDefaults(),this.propertiesChanged()}_getPropertyDefinitionsViewModelClass(){return Promise.resolve(null)}_getAlertPlots(){return[]}_getUndoHistory(){return this._model.undoModel().undoHistory()}_synchronizeAlert(e){const t=this._getUndoHistory();if(!this._undoCheckpointAlert&&!this._alertUndoMode){const e=t.undoStack().pop();this._undoCheckpointAlert=t.createUndoCheckpoint(),e&&t.undoStack().push(e)}const i=e=>{const t=e.description()!==e.defaultDescription(),i=this._model.mainSeries().stateForAlert();e.startEditing(),e.isOHLC()&&i.actualSymbol===e.actualSymbol()&&e.setSeriesState(i),e.setMainSeriesState(i),e.setSymbol(i.symbolString);const n=(0,r.ensureNotNull)(this.stateForAlert()) ;e.setResolution(n.interval),e.setLineState(n),t||e.resetToDefaultDescription(),e.finishEditing(),this._localAndServerAlertsMismatch=!0},n=()=>{this._alertUndoMode=!0,t.undoToCheckpoint((0,r.ensureDefined)(this._undoCheckpointAlert)),setTimeout((()=>{this._alertUndoMode=!1,this._localAndServerAlertsMismatch=!1}),0)},o=e=>{"not_exists"!==e&&(z.logError("Getting alert failed: "+e),n())},s=async e=>{(await(0,p.getChartAlertsFacade)()).restartAlert(e,{success:()=>this._localAndServerAlertsMismatch=!1,error:o,complete:()=>delete this._undoCheckpointAlert,actionSource:"drawing_sync"})};(0,m.canPlaceAlertOnResolution)(this.stateForAlert().interval)?this.getAlert().then((t=>{t?(i(t),e&&(s(t),this._onAlertData(t))):z.logError("Failed to get alert, drawing and alert are not synchronized")})).catch(o):this._alertUndoMode||((0,v.showGoProAlertsOnSecondsDialog)(),n(),delete this._undoCheckpointAlert)}_linePointsToAlertPlot(e,t,i,n){if(2!==e.length)return z.logError("[Drawing Alert] Wrong points"),null;const o=this._model.timeScale();return!o||o.isEmpty()?null:{type:"LinePlot",title:t||this.translatedType(),timestamp:(0,r.ensureNotNull)(o.indexToTimePoint(0)),offset1:e[0].index,offset2:e[1].index,price1:e[0].price,price2:e[1].price,extendBackward:i||!1,extendForward:n||!1}}_getAlertCreationAvailable(){return f.alertsAvailable&&super._getAlertCreationAvailable()&&!this._areAlertsOnLineToolProhibited()&&!this._hasAlert.value()}static _configureProperties(e){if(this._addCollectedProperties(e),e.hasChild("symbolStateVersion")||e.addChild("symbolStateVersion",new P.Property(1)),e.hasChild("zOrderVersion")||e.addChild("zOrderVersion",new P.Property(1)),e.hasChild("visible")||e.addChild("visible",new P.Property(!0)),e.hasChild("frozen")||e.addChild("frozen",new P.Property(!1)),e.hasChild("symbol")||e.addChild("symbol",new P.Property("")),e.hasChild("currencyId")||e.addChild("currencyId",new P.Property(null)),e.hasChild("unitId")||e.addChild("unitId",new P.Property(null)),e.addExcludedKey("symbolStateVersion",1),e.addExcludedKey("zOrderVersion",1),e.addExcludedKey("visible",1),e.addExcludedKey("frozen",1),e.addExcludedKey("symbol",1),e.addExcludedKey("currencyId",1),e.addExcludedKey("unitId",1),e.hasChild("intervalsVisibilities")){const t=(0,h.merge)((0,h.clone)(T.intervalsVisibilitiesDefaults),e.childs().intervalsVisibilities.state());e.removeProperty("intervalsVisibilities"),e.addChild("intervalsVisibilities",new E.IntervalsVisibilitiesProperty(t))}else e.addChild("intervalsVisibilities",new E.IntervalsVisibilitiesProperty(T.intervalsVisibilitiesDefaults));e.hasChild("title")||e.addChild("title",new P.Property("")),e.addExcludedKey("symbolInfo",1),e.addExcludedKey("points",1),e.addExcludedKey("interval",1),e.addExcludedKey("title",1),e.hasChild("singleChartOnly")&&e.removeProperty("singleChartOnly"),e.hasChild("font")&&e.removeProperty("font")}static _addCollectedProperties(e){e.hasChild("linewidth")&&e.addChild("linesWidths",new N.LineToolWidthsProperty([(0,r.ensureDefined)(e.child("linewidth"))])), e.hasChild("linecolor")&&e.addChild("linesColors",new N.LineToolColorsProperty([(0,r.ensureDefined)(e.child("linecolor"))])),e.hasChild("backgroundColor")&&e.addChild("backgroundsColors",new N.LineToolColorsProperty([(0,r.ensureDefined)(e.child("backgroundColor"))])),e.hasChild("textColor")&&e.addChild("textsColors",new N.LineToolColorsProperty([(0,r.ensureDefined)(e.child("textColor"))])),e.addExcludedKey("linesWidths",3),e.addExcludedKey("linesColors",3),e.addExcludedKey("backgroundsColors",3),e.addExcludedKey("textsColors",3)}_areAlertsOnLineToolProhibited(){return null!==this._ownerSource&&!this._ownerSource.canHasAlertOnLineTools()}_removeAlertSubscriptions(){var e;null===(e=this._unsubscribeAlertCallbacks)||void 0===e||e.call(this),this._unsubscribeAlertCallbacks=void 0}_addAlertSubscriptions(e){if(void 0!==this._unsubscribeAlertCallbacks)return;const t=this.properties().child("extendLeft"),i=this.properties().child("extendRight"),n=e.destroyed().spawn(),r=e.selected().spawn(),o=e.hovered().spawn();n.subscribe(this.removeAlert.bind(this)),r.subscribe((e=>{this._model.selectionMacro((t=>{e?t.addSourceToSelection(this):t.removeSourceFromSelection(this)}))})),o.subscribe((e=>{const t=this._model.hoveredSource();e&&t!==this?this._model.setHoveredSource(this,null):e||t!==this||this._model.setHoveredSource(null,null)})),void 0!==t&&t.subscribe(this,(()=>this.synchronizeAlert(!1))),void 0!==i&&i.subscribe(this,(()=>this.synchronizeAlert(!1))),this._unsubscribeAlertCallbacks=()=>{n.destroy(),o.destroy(),r.destroy(),void 0!==t&&t.unsubscribeAll(this),void 0!==i&&i.unsubscribeAll(this)}}_destroyPanePaneViews(e){const t=this._paneViews.get(e);if(void 0!==t)for(const e of t)e.destroy&&e.destroy();void 0!==e&&e.onDestroyed().unsubscribeAll(this),this._paneViews.delete(e)}_copyPricesWithoutNormalization(){const e=Math.min(this._points.length,this._timePoint.length);for(let t=0;t{"use strict";t.LineToolFibRetracement=i(498995).LineToolFibRetracement,t.LineToolFibChannel=i(965989).LineToolFibChannel,t.LineToolFibSpeedResistanceArcs=i(974472).LineToolFibSpeedResistanceArcs,t.LineToolProjection=i(506416).LineToolProjection,t.LineToolTrendBasedFibExtension=i(882980).LineToolTrendBasedFibExtension,t.LineToolElliott=i(960690).LineToolElliott,t.LineToolFibCircles=i(953718).LineToolFibCircles,t.LineToolVertLine=i(43653).LineToolVertLine,t.LineToolCrossLine=i(73217).LineToolCrossLine,t.LineToolBarsPattern=i(180148).LineToolBarsPattern,t.LineToolTrendBasedFibTime=i(418219).LineToolTrendBasedFibTime,t.LineToolFibTimeZone=i(958849).LineToolFibTimeZone,t.LineToolCircleLines=void 0,t.LineToolDateRange=i(727264).LineToolDateRange,t.LineToolPriceRange=i(830695).LineToolPriceRange,t.LineToolDateAndPriceRange=i(836843).LineToolDateAndPriceRange,t.LineToolParallelChannel=i(247035).LineToolParallelChannel,t.LineToolTrendAngle=i(167723).LineToolTrendAngle,t.LineToolTrendLine=i(956268).LineToolTrendLine,t.LineToolInfoLine=i(933513).LineToolInfoLine, t.LineToolArrowMark=i(41394).LineToolArrowMark,t.LineToolImage=i(17329).LineToolImage,t.LineToolPitchfan=i(932732).LineToolPitchfan,t.LineToolGannSquare=i(168853).LineToolGannSquare,t.LineToolFibSpeedResistanceFan=i(63491).LineToolFibSpeedResistanceFan,t.LineToolGannComplex=i(833762).LineToolGannComplex,t.LineToolGannFixed=i(839386).LineToolGannFixed,t.LineToolGannFan=i(643442).LineToolGannFan,t.LineToolFibWedge=i(781811).LineToolFibWedge,t.LineToolPitchfork=i(9093).LineToolPitchfork,t.LineToolDisjointAngle=i(709638).LineToolDisjointChannel,t.LineToolFlatBottom=i(634659).LineToolFlatBottom,t.LineToolIcon=i(618117).LineToolIcon,t.LineToolEmoji=i(167843).LineToolEmoji,t.LineToolSticker=i(882626).LineToolSticker,t.LineToolRotatedRectangle=i(605703).LineToolRotatedRectangle,t.LineToolFibSpiral=void 0,t.LineToolHeadAndShoulders=i(336471).LineToolHeadAndShoulders,t.LineToolTriangle=i(287743).LineToolTriangle,t.LineToolTrianglePattern=i(948653).LineToolTrianglePattern,t.LineTool5PointsPattern=i(147985).LineTool5PointsPattern,t.LineToolThreeDrivers=i(521600).LineToolThreeDrivers,t.LineToolABCD=i(78).LineToolABCD,t.LineToolPolyline=i(527342).LineToolPolyline,t.LineToolPath=i(999432).LineToolPath,t.LineToolPrediction=i(240569).LineToolPrediction,t.LineToolPriceLabel=i(729443).LineToolPriceLabel,t.LineToolPriceNote=void 0,t.LineToolArrowMarker=i(683396).LineToolArrowMarker,t.LineToolNote=i(619540).LineToolNote,t.LineToolNoteAbsolute=i(619540).LineToolNoteAbsolute,t.LineToolSignpost=i(812788).LineToolSignpost,t.LineToolBrush=i(271133).LineToolBrush,t.LineToolArc=i(907416).LineToolArc,t.LineToolCallout=i(844295).LineToolCallout,t.LineToolBalloon=i(179180).LineToolBalloon,t.LineToolComment=i(768574).LineToolComment,t.LineToolText=i(520259).LineToolText,t.LineToolHorzLine=i(994761).LineToolHorzLine,t.LineToolHorzRay=i(867716).LineToolHorzRay,t.LineToolRectangle=i(442724).LineToolRectangle,t.LineToolCircle=i(638202).LineToolCircle,t.LineToolEllipse=i(43853).LineToolEllipse,t.LineToolTimeCycles=i(36459).LineToolTimeCycles,t.LineToolSineLine=i(305480).LineToolSineLine,t.LineToolGhostFeed=i(711755).LineToolGhostFeed,t.LineToolBezierQuadro=i(516487).LineToolBezierQuadro,t.LineToolBezierCubic=i(511628).LineToolBezierCubic,t.LineToolArrow=i(548160).LineToolArrow,t.LineToolRay=i(352747).LineToolRay,t.LineToolExtended=i(252598).LineToolExtended,t.LineToolSchiffPitchfork=i(115137).LineToolSchiffPitchfork,t.LineToolSchiffPitchfork2=i(126144).LineToolSchiffPitchfork2,t.LineToolInsidePitchfork=i(478760).LineToolInsidePitchfork,t.LineToolTextAbsolute=i(520259).LineToolTextAbsolute,t.LineToolArrowMarkLeft=i(41394).LineToolArrowMarkLeft,t.LineToolArrowMarkRight=i(41394).LineToolArrowMarkRight,t.LineToolArrowMarkUp=i(41394).LineToolArrowMarkUp,t.LineToolArrowMarkDown=i(41394).LineToolArrowMarkDown,t.LineToolFlagMark=i(218032).LineToolFlagMark,t.LineToolCypherPattern=i(224777).LineToolCypherPattern,t.LineToolElliottImpulse=i(960690).LineToolElliottImpulse,t.LineToolElliottTriangle=i(960690).LineToolElliottTriangle, t.LineToolElliottTripleCombo=i(960690).LineToolElliottTripleCombo,t.LineToolElliottCorrection=i(960690).LineToolElliottCorrection,t.LineToolElliottDoubleCombo=i(960690).LineToolElliottDoubleCombo,t.LineToolRiskRewardLong=i(864555).LineToolRiskRewardLong,t.LineToolRiskRewardShort=i(864555).LineToolRiskRewardShort,t.LineToolPosition=i(674053).LineToolPosition,t.LineToolOrder=i(778737).LineToolOrder,t.LineToolHighlighter=i(680330).LineToolHighlighter,t.LineToolTweet=i(623336).LineToolTweet,t.LineToolIdea=i(900569).LineToolIdea},817724:(e,t,i)=>{"use strict";i.d(t,{StudyLineDataSource:()=>I});var n=i(389137),r=i(195447),o=i(821979),s=i(853965),a=i(526075),l=i(484812),d=i(62745),u=i(114315),c=i(799567),h=i(989709),p=i(752928),m=i(964824),v=i(7288),f=i(985715);class g extends f.StatusProviderBase{constructor(e){super(),this._source=e}errorStatus(){const e=this._source.status();return e.type===v.StudyStatusType.Error?{error:this.sourceStatusText(),solutionId:(0,v.studyStatusSolutionId)(e),title:(0,v.studyStatusTitle)(e),studyFeature:(0,v.studyStatusFeature)(e)}:null}getSplitTitle(){return this._source.titleInParts()}text(){return this._source.translatedType()}sourceStatusText(){return(0,v.convertStudyStatusToString)(this._source.status(),!0)}}var _=i(877009),y=i(855353);class I extends o.LineDataSource{constructor(e,t,n,r,o,s){super(e,r,o,s),this._indexes=null,this._inputs=null,this._definitionsViewModel=null,this._pointsetPoints=null,this._loadedPlots=null,this._loadedGraphics=null,this._beingCreatedPaneView=null,this._anchorsPaneView=null,this._isLegendDisplayed=!1,Promise.all([Promise.all([i.e(39232),i.e(33193),i.e(99898),i.e(76792),i.e(77028),i.e(51583)]).then(i.bind(i,67663)),Promise.all([i.e(39232),i.e(33193),i.e(99898),i.e(76792),i.e(77028),i.e(51583)]).then(i.bind(i,199258))]).then((t=>{const{LineToolBeingCreatedPaneView:i}=t[0],{StudyLineDataSourceAnchorsPaneView:n}=t[1];this._beingCreatedPaneView=new i(this,e),this._anchorsPaneView=new n(this,this.model()),this._model.lightUpdate()})),this._metaInfo=t,this._dataSource=new u.ExtendedStudyDataSource(e.chartApi(),e.mainSeries(),n,t),this._dataSource.dataCleared().subscribe(this,this._onDataCleared),this._dataSource.dataUpdated().subscribe(this,this._onDataUpdated),this._dataSource.studyStatusChanged().subscribe(this,this._onStudyStatusChanged),this._statusProvider=new g(this),this._statusView=new y.LineToolStudyStatusView(this),this._showStudyArgumentsProperty=e.properties().childs().paneProperties.childs().legendProperties.childs().showStudyArguments}isDisplayedInLegend(){return this._isLegendDisplayed}titleInParts(){const e=[];if(this._showStudyArgumentsProperty.value()&&this._inputs)for(const t of this._metaInfo.inputs){if(!0===t.isHidden||"bool"===t.type)continue;const i=this._inputs[t.id];e.push(i.toString())}return[this.name(),e]}destroy(){this._dataSource.dataUpdated().unsubscribeAll(this),this._dataSource.dataCleared().unsubscribeAll(this),this._dataSource.studyStatusChanged().unsubscribeAll(this),this._dataSource.destroy(), null!==this._definitionsViewModel&&(this._definitionsViewModel.destroy(),this._definitionsViewModel=null),this._unsubscribeApplyInputsOnSeriesCompleted(),this._isDestroyed=!0,super.destroy()}stop(){super.stop(),this._isDestroyed||(this._dataSource.stop(),this.clearData())}start(){super.start(),this._isDestroyed||null===this._inputs||this._dataSource.start()}metaInfo(){return this._metaInfo}graphicsInfo(){return this._metaInfo.graphics}series(){return this._model.mainSeries()}translatedType(){return this._metaInfo.description}name(){return this._metaInfo.description}studyId(){return this._metaInfo.id}setPoint(e,t,i){super.setPoint(e,this._preparePoint(t,i))}move(e){}clearData(){this._clearAllDataExceptPointsetPoints(),this._pointsetPoints=null,this.updateAllViews((0,m.sourceChangeEvent)({sourceId:this.id(),clearData:!0})),super.clearData()}data(){return this.plots()}plots(){return this._loadedPlots||this._dataSource.plots()}graphics(){return this._loadedGraphics||this._dataSource.graphics()}valueAt(e,t){var i,n;return null!==(n=null===(i=this.ownerSource())||void 0===i?void 0:i.symbolSource().valueAt(e,t))&&void 0!==n?n:null}firstValue(){return this._model.mainSeries().firstValue()}state(e){const t=super.state(e);let i;this.metaInfo()instanceof a.StudyMetaInfo?i=this.metaInfo().state():(i=(0,n.clone)(this.metaInfo()),i.id=a.StudyMetaInfo.parseIdString(i.id+(i.version?"-"+i.version:"")).fullId);const r={...t,metaInfo:i};return e&&(r.data=this.plots().state(),r.nonseriesindexes=this._indexes,r.graphics=(0,l.saveStudyGraphics)(this.graphics(),null)),r}restoreData(e){var t;void 0!==e.data&&(this._loadedPlots=new r.PlotList((0,h.studyPlotFunctionMap)(this._metaInfo),h.studyEmptyPlotValuePredicate),this._loadedPlots.restoreState(e.data)),this._indexes=null!==(t=e.nonseriesindexes)&&void 0!==t?t:this._indexes,this._loadedGraphics=e.graphics?(0,l.loadStudyGraphics)(e.graphics):this._loadedGraphics}getPropertyDefinitionsViewModel(){return null===this._definitionsViewModel?this._getPropertyDefinitionsViewModelClass().then((e=>null===e||this._isDestroyed?null:(null===this._definitionsViewModel&&(this._definitionsViewModel=new e(this._model.undoModel(),this)),this._definitionsViewModel))):Promise.resolve(this._definitionsViewModel)}paneViews(e){let t=[];if(this.isSourceHidden())return t;if(this._isReady()&&this._changeStatesStack.isEmpty()){const i=super.paneViews(e);null!==i&&(t=t.concat(i))}else null!==this._beingCreatedPaneView&&t.push(this._beingCreatedPaneView);return null!==this._anchorsPaneView&&t.push(this._anchorsPaneView),t}propertiesChanged(e){super.propertiesChanged(e),this._onStudyInputsMayChange()}dataAndViewsReady(){return super.dataAndViewsReady()&&this._isReady()}endChanging(e,t){const i=super.endChanging(e,t);return i.indexesChanged?this.clearData():this._updateAnchorsPrice(!0),i}moveData(e){this._dataSource.moveData(e)}restorePoints(e,t,i){super.restorePoints(e,t,i),this._updateAnchorsPrice(!0)}statusProvider(e){return this._statusProvider}statusView(){return this._statusView}legendView(){return null} dataProblemModel(){return null}dataUpdatedModeModel(){return null}marketStatusModel(){return null}onStatusChanged(){return this._dataSource.studyStatusChanged()}status(){return this._dataSource.studyStatus()}recalcStudyIfNeeded(){}static createPropertiesFromStudyMetaInfoAndState(e,t,i,n){const r=(0,p.prepareStudyPropertiesForLoadChart)(e,t,i,n);return this._configureProperties(r),r}_onStudyStatusChanged(e,t){let i;switch(t.type){case c.StudyStatusType.Error:i=!0;break;case c.StudyStatusType.Completed:i=!1;break;default:return}if(i===this._isLegendDisplayed)return;this._isLegendDisplayed=i;const n=this._model.paneForSource(this);if(n){const e=this._model.panes().indexOf(n),t=_.InvalidationMask.invalidateLegendWidgetLayout(e);this.model().invalidate(t)}}_studyId(){return this._dataSource.studyId()}_isReady(){return!0}_updateAllPaneViews(e){var t,i;super._updateAllPaneViews(e),null===(t=this._beingCreatedPaneView)||void 0===t||t.update(),null===(i=this._anchorsPaneView)||void 0===i||i.update(e)}_getPointTime(e,t){const i=e.index,n=this._model.timeScale().indexToTimePoint(i);return null!==n?n:t||void 0===e.time?null:this._utcTimeInCurrentResolution(e)}_updateAnchorsPrice(e){}_onPointsetUpdated(e){super._onPointsetUpdated(e),this._pointsetPoints=this._points.map((e=>({price:e.price,index:e.index,time:e.time}))),this._onStudyInputsMayChange()}_onDataCleared(){this.updateAllViews((0,m.sourceChangeEvent)({sourceId:this.id(),clearData:!0})),this._model.updateSource(this)}_onDataUpdated(e,t,i){var n;this._updateAnchorsPrice(),this.updateAllViews((0,m.sourceChangeEvent)({sourceId:this.id(),firstUpdatedTimePointIndex:null===(n=e[0])||void 0===n?void 0:n.index})),this._model.updateSource(this)}_onStudyInputsMayChange(){let e=null;if(null!==this._pointsetPoints&&this._pointsetPoints.length===this.pointsCount()&&(e=this._studyInputs(this._pointsetPoints),null===e&&(this._clearAllDataExceptPointsetPoints(),this.updateAllViews((0,m.sourceChangeEvent)(this.id())))),null!==e){const t=this.metaInfo().inputs.map((e=>e.id)),i=Object.keys(e);for(const n of i)t.includes(n)||delete e[n]}this._areInputsEqual(this._inputs,e)||this._applyStudyInputs(e)}_preparePoint(e,t){return super._preparePoint(this._alignPointToRangeOfActualData(e),t)}_getPropertyDefinitionsViewModelClass(){return Promise.resolve(null)}_subscribeApplyInputsOnSeriesCompleted(){this._unsubscribeApplyInputsOnSeriesCompleted(),this._model.mainSeries().dataEvents().completed().subscribe(this,(()=>this._onStudyInputsMayChange()),!0)}_unsubscribeApplyInputsOnSeriesCompleted(){this._model.mainSeries().dataEvents().completed().unsubscribeAll(this)}_onInputsChanged(){this.hasAlert().value()&&(this._localAndServerAlertsMismatch=!0)}_clearAllDataExceptPointsetPoints(){this._inputs=null,this._dataSource.clearData(),this._loadedPlots=null,this._indexes=null,this._loadedGraphics=null}static _createPropertiesFromStudyIdAndState(e,t){const i=a.StudyMetaInfo.getStudyPropertyRootNameById(e),n=new s.DefaultProperty({defaultName:i,state:t});return this._configureProperties(n),n} static _configureProperties(e){super._configureProperties(e),e.removeExcludedKey("intervalsVisibilities",1)}_areInputsEqual(e,t){return null===t?null===e:null!==e&&(0,d.areStudyInputsEqual)(this._metaInfo.inputs,e,t)}_applyStudyInputs(e){const t=this._inputs;this._inputs=e,null!==e&&(this._unsubscribeApplyInputsOnSeriesCompleted(),this._dataSource.setInputs(e),null===t&&this.isStarted()&&!this._dataSource.isStarted()&&this._dataSource.start()),this._onInputsChanged()}}},477227:(e,t,i)=>{"use strict";const n=i(821979).LineDataSource,r=i(593804).alignToStep,o=(i(551775).customFormatters,i(444331).createSeriesFormatter);class s extends n{constructor(e,t){super(e,t),this.customization.forcePriceAxisLabel=!0,this.customization.disableErasing=!0,this.customization.showInObjectsTree=!1,this._createFormatter(e.mainSeries().symbolInfo()),this.setSelectionEnabled(!1)}isSynchronizable(){return!1}pointsCount(){return s.POINTS_COUNT}hasContextMenu(){return!1}state(){return null}startMoving(){super.startMoving.apply(this,arguments),this._cursorMoved=!1}endMoving(){super.endMoving.apply(this,arguments),this._cursorMoved=!1}userEditEnabled(){return!0}movable(){return!1}canBeHidden(){return!1}isUserDeletable(){return!1}showInObjectTree(){return!1}doesMovingAffectsUndo(){return!1}isAvailableInFloatingWidget(){return!1}timeAxisViews(){return null}cloneable(){return!1}copiable(){return!1}_correctPoints(e,t){this._currentMovingPoint&&this._startMovingPoint?this._currentMovingPoint.logical.price-this._startMovingPoint.logical.price&&(this._cursorMoved=!0):this._cursorMoved=!1;for(var i=1/this.priceScale().mainSource().base(),n=0;n{"use strict";i.d(t,{unpackNonSeriesData:()=>o});var n=i(130551),r=i(133822);async function o(e){if(""===e)return null;const t=JSON.parse(e);if(!(0,n.isObject)(t)||"function"==typeof t)throw new Error("Non-object content in the non-series envelope");if((0,n.hasProperty)(t,"indexes_replace"))return{indexes_replace:!0};const o={indexes_replace:!1};if((0,n.hasProperty)(t,"offsets")&&(o.offsets=t.offsets),(0,n.hasProperty)(t,"isUpdate")){if("boolean"!=typeof t.isUpdate)throw new Error('Invalid type of "isUpdate" field');o.isUpdate=t.isUpdate}if((0,n.hasProperty)(t,"data")&&(o.data=t.data),(0,n.hasProperty)(t,"graphicsCmds")&&(o.graphicsCmds=(0,r.validateGraphicsCommands)(t.graphicsCmds)),(0,n.hasProperty)(t,"dataCompressed")||(0,n.hasProperty)(t,"graphicsCmdsCompressed")){const{default:e}=await Promise.all([i.e(93194),i.e(81578)]).then(i.t.bind(i,593194,23));if((0,n.hasProperty)(t,"dataCompressed")){const i=await(new e).loadAsync(t.dataCompressed,{base64:!0});o.data=JSON.parse(await i.file("").async("text"))}if((0,n.hasProperty)(t,"graphicsCmdsCompressed")){const i=await(new e).loadAsync(t.graphicsCmdsCompressed,{base64:!0});o.graphicsCmds=(0, r.validateGraphicsCommands)(JSON.parse(await i.file("").async("text")))}return o}return o}},195447:(e,t,i)=>{"use strict";i.d(t,{PlotList:()=>h,mergeMinMax:()=>p});var n=i(650151),r=i(674981),o=i(732149),s=i(201089),a=i(534741);const l=(0,s.getLogger)("Chart.PlotList"),d=30;function u(e){return e.index}function c(e){return e.value[0]}class h{constructor(e=null,t=null){this._items=[],this._start=0,this._end=0,this._shareRead=!1,this._minMaxCache=new Map,this._rowSearchCacheByIndex=new Map,this._rowSearchCacheByIndexWithoutEmptyValues=new Map,this._rowSearchCacheByTime=new Map,this._rowSearchCacheByTimeWithoutEmptyValues=new Map,this._plotFunctions=e||new Map,this._emptyValuePredicate=t}clear(){this._items=[],this._start=0,this._end=0,this._shareRead=!1,this._minMaxCache.clear(),this._invalidateSearchCaches()}first(){return this.size()>0?this._items[this._start]:null}last(){return this.size()>0?this._items[this._end-1]:null}firstIndex(){return this.size()>0?this._indexAt(this._start):null}lastIndex(){return this.size()>0?this._indexAt(this._end-1):null}clone(){const e=this.firstIndex(),t=this.lastIndex();return null===e||null===t?new h:this.range(e,t)}size(){return this._end-this._start}isEmpty(){return 0===this.size()}contains(e){return null!==this.search(e,a.PlotRowSearchMode.Exact)}valueAt(e){const t=this.search(e);return null!==t?t.value:null}add(e,t){if(this._shareRead)return l.logDebug("add: readonly collection modification attempt"),!1;const i={index:e,value:t},n=this._nonCachedSearch(e,a.PlotRowSearchMode.Exact,u);return this._invalidateSearchCaches(),null===n?(this._items.splice(this._lowerbound(e,u),0,i),this._start=0,this._end=this._items.length,!0):(this._items[n]=i,!1)}search(e,t=a.PlotRowSearchMode.Exact,i){return this._searchImpl(e,t,this._rowSearchCacheByIndex,this._rowSearchCacheByIndexWithoutEmptyValues,u,i)}searchByTime(e,t=a.PlotRowSearchMode.Exact,i){return this._searchImpl(e,t,this._rowSearchCacheByTime,this._rowSearchCacheByTimeWithoutEmptyValues,c,i)}fold(e,t){let i=t;for(let t=this._start;t=i;--t){const i=this._indexAt(t),n=this._valueAt(t);if(e(i,n))return{index:i,value:n}}return null}each(e){for(let t=this._start;tthis._start&&(t._start-=1),t}rangeCountback(e,t){if(null===this.firstIndex())return new h;const i=new h(this._plotFunctions,this._emptyValuePredicate);return i._items=this._items,i._end=this._upperbound(e),i._start=Math.max(this._start,i._end-t),i._shareRead=!0,i}rangeIterator(e,t){const i=this._lowerbound(e,u),n=this._upperbound(t);return this._rangeIteratorImpl(i,n)}fullRangeIterator(){return this._rangeIteratorImpl(this._start,this._end)}minMaxOnRangeCached(e,t,i){if(this.isEmpty())return null;let n=null;for(const r of i){n=p(n,this._minMaxOnRangeCachedImpl(e-r.offset,t-r.offset,r.name))}return n}minMaxOnRange(e,t,i){if(this.isEmpty())return null;let n=null;for(const r of i){n=p(n,this._minMaxOnRange(e-r.offset,t-r.offset,r.name))}return n}merge(e){return this._shareRead?(l.logDebug("merge: readonly collection modification attempt"),null):0===e.length?null:this.isEmpty()||e[e.length-1].indexthis._items[this._items.length-1].index?this._append(e):1===e.length&&e[0].index===this._items[this._items.length-1].index?(this._updateLast(e[0]),e[0]):this._merge(e)}addTail(e,t=!1){if(0===e.length)return;let i=0;t&&this._end-this._start>0&&(i=1,this._items[this._end-this._start-1].value=e[0].value);for(let t=i;tvoid 0!==e)).sort(((e,t)=>e.index-t.index)),this._invalidateSearchCaches(),this._minMaxCache.clear(),this._start=0,this._end=this._items.length}remove(e){if(this._shareRead)return l.logDebug("remove: readonly collection modification attempt"),null;const t=this._nonCachedSearch(e,a.PlotRowSearchMode.NearestRight,u);if(null===t)return null;const i=this._items.splice(t);return this._end=this._items.length,this._minMaxCache.clear(),this._invalidateSearchCaches(),i.length>0?i[0]:null}state(){const e=this._items.slice(this._start,this._end);return{start:0,end:e.length,data:e}}restoreState(e){e?(this._start=e.start,this._end=e.end,this._shareRead=!1,this._items=e.data,this._minMaxCache.clear(),this._invalidateSearchCaches()):this.clear()}_indexAt(e){return this._items[e].index}_valueAt(e){return this._items[e].value}_length(){return this._items.length}_searchImpl(e,t,i,n,r,o){const s=void 0!==o?i:n,a=void 0!==o?1e4*(t+1)+o:t;let l=s.get(e);if(void 0!==l){const e=l.get(a);if(void 0!==e)return e}const d=this._nonCachedSearch(e,t,r,o);if(null===d)return null;const u={index:this._indexAt(d),value:this._valueAt(d)} ;return void 0===l&&(l=new Map,s.set(e,l)),l.set(a,u),u}_nonCachedSearch(e,t,i,n){const r=this._lowerbound(e,i),o=r===this._end||e!==i(this._items[r]);if(o&&t!==a.PlotRowSearchMode.Exact)switch(t){case a.PlotRowSearchMode.NearestLeft:return this._searchNearestLeft(r,n);case a.PlotRowSearchMode.NearestRight:return this._searchNearestRight(r,n);default:throw new TypeError("Unknown search mode")}if(void 0===n||o||t===a.PlotRowSearchMode.Exact)return o?null:r;switch(t){case a.PlotRowSearchMode.NearestLeft:return this._nonEmptyNearestLeft(r,n);case a.PlotRowSearchMode.NearestRight:return this._nonEmptyNearestRight(r,n);default:throw new TypeError("Unknown search mode")}}_nonEmptyNearestRight(e,t){const i=(0,n.ensure)(this._emptyValuePredicate),r=(0,n.ensure)(t);for(;e=this._start&&i(this._valueAt(e),r);)e-=1;return et(e)t.index>e),this._start,this._end)}_plotMinMax(e,t,i){let n=null;const r=this._plotFunctions.get(i);if(void 0===r)throw new Error(`Plot "${i}" is not registered`);for(let i=e;in.max&&(n.max=e)))}return n}_invalidateCacheForRow(e){const t=Math.floor(e.index/d);this._minMaxCache.forEach((e=>e.delete(t)))}_prepend(e){return(0,n.assert)(!this._shareRead,"collection should not be readonly"),(0,n.assert)(0!==e.length,"plotRows should not be empty"),this._invalidateSearchCaches(),this._minMaxCache.clear(),this._items=e.concat(this._items),this._start=0,this._end=this._items.length,e[0]}_append(e){return(0,n.assert)(!this._shareRead,"collection should not be readonly"),(0,n.assert)(0!==e.length,"plotRows should not be empty"),this._invalidateSearchCaches(),this._minMaxCache.clear(),this._items=this._items.concat(e),this._start=0,this._end=this._items.length,e[0]}_updateLast(e){(0,n.assert)(!this.isEmpty(),"plot list should not be empty");const t=this._items[this._end-1];(0,n.assert)(t.index===e.index,"last row index should match new row index"),this._invalidateCacheForRow(e),this._invalidateSearchCaches(),this._items[this._end-1]=e}_merge(e){return(0,n.assert)(0!==e.length,"plot rows should not be empty"),this._invalidateSearchCaches(),this._minMaxCache.clear(),this._items=function(e,t){const i=function(e,t){const i=e.length,n=t.length;let r=i+n,o=0,s=0 ;for(;ot[s].index?s++:(o++,s++,r--);return r}(e,t),n=new Array(i);let r=0,o=0;const s=e.length,a=t.length;let l=0;for(;rt[o].index?(n[l]=t[o],o++):(n[l]=t[o],r++,o++),l++;for(;r(i+=1,i>=t?{done:!0,value:void 0}:{done:!1,value:this._items[i]})}}_invalidateSearchCaches(){this._rowSearchCacheByIndex.clear(),this._rowSearchCacheByIndexWithoutEmptyValues.clear(),this._rowSearchCacheByTime.clear(),this._rowSearchCacheByTimeWithoutEmptyValues.clear()}}function p(e,t){if(null===e)return t;if(null===t)return e;return{min:Math.min(e.min,t.min),max:Math.max(e.max,t.max)}}},114315:(e,t,i)=>{"use strict";i.d(t,{ExtendedStudyDataSource:()=>o});var n=i(405721),r=i(752928);class o extends n.StudyDataSource{constructor(e,t,i,n){super(e,t.seriesSource(),i,n),this._series=t}_createStudyError(e){var t;return(0,r.createStudyError)(this._getStudyErrorDescription(e),null===(t=this._series.symbolInfo())||void 0===t?void 0:t.exchange)}}},323109:(e,t,i)=>{"use strict";i.d(t,{containsBackgroundTimePointIndexes:()=>s,dematerializeBackground:()=>l,isBackgroundInBarsRange:()=>d,materializeBackground:()=>a});var n=i(650151),r=i(732149),o=i(387963);const s=!0;function a(e,t){if(e.start>=t.length||e.stop>=t.length)return null;const i=t[e.start],o=t[e.stop];return o===r.INVALID_TIME_POINT_INDEX?null:((0,n.assert)(i===r.INVALID_TIME_POINT_INDEX||i<=o,"start should not exceed stop"),{start:i===r.INVALID_TIME_POINT_INDEX?null:i,stop:o})}function l(e,t,i){return{id:t,start:(0,o.ensureTimePointIndexIndex)(i.indexOf(null!==e.start?e.start:r.INVALID_TIME_POINT_INDEX)),stop:(0,o.ensureTimePointIndexIndex)(i.indexOf(e.stop))}}function d(e,t){if(null===e.start)return t.firstBar()<=e.stop;const i=Math.min(e.start,e.stop),n=Math.max(e.start,e.stop);return t.contains(i)||t.contains(n)||it.lastBar()}},206395:(e,t,i)=>{"use strict";i.d(t,{DwgBoxFontType:()=>o,DwgBoxStyle:()=>n,containsDwgBoxTimePointIndexes:()=>d,dematerializeDwgBox:()=>c,isDwgBoxInBarsRange:()=>h,materializeDwgBox:()=>u});var n,r,o,s=i(732149),a=i(387963),l=i(92245);!function(e){e.Solid="sol",e.Dotted="dot", e.Dashed="dsh",e.LeftArrow="al",e.RightArrow="ar",e.BothArrow="ab"}(n||(n={})),function(e){e.Top="top",e.Center="center",e.Bottom="bottom"}(r||(r={})),function(e){e.Monospace="monospace"}(o||(o={}));const d=!0;function u(e,t){var i,n;if(e.x1>=t.length||e.x2>=t.length||null===e.y1||null===e.y2)return null;let r=t[e.x1],o=t[e.x2];return r===s.INVALID_TIME_POINT_INDEX&&(r=null),o===s.INVALID_TIME_POINT_INDEX&&(o=null),{left:r,right:o,top:e.y1,bottom:e.y2,borderColorIndex:e.c,backgroundColorIndex:e.bc,extend:e.ex,borderStyle:e.st,borderWidth:e.w,text:e.t,wordWrap:e.tw,horizontalTextAlignment:e.tha,verticalTextAlignment:e.tva,fontSize:e.ts,textColorIndex:null!==(i=e.tc)&&void 0!==i?i:null,fontType:null!==(n=e.tf)&&void 0!==n?n:null}}function c(e,t,i){var n,r,o;return{id:t,x1:(0,a.ensureTimePointIndexIndex)(i.indexOf(null!==(n=e.left)&&void 0!==n?n:s.INVALID_TIME_POINT_INDEX)),x2:(0,a.ensureTimePointIndexIndex)(i.indexOf(null!==(r=e.right)&&void 0!==r?r:s.INVALID_TIME_POINT_INDEX)),y1:e.top,y2:e.bottom,c:e.borderColorIndex,bc:e.backgroundColorIndex,ex:e.extend,st:e.borderStyle,w:e.borderWidth,t:e.text,tw:e.wordWrap,tha:e.horizontalTextAlignment,tva:e.verticalTextAlignment,ts:e.fontSize,tf:null!==(o=e.fontType)&&void 0!==o?o:void 0,tc:e.textColorIndex}}function h(e,t){const i=e.extend;if(i===l.DwgExtend.Both)return null===e.left||null===e.right;if(null===e.left||null===e.right)return null!==e.right?e.right<=t.lastBar()&&i===l.DwgExtend.Right:null!==e.left&&(e.left>=t.firstBar()&&i===l.DwgExtend.Left);const n=Math.min(e.left,e.right),r=Math.max(e.left,e.right);if(t.contains(n)||t.contains(r)||nt.lastBar())return!0;const o=e.leftt.lastBar()&&o}},92245:(e,t,i)=>{"use strict";i.d(t,{DwgExtend:()=>n,convertPointsToScreenDimension:()=>a,doesItemAffectVisibleRange:()=>l,isExtendInSameDirection:()=>s});var n,r=i(650151);function o(e,t){return e===n.None?t:t===n.None?e:e===n.Both||t===n.Both?n.Both:e===t?t:n.Both}function s(e,t){return e===n.Both||e===t}function a(e,t,i,s,a,l,d,u,c,h){let p,m;if(null===e&&null===i){if(a!==n.Right&&a!==n.Both)return null;a=n.Both,p=0,m=u}else null===e?(p=d.indexToCoordinate((0,r.ensureNotNull)(i)-1),a=o(a,n.Left)):p=d.indexToCoordinate(e),null===i?(m=d.indexToCoordinate((0,r.ensureNotNull)(e)-1),a=o(a,n.Right)):m=d.indexToCoordinate(i);const v=p,f=l.priceToCoordinate(t,c),g=m,_=l.priceToCoordinate(s,c);return void 0!==h?(h.x1=v,h.y1=f,h.x2=g,h.y2=_,h.extend=a,h):{x1:v,y1:f,x2:g,y2:_,extend:a}}function l(e,t,i,r,o){let s=!1;switch(i){case n.Both:s=!0;break;case n.Right:s=null===t||null===e||e<=o;break;case n.Left:s=null===t||t>=r;break;default:null!==e&&null!==t?s=(e>=r||t>=r)&&(e<=o||t<=o):null!==e&&null===t?s=e<=o:null===e&&null!==t&&(s=t>=r)}return s}!function(e){e.None="n",e.Left="l",e.Right="r",e.Both="b"}(n||(n={}))},294024:(e,t,i)=>{"use strict";i.d(t,{DwgLabelStyle:()=>o,DwgLabelTextAlign:()=>n, DwgLabelYloc:()=>r,containsDwgLabelTimePointIndexes:()=>d,dematerializeDwgLabel:()=>c,isDwgLabelInBarsRange:()=>h,materializeDwgLabel:()=>u});var n,r,o,s,a=i(732149),l=i(387963);!function(e){e.Left="left",e.Center="center",e.Right="right"}(n||(n={})),function(e){e.AboveBar="ab",e.BelowBar="bl",e.Price="pr",e.Auto="auto"}(r||(r={})),function(e){e.Xcross="xcr",e.Cross="cr",e.Triangleup="tup",e.Triangledown="tdn",e.Flag="flg",e.Circle="cir",e.Arrowup="aup",e.Arrowdown="adn",e.LabelUp="lup",e.LabelDown="ldn",e.LabelLeft="llf",e.LabelRight="lrg",e.LabelCenter="lcn",e.LabelLeftUp="luplf",e.LabelLeftDown="llwlf",e.LabelRightUp="luprg",e.LabelRightDown="llwrg",e.Square="sq",e.Diamond="dia",e.TextOutline="to",e.None="n"}(o||(o={})),function(e){e.Monospace="monospace"}(s||(s={}));const d=!0;function u(e,t){var i;if(e.x>=t.length)return null;const r=t[e.x];return r===a.INVALID_TIME_POINT_INDEX?null:{x:r,y:e.y,yloc:e.yl,text:e.t,style:e.st,size:e.sz,colorIndex:e.ci,textColorIndex:e.tci,textAlign:e.ta||n.Center,tooltip:e.tt||"",fontType:null!==(i=e.tf)&&void 0!==i?i:null}}function c(e,t,i){var n;return{id:t,x:(0,l.ensureTimePointIndexIndex)(i.indexOf(e.x)),y:e.y,yl:e.yloc,t:e.text,st:e.style,sz:e.size,ci:e.colorIndex,tci:e.textColorIndex,ta:e.textAlign,tt:e.tooltip,tf:null!==(n=e.fontType)&&void 0!==n?n:void 0}}function h(e,t){return t.contains(e.x)}},258940:(e,t,i)=>{"use strict";i.d(t,{DwgLineStyle:()=>n,containsDwgLineTimePointIndexes:()=>a,dematerializeDwgLine:()=>d,isDwgLineInBarsRange:()=>u,materializeDwgLine:()=>l});var n,r=i(732149),o=i(387963),s=i(92245);!function(e){e.Solid="sol",e.Dotted="dot",e.Dashed="dsh",e.LeftArrow="al",e.RightArrow="ar",e.BothArrow="ab"}(n||(n={}));const a=!0;function l(e,t){if(e.x1>=t.length||e.x2>=t.length||null===e.y1||null===e.y2)return null;let i=t[e.x1],n=t[e.x2];return i===r.INVALID_TIME_POINT_INDEX&&(i=null),n===r.INVALID_TIME_POINT_INDEX&&(n=null),null!==i&&null!==n||e.y1===e.y2?{id:e.id,x1:i,y1:e.y1,x2:n,y2:e.y2,style:e.st,extend:e.ex,width:e.w,colorIndex:e.ci}:null}function d(e,t,i){var n,s;const a=(0,o.ensureTimePointIndexIndex)(i.indexOf(null!==(n=e.x1)&&void 0!==n?n:r.INVALID_TIME_POINT_INDEX)),l=(0,o.ensureTimePointIndexIndex)(i.indexOf(null!==(s=e.x2)&&void 0!==s?s:r.INVALID_TIME_POINT_INDEX));return{id:t,x1:a,y1:e.y1,x2:l,y2:e.y2,st:e.style,ex:e.extend,w:e.width,ci:e.colorIndex}}function u(e,t){const i=e.extend;if(i===s.DwgExtend.Both)return!0;if(null===e.x1||null===e.x2)return null!==e.x2?e.x2<=t.lastBar()&&i===s.DwgExtend.Right:null!==e.x1&&(e.x1>=t.firstBar()&&i===s.DwgExtend.Left);const n=Math.min(e.x1,e.x2),r=Math.max(e.x1,e.x2);if(t.contains(n)||t.contains(r)||nt.lastBar())return!0;const o=e.x1t.lastBar()&&o}},640073:(e,t,i)=>{"use strict";i.d(t,{DwgPolylineStyle:()=>s,containsDwgPolylineTimePointIndexes:()=>o,dematerializeDwgPolyline:()=>l,isDwgPolylineInBarsRange:()=>d,materializeDwgPolyline:()=>a });var n=i(387963),r=i(732149);const o=!0;var s;function a(e,t){const i=[];for(const n of e.points){if(n.x>=t.length)continue;const e=t[n.x];e!==r.INVALID_TIME_POINT_INDEX&&i.push({x:e,y:n.y})}return 0===i.length?null:{id:e.id,points:i,width:e.w,curved:e.crv,closed:e.cls,color:e.c,fillColor:e.fc,style:e.st}}function l(e,t,i){return{id:t,points:e.points.map((e=>{var t;return{x:(0,n.ensureTimePointIndexIndex)(i.indexOf(null!==(t=e.x)&&void 0!==t?t:r.INVALID_TIME_POINT_INDEX)),y:e.y}})),w:e.width,crv:e.curved,cls:e.closed,c:e.color,fc:e.fillColor,st:e.style}}function d(e,t){if(0===e.points.length)return!1;const i=t.firstBar(),n=t.lastBar();let r=!1,o=!1;for(const s of e.points){if(t.contains(s.x))return!0;if(s.xn&&(o=!0),r&&o)return!0}return!1}!function(e){e.Solid="sol",e.Dotted="dot",e.Dashed="dsh",e.ArrowLeft="al",e.ArrowRight="ar",e.ArrowBoth="ab"}(s||(s={}))},590836:(e,t,i)=>{"use strict";var n,r;i.d(t,{DwgTableCellFontType:()=>r,containsDwgTableCellTimePointIndexes:()=>l,containsDwgTableTimePointIndexes:()=>o,dematerializeDwgTable:()=>a,dematerializeDwgTableCell:()=>u,materializeDwgTable:()=>s,materializeDwgTableCell:()=>d}),function(e){e.Top="top",e.Center="center",e.Bottom="bottom"}(n||(n={})),function(e){e.Monospace="monospace"}(r||(r={}));const o=!1;function s(e,t){return{id:e.id,position:e.pos,rows:e.rows,columns:e.cols,backgroundColorIndex:e.bgc,frameColorIndex:e.frmc,frameWidth:e.frmw,borderColorIndex:e.brdc,borderWidth:e.brdw}}function a(e,t,i){return{id:t,pos:e.position,rows:e.rows,cols:e.columns,bgc:e.backgroundColorIndex,frmc:e.frameColorIndex,frmw:e.frameWidth,brdc:e.borderColorIndex,brdw:e.borderWidth}}const l=!1;function d(e,t){var i,n,r;return{tableId:e.tid,row:e.row,column:e.col,widthInPercentsOfPaneWidth:e.w,heightInPercentOfPaneHeight:e.h,text:e.t,textColorIndex:e.tc,horizontalTextAlignment:e.tha,verticalTextAlignment:e.tva,fontSize:e.ts,backgroundColorIndex:e.bgc,colSpan:null!==(i=e.colspan)&&void 0!==i?i:1,rowSpan:null!==(n=e.rowspan)&&void 0!==n?n:1,tooltip:e.tt,fontType:null!==(r=e.tf)&&void 0!==r?r:null}}function u(e,t,i){var n;return{id:t,tid:e.tableId,row:e.row,col:e.column,w:e.widthInPercentsOfPaneWidth,h:e.heightInPercentOfPaneHeight,t:e.text,tc:e.textColorIndex,tha:e.horizontalTextAlignment,tva:e.verticalTextAlignment,ts:e.fontSize,bgc:e.backgroundColorIndex,colspan:e.colSpan,rowspan:e.rowSpan,tt:e.tooltip,tf:null!==(n=e.fontType)&&void 0!==n?n:void 0}}},484812:(e,t,i)=>{"use strict";i.d(t,{LiveStudyGraphics:()=>s.LiveStudyGraphics,createGraphicsPaneViews:()=>p,createGraphicsPriceAxisViews:()=>v,emptyStudyGraphics:()=>o.emptyStudyGraphics,isStudyGraphicsEmpty:()=>r.isStudyGraphicsEmpty,loadStudyGraphics:()=>o.loadStudyGraphics,saveStudyGraphics:()=>o.saveStudyGraphics});var n=i(201089),r=i(590713),o=i(2605),s=i(855428),a=i(229765),l=i(246733);class d extends a.PriceAxisView{constructor(e,t){super(),this._source=e,this._data=t}_updateRendererData(e,t,i){var n,r;e.visible=!1;const o=this._source.priceScale(),s=this._source.properties().childs(),a=s.visible.value() ;if(!o||o.isEmpty()||!a)return;const d=null===(r=null===(n=s.graphics.childs()[this._data.lineType])||void 0===n?void 0:n.childs()[this._data.styleId])||void 0===r?void 0:r.childs();if(!(void 0!==d&&d.visible&&d.visible.value()&&d.showPrice&&d.showPrice.value()&&this._isLabelVisibleAccordinglyToProperties()))return;const u=this._source.firstValue();if(null===u)return;const c=this._data.line.level,h=(0,l.resetTransparency)(d.color.value());i.background=h,i.textColor=this.generateTextColor(h),i.coordinate=o.priceToCoordinate(c,u),e.text=o.formatPrice(c,u,!0),e.visible=!0}_isLabelVisibleAccordinglyToProperties(){const e=this._source.model().properties().childs().scalesProperties.childs();return(e.showStudyLastValue.value()||e.showFundamentalLastValue.value())&&this._source.properties().childs().showLabelsOnPriceScale.value()}}const u=(0,n.getLogger)("Chart.StudyGraphics"),c=new Set(["dwgtablecells","tpoBlockSets","tpoLevels","tpoVolumeRows","logs","performance"]);async function h(e,t,n,r){switch(e){case"hlines":return new((await Promise.all([i.e(77028),i.e(20507)]).then(i.bind(i,454112))).LevelPaneView)(t,n,r);case"lines":return new((await Promise.all([i.e(77028),i.e(20507)]).then(i.bind(i,556613))).LinePaneView)(t,n,r);case"shapemarks":return new((await Promise.all([i.e(77028),i.e(20507)]).then(i.bind(i,709329))).ShapeMarkPaneView)(t,n,r);case"textmarks":return new((await Promise.all([i.e(77028),i.e(20507)]).then(i.bind(i,99490))).TextMarkPaneView)(t,n,r);case"trendchannels":return new((await Promise.all([i.e(77028),i.e(20507)]).then(i.bind(i,149284))).TrendChannelPaneView)(t,n,r);case"dwglabels":return new((await Promise.all([i.e(77028),i.e(20507)]).then(i.bind(i,531536))).DwgLabelPaneView)(t,n,r);case"dwglines":return new((await Promise.all([i.e(77028),i.e(20507)]).then(i.bind(i,591393))).DwgLinePaneView)(t,n,r);case"dwgpolylines":return new((await Promise.all([i.e(77028),i.e(20507)]).then(i.bind(i,806468))).DwgPolylinePaneView)(t,n,r);case"dwgboxes":return new((await Promise.all([i.e(77028),i.e(20507)]).then(i.bind(i,277150))).DwgBoxPaneView)(t,n,r);case"dwgtables":return new((await Promise.all([i.e(77028),i.e(20507)]).then(i.bind(i,760269))).DwgTablePaneView)(t,n,r);case"dwglinefills":return new((await Promise.all([i.e(77028),i.e(20507)]).then(i.bind(i,262831))).DwgLineFillPaneView)(t,n,r);case"tpos":return new((await i.e(769).then(i.bind(i,166077))).TpoPaneView)(t,n,r);case"footprints":return new((await i.e(9141).then(i.bind(i,13755))).VolumeFootprintPaneView)(t,n)}switch(e){case"hhists":return new((await Promise.all([i.e(77028),i.e(20507)]).then(i.bind(i,670751))).HHistPaneView)(t,n,r);case"horizlines":return new((await Promise.all([i.e(77028),i.e(20507)]).then(i.bind(i,722669))).HorizLinePaneView)(t,n,r);case"vertlines":return new((await Promise.all([i.e(77028),i.e(20507)]).then(i.bind(i,652742))).VertLinePaneView)(t,n,r);case"polygons":return new((await Promise.all([i.e(77028),i.e(20507)]).then(i.bind(i,842474))).PolygonPaneView)(t,n,r);case"backgrounds": return new((await Promise.all([i.e(77028),i.e(20507)]).then(i.bind(i,209406))).BackgroundPaneView)(t,n,r)}return null}async function p(e,t,i){const n=[],r=Object.keys(e.graphicsInfo());r.sort(((e,t)=>m(e)-m(t)));for(const o of r){const r=await h(o,e,t,i);null!==r?n.push(r):c.has(o)||u.logWarn(`${o} is not supported by this build of graphics subsystem, skipping`)}return n}function m(e){var t;return null!==(t=r.primitivesZOrders.get(e))&&void 0!==t?t:0}function v(e){const t=Object.keys(e.graphicsInfo()),i=[];for(const n of t)switch(n){case"hlines":e.graphics().hlines().forEach(((t,r)=>{t.forEach((t=>{void 0!==t.level&&i.push(new d(e,{line:{level:t.level},styleId:r,lineType:n}))}))}));break;case"horizlines":e.graphics().horizlines().forEach(((t,r)=>{t.forEach((t=>{void 0!==t.level&&i.push(new d(e,{line:{level:t.level},styleId:r,lineType:n}))}))}))}return i}},396372:(e,t,i)=>{"use strict";i.d(t,{HHistDirection:()=>n,HHistLocation:()=>r,HHistVolumeMode:()=>o,containsHHistTimePointIndexes:()=>d,dematerializeHHist:()=>c,isHHistInBarsRange:()=>h,materializeHHist:()=>u});var n,r,o,s=i(650151),a=i(732149),l=i(387963);!function(e){e.LeftToRight="left_to_right",e.RightToLeft="right_to_left"}(n||(n={})),function(e){e.Relative="relative",e.Absolute="absolute"}(r||(r={})),function(e){e.UpDown="Up/Down",e.Total="Total",e.Delta="Delta"}(o||(o={}));const d=!0;function u(e,t){if(e.firstBarTime>=t.length||e.lastBarTime>=t.length)return null;const i=t[e.firstBarTime],n=t[e.lastBarTime];return i===a.INVALID_TIME_POINT_INDEX||n===a.INVALID_TIME_POINT_INDEX?null:((0,s.assert)(i<=n,"firstBarTime should not exceed lastBarTime"),(0,s.assert)(e.priceLow<=e.priceHigh,"priceLow should not exceed priceHigh"),{firstBarTime:i,lastBarTime:n,rate:e.rate,priceHigh:e.priceHigh,priceLow:e.priceLow})}function c(e,t,i){const n=(0,l.ensureTimePointIndexIndex)(i.indexOf(e.firstBarTime)),r=(0,l.ensureTimePointIndexIndex)(i.indexOf(e.lastBarTime));return{id:t,...e,firstBarTime:n,lastBarTime:r}}function h(e,t){const i=Math.min(e.firstBarTime,e.lastBarTime),n=Math.max(e.firstBarTime,e.lastBarTime);return t.contains(i)||t.contains(n)||it.lastBar()}},921124:(e,t,i)=>{"use strict";i.d(t,{containsHorizLineTimePointIndexes:()=>s,dematerializeHorizLine:()=>l,isHorizLineInBarsRange:()=>d,materializeHorizLine:()=>a});var n=i(650151),r=i(732149),o=i(387963);const s=!0;function a(e,t){if(e.startIndex>=t.length||e.endIndex>=t.length)return null;const i=t[e.startIndex],o=t[e.endIndex];return i===r.INVALID_TIME_POINT_INDEX||o===r.INVALID_TIME_POINT_INDEX?null:((0,n.assert)(i<=o,"startIndex should not exceed endIndex"),{startIndex:i,endIndex:o,level:e.level,extendLeft:e.extendLeft,extendRight:e.extendRight})}function l(e,t,i){const n=(0,o.ensureTimePointIndexIndex)(i.indexOf(e.startIndex)),r=(0,o.ensureTimePointIndexIndex)(i.indexOf(e.endIndex));return{id:t,...e,startIndex:n,endIndex:r}}function d(e,t){const i=Math.min(e.startIndex,e.endIndex),n=Math.max(e.startIndex,e.endIndex);if(t.contains(i)||t.contains(n)||it.lastBar())return!0 ;const r=e.startIndext.lastBar()&&r}},276636:(e,t,i)=>{"use strict";var n;i.d(t,{TextPos:()=>n,containsLevelTimePointIndexes:()=>r,dematerializeLevel:()=>s,materializeLevel:()=>o}),function(e){e[e.TopLeft=0]="TopLeft",e[e.TopCenter=1]="TopCenter",e[e.TopRight=2]="TopRight",e[e.MiddleLeft=3]="MiddleLeft",e[e.MiddleCenter=4]="MiddleCenter",e[e.MiddleRight=5]="MiddleRight",e[e.BottomLeft=6]="BottomLeft",e[e.BottomCenter=7]="BottomCenter",e[e.BottomRight=8]="BottomRight"}(n||(n={}));const r=!1;function o(e){return{level:e.level,text:e.text}}function s(e,t,i){return{id:t,...e}}},573947:(e,t,i)=>{"use strict";i.d(t,{containsLineTimePointIndexes:()=>s,dematerializeLine:()=>l,isLineInBarsRange:()=>d,materializeLine:()=>a});var n=i(650151),r=i(732149),o=i(387963);const s=!0;function a(e,t){if(e.startIndex>=t.length||e.endIndex>=t.length)return null;const i=t[e.startIndex],o=t[e.endIndex];return i===r.INVALID_TIME_POINT_INDEX||o===r.INVALID_TIME_POINT_INDEX?null:((0,n.assert)(i<=o,"startIndex should not exceed endIndex"),{startIndex:i,endIndex:o,startOffset:e.startOffset,endOffset:e.endOffset,startPrice:e.startPrice,endPrice:e.endPrice})}function l(e,t,i){const n=(0,o.ensureTimePointIndexIndex)(i.indexOf(e.startIndex)),r=(0,o.ensureTimePointIndexIndex)(i.indexOf(e.endIndex));return{id:t,...e,startIndex:n,endIndex:r}}function d(e,t){var i,n;const r=e.startIndex+(null!==(i=e.startOffset)&&void 0!==i?i:0),o=e.endIndex+(null!==(n=e.endOffset)&&void 0!==n?n:0),s=Math.min(r,o),a=Math.max(r,o);return t.contains(r)||t.contains(o)||st.lastBar()}},855428:(e,t,i)=>{"use strict";i.d(t,{LiveStudyGraphics:()=>V});var n=i(650151),r=i(707957),o=i(396372),s=i(921124),a=i(329081),l=i(878475),d=i(323109),u=i(294024),c=i(258940),h=i(640073),p=i(206395),m=i(276636),v=i(573947),f=i(14721),g=i(593885),_=i(180857),y=i(590836),I=i(934393),w=i(755470),T=i(952499),S=i(583884),x=i(686242),b=i(130551);function P(e){const t=JSON.parse(e.pp);var i;return(0,n.assert)("s"in(i=t)&&(0,b.isObject)(i.s)&&"l"in i.s&&"c"in i.s&&"e"in i&&(0,b.isObject)(i.e)&&"l"in i.e&&"c"in i.e,"unexpected log source"),{barTime:e.t,time:e.tms,level:e.ll,source:{start:{line:t.s.l,column:t.s.c},end:{line:t.e.l,column:t.e.c}},message:e.m}}var C=i(229169),A=i(138839),E=i(214798),L=i(590713),M=i(2605),k=i(735758);class V{constructor(e={}){this._indexes=[],this._hhistsByTimePointIndex=new Map,this._primitivesCollection=function(e){const t={};for(const i of L.primitiveNames){t[i]=new Map;const n=e[i];if(void 0!==n)for(const e in n)if(n.hasOwnProperty(e))switch(i){case"horizlines":t[i].set(e,new B(s.materializeHorizLine,s.containsHorizLineTimePointIndexes));break;case"vertlines":t[i].set(e,new B(a.materializeVertLine,a.containsVertLineTimePointIndexes));break;case"lines":t[i].set(e,new B(v.materializeLine,v.containsLineTimePointIndexes));break;case"hlines":t[i].set(e,new B(m.materializeLevel,m.containsLevelTimePointIndexes));break;case"textmarks": t[i].set(e,new B(g.materializeTextMark,g.containsTextMarkTimePointIndexes));break;case"shapemarks":t[i].set(e,new B(f.materializeShapeMark,f.containsShapeMarkTimePointIndexes));break;case"backgrounds":t[i].set(e,new B(d.materializeBackground,d.containsBackgroundTimePointIndexes));break;case"polygons":t[i].set(e,new B(l.materializePolygon,l.containsPolygonTimePointIndexes));break;case"trendchannels":t[i].set(e,new B(_.materializeTrendChannel,_.containsTrendChannelTimePointIndexes));break;case"hhists":t[i].set(e,new B(o.materializeHHist,o.containsHHistTimePointIndexes));break;case"dwglabels":t[i].set(e,new B(u.materializeDwgLabel,u.containsDwgLabelTimePointIndexes));break;case"dwglines":t[i].set(e,new B(c.materializeDwgLine,c.containsDwgLineTimePointIndexes));break;case"dwgpolylines":t[i].set(e,new B(h.materializeDwgPolyline,h.containsDwgPolylineTimePointIndexes));break;case"dwgboxes":t[i].set(e,new B(p.materializeDwgBox,p.containsDwgBoxTimePointIndexes));break;case"dwgtables":t[i].set(e,new B(y.materializeDwgTable,y.containsDwgTableTimePointIndexes));break;case"dwgtablecells":t[i].set(e,new B(y.materializeDwgTableCell,y.containsDwgTableCellTimePointIndexes));break;case"dwglinefills":t[i].set(e,new B(I.materializeDwgLineFill,I.containsDwgLineFillTimePointIndexes));break;case"tpos":t[i].set(e,new B(w.materializeTpo,w.containsTpoTimePointIndexes));break;case"tpoBlockSets":t[i].set(e,new B(T.materializeTpoBlockSet,T.containsTpoBlockSetTimePointIndexes));break;case"tpoLevels":t[i].set(e,new B(S.materializeTpoLevelGroup,S.containsTpoLevelGroupTimePointIndexes));break;case"tpoVolumeRows":t[i].set(e,new B(x.materializeTpoVolumeRow,x.containsTpoVolumeRowTimePointIndexes));break;case"logs":t[i].set(e,new B(P,false));break;case"footprints":t[i].set(e,new B(A.materializeVolumeFootprint,A.containsFootprintTimePointIndexes));break;case"footprintLevels":t[i].set(e,new B(E.materializeVolumeFootprintPriceLevel,E.containsFootprintPriceLevelTimePointIndexes))}}t.performance.set("performance",new B(C.materializePerformance,C.containsPerformanceTimePointIndexes));return t}(e),this._tpoBlockSetsByStyleIdAndTpoId=(0,k.setsByStyleIdAndKey)(this._primitivesCollection.tpoBlockSets,(e=>e.tpoId)),this._tpoVolumeRowsByStyleIdAndTpoId=(0,k.setsByStyleIdAndKey)(this._primitivesCollection.tpoVolumeRows,(e=>e.tpoId))}horizlines(){return this._primitivesCollection.horizlines}vertlines(){return this._primitivesCollection.vertlines}lines(){return this._primitivesCollection.lines}hlines(){return this._primitivesCollection.hlines}textmarks(){return this._primitivesCollection.textmarks}shapemarks(){return this._primitivesCollection.shapemarks}backgrounds(){return this._primitivesCollection.backgrounds}polygons(){return this._primitivesCollection.polygons}trendchannels(){return this._primitivesCollection.trendchannels}hhists(){return this._primitivesCollection.hhists}dwglabels(){return this._primitivesCollection.dwglabels}dwglines(){return this._primitivesCollection.dwglines}dwgpolylines(){return this._primitivesCollection.dwgpolylines}dwgboxes(){ return this._primitivesCollection.dwgboxes}dwgtables(){return this._primitivesCollection.dwgtables}dwgtablecells(){return this._primitivesCollection.dwgtablecells}dwglinefills(){return this._primitivesCollection.dwglinefills}tpos(){return this._primitivesCollection.tpos}tpoBlockSets(){return this._primitivesCollection.tpoBlockSets}tpoBlockSetsByStyleAndTpoId(e,t){return this._tpoBlockSetsByStyleIdAndTpoId.get(e,t)}tpoLevels(){return this._primitivesCollection.tpoLevels}tpoVolumeRows(){return this._primitivesCollection.tpoVolumeRows}tpoVolumeRowByStyleAndTpoId(e,t){return this._tpoVolumeRowsByStyleIdAndTpoId.get(e,t)}logs(){return this._primitivesCollection.logs}observableLogs(){return this._primitivesCollection.logs}performance(){return this._primitivesCollection.performance}observablePerformance(){return this._primitivesCollection.performance}footprints(){return this._primitivesCollection.footprints}footprintLevels(){return this._primitivesCollection.footprintLevels}hhistsByTimePointIndex(){return this._hhistsByTimePointIndex}clear(){this._indexes=[];for(const e of L.primitiveNames)this._primitivesCollection[e].forEach((e=>e.clear()));this._hhistsByTimePointIndex=new Map}extract(){const e=e=>e.extract(),t={indexes:this._indexes,horizlines:D(this._primitivesCollection.horizlines,e),vertlines:D(this._primitivesCollection.vertlines,e),lines:D(this._primitivesCollection.lines,e),hlines:D(this._primitivesCollection.hlines,e),textmarks:D(this._primitivesCollection.textmarks,e),shapemarks:D(this._primitivesCollection.shapemarks,e),backgrounds:D(this._primitivesCollection.backgrounds,e),polygons:D(this._primitivesCollection.polygons,e),trendchannels:D(this._primitivesCollection.trendchannels,e),hhists:D(this._primitivesCollection.hhists,e),dwglabels:D(this._primitivesCollection.dwglabels,e),dwglines:D(this._primitivesCollection.dwglines,e),dwgpolylines:D(this._primitivesCollection.dwgpolylines,e),dwgboxes:D(this._primitivesCollection.dwgboxes,e),dwgtables:D(this._primitivesCollection.dwgtables,e),dwgtablecells:D(this._primitivesCollection.dwgtablecells,e),dwglinefills:D(this._primitivesCollection.dwglinefills,e),tpos:D(this._primitivesCollection.tpos,e),tpoBlockSets:D(this._primitivesCollection.tpoBlockSets,e),tpoLevels:D(this._primitivesCollection.tpoLevels,e),tpoVolumeRows:D(this._primitivesCollection.tpoVolumeRows,e),logs:new Map,performance:new Map,footprints:D(this._primitivesCollection.footprints,e),footprintLevels:D(this._primitivesCollection.footprintLevels,e)};return this._hhistsByTimePointIndex=new Map,new M.StaticStudyGraphics("data",t)}replaceIndexesTo(e){this._indexes=e;const t=e=>e.replaceIndexesTo(this._indexes);for(const e of L.primitiveNames)this._primitivesCollection[e].forEach(t);this._hhistsByTimePointIndex=(0,L.splitHHistsByTimePointIndex)(this._primitivesCollection.hhists)}processCommands(e){void 0!==e.erase&&this._processEraseCommands(e.erase),void 0!==e.create&&this._processCreateCommands(e.create)}_processCreateCommands(e){for(const t in e){if(!e.hasOwnProperty(t))continue;const i=t;switch(i){ case"horizlines":N(this._indexes,this._primitivesCollection.horizlines,e[i]);break;case"vertlines":N(this._indexes,this._primitivesCollection.vertlines,e[i]);break;case"lines":N(this._indexes,this._primitivesCollection.lines,e[i]);break;case"hlines":N(this._indexes,this._primitivesCollection.hlines,e[i]);break;case"textmarks":N(this._indexes,this._primitivesCollection.textmarks,e[i]);break;case"shapemarks":N(this._indexes,this._primitivesCollection.shapemarks,e[i]);break;case"backgrounds":N(this._indexes,this._primitivesCollection.backgrounds,e[i]);break;case"polygons":N(this._indexes,this._primitivesCollection.polygons,e[i]);break;case"trendchannels":N(this._indexes,this._primitivesCollection.trendchannels,e[i]);break;case"hhists":N(this._indexes,this._primitivesCollection.hhists,e[i]);break;case"dwglabels":N(this._indexes,this._primitivesCollection.dwglabels,e[i]);break;case"dwglines":N(this._indexes,this._primitivesCollection.dwglines,e[i]);break;case"dwgpolylines":N(this._indexes,this._primitivesCollection.dwgpolylines,e[i]);break;case"dwgboxes":N(this._indexes,this._primitivesCollection.dwgboxes,e[i]);break;case"dwgtables":N(this._indexes,this._primitivesCollection.dwgtables,e[i]);break;case"dwgtablecells":N(this._indexes,this._primitivesCollection.dwgtablecells,e[i]);break;case"dwglinefills":N(this._indexes,this._primitivesCollection.dwglinefills,e[i]);break;case"tpos":N(this._indexes,this._primitivesCollection.tpos,e[i]);break;case"tpoBlockSets":N(this._indexes,this._primitivesCollection.tpoBlockSets,e[i]);break;case"tpoLevels":N(this._indexes,this._primitivesCollection.tpoLevels,e[i]);break;case"tpoVolumeRows":N(this._indexes,this._primitivesCollection.tpoVolumeRows,e[i]);break;case"logs":N(this._indexes,this._primitivesCollection.logs,e[i]);break;case"performance":N(this._indexes,this._primitivesCollection.performance,e[i]);break;case"footprints":N(this._indexes,this._primitivesCollection.footprints,e[i]);break;case"footprintLevels":N(this._indexes,this._primitivesCollection.footprintLevels,e[i])}}this._hhistsByTimePointIndex=(0,L.splitHHistsByTimePointIndex)(this._primitivesCollection.hhists)}_processEraseCommands(e){for(const t of e)if("all"===t.action)for(const e of L.primitiveNames)this._primitivesCollection[e].forEach((e=>e.clearPrimitives()));else{const e=e=>e.deleteById(t.id);this._primitivesCollection[t.type].forEach(e)}this._hhistsByTimePointIndex=(0,L.splitHHistsByTimePointIndex)(this._primitivesCollection.hhists)}}class B{constructor(e,t){this._primitivesDataById=new Map,this._primitiveById=new Map,this._changed=new r.Delegate,this._cleared=new r.Delegate,this._materializePrimitive=e,this._isRematerializationRequiredWithNewIndexes=t}changed(){return this._changed}cleared(){return this._cleared}forEach(e,t){this._primitiveById.forEach((i=>{e.call(t,i,i,this)}))}has(e){let t=!1;return this._primitiveById.forEach((i=>{t=t||i===e})),t}get size(){return this._primitiveById.size}[Symbol.iterator](){return this._primitiveById.values()}entries(){throw new Error("Not implemented")}keys(){ throw new Error("Not implemented")}values(){return this._primitiveById.values()}hasId(e){return this._primitiveById.has(e)}addData(e,t){const i=[];e.forEach((e=>{this._primitivesDataById.set(e.id,e);const n=this._tryMaterialize(t,e);null!==n&&i.push(n)})),i.length>0&&this._changed.fire({created:i,removed:[]})}deleteById(e){const t=this._primitiveById.get(e);t&&(this._primitiveById.delete(e),this._primitivesDataById.delete(e),this._changed.fire({created:[],removed:[t]}))}clear(){this.clearPrimitives()}clearPrimitives(){this._primitivesDataById.clear(),this._primitiveById.clear(),this._cleared.fire()}replaceIndexesTo(e){if(!this._isRematerializationRequiredWithNewIndexes)return;const t=Array.from(this._primitiveById.values());this._primitiveById.clear(),this._primitivesDataById.forEach(this._tryMaterialize.bind(this,e),this);const i=Array.from(this._primitiveById.values());this._changed.fire({created:i,removed:t})}extract(){const e=new Set(this._primitivesDataById.values());return this.clearPrimitives(),e}_tryMaterialize(e,t){const i=this._materializePrimitive(t,e);return null!==i&&((0,n.assert)(!this._primitiveById.has(t.id),"primitive with specified id should not exist"),this._primitiveById.set(t.id,i)),i}}function D(e,t){const i=new Map;return e.forEach(((e,n)=>i.set(n,t(e)))),i}function N(e,t,i=[]){for(const r of i){const i=r.styleId,o=t.get(i);(0,n.assert)(void 0!==o,"Every style used by graphics primitive should be declared in study metainfo"),o.addData(r.data,e)}}},14721:(e,t,i)=>{"use strict";i.d(t,{containsShapeMarkTimePointIndexes:()=>s,dematerializeShapeMark:()=>l,isShapeMarkInBarsRange:()=>d,materializeShapeMark:()=>a});var n,r=i(732149),o=i(387963);!function(e){e.Circle="circle",e.ArrowUp="arrowUp",e.ArrowDown="arrowDown",e.ArrowRight="arrowRight",e.ArrowLeft="arrowLeft",e.Square="square"}(n||(n={}));const s=!0;function a(e,t){if(e.time>=t.length)return null;const i=t[e.time];return i===r.INVALID_TIME_POINT_INDEX?null:{time:i,price:e.price}}function l(e,t,i){const n=(0,o.ensureTimePointIndexIndex)(i.indexOf(e.time));return{id:t,...e,time:n}}function d(e,t){return t.contains(e.time)}},2605:(e,t,i)=>{"use strict";i.d(t,{StaticStudyGraphics:()=>E,emptyStudyGraphics:()=>V,loadStudyGraphics:()=>B,saveStudyGraphics:()=>N});var n=i(732149),r=i(921124),o=i(329081),s=i(396372),a=i(878475),l=i(323109),d=i(276636),u=i(573947),c=i(14721),h=i(593885),p=i(180857),m=i(294024),v=i(258940),f=i(640073),g=i(206395),_=i(590836),y=i(934393),I=i(755470),w=i(952499),T=i(583884),S=i(686242),x=i(138839),b=i(214798),P=i(590713),C=i(735758),A=i(389137);class E{constructor(e,t){if(this._indexes=[],this._horizlines=new Map,this._vertlines=new Map,this._lines=new Map,this._hlines=new Map,this._textmarks=new Map,this._shapemarks=new Map,this._backgrounds=new Map,this._polygons=new Map,this._trendchannels=new Map,this._hhists=new Map,this._dwglabels=new Map,this._dwglines=new Map,this._dwgpolylines=new Map,this._dwgboxes=new Map,this._dwgtables=new Map,this._dwgtablecells=new Map,this._dwglinefills=new Map,this._tpos=new Map, this._tpoBlockSets=new Map,this._tpoLevelGroups=new Map,this._tpoVolumeRows=new Map,this._logs=new Map,this._performance=new Map,this._footprints=new Map,this._footprintLevels=new Map,"data"===e){const e=t;this._indexes=e.indexes,this._vertlines=L(e.vertlines,this._indexes,o.materializeVertLine),this._horizlines=L(e.horizlines,this._indexes,r.materializeHorizLine),this._polygons=L(e.polygons,this._indexes,a.materializePolygon),this._hhists=L(e.hhists,this._indexes,s.materializeHHist),this._backgrounds=L(e.backgrounds,this._indexes,l.materializeBackground),this._lines=L(e.lines,this._indexes,u.materializeLine),this._hlines=L(e.hlines,this._indexes,d.materializeLevel),this._textmarks=L(e.textmarks,this._indexes,h.materializeTextMark),this._shapemarks=L(e.shapemarks,this._indexes,c.materializeShapeMark),this._trendchannels=L(e.trendchannels,this._indexes,p.materializeTrendChannel),this._dwglabels=L(e.dwglabels,this._indexes,m.materializeDwgLabel),this._dwglines=L(e.dwglines,this._indexes,v.materializeDwgLine),this._dwgpolylines=L(e.dwgpolylines,this._indexes,f.materializeDwgPolyline),this._dwgboxes=L(e.dwgboxes,this._indexes,g.materializeDwgBox),this._dwgtables=L(e.dwgtables,this._indexes,_.materializeDwgTable),this._dwgtablecells=L(e.dwgtablecells,this._indexes,_.materializeDwgTableCell),this._dwglinefills=L(e.dwglinefills,this._indexes,y.materializeDwgLineFill),this._tpos=L(e.tpos,this._indexes,I.materializeTpo),this._tpoBlockSets=L(e.tpoBlockSets,this._indexes,w.materializeTpoBlockSet),this._tpoBlockSetsByStyleIdAndTpoId=(0,C.setsByStyleIdAndKey)(this._tpoBlockSets,(e=>e.tpoId)),this._tpoVolumeRows=L(e.tpoVolumeRows,this._indexes,S.materializeTpoVolumeRow),this._tpoVolumeRowsByStyleIdAndTpoId=(0,C.setsByStyleIdAndKey)(this._tpoVolumeRows,(e=>e.tpoId)),this._tpoLevelGroups=L(e.tpoLevels,this._indexes,T.materializeTpoLevelGroup),this._footprints=L(e.footprints,this._indexes,x.materializeVolumeFootprint),this._footprintLevels=L(e.footprintLevels,this._indexes,b.materializeVolumeFootprintPriceLevel)}else if("state"===e){const e=t;this._indexes=e.indexes||[],this._vertlines=M(e.vertlines,this._indexes,o.materializeVertLine),this._horizlines=M(e.horizlines,this._indexes,r.materializeHorizLine),this._polygons=M(e.polygons,this._indexes,a.materializePolygon),this._hhists=M(e.hhists,this._indexes,s.materializeHHist),this._backgrounds=M(e.backgrounds,this._indexes,l.materializeBackground),this._lines=M(e.lines,this._indexes,u.materializeLine),this._hlines=M(e.hlines,this._indexes,d.materializeLevel),this._textmarks=M(e.textmarks,this._indexes,h.materializeTextMark),this._shapemarks=M(e.shapemarks,this._indexes,c.materializeShapeMark),this._trendchannels=M(e.trendchannels,this._indexes,p.materializeTrendChannel),this._dwglabels=M(e.dwglabels,this._indexes,m.materializeDwgLabel),this._dwglines=M(e.dwglines,this._indexes,v.materializeDwgLine),this._dwgpolylines=M(e.dwgpolylines,this._indexes,f.materializeDwgPolyline),this._dwgboxes=M(e.dwgboxes,this._indexes,g.materializeDwgBox), this._dwgtables=M(e.dwgtables,this._indexes,_.materializeDwgTable),this._dwgtablecells=M(e.dwgtablecells,this._indexes,_.materializeDwgTableCell),this._dwglinefills=M(e.dwglinefills,this._indexes,y.materializeDwgLineFill),this._tpos=M(e.tpos,this._indexes,I.materializeTpo),this._tpoBlockSets=M(e.tpoBlockSets,this._indexes,w.materializeTpoBlockSet),this._tpoBlockSetsByStyleIdAndTpoId=(0,C.setsByStyleIdAndKey)(this._tpoBlockSets,(e=>e.tpoId)),this._tpoVolumeRows=M(e.tpoVolumeRows,this._indexes,S.materializeTpoVolumeRow),this._tpoVolumeRowsByStyleIdAndTpoId=(0,C.setsByStyleIdAndKey)(this._tpoVolumeRows,(e=>e.tpoId)),this._tpoLevelGroups=M(e.tpoLevels,this._indexes,T.materializeTpoLevelGroup),this._footprints=M(e.footprints,this._indexes,x.materializeVolumeFootprint),this._footprintLevels=M(e.footprintLevels,this._indexes,b.materializeVolumeFootprintPriceLevel)}this._hhistsByTimePointIndex=(0,P.splitHHistsByTimePointIndex)(this._hhists)}horizlines(){return this._horizlines}vertlines(){return this._vertlines}lines(){return this._lines}hlines(){return this._hlines}textmarks(){return this._textmarks}shapemarks(){return this._shapemarks}backgrounds(){return this._backgrounds}polygons(){return this._polygons}trendchannels(){return this._trendchannels}hhists(){return this._hhists}dwglabels(){return this._dwglabels}dwglines(){return this._dwglines}dwgpolylines(){return this._dwgpolylines}dwgboxes(){return this._dwgboxes}dwgtables(){return this._dwgtables}dwgtablecells(){return this._dwgtablecells}dwglinefills(){return this._dwglinefills}tpos(){return this._tpos}tpoBlockSets(){return this._tpoBlockSets}tpoLevels(){return this._tpoLevelGroups}tpoBlockSetsByStyleAndTpoId(e,t){var i;return null===(i=this._tpoBlockSetsByStyleIdAndTpoId)||void 0===i?void 0:i.get(e,t)}tpoVolumeRows(){return this._tpoVolumeRows}tpoVolumeRowByStyleAndTpoId(e,t){var i;return null===(i=this._tpoVolumeRowsByStyleIdAndTpoId)||void 0===i?void 0:i.get(e,t)}logs(){return this._logs}performance(){return this._performance}footprints(){return this._footprints}footprintLevels(){return this._footprintLevels}hhistsByTimePointIndex(){return this._hhistsByTimePointIndex}}function L(e,t,i){const n=new Map;return e.forEach(((e,r)=>{const o=n.get(r)||new Set;e.forEach((e=>{const n=i(e,t);null!==n&&o.add(n)})),n.set(r,o)})),n}function M(e,t,i){const n=new Map;if(void 0===e)return n;for(const r of e){const e=r.styleId,o=n.get(e)||new Set;r.data.forEach((e=>{const n=i(e,t);null!==n&&o.add(n)})),n.set(e,o)}return n}function k(e,t,i,n,r,o){const s=[];return e.forEach(((e,a)=>{e.forEach((e=>{(null===r||n(e,r))&&function(e,t,i){let n=null;for(const i of e)i.styleId===t&&(n=i);null===n&&(n={styleId:t,data:[]},e.push(n)),n.data.push(i)}(s,a,o(e,t(e),i))}))})),s.length>0?s:void 0}function V(){return new E}function B(e){return new E("state",e)}function D(e,t){return!0}function N(e,t){var i,P,C,E;const L=function(e){const t=new Set,i=e=>{null!=e&&t.add(e)};e.horizlines().forEach(((e,i)=>{e.forEach((e=>{t.add(e.startIndex),t.add(e.endIndex)}))})),e.vertlines().forEach(((e,i)=>{ e.forEach((e=>{t.add(e.index)}))})),e.lines().forEach(((e,i)=>{e.forEach((e=>{t.add(e.startIndex),t.add(e.endIndex)}))})),e.textmarks().forEach(((e,i)=>{e.forEach((e=>{t.add(e.time)}))})),e.shapemarks().forEach(((e,i)=>{e.forEach((e=>{t.add(e.time)}))})),e.backgrounds().forEach(((e,i)=>{e.forEach((e=>{t.add(null!==e.start?e.start:n.INVALID_TIME_POINT_INDEX),t.add(e.stop)}))})),e.polygons().forEach(((e,i)=>{e.forEach((e=>{e.points.forEach((e=>{t.add(e.index)}))}))})),e.trendchannels().forEach(((e,i)=>{e.forEach((e=>{t.add(e.startIndex),t.add(e.endIndex)}))})),e.hhists().forEach(((e,i)=>{e.forEach((e=>{t.add(e.firstBarTime),t.add(e.lastBarTime)}))})),e.dwglabels().forEach(((e,i)=>{e.forEach((e=>{t.add(e.x)}))})),e.dwglines().forEach(((e,i)=>{e.forEach((e=>{var i,r;t.add(null!==(i=e.x1)&&void 0!==i?i:n.INVALID_TIME_POINT_INDEX),t.add(null!==(r=e.x2)&&void 0!==r?r:n.INVALID_TIME_POINT_INDEX)}))})),e.dwgpolylines().forEach(((e,i)=>{e.forEach((e=>{var i;for(const r of e.points)t.add(null!==(i=r.x)&&void 0!==i?i:n.INVALID_TIME_POINT_INDEX)}))})),e.dwgboxes().forEach(((e,i)=>{e.forEach((e=>{var i,r;t.add(null!==(i=e.left)&&void 0!==i?i:n.INVALID_TIME_POINT_INDEX),t.add(null!==(r=e.right)&&void 0!==r?r:n.INVALID_TIME_POINT_INDEX)}))})),e.tpos().forEach((e=>{e.forEach((e=>{t.add(e.firstBarTime),t.add(e.lastBarTime)}))})),e.tpoLevels().forEach((e=>{e.forEach((e=>{var t;i(e.poorHighExtendTo),i(e.poorLowExtendTo),i(e.tpoPocExtendTo),(null!==(t=e.singleprints)&&void 0!==t?t:[]).map((e=>e.extendTo)).map(i)}))})),e.footprints().forEach((e=>{e.forEach((e=>{t.add(e.index)}))})),e.footprintLevels().forEach((e=>{e.forEach((e=>{t.add(e.startIndex),i(e.extendTo)}))}));const r=Array.from(t);return r.sort(((e,t)=>e-t)),r}(e),M={indexes:L};let V=0;const B=()=>++V,N=e=>e.id;M.vertlines=k(e.vertlines(),B,L,o.isVertLineInBarsRange,t,o.dematerializeVertLine),M.horizlines=k(e.horizlines(),B,L,r.isHorizLineInBarsRange,t,r.dematerializeHorizLine),M.polygons=k(e.polygons(),B,L,a.isPolygonInBarsRange,t,a.dematerializePolygon),M.hhists=k(e.hhists(),B,L,s.isHHistInBarsRange,t,s.dematerializeHHist),M.backgrounds=k(e.backgrounds(),B,L,l.isBackgroundInBarsRange,t,l.dematerializeBackground);{M.lines=k(e.lines(),B,L,u.isLineInBarsRange,t,u.dematerializeLine),M.hlines=k(e.hlines(),B,L,D,t,d.dematerializeLevel),M.textmarks=k(e.textmarks(),B,L,h.isTextMarkInBarsRange,t,h.dematerializeTextMark),M.shapemarks=k(e.shapemarks(),B,L,c.isShapeMarkInBarsRange,t,c.dematerializeShapeMark),M.trendchannels=k(e.trendchannels(),B,L,p.isTrendChannelInBarsRange,t,p.dematerializeTrendChannel),M.dwglabels=k(e.dwglabels(),B,L,m.isDwgLabelInBarsRange,t,m.dematerializeDwgLabel),M.dwglines=k(e.dwglines(),N,L,v.isDwgLineInBarsRange,t,v.dematerializeDwgLine),M.dwgpolylines=k(e.dwgpolylines(),N,L,f.isDwgPolylineInBarsRange,t,f.dematerializeDwgPolyline),M.dwgboxes=k(e.dwgboxes(),B,L,g.isDwgBoxInBarsRange,t,g.dematerializeDwgBox),M.dwgtables=k(e.dwgtables(),N,L,D,t,_.dematerializeDwgTable),M.dwgtablecells=k(e.dwgtablecells(),B,L,D,t,_.dematerializeDwgTableCell), M.dwglinefills=k(e.dwglinefills(),B,L,D,t,y.dematerializeDwgLineFill);const n=new Map(Array.from(null!==(P=null===(i=e.tpos().get("tpo"))||void 0===i?void 0:i.values())&&void 0!==P?P:[]).map((e=>[e.id,e]))),r=e=>n.get(e),o=k(e.tpoBlockSets(),B,L,w.isTpoBlockSetInBarsRange.bind(null,r),t,w.dematerializeTpoBlockSet);M.tpoLevels=k(e.tpoLevels(),B,L,T.isTpoLevelInBarsRange.bind(null,r),t,T.dematerializeTpoLevelGroup),M.tpoVolumeRows=k(e.tpoVolumeRows(),B,L,S.isTpoVolumeRowsInBarsRange.bind(null,r),t,S.dematerializeTpoVolumeRow);const s=[null==o?void 0:o[0].data,null===(C=M.tpoLevels)||void 0===C?void 0:C[0].data,null===(E=M.tpoVolumeRows)||void 0===E?void 0:E[0].data].filter(A.notUndefined).reduce(((e,t)=>e.concat(t.map((e=>e.tpoId)))),[]),a=new Set(s);M.tpos=k(e.tpos(),N,L,(e=>a.has(e.id)),t,I.dematerializeTpo),M.tpoBlockSets=k(e.tpoBlockSets(),B,L,(e=>a.has(e.tpoId)),t,w.dematerializeTpoBlockSet),M.footprints=k(e.footprints(),B,L,x.isVolumeFootprintInBarsRange,t,x.dematerializeVolumeFootprint),M.footprintLevels=k(e.footprintLevels(),B,L,b.isVolumeFootprintPriceLevelInBarsRange,t,b.dematerializeVolumeFootprintPriceLevel)}return M}},590713:(e,t,i)=>{"use strict";i.d(t,{isStudyGraphicsEmpty:()=>o,primitiveNames:()=>n,primitivesZOrders:()=>r,splitHHistsByTimePointIndex:()=>s});const n=["horizlines","vertlines","lines","hlines","textmarks","shapemarks","backgrounds","polygons","trendchannels","hhists","dwglabels","dwglines","dwgpolylines","dwgboxes","dwgtables","dwgtablecells","dwglinefills","tpos","tpoBlockSets","tpoLevels","tpoVolumeRows","logs","performance","footprints","footprintLevels"],r=new Map([["logs",-4],["performance",-4],["polygons",-4],["trendchannels",-3],["textmarks",-2],["shapemarks",-2],["backgrounds",-1],["footprints",1],["footprintLevels",1],["hlines",1],["horizlines",1],["hhists",1],["dwglinefills",2],["vertlines",3],["lines",3],["dwglines",3],["dwgpolylines",3],["dwgboxes",4],["dwglabels",5],["dwgtables",6],["dwgtablecells",6],["tpos",7],["tpoBlockSets",7],["tpoLevels",7],["tpoVolumeRows",7]]);function o(e){return!n.some((t=>{const i=e[t]();for(const[,e]of i)if(e.size>0)return!0;return!1}))}function s(e){const t=new Map;return e.forEach(((e,i)=>{e.forEach((e=>{const n={...e,styleId:i},r=e.firstBarTime;let o=t.get(r);void 0===o&&(o=new Set,t.set(r,o)),o.add(n)}))})),t}},593885:(e,t,i)=>{"use strict";i.d(t,{TextMarkType:()=>n,containsTextMarkTimePointIndexes:()=>a,dematerializeTextMark:()=>d,isTextMarkInBarsRange:()=>u,materializeTextMark:()=>l});var n,r,o=i(732149),s=i(387963);!function(e){e.Triangle="triangle",e.Rectangle="rectangle"}(n||(n={})),function(e){e.Verdana="Verdana",e.CourierNew="Courier New",e.TimesNewRoman="Times New Roman",e.Arial="Arial"}(r||(r={}));const a=!0;function l(e,t){if(e.time>=t.length)return null;const i=t[e.time];return i===o.INVALID_TIME_POINT_INDEX?null:{time:i,offset:e.offset,text:e.text,price:e.price}}function d(e,t,i){const n=(0,s.ensureTimePointIndexIndex)(i.indexOf(e.time));return{id:t,...e,time:n}}function u(e,t){var i ;return t.contains(e.time+(null!==(i=e.offset)&&void 0!==i?i:0))}},952499:(e,t,i)=>{"use strict";i.d(t,{containsTpoBlockSetTimePointIndexes:()=>r,dematerializeTpoBlockSet:()=>s,isTpoBlockSetInBarsRange:()=>a,materializeTpoBlockSet:()=>o});var n=i(755470);const r=!1;function o(e,t){return{tpoId:e.tpoId,blocks:e.blocks,rowIndex:e.rowIndex}}function s(e,t,i){return{id:t,tpoId:e.tpoId,blocks:e.blocks,rowIndex:e.rowIndex}}function a(e,t,i){const r=e(t.tpoId);return Boolean(r&&(0,n.isTpoInBarsRange)(r,i))}},583884:(e,t,i)=>{"use strict";i.d(t,{containsTpoLevelGroupTimePointIndexes:()=>s,dematerializeTpoLevelGroup:()=>c,isTpoLevelInBarsRange:()=>h,materializeTpoLevelGroup:()=>l});var n=i(389137),r=i(732149),o=i(387963);const s=!0;function a(e,t){const i=null==e?e:t[e];return i===r.INVALID_TIME_POINT_INDEX?null:i}function l(e,t){var i;return{tpoId:e.tpoId,tpoPocIndex:e.tpoPocIndex,tpoPocExtendTo:a(e.tpoPocExtendTo,t),tpoValIndex:e.tpoValIndex,tpoVahIndex:e.tpoVahIndex,tpoMidpointIndex:e.tpoMidpointIndex,volumePocIndex:e.volumePocIndex,volumeValIndex:e.volumeValIndex,volumeVahIndex:e.volumeVahIndex,poorHighIndex:e.poorHighIndex,poorHighExtendTo:a(e.poorHighExtendTo,t),poorLowIndex:e.poorLowIndex,poorLowExtendTo:a(e.poorLowExtendTo,t),singleprints:null===(i=e.singleprints)||void 0===i?void 0:i.map((e=>function(e,t){return{index:e.index,extendTo:a(e.extendTo,t)}}(e,t)))}}function d(e,t){return null==e?e:(0,o.ensureTimePointIndexIndex)(t.indexOf(e))}function u(e){return Object.keys(e).filter((t=>void 0===e[t])).forEach((t=>delete e[t])),e}function c(e,t,i){var n;return u({id:t,tpoId:e.tpoId,tpoPocIndex:e.tpoPocIndex,tpoPocExtendTo:d(e.tpoPocExtendTo,i),tpoValIndex:e.tpoValIndex,tpoVahIndex:e.tpoVahIndex,tpoMidpointIndex:e.tpoMidpointIndex,volumePocIndex:e.volumePocIndex,volumeValIndex:e.volumeValIndex,volumeVahIndex:e.volumeVahIndex,poorHighIndex:e.poorHighIndex,poorHighExtendTo:d(e.poorHighExtendTo,i),poorLowIndex:e.poorLowIndex,poorLowExtendTo:d(e.poorLowExtendTo,i),singleprints:null===(n=e.singleprints)||void 0===n?void 0:n.map((e=>function(e,t){return u({index:e.index,extendTo:d(e.extendTo,t)})}(e,i)))})}function h(e,t,i){var r;const o=e(t.tpoId);if(!o)return!1;const s=o.firstBarTime,a=[t.poorHighExtendTo,t.poorLowExtendTo,t.tpoPocExtendTo].concat((null!==(r=t.singleprints)&&void 0!==r?r:[]).map((e=>e.extendTo))).filter(n.notUndefined).map((e=>null!=e?e:1/0)),l=a.length?Math.max(...a):null;return!((null!=l?l:o.lastBarTime)i.lastBar())}},686242:(e,t,i)=>{"use strict";i.d(t,{containsTpoVolumeRowTimePointIndexes:()=>r,dematerializeTpoVolumeRow:()=>s,isTpoVolumeRowsInBarsRange:()=>a,materializeTpoVolumeRow:()=>o});var n=i(755470);const r=!1;function o(e,t){return{tpoId:e.tpoId,rowIndex:e.rowIndex,volume:e.volume}}function s(e,t,i){return{id:t,tpoId:e.tpoId,rowIndex:e.rowIndex,volume:e.volume}}function a(e,t,i){const r=e(t.tpoId);return Boolean(r&&(0,n.isTpoInBarsRange)(r,i))}},755470:(e,t,i)=>{"use strict";i.d(t,{containsTpoTimePointIndexes:()=>s,dematerializeTpo:()=>l,isTpoInBarsRange:()=>d,materializeTpo:()=>a });var n=i(650151),r=i(732149),o=i(387963);const s=!0;function a(e,t){if(e.firstBarTime>=t.length||e.lastBarTime>=t.length)return null;const i=t[e.firstBarTime],o=t[e.lastBarTime];return i===r.INVALID_TIME_POINT_INDEX||o===r.INVALID_TIME_POINT_INDEX?null:((0,n.assert)(i<=o,"firstBarTime should not exceed lastBarTime"),{id:e.id,firstBarTime:i,lastBarTime:o,priceRange:e.priceRange,times:e.times})}function l(e,t,i){return{id:t,firstBarTime:(0,o.ensureTimePointIndexIndex)(i.indexOf(e.firstBarTime)),lastBarTime:(0,o.ensureTimePointIndexIndex)(i.indexOf(e.lastBarTime)),priceRange:e.priceRange,times:e.times}}function d(e,t){return!(e.lastBarTimet.lastBar())}},180857:(e,t,i)=>{"use strict";i.d(t,{containsTrendChannelTimePointIndexes:()=>s,dematerializeTrendChannel:()=>l,isTrendChannelInBarsRange:()=>d,materializeTrendChannel:()=>a});var n=i(650151),r=i(732149),o=i(387963);const s=!0;function a(e,t){if(e.startIndex>=t.length||e.endIndex>=t.length)return null;const i=t[e.startIndex],o=t[e.endIndex];return i===r.INVALID_TIME_POINT_INDEX||o===r.INVALID_TIME_POINT_INDEX?null:((0,n.assert)(i<=o,"startIndex should not exceed endIndex"),{startIndex:i,endIndex:o,extendLeft:e.extendLeft,extendRight:e.extendRight,startHighPrice:e.startHighPrice,startLowPrice:e.startLowPrice,endHighPrice:e.endHighPrice,transparency:e.transparency})}function l(e,t,i){const n=(0,o.ensureTimePointIndexIndex)(i.indexOf(e.startIndex)),r=(0,o.ensureTimePointIndexIndex)(i.indexOf(e.endIndex));return{id:t,...e,startIndex:n,endIndex:r}}function d(e,t){const i=Math.min(e.startIndex,e.endIndex),n=Math.max(e.startIndex,e.endIndex);if(t.contains(i)||t.contains(n)||it.lastBar())return!0;const r=e.startIndext.lastBar()&&r}},138839:(e,t,i)=>{"use strict";i.d(t,{VolumeFootprintTypeValues:()=>n,containsFootprintTimePointIndexes:()=>s,dematerializeVolumeFootprint:()=>l,isVolumeFootprintInBarsRange:()=>d,materializeVolumeFootprint:()=>a});var n,r=i(732149),o=i(387963);!function(e){e.BuyAndSell="Buy and sell",e.Delta="Delta",e.Total="Total"}(n||(n={}));const s=!0;function a(e,t){if(e.index>=t.length)return null;let i=t[e.index];return i===r.INVALID_TIME_POINT_INDEX&&(i=null),null===i?null:{id:e.id,index:i,poc:e.poc,val:e.val,vah:e.vah,levels:e.levels}}function l(e,t,i){var n;return{id:t,index:(0,o.ensureTimePointIndexIndex)(i.indexOf(null!==(n=e.index)&&void 0!==n?n:r.INVALID_TIME_POINT_INDEX)),poc:e.poc,val:e.val,vah:e.vah,levels:e.levels}}function d(e,t){return t.contains(e.index)}},799567:(e,t,i)=>{"use strict";var n;i.d(t,{StudyStatusType:()=>n}),function(e){e[e.Undefined=0]="Undefined",e[e.Loading=1]="Loading",e[e.Completed=2]="Completed",e[e.Error=3]="Error"}(n||(n={}))},62745:(e,t,i)=>{"use strict";i.d(t,{ChartColorDependentStudyInputNames:()=>h,InputDisplayFlags:()=>n,RangeDependentStudyInputNames:()=>c,areStudyInputsEqual:()=>u,editableStudyInputs:()=>v,getInputValue:()=>a,isExtendedInput:()=>o, isExtendedInputSource:()=>s,isStudyInputDependsOnChart:()=>g,isStudyInputDependsOnChartColors:()=>f,isStudyInputOptionsInfo:()=>d,isTimeOrPriceNotHiddenInput:()=>m,rangeDependentStudyInputsToTimeRange:()=>p,studyAvailableConstSources:()=>l});var n,r=i(598279);function o(e){return(0,r.default)(e)}function s(e){return"source"===e.t}function a(e){return o(e)?e.v:e}!function(e){e[e.None=0]="None",e[e.DataWindow=2]="DataWindow",e[e.StatusLine=8]="StatusLine",e[e.All=15]="All"}(n||(n={}));const l=["open","high","low","close","hl2","hlc3","ohlc4","hlcc4"];function d(e){return["text","integer","float","price","session","resolution"].includes(e.type)&&e.hasOwnProperty("options")}function u(e,t,i){for(const n of e)if(t[n.id]!==i[n.id])return!1;return!0}var c,h;function p(e){return{from:Math.round(e.first_visible_bar_time/1e3),to:Math.round(e.last_visible_bar_time/1e3)}}function m(e){return("time"===e.type||"price"===e.type)&&!0!==e.isHidden}function v(e){const t=e.filter(m);if(0===t.length)return[];const i=new Map,n=[];t.forEach((e=>{var t;const{group:r,inline:o}=e;if(void 0===o)return void n.push(e);const s=o+(r||"");if(i.has(s))null===(t=i.get(s))||void 0===t||t.push(e);else{const t=[e];i.set(s,t),n.push(t)}}));const r=[];for(let e=0;ee)).includes(e.id)}function g(e){return!!f(e)||Object.values(c).map((e=>e)).includes(e.id)}!function(e){e.FirstBar="first_visible_bar_time",e.LastBar="last_visible_bar_time",e.Realtime="subscribeRealtime"}(c||(c={})),function(e){e.FgColor="__chart_fgcolor",e.BgColor="__chart_bgcolor"}(h||(h={}))},7288:(e,t,i)=>{"use strict";i.d(t,{StudyStatusType:()=>c,convertStudyStatusToString:()=>h,isVolumeDataError:()=>a,noVolumeErrorTooltip:()=>s,studyErrorStatusStackTrace:()=>f,studyStatusFeature:()=>v,studyStatusSolutionId:()=>p,studyStatusTitle:()=>m});var n=i(444372),r=i(963456),o=i(1500);const s=n.t(null,void 0,i(916971));function a(e){const t=e.toLowerCase();return t.includes("the data vendor doesn't provide volume data for this symbol.")||t.includes("no volume is provided by the data vendor")}const l=new Map([["Pine cannot determine the referencing length of a series. Try using max_bars_back",o.solutionIds.PINE_CANNOT_DETERMINE],["Memory limits exceeded",o.solutionIds.MEMORY_LIMITS_EXCEEDED],["This script is invite-only",o.solutionIds.PUBLIC_INVITE_ONLY_SCRIPTS]]),d=new Map([["Volume Profile indicator available only on our upgraded plans","volumeProfile"]]),u=n.t(null,void 0,i(930295));var c;function h(e,t){if(e.type===c.Loading)return t?u:"loading...";if(e.type===c.Error){const i=e.errorDescription,n=t?(0,r.triesTranslateError)(i.error):i.error;if(i.ctx){const e={};return Object.entries(i.ctx).forEach((([t,i])=>{e[t]=i.toString()})),n.format(e)}return n}return""}function p(e){if(e.type===c.Error)return e.errorDescription.solution_id?e.errorDescription.solution_id:function(e){ for(const t of Array.from(l.keys()))if(e.includes(t))return l.get(t)}(e.errorDescription.error)}function m(e){if(e.type===c.Error)return a(e.errorDescription.error)?s:e.errorDescription.title}function v(e){const{errorDescription:{error:t}}=e;for(const[e,i]of d)if(t.startsWith(e))return i}function f(e){if(void 0===e)return;const t=[];for(const i of e){const e={functionOrScopeName:i.n,lineNumber:i.p};"id"in i&&(e.id=i.id),"v"in i&&(e.versionScript=i.v),t.push(e)}return t}!function(e){e[e.Undefined=0]="Undefined",e[e.Loading=1]="Loading",e[e.Completed=2]="Completed",e[e.Error=3]="Error"}(c||(c={}))},428784:(e,t,i)=>{"use strict";i.d(t,{applyOverridesToStudyDefaults:()=>c});var n=i(650151),r=i(368135),o=i(201089);const s={line:r.LineStudyPlotStyle.Line,histogram:r.LineStudyPlotStyle.Histogram,cross:r.LineStudyPlotStyle.Cross,area:r.LineStudyPlotStyle.Area,columns:r.LineStudyPlotStyle.Columns,circles:r.LineStudyPlotStyle.Circles,line_with_breaks:r.LineStudyPlotStyle.LineWithBreaks,area_with_breaks:r.LineStudyPlotStyle.AreaWithBreaks,step_line:r.LineStudyPlotStyle.StepLine,step_line_with_breaks:r.LineStudyPlotStyle.StepLineWithBreaks,step_line_with_diamonds:r.LineStudyPlotStyle.StepLineWithDiamonds},a=(0,o.getLogger)("Chart.Model.StudyPropertiesOverrider");var l,d;function u(e,t,i,n){const r=i.split(".");if(0===r.length||0===r[0].length)return;const o=function(e){const t=e.split(":");return{name:t[0],type:2===t.length?t[1]:null}}(r[0]),s=o.name,u=o.type,c=null!==u,h=!c||"band"===u,p=!c||"area"===u,m=!c||"input"===u,v=!c||"plot"===u?d.getPlotIdByTitle(e,s):null,f=h?d.getBandIndexByName(e,s):null,g=p?d.getFilledAreaIdByTitle(e,s):null,_=m?d.getInputByName(e,s):null,y=t.hasOwnProperty(s);if((null!==v?1:0)+(null!==f?1:0)+(null!==g?1:0)+(null!==_?1:0)+(y?1:0)>1)return void a.logWarn(`Study '${e.description}' has ambiguous identifier '${s}'`);const I=r[1];if(null!==v){if(1===r.length)return void a.logWarn(`Path of sub-property of '${s}' plot for study '${e.description}' must be not empty`);const i=r.slice(1);l.applyPlotProperty(e,t,v,i,n)}else if(null!==_)l.applyInputValue(t,_,n);else if(null!==f){if(void 0===I)return void a.logWarn(`Property name of '${s}' band for study '${e.description}' must be set`);l.applyBandProperty(t,f,I,n)}else if(null!==g){if(void 0===I)return void a.logWarn(`Property name of '${s}' area for study '${e.description}' must be set`);l.applyFilledAreaProperty(t,g,I,n)}else y?l.setRootProperty(t,r,n):a.logWarn(`Study '${e.description}' has no plot or input '${s}'`)}function c(e,t,i){for(const n in e){if(!e.hasOwnProperty(n))continue;const r=n.indexOf(".");if(-1===r)continue;const o=n.substring(0,r),s=d.getMetaInfoByDescription(t,o);if(null===s){a.logWarn(`There is no such study ${o}`);continue}const l=i(s);null!==l?u(s,l,n.substring(r+1),e[n]):a.logWarn(`Cannot apply overrides for study ${o}`)}}!function(e){e.applyPlotProperty=function(e,t,i,o,l){if(void 0===t.styles)return void a.logWarn("Study does not have styles");const d=o[0];if("color"===d){const s=function(e,t,i){if(void 0===e.plots)return null ;for(const n of e.plots){if(!(0,r.isPaletteColorerPlot)(n)||void 0===t.palettes)continue;const e=t.palettes[n.palette];if(n.target===i&&void 0!==e)return e}return null}(e,t,i);return void function(e,t,i,r,o){var s;void 0!==e.styles?null===t&&!isNaN(r)&&r>0?a.logWarn(`Study plot does not have color #${r}`):((0===r||isNaN(r))&&((0,n.ensureDefined)(e.styles[i]).color=String(o),r=0),null!==t&&((0,n.ensureDefined)(null===(s=t.colors)||void 0===s?void 0:s[r]).color=String(o))):a.logWarn("Study does not have styles")}(t,s,i,o.length>1?parseInt(o[1]):NaN,l)}const u=t.styles[i];if(void 0!==u&&u.hasOwnProperty(d)){if("plottype"===d){const e=s[String(l)];if(void 0===e)return void a.logWarn(`Unsupported plot type for plot: ${l}`);l=e}u[d]=l}else a.logWarn(`Study plot does not have property '${d}'`)},e.applyBandProperty=function(e,t,i,n){if(void 0===e.bands)return void a.logWarn("Study does not have bands");const r=e.bands[t];if(void 0!==r&&r.hasOwnProperty(i)){if("plottype"===i){const e=s[String(n)];if(void 0===e)return void a.logWarn(`Unsupported plot type for band: ${n}`);n=e}r[i]=n}else a.logWarn(`Study band does not have property '${i}'`)},e.applyFilledAreaProperty=function(e,t,i,n){if(void 0===e.filledAreasStyle)return void a.logWarn("Study does not have areas");const r=e.filledAreasStyle[t];void 0!==r&&r.hasOwnProperty(i)?r[i]=n:a.logWarn(`Study area does not have property '${i}'`)},e.applyInputValue=function(e,t,i){void 0!==e.inputs&&e.inputs.hasOwnProperty(t)?e.inputs[t]=i:a.logWarn(`Study does not have input '${t}'`)},e.setRootProperty=function(e,t,i){if(0===t.length)return;let n=e;for(const e of t.slice(0,-1)){if(null==n||!n.hasOwnProperty(e))break;n=n[e]}const r=t[t.length-1];null!=n&&n.hasOwnProperty(r)?n[r]=i:a.logWarn(`Study does not have property ${t.join(".")}`)}}(l||(l={})),function(e){e.getInputByName=function(e,t){if(void 0===e.inputs)return null;t=t.toLowerCase();for(const i of e.inputs)if(i.name.toLowerCase()===t)return i.id;return null},e.getPlotIdByTitle=function(e,t){if(void 0===e.styles)return null;t=t.toLowerCase();for(const i in e.styles){const n=e.styles[i];if((void 0!==n&&void 0!==n.title?n.title:i).toLowerCase()===t)return i}return null},e.getFilledAreaIdByTitle=function(e,t){if(void 0===e.filledAreas)return null;t=t.toLowerCase();for(const i of e.filledAreas)if(i.title.toLowerCase()===t)return i.id;return null},e.getBandIndexByName=function(e,t){if(void 0===e.bands)return null;t=t.toLowerCase();for(let i=0;i{"use strict";var n=i(854798).Version,r=i(201089).getLogger("Chart.StudyMigration");function o(e){this._studyId=e,this._maxToVers=n.ZERO,this._maxFromVers=n.ZERO,this._migrs=[]}o.prototype.addMigration=function(e,t,i){var r=n.parse(e),o=n.parse(t);r.isGreater(this._maxFromVers)&&(this._maxFromVers=r), o.isGreater(this._maxToVers)&&(this._maxToVers=o),this._migrs.push({fromVers:r,toVers:o,rules:i})},o.prototype.updateInputs=function(e,t,i){if(!i)return i;for(var n=TradingView.clone(i),o=e;o.isLess(t);){var s=this._findMigration(o);if(null==s)break;if(r.logNormal("Migrating study inputs from "+s.fromVers+" to "+s.toVers+" version, studyId: "+this._studyId+", migration: "+JSON.stringify(s)+", inputs: "+JSON.stringify(i)),n=this._applyMigration(n,s),!o.isLess(s.toVers))throw new Error("Problems in study migration process... Possible infinite cycle has been detected and stopped.");o=s.toVers}return o>e&&r.logNormal("Study inputs migration is done, studyId: "+this._studyId+", inputs: "+JSON.stringify(n)),n},o.prototype._findMigration=function(e){for(var t=-1,i=this._maxFromVers,n=0;n=0||t.indexOf(e)>=0},o._applyInputChangedMinMaxRule=function(e,t){if("adjustValIfNeeded"!==t.action)throw new Error("Unknown action "+t.action+" for rule with type "+t.type);var i=e[t.inputId];return it.maxVal&&(e[t.inputId]=t.maxVal),r.logNormal("Input "+t.inputId+"="+i+" adjusted to value "+e[t.inputId]),e},o._applyInputChangedOptionsRule=function(e,t){if(!(["text"].indexOf(t.inputType)>=0&&"resetToDefValIfNeeded"===t.action))throw new Error("Unexpected rule.inputType="+t.inputType+" in rule.action="+t.action);var i=e[t.inputId] ;return t.options.indexOf(i)<0&&(e[t.inputId]=t.defVal,r.logNormal("Input "+t.inputId+"="+i+" reset to default value "+t.defVal)),e},e.exports=o},883161:(e,t,i)=>{"use strict";i.d(t,{StudyMetaInfoBase:()=>f});var n=i(827147),r=i(650151),o=i(368135),s=i(62745),a=i(389137),l=i(42292),d=i(922814);const u=new Set(["CorrelationCoefficient@tv-basicstudies","Correlation - Log@tv-basicstudies-1"]),c=new Set([]),h=new Set(["line"]),p=new Map([["AnchoredVWAP@tv-basicstudies","linetoolanchoredvwap"],["RegressionTrend@tv-basicstudies","linetoolregressiontrend"],["VbPAnchored@tv-basicstudies","linetoolanchoredvp"]]),m=/^([^\$]+)\$\d+$/,v=["bool","color","time","text_area"];class f{createDefaults(){if(this.defaults){const e=(0,a.clone)(this.defaults);e.precision="default";const t=f.getStudyPropertyRootName(this);(0,l.createDefaults)(t,e)}}removeDefaults(){(0,l.removeDefaults)(f.getStudyPropertyRootName(this))}isPlotForceOverlay(e){var t,i,n,r,s;const a=null===(t=this.styles)||void 0===t?void 0:t[e],l=this.plots.find((t=>t.id===e));return!!(null==a?void 0:a.forceOverlay)||l&&(0,o.isOhlcPlot)(l)&&(null===(n=null===(i=this.ohlcPlots)||void 0===i?void 0:i[l.target])||void 0===n?void 0:n.forceOverlay)||!!(null===(s=null===(r=this.ohlcPlots)||void 0===r?void 0:r[e])||void 0===s?void 0:s.forceOverlay)}hasForceOverlayPlots(){var e;return this.plots.some((e=>this.isPlotForceOverlay(e.id)))||Object.values(null!==(e=this.ohlcPlots)&&void 0!==e?e:{}).some((e=>!!(null==e?void 0:e.forceOverlay)))}static getSourceIdsByInputs(e,t){if(!Array.isArray(e)||!t)return[];const i=[];for(const r of e)if(f.isSourceInput(r)&&(0,n.default)(t[r.id])){const e=t[r.id];e.includes("$")&&i.push(e.split("$")[0])}return i}static isSourceInput(e){return Boolean(e.id&&(("source"===e.id||"src"===e.id)&&("text"===e.type||"source"===e.type)||"source"===e.type))}static getSourceInputIds(e){const t=[];for(const i of e.inputs)f.isSourceInput(i)&&t.push(i.id);return t}static setChildStudyMetaInfoPropertiesSourceId(e,t,i){for(const n of e.inputs){if(!f.isSourceInput(n))continue;const e=i.childs().inputs&&i.childs().inputs.childs()[n.id];if(e){const i=e.value(),n=m.exec(i);if(2===(null==n?void 0:n.length)){if("{pid}"===n[1]){const n=i.replace(/^[^\$]+/,t);e.setValue(n)}}}}}static patchSoSInputs(e,t){const i=e=>{const i=m.exec(e);if(2===(null==i?void 0:i.length)){const n=i[1],o=`${(0,r.ensureNotNull)(t(n))}`;return e.replace(/^[^\$]+/,o)}return e};for(const t in e)if(/in_[\d+]/.test(t)||"source"===t){const r=e[t];(0,n.default)(r)?e[t]=i(r):(0,s.isExtendedInput)(r)&&(0,s.isExtendedInputSource)(r)&&(r.v=i(r.v))}}static canBeChild(e){if((0,n.default)(e))return!0;if(!e)return!1;if(e.extra&&!f.isAllowedSourceInputsCount(e.extra.sourceInputsCount)||!0===e.canNotBeChild||!1===e.canBeChild||u.has(e.id))return!1;let t=0;for(const i of e.inputs)f.isSourceInput(i)&&(t+=1);return f.isAllowedSourceInputsCount(t)}static isAllowedSourceInputsCount(e){return e>0||1===e}static canHaveChildren(e){if(e){if(e.isTVScriptStrategy||e.TVScriptSourceCode&&(0,d.isStrategy)(e.TVScriptSourceCode))return!1 ;if(e.id&&!c.has(e.id)&&Array.isArray(e.plots))for(const t of e.plots)if(h.has(t.type))return!0}return!1}static getChildSourceInputTitles(e,t,i){var n;const r={};if(t.plots&&t.plots.length&&e.options&&e.options.length)for(const o of e.options){const e=o?+o.split("$")[1]:NaN,s=isFinite(e)&&t.plots[e];s&&h.has(s.type)&&(r[o]=t.styles&&t.styles[s.id]&&(null===(n=t.styles[s.id])||void 0===n?void 0:n.title)||s.id,i&&(r[o]=i+": "+r[o]))}return r}static canPlotBeSourceOfChildStudy(e){return h.has(e)}static getStudyPropertyRootName(e){const t=p.get(e.id);if(void 0!==t)return t;let i="study_"+e.id;return e.pine&&e.pine.version&&(i+="_"+e.pine.version.replace(".","_")),i}static getStudyPropertyRootNameById(e){const t=p.get(e);return void 0!==t?t:"study_"+e}static isScriptStrategy(e){if(e.extra&&e.extra.kind)return"strategy"===e.extra.kind;if(!0===e.isTVScriptStrategy)return!0;const t=e.TVScriptSourceCode||e.scriptSource;return!!t&&(0,d.isStrategy)(t)}_updateInputDisplayDefaults(){this.inputs.filter((e=>void 0===e.display)).forEach((e=>{v.includes(e.type)?e.display=s.InputDisplayFlags.None:e.display=s.InputDisplayFlags.All}))}}},526075:(e,t,i)=>{"use strict";i.r(t),i.d(t,{StudyMetaInfo:()=>a});var n=i(201089).getLogger("Chart.Study.MetaInfo"),r=i(428784).applyOverridesToStudyDefaults,o=i(883161).StudyMetaInfoBase,s={};class a extends o{constructor(e){super(),TradingView.merge(this,{palettes:{},inputs:[],plots:[],graphics:{},defaults:{}}),TradingView.merge(this,e);var t=e.fullId||e.id;TradingView.merge(this,a.parseIdString(t)),this._updateInputDisplayDefaults()}static versionOf(e){var t="_metainfoVersion"in e&&isNumber(e._metainfoVersion)?e._metainfoVersion:0;return t<0&&n.logError("Metainfo format version cannot be negative: "+t),t}static parseIdString(e){var t={};if(-1===e.indexOf("@"))t.shortId=e,t.packageId="tv-basicstudies",t.id=e+"@"+t.packageId,t.version=1;else{var i=e.split("@");t.shortId=i[0];var n=i[1].split("-");if(3===n.length)t.packageId=n.slice(0,2).join("-"),t.id=t.shortId+"@"+t.packageId,t.version=n[2];else if(1===n.length&&"decisionbar"===n[0])t.packageId="les-"+n[0],t.id=t.shortId+"@"+t.packageId,t.version=1;else{if(1!==n.length)throw new Error("unexpected study id:"+e);t.packageId="tv-"+n[0],t.id=t.shortId+"@"+t.packageId,t.version=1}}if(t.fullId=t.id+"-"+t.version,"tv-scripting"===t.packageId){var r=t.shortId;if(0===r.indexOf("Script$")||0===r.indexOf("StrategyScript$")){var o=r.indexOf("_");t.productId=o>=0?r.substring(0,o):t.packageId}else t.productId=t.packageId}else t.productId=t.packageId;return t}static getPackageName(e){return(/^[^@]+@([^-]+-[^-]+)/.exec(e||"")||[0,"tv-basicstudies"])[1]}static cutDollarHash(e){var t=e.indexOf("$"),i=e.indexOf("@");return-1===t?e:e.substring(0,t)+(i>=0?e.substring(i):"")}static hasUserIdSuffix(e){return/^USER;[\d\w]+;\d+$/.test(e)}static hasPubSuffix(e){return/^PUB;.+$/.test(e)}static hasStdSuffix(e){return/^STD;.+$/.test(e)}static isStandardPine(e){return/^(Strategy)?Script\$STD;.*@tv-scripting$/.test(e)}static getStudyIdWithLatestVersion(e){ const t=a.cutDollarHash(e.id);let i=t;return t.indexOf("@tv-scripting")>=0?i+="-101!":t.endsWith("CP@tv-basicstudies")?i+="-"+Math.min(e.version,207):t.endsWith("CP@tv-chartpatterns")?i+="-"+Math.min(e.version,9):i+="-"+e.version,i}defaultInputs(){for(var e=[],t=0;t0?e[0].id:null}static findStudyMetaInfoByDescription(e,t){if(e){for(var i=0;i{var n;e=i.nmd(e),"undefined"!=typeof window&&(n=window.TVScript=window.TVScript||{}),(n=n||{}).Access={},n.Access.ACCESS_OPEN_NO_AUTH="open_no_auth",n.Access.ACCESS_CLOSED_NO_AUTH="closed_no_auth",n.Access.ACCESS_CLOSED_NEEDS_AUTH="closed_needs_auth",n.Access.MAP_ID_TO_NAME={1:n.Access.ACCESS_OPEN_NO_AUTH,2:n.Access.ACCESS_CLOSED_NO_AUTH,3:n.Access.ACCESS_CLOSED_NEEDS_AUTH},n.Access.MAP_NAME_TO_ID={},Object.keys(n.Access.MAP_ID_TO_NAME).forEach((function(e){n.Access.MAP_NAME_TO_ID[n.Access.MAP_ID_TO_NAME[e]]=e})),n.PinePrefix={},n.PinePrefix.USER="USER;",n.PinePrefix.PUB="PUB;",n.PinePrefix.STD="STD;",n.PinePrefix.TV="TV_",n.PinePrefix.EDGR="EDGR_",n.PineType={},n.PineType.UserSaved="PineType_UserSaved",n.PineType.UserPublished="PineType_UserPublished",n.PineType.BuiltIn="PineType_BuiltIn",n.PineType.Addon="PineType_Addon",n.Type=n.Type||function(){},n.Type.VOID="void",n.Type.INTEGER="integer",n.Type.FLOAT="float",n.Type.STRING="string",n.Type.BOOL="bool",n.Type.COLOR="color",n.Type.SERIES="series",n.Type.PLOT="plot",n.Type.HLINE="hline",n.Type.BARCOLOR="barcolor",n.Type.BGCOLOR="bgcolor",n.Type.PLOTSHAPES="plotshape",n.Type.PLOTCHARS="plotchar",n.Type.PLOTARROWS="plotarrow",n.Type.NA="na",n.Type.ARRAY="array",n.TranslatorDefaultVersion=1,n.TranslatorReferenceVersioningIntroduced=4,n.TranslatorLastVersion=5,n.pineType=function(e){ return e.startsWith(n.PinePrefix.USER)?n.PineType.UserSaved:e.startsWith(n.PinePrefix.PUB)?n.PineType.UserPublished:e.startsWith(n.PinePrefix.STD)||e.startsWith(n.PinePrefix.TV)||e.startsWith(n.PinePrefix.EDGR)?n.PineType.BuiltIn:n.PineType.Addon},n.patchILTemplate=function(e,t,i){var r=i||{};return n._patchTemplate(/<(in_\d+)>/g,e,t,r)},n.decorateQuotes=function(e){if(!e)return e;var t=/([^\\']+?)(')[^']*?/g,i="$1\\$2",n=e;return"'"==n.charAt(0)&&"'"==n.charAt(n.length-1)?"'"+(n=n.substr(1,n.length-2)).replace(t,i)+"'":n.replace(t,i)},n.patchInputs=function(e,t){var i={};for(var n in e)if(e.hasOwnProperty(n)){var r,o=e[n];r=o.isFake?{v:t[o.id],f:!0,t:o.type}:t[o.id],i[o.id]=r}return i},n._patchTemplate=function(e,t,i,r){var o=r||{};return t.replace(e,(function(e,t){for(var r=(t in o?o[t]:i.defaults.inputs[t]),s=0;s=0)r="'"+n.decorateQuotes(r)+"'";else if("source"===i.inputs[s].type){var a=r.split("$");a[0]="'"+a[0]+"'",r="source("+a.join(",")+")"}return r}))},n.isStrategy=function(e){return/^\s*strategy\s*\(/m.test(e)};var r=/^\s*\/\/\s*?@version\s*?=\s*?(\S*?)\s*?$/gm,o=/^[0-9]+$/;n.extractVersion=function(e){r.lastIndex=0;var t=r.exec(e);if(null===t)return 1;var i=t[1],s=o.test(i)?Number(i):NaN;return isNaN(s)?1:Math.max(n.TranslatorDefaultVersion,Math.min(s,n.TranslatorLastVersion))},n.canUpgradeVersion=function(e){return e>=3&&e=4&&e<=n.TranslatorLastVersion},e&&e.exports&&(e.exports=n)},953725:(e,t,i)=>{"use strict";i.d(t,{getAlertsActionCreators:()=>r});var n=i(895171);const r=(0,n.default)((async()=>new((await Promise.all([i.e(29223),i.e(88104),i.e(31383),i.e(18960),i.e(49502)]).then(i.bind(i,388805))).AlertsActionCreators)));(0,n.default)((async()=>new((await Promise.all([i.e(29223),i.e(88104),i.e(31383),i.e(18960),i.e(68074)]).then(i.bind(i,880190))).FiresActionCreators)))},591427:(e,t,i)=>{"use strict";i.d(t,{getAlertDescription:()=>o});var n=i(919892),r=i(126290);function o(e){return function(e){return"function"==typeof e.name?e.name():e.name}(e)||function(e){return"description"in e?e.description():e.message}(e)||function(e){const t="function"==typeof e.symbol?(0,n.decodeExtendedSymbol)(e.symbol()):e.symbol,i="function"==typeof e.resolution?e.resolution():e.resolution,o="function"==typeof e.crossInterval?e.crossInterval():e.crossInterval;return(0,r.formatSymbolAndResolution)({symbol:t,resolution:i,crossInterval:o})}(e)}},461794:(e,t,i)=>{e=i.nmd(e),TradingView.cleanButAmpersand=function(e,t){var i=t?["&"]:["&"];return TradingView.clean(e,t,i)},TradingView.strip_tags=function(e){return e&&e.replace?e.replace(/(<([^>]+)>)/gi,""):e},TradingView.encodeSpread=function(e){return encodeURIComponent(e)},TradingView.clean=function(e,t,i){var n=[["&","&"],["<","<"],[">",">"],['"',"""],["'","'"],["'","'"]],r=e;if(!e||!e.replace)return r ;for(var o=0;o{"use strict";i.r(t),i.d(t,{alphaToTransparency:()=>s,applyAlpha:()=>o,applyTransparency:()=>l,colorFromBackground:()=>h,colorToInteger:()=>g,generateColor:()=>r,getLuminance:()=>u,gradientColorAtPercent:()=>p,isColorDark:()=>m,isHexColor:()=>c,resetTransparency:()=>d,rgbaFromInteger:()=>v,rgbaToInteger:()=>f,transparencyToAlpha:()=>a});var n=i(724377);function r(e,t,i){if(t=t||0,!c(e))return i?(0,n.rgbaToString)((0,n.rgba)((0,n.parseRgb)(e),(0,n.normalizeAlphaComponent)(a(t)))):e;const[r,o,s]=(0,n.parseRgb)(e),l=(0,n.normalizeAlphaComponent)(a(t));return(0,n.rgbaToString)([r,o,s,l])}function o(e,t,i){const r=(0,n.tryParseRgba)(e);if(null===r)throw new Error(`Invalid color: ${e}`);const[o,s,a,l]=r,d=(0,n.normalizeAlphaComponent)(t*(i?l:1));return(0,n.rgbaToString)((0,n.rgba)([o,s,a],d))}function s(e){return 100*(1-e)}function a(e){if(e<0||e>100)throw new Error("invalid transparency");return 1-e/100}function l(e,t){if("transparent"===e)return e;const i=(0,n.parseRgba)(e),r=i[3];return(0,n.rgbaToString)((0,n.rgba)(i[0],i[1],i[2],a(t)*r))}function d(e){return"transparent"===e?e:c(e)?e.slice(0,7):(0,n.rgbaToString)((0,n.rgba)((0,n.parseRgb)(e),(0,n.normalizeAlphaComponent)(1)))}function u(e){const t=(0,n.parseRgb)(e).map((e=>(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)));return Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function c(e){return 0===e.indexOf("#")}function h(e){return"black"===(0,n.rgbToBlackWhiteString)((0,n.parseRgb)(e),150)?"#ffffff":"#000000"}function p(e,t,i){const[r,o,s,a]=(0,n.parseRgba)(e),[l,d,u,c]=(0,n.parseRgba)(t),h=(0,n.rgba)(Math.round(r+i*(l-r)),Math.round(o+i*(d-o)),Math.round(s+i*(u-s)),a+i*(c-a));return(0,n.rgbaToString)(h)}function m(e){return u(d(e))<.5}function v(e){const t=(e=Math.round(e))%256;e-=t;const i=(e/=256)%256;e-=i;const n=(e/=256)%256;e-=n;return`rgba(${t},${i},${n},${(e/=256)/255})`}function f(e){const t=Math.round(255*e[3]);return e[0]+256*e[1]+65536*e[2]+16777216*t}function g(e){const t=(0,n.tryParseRgba)(e);return null===t?0:f(t)}},781666:(e,t,i)=>{"use strict";i.d(t,{isShowPromoVideo:()=>c,isSignModalOpen:()=>u,showSignModal:()=>d});var n=i(586240),r=i(901896),o=i(490778);const s=n["media-mf-tablet-landscape"],a=n["media-mf-tablet-vertical"];let l=()=>!1;async function d(e){const t=Object.assign({},e,{isShowVideo:c()});if(window.TVD&&window.TVD.signIn)return window.TVD.signIn(t);{!function(){const e=window.matchMedia(n["media-mf-tablet-landscape"]).matches?o:r,t=document.createElement("link");t.rel="preload",t.as="image",t.href=e,document.head.appendChild(t)}() ;const e=await Promise.all([i.e(77992),i.e(67681),i.e(1893),i.e(42381),i.e(38697),i.e(86282),i.e(47821),i.e(29218),i.e(20442),i.e(81271),i.e(90624),i.e(2113),i.e(72456),i.e(85933),i.e(59967),i.e(25261),i.e(5801),i.e(68119),i.e(88760),i.e(86319),i.e(90385),i.e(6910),i.e(67519),i.e(62526),i.e(62926),i.e(36123)]).then(i.bind(i,385192));return l=e.isSignModalOpen,e.showSignModal(t)}}function u(){return l()}function c(){const e=window.matchMedia(s).matches,t=window.matchMedia(a).matches,i=window.innerWidth,n=window.innerHeight;return!!e||!!t&&!(!e&&n{"use strict";i.d(t,{userGeoInfo:()=>s});var n=i(120780);const r=(0,i(201089).getLogger)("User.GeoInfo");let o;function s(){if(void 0!==o)return o;return o=(0,n.fetch)("/check_language/",{method:"POST"}).then((e=>{if(e.ok)return e.json();throw new Error(e.statusText)})).catch((e=>(r.logWarn(e.message),{}))),o}},449628:(e,t,i)=>{"use strict";i.d(t,{disable:()=>d,enable:()=>u,pushBackListener:()=>l});var n=i(541558);const r=[];let o=null;function s(e){for(let t=0;t=0&&!0!==r[t].func(e);t--);}function l(e,t){const i={name:e,func:t},n=s(i.name);n>-1&&r.splice(n,1),r.unshift(i)}function d(){return o?null:(o=(0,n.randomHashN)(4),o)}function u(e){if(e!==o)throw Error("Lock id is outdated");o=null}window.addEventListener("keypress",a,!1)},49336:(e,t,i)=>{"use strict";function n(e,t=!1){"loading"!==document.readyState?t?setTimeout((()=>e()),1):e():document.addEventListener("DOMContentLoaded",(()=>e()))}i.d(t,{whenDocumentReady:()=>n});new Promise((e=>{n(e)}))},930003:(e,t,i)=>{"use strict";i.d(t,{Worker:()=>n});class n extends Worker{constructor(e,t){super(function(e){const t=new URL(e),n=new Blob(["self.WEBPACK_PUBLIC_PATH=",JSON.stringify(new URL(i.p,location.href).href),";\n","self.locale=",JSON.stringify(i.g.locale),";\n",window.language?`self.language=${JSON.stringify(window.language)};\n`:"","importScripts(",JSON.stringify(t.href),");"],{type:"application/javascript"});return URL.createObjectURL(n)}(e),t)}}}}]);