@iccandle/news 0.0.7 → 0.0.9
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/news-widget.cjs +6 -6
- package/dist/news-widget.d.ts +1 -0
- package/dist/news-widget.js +823 -799
- package/package.json +1 -1
package/dist/news-widget.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.cta-loader__overlay{background-color:var(--iccandle-background);position:fixed;inset:0;z-index:999999;display:flex;align-items:center;justify-content:center;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.cta-loader__content{position:relative;display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center;gap:9rem;padding-left:1.5rem;padding-right:1.5rem}.cta-loader__video{height:100%;max-height:18rem;width:100%;object-fit:contain}@media(min-width:768px){.cta-loader__video{max-height:20rem}}.cta-loader__bar-wrapper{width:100%;max-width:24rem}.cta-loader__bar-track{position:relative;height:.25rem;overflow:hidden;border-radius:9999px;background-color:var( --iccandle-background-secondary, rgba(128, 128, 128, .7) )}.cta-loader__bar-fill{position:absolute;top:0;bottom:0;left:0;width:100%;transform-origin:left;border-radius:9999px;background-color:var(--iccandle-primary, #ffffff);will-change:transform}.news-widget_detail_page__container{background:var(--iccandle-background);display:flex;height:100%;width:100%}.news-widget_detail_page__right_border{display:flex;flex:1;flex-direction:column;min-width:50%;border-right-style:solid;border-right-color:var(--iccandle-border);border-right-width:1px}.news-widget_detail_page__event_details{height:calc(100% - 57px)}.news-widget_detail_page__title_container{display:flex;height:57px;width:100%;align-items:center;justify-content:space-between;border-bottom-style:solid;border-bottom-color:var(--iccandle-border);border-bottom-width:1px}.news-widget_detail_page__title_padding{display:flex;align-items:center;gap:8px;padding:16px}.news-widget_detail_page__title_text{font-size:18px;line-height:calc(1.75 / 1.125);font-weight:600;color:var(--iccandle-title)}.news-widget_detail_page__back_button{height:2.25rem;width:2.25rem;border:none}.news-widget_detail_page__back_icon{color:var(--iccandle-text);height:1.25rem;width:1.25rem}.news-widget_event_details__container{background-color:var(--iccandle-background);box-sizing:border-box;display:flex;min-height:100%;width:100%;min-width:50%;flex:1;flex-direction:column;overflow:auto;gap:16px;padding:16px}.news-widget_event_details__container_sm{height:50%}@media(min-width:40rem){.news-widget_event_details__container_sm{height:100%}}.news-widget_event_details__ghost_button{background-color:var(--iccandle-background);position:absolute;right:50%;bottom:-8px;height:12px;width:24px;color:var(--iccandle-text);border-radius:calc(infinity * 1px);border-style:solid;border-width:1px;border-color:var(--iccandle-border);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.news-widget_event_details__ghost_button_open{rotate:180deg}.news-widget_event_details__icon{height:16px;width:16px}.news-widget_event_details__chart_wrapper{position:relative;height:100%;min-height:500px}.news-widget_event_details__chart{height:100%;min-height:500px;overflow:hidden;border-radius:.75rem;border-style:solid;border-width:1px;border-color:var(--iccandle-border)}.news-widget_event_details_card__container{background-color:var(--iccandle-background);position:relative;border-radius:1rem;border-style:solid;border-width:1px;border-color:var(--iccandle-border);padding:.75rem}@media(min-width:40rem){.news-widget_event_details_card__container{min-height:170px;padding:1rem}}.news-widget_event_details_card__text{font-weight:600;color:var(--iccandle-news-details-title)}.news-widget_event_details_card__event_name{line-height:1.25;font-weight:700;font-size:1rem;color:var(--iccandle-title)}@media(min-width:40rem){.news-widget_event_details_card__event_name{font-size:1.125rem;line-height:1.75rem}}.news-widget_event_details_card__status_container{display:flex;align-items:center;gap:.25rem;font-size:.75rem;line-height:calc(1 / .75);text-wrap:nowrap;color:var(--iccandle-title)}.news-widget_event_details_card__status{height:.5rem;width:.5rem;border-radius:calc(infinity * 1px)}.news-widget_event_details_card__collapsible{display:grid;width:100%;overflow:hidden;transition:grid-template-rows .5s ease-in-out,opacity .5s ease-in-out}.news-widget_event_details_card__collapsible--open{grid-template-rows:1fr;opacity:1}.news-widget_event_details_card__collapsible--closed{grid-template-rows:0fr;opacity:0}.news-widget_event_details_card__text_bold{font-size:.875rem;line-height:1.25rem;font-weight:700}.news-widget_event_details_card__body{display:flex;height:100%;flex-direction:column;align-items:stretch;justify-content:space-between;gap:.75rem}@media(min-width:40rem){.news-widget_event_details_card__body{flex-direction:row;gap:.25rem}}.news-widget_event_details_card__left{display:flex;width:100%;flex-direction:column;gap:.5rem;border-bottom:1px solid var(--iccandle-border);padding-bottom:.75rem}@media(min-width:40rem){.news-widget_event_details_card__left{border-bottom:none;border-right:1px solid var(--iccandle-border);padding-bottom:0;padding-right:1rem}}.news-widget_event_details_card__header_row{display:flex;width:100%;align-items:flex-start;gap:.5rem}@media(min-width:40rem){.news-widget_event_details_card__header_row{align-items:center;gap:.75rem}}.news-widget_event_details_card__header_inner{display:flex;width:100%;flex-direction:column;align-items:flex-start;gap:.5rem}.news-widget_event_details_card__timestamp_row{display:flex;width:100%;align-items:center;justify-content:space-between;gap:.5rem}.news-widget_event_details_card__timestamp{font-size:.875rem;color:var(--iccandle-gray)}.news-widget_event_details_card__currency_row{display:flex;width:100%;align-items:center;gap:.5rem}@media(min-width:40rem){.news-widget_event_details_card__currency_row{max-height:2.25rem;gap:.75rem}}.news-widget_event_details_card__currency_icon{width:1.75rem;height:1.75rem;flex-shrink:0}@media(min-width:40rem){.news-widget_event_details_card__currency_icon{width:2.25rem;height:2.25rem}}.news-widget_event_details_card__currency_img{height:100%;width:100%;border-radius:9999px;object-fit:cover}.news-widget_event_details_card__speech_icon{width:1.25rem;height:1.25rem;flex-shrink:0}@media(min-width:40rem){.news-widget_event_details_card__speech_icon{width:1.75rem;height:1.75rem}}.news-widget_event_details_card__values_row{display:flex;width:100%;flex-direction:column;gap:.5rem}@media(min-width:40rem){.news-widget_event_details_card__values_row{flex-direction:row;justify-content:space-between}}.news-widget_event_details_card__values_group{display:flex;flex-wrap:wrap;align-items:flex-start;gap:.5rem}@media(min-width:40rem){.news-widget_event_details_card__values_group{align-items:center;gap:.75rem}}.news-widget_event_details_card__label{font-size:.75rem;font-weight:500;color:var(--iccandle-dark-gray)}.news-widget_event_details_card__fomc_source{margin-top:.5rem;font-size:.75rem;color:var(--iccandle-news-details-title)}@media(min-width:40rem){.news-widget_event_details_card__fomc_source{font-size:.875rem}}.news-widget_event_details_card__fomc_link{word-break:break-all;color:#3b82f6;text-decoration:underline}.news-widget_event_details_card__right{display:flex;width:100%;flex:1;flex-direction:column;align-items:flex-end;justify-content:center;gap:.75rem;padding-left:.25rem}@media(min-width:40rem){.news-widget_event_details_card__right{min-width:40%;padding-left:1rem}}.news-widget_event_details_card__description{font-size:.75rem;color:var(--iccandle-dark-gray);text-align:start;overflow-wrap:break-word;line-height:var(1 / .75)}.news-widget_event_details_card__collapsible_inner{display:flex;min-height:0;flex-direction:column;gap:1rem;overflow:hidden;padding-top:1rem;text-align:left}.news-widget_event_details_card__previous_events_list{display:flex;gap:.75rem;overflow-x:auto;padding-bottom:.75rem}.news-widget_event_details_card__info{display:flex;flex-direction:column;border-radius:.375rem;border-style:solid;border-width:1px;border-color:color-mix(in oklab,var(--iccandle-muted) 50%,transparent);padding-inline:.5rem;padding-block:.25rem;box-shadow:0 1px 2px #0000000d;text-align:left}.news-widget_news_card__container{background:var(--iccandle-background);width:220px;flex-shrink:0;border-radius:.75rem;border-style:solid;border-width:1px;border-color:var(--iccandle-border);padding:.75rem}.news-widget_news_card__title{color:var(--iccandle-news-card-title);font-size:.875rem;line-height:1.25;font-weight:600;text-align:left}.news-widget_news_card__info_card{background:color-mix(in oklab,var(--iccandle-muted) 50%,transparent);flex:1;padding:.25rem;text-align:center;border-radius:.5rem}.news-widget_news_card__font_semibold{font-weight:600}.news-widget_news_card__info_row{display:flex;align-items:stretch;gap:.25rem;font-size:.75rem;line-height:1rem}.news-widget_news_card__label{color:var(--iccandle-gray);margin-bottom:.25rem}.news-widget_news_card__header{display:flex;align-items:flex-start;gap:.75rem;margin-bottom:.75rem}.news-widget_news_card__currency_icon{width:1.75rem;height:1.75rem;flex-shrink:0}.news-widget_news_card__currency_img{height:100%;width:100%;border-radius:9999px;object-fit:cover}.news-widget_news_card__meta{min-width:0}.news-widget_news_card__date{color:var(--iccandle-gray);margin-bottom:.125rem;font-size:.75rem;line-height:1rem}.news-widget_main__container{display:flex;height:100%;width:100%;flex-direction:column;overflow-y:auto}@media(min-width:1024px){.news-widget_main__container--lg{flex-direction:row;overflow-y:unset}}.news-widget_main__iframe_full{height:100%;width:100%;border:none}.news-widget_main__iframe_half{width:100%;height:100%;border:none;flex-shrink:0}@media(min-width:1024px){.news-widget_main__container--lg .news-widget_main__iframe_half{width:50%;height:100%;flex-shrink:1}}.news-widget_main__left{width:100%;height:100%;flex-shrink:0;display:flex;flex-direction:column}@media(min-width:1024px){.news-widget_main__container--lg .news-widget_main__left{width:50%;height:100%;flex-shrink:1}}.news-widget__button{display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer;color:var(--iccandle-text);transition:color .15s,background-color .15s}.news-widget__button:focus-visible{outline:none;box-shadow:0 0 0 2px var(--iccandle-background),0 0 0 4px var(--iccandle-primary)}.news-widget__button:disabled{pointer-events:none;opacity:.5}.news-widget__button svg{pointer-events:none;width:16px;height:16px;flex-shrink:0}.news-widget__button--ghost{background:transparent}.news-widget__button--ghost:hover{background-color:var(--iccandle-secondary)}.news-widget__button--icon{height:40px;width:40px;padding:0}.news-widget,.news-widget *:before,.news-widget *:after{margin:0;padding:0;border:0 solid}.news-widget,.news-widget *,.news-widget *:before,.news-widget *:after{box-sizing:border-box;letter-spacing:normal}.news-widget{line-height:1.5;tab-size:4;--iccandle-primary: #00dfb9;--iccandle-primary-gradient-end: #ffb84d;--iccandle-background: #ffffff;--iccandle-border: #d1d5dc;--iccandle-text: #000000;--iccandle-secondary: oklch( from var(--iccandle-background) clamp(.92, calc(l - .06) , .98) c h / .92 );--iccandle-green: #22c55e;--iccandle-gray: #667085;--iccandle-dark-gray: #667085;--iccandle-orange: #ffb84d;--iccandle-red: #ef4444;--iccandle-title: #000;--iccandle-news-card-title: #0a0a0a;--iccandle-news-details-title: #344054;--iccandle-muted: hsl(0 0% 96.1%);font-family:var( --iccandle-font, "Inter Tight", ui-sans-serif, system-ui, sans-serif );position:relative;height:100%}.dark{--iccandle-primary: #00dfb9;--iccandle-primary-gradient-end: #ffb84d;--iccandle-background: #1a1a1a;--iccandle-border: rgba(255, 255, 255, .2);--iccandle-text: #ffffff;--iccandle-secondary: oklch( from var(--iccandle-background) clamp(.22, calc(l + .22) , .34) c h / .92 );--iccandle-green: #22c55e;--iccandle-gray: #a3a3a3;--iccandle-dark-gray: #6a7282;--iccandle-orange: #ffb84d;--iccandle-red: #ef4444;--iccandle-title: #fff;--iccandle-news-card-title: #fafafa;--iccandle-news-details-title: #d1d5dc;--iccandle-muted: hsl(0 0% 14.9%)}.news-widget__container{height:100%;width:100%}.news-widget__red{color:var(--iccandle-red)}.news-widget__green{color:var(--iccandle-green)}.news-widget__gray{color:var(--iccandle-gray)}.news-widget__orange{color:var(--iccandle-orange)}.news-widget__bg_green{background:var(--iccandle-green)}.news-widget__bg_gray{background:var(--iccandle-gray)}.news-widget__bg_orange{background:var(--iccandle-orange)}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
|
|
2
|
-
import
|
|
3
|
-
var ke = { exports: {} },
|
|
2
|
+
import Te, { createContext as $t, useContext as Gt, useState as le, useRef as fe, useCallback as Me, useEffect as me, useMemo as Ne, forwardRef as Jt, createElement as ze } from "react";
|
|
3
|
+
var ke = { exports: {} }, Se = {};
|
|
4
4
|
var mt;
|
|
5
5
|
function En() {
|
|
6
|
-
if (mt) return
|
|
6
|
+
if (mt) return Se;
|
|
7
7
|
mt = 1;
|
|
8
8
|
var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
9
9
|
function n(s, r, i) {
|
|
@@ -21,29 +21,29 @@ function En() {
|
|
|
21
21
|
props: i
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
return
|
|
24
|
+
return Se.Fragment = t, Se.jsx = n, Se.jsxs = n, Se;
|
|
25
25
|
}
|
|
26
|
-
var
|
|
26
|
+
var De = {};
|
|
27
27
|
var _t;
|
|
28
28
|
function Sn() {
|
|
29
29
|
return _t || (_t = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
30
30
|
function e(u) {
|
|
31
31
|
if (u == null) return null;
|
|
32
32
|
if (typeof u == "function")
|
|
33
|
-
return u.$$typeof ===
|
|
33
|
+
return u.$$typeof === q ? null : u.displayName || u.name || null;
|
|
34
34
|
if (typeof u == "string") return u;
|
|
35
35
|
switch (u) {
|
|
36
36
|
case h:
|
|
37
37
|
return "Fragment";
|
|
38
|
-
case
|
|
38
|
+
case G:
|
|
39
39
|
return "Profiler";
|
|
40
|
-
case
|
|
40
|
+
case S:
|
|
41
41
|
return "StrictMode";
|
|
42
|
-
case
|
|
42
|
+
case k:
|
|
43
43
|
return "Suspense";
|
|
44
|
-
case
|
|
44
|
+
case Y:
|
|
45
45
|
return "SuspenseList";
|
|
46
|
-
case
|
|
46
|
+
case X:
|
|
47
47
|
return "Activity";
|
|
48
48
|
}
|
|
49
49
|
if (typeof u == "object")
|
|
@@ -52,19 +52,19 @@ function Sn() {
|
|
|
52
52
|
), u.$$typeof) {
|
|
53
53
|
case w:
|
|
54
54
|
return "Portal";
|
|
55
|
-
case
|
|
55
|
+
case L:
|
|
56
56
|
return u.displayName || "Context";
|
|
57
|
-
case
|
|
57
|
+
case v:
|
|
58
58
|
return (u._context.displayName || "Context") + ".Consumer";
|
|
59
|
-
case
|
|
60
|
-
var
|
|
61
|
-
return u = u.displayName, u || (u =
|
|
62
|
-
case
|
|
63
|
-
return
|
|
64
|
-
case
|
|
65
|
-
|
|
59
|
+
case J:
|
|
60
|
+
var y = u.render;
|
|
61
|
+
return u = u.displayName, u || (u = y.displayName || y.name || "", u = u !== "" ? "ForwardRef(" + u + ")" : "ForwardRef"), u;
|
|
62
|
+
case ne:
|
|
63
|
+
return y = u.displayName || null, y !== null ? y : e(u.type) || "Memo";
|
|
64
|
+
case W:
|
|
65
|
+
y = u._payload, u = u._init;
|
|
66
66
|
try {
|
|
67
|
-
return e(u(
|
|
67
|
+
return e(u(y));
|
|
68
68
|
} catch {
|
|
69
69
|
}
|
|
70
70
|
}
|
|
@@ -76,27 +76,27 @@ function Sn() {
|
|
|
76
76
|
function n(u) {
|
|
77
77
|
try {
|
|
78
78
|
t(u);
|
|
79
|
-
var
|
|
79
|
+
var y = !1;
|
|
80
80
|
} catch {
|
|
81
|
-
|
|
81
|
+
y = !0;
|
|
82
82
|
}
|
|
83
|
-
if (
|
|
84
|
-
|
|
85
|
-
var
|
|
86
|
-
return
|
|
87
|
-
|
|
83
|
+
if (y) {
|
|
84
|
+
y = console;
|
|
85
|
+
var A = y.error, R = typeof Symbol == "function" && Symbol.toStringTag && u[Symbol.toStringTag] || u.constructor.name || "Object";
|
|
86
|
+
return A.call(
|
|
87
|
+
y,
|
|
88
88
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
89
|
-
|
|
89
|
+
R
|
|
90
90
|
), t(u);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
function s(u) {
|
|
94
94
|
if (u === h) return "<>";
|
|
95
|
-
if (typeof u == "object" && u !== null && u.$$typeof ===
|
|
95
|
+
if (typeof u == "object" && u !== null && u.$$typeof === W)
|
|
96
96
|
return "<...>";
|
|
97
97
|
try {
|
|
98
|
-
var
|
|
99
|
-
return
|
|
98
|
+
var y = e(u);
|
|
99
|
+
return y ? "<" + y + ">" : "<...>";
|
|
100
100
|
} catch {
|
|
101
101
|
return "<...>";
|
|
102
102
|
}
|
|
@@ -109,21 +109,21 @@ function Sn() {
|
|
|
109
109
|
return Error("react-stack-top-frame");
|
|
110
110
|
}
|
|
111
111
|
function o(u) {
|
|
112
|
-
if (
|
|
113
|
-
var
|
|
114
|
-
if (
|
|
112
|
+
if (O.call(u, "key")) {
|
|
113
|
+
var y = Object.getOwnPropertyDescriptor(u, "key").get;
|
|
114
|
+
if (y && y.isReactWarning) return !1;
|
|
115
115
|
}
|
|
116
116
|
return u.key !== void 0;
|
|
117
117
|
}
|
|
118
|
-
function a(u,
|
|
119
|
-
function
|
|
118
|
+
function a(u, y) {
|
|
119
|
+
function A() {
|
|
120
120
|
x || (x = !0, console.error(
|
|
121
121
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
122
|
-
|
|
122
|
+
y
|
|
123
123
|
));
|
|
124
124
|
}
|
|
125
|
-
|
|
126
|
-
get:
|
|
125
|
+
A.isReactWarning = !0, Object.defineProperty(u, "key", {
|
|
126
|
+
get: A,
|
|
127
127
|
configurable: !0
|
|
128
128
|
});
|
|
129
129
|
}
|
|
@@ -133,15 +133,15 @@ function Sn() {
|
|
|
133
133
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
134
134
|
)), u = this.props.ref, u !== void 0 ? u : null;
|
|
135
135
|
}
|
|
136
|
-
function d(u,
|
|
137
|
-
var
|
|
136
|
+
function d(u, y, A, R, j, I) {
|
|
137
|
+
var U = A.ref;
|
|
138
138
|
return u = {
|
|
139
139
|
$$typeof: p,
|
|
140
140
|
type: u,
|
|
141
|
-
key:
|
|
142
|
-
props:
|
|
143
|
-
_owner:
|
|
144
|
-
}, (
|
|
141
|
+
key: y,
|
|
142
|
+
props: A,
|
|
143
|
+
_owner: R
|
|
144
|
+
}, (U !== void 0 ? U : null) !== null ? Object.defineProperty(u, "ref", {
|
|
145
145
|
enumerable: !1,
|
|
146
146
|
get: f
|
|
147
147
|
}) : Object.defineProperty(u, "ref", { enumerable: !1, value: null }), u._store = {}, Object.defineProperty(u._store, "validated", {
|
|
@@ -158,102 +158,102 @@ function Sn() {
|
|
|
158
158
|
configurable: !1,
|
|
159
159
|
enumerable: !1,
|
|
160
160
|
writable: !0,
|
|
161
|
-
value:
|
|
161
|
+
value: j
|
|
162
162
|
}), Object.defineProperty(u, "_debugTask", {
|
|
163
163
|
configurable: !1,
|
|
164
164
|
enumerable: !1,
|
|
165
165
|
writable: !0,
|
|
166
|
-
value:
|
|
166
|
+
value: I
|
|
167
167
|
}), Object.freeze && (Object.freeze(u.props), Object.freeze(u)), u;
|
|
168
168
|
}
|
|
169
|
-
function l(u,
|
|
170
|
-
var
|
|
171
|
-
if (
|
|
172
|
-
if (
|
|
173
|
-
if (
|
|
174
|
-
for (
|
|
175
|
-
_(
|
|
176
|
-
Object.freeze && Object.freeze(
|
|
169
|
+
function l(u, y, A, R, j, I) {
|
|
170
|
+
var U = y.children;
|
|
171
|
+
if (U !== void 0)
|
|
172
|
+
if (R)
|
|
173
|
+
if (D(U)) {
|
|
174
|
+
for (R = 0; R < U.length; R++)
|
|
175
|
+
_(U[R]);
|
|
176
|
+
Object.freeze && Object.freeze(U);
|
|
177
177
|
} else
|
|
178
178
|
console.error(
|
|
179
179
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
180
180
|
);
|
|
181
|
-
else _(
|
|
182
|
-
if (
|
|
183
|
-
|
|
184
|
-
var
|
|
185
|
-
return
|
|
181
|
+
else _(U);
|
|
182
|
+
if (O.call(y, "key")) {
|
|
183
|
+
U = e(u);
|
|
184
|
+
var B = Object.keys(y).filter(function(V) {
|
|
185
|
+
return V !== "key";
|
|
186
186
|
});
|
|
187
|
-
|
|
187
|
+
R = 0 < B.length ? "{key: someKey, " + B.join(": ..., ") + ": ...}" : "{key: someKey}", T[U + R] || (B = 0 < B.length ? "{" + B.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
188
188
|
`A props object containing a "key" prop is being spread into JSX:
|
|
189
189
|
let props = %s;
|
|
190
190
|
<%s {...props} />
|
|
191
191
|
React keys must be passed directly to JSX without using spread:
|
|
192
192
|
let props = %s;
|
|
193
193
|
<%s key={someKey} {...props} />`,
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
),
|
|
194
|
+
R,
|
|
195
|
+
U,
|
|
196
|
+
B,
|
|
197
|
+
U
|
|
198
|
+
), T[U + R] = !0);
|
|
199
199
|
}
|
|
200
|
-
if (
|
|
201
|
-
|
|
202
|
-
for (var
|
|
203
|
-
|
|
204
|
-
} else
|
|
205
|
-
return
|
|
206
|
-
|
|
200
|
+
if (U = null, A !== void 0 && (n(A), U = "" + A), o(y) && (n(y.key), U = "" + y.key), "key" in y) {
|
|
201
|
+
A = {};
|
|
202
|
+
for (var N in y)
|
|
203
|
+
N !== "key" && (A[N] = y[N]);
|
|
204
|
+
} else A = y;
|
|
205
|
+
return U && a(
|
|
206
|
+
A,
|
|
207
207
|
typeof u == "function" ? u.displayName || u.name || "Unknown" : u
|
|
208
208
|
), d(
|
|
209
209
|
u,
|
|
210
|
-
S,
|
|
211
210
|
U,
|
|
211
|
+
A,
|
|
212
212
|
r(),
|
|
213
|
-
|
|
214
|
-
|
|
213
|
+
j,
|
|
214
|
+
I
|
|
215
215
|
);
|
|
216
216
|
}
|
|
217
217
|
function _(u) {
|
|
218
|
-
|
|
218
|
+
C(u) ? u._store && (u._store.validated = 1) : typeof u == "object" && u !== null && u.$$typeof === W && (u._payload.status === "fulfilled" ? C(u._payload.value) && u._payload.value._store && (u._payload.value._store.validated = 1) : u._store && (u._store.validated = 1));
|
|
219
219
|
}
|
|
220
|
-
function
|
|
220
|
+
function C(u) {
|
|
221
221
|
return typeof u == "object" && u !== null && u.$$typeof === p;
|
|
222
222
|
}
|
|
223
|
-
var
|
|
223
|
+
var E = Te, p = /* @__PURE__ */ Symbol.for("react.transitional.element"), w = /* @__PURE__ */ Symbol.for("react.portal"), h = /* @__PURE__ */ Symbol.for("react.fragment"), S = /* @__PURE__ */ Symbol.for("react.strict_mode"), G = /* @__PURE__ */ Symbol.for("react.profiler"), v = /* @__PURE__ */ Symbol.for("react.consumer"), L = /* @__PURE__ */ Symbol.for("react.context"), J = /* @__PURE__ */ Symbol.for("react.forward_ref"), k = /* @__PURE__ */ Symbol.for("react.suspense"), Y = /* @__PURE__ */ Symbol.for("react.suspense_list"), ne = /* @__PURE__ */ Symbol.for("react.memo"), W = /* @__PURE__ */ Symbol.for("react.lazy"), X = /* @__PURE__ */ Symbol.for("react.activity"), q = /* @__PURE__ */ Symbol.for("react.client.reference"), Z = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, O = Object.prototype.hasOwnProperty, D = Array.isArray, F = console.createTask ? console.createTask : function() {
|
|
224
224
|
return null;
|
|
225
225
|
};
|
|
226
|
-
|
|
226
|
+
E = {
|
|
227
227
|
react_stack_bottom_frame: function(u) {
|
|
228
228
|
return u();
|
|
229
229
|
}
|
|
230
230
|
};
|
|
231
|
-
var x, se = {},
|
|
232
|
-
|
|
231
|
+
var x, se = {}, g = E.react_stack_bottom_frame.bind(
|
|
232
|
+
E,
|
|
233
233
|
i
|
|
234
|
-
)(),
|
|
235
|
-
|
|
236
|
-
var
|
|
234
|
+
)(), H = F(s(i)), T = {};
|
|
235
|
+
De.Fragment = h, De.jsx = function(u, y, A) {
|
|
236
|
+
var R = 1e4 > Z.recentlyCreatedOwnerStacks++;
|
|
237
237
|
return l(
|
|
238
238
|
u,
|
|
239
|
-
|
|
240
|
-
|
|
239
|
+
y,
|
|
240
|
+
A,
|
|
241
241
|
!1,
|
|
242
|
-
|
|
243
|
-
|
|
242
|
+
R ? Error("react-stack-top-frame") : g,
|
|
243
|
+
R ? F(s(u)) : H
|
|
244
244
|
);
|
|
245
|
-
},
|
|
246
|
-
var
|
|
245
|
+
}, De.jsxs = function(u, y, A) {
|
|
246
|
+
var R = 1e4 > Z.recentlyCreatedOwnerStacks++;
|
|
247
247
|
return l(
|
|
248
248
|
u,
|
|
249
|
-
|
|
250
|
-
|
|
249
|
+
y,
|
|
250
|
+
A,
|
|
251
251
|
!0,
|
|
252
|
-
|
|
253
|
-
|
|
252
|
+
R ? Error("react-stack-top-frame") : g,
|
|
253
|
+
R ? F(s(u)) : H
|
|
254
254
|
);
|
|
255
255
|
};
|
|
256
|
-
})()),
|
|
256
|
+
})()), De;
|
|
257
257
|
}
|
|
258
258
|
var ht;
|
|
259
259
|
function Dn() {
|
|
@@ -272,7 +272,7 @@ function Tn({
|
|
|
272
272
|
children: e,
|
|
273
273
|
theme: t
|
|
274
274
|
}) {
|
|
275
|
-
const [n, s] =
|
|
275
|
+
const [n, s] = le(!1), [r, i] = le(!1), [o, a] = le(0), f = fe(null), d = fe(null), l = Me(() => {
|
|
276
276
|
f.current && window.clearTimeout(f.current), f.current = null, d.current && window.clearTimeout(d.current), d.current = null, d.current = window.setTimeout(() => {
|
|
277
277
|
d.current = null, s(!1), i(!1);
|
|
278
278
|
}, Un);
|
|
@@ -283,12 +283,12 @@ function Tn({
|
|
|
283
283
|
f.current = null, l();
|
|
284
284
|
}, wt);
|
|
285
285
|
}, [l]);
|
|
286
|
-
|
|
287
|
-
const
|
|
286
|
+
me(() => l, [l]);
|
|
287
|
+
const C = Ne(
|
|
288
288
|
() => ({ start: _, stop: l, visible: n }),
|
|
289
289
|
[_, l, n]
|
|
290
|
-
),
|
|
291
|
-
return /* @__PURE__ */ m.jsxs(Xt.Provider, { value:
|
|
290
|
+
), E = t === "light" ? "https://icc-web-assets.s3.ap-southeast-1.amazonaws.com/loader/build-up-white.webm" : "https://icc-web-assets.s3.ap-southeast-1.amazonaws.com/loader/build-up-black.webm";
|
|
291
|
+
return /* @__PURE__ */ m.jsxs(Xt.Provider, { value: C, children: [
|
|
292
292
|
e,
|
|
293
293
|
n && /* @__PURE__ */ m.jsx("div", { className: "cta-loader__overlay", children: /* @__PURE__ */ m.jsxs("div", { className: "cta-loader__content", children: [
|
|
294
294
|
/* @__PURE__ */ m.jsx(
|
|
@@ -300,7 +300,7 @@ function Tn({
|
|
|
300
300
|
playsInline: !0,
|
|
301
301
|
preload: "auto",
|
|
302
302
|
className: "cta-loader__video",
|
|
303
|
-
children: /* @__PURE__ */ m.jsx("source", { src:
|
|
303
|
+
children: /* @__PURE__ */ m.jsx("source", { src: E, type: "video/webm" })
|
|
304
304
|
}
|
|
305
305
|
),
|
|
306
306
|
/* @__PURE__ */ m.jsx("div", { className: "cta-loader__bar-wrapper", children: /* @__PURE__ */ m.jsx("div", { className: "cta-loader__bar-track", children: /* @__PURE__ */ m.jsx(
|
|
@@ -325,47 +325,47 @@ function qt(e, t) {
|
|
|
325
325
|
const { toString: Nn } = Object.prototype, { getPrototypeOf: it } = Object, { iterator: Ie, toStringTag: Vt } = Symbol, $e = /* @__PURE__ */ ((e) => (t) => {
|
|
326
326
|
const n = Nn.call(t);
|
|
327
327
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
328
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
329
|
-
function
|
|
330
|
-
return e !== null && !
|
|
328
|
+
})(/* @__PURE__ */ Object.create(null)), _e = (e) => (e = e.toLowerCase(), (t) => $e(t) === e), Ge = (e) => (t) => typeof t === e, { isArray: Ee } = Array, Re = Ge("undefined");
|
|
329
|
+
function ve(e) {
|
|
330
|
+
return e !== null && !Re(e) && e.constructor !== null && !Re(e.constructor) && ie(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
331
331
|
}
|
|
332
|
-
const Kt =
|
|
332
|
+
const Kt = _e("ArrayBuffer");
|
|
333
333
|
function vn(e) {
|
|
334
334
|
let t;
|
|
335
335
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Kt(e.buffer), t;
|
|
336
336
|
}
|
|
337
|
-
const xn = Ge("string"),
|
|
337
|
+
const xn = Ge("string"), ie = Ge("function"), zt = Ge("number"), xe = (e) => e !== null && typeof e == "object", Ln = (e) => e === !0 || e === !1, je = (e) => {
|
|
338
338
|
if ($e(e) !== "object")
|
|
339
339
|
return !1;
|
|
340
340
|
const t = it(e);
|
|
341
341
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Vt in e) && !(Ie in e);
|
|
342
342
|
}, Pn = (e) => {
|
|
343
|
-
if (!
|
|
343
|
+
if (!xe(e) || ve(e))
|
|
344
344
|
return !1;
|
|
345
345
|
try {
|
|
346
346
|
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
347
347
|
} catch {
|
|
348
348
|
return !1;
|
|
349
349
|
}
|
|
350
|
-
}, On =
|
|
350
|
+
}, On = _e("Date"), kn = _e("File"), Fn = _e("Blob"), jn = _e("FileList"), Bn = (e) => xe(e) && ie(e.pipe), Yn = (e) => {
|
|
351
351
|
let t;
|
|
352
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
353
|
-
t === "object" &&
|
|
354
|
-
}, Mn =
|
|
352
|
+
return e && (typeof FormData == "function" && e instanceof FormData || ie(e.append) && ((t = $e(e)) === "formdata" || // detect form-data instance
|
|
353
|
+
t === "object" && ie(e.toString) && e.toString() === "[object FormData]"));
|
|
354
|
+
}, Mn = _e("URLSearchParams"), [Hn, In, $n, Gn] = [
|
|
355
355
|
"ReadableStream",
|
|
356
356
|
"Request",
|
|
357
357
|
"Response",
|
|
358
358
|
"Headers"
|
|
359
|
-
].map(
|
|
360
|
-
function
|
|
359
|
+
].map(_e), Jn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
360
|
+
function Le(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
361
361
|
if (e === null || typeof e > "u")
|
|
362
362
|
return;
|
|
363
363
|
let s, r;
|
|
364
|
-
if (typeof e != "object" && (e = [e]),
|
|
364
|
+
if (typeof e != "object" && (e = [e]), Ee(e))
|
|
365
365
|
for (s = 0, r = e.length; s < r; s++)
|
|
366
366
|
t.call(null, e[s], s, e);
|
|
367
367
|
else {
|
|
368
|
-
if (
|
|
368
|
+
if (ve(e))
|
|
369
369
|
return;
|
|
370
370
|
const i = n ? Object.getOwnPropertyNames(e) : Object.keys(e), o = i.length;
|
|
371
371
|
let a;
|
|
@@ -374,7 +374,7 @@ function xe(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
376
|
function Zt(e, t) {
|
|
377
|
-
if (
|
|
377
|
+
if (ve(e))
|
|
378
378
|
return null;
|
|
379
379
|
t = t.toLowerCase();
|
|
380
380
|
const n = Object.keys(e);
|
|
@@ -384,22 +384,22 @@ function Zt(e, t) {
|
|
|
384
384
|
return r;
|
|
385
385
|
return null;
|
|
386
386
|
}
|
|
387
|
-
const
|
|
387
|
+
const we = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Wt = (e) => !Re(e) && e !== we;
|
|
388
388
|
function Ze() {
|
|
389
389
|
const { caseless: e, skipUndefined: t } = Wt(this) && this || {}, n = {}, s = (r, i) => {
|
|
390
390
|
if (i === "__proto__" || i === "constructor" || i === "prototype")
|
|
391
391
|
return;
|
|
392
392
|
const o = e && Zt(n, i) || i;
|
|
393
|
-
je(n[o]) && je(r) ? n[o] = Ze(n[o], r) : je(r) ? n[o] = Ze({}, r) :
|
|
393
|
+
je(n[o]) && je(r) ? n[o] = Ze(n[o], r) : je(r) ? n[o] = Ze({}, r) : Ee(r) ? n[o] = r.slice() : (!t || !Re(r)) && (n[o] = r);
|
|
394
394
|
};
|
|
395
395
|
for (let r = 0, i = arguments.length; r < i; r++)
|
|
396
|
-
arguments[r] &&
|
|
396
|
+
arguments[r] && Le(arguments[r], s);
|
|
397
397
|
return n;
|
|
398
398
|
}
|
|
399
|
-
const Xn = (e, t, n, { allOwnKeys: s } = {}) => (
|
|
399
|
+
const Xn = (e, t, n, { allOwnKeys: s } = {}) => (Le(
|
|
400
400
|
t,
|
|
401
401
|
(r, i) => {
|
|
402
|
-
n &&
|
|
402
|
+
n && ie(r) ? Object.defineProperty(e, i, {
|
|
403
403
|
value: qt(r, n),
|
|
404
404
|
writable: !0,
|
|
405
405
|
enumerable: !0,
|
|
@@ -440,7 +440,7 @@ const Xn = (e, t, n, { allOwnKeys: s } = {}) => (xe(
|
|
|
440
440
|
return s !== -1 && s === n;
|
|
441
441
|
}, Zn = (e) => {
|
|
442
442
|
if (!e) return null;
|
|
443
|
-
if (
|
|
443
|
+
if (Ee(e)) return e;
|
|
444
444
|
let t = e.length;
|
|
445
445
|
if (!zt(t)) return null;
|
|
446
446
|
const n = new Array(t);
|
|
@@ -460,20 +460,20 @@ const Xn = (e, t, n, { allOwnKeys: s } = {}) => (xe(
|
|
|
460
460
|
for (; (n = e.exec(t)) !== null; )
|
|
461
461
|
s.push(n);
|
|
462
462
|
return s;
|
|
463
|
-
}, ts =
|
|
463
|
+
}, ts = _e("HTMLFormElement"), ns = (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(n, s, r) {
|
|
464
464
|
return s.toUpperCase() + r;
|
|
465
|
-
}), yt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), ss =
|
|
465
|
+
}), yt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), ss = _e("RegExp"), Qt = (e, t) => {
|
|
466
466
|
const n = Object.getOwnPropertyDescriptors(e), s = {};
|
|
467
|
-
|
|
467
|
+
Le(n, (r, i) => {
|
|
468
468
|
let o;
|
|
469
469
|
(o = t(r, i, e)) !== !1 && (s[i] = o || r);
|
|
470
470
|
}), Object.defineProperties(e, s);
|
|
471
471
|
}, rs = (e) => {
|
|
472
472
|
Qt(e, (t, n) => {
|
|
473
|
-
if (
|
|
473
|
+
if (ie(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
474
474
|
return !1;
|
|
475
475
|
const s = e[n];
|
|
476
|
-
if (
|
|
476
|
+
if (ie(s)) {
|
|
477
477
|
if (t.enumerable = !1, "writable" in t) {
|
|
478
478
|
t.writable = !1;
|
|
479
479
|
return;
|
|
@@ -489,66 +489,66 @@ const Xn = (e, t, n, { allOwnKeys: s } = {}) => (xe(
|
|
|
489
489
|
n[i] = !0;
|
|
490
490
|
});
|
|
491
491
|
};
|
|
492
|
-
return
|
|
492
|
+
return Ee(e) ? s(e) : s(String(e).split(t)), n;
|
|
493
493
|
}, os = () => {
|
|
494
494
|
}, as = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
495
495
|
function cs(e) {
|
|
496
|
-
return !!(e &&
|
|
496
|
+
return !!(e && ie(e.append) && e[Vt] === "FormData" && e[Ie]);
|
|
497
497
|
}
|
|
498
498
|
const ls = (e) => {
|
|
499
499
|
const t = new Array(10), n = (s, r) => {
|
|
500
|
-
if (
|
|
500
|
+
if (xe(s)) {
|
|
501
501
|
if (t.indexOf(s) >= 0)
|
|
502
502
|
return;
|
|
503
|
-
if (
|
|
503
|
+
if (ve(s))
|
|
504
504
|
return s;
|
|
505
505
|
if (!("toJSON" in s)) {
|
|
506
506
|
t[r] = s;
|
|
507
|
-
const i =
|
|
508
|
-
return
|
|
507
|
+
const i = Ee(s) ? [] : {};
|
|
508
|
+
return Le(s, (o, a) => {
|
|
509
509
|
const f = n(o, r + 1);
|
|
510
|
-
!
|
|
510
|
+
!Re(f) && (i[a] = f);
|
|
511
511
|
}), t[r] = void 0, i;
|
|
512
512
|
}
|
|
513
513
|
}
|
|
514
514
|
return s;
|
|
515
515
|
};
|
|
516
516
|
return n(e, 0);
|
|
517
|
-
}, ds =
|
|
517
|
+
}, ds = _e("AsyncFunction"), us = (e) => e && (xe(e) || ie(e)) && ie(e.then) && ie(e.catch), en = ((e, t) => e ? setImmediate : t ? ((n, s) => (we.addEventListener(
|
|
518
518
|
"message",
|
|
519
519
|
({ source: r, data: i }) => {
|
|
520
|
-
r ===
|
|
520
|
+
r === we && i === n && s.length && s.shift()();
|
|
521
521
|
},
|
|
522
522
|
!1
|
|
523
523
|
), (r) => {
|
|
524
|
-
s.push(r),
|
|
525
|
-
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(typeof setImmediate == "function",
|
|
526
|
-
isArray:
|
|
524
|
+
s.push(r), we.postMessage(n, "*");
|
|
525
|
+
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(typeof setImmediate == "function", ie(we.postMessage)), ps = typeof queueMicrotask < "u" ? queueMicrotask.bind(we) : typeof process < "u" && process.nextTick || en, fs = (e) => e != null && ie(e[Ie]), c = {
|
|
526
|
+
isArray: Ee,
|
|
527
527
|
isArrayBuffer: Kt,
|
|
528
|
-
isBuffer:
|
|
528
|
+
isBuffer: ve,
|
|
529
529
|
isFormData: Yn,
|
|
530
530
|
isArrayBufferView: vn,
|
|
531
531
|
isString: xn,
|
|
532
532
|
isNumber: zt,
|
|
533
533
|
isBoolean: Ln,
|
|
534
|
-
isObject:
|
|
534
|
+
isObject: xe,
|
|
535
535
|
isPlainObject: je,
|
|
536
536
|
isEmptyObject: Pn,
|
|
537
537
|
isReadableStream: Hn,
|
|
538
538
|
isRequest: In,
|
|
539
539
|
isResponse: $n,
|
|
540
540
|
isHeaders: Gn,
|
|
541
|
-
isUndefined:
|
|
541
|
+
isUndefined: Re,
|
|
542
542
|
isDate: On,
|
|
543
543
|
isFile: kn,
|
|
544
544
|
isBlob: Fn,
|
|
545
545
|
isRegExp: ss,
|
|
546
|
-
isFunction:
|
|
546
|
+
isFunction: ie,
|
|
547
547
|
isStream: Bn,
|
|
548
548
|
isURLSearchParams: Mn,
|
|
549
549
|
isTypedArray: Wn,
|
|
550
550
|
isFileList: jn,
|
|
551
|
-
forEach:
|
|
551
|
+
forEach: Le,
|
|
552
552
|
merge: Ze,
|
|
553
553
|
extend: Xn,
|
|
554
554
|
trim: Jn,
|
|
@@ -556,7 +556,7 @@ const ls = (e) => {
|
|
|
556
556
|
inherits: Vn,
|
|
557
557
|
toFlatObject: Kn,
|
|
558
558
|
kindOf: $e,
|
|
559
|
-
kindOfTest:
|
|
559
|
+
kindOfTest: _e,
|
|
560
560
|
endsWith: zn,
|
|
561
561
|
toArray: Zn,
|
|
562
562
|
forEachEntry: Qn,
|
|
@@ -572,7 +572,7 @@ const ls = (e) => {
|
|
|
572
572
|
noop: os,
|
|
573
573
|
toFiniteNumber: as,
|
|
574
574
|
findKey: Zt,
|
|
575
|
-
global:
|
|
575
|
+
global: we,
|
|
576
576
|
isContextDefined: Wt,
|
|
577
577
|
isSpecCompliantForm: cs,
|
|
578
578
|
toJSONObject: ls,
|
|
@@ -582,7 +582,7 @@ const ls = (e) => {
|
|
|
582
582
|
asap: ps,
|
|
583
583
|
isIterable: fs
|
|
584
584
|
};
|
|
585
|
-
let
|
|
585
|
+
let b = class tn extends Error {
|
|
586
586
|
static from(t, n, s, r, i, o) {
|
|
587
587
|
const a = new tn(t.message, n || t.code, s, r, i);
|
|
588
588
|
return a.cause = t, a.name = t.name, o && Object.assign(a, o), a;
|
|
@@ -621,18 +621,18 @@ let R = class tn extends Error {
|
|
|
621
621
|
};
|
|
622
622
|
}
|
|
623
623
|
};
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
624
|
+
b.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
625
|
+
b.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
626
|
+
b.ECONNABORTED = "ECONNABORTED";
|
|
627
|
+
b.ETIMEDOUT = "ETIMEDOUT";
|
|
628
|
+
b.ERR_NETWORK = "ERR_NETWORK";
|
|
629
|
+
b.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
630
|
+
b.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
631
|
+
b.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
632
|
+
b.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
633
|
+
b.ERR_CANCELED = "ERR_CANCELED";
|
|
634
|
+
b.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
635
|
+
b.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
636
636
|
const ms = null;
|
|
637
637
|
function We(e) {
|
|
638
638
|
return c.isPlainObject(e) || c.isArray(e);
|
|
@@ -671,48 +671,48 @@ function Je(e, t, n) {
|
|
|
671
671
|
if (c.isBoolean(p))
|
|
672
672
|
return p.toString();
|
|
673
673
|
if (!f && c.isBlob(p))
|
|
674
|
-
throw new
|
|
674
|
+
throw new b("Blob is not supported. Use a Buffer instead.");
|
|
675
675
|
return c.isArrayBuffer(p) || c.isTypedArray(p) ? f && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
|
|
676
676
|
}
|
|
677
677
|
function l(p, w, h) {
|
|
678
|
-
let
|
|
678
|
+
let S = p;
|
|
679
679
|
if (p && !h && typeof p == "object") {
|
|
680
680
|
if (c.endsWith(w, "{}"))
|
|
681
681
|
w = s ? w : w.slice(0, -2), p = JSON.stringify(p);
|
|
682
|
-
else if (c.isArray(p) && _s(p) || (c.isFileList(p) || c.endsWith(w, "[]")) && (
|
|
683
|
-
return w = nn(w),
|
|
684
|
-
!(c.isUndefined(
|
|
682
|
+
else if (c.isArray(p) && _s(p) || (c.isFileList(p) || c.endsWith(w, "[]")) && (S = c.toArray(p)))
|
|
683
|
+
return w = nn(w), S.forEach(function(v, L) {
|
|
684
|
+
!(c.isUndefined(v) || v === null) && t.append(
|
|
685
685
|
// eslint-disable-next-line no-nested-ternary
|
|
686
|
-
o === !0 ? gt([w],
|
|
687
|
-
d(
|
|
686
|
+
o === !0 ? gt([w], L, i) : o === null ? w : w + "[]",
|
|
687
|
+
d(v)
|
|
688
688
|
);
|
|
689
689
|
}), !1;
|
|
690
690
|
}
|
|
691
691
|
return We(p) ? !0 : (t.append(gt(h, w, i), d(p)), !1);
|
|
692
692
|
}
|
|
693
|
-
const _ = [],
|
|
693
|
+
const _ = [], C = Object.assign(hs, {
|
|
694
694
|
defaultVisitor: l,
|
|
695
695
|
convertValue: d,
|
|
696
696
|
isVisitable: We
|
|
697
697
|
});
|
|
698
|
-
function
|
|
698
|
+
function E(p, w) {
|
|
699
699
|
if (!c.isUndefined(p)) {
|
|
700
700
|
if (_.indexOf(p) !== -1)
|
|
701
701
|
throw Error("Circular reference detected in " + w.join("."));
|
|
702
|
-
_.push(p), c.forEach(p, function(
|
|
703
|
-
(!(c.isUndefined(
|
|
702
|
+
_.push(p), c.forEach(p, function(S, G) {
|
|
703
|
+
(!(c.isUndefined(S) || S === null) && r.call(
|
|
704
704
|
t,
|
|
705
|
-
|
|
706
|
-
c.isString(
|
|
705
|
+
S,
|
|
706
|
+
c.isString(G) ? G.trim() : G,
|
|
707
707
|
w,
|
|
708
|
-
|
|
709
|
-
)) === !0 &&
|
|
708
|
+
C
|
|
709
|
+
)) === !0 && E(S, w ? w.concat(G) : [G]);
|
|
710
710
|
}), _.pop();
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
713
|
if (!c.isObject(e))
|
|
714
714
|
throw new TypeError("data must be an object");
|
|
715
|
-
return
|
|
715
|
+
return E(e), t;
|
|
716
716
|
}
|
|
717
717
|
function Ct(e) {
|
|
718
718
|
const t = {
|
|
@@ -835,14 +835,14 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Ss
|
|
|
835
835
|
hasStandardBrowserWebWorkerEnv: Es,
|
|
836
836
|
navigator: Qe,
|
|
837
837
|
origin: Ss
|
|
838
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
838
|
+
}, Symbol.toStringTag, { value: "Module" })), te = {
|
|
839
839
|
...Ds,
|
|
840
840
|
...bs
|
|
841
841
|
};
|
|
842
842
|
function As(e, t) {
|
|
843
|
-
return Je(e, new
|
|
843
|
+
return Je(e, new te.classes.URLSearchParams(), {
|
|
844
844
|
visitor: function(n, s, r, i) {
|
|
845
|
-
return
|
|
845
|
+
return te.isNode && c.isBuffer(n) ? (this.append(s, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
846
846
|
},
|
|
847
847
|
...t
|
|
848
848
|
});
|
|
@@ -884,7 +884,7 @@ function Ns(e, t, n) {
|
|
|
884
884
|
}
|
|
885
885
|
return (n || JSON.stringify)(e);
|
|
886
886
|
}
|
|
887
|
-
const
|
|
887
|
+
const Pe = {
|
|
888
888
|
transitional: at,
|
|
889
889
|
adapter: ["xhr", "http", "fetch"],
|
|
890
890
|
transformRequest: [function(t, n) {
|
|
@@ -913,7 +913,7 @@ const Le = {
|
|
|
913
913
|
return i || r ? (n.setContentType("application/json", !1), Ns(t)) : t;
|
|
914
914
|
}],
|
|
915
915
|
transformResponse: [function(t) {
|
|
916
|
-
const n = this.transitional ||
|
|
916
|
+
const n = this.transitional || Pe.transitional, s = n && n.forcedJSONParsing, r = this.responseType === "json";
|
|
917
917
|
if (c.isResponse(t) || c.isReadableStream(t))
|
|
918
918
|
return t;
|
|
919
919
|
if (t && c.isString(t) && (s && !this.responseType || r)) {
|
|
@@ -922,7 +922,7 @@ const Le = {
|
|
|
922
922
|
return JSON.parse(t, this.parseReviver);
|
|
923
923
|
} catch (a) {
|
|
924
924
|
if (o)
|
|
925
|
-
throw a.name === "SyntaxError" ?
|
|
925
|
+
throw a.name === "SyntaxError" ? b.from(a, b.ERR_BAD_RESPONSE, this, null, this.response) : a;
|
|
926
926
|
}
|
|
927
927
|
}
|
|
928
928
|
return t;
|
|
@@ -937,8 +937,8 @@ const Le = {
|
|
|
937
937
|
maxContentLength: -1,
|
|
938
938
|
maxBodyLength: -1,
|
|
939
939
|
env: {
|
|
940
|
-
FormData:
|
|
941
|
-
Blob:
|
|
940
|
+
FormData: te.classes.FormData,
|
|
941
|
+
Blob: te.classes.Blob
|
|
942
942
|
},
|
|
943
943
|
validateStatus: function(t) {
|
|
944
944
|
return t >= 200 && t < 300;
|
|
@@ -951,7 +951,7 @@ const Le = {
|
|
|
951
951
|
}
|
|
952
952
|
};
|
|
953
953
|
c.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
954
|
-
|
|
954
|
+
Pe.headers[e] = {};
|
|
955
955
|
});
|
|
956
956
|
const vs = c.toObjectSet([
|
|
957
957
|
"age",
|
|
@@ -979,7 +979,7 @@ const vs = c.toObjectSet([
|
|
|
979
979
|
r = o.indexOf(":"), n = o.substring(0, r).trim().toLowerCase(), s = o.substring(r + 1).trim(), !(!n || t[n] && vs[n]) && (n === "set-cookie" ? t[n] ? t[n].push(s) : t[n] = [s] : t[n] = t[n] ? t[n] + ", " + s : s);
|
|
980
980
|
}), t;
|
|
981
981
|
}, Rt = /* @__PURE__ */ Symbol("internals");
|
|
982
|
-
function
|
|
982
|
+
function Ae(e) {
|
|
983
983
|
return e && String(e).trim().toLowerCase();
|
|
984
984
|
}
|
|
985
985
|
function Be(e) {
|
|
@@ -1017,14 +1017,14 @@ function ks(e, t) {
|
|
|
1017
1017
|
});
|
|
1018
1018
|
});
|
|
1019
1019
|
}
|
|
1020
|
-
let
|
|
1020
|
+
let oe = class {
|
|
1021
1021
|
constructor(t) {
|
|
1022
1022
|
t && this.set(t);
|
|
1023
1023
|
}
|
|
1024
1024
|
set(t, n, s) {
|
|
1025
1025
|
const r = this;
|
|
1026
1026
|
function i(a, f, d) {
|
|
1027
|
-
const l =
|
|
1027
|
+
const l = Ae(f);
|
|
1028
1028
|
if (!l)
|
|
1029
1029
|
throw new Error("header name must be a non-empty string");
|
|
1030
1030
|
const _ = c.findKey(r, l);
|
|
@@ -1048,7 +1048,7 @@ let ie = class {
|
|
|
1048
1048
|
return this;
|
|
1049
1049
|
}
|
|
1050
1050
|
get(t, n) {
|
|
1051
|
-
if (t =
|
|
1051
|
+
if (t = Ae(t), t) {
|
|
1052
1052
|
const s = c.findKey(this, t);
|
|
1053
1053
|
if (s) {
|
|
1054
1054
|
const r = this[s];
|
|
@@ -1065,7 +1065,7 @@ let ie = class {
|
|
|
1065
1065
|
}
|
|
1066
1066
|
}
|
|
1067
1067
|
has(t, n) {
|
|
1068
|
-
if (t =
|
|
1068
|
+
if (t = Ae(t), t) {
|
|
1069
1069
|
const s = c.findKey(this, t);
|
|
1070
1070
|
return !!(s && this[s] !== void 0 && (!n || qe(this, this[s], s, n)));
|
|
1071
1071
|
}
|
|
@@ -1075,7 +1075,7 @@ let ie = class {
|
|
|
1075
1075
|
const s = this;
|
|
1076
1076
|
let r = !1;
|
|
1077
1077
|
function i(o) {
|
|
1078
|
-
if (o =
|
|
1078
|
+
if (o = Ae(o), o) {
|
|
1079
1079
|
const a = c.findKey(s, o);
|
|
1080
1080
|
a && (!n || qe(s, s[a], a, n)) && (delete s[a], r = !0);
|
|
1081
1081
|
}
|
|
@@ -1137,14 +1137,14 @@ let ie = class {
|
|
|
1137
1137
|
accessors: {}
|
|
1138
1138
|
}).accessors, r = this.prototype;
|
|
1139
1139
|
function i(o) {
|
|
1140
|
-
const a =
|
|
1140
|
+
const a = Ae(o);
|
|
1141
1141
|
s[a] || (ks(r, o), s[a] = !0);
|
|
1142
1142
|
}
|
|
1143
1143
|
return c.isArray(t) ? t.forEach(i) : i(t), this;
|
|
1144
1144
|
}
|
|
1145
1145
|
};
|
|
1146
|
-
|
|
1147
|
-
c.reduceDescriptors(
|
|
1146
|
+
oe.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
1147
|
+
c.reduceDescriptors(oe.prototype, ({ value: e }, t) => {
|
|
1148
1148
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
1149
1149
|
return {
|
|
1150
1150
|
get: () => e,
|
|
@@ -1153,9 +1153,9 @@ c.reduceDescriptors(ie.prototype, ({ value: e }, t) => {
|
|
|
1153
1153
|
}
|
|
1154
1154
|
};
|
|
1155
1155
|
});
|
|
1156
|
-
c.freezeMethods(
|
|
1156
|
+
c.freezeMethods(oe);
|
|
1157
1157
|
function Ve(e, t) {
|
|
1158
|
-
const n = this ||
|
|
1158
|
+
const n = this || Pe, s = t || n, r = oe.from(s.headers);
|
|
1159
1159
|
let i = s.data;
|
|
1160
1160
|
return c.forEach(e, function(a) {
|
|
1161
1161
|
i = a.call(n, i, r.normalize(), t ? t.status : void 0);
|
|
@@ -1164,7 +1164,7 @@ function Ve(e, t) {
|
|
|
1164
1164
|
function an(e) {
|
|
1165
1165
|
return !!(e && e.__CANCEL__);
|
|
1166
1166
|
}
|
|
1167
|
-
let
|
|
1167
|
+
let Oe = class extends b {
|
|
1168
1168
|
/**
|
|
1169
1169
|
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
1170
1170
|
*
|
|
@@ -1175,14 +1175,14 @@ let Pe = class extends R {
|
|
|
1175
1175
|
* @returns {CanceledError} The created error.
|
|
1176
1176
|
*/
|
|
1177
1177
|
constructor(t, n, s) {
|
|
1178
|
-
super(t ?? "canceled",
|
|
1178
|
+
super(t ?? "canceled", b.ERR_CANCELED, n, s), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
1179
1179
|
}
|
|
1180
1180
|
};
|
|
1181
1181
|
function cn(e, t, n) {
|
|
1182
1182
|
const s = n.config.validateStatus;
|
|
1183
|
-
!n.status || !s || s(n.status) ? e(n) : t(new
|
|
1183
|
+
!n.status || !s || s(n.status) ? e(n) : t(new b(
|
|
1184
1184
|
"Request failed with status code " + n.status,
|
|
1185
|
-
[
|
|
1185
|
+
[b.ERR_BAD_REQUEST, b.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
1186
1186
|
n.config,
|
|
1187
1187
|
n.request,
|
|
1188
1188
|
n
|
|
@@ -1199,13 +1199,13 @@ function js(e, t) {
|
|
|
1199
1199
|
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
1200
1200
|
const d = Date.now(), l = s[i];
|
|
1201
1201
|
o || (o = d), n[r] = f, s[r] = d;
|
|
1202
|
-
let _ = i,
|
|
1202
|
+
let _ = i, C = 0;
|
|
1203
1203
|
for (; _ !== r; )
|
|
1204
|
-
|
|
1204
|
+
C += n[_++], _ = _ % e;
|
|
1205
1205
|
if (r = (r + 1) % e, r === i && (i = (i + 1) % e), d - o < t)
|
|
1206
1206
|
return;
|
|
1207
|
-
const
|
|
1208
|
-
return
|
|
1207
|
+
const E = l && d - l;
|
|
1208
|
+
return E ? Math.round(C * 1e3 / E) : void 0;
|
|
1209
1209
|
};
|
|
1210
1210
|
}
|
|
1211
1211
|
function Bs(e, t) {
|
|
@@ -1246,10 +1246,10 @@ const He = (e, t, n = 3) => {
|
|
|
1246
1246
|
total: e,
|
|
1247
1247
|
loaded: s
|
|
1248
1248
|
}), t[1]];
|
|
1249
|
-
}, St = (e) => (...t) => c.asap(() => e(...t)), Ys =
|
|
1250
|
-
new URL(
|
|
1251
|
-
|
|
1252
|
-
) : () => !0, Ms =
|
|
1249
|
+
}, St = (e) => (...t) => c.asap(() => e(...t)), Ys = te.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, te.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
1250
|
+
new URL(te.origin),
|
|
1251
|
+
te.navigator && /(msie|trident)/i.test(te.navigator.userAgent)
|
|
1252
|
+
) : () => !0, Ms = te.hasStandardBrowserEnv ? (
|
|
1253
1253
|
// Standard browser envs support document.cookie
|
|
1254
1254
|
{
|
|
1255
1255
|
write(e, t, n, s, r, i, o) {
|
|
@@ -1288,18 +1288,18 @@ function ln(e, t, n) {
|
|
|
1288
1288
|
let s = !Hs(t);
|
|
1289
1289
|
return e && (s || n == !1) ? Is(e, t) : t;
|
|
1290
1290
|
}
|
|
1291
|
-
const Dt = (e) => e instanceof
|
|
1292
|
-
function
|
|
1291
|
+
const Dt = (e) => e instanceof oe ? { ...e } : e;
|
|
1292
|
+
function Ce(e, t) {
|
|
1293
1293
|
t = t || {};
|
|
1294
1294
|
const n = {};
|
|
1295
|
-
function s(d, l, _,
|
|
1296
|
-
return c.isPlainObject(d) && c.isPlainObject(l) ? c.merge.call({ caseless:
|
|
1295
|
+
function s(d, l, _, C) {
|
|
1296
|
+
return c.isPlainObject(d) && c.isPlainObject(l) ? c.merge.call({ caseless: C }, d, l) : c.isPlainObject(l) ? c.merge({}, l) : c.isArray(l) ? l.slice() : l;
|
|
1297
1297
|
}
|
|
1298
|
-
function r(d, l, _,
|
|
1298
|
+
function r(d, l, _, C) {
|
|
1299
1299
|
if (c.isUndefined(l)) {
|
|
1300
1300
|
if (!c.isUndefined(d))
|
|
1301
|
-
return s(void 0, d, _,
|
|
1302
|
-
} else return s(d, l, _,
|
|
1301
|
+
return s(void 0, d, _, C);
|
|
1302
|
+
} else return s(d, l, _, C);
|
|
1303
1303
|
}
|
|
1304
1304
|
function i(d, l) {
|
|
1305
1305
|
if (!c.isUndefined(l))
|
|
@@ -1353,19 +1353,19 @@ function ge(e, t) {
|
|
|
1353
1353
|
function(l) {
|
|
1354
1354
|
if (l === "__proto__" || l === "constructor" || l === "prototype")
|
|
1355
1355
|
return;
|
|
1356
|
-
const _ = c.hasOwnProp(f, l) ? f[l] : r,
|
|
1357
|
-
c.isUndefined(
|
|
1356
|
+
const _ = c.hasOwnProp(f, l) ? f[l] : r, C = _(e[l], t[l], l);
|
|
1357
|
+
c.isUndefined(C) && _ !== a || (n[l] = C);
|
|
1358
1358
|
}
|
|
1359
1359
|
), n;
|
|
1360
1360
|
}
|
|
1361
1361
|
const dn = (e) => {
|
|
1362
|
-
const t =
|
|
1362
|
+
const t = Ce({}, e);
|
|
1363
1363
|
let { data: n, withXSRFToken: s, xsrfHeaderName: r, xsrfCookieName: i, headers: o, auth: a } = t;
|
|
1364
|
-
if (t.headers = o =
|
|
1364
|
+
if (t.headers = o = oe.from(o), t.url = rn(ln(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), a && o.set(
|
|
1365
1365
|
"Authorization",
|
|
1366
1366
|
"Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
|
|
1367
1367
|
), c.isFormData(n)) {
|
|
1368
|
-
if (
|
|
1368
|
+
if (te.hasStandardBrowserEnv || te.hasStandardBrowserWebWorkerEnv)
|
|
1369
1369
|
o.setContentType(void 0);
|
|
1370
1370
|
else if (c.isFunction(n.getHeaders)) {
|
|
1371
1371
|
const f = n.getHeaders(), d = ["content-type", "content-length"];
|
|
@@ -1374,7 +1374,7 @@ const dn = (e) => {
|
|
|
1374
1374
|
});
|
|
1375
1375
|
}
|
|
1376
1376
|
}
|
|
1377
|
-
if (
|
|
1377
|
+
if (te.hasStandardBrowserEnv && (s && c.isFunction(s) && (s = s(t)), s || s !== !1 && Ys(t.url))) {
|
|
1378
1378
|
const f = r && i && Ms.read(i);
|
|
1379
1379
|
f && o.set(r, f);
|
|
1380
1380
|
}
|
|
@@ -1383,56 +1383,56 @@ const dn = (e) => {
|
|
|
1383
1383
|
return new Promise(function(n, s) {
|
|
1384
1384
|
const r = dn(e);
|
|
1385
1385
|
let i = r.data;
|
|
1386
|
-
const o =
|
|
1387
|
-
let { responseType: a, onUploadProgress: f, onDownloadProgress: d } = r, l, _,
|
|
1386
|
+
const o = oe.from(r.headers).normalize();
|
|
1387
|
+
let { responseType: a, onUploadProgress: f, onDownloadProgress: d } = r, l, _, C, E, p;
|
|
1388
1388
|
function w() {
|
|
1389
|
-
|
|
1389
|
+
E && E(), p && p(), r.cancelToken && r.cancelToken.unsubscribe(l), r.signal && r.signal.removeEventListener("abort", l);
|
|
1390
1390
|
}
|
|
1391
1391
|
let h = new XMLHttpRequest();
|
|
1392
1392
|
h.open(r.method.toUpperCase(), r.url, !0), h.timeout = r.timeout;
|
|
1393
|
-
function
|
|
1393
|
+
function S() {
|
|
1394
1394
|
if (!h)
|
|
1395
1395
|
return;
|
|
1396
|
-
const
|
|
1396
|
+
const v = oe.from(
|
|
1397
1397
|
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
|
|
1398
|
-
),
|
|
1398
|
+
), J = {
|
|
1399
1399
|
data: !a || a === "text" || a === "json" ? h.responseText : h.response,
|
|
1400
1400
|
status: h.status,
|
|
1401
1401
|
statusText: h.statusText,
|
|
1402
|
-
headers:
|
|
1402
|
+
headers: v,
|
|
1403
1403
|
config: e,
|
|
1404
1404
|
request: h
|
|
1405
1405
|
};
|
|
1406
|
-
cn(function(
|
|
1407
|
-
n(
|
|
1408
|
-
}, function(
|
|
1409
|
-
s(
|
|
1410
|
-
},
|
|
1406
|
+
cn(function(Y) {
|
|
1407
|
+
n(Y), w();
|
|
1408
|
+
}, function(Y) {
|
|
1409
|
+
s(Y), w();
|
|
1410
|
+
}, J), h = null;
|
|
1411
1411
|
}
|
|
1412
|
-
"onloadend" in h ? h.onloadend =
|
|
1413
|
-
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(
|
|
1412
|
+
"onloadend" in h ? h.onloadend = S : h.onreadystatechange = function() {
|
|
1413
|
+
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(S);
|
|
1414
1414
|
}, h.onabort = function() {
|
|
1415
|
-
h && (s(new
|
|
1416
|
-
}, h.onerror = function(
|
|
1417
|
-
const
|
|
1418
|
-
|
|
1415
|
+
h && (s(new b("Request aborted", b.ECONNABORTED, e, h)), h = null);
|
|
1416
|
+
}, h.onerror = function(L) {
|
|
1417
|
+
const J = L && L.message ? L.message : "Network Error", k = new b(J, b.ERR_NETWORK, e, h);
|
|
1418
|
+
k.event = L || null, s(k), h = null;
|
|
1419
1419
|
}, h.ontimeout = function() {
|
|
1420
|
-
let
|
|
1421
|
-
const
|
|
1422
|
-
r.timeoutErrorMessage && (
|
|
1423
|
-
|
|
1424
|
-
|
|
1420
|
+
let L = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
|
|
1421
|
+
const J = r.transitional || at;
|
|
1422
|
+
r.timeoutErrorMessage && (L = r.timeoutErrorMessage), s(new b(
|
|
1423
|
+
L,
|
|
1424
|
+
J.clarifyTimeoutError ? b.ETIMEDOUT : b.ECONNABORTED,
|
|
1425
1425
|
e,
|
|
1426
1426
|
h
|
|
1427
1427
|
)), h = null;
|
|
1428
|
-
}, i === void 0 && o.setContentType(null), "setRequestHeader" in h && c.forEach(o.toJSON(), function(
|
|
1429
|
-
h.setRequestHeader(
|
|
1430
|
-
}), c.isUndefined(r.withCredentials) || (h.withCredentials = !!r.withCredentials), a && a !== "json" && (h.responseType = r.responseType), d && ([
|
|
1431
|
-
h && (s(!
|
|
1428
|
+
}, i === void 0 && o.setContentType(null), "setRequestHeader" in h && c.forEach(o.toJSON(), function(L, J) {
|
|
1429
|
+
h.setRequestHeader(J, L);
|
|
1430
|
+
}), c.isUndefined(r.withCredentials) || (h.withCredentials = !!r.withCredentials), a && a !== "json" && (h.responseType = r.responseType), d && ([C, p] = He(d, !0), h.addEventListener("progress", C)), f && h.upload && ([_, E] = He(f), h.upload.addEventListener("progress", _), h.upload.addEventListener("loadend", E)), (r.cancelToken || r.signal) && (l = (v) => {
|
|
1431
|
+
h && (s(!v || v.type ? new Oe(null, e, h) : v), h.abort(), h = null);
|
|
1432
1432
|
}, r.cancelToken && r.cancelToken.subscribe(l), r.signal && (r.signal.aborted ? l() : r.signal.addEventListener("abort", l)));
|
|
1433
|
-
const
|
|
1434
|
-
if (
|
|
1435
|
-
s(new
|
|
1433
|
+
const G = Fs(r.url);
|
|
1434
|
+
if (G && te.protocols.indexOf(G) === -1) {
|
|
1435
|
+
s(new b("Unsupported protocol " + G + ":", b.ERR_BAD_REQUEST, e));
|
|
1436
1436
|
return;
|
|
1437
1437
|
}
|
|
1438
1438
|
h.send(i || null);
|
|
@@ -1445,11 +1445,11 @@ const dn = (e) => {
|
|
|
1445
1445
|
if (!r) {
|
|
1446
1446
|
r = !0, a();
|
|
1447
1447
|
const l = d instanceof Error ? d : this.reason;
|
|
1448
|
-
s.abort(l instanceof
|
|
1448
|
+
s.abort(l instanceof b ? l : new Oe(l instanceof Error ? l.message : l));
|
|
1449
1449
|
}
|
|
1450
1450
|
};
|
|
1451
1451
|
let o = t && setTimeout(() => {
|
|
1452
|
-
o = null, i(new
|
|
1452
|
+
o = null, i(new b(`timeout of ${t}ms exceeded`, b.ETIMEDOUT));
|
|
1453
1453
|
}, t);
|
|
1454
1454
|
const a = () => {
|
|
1455
1455
|
e && (o && clearTimeout(o), o = null, e.forEach((d) => {
|
|
@@ -1503,8 +1503,8 @@ const dn = (e) => {
|
|
|
1503
1503
|
}
|
|
1504
1504
|
let _ = l.byteLength;
|
|
1505
1505
|
if (n) {
|
|
1506
|
-
let
|
|
1507
|
-
n(
|
|
1506
|
+
let C = i += _;
|
|
1507
|
+
n(C);
|
|
1508
1508
|
}
|
|
1509
1509
|
f.enqueue(new Uint8Array(l));
|
|
1510
1510
|
} catch (d) {
|
|
@@ -1538,7 +1538,7 @@ const dn = (e) => {
|
|
|
1538
1538
|
return !1;
|
|
1539
1539
|
const a = r && Fe(Tt), f = r && (typeof Nt == "function" ? /* @__PURE__ */ ((p) => (w) => p.encode(w))(new Nt()) : async (p) => new Uint8Array(await new n(p).arrayBuffer())), d = i && a && vt(() => {
|
|
1540
1540
|
let p = !1;
|
|
1541
|
-
const w = new n(
|
|
1541
|
+
const w = new n(te.origin, {
|
|
1542
1542
|
body: new Tt(),
|
|
1543
1543
|
method: "POST",
|
|
1544
1544
|
get duplex() {
|
|
@@ -1551,19 +1551,19 @@ const dn = (e) => {
|
|
|
1551
1551
|
};
|
|
1552
1552
|
r && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((p) => {
|
|
1553
1553
|
!_[p] && (_[p] = (w, h) => {
|
|
1554
|
-
let
|
|
1555
|
-
if (
|
|
1556
|
-
return
|
|
1557
|
-
throw new
|
|
1554
|
+
let S = w && w[p];
|
|
1555
|
+
if (S)
|
|
1556
|
+
return S.call(w);
|
|
1557
|
+
throw new b(`Response type '${p}' is not supported`, b.ERR_NOT_SUPPORT, h);
|
|
1558
1558
|
});
|
|
1559
1559
|
});
|
|
1560
|
-
const
|
|
1560
|
+
const C = async (p) => {
|
|
1561
1561
|
if (p == null)
|
|
1562
1562
|
return 0;
|
|
1563
1563
|
if (c.isBlob(p))
|
|
1564
1564
|
return p.size;
|
|
1565
1565
|
if (c.isSpecCompliantForm(p))
|
|
1566
|
-
return (await new n(
|
|
1566
|
+
return (await new n(te.origin, {
|
|
1567
1567
|
method: "POST",
|
|
1568
1568
|
body: p
|
|
1569
1569
|
}).arrayBuffer()).byteLength;
|
|
@@ -1571,94 +1571,94 @@ const dn = (e) => {
|
|
|
1571
1571
|
return p.byteLength;
|
|
1572
1572
|
if (c.isURLSearchParams(p) && (p = p + ""), c.isString(p))
|
|
1573
1573
|
return (await f(p)).byteLength;
|
|
1574
|
-
},
|
|
1574
|
+
}, E = async (p, w) => {
|
|
1575
1575
|
const h = c.toFiniteNumber(p.getContentLength());
|
|
1576
|
-
return h ??
|
|
1576
|
+
return h ?? C(w);
|
|
1577
1577
|
};
|
|
1578
1578
|
return async (p) => {
|
|
1579
1579
|
let {
|
|
1580
1580
|
url: w,
|
|
1581
1581
|
method: h,
|
|
1582
|
-
data:
|
|
1583
|
-
signal:
|
|
1584
|
-
cancelToken:
|
|
1585
|
-
timeout:
|
|
1586
|
-
onDownloadProgress:
|
|
1587
|
-
onUploadProgress:
|
|
1588
|
-
responseType:
|
|
1589
|
-
headers:
|
|
1590
|
-
withCredentials:
|
|
1591
|
-
fetchOptions:
|
|
1592
|
-
} = dn(p),
|
|
1593
|
-
|
|
1594
|
-
let Z = Js([
|
|
1595
|
-
const
|
|
1582
|
+
data: S,
|
|
1583
|
+
signal: G,
|
|
1584
|
+
cancelToken: v,
|
|
1585
|
+
timeout: L,
|
|
1586
|
+
onDownloadProgress: J,
|
|
1587
|
+
onUploadProgress: k,
|
|
1588
|
+
responseType: Y,
|
|
1589
|
+
headers: ne,
|
|
1590
|
+
withCredentials: W = "same-origin",
|
|
1591
|
+
fetchOptions: X
|
|
1592
|
+
} = dn(p), q = t || fetch;
|
|
1593
|
+
Y = Y ? (Y + "").toLowerCase() : "text";
|
|
1594
|
+
let Z = Js([G, v && v.toAbortSignal()], L), O = null;
|
|
1595
|
+
const D = Z && Z.unsubscribe && (() => {
|
|
1596
1596
|
Z.unsubscribe();
|
|
1597
1597
|
});
|
|
1598
|
-
let
|
|
1598
|
+
let F;
|
|
1599
1599
|
try {
|
|
1600
|
-
if (
|
|
1600
|
+
if (k && d && h !== "get" && h !== "head" && (F = await E(ne, S)) !== 0) {
|
|
1601
1601
|
let u = new n(w, {
|
|
1602
1602
|
method: "POST",
|
|
1603
|
-
body:
|
|
1603
|
+
body: S,
|
|
1604
1604
|
duplex: "half"
|
|
1605
|
-
}),
|
|
1606
|
-
if (c.isFormData(
|
|
1607
|
-
const [
|
|
1608
|
-
|
|
1609
|
-
He(St(
|
|
1605
|
+
}), y;
|
|
1606
|
+
if (c.isFormData(S) && (y = u.headers.get("content-type")) && ne.setContentType(y), u.body) {
|
|
1607
|
+
const [A, R] = Et(
|
|
1608
|
+
F,
|
|
1609
|
+
He(St(k))
|
|
1610
1610
|
);
|
|
1611
|
-
|
|
1611
|
+
S = At(u.body, Ut, A, R);
|
|
1612
1612
|
}
|
|
1613
1613
|
}
|
|
1614
|
-
c.isString(
|
|
1614
|
+
c.isString(W) || (W = W ? "include" : "omit");
|
|
1615
1615
|
const x = i && "credentials" in n.prototype, se = {
|
|
1616
|
-
...
|
|
1616
|
+
...X,
|
|
1617
1617
|
signal: Z,
|
|
1618
1618
|
method: h.toUpperCase(),
|
|
1619
|
-
headers:
|
|
1620
|
-
body:
|
|
1619
|
+
headers: ne.normalize().toJSON(),
|
|
1620
|
+
body: S,
|
|
1621
1621
|
duplex: "half",
|
|
1622
|
-
credentials: x ?
|
|
1622
|
+
credentials: x ? W : void 0
|
|
1623
1623
|
};
|
|
1624
|
-
|
|
1625
|
-
let
|
|
1626
|
-
const
|
|
1627
|
-
if (l && (
|
|
1624
|
+
O = i && new n(w, se);
|
|
1625
|
+
let g = await (i ? q(O, X) : q(w, se));
|
|
1626
|
+
const H = l && (Y === "stream" || Y === "response");
|
|
1627
|
+
if (l && (J || H && D)) {
|
|
1628
1628
|
const u = {};
|
|
1629
|
-
["status", "statusText", "headers"].forEach((
|
|
1630
|
-
u[
|
|
1629
|
+
["status", "statusText", "headers"].forEach((j) => {
|
|
1630
|
+
u[j] = g[j];
|
|
1631
1631
|
});
|
|
1632
|
-
const
|
|
1633
|
-
|
|
1634
|
-
He(St(
|
|
1632
|
+
const y = c.toFiniteNumber(g.headers.get("content-length")), [A, R] = J && Et(
|
|
1633
|
+
y,
|
|
1634
|
+
He(St(J), !0)
|
|
1635
1635
|
) || [];
|
|
1636
|
-
|
|
1637
|
-
At(
|
|
1638
|
-
|
|
1636
|
+
g = new s(
|
|
1637
|
+
At(g.body, Ut, A, () => {
|
|
1638
|
+
R && R(), D && D();
|
|
1639
1639
|
}),
|
|
1640
1640
|
u
|
|
1641
1641
|
);
|
|
1642
1642
|
}
|
|
1643
|
-
|
|
1644
|
-
let
|
|
1645
|
-
return !
|
|
1646
|
-
cn(u,
|
|
1647
|
-
data:
|
|
1648
|
-
headers:
|
|
1649
|
-
status:
|
|
1650
|
-
statusText:
|
|
1643
|
+
Y = Y || "text";
|
|
1644
|
+
let T = await _[c.findKey(_, Y) || "text"](g, p);
|
|
1645
|
+
return !H && D && D(), await new Promise((u, y) => {
|
|
1646
|
+
cn(u, y, {
|
|
1647
|
+
data: T,
|
|
1648
|
+
headers: oe.from(g.headers),
|
|
1649
|
+
status: g.status,
|
|
1650
|
+
statusText: g.statusText,
|
|
1651
1651
|
config: p,
|
|
1652
|
-
request:
|
|
1652
|
+
request: O
|
|
1653
1653
|
});
|
|
1654
1654
|
});
|
|
1655
1655
|
} catch (x) {
|
|
1656
|
-
throw
|
|
1657
|
-
new
|
|
1656
|
+
throw D && D(), x && x.name === "TypeError" && /Load failed|fetch/i.test(x.message) ? Object.assign(
|
|
1657
|
+
new b("Network Error", b.ERR_NETWORK, p, O, x && x.response),
|
|
1658
1658
|
{
|
|
1659
1659
|
cause: x.cause || x
|
|
1660
1660
|
}
|
|
1661
|
-
) :
|
|
1661
|
+
) : b.from(x, x && x.code, p, O, x && x.response);
|
|
1662
1662
|
}
|
|
1663
1663
|
};
|
|
1664
1664
|
}, Zs = /* @__PURE__ */ new Map(), un = (e) => {
|
|
@@ -1700,7 +1700,7 @@ function Qs(e, t) {
|
|
|
1700
1700
|
s = e[o];
|
|
1701
1701
|
let a;
|
|
1702
1702
|
if (r = s, !Ws(s) && (r = lt[(a = String(s)).toLowerCase()], r === void 0))
|
|
1703
|
-
throw new
|
|
1703
|
+
throw new b(`Unknown adapter '${a}'`);
|
|
1704
1704
|
if (r && (c.isFunction(r) || (r = r.get(t))))
|
|
1705
1705
|
break;
|
|
1706
1706
|
i[a || "#" + o] = r;
|
|
@@ -1712,7 +1712,7 @@ function Qs(e, t) {
|
|
|
1712
1712
|
let a = n ? o.length > 1 ? `since :
|
|
1713
1713
|
` + o.map(xt).join(`
|
|
1714
1714
|
`) : " " + xt(o[0]) : "as no adapter specified";
|
|
1715
|
-
throw new
|
|
1715
|
+
throw new b(
|
|
1716
1716
|
"There is no suitable adapter to dispatch the request " + a,
|
|
1717
1717
|
"ERR_NOT_SUPPORT"
|
|
1718
1718
|
);
|
|
@@ -1733,24 +1733,24 @@ const pn = {
|
|
|
1733
1733
|
};
|
|
1734
1734
|
function Ke(e) {
|
|
1735
1735
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1736
|
-
throw new
|
|
1736
|
+
throw new Oe(null, e);
|
|
1737
1737
|
}
|
|
1738
1738
|
function Lt(e) {
|
|
1739
|
-
return Ke(e), e.headers =
|
|
1739
|
+
return Ke(e), e.headers = oe.from(e.headers), e.data = Ve.call(
|
|
1740
1740
|
e,
|
|
1741
1741
|
e.transformRequest
|
|
1742
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), pn.getAdapter(e.adapter ||
|
|
1742
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), pn.getAdapter(e.adapter || Pe.adapter, e)(e).then(function(s) {
|
|
1743
1743
|
return Ke(e), s.data = Ve.call(
|
|
1744
1744
|
e,
|
|
1745
1745
|
e.transformResponse,
|
|
1746
1746
|
s
|
|
1747
|
-
), s.headers =
|
|
1747
|
+
), s.headers = oe.from(s.headers), s;
|
|
1748
1748
|
}, function(s) {
|
|
1749
1749
|
return an(s) || (Ke(e), s && s.response && (s.response.data = Ve.call(
|
|
1750
1750
|
e,
|
|
1751
1751
|
e.transformResponse,
|
|
1752
1752
|
s.response
|
|
1753
|
-
), s.response.headers =
|
|
1753
|
+
), s.response.headers = oe.from(s.response.headers))), Promise.reject(s);
|
|
1754
1754
|
});
|
|
1755
1755
|
}
|
|
1756
1756
|
const fn = "1.13.5", Xe = {};
|
|
@@ -1766,9 +1766,9 @@ Xe.transitional = function(t, n, s) {
|
|
|
1766
1766
|
}
|
|
1767
1767
|
return (i, o, a) => {
|
|
1768
1768
|
if (t === !1)
|
|
1769
|
-
throw new
|
|
1769
|
+
throw new b(
|
|
1770
1770
|
r(o, " has been removed" + (n ? " in " + n : "")),
|
|
1771
|
-
|
|
1771
|
+
b.ERR_DEPRECATED
|
|
1772
1772
|
);
|
|
1773
1773
|
return n && !Pt[o] && (Pt[o] = !0, console.warn(
|
|
1774
1774
|
r(
|
|
@@ -1783,7 +1783,7 @@ Xe.spelling = function(t) {
|
|
|
1783
1783
|
};
|
|
1784
1784
|
function er(e, t, n) {
|
|
1785
1785
|
if (typeof e != "object")
|
|
1786
|
-
throw new
|
|
1786
|
+
throw new b("options must be an object", b.ERR_BAD_OPTION_VALUE);
|
|
1787
1787
|
const s = Object.keys(e);
|
|
1788
1788
|
let r = s.length;
|
|
1789
1789
|
for (; r-- > 0; ) {
|
|
@@ -1791,18 +1791,18 @@ function er(e, t, n) {
|
|
|
1791
1791
|
if (o) {
|
|
1792
1792
|
const a = e[i], f = a === void 0 || o(a, i, e);
|
|
1793
1793
|
if (f !== !0)
|
|
1794
|
-
throw new
|
|
1794
|
+
throw new b("option " + i + " must be " + f, b.ERR_BAD_OPTION_VALUE);
|
|
1795
1795
|
continue;
|
|
1796
1796
|
}
|
|
1797
1797
|
if (n !== !0)
|
|
1798
|
-
throw new
|
|
1798
|
+
throw new b("Unknown option " + i, b.ERR_BAD_OPTION);
|
|
1799
1799
|
}
|
|
1800
1800
|
}
|
|
1801
1801
|
const Ye = {
|
|
1802
1802
|
assertOptions: er,
|
|
1803
1803
|
validators: Xe
|
|
1804
|
-
},
|
|
1805
|
-
let
|
|
1804
|
+
}, ue = Ye.validators;
|
|
1805
|
+
let ye = class {
|
|
1806
1806
|
constructor(t) {
|
|
1807
1807
|
this.defaults = t || {}, this.interceptors = {
|
|
1808
1808
|
request: new bt(),
|
|
@@ -1835,21 +1835,21 @@ let we = class {
|
|
|
1835
1835
|
}
|
|
1836
1836
|
}
|
|
1837
1837
|
_request(t, n) {
|
|
1838
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
1838
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = Ce(this.defaults, n);
|
|
1839
1839
|
const { transitional: s, paramsSerializer: r, headers: i } = n;
|
|
1840
1840
|
s !== void 0 && Ye.assertOptions(s, {
|
|
1841
|
-
silentJSONParsing:
|
|
1842
|
-
forcedJSONParsing:
|
|
1843
|
-
clarifyTimeoutError:
|
|
1844
|
-
legacyInterceptorReqResOrdering:
|
|
1841
|
+
silentJSONParsing: ue.transitional(ue.boolean),
|
|
1842
|
+
forcedJSONParsing: ue.transitional(ue.boolean),
|
|
1843
|
+
clarifyTimeoutError: ue.transitional(ue.boolean),
|
|
1844
|
+
legacyInterceptorReqResOrdering: ue.transitional(ue.boolean)
|
|
1845
1845
|
}, !1), r != null && (c.isFunction(r) ? n.paramsSerializer = {
|
|
1846
1846
|
serialize: r
|
|
1847
1847
|
} : Ye.assertOptions(r, {
|
|
1848
|
-
encode:
|
|
1849
|
-
serialize:
|
|
1848
|
+
encode: ue.function,
|
|
1849
|
+
serialize: ue.function
|
|
1850
1850
|
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Ye.assertOptions(n, {
|
|
1851
|
-
baseUrl:
|
|
1852
|
-
withXsrfToken:
|
|
1851
|
+
baseUrl: ue.spelling("baseURL"),
|
|
1852
|
+
withXsrfToken: ue.spelling("withXSRFToken")
|
|
1853
1853
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1854
1854
|
let o = i && c.merge(
|
|
1855
1855
|
i.common,
|
|
@@ -1860,7 +1860,7 @@ let we = class {
|
|
|
1860
1860
|
(p) => {
|
|
1861
1861
|
delete i[p];
|
|
1862
1862
|
}
|
|
1863
|
-
), n.headers =
|
|
1863
|
+
), n.headers = oe.concat(o, i);
|
|
1864
1864
|
const a = [];
|
|
1865
1865
|
let f = !0;
|
|
1866
1866
|
this.interceptors.request.forEach(function(w) {
|
|
@@ -1874,42 +1874,42 @@ let we = class {
|
|
|
1874
1874
|
this.interceptors.response.forEach(function(w) {
|
|
1875
1875
|
d.push(w.fulfilled, w.rejected);
|
|
1876
1876
|
});
|
|
1877
|
-
let l, _ = 0,
|
|
1877
|
+
let l, _ = 0, C;
|
|
1878
1878
|
if (!f) {
|
|
1879
1879
|
const p = [Lt.bind(this), void 0];
|
|
1880
|
-
for (p.unshift(...a), p.push(...d),
|
|
1880
|
+
for (p.unshift(...a), p.push(...d), C = p.length, l = Promise.resolve(n); _ < C; )
|
|
1881
1881
|
l = l.then(p[_++], p[_++]);
|
|
1882
1882
|
return l;
|
|
1883
1883
|
}
|
|
1884
|
-
|
|
1885
|
-
let
|
|
1886
|
-
for (; _ <
|
|
1884
|
+
C = a.length;
|
|
1885
|
+
let E = n;
|
|
1886
|
+
for (; _ < C; ) {
|
|
1887
1887
|
const p = a[_++], w = a[_++];
|
|
1888
1888
|
try {
|
|
1889
|
-
|
|
1889
|
+
E = p(E);
|
|
1890
1890
|
} catch (h) {
|
|
1891
1891
|
w.call(this, h);
|
|
1892
1892
|
break;
|
|
1893
1893
|
}
|
|
1894
1894
|
}
|
|
1895
1895
|
try {
|
|
1896
|
-
l = Lt.call(this,
|
|
1896
|
+
l = Lt.call(this, E);
|
|
1897
1897
|
} catch (p) {
|
|
1898
1898
|
return Promise.reject(p);
|
|
1899
1899
|
}
|
|
1900
|
-
for (_ = 0,
|
|
1900
|
+
for (_ = 0, C = d.length; _ < C; )
|
|
1901
1901
|
l = l.then(d[_++], d[_++]);
|
|
1902
1902
|
return l;
|
|
1903
1903
|
}
|
|
1904
1904
|
getUri(t) {
|
|
1905
|
-
t =
|
|
1905
|
+
t = Ce(this.defaults, t);
|
|
1906
1906
|
const n = ln(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1907
1907
|
return rn(n, t.params, t.paramsSerializer);
|
|
1908
1908
|
}
|
|
1909
1909
|
};
|
|
1910
1910
|
c.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1911
|
-
|
|
1912
|
-
return this.request(
|
|
1911
|
+
ye.prototype[t] = function(n, s) {
|
|
1912
|
+
return this.request(Ce(s || {}, {
|
|
1913
1913
|
method: t,
|
|
1914
1914
|
url: n,
|
|
1915
1915
|
data: (s || {}).data
|
|
@@ -1919,7 +1919,7 @@ c.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1919
1919
|
c.forEach(["post", "put", "patch"], function(t) {
|
|
1920
1920
|
function n(s) {
|
|
1921
1921
|
return function(i, o, a) {
|
|
1922
|
-
return this.request(
|
|
1922
|
+
return this.request(Ce(a || {}, {
|
|
1923
1923
|
method: t,
|
|
1924
1924
|
headers: s ? {
|
|
1925
1925
|
"Content-Type": "multipart/form-data"
|
|
@@ -1929,7 +1929,7 @@ c.forEach(["post", "put", "patch"], function(t) {
|
|
|
1929
1929
|
}));
|
|
1930
1930
|
};
|
|
1931
1931
|
}
|
|
1932
|
-
|
|
1932
|
+
ye.prototype[t] = n(), ye.prototype[t + "Form"] = n(!0);
|
|
1933
1933
|
});
|
|
1934
1934
|
let tr = class mn {
|
|
1935
1935
|
constructor(t) {
|
|
@@ -1955,7 +1955,7 @@ let tr = class mn {
|
|
|
1955
1955
|
s.unsubscribe(i);
|
|
1956
1956
|
}, o;
|
|
1957
1957
|
}, t(function(i, o, a) {
|
|
1958
|
-
s.reason || (s.reason = new
|
|
1958
|
+
s.reason || (s.reason = new Oe(i, o, a), n(s.reason));
|
|
1959
1959
|
});
|
|
1960
1960
|
}
|
|
1961
1961
|
/**
|
|
@@ -2087,31 +2087,31 @@ Object.entries(et).forEach(([e, t]) => {
|
|
|
2087
2087
|
et[t] = e;
|
|
2088
2088
|
});
|
|
2089
2089
|
function _n(e) {
|
|
2090
|
-
const t = new
|
|
2091
|
-
return c.extend(n,
|
|
2092
|
-
return _n(
|
|
2090
|
+
const t = new ye(e), n = qt(ye.prototype.request, t);
|
|
2091
|
+
return c.extend(n, ye.prototype, t, { allOwnKeys: !0 }), c.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(r) {
|
|
2092
|
+
return _n(Ce(e, r));
|
|
2093
2093
|
}, n;
|
|
2094
2094
|
}
|
|
2095
|
-
const
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2095
|
+
const M = _n(Pe);
|
|
2096
|
+
M.Axios = ye;
|
|
2097
|
+
M.CanceledError = Oe;
|
|
2098
|
+
M.CancelToken = tr;
|
|
2099
|
+
M.isCancel = an;
|
|
2100
|
+
M.VERSION = fn;
|
|
2101
|
+
M.toFormData = Je;
|
|
2102
|
+
M.AxiosError = b;
|
|
2103
|
+
M.Cancel = M.CanceledError;
|
|
2104
|
+
M.all = function(t) {
|
|
2105
2105
|
return Promise.all(t);
|
|
2106
2106
|
};
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2107
|
+
M.spread = nr;
|
|
2108
|
+
M.isAxiosError = sr;
|
|
2109
|
+
M.mergeConfig = Ce;
|
|
2110
|
+
M.AxiosHeaders = oe;
|
|
2111
|
+
M.formToJSON = (e) => on(c.isHTMLForm(e) ? new FormData(e) : e);
|
|
2112
|
+
M.getAdapter = pn.getAdapter;
|
|
2113
|
+
M.HttpStatusCode = et;
|
|
2114
|
+
M.default = M;
|
|
2115
2115
|
const {
|
|
2116
2116
|
Axios: Gr,
|
|
2117
2117
|
AxiosError: Jr,
|
|
@@ -2129,29 +2129,29 @@ const {
|
|
|
2129
2129
|
formToJSON: si,
|
|
2130
2130
|
getAdapter: ri,
|
|
2131
2131
|
mergeConfig: ii
|
|
2132
|
-
} =
|
|
2132
|
+
} = M, Ot = (e) => {
|
|
2133
2133
|
let t;
|
|
2134
2134
|
const n = /* @__PURE__ */ new Set(), s = (d, l) => {
|
|
2135
2135
|
const _ = typeof d == "function" ? d(t) : d;
|
|
2136
2136
|
if (!Object.is(_, t)) {
|
|
2137
|
-
const
|
|
2138
|
-
t = l ?? (typeof _ != "object" || _ === null) ? _ : Object.assign({}, t, _), n.forEach((
|
|
2137
|
+
const C = t;
|
|
2138
|
+
t = l ?? (typeof _ != "object" || _ === null) ? _ : Object.assign({}, t, _), n.forEach((E) => E(t, C));
|
|
2139
2139
|
}
|
|
2140
2140
|
}, r = () => t, a = { setState: s, getState: r, getInitialState: () => f, subscribe: (d) => (n.add(d), () => n.delete(d)) }, f = t = e(s, r, a);
|
|
2141
2141
|
return a;
|
|
2142
2142
|
}, rr = ((e) => e ? Ot(e) : Ot), ir = (e) => e;
|
|
2143
2143
|
function or(e, t = ir) {
|
|
2144
|
-
const n =
|
|
2144
|
+
const n = Te.useSyncExternalStore(
|
|
2145
2145
|
e.subscribe,
|
|
2146
|
-
|
|
2147
|
-
|
|
2146
|
+
Te.useCallback(() => t(e.getState()), [e, t]),
|
|
2147
|
+
Te.useCallback(() => t(e.getInitialState()), [e, t])
|
|
2148
2148
|
);
|
|
2149
|
-
return
|
|
2149
|
+
return Te.useDebugValue(n), n;
|
|
2150
2150
|
}
|
|
2151
2151
|
const kt = (e) => {
|
|
2152
2152
|
const t = rr(e), n = (s) => or(t, s);
|
|
2153
2153
|
return Object.assign(n, t), n;
|
|
2154
|
-
}, ar = ((e) => e ? kt(e) : kt),
|
|
2154
|
+
}, ar = ((e) => e ? kt(e) : kt), be = ar((e) => ({
|
|
2155
2155
|
newsSelectedCandles: null,
|
|
2156
2156
|
newsPlayEndTimestamp: null,
|
|
2157
2157
|
newsTargetCandle: null,
|
|
@@ -2496,7 +2496,7 @@ const Ar = ({
|
|
|
2496
2496
|
children: t,
|
|
2497
2497
|
isCompared: n
|
|
2498
2498
|
}) => {
|
|
2499
|
-
const [s, r] =
|
|
2499
|
+
const [s, r] = le(!1);
|
|
2500
2500
|
return /* @__PURE__ */ m.jsxs("div", { className: "news-widget_event_details__container news-widget_event_details__container_sm", children: [
|
|
2501
2501
|
e && /* @__PURE__ */ m.jsxs("div", { style: { position: "relative" }, children: [
|
|
2502
2502
|
/* @__PURE__ */ m.jsx(
|
|
@@ -2665,16 +2665,16 @@ function vr(e, t, n = []) {
|
|
|
2665
2665
|
if (e.length === 0) return [];
|
|
2666
2666
|
const s = n.map((l) => Math.abs(l.c - l.o)), r = e.map((l) => Math.abs(l.c - l.o)), i = Bt(r), o = Bt(s), a = Nr(o, i), f = e[0].o, d = t.c;
|
|
2667
2667
|
return e.map((l) => {
|
|
2668
|
-
const _ = (l.o - f) * a + d,
|
|
2668
|
+
const _ = (l.o - f) * a + d, C = (l.h - f) * a + d, E = (l.l - f) * a + d, p = (l.c - f) * a + d;
|
|
2669
2669
|
return {
|
|
2670
2670
|
o: _,
|
|
2671
|
-
h: Math.max(
|
|
2672
|
-
l: Math.min(
|
|
2671
|
+
h: Math.max(C, _, p),
|
|
2672
|
+
l: Math.min(E, _, p),
|
|
2673
2673
|
c: p
|
|
2674
2674
|
};
|
|
2675
2675
|
});
|
|
2676
2676
|
}
|
|
2677
|
-
const
|
|
2677
|
+
const ge = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 : parseInt(e, 10) * 60, st = 8, Cn = 4, rt = 5, bn = (e) => {
|
|
2678
2678
|
const t = new Date(e + st * 60 * 60 * 1e3), n = t.getUTCDay(), s = t.getUTCHours();
|
|
2679
2679
|
return n === 0 ? !1 : n === 1 ? s >= rt : n === 6 ? s <= Cn : !0;
|
|
2680
2680
|
}, Rn = (e) => {
|
|
@@ -2685,7 +2685,7 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
2685
2685
|
}
|
|
2686
2686
|
return e;
|
|
2687
2687
|
}, xr = (e, t, n) => {
|
|
2688
|
-
const s =
|
|
2688
|
+
const s = ge(t) * 1e3, r = [];
|
|
2689
2689
|
let i = e;
|
|
2690
2690
|
for (let o = 0; o < n; o++)
|
|
2691
2691
|
i += s, bn(i) || (i = Rn(i)), r.push(i);
|
|
@@ -2693,7 +2693,7 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
2693
2693
|
}, Yt = (e, t, n, s) => {
|
|
2694
2694
|
if (n <= 0) return [];
|
|
2695
2695
|
if (s === "24x7") {
|
|
2696
|
-
const i =
|
|
2696
|
+
const i = ge(t) * 1e3;
|
|
2697
2697
|
return Array.from(
|
|
2698
2698
|
{ length: n },
|
|
2699
2699
|
(o, a) => e + (a + 1) * i
|
|
@@ -2701,27 +2701,27 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
2701
2701
|
}
|
|
2702
2702
|
if (s === "1700-1700")
|
|
2703
2703
|
return xr(e, t, n);
|
|
2704
|
-
const r =
|
|
2704
|
+
const r = ge(t) * 1e3;
|
|
2705
2705
|
return Array.from(
|
|
2706
2706
|
{ length: n },
|
|
2707
2707
|
(i, o) => e + (o + 1) * r
|
|
2708
2708
|
);
|
|
2709
2709
|
}, Lr = (e, t, n, s) => {
|
|
2710
2710
|
if (s === "24x7") {
|
|
2711
|
-
const i =
|
|
2711
|
+
const i = ge(n) * 1e3;
|
|
2712
2712
|
return Math.max(
|
|
2713
2713
|
0,
|
|
2714
2714
|
Math.floor((t - e) / i)
|
|
2715
2715
|
);
|
|
2716
2716
|
}
|
|
2717
2717
|
if (s === "1700-1700") {
|
|
2718
|
-
const i =
|
|
2718
|
+
const i = ge(n) * 1e3;
|
|
2719
2719
|
let o = 0, a = e;
|
|
2720
2720
|
for (; a < t; )
|
|
2721
2721
|
a += i, bn(a) || (a = Rn(a)), a <= t && o++;
|
|
2722
2722
|
return o;
|
|
2723
2723
|
}
|
|
2724
|
-
const r =
|
|
2724
|
+
const r = ge(n) * 1e3;
|
|
2725
2725
|
return Math.max(0, Math.floor((t - e) / r));
|
|
2726
2726
|
}, ut = [
|
|
2727
2727
|
{
|
|
@@ -3132,25 +3132,26 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3132
3132
|
tvWidgetRef: s,
|
|
3133
3133
|
pushBar: r,
|
|
3134
3134
|
resolution: i,
|
|
3135
|
-
symbol: o
|
|
3135
|
+
symbol: o,
|
|
3136
|
+
resolvedTheme: a
|
|
3136
3137
|
}) => {
|
|
3137
|
-
const
|
|
3138
|
-
(
|
|
3139
|
-
),
|
|
3140
|
-
(
|
|
3141
|
-
),
|
|
3142
|
-
return
|
|
3143
|
-
const
|
|
3138
|
+
const f = be(
|
|
3139
|
+
(p) => p.newsSelectedCandles
|
|
3140
|
+
), d = be((p) => p.newsTargetCandle), l = be(
|
|
3141
|
+
(p) => p.newsPlayEndTimestamp
|
|
3142
|
+
), _ = be((p) => p.gapCount), C = fe(f), E = fe(null);
|
|
3143
|
+
return me(() => {
|
|
3144
|
+
const p = {
|
|
3144
3145
|
current: null
|
|
3145
3146
|
};
|
|
3146
|
-
let
|
|
3147
|
+
let w = null, h = !1;
|
|
3147
3148
|
return (async () => {
|
|
3148
|
-
if (!
|
|
3149
|
-
if (
|
|
3150
|
-
if (
|
|
3149
|
+
if (!h) {
|
|
3150
|
+
if (f?.length && d !== null) {
|
|
3151
|
+
if (E.current === f) return;
|
|
3151
3152
|
t.current = [];
|
|
3152
|
-
const
|
|
3153
|
-
if (
|
|
3153
|
+
const S = l != null;
|
|
3154
|
+
if (C.current || S)
|
|
3154
3155
|
try {
|
|
3155
3156
|
s?.current?.resetCache(), s?.current?.activeChart().resetData();
|
|
3156
3157
|
} catch {
|
|
@@ -3159,85 +3160,100 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3159
3160
|
s?.current?.activeChart().executeActionById("timeScaleReset");
|
|
3160
3161
|
} catch {
|
|
3161
3162
|
}
|
|
3162
|
-
const
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
),
|
|
3167
|
-
(
|
|
3168
|
-
)?.session || "24x7",
|
|
3169
|
-
|
|
3163
|
+
const v = [...f].slice(-50 - (_ || 0)), L = vr(
|
|
3164
|
+
v,
|
|
3165
|
+
d[d.length - 1],
|
|
3166
|
+
d
|
|
3167
|
+
), k = ut.find(
|
|
3168
|
+
(D) => D.ticker === o || D.display_name === o
|
|
3169
|
+
)?.session || "24x7", Y = Yt(
|
|
3170
|
+
d[d.length - 1].timestamp,
|
|
3170
3171
|
i,
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
),
|
|
3174
|
-
|
|
3172
|
+
_ || 0,
|
|
3173
|
+
k
|
|
3174
|
+
), ne = Yt(
|
|
3175
|
+
_ ? Y[Y.length - 1] : d[d.length - 1].timestamp,
|
|
3175
3176
|
i,
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
),
|
|
3179
|
-
(
|
|
3180
|
-
open:
|
|
3181
|
-
high:
|
|
3182
|
-
low:
|
|
3183
|
-
close:
|
|
3184
|
-
time:
|
|
3177
|
+
L.length,
|
|
3178
|
+
k
|
|
3179
|
+
), X = L.map(
|
|
3180
|
+
(D, F) => ({
|
|
3181
|
+
open: D.o,
|
|
3182
|
+
high: D.h,
|
|
3183
|
+
low: D.l,
|
|
3184
|
+
close: D.c,
|
|
3185
|
+
time: ne[F]
|
|
3185
3186
|
})
|
|
3186
|
-
).sort((
|
|
3187
|
-
n.current =
|
|
3188
|
-
let
|
|
3189
|
-
const
|
|
3190
|
-
|
|
3187
|
+
).sort((D, F) => D.time - F.time);
|
|
3188
|
+
n.current = X.slice(-50);
|
|
3189
|
+
let q = 0, Z = 0;
|
|
3190
|
+
const O = async () => {
|
|
3191
|
+
p.current && (clearInterval(p.current), p.current = null), E.current = f;
|
|
3191
3192
|
try {
|
|
3192
|
-
|
|
3193
|
-
} catch (
|
|
3194
|
-
console.error("Error setting visible range:",
|
|
3193
|
+
f && X.length > 0;
|
|
3194
|
+
} catch (D) {
|
|
3195
|
+
console.error("Error setting visible range:", D);
|
|
3195
3196
|
}
|
|
3196
3197
|
};
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
if (
|
|
3200
|
-
if (r(e,
|
|
3201
|
-
t.current =
|
|
3202
|
-
else if (
|
|
3203
|
-
t.current = [...
|
|
3198
|
+
X.length === 0 ? (t.current = [], await O()) : w = setTimeout(() => {
|
|
3199
|
+
h || (p.current = setInterval(() => {
|
|
3200
|
+
if (q < X.length) {
|
|
3201
|
+
if (r(e, X[q]))
|
|
3202
|
+
t.current = X.slice(0, q + 1), q++, Z = 0, q === X.length && (t.current = X, O());
|
|
3203
|
+
else if (Z++, Z >= 10) {
|
|
3204
|
+
t.current = [...X];
|
|
3204
3205
|
try {
|
|
3205
3206
|
s?.current?.activeChart().resetData();
|
|
3206
3207
|
} catch {
|
|
3207
3208
|
}
|
|
3208
|
-
|
|
3209
|
+
O();
|
|
3209
3210
|
}
|
|
3210
3211
|
}
|
|
3211
3212
|
}, 150));
|
|
3212
3213
|
}, 700);
|
|
3213
3214
|
} else {
|
|
3214
|
-
if (t.current = [],
|
|
3215
|
+
if (t.current = [], C.current)
|
|
3215
3216
|
try {
|
|
3216
3217
|
s?.current?.resetCache(), s?.current?.activeChart().resetData();
|
|
3217
3218
|
} catch {
|
|
3218
3219
|
}
|
|
3219
|
-
|
|
3220
|
+
E.current = null;
|
|
3220
3221
|
}
|
|
3221
|
-
|
|
3222
|
+
C.current = f;
|
|
3222
3223
|
}
|
|
3223
3224
|
})(), () => {
|
|
3224
|
-
|
|
3225
|
+
h = !0, w && clearTimeout(w), p.current && (t.current = [], clearInterval(p.current));
|
|
3225
3226
|
};
|
|
3226
3227
|
}, [
|
|
3227
3228
|
r,
|
|
3228
3229
|
t,
|
|
3229
3230
|
n,
|
|
3230
|
-
|
|
3231
|
-
a,
|
|
3231
|
+
l,
|
|
3232
3232
|
f,
|
|
3233
|
+
d,
|
|
3233
3234
|
e,
|
|
3234
3235
|
i,
|
|
3235
3236
|
o,
|
|
3236
3237
|
s,
|
|
3237
|
-
|
|
3238
|
-
]),
|
|
3239
|
-
|
|
3240
|
-
}, [n,
|
|
3238
|
+
_
|
|
3239
|
+
]), me(() => {
|
|
3240
|
+
f === null && (n.current = []);
|
|
3241
|
+
}, [n, f]), /* @__PURE__ */ m.jsx(m.Fragment, { children: _ > 900 && /* @__PURE__ */ m.jsx("div", { className: "bg-backdrop absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 p-4", children: /* @__PURE__ */ m.jsxs("div", { className: "flex items-center justify-center gap-2", children: [
|
|
3242
|
+
/* @__PURE__ */ m.jsx(
|
|
3243
|
+
"img",
|
|
3244
|
+
{
|
|
3245
|
+
src: `/images/error-${a === "dark" ? "black" : "white"}.png`,
|
|
3246
|
+
alt: "alert",
|
|
3247
|
+
width: 44,
|
|
3248
|
+
height: 44
|
|
3249
|
+
}
|
|
3250
|
+
),
|
|
3251
|
+
/* @__PURE__ */ m.jsxs("p", { className: "text-theme text-center text-sm font-semibold", children: [
|
|
3252
|
+
"Candle data too far from event.",
|
|
3253
|
+
/* @__PURE__ */ m.jsx("br", {}),
|
|
3254
|
+
" Please try another timeframe."
|
|
3255
|
+
] })
|
|
3256
|
+
] }) }) });
|
|
3241
3257
|
}, Or = ({
|
|
3242
3258
|
children: e,
|
|
3243
3259
|
eventId: t,
|
|
@@ -3251,56 +3267,58 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3251
3267
|
currentSymbol: d,
|
|
3252
3268
|
currentTimeFrame: l,
|
|
3253
3269
|
isUpcoming: _ = !1,
|
|
3254
|
-
isElapsed:
|
|
3255
|
-
onBack:
|
|
3270
|
+
isElapsed: C = !1,
|
|
3271
|
+
onBack: E,
|
|
3256
3272
|
pushBar: p,
|
|
3257
3273
|
iframeRef: w,
|
|
3258
3274
|
futureRef: h,
|
|
3259
|
-
pendingMessageRef:
|
|
3260
|
-
iframeReadyToListenRef:
|
|
3261
|
-
highlightBarsRef:
|
|
3262
|
-
setGapCountExternal:
|
|
3263
|
-
setReplayModeExternal:
|
|
3275
|
+
pendingMessageRef: S,
|
|
3276
|
+
iframeReadyToListenRef: G,
|
|
3277
|
+
highlightBarsRef: v,
|
|
3278
|
+
setGapCountExternal: L,
|
|
3279
|
+
setReplayModeExternal: J
|
|
3264
3280
|
}) => {
|
|
3265
|
-
const
|
|
3266
|
-
setNewsTargetCandle:
|
|
3267
|
-
setGapCount:
|
|
3268
|
-
setNewsPlayEndTimestamp:
|
|
3281
|
+
const k = fe(null), { setCurrentSymbol: Y, setSelectedTimeframe: ne } = lr(), {
|
|
3282
|
+
setNewsTargetCandle: W,
|
|
3283
|
+
setGapCount: X,
|
|
3284
|
+
setNewsPlayEndTimestamp: q,
|
|
3269
3285
|
setNewsSelectedCandles: Z
|
|
3270
|
-
} =
|
|
3271
|
-
return
|
|
3286
|
+
} = be();
|
|
3287
|
+
return me(() => {
|
|
3272
3288
|
if (!t || t == "" || !s) return;
|
|
3273
|
-
const
|
|
3274
|
-
if (s)
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3289
|
+
const O = () => {
|
|
3290
|
+
if (s)
|
|
3291
|
+
try {
|
|
3292
|
+
const g = s?.activeChart();
|
|
3293
|
+
g && g.getAllShapes().forEach((H) => {
|
|
3294
|
+
try {
|
|
3295
|
+
g.removeEntity(H.id);
|
|
3296
|
+
} catch (T) {
|
|
3297
|
+
console.error("Failed to remove shape", T);
|
|
3298
|
+
}
|
|
3299
|
+
});
|
|
3300
|
+
} catch {
|
|
3301
|
+
}
|
|
3302
|
+
}, D = async () => {
|
|
3303
|
+
const { data: g, status: H } = await M.get(
|
|
3286
3304
|
`https://corprate-widget.iccandle.ai/news/${t}`,
|
|
3287
3305
|
{
|
|
3288
3306
|
headers: { "api-key": n },
|
|
3289
3307
|
params: { symbol: f }
|
|
3290
3308
|
}
|
|
3291
3309
|
);
|
|
3292
|
-
if (
|
|
3310
|
+
if (H !== 200) {
|
|
3293
3311
|
console.error("Failed to fetch news detail");
|
|
3294
3312
|
return;
|
|
3295
3313
|
}
|
|
3296
|
-
return
|
|
3314
|
+
return g;
|
|
3297
3315
|
};
|
|
3298
|
-
let
|
|
3299
|
-
const x = [], se = (
|
|
3300
|
-
const
|
|
3301
|
-
return x.push(
|
|
3316
|
+
let F = !1;
|
|
3317
|
+
const x = [], se = (g, H) => {
|
|
3318
|
+
const T = window.setTimeout(g, H);
|
|
3319
|
+
return x.push(T), T;
|
|
3302
3320
|
};
|
|
3303
|
-
return
|
|
3321
|
+
return k.current = s, s.onChartReady(async () => {
|
|
3304
3322
|
i === "dark" || i === "system" ? (s.applyOverrides({
|
|
3305
3323
|
//chart background
|
|
3306
3324
|
"paneProperties.background": "#000000",
|
|
@@ -3322,11 +3340,11 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3322
3340
|
"--tv-color-platform-background",
|
|
3323
3341
|
"#f9fafb"
|
|
3324
3342
|
));
|
|
3325
|
-
const
|
|
3326
|
-
if (!
|
|
3327
|
-
const
|
|
3328
|
-
await
|
|
3329
|
-
{ time:
|
|
3343
|
+
const g = s.activeChart();
|
|
3344
|
+
if (!g) return;
|
|
3345
|
+
const H = async (R, j) => {
|
|
3346
|
+
await g.createShape(
|
|
3347
|
+
{ time: j },
|
|
3330
3348
|
{
|
|
3331
3349
|
shape: "vertical_line",
|
|
3332
3350
|
lock: !0,
|
|
@@ -3334,44 +3352,44 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3334
3352
|
overrides: { linestyle: 2, linewidth: 1 }
|
|
3335
3353
|
}
|
|
3336
3354
|
);
|
|
3337
|
-
const
|
|
3338
|
-
let
|
|
3339
|
-
if (
|
|
3340
|
-
const
|
|
3341
|
-
(
|
|
3355
|
+
const I = await g.exportData(), U = I.data.findIndex((N) => N[0] === j);
|
|
3356
|
+
let B = a;
|
|
3357
|
+
if (U != -1 && !B && (B = [...hn].sort((N, V) => V - N).find((N) => I.data[U + N]) ?? null), U != -1 && B) {
|
|
3358
|
+
const N = R, V = I.data[U + B][0], $ = I.data.filter(
|
|
3359
|
+
(ae) => ae[0] > N && ae[0] <= V
|
|
3342
3360
|
) ?? [];
|
|
3343
|
-
let
|
|
3344
|
-
if (
|
|
3345
|
-
const
|
|
3346
|
-
(
|
|
3361
|
+
let re = null, pe = null;
|
|
3362
|
+
if ($.length > 0) {
|
|
3363
|
+
const ae = $.reduce(
|
|
3364
|
+
(K, Q, ce, P) => Number(Q[3]) < Number(P[K][3]) ? ce : K,
|
|
3347
3365
|
0
|
|
3348
|
-
),
|
|
3349
|
-
|
|
3350
|
-
time:
|
|
3351
|
-
value: Number(
|
|
3366
|
+
), de = $[ae];
|
|
3367
|
+
pe = {
|
|
3368
|
+
time: de[0],
|
|
3369
|
+
value: Number(de[3])
|
|
3352
3370
|
};
|
|
3353
3371
|
}
|
|
3354
|
-
if (
|
|
3355
|
-
const
|
|
3356
|
-
(
|
|
3372
|
+
if ($.length > 0) {
|
|
3373
|
+
const ae = $.reduce(
|
|
3374
|
+
(K, Q, ce, P) => Number(Q[2]) > Number(P[K][2]) ? ce : K,
|
|
3357
3375
|
0
|
|
3358
|
-
),
|
|
3359
|
-
|
|
3360
|
-
time:
|
|
3361
|
-
value: Number(
|
|
3376
|
+
), de = $[ae];
|
|
3377
|
+
re = {
|
|
3378
|
+
time: de[0],
|
|
3379
|
+
value: Number(de[2])
|
|
3362
3380
|
};
|
|
3363
3381
|
}
|
|
3364
|
-
if (
|
|
3365
|
-
const
|
|
3366
|
-
await
|
|
3382
|
+
if (re && pe && $.length > 0) {
|
|
3383
|
+
const ae = re.value, de = pe.value, Q = I.data[U + 1][1];
|
|
3384
|
+
await g.createMultipointShape(
|
|
3367
3385
|
[
|
|
3368
3386
|
{
|
|
3369
|
-
time:
|
|
3370
|
-
price:
|
|
3387
|
+
time: N,
|
|
3388
|
+
price: Q
|
|
3371
3389
|
},
|
|
3372
3390
|
{
|
|
3373
|
-
time:
|
|
3374
|
-
price:
|
|
3391
|
+
time: V,
|
|
3392
|
+
price: ae
|
|
3375
3393
|
}
|
|
3376
3394
|
],
|
|
3377
3395
|
{
|
|
@@ -3390,15 +3408,15 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3390
3408
|
frozen: !0
|
|
3391
3409
|
}
|
|
3392
3410
|
}
|
|
3393
|
-
), await
|
|
3411
|
+
), await g.createMultipointShape(
|
|
3394
3412
|
[
|
|
3395
3413
|
{
|
|
3396
|
-
time:
|
|
3397
|
-
price:
|
|
3414
|
+
time: N,
|
|
3415
|
+
price: de
|
|
3398
3416
|
},
|
|
3399
3417
|
{
|
|
3400
|
-
time:
|
|
3401
|
-
price:
|
|
3418
|
+
time: V,
|
|
3419
|
+
price: Q
|
|
3402
3420
|
}
|
|
3403
3421
|
],
|
|
3404
3422
|
{
|
|
@@ -3416,15 +3434,15 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3416
3434
|
frozen: !0
|
|
3417
3435
|
}
|
|
3418
3436
|
}
|
|
3419
|
-
), await
|
|
3437
|
+
), await g.createMultipointShape(
|
|
3420
3438
|
[
|
|
3421
3439
|
{
|
|
3422
|
-
time:
|
|
3423
|
-
price:
|
|
3440
|
+
time: N,
|
|
3441
|
+
price: ae
|
|
3424
3442
|
},
|
|
3425
3443
|
{
|
|
3426
|
-
time:
|
|
3427
|
-
price:
|
|
3444
|
+
time: V,
|
|
3445
|
+
price: ae
|
|
3428
3446
|
}
|
|
3429
3447
|
],
|
|
3430
3448
|
{
|
|
@@ -3437,15 +3455,15 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3437
3455
|
extendRight: !0
|
|
3438
3456
|
}
|
|
3439
3457
|
}
|
|
3440
|
-
), await
|
|
3458
|
+
), await g.createMultipointShape(
|
|
3441
3459
|
[
|
|
3442
3460
|
{
|
|
3443
|
-
time:
|
|
3444
|
-
price:
|
|
3461
|
+
time: N,
|
|
3462
|
+
price: de
|
|
3445
3463
|
},
|
|
3446
3464
|
{
|
|
3447
|
-
time:
|
|
3448
|
-
price:
|
|
3465
|
+
time: V,
|
|
3466
|
+
price: de
|
|
3449
3467
|
}
|
|
3450
3468
|
],
|
|
3451
3469
|
{
|
|
@@ -3459,26 +3477,26 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3459
3477
|
}
|
|
3460
3478
|
}
|
|
3461
3479
|
);
|
|
3462
|
-
const
|
|
3463
|
-
(
|
|
3480
|
+
const ce = Tr.find(
|
|
3481
|
+
(he) => jt(he.name) == jt(d)
|
|
3464
3482
|
)?.pipLocation;
|
|
3465
|
-
let
|
|
3466
|
-
if (
|
|
3467
|
-
const
|
|
3468
|
-
Math.abs((
|
|
3483
|
+
let P = "", z = "";
|
|
3484
|
+
if (ce) {
|
|
3485
|
+
const he = Math.pow(10, -ce), pt = parseFloat(
|
|
3486
|
+
Math.abs((ae - Q) * he).toFixed(
|
|
3469
3487
|
1
|
|
3470
3488
|
)
|
|
3471
3489
|
), ft = parseFloat(
|
|
3472
|
-
Math.abs((
|
|
3490
|
+
Math.abs((de - Q) * he).toFixed(
|
|
3473
3491
|
1
|
|
3474
3492
|
)
|
|
3475
3493
|
);
|
|
3476
|
-
|
|
3494
|
+
P = `${pt >= 0 ? "+" : ""}${pt.toFixed(2)} pip`, z = `${ft >= 0 ? "-" : ""}${ft.toFixed(2)} pip`;
|
|
3477
3495
|
}
|
|
3478
|
-
await
|
|
3496
|
+
await g.createShape(
|
|
3479
3497
|
{
|
|
3480
|
-
time:
|
|
3481
|
-
price:
|
|
3498
|
+
time: re.time,
|
|
3499
|
+
price: re.value
|
|
3482
3500
|
},
|
|
3483
3501
|
{
|
|
3484
3502
|
shape: "arrow_down",
|
|
@@ -3486,14 +3504,14 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3486
3504
|
arrowColor: "#12B76A",
|
|
3487
3505
|
fontsize: 11,
|
|
3488
3506
|
color: "#12B76A",
|
|
3489
|
-
text:
|
|
3507
|
+
text: P,
|
|
3490
3508
|
bold: !0
|
|
3491
3509
|
}
|
|
3492
3510
|
}
|
|
3493
|
-
), await
|
|
3511
|
+
), await g.createShape(
|
|
3494
3512
|
{
|
|
3495
|
-
time:
|
|
3496
|
-
price:
|
|
3513
|
+
time: pe.time,
|
|
3514
|
+
price: pe.value
|
|
3497
3515
|
},
|
|
3498
3516
|
{
|
|
3499
3517
|
shape: "arrow_up",
|
|
@@ -3501,19 +3519,19 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3501
3519
|
arrowColor: "#D92D20",
|
|
3502
3520
|
fontsize: 11,
|
|
3503
3521
|
color: "#D92D20",
|
|
3504
|
-
text:
|
|
3522
|
+
text: z,
|
|
3505
3523
|
bold: !0
|
|
3506
3524
|
}
|
|
3507
3525
|
}
|
|
3508
3526
|
);
|
|
3509
|
-
const
|
|
3510
|
-
await
|
|
3527
|
+
const ee = Math.floor((N + V) / 2);
|
|
3528
|
+
await g.createShape(
|
|
3511
3529
|
{
|
|
3512
|
-
time:
|
|
3530
|
+
time: ee
|
|
3513
3531
|
},
|
|
3514
3532
|
{
|
|
3515
3533
|
shape: "text",
|
|
3516
|
-
text: `${
|
|
3534
|
+
text: `${B} candles`,
|
|
3517
3535
|
zOrder: "top",
|
|
3518
3536
|
overrides: {
|
|
3519
3537
|
fontsize: 12,
|
|
@@ -3525,20 +3543,20 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3525
3543
|
);
|
|
3526
3544
|
}
|
|
3527
3545
|
}
|
|
3528
|
-
if (
|
|
3529
|
-
from:
|
|
3530
|
-
to:
|
|
3546
|
+
if (I && I.data.length > 0 && I.data[0][0] >= I.data[I.data.length - 1][0] && await g.setVisibleRange({
|
|
3547
|
+
from: I.data[0][0],
|
|
3548
|
+
to: I.data[I.data.length - 1][0]
|
|
3531
3549
|
}), _ && r) {
|
|
3532
|
-
const
|
|
3533
|
-
|
|
3550
|
+
const N = Math.floor(Date.now() / 1e3), V = j, $ = g.resolution(), re = 3600 * 24 * 7;
|
|
3551
|
+
N - re >= V + re && await g.setVisibleRange(
|
|
3534
3552
|
{
|
|
3535
|
-
from:
|
|
3536
|
-
to:
|
|
3553
|
+
from: N - re,
|
|
3554
|
+
to: V + re
|
|
3537
3555
|
},
|
|
3538
3556
|
{ applyDefaultRightMargin: !0, percentRightMargin: 50 }
|
|
3539
3557
|
), se(() => {
|
|
3540
|
-
|
|
3541
|
-
{ time:
|
|
3558
|
+
F || k.current !== s || Number($) <= 30 && g.createShape(
|
|
3559
|
+
{ time: V },
|
|
3542
3560
|
{
|
|
3543
3561
|
shape: "vertical_line",
|
|
3544
3562
|
lock: !0,
|
|
@@ -3548,63 +3566,63 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3548
3566
|
);
|
|
3549
3567
|
}, 2e3);
|
|
3550
3568
|
}
|
|
3551
|
-
},
|
|
3552
|
-
if (
|
|
3553
|
-
const
|
|
3554
|
-
if (
|
|
3555
|
-
|
|
3556
|
-
const
|
|
3557
|
-
|
|
3558
|
-
const
|
|
3559
|
-
|
|
3560
|
-
{ from:
|
|
3569
|
+
}, T = async () => {
|
|
3570
|
+
if (F || k.current !== s) return;
|
|
3571
|
+
const R = await D();
|
|
3572
|
+
if (F || k.current !== s) return;
|
|
3573
|
+
O();
|
|
3574
|
+
const j = (R?.event?.timestamp ?? 0) / 1e3, I = tt(l), U = j - j % I;
|
|
3575
|
+
g.getVisibleBarsRange() || await new Promise((V) => setTimeout(V, 2e3));
|
|
3576
|
+
const N = g.getVisibleBarsRange();
|
|
3577
|
+
N && N.from <= j && j <= N.to ? await H(j, U) : (_ || await g.setVisibleRange(
|
|
3578
|
+
{ from: j },
|
|
3561
3579
|
{ applyDefaultRightMargin: !0, percentRightMargin: 50 }
|
|
3562
|
-
), await
|
|
3580
|
+
), await H(j, U));
|
|
3563
3581
|
}, u = () => {
|
|
3564
3582
|
se(() => {
|
|
3565
|
-
|
|
3583
|
+
F || k.current !== s || d == g.symbol() || (async () => {
|
|
3566
3584
|
try {
|
|
3567
|
-
|
|
3585
|
+
L(0), J(!1), Z(null), w.current?.contentWindow?.postMessage(
|
|
3568
3586
|
{ action: "handleClose" },
|
|
3569
3587
|
"*"
|
|
3570
|
-
),
|
|
3571
|
-
} catch (
|
|
3572
|
-
console.log("error=>",
|
|
3588
|
+
), Y(g.symbol());
|
|
3589
|
+
} catch (R) {
|
|
3590
|
+
console.log("error=>", R);
|
|
3573
3591
|
}
|
|
3574
3592
|
})();
|
|
3575
3593
|
}, 300);
|
|
3576
|
-
},
|
|
3594
|
+
}, y = (R) => {
|
|
3577
3595
|
se(() => {
|
|
3578
|
-
|
|
3596
|
+
F || k.current !== s || l == R || (async () => {
|
|
3579
3597
|
try {
|
|
3580
|
-
|
|
3598
|
+
L(0), J(!1), Z(null), w.current?.contentWindow?.postMessage(
|
|
3581
3599
|
{ action: "handleClose" },
|
|
3582
3600
|
"*"
|
|
3583
|
-
),
|
|
3584
|
-
} catch (
|
|
3585
|
-
console.log("error=>",
|
|
3601
|
+
), ne(R);
|
|
3602
|
+
} catch (j) {
|
|
3603
|
+
console.log("error=>", j);
|
|
3586
3604
|
}
|
|
3587
3605
|
})();
|
|
3588
3606
|
}, 300);
|
|
3589
3607
|
};
|
|
3590
|
-
|
|
3608
|
+
g.onSymbolChanged().subscribe(null, u), g.onIntervalChanged().subscribe(null, y);
|
|
3591
3609
|
try {
|
|
3592
|
-
|
|
3593
|
-
} catch (
|
|
3594
|
-
console.log("error=>",
|
|
3610
|
+
C || await T();
|
|
3611
|
+
} catch (R) {
|
|
3612
|
+
console.log("error=>", R);
|
|
3595
3613
|
}
|
|
3596
|
-
|
|
3614
|
+
F && (() => {
|
|
3597
3615
|
try {
|
|
3598
|
-
|
|
3616
|
+
g.onSymbolChanged().unsubscribe(null, u);
|
|
3599
3617
|
} catch {
|
|
3600
3618
|
}
|
|
3601
3619
|
try {
|
|
3602
|
-
|
|
3620
|
+
g.onIntervalChanged().unsubscribe(null, y);
|
|
3603
3621
|
} catch {
|
|
3604
3622
|
}
|
|
3605
3623
|
})();
|
|
3606
3624
|
}), () => {
|
|
3607
|
-
|
|
3625
|
+
F = !0, x.forEach((g) => window.clearTimeout(g)), O(), k.current === s && (k.current = null);
|
|
3608
3626
|
};
|
|
3609
3627
|
}, [
|
|
3610
3628
|
i,
|
|
@@ -3616,84 +3634,89 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3616
3634
|
r,
|
|
3617
3635
|
t,
|
|
3618
3636
|
l,
|
|
3619
|
-
|
|
3637
|
+
ne,
|
|
3620
3638
|
d,
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3639
|
+
Y,
|
|
3640
|
+
C,
|
|
3641
|
+
q,
|
|
3624
3642
|
Z,
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3643
|
+
X,
|
|
3644
|
+
W,
|
|
3645
|
+
L,
|
|
3646
|
+
J,
|
|
3629
3647
|
w
|
|
3630
|
-
]),
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
s.
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
const N = L[L.length - 1], u = {
|
|
3647
|
-
o: N[1],
|
|
3648
|
-
h: N[2],
|
|
3649
|
-
l: N[3],
|
|
3650
|
-
c: N[4],
|
|
3651
|
-
timestamp: N[0] * 1e3
|
|
3652
|
-
}, g = A.resolution(), U = ye(g) * 1e3, E = u.timestamp, Y = r?.timestamp ?? 0, H = Math.floor(Y / U) * U, S = ut.find(
|
|
3653
|
-
(I) => I.ticker === d || I.display_name === d
|
|
3654
|
-
)?.session || "24x7", z = Lr(
|
|
3655
|
-
E,
|
|
3656
|
-
H,
|
|
3657
|
-
g,
|
|
3658
|
-
S
|
|
3659
|
-
), v = L.slice(-50).map((I) => ({
|
|
3660
|
-
o: I[1],
|
|
3661
|
-
h: I[2],
|
|
3662
|
-
l: I[3],
|
|
3663
|
-
c: I[4],
|
|
3664
|
-
timestamp: I[0] * 1e3
|
|
3648
|
+
]), me(() => {
|
|
3649
|
+
if (s) {
|
|
3650
|
+
if (t == "" || C) return;
|
|
3651
|
+
s.onChartReady(async () => {
|
|
3652
|
+
const O = s?.activeChart();
|
|
3653
|
+
ne(O.resolution()), s.resetCache(), O.resetData(), O && O.onDataLoaded().subscribe(
|
|
3654
|
+
null,
|
|
3655
|
+
async () => {
|
|
3656
|
+
const { data: D } = await O.exportData(), F = tt(l), x = (r?.timestamp ?? 0) / 1e3, se = x - x % F, g = D.findIndex(
|
|
3657
|
+
(T) => T[0] === se
|
|
3658
|
+
), H = D.slice(g - 49, g + 1).map((T) => ({
|
|
3659
|
+
o: T[1],
|
|
3660
|
+
h: T[2],
|
|
3661
|
+
l: T[3],
|
|
3662
|
+
c: T[4],
|
|
3663
|
+
timestamp: T[0] * 1e3
|
|
3665
3664
|
}));
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3665
|
+
if (_) {
|
|
3666
|
+
const T = D[D.length - 1], u = {
|
|
3667
|
+
o: T[1],
|
|
3668
|
+
h: T[2],
|
|
3669
|
+
l: T[3],
|
|
3670
|
+
c: T[4],
|
|
3671
|
+
timestamp: T[0] * 1e3
|
|
3672
|
+
}, y = O.resolution(), A = ge(y) * 1e3, R = u.timestamp, j = r?.timestamp ?? 0, I = Math.floor(j / A) * A, U = ut.find(
|
|
3673
|
+
($) => $.ticker === d || $.display_name === d
|
|
3674
|
+
)?.session || "24x7", B = Lr(
|
|
3675
|
+
R,
|
|
3676
|
+
I,
|
|
3677
|
+
y,
|
|
3678
|
+
U
|
|
3679
|
+
), N = D.slice(-50).map(($) => ({
|
|
3680
|
+
o: $[1],
|
|
3681
|
+
h: $[2],
|
|
3682
|
+
l: $[3],
|
|
3683
|
+
c: $[4],
|
|
3684
|
+
timestamp: $[0] * 1e3
|
|
3685
|
+
}));
|
|
3686
|
+
X(B), W(N);
|
|
3687
|
+
const V = { newsTargetCandle: N, gapCount: B };
|
|
3688
|
+
S.current = V, G.current && (w.current?.contentWindow?.postMessage(
|
|
3689
|
+
S.current,
|
|
3690
|
+
"*"
|
|
3691
|
+
), S.current = null);
|
|
3692
|
+
} else {
|
|
3693
|
+
W(H), X(0);
|
|
3694
|
+
const T = {
|
|
3695
|
+
newsTargetCandle: H,
|
|
3696
|
+
gapCount: 0
|
|
3697
|
+
};
|
|
3698
|
+
S.current = T, G.current && (w.current?.contentWindow?.postMessage(
|
|
3699
|
+
S.current,
|
|
3700
|
+
"*"
|
|
3701
|
+
), S.current = null);
|
|
3702
|
+
}
|
|
3703
|
+
},
|
|
3704
|
+
!0
|
|
3705
|
+
);
|
|
3706
|
+
});
|
|
3707
|
+
}
|
|
3687
3708
|
}, [
|
|
3688
3709
|
t,
|
|
3689
3710
|
r?.timestamp,
|
|
3690
|
-
|
|
3691
|
-
|
|
3711
|
+
W,
|
|
3712
|
+
ne,
|
|
3713
|
+
X,
|
|
3692
3714
|
l,
|
|
3693
3715
|
_,
|
|
3716
|
+
C,
|
|
3694
3717
|
d,
|
|
3695
3718
|
s,
|
|
3696
|
-
|
|
3719
|
+
S
|
|
3697
3720
|
]), /* @__PURE__ */ m.jsx("div", { className: "news-widget_detail_page__container", children: /* @__PURE__ */ m.jsxs("div", { className: "news-widget_detail_page__right_border", children: [
|
|
3698
3721
|
/* @__PURE__ */ m.jsx("div", { className: "news-widget_detail_page__title_container", children: /* @__PURE__ */ m.jsxs("div", { className: "news-widget_detail_page__title_padding", children: [
|
|
3699
3722
|
/* @__PURE__ */ m.jsx(
|
|
@@ -3701,7 +3724,7 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3701
3724
|
{
|
|
3702
3725
|
type: "button",
|
|
3703
3726
|
className: "news-widget__button news-widget__button--ghost news-widget__button--icon news-widget_detail_page__back_button",
|
|
3704
|
-
onClick:
|
|
3727
|
+
onClick: E,
|
|
3705
3728
|
children: /* @__PURE__ */ m.jsx(gr, { className: "news-widget_detail_page__back_icon" })
|
|
3706
3729
|
}
|
|
3707
3730
|
),
|
|
@@ -3714,16 +3737,17 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3714
3737
|
{
|
|
3715
3738
|
replayTabId: t || "news",
|
|
3716
3739
|
futureBarsRef: h,
|
|
3717
|
-
highlightBarsRef:
|
|
3740
|
+
highlightBarsRef: v,
|
|
3718
3741
|
pushBar: p,
|
|
3719
|
-
tvWidgetRef:
|
|
3742
|
+
tvWidgetRef: k,
|
|
3720
3743
|
resolution: l || "15",
|
|
3721
|
-
symbol: d
|
|
3744
|
+
symbol: d,
|
|
3745
|
+
resolvedTheme: i
|
|
3722
3746
|
}
|
|
3723
3747
|
)
|
|
3724
3748
|
] }) })
|
|
3725
3749
|
] }) });
|
|
3726
|
-
},
|
|
3750
|
+
}, Ue = "https://widget-result-news.iccandle.ai", Mt = "https://corprate-widget.iccandle.ai/news", kr = ({
|
|
3727
3751
|
chartWidget: e,
|
|
3728
3752
|
children: t,
|
|
3729
3753
|
widgetKey: n,
|
|
@@ -3732,195 +3756,195 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3732
3756
|
chartInterval: i = "15",
|
|
3733
3757
|
theme: o,
|
|
3734
3758
|
symbolMapper: a,
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3759
|
+
analyzeCallback: f,
|
|
3760
|
+
pushBar: d,
|
|
3761
|
+
futureRef: l,
|
|
3762
|
+
highlightBarsRef: _,
|
|
3763
|
+
setGapCountExternal: C,
|
|
3764
|
+
setReplayModeExternal: E
|
|
3741
3765
|
}) => {
|
|
3742
|
-
const { start:
|
|
3766
|
+
const { start: p } = An(), [w, h] = le(""), [S, G] = le(i), [v, L] = le(r), [J, k] = le(i), [Y, ne] = le(r), [W, X] = le(null), [q, Z] = le(
|
|
3743
3767
|
null
|
|
3744
|
-
),
|
|
3745
|
-
setNewsSelectedCandles:
|
|
3746
|
-
setNewsPlayEndTimestamp:
|
|
3747
|
-
newsTargetCandle:
|
|
3748
|
-
gapCount:
|
|
3749
|
-
} =
|
|
3750
|
-
|
|
3751
|
-
if (
|
|
3752
|
-
if (
|
|
3753
|
-
|
|
3768
|
+
), O = fe(null), D = fe(!1), {
|
|
3769
|
+
setNewsSelectedCandles: F,
|
|
3770
|
+
setNewsPlayEndTimestamp: x,
|
|
3771
|
+
newsTargetCandle: se,
|
|
3772
|
+
gapCount: g
|
|
3773
|
+
} = be(), H = fe(null), T = cr[S] || "M15", u = tt("60"), y = q?.[0]?.timestamp ? q?.[0]?.timestamp / 1e3 : 0, A = y - y % u, R = q?.[0]?.candleData.H1?.candles, j = R?.findIndex((K) => K.timestamp === A) || 0, U = (R?.length || 0) - j <= 10, B = "next_pip_up_10" in (q?.[0]?.candleData[T]?.metadata ?? {}), N = !!w && !B, V = fe(N), $ = fe(!1);
|
|
3774
|
+
me(() => {
|
|
3775
|
+
if (N !== V.current) {
|
|
3776
|
+
if (V.current = N, $.current) {
|
|
3777
|
+
$.current = !1;
|
|
3754
3778
|
return;
|
|
3755
3779
|
}
|
|
3756
|
-
|
|
3780
|
+
p();
|
|
3757
3781
|
}
|
|
3758
|
-
}, [
|
|
3759
|
-
const
|
|
3760
|
-
const { data:
|
|
3782
|
+
}, [N, p]), me(() => {
|
|
3783
|
+
const K = async (P) => {
|
|
3784
|
+
const { data: z, status: ee } = await M.get(
|
|
3761
3785
|
`${Mt}/${P}`,
|
|
3762
3786
|
{
|
|
3763
3787
|
headers: { "api-key": n },
|
|
3764
3788
|
params: { symbol: r }
|
|
3765
3789
|
}
|
|
3766
3790
|
);
|
|
3767
|
-
return
|
|
3768
|
-
},
|
|
3769
|
-
const { data:
|
|
3791
|
+
return ee !== 200 ? (console.error("Failed to fetch news detail"), null) : z;
|
|
3792
|
+
}, Q = async (P) => {
|
|
3793
|
+
const { data: z, status: ee } = await M.get(
|
|
3770
3794
|
`${Mt}/similar-details`,
|
|
3771
3795
|
{
|
|
3772
3796
|
headers: { "api-key": n },
|
|
3773
3797
|
params: { event_id: P }
|
|
3774
3798
|
}
|
|
3775
3799
|
);
|
|
3776
|
-
return
|
|
3800
|
+
return ee !== 200 ? (console.error("Failed to fetch compared news"), null) : z;
|
|
3777
3801
|
};
|
|
3778
3802
|
(async () => {
|
|
3779
|
-
if (
|
|
3780
|
-
const [P,
|
|
3781
|
-
|
|
3782
|
-
|
|
3803
|
+
if (w === "") return;
|
|
3804
|
+
const [P, z] = await Promise.all([
|
|
3805
|
+
K(w),
|
|
3806
|
+
Q(w)
|
|
3783
3807
|
]);
|
|
3784
|
-
P &&
|
|
3808
|
+
P && X(P), z && Z(z);
|
|
3785
3809
|
})();
|
|
3786
|
-
}, [n,
|
|
3787
|
-
const
|
|
3788
|
-
|
|
3810
|
+
}, [n, w, r]);
|
|
3811
|
+
const re = Me(() => {
|
|
3812
|
+
E(!1), C(0), F(null), x(null);
|
|
3789
3813
|
}, [
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
]),
|
|
3795
|
-
|
|
3796
|
-
}, [r,
|
|
3797
|
-
|
|
3798
|
-
const
|
|
3799
|
-
if (
|
|
3800
|
-
const P = JSON.parse(
|
|
3814
|
+
E,
|
|
3815
|
+
C,
|
|
3816
|
+
F,
|
|
3817
|
+
x
|
|
3818
|
+
]), pe = Me(() => {
|
|
3819
|
+
h(""), L(r), re();
|
|
3820
|
+
}, [r, re]);
|
|
3821
|
+
me(() => {
|
|
3822
|
+
const K = async ({ origin: Q, data: ce }) => {
|
|
3823
|
+
if (Q !== Ue || typeof ce != "string") return;
|
|
3824
|
+
const P = JSON.parse(ce);
|
|
3801
3825
|
if (P.action == "back")
|
|
3802
|
-
|
|
3826
|
+
pe();
|
|
3803
3827
|
else if (P.action == "back-to-similar-events")
|
|
3804
|
-
|
|
3828
|
+
re();
|
|
3805
3829
|
else if (P.action == "eventClicked") {
|
|
3806
|
-
|
|
3807
|
-
const
|
|
3808
|
-
await e?.headerReady(),
|
|
3830
|
+
$.current = !0, p();
|
|
3831
|
+
const ee = P.data.event, he = e?.activeChart();
|
|
3832
|
+
await e?.headerReady(), he?.clearMarks(2), localStorage.setItem(
|
|
3809
3833
|
"iccandle:current-news-event",
|
|
3810
3834
|
JSON.stringify({
|
|
3811
|
-
actual:
|
|
3812
|
-
event_name:
|
|
3813
|
-
forecast:
|
|
3814
|
-
id:
|
|
3815
|
-
metric:
|
|
3816
|
-
previous:
|
|
3817
|
-
timestamp:
|
|
3818
|
-
currency:
|
|
3835
|
+
actual: ee.actual,
|
|
3836
|
+
event_name: ee.event_name,
|
|
3837
|
+
forecast: ee.forecast,
|
|
3838
|
+
id: ee.id,
|
|
3839
|
+
metric: ee.metric,
|
|
3840
|
+
previous: ee.previous,
|
|
3841
|
+
timestamp: ee.timestamp,
|
|
3842
|
+
currency: ee.currency
|
|
3819
3843
|
})
|
|
3820
|
-
),
|
|
3844
|
+
), he?.refreshMarks(), k(S), ne(v), h(ee.id);
|
|
3821
3845
|
} else if (P.action == "intervalChanged" || P.action == "symbolChanged") {
|
|
3822
|
-
const
|
|
3823
|
-
if (
|
|
3824
|
-
|
|
3825
|
-
const
|
|
3826
|
-
(
|
|
3846
|
+
const z = P.data;
|
|
3847
|
+
if (z.type === 2) return;
|
|
3848
|
+
z.resolution && G(z.resolution);
|
|
3849
|
+
const ee = ut.find(
|
|
3850
|
+
(he) => he.display_name == z.symbol || he.ticker == z.symbol
|
|
3827
3851
|
)?.ticker || "XAU_USD";
|
|
3828
|
-
|
|
3852
|
+
L(ee);
|
|
3829
3853
|
} else if (P.action == "replay") {
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3854
|
+
if (B) return;
|
|
3855
|
+
const z = P.data;
|
|
3856
|
+
E(z.isReplay), C(g), F(z.selectedCandles), x(
|
|
3857
|
+
se?.[se.length - 1]?.timestamp ?? null
|
|
3833
3858
|
);
|
|
3834
|
-
} else P.action == "iframe-ready"
|
|
3835
|
-
|
|
3859
|
+
} else P.action == "iframe-ready" ? (D.current = !0, O.current?.contentWindow?.postMessage(
|
|
3860
|
+
H.current,
|
|
3836
3861
|
"*"
|
|
3837
|
-
),
|
|
3862
|
+
), H.current = null) : P.action == "analyze" && f();
|
|
3838
3863
|
};
|
|
3839
|
-
return window.addEventListener("message",
|
|
3864
|
+
return window.addEventListener("message", K), () => window.removeEventListener("message", K);
|
|
3840
3865
|
}, [
|
|
3841
|
-
|
|
3866
|
+
B,
|
|
3842
3867
|
se,
|
|
3868
|
+
g,
|
|
3843
3869
|
e,
|
|
3844
3870
|
r,
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3871
|
+
p,
|
|
3872
|
+
re,
|
|
3873
|
+
pe,
|
|
3848
3874
|
a,
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3875
|
+
H,
|
|
3876
|
+
k,
|
|
3877
|
+
ne,
|
|
3878
|
+
v,
|
|
3879
|
+
S,
|
|
3880
|
+
E,
|
|
3881
|
+
C,
|
|
3882
|
+
x,
|
|
3854
3883
|
F,
|
|
3855
|
-
|
|
3856
|
-
b,
|
|
3857
|
-
_,
|
|
3858
|
-
V,
|
|
3859
|
-
L
|
|
3860
|
-
// setNewsPlayEndTimestampExternal,
|
|
3884
|
+
f
|
|
3861
3885
|
]);
|
|
3862
|
-
const
|
|
3863
|
-
const
|
|
3864
|
-
return
|
|
3865
|
-
`next_pip_up_${
|
|
3866
|
-
`next_pip_down_${
|
|
3886
|
+
const ae = Ne(() => {
|
|
3887
|
+
const K = q?.[0]?.candleData?.[T]?.metadata;
|
|
3888
|
+
return K ? [...hn].sort((Q, ce) => ce - Q).find((Q) => [
|
|
3889
|
+
`next_pip_up_${Q}`,
|
|
3890
|
+
`next_pip_down_${Q}`
|
|
3867
3891
|
].some(
|
|
3868
|
-
(P) =>
|
|
3892
|
+
(P) => K[P] !== void 0
|
|
3869
3893
|
)) ?? null : null;
|
|
3870
|
-
}, [
|
|
3871
|
-
|
|
3872
|
-
const
|
|
3873
|
-
|
|
3894
|
+
}, [q, T]);
|
|
3895
|
+
me(() => {
|
|
3896
|
+
const K = () => {
|
|
3897
|
+
pe();
|
|
3874
3898
|
};
|
|
3875
|
-
return window.addEventListener("popstate",
|
|
3876
|
-
}, [
|
|
3877
|
-
const
|
|
3878
|
-
|
|
3899
|
+
return window.addEventListener("popstate", K), () => window.removeEventListener("popstate", K);
|
|
3900
|
+
}, [pe]);
|
|
3901
|
+
const de = Ne(() => w ? q ? B ? `${Ue}/${w}?apiKey=${n}&userId=${s}&theme=${o}&interval=${J}&symbol=${Y}` : `${Ue}/similar-events/${w}?apiKey=${n}&userId=${s}&theme=${o}` : `${Ue}?apiKey=${n}&userId=${s}&theme=${o}` : `${Ue}?apiKey=${n}&userId=${s}&theme=${o}`, [
|
|
3902
|
+
w,
|
|
3903
|
+
q,
|
|
3879
3904
|
B,
|
|
3880
|
-
S,
|
|
3881
3905
|
n,
|
|
3882
3906
|
o,
|
|
3883
3907
|
s,
|
|
3884
|
-
|
|
3885
|
-
|
|
3908
|
+
J,
|
|
3909
|
+
Y
|
|
3886
3910
|
]);
|
|
3887
3911
|
return /* @__PURE__ */ m.jsxs("div", { className: "news-widget_main__container news-widget_main__container--lg", children: [
|
|
3888
3912
|
/* @__PURE__ */ m.jsx(
|
|
3889
3913
|
"div",
|
|
3890
3914
|
{
|
|
3891
3915
|
className: "news-widget_main__left",
|
|
3892
|
-
style: { display:
|
|
3916
|
+
style: { display: w && !B ? "flex" : "none" },
|
|
3893
3917
|
children: /* @__PURE__ */ m.jsx(
|
|
3894
3918
|
dr,
|
|
3895
3919
|
{
|
|
3896
|
-
selectedTimeframe:
|
|
3897
|
-
setSelectedTimeframe:
|
|
3898
|
-
currentSymbol:
|
|
3899
|
-
setCurrentSymbol:
|
|
3920
|
+
selectedTimeframe: S,
|
|
3921
|
+
setSelectedTimeframe: G,
|
|
3922
|
+
currentSymbol: v,
|
|
3923
|
+
setCurrentSymbol: L,
|
|
3900
3924
|
children: /* @__PURE__ */ m.jsx(
|
|
3901
3925
|
Or,
|
|
3902
3926
|
{
|
|
3903
|
-
eventId:
|
|
3927
|
+
eventId: w,
|
|
3904
3928
|
chartWidget: e,
|
|
3905
3929
|
widgetKey: n,
|
|
3906
3930
|
theme: o,
|
|
3907
3931
|
defaultSymbol: r,
|
|
3908
|
-
newsDetail:
|
|
3909
|
-
isUpcoming:
|
|
3910
|
-
event:
|
|
3911
|
-
selectedCandles:
|
|
3912
|
-
currentTimeFrame:
|
|
3913
|
-
currentSymbol:
|
|
3914
|
-
onBack:
|
|
3915
|
-
isElapsed:
|
|
3916
|
-
iframeRef:
|
|
3917
|
-
pendingMessageRef:
|
|
3918
|
-
iframeReadyToListenRef:
|
|
3919
|
-
pushBar:
|
|
3920
|
-
futureRef:
|
|
3921
|
-
highlightBarsRef:
|
|
3922
|
-
setReplayModeExternal:
|
|
3923
|
-
setGapCountExternal:
|
|
3932
|
+
newsDetail: W,
|
|
3933
|
+
isUpcoming: U,
|
|
3934
|
+
event: W?.event,
|
|
3935
|
+
selectedCandles: ae,
|
|
3936
|
+
currentTimeFrame: S,
|
|
3937
|
+
currentSymbol: v,
|
|
3938
|
+
onBack: pe,
|
|
3939
|
+
isElapsed: B,
|
|
3940
|
+
iframeRef: O,
|
|
3941
|
+
pendingMessageRef: H,
|
|
3942
|
+
iframeReadyToListenRef: D,
|
|
3943
|
+
pushBar: d,
|
|
3944
|
+
futureRef: l,
|
|
3945
|
+
highlightBarsRef: _,
|
|
3946
|
+
setReplayModeExternal: E,
|
|
3947
|
+
setGapCountExternal: C,
|
|
3924
3948
|
children: t
|
|
3925
3949
|
}
|
|
3926
3950
|
)
|
|
@@ -3931,9 +3955,9 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3931
3955
|
/* @__PURE__ */ m.jsx(
|
|
3932
3956
|
"iframe",
|
|
3933
3957
|
{
|
|
3934
|
-
src:
|
|
3935
|
-
ref:
|
|
3936
|
-
className:
|
|
3958
|
+
src: de,
|
|
3959
|
+
ref: O,
|
|
3960
|
+
className: w && !B ? "news-widget_main__iframe_half" : "news-widget_main__iframe_full"
|
|
3937
3961
|
}
|
|
3938
3962
|
)
|
|
3939
3963
|
] });
|
|
@@ -3970,17 +3994,17 @@ const Br = async (e) => {
|
|
|
3970
3994
|
iccandle_primary_gradient_end: "--iccandle-primary-gradient-end"
|
|
3971
3995
|
};
|
|
3972
3996
|
function Yr(e, t) {
|
|
3973
|
-
const [n, s] =
|
|
3974
|
-
|
|
3997
|
+
const [n, s] = le(null);
|
|
3998
|
+
me(() => {
|
|
3975
3999
|
Br(e).then((d) => {
|
|
3976
4000
|
s(d);
|
|
3977
4001
|
});
|
|
3978
4002
|
}, [e]);
|
|
3979
|
-
const r =
|
|
4003
|
+
const r = fe(null), [i, o] = le(null), a = Ne(() => t === "system" ? window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : t, [t]), f = Ne(() => {
|
|
3980
4004
|
if (n)
|
|
3981
4005
|
return a === "dark" ? n.dark : n.light;
|
|
3982
4006
|
}, [n, a]);
|
|
3983
|
-
return
|
|
4007
|
+
return me(() => {
|
|
3984
4008
|
if (typeof window > "u" || !f || !i) return;
|
|
3985
4009
|
const d = i;
|
|
3986
4010
|
Object.keys(It).forEach(
|