(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[5080],{410864:(t,e,n)=>{"use strict";var o;n.d(e,{ToastIntent:()=>o}),function(t){t.Default="default",t.Success="success",t.Warning="warning",t.Danger="danger"}(o||(o={}))},963239:(t,e,n)=>{"use strict";n.r(e),n.d(e,{copyToClipboard:()=>r,writeImpl:()=>i,writePromiseUsingApi:()=>a});var o=n(793993);function r(t){return i(t,null)}function i(t,e){const n=t.files&&t.files.length>0;if(!n&&e&&e.eventPhase>0)return s(e,t),Promise.resolve();if(!n){let e=!1;const n=n=>{n.stopImmediatePropagation(),s(n,t),e=!0};try{document.addEventListener("copy",n,!0),document.execCommand("copy")}finally{document.removeEventListener("copy",n,!0)}if(e)return Promise.resolve()}return async function(t){const e=(0,o.getClipboard)();if(!e||!e.write||!window.ClipboardItem)throw new DOMException("ClipboardApi is not supported","NotSupportedError");const n={};for(const e of t.files||[])n[e.type]=e;t.text&&(n["text/plain"]=t.text);t.html&&(n["text/html"]=t.html);return e.write([new window.ClipboardItem(n)])}(t)}function s(t,e){t.preventDefault();const n=t.clipboardData;e.text&&n.setData("text/plain",e.text),e.html&&n.setData("text/html",e.html)}async function a(t,e){const n=(0,o.getClipboard)();if("text/plain"===e&&!n.write){const e=await t;return n.writeText(await e.text())}if(!n||!n.write||!window.ClipboardItem)throw new DOMException("ClipboardApi is not supported","NotSupportedError");let r=null;try{r=new window.ClipboardItem({[e]:t})}catch(n){r=new window.ClipboardItem({[e]:await t})}if(r)return n.write([r]);throw new Error("ClipboardApi is not supported")}},414879:(t,e,n)=>{"use strict";var o,r;n.r(e),n.d(e,{Months:()=>r,WeekDays:()=>o}),function(t){t[t.SUNDAY=1]="SUNDAY",t[t.MONDAY=2]="MONDAY",t[t.TUESDAY=3]="TUESDAY",t[t.WEDNESDAY=4]="WEDNESDAY",t[t.THURSDAY=5]="THURSDAY",t[t.FRIDAY=6]="FRIDAY",t[t.SATURDAY=7]="SATURDAY"}(o||(o={})),function(t){t[t.JANUARY=0]="JANUARY",t[t.FEBRUARY=1]="FEBRUARY",t[t.MARCH=2]="MARCH",t[t.APRIL=3]="APRIL",t[t.MAY=4]="MAY",t[t.JUNE=5]="JUNE",t[t.JULY=6]="JULY",t[t.AUGUST=7]="AUGUST",t[t.SEPTEMBER=8]="SEPTEMBER",t[t.OCTOBER=9]="OCTOBER",t[t.NOVEMBER=10]="NOVEMBER",t[t.DECEMBER=11]="DECEMBER"}(r||(r={}))},936410:(t,e,n)=>{"use strict";n.r(e),n.d(e,{monthsFullNames:()=>i,monthsShortNames:()=>s,weekDaysFullNames:()=>a,weekDaysMiniNames:()=>u,weekDaysShortNames:()=>l});var o=n(444372),r=n(414879);const i={[r.Months.JANUARY]:o.t(null,void 0,n(926910)),[r.Months.FEBRUARY]:o.t(null,void 0,n(316467)),[r.Months.MARCH]:o.t(null,void 0,n(322852)),[r.Months.APRIL]:o.t(null,void 0,n(997637)),[r.Months.MAY]:o.t(null,void 0,n(668327)),[r.Months.JUNE]:o.t(null,void 0,n(49385)),[r.Months.JULY]:o.t(null,void 0,n(323230)),[r.Months.AUGUST]:o.t(null,void 0,n(486797)),[r.Months.SEPTEMBER]:o.t(null,void 0,n(661132)),[r.Months.OCTOBER]:o.t(null,void 0,n(290784)),[r.Months.NOVEMBER]:o.t(null,void 0,n(171194)),[r.Months.DECEMBER]:o.t(null,void 0,n(55669))},s={[r.Months.JANUARY]:o.t(null,void 0,n(795425)),[r.Months.FEBRUARY]:o.t(null,void 0,n(835050)), [r.Months.MARCH]:o.t(null,void 0,n(651369)),[r.Months.APRIL]:o.t(null,void 0,n(442762)),[r.Months.MAY]:o.t(null,{context:"short"},n(227991)),[r.Months.JUNE]:o.t(null,void 0,n(715224)),[r.Months.JULY]:o.t(null,void 0,n(6215)),[r.Months.AUGUST]:o.t(null,void 0,n(38465)),[r.Months.SEPTEMBER]:o.t(null,void 0,n(757902)),[r.Months.OCTOBER]:o.t(null,void 0,n(73546)),[r.Months.NOVEMBER]:o.t(null,void 0,n(671230)),[r.Months.DECEMBER]:o.t(null,void 0,n(92203))},a={[r.WeekDays.SUNDAY]:o.t(null,void 0,n(272149)),[r.WeekDays.MONDAY]:o.t(null,void 0,n(561199)),[r.WeekDays.TUESDAY]:o.t(null,void 0,n(944979)),[r.WeekDays.WEDNESDAY]:o.t(null,void 0,n(107147)),[r.WeekDays.THURSDAY]:o.t(null,void 0,n(107951)),[r.WeekDays.FRIDAY]:o.t(null,void 0,n(772970)),[r.WeekDays.SATURDAY]:o.t(null,void 0,n(101144))},l={[r.WeekDays.SUNDAY]:o.t(null,void 0,n(186577)),[r.WeekDays.MONDAY]:o.t(null,void 0,n(783085)),[r.WeekDays.TUESDAY]:o.t(null,void 0,n(794316)),[r.WeekDays.WEDNESDAY]:o.t(null,void 0,n(875094)),[r.WeekDays.THURSDAY]:o.t(null,void 0,n(409787)),[r.WeekDays.FRIDAY]:o.t(null,void 0,n(300564)),[r.WeekDays.SATURDAY]:o.t(null,void 0,n(936835))},u={[r.WeekDays.SUNDAY]:o.t(null,{context:"day_of_week"},n(85954)),[r.WeekDays.MONDAY]:o.t(null,{context:"day_of_week"},n(11268)),[r.WeekDays.TUESDAY]:o.t(null,{context:"day_of_week"},n(831533)),[r.WeekDays.WEDNESDAY]:o.t(null,{context:"day_of_week"},n(226230)),[r.WeekDays.THURSDAY]:o.t(null,{context:"day_of_week"},n(24793)),[r.WeekDays.FRIDAY]:o.t(null,{context:"day_of_week"},n(519801)),[r.WeekDays.SATURDAY]:o.t(null,{context:"day_of_week"},n(963331))}},793993:(t,e,n)=>{"use strict";function o(){var t;return null!==(t=navigator.androidClipboard)&&void 0!==t?t:navigator.clipboard}n.d(e,{getClipboard:()=>o})},674981:(t,e,n)=>{"use strict";n.d(e,{compareTwoCollectionsByIds:()=>m,findFirst:()=>v,indexOf:()=>g,intersect:()=>h,join:()=>f,lowerbound:()=>s,lowerboundExt:()=>i,mapEntriesGenerator:()=>_,moveAfter:()=>p,moveBefore:()=>d,moveToHead:()=>c,nestedMapGenerator:()=>A,removeItemFromArray:()=>y,subtract:()=>u,sum:()=>S,upperbound:()=>l});var o=n(650151);function r(t,e){return t>1,s=o+r;n(t(s),e)?(o=s+1,i-=r+1):i=r}return o}function s(t,e,n,o=0,r=t.length){return i((e=>t[e]),e,n,o,r)}function a(t,e,n=0,o=t.length){return s(t,e,r,n,o)}function l(t,e,n,o=0,r=t.length){let i=r-o;for(;0>1,s=o+r;n(e,t[s])?i=r:(o=s+1,i-=r+1)}return o}function u(t,e){return t.filter((t=>!e.includes(t)))}function c(t,e){const n=t.indexOf(e);return n<0?t.slice():[e].concat(t.slice(0,n)).concat(t.slice(n+1))}function p(t,e,n){const o=new Set(e),r=[],i=[],s=[];return t.forEach(((t,e)=>{o.has(t)?i.push(t):(r.push(t),s.push(e))})),n=n{o.has(t)?i.push(t):(r.push(t),s.push(e))})),n=n<=t.length-1?a(s,n):r.length,r.splice(n,0,...i),{newItems:r,movedItemsStartIndex:n}}function h(t,e){const n=new Set ;return t.forEach((t=>{e.has(t)&&n.add(t)})),n}function f(t,e){const n=new Set(t);return e.forEach((t=>n.add(t))),n}function y(t,e){const n=t.indexOf(e);(0,o.assert)(-1!==n,"Item is not found"),t.splice(n,1)}function v(t,e){for(const n of t)if(e(n))return n;return null}function g(t,e){for(let n=0;nt+e),0)}function*_(t){for(const[e,n]of t)yield[e,n]}function*A(t,e){for(const[n,o]of t)if(void 0===e)for(const[,t]of o)yield[n,t];else{const t=o.get(e);void 0!==t&&(yield[n,t])}}},59171:(t,e,n)=>{"use strict";var o=n(244842),r=[{d:"E-Mini S&P 500",t:"ES"},{d:"E-Mini Nasdaq 100",t:"NQ"},{d:"Gold",t:"GC"},{d:"Silver",t:"SI"},{d:"Crude Oil WTI",t:"CL"},{d:"Natural Gas",t:"NG"},{d:"Australian Dollar",t:"6A"},{d:"Australian Dollar (Floor)",t:"AD"},{d:"Euro FX",t:"6E"},{d:"Euro FX (Floor)",t:"EC"},{d:"Corn",t:"ZC"},{d:"Corn (Floor)",t:"C"},{d:"Eurodollar",t:"GE"},{d:"Eurodollar (Floor)",t:"ED"}],i=function(){var t=[{pattern:"(",ctor:s},{pattern:")",ctor:a},{pattern:"+",ctor:u},{pattern:"-",ctor:c},{pattern:"*",ctor:p},{pattern:"/",ctor:d},{pattern:"^",ctor:h},{pattern:/\d+(?:\.\d*|(?![a-zA-Z0-9_!:.&]))|\.\d+/,ctor:g},{pattern:/\./,ctor:_},{pattern:o.enabled("charting_library_base")?/[a-zA-Z0-9_\u0370-\u1FFF_\u2E80-\uFFFF^][a-zA-Z0-9_\u0020\u0370-\u1FFF_\u2E80-\uFFFF_!:.&]*|'.+?'/:/[a-zA-Z0-9_\u0370-\u1FFF_\u2E80-\uFFFF][a-zA-Z0-9_\u0020\u0370-\u1FFF_\u2E80-\uFFFF_!|:.&]*|'.+?'/,ctor:v},{pattern:/'[^']*/,ctor:S},{pattern:/[\0-\x20\s]+/,ctor:i}];function e(t,e){var n=function(){};return n.prototype=e.prototype,t.prototype=new n,t}function n(){}function i(t){this.value=t}function s(){}function a(){}function l(){}function u(){}function c(){}function p(){}function d(){}function h(){}n.prototype.toString=function(){return this.value},e(i,n),e(s,n),s.prototype.value="(",e(a,n),a.prototype.value=")",e(l,n),e(u,l),u.prototype.value="+",u.prototype.precedence=0,u.prototype.commutative=!0,e(c,l),c.prototype.value="-",c.prototype.precedence=0,c.prototype.commutative=!1,e(p,l),p.prototype.value="*",p.prototype.precedence=1,p.prototype.commutative=!0,e(d,l),d.prototype.value="/",d.prototype.precedence=1,d.prototype.commutative=!1,e(h,l),h.prototype.value="^",h.prototype.precedence=2,h.prototype.commutative=!1;var f=/^'?(?:([A-Z0-9_]+):)?(.*?)'?$/i,y=/[+\-/*]/;function v(t){this.value=t}function g(t){this.value=t}function m(t){this.value=t}function S(){v.apply(this,arguments)}function _(){g.apply(this,arguments)}e(v,n),v.prototype.toString=function(){if(this.hasOwnProperty("_ticker")){var t=y.test(this._ticker)?"'":"";return t+(this._exchange?this._exchange+":":"")+this._ticker+t}return this.value},v.prototype.parse=function(){var t=f.exec(this.value);t[1]&&(this._exchange=t[1]),this._ticker=t[2]},v.prototype.parseAsFutures=function(){this.hasOwnProperty("_ticker")||this.parse();for(var t=function(t){return r.some((function(e){return e.t===t})) },e=2;e>=1;--e){var n=this._ticker.slice(0,e);if(t(n)){this._root=n,this._contract=this._ticker.slice(e);break}}},v.prototype.exchange=function(t){if(this.hasOwnProperty("_ticker")||this.parse(),!(arguments.length>0))return this._exchange;null==t?delete this._exchange:this._exchange=t+""},v.prototype.ticker=function(t){if(this.hasOwnProperty("_ticker")||this.parse(),!(arguments.length>0))return this._ticker;null==t?delete this._ticker:this._ticker=t+"",delete this._root,delete this._contract},v.prototype.root=function(t){if(this.hasOwnProperty("_root")||this.parseAsFutures(),!(arguments.length>0))return this._root;null==t?delete this._root:(this._root=t+"",this._root&&(this._ticker=this._root+(this._contract||"")))},v.prototype.contract=function(t){if(this.hasOwnProperty("_contract")||this.parseAsFutures(),!(arguments.length>0))return this._root;null==t?delete this._contract:(this._contract=t+"",this._root&&(this._ticker=this._root+this._contract))},e(g,n),g.prototype.toString=function(){return this.hasOwnProperty("_normalizedValue")?this._normalizedValue:this.value},g.prototype.parse=function(){this._normalizedValue=this.value.replace(/^0+|\.0*$/g,"").replace(/(\.\d*?)0+$/,"$1").replace(/^(\.|$)/,"0$1")},m.prototype.toString=function(){return this.value},e(S,v),S.prototype.isIncomplete=!0,S.prototype.incompleteSuggest=function(){if("'"!==this.value)return String("'")},e(_,g),_.prototype.isIncomplete=!0;var A=new RegExp(t.map((function(t){return"("+("string"==typeof t.pattern?t.pattern.replace(/[\^$()[\]{}*+?|\\]/g,"\\$&"):t.pattern.source)+")"})).concat(".").join("|"),"g");function b(e,n){var o,r=[];t:for(;o=A.exec(e);){for(var s=t.length;s--;)if(o[s+1]){if(t[s].ctor){var a=new t[s].ctor(o[s+1]);a._offset=o.index,r.push(a)}continue t}var l=new m(o[0]);l._offset=o.index,r.push(l)}if(n&&n.recover){var u;for(s=r.length;s--;){var c=r[s];if(c instanceof g||c instanceof v){if(void 0!==u){var p=new v(""),d=r.splice(s,u-s+1,p);p.value=d.map((function(t){return t.value})).join("")}u=s}else c instanceof i||(u=void 0)}}return r}function T(t){for(var e=[],n=0;ni.precedence&&(o[o.length-1].minPrecedence=i.precedence);else if(i instanceof s)o.push(e={minPrecedence:1/0,openBraceIndex:r});else if(i instanceof a){var u=t[(e=o.pop()).openBraceIndex-1],c=t[r+1];c instanceof l&&!(c.precedence<=e.minPrecedence)||!(!(u instanceof l)||u.precedencee.minPrecedence&&(o[o.length-1].minPrecedence=e.minPrecedence))}}for(r=n.length;r--;)t.splice(n[r],1);return t}function D(t){if("string"!=typeof t)throw new TypeError("expression must be a string");return(t=b(t)).filter((function(t){return t instanceof v})).map((function(t){return t.exchange()})).filter((function(t){return t}))}function E(t){return 1!==(t=D(t)).length?null:t[0] }function P(t,e){return(t=D(t)).some((function(t){return e.includes((t||"").toUpperCase())}))}function I(t){return t.join("")}return{tokenize:b,validate:function(t){if(o.enabled("charting_library_base"))return{currentState:"var"};for(var e="init",n="var",r=e,u={warnings:[],errors:[],isEmpty:!0},c=[],p=0;p{"use strict";var o;n.d(e,{ACTION_ID:()=>o}),function(t){t.UnknownAction="UnknownAction",t.ChartChangeTimeZone="Chart.ChangeTimeZone",t.ChartLineToolPitchforkChangeTypeToInside="Chart.LineTool.Pitchfork.ChangeTypeToInside",t.ChartLineToolPitchforkChangeTypeToModifiedSchiff="Chart.LineTool.Pitchfork.ChangeTypeToModifiedSchiff",t.ChartLineToolPitchforkChangeTypeToOriginal="Chart.LineTool.Pitchfork.ChangeTypeToOriginal",t.ChartLineToolPitchforkChangeTypeToSchiff="Chart.LineTool.Pitchfork.ChangeTypeToSchiff",t.Loading="Loading"}(o||(o={}))},373571:(t,e,n)=>{"use strict";n.r(e),n.d(e,{Action:()=>a,Loader:()=>u,Separator:()=>l});var o=n(650151),r=n(707957),i=n(470316),s=n(541558);class a{constructor(t){this.type="action",this._destroyed=!1,this._loadOptionsPromise=null,this._customAction=null;const{actionId:e,options:n,optionsLoader:i,customActionOptions:l,customActionOptionsLoader:u,id:c=s.guid()}=t;(0,o.assert)(void 0!==e,"actionId must be defined"),this.id=c,this._onUpdate=new r.Delegate,this._options={actionId:e,...n},this.update(n),this._loadOptionsGetter=null!=i?i:null,this._loadOptionsGetter&&(this._options.loading=!0),l&&(this._customAction=new a({actionId:e,options:l,optionsLoader:u,id:c}))}custom(){return this._customAction}execute(){this._options.checkable&&this.update({checked:!this._options.checked}),this._options.onExecute&&this._options.onExecute(this)}getLabel(){return this._options.label||""}getSubItems(){return this._options.subItems||[]}isDisabled(){return!0===this._options.disabled}isActive(){return!0===this._options.active}isCheckable(){return!0===this._options.checkable}isChecked(){return!0===this._options.checked}isLoading(){return!0===this._options.loading}loadOptions(){return this._loadOptionsPromise?this._loadOptionsPromise:this._loadOptionsGetter?(this._loadOptionsPromise=this._loadOptionsGetter().then((t=>this.update({...t,loading:!1}))),this._loadOptionsPromise):null}getSize(){var t;return null!==(t=this._options.size)&&void 0!==t?t:"normal"}getPayload(){return this._options.payload}update(t){this._destroyed||(this._unbindShortcut(),t.hotkeyHash&&(this._options.shortcutHint=(0,i.humanReadableHash)(t.hotkeyHash)),this._options=Object.assign(this._options,t),this._bindShortcut(),this._onUpdate.fire(this))}onUpdate(){return this._onUpdate}getState(){return this.loadOptions(),{actionId:this._options.actionId,label:this.getLabel(),styledLabel:this._options.styledLabel,disabled:this.isDisabled(),active:this.isActive(),subItems:this.getSubItems(),checkable:this.isCheckable(),checked:this.isChecked(),loading:this.isLoading(),size:this.getSize(),doNotCloseOnClick:this._options.doNotCloseOnClick||!1,shortcutHint:this._options.shortcutHint,hint:this._options.hint,icon:this._options.icon,iconId:this._options.iconId,iconChecked:this._options.iconChecked,toolbox:this._options.toolbox,showToolboxOnHover:this._options.showToolboxOnHover||!1,statName:this._options.statName, name:this._options.name,invisibleHotkey:this._options.invisibleHotkey,noInteractive:this._options.noInteractive,jsxLabel:"jsxLabel"in this._options?this._options.jsxLabel:void 0,isRepeatAccepted:this._options.isRepeatAccepted}}destroy(){var t,e,n;this._destroyed=!0,this._onUpdate.destroy(),this._unbindShortcut(),null===(e=(t=this._options).onDestroy)||void 0===e||e.call(t),null===(n=this._customAction)||void 0===n||n.destroy()}options(){return this._options}_bindShortcut(){if(!this._options.hotkeyGroup||!this._options.hotkeyHash)return;const t="string"==typeof this._options.label?this._options.label:this._options.name;this._hotkeyAction=this._options.hotkeyGroup.add({hotkey:this._options.hotkeyHash,isRepeatAccepted:this._options.isRepeatAccepted,desc:t,handler:()=>this.execute(),isDisabled:()=>this.isDisabled()})}_unbindShortcut(){this._hotkeyAction&&(this._hotkeyAction.destroy(),delete this._hotkeyAction)}}class l{constructor(t){this.type="separator",this.id=s.guid(),this._hint=t}getHint(){return this._hint}}class u extends a{constructor(t){super({actionId:t,options:{}})}isLoading(){return!0}getSize(){return"big"}}},394093:(t,e,n)=>{"use strict";var o;n.d(e,{AlertEditorAbortReason:()=>o}),function(t){t.AlertIsInvalid="alert-is-invalid",t.AlertsMaintenance="alerts-maintenance",t.ChartModelNotFound="chart-model-not-found",t.IsAlreadyPresent="is-already-present",t.MainSeriesIsATR="main-series-is-atr",t.MainSeriesIsPercentageLTP="main-series-is-percentage-ltp",t.MainSeriesIsInReplay="main-series-is-in-replay",t.MainSeriesIsOffline="main-series-is-offline",t.SourceIsDangerous="source-is-dangerous",t.SymbolInfoTimeout="symbol-info-timeout",t.SymbolIsInvalid="symbol-is-invalid",t.SymbolCurrencyConverted="symbol-currency-converted",t.SymbolUnitConverted="symbol-unit-converted",t.SymbolCurrencyAndUnitConverted="symbol-currency-and-unit-converted",t.SymbolIsEconomics="symbol-is-economics",t.UnsupportedResolution="unsupported-resolution",t.ManualAbort="manual-abort",t.MisleadingPriceScale="misleading-price-scale",t.ResolutionIsTicks="resolution-is-ticks"}(o||(o={}))},208044:(t,e,n)=>{"use strict";n.d(e,{createLayout:()=>a,layoutInitialSizingState:()=>u});var o=n(203308),r=n(822914),i=n(650151);function s(t,e,n){const o=new Set;if("number"==typeof t)return o.add(t),{indices:o,smallestIndex:t,sizer:t=>t,splitters:()=>[],resizeApplier:(t,e,n,o,r)=>r,syncSublayoutsBySplitter:(t,e)=>e};const a=t[0],l=t.slice(1).map((t=>s(t,e)));let u=1/0;for(const t of l)for(const e of Array.from(t.indices))e{const l="h"===s?t.width:t.height;let u,c,p;if(a){const t=e*n+o*l;u=Math.round(t),c=e===i-1?l-u:Math.round(t+r*l)-u}else{const t=(l-(i-1)*n)/i,o=e*(t+n);u=Math.round(o),c=Math.round(o+t)-u}return p="h"===s?{top:t.top,left:t.left+u,height:t.height,width:c}:{top:t.top+u,left:t.left,height:c,width:t.width},p},p=(t,e,n,o,r,i,s)=>{if("number"==typeof n)return[];const a=n[0],l=n.slice(1);return l.reduce(((n,u,d)=>{var h ;const f=null==s?void 0:s[d],y=null!==(h=null==f?void 0:f.percent)&&void 0!==h?h:1/l.length,v=c(t,d,e,n.sumOfCoeffsBefore,y,l.length,a,s),g=n.sumOfCoeffsBefore+y;if(d{var y;const v=null==s?void 0:s[f];if("number"==typeof o)return v;if(!u&&f!==r.indexes[l])return v;const g=null!==(y=null==v?void 0:v.percent)&&void 0!==y?y:1/p.length,m=c(t,f,e,h[f],g,p.length,a,s);return{percent:v.percent,substate:d(m,e,n,o,r,(0,i.ensureDefined)(v.substate),l+1,u)}}));{const e=o[0];if(e!==r.orientation||s.length<2)return s;const i=Math.min(r.indexes[l],s.length-2),a="v"===e?t.height:t.width,u=n/a,c=s[i].percent+s[i+1].percent;return s[i].percent+=u,s[i].percent=Math.min(c-.05,Math.max(.05,s[i].percent)),s[i+1].percent-=u,s[i+1].percent=Math.min(c-.05,Math.max(.05,s[i+1].percent)),s}}function h(t,e){if(1===t.length)return e;{const n=(0,i.ensureDefined)(e[t[0]].substate);return h(t.slice(1),n)}}function f(t,e,n,o,s){if("number"==typeof t)return n;const a=t.slice(1);if(s{const a=null==n?void 0:n[r];return"number"==typeof t?a:{percent:a.percent,substate:f(t,e,(0,i.ensureDefined)(a.substate),o,s+1)}}));{const t=e.indexes[s];if(o.lengthn.length){const e=(0,r.default)(o);if(t>=n.length-1){const t=o.length-n.length;for(let n=0;nt.percent=o[e].percent)),n}}return{indices:o,smallestIndex:u,sizer:(t,e,n,o,r)=>{let i,s,u,p=0,d=0,h=0;for(let t=0;t=n||(o.indices.has(e)&&(i=o,u=null==r?void 0:r[t].substate,r&&(h=r[t].percent),s=p),p++,r&&0===h&&(d+=r[t].percent))}const f=c(t,s,o,d,h,p,a,r);return i.sizer(f,e,n,o,u)},splitters:(e,n,o)=>p(e,n,t,0,[],"",o),resizeApplier:(e,n,o,r,i,s)=>d(e,n,o,t,r,i,0,s),syncSublayoutsBySplitter:function(e,n){const o=h(e.indexes,n);return f(t,e,n,o,0)}}}function a(t,e,n){const o=s(t,e);return{title:n,count:o.indices.size,sizer:o.sizer,splitters:o.splitters,resizeApplier:o.resizeApplier,syncSublayoutsBySplitter:o.syncSublayoutsBySplitter,expression:t,layoutType:e}}function l(t){return t.map((e=>{if((0,o.default)(e))return{percent:1/t.length};{ const n=e.slice(1);return{percent:1/t.length,substate:l(n)}}}))}function u(t){return l(t.slice(1))}},533422:(t,e,n)=>{"use strict";n.r(e),n.d(e,{isMultipleLayout:()=>u,isSingleLayout:()=>l,isSupportedLayout:()=>c,layouts:()=>a,tryGuessingTheMostSuitableLayout:()=>p});var o=n(934976),r=n(208044);const i={s:{title:"1 chart",count:1,layoutType:"s",sizer:(t,e)=>{if(0!==e)throw new RangeError("invalid index");return t},splitters:()=>[],resizeApplier:(t,e,n,o,r)=>r,syncSublayoutsBySplitter:(t,e)=>e,expression:["h",0]}};let s;s={"2h":(0,r.createLayout)(o["2h"],"2h","2-up horizontal"),"2v":(0,r.createLayout)(o["2v"],"2v","2-up vertical"),"2-1":(0,r.createLayout)(o["2-1"],"2-1","2 at top and 1 at bottom"),"1-2":(0,r.createLayout)(o["1-2"],"1-2","1 at top and 2 at bottom"),"3s":(0,r.createLayout)(o["3s"],"3s","3-up stacked"),"3r":(0,r.createLayout)(o["3r"],"3r","3-up stacked left"),"3h":(0,r.createLayout)(o["3h"],"3h","3-up horizontal"),"3v":(0,r.createLayout)(o["3v"],"3v","3-up vertical"),4:(0,r.createLayout)(o[4],"4","4-up"),"4h":(0,r.createLayout)(o["4h"],"4h","4-up horizontal"),"4v":(0,r.createLayout)(o["4v"],"4v","4-up vertical"),"4s":(0,r.createLayout)(o["4s"],"4s","4-up stacked"),"4s-l":(0,r.createLayout)(o["4s-l"],"4s-l","4-up stacked left"),"5h":(0,r.createLayout)(o["5h"],"5h","5-up horizontal"),"5v":(0,r.createLayout)(o["5v"],"5v","5-up vertical"),"6h":(0,r.createLayout)(o["6h"],"6h","6-up horizontal"),"6v":(0,r.createLayout)(o["6v"],"6v","6-up vertical"),"7h":(0,r.createLayout)(o["7h"],"7h","7-up horizontal"),"8h":(0,r.createLayout)(o["8h"],"8h","8-up horizontal"),"8v":(0,r.createLayout)(o["8v"],"8v","8-up vertical"),"2-2":(0,r.createLayout)(o["2-2"],"2-2","2 at top and 2 at bottom"),"2-2-l":(0,r.createLayout)(o["2-2-l"],"2-2-l","2 at left and 2 at right"),"2-3":(0,r.createLayout)(o["2-3"],"2-3","2 at top and 3 at bottom"),"3-2":(0,r.createLayout)(o["3-2"],"3-2","3 at top and 2 at bottom"),"1-3":(0,r.createLayout)(o["1-3"],"1-3","1 at top and 3 at bottom"),"1-4":(0,r.createLayout)(o["1-4"],"1-4","1 at top and 4 at bottom"),"2-4":(0,r.createLayout)(o["2-4"],"2-4","2 at top and 4 at bottom"),"5s":(0,r.createLayout)(o["5s"],"5s","5-up stacked"),6:(0,r.createLayout)(o[6],"6","6-up"),"6c":(0,r.createLayout)(o["6c"],"6c","6-up in two columns"),8:(0,r.createLayout)(o[8],"8","8-up"),"8c":(0,r.createLayout)(o["8c"],"8c","8-up in two columns"),"9s":(0,r.createLayout)(o["9s"],"9s","3x3 square"),"9h":(0,r.createLayout)(o["9h"],"9h","9-up horizontal"),"9v":(0,r.createLayout)(o["9v"],"9v","9-up vertical"),"10h":(0,r.createLayout)(o["10h"],"10h","10-up horizontal"),"10v":(0,r.createLayout)(o["10v"],"10v","10-up vertical"),"10c5":(0,r.createLayout)(o["10c5"],"10c5","2-up in 5 columns"),"12c6":(0,r.createLayout)(o["12c6"],"12c6","2-up in 6 columns"),"12c4":(0,r.createLayout)(o["12c4"],"12c4","3-up in 4 columns"),"14c7":(0,r.createLayout)(o["14c7"],"14c7","2-up in 7 columns"),"16c8":(0,r.createLayout)(o["16c8"],"16c8","2-up in 8 columns"),"16c4":(0,r.createLayout)(o["16c4"],"16c4","4-up in 4 columns")};const a={...i,...s} ;function l(t){return"s"===t}function u(t){return!l(t)}function c(t){return l(t)||s.hasOwnProperty(t)}function p(t){const e=/(\d)-(\d)/.exec(t);let n=1;for(n=3===(null==e?void 0:e.length)?parseInt(e[1])+parseInt(e[2]):parseInt(t);n>1;){const t=Object.keys(s).find((t=>s[t].count===n));if(t)return t;n--}return"s"}},551775:(t,e,n)=>{"use strict";n.d(e,{customFormatters:()=>o});const o={dateFormatter:null,timeFormatter:null,tickMarkFormatter:null,priceFormatterFactory:null,studyFormatterFactory:null}},855353:(t,e,n)=>{"use strict";n.d(e,{LineToolStudyStatusView:()=>r});var o=n(833642);class r extends o.StatusView{constructor(t){super(t.statusProvider({}))}getSplitTitle(){return this._statusProvider.getSplitTitle()}}},428784:(t,e,n)=>{"use strict";n.d(e,{applyOverridesToStudyDefaults:()=>p});var o=n(650151),r=n(368135),i=n(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,i.getLogger)("Chart.Model.StudyPropertiesOverrider");var l,u;function c(t,e,n,o){const r=n.split(".");if(0===r.length||0===r[0].length)return;const i=function(t){const e=t.split(":");return{name:e[0],type:2===e.length?e[1]:null}}(r[0]),s=i.name,c=i.type,p=null!==c,d=!p||"band"===c,h=!p||"area"===c,f=!p||"input"===c,y=!p||"plot"===c?u.getPlotIdByTitle(t,s):null,v=d?u.getBandIndexByName(t,s):null,g=h?u.getFilledAreaIdByTitle(t,s):null,m=f?u.getInputByName(t,s):null,S=e.hasOwnProperty(s);if((null!==y?1:0)+(null!==v?1:0)+(null!==g?1:0)+(null!==m?1:0)+(S?1:0)>1)return void a.logWarn(`Study '${t.description}' has ambiguous identifier '${s}'`);const _=r[1];if(null!==y){if(1===r.length)return void a.logWarn(`Path of sub-property of '${s}' plot for study '${t.description}' must be not empty`);const n=r.slice(1);l.applyPlotProperty(t,e,y,n,o)}else if(null!==m)l.applyInputValue(e,m,o);else if(null!==v){if(void 0===_)return void a.logWarn(`Property name of '${s}' band for study '${t.description}' must be set`);l.applyBandProperty(e,v,_,o)}else if(null!==g){if(void 0===_)return void a.logWarn(`Property name of '${s}' area for study '${t.description}' must be set`);l.applyFilledAreaProperty(e,g,_,o)}else S?l.setRootProperty(e,r,o):a.logWarn(`Study '${t.description}' has no plot or input '${s}'`)}function p(t,e,n){for(const o in t){if(!t.hasOwnProperty(o))continue;const r=o.indexOf(".");if(-1===r)continue;const i=o.substring(0,r),s=u.getMetaInfoByDescription(e,i);if(null===s){a.logWarn(`There is no such study ${i}`);continue}const l=n(s);null!==l?c(s,l,o.substring(r+1),t[o]):a.logWarn(`Cannot apply overrides for study ${i}`)}}!function(t){t.applyPlotProperty=function(t,e,n,i,l){ if(void 0===e.styles)return void a.logWarn("Study does not have styles");const u=i[0];if("color"===u){const s=function(t,e,n){if(void 0===t.plots)return null;for(const o of t.plots){if(!(0,r.isPaletteColorerPlot)(o)||void 0===e.palettes)continue;const t=e.palettes[o.palette];if(o.target===n&&void 0!==t)return t}return null}(t,e,n);return void function(t,e,n,r,i){var s;void 0!==t.styles?null===e&&!isNaN(r)&&r>0?a.logWarn(`Study plot does not have color #${r}`):((0===r||isNaN(r))&&((0,o.ensureDefined)(t.styles[n]).color=String(i),r=0),null!==e&&((0,o.ensureDefined)(null===(s=e.colors)||void 0===s?void 0:s[r]).color=String(i))):a.logWarn("Study does not have styles")}(e,s,n,i.length>1?parseInt(i[1]):NaN,l)}const c=e.styles[n];if(void 0!==c&&c.hasOwnProperty(u)){if("plottype"===u){const t=s[String(l)];if(void 0===t)return void a.logWarn(`Unsupported plot type for plot: ${l}`);l=t}c[u]=l}else a.logWarn(`Study plot does not have property '${u}'`)},t.applyBandProperty=function(t,e,n,o){if(void 0===t.bands)return void a.logWarn("Study does not have bands");const r=t.bands[e];if(void 0!==r&&r.hasOwnProperty(n)){if("plottype"===n){const t=s[String(o)];if(void 0===t)return void a.logWarn(`Unsupported plot type for band: ${o}`);o=t}r[n]=o}else a.logWarn(`Study band does not have property '${n}'`)},t.applyFilledAreaProperty=function(t,e,n,o){if(void 0===t.filledAreasStyle)return void a.logWarn("Study does not have areas");const r=t.filledAreasStyle[e];void 0!==r&&r.hasOwnProperty(n)?r[n]=o:a.logWarn(`Study area does not have property '${n}'`)},t.applyInputValue=function(t,e,n){void 0!==t.inputs&&t.inputs.hasOwnProperty(e)?t.inputs[e]=n:a.logWarn(`Study does not have input '${e}'`)},t.setRootProperty=function(t,e,n){if(0===e.length)return;let o=t;for(const t of e.slice(0,-1)){if(null==o||!o.hasOwnProperty(t))break;o=o[t]}const r=e[e.length-1];null!=o&&o.hasOwnProperty(r)?o[r]=n:a.logWarn(`Study does not have property ${e.join(".")}`)}}(l||(l={})),function(t){t.getInputByName=function(t,e){if(void 0===t.inputs)return null;e=e.toLowerCase();for(const n of t.inputs)if(n.name.toLowerCase()===e)return n.id;return null},t.getPlotIdByTitle=function(t,e){if(void 0===t.styles)return null;e=e.toLowerCase();for(const n in t.styles){const o=t.styles[n];if((void 0!==o&&void 0!==o.title?o.title:n).toLowerCase()===e)return n}return null},t.getFilledAreaIdByTitle=function(t,e){if(void 0===t.filledAreas)return null;e=e.toLowerCase();for(const n of t.filledAreas)if(n.title.toLowerCase()===e)return n.id;return null},t.getBandIndexByName=function(t,e){if(void 0===t.bands)return null;e=e.toLowerCase();for(let n=0;n{"use strict";n.d(e,{StudyMetaInfoBase:()=>g,replayStrategyStudyId:()=>v});var o=n(827147),r=n(650151),i=n(368135),s=n(62745),a=n(389137),l=n(42292),u=n(922814) ;const c=new Set(["CorrelationCoefficient@tv-basicstudies","Correlation - Log@tv-basicstudies-1"]),p=new Set([]),d=new Set(["line"]),h=new Map([["AnchoredVWAP@tv-basicstudies","linetoolanchoredvwap"],["RegressionTrend@tv-basicstudies","linetoolregressiontrend"],["VbPAnchored@tv-basicstudies","linetoolanchoredvp"]]),f=/^([^\$]+)\$\d+$/,y=["bool","color","time","text_area"],v="ReplayStrategy@tv-scripting";class g{constructor(t){(0,a.merge)(this,{palettes:{},inputs:[],plots:[],graphics:{},defaults:{}}),(0,a.merge)(this,t);const e=t.fullId||t.id;(0,a.merge)(this,g.parseIdString(e)),this._updateInputDisplayDefaults()}state(){const t={};for(const[e,n]of Object.entries(this))this.hasOwnProperty(e)&&(t[e]=n,"id"===e&&(t[e]+="-"+this.version));return t}createDefaults(){if(this.defaults){const t=(0,a.clone)(this.defaults);t.precision="default";const e=g.getStudyPropertyRootName(this);(0,l.createDefaults)(e,t)}}removeDefaults(){(0,l.removeDefaults)(g.getStudyPropertyRootName(this))}isPlotForceOverlay(t){var e,n,o,r,s;const a=null===(e=this.styles)||void 0===e?void 0:e[t],l=this.plots.find((e=>e.id===t));return!!(null==a?void 0:a.forceOverlay)||l&&(0,i.isOhlcPlot)(l)&&(null===(o=null===(n=this.ohlcPlots)||void 0===n?void 0:n[l.target])||void 0===o?void 0:o.forceOverlay)||!!(null===(s=null===(r=this.ohlcPlots)||void 0===r?void 0:r[t])||void 0===s?void 0:s.forceOverlay)}hasForceOverlayPlots(){var t;return this.plots.some((t=>this.isPlotForceOverlay(t.id)))||Object.values(null!==(t=this.ohlcPlots)&&void 0!==t?t:{}).some((t=>!!(null==t?void 0:t.forceOverlay)))}static getSourceIdsByInputs(t,e){if(!Array.isArray(t)||!e)return[];const n=[];for(const r of t)if(g.isSourceInput(r)&&(0,o.default)(e[r.id])){const t=e[r.id];t.includes("$")&&n.push(t.split("$")[0])}return n}static isSourceInput(t){return Boolean(t.id&&(("source"===t.id||"src"===t.id)&&("text"===t.type||"source"===t.type)||"source"===t.type))}static getSourceInputIds(t){const e=[];for(const n of t.inputs)g.isSourceInput(n)&&e.push(n.id);return e}static setChildStudyMetaInfoPropertiesSourceId(t,e,n){for(const o of t.inputs){if(!g.isSourceInput(o))continue;const t=n.childs().inputs&&n.childs().inputs.childs()[o.id];if(t){const n=t.value(),o=f.exec(n);if(2===(null==o?void 0:o.length)){if("{pid}"===o[1]){const o=n.replace(/^[^\$]+/,e);t.setValue(o)}}}}}static patchSoSInputs(t,e){const n=t=>{const n=f.exec(t);if(2===(null==n?void 0:n.length)){const o=n[1],i=`${(0,r.ensureNotNull)(e(o))}`;return t.replace(/^[^\$]+/,i)}return t};for(const e in t)if(/in_[\d+]/.test(e)||"source"===e){const r=t[e];(0,o.default)(r)?t[e]=n(r):(0,s.isExtendedInput)(r)&&(0,s.isExtendedInputSource)(r)&&(r.v=n(r.v))}}static canBeChild(t){if((0,o.default)(t))return!0;if(!t)return!1;if(t.extra&&!g.isAllowedSourceInputsCount(t.extra.sourceInputsCount)||!0===t.canNotBeChild||!1===t.canBeChild||c.has(t.id))return!1;let e=0;for(const n of t.inputs)g.isSourceInput(n)&&(e+=1);return g.isAllowedSourceInputsCount(e)}static isAllowedSourceInputsCount(t){return t>0||1===t}static canHaveChildren(t){if(t){ if(t.isTVScriptStrategy||t.TVScriptSourceCode&&(0,u.isStrategy)(t.TVScriptSourceCode))return!1;if(t.id&&!p.has(t.id)&&Array.isArray(t.plots))for(const e of t.plots)if(d.has(e.type))return!0}return!1}static getChildSourceInputTitles(t,e,n){var o;const r={};if(e.plots&&e.plots.length&&t.options&&t.options.length)for(const i of t.options){const t=i?+i.split("$")[1]:NaN,s=isFinite(t)&&e.plots[t];s&&d.has(s.type)&&(r[i]=e.styles&&e.styles[s.id]&&(null===(o=e.styles[s.id])||void 0===o?void 0:o.title)||s.id,n&&(r[i]=n+": "+r[i]))}return r}static canPlotBeSourceOfChildStudy(t){return d.has(t)}static getStudyPropertyRootName(t){const e=h.get(t.id);if(void 0!==e)return e;let n="study_"+t.id;return t.pine&&t.pine.version&&(n+="_"+t.pine.version.replace(".","_")),n}static getStudyPropertyRootNameById(t){const e=h.get(t);return void 0!==e?e:"study_"+t}static isScriptStrategy(t){if(t.extra&&t.extra.kind)return"strategy"===t.extra.kind;if(!0===t.isTVScriptStrategy)return!0;const e=t.TVScriptSourceCode||t.scriptSource;return!!e&&(0,u.isStrategy)(e)}static isReplayStrategy(t){return t.id===v}static parseIdString(t){const e={};if(-1===t.indexOf("@"))e.shortId=t,e.packageId="tv-basicstudies",e.id=t+"@"+e.packageId,e.version=1;else{const n=t.split("@");e.shortId=n[0];const o=n[1].split("-");if(3===o.length)e.packageId=o.slice(0,2).join("-"),e.id=e.shortId+"@"+e.packageId,e.version=parseInt(o[2]);else if(1===o.length&&"decisionbar"===o[0])e.packageId="les-"+o[0],e.id=e.shortId+"@"+e.packageId,e.version=1;else{if(1!==o.length)throw new Error("unexpected study id:"+t);e.packageId="tv-"+o[0],e.id=e.shortId+"@"+e.packageId,e.version=1}}if(e.fullId=e.id+"-"+e.version,"tv-scripting"===e.packageId){const t=e.shortId;if(0===t.indexOf("Script$")||0===t.indexOf("StrategyScript$")){const n=t.indexOf("_");e.productId=n>=0?t.substring(0,n):e.packageId}else e.productId=e.packageId}else e.productId=e.packageId;return e}_updateInputDisplayDefaults(){this.inputs.filter((t=>void 0===t.display)).forEach((t=>{y.includes(t.type)?t.display=s.InputDisplayFlags.None:t.display=s.InputDisplayFlags.All}))}}},526075:(t,e,n)=>{"use strict";n.r(e),n.d(e,{StudyMetaInfo:()=>a});var o=n(201089).getLogger("Chart.Study.MetaInfo"),r=n(428784).applyOverridesToStudyDefaults,i=n(883161).StudyMetaInfoBase,s={};class a extends i{static versionOf(t){var e="_metainfoVersion"in t&&isNumber(t._metainfoVersion)?t._metainfoVersion:0;return e<0&&o.logError("Metainfo format version cannot be negative: "+e),e}static getPackageName(t){return(/^[^@]+@([^-]+-[^-]+)/.exec(t||"")||[0,"tv-basicstudies"])[1]}static cutDollarHash(t){var e=t.indexOf("$"),n=t.indexOf("@");return-1===e?t:t.substring(0,e)+(n>=0?t.substring(n):"")}static hasUserIdSuffix(t){return/^USER;[\d\w]+;\d+$/.test(t)}static hasPubSuffix(t){return/^PUB;.+$/.test(t)}static hasStdSuffix(t){return/^STD;.+$/.test(t)}static isStandardPine(t){return/^(Strategy)?Script\$STD;.*@tv-scripting$/.test(t)}static getStudyIdWithLatestVersion(t){const e=a.cutDollarHash(t.id);let n=e ;return"ReplayStrategy@tv-scripting"===n?n+="-567!":e.indexOf("@tv-scripting")>=0?n+="-101!":e.endsWith("CP@tv-basicstudies")?n+="-"+Math.min(t.version,207):e.endsWith("CP@tv-chartpatterns")?n+="-"+Math.min(t.version,9):e.endsWith("@tv-volumebyprice")?n+="-"+t.version+"!":n+="-"+t.version,n}defaultInputs(){for(var t=[],e=0;e0?t[0].id:null}static findStudyMetaInfoByDescription(t,e){if(t){for(var n=0;n{var o;t=n.nmd(t),"undefined"!=typeof window&&(o=window.TVScript=window.TVScript||{}),(o=o||{}).Access={},o.Access.ACCESS_OPEN_NO_AUTH="open_no_auth",o.Access.ACCESS_CLOSED_NO_AUTH="closed_no_auth",o.Access.ACCESS_CLOSED_NEEDS_AUTH="closed_needs_auth",o.Access.MAP_ID_TO_NAME={1:o.Access.ACCESS_OPEN_NO_AUTH,2:o.Access.ACCESS_CLOSED_NO_AUTH,3:o.Access.ACCESS_CLOSED_NEEDS_AUTH},o.Access.MAP_NAME_TO_ID={},Object.keys(o.Access.MAP_ID_TO_NAME).forEach((function(t){o.Access.MAP_NAME_TO_ID[o.Access.MAP_ID_TO_NAME[t]]=t})),o.PinePrefix={},o.PinePrefix.USER="USER;",o.PinePrefix.PUB="PUB;",o.PinePrefix.STD="STD;",o.PinePrefix.TV="TV_",o.PinePrefix.EDGR="EDGR_",o.PineType={},o.PineType.UserSaved="PineType_UserSaved",o.PineType.UserPublished="PineType_UserPublished",o.PineType.BuiltIn="PineType_BuiltIn",o.PineType.Addon="PineType_Addon",o.Type=o.Type||function(){},o.Type.VOID="void",o.Type.INTEGER="integer",o.Type.FLOAT="float",o.Type.STRING="string",o.Type.BOOL="bool",o.Type.COLOR="color",o.Type.SERIES="series",o.Type.PLOT="plot",o.Type.HLINE="hline",o.Type.BARCOLOR="barcolor",o.Type.BGCOLOR="bgcolor",o.Type.PLOTSHAPES="plotshape",o.Type.PLOTCHARS="plotchar",o.Type.PLOTARROWS="plotarrow",o.Type.NA="na",o.Type.ARRAY="array",o.TranslatorDefaultVersion=1,o.TranslatorReferenceVersioningIntroduced=4,o.TranslatorLastVersion=5,o.pineType=function(t){return t.startsWith(o.PinePrefix.USER)?o.PineType.UserSaved:t.startsWith(o.PinePrefix.PUB)?o.PineType.UserPublished:t.startsWith(o.PinePrefix.STD)||t.startsWith(o.PinePrefix.TV)||t.startsWith(o.PinePrefix.EDGR)?o.PineType.BuiltIn:o.PineType.Addon},o.patchILTemplate=function(t,e,n){var r=n||{};return o._patchTemplate(/<(in_\d+)>/g,t,e,r)},o.decorateQuotes=function(t){if(!t)return t;var e=/([^\\']+?)(')[^']*?/g,n="$1\\$2",o=t;return"'"==o.charAt(0)&&"'"==o.charAt(o.length-1)?"'"+(o=o.substr(1,o.length-2)).replace(e,n)+"'":o.replace(e,n)},o.patchInputs=function(t,e){var n={};for(var o in t)if(t.hasOwnProperty(o)){var r,i=t[o];r=i.isFake?{v:e[i.id],f:!0,t:i.type }:e[i.id],n[i.id]=r}return n},o._patchTemplate=function(t,e,n,r){var i=r||{};return e.replace(t,(function(t,e){for(var r=(e in i?i[e]:n.defaults.inputs[e]),s=0;s=0)r="'"+o.decorateQuotes(r)+"'";else if("source"===n.inputs[s].type){var a=r.split("$");a[0]="'"+a[0]+"'",r="source("+a.join(",")+")"}return r}))},o.isStrategy=function(t){return/^\s*strategy\s*\(/m.test(t)};var r=/^\s*\/\/\s*?@version\s*?=\s*?(\S*?)\s*?$/gm,i=/^[0-9]+$/;o.extractVersion=function(t){r.lastIndex=0;var e=r.exec(t);if(null===e)return 1;var n=e[1],s=i.test(n)?Number(n):NaN;return isNaN(s)?1:Math.max(o.TranslatorDefaultVersion,Math.min(s,o.TranslatorLastVersion))},o.canUpgradeVersion=function(t){return t>=3&&t=4&&t<=o.TranslatorLastVersion},t&&t.exports&&(t.exports=o)},695242:(t,e,n)=>{"use strict";n.d(e,{canPlaceAlertOnResolution:()=>i});var o=n(223699),r=n(778016);function i(t,e){const n=o.Interval.isSeconds(t),i=e?null==e?void 0:e.alertsOnSeconds:(0,r.enabled)("ALERTS_ON_SECONDS");return!n||i}},922100:(t,e,n)=>{"use strict";n.d(e,{getAlertsFiresFocusHandler:()=>o});const o=(0,n(895171).default)((async()=>{const{AlertsFiresFocusHandler:t}=await n.e(69581).then(n.bind(n,393334));return new t}))},246733:(t,e,n)=>{"use strict";n.r(e),n.d(e,{alphaToTransparency:()=>s,applyAlpha:()=>i,applyTransparency:()=>l,colorFromBackground:()=>d,colorToInteger:()=>g,generateColor:()=>r,getLuminance:()=>c,gradientColorAtPercent:()=>h,isColorDark:()=>f,isHexColor:()=>p,resetTransparency:()=>u,rgbaFromInteger:()=>y,rgbaToInteger:()=>v,transparencyToAlpha:()=>a});var o=n(724377);function r(t,e,n){if(e=e||0,!p(t))return n?(0,o.rgbaToString)((0,o.rgba)((0,o.parseRgb)(t),(0,o.normalizeAlphaComponent)(a(e)))):t;const[r,i,s]=(0,o.parseRgb)(t),l=(0,o.normalizeAlphaComponent)(a(e));return(0,o.rgbaToString)([r,i,s,l])}function i(t,e,n){const r=(0,o.tryParseRgba)(t);if(null===r)throw new Error(`Invalid color: ${t}`);const[i,s,a,l]=r,u=(0,o.normalizeAlphaComponent)(e*(n?l:1));return(0,o.rgbaToString)((0,o.rgba)([i,s,a],u))}function s(t){return 100*(1-t)}function a(t){if(t<0||t>100)throw new Error("invalid transparency");return 1-t/100}function l(t,e){if("transparent"===t)return t;const n=(0,o.parseRgba)(t),r=n[3];return(0,o.rgbaToString)((0,o.rgba)(n[0],n[1],n[2],a(e)*r))}function u(t){return"transparent"===t?t:p(t)?t.slice(0,7):(0,o.rgbaToString)((0,o.rgba)((0,o.parseRgb)(t),(0,o.normalizeAlphaComponent)(1)))}function c(t){const e=(0,o.parseRgb)(t).map((t=>(t/=255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)));return Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function p(t){return 0===t.indexOf("#")}function d(t){return"black"===(0,o.rgbToBlackWhiteString)((0,o.parseRgb)(t),150)?"#ffffff":"#000000"}function h(t,e,n){const[r,i,s,a]=(0,o.parseRgba)(t),[l,u,c,p]=(0,o.parseRgba)(e),d=(0, o.rgba)(Math.round(r+n*(l-r)),Math.round(i+n*(u-i)),Math.round(s+n*(c-s)),a+n*(p-a));return(0,o.rgbaToString)(d)}function f(t){return c(u(t))<.5}function y(t){const e=(t=Math.round(t))%256;t-=e;const n=(t/=256)%256;t-=n;const o=(t/=256)%256;t-=o;return`rgba(${e},${n},${o},${(t/=256)/255})`}function v(t){const e=Math.round(255*t[3]);return t[0]+256*t[1]+65536*t[2]+16777216*e}function g(t){const e=(0,o.tryParseRgba)(t);return null===e?0:v(e)}},33900:(t,e,n)=>{"use strict";n.r(e),n.d(e,{createNoticeDialog:()=>r,showNoticeDialog:()=>i});var o=n(444372);async function r(t){return(await Promise.all([n.e(69749),n.e(5657),n.e(14260),n.e(8954),n.e(88430),n.e(85686),n.e(60678),n.e(45340),n.e(25977),n.e(47484),n.e(74823),n.e(34834)]).then(n.bind(n,114566))).createDialog({width:400,destroyOnClose:!0,title:o.t(null,void 0,n(300963)),content:o.t(null,void 0,n(914031)),contentWrapTemplate:'

',actionsWrapTemplate:'
',actions:[{name:"ok",type:"primary",text:o.t(null,void 0,n(468988)),method:"close",key:[13,32]}],...t})}function i(t){r(t).then((t=>t.open()))}},960769:(t,e,n)=>{"use strict";n(586463);var o=n(324951),r=n(414879),i=r.WeekDays,s=r.Months,a=n(936410),l=a.monthsFullNames,u=a.monthsShortNames,c=a.weekDaysFullNames,p=a.weekDaysShortNames,d=a.weekDaysMiniNames;window.language&&(o.locale(window.language,{months:[l[s.JANUARY],l[s.FEBRUARY],l[s.MARCH],l[s.APRIL],l[s.MAY],l[s.JUNE],l[s.JULY],l[s.AUGUST],l[s.SEPTEMBER],l[s.OCTOBER],l[s.NOVEMBER],l[s.DECEMBER]],monthsShort:[u[s.JANUARY],u[s.FEBRUARY],u[s.MARCH],u[s.APRIL],u[s.MAY],u[s.JUNE],u[s.JULY],u[s.AUGUST],u[s.SEPTEMBER],u[s.OCTOBER],u[s.NOVEMBER],u[s.DECEMBER]],weekdays:[c[i.SUNDAY],c[i.MONDAY],c[i.TUESDAY],c[i.WEDNESDAY],c[i.THURSDAY],c[i.FRIDAY],c[i.SATURDAY]],weekdaysShort:[p[i.SUNDAY],p[i.MONDAY],p[i.TUESDAY],p[i.WEDNESDAY],p[i.THURSDAY],p[i.FRIDAY],p[i.SATURDAY]],weekdaysMin:[d[i.SUNDAY],d[i.MONDAY],d[i.TUESDAY],d[i.WEDNESDAY],d[i.THURSDAY],d[i.FRIDAY],d[i.SATURDAY]],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MMM D",l:"M/D/YYYY",LL:"MMM D, YYYY",ll:"MMM D LT",LLL:"LT - LL",lll:"MMM D, YYYY LT",LLLL:"ddd D MMMM YYYY LT",llll:"ddd D MMM YYYY LT"},calendar:{sameDay:n.tf(null,void 0,n(69130)).format({specialSymbolOpen:"[",specialSymbolClose:"]",dayTime:"LT"}),nextDay:n.tf(null,void 0,n(225744)).format({specialSymbolOpen:"[",specialSymbolClose:"]",dayTime:"LT"}),nextWeek:n.tf(null,void 0,n(529140)).format({specialSymbolOpen:"[",specialSymbolClose:"]",dayTime:"LT",dayName:"dddd"}),lastDay:n.tf(null,void 0,n(393650)).format({specialSymbolOpen:"[",specialSymbolClose:"]",dayTime:"LT"}),lastWeek:n.tf(null,void 0,n(448948)).format({specialSymbolOpen:"[",specialSymbolClose:"]",dayTime:"LT",dayName:"dddd"}),sameElse:"L"},relativeTime:{future:function(t){return t===n.tf(null,void 0,n(542974))?t:n.tf(null,{context:"time_range"},n(544919)).replace("%s",t)},past:function(t){ return t===n.tf(null,void 0,n(542974))?t:n.tf(null,{context:"time_range"},n(692466)).replace("%s",t)},s:n.tf(null,void 0,n(542974)),m:function(t){return n.tf(null,{plural:"%d minutes",count:t},n(425821)).replace("%d",t)},mm:function(t){return n.tf(null,{plural:"%d minutes",count:t},n(425821)).replace("%d",t)},h:n.tf(null,void 0,n(290487)),hh:function(t){return n.tf(null,{plural:"%d hours",count:t},n(189279)).replace("%d",t)},d:n.tf(null,void 0,n(19304)),dd:function(t){return n.tf(null,{plural:"%d days",count:t},n(482792)).replace("%d",t)},M:n.tf(null,void 0,n(268733)),MM:function(t){return n.tf(null,{plural:"%d months",count:t},n(759502)).replace("%d",t)},y:n.tf(null,void 0,n(802730)),yy:function(t){return n.tf(null,{plural:"%d years",count:t},n(406550)).replace("%d",t)}},week:{dow:1,doy:4}}),o.locale(window.language)),t.exports=o},167975:(t,e,n)=>{"use strict";function o(t){return t+"…"}n.d(e,{appendEllipsis:()=>o})},328530:(t,e,n)=>{"use strict";n.d(e,{getTwemojiUrl:()=>r,twemoji:()=>o.default});var o=n(818438);function r(t,e){let n="";return o.default.parse(t,(t=>(n=o.default.base+("svg"===e?`svg/${t}.svg`:`72x72/${t}.png`),!1))),n}o.default.base="https://cdnjs.cloudflare.com/ajax/libs/twemoji/13.0.1/"},96080:(t,e,n)=>{"use strict";function o(t){let e,n=0;if(0===t.length)return n;for(var o=0;oo})},201457:t=>{t.exports=''},934976:t=>{"use strict" ;t.exports=JSON.parse('{"4":["v",["h",0,2],["h",1,3]],"6":["v",["h",0,2,4],["h",1,3,5]],"8":["v",["h",0,2,4,6],["h",1,3,5,7]],"2h":["h",0,1],"2v":["v",0,1],"2-1":["v",["h",0,2],1],"3s":["h",0,["v",1,2]],"3h":["h",0,1,2],"3v":["v",0,1,2],"1-2":["v",0,["h",1,2]],"3r":["h",["v",0,1],2],"4h":["h",0,1,2,3],"4v":["v",0,1,2,3],"4s":["h",0,["v",1,2,3]],"4s-l":["h",["v",1,2,3],0],"5h":["h",0,1,2,3,4],"5v":["v",0,1,2,3,4],"6h":["h",0,1,2,3,4,5],"6v":["v",0,1,2,3,4,5],"7h":["h",0,1,2,3,4,5,6],"8h":["h",0,1,2,3,4,5,6,7],"8v":["v",0,1,2,3,4,5,6,7],"9h":["h",0,1,2,3,4,5,6,7,8],"9v":["v",0,1,2,3,4,5,6,7,8],"10h":["h",0,1,2,3,4,5,6,7,8,9],"10v":["v",0,1,2,3,4,5,6,7,8,9],"1-3":["v",0,["h",1,2,3]],"2-2":["v",["h",0,1],["v",2,3]],"2-2-l":["h",0,1,["v",2,3]],"2-3":["v",["h",0,1],["h",2,3,4]],"3-2":["v",["h",0,1,2],["h",3,4]],"1-4":["v",0,["h",1,2,3,4]],"2-4":["v",["h",0,1],["h",2,3,4,5]],"5s":["h",0,["v",1,2,3,4]],"6c":["v",["h",0,1],["h",2,3],["h",4,5]],"8c":["v",["h",0,1],["h",2,3],["h",4,5],["h",6,7]],"9s":["v",["h",0,1,2],["h",3,4,5],["h",6,7,8]],"10c5":["v",["h",0,2,4,6,8],["h",1,3,5,7,9]],"12c6":["v",["h",0,2,4,6,8,10],["h",1,3,5,7,9,11]],"12c4":["v",["h",0,4,8],["h",1,5,9],["h",2,6,10],["h",3,7,11]],"14c7":["v",["h",0,2,4,6,8,10,12],["h",1,3,5,7,9,11,13]],"16c8":["v",["h",0,2,4,6,8,10,12,14],["h",1,3,5,7,9,11,13,15]],"16c4":["v",["h",0,4,8,12],["h",1,5,9,13],["h",2,6,10,14],["h",3,7,11,15]],"s":0}')}}]);