@dodoex/widgets 3.0.0-beta.5 → 3.0.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/helper-9v1xZPrA.cjs +1 -0
- package/dist/cjs/helper-CJs0kk7i.cjs +1 -0
- package/dist/cjs/helper-DIPGhxwy.cjs +1 -0
- package/dist/cjs/index-BWnG4lrS.cjs +78 -0
- package/dist/cjs/index-C88-b-Wy.cjs +58 -0
- package/dist/cjs/index-CReDAoH1.cjs +58 -0
- package/dist/cjs/index-CjauijUe.cjs +78 -0
- package/dist/cjs/index-D0vhEDHr.cjs +12 -0
- package/dist/cjs/index-DlRXMtyN.cjs +12 -0
- package/dist/cjs/index-NhIIGWO7.cjs +78 -0
- package/dist/cjs/index-O0NwxpAG.cjs +12 -0
- package/dist/cjs/index-rIBJLbpB.cjs +58 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/lottie-BdJNUW9a.cjs +1 -0
- package/dist/cjs/lottie-CZaIiam5.cjs +1 -0
- package/dist/cjs/lottie-JP26wQPR.cjs +1 -0
- package/dist/helper-BkVWYFdX.js +1 -0
- package/dist/helper-CRRYcp-I.js +1 -0
- package/dist/helper-qQa3KkTY.js +1 -0
- package/dist/index-B9Ld2lke.js +12 -0
- package/dist/index-BRQ-O8V_.js +58 -0
- package/dist/index-C40rjn-m.js +78 -0
- package/dist/index-CWf6IcCi.js +12 -0
- package/dist/index-D8t1zmBi.js +78 -0
- package/dist/index-DP4xH8dV.js +12 -0
- package/dist/index-DdOBpj2U.js +78 -0
- package/dist/index-DtsZYrPp.js +58 -0
- package/dist/index-dq4v_RjC.js +58 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/lottie-CampOEpU.js +1 -0
- package/dist/lottie-CqX6d-YU.js +1 -0
- package/dist/lottie-WSOvHtU6.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i18n as e}from"@lingui/core";import t from"bignumber.js";import{f as i}from"./index-DtsZYrPp.js";function o(t,i){switch(t){case"depth-chart.tips.buy":return e._({id:"q+Q952",message:"Users pay {0} {1} and receive {2} {3}\\nPrice {4} ({5}%)",values:{0:i.amountText,1:i.baseTokenSymbol,2:i.oppositeAmountText,3:i.quoteTokenSymbol,4:i.priceText,5:i.slippageText}});case"depth-chart.tips.mid-price":return e._({id:"cnbRVW",message:"Initial Price {0} {1} = {2} {3}",values:{0:i.amountText,1:i.baseTokenSymbol,2:i.oppositeAmountText,3:i.quoteTokenSymbol}});case"depth-chart.tips.sell":return e._({id:"q+Q952",message:"Users pay {0} {1} and receive {2} {3}\\nPrice {4} ({5}%)",values:{0:i.oppositeAmountText,1:i.quoteTokenSymbol,2:i.amountText,3:i.baseTokenSymbol,4:i.priceText,5:i.slippageText}});case"pool.chart.buy-amount":return e._({id:"TaScUS",message:"Users sell {0} amount:",values:{0:i.symbol}});case"pool.chart.price-impact":return e._({id:"I0LXan",message:"Price Impact: {0}",values:{0:i.amount}});case"pool.chart.sell-amount":return e._({id:"F2vX4t",message:"Users buy {0} amount:",values:{0:i.symbol}});case"pool.create.disabled-token-amount":return e._({id:"5QDjef",message:"The token amount is calculated by initial price."});case"pool.create.set-pool.emulator.title":return e._({id:"FQfStS",message:"Emulator"});case"pool.create.set-pool.emulator.title.question":return e._({id:"9D2g7k",message:"The liquidity of DODO is continuous, which is different from the discrete liquidity of UniV3. The ticks shown in the illustration are for demonstration purposes only."});case"pool.chart.liquidity-chart-tip":return e._({id:"YvXHDU",message:"The area of the chart indicates the buy/sell volume of {0} that can be carried by the market when the current price changes to the hover price.",values:{0:i.baseTokenSymbol}});case"pool.chart.liquidity-chart-buy":return e._({id:"TvH4Ym",message:"Bought {0} {1}, price in the pool decreased to {2}",values:{0:i.amount,1:i.symbol,2:i.price}});case"pool.chart.liquidity-chart-sell":return e._({id:"0O1wzf",message:"Traders sold {0} {1}, price in the pool increased to {2}",values:{0:i.amount,1:i.symbol,2:i.price}});default:throw new Error(`Unknown key ${t}`)}}const l=12,n=18;function s(e){let t=e.toLowerCase();if(t&&/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(t)){if(4===t.length){let e="#";for(let i=1;i<4;i+=1)e+=t.slice(i,i+1).concat(t.slice(i,i+1));t=e}const e=[];for(let i=1;i<7;i+=2)e.push(parseInt(`0x${t.slice(i,i+2)}`));return e.join(",")}return t}function r({val:e,model:i}){let o=e;if(e.isNaN())return{side:"no-one",vert:new t(0),base:new t(0),quote:new t(0)};i.Q0.eq(0)&&e.lt(i.i)&&(o=i.i),i.B0.eq(0)&&e.gt(i.i)&&(o=i.i);const l=i.getPriceDepth(o),n=l.baseAmount,s=l.quoteAmount,{isBuy:r}=l;return{side:r?"ask":"bid",vert:r?n:s,base:n,quote:s}}function a({midPrice:e,q:i,q0:o,pmmModel:l}){let n=t.maximum(i,o,l.B.multipliedBy(e));return n.isNaN()&&(n=new t(10)),n.eq(0)&&(n=new t(1)),{buyBaseVert:n.multipliedBy(1.2),sellBaseVert:n.div(e).multipliedBy(1.2)}}function u(e,i=1){return new t(i).div(e/2)}function m({tooltip:e,x:o,chartWidth:l,chartHeight:n,buyBaseVert:a,sellBaseVert:m,pmmModel:p,midPrice:d,baseTokenSymbol:c,quoteTokenSymbol:h,t:b,baseMinAndZoomMultiples:f,isHover:y,color:g,leftColor:T,rightColor:x}){const{zoomMultiples:v,baseMin:w}=f,k=u(l,v),M=a.div(n),B=m.div(n),q=2*v,S=w.multipliedBy(10**k.multipliedBy(o).toNumber());let N=new t(Math.log(d.div(w).toNumber())/Math.log(10));N=t.minimum(q,N),N=t.maximum(0,N);const P=N.div(k),X=r({val:S,model:p,midPrice:d});if(X.vert.isNaN())return;const A=S.lt(d);let _=n-X.vert.div(M).toNumber();A||(_=n-X.vert.div(B).toNumber());const z=i(S),O=i(X.vert),$=S.minus(d).abs().div(d).multipliedBy(100).toFixed(2),D=P.toNumber(),H=e.findOne("#toolTipVertLine"),L=e.findOne("#toolTipHoriLine"),U=e.findOne("#joinCircle"),V=e.findOne("#toolTip"),j=e.findOne("#priceTextLabel"),W=e.findOne("#slippageTextLabel");if(!V)return;V.x(o),V.y(_-5-6);const Y=V.getText(),F=V.getTag();let I="ask"===X.side?i(X.quote):i(X.base);const Q=p.k.lte(0);Q&&(I=O);const C=i(d),Z={amountText:O,baseTokenSymbol:c,oppositeAmountText:I,quoteTokenSymbol:h,priceText:Q?C:z,slippageText:`${A?"-":"+"}${$}`};if(P.minus(4).lte(o)&&P.plus(2).gte(o)&&y)Y.text(b("depth-chart.tips.mid-price",{amountText:1,baseTokenSymbol:c,oppositeAmountText:C,quoteTokenSymbol:h})),V.x(D),V.y(n/2),null==H||H.hide(),null==L||L.hide(),null==U||U.hide(),null==j||j.hide(),null==W||W.hide();else{Y.text(A?b("depth-chart.tips.buy",{amountText:I,baseTokenSymbol:c,oppositeAmountText:O,quoteTokenSymbol:h,priceText:Q?C:z,slippageText:`${A?"-":"+"}${$}`}):b("depth-chart.tips.sell",Z));const e=g||(A?"#55f6db":"#ff4f73"),t=A?T||"#55f6db":x||"#ff4f73";Y.fill(e),V.width()/2>o?(F.pointerDirection("left"),F.pointerHeight(15),F.pointerWidth(8),V.offsetX(-11),V.offsetY(-11)):V.width()/2+o>l?(F.pointerDirection("right"),F.pointerHeight(15),F.pointerWidth(8),V.offsetX(11),V.offsetY(-11)):(F.pointerDirection("down"),F.pointerHeight(8),F.pointerWidth(15),V.offsetX(0),V.offsetY(0)),null==H||H.points([o,n,o,_]),null==H||H.stroke(t),null==L||L.points(A?[o,_,D,_]:[D,_,o,_]),null==L||L.stroke(t),null==U||U.x(o),null==U||U.y(_),null==U||U.fill(A?T||"rgb(86, 246, 218)":x||"#FF5072"),null==U||U.stroke(A?T?`rgba(${s(T)}, 0.4)`:"rgba(86, 246, 218, 0.3)":x?`rgba(${s(x)}, 0.4)`:"rgba(255, 80, 114, 0.3)"),j&&(j.x(o),j.y(n),j.offsetX(j.width()/2),j.x()-j.width()/2<0?j.x(j.width()/2):j.x()+j.width()/2>l?j.x(l-j.width()/2):j.x(o));const i=null==j?void 0:j.findOne("#priceTextLabel-text");i&&(i.fill(e),i.text(z)),W&&(W.x(A?o+(D-o)/2:o-(o-D)/2),W.y(_),W.offsetY(W.height()/2),W.offsetX(W.width()/2));const r=null==W?void 0:W.findOne("#slippageTextLabel-text");r&&(r.fill(e),r.text(`${A?"-":"+"}${$}%`)),null==H||H.show(),null==L||L.show(),null==U||U.show(),null==j||j.show(),null==W||W.show()}e.show()}function p({dragDistance:e,prevBaseMin:i,chartWidth:o,zoomMultiples:l}){const n=u(o,l);return e>0?i.multipliedBy(1-n.multipliedBy(e).toNumber()):i.multipliedBy(10**n.multipliedBy(new t(e).abs()).plus(0).toNumber())}const d=1;function c({prevZoomMultiples:e,zoomIn:t}){return!t&&e<=.1?e:t?e+.1:e-.1}function h({type:e,targetPrice:i,midPrice:o,width:l}){if("sell"===e){return{zoomMultiples:new t(Math.log10(i.div(o).toNumber())).minus(0).div(3/4).abs(),targetX:l/2*(3/4)+l/2}}const n=new t(Math.log10(i.div(o).toNumber()));return{zoomMultiples:new t(0).minus(n).div(3/4).abs(),targetX:l/2*(1/4)}}function b({currentBaseMinAndZoomMultiples:e,targetPrice:i,midPrice:o,width:l}){const{baseMin:n,zoomMultiples:s}=e,r=new t(Math.log10(n.div(o).toNumber())),a=r.plus(2*s),u=new t(o.multipliedBy(10**a.toNumber()));if(i.gte(n)&&i.lte(u)){return{isSkip:!0,targetX:new t(Math.log10(i.div(o).toNumber())).minus(r).div(2*s).multipliedBy(l).toNumber(),baseMin:new t(0),zoomMultiples:1}}const m=new t(o.multipliedBy(.1)),p=new t(o.multipliedBy(10));if(i.gte(m)&&i.lte(p)){return{isSkip:!1,targetX:new t(Math.log10(i.div(o).toNumber())).minus(-1).div(2).multipliedBy(l).toNumber(),baseMin:m,zoomMultiples:1}}return{isSkip:!1,targetX:-1,baseMin:new t(0),zoomMultiples:1}}function f({midPrice:e,zoomMultiples:t}){return e.multipliedBy(10**-t)}export{a,p as b,u as c,c as d,r as e,f,o as g,n as h,d as i,b as j,h as k,l,s as m,m as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i18n as e}from"@lingui/core";import t from"bignumber.js";import{f as i}from"./index-dq4v_RjC.js";function o(t,i){switch(t){case"depth-chart.tips.buy":return e._({id:"q+Q952",message:"Users pay {0} {1} and receive {2} {3}\\nPrice {4} ({5}%)",values:{0:i.amountText,1:i.baseTokenSymbol,2:i.oppositeAmountText,3:i.quoteTokenSymbol,4:i.priceText,5:i.slippageText}});case"depth-chart.tips.mid-price":return e._({id:"cnbRVW",message:"Initial Price {0} {1} = {2} {3}",values:{0:i.amountText,1:i.baseTokenSymbol,2:i.oppositeAmountText,3:i.quoteTokenSymbol}});case"depth-chart.tips.sell":return e._({id:"q+Q952",message:"Users pay {0} {1} and receive {2} {3}\\nPrice {4} ({5}%)",values:{0:i.oppositeAmountText,1:i.quoteTokenSymbol,2:i.amountText,3:i.baseTokenSymbol,4:i.priceText,5:i.slippageText}});case"pool.chart.buy-amount":return e._({id:"TaScUS",message:"Users sell {0} amount:",values:{0:i.symbol}});case"pool.chart.price-impact":return e._({id:"I0LXan",message:"Price Impact: {0}",values:{0:i.amount}});case"pool.chart.sell-amount":return e._({id:"F2vX4t",message:"Users buy {0} amount:",values:{0:i.symbol}});case"pool.create.disabled-token-amount":return e._({id:"5QDjef",message:"The token amount is calculated by initial price."});case"pool.create.set-pool.emulator.title":return e._({id:"FQfStS",message:"Emulator"});case"pool.create.set-pool.emulator.title.question":return e._({id:"9D2g7k",message:"The liquidity of DODO is continuous, which is different from the discrete liquidity of UniV3. The ticks shown in the illustration are for demonstration purposes only."});case"pool.chart.liquidity-chart-tip":return e._({id:"YvXHDU",message:"The area of the chart indicates the buy/sell volume of {0} that can be carried by the market when the current price changes to the hover price.",values:{0:i.baseTokenSymbol}});case"pool.chart.liquidity-chart-buy":return e._({id:"TvH4Ym",message:"Bought {0} {1}, price in the pool decreased to {2}",values:{0:i.amount,1:i.symbol,2:i.price}});case"pool.chart.liquidity-chart-sell":return e._({id:"0O1wzf",message:"Traders sold {0} {1}, price in the pool increased to {2}",values:{0:i.amount,1:i.symbol,2:i.price}});default:throw new Error(`Unknown key ${t}`)}}const l=12,n=18;function s(e){let t=e.toLowerCase();if(t&&/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(t)){if(4===t.length){let e="#";for(let i=1;i<4;i+=1)e+=t.slice(i,i+1).concat(t.slice(i,i+1));t=e}const e=[];for(let i=1;i<7;i+=2)e.push(parseInt(`0x${t.slice(i,i+2)}`));return e.join(",")}return t}function r({val:e,model:i}){let o=e;if(e.isNaN())return{side:"no-one",vert:new t(0),base:new t(0),quote:new t(0)};i.Q0.eq(0)&&e.lt(i.i)&&(o=i.i),i.B0.eq(0)&&e.gt(i.i)&&(o=i.i);const l=i.getPriceDepth(o),n=l.baseAmount,s=l.quoteAmount,{isBuy:r}=l;return{side:r?"ask":"bid",vert:r?n:s,base:n,quote:s}}function a({midPrice:e,q:i,q0:o,pmmModel:l}){let n=t.maximum(i,o,l.B.multipliedBy(e));return n.isNaN()&&(n=new t(10)),n.eq(0)&&(n=new t(1)),{buyBaseVert:n.multipliedBy(1.2),sellBaseVert:n.div(e).multipliedBy(1.2)}}function u(e,i=1){return new t(i).div(e/2)}function m({tooltip:e,x:o,chartWidth:l,chartHeight:n,buyBaseVert:a,sellBaseVert:m,pmmModel:p,midPrice:d,baseTokenSymbol:c,quoteTokenSymbol:h,t:b,baseMinAndZoomMultiples:f,isHover:y,color:g,leftColor:T,rightColor:x}){const{zoomMultiples:v,baseMin:w}=f,k=u(l,v),M=a.div(n),B=m.div(n),q=2*v,S=w.multipliedBy(10**k.multipliedBy(o).toNumber());let N=new t(Math.log(d.div(w).toNumber())/Math.log(10));N=t.minimum(q,N),N=t.maximum(0,N);const P=N.div(k),X=r({val:S,model:p,midPrice:d});if(X.vert.isNaN())return;const A=S.lt(d);let _=n-X.vert.div(M).toNumber();A||(_=n-X.vert.div(B).toNumber());const z=i(S),O=i(X.vert),$=S.minus(d).abs().div(d).multipliedBy(100).toFixed(2),D=P.toNumber(),H=e.findOne("#toolTipVertLine"),L=e.findOne("#toolTipHoriLine"),U=e.findOne("#joinCircle"),V=e.findOne("#toolTip"),j=e.findOne("#priceTextLabel"),W=e.findOne("#slippageTextLabel");if(!V)return;V.x(o),V.y(_-5-6);const Y=V.getText(),F=V.getTag();let I="ask"===X.side?i(X.quote):i(X.base);const Q=p.k.lte(0);Q&&(I=O);const C=i(d),Z={amountText:O,baseTokenSymbol:c,oppositeAmountText:I,quoteTokenSymbol:h,priceText:Q?C:z,slippageText:`${A?"-":"+"}${$}`};if(P.minus(4).lte(o)&&P.plus(2).gte(o)&&y)Y.text(b("depth-chart.tips.mid-price",{amountText:1,baseTokenSymbol:c,oppositeAmountText:C,quoteTokenSymbol:h})),V.x(D),V.y(n/2),null==H||H.hide(),null==L||L.hide(),null==U||U.hide(),null==j||j.hide(),null==W||W.hide();else{Y.text(A?b("depth-chart.tips.buy",{amountText:I,baseTokenSymbol:c,oppositeAmountText:O,quoteTokenSymbol:h,priceText:Q?C:z,slippageText:`${A?"-":"+"}${$}`}):b("depth-chart.tips.sell",Z));const e=g||(A?"#55f6db":"#ff4f73"),t=A?T||"#55f6db":x||"#ff4f73";Y.fill(e),V.width()/2>o?(F.pointerDirection("left"),F.pointerHeight(15),F.pointerWidth(8),V.offsetX(-11),V.offsetY(-11)):V.width()/2+o>l?(F.pointerDirection("right"),F.pointerHeight(15),F.pointerWidth(8),V.offsetX(11),V.offsetY(-11)):(F.pointerDirection("down"),F.pointerHeight(8),F.pointerWidth(15),V.offsetX(0),V.offsetY(0)),null==H||H.points([o,n,o,_]),null==H||H.stroke(t),null==L||L.points(A?[o,_,D,_]:[D,_,o,_]),null==L||L.stroke(t),null==U||U.x(o),null==U||U.y(_),null==U||U.fill(A?T||"rgb(86, 246, 218)":x||"#FF5072"),null==U||U.stroke(A?T?`rgba(${s(T)}, 0.4)`:"rgba(86, 246, 218, 0.3)":x?`rgba(${s(x)}, 0.4)`:"rgba(255, 80, 114, 0.3)"),j&&(j.x(o),j.y(n),j.offsetX(j.width()/2),j.x()-j.width()/2<0?j.x(j.width()/2):j.x()+j.width()/2>l?j.x(l-j.width()/2):j.x(o));const i=null==j?void 0:j.findOne("#priceTextLabel-text");i&&(i.fill(e),i.text(z)),W&&(W.x(A?o+(D-o)/2:o-(o-D)/2),W.y(_),W.offsetY(W.height()/2),W.offsetX(W.width()/2));const r=null==W?void 0:W.findOne("#slippageTextLabel-text");r&&(r.fill(e),r.text(`${A?"-":"+"}${$}%`)),null==H||H.show(),null==L||L.show(),null==U||U.show(),null==j||j.show(),null==W||W.show()}e.show()}function p({dragDistance:e,prevBaseMin:i,chartWidth:o,zoomMultiples:l}){const n=u(o,l);return e>0?i.multipliedBy(1-n.multipliedBy(e).toNumber()):i.multipliedBy(10**n.multipliedBy(new t(e).abs()).plus(0).toNumber())}const d=1;function c({prevZoomMultiples:e,zoomIn:t}){return!t&&e<=.1?e:t?e+.1:e-.1}function h({type:e,targetPrice:i,midPrice:o,width:l}){if("sell"===e){return{zoomMultiples:new t(Math.log10(i.div(o).toNumber())).minus(0).div(3/4).abs(),targetX:l/2*(3/4)+l/2}}const n=new t(Math.log10(i.div(o).toNumber()));return{zoomMultiples:new t(0).minus(n).div(3/4).abs(),targetX:l/2*(1/4)}}function b({currentBaseMinAndZoomMultiples:e,targetPrice:i,midPrice:o,width:l}){const{baseMin:n,zoomMultiples:s}=e,r=new t(Math.log10(n.div(o).toNumber())),a=r.plus(2*s),u=new t(o.multipliedBy(10**a.toNumber()));if(i.gte(n)&&i.lte(u)){return{isSkip:!0,targetX:new t(Math.log10(i.div(o).toNumber())).minus(r).div(2*s).multipliedBy(l).toNumber(),baseMin:new t(0),zoomMultiples:1}}const m=new t(o.multipliedBy(.1)),p=new t(o.multipliedBy(10));if(i.gte(m)&&i.lte(p)){return{isSkip:!1,targetX:new t(Math.log10(i.div(o).toNumber())).minus(-1).div(2).multipliedBy(l).toNumber(),baseMin:m,zoomMultiples:1}}return{isSkip:!1,targetX:-1,baseMin:new t(0),zoomMultiples:1}}function f({midPrice:e,zoomMultiples:t}){return e.multipliedBy(10**-t)}export{a,p as b,u as c,c as d,r as e,f,o as g,n as h,d as i,b as j,h as k,l,s as m,m as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i18n as e}from"@lingui/core";import t from"bignumber.js";import{f as i}from"./index-BRQ-O8V_.js";function o(t,i){switch(t){case"depth-chart.tips.buy":return e._({id:"q+Q952",message:"Users pay {0} {1} and receive {2} {3}\\nPrice {4} ({5}%)",values:{0:i.amountText,1:i.baseTokenSymbol,2:i.oppositeAmountText,3:i.quoteTokenSymbol,4:i.priceText,5:i.slippageText}});case"depth-chart.tips.mid-price":return e._({id:"cnbRVW",message:"Initial Price {0} {1} = {2} {3}",values:{0:i.amountText,1:i.baseTokenSymbol,2:i.oppositeAmountText,3:i.quoteTokenSymbol}});case"depth-chart.tips.sell":return e._({id:"q+Q952",message:"Users pay {0} {1} and receive {2} {3}\\nPrice {4} ({5}%)",values:{0:i.oppositeAmountText,1:i.quoteTokenSymbol,2:i.amountText,3:i.baseTokenSymbol,4:i.priceText,5:i.slippageText}});case"pool.chart.buy-amount":return e._({id:"TaScUS",message:"Users sell {0} amount:",values:{0:i.symbol}});case"pool.chart.price-impact":return e._({id:"I0LXan",message:"Price Impact: {0}",values:{0:i.amount}});case"pool.chart.sell-amount":return e._({id:"F2vX4t",message:"Users buy {0} amount:",values:{0:i.symbol}});case"pool.create.disabled-token-amount":return e._({id:"5QDjef",message:"The token amount is calculated by initial price."});case"pool.create.set-pool.emulator.title":return e._({id:"FQfStS",message:"Emulator"});case"pool.create.set-pool.emulator.title.question":return e._({id:"9D2g7k",message:"The liquidity of DODO is continuous, which is different from the discrete liquidity of UniV3. The ticks shown in the illustration are for demonstration purposes only."});case"pool.chart.liquidity-chart-tip":return e._({id:"YvXHDU",message:"The area of the chart indicates the buy/sell volume of {0} that can be carried by the market when the current price changes to the hover price.",values:{0:i.baseTokenSymbol}});case"pool.chart.liquidity-chart-buy":return e._({id:"TvH4Ym",message:"Bought {0} {1}, price in the pool decreased to {2}",values:{0:i.amount,1:i.symbol,2:i.price}});case"pool.chart.liquidity-chart-sell":return e._({id:"0O1wzf",message:"Traders sold {0} {1}, price in the pool increased to {2}",values:{0:i.amount,1:i.symbol,2:i.price}});default:throw new Error(`Unknown key ${t}`)}}const l=12,n=18;function s(e){let t=e.toLowerCase();if(t&&/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(t)){if(4===t.length){let e="#";for(let i=1;i<4;i+=1)e+=t.slice(i,i+1).concat(t.slice(i,i+1));t=e}const e=[];for(let i=1;i<7;i+=2)e.push(parseInt(`0x${t.slice(i,i+2)}`));return e.join(",")}return t}function r({val:e,model:i}){let o=e;if(e.isNaN())return{side:"no-one",vert:new t(0),base:new t(0),quote:new t(0)};i.Q0.eq(0)&&e.lt(i.i)&&(o=i.i),i.B0.eq(0)&&e.gt(i.i)&&(o=i.i);const l=i.getPriceDepth(o),n=l.baseAmount,s=l.quoteAmount,{isBuy:r}=l;return{side:r?"ask":"bid",vert:r?n:s,base:n,quote:s}}function a({midPrice:e,q:i,q0:o,pmmModel:l}){let n=t.maximum(i,o,l.B.multipliedBy(e));return n.isNaN()&&(n=new t(10)),n.eq(0)&&(n=new t(1)),{buyBaseVert:n.multipliedBy(1.2),sellBaseVert:n.div(e).multipliedBy(1.2)}}function u(e,i=1){return new t(i).div(e/2)}function m({tooltip:e,x:o,chartWidth:l,chartHeight:n,buyBaseVert:a,sellBaseVert:m,pmmModel:p,midPrice:d,baseTokenSymbol:c,quoteTokenSymbol:h,t:b,baseMinAndZoomMultiples:f,isHover:y,color:g,leftColor:T,rightColor:x}){const{zoomMultiples:v,baseMin:w}=f,k=u(l,v),M=a.div(n),B=m.div(n),q=2*v,S=w.multipliedBy(10**k.multipliedBy(o).toNumber());let N=new t(Math.log(d.div(w).toNumber())/Math.log(10));N=t.minimum(q,N),N=t.maximum(0,N);const P=N.div(k),X=r({val:S,model:p,midPrice:d});if(X.vert.isNaN())return;const A=S.lt(d);let _=n-X.vert.div(M).toNumber();A||(_=n-X.vert.div(B).toNumber());const z=i(S),O=i(X.vert),$=S.minus(d).abs().div(d).multipliedBy(100).toFixed(2),D=P.toNumber(),H=e.findOne("#toolTipVertLine"),L=e.findOne("#toolTipHoriLine"),U=e.findOne("#joinCircle"),V=e.findOne("#toolTip"),j=e.findOne("#priceTextLabel"),W=e.findOne("#slippageTextLabel");if(!V)return;V.x(o),V.y(_-5-6);const Y=V.getText(),F=V.getTag();let I="ask"===X.side?i(X.quote):i(X.base);const Q=p.k.lte(0);Q&&(I=O);const C=i(d),Z={amountText:O,baseTokenSymbol:c,oppositeAmountText:I,quoteTokenSymbol:h,priceText:Q?C:z,slippageText:`${A?"-":"+"}${$}`};if(P.minus(4).lte(o)&&P.plus(2).gte(o)&&y)Y.text(b("depth-chart.tips.mid-price",{amountText:1,baseTokenSymbol:c,oppositeAmountText:C,quoteTokenSymbol:h})),V.x(D),V.y(n/2),null==H||H.hide(),null==L||L.hide(),null==U||U.hide(),null==j||j.hide(),null==W||W.hide();else{Y.text(A?b("depth-chart.tips.buy",{amountText:I,baseTokenSymbol:c,oppositeAmountText:O,quoteTokenSymbol:h,priceText:Q?C:z,slippageText:`${A?"-":"+"}${$}`}):b("depth-chart.tips.sell",Z));const e=g||(A?"#55f6db":"#ff4f73"),t=A?T||"#55f6db":x||"#ff4f73";Y.fill(e),V.width()/2>o?(F.pointerDirection("left"),F.pointerHeight(15),F.pointerWidth(8),V.offsetX(-11),V.offsetY(-11)):V.width()/2+o>l?(F.pointerDirection("right"),F.pointerHeight(15),F.pointerWidth(8),V.offsetX(11),V.offsetY(-11)):(F.pointerDirection("down"),F.pointerHeight(8),F.pointerWidth(15),V.offsetX(0),V.offsetY(0)),null==H||H.points([o,n,o,_]),null==H||H.stroke(t),null==L||L.points(A?[o,_,D,_]:[D,_,o,_]),null==L||L.stroke(t),null==U||U.x(o),null==U||U.y(_),null==U||U.fill(A?T||"rgb(86, 246, 218)":x||"#FF5072"),null==U||U.stroke(A?T?`rgba(${s(T)}, 0.4)`:"rgba(86, 246, 218, 0.3)":x?`rgba(${s(x)}, 0.4)`:"rgba(255, 80, 114, 0.3)"),j&&(j.x(o),j.y(n),j.offsetX(j.width()/2),j.x()-j.width()/2<0?j.x(j.width()/2):j.x()+j.width()/2>l?j.x(l-j.width()/2):j.x(o));const i=null==j?void 0:j.findOne("#priceTextLabel-text");i&&(i.fill(e),i.text(z)),W&&(W.x(A?o+(D-o)/2:o-(o-D)/2),W.y(_),W.offsetY(W.height()/2),W.offsetX(W.width()/2));const r=null==W?void 0:W.findOne("#slippageTextLabel-text");r&&(r.fill(e),r.text(`${A?"-":"+"}${$}%`)),null==H||H.show(),null==L||L.show(),null==U||U.show(),null==j||j.show(),null==W||W.show()}e.show()}function p({dragDistance:e,prevBaseMin:i,chartWidth:o,zoomMultiples:l}){const n=u(o,l);return e>0?i.multipliedBy(1-n.multipliedBy(e).toNumber()):i.multipliedBy(10**n.multipliedBy(new t(e).abs()).plus(0).toNumber())}const d=1;function c({prevZoomMultiples:e,zoomIn:t}){return!t&&e<=.1?e:t?e+.1:e-.1}function h({type:e,targetPrice:i,midPrice:o,width:l}){if("sell"===e){return{zoomMultiples:new t(Math.log10(i.div(o).toNumber())).minus(0).div(3/4).abs(),targetX:l/2*(3/4)+l/2}}const n=new t(Math.log10(i.div(o).toNumber()));return{zoomMultiples:new t(0).minus(n).div(3/4).abs(),targetX:l/2*(1/4)}}function b({currentBaseMinAndZoomMultiples:e,targetPrice:i,midPrice:o,width:l}){const{baseMin:n,zoomMultiples:s}=e,r=new t(Math.log10(n.div(o).toNumber())),a=r.plus(2*s),u=new t(o.multipliedBy(10**a.toNumber()));if(i.gte(n)&&i.lte(u)){return{isSkip:!0,targetX:new t(Math.log10(i.div(o).toNumber())).minus(r).div(2*s).multipliedBy(l).toNumber(),baseMin:new t(0),zoomMultiples:1}}const m=new t(o.multipliedBy(.1)),p=new t(o.multipliedBy(10));if(i.gte(m)&&i.lte(p)){return{isSkip:!1,targetX:new t(Math.log10(i.div(o).toNumber())).minus(-1).div(2).multipliedBy(l).toNumber(),baseMin:m,zoomMultiples:1}}return{isSkip:!1,targetX:-1,baseMin:new t(0),zoomMultiples:1}}function f({midPrice:e,zoomMultiples:t}){return e.multipliedBy(10**-t)}export{a,p as b,u as c,c as d,r as e,f,o as g,n as h,d as i,b as j,h as k,l,s as m,m as u};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import t from"@emotion/styled";import{merge as e}from"lodash";import{useMemo as i,useRef as n}from"react";import{l as r,g as o,m as l}from"./helper-BkVWYFdX.js";import{Line as a,Text as s,Stage as d,Layer as g,Rect as m,Circle as u,Label as h,Tag as p}from"react-konva";import{j as c,f}from"./index-DtsZYrPp.js";import x from"bignumber.js";import{solveQuadraticFunctionForTarget as L,PMMState as w,PMMHelper as A}from"@dodoex/api";import"@lingui/core";import"@lingui/react";import"@dodoex/icons";import"react-dom";import"react-redux";import"identicon.js";import"@web3-react/core";import"@web3-react/eip1193";import"@web3-react/walletconnect-v2";import"@web3-react/metamask";import"@web3-react/types";import"@reduxjs/toolkit";import"redux";import"@tanstack/react-query";import"react-window";import"@ethersproject/bignumber";import"dayjs";import"axios";import"zustand";import"react-infinite-scroller";import"@emotion/react";import"recharts";const b=t.div`
|
|
2
|
+
height: 100%;
|
|
3
|
+
position: relative;
|
|
4
|
+
`,y=t.div`
|
|
5
|
+
text-align: center;
|
|
6
|
+
margin-top: 17.1px;
|
|
7
|
+
margin-bottom: 88.41px;
|
|
8
|
+
color: #606066;
|
|
9
|
+
font-size: 12px;
|
|
10
|
+
line-height: 17px;
|
|
11
|
+
font-weight: 400;
|
|
12
|
+
`,N=36;function P({maxHeight:t,gridAreaHeight:e,value:i}){const n=new x(e).minus(N),r=n.div(t);return n.minus(i.multipliedBy(r)).plus(N).toNumber()}function v({targetPrice:t,areaPoints:e,isLeft:i}){for(let n=0;n<e.length;n++){const r=e[n],o=n<e.length-1?e[n+1]:null;if(!o)return{targetAreaStatPoint:r,targetAreaStatPoints:e};if(i){if(t.lte(r.middlePrice)&&t.gte(o.middlePrice))return{targetAreaStatPoint:r,targetAreaStatPoints:e.slice(0,n+1)}}else if(t.gte(r.middlePrice)&&t.lte(o.middlePrice))return{targetAreaStatPoint:r,targetAreaStatPoints:e.slice(0,n+1)}}return{targetAreaStatPoint:null,targetAreaStatPoints:[]}}function j({x:t,width:e,minXLN10:i,maxXLN10:n}){const r=new x(t).div(e).multipliedBy(n.minus(i)).plus(i);return new x(10**r.toNumber())}function H({width:t,targetLN10:e,minXLN10:i,maxXLN10:n}){return e.minus(i).div(n.minus(i)).multipliedBy(t).toNumber()}function S({target:t}){return new x(Math.log10(t.toNumber()))}const X="rgba(38, 39, 41, 0.3)";function k({width:t,height:b,params:y,baseTokenSymbol:N,quoteTokenSymbol:k,colorMap:B}){const{maxLeftHeight:C,maxRightHeight:F,leftStatAreaPoints:M,rightStatAreaPoints:W,minXLN10:T,maxXLN10:J}=function({params:t}){return i((()=>{const e=new x(t.b),i=new x(t.q);let n=new x(t.b0);const r=new x(t.q0),o=new x(t.i),l=new x(t.k),{R:a}=t;1===a&&n.eq(e)&&(n=L(e,i.minus(r),new x(1).div(o),l));const s=new w({i:o,K:l,B:e,Q:i,B0:n,Q0:r,R:a,mtFeeRate:new x(0),lpFeeRate:new x(0)}),d=new A,g=new x(s.B),m=[],u=[];let h=new x(0),p=new x(0);const c=d.GetMidPrice(s),f=i.gt(0)?e.div(i):new x(1);for(let t=0;t<=250;t++){let e=g.multipliedBy(t/100).multipliedBy(c.multipliedBy(f).multipliedBy(4));0===t&&(e=g.multipliedBy(1e-11));const i=null==d?void 0:d.QuerySellBase(e,s);if(i.isNaN()||!i.gt(0))m.push({giveAmount:e,getAmount:new x(0),price:new x(0)});else{const t=i.div(e);m.push({giveAmount:e,getAmount:i,price:t})}}for(let t=0;t<=250;t++){let e=g.multipliedBy(t/100).multipliedBy(c.multipliedBy(4));0===t&&(e=g.multipliedBy(1e-11));const i=null==d?void 0:d.QuerySellQuote(e,s);if(i.isNaN()||!i.gt(0))u.push({giveAmount:e,getAmount:new x(0),price:new x(0)});else{const t=e.dividedBy(i);u.push({giveAmount:e,getAmount:i,price:t})}}if(m.length<2&&u.length<2)return{leftStatAreaPoints:[],rightStatAreaPoints:[],maxLeftHeight:new x(10).multipliedBy(1.2),maxRightHeight:new x(10).multipliedBy(1.2),middlePriceLN10:new x(0),minXLN10:new x(-1),maxXLN10:new x(1)};const b=[];for(let t=1;t<m.length;t++){const e=m[t],{giveAmount:i,getAmount:n,price:r}=e,o=m[t-1];if(!r.isNaN()&&r.gt(0)&&o){const e=r.minus(o.price).abs(),l=i.minus(o.giveAmount).abs(),a=n.minus(o.getAmount).abs().multipliedBy(l);1===t&&b.push({area:n,price:r,middlePrice:r.plus(e.div(1.1)),rectangleHeight:a.plus(a.multipliedBy(.03))}),b.push({area:n,price:r,middlePrice:r.plus(e.div(2)),rectangleHeight:a}),h=x.max(a,h)}}const y=[];for(let t=1;t<u.length;t++){const e=u[t],{giveAmount:i,getAmount:n,price:r}=e,o=u[t-1],l=o.price,a=o.giveAmount,s=o.getAmount;if(!r.isNaN()&&r.gt(0)&&o){const e=r.minus(l).abs(),o=i.minus(a).abs(),d=n.minus(s).abs().multipliedBy(o);1===t&&y.push({area:n,price:r,middlePrice:r.minus(e.div(1.1)),rectangleHeight:d.plus(d.multipliedBy(.03))}),y.push({area:n,price:r,middlePrice:r.minus(e.div(2)),rectangleHeight:d}),p=x.max(d,p)}}const N=m.length>0?m[m.length-1]:u[0],P=u.length>0?u[0]:m[0],v=u.length>0?u[u.length-1]:m[0],j=N.price,H=v.price,S=P.price,X=new x(Math.log10(S.toNumber()));let k=j.gt(0)?new x(Math.log10(j.toNumber())):new x(-Math.log10(H.toNumber())),B=H.gt(0)?new x(Math.log10(H.toNumber())):new x(-Math.log10(j.toNumber()));const C=x.max(X.minus(k).abs(),B.minus(X).abs());return k=X.minus(C),B=X.plus(C),{leftStatAreaPoints:b,rightStatAreaPoints:y,maxLeftHeight:h.multipliedBy(1.2),maxRightHeight:p.multipliedBy(1.2),minXLN10:k,maxXLN10:B,middlePriceLN10:X}}),[t])}({params:y}),q=b-30.13,O=n(null),R=e({grid:"#2A2A2D",midPriceLine:"#313335",leftBg:[0,X,1,"#31645d"],leftLine:"#55f6db",leftColor:"",rightBg:[0,X,1,"#67303d"],rightLine:"#ff4f73",rightColor:"",tooltipBg:"#121212",tooltipColor:void 0,textColor:"#606066"},B),D=e=>{var i;const{current:n}=O,r=e.target;if(r&&n){const e=null===(i=r.getStage())||void 0===i?void 0:i.getPointerPosition();if(e){const{x:i}=e,r=t/2;if(Math.abs(i-r)<=2)return;if(i<=2||t-i<=2)return;const a=j({x:i,width:t,minXLN10:T,maxXLN10:J});let s=null,d=[];const g=i<r;if(g){const t=v({areaPoints:M,targetPrice:a,isLeft:g});s=t.targetAreaStatPoint,d=t.targetAreaStatPoints}else{const t=v({areaPoints:W,targetPrice:a,isLeft:g});s=t.targetAreaStatPoint,d=t.targetAreaStatPoints}if(s){const e=S({target:s.middlePrice}),r=H({minXLN10:T,maxXLN10:J,width:t,targetLN10:e}),a=P({maxHeight:g?C:F,gridAreaHeight:q,value:s.rectangleHeight}),m=n.findOne("#tooltip"),u=n.findOne("#toolTipVertLine"),h=n.findOne("#joinCircle"),p=n.findOne("#tooltip-Text"),c=n.findOne("#tooltip-tag"),x=n.findOne("#priceTextLabel"),L=null==x?void 0:x.findOne("#priceTextLabel-text"),w=n.findOne("#area");null==m||m.position({x:r,y:a-5-6}),null==p||p.fill(R.tooltipColor||(g?"#00FAD9":"#FF5072")),null==p||p.text(g?o("pool.chart.liquidity-chart-buy",{amount:f(s.area),symbol:N,price:f(s.price)}):o("pool.chart.liquidity-chart-sell",{amount:f(s.area),symbol:k,price:f(s.price)})),m&&c&&(m.width()/2>i?(c.pointerDirection("left"),c.pointerHeight(15),c.pointerWidth(8),m.offsetX(-11),m.offsetY(-11)):m.width()/2+i>t?(c.pointerDirection("right"),c.pointerHeight(15),c.pointerWidth(8),m.offsetX(11),m.offsetY(-11)):(c.pointerDirection("down"),c.pointerHeight(8),c.pointerWidth(15),m.offsetX(0),m.offsetY(0))),null==u||u.points([r,q,r,a]),null==u||u.stroke(g?"#55f6db":"#ff4f73");let A=g?"rgb(86, 246, 218)":"#FF5072",b=g?"rgba(86, 246, 218, 0.3)":"rgba(255, 80, 114, 0.3)";R.leftLine&&R.rightLine&&(A=g?R.leftLine:R.rightLine,b=g?`rgba(${l(R.leftLine)}, 0.4)`:`rgba(${l(R.rightLine)}, 0.4)`),h&&(h.x(r),h.y(a),h.fill(A),h.stroke(b)),x&&(x.x(r),x.y(q+8.08+1),x.offsetX(x.width()/2),x.x()-x.width()/2<0?x.x(x.width()/2):x.x()+x.width()/2>t?x.x(t-x.width()/2):x.x(i)),L&&(L.fill(R.tooltipColor||(g?"#00FAD9":"#FF5072")),L.text(f(s.price)));const y=[];for(const e of d){const{middlePrice:i,rectangleHeight:n}=e,r=S({target:i}),o=H({minXLN10:T,maxXLN10:J,width:t,targetLN10:r}),l=P({maxHeight:g?C:F,gridAreaHeight:q,value:n});y.push(o,l+1)}const v=y.slice(),[j,X]=v;g?(v.push(r,a),v.push(r,q),v.push(j,q),v.push(j,X)):(v.unshift(j,q),v.unshift(r,q),v.unshift(r,a)),w&&(w.points(v),w.fill(g?R.leftLine||"#2c5b56":R.rightLine||"#7b3a48")),n.show()}}}},z=function({gridAreaHeight:t,gridAreaWidth:e,horizontalLineCount:n,verticalLineCount:r,color:o="#2A2A2D"}){return i((()=>{const i=[],l=t/(n+1),s=[],d=e/(r+1);for(let t=0;t<n;t++){const n=l*(t+1);i.push([0,n,e,n])}for(let e=0;e<r;e++){const i=d*(e+1);s.push([i,0,i,t])}return c.jsxs(c.Fragment,{children:[i.map(((t,e)=>c.jsx(a,{points:t,stroke:o,strokeWidth:1,lineCap:"round",lineJoin:"round",tension:1,listening:!1},e))),s.map(((t,e)=>c.jsx(a,{points:t,stroke:o,strokeWidth:1,lineCap:"round",lineJoin:"round",tension:1,listening:!1},e)))]})}),[t,e,n,r,o])}({gridAreaHeight:q,gridAreaWidth:t,horizontalLineCount:9,verticalLineCount:7,color:R.grid}),G=function({minXLN10:t,maxXLN10:e,labelCount:n,gridAreaHeight:r,gridAreaWidth:o,color:l="#606066"}){return i((()=>{const i=o/(n+1),d=[],g=[];for(let l=0;l<n;l++){const n=i/2+i*l;d.push({x:n,y:r+10.08+1,text:f(j({x:i*(l+1),width:o,minXLN10:t,maxXLN10:e}))});const a=i*(l+1);g.push([a,r+1,a,r+4+1])}return c.jsxs(c.Fragment,{children:[d.map(((t,e)=>c.jsx(s,{x:t.x,y:t.y,text:t.text,fontSize:14,fontFamily:"Manrope",fill:l,width:i,padding:0,align:"center",verticalAlign:"bottom",listening:!1},e))),g.map(((t,e)=>c.jsx(a,{points:t,stroke:l,strokeWidth:1,lineCap:"butt",lineJoin:"miter",tension:1,listening:!1},e)))]})}),[t,e,r,o,n])}({gridAreaHeight:q,gridAreaWidth:t,labelCount:7,minXLN10:T,maxXLN10:J,color:R.textColor}),Q=function({gridAreaHeight:t,gridAreaWidth:e,color:n="#606066"}){return i((()=>{const i=e/2;return c.jsx(a,{points:[i,0,i,t-1],stroke:n,strokeWidth:1,lineCap:"round",lineJoin:"round",tension:1,listening:!1})}),[t,e,n])}({gridAreaHeight:q,gridAreaWidth:t,color:R.midPriceLine}),{leftLine:E,rightLine:Y}=function({leftStatAreaPoints:t,rightStatAreaPoints:e,minXLN10:n,maxXLN10:r,maxLeftHeight:o,maxRightHeight:l,gridAreaWidth:s,gridAreaHeight:d,colorMap:g}){return{leftLine:i((()=>{if(t.length<1)return c.jsx(c.Fragment,{});const e=[];let i=d;for(const l of t){const{middlePrice:t,rectangleHeight:a}=l,g=S({target:t}),m=H({minXLN10:n,maxXLN10:r,width:s,targetLN10:g}),u=P({maxHeight:o,gridAreaHeight:d,value:a});e.push(m,u),u<i&&(i=u)}const l=e.slice(),[m,u]=l,h=l[l.length-1],p=l[l.length-2];return l.push(p,h),l.push(p,d),l.push(m,d),l.push(m,u),c.jsxs(c.Fragment,{children:[c.jsx(a,{points:l,closed:!0,listening:!1,lineCap:"round",lineJoin:"round",fillLinearGradientStartPoint:{x:0,y:d},fillLinearGradientEndPoint:{x:0,y:i},fillLinearGradientColorStops:g.leftBg}),c.jsx(a,{points:e,stroke:g.leftLine,strokeWidth:2,lineCap:"round",lineJoin:"round",listening:!1})]})}),[t,s,n,r,d,o]),rightLine:i((()=>{if(e.length<1)return c.jsx(c.Fragment,{});const t=[];let i=d;for(const o of e){const{middlePrice:e,rectangleHeight:a}=o,g=S({target:e}),m=H({minXLN10:n,maxXLN10:r,width:s,targetLN10:g}),u=P({maxHeight:l,gridAreaHeight:d,value:a});t.push(m,u),u<i&&(i=u)}const o=t.slice(),[m]=o;return o.unshift(m,d),o.unshift(s,d),c.jsxs(c.Fragment,{children:[c.jsx(a,{points:o,closed:!0,listening:!1,lineCap:"round",lineJoin:"round",fillLinearGradientStartPoint:{x:0,y:d},fillLinearGradientEndPoint:{x:0,y:i},fillLinearGradientColorStops:g.rightBg}),c.jsx(a,{points:t,stroke:g.rightLine,strokeWidth:2,lineCap:"round",lineJoin:"round",listening:!1})]})}),[e,s,n,r,d,l])}}({leftStatAreaPoints:M,rightStatAreaPoints:W,minXLN10:T,maxXLN10:J,maxLeftHeight:C,maxRightHeight:F,gridAreaWidth:t,gridAreaHeight:q,colorMap:R});return c.jsxs(d,{width:t,height:b,onMouseMove:D,onMouseOver:D,onMouseEnter:D,onMouseOut:()=>{const{current:t}=O;t&&t.hide()},children:[c.jsxs(g,{children:[c.jsx(m,{x:0,y:0,width:t,height:q,stroke:R.grid,strokeWidth:1}),z,G,E,Y,Q]}),c.jsxs(g,{ref:O,visible:!1,children:[c.jsx(a,{points:[],closed:!0,listening:!1,lineCap:"round",lineJoin:"round",id:"area"}),c.jsx(a,{points:[],strokeWidth:1,stroke:"#ff4f73",lineJoin:"round",lineCap:"round",dash:[4,6],id:"toolTipVertLine"}),c.jsx(u,{x:0,y:0,radius:5,fill:"#FF5072",stroke:"rgba(255, 80, 114, 0.3)",strokeWidth:12,id:"joinCircle"}),c.jsxs(h,{listening:!1,x:0,y:0,id:"priceTextLabel",children:[c.jsx(p,{fill:R.tooltipBg,id:"priceTextLabel-tag"}),c.jsx(s,{text:"-",fontSize:14,fontFamily:"Manrope",padding:2,fill:"#FF5072",id:"priceTextLabel-text"})]}),c.jsxs(h,{listening:!1,id:"tooltip",children:[c.jsx(p,{fill:R.tooltipBg,pointerDirection:"down",pointerWidth:15,pointerHeight:8,cornerRadius:8,lineJoin:"round",id:"tooltip-tag"}),c.jsx(s,{text:"",fontFamily:"Manrope",fontSize:12,lineHeight:17/12,padding:r,fill:"#FF5072",id:"tooltip-Text"})]})]})]})}const B=({width:t=834,height:e=462,baseTokenSymbol:i,quoteTokenSymbol:n,pmmModel:r,pmmParams:l,midPrice:a,notShowTipText:s,colorMap:d})=>c.jsxs(b,{children:[void 0!==l&&void 0!==a&&void 0!==r&&void 0!==a&&c.jsx(k,{width:t,height:e,params:l,midPrice:a,pmmModel:r,baseTokenSymbol:i,quoteTokenSymbol:n,colorMap:d}),s?"":c.jsxs(y,{children:["* ",o("pool.chart.liquidity-chart-tip",{baseTokenSymbol:i})]})]});export{B as default};
|