PageSourceSearch

https://www.xt.com/_static/thanos/thanos-web-ssr/_next/static/chunks/388-a804be544ad89af1.js

js xt.com collected 2026-09-24 18:38:03 UTC 312,274 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[388],{82121:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o,i;n.d(t,{nY:function(){return l},tW:function(){return a},to:function(){return o}}),function(e){e.INDEX_PRICE="INDEX_PRICE",e.LATEST_PRICE="LATEST_PRICE",e.MARK_PRICE="MARK_PRICE"}(o||(o={}));var a=(r(i={},o.MARK_PRICE,"btn.mark"),r(i,o.LATEST_PRICE,"btn.newest"),r(i,o.INDEX_PRICE,"market.orderForm.entrust.exponents"),i),l={MARK_PRICE:"market.position.triggerPriceType.markPrice",LATEST_PRICE:"market.position.triggerPriceType.latestPrice",INDEX_PRICE:"market.position.triggerPriceType.indexPrice"}},14177:function(e,t,n){"use strict";var r=n(52676),o=n(32253),i=n(75271);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}t.Z=function(e){var t=e.children,n=e.type,s=void 0===n?"primary":n,c=e.checked,u=e.disabled,d=e.onChange,f=l(e,["children","type","checked","disabled","onChange"]),h=(0,i.useMemo)((function(){return"checkbox-".concat(s)}),[s]);return(0,r.jsx)(o.Z,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){a(e,t,n[t])}))}return e}({},f,{className:h,checked:c,disabled:u,onChange:function(e){null===d||void 0===d||d(e.target.checked)},children:t}))}},35885:function(e,t,n){"use strict";var r=n(52676),o=n(97495),i=n(98705),a=n(39817),l=n(75271),s=n(94088),c=n(77163),u=n(16052);function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var f=o.Px.useTranslation,h={height:"86px",marginBottom:"6px"};t.Z=(0,a.Pi)((function(e){var t,n=f().t,o=(0,u.oR)().ui.theme,a=(0,l.useMemo)((function(){return"Dark"===o?s.Z:c.Z}),[o]);return(0,r.jsx)(i.Z,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){d(e,t,n[t])}))}return e}({imageStyle:h},e,{image:a,description:null!==(t=e.description)&&void 0!==t?t:n("placeholder.noData")}))}))},56339:function(e,t,n){"use strict";var r=n(52676),o=(n(75271),n(82187)),i=n.n(o),a=n(85261),l=n.n(a);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}t.Z=function(e){var t=e.className,n=c(e,["className"]);return(0,r.jsx)("span",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){s(e,t,n[t])}))}return e}({className:i()(l().container,t)},n,{children:(0,r.jsx)("svg",{width:"10",height:"5",viewBox:"0 0 10 5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M4.64645 4.64645L0.853553 0.853553C0.538571 0.5385
171 0.761654 0 1.20711 0H8.79289C9.23835 0 9.46143 0.53857 9.14645 0.853553L5.35355 4.64645C5.15829 4.84171 4.84171 4.84171 4.64645 4.64645Z",fill:"currentColor"})})}))}},73266:function(e,t,n){"use strict";var r=n(52676),o=(n(75271),n(82187)),i=n.n(o),a=n(85261),l=n.n(a);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}t.Z=function(e){var t=e.className,n=c(e,["className"]);return(0,r.jsx)("span",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){s(e,t,n[t])}))}return e}({className:i()(l().container,t)},n,{children:(0,r.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M5.64645 8.14645L2.85355 5.35355C2.53857 5.03857 2.76165 4.5 3.20711 4.5H8.79289C9.23835 4.5 9.46143 5.03857 9.14645 5.35355L6.35355 8.14645C6.15829 8.34171 5.84171 8.34171 5.64645 8.14645Z"})})}))}},46227:function(e,t,n){"use strict";var r=n(52676),o=n(57369),i=n(99169),a=n(82187),l=n.n(a),s=n(75271),c=n(31626),u=n.n(c);function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var h=function(e,t){var n=e.value,a=void 0===n?"":n,c=e.onBlur,h=e.onFocus,v=e.onChange,p=e.precision,g=void 0===p?8:p,m=e.integerLength,y=e.negative,b=e.integer,C=e.className,w=e.max,S=e.min,O=e.append,x=e.prepend,_=e.addonBefore,T=e.addonAfter,P=f(e,["value","onBlur","onFocus","onChange","precision","integerLength","negative","integer","className","max","min","append","prepend","addonBefore","addonAfter"]),k="".concat(a),M=(0,s.useRef)(null);(0,s.useImperativeHandle)(t,(function(){return{target:M.current}}));var I=_||x,L=T||O,A=!I&&!L;return(0,r.jsx)(o.Z,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){d(e,t,n[t])}))}return e}({},P,{addonBefore:I,addonAfter:L,className:l()(u().input,A&&u().simpleInput,P.disabled&&u().disabled,C),value:k,onChange:function(e){var t=e.target.value,n=g?"{1,".concat(g,"}"):"+",r=m?"{1,".concat(m,"}"):"+",o=new RegExp("^".concat(y?"(-?)":"","((\\d").concat(r,"))?$"),"g"),i=new RegExp("^".concat(y?"(-?)":"","((\\d").concat(r,")((?:\\.?)|(?:\\.\\d").concat(n,")))?$"),"g"),a=b||0===g?o:i;(!Number.isNaN(+t)&&a.test(t)||""===t||y&&"-"===t)&&(null===v||void 0===v||v(t))},onBlur:function(){var e=k;"."!==(null===k||void 0===k?void 0:k.charAt(k.length-1))&&"-"!==k||(e=k.slice(0,-1));var t=e.replace(/0*(\d+)/,"$1");w&&new i.Z(t).gt(w)&&(t=w.toString()),S&&new i.Z(t).lt(S)&&(t=S.toString()),null===v||void 0===v||v(t),null===c||void 0===c||c(t)},onFocus:function(){"number"!==typeof Number(k)&&(null===v||void 0===v||v("")),null===h||void 0===h||h()},ref:M}))};t.Z=s.forwardRef(h)},61002:function(e,t,n){"use strict";n.d(t,{YH:function(){return w},uK:function(){return b},ZP:function(){return O},p9:function(){return S},VC:function(){return C}});var r=n(52676),o=n(75271),i=n(39817),a=n(97495),l=n(80506),s=n(31412),c=n(16052),u=n(82392),d=n.n(u),f=n(82187),h=n.n(f),v=n(14970),p="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIxIDIxVjNDMjEgMS4zNDMxNSAxOS42NTY5IDAgMTggMEgwTDIxIDIxWiIgZmlsbD0iI0E3RTMxNSIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTE4LjQxNDIgNC40MTQyMUwxMy43MDcxIDkuMTIxMzJMMTEgNi40MTQyMUwxMi40MTQyIDVMMTMuNzA3MSA2LjI5Mjg5TDE3IDNMMTguNDE0MiA0LjQxNDIxWiIgZmlsbD0id2hp
1dGUiLz4KPC9zdmc+Cg==",g=n(13203),m=n(56339),y=a.Px.useTranslation,b=(0,i.Pi)((function(e){var t=e.setting,n=void 0===t?null:t,o=e.onClick,i=void 0===o?function(){}:o,a=e.isCalculator,l=void 0!==a&&a,s=(0,c.oR)().futures.currentMarket.isPredictContract;return(0,r.jsxs)("div",{className:d().menuContainer,onClick:function(){!s&&(null===i||void 0===i||i())},children:[(0,r.jsx)(w,{isCalculator:l,setting:n}),!s&&(0,r.jsx)(m.Z,{className:d().icon})]})})),C=function(){var e=(0,c.oR)(),t=e.ui,n=e.underlying,r=t.setUnitSetting,i=n.isUBased,a=localStorage.getItem(g.pm),l=localStorage.getItem(g.tq),s=a?JSON.parse(a):g.Vc,u=l?JSON.parse(l):g.gm;(0,o.useEffect)((function(){r(i?s:u)}),[i])},w=(0,i.Pi)((function(e){var t=e.setting,n=void 0===t?null:t,i=e.className,a=void 0===i?"":i,l=e.isCalculator,s=void 0!==l&&l,u=e.symbol,f=void 0===u?"":u,v=y().t,p=(0,c.oR)(),m=p.ui,b=p.ticker,C=p.underlying,w=(p.futures,b.calculatorSymbol),S=m.unitSetting,O=C.isUBased,x=b.currentSymbolIdentity,_=b.getSymbolConfig,T=_(f||x).baseCoin,P=_(w).baseCoin,k=(0,o.useState)(""),M=k[0],I=k[1];(0,o.useEffect)((function(){I(s?P:T)}),[s,P,T]);var L=n||S,A=(0,o.useState)(""),j=A[0],N=A[1],D=(0,o.useMemo)((function(){return function(e,t,n){return[{title:"placeholder.amount",subTitle:"",getUnit:function(){return e("unit.sheet")},type:g.oA.sheet},{title:"placeholder.amount",subTitle:"",getUnit:function(){return n?null===t||void 0===t?void 0:t.toUpperCase():"USD"},type:n?g.oA.coin:g.oA.usd},{title:"unit.costValue",subTitle:"unit.costValueTip",getUnit:function(){return n?"USDT":null===t||void 0===t?void 0:t.toUpperCase()},type:g.oA.costValue},{title:"unit.nominalValue",subTitle:"unit.nominalValueTip",getUnit:function(){return n?"USDT":null===t||void 0===t?void 0:t.toUpperCase()},type:g.oA.nominalValue}]}(v,M,O)}),[M,O]);return(0,o.useEffect)((function(){var e,t,n=null===(e=D.filter((function(e){return e.type===L.type})))||void 0===e?void 0:e[0];N(null===n||void 0===n||null===(t=n.getUnit)||void 0===t?void 0:t.call(n))}),[D,L.type]),(0,o.useEffect)((function(){(O&&L.type===g.oA.coin||!O&&(L.type===g.oA.nominalValue||L.type===g.oA.costValue))&&N(null===M||void 0===M?void 0:M.toUpperCase())}),[x,O]),(0,r.jsx)("span",{className:h()(s&&d().isCalculator,a),children:j})})),S=function(e,t){return e===g.oA.nominalValue?t("unit.nominalValue"):e===g.oA.costValue?t("unit.costValue"):t("placeholder.amount")},O=(0,i.Pi)((function(e){var t=e.visible,n=void 0!==t&&t,i=e.setVisible,a=void 0===i?function(){}:i,u=e.onChange,f=e.setting,m=(e.isCalculator,y().t),b=(0,c.oR)(),C=b.ui,w=b.underlying,S=b.ticker,O=C.unitSetting,x=w.isUBased,_=S.currentSymbolConfig,T=(0,o.useState)(f),P=T[0],k=T[1],M=(0,o.useState)("amount"),I=M[0],L=M[1],A=_.baseCoin,j=_.quoteCoin,N=function(e){e!==g.oA.costValue&&L("amount"),k({type:e,unit:e===g.oA.sheet?m("unit.sheet"):"USDT",isUnitTrans:!1})};return(0,o.useEffect)((function(){f&&(k(f),L(f.type===g.oA.costValue?"cost":"amount"))}),[f.isUnitTrans,f.type,f.unit]),(0,r.jsx)(l.Z,{title:m("unit.setting"),className:d().transferModal,width:450,zIndex:999999,centered:!0,footer:null,visible:n,onCancel:function(){k(O),a(!1)},destroyOnClose:!0,bodyStyle:{padding:0},closeIcon:(0,r.jsx)(v.Z,{}),children:(0,r.jsxs)("div",{className:d().container,children:[(0,r.jsxs)(s.ZP.Group,{className:d().radioGroup,value:I,onChange:function(e){var t=e.target.value;L(t),"cost"===t&&N(g.oA.costValue)},children:[(0,r.jsx)("div",{className:d().mainRadioItem,children:(0,r.jsx)(s.ZP,{value:"amount",children:(0,r.jsxs)("div",{className:d().mainContent,children:[(0,r.jsx)("div",{className:d().radioLabel,children:m("unit.setting.new.01")}),(0,r.jsx)("div",{className:d().description,children:m("unit.setting.new.02")})]})})}),(0,r.jsxs)("div",{className:d().subRadioGroup,children:[(0,r.jsxs)("div",{className:h()(d().radioItem,(null===P||void 0===P?void 0:P.type)===(x?g.oA.coin:g.oA.usd)&&d().active),onClick:function(){return N(x?g.oA.coin:g.oA.usd)},children:[(0,r.jsx)("div",{className:d().radioLabel,children:x?A.toUpperCase():j.toUpperCase()}),(0,r.jsx)("img",{className:d().angleIcon,src:p,alt:""})]}),(0,r.jsxs)("div",{className:h()(d().radioItem,(null===P||void 0===P?void 0:P.type)===g.oA.nominalValue&&d().active),onClick:function(){return N(g.oA.nominalValue)},children:[(0,r.jsx)("div",{className:d().radioLabel,children:x?j.toUpperCase():A.toUpperCase()}),(0,r.jsx)("img",{className:d().angleIcon,src:p,alt:""})]}),(0,r.jsxs)("div",{className:h()(d().radioItem,(null===P||void 0===P?void 0:P.type)===g.oA.sheet&&d().active),onClick:function(){return N(g.oA.sheet)},children:[(0,r.jsx)("div",{className:d().radioLabel,children:m("unit.sheet")}),(0,r.jsx)("img",{className:d().angleIcon,src:p,alt:""})]})]}),(0,r.jsx)("div",{className:d().mainRadioItem,children:(0,r.jsx)(s.ZP,{value:"cost",children:(0,r.jsxs)("div",{className:d().mainContent,children:[(0,r.jsx)("div",{className:d().radioLabel,children:m("unit.setting.new.03",{unit:x?j.toUpperCase():A.toUpperCase()})}),(0,r.jsx)("div",{className:d().description,children:m("unit.setting.new.04")})]})})})]}),(0,r.jsxs)("footer",{children:[(0,r.jsx)("div",{className:h()(d().btn,"cancel-btn-new"),onClick:function(){return a(!1)},children:(0,r.jsx)("span",{children:m("btn.cancel")})}),(0,r.jsx)("div",{className:h()(d().btn,"btn-new"),onClick:function(){a(!1),null===u||void 0===u||u(P)},children:(0,r.jsx)("span",{children:m("btn.ok")})})]})]})})}))},86383:function(e,t,n){"use strict";var r=n(97495),o=n(22954),i=r.Px.useTranslation;t.Z=function(){var e=i().t;return[{label:e("bbo.opponentPrice1"),value:o.r.OPPONENT_PRICE_1},{label:e("bbo.opponentPrice5"),value:o.r.OPPONENT_PRICE_5},{label:e("bbo.sameSidePrice1"),value:o.r.SAME_SIDE_PRICE_1},{label:e("bbo.sameSidePrice5"),value:o.r.SAME_SIDE_PRICE_5}]}},22954:function(e,t,n){"use strict";var r;n.d(t,{r:function(){return r}}),function(e){e.OPPONENT_PRICE_1="OPPONENT_PRICE_1",e.OPPONENT_PRICE_5="OPPONENT_PRICE_5",e.SAME_SIDE_PRICE_1="SAME_SIDE_PRICE_1",e.SAME_SIDE_PRICE_5="SAME_SIDE_PRICE_5"}(r||(r={}))},82015:function(e,t,n){"use strict";n.d(t,{d:function(){return u}});var r=n(99169);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return o(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}
1var a="Infinity",l=new Set;function s(e,t){l.has(e)||l.add(e)}function c(e){if(void 0===e||null===e||""===e)return!1;var t=new r.O(e);return t.isFinite()&&t.gt(0)}function u(e){var t,n=e.symbolConfig,o=e.isMarket,l=e.price,u=e.isUBased,d=(null===n||void 0===n?void 0:n.symbol)||"",f="".concat(u?"U":"C","|").concat(o?"market":"limit"),h=new r.O(null===n||void 0===n?void 0:n.contractSize);if(!h.isFinite()||h.lte(0))return s("".concat(d,"|").concat(f,"|cs"),"getEffectiveMaxAmount: invalid contractSize for ".concat(d)),{value:a,degraded:!0};var v,p=new r.O(l),g=p.isFinite()&&p.gt(0),m=null===n||void 0===n?void 0:n.maxNotional,y=[];if(c(v=u?o?null===n||void 0===n?void 0:n.maxMarketOrderQty:null===n||void 0===n?void 0:n.maxLimitOrderQty:o?null===n||void 0===n?void 0:n.maxMarketOrderNotional:null===n||void 0===n?void 0:n.maxLimitOrderNotional)&&y.push(new r.O(v).div(h)),c(m)&&g){var b=u?new r.O(m).div(p).div(h):new r.O(m).times(p).div(h);y.push(b)}var C=!c(v);return 0===y.length?(s("".concat(d,"|").concat(f,"|none"),"getEffectiveMaxAmount: no order-qty cap configured for ".concat(d," (").concat(f,")")),{value:a,degraded:!0}):{value:(t=r.O).minimum.apply(t,i(y)).toFixed(0,1),degraded:C}}},70481:function(e,t,n){"use strict";var r=n(52676),o=(n(75271),n(65799));function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}t.Z=function(e){var t=e.children,n=e.placement,l=void 0===n?"bottom":n,s=a(e,["children","placement"]);return(0,r.jsx)(o.Z,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){i(e,t,n[t])}))}return e}({},s,{placement:l,children:t}))}},32666:function(e,t,n){"use strict";var r=n(52676),o=n(85188),i=n(72783),a=n(93481),l=n(82187),s=n.n(l),c=n(39817),u=(n(75271),n(96225)),d=n.n(u);function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}t.Z=(0,c.Pi)((function(e){var t=e.position,n=void 0===t?"right":t,l=e.hasPrev,c=e.hasNext,u=e.onPrev,v=e.onNext,p=h(e,["position","hasPrev","hasNext","onPrev","onNext"]),g="right"===n?d().right:"center"===n?d().center:d().left;return(0,r.jsxs)("div",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){f(e,t,n[t])}))}return e}({className:s()(d().container,g)},p,{children:[(0,r.jsx)(a.Z,{size:"small",className:d().btn,icon:(0,r.jsx)(o.Z,{}),disabled:!l,onClick:function(){l&&u&&u()}}),(0,r.jsx)(a.Z,{size:"small",className:d().btn,icon:(0,r.jsx)(i.Z,{}),disabled:!c,onClick:function(){c&&v&&v()}})]}))}))},4650:function(e,t,n){"use strict";var r=n(52676),o=(n(75271),n(82187)),i=n.n(o),a=n(63804),l=n.n(a);t.Z=function(e){var t=e.className,n=e.icon,o=e.style,a=e.onClick;return(0,r.jsx)("span",{className:i()(l().container,t),style:o,onClick:function(e){a&&a(e)},children:(0,r.jsx)("svg",{children:(0,r.jsx)("use",{href:"#"+n})})})}},77450:function(e,t,n){"use strict";n.d(t,{A0:function(){return l},Ay:function(){return b},G5:function(){return c},Lu:function(){return h},Mb:function(){return f},NL:function(){return g},TQ:function(){return d},Wx:function(){return m},aP:function(){return y},bo:function(){return o},gi:function(){return p},hb:function(){return a},js:function(){return s},kF:function(){return u},wu:function(){return i},zL:function(){return v}});var r=n(19112),o=["header_widget_dom_node","header_symbol_search","symbol_search_hot_key","search_clear_button_text","symbol_search","header_resolutions","header_interval_dialog_button","header_chart_type","header_settings","header_indicators","header_compare","header_undo_redo","header_screenshot","header_fullscreen_button","compare_symbol","header_saveload","control_bar","remove_library_container_border","caption_buttons_text_if_possible","snapshot_trading_drawings","source_selection_markers","adaptive_logo","save_chart_properties_to_local_storage","same_data_requery","study_templates","display_market_status","header_widget","popup_hints","use_localstorage_for_settings","volume_force_overlay","show_object_tree","o
1pen_account_manager","trading_account_manager","right_toolbar","buy_sell_buttons","trading_notifications"],i=["trading_terminal","dont_show_boolean_study_arguments","hide_last_na_study_output","side_toolbar_in_fullscreen_mode","disable_legend_inplace_symbol_change","items_favoriting"],a={volumePaneSize:"medium","paneProperties.topMargin":20,"paneProperties.bottomMargin":5,"scalesProperties.fontSize":12,"scalesProperties.textColor":"rgba(255,255,255,0.4)","scalesProperties.lineColor":"rgba(255,255,255,0.03)","paneProperties.legendProperties.showStudyArguments":!0,"paneProperties.legendProperties.showStudyTitles":!0,"paneProperties.legendProperties.showStudyValues":!0,"paneProperties.legendProperties.showSeriesOHLC":!0,"paneProperties.vertGridProperties.color":"rgba(57,57,57,0.3)","paneProperties.horzGridProperties.color":"rgba(57,57,57,0.3)","timeScale.rightOffset":0,"paneProperties.background":"#111114","paneProperties.legendProperties.showLegend":!1,"scalesProperties.showStudyLastValue":!1,"mainSeriesProperties.showCountdown":!1},l={"paneProperties.background":"#ffffff","scalesProperties.textColor":"rgba(0,0,0,0.4)","scalesProperties.lineColor":"rgba(0,0,0,0.03)","paneProperties.backgroundGradientStartColor":"#fff","paneProperties.backgroundGradientEndColor":"#fff","paneProperties.vertGridProperties.color":"rgba(0,0,0,0.03)","paneProperties.horzGridProperties.color":"rgba(0,0,0,0.03)"},s={"paneProperties.backgroundGradientStartColor":"#111114","paneProperties.backgroundGradientEndColor":"#111114","paneProperties.vertGridProperties.color":"rgba(255, 255, 255, 0.03)","paneProperties.horzGridProperties.color":"rgba(255, 255, 255, 0.03)","mainSeriesProperties.areaStyle.color1":"rgba(255,255,255,.3)","mainSeriesProperties.areaStyle.color2":"rgba(57,57,57,0)","mainSeriesProperties.areaStyle.linecolor":"rgb(255,255,255)","mainSeriesProperties.areaStyle.linewidth":1,"mainSeriesProperties.areaStyle.transparency":.1},c=(r.cE.up.greenUpRedDown,r.cE.down.greenUpRedDown,r.cE.up.greenUpRedDown,r.cE.down.greenUpRedDown,r.cE.up.greenUpRedDown,r.cE.down.greenUpRedDown,r.cE.up.redUpGreenDown,r.cE.down.redUpGreenDown,r.cE.up.redUpGreenDown,r.cE.down.redUpGreenDown,r.cE.up.redUpGreenDown,r.cE.down.redUpGreenDown,r.av.up.greenUpRedDown,r.av.down.greenUpRedDown,r.av.up.greenUpRedDown,r.av.down.greenUpRedDown,r.av.up.greenUpRedDown,r.av.down.greenUpRedDown,r.av.up.redUpGreenDown,r.av.down.redUpGreenDown,r.av.up.redUpGreenDown,r.av.down.redUpGreenDown,r.av.up.redUpGreenDown,r.av.down.redUpGreenDown,[{value:"0",desc:{value:1,unit:"m"}},{value:"1",desc:{value:1,unit:"m"}},{value:"3",desc:{value:3,unit:"m"}},{value:"5",desc:{value:5,unit:"m"}},{value:"15",desc:{value:15,unit:"m"}},{value:"30",desc:{value:30,unit:"m"}},{value:"60",desc:{value:1,unit:"h"}},{value:"120",desc:{value:2,unit:"h"}},{value:"240",desc:{value:4,unit:"h"}},{value:"360",desc:{value:6,unit:"h"}},{value:"480",desc:{value:8,unit:"h"}},{value:"720",desc:{value:12,unit:"h"}},{value:"1D",desc:{value:1,unit:"d"}},{value:"2D",desc:{value:2,unit:"d"}},{value:"3D",desc:{value:3,unit:"d"}},{value:"1W",desc:{value:1,unit:"w"}},{value:"1M",desc:{value:1,unit:"M"}}]),u=["0","1","15","60","240","1D","1W"],d={value:"240",desc:{value:4,unit:"h"}},f={value:"1",desc:{value:1,unit:"m"}},h=c.map((function(e){return e.value})),v=(function(){var e={};
1c.forEach((function(t){var n=t.desc,r=n.value,o=n.unit;e["".concat(r).concat(o)]=t}))}(),[{key:"MA",type:"Moving Average",children:[{key:"MA",type:"Moving Average",opts:[[5],{"plot.color":"#ffc420","plot.linewidth":1}]},{key:"MA",type:"Moving Average",opts:[[10],{"plot.color":"rgb(38, 198, 218)","plot.linewidth":1}]},{key:"MA",type:"Moving Average",opts:[[30],{"plot.color":"#AA00E6","plot.linewidth":1}]}]},{key:"BOLL",type:"Bollinger Bands",opts:[[20,2],null]}]),p={"volume.volume.color.0":r.cE.down.greenUpRedDown,"volume.volume.color.1":r.cE.up.greenUpRedDown},g={"volume.volume.color.0":r.av.down.greenUpRedDown,"volume.volume.color.1":r.av.up.greenUpRedDown},m={"volume.volume.color.0":r.cE.down.redUpGreenDown,"volume.volume.color.1":r.cE.up.redUpGreenDown},y={"volume.volume.color.0":r.av.down.redUpGreenDown,"volume.volume.color.1":r.av.up.redUpGreenDown},b='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="none"><path fill="currentColor" d="M7 13h7V6h1v7h7v1h-7v7h-1v-7H7v-1z"/></svg>'},69916:function(e,t,n){"use strict";var r,o=n(73771),i=n.n(o),a=n(99169),l=n(74637),s=n.n(l),c=n(46152),u=n(45917),d=n(28652),f=n(50632),h=n(4283);function v(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(c){return void n(c)}l.done?t(s):Promise.resolve(s).then(r,o)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){v(i,r,o,a,l,"next",e)}function l(e){v(i,r,o,a,l,"throw",e)}a(void 0)}))}}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m={description:"",type:"stock",session:"24x7",exchange:"xtrust"==(null===h||void 0===h||null===(r=h.env)||void 0===r?void 0:r.NEXT_PUBLIC_brand)?"XTrust":"XT",listed_exchange:"",minmov:1,minmove2:0,has_intraday:!0,has_daily:!0,has_weekly_and_monthly:!0,has_no_volume:!1},y=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.subscribers={},this.loopGetTimeouts={},this.alive=!0,this.noMore=!1,this.wsMessageHandler=null,this.activeWsSubscriptions=new Set,this.unsubTimers={},this.lastEndTimeMap={},this.timezone=t.timezone,this.supported_resolutions=t.supported_resolutions,this.precisionMap=t.precisionMap,this.socket=t.socket,this.klineFetcher=t.klineFetcher,this.klineSubPrefix=t.klineSubPrefix,this.updateSubscribedData(),this.initWebsocketSubscribe()}var t=e.prototype;return t.onReady=function(e){var t={supports_time:!0};setTimeout((function(){e(t)}),0)},t.getServerTime=function(e){var t=this;(0,f.sQ)().then((function(){if(t.alive){var n=(0,f.K4)();n&&e(Math.floor(n/1e3))}}))},t.resolveSymbol=function(e,t,n){var r=e&&this.precisionMap[e]||this.precisionMap["".concat(e.split("_")[0],"_usdt")]||{price:2,quantity:2};if(r){var o=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){g(e,t,n[t])}))}return e}({},m,{pricescale:r?Math.pow(10,r.price):0,volume_precision:r?r.quantity:0,supported_resolutions:this.supported_resolutions.concat(),type:"sock",timezone:this.timezone,name:e,description:"ef_kline"==this.klineSubPrefix?null===e||void 0===e?void 0:e.toUpperCase().replaceAll("_",""):null===e||void 0===e?void 0:e.toUpperCase(),ticker:e,format:"price"});setTimeout((function(){t(o)}),0)}else n("no symbol info")},t.getBars=function(e,t,n,r,o){var a=this;return p(i().mark((function l(){var s,c,u,d,f,h;return i().wrap((function(l){for(;;)switch(l.prev=l.next){case 0:s=n.from,c=n.to,u=n.countBack,d=n.firstDataRequest,f=e.name+","+a.getResolution(t),h=function(){var n=p(i().mark((function n(){var l;return i().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return d&&(a.loopGetTimeouts[f]&&(clearInterval(a.loopGetTimeouts[f]),delete a.loopGetTimeouts[f]),a.lastEndTimeMap[f]=-1),n.prev=1,n.next=4,a.getHistory(e,a.getResolution(t),1e3*s,1e3*c,Math.min(u,1500),d);case 4:l=n.sent,r(l.bars,l.meta),n.next=11;break;case 8:n.prev=8,n.t0=n.catch(1),d?a.loopGetTimeouts[f]=setTimeout((function(){h()}),1e3):(r([],{noData:!0}),o(n.t0));case 11:case"end":return n.stop()}}),n,null,[[1,8]])})));return function(){return n.apply(this,arguments)}}(),h();case 4:case"end":return l.stop()}}),l)})))()},t.subscribeBars=function(e,t,n,r){this.noMore=!1,this.unsubTimers[r]&&(clearTimeout(this.unsubTimers[r]),delete this.unsubTimers[r]),this.subscribers[r]={lastBarTime:null,listener:n,resolution:t,symbolInfo:e,t:0,open:-1,high:-1,low:-1,close:-1,volume:0};var o=e.name+","+this.getResolution(t);
1this.activeWsSubscriptions.has(o)||(this.activeWsSubscriptions.add(o),this.socket.subscribe([this.socket.preSetSubKey(o)]))},t.unsubscribeBars=function(e){var t=this,n=this.subscribers[e];if(n){var r=n.symbolInfo.name+","+this.getResolution(n.resolution);delete this.subscribers[e],this.unsubTimers[e]&&clearTimeout(this.unsubTimers[e]),this.unsubTimers[e]=setTimeout((function(){var n=t;delete t.unsubTimers[e],!Object.values(t.subscribers).some((function(e){return e.symbolInfo.name+","+n.getResolution(e.resolution)===r}))&&t.activeWsSubscriptions.has(r)&&(t.activeWsSubscriptions.delete(r),t.socket.unsubscribe([t.socket.preSetSubKey(r)]))}),500)}},t.searchSymbols=function(e,t,n,r){r([])},t.initWebsocketSubscribe=function(){var e=this;this.wsMessageHandler&&this.socket.offClient("message",this.wsMessageHandler);var t=function(t){var n=t.event,r=t.data;if(n&&/kline.*?@/.test(n)&&r){var o,i=n.split("@");if(2!=i.length)return;var l=i[1].split(",");if(2!=l.length)return;var s=e.getInterval(l[1]),c=l[0]+"_#_"+s,u=Object.keys(e.subscribers).find((function(e){return e==c})),d=(null===(o=e.subscribers[u])||void 0===o?void 0:o.symbolInfo.name)===r.s;if(u&&d){var f=e.subscribers[u],h=r.t;f.t!=h&&(delete f.open,delete f.high,delete f.low,delete f.close,delete f.volume);var v=r.o,p=f.high&&new a.O(f.high).gt(new a.O(r.h))?f.high:r.h,g=f.low&&new a.O(f.low).lt(new a.O(r.l))?f.low:r.l,m=r.c,y=r.v,b=[{time:h,open:Number(v),high:Number(p),low:Number(g),close:Number(m),volume:Number(y)}];e.receiveSubscribedData(u,{bars:b}),f.t=h,f.open=v,f.high=p,f.low=g,f.close=m,f.volume=y}}else if("ef_kline"!=e.klineSubPrefix&&n&&/trade@/.test(n)&&r)for(var C in e.subscribers){var w;if((null===(w=e.subscribers[C])||void 0===w?void 0:w.symbolInfo.name)===r.s&&e.subscribers[C].t>0){var S=e.subscribers[C],O=S.t,x=S.open,_=S.high&&new a.O(S.high).gt(new a.O(r.p))?S.high:r.p,T=S.low&&new a.O(S.low).lt(new a.O(r.p))?S.low:r.p,P=r.p,k=S.volume,M=[{time:O,open:Number(x),high:Number(_),low:Number(T),close:Number(P),volume:Number(k)}];e.receiveSubscribedData(C,{bars:M}),S.t=O,S.open=x,S.high=_,S.low=T,S.close=P,S.volume=k}}};this.wsMessageHandler=t,this.socket.onClient("message",t)},t.updateSubscribedData=function(){var e=this;return p(i().mark((function t(){var n;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=0,Object.keys(e.subscribers).forEach(function(){var t=p(i().mark((function t(r){var o,a,l,s;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.subscribers[r],a=parseInt((Date.now()/1e3).toString(),10),l=a-e.periodLengthSeconds(o.resolution,10),t.prev=3,!e.socket.client){t.next=9;break}return t.next=7,(0,u.Z)(1e3);case 7:t.next=13;break;case 9:return t.next=11,e.getHistory(o.symbolInfo,e.getResolution(o.resolution),1e3*l,1e3*a,0,!0);case 11:s=t.sent,e.receiveSubscribedData(r,s);case 13:t.next=17;break;case 15:t.prev=15,t.t0=t.catch(3);case 17:if(t.prev=17,++n!==Object.keys(e.subscribers).length){t.next=22;break}return t.next=21,(0,u.Z)(1e3);case 21:e.alive&&e.updateSubscribedData();case 22:return t.finish(17);case 23:case"end":return t.stop()}}),t,null,[[3,15,17,23]])})));return function(e){return t.apply(this,arguments)}}()),n!==Object.keys(e.subscribers).length){t.next=6;break}return t.next=5,(0,u.Z)(1e3);case 5:e.alive&&e.updateSubscribedData();case 6:case"end":return t.stop()}}),t)})))()},t.stop=function(){var e=this;this.alive=!1,Object.values(this.unsubTimers).forEach((function(e){return clearTimeout(e)})),this.unsubTimers={},this.wsMessageHandler&&(this.socket.offClient("message",this.wsMessageHandler),this.wsMessageHandler=null),this.activeWsSubscriptions.forEach((function(t){e.socket.unsubscribe([e.socket.preSetSubKey(t)])})),this.activeWsSubscriptions.clear(),Object.keys(this.loopGetTimeouts).forEach((function(t){clearTimeout(e.loopGetTimeouts[t])})),this.loopGetTimeouts={},this.subscribers={}},t.receiveSubscribedData=function(e,t){if(Object.hasOwnProperty.call(this.subscribers,e)){var n=t.bars;if(0!==n.length){var r=n[n.length-1],o=this.subscribers[e];null!==o.lastBarTime&&r.time<o.lastBarTime||(o.lastBarTime=r.time,o.listener(r))}}},t.getHistory=function(e,t,n,r,o,l){var c=this;return p(i().mark((function n(){var u,h,v,p,g,m,y,b,C,w,S,O,x,_,T;return i().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(u=e.name+","+t,(v=null!==(h=c.lastEndTimeMap[u])&&void 0!==h?h:-1)>0&&(r=v),p=e.name,g={bars:[],meta:{noData:!0,nextTime:0}},!(r&&r<12622752e5)){n.next=8;break}return n.abrupt("return",Promise.resolve(g));case 8:return n.prev=8,m=(0,f.K4)(),y=+s()(null!==m&&void 0!==m?m:Date.now()).second(0).millisecond(0).toDate(),b=l?y:v>0?a.O.max(r,0).toNumber():r?a.O.min(a.O.max(r,0).toNumber(),new a.O(y)).toNumber():"",C={endTime:b,limit:o||500,symbol:p,interval:t},w=v,S=c._prevGetHistoryParams,c._prevGetHistoryParams=C,n.next=18,c.klineFetcher?c.klineFetcher(p,C):(0,d.kh)(p,C);
1case 18:if(O=n.sent,x=l?(0,d.q7)(O):O,c.reportUnusualHistoryGaps({lastEndTime:w,to:r,endTime:b,requestNowTime:y,resultEnd:null===x||void 0===x?void 0:x[0],resultLimit:null===x||void 0===x?void 0:x.length,params:C,prevParams:S}),!(x&&x.length&&("number"===typeof b?x[0].t<=b:r&&x[0].t<=Number(r)))){n.next=26;break}return _=x.filter((function(e){return null!==e&&void 0!==e&&e})).map((function(e){return{time:e.t,open:Number(e.o),high:Number(e.h),low:Number(e.l),close:Number(e.c),volume:Number(e.v)}})).reverse(),T=!l&&x[x.length-1].t==v,c.lastEndTimeMap[u]=x[x.length-1].t,n.abrupt("return",Promise.resolve(T?g:{bars:_,meta:{noData:!1}}));case 26:return n.abrupt("return",Promise.resolve(g));case 29:return n.prev=29,n.t0=n.catch(8),n.abrupt("return",Promise.reject(n.t0));case 32:case"end":return n.stop()}}),n,null,[[8,29]])})))()},t.getResolution=function(e){var t=e[e.length-1];if("h"===t||"M"===t)return e;if("D"===t||"W"===t)return e.toLowerCase();var n=parseFloat(e);return n<60?n+"m":n<1440?new a.O(n).div(60).toNumber()+"h":n<10080?new a.O(n).div(24).div(60)+"d":n<40320?new a.O(n).div(24).div(60).div(7)+"w":"1M"},t.getInterval=function(e){if(!e||e.length<2)return-1;var t=e.charAt(e.length-1),n="m"==t?1:"h"==t?60:"d"==t?1440:"w"==t?10080:"M"==t?43200:0;if(0==n)return-1;var r=parseInt(e.substring(0,e.length-1))*n;return 1440==r?"1D":2880==r?"2D":4320==r?"3D":10080==r?"1W":43200==r?"1M":r},t.periodLengthSeconds=function(e,t){var n=0,r=this.getResolution(e);if(r.includes("d"))n=t;else if(r.includes("M"))n=31*t;else if(r.includes("w"))n=7*t;else{if(r.includes("h"))return 60*t*60;if(r.includes("m"))return 60*t}return 24*n*60*60},t.reportUnusualHistoryGaps=function(e){e.lastEndTime<0||(e.resultLimit!==e.params.limit||"number"===typeof e.endTime&&e.lastEndTime!==e.endTime||Math.abs(e.lastEndTime-e.resultEnd.t)<this.periodLengthSeconds(e.params.interval,1e3*parseFloat(e.params.interval)))&&(0,c.record)({t:"tvHistoryBars",project:"ssr-thanos-web",lastEndTime:e.lastEndTime,to:e.to,endTime:e.endTime,requestNowTime:e.requestNowTime,resultEnd:JSON.stringify(e.resultEnd),resultLimit:e.resultLimit,params:JSON.stringify(e.params),prevParams:JSON.stringify(e.prevParams)},!1)},e}();t.Z=y},20014:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return r(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(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.")}()}n.d(t,{CQ:function(){return c},VR:function(){return m},fk:function(){return f},g5:function(){return h},h:function(){return g},se:function(){return a}});var i,a=1,l=new Set(["LineToolPosition","LineToolOrder","LineToolAlert"]),s=function(e){return"string"===typeof e&&e.startsWith("LineTool")&&!l.has(e)},c=function(e){if("string"!==typeof e)return null;var t,n=(null!==(t=e.includes(":")?e.split(":").pop():e)&&void 0!==t?t:"").trim().toLowerCase();return n.length>0?n:null},u=function(e){var t,n=!0,r=!1,o=void 0;try{for(var i,a=(null!==(t=null===e||void 0===e?void 0:e.panes)&&void 0!==t?t:[])[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var l,s=i.value,u=!0,d=!1,f=void 0;try{for(var h,v=(null!==(l=null===s||void 0===s?void 0:s.sources)&&void 0!==l?l:[])[Symbol.iterator]();!(u=(h=v.next()).done);u=!0){var p,g=h.value;if("MainSeries"===(null===g||void 0===g?void 0:g.type))return c(null===g||void 0===g||null===(p=g.state)||void 0===p?void 0:p.symbol)}}catch(m){d=!0,f=m}finally{try{u||null==v.return||v.return()}finally{if(d)throw f}}}}catch(m){r=!0,o=m}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}return null},d=function(e,t){var n;
1return{id:null!==(i=e.id)&&void 0!==i?i:"",symbol:"string"===typeof(null===(n=e.state)||void 0===n?void 0:n.symbol)&&e.state.symbol?e.state.symbol:t,ownerSource:"string"===typeof e.ownerSource?e.ownerSource:"",groupId:"string"===typeof e.groupId?e.groupId:void 0,currencyId:null,unitId:null,state:e}};function f(e){var t,n=new Map,r=!0,o=!1,i=void 0;try{for(var l,f=(null!==(t=null===e||void 0===e?void 0:e.charts)&&void 0!==t?t:[])[Symbol.iterator]();!(r=(l=f.next()).done);r=!0){var h,v=l.value,p=u(v),g=!0,m=!1,y=void 0;try{for(var b,C=(null!==(h=null===v||void 0===v?void 0:v.panes)&&void 0!==h?h:[])[Symbol.iterator]();!(g=(b=C.next()).done);g=!0){var w,S=b.value,O=!0,x=!1,_=void 0;try{for(var T,P=(null!==(w=null===S||void 0===S?void 0:S.sources)&&void 0!==w?w:[])[Symbol.iterator]();!(O=(T=P.next()).done);O=!0){var k,M=T.value;if(s(null===M||void 0===M?void 0:M.type)){var I,L=null!==(I=c(null===M||void 0===M||null===(k=M.state)||void 0===k?void 0:k.symbol))&&void 0!==I?I:p;if(L&&null!=(null===M||void 0===M?void 0:M.id)){var A=n.get(L);A||(A={v:a,sources:[],groups:[]},n.set(L,A)),A.sources.push([String(M.id),d(M,L)])}}}}catch(j){x=!0,_=j}finally{try{O||null==P.return||P.return()}finally{if(x)throw _}}}}catch(j){m=!0,y=j}finally{try{g||null==C.return||C.return()}finally{if(m)throw y}}}}catch(j){o=!0,i=j}finally{try{r||null==f.return||f.return()}finally{if(o)throw i}}return n}function h(e){var t,n=0,r=!0,o=!1,i=void 0;try{for(var a,l=(null!==(t=null===e||void 0===e?void 0:e.charts)&&void 0!==t?t:[])[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){var c,u=a.value,d=!0,f=!1,h=void 0;try{for(var v,p=(null!==(c=null===u||void 0===u?void 0:u.panes)&&void 0!==c?c:[])[Symbol.iterator]();!(d=(v=p.next()).done);d=!0){var g=v.value;if(Array.isArray(null===g||void 0===g?void 0:g.sources)){var m=g.sources.filter((function(e){return!s(null===e||void 0===e?void 0:e.type)}));n+=g.sources.length-m.length,g.sources=m}}}catch(y){f=!0,h=y}finally{try{d||null==p.return||p.return()}finally{if(f)throw h}}}}catch(y){o=!0,i=y}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}var v=function(e){var t,n=e;return"string"===typeof(null===n||void 0===n||null===(t=n.state)||void 0===t?void 0:t.type)&&n.state.type||"string"===typeof(null===n||void 0===n?void 0:n.type)&&n.type||""},p=function(e){return s(v(e))};function g(e,t){var n,r,i,a=c(t),l=new Map,s=[],u=!0,d=!1,f=void 0;try{for(var h,v=(null!==(i=null===e||void 0===e||null===(n=e.sources)||void 0===n?void 0:n.entries())&&void 0!==i?i:[])[Symbol.iterator]();!(u=(h=v.next()).done);u=!0){var g=o(h.value,2),m=g[0],y=g[1],b=String(m);if(null!=y){if(p(y)){var C,w=null!==(C=c(y.symbol))&&void 0!==C?C:a;if(w){var S,O=null!==(S=l.get(w))&&void 0!==S?S:[];O.push([b,y]),l.set(w,O)}}}else s.push(b)}}catch(D){d=!0,f=D}finally{try{u||null==v.return||v.return()}finally{if(d)throw f}}var x,_=[],T=!0,P=!1,k=void 0;try{for(var M,I=(null!==(x=null===e||void 0===e||null===(r=e.groups)||void 0===r?void 0:r.entries())&&void 0!==x?x:[])[Symbol.iterator]();!(T=(M=I.next()).done);T=!0){var L=o(M.value,2),A=L[0],j=L[1];null!=j&&_.push([String(A),j])}}catch(D){P=!0,k=D}finally{try{T||null==I.return||I.return()}finally{if(P)throw k}}var N=1===l.size?l.keys().next().value:null;return{upserts:l,deletions:s,groups:_,groupsSymbol:null!==a&&void 0!==a?a:N}}var m=function(e,t){return null==t?[]:e.filter((function(e){return!t.has(e)}))}},53943:function(e,t,n){"use strict";n.d(t,{ZP:function(){return Sa},Fq:function(){return wa}});var r=n(73771),o=n.n(r),a=n(52676),l=n(97495),s=n(59816),c=n(82187),u=n.n(c),d=n(74637),f=n.n(d),h=n(21343),v=n.n(h),p=n(39817),g=n(75271),m=n(99169),y=n(90749),b=n(94088),C=n(77163),w=n(14177),S=n(85261),O=n.n(S);function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var T=function(e){var t=e.className,n=_(e,["className"]);return(0,a.jsx)("span",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){x(e,t,n[t])}))}return e}({className:u()(O().container,t)},n,{children:(0,a.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsxs)("g",{"clip-path":"url(#clip0_6046_17122)",children:[(0,a.jsx)("path",{d:"M14.7703 15.005H0.60791V1.62544C0.60791 1.27435 0.892754 0.989502 1.24385 0.989502C1.59494 0.989502 1.87978 1.27435 1.87978 1.62544V13.7329H14.7703C15.1213 13.7329 15.4062 14.0178 15.4062 14.3689C15.4062 14.72 15.1213 15.005 14.7703 15.005Z","stroke-width":"0.2"}),(0,a.jsx)("path",{d:"M4.98555 12.1276C4.63445 12.1276 4.34961 11.8427 4.34961 11.4916V7.70443C4.34961 7.35334 4.63445 7.0685 4.98555 7.0685C5.33664 7.0685 5.62148 7.35334 5.62148 7.70443V11.4916C5.62
1148 11.8426 5.33664 12.1276 4.98555 12.1276ZM8.45477 12.1276C8.10367 12.1276 7.81883 11.8427 7.81883 11.4916V4.15693C7.81883 3.80584 8.10367 3.521 8.45477 3.521C8.80586 3.521 9.0907 3.80584 9.0907 4.15693V11.4915C9.0907 11.8426 8.80586 12.1276 8.45477 12.1276ZM12.0849 12.1276C11.7338 12.1276 11.449 11.8427 11.449 11.4916V5.28568C11.449 4.93459 11.7338 4.64975 12.0849 4.64975C12.436 4.64975 12.7209 4.93459 12.7209 5.28568V11.4916C12.7209 11.8426 12.436 12.1276 12.0849 12.1276Z","stroke-width":"0.2"})]}),(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"clip0_6046_17122",children:(0,a.jsx)("rect",{width:"16",height:"16"})})})]})}))};function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var M=function(e){var t=e.className,n=k(e,["className"]);return(0,a.jsx)("span",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){P(e,t,n[t])}))}return e}({className:u()(O().container,t)},n,{children:(0,a.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("g",{"clip-path":"url(#clip0_6046_17126)",children:(0,a.jsx)("path",{d:"M3.62794 3.30743L4.04789 1.94855C4.13281 1.6738 4.30348 1.43348 4.5349 1.26278C4.76633 1.09209 5.04633 0.999994 5.3339 1H10.6671C10.9547 0.999994 11.2347 1.09209 11.4661 1.26278C11.6976 1.43348 11.8682 1.6738 11.9532 1.94855L12.3731 3.30743H13.5768C14.745 3.30743 15.692 4.25444 15.692 5.42258V13.114C15.692 14.2822 14.745 15.2292 13.5768 15.2292H2.42423C1.25609 15.2292 0.309082 14.2822 0.309082 13.114V5.42258C0.309082 4.25444 1.25609 3.30743 2.42423 3.30743H3.62794ZM4.05347 4.46115H2.42423C2.29797 4.46115 2.17295 4.48602 2.0563 4.53433C1.93966 4.58265 1.83367 4.65347 1.74439 4.74274C1.65512 4.83202 1.5843 4.93801 1.53598 5.05466C1.48767 5.1713 1.4628 5.29632 1.4628 5.42258V13.114C1.4628 13.2403 1.48767 13.3653 1.53598 13.4819C1.5843 13.5986 1.65512 13.7046 1.74439 13.7939C1.83367 13.8831 1.93966 13.9539 2.0563 14.0023C2.17295 14.0506 2.29797 14.0754 2.42423 14.0754H13.5768C13.7031 14.0754 13.8281 14.0506 13.9447 14.0023C14.0614 13.9539 14.1674 13.8831 14.2567 13.7939C14.3459 13.7046 14.4167 13.5986 14.4651 13.4819C14.5134 13.3653 14.5382 13.2403 14.5382 13.114V5.42258C14.5382 5.29632 14.5134 5.1713 14.4651 5.05466C14.4167 4.93801 14.3459 4.83202 14.2567 4.74274C14.1674 4.65347 14.0614 4.58265 13.9447 4.53433C13.8281 4.48602 13.7031 4.46115 13.5768 4.46115H11.9476C11.8243 4.46114 11.7044 4.42167 11.6052 4.34852C11.506 4.27537 11.4329 4.17239 11.3965 4.05466L10.8508 2.28928C10.8387 2.25003 10.8143 2.2157 10.7813 2.1913C10.7482 2.16691 10.7082 2.15374 10.6671 2.15372H5.3339C5.29283 2.15374 5.25284 2.16691 5.21979 2.1913C5.18675 2.2157 5.16238 2.25003 5.15027 2.28928L4.60456 4.05446C4.5682 4.17223 4.49507 4.27526 4.3959 4.34845C4.29673 4.42163 4.17672 4.46113 4.05347 4.46115ZM8.00052 11.768C6.40763 11.768 5.11623 10.4766 5.11623 8.88373C5.11623 7.29083 6.40763 5.99944 8.00052 5.99944C9.59342 5.99944 10.8848 7.29083 10.8848 8.88373C10.8848 10.4766 9.59342 11.768 8.00052 11.768ZM8.00052 10.6143C8.4595 10.6143 8.89968 10.432 9.22422 10.1074C9.54877 9.78288 9.7311 9.3427 9.7311 8.88373C9.7311 8.42475 9.54877 7.98457 9.22422 7.66003C8.89968 7.33548 8.4595 7.15315 8.00052 7.15315C7.54155 7.15315 7.10137 7.33548 6.77682 7.66003C6.45228 7.98457 6.26995 8.42475 6.26995 8.88373C6.26995 9.3427 6.45228 9.78288 6.77682 10.1074C7.10137 10.432 7.54155 10.6143 8.00052 10.6143Z","stroke-width":"0.21717"})}),(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"clip0_6046_17126",children:(0,a.jsx)("rect",{width:"16",height:"16"})})})]})}))};function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var A=function(e){var t=e.className,n=L(e,["className"]);return(0,a.jsx)("span",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){I(e,t,n[t])}))}return e}({className:u()(O().container,t)},n,{children:(0,a.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.3374 0.56378C14.5783 0.900725 14.5004 1.36917 14.1635 1.61009L8.80115 5.44416L4.87132 2.22457L1.41758 4.53965C1.07352 4.77028 0.607631 4.67833 0.376999 4.33426C0.146367 3.99019 0.238324 3.52431 0.58239 3.29368L4.96082 0.358761L8.86316 3.55584L13.291 0.389903C13.628 0.148987 14.0964 0.226834 14.3374 0.56378Z"}),(0,a.jsx)("rect",{x:"1",y:"8",width:"1.5",height:"7",rx:"0.75"}
1),(0,a.jsx)("rect",{x:"4.97723",y:"5.375",width:"1.5",height:"9.625",rx:"0.75"}),(0,a.jsx)("rect",{x:"8.95456",y:"10.625",width:"1.5",height:"4.375",rx:"0.75"}),(0,a.jsx)("rect",{x:"12.9318",y:"8",width:"1.5",height:"7",rx:"0.75"})]})}))};function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var D=function(e){var t=e.className,n=N(e,["className"]);return(0,a.jsx)("span",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){j(e,t,n[t])}))}return e}({className:u()(O().container,t)},n,{children:(0,a.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.00001 2.65001C2.80671 2.65001 2.65001 2.80671 2.65001 3.00001V14C2.65001 14.1933 2.80671 14.35 3.00001 14.35H13C13.1933 14.35 13.35 14.1933 13.35 14V5.25001H14.65V14C14.65 14.9113 13.9113 15.65 13 15.65H3.00001C2.08874 15.65 1.35001 14.9113 1.35001 14V3.00001C1.35001 2.08874 2.08874 1.35001 3.00001 1.35001H10V2.65001H3.00001Z"}),(0,a.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.75 6.375C3.75 5.96079 4.08579 5.625 4.5 5.625H7.375C7.78921 5.625 8.125 5.96079 8.125 6.375C8.125 6.78921 7.78921 7.125 7.375 7.125H4.5C4.08579 7.125 3.75 6.78921 3.75 6.375Z"}),(0,a.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.75 9.875C3.75 9.46079 4.08579 9.125 4.5 9.125H10C10.4142 9.125 10.75 9.46079 10.75 9.875C10.75 10.2892 10.4142 10.625 10 10.625H4.5C4.08579 10.625 3.75 10.2892 3.75 9.875Z"}),(0,a.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.7803 1.53034C15.0732 1.82323 15.0732 2.29811 14.7803 2.591L10.591 6.78034C10.2981 7.07323 9.82323 7.07323 9.53034 6.78034C9.23745 6.48745 9.23745 6.01257 9.53034 5.71968L13.7197 1.53034C14.0126 1.23745 14.4874 1.23745 14.7803 1.53034Z"})]})}))},E=n(70481),R=n(65799);function B(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var V=function(e){var t=e.className,n=F(e,["className"]);return(0,a.jsx)("span",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){B(e,t,n[t])}))}return e}({className:u()(O().container,t)},n,{children:(0,a.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("g",{"clip-path":"url(#clip0_6048_19112)",children:(0,a.jsx)("path",{d:"M17.0189 7.64385H15.3338L16.4395 4.46153C16.4706 4.35875 16.5221 4.26332 16.591 4.18097C16.6599 4.09862 16.7448 4.03104 16.8405 3.98231C16.9361 3.93357 17.0407 3.90468 17.1478 3.89737C17.2549 3.89006 17.3624 3.90448 17.4638 3.93976C17.5652 3.97504 17.6585 4.03046 17.7379 4.10269C17.8174 4.17492 17.8814 4.26246 17.9262 4.36006C17.9709 4.45766 17.9955 4.5633 17.9984 4.67064C18.0013 4.77797 17.9825 4.88478 17.9431 4.98466L17.0189 7.64385ZM13.2206 10.8304C13.0105 10.8304 12.8
1051 10.7681 12.6304 10.6514C12.4558 10.5347 12.3196 10.3688 12.2392 10.1747C12.1588 9.98061 12.1378 9.76704 12.1788 9.561C12.2198 9.35495 12.3209 9.16569 12.4695 9.01714C12.618 8.86859 12.8073 8.76743 13.0133 8.72644C13.2194 8.68546 13.433 8.70649 13.627 8.78689C13.8211 8.86728 13.987 9.00342 14.1037 9.1781C14.2205 9.35278 14.2828 9.55814 14.2828 9.76822C14.2828 9.90771 14.2553 10.0458 14.2019 10.1747C14.1485 10.3036 14.0703 10.4207 13.9716 10.5193C13.873 10.6179 13.7559 10.6962 13.627 10.7496C13.4982 10.8029 13.3601 10.8304 13.2206 10.8304ZM9.07803 4.5003L7.70409 7.56206C7.68896 7.59032 7.67211 7.61764 7.65364 7.64385H6.28873L5.32267 6.34426L4.88239 7.64385H3.2052L4.30084 4.39408C4.34747 4.25665 4.43076 4.13456 4.54172 4.041C4.65267 3.94745 4.78707 3.88598 4.93041 3.86324C5.07375 3.8405 5.22058 3.85735 5.35504 3.91196C5.4895 3.96658 5.60649 4.05689 5.69337 4.17315L6.80867 5.67189L8.57455 1.73596C8.64111 1.58405 8.75401 1.45709 8.8971 1.37323C9.04019 1.28938 9.20614 1.25294 9.3712 1.26912C9.53623 1.2842 9.69245 1.35037 9.81811 1.45842C9.94377 1.56646 10.0326 1.71101 10.0722 1.87192L11.4871 7.64385H9.84812L9.07803 4.5003ZM2.06759 10.8304C1.85751 10.8304 1.65215 10.7681 1.47747 10.6514C1.3028 10.5347 1.16665 10.3688 1.08626 10.1747C1.00586 9.98061 0.98483 9.76704 1.02581 9.561C1.0668 9.35495 1.16796 9.16569 1.31651 9.01714C1.46506 8.86859 1.65433 8.76743 1.86037 8.72644C2.06641 8.68546 2.27998 8.70649 2.47407 8.78689C2.66816 8.86728 2.83405 9.00342 2.95077 9.1781C3.06748 9.35278 3.12978 9.55814 3.12978 9.76822C3.12978 9.90771 3.10231 10.0458 3.04893 10.1747C2.99555 10.3036 2.91731 10.4207 2.81867 10.5193C2.72004 10.6179 2.60294 10.6962 2.47407 10.7496C2.3452 10.8029 2.20708 10.8304 2.06759 10.8304ZM1.77284 11.8926H3.45269L2.56098 14.5369C2.53078 14.6399 2.48008 14.7357 2.41193 14.8186C2.34378 14.9016 2.25957 14.9698 2.16437 15.0194C2.06917 15.069 1.96493 15.0988 1.85792 15.107C1.75092 15.1153 1.64334 15.1019 1.54165 15.0675C1.43996 15.0332 1.34626 14.9787 1.26617 14.9072C1.18609 14.8358 1.12126 14.7489 1.07559 14.6518C1.02992 14.5546 1.00435 14.4493 1.00041 14.342C0.996476 14.2348 1.01425 14.1278 1.05267 14.0276L1.77284 11.8926ZM5.78525 8.70603C5.99533 8.70603 6.20069 8.76833 6.37537 8.88504C6.55005 9.00176 6.68619 9.16765 6.76658 9.36174C6.84698 9.55583 6.86801 9.7694 6.82703 9.97544C6.78604 10.1815 6.68488 10.3708 6.53633 10.5193C6.38778 10.6679 6.19852 10.769 5.99247 10.81C5.78643 10.851 5.57286 10.83 5.37877 10.7496C5.18468 10.6692 5.01879 10.533 4.90207 10.3583C4.78536 10.1837 4.72306 9.9783 4.72306 9.76822C4.72306 9.48651 4.83497 9.21634 5.03417 9.01714C5.23337 8.81794 5.50354 8.70603 5.78525 8.70603ZM9.50291 8.70603C9.71299 8.70603 9.91835 8.76833 10.093 8.88504C10.2677 9.00176 10.4038 9.16765 10.4842 9.36174C10.5646 9.55583 10.5857 9.7694 10.5447 9.97544C10.5037 10.1815 10.4025 10.3708 10.254 10.5193C10.1054 10.6679 9.91617 10.769 9.71013 10.81C9.50408 10.851 9.29051 10.83 9.09643 10.7496C8.90234 10.6692 8.73644 10.533 8.61973 10.3583C8.50302 10.1837 8.44072 9.9783 8.44072 9.76822C8.44072 9.48651 8.55263 9.21634 8.75183 9.01714C8.95103 8.81794 9.2212 8.70603 9.50291 8.70603ZM13.0788 14.1338L13.8579 11.8926H15.543L13.6985 17.1993C13.6444 17.3554 13.543 17.4908 13.4084 17.5867C13.2739 17.6826 13.1128 17.7343 12.9476 17.7346H12.9099C12.7383 17.7264 12.574 17.663 12.4415 17.5538C12.3089 17.4446 12.2152 17.2955 12.1743 17.1287L10.8901 11.8926H12.5301L13.0788 14.1338ZM16.9382 8.70603C17.1483 8.70603 17.3537 8.76833 17.5283 8.88504C17.703 9.00176 17.8392 9.16765 17.9196 9.36174C17.9999 9.55583 18.021 9.7694 17.98 9.97544C17.939 10.1815 17.8378 10.3708 17.6893 10.5193C17.5407 10.6679 17.3515 10.769 17.1454 10.81C16.9394 10.851 16.7258 10.83 16.5317 10.7496C16.3376 10.6692 16.1718 10.533 16.055 10.3583C15.9383 10.1837 15.876 9.9783 15.876 9.76822C15.876 9.48651 15.9879 9.21634 16.1871 9.01714C16.3863 8.81794 16.6565 8.70603 16.9382 8.70603Z"})}),(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"clip0_6048_19112",children:(0,a.jsx)("rect",{width:"17",height:"17",transform:"translate(1 1)"})})})]})}))};function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var W=function(e){var t=e.className,n=z(e,["className"]);return(0,a.jsx)("span",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){U(e,t,n[t])}))}return e}({className:u()(O().container,t)},n,{children:(0,a.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2 4C2 3.0335 2.7835 2.25 3.75 2.25H5.75C6.7165 2.25 7.5 3.0335 7.5 4V14C7.5 14.9665 6.7165 15.75 5.75 15.75H3.75C2.7835 15.75 2 14.9665 2 14V4ZM3.75 3.75C3.61193 3.75 3.5 3.86193 3.5 4V14C3.5 14.1381 3.61193 14.25 3.75 14.25H5.75C5.88807 14.25 6 14.1381 6 14V4C6 3.86193 5.88807 3.75 5.75 3.75H3.75Z"}),(0,a.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10 6C10 5.0335 10.7835 4.25 11.75 4.25H13.75C14.7165 4.25 15.5 5.0335 15.5 6V12C15.5 12.9665 14.7165 13.75 13.75 13.75H11.75C10.7835 13.75 10 12.9665 10 12V6ZM11.75 5.75C11.6119 5.75 11.5 5.86193 11.5 6V12C11.5 12.1381 11.6119 12.25 11.75 12.25H13.75C13.8881 12.25 14 12.1381 14 12V6C14 5.86193 13.8881 5.75 13.75 5.75H11.75Z"}),(0,a.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.7998 2C12.3856 2 12.0498 2.33579 12.0498 2.75V4.25C12.0498 4.66421 12.3856 5 12.7998 5C13.214 5 13.5498 4.66421 13.5498 4.25V2.75C13.5498 2.33579 13.214 2 12.7998 2ZM12.7998 13C12.3856 13 12.0498 13.3358 12.0498 13.75V15.25C12.0498 15.6642 12.3856 16 12.7998 16C13.214 16 13.5498 15.6642 13.5498 15.25V13.75C13.5498 13.3358 13.214 13 12.7998 13Z"}),(0,a.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.7998 0C4.38559 0 4.0498 0.335786 4.0498 0.75V2.25C4.0498 2.66421 4.38559 3 4.7998 3C5.21402 3 5.5498 2.66421 5.5498 2.25V0.75C5.5498 0.335786 5.21402 0 4.7998 0ZM4.7998 15C4.38559 15 4.0498 15.3358 4.0498 15.75V17.25C4.0498 17.6642 4.38559 18 4.7998 18C5.21402 18 5.5498 17.6642 5.5498 17.25V15.75C5.5498 15.3358 5.21402 15 4.7998 15Z"})]})}))};function Z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Q(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var H=function(e){var t=e.className,n=Q(e,["className"]);return(0,a.jsx)("span",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Z(e,t,n[t])}))}return e}({className:u()(O().container,t)},n,{children:(0,a.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"M15.3984 15.8901H2.00006V3.23235C2.00006 2.9002 2.26954 2.63072 2.60169 2.63072C2.93385 2.63072 3.20333 2.9002 3.20333 3.23235V14.6867H15.3984C15.7306 14.6867 16.0001 14.9562 16.0001 15.2884C16.0001 15.6205 15.7306 15.8901 15.3984 15.8901Z","stroke-width":"0.3"}),(0,a.jsx)("path",{d:"M5.20917 12.2063L7.73198 9.68352L10.6753 12.2063L14.88 7.58118","stroke-width":"1.5","stroke-linecap":"round"})]})}))};function G(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Y(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var K=function(e){var t=e.className,n=Y(e,["className"]);return(0,a.jsx)("span",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){G(e,t,n[t])}))}return e}({className:u()(O().container,t)},n,{children:(0,a.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"M15.3984 15.8901H2.00006V3.23235C2.00006 2.9002 2.26954 2.63072 2.60169 2.63072C2.93385 2.63072 3.20333 2.9002 3.20333 3.23235V14.6867H15.3984C15.7306 14.6867 16.0001 14.9562 16.0001 15.2884C16.0001 15.6205 15.7306 15.8901 15.3984 15.8901Z","stroke-width":"0.3"}),(0,a.jsx)("path",{d:"M14.9873 13.1809H5.7478C5.33568 13.1809 5 12.8452 5 12.4331V8.48469C5 8.25537 5.10303 8.04266 5.2825 7.89975L8.17732 5.53005L8.18231 5.52673C8.53128 5.25253 9.0348 5.27746 9.35552 5.58323L11.5308 7.59066L14.5153 5.16944C14.7413 4.98499 15.0455 4.94843 15.308 5.07306C15.5722 5.1977 15.7368 5.45693 15.7368 5.74941V12.4331C1
15.7368 12.8452 15.4011 13.1809 14.9873 13.1809ZM5.99707 12.1838H14.7397V6.2712L12.0725 8.4365C11.7352 8.71236 11.245 8.69408 10.9292 8.3933L8.73069 6.36426L5.99707 8.60268V12.1838Z","stroke-width":"0.3"})]})}))};function q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function J(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var X=function(e){var t=e.className,n=J(e,["className"]);return(0,a.jsx)("span",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){q(e,t,n[t])}))}return e}({className:u()(O().container,t)},n,{children:(0,a.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2 4C2 3.0335 2.7835 2.25 3.75 2.25H5.75C6.7165 2.25 7.5 3.0335 7.5 4V14C7.5 14.9665 6.7165 15.75 5.75 15.75H3.75C2.7835 15.75 2 14.9665 2 14V4ZM3.75 3.75C3.61193 3.75 3.5 3.86193 3.5 4V5.22118L5.55965 3.75H3.75ZM3.5 7.72118V7.06453L6 5.27882V5.93547L3.5 7.72118ZM3.5 9.56453V10.2212L6 8.43547V7.77882L3.5 9.56453ZM3.5 12.7212V12.0645L6 10.2788V10.9355L3.5 12.7212ZM3.94035 14.25H5.75C5.88807 14.25 6 14.1381 6 14V12.7788L3.94035 14.25Z"}),(0,a.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10 6C10 5.0335 10.7835 4.25 11.75 4.25H13.75C14.7165 4.25 15.5 5.0335 15.5 6V12C15.5 12.9665 14.7165 13.75 13.75 13.75H11.75C10.7835 13.75 10 12.9665 10 12V6ZM11.75 5.75C11.6119 5.75 11.5 5.86193 11.5 6V12C11.5 12.1381 11.6119 12.25 11.75 12.25H13.75C13.8881 12.25 14 12.1381 14 12V6C14 5.86193 13.8881 5.75 13.75 5.75H11.75Z"}),(0,a.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.7998 2C12.3856 2 12.0498 2.33579 12.0498 2.75V4.25C12.0498 4.66421 12.3856 5 12.7998 5C13.214 5 13.5498 4.66421 13.5498 4.25V2.75C13.5498 2.33579 13.214 2 12.7998 2ZM12.7998 13C12.3856 13 12.0498 13.3358 12.0498 13.75V15.25C12.0498 15.6642 12.3856 16 12.7998 16C13.214 16 13.5498 15.6642 13.5498 15.25V13.75C13.5498 13.3358 13.214 13 12.7998 13Z"}),(0,a.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.7998 0C4.38559 0 4.0498 0.335786 4.0498 0.75V2.25C4.0498 2.66421 4.38559 3 4.7998 3C5.21402 3 5.5498 2.66421 5.5498 2.25V0.75C5.5498 0.335786 5.21402 0 4.7998 0ZM4.7998 15C4.38559 15 4.0498 15.3358 4.0498 15.75V17.25C4.0498 17.6642 4.38559 18 4.7998 18C5.21402 18 5.5498 17.6642 5.5498 17.25V15.75C5.5498 15.3358 5.21402 15 4.7998 15Z"})]})}))};function $(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ee(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var te=function(e){var t=e.className,n=ee(e,["className"]);return(0,a.jsx)("span",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){$(e,t,n[t])}))}return e}({className:u()(O().container,t)},n,{children:(0,a.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("g",{"clip-path":"url(#clip0_6048_19041)",children:(0,a.jsx)("path",{d:"M17.2031 10.625H14.8125V14.0781C14.8125 14.2895 14.7285 14.4922 14.5791 14.6416C14.4297 14.791 14.227 14.875 14.0156 14.875C13.8043 14.875 13.6016 14.791 13.4521 14.6416C13.3027 14.4922 13.2188 14.2895 13.2188 14.0781V4.25H11.3594C11.148 4.25 10.9453 4.16604 10.7959 4.0166C10.6465 3.86716 10.5625 3.66447 10.5625 3.45312C10.5625 3.24178 10.6465 3.03909 10.7959 2.88965C10.9453 2.74021 11.148 2.65625 11.3594 2.65625H13.2188V0.796875C13.2188 0.585531 13.3027 0.382842 13.4521 0.233399C13.6016 0.0839562 13.8043 0 14.0156 0C14.227 0 14.4297 0.0839562 14.5791 0.233399C14.7285 0.382842 14.8125 0.585531 14.8125 0.796875V9.03125H17.2031C17.4145 9.03125 17.6172 9.11521 17.7666 9.26465C17.916 9.41409 18 9.61678 18 9.82812C18 10.0395 17.916 10.2422 17.7666 10.3916C17.6172 10.541 17.4145 10.625 17.2031 10.625ZM7.64062 7.96875H5.24469V12.4578C5.24469 12.4674 5.25 12.4748 5.25 12.4844C5.25 12.4939 5.24522 12.5014 5.24469 12.5109V16.1978C5.24469 16.4092 5.16073 16.6118 5.01129 16.7613C4.86185 16.9107 4.65916 16.9947 4.44781 16.9947C4.23647 16.9947 4.03378 16.9107 3.88434 16.7613C3.73489 16.6118 3.65094 16.4092 3.65094 16.1978V13.2812H1.79687C1.58553 13.2812 1.38284 13.1973 1.2334 13.0478C1.08396 12.8984 1 12.6957 1 12.4844C1 12.273 1.08396 12.0703 1.2334 11.9209C1.38284 11.7715 1.58553 11.6875 1.79687 11.6875H3.65094V2.91656C3.65094 2.70522 3.73489 2.50253 3.88434 2.35309C4.03378 2.20364 4.23647 2.11969 4.44781 2.11969C4.65916 2.11969 4.86185 2.20364 5.01129 2.35309C5.16073 2.50253 5.24469 2.70522 5.24469 2.91656V6.375H7.64062C7.85197 6.375 8.05466 6.45896 8.2041 6.6084C8.35354 6.75784 8.4375 6.96053 8.4375 7.17187C8.4375 7.38322 8.35354 7.58591 8.2041 7.73535C8.05466 7.88479 7.85197 7.96875 7.64062 7.96875Z"})}),(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"clip0_6048_19041",children:(0,a.jsx)("rect",{width:"17",height:"17",transform:"translate(1)"})})})]})}))};function ne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function re(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var oe=function(e){var t=e.className,n=re(e,["className"]);return(0,a.jsx)("span",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ne(e,t,n[t])}))}return e}({className:u()(O().container,t)},n,{children:(0,a.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2 4C2 3.0335 2.7835 2.25 3.75 2.25H5.75C6.7165 2.25 7.5 3.0335 7.5 4V14C7.5 14.9665 6.7165 15.75 5.75 15.75H3.75C2.7835 15.75 2 14.9665 2 14V4ZM3.75 3.75C3.61193 3.75 3.5 3.86193 3.5 4V14C3.5 14.1381 3.61193 14.25 3.75 14.25H5.75C5.88807 14.25 6 14.1381 6 14V4C6 3.86193 5.88807 3.75 5.75 3.75H3.75Z"}),(0,a.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10 6C10 5.0335 10.7835 4.25 11.75 4.25H13.75C14.7165 4.25 15.5 5.0335 15.5 6V12C15.5 12.9665 14.7165 13.75 13.75 13.75H11.75C10.7835 13.75 10 12.9665 10 12V6ZM11.75 5.75C11.6119 5.75 11.5 5.86193 11.5 6V12C11.5 12.1381 11.6119 12.25 11.75 12.25H13.75C13.8881 12.25 14 12.1381 14 12V6C14 5.86193 13.8881 5.75 13.75 5.75H11.75Z"}),(0,a.jsx)("path",{d:"M12.0498 2.75C12.0498 2.33579 12.3856 2 12.7998 2C13.214 2 13.5498 2.33579 13.5498 2.75V4.25C13.5498 4.66421 13.214 5 12.7998 5C12.3856 5 12.0498 4.66421 12.0498 4.25V2.75Z"}),(0,a.jsx)("path",{d:"M4.0498 0.75C4.0498 0.335786 4.38559 0 4.7998 0C5.21402 0 5.5498 0.335786 5.5498 0.75V2.25C5.5498 2.66421 5.21402 3 4.7998 3C4.38559 3 4.0498 2.66421 4.0498 2.25V0.75Z"})]})}))},ie=n(82946),ae=n.n(ie),le=l.Px.useTranslation,se=(0,g.forwardRef)((function(e,t){var n=e.className,r=function(e){var t=e.onChange,n=e.chart,r=le().t,o=(0,g.useState)(0),i=o[0],l=o[1],s=(0,g.useState)((0,a.jsx)(a.Fragment,{})),c=s[0],u=s[1],d=(0,g.useState)([{icon:(0,a.jsx)(W,{}),title:r("KLine.chartTypeCandles"),type:1},{icon:(0,a.jsx)(te,{}),title:r("KLine.chartTypeBars"),type:0},{icon:(0,a.jsx)(H,{}),title:r("KLine.chartTypeLine"),type:2},{icon:(0,a.jsx)(K,{}),title:r("KLine.chartTypeArea"),type:3},{icon:(0,a.jsx)(oe,{}),title:r("KLine.chartTypeHeikinAshi"),type:8},{icon:(0,a.jsx)(X,{}),title:r("KLine.chartTypeHollowCandles"),type:9},{icon:(0,a.jsx)(V,{}),title:r("KLine.chartTypeBaseline"),type:10}]),f=d[0];return d[1],(0,g.useEffect)((function(){var e=!0,t=!1,n=void 0;try{for(var r,o=f[Symbol.iterator]();!(e=(r=o.next()).done);e=!0){var a=r.value;if(a.type===i){u(a.icon);break}}}
1catch(l){t=!0,n=l}finally{try{e||null==o.return||o.return()}finally{if(t)throw n}}}),[i,f]),(0,g.useEffect)((function(){var e=!1,t=function(){if(!e)try{var r,o=null===(r=n.current)||void 0===r?void 0:r.chart().chartType();if(void 0===o)return window.requestAnimationFrame(t);l(o)}catch(je){window.requestAnimationFrame(t)}};return t(),function(){return e=!0}}),[]),{type:i,changeType:function(e){l(e),t(e)},iconWidget:c,typeItems:f}}(e),o=r.changeType,i=r.iconWidget,l=r.typeItems,s=r.type,c=function(e){var t=e.icon,n=e.title,r=e.type;return(0,a.jsxs)("div",{className:u()(ae().listItem,r===s?ae().listItemActive:null),onClick:function(){return o(r)},children:[(0,a.jsx)("span",{className:ae().itemIcon,children:t}),(0,a.jsx)("span",{className:ae().itemText,children:n})]},r)},d=(0,a.jsx)("div",{className:ae().listContainer,children:l.map((function(e,t){return(0,a.jsxs)(a.Fragment,{children:[c(e),t%2!==0?(0,a.jsx)("div",{className:ae().listDivision}):(0,a.jsx)(a.Fragment,{})]})}))});return(0,g.useImperativeHandle)(t,(function(){return{changeType:o}})),(0,a.jsx)(R.Z,{getPopupContainer:e.getPopupContainer,placement:"bottom",content:d,style:{borderRadius:6},children:(0,a.jsx)("span",{className:n,children:i})})})),ce=se,ue=n(10073),de=n.n(ue),fe=n(56339);function he(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ve(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return he(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return he(e,t)}(e,i)||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.")}()}var pe,ge,me,ye,be,Ce,we,Se,Oe,xe,_e,Te,Pe,ke,Me,Ie,Le,Ae,je,Ne,De,Ee,Re,Be,Fe,Ve,Ue,ze,We,Ze,Qe,He,Ge,Ye,Ke,qe,Je,Xe,$e,et,tt,nt,rt,ot,it,at,lt,st,ct,ut,dt,ft,ht,vt,pt,gt,mt,yt,bt,Ct,wt,St,Ot,xt,_t,Tt,Pt,kt,Mt,It,Lt,At,jt,Nt,Dt,Et,Rt,Bt,Ft,Vt,Ut,zt,Wt,Zt,Qt,Ht,Gt,Yt,Kt,qt,Jt,Xt,$t,en,tn,nn,rn,on,an,ln,sn,cn,un,dn,fn,hn,vn,pn,gn,mn,yn,bn,Cn,wn,Sn,On,xn,_n,Tn,Pn,kn,Mn,In,Ln,An,jn,Nn,Dn,En,Rn,Bn,Fn,Vn,Un,zn,Wn,Zn,Qn,Hn,Gn,Yn,Kn,qn,Jn,Xn,$n,er,tr,nr,rr,or,ir,ar,lr,sr,cr,ur,dr,fr,hr,vr,pr,gr,mr,yr,br,Cr,wr,Sr=l.Px.useTranslation,Or=function(e){var t=function(e){var t=e.symbol,n=e.setSymbolType,r=Sr(),o=(0,g.useState)([{label:r("KLine.chartPriceTypeNew"),key:0,mark:""},{label:r("KLine.chartPriceTypeIndex"),key:1,mark:"index"},{label:r("KLine.chartPriceTypeMark"),key:2,mark:"mark"}]),i=o[0],a=(o[1],(0,g.useState)(i[0])),l=a[0],s=a[1];return(0,g.useEffect)((function(){var e=ve(i),n=e[0],r=e.slice(1),o=!0,a=!1,l=void 0;try{for(var c,u=r[Symbol.iterator]();!(o=(c=u.next()).done);o=!0){var d=c.value;if(t.includes(d.mark))return void s(d)}}catch(f){a=!0,l=f}finally{try{o||null==u.return||u.return()}finally{if(a)throw l}}s(n)}),[t,i]),{nowPriceType:l,priceTypeList:i,changeNowPriceType:function(e){var r="",o=!0,a=!1,l=void 0;try{for(var s,c=t[Symbol.iterator]();!(o=(s=c.next()).done);o=!0){var u=s.value;if("_"===u)break;r+=u}}catch(C){a=!0,l=C}finally{try{o||null==c.return||c.return()}finally{if(a)throw l}}var d=null,f=!0,h=!1,v=void 0;try{for(var p,g=i[Symbol.iterator]();!(f=(p=g.next()).done);f=!0){var m=p.value;if(m.key===e){d=m;break}}}catch(C){h=!0,v=C}finally{try{f||null==g.return||g.return()}finally{if(h)throw v}}if(null!==d){var y=d.mark,b=/usdt$/.test(t)||!/_usd/.test(t)?"".concat(r,"_").concat(y||"usdt"):"".concat(t.replace(/_(index|mark)$/,"")).concat(y?"_".concat(y):"");n(b)}}}}(e),n=t.nowPriceType,r=t.priceTypeList,o=t.changeNowPriceType,i=(0,a.jsx)("div",{children:r.map((function(e){return(0,a.jsx)("p",{className:u()(de().priceListText,n.key===e.key?de().priceActive:null),onClick:function(){return o(e.key)},children:e.label},e.key)}))});return(0,a.jsx)(R.Z,{getPopupContainer:e.getPopupContainer,placement:"bottom",content:i,style:{borderRadius:6},children:(0,a.jsxs)("div",{className:de().priceType,children:[(0,a.jsx)("p",{className:de().priceText,children:n.label}),(0,a.jsx)(fe.Z,{className:de().priceIcon})]})})},xr=n(77263),_r=n(67143),Tr=n(38216),Pr=n(16052),kr=n(91446),Mr=function(){var e=(0,Pr.oR)().ticker,t=(0,Tr.useRouter)().push,n=(0,g.useCallback)((function(t){var n=(t.includes(":")?t.split(":")[1]:t).toLowerCase().replace(/_(index|mark)$/,""),r=n.includes("_")?n:"".concat(n,"_usdt");if(e.allSymbolConfigList.some((function(e){return e.symbol===r})))return r;var o=n.replace(/[^a-z0-9]/g,"");if(o.endsWith("usdt")){var i=o.slice(0,-4),a="".concat(i,"_usdt");if(i&&e.allSymbolConfigList.some((function(e){return e.symbol===a})))return a}if(o.endsWith("usd")){var l=o.slice(0,-3),s="".concat(l,"_usd");if(l&&e.allSymbolConfigList.some((function(e){return e.symbol===s})))return s}return null}),[e]);return{syncSymbolFromChart:(0,g.useCallback)((function(r){var o=n(r);if(o){var i=e.getSymbolConfig(o);e.setCurrentSymbolIdentity(o);var a=(0,kr.E)(o,i.contractType);t("/futures/trade/".concat(a,"?realSymbolId=").concat(o,"&underlying=").concat(i.underlyingType,"&contractType=").concat(i.contractType),"/futures/trade/".concat(a),{shallow:!0})}}),[n,e,t]),resolveChartSymbolToBase:n}},Ir=n(61468),Lr=n(79086);function Ar(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jr(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(c){return void n(c)}l.done?t(s):Promise.resolve(s).then(r,o)}function Nr(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){jr(i,r,o,a,l,"next",e)}function l(e){jr(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Dr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Er(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||Fr(e,t)||function(){throw new TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Br(e){return function(e){if(Array.isArray(e))return Ar(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Fr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fr(e,t){if(e){if("string"===typeof e)return Ar(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ar(e,t):void 0}}function Vr(e,t){var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Er(e,t,n[t])}))}return e}({},e);for(var r in t)"object"!=typeof e[r]||null===e[r]||Array.isArray(e[r])?void 0!==t[r]&&(n[r]=t[r]):n[r]=Vr(e[r],t[r]);return n}(wr=pe||(pe={})).UnknownAction="UnknownAction",wr.Spinner="Spinner",wr.Loading="Loading",wr.AlertAdd="Alert.Add",wr.AlertEdit="Alert.Edit",wr.AlertsClone="Alerts.Clone",wr.AlertsRemove="Alerts.Remove",wr.AlertsRemoveAll="Alerts.RemoveAll",wr.AlertsRemoveFiltered="Alerts.RemoveFiltered",wr.AlertsRemoveAllInactive="Alerts.RemoveAllInactive",wr.AlertsRemoveAllWatchlistInactive="Alerts.RemoveAllWatchlistInactive",wr.AlertsRemoveFires="Alerts.RemoveFires",wr.AlertsRestart="Alerts.Restart",wr.AlertsRestartAllInactive="Alerts.RestartAllInactive",wr.AlertsRestartFilteredInactive="Alerts.RestartFilteredInactive",wr.AlertsStop="Alerts.Stop",wr.AlertsStopAll="Alerts.StopAll",wr.AlertsStopFilteredActive="Alerts.StopFilteredActive",wr.AlertsExportFiresToCSV="Alerts.ExportFiresToCSV",wr.AlertsLogClear="AlertsLog.Clear",wr.AlertsLogRemoveFiltered="AlertsLog.RemoveFiltered",wr.ChartAddIndicatorToAllCharts="Chart.AddIndicatorToAllCharts",wr.ChartAddSymbolToWatchList="Chart.AddSymbolToWatchList",wr.ChartAlertLabelToggleExtendLines="Chart.AlertLabel.ToggleExtendLines",wr.ChartApplyIndicatorsToAllCharts="Chart.ApplyIndicatorsToAllCharts",wr.ChartIndicatorApplyChildIndicator="Chart.Indicator.ApplyChildIndicator",wr.ChartIndicatorApplyFinancials="Chart.Indicator.ApplyFinancials",wr.ChartIndicatorAbout="Chart.Indicator.About",wr.ChartIndicatorPineLogs="Chart.Indicator.PineLogs",wr.ChartIndicatorPineSource="Chart.Indicator.PineSource",wr.ChartIndicatorAddFavorites="Chart.Indicator.AddFavorites",wr.ChartChangeTimeZone="Chart.ChangeTimeZone",wr.ChartClipboardCopyPrice="Chart.Clipboard.CopyPrice",wr.ChartClipboardCopyLineTools="Chart.Clipboard.CopyLineTools",wr.ChartClipboardCopySource="Chart.Clipboard.CopySource",wr.ChartClipboardPasteSource="Chart.Clipboard.PasteSource",wr.ChartCrosshairLockVerticalCursor="Chart.Crosshair.LockVerticalCursor",wr.ChartCrosshairPlusButtonDrawHorizontalLine="Chart.Crosshair.PlusButton.DrawHorizontalLine",wr.ChartCustomActionId="Chart.CustomActionId",wr.ChartDialogsShowChangeInterval="Chart.Dialogs.ShowChangeInterval",wr.ChartDialogsShowChangeSymbol="Chart.Dialogs.ShowChangeSymbol",wr.ChartDialogsShowCompareOrAddSymbol="Chart.Dialogs.ShowCompareOrAddSymbol",wr.ChartDialogsShowGeneralSettings="Chart.Dialogs.ShowGeneralSettings",wr.ChartDialogsShowGeneralSettingsLegendTab="Chart.Dialogs.ShowGeneralSettings.LegendTab",wr.ChartDialogsShowGeneralSettingsSymbolTab="Chart.Dialogs.ShowGeneralSettings.SymbolTab",wr.ChartDialogsShowGeneralScalesTab="Chart.Dialogs.ShowGeneralSettings.ScalesTab",wr.ChartDialogsShowGeneralSettingsEventsTab="Chart.Dialogs.ShowGeneralSettings.EventsTab",wr.ChartDialogsShowGeneralSettingsAlertsTab="Chart.Dialogs.ShowGeneralSettings.AlertsTab",wr.ChartDialogsShowGoToDate="Chart.Dialogs.ShowGoToDate",wr.ChartDialogsShowInsertIndicators="Chart.Dialogs.ShowInsertIndicators",wr.ChartDialogsShowInsertFinancials="Chart.Dialogs.ShowInsertFinancials",wr.ChartDialogsShowInsertSeasonals="Chart.Dialogs.ShowInsertSeasonals",wr.ChartDialogsShowInsertStockBonds="Chart.Dialogs.ShowInsertStockBonds",wr.ChartDialogsShowInsertAnalysis="Chart.Dialogs.ShowInsertAnalysis",wr.ChartDialogsShowInsertTechnicals="Chart.Dialogs.ShowInsertTechnicals",wr.ChartDialogsShowInsertForecast="Chart.Dialogs.ShowInsertForecast",wr.ChartDialogsShowInsertOptions="Chart.Dialogs.ShowInsertOptions",wr.ChartDetailsMetricsActionId="Chart.Dialogs.DetailsMetrics",wr.ChartDialogsShowInsertEconomyIndicators="Chart.Dialogs.ShowInsertEconomyIndicators",wr.ChartDialogsShowSymbolInfo="Chart.Dialogs.ShowSymbolInfo",wr.ChartDrawingToolbarToggleVisibility="Chart.DrawingToolbar.ToggleVisibility",wr.ChartExternalActionId="Chart.ExternalActionId",wr.ChartFavoriteDrawingToolsToolbarHide="Chart.FavoriteDrawingToolsToolbar.Hide",wr.ChartIndicatorShowSettingsDialog="Chart.Indicator.ShowSettingsDialog",wr.ChartLegendToggleLastDayChangeValuesVisibility="Chart.Legend.ToggleLastDayChangeValuesVisibility",wr.ChartLinkingGroupSync="Chart.LinkingGroupSync",wr.ChartLinkingGroupSyncChangeGroup="Chart.LinkingGroupSync.ChangeGroup",wr.ChartLegendToggleBarChangeValuesVisibility="Chart.Legend.ToggleBarChangeValuesVisibility",wr.ChartLegendToggleBarChangeColor="Chart.Legend.ToggleBarChangeColor",wr.ChartLegendTogglePriceSourceVisibility="Chart.Legend.TogglePriceSourceVisibility",wr.ChartLegendToggleIndicatorArgumentsVisibility="Chart.Legend.ToggleIndicatorArgumentsVisibility",wr.ChartLegendToggleIndicatorTitlesVisibility="Chart.Legend.ToggleIndicatorTitlesVisibility",wr.ChartLegendToggleIndicatorValuesVisibility="Chart.Legend.ToggleIndicatorValuesVisibility",wr.ChartLegendToggleOhlcValuesVisibility="Chart.Legend.ToggleOhlcValuesVisibility",wr.ChartLegendToggleOpenMarketStatusVisibility="Chart.Legend.ToggleOpenMarketStatusVisibility",wr.ChartLegendToggleSymbolVisibility="Chart.Legend.ToggleSymbolVisibility",wr.ChartLegendToggleVolumeVisibility="Chart.Legend.ToggleVolumeVisibility",wr.ChartLines="Chart.Lines",wr.ChartLinesToggleBidAskLinesVisibility="Chart.Lines.ToggleBidAskLinesVisibility",wr.ChartLinesToggleHighLowLinesVisibility="Chart.Lines.ToggleHighLowLinesVisibility",wr.ChartLinesToggleAverageLineVisibility="Chart.Lines.ToggleAverageLineVisibility",wr.ChartLinesTogglePrePostMarketPriceLineVisibility="Chart.Lines.TogglePrePostMarketPriceLineVisibility",wr.ChartLinesToggleSeriesPrevCloseLineVisibility="Chart.Lines.ToggleSeriesPrevCloseLineVisibility",wr.ChartLinesToggleSeriesPriceLineVisibility="Chart.Lines.ToggleSeriesPriceLineVisibility",wr.ChartLineToolBarsPatternToggleFlipped="Chart.LineTool.BarsPattern.ToggleFlipped",wr.ChartLineToolBarsPatternToggleMirrored="Chart.LineTool.BarsPattern.ToggleMirrored",wr.ChartLineToolRiskRewardReverse="Chart.LineTool.RiskReward.Reverse",wr.ChartLineToolClone="Chart.LineTool.Clone",wr.ChartLineToolCreateLimitOrderFromState="Chart.LineTool.CreateLimitOrderFromState",wr.ChartLineToolElliotChangeDegreeProperty="Chart.LineTool.Elliot.ChangeDegreeProperty",wr.ChartLineToolNoSync="Chart.LineTool.NoSync",wr.ChartLineToolPitchforkChangeTypeToInside="Chart.LineTool.Pitchfork.ChangeTypeToInside",wr.ChartLineToolPitchforkChangeTypeToModifiedSchiff="Chart.LineTool.Pitchfork.ChangeTypeToModifiedSchiff",wr.ChartLineToolPitchforkChangeTypeToOriginal="Chart.LineTool.Pitchfork.ChangeTypeToOriginal",wr.ChartLineToolPitchforkChangeTypeToSchiff="Chart.LineTool.Pitchfork.ChangeTypeToSchiff",wr.ChartLineToolSyncInLayout="Chart.LineTool.SyncInLayout",wr.ChartLineToolSyncGlobally="Chart.LineTool.SyncGlobally",wr.ChartLineToolTemplates="Chart.LineTool.Templates",wr.ChartLineToolTemplatesApply="Chart.LineTool.Templates.Apply",wr.ChartLineToolTemplatesApplyDefaults="Chart.LineTool.Templates.ApplyDefaults",wr.ChartLineToolTemplatesSaveAs="Chart.LineTool.Templates.SaveAs",wr.ChartLineToolToolbarChangeFontSizeProperty="Chart.LineTool.Toolbar.ChangeFontSizeProperty",wr.ChartLineToolToolbarChangeLineStyleToDashed="Chart.LineTool.Toolbar.ChangeLineStyleToDashed",wr.ChartLineToolToolbarChangeLineStyleToDotted="Chart.LineTool.Toolbar.ChangeLineStyleToDotted",wr.ChartLineToolToolbarChangeLineStyleToSolid="Chart.LineTool.Toolbar.ChangeLineStyleToSolid",wr.ChartMarksToggleVisibility="Chart.Marks.ToggleVisibility",wr.ChartMoveChartInLayout="Chart.MoveChartInLayout",wr.ChartMoveChartInLayoutBack="Chart.MoveChartInLayout.Back",wr.ChartMoveChartInLayoutForward="Chart.MoveChartInLayout.Forward",wr.ChartTpoResetAllMergesAndSplits="Chart.TPO.ResetAllMergesAndSplits",wr.ChartTpoSplitBlock="Chart.TPO.SplitBlock",wr.ChartTpoMergeBlock="Chart.TPO.MergeBlock",wr.ChartObjectTreeShow="Chart.ObjectTree.Show",wr.ChartDataWindowShow="Chart.DataWindow.Show",wr.ChartPaneControlsDeletePane="Chart.PaneControls.DeletePane",wr.ChartPaneControlsMaximizePane="Chart.PaneControls.MaximizePane",wr.ChartPaneControlsMinimizePane="Chart.PaneControls.MinimizePane",wr.ChartPaneControlsMovePaneDown="Chart.PaneControls.MovePaneDown",wr.ChartPaneControlsMovePaneUp="Chart.PaneControls.MovePaneUp",wr.ChartPaneControlsCollapsePane="Chart.PaneControls.CollapsePane",wr.ChartPaneControlsRestorePane="Chart.PaneControls.RestorePane",wr.ChartPriceScaleLabels="Chart.PriceScale.Labels",wr.ChartPriceScaleLabelsToggleBidAskLabelsVisibility="Chart.PriceScale.Labels.ToggleBidAskLabelsVisibility",wr.ChartPriceScaleLabelsToggleHighLowPriceLabelsVisibility="Chart.PriceScale.Labels.ToggleHighLowPriceLabelsVisibility",wr.ChartPriceScaleLabelsToggleAveragePrice
1LabelVisibility="Chart.PriceScale.Labels.ToggleAveragePriceLabelVisibility",wr.ChartPriceScaleLabelsToggleIndicatorsNameLabelsVisibility="Chart.PriceScale.Labels.ToggleIndicatorsNameLabelsVisibility",wr.ChartPriceScaleLabelsToggleIndicatorsValueLabelsVisibility="Chart.PriceScale.Labels.ToggleIndicatorsValueLabelsVisibility",wr.ChartPriceScaleLabelsTogglePrePostMarketLabelsVisibility="Chart.PriceScale.Labels.TogglePrePostMarketLabelsVisibility",wr.ChartPriceScaleLabelsToggleNoOverlappingLabelsVisibility="Chart.PriceScale.Labels.ToggleNoOverlappingLabelsVisibility",wr.ChartPriceScaleLabelsToggleSeriesLastValueVisibility="Chart.PriceScale.Labels.ToggleSeriesLastValueVisibility",wr.ChartPriceScaleLabelsToggleSymbolNameLabelsVisibility="Chart.PriceScale.Labels.ToggleSymbolNameLabelsVisibility",wr.ChartPriceScaleLabelsToggleSymbolPrevCloseValueVisibility="Chart.PriceScale.Labels.ToggleSymbolPrevCloseValueVisibility",wr.ChartPriceScaleMergeAllScales="Chart.PriceScale.MergeAllScales",wr.ChartPriceScaleMergeAllScalesToLeft="Chart.PriceScale.MergeAllScalesToLeft",wr.ChartPriceScaleMergeAllScalesToRight="Chart.PriceScale.MergeAllScalesToRight",wr.ChartPriceScaleMoveToLeft="Chart.PriceScale.MoveToLeft",wr.ChartPriceScaleMoveToRight="Chart.PriceScale.MoveToRight",wr.ChartPriceScaleReset="Chart.PriceScale.Reset",wr.ChartPriceScaleToggleAddOrderPlusButtonVisibility="Chart.PriceScale.ToggleAddOrderPlusButtonVisibility",wr.ChartPriceScaleToggleAutoScale="Chart.PriceScale.ToggleAutoScale",wr.ChartPriceScaleToggleAutoScaleSeriesOnly="Chart.PriceScale.ToggleAutoScaleSeriesOnly",wr.ChartPriceScaleToggleCountdownToBarCloseVisibility="Chart.PriceScale.ToggleCountdownToBarCloseVisibility",wr.ChartPriceScaleToggleIndexedTo100="Chart.PriceScale.ToggleIndexedTo100",wr.ChartPriceScaleToggleInvertScale="Chart.PriceScale.ToggleInvertScale",wr.ChartPriceScaleToggleLogarithmic="Chart.PriceScale.ToggleLogarithmic",wr.ChartPriceScaleTogglePercentage="Chart.PriceScale.TogglePercentage",wr.ChartPriceScaleToggleRegular="Chart.PriceScale.ToggleRegular",wr.ChartRedo="Chart.Redo",wr.ChartRemoveAllIndicators="Chart.RemoveAllIndicators",wr.ChartRemoveAllIndicatorsAndLineTools="Chart.RemoveAllIndicatorsAndLineTools",wr.ChartRemoveAllLineTools="Chart.RemoveAllLineTools",wr.ChartScalesReset="Chart.Scales.Reset",wr.ChartScalesToggleLockPriceToBarRatio="Chart.Scales.ToggleLockPriceToBarRatio",wr.ChartScrollToLineTool="Chart.ScrollToLineTool",wr.ChartSelectedObjectHide="Chart.SelectedObject.Hide",wr.ChartSelectedObjectRemove="Chart.SelectedObject.Remove",wr.ChartSelectedObjectShow="Chart.SelectedObject.Show",wr.ChartSelectedObjectShowSettingsDialog="Chart.SelectedObject.ShowSettingsDialog",wr.ChartSelectedObjectInsertRowTable="Chart.SelectedObject.InsertRowTable",wr.ChartSelectedObjectInsertColumnTable="Chart.SelectedObject.InsertColumnTable",wr.ChartSelectedObjectRemoveRowTable="Chart.SelectedObject.RemoveRowTable",wr.ChartSelectedObjectRemoveColumnTable="Chart.SelectedObject.RemoveColumnTable",wr.ChartSelectedObjectToggleLocked="Chart.SelectedObject.ToggleLocked",wr.ChartSelectedObjectToggleAnchored="Chart.SelectedObject.ToggleAnchored",wr.ChartSeriesPriceScaleToggleAutoScale="Chart.Series.PriceScale.ToggleAutoScale",wr.ChartSeriesPriceScaleToggleIndexedTo100="Chart.Series.PriceScale.ToggleIndexedTo100",wr.ChartSeriesPriceScaleToggleInvertPriceScale="Chart.Series.PriceScale.ToggleInvertPriceScale",wr.ChartSeriesPriceScaleToggleLogarithmic="Chart.Series.PriceScale.ToggleLogarithmic",wr.ChartSeriesPriceScaleTogglePercentage="Chart.Series.PriceScale.TogglePercentage",wr.ChartSeriesPriceScaleToggleRegular="Chart.Series.PriceScale.ToggleRegular",wr.ChartSessionBreaksToggleVisibility="Chart.SessionBreaks.ToggleVisibility",wr.ChartSetSession="Chart.SetSession",wr.ChartSourceChangePriceScale="Chart.Source.ChangePriceScale",wr.ChartSourceMergeDown="Chart.Source.MergeDown",wr.ChartSourceMergeUp="Chart.Source.MergeUp",wr.ChartSourceMoveToNoScale="Chart.Source.MoveToNoScale",wr.ChartSourceMoveToOtherScale="Chart.Source.MoveToOtherScale",wr.ChartSourceMoveToPane="Chart.Source.MoveToPane",wr.ChartSourceUnmergeDown="Chart.Source.UnmergeDown",wr.ChartSourceUnmergeUp="Chart.Source.UnmergeUp",wr.ChartSourceVisualOrder="Chart.Source.VisualOrder",wr.ChartSourceVisualOrderBringForward="Chart.Source.VisualOrder.BringForward",wr.ChartSourceVisualOrderBringToFront="Chart.Source.VisualOrder.BringToFront",wr.ChartSourceVisualOrderSendBackward="Chart.Source.VisualOrder.SendBackward",wr.ChartSourceVisualOrderSendToBack="Chart.Source.VisualOrder.SendToBack",wr.ChartSourceResetInputPoints="Chart.Source.ResetInputPoints",wr.ChartOpenTableView="Chart.OpenTableView",wr.ChartThemeApply="Chart.Theme.Apply",wr.ChartThemeApplyCustom="Chart.Theme.Apply.Custom",wr.ChartThemeSaveAs="Chart.Theme.SaveAs",wr.ChartTimeScaleReset="Chart.TimeScale.Re
1set",wr.ChartUndo="Chart.Undo",wr.ChartShowAllIdeas="Chart.ShowAllIdeas",wr.ChartShowIdeasOfFollowedUsers="Chart.ShowIdeasOfFollowedUsers",wr.ChartShowMyIdeasOnly="Chart.ShowMyIdeasOnly",wr.ChartToggleVisibilityAllLineTools="Chart.ToggleVisibility.AllLineTools",wr.ChartToggleVisibilityContinuousContractSwitch="Chart.ToggleVisibility.ContinuousContractSwitch",wr.ChartToggleVisibilityContractExpiration="Chart.ToggleVisibility.ContractExpiration",wr.ChartToggleVisibilityDividends="Chart.ToggleVisibility.Dividends",wr.ChartToggleVisibilityEarnings="Chart.ToggleVisibility.Earnings",wr.ChartToggleVisibilityEconomicEvents="Chart.ToggleVisibility.EconomicEvents",wr.ChartToggleVisibilitySplits="Chart.ToggleVisibility.Splits",wr.ChartToggleVisibilityLatestNewsAndMinds="Chart.ToggleVisibility.LatestNewsAndMinds",wr.ChartToggleVisibilityKeyFactsToday="Chart.ToggleVisibility.KeyFactsToday",wr.ChartSourceIntervalsVisibility="Chart.Source.IntervalsVisibility",wr.ChartSourceIntervalsVisibilityCurrentAndAbove="Chart.Source.IntervalsVisibility.CurrentAndAbove",wr.ChartSourceIntervalsVisibilityCurrentAndBelow="Chart.Source.IntervalsVisibility.CurrentAndBelow",wr.ChartSourceIntervalsVisibilityOnlyCurrent="Chart.Source.IntervalsVisibility.Current",wr.ChartSourceIntervalsVisibilityAll="Chart.Source.IntervalsVisibility.All",wr.NoteCreate="Note.Create",wr.NoteEdit="Note.Edit",wr.NoteRemove="Note.Remove",wr.ObjectsTreeCreateGroup="ObjectsTree.CreateGroup",wr.ObjectsTreeRemoveItem="ObjectsTree.RemoveItem",wr.ObjectsTreeRenameItem="ObjectsTree.RenameItem",wr.ObjectsTreeToggleItemLocked="ObjectsTree.ToggleItemLocked",wr.ObjectsTreeToggleItemVisibility="ObjectsTree.ToggleItemVisibility",wr.PineEditorConsoleCopyMessage="PineEditor.Console.CopyMessage",wr.PineEditorConsoleToggleVisibility="PineEditor.Console.ToggleVisibility",wr.PineEditorConsoleClear="PineEditor.Console.Clear",wr.ScreenerColumnRemove="Screener.Column.Remove",wr.ScreenerFilterChange="Screener.Filter.Change",wr.ScreenerFilterReset="Screener.Filter.Reset",wr.ScreenerToggleVisibilityCurrency="Screener.ToggleVisibility.Currency",wr.ScreenerToggleVisibilityDescription="Screener.ToggleVisibility.Description",wr.ScreenerToggleVisibilityRating="Screener.ToggleVisibility.Rating",wr.ScreenerToggleVisibilitySymbolType="Screener.ToggleVisibility.SymbolType",wr.TradingAddOrder="Trading.AddOrder",wr.TradingCancelOrder="Trading.CancelOrder",wr.TradingClosePosition="Trading.ClosePosition",wr.TradingCustomActionId="Trading.CustomActionId",wr.TradingDOMPlaceLimitOrder="Trading.DOMPlaceLimitOrder",wr.TradingDOMPlaceMarketOrder="Trading.DOMPlaceMarketOrder",wr.TradingDOMPlaceStopLimitOrder="Trading.DOMPlaceStopLimitOrder",wr.TradingDOMPlaceStopOrder="Trading.DOMPlaceStopOrder",wr.TradingEditOrder="Trading.EditOrder",wr.TradingModifyPosition="Trading.ModifyPosition",wr.TradingReversePosition="Trading.ReversePosition",wr.TradingSellBuyButtonsToggleVisibility="Trading.SellBuyButtonsToggleVisibility",wr.TradingTradeFromChart="Trading.TradeFromChart",wr.TradingNoOverlapM
1ode="Trading.NoOverlapMode",wr.TradingShowSelectBrokerPanel="Trading.ShowSelectBrokerPanel",wr.TradingOrderTitle="Trading.OrderTitle",wr.TradingPositionTitle="Trading.PositionTitle",wr.WatchlistActions="Watchlist.Actions",wr.WatchlistAddSelectedSymbolsToCompare="Watchlist.AddSelectedSymbolsToCompare ",wr.WatchlistAddSymbolToCompare="Watchlist.AddSymbolToCompare",wr.WatchlistAddSymbolToSection="Watchlist.AddSymbolToSection",wr.WatchlistChangeFlaggedGroupColor="Watchlist.ChangeFlaggedGroupColor",wr.WatchlistAddSymbol="Watchlist.AddSymbol",wr.WatchlistCreate="Watchlist.Create",wr.WatchlistAddSelectedSymbols="Watchlist.AddSelectedSymbols",wr.WatchlistAddSelectedSymbolsLists="Watchlist.AddSelectedSymbols.Lists",wr.WatchlistGetDisplayedTickerDescription="Watchlist.GetDisplayedTickerDescription",wr.WatchlistCreateSection="Watchlist.CreateSection",wr.WatchlistFlagSelectedSymbols="Watchlist.FlagSelectedSymbols",wr.WatchlistFlagSymbol="Watchlist.FlagSymbol",wr.WatchlistOpenSymbolChart="Watchlist.OpenSymbolChart",wr.WatchlistOpenSymbolOverview="Watchlist.OpenSymbolOverview",wr.WatchlistRemoveSection="Watchlist.RemoveSection",wr.WatchlistRemoveSymbol="Watchlist.RemoveSymbol",wr.WatchlistRenameSection="Watchlist.RenameSection",wr.WatchlistUnflagAllSymbols="Watchlist.UnflagAllSymbols",wr.WatchlistUnflagSelectedSymbols="Watchlist.UnflagSelectedSymbols",wr.WatchlistUnflagSymbol="Watchlist.UnflagSymbol",(ge||(ge={})).extractErrorReason=function(e){return e.params[1]},(Cr=me||(me={})).Default="default",Cr.FullSingleSession="full_single_session",(br=ye||(ye={})).PeriodBack="period-back",br.TimeRange="time-range",(yr=be||(be={})).PeriodBack="period-back",yr.TimeRange="time-range",(mr=Ce||(Ce={})).Open="market",mr.Pre="pre_market",mr.Post="post_market",mr.Close="out_of_session",mr.Holiday="holiday",(gr=we||(we={})).Separator="separator",gr.Action="action",(pr=Se||(Se={}))[pr.All=0]="All",pr[pr.BarMarks=1]="BarMarks",pr[pr.TimeScaleMarks=2]="TimeScaleMarks",(vr=Oe||(Oe={}))[vr.Line=0]="Line",vr[vr.Histogram=1]="Histogram",vr[vr.Cross=3]="Cross",vr[vr.Area=4]="Area",vr[vr.Columns=5]="Columns",vr[vr.Circles=6]="Circles",vr[vr.LineWithBreaks=7]="LineWithBreaks",vr[vr.AreaWithBreaks=8]="AreaWithBreaks",vr[vr.StepLine=9]="StepLine",vr[vr.StepLineWithDiamonds=10]="StepLineWithDiamonds",vr[vr.StepLineWithBreaks=11]="StepLineWithBreaks",(hr=xe||(xe={})).Line="line",hr.Colorer="colorer",hr.BarColorer="bar_colorer",hr.BgColorer="bg_colorer",hr.TextColorer="text_colorer",hr.OhlcColorer="ohlc_colorer",hr.CandleWickColorer="wick_colorer",hr.CandleBorderColorer="border_colorer",hr.UpColorer="up_colorer",hr.DownColorer="down_colorer",hr.Shapes="shapes",hr.Chars="chars",hr.Arrows="arrows",hr.Data="data",hr.DataOffset="dataoffset",hr.OhlcOpen="ohlc_open",hr.OhlcHigh="ohlc_high",hr.OhlcLow="ohlc_low",hr.OhlcClose="ohlc_close",(_e||(_e={})).AlertCondition="alertcondition",(fr=Te||(Te={}))[fr.None=0]="None",fr[fr.Pane=1]="Pane",fr[fr.DataWindow=2]="DataWindow",fr[fr.PriceScale=4]="PriceScale",fr[fr.StatusLine=8]="StatusLine",fr[fr.All=15]="All",(dr=Pe||(Pe={}))[dr.None=0]="None",dr[dr.Pane=1]="Pane",dr[dr.DataWindow=2]="DataWindow",dr[dr.PriceScale=4]="PriceScale",dr[dr.StatusLine=8]="StatusLine",dr[dr.All=15]="All",(ur=ke||(ke={})).OhlcBars="ohlc_bars",ur.OhlcCandles="ohlc_candles",(cr=Me||(Me={})).Auto="auto",cr.Tiny="tiny",cr.Small="small",cr.Normal="normal",cr.Large="large",cr.Huge="huge",(sr=Ie||(Ie={})).Integer="integer",sr.Float="float",sr.Price="price",sr.Bool="bool",sr.Text="text",sr.Symbol="symbol",sr.Session="session",sr.Source="source",sr.Resolution="resolution",sr.Time="time",sr.BarTime="bar_time",sr.Color="color",sr.Textarea="text_area",(lr=Le||(Le={}))[lr.None=0]="None",lr[lr.DataWindow=2]="DataWindow",lr[lr.StatusLine=8]="StatusLine",lr[lr.All=15]="All",(ar=Ae||(Ae={})).InitialCapital="initial_capital",ar.Currency="currency",ar.DefaultQTYValue="default_qty_value",ar.DefaultQTYType="default_qty_type",ar.Pyramiding="pyramiding",ar.ComissionValue="commission_value",ar.ComissionType="commission_type",ar.BacktestFillLimitsAssumtion="backtest_fill_limits_assumption",ar.Slippage="slippage",ar.CalcOnOrderFills="calc_on_order_fills",ar.CalcOnEveryTick="calc_on_every_tick",ar.MarginLong="margin_long",ar.MarginShort="margin_short",ar.UseBarMagnifier="use_bar_magnifier",ar.ProcessOrdersOnClose="process_orders_on_close",ar.FillOrdersOnStandardOHLC="fill_orders_on_standard_ohlc",(ir=je||(je={})).Fixed="fixed",ir.CashPerOrder="cash_per_order",ir.PercentOfEquity="percent_of_equity",(or=Ne||(Ne={})).Percent="percent",or.CashPerContract="cash_per_contract",or.CashPerOrder="cash_per_order",(rr=De||(De={})).FirstBar="first_visible_bar_time",rr.LastBar="last_visible_bar_time",rr.Realtime="subscribeRealtime",(nr=Ee||(Ee={})).FgColor="__chart_fgcolor",nr.BgColor="__chart_bgcolor",(tr=Re||(Re={}))[tr.Right=0]="Right",tr[tr.Left=1]="Left",tr[tr.NoScale=2]="NoScale",(er=Be||(Be={}))[er.Right=0]="Right",er[er.Left=1]="Left",er[er.None=2]="None",($n=Fe||(Fe={})).TypePlots="plot_plot",$n.TypeHlines="hline_hline",(Xn=Ve||(Ve={}))[Xn.StopLoss=0]="StopLoss",Xn[Xn.TrailingStop=1]="TrailingStop",Xn[Xn.GuaranteedStop=2]="GuaranteedStop",(Jn=Ue||(Ue={})).Futures="futures",Jn.Options="options",Jn.Others="others",Jn.FutureAndOptions="futureAndOptions",(qn=ze||(ze={})).PerContract="contract",qn.Fixed="fixed",qn.Percent="percent",qn.Disabled="disabled",(Kn=We||(We={})).Stocks="stocks",Kn.Futures="futures",Kn.Forex="forex",Kn.Crypto="crypto",Kn.Others="others",(Ze||(Ze={})).Symbol="symbol",(Yn=Qe||(Qe={}))[Yn.Critical=0]="Critical",Yn[Yn.Informational=1]="Informational",(Gn=He||(He={}))[Gn.PopUp=0]="PopUp",Gn[Gn.Notification=1]="Notification",(Hn=Ge||(Ge={})).Quantity="qty",Hn.OrderSide="side",Hn.Price="price",Hn.Duration="duration",Hn.Brackets="brackets",Hn.StopLossType="slType",(Qn=Ye||(Ye={}))[Qn.CONNECTED=1]="CONNECTED",Qn[Qn.CONNECTING=2]="CONNECTING",Qn[Qn.DISCONNECTED=3]="DISCONNECTED",Qn[Qn.ERROR=4]="ERROR",(Zn=Ke||(Ke={}))[Zn.Connected=1]="Connected",Zn[Zn.Connecting=2]="Connecting",Zn[Zn.Disconnected=3]="Disconnected",Zn[Zn.Error=4]="Error",(Wn=qe||(qe={}))[Wn.LIMIT=1]="LIMIT",Wn[Wn.MARKET=2]="MARKET",Wn[Wn.STOP=3]="STOP",Wn[Wn.STOPLIMIT=4]="STOPLIMIT",(zn=Je||(Je={}))[zn.Limit=1]="Limit",zn[zn.Market=2]="Market",zn[zn.Stop=3]="Stop",zn[zn.StopLimit=4]="StopLimit",(Un=Xe||(Xe={}))[Un.BUY=1]="BUY",Un[Un.SELL=-1]="SELL",(Vn=$e||($e={}))[Vn.Buy=1]="Buy",Vn[Vn.Sell=-1]="Sell",(Fn=et||(et={}))[Fn.CANCELED=1]="CANCELED",Fn[Fn.FILLED=2]="FILLED",Fn[Fn.INACTIVE=3]="INACTIVE",Fn[Fn.PLACING=4]="PLACING",Fn[Fn.REJECTED=5]="REJECTED",Fn[Fn.WORKING=6]="WORKING",(Bn=tt||(tt={}))[Bn.ALL=0]="ALL",Bn[Bn.CANCELED=1]="CANCELED",Bn[Bn.FILLED=2]="FILLED",Bn[Bn.INACTIVE=3]="INACTIVE",Bn[Bn.REJECTED=5]="REJECTED",Bn[Bn.WORKING=6]="WORKING",(Rn=nt||(nt={}))[Rn.Canceled=1]="Canceled",Rn[Rn.Filled=2]="Filled",Rn[Rn.Inactive=3]="Inactive",Rn[Rn.Placing=4]="Placing",Rn[Rn.Rejected=5]="Rejected",Rn[Rn.Working=6]="Working",(En=rt||(rt={}))[En.All=0]="All",En[En.Canceled=1]="Canceled",En[En.Filled=2]="Filled",En[En.Inactive=3]="Inactive",En[En.Rejected=5]="Rejected",En[En.Working=6]="Working",(Dn=ot||(ot={}))[Dn.Order=1]="Order",Dn[Dn.Position=2]="Position",(Nn=it||(it={}))[Nn.ORDER=1]="ORDER",Nn[Nn.POSITION=2]="POSITION",(jn=at||(at={}))[jn.Order=1]="Order",jn[jn.Position=2]="Position",jn[jn.IndividualPosition=3]="IndividualPosition",(An=lt||(lt={}))[An.StopLoss=0]="StopLoss",An[An.TakeProfit=1]="TakeProfit",An[An.TrailingStop=2]="TrailingStop",An[An.GuaranteedStop=3]="GuaranteedStop",(Ln=st||(st={}))[Ln.LIMITPRICE=1]="LIMITPRICE",Ln[Ln.STOPPRICE=2]="STOPPRICE",Ln[Ln.TAKEPROFIT=3]="TAKEPROFIT",Ln[Ln.STOPLOSS=4]="STOPLOSS",(In=ct||(ct={}))[In.LimitPrice=1]="LimitPrice",In[In.StopPrice=2]="StopPrice",In[In.TakeProfit=3]="TakeProfit",In[In.StopLoss=4]="StopLoss",In[In.Quantity=5]="Quantity",(Mn=ut||(ut={}))[Mn.ERROR=0]="ERROR",Mn[Mn.SUCCESS=1]="SUCCESS",(kn=dt||(dt={}))[kn.Error=0]="Error",kn[kn.Success=1]="Success",(Pn=ft||(ft={}))[Pn.Demo=1]="Demo",Pn[Pn.Real=0]="Real",(Tn=ht||(ht={})).Information="information",Tn.Warning="warning",Tn.Error="error",(_n=vt||(vt={})).Demo="demo",_n.Live="live",(xn=pt||(pt={}))[xn.LogOut=0]="LogOut",xn[xn.FailedRestoring=1]="FailedRestoring",xn[xn.Offline=2]="Offline",xn[xn.APIError=3]="APIError",xn[xn.TwoFactorRequired=4]="TwoFactorRequired",xn[xn.CancelAuthorization=5]="CancelAuthorization",xn[xn.TimeOutForAuthorization=6]="TimeOutForAuthorization",xn[xn.OauthError=7]="OauthError",xn[xn.BrokenConnection=8]="BrokenConnection",xn[xn.Reconnect=9]="Reconnect",xn[xn.FailedSignIn=10]="FailedSignIn",(On=gt||(gt={}))[On.None=0]="None",On[On.Pips=1]="Pips",On[On.Ticks=2]="Ticks",(Sn=mt||(mt={})).Halted="HALTED",Sn.NotShortable="NOT-SHORTABLE",Sn.HardToBorrow="HARD-TO-BORROW",(wn=yt||(yt={}))[wn.Limit=1]="Limit",wn[wn.Stop=2]="Stop",(Cn=bt||(bt={})).Disallowed="disallowed",Cn.Allowed="allowed",Cn.AllowedWithWarning="allowed_with_warning",(bn=Ct||(Ct={})).PlaceOrder="place_order",bn.ModifyOrder="modify_order",bn.CancelOrder="cancel_order",bn.CancelMultipleOrders="cancel_multiple_orders",bn.ModifyPosition="modify_position",bn.ClosePosition="close_position",bn.ModifyIndividualPosition="modify_individual_position",bn.CloseIndiv
1idualPosition="close_individual_position",bn.CloseNetPosition="close_net_position",(yn=wt||(wt={})).Date="date",yn.DateOrDateTime="dateOrDateTime",yn.Default="default",yn.Fixed="fixed",yn.FixedInCurrency="fixedInCurrency",yn.VariablePrecision="variablePrecision",yn.FormatQuantity="formatQuantity",yn.FormatPrice="formatPrice",yn.FormatPriceForexSup="formatPriceForexSup",yn.FormatPriceInCurrency="formatPriceInCurrency",yn.IntegerSeparated="integerSeparated",yn.LocalDate="localDate",yn.LocalDateOrDateTime="localDateOrDateTime",yn.Percentage="percentage",yn.Pips="pips",yn.Profit="profit",yn.ProfitInInstrumentCurrency="profitInInstrumentCurrency",yn.ProfitInPercent="profitInPercent",yn.Side="side",yn.PositionSide="positionSide",yn.Status="status",yn.Symbol="symbol",yn.Text="text",yn.Type="type",yn.MarginPercent="marginPercent",yn.Empty="empty",(mn=St||(St={}))[mn.LastPriceAndPercentageValue=0]="LastPriceAndPercentageValue",mn[mn.LastValueAccordingToScale=1]="LastValueAccordingToScale",(gn=Ot||(Ot={}))[gn.Solid=0]="Solid",gn[gn.Dotted=1]="Dotted",gn[gn.Dashed=2]="Dashed",(pn=xt||(xt={}))[pn.Offline=0]="Offline",pn[pn.Resolving=1]="Resolving",pn[pn.Loading=2]="Loading",pn[pn.Ready=3]="Ready",pn[pn.InvalidSymbol=4]="InvalidSymbol",pn[pn.Snapshot=5]="Snapshot",pn[pn.EOD=6]="EOD",pn[pn.Pulse=7]="Pulse",pn[pn.Delayed=8]="Delayed",pn[pn.DelayedSteaming=9]="DelayedSteaming",pn[pn.NoBars=10]="NoBars",pn[pn.Replay=11]="Replay",pn[pn.Error=12]="Error",pn[pn.CalculationError=13]="CalculationError",pn[pn.UnsupportedResolution=14]="UnsupportedResolution",(vn=_t||(_t={}))[vn.Markers=0]="Markers",vn[vn.Stepline=1]="Stepline",vn[vn.Simple=2]="Simple",(hn=Tt||(Tt={}))[hn.Bar=0]="Bar",hn[hn.Candle=1]="Candle",hn[hn.Line=2]="Line",hn[hn.Area=3]="Area",hn[hn.Renko=4]="Renko",hn[hn.Kagi=5]="Kagi",hn[hn.PnF=6]="PnF",hn[hn.LineBreak=7]="LineBreak",hn[hn.HeikinAshi=8]="HeikinAshi",hn[hn.HollowCandle=9]="HollowCandle",hn[hn.Baseline=10]="Baseline",hn[hn.Range=11]="Range",hn[hn.HiLo=12]="HiLo",hn[hn.Column=13]="Column",hn[hn.LineWithMarkers=14]="LineWithMarkers",hn[hn.Stepline=15]="Stepline",hn[hn.HLCArea=16]="HLCArea",hn[hn.VolFootprint=17]="VolFootprint",hn[hn.TPO=18]="TPO",hn[hn.VolCandle=19]="VolCandle",hn[hn.SVP=20]="SVP",hn[hn.HLCBars=21]="HLCBars",(fn=Pt||(Pt={})).TwentyFourHours="24-hours",fn.TwelveHours="12-hours",(dn=kt||(kt={}))[dn.Initial=2]="Initial",dn[dn.SeriesZOrderIsAlwaysZero=3]="SeriesZOrderIsAlwaysZero",dn[dn.Current=3]="Current",(un=Mt||(Mt={}))[un.Money=0]="Money",un[un.Pips=1]="Pips",un[un.Percentage=2]="Percentage",(cn=It||(It={}))[cn.Left=0]="Left",cn[cn.Center=1]="Center",cn[cn.Right=2]="Right",Mt.Money,Mt.Money,It.Right,(sn=Lt||(Lt={}
1))[sn.Background=0]="Background",sn[sn.Foreground=1]="Foreground",sn[sn.Topmost=2]="Topmost",(ln=At||(At={}))[ln.Unavailable=0]="Unavailable",ln[ln.AvailableReadonlyAlwaysDisabled=1]="AvailableReadonlyAlwaysDisabled",ln[ln.AvailableReadonlyAlwaysEnabled=2]="AvailableReadonlyAlwaysEnabled",ln[ln.Available=3]="Available",(an=jt||(jt={}))[an.ViewportChangeUserAction=0]="ViewportChangeUserAction",an[an.DataUpdate=1]="DataUpdate",an[an.SeriesRestart=2]="SeriesRestart",an[an.SeriesCompleted=3]="SeriesCompleted",an[an.StudyCreation=4]="StudyCreation",(on=Nt||(Nt={}))[on.Chart=0]="Chart",(rn=Dt||(Dt={})).AlwaysOn="alwaysOn",rn.VisibleOnMouseOver="visibleOnMouseOver",rn.AlwaysOff="alwaysOff",(nn=Et||(Et={}))[nn.Normal=0]="Normal",nn[nn.Log=1]="Log",nn[nn.Percentage=2]="Percentage",nn[nn.IndexedTo100=3]="IndexedTo100",(tn=Rt||(Rt={}))[tn.Bars=0]="Bars",tn[tn.Candles=1]="Candles",tn[tn.Line=2]="Line",tn[tn.Area=3]="Area",tn[tn.HeikenAshi=8]="HeikenAshi",tn[tn.HollowCandles=9]="HollowCandles",tn[tn.Baseline=10]="Baseline",tn[tn.HiLo=12]="HiLo",tn[tn.Column=13]="Column",tn[tn.LineWithMarkers=14]="LineWithMarkers",tn[tn.Stepline=15]="Stepline",tn[tn.HLCArea=16]="HLCArea",tn[tn.VolCandle=19]="VolCandle",tn[tn.HLCBars=21]="HLCBars",tn[tn.Renko=4]="Renko",tn[tn.Kagi=5]="Kagi",tn[tn.PointAndFigure=6]="PointAndFigure",tn[tn.LineBreak=7]="LineBreak",(Bt||(Bt={})).Value="_seriesId",(en=Ft||(Ft={}))[en.InvalidSymbol=0]="InvalidSymbol",en[en.ReplayUnsupported=1]="ReplayUnsupported",en[en.UnsupportedDepth=2]="UnsupportedDepth",en[en.UnsupportedIntradyReplay=3]="UnsupportedIntradyReplay",($t=Vt||(Vt={})).LeftToRight="left_to_right",$t.RightToLeft="right_to_left",(Xt=Ut||(Ut={})).Relative="relative",Xt.Absolute="absolute",(Jt=zt||(zt={})).UpDown="Up/Down",Jt.Total="Total",Jt.Delta="Delta",(qt=Wt||(Wt={})).AboveBar="AboveBar",qt.BelowBar="BelowBar",qt.Top="Top",qt.Bottom="Bottom",qt.Right="Right",qt.Left="Left",qt.Absolute="Absolute",qt.AbsoluteUp="AbsoluteUp",qt.AbsoluteDown="AbsoluteDown",(Kt=Zt||(Zt={})).Left="left",Kt.Center="center",Kt.Right="right",(Yt=Qt||(Qt={})).Top="top",Yt.Middle="middle",Yt.Bottom="bottom",(Gt=Ht||(Ht={}))[Gt.Solid=0]="Solid",Gt[Gt.Dotted=1]="Dotted",Gt[Gt.Dashed=2]="Dashed";var Ur={width:800,height:500,interval:"1D",timezone:"Etc/UTC",container:"",library_path:"",locale:"en",widgetbar:{details:!1,watchlist:!1,news:!1,datawindow:!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:[],indicators:[],drawingTools:[]}},zr=JSON.parse('[{"iso":"en","dir":"ltr","language":"en"},{"iso":"en","dir":"ltr","language":"en"},{"iso":"de","dir":"ltr","language":"de"},{"iso":"fr","dir":"ltr","language":"fr"},{"iso":"ca","dir":"ltr","language":"ca_ES"},{"iso":"es","dir":"ltr","language":"es"},{"iso":"it","dir":"ltr","language":"it"},{"iso":"pl","dir":"ltr","language":"pl"},{"iso":"hu","dir":"ltr","language":"hu_HU"},{"iso":"sv","dir":"ltr","language":"sv"},{"iso":"tr","dir":"ltr","language":"tr"},{"iso":"ru","dir":"ltr","language":"ru"},{"iso":"pt","dir":"ltr","language":"pt"},{"iso":"id","dir":"ltr","language":"id_ID"},{"iso":"ms","dir":"ltr","language":"ms_MY"},{"iso":"th","dir":"ltr","language":"th"},{"iso":"vi","dir":"ltr","language":"vi"},{"iso":"ja","dir":"ltr","language":"ja"},{"iso":"ko","dir":"ltr","language":"ko"},{"iso":"zh-Hans","dir":"ltr","language":"zh"},{"iso":"zh-Hant","dir":"ltr","language":"zh_TW"},{"iso":"ar","dir":"rtl","language":"ar"},{"iso":"he","dir":"rtl","language":"he_IL"}]'),Wr=!1;var Zr=function(){function e(t){var n,r=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._id="tradingview_".concat((1048576*(1+Math.random())|0).toString(16).substring(1)),this._ready=!1,this._readyHandlers=[],this._onWindowResize=this._autoResizeChart.bind(this),!t.datafeed)throw new Error("Datafeed is not defined");(null===(n=t.overrides)||void 0===n?void 0:n["mainSeriesProperties.priceAxisProperties.lockScale"])&&(console.warn("mainSeriesProperties.priceAxisProperties.lockScale can not be set to true within the widget constructor"),delete t.overrides["mainSeriesProperties.priceAxisProperties.lockScale"]),this._options=Vr(Ur,t),"dark"===(this._options.theme||"light").toLowerCase()&&void 0===this._options.loading_screen&&(this._options.loading_screen={backgroundColor:"#131722"}),(this._options.debug||this._options.debug_broker)&&(Wr||(Wr=!0,console.log("Using TT v30.3.0 (internal id 913720ecd6e096f04e940369d0a95b60464ec3a1 @ 2026-01-21T13:11:44.925Z)"))),this._innerWindowLoaded=new Promise((function(e){r._innerWindowResolver=e})),this._create()}var t,n,o;return t=e,n=[{key:"setDebugMode",value:function(e){this._innerAPI().setDebugMode(e)}},{key:"onChartReady",value:function(e){this._ready?e.call(this):this._readyHandlers.push(e)}},{key:"headerReady",value:function(){var e=this;return this._innerWindowLoaded.then((function(){return e._innerWindow().headerReady()}))}},{key:"onGrayedObjectClicked",value:function(e){this._doWhenInnerApiLoaded((function(t){t.onGrayedObjectClicked(e)}))}},{key:"onShortcut",value:function(e,t){this._doWhenInnerWindowLoaded((function(n){n.createShortcutAction(e,t)}))}},{key:"subscribe",value:function(e,t){this._doWhenInnerApiLoaded((function(n){n.subscribe(e,t)}))}},{key:"unsubscribe",value:function(e,t){this._doWhenInnerApiLoaded((function(n){n.unsubscribe(e,t)}))}},{key:"chart",value:function(e){return this._innerAPI().chart(e)}},{key:"getLanguage",value:function(){return this._options.locale}},{key:"setSymbol",value:function(e,t,n){this._innerAPI().changeSymbol(e,t,n)}},{key:"remove",value:function(){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)}},{key:"closePopupsAndDialogs",value:function(){this._doWhenInnerApiLoaded((function(e){e.closePopupsAndDialogs()}))}},{key:"selectLineTool",value:function(e,t){return this._innerAPI().selectLineTool(e,t)}},{key:"selectedLineTool",value:function(){return this._innerAPI().selectedLineTool()}},{key:"save",value:function(e,t){this._innerAPI().saveChart(e,t)}},{key:"load",value:function(e,t){var n=this;return Nr(r.mark((function o(){return r.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",n._innerAPI().loadChart({json:e,extendedData:t}));case 1:case"end":return r.stop()}}),o)})))()}},{key:"getSavedCharts",value:function(e){this._innerAPI().getSavedCharts(e)}},{key:"loadChartFromServer",value:function(e){return this._innerAPI().loadChartFromServer(e)}},{key:"saveChartToServer",value:function(e,t,n){this._innerAPI().saveChartToServer(e,t,n)}},{key:"removeChartFromServer",value:function(e,t){this._innerAPI().removeChartFromServer(e,t)}},{key:"onContextMenu",value:function(e){this._doWhenInnerApiLoaded((function(t){t.onContextMenu(e)}))}},{key:"createButton",value:function(e){return this._innerWindow().createButton(e)}},{key:"removeButton",value:function(e){this._innerWindow().removeButton(e)}},{key:"createDropdown",value:function(e){return this._innerWindow().createDropdown(e)}},{key:"showNoticeDialog",value:function(e){this._doWhenInnerApiLoaded((function(t){t.showNoticeDialog(e)}
1))}},{key:"showConfirmDialog",value:function(e){this._doWhenInnerApiLoaded((function(t){t.showConfirmDialog(e)}))}},{key:"showLoadChartDialog",value:function(){this._innerAPI().showLoadChartDialog()}},{key:"showSaveAsChartDialog",value:function(){this._innerAPI().showSaveAsChartDialog()}},{key:"symbolInterval",value:function(){return this._innerAPI().getSymbolInterval()}},{key:"mainSeriesPriceFormatter",value:function(){return this._innerAPI().mainSeriesPriceFormatter()}},{key:"getIntervals",value:function(){return this._innerAPI().getIntervals()}},{key:"getStudiesList",value:function(){return this._innerAPI().getStudiesList()}},{key:"getStudyInputs",value:function(e){return this._innerAPI().getStudyInputs(e)}},{key:"getStudyStyles",value:function(e){return this._innerAPI().getStudyStyles(e)}},{key:"addCustomCSSFile",value:function(e){this._innerWindow().addCustomCSSFile(e)}},{key:"applyOverrides",value:function(e){this._options=Vr(this._options,{overrides:e}),this._doWhenInnerWindowLoaded((function(t){t.applyOverrides(e)}))}},{key:"applyTradingCustomization",value:function(e){var t=this;return new Promise((function(n,r){t._doWhenInnerWindowLoaded((function(t){t.applyTradingCustomization(e).then(n).catch(r)}))}))}},{key:"applyStudiesOverrides",value:function(e){this._doWhenInnerWindowLoaded((function(t){t.applyStudiesOverrides(e)}))}},{key:"watchList",value:function(){return this._innerAPI().watchlist()}},{key:"news",value:function(){return this._innerAPI().news()}},{key:"widgetbar",value:function(){return this._innerAPI().widgetbar()}},{key:"activeChart",value:function(){return this._innerAPI().activeChart()}},{key:"activeChartIndex",value:function(){return this._innerAPI().activeChartIndex()}},{key:"setActiveChart",value:function(e){return this._innerAPI().setActiveChart(e)}},{key:"chartsCount",value:function(){return this._innerAPI().chartsCount()}},{key:"layout",value:function(){return this._innerAPI().layout()}},{key:"setLayout",value:function(e){this._innerAPI().setLayout(e)}},{key:"layoutName",value:function(){return this._innerAPI().layoutName()}},{key:"resetLayoutSizes",value:function(e){this._innerAPI().resetLayoutSizes(e)}},{key:"setLayoutSizes",value:function(e,t){this._innerAPI().setLayoutSizes(e,t)}},{key:"changeTheme",value:function(e,t){return this._innerWindow().changeTheme(e,t)}},{key:"getTheme",value:function(){return this._innerWindow().getTheme()}},{key:"takeScreenshot",value:function(){this._doWhenInnerApiLoaded((function(e){e.takeScreenshot()}))}},{key:"lockAllDrawingTools",value:function(){return this._innerAPI().lockAllDrawingTools()}},{key:"hideAllDrawingTools",value:function(){return this._innerAPI().hideAllDrawingTools()}},{key:"drawOnAllChartsEnabled",value:function(){return this._innerAPI().drawOnAllChartsEnabled()}},{key:"drawOnAllCharts",value:function(e){this._innerAPI().drawOnAllCharts(e)}},{key:"magnetEnabled",value:function(){return this._innerAPI().magnetEnabled()}},{key:"magnetMode",value:function(){return this._innerAPI().magnetMode()}},{key:"undoRedoState",value:function(){return this._innerAPI().undoRedoState()}},{key:"setIntervalLinkingEnabled",value:function(e){this._innerAPI().setIntervalLinkingEnabled(e)}},{key:"setDateRangeLinkingEnabled",value:function(e){this._innerAPI().setDateRangeLinkingEnabled(e)}},{key:"setTimeFrame",value:function(e){this._innerAPI().setTimeFrame(e)}},{key:"symbolSync",value:function(){return this._innerAPI().symbolSync()}},{key:"intervalSync",value:function(){return this._innerAPI().intervalSync()}},{key:"crosshairSync",value:function(){return this._innerAPI().crosshairSync()}},{key:"timeSync",value:function(){return this._innerAPI().timeSync()}},{key:"dateRangeSync",value:function(){return this._innerAPI().dateRangeSync()}},{key:"setFeatureEnabled",value:function(e,t){this._innerAPI().setFeatureEnabled(e,t)}},{key:"getAllFeatures",value:function(){return this._innerWindow().getAllFeatures()}},{key:"clearUndoHistory",value:function(){return this._innerAPI().clearUndoHistory()}},{key:"undo",value:function(){return this._innerAPI().undo()}},{key:"redo",value:function(){return this._innerAPI().redo()}},{key:"startFullscreen",value:function(){this._innerAPI().startFullscreen()}},{key:"exitFullscreen",value:function(){this._innerAPI().exitFullscreen()}},{key:"takeClientScreenshot",value:function(e){return this._innerAPI().takeClientScreenshot(e)}},{key:"navigationButtonsVisibility",value:function(){return this._innerWindow().getNavigationButtonsVisibility()}},{key:"paneButtonsVisibility",value:function(){return this._innerWindow().getPaneButtonsVisibility()}},{key:"dateFormat",value:function(){return this._innerWindow().getDateFormat()}},{key:"timeHoursFormat",value:function(){return this._innerWindow().getTimeHoursFormat()}},{key:"currencyAndUnitVisibility",value:function(){return this._innerWindow().getCurrencyAndUnitVisibility()}},{key:"supportedChartTypes",value:function(){return this._innerAPI().supportedChartTypes()}},{key:"watermark",value:function(){return this._innerAPI().watermark()}},{key:"customSymbolStatus",value:function(){return this._innerWindow().customSymbolStatus()}},{key:"setCSSCustomProperty",value:function(e,t){if(!1===e.startsWith("--"))throw new Error("customPropertyName should begin with a double hyphen");this._innerWindow().document.body.style.setProperty(e,t)}},{key:"getCSSCustomPropertyValue",value:function(e){if(!1===e.startsWith("--"))throw new Error("customPropertyName should begin with a double hyphen");var t=this._innerWindow().document.body,n=t.style.getPropertyValue(e);return n||getComputedStyle(t).getPropertyValue(e)}},{key:"unloadUnusedCharts",value:function(){this._innerAPI().unloadUnusedCharts()}},{key:"customThemes",value:function(){var e=this;return Nr(r.mark((function t(){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e._innerWindow().customThemes());case 1:case"end":return t.stop()}}),t)})))()}},{key:"resetCache",value:function(){this._innerAPI().resetCache()}},{key:"linking",value:function(){return this._innerAPI().linking}},{key:"_innerAPI",value:function(){return this._innerWindow().tradingViewApi}},{key:"_innerWindow",value:function(){return this._iFrame.contentWindow}},{key:"_doWhenInnerWindowLoaded",value:function(e){var t=this;this._ready?e(this._innerWindow()):this._innerWindowLoaded.then((function(){e(t._innerWindow())}))}},{key:"_doWhenInnerApiLoaded",value:function(e){var t=this;this._doWhenInnerWindowLoaded((function(n){var r=t;n.doWhenApiIsReady((function(){return e(r._innerAPI())}))}))}},{key:"_autoResizeChart",value:function(){var e=this;this._options.fullscreen&&(this._iFrame.style.height=window.innerHeight+"px",Qr&&setTimeout((function(){e._iFrame.style.height=window.innerHeight+"px"}),30))}},{key:"_create",value:function(){var e=this;return Nr(r.mark((function t(){var n,o,i,a,l,s,c,u,d,f,h,v,p,g,m;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(c=null!==(a=null===(n=e._options.enabled_features)||void 0===n?void 0:n.includes("iframe_loading_same_origin"))&&void 0!==a&&a,u=c||null!==(l=null===(o=e._options.enabled_features)||void 0===o?void 0:o.includes("iframe_loading_compatibility_mode"))&&void 0!==l&&l,d=c&&null!==(s=null===(i=e._options.enabled_features)||void 0===i?void 0:i.includes("iframe_loading_root_path"))&&void 0!==s&&s,f=Rr(e._render(!u,c,d),2),h=f[0],v=f[1],p=e._options.container,null!==(g="string"==typeof p?document.getElementById(p):p)){t.next=5;break}throw new Error("There is no such element - #".concat(e._options.container));case 5:if(g.innerHTML=h,e._iFrame=g.querySelector("#".concat(e._id)),m=e._iFrame,t.t0=c,!t.t0){t.next=11;break}return t.next=11,e._innerWindowEvent("sameOriginLoad");case 11:u&&(m.contentWindow?(m.contentWindow.document.open(),m.contentWindow.document.write(v),m.contentWindow.document.close()):console.warn("Unable to locate contentWindow for the created iframe. Please try disabling the `iframe_loading_compatibility_mode` featureset.")),e._innerWindow().addEventListener("innerWindowLoad",(function(t){t.detail.received=!0,function(e,t){if(void 0===e)throw new Error("".concat("_innerWindowResolver"," is undefined"));return e}(e._innerWindowResolver)()}),{once:!0}),(e._options.autosize||e._options.fullscreen)&&(m.style.width="100%",e._options.fullscreen||(m.style.height="100%")),window.addEventListener("resize",e._onWindowResize),e._onWindowResize(),e._innerWindowLoaded.then((function(){try{e._innerWindow().widgetReady((function(){e._ready=!0;var t=!0,n=!1,r=void 0;try{for(var o,i=e._readyHandlers[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;try{a.call(e)}catch(pe){}}}catch(l){n=!0,r=l}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}e._innerWindow().initializationFinished()}))}catch(r){if(t=r,(null!=(n=Error)&&"undefined"!==typeof Symbol&&n[Symbol.hasInstance]?n[Symbol.hasInstance](t):t instanceof n)&&/widgetReady is not a function/.test(r.message))throw new Error("There was an error when loading the library. Usually this error means the library failed to load its static files. Check that the library files are available at ".concat(window.location.host,"/").concat(e._options.library_path||""," or correct the library_path option."))}var t,n}));case 17:case"end":return t.stop()}}),t)})))()}},{key:"_innerWindowEvent",value:function(e){var t=this;return new Promise((function(n){t._innerWindow().addEventListener(e,n,{once:!0})}))}},{key:"_render",value:function(e,t,n){var r=window;
1if(r[this._id]={datafeed:this._options.datafeed,customFormatters:this._options.custom_formatters,brokerFactory:this._options.broker_factory,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,rss_news_title:this._options.rss_news_title,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,customTranslateFunction:this._options.custom_translate_function,symbolSearchComplete:this._options.symbol_search_complete,contextMenu:this._options.context_menu,settingsOverrides:this._options.settings_overrides,timeframe:this._options.timeframe,customTimezones:this._options.custom_timezones,customChartDescriptionFunction:this._options.custom_chart_description_function,customThemes:this._options.custom_themes,imageStorageAdapter:this._options.image_storage_adapter},this._options.saved_data)r[this._id].chartContent={json:this._options.saved_data},this._options.saved_data_meta_info&&(r[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");if(this._options.library_path&&!this._options.library_path.endsWith("/")&&console.warn("library_path option should contain a trailing forward slash"),this._options.locale){var o=encodeURIComponent(this._options.locale);zr.findIndex((function(e){return e.language===o}))>=0||(console.warn("locale isn't supported. Using default of `en`."),this._options.locale="en")}var i=(this._options.theme||"light").toLowerCase(),a=function(e,t,n){var r,o,i=new URL("".concat(e||""),location.href).href,a=JSON.parse('["bundles/runtime.48f7fb5febf54b975301.js","bundles/__LANG__.852.a49843c4ad86fa3833cc.js","bundles/290.a20a48ca3e69e5324d6b.css","bundles/245.b38ff1dc149fab125f23.js","bundles/library.0dbcc224ae24ceb827f2.js"]'),l=encodeURIComponent(t),s="light"!==n.toLowerCase()?"dark":"light",c=null!==(r=zr.find((function(e){return e.language===l})))&&void 0!==r?r:{iso:"en",dir:"ltr"},u='lang="'.concat(c.iso,'" dir="').concat(c.dir,'" data-theme="').concat(s,'" class="theme-').concat(s,'"'),d="\n".concat(function(e,t,n){if(void 0===e)return"";var r=[],o=[],i=!0,a=!1,l=void 0;try{for(var s,c=e[Symbol.iterator]();!(i=(s=c.next()).done);i=!0){var u=s.value;u.endsWith(".js")?r.push('<script defer crossorigin="anonymous" src="'.concat(u.replace("__LANG__",n),'"><\/script>')):u.endsWith(".css")&&o.push('<link type="text/css" href="'.concat(t?u.replace(/\.css$/i,".rtl.css"):u,'" rel="stylesheet"/>'))}}catch(d){a=!0,l=d}finally{try{i||null==c.return||c.return()}finally{if(a)throw l}}return Br(r).concat(Br(o)).join("\n")}(a,"rtl"===c.dir,l),"\n");return"<!DOCTYPE html><html ".concat((o={bundles:d,localeLanguage:l,htmlAttrs:u,libraryPath:i}).htmlAttrs,'><head><base href="').concat(o.libraryPath,'"><meta charset="utf-8"><script>window===window.parent&&(location.href="about:blank")<\/script> ').concat(o.bundles,' </head><body class="chart-page unselectable on-widget"><div class="loading-indicator" id="loading-indicator"></div><script>var JSServer={},__initialEnabledFeaturesets=["trading_terminal"]<\/script><script>
1(function() {\n\t\twindow.urlParams = (function () {\n\t\t\tvar match,\n\t\t\t\tpl\t = /\\+/g,  // Regex for replacing addition symbol with a space\n\t\t\t\tsearch = /([^&=]+)=?([^&]*)/g,\n\t\t\t\tdecode = function (s) { return decodeURIComponent(s.replace(pl, \' \')).replace(/<\\/?[^>]+(>|$)/g, \'\'); },\n\t\t\t\tquery = function() {\n\t\t\t\t\t// We don\'t use hash on the url because: safari 13 throws an error if you attempt this\n\t\t\t\t\t// on a blob, and safari 14 will strip hash from blob urls.\n\t\t\t\t\tif (frameElement && frameElement.dataset.widgetOptions) {\n\t\t\t\t\t\treturn frameElement.dataset.widgetOptions;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow "Unexpected use of this page";\n\t\t\t\t\t}\n\t\t\t\t}(),\n\t\t\t\tresult = {};\n\n\t\t\twhile (match = search.exec(query)) {\n\t\t\t\tresult[decode(match[1])] = decode(match[2]);\n\t\t\t}\n\n\t\t\tvar additionalSettingsObject = window.parent[result.uid];\n\n\t\t\tvar customObjectNames = [\'datafeed\', \'customFormatters\', \'brokerFactory\', \'save_load_adapter\', \'customTranslateFunction\', \'contextMenu\'];\n\n\t\t\tfor (var p in additionalSettingsObject) {\n\t\t\t\tif (customObjectNames.indexOf(p) === -1) {\n\t\t\t\t\tresult[p] = JSON.stringify(additionalSettingsObject[p]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn result;\n\t\t})();\n\n\t\twindow.locale = urlParams.locale;\n\t\twindow.language = urlParams.locale; // a very big attention needed here\n\t\twindow.customTranslateFunction = window.parent[urlParams.uid].customTranslateFunction;\n\t\twindow.customChartDescriptionFunction = window.parent[urlParams.uid].customChartDescriptionFunction;\n\n\t\twindow.addCustomCSSFile = function(href) {\n\t\t\tvar link = document.createElement(\'link\');\n\t\t\tlink.setAttribute(\'type\', \'text/css\');\n\t\t\tlink.setAttribute(\'rel\', \'stylesheet\');\n\t\t\tlink.setAttribute(\'href\', href);\n\t\t\tlink.setAttribute(\'cross-origin\', \'anonymous\');\n\n\t\t\twindow.loadedCustomCss = new Promise((resolve) => {\n\t\t\t\tlink.onload = resolve;\n\t\t\t\tlink.onerror = resolve;\n\t\t\t});\n\t\t\tdocument.body.appendChild(link);\n\t\t};\n\n\t\twindow.loadedCustomCss = Promise.resolve();\n\t\tif (!!urlParams.customCSS) {\n\t\t\twindow.addCustomCSSFile(urlParams.customCSS);\n\t\t}\n\n\t\tvar loadingScreenParams = {};\n\n\t\tif (typeof urlParams.loading_screen === \'string\') {\n\t\t\ttry {\n\t\t\t\tloadingScreenParams = JSON.parse(urlParams.loading_screen);\n\t\t\t} catch(e) {}\n\t\t}\n\n\t\tvar loadingIndicatorElement = document.getElementById(\'loading-indicator\');\n\n\t\tif (loadingScreenParams.backgroundColor) {\n\t\t\tloadingIndicatorElement.style = \'background-color: \' + loadingScreenParams.backgroundColor;\n\t\t}\n\n\t\t!function(){"use strict";var t,e=new WeakMap;function n(t,n){var i=function(t){var n,i;return n=document.documentElement,e&&(i=e.get(n)),i||((i=n.ownerDocument.createRange()).selectNodeContents(n),e&&e.set(n,i)),i.createContextualFragment(t)}(t),s=i.firstElementChild;return null!==s&&i.removeChild(s),s}!function(t){t[t.Element=1]="Element",t[t.Document=9]="Document"}(t||(t={}));var i={mini:"xsmall",xxsmall:"xxsmall",xsmall:"xsmall",small:"small",medium:"medium",large:"large"};var s=function(){function t(t){var e;this._shown=!1,this._el=n((void 0===e&&(e=""),\'<div class="tv-spinner \'.concat(e,\'" role="progressbar"></div>\'))),this.setSize(i[t||"large"])}return t.prototype.spin=function(t){return this._el.classList.add("tv-spinner--shown"),void 0===this._container&&(this._container=t,void 0!==t&&t.appendChild(this._el)),this._shown=!0,this},t.prototype.stop=function(t){return t&&void 0!==this._container&&this._container.removeChild(this._el),this._el&&this._el.classList.remove("tv-spinner--shown"),this._shown=!1,this},t.prototype.setStyle=function(t){var e=this;return Object.keys(t).forEach((function(n){var i=t[n];void 0!==i&&e._el.style.setProperty(n,i)})),this},t.prototype.style=function(){return this._el.style},t.prototype.setSize=function(t){var e=void 0!==t?"tv-spinner--size_".concat(t):"";return this._el.className="tv-spinner ".concat(e," ").concat(this._shown?"tv-spinner--shown":""),this},t.prototype.getEl=function(){return this._el},t.prototype.destroy=function(){this.stop(),delete this._el,delete this._container},t}();window.Spinner=s}();\n\n\n\t\tvar spinnerColor = (loadingScreenParams.foregroundColor) ? loadingScreenParams.foregroundColor : undefined;\n\n\t\tvar loadingSpinner = new Spinner(\'large\').setStyle({\n\t\t\t\'--tv-spinner-color\': spinnerColor,\n\t\t\tzIndex: String(2e9),\n\t\t});\n\t\tloadingSpinner.getEl().classList.add(\'spinner\');\n\t\tloadingSpinner.spin(loadingIndicatorElement);\n\t})();<\/script></body></html>')}(this._options.library_path||"",this._options.locale,i),l=new URL("about:blank");if(e){var s=new Blob([a],{type:"text/html"}),c=URL.createObjectURL(s);l=new URL(c)}else if(t){var u,d=null!==(u=this._options.library_path)&&void 0!==u?u:"/",f=n?location.origin:location.href;l=new URL(d+"sameorigin.html",f)}var h="symbol="+encodeURIComponent(this._options.symbol||"")+"&interval="+encodeURIComponent(this._options.interval)+(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
1))+(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.custom_font_family?"&customFontFamily="+encodeURIComponent(this._options.custom_font_family):"")+(this._options.auto_save_delay?"&autoSaveDelay="+encodeURIComponent(String(this._options.auto_save_delay)):"")+"&debug="+encodeURIComponent(String(this._options.debug))+(this._options.debug_broker?"&debugBroker="+encodeURIComponent(String(this._options.debug_broker)):"")+(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['<iframe\n\t\tversion="TT v30.3.0 (internal id 913720ecd6e096f04e940369d0a95b60464ec3a1 @ 2026-01-21T13:11:44.925Z)" id="'.concat(this._id,'" name="').concat(this._id,'" src="').concat(l.href,'" data-widget-options="').concat(h,'"\n\t\t').concat(this._options.autosize||this._options.fullscreen?"":'width="'.concat(this._options.width,'" height="').concat(this._options.height,'"'),' title="Financial Chart" frameborder="0" allowTransparency="true" scrolling="no" allowfullscreen style="display:block;">\n\t</iframe>'),a]}}],n&&Dr(t.prototype,n),o&&Dr(t,o),e}();window.TradingView=window.TradingView||{},window.TradingView.version=function(){return"TT v30.3.0 (internal id 913720ecd6e096f04e940369d0a95b60464ec3a1 @ 2026-01-21T13:11:44.925Z)"};var Qr=!(!window.navigator||!window.navigator.userAgent)&&window.navigator.userAgent.includes("CriOS"),Hr=n(65389),Gr=n(85850),Yr=n(52980),Kr=n(77450),qr=n(69916),Jr=n(50804),Xr=n.n(Jr),$r=n(80506),eo=n(46227),to=n(61002),no=n(62171),ro=n(48203),oo=n(93271),io=n(6939),ao=n(84784),lo=n(60833),so=n.n(lo),co=n(57934),uo=n(52735),fo=n(13203),ho=n(82015),vo=function(e,t,n){var r=(0,Pr.oR)(),o=r.futures,i=r.underlying,a=r.ticker,l=r.ui,s=(0,oo.Z)(),c=s.costValue2SheetForC,u=s.currentUnit2Sheet,d=s.sheet2CurrentUnit,f=s.unitPrecision,h=s.sheet2CostValue,v=s.sheet2CostValueForCbased,p=s.usdt2Sheet,y=s.sheet2Usd,b=s.sheet2CoinForC,C=s.sheet2CoinForU,w=s.sheet2Usdt,S=s.coin2SheetForC,O=s.coin2SheetForU,x=s.costValue2Sheet,_=i.isUBased,T=(_?co.Z:uo.Z)(),P=T.getLongMargin,k=T.getUserLongMaxOpen,M=T.getShortMargin,I=T.getUserShortMaxOpen,L=a.currentSymbolIdentity,A=a.currentSymbolConfig,j=a.availablePrice,N=a.currentSymbolPrecision,D=N.quantity,E=N.quoteCoinDisplay,R=A.takerFee,B=A.contractSize,F=A.minQty,V=A.minNotional,U=A.maxNotional,z=o.userCurrentSymbolConfig,W=o.currentSymbolPosition,Z=o.isShowCurrentSymbolOnly,Q=o.balanceData,H=o.getCurrentMarket,G=l.unitSetting.type,Y=H().isPredictContract,K=z.long,q=z.short,J=Q.availableBalanceDisplay,X=(0,g.useMemo)((function(){return Z&&L?L:void 0}),[Z,L]),$=(0,g.useMemo)((function(){var t=W.long,n=W.short,r=(null===t||void 0===t?void 0:t.leverage)||0,o=(null===n||void 0===n?void 0:n.leverage)||0,i=t?new m.O(t.positionSize):new m.O(0),a=n?new m.O(n.positionSize):new m.O(0),l=t?new m.O(t.availableCloseSize):new m.O(0),s=n?new m.O(n.availableCloseSize):new m.O(0);if(!_)switch(G){case fo.oA.sheet:return[{long:l.valueOf(),short:s.valueOf(),longMaxSheet:l.valueOf(),shortMaxSheet:s.valueOf()},{long:i.valueOf(),short:a.valueOf()},{long:"1",short:"1"}];case fo.oA.costValue:return[{long:v(l,e,r,B),short:v(s,e,o,B),longMaxSheet:l.valueOf(),shortMaxSheet:s.valueOf()},{long:i.valueOf(),short:a.valueOf()},{long:"1",short:"1"}];case fo.oA.usd:return[{long:y(l,B),short:y(s,B),longMaxSheet:l.valueOf(),shortMaxSheet:s.valueOf()},{long:y(i,B),short:y(a,B)},{long:new m.O(1).times(B).toFixed(0,0),short:new m.O(1).times(B).toFixed(0,0)}];
1case fo.oA.coin:case fo.oA.nominalValue:default:return[{long:new m.O(e).gt(0)?b(l,B,e,D):"0",short:new m.O(e).gt(0)?b(s,B,e,D):"0",longMaxSheet:l.valueOf(),shortMaxSheet:s.valueOf()},{long:new m.O(e).gt(0)?b(i,B,e,D):"0",short:new m.O(e).gt(0)?b(a,B,e,D):"0"},{long:b(1,B,e,D,!0).toFixed(D,0),short:b(1,B,e,D,!0).toFixed(D,0)}]}switch(G){case fo.oA.sheet:return[{long:l.valueOf(),short:s.valueOf(),longMaxSheet:l.valueOf(),shortMaxSheet:s.valueOf()},{long:i.valueOf(),short:a.valueOf()}];case fo.oA.nominalValue:return[{long:w(l,Y?"1":e,null,B,!0).valueOf(),short:w(s,Y?"1":e,null,B,!0).valueOf(),longMaxSheet:l.valueOf(),shortMaxSheet:s.valueOf()},{long:w(i,Y?"1":e,null,B,!0).valueOf(),short:w(a,Y?"1":e,null,B,!0).valueOf()}];case fo.oA.costValue:return[{long:h(l,e,r,B,null,!0).toFixed(D,1),short:h(s,e,o,B,null,!0).toFixed(D,1),longMaxSheet:l.valueOf(),shortMaxSheet:s.valueOf()},{long:h(i,e,r,B,null,!0).toFixed(D,1),short:h(a,e,o,B,null,!0).toFixed(D,1)}];case fo.oA.coin:default:return[{long:C(l,B,null,!0).toFixed(D,1),short:C(s,B,null,!0).toFixed(D,1),longMaxSheet:l.valueOf(),shortMaxSheet:s.valueOf()},{long:C(i,B,null,!0).toFixed(D,1),short:C(a,B,null,!0).toFixed(D,1)}]}}),[W,B,G,D,t,n,j,d]),ee=$[0],te=$[1],ne=(0,g.useMemo)((function(){var r=j;if(new m.O(r).gt(0)){var o=new m.O(t),i=k(e),a=new m.O(u(o.valueOf(),e,K.leverage)),l=a.gt(0)?a.toFixed(0,1):new m.O(i).times(n/100).toFixed(0,1),s=P(e,l),c=I(e),d=new m.O(u(o.valueOf(),e,q.leverage)),f=d.gt(0)?d.toFixed(0,1):new m.O(c).times(n/100).toFixed(0,1);return{longMargin:s,longMaxOpen:i,shortMargin:M(e,f),shortMaxOpen:c,longSheetAmount:l,shortSheetAmount:f}}return{longMargin:"0.00",longMaxOpen:"0",shortMargin:"0.00",shortMaxOpen:"0",longSheetAmount:0,shortSheetAmount:0}}),[t,j,J,B,R,n,K,q,u,G,K,q]),re=(0,g.useMemo)((function(){var n=ne.longMaxOpen,r=ne.shortMaxOpen,o=u(t,Y?"1":e,K.leverage),i=u(t,Y?"1":e,q.leverage);return[{long:new m.O(d(n,e,K.leverage)).toFixed(f,1),short:new m.O(d(r,e,q.leverage)).toFixed(f,1),longMaxSheet:n,shortMaxSheet:r},{long:new m.O(o).gt(n),short:new m.O(i).gt(r)}]}),[t,G,ne.longMaxOpen,ne.shortMaxOpen,u,d,f,K,q]),oe=re[0],ie=re[1],ae=(0,g.useMemo)((function(){var r={long:"0",short:"0"},o={long:!1,short:!1},i={long:"0",short:"0"},a={long:!1,short:!1},l=Y?1:e,s=Y?1:e;if(new m.O(l).gt(0)){var u="",d=m.O.max(0,p(V,l,null,B,!0).toFixed(0,0)).toFixed(0,1),f=(0,ho.d)({symbolConfig:A,isMarket:!1,price:l,isUBased:_}).value;if(_||(d=m.O.max(0,S(V,B,l,null,!0).toFixed(0,0)).toFixed(0,1),f=(0,ho.d)({symbolConfig:A,isMarket:!1,price:l,isUBased:_}).value),_)switch(G){case fo.oA.sheet:u=t||(n?new m.O(ne.longMaxOpen).times(n/100).toFixed(0,1):"0"),r.long=d,o.long=new m.O(u).lt(d),i.long=f,a.long=new m.O(u).gt(f);break;case fo.oA.costValue:u=t?x(t,l,K.leverage,B):n?new m.O(ne.longMaxOpen).times(n/100).toFixed(0,1):"0",r.long=h(d,l,K.leverage,B,null,!0).toFixed(E,0),o.long=new m.O(u).lt(d),i.long=h(f,l,K.leverage,B,null,!0).toFixed(E,0),a.long=new m.O(u).gt(f);break;case fo.oA.nominalValue:u=t?p(t,l,0,B,!0).toFixed(0,1):n?new m.O(ne.longMaxOpen).times(n/100).toFixed(0,1):"0",r.long=w(d,l,0,B,!0).toFixed(E,0),o.long=new m.O(u).lt(d),i.long=w(f,l,0,B,!0).toFixed(E,0),a.long=new m.O(u).gt(f);break;case fo.oA.coin:default:u=t?O(t,B,null,!0).toFixed(0,1):n?new m.O(ne.longMaxOpen).times(n/100).toFixed(0,1):"0",r.long=C(d,B,null,!0).toFixed(D,0),o.long=new m.O(u).lt(d),i.long=C(f,B,null,!0).toFixed(D,1),a.long=new m.O(u).gt(f)}else switch(G){case fo.oA.sheet:u=t||(n?new m.O(ne.longMaxOpen).times(n/100).toFixed(0,1):"0"),r.long=d,o.long=new m.O(u).lt(d),i.long=f,a.long=new m.O(u).gt(f);break;case fo.oA.costValue:u=t?c(t,e,K.leverage,B,0):n?new m.O(ne.longMaxOpen).times(n/100).toFixed(0,1):"0",r.long=v(d,e,K.leverage,B,D),o.long=new m.O(u).lt(d),i.long=v(f,e,K.leverage,B,D),a.long=new m.O(u).gt(f);break;case fo.oA.usd:u=t?new m.O(t).div(B).toFixed(0,1):n?new m.O(ne.longMaxOpen).times(n/100).toFixed(0,1):"0",r.long=new m.O(d).times(B).toFixed(0,0),o.long=new m.O(u).lt(d),i.long=new m.O(f).times(B).toFixed(0,1),a.long=new m.O(u).gt(f);break;case fo.oA.nominalValue:default:u=t?S(t,B,e,null,!0).toFixed(0,1):n?new m.O(ne.longMaxOpen).times(n/100).toFixed(0,1):"0",r.long=b(d,B,e,null,!0).toFixed(D,0
1),o.long=new m.O(u).lt(d),i.long=b(f,B,e,null,!0).toFixed(D,1),a.long=new m.O(u).gt(f)}}if(new m.O(s).gt(0)){var g="",y=m.O.max(0,new m.O(V).div(s).div(B).toFixed(0,0)).toFixed(0,1),T=(0,ho.d)({symbolConfig:A,isMarket:!1,price:s,isUBased:_}).value;if(_||(y=m.O.max(0,new m.O(V).times(s).div(B).toFixed(0,0)).toFixed(0,1),T=(0,ho.d)({symbolConfig:A,isMarket:!1,price:s,isUBased:_}).value),_)switch(G){case fo.oA.sheet:g=t||(n?new m.O(ne.shortMaxOpen).times(n/100).toFixed(0,1):"0"),r.short=y,o.short=new m.O(g).lt(y),i.short=T,a.short=new m.O(g).gt(T);break;case fo.oA.nominalValue:g=t?new m.O(t).div(s).div(B).toFixed(0,1):n?new m.O(ne.shortMaxOpen).times(n/100).toFixed(0,1):"0",r.short=new m.O(y).times(s).times(B).toFixed(E,0),o.short=new m.O(g).lt(y),i.short=w(T,s,0,B,!0).toFixed(E,0),a.short=new m.O(g).gt(T);break;case fo.oA.costValue:g=t?new m.O(t).div(new m.O(e).times(B).div(K.leverage)).toFixed(0,1):n?new m.O(ne.shortMaxOpen).times(n/100).toFixed(0,1):"0",r.short=new m.O(y).times(e).times(B).div(q.leverage).toFixed(E,0),o.long=new m.O(g).lt(y),i.long=new m.O(T).times(e).times(B).div(K.leverage).toFixed(E,0),a.long=new m.O(g).gt(T);break;case fo.oA.coin:default:g=t?new m.O(t).div(B).toFixed(0,1):n?new m.O(ne.shortMaxOpen).times(n/100).toFixed(0,1):"0",r.short=new m.O(y).times(B).toFixed(D,0),o.short=new m.O(g).lt(y),i.short=new m.O(T).times(B).toFixed(D,1),a.short=new m.O(g).gt(T)}else switch(G){case fo.oA.sheet:g=t||(n?new m.O(ne.shortMaxOpen).times(n/100).toFixed(0,1):"0"),r.short=y,o.short=new m.O(g).lt(y),i.short=T,a.short=new m.O(g).gt(T);break;case fo.oA.costValue:g=t?new m.O(t).div(new m.O(B).div(q.leverage).div(e)).toFixed(0,1):n?new m.O(ne.shortMaxOpen).times(n/100).toFixed(0,1):"0",r.short=new m.O(y).times(B).div(q.leverage).div(e).toFixed(D,0),o.short=new m.O(g).lt(y),i.short=new m.O(T).times(B).div(q.leverage).div(e).toFixed(D,0),a.short=new m.O(g).gt(T);break;case fo.oA.usd:g=t?new m.O(t).div(B).toFixed(0,1):n?new m.O(ne.longMaxOpen).times(n/100).toFixed(0,1):"0",r.short=new m.O(y).times(B).toFixed(0,0),o.short=new m.O(g).lt(y),i.short=new m.O(T).times(B).toFixed(0,1),a.short=new m.O(g).gt(T);break;case fo.oA.nominalValue:default:g=t?new m.O(t).times(e).div(B).toFixed(0,1):n?new m.O(ne.shortMaxOpen).times(n/100).toFixed(0,1):"0",r.short=new m.O(y).times(B).div(e).toFixed(D,0),o.short=new m.O(g).lt(y),i.short=new m.O(T).times(B).div(e).toFixed(D,1),a.short=new m.O(g).gt(T)}}return[r,o,i,a]}),[t,n,G,D,B,F,V,U,K,q,A,_,e]),le=ae[0],se=ae[1],ce=ae[2],ue=ae[3],de=(0,g.useCallback)((function(r){var o,i=e;G===fo.oA.costValue&&(i=e),Y&&(i="1"),o="BUY"===r?oe.long:oe.short,"BUY"===r?oe.longMaxSheet:oe.shortMaxSheet;var a=null;return a=t?new m.O(u(t,i,"BUY"===r?K.leverage:q.leverage)):new m.O(u(new m.O(o).times(n/100).valueOf(),i,"BUY"===r?K.leverage:q.leverage)),Number(a.toFixed(0,1))}),[oe,ee,t,B,G,n,u,K,q]),fe=(0,g.useMemo)((function(){if(n){var e=new m.O(oe.long).times(n).div(100),r=new m.O(oe.short).times(n).div(100);return[e.toFixed(f,1),r.toFixed(f,1)]}return[t,t]}),[n,oe,ee,G,f,t]);return{buyValue:fe[0],sellValue:fe[1],fetchSymbol:X,availableCloseData:ee,positionSizeData:te,availableOpenData:ne,maxOpenView:oe,isGtMaxOpen:ie,minAmountOnce:le,isLessMinAmountOnce:se,maxAmountOnce:ce,isGreatMaxAmountOnce:ue,getSheetAmount:de}};function po(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var go=l.Px.useTranslation,mo=[{value:25,label:"25%"},{value:50,label:"50%"},{value:75,label:"75%"},{value:100,label:"100%"}],yo=(0,p.Pi)((function(e){var t=e.y,n=e.price,r=e.close,o=e.rightOffset,i=go().t,l=(0,g.useState)(""),c=l[0],d=l[1],f=(0,g.useState)(""),h=f[0],v=f[1],p=(0,g.useState)(!1),y=p[0],b=p[1],C=(0,g.useRef)(null),w=(0,Pr.oR)(),S=w.ui,O=w.futures,x=w.ticker,_=w.order,T=w.account,P=(0,oo.Z)(),k=P.unitView,M=P.unitPrecision,I=S.isInnovationAgreement,L=S.setShowInnovationModal,A=T.isLogin,j=T.toSignIn,N=_.fetchOrderList,D=_.fetchCreateOrder,E=O.latestPrice,R=O.currentMarket.isInnovationContract,B=x.currentSymbolIdentity,F=(0,g.useState)(null),V=F[0],U=F[1],z=(0,g.useRef)(!1),W=(0,g.useMemo)((function(){var e="",t=0;return c.includes("%")?t=mo.filter((function(e){return e.label===c}))[0].value:e=c,[e,t]}),[c]),Z=W[0],Q=W[1],H=vo(n,Z,Q),G=H.buyValue,Y=H.sellValue,K=H.fetchSymbol,q=H.availableOpenData,J=H.minAmountOnce,X=H.isLessMinAmountOnce,$=H.maxAmountOnce,ee=H.isGreatMaxAmountOnce,te=H.getSheetAmount,ne=(0,no.ZP)().colorFlag,re=(0,ro.Z)({longSheetAmount:q.longSheetAmount,shortSheetAmount:q.shortSheetAmount,buyPrice:n,sellPrice:n}
1),oe=re.invalidBalanceMaxOpen,ie=re.invalidBracketMaxAmount,ae=(0,g.useMemo)((function(){return new m.Z(E).gte(n)?["LONG","0"==ne?so().openLong:so().openShort]:["SHORT","0"==ne?so().openShort:so().openLong]}),[n,E,ne]),le=ae[0],se=ae[1],ce=function(){if(C.current){var e=C.current.getElementsByTagName("input");e&&e.length&&e[0].focus()}};(0,g.useEffect)((function(){if(!(t<0)){var e=C.current;e&&(e.style.top=t+"px",ce())}}),[t]);var ue=function(e,t,o){if(A)if(!R||I){var a=!1;if(Z||Q?"BUY"===t?oe({side:"LONG"})?(a=!0,v(i("market.orderForm.tip.balanceMaxOpen"))):ie({side:"LONG"})?(a=!0,v(i("market.orderForm.tip.bracketMaxAmount"))):X.long?(a=!0,v(i("market.orderForm.tip.04-1",{amount:J.long,unit:k}))):ee.long&&(a=!0,v(i("market.orderForm.tip.maxLimitQty",{amount:$.long,unit:k}))):"SELL"===t&&(oe({side:"SHORT"})?(a=!0,v(i("market.orderForm.tip.balanceMaxOpen"))):ie({side:"SHORT"})?(a=!0,v(i("market.orderForm.tip.bracketMaxAmount"))):X.short?(a=!0,v(i("market.orderForm.tip.04-1",{amount:J.short,unit:k}))):ee.short&&(a=!0,v(i("market.orderForm.tip.maxLimitQty",{amount:$.short,unit:k})))):(a=!0,v(i("market.orderForm.tip.03"))),a)b(!0);else if(v(""),b(!1),o||!("LONG"==e&&new m.Z(E).lte(n)||"SHORT"==e&&new m.Z(E).gte(n))){var l={orderSide:t,klineOrder:!0,tradeRate:Q||"",orderType:"LIMIT",price:n,origQty:te(t),positionSide:e,symbol:B,timeInForce:"GTC"};z.current||(z.current=!0,D(l).then((function(){(0,ao.ju)((function(){N({symbol:K,page:1,state:"UNFINISHED"})}),1e3,1),d(""),r()})).finally((function(){z.current=!1})))}else U({positionSide:e,orderSide:t})}else L(!0);else j()};return(0,g.useEffect)((function(){d("")}),[k]),(0,g.useEffect)((function(){var e=r;return document.addEventListener("click",e),function(){document.removeEventListener("click",e)}}),[r]),(0,a.jsxs)("div",{ref:C,className:so().container,style:null!=o?{right:o}:void 0,onClick:function(e){e.stopPropagation()},children:[(0,a.jsxs)("section",{className:so().mainSection,children:[(0,a.jsxs)("div",{className:so().Quantity,children:[(0,a.jsxs)("h3",{children:[i("placeholder.amount"),"(",(0,a.jsx)(to.YH,{}),")"]}),(0,a.jsx)(s.Z,{visible:y,placement:"topLeft",title:h,children:(0,a.jsx)(eo.Z,{integer:!1,negative:!1,precision:M,integerLength:9,value:c,className:so().inputNumber,onChange:function(e){d(e)},onBlur:function(){V||b(!1)},placeholder:i("placeholder.amount")})})]}),(0,a.jsxs)("div",{className:se,onClick:"SHORT"==le?function(){ue("SHORT","SELL",!1)}:function(){ue("LONG","BUY",!1)},children:[(0,a.jsx)("h3",{children:i("SHORT"==le?"kline.order.limit.short":"kline.order.limit.long")}),(0,a.jsx)("p",{children:n})]})]}),(0,a.jsxs)("section",{className:so().footer,style:{display:"flex"},children:[mo.map((function(e){var t=e.value,n=e.label;return(0,a.jsx)("div",{className:u()(po({},so().selected,n===c)),onClick:function(){return function(e){d(e)}(n)},children:(0,a.jsx)("span",{children:n})},t)})),!!c&&(0,a.jsxs)("span",{className:so().amountRight,children:[function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2?arguments[2]:void 0,r=new m.Z(e||0);return r.isNaN()?0:(0,io.ic)(r.toFixed(t,n))}("SHORT"==le?Y:G,M,1),"(",k,")"]})]}),(0,a.jsx)($r.Z,{title:i("profitloss.notice"),className:so().priceModal,width:280,zIndex:999999,centered:!0,footer:null,visible:V,closable:!1,bodyStyle:{padding:0},children:(0,a.jsxs)("div",{className:so().modalContainer,children:[(0,a.jsx)("p",{children:i("LONG"==le?"kline.order.modal.long":"kline.order.modal.short")}),(0,a.jsxs)("footer",{children:[(0,a.jsx)("div",{className:so().btn,onClick:function(){U(!1),ce()},children:(0,a.jsx)("span",{children:i("btn.cancel")})}),(0,a.jsx)("div",{className:so().btn,onClick:function(){ue(V.positionSide,V.orderSide,!0),U(!1)},children:(0,a.jsx)("span",{children:i("modal.transfer.06")})})]})]})})]})})),bo=n(4650),Co=n(81156),wo=n.n(Co),So=n(20554),Oo=function(e,t){var n=(0,Pr.oR)(),r=n.futures,o=n.underlying,i=n.ticker,a=n.ui,l=(0,oo.Z)(),s=l.costValue2SheetForC,c=l.currentUnit2Sheet,u=l.sheet2CurrentUnit,d=l.unitPrecision,f=l.sheet2CostValue,h=l.sheet2CostValueForCbased,v=l.usdt2Sheet,p=l.sheet2Usd,y=l.sheet2CoinForC,b=l.sheet2CoinForU,C=l.sheet2Usdt,w=l.coin2SheetForC,S=l.coin2SheetForU,O=l.costValue2Sheet,x=o.isUBased,_=(x?co.Z:uo.Z)(),T=_.getLongMargin,P=_.getUserLongMaxOpen,k=_.getShortMargin,M=_.getUserShortMaxOpen,I=(0,So.Z)(),L=I.buyMarketPriceForOrder,A=I.sellMarketPriceForOrder,j=i.currentSymbolIdentity,N=i.currentSymbolConfig,D=i.availablePrice,E=i.currentSymbolPrecision,R=E.quantity,B=E.quoteCoinDisplay,F=N.takerFee,V=N.contractSize,U=N.minQty,z=N.minNotional,W=N.maxNotional,Z=r.userCurrentSymbolConfig,Q=r.currentSymbolPosition,H=r.isShowCurrentSymbolOnly,G=r.latestPrice,Y=r.balanceData,K=r.getCurrentMarket,q=a.unitSetting.type,J=K().isPredictContract,X=Z.long,$=Z.short,ee=Y.availableBalanceDisplay,te=(0,g.useMemo)((function(){var e=L,t=A,n=e,r=m.O.max(G,t).valueOf();return x||(n=m.O.min(G,e).valueOf(),r=t),[n,r]}),[G,L,A]),ne=te[0],re=te[1],oe=(0,g.useMemo)((function(){return H&&j?j:void 0}),[H,j]),ie=(0,g.useMemo)((function(){var e=Q.long,t=Q.short,n=(null===e||void 0===e?void 0:e.leverage)||0,r=(null===t||void 0===t?void 0:t.leverage)||0,o=e?new m.O(e.positionSize):new m.O(0),i=t?new m.O(t.positionSize):new m.O(0),a=e?new m.O(e.availableCloseSize):new m.O(0),l=t?new m.O(t.availableCloseSize):new m.O(0);if(!x)switch(q){case fo.oA.sheet:return[{long:a.valueOf(),short:l.valueOf(),longMaxSheet:a.valueOf(),shortMaxSheet:l.valueOf()},{long:o.valueOf(),short:i.valueOf()},{long:"1",short:"1"}];case fo.oA.costValue:var s=m.O.min(G,ne);return[{long:h(a,s,n,V),short:h(l,re,r,V),longMaxSheet:a.valueOf(),shortMaxSheet:l.valueOf()},{long:o.valueOf(),short:i.valueOf()},{long:"1",short:"1"}];case fo.oA.usd:return[{long:p(a,V),short:p(l,V),longMaxSheet:a.valueOf(),shortMaxSheet:l.valueOf()},{long:p(o,V),short:p(i,V)},{long:new m.O(1).times(V).toFixed(0,0),short:new m.O(1).times(V).toFixed(0,0)}];
1case fo.oA.coin:case fo.oA.nominalValue:default:return[{long:new m.O(re).gt(0)?y(a,V,re,R):"0",short:new m.O(ne).gt(0)?y(l,V,ne,R):"0",longMaxSheet:a.valueOf(),shortMaxSheet:l.valueOf()},{long:new m.O(re).gt(0)?y(o,V,re,R):"0",short:new m.O(ne).gt(0)?y(i,V,ne,R):"0"},{long:y(1,V,re,R,!0).toFixed(R,0),short:y(1,V,ne,R,!0).toFixed(R,0)}]}switch(q){case fo.oA.sheet:return[{long:a.valueOf(),short:l.valueOf(),longMaxSheet:a.valueOf(),shortMaxSheet:l.valueOf()},{long:o.valueOf(),short:i.valueOf()}];case fo.oA.nominalValue:return[{long:C(a,J?"1":re,null,V,!0).valueOf(),short:C(l,J?"1":ne,null,V,!0).valueOf(),longMaxSheet:a.valueOf(),shortMaxSheet:l.valueOf()},{long:C(o,J?"1":re,null,V,!0).valueOf(),short:C(i,J?"1":ne,null,V,!0).valueOf()}];case fo.oA.costValue:var c=m.O.max(G,ne);return[{long:f(a,re,n,V,null,!0).toFixed(R,1),short:f(l,c,r,V,null,!0).toFixed(R,1),longMaxSheet:a.valueOf(),shortMaxSheet:l.valueOf()},{long:f(o,re,n,V,null,!0).toFixed(R,1),short:f(i,c,r,V,null,!0).toFixed(R,1)}];case fo.oA.coin:default:return[{long:b(a,V,null,!0).toFixed(R,1),short:b(l,V,null,!0).toFixed(R,1),longMaxSheet:a.valueOf(),shortMaxSheet:l.valueOf()},{long:b(o,V,null,!0).toFixed(R,1),short:b(i,V,null,!0).toFixed(R,1)}]}}),[Q,V,q,R,e,t,G,D,ne,re,u]),ae=ie[0],le=ie[1],se=(0,g.useMemo)((function(){var n=D,r=J?"1":q===fo.oA.nominalValue?G:ne,o=J?"1":q===fo.oA.nominalValue?G:re;if(new m.O(n).gt(0)){var i=new m.O(e),a=P(ne),l=new m.O(c(i.valueOf(),r,X.leverage)),s=l.gt(0)?l.toFixed(0,1):new m.O(a).times(t/100).toFixed(0,1),u=T(ne,s),d=M(re),f=new m.O(c(i.valueOf(),o,$.leverage)),h=f.gt(0)?f.toFixed(0,1):new m.O(d).times(t/100).toFixed(0,1);return{longMargin:u,longMaxOpen:a,shortMargin:k(re,h),shortMaxOpen:d,longSheetAmount:s,shortSheetAmount:h}}return{longMargin:"0.00",longMaxOpen:"0",shortMargin:"0.00",shortMaxOpen:"0",longSheetAmount:0,shortSheetAmount:0}}),[e,D,ee,V,F,t,X,$,ne,re,c,q,X,$]),ce=(0,g.useMemo)((function(){var t=se.longMaxOpen,n=se.shortMaxOpen,r=J?"1":q===fo.oA.nominalValue?G:ne,o=J?"1":q===fo.oA.nominalValue?G:re,i=c(e,J?"1":ne,X.leverage),a=c(e,J?"1":re,$.leverage);return[{long:new m.O(u(t,r,X.leverage)).toFixed(d,1),short:new m.O(u(n,o,$.leverage)).toFixed(d,1),longMaxSheet:t,shortMaxSheet:n},{long:new m.O(i).gt(t),short:new m.O(a).gt(n)}]}),[e,q,se.longMaxOpen,se.shortMaxOpen,c,u,d,X,$]),ue=ce[0],de=ce[1],fe=(0,g.useMemo)((function(){var n={long:"0",short:"0"},r={long:!1,short:!1},o={long:"0",short:"0"},i={long:!1,short:!1},a=J?1:ne,l=J?1:re;if(new m.O(a).gt(0)){var c="",u=m.O.max(0,v(z,a,null,V,!0).toFixed(0,0)).toFixed(0,1),d=(0,ho.d)({symbolConfig:N,isMarket:!0,price:a,isUBased:x}).value;if(x||(u=m.O.max(0,w(z,V,a,null,!0).toFixed(0,0)).toFixed(0,1),d=(0,ho.d)({symbolConfig:N,isMarket:!0,price:a,isUBased:x}).value),x)switch(q){case fo.oA.sheet:c=e||(t?new m.O(se.longMaxOpen).times(t/100).toFixed(0,1):"0"),n.long=u,r.long=new m.O(c).lt(u),o.long=d,i.long=new m.O(c).gt(d);break;case fo.oA.costValue:c=e?O(e,a,X.leverage,V):t?new m.O(se.longMaxOpen).times(t/100).toFixed(0,1):"0",n.long=f(u,a,X.leverage,V,null,!0).toFixed(B,0),r.long=new m.O(c).lt(u),o.long=f(d,a,X.leverage,V,null,!0).toFixed(B,0),i.long=new m.O(c).gt(d);break;case fo.oA.nominalValue:c=e?v(e,a,0,V,!0).toFixed(0,1):t?new m.O(se.longMaxOpen).times(t/100).toFixed(0,1):"0",n.long=C(u,a,0,V,!0).toFixed(B,0),r.long=new m.O(c).lt(u),o.long=C(d,a,0,V,!0).toFixed(B,0),i.long=new m.O(c).gt(d);break;case fo.oA.coin:default:c=e?S(e,V,null,!0).toFixed(0,1):t?new m.O(se.longMaxOpen).times(t/100).toFixed(0,1):"0",n.long=b(u,V,null,!0).toFixed(R,0),r.long=new m.O(c).lt(u),o.long=b(d,V,null,!0).toFixed(R,1),i.long=new m.O(c).gt(d)}else switch(q){case fo.oA.sheet:c=e||(t?new m.O(se.longMaxOpen).times(t/100).toFixed(0,1):"0"),n.long=u,r.long=new m.O(c).lt(u),o.long=d,i.long=new m.O(c).gt(d);break;case fo.oA.costValue:var p=m.O.min(G,ne);c=e?s(e,p,X.leverage,V,0):t?new m.O(se.longMaxOpen).times(t/100).toFixed(0,1):"0",n.long=h(u,p,X.leverage,V,R),r.long=new m.O(c).lt(u),o.long=h(d,p,X.leverage,V,R),i.long=new m.O(c).gt(d);break;case fo.oA.usd:c=e?new m.O(e).div(V).toFixed(0,1):t?new m.O(se.longMaxOpen).times(t/100).toFixed(0,1):"0",n.long=new m.O(u).times(V).toFixed(0,0),r.long=new m.O(c).lt(u),o.long=new m.O(d).times(V).toFixed(0,1),i.long=new m.O(c).gt(d);break;
1case fo.oA.nominalValue:default:c=e?w(e,V,ne,null,!0).toFixed(0,1):t?new m.O(se.longMaxOpen).times(t/100).toFixed(0,1):"0",n.long=y(u,V,ne,null,!0).toFixed(R,0),r.long=new m.O(c).lt(u),o.long=y(d,V,ne,null,!0).toFixed(R,1),i.long=new m.O(c).gt(d)}}if(new m.O(l).gt(0)){var g="",_=m.O.max(0,new m.O(z).div(l).div(V).toFixed(0,0)).toFixed(0,1),T=(0,ho.d)({symbolConfig:N,isMarket:!0,price:l,isUBased:x}).value;if(x||(_=m.O.max(0,new m.O(z).times(l).div(V).toFixed(0,0)).toFixed(0,1),T=(0,ho.d)({symbolConfig:N,isMarket:!0,price:l,isUBased:x}).value),x)switch(q){case fo.oA.sheet:g=e||(t?new m.O(se.shortMaxOpen).times(t/100).toFixed(0,1):"0"),n.short=_,r.short=new m.O(g).lt(_),o.short=T,i.short=new m.O(g).gt(T);break;case fo.oA.nominalValue:g=e?new m.O(e).div(l).div(V).toFixed(0,1):t?new m.O(se.shortMaxOpen).times(t/100).toFixed(0,1):"0",n.short=new m.O(_).times(l).times(V).toFixed(B,0),r.short=new m.O(g).lt(_),o.short=C(T,l,0,V,!0).toFixed(B,0),i.short=new m.O(g).gt(T);break;case fo.oA.costValue:var P=m.O.max(G,l);g=e?new m.O(e).div(new m.O(P).times(V).div(X.leverage)).toFixed(0,1):t?new m.O(se.shortMaxOpen).times(t/100).toFixed(0,1):"0",n.short=new m.O(_).times(P).times(V).div($.leverage).toFixed(B,0),r.long=new m.O(g).lt(_),o.long=new m.O(T).times(P).times(V).div(X.leverage).toFixed(B,0),i.long=new m.O(g).gt(T);break;case fo.oA.coin:default:g=e?new m.O(e).div(V).toFixed(0,1):t?new m.O(se.shortMaxOpen).times(t/100).toFixed(0,1):"0",n.short=new m.O(_).times(V).toFixed(R,0),r.short=new m.O(g).lt(_),o.short=new m.O(T).times(V).toFixed(R,1),i.short=new m.O(g).gt(T)}else switch(q){case fo.oA.sheet:g=e||(t?new m.O(se.shortMaxOpen).times(t/100).toFixed(0,1):"0"),n.short=_,r.short=new m.O(g).lt(_),o.short=T,i.short=new m.O(g).gt(T);break;case fo.oA.costValue:g=e?new m.O(e).div(new m.O(V).div($.leverage).div(re)).toFixed(0,1):t?new m.O(se.shortMaxOpen).times(t/100).toFixed(0,1):"0",n.short=new m.O(_).times(V).div($.leverage).div(re).toFixed(R,0),r.short=new m.O(g).lt(_),o.short=new m.O(T).times(V).div($.leverage).div(re).toFixed(R,0),i.short=new m.O(g).gt(T);break;case fo.oA.usd:g=e?new m.O(e).div(V).toFixed(0,1):t?new m.O(se.longMaxOpen).times(t/100).toFixed(0,1):"0",n.short=new m.O(_).times(V).toFixed(0,0),r.short=new m.O(g).lt(_),o.short=new m.O(T).times(V).toFixed(0,1),i.short=new m.O(g).gt(T);break;case fo.oA.nominalValue:default:g=e?new m.O(e).times(re).div(V).toFixed(0,1):t?new m.O(se.shortMaxOpen).times(t/100).toFixed(0,1):"0",n.short=new m.O(_).times(V).div(re).toFixed(R,0),r.short=new m.O(g).lt(_),o.short=new m.O(T).times(V).div(re).toFixed(R,1),i.short=new m.O(g).gt(T)}}return[n,r,o,i]}),[e,t,q,R,ne,re,V,U,z,W,X,$,G,N,x]),he=fe[0],ve=fe[1],pe=fe[2],ge=fe[3],me=(0,g.useCallback)((function(n){var r,o=G;q===fo.oA.costValue&&(o="BUY"===n?ne:re),J&&(o="1"),r="BUY"===n?ue.long:ue.short,"BUY"===n?ue.longMaxSheet:ue.shortMaxSheet;var i=null;return i=e?new m.O(c(e,o,"BUY"===n?X.leverage:$.leverage)):new m.O(c(new m.O(r).times(t/100).valueOf(),o,"BUY"===n?X.leverage:$.leverage)),Number(i.toFixed(0,1))}),[ue,ae,e,V,q,t,ne,re,c,X,$]),ye=(0,g.useMemo)((function(){if(t){var n=new m.O(ue.long).times(t).div(100),r=new m.O(ue.short).times(t).div(100);return[n.toFixed(d,1),r.toFixed(d,1)]}return[e,e]}),[t,ue,ae,q,d,e]),be=ye[0],Ce=ye[1];return{buyPrice:ne,sellPrice:re,buyValue:be,sellValue:Ce,fetchSymbol:oe,availableCloseData:ae,positionSizeData:le,availableOpenData:se,maxOpenView:ue,isGtMaxOpen:de,minAmountOnce:he,isLessMinAmountOnce:ve,maxAmountOnce:pe,isGreatMaxAmountOnce:ge,getSheetAmount:me}};function xo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _o=l.Px.useTranslation,To=[{value:25,label:"25%"},{value:50,label:"50%"},{value:75,label:"75%"},{value:100,label:"100%"}],Po=(0,p.Pi)((function(){var e,t,n=_o().t,r=(0,g.useState)(""),o=r[0],i=r[1],l=(0,g.useState)(!1),c=l[0],d=l[1],f=(0,g.useState)(""),h=f[0],v=f[1],p=(0,g.useState)(!1),y=p[0],b=p[1],C=(0,g.useRef)(null),w=(0,Pr.oR)(),S=w.ui,O=w.futures,x=w.ticker,_=w.order,T=w.account,P=w.depthStore,k=(0,oo.Z)(),M=k.unitView,I=k.unitPrecision,L=S.setHasQuickTrading,A=(S.hasQuickTrading,S.unitSetting,S.isInnovationAgreement),j=S.setShowInnovationModal,N=T.isLogin,D=T.toSignIn,E=_.fetchOrderList,R=_.fetchCreateOrder,B=(O.latestPrice,O.userCurrentSymbolConfig),F=(O.getTradeRate,O.currentMarket),V=P.quickTradingPrice,U=F.isInnovationContract,z=x.currentSymbolIdentity,W=V.a,Z=V.b,Q=(B.long,B.short,(0,g.useMemo)((function(){var e="",t=0;return o.includes("%")?t=To.filter((function(e){return e.label===o}))[0].value:e=o,[e,t]}),[o])),H=Q[0],G=Q[1],Y=Oo(H,G),K=Y.buyPrice,q=Y.sellPrice,J=Y.buyValue,X=Y.sellV
1alue,$=Y.availableOpenData,ee=Y.fetchSymbol,te=Y.minAmountOnce,ne=Y.isLessMinAmountOnce,re=Y.maxAmountOnce,oe=Y.isGreatMaxAmountOnce,ie=Y.getSheetAmount,ae=(0,no.ZP)().colorFlag,le=(0,ro.Z)({longSheetAmount:$.longSheetAmount,shortSheetAmount:$.shortSheetAmount,buyPrice:K,sellPrice:q}),se=le.invalidBalanceMaxOpen,ce=le.invalidBracketMaxAmount,ue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2?arguments[2]:void 0,r=new m.Z(e||0);return r.isNaN()?0:(0,io.ic)(r.toFixed(t,n))},de=function(e,t){if(N)if(!U||A){var r=!1;if(H||G?"BUY"===t?se({side:"LONG"})?(r=!0,v(n("market.orderForm.tip.balanceMaxOpen"))):ce({side:"LONG"})?(r=!0,v(n("market.orderForm.tip.bracketMaxAmount"))):ne.long?(r=!0,v(n("market.orderForm.tip.04-1",{amount:te.long,unit:M}))):oe.long&&(r=!0,v(n("market.orderForm.tip.maxMarketQty",{amount:re.long,unit:M}))):"SELL"===t&&(se({side:"SHORT"})?(r=!0,v(n("market.orderForm.tip.balanceMaxOpen"))):ce({side:"SHORT"})?(r=!0,v(n("market.orderForm.tip.bracketMaxAmount"))):ne.short?(r=!0,v(n("market.orderForm.tip.04-1",{amount:te.short,unit:M}))):oe.short&&(r=!0,v(n("market.orderForm.tip.maxMarketQty",{amount:re.short,unit:M})))):(r=!0,v(n("market.orderForm.tip.03"))),r)b(!0);else{v(""),b(!1);var o={orderSide:t,klineOrder:!0,tradeRate:G||"",orderType:"MARKET",origQty:ie(t),positionSide:e,symbol:z,timeInForce:"IOC"};R(o).then((function(){(0,ao.ju)((function(){E({symbol:ee,page:1,state:"UNFINISHED"})}),1e3,1),i("")}))}}else j(!0);else D()};return(0,g.useEffect)((function(){i("")}),[M]),(0,a.jsxs)("div",{ref:C,className:wo().container,children:[(0,a.jsxs)("section",{className:wo().mainSection,children:[(0,a.jsxs)("div",{className:wo().dragable,onMouseDown:function(e){var t,n=C.current;if(n){var r=n.offsetWidth,o=n.offsetHeight,i=n.parentElement;if(i){var a=null===(t=i.getBoundingClientRect)||void 0===t?void 0:t.call(i);if(a){var l=a.width,s=a.height,c=Array.from(i.querySelectorAll('iframe[id^="tradingview_"]')),u=c.map((function(e){return e.style.pointerEvents}));c.forEach((function(e){e.style.pointerEvents="none"}));var d=e.clientX,f=e.clientY,h=n.offsetLeft,v=n.offsetTop,p=l-r,g=s-o,m=document.body.style.userSelect;document.body.style.userSelect="none";var y=0,b=d,w=f,S=function(e){b=e.clientX,w=e.clientY,y||(y=requestAnimationFrame((function(){y=0;var e=h+(b-d),t=v+(w-f);e<10&&(e=10),e>p&&(e=p),t<10&&(t=10),t>g&&(t=g);var o=l-e-r;n.style.right="".concat(o,"px"),n.style.top="".concat(t,"px")})))},O=function(){y&&(cancelAnimationFrame(y),y=0),document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",O),window.removeEventListener("blur",O),document.body.style.userSelect=m,c.forEach((function(e,t){var n;e.style.pointerEvents=null!==(n=u[t])&&void 0!==n?n:""}))};document.addEventListener("mousemove",S),document.addEventListener("mouseup",O),window.addEventListener("blur",O)}}}},children:[(0,a.jsx)("div",{}),(0,a.jsx)("div",{}),(0,a.jsx)("div",{}),(0,a.jsx)("div",{}),(0,a.jsx)("div",{}),(0,a.jsx)("div",{}),(0,a.jsx)("div",{}),(0,a.jsx)("div",{})]}),(0,a.jsxs)("div",{className:"0"==ae?wo().openLong:wo().openShort,onClick:function(){de("LONG","BUY")},children:[(0,a.jsx)("h3",{children:n("btn.buyLong")}),(0,a.jsx)("p",{children:null===W||void 0===W||null===(e=W[0])||void 0===e?void 0:e[0]})]}),(0,a.jsxs)("div",{className:wo().Quantity,children:[(0,a.jsxs)("h3",{children:[n("placeholder.amount"),"(",(0,a.jsx)(to.YH,{}),")"]}),(0,a.jsx)(s.Z,{visible:y||!1,placement:"topLeft",title:h,children:(0,a.jsx)(eo.Z,{integer:!1,negative:!1,precision:I,integerLength:9,value:o,className:wo().inputNumber,onChange:function(e){i(e)},onFocus:function(){return d(!0)},onBlur:function(){var e=setTimeout((function(){d(!1),clearTimeout(e)}),200);b(!1)},placeholder:n("placeholder.amount")})})]}),(0,a.jsxs)("div",{className:"0"==ae?wo().openShort:wo().openLong,onClick:function(){de("SHORT","SELL")},children:[(0,a.jsx)("h3",{children:n("btn.sellShort")}),(0,a.jsx)("p",{children:null===Z||void 0===Z||null===(t=Z[0])||void 0===t?void 0:t[0]})]}),(0,a.jsx)("div",{className:wo().remove,onClick:function(){L(!1)},children:(0,a.jsx)(bo.Z,{icon:"close"})})]}),(0,a.jsxs)("section",{className:wo().footer,style:{display:c||o?"flex":"none"},children:[!!o&&(0,a.jsxs)("span",{className:wo().amountLeft,children:[ue(J,I,1),"(",M,")"]}),To.map((function(e){var t=e.value,n=e.label;return(0,a.jsx)("div",{className:u()(xo({},wo().selected,n===o)),onClick:function(){return function(e){i(e)}(n)},children:(0,a.jsx)("span",{children:n})},t)})),!!o&&(0,a.jsxs)("span",{className:wo().amountRight,children:[ue(X,I,
11),"(",M,")"]})]})]})})),ko=n(31127),Mo=function(e){var t=e.className;return(0,a.jsx)("span",{className:t,children:(0,a.jsx)("svg",{width:"6",height:"6",viewBox:"0 0 6 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M0 6L6 6L6 0L0 6Z",fill:"currentColor"})})})},Io=function(e){var t=e.className;return(0,a.jsx)("span",{className:t,children:(0,a.jsx)("svg",{width:"6",height:"6",viewBox:"0 0 6 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M6 0L5.24537e-07 -5.24537e-07L0 6L6 0Z",fill:"currentColor"})})})},Lo=n(37115),Ao=n.n(Lo);function jo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function No(e){return function(e){if(Array.isArray(e))return jo(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return jo(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jo(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Do=l.Px.useTranslation,Eo=(0,p.Pi)((function(e){var t=e.onChange,n=e.resolution,r=e.isTimeLine,o=e.fromIndex,i=Do().t,l=(0,g.useState)(!1),s=l[0],c=l[1],d=(0,g.useState)(n),f=d[0],h=d[1],v=(0,g.useState)(!0),p=v[0],m=v[1],y=(0,g.useState)([]),b=y[0],C=y[1],w=(0,g.useState)([]),S=w[0],O=w[1],x=Kr.G5.filter((function(e){var t=e.value;return b.includes(t)})),_=s?S:b,T=p?Mo:Io;return(0,g.useEffect)((function(){var e=function(){var e=Kr.kF,t=window.localStorage.getItem("userSelectedResolution");return t&&(e=JSON.parse(t)),e}();2===e.length&&"1440"===e[0]&&"10080"===e[1]&&(e=No(Kr.kF),window.localStorage.setItem("userSelectedResolution",JSON.stringify(e))),O(No(e)),C(e)}),[]),(0,g.useEffect)((function(){try{throw["kLine.cycle.1m","kLine.cycle.1m","kLine.cycle.3m","kLine.cycle.5m","kLine.cycle.15m","kLine.cycle.30m","kLine.cycle.1h","kLine.cycle.2h","kLine.cycle.4h","kLine.cycle.6h","kLine.cycle.8h","kLine.cycle.12h","kLine.cycle.1D","kLine.cycle.2D","kLine.cycle.3D","kLine.cycle.1W","kLine.cycle.1M"]}catch(pe){}}),[]),(0,a.jsxs)("div",{className:Ao().custom,children:[x.map((function(e,o){var l,s,c=e.value,d=e.desc,v=0===o,p=o===x.length-1,g=!(!f||x.some((function(e){return e.value===f.value})))&&p,m=v&&"0"===c||g&&r,y=g?null===f||void 0===f||null===(l=f.desc)||void 0===l?void 0:l.value:d.value,b=g?null===f||void 0===f||null===(s=f.desc)||void 0===s?void 0:s.unit:d.unit;b=["d","w"].includes(b)?b.toUpperCase():b;var C=m?"1":c;return(0,a.jsx)("div",{className:u()(n.value===c&&!r||"0"===c&&r||g?Ao().active:"",Ao().toolItem),onClick:function(){(0,ko.WJ)(i(m?"kLine.cycle.realTime":"kLine.cycle.".concat(y).concat(b))),!p&&h({value:C,desc:d}),t(g?f:{value:C,desc:d},m)},children:i(m?"kLine.cycle.realTime":"kLine.cycle.".concat(y).concat(b))},c)})),(0,a.jsx)(E.Z,{placement:"bottom",getPopupContainer:function(){return document.getElementById("klineContainer")},content:(0,a.jsxs)("div",{className:Ao().popoverContent,children:[(0,a.jsxs)("header",{children:[(0,a.jsx)("p",{children:"".concat(i("kLine.selectCycle"),"(").concat(S.length,"/9)")}),(0,a.jsx)("div",{onClick:function(){if(s){var e=S;e.length||(e=Kr.kF),C(e),window.localStorage.setItem("userSelectedResolution",JSON.stringify(e))}c(!s)},children:i(s?"btn.save":"btn.edit")})]}),(0,a.jsx)("section",{children:Kr.G5.map((function(e){var n=e.value,r=e.desc,o="0"===n,l=["d","w"].includes(r.unit)?r.unit.toUpperCase():r.unit;return(0,a.jsxs)("div",{className:u()(Ao().tagBlock,_.includes(n)?Ao().defaultBlock:""),onClick:function(){return function(e){var n=e.value,r=e.desc,o="0"===n;if(s)if(S.includes(n))O(No(S.filter((function(e){return e!==n}))));else{if(9===S.length)return;S.unshift(n),O(No(S))}else{h(e),t({value:o?"1":n,desc:r},o);var a=r.unit;a=["d","w"].includes(a)?a.toUpperCase():a,(0,ko.WJ)(i(o?"kLine.cycle.realTime":"kLine.cycle.".concat(r.value).concat(a)))}}({value:n,desc:r})},children:[(0,a.jsx)("span",{children:i(o?"kLine.cycle.realTime":"kLine.cycle.".concat(r.value).concat(l))}),s&&S.includes(n)&&(0,a.jsx)(bo.Z,{icon:"check",className:Ao().choosed,style:{color:"var(--xt-color-green)"}})]},n)}))})]}),children:(0,a.jsx)("div",{className:Ao().iconWrapper,children:(0,a.jsx)("div",{className:Ao().regDown,onMouseEnter:function(){return m(!1)},onMouseLeave:function(){return m(!0)},children:(0,a.jsx)(T,{className:u()(Ao().icon,o?Ao().blackIcon:"")})})})})]})})),Ro=n(37459),Bo=n(94121);function Fo(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(c){return void n(c)}l.done?t(s):Promise.resolve(s).then(r,o)}function Vo(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Fo(i,r,o,a,l,"next",e)}function l(e){Fo(i,r,o,a,l,"throw",e)}a(void 0)}))}}var Uo="default",zo=function(e){return(0,Lr.GT)(e,Lr.B5.default)},Wo=function(e){var t=Pr.ZP.ticker.currentSymbolIdentity;return t&&zo(e).toLowerCase()===zo(t).toLowerCase()?t:e},Zo=function(e){return"".concat(e.symbol,"_").concat(e.positionSide)},Qo=function(e,t){var n=t&&zo(e.symbol).toLowerCase()===zo(t).toLowerCase()?t:e.symbol;return{id:Zo(e),symbol:n,qty:+e.positionSize,side:"LONG"===e.positionSide?1:-1,avgPrice:Number(e.entryPrice)||0,positionSize:e.positionSize,welfareAccount:e.welfareAccount,positionSide:e.positionSide}},Ho=function(e){return{format:function(t){return"number"!==typeof t||Number.isNaN(t)?"--":t.toFixed(e)}}},Go=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.chartSymbol="",this.host=t;try{this.initSync()}catch(pe){return}}var t=e.prototype;return t.setChartSymbol=function(e){this.chartSymbol=e,this.notifyHostPositionsChanged("chartSymbol")}
1,t.dispose=function(){var e,t,n;null===(e=this.disposer)||void 0===e||e.call(this),this.disposer=void 0,null===(t=this.plDisposer)||void 0===t||t.call(this),this.plDisposer=void 0,null===(n=this.visibilityDisposer)||void 0===n||n.call(this),this.visibilityDisposer=void 0},t.notifyHostPositionsChanged=function(e){try{var t=this;if(this.host.positionsFullUpdate(),!Pr.ZP.ui.tradeSetting.showPositions)return;Pr.ZP.futures.positionListWithValue.forEach((function(e){var n=Qo(e,t.chartSymbol);t.host.positionUpdate(n),t.host.plUpdate(n.id,+e.floatProfit||0)}))}catch(pe){return}},t.updatePL=function(){try{var e=this;if(!Pr.ZP.ui.tradeSetting.showPositions)return;Pr.ZP.futures.positionListWithValue.forEach((function(t){var n=Zo(t);e.host.plUpdate(n,+t.floatProfit||0)}))}catch(pe){return}},t.initSync=function(){var e,t=this;this.disposer=(0,Bo.U5)((function(){var e=Pr.ZP.ui.unit;return Pr.ZP.futures.positionListWithValue.map((function(e){return"".concat(Zo(e),"_").concat(e.positionSize,"_").concat(e.entryPrice,"_").concat(zo(e.symbol),"_").concat(e.leverage)})).join("|")+"|unit:".concat(e)}),(function(){t.notifyHostPositionsChanged("reaction")}),{fireImmediately:!0}),this.visibilityDisposer=(0,Bo.U5)((function(){return Pr.ZP.ui.tradeSetting.showPositions}),(function(){t.notifyHostPositionsChanged("visibility")})),this.plDisposer=(0,Bo.U5)((function(){return Pr.ZP.futures.positionListWithValue.map((function(t){return"".concat(Zo(t),"_").concat(null!==(e=t.floatProfit)&&void 0!==e?e:"")})).join("|")}),(function(){t.updatePL()}),{fireImmediately:!0,delay:300})},t.chartContextMenuActions=function(e,t){return Vo(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",[]);case 1:case"end":return e.stop()}}),e)})))()},t.isTradable=function(e){return Vo(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{tradable:!0});case 1:case"end":return e.stop()}}),e)})))()},t.connectionStatus=function(){return 1},t.orders=function(){return Vo(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",[]);case 1:case"end":return e.stop()}}),e)})))()},t.positions=function(){var e=this;return Vo(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Pr.ZP.ui.tradeSetting.showPositions){t.next=2;break}return t.abrupt("return",[]);case 2:return t.abrupt("return",Pr.ZP.futures.positionListWithValue.map((function(t){return Qo(t,e.chartSymbol)})));case 3:case"end":return t.stop()}}),t)})))()},t.executions=function(e){return Vo(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",[]);case 1:case"end":return e.stop()}}),e)})))()},t.editPositionBrackets=function(e,t){var n=this;return Vo(o().mark((function t(){var r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(r=n.findPositionById(e))&&n.host.positionUpdate(Qo(r));case 2:case"end":return t.stop()}}),t)})))()},t.symbolInfo=function(e){return Vo(o().mark((function t(){var n,r,i,a,l,s,c,u,d,f,h,v;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,n=Wo(e),r=Pr.ZP.ticker.getPrecision(n),i=Pr.ZP.ticker.getSymbolConfig(n),a=Number(null===i||void 0===i?void 0:i.contractSize)||1,s=null!==(l=null===r||void 0===r?void 0:r.price)&&void 0!==l?l:2,u=null!==(c=null===r||void 0===r?void 0:r.quantity)&&void 0!==c?c:3,d=Math.pow(10,-s),f=Math.pow(10,-u),h={qty:{min:f,max:1e8,step:f,uiStep:f},pipValue:d*a,pipSize:d,minTick:d,lotSize:1,units:"Qty",description:n,brokerSymbol:n},t.abrupt("return",h);case 15:return t.prev=15,t.t0=t.catch(0),v=.01,t.abrupt("return",{qty:{min:.001,max:1e8,step:.001,uiStep:.001},pipValue:v,pipSize:v,minTick:v,lotSize:1,units:"Qty",description:e,brokerSymbol:e});case 19:case"end":return t.stop()}}),t,null,[[0,15]])})))()},t.accountManagerInfo=function(){return{accountTitle:"Futures",summary:[],orderColumns:[{id:"symbol",label:"Symbol",dataFields:["symbol"]}],pages:[]}},t.formatter=function(e,t){var n,r,o=Wo(e),i=Pr.ZP.ticker.getPrecision(o);return Promise.resolve(Ho(null!==(r=null!==(n=null===i||void 0===i?void 0:i.quoteCoinDisplay)&&void 0!==n?n:null===i||void 0===i?void 0:i.price)&&void 0!==r?r:2))},t.spreadFormatter=function(e){var t,n,r=Wo(e),o=Pr.ZP.ticker.getPrecision(r);return Promise.resolve(Ho(null!==(n=null!==(t=null===o||void 0===o?void 0:o.quoteCoinDisplay)&&void 0!==t?t:null===o||void 0===o?void 0:o.price)&&void 0!==n?n:2))},t.quantityFormatter=function(e){var t=Wo(e);return Promise.resolve({format:function(e){var n;if("number"!==typeof e||Number.isNaN(e))return"--";var r=String((null===(n=Pr.ZP.ticker.symbolCurrentPriceMap)||void 0===n?void 0:n[t])||0),o=Pr.ZP.futures.getUnitAmount(String(e),t,r);return"".concat(o.amount," ").concat(o.unitView)}})},t.accountsMetainfo=function(){return Vo(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",[{id:Uo,name:"Default"}]);case 1:case"end":return e.stop()}}),e)})))()},t.currentAccount=function(){return Uo},t.findPositionById=function(e){return Pr.ZP.futures.positionListWithValue.find((function(t){return Zo(t)===e}))},t.placeOrder=function(e){return Vo(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})))()},t.modifyOrder=function(e){return Vo(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))()},t.cancelOrder=function(e){return Vo(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))()},e}(),Yo={supportPositions:!0,supportClosePosition:!0,supportReversePosition:!0,supportNativeReversePosition:!0,supportPositionBrackets:!0,supportTakeProfit:!0,supportStopLoss:!0,supportModifyBrackets:!0,supportOrderBrackets:!1,supportPLUpdate:!0,supportMarketOrders:!1,supportLimitOrders:!1,supportStopOrders:!1,supportStopLimitOrders:!1,supportExecutions:!1,supportOrdersHistory:!1,supportMultiposition:!1},Ko=n(54715),qo=n(72817),Jo=n(50314),Xo=n(12570),$o=n(46152);
1function ei(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ti=200;function ni(e){if(!(ti<=0)){ti-=1;try{(0,$o.record)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ei(e,t,n[t])}))}return e}({t:"cache_trace",project:"ssr-thanos-web"},e))}catch(pe){}}}function ri(e,t,n){e<=0||n&&Math.random()>=.01||ni({kind:"write",cause:"tvDeleteVetoed",vetoed:e,real:t,hadEvidence:n})}function oi(e,t,n){ni({kind:"write",suspect:!0,key:e,reason:t,symbol:n})}var ii=n(20014);function ai(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function li(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(c){return void n(c)}l.done?t(s):Promise.resolve(s).then(r,o)}function si(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){li(i,r,o,a,l,"next",e)}function l(e){li(i,r,o,a,l,"throw",e)}a(void 0)}))}}function ci(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ui(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ci(e,t,n[t])}))}return e}function di(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||hi(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 fi(e){return function(e){if(Array.isArray(e))return ai(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||hi(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hi(e,t){if(e){if("string"===typeof e)return ai(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ai(e,t):void 0}}var vi=new Set,pi=!1;var gi=(0,qo.fK)({name:"xt.thanos.tv.chart.futures.backup",layer:"idb",owner:"immutable pre-migration copy of the legacy futures chart blob",sizeBudget:4194304}),mi=(0,qo.fK)({name:"xt.thanos.tv.drawings.index",layer:"idb",owner:"drawing-id to symbol routing index for per-symbol drawings storage",sizeBudget:524288}),yi=null;function bi(){var e={};return ki.forEach((function(t,n){var r,o=!0,i=!1,a=void 0;try{for(var l,s=(null!==(r=t.sources)&&void 0!==r?r:[])[Symbol.iterator]();!(o=(l=s.next()).done);o=!0){var c=di(l.value,1)[0];e[c]=n}}catch(u){i=!0,a=u}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}})),e}function Ci(){return wi.apply(this,arguments)}function wi(){return(wi=si(o().mark((function e(){var t,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ko.tO.get(mi);case 2:if(null==(t=e.sent)){e.next=6;break}return yi=t,e.abrupt("return",{index:t,known:!0});case 6:if(null==yi){e.next=8;break}return e.abrupt("return",{index:yi,known:!0});case 8:return n=bi(),e.abrupt("return",{index:Object.keys(n).length>0?n:null,known:!1});case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Si(e){return Oi.apply(this,arguments)}function Oi(){return(Oi=si(o().mark((function e(t){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ko.tO.set(mi,t);case 2:yi=t;case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var xi=new Map,_i=function(e){var t=xi.get(e);return t||(t=(0,qo.fK)({name:"xt.thanos.tv.drawings.".concat(e),layer:"idb",owner:"per-symbol TradingView drawings (futures)",sizeBudget:524288}),xi.set(e,t)),t},Ti=Promise.resolve(),Pi=function(e){var t=Ti.then(e,e);return Ti=t.then((function(){}),(function(){})),t},ki=new Map,Mi=function(e,t){if(null!=t&&(Li.delete(e),ki.delete(e),ki.set(e,t),ki.size>12)){var n=ki.keys().next().value;null!=n&&ki.delete(n)}},Ii=function(e,t){if(null!=t)return t;var n=ki.get(e);return null!=n&&oi("tv.drawings","baseFromSnapshot",e),null!==n&&void 0!==n?n:null},Li=new Map,Ai=function(e){return Array.isArray(e)?e.filter((function(e){return Array.isArray(e)&&"string"===typeof e[0]})):[]},ji=function(e){if(null==e||"object"!==typeof e)return null;var t=e.data;if(null==t||"object"!==typeof t)return null;var n=t.v,r=t.sources,o=t.groups;return Array.isArray(r)?{v:"number"===typeof n?n:ii.se,sources:Ai(r),groups:Ai(o)}:null},Ni=function(e,t){return new Promise((function(n,r){var o=setTimeout((function(){return r(new Error("probe timeout"))}),t);e.then((function(e){clearTimeout(o),n(e)}),(function(e){clearTimeout(o),r(e)}))}))};function Di(e){return Ei.apply(this,arguments)}function Ei(){return Ei=si(o().mark((function e(t){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Ni(Xo.Bi.getItem(_i(t).name),1500);case 3:return n=e.sent,e.abrupt("return",null==n?{kind:"absent"}:{kind:"present",record:ji(n)});case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",{kind:"unknown"});case 10:case"end":return e.stop()}}),e,null,[[0,7]])}))),Ei.apply(this,arguments)}function Ri(e,t,n){return"present"===t.kind?null!=t.record?(Mi(e,t.record),function(e,t,n){ni({kind:"read",recovered:!0,key:e,reason:t,symbol:n})}("tv.drawings",n,e),"baseline"):(Li.set(e,{reason:"lostRecord",at:Date.now()}),oi("tv.drawings","readLostRecord",e),"lostRecord"):"unknown"===t.kind?(Li.set(e,{reason:"probeUnavailable",at:Date.now()}),oi("tv.drawings","probeUnavailable",e),"probeUnavailable"):(Li.delete(e),"absent")}function Bi(e){return Fi.apply(this,arguments)}function Fi(){return Fi=si(o().mark((function e(t){var n,r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!ki.has(t)){e.next=2;break}return e.abrupt("return",!0);case 2:if("lostRecord"!==(null===(n=Li.get(t))||void 0===n?void 0:n.reason)){e.next=5;break}return e.abrupt("return",!0);case 5:if(!(null!=n&&Date.now()-n.at<5e3)){e.next=7;break}return e.abrupt("return",!1);case 7:return e.t0=Ri,e.t1=t,e.next=11,Di(t);case 11:return e.t2=e.sent,r=(0,e.t0)(e.t1,e.t2,"baselineBeforeWrite"),e.abrupt("return","probeUnavailable"!==r);case 14:case"end":return e.stop()}}),e)}))),Fi.apply(this,arguments)}function Vi(e,t){return Ui.apply(this,arguments)}function Ui(){return Ui=si(o().mark((function e(t,n){var r,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Bi(t);case 2:if(e.sent){e.next=4;break}return e.abrupt("return",!1);case 4:return r=null,e.prev=5,e.next=8,Ko.tO.get(_i(t));case 8:r=e.sent,e.next=14;break;case 11:e.prev=11,e.t0=e.catch(5),r=null;case 14:return i=n(Ii(t,r)),e.next=17,Ko.tO.set(_i(t),i);case 17:return Mi(t,i),e.abrupt("return",!0);case 19:case"end":return e.stop()}}),e,null,[[5,11]])}))),Ui.apply(this,arguments)}var zi=null;var Wi,Zi,Qi=null,Hi=function(){return Qi||(Qi=si(o().mark((function e(){var t;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Ko.tO.get(gi);case 3:return t=e.sent,e.abrupt("return",null==t?null:(0,ii.fk)(t));case 7:return e.prev=7,e.t0=e.catch(0),Qi=null,e.abrupt("return",null);case 11:case"end":return e.stop()}}),e,null,[[0,7]])})))()),Qi},Gi=function(e,t){return{sources:new Map(t.sources),groups:new Map(t.groups),symbol:e}},Yi=new Map;function Ki(e){return qi.apply(this,arguments)}function qi(){return qi=si(o().mark((function e(t){var n,r,i,a,l,s,c,u;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(0,ii.CQ)(t)){e.next=3;break}return e.abrupt("return",{state:null,known:!1});case 3:return r="".concat((0,Jo.Vm)(),"|").concat(n),null==(i=Yi.get(r))&&(a=Ji(n),i=a,Yi.set(r,a),l=function(){return Yi.delete(r)},a.then(l,l)),e.next=8,i;case 8:return s=e.sent,c=s.record,u=s.known,e.abrupt("return",{state:null==c?null:Gi(n,c),known:u});case 12:case"end":return e.stop()}}),e)}))),qi.apply(this,arguments)}function Ji(e){return Xi.apply(this,arguments)}function Xi(){return Xi=si(o().mark((function e(t){var n,r,i,a,l;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=null,e.prev=2,e.next=5,Ko.tO.get(_i(t));case 5:n=e.sent,e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),n=null;case 11:if(null==n){e.next=16;break}return Li.delete(t),Mi(t,n),$i(t,n),e.abrupt("return",{record:n,known:!0});case 16:return e.next=18,Di(t);case 18:if(r=e.sent,i=Ri(t,r,"baseFromProbe"),"present"!==r.kind||null==r.record){e.next=22;break}return e.abrupt("return",{record:r.record,known:!0});case 22:if("probeUnavailable"!==i){e.next=24;break}return e.abrupt("return",{record:null,known:!1});case 24:return e.next=26,Hi();case 26:if(a=e.sent,l=null===a||void 0===a?void 0:a.get(t)){e.next=30;break}return e.abrupt("return",{record:null,known:"absent"===i});case 30:return e.next=32,Pi(si(o().mark((function e(){var n,r,i,a,s,c,u,d,f;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ko.tO.set(_i(t),l);case 2:return e.t0=ui,e.t1={},e.next=7,Ci();case 7:if(e.t3=n=e.sent.index,e.t2=null!==e.t3,!e.t2){e.next=11;break}e.t2=void 0!==n;case 11:if(!e.t2){e.next=15;break}e.t4=n,e.next=16;break;case 15:e.t4={};case 16:for(e.t5=e.t4,r=(0,e.t0)(e.t1,e.t5),i=!0,a=!1,s=void 0,e.prev=19,c=l.sources[Symbol.iterator]();!(i=(u=c.next()).done);i=!0)d=di(u.value,1),f=d[0],r[f]=t;e.next=27;break;case 23:e.prev=23,e.t6=e.catch(19),a=!0,s=e.t6;case 27:e.prev=27,e.prev=28,i||null==c.return||c.return();case 30:if(e.prev=30,!a){e.next=33;break}throw s;case 33:return e.finish(30);case 34:return e.finish(27);case 35:return e.next=37,Si(r);case 37:case"end":return e.stop()}}),e,null,[[19,23,27,35],[28,,30,34]])}))));case 32:return Mi(t,l),e.abrupt("return",{record:l,known:!0});case 36:return e.prev=36,e.t1=e.catch(0),e.abrupt("return",{record:null,known:!1});case 39:case"end":return e.stop()}}),e,null,[[0,36],[2,8]])}))),Xi.apply(this,arguments)}function $i(e,t){return ea.apply(this,arguments)}function ea(){return ea=si(o().mark((function e(t,n){var r,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==(i=new Set((null!==(r=n.sources)&&void 0!==r?r:[]).map((function(e){return di(e,1)[0]})))).size){e.next=4;break}return e.abrupt("return");case 4:return e.next=6,Pi(si(o().mark((function e(){var n,r,a,l,s,c,u,d,f,h,v,p,g,m,y,b,C,w;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Ci();case 3:for(n=e.sent,a=null!==(r=n.index)&&void 0!==r?r:{},l=ui({},a),s=!n.known,c=!0,u=!1,d=void 0,e.prev=9,f=Object.entries(a)[Symbol.iterator]();!(c=(h=f.next()).done);
1c=!0)v=di(h.value,2),p=v[0],v[1]!==t||i.has(p)||(delete l[p],s=!0);e.next=17;break;case 13:e.prev=13,e.t0=e.catch(9),u=!0,d=e.t0;case 17:e.prev=17,e.prev=18,c||null==f.return||f.return();case 20:if(e.prev=20,!u){e.next=23;break}throw d;case 23:return e.finish(20);case 24:return e.finish(17);case 25:for(g=!0,m=!1,y=void 0,e.prev=26,b=i[Symbol.iterator]();!(g=(C=b.next()).done);g=!0)w=C.value,l[w]!==t&&(l[w]=t,s=!0);e.next=34;break;case 30:e.prev=30,e.t1=e.catch(26),m=!0,y=e.t1;case 34:e.prev=34,e.prev=35,g||null==b.return||b.return();case 37:if(e.prev=37,!m){e.next=40;break}throw y;case 40:return e.finish(37);case 41:return e.finish(34);case 42:if(!s){e.next=45;break}return e.next=45,Si(l);case 45:e.next=49;break;case 47:e.prev=47,e.t2=e.catch(0);case 49:case"end":return e.stop()}}),e,null,[[0,47],[9,13,17,25],[18,,20,24],[26,30,34,42],[35,,37,41]])}))));case 6:case"end":return e.stop()}}),e)}))),ea.apply(this,arguments)}var ta=function(e,t,n){return{v:null!==(Wi=null===e||void 0===e?void 0:e.v)&&void 0!==Wi?Wi:ii.se,sources:fi(t.entries()),groups:n?fi(n.entries()):null!==(Zi=null===e||void 0===e?void 0:e.groups)&&void 0!==Zi?Zi:[]}};function na(e,t,n){return ra.apply(this,arguments)}function ra(){return ra=si(o().mark((function e(t,n,r){var i,a,l,s,c,u,d,f,h,v,p,g,m,y,b,C,w,S,O,x,_,T,P,k,M,I,L,A,j,N,D,E,R,B;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==t.size||0!==n.length){e.next=2;break}return e.abrupt("return");case 2:if(e.prev=2,i={},!(n.length>0)){e.next=24;break}return e.prev=5,e.next=9,Ci();case 9:if(e.t1=a=e.sent.index,e.t0=null!==e.t1,!e.t0){e.next=13;break}e.t0=void 0!==a;case 13:if(!e.t0){e.next=17;break}e.t2=a,e.next=18;break;case 17:e.t2={};case 18:i=e.t2,e.next=24;break;case 21:e.prev=21,e.t3=e.catch(5),i={};case 24:l=new Map,s=!0,c=!1,u=void 0,e.prev=26,d=n[Symbol.iterator]();case 28:if(s=(f=d.next()).done){e.next=42;break}if(h=f.value,v=i[h]){e.next=33;break}return e.abrupt("continue",39);case 33:if(r.has(v)){e.next=35;break}return e.abrupt("continue",39);case 35:(g=null!==(p=l.get(v))&&void 0!==p?p:[]).push(h),l.set(v,g);case 39:s=!0,e.next=28;break;case 42:e.next=48;break;case 44:e.prev=44,e.t4=e.catch(26),c=!0,u=e.t4;case 48:e.prev=48,e.prev=49,s||null==d.return||d.return();case 51:if(e.prev=51,!c){e.next=54;break}throw u;case 54:return e.finish(51);case 55:return e.finish(48);case 56:m=new Set,t.forEach((function(e,t){return m.add(t)})),l.forEach((function(e,t){return m.add(t)})),y=new Map,b=[],C=!0,w=!1,S=void 0,e.prev=62,O=m[Symbol.iterator]();case 64:if(C=(x=O.next()).done){e.next=79;break}return _=x.value,P=t.get(_),k=l.get(_),e.next=71,Vi(_,(function(e){var t,n=new Map(null!==(t=null===e||void 0===e?void 0:e.sources)&&void 0!==t?t:[]),r=!0,o=!1,i=void 0;if(P)try{for(var a,l=P[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){var s=di(a.value,2),c=s[0],u=s[1];n.set(c,u)}}catch(m){o=!0,i=m}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}var d=!0,f=!1,h=void 0;if(k)try{for(var v,p=k[Symbol.iterator]();!(d=(v=p.next()).done);d=!0){var g=v.value;n.delete(g)}}catch(m){f=!0,h=m}finally{try{d||null==p.return||p.return()}finally{if(f)throw h}}return ta(e,n)}));case 71:if(e.sent){e.next=74;break}return e.abrupt("continue",76);case 74:P&&y.set(_,P),k&&(T=b).push.apply(T,fi(k));case 76:C=!0,e.next=64;break;case 79:e.next=85;break;case 81:e.prev=81,e.t5=e.catch(62),w=!0,S=e.t5;case 85:e.prev=85,e.prev=86,C||null==O.return||O.return();case 88:if(e.prev=88,!w){e.next=91;break}throw S;case 91:return e.finish(88);case 92:return e.finish(85);case 93:if(0!==y.size||0!==b.length){e.next=95;break}return e.abrupt("return");case 95:return e.prev=96,e.next=99,Ci();case 99:M=e.sent,e.next=105;break;case 102:return e.prev=102,e.t6=e.catch(96),e.abrupt("return");case 105:L=ui({},null!==(I=M.index)&&void 0!==I?I:{}),A=!M.known,y.forEach((function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var l=di(i.value,1)[0];L[l]!==t&&(L[l]=t,A=!0)}}catch(s){r=!0,o=s}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}})),j=!0,N=!1,D=void 0,e.prev=110,E=b[Symbol.iterator]();case 112:if(j=(R=E.next()).done){e.next=121;break}if((B=R.value)in L){e.next=116;break}return e.abrupt("continue",118);case 116:delete L[B],A=!0;case 118:j=!0,e.next=112;break;case 121:e.next=127;break;case 123:e.prev=123,e.t7=e.catch(110),N=!0,D=e.t7;case 127:e.prev=127,e.prev=128,j||null==E.return||E.return();case 130:if(e.prev=130,!N){e.next=133;break}throw D;case 133:return e.finish(130);case 134:return e.finish(127);case 135:if(!A){e.next=138;break}return e.next=138,Si(L);case 138:e.next=142;break;case 140:e.prev=140,e.t8=e.catch(2);case 142:case"end":return e.stop()}}),e,null,[[2,140],[5,21],[26,44,48,56],[49,,51,55],[62,81,85,93],[86,,88,92],[96,102],[110,123,127,135],[128,,130,134]])}))),ra.apply(this,arguments)}function oa(e,t){return ia.apply(this,arguments)}function ia(){return(ia=si(o().mark((function e(t,n){var r,i,a,l,s,c,u,d,f,h;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(0,ii.h)(t,null!==n&&void 0!==n?n:null===t||void 0===t?void 0:t.symbol),i=r.upserts,a=r.deletions,l=r.groups,s=r.groupsSymbol,c=a.length>0?(0,Jo.Kf)():null,u=null==c?a:(0,ii.VR)(a,c.ids),f=null!==(d=null===c||void 0===c?void 0:c.served)&&void 0!==d?d:vi,ri(a.length-u.length,u.length,null!=(null===c||void 0===c?void 0:c.ids)),h=l.length>0&&null!=s,0!==i.size||0!==u.length||h){e.next=9;break}return e.abrupt("return");case 9:return e.next=11,Pi(si(o().mark((function e(){var t,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,na(i,u,f);
1case 2:if(h){e.next=4;break}return e.abrupt("return");case 4:return t=s,e.prev=5,e.next=9,Vi(t,(function(e){return ta(e,new Map(null!==(n=null===e||void 0===e?void 0:e.sources)&&void 0!==n?n:[]),new Map(l))}));case 9:e.next=13;break;case 11:e.prev=11,e.t0=e.catch(5);case 13:case"end":return e.stop()}}),e,null,[[5,11]])}))));case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function aa(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(c){return void n(c)}l.done?t(s):Promise.resolve(s).then(r,o)}var la="futures-main",sa={saveLineToolsAndGroups:function(e,t,n,r){return oa(n,null===r||void 0===r?void 0:r.symbol)},loadLineToolsAndGroups:function(e,t,n,r){return function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){aa(i,r,o,a,l,"next",e)}function l(e){aa(i,r,o,a,l,"throw",e)}a(void 0)}))}}(o().mark((function e(){var t,i,a,l,s,c,u,d,f,h;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("mainSeriesLineTools"===n){e.next=2;break}return e.abrupt("return",null);case 2:return t=(0,Jo.Vm)(),e.next=5,Ki(null===r||void 0===r?void 0:r.symbol);case 5:if(i=e.sent,a=i.state,i.known&&(0,Jo.au)((0,ii.CQ)(null===r||void 0===r?void 0:r.symbol),t),a){e.next=11;break}return e.abrupt("return",null);case 11:if(o=a.groups,v=Map,!(l=null!=v&&"undefined"!==typeof Symbol&&v[Symbol.hasInstance]?!!v[Symbol.hasInstance](o):o instanceof v)){e.next=38;break}s=!0,c=!1,u=void 0,e.prev=14,d=a.groups.values()[Symbol.iterator]();case 16:if(s=(f=d.next()).done){e.next=24;break}if(null!=(h=f.value)&&"object"===typeof h){e.next=21;break}return l=!1,e.abrupt("break",24);case 21:s=!0,e.next=16;break;case 24:e.next=30;break;case 26:e.prev=26,e.t0=e.catch(14),c=!0,u=e.t0;case 30:e.prev=30,e.prev=31,s||null==d.return||d.return();case 33:if(e.prev=33,!c){e.next=36;break}throw u;case 36:return e.finish(33);case 37:return e.finish(30);case 38:return e.abrupt("return",{sources:a.sources,groups:l?a.groups:new Map});case 39:case"end":return e.stop()}var o,v}),e,null,[[14,26,30,38],[31,,33,37]])})))()},getAllCharts:function(){return Promise.resolve([])},removeChart:function(){return Promise.resolve()},saveChart:function(e){return Promise.resolve(la)},getChartContent:function(){return Promise.resolve("")},getAllStudyTemplates:function(){return Promise.resolve([])},removeStudyTemplate:function(e){return Promise.resolve()},saveStudyTemplate:function(e){return Promise.resolve()},getStudyTemplateContent:function(){return Promise.resolve("")},getDrawingTemplates:function(){return Promise.resolve([])},loadDrawingTemplate:function(){return Promise.resolve("")},removeDrawingTemplate:function(){return Promise.resolve()},saveDrawingTemplate:function(){return Promise.resolve()},getChartTemplateContent:function(){return Promise.resolve({})},getAllChartTemplates:function(){return Promise.resolve([])},saveChartTemplate:function(){return Promise.resolve()},removeChartTemplate:function(){return Promise.resolve()}},ca=function(e,t){if(!e)return!1;try{var n=1,r=!0;try{n=e.chartsCount()}catch(pe){n=1,r=!1}for(var o=0;o<n;o++){var i=e.chart(o).getLineToolsState().sources;i&&"function"===typeof i.forEach?i.forEach((function(e,n){return t(String(n),e)})):r=!1}return r}catch(pe){return!1}};function ua(e){var t,n=function(e){try{e.saveChartToServer(void 0,void 0,{chartName:la})}catch(pe){}},r=function(){if(Jo.pV.drawingsWritable){var t=e();t&&function(e){var t=0;
1return ca(e,(function(e,n){null==n&&t++})),t}(t)>=40&&n(t)}};return{flushNow:function(){if(Jo.pV.drawingsWritable){var t=e();t&&n(t)}},flushLiveSnapshot:function(){var t=function(e){var t=new Map;return ca(e,(function(e,n){null!=n&&t.set(e,n)}))?t:null}(e());(0,Jo.p$)(null==t?null:new Set(t.keys())),Jo.pV.drawingsWritable&&null!=t&&0!==t.size&&oa({sources:t})},start:function(){null==t&&(t=setInterval(r,3e4))},stop:function(){null!=t&&(clearInterval(t),t=void 0)},readLiveToolIds:function(){return function(e){var t=new Set;return ca(e,(function(e,n){null!=n&&t.add(e)}))?t:null}(e())}}}function da(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function fa(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(c){return void n(c)}l.done?t(s):Promise.resolve(s).then(r,o)}function ha(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){fa(i,r,o,a,l,"next",e)}function l(e){fa(i,r,o,a,l,"throw",e)}a(void 0)}))}}function va(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){va(e,t,n[t])}))}return e}function ga(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||ya(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 ma(e){return function(e){if(Array.isArray(e))return da(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ya(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ya(e,t){if(e){if("string"===typeof e)return da(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?da(e,t):void 0}}var ba=l.Px.useTranslation,Ca={1440:"1D",2880:"2D",4320:"3D",10080:"1W",43200:"1M"},wa=function(e){return{en:"en",ko:"ko",ja:"ja",hi:"id_ID",id:"id_ID",ru:"ru",es:"es",hk:"zh",cn:"zh"}[e]||"en"};f().extend(v());var Sa=(0,p.Pi)((function(e){var t,n,r,i,l,c=e.containerId,d=e.symbol,h=e.rawSymbol,v=void 0===h?"":h,p=e.showTheme,S=e.disabledFeature,O=void 0===S?[]:S,x=e.hasOrder,_=void 0===x||x,P=e.fromIndex,k=void 0!==P&&P,I=e.tradingViewKey,L=e.refPriceAlert,j=void 0===L?null:L,N=e.widgetRef,R=e.visible,B=void 0===R||R,F=ba().t,V=(0,g.useState)(!0),U=V[0],z=V[1],W=(0,g.useRef)(),Z=(0,g.useRef)(),Q=(0,g.useRef)(),H=(0,g.useRef)(null),G=null!==(l=function(e){if(e){var t=Ca[e]||e,n=Kr.G5.find((function(e){return e.value===t}));return n?pa({},n):void 0}}(null===(t=Ko.tO.getSync(qo.XP.tv.prefs))||void 0===t?void 0:t.defaultResolution))&&void 0!==l?l:Kr.TQ,Y=(0,g.useState)(G),K=Y[0],q=Y[1],J=(0,g.useState)(!1),X=J[0],$=J[1],ee=(0,g.useRef)(void 0),te=(0,g.useState)(!1),ne=te[0],re=te[1];(0,g.useEffect)((function(){try{var e,t;null===(e=navigator.storage)||void 0===e||null===(t=e.persist)||void 0===t||t.call(e)}catch(pe){}Jo.pV.hydrated=!1,Jo.pV.authoritative=!1,Jo.pV.drawingsWritable=!1,function(){if(!pi){pi=!0;try{var e,t,n="undefined"!==typeof navigator?navigator:void 0;null===n||void 0===n||null===(e=n.storage)||void 0===e||null===(t=e.persist)||void 0===t||t.call(e)}catch(pe){}}}();var n=!1,r=function(e){n||(n=!0,ee.current=null!==e&&void 0!==e?e:void 0,re(!0))},i=setTimeout((function(){return r(void 0)}),3e3);return Promise.all([Ko.tO.get(qo.XP.tv.chartFutures),(0,Ro.qu)()]).then((function(e){var t=ga(e,1)[0];Jo.pV.hydrated=!0,null!=t&&function(e){if(null!=e&&!Qi){var t=(0,ii.fk)(e);t.size>0&&(Qi=Promise.resolve(t))}zi||(zi=si(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Ko.tO.get(gi);case 3:if(null!=t.sent){t.next=7;break}return t.next=7,Ko.tO.set(gi,e);case 7:t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),zi=null;case 12:case"end":return t.stop()}}),t,null,[[0,9]])})))())}(t),n?null!=t&&(ee.current=t,Ot(!0)):r(t)}
1)).catch((function(){return r(void 0)})),function(){return clearTimeout(i)}}),[]);var oe,ie=(0,g.useCallback)((function(e){if(Jo.pV.authoritative){var t=e;try{t=JSON.parse(JSON.stringify(e)),(0,ii.g5)(t)}catch(pe){t=e}ee.current=t,Ko.tO.set(qo.XP.tv.chartFutures,t).catch((function(){}))}}),[]),ae=(0,g.useRef)();ae.current||(ae.current=ua((function(){return W.current}))),(0,g.useEffect)((function(){return(0,Jo.SR)((function(){var e;return null!==(oe=null===(e=ae.current)||void 0===e?void 0:e.readLiveToolIds())&&void 0!==oe?oe:null}))}),[]),(0,g.useEffect)((function(){var e=function(){var e;if(null===(e=ae.current)||void 0===e||e.flushNow(),null!=Te.current){clearTimeout(Te.current),Te.current=void 0;try{var t;null===(t=W.current)||void 0===t||t.save(ie)}catch(pe){}}},t=function(){"hidden"===document.visibilityState&&e()};return window.addEventListener("pagehide",e),document.addEventListener("visibilitychange",t),function(){window.removeEventListener("pagehide",e),document.removeEventListener("visibilitychange",t)}}),[ie]);var le=(0,g.useRef)((new Date).getTime()),se=(0,g.useState)(!1),ue=se[0],de=se[1],fe=(0,g.useState)(d),he=fe[0],ve=fe[1],ge=(0,g.useState)(0),me=ge[0],ye=ge[1],be=(0,g.useState)(0),Ce=be[0],we=be[1],Se=(0,g.useRef)(!1),Oe=(0,g.useRef)(!1),xe=(0,g.useRef)(!1),_e=(0,g.useRef)(1),Te=(0,g.useRef)(),Pe=(0,g.useRef)(null),ke=(0,_r.Gn)(W).setKlineLoading;(0,g.useEffect)((function(){ke(ue)}),[ue]);var Me=(0,g.useMemo)((function(){try{var e,t,n,r=null!==(n=null===(e=W.current)||void 0===e?void 0:e.chart(me))&&void 0!==n?n:null===(t=W.current)||void 0===t?void 0:t.chart(0),o=null===r||void 0===r?void 0:r.symbol();if(o){var i=r.resolution(),a=Kr.G5.find((function(e){return e.value===i}));return{symbol:function(e){return(e.includes(":")?e.split(":")[1]:e).toLowerCase()}(o),resolution:null!==a&&void 0!==a?a:K}}}catch(pe){}return{symbol:he,resolution:K}}),[me,Ce,he,ue,K]),Ie=(0,g.useState)(!1),Le=Ie[0],Ae=Ie[1],je=(0,g.useRef)(-1),Ne=(0,g.useRef)(0),De=(0,g.useRef)(-1),Ee=(0,Pr.oR)(),Re=Ee.ticker,Be=Ee.account,Fe=Ee.futures,Ve=Ee.entrust,Ue=(Ee.position,Ee.ui),ze=Ue.chartFullScreen,We=Ue.theme,Ze=Ue.upDownTheme,Qe=Ue.hasQuickTrading,He=Ue.tradeSetting,Ge=Ue.setTradeSetting,Ye=Ue.isXs,Ke=Ue.setTradingViewLoaded,qe=Ue.openGlobalModal,Je=Fe.symbolSocket,Xe=Fe.isPremarketBySymbol,$e=Be.lang,et=Be.isLogin,tt=Ze,nt=Re.getPrecision(d).price,rt=p||We,ot=(0,Gr.Q)(),it=ot.reversePositionConfirm,at=ot.closeOrderForMarket,lt=(0,g.useCallback)(function(){var e=ha(o().mark((function e(t,n){var r,i,a,l,s,c,u,d,f,h,v,p,g;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=Fe.positionListWithValue,a=i.find((function(e){return"".concat(e.symbol,"_").concat(e.positionSide)===t.id}))){e.next=5;break}return e.abrupt("return",!1);case 5:return l=Number(a.entryPrice)||0,s="LONG"===a.positionSide,u=null!==(c=null===(r=Re.getPrecision(a.symbol))||void 0===r?void 0:r.price)&&void 0!==c?c:2,d=Ve.profitList.find((function(e){return e.symbol===a.symbol&&e.positionSide===a.positionSide&&"ALL"===e.closeType&&!e.mmrThreshold})),h=null!==(f=null===n||void 0===n?void 0:n.takeProfit)&&void 0!==f?f:Number(null===d||void 0===d?void 0:d.triggerProfitPrice)||void 0,p=null!==(v=null===n||void 0===n?void 0:n.stopLoss)&&void 0!==v?v:Number(null===d||void 0===d?void 0:d.triggerStopPrice)||void 0,null!=(g=(0,Ir.hm)({triggerProfitPrice:h,triggerStopPrice:p,entryPrice:l,latestPrice:Re.latestPriceMap[a.symbol],isLong:s,pricePrecision:u,leverage:a.leverage,isCoinBased:"COIN_BASED"===Re.getSymbolUnderlyingType(a.symbol)})).triggerProfitPrice&&(h=g.triggerProfitPrice),null!=g.triggerStopPrice&&(p=g.triggerStopPrice),qe(Hr.w.STOP_PROFIT_LOSS,pa({},a,{record:a,type:0,tabOrigin:Yr.C0.ALL,triggerStopPrice:p,triggerProfitPrice:h,initialChanged:!0,gslDirectionCheck:!0,triggerStopPriceBeforeDrag:null===d||void 0===d?void 0:d.triggerStopPrice})),e.abrupt("return",!1);case 19:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),[qe]),st=(0,g.useMemo)((function(){var e,t=null===(e=Me.symbol)||void 0===e?void 0:e.includes("_index");return k?Xe(v)&&t:Xe(d)&&t}),[k,v,d,Me]),ct=(0,g.useMemo)((function(){var e=pa({},Re.precisionMap),t=e[v];return v&&!t&&(e[d]=e[v]),e}),[Re.precisionMap,v]),ut=(0,g.useCallback)((function(){var e,t,n,r,o;
1if(null===(e=ae.current)||void 0===e||e.flushLiveSnapshot(),null===(t=ae.current)||void 0===t||t.flushNow(),(0,Jo._x)(),null===(n=ae.current)||void 0===n||n.stop(),null!=Te.current){clearTimeout(Te.current),Te.current=void 0;try{var i;null===(i=W.current)||void 0===i||i.save(ie)}catch(pe){}}Jo.pV.authoritative=!1,Jo.pV.drawingsWritable=!1,N&&(N.current=void 0),null===(r=Z.current)||void 0===r||r.dispose(),Z.current=void 0,null===(o=Q.current)||void 0===o||o.stop(),Q.current=void 0,clearTimeout(Te.current);var a=function(e){var t;e&&((null===(t=e.context_menu)||void 0===t?void 0:t.items_processor)&&(e.context_menu.items_processor=null),null===e||void 0===e||e.remove())};a(W.current),a(window.tvWidget),W.current=void 0,window.tvWidget=void 0;var l=document.getElementById(c);l&&(l.innerHTML="")}),[]),dt=(0,g.useCallback)((function(){var e,t,n,r=W.current;if(r&&"undefined"!==typeof document){window.dispatchEvent(new Event("resize"));var o=null===(n=null===(e=document.getElementById(c))||void 0===e||null===(t=e.children)||void 0===t?void 0:t[0])||void 0===n?void 0:n.contentWindow;null===o||void 0===o||o.dispatchEvent(new Event("resize"));try{r.chartsCount()>1&&r.resetLayoutSizes(!0)}catch(pe){}}}),[c]),ft=(0,g.useCallback)(function(){var e=ha(o().mark((function e(t){var n,r,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Fe.positionListWithValue,r=n.find((function(e){return e.symbol===t.symbol&&e.positionSide===t.positionSide})),i=null!==r&&void 0!==r?r:t,qe(Hr.w.COMMON_CONFIRM,{text:F("tip.stopAllPositionTip"),onOk:function(){return at(i)}}),e.abrupt("return",!1);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[]),ht=(0,g.useCallback)(function(){var e=ha(o().mark((function e(t){var n,r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Fe.positionListWithValue,r=n.find((function(e){return e.symbol===t.symbol&&e.positionSide===t.positionSide})),it(null!==r&&void 0!==r?r:t),e.abrupt("return",!1);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[]),vt=function(e){var t,n,r,i,a,l;if(!ue&&W.current)if("indicator"!==e)if("setting"!==e)if("shot"!==e){if(r=e,(null!=(i=Object)&&"undefined"!==typeof Symbol&&i[Symbol.hasInstance]?i[Symbol.hasInstance](r):r instanceof i)&&"type"===e.key)return null===(t=W.current)||void 0===t||t.activeChart().setChartType(e.value),_e.current=e.value,void(null===(n=W.current)||void 0===n||n.save(ie))}else ha(o().mark((function e(){var t,n,r,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=4,null===(t=W.current)||void 0===t?void 0:t.takeClientScreenshot();case 4:if(n=e.sent){e.next=7;break}return e.abrupt("return");case 7:r=n.toDataURL("image/png"),(i=document.createElement("a")).href=r,i.download="tradingview-".concat(Date.now(),".png"),i.click(),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(0);case 17:case"end":return e.stop()}}),e,null,[[0,14]])})))();else null===(a=W.current)||void 0===a||a.activeChart().executeActionById("chartProperties");else null===(l=W.current)||void 0===l||l.activeChart().executeActionById("insertIndicator")},pt=function(e){var t,n;e?null===(t=W.current)||void 0===t||t.activeChart().setChartType(3):null===(n=W.current)||void 0===n||n.activeChart().setChartType(_e.current);Ko.tO.update(qo.XP.tv.prefs,(function(t){return pa({},null!==t&&void 0!==t?t:{},{showTimeline:e})})).catch((function(){})),$(e)},gt=function(e){var t,n,r;if("Light"===rt){var o=document.getElementsByTagName("iframe")[0],i=null===o||void 0===o?void 0:o.contentDocument.getElementsByClassName("pane-separator")[0];i&&(i.style.backgroundColor="rgba(0, 0, 0, 0.1)")}null===(t=Pe.current)||void 0===t||t.changeType(null===(n=W.current)||void 0===n?void 0:n.activeChart().chartType());var a,l,s,c=e||{},u=c.resetChartType,d=void 0===u||u,f=c.keepTimeScale,h=null===(r=W.current)||void 0===r?void 0:r.activeChart();d&&(3!==(null===(a=W.current)||void 0===a?void 0:a.activeChart().chartType())&&"1"!==(null===(l=W.current)||void 0===l?void 0:l.activeChart().resolution())&&(_e.current=null===(s=W.current)||void 0===s?void 0:s.activeChart().chartType()));if(f){var v=null===h||void 0===h?void 0:h.getVisibleRange();h.setVisibleRange(v)}else{var p;null===(p=W.current)||void 0===p||p.activeChart().executeActionById("timeScaleReset")}de(!1),Ke(!0)};(0,g.useEffect)((function(){var e;return ue||(e=setTimeout((function(){dt()}),200)),function(){clearTimeout(e)}}),[ue,dt]);var mt=Mr().syncSymbolFromChart,yt=function(e){try{if(Se.current)return;if(Ke(!1),!d)return;if(!(e||!W.current)){var t,n;null===(t=ae.current)||void 0===t||t.flushNow();try{var r,i,a,l=function(e){return(e.includes(":")?e.split(":")[1]:e).toLowerCase()},s=l(null!==(a=null===(i=null===(r=W.current)||void 0===r?void 0:r.activeChart())||void 0===i?void 0:i.symbol())&&void 0!==a?a:"");if(s&&s===l(null!==he&&void 0!==he?he:""))return}catch(pe){}var u=1;try{var f,h;u=null!==(h=null===(f=W.current)||void 0===f?void 0:f.chartsCount())&&void 0!==h?h:1}catch(A){}var v=!1,p=!1;if(u>1)try{var g,b,C,w=function(e){var t=(e.includes(":")?e.split(":")[1]:e).toLowerCase().replace(/_(index|mark)$/,"");return t.includes("_")?t:"".concat(t,"_usdt")},S=w(null!==(C=null===(b=null===(g=W.current)||void 0===g?void 0:g.activeChart())||void 0===b?void 0:b.symbol())&&void 0!==C?C:""),O=w(null!==he&&void 0!==he?he:""),x=Re.getSymbolUnderlyingType(S),T=Re.getSymbolUnderlyingType(O);null!=x&&null!=T&&(v=x===T,p=x!==T)}catch(pe){}if((u<=1||!v)&&de(!0),u>1&&p)try{for(var P=0;P<u;P++)P!==W.current.activeChartIndex()&&W.current.chart(P).setSymbol(he,{doNotActivateChart:!0})}catch(pe){}return Oe.current=!0,void(null===(n=W.current)||void 0===n||n.setSymbol(he,K.value,(function(){Oe.current=!1,gt(),we((function(e){return e+1}))})))}ut();var M=bt();if(!M)return;var I=(new Date).getTime();le.current=I;var L=new Zr(M);Jo.pV.authoritative=Jo.pV.hydrated,L.onChartReady((function(){if(setTimeout((function(){M.saved_data&&!k?gt({resetChartType:!1}):L.setSymbol(he,K.value,(function(){return gt({resetChartType:!1})})),L.chart().executeActionById("chartReset")}),0),L.applyOverrides(pa({},Kr.hb,(0,Ro.yp)(Ze,!0),rt===y.b.DARK?Kr.js:Kr.A0,{"tradingProperties.horizontalAlignment":0,"tradingProperties.extendLeft":!1,"tradingProperties.lineLength":100})),L.applyStudiesOverrides((0,Ro.Pl)(tt,rt)),!k){var e,t=function(){clearTimeout(Te.current),Te.current=setTimeout((function(){Te.current=void 0,function(){var e;null===(e=W.current)||void 0===e||e.save(ie)}()}),500)};L.subscribe("undo_redo_state_changed",t),L.subscribe("layout_changed",t),L.subscribe("study_event",t),Jo.pV.drawingsWritable=!0,L.subscribe("onAutoSaveNeeded",(function(){if(Jo.pV.drawingsWritable)try{L.saveChartToServer(void 0,void 0,{chartName:la})}catch(pe){}})),null===(e=ae.current)||void 0===e||e.start()}if(L.subscribe("onPlusClick",(function(e){var t,n,r,o,i,a;if(Ae(!1),_){var l,s=d;try{var u=L.activeChart().symbol();if(u){var f=u.includes(":")?u.split(":")[1]:u;s=(0,Lr.GT)(f.toLowerCase(),Lr.B5.default)}}catch(pe){}var h,v,p,g=null!==(l=null===(t=Re.getPrecision(s))||void 0===t?void 0:t.price)&&void 0!==l?l:nt,y=null===(o=null===(n=document.getElementById(c))||void 0===n||null===(r=n.children)||void 0===r?void 0:r[0])||void 0===o?void 0:o.getBoundingClientRect(),b=null===(i=H.current)||void 0===i||null===(a=i.parentElement)||void 0===a?void 0:a.getBoundingClientRect();De.current=Math.max((null!==(h=null===y||void 0===y?void 0:y.left)&&void 0!==h?h:0)+e.clientX,0),je.current=Math.max((null!==(v=null===y||void 0===y?void 0:y.top)&&void 0!==v?v:0)-(null!==(p=null===b||void 0===b?void 0:b.top)&&void 0!==p?p:0)+e.clientY,0),Ne.current=Number(new m.Z(e.price||0).toFixed(g))}})),L.subscribe("activeChartChanged",(function(e){ye(e);try{var t,n=L.chart(e).chartType();if(void 0!==n)null===(t=Pe.current)||void 0===t||t.changeType(n),_e.current=n}catch(pe){}try{var r=L.chart(e).symbol();if(r){if(Oe.current)return;Se.current=!0,mt(r),setTimeout((function(){Se.current=!1}),500)}}catch(wr){}})),!k&&ha(o().mark((function e(){var t,n,r,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.t0=ga,e.next=4,Promise.all([Ko.tO.get(qo.XP.tv.layout),Ko.tO.get(qo.XP.tv.layoutSync)]);case 4:if(e.t1=e.sent,t=(0,e.t0)(e.t1,2),n=t[0],r=t[1],!M.saved_data&&n&&"s"!==n)try{L.setLayout(n)}catch(pe){}r&&(i=["symbol","interval","crosshair","dateRange"],["symbolSync","intervalSync","crosshairSync","dateRangeSync"].forEach((function(e,t){try{L[e]().setValue(!!r[i[t]])}catch(pe){}}))),e.next=14;break;case 12:e.prev=12,e.t2=e.catch(0);case 14:case"end":return e.stop()}}),e,null,[[0,12]])})))(),z(!1),le.current===I){var n;if(!M.saved_data&&function(e){try{var t;e.children?e.children.map((function(e){return e.opts[1].precision=nt,e}
1)).forEach((function(e){var t;return null===(t=W.current)||void 0===t?void 0:t.activeChart().createStudy(e.type,!1,!1,{length:e.opts[0][0]},e.opts[1])})):(e.opts[1].precision=nt,null===(t=W.current)||void 0===t||t.activeChart().createStudy(e.type,!1,!1,{length:e.opts[0][0]},e.opts[1]))}catch(pe){}}(Kr.zL[0]),"1"===K.value)pt(!0===(null===(n=Ko.tO.getSync(qo.XP.tv.prefs))||void 0===n?void 0:n.showTimeline));gt(),Ke(!0)}})),window.tvWidget=L,W.current=L,N&&(N.current=L)}catch(pe){}},bt=function(){if(Re.currentSymbolConfig&&he&&ne){var e=new qr.Z({precisionMap:ct,timezone:f().tz.guess(),supported_resolutions:Kr.Lu,socket:Je});Q.current=e;var t="/scripts";location.host.includes("9091")||location.host.includes("testnet.")||(t="");var n=Ye?["widget_logo","timeframes_toolbar"]:[],r={container:c,datafeed:e,interval:K.value,symbol:he,autosize:!0,disabled_features:Kr.bo.concat(n,O),enabled_features:Kr.wu.concat(_?["chart_crosshair_menu"]:[],["saveload_separate_drawings_storage"]),save_load_adapter:sa,auto_save_delay:1,fullscreen:ze,library_path:t+"/charting_library30/",locale:wa($e),saved_data:function(){try{var e,t=ee.current?JSON.parse(JSON.stringify(ee.current)):void 0;if(t&&(0,ii.g5)(t),k&&t)t.layout="s",(null===(e=t.charts)||void 0===e?void 0:e.length)>1&&(t.charts=t.charts.slice(0,1));return t}catch(pe){return}}(),timezone:f().tz.guess(),client_id:"tradingview.com",user_id:"public_user_id",settings_adapter:(0,Ro.Ij)(),studies_overrides:(0,Ro.Pl)(tt,rt),overrides:pa({},Kr.hb,(0,Ro.yp)(Ze,!0),rt===y.b.DARK?Kr.js:Kr.A0,{"tradingProperties.showPositions":He.showPositions,"tradingProperties.horizontalAlignment":0,"tradingProperties.extendLeft":!1,"tradingProperties.lineLength":100,"linetoolposition.protectTooltip":F("btn.stopPosition"),"linetoolposition.closeTooltip":F("position.marketTrade"),"linetoolposition.reverseTooltip":F("futures.reverse.01")}),custom_css_url:"/_static/thanos/thanos-web-ssr/public/assets/css/tradingview.theme3.css",loading_screen:rt===y.b.DARK?{backgroundColor:"#19191e",foregroundColor:"#19191e"}:{backgroundColor:"#ffffff"},theme:rt===y.b.DARK?"dark":"light",custom_font_family:"HarmonyOS_Sans_Regular, DIN, Chinese Quote, -apple-system, BlinkMacSystemFont, Segoe UI, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Helvetica Neue, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, DIN, Chinese Quote, -apple-system, BlinkMacSystemFont, Segoe UI, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Helvetica Neue, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol",context_menu:{items_processor:function(e,t,n){if("CrosshairMenuView"!=n.menuName)return Promise.resolve(e);var r=ma(e);r.unshift(t.createSeparator());var o=t.createAction({actionId:"create-new-order",label:F("kline.order.new"),icon:Kr.Ay,onExecute:function(){Ae(!0)}}),i=t.createAction({actionId:"create-price-alert",label:F("kline.plus.priceAlert",{price:Ne.current}),icon:Kr.Ay,onExecute:function(){var e;null===j||void 0===j||null===(e=j.current)||void 0===e||e.addAlert("".concat(Ne.current))}});return r.unshift(o,i),Promise.resolve(r)}},broker_config:{configFlags:Yo,customUI:{showPositionDialog:lt,showClosePositionDialog:ft,showReversePositionDialog:ht,showCancelOrderDialog:function(){return Promise.resolve(!1)}}},broker_factory:function(e){var t;null===(t=Z.current)||void 0===t||t.dispose();var n=new Go(e);return Z.current=n,n},trading_customization:{brokerPosition:function(){var e={};return["buy","sell"].forEach((function(t){var n=(0,Ir.gM)("buy"===t);["normal","disabled"].forEach((function(r){e["".concat(t,".").concat(r,".positivePlColor")]=n,e["".concat(t,".").concat(r,".negativePlColor")]=n,e["".concat(t,".").concat(r,".lineColor")]=n,e["".concat(t,".").concat(r,".borderColor")]=n,e["".concat(t,".").concat(r,".borderBackgroundColor")]=n,e["".concat(t,".").concat(r,".qty.backgroundColor")]=n,e["".concat(t,".").concat(r,".qty.textColor")]="#ffffff",e["".concat(t,".").concat(r,".qty.dividerColor")]=n,e["".concat(t,".").concat(r,".text.textColor")]=n,e["".concat(t,".").concat(r,".text.dividerColor")]=n,e["".concat(t,".").concat(r,".close.iconColor")]=n,e["".concat(t,".").concat(r,".reverse.borderColor")]=n,e["".concat(t,".").concat(r,".reverse.iconColor")]=n,e["".concat(t,".").concat(r,".anchor.backgroundColor")]=n,e["".concat(t,".").concat(r,".anchor.borderColor")]=n}))})),e}()}};return r}},Ct=(0,g.useState)({uuid:0,force:!1}),wt=Ct[0],St=Ct[1],Ot=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return St((function(t){return{uuid:++t.uuid,force:e}}))},xt=(0,g.useRef)(yt);xt.current=yt,(0,g.useEffect)((function(){var e=setTimeout((function(){wt.uuid>0&&(xt.current(wt.force),St({uuid:0,force:!1}))}),100);return function(){clearTimeout(e)}}),[wt]),(0,g.useEffect)((function(){xe.current=!0,ve(d)}),[d]),(0,g.useEffect)((function(){I&&"x"==I.charAt(0)&&Ot(!0)}),[I]),(0,g.useEffect)((function(){var e;he&&(null===(e=Z.current)||void 0===e||e.setChartSymbol(he)),xe.current=!1,Se.current||Ot()}),[he]),(0,g.useEffect)((function(){xe.current?xe.current=!1:Ot(!0)}),[null===(n=ct[d])||void 0===n?void 0:n.price]);var _t=(0,g.useRef)(!1);(0,g.useEffect)((function(){_t.current?Ot(!0):_t.current=!0}),[Je]),(0,g.useEffect)((function(){ne&&Ot(!0)}),[ne]),(0,g.useEffect)((function(){return ut}),[ut]),(0,g.useEffect)((function(){var e,t;W&&W.current&&(null===(t=W.current)||void 0===t||t.onChartReady((function(){var t;null===(t=W.current)||void 0===t||t.changeTheme(rt===y.b.DARK?"dark":"light"),e=setTimeout((function(){var e,t;null===(e=W.current)||void 0===e||e.applyOverrides(pa({},Kr.hb,(0,Ro.yp)(Ze,!0),rt===y.b.DARK?Kr.js:Kr.A0,{"tradingProperties.horizontalAlignment":0,"tradingProperties.extendLeft":!1})),null===(t=W.current)||void 0===t||t.applyStudiesOverrides((0,Ro.Pl)(Ze,rt));try{var n;null===(n=W.current)||void 0===n||n.activeChart().getSeries().setChartStyleProperties(1,(0,Ro.yp)(Ze))}catch(pe){}}),0)})));return function(){clearTimeout(e)}}),[rt,Ze]),(0,g.useEffect)((function(){Ko.tO.update(qo.XP.tv.prefs,(function(e){return pa({},null!==e&&void 0!==e?e:{},{defaultResolution:null===K||void 0===K?void 0:K.value})})).catch((function(){}))}),[K]);var Tt=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];he&&((null===(t=W.current)||void 0===t?void 0:t.activeChart().resolution())===e.value&&"1"!==e.value||(e.value!==K.value&&(de(!0),ke(!0)),q(e),"1"!==e.value?pt(!1):pt(!!r),null===(n=W.current)||void 0===n||n.activeChart().setResolution(e.value,(function(){var e;r?gt({resetChartType:!1,keepTimeScale:!0}):null===(e=W.current)||void 0===e||e.activeChart().setChartType(_e.current,(function(){gt({resetChartType:!1,keepTimeScale:!0})}
1))}))))};(0,g.useEffect)((function(){if("undefined"!==typeof document){var e=function(){"visible"===document.visibilityState&&dt()};return document.addEventListener("visibilitychange",e),function(){document.removeEventListener("visibilitychange",e)}}}),[dt]),(0,g.useEffect)((function(){if(W.current){var e=setTimeout((function(){dt()}),200),t=setTimeout((function(){dt()}),420);return function(){clearTimeout(e),clearTimeout(t)}}}),[ze,dt]);var Pt=(0,g.useRef)(B);return(0,g.useEffect)((function(){var e=!Pt.current&&B;if(Pt.current=B,e&&W.current){var t=setTimeout((function(){return dt()}),200),n=setTimeout((function(){return dt()}),420);return function(){clearTimeout(t),clearTimeout(n)}}}),[B,dt]),(0,a.jsxs)("div",{className:Xr().tradingviewWrapper,children:[(0,a.jsx)(xr.Z,{style:{display:U||ue?"flex":"none"}}),_&&Qe&&!ue&&(0,a.jsx)(Po,{}),_&&Le&&!ue&&(0,a.jsx)(yo,{y:je.current,price:Ne.current,rightOffset:De.current>=0?(null===(r=H.current)||void 0===r||null===(i=r.parentElement)||void 0===i?void 0:i.getBoundingClientRect().right)-De.current:void 0,close:function(){Ae(!1)}}),(0,a.jsxs)("div",{ref:H,className:u()(Xr().tradingviewContainer),style:{display:U||ue?"n
1one":"block"},children:[(0,a.jsx)("div",{className:Xr().toolBar,children:(0,a.jsxs)("div",{children:[(0,a.jsx)(Eo,{isTimeLine:X,resolution:Me.resolution,onChange:Tt,onTimeLine:function(e){var t="boolean"===typeof e?e:!X;pt(t),t&&Tt(Kr.Mb)},fromIndex:k}),(0,a.jsxs)("div",{className:u()(Xr().custom,Xr().tools),children:[!k&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ce,{getPopupContainer:function(){return H.current},onChange:function(e){return vt({key:"type",value:e})},chart:W,className:Xr().tradingViewFunctionIcon,ref:Pe}),(0,a.jsx)(s.Z,{getPopupContainer:function(){return H.current},placement:"bottom",title:F("kLine.technicalIndicators"),children:(0,a.jsx)("span",{className:u()(Xr().tradingViewFunctionIcon),onClick:function(){return vt("indicator")},children:(0,a.jsx)(A,{})})}),(0,a.jsx)(s.Z,{getPopupContainer:function(){return H.current},placement:"bottom",title:F("kLine.chartSettingTip"),children:(0,a.jsx)("span",{className:u()(Xr().tradingViewFunctionIcon),onClick:function(){return vt("setting")},children:(0,a.jsx)(T,{})})}),(0,a.jsx)(s.Z,{getPopupContainer:function(){return H.current},placement:"bottom",title:F("kLine.chartSnapshotTip"),children:(0,a.jsx)("span",{className:u()(Xr().tradingViewFunctionIcon),onClick:function(){return vt("shot")},children:(0,a.jsx)(M,{})})})]}),et&&!k&&(0,a.jsx)(E.Z,{placement:"bottom",content:(0,a.jsxs)("div",{className:Xr().settingContentCls,children:[(0,a.jsx)("div",{className:u()(Xr().settingItem,He.showCurrentOrder?Xr().checked:void 0),children:(0,a.jsx)(w.Z,{onChange:function(){return Ge("showCurrentOrder")},checked:He.showCurrentOrder,children:F("kLine.currentOrder")})}),(0,a.jsx)("div",{className:u()(Xr().settingItem,He.showPositions?Xr().checked:void 0),children:(0,a.jsx)(w.Z,{onChange:function(){return Ge("showPositions")},checked:He.showPositions,children:F("kLine.position")})}),(0,a.jsx)("div",{className:u()(Xr().settingItem,He.showTradeRecord?Xr().checked:void 0),children:(0,a.jsxs)(w.Z,{onChange:function(){return Ge("showTradeRecord")},checked:He.showTradeRecord,children:[(0,a.jsx)("div",{children:F("kLine.historyOrder")}),(0,a.jsxs)("small",{children:["(",F("kLine.maxShowCount"),")"]})]})}),(0,a.jsx)("div",{className:u()(Xr().settingItem,He.showBalancePrice?Xr().checked:void 0),children:(0,a.jsx)(w.Z,{onChange:function(){return Ge("showBalancePrice")},checked:He.showBalancePrice,children:F("position.balancePrice")})})]}),children:(0,a.jsx)("span",{className:Xr().tradingViewFunctionIcon,children:(0,a.jsx)(D,{})})}),!k&&(0,a.jsx)(Or,{symbol:Me.symbol,getPopupContainer:function(){return H.current},setSymbolType:function(e){try{var t;null===(t=W.current)||void 0===t||t.activeChart().setSymbol(e),we((function(e){return e+1}))}catch(pe){ve(e)}}})]})]})}),st&&(0,a.jsxs)("div",{className:Xr().indexPriceUnavailable,children:[(0,a.jsx)("img",{src:rt===y.b.DARK?b.Z:C.Z,alt:""}),(0,a.jsx)("p",{children:F("futures.premarket.indexPriceUnavailable")})]}),(0,a.jsx)("div",{id:c,className:Xr().tradingview,style:st?{display:"none"}:void 0})]})]})}))},50314:function(e,t,n){"use strict";n.d(t,{Kf:function(){return v},SR:function(){return i},Vm:function(){return s},_x:function(){return u},au:function(){return c},p$:function(){return f},pV:function(){return r}});var r={hydrated:!1,authoritative:!1,drawingsWritable:!1},o=new Set,i=function(e){return o.add(e),function(){o.delete(e)}},a=new Set,l=0,s=function(){return l},c=function(e,t){e&&t===l&&a.add(e)},u=function(){l+=1,a.clear()},d=null,f=function(e){d=null==e?null:{ids:e,served:new Set(a)}},h=function(){var e=new Set(a);return null===d||void 0===d||d.served.forEach((function(t){return e.add(t)})),e},v=function(){var e,t=function(){var e=[];if(o.forEach((function(t){try{var n=t();n&&e.push(n)}catch(r){}})),0===e.length)return null;if(1===e.length)return e[0];var t=new Set,n=!0,r=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(n=(a=l.next()).done);n=!0)a.value.forEach((function(e){return t.add(e)}))}catch(s){r=!0,i=s}finally{try{n||null==l.return||l.return()}finally{if(r)throw i}}return t}(),n=null!==(e=null!==t&&void 0!==t?t:null===d||void 0===d?void 0:d.ids)&&void 0!==e?e:null;return null!=t&&(d=null),{ids:n,served:h()}}},37459:function(e,t,n){"use strict";n.d(t,{Ij:function(){return f},Pl:function(){return v},qu:function(){return d},yp:function(){return h}});var r=n(54715),o=n(72817),i=n(90749),a=n(77450);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){l(e,t,n[t])}))}return e}var c=null,u=null,d=function(){return u||(u=(0,r.Ki)(o.XP.tv.settings).then((function(e){return c=e,e})).catch((function(){return null}))),u},f=function(){var e;return d(),{initialSettings:s({},null!==(e=null===c||void 0===c?void 0:c.initialSettings)&&void 0!==e?e:{}),setValue:function(e,t){c?c.setValue(e,t):d().then((function(n){return null===n||void 0===n?void 0:n.setValue(e,t)}))},removeValue:function(e){c?c.removeValue(e):d().then((function(t){return null===t||void 0===t?void 0:t.removeValue(e)}))}}},h=function(e,t){var n,r=getComputedStyle(document.body).getPropertyValue("--xt-color-green"),o=getComputedStyle(document.body).getPropertyValue("--xt-color-red"),a=e===i.h.redUpGreenDown;return l(n={},t?"mainSeriesProperties.candleStyle.upColor":"upColor",a?o:r),l(n,t?"mainSeriesProperties.candleStyle.downColor":"downColor",a?r:o),l(n,t?"mainSeriesProperties.candleStyle.borderUpColor":"borderUpColor",a?o:r),l(n,t?"mainSeriesProperties.candleStyle.borderDownColor":"borderDownColor",a?r:o),l(n,t?"mainSeriesProperties.candleStyle.wickUpColor":"wickUpColor",a?o:r),l(n,t?"mainSeriesProperties.candleStyle.wickDownColor":"wickDownColor",a?r:o),n},v=function(e,t){var n=e===i.h.greenUpRedDown;return t===i.b.DARK?n?a.NL:a.aP:n?a.gi:a.Wx}},77263:function(e,t,n){"use strict";var r=n(52676);n(75271);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}t.Z=function(e){var t=i({},e);return(0,r.jsx)("div",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){o(e,t,n[t])}))}return e}({className:"xt-loading"},t,{children:(0,r.jsxs)("div",{className:"line-scale",children:[(0,r.jsx)("div",{}),(0,r.jsx)("div",{}),(0,r.jsx)("div",{}),(0,r.jsx)("div",{}),(0,r.jsx)("div",{})]})}))}},67143:function(e,t,n){"use strict";n.d(t,{Vs:function(){return q},Gn:function(){return K}});var r=n(73771),o=n.n(r),i=n(97495),a=n(99169),l=n(75271),s=n(74637),c=n.n(s),u=n(90749),d=n(16052),f=n(6939),h=n(79086),v=n(61468),p=n(65389),g=n(52980),m=n(86383),y=n(62171),b=n(93271),C=n(38209),w=n.n(C),S=n(32253),O=n(93166),x=n(82121),_=n(4961),T=function(e){var t=e.positionSide,n=e.upDownTheme,r=e.isQuantityRiseColor,o=e.isDark,i=n===u.h.greenUpRedDown?(0,v.ji)():(0,v.BG)(),a=n===u.h.greenUpRedDown?(0,v.BG)():(0,v.ji)(),l="LONG"===t?a:i;return{setQuantityTextColor:r?i:a,setCancelButtonIconColor:l,setQuantityBackgroun
1dColor:o?"#000":"#fff",setCancelButtonBackgroundColor:o?"#000":"#fff",setCancelButtonBorderColor:l,setQuantityBorderColor:l,setBodyTextColor:l,setBodyBackgroundColor:o?"#000":"#fff",setBodyBorderColor:l,setLineColor:l,setLineLength:20}},P=n(54698),k=n(54715),M=n(28271),I=n(84784);function L(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(c){return void n(c)}l.done?t(s):Promise.resolve(s).then(r,o)}function A(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){L(i,r,o,a,l,"next",e)}function l(e){L(i,r,o,a,l,"throw",e)}a(void 0)}))}}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){j(e,t,n[t])}))}return e}var D=i.Px.useTranslation,E=function(e){var t=e.symbol,n=e.activeChart,r=e.klineLoading,i=e.hasBars,s=D().t,c=(0,d.oR)(),u=c.entrust,h=u.trackStopProfitList,m=void 0===h?[]:h,b=u.fetchTrackStopProfitList,C=c.futures,L=C.getUnitAmount,j=C.latestPrice,E=c.position.positionSymbol,R=c.ticker.getSymbolConfig,B=c.ui,F=B.upDownTheme,V=B.tradeSetting,U=B.openGlobalModal,z=B.unit,W=B.isDark,Z=(0,y.ZP)().colorFlag,Q=V.showCurrentOrder,H=(0,l.useRef)(new Map),G=(0,l.useRef)(new Map),Y=(0,l.useRef)(null),K=(0,l.useRef)(null),q=(0,l.useRef)(!1),J=(0,l.useMemo)((function(){var e;return null===(e=(null!==m&&void 0!==m?m:[]).filter((function(e){return(null===e||void 0===e?void 0:e.symbol)===t})))||void 0===e?void 0:e.slice(0,5)}),[m,t]),X=(0,l.useCallback)((function(e){(0,_.fq)({trackProfitId:e}).then((function(){b({page:1,symbol:E})}))}),[b,E]),$=(0,l.useCallback)(function(){var e=A(o().mark((function e(t){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=!1,e.prev=1,e.next=4,k.tO.get(M.RX);case 4:n=e.sent,e.next=9;break;case 7:e.prev=7,e.t0=e.catch(1);case 9:if(!n){e.next=12;break}return X(t),e.abrupt("return");case 12:q.current=!1,U(p.w.COMMON_CONFIRM,{text:s("position.trackStopProfit.withdrawConfirmText"),onOk:function(){q.current&&k.tO.set(M.RX,!0),X(t)},renderContent:function(){return(0,l.createElement)("div",{style:{marginTop:12,width:"100%"}},(0,l.createElement)(S.Z,{onChange:function(e){q.current=e.target.checked}},(0,l.createElement)("span",{style:{color:"var(--Text_Icon-Secondary-2, #8c8c8c)"}},s("placeholder.neverPrompt"))))}});case 14:case"end":return e.stop()}}),e,null,[[1,7]])})));return function(t){return e.apply(this,arguments)}}(),[U,s,X]),ee=(0,l.useCallback)((function(e){var t=R(e.symbol);if(!t)return"0";var n=(0,P.a)({isUBased:(0,O.CD)(e.symbol),positionSide:e.positionSide,entryPrice:null===e||void 0===e?void 0:e.entryPrice,endPrice:null===e||void 0===e?void 0:e.stopPrice,size:null===e||void 0===e?void 0:e.origQty,contractSize:t.contractSize}),r=new a.O(n);return r.gt(0)?"+".concat(r.toFixed(4)):r.toFixed(4)}),[R]),te=(0,l.useCallback)((function(e){return[e.trackProfitId,e.state,e.positionSide,e.activationPrice,e.stopPrice,e.origQty,e.triggerPriceType,e.callback,e.callbackVal].join("|")}),[]),ne=(0,l.useCallback)((function(e){var t,n=e.positionSide,r=e.symbol,o=e.origQty,i=L(o,r,j),a=i.amount,l=i.unitView,c=s("LONG"===n?"futures.common.marketSell":"futures.common.marketBuy"),u=(0,I.PR)(),d=function(e){return u?(0,I._h)(e):e},h=(null===e||void 0===e?void 0:e.callback)===g.TI.PROPORTION?"".concat((0,f.Jp)(null===e||void 0===e?void 0:e.callbackVal,100),"%"):String(null!==(t=null===e||void 0===e?void 0:e.callbackVal)&&void 0!==t?t:""),v=(0,I.Wj)(h),p=s(x.tW[e.triggerPriceType]),m="",y="",b="",C=(0,I.Wj)("".concat(a," ").concat(l));switch(null===e||void 0===e?void 0:e.state){case g.S9.NOT_ACTIVATION:b=a,y=e.activationPrice,m=[d(s("futures.common.notActivated")),d("".concat(s("trackOrder.downBili")," ").concat(v)),d("".concat(s("trackOrder.jihuoPrice"),"(").concat(p,") ").concat(y))].join("\n");break;case g.S9.NOT_TRIGGERED:case g.S9.TRIGGERING:case g.S9.TRIGGERED:default:b=ee(e),y=e.stopPrice,m=[d("".concat(c," ").concat(C)),d("".concat(s("trackOrder.downBili")," ").concat(v)),d("".concat(s("placeholder.triggerPrice"),"(").concat(p,") ").concat(y))].join("\n")}return{tooltip:m,price:y,quantity:b}}),[s,L,j,ee]),re=(0,l.useCallback)(function(){var e=A(o().mark((function e(t,n){var r,i,l,c,u,d,f,h;return o().wrap((function(e){for(;;
1)switch(e.prev=e.next){case 0:if(t&&t.dataReady()){e.next=2;break}return e.abrupt("return",null);case 2:return i=(r=n||{}).positionSide,l=r.state,c=l===g.S9.NOT_ACTIVATION,u=ne(n),d=u.tooltip,f=u.price,h=u.quantity,e.next=7,(0,v.ci)(t,N({},T({positionSide:n.positionSide,upDownTheme:F,isQuantityRiseColor:c?"SHORT"===i:new a.O(h).gt(0),isDark:W}),{adapterId:"trackStopProfit_".concat(n.symbol,"_").concat(n.trackProfitId),setCancelTooltip:s("btn.withdrawOrder"),setTooltip:d,setText:s("position.trackStopProfit.title"),symbol:n.symbol,orderSide:"LONG"===n.positionSide?"SELL":"BUY",setPrice:Number(f),setQuantity:h,onCancel:function(){$(n.trackProfitId)}}));case 7:return e.abrupt("return",e.sent);case 8:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),[s,$,F,ne,W]),oe=(0,l.useCallback)((function(){H.current.forEach((function(e){return e.safeRemove()})),H.current.clear(),G.current.clear()}),[]),ie=(0,l.useCallback)(function(){var e=A(o().mark((function e(t,n){var r,i,a,l,s,c,u,d,f,h,v,p,g,m,y,b;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&t.dataReady()){e.next=2;break}return e.abrupt("return");case 2:r=new Set(n.map((function(e){return e.trackProfitId}))),H.current.forEach((function(e,t){r.has(t)||(e.safeRemove(),H.current.delete(t),G.current.delete(t))})),i=!0,a=!1,l=void 0,e.prev=5,s=n[Symbol.iterator]();case 7:if(i=(c=s.next()).done){e.next=23;break}if(u=c.value,d=u.trackProfitId,f=te(u),h=G.current.get(d),v=H.current.get(d)){e.next=19;break}return e.next=16,re(t,u);case 16:return(p=e.sent)&&(H.current.set(d,p),G.current.set(d,f)),e.abrupt("continue",20);case 19:if(h!==f){g=ne(u),m=g.tooltip,y=g.price,b=g.quantity;try{v.setTooltip(m),v.setPrice(Number(y)),v.setQuantity(b)}catch(o){}G.current.set(d,f)}case 20:i=!0,e.next=7;break;case 23:e.next=29;break;case 25:e.prev=25,e.t0=e.catch(5),a=!0,l=e.t0;case 29:e.prev=29,e.prev=30,i||null==s.return||s.return();case 32:if(e.prev=32,!a){e.next=35;break}throw l;case 35:return e.finish(32);case 36:return e.finish(29);case 37:case"end":return e.stop()}}),e,null,[[5,25,29,37],[30,,32,36]])})));return function(t,n){return e.apply(this,arguments)}}(),[re,te,ne]),ae=(0,l.useMemo)((function(){return Boolean(n&&i&&!r&&n.dataReady()&&J.length>0&&Q&&t)}),[n,i,r,J,Q,t]),le=(0,l.useMemo)((function(){return[t,Z,F,ae,z,W].join("|")}),[t,Z,F,ae,z,W]),se=(0,l.useMemo)((function(){return n?w()((function(e){ie(n,e)}),200,{leading:!0,trailing:!0}):null}),[n,ie]);(0,l.useEffect)((function(){return function(){null===se||void 0===se||se.cancel()}}),[se]),(0,l.useEffect)((function(){return function(){oe()}}),[oe]),(0,l.useEffect)((function(){K.current!==n?(K.current=n,oe()):Y.current!==le&&oe(),Y.current=le,ae&&(null===se||void 0===se||se(J))}),[le,J,ae,se,oe]),(0,l.useEffect)((function(){if(ae&&0!==H.current.size){var e=!0,t=!1,n=void 0;try{for(var r,o=J[Symbol.iterator]();!(e=(r=o.next()).done);e=!0){var i=r.value,a=H.current.get(i.trackProfitId);if(a)try{var l=ne(i),s=l.tooltip,c=l.quantity;a.setTooltip(s),a.setQuantity(c)}catch(u){}}}catch(d){t=!0,n=d}finally{try{e||null==o.return||o.return()}finally{if(t)throw n}}}}),[j,ae,J,ne])};function R(e,t){return null!=t&&"undefined"!==typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}var B="tpsl-connector-canvas",F=function(e){var t=e.symbol,n=e.activeChart,r=e.hasBars,o=e.klineLoading,i=e.tvWidget,a=e.draggingPricesRef,s=(0,d.oR)(),c=s.futures,u=s.entrust,f=s.ui,h=c.positionListWithValue,p=u.profitList,g=f.tradeSetting,m=(0,y.ZP)().colorFlag,b=(0,l.useRef)(null),C=(0,l.useRef)(0),w=(0,l.useRef)([]),S=(0,l.useRef)(-1),O=(0,l.useMemo)((function(){return h.filter((function(e){return e.symbol===t}))}),[h,t]),x=(0,l.useMemo)((function(){return p.filter((function(e){return e.symbol===t}))}),[p,t]),_=(0,l.useMemo)((function(){var e=O.map((function(e){return"".concat(e.positionSide,"_").concat(e.entryPrice)})).join(","),t=x.map((function(e){return"".concat(e.profitId,"_").concat(e.positionSide,"_").concat(e.triggerProfitPrice,"_").concat(e.triggerStopPrice)})).join(",");return"".concat(e,"|").concat(t)}),[O,x]),T=(0,l.useCallback)((function(e){return(0,v.gM)(e)}),[]),P=(0,l.useCallback)((function(e){return(0,v.gM)("LONG"===e)}),[]),k=(0,l.useMemo)((function(){var e=[],t=!0,n=!1,r=void 0;try{for(var o,i=function(t,n){var r=n.value,o=O.find((function(e){return e.positionSide===r.positionSide}));if(!o)return"continue";var i=Number(o.entryPrice);Number(r.triggerProfitPrice)&&e.push({profitId:r.profitId,tpslPrice:Number(r.triggerProfitPrice),entryPrice:i,positionSide:r.positionSide,isTP:!0}),Number(r.triggerStopPrice)&&e.push({profitId:r.profitId,tpslPrice:Number(r.triggerStopPrice),entryPrice:i,positionSide:r.positionSide,isTP:!1})},a=x[Symbol.iterator]();!(t=(o=a.next()).done);t=!0)i(0,o)}catch(l){n=!0,r=l}finally{try{t||null==a.return||a.return()}finally{if(n)throw r}}return e}),[x,O]),M=(0,l.useCallback)((function(){if(!i.current)return null;var e=b.current;if(e&&e.parentElement)return e;try{var t,n,r,o,a=i.current,l=null!==(o=null!==(r=null===(t=a._options)||void 0===t?void 0:t.container)&&void 0!==r?r:null===(n=a.options)||void 0===n?void 0:n.container)&&void 0!==o?o:a._containerId,s=null;if("string"===typeof l?s=document.getElementById(l):R(l,HTMLElement)&&(s=l),!s){var c=document.querySelectorAll('iframe[id*="tradingview"], iframe[src*="charting_library"]'),u=!0,d=!1,f=void 0;try{for(var h,v=c[Symbol.iterator]();!(u=(h=v.next()).done);u=!0){var p=h.value;if(p.parentElement){s=p.parentElement;break}}}catch(m){d=!0,f=m}finally{try{u||null==v.return||v.return()}finally{if(d)throw f}}}if(!s)return null;var g=s.querySelector(".".concat(B));return g&&g.remove(),(e=document.createElement("canvas")).className=B,e.style.cssText="position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:5;",s.style.position="relative",s.appendChild(e),b.current=e,e}catch(y){return null}}),[i]),I=(0,l.useCallback)((function(){var e=w.current,t=M();if(t){var r=window.devicePixelRatio||1,o=t.getBoundingClientRect(),i=o.width,l=o.height;t.width===Math.round(i*r)&&t.height===Math.round(l*r)||(t.width=Math.round(i*r),t.height=Math.round(l*r));var s=t.getContext("2d");if(s&&(s.setTransform(r,0,0,r,0,0),s.clearRect(0,0,i,l),e.length&&n)){var c=function(e){try{var t,n=null===(t=e.getPanes())||void 0===t?void 0:t[0];if(!n)return function(){return null};var r=n.getMainSourcePriceScale();if(!r)return function(){return null};var o=r.getVisiblePriceRange();if(!o)return function(){return null};var i=n.getHeight();if(!i||o.from===o.to)return function(){return null};var a=o.from,l=o.to;return function(e){return(l-e)/(l-a)*i}}catch(s){return function(){return null}}}(n),u=a.current.size>0,d=S.current,f=0,h=0;try{var v,p,g=null===(v=t.parentElement)||void 0===v?void 0:v.getBoundingClientRect(),m=null===(p=t.parentElement)||void 0===p?void 0:p.querySelector("iframe");
1if(g&&m){var y=m.getBoundingClientRect(),b=y.top-g.top;try{var C,O=m.contentDocument||(null===(C=m.contentWindow)||void 0===C?void 0:C.document);if(O){var x,_,k=null!==(_=null===(x=O.querySelector(".layout__area--center canvas"))||void 0===x?void 0:x.parentElement)&&void 0!==_?_:O.querySelector(".chart-markup-table");if(k){var I=k.getBoundingClientRect();f=b+I.top,h=y.right-I.right}else f=b}else f=b}catch(Y){f=b}}}catch(Y){}var L=i-200-h,A=!0,j=!1,N=void 0;try{for(var D,E=e[Symbol.iterator]();!(A=(D=E.next()).done);A=!0){var R=D.value,B="".concat(R.profitId,"_").concat(R.isTP?"tp":"sl"),F=a.current.get(B),V=null!==F&&void 0!==F?F:R.tpslPrice,U=null!=F,z=c(R.entryPrice),W=c(V);if(null!=z&&null!=W){var Z=z+f,Q=W+f;if(!(Z<0&&Q<0||Z>l&&Q>l)){if(!U&&!u&&d>=0){if(Math.abs(d-Q)>10)continue}else if(!U&&!u&&d<0)continue;var H=T(R.isTP),G=P(R.positionSide);s.beginPath(),s.setLineDash([3,3]),s.strokeStyle=H,s.lineWidth=1,s.moveTo(L,Z),s.lineTo(L,Q),s.stroke(),s.setLineDash([]),s.beginPath(),s.arc(L,Q,3,0,2*Math.PI),s.fillStyle=H,s.fill(),s.beginPath(),s.arc(L,Z,3,0,2*Math.PI),s.fillStyle=G,s.fill()}}}}catch(K){j=!0,N=K}finally{try{A||null==E.return||E.return()}finally{if(j)throw N}}}}}),[n,M,T,P,a]);(0,l.useEffect)((function(){if(n&&r&&i.current){var e=null;try{var t,o,a,l,s=i.current,c=null!==(l=null!==(a=null===(t=s._options)||void 0===t?void 0:t.container)&&void 0!==a?a:null===(o=s.options)||void 0===o?void 0:o.container)&&void 0!==l?l:s._containerId;if("string"===typeof c?e=document.getElementById(c):R(c,HTMLElement)&&(e=c),!e){var u=document.querySelectorAll('iframe[id*="tradingview"], iframe[src*="charting_library"]'),d=!0,f=!1,h=void 0;try{for(var v,p=u[Symbol.iterator]();!(d=(v=p.next()).done);d=!0){var g=v.value;if(g.parentElement){e=g.parentElement;break}}}catch(O){f=!0,h=O}finally{try{d||null==p.return||p.return()}finally{if(f)throw h}}}}catch(x){return}if(e){var m=e.querySelector("iframe");if(m){var y=null;try{var b;y=m.contentDocument||(null===(b=m.contentWindow)||void 0===b?void 0:b.document)||null}catch(_){return}if(y){var C=function(t){var n=null===e||void 0===e?void 0:e.getBoundingClientRect(),r=m.getBoundingClientRect();n&&r&&(S.current=t.clientY+(r.top-n.top))},w=function(){S.current=-1};return y.addEventListener("mousemove",C),y.addEventListener("mouseleave",w),function(){null===y||void 0===y||y.removeEventListener("mousemove",C),null===y||void 0===y||y.removeEventListener("mouseleave",w)}}}}}}),[n,r,i]),(0,l.useEffect)((function(){if(n&&r&&!o&&g.showCurrentOrder&&g.showPositions&&k.length){w.current=k;var e=!0,t=function(){e&&(I(),C.current=requestAnimationFrame(t))};return C.current=requestAnimationFrame(t),function(){e=!1,cancelAnimationFrame(C.current)}}w.current=[];var i=b.current;if(i){var a=i.getContext("2d");null===a||void 0===a||a.clearRect(0,0,i.width,i.height)}}),[n,r,o,g.showCurrentOrder,g.showPositions,_,m,k,I]),(0,l.useEffect)((function(){return function(){var e;cancelAnimationFrame(C.current),null===(e=b.current)||void 0===e||e.remove(),b.current=null}}),[])};function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function U(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(c){return void n(c)}l.done?t(s):Promise.resolve(s).then(r,o)}function z(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){U(i,r,o,a,l,"next",e)}function l(e){U(i,r,o,a,l,"throw",e)}a(void 0)}))}}function W(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){W(e,t,n[t])}))}return e}function Q(e){return function(e){if(Array.isArray(e))return V(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return V(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return V(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var H=i.Px.useTranslation,G=function(e){var t,n,r,o=0;e.current&&e.current._ready&&(o=null===(n=null===(t=e.current)||void 0===t?void 0:t.activeChart())||void 0===n||null===(r=n._chartWidget)||void 0===r?void 0:r.model().mainSeries().bars().size());return o},Y=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"futures",n=(0,l.useState)(!1),r=n[0],o=n[1],i=(0,l.useState)(null),a=i[0],s=i[1],c=(0,d.oR)(),u=c.eventFutures,f=c.ui,v=c.ticker,p=f.tradingViewLoaded,g=u.currentSymbol,m=v.currentSymbolIdentity,y=(0,l.useMemo)((function(){return"eventFutures"===t?g:m}),[t,g,m]),b=(0,l.useMemo)((function(){return{activeChart:a,tradingViewLoaded:p}}),[a,p]);return(0,l.useEffect)((function(){var t=!1;return function n(){if(e.current&&e.current._ready){var r=G(e);
1if(o(r>0),e.current.activeChart()!==a){var i,l=null===(i=e.current.symbolInterval().symbol)||void 0===i?void 0:i.split(":"),c=(0,h.GT)((l.length>1?l[1]:l[0]).toLowerCase(),h.B5.default).toUpperCase(),u=(0,h.GT)(y.toLowerCase(),h.B5.default).toUpperCase();r>0&&c===u&&(s(e.current.activeChart()),t=!0)}else t=!0}else s(null);t||window.requestAnimationFrame(n)}(),function(){t=!0}}),[e,p,y,a]),(0,l.useEffect)((function(){if(e.current&&e.current._ready){var t=e.current,n=function(){try{var n=t.activeChart();s((function(e){return e!==n?n:e}));var r=G(e);o(r>0)}catch(i){}};return t.subscribe("activeChartChanged",n),function(){try{t.unsubscribe("activeChartChanged",n)}catch(e){}}}}),[e,p]),{symbol:y,hasBars:r,activeChartMemo:b,activeChart:a}},K=function(e){var t=(0,l.useState)(!1),n=t[0],r=t[1],i=Y(e),s=i.symbol,c=i.hasBars,h=i.activeChartMemo;E({symbol:s,activeChart:null===h||void 0===h?void 0:h.activeChart,klineLoading:n,hasBars:c});var C=function(e){var t=e.symbol,n=e.hasBars,r=e.activeChartMemo,i=H().t,s=(0,b.Z)().unitView,c=(0,y.ZP)().colorFlag,h=(0,d.oR)(),C=h.ui,w=h.order,S=h.ticker,O=h.futures,x=h.entrust,_=C.tradeSetting,T=C.theme,P=C.unit,k=C.openGlobalModal,M=w.cancelOrderWithId,I=w.orderList,L=S.latestPriceMap,A=O.getUnitAmount,j=x.profitList,N=x.planList,D=x.trackOrderList,E=x.fetchCancelPlan,R=x.fetchWithdrawProfit,B=x.cancelTrackOrder,F=S.getPrecision(t).price,V=L[t]||"",U=(0,l.useRef)([]),W=(0,l.useState)([]),G=W[0],Y=W[1],K=(0,l.useRef)([]),q=(0,l.useState)([]),J=q[0],X=q[1],$=(0,l.useRef)([]),ee=(0,l.useState)([]),te=ee[0],ne=ee[1],re=(0,l.useRef)([]),oe=(0,l.useState)([]),ie=oe[0],ae=oe[1],le=(0,l.useRef)(null),se=(0,l.useRef)(new Map),ce=(0,l.useRef)(0),ue=(0,l.useRef)({limit:0,profit:0,plan:0,track:0}),de=(0,l.useRef)(null),fe={limit:{setProxy:function(e){Y(e),U.current=e},orderRef:U,adapters:G,list:I.filter((function(e){return e.symbol===t})),adapterId:"orderId"},profit:{setProxy:function(e){X(e),K.current=e},orderRef:K,adapters:J,list:j.filter((function(e){return e.symbol===t})),adapterId:"profitId"},plan:{setProxy:function(e){ne(e),$.current=e},orderRef:$,adapters:te,list:N.filter((function(e){return e.symbol===t})),adapterId:"entrustId"},track:{setProxy:function(e){ae(e),re.current=e},orderRef:re,adapters:ie,list:D.filter((function(e){return e.symbol===t})),adapterId:"trackId"}},he=function(e){var t=(0,v.gM)(e.isTP),n=T===u.b.DARK?"rgba(255, 255, 255, 0.6)":"#666",r=T===u.b.DARK?"#111114":"#fff",o=T===u.b.DARK?"rgba(255, 255, 255, 0.2)":"#ccc";e.noQuantity?e.setCancelButtonIconColor(t).setCancelButtonBackgroundColor(r).setCancelButtonBorderColor(t).setQuantity("").setQuantityBorderColor("rgba(0,0,0,0)").setQuantityBackgroundColor("rgba(0,0,0,0)").setQuantityTextColor("rgba(0,0,0,0)").setQuantityFont("0px ''").setBodyBorderColor(t).setBodyBackgroundColor(r).setBodyTextColor(t).setLineColor(t):e.setCancelButtonIconColor(n).setCancelButtonBackgroundColor(r).setCancelButtonBorderColor(o).setQuantityTextColor(n).setQuantityBackgroundColor(r).setQuantityBorderColor(o).setBodyBorderColor(t).setBodyBackgroundColor(t).setBodyTextColor("#fff").setLineColor(t)},ve=function(e,t){return new a.Z(e).toFixed(F||3,(0,f.aB)(t))},pe=function(e,t){return"TAKE_PROFIT_MARKET"===e?i("market.orderForm.entrust.market"):t},ge=function(e){return i("MARK_PRICE"===e?"market.position.triggerPriceType.markPrice":"LATEST_PRICE"===e?"market.position.triggerPriceType.latestPrice":"market.position.triggerPriceType.indexPrice")},me=(0,m.Z)(),ye=function(){var e=z(o().mark((function e(n,r,l){var s,c,d,f,h,m,y,b,C,w,x,_,P,I,j,N,D,U,z,W,H,G,Y,q,J,X,$,ee,te,ne,re,oe,ie,ae,ce,ue,de,ye,be,Ce,we,Se,Oe,xe,_e,Te,Pe,ke,Me,Ie,Le,Ae,je,Ne,De,Ee,Re,Be,Fe,Ve,Ue,ze,We,Ze,Qe,He,Ge,Ye,Ke,qe,Je;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=r[fe[l].adapterId],c=[],d={adapterId:s,setLineLength:60,symbol:r.symbol,setCancelTooltip:i("btn.withdrawOrder"),setQuantityTextColor:T===u.b.DARK?"rgba(255, 255, 255, 0.6)":"#666",setCancelButtonIconColor:T===u.b.DARK?"rgba(255, 255, 255, 0.6)":"#666",setQuantityBackgroundColor:T===u.b.DARK?"#111114":"#fff",setCancelButtonBackgroun
1dColor:T===u.b.DARK?"#111114":"#fff",setCancelButtonBorderColor:T===u.b.DARK?"rgba(255, 255, 255, 0.2)":"#ccc",setQuantityBorderColor:T===u.b.DARK?"rgba(255, 255, 255, 0.2)":"#ccc"},"limit"===l?(f=r.price,h=r.origQty,m=r.executedQty,y=r.orderSide,b=r.positionSide,C=r.timeInForce,w=i("GTX"===C?"btn.makerOnly":"optimization.08"),x=new a.Z(h||0).minus(m||0),c.push(Z({},d,{orderSide:y,setText:"".concat(w," ").concat(ve(f,b)),setPrice:Number(f),amount:x,setQuantity:A(x,t,f).amount,onCancel:function(){M(s).then((function(){}))}}))):"profit"===l?(I=r.origQty,j=r.executedQty,N=r.positionSide,D=r.closeType,U=r.profitDelegateOrderType,z=r.stopDelegateOrderType,W=r.profitDelegatePrice,H=r.stopDelegatePrice,G=r.triggerProfitPrice,Y=r.triggerStopPrice,q=r.triggerPriceType,J=r.profitDelegateOrderBBOType,X=r.stopDelegateOrderBBOType,$=null===(_=me.find((function(e){return e.value===J})))||void 0===_?void 0:_.label,ee=null===(P=me.find((function(e){return e.value===X})))||void 0===P?void 0:P.label,te="LONG"===N?"\u2265":"\u2264",ne="LONG"===N?"\u2264":"\u2265",re="".concat("MARKET"===U?i("future.marketProfit"):i("future.limitProfit")+": "+($||ve(W,N))),oe="".concat(ge(q)).concat(te).concat(Number(G).toFixed(F)),ie="".concat("MARKET"===z?i("future.marketStop"):i("future.limitStop")+": "+(ee||ve(H,N))),ae="".concat(ge(q)).concat(ne).concat(Number(Y).toFixed(F)),ce=new a.Z(I||0).minus(j||0),ue=O.positionListWithValue.find((function(e){return e.symbol===r.symbol&&e.positionSide===N})),de="ALL"===D,ye=function(e){if(!ue||!e||!Number(e))return"";var t,n=ue.entryPrice,o=ue.leverage;if(!Number(n)||!o)return"";if("COIN_BASED"===S.getSymbolUnderlyingType(r.symbol)){var i=new a.Z(n).div(e);t="LONG"===N?new a.Z(1).minus(i).times(o).times(100):i.minus(1).times(o).times(100)}else t=("LONG"===N?new a.Z(e).minus(n):new a.Z(n).minus(e)).div(n).times(o).times(100);var l=t.toFixed(2);return"".concat(t.gte(0)?"+":"").concat(l,"%")},be=function(e){if(ue){le.current=null,se.current.delete("".concat(s,"_tp")),se.current.delete("".concat(s,"_sl"));var t=(0,v.hm)({triggerProfitPrice:e.triggerProfitPrice,triggerStopPrice:e.triggerStopPrice,entryPrice:ue.entryPrice,latestPrice:L[r.symbol],isLong:"LONG"===N,pricePrecision:F||2,leverage:ue.leverage,isCoinBased:"COIN_BASED"===S.getSymbolUnderlyingType(r.symbol)});null!=t.triggerProfitPrice&&(e=Z({},e,{triggerProfitPrice:String(t.triggerProfitPrice)})),null!=t.triggerStopPrice&&(e=Z({},e,{triggerStopPrice:String(t.triggerStopPrice)})),k(p.w.STOP_PROFIT_LOSS,Z({symbol:ue.symbol,positionSize:ue.positionSize,positionSide:ue.positionSide,entryPrice:ue.entryPrice,leverage:ue.leverage,contractSize:ue.contractSize,profitId:s,type:1,tabOrigin:de?g.C0.ALL:g.C0.FIXED,initialChanged:!0,isTrustEdit:!0,triggerProfitPrice:G,triggerStopPrice:Y,triggerPriceType:q,origQty:I,profitDelegateOrderType:U,stopDelegateOrderType:z,profitDelegatePrice:W,stopDelegatePrice:H,profitDelegateOrderBBOType:J,stopDelegateOrderBBOType:X,record:r,okCallback:function(){}},e,{gslDirectionCheck:!0,triggerStopPriceBeforeDrag:Y}))}},Number(G)&&(Ce=A(ce,t,V).amount,we=de?ye(G):"",Se=we?"".concat(Ce," (").concat(we,")"):Ce,c.push(Z({},d,{setLineLength:100,adapterId:"".concat(d.adapterId).concat(G),orderSide:"LONG"===N?"SELL":"BUY",isTP:!0,noQuantity:de,setText:de?"".concat(i("placeholder.stopWin")," ").concat(Se):"".concat(re," ").concat(oe),setPrice:Number(G),amount:ce,setQuantity:Ce,onMoving:ue?function(e){if(le.current=s,null!=e){se.current.set("".concat(s,"_tp"),e);var t="".concat(s).concat(G),n=K.current.find((function(e){return e.adapterId===t}));if(null===n||void 0===n?void 0:n._line){var r=ye(String(e)),o=new a.Z(e).toFixed(F||4),l=de?"".concat(i("placeholder.stopWin")," ").concat(Ce).concat(r?" (".concat(r,")"):""):"".concat(re," ").concat(ge(q)).concat(te).concat(o);n.setText(l)}}}:void 0,onMove:ue?function(e){be({triggerProfitPrice:null!=e?String(e):G,triggerStopPrice:Number(Y)?Y:void 0})}:void 0,onCancel:function(){R(s).catch((function(){}))}}))),Number(Y)&&(Oe=A(ce,t,V).amount,xe=de?ye(Y):"",_e=xe?"".concat(Oe," (").concat(xe,")"):Oe,c.push(Z({},d,{setLineLength:100,adapterId:"".concat(d.adapterId).concat(Y),orderSide:"LONG"===N?"SELL":"BUY",isTP:!1,noQuantity:de,setText:de?"".concat(i("placeholder.stopLoss")," ").concat(_e):"".concat(ie," ").concat(ae),setPrice:Number(Y),amount:ce,setQuantity:Oe,onMoving:ue?function(e){if(le.current=s,null!=e){se.current.set("".concat(s,"_sl"),e);var t="".concat(s).concat(Y),n=K.current.find((function(e){return e.adapterId===t}));if(null===n||void 0===n?void 0:n._line){var r=ye(String(e)),o=new a.Z(e).toFixed(F||4),l=de?"".concat(i("placeholder.stopLoss")," ").concat(Oe).concat(r?" (".concat(r,")"):""):"".concat(ie," ").concat(ge(q)).concat(ne).concat(o);n.setText(l)}}}:void 0,onMove:ue?function(e){be({triggerProfitPrice:Number(G)?G:void 0,triggerStopPrice:null!=e?String(e):Y})}:void 0,onCancel:function(){R(s).catch((function(){}))}})))):"plan"===l?(Te=r.price,Pe=r.origQty,ke=r.executedQty,Me=r.orderSide,Ie=r.positionSide,Le=r.entrustType,Ae=r.stopPrice,je=r.triggerPriceType,Ne=Number(V)>Number(Ae)?"\u2264":"\u2265",De="".concat(i("market.orderForm.entrust.plan"),": ").concat(pe(Le,ve(Te,Ie))," ").concat(ge(je)).concat(Ne).concat(ve(Ae,Ie)),Ee=new a.Z(Pe).minus(ke||0),Re="TAKE_PROFIT_MARKET"===Le?L[t]:Te,c.push(Z({},d,{orderSide:Me,setText:"".concat(De),setPrice:Number(Ae),amount:Ee,setQuantity:A(Ee,t,Re).amount,onCancel:function(){E(s).then((function(){}))}}))):(Be=r.price,Fe=r.origQty,Ve=r.executedQty,Ue=r.orderSide,ze=r.positionSide,We=r.state,Ze=r.stopPrice,Qe=r.triggerPriceType,He=r.activationPrice,Ge=(["NOT_ACTIVATION","NOT_TRIGGERED"].includes(We)?Ze:Be)||He,Ye=Number(V)>Number(Ge)?"\u2264":"\u2265",Ke="".concat(i("trackOrder.title"),": ").concat(ge(Qe)).concat(Ye).concat(ve(Ge,ze)),qe=new a.Z(Fe).minus(Ve||0),c.push(Z({},d,{orderSide:Ue,setText:"".concat(Ke),setPrice:Number(Ge),amount:qe,setQuantity:A(qe,t,Ge).amount,onCancel:function(){B(s).then((function(){}))}}))),e.next=7,Promise.all(c.map((function(e){return(0,v.ci)(n,e)})));case 7:return Je=e.sent,"profit"===l&&Je.forEach((function(e){return e&&he(e)})),e.abrupt("return",Q(Je));case 10:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),be=function(){var e=z(o().mark((function e(t){var n,i,a,l,s,c,u,d,f,h,v,p,g,m,y,b,C,w,S,O,x,_,T,P,k;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=fe[t],i=ce.current,a=++ue.current[t],l=function(){return i!==ce.current||a!==ue.current[t]},(s=r.activeChart)&&s===de.current){e.next=7;break}return e.abrupt("return");case 7:if(c="profit"===t?le.current:null,!n.orderRef.current.length){e.next=58;break}u=!0,d=!1,f=void 0,e.prev=10,h=(n.list||[])[Symbol.iterator]();case 12:if(u=(v=h.next()).done){e.next=38;break}if(p=v.value,!c||p[n.adapterId]!==c){e.next=16;break}return e.abrupt("continue",35);case 16:for(g=[],m=0;m<n.orderRef.current.length;m++)n.orderRef.current[m].adapterId.match(p[n.adapterId])&&g.push(m);if(g.length){e.next=28;break}return e.next=21,ye(r.activeChart,p,t);case 21:if(y=e.sent,!l()){e.next=25;break}
1return y.forEach((function(e){return null===e||void 0===e?void 0:e.safeRemove()})),e.abrupt("return");case 25:y.map((function(e){n.orderRef.current.push(e),n.setProxy(n.orderRef.current.filter((function(e){return e})))})),e.next=35;break;case 28:return e.next=30,ye(r.activeChart,p,t);case 30:if(b=e.sent,!l()){e.next=34;break}return b.forEach((function(e){return null===e||void 0===e?void 0:e.safeRemove()})),e.abrupt("return");case 34:g.forEach((function(e,t){var r=n.orderRef.current.splice(e,1,b[t])[0];if(g.length<b.length)for(var o=g.length;o<b.length;o++)n.orderRef.current.splice(e+o,0,b[o]);null===r||void 0===r||r.safeRemove(),n.setProxy(n.orderRef.current.filter((function(e){return e})))}));case 35:u=!0,e.next=12;break;case 38:e.next=44;break;case 40:e.prev=40,e.t0=e.catch(10),d=!0,f=e.t0;case 44:e.prev=44,e.prev=45,u||null==h.return||h.return();case 47:if(e.prev=47,!d){e.next=50;break}throw f;case 50:return e.finish(47);case 51:return e.finish(44);case 52:if(!l()){e.next=54;break}return e.abrupt("return");case 54:C=n.orderRef.current.filter((function(e){if(c&&e.adapterId.match(c))return!0;var t=!0,r=!0,o=!1,i=void 0;try{for(var a,l=n.list[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){var s=a.value;if(e.adapterId.match(s[n.adapterId])){t=!1;break}}}catch(u){o=!0,i=u}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return t&&e.safeRemove(),!t})),n.setProxy(C.filter((function(e){return e}))),e.next=91;break;case 58:if(!n.list.length){e.next=91;break}w=[],S=!0,O=!1,x=void 0,e.prev=61,_=n.list[Symbol.iterator]();case 63:if(S=(T=_.next()).done){e.next=76;break}return P=T.value,e.next=67,ye(r.activeChart,P,t);case 67:if(k=e.sent,!l()){e.next=72;break}return w.forEach((function(e){return null===e||void 0===e?void 0:e.safeRemove()})),k.forEach((function(e){return null===e||void 0===e?void 0:e.safeRemove()})),e.abrupt("return");case 72:k.forEach((function(e){return w.push(e)}));case 73:S=!0,e.next=63;break;case 76:e.next=82;break;case 78:e.prev=78,e.t1=e.catch(61),O=!0,x=e.t1;case 82:e.prev=82,e.prev=83,S||null==_.return||_.return();case 85:if(e.prev=85,!O){e.next=88;break}throw x;case 88:return e.finish(85);case 89:return e.finish(82);case 90:n.setProxy(w.filter((function(e){return e})));case 91:case"end":return e.stop()}}),e,null,[[10,40,44,52],[45,,47,51],[61,78,82,90],[83,,85,89]])})));return function(t){return e.apply(this,arguments)}}(),Ce=function(e){try{var t,n=fe[e],r=(null===(t=n.orderRef.current)||void 0===t?void 0:t.splice(0))||[];n.setProxy([]),r.forEach((function(e){try{e.remove()}catch(t){}}))}catch(o){}},we=function(e){try{_.showCurrentOrder&&r.activeChart&&n&&be(e)}catch(t){}},Se=(0,l.useCallback)((function(){}),[_.showCurrentOrder,c,L[t],r.activeChart,n,P]);(0,l.useEffect)((function(){var e=r.activeChart;return e&&e!==de.current&&(ce.current++,Ce("limit"),Ce("profit"),Ce("plan"),Ce("track"),de.current=e),function(){ce.current++,Ce("limit"),Ce("profit"),Ce("plan"),Ce("track")}}),[r.activeChart]);var Oe=(0,l.useMemo)((function(){return I.filter((function(e){return e.symbol===t})).map((function(e){return"".concat(e.orderId,"_").concat(e.price,"_").concat(e.origQty,"_").concat(e.executedQty)})).join("|")}),[I,t]);(0,l.useEffect)((function(){_.showCurrentOrder&&r.activeChart?we("limit"):Ce("limit")}),[G.length,Oe,Se]);var xe=(0,l.useMemo)((function(){return N.filter((function(e){return e.symbol===t})).map((function(e){return"".concat(e.entrustId,"_").concat(e.stopPrice,"_").concat(e.price,"_").concat(e.origQty,"_").concat(e.state)})).join("|")}),[N,t]);(0,l.useEffect)((function(){_.showCurrentOrder&&r.activeChart?we("plan"):Ce("plan")}),[te.length,xe,Se]);var _e=(0,l.useMemo)((function(){return j.filter((function(e){return e.symbol===t})).map((function(e){return"".concat(e.profitId,"_").concat(e.triggerProfitPrice,"_").concat(e.triggerStopPrice,"_").concat(e.origQty,"_").concat(e.closeType,"_").concat(e.profitDelegatePrice,"_").concat(e.stopDelegatePrice)})).join("|")}),[j,t]);(0,l.useEffect)((function(){_.showCurrentOrder&&r.activeChart?we("profit"):Ce("profit")}),[J.length,_e,Se]);var Te=(0,l.useMemo)((function(){return D.filter((function(e){return e.symbol===t})).map((function(e){return"".concat(e.trackId,"_").concat(e.stopPrice,"_").concat(e.price,"_").concat(e.origQty,"_").concat(e.state)})).join("|")}),[D,t]);return(0,l.useEffect)((function(){_.showCurrentOrder&&r.activeChart?we("track"):Ce("track")}),[ie.length,Te,Se]),(0,l.useEffect)((function(){var e,t,n,r;null===(e=U.current)||void 0===e||e.map((function(e){return e.setQuantityTextColor(T===u.b.DARK?"rgba(255, 255, 255, 0.6)":"#666").setCancelButtonIconColor(T===u.b.DARK?"rgba(255, 255, 255, 0.6)":"#666").setQuantityBackgroun
1dColor(T===u.b.DARK?"#111114":"#fff").setCancelButtonBackgroundColor(T===u.b.DARK?"#111114":"#fff").setCancelButtonBorderColor(T===u.b.DARK?"rgba(255, 255, 255, 0.2)":"#ccc").setQuantityBorderColor(T===u.b.DARK?"rgba(255, 255, 255, 0.2)":"#ccc").setBodyBorderColor("BUY"===e.orderSide?(0,v.ji)():(0,v.BG)()).setBodyBackgroundColor("BUY"===e.orderSide?(0,v.ji)():(0,v.BG)()).setLineColor("BUY"===e.orderSide?(0,v.ji)():(0,v.BG)()),e})),null===(t=$.current)||void 0===t||t.map((function(e){return e.setQuantityTextColor(T===u.b.DARK?"rgba(255, 255, 255, 0.6)":"#666").setCancelButtonIconColor(T===u.b.DARK?"rgba(255, 255, 255, 0.6)":"#666").setQuantityBackgroundColor(T===u.b.DARK?"#111114":"#fff").setCancelButtonBackgroundColor(T===u.b.DARK?"#111114":"#fff").setCancelButtonBorderColor(T===u.b.DARK?"rgba(255, 255, 255, 0.2)":"#ccc").setQuantityBorderColor(T===u.b.DARK?"rgba(255, 255, 255, 0.2)":"#ccc").setBodyBorderColor("BUY"===e.orderSide?(0,v.ji)():(0,v.BG)()).setBodyBackgroundColor("BUY"===e.orderSide?(0,v.ji)():(0,v.BG)()).set
1LineColor("BUY"===e.orderSide?(0,v.ji)():(0,v.BG)()),e})),null===(n=K.current)||void 0===n||n.map((function(e){return he(e),e})),null===(r=re.current)||void 0===r||r.map((function(e){return e.setQuantityTextColor(T===u.b.DARK?"rgba(255, 255, 255, 0.6)":"#666").setCancelButtonIconColor(T===u.b.DARK?"rgba(255, 255, 255, 0.6)":"#666").setQuantityBackgroundColor(T===u.b.DARK?"#111114":"#fff").setCancelButtonBackgroundColor(T===u.b.DARK?"#111114":"#fff").setCancelButtonBorderColor(T===u.b.DARK?"rgba(255, 255, 255, 0.2)":"#ccc").setQuantityBorderColor(T===u.b.DARK?"rgba(255, 255, 255, 0.2)":"#ccc").setBodyBorderColor("BUY"===e.orderSide?(0,v.ji)():(0,v.BG)()).setBodyBackgroundColor("BUY"===e.orderSide?(0,v.ji)():(0,v.BG)()).setLineColor("BUY"===e.orderSide?(0,v.ji)():(0,v.BG)()),e}))}),[T]),(0,l.useEffect)((function(){G.forEach((function(e){var n=A(String(e.amount),t,String(L[t])).amount;e._line&&e.setQuantity((0,f.u5)(n))})),te.forEach((function(e){var n=A(String(e.amount),t,String(L[t])).amount;e._line&&e.setQuantity((0,f.u5)(n))})),J.forEach((function(e){var n=A(String(e.amount),t,String(L[t])).amount;e._line&&e.setQuantity((0,f.u5)(n))})),ie.forEach((function(e){var n=A(String(e.amount),t,String(L[t])).amount;e._line&&e.setQuantity((0,f.u5)(n))}))}),[s,t]),{draggingPricesRef:se}}({symbol:s,hasBars:c,activeChartMemo:h}).draggingPricesRef;return function(e){var t=e.symbol,n=e.hasBars,r=e.activeChartMemo,i=(0,l.useState)([]),s=i[0],c=i[1],u=(0,b.Z)().unitView,f=(0,y.ZP)().colorFlag,h=(0,d.oR)(),p=h.ui,g=h.account,m=h.order,C=h.ticker,w=h.futures,S=h.takeover,O=g.isLogin,x=p.tradeSetting,_=w.getUnitAmount,T=m.tradedHistoryOrderList,P=m.getTradedHistoryOrderList,k=m.klineAdlList,M=m.getKlineAdlList,I=S.klineTakeoverList,L=S.getKlineTakeoverList,A=C.getPrecision(t).price,j=(0,l.useMemo)((function(){var e=[];return T.forEach((function(n){n.symbol===t&&e.push({time:Number(n.updatedTime)/1e3,price:String(n.avgPrice),direction:"BUY"===String(n.orderSide).toUpperCase()?"buy":"sell",qty:String(n.executedQty),symbol:n.symbol,key:"trade-".concat(n.updatedTime,"-").concat(n.avgPrice)})})),I.forEach((function(n){var r;n.symbol===t&&e.push({time:Number(n.createdTime)/1e3,price:String(null!==(r=n.markPrice)&&void 0!==r?r:""),direction:"LONG"===n.positionSide?"sell":"buy",qty:String(n.positionSize),symbol:n.symbol,key:"takeover-".concat(n.id||n.createdTime)})})),k.forEach((function(n){if(n.symbol===t){var r,o,i,a,l,s=null!==(o=null!==(r=n.price)&&void 0!==r?r:n.markPrice)&&void 0!==o?o:"",c=null!==(l=null!==(a=null!==(i=n.quantity)&&void 0!==i?i:n.executedQty)&&void 0!==a?a:n.origQty)&&void 0!==l?l:"";e.push({time:Number(n.createdTime)/1e3,price:String(s),direction:"LONG"===n.positionSide?"sell":"buy",qty:String(c),symbol:n.symbol,key:"adl-".concat(n.entrustId||n.createdTime)})}})),e.filter((function(e){return e.time>0&&""!==e.price&&"NaN"!==e.price}))}),[t,T,I,k]),N=function(){var e=z(o().mark((function e(){var t,n,i,l,s,d,f,h,p,g,m,y,b,C;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=[],n=!0,i=!1,l=void 0,e.prev=2,s=j[Symbol.iterator]();case 4:if(n=(d=s.next()).done){e.next=17;break}if(f=d.value,h=f.time,p=f.price,g=f.direction,m=f.qty,y=f.symbol,b=Number(new a.Z(p).toFixed(A||2))){e.next=10;break}return e.abrupt("continue",14);case 10:return e.next=12,(0,v.BZ)(r.activeChart,{symbol:y,coin:u,executedQty:m,setTime:h,tradeId:f.key,setPrice:b,setDirection:g,amount:Number(_(String(m),y,String(p)).amount)});case 12:C=e.sent,t.push(C);case 14:n=!0,e.next=4;break;case 17:e.next=23;break;case 19:e.prev=19,e.t0=e.catch(2),i=!0,l=e.t0;case 23:e.prev=23,e.prev=24,n||null==s.return||s.return();case 26:if(e.prev=26,!i){e.next=29;break}throw l;case 29:return e.finish(26);case 30:return e.finish(23);case 31:c(Q(t));case 32:case"end":return e.stop()}}),e,null,[[2,19,23,31],[24,,26,30]])})));return function(){return e.apply(this,arguments)}}();(0,l.useEffect)((function(){if(t&&O&&x.showTradeRecord&&r.activeChart){var e="true"===localStorage.getItem("moneyChecked");P({symbol:t}),L({symbol:t,limit:100,welfareAccount:e}
1),M({symbol:t,limit:100,welfareAccount:e})}}),[t,x.showTradeRecord,O,r,P,L,M]);var D=function(){s.forEach((function(e){e.safeRemove()})),c([])};(0,l.useEffect)((function(){try{x.showTradeRecord&&j.length&&r.activeChart&&n?(D(),N()):D()}catch(e){}}),[x.showTradeRecord,j,f,r,n]),(0,l.useEffect)((function(){s.forEach((function(e){var n=Number(_(String(e.amount),t,String(e.price)).amount),r=(0,v._x)(e.direction,n,u,e.price);e._line&&e.setTooltip(r)}))}),[u,t,s,_])}({symbol:s,hasBars:c,activeChartMemo:h}),F({symbol:s,activeChart:null===h||void 0===h?void 0:h.activeChart,hasBars:c,klineLoading:n,tvWidget:e,draggingPricesRef:C}),function(e){var t=e.symbol,n=e.activeChartMemo,r=e.klineLoading,i=H().t,a=(0,d.oR)(),s=a.ticker,c=a.futures,f=a.ui,h=s.currentSymbolIdentity,p=c.positionListWithValue,g=f.theme,m=f.tradeSetting,y=(0,l.useRef)([]),b=(0,l.useRef)([]),C=c.getUnitAmount,w=c.latestPrice,S=(0,l.useMemo)((function(){return p.filter((function(e){return e.symbol===h}))}),[p,h]),O=(0,l.useMemo)((function(){var e=S.map((function(e){return{balancePrice:e.balancePrice,positionSide:e.positionSide,positionSize:e.positionSize}}));return y.current=e,y.current}),[S]),x=(0,l.useCallback)(function(){var e=z(o().mark((function e(n,r,a,l){var s,c,d,f,h;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=C(l,t,w),c=s.amount,d=s.unitView,f=i("kline.position.balancePriceLineTooltip",{price:r,value:"".concat(c," ").concat(d)}),e.next=4,(0,v.n8)(n,{orderSide:"LONG"===a?"BUY":"SELL",positionSide:a,setPrice:Number(r),setQuantity:r,symbol:t,adapterId:"".concat(t,"_").concat(r,"_").concat(a),setText:" ".concat(i("position.balancePrice")," "),setTooltip:f,setQuantityBackgroundColor:g===u.b.DARK?"#111114":"#fff",setQuantityBorderColor:g===u.b.DARK?"rgba(255, 255, 255, 0.2)":"#ccc",setLineColor:"rgba(102, 102, 102, 1)"});case 4:return h=e.sent,e.abrupt("return",h);case 6:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}(),[g,C,w,t,i]);(0,l.useEffect)((function(){if(n.activeChart)return m.showBalancePrice&&!r&&z(o().mark((function e(){var t,r,i,a,l,s,c;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=!0,r=!1,i=void 0,e.prev=1,a=O[Symbol.iterator]();case 3:if(t=(l=a.next()).done){e.next=12;break}return s=l.value,e.next=7,x(n.activeChart,s.balancePrice,s.positionSide,s.positionSize);case 7:(c=e.sent)&&b.current.push(c);case 9:t=!0,e.next=3;break;case 12:e.next=18;break;case 14:e.prev=14,e.t0=e.catch(1),r=!0,i=e.t0;case 18:e.prev=18,e.prev=19,t||null==a.return||a.return();case 21:if(e.prev=21,!r){e.next=24;break}throw i;case 24:return e.finish(21);case 25:return e.finish(18);case 26:case"end":return e.stop()}}),e,null,[[1,14,18,26],[19,,21,25]])})))(),function(){b.current.forEach((function(e){e.safeRemove()})),b.current=[]}}),[O,n,x,m.showBalancePrice,r]),(0,l.useEffect)((function(){var e,t=n.activeChart;if(t){var r=t._chartWidget;if(r){var o=null===(e=r._paneWidgets)||void 0===e?void 0:e._value,i=null===o||void 0===o?void 0:o[0];if(i){var a=Symbol.for("__origDrawActiveLineTools");if(!i[a]){var l=Object.getPrototypeOf(i);"function"===typeof l._drawActiveLineTools&&(i[a]=l._drawActiveLineTools)}var s=i[a];if("function"===typeof s){var c=0;return Object.defineProperty(i,"_drawActiveLineTools",{get:function(){return function(e,t){s.call(this,e,t);try{var n=this.state(),r=n.model().hoveredSource(),o=!1;if(r&&"function"===typeof r.id)for(var i=r.id(),a=b.current,l=0;l<a.length;l++)try{var u,d,f;if((null===(u=a[l])||void 0===u||null===(d=u._line)||void 0===d||null===(f=d.id)||void 0===f?void 0:f.call(d))===i){o=!0;break}}catch(B){continue}if(o&&(c=Date.now()),!c||Date.now()-c>=500)return;for(var h=b.current,v=new Set,p=0;p<h.length;p++)try{var g,m,y,C=null===(g=h[p])||void 0===g||null===(m=g._line)||void 0===m||null===(y=m.id)||void 0===y?void 0:y.call(m);null!=C&&v.add(C)}catch(B){continue}if(!v.size)return;var w=n.sourcesByGroup().tradingSources(),S=!0,O=!1,x=void 0;try{for(var _,T=w[Symbol.iterator]();!(S=(_=T.next()).done);S=!0){var P,k=_.value;if(v.has(k.id())){var M=null===(P=k.paneViews)||void 0===P?void 0:P.call(k,n);if(M){var I=!0,L=!1,A=void 0;try{for(var j,N=M[Symbol.iterator]();!(I=(j=N.next()).done);I=!0){var D,E=j.value,R=null===(D=E.renderer)||void 0===D?void 0:D.call(E,t);
1R&&(e.save(),R.draw(e,t),e.restore())}}catch(F){L=!0,A=F}finally{try{I||null==N.return||N.return()}finally{if(L)throw A}}}}}}catch(F){O=!0,x=F}finally{try{S||null==T.return||T.return()}finally{if(O)throw x}}}catch(B){}}},set:function(){},configurable:!0}),function(){i[a]&&Object.defineProperty(i,"_drawActiveLineTools",{value:i[a],writable:!0,configurable:!0})}}}}}}),[n])}({symbol:s,activeChartMemo:h,klineLoading:n}),{setKlineLoading:r}},q=function(e){return Z({},function(e){var t=e.activeChartMemo,n=(0,l.useRef)({}),r=(0,l.useCallback)((function(){var e;if(!t.activeChart)return!0;var r=n.current,o=r.horz,i=r.vert,a=r.outer,l=r.inner;return null===o||void 0===o||null===(e=o.safeRemove)||void 0===e||e.call(o),[i,a,l].forEach((function(e){if(e)try{t.activeChart.removeEntity(e)}catch(n){}})),n.current={},!0}),[t.activeChart]);(0,l.useEffect)((function(){return function(){r()}}),[r]);var o=(0,l.useCallback)((function(e){var o=e.price,i=e.time,a=e.symbol,l=e.positionSide,s=e.positionId;if(!t.activeChart)return!1;var c=Number(o);if(!Number.isFinite(c)||!Number.isFinite(i))return!1;r();var u=getComputedStyle(document.body).getPropertyValue("--Text_Icon-Tertiary-3")||"#9EA0A8",d=getComputedStyle(document.body).getPropertyValue("--Brand-Normal-1")||"#9EA0A8",f=getComputedStyle(document.body).getPropertyValue("--Brand-Container-5")||"#abe12726",h={linecolor:u,linestyle:2,linewidth:1,showLabel:!0,textcolor:u},p={disableSelection:!0,disableSave:!0,disableUndo:!0,lock:!0},g=null;try{g=(0,v.n8)(t.activeChart,{orderSide:"LONG"===l?"BUY":"SELL",positionSide:l,setPrice:c,symbol:a,adapterId:s,setText:"".concat("LONG"===l?"\u2197":"\u2198"," ").concat(c),setLineColor:u,hideQuantity:!0})}catch(C){}var m=t.activeChart.createShape({time:i},Z({shape:"vertical_line"},p,{overrides:Z({},h)})),y=t.activeChart.createShape({time:i,price:c},Z({shape:"icon"},p,{zOrder:"top",overrides:{icon:61713,color:f,size:16,fill:!0}})),b=t.activeChart.createShape({time:i,price:c},Z({shape:"icon"},p,{zOrder:"top",overrides:{icon:61713,size:8,color:d}}));return n.current={horz:g,vert:m,outer:y,inner:b},!0}),[t,r]);return{showLine:(0,l.useCallback)((function(e){var t=e.price,n=e.time,r=e.symbol,i=e.positionSide,a=e.positionId;try{return o({price:t,time:c()(n).unix(),symbol:r,positionSide:i,positionId:a})}catch(l){return!1}}),[o]),clearLine:r}}({activeChartMemo:Y(e,"eventFutures").activeChartMemo}))}},20554:function(e,t,n){"use strict";var r=n(99169),o=n(75271),i=n(16052);t.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"OPEN",t=(0,i.oR)().ticker,n=t.currentSymbolConfig,a=t.availablePrice,l=n.marketOpenTakeBound,s=n.marketCloseTakeBound,c=n.contractType,u=n.maxPrice,d=n.minPrice,f="PREDICT"===c,h="OPEN"===e?l:s,v=(0,o.useMemo)((function(){if(f){var e=new r.O(a).plus(h);return e.gt(u)?u.toString():e.toString()}return new r.O(a).times(new r.O(1).plus(h)).toString()}),[h,a]),p=(0,o.useMemo)((function(){if(f){var e=new r.O(a).minus(h);return e.lt(d)?d.toString():e.toString()}return new r.O(a).times(new r.O(1).minus(h)).toString()}),[h,a]);return{buyMarketPriceForOrder:v,sellMarketPriceForOrder:p}}},57934:function(e,t,n){"use strict";var r=n(75271),o=n(16052),i=n(99169),a=n(6939);t.Z=function(){var e=(0,o.oR)(),t=e.ticker,n=e.futures,l=e.ui,s=t.currentSymbolConfig,c=t.getLeverageMaxBracket,u=n.currentSymbolPositionValue,d=n.currentSymbolOrderValue,f=n.balanceData,h=n.userCurrentSymbolConfig,v=n.currentFee,p=n.currentMarket,g=f.availableBalanceDisplay,m=f.availableBalanceReal,y=f.depositCoupon,b=void 0===y?"0":y,C=f.availableDepositCoupon,w=void 0===C?"0":C,S=f.crossedMargin,O=f.openOrderMarginFrozen,x=s.contractSize,_=s.isInRiskControl,T=s.riskNominalValueCoefficient,P=h.long,k=h.short,M=P.leverage,I=k.leverage,L=v.takerFee,A=p.isPredictContract,j=(l.unitSetting,(0,r.useCallback)((function(e,t){var n=new i.O(0);return e&&t&&(n=A?new i.O(x).times(t).times(new i.O(L).times(2).plus(new i.O(1/M).times(e))):new i.O((0,a.NA)(e,t,x)).times(new i.O(1/M))),n.isNaN()?"0":n.valueOf()}),[M,L,x])),N=(0,r.useCallback)((function(e){var t=new i.O(0);if(e)if(A)t=new i.O(g).dividedBy(new i.O(x).times(new i.O(L).times(2).plus(new i.O(1/
1M).times(e))));else{var n,r=(null===(n=c(M))||void 0===n?void 0:n.maintMarginRate)||0,o=new i.O(w),a=new i.O(0),l=new i.O(0);o.gt(0)&&(l=o.dividedBy(new i.O(e).times(x).times(new i.O(1/M)))).gte(1)&&(a=l.integerValue().times(e).times(x).times(new i.O(r).plus(L)));var s=i.O.max(new i.O(m).minus(i.O.min(new i.O(S).plus(O),new i.O(b).minus(w)).times(M).times(r)),0);t=a.gte(s)?new i.O(s).dividedBy(new i.O(r).plus(L).times(e).times(x)):new i.O(s).minus(a).dividedBy(new i.O(e).times(x).times(new i.O(1/M).plus(new i.O(L)))).plus(l)}return t.isNaN()?"0":t.toFixed(0,1)}),[w,m,g,x,L,M,S,O,b]),D=(0,r.useCallback)((function(e){var t=c(M),n=u.long,r=d.long,o=new i.O(0);if(t){var a=t.maxNominalValue;o=new i.O(a).multipliedBy(_?T:1).minus(n).minus(r).dividedToIntegerBy(new i.O(A?1:e).times(x))}return o.isNaN()?"0":o.toFixed(0,1)}),[x,M,u.long,d.long,_,T]),E=(0,r.useCallback)((function(e,t){var n=new i.O(0);if(e&&t)if(A)n=new i.O(x).times(t).times(new i.O(L).times(2).plus(new i.O(1/I).times(e)));else{var r;null===(r=c(I))||void 0===r||r.maintMarginRate;n=new i.O((0,a.NA)(e,t,x)).times(new i.O(1/I))}return n.isNaN()?"0":n.valueOf()}),[x,L,I]),R=(0,r.useCallback)((function(e){var t=new i.O(0);if(e)if(A)t=new i.O(g).dividedBy(new i.O(x).times(new i.O(L).times(2).plus(new i.O(1/I).times(e))));else{var n,r=(null===(n=c(I))||void 0===n?void 0:n.maintMarginRate)||0,o=new i.O(w),a=new i.O(0),l=new i.O(0);o.gt(0)&&(l=o.dividedBy(new i.O(e).times(x).times(new i.O(1/I)))).gte(1)&&(a=l.integerValue().times(e).times(x).times(new i.O(r).plus(L)));var s=i.O.max(new i.O(m).minus(i.O.min(new i.O(S).plus(O),new i.O(b).minus(w)).times(I).times(r)),0);t=a.gte(s)?new i.O(s).dividedBy(new i.O(r).plus(L).times(e).times(x)):new i.O(s).minus(a).dividedBy(new i.O(e).times(x).times(new i.O(1/I).plus(L))).plus(l)}return t.isNaN()?"0":t.toFixed(0,1)}),[w,m,g,x,L,I,S,O,b]),B=(0,r.useCallback)((function(e){var t=new i.O(0);if(e){var n,r=(null===(n=c(I))||void 0===n?void 0:n.maintMarginRate)||0,o=c(I);if(r&&o){var a=o.maxNominalValue;t=new i.O(a).multipliedBy(_?T:1).minus(u.short).minus(d.short).dividedBy(new i.O(A?1:e).times(x))}}return t.isNaN()?"0":t.toFixed(0,1)}),[x,I,u.short,d.short,_,T]);return{getLongMargin:j,getUserLongMaxOpen:function(e){var t=new i.O(0);return e&&(t=i.O.max(0,i.O.min(D(e),N(e)))),t.isNaN()?"0":t.toFixed(0,1)},getBalanceLongMaxOpen:N,getBracketLongMaxAmount:D,getShortMargin:E,getUserShortMaxOpen:function(e){var t=new i.O(0);return e&&(t=i.O.max(0,i.O.min(B(e),R(e)))),t.isNaN()?"0":t.toFixed(0,1)},getBalanceShortMaxOpen:R,getBracketShortMaxAmount:B}}},52735:function(e,t,n){"use strict";var r=n(75271),o=n(16052),i=n(99169);t.Z=function(){var e=(0,o.oR)(),t=e.ticker,n=e.futures,a=e.ui,l=t.currentSymbolConfig,s=t.getLeverageMaxBracket,c=n.currentSymbolPositionValue,u=n.currentSymbolOrderValue,d=n.balanceData,f=n.userCurrentSymbolConfig,h=n.currentFee,v=d.availableBalanceDisplay,p=l.contractSize,g=f.long,m=f.short,y=g.leverage,b=m.leverage,C=h.takerFee,w=(a.unitSetting,(0,r.useCallback)((function(e,t){null===(n=s(y))||void 0===n||n.maintMarginRate;var n,r="0";return e&&t&&(r=new i.O(t).times(p).times(1/y).div(e)),r.isNaN()?"0":r.valueOf()}),[y,C,p])),S=(0,r.useCallback)((function(e){null===(t=s(y))||void 0===t||t.maintMarginRate;var t,n=e?new i.O(v).div(new i.O(p).times(new i.O(1/y).plus(C)).div(e)):new i.O(0);return n.isNaN()?"0":n.valueOf()}),[v,p,C,y]),O=(0,r.useCallback)((function(e){var t=s(y),n=c.long,r=u.long,o=new i.O(0);if(t){var a=t.maxNominalValue;o=new i.O(a).minus(n).minus(r).times(e).div(p)}return o.isNaN()?"0":o.valueOf()}),[p,y,c.long,u.long]),x=(0,r.useCallback)((function(e,t){var n=new i.O(0);return e&&t&&(n=new i.O(t).times(p).times(new i.O(1/b)).div(e)),n.isNaN()?"0":n.valueOf()}),[p,C,b]),_=(0,r.useCallback)((function(e){var t=new i.O(0);return e&&(t=new i.O(v).div(new i.O(p).times(new i.O(1/b).plus(C)).div(e))),t.isNaN()?"0":t.valueOf()}),[v,p,C,b]),T=(0,r.useCallback)((function(e){var t=new i.O(0);if(e){var n=s(b);if(n){var r=c.short,o=u.short,a=n.maxNominalValue;t=new i.O(a).minus(r).minus(o).times(e).div(p)}}return t.isNaN()?"0":t.valueOf()}),[p,b,c.short,u.short]);return{getLongMargin:w,getUserLongMaxOpen:function(e){var t=new i.O(0);return e&&(t=i.O.max(0,i.O.min(O(e),S(e)))),t.isNaN()?"0":t.toFixed(0,1)},getBalanceLongMaxOpen:S,getBracketLongMaxAmount:O,getShortMargin:x,getUserShortMaxOpen:function(e){var t=new i.O(0);
1return e&&(t=i.O.max(0,i.O.min(T(e),_(e)))),t.isNaN()?"0":t.toFixed(0,1)},getBalanceShortMaxOpen:_,getBracketShortMaxAmount:T}}},85850:function(e,t,n){"use strict";n.d(t,{Q:function(){return a}});var r=n(75271),o=n(16052),i=n(65389),a=function(){var e=(0,o.oR)(),t=e.order.fetchCreateOrder,n=e.position.fetchPositionList,a=(0,r.useState)(!1),l=a[0],s=a[1],c=(0,r.useCallback)((function(e){l||(s(!0),t(e).then((function(){n()})).finally((function(){s(!1)})))}),[t,n,l]),u=function(e){var t=(0,o.oR)().ui,n=t.orderConfirms,a=t.openGlobalModal,l=(0,r.useCallback)((function(t){var n=t.positionSize,r=t.positionSide,o={symbol:t.symbol,origQty:Number(n),orderType:"MARKET",timeInForce:"IOC",sourceType:4,positionSide:r,orderSide:"SHORT"===r?"BUY":"SELL",bestEffort:!0};e(o)}),[e]),s=(0,r.useCallback)((function(e){n.backhandOrderConfirm?a(i.w.REVERSE_CONFIRM,e):l(e)}),[n,a,l]);return{reversePosition:l,reversePositionConfirm:s}}(c),d=u.reversePosition,f=u.reversePositionConfirm,h=function(e){return{closeOrderForMarket:(0,r.useCallback)((function(t){var n={symbol:t.symbol,origQty:Number(t.positionSize),orderType:"MARKET",timeInForce:"IOC",sourceType:1001,welfareClose:t.welfareAccount,giftClose:t.giftAccount,positionSide:t.positionSide,orderSide:"SHORT"===t.positionSide?"BUY":"SELL"};e(n)}),[e])}}(c).closeOrderForMarket;return{ordering:l,createOrder:c,reversePosition:d,reversePositionConfirm:f,closeOrderForMarket:h}}},48203:function(e,t,n){"use strict";var r=n(99169),o=n(57934),i=n(52735),a=n(16052);t.Z=function(e){var t=e.longSheetAmount,n=e.shortSheetAmount,l=e.buyPrice,s=e.sellPrice,c=(0,a.oR)().underlying.isUBased,u=(0,i.Z)(),d=u.getBalanceLongMaxOpen,f=u.getBalanceShortMaxOpen,h=u.getBracketLongMaxAmount,v=u.getBracketShortMaxAmount,p=(0,o.Z)(),g=p.getBalanceLongMaxOpen,m=p.getBalanceShortMaxOpen,y=p.getBracketLongMaxAmount,b=p.getBracketShortMaxAmount;return{invalidBalanceMaxOpen:function(e){if("LONG"===e.side){var o=c?g(l):d(l);return new r.O(t||0).gt(o)}var i=c?m(s):f(s);return new r.O(n||0).gt(i)},invalidBracketMaxAmount:function(e){if("LONG"===e.side){var o=c?y(l):h(l);return new r.O(t||0).gt(o)}var i=c?b(s):v(s);return new r.O(n||0).gt(i)}}}},28271:function(e,t,n){"use strict";n.d(t,{RX:function(){return l},WB:function(){return a},iX:function(){return i},u1:function(){return s}});var r=n(72817),o={name:"futures",store:"public"},i=(0,r.fK)({name:"xt.thanos.uEntrustType",layer:"idb",legacyAliases:[{key:"u_entrust_type",layer:"idb",db:o}]}),a=(0,r.fK)({name:"xt.thanos.cEntrustType",layer:"idb",legacyAliases:[{key:"c_entrust_type",layer:"idb",db:o}]}),l=(0,r.fK)({name:"xt.thanos.trackProfitWithdrawConfirmNeverPrompt",layer:"idb",legacyAliases:[{key:"TRACK_PROFIT_WITHDRAW_CONFIRM_NEVER_PROMPT",layer:"idb",db:o}]}),s=(0,r.fK)({name:"xt.thanos.premarketTipDismissed",layer:"idb",legacyAliases:[{key:"PREMARKET_TIP_DISMISSED",layer:"idb",db:o}]})},28652:function(e,t,n){"use strict";n.d(t,{Am:function(){return d},kh:function(){return u},q7:function(){return f}});var r=n(96740),o=n(16339),i=n(15979),a=n(16052),l=n(99169);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){s(e,t,n[t])}))}return e}var u=function(e,t){var n=e.replace(/_(index|mark)$/,"");1===n.split("_").length&&(n="".concat(n,"_usdt"));var l=a.ZP.ticker.getSymbolConfig(n),s=l.pair,u=l.contractType,d=(0,o.jg)(u),f=d?i.bl.DILIVERY_TICKER_KLINE:i.bl.TICKER_KLINE;return d&&(t=c({},t,{pair:s,contractType:u})),r.E$.get(f,{params:t})},d=function(e,t){var n=e.replace(/_(index|mark)$/,"");return 1===n.split("_").length&&(n="".concat(n,"_usdt")),r.E$.get(i.bl.EVENT_FUTURES_KLINE,{params:c({},t,{symbol:n})})},f=function(e){if(!e||0==e.length)return e;var t=a.ZP.futures.dealData;if(t&&t.length){var n=t[0];n.s==e[0].s&&(e[0].h&&!new l.Z(e[0].h).lt(new l.Z(n.p))||(e[0].h=n.p),e[0].l&&!new l.Z(e[0].l).gt(new l.Z(n.p))||(e[0].l=n.p),e[0].c=n.p)}return e}},45917:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(73771),o=n.n(r);function i(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(c){return void n(c)}l.done?t(s):Promise.resolve(s).then(r,o)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function l(e){i(a,r,o,l,s,"next",e)}function s(e){i(a,r,o,l,s,"throw",e)}l(void 0)}))}}function l(e){return s.apply(this,arguments)}function s(){return(s=a(o().mark((function e(t){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=null,e.next=3,new Promise((function(e){n=setTimeout((function(){e(),n&&clearTimeout(n)}),t)}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},91446:function(e,t,n){"use strict";n.d(t,{E:function(){return l}});var r,o=n(16339),i=n(97495),a=n(4283);i.cf.XtAxios,"undefined"!=typeof a&&(r=a.env);var l=function(e,t){var n=e;return(0,o.jg)(t)&&(n=e.split("_").slice(0,2).join("_")+o.Zb[t]),n}},79086:function(e,t,n){"use strict";var r;n.d(t,{B5:function(){return r},GT:function(){return o}}),function(e){e.default="default",e.index="index",e.mark="mark"}(r||(r={}));var o=function(e,t){if(!e)return e;var n=e.split("_");if(function(){switch(n.at(-1)){case"index":return r.index;case"mark":return r.mark;default:return r.default}}()===t)return e;var o="usd"===n.at(1);if(o&&3===n.length)return"".concat(n.join("_"),"_").concat(t);if(o&&t===r.default)return"".concat(n.slice(0,-1).join("_"));if(o)return"".concat(n.slice(0,-1).join("_"),"_").concat(t);var i=n.length>2&&n.at(2).match(/^[0-9]+$/);return i&&3===n.length?"".concat(n.join("_"),"_").concat(t):i&&t===r.default?"".concat(n.slice(0,-1).join("_")):i?"".concat(n.slice(0,-1).join("_"),"_").concat(t):t===r.default?"".concat(n.slice(0,-1).join("_"),"_USDT"):"".concat(n.slice(0,-1).join("_"),"_").concat(t)}},61468:function(e,t,n){"use strict";n.d(t,{BG:function(){return b},BZ:function(){return A},_x:function(){return L},ci:function(){return M},gM:function(){return C},hm:function(){return S},ji:function(){return y},n8:function(){return P}});var r=n(73771),o=n.n(r),i=n(99169),a=n(5185),l=n(62171),s=n(1386),c=n(6939),u=n(91457);function d(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(c){return void n(c)}l.done?t(s):Promise.resolve(s).then(r,o)}function f(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){d(i,r,o,a,l,"next",e)}function l(e){d(i,r,o,a,l,"throw",e)}a(void 0)}))}}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){h(e,t,n[t])}))}return e}function p(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var g="#fff",m="#1A1A1A",y=function(){return getComputedStyle(document.body).getPropertyValue("--xt-color-green")},b=function(){return getComputedStyle(document.body).getPropertyValue("--xt-color-red")},C=function(e){var t=getComputedStyle(document.body).getPropertyValue("--xt-color-rise"),n=getComputedStyle(document.body).getPropertyValue("--xt-color-down");return e?t:n},w=function(e){var t,n=e.entry,r=e.latest,o=e.isLong,a=e.isTP,l=e.leverage,s=e.pricePrecision,c=e.isCoinBased,u=l>0?l:1,d=Math.pow(10,-s),f=o===a,h=f?i.Z.ROUND_CEIL:i.Z.ROUND_FLOOR;if(c){var v=f?1-1/u/100:1+1/u/100;t=Number(new i.Z(n).div(v).toFixed(s,h))}else{var p=f?1+1/u/100:1-1/u/100;t=Number(new i.Z(n).multipliedBy(p).toFixed(s,h))}return f&&t<=n?t=Number(new i.Z(n).plus(d).toFixed(s)):!f&&t>
1=n&&(t=Number(new i.Z(n).minus(d).toFixed(s))),r<=0?t:f?Math.max(r,t):Math.min(r,t)},S=function(e){var t=e.triggerProfitPrice,n=e.triggerStopPrice,r=e.entryPrice,o=e.latestPrice,a=void 0===o?0:o,l=e.isLong,c=e.pricePrecision,d=e.leverage,f=void 0===d?1:d,h=e.isCoinBased,p=void 0!==h&&h,g={},m={entry:Number(r),latest:Number(a),isLong:l,leverage:f,pricePrecision:c,isCoinBased:p};if(null!=t){var y=new i.Z(t),b=w(v({},m,{isTP:!0}));(l?y.isLessThan(b):y.isGreaterThan(b))&&(g.triggerProfitPrice=Number(new i.Z(b).toFixed(c)),u.ZP.error({message:"".concat(l?s.Z.t("kline.position.long.profit.tips"):s.Z.t("kline.position.short.profit.tips")," ").concat(r),offset:60}))}if(null!=n){var C=new i.Z(n),S=w(v({},m,{isTP:!1}));(l?C.isGreaterThan(S):C.isLessThan(S))&&(g.triggerStopPrice=Number(new i.Z(S).toFixed(c)),u.ZP.error({message:"".concat(l?s.Z.t("kline.position.long.stop.tips"):s.Z.t("kline.position.short.stop.tips")," ").concat(r),offset:60}))}return g},O=function(){return{setBodyTextColor:getComputedStyle(document.body).getPropertyValue("--Others-Anti-1"),setBodyBorderColor:y(),setBodyBackgroundColor:y(),setQuantityTextColor:y(),setQuantityBorderColor:y(),setQuantityBackgroundColor:m,setCancelButtonIconColor:g,setCancelButtonBorderColor:m,setCancelButtonBackgroundColor:m,setLineColor:y()}},x=function(){return{setBodyTextColor:g,setBodyBorderColor:b(),setBodyBackgroundColor:b(),setQuantityTextColor:b(),setQuantityBorderColor:b(),setQuantityBackgroundColor:m,setCancelButtonIconColor:g,setCancelButtonBorderColor:m,setCancelButtonBackgroundColor:m,setLineColor:b()}},_=function(){var e=(0,l.H9)();return"0"==String(e)?[y(),b()]:[b(),y()]},T=function(e){var t=(0,l.H9)();return"0"==String(t)?"BUY"===e?O():x():"BUY"===e?x():O()};function P(e,t){return k.apply(this,arguments)}function k(){return(k=f(o().mark((function e(t,n){var r,i,l,s,c,u,d,f,h,g,m,y,b,C,w,S,O,x,_,P,k,M,I,L,A,j,N,D,E;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.positionSide,void 0===r?"LONG":r,i=p(n,["positionSide"]),l=v({},T(i.orderSide),i),c=(s=null!==l&&void 0!==l?l:{}).amount,u=s.symbol,d=s.adapterId,f=s.setText,h=s.setPrice,g=s.setQuantity,m=s.hideQuantity,y=s.setQuantityTextColor,b=s.setQuantityBorderColor,C=s.setQuantityBackgroundColor,w=s.setBodyTextColor,S=s.setBodyBorderColor,O=s.setBodyBackgroundColor,x=s.setLineColor,_=s.setLineLength,P=void 0===_?100:_,k=s.setLineStyle,M=void 0===k?2:k,I=s.setExtendLeft,L=void 0!==I&&I,A=s.setQuantityFont,j=void 0===A?"bold 12px ''":A,N=s.setTooltip,t&&t.dataReady()){e.next=5;break}return e.abrupt("return",null);case 5:return e.prev=6,e.next=9,t.createOrderLine();case 9:D=e.sent,e.next=15;break;case 12:return e.prev=12,e.t0=e.catch(6),e.abrupt("return",null);case 15:return D.setCancellable(!1).setQuantityTextColor(y).setQuantityBorderColor(b).setQuantityBackgroundColor(C).setBodyTextColor(w).setBodyBorderColor(S).setBodyBackgroundColor(O).setLineColor(x).setLineLength(P).setLineStyle(M).setExtendLeft(L).setQuantityFont(j).setBodyFont(j),null!=h&&(E=h,D.onMove((function(){D.setPrice(E)}))),f&&D.setText(f),h&&D.setPrice(h),g&&D.setQuantity(g),m&&D.setQuantity("\xa0").setQuantityBorderColor("transparent").setQuantityBackgroundColor("transparent"),N&&D.setTooltip(N),D.uuid=(0,a.Z)(),D.price=h,D.symbol=u,D.amount=c,D.adapterId=d,D.safeRemove=function(){return this._line&&this.remove(),this},e.abrupt("return",D);case 29:case"end":return e.stop()}}),e,null,[[6,12]])})))).apply(this,arguments)}function M(e,t){return I.apply(this,arguments)}function I(){return(I=f(o().mark((function e(t,n){var r,i,l,s,u,d,f,h,g,m,y,b,C,w,S,O,x,_,P,k,M,I,L,A,j,N,D,E,R,B,F,V,U,z,W,Z,Q;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.orderSide,i=void 0===r?"BUY":r,l=p(n,["orderSide"]),u=v({},T(i),l),f=(d=null!==u&&void 0!==u?u:{}).onMove,h=d.onMoving,g=d.onCancel,m=d.amount,y=d.symbol,b=d.adapterId,C=d.setText,w=d.setPrice,S=d.setQuantity,O=d.setQuantityTextColor,x=d.setQuantityBorderColor,_=d.setQuantityBackgroundColor,P=d.setBodyTextColor,k=d.setBodyBorderColor,M=d.setBodyBackgroundColor,I=d.setCancelTooltip,L=d.setCancelButtonIconColor,A=d.setCancelButtonBorderColor,j=d.setCancelButtonBackgroun
1dColor,N=d.setLineColor,D=d.setLineLength,E=void 0===D?100:D,R=d.setLineLengthUnit,B=d.setLineStyle,F=void 0===B?2:B,V=d.setExtendLeft,U=void 0!==V&&V,z=d.setQuantityFont,W=void 0===z?"bold 12px ''":z,Z=d.setTooltip,t&&t.dataReady()){e.next=6;break}return e.abrupt("return");case 6:return e.next=8,t.createOrderLine();case 8:return(Q=e.sent).setQuantityTextColor(O).setQuantityBorderColor(x).setQuantityBackgroundColor(_).setBodyTextColor(P).setBodyBorderColor(k).setBodyBackgroundColor(M).setCancelButtonIconColor(L).setCancelButtonBorderColor(A).setCancelButtonBackgroundColor(j).setLineColor(N).setLineLength(E,R).setLineStyle(F).setExtendLeft(U).setBodyFont(W).setQuantityFont(W),g&&Q.onCancel(g),I&&Q.setCancelTooltip(I),C&&Q.setText("".concat(C," ")),w&&Q.setPrice(w),S&&Q.setQuantity("".concat((null===S||void 0===S||null===(s=S.startsWith)||void 0===s?void 0:s.call(S,"+"))?"+":"").concat((0,c.u5)(S))),u.noQuantity&&Q.setQuantity("").setQuantityBorderColor("rgba(0,0,0,0)").setQuantityBackgroundColor("rgba(0,0,0,0)").setQuantityTextColor("rgba(0,0,0,0)").setQuantityFont("0px ''"),h&&Q.onMoving((function(){return h(Q.getPrice())})),f&&Q.onMove((function(){return f(Q.getPrice())})),Z&&Q.setTooltip(Z),Q.uuid=(0,a.Z)(),Q.price=w,Q.orderSide=i,Q.isTP=u.isTP,Q.noQuantity=u.noQuantity,Q.amount=m,Q.symbol=y,Q.adapterId=b,Q.safeRemove=function(){return this._line&&this.remove(),this},Q.setOrderSide=function(e,t){var n=t.force;if(e!==Q.orderSide||n){Q.orderSide=e;var r=v({},T(e),null!==t&&void 0!==t?t:{}),o=null!==r&&void 0!==r?r:{},i=o.setQuantityTextColor,a=o.setQuantityBorderColor,l=o.setQuantityBackgroundColor,s=o.setBodyTextColor,c=o.setBodyBorderColor,u=o.setBodyBackgroundColor,d=o.setCancelButtonIconColor,f=o.setCancelButtonBorderColor,h=o.setCancelButtonBackgroundColor,p=o.setLineColor;Q.setQuantityTextColor(i).setQuantityBorderColor(a).setQuantityBackgroundColor(l).setBodyTextColor(s).setBodyBorderColor(c).setBodyBackgroundColor(u).setCancelButtonIconColor(d).setCancelButtonBorderColor(f).setCancelButtonBackgroundColor(h).setLineColor(p)}return Q},e.abrupt("return",Q);case 30:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var L=function(e,t,n,r){var o=s.Z.t("market.orderForm.08");return"sell"===e&&(o=s.Z.t("market.orderForm.09")),"".concat(o," ").concat(t," ").concat(n.toUpperCase()," @ ").concat(r)};function A(e,t){return j.apply(this,arguments)}function j(){return(j=f(o().mark((function e(t,n){var r,i,l,s,c,u,d,f,h,v,p,m,y,b,C,w;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.setTime,i=n.setPrice,l=n.setTooltip,s=n.setTextColor,c=void 0===s?g:s,u=n.setDirection,d=void 0===u?"buy":u,f=n.coin,h=n.amount,v=n.tradeId,p=n.symbol,m=n.executedQty,t){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,t.createExecutionShape();case 5:return y=e.sent,b=l,i&&f&&h&&(b=L(d,h,f,i)),C=_(),w="buy"==d?C[0]:C[1],y.setTextColor(c).setDirection(d).setArrowColor(w),y.uuid=(0,a.Z)(),y.symbol=p,y.tradeId=v,y.amount=m,y.price=i,y.direction=d,y.safeRemove=function(){return this._line&&this.remove(),this},r&&y.setTime(r),i&&y.setPrice(i),b&&y.setTooltip(b),e.abrupt("return",y);case 22:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},31626:function(e){e.exports={__next:"numberInput___next__wP1wH",next:"numberInput___next__wP1wH",input:"numberInput_input__YKYWk",disabled:"numberInput_disabled___h1h_",simpleInput:"numberInput_simpleInput__E8Amw"}},82392:function(e){e.exports={__next:"unitSettingModal___next__erIYK",next:"unitSettingModal___next__erIYK",container:"unitSettingModal_container__6dWM0",radioGroup:"unitSettingModal_radioGroup__Ay9Wv",mainRadioItem:"unitSettingModal_mainRadioItem__nFG2E",mainContent:"unitSettingModal_mainContent__sN1zs",radioLabel:"unitSettingModal_radioLabel___By0r",description:"unitSettingModal_description__uNHtF",subRadioGroup:"unitSettingModal_subRadioGroup__tc_4P",radioItem:"unitSettingModal_radioItem__qLZv9",active:"unitSettingModal_active__DC5av",angleIcon:"unitSettingModal_angleIcon__UIqYa",itemMenu:"unitSettingModal_itemMenu__ROl7d",unitLabel:"unitSettingModal_unitLabel__FV9Ra",menuContainer:"unitSettingModal_menuContainer__Mx81Q",icon:"unitSettingModal_icon__X9CSC",transferModal:"unitSettingModal_transferModal__9MAdy",isCalculator:"unitSettingModal_isCalculator__UH6w1"}},96225:function(e){e.exports={__next:"scrollPagination___next__KjKKj",next:"scrollPagination___next__KjKKj",container:"scrollPagination_container__3_PU2",left:"scrollPagination_left__B2rCF",center:"scrollPagination_center__aNL7z",right:"scrollPagination_right__EaNJC",btn:"scrollPagination_btn__2R0tm"}},63804:function(e){e.exports={__next:"svgicon___next__xFiNY",next:"svgicon___next__xFiNY",container:"svgicon_container__2S9Mn"}},50804:function(e){e.exports={__next:"tradingView___next__8taGY",next:"tradingView___next__8taGY",custom:"tradingView_custom__iX6s6","tool-item":"tradingView_tool-item__S0x5z",toolItem:"tradingView_tool-item__S0x5z",active:"tradingView_active__35oOs","tags-box":"tradingView_tags-box__idIFR",tagsBox:"tradingView_tags-box__idIFR",tradingviewWrapper:"tradingView_tradingviewWrapper__eVFzb",tradingview:"tradingView_tradingview__w9f86","tradingview-container":"tradingView_tradingview-container__gS0Ld",tradingviewContainer:"tradingView_tradingview-container__gS0Ld","tool-link":"tradingView_tool-link__A6Bk1",toolLink:"tradingView_tool-link__A6Bk1","tool-bar":"tradingView_tool-bar__Yhm24",toolBar:"tradingView_tool-bar__Yhm24","show-tool":"tradingView_show-tool__cKMlq",showTool:"tradingView_show-tool__cKMlq",draggable:"tradingView_draggable___so21","trading-view-function-icon":"tradingView_trading-view-function-icon__Cxv7n",tradingViewFunctionIcon:"tradingView_trading-view-function-icon__Cxv7n",checked:"tradingView_checked__JdQj0",settingPopoverCls:"tradingView_settingPopoverCls__ujSXo",settingContentCls:"tradingView_settingContentCls__W_BGK",settingItem:"tradingView_settingItem__cPkzE",recordTipCls:"tradingView_recordTipCls__1TWcV",toolTipCls:"tradingView_toolTipCls__VwVHg",tools:"tradingView_tools__dNl7Q",indexPriceUnavailable:"tradingView_indexPriceUnavailable__AAHjx"}},82946:function(e){e.exports={__next:"klineTypeSwitch___next__7GbK7",next:"klineTypeSwitch___next__7GbK7","list-container":"klineTypeSwitch_list-container__ICFJj",listContainer:"klineTypeSwitch_list-container__ICFJj","list-division":"klineTypeSwitch_list-division__0_lN4",listDivision:"klineTypeSwitch_list-division__0_lN4","list-item":"klineTypeSwitch_list-item__elydi",listItem:"klineTypeSwitch_list-item__elydi","list-item-active":"klineTypeSwitch_list-item-active__CO5f0",listItemActive:"klineTypeSwitch_list-item-active__CO5f0","item-icon":"klineTypeSwitch_item-icon__LEIdO",itemIcon:"klineTypeSwitch_item-icon__LEIdO","item-text":"klineTypeSwitch_item-text__1TcPa",itemText:"klineTypeSwitch_item-text__1TcPa"}},60833:function(e){e.exports={__next:"limit-trading___next__QX4hM",next:"limit-trading___next__QX4hM",container:"limit-trading_container__KriaN",mainSection:"limit-trading_mainSection__JTyfb",openLong:"limit-trading_openLong__egXJA",openShort:"limit-trading_openShort__Rr9VK",Quantity:"limit-trading_Quantity__2cl3i",quantity:"limit-trading_Quantity__2cl3i",inputNumber:"limit-trading_inputNumber__II6m1",footer
1:"limit-trading_footer__dGuao",selected:"limit-trading_selected__Ba02U",amountRight:"limit-trading_amountRight__WR3Ve",modalContainer:"limit-trading_modalContainer__uupmV",priceModal:"limit-trading_priceModal__6fDOY"}},10073:function(e){e.exports={__next:"priceType___next__QUjt3",next:"priceType___next__QUjt3","price-type":"priceType_price-type___4w1A",priceType:"priceType_price-type___4w1A","price-text":"priceType_price-text__wTpsR",priceText:"priceType_price-text__wTpsR","price-icon":"priceType_price-icon___bgt8",priceIcon:"priceType_price-icon___bgt8","price-list-text":"priceType_price-list-text__eLtFT",priceListText:"priceType_price-list-text__eLtFT","price-active":"priceType_price-active__B1zh6",priceActive:"priceType_price-active__B1zh6"}},81156:function(e){e.exports={__next:"quick-trading___next__Lfl9D",next:"quick-trading___next__Lfl9D",container:"quick-trading_container__zNrci",mainSection:"quick-trading_mainSection__VVurZ",dragable:"quick-trading_dragable__gDTn0",remove:"quick-trading_remove__LPWRD",openLong:"quick-trading_openLong__aS_Dq",openShort:"quick-trading_openShort__Y27_H",Quantity:"quick-trading_Quantity__Rwa9v",quantity:"quick-trading_Quantity__Rwa9v",inputNumber:"quick-trading_inputNumber__D6NCj",footer:"quick-trading_footer__Tpbrm",selected:"quick-trading_selected__DeXCN",amountLeft:"quick-trading_amountLeft__zca1i",amountRight:"quick-trading_amountRight__MQKm0"}},37115:function(e){e.exports={__next:"resolutions___next__wEOwY",next:"resolutions___next__wEOwY",custom:"resolutions_custom__b67UG","tool-item":"resolutions_tool-item__2OPPH",toolItem:"resolutions_tool-item__2OPPH",active:"resolutions_active__lV9lk","tags-box":"resolutions_tags-box___gk_M",tagsBox:"resolutions_tags-box___gk_M","trade-view-popper":"resolutions_trade-view-popper__0QnGP",tradeViewPopper:"resolutions_trade-view-popper__0QnGP",popper__arrow:"resolutions_popper__arrow__LWIqd",popperArrow:"resolutions_popper__arrow__LWIqd",lastToolItem:"resolutions_lastToolItem__xRrOt",popoverContent:"resolutions_popoverContent__mnSf9",tagBlock:"resolutions_tagBlock__9oQm1",choosed:"resolutions_choosed__emViH",defaultBlock:"resolutions_defaultBlock__g7Zi_",iconWrapper:"resolutions_iconWrapper__9qW9a",icon:"resolutions_icon__UdB5U",blackIcon:"resolutions_blackIcon__N40Yo",regDown:"resolutions_regDown__Uakea",popoverClass:"resolutions_popoverClass__OvBxJ"}},94088:function(e,t){"use strict";t.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODQiIGhlaWdodD0iODQiIHZpZXdCb3g9IjAgMCA4NCA4NCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTcgMTRDNyAxMC4xMzQgMTAuMTM0IDcgMTQgN0gyNC41SDM5Ljg0OTJDNDEuMjUwNyA3IDQyLjYyIDcuNDIwNzEgNDMuNzc5NyA4LjIwNzY3TDU0LjIyMDMgMTUuMjkyM0M1NS4zOCAxNi4wNzkzIDU2Ljc0OTMgMTYuNSA1OC4xNTA4IDE2LjVINjNINzBDNzMuODY2IDE2LjUgNzcgMTkuNjM0IDc3IDIzLjVWMjMuNjI1VjQwLjI1TDc0LjE1OTcgNjcuMjMyOEM3My43ODQ3IDcwLjc5NTQgNzAuNzgwNSA3My41IDY3LjE5ODIgNzMuNUgxNi44MDE4QzEzLjIxOTUgNzMuNSAxMC4yMTUzIDcwLjc5NTQgOS44NDAyOSA2Ny4yMzI4TDcgNDAuMjVWMTRaIiBmaWxsPSIjMzYzNzNBIi8+CjxyZWN0IHg9IjE0IiB5PSIyNSIgd2lkdGg9IjU2IiBoZWlnaHQ9IjQyIiByeD0iNyIgZmlsbD0iIzEwMTExMyIvPgo8cGF0aCBkPSJNNC41NzcwOSA0Mi4wNUM0LjAxMDU0IDM4LjM0MTcgNi44ODA0OSAzNSAxMC42MzE4IDM1SDczLjM2ODJDNzcuMTE5NSAzNSA3OS45ODk1IDM4LjM0MTcgNzkuNDIyOSA0Mi4wNUw3NC44Nzc4IDcxLjhDNzQuNDIwOCA3NC43OTA5IDcxLjg0ODYgNzcgNjguODIzIDc3SDE1LjE3N0MxMi4xNTE0IDc3IDkuNTc5MTYgNzQuNzkwOSA5LjEyMjIzIDcxLjhMNC41NzcwOSA0Mi4wNVoiIGZpbGw9IiMyNjI3MkIiLz4KPHBhdGggZD0iTTIzLjMxMTkgNjEuMjA2OUMyMy4wMzYxIDYwLjkzMSAyMi41ODg5IDYwLjkzMTEgMjIuMzEzMSA2MS4yMDY5TDE0LjIwNjkgNjkuMzEzMUMxMy45MzEgNjkuNTg4OSAxMy45MzEgNzAuMDM2MSAxNC4yMDY5IDcwLjMxMTlMMTUuNjg4MSA3MS43OTMxQzE1Ljk2MzkgNzIuMDY4OSAxNi40MTExIDcyLjA2ODkgMTYuNjg2OSA3MS43OTMxTDI0Ljc5MzEgNjMuNjg2OUMyNS4wNjg5IDYzLjQxMTEgMjUuMDY4OSA2Mi45NjM5IDI0Ljc5MzEgNjIuNjg4MUwyMy4zMTE5IDYxLjIwNjlaIiBmaWxsPSIjNTM1NTVBIi8+CjxwYXRoIGQ9Ik0yMC4wMDMyIDY0LjUxOTVDMTkuNzI3NCA2NC4yNDM3IDE5LjI4MDIgNjQuMjQzNyAxOS4wMDQ0IDY0LjUxOTVMMTcuNTI0IDY1Ljk5OTlDMTcuMjQ4MiA2Ni4yNzU3IDE3LjI0ODIgNjYuNzIyOSAxNy41MjQgNjYuOTk4N0wyMi4zMSA3MS43ODQ3QzIyLjU4NTggNzIuMDYwNSAyMy4wMzMgNzIuMDYwNSAyMy4zMDg4IDcxLjc4NDdMMjQuNzg5MiA3MC4zMDQzQzI1LjA2NSA3MC4wMjg1IDI1LjA2NSA2OS41ODEzIDI0Ljc4OTIgNjkuMzA1NUwyMC4wMDMyIDY0LjUxOTVaIiBmaWxsPSIjNTM1NTVBIi8+CjxwYXRoIGQ9Ik0xNi43MDA1IDYxLjIxMTdDMTYuNDI0NyA2MC45MzU5IDE1Ljk3NzUgNjAuOTM1OSAxNS43MDE3IDYxLjIxMTdMMTQuMjIwNiA2Mi42OTI4QzEzLjk0NDggNjIuOTY4NiAxMy45NDQ4IDYzLjQxNTggMTQuMjIwNiA2My42OTE2TDE1LjcwMTkgNjUuMTcyOUMxNS45Nzc3IDY1LjQ0ODcgMTYuNDI0OSA2NS40NDg3IDE2LjcwMDcgNjUuMTcyOUwxOC4xODE4IDYzLjY5MThDMTguNDU3NiA2My40MTYgMTguNDU3NiA2Mi45Njg4IDE4LjE4MTggNjIuNjkzTDE2LjcwMDUgNjEuMjExN1oiIGZpbGw9IiM1MzU1NUEiLz4KPC9zdmc+Cg=="},77163:function(e,t){"use strict";t.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODQiIGhlaWdodD0iODQiIHZpZXdCb3g9IjAgMCA4NCA4NCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTcgMTRDNyAxMC4xMzQgMTAuMTM0IDcgMTQgN0gyNC41SDM5Ljg0OTJDNDEuMjUwNyA3IDQyLjYyIDcuNDIwNzEgNDMuNzc5NyA4LjIwNzY3TDU0LjIyMDMgMTUuMjkyM0M1NS4zOCAxNi4wNzkzIDU2Ljc0OTMgMTYuNSA1OC4xNTA4IDE2LjVINjNINzBDNzMuODY2IDE2LjUgNzcgMTkuNjM0IDc3IDIzLjVWMjMuNjI1VjQwLjI1TDc0LjE1OTcgNjcuMjMyOEM3My43ODQ3IDcwLjc5NTQgNzAuNzgwNSA3My41IDY3LjE5ODIgNzMuNUgxNi44MDE4QzEzLjI
1xOTUgNzMuNSAxMC4yMTUzIDcwLjc5NTQgOS44NDAyOSA2Ny4yMzI4TDcgNDAuMjVWMTRaIiBmaWxsPSIjREVFMEUzIi8+CjxyZWN0IHg9IjE0IiB5PSIyNSIgd2lkdGg9IjU2IiBoZWlnaHQ9IjQyIiByeD0iNyIgZmlsbD0id2hpdGUiLz4KPHBhdGggZD0iTTQuNTc3MDkgNDIuMDVDNC4wMTA1NCAzOC4zNDE3IDYuODgwNDkgMzUgMTAuNjMxOCAzNUg3My4zNjgyQzc3LjExOTUgMzUgNzkuOTg5NSAzOC4zNDE3IDc5LjQyMjkgNDIuMDVMNzQuODc3OCA3MS44Qzc0LjQyMDggNzQuNzkwOSA3MS44NDg2IDc3IDY4LjgyMyA3N0gxNS4xNzdDMTIuMTUxNCA3NyA5LjU3OTE2IDc0Ljc5MDkgOS4xMjIyMyA3MS44TDQuNTc3MDkgNDIuMDVaIiBmaWxsPSIjRjRGNUY2Ii8+CjxwYXRoIGQ9Ik0yMy4zMTE5IDYxLjIwNjlDMjMuMDM2MSA2MC45MzEgMjIuNTg4OSA2MC45MzExIDIyLjMxMzEgNjEuMjA2OUwxNC4yMDY5IDY5LjMxMzFDMTMuOTMxIDY5LjU4ODkgMTMuOTMxIDcwLjAzNjEgMTQuMjA2OSA3MC4zMTE5TDE1LjY4ODEgNzEuNzkzMUMxNS45NjM5IDcyLjA2ODkgMTYuNDExMSA3Mi4wNjg5IDE2LjY4NjkgNzEuNzkzMUwyNC43OTMxIDYzLjY4NjlDMjUuMDY4OSA2My40MTExIDI1LjA2ODkgNjIuOTYzOSAyNC43OTMxIDYyLjY4ODFMMjMuMzExOSA2MS4yMDY5WiIgZmlsbD0iI0MyQzNDOSIvPgo8cGF0aCBkPSJNMjAuMDAzMiA2NC41MTk1QzE5LjcyNzQgNjQuMjQzNyAxOS4yODAyIDY0LjI0MzcgMTkuMDA0NCA2NC41MTk1TDE3LjUyNCA2NS45OTk5QzE3LjI0ODIgNjYuMjc1NyAxNy4yNDgyIDY2LjcyMjkgMTcuNTI0IDY2Ljk5ODdMMjIuMzEgNzEuNzg0N0MyMi41ODU4IDcyLjA2MDUgMjMuMDMzIDcyLjA2MDUgMjMuMzA4OCA3MS43ODQ3TDI0Ljc4OTIgNzAuMzA0M0MyNS4wNjUgNzAuMDI4NSAyNS4wNjUgNjkuNTgxMyAyNC43ODkyIDY5LjMwNTVMMjAuMDAzMiA2NC41MTk1WiIgZmlsbD0iI0MyQzNDOSIvPgo8cGF0aCBkPSJNMTYuNzAwNSA2MS4yMTE3QzE2LjQyNDcgNjAuOTM1OSAxNS45Nzc1IDYwLjkzNTkgMTUuNzAxNyA2MS4yMTE3TDE0LjIyMDYgNjIuNjkyOEMxMy45NDQ4IDYyLjk2ODYgMTMuOTQ0OCA2My40MTU4IDE0LjIyMDYgNjMuNjkxNkwxNS43MDE5IDY1LjE3MjlDMTUuOTc3NyA2NS40NDg3IDE2LjQyNDkgNjUuNDQ4NyAxNi43MDA3IDY1LjE3MjlMMTguMTgxOCA2My42OTE4QzE4LjQ1NzYgNjMuNDE2IDE4LjQ1NzYgNjIuOTY4OCAxOC4xODE4IDYyLjY5M0wxNi43MDA1IDYxLjIxMTdaIiBmaWxsPSIjQzJDM0M5Ii8+Cjwvc3ZnPgo="}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.