diff --git a/charting_library/ar-tv-chart.b0eeabd9.html b/charting_library/ar-tv-chart.132c7060.html similarity index 99% rename from charting_library/ar-tv-chart.b0eeabd9.html rename to charting_library/ar-tv-chart.132c7060.html index 1a26edd0..21df487f 100644 --- a/charting_library/ar-tv-chart.b0eeabd9.html +++ b/charting_library/ar-tv-chart.132c7060.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/bundles/library.43cfe6f4b88f9f4c6dc2.js b/charting_library/bundles/library.237999374a0f9a719893.js similarity index 99% rename from charting_library/bundles/library.43cfe6f4b88f9f4c6dc2.js rename to charting_library/bundles/library.237999374a0f9a719893.js index d8ea4798..0e282e5c 100644 --- a/charting_library/bundles/library.43cfe6f4b88f9f4c6dc2.js +++ b/charting_library/bundles/library.237999374a0f9a719893.js @@ -166,7 +166,7 @@ this._start=t,this._length=i}start(){return this._start+s.minutesPerDay*this.ses return this._weekEndsCount}maxTradingDayLength(){return this._maxTradingDayLength}holidaysFromYearStart(e){if(!this._isThereCorrections)return 0;const t=s.get_timezone(this._timezone),i=new o.a(s.get_year(e),s.JANUARY,1),r=o.a.fromCalendar(e);let n=0;const a=this._selectHolidays(i,r);for(let e=0;et.start()%e==0&&t.length()%e==0)}indexOfSession(e,t,i){const n=this._getEntriesForWeek(e);let o=Object(r.lowerbound)(n,new _(t,i,0),d);if(o!==n.length)return new m(e,o,n);let a=e;const l=7-t+this._firstDayOfWeek-1;for(i=-(s.minutesPerDay-i+l*s.minutesPerDay);;){a++;const e=this._getEntriesForWeek(a);if(0!==e.length)return o=Object(r.lowerbound)(e,new _(this._firstDayOfWeek,i,0),d),new m(a,o,e)}}findSession(e,t,i,s=0){const r=this.indexOfSession(e,t,i),n=r.entries;let o=r.entryIndex;if(0!==s){const e=n[o].dayOfWeek(),t=s>0?1:-1;for(;;){const i=o+t;if(i<0||i>=n.length||n[i].dayOfWeek()!==e)break;o=i}}return new m(r.weekIndex,o,n)}getWeekIndex(e){if(!this._isThereCorrections)return 0;const t=s.get_day_of_week(e)-s.SUNDAY,i=s.get_timezone("Etc/UTC"),r=s.get_cal(i,s.get_year(e),s.get_month(e),s.get_day_of_month(e)-t);return Math.floor((r.getTime()+621672192e5)/1e3/86400/7)}correctTradingDay(e){const t=s.get_day_of_week(e),i=60*s.get_hours(e)+s.get_minutes(e),r=this.getWeekIndex(e),n=this.findSession(r,t,i,0),o=n.getEntry().dayOfWeek()-t+7*(n.weekIndex-r);return 0!==o&&s.add_date(e,o),e}alignToSessionStart(e,t=0){const i=s.get_day_of_week(e),r=60*s.get_hours(e)+s.get_minutes(e),n=this.getWeekIndex(e),o=this.findSession(n,i,r,t),a=o.getEntry(),l=a.dayOfWeek()-i+7*(o.weekIndex-n);0!==l&&s.add_date(e,l);const c=a.startOffset();return s.set_hms(e,c/60,c%60,0,0,s.get_timezone(this._timezone)),a.length()}businessDaysToCalendarDays(e,t){let i=this.getWeekIndex(e),r=s.get_day_of_week(e),n=0,o=0;for(;oi);)e[a].dayOfWeek()=t)return n}i++,r=s.SUNDAY}return n}calendarDaysToBusinessDays(e,t){let i=this.getWeekIndex(e),r=s.get_day_of_week(e),n=0,o=0;for(;ni);)e[a].dayOfWeek()=t)return o}i++,r=s.SUNDAY}return o}alignToNearestSessionStart(e,t){return this._alignToNearestSessionValue(e,t,this._entrySessionStart.bind(this))}alignToNearestSessionEnd(e,t){return this._alignToNearestSessionValue(e,t,this._entrySessionEnd.bind(this))}leftBorderOfDailyBar(e){const t=this._getEntriesForDay(e);return 0===t.length?null:(t.sort(p),this._getLeftEntryBorder(e,t[0]))}bordersOfDailyBar(e){const t=this._getEntriesForDay(e);if(0===t.length)return null;t.sort(p);const i=this._getLeftEntryBorder(e,t[0]),r=t[t.length-1],n=s.clone(e) ;let o=60*(r.startOffset()+r.length())-1;const a=Math.floor(o/3600);return o-=3600*a,s.set_hms(n,a,o/60,o%60,0,s.get_timezone(this._timezone)),{from:i,to:n}}getEntriesForWeekByCalendar(e){const t=this.getWeekIndex(e);return this._getEntriesForWeek(t)}_getEntriesForWeek(e){let t=this._entriesHash.get(e);if(void 0===t)return this._entries;if(null!==t)return t;const i=s.get_timezone(this._timezone);t=this._entries.slice();const r=this._weekIndexToCalendar(e),n=this._weekIndexToCalendar(e+1),a=o.a.fromCalendar(r),l=o.a.fromCalendar(n),c=this._selectHolidays(a,l);for(const e of c){const r=e.day.toCalendar(i),n=s.get_day_of_week(r);t=t.filter(e=>e.dayOfWeek()!==n),t=t.concat(e.sessions)}return t.sort(p),this._entriesHash.set(e,t),t}_selectHolidays(e,t){const i=[];let s=e;for(;;){const e=f(this._holidaySessions,s);if(null===e)return i;if(!e.day.before(t))return i;i.push(e),s=e.day.addDays(1)}}_weekIndexToCalendar(e){const t=1e3*(86400*e*7+86400)-621672192e5,i=s.get_cal_from_unix_timestamp_ms(s.get_timezone("Etc/UTC"),t),r=s.get_timezone("Etc/UTC");return s.get_cal(r,s.get_year(i),s.get_month(i),s.get_day_of_month(i))}_alignToNearestSessionValue(e,t,i){const r=s.get_day_of_week(e),n=60*s.get_hours(e)+s.get_minutes(e),o=this.getWeekIndex(e);let a=this.findSession(o,r,n);if(a.getEntry().contains(e)&&o===a.weekIndex||1===t)return i(a,s.clone(e),t);let l=a.entryIndex-1;if(l<0){let e=a.weekIndex,t=a.entries;for(;l<0;)e--,t=this._getEntriesForWeek(e),l+=t.length;a=new m(e,l,t)}else a=new m(a.weekIndex,l,a.entries);return i(a,s.clone(e),t)}_entrySessionStart(e,t,i){return this._entrySessionValue(e,t,i,e=>60*e.start())}_entrySessionEnd(e,t,i){return this._entrySessionValue(e,t,i,e=>60*(e.start()+e.length())-1)}_entrySessionValue(e,t,i,r){let n=s.get_day_of_week(t);const o=e.getEntry();let a=o.dayOfWeek()-o.sessionStartDaysOffset();const l=this.getWeekIndex(t);let c=e.weekIndex-l,h=!1;if(a0&&i>=0||c<0&&i<0)&&s.add_date(t,7*c),!o.contains(t)){let e=a-n;h&&i<0&&(e=-(7-a+n)),s.add_date(t,e),n=s.get_day_of_week(t)}o.isOvernight()&&n===o.dayOfWeek()&&s.add_date(t,-o.sessionStartDaysOffset());let u=r(o);const d=Math.floor(u/3600);return u-=3600*d,s.set_hms(t,d,u/60,u%60,0,s.get_timezone(this._timezone)),t}_getEntriesForDay(e){const t=s.get_day_of_week(e);return this._getEntriesForWeek(this.getWeekIndex(e)).filter(e=>e.dayOfWeek()===t)}_getLeftEntryBorder(e,t){const i=s.clone(e),r=t.startOffset();return s.set_hms(i,r/60,r%60,0,0,s.get_timezone(this._timezone)),i}}},"5rJj":function(e,t,i){"use strict";(function(t){var s=i("ogJP").isSameType,r=i("Ocx9").DefaultProperty;function n(e,t,i,s){this._map=Object.assign({},this._map,s),t&&(t=this.unpackLevels(t)),r.call(this,e,t,i)}inherit(n,r),n.prototype.state=function(e,i){e=e||[];var s=t.prototype.state.call(this,e);return i?s:this.packLevels(s)},n.prototype.clone=function(){for(var e=this.state(),t=new n(this._defaultName,e),i=0;i=t.length)return null;if(t[i.index]===s.INVALID_TIME_POINT_INDEX)return null}return{points:e.points.map(e=>({index:t[e.index],offset:e.offset,level:e.level}))}}function o(e,t,i){return{id:t,points:e.points.map(e=>({...e,index:Object(r.ensureTimePointIndexIndex)(i.indexOf(e.index))}))}}},"68at":function(e,t,i){"use strict";var s=i("5rJj"),r=i("7ADh").LineToolFibWedgeBase,n=i("j3hX").LineToolColorsProperty;class o extends r{constructor(e,t){super(e,t||o.createProperties()),i.e("lt-pane-views").then(i.t.bind(null,"jlk4",7)).then(({ProjectionLinePaneView:e})=>{this._setPaneViews([new e(this,this._model)])})}levelsCount(){return 1}name(){return"Projection"}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(27),i.e(62),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"LzAw"))).ProjectionDefinitionsViewModel}static createProperties(e){var t=new s("linetoolprojection",e,!1,{range:[1,1]});return o._configureProperties(t),t}static _configureProperties(e){r._configureProperties(e),e.addChild("linesColors",new n([e.trendline.color]))}}t.LineToolProjection=o},"6I19":function(e,t,i){"use strict";i.d(t,"b",(function(){return w})),i.d(t,"c",(function(){return P})),i.d(t,"a",(function(){return C}));var s=i("Eyy1"),r=i("ivNn"),n=i("eJTA"),o=i("YFKU"),a=i("qFKp"),l=i("Tmoa"),c=i("Ialn"),h=i("k9/m"),u=i("CW80"),d=i("mMWL"),p=i("GH0z"),_=i("38az"),m=i("7qT/"),f=i("xCUR");const g=a.CheckMobile.any(),b=g&&!0,v=new p.PercentageFormatter,S=window.t("n/a"),y=`${S} (${S}%)`;function w(e,t){const i=Object(n.parseRgb)(t),s=Object(n.parseRgb)(e);return Object(n.distanceRgb)(i,s)<70?Object(n.rgbToHexString)(Object(n.invertRgb)(i)):t}function P(e){if(null===e)return null -;const t=e.properties().child("background");return void 0===t?null:t.value()}class C{constructor(e,t){this._series=e,this._model=t,this._emptyValues=[{title:Object(o.t)("Open"),visible:!1,value:"",index:0,id:""},{title:Object(o.t)("High"),visible:!1,value:"",index:1,id:""},{title:Object(o.t)("Low"),visible:!1,value:"",index:2,id:""},{title:Object(o.t)("Close"),visible:!1,value:"",index:3,id:""},{title:"",visible:!1,value:"",index:4,id:""},{title:"",visible:!1,value:"",index:5,id:""},{title:Object(o.t)("Change"),visible:!1,value:"",index:6,id:""}]}getItems(){return this._emptyValues}getValues(e){const t=this._showLastPriceAndChangeOnly(),i=this._emptyValues.map(e=>({...e,visible:!t}));i[0].value=S,i[1].value=S,i[2].value=S,i[3].value=S,i[6].value=y,i[5].visible=!1;const n=i[4];if(n.value=S,n.visible=!1,this._model.timeScale().isEmpty()||0===this._series.bars().size()||this._series.priceScale().isEmpty())return i;Object(r.isNumber)(e)||(e=Object(s.ensureNotNull)(this._series.data().last()).index);const o=this._series.nearestIndex(e,h.PlotRowSearchMode.NearestLeft);if(void 0===o)return i;const a=this._series.data().valueAt(o),u=P(this._series.model().paneForSource(this._series));if(null===a||null===u)return i;const d=a[1],p=a[2],m=a[3],g=a[4];if(null==d||null==p||null==m||null==g)return i;const{values:C}=this._changesData(g,o,t),x=Object(f.a)(this._series);if(Object(f.b)(this._series))i[6].value="";else if(void 0!==C){const e=this._series.formatter();i[6].value=Object(c.forceLTRStr)(`${e.format(C.change,!0)} (${v.format(C.percentChange,!0)})`)}t?(i[5].value=x(g),i[5].visible=!0,i[6].visible=!0):(i[0].value=x(d),i[1].value=x(p),i[2].value=x(m),i[3].value=x(g),i[4].value=x(this._series.barFunction()(a)));let T=null;if(t&&!b)T=void 0===C||C.change>=0?_.SeriesBarColorer.upColor(this._series.properties()):_.SeriesBarColorer.downColor(this._series.properties());else{const e=this._series.barColorer().barStyle(o,!1);T=w(u,null!=e.barBorderColor?e.barBorderColor:e.barColor)}T=Object(l.resetTransparency)(w(u,T));for(const e of i)e.color=T;return i}_showLastPriceAndChangeOnly(){return g&&(null===this._model.crossHairSource().pane||Object(u.isLineToolName)(d.tool.value())||null!==this._model.lineBeingEdited())}_changesData(e,t,i){if(i&&!b){const e=this._series.quotes();if(null!==e)return{values:{change:e.change,percentChange:e.change_percent}}}else{const i=this._series.data().valueAt(t-1),s=i&&i[4]||null;if(null!==s)return{values:{change:e-s,percentChange:Object(m.a)(s,e)}}}return{}}}},"6KAu":function(e,t,i){"use strict";function s(){return Promise.all([i.e("react"),i.e(1),i.e(3),i.e(16),i.e(93),i.e(0),i.e(2),i.e(15),i.e("change-interval-dialog")]).then(i.bind(null,"iT0o"))}i.d(t,"a",(function(){return s}))},"6ctS":function(e,t){ +;const t=e.properties().child("background");return void 0===t?null:t.value()}class C{constructor(e,t){this._series=e,this._model=t,this._emptyValues=[{title:Object(o.t)("Open"),visible:!1,value:"",index:0,id:""},{title:Object(o.t)("High"),visible:!1,value:"",index:1,id:""},{title:Object(o.t)("Low"),visible:!1,value:"",index:2,id:""},{title:Object(o.t)("Close"),visible:!1,value:"",index:3,id:""},{title:"",visible:!1,value:"",index:4,id:""},{title:"",visible:!1,value:"",index:5,id:""},{title:Object(o.t)("Change"),visible:!1,value:"",index:6,id:""}]}getItems(){return this._emptyValues}getValues(e){const t=this._showLastPriceAndChangeOnly(),i=this._emptyValues.map(e=>({...e,visible:!t}));i[0].value=S,i[1].value=S,i[2].value=S,i[3].value=S,i[6].value=y,i[5].visible=!1;const n=i[4];if(n.value=S,n.visible=!1,this._model.timeScale().isEmpty()||0===this._series.bars().size()||this._series.priceScale().isEmpty())return i;Object(r.isNumber)(e)||(e=Object(s.ensureNotNull)(this._series.data().last()).index);const o=this._series.nearestIndex(e,h.PlotRowSearchMode.NearestLeft);if(void 0===o)return i;const a=this._series.data().valueAt(o),u=P(this._series.model().paneForSource(this._series));if(null===a||null===u)return i;const d=a[1],p=a[2],m=a[3],g=a[4];if(null==d||null==p||null==m||null==g)return i;const{values:C}=this._changesData(g,o,t),x=Object(f.a)(this._series);if(Object(f.b)(this._series))i[6].value="";else if(void 0!==C){const e=this._series.formatter();i[6].value=Object(c.forceLTRStr)(`${e.format(C.change,!0)} (${v.format(C.percentChange,!0)})`)}t?(i[5].value=x(g),i[5].visible=!0,i[6].visible=!0):(i[0].value=x(d),i[1].value=x(p),i[2].value=x(m),i[3].value=x(g),i[4].value=x(this._series.barFunction()(a)));let T=null;if(t&&!b)T=void 0===C||C.change>=0?_.SeriesBarColorer.upColor(this._series.properties()):_.SeriesBarColorer.downColor(this._series.properties());else{const e=this._series.barColorer().barStyle(o,!1);T=w(u,null!=e.barBorderColor?e.barBorderColor:e.barColor)}T=Object(l.resetTransparency)(w(u,T));for(const e of i)e.color=T;return i}_showLastPriceAndChangeOnly(){return g&&(null===this._model.crossHairSource().pane||Object(u.isLineToolName)(d.tool.value())||null!==this._model.lineBeingEdited())}_changesData(e,t,i){var s;if(i&&!b){const e=this._series.quotes();if(null!==e)return{values:{change:e.change,percentChange:e.change_percent}}}else{const i=this._series.data().search(t-1,h.PlotRowSearchMode.NearestLeft),r=null!==(s=null==i?void 0:i.value[4])&&void 0!==s?s:null;if(null!==r)return{values:{change:e-r,percentChange:Object(m.a)(r,e)}}}return{}}}},"6KAu":function(e,t,i){"use strict";function s(){return Promise.all([i.e("react"),i.e(1),i.e(3),i.e(16),i.e(93),i.e(0),i.e(2),i.e(15),i.e("change-interval-dialog")]).then(i.bind(null,"iT0o"))}i.d(t,"a",(function(){return s}))},"6ctS":function(e,t){ e.exports=''},"6sst":function(e,t,i){"use strict";i.r(t),i.d(t,"OverlayStudyPriceLineAxisView",(function(){return r}));var s=i("TmNs");class r extends s.PriceLineAxisView{constructor(e){super(),this._study=e}_value(){return this._study.lastValueData("",!0)}_priceLineColor(e){return e}_lineWidth(){return 1}_isVisible(){const e=this._study.model().properties().scalesProperties.showSeriesLastValue.value();return this._study.properties().childs().showPriceLine.value()&&e}}},"6vtU":function(e,t,i){"use strict";i.r(t),i.d(t,"setAdditionalSymbolInfoFields",(function(){return r})),i.d(t,"getAdditionalSymbolInfoFields",(function(){return n}));let s=[];function r(e){s=e}function n(){return s}},"704P":function(e,t,i){"use strict";(function(e){var s=i("Ss5c").LineDataSource,r=i("jkoZ"),n=i("Ocx9").DefaultProperty,o=i("k9/m").PlotRowSearchMode,a=i("s1Gx").sortSourcesPreOrdered.LineToolExecution;class l{constructor(e,t){this._pane=e,this._timeScale=t}static recreateOrderedByBarsSourcesCache(e){l.clearOrderedByBarsSourcesCache();for(var t=l.prototype,i=e.sourcesByGroup().all(),s=0;s_.lastBar()||i<_.firstBar())return{x:-1,y:-1};for(var m=this._cachedByBarIndexOrderedExecutions[i]||this._pane.sourcesByGroup().all(),f=m.length-1;f>=0;--f){var g=m[f];if(g instanceof h&&g._adapter._index===i&&g._adapter.getDirection()===r){if(g===e._line)break;var b=g._adapter._height();s=n?s+b:s-b}}return{x:t.indexToCoordinate(i),y:s}}}l.prototype._cachedByBarIndexOrderedExecutions={};class c{constructor(e){this._line=e}_height(){var e=this.getArrowHeight(),t=this.getArrowSpacing();this.getText()&&r.fontHeight(this.getFont());return e+t+0+10}getIndex(){return this._line._model.timeScale().baseIndex()-this._line.points()[0].index}setIndex(e){var t=this._line._model.timeScale().baseIndex()-Math.abs(e);this._line.startMoving({logical:this._line.points()[0]});var i=TradingView.merge({},this._line.points()[0]);return i.index=t,this._line.move({logical:i}),this._line.endMoving(),this}getTime(){return this._unixtime}setTime(e){ return this._unixtime=e,this._line.restorePoints([{offset:0,price:this.getPrice(),time_t:this._unixtime}],[]),this._line.createServerPoints(),this}getPrice(){return this._line.points().length>0?this._line.points()[0].price:this._line._timePoint.length>0?this._line._timePoint[0].price:void 0}setPrice(e){return this._line.points().length>0&&(this._line.points()[0].price=e),this._line._timePoint.length>0&&(this._line._timePoint[0].price=e),this}getText(){return this._line.properties().text.value()}setText(e){return this._line.properties().text.setValue(e||""),this._line.updateAllViewsAndRedraw(),this}getArrowHeight(){return this._line.properties().arrowHeight.value()}setArrowHeight(e){return this._line.properties().arrowHeight.setValue(e||5),this}getArrowSpacing(){return this._line.properties().arrowSpacing.value()}setArrowSpacing(e){return this._line.properties().arrowSpacing.setValue(e||1),this}getDirection(){return this._line.properties().direction.value()}setDirection(e){return this._line.properties().direction.setValue(e||"buy"),this}getArrowColor(){var e=this._line.properties();return"buy"===this.getDirection()?e.arrowBuyColor.value():e.arrowSellColor.value()}setArrowColor(e){return"buy"===this.getDirection()?this.setArrowBuyColor(e):this.setArrowSellColor(e),this}setArrowBuyColor(e){return this._line.properties().arrowBuyColor.setValue(e),this}setArrowSellColor(e){return this._line.properties().arrowSellColor.setValue(e),this}getTextColor(){return r.getColorFromProperties(this._line.properties().textColor,this._line.properties().textTransparency)}setTextColor(e){return r.setColorToProperties(e,this._line.properties().textColor,this._line.properties().textTransparency),this}getFont(){return r.getFontFromProperties(this._line.properties().fontFamily,this._line.properties().fontSize,this._line.properties().fontBold,this._line.properties().fontItalic)}setFont(e){return r.setFontToProperties(e,this._line.properties().fontFamily,this._line.properties().fontSize,this._line.properties().fontBold,this._line.properties().fontItalic),this}setTooltip(e){return null==e?e="":e+="",this._line.properties().tooltip.setValue(e),this}getTooltip(){return this._line.properties().tooltip.value()}remove(){this._line._model.removeSource(this._line),delete this._line}getPoints(){return this._line.points()}}class h extends s{constructor(e,t){super(e,t||h.createProperties()),this._adapter=new c(this),this.customization.forcePriceAxisLabel=!1,this.customization.disableErasing=!0,this.customization.showInObjectTree=!1,this.setSelectionEnabled(!1),i.e("lt-pane-views").then(i.t.bind(null,"tjxb",7)).then(({ExecutionPaneView:e})=>{this._setPaneViews([new e(this,this._model)])})}zorder(){return a}isSpeciallyZOrderedSource(){return!0}pointsCount(){return h.POINTS_COUNT}name(){return"Execution"}hasContextMenu(){return!1}state(){return null}updateAllViews(){return this._isVisible()?s.prototype.updateAllViews.call(this):null}priceAxisViews(e,t){return this._isVisible()?s.prototype.priceAxisViews.call(this,e,t):null}_isVisible(){ return this._model.properties().tradingProperties.showExecutions.value()}paneViews(){return TradingView.printing&&!e.enabled("snapshot_trading_drawings")?null:this._model.properties().tradingProperties.showExecutions.value()?s.prototype.paneViews.call(this):null}userEditEnabled(){return!1}showInObjectTree(){return!1}cloneable(){return!1}copiable(){return!1}isSynchronizable(){return!1}static createProperties(e){var t=new n("linetoolexecution",e,!1,!1);return h._configureProperties(t),t}static _configureProperties(e){s._configureProperties(e)}}h.POINTS_COUNT=1,t.ExecutionsPositionController=l,t.LineToolExecution=h}).call(this,i("Kxc7"))},"7ADh":function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolFibWedgeBase",(function(){return o}));var s=i("Eyy1"),r=i("aO4+"),n=i("Ss5c");class o extends n.LineDataSource{pointsCount(){return 3}hasEditableCoordinates(){return!1}setPoint(e,t){if(super.setPoint(e,t),!this._recursiveGuard)try{if(this._recursiveGuard=!0,2===e){const e=this.pointToScreenPoint(this._points[0])[0];let t=this.pointToScreenPoint(this._points[1])[0];const i=this.pointToScreenPoint(this._points[2])[0].subtract(e).length();let s=t.subtract(e);s.length()<=0&&(s=new r.Point(1,0)),t=e.add(s.normalized().scaled(i));const n=this.screenPointToPoint(t),o=this._pointsProperty.childs().points[1];o.childs().price.setValue(n.price),o.childs().bar.setValue(n.index)}else{const e=this.pointToScreenPoint(this._points[0])[0],t=this.pointToScreenPoint(this._points[1])[0];let i=this.pointToScreenPoint(this._points[2])[0];const s=t.subtract(e).length();let n=i.subtract(e);n.length()<=0&&(n=new r.Point(1,0)),i=e.add(n.normalized().scaled(s));const o=this.screenPointToPoint(i),a=this._pointsProperty.childs().points[2];a.childs().price.setValue(o.price),a.childs().bar.setValue(o.index)}}finally{this._recursiveGuard=!1}}addPoint(e){if(2===this._points.length){const t=this.pointToScreenPoint(this._points[0])[0],i=this.pointToScreenPoint(this._points[1])[0];let r=this.pointToScreenPoint(e)[0];const n=i.subtract(t).length(),o=r.subtract(t).normalized();r=t.add(o.scaled(n));const a=Object(s.ensureNotNull)(this.ownerSource()),l=Object(s.ensureNotNull)(a.firstValue()),c=Object(s.ensureNotNull)(this.priceScale()).coordinateToPrice(r.y,l);e={index:Math.round(this._model.timeScale().coordinateToIndex(r.x)),price:c}}return n.LineDataSource.prototype.addPoint.call(this,e)}}},"7ETO":function(e,t,i){"use strict";i.r(t);var s=i("ocLq");class r{main(e){const t=e.new_var(s.Std.open(e)),i=e.new_var(s.Std.close(e)),r=t.get(1),n=i.get(1),o=s.Std.ohlc4(e),a=s.Std.na(t.get(1))?(s.Std.open(e)+s.Std.close(e))/2:(r+n)/2;t.set(a),i.set(o);const l=s.Std.max(s.Std.high(e),s.Std.max(a,o)),c=s.Std.min(s.Std.low(e),s.Std.min(a,o)),h=s.Std.volume(e),u=e.symbol;return[u.time,a,l,c,o,h,u.updatetime,u.isBarClosed]}}function n(e){if(0===e.type.indexOf("BarSetHeikenAshi@tv-basicstudies-"))return new r;const t="unknown builder type: "+e.type;throw console.error(t),new Error(t)}i.d(t,"getChartStyleStudy",(function(){return n}))},"7Fue":function(e,t,i){"use strict" @@ -654,8 +654,8 @@ statusView(){return F?this._statusView:null}marketStatusModel(){return this._mar this._properties.renkoStyle.inputs.style.listeners().subscribe(this,this.onInputChanged),this._properties.renkoStyle.inputs.atrLength.listeners().subscribe(this,this.onInputChanged),this._properties.renkoStyle.inputs.wicks.listeners().subscribe(this,this.onInputChanged),this._properties.renkoStyle.inputs.sources.listeners().subscribe(this,this.onInputChanged),this._properties.pbStyle.inputs.lb.listeners().subscribe(this,this.onInputChanged),this._properties.kagiStyle.inputs.reversalAmount.listeners().subscribe(this,this.onInputChanged),this._properties.kagiStyle.inputs.style.listeners().subscribe(this,this.onInputChanged),this._properties.kagiStyle.inputs.atrLength.listeners().subscribe(this,this.onInputChanged),this._properties.pnfStyle.inputs.boxSize.listeners().subscribe(this,this.onInputChanged),this._properties.pnfStyle.inputs.reversalAmount.listeners().subscribe(this,this.onInputChanged),this._properties.pnfStyle.inputs.sources.listeners().subscribe(this,this.onInputChanged),this._properties.pnfStyle.inputs.style.listeners().subscribe(this,this.onInputChanged),this._properties.pnfStyle.inputs.atrLength.listeners().subscribe(this,this.onInputChanged),this._properties.pnfStyle.inputs.oneStepBackBuilding.listeners().subscribe(this,this.onInputChanged),this._properties.rangeStyle.inputs.phantomBars.listeners().subscribe(this,this.onInputChanged)}createDividendsAdjustmentProperty(){throw new Error("Not implemented")}dividendsAdjustmentProperty(){return null}setChartStyleWithIntervalIfNeeded(e,t){var i=t;void 0===t&&(i=E(e,this._properties.interval.value(),this._model.defaultResolutions())),k.isEqual(i,this._properties.interval.value())||this._properties.interval.setValue(i),this._properties.style.setValue(e)}isNeedRestart(e){return this._status!==z.STATUS_SNAPSHOT&&(void 0===e&&(e=this.properties().style.value()),!O.isRangeStyle(this._prevChartStyle)&&!O.isRangeStyle(e)&&!(this._prevChartStyle===e||!O.isRequiringRestartSeriesStyles(this._prevChartStyle)&&!O.isRequiringRestartSeriesStyles(e)))}applyPreferences(e){var t=B({},e);this.m_priceScale.setMode({autoScale:t.priceAxisProperties.autoScale,percentage:t.priceAxisProperties.percentage,log:t.priceAxisProperties.log,lockScale:t.priceAxisProperties.lockScale}),this.setChartStyleWithIntervalIfNeeded(t.style),delete t.style,delete t.interval,this._properties.mergePreferences(t),this._properties.saveDefaults(),this.createPaneView(),this.invalidateBarStylesCache()}priceSource(){var e=null;switch(this._properties.style.value()){case z.STYLE_LINE:e=this._properties.lineStyle.priceSource.value();break;case z.STYLE_AREA:e=this._properties.areaStyle.priceSource.value();break;case z.STYLE_BASELINE:e=this._properties.baselineStyle.priceSource.value()}return e}isRangeBasedStyle(){return O.isRangeBasedStyle(this.style())}onInputChanged(){this.restart()}getSymbolString(){return R(this._getSymbolObject())}_getResolvingSymbolObject(){return this._getSymbolObject()}getStyleShortName(){var e=this._properties.style.value() ;if(z.STYLE_SHORT_NAMES.hasOwnProperty(e))return z.STYLE_SHORT_NAMES[e];throw new Error("Missed short name for style "+e)}getStyleProperties(){return this._properties[this.getStyleShortName()+"Style"]}getInputsProperties(){return this.getStyleProperties().inputs||new s}getInputsInfoProperties(){return this.getStyleProperties().inputInfo||new s}getRealVisibleRange(){var e=this.model().timeScale().visibleBarsStrictRange();if(null===e)return null;var t=this.data().search(e.firstBar(),P.NearestRight),i=this.data().search(e.lastBar(),P.NearestLeft);return null===t||null===i?null:new v(t.index,i.index)}firstValue(){var e=this.firstBar();return null===e?null:this._barFunction(e)}firstBar(){var e=this.model().timeScale().visibleBarsStrictRange();if(null===e)return null;var t=e.firstBar(),i=this.data().search(t,P.NearestRight);return null!==i?i.value:null}isSpread(){return null!==this._symbolInfo&&"spread"===this._symbolInfo.type}getSymbolName(){return this._symbolInfo?this._symbolInfo.name:""}loadDataTo(e){var t=this._properties.interval.value();this._onTimeFrameApplied.fire(e),this._seriesSource.modifySeries(this._getResolvingSymbolObject(),A(t),e)}checkInterval(){if(this._symbolInfo&&(k.isIntraday(this.interval())&&!this._symbolInfo.has_intraday&&this.requestingIntradayWhenNotSupported.fire(),this._symbolInfo.hasOwnProperty("supported_resolutions"))){var e=k.normalize(this._properties.interval.value());-1===this._symbolInfo.supported_resolutions.indexOf(e)&&this.requestingResolutionWhenNotSupported.fire(this._symbolInfo.supported_resolutions[0])}}priceScale(){return this.m_priceScale}setPriceScale(e){this.m_priceScale!==e&&(this._priceScaleAboutToBeChanged.fire(),this.m_priceScale=e,this._properties.removeProperty("priceAxisProperties"),this._properties.addChild("priceAxisProperties",e.properties()),this._properties.priceAxisProperties.childChanged(),N.emit("series_event","price_scale_changed"),this._priceScaleChanged.fire(e))}setGotoDateResult(e){this._gotoDateResultCleared=!1,i.e("series-pane-views").then(i.t.bind(null,"+weX",7)).then(({GotoDateView:t})=>{this._gotoDateResultCleared||(this._gotoDateView=new t(this,e),this.m_model.updateSource(this))})}clearGotoDateResult(e){this._gotoDateView=null,this._gotoDateResultCleared=!0}syncModel(){if(!this._syncModel){var e=this.symbolInfo(),t=this.interval();if(!e||!t)return null;this._syncModel=new x(e,t)}return this._syncModel}getSourceIcon(){return{type:"loadSvg",svgId:"series."+this.properties().style.value()}}isStyleSupported(e){return!0}isIntervalSupported(e){return!0}isStyleSupportedForReplay(e){return O.isTimeBasedStyle(e)}isInReplay(){return null!==this._replaySubscriber}onTimeFrameApplied(){return this._onTimeFrameApplied}onInReplayStateChanged(){throw new Error("Not implemented")}replayExitedDueUnsupportedInterval(){throw new Error("Not implemented")}replayExitedDueUnavailableForUserInterval(){throw new Error("Not implemented")}switchToReplay(e,t){throw new Error("Not implemented")}switchToRealtime(){throw new Error("Not implemented")}_removeReplaySubscriber(){ throw new Error("Not implemented")}_onBeforeModifySeries(e,t){0}_getTelemetryAdditionalData(e,t){t=void 0===t||t;var i={symbol:this.actualSymbol()};return t&&(i.resolution=this.interval()),void 0!==e&&(i.reason=e),i}_sendTelemetryReport(e,t,i){void 0===i&&(i=this._getTelemetryAdditionalData());var s=Object.assign(t,{additional:i});(void 0).sendChartReport(e,s)}_sendTelemetryCounter(e,t){this._sendTelemetryReport(e,{count:1},t)}destroy(){this._replayExitedDueUnsupportedInterval.destroy(),this._replayExitedDueUnavailableForUserInterval.destroy(),this._quotesProvider.quotesUpdate().unsubscribeAll(this),this._quotesProvider.destroy(),this.clearGotoDateResult(),this._legendView.destroy(),this._marketStatusModel.destroy(),null!==this._dataUpdatedModeModel&&this._dataUpdatedModeModel.destroy(),this._dataProblemModel.destroy(),this._paneView&&this._paneView.destroy&&this._paneView.destroy(),this._onTimeFrameApplied.destroy(),this._seriesSource.destroy(),super.destroy()}dataEvents(){return this._seriesSource.dataEvents()}moveData(e){return this._seriesSource.moveData(e)}}Object.assign(z,M),TradingView.Series=z,t.Series=z}).call(this,i("aIyQ"),i("tc+8"),i("Qb4w").PriceRange)},qXYw:function(e,t,i){"use strict";i.r(t);var s=i("n5al"),r=i("ivNn"),n=i("YFKU"),o=i("qFKp"),a=i("Tmoa"),l=i("Ialn"),c=i("GH0z"),h=i("6I19"),u=i("k9/m"),d=i("CW80"),p=i("mMWL"),_=i("7qT/"),m=i("38az"),f=i("xCUR");const g=o.CheckMobile.any(),b=g&&!0,v=new c.PercentageFormatter,S=Object(n.t)("n/a"),y=`${S} (${S}%)`;i.d(t,"OverlayLegendValuesProvider",(function(){return w}));class w extends class{constructor(e,t){this._study=e,this._model=t,this._emptyValues=[{title:Object(n.t)("Open"),visible:!1,value:"",index:0,id:""},{title:Object(n.t)("High"),visible:!1,value:"",index:1,id:""},{title:Object(n.t)("Low"),visible:!1,value:"",index:2,id:""},{title:Object(n.t)("Close"),visible:!1,value:"",index:3,id:""},{title:"",visible:!1,value:"",index:4,id:""},{title:"",visible:!1,value:"",index:5,id:""},{title:Object(n.t)("Change"),visible:!1,value:"",index:6,id:""}]}getItems(){return this._emptyValues}getValues(e){const t=this._emptyValues.map(e=>({...e}));if(this._model.timeScale().isEmpty())return t;if(0===this._study.data().size())return t;const i=this._showLastPriceAndChangeOnly();if(Object(r.isNumber)(e)||(i?e=this._study.data().lastIndex():(e=this._model.crossHairSource().appliedIndex(),Object(r.isNumber)(e)||(e=this._study.data().lastIndex()))),null===e||!Object(r.isNumber)(e))return t;const s=this._study.data().search(e,u.PlotRowSearchMode.NearestLeft,1),n=Object(h.c)(this._model.paneForSource(this._study));if(null===s||null===n)return t;const o=s.index,c=s.value,d=c[1],p=c[2],_=c[3],g=c[4];if(null==d||null==p||null==_||null==g)return t;t[0].value=S,t[1].value=S,t[2].value=S,t[3].value=S,t[6].value=y;for(const e of t)e.visible=!i;const w=t[4];w.visible=!1;const{values:P}=this._changesData(g,d,o,i),C=Object(f.a)(this._study);if(Object(f.b)(this._study))t[6].value="";else if(void 0!==P){const e=this._study.formatter() -;t[6].value=Object(l.forceLTRStr)(`${e.format(P.change,!0)} (${v.format(P.percentChange,!0)})`)}i?(t[5].value=C(g),t[5].visible=!0,t[6].visible=!0):(t[0].value=C(d),t[1].value=C(p),t[2].value=C(_),t[3].value=C(g),w.value=C(this._study.barFunction()(c)),t[5].visible=!1);let x=null;if(i&&!b)x=void 0===P||P.change>=0?m.SeriesBarColorer.upColor(this._study.properties()):m.SeriesBarColorer.downColor(this._study.properties());else{const e=this._study.barColorer().barStyle(o,!1),t=null!=e.barBorderColor?e.barBorderColor:e.barColor;x=Object(h.b)(n,t)}x=Object(a.resetTransparency)(Object(h.b)(n,x));for(const e of t)e.color=x;return t}_showLastPriceAndChangeOnly(){return g&&(null===this._model.crossHairSource().pane||Object(d.isLineToolName)(p.tool.value())||null!==this._model.lineBeingEdited())}_changesData(e,t,i,s){if(s&&!b){const e=this._study.quotes();if(null!==e)return{values:{change:e.change,percentChange:e.change_percent},priceDirection:{basedOnCurrentBar:e.change>=0?0:1,basedOnPrevClose:e.change>=0?0:1}}}else{const s=this._study.data().search(i-1,u.PlotRowSearchMode.NearestLeft,1),r=s&&s.value[4]||null;if(null!==r)return{values:{change:e-r,percentChange:Object(_.a)(r,e)},priceDirection:{basedOnCurrentBar:e>=t?0:1,basedOnPrevClose:e>=r?0:1}}}return{priceDirection:{basedOnCurrentBar:e>=t?0:1,basedOnPrevClose:e>=t?0:1}}}}{constructor(e,t){super(e,t),this._showBarChange=t.properties().paneProperties.legendProperties.showBarChange,this._showSeriesOHLC=t.properties().paneProperties.legendProperties.showSeriesOHLC,this._seriesStyle=e.properties().childs().style}getValues(e){const t=super.getValues(e);if(!this._showLastPriceAndChangeOnly()){const e=Object(s.isPriceSourceStyle)(this._seriesStyle.value()),i=this._showSeriesOHLC.value(),r=i&&!e,n=i&&e;t[0].visible=r,t[1].visible=r,t[2].visible=r,t[3].visible=r,t[6].visible=this._showBarChange.value(),t[4].visible=n}return t}}},qcGP:function(e,t,i){"use strict";var s=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,n=i("mMWL");class o extends s{constructor(e,t){super(e,t||o.createProperties()),this._priceAxisViews.push(this.createPriceAxisView(3)),i.e("lt-pane-views").then(i.t.bind(null,"9FRF",7)).then(({ParallelChannelPaneView:e})=>{this._setPaneViews([new e(this,this._model)])})}calculatePriceDiff(){var e=this.points();if(3===e.length){var t=e[0],i=e[1],s=e[2],r=this._findPriceOffset(t,i,s);null!==r&&isFinite(r)&&(this._priceOffset=r)}}_findPriceOffset(e,t,i){var s=this.priceScale();if(null===s||e.index===t.index)return null;if(s.isLog()){var r=this._model.timeScale();if(r.isEmpty())return null;var n=this.ownerSource().firstValue(),o=r.indexToCoordinate(e.index),a=r.indexToCoordinate(t.index),l=s.priceToCoordinate(e.price,n),c=s.priceToCoordinate(t.price,n),h=l+(m=(c-l)/(a-o))*(r.indexToCoordinate(i.index)-o),u=s.priceToCoordinate(i.price,n)-h,d=(n=this.ownerSource().firstValue(),.5*(l+c)),p=s.coordinateToPrice(d,n),_=d+u;return s.coordinateToPrice(_,n)-p}var m=(t.price-e.price)/(t.index-e.index),f=e.price+m*(i.index-e.index);return i.price-f}setLastPoint(e,t){ -t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[0]),super.setLastPoint(e),this.calculatePriceDiff()}restorePoints(e,t,i){super.restorePoints(e,t,i),e&&e.length>=3&&(this._priceOffset=e[2].price-e[0].price)}setPoint(e,t,i){if(i&&i.shift())switch(e){case 0:case 1:this._snapPoint45Degree(t,this._points[1-e]);break;case 2:case 3:this._snapPoint45Degree(t,{index:this._points[3-e].index,price:this._points[3-e].price+this._priceOffset})}var s=!1;switch(e){case 0:case 1:super.setPoint(e,t,i);break;case 2:case 3:this._points[e-2].index=t.index,this._points[e-2].price=t.price-this._priceOffset;break;case 4:this._points[2]=t,this.calculatePriceDiff(),s=!0;break;case 5:var r=this._findPriceOffset(this._points[0],this._points[1],t);null!==r&&isFinite(r)&&(this._points[0].price+=r,this._points[1].price+=r,this._priceOffset-=r,s=!0)}if(e%2==0&&this._correctThirdPoint(),s&&this.linkKey().value()){for(var o=[],a=0;a=0?m.SeriesBarColorer.upColor(this._study.properties()):m.SeriesBarColorer.downColor(this._study.properties());else{const e=this._study.barColorer().barStyle(o,!1),t=null!=e.barBorderColor?e.barBorderColor:e.barColor;x=Object(h.b)(n,t)}x=Object(a.resetTransparency)(Object(h.b)(n,x));for(const e of t)e.color=x;return t}_showLastPriceAndChangeOnly(){return g&&(null===this._model.crossHairSource().pane||Object(d.isLineToolName)(p.tool.value())||null!==this._model.lineBeingEdited())}_changesData(e,t,i,s){var r;if(s&&!b){const e=this._study.quotes();if(null!==e)return{values:{change:e.change,percentChange:e.change_percent},priceDirection:{basedOnCurrentBar:e.change>=0?0:1,basedOnPrevClose:e.change>=0?0:1}}}else{const s=this._study.data().search(i-1,u.PlotRowSearchMode.NearestLeft,1),n=null!==(r=null==s?void 0:s.value[4])&&void 0!==r?r:null;if(null!==n)return{values:{change:e-n,percentChange:Object(_.a)(n,e)},priceDirection:{basedOnCurrentBar:e>=t?0:1,basedOnPrevClose:e>=n?0:1}}}return{priceDirection:{basedOnCurrentBar:e>=t?0:1,basedOnPrevClose:e>=t?0:1}}}}{constructor(e,t){super(e,t),this._showBarChange=t.properties().paneProperties.legendProperties.showBarChange,this._showSeriesOHLC=t.properties().paneProperties.legendProperties.showSeriesOHLC,this._seriesStyle=e.properties().childs().style}getValues(e){const t=super.getValues(e);if(!this._showLastPriceAndChangeOnly()){const e=Object(s.isPriceSourceStyle)(this._seriesStyle.value()),i=this._showSeriesOHLC.value(),r=i&&!e,n=i&&e;t[0].visible=r,t[1].visible=r,t[2].visible=r,t[3].visible=r,t[6].visible=this._showBarChange.value(),t[4].visible=n}return t}}},qcGP:function(e,t,i){"use strict";var s=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,n=i("mMWL");class o extends s{constructor(e,t){super(e,t||o.createProperties()),this._priceAxisViews.push(this.createPriceAxisView(3)),i.e("lt-pane-views").then(i.t.bind(null,"9FRF",7)).then(({ParallelChannelPaneView:e})=>{this._setPaneViews([new e(this,this._model)])})}calculatePriceDiff(){var e=this.points();if(3===e.length){var t=e[0],i=e[1],s=e[2],r=this._findPriceOffset(t,i,s);null!==r&&isFinite(r)&&(this._priceOffset=r)}}_findPriceOffset(e,t,i){var s=this.priceScale();if(null===s||e.index===t.index)return null;if(s.isLog()){var r=this._model.timeScale();if(r.isEmpty())return null;var n=this.ownerSource().firstValue(),o=r.indexToCoordinate(e.index),a=r.indexToCoordinate(t.index),l=s.priceToCoordinate(e.price,n),c=s.priceToCoordinate(t.price,n),h=l+(m=(c-l)/(a-o))*(r.indexToCoordinate(i.index)-o),u=s.priceToCoordinate(i.price,n)-h,d=(n=this.ownerSource().firstValue(),.5*(l+c)),p=s.coordinateToPrice(d,n),_=d+u;return s.coordinateToPrice(_,n)-p}var m=(t.price-e.price)/(t.index-e.index),f=e.price+m*(i.index-e.index) +;return i.price-f}setLastPoint(e,t){t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[0]),super.setLastPoint(e),this.calculatePriceDiff()}restorePoints(e,t,i){super.restorePoints(e,t,i),e&&e.length>=3&&(this._priceOffset=e[2].price-e[0].price)}setPoint(e,t,i){if(i&&i.shift())switch(e){case 0:case 1:this._snapPoint45Degree(t,this._points[1-e]);break;case 2:case 3:this._snapPoint45Degree(t,{index:this._points[3-e].index,price:this._points[3-e].price+this._priceOffset})}var s=!1;switch(e){case 0:case 1:super.setPoint(e,t,i);break;case 2:case 3:this._points[e-2].index=t.index,this._points[e-2].price=t.price-this._priceOffset;break;case 4:this._points[2]=t,this.calculatePriceDiff(),s=!0;break;case 5:var r=this._findPriceOffset(this._points[0],this._points[1],t);null!==r&&isFinite(r)&&(this._points[0].price+=r,this._points[1].price+=r,this._priceOffset-=r,s=!0)}if(e%2==0&&this._correctThirdPoint(),s&&this.linkKey().value()){for(var o=[],a=0;a'},qgcf:function(e,t,i){"use strict";i.r(t),i.d(t,"calculateLabelPosition",(function(){return p})),i.d(t,"wordWrap",(function(){return f})),i.d(t,"TextRenderer",(function(){return M}));var s=i("aO4+"),r=i("Eyy1"),n=i("f6yo"),o=i("Ialn"),a=i("VdBB"),l=i("gAom"),c=i("jFln"),h=i("ogJP"),u=i("ikwP"),d=i("8Uy/");function p(e,t,i,r,n){const o=.5*(t.x+i.x);let a=i.y;return t.y>i.y?(a-=e.height/2+r.y,a=Math.max(e.height/2,a)):(a+=e.height/2+r.y,a=Math.min(n-e.height/2,a)),new s.Point(o,a)}let _;function m(){const e=document.createElement("canvas");e.width=0,e.height=0,_=Object(r.ensureNotNull)(e.getContext("2d"))}function f(e,t,i){_||m(),i=Object(h.isString)(i)?parseInt(i):i,e+="";const s=!Object(h.isNumber)(i)||!isFinite(i)||i<=0?e.split(/[^\S' '\r\n]*(?:\r\n|\r|\n|$)/):e.split(/[^\S\r\n]*(?:\r\n|\r|\n|$)/);if(s[s.length-1]||s.pop(),!Object(h.isNumber)(i)||!isFinite(i)||i<=0)return s;_.font=t;const r=[];for(let e=0;e0&&_.measureText(o.slice(0,3*--e-1).join("")).width>i;);if(e>0)r.push(o.slice(0,3*e-1).join("")),o.splice(0,3*e);else{const e=o[0]+(o[1]||"");if(a=1===a?1:~~(i/_.measureText(e).width*e.length),_.measureText(e.substr(0,a)).width<=i)for(;_.measureText(e.substr(0,a+1)).width<=i;)a++;else for(;a>1&&_.measureText(e.substr(0,--a)).width>i;);a<1&&(a=1),r.push(e.substr(0,a)),o[0]=e.substr(a),o[1]=""}if(_.measureText(o.join("")).width<=i){r.push(o.join(""));break}}}return r}function g(e,t,i){if(0===i)return e.clone();const r=(e.x-t.x)*Math.cos(i)-(e.y-t.y)*Math.sin(i)+t.x,n=(e.x-t.x)*Math.sin(i)+(e.y-t.y)*Math.cos(i)+t.y;return new s.Point(r,n)}function b(e,t){return t+2*P(e)+2*y(e)}function v(e,t){return x(e)*t+C(e)*(t-1)+2*w(e)+2*S(e)}function S(e){return void 0!==e.boxPaddingVert?e.boxPaddingVert*I(e):void 0!==e.boxPadding?e.boxPadding*I(e):x(e)/3}function y(e){ return void 0!==e.boxPaddingHorz?e.boxPaddingHorz*I(e):void 0!==e.boxPadding?e.boxPadding*I(e):x(e)/3}function w(e){return(e.backgroundVertInflate||0)*I(e)}function P(e){return(e.backgroundHorzInflate||0)*I(e)}function C(e){return(e.padding||0)*I(e)}function x(e){return Math.ceil(T(e)*I(e))}function T(e){return e.fontsize||e.fontSize||30}function I(e){const t=Math.min(1,Math.max(.2,Math.min(e.scaleX||1,e.scaleY||1)));if(1===t)return t;const i=T(e);return Math.ceil(t*i)/i}class M{constructor(e,t){this._data=null,this._internalData=null,this._boxSize=null,this._linesInfo=null,this._fontInfo=null,this._hittest=t||new a.HitTestResult(a.HitTestResult.MOVEPOINT,{areaName:a.AreaName.Text}),void 0!==e&&this.setData(e)}setData(e){e.horzTextAlign||(e.horzTextAlign=e.horzAlign),function(e,t){if(null===e||null===t)return null===e==(null===t);if(void 0===e.points!=(void 0===t.points))return!1;if(void 0!==e.points&&void 0!==t.points){if(e.points.length!==t.points.length)return!1;for(let r=0;re.fillText(t,_,f)),f+=n+g;e.restore()}_getLinesMaxWidth(e){if(_||m(),_.textBaseline="alphabetic",_.font=this.fontStyle(),null!==this._data&&this._data.wordWrapWidth&&!this._data.forceCalculateMaxLineWidth)return this._data.wordWrapWidth*I(this._data);let t=0;for(const i of e)t=Math.max(t,_.measureText(i).width);return t}_getInternalData(){if(null!==this._internalData)return this._internalData;const e=Object(r.ensureNotNull)(this._data),t=this._getBoxSize(),i=t.boxWidth,s=t.boxHeight,n=Object(r.ensureDefined)(e.points)[0];let a=n.y;switch(e.vertAlign){case"bottom":a-=s+e.offsetY;break;case"middle":a-=s/2;break;case"top":a+=e.offsetY}let l=n.x;const c=y(e),h=S(e),u=P(e)+c;let d;const p=a+(w(e)+h)+x(e)/2;let _;switch(e.horzAlign){case"left":l+=e.offsetX;break;case"center":l-=i/2;break;case"right":l-=i+e.offsetX}switch(Object(r.ensureDefined)(e.horzTextAlign)){case"left":_="start",d=l+u,Object(o.isRtl)()&&(e.forceTextAlign?_="left":(d=l+i-u,_="right"));break;case"center":_="center",d=l+i/2;break;case"right":_="end",d=l+i-u,Object(o.isRtl)()&&e.forceTextAlign&&(_="right")}return this._internalData={boxLeft:l,boxTop:a,boxWidth:i,boxHeight:s,textStart:d-l, diff --git a/charting_library/bundles/object-tree-dialog.5b98d078925b3addfb0a.js b/charting_library/bundles/object-tree-dialog.5b98d078925b3addfb0a.js new file mode 100644 index 00000000..1fe54534 --- /dev/null +++ b/charting_library/bundles/object-tree-dialog.5b98d078925b3addfb0a.js @@ -0,0 +1,58 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([["object-tree-dialog"],{"+5L9":function(e,t){e.exports=''},"+KIV":function(e,t){e.exports=''},"02pg":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n("q1tI"),o=n("TSYQ"),i=n("XiJV");function s(e){return r.createElement("div",{className:o(i.separator,e.className)})}},"20cQ":function(e,t){e.exports=''},"2FdS":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("hFf1");t.TaskFactory=class{create(e){const t=this.freeTasks,n=t.length?t.pop():new r.RawTask(this.onError,e=>t[t.length]=e);return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}}},"4/GM":function(e,t,n){e.exports={dialog:"dialog-3q1-PXu-",button:"button-3q1-PXu-"}},"4c+U":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},"4ceR":function(e,t,n){e.exports={dropTargetInside:"dropTargetInside-3UxYcxls",dropTarget:"dropTarget-3UxYcxls",before:"before-3UxYcxls",after:"after-3UxYcxls"}},ASyk:function(e,t,n){e.exports={"tablet-normal-breakpoint":"screen and (max-width: 768px)","small-height-breakpoint":"screen and (max-height: 360px)","tablet-small-breakpoint":"screen and (max-width: 428px)"}},"B6/a":function(e,t){e.exports=''},DGxW:function(e,t,n){e.exports={separator:"separator-3U2Wf-wc",tree:"tree-3U2Wf-wc",overlayScrollWrap:"overlayScrollWrap-3U2Wf-wc",listContainer:"listContainer-3U2Wf-wc"}},EqDG:function(e,t,n){"use strict";var r=n("aKzv"),o="dnd-core/INIT_COORDS",i="dnd-core/BEGIN_DRAG",s="dnd-core/PUBLISH_DRAG_SOURCE",a="dnd-core/HOVER",c="dnd-core/DROP",u="dnd-core/END_DRAG";function l(e,t){return{type:o,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){ +return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,t,n){return t.split(".").reduce((function(e,t){return e&&e[t]?e[t]:n||null}),e)}function f(e,t){return e.filter((function(e){return e!==t}))}function p(e){return"object"===d(e)}function g(e,t){var n=new Map,r=function(e){n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);var o=[];return n.forEach((function(e,t){1===e&&o.push(t)})),o}var v={type:o,payload:{clientOffset:null,sourceClientOffset:null}};function b(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{publishSource:!0},r=n.publishSource,o=void 0===r||r,s=n.clientOffset,a=n.getSourceClientOffset,c=e.getMonitor(),u=e.getRegistry();e.dispatch(l(s)),m(t,c,u);var d=S(t,c);if(null!==d){var h=null;if(s){if(!a)throw new Error("getSourceClientOffset must be defined");y(a),h=a(d)}e.dispatch(l(s,h));var f=u.getSource(d),p=f.beginDrag(c,d);if(null!=p){O(p),u.pinSource(d);var g=u.getSourceType(d);return{type:i,payload:{itemType:g,item:p,sourceId:d,clientOffset:s||null,sourceClientOffset:h||null,isSourcePublic:!!o}}}}else e.dispatch(v)}}function m(e,t,n){Object(r.a)(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach((function(e){Object(r.a)(n.getSource(e),"Expected sourceIds to be registered.")}))}function y(e){Object(r.a)("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}function O(e){Object(r.a)(p(e),"Item must be an object.")}function S(e,t){for(var n=null,r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}function w(e){return function(){if(e.getMonitor().isDragging())return{type:s}}}function _(e,t){return null===t?null===e:Array.isArray(e)?e.some((function(e){return e===t})):e===t}function C(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.clientOffset;T(t);var o=t.slice(0),i=e.getMonitor(),s=e.getRegistry();E(o,i,s);var c=i.getItemType();return j(o,s,c),D(o,i,s),{type:a,payload:{targetIds:o,clientOffset:r||null}}}}function T(e){Object(r.a)(Array.isArray(e),"Expected targetIds to be an array.")}function E(e,t,n){Object(r.a)(t.isDragging(),"Cannot call hover while not dragging."),Object(r.a)(!t.didDrop(),"Cannot call hover after drop.");for(var o=0;o=0;r--){var o=e[r];_(t.getTargetType(o),n)||e.splice(r,1)}}function D(e,t,n){e.forEach((function(e){n.getTarget(e).hover(t,e)}))}function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},n=e.getMonitor(),r=e.getRegistry();N(n);var o=A(n);o.forEach((function(o,i){var s=P(o,i,r,n),a={type:c,payload:{dropResult:k(k({},t),s)}};e.dispatch(a)}))}}function N(e){Object(r.a)(e.isDragging(),"Cannot call drop while not dragging."),Object(r.a)(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function P(e,t,n,o){var i=n.getTarget(e),s=i?i.drop(o,e):void 0;return function(e){Object(r.a)(void 0===e||p(e),"Drop result must either be an object or undefined.")}(s),void 0===s&&(s=0===t?{}:o.getDropResult()),s}function A(e){var t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function L(e){return function(){var t=e.getMonitor(),n=e.getRegistry();!function(e){Object(r.a)(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);var o=t.getSourceId();null!=o&&(n.getSource(o,!0).endDrag(t,o),n.unpinSource());return{type:u}}}function R(e,t){for(var n=0;n0;r.backend&&(e&&!r.isSetUp?(r.backend.setup(),r.isSetUp=!0):!e&&r.isSetUp&&(r.backend.teardown(),r.isSetUp=!1))},this.store=t,this.monitor=n,t.subscribe(this.handleRefCountChange)}var t,n,r;return t=e,(n=[{key:"receiveBackend",value:function(e){this.backend=e}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var e=this,t=this.store.dispatch,n=function(e){return{beginDrag:b(e),publishDragSource:w(e),hover:C(e),drop:x(e),endDrag:L(e)}}(this);return Object.keys(n).reduce((function(r,o){var i,s=n[o];return r[o]=(i=s,function(){for(var n=arguments.length,r=new Array(n),o=0;o2&&void 0!==arguments[2]?arguments[2]:H;if(e.length!==t.length)return!1;for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:W,t=arguments.length>1?arguments[1]:void 0,n=t.payload;switch(t.type){case o:case i:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case a:return z(e.clientOffset,n.clientOffset)?e:V(V({},e),{},{clientOffset:n.clientOffset});case u:case c:return W;default:return e}}var Y="dnd-core/ADD_SOURCE",Z="dnd-core/ADD_TARGET",J="dnd-core/REMOVE_SOURCE",X="dnd-core/REMOVE_TARGET";function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:te,t=arguments.length>1?arguments[1]:void 0,n=t.payload;switch(t.type){case i:return $($({},e),{},{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case s:return $($({},e),{},{isSourcePublic:!0});case a:return $($({},e),{},{targetIds:n.targetIds});case X:return-1===e.targetIds.indexOf(n.targetId)?e:$($({},e),{},{targetIds:f(e.targetIds,n.targetId)});case c:return $($({},e),{},{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case u:return $($({},e),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function re(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Y:case Z:return e+1;case J:case X:return e-1;default:return e}}var oe=[],ie=[];function se(e,t){return e!==oe&&(e===ie||void 0===t||(n=e,t.filter((function(e){return n.indexOf(e)>-1}))).length>0);var n}function ae(){ +var e=arguments.length>1?arguments[1]:void 0;switch(e.type){case a:break;case Y:case Z:case X:case J:return oe;case i:case s:case u:case c:default:return ie}var t=e.payload,n=t.targetIds,r=void 0===n?[]:n,o=t.prevTargetIds,l=void 0===o?[]:o,d=g(r,l),h=d.length>0||!U(r,l);if(!h)return oe;var f=l[l.length-1],p=r[r.length-1];return f!==p&&(f&&d.push(f),p&&d.push(p)),d}function ce(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e+1}function ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function le(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:ae(e.dirtyHandlerIds,{type:t.type,payload:le(le({},t.payload),{},{prevTargetIds:h(e,"dragOperation.targetIds",[])})}),dragOffset:q(e.dragOffset,t),refCount:re(e.refCount,t),dragOperation:ne(e.dragOperation,t),stateId:ce(e.stateId)}}function fe(e,t){return{x:e.x-t.x,y:e.y-t.y}}function pe(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{handlerIds:void 0},o=n.handlerIds;Object(r.a)("function"==typeof e,"listener must be a function."),Object(r.a)(void 0===o||Array.isArray(o),"handlerIds, when specified, must be an array of strings.");var i=this.store.getState().stateId,s=function(){var n=t.store.getState(),r=n.stateId;try{r===i||r===i+1&&!se(n.dirtyHandlerIds,o)||e()}finally{i=r}};return this.store.subscribe(s)}},{key:"subscribeToOffsetChange",value:function(e){var t=this;Object(r.a)("function"==typeof e,"listener must be a function.");var n=this.store.getState().dragOffset;return this.store.subscribe((function(){var r=t.store.getState().dragOffset;r!==n&&(n=r,e())}))}},{key:"canDragSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e);return Object(r.a)(t,"Expected to find a valid source. sourceId=".concat(e)),!this.isDragging()&&t.canDrag(this,e)}},{key:"canDropOnTarget",value:function(e){if(!e)return!1;var t=this.registry.getTarget(e) +;return Object(r.a)(t,"Expected to find a valid target. targetId=".concat(e)),!(!this.isDragging()||this.didDrop())&&_(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}},{key:"isDragging",value:function(){return Boolean(this.getItemType())}},{key:"isDraggingSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e,!0);return Object(r.a)(t,"Expected to find a valid source. sourceId=".concat(e)),!(!this.isDragging()||!this.isSourcePublic())&&this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}},{key:"isOverTarget",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shallow:!1};if(!e)return!1;var n=t.shallow;if(!this.isDragging())return!1;var r=this.registry.getTargetType(e),o=this.getItemType();if(o&&!_(r,o))return!1;var i=this.getTargetIds();if(!i.length)return!1;var s=i.indexOf(e);return n?s===i.length-1:s>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return e=this.store.getState().dragOffset,r=e.clientOffset,o=e.initialClientOffset,i=e.initialSourceClientOffset,r&&o&&i?fe((n=i,{x:(t=r).x+n.x,y:t.y+n.y}),o):null;var e,t,n,r,o,i}},{key:"getDifferenceFromInitialOffset",value:function(){return e=this.store.getState().dragOffset,t=e.clientOffset,n=e.initialClientOffset,t&&n?fe(t,n):null;var e,t,n}}])&&pe(t.prototype,n),o&&pe(t,o),e}(),be=0;function me(e){return(me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ye(e,t){t&&Array.isArray(e)?e.forEach((function(e){return ye(e,!1)})):Object(r.a)("string"==typeof e||"symbol"===me(e),t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(ge||(ge={}));var Oe=n("LuQ6");function Se(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]&&arguments[1];Object(r.a)(this.isSourceId(e),"Expected a valid source ID.");var n=t&&e===this.pinnedSourceId,o=n?this.pinnedSource:this.dragSources.get(e);return o}},{key:"getTarget",value:function(e){return Object(r.a)(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}},{key:"getSourceType",value:function(e){ +return Object(r.a)(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}},{key:"getTargetType",value:function(e){return Object(r.a)(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}},{key:"isSourceId",value:function(e){return Te(e)===ge.SOURCE}},{key:"isTargetId",value:function(e){return Te(e)===ge.TARGET}},{key:"removeSource",value:function(e){var t=this;Object(r.a)(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:J,payload:{sourceId:e}}}(e)),Object(Oe.asap)((function(){t.dragSources.delete(e),t.types.delete(e)}))}},{key:"removeTarget",value:function(e){Object(r.a)(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:X,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}},{key:"pinSource",value:function(e){var t=this.getSource(e);Object(r.a)(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}},{key:"unpinSource",value:function(){Object(r.a)(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(e,t,n){var r=Ce(e);return this.types.set(r,t),e===ge.SOURCE?this.dragSources.set(r,n):e===ge.TARGET&&this.dropTargets.set(r,n),r}}])&&Se(t.prototype,n),o&&Se(t,o),e}();function De(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=Ie(r),i=new ve(o,new je(o)),s=new B(o,i),a=e(s,t,n);return s.receiveBackend(a),s}function Ie(e){var t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return Object(F.e)(he,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}n.d(t,"a",(function(){return De}))},EvtC:function(e,t,n){e.exports={button:"button-2YcRd2gv"}},FadI:function(e,t,n){"use strict";function r(e){if(!s(e))throw e}function o(e){return(null==e?void 0:e.aborted)?Promise.reject(i()):new Promise((t,n)=>{null==e||e.addEventListener("abort",()=>n(i()),{once:!0})})}function i(){return new DOMException("Aborted","AbortError")}function s(e){return e instanceof Error&&"AbortError"===e.name}function a(e,t){return Promise.race([o(e),t])}async function c(e,t){let n;try{await a(e,new Promise(e=>{n=setTimeout(e,t)}))}finally{clearTimeout(n)}}n.d(t,"c",(function(){return r})),n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return c}))},GjMU:function(e,t){e.exports=''},ItnF:function(e,t,n){e.exports={ +dialog:"dialog-2cMrvu9r",wrapper:"wrapper-2cMrvu9r",separator:"separator-2cMrvu9r"}},JEhF:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return h}));var r=n("nKUr"),o=n("q1tI"),i=n("EqDG"),s=n("p/5y");function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=0,d=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__"),h=Object(o.memo)((function(e){var t=e.children,n=a(function(e){if("manager"in e){return[{dragDropManager:e.manager},!1]}var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f(),n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=t;o[d]||(o[d]={dragDropManager:Object(i.a)(e,t,n,r)});return o[d]}(e.backend,e.context,e.options,e.debugMode),n=!e.context;return[t,n]}(u(e,["children"])),2),c=n[0],h=n[1];return Object(o.useEffect)((function(){if(h){var e=f();return++l,function(){0==--l&&(e[d]=null)}}}),[]),Object(r.jsx)(s.a.Provider,Object.assign({value:c},{children:t}),void 0)}));function f(){return void 0!==e?e:window}}).call(this,n("yLpj"))},LuQ6:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={},o=c(n("eFQ1"));Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var i=c(n("4c+U"));Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var s=c(n("dYZt"));Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){ +return s[e]}}))}));var a=c(n("2FdS"));function c(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}))},NhaM:function(e,t){e.exports=''},"U+QY":function(e,t){e.exports=''},Vbka:function(e,t){e.exports=''},WcWV:function(e,t,n){e.exports={button:"button-2zRC9WmY",disabled:"disabled-2zRC9WmY"}},XiJV:function(e,t,n){e.exports={separator:"separator-3No0pWrk"}},Z3xJ:function(e,t){e.exports=''}, +aKzv:function(e,t,n){"use strict";function r(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;oObject(c.t)("{drawingsCount} drawing",{plural:"{drawingsCount} drawings",count:e}).format({drawingsCount:e.toString()});Object(u.getLogger)("Chart.ManageDrawings");class m extends r.PureComponent{constructor(e){super(e),this._totalCount=0,this._model=null,this._symbolDrawingsMap=null,this._storageContentLoadingPromise=null,this._onItemClick=e=>{""!==e&&(this.props.chartWidget.setSymbol(e),null!==this._model&&this.setState({currentSymbol:e}),this.props.onClose&&this.props.onClose())},this._onRemove=async e=>{if(this._model&&this._symbolDrawingsMap){const t=this._symbolDrawingsMap.get(e);if(t){const n=Array.from(t).map(e=>Object(o.ensureNotNull)(this._model).model().dataSourceForId(e)).filter(h.notNull);if(n.length>0){const t=Object(c.t)("Remove all line tools for")+" "+e;this._model.removeSources(n,!1,t)}this._updateItems()}}},this._updateItems=async()=>{if(null!==this._model){const e=await this._getItems(this._model.model().dataSources());this.setState({items:e})}},this._updateTheme=()=>{const e=a.watchedTheme.value();this.setState({theme:e})},this.state={currentSymbol:null,items:null,theme:a.watchedTheme.value()}}componentDidMount(){this.props.chartWidget.withModel(this,async()=>{this._model=this.props.chartWidget.model(),this._model.model().dataSourceCollectionChanged().subscribe(this,this._updateItems);const e=await this._getItems(this._model.model().dataSources());this.setState({currentSymbol:this._model.mainSeries().symbol(),items:e},()=>{var e,t;return null===(t=(e=this.props).onInitialized)||void 0===t?void 0:t.call(e)})}),a.watchedTheme.subscribe(this._updateTheme)}componentWillUnmount(){a.watchedTheme.unsubscribe(this._updateTheme),null!==this._model&&this._model.model().dataSourceCollectionChanged().unsubscribe(this,this._updateItems)}render(){const{isMobile:e}=this.props,{currentSymbol:t,items:n}=this.state,o=this._symbolDrawingsMap?this._symbolDrawingsMap.size:0,i=`${s=o,Object(c.t)("{symbolsCount} symbol",{plural:"{symbolsCount} symbols",context:"symbols_and_drawings_count",count:s}).format({symbolsCount:s.toString()})} ${(e=>Object(c.t)("with {drawingsCount} drawing",{plural:"with {drawingsCount} drawings",context:"symbols_and_drawings_count",count:e}).format({drawingsCount:e.toString()}))(this._totalCount)}`;var s;return r.createElement(r.Fragment,null,r.createElement("div",{className:v.title +},i),null===n||0===n.length?this._renderEmptyContent():n.map(n=>r.createElement(d.a,{key:n.symbol,title:n.symbol,subtitle:b(n.drawingsCount),removeBtnLabel:Object(c.t)("Remove all drawings for this symbol"),isActive:n.symbol===t,isMobile:e,onClick:this._onItemClick.bind(this,n.symbol),onClickRemove:this._onRemove.bind(this,n.symbol),showFavorite:!1})))}_renderEmptyContent(){const{theme:e}=this.state,t=e===s.a.Dark?g:p;return null===this._symbolDrawingsMap?r.createElement(f.a,null):r.createElement("div",{className:v.empty},r.createElement(i.a,{className:v.image,icon:t}),r.createElement("span",null,Object(c.t)("No drawings yet")))}async _getStorageContent(){return new Map}async _getItems(e){const t=[],n=this._getSymbolDrawingsMap(e);return(await this._getStorageContent()).forEach((e,t)=>{const r=n.get(t)||new Set;e.forEach(e=>r.add(e)),n.set(t,r)}),this._symbolDrawingsMap=n,this._totalCount=0,this._symbolDrawingsMap.forEach((e,n)=>{t.push({symbol:n,drawingsCount:e.size}),this._totalCount=this._totalCount+e.size}),t.sort((e,t)=>e.drawingsCount===t.drawingsCount?e.symbol.localeCompare(t.symbol):e.drawingsCount>t.drawingsCount?-1:1)}_getSymbolDrawingsMap(e){const t=new Map;return e.forEach(e=>{var n;if(Object(l.isLineTool)(e)&&e.showInObjectTree()){const r=null!==(n=e.symbol())&&void 0!==n?n:"",o=t.get(r)||new Set;o.add(e.id()),t.set(r,o)}}),t}}},co4r:function(e,t,n){e.exports={wrap:"wrap-1a1_EyKG",selected:"selected-1a1_EyKG",childOfSelected:"childOfSelected-1a1_EyKG",disabled:"disabled-1a1_EyKG",expandHandle:"expandHandle-1a1_EyKG",expanded:"expanded-1a1_EyKG"}},dDxv:function(e,t){e.exports=''},dYZt:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("yY3h");t.AsapQueue=class{enqueueTask(e){const{queue:t,requestFlush:n}=this;t.length||(n(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.indexthis.capacity){for(let t=0,n=e.length-this.index;t{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=r.makeRequestCall(this.flush),this.requestErrorThrow=r.makeRequestCallFromTimer(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}},eFQ1:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asap=function(e){i.enqueueTask(s.create(e))};var r=n("dYZt"),o=n("2FdS");const i=new r.AsapQueue,s=new o.TaskFactory(i.registerPendingError)},ffaL:function(e,t){ +e.exports=''},g89m:function(e,t,n){"use strict";var r=n("q1tI"),o=n.n(r),i=n("Eyy1"),s=n("TSYQ"),a=n.n(s),c=n("/3z9"),u=n("d700"),l=n("WXjp"),d=n("02pg"),h=n("uhCe"),f=n("/KDZ"),p=n("pafz"),g=n("ZjKI"),v=n("FQhm"),b=n("Iivm");const m=o.a.createContext({setHideClose:()=>{}});var y=n("zztK"),O=n("px1m");function S(e){const{title:t,subtitle:n,showCloseIcon:i=!0,onClose:s,renderBefore:c,renderAfter:u,draggable:l,className:d,unsetAlign:h}=e,[f,p]=Object(r.useState)(!1);return o.a.createElement(m.Provider,{value:{setHideClose:p}},o.a.createElement("div",{className:a()(O.container,d,(n||h)&&O.unsetAlign)},c,o.a.createElement("div",{"data-dragg-area":l,className:O.title},o.a.createElement("div",{className:O.ellipsis},t),n&&o.a.createElement("div",{className:a()(O.ellipsis,O.subtitle)},n)),u,i&&!f&&o.a.createElement(b.a,{className:O.close,icon:y,onClick:s,"data-name":"close","data-role":"button"})))}var w=n("ItnF");n.d(t,"a",(function(){return T}));const _={vertical:20},C={vertical:0};class T extends o.a.PureComponent{constructor(){super(...arguments),this._controller=null,this._reference=null,this._renderChildren=(e,t)=>(this._controller=e,this.props.render({requestResize:this._requestResize,centerAndFit:this._centerAndFit,isSmallWidth:t})),this._handleReference=e=>this._reference=e,this._handleClose=()=>{this.props.onClose()},this._handleKeyDown=e=>{var t;if(!e.defaultPrevented)switch(this.props.onKeyDown&&this.props.onKeyDown(e),Object(c.hashFromEvent)(e)){case 27:if(e.defaultPrevented)return;if(this.props.forceCloseOnEsc&&this.props.forceCloseOnEsc())return void this._handleClose();const{activeElement:n}=document,r=Object(i.ensureNotNull)(this._reference);if(null!==n){if(e.preventDefault(),"true"===(t=n).getAttribute("data-haspopup")&&"true"!==t.getAttribute("data-expanded"))return void this._handleClose();if(Object(u.b)(n))return void r.focus() +;if(r.contains(n))return void this._handleClose()}}},this._requestResize=()=>{null!==this._controller&&this._controller.recalculateBounds()},this._centerAndFit=()=>{null!==this._controller&&this._controller.centerAndFit()}}componentDidMount(){v.subscribe(g.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._handleClose,null)}componentWillUnmount(){v.unsubscribe(g.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._handleClose,null)}focus(){Object(i.ensureNotNull)(this._reference).focus()}getElement(){return this._reference}contains(e){var t,n;return null!==(n=null===(t=this._reference)||void 0===t?void 0:t.contains(e))&&void 0!==n&&n}render(){const{className:e,headerClassName:t,isOpened:n,title:r,dataName:i,onClickOutside:s,additionalElementPos:c,additionalHeaderElement:u,backdrop:g,shouldForceFocus:v=!0,showSeparator:b,subtitle:m,draggable:y=!0,fullScreen:O=!1,showCloseIcon:T=!0,rounded:E=!0,isAnimationEnabled:j,growPoint:D,dialogTooltip:I,unsetHeaderAlign:k}=this.props,M="after"!==c?u:void 0,x="after"===c?u:void 0;return o.a.createElement(f.a,{rule:h.a.SmallHeight},c=>o.a.createElement(f.a,{rule:h.a.TabletSmall},u=>o.a.createElement(l.a,{rounded:!(u||O)&&E,className:a()(w.dialog,e),isOpened:n,reference:this._handleReference,onKeyDown:this._handleKeyDown,onClickOutside:s,onClickBackdrop:s,fullscreen:u||O,guard:c?C:_,boundByScreen:u||O,shouldForceFocus:v,backdrop:g,draggable:y,isAnimationEnabled:j,growPoint:D,name:this.props.dataName,dialogTooltip:I},o.a.createElement("div",{className:w.wrapper,"data-name":i,"data-dialog-name":"string"==typeof r?r:""},void 0!==r&&o.a.createElement(S,{draggable:y&&!(u||O),onClose:this._handleClose,renderAfter:x,renderBefore:M,subtitle:m,title:r,showCloseIcon:T,className:t,unsetAlign:k}),b&&o.a.createElement(d.a,{className:w.separator}),o.a.createElement(p.a.Consumer,null,e=>this._renderChildren(e,u||O))))))}}},gSe6:function(e,t,n){e.exports={wrap:"wrap-3Onbn19L",dialog:"dialog-3Onbn19L",offset:"offset-3Onbn19L",title:"title-3Onbn19L",main:"main-3Onbn19L",disabled:"disabled-3Onbn19L",icon:"icon-3Onbn19L",textIcon:"textIcon-3Onbn19L",rightButtons:"rightButtons-3Onbn19L",twoButtons:"twoButtons-3Onbn19L",button:"button-3Onbn19L",viewButton:"viewButton-3Onbn19L",threeButtons:"threeButtons-3Onbn19L",lockButton:"lockButton-3Onbn19L",removeButton:"removeButton-3Onbn19L",warn:"warn-3Onbn19L",hover:"hover-3Onbn19L",expandHandle:"expandHandle-3Onbn19L",selected:"selected-3Onbn19L",childOfSelected:"childOfSelected-3Onbn19L",renameInput:"renameInput-3Onbn19L"}},gla1:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("q1tI");const o=()=>{const[,e]=Object(r.useReducer)((e,t)=>e+1,0);return e}},h5pj:function(e,t,n){e.exports={wrap:"wrap-3jZ5H2Ul",space:"space-3jZ5H2Ul",tree:"tree-3jZ5H2Ul"}},hFf1:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.RawTask=class{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}}},jPOK:function(e,t,n){"use strict" +;n.d(t,"a",(function(){return s}));var r=n("q1tI"),o=n("TSYQ"),i=n("Owlf");n("SzKR");function s(e){const t=o("tv-spinner","tv-spinner--shown","tv-spinner--size_"+(e.size||i.a));return r.createElement("div",{className:t,style:e.style,role:"progressbar"},r.createElement("div",{className:"tv-spinner__spinner-layer"},r.createElement("div",{className:"tv-spinner__background tv-spinner__width_element"}),r.createElement("div",{className:"tv-spinner__circle-clipper tv-spinner__width_element tv-spinner__circle-clipper--left"}),r.createElement("div",{className:"tv-spinner__circle-clipper tv-spinner__width_element tv-spinner__circle-clipper--right"})))}},leHx:function(e,t){e.exports=''},nkjW:function(e,t,n){e.exports={title:"title-2PJRtZNU",withoutIcon:"withoutIcon-2PJRtZNU",buttons:"buttons-2PJRtZNU",button:"button-2PJRtZNU",disabled:"disabled-2PJRtZNU"}},"p/5y":function(e,t,n){"use strict";n.d(t,"a",(function(){return o})) +;var r=n("q1tI"),o=Object(r.createContext)({dragDropManager:void 0})},"p0W+":function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n("q1tI"),o=n("TSYQ"),i=n("tU7i"),s=n("EvtC");const a=r.forwardRef((e,t)=>{const{className:n,...a}=e;return r.createElement(i.b,{...a,ref:t,className:o(n,s.button)})})},px1m:function(e,t,n){e.exports={"small-height-breakpoint":"screen and (max-height: 360px)",container:"container-2sL5JydP",unsetAlign:"unsetAlign-2sL5JydP",title:"title-2sL5JydP",subtitle:"subtitle-2sL5JydP",ellipsis:"ellipsis-2sL5JydP",close:"close-2sL5JydP"}},rlH3:function(e,t){e.exports=''},tyJc:function(e,t){e.exports=''},uhCe:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("ASyk");const o={SmallHeight:r["small-height-breakpoint"], +TabletSmall:r["tablet-small-breakpoint"],TabletNormal:r["tablet-normal-breakpoint"]}},"x0D+":function(e,t,n){var r,o,i;o=[t],void 0===(i="function"==typeof(r=function(e){"use strict";function t(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);tPromise.resolve())}var u=n("txPx");const l=Object(u.getLogger)("DataSourcesIcons");let d=null;function h(){const e=n.c.zxD0;return e?Promise.resolve(e.exports.lineToolsIcons):n.e("line-tools-icons").then(n.bind(null,"zxD0")).then(e=>e.lineToolsIcons)}function f(){const e=n.c.EsZh;return e?Promise.resolve(e.exports.SERIES_ICONS):n.e("series-icons-map").then(n.bind(null,"EsZh")).then(e=>e.SERIES_ICONS)}let p=null;function g(){return null===p&&(p=function(){const e=c(h,2).then(e=>e).catch(e=>(l.logWarn(e),{})),t=c(f,2).then(e=>e).catch(e=>(l.logWarn(e),{}));return Promise.all([e,t])}()),p.then(e=>(d={linetool:e[0],series:e[1]},d))}var v=n("Sn4D"),b=n("mkWe"),m=n("/KDZ"),y=n("YFKU"),O=n("g89m"),S=n("uhCe"),w=n("b4AZ");var _=n("cvc5"),C=n.n(_),T=n("5rFJ"),E=n("8+VR"),j=n("Eyy1"),D=n("TSYQ"),I=n.n(D),k=n("Iivm"),M=n("N5tr"),x=n("82wv"),N=n("gla1");const P=o.createContext(null);var A=n("p0W+"),L=n("+KIV"),R=n("Z3xJ"),B=n("B6/a"),F=n("nkjW"),H=n("JWMC");function z(e){const{viewModel:t}=Object(j.ensureNotNull)(Object(o.useContext)(P)),n=Object(N.a)(),r=t.selection();Object(o.useEffect)(()=>{const e={};return t.onChange().subscribe(e,()=>n()),()=>{t.onChange().unsubscribeAll(e)}},[t]),Object(o.useEffect)(()=>{const e={};return r.onChange().subscribe(e,()=>n()),()=>{r.onChange().unsubscribeAll(e)}},[r]);const s=!t.canSelectionBeUnmerged(),a=t.isSelectionCopiable(),c=t.isSelectionCloneable(),u=!a&&!c,l=t.canSelectionBeGrouped();return i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:D(F.title,F.withoutIcon)},Object(y.t)("Object tree"),!1),i.a.createElement("div",{className:F.buttons},i.a.createElement(A.a,{className:D(F.button,!l&&F.disabled),icon:B,onClick:function(){t.createGroupFromSelection()},isDisabled:!l,title:Object(y.t)("Create a group of drawings"),"data-name":"group-button"}),i.a.createElement(x.a,{className:D(F.button,u&&F.disabled),isDisabled:u,content:i.a.createElement(k.a,{icon:L}),title:Object(y.t)("Clone, Copy"),arrow:!1,isShowTooltip:!0,"data-name":"copy-clone-button"},a&&i.a.createElement(M.b,{"data-name":"copy",label:Object(y.t)("Copy"),onClick:function(){t.copySelection()}}),c&&i.a.createElement(M.b,{"data-name":"clone",label:Object(y.t)("Clone"),onClick:function(){t.cloneSelection()}})),i.a.createElement(x.a,{className:D(F.button,s&&F.disabled),isDisabled:s,content:i.a.createElement(k.a,{icon:R}),title:Object(y.t)("Move to"),arrow:!1,isShowTooltip:!0,"data-name":"move-to-button"},i.a.createElement(M.b,{"data-name":"new-pane-above",label:Object(y.t)("New pane above"),onClick:function(){t.unmergeSelectionUp()}}),i.a.createElement(M.b,{"data-name":"new-pane-below",label:Object(y.t)("New pane below"),onClick:function(){t.unmergeSelectionDown()}}))))} +var U=n("rRWa"),G=n("/MKj");function V(e){var t=null;return function(){return null==t&&(t=e()),t}}function K(e,t){for(var n=0;n0}},{key:"leave",value:function(e){var t,n,r=this.entered.length;return this.entered=(t=this.entered.filter(this.isNodeInDocument),n=e,t.filter((function(e){return e!==n}))),r>0&&0===this.entered.length}},{key:"reset",value:function(){this.entered=[]}}])&&K(t.prototype,n),r&&K(t,r),e}(),q=V((function(){return/firefox/i.test(navigator.userAgent)})),Y=V((function(){return Boolean(window.safari)}));function Z(e,t){for(var n=0;ne))return n[a];u=a-1}}var d=e-t[s=Math.max(0,u)],h=d*d;return n[s]+r[s]*d+o[s]*h+i[s]*d*h}}])&&Z(t.prototype,n),r&&Z(t,r),e}();function X(e){var t=1===e.nodeType?e:e.parentElement;if(!t)return null;var n=t.getBoundingClientRect(),r=n.top;return{x:n.left,y:r}}function Q(e){return{x:e.clientX,y:e.clientY}}function $(e,t,n,r,o){var i,s,a,c="IMG"===(i=t).nodeName&&(q()||!(null!==(s=document.documentElement)&&void 0!==s&&s.contains(i))),u=X(c?e:t),l={x:n.x-u.x,y:n.y-u.y},d=e.offsetWidth,h=e.offsetHeight,f=r.anchorX,p=r.anchorY,g=function(e,t,n,r){var o=e?t.width:n,i=e?t.height:r;return Y()&&e&&(i/=window.devicePixelRatio,o/=window.devicePixelRatio),{dragPreviewWidth:o,dragPreviewHeight:i} +}(c,t,d,h),v=g.dragPreviewWidth,b=g.dragPreviewHeight,m=o.offsetX,y=o.offsetY,O=0===y||y;return{x:0===m||m?m:new J([0,.5,1],[l.x,l.x/d*v,l.x+v-d]).interpolate(f),y:O?y:(a=new J([0,.5,1],[l.y,l.y/h*b,l.y+b-h]).interpolate(p),Y()&&c&&(a+=(window.devicePixelRatio-1)*b),a)}}var ee,te="__NATIVE_FILE__",ne="__NATIVE_URL__",re="__NATIVE_TEXT__",oe="__NATIVE_HTML__";function ie(e,t,n){var r=t.reduce((function(t,n){return t||e.getData(n)}),"");return null!=r?r:n}function se(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ae=(se(ee={},te,{exposeProperties:{files:function(e){return Array.prototype.slice.call(e.files)},items:function(e){return e.items}},matchesTypes:["Files"]}),se(ee,oe,{exposeProperties:{html:function(e,t){return ie(e,t,"")}},matchesTypes:["Html","text/html"]}),se(ee,ne,{exposeProperties:{urls:function(e,t){return ie(e,t,"").split("\n")}},matchesTypes:["Url","text/uri-list"]}),se(ee,re,{exposeProperties:{text:function(e,t){return ie(e,t,"")}},matchesTypes:["Text","text/plain"]}),ee);function ce(e,t){for(var n=0;n-1}))}))[0]||null}function de(e,t){for(var n=0;n0&&o.actions.hover(t,{clientOffset:Q(e)}),t.some((function(e){return o.monitor.canDropOnTarget(e)}))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=o.getCurrentDropEffect())))},this.handleTopDragOverCapture=function(){o.dragOverTargetIds=[]},this.handleTopDragOver=function(e){var t=o.dragOverTargetIds;if(o.dragOverTargetIds=[],!o.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer&&(e.dataTransfer.dropEffect="none"));o.altKeyPressed=e.altKey,o.actions.hover(t||[],{clientOffset:Q(e)}),(t||[]).some((function(e){return o.monitor.canDropOnTarget(e)}))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=o.getCurrentDropEffect())):o.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=function(e){o.isDraggingNativeItem()&&e.preventDefault(),o.enterLeaveCounter.leave(e.target)&&o.isDraggingNativeItem()&&setTimeout((function(){return o.endDragNativeItem()}),0)},this.handleTopDropCapture=function(e){var t;(o.dropTargetIds=[],o.isDraggingNativeItem())&&(e.preventDefault(),null===(t=o.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer));o.enterLeaveCounter.reset()},this.handleTopDrop=function(e){var t=o.dropTargetIds;o.dropTargetIds=[],o.actions.hover(t,{clientOffset:Q(e)}),o.actions.drop({dropEffect:o.getCurrentDropEffect()}),o.isDraggingNativeItem()?o.endDragNativeItem():o.monitor.isDragging()&&o.actions.endDrag()},this.handleSelectStart=function(e){var t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},this.options=new he(n,r),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new W(this.isNodeInDocument)}var t,n,o;return t=e,(n=[{key:"profile",value:function(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:(null===(e=this.dragStartSourceIds)||void 0===e?void 0:e.length)||0, +dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:(null===(t=this.dragOverTargetIds)||void 0===t?void 0:t.length)||0}}},{key:"window",get:function(){return this.options.window}},{key:"document",get:function(){return this.options.document}},{key:"rootElement",get:function(){return this.options.rootElement}},{key:"setup",value:function(){var e=this.rootElement;if(void 0!==e){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}},{key:"teardown",value:function(){var e,t=this.rootElement;void 0!==t&&(t.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&(null===(e=this.window)||void 0===e||e.cancelAnimationFrame(this.asyncEndDragFrameId)))}},{key:"connectDragPreview",value:function(e,t,n){var r=this;return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),function(){r.sourcePreviewNodes.delete(e),r.sourcePreviewNodeOptions.delete(e)}}},{key:"connectDragSource",value:function(e,t,n){var r=this;this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,n);var o=function(t){return r.handleDragStart(t,e)},i=function(e){return r.handleSelectStart(e)};return t.setAttribute("draggable","true"),t.addEventListener("dragstart",o),t.addEventListener("selectstart",i),function(){r.sourceNodes.delete(e),r.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",o),t.removeEventListener("selectstart",i),t.setAttribute("draggable","false")}}},{key:"connectDropTarget",value:function(e,t){var n=this,r=function(t){return n.handleDragEnter(t,e)},o=function(t){return n.handleDragOver(t,e)},i=function(t){return n.handleDrop(t,e)};return t.addEventListener("dragenter",r),t.addEventListener("dragover",o),t.addEventListener("drop",i),function(){t.removeEventListener("dragenter",r),t.removeEventListener("dragover",o),t.removeEventListener("drop",i)}}},{key:"addEventListeners",value:function(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}},{key:"removeEventListeners",value:function(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0), +e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}},{key:"getCurrentSourceNodeOptions",value:function(){var e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return pe({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}},{key:"getCurrentDropEffect",value:function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}},{key:"getCurrentSourcePreviewNodeOptions",value:function(){var e=this.monitor.getSourceId();return pe({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}},{key:"isDraggingNativeItem",value:function(){var e=this.monitor.getItemType();return Object.keys(r).some((function(t){return r[t]===e}))}},{key:"beginDragNativeItem",value:function(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(e,t){var n=new ue(ae[e]);return n.loadDataTransfer(t),n}(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}},{key:"setCurrentDragSourceNode",value:function(e){var t=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.mouseMoveTimeoutTimer=setTimeout((function(){var e;return null===(e=t.rootElement)||void 0===e?void 0:e.addEventListener("mousemove",t.endDragIfSourceWasRemovedFromDOM,!0)}),1e3)}},{key:"clearCurrentDragSourceNode",value:function(){var e;return!!this.currentDragSourceNode&&(this.currentDragSourceNode=null,this.rootElement&&(null===(e=this.window)||void 0===e||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)),this.mouseMoveTimeoutTimer=null,!0)}},{key:"handleDragStart",value:function(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}},{key:"handleDragEnter",value:function(e,t){this.dragEnterTargetIds.unshift(t)}},{key:"handleDragOver",value:function(e,t){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}},{key:"handleDrop",value:function(e,t){this.dropTargetIds.unshift(t)}}])&&ve(t.prototype,n),o&&ve(t,o),e}(),ye=function(e,t,n){return new me(e,t,n)},Oe=n("aKzv");!function(e){e.mouse="mouse",e.touch="touch",e.keyboard="keyboard"}(be||(be={}));var Se=1,we=0;function _e(e){return void 0===e.button||e.button===we}function Ce(e){return!!e.targetTouches}function Te(e,t){return Ce(e)?function(e,t){return 1===e.targetTouches.length?Te(e.targetTouches[0]):t&&1===e.touches.length&&e.touches[0].target===t.target?Te(e.touches[0]):void 0}(e,t):{x:e.clientX,y:e.clientY}}var Ee=function(){var e=!1;try{addEventListener("test",(function(){}),Object.defineProperty({},"passive",{get:function(){return e=!0,!0}}))}catch(e){}return e}();function je(e,t){ +for(var n=0;n=o[s].start)&&(null==o[s].end||i<=o[s].end))return!0;return!1 +}(o._mouseClientOffset.x||0,o._mouseClientOffset.y||0,u.x,u.y,o.options.scrollAngleRanges))o._isScrolling=!0;else if(!o.monitor.isDragging()&&o._mouseClientOffset.hasOwnProperty("x")&&s&&(t=o._mouseClientOffset.x||0,n=o._mouseClientOffset.y||0,r=u.x,i=u.y,Math.sqrt(Math.pow(Math.abs(r-t),2)+Math.pow(Math.abs(i-n),2))>(o.options.touchSlop?o.options.touchSlop:0))&&(o.moveStartSourceIds=void 0,o.actions.beginDrag(s,{clientOffset:o._mouseClientOffset,getSourceClientOffset:o.getSourceClientOffset,publishSource:!1})),o.monitor.isDragging()){var l=o.sourceNodes.get(o.monitor.getSourceId());o.installSourceNodeRemovalObserver(l),o.actions.publishDragSource(),e.cancelable&&e.preventDefault();var d=(a||[]).map((function(e){return o.targetNodes.get(e)})).filter((function(e){return!!e})),h=o.options.getDropTargetElementsAtPoint?o.options.getDropTargetElementsAtPoint(u.x,u.y,d):o.document.elementsFromPoint(u.x,u.y),f=[];for(var p in h)if(h.hasOwnProperty(p)){var g=h[p];for(f.push(g);g;)(g=g.parentElement)&&-1===f.indexOf(g)&&f.push(g)}var v=f.filter((function(e){return d.indexOf(e)>-1})).map((function(e){return o._getDropTargetId(e)})).filter((function(e){return!!e})).filter((function(e,t,n){return n.indexOf(e)===t}));if(c)for(var b in o.targetNodes){var m=o.targetNodes.get(b);if(l&&m&&m.contains(l)&&-1===v.indexOf(b)){v.unshift(b);break}}v.reverse(),o.actions.hover(v,{clientOffset:u})}}},this._getDropTargetId=function(e){for(var t=o.targetNodes.keys(),n=t.next();!1===n.done;){var r=n.value;if(e===o.targetNodes.get(r))return r;n=t.next()}},this.handleTopMoveEndCapture=function(e){o._isScrolling=!1,o.lastTargetTouchFallback=void 0,function(e){return void 0===e.buttons||0==(e.buttons&Se)}(e)&&(o.monitor.isDragging()&&!o.monitor.didDrop()?(e.cancelable&&e.preventDefault(),o._mouseClientOffset={},o.uninstallSourceNodeRemovalObserver(),o.actions.drop(),o.actions.endDrag()):o.moveStartSourceIds=void 0)},this.handleCancelOnEscape=function(e){"Escape"===e.key&&o.monitor.isDragging()&&(o._mouseClientOffset={},o.uninstallSourceNodeRemovalObserver(),o.actions.endDrag())},this.options=new Ie(r,n),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.sourceNodes=new Map,this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.targetNodes=new Map,this.listenerTypes=[],this._mouseClientOffset={},this._isScrolling=!1,this.options.enableMouseEvents&&this.listenerTypes.push(be.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(be.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(be.keyboard)}var t,n,r;return t=e,(n=[{key:"profile",value:function(){var e;return{sourceNodes:this.sourceNodes.size,sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,targetNodes:this.targetNodes.size,dragOverTargetIds:(null===(e=this.dragOverTargetIds)||void 0===e?void 0:e.length)||0}}},{key:"document",get:function(){return this.options.document}},{key:"setup",value:function(){ +this.document&&(Object(Oe.a)(!e.isSetUp,"Cannot have two Touch backends at the same time."),e.isSetUp=!0,this.addEventListener(this.document,"start",this.getTopMoveStartHandler()),this.addEventListener(this.document,"start",this.handleTopMoveStartCapture,!0),this.addEventListener(this.document,"move",this.handleTopMove),this.addEventListener(this.document,"move",this.handleTopMoveCapture,!0),this.addEventListener(this.document,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(this.document,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.addEventListener(this.document,"keydown",this.handleCancelOnEscape,!0))}},{key:"teardown",value:function(){this.document&&(e.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(this.document,"start",this.handleTopMoveStartCapture,!0),this.removeEventListener(this.document,"start",this.handleTopMoveStart),this.removeEventListener(this.document,"move",this.handleTopMoveCapture,!0),this.removeEventListener(this.document,"move",this.handleTopMove),this.removeEventListener(this.document,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(this.document,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(this.document,"keydown",this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}},{key:"addEventListener",value:function(e,t,n,r){var o=Ee?{capture:r,passive:!1}:r;this.listenerTypes.forEach((function(r){var i=xe[r][t];i&&e.addEventListener(i,n,o)}))}},{key:"removeEventListener",value:function(e,t,n,r){var o=Ee?{capture:r,passive:!1}:r;this.listenerTypes.forEach((function(r){var i=xe[r][t];i&&e.removeEventListener(i,n,o)}))}},{key:"connectDragSource",value:function(e,t){var n=this,r=this.handleMoveStart.bind(this,e);return this.sourceNodes.set(e,t),this.addEventListener(t,"start",r),function(){n.sourceNodes.delete(e),n.removeEventListener(t,"start",r)}}},{key:"connectDragPreview",value:function(e,t,n){var r=this;return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),function(){r.sourcePreviewNodes.delete(e),r.sourcePreviewNodeOptions.delete(e)}}},{key:"connectDropTarget",value:function(e,t){var n=this;if(!this.document)return function(){};var r=function(r){if(n.document&&n.monitor.isDragging()){var o;switch(r.type){case xe.mouse.move:o={x:r.clientX,y:r.clientY};break;case xe.touch.move:o={x:r.touches[0].clientX,y:r.touches[0].clientY}}var i=null!=o?n.document.elementFromPoint(o.x,o.y):void 0,s=i&&t.contains(i);return i===t||s?n.handleMove(r,e):void 0}};return this.addEventListener(this.document.body,"move",r),this.targetNodes.set(e,t),function(){n.document&&(n.targetNodes.delete(e),n.removeEventListener(n.document.body,"move",r))}}},{key:"getTopMoveStartHandler",value:function(){return this.options.delayTouchStart||this.options.delayMouseStart?this.handleTopMoveStartDelay:this.handleTopMoveStart}},{ +key:"installSourceNodeRemovalObserver",value:function(e){var t=this;this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=e,this.draggedSourceNodeRemovalObserver=new MutationObserver((function(){e&&!e.parentElement&&(t.resurrectSourceNode(),t.uninstallSourceNodeRemovalObserver())})),e&&e.parentElement&&this.draggedSourceNodeRemovalObserver.observe(e.parentElement,{childList:!0})}},{key:"resurrectSourceNode",value:function(){this.document&&this.draggedSourceNode&&(this.draggedSourceNode.style.display="none",this.draggedSourceNode.removeAttribute("data-reactid"),this.document.body.appendChild(this.draggedSourceNode))}},{key:"uninstallSourceNodeRemovalObserver",value:function(){this.draggedSourceNodeRemovalObserver&&this.draggedSourceNodeRemovalObserver.disconnect(),this.draggedSourceNodeRemovalObserver=void 0,this.draggedSourceNode=void 0}}])&&ke(t.prototype,n),r&&ke(t,r),e}(),Pe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Ne(e,t,n)},Ae=n("JEhF");const Le=(Re="OBJECT_TREE",e=>Re+"__"+e);var Re;const Be=Le("SET_NODES"),Fe=Le("SYNC_NODES"),He=Le("UPDATE_NODE"),ze=Le("UPDATE_NODES"),Ue=Le("RESET_TREE"),Ge=Le("SET_SELECTED_IDS"),Ve=Le("DROP_SELECTION"),Ke=Le("SELECT_PREVIOUS"),We=Le("SELECT_NEXT"),qe=Le("MULTI_SELECT_PREVIOUS"),Ye=Le("MULTI_SELECT_NEXT"),Ze=Le("PROCESS_DROP_TARGET"),Je=Le("UPDATE_DROP_TARGET"),Xe=Le("HIDE_DROP_TARGET"),Qe=Le("START_MULTI_SELECT"),$e=Le("STOP_MULTI_SELECT"),et=(Le("REMOVE_NODE"),Le("SET_FOCUSED_NODE")),tt=Le("SCROLL_TO_ID"),nt=Le("SET_IS_SELECTED"),rt=Le("SET_IS_EXPANDED"),ot=Le("SET_DISABLED_NODES"),it=Le("MOVE_NODES"),st=(Le("START_DRAG"),Le("END_DRAG")),at=()=>({type:Ke}),ct=()=>({type:We}),ut=()=>({type:qe}),lt=()=>({type:Ye}),dt=(e,t,n,r,o)=>({type:Ze,dropTarget:e,dropType:t,isHoveredLeft:n,boundBox:r,isLastChild:o}),ht=()=>({type:Ve}),ft=e=>({type:Ge,ids:e}),pt=(e,t,n)=>({type:it,ids:e,targetId:t,dropType:n}),gt=()=>({type:Qe}),vt=()=>({type:$e}),bt=e=>({type:et,nodeId:e}),mt=e=>({type:tt,nodeId:e}),yt=(e,t,n=0)=>({type:nt,nodeId:e,isSelected:t,mode:n}),Ot=(e,t)=>({type:rt,nodeId:e,isExpanded:t}),St=e=>({type:ot,ids:e}),wt=()=>({type:st});var _t=n("G4qV");const Ct=e=>e.nodes,Tt=e=>e.selection,Et=e=>e.dropTarget,jt=e=>e.expanded,Dt=e=>e.scrollToId,It=(e,t)=>t,kt=Object(_t.a)([Ct,It],(e,t)=>e[t]),Mt=Object(_t.a)([Tt,It],(e,t)=>e.ids.includes(t)),xt=Object(_t.a)([jt,It],(e,t)=>e.includes(t)),Nt=Object(_t.a)([e=>e.disabled,Tt,It],(e,t,n)=>!t.ids.includes(n)&&e.includes(n)),Pt=Object(_t.a)(Ct,e=>Object.keys(e)),At=Object(_t.a)(Tt,({ids:e})=>e),Lt=Object(_t.a)(Tt,({lastFocusedNodeId:e})=>e),Rt=Object(_t.a)(Tt,({isMultiSelecting:e})=>e),Bt=Object(_t.a)([Ct,At],(e,t)=>t.map(t=>e[t])),Ft=Object(_t.a)(Ct,e=>Object.values(e).filter(e=>0===e.level)),Ht=Object(_t.a)([Ct,Ft],(e,t)=>t.reduce((t,n)=>[...t,...zt(e,Object(j.ensureDefined)(n))],[]));function zt(e,t){const n=[];for(const r of t.children)n.push(e[r]),n.push(...zt(e,e[r]));return n}const Ut=Object(_t.a)([Ct,Ft,jt],(e,t,n)=>{ +const r=new Set(n);return t.reduce((t,n)=>[...t,...Vt(e,Object(j.ensureDefined)(n),r)],[])}),Gt=Object(_t.a)([Ct,At,jt],(e,t,n)=>{const r=new Set(n);return[{id:"drag-list",level:-1,children:t}].reduce((t,n)=>[...t,...Vt(e,Object(j.ensureDefined)(n),r)],[])});function Vt(e,t,n){const r=[];for(const o of t.children){const t=e[o];void 0!==t&&(r.push(t),n.has(o)&&r.push(...Vt(e,t,n)))}return r}function*Kt(e){const{selectedIds:t,nodes:n}=yield Object(T.b)(e),r=n.reduce((e,t)=>({...e,[t.id]:t}),{});yield Object(T.e)((e=>({type:Be,nodes:e}))(r)),yield Object(T.e)(ft(t));!Lt(yield Object(T.f)())&&t.length>0&&(yield Object(T.e)(bt(t[0])),yield Object(T.e)(mt(t[0])))}function*Wt(e){for(;;){if((yield Object(T.g)([Qe,$e])).type===Qe){const t=Pt(yield Object(T.f)()).filter(t=>!e(t));yield Object(T.e)(St(t))}else yield Object(T.e)(St([]))}}function*qt(){for(;;){const{type:e}=yield Object(T.g)([Ye,qe]),t=yield Object(T.f)(),n=Ht(t),r=n.length,o=Lt(t),i=n.findIndex(e=>e.id===o),s=[...At(t)];if(e===qe&&0===i||e===Ye&&i===r-1)continue;const a=en(t,e===Ye?"next":"previous",n,i),{id:c}=a;s.includes(c)&&o?(yield Object(T.e)(yt(o,!1,1)),yield Object(T.e)(bt(c))):yield Object(T.e)(yt(c,!0,1)),yield Object(T.e)(mt(c))}}function*Yt(e,t){for(;;){const{type:n}=yield Object(T.g)([We,Ke]),r=yield Object(T.f)(),o=Ht(r),i=Lt(r),s=o.findIndex(e=>e.id===i),a=n===We?"next":"previous",c=en(r,a,o,s),{id:u}=c;e?e([u],a):yield Object(T.e)(ft([u])),t&&t(u),yield Object(T.e)(bt(u))}}function*Zt(e,t=(()=>!0)){for(;;){const{mode:n,nodeId:r,isSelected:o}=yield Object(T.g)(nt);let i=[...At(yield Object(T.f)())];const s=Ht(yield Object(T.f)());if(1===n)o?i.push(r):i.splice(i.indexOf(r),1);else if(2===n&&i.length>0){const e=Lt(yield Object(T.f)());let n=s.findIndex(t=>t.id===e);-1===n&&(n=s.reduce((e,t,n)=>i.includes(t.id)?n:e,-1));const o=s.findIndex(e=>e.id===r);if(n!==o)for(let e=Math.min(n,o);e<=Math.max(n,o);e++){const n=s[e].id;!i.includes(n)&&t(n)&&i.push(n)}}else i=r?[r]:[];const a=new Set(i);i=s.reduce((e,t)=>(a.has(t.id)&&e.push(t.id),e),[]),e?e(i):yield Object(T.e)(ft(i)),yield Object(T.e)(bt(r))}}function*Jt(e=(()=>!0),t){const{dropTarget:n,dropType:r,isHoveredLeft:o,boundBox:i,isLastChild:s}=t,a=Et(yield Object(T.f)()),c=kt(yield Object(T.f)(),Object(j.ensureDefined)(n.parentId)),u=s&&"after"===r,l=Bt(yield Object(T.f)()),d=!u||!o&&e(l,n,r)?n:c,h=a.node&&a.node.id!==d.id||a.dropType!==r;l.map(e=>e.id).includes(d.id)?yield Object(T.e)({type:Xe}):h&&e(l,d,r)&&(yield Object(T.e)(((e,t,n)=>({type:Je,node:e,dropType:t,boundBox:n}))(d,r,i)))}function*Xt(e){yield Object(T.h)(0,Ze,Jt,e)}function*Qt(e){for(;;){yield Object(T.g)(Ve);const t=Bt(yield Object(T.f)()),{node:n,dropType:r}=Et(yield Object(T.f)());if(n&&r){const o=new CustomEvent("tree-node-drop",{detail:{nodes:t,target:n.id,type:r}});if(e&&e(o),!o.defaultPrevented){const e=At(yield Object(T.f)());yield Object(T.e)(pt(e,n.id,r))}}}}function*$t(e){for(;;){yield Object(T.g)(it);e(Ct(yield Object(T.f)()))}}function en(e,t,n,r){const o=n.length;let i,s=0 +;for(;!i||Math.abs(s)1&&!xt(e,Object(j.ensureDefined)(a.parentId)));)s+="next"===t?1:-1,i=n[(r+s+o)%o];var a;return i}function*tn(e={}){const{saga:t,onDrop:n,canMove:r,onMove:o,onSelect:i,onKeyboardSelect:s,initState:a,canBeAddedToSelection:c}=e,u=[Object(T.d)(Xt,r),Object(T.d)(Qt,n),Object(T.d)(Zt,i,c),Object(T.d)(Yt,i,s),Object(T.d)(qt)];for(t&&u.push(Object(T.d)(t)),o&&u.push(Object(T.d)($t,o)),c&&u.push(Object(T.d)(Wt,c));;){a&&(yield Object(T.b)(Kt,a));const e=yield Object(T.a)(u);yield Object(T.g)(Ue);for(const t of e)yield Object(T.c)(t)}}var nn=n("ANjH"),rn=n("ogJP");const on=Object(u.getLogger)("Platform.GUI.ObjectTree.CallApi");const sn={ids:[],lastFocusedNodeId:void 0,isMultiSelecting:!1};const an={node:void 0,dropType:void 0,boundBox:void 0};const cn=Object(nn.c)({nodes:function(e={},t){switch(t.type){case Be:return t.nodes;case Fe:{const{nodes:n}=t,r=n.map(e=>e.id),o={...e};for(const t of Object.keys(e))if(!r.includes(t)){const{parentId:e}=o[t];e&&(o[e]={...o[e],children:o[e].children.filter(e=>e!==t)}),delete o[t]}for(const e of n){const t=e.id;if(o.hasOwnProperty(t)){!Object(rn.deepEquals)(o[t].children,e.children)[0]&&(o[t]={...o[t],children:[...e.children]})}else{o[t]=e;const{parentId:n}=e;if(n&&!o[n].children.includes(t))throw new Error("Not implemented")}}return o}case He:{const{type:n,nodeId:r,...o}=t;return{...e,[r]:{...e[r],...o}}}case ze:{const{nodes:n}=t,r={...e};return Object.keys(n).forEach(e=>{r[e]={...r[e],...n[e]}}),{...e,...r}}case it:{const{ids:n,targetId:r,dropType:o}=t,i=Object(j.ensureDefined)(e[r].parentId),s=e[i],a={};for(const t of n){const n=e[t];if(n.parentId){const r=a[n.parentId]||e[n.parentId];a[n.parentId]={...r,children:r.children.filter(e=>e!==t)}}a[t]={...n,parentId:i,level:s.level+1}}const c=s.children.filter(e=>!n.includes(e));return c.splice(((e,t,n)=>{switch(n){case"before":return e.indexOf(Object(j.ensureDefined)(t));case"inside":return e.length;case"after":return e.indexOf(Object(j.ensureDefined)(t))+1;default:return 0}})(c,r,o),0,...n),a[i]={...e[i],children:c,isExpanded:!0},{...e,...a}}default:return e}},selection:function(e=sn,t){switch(t.type){case Ge:{const{ids:n}=t;return{...e,ids:n,lastFocusedNodeId:n.length>0?e.lastFocusedNodeId:void 0}}case Qe:return{...e,isMultiSelecting:!0};case $e:return{...e,isMultiSelecting:!1};case et:return{...e,lastFocusedNodeId:t.nodeId};case Fe:{const n=new Set(t.nodes.map(e=>e.id));return e.lastFocusedNodeId&&!n.has(e.lastFocusedNodeId)&&delete e.lastFocusedNodeId,{...e,ids:e.ids.filter(e=>n.has(e))}}default:return e}},dropTarget:function(e=an,t){switch(t.type){case Je:{const{node:n,dropType:r,boundBox:o}=t;return{...e,node:n,dropType:r,boundBox:o}}case Xe:case st:case Ue:return{...an};default:return e}},expanded:function(e=[],t){switch(t.type){case rt:{const{nodeId:n,isExpanded:r}=t;if(r)return[...e,n];const o=[...e];return o.splice(e.indexOf(n),1),o}default:return e}},disabled:function(e=[],t){switch(t.type){case ot:return[...t.ids];default:return e}},scrollToId:function(e=null,t){switch(t.type){case tt: +return null===t.nodeId?null:{id:t.nodeId};default:return e}}});function un(e,t,n){var r=n.getRegistry(),o=r.addTarget(e,t);return[o,function(){return r.removeTarget(o)}]}function ln(e,t,n){var r=n.getRegistry(),o=r.addSource(e,t);return[o,function(){return r.removeSource(o)}]}function dn(e,t){for(var n=0;n, or turn it into a ")+"drag source or a drop target itself.")}}function vn(e){var t={};return Object.keys(e).forEach((function(n){var r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{var i=function(e){return function(){ +var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!Object(o.isValidElement)(t)){var r=t;return e(r,n),r}var i=t;gn(i);var s=n?function(t){return e(t,n)}:e;return mn(i,s)}}(r);t[n]=function(){return i}}})),t}function bn(e,t){"function"==typeof e?e(t):e.current=t}function mn(e,t){var n=e.ref;return Object(Oe.a)("string"!=typeof n,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a or
. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?Object(o.cloneElement)(e,{ref:function(e){bn(n,e),bn(t,e)}}):Object(o.cloneElement)(e,{ref:t})}function yn(e){return(yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function On(e){return null!==e&&"object"===yn(e)&&Object.prototype.hasOwnProperty.call(e,"current")}function Sn(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1,'Expected the drop target specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',Jn.join(", "),t),Object(Oe.a)("function"==typeof e[t],"Expected %s in the drop target specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target",t,t,e[t])})),function(t,n){return new Xn(e,t,n)}}function $n(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=e;"function"!=typeof e&&(Object(Oe.a)(In(e,!0),'Expected "type" provided as the first argument to DropTarget to be a string, an array of strings, or a function that returns either given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',e),o=function(){return e}),Object(Oe.a)(Dn(t),'Expected "spec" provided as the second argument to DropTarget to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',t);var i=Qn(t);return Object(Oe.a)("function"==typeof n,'Expected "collect" provided as the third argument to DropTarget to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',n),Object(Oe.a)(Dn(r),'Expected "options" provided as the fourth argument to DropTarget to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',n),function(e){return Yn({containerDisplayName:"DropTarget",createHandler:i,registerHandler:un,createMonitor:function(e){return new fn(e)},createConnector:function(e){return new wn(e)},DecoratedComponent:e,getType:o,collect:n,options:r})}}var er=n("iR1w"),tr=n("qFKp");function nr(e,t){for(var n=0;n-1,'Expected the drag source specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',lr.join(", "),t),Object(Oe.a)("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source",t,t,e[t])})),dr.forEach((function(t){Object(Oe.a)("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source",t,t,e[t])})),function(t,n){return new hr(e,t,n)}}var pr=n("/3z9"),gr=n("3F0O"),vr=n("8d0Q");const br=o.createContext({size:0,smallSizeTreeNodeAction:1}),mr={[pr.Modifiers.Mod]:1,[pr.Modifiers.Shift]:2};var yr=n("+5L9"),Or=n("co4r");const Sr=()=>{};class wr extends i.a.PureComponent{constructor(){super(...arguments),this._ref=null,this._handleRef=e=>{this._ref=e;const{connectDragSource:t,connectDropTarget:n,connectDragPreview:r}=this.props;Object(j.ensureDefined)(n)(this._ref),Object(j.ensureDefined)(t)(this._ref),Object(j.ensureDefined)(r)((ur||((ur=new Image).src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),ur),{captureDraggingState:!0})},this._handleTouchStart=e=>{const t=(e,t)=>{const n=function(e,t){try{const n=document.createEvent("TouchEvent");return n.initTouchEvent(e,!0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,t.touches,t.targetTouches,t.changedTouches),n}catch(e){return null}}(e,t);if(n)return n;const r=Array.from(t.changedTouches),o=Array.from(t.touches),i=Array.from(t.targetTouches);return new TouchEvent(e,{bubbles:!0,changedTouches:r,touches:o,targetTouches:i})},n=e.target;if(n instanceof Element){const e=e=>{const r=e;if(!n.isConnected){r.preventDefault();const e=t("touchmove",r);document.body.dispatchEvent(e)}},r=o=>{const i=o;if(!n.isConnected){i.preventDefault() +;const e=t("touchend",i);document.body.dispatchEvent(e)}n.removeEventListener("touchend",r),n.removeEventListener("touchmove",e)};n.addEventListener("touchend",r),n.addEventListener("touchmove",e)}}}componentDidMount(){var e;null===(e=this._ref)||void 0===e||e.addEventListener("touchstart",this._handleTouchStart)}componentWillUnmount(){var e;null===(e=this._ref)||void 0===e||e.removeEventListener("touchstart",this._handleTouchStart)}render(){return i.a.createElement(_r,{...this.props,reference:this._handleRef})}getNode(){return Object(j.ensureNotNull)(this._ref)}}const _r=e=>{const{id:t,isSelected:n,isOffset:r,isExpandable:s,setIsSelected:a,isDisabled:c,isExpanded:u,onClick:l,parentId:d,setIsExpanded:h,reference:f,isFirstListItem:p,isLastListItem:g,nodeRenderer:v,isChildOfSelected:b=!1}=e,{size:m,smallSizeTreeNodeAction:y}=Object(o.useContext)(br),O=Object(o.useRef)(null),S=Object(gr.a)(e=>O.current=e,f);let[w,_]=Object(vr.c)();return tr.CheckMobile.any()&&(w=n,_={onMouseOut:Sr,onMouseOver:Sr}),i.a.createElement("div",{className:D(Or.wrap,n&&Or.selected,b&&Or.childOfSelected,c&&Or.disabled,s&&Or.expandable),onClick:1===m&&0===y?C:function(e){if(e.defaultPrevented)return;const r=mr[Object(pr.modifiersFromEvent)(e)]||0;!c&&a&&a(t,!n,r);l&&0===r&&l(e,t)},onContextMenu:C,ref:S,..._},s&&i.a.createElement(k.a,{icon:yr,className:D(Or.expandHandle,u&&Or.expanded),onClick:function(e){e.preventDefault(),s&&h(t,!u)},onMouseDown:function(e){e.preventDefault()}}),v({id:t,isOffset:r,parentId:d,isDisabled:c,isSelected:n,isChildOfSelected:b,isHovered:w,isExpanded:u,isFirstListItem:p,isLastListItem:g}));function C(){c||n||!a||a(t,!0)}},Cr=i.a.createContext({});function Tr(e,t){const{id:n}=t,r=kt(e,n),o=Mt(e,n);let i=!1,s=r.parentId;for(;s&&!i;)i=Mt(e,s),s=kt(e,s).parentId;return{...r,isSelected:o,isChildOfSelected:i,isExpanded:r.children.length>0&&xt(e,n),isExpandable:r.children.length>0,isDisabled:Nt(e,n)}}function Er(e){return Object(nn.b)({setIsExpanded:Ot,processDropTarget:dt,dropSelection:ht,selectNext:ct,selectPrevious:at,setIsSelected:yt,endDrag:wt},e)}const jr=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=e;"function"!=typeof e&&(Object(Oe.a)(In(e),'Expected "type" provided as the first argument to DragSource to be a string, or a function that returns a string given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',e),o=function(){return e}),Object(Oe.a)(Dn(t),'Expected "spec" provided as the second argument to DragSource to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',t);var i=fr(t);return Object(Oe.a)("function"==typeof n,'Expected "collect" provided as the third argument to DragSource to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',n), +Object(Oe.a)(Dn(r),'Expected "options" provided as the fourth argument to DragSource to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',n),function(e){return Yn({containerDisplayName:"DragSource",createHandler:i,registerHandler:ln,createConnector:function(e){return new rr(e)},createMonitor:function(e){return new ar(e)},DecoratedComponent:e,getType:o,collect:n,options:r})}}("node",{beginDrag:e=>{const{id:t,isDisabled:n,isSelected:r}=e;return n||r||e.setIsSelected(t,!0),e},endDrag:e=>e.endDrag()},e=>({connectDragSource:e.dragSource(),connectDragPreview:e.dragPreview()})),Dr=$n("node",{hover:(e,t,n)=>{if(!n)return;const r=n.getNode(),o=r.getBoundingClientRect(),i=o.bottom-o.top,s=t.getClientOffset();if(s){const t=s.y-o.top;let n,a;if(n=0===e.children.length?t=i/3&&t<2*i/3?"inside":"after",void 0!==e.getContainerElement){const t=e.getContainerElement().getBoundingClientRect();a={top:o.top-t.top,left:o.left-t.left,bottom:o.top-t.top+o.height,right:o.left-t.left+o.width,height:o.height,width:o.width}}else a={top:r.offsetTop,left:r.offsetLeft,bottom:r.offsetTop+r.offsetHeight,right:r.offsetLeft+r.offsetWidth,height:r.offsetHeight,width:r.offsetWidth};e.processDropTarget(e,n,s.x-o.left<48,a,e.isLastChild)}}},e=>({connectDropTarget:e.dropTarget()})),Ir=Object(G.b)(Tr,Er,null,{context:Cr})(jr(Dr(wr))),kr=Object(G.b)(Tr,Er,null,{context:Cr})(_r);var Mr=n("d700");function xr(e){return(xr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Nr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pr(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};return Object(Oe.a)("function"==typeof e,'Expected "collect" provided as the first argument to DragLayer to be a function that collects props to inject into the component. ',"Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-layer",e),Object(Oe.a)(Dn(t),'Expected "options" provided as the second argument to DragLayer to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-layer',t),function(n){var r=n,i=t.arePropsEqual,s=void 0===i?pn:i,a=r.displayName||r.name||"Component",c=function(t){Lr(i,t);var n=Br(i);function i(){var e;return Nr(this,i),(e=n.apply(this,arguments)).isCurrentlyMounted=!1,e.ref=Object(o.createRef)(),e.handleChange=function(){if(e.isCurrentlyMounted){var t=e.getCurrentState();pn(t,e.state)||e.setState(t)}},e}return Ar(i,[{key:"getDecoratedComponentInstance",value:function(){return Object(Oe.a)(this.ref.current,"In order to access an instance of the decorated component, it must either be a class component or use React.forwardRef()"),this.ref.current}},{key:"shouldComponentUpdate",value:function(e,t){return!s(e,this.props)||!pn(t,this.state)}},{key:"componentDidMount",value:function(){this.isCurrentlyMounted=!0,this.handleChange()}},{key:"componentWillUnmount",value:function(){this.isCurrentlyMounted=!1,this.unsubscribeFromOffsetChange&&(this.unsubscribeFromOffsetChange(),this.unsubscribeFromOffsetChange=void 0),this.unsubscribeFromStateChange&&(this.unsubscribeFromStateChange(),this.unsubscribeFromStateChange=void 0)}},{key:"render",value:function(){var e=this;return Object(kn.jsx)(Mn.a.Consumer,{children:function(t){var n=t.dragDropManager;return void 0===n?null:(e.receiveDragDropManager(n),e.isCurrentlyMounted?Object(kn.jsx)(r,Object.assign({},e.props,e.state,{ref:Tn(r)?e.ref:null}),void 0):null)}},void 0)}},{key:"receiveDragDropManager",value:function(e){if(void 0===this.manager){this.manager=e,Object(Oe.a)("object"===xr(e),"Could not find the drag and drop manager in the context of %s. Make sure to render a DndProvider component in your top-level component. Read more: http://react-dnd.github.io/react-dnd/docs/troubleshooting#could-not-find-the-drag-and-drop-manager-in-the-context",a,a);var t=this.manager.getMonitor();this.unsubscribeFromOffsetChange=t.subscribeToOffsetChange(this.handleChange),this.unsubscribeFromStateChange=t.subscribeToStateChange(this.handleChange)}}},{key:"getCurrentState",value:function(){if(!this.manager)return{};var t=this.manager.getMonitor();return e(t,this.props)}}]),i}(o.Component);return c.displayName="DragLayer(".concat(a,")"),c.DecoratedComponent=n,Fn()(c,n)}}var Ur=n("AiMB");function Gr(e){const t=e(),n=Object(o.useRef)(t);n.current=t;const[r,i]=Object(o.useState)(n.current),s=Object(o.useRef)(null);return Object(o.useEffect)(()=>{ +null===s.current&&(s.current=requestAnimationFrame(()=>{s.current=null,i(n.current)}))}),Object(o.useEffect)(()=>()=>{s.current&&cancelAnimationFrame(s.current)},[]),r}function Vr(e){const{dropTargetOffset:t,mousePosition:n}=e;if(!t)return{display:"none"};const{x:r,y:o}=t,i=n&&t?n.y-t.y:0,s=`translate(${r+(n&&t?n.x-t.x:0)}px, ${o+i}px)`;return{transform:s,WebkitTransform:s}}const Kr={top:0,left:0,position:"fixed",pointerEvents:"none",zIndex:100,opacity:.5,width:300,backgroundColor:"red"};const Wr=zr((function(e){return{isDragging:e.isDragging()&&"node"===e.getItemType(),mousePosition:e.getClientOffset(),dropTargetOffset:e.getSourceClientOffset()}}))(Object(G.b)((function(e){return{items:Gt(e)}}),null,null,{context:Cr})((function(e){const{items:t,isDragging:n,nodeRenderer:r,dragPreviewRenderer:o}=e;return Gr((function(){return n?i.a.createElement(Ur.a,null,i.a.createElement("div",{style:{...Kr,...Vr(e)}},t.map(e=>{if(o){const t=o;return i.a.createElement(t,{key:e.id,...e})}return i.a.createElement(kr,{id:e.id,key:e.id,nodeRenderer:r,isDragPreview:!0,isOffset:e.level>1})}))):null}))})));var qr=n("0lNN"),Yr=n("n9z6");const Zr=i.a.forwardRef((e,t)=>{const n=Object(o.useRef)(null);return e.connectDropTarget(n),Object(o.useImperativeHandle)(t,()=>({getNode:()=>Object(j.ensureNotNull)(n.current)}),[]),i.a.createElement("div",{ref:n,style:{height:"100%",width:"100%"}})}),Jr=$n("node",{hover:(e,t,n)=>{if(!n)return;const r=t.getClientOffset();if(null===r)return;const o=e.getOrderedNodes();if(0===o.length)return;const i=n.getNode().getBoundingClientRect(),s=e.getContainerElement().getBoundingClientRect();if("first"===e.type){const t={top:i.top-s.top+i.height,left:i.left-s.left,bottom:i.top-s.top+i.height,right:i.left-s.left+i.width,height:0,width:i.width};e.processDropTarget(o[0],"before",!1,t,!1)}if("last"===e.type){const t=r.x-i.left<48,n=o[o.length-1],a=t&&2===n.level?Object(j.ensureDefined)(o.find(e=>e.id===n.parentId)):n,c={top:i.top-s.top,left:i.left-s.left,bottom:i.top-s.top,right:i.left-s.left+i.width,height:i.height,width:i.width};e.processDropTarget(a,"after",t,c,!1)}}},e=>({connectDropTarget:e.dropTarget()}))(Zr),Xr=i.a.createContext({isOver:!1,transform:void 0});var Qr=n("4ceR");function $r(e){const{dropType:t,boundBox:n}=e,{top:r,bottom:o,left:i}=Object(j.ensureDefined)(n);return[i,"before"===t||"inside"===t?r:o]}const eo=zr((function(e){return{isDragging:e.isDragging()}}))(Object(G.b)((function(e){const{boundBox:t,dropType:n,node:r}=Et(e);return{boundBox:t,dropType:n,level:r?r.level:void 0}}),null,null,{context:Cr})((function(e){const{dropType:t,boundBox:n,isDragging:r,level:i,transform:s=$r}=e;return Gr((function(){if(!r||!t||!n)return null;const a={[Qr.dropTarget]:"inside"!==t,[Qr.dropTargetInside]:"inside"===t},{width:c,height:u}=n,[l,d]=s(e),h=`translate(${l}px, ${d}px)`;return o.createElement("div",{className:D(a),style:{position:"absolute",transform:h,WebkitTransform:h,top:0,left:2===i?"46px":0,width:2===i?c-46+"px":c,height:"inside"===t?u:"2px"}})}))}))),to=i.a.forwardRef((e,t)=>{ +const n=Object(o.useContext)(Xr);return i.a.createElement("div",{...e,ref:t},e.children,n.isOver&&i.a.createElement(eo,{transform:n.transform}))});var no=n("Ialn"),ro=n("DGxW");const oo=38+pr.Modifiers.Shift,io=40+pr.Modifiers.Shift;const so=i.a.forwardRef((function(e,t){const{navigationKeys:n,renderList:r,stopMultiSelect:s,startMultiSelect:a,isMultiSelecting:c,nodeRenderer:u,dragPreviewRenderer:l,className:d,connectDropTarget:h,readOnly:f,onClick:p,dropLayerTransform:g,setFocusedNode:v,scrollToId:b,rowHeight:m,onMultiSelectPrevious:y,onMultiSelectNext:O,onMoveCursorToNext:S,onMoveCursorToPrevious:w,outerRef:_,width:C,height:T,isOver:E,processDropTarget:D}=e,k=Object(o.useContext)(P),M=Object(o.useRef)(null);Object(o.useEffect)(()=>{const e=e=>{[pr.Modifiers.Mod,pr.Modifiers.Shift].includes(Object(pr.modifiersFromEvent)(e))&&a()},t=e=>{c&&![pr.Modifiers.Mod,pr.Modifiers.Shift].includes(Object(pr.modifiersFromEvent)(e))&&s()};return document.addEventListener("keydown",e),document.addEventListener("keyup",t),document.addEventListener("mousemove",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t),document.removeEventListener("mousemove",t)}},[c]),function(e){Object(o.useEffect)(()=>{if(tr.isEdge){let t=null;const n=Object(j.ensureNotNull)(e.current),r=e=>{if(e.target instanceof Element){const n=Object(j.ensureNotNull)(e.target.closest("[draggable]"));n instanceof HTMLElement&&(n.style.opacity="0",t=requestAnimationFrame(()=>n.style.opacity="1"))}};return n.addEventListener("dragstart",r),()=>{n.removeEventListener("dragstart",r),null!==t&&cancelAnimationFrame(t)}}return()=>{}},[])}(M);const x=Object(o.useCallback)(()=>Object(j.ensureNotNull)(W.current),[]),N=Object(o.useCallback)(()=>r,[r]),A=Object(o.useMemo)(()=>{const e=f?kr:Ir,t=[];let n;t.push({type:"padding",node:i.a.createElement(Jr,{type:"first",key:"padding-top",getContainerElement:x,getOrderedNodes:N,processDropTarget:D})});for(let o=0;o0,nodeRenderer:u,readOnly:f,onClick:p,isOffset:s.level>1,getContainerElement:x})})}return t.push({type:"padding",node:i.a.createElement(Jr,{type:"last",key:"padding-bottom",getContainerElement:x,getOrderedNodes:N,processDropTarget:D})}),t},[r]),L=Object(o.useRef)([]);L.current=A;const R=Object(o.useCallback)(e=>{let{style:t}=e;const{index:n}=e;return n===L.current.length-1&&(t={...t,bottom:0,minHeight:t.height},delete t.height),i.a.createElement("div",{style:t},L.current[n].node)},[]),B=Object(o.useCallback)(e=>{const t=L.current[e];return"padding"===t.type?6:"function"==typeof m?m(e,t):m},[m]),F=Object(o.useCallback)(e=>Object(j.ensure)(L.current[e].node.key),[]),H=Object(o.useMemo)(()=>null===b?{index:-1}:{index:L.current.findIndex(e=>e.node.key===b.id)},[b]) +;h(M);const[z,U,G,V]=Object(Yr.a)(),K=Object(o.useRef)(null);Object(o.useEffect)(()=>Object(j.ensureNotNull)(K.current).resetAfterIndex(0,!0),[A]),Object(o.useEffect)(()=>Object(j.ensureNotNull)(K.current).scrollToItem(H.index),[H]);const W=Object(o.useRef)(null),q=Object(o.useMemo)(()=>({isOver:E,transform:g}),[E,g]),Y=Object(o.useRef)(null),Z=Object(o.useRef)({startScroll(e){const t=()=>{null!==G.current&&(Y.current=requestAnimationFrame(t),G.current.scrollBy({top:e}))};this.stopScroll(),t()},stopScroll(){null!==Y.current&&(cancelAnimationFrame(Y.current),Y.current=null)},getListElement:()=>G.current});return Object(o.useImperativeHandle)(t,()=>Z.current,[]),Object(o.useEffect)(()=>()=>Z.current.stopScroll(),[E]),i.a.createElement(Xr.Provider,{value:q},i.a.createElement("div",{...U,className:I()(ro.tree,d),ref:M,tabIndex:-1,onKeyDown:function(e){const t=Object(pr.hashFromEvent)(e);if(e.defaultPrevented||Object(Mr.a)(t,e.target))return;k||t!==oo||(e.preventDefault(),y());k||t!==io||(e.preventDefault(),O());(38===t||void 0!==n&&"previous"===n[t])&&(e.preventDefault(),w());(40===t||void 0!==n&&"next"===n[t])&&(e.preventDefault(),S());if((8===t||46===t)&&k){const{viewModel:e}=k,t=e.selection(),n=t.selected();if(1!==n.length)return;const r=e.getNextNodeIdAfterRemove(n[0]);if(null===r)return;e.onChange().subscribe(null,()=>{if(t.selected().length)return;const n=e.entity(r);n&&(t.set([n]),v(r))},!0)}}},i.a.createElement(qr.a,{...z,className:ro.overlayScrollWrap}),i.a.createElement(er.b,{ref:function(e){K.current=e},className:ro.listContainer,width:C,height:T,itemCount:A.length,itemSize:B,children:R,itemKey:F,outerRef:function(e){G.current=e,_&&_(e)},innerRef:function(e){W.current=e},innerElementType:to,onItemsRendered:function(){V()},overscanCount:20,direction:Object(no.isRtl)()?"rtl":"ltr"}),i.a.createElement(Wr,{dragPreviewRenderer:l,nodeRenderer:u})))})),ao=$n("node",{drop:(e,t,n)=>{("touch"===e.drag||tr.isFF)&&n.stopScroll(),t.getItem().dropSelection()},hover:(e,t,n)=>{if("touch"!==e.drag&&!tr.isFF)return;const r=t.getClientOffset();if(null===r)return;const o=n.getListElement();if(null===o)return;const i=o.getBoundingClientRect();((t,r,o)=>{const i=Math.abs(t-o),s=Math.abs(t-r);if(s>40&&i>40||i<=40&&s<=40)return void n.stopScroll();var a,c,u,l;a=s>20&&s<=40,u=i<=20,l=s<=20,(c=i>20&&i<=40)||a?"touch"===e.drag?n.startScroll(c?-5:5):n.startScroll(c?-2:2):(u||l)&&("touch"===e.drag?n.startScroll(u?-10:10):n.startScroll(u?-5:5))})(r.y,i.bottom,i.top)}},(e,t)=>({connectDropTarget:e.dropTarget(),isOver:t.isOver()}))(so);const co=Object(G.b)((function(e){return{renderList:Ut(e),orderedNodes:Ht(e),isMultiSelecting:Rt(e),selectedIds:At(e),scrollToId:Dt(e)}}),(function(e){return Object(nn.b)({startMultiSelect:gt,stopMultiSelect:vt,setFocusedNode:bt,processDropTarget:dt,onMoveCursorToNext:ct,onMoveCursorToPrevious:at,onMultiSelectPrevious:ut,onMultiSelectNext:lt},e)}),null,{context:Cr})(ao),uo={delayTouchStart:100};function lo(e){ +const{canBeAddedToSelection:t,initState:n,onSelect:r,canMove:s,onDrop:a,onMove:c,nodes:u,selectedIds:l,onKeyboardSelect:d,saga:h,lastFocusedNodeObject:f,lastSyncTimestampRef:p,scrollToId:g,...v}=e,[b,m]=Object(o.useState)(null);return Object(o.useEffect)(()=>{const e=Object(U.b)();m(function(e){const t=Object(nn.a)(e);return Object(nn.e)(cn,t)}(e));const o=e.run(tn,{initState:n,onKeyboardSelect:d,saga:h,canMove:s,onMove:c,onDrop:a,onSelect:r,canBeAddedToSelection:t});return()=>o.cancel()},[]),Object(o.useEffect)(()=>(null!==b&&u&&(p&&(p.current=performance.now()),b.dispatch((e=>({type:Fe,nodes:e}))(u))),()=>{}),[b,u]),Object(o.useEffect)(()=>{null!==b&&l&&b.dispatch(ft(l))},[b,l]),Object(o.useEffect)(()=>{null!==b&&(null==f?void 0:f.id)&&b.dispatch(bt(f.id))},[b,f]),null===b?null:i.a.createElement(ho,{store:b,scrollToId:g,...v})}const ho=i.a.memo((function(e){const{store:t,scrollToId:n,...r}=e,s="touch"===e.drag?Pe:ye;return Object(o.useEffect)(()=>{var e;t.dispatch(mt(null!==(e=null==n?void 0:n.id)&&void 0!==e?e:null))},[n]),i.a.createElement(Ae.a,{backend:s,options:uo},i.a.createElement(G.a,{store:t,context:Cr},i.a.createElement(co,{...r})))}));function fo(e,t){Object(H.trackEvent)("Object Tree",e,t)}function po(e){return e.length>1?"Multi select":e[0].gaLabel()}function go(e){return Object(U.c)(t=>{const n={};return e.onChange().subscribe(n,()=>t({type:Ue})),e.onGroupCreated().subscribe(n,e=>t(Ot(e,!0))),e.selection().onChange().subscribe(n,e=>t(ft(e))),()=>{e.onChange().unsubscribeAll(n),e.selection().onChange().unsubscribeAll(n),e.onGroupCreated().unsubscribeAll(n)}},U.a.expanding())}function*vo(){for(;;)yield Object(T.g)([We,Ke]),fo("Select","Arrow")}function*bo(){for(;;){const{mode:e}=yield Object(T.g)(nt);1===e&&fo("Multi select","Ctrl"),2===e&&fo("Multi select","Shift")}}function*mo(e){for(;;){yield Object(T.g)(Ve);const{node:t,dropType:n}=Et(yield Object(T.f)());if(t){const r=Bt(yield Object(T.f)()),o=r.map(t=>Object(j.ensureNotNull)(e.entity(t.id)));let i="Drag";1===t.level&&"inside"!==n&&r.some(e=>2===e.level)?i="From the group":2!==t.level&&"inside"!==n||!r.some(e=>1===e.level)?1===r.length&&r[0].parentId!==t.parentId&&(i="Existing pane"):i="To the group",fo(i,po(o))}}}function*yo(e){yield Object(T.d)(vo),yield Object(T.d)(bo),yield Object(T.d)(mo,e)}function*Oo(e){yield Object(T.d)(yo,e);const t=yield Object(T.b)(go,e);on.logNormal("Opened object tree data source channel");try{for(;;){const e=yield Object(T.g)(t);yield Object(T.e)(e)}}finally{on.logNormal("Closed object tree data source channel"),t.close()}}var So=n("5VQP");const wo=o.createContext(null);var _o=n("XAms"),Co=n("9S1y"),To=n("h5pj");const Eo=E.mobiletouch?"touch":"native";function jo(e){const{viewModel:t,showHeader:n=!0,nodeRenderer:r,isDialog:s=!1}=e,a=Object(o.useRef)(null),c=function(e){const[t,n]=Object(o.useState)(e.getChartId()),r=Object(o.useRef)(t);return r.current=t,Object(o.useEffect)(()=>{return e.onChange().subscribe(null,t),()=>{e.onChange().unsubscribe(null,t)};function t(){const t=e.getChartId();r.current!==t&&n(t)}},[]),t +}(t),[u,l]=Object(Co.a)(),[d,h]=Object(o.useState)(null),f=Object(o.useMemo)(()=>({isTouch:E.touch,isDialog:s}),[s]);return i.a.createElement(wo.Provider,{value:f},i.a.createElement(P.Provider,{value:{viewModel:t}},i.a.createElement("div",{className:To.wrap,onContextMenu:_o.b},n&&i.a.createElement(z,null),i.a.createElement(C.a,{onMeasure:u},i.a.createElement("div",{className:To.space,onClick:function(e){if(e.defaultPrevented)return;if(!(e.target instanceof Element)||null===a.current)return;e.target===a.current&&t.selection().set([])}},null!==l&&i.a.createElement(lo,{key:c,height:l.height,width:l.width,canBeAddedToSelection:function(e){const n=t.entity(e);return t.selection().canBeAddedToSelection(n)},nodeRenderer:r,initState:function(){const{nodes:e,selection:n}=t.getState();return{selectedIds:n,nodes:e}},canMove:function(e,n,r){return t.isSelectionDropable(n.id,r)},drag:Eo,rowHeight:Do,onSelect:function(e){const n=e.map(e=>t.entity(e)).filter(e=>null!==e);t.selection().set(n);const r=So.ContextMenuManager.getShown();r&&r.hide()},onDrop:function(e){e.preventDefault();const{detail:{target:n,type:r}}=e;t.insertSelection(n,r)},scrollToId:d,saga:function*(){yield Object(T.d)(Oo,t)},onKeyboardSelect:function(e){h({id:e})},outerRef:function(e){a.current=e}}))))))}function Do(e,t){switch(t.type){case"node":return 38;case"separator":return 13}}var Io,ko=n("Kxc7");!function(e){e.Svg="svg",e.Text="text"}(Io||(Io={}));var Mo=n("wHCJ"),xo=n("WcWV");function No(e){const{className:t,disabled:n,...r}=e;return i.a.createElement(k.a,{className:I()(xo.button,n&&xo.disabled,t),...r})}var Po=n("To8B"),Ao=n("tyJc"),Lo=n("20cQ"),Ro=n("zn4F"),Bo=n("U+QY"),Fo=n("gSe6");function Ho(e){const{id:t}=e,n=Object(o.useContext)(P),{viewModel:r}=Object(j.ensureNotNull)(n),s=r.entity(t);return null===s?null:i.a.createElement(zo,{...e,entity:s})}function zo(e){const{id:t,isOffset:n,isDisabled:r,isSelected:s,isChildOfSelected:a,isHovered:c,parentId:u,entity:l,isExpanded:d}=e,h=Object(o.useContext)(P),f=Object(o.useContext)(wo),{size:p}=Object(o.useContext)(br),[g,v]=Object(o.useState)(!1),b=Object(o.useRef)(null),[m,O]=Object(o.useState)(l.title()),[S,w]=Object(o.useState)(l.isLocked()),[_,C]=Object(o.useState)(l.isVisible()),[T,E]=Object(o.useState)(l.isActualInterval()),[I,M]=Object(o.useState)(!1),[x,N]=Object(o.useState)(!1),A=Object(o.useRef)(null);Object(o.useEffect)(()=>{const e={};l.onLockChanged().subscribe(e,()=>w(l.isLocked())),l.onVisibilityChanged().subscribe(e,()=>C(l.isVisible()));const t=l.onTitleChanged();return t&&t.subscribe(e,()=>O(l.title())),l.onIsActualIntervalChange().subscribe(e,()=>E(l.isActualInterval())),()=>{l.onIsActualIntervalChange().unsubscribeAll(e),l.onLockChanged().unsubscribeAll(e),l.onVisibilityChanged().unsubscribeAll(e),t&&t.unsubscribeAll(e),A.current&&clearTimeout(A.current)}},[l]),Object(o.useEffect)(()=>{g&&b.current&&(b.current.focus(),b.current.setSelectionRange(0,m.length))},[g]),Object(o.useEffect)(()=>{const e={};return L.hoveredObjectChanged().subscribe(e,Z),()=>{ +L.hoveredObjectChanged().unsubscribeAll(e)}},[d]),Object(o.useEffect)(()=>{L.setHoveredObject(c?t:null)},[c]),Object(o.useEffect)(()=>{!s&&A.current&&(clearTimeout(A.current),A.current=null),v(!1)},[s]);const{viewModel:L}=Object(j.ensureNotNull)(h),R=!_||S,B=l.getIcon(),F={};if(u){const e=L.entity(u);e&&(F["data-parent-name"]=e.title()),F["data-type"]=l.hasChildren()?"group":"data-source"}const H=ko.enabled("test_show_object_tree_debug")?`<${l.id()}> (${l.zOrder()})`:l.title(),z=c||I,U=g&&s,G=!!f&&f.isTouch,V=!!f&&f.isDialog,K=T&&_?Ro:Bo,W=l.hasChildren()?y.t("Group is hidden on current interval"):y.t("Drawing is hidden on current interval");return i.a.createElement("span",{className:D(Fo.wrap,R&&Fo.modifier,r&&Fo.disabled,s&&Fo.selected,n&&Fo.offset,a&&Fo.childOfSelected,I&&!r&&!s&&!a&&Fo.hover,V&&!r&&!s&&!a&&Fo.dialog),onMouseDown:function(e){g&&!Object(j.ensureNotNull)(b.current).contains(e.target)&&N(!0)},onClick:1===p?q:function(e){if(e.defaultPrevented)return;if(0!==Object(pr.modifiersFromEvent)(e))return;if(A.current)e.preventDefault(),clearTimeout(A.current),A.current=null,L.openProperties(l),N(!1);else{const e=L.selection().selected();A.current=setTimeout(()=>{A.current=null,s&&!x&&1===e.length&&L.rename(l,()=>v(!0)),N(!1)},500)}},onContextMenu:G?void 0:q},!U&&i.a.createElement(o.Fragment,null,B&&B.type===Io.Svg&&i.a.createElement(k.a,{icon:B.content||"",className:Fo.icon}),B&&B.type===Io.Text&&i.a.createElement("span",{className:D(Fo.icon,Fo.textIcon)},B.content),i.a.createElement("span",{className:D(Fo.title,L.isMain(l)&&Fo.main,(!l.isVisible()||!T)&&Fo.disabled),...F},H),(z||S||!_||G||!T)&&i.a.createElement("span",{className:D(Fo.rightButtons,l.canBeRemoved()&&Fo.twoButtons,l.canBeLocked()&&(z||S)&&Fo.threeButtons)},l.canBeLocked()&&(z||S)&&i.a.createElement(No,{icon:S?Ao:Lo,className:D(Fo.button,Fo.lockButton),onClick:function(e){if(e.defaultPrevented)return;e.preventDefault(),L.setIsLocked(t,!l.isLocked())},"data-role":"button","data-name":"lock","data-active":S}),(z||!_||!T)&&i.a.createElement(No,{icon:K,className:D(Fo.button,Fo.viewButton,!T&&[Fo.warn,"apply-common-tooltip"]),onClick:T?function(e){if(e.defaultPrevented)return;e.preventDefault(),L.setIsVisible(t,!l.isVisible())}:void 0,title:T?void 0:W,disabled:!T,"data-role":"button","data-name":"hide","data-active":!_}),l.canBeRemoved()&&(G||z)&&i.a.createElement(No,{icon:Po,className:D(Fo.button,Fo.removeButton),onClick:function(e){if(e.defaultPrevented)return;e.preventDefault(),e.stopPropagation(),L.remove(t)},"data-role":"button","data-name":"remove"}))),U&&i.a.createElement(Mo.a,{value:m,onChange:function(e){O(e.currentTarget.value)},onClick:_o.a,className:Fo.renameInput,onKeyDown:function(e){27===Object(pr.hashFromEvent)(e)?(e.preventDefault(),O(l.title()),v(!1)):13===Object(pr.hashFromEvent)(e)&&(e.preventDefault(),Y())},reference:function(e){b.current=e},onBlur:Y,onDragStart:function(e){e.preventDefault(),e.stopPropagation()},draggable:!0,stretch:!0}));function q(e){e.defaultPrevented||g||(e.preventDefault(),e.persist(), +L.openContextMenu(l,()=>v(!0),e))}function Y(){""!==m&&l.setName(m),O(l.title()),v(!1)}function Z(e){if(l.hasChildren()&&!d){const t=null!==e&&l.childrenIds().has(e);M(t)}else M(t===e)}}var Uo=n("4/GM");class Go extends i.a.PureComponent{constructor(e){super(e),this._isMounted=!1,this._dialogRef=i.a.createRef(),this._renderChildren=e=>i.a.createElement(Vo,{isSmallTablet:e,viewModel:this.props.viewModel}),this._handleMediaChange=()=>{this.state.showDrawer&&!window.matchMedia(S.a.TabletSmall).matches&&this.setState({showDrawer:!1})},this._onManageDrawings=e=>{throw new Error("not supported")},this._closeDrawer=()=>{this.setState({showDrawer:!1})},this._handleContextMenuOpened=e=>{this.setState({isContextMenuOpened:e})},this._matchMedia=window.matchMedia(S.a.TabletSmall),this.state={showDrawer:!1,showDialog:!1,isContextMenuOpened:!1}}componentDidMount(){this._isMounted=!0,this._matchMedia.addListener(this._handleMediaChange),this.props.viewModel.isContextMenuOpened().subscribe(this._handleContextMenuOpened)}componentWillUnmount(){this._isMounted=!1,this._matchMedia.removeListener(this._handleMediaChange),this.props.viewModel.isContextMenuOpened().unsubscribe(this._handleContextMenuOpened)}render(){return i.a.createElement(i.a.Fragment,null,i.a.createElement(m.a,{rule:S.a.TabletSmall},e=>i.a.createElement(O.a,{additionalElementPos:"after",additionalHeaderElement:!1,className:Uo.dialog,dataName:"object-tree-dialog",isOpened:!0,onClickOutside:this.state.showDialog||e||this.state.isContextMenuOpened?()=>{}:this.props.onClose,onClose:this.props.onClose,ref:this._dialogRef,render:()=>this._renderChildren(e),title:Object(y.t)("Object tree"),showSeparator:!0})),i.a.createElement(b.b,null,this.state.showDrawer&&i.a.createElement(v.a,{onClose:this._closeDrawer,position:"Bottom"},i.a.createElement(w.a,{onClose:this._closeDrawer,chartWidget:this.props.activeChartWidget,isMobile:!0}))))}}function Vo(e){const{isSmallTablet:t,viewModel:n}=e,r=Object(o.useMemo)(()=>({size:t?1:0,smallSizeTreeNodeAction:0}),[t]);return i.a.createElement(br.Provider,{value:r},i.a.createElement(jo,{nodeRenderer:Ho,showHeader:!1,viewModel:n,isDialog:!0}))}var Ko=n("eqEH"),Wo=n("vPbs"),qo=n("aIyQ"),Yo=n.n(qo);function Zo(e){return e}var Jo=n("QrSB");function Xo(e,t){return`${e}:${t}`}class Qo{constructor(e){this._onChange=new Yo.a,this._recalculate=()=>{const e=this._groupModel.groups().map(e=>Xo(e.id,e.instanceId)),t=this._selectionApi.allSources();this._selected=this._selected.filter(n=>e.includes(n)||t.includes(n)),this._onChange.fire(this._selected)},this._model=e,this._selectionApi=new Jo.SelectionApi(this._model),this._groupModel=this._model.lineToolsGroupModel(),this._selected=this._getSelectedIds(),this._selectionApi.onChanged().subscribe(this,()=>{this._selected=this._getSelectedIds(),this._onChange.fire(this._selected)}),this._groupModel.onChanged().subscribe(this,this._recalculate)}destroy(){this._selectionApi.onChanged().unsubscribeAll(this),this._groupModel.onChanged().unsubscribeAll(this)}set(e){const t=[];let n=e.map(e=>e.id()) +;for(const r of e)if(r.hasChildren()){const e=r.childrenIds();t.push(...Array.from(e.values()).map(Zo)),n=n.filter(t=>!e.has(t))}else t.push(r.id());this._selectionApi.set(t),this._selected=n,this._onChange.fire(this._selected)}canBeAddedToSelection(e){return null!==e&&e.canBeAddedToSelection()}onChange(){return this._onChange}selected(){return this._selected}_getSelectedIds(){return this._selectionApi.allSources().filter(e=>{const t=this._model.dataSourceForId(e);return null!==t&&t.showInObjectTree()})}}class $o{constructor(e,t){this._controller=e,this._facade=t,this._groupModel=e.model().lineToolsGroupModel()}buildTree(){const e={};for(const t of this._controller.model().panes()){const n=t.sourcesByGroup().all().filter(e=>e.showInObjectTree());e[t.id()]=ei(t.id(),0);for(const n of this._groupModel.groups()){const r=Xo(n.id,n.instanceId),o=Object(j.ensureNotNull)(this._facade.getObjectById(r));if(o.pane()===t){const r=[...n.lineTools()].sort((e,t)=>e.zorder()>t.zorder()?-1:1).map(e=>e.id());e[o.id()]=ei(o.id(),1,t.id(),r),e[t.id()].children.push(o.id());for(const t of r)e[t]=ei(t,2,o.id())}}for(const r of n)e[r.id()]||(e[r.id()]=ei(r.id(),1,t.id()),e[t.id()].children.push(r.id()));e[t.id()].children.sort((e,t)=>{const n=Object(j.ensureNotNull)(this._facade.getObjectById(e)),r=Object(j.ensureNotNull)(this._facade.getObjectById(t));return Object(j.ensureNotNull)(r.zOrder())-Object(j.ensureNotNull)(n.zOrder())})}return this._facade.invalidateCache(new Set(Object.keys(e))),e}}function ei(e,t,n,r=[]){return{id:e,level:t,parentId:n,children:r}}var ti=n("CW80"),ni=n("3ClC"),ri=n("fgLi"),oi=n("HZKX"),ii=n("Vbka"),si=n("dDxv"),ai=n("NhaM");const ci=Object(y.t)("Show {sourceTitle}"),ui=Object(y.t)("Hide {sourceTitle}"),li=Object(y.t)("Lock {sourceTitle}"),di=Object(y.t)("Unlock {sourceTitle}"),hi=Object(y.t)("Change {sourceType} title to {newSourceTitle}");function fi(e,t){return t.every(t=>!(t.pane()!==e&&!t.allowsMovingbetweenPanes()))}function pi(e){return e instanceof ri.DataSource&&e.showInObjectTree()?e.id():null}const gi=new Yo.a;class vi{constructor(e,t){this._syncStateChanged=new Yo.a,this._linkKeyChangedBound=this._linkKeyChanged.bind(this),this._undoModel=e,this._dataSource=t,Object(ti.isLineTool)(this._dataSource)&&this._dataSource.linkKey().subscribe(this._linkKeyChangedBound)}destroy(){Object(ti.isLineTool)(this._dataSource)&&this._dataSource.linkKey().unsubscribe(this._linkKeyChangedBound)}id(){return this._dataSource.id()}title(){return Object(ti.isLineTool)(this._dataSource)?this._dataSource.properties().title.value()||this._dataSource.translatedType():this._dataSource.title()}gaLabel(){return Object(ni.isStudy)(this._dataSource)?"Study":Object(ti.isLineTool)(this._dataSource)?"Drawing":"Symbol"}canBeLocked(){return Object(ti.isLineTool)(this._dataSource)&&this._dataSource.userEditEnabled()}canBeRemoved(){return this._undoModel.mainSeries()!==this._dataSource&&this._dataSource.isUserDeletable()}canBeHidden(){return this._dataSource.canBeHidden()}canBeRenamed(){return Object(ti.isLineTool)(this._dataSource)} +isVisible(){return this._dataSource.properties().visible.value()}isActualInterval(){return!Object(ti.isLineTool)(this._dataSource)&&!Object(ni.isStudy)(this._dataSource)||this._dataSource.isActualInterval()}onIsActualIntervalChange(){return Object(ti.isLineTool)(this._dataSource)||Object(ni.isStudy)(this._dataSource)?this._dataSource.onIsActualIntervalChange():gi}isLocked(){return!!Object(ti.isLineTool)(this._dataSource)&&this._dataSource.properties().frozen.value()}onVisibilityChanged(){return this._dataSource.properties().visible.listeners()}onLockChanged(){return Object(ti.isLineTool)(this._dataSource)?this._dataSource.properties().frozen.listeners():gi}getIcon(){const e=d,t=this._dataSource.getSourceIcon(),n=Object(ni.isStudyStrategy)(this._dataSource);let r={type:Io.Svg,content:n?ii:si};if(e&&t)if("loadSvg"===t.type){const[n,o]=t.svgId.split("."),i="linetool"===n?e.linetool[o]:e.series[Number(o)];r={type:Io.Svg,content:i||si}}else"text"===t.type&&(r={type:Io.Text,content:t.text});return r}setVisible(e){const t=(e?ci:ui).format({sourceTitle:this._dataSource.title()});this._undoModel.setProperty(this._dataSource.properties().visible,e,t)}setLocked(e){if(Object(ti.isLineTool)(this._dataSource)){const t=(e?li:di).format({sourceTitle:this._dataSource.translatedType()});this._undoModel.setProperty(this._dataSource.properties().frozen,e,t)}}setName(e){if(Object(ti.isLineTool)(this._dataSource)){const t=hi.format({sourceType:this._dataSource.properties().title.value()||this._dataSource.title(),newSourceTitle:e});this._undoModel.setProperty(this._dataSource.properties().title,e,t)}}isCopiable(){return this._dataSource.copiable()}isClonable(){return this._dataSource.cloneable()}zOrder(){return this._dataSource.zorder()}remove(){this._undoModel.removeSource(this._dataSource,!1)}canBeAddedToSelection(){return this._undoModel.selection().canBeAddedToSelection(this._dataSource)}setAsSelection(){this._undoModel.model().selectionMacro(e=>{e.clearSelection(),e.addSourceToSelection(this._dataSource)})}addToSelection(){this._undoModel.model().selectionMacro(e=>{e.addSourceToSelection(this._dataSource)})}addSourcesToArray(e){return e.push(this._dataSource),e}insertSourcesBeforeThis(e){this._insertSources(e,e=>this._undoModel.insertBefore(e,this._dataSource))}insertSourcesAfterThis(e){this._insertSources(e,e=>this._undoModel.insertAfter(e,this._dataSource))}childrenIds(){return new Set}hasChildren(){return!1}pane(){return Object(j.ensureNotNull)(this._undoModel.model().paneForSource(this._dataSource))}allowsMovingbetweenPanes(){return!Object(ti.isLineTool)(this._dataSource)}canBeAddedToGroup(){return Object(ti.isLineTool)(this._dataSource)}canInsertBeforeThis(e){return this._canInsertBeforeOrAfter(e)}canInsertAfterThis(e){return this._canInsertBeforeOrAfter(e)}detachFromParent(){if(Object(ti.isLineTool)(this._dataSource)){const e=this._undoModel.model(),t=this._undoModel.lineToolsGroupController(),n=e.lineToolsGroupModel().groupForLineTool(this._dataSource);null!==n&&t.excludeLineToolFromGroup(n,this._dataSource)}}onTitleChanged(){ +const e=this._dataSource.properties().title;return e?e.listeners():void 0}canBeSyncedInLayout(){return Object(ti.isLineTool)(this._dataSource)&&this._dataSource.isSynchronizable()}onSyncStateChanged(){return this._syncStateChanged}setDrawingSyncState(e){if(!this.canBeSyncedInLayout())return;const t=this._dataSource;switch(e){case 0:if(null===t.linkKey().value())return;this._undoModel.unlinkLines([t]);break;case 1:if(null!==t.linkKey().value())return;this._undoModel.copyToOtherCharts([t])}}getDrawingSyncState(){return this.canBeSyncedInLayout()?null!==this._dataSource.linkKey().value()?1:0:null}_linkKeyChanged(){this._syncStateChanged.fire(Object(j.ensureNotNull)(this.getDrawingSyncState()))}_canInsertBeforeOrAfter(e){const t=this._undoModel.model();if(!fi(this.pane(),e))return!1;if(Object(ti.isLineTool)(this._dataSource)){if(null!==t.lineToolsGroupModel().groupForLineTool(this._dataSource)&&e.some(e=>!e.canBeAddedToGroup()))return!1}return!0}_insertSources(e,t){const n=this._undoModel.model(),r=this._undoModel.lineToolsGroupController();this._undoModel.beginUndoMacro("Insert source(s) after");const o=()=>{e.forEach(e=>e.detachFromParent())},i=e.reduce((e,t)=>t.addSourcesToArray(e),[]);if(Object(ti.isLineTool)(this._dataSource)){const t=n.lineToolsGroupModel().groupForLineTool(this._dataSource);null!==t?(Object(j.assert)(!e.some(e=>e.hasChildren())),i.forEach(e=>{Object(ti.isLineTool)(e)&&(t.containsLineTool(e)||r.addLineToolToGroup(t,e))})):o()}else o();t(i),this._undoModel.endUndoMacro()}}class bi{constructor(e,t){this._onTitleChanged=new Yo.a,this._onVisibilityChanged=new Yo.a,this._onLockChanged=new Yo.a,this._onIsActualIntervalChanged=new Yo.a,this._syncStateChanged=new Yo.a,this._linkKeyChangedBound=this._linkKeyChanged.bind(this),this._undoModel=e,this._group=t,this._lineTools=t.lineTools(),this._paneId=Object(j.ensureNotNull)(e.model().paneForSource(this._lineTools[0])).id();const n=()=>{this._lineTools.forEach(e=>{e.properties().visible.listeners().subscribe(this,()=>this._onVisibilityChanged.fire()),e.properties().frozen.listeners().subscribe(this,()=>this._onLockChanged.fire()),e.onIsActualIntervalChange().subscribe(this,()=>this._onIsActualIntervalChanged.fire())}),this._lineTools.length>0&&this._lineTools[0].linkKey().subscribe(this._linkKeyChangedBound)};this._group.onChanged().subscribe(this,e=>{this._unsubscribeFromAllLineTools(),this._lineTools=this._group.lineTools(),n(),e.lockedChanged&&this._onLockChanged.fire(),e.visibilityChanged&&this._onVisibilityChanged.fire(),e.titleChanged&&this._onTitleChanged.fire(),e.isActualIntervalChanged&&this._onIsActualIntervalChanged.fire()}),n(),this._lastActualZOrder=this.zOrder(),this._lastIsVisible=this.isVisible(),this._lastIsActualInterval=this.isActualInterval(),this._lastIsLocked=this.isLocked()}destroy(){this._unsubscribeFromAllLineTools(),this._group.onChanged().unsubscribeAll(this)}id(){return Xo(this._group.id,this._group.instanceId)}title(){return this._group.name()}gaLabel(){return"Group"}getIcon(){return{type:Io.Svg,content:ai}}canBeRemoved(){return!0 +}canBeHidden(){return!0}canBeLocked(){return!0}canBeRenamed(){return!0}isVisible(){return this._group.lineTools().length>0&&(this._lastIsVisible="Invisible"!==this._group.visibility()),this._lastIsVisible}isActualInterval(){return this._group.lineTools().length>0&&(this._lastIsActualInterval=this._group.lineTools().some(e=>e.isActualInterval())),this._lastIsActualInterval}onIsActualIntervalChange(){return this._onIsActualIntervalChanged}isLocked(){return this._group.lineTools().length>0&&(this._lastIsLocked="Locked"===this._group.locked()),this._lastIsLocked}onTitleChanged(){return this._onTitleChanged}onVisibilityChanged(){return this._onVisibilityChanged}onLockChanged(){return this._onLockChanged}setVisible(e){this._undoModel.lineToolsGroupController().setGroupVisibility(this._group,e)}setLocked(e){this._undoModel.lineToolsGroupController().setGroupLock(this._group,e)}setName(e){this._undoModel.lineToolsGroupController().setGroupName(this._group,e)}isCopiable(){return!1}isClonable(){return!1}zOrder(){return this._group.lineTools().length>0&&(this._lastActualZOrder=this._group.lineTools()[0].zorder()),this._lastActualZOrder}remove(){this._undoModel.lineToolsGroupController().removeGroup(this._group)}canBeAddedToSelection(){const e=this._undoModel.model();return this._lineTools.every(t=>e.selection().canBeAddedToSelection(t))}setAsSelection(){this._undoModel.model().selectionMacro(e=>{e.clearSelection(),this._lineTools.forEach(t=>e.addSourceToSelection(t))})}addToSelection(){this._undoModel.model().selectionMacro(e=>{this._lineTools.forEach(t=>e.addSourceToSelection(t))})}addSourcesToArray(e){return e.push(...this._lineTools),e}detachFromParent(){}insertSourcesBeforeThis(e){const t=this._insertBeforeTarget();this._insertSources(e,e=>this._undoModel.insertBefore(e,t))}insertSourcesAfterThis(e){const t=this._insertAfterTarget();this._insertSources(e,e=>this._undoModel.insertAfter(e,t))}childrenIds(){const e=[...this._lineTools];return e.sort((e,t)=>t.zorder()-e.zorder()),new Set(e.map(e=>e.id()))}hasChildren(){return!0}pane(){return Object(j.ensureDefined)(this._undoModel.model().panes().find(e=>e.id()===this._paneId))}allowsMovingbetweenPanes(){return!1}canBeAddedToGroup(){return!1}canInsertBeforeThis(e){return this._canInsertBeforeOrAfter(e)}canInsertAfterThis(e){return this._canInsertBeforeOrAfter(e)}canBeSyncedInLayout(){return this._lineTools.length>0&&this._lineTools[0].isSynchronizable()}onSyncStateChanged(){return this._syncStateChanged}setDrawingSyncState(e){if(!this.canBeSyncedInLayout())return;const t=this._lineTools[0];switch(e){case 0:if(null===t.linkKey().value())return;this._undoModel.unlinkLines([t]);break;case 1:if(null!==t.linkKey().value())return;this._undoModel.copyToOtherCharts([t])}}getDrawingSyncState(){if(!this.canBeSyncedInLayout())return null;return null!==this._lineTools[0].linkKey().value()?1:0}_linkKeyChanged(){this._syncStateChanged.fire(Object(j.ensureNotNull)(this.getDrawingSyncState()))}_canInsertBeforeOrAfter(e){return fi(this.pane(),e)}_insertSources(e,t){ +this._undoModel.beginUndoMacro("Insert source(s) after");const n=e.reduce((e,t)=>t.addSourcesToArray(e),[]);e.forEach(e=>e.detachFromParent()),t(n),this._undoModel.endUndoMacro()}_insertBeforeTarget(){return Object(j.ensureNotNull)(this._lineTools.reduce((e,t)=>null===e?t:e.zorder()null===e?t:e.zorder()>t.zorder()?e:t,null))}_unsubscribeFromAllLineTools(){this._lineTools.forEach(e=>{e.properties().visible.listeners().unsubscribeAll(this),e.properties().frozen.listeners().unsubscribeAll(this),e.onIsActualIntervalChange().unsubscribeAll(this)}),this._lineTools.length>0&&this._lineTools[0].linkKey().unsubscribe(this._linkKeyChangedBound)}}class mi{constructor(e){this._hoveredObjectChanged=new Yo.a,this._entitiesCache=new Map,this._undoModel=e,this._undoModel.model().hoveredSourceChanged().subscribe(this,this._onModelHoveredSourceChanged)}destroy(){for(const e of this._entitiesCache.values())null==e||e.destroy()}getObjectById(e){if(this._entitiesCache.has(e))return Object(j.ensureDefined)(this._entitiesCache.get(e));const t=this._createObjectById(e);return this._entitiesCache.set(e,t),t}invalidateCache(e){Array.from(this._entitiesCache.keys()).forEach(t=>{var n;e.has(t)||(null===(n=this._entitiesCache.get(t))||void 0===n||n.destroy(),this._entitiesCache.delete(t))})}canBeGroupped(e){if(0===e.length||1===e.length&&e[0].hasChildren())return!1;const t=[];if(e.forEach(e=>e.addSourcesToArray(t)),t.some(e=>!Object(ti.isLineTool)(e)))return!1;const n=this._undoModel.model(),r=t.map(e=>n.paneForSource(e));return new Set(r).size<2}contextMenuActions(e,t,n){const r=new oi.ActionsProvider(e,n),o=[];return t.forEach(e=>e.addSourcesToArray(o)),r.contextMenuActionsForSources(o)}insertBefore(e,t){t.insertSourcesAfterThis(e)}insertAfter(e,t){t.insertSourcesBeforeThis(e)}setHoveredObject(e){const t=this._undoModel.model();if(null===e)return void t.setHoveredSource(null,null);const n=t.dataSourceForId(e);null!==n&&t.setHoveredSource(n,null)}hoveredObjectId(){return pi(this._undoModel.model().hoveredSource())}hoveredObjectChanged(){return this._hoveredObjectChanged}_onModelHoveredSourceChanged(e){this._hoveredObjectChanged.fire(pi(e))}_createObjectById(e){const t=function(e){return 2===e.split(":").length}(e)?function(e){const t=e.split(":");return{persistentId:t[0],instanceId:t[1]}}(e).persistentId:e,n=this._undoModel.model(),r=n.dataSourceForId(t);if(null!==r)return new vi(this._undoModel,r);const o=n.lineToolsGroupModel().groupForId(t);return null!==o?new bi(this._undoModel,o):null}}var yi=n("7ktv"),Oi=n("7KDR"),Si=n("zRdu"),wi=n("hY0g"),_i=n.n(wi),Ci=n("fs3R"),Ti=n("qckB"),Ei=n("dmHa"),ji=n("ffaL"),Di=n("GjMU"),Ii=n("aVjL");const ki=Object(u.getLogger)("Platform.GUI.ObjectTree");function Mi(e){return e instanceof yi.PriceDataSource}class xi{constructor(e){this._nodes={},this._onChange=new Yo.a,this._onGroupCreated=new Yo.a,this._subscriptions=[],this._removeSourcesPromise=null,this._timeout=null,this._objects=[],this._options={ +general:!0,mainSeries:!0,mainSeriesTrade:!0,esdStudies:!0,fundamentals:!0,studies:!0,lineTools:!0,publishedCharts:!0,ordersAndPositions:!0,alerts:!1,chartEvents:!0,objectTree:!1,gotoLineTool:!0},this._isContextMenuOpened=new _i.a(!1),this._getObjectsToModify=e=>{const t=this.selection().selected();return t.find(t=>t===e)?t.map(this._ensuredEntity):[this._ensuredEntity(e)]},this._onActiveChartChanged=()=>{this._cleanup(),this._init()},this._cleanup=()=>{null!==this._timeout&&(clearTimeout(this._timeout),this._timeout=null),this._subscriptions.forEach(e=>{e.unsubscribeAll(this)}),this._selection.destroy(),this._chart.unsubscribe(this._onActiveChartChanged),null!==this._removeSourcesPromise&&this._removeSourcesPromise.cancel(),this._facade.destroy()},this._init=()=>{this._controller=this._chart.value().model(),this._groupController=this._controller.lineToolsGroupController(),this._model=this._controller.model(),this._groupModel=this._model.lineToolsGroupModel(),this._facade=new mi(this._controller),this._subscriptions=[this._model.mainSeries().onStyleChanged(),this._model.mainSeries().dataEvents().symbolResolved(),this._model.mainSeries().onIntervalChanged(),this._model.panesCollectionChanged(),this._model.dataSourceCollectionChanged(),this._groupModel.onChanged()],this._subscriptions.forEach(e=>{e.subscribe(this,this._update)}),this._chart.subscribe(this._onActiveChartChanged),this._selection=new Qo(this._model),this._update()},this._update=()=>{null===this._timeout&&(this._timeout=setTimeout(()=>{this._recalculateTree(),this._onChange.fire(),this._timeout=null}))},this._ensuredEntity=e=>Object(j.ensureNotNull)(this._getEntityById(e)),this._chart=e,this._init()}destroy(){this._cleanup()}getState(){return{nodes:Object.values(this._nodes),selection:this._selection.selected()}}getChartId(){return this._chart.value().id()}insertSelection(e,t){const n=this._facade,r=this.selection().selected().map(this._ensuredEntity),[o,i]=this._normalizeTargetAndDropType(e,t);this._controller.withMacro(Object(y.t)("Move objects"),()=>{switch(i){case"before":n.insertBefore(r,o);break;case"after":n.insertAfter(r,o)}}),this._update()}entity(e){return this._facade.getObjectById(e)}isMain(e){return e.id()===this._controller.mainSeries().id()}selection(){return this._selection}setIsLocked(e,t){const n=this._getObjectsToModify(e),r=(t?Object(y.t)("Lock"):Object(y.t)("Unlock"))+" "+Object(y.t)("objects");this._controller.withMacro(r,()=>{for(const e of n)e.setLocked(t)}),fo("Lock",po(n))}setIsVisible(e,t){const n=this._getObjectsToModify(e),r=(t?Object(y.t)("Show"):Object(y.t)("Hide"))+" "+Object(y.t)("objects");this._controller.withMacro(r,()=>{for(const e of n)e.setVisible(t)}),fo("Hide",po(n))}remove(e){const t=()=>{this._controller.withMacro(Object(y.t)("Remove objects"),()=>{for(const e of n)e.remove()}),fo("Delete",po(n)),this._update()},n=this._getObjectsToModify(e);t()}canSelectionBeGrouped(){const e=this._getSelectedEntities();return this._facade.canBeGroupped(e)}createGroupFromSelection(){ +const e=this._groupController.createGroupFromSelection();fo("Create Group");const t=Xo(e.id,e.instanceId);this.selection().set([this._ensuredEntity(t)]),this._onGroupCreated.fire(t),this._update()}isSelectionDropable(e,t){const n=this.selection().selected().map(this._ensuredEntity),[r,o]=this._normalizeTargetAndDropType(e,t);switch(o){case"after":return r.canInsertAfterThis(n);case"before":return r.canInsertBeforeThis(n)}}onChange(){return this._onChange}onGroupCreated(){return this._onGroupCreated}isSelectionCloneable(){const e=this._getSelectedEntities();return e.length>0&&e.every(e=>e.isClonable())}isSelectionCopiable(){const e=this._getSelectedEntities();return e.length>0&&e.every(e=>e.isCopiable())}openProperties(e){const t=this._model.dataSourceForId(e.id());this.selection().set([e]),null!==t&&(this._controller.mainSeries()===t?this._chart.value().showGeneralChartProperties():(Object(ti.isLineTool)(t)||Object(ni.isStudy)(t))&&this._chart.value().showChartPropertiesForSource(t))}canSelectionBeUnmerged(){const e=this._getSelectedEntities();return 1===e.length&&this.canNodeWithIdBeUnmerged(e[0].id())}canNodeWithIdBeUnmerged(e){const t=this._model.dataSourceForId(e);return null!==t&&Mi(t)&&this._model.isUnmergeAvailableForSource(t)}unmergeSelectionUp(){this._unmergeSelection(0)}unmergeSelectionDown(){this._unmergeSelection(1)}copySelection(){const e=this._getSelectedEntities(),t=e.map(e=>Object(j.ensureNotNull)(this._model.dataSourceForId(e.id())));this._chart.value().chartWidgetCollection().clipboard.uiRequestCopy(t),fo("Copy",po(e))}cloneSelection(){const e=this._getSelectedEntities(),t=e.map(e=>Object(j.ensureNotNull)(this._model.dataSourceForId(e.id())));t.every(ti.isLineTool)&&(this._controller.cloneLineTools([...t],!1),fo("Clone",po(e)))}rename(e,t){const n=this._getObjectsToModify(e.id());1===n.length&&n.some(e=>e.canBeRenamed())&&(t(),fo("Rename",po(n)))}async openContextMenu(e,t,n){this._objects=this._getObjectsToModify(e.id());const r=this._facade.canBeGroupped(this._objects);let o;if(this._objects.some(e=>e.hasChildren()))o=this._getActionsForGroupItem(e,t,r);else{const e=await this._facade.contextMenuActions(this._chart.value(),this._objects,this._options);if(o=Array.from(e).filter((e,t,n)=>e.type!==Si.a.Separator||!n[t+1]||n[t+1].type!==Si.a.Separator),1===this._objects.length&&this._objects[0].canBeRenamed()){const e=o.findIndex(e=>"Copy"===e.id);o.splice(-1===e?o.length:e+1,0,this._getRenameAction(t))}if(r){const e=o.findIndex(e=>"Clone"===e.id);o.splice(-1===e?0:e,0,this._getGroupAction())}}o.length>0&&(this._chart.value().updateActions(),So.ContextMenuManager.createMenu(o,{takeFocus:!0,returnFocus:!0},()=>{this._isContextMenuOpened.setValue(!1)}).then(e=>{e.show(n),this._isContextMenuOpened.setValue(!0)}))}setHoveredObject(e){this._facade.setHoveredObject(e)}hoveredObjectChanged(){return this._facade.hoveredObjectChanged()}getNextNodeIdAfterRemove(e){var t;const{nodes:n}=this.getState(),r=n.find(t=>t.id===e),o=this.entity(e);if(!(r&&r.parentId&&o&&o.canBeRemoved()))return null +;if((null===(t=o.pane().mainDataSource())||void 0===t?void 0:t.id())===e&&!this.canNodeWithIdBeUnmerged(e)){const e=n.filter(e=>0===e.level).map(e=>e.id),t=this._takeNextOrPrevElement(e,r.parentId);return Object(j.ensureDefined)(n.find(e=>e.id===t)).children[0]}const i=Object(j.ensureDefined)(n.find(e=>e.id===r.parentId)).children;return 1===i.length?this.getNextNodeIdAfterRemove(r.parentId):this._takeNextOrPrevElement(i,e)}isContextMenuOpened(){return this._isContextMenuOpened.readonly()}_takeNextOrPrevElement(e,t){const n=e.indexOf(t);return e[n===e.length-1?n-1:n+1]}_getGroupAction(){return new Oi.Action({label:Object(y.t)("Create a group of drawings"),icon:B,onExecute:()=>{this.createGroupFromSelection()}})}_getRenameAction(e){return new Oi.Action({label:Object(y.t)("Rename"),icon:Di,onExecute:()=>{e(),fo("Context menu rename",po(this._objects))}})}_getActionsForGroupItem(e,t,n){const r=[new Oi.Action({label:e.isLocked()?Object(y.t)("Unlock"):Object(y.t)("Lock"),icon:e.isLocked()?Ci:Ti,onExecute:()=>this.setIsLocked(e.id(),!e.isLocked())}),new Oi.Action({label:e.isVisible()?Object(y.t)("Hide"):Object(y.t)("Show"),icon:e.isVisible()?Ei:ji,onExecute:()=>this.setIsVisible(e.id(),!e.isVisible())}),new Oi.Action({label:Object(y.t)("Remove"),icon:Ii,onExecute:()=>this.remove(e.id()),hotkeyHash:pr.isMacKeyboard?8:46})];return 1===this._objects.length&&(r.unshift(new Oi.Separator),r.unshift(this._getRenameAction(t))),n&&(r.unshift(new Oi.Separator),r.unshift(this._getGroupAction())),r}_unmergeSelection(e){const t=this._getSelectedEntities();if(1!==t.length)throw new Error("Only one object can be unmerged");const n=t[0],r=Object(j.ensureNotNull)(this._model.dataSourceForId(n.id()));if(!Mi(r))throw new Error("Entity is not IPriceDataSource");(0===e?this._controller.unmergeSourceUp:this._controller.unmergeSourceDown).call(this._controller,r);fo(0===e?"New pane above":"New pane below",po([n]))}_recalculateTree(){const e=new $o(this._controller,this._facade);this._nodes=e.buildTree()}_normalizeTargetAndDropType(e,t){let n=this._ensuredEntity(e);return"inside"===t&&(t="before",n=Object(j.ensureNotNull)(this.entity([...n.childrenIds()].shift()||""))),[n,t]}_getSelectedEntities(){const{selected:e,removed:t}=this._selection.selected().reduce((e,t)=>{const n=this._getEntityById(t);return n?(e.selected.push(n),e):(e.removed.push(t),e)},{selected:[],removed:[]});return t.length&&ki.logWarn("Detected dangling sources in selection. They will be ignored: "+JSON.stringify(t)),e}_getEntityById(e){return this._facade.getObjectById(e)}}var Ni=n("sQaR");n.d(t,"ObjectTreeDialogRenderer",(function(){return Pi}));class Pi extends Ni.a{constructor(){super(),this._handleClose=()=>{s.unmountComponentAtNode(this._container),this._setVisibility(!1),null!==this._viewModel&&(this._viewModel.destroy(),this._viewModel=null)};const e=Object(Ko.service)(Wo.CHART_WIDGET_COLLECTION_SERVICE);this._activeChartWidget=e.activeChartWidget.value(),this._viewModel=new xi(e.activeChartWidget)}hide(){this._handleClose()}isVisible(){return this.visible().value()} +show(){g().then(()=>{null!==this._viewModel&&(s.render(o.createElement(Go,{onClose:this._handleClose,viewModel:this._viewModel,activeChartWidget:this._activeChartWidget}),this._container),this._setVisibility(!0))})}}},yY3h:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.makeRequestCallFromTimer=o,t.makeRequestCallFromMutationObserver=i,t.makeRequestCall=void 0;const n=void 0!==e?e:self,r=n.MutationObserver||n.WebKitMutationObserver;function o(e){return function(){const t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}function i(e){let t=1;const n=new r(e),o=document.createTextNode("");return n.observe(o,{characterData:!0}),function(){t=-t,o.data=t}}const s="function"==typeof r?i:o;t.makeRequestCall=s}).call(this,n("yLpj"))},zn4F:function(e,t){e.exports=''},zztK:function(e,t){e.exports=''}}]); \ No newline at end of file diff --git a/charting_library/bundles/object-tree-dialog.8e2b7eb9ba2f1dbfbc11.js b/charting_library/bundles/object-tree-dialog.8e2b7eb9ba2f1dbfbc11.js deleted file mode 100644 index ef59f493..00000000 --- a/charting_library/bundles/object-tree-dialog.8e2b7eb9ba2f1dbfbc11.js +++ /dev/null @@ -1,58 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([["object-tree-dialog"],{"+5L9":function(e,t){e.exports=''},"+KIV":function(e,t){e.exports=''},"02pg":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n("q1tI"),o=n("TSYQ"),i=n("XiJV");function s(e){return r.createElement("div",{className:o(i.separator,e.className)})}},"20cQ":function(e,t){e.exports=''},"4/GM":function(e,t,n){e.exports={dialog:"dialog-3q1-PXu-",button:"button-3q1-PXu-"}},"4ceR":function(e,t,n){e.exports={dropTargetInside:"dropTargetInside-3UxYcxls",dropTarget:"dropTarget-3UxYcxls",before:"before-3UxYcxls",after:"after-3UxYcxls"}},ASyk:function(e,t,n){e.exports={"tablet-normal-breakpoint":"screen and (max-width: 768px)","small-height-breakpoint":"screen and (max-height: 360px)","tablet-small-breakpoint":"screen and (max-width: 428px)"}},"B6/a":function(e,t){e.exports=''},DGxW:function(e,t,n){e.exports={separator:"separator-3U2Wf-wc",tree:"tree-3U2Wf-wc",overlayScrollWrap:"overlayScrollWrap-3U2Wf-wc",listContainer:"listContainer-3U2Wf-wc"}},EqDG:function(e,t,n){"use strict";var r=n("aKzv"),o="dnd-core/INIT_COORDS",i="dnd-core/BEGIN_DRAG",s="dnd-core/PUBLISH_DRAG_SOURCE",a="dnd-core/HOVER",c="dnd-core/DROP",l="dnd-core/END_DRAG";function u(e,t){return{type:o,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,t,n){return t.split(".").reduce((function(e,t){return e&&e[t]?e[t]:n||null}),e)}function f(e,t){return e.filter((function(e){return e!==t}))}function p(e){return"object"===d(e)}function g(e,t){var n=new Map,r=function(e){n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r) -;var o=[];return n.forEach((function(e,t){1===e&&o.push(t)})),o}var v={type:o,payload:{clientOffset:null,sourceClientOffset:null}};function b(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{publishSource:!0},r=n.publishSource,o=void 0===r||r,s=n.clientOffset,a=n.getSourceClientOffset,c=e.getMonitor(),l=e.getRegistry();e.dispatch(u(s)),m(t,c,l);var d=S(t,c);if(null!==d){var h=null;if(s){if(!a)throw new Error("getSourceClientOffset must be defined");y(a),h=a(d)}e.dispatch(u(s,h));var f=l.getSource(d),p=f.beginDrag(c,d);if(null!=p){O(p),l.pinSource(d);var g=l.getSourceType(d);return{type:i,payload:{itemType:g,item:p,sourceId:d,clientOffset:s||null,sourceClientOffset:h||null,isSourcePublic:!!o}}}}else e.dispatch(v)}}function m(e,t,n){Object(r.a)(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach((function(e){Object(r.a)(n.getSource(e),"Expected sourceIds to be registered.")}))}function y(e){Object(r.a)("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}function O(e){Object(r.a)(p(e),"Item must be an object.")}function S(e,t){for(var n=null,r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}function w(e){return function(){if(e.getMonitor().isDragging())return{type:s}}}function _(e,t){return null===t?null===e:Array.isArray(e)?e.some((function(e){return e===t})):e===t}function C(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.clientOffset;T(t);var o=t.slice(0),i=e.getMonitor(),s=e.getRegistry();E(o,i,s);var c=i.getItemType();return D(o,s,c),j(o,i,s),{type:a,payload:{targetIds:o,clientOffset:r||null}}}}function T(e){Object(r.a)(Array.isArray(e),"Expected targetIds to be an array.")}function E(e,t,n){Object(r.a)(t.isDragging(),"Cannot call hover while not dragging."),Object(r.a)(!t.didDrop(),"Cannot call hover after drop.");for(var o=0;o=0;r--){var o=e[r];_(t.getTargetType(o),n)||e.splice(r,1)}}function j(e,t,n){e.forEach((function(e){n.getTarget(e).hover(t,e)}))}function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},n=e.getMonitor(),r=e.getRegistry();N(n);var o=A(n);o.forEach((function(o,i){var s=P(o,i,r,n),a={type:c,payload:{dropResult:k(k({},t),s)}};e.dispatch(a)}))}}function N(e){Object(r.a)(e.isDragging(),"Cannot call drop while not dragging."),Object(r.a)(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function P(e,t,n,o){var i=n.getTarget(e),s=i?i.drop(o,e):void 0;return function(e){Object(r.a)(void 0===e||p(e),"Drop result must either be an object or undefined.")}(s),void 0===s&&(s=0===t?{}:o.getDropResult()),s}function A(e){var t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function L(e){return function(){var t=e.getMonitor(),n=e.getRegistry();!function(e){Object(r.a)(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);var o=t.getSourceId();null!=o&&(n.getSource(o,!0).endDrag(t,o),n.unpinSource());return{type:l}}}function R(e,t){for(var n=0;n0;r.backend&&(e&&!r.isSetUp?(r.backend.setup(),r.isSetUp=!0):!e&&r.isSetUp&&(r.backend.teardown(),r.isSetUp=!1))},this.store=t,this.monitor=n,t.subscribe(this.handleRefCountChange)}var t,n,r;return t=e,(n=[{key:"receiveBackend",value:function(e){this.backend=e}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var e=this,t=this.store.dispatch,n=function(e){return{beginDrag:b(e),publishDragSource:w(e),hover:C(e),drop:x(e),endDrag:L(e)}}(this);return Object.keys(n).reduce((function(r,o){var i,s=n[o];return r[o]=(i=s,function(){for(var n=arguments.length,r=new Array(n),o=0;o2&&void 0!==arguments[2]?arguments[2]:H;if(e.length!==t.length)return!1;for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:W,t=arguments.length>1?arguments[1]:void 0,n=t.payload;switch(t.type){case o:case i:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case a:return z(e.clientOffset,n.clientOffset)?e:V(V({},e),{},{clientOffset:n.clientOffset});case l:case c:return W;default:return e}}var Y="dnd-core/ADD_SOURCE",X="dnd-core/ADD_TARGET",J="dnd-core/REMOVE_SOURCE",Z="dnd-core/REMOVE_TARGET";function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:te,t=arguments.length>1?arguments[1]:void 0,n=t.payload;switch(t.type){case i:return $($({},e),{},{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case s:return $($({},e),{},{isSourcePublic:!0});case a:return $($({},e),{},{targetIds:n.targetIds});case Z:return-1===e.targetIds.indexOf(n.targetId)?e:$($({},e),{},{targetIds:f(e.targetIds,n.targetId)});case c:return $($({},e),{},{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case l:return $($({},e),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function re(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Y:case X:return e+1;case J:case Z:return e-1;default:return e}}var oe=[],ie=[];function se(e,t){return e!==oe&&(e===ie||void 0===t||(n=e,t.filter((function(e){return n.indexOf(e)>-1}))).length>0);var n}function ae(){var e=arguments.length>1?arguments[1]:void 0;switch(e.type){case a:break;case Y:case X:case Z:case J:return oe;case i:case s:case l:case c:default:return ie}var t=e.payload,n=t.targetIds,r=void 0===n?[]:n,o=t.prevTargetIds,u=void 0===o?[]:o,d=g(r,u),h=d.length>0||!U(r,u);if(!h)return oe;var f=u[u.length-1],p=r[r.length-1];return f!==p&&(f&&d.push(f),p&&d.push(p)),d}function ce(){ -var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e+1}function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ue(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:ae(e.dirtyHandlerIds,{type:t.type,payload:ue(ue({},t.payload),{},{prevTargetIds:h(e,"dragOperation.targetIds",[])})}),dragOffset:q(e.dragOffset,t),refCount:re(e.refCount,t),dragOperation:ne(e.dragOperation,t),stateId:ce(e.stateId)}}function fe(e,t){return{x:e.x-t.x,y:e.y-t.y}}function pe(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{handlerIds:void 0},o=n.handlerIds;Object(r.a)("function"==typeof e,"listener must be a function."),Object(r.a)(void 0===o||Array.isArray(o),"handlerIds, when specified, must be an array of strings.");var i=this.store.getState().stateId,s=function(){var n=t.store.getState(),r=n.stateId;try{r===i||r===i+1&&!se(n.dirtyHandlerIds,o)||e()}finally{i=r}};return this.store.subscribe(s)}},{key:"subscribeToOffsetChange",value:function(e){var t=this;Object(r.a)("function"==typeof e,"listener must be a function.");var n=this.store.getState().dragOffset;return this.store.subscribe((function(){var r=t.store.getState().dragOffset;r!==n&&(n=r,e())}))}},{key:"canDragSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e);return Object(r.a)(t,"Expected to find a valid source. sourceId=".concat(e)),!this.isDragging()&&t.canDrag(this,e)}},{key:"canDropOnTarget",value:function(e){if(!e)return!1;var t=this.registry.getTarget(e);return Object(r.a)(t,"Expected to find a valid target. targetId=".concat(e)),!(!this.isDragging()||this.didDrop())&&_(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}},{key:"isDragging",value:function(){return Boolean(this.getItemType())}},{key:"isDraggingSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e,!0) -;return Object(r.a)(t,"Expected to find a valid source. sourceId=".concat(e)),!(!this.isDragging()||!this.isSourcePublic())&&this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}},{key:"isOverTarget",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shallow:!1};if(!e)return!1;var n=t.shallow;if(!this.isDragging())return!1;var r=this.registry.getTargetType(e),o=this.getItemType();if(o&&!_(r,o))return!1;var i=this.getTargetIds();if(!i.length)return!1;var s=i.indexOf(e);return n?s===i.length-1:s>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return e=this.store.getState().dragOffset,r=e.clientOffset,o=e.initialClientOffset,i=e.initialSourceClientOffset,r&&o&&i?fe((n=i,{x:(t=r).x+n.x,y:t.y+n.y}),o):null;var e,t,n,r,o,i}},{key:"getDifferenceFromInitialOffset",value:function(){return e=this.store.getState().dragOffset,t=e.clientOffset,n=e.initialClientOffset,t&&n?fe(t,n):null;var e,t,n}}])&&pe(t.prototype,n),o&&pe(t,o),e}(),be=0;function me(e){return(me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ye(e,t){t&&Array.isArray(e)?e.forEach((function(e){return ye(e,!1)})):Object(r.a)("string"==typeof e||"symbol"===me(e),t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(ge||(ge={}));var Oe=n("b7DX"),Se=[],we=[],_e=Oe.a.makeRequestCallFromTimer((function(){if(we.length)throw we.shift()}));function Ce(e){var t;(t=Se.length?Se.pop():new Te).task=e,Object(Oe.a)(t)}var Te=function(){function e(){}return e.prototype.call=function(){try{this.task.call()}catch(e){Ce.onerror?Ce.onerror(e):(we.push(e),_e())}finally{this.task=null,Se[Se.length]=this}},e}();function Ee(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]&&arguments[1];Object(r.a)(this.isSourceId(e),"Expected a valid source ID.");var n=t&&e===this.pinnedSourceId,o=n?this.pinnedSource:this.dragSources.get(e);return o}},{key:"getTarget",value:function(e){return Object(r.a)(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}},{key:"getSourceType",value:function(e){ -return Object(r.a)(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}},{key:"getTargetType",value:function(e){return Object(r.a)(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}},{key:"isSourceId",value:function(e){return ke(e)===ge.SOURCE}},{key:"isTargetId",value:function(e){return ke(e)===ge.TARGET}},{key:"removeSource",value:function(e){var t=this;Object(r.a)(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:J,payload:{sourceId:e}}}(e)),Ce((function(){t.dragSources.delete(e),t.types.delete(e)}))}},{key:"removeTarget",value:function(e){Object(r.a)(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:Z,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}},{key:"pinSource",value:function(e){var t=this.getSource(e);Object(r.a)(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}},{key:"unpinSource",value:function(){Object(r.a)(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(e,t,n){var r=Ie(e);return this.types.set(r,t),e===ge.SOURCE?this.dragSources.set(r,n):e===ge.TARGET&&this.dropTargets.set(r,n),r}}])&&Ee(t.prototype,n),o&&Ee(t,o),e}();function Ne(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=Pe(r),i=new ve(o,new xe(o)),s=new B(o,i),a=e(s,t,n);return s.receiveBackend(a),s}function Pe(e){var t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return Object(F.e)(he,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}n.d(t,"a",(function(){return Ne}))},EvtC:function(e,t,n){e.exports={button:"button-2YcRd2gv"}},FadI:function(e,t,n){"use strict";function r(e){if(!s(e))throw e}function o(e){return(null==e?void 0:e.aborted)?Promise.reject(i()):new Promise((t,n)=>{null==e||e.addEventListener("abort",()=>n(i()),{once:!0})})}function i(){return new DOMException("Aborted","AbortError")}function s(e){return e instanceof Error&&"AbortError"===e.name}function a(e,t){return Promise.race([o(e),t])}async function c(e,t){let n;try{await a(e,new Promise(e=>{n=setTimeout(e,t)}))}finally{clearTimeout(n)}}n.d(t,"c",(function(){return r})),n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return c}))},GjMU:function(e,t){e.exports=''},ItnF:function(e,t,n){e.exports={dialog:"dialog-2cMrvu9r", -wrapper:"wrapper-2cMrvu9r",separator:"separator-2cMrvu9r"}},JEhF:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return h}));var r=n("nKUr"),o=n("q1tI"),i=n("EqDG"),s=n("p/5y");function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var u=0,d=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__"),h=Object(o.memo)((function(e){var t=e.children,n=a(function(e){if("manager"in e){return[{dragDropManager:e.manager},!1]}var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f(),n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=t;o[d]||(o[d]={dragDropManager:Object(i.a)(e,t,n,r)});return o[d]}(e.backend,e.context,e.options,e.debugMode),n=!e.context;return[t,n]}(l(e,["children"])),2),c=n[0],h=n[1];return Object(o.useEffect)((function(){if(h){var e=f();return++u,function(){0==--u&&(e[d]=null)}}}),[]),Object(r.jsx)(s.a.Provider,Object.assign({value:c},{children:t}),void 0)}));function f(){return void 0!==e?e:window}}).call(this,n("yLpj"))},NhaM:function(e,t){e.exports=''},"U+QY":function(e,t){ -e.exports=''},Vbka:function(e,t){e.exports=''},WcWV:function(e,t,n){e.exports={button:"button-2zRC9WmY",disabled:"disabled-2zRC9WmY"}},XiJV:function(e,t,n){e.exports={separator:"separator-3No0pWrk"}},Z3xJ:function(e,t){e.exports=''},aKzv:function(e,t,n){"use strict";function r(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;oObject(c.t)("{drawingsCount} drawing",{plural:"{drawingsCount} drawings",count:e}).format({ -drawingsCount:e.toString()});Object(l.getLogger)("Chart.ManageDrawings");class m extends r.PureComponent{constructor(e){super(e),this._totalCount=0,this._model=null,this._symbolDrawingsMap=null,this._storageContentLoadingPromise=null,this._onItemClick=e=>{""!==e&&(this.props.chartWidget.setSymbol(e),null!==this._model&&this.setState({currentSymbol:e}),this.props.onClose&&this.props.onClose())},this._onRemove=async e=>{if(this._model&&this._symbolDrawingsMap){const t=this._symbolDrawingsMap.get(e);if(t){const n=Array.from(t).map(e=>Object(o.ensureNotNull)(this._model).model().dataSourceForId(e)).filter(h.notNull);if(n.length>0){const t=Object(c.t)("Remove all line tools for")+" "+e;this._model.removeSources(n,!1,t)}this._updateItems()}}},this._updateItems=async()=>{if(null!==this._model){const e=await this._getItems(this._model.model().dataSources());this.setState({items:e})}},this._updateTheme=()=>{const e=a.watchedTheme.value();this.setState({theme:e})},this.state={currentSymbol:null,items:null,theme:a.watchedTheme.value()}}componentDidMount(){this.props.chartWidget.withModel(this,async()=>{this._model=this.props.chartWidget.model(),this._model.model().dataSourceCollectionChanged().subscribe(this,this._updateItems);const e=await this._getItems(this._model.model().dataSources());this.setState({currentSymbol:this._model.mainSeries().symbol(),items:e},()=>{var e,t;return null===(t=(e=this.props).onInitialized)||void 0===t?void 0:t.call(e)})}),a.watchedTheme.subscribe(this._updateTheme)}componentWillUnmount(){a.watchedTheme.unsubscribe(this._updateTheme),null!==this._model&&this._model.model().dataSourceCollectionChanged().unsubscribe(this,this._updateItems)}render(){const{isMobile:e}=this.props,{currentSymbol:t,items:n}=this.state,o=this._symbolDrawingsMap?this._symbolDrawingsMap.size:0,i=`${s=o,Object(c.t)("{symbolsCount} symbol",{plural:"{symbolsCount} symbols",context:"symbols_and_drawings_count",count:s}).format({symbolsCount:s.toString()})} ${(e=>Object(c.t)("with {drawingsCount} drawing",{plural:"with {drawingsCount} drawings",context:"symbols_and_drawings_count",count:e}).format({drawingsCount:e.toString()}))(this._totalCount)}`;var s;return r.createElement(r.Fragment,null,r.createElement("div",{className:v.title},i),null===n||0===n.length?this._renderEmptyContent():n.map(n=>r.createElement(d.a,{key:n.symbol,title:n.symbol,subtitle:b(n.drawingsCount),removeBtnLabel:Object(c.t)("Remove all drawings for this symbol"),isActive:n.symbol===t,isMobile:e,onClick:this._onItemClick.bind(this,n.symbol),onClickRemove:this._onRemove.bind(this,n.symbol),showFavorite:!1})))}_renderEmptyContent(){const{theme:e}=this.state,t=e===s.a.Dark?g:p;return null===this._symbolDrawingsMap?r.createElement(f.a,null):r.createElement("div",{className:v.empty},r.createElement(i.a,{className:v.image,icon:t}),r.createElement("span",null,Object(c.t)("No drawings yet")))}async _getStorageContent(){return new Map}async _getItems(e){const t=[],n=this._getSymbolDrawingsMap(e);return(await this._getStorageContent()).forEach((e,t)=>{ -const r=n.get(t)||new Set;e.forEach(e=>r.add(e)),n.set(t,r)}),this._symbolDrawingsMap=n,this._totalCount=0,this._symbolDrawingsMap.forEach((e,n)=>{t.push({symbol:n,drawingsCount:e.size}),this._totalCount=this._totalCount+e.size}),t.sort((e,t)=>e.drawingsCount===t.drawingsCount?e.symbol.localeCompare(t.symbol):e.drawingsCount>t.drawingsCount?-1:1)}_getSymbolDrawingsMap(e){const t=new Map;return e.forEach(e=>{var n;if(Object(u.isLineTool)(e)&&e.showInObjectTree()){const r=null!==(n=e.symbol())&&void 0!==n?n:"",o=t.get(r)||new Set;o.add(e.id()),t.set(r,o)}}),t}}},b7DX:function(e,t,n){"use strict";(function(e){function r(e){i.length||(o(),!0),i[i.length]=e}n.d(t,"a",(function(){return r}));var o,i=[],s=0;function a(){for(;s1024){for(var t=0,n=i.length-s;t'},ffaL:function(e,t){e.exports=''},g89m:function(e,t,n){"use strict" -;var r=n("q1tI"),o=n.n(r),i=n("Eyy1"),s=n("TSYQ"),a=n.n(s),c=n("/3z9"),l=n("d700"),u=n("WXjp"),d=n("02pg"),h=n("uhCe"),f=n("/KDZ"),p=n("pafz"),g=n("ZjKI"),v=n("FQhm"),b=n("Iivm");const m=o.a.createContext({setHideClose:()=>{}});var y=n("zztK"),O=n("px1m");function S(e){const{title:t,subtitle:n,showCloseIcon:i=!0,onClose:s,renderBefore:c,renderAfter:l,draggable:u,className:d,unsetAlign:h}=e,[f,p]=Object(r.useState)(!1);return o.a.createElement(m.Provider,{value:{setHideClose:p}},o.a.createElement("div",{className:a()(O.container,d,(n||h)&&O.unsetAlign)},c,o.a.createElement("div",{"data-dragg-area":u,className:O.title},o.a.createElement("div",{className:O.ellipsis},t),n&&o.a.createElement("div",{className:a()(O.ellipsis,O.subtitle)},n)),l,i&&!f&&o.a.createElement(b.a,{className:O.close,icon:y,onClick:s,"data-name":"close","data-role":"button"})))}var w=n("ItnF");n.d(t,"a",(function(){return T}));const _={vertical:20},C={vertical:0};class T extends o.a.PureComponent{constructor(){super(...arguments),this._controller=null,this._reference=null,this._renderChildren=(e,t)=>(this._controller=e,this.props.render({requestResize:this._requestResize,centerAndFit:this._centerAndFit,isSmallWidth:t})),this._handleReference=e=>this._reference=e,this._handleClose=()=>{this.props.onClose()},this._handleKeyDown=e=>{var t;if(!e.defaultPrevented)switch(this.props.onKeyDown&&this.props.onKeyDown(e),Object(c.hashFromEvent)(e)){case 27:if(e.defaultPrevented)return;if(this.props.forceCloseOnEsc&&this.props.forceCloseOnEsc())return void this._handleClose();const{activeElement:n}=document,r=Object(i.ensureNotNull)(this._reference);if(null!==n){if(e.preventDefault(),"true"===(t=n).getAttribute("data-haspopup")&&"true"!==t.getAttribute("data-expanded"))return void this._handleClose();if(Object(l.b)(n))return void r.focus();if(r.contains(n))return void this._handleClose()}}},this._requestResize=()=>{null!==this._controller&&this._controller.recalculateBounds()},this._centerAndFit=()=>{null!==this._controller&&this._controller.centerAndFit()}}componentDidMount(){v.subscribe(g.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._handleClose,null)}componentWillUnmount(){v.unsubscribe(g.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._handleClose,null)}focus(){Object(i.ensureNotNull)(this._reference).focus()}getElement(){return this._reference}contains(e){var t,n;return null!==(n=null===(t=this._reference)||void 0===t?void 0:t.contains(e))&&void 0!==n&&n}render(){const{className:e,headerClassName:t,isOpened:n,title:r,dataName:i,onClickOutside:s,additionalElementPos:c,additionalHeaderElement:l,backdrop:g,shouldForceFocus:v=!0,showSeparator:b,subtitle:m,draggable:y=!0,fullScreen:O=!1,showCloseIcon:T=!0,rounded:E=!0,isAnimationEnabled:D,growPoint:j,dialogTooltip:I,unsetHeaderAlign:k}=this.props,M="after"!==c?l:void 0,x="after"===c?l:void 0;return o.a.createElement(f.a,{rule:h.a.SmallHeight},c=>o.a.createElement(f.a,{rule:h.a.TabletSmall},l=>o.a.createElement(u.a,{rounded:!(l||O)&&E,className:a()(w.dialog,e),isOpened:n,reference:this._handleReference, -onKeyDown:this._handleKeyDown,onClickOutside:s,onClickBackdrop:s,fullscreen:l||O,guard:c?C:_,boundByScreen:l||O,shouldForceFocus:v,backdrop:g,draggable:y,isAnimationEnabled:D,growPoint:j,name:this.props.dataName,dialogTooltip:I},o.a.createElement("div",{className:w.wrapper,"data-name":i,"data-dialog-name":"string"==typeof r?r:""},void 0!==r&&o.a.createElement(S,{draggable:y&&!(l||O),onClose:this._handleClose,renderAfter:x,renderBefore:M,subtitle:m,title:r,showCloseIcon:T,className:t,unsetAlign:k}),b&&o.a.createElement(d.a,{className:w.separator}),o.a.createElement(p.a.Consumer,null,e=>this._renderChildren(e,l||O))))))}}},gSe6:function(e,t,n){e.exports={wrap:"wrap-3Onbn19L",dialog:"dialog-3Onbn19L",offset:"offset-3Onbn19L",title:"title-3Onbn19L",main:"main-3Onbn19L",disabled:"disabled-3Onbn19L",icon:"icon-3Onbn19L",textIcon:"textIcon-3Onbn19L",rightButtons:"rightButtons-3Onbn19L",twoButtons:"twoButtons-3Onbn19L",button:"button-3Onbn19L",viewButton:"viewButton-3Onbn19L",threeButtons:"threeButtons-3Onbn19L",lockButton:"lockButton-3Onbn19L",removeButton:"removeButton-3Onbn19L",warn:"warn-3Onbn19L",hover:"hover-3Onbn19L",expandHandle:"expandHandle-3Onbn19L",selected:"selected-3Onbn19L",childOfSelected:"childOfSelected-3Onbn19L",renameInput:"renameInput-3Onbn19L"}},gla1:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("q1tI");const o=()=>{const[,e]=Object(r.useReducer)((e,t)=>e+1,0);return e}},h5pj:function(e,t,n){e.exports={wrap:"wrap-3jZ5H2Ul",space:"space-3jZ5H2Ul",tree:"tree-3jZ5H2Ul"}},jPOK:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n("q1tI"),o=n("TSYQ"),i=n("Owlf");n("SzKR");function s(e){const t=o("tv-spinner","tv-spinner--shown","tv-spinner--size_"+(e.size||i.a));return r.createElement("div",{className:t,style:e.style,role:"progressbar"},r.createElement("div",{className:"tv-spinner__spinner-layer"},r.createElement("div",{className:"tv-spinner__background tv-spinner__width_element"}),r.createElement("div",{className:"tv-spinner__circle-clipper tv-spinner__width_element tv-spinner__circle-clipper--left"}),r.createElement("div",{className:"tv-spinner__circle-clipper tv-spinner__width_element tv-spinner__circle-clipper--right"})))}},leHx:function(e,t){ -e.exports=''},nkjW:function(e,t,n){e.exports={title:"title-2PJRtZNU",withoutIcon:"withoutIcon-2PJRtZNU",buttons:"buttons-2PJRtZNU",button:"button-2PJRtZNU",disabled:"disabled-2PJRtZNU"}},"p/5y":function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("q1tI"),o=Object(r.createContext)({dragDropManager:void 0})},"p0W+":function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n("q1tI"),o=n("TSYQ"),i=n("tU7i"),s=n("EvtC");const a=r.forwardRef((e,t)=>{const{className:n,...a}=e;return r.createElement(i.b,{...a,ref:t,className:o(n,s.button)})})},px1m:function(e,t,n){e.exports={"small-height-breakpoint":"screen and (max-height: 360px)",container:"container-2sL5JydP",unsetAlign:"unsetAlign-2sL5JydP",title:"title-2sL5JydP",subtitle:"subtitle-2sL5JydP",ellipsis:"ellipsis-2sL5JydP",close:"close-2sL5JydP"}},rlH3:function(e,t){ -e.exports=''},tyJc:function(e,t){e.exports=''},uhCe:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("ASyk");const o={SmallHeight:r["small-height-breakpoint"],TabletSmall:r["tablet-small-breakpoint"],TabletNormal:r["tablet-normal-breakpoint"]}},"x0D+":function(e,t,n){var r,o,i;o=[t],void 0===(i="function"==typeof(r=function(e){"use strict";function t(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);tPromise.resolve())}var l=n("txPx");const u=Object(l.getLogger)("DataSourcesIcons");let d=null;function h(){const e=n.c.zxD0 -;return e?Promise.resolve(e.exports.lineToolsIcons):n.e("line-tools-icons").then(n.bind(null,"zxD0")).then(e=>e.lineToolsIcons)}function f(){const e=n.c.EsZh;return e?Promise.resolve(e.exports.SERIES_ICONS):n.e("series-icons-map").then(n.bind(null,"EsZh")).then(e=>e.SERIES_ICONS)}let p=null;function g(){return null===p&&(p=function(){const e=c(h,2).then(e=>e).catch(e=>(u.logWarn(e),{})),t=c(f,2).then(e=>e).catch(e=>(u.logWarn(e),{}));return Promise.all([e,t])}()),p.then(e=>(d={linetool:e[0],series:e[1]},d))}var v=n("Sn4D"),b=n("mkWe"),m=n("/KDZ"),y=n("YFKU"),O=n("g89m"),S=n("uhCe"),w=n("b4AZ");var _=n("cvc5"),C=n.n(_),T=n("5rFJ"),E=n("8+VR"),D=n("Eyy1"),j=n("TSYQ"),I=n.n(j),k=n("Iivm"),M=n("N5tr"),x=n("82wv"),N=n("gla1");const P=o.createContext(null);var A=n("p0W+"),L=n("+KIV"),R=n("Z3xJ"),B=n("B6/a"),F=n("nkjW"),H=n("JWMC");function z(e){const{viewModel:t}=Object(D.ensureNotNull)(Object(o.useContext)(P)),n=Object(N.a)(),r=t.selection();Object(o.useEffect)(()=>{const e={};return t.onChange().subscribe(e,()=>n()),()=>{t.onChange().unsubscribeAll(e)}},[t]),Object(o.useEffect)(()=>{const e={};return r.onChange().subscribe(e,()=>n()),()=>{r.onChange().unsubscribeAll(e)}},[r]);const s=!t.canSelectionBeUnmerged(),a=t.isSelectionCopiable(),c=t.isSelectionCloneable(),l=!a&&!c,u=t.canSelectionBeGrouped();return i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:j(F.title,F.withoutIcon)},Object(y.t)("Object tree"),!1),i.a.createElement("div",{className:F.buttons},i.a.createElement(A.a,{className:j(F.button,!u&&F.disabled),icon:B,onClick:function(){t.createGroupFromSelection()},isDisabled:!u,title:Object(y.t)("Create a group of drawings"),"data-name":"group-button"}),i.a.createElement(x.a,{className:j(F.button,l&&F.disabled),isDisabled:l,content:i.a.createElement(k.a,{icon:L}),title:Object(y.t)("Clone, Copy"),arrow:!1,isShowTooltip:!0,"data-name":"copy-clone-button"},a&&i.a.createElement(M.b,{"data-name":"copy",label:Object(y.t)("Copy"),onClick:function(){t.copySelection()}}),c&&i.a.createElement(M.b,{"data-name":"clone",label:Object(y.t)("Clone"),onClick:function(){t.cloneSelection()}})),i.a.createElement(x.a,{className:j(F.button,s&&F.disabled),isDisabled:s,content:i.a.createElement(k.a,{icon:R}),title:Object(y.t)("Move to"),arrow:!1,isShowTooltip:!0,"data-name":"move-to-button"},i.a.createElement(M.b,{"data-name":"new-pane-above",label:Object(y.t)("New pane above"),onClick:function(){t.unmergeSelectionUp()}}),i.a.createElement(M.b,{"data-name":"new-pane-below",label:Object(y.t)("New pane below"),onClick:function(){t.unmergeSelectionDown()}}))))}var U=n("rRWa"),G=n("/MKj");function V(e){var t=null;return function(){return null==t&&(t=e()),t}}function K(e,t){for(var n=0;n0}},{key:"leave",value:function(e){var t,n,r=this.entered.length;return this.entered=(t=this.entered.filter(this.isNodeInDocument),n=e,t.filter((function(e){return e!==n}))),r>0&&0===this.entered.length}},{key:"reset",value:function(){this.entered=[]}}])&&K(t.prototype,n),r&&K(t,r),e}(),q=V((function(){return/firefox/i.test(navigator.userAgent)})),Y=V((function(){return Boolean(window.safari)}));function X(e,t){for(var n=0;ne))return n[a];l=a-1}}var d=e-t[s=Math.max(0,l)],h=d*d;return n[s]+r[s]*d+o[s]*h+i[s]*d*h}}])&&X(t.prototype,n),r&&X(t,r),e}();function Z(e){var t=1===e.nodeType?e:e.parentElement;if(!t)return null;var n=t.getBoundingClientRect(),r=n.top;return{x:n.left,y:r}}function Q(e){return{x:e.clientX,y:e.clientY}}function $(e,t,n,r,o){var i,s,a,c="IMG"===(i=t).nodeName&&(q()||!(null!==(s=document.documentElement)&&void 0!==s&&s.contains(i))),l=Z(c?e:t),u={x:n.x-l.x,y:n.y-l.y},d=e.offsetWidth,h=e.offsetHeight,f=r.anchorX,p=r.anchorY,g=function(e,t,n,r){var o=e?t.width:n,i=e?t.height:r;return Y()&&e&&(i/=window.devicePixelRatio,o/=window.devicePixelRatio),{dragPreviewWidth:o,dragPreviewHeight:i}}(c,t,d,h),v=g.dragPreviewWidth,b=g.dragPreviewHeight,m=o.offsetX,y=o.offsetY,O=0===y||y;return{x:0===m||m?m:new J([0,.5,1],[u.x,u.x/d*v,u.x+v-d]).interpolate(f),y:O?y:(a=new J([0,.5,1],[u.y,u.y/h*b,u.y+b-h]).interpolate(p),Y()&&c&&(a+=(window.devicePixelRatio-1)*b),a)}}var ee,te="__NATIVE_FILE__",ne="__NATIVE_URL__",re="__NATIVE_TEXT__",oe="__NATIVE_HTML__";function ie(e,t,n){var r=t.reduce((function(t,n){return t||e.getData(n)}),"");return null!=r?r:n}function se(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0, -configurable:!0,writable:!0}):e[t]=n,e}var ae=(se(ee={},te,{exposeProperties:{files:function(e){return Array.prototype.slice.call(e.files)},items:function(e){return e.items}},matchesTypes:["Files"]}),se(ee,oe,{exposeProperties:{html:function(e,t){return ie(e,t,"")}},matchesTypes:["Html","text/html"]}),se(ee,ne,{exposeProperties:{urls:function(e,t){return ie(e,t,"").split("\n")}},matchesTypes:["Url","text/uri-list"]}),se(ee,re,{exposeProperties:{text:function(e,t){return ie(e,t,"")}},matchesTypes:["Text","text/plain"]}),ee);function ce(e,t){for(var n=0;n-1}))}))[0]||null}function de(e,t){for(var n=0;n0&&o.actions.hover(t,{clientOffset:Q(e)}),t.some((function(e){return o.monitor.canDropOnTarget(e)}))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=o.getCurrentDropEffect())))},this.handleTopDragOverCapture=function(){o.dragOverTargetIds=[]},this.handleTopDragOver=function(e){var t=o.dragOverTargetIds;if(o.dragOverTargetIds=[],!o.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer&&(e.dataTransfer.dropEffect="none"));o.altKeyPressed=e.altKey,o.actions.hover(t||[],{clientOffset:Q(e)}),(t||[]).some((function(e){return o.monitor.canDropOnTarget(e)}))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=o.getCurrentDropEffect())):o.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=function(e){o.isDraggingNativeItem()&&e.preventDefault(),o.enterLeaveCounter.leave(e.target)&&o.isDraggingNativeItem()&&setTimeout((function(){return o.endDragNativeItem()}),0)},this.handleTopDropCapture=function(e){var t;(o.dropTargetIds=[],o.isDraggingNativeItem())&&(e.preventDefault(),null===(t=o.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer));o.enterLeaveCounter.reset()},this.handleTopDrop=function(e){var t=o.dropTargetIds;o.dropTargetIds=[],o.actions.hover(t,{clientOffset:Q(e)}),o.actions.drop({dropEffect:o.getCurrentDropEffect()}),o.isDraggingNativeItem()?o.endDragNativeItem():o.monitor.isDragging()&&o.actions.endDrag()},this.handleSelectStart=function(e){var t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},this.options=new he(n,r),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new W(this.isNodeInDocument)}var t,n,o;return t=e,(n=[{key:"profile",value:function(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:(null===(e=this.dragStartSourceIds)||void 0===e?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:(null===(t=this.dragOverTargetIds)||void 0===t?void 0:t.length)||0}}},{key:"window",get:function(){return this.options.window}},{key:"document",get:function(){return this.options.document}},{key:"rootElement",get:function(){return this.options.rootElement}},{key:"setup",value:function(){var e=this.rootElement;if(void 0!==e){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}},{ -key:"teardown",value:function(){var e,t=this.rootElement;void 0!==t&&(t.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&(null===(e=this.window)||void 0===e||e.cancelAnimationFrame(this.asyncEndDragFrameId)))}},{key:"connectDragPreview",value:function(e,t,n){var r=this;return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),function(){r.sourcePreviewNodes.delete(e),r.sourcePreviewNodeOptions.delete(e)}}},{key:"connectDragSource",value:function(e,t,n){var r=this;this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,n);var o=function(t){return r.handleDragStart(t,e)},i=function(e){return r.handleSelectStart(e)};return t.setAttribute("draggable","true"),t.addEventListener("dragstart",o),t.addEventListener("selectstart",i),function(){r.sourceNodes.delete(e),r.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",o),t.removeEventListener("selectstart",i),t.setAttribute("draggable","false")}}},{key:"connectDropTarget",value:function(e,t){var n=this,r=function(t){return n.handleDragEnter(t,e)},o=function(t){return n.handleDragOver(t,e)},i=function(t){return n.handleDrop(t,e)};return t.addEventListener("dragenter",r),t.addEventListener("dragover",o),t.addEventListener("drop",i),function(){t.removeEventListener("dragenter",r),t.removeEventListener("dragover",o),t.removeEventListener("drop",i)}}},{key:"addEventListeners",value:function(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}},{key:"removeEventListeners",value:function(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}},{key:"getCurrentSourceNodeOptions",value:function(){var e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return pe({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}},{key:"getCurrentDropEffect",value:function(){ -return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}},{key:"getCurrentSourcePreviewNodeOptions",value:function(){var e=this.monitor.getSourceId();return pe({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}},{key:"isDraggingNativeItem",value:function(){var e=this.monitor.getItemType();return Object.keys(r).some((function(t){return r[t]===e}))}},{key:"beginDragNativeItem",value:function(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(e,t){var n=new le(ae[e]);return n.loadDataTransfer(t),n}(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}},{key:"setCurrentDragSourceNode",value:function(e){var t=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.mouseMoveTimeoutTimer=setTimeout((function(){var e;return null===(e=t.rootElement)||void 0===e?void 0:e.addEventListener("mousemove",t.endDragIfSourceWasRemovedFromDOM,!0)}),1e3)}},{key:"clearCurrentDragSourceNode",value:function(){var e;return!!this.currentDragSourceNode&&(this.currentDragSourceNode=null,this.rootElement&&(null===(e=this.window)||void 0===e||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)),this.mouseMoveTimeoutTimer=null,!0)}},{key:"handleDragStart",value:function(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}},{key:"handleDragEnter",value:function(e,t){this.dragEnterTargetIds.unshift(t)}},{key:"handleDragOver",value:function(e,t){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}},{key:"handleDrop",value:function(e,t){this.dropTargetIds.unshift(t)}}])&&ve(t.prototype,n),o&&ve(t,o),e}(),ye=function(e,t,n){return new me(e,t,n)},Oe=n("aKzv");!function(e){e.mouse="mouse",e.touch="touch",e.keyboard="keyboard"}(be||(be={}));var Se=1,we=0;function _e(e){return void 0===e.button||e.button===we}function Ce(e){return!!e.targetTouches}function Te(e,t){return Ce(e)?function(e,t){return 1===e.targetTouches.length?Te(e.targetTouches[0]):t&&1===e.touches.length&&e.touches[0].target===t.target?Te(e.touches[0]):void 0}(e,t):{x:e.clientX,y:e.clientY}}var Ee=function(){var e=!1;try{addEventListener("test",(function(){}),Object.defineProperty({},"passive",{get:function(){return e=!0,!0}}))}catch(e){}return e}();function De(e,t){for(var n=0;n=o[s].start)&&(null==o[s].end||i<=o[s].end))return!0;return!1}(o._mouseClientOffset.x||0,o._mouseClientOffset.y||0,l.x,l.y,o.options.scrollAngleRanges))o._isScrolling=!0;else if(!o.monitor.isDragging()&&o._mouseClientOffset.hasOwnProperty("x")&&s&&(t=o._mouseClientOffset.x||0,n=o._mouseClientOffset.y||0,r=l.x,i=l.y,Math.sqrt(Math.pow(Math.abs(r-t),2)+Math.pow(Math.abs(i-n),2))>(o.options.touchSlop?o.options.touchSlop:0))&&(o.moveStartSourceIds=void 0,o.actions.beginDrag(s,{clientOffset:o._mouseClientOffset,getSourceClientOffset:o.getSourceClientOffset,publishSource:!1})),o.monitor.isDragging()){var u=o.sourceNodes.get(o.monitor.getSourceId()) -;o.installSourceNodeRemovalObserver(u),o.actions.publishDragSource(),e.cancelable&&e.preventDefault();var d=(a||[]).map((function(e){return o.targetNodes.get(e)})).filter((function(e){return!!e})),h=o.options.getDropTargetElementsAtPoint?o.options.getDropTargetElementsAtPoint(l.x,l.y,d):o.document.elementsFromPoint(l.x,l.y),f=[];for(var p in h)if(h.hasOwnProperty(p)){var g=h[p];for(f.push(g);g;)(g=g.parentElement)&&-1===f.indexOf(g)&&f.push(g)}var v=f.filter((function(e){return d.indexOf(e)>-1})).map((function(e){return o._getDropTargetId(e)})).filter((function(e){return!!e})).filter((function(e,t,n){return n.indexOf(e)===t}));if(c)for(var b in o.targetNodes){var m=o.targetNodes.get(b);if(u&&m&&m.contains(u)&&-1===v.indexOf(b)){v.unshift(b);break}}v.reverse(),o.actions.hover(v,{clientOffset:l})}}},this._getDropTargetId=function(e){for(var t=o.targetNodes.keys(),n=t.next();!1===n.done;){var r=n.value;if(e===o.targetNodes.get(r))return r;n=t.next()}},this.handleTopMoveEndCapture=function(e){o._isScrolling=!1,o.lastTargetTouchFallback=void 0,function(e){return void 0===e.buttons||0==(e.buttons&Se)}(e)&&(o.monitor.isDragging()&&!o.monitor.didDrop()?(e.cancelable&&e.preventDefault(),o._mouseClientOffset={},o.uninstallSourceNodeRemovalObserver(),o.actions.drop(),o.actions.endDrag()):o.moveStartSourceIds=void 0)},this.handleCancelOnEscape=function(e){"Escape"===e.key&&o.monitor.isDragging()&&(o._mouseClientOffset={},o.uninstallSourceNodeRemovalObserver(),o.actions.endDrag())},this.options=new Ie(r,n),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.sourceNodes=new Map,this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.targetNodes=new Map,this.listenerTypes=[],this._mouseClientOffset={},this._isScrolling=!1,this.options.enableMouseEvents&&this.listenerTypes.push(be.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(be.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(be.keyboard)}var t,n,r;return t=e,(n=[{key:"profile",value:function(){var e;return{sourceNodes:this.sourceNodes.size,sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,targetNodes:this.targetNodes.size,dragOverTargetIds:(null===(e=this.dragOverTargetIds)||void 0===e?void 0:e.length)||0}}},{key:"document",get:function(){return this.options.document}},{key:"setup",value:function(){this.document&&(Object(Oe.a)(!e.isSetUp,"Cannot have two Touch backends at the same time."),e.isSetUp=!0,this.addEventListener(this.document,"start",this.getTopMoveStartHandler()),this.addEventListener(this.document,"start",this.handleTopMoveStartCapture,!0),this.addEventListener(this.document,"move",this.handleTopMove),this.addEventListener(this.document,"move",this.handleTopMoveCapture,!0),this.addEventListener(this.document,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(this.document,"contextmenu",this.handleTopMoveEndCapture), -this.options.enableKeyboardEvents&&this.addEventListener(this.document,"keydown",this.handleCancelOnEscape,!0))}},{key:"teardown",value:function(){this.document&&(e.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(this.document,"start",this.handleTopMoveStartCapture,!0),this.removeEventListener(this.document,"start",this.handleTopMoveStart),this.removeEventListener(this.document,"move",this.handleTopMoveCapture,!0),this.removeEventListener(this.document,"move",this.handleTopMove),this.removeEventListener(this.document,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(this.document,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(this.document,"keydown",this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}},{key:"addEventListener",value:function(e,t,n,r){var o=Ee?{capture:r,passive:!1}:r;this.listenerTypes.forEach((function(r){var i=xe[r][t];i&&e.addEventListener(i,n,o)}))}},{key:"removeEventListener",value:function(e,t,n,r){var o=Ee?{capture:r,passive:!1}:r;this.listenerTypes.forEach((function(r){var i=xe[r][t];i&&e.removeEventListener(i,n,o)}))}},{key:"connectDragSource",value:function(e,t){var n=this,r=this.handleMoveStart.bind(this,e);return this.sourceNodes.set(e,t),this.addEventListener(t,"start",r),function(){n.sourceNodes.delete(e),n.removeEventListener(t,"start",r)}}},{key:"connectDragPreview",value:function(e,t,n){var r=this;return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),function(){r.sourcePreviewNodes.delete(e),r.sourcePreviewNodeOptions.delete(e)}}},{key:"connectDropTarget",value:function(e,t){var n=this;if(!this.document)return function(){};var r=function(r){if(n.document&&n.monitor.isDragging()){var o;switch(r.type){case xe.mouse.move:o={x:r.clientX,y:r.clientY};break;case xe.touch.move:o={x:r.touches[0].clientX,y:r.touches[0].clientY}}var i=null!=o?n.document.elementFromPoint(o.x,o.y):void 0,s=i&&t.contains(i);return i===t||s?n.handleMove(r,e):void 0}};return this.addEventListener(this.document.body,"move",r),this.targetNodes.set(e,t),function(){n.document&&(n.targetNodes.delete(e),n.removeEventListener(n.document.body,"move",r))}}},{key:"getTopMoveStartHandler",value:function(){return this.options.delayTouchStart||this.options.delayMouseStart?this.handleTopMoveStartDelay:this.handleTopMoveStart}},{key:"installSourceNodeRemovalObserver",value:function(e){var t=this;this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=e,this.draggedSourceNodeRemovalObserver=new MutationObserver((function(){e&&!e.parentElement&&(t.resurrectSourceNode(),t.uninstallSourceNodeRemovalObserver())})),e&&e.parentElement&&this.draggedSourceNodeRemovalObserver.observe(e.parentElement,{childList:!0})}},{key:"resurrectSourceNode",value:function(){this.document&&this.draggedSourceNode&&(this.draggedSourceNode.style.display="none",this.draggedSourceNode.removeAttribute("data-reactid"), -this.document.body.appendChild(this.draggedSourceNode))}},{key:"uninstallSourceNodeRemovalObserver",value:function(){this.draggedSourceNodeRemovalObserver&&this.draggedSourceNodeRemovalObserver.disconnect(),this.draggedSourceNodeRemovalObserver=void 0,this.draggedSourceNode=void 0}}])&&ke(t.prototype,n),r&&ke(t,r),e}(),Pe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Ne(e,t,n)},Ae=n("JEhF");const Le=(Re="OBJECT_TREE",e=>Re+"__"+e);var Re;const Be=Le("SET_NODES"),Fe=Le("SYNC_NODES"),He=Le("UPDATE_NODE"),ze=Le("UPDATE_NODES"),Ue=Le("RESET_TREE"),Ge=Le("SET_SELECTED_IDS"),Ve=Le("DROP_SELECTION"),Ke=Le("SELECT_PREVIOUS"),We=Le("SELECT_NEXT"),qe=Le("MULTI_SELECT_PREVIOUS"),Ye=Le("MULTI_SELECT_NEXT"),Xe=Le("PROCESS_DROP_TARGET"),Je=Le("UPDATE_DROP_TARGET"),Ze=Le("HIDE_DROP_TARGET"),Qe=Le("START_MULTI_SELECT"),$e=Le("STOP_MULTI_SELECT"),et=(Le("REMOVE_NODE"),Le("SET_FOCUSED_NODE")),tt=Le("SCROLL_TO_ID"),nt=Le("SET_IS_SELECTED"),rt=Le("SET_IS_EXPANDED"),ot=Le("SET_DISABLED_NODES"),it=Le("MOVE_NODES"),st=(Le("START_DRAG"),Le("END_DRAG")),at=()=>({type:Ke}),ct=()=>({type:We}),lt=()=>({type:qe}),ut=()=>({type:Ye}),dt=(e,t,n,r,o)=>({type:Xe,dropTarget:e,dropType:t,isHoveredLeft:n,boundBox:r,isLastChild:o}),ht=()=>({type:Ve}),ft=e=>({type:Ge,ids:e}),pt=(e,t,n)=>({type:it,ids:e,targetId:t,dropType:n}),gt=()=>({type:Qe}),vt=()=>({type:$e}),bt=e=>({type:et,nodeId:e}),mt=e=>({type:tt,nodeId:e}),yt=(e,t,n=0)=>({type:nt,nodeId:e,isSelected:t,mode:n}),Ot=(e,t)=>({type:rt,nodeId:e,isExpanded:t}),St=e=>({type:ot,ids:e}),wt=()=>({type:st});var _t=n("G4qV");const Ct=e=>e.nodes,Tt=e=>e.selection,Et=e=>e.dropTarget,Dt=e=>e.expanded,jt=e=>e.scrollToId,It=(e,t)=>t,kt=Object(_t.a)([Ct,It],(e,t)=>e[t]),Mt=Object(_t.a)([Tt,It],(e,t)=>e.ids.includes(t)),xt=Object(_t.a)([Dt,It],(e,t)=>e.includes(t)),Nt=Object(_t.a)([e=>e.disabled,Tt,It],(e,t,n)=>!t.ids.includes(n)&&e.includes(n)),Pt=Object(_t.a)(Ct,e=>Object.keys(e)),At=Object(_t.a)(Tt,({ids:e})=>e),Lt=Object(_t.a)(Tt,({lastFocusedNodeId:e})=>e),Rt=Object(_t.a)(Tt,({isMultiSelecting:e})=>e),Bt=Object(_t.a)([Ct,At],(e,t)=>t.map(t=>e[t])),Ft=Object(_t.a)(Ct,e=>Object.values(e).filter(e=>0===e.level)),Ht=Object(_t.a)([Ct,Ft],(e,t)=>t.reduce((t,n)=>[...t,...zt(e,Object(D.ensureDefined)(n))],[]));function zt(e,t){const n=[];for(const r of t.children)n.push(e[r]),n.push(...zt(e,e[r]));return n}const Ut=Object(_t.a)([Ct,Ft,Dt],(e,t,n)=>{const r=new Set(n);return t.reduce((t,n)=>[...t,...Vt(e,Object(D.ensureDefined)(n),r)],[])}),Gt=Object(_t.a)([Ct,At,Dt],(e,t,n)=>{const r=new Set(n);return[{id:"drag-list",level:-1,children:t}].reduce((t,n)=>[...t,...Vt(e,Object(D.ensureDefined)(n),r)],[])});function Vt(e,t,n){const r=[];for(const o of t.children){const t=e[o];void 0!==t&&(r.push(t),n.has(o)&&r.push(...Vt(e,t,n)))}return r}function*Kt(e){const{selectedIds:t,nodes:n}=yield Object(T.b)(e),r=n.reduce((e,t)=>({...e,[t.id]:t}),{});yield Object(T.e)((e=>({type:Be,nodes:e}))(r)),yield Object(T.e)(ft(t)) -;!Lt(yield Object(T.f)())&&t.length>0&&(yield Object(T.e)(bt(t[0])),yield Object(T.e)(mt(t[0])))}function*Wt(e){for(;;){if((yield Object(T.g)([Qe,$e])).type===Qe){const t=Pt(yield Object(T.f)()).filter(t=>!e(t));yield Object(T.e)(St(t))}else yield Object(T.e)(St([]))}}function*qt(){for(;;){const{type:e}=yield Object(T.g)([Ye,qe]),t=yield Object(T.f)(),n=Ht(t),r=n.length,o=Lt(t),i=n.findIndex(e=>e.id===o),s=[...At(t)];if(e===qe&&0===i||e===Ye&&i===r-1)continue;const a=en(t,e===Ye?"next":"previous",n,i),{id:c}=a;s.includes(c)&&o?(yield Object(T.e)(yt(o,!1,1)),yield Object(T.e)(bt(c))):yield Object(T.e)(yt(c,!0,1)),yield Object(T.e)(mt(c))}}function*Yt(e,t){for(;;){const{type:n}=yield Object(T.g)([We,Ke]),r=yield Object(T.f)(),o=Ht(r),i=Lt(r),s=o.findIndex(e=>e.id===i),a=n===We?"next":"previous",c=en(r,a,o,s),{id:l}=c;e?e([l],a):yield Object(T.e)(ft([l])),t&&t(l),yield Object(T.e)(bt(l))}}function*Xt(e,t=(()=>!0)){for(;;){const{mode:n,nodeId:r,isSelected:o}=yield Object(T.g)(nt);let i=[...At(yield Object(T.f)())];const s=Ht(yield Object(T.f)());if(1===n)o?i.push(r):i.splice(i.indexOf(r),1);else if(2===n&&i.length>0){const e=Lt(yield Object(T.f)());let n=s.findIndex(t=>t.id===e);-1===n&&(n=s.reduce((e,t,n)=>i.includes(t.id)?n:e,-1));const o=s.findIndex(e=>e.id===r);if(n!==o)for(let e=Math.min(n,o);e<=Math.max(n,o);e++){const n=s[e].id;!i.includes(n)&&t(n)&&i.push(n)}}else i=r?[r]:[];const a=new Set(i);i=s.reduce((e,t)=>(a.has(t.id)&&e.push(t.id),e),[]),e?e(i):yield Object(T.e)(ft(i)),yield Object(T.e)(bt(r))}}function*Jt(e=(()=>!0),t){const{dropTarget:n,dropType:r,isHoveredLeft:o,boundBox:i,isLastChild:s}=t,a=Et(yield Object(T.f)()),c=kt(yield Object(T.f)(),Object(D.ensureDefined)(n.parentId)),l=s&&"after"===r,u=Bt(yield Object(T.f)()),d=!l||!o&&e(u,n,r)?n:c,h=a.node&&a.node.id!==d.id||a.dropType!==r;u.map(e=>e.id).includes(d.id)?yield Object(T.e)({type:Ze}):h&&e(u,d,r)&&(yield Object(T.e)(((e,t,n)=>({type:Je,node:e,dropType:t,boundBox:n}))(d,r,i)))}function*Zt(e){yield Object(T.h)(0,Xe,Jt,e)}function*Qt(e){for(;;){yield Object(T.g)(Ve);const t=Bt(yield Object(T.f)()),{node:n,dropType:r}=Et(yield Object(T.f)());if(n&&r){const o=new CustomEvent("tree-node-drop",{detail:{nodes:t,target:n.id,type:r}});if(e&&e(o),!o.defaultPrevented){const e=At(yield Object(T.f)());yield Object(T.e)(pt(e,n.id,r))}}}}function*$t(e){for(;;){yield Object(T.g)(it);e(Ct(yield Object(T.f)()))}}function en(e,t,n,r){const o=n.length;let i,s=0;for(;!i||Math.abs(s)1&&!xt(e,Object(D.ensureDefined)(a.parentId)));)s+="next"===t?1:-1,i=n[(r+s+o)%o];var a;return i}function*tn(e={}){const{saga:t,onDrop:n,canMove:r,onMove:o,onSelect:i,onKeyboardSelect:s,initState:a,canBeAddedToSelection:c}=e,l=[Object(T.d)(Zt,r),Object(T.d)(Qt,n),Object(T.d)(Xt,i,c),Object(T.d)(Yt,i,s),Object(T.d)(qt)];for(t&&l.push(Object(T.d)(t)),o&&l.push(Object(T.d)($t,o)),c&&l.push(Object(T.d)(Wt,c));;){a&&(yield Object(T.b)(Kt,a));const e=yield Object(T.a)(l);yield Object(T.g)(Ue);for(const t of e)yield Object(T.c)(t)}}var nn=n("ANjH"),rn=n("ogJP") -;const on=Object(l.getLogger)("Platform.GUI.ObjectTree.CallApi");const sn={ids:[],lastFocusedNodeId:void 0,isMultiSelecting:!1};const an={node:void 0,dropType:void 0,boundBox:void 0};const cn=Object(nn.c)({nodes:function(e={},t){switch(t.type){case Be:return t.nodes;case Fe:{const{nodes:n}=t,r=n.map(e=>e.id),o={...e};for(const t of Object.keys(e))if(!r.includes(t)){const{parentId:e}=o[t];e&&(o[e]={...o[e],children:o[e].children.filter(e=>e!==t)}),delete o[t]}for(const e of n){const t=e.id;if(o.hasOwnProperty(t)){!Object(rn.deepEquals)(o[t].children,e.children)[0]&&(o[t]={...o[t],children:[...e.children]})}else{o[t]=e;const{parentId:n}=e;if(n&&!o[n].children.includes(t))throw new Error("Not implemented")}}return o}case He:{const{type:n,nodeId:r,...o}=t;return{...e,[r]:{...e[r],...o}}}case ze:{const{nodes:n}=t,r={...e};return Object.keys(n).forEach(e=>{r[e]={...r[e],...n[e]}}),{...e,...r}}case it:{const{ids:n,targetId:r,dropType:o}=t,i=Object(D.ensureDefined)(e[r].parentId),s=e[i],a={};for(const t of n){const n=e[t];if(n.parentId){const r=a[n.parentId]||e[n.parentId];a[n.parentId]={...r,children:r.children.filter(e=>e!==t)}}a[t]={...n,parentId:i,level:s.level+1}}const c=s.children.filter(e=>!n.includes(e));return c.splice(((e,t,n)=>{switch(n){case"before":return e.indexOf(Object(D.ensureDefined)(t));case"inside":return e.length;case"after":return e.indexOf(Object(D.ensureDefined)(t))+1;default:return 0}})(c,r,o),0,...n),a[i]={...e[i],children:c,isExpanded:!0},{...e,...a}}default:return e}},selection:function(e=sn,t){switch(t.type){case Ge:{const{ids:n}=t;return{...e,ids:n,lastFocusedNodeId:n.length>0?e.lastFocusedNodeId:void 0}}case Qe:return{...e,isMultiSelecting:!0};case $e:return{...e,isMultiSelecting:!1};case et:return{...e,lastFocusedNodeId:t.nodeId};case Fe:{const n=new Set(t.nodes.map(e=>e.id));return e.lastFocusedNodeId&&!n.has(e.lastFocusedNodeId)&&delete e.lastFocusedNodeId,{...e,ids:e.ids.filter(e=>n.has(e))}}default:return e}},dropTarget:function(e=an,t){switch(t.type){case Je:{const{node:n,dropType:r,boundBox:o}=t;return{...e,node:n,dropType:r,boundBox:o}}case Ze:case st:case Ue:return{...an};default:return e}},expanded:function(e=[],t){switch(t.type){case rt:{const{nodeId:n,isExpanded:r}=t;if(r)return[...e,n];const o=[...e];return o.splice(e.indexOf(n),1),o}default:return e}},disabled:function(e=[],t){switch(t.type){case ot:return[...t.ids];default:return e}},scrollToId:function(e=null,t){switch(t.type){case tt:return null===t.nodeId?null:{id:t.nodeId};default:return e}}});function ln(e,t,n){var r=n.getRegistry(),o=r.addTarget(e,t);return[o,function(){return r.removeTarget(o)}]}function un(e,t,n){var r=n.getRegistry(),o=r.addSource(e,t);return[o,function(){return r.removeSource(o)}]}function dn(e,t){for(var n=0;n, or turn it into a ")+"drag source or a drop target itself.")}}function vn(e){var t={};return Object.keys(e).forEach((function(n){var r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{var i=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!Object(o.isValidElement)(t)){var r=t;return e(r,n),r}var i=t;gn(i);var s=n?function(t){return e(t,n)}:e;return mn(i,s)}}(r);t[n]=function(){return i}}})),t}function bn(e,t){"function"==typeof e?e(t):e.current=t}function mn(e,t){var n=e.ref -;return Object(Oe.a)("string"!=typeof n,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a or
. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?Object(o.cloneElement)(e,{ref:function(e){bn(n,e),bn(t,e)}}):Object(o.cloneElement)(e,{ref:t})}function yn(e){return(yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function On(e){return null!==e&&"object"===yn(e)&&Object.prototype.hasOwnProperty.call(e,"current")}function Sn(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1,'Expected the drop target specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',Jn.join(", "),t),Object(Oe.a)("function"==typeof e[t],"Expected %s in the drop target specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target",t,t,e[t])})),function(t,n){return new Zn(e,t,n)}}function $n(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=e;"function"!=typeof e&&(Object(Oe.a)(In(e,!0),'Expected "type" provided as the first argument to DropTarget to be a string, an array of strings, or a function that returns either given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',e),o=function(){return e}),Object(Oe.a)(jn(t),'Expected "spec" provided as the second argument to DropTarget to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',t);var i=Qn(t);return Object(Oe.a)("function"==typeof n,'Expected "collect" provided as the third argument to DropTarget to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',n),Object(Oe.a)(jn(r),'Expected "options" provided as the fourth argument to DropTarget to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',n),function(e){return Yn({containerDisplayName:"DropTarget",createHandler:i,registerHandler:ln,createMonitor:function(e){return new fn(e)},createConnector:function(e){return new wn(e)},DecoratedComponent:e,getType:o,collect:n,options:r})}}var er=n("iR1w"),tr=n("qFKp");function nr(e,t){for(var n=0;n-1,'Expected the drag source specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',ur.join(", "),t),Object(Oe.a)("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source",t,t,e[t])})),dr.forEach((function(t){Object(Oe.a)("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source",t,t,e[t])})),function(t,n){return new hr(e,t,n)}}var pr=n("/3z9"),gr=n("3F0O"),vr=n("8d0Q");const br=o.createContext({size:0,smallSizeTreeNodeAction:1}),mr={[pr.Modifiers.Mod]:1,[pr.Modifiers.Shift]:2};var yr=n("+5L9"),Or=n("co4r");const Sr=()=>{};class wr extends i.a.PureComponent{constructor(){super(...arguments),this._ref=null,this._handleRef=e=>{this._ref=e;const{connectDragSource:t,connectDropTarget:n,connectDragPreview:r}=this.props;Object(D.ensureDefined)(n)(this._ref),Object(D.ensureDefined)(t)(this._ref),Object(D.ensureDefined)(r)((lr||((lr=new Image).src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),lr),{captureDraggingState:!0})},this._handleTouchStart=e=>{const t=(e,t)=>{const n=function(e,t){try{const n=document.createEvent("TouchEvent");return n.initTouchEvent(e,!0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,t.touches,t.targetTouches,t.changedTouches),n}catch(e){return null}}(e,t);if(n)return n;const r=Array.from(t.changedTouches),o=Array.from(t.touches),i=Array.from(t.targetTouches);return new TouchEvent(e,{bubbles:!0,changedTouches:r,touches:o,targetTouches:i})},n=e.target;if(n instanceof Element){const e=e=>{const r=e;if(!n.isConnected){r.preventDefault();const e=t("touchmove",r);document.body.dispatchEvent(e)}},r=o=>{const i=o;if(!n.isConnected){i.preventDefault();const e=t("touchend",i);document.body.dispatchEvent(e)}n.removeEventListener("touchend",r),n.removeEventListener("touchmove",e)};n.addEventListener("touchend",r),n.addEventListener("touchmove",e)}}}componentDidMount(){var e -;null===(e=this._ref)||void 0===e||e.addEventListener("touchstart",this._handleTouchStart)}componentWillUnmount(){var e;null===(e=this._ref)||void 0===e||e.removeEventListener("touchstart",this._handleTouchStart)}render(){return i.a.createElement(_r,{...this.props,reference:this._handleRef})}getNode(){return Object(D.ensureNotNull)(this._ref)}}const _r=e=>{const{id:t,isSelected:n,isOffset:r,isExpandable:s,setIsSelected:a,isDisabled:c,isExpanded:l,onClick:u,parentId:d,setIsExpanded:h,reference:f,isFirstListItem:p,isLastListItem:g,nodeRenderer:v,isChildOfSelected:b=!1}=e,{size:m,smallSizeTreeNodeAction:y}=Object(o.useContext)(br),O=Object(o.useRef)(null),S=Object(gr.a)(e=>O.current=e,f);let[w,_]=Object(vr.c)();return tr.CheckMobile.any()&&(w=n,_={onMouseOut:Sr,onMouseOver:Sr}),i.a.createElement("div",{className:j(Or.wrap,n&&Or.selected,b&&Or.childOfSelected,c&&Or.disabled,s&&Or.expandable),onClick:1===m&&0===y?C:function(e){if(e.defaultPrevented)return;const r=mr[Object(pr.modifiersFromEvent)(e)]||0;!c&&a&&a(t,!n,r);u&&0===r&&u(e,t)},onContextMenu:C,ref:S,..._},s&&i.a.createElement(k.a,{icon:yr,className:j(Or.expandHandle,l&&Or.expanded),onClick:function(e){e.preventDefault(),s&&h(t,!l)},onMouseDown:function(e){e.preventDefault()}}),v({id:t,isOffset:r,parentId:d,isDisabled:c,isSelected:n,isChildOfSelected:b,isHovered:w,isExpanded:l,isFirstListItem:p,isLastListItem:g}));function C(){c||n||!a||a(t,!0)}},Cr=i.a.createContext({});function Tr(e,t){const{id:n}=t,r=kt(e,n),o=Mt(e,n);let i=!1,s=r.parentId;for(;s&&!i;)i=Mt(e,s),s=kt(e,s).parentId;return{...r,isSelected:o,isChildOfSelected:i,isExpanded:r.children.length>0&&xt(e,n),isExpandable:r.children.length>0,isDisabled:Nt(e,n)}}function Er(e){return Object(nn.b)({setIsExpanded:Ot,processDropTarget:dt,dropSelection:ht,selectNext:ct,selectPrevious:at,setIsSelected:yt,endDrag:wt},e)}const Dr=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=e;"function"!=typeof e&&(Object(Oe.a)(In(e),'Expected "type" provided as the first argument to DragSource to be a string, or a function that returns a string given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',e),o=function(){return e}),Object(Oe.a)(jn(t),'Expected "spec" provided as the second argument to DragSource to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',t);var i=fr(t);return Object(Oe.a)("function"==typeof n,'Expected "collect" provided as the third argument to DragSource to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',n),Object(Oe.a)(jn(r),'Expected "options" provided as the fourth argument to DragSource to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',n),function(e){return Yn({containerDisplayName:"DragSource",createHandler:i,registerHandler:un,createConnector:function(e){ -return new rr(e)},createMonitor:function(e){return new ar(e)},DecoratedComponent:e,getType:o,collect:n,options:r})}}("node",{beginDrag:e=>{const{id:t,isDisabled:n,isSelected:r}=e;return n||r||e.setIsSelected(t,!0),e},endDrag:e=>e.endDrag()},e=>({connectDragSource:e.dragSource(),connectDragPreview:e.dragPreview()})),jr=$n("node",{hover:(e,t,n)=>{if(!n)return;const r=n.getNode(),o=r.getBoundingClientRect(),i=o.bottom-o.top,s=t.getClientOffset();if(s){const t=s.y-o.top;let n,a;if(n=0===e.children.length?t=i/3&&t<2*i/3?"inside":"after",void 0!==e.getContainerElement){const t=e.getContainerElement().getBoundingClientRect();a={top:o.top-t.top,left:o.left-t.left,bottom:o.top-t.top+o.height,right:o.left-t.left+o.width,height:o.height,width:o.width}}else a={top:r.offsetTop,left:r.offsetLeft,bottom:r.offsetTop+r.offsetHeight,right:r.offsetLeft+r.offsetWidth,height:r.offsetHeight,width:r.offsetWidth};e.processDropTarget(e,n,s.x-o.left<48,a,e.isLastChild)}}},e=>({connectDropTarget:e.dropTarget()})),Ir=Object(G.b)(Tr,Er,null,{context:Cr})(Dr(jr(wr))),kr=Object(G.b)(Tr,Er,null,{context:Cr})(_r);var Mr=n("d700");function xr(e){return(xr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Nr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pr(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{} -;return Object(Oe.a)("function"==typeof e,'Expected "collect" provided as the first argument to DragLayer to be a function that collects props to inject into the component. ',"Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-layer",e),Object(Oe.a)(jn(t),'Expected "options" provided as the second argument to DragLayer to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-layer',t),function(n){var r=n,i=t.arePropsEqual,s=void 0===i?pn:i,a=r.displayName||r.name||"Component",c=function(t){Lr(i,t);var n=Br(i);function i(){var e;return Nr(this,i),(e=n.apply(this,arguments)).isCurrentlyMounted=!1,e.ref=Object(o.createRef)(),e.handleChange=function(){if(e.isCurrentlyMounted){var t=e.getCurrentState();pn(t,e.state)||e.setState(t)}},e}return Ar(i,[{key:"getDecoratedComponentInstance",value:function(){return Object(Oe.a)(this.ref.current,"In order to access an instance of the decorated component, it must either be a class component or use React.forwardRef()"),this.ref.current}},{key:"shouldComponentUpdate",value:function(e,t){return!s(e,this.props)||!pn(t,this.state)}},{key:"componentDidMount",value:function(){this.isCurrentlyMounted=!0,this.handleChange()}},{key:"componentWillUnmount",value:function(){this.isCurrentlyMounted=!1,this.unsubscribeFromOffsetChange&&(this.unsubscribeFromOffsetChange(),this.unsubscribeFromOffsetChange=void 0),this.unsubscribeFromStateChange&&(this.unsubscribeFromStateChange(),this.unsubscribeFromStateChange=void 0)}},{key:"render",value:function(){var e=this;return Object(kn.jsx)(Mn.a.Consumer,{children:function(t){var n=t.dragDropManager;return void 0===n?null:(e.receiveDragDropManager(n),e.isCurrentlyMounted?Object(kn.jsx)(r,Object.assign({},e.props,e.state,{ref:Tn(r)?e.ref:null}),void 0):null)}},void 0)}},{key:"receiveDragDropManager",value:function(e){if(void 0===this.manager){this.manager=e,Object(Oe.a)("object"===xr(e),"Could not find the drag and drop manager in the context of %s. Make sure to render a DndProvider component in your top-level component. Read more: http://react-dnd.github.io/react-dnd/docs/troubleshooting#could-not-find-the-drag-and-drop-manager-in-the-context",a,a);var t=this.manager.getMonitor();this.unsubscribeFromOffsetChange=t.subscribeToOffsetChange(this.handleChange),this.unsubscribeFromStateChange=t.subscribeToStateChange(this.handleChange)}}},{key:"getCurrentState",value:function(){if(!this.manager)return{};var t=this.manager.getMonitor();return e(t,this.props)}}]),i}(o.Component);return c.displayName="DragLayer(".concat(a,")"),c.DecoratedComponent=n,Fn()(c,n)}}var Ur=n("AiMB");function Gr(e){const t=e(),n=Object(o.useRef)(t);n.current=t;const[r,i]=Object(o.useState)(n.current),s=Object(o.useRef)(null);return Object(o.useEffect)(()=>{null===s.current&&(s.current=requestAnimationFrame(()=>{s.current=null,i(n.current)}))}),Object(o.useEffect)(()=>()=>{s.current&&cancelAnimationFrame(s.current)},[]),r}function Vr(e){const{dropTargetOffset:t,mousePosition:n}=e -;if(!t)return{display:"none"};const{x:r,y:o}=t,i=n&&t?n.y-t.y:0,s=`translate(${r+(n&&t?n.x-t.x:0)}px, ${o+i}px)`;return{transform:s,WebkitTransform:s}}const Kr={top:0,left:0,position:"fixed",pointerEvents:"none",zIndex:100,opacity:.5,width:300,backgroundColor:"red"};const Wr=zr((function(e){return{isDragging:e.isDragging()&&"node"===e.getItemType(),mousePosition:e.getClientOffset(),dropTargetOffset:e.getSourceClientOffset()}}))(Object(G.b)((function(e){return{items:Gt(e)}}),null,null,{context:Cr})((function(e){const{items:t,isDragging:n,nodeRenderer:r,dragPreviewRenderer:o}=e;return Gr((function(){return n?i.a.createElement(Ur.a,null,i.a.createElement("div",{style:{...Kr,...Vr(e)}},t.map(e=>{if(o){const t=o;return i.a.createElement(t,{key:e.id,...e})}return i.a.createElement(kr,{id:e.id,key:e.id,nodeRenderer:r,isDragPreview:!0,isOffset:e.level>1})}))):null}))})));var qr=n("0lNN"),Yr=n("n9z6");const Xr=i.a.forwardRef((e,t)=>{const n=Object(o.useRef)(null);return e.connectDropTarget(n),Object(o.useImperativeHandle)(t,()=>({getNode:()=>Object(D.ensureNotNull)(n.current)}),[]),i.a.createElement("div",{ref:n,style:{height:"100%",width:"100%"}})}),Jr=$n("node",{hover:(e,t,n)=>{if(!n)return;const r=t.getClientOffset();if(null===r)return;const o=e.getOrderedNodes();if(0===o.length)return;const i=n.getNode().getBoundingClientRect(),s=e.getContainerElement().getBoundingClientRect();if("first"===e.type){const t={top:i.top-s.top+i.height,left:i.left-s.left,bottom:i.top-s.top+i.height,right:i.left-s.left+i.width,height:0,width:i.width};e.processDropTarget(o[0],"before",!1,t,!1)}if("last"===e.type){const t=r.x-i.left<48,n=o[o.length-1],a=t&&2===n.level?Object(D.ensureDefined)(o.find(e=>e.id===n.parentId)):n,c={top:i.top-s.top,left:i.left-s.left,bottom:i.top-s.top,right:i.left-s.left+i.width,height:i.height,width:i.width};e.processDropTarget(a,"after",t,c,!1)}}},e=>({connectDropTarget:e.dropTarget()}))(Xr),Zr=i.a.createContext({isOver:!1,transform:void 0});var Qr=n("4ceR");function $r(e){const{dropType:t,boundBox:n}=e,{top:r,bottom:o,left:i}=Object(D.ensureDefined)(n);return[i,"before"===t||"inside"===t?r:o]}const eo=zr((function(e){return{isDragging:e.isDragging()}}))(Object(G.b)((function(e){const{boundBox:t,dropType:n,node:r}=Et(e);return{boundBox:t,dropType:n,level:r?r.level:void 0}}),null,null,{context:Cr})((function(e){const{dropType:t,boundBox:n,isDragging:r,level:i,transform:s=$r}=e;return Gr((function(){if(!r||!t||!n)return null;const a={[Qr.dropTarget]:"inside"!==t,[Qr.dropTargetInside]:"inside"===t},{width:c,height:l}=n,[u,d]=s(e),h=`translate(${u}px, ${d}px)`;return o.createElement("div",{className:j(a),style:{position:"absolute",transform:h,WebkitTransform:h,top:0,left:2===i?"46px":0,width:2===i?c-46+"px":c,height:"inside"===t?l:"2px"}})}))}))),to=i.a.forwardRef((e,t)=>{const n=Object(o.useContext)(Zr);return i.a.createElement("div",{...e,ref:t},e.children,n.isOver&&i.a.createElement(eo,{transform:n.transform}))});var no=n("Ialn"),ro=n("DGxW");const oo=38+pr.Modifiers.Shift,io=40+pr.Modifiers.Shift -;const so=i.a.forwardRef((function(e,t){const{navigationKeys:n,renderList:r,stopMultiSelect:s,startMultiSelect:a,isMultiSelecting:c,nodeRenderer:l,dragPreviewRenderer:u,className:d,connectDropTarget:h,readOnly:f,onClick:p,dropLayerTransform:g,setFocusedNode:v,scrollToId:b,rowHeight:m,onMultiSelectPrevious:y,onMultiSelectNext:O,onMoveCursorToNext:S,onMoveCursorToPrevious:w,outerRef:_,width:C,height:T,isOver:E,processDropTarget:j}=e,k=Object(o.useContext)(P),M=Object(o.useRef)(null);Object(o.useEffect)(()=>{const e=e=>{[pr.Modifiers.Mod,pr.Modifiers.Shift].includes(Object(pr.modifiersFromEvent)(e))&&a()},t=e=>{c&&![pr.Modifiers.Mod,pr.Modifiers.Shift].includes(Object(pr.modifiersFromEvent)(e))&&s()};return document.addEventListener("keydown",e),document.addEventListener("keyup",t),document.addEventListener("mousemove",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t),document.removeEventListener("mousemove",t)}},[c]),function(e){Object(o.useEffect)(()=>{if(tr.isEdge){let t=null;const n=Object(D.ensureNotNull)(e.current),r=e=>{if(e.target instanceof Element){const n=Object(D.ensureNotNull)(e.target.closest("[draggable]"));n instanceof HTMLElement&&(n.style.opacity="0",t=requestAnimationFrame(()=>n.style.opacity="1"))}};return n.addEventListener("dragstart",r),()=>{n.removeEventListener("dragstart",r),null!==t&&cancelAnimationFrame(t)}}return()=>{}},[])}(M);const x=Object(o.useCallback)(()=>Object(D.ensureNotNull)(W.current),[]),N=Object(o.useCallback)(()=>r,[r]),A=Object(o.useMemo)(()=>{const e=f?kr:Ir,t=[];let n;t.push({type:"padding",node:i.a.createElement(Jr,{type:"first",key:"padding-top",getContainerElement:x,getOrderedNodes:N,processDropTarget:j})});for(let o=0;o0,nodeRenderer:l,readOnly:f,onClick:p,isOffset:s.level>1,getContainerElement:x})})}return t.push({type:"padding",node:i.a.createElement(Jr,{type:"last",key:"padding-bottom",getContainerElement:x,getOrderedNodes:N,processDropTarget:j})}),t},[r]),L=Object(o.useRef)([]);L.current=A;const R=Object(o.useCallback)(e=>{let{style:t}=e;const{index:n}=e;return n===L.current.length-1&&(t={...t,bottom:0,minHeight:t.height},delete t.height),i.a.createElement("div",{style:t},L.current[n].node)},[]),B=Object(o.useCallback)(e=>{const t=L.current[e];return"padding"===t.type?6:"function"==typeof m?m(e,t):m},[m]),F=Object(o.useCallback)(e=>Object(D.ensure)(L.current[e].node.key),[]),H=Object(o.useMemo)(()=>null===b?{index:-1}:{index:L.current.findIndex(e=>e.node.key===b.id)},[b]);h(M);const[z,U,G,V]=Object(Yr.a)(),K=Object(o.useRef)(null);Object(o.useEffect)(()=>Object(D.ensureNotNull)(K.current).resetAfterIndex(0,!0),[A]),Object(o.useEffect)(()=>Object(D.ensureNotNull)(K.current).scrollToItem(H.index),[H]) -;const W=Object(o.useRef)(null),q=Object(o.useMemo)(()=>({isOver:E,transform:g}),[E,g]),Y=Object(o.useRef)(null),X=Object(o.useRef)({startScroll(e){const t=()=>{null!==G.current&&(Y.current=requestAnimationFrame(t),G.current.scrollBy({top:e}))};this.stopScroll(),t()},stopScroll(){null!==Y.current&&(cancelAnimationFrame(Y.current),Y.current=null)},getListElement:()=>G.current});return Object(o.useImperativeHandle)(t,()=>X.current,[]),Object(o.useEffect)(()=>()=>X.current.stopScroll(),[E]),i.a.createElement(Zr.Provider,{value:q},i.a.createElement("div",{...U,className:I()(ro.tree,d),ref:M,tabIndex:-1,onKeyDown:function(e){const t=Object(pr.hashFromEvent)(e);if(e.defaultPrevented||Object(Mr.a)(t,e.target))return;k||t!==oo||(e.preventDefault(),y());k||t!==io||(e.preventDefault(),O());(38===t||void 0!==n&&"previous"===n[t])&&(e.preventDefault(),w());(40===t||void 0!==n&&"next"===n[t])&&(e.preventDefault(),S());if((8===t||46===t)&&k){const{viewModel:e}=k,t=e.selection(),n=t.selected();if(1!==n.length)return;const r=e.getNextNodeIdAfterRemove(n[0]);if(null===r)return;e.onChange().subscribe(null,()=>{if(t.selected().length)return;const n=e.entity(r);n&&(t.set([n]),v(r))},!0)}}},i.a.createElement(qr.a,{...z,className:ro.overlayScrollWrap}),i.a.createElement(er.b,{ref:function(e){K.current=e},className:ro.listContainer,width:C,height:T,itemCount:A.length,itemSize:B,children:R,itemKey:F,outerRef:function(e){G.current=e,_&&_(e)},innerRef:function(e){W.current=e},innerElementType:to,onItemsRendered:function(){V()},overscanCount:20,direction:Object(no.isRtl)()?"rtl":"ltr"}),i.a.createElement(Wr,{dragPreviewRenderer:u,nodeRenderer:l})))})),ao=$n("node",{drop:(e,t,n)=>{("touch"===e.drag||tr.isFF)&&n.stopScroll(),t.getItem().dropSelection()},hover:(e,t,n)=>{if("touch"!==e.drag&&!tr.isFF)return;const r=t.getClientOffset();if(null===r)return;const o=n.getListElement();if(null===o)return;const i=o.getBoundingClientRect();((t,r,o)=>{const i=Math.abs(t-o),s=Math.abs(t-r);if(s>40&&i>40||i<=40&&s<=40)return void n.stopScroll();var a,c,l,u;a=s>20&&s<=40,l=i<=20,u=s<=20,(c=i>20&&i<=40)||a?"touch"===e.drag?n.startScroll(c?-5:5):n.startScroll(c?-2:2):(l||u)&&("touch"===e.drag?n.startScroll(l?-10:10):n.startScroll(l?-5:5))})(r.y,i.bottom,i.top)}},(e,t)=>({connectDropTarget:e.dropTarget(),isOver:t.isOver()}))(so);const co=Object(G.b)((function(e){return{renderList:Ut(e),orderedNodes:Ht(e),isMultiSelecting:Rt(e),selectedIds:At(e),scrollToId:jt(e)}}),(function(e){return Object(nn.b)({startMultiSelect:gt,stopMultiSelect:vt,setFocusedNode:bt,processDropTarget:dt,onMoveCursorToNext:ct,onMoveCursorToPrevious:at,onMultiSelectPrevious:lt,onMultiSelectNext:ut},e)}),null,{context:Cr})(ao),lo={delayTouchStart:100};function uo(e){const{canBeAddedToSelection:t,initState:n,onSelect:r,canMove:s,onDrop:a,onMove:c,nodes:l,selectedIds:u,onKeyboardSelect:d,saga:h,lastFocusedNodeObject:f,lastSyncTimestampRef:p,scrollToId:g,...v}=e,[b,m]=Object(o.useState)(null);return Object(o.useEffect)(()=>{const e=Object(U.b)();m(function(e){const t=Object(nn.a)(e) -;return Object(nn.e)(cn,t)}(e));const o=e.run(tn,{initState:n,onKeyboardSelect:d,saga:h,canMove:s,onMove:c,onDrop:a,onSelect:r,canBeAddedToSelection:t});return()=>o.cancel()},[]),Object(o.useEffect)(()=>(null!==b&&l&&(p&&(p.current=performance.now()),b.dispatch((e=>({type:Fe,nodes:e}))(l))),()=>{}),[b,l]),Object(o.useEffect)(()=>{null!==b&&u&&b.dispatch(ft(u))},[b,u]),Object(o.useEffect)(()=>{null!==b&&(null==f?void 0:f.id)&&b.dispatch(bt(f.id))},[b,f]),null===b?null:i.a.createElement(ho,{store:b,scrollToId:g,...v})}const ho=i.a.memo((function(e){const{store:t,scrollToId:n,...r}=e,s="touch"===e.drag?Pe:ye;return Object(o.useEffect)(()=>{var e;t.dispatch(mt(null!==(e=null==n?void 0:n.id)&&void 0!==e?e:null))},[n]),i.a.createElement(Ae.a,{backend:s,options:lo},i.a.createElement(G.a,{store:t,context:Cr},i.a.createElement(co,{...r})))}));function fo(e,t){Object(H.trackEvent)("Object Tree",e,t)}function po(e){return e.length>1?"Multi select":e[0].gaLabel()}function go(e){return Object(U.c)(t=>{const n={};return e.onChange().subscribe(n,()=>t({type:Ue})),e.onGroupCreated().subscribe(n,e=>t(Ot(e,!0))),e.selection().onChange().subscribe(n,e=>t(ft(e))),()=>{e.onChange().unsubscribeAll(n),e.selection().onChange().unsubscribeAll(n),e.onGroupCreated().unsubscribeAll(n)}},U.a.expanding())}function*vo(){for(;;)yield Object(T.g)([We,Ke]),fo("Select","Arrow")}function*bo(){for(;;){const{mode:e}=yield Object(T.g)(nt);1===e&&fo("Multi select","Ctrl"),2===e&&fo("Multi select","Shift")}}function*mo(e){for(;;){yield Object(T.g)(Ve);const{node:t,dropType:n}=Et(yield Object(T.f)());if(t){const r=Bt(yield Object(T.f)()),o=r.map(t=>Object(D.ensureNotNull)(e.entity(t.id)));let i="Drag";1===t.level&&"inside"!==n&&r.some(e=>2===e.level)?i="From the group":2!==t.level&&"inside"!==n||!r.some(e=>1===e.level)?1===r.length&&r[0].parentId!==t.parentId&&(i="Existing pane"):i="To the group",fo(i,po(o))}}}function*yo(e){yield Object(T.d)(vo),yield Object(T.d)(bo),yield Object(T.d)(mo,e)}function*Oo(e){yield Object(T.d)(yo,e);const t=yield Object(T.b)(go,e);on.logNormal("Opened object tree data source channel");try{for(;;){const e=yield Object(T.g)(t);yield Object(T.e)(e)}}finally{on.logNormal("Closed object tree data source channel"),t.close()}}var So=n("5VQP");const wo=o.createContext(null);var _o=n("XAms"),Co=n("9S1y"),To=n("h5pj");const Eo=E.mobiletouch?"touch":"native";function Do(e){const{viewModel:t,showHeader:n=!0,nodeRenderer:r,isDialog:s=!1}=e,a=Object(o.useRef)(null),c=function(e){const[t,n]=Object(o.useState)(e.getChartId()),r=Object(o.useRef)(t);return r.current=t,Object(o.useEffect)(()=>{return e.onChange().subscribe(null,t),()=>{e.onChange().unsubscribe(null,t)};function t(){const t=e.getChartId();r.current!==t&&n(t)}},[]),t}(t),[l,u]=Object(Co.a)(),[d,h]=Object(o.useState)(null),f=Object(o.useMemo)(()=>({isTouch:E.touch,isDialog:s}),[s]);return i.a.createElement(wo.Provider,{value:f},i.a.createElement(P.Provider,{value:{viewModel:t}},i.a.createElement("div",{className:To.wrap,onContextMenu:_o.b -},n&&i.a.createElement(z,null),i.a.createElement(C.a,{onMeasure:l},i.a.createElement("div",{className:To.space,onClick:function(e){if(e.defaultPrevented)return;if(!(e.target instanceof Element)||null===a.current)return;e.target===a.current&&t.selection().set([])}},null!==u&&i.a.createElement(uo,{key:c,height:u.height,width:u.width,canBeAddedToSelection:function(e){const n=t.entity(e);return t.selection().canBeAddedToSelection(n)},nodeRenderer:r,initState:function(){const{nodes:e,selection:n}=t.getState();return{selectedIds:n,nodes:e}},canMove:function(e,n,r){return t.isSelectionDropable(n.id,r)},drag:Eo,rowHeight:jo,onSelect:function(e){const n=e.map(e=>t.entity(e)).filter(e=>null!==e);t.selection().set(n);const r=So.ContextMenuManager.getShown();r&&r.hide()},onDrop:function(e){e.preventDefault();const{detail:{target:n,type:r}}=e;t.insertSelection(n,r)},scrollToId:d,saga:function*(){yield Object(T.d)(Oo,t)},onKeyboardSelect:function(e){h({id:e})},outerRef:function(e){a.current=e}}))))))}function jo(e,t){switch(t.type){case"node":return 38;case"separator":return 13}}var Io,ko=n("Kxc7");!function(e){e.Svg="svg",e.Text="text"}(Io||(Io={}));var Mo=n("wHCJ"),xo=n("WcWV");function No(e){const{className:t,disabled:n,...r}=e;return i.a.createElement(k.a,{className:I()(xo.button,n&&xo.disabled,t),...r})}var Po=n("To8B"),Ao=n("tyJc"),Lo=n("20cQ"),Ro=n("zn4F"),Bo=n("U+QY"),Fo=n("gSe6");function Ho(e){const{id:t}=e,n=Object(o.useContext)(P),{viewModel:r}=Object(D.ensureNotNull)(n),s=r.entity(t);return null===s?null:i.a.createElement(zo,{...e,entity:s})}function zo(e){const{id:t,isOffset:n,isDisabled:r,isSelected:s,isChildOfSelected:a,isHovered:c,parentId:l,entity:u,isExpanded:d}=e,h=Object(o.useContext)(P),f=Object(o.useContext)(wo),{size:p}=Object(o.useContext)(br),[g,v]=Object(o.useState)(!1),b=Object(o.useRef)(null),[m,O]=Object(o.useState)(u.title()),[S,w]=Object(o.useState)(u.isLocked()),[_,C]=Object(o.useState)(u.isVisible()),[T,E]=Object(o.useState)(u.isActualInterval()),[I,M]=Object(o.useState)(!1),[x,N]=Object(o.useState)(!1),A=Object(o.useRef)(null);Object(o.useEffect)(()=>{const e={};u.onLockChanged().subscribe(e,()=>w(u.isLocked())),u.onVisibilityChanged().subscribe(e,()=>C(u.isVisible()));const t=u.onTitleChanged();return t&&t.subscribe(e,()=>O(u.title())),u.onIsActualIntervalChange().subscribe(e,()=>E(u.isActualInterval())),()=>{u.onIsActualIntervalChange().unsubscribeAll(e),u.onLockChanged().unsubscribeAll(e),u.onVisibilityChanged().unsubscribeAll(e),t&&t.unsubscribeAll(e),A.current&&clearTimeout(A.current)}},[u]),Object(o.useEffect)(()=>{g&&b.current&&(b.current.focus(),b.current.setSelectionRange(0,m.length))},[g]),Object(o.useEffect)(()=>{const e={};return L.hoveredObjectChanged().subscribe(e,X),()=>{L.hoveredObjectChanged().unsubscribeAll(e)}},[d]),Object(o.useEffect)(()=>{L.setHoveredObject(c?t:null)},[c]),Object(o.useEffect)(()=>{!s&&A.current&&(clearTimeout(A.current),A.current=null),v(!1)},[s]);const{viewModel:L}=Object(D.ensureNotNull)(h),R=!_||S,B=u.getIcon(),F={};if(l){const e=L.entity(l) -;e&&(F["data-parent-name"]=e.title()),F["data-type"]=u.hasChildren()?"group":"data-source"}const H=ko.enabled("test_show_object_tree_debug")?`<${u.id()}> (${u.zOrder()})`:u.title(),z=c||I,U=g&&s,G=!!f&&f.isTouch,V=!!f&&f.isDialog,K=T&&_?Ro:Bo,W=u.hasChildren()?y.t("Group is hidden on current interval"):y.t("Drawing is hidden on current interval");return i.a.createElement("span",{className:j(Fo.wrap,R&&Fo.modifier,r&&Fo.disabled,s&&Fo.selected,n&&Fo.offset,a&&Fo.childOfSelected,I&&!r&&!s&&!a&&Fo.hover,V&&!r&&!s&&!a&&Fo.dialog),onMouseDown:function(e){g&&!Object(D.ensureNotNull)(b.current).contains(e.target)&&N(!0)},onClick:1===p?q:function(e){if(e.defaultPrevented)return;if(0!==Object(pr.modifiersFromEvent)(e))return;if(A.current)e.preventDefault(),clearTimeout(A.current),A.current=null,L.openProperties(u),N(!1);else{const e=L.selection().selected();A.current=setTimeout(()=>{A.current=null,s&&!x&&1===e.length&&L.rename(u,()=>v(!0)),N(!1)},500)}},onContextMenu:G?void 0:q},!U&&i.a.createElement(o.Fragment,null,B&&B.type===Io.Svg&&i.a.createElement(k.a,{icon:B.content||"",className:Fo.icon}),B&&B.type===Io.Text&&i.a.createElement("span",{className:j(Fo.icon,Fo.textIcon)},B.content),i.a.createElement("span",{className:j(Fo.title,L.isMain(u)&&Fo.main,(!u.isVisible()||!T)&&Fo.disabled),...F},H),(z||S||!_||G||!T)&&i.a.createElement("span",{className:j(Fo.rightButtons,u.canBeRemoved()&&Fo.twoButtons,u.canBeLocked()&&(z||S)&&Fo.threeButtons)},u.canBeLocked()&&(z||S)&&i.a.createElement(No,{icon:S?Ao:Lo,className:j(Fo.button,Fo.lockButton),onClick:function(e){if(e.defaultPrevented)return;e.preventDefault(),L.setIsLocked(t,!u.isLocked())},"data-role":"button","data-name":"lock","data-active":S}),(z||!_||!T)&&i.a.createElement(No,{icon:K,className:j(Fo.button,Fo.viewButton,!T&&[Fo.warn,"apply-common-tooltip"]),onClick:T?function(e){if(e.defaultPrevented)return;e.preventDefault(),L.setIsVisible(t,!u.isVisible())}:void 0,title:T?void 0:W,disabled:!T,"data-role":"button","data-name":"hide","data-active":!_}),u.canBeRemoved()&&(G||z)&&i.a.createElement(No,{icon:Po,className:j(Fo.button,Fo.removeButton),onClick:function(e){if(e.defaultPrevented)return;e.preventDefault(),e.stopPropagation(),L.remove(t)},"data-role":"button","data-name":"remove"}))),U&&i.a.createElement(Mo.a,{value:m,onChange:function(e){O(e.currentTarget.value)},onClick:_o.a,className:Fo.renameInput,onKeyDown:function(e){27===Object(pr.hashFromEvent)(e)?(e.preventDefault(),O(u.title()),v(!1)):13===Object(pr.hashFromEvent)(e)&&(e.preventDefault(),Y())},reference:function(e){b.current=e},onBlur:Y,onDragStart:function(e){e.preventDefault(),e.stopPropagation()},draggable:!0,stretch:!0}));function q(e){e.defaultPrevented||g||(e.preventDefault(),e.persist(),L.openContextMenu(u,()=>v(!0),e))}function Y(){""!==m&&u.setName(m),O(u.title()),v(!1)}function X(e){if(u.hasChildren()&&!d){const t=null!==e&&u.childrenIds().has(e);M(t)}else M(t===e)}}var Uo=n("4/GM");class Go extends i.a.PureComponent{constructor(e){super(e),this._isMounted=!1,this._dialogRef=i.a.createRef(), -this._renderChildren=e=>i.a.createElement(Vo,{isSmallTablet:e,viewModel:this.props.viewModel}),this._handleMediaChange=()=>{this.state.showDrawer&&!window.matchMedia(S.a.TabletSmall).matches&&this.setState({showDrawer:!1})},this._onManageDrawings=e=>{throw new Error("not supported")},this._closeDrawer=()=>{this.setState({showDrawer:!1})},this._handleContextMenuOpened=e=>{this.setState({isContextMenuOpened:e})},this._matchMedia=window.matchMedia(S.a.TabletSmall),this.state={showDrawer:!1,showDialog:!1,isContextMenuOpened:!1}}componentDidMount(){this._isMounted=!0,this._matchMedia.addListener(this._handleMediaChange),this.props.viewModel.isContextMenuOpened().subscribe(this._handleContextMenuOpened)}componentWillUnmount(){this._isMounted=!1,this._matchMedia.removeListener(this._handleMediaChange),this.props.viewModel.isContextMenuOpened().unsubscribe(this._handleContextMenuOpened)}render(){return i.a.createElement(i.a.Fragment,null,i.a.createElement(m.a,{rule:S.a.TabletSmall},e=>i.a.createElement(O.a,{additionalElementPos:"after",additionalHeaderElement:!1,className:Uo.dialog,dataName:"object-tree-dialog",isOpened:!0,onClickOutside:this.state.showDialog||e||this.state.isContextMenuOpened?()=>{}:this.props.onClose,onClose:this.props.onClose,ref:this._dialogRef,render:()=>this._renderChildren(e),title:Object(y.t)("Object tree"),showSeparator:!0})),i.a.createElement(b.b,null,this.state.showDrawer&&i.a.createElement(v.a,{onClose:this._closeDrawer,position:"Bottom"},i.a.createElement(w.a,{onClose:this._closeDrawer,chartWidget:this.props.activeChartWidget,isMobile:!0}))))}}function Vo(e){const{isSmallTablet:t,viewModel:n}=e,r=Object(o.useMemo)(()=>({size:t?1:0,smallSizeTreeNodeAction:0}),[t]);return i.a.createElement(br.Provider,{value:r},i.a.createElement(Do,{nodeRenderer:Ho,showHeader:!1,viewModel:n,isDialog:!0}))}var Ko=n("eqEH"),Wo=n("vPbs"),qo=n("aIyQ"),Yo=n.n(qo);function Xo(e){return e}var Jo=n("QrSB");function Zo(e,t){return`${e}:${t}`}class Qo{constructor(e){this._onChange=new Yo.a,this._recalculate=()=>{const e=this._groupModel.groups().map(e=>Zo(e.id,e.instanceId)),t=this._selectionApi.allSources();this._selected=this._selected.filter(n=>e.includes(n)||t.includes(n)),this._onChange.fire(this._selected)},this._model=e,this._selectionApi=new Jo.SelectionApi(this._model),this._groupModel=this._model.lineToolsGroupModel(),this._selected=this._getSelectedIds(),this._selectionApi.onChanged().subscribe(this,()=>{this._selected=this._getSelectedIds(),this._onChange.fire(this._selected)}),this._groupModel.onChanged().subscribe(this,this._recalculate)}destroy(){this._selectionApi.onChanged().unsubscribeAll(this),this._groupModel.onChanged().unsubscribeAll(this)}set(e){const t=[];let n=e.map(e=>e.id());for(const r of e)if(r.hasChildren()){const e=r.childrenIds();t.push(...Array.from(e.values()).map(Xo)),n=n.filter(t=>!e.has(t))}else t.push(r.id());this._selectionApi.set(t),this._selected=n,this._onChange.fire(this._selected)}canBeAddedToSelection(e){return null!==e&&e.canBeAddedToSelection()}onChange(){return this._onChange} -selected(){return this._selected}_getSelectedIds(){return this._selectionApi.allSources().filter(e=>{const t=this._model.dataSourceForId(e);return null!==t&&t.showInObjectTree()})}}class $o{constructor(e,t){this._controller=e,this._facade=t,this._groupModel=e.model().lineToolsGroupModel()}buildTree(){const e={};for(const t of this._controller.model().panes()){const n=t.sourcesByGroup().all().filter(e=>e.showInObjectTree());e[t.id()]=ei(t.id(),0);for(const n of this._groupModel.groups()){const r=Zo(n.id,n.instanceId),o=Object(D.ensureNotNull)(this._facade.getObjectById(r));if(o.pane()===t){const r=[...n.lineTools()].sort((e,t)=>e.zorder()>t.zorder()?-1:1).map(e=>e.id());e[o.id()]=ei(o.id(),1,t.id(),r),e[t.id()].children.push(o.id());for(const t of r)e[t]=ei(t,2,o.id())}}for(const r of n)e[r.id()]||(e[r.id()]=ei(r.id(),1,t.id()),e[t.id()].children.push(r.id()));e[t.id()].children.sort((e,t)=>{const n=Object(D.ensureNotNull)(this._facade.getObjectById(e)),r=Object(D.ensureNotNull)(this._facade.getObjectById(t));return Object(D.ensureNotNull)(r.zOrder())-Object(D.ensureNotNull)(n.zOrder())})}return this._facade.invalidateCache(new Set(Object.keys(e))),e}}function ei(e,t,n,r=[]){return{id:e,level:t,parentId:n,children:r}}var ti=n("CW80"),ni=n("3ClC"),ri=n("fgLi"),oi=n("HZKX"),ii=n("Vbka"),si=n("dDxv"),ai=n("NhaM");const ci=Object(y.t)("Show {sourceTitle}"),li=Object(y.t)("Hide {sourceTitle}"),ui=Object(y.t)("Lock {sourceTitle}"),di=Object(y.t)("Unlock {sourceTitle}"),hi=Object(y.t)("Change {sourceType} title to {newSourceTitle}");function fi(e,t){return t.every(t=>!(t.pane()!==e&&!t.allowsMovingbetweenPanes()))}function pi(e){return e instanceof ri.DataSource&&e.showInObjectTree()?e.id():null}const gi=new Yo.a;class vi{constructor(e,t){this._syncStateChanged=new Yo.a,this._linkKeyChangedBound=this._linkKeyChanged.bind(this),this._undoModel=e,this._dataSource=t,Object(ti.isLineTool)(this._dataSource)&&this._dataSource.linkKey().subscribe(this._linkKeyChangedBound)}destroy(){Object(ti.isLineTool)(this._dataSource)&&this._dataSource.linkKey().unsubscribe(this._linkKeyChangedBound)}id(){return this._dataSource.id()}title(){return Object(ti.isLineTool)(this._dataSource)?this._dataSource.properties().title.value()||this._dataSource.translatedType():this._dataSource.title()}gaLabel(){return Object(ni.isStudy)(this._dataSource)?"Study":Object(ti.isLineTool)(this._dataSource)?"Drawing":"Symbol"}canBeLocked(){return Object(ti.isLineTool)(this._dataSource)&&this._dataSource.userEditEnabled()}canBeRemoved(){return this._undoModel.mainSeries()!==this._dataSource&&this._dataSource.isUserDeletable()}canBeHidden(){return this._dataSource.canBeHidden()}canBeRenamed(){return Object(ti.isLineTool)(this._dataSource)}isVisible(){return this._dataSource.properties().visible.value()}isActualInterval(){return!Object(ti.isLineTool)(this._dataSource)&&!Object(ni.isStudy)(this._dataSource)||this._dataSource.isActualInterval()}onIsActualIntervalChange(){ -return Object(ti.isLineTool)(this._dataSource)||Object(ni.isStudy)(this._dataSource)?this._dataSource.onIsActualIntervalChange():gi}isLocked(){return!!Object(ti.isLineTool)(this._dataSource)&&this._dataSource.properties().frozen.value()}onVisibilityChanged(){return this._dataSource.properties().visible.listeners()}onLockChanged(){return Object(ti.isLineTool)(this._dataSource)?this._dataSource.properties().frozen.listeners():gi}getIcon(){const e=d,t=this._dataSource.getSourceIcon(),n=Object(ni.isStudyStrategy)(this._dataSource);let r={type:Io.Svg,content:n?ii:si};if(e&&t)if("loadSvg"===t.type){const[n,o]=t.svgId.split("."),i="linetool"===n?e.linetool[o]:e.series[Number(o)];r={type:Io.Svg,content:i||si}}else"text"===t.type&&(r={type:Io.Text,content:t.text});return r}setVisible(e){const t=(e?ci:li).format({sourceTitle:this._dataSource.title()});this._undoModel.setProperty(this._dataSource.properties().visible,e,t)}setLocked(e){if(Object(ti.isLineTool)(this._dataSource)){const t=(e?ui:di).format({sourceTitle:this._dataSource.translatedType()});this._undoModel.setProperty(this._dataSource.properties().frozen,e,t)}}setName(e){if(Object(ti.isLineTool)(this._dataSource)){const t=hi.format({sourceType:this._dataSource.properties().title.value()||this._dataSource.title(),newSourceTitle:e});this._undoModel.setProperty(this._dataSource.properties().title,e,t)}}isCopiable(){return this._dataSource.copiable()}isClonable(){return this._dataSource.cloneable()}zOrder(){return this._dataSource.zorder()}remove(){this._undoModel.removeSource(this._dataSource,!1)}canBeAddedToSelection(){return this._undoModel.selection().canBeAddedToSelection(this._dataSource)}setAsSelection(){this._undoModel.model().selectionMacro(e=>{e.clearSelection(),e.addSourceToSelection(this._dataSource)})}addToSelection(){this._undoModel.model().selectionMacro(e=>{e.addSourceToSelection(this._dataSource)})}addSourcesToArray(e){return e.push(this._dataSource),e}insertSourcesBeforeThis(e){this._insertSources(e,e=>this._undoModel.insertBefore(e,this._dataSource))}insertSourcesAfterThis(e){this._insertSources(e,e=>this._undoModel.insertAfter(e,this._dataSource))}childrenIds(){return new Set}hasChildren(){return!1}pane(){return Object(D.ensureNotNull)(this._undoModel.model().paneForSource(this._dataSource))}allowsMovingbetweenPanes(){return!Object(ti.isLineTool)(this._dataSource)}canBeAddedToGroup(){return Object(ti.isLineTool)(this._dataSource)}canInsertBeforeThis(e){return this._canInsertBeforeOrAfter(e)}canInsertAfterThis(e){return this._canInsertBeforeOrAfter(e)}detachFromParent(){if(Object(ti.isLineTool)(this._dataSource)){const e=this._undoModel.model(),t=this._undoModel.lineToolsGroupController(),n=e.lineToolsGroupModel().groupForLineTool(this._dataSource);null!==n&&t.excludeLineToolFromGroup(n,this._dataSource)}}onTitleChanged(){const e=this._dataSource.properties().title;return e?e.listeners():void 0}canBeSyncedInLayout(){return Object(ti.isLineTool)(this._dataSource)&&this._dataSource.isSynchronizable()}onSyncStateChanged(){return this._syncStateChanged} -setDrawingSyncState(e){if(!this.canBeSyncedInLayout())return;const t=this._dataSource;switch(e){case 0:if(null===t.linkKey().value())return;this._undoModel.unlinkLines([t]);break;case 1:if(null!==t.linkKey().value())return;this._undoModel.copyToOtherCharts([t])}}getDrawingSyncState(){return this.canBeSyncedInLayout()?null!==this._dataSource.linkKey().value()?1:0:null}_linkKeyChanged(){this._syncStateChanged.fire(Object(D.ensureNotNull)(this.getDrawingSyncState()))}_canInsertBeforeOrAfter(e){const t=this._undoModel.model();if(!fi(this.pane(),e))return!1;if(Object(ti.isLineTool)(this._dataSource)){if(null!==t.lineToolsGroupModel().groupForLineTool(this._dataSource)&&e.some(e=>!e.canBeAddedToGroup()))return!1}return!0}_insertSources(e,t){const n=this._undoModel.model(),r=this._undoModel.lineToolsGroupController();this._undoModel.beginUndoMacro("Insert source(s) after");const o=()=>{e.forEach(e=>e.detachFromParent())},i=e.reduce((e,t)=>t.addSourcesToArray(e),[]);if(Object(ti.isLineTool)(this._dataSource)){const t=n.lineToolsGroupModel().groupForLineTool(this._dataSource);null!==t?(Object(D.assert)(!e.some(e=>e.hasChildren())),i.forEach(e=>{Object(ti.isLineTool)(e)&&(t.containsLineTool(e)||r.addLineToolToGroup(t,e))})):o()}else o();t(i),this._undoModel.endUndoMacro()}}class bi{constructor(e,t){this._onTitleChanged=new Yo.a,this._onVisibilityChanged=new Yo.a,this._onLockChanged=new Yo.a,this._onIsActualIntervalChanged=new Yo.a,this._syncStateChanged=new Yo.a,this._linkKeyChangedBound=this._linkKeyChanged.bind(this),this._undoModel=e,this._group=t,this._lineTools=t.lineTools(),this._paneId=Object(D.ensureNotNull)(e.model().paneForSource(this._lineTools[0])).id();const n=()=>{this._lineTools.forEach(e=>{e.properties().visible.listeners().subscribe(this,()=>this._onVisibilityChanged.fire()),e.properties().frozen.listeners().subscribe(this,()=>this._onLockChanged.fire()),e.onIsActualIntervalChange().subscribe(this,()=>this._onIsActualIntervalChanged.fire())}),this._lineTools.length>0&&this._lineTools[0].linkKey().subscribe(this._linkKeyChangedBound)};this._group.onChanged().subscribe(this,e=>{this._unsubscribeFromAllLineTools(),this._lineTools=this._group.lineTools(),n(),e.lockedChanged&&this._onLockChanged.fire(),e.visibilityChanged&&this._onVisibilityChanged.fire(),e.titleChanged&&this._onTitleChanged.fire(),e.isActualIntervalChanged&&this._onIsActualIntervalChanged.fire()}),n(),this._lastActualZOrder=this.zOrder(),this._lastIsVisible=this.isVisible(),this._lastIsActualInterval=this.isActualInterval(),this._lastIsLocked=this.isLocked()}destroy(){this._unsubscribeFromAllLineTools(),this._group.onChanged().unsubscribeAll(this)}id(){return Zo(this._group.id,this._group.instanceId)}title(){return this._group.name()}gaLabel(){return"Group"}getIcon(){return{type:Io.Svg,content:ai}}canBeRemoved(){return!0}canBeHidden(){return!0}canBeLocked(){return!0}canBeRenamed(){return!0}isVisible(){return this._group.lineTools().length>0&&(this._lastIsVisible="Invisible"!==this._group.visibility()),this._lastIsVisible}isActualInterval(){ -return this._group.lineTools().length>0&&(this._lastIsActualInterval=this._group.lineTools().some(e=>e.isActualInterval())),this._lastIsActualInterval}onIsActualIntervalChange(){return this._onIsActualIntervalChanged}isLocked(){return this._group.lineTools().length>0&&(this._lastIsLocked="Locked"===this._group.locked()),this._lastIsLocked}onTitleChanged(){return this._onTitleChanged}onVisibilityChanged(){return this._onVisibilityChanged}onLockChanged(){return this._onLockChanged}setVisible(e){this._undoModel.lineToolsGroupController().setGroupVisibility(this._group,e)}setLocked(e){this._undoModel.lineToolsGroupController().setGroupLock(this._group,e)}setName(e){this._undoModel.lineToolsGroupController().setGroupName(this._group,e)}isCopiable(){return!1}isClonable(){return!1}zOrder(){return this._group.lineTools().length>0&&(this._lastActualZOrder=this._group.lineTools()[0].zorder()),this._lastActualZOrder}remove(){this._undoModel.lineToolsGroupController().removeGroup(this._group)}canBeAddedToSelection(){const e=this._undoModel.model();return this._lineTools.every(t=>e.selection().canBeAddedToSelection(t))}setAsSelection(){this._undoModel.model().selectionMacro(e=>{e.clearSelection(),this._lineTools.forEach(t=>e.addSourceToSelection(t))})}addToSelection(){this._undoModel.model().selectionMacro(e=>{this._lineTools.forEach(t=>e.addSourceToSelection(t))})}addSourcesToArray(e){return e.push(...this._lineTools),e}detachFromParent(){}insertSourcesBeforeThis(e){const t=this._insertBeforeTarget();this._insertSources(e,e=>this._undoModel.insertBefore(e,t))}insertSourcesAfterThis(e){const t=this._insertAfterTarget();this._insertSources(e,e=>this._undoModel.insertAfter(e,t))}childrenIds(){const e=[...this._lineTools];return e.sort((e,t)=>t.zorder()-e.zorder()),new Set(e.map(e=>e.id()))}hasChildren(){return!0}pane(){return Object(D.ensureDefined)(this._undoModel.model().panes().find(e=>e.id()===this._paneId))}allowsMovingbetweenPanes(){return!1}canBeAddedToGroup(){return!1}canInsertBeforeThis(e){return this._canInsertBeforeOrAfter(e)}canInsertAfterThis(e){return this._canInsertBeforeOrAfter(e)}canBeSyncedInLayout(){return this._lineTools.length>0&&this._lineTools[0].isSynchronizable()}onSyncStateChanged(){return this._syncStateChanged}setDrawingSyncState(e){if(!this.canBeSyncedInLayout())return;const t=this._lineTools[0];switch(e){case 0:if(null===t.linkKey().value())return;this._undoModel.unlinkLines([t]);break;case 1:if(null!==t.linkKey().value())return;this._undoModel.copyToOtherCharts([t])}}getDrawingSyncState(){if(!this.canBeSyncedInLayout())return null;return null!==this._lineTools[0].linkKey().value()?1:0}_linkKeyChanged(){this._syncStateChanged.fire(Object(D.ensureNotNull)(this.getDrawingSyncState()))}_canInsertBeforeOrAfter(e){return fi(this.pane(),e)}_insertSources(e,t){this._undoModel.beginUndoMacro("Insert source(s) after");const n=e.reduce((e,t)=>t.addSourcesToArray(e),[]);e.forEach(e=>e.detachFromParent()),t(n),this._undoModel.endUndoMacro()}_insertBeforeTarget(){ -return Object(D.ensureNotNull)(this._lineTools.reduce((e,t)=>null===e?t:e.zorder()null===e?t:e.zorder()>t.zorder()?e:t,null))}_unsubscribeFromAllLineTools(){this._lineTools.forEach(e=>{e.properties().visible.listeners().unsubscribeAll(this),e.properties().frozen.listeners().unsubscribeAll(this),e.onIsActualIntervalChange().unsubscribeAll(this)}),this._lineTools.length>0&&this._lineTools[0].linkKey().unsubscribe(this._linkKeyChangedBound)}}class mi{constructor(e){this._hoveredObjectChanged=new Yo.a,this._entitiesCache=new Map,this._undoModel=e,this._undoModel.model().hoveredSourceChanged().subscribe(this,this._onModelHoveredSourceChanged)}destroy(){for(const e of this._entitiesCache.values())null==e||e.destroy()}getObjectById(e){if(this._entitiesCache.has(e))return Object(D.ensureDefined)(this._entitiesCache.get(e));const t=this._createObjectById(e);return this._entitiesCache.set(e,t),t}invalidateCache(e){Array.from(this._entitiesCache.keys()).forEach(t=>{var n;e.has(t)||(null===(n=this._entitiesCache.get(t))||void 0===n||n.destroy(),this._entitiesCache.delete(t))})}canBeGroupped(e){if(0===e.length||1===e.length&&e[0].hasChildren())return!1;const t=[];if(e.forEach(e=>e.addSourcesToArray(t)),t.some(e=>!Object(ti.isLineTool)(e)))return!1;const n=this._undoModel.model(),r=t.map(e=>n.paneForSource(e));return new Set(r).size<2}contextMenuActions(e,t,n){const r=new oi.ActionsProvider(e,n),o=[];return t.forEach(e=>e.addSourcesToArray(o)),r.contextMenuActionsForSources(o)}insertBefore(e,t){t.insertSourcesAfterThis(e)}insertAfter(e,t){t.insertSourcesBeforeThis(e)}setHoveredObject(e){const t=this._undoModel.model();if(null===e)return void t.setHoveredSource(null,null);const n=t.dataSourceForId(e);null!==n&&t.setHoveredSource(n,null)}hoveredObjectId(){return pi(this._undoModel.model().hoveredSource())}hoveredObjectChanged(){return this._hoveredObjectChanged}_onModelHoveredSourceChanged(e){this._hoveredObjectChanged.fire(pi(e))}_createObjectById(e){const t=function(e){return 2===e.split(":").length}(e)?function(e){const t=e.split(":");return{persistentId:t[0],instanceId:t[1]}}(e).persistentId:e,n=this._undoModel.model(),r=n.dataSourceForId(t);if(null!==r)return new vi(this._undoModel,r);const o=n.lineToolsGroupModel().groupForId(t);return null!==o?new bi(this._undoModel,o):null}}var yi=n("7ktv"),Oi=n("7KDR"),Si=n("zRdu"),wi=n("hY0g"),_i=n.n(wi),Ci=n("fs3R"),Ti=n("qckB"),Ei=n("dmHa"),Di=n("ffaL"),ji=n("GjMU"),Ii=n("aVjL");const ki=Object(l.getLogger)("Platform.GUI.ObjectTree");function Mi(e){return e instanceof yi.PriceDataSource}class xi{constructor(e){this._nodes={},this._onChange=new Yo.a,this._onGroupCreated=new Yo.a,this._subscriptions=[],this._removeSourcesPromise=null,this._timeout=null,this._objects=[],this._options={general:!0,mainSeries:!0,mainSeriesTrade:!0,esdStudies:!0,fundamentals:!0,studies:!0,lineTools:!0,publishedCharts:!0,ordersAndPositions:!0,alerts:!1,chartEvents:!0,objectTree:!1,gotoLineTool:!0}, -this._isContextMenuOpened=new _i.a(!1),this._getObjectsToModify=e=>{const t=this.selection().selected();return t.find(t=>t===e)?t.map(this._ensuredEntity):[this._ensuredEntity(e)]},this._onActiveChartChanged=()=>{this._cleanup(),this._init()},this._cleanup=()=>{null!==this._timeout&&(clearTimeout(this._timeout),this._timeout=null),this._subscriptions.forEach(e=>{e.unsubscribeAll(this)}),this._selection.destroy(),this._chart.unsubscribe(this._onActiveChartChanged),null!==this._removeSourcesPromise&&this._removeSourcesPromise.cancel(),this._facade.destroy()},this._init=()=>{this._controller=this._chart.value().model(),this._groupController=this._controller.lineToolsGroupController(),this._model=this._controller.model(),this._groupModel=this._model.lineToolsGroupModel(),this._facade=new mi(this._controller),this._subscriptions=[this._model.mainSeries().onStyleChanged(),this._model.mainSeries().dataEvents().symbolResolved(),this._model.mainSeries().onIntervalChanged(),this._model.panesCollectionChanged(),this._model.dataSourceCollectionChanged(),this._groupModel.onChanged()],this._subscriptions.forEach(e=>{e.subscribe(this,this._update)}),this._chart.subscribe(this._onActiveChartChanged),this._selection=new Qo(this._model),this._update()},this._update=()=>{null===this._timeout&&(this._timeout=setTimeout(()=>{this._recalculateTree(),this._onChange.fire(),this._timeout=null}))},this._ensuredEntity=e=>Object(D.ensureNotNull)(this._getEntityById(e)),this._chart=e,this._init()}destroy(){this._cleanup()}getState(){return{nodes:Object.values(this._nodes),selection:this._selection.selected()}}getChartId(){return this._chart.value().id()}insertSelection(e,t){const n=this._facade,r=this.selection().selected().map(this._ensuredEntity),[o,i]=this._normalizeTargetAndDropType(e,t);this._controller.withMacro(Object(y.t)("Move objects"),()=>{switch(i){case"before":n.insertBefore(r,o);break;case"after":n.insertAfter(r,o)}}),this._update()}entity(e){return this._facade.getObjectById(e)}isMain(e){return e.id()===this._controller.mainSeries().id()}selection(){return this._selection}setIsLocked(e,t){const n=this._getObjectsToModify(e),r=(t?Object(y.t)("Lock"):Object(y.t)("Unlock"))+" "+Object(y.t)("objects");this._controller.withMacro(r,()=>{for(const e of n)e.setLocked(t)}),fo("Lock",po(n))}setIsVisible(e,t){const n=this._getObjectsToModify(e),r=(t?Object(y.t)("Show"):Object(y.t)("Hide"))+" "+Object(y.t)("objects");this._controller.withMacro(r,()=>{for(const e of n)e.setVisible(t)}),fo("Hide",po(n))}remove(e){const t=()=>{this._controller.withMacro(Object(y.t)("Remove objects"),()=>{for(const e of n)e.remove()}),fo("Delete",po(n)),this._update()},n=this._getObjectsToModify(e);t()}canSelectionBeGrouped(){const e=this._getSelectedEntities();return this._facade.canBeGroupped(e)}createGroupFromSelection(){const e=this._groupController.createGroupFromSelection();fo("Create Group");const t=Zo(e.id,e.instanceId);this.selection().set([this._ensuredEntity(t)]),this._onGroupCreated.fire(t),this._update()}isSelectionDropable(e,t){ -const n=this.selection().selected().map(this._ensuredEntity),[r,o]=this._normalizeTargetAndDropType(e,t);switch(o){case"after":return r.canInsertAfterThis(n);case"before":return r.canInsertBeforeThis(n)}}onChange(){return this._onChange}onGroupCreated(){return this._onGroupCreated}isSelectionCloneable(){const e=this._getSelectedEntities();return e.length>0&&e.every(e=>e.isClonable())}isSelectionCopiable(){const e=this._getSelectedEntities();return e.length>0&&e.every(e=>e.isCopiable())}openProperties(e){const t=this._model.dataSourceForId(e.id());this.selection().set([e]),null!==t&&(this._controller.mainSeries()===t?this._chart.value().showGeneralChartProperties():(Object(ti.isLineTool)(t)||Object(ni.isStudy)(t))&&this._chart.value().showChartPropertiesForSource(t))}canSelectionBeUnmerged(){const e=this._getSelectedEntities();return 1===e.length&&this.canNodeWithIdBeUnmerged(e[0].id())}canNodeWithIdBeUnmerged(e){const t=this._model.dataSourceForId(e);return null!==t&&Mi(t)&&this._model.isUnmergeAvailableForSource(t)}unmergeSelectionUp(){this._unmergeSelection(0)}unmergeSelectionDown(){this._unmergeSelection(1)}copySelection(){const e=this._getSelectedEntities(),t=e.map(e=>Object(D.ensureNotNull)(this._model.dataSourceForId(e.id())));this._chart.value().chartWidgetCollection().clipboard.uiRequestCopy(t),fo("Copy",po(e))}cloneSelection(){const e=this._getSelectedEntities(),t=e.map(e=>Object(D.ensureNotNull)(this._model.dataSourceForId(e.id())));t.every(ti.isLineTool)&&(this._controller.cloneLineTools([...t],!1),fo("Clone",po(e)))}rename(e,t){const n=this._getObjectsToModify(e.id());1===n.length&&n.some(e=>e.canBeRenamed())&&(t(),fo("Rename",po(n)))}async openContextMenu(e,t,n){this._objects=this._getObjectsToModify(e.id());const r=this._facade.canBeGroupped(this._objects);let o;if(this._objects.some(e=>e.hasChildren()))o=this._getActionsForGroupItem(e,t,r);else{const e=await this._facade.contextMenuActions(this._chart.value(),this._objects,this._options);if(o=Array.from(e).filter((e,t,n)=>e.type!==Si.a.Separator||!n[t+1]||n[t+1].type!==Si.a.Separator),1===this._objects.length&&this._objects[0].canBeRenamed()){const e=o.findIndex(e=>"Copy"===e.id);o.splice(-1===e?o.length:e+1,0,this._getRenameAction(t))}if(r){const e=o.findIndex(e=>"Clone"===e.id);o.splice(-1===e?0:e,0,this._getGroupAction())}}o.length>0&&(this._chart.value().updateActions(),So.ContextMenuManager.createMenu(o,{takeFocus:!0,returnFocus:!0},()=>{this._isContextMenuOpened.setValue(!1)}).then(e=>{e.show(n),this._isContextMenuOpened.setValue(!0)}))}setHoveredObject(e){this._facade.setHoveredObject(e)}hoveredObjectChanged(){return this._facade.hoveredObjectChanged()}getNextNodeIdAfterRemove(e){var t;const{nodes:n}=this.getState(),r=n.find(t=>t.id===e),o=this.entity(e);if(!(r&&r.parentId&&o&&o.canBeRemoved()))return null;if((null===(t=o.pane().mainDataSource())||void 0===t?void 0:t.id())===e&&!this.canNodeWithIdBeUnmerged(e)){const e=n.filter(e=>0===e.level).map(e=>e.id),t=this._takeNextOrPrevElement(e,r.parentId) -;return Object(D.ensureDefined)(n.find(e=>e.id===t)).children[0]}const i=Object(D.ensureDefined)(n.find(e=>e.id===r.parentId)).children;return 1===i.length?this.getNextNodeIdAfterRemove(r.parentId):this._takeNextOrPrevElement(i,e)}isContextMenuOpened(){return this._isContextMenuOpened.readonly()}_takeNextOrPrevElement(e,t){const n=e.indexOf(t);return e[n===e.length-1?n-1:n+1]}_getGroupAction(){return new Oi.Action({label:Object(y.t)("Create a group of drawings"),icon:B,onExecute:()=>{this.createGroupFromSelection()}})}_getRenameAction(e){return new Oi.Action({label:Object(y.t)("Rename"),icon:ji,onExecute:()=>{e(),fo("Context menu rename",po(this._objects))}})}_getActionsForGroupItem(e,t,n){const r=[new Oi.Action({label:e.isLocked()?Object(y.t)("Unlock"):Object(y.t)("Lock"),icon:e.isLocked()?Ci:Ti,onExecute:()=>this.setIsLocked(e.id(),!e.isLocked())}),new Oi.Action({label:e.isVisible()?Object(y.t)("Hide"):Object(y.t)("Show"),icon:e.isVisible()?Ei:Di,onExecute:()=>this.setIsVisible(e.id(),!e.isVisible())}),new Oi.Action({label:Object(y.t)("Remove"),icon:Ii,onExecute:()=>this.remove(e.id()),hotkeyHash:pr.isMacKeyboard?8:46})];return 1===this._objects.length&&(r.unshift(new Oi.Separator),r.unshift(this._getRenameAction(t))),n&&(r.unshift(new Oi.Separator),r.unshift(this._getGroupAction())),r}_unmergeSelection(e){const t=this._getSelectedEntities();if(1!==t.length)throw new Error("Only one object can be unmerged");const n=t[0],r=Object(D.ensureNotNull)(this._model.dataSourceForId(n.id()));if(!Mi(r))throw new Error("Entity is not IPriceDataSource");(0===e?this._controller.unmergeSourceUp:this._controller.unmergeSourceDown).call(this._controller,r);fo(0===e?"New pane above":"New pane below",po([n]))}_recalculateTree(){const e=new $o(this._controller,this._facade);this._nodes=e.buildTree()}_normalizeTargetAndDropType(e,t){let n=this._ensuredEntity(e);return"inside"===t&&(t="before",n=Object(D.ensureNotNull)(this.entity([...n.childrenIds()].shift()||""))),[n,t]}_getSelectedEntities(){const{selected:e,removed:t}=this._selection.selected().reduce((e,t)=>{const n=this._getEntityById(t);return n?(e.selected.push(n),e):(e.removed.push(t),e)},{selected:[],removed:[]});return t.length&&ki.logWarn("Detected dangling sources in selection. They will be ignored: "+JSON.stringify(t)),e}_getEntityById(e){return this._facade.getObjectById(e)}}var Ni=n("sQaR");n.d(t,"ObjectTreeDialogRenderer",(function(){return Pi}));class Pi extends Ni.a{constructor(){super(),this._handleClose=()=>{s.unmountComponentAtNode(this._container),this._setVisibility(!1),null!==this._viewModel&&(this._viewModel.destroy(),this._viewModel=null)};const e=Object(Ko.service)(Wo.CHART_WIDGET_COLLECTION_SERVICE);this._activeChartWidget=e.activeChartWidget.value(),this._viewModel=new xi(e.activeChartWidget)}hide(){this._handleClose()}isVisible(){return this.visible().value()}show(){g().then(()=>{null!==this._viewModel&&(s.render(o.createElement(Go,{onClose:this._handleClose,viewModel:this._viewModel,activeChartWidget:this._activeChartWidget}),this._container), -this._setVisibility(!0))})}}},zn4F:function(e,t){e.exports=''},zztK:function(e,t){e.exports=''}}]); \ No newline at end of file diff --git a/charting_library/bundles/runtime.dfe30490f666a6b5d4fe.js b/charting_library/bundles/runtime.c6da8e1e9c16eccdffac.js similarity index 99% rename from charting_library/bundles/runtime.dfe30490f666a6b5d4fe.js rename to charting_library/bundles/runtime.c6da8e1e9c16eccdffac.js index 7311e40f..474da5e3 100644 --- a/charting_library/bundles/runtime.dfe30490f666a6b5d4fe.js +++ b/charting_library/bundles/runtime.c6da8e1e9c16eccdffac.js @@ -2,4 +2,4 @@ 76:"f14d71a31295d8cd8d8b",77:"9c35f7046b848fbfd7f5",78:"0d502ab4d94441708606",79:"b990749a4839f9123f26",80:"5bdd53d5fc42d40eee28",81:"552e046aa828739c508b",82:"e06fe84c8cdead4bd52e",83:"e238aa056c5d4827cbdd",84:"bb4fc57627c8626019fd",85:"e0ba32bafcab02208901",86:"9244fc2bcc2370425a15",87:"605cbc508223ec27341c",88:"158dd8a18e176936a343",89:"5f142643917701de773b",90:"877114560c4828a97702",91:"2142b248a2bb29549a99",92:"e46f0aa06bcdbddf3831",93:"17d34ca77a7fc85a24d9",94:"b204218cb73b576333a1",95:"51244d1c4baf49d08807",96:"be9ad3d6a7c91501bb55","study-property-pages-with-definitions":"31d6cfe0d16ae931b73c","general-property-page":"31d6cfe0d16ae931b73c","lt-property-pages-with-definitions":"31d6cfe0d16ae931b73c","compare-model":"31d6cfe0d16ae931b73c","export-data":"31d6cfe0d16ae931b73c","lt-pane-views":"31d6cfe0d16ae931b73c",react:"31d6cfe0d16ae931b73c","change-interval-dialog":"31d6cfe0d16ae931b73c","simple-dialog":"31d6cfe0d16ae931b73c","go-to-date-dialog-impl":"31d6cfe0d16ae931b73c","currency-label-menu":"31d6cfe0d16ae931b73c","study-template-dialog":"31d6cfe0d16ae931b73c","study-market":"31d6cfe0d16ae931b73c",moment:"31d6cfe0d16ae931b73c","symbol-info-dialog-impl":"31d6cfe0d16ae931b73c","line-tools-icons":"31d6cfe0d16ae931b73c","floating-toolbars":"31d6cfe0d16ae931b73c","restricted-toolset":"31d6cfe0d16ae931b73c","drawing-toolbar":"31d6cfe0d16ae931b73c","chart-bottom-toolbar":"31d6cfe0d16ae931b73c","header-toolbar":"31d6cfe0d16ae931b73c","context-menu-renderer":"31d6cfe0d16ae931b73c","lollipop-tooltip-renderer":"31d6cfe0d16ae931b73c","chart-widget-gui":"31d6cfe0d16ae931b73c","chart-screenshot-hint":"31d6cfe0d16ae931b73c","chart-event-hint":"31d6cfe0d16ae931b73c",redux:"31d6cfe0d16ae931b73c","new-edit-object-dialog":"31d6cfe0d16ae931b73c","general-chart-properties-dialog":"31d6cfe0d16ae931b73c","source-properties-editor":"31d6cfe0d16ae931b73c","object-tree-dialog":"31d6cfe0d16ae931b73c","new-confirm-inputs-dialog":"31d6cfe0d16ae931b73c","load-chart-dialog":"31d6cfe0d16ae931b73c","add-compare-dialog":"31d6cfe0d16ae931b73c","symbol-search-dialog":"31d6cfe0d16ae931b73c","series-pane-views":"31d6cfe0d16ae931b73c","study-pane-views":"31d6cfe0d16ae931b73c","take-chart-image-impl":"31d6cfe0d16ae931b73c",hammerjs:"31d6cfe0d16ae931b73c","custom-intervals-add-dialog":"31d6cfe0d16ae931b73c","share-chart-to-social-utils":"31d6cfe0d16ae931b73c","full-tooltips-popup":"31d6cfe0d16ae931b73c","show-theme-save-dialog":"31d6cfe0d16ae931b73c","manage-drawings-dialog":"31d6cfe0d16ae931b73c","series-icons-map":"31d6cfe0d16ae931b73c"}[e]+("rtl"===document.dir?".rtl.css":".css"),f=o.p+c,b=document.getElementsByTagName("link"),r=0;rthis._innerWindow().headerReady()))}onGrayedObjectClicked(e){this._doWhenInnerApiLoaded((t=>{t.onGrayedObjectClicked(e)}))}onShortcut(e,t){this._doWhenInnerWindowLoaded((i=>{i.createShortcutAction(e,t)}))}subscribe(e,t){this._doWhenInnerApiLoaded((i=>{i.subscribe(e,t)}))}unsubscribe(e,t){this._doWhenInnerApiLoaded((i=>{i.unsubscribe(e,t)}))}chart(e){return this._innerAPI().chart(e)}getLanguage(){return this._options.locale}setSymbol(e,t,i){this._innerAPI().changeSymbol(e,t,i)}remove(){window.removeEventListener("resize",this._onWindowResize),this._readyHandlers.splice(0,this._readyHandlers.length),delete window[this._id],this._iFrame.parentNode&&this._iFrame.parentNode.removeChild(this._iFrame)}closePopupsAndDialogs(){this._doWhenInnerApiLoaded((e=>{e.closePopupsAndDialogs()}))}selectLineTool(e){this._innerAPI().selectLineTool(e)}selectedLineTool(){return this._innerAPI().selectedLineTool()}save(e){this._innerAPI().saveChart(e)}load(e,t){this._innerAPI().loadChart({json:e,extendedData:t})}getSavedCharts(e){this._innerAPI().getSavedCharts(e)}loadChartFromServer(e){this._innerAPI().loadChartFromServer(e)}saveChartToServer(e,t,i){this._innerAPI().saveChartToServer(e,t,i)}removeChartFromServer(e,t){this._innerAPI().removeChartFromServer(e,t)}onContextMenu(e){this._doWhenInnerApiLoaded((t=>{t.onContextMenu(e)}))}createButton(e){return this._innerWindow().createButton(e)}createDropdown(e){return this._innerWindow().createDropdown(e)}showNoticeDialog(e){this._doWhenInnerApiLoaded((t=>{t.showNoticeDialog(e)}))}showConfirmDialog(e){this._doWhenInnerApiLoaded((t=>{t.showConfirmDialog(e)}))}showLoadChartDialog(){this._innerAPI().showLoadChartDialog()}showSaveAsChartDialog(){this._innerAPI().showSaveAsChartDialog()}symbolInterval(){return this._innerAPI().getSymbolInterval()}mainSeriesPriceFormatter(){return this._innerAPI().mainSeriesPriceFormatter()}getIntervals(){return this._innerAPI().getIntervals()}getStudiesList(){return this._innerAPI().getStudiesList()}getStudyInputs(e){return this._innerAPI().getStudyInputs(e)}addCustomCSSFile(e){this._innerWindow().addCustomCSSFile(e)}applyOverrides(t){this._options=e(this._options,{overrides:t}),this._doWhenInnerWindowLoaded((e=>{e.applyOverrides(t)}))}applyStudiesOverrides(e){this._doWhenInnerWindowLoaded((t=>{t.applyStudiesOverrides(e)}))}watchList(){return this._innerAPI().watchlist()}news(){return this._innerAPI().news()}activeChart(){return this._innerAPI().activeChart()}chartsCount(){return this._innerAPI().chartsCount()}layout(){return this._innerAPI().layout()}setLayout(e){this._innerAPI().setLayout(e)}layoutName(){return this._innerAPI().layoutName()}changeTheme(e,t){return this._innerWindow().changeTheme(e,t)}getTheme(){return this._innerWindow().getTheme()}takeScreenshot(){this._doWhenInnerApiLoaded((e=>{e.takeScreenshot()}))}lockAllDrawingTools(){return this._innerAPI().lockAllDrawingTools()}hideAllDrawingTools(){return this._innerAPI().hideAllDrawingTools()}drawOnAllCharts(e){this._innerAPI().drawOnAllCharts(e)}magnetEnabled(){return this._innerAPI().magnetEnabled()}magnetMode(){return this._innerAPI().magnetMode()}undoRedoState(){return this._innerAPI().undoRedoState()}setIntervalLinkingEnabled(e){this._innerAPI().setIntervalLinkingEnabled(e)}setTimeFrame(e){this._innerAPI().setTimeFrame(e)}symbolSync(){return this._innerAPI().symbolSync()}intervalSync(){return this._innerAPI().intervalSync()}crosshairSync(){return this._innerAPI().crosshairSync()}timeSync(){return this._innerAPI().timeSync()}getAllFeatures(){return this._innerWindow().getAllFeatures()}clearUndoHistory(){return this._innerAPI().clearUndoHistory()}undo(){return this._innerAPI().undo()}redo(){return this._innerAPI().redo()}startFullscreen(){this._innerAPI().startFullscreen()}exitFullscreen(){this._innerAPI().exitFullscreen()}takeClientScreenshot(e){return this._innerAPI().takeClientScreenshot(e)}navigationButtonsVisibility(){return this._innerWindow().getNavigationButtonsVisibility()}paneButtonsVisibility(){return this._innerWindow().getPaneButtonsVisibility()}dateFormat(){return this._innerWindow().getDateFormat()}_innerAPI(){return this._innerWindow().tradingViewApi}_innerWindow(){return this._iFrame.contentWindow}_doWhenInnerWindowLoaded(e){this._ready?e(this._innerWindow()):this._innerWindowLoaded.then((()=>{e(this._innerWindow())}))}_doWhenInnerApiLoaded(e){this._doWhenInnerWindowLoaded((t=>{t.doWhenApiIsReady((()=>e(this._innerAPI())))}))}_autoResizeChart(){this._options.fullscreen&&(this._iFrame.style.height=window.innerHeight+"px")}_create(){const e=this._render();this._options.container_id&&console.warn("`container_id` is now deprecated. Please use `container` instead to either still pass a string or an `HTMLElement`.");const t=this._options.container_id||this._options.container,i="string"==typeof t?document.getElementById(t):t;if(null===i)throw new Error(`There is no such element - #${this._options.container}`);i.innerHTML=e,this._iFrame=i.querySelector(`#${this._id}`);const n=this._iFrame;(this._options.autosize||this._options.fullscreen)&&(n.style.width="100%",this._options.fullscreen||(n.style.height="100%")),window.addEventListener("resize",this._onWindowResize),this._onWindowResize(),this._innerWindowLoaded=new Promise((e=>{const t=()=>{n.removeEventListener("load",t,!1),e()};n.addEventListener("load",t,!1)})),this._innerWindowLoaded.then((()=>{this._innerWindow().widgetReady((()=>{this._ready=!0;for(const e of this._readyHandlers)try{e.call(this)}catch(e){console.error(e)}this._innerWindow().initializationFinished()}))}))}_render(){const e=window;if(e[this._id]={datafeed:this._options.datafeed,customFormatters:this._options.custom_formatters||this._options.customFormatters,brokerFactory:this._options.broker_factory||this._options.brokerFactory,overrides:this._options.overrides,studiesOverrides:this._options.studies_overrides,tradingCustomization:this._options.trading_customization,disabledFeatures:this._options.disabled_features,enabledFeatures:this._options.enabled_features,brokerConfig:this._options.broker_config||this._options.brokerConfig,restConfig:this._options.restConfig,favorites:this._options.favorites,logo:this._options.logo,numeric_formatting:this._options.numeric_formatting,rss_news_feed:this._options.rss_news_feed,newsProvider:this._options.news_provider,loadLastChart:this._options.load_last_chart,saveLoadAdapter:this._options.save_load_adapter,loading_screen:this._options.loading_screen,settingsAdapter:this._options.settings_adapter,getCustomIndicators:this._options.custom_indicators_getter,additionalSymbolInfoFields:this._options.additional_symbol_info_fields,headerWidgetButtonsMode:this._options.header_widget_buttons_mode,symbolSearchComplete:this._options.symbol_search_complete},this._options.saved_data)e[this._id].chartContent={json:this._options.saved_data},this._options.saved_data_meta_info&&(e[this._id].chartContentExtendedData=this._options.saved_data_meta_info);else if(!this._options.load_last_chart&&!this._options.symbol)throw new Error("Symbol is not defined: either 'symbol' or 'load_last_chart' option must be set");const t=(this._options.library_path||"")+`${encodeURIComponent(this._options.locale)}-tv-chart.b0eeabd9.html#symbol=`+encodeURIComponent(this._options.symbol||"")+"&interval="+encodeURIComponent(this._options.interval)+(this._options.timeframe?"&timeframe="+encodeURIComponent(this._options.timeframe):"")+(this._options.toolbar_bg?"&toolbarbg="+encodeURIComponent(this._options.toolbar_bg.replace("#","")):"")+(this._options.studies_access?"&studiesAccess="+encodeURIComponent(JSON.stringify(this._options.studies_access)):"")+"&widgetbar="+encodeURIComponent(JSON.stringify(this._options.widgetbar))+(this._options.drawings_access?"&drawingsAccess="+encodeURIComponent(JSON.stringify(this._options.drawings_access)):"")+"&timeFrames="+encodeURIComponent(JSON.stringify(this._options.time_frames))+"&locale="+encodeURIComponent(this._options.locale)+"&uid="+encodeURIComponent(this._id)+"&clientId="+encodeURIComponent(String(this._options.client_id))+"&userId="+encodeURIComponent(String(this._options.user_id))+(this._options.charts_storage_url?"&chartsStorageUrl="+encodeURIComponent(this._options.charts_storage_url):"")+(this._options.charts_storage_api_version?"&chartsStorageVer="+encodeURIComponent(this._options.charts_storage_api_version):"")+(this._options.custom_css_url?"&customCSS="+encodeURIComponent(this._options.custom_css_url):"")+(this._options.auto_save_delay?"&autoSaveDelay="+encodeURIComponent(String(this._options.auto_save_delay)):"")+"&debug="+encodeURIComponent(String(this._options.debug))+(this._options.snapshot_url?"&snapshotUrl="+encodeURIComponent(this._options.snapshot_url):"")+(this._options.timezone?"&timezone="+encodeURIComponent(this._options.timezone):"")+(this._options.study_count_limit?"&studyCountLimit="+encodeURIComponent(String(this._options.study_count_limit)):"")+(this._options.symbol_search_request_delay?"&ssreqdelay="+encodeURIComponent(String(this._options.symbol_search_request_delay)):"")+(this._options.compare_symbols?"&compareSymbols="+encodeURIComponent(JSON.stringify(this._options.compare_symbols)):"")+(this._options.theme?"&theme="+encodeURIComponent(String(this._options.theme)):"")+(this._options.header_widget_buttons_mode?"&header_widget_buttons_mode="+encodeURIComponent(String(this._options.header_widget_buttons_mode)):"")+(this._options.time_scale?"&time_scale="+encodeURIComponent(JSON.stringify(this._options.time_scale)):"");return''}};window.TradingView=window.TradingView||{},window.TradingView.version=o,exports.version=o,exports.widget=s; +"use strict";function e(t,i){const n={...t};for(const o in i)"object"!=typeof t[o]||null===t[o]||Array.isArray(t[o])?void 0!==i[o]&&(n[o]=i[o]):n[o]=e(t[o],i[o]);return n}Object.defineProperty(exports,"__esModule",{value:!0});const t={mobile:{disabled_features:["left_toolbar","header_widget","timeframes_toolbar","edit_buttons_in_legend","context_menus","control_bar","border_around_the_chart"],enabled_features:[]}},i={width:800,height:500,interval:"1D",timezone:"Etc/UTC",container:"",library_path:"",locale:"en",widgetbar:{details:!1,watchlist:!1,watchlist_settings:{default_symbols:[]}},overrides:{"mainSeriesProperties.showCountdown":!1},studies_overrides:{},trading_customization:{position:{},order:{}},brokerConfig:{configFlags:{}},fullscreen:!1,autosize:!1,disabled_features:[],enabled_features:[],debug:!1,logo:{},time_frames:[{text:"5y",resolution:"1W"},{text:"1y",resolution:"1W"},{text:"6m",resolution:"120"},{text:"3m",resolution:"60"},{text:"1m",resolution:"30"},{text:"5d",resolution:"5"},{text:"1d",resolution:"1"}],client_id:"0",user_id:"0",charts_storage_api_version:"1.0",favorites:{intervals:[],chartTypes:[]}};let n=!1;function o(){return"CL v21.066 (internal id 132c7060 @ 2022-04-01T09:59:44.647Z)"}const s=class{constructor(o){if(this._id=`tradingview_${(1048576*(1+Math.random())|0).toString(16).substring(1)}`,this._ready=!1,this._readyHandlers=[],this._onWindowResize=this._autoResizeChart.bind(this),!o.datafeed)throw new Error("Datafeed is not defined");if(this._options=e(i,o),o.preset){const e=t[o.preset];e?(void 0!==this._options.disabled_features?this._options.disabled_features=this._options.disabled_features.concat(e.disabled_features):this._options.disabled_features=e.disabled_features,void 0!==this._options.enabled_features?this._options.enabled_features=this._options.enabled_features.concat(e.enabled_features):this._options.enabled_features=e.enabled_features):console.warn("Unknown preset: `"+o.preset+"`")}"Dark"===this._options.theme&&void 0===this._options.loading_screen&&(this._options.loading_screen={backgroundColor:"#131722"}),this._options.debug&&(n||(n=!0,console.log("Using CL v21.066 (internal id 132c7060 @ 2022-04-01T09:59:44.647Z)"))),this._create()}onChartReady(e){this._ready?e.call(this):this._readyHandlers.push(e)}headerReady(){return this._innerWindowLoaded.then((()=>this._innerWindow().headerReady()))}onGrayedObjectClicked(e){this._doWhenInnerApiLoaded((t=>{t.onGrayedObjectClicked(e)}))}onShortcut(e,t){this._doWhenInnerWindowLoaded((i=>{i.createShortcutAction(e,t)}))}subscribe(e,t){this._doWhenInnerApiLoaded((i=>{i.subscribe(e,t)}))}unsubscribe(e,t){this._doWhenInnerApiLoaded((i=>{i.unsubscribe(e,t)}))}chart(e){return this._innerAPI().chart(e)}getLanguage(){return this._options.locale}setSymbol(e,t,i){this._innerAPI().changeSymbol(e,t,i)}remove(){window.removeEventListener("resize",this._onWindowResize),this._readyHandlers.splice(0,this._readyHandlers.length),delete window[this._id],this._iFrame.parentNode&&this._iFrame.parentNode.removeChild(this._iFrame)}closePopupsAndDialogs(){this._doWhenInnerApiLoaded((e=>{e.closePopupsAndDialogs()}))}selectLineTool(e){this._innerAPI().selectLineTool(e)}selectedLineTool(){return this._innerAPI().selectedLineTool()}save(e){this._innerAPI().saveChart(e)}load(e,t){this._innerAPI().loadChart({json:e,extendedData:t})}getSavedCharts(e){this._innerAPI().getSavedCharts(e)}loadChartFromServer(e){this._innerAPI().loadChartFromServer(e)}saveChartToServer(e,t,i){this._innerAPI().saveChartToServer(e,t,i)}removeChartFromServer(e,t){this._innerAPI().removeChartFromServer(e,t)}onContextMenu(e){this._doWhenInnerApiLoaded((t=>{t.onContextMenu(e)}))}createButton(e){return this._innerWindow().createButton(e)}createDropdown(e){return this._innerWindow().createDropdown(e)}showNoticeDialog(e){this._doWhenInnerApiLoaded((t=>{t.showNoticeDialog(e)}))}showConfirmDialog(e){this._doWhenInnerApiLoaded((t=>{t.showConfirmDialog(e)}))}showLoadChartDialog(){this._innerAPI().showLoadChartDialog()}showSaveAsChartDialog(){this._innerAPI().showSaveAsChartDialog()}symbolInterval(){return this._innerAPI().getSymbolInterval()}mainSeriesPriceFormatter(){return this._innerAPI().mainSeriesPriceFormatter()}getIntervals(){return this._innerAPI().getIntervals()}getStudiesList(){return this._innerAPI().getStudiesList()}getStudyInputs(e){return this._innerAPI().getStudyInputs(e)}addCustomCSSFile(e){this._innerWindow().addCustomCSSFile(e)}applyOverrides(t){this._options=e(this._options,{overrides:t}),this._doWhenInnerWindowLoaded((e=>{e.applyOverrides(t)}))}applyStudiesOverrides(e){this._doWhenInnerWindowLoaded((t=>{t.applyStudiesOverrides(e)}))}watchList(){return this._innerAPI().watchlist()}news(){return this._innerAPI().news()}activeChart(){return this._innerAPI().activeChart()}chartsCount(){return this._innerAPI().chartsCount()}layout(){return this._innerAPI().layout()}setLayout(e){this._innerAPI().setLayout(e)}layoutName(){return this._innerAPI().layoutName()}changeTheme(e,t){return this._innerWindow().changeTheme(e,t)}getTheme(){return this._innerWindow().getTheme()}takeScreenshot(){this._doWhenInnerApiLoaded((e=>{e.takeScreenshot()}))}lockAllDrawingTools(){return this._innerAPI().lockAllDrawingTools()}hideAllDrawingTools(){return this._innerAPI().hideAllDrawingTools()}drawOnAllCharts(e){this._innerAPI().drawOnAllCharts(e)}magnetEnabled(){return this._innerAPI().magnetEnabled()}magnetMode(){return this._innerAPI().magnetMode()}undoRedoState(){return this._innerAPI().undoRedoState()}setIntervalLinkingEnabled(e){this._innerAPI().setIntervalLinkingEnabled(e)}setTimeFrame(e){this._innerAPI().setTimeFrame(e)}symbolSync(){return this._innerAPI().symbolSync()}intervalSync(){return this._innerAPI().intervalSync()}crosshairSync(){return this._innerAPI().crosshairSync()}timeSync(){return this._innerAPI().timeSync()}getAllFeatures(){return this._innerWindow().getAllFeatures()}clearUndoHistory(){return this._innerAPI().clearUndoHistory()}undo(){return this._innerAPI().undo()}redo(){return this._innerAPI().redo()}startFullscreen(){this._innerAPI().startFullscreen()}exitFullscreen(){this._innerAPI().exitFullscreen()}takeClientScreenshot(e){return this._innerAPI().takeClientScreenshot(e)}navigationButtonsVisibility(){return this._innerWindow().getNavigationButtonsVisibility()}paneButtonsVisibility(){return this._innerWindow().getPaneButtonsVisibility()}dateFormat(){return this._innerWindow().getDateFormat()}_innerAPI(){return this._innerWindow().tradingViewApi}_innerWindow(){return this._iFrame.contentWindow}_doWhenInnerWindowLoaded(e){this._ready?e(this._innerWindow()):this._innerWindowLoaded.then((()=>{e(this._innerWindow())}))}_doWhenInnerApiLoaded(e){this._doWhenInnerWindowLoaded((t=>{t.doWhenApiIsReady((()=>e(this._innerAPI())))}))}_autoResizeChart(){this._options.fullscreen&&(this._iFrame.style.height=window.innerHeight+"px")}_create(){const e=this._render();this._options.container_id&&console.warn("`container_id` is now deprecated. Please use `container` instead to either still pass a string or an `HTMLElement`.");const t=this._options.container_id||this._options.container,i="string"==typeof t?document.getElementById(t):t;if(null===i)throw new Error(`There is no such element - #${this._options.container}`);i.innerHTML=e,this._iFrame=i.querySelector(`#${this._id}`);const n=this._iFrame;(this._options.autosize||this._options.fullscreen)&&(n.style.width="100%",this._options.fullscreen||(n.style.height="100%")),window.addEventListener("resize",this._onWindowResize),this._onWindowResize(),this._innerWindowLoaded=new Promise((e=>{const t=()=>{n.removeEventListener("load",t,!1),e()};n.addEventListener("load",t,!1)})),this._innerWindowLoaded.then((()=>{this._innerWindow().widgetReady((()=>{this._ready=!0;for(const e of this._readyHandlers)try{e.call(this)}catch(e){console.error(e)}this._innerWindow().initializationFinished()}))}))}_render(){const e=window;if(e[this._id]={datafeed:this._options.datafeed,customFormatters:this._options.custom_formatters||this._options.customFormatters,brokerFactory:this._options.broker_factory||this._options.brokerFactory,overrides:this._options.overrides,studiesOverrides:this._options.studies_overrides,tradingCustomization:this._options.trading_customization,disabledFeatures:this._options.disabled_features,enabledFeatures:this._options.enabled_features,brokerConfig:this._options.broker_config||this._options.brokerConfig,restConfig:this._options.restConfig,favorites:this._options.favorites,logo:this._options.logo,numeric_formatting:this._options.numeric_formatting,rss_news_feed:this._options.rss_news_feed,newsProvider:this._options.news_provider,loadLastChart:this._options.load_last_chart,saveLoadAdapter:this._options.save_load_adapter,loading_screen:this._options.loading_screen,settingsAdapter:this._options.settings_adapter,getCustomIndicators:this._options.custom_indicators_getter,additionalSymbolInfoFields:this._options.additional_symbol_info_fields,headerWidgetButtonsMode:this._options.header_widget_buttons_mode,symbolSearchComplete:this._options.symbol_search_complete},this._options.saved_data)e[this._id].chartContent={json:this._options.saved_data},this._options.saved_data_meta_info&&(e[this._id].chartContentExtendedData=this._options.saved_data_meta_info);else if(!this._options.load_last_chart&&!this._options.symbol)throw new Error("Symbol is not defined: either 'symbol' or 'load_last_chart' option must be set");const t=(this._options.library_path||"")+`${encodeURIComponent(this._options.locale)}-tv-chart.132c7060.html#symbol=`+encodeURIComponent(this._options.symbol||"")+"&interval="+encodeURIComponent(this._options.interval)+(this._options.timeframe?"&timeframe="+encodeURIComponent(this._options.timeframe):"")+(this._options.toolbar_bg?"&toolbarbg="+encodeURIComponent(this._options.toolbar_bg.replace("#","")):"")+(this._options.studies_access?"&studiesAccess="+encodeURIComponent(JSON.stringify(this._options.studies_access)):"")+"&widgetbar="+encodeURIComponent(JSON.stringify(this._options.widgetbar))+(this._options.drawings_access?"&drawingsAccess="+encodeURIComponent(JSON.stringify(this._options.drawings_access)):"")+"&timeFrames="+encodeURIComponent(JSON.stringify(this._options.time_frames))+"&locale="+encodeURIComponent(this._options.locale)+"&uid="+encodeURIComponent(this._id)+"&clientId="+encodeURIComponent(String(this._options.client_id))+"&userId="+encodeURIComponent(String(this._options.user_id))+(this._options.charts_storage_url?"&chartsStorageUrl="+encodeURIComponent(this._options.charts_storage_url):"")+(this._options.charts_storage_api_version?"&chartsStorageVer="+encodeURIComponent(this._options.charts_storage_api_version):"")+(this._options.custom_css_url?"&customCSS="+encodeURIComponent(this._options.custom_css_url):"")+(this._options.auto_save_delay?"&autoSaveDelay="+encodeURIComponent(String(this._options.auto_save_delay)):"")+"&debug="+encodeURIComponent(String(this._options.debug))+(this._options.snapshot_url?"&snapshotUrl="+encodeURIComponent(this._options.snapshot_url):"")+(this._options.timezone?"&timezone="+encodeURIComponent(this._options.timezone):"")+(this._options.study_count_limit?"&studyCountLimit="+encodeURIComponent(String(this._options.study_count_limit)):"")+(this._options.symbol_search_request_delay?"&ssreqdelay="+encodeURIComponent(String(this._options.symbol_search_request_delay)):"")+(this._options.compare_symbols?"&compareSymbols="+encodeURIComponent(JSON.stringify(this._options.compare_symbols)):"")+(this._options.theme?"&theme="+encodeURIComponent(String(this._options.theme)):"")+(this._options.header_widget_buttons_mode?"&header_widget_buttons_mode="+encodeURIComponent(String(this._options.header_widget_buttons_mode)):"")+(this._options.time_scale?"&time_scale="+encodeURIComponent(JSON.stringify(this._options.time_scale)):"");return''}};window.TradingView=window.TradingView||{},window.TradingView.version=o,exports.version=o,exports.widget=s; diff --git a/charting_library/charting_library.esm.js b/charting_library/charting_library.esm.js index f67bbdb0..f1221dc2 100644 --- a/charting_library/charting_library.esm.js +++ b/charting_library/charting_library.esm.js @@ -1 +1 @@ -function e(t,i){const n={...t};for(const o in i)"object"!=typeof t[o]||null===t[o]||Array.isArray(t[o])?void 0!==i[o]&&(n[o]=i[o]):n[o]=e(t[o],i[o]);return n}const t={mobile:{disabled_features:["left_toolbar","header_widget","timeframes_toolbar","edit_buttons_in_legend","context_menus","control_bar","border_around_the_chart"],enabled_features:[]}},i={width:800,height:500,interval:"1D",timezone:"Etc/UTC",container:"",library_path:"",locale:"en",widgetbar:{details:!1,watchlist:!1,watchlist_settings:{default_symbols:[]}},overrides:{"mainSeriesProperties.showCountdown":!1},studies_overrides:{},trading_customization:{position:{},order:{}},brokerConfig:{configFlags:{}},fullscreen:!1,autosize:!1,disabled_features:[],enabled_features:[],debug:!1,logo:{},time_frames:[{text:"5y",resolution:"1W"},{text:"1y",resolution:"1W"},{text:"6m",resolution:"120"},{text:"3m",resolution:"60"},{text:"1m",resolution:"30"},{text:"5d",resolution:"5"},{text:"1d",resolution:"1"}],client_id:"0",user_id:"0",charts_storage_api_version:"1.0",favorites:{intervals:[],chartTypes:[]}};let n=!1;function o(){return"CL v21.065 (internal id b0eeabd9 @ 2022-03-29T09:09:40.051Z)"}const s=class{constructor(o){if(this._id=`tradingview_${(1048576*(1+Math.random())|0).toString(16).substring(1)}`,this._ready=!1,this._readyHandlers=[],this._onWindowResize=this._autoResizeChart.bind(this),!o.datafeed)throw new Error("Datafeed is not defined");if(this._options=e(i,o),o.preset){const e=t[o.preset];e?(void 0!==this._options.disabled_features?this._options.disabled_features=this._options.disabled_features.concat(e.disabled_features):this._options.disabled_features=e.disabled_features,void 0!==this._options.enabled_features?this._options.enabled_features=this._options.enabled_features.concat(e.enabled_features):this._options.enabled_features=e.enabled_features):console.warn("Unknown preset: `"+o.preset+"`")}"Dark"===this._options.theme&&void 0===this._options.loading_screen&&(this._options.loading_screen={backgroundColor:"#131722"}),this._options.debug&&(n||(n=!0,console.log("Using CL v21.065 (internal id b0eeabd9 @ 2022-03-29T09:09:40.051Z)"))),this._create()}onChartReady(e){this._ready?e.call(this):this._readyHandlers.push(e)}headerReady(){return this._innerWindowLoaded.then((()=>this._innerWindow().headerReady()))}onGrayedObjectClicked(e){this._doWhenInnerApiLoaded((t=>{t.onGrayedObjectClicked(e)}))}onShortcut(e,t){this._doWhenInnerWindowLoaded((i=>{i.createShortcutAction(e,t)}))}subscribe(e,t){this._doWhenInnerApiLoaded((i=>{i.subscribe(e,t)}))}unsubscribe(e,t){this._doWhenInnerApiLoaded((i=>{i.unsubscribe(e,t)}))}chart(e){return this._innerAPI().chart(e)}getLanguage(){return this._options.locale}setSymbol(e,t,i){this._innerAPI().changeSymbol(e,t,i)}remove(){window.removeEventListener("resize",this._onWindowResize),this._readyHandlers.splice(0,this._readyHandlers.length),delete window[this._id],this._iFrame.parentNode&&this._iFrame.parentNode.removeChild(this._iFrame)}closePopupsAndDialogs(){this._doWhenInnerApiLoaded((e=>{e.closePopupsAndDialogs()}))}selectLineTool(e){this._innerAPI().selectLineTool(e)}selectedLineTool(){return this._innerAPI().selectedLineTool()}save(e){this._innerAPI().saveChart(e)}load(e,t){this._innerAPI().loadChart({json:e,extendedData:t})}getSavedCharts(e){this._innerAPI().getSavedCharts(e)}loadChartFromServer(e){this._innerAPI().loadChartFromServer(e)}saveChartToServer(e,t,i){this._innerAPI().saveChartToServer(e,t,i)}removeChartFromServer(e,t){this._innerAPI().removeChartFromServer(e,t)}onContextMenu(e){this._doWhenInnerApiLoaded((t=>{t.onContextMenu(e)}))}createButton(e){return this._innerWindow().createButton(e)}createDropdown(e){return this._innerWindow().createDropdown(e)}showNoticeDialog(e){this._doWhenInnerApiLoaded((t=>{t.showNoticeDialog(e)}))}showConfirmDialog(e){this._doWhenInnerApiLoaded((t=>{t.showConfirmDialog(e)}))}showLoadChartDialog(){this._innerAPI().showLoadChartDialog()}showSaveAsChartDialog(){this._innerAPI().showSaveAsChartDialog()}symbolInterval(){return this._innerAPI().getSymbolInterval()}mainSeriesPriceFormatter(){return this._innerAPI().mainSeriesPriceFormatter()}getIntervals(){return this._innerAPI().getIntervals()}getStudiesList(){return this._innerAPI().getStudiesList()}getStudyInputs(e){return this._innerAPI().getStudyInputs(e)}addCustomCSSFile(e){this._innerWindow().addCustomCSSFile(e)}applyOverrides(t){this._options=e(this._options,{overrides:t}),this._doWhenInnerWindowLoaded((e=>{e.applyOverrides(t)}))}applyStudiesOverrides(e){this._doWhenInnerWindowLoaded((t=>{t.applyStudiesOverrides(e)}))}watchList(){return this._innerAPI().watchlist()}news(){return this._innerAPI().news()}activeChart(){return this._innerAPI().activeChart()}chartsCount(){return this._innerAPI().chartsCount()}layout(){return this._innerAPI().layout()}setLayout(e){this._innerAPI().setLayout(e)}layoutName(){return this._innerAPI().layoutName()}changeTheme(e,t){return this._innerWindow().changeTheme(e,t)}getTheme(){return this._innerWindow().getTheme()}takeScreenshot(){this._doWhenInnerApiLoaded((e=>{e.takeScreenshot()}))}lockAllDrawingTools(){return this._innerAPI().lockAllDrawingTools()}hideAllDrawingTools(){return this._innerAPI().hideAllDrawingTools()}drawOnAllCharts(e){this._innerAPI().drawOnAllCharts(e)}magnetEnabled(){return this._innerAPI().magnetEnabled()}magnetMode(){return this._innerAPI().magnetMode()}undoRedoState(){return this._innerAPI().undoRedoState()}setIntervalLinkingEnabled(e){this._innerAPI().setIntervalLinkingEnabled(e)}setTimeFrame(e){this._innerAPI().setTimeFrame(e)}symbolSync(){return this._innerAPI().symbolSync()}intervalSync(){return this._innerAPI().intervalSync()}crosshairSync(){return this._innerAPI().crosshairSync()}timeSync(){return this._innerAPI().timeSync()}getAllFeatures(){return this._innerWindow().getAllFeatures()}clearUndoHistory(){return this._innerAPI().clearUndoHistory()}undo(){return this._innerAPI().undo()}redo(){return this._innerAPI().redo()}startFullscreen(){this._innerAPI().startFullscreen()}exitFullscreen(){this._innerAPI().exitFullscreen()}takeClientScreenshot(e){return this._innerAPI().takeClientScreenshot(e)}navigationButtonsVisibility(){return this._innerWindow().getNavigationButtonsVisibility()}paneButtonsVisibility(){return this._innerWindow().getPaneButtonsVisibility()}dateFormat(){return this._innerWindow().getDateFormat()}_innerAPI(){return this._innerWindow().tradingViewApi}_innerWindow(){return this._iFrame.contentWindow}_doWhenInnerWindowLoaded(e){this._ready?e(this._innerWindow()):this._innerWindowLoaded.then((()=>{e(this._innerWindow())}))}_doWhenInnerApiLoaded(e){this._doWhenInnerWindowLoaded((t=>{t.doWhenApiIsReady((()=>e(this._innerAPI())))}))}_autoResizeChart(){this._options.fullscreen&&(this._iFrame.style.height=window.innerHeight+"px")}_create(){const e=this._render();this._options.container_id&&console.warn("`container_id` is now deprecated. Please use `container` instead to either still pass a string or an `HTMLElement`.");const t=this._options.container_id||this._options.container,i="string"==typeof t?document.getElementById(t):t;if(null===i)throw new Error(`There is no such element - #${this._options.container}`);i.innerHTML=e,this._iFrame=i.querySelector(`#${this._id}`);const n=this._iFrame;(this._options.autosize||this._options.fullscreen)&&(n.style.width="100%",this._options.fullscreen||(n.style.height="100%")),window.addEventListener("resize",this._onWindowResize),this._onWindowResize(),this._innerWindowLoaded=new Promise((e=>{const t=()=>{n.removeEventListener("load",t,!1),e()};n.addEventListener("load",t,!1)})),this._innerWindowLoaded.then((()=>{this._innerWindow().widgetReady((()=>{this._ready=!0;for(const e of this._readyHandlers)try{e.call(this)}catch(e){console.error(e)}this._innerWindow().initializationFinished()}))}))}_render(){const e=window;if(e[this._id]={datafeed:this._options.datafeed,customFormatters:this._options.custom_formatters||this._options.customFormatters,brokerFactory:this._options.broker_factory||this._options.brokerFactory,overrides:this._options.overrides,studiesOverrides:this._options.studies_overrides,tradingCustomization:this._options.trading_customization,disabledFeatures:this._options.disabled_features,enabledFeatures:this._options.enabled_features,brokerConfig:this._options.broker_config||this._options.brokerConfig,restConfig:this._options.restConfig,favorites:this._options.favorites,logo:this._options.logo,numeric_formatting:this._options.numeric_formatting,rss_news_feed:this._options.rss_news_feed,newsProvider:this._options.news_provider,loadLastChart:this._options.load_last_chart,saveLoadAdapter:this._options.save_load_adapter,loading_screen:this._options.loading_screen,settingsAdapter:this._options.settings_adapter,getCustomIndicators:this._options.custom_indicators_getter,additionalSymbolInfoFields:this._options.additional_symbol_info_fields,headerWidgetButtonsMode:this._options.header_widget_buttons_mode,symbolSearchComplete:this._options.symbol_search_complete},this._options.saved_data)e[this._id].chartContent={json:this._options.saved_data},this._options.saved_data_meta_info&&(e[this._id].chartContentExtendedData=this._options.saved_data_meta_info);else if(!this._options.load_last_chart&&!this._options.symbol)throw new Error("Symbol is not defined: either 'symbol' or 'load_last_chart' option must be set");const t=(this._options.library_path||"")+`${encodeURIComponent(this._options.locale)}-tv-chart.b0eeabd9.html#symbol=`+encodeURIComponent(this._options.symbol||"")+"&interval="+encodeURIComponent(this._options.interval)+(this._options.timeframe?"&timeframe="+encodeURIComponent(this._options.timeframe):"")+(this._options.toolbar_bg?"&toolbarbg="+encodeURIComponent(this._options.toolbar_bg.replace("#","")):"")+(this._options.studies_access?"&studiesAccess="+encodeURIComponent(JSON.stringify(this._options.studies_access)):"")+"&widgetbar="+encodeURIComponent(JSON.stringify(this._options.widgetbar))+(this._options.drawings_access?"&drawingsAccess="+encodeURIComponent(JSON.stringify(this._options.drawings_access)):"")+"&timeFrames="+encodeURIComponent(JSON.stringify(this._options.time_frames))+"&locale="+encodeURIComponent(this._options.locale)+"&uid="+encodeURIComponent(this._id)+"&clientId="+encodeURIComponent(String(this._options.client_id))+"&userId="+encodeURIComponent(String(this._options.user_id))+(this._options.charts_storage_url?"&chartsStorageUrl="+encodeURIComponent(this._options.charts_storage_url):"")+(this._options.charts_storage_api_version?"&chartsStorageVer="+encodeURIComponent(this._options.charts_storage_api_version):"")+(this._options.custom_css_url?"&customCSS="+encodeURIComponent(this._options.custom_css_url):"")+(this._options.auto_save_delay?"&autoSaveDelay="+encodeURIComponent(String(this._options.auto_save_delay)):"")+"&debug="+encodeURIComponent(String(this._options.debug))+(this._options.snapshot_url?"&snapshotUrl="+encodeURIComponent(this._options.snapshot_url):"")+(this._options.timezone?"&timezone="+encodeURIComponent(this._options.timezone):"")+(this._options.study_count_limit?"&studyCountLimit="+encodeURIComponent(String(this._options.study_count_limit)):"")+(this._options.symbol_search_request_delay?"&ssreqdelay="+encodeURIComponent(String(this._options.symbol_search_request_delay)):"")+(this._options.compare_symbols?"&compareSymbols="+encodeURIComponent(JSON.stringify(this._options.compare_symbols)):"")+(this._options.theme?"&theme="+encodeURIComponent(String(this._options.theme)):"")+(this._options.header_widget_buttons_mode?"&header_widget_buttons_mode="+encodeURIComponent(String(this._options.header_widget_buttons_mode)):"")+(this._options.time_scale?"&time_scale="+encodeURIComponent(JSON.stringify(this._options.time_scale)):"");return''}};window.TradingView=window.TradingView||{},window.TradingView.version=o;export{o as version,s as widget}; +function e(t,i){const n={...t};for(const o in i)"object"!=typeof t[o]||null===t[o]||Array.isArray(t[o])?void 0!==i[o]&&(n[o]=i[o]):n[o]=e(t[o],i[o]);return n}const t={mobile:{disabled_features:["left_toolbar","header_widget","timeframes_toolbar","edit_buttons_in_legend","context_menus","control_bar","border_around_the_chart"],enabled_features:[]}},i={width:800,height:500,interval:"1D",timezone:"Etc/UTC",container:"",library_path:"",locale:"en",widgetbar:{details:!1,watchlist:!1,watchlist_settings:{default_symbols:[]}},overrides:{"mainSeriesProperties.showCountdown":!1},studies_overrides:{},trading_customization:{position:{},order:{}},brokerConfig:{configFlags:{}},fullscreen:!1,autosize:!1,disabled_features:[],enabled_features:[],debug:!1,logo:{},time_frames:[{text:"5y",resolution:"1W"},{text:"1y",resolution:"1W"},{text:"6m",resolution:"120"},{text:"3m",resolution:"60"},{text:"1m",resolution:"30"},{text:"5d",resolution:"5"},{text:"1d",resolution:"1"}],client_id:"0",user_id:"0",charts_storage_api_version:"1.0",favorites:{intervals:[],chartTypes:[]}};let n=!1;function o(){return"CL v21.066 (internal id 132c7060 @ 2022-04-01T09:59:44.647Z)"}const s=class{constructor(o){if(this._id=`tradingview_${(1048576*(1+Math.random())|0).toString(16).substring(1)}`,this._ready=!1,this._readyHandlers=[],this._onWindowResize=this._autoResizeChart.bind(this),!o.datafeed)throw new Error("Datafeed is not defined");if(this._options=e(i,o),o.preset){const e=t[o.preset];e?(void 0!==this._options.disabled_features?this._options.disabled_features=this._options.disabled_features.concat(e.disabled_features):this._options.disabled_features=e.disabled_features,void 0!==this._options.enabled_features?this._options.enabled_features=this._options.enabled_features.concat(e.enabled_features):this._options.enabled_features=e.enabled_features):console.warn("Unknown preset: `"+o.preset+"`")}"Dark"===this._options.theme&&void 0===this._options.loading_screen&&(this._options.loading_screen={backgroundColor:"#131722"}),this._options.debug&&(n||(n=!0,console.log("Using CL v21.066 (internal id 132c7060 @ 2022-04-01T09:59:44.647Z)"))),this._create()}onChartReady(e){this._ready?e.call(this):this._readyHandlers.push(e)}headerReady(){return this._innerWindowLoaded.then((()=>this._innerWindow().headerReady()))}onGrayedObjectClicked(e){this._doWhenInnerApiLoaded((t=>{t.onGrayedObjectClicked(e)}))}onShortcut(e,t){this._doWhenInnerWindowLoaded((i=>{i.createShortcutAction(e,t)}))}subscribe(e,t){this._doWhenInnerApiLoaded((i=>{i.subscribe(e,t)}))}unsubscribe(e,t){this._doWhenInnerApiLoaded((i=>{i.unsubscribe(e,t)}))}chart(e){return this._innerAPI().chart(e)}getLanguage(){return this._options.locale}setSymbol(e,t,i){this._innerAPI().changeSymbol(e,t,i)}remove(){window.removeEventListener("resize",this._onWindowResize),this._readyHandlers.splice(0,this._readyHandlers.length),delete window[this._id],this._iFrame.parentNode&&this._iFrame.parentNode.removeChild(this._iFrame)}closePopupsAndDialogs(){this._doWhenInnerApiLoaded((e=>{e.closePopupsAndDialogs()}))}selectLineTool(e){this._innerAPI().selectLineTool(e)}selectedLineTool(){return this._innerAPI().selectedLineTool()}save(e){this._innerAPI().saveChart(e)}load(e,t){this._innerAPI().loadChart({json:e,extendedData:t})}getSavedCharts(e){this._innerAPI().getSavedCharts(e)}loadChartFromServer(e){this._innerAPI().loadChartFromServer(e)}saveChartToServer(e,t,i){this._innerAPI().saveChartToServer(e,t,i)}removeChartFromServer(e,t){this._innerAPI().removeChartFromServer(e,t)}onContextMenu(e){this._doWhenInnerApiLoaded((t=>{t.onContextMenu(e)}))}createButton(e){return this._innerWindow().createButton(e)}createDropdown(e){return this._innerWindow().createDropdown(e)}showNoticeDialog(e){this._doWhenInnerApiLoaded((t=>{t.showNoticeDialog(e)}))}showConfirmDialog(e){this._doWhenInnerApiLoaded((t=>{t.showConfirmDialog(e)}))}showLoadChartDialog(){this._innerAPI().showLoadChartDialog()}showSaveAsChartDialog(){this._innerAPI().showSaveAsChartDialog()}symbolInterval(){return this._innerAPI().getSymbolInterval()}mainSeriesPriceFormatter(){return this._innerAPI().mainSeriesPriceFormatter()}getIntervals(){return this._innerAPI().getIntervals()}getStudiesList(){return this._innerAPI().getStudiesList()}getStudyInputs(e){return this._innerAPI().getStudyInputs(e)}addCustomCSSFile(e){this._innerWindow().addCustomCSSFile(e)}applyOverrides(t){this._options=e(this._options,{overrides:t}),this._doWhenInnerWindowLoaded((e=>{e.applyOverrides(t)}))}applyStudiesOverrides(e){this._doWhenInnerWindowLoaded((t=>{t.applyStudiesOverrides(e)}))}watchList(){return this._innerAPI().watchlist()}news(){return this._innerAPI().news()}activeChart(){return this._innerAPI().activeChart()}chartsCount(){return this._innerAPI().chartsCount()}layout(){return this._innerAPI().layout()}setLayout(e){this._innerAPI().setLayout(e)}layoutName(){return this._innerAPI().layoutName()}changeTheme(e,t){return this._innerWindow().changeTheme(e,t)}getTheme(){return this._innerWindow().getTheme()}takeScreenshot(){this._doWhenInnerApiLoaded((e=>{e.takeScreenshot()}))}lockAllDrawingTools(){return this._innerAPI().lockAllDrawingTools()}hideAllDrawingTools(){return this._innerAPI().hideAllDrawingTools()}drawOnAllCharts(e){this._innerAPI().drawOnAllCharts(e)}magnetEnabled(){return this._innerAPI().magnetEnabled()}magnetMode(){return this._innerAPI().magnetMode()}undoRedoState(){return this._innerAPI().undoRedoState()}setIntervalLinkingEnabled(e){this._innerAPI().setIntervalLinkingEnabled(e)}setTimeFrame(e){this._innerAPI().setTimeFrame(e)}symbolSync(){return this._innerAPI().symbolSync()}intervalSync(){return this._innerAPI().intervalSync()}crosshairSync(){return this._innerAPI().crosshairSync()}timeSync(){return this._innerAPI().timeSync()}getAllFeatures(){return this._innerWindow().getAllFeatures()}clearUndoHistory(){return this._innerAPI().clearUndoHistory()}undo(){return this._innerAPI().undo()}redo(){return this._innerAPI().redo()}startFullscreen(){this._innerAPI().startFullscreen()}exitFullscreen(){this._innerAPI().exitFullscreen()}takeClientScreenshot(e){return this._innerAPI().takeClientScreenshot(e)}navigationButtonsVisibility(){return this._innerWindow().getNavigationButtonsVisibility()}paneButtonsVisibility(){return this._innerWindow().getPaneButtonsVisibility()}dateFormat(){return this._innerWindow().getDateFormat()}_innerAPI(){return this._innerWindow().tradingViewApi}_innerWindow(){return this._iFrame.contentWindow}_doWhenInnerWindowLoaded(e){this._ready?e(this._innerWindow()):this._innerWindowLoaded.then((()=>{e(this._innerWindow())}))}_doWhenInnerApiLoaded(e){this._doWhenInnerWindowLoaded((t=>{t.doWhenApiIsReady((()=>e(this._innerAPI())))}))}_autoResizeChart(){this._options.fullscreen&&(this._iFrame.style.height=window.innerHeight+"px")}_create(){const e=this._render();this._options.container_id&&console.warn("`container_id` is now deprecated. Please use `container` instead to either still pass a string or an `HTMLElement`.");const t=this._options.container_id||this._options.container,i="string"==typeof t?document.getElementById(t):t;if(null===i)throw new Error(`There is no such element - #${this._options.container}`);i.innerHTML=e,this._iFrame=i.querySelector(`#${this._id}`);const n=this._iFrame;(this._options.autosize||this._options.fullscreen)&&(n.style.width="100%",this._options.fullscreen||(n.style.height="100%")),window.addEventListener("resize",this._onWindowResize),this._onWindowResize(),this._innerWindowLoaded=new Promise((e=>{const t=()=>{n.removeEventListener("load",t,!1),e()};n.addEventListener("load",t,!1)})),this._innerWindowLoaded.then((()=>{this._innerWindow().widgetReady((()=>{this._ready=!0;for(const e of this._readyHandlers)try{e.call(this)}catch(e){console.error(e)}this._innerWindow().initializationFinished()}))}))}_render(){const e=window;if(e[this._id]={datafeed:this._options.datafeed,customFormatters:this._options.custom_formatters||this._options.customFormatters,brokerFactory:this._options.broker_factory||this._options.brokerFactory,overrides:this._options.overrides,studiesOverrides:this._options.studies_overrides,tradingCustomization:this._options.trading_customization,disabledFeatures:this._options.disabled_features,enabledFeatures:this._options.enabled_features,brokerConfig:this._options.broker_config||this._options.brokerConfig,restConfig:this._options.restConfig,favorites:this._options.favorites,logo:this._options.logo,numeric_formatting:this._options.numeric_formatting,rss_news_feed:this._options.rss_news_feed,newsProvider:this._options.news_provider,loadLastChart:this._options.load_last_chart,saveLoadAdapter:this._options.save_load_adapter,loading_screen:this._options.loading_screen,settingsAdapter:this._options.settings_adapter,getCustomIndicators:this._options.custom_indicators_getter,additionalSymbolInfoFields:this._options.additional_symbol_info_fields,headerWidgetButtonsMode:this._options.header_widget_buttons_mode,symbolSearchComplete:this._options.symbol_search_complete},this._options.saved_data)e[this._id].chartContent={json:this._options.saved_data},this._options.saved_data_meta_info&&(e[this._id].chartContentExtendedData=this._options.saved_data_meta_info);else if(!this._options.load_last_chart&&!this._options.symbol)throw new Error("Symbol is not defined: either 'symbol' or 'load_last_chart' option must be set");const t=(this._options.library_path||"")+`${encodeURIComponent(this._options.locale)}-tv-chart.132c7060.html#symbol=`+encodeURIComponent(this._options.symbol||"")+"&interval="+encodeURIComponent(this._options.interval)+(this._options.timeframe?"&timeframe="+encodeURIComponent(this._options.timeframe):"")+(this._options.toolbar_bg?"&toolbarbg="+encodeURIComponent(this._options.toolbar_bg.replace("#","")):"")+(this._options.studies_access?"&studiesAccess="+encodeURIComponent(JSON.stringify(this._options.studies_access)):"")+"&widgetbar="+encodeURIComponent(JSON.stringify(this._options.widgetbar))+(this._options.drawings_access?"&drawingsAccess="+encodeURIComponent(JSON.stringify(this._options.drawings_access)):"")+"&timeFrames="+encodeURIComponent(JSON.stringify(this._options.time_frames))+"&locale="+encodeURIComponent(this._options.locale)+"&uid="+encodeURIComponent(this._id)+"&clientId="+encodeURIComponent(String(this._options.client_id))+"&userId="+encodeURIComponent(String(this._options.user_id))+(this._options.charts_storage_url?"&chartsStorageUrl="+encodeURIComponent(this._options.charts_storage_url):"")+(this._options.charts_storage_api_version?"&chartsStorageVer="+encodeURIComponent(this._options.charts_storage_api_version):"")+(this._options.custom_css_url?"&customCSS="+encodeURIComponent(this._options.custom_css_url):"")+(this._options.auto_save_delay?"&autoSaveDelay="+encodeURIComponent(String(this._options.auto_save_delay)):"")+"&debug="+encodeURIComponent(String(this._options.debug))+(this._options.snapshot_url?"&snapshotUrl="+encodeURIComponent(this._options.snapshot_url):"")+(this._options.timezone?"&timezone="+encodeURIComponent(this._options.timezone):"")+(this._options.study_count_limit?"&studyCountLimit="+encodeURIComponent(String(this._options.study_count_limit)):"")+(this._options.symbol_search_request_delay?"&ssreqdelay="+encodeURIComponent(String(this._options.symbol_search_request_delay)):"")+(this._options.compare_symbols?"&compareSymbols="+encodeURIComponent(JSON.stringify(this._options.compare_symbols)):"")+(this._options.theme?"&theme="+encodeURIComponent(String(this._options.theme)):"")+(this._options.header_widget_buttons_mode?"&header_widget_buttons_mode="+encodeURIComponent(String(this._options.header_widget_buttons_mode)):"")+(this._options.time_scale?"&time_scale="+encodeURIComponent(JSON.stringify(this._options.time_scale)):"");return''}};window.TradingView=window.TradingView||{},window.TradingView.version=o;export{o as version,s as widget}; diff --git a/charting_library/charting_library.js b/charting_library/charting_library.js index b0c95062..b3129697 100644 --- a/charting_library/charting_library.js +++ b/charting_library/charting_library.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).TradingView={})}(this,(function(e){"use strict";function t(e,i){const n={...e};for(const o in i)"object"!=typeof e[o]||null===e[o]||Array.isArray(e[o])?void 0!==i[o]&&(n[o]=i[o]):n[o]=t(e[o],i[o]);return n}const i={mobile:{disabled_features:["left_toolbar","header_widget","timeframes_toolbar","edit_buttons_in_legend","context_menus","control_bar","border_around_the_chart"],enabled_features:[]}},n={width:800,height:500,interval:"1D",timezone:"Etc/UTC",container:"",library_path:"",locale:"en",widgetbar:{details:!1,watchlist:!1,watchlist_settings:{default_symbols:[]}},overrides:{"mainSeriesProperties.showCountdown":!1},studies_overrides:{},trading_customization:{position:{},order:{}},brokerConfig:{configFlags:{}},fullscreen:!1,autosize:!1,disabled_features:[],enabled_features:[],debug:!1,logo:{},time_frames:[{text:"5y",resolution:"1W"},{text:"1y",resolution:"1W"},{text:"6m",resolution:"120"},{text:"3m",resolution:"60"},{text:"1m",resolution:"30"},{text:"5d",resolution:"5"},{text:"1d",resolution:"1"}],client_id:"0",user_id:"0",charts_storage_api_version:"1.0",favorites:{intervals:[],chartTypes:[]}};let o=!1;function s(){return"CL v21.065 (internal id b0eeabd9 @ 2022-03-29T09:09:40.051Z)"}const r=class{constructor(e){if(this._id=`tradingview_${(1048576*(1+Math.random())|0).toString(16).substring(1)}`,this._ready=!1,this._readyHandlers=[],this._onWindowResize=this._autoResizeChart.bind(this),!e.datafeed)throw new Error("Datafeed is not defined");if(this._options=t(n,e),e.preset){const t=i[e.preset];t?(void 0!==this._options.disabled_features?this._options.disabled_features=this._options.disabled_features.concat(t.disabled_features):this._options.disabled_features=t.disabled_features,void 0!==this._options.enabled_features?this._options.enabled_features=this._options.enabled_features.concat(t.enabled_features):this._options.enabled_features=t.enabled_features):console.warn("Unknown preset: `"+e.preset+"`")}"Dark"===this._options.theme&&void 0===this._options.loading_screen&&(this._options.loading_screen={backgroundColor:"#131722"}),this._options.debug&&(o||(o=!0,console.log("Using CL v21.065 (internal id b0eeabd9 @ 2022-03-29T09:09:40.051Z)"))),this._create()}onChartReady(e){this._ready?e.call(this):this._readyHandlers.push(e)}headerReady(){return this._innerWindowLoaded.then((()=>this._innerWindow().headerReady()))}onGrayedObjectClicked(e){this._doWhenInnerApiLoaded((t=>{t.onGrayedObjectClicked(e)}))}onShortcut(e,t){this._doWhenInnerWindowLoaded((i=>{i.createShortcutAction(e,t)}))}subscribe(e,t){this._doWhenInnerApiLoaded((i=>{i.subscribe(e,t)}))}unsubscribe(e,t){this._doWhenInnerApiLoaded((i=>{i.unsubscribe(e,t)}))}chart(e){return this._innerAPI().chart(e)}getLanguage(){return this._options.locale}setSymbol(e,t,i){this._innerAPI().changeSymbol(e,t,i)}remove(){window.removeEventListener("resize",this._onWindowResize),this._readyHandlers.splice(0,this._readyHandlers.length),delete window[this._id],this._iFrame.parentNode&&this._iFrame.parentNode.removeChild(this._iFrame)}closePopupsAndDialogs(){this._doWhenInnerApiLoaded((e=>{e.closePopupsAndDialogs()}))}selectLineTool(e){this._innerAPI().selectLineTool(e)}selectedLineTool(){return this._innerAPI().selectedLineTool()}save(e){this._innerAPI().saveChart(e)}load(e,t){this._innerAPI().loadChart({json:e,extendedData:t})}getSavedCharts(e){this._innerAPI().getSavedCharts(e)}loadChartFromServer(e){this._innerAPI().loadChartFromServer(e)}saveChartToServer(e,t,i){this._innerAPI().saveChartToServer(e,t,i)}removeChartFromServer(e,t){this._innerAPI().removeChartFromServer(e,t)}onContextMenu(e){this._doWhenInnerApiLoaded((t=>{t.onContextMenu(e)}))}createButton(e){return this._innerWindow().createButton(e)}createDropdown(e){return this._innerWindow().createDropdown(e)}showNoticeDialog(e){this._doWhenInnerApiLoaded((t=>{t.showNoticeDialog(e)}))}showConfirmDialog(e){this._doWhenInnerApiLoaded((t=>{t.showConfirmDialog(e)}))}showLoadChartDialog(){this._innerAPI().showLoadChartDialog()}showSaveAsChartDialog(){this._innerAPI().showSaveAsChartDialog()}symbolInterval(){return this._innerAPI().getSymbolInterval()}mainSeriesPriceFormatter(){return this._innerAPI().mainSeriesPriceFormatter()}getIntervals(){return this._innerAPI().getIntervals()}getStudiesList(){return this._innerAPI().getStudiesList()}getStudyInputs(e){return this._innerAPI().getStudyInputs(e)}addCustomCSSFile(e){this._innerWindow().addCustomCSSFile(e)}applyOverrides(e){this._options=t(this._options,{overrides:e}),this._doWhenInnerWindowLoaded((t=>{t.applyOverrides(e)}))}applyStudiesOverrides(e){this._doWhenInnerWindowLoaded((t=>{t.applyStudiesOverrides(e)}))}watchList(){return this._innerAPI().watchlist()}news(){return this._innerAPI().news()}activeChart(){return this._innerAPI().activeChart()}chartsCount(){return this._innerAPI().chartsCount()}layout(){return this._innerAPI().layout()}setLayout(e){this._innerAPI().setLayout(e)}layoutName(){return this._innerAPI().layoutName()}changeTheme(e,t){return this._innerWindow().changeTheme(e,t)}getTheme(){return this._innerWindow().getTheme()}takeScreenshot(){this._doWhenInnerApiLoaded((e=>{e.takeScreenshot()}))}lockAllDrawingTools(){return this._innerAPI().lockAllDrawingTools()}hideAllDrawingTools(){return this._innerAPI().hideAllDrawingTools()}drawOnAllCharts(e){this._innerAPI().drawOnAllCharts(e)}magnetEnabled(){return this._innerAPI().magnetEnabled()}magnetMode(){return this._innerAPI().magnetMode()}undoRedoState(){return this._innerAPI().undoRedoState()}setIntervalLinkingEnabled(e){this._innerAPI().setIntervalLinkingEnabled(e)}setTimeFrame(e){this._innerAPI().setTimeFrame(e)}symbolSync(){return this._innerAPI().symbolSync()}intervalSync(){return this._innerAPI().intervalSync()}crosshairSync(){return this._innerAPI().crosshairSync()}timeSync(){return this._innerAPI().timeSync()}getAllFeatures(){return this._innerWindow().getAllFeatures()}clearUndoHistory(){return this._innerAPI().clearUndoHistory()}undo(){return this._innerAPI().undo()}redo(){return this._innerAPI().redo()}startFullscreen(){this._innerAPI().startFullscreen()}exitFullscreen(){this._innerAPI().exitFullscreen()}takeClientScreenshot(e){return this._innerAPI().takeClientScreenshot(e)}navigationButtonsVisibility(){return this._innerWindow().getNavigationButtonsVisibility()}paneButtonsVisibility(){return this._innerWindow().getPaneButtonsVisibility()}dateFormat(){return this._innerWindow().getDateFormat()}_innerAPI(){return this._innerWindow().tradingViewApi}_innerWindow(){return this._iFrame.contentWindow}_doWhenInnerWindowLoaded(e){this._ready?e(this._innerWindow()):this._innerWindowLoaded.then((()=>{e(this._innerWindow())}))}_doWhenInnerApiLoaded(e){this._doWhenInnerWindowLoaded((t=>{t.doWhenApiIsReady((()=>e(this._innerAPI())))}))}_autoResizeChart(){this._options.fullscreen&&(this._iFrame.style.height=window.innerHeight+"px")}_create(){const e=this._render();this._options.container_id&&console.warn("`container_id` is now deprecated. Please use `container` instead to either still pass a string or an `HTMLElement`.");const t=this._options.container_id||this._options.container,i="string"==typeof t?document.getElementById(t):t;if(null===i)throw new Error(`There is no such element - #${this._options.container}`);i.innerHTML=e,this._iFrame=i.querySelector(`#${this._id}`);const n=this._iFrame;(this._options.autosize||this._options.fullscreen)&&(n.style.width="100%",this._options.fullscreen||(n.style.height="100%")),window.addEventListener("resize",this._onWindowResize),this._onWindowResize(),this._innerWindowLoaded=new Promise((e=>{const t=()=>{n.removeEventListener("load",t,!1),e()};n.addEventListener("load",t,!1)})),this._innerWindowLoaded.then((()=>{this._innerWindow().widgetReady((()=>{this._ready=!0;for(const e of this._readyHandlers)try{e.call(this)}catch(e){console.error(e)}this._innerWindow().initializationFinished()}))}))}_render(){const e=window;if(e[this._id]={datafeed:this._options.datafeed,customFormatters:this._options.custom_formatters||this._options.customFormatters,brokerFactory:this._options.broker_factory||this._options.brokerFactory,overrides:this._options.overrides,studiesOverrides:this._options.studies_overrides,tradingCustomization:this._options.trading_customization,disabledFeatures:this._options.disabled_features,enabledFeatures:this._options.enabled_features,brokerConfig:this._options.broker_config||this._options.brokerConfig,restConfig:this._options.restConfig,favorites:this._options.favorites,logo:this._options.logo,numeric_formatting:this._options.numeric_formatting,rss_news_feed:this._options.rss_news_feed,newsProvider:this._options.news_provider,loadLastChart:this._options.load_last_chart,saveLoadAdapter:this._options.save_load_adapter,loading_screen:this._options.loading_screen,settingsAdapter:this._options.settings_adapter,getCustomIndicators:this._options.custom_indicators_getter,additionalSymbolInfoFields:this._options.additional_symbol_info_fields,headerWidgetButtonsMode:this._options.header_widget_buttons_mode,symbolSearchComplete:this._options.symbol_search_complete},this._options.saved_data)e[this._id].chartContent={json:this._options.saved_data},this._options.saved_data_meta_info&&(e[this._id].chartContentExtendedData=this._options.saved_data_meta_info);else if(!this._options.load_last_chart&&!this._options.symbol)throw new Error("Symbol is not defined: either 'symbol' or 'load_last_chart' option must be set");const t=(this._options.library_path||"")+`${encodeURIComponent(this._options.locale)}-tv-chart.b0eeabd9.html#symbol=`+encodeURIComponent(this._options.symbol||"")+"&interval="+encodeURIComponent(this._options.interval)+(this._options.timeframe?"&timeframe="+encodeURIComponent(this._options.timeframe):"")+(this._options.toolbar_bg?"&toolbarbg="+encodeURIComponent(this._options.toolbar_bg.replace("#","")):"")+(this._options.studies_access?"&studiesAccess="+encodeURIComponent(JSON.stringify(this._options.studies_access)):"")+"&widgetbar="+encodeURIComponent(JSON.stringify(this._options.widgetbar))+(this._options.drawings_access?"&drawingsAccess="+encodeURIComponent(JSON.stringify(this._options.drawings_access)):"")+"&timeFrames="+encodeURIComponent(JSON.stringify(this._options.time_frames))+"&locale="+encodeURIComponent(this._options.locale)+"&uid="+encodeURIComponent(this._id)+"&clientId="+encodeURIComponent(String(this._options.client_id))+"&userId="+encodeURIComponent(String(this._options.user_id))+(this._options.charts_storage_url?"&chartsStorageUrl="+encodeURIComponent(this._options.charts_storage_url):"")+(this._options.charts_storage_api_version?"&chartsStorageVer="+encodeURIComponent(this._options.charts_storage_api_version):"")+(this._options.custom_css_url?"&customCSS="+encodeURIComponent(this._options.custom_css_url):"")+(this._options.auto_save_delay?"&autoSaveDelay="+encodeURIComponent(String(this._options.auto_save_delay)):"")+"&debug="+encodeURIComponent(String(this._options.debug))+(this._options.snapshot_url?"&snapshotUrl="+encodeURIComponent(this._options.snapshot_url):"")+(this._options.timezone?"&timezone="+encodeURIComponent(this._options.timezone):"")+(this._options.study_count_limit?"&studyCountLimit="+encodeURIComponent(String(this._options.study_count_limit)):"")+(this._options.symbol_search_request_delay?"&ssreqdelay="+encodeURIComponent(String(this._options.symbol_search_request_delay)):"")+(this._options.compare_symbols?"&compareSymbols="+encodeURIComponent(JSON.stringify(this._options.compare_symbols)):"")+(this._options.theme?"&theme="+encodeURIComponent(String(this._options.theme)):"")+(this._options.header_widget_buttons_mode?"&header_widget_buttons_mode="+encodeURIComponent(String(this._options.header_widget_buttons_mode)):"")+(this._options.time_scale?"&time_scale="+encodeURIComponent(JSON.stringify(this._options.time_scale)):"");return''}};window.TradingView=window.TradingView||{},window.TradingView.version=s,e.version=s,e.widget=r,Object.defineProperty(e,"__esModule",{value:!0})})); +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).TradingView={})}(this,(function(e){"use strict";function t(e,i){const n={...e};for(const o in i)"object"!=typeof e[o]||null===e[o]||Array.isArray(e[o])?void 0!==i[o]&&(n[o]=i[o]):n[o]=t(e[o],i[o]);return n}const i={mobile:{disabled_features:["left_toolbar","header_widget","timeframes_toolbar","edit_buttons_in_legend","context_menus","control_bar","border_around_the_chart"],enabled_features:[]}},n={width:800,height:500,interval:"1D",timezone:"Etc/UTC",container:"",library_path:"",locale:"en",widgetbar:{details:!1,watchlist:!1,watchlist_settings:{default_symbols:[]}},overrides:{"mainSeriesProperties.showCountdown":!1},studies_overrides:{},trading_customization:{position:{},order:{}},brokerConfig:{configFlags:{}},fullscreen:!1,autosize:!1,disabled_features:[],enabled_features:[],debug:!1,logo:{},time_frames:[{text:"5y",resolution:"1W"},{text:"1y",resolution:"1W"},{text:"6m",resolution:"120"},{text:"3m",resolution:"60"},{text:"1m",resolution:"30"},{text:"5d",resolution:"5"},{text:"1d",resolution:"1"}],client_id:"0",user_id:"0",charts_storage_api_version:"1.0",favorites:{intervals:[],chartTypes:[]}};let o=!1;function s(){return"CL v21.066 (internal id 132c7060 @ 2022-04-01T09:59:44.647Z)"}const r=class{constructor(e){if(this._id=`tradingview_${(1048576*(1+Math.random())|0).toString(16).substring(1)}`,this._ready=!1,this._readyHandlers=[],this._onWindowResize=this._autoResizeChart.bind(this),!e.datafeed)throw new Error("Datafeed is not defined");if(this._options=t(n,e),e.preset){const t=i[e.preset];t?(void 0!==this._options.disabled_features?this._options.disabled_features=this._options.disabled_features.concat(t.disabled_features):this._options.disabled_features=t.disabled_features,void 0!==this._options.enabled_features?this._options.enabled_features=this._options.enabled_features.concat(t.enabled_features):this._options.enabled_features=t.enabled_features):console.warn("Unknown preset: `"+e.preset+"`")}"Dark"===this._options.theme&&void 0===this._options.loading_screen&&(this._options.loading_screen={backgroundColor:"#131722"}),this._options.debug&&(o||(o=!0,console.log("Using CL v21.066 (internal id 132c7060 @ 2022-04-01T09:59:44.647Z)"))),this._create()}onChartReady(e){this._ready?e.call(this):this._readyHandlers.push(e)}headerReady(){return this._innerWindowLoaded.then((()=>this._innerWindow().headerReady()))}onGrayedObjectClicked(e){this._doWhenInnerApiLoaded((t=>{t.onGrayedObjectClicked(e)}))}onShortcut(e,t){this._doWhenInnerWindowLoaded((i=>{i.createShortcutAction(e,t)}))}subscribe(e,t){this._doWhenInnerApiLoaded((i=>{i.subscribe(e,t)}))}unsubscribe(e,t){this._doWhenInnerApiLoaded((i=>{i.unsubscribe(e,t)}))}chart(e){return this._innerAPI().chart(e)}getLanguage(){return this._options.locale}setSymbol(e,t,i){this._innerAPI().changeSymbol(e,t,i)}remove(){window.removeEventListener("resize",this._onWindowResize),this._readyHandlers.splice(0,this._readyHandlers.length),delete window[this._id],this._iFrame.parentNode&&this._iFrame.parentNode.removeChild(this._iFrame)}closePopupsAndDialogs(){this._doWhenInnerApiLoaded((e=>{e.closePopupsAndDialogs()}))}selectLineTool(e){this._innerAPI().selectLineTool(e)}selectedLineTool(){return this._innerAPI().selectedLineTool()}save(e){this._innerAPI().saveChart(e)}load(e,t){this._innerAPI().loadChart({json:e,extendedData:t})}getSavedCharts(e){this._innerAPI().getSavedCharts(e)}loadChartFromServer(e){this._innerAPI().loadChartFromServer(e)}saveChartToServer(e,t,i){this._innerAPI().saveChartToServer(e,t,i)}removeChartFromServer(e,t){this._innerAPI().removeChartFromServer(e,t)}onContextMenu(e){this._doWhenInnerApiLoaded((t=>{t.onContextMenu(e)}))}createButton(e){return this._innerWindow().createButton(e)}createDropdown(e){return this._innerWindow().createDropdown(e)}showNoticeDialog(e){this._doWhenInnerApiLoaded((t=>{t.showNoticeDialog(e)}))}showConfirmDialog(e){this._doWhenInnerApiLoaded((t=>{t.showConfirmDialog(e)}))}showLoadChartDialog(){this._innerAPI().showLoadChartDialog()}showSaveAsChartDialog(){this._innerAPI().showSaveAsChartDialog()}symbolInterval(){return this._innerAPI().getSymbolInterval()}mainSeriesPriceFormatter(){return this._innerAPI().mainSeriesPriceFormatter()}getIntervals(){return this._innerAPI().getIntervals()}getStudiesList(){return this._innerAPI().getStudiesList()}getStudyInputs(e){return this._innerAPI().getStudyInputs(e)}addCustomCSSFile(e){this._innerWindow().addCustomCSSFile(e)}applyOverrides(e){this._options=t(this._options,{overrides:e}),this._doWhenInnerWindowLoaded((t=>{t.applyOverrides(e)}))}applyStudiesOverrides(e){this._doWhenInnerWindowLoaded((t=>{t.applyStudiesOverrides(e)}))}watchList(){return this._innerAPI().watchlist()}news(){return this._innerAPI().news()}activeChart(){return this._innerAPI().activeChart()}chartsCount(){return this._innerAPI().chartsCount()}layout(){return this._innerAPI().layout()}setLayout(e){this._innerAPI().setLayout(e)}layoutName(){return this._innerAPI().layoutName()}changeTheme(e,t){return this._innerWindow().changeTheme(e,t)}getTheme(){return this._innerWindow().getTheme()}takeScreenshot(){this._doWhenInnerApiLoaded((e=>{e.takeScreenshot()}))}lockAllDrawingTools(){return this._innerAPI().lockAllDrawingTools()}hideAllDrawingTools(){return this._innerAPI().hideAllDrawingTools()}drawOnAllCharts(e){this._innerAPI().drawOnAllCharts(e)}magnetEnabled(){return this._innerAPI().magnetEnabled()}magnetMode(){return this._innerAPI().magnetMode()}undoRedoState(){return this._innerAPI().undoRedoState()}setIntervalLinkingEnabled(e){this._innerAPI().setIntervalLinkingEnabled(e)}setTimeFrame(e){this._innerAPI().setTimeFrame(e)}symbolSync(){return this._innerAPI().symbolSync()}intervalSync(){return this._innerAPI().intervalSync()}crosshairSync(){return this._innerAPI().crosshairSync()}timeSync(){return this._innerAPI().timeSync()}getAllFeatures(){return this._innerWindow().getAllFeatures()}clearUndoHistory(){return this._innerAPI().clearUndoHistory()}undo(){return this._innerAPI().undo()}redo(){return this._innerAPI().redo()}startFullscreen(){this._innerAPI().startFullscreen()}exitFullscreen(){this._innerAPI().exitFullscreen()}takeClientScreenshot(e){return this._innerAPI().takeClientScreenshot(e)}navigationButtonsVisibility(){return this._innerWindow().getNavigationButtonsVisibility()}paneButtonsVisibility(){return this._innerWindow().getPaneButtonsVisibility()}dateFormat(){return this._innerWindow().getDateFormat()}_innerAPI(){return this._innerWindow().tradingViewApi}_innerWindow(){return this._iFrame.contentWindow}_doWhenInnerWindowLoaded(e){this._ready?e(this._innerWindow()):this._innerWindowLoaded.then((()=>{e(this._innerWindow())}))}_doWhenInnerApiLoaded(e){this._doWhenInnerWindowLoaded((t=>{t.doWhenApiIsReady((()=>e(this._innerAPI())))}))}_autoResizeChart(){this._options.fullscreen&&(this._iFrame.style.height=window.innerHeight+"px")}_create(){const e=this._render();this._options.container_id&&console.warn("`container_id` is now deprecated. Please use `container` instead to either still pass a string or an `HTMLElement`.");const t=this._options.container_id||this._options.container,i="string"==typeof t?document.getElementById(t):t;if(null===i)throw new Error(`There is no such element - #${this._options.container}`);i.innerHTML=e,this._iFrame=i.querySelector(`#${this._id}`);const n=this._iFrame;(this._options.autosize||this._options.fullscreen)&&(n.style.width="100%",this._options.fullscreen||(n.style.height="100%")),window.addEventListener("resize",this._onWindowResize),this._onWindowResize(),this._innerWindowLoaded=new Promise((e=>{const t=()=>{n.removeEventListener("load",t,!1),e()};n.addEventListener("load",t,!1)})),this._innerWindowLoaded.then((()=>{this._innerWindow().widgetReady((()=>{this._ready=!0;for(const e of this._readyHandlers)try{e.call(this)}catch(e){console.error(e)}this._innerWindow().initializationFinished()}))}))}_render(){const e=window;if(e[this._id]={datafeed:this._options.datafeed,customFormatters:this._options.custom_formatters||this._options.customFormatters,brokerFactory:this._options.broker_factory||this._options.brokerFactory,overrides:this._options.overrides,studiesOverrides:this._options.studies_overrides,tradingCustomization:this._options.trading_customization,disabledFeatures:this._options.disabled_features,enabledFeatures:this._options.enabled_features,brokerConfig:this._options.broker_config||this._options.brokerConfig,restConfig:this._options.restConfig,favorites:this._options.favorites,logo:this._options.logo,numeric_formatting:this._options.numeric_formatting,rss_news_feed:this._options.rss_news_feed,newsProvider:this._options.news_provider,loadLastChart:this._options.load_last_chart,saveLoadAdapter:this._options.save_load_adapter,loading_screen:this._options.loading_screen,settingsAdapter:this._options.settings_adapter,getCustomIndicators:this._options.custom_indicators_getter,additionalSymbolInfoFields:this._options.additional_symbol_info_fields,headerWidgetButtonsMode:this._options.header_widget_buttons_mode,symbolSearchComplete:this._options.symbol_search_complete},this._options.saved_data)e[this._id].chartContent={json:this._options.saved_data},this._options.saved_data_meta_info&&(e[this._id].chartContentExtendedData=this._options.saved_data_meta_info);else if(!this._options.load_last_chart&&!this._options.symbol)throw new Error("Symbol is not defined: either 'symbol' or 'load_last_chart' option must be set");const t=(this._options.library_path||"")+`${encodeURIComponent(this._options.locale)}-tv-chart.132c7060.html#symbol=`+encodeURIComponent(this._options.symbol||"")+"&interval="+encodeURIComponent(this._options.interval)+(this._options.timeframe?"&timeframe="+encodeURIComponent(this._options.timeframe):"")+(this._options.toolbar_bg?"&toolbarbg="+encodeURIComponent(this._options.toolbar_bg.replace("#","")):"")+(this._options.studies_access?"&studiesAccess="+encodeURIComponent(JSON.stringify(this._options.studies_access)):"")+"&widgetbar="+encodeURIComponent(JSON.stringify(this._options.widgetbar))+(this._options.drawings_access?"&drawingsAccess="+encodeURIComponent(JSON.stringify(this._options.drawings_access)):"")+"&timeFrames="+encodeURIComponent(JSON.stringify(this._options.time_frames))+"&locale="+encodeURIComponent(this._options.locale)+"&uid="+encodeURIComponent(this._id)+"&clientId="+encodeURIComponent(String(this._options.client_id))+"&userId="+encodeURIComponent(String(this._options.user_id))+(this._options.charts_storage_url?"&chartsStorageUrl="+encodeURIComponent(this._options.charts_storage_url):"")+(this._options.charts_storage_api_version?"&chartsStorageVer="+encodeURIComponent(this._options.charts_storage_api_version):"")+(this._options.custom_css_url?"&customCSS="+encodeURIComponent(this._options.custom_css_url):"")+(this._options.auto_save_delay?"&autoSaveDelay="+encodeURIComponent(String(this._options.auto_save_delay)):"")+"&debug="+encodeURIComponent(String(this._options.debug))+(this._options.snapshot_url?"&snapshotUrl="+encodeURIComponent(this._options.snapshot_url):"")+(this._options.timezone?"&timezone="+encodeURIComponent(this._options.timezone):"")+(this._options.study_count_limit?"&studyCountLimit="+encodeURIComponent(String(this._options.study_count_limit)):"")+(this._options.symbol_search_request_delay?"&ssreqdelay="+encodeURIComponent(String(this._options.symbol_search_request_delay)):"")+(this._options.compare_symbols?"&compareSymbols="+encodeURIComponent(JSON.stringify(this._options.compare_symbols)):"")+(this._options.theme?"&theme="+encodeURIComponent(String(this._options.theme)):"")+(this._options.header_widget_buttons_mode?"&header_widget_buttons_mode="+encodeURIComponent(String(this._options.header_widget_buttons_mode)):"")+(this._options.time_scale?"&time_scale="+encodeURIComponent(JSON.stringify(this._options.time_scale)):"");return''}};window.TradingView=window.TradingView||{},window.TradingView.version=s,e.version=s,e.widget=r,Object.defineProperty(e,"__esModule",{value:!0})})); diff --git a/charting_library/charting_library.standalone.js b/charting_library/charting_library.standalone.js index 298751f8..7a92f20b 100644 --- a/charting_library/charting_library.standalone.js +++ b/charting_library/charting_library.standalone.js @@ -1 +1 @@ -var TradingView=function(e){"use strict";function t(e,i){const n={...e};for(const o in i)"object"!=typeof e[o]||null===e[o]||Array.isArray(e[o])?void 0!==i[o]&&(n[o]=i[o]):n[o]=t(e[o],i[o]);return n}const i={mobile:{disabled_features:["left_toolbar","header_widget","timeframes_toolbar","edit_buttons_in_legend","context_menus","control_bar","border_around_the_chart"],enabled_features:[]}},n={width:800,height:500,interval:"1D",timezone:"Etc/UTC",container:"",library_path:"",locale:"en",widgetbar:{details:!1,watchlist:!1,watchlist_settings:{default_symbols:[]}},overrides:{"mainSeriesProperties.showCountdown":!1},studies_overrides:{},trading_customization:{position:{},order:{}},brokerConfig:{configFlags:{}},fullscreen:!1,autosize:!1,disabled_features:[],enabled_features:[],debug:!1,logo:{},time_frames:[{text:"5y",resolution:"1W"},{text:"1y",resolution:"1W"},{text:"6m",resolution:"120"},{text:"3m",resolution:"60"},{text:"1m",resolution:"30"},{text:"5d",resolution:"5"},{text:"1d",resolution:"1"}],client_id:"0",user_id:"0",charts_storage_api_version:"1.0",favorites:{intervals:[],chartTypes:[]}};let o=!1;function s(){return"CL v21.065 (internal id b0eeabd9 @ 2022-03-29T09:09:40.051Z)"}const r=class{constructor(e){if(this._id=`tradingview_${(1048576*(1+Math.random())|0).toString(16).substring(1)}`,this._ready=!1,this._readyHandlers=[],this._onWindowResize=this._autoResizeChart.bind(this),!e.datafeed)throw new Error("Datafeed is not defined");if(this._options=t(n,e),e.preset){const t=i[e.preset];t?(void 0!==this._options.disabled_features?this._options.disabled_features=this._options.disabled_features.concat(t.disabled_features):this._options.disabled_features=t.disabled_features,void 0!==this._options.enabled_features?this._options.enabled_features=this._options.enabled_features.concat(t.enabled_features):this._options.enabled_features=t.enabled_features):console.warn("Unknown preset: `"+e.preset+"`")}"Dark"===this._options.theme&&void 0===this._options.loading_screen&&(this._options.loading_screen={backgroundColor:"#131722"}),this._options.debug&&(o||(o=!0,console.log("Using CL v21.065 (internal id b0eeabd9 @ 2022-03-29T09:09:40.051Z)"))),this._create()}onChartReady(e){this._ready?e.call(this):this._readyHandlers.push(e)}headerReady(){return this._innerWindowLoaded.then((()=>this._innerWindow().headerReady()))}onGrayedObjectClicked(e){this._doWhenInnerApiLoaded((t=>{t.onGrayedObjectClicked(e)}))}onShortcut(e,t){this._doWhenInnerWindowLoaded((i=>{i.createShortcutAction(e,t)}))}subscribe(e,t){this._doWhenInnerApiLoaded((i=>{i.subscribe(e,t)}))}unsubscribe(e,t){this._doWhenInnerApiLoaded((i=>{i.unsubscribe(e,t)}))}chart(e){return this._innerAPI().chart(e)}getLanguage(){return this._options.locale}setSymbol(e,t,i){this._innerAPI().changeSymbol(e,t,i)}remove(){window.removeEventListener("resize",this._onWindowResize),this._readyHandlers.splice(0,this._readyHandlers.length),delete window[this._id],this._iFrame.parentNode&&this._iFrame.parentNode.removeChild(this._iFrame)}closePopupsAndDialogs(){this._doWhenInnerApiLoaded((e=>{e.closePopupsAndDialogs()}))}selectLineTool(e){this._innerAPI().selectLineTool(e)}selectedLineTool(){return this._innerAPI().selectedLineTool()}save(e){this._innerAPI().saveChart(e)}load(e,t){this._innerAPI().loadChart({json:e,extendedData:t})}getSavedCharts(e){this._innerAPI().getSavedCharts(e)}loadChartFromServer(e){this._innerAPI().loadChartFromServer(e)}saveChartToServer(e,t,i){this._innerAPI().saveChartToServer(e,t,i)}removeChartFromServer(e,t){this._innerAPI().removeChartFromServer(e,t)}onContextMenu(e){this._doWhenInnerApiLoaded((t=>{t.onContextMenu(e)}))}createButton(e){return this._innerWindow().createButton(e)}createDropdown(e){return this._innerWindow().createDropdown(e)}showNoticeDialog(e){this._doWhenInnerApiLoaded((t=>{t.showNoticeDialog(e)}))}showConfirmDialog(e){this._doWhenInnerApiLoaded((t=>{t.showConfirmDialog(e)}))}showLoadChartDialog(){this._innerAPI().showLoadChartDialog()}showSaveAsChartDialog(){this._innerAPI().showSaveAsChartDialog()}symbolInterval(){return this._innerAPI().getSymbolInterval()}mainSeriesPriceFormatter(){return this._innerAPI().mainSeriesPriceFormatter()}getIntervals(){return this._innerAPI().getIntervals()}getStudiesList(){return this._innerAPI().getStudiesList()}getStudyInputs(e){return this._innerAPI().getStudyInputs(e)}addCustomCSSFile(e){this._innerWindow().addCustomCSSFile(e)}applyOverrides(e){this._options=t(this._options,{overrides:e}),this._doWhenInnerWindowLoaded((t=>{t.applyOverrides(e)}))}applyStudiesOverrides(e){this._doWhenInnerWindowLoaded((t=>{t.applyStudiesOverrides(e)}))}watchList(){return this._innerAPI().watchlist()}news(){return this._innerAPI().news()}activeChart(){return this._innerAPI().activeChart()}chartsCount(){return this._innerAPI().chartsCount()}layout(){return this._innerAPI().layout()}setLayout(e){this._innerAPI().setLayout(e)}layoutName(){return this._innerAPI().layoutName()}changeTheme(e,t){return this._innerWindow().changeTheme(e,t)}getTheme(){return this._innerWindow().getTheme()}takeScreenshot(){this._doWhenInnerApiLoaded((e=>{e.takeScreenshot()}))}lockAllDrawingTools(){return this._innerAPI().lockAllDrawingTools()}hideAllDrawingTools(){return this._innerAPI().hideAllDrawingTools()}drawOnAllCharts(e){this._innerAPI().drawOnAllCharts(e)}magnetEnabled(){return this._innerAPI().magnetEnabled()}magnetMode(){return this._innerAPI().magnetMode()}undoRedoState(){return this._innerAPI().undoRedoState()}setIntervalLinkingEnabled(e){this._innerAPI().setIntervalLinkingEnabled(e)}setTimeFrame(e){this._innerAPI().setTimeFrame(e)}symbolSync(){return this._innerAPI().symbolSync()}intervalSync(){return this._innerAPI().intervalSync()}crosshairSync(){return this._innerAPI().crosshairSync()}timeSync(){return this._innerAPI().timeSync()}getAllFeatures(){return this._innerWindow().getAllFeatures()}clearUndoHistory(){return this._innerAPI().clearUndoHistory()}undo(){return this._innerAPI().undo()}redo(){return this._innerAPI().redo()}startFullscreen(){this._innerAPI().startFullscreen()}exitFullscreen(){this._innerAPI().exitFullscreen()}takeClientScreenshot(e){return this._innerAPI().takeClientScreenshot(e)}navigationButtonsVisibility(){return this._innerWindow().getNavigationButtonsVisibility()}paneButtonsVisibility(){return this._innerWindow().getPaneButtonsVisibility()}dateFormat(){return this._innerWindow().getDateFormat()}_innerAPI(){return this._innerWindow().tradingViewApi}_innerWindow(){return this._iFrame.contentWindow}_doWhenInnerWindowLoaded(e){this._ready?e(this._innerWindow()):this._innerWindowLoaded.then((()=>{e(this._innerWindow())}))}_doWhenInnerApiLoaded(e){this._doWhenInnerWindowLoaded((t=>{t.doWhenApiIsReady((()=>e(this._innerAPI())))}))}_autoResizeChart(){this._options.fullscreen&&(this._iFrame.style.height=window.innerHeight+"px")}_create(){const e=this._render();this._options.container_id&&console.warn("`container_id` is now deprecated. Please use `container` instead to either still pass a string or an `HTMLElement`.");const t=this._options.container_id||this._options.container,i="string"==typeof t?document.getElementById(t):t;if(null===i)throw new Error(`There is no such element - #${this._options.container}`);i.innerHTML=e,this._iFrame=i.querySelector(`#${this._id}`);const n=this._iFrame;(this._options.autosize||this._options.fullscreen)&&(n.style.width="100%",this._options.fullscreen||(n.style.height="100%")),window.addEventListener("resize",this._onWindowResize),this._onWindowResize(),this._innerWindowLoaded=new Promise((e=>{const t=()=>{n.removeEventListener("load",t,!1),e()};n.addEventListener("load",t,!1)})),this._innerWindowLoaded.then((()=>{this._innerWindow().widgetReady((()=>{this._ready=!0;for(const e of this._readyHandlers)try{e.call(this)}catch(e){console.error(e)}this._innerWindow().initializationFinished()}))}))}_render(){const e=window;if(e[this._id]={datafeed:this._options.datafeed,customFormatters:this._options.custom_formatters||this._options.customFormatters,brokerFactory:this._options.broker_factory||this._options.brokerFactory,overrides:this._options.overrides,studiesOverrides:this._options.studies_overrides,tradingCustomization:this._options.trading_customization,disabledFeatures:this._options.disabled_features,enabledFeatures:this._options.enabled_features,brokerConfig:this._options.broker_config||this._options.brokerConfig,restConfig:this._options.restConfig,favorites:this._options.favorites,logo:this._options.logo,numeric_formatting:this._options.numeric_formatting,rss_news_feed:this._options.rss_news_feed,newsProvider:this._options.news_provider,loadLastChart:this._options.load_last_chart,saveLoadAdapter:this._options.save_load_adapter,loading_screen:this._options.loading_screen,settingsAdapter:this._options.settings_adapter,getCustomIndicators:this._options.custom_indicators_getter,additionalSymbolInfoFields:this._options.additional_symbol_info_fields,headerWidgetButtonsMode:this._options.header_widget_buttons_mode,symbolSearchComplete:this._options.symbol_search_complete},this._options.saved_data)e[this._id].chartContent={json:this._options.saved_data},this._options.saved_data_meta_info&&(e[this._id].chartContentExtendedData=this._options.saved_data_meta_info);else if(!this._options.load_last_chart&&!this._options.symbol)throw new Error("Symbol is not defined: either 'symbol' or 'load_last_chart' option must be set");const t=(this._options.library_path||"")+`${encodeURIComponent(this._options.locale)}-tv-chart.b0eeabd9.html#symbol=`+encodeURIComponent(this._options.symbol||"")+"&interval="+encodeURIComponent(this._options.interval)+(this._options.timeframe?"&timeframe="+encodeURIComponent(this._options.timeframe):"")+(this._options.toolbar_bg?"&toolbarbg="+encodeURIComponent(this._options.toolbar_bg.replace("#","")):"")+(this._options.studies_access?"&studiesAccess="+encodeURIComponent(JSON.stringify(this._options.studies_access)):"")+"&widgetbar="+encodeURIComponent(JSON.stringify(this._options.widgetbar))+(this._options.drawings_access?"&drawingsAccess="+encodeURIComponent(JSON.stringify(this._options.drawings_access)):"")+"&timeFrames="+encodeURIComponent(JSON.stringify(this._options.time_frames))+"&locale="+encodeURIComponent(this._options.locale)+"&uid="+encodeURIComponent(this._id)+"&clientId="+encodeURIComponent(String(this._options.client_id))+"&userId="+encodeURIComponent(String(this._options.user_id))+(this._options.charts_storage_url?"&chartsStorageUrl="+encodeURIComponent(this._options.charts_storage_url):"")+(this._options.charts_storage_api_version?"&chartsStorageVer="+encodeURIComponent(this._options.charts_storage_api_version):"")+(this._options.custom_css_url?"&customCSS="+encodeURIComponent(this._options.custom_css_url):"")+(this._options.auto_save_delay?"&autoSaveDelay="+encodeURIComponent(String(this._options.auto_save_delay)):"")+"&debug="+encodeURIComponent(String(this._options.debug))+(this._options.snapshot_url?"&snapshotUrl="+encodeURIComponent(this._options.snapshot_url):"")+(this._options.timezone?"&timezone="+encodeURIComponent(this._options.timezone):"")+(this._options.study_count_limit?"&studyCountLimit="+encodeURIComponent(String(this._options.study_count_limit)):"")+(this._options.symbol_search_request_delay?"&ssreqdelay="+encodeURIComponent(String(this._options.symbol_search_request_delay)):"")+(this._options.compare_symbols?"&compareSymbols="+encodeURIComponent(JSON.stringify(this._options.compare_symbols)):"")+(this._options.theme?"&theme="+encodeURIComponent(String(this._options.theme)):"")+(this._options.header_widget_buttons_mode?"&header_widget_buttons_mode="+encodeURIComponent(String(this._options.header_widget_buttons_mode)):"")+(this._options.time_scale?"&time_scale="+encodeURIComponent(JSON.stringify(this._options.time_scale)):"");return''}};return window.TradingView=window.TradingView||{},window.TradingView.version=s,e.version=s,e.widget=r,e}({}); +var TradingView=function(e){"use strict";function t(e,i){const n={...e};for(const o in i)"object"!=typeof e[o]||null===e[o]||Array.isArray(e[o])?void 0!==i[o]&&(n[o]=i[o]):n[o]=t(e[o],i[o]);return n}const i={mobile:{disabled_features:["left_toolbar","header_widget","timeframes_toolbar","edit_buttons_in_legend","context_menus","control_bar","border_around_the_chart"],enabled_features:[]}},n={width:800,height:500,interval:"1D",timezone:"Etc/UTC",container:"",library_path:"",locale:"en",widgetbar:{details:!1,watchlist:!1,watchlist_settings:{default_symbols:[]}},overrides:{"mainSeriesProperties.showCountdown":!1},studies_overrides:{},trading_customization:{position:{},order:{}},brokerConfig:{configFlags:{}},fullscreen:!1,autosize:!1,disabled_features:[],enabled_features:[],debug:!1,logo:{},time_frames:[{text:"5y",resolution:"1W"},{text:"1y",resolution:"1W"},{text:"6m",resolution:"120"},{text:"3m",resolution:"60"},{text:"1m",resolution:"30"},{text:"5d",resolution:"5"},{text:"1d",resolution:"1"}],client_id:"0",user_id:"0",charts_storage_api_version:"1.0",favorites:{intervals:[],chartTypes:[]}};let o=!1;function s(){return"CL v21.066 (internal id 132c7060 @ 2022-04-01T09:59:44.647Z)"}const r=class{constructor(e){if(this._id=`tradingview_${(1048576*(1+Math.random())|0).toString(16).substring(1)}`,this._ready=!1,this._readyHandlers=[],this._onWindowResize=this._autoResizeChart.bind(this),!e.datafeed)throw new Error("Datafeed is not defined");if(this._options=t(n,e),e.preset){const t=i[e.preset];t?(void 0!==this._options.disabled_features?this._options.disabled_features=this._options.disabled_features.concat(t.disabled_features):this._options.disabled_features=t.disabled_features,void 0!==this._options.enabled_features?this._options.enabled_features=this._options.enabled_features.concat(t.enabled_features):this._options.enabled_features=t.enabled_features):console.warn("Unknown preset: `"+e.preset+"`")}"Dark"===this._options.theme&&void 0===this._options.loading_screen&&(this._options.loading_screen={backgroundColor:"#131722"}),this._options.debug&&(o||(o=!0,console.log("Using CL v21.066 (internal id 132c7060 @ 2022-04-01T09:59:44.647Z)"))),this._create()}onChartReady(e){this._ready?e.call(this):this._readyHandlers.push(e)}headerReady(){return this._innerWindowLoaded.then((()=>this._innerWindow().headerReady()))}onGrayedObjectClicked(e){this._doWhenInnerApiLoaded((t=>{t.onGrayedObjectClicked(e)}))}onShortcut(e,t){this._doWhenInnerWindowLoaded((i=>{i.createShortcutAction(e,t)}))}subscribe(e,t){this._doWhenInnerApiLoaded((i=>{i.subscribe(e,t)}))}unsubscribe(e,t){this._doWhenInnerApiLoaded((i=>{i.unsubscribe(e,t)}))}chart(e){return this._innerAPI().chart(e)}getLanguage(){return this._options.locale}setSymbol(e,t,i){this._innerAPI().changeSymbol(e,t,i)}remove(){window.removeEventListener("resize",this._onWindowResize),this._readyHandlers.splice(0,this._readyHandlers.length),delete window[this._id],this._iFrame.parentNode&&this._iFrame.parentNode.removeChild(this._iFrame)}closePopupsAndDialogs(){this._doWhenInnerApiLoaded((e=>{e.closePopupsAndDialogs()}))}selectLineTool(e){this._innerAPI().selectLineTool(e)}selectedLineTool(){return this._innerAPI().selectedLineTool()}save(e){this._innerAPI().saveChart(e)}load(e,t){this._innerAPI().loadChart({json:e,extendedData:t})}getSavedCharts(e){this._innerAPI().getSavedCharts(e)}loadChartFromServer(e){this._innerAPI().loadChartFromServer(e)}saveChartToServer(e,t,i){this._innerAPI().saveChartToServer(e,t,i)}removeChartFromServer(e,t){this._innerAPI().removeChartFromServer(e,t)}onContextMenu(e){this._doWhenInnerApiLoaded((t=>{t.onContextMenu(e)}))}createButton(e){return this._innerWindow().createButton(e)}createDropdown(e){return this._innerWindow().createDropdown(e)}showNoticeDialog(e){this._doWhenInnerApiLoaded((t=>{t.showNoticeDialog(e)}))}showConfirmDialog(e){this._doWhenInnerApiLoaded((t=>{t.showConfirmDialog(e)}))}showLoadChartDialog(){this._innerAPI().showLoadChartDialog()}showSaveAsChartDialog(){this._innerAPI().showSaveAsChartDialog()}symbolInterval(){return this._innerAPI().getSymbolInterval()}mainSeriesPriceFormatter(){return this._innerAPI().mainSeriesPriceFormatter()}getIntervals(){return this._innerAPI().getIntervals()}getStudiesList(){return this._innerAPI().getStudiesList()}getStudyInputs(e){return this._innerAPI().getStudyInputs(e)}addCustomCSSFile(e){this._innerWindow().addCustomCSSFile(e)}applyOverrides(e){this._options=t(this._options,{overrides:e}),this._doWhenInnerWindowLoaded((t=>{t.applyOverrides(e)}))}applyStudiesOverrides(e){this._doWhenInnerWindowLoaded((t=>{t.applyStudiesOverrides(e)}))}watchList(){return this._innerAPI().watchlist()}news(){return this._innerAPI().news()}activeChart(){return this._innerAPI().activeChart()}chartsCount(){return this._innerAPI().chartsCount()}layout(){return this._innerAPI().layout()}setLayout(e){this._innerAPI().setLayout(e)}layoutName(){return this._innerAPI().layoutName()}changeTheme(e,t){return this._innerWindow().changeTheme(e,t)}getTheme(){return this._innerWindow().getTheme()}takeScreenshot(){this._doWhenInnerApiLoaded((e=>{e.takeScreenshot()}))}lockAllDrawingTools(){return this._innerAPI().lockAllDrawingTools()}hideAllDrawingTools(){return this._innerAPI().hideAllDrawingTools()}drawOnAllCharts(e){this._innerAPI().drawOnAllCharts(e)}magnetEnabled(){return this._innerAPI().magnetEnabled()}magnetMode(){return this._innerAPI().magnetMode()}undoRedoState(){return this._innerAPI().undoRedoState()}setIntervalLinkingEnabled(e){this._innerAPI().setIntervalLinkingEnabled(e)}setTimeFrame(e){this._innerAPI().setTimeFrame(e)}symbolSync(){return this._innerAPI().symbolSync()}intervalSync(){return this._innerAPI().intervalSync()}crosshairSync(){return this._innerAPI().crosshairSync()}timeSync(){return this._innerAPI().timeSync()}getAllFeatures(){return this._innerWindow().getAllFeatures()}clearUndoHistory(){return this._innerAPI().clearUndoHistory()}undo(){return this._innerAPI().undo()}redo(){return this._innerAPI().redo()}startFullscreen(){this._innerAPI().startFullscreen()}exitFullscreen(){this._innerAPI().exitFullscreen()}takeClientScreenshot(e){return this._innerAPI().takeClientScreenshot(e)}navigationButtonsVisibility(){return this._innerWindow().getNavigationButtonsVisibility()}paneButtonsVisibility(){return this._innerWindow().getPaneButtonsVisibility()}dateFormat(){return this._innerWindow().getDateFormat()}_innerAPI(){return this._innerWindow().tradingViewApi}_innerWindow(){return this._iFrame.contentWindow}_doWhenInnerWindowLoaded(e){this._ready?e(this._innerWindow()):this._innerWindowLoaded.then((()=>{e(this._innerWindow())}))}_doWhenInnerApiLoaded(e){this._doWhenInnerWindowLoaded((t=>{t.doWhenApiIsReady((()=>e(this._innerAPI())))}))}_autoResizeChart(){this._options.fullscreen&&(this._iFrame.style.height=window.innerHeight+"px")}_create(){const e=this._render();this._options.container_id&&console.warn("`container_id` is now deprecated. Please use `container` instead to either still pass a string or an `HTMLElement`.");const t=this._options.container_id||this._options.container,i="string"==typeof t?document.getElementById(t):t;if(null===i)throw new Error(`There is no such element - #${this._options.container}`);i.innerHTML=e,this._iFrame=i.querySelector(`#${this._id}`);const n=this._iFrame;(this._options.autosize||this._options.fullscreen)&&(n.style.width="100%",this._options.fullscreen||(n.style.height="100%")),window.addEventListener("resize",this._onWindowResize),this._onWindowResize(),this._innerWindowLoaded=new Promise((e=>{const t=()=>{n.removeEventListener("load",t,!1),e()};n.addEventListener("load",t,!1)})),this._innerWindowLoaded.then((()=>{this._innerWindow().widgetReady((()=>{this._ready=!0;for(const e of this._readyHandlers)try{e.call(this)}catch(e){console.error(e)}this._innerWindow().initializationFinished()}))}))}_render(){const e=window;if(e[this._id]={datafeed:this._options.datafeed,customFormatters:this._options.custom_formatters||this._options.customFormatters,brokerFactory:this._options.broker_factory||this._options.brokerFactory,overrides:this._options.overrides,studiesOverrides:this._options.studies_overrides,tradingCustomization:this._options.trading_customization,disabledFeatures:this._options.disabled_features,enabledFeatures:this._options.enabled_features,brokerConfig:this._options.broker_config||this._options.brokerConfig,restConfig:this._options.restConfig,favorites:this._options.favorites,logo:this._options.logo,numeric_formatting:this._options.numeric_formatting,rss_news_feed:this._options.rss_news_feed,newsProvider:this._options.news_provider,loadLastChart:this._options.load_last_chart,saveLoadAdapter:this._options.save_load_adapter,loading_screen:this._options.loading_screen,settingsAdapter:this._options.settings_adapter,getCustomIndicators:this._options.custom_indicators_getter,additionalSymbolInfoFields:this._options.additional_symbol_info_fields,headerWidgetButtonsMode:this._options.header_widget_buttons_mode,symbolSearchComplete:this._options.symbol_search_complete},this._options.saved_data)e[this._id].chartContent={json:this._options.saved_data},this._options.saved_data_meta_info&&(e[this._id].chartContentExtendedData=this._options.saved_data_meta_info);else if(!this._options.load_last_chart&&!this._options.symbol)throw new Error("Symbol is not defined: either 'symbol' or 'load_last_chart' option must be set");const t=(this._options.library_path||"")+`${encodeURIComponent(this._options.locale)}-tv-chart.132c7060.html#symbol=`+encodeURIComponent(this._options.symbol||"")+"&interval="+encodeURIComponent(this._options.interval)+(this._options.timeframe?"&timeframe="+encodeURIComponent(this._options.timeframe):"")+(this._options.toolbar_bg?"&toolbarbg="+encodeURIComponent(this._options.toolbar_bg.replace("#","")):"")+(this._options.studies_access?"&studiesAccess="+encodeURIComponent(JSON.stringify(this._options.studies_access)):"")+"&widgetbar="+encodeURIComponent(JSON.stringify(this._options.widgetbar))+(this._options.drawings_access?"&drawingsAccess="+encodeURIComponent(JSON.stringify(this._options.drawings_access)):"")+"&timeFrames="+encodeURIComponent(JSON.stringify(this._options.time_frames))+"&locale="+encodeURIComponent(this._options.locale)+"&uid="+encodeURIComponent(this._id)+"&clientId="+encodeURIComponent(String(this._options.client_id))+"&userId="+encodeURIComponent(String(this._options.user_id))+(this._options.charts_storage_url?"&chartsStorageUrl="+encodeURIComponent(this._options.charts_storage_url):"")+(this._options.charts_storage_api_version?"&chartsStorageVer="+encodeURIComponent(this._options.charts_storage_api_version):"")+(this._options.custom_css_url?"&customCSS="+encodeURIComponent(this._options.custom_css_url):"")+(this._options.auto_save_delay?"&autoSaveDelay="+encodeURIComponent(String(this._options.auto_save_delay)):"")+"&debug="+encodeURIComponent(String(this._options.debug))+(this._options.snapshot_url?"&snapshotUrl="+encodeURIComponent(this._options.snapshot_url):"")+(this._options.timezone?"&timezone="+encodeURIComponent(this._options.timezone):"")+(this._options.study_count_limit?"&studyCountLimit="+encodeURIComponent(String(this._options.study_count_limit)):"")+(this._options.symbol_search_request_delay?"&ssreqdelay="+encodeURIComponent(String(this._options.symbol_search_request_delay)):"")+(this._options.compare_symbols?"&compareSymbols="+encodeURIComponent(JSON.stringify(this._options.compare_symbols)):"")+(this._options.theme?"&theme="+encodeURIComponent(String(this._options.theme)):"")+(this._options.header_widget_buttons_mode?"&header_widget_buttons_mode="+encodeURIComponent(String(this._options.header_widget_buttons_mode)):"")+(this._options.time_scale?"&time_scale="+encodeURIComponent(JSON.stringify(this._options.time_scale)):"");return''}};return window.TradingView=window.TradingView||{},window.TradingView.version=s,e.version=s,e.widget=r,e}({}); diff --git a/charting_library/cs-tv-chart.b0eeabd9.html b/charting_library/cs-tv-chart.132c7060.html similarity index 99% rename from charting_library/cs-tv-chart.b0eeabd9.html rename to charting_library/cs-tv-chart.132c7060.html index fad9c684..b3ba5372 100644 --- a/charting_library/cs-tv-chart.b0eeabd9.html +++ b/charting_library/cs-tv-chart.132c7060.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/da_DK-tv-chart.b0eeabd9.html b/charting_library/da_DK-tv-chart.132c7060.html similarity index 99% rename from charting_library/da_DK-tv-chart.b0eeabd9.html rename to charting_library/da_DK-tv-chart.132c7060.html index 8ee94cba..84ecf59b 100644 --- a/charting_library/da_DK-tv-chart.b0eeabd9.html +++ b/charting_library/da_DK-tv-chart.132c7060.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/de-tv-chart.b0eeabd9.html b/charting_library/de-tv-chart.132c7060.html similarity index 99% rename from charting_library/de-tv-chart.b0eeabd9.html rename to charting_library/de-tv-chart.132c7060.html index d67c6bf3..ada83542 100644 --- a/charting_library/de-tv-chart.b0eeabd9.html +++ b/charting_library/de-tv-chart.132c7060.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/el-tv-chart.b0eeabd9.html b/charting_library/el-tv-chart.132c7060.html similarity index 99% rename from charting_library/el-tv-chart.b0eeabd9.html rename to charting_library/el-tv-chart.132c7060.html index 8d2fa644..54868d2d 100644 --- a/charting_library/el-tv-chart.b0eeabd9.html +++ b/charting_library/el-tv-chart.132c7060.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/en-tv-chart.b0eeabd9.html b/charting_library/en-tv-chart.132c7060.html similarity index 99% rename from charting_library/en-tv-chart.b0eeabd9.html rename to charting_library/en-tv-chart.132c7060.html index cc14c23a..6faa4343 100644 --- a/charting_library/en-tv-chart.b0eeabd9.html +++ b/charting_library/en-tv-chart.132c7060.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/es-tv-chart.b0eeabd9.html b/charting_library/es-tv-chart.132c7060.html similarity index 99% rename from charting_library/es-tv-chart.b0eeabd9.html rename to charting_library/es-tv-chart.132c7060.html index f319591b..671c20ab 100644 --- a/charting_library/es-tv-chart.b0eeabd9.html +++ b/charting_library/es-tv-chart.132c7060.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/et_EE-tv-chart.b0eeabd9.html b/charting_library/et_EE-tv-chart.132c7060.html similarity index 98% rename from charting_library/et_EE-tv-chart.b0eeabd9.html rename to charting_library/et_EE-tv-chart.132c7060.html index 8a225537..73d39299 100644 --- a/charting_library/et_EE-tv-chart.b0eeabd9.html +++ b/charting_library/et_EE-tv-chart.132c7060.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/fa-tv-chart.b0eeabd9.html b/charting_library/fa-tv-chart.132c7060.html similarity index 99% rename from charting_library/fa-tv-chart.b0eeabd9.html rename to charting_library/fa-tv-chart.132c7060.html index 4e057e4b..8f786d0b 100644 --- a/charting_library/fa-tv-chart.b0eeabd9.html +++ b/charting_library/fa-tv-chart.132c7060.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/fr-tv-chart.b0eeabd9.html b/charting_library/fr-tv-chart.132c7060.html similarity index 99% rename from charting_library/fr-tv-chart.b0eeabd9.html rename to charting_library/fr-tv-chart.132c7060.html index 83b7bbd4..0d10146c 100644 --- a/charting_library/fr-tv-chart.b0eeabd9.html +++ b/charting_library/fr-tv-chart.132c7060.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/he_IL-tv-chart.b0eeabd9.html b/charting_library/he_IL-tv-chart.132c7060.html similarity index 99% rename from charting_library/he_IL-tv-chart.b0eeabd9.html rename to charting_library/he_IL-tv-chart.132c7060.html index d71fe0ca..c698a56b 100644 --- a/charting_library/he_IL-tv-chart.b0eeabd9.html +++ b/charting_library/he_IL-tv-chart.132c7060.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/hu_HU-tv-chart.b0eeabd9.html b/charting_library/hu_HU-tv-chart.132c7060.html similarity index 99% rename from charting_library/hu_HU-tv-chart.b0eeabd9.html rename to charting_library/hu_HU-tv-chart.132c7060.html index 92fa6879..178ca18d 100644 --- a/charting_library/hu_HU-tv-chart.b0eeabd9.html +++ b/charting_library/hu_HU-tv-chart.132c7060.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/id_ID-tv-chart.b0eeabd9.html b/charting_library/id_ID-tv-chart.132c7060.html similarity index 99% rename from charting_library/id_ID-tv-chart.b0eeabd9.html rename to charting_library/id_ID-tv-chart.132c7060.html index 61fc2397..b27c6c6a 100644 --- a/charting_library/id_ID-tv-chart.b0eeabd9.html +++ b/charting_library/id_ID-tv-chart.132c7060.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/it-tv-chart.b0eeabd9.html b/charting_library/it-tv-chart.132c7060.html similarity index 99% rename from charting_library/it-tv-chart.b0eeabd9.html rename to charting_library/it-tv-chart.132c7060.html index 9119ba67..ca2390ab 100644 --- a/charting_library/it-tv-chart.b0eeabd9.html +++ b/charting_library/it-tv-chart.132c7060.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/ja-tv-chart.b0eeabd9.html b/charting_library/ja-tv-chart.132c7060.html similarity index 99% rename from charting_library/ja-tv-chart.b0eeabd9.html rename to charting_library/ja-tv-chart.132c7060.html index 818a3419..c42f2200 100644 --- a/charting_library/ja-tv-chart.b0eeabd9.html +++ b/charting_library/ja-tv-chart.132c7060.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/ko-tv-chart.b0eeabd9.html b/charting_library/ko-tv-chart.132c7060.html similarity index 99% rename from charting_library/ko-tv-chart.b0eeabd9.html rename to charting_library/ko-tv-chart.132c7060.html index 1d608673..4b773b44 100644 --- a/charting_library/ko-tv-chart.b0eeabd9.html +++ b/charting_library/ko-tv-chart.132c7060.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/ms_MY-tv-chart.b0eeabd9.html b/charting_library/ms_MY-tv-chart.132c7060.html similarity index 99% rename from charting_library/ms_MY-tv-chart.b0eeabd9.html rename to charting_library/ms_MY-tv-chart.132c7060.html index b33a29e7..0b652947 100644 --- a/charting_library/ms_MY-tv-chart.b0eeabd9.html +++ b/charting_library/ms_MY-tv-chart.132c7060.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/nl_NL-tv-chart.b0eeabd9.html b/charting_library/nl_NL-tv-chart.132c7060.html similarity index 99% rename from charting_library/nl_NL-tv-chart.b0eeabd9.html rename to charting_library/nl_NL-tv-chart.132c7060.html index 17c063d6..50097dbe 100644 --- a/charting_library/nl_NL-tv-chart.b0eeabd9.html +++ b/charting_library/nl_NL-tv-chart.132c7060.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/no-tv-chart.b0eeabd9.html b/charting_library/no-tv-chart.132c7060.html similarity index 98% rename from charting_library/no-tv-chart.b0eeabd9.html rename to charting_library/no-tv-chart.132c7060.html index 5bba2d5f..a1651053 100644 --- a/charting_library/no-tv-chart.b0eeabd9.html +++ b/charting_library/no-tv-chart.132c7060.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/package.json b/charting_library/package.json index faf904d1..0126e8e8 100644 --- a/charting_library/package.json +++ b/charting_library/package.json @@ -1,6 +1,6 @@ { "private": true, - "description": "CL v21.065 (internal id b0eeabd9 @ 2022-03-29T09:09:40.051Z)", + "description": "CL v21.066 (internal id 132c7060 @ 2022-04-01T09:59:44.647Z)", "type": "module", "main": "charting_library.cjs.js", "module": "charting_library.esm.js", diff --git a/charting_library/pl-tv-chart.b0eeabd9.html b/charting_library/pl-tv-chart.132c7060.html similarity index 99% rename from charting_library/pl-tv-chart.b0eeabd9.html rename to charting_library/pl-tv-chart.132c7060.html index 051d97f3..23fffcd6 100644 --- a/charting_library/pl-tv-chart.b0eeabd9.html +++ b/charting_library/pl-tv-chart.132c7060.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/pt-tv-chart.b0eeabd9.html b/charting_library/pt-tv-chart.132c7060.html similarity index 99% rename from charting_library/pt-tv-chart.b0eeabd9.html rename to charting_library/pt-tv-chart.132c7060.html index 1c20eb36..2188f669 100644 --- a/charting_library/pt-tv-chart.b0eeabd9.html +++ b/charting_library/pt-tv-chart.132c7060.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/ro-tv-chart.b0eeabd9.html b/charting_library/ro-tv-chart.132c7060.html similarity index 99% rename from charting_library/ro-tv-chart.b0eeabd9.html rename to charting_library/ro-tv-chart.132c7060.html index bb315e7a..a50672f7 100644 --- a/charting_library/ro-tv-chart.b0eeabd9.html +++ b/charting_library/ro-tv-chart.132c7060.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/ru-tv-chart.b0eeabd9.html b/charting_library/ru-tv-chart.132c7060.html similarity index 99% rename from charting_library/ru-tv-chart.b0eeabd9.html rename to charting_library/ru-tv-chart.132c7060.html index 85861fcf..eab4716f 100644 --- a/charting_library/ru-tv-chart.b0eeabd9.html +++ b/charting_library/ru-tv-chart.132c7060.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/sk_SK-tv-chart.b0eeabd9.html b/charting_library/sk_SK-tv-chart.132c7060.html similarity index 98% rename from charting_library/sk_SK-tv-chart.b0eeabd9.html rename to charting_library/sk_SK-tv-chart.132c7060.html index b61c3e14..7aa2f252 100644 --- a/charting_library/sk_SK-tv-chart.b0eeabd9.html +++ b/charting_library/sk_SK-tv-chart.132c7060.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/sv-tv-chart.b0eeabd9.html b/charting_library/sv-tv-chart.132c7060.html similarity index 99% rename from charting_library/sv-tv-chart.b0eeabd9.html rename to charting_library/sv-tv-chart.132c7060.html index d12c1c32..33aa64e9 100644 --- a/charting_library/sv-tv-chart.b0eeabd9.html +++ b/charting_library/sv-tv-chart.132c7060.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/th-tv-chart.b0eeabd9.html b/charting_library/th-tv-chart.132c7060.html similarity index 99% rename from charting_library/th-tv-chart.b0eeabd9.html rename to charting_library/th-tv-chart.132c7060.html index d1ef29fb..1473dec8 100644 --- a/charting_library/th-tv-chart.b0eeabd9.html +++ b/charting_library/th-tv-chart.132c7060.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/tr-tv-chart.b0eeabd9.html b/charting_library/tr-tv-chart.132c7060.html similarity index 99% rename from charting_library/tr-tv-chart.b0eeabd9.html rename to charting_library/tr-tv-chart.132c7060.html index 0a69b1ce..bb7b3d93 100644 --- a/charting_library/tr-tv-chart.b0eeabd9.html +++ b/charting_library/tr-tv-chart.132c7060.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/vi-tv-chart.b0eeabd9.html b/charting_library/vi-tv-chart.132c7060.html similarity index 99% rename from charting_library/vi-tv-chart.b0eeabd9.html rename to charting_library/vi-tv-chart.132c7060.html index bd482f80..93675b86 100644 --- a/charting_library/vi-tv-chart.b0eeabd9.html +++ b/charting_library/vi-tv-chart.132c7060.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/zh-tv-chart.b0eeabd9.html b/charting_library/zh-tv-chart.132c7060.html similarity index 99% rename from charting_library/zh-tv-chart.b0eeabd9.html rename to charting_library/zh-tv-chart.132c7060.html index 4536bda5..cefbff16 100644 --- a/charting_library/zh-tv-chart.b0eeabd9.html +++ b/charting_library/zh-tv-chart.132c7060.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/zh_TW-tv-chart.b0eeabd9.html b/charting_library/zh_TW-tv-chart.132c7060.html similarity index 99% rename from charting_library/zh_TW-tv-chart.b0eeabd9.html rename to charting_library/zh_TW-tv-chart.132c7060.html index 98375dd3..378c4c31 100644 --- a/charting_library/zh_TW-tv-chart.b0eeabd9.html +++ b/charting_library/zh_TW-tv-chart.132c7060.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file