"use strict";(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[5410],{60567:(e,t,i)=>{i.r(t),i.d(t,{createPropertyPage:()=>o});var r=i(22613);function o(e,t,i,o=null){const n={id:t,title:i,definitions:new r.WatchedValue(e.definitions),visible:e.visible??new r.WatchedValue(!0).readonly()};return null!==o&&(n.icon=o),n}},80667:(e,t,i)=>{i.d(t,{createPropertyDefinitionsCheckableListOptionsGroup:()=>o});var r=i(22613);function o(e,t,i,o,n,s,p,l){return{id:o,title:n,visible:s,groupType:"checkableListOptions",checked:t,definitions:new r.WatchedValue(i),checkableListOptions:e,hideCheckbox:p,placeHolder:l}}},19537:(e,t,i)=>{function r(e,t){return{propType:"checkable",properties:e,notFormatedTitle:!1,...t}}i.d(t,{createCheckablePropertyDefinition:()=>r})},35106:(e,t,i)=>{i.d(t,{getColorDefinitionProperty:()=>a,getStdColorDefinitionProperty:()=>c});var r=i(24377),o=i(52859),n=i(67455),s=i(5149),p=i(41072);function l(e,t){if((0,o.isHexColor)(e)){const i=(0,r.parseRgb)(e);return(0,r.rgbaToString)((0,r.rgba)(i,(100-t)/100))}return e}function a(e,t,i,r,o){let p;if(null!==i){const e=(0,n.combineProperty)(l,t.weakReference(),i.weakReference());p=(0,s.makeProxyDefinitionProperty)(e.ownership())}else p=(0,s.makeProxyDefinitionProperty)(t.weakReference(),[()=>l(t.value(),0),e=>e]);return p.setValue=i=>{o&&e.beginUndoMacro(r),e.setProperty(t,i,r),o&&e.endUndoMacro()},p}function c(e,t,i,r,o){const l=(0,s.makeProxyDefinitionProperty)((0,n.combineProperty)((e=>t.value(e)),function(e){const t=(0,p.createPrimitiveProperty)(e.value()),i=e=>t.setValue(e);return t.destroy=()=>{e.release(),e.unsubscribe(i)},e.subscribe(i),t}(i).ownership(),t.weakReference()).ownership());var a;return l.setValue=(a=i=>{e.setProperty(t,i,r)},o?(...t)=>{e.beginUndoMacro(r),a(...t),e.endUndoMacro()}:a),l}},5149:(e,t,i)=>{i.d(t,{convertToDefinitionProperty:()=>n,makeProxyDefinitionProperty:()=>o});var r=i(51768);function o(e,t,i){const r=new Map,o=void 0!==t?t[0]:e=>e,n=void 0!==t?void 0!==t[1]?t[1]:t[0]:e=>e,s={value:()=>o(e.value()),setValue:t=>{e.setValue(n(t))},subscribe:(t,i)=>{const o=e=>{i(s)};r.set(i,o),e.subscribe(t,o)},unsubscribe:(t,i)=>{const o=r.get(i);o&&(e.unsubscribe(t,o),r.delete(i))},unsubscribeAll:t=>{e.unsubscribeAll(t),r.clear()},destroy:()=>{e.release(),i?.()}};return s}function n(e,t,i,n,s,p,l){const a=o(t.weakReference(),n,p),c=void 0!==n?void 0!==n[1]?n[1]:n[0]:e=>e,u=s??(r=>e.setProperty(t,c(r),i));return a.setValue=e=>{l&&(0,r.trackEvent)(l.category,l.event,l.label?.(e)),u(e)},a}},98583:(e,t,i)=>{i.d(t,{createLinePropertyDefinition:()=>l});var r=i(25672),o=i(69558);const n=[o.LINESTYLE_SOLID,o.LINESTYLE_DOTTED,o.LINESTYLE_DASHED],s=[1,2,3,4],p=[r.LineEnd.Normal,r.LineEnd.Arrow];function l(e,t){const i={propType:"line",properties:e,...t};return void 0!==i.properties.style&&(i.styleValues=n),void 0!==i.properties.width&&(i.widthValues=s),void 0===i.properties.leftEnd&&void 0===i.properties.rightEnd||void 0!==i.endsValues||(i.endsValues=p),void 0!==i.properties.value&&void 0===i.valueType&&(i.valueType=1),i}},
60690:(e,t,i)=>{var r;function o(e,t){return{propType:"number",properties:e,type:1,...t}}i.d(t,{createNumberPropertyDefinition:()=>o}),function(e){e[e.Integer=0]="Integer",e[e.Float=1]="Float"}(r||(r={}))},41321:(e,t,i)=>{function r(e,t){return{propType:"options",properties:e,...t}}i.d(t,{createOptionsPropertyDefinition:()=>r})},95338:(e,t,i)=>{i.d(t,{convertFromReadonlyWVToDefinitionProperty:()=>F,convertFromWVToDefinitionProperty:()=>Y,convertToDefinitionProperty:()=>G.convertToDefinitionProperty,createCheckablePropertyDefinition:()=>r.createCheckablePropertyDefinition,createCheckableSetPropertyDefinition:()=>o,createColorPropertyDefinition:()=>n,createCoordinatesPropertyDefinition:()=>S,createEmojiPropertyDefinition:()=>H,createImagePropertyDefinition:()=>z,createLeveledLinePropertyDefinition:()=>c,createLinePropertyDefinition:()=>s.createLinePropertyDefinition,createNumberPropertyDefinition:()=>u.createNumberPropertyDefinition,createOptionalTwoColorsPropertyDefinition:()=>L,createOptionsPropertyDefinition:()=>f.createOptionsPropertyDefinition,createPropertyDefinitionsCheckableListOptionsGroup:()=>W.createPropertyDefinitionsCheckableListOptionsGroup,createPropertyDefinitionsGeneralGroup:()=>M,createPropertyDefinitionsLeveledLinesGroup:()=>N,createRangePropertyDefinition:()=>E,createSelectionCoordinatesPropertyDefinition:()=>C,createSessionPropertyDefinition:()=>O,createStudyInputsPropertyDefinition:()=>R,createSymbolPropertyDefinition:()=>A,createTextPropertyDefinition:()=>w,createTransparencyPropertyDefinition:()=>I,createTwoColorsPropertyDefinition:()=>V,createTwoOptionsPropertyDefinition:()=>d,destroyDefinitions:()=>ie,getColorDefinitionProperty:()=>q.getColorDefinitionProperty,getLockPriceScaleDefinitionProperty:()=>j,getPriceScaleSelectionStrategyDefinitionProperty:()=>U,getScaleRatioDefinitionProperty:()=>B,getSymbolDefinitionProperty:()=>J,isCheckableListOptionsDefinition:()=>te,isColorDefinition:()=>Z,isLineDefinition:()=>X,isOptionsDefinition:()=>ee,isPropertyDefinition:()=>K,isPropertyDefinitionsGroup:()=>Q,isTwoColorDefinition:()=>$,makeProxyDefinitionProperty:()=>G.makeProxyDefinitionProperty});var r=i(19537);function o(e,t,i){return{propType:"checkableSet",properties:e,childrenDefinitions:i,...t}}function n(e,t){return{propType:"color",properties:e,noAlpha:!1,...t}}var s=i(98583),p=i(69558);const l=[p.LINESTYLE_SOLID,p.LINESTYLE_DOTTED,p.LINESTYLE_DASHED],a=[1,2,3,4];function c(e,t){const i={propType:"leveledLine",properties:e,...t};return void 0!==i.properties.style&&(i.styleValues=l),void 0!==i.properties.width&&(i.widthValues=a),i}var u=i(60690),f=i(41321);function d(e,t){return{propType:"twoOptions",properties:e,...t}}var y,v=i(11542),b=i(50605);!function(e){e.Horizontal="horizontal",e.Vertical="vertical"}(y||(y={}));const P=[{id:b.VerticalAlign.Top,value:b.VerticalAlign.Bottom,title:v.t(null,void 0,i(97118))},{id:b.VerticalAlign.Middle,value:b.VerticalAlign.Middle,title:v.t(null,void 0,i(68833))},{id:b.VerticalAlign.Bottom,value:b.VerticalAlign.Top,title:v.t(null,void 0,i(27567))}],D=[{
id:b.HorizontalAlign.Left,value:b.HorizontalAlign.Left,title:v.t(null,void 0,i(11626))},{id:b.HorizontalAlign.Center,value:b.HorizontalAlign.Center,title:v.t(null,void 0,i(24197))},{id:b.HorizontalAlign.Right,value:b.HorizontalAlign.Right,title:v.t(null,void 0,i(50421))}],g=[{id:"horizontal",value:"horizontal",title:v.t(null,void 0,i(3160))},{id:"vertical",value:"vertical",title:v.t(null,void 0,i(69526))}],T=[8,10,11,12,14,16,18,20,22,24,28,32,40].map((e=>({title:String(e),value:e}))),h=[1,2,3,4],m=v.t(null,void 0,i(25485)),k=v.t(null,void 0,i(67781));function w(e,t){const i={propType:"text",properties:e,...t,isEditable:t.isEditable||!1};return void 0!==i.properties.size&&void 0===i.sizeItems&&(i.sizeItems=T),void 0!==i.properties.alignmentVertical&&void 0===i.alignmentVerticalItems&&(i.alignmentVerticalItems=P),void 0!==i.properties.alignmentHorizontal&&void 0===i.alignmentHorizontalItems&&(i.alignmentHorizontalItems=D),(i.alignmentVerticalItems||i.alignmentHorizontalItems)&&void 0===i.alignmentTitle&&(i.alignmentTitle=m),void 0!==i.properties.orientation&&(void 0===i.orientationItems&&(i.orientationItems=g),void 0===i.orientationTitle&&(i.orientationTitle=k)),void 0!==i.properties.borderWidth&&void 0===i.borderWidthItems&&(i.borderWidthItems=h),i}function V(e,t){return{propType:"twoColors",properties:e,noAlpha1:!1,noAlpha2:!1,...t}}function L(e,t){return{propType:"optionalTwoColors",properties:e,noAlpha1:!1,noAlpha2:!1,...t}}function S(e,t){return{propType:"coordinates",properties:e,...t}}function C(e,t){return{propType:"selectionCoordinates",properties:e,...t}}function E(e,t){return{propType:"range",properties:e,...t}}function I(e,t){return{propType:"transparency",properties:e,...t}}function A(e,t){return{propType:"symbol",properties:e,...t}}function O(e,t){return{propType:"session",properties:e,...t}}function z(e,t){return{propType:"image",properties:e,...t}}function H(e,t){return{propType:"emoji",properties:e,...t}}function R(e,t){return{propType:"studyInputs",properties:e,...t}}var x=i(22613);function M(e,t,i,r){return{id:t,title:i,visible:r,groupType:"general",definitions:new x.WatchedValue(e)}}var W=i(80667);function N(e,t,i){return{id:t,title:i,groupType:"leveledLines",definitions:new x.WatchedValue(e)}}var G=i(5149);function _(e,t,i){const r=new Map,o=void 0!==t?t[0]:e=>e,n=void 0!==t?void 0!==t[1]?t[1]:t[0]:e=>e,s={value:()=>o(e.value()),setValue:t=>{e.setValue?.(n(t))},subscribe:(t,i)=>{const o=()=>{i(s)};let n=r.get(t);void 0===n?(n=new Map,n.set(i,o),r.set(t,n)):n.set(i,o),e.subscribe(o)},unsubscribe:(t,i)=>{const o=r.get(t);if(void 0!==o){const t=o.get(i);void 0!==t&&(e.unsubscribe(t),o.delete(i))}},unsubscribeAll:t=>{const i=r.get(t);void 0!==i&&(i.forEach(((t,i)=>{e.unsubscribe(t)})),i.clear())}};return i&&(s.destroy=()=>i()),s}function Y(e,t,i,r){const o=_(t,r),n=void 0!==r?void 0!==r[1]?r[1]:r[0]:e=>e;return o.setValue=r=>e.setWatchedValue(t,n(r),i),o}function F(e,t){return function(e,t,i,r){const o=new Map,n={subscribe:(i,r)=>{const n=e=>i(t(e));o.set(i,n),e.subscribe(n,r)},unsubscribe:t=>{if(t){
const i=o.get(t);i&&(e.unsubscribe(i),o.delete(t))}else o.clear(),e.unsubscribe()},value:()=>t(e.value())};return _(n,i,r)}(e,(e=>e),t,(()=>e.release()))}function U(e,t){const i=(0,G.makeProxyDefinitionProperty)(t.weakReference());return i.setValue=t=>e.setPriceScaleSelectionStrategy(t),i}function j(e,t,i,r){const o=(0,G.makeProxyDefinitionProperty)(t.weakReference());return o.setValue=t=>{const o={lockScale:t};e.setPriceScaleMode(o,i,r)},o}function B(e,t,i,r){const o=(0,G.makeProxyDefinitionProperty)(t.weakReference(),r);return o.setValue=r=>{e.setScaleRatioProperty(t,r,i)},o}var q=i(35106);function J(e,t,i,r,o,n){const s=[(p=i,l=t,e=>{const t=p(l);if(e===l.value()&&null!==t){const e=t.ticker||t.full_name;if(e)return e}return e}),e=>e];var p,l;const a=(0,G.convertToDefinitionProperty)(e,t,o,s);n&&(a.setValue=n);const c=new Map;a.subscribe=(e,i)=>{const r=e=>{i(a)};c.set(i,r),t.subscribe(e,r)},a.unsubscribe=(e,i)=>{const r=c.get(i);r&&(t.unsubscribe(e,r),c.delete(i))};const u={};return r.subscribe(u,(()=>{c.forEach(((e,t)=>{t(a)}))})),a.destroy=()=>{r.unsubscribeAll(u),c.clear()},a}function K(e){return e.hasOwnProperty("propType")}function Q(e){return e.hasOwnProperty("groupType")}function X(e){return"line"===e.propType}function Z(e){return"color"===e.propType}function $(e){return"twoColors"===e.propType}function ee(e){return"options"===e.propType}function te(e){return"checkableListOptions"===e.groupType}function ie(e){e.forEach((e=>{if(K(e)){Object.keys(e.properties).forEach((t=>{const i=e.properties[t];void 0!==i&&void 0!==i.destroy&&i.destroy()}))}else ie(e.definitions.value()),e.visible?.destroy()}))}}}]);