@dodoex/widgets 3.0.0 → 3.0.1-solana.1
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/assets/bundle-007ZFocI.css +593 -0
- package/dist/{helper-B-HiRq90.js → helper-BDlZKsz2.js} +1 -1
- package/dist/{helper-BKVBNDjK.cjs → helper-BfA94C0a.cjs} +1 -1
- package/dist/{index-C7igC0ot.js → index-0sFBVe24.js} +2 -2
- package/dist/{index-B15VIhJF.cjs → index-BNHn04Tl.cjs} +2 -2
- package/dist/{index-B_LP5IWI.js → index-B_R2PMPy.js} +3 -3
- package/dist/index-CIb0BonQ.js +31 -0
- package/dist/{index-lpcUFCfi.cjs → index-DpM5nfM0.cjs} +5 -5
- package/dist/{index-DcodV9tV.cjs → index-KTuHpQNP.cjs} +5 -5
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/types/components/Widget/index.d.ts +5 -2
- package/dist/types/constants/wallet.d.ts +9 -1
- package/dist/types/hooks/ConnectWallet/useWalletInfo.d.ts +3 -2
- package/dist/types/hooks/contract/useFetchETHBalance.d.ts +93 -2
- package/dist/types/hooks/contract/useFetchTokens.d.ts +1 -2
- package/dist/types/hooks/solana/useSolanaConnection.d.ts +18 -0
- package/dist/types/hooks/solana/useSolanaWallet.d.ts +1 -0
- package/dist/types/providers/SolanaReactProvider.d.ts +4 -0
- package/dist/types/widgets/MiningWidget/hooks/useRewardListAmount.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/PoolOperate/hooks/useLiquidityOperateAmount.d.ts +12 -12
- package/dist/types/widgets/PoolWidget/hooks/usePoolBalanceInfo.d.ts +9 -9
- package/package.json +7 -1
- package/dist/assets/bundle-DSSoJu9z.css +0 -297
- package/dist/index-BHHF0NMg.js +0 -31
|
@@ -0,0 +1,593 @@
|
|
|
1
|
+
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap');
|
|
2
|
+
|
|
3
|
+
.wallet-adapter-button {
|
|
4
|
+
background-color: transparent;
|
|
5
|
+
border: none;
|
|
6
|
+
color: #fff;
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
font-family: 'DM Sans', 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
11
|
+
font-size: 16px;
|
|
12
|
+
font-weight: 600;
|
|
13
|
+
height: 48px;
|
|
14
|
+
line-height: 48px;
|
|
15
|
+
padding: 0 24px;
|
|
16
|
+
border-radius: 4px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.wallet-adapter-button-trigger {
|
|
20
|
+
background-color: #512da8;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.wallet-adapter-button:not([disabled]):focus-visible {
|
|
24
|
+
outline-color: white;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.wallet-adapter-button:not([disabled]):hover {
|
|
28
|
+
background-color: #1a1f2e;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.wallet-adapter-button[disabled] {
|
|
32
|
+
background: #404144;
|
|
33
|
+
color: #999;
|
|
34
|
+
cursor: not-allowed;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.wallet-adapter-button-end-icon,
|
|
38
|
+
.wallet-adapter-button-start-icon,
|
|
39
|
+
.wallet-adapter-button-end-icon img,
|
|
40
|
+
.wallet-adapter-button-start-icon img {
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
width: 24px;
|
|
45
|
+
height: 24px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.wallet-adapter-button-end-icon {
|
|
49
|
+
margin-left: 12px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.wallet-adapter-button-start-icon {
|
|
53
|
+
margin-right: 12px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.wallet-adapter-collapse {
|
|
57
|
+
width: 100%;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.wallet-adapter-dropdown {
|
|
61
|
+
position: relative;
|
|
62
|
+
display: inline-block;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.wallet-adapter-dropdown-list {
|
|
66
|
+
position: absolute;
|
|
67
|
+
z-index: 99;
|
|
68
|
+
display: grid;
|
|
69
|
+
grid-template-rows: 1fr;
|
|
70
|
+
grid-row-gap: 10px;
|
|
71
|
+
padding: 10px;
|
|
72
|
+
top: 100%;
|
|
73
|
+
right: 0;
|
|
74
|
+
margin: 0;
|
|
75
|
+
list-style: none;
|
|
76
|
+
background: #2c2d30;
|
|
77
|
+
border-radius: 10px;
|
|
78
|
+
box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.6);
|
|
79
|
+
opacity: 0;
|
|
80
|
+
visibility: hidden;
|
|
81
|
+
transition: opacity 200ms ease, transform 200ms ease, visibility 200ms;
|
|
82
|
+
font-family: 'DM Sans', 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.wallet-adapter-dropdown-list-active {
|
|
86
|
+
opacity: 1;
|
|
87
|
+
visibility: visible;
|
|
88
|
+
transform: translateY(10px);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.wallet-adapter-dropdown-list-item {
|
|
92
|
+
display: flex;
|
|
93
|
+
flex-direction: row;
|
|
94
|
+
justify-content: center;
|
|
95
|
+
align-items: center;
|
|
96
|
+
border: none;
|
|
97
|
+
outline: none;
|
|
98
|
+
cursor: pointer;
|
|
99
|
+
white-space: nowrap;
|
|
100
|
+
box-sizing: border-box;
|
|
101
|
+
padding: 0 20px;
|
|
102
|
+
width: 100%;
|
|
103
|
+
border-radius: 6px;
|
|
104
|
+
font-size: 14px;
|
|
105
|
+
font-weight: 600;
|
|
106
|
+
height: 37px;
|
|
107
|
+
color: #fff;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.wallet-adapter-dropdown-list-item:not([disabled]):hover {
|
|
111
|
+
background-color: #1a1f2e;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.wallet-adapter-modal-collapse-button svg {
|
|
115
|
+
align-self: center;
|
|
116
|
+
fill: #999;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.wallet-adapter-modal-collapse-button.wallet-adapter-modal-collapse-button-active svg {
|
|
120
|
+
transform: rotate(180deg);
|
|
121
|
+
transition: transform ease-in 150ms;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.wallet-adapter-modal {
|
|
125
|
+
position: fixed;
|
|
126
|
+
top: 0;
|
|
127
|
+
left: 0;
|
|
128
|
+
right: 0;
|
|
129
|
+
bottom: 0;
|
|
130
|
+
opacity: 0;
|
|
131
|
+
transition: opacity linear 150ms;
|
|
132
|
+
background: rgba(0, 0, 0, 0.5);
|
|
133
|
+
z-index: 1040;
|
|
134
|
+
overflow-y: auto;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.wallet-adapter-modal.wallet-adapter-modal-fade-in {
|
|
138
|
+
opacity: 1;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.wallet-adapter-modal-button-close {
|
|
142
|
+
display: flex;
|
|
143
|
+
align-items: center;
|
|
144
|
+
justify-content: center;
|
|
145
|
+
position: absolute;
|
|
146
|
+
top: 18px;
|
|
147
|
+
right: 18px;
|
|
148
|
+
padding: 12px;
|
|
149
|
+
cursor: pointer;
|
|
150
|
+
background: #1a1f2e;
|
|
151
|
+
border: none;
|
|
152
|
+
border-radius: 50%;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.wallet-adapter-modal-button-close:focus-visible {
|
|
156
|
+
outline-color: white;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.wallet-adapter-modal-button-close svg {
|
|
160
|
+
fill: #777;
|
|
161
|
+
transition: fill 200ms ease 0s;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.wallet-adapter-modal-button-close:hover svg {
|
|
165
|
+
fill: #fff;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.wallet-adapter-modal-overlay {
|
|
169
|
+
background: rgba(0, 0, 0, 0.5);
|
|
170
|
+
position: fixed;
|
|
171
|
+
top: 0;
|
|
172
|
+
left: 0;
|
|
173
|
+
bottom: 0;
|
|
174
|
+
right: 0;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.wallet-adapter-modal-container {
|
|
178
|
+
display: flex;
|
|
179
|
+
margin: 3rem;
|
|
180
|
+
min-height: calc(100vh - 6rem); /* 100vh - 2 * margin */
|
|
181
|
+
align-items: center;
|
|
182
|
+
justify-content: center;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
@media (max-width: 480px) {
|
|
186
|
+
.wallet-adapter-modal-container {
|
|
187
|
+
margin: 1rem;
|
|
188
|
+
min-height: calc(100vh - 2rem); /* 100vh - 2 * margin */
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.wallet-adapter-modal-wrapper {
|
|
193
|
+
box-sizing: border-box;
|
|
194
|
+
position: relative;
|
|
195
|
+
display: flex;
|
|
196
|
+
align-items: center;
|
|
197
|
+
flex-direction: column;
|
|
198
|
+
z-index: 1050;
|
|
199
|
+
max-width: 400px;
|
|
200
|
+
border-radius: 10px;
|
|
201
|
+
background: #10141f;
|
|
202
|
+
box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.6);
|
|
203
|
+
font-family: 'DM Sans', 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
204
|
+
flex: 1;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.wallet-adapter-modal-wrapper .wallet-adapter-button {
|
|
208
|
+
width: 100%;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.wallet-adapter-modal-title {
|
|
212
|
+
font-weight: 500;
|
|
213
|
+
font-size: 24px;
|
|
214
|
+
line-height: 36px;
|
|
215
|
+
margin: 0;
|
|
216
|
+
padding: 64px 48px 48px 48px;
|
|
217
|
+
text-align: center;
|
|
218
|
+
color: #fff;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
@media (max-width: 374px) {
|
|
222
|
+
.wallet-adapter-modal-title {
|
|
223
|
+
font-size: 18px;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.wallet-adapter-modal-list {
|
|
228
|
+
margin: 0 0 12px 0;
|
|
229
|
+
padding: 0;
|
|
230
|
+
width: 100%;
|
|
231
|
+
list-style: none;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.wallet-adapter-modal-list .wallet-adapter-button {
|
|
235
|
+
font-weight: 400;
|
|
236
|
+
border-radius: 0;
|
|
237
|
+
font-size: 18px;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.wallet-adapter-modal-list .wallet-adapter-button-end-icon,
|
|
241
|
+
.wallet-adapter-modal-list .wallet-adapter-button-start-icon,
|
|
242
|
+
.wallet-adapter-modal-list .wallet-adapter-button-end-icon img,
|
|
243
|
+
.wallet-adapter-modal-list .wallet-adapter-button-start-icon img {
|
|
244
|
+
width: 28px;
|
|
245
|
+
height: 28px;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.wallet-adapter-modal-list .wallet-adapter-button span {
|
|
249
|
+
margin-left: auto;
|
|
250
|
+
font-size: 14px;
|
|
251
|
+
opacity: .6;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.wallet-adapter-modal-list-more {
|
|
255
|
+
cursor: pointer;
|
|
256
|
+
border: none;
|
|
257
|
+
padding: 12px 24px 24px 12px;
|
|
258
|
+
align-self: flex-end;
|
|
259
|
+
display: flex;
|
|
260
|
+
align-items: center;
|
|
261
|
+
background-color: transparent;
|
|
262
|
+
color: #fff;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.wallet-adapter-modal-list-more svg {
|
|
266
|
+
transition: all 0.1s ease;
|
|
267
|
+
fill: rgba(255, 255, 255, 1);
|
|
268
|
+
margin-left: 0.5rem;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.wallet-adapter-modal-list-more-icon-rotate {
|
|
272
|
+
transform: rotate(180deg);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.wallet-adapter-modal-middle {
|
|
276
|
+
width: 100%;
|
|
277
|
+
display: flex;
|
|
278
|
+
flex-direction: column;
|
|
279
|
+
align-items: center;
|
|
280
|
+
padding: 0 24px 24px 24px;
|
|
281
|
+
box-sizing: border-box;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.wallet-adapter-modal-middle-button {
|
|
285
|
+
display: block;
|
|
286
|
+
cursor: pointer;
|
|
287
|
+
margin-top: 48px;
|
|
288
|
+
width: 100%;
|
|
289
|
+
background-color: #512da8;
|
|
290
|
+
padding: 12px;
|
|
291
|
+
font-size: 18px;
|
|
292
|
+
border: none;
|
|
293
|
+
border-radius: 8px;
|
|
294
|
+
color: #fff;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.rmc-date-picker {
|
|
298
|
+
display: -ms-flexbox;
|
|
299
|
+
display: flex;
|
|
300
|
+
-ms-flex-align: center;
|
|
301
|
+
align-items: center;
|
|
302
|
+
padding: 10px 0;
|
|
303
|
+
}
|
|
304
|
+
.rmc-date-picker-item {
|
|
305
|
+
-ms-flex: 1;
|
|
306
|
+
flex: 1;
|
|
307
|
+
text-align: center;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.rmc-picker,
|
|
311
|
+
.rmc-multi-picker {
|
|
312
|
+
height: 238px;
|
|
313
|
+
/*34*7*/
|
|
314
|
+
}
|
|
315
|
+
.rmc-multi-picker {
|
|
316
|
+
display: -webkit-box;
|
|
317
|
+
display: flex;
|
|
318
|
+
-webkit-box-align: center;
|
|
319
|
+
align-items: center;
|
|
320
|
+
}
|
|
321
|
+
.rmc-picker-item {
|
|
322
|
+
font-size: 16px;
|
|
323
|
+
height: 34px;
|
|
324
|
+
line-height: 34px;
|
|
325
|
+
padding: 0 10px;
|
|
326
|
+
white-space: nowrap;
|
|
327
|
+
position: relative;
|
|
328
|
+
overflow: hidden;
|
|
329
|
+
text-overflow: ellipsis;
|
|
330
|
+
color: #9b9b9b;
|
|
331
|
+
width: 100%;
|
|
332
|
+
box-sizing: border-box;
|
|
333
|
+
}
|
|
334
|
+
.rmc-picker {
|
|
335
|
+
display: block;
|
|
336
|
+
position: relative;
|
|
337
|
+
overflow: hidden;
|
|
338
|
+
width: 100%;
|
|
339
|
+
-webkit-box-flex: 1;
|
|
340
|
+
flex: 1;
|
|
341
|
+
text-align: center;
|
|
342
|
+
}
|
|
343
|
+
.rmc-picker-mask {
|
|
344
|
+
position: absolute;
|
|
345
|
+
left: 0;
|
|
346
|
+
top: 0;
|
|
347
|
+
height: 100%;
|
|
348
|
+
margin: 0 auto;
|
|
349
|
+
width: 100%;
|
|
350
|
+
z-index: 3;
|
|
351
|
+
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255, 255, 255, 0.95)), to(rgba(255, 255, 255, 0.6))), -webkit-gradient(linear, left bottom, left top, from(rgba(255, 255, 255, 0.95)), to(rgba(255, 255, 255, 0.6)));
|
|
352
|
+
background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6)), linear-gradient(to top, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6));
|
|
353
|
+
background-position: top, bottom;
|
|
354
|
+
background-size: 100% 204px;
|
|
355
|
+
background-repeat: no-repeat;
|
|
356
|
+
}
|
|
357
|
+
.rmc-picker-content {
|
|
358
|
+
position: absolute;
|
|
359
|
+
left: 0;
|
|
360
|
+
top: 0;
|
|
361
|
+
width: 100%;
|
|
362
|
+
z-index: 1;
|
|
363
|
+
}
|
|
364
|
+
.rmc-picker-indicator {
|
|
365
|
+
box-sizing: border-box;
|
|
366
|
+
width: 100%;
|
|
367
|
+
height: 34px;
|
|
368
|
+
position: absolute;
|
|
369
|
+
left: 0;
|
|
370
|
+
top: 102px;
|
|
371
|
+
z-index: 3;
|
|
372
|
+
border-top: 1PX solid #ddd;
|
|
373
|
+
border-bottom: 1PX solid #ddd;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/*!
|
|
377
|
+
* https://github.com/arqex/react-datetime
|
|
378
|
+
*/
|
|
379
|
+
|
|
380
|
+
.rdt {
|
|
381
|
+
position: relative;
|
|
382
|
+
}
|
|
383
|
+
.rdtPicker {
|
|
384
|
+
display: none;
|
|
385
|
+
position: absolute;
|
|
386
|
+
min-width: 250px;
|
|
387
|
+
padding: 4px;
|
|
388
|
+
margin-top: 1px;
|
|
389
|
+
z-index: 99999 !important;
|
|
390
|
+
background: #fff;
|
|
391
|
+
box-shadow: 0 1px 3px rgba(0,0,0,.1);
|
|
392
|
+
border: 1px solid #f9f9f9;
|
|
393
|
+
}
|
|
394
|
+
.rdtOpen .rdtPicker {
|
|
395
|
+
display: block;
|
|
396
|
+
}
|
|
397
|
+
.rdtStatic .rdtPicker {
|
|
398
|
+
box-shadow: none;
|
|
399
|
+
position: static;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.rdtPicker .rdtTimeToggle {
|
|
403
|
+
text-align: center;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
.rdtPicker table {
|
|
407
|
+
width: 100%;
|
|
408
|
+
margin: 0;
|
|
409
|
+
}
|
|
410
|
+
.rdtPicker td,
|
|
411
|
+
.rdtPicker th {
|
|
412
|
+
text-align: center;
|
|
413
|
+
height: 28px;
|
|
414
|
+
}
|
|
415
|
+
.rdtPicker td {
|
|
416
|
+
cursor: pointer;
|
|
417
|
+
}
|
|
418
|
+
.rdtPicker td.rdtDay:hover,
|
|
419
|
+
.rdtPicker td.rdtHour:hover,
|
|
420
|
+
.rdtPicker td.rdtMinute:hover,
|
|
421
|
+
.rdtPicker td.rdtSecond:hover,
|
|
422
|
+
.rdtPicker .rdtTimeToggle:hover {
|
|
423
|
+
background: #eeeeee;
|
|
424
|
+
cursor: pointer;
|
|
425
|
+
}
|
|
426
|
+
.rdtPicker td.rdtOld,
|
|
427
|
+
.rdtPicker td.rdtNew {
|
|
428
|
+
color: #999999;
|
|
429
|
+
}
|
|
430
|
+
.rdtPicker td.rdtToday {
|
|
431
|
+
position: relative;
|
|
432
|
+
}
|
|
433
|
+
.rdtPicker td.rdtToday:before {
|
|
434
|
+
content: '';
|
|
435
|
+
display: inline-block;
|
|
436
|
+
border-left: 7px solid transparent;
|
|
437
|
+
border-bottom: 7px solid #428bca;
|
|
438
|
+
border-top-color: rgba(0, 0, 0, 0.2);
|
|
439
|
+
position: absolute;
|
|
440
|
+
bottom: 4px;
|
|
441
|
+
right: 4px;
|
|
442
|
+
}
|
|
443
|
+
.rdtPicker td.rdtActive,
|
|
444
|
+
.rdtPicker td.rdtActive:hover {
|
|
445
|
+
background-color: #428bca;
|
|
446
|
+
color: #fff;
|
|
447
|
+
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
|
448
|
+
}
|
|
449
|
+
.rdtPicker td.rdtActive.rdtToday:before {
|
|
450
|
+
border-bottom-color: #fff;
|
|
451
|
+
}
|
|
452
|
+
.rdtPicker td.rdtDisabled,
|
|
453
|
+
.rdtPicker td.rdtDisabled:hover {
|
|
454
|
+
background: none;
|
|
455
|
+
color: #999999;
|
|
456
|
+
cursor: not-allowed;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.rdtPicker td span.rdtOld {
|
|
460
|
+
color: #999999;
|
|
461
|
+
}
|
|
462
|
+
.rdtPicker td span.rdtDisabled,
|
|
463
|
+
.rdtPicker td span.rdtDisabled:hover {
|
|
464
|
+
background: none;
|
|
465
|
+
color: #999999;
|
|
466
|
+
cursor: not-allowed;
|
|
467
|
+
}
|
|
468
|
+
.rdtPicker th {
|
|
469
|
+
border-bottom: 1px solid #f9f9f9;
|
|
470
|
+
}
|
|
471
|
+
.rdtPicker .dow {
|
|
472
|
+
width: 14.2857%;
|
|
473
|
+
border-bottom: none;
|
|
474
|
+
cursor: default;
|
|
475
|
+
}
|
|
476
|
+
.rdtPicker th.rdtSwitch {
|
|
477
|
+
width: 100px;
|
|
478
|
+
}
|
|
479
|
+
.rdtPicker th.rdtNext,
|
|
480
|
+
.rdtPicker th.rdtPrev {
|
|
481
|
+
font-size: 21px;
|
|
482
|
+
vertical-align: top;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
.rdtPrev span,
|
|
486
|
+
.rdtNext span {
|
|
487
|
+
display: block;
|
|
488
|
+
-webkit-touch-callout: none; /* iOS Safari */
|
|
489
|
+
-webkit-user-select: none; /* Chrome/Safari/Opera */
|
|
490
|
+
-khtml-user-select: none; /* Konqueror */
|
|
491
|
+
-moz-user-select: none; /* Firefox */
|
|
492
|
+
-ms-user-select: none; /* Internet Explorer/Edge */
|
|
493
|
+
user-select: none;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
.rdtPicker th.rdtDisabled,
|
|
497
|
+
.rdtPicker th.rdtDisabled:hover {
|
|
498
|
+
background: none;
|
|
499
|
+
color: #999999;
|
|
500
|
+
cursor: not-allowed;
|
|
501
|
+
}
|
|
502
|
+
.rdtPicker thead tr:first-of-type th {
|
|
503
|
+
cursor: pointer;
|
|
504
|
+
}
|
|
505
|
+
.rdtPicker thead tr:first-of-type th:hover {
|
|
506
|
+
background: #eeeeee;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
.rdtPicker tfoot {
|
|
510
|
+
border-top: 1px solid #f9f9f9;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
.rdtPicker button {
|
|
514
|
+
border: none;
|
|
515
|
+
background: none;
|
|
516
|
+
cursor: pointer;
|
|
517
|
+
}
|
|
518
|
+
.rdtPicker button:hover {
|
|
519
|
+
background-color: #eee;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
.rdtPicker thead button {
|
|
523
|
+
width: 100%;
|
|
524
|
+
height: 100%;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
td.rdtMonth,
|
|
528
|
+
td.rdtYear {
|
|
529
|
+
height: 50px;
|
|
530
|
+
width: 25%;
|
|
531
|
+
cursor: pointer;
|
|
532
|
+
}
|
|
533
|
+
td.rdtMonth:hover,
|
|
534
|
+
td.rdtYear:hover {
|
|
535
|
+
background: #eee;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
.rdtCounters {
|
|
539
|
+
display: inline-block;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
.rdtCounters > div {
|
|
543
|
+
float: left;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
.rdtCounter {
|
|
547
|
+
height: 100px;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
.rdtCounter {
|
|
551
|
+
width: 40px;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
.rdtCounterSeparator {
|
|
555
|
+
line-height: 100px;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
.rdtCounter .rdtBtn {
|
|
559
|
+
height: 40%;
|
|
560
|
+
line-height: 40px;
|
|
561
|
+
cursor: pointer;
|
|
562
|
+
display: block;
|
|
563
|
+
|
|
564
|
+
-webkit-touch-callout: none; /* iOS Safari */
|
|
565
|
+
-webkit-user-select: none; /* Chrome/Safari/Opera */
|
|
566
|
+
-khtml-user-select: none; /* Konqueror */
|
|
567
|
+
-moz-user-select: none; /* Firefox */
|
|
568
|
+
-ms-user-select: none; /* Internet Explorer/Edge */
|
|
569
|
+
user-select: none;
|
|
570
|
+
}
|
|
571
|
+
.rdtCounter .rdtBtn:hover {
|
|
572
|
+
background: #eee;
|
|
573
|
+
}
|
|
574
|
+
.rdtCounter .rdtCount {
|
|
575
|
+
height: 20%;
|
|
576
|
+
font-size: 1.2em;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
.rdtMilli {
|
|
580
|
+
vertical-align: middle;
|
|
581
|
+
padding-left: 8px;
|
|
582
|
+
width: 48px;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
.rdtMilli input {
|
|
586
|
+
width: 100%;
|
|
587
|
+
font-size: 1.2em;
|
|
588
|
+
margin-top: 37px;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
.rdtTime td {
|
|
592
|
+
cursor: default;
|
|
593
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i18n as e}from"@lingui/core";import t from"bignumber.js";import{f as i}from"./index-
|
|
1
|
+
import{i18n as e}from"@lingui/core";import t from"bignumber.js";import{f as i}from"./index-CIb0BonQ.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@lingui/core"),t=require("bignumber.js"),i=require("./index-
|
|
1
|
+
"use strict";var e=require("@lingui/core"),t=require("bignumber.js"),i=require("./index-DpM5nfM0.cjs");function o(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 r=i.getPriceDepth(o),n=r.baseAmount,l=r.quoteAmount,{isBuy:s}=r;return{side:s?"ask":"bid",vert:s?n:l,base:n,quote:l}}function n(e,i=1){return new t(i).div(e/2)}exports.baseZoomMultiples=1,exports.beforePriceImpactEffect=function({currentBaseMinAndZoomMultiples:e,targetPrice:i,midPrice:o,width:r}){const{baseMin:n,zoomMultiples:l}=e,s=new t(Math.log10(n.div(o).toNumber())),u=s.plus(2*l),a=new t(o.multipliedBy(10**u.toNumber()));if(i.gte(n)&&i.lte(a)){return{isSkip:!0,targetX:new t(Math.log10(i.div(o).toNumber())).minus(s).div(2*l).multipliedBy(r).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(r).toNumber(),baseMin:m,zoomMultiples:1}}return{isSkip:!1,targetX:-1,baseMin:new t(0),zoomMultiples:1}},exports.chartOffsetYBCToolTip=18,exports.chartT=function(t,i){switch(t){case"depth-chart.tips.buy":return e.i18n._({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.i18n._({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.i18n._({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.i18n._({id:"TaScUS",message:"Users sell {0} amount:",values:{0:i.symbol}});case"pool.chart.price-impact":return e.i18n._({id:"I0LXan",message:"Price Impact: {0}",values:{0:i.amount}});case"pool.chart.sell-amount":return e.i18n._({id:"F2vX4t",message:"Users buy {0} amount:",values:{0:i.symbol}});case"pool.create.disabled-token-amount":return e.i18n._({id:"5QDjef",message:"The token amount is calculated by initial price."});case"pool.create.set-pool.emulator.title":return e.i18n._({id:"FQfStS",message:"Emulator"});case"pool.create.set-pool.emulator.title.question":return e.i18n._({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.i18n._({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.i18n._({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.i18n._({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}`)}},exports.colorRgb=o,exports.computeBaseAfterZoom=function({midPrice:e,zoomMultiples:t}){return e.multipliedBy(10**-t)},exports.computeBaseMinByDistance=function({dragDistance:e,prevBaseMin:i,chartWidth:o,zoomMultiples:r}){const l=n(o,r);return e>0?i.multipliedBy(1-l.multipliedBy(e).toNumber()):i.multipliedBy(10**l.multipliedBy(new t(e).abs()).plus(0).toNumber())},exports.computeBaseVert=function({midPrice:e,q:i,q0:o,pmmModel:r}){let n=t.maximum(i,o,r.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)}},exports.computeTargetXByTargetPrice=function({type:e,targetPrice:i,midPrice:o,width:r}){if("sell"===e){return{zoomMultiples:new t(Math.log10(i.div(o).toNumber())).minus(0).div(3/4).abs(),targetX:r/2*(3/4)+r/2}}const n=new t(Math.log10(i.div(o).toNumber()));return{zoomMultiples:new t(0).minus(n).div(3/4).abs(),targetX:r/2*(1/4)}},exports.computeXPortion=n,exports.computeZoomMultiplesWhenZoom=function({prevZoomMultiples:e,zoomIn:t}){return!t&&e<=.1?e:t?e+.1:e-.1},exports.evalPoint=r,exports.labelPadding=12,exports.updateTooltip=function({tooltip:e,x:l,chartWidth:s,chartHeight:u,buyBaseVert:a,sellBaseVert:m,pmmModel:p,midPrice:c,baseTokenSymbol:d,quoteTokenSymbol:h,t:b,baseMinAndZoomMultiples:f,isHover:g,color:y,leftColor:x,rightColor:T}){const{zoomMultiples:v,baseMin:w}=f,B=n(s,v),M=a.div(u),k=m.div(u),q=2*v,S=w.multipliedBy(10**B.multipliedBy(l).toNumber());let N=new t(Math.log(c.div(w).toNumber())/Math.log(10));N=t.minimum(q,N),N=t.maximum(0,N);const P=N.div(B),X=r({val:S,model:p,midPrice:c});if(X.vert.isNaN())return;const A=S.lt(c);let O=u-X.vert.div(M).toNumber();A||(O=u-X.vert.div(k).toNumber());const _=i.formatShortNumber(S),z=i.formatShortNumber(X.vert),D=S.minus(c).abs().div(c).multipliedBy(100).toFixed(2),$=P.toNumber(),H=e.findOne("#toolTipVertLine"),L=e.findOne("#toolTipHoriLine"),U=e.findOne("#joinCircle"),V=e.findOne("#toolTip"),W=e.findOne("#priceTextLabel"),Y=e.findOne("#slippageTextLabel");if(!V)return;V.x(l),V.y(O-5-6);const Z=V.getText(),I=V.getTag();let j="ask"===X.side?i.formatShortNumber(X.quote):i.formatShortNumber(X.base);const C=p.k.lte(0);C&&(j=z);const F=i.formatShortNumber(c),Q={amountText:z,baseTokenSymbol:d,oppositeAmountText:j,quoteTokenSymbol:h,priceText:C?F:_,slippageText:`${A?"-":"+"}${D}`};if(P.minus(4).lte(l)&&P.plus(2).gte(l)&&g)Z.text(b("depth-chart.tips.mid-price",{amountText:1,baseTokenSymbol:d,oppositeAmountText:F,quoteTokenSymbol:h})),V.x($),V.y(u/2),null==H||H.hide(),null==L||L.hide(),null==U||U.hide(),null==W||W.hide(),null==Y||Y.hide();else{Z.text(A?b("depth-chart.tips.buy",{amountText:j,baseTokenSymbol:d,oppositeAmountText:z,quoteTokenSymbol:h,priceText:C?F:_,slippageText:`${A?"-":"+"}${D}`}):b("depth-chart.tips.sell",Q));const e=y||(A?"#55f6db":"#ff4f73"),t=A?x||"#55f6db":T||"#ff4f73";Z.fill(e),V.width()/2>l?(I.pointerDirection("left"),I.pointerHeight(15),I.pointerWidth(8),V.offsetX(-11),V.offsetY(-11)):V.width()/2+l>s?(I.pointerDirection("right"),I.pointerHeight(15),I.pointerWidth(8),V.offsetX(11),V.offsetY(-11)):(I.pointerDirection("down"),I.pointerHeight(8),I.pointerWidth(15),V.offsetX(0),V.offsetY(0)),null==H||H.points([l,u,l,O]),null==H||H.stroke(t),null==L||L.points(A?[l,O,$,O]:[$,O,l,O]),null==L||L.stroke(t),null==U||U.x(l),null==U||U.y(O),null==U||U.fill(A?x||"rgb(86, 246, 218)":T||"#FF5072"),null==U||U.stroke(A?x?`rgba(${o(x)}, 0.4)`:"rgba(86, 246, 218, 0.3)":T?`rgba(${o(T)}, 0.4)`:"rgba(255, 80, 114, 0.3)"),W&&(W.x(l),W.y(u),W.offsetX(W.width()/2),W.x()-W.width()/2<0?W.x(W.width()/2):W.x()+W.width()/2>s?W.x(s-W.width()/2):W.x(l));const i=null==W?void 0:W.findOne("#priceTextLabel-text");i&&(i.fill(e),i.text(_)),Y&&(Y.x(A?l+($-l)/2:l-(l-$)/2),Y.y(O),Y.offsetY(Y.height()/2),Y.offsetX(Y.width()/2));const r=null==Y?void 0:Y.findOne("#slippageTextLabel-text");r&&(r.fill(e),r.text(`${A?"-":"+"}${D}%`)),null==H||H.show(),null==L||L.show(),null==U||U.show(),null==W||W.show(),null==Y||Y.show()}e.show()};
|