@iccandle/news 0.0.4 → 0.0.6
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 +7 -7
- package/dist/news-widget.d.ts +1 -0
- package/dist/news-widget.js +1274 -1244
- package/package.json +1 -1
package/dist/news-widget.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
if (
|
|
7
|
-
|
|
2
|
+
import Ae, { createContext as It, useContext as $t, useState as ae, useRef as ue, useCallback as Me, useEffect as pe, useMemo as Ue, forwardRef as Gt, createElement as ze } from "react";
|
|
3
|
+
var ke = { exports: {} }, Re = {};
|
|
4
|
+
var ft;
|
|
5
|
+
function En() {
|
|
6
|
+
if (ft) return Re;
|
|
7
|
+
ft = 1;
|
|
8
8
|
var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
9
9
|
function n(s, r, i) {
|
|
10
10
|
var o = null;
|
|
@@ -21,50 +21,50 @@ function Rn() {
|
|
|
21
21
|
props: i
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
return
|
|
24
|
+
return Re.Fragment = t, Re.jsx = n, Re.jsxs = n, Re;
|
|
25
25
|
}
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
function
|
|
29
|
-
return
|
|
26
|
+
var Ee = {};
|
|
27
|
+
var mt;
|
|
28
|
+
function Sn() {
|
|
29
|
+
return mt || (mt = 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 === le ? 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 F:
|
|
39
39
|
return "Profiler";
|
|
40
|
-
case
|
|
40
|
+
case D:
|
|
41
41
|
return "StrictMode";
|
|
42
|
-
case V:
|
|
43
|
-
return "Suspense";
|
|
44
42
|
case O:
|
|
43
|
+
return "Suspense";
|
|
44
|
+
case J:
|
|
45
45
|
return "SuspenseList";
|
|
46
|
-
case
|
|
46
|
+
case B:
|
|
47
47
|
return "Activity";
|
|
48
48
|
}
|
|
49
49
|
if (typeof u == "object")
|
|
50
50
|
switch (typeof u.tag == "number" && console.error(
|
|
51
51
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
52
52
|
), u.$$typeof) {
|
|
53
|
-
case
|
|
53
|
+
case w:
|
|
54
54
|
return "Portal";
|
|
55
55
|
case j:
|
|
56
56
|
return u.displayName || "Context";
|
|
57
|
-
case
|
|
57
|
+
case T:
|
|
58
58
|
return (u._context.displayName || "Context") + ".Consumer";
|
|
59
|
-
case x:
|
|
60
|
-
var w = u.render;
|
|
61
|
-
return u = u.displayName, u || (u = w.displayName || w.name || "", u = u !== "" ? "ForwardRef(" + u + ")" : "ForwardRef"), u;
|
|
62
|
-
case k:
|
|
63
|
-
return w = u.displayName || null, w !== null ? w : e(u.type) || "Memo";
|
|
64
59
|
case M:
|
|
65
|
-
|
|
60
|
+
var g = u.render;
|
|
61
|
+
return u = u.displayName, u || (u = g.displayName || g.name || "", u = u !== "" ? "ForwardRef(" + u + ")" : "ForwardRef"), u;
|
|
62
|
+
case ce:
|
|
63
|
+
return g = u.displayName || null, g !== null ? g : e(u.type) || "Memo";
|
|
64
|
+
case k:
|
|
65
|
+
g = u._payload, u = u._init;
|
|
66
66
|
try {
|
|
67
|
-
return e(u(
|
|
67
|
+
return e(u(g));
|
|
68
68
|
} catch {
|
|
69
69
|
}
|
|
70
70
|
}
|
|
@@ -76,74 +76,74 @@ function bn() {
|
|
|
76
76
|
function n(u) {
|
|
77
77
|
try {
|
|
78
78
|
t(u);
|
|
79
|
-
var
|
|
79
|
+
var g = !1;
|
|
80
80
|
} catch {
|
|
81
|
-
|
|
81
|
+
g = !0;
|
|
82
82
|
}
|
|
83
|
-
if (
|
|
84
|
-
|
|
85
|
-
var
|
|
86
|
-
return
|
|
87
|
-
|
|
83
|
+
if (g) {
|
|
84
|
+
g = console;
|
|
85
|
+
var A = g.error, E = typeof Symbol == "function" && Symbol.toStringTag && u[Symbol.toStringTag] || u.constructor.name || "Object";
|
|
86
|
+
return A.call(
|
|
87
|
+
g,
|
|
88
88
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
89
|
-
|
|
89
|
+
E
|
|
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 === k)
|
|
96
96
|
return "<...>";
|
|
97
97
|
try {
|
|
98
|
-
var
|
|
99
|
-
return
|
|
98
|
+
var g = e(u);
|
|
99
|
+
return g ? "<" + g + ">" : "<...>";
|
|
100
100
|
} catch {
|
|
101
101
|
return "<...>";
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
function r() {
|
|
105
|
-
var u =
|
|
105
|
+
var u = Z.A;
|
|
106
106
|
return u === null ? null : u.getOwner();
|
|
107
107
|
}
|
|
108
108
|
function i() {
|
|
109
109
|
return Error("react-stack-top-frame");
|
|
110
110
|
}
|
|
111
111
|
function o(u) {
|
|
112
|
-
if (
|
|
113
|
-
var
|
|
114
|
-
if (
|
|
112
|
+
if (U.call(u, "key")) {
|
|
113
|
+
var g = Object.getOwnPropertyDescriptor(u, "key").get;
|
|
114
|
+
if (g && g.isReactWarning) return !1;
|
|
115
115
|
}
|
|
116
116
|
return u.key !== void 0;
|
|
117
117
|
}
|
|
118
|
-
function a(u,
|
|
119
|
-
function
|
|
120
|
-
|
|
118
|
+
function a(u, g) {
|
|
119
|
+
function A() {
|
|
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
|
+
g
|
|
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
|
}
|
|
130
|
-
function
|
|
130
|
+
function f() {
|
|
131
131
|
var u = e(this.type);
|
|
132
|
-
return
|
|
132
|
+
return se[u] || (se[u] = !0, console.error(
|
|
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, g, A, E, Y, H) {
|
|
137
|
+
var S = A.ref;
|
|
138
138
|
return u = {
|
|
139
|
-
$$typeof:
|
|
139
|
+
$$typeof: p,
|
|
140
140
|
type: u,
|
|
141
|
-
key:
|
|
142
|
-
props:
|
|
143
|
-
_owner:
|
|
144
|
-
}, (
|
|
141
|
+
key: g,
|
|
142
|
+
props: A,
|
|
143
|
+
_owner: E
|
|
144
|
+
}, (S !== void 0 ? S : null) !== null ? Object.defineProperty(u, "ref", {
|
|
145
145
|
enumerable: !1,
|
|
146
|
-
get:
|
|
146
|
+
get: f
|
|
147
147
|
}) : Object.defineProperty(u, "ref", { enumerable: !1, value: null }), u._store = {}, Object.defineProperty(u._store, "validated", {
|
|
148
148
|
configurable: !1,
|
|
149
149
|
enumerable: !1,
|
|
@@ -158,69 +158,69 @@ function bn() {
|
|
|
158
158
|
configurable: !1,
|
|
159
159
|
enumerable: !1,
|
|
160
160
|
writable: !0,
|
|
161
|
-
value:
|
|
161
|
+
value: Y
|
|
162
162
|
}), Object.defineProperty(u, "_debugTask", {
|
|
163
163
|
configurable: !1,
|
|
164
164
|
enumerable: !1,
|
|
165
165
|
writable: !0,
|
|
166
|
-
value:
|
|
166
|
+
value: H
|
|
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, g, A, E, Y, H) {
|
|
170
|
+
var S = g.children;
|
|
171
|
+
if (S !== void 0)
|
|
172
|
+
if (E)
|
|
173
|
+
if (L(S)) {
|
|
174
|
+
for (E = 0; E < S.length; E++)
|
|
175
|
+
_(S[E]);
|
|
176
|
+
Object.freeze && Object.freeze(S);
|
|
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 _(S);
|
|
182
|
+
if (U.call(g, "key")) {
|
|
183
|
+
S = e(u);
|
|
184
|
+
var z = Object.keys(g).filter(function(X) {
|
|
185
|
+
return X !== "key";
|
|
186
186
|
});
|
|
187
|
-
|
|
187
|
+
E = 0 < z.length ? "{key: someKey, " + z.join(": ..., ") + ": ...}" : "{key: someKey}", N[S + E] || (z = 0 < z.length ? "{" + z.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
|
+
E,
|
|
195
|
+
S,
|
|
196
|
+
z,
|
|
197
|
+
S
|
|
198
|
+
), N[S + E] = !0);
|
|
199
199
|
}
|
|
200
|
-
if (
|
|
201
|
-
|
|
202
|
-
for (var
|
|
203
|
-
|
|
204
|
-
} else
|
|
205
|
-
return
|
|
206
|
-
|
|
200
|
+
if (S = null, A !== void 0 && (n(A), S = "" + A), o(g) && (n(g.key), S = "" + g.key), "key" in g) {
|
|
201
|
+
A = {};
|
|
202
|
+
for (var v in g)
|
|
203
|
+
v !== "key" && (A[v] = g[v]);
|
|
204
|
+
} else A = g;
|
|
205
|
+
return S && a(
|
|
206
|
+
A,
|
|
207
207
|
typeof u == "function" ? u.displayName || u.name || "Unknown" : u
|
|
208
208
|
), d(
|
|
209
209
|
u,
|
|
210
|
-
R,
|
|
211
210
|
S,
|
|
211
|
+
A,
|
|
212
212
|
r(),
|
|
213
|
-
|
|
214
|
-
|
|
213
|
+
Y,
|
|
214
|
+
H
|
|
215
215
|
);
|
|
216
216
|
}
|
|
217
217
|
function _(u) {
|
|
218
|
-
|
|
218
|
+
b(u) ? u._store && (u._store.validated = 1) : typeof u == "object" && u !== null && u.$$typeof === k && (u._payload.status === "fulfilled" ? b(u._payload.value) && u._payload.value._store && (u._payload.value._store.validated = 1) : u._store && (u._store.validated = 1));
|
|
219
219
|
}
|
|
220
|
-
function
|
|
221
|
-
return typeof u == "object" && u !== null && u.$$typeof ===
|
|
220
|
+
function b(u) {
|
|
221
|
+
return typeof u == "object" && u !== null && u.$$typeof === p;
|
|
222
222
|
}
|
|
223
|
-
var C =
|
|
223
|
+
var C = Ae, p = /* @__PURE__ */ Symbol.for("react.transitional.element"), w = /* @__PURE__ */ Symbol.for("react.portal"), h = /* @__PURE__ */ Symbol.for("react.fragment"), D = /* @__PURE__ */ Symbol.for("react.strict_mode"), F = /* @__PURE__ */ Symbol.for("react.profiler"), T = /* @__PURE__ */ Symbol.for("react.consumer"), j = /* @__PURE__ */ Symbol.for("react.context"), M = /* @__PURE__ */ Symbol.for("react.forward_ref"), O = /* @__PURE__ */ Symbol.for("react.suspense"), J = /* @__PURE__ */ Symbol.for("react.suspense_list"), ce = /* @__PURE__ */ Symbol.for("react.memo"), k = /* @__PURE__ */ Symbol.for("react.lazy"), B = /* @__PURE__ */ Symbol.for("react.activity"), le = /* @__PURE__ */ Symbol.for("react.client.reference"), Z = C.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, U = Object.prototype.hasOwnProperty, L = Array.isArray, V = console.createTask ? console.createTask : function() {
|
|
224
224
|
return null;
|
|
225
225
|
};
|
|
226
226
|
C = {
|
|
@@ -228,67 +228,67 @@ React keys must be passed directly to JSX without using spread:
|
|
|
228
228
|
return u();
|
|
229
229
|
}
|
|
230
230
|
};
|
|
231
|
-
var
|
|
231
|
+
var x, se = {}, y = C.react_stack_bottom_frame.bind(
|
|
232
232
|
C,
|
|
233
233
|
i
|
|
234
|
-
)(),
|
|
235
|
-
|
|
236
|
-
var
|
|
234
|
+
)(), K = V(s(i)), N = {};
|
|
235
|
+
Ee.Fragment = h, Ee.jsx = function(u, g, A) {
|
|
236
|
+
var E = 1e4 > Z.recentlyCreatedOwnerStacks++;
|
|
237
237
|
return l(
|
|
238
238
|
u,
|
|
239
|
-
|
|
240
|
-
|
|
239
|
+
g,
|
|
240
|
+
A,
|
|
241
241
|
!1,
|
|
242
|
-
|
|
243
|
-
|
|
242
|
+
E ? Error("react-stack-top-frame") : y,
|
|
243
|
+
E ? V(s(u)) : K
|
|
244
244
|
);
|
|
245
|
-
},
|
|
246
|
-
var
|
|
245
|
+
}, Ee.jsxs = function(u, g, A) {
|
|
246
|
+
var E = 1e4 > Z.recentlyCreatedOwnerStacks++;
|
|
247
247
|
return l(
|
|
248
248
|
u,
|
|
249
|
-
|
|
250
|
-
|
|
249
|
+
g,
|
|
250
|
+
A,
|
|
251
251
|
!0,
|
|
252
|
-
|
|
253
|
-
|
|
252
|
+
E ? Error("react-stack-top-frame") : y,
|
|
253
|
+
E ? V(s(u)) : K
|
|
254
254
|
);
|
|
255
255
|
};
|
|
256
|
-
})()),
|
|
256
|
+
})()), Ee;
|
|
257
257
|
}
|
|
258
|
-
var
|
|
259
|
-
function
|
|
260
|
-
return
|
|
258
|
+
var _t;
|
|
259
|
+
function Dn() {
|
|
260
|
+
return _t || (_t = 1, process.env.NODE_ENV === "production" ? ke.exports = En() : ke.exports = Sn()), ke.exports;
|
|
261
261
|
}
|
|
262
|
-
var m =
|
|
263
|
-
const
|
|
264
|
-
function
|
|
265
|
-
const e =
|
|
262
|
+
var m = Dn();
|
|
263
|
+
const Jt = It(null);
|
|
264
|
+
function An() {
|
|
265
|
+
const e = $t(Jt);
|
|
266
266
|
if (!e)
|
|
267
267
|
throw new Error("useCtaLoader must be used within CtaLoaderProvider");
|
|
268
268
|
return e;
|
|
269
269
|
}
|
|
270
|
-
const
|
|
271
|
-
function
|
|
270
|
+
const ht = 1100, Un = 180;
|
|
271
|
+
function Tn({
|
|
272
272
|
children: e,
|
|
273
273
|
theme: t
|
|
274
274
|
}) {
|
|
275
|
-
const [n, s] =
|
|
276
|
-
|
|
275
|
+
const [n, s] = ae(!1), [r, i] = ae(!1), [o, a] = ae(0), f = ue(null), d = ue(null), l = Me(() => {
|
|
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
|
-
},
|
|
279
|
-
}, []), _ =
|
|
280
|
-
|
|
278
|
+
}, Un);
|
|
279
|
+
}, []), _ = Me(() => {
|
|
280
|
+
f.current && window.clearTimeout(f.current), f.current = null, d.current && window.clearTimeout(d.current), d.current = null, a((p) => p + 1), i(!1), s(!0), requestAnimationFrame(
|
|
281
281
|
() => requestAnimationFrame(() => i(!0))
|
|
282
|
-
),
|
|
283
|
-
|
|
284
|
-
},
|
|
282
|
+
), f.current = window.setTimeout(() => {
|
|
283
|
+
f.current = null, l();
|
|
284
|
+
}, ht);
|
|
285
285
|
}, [l]);
|
|
286
|
-
|
|
287
|
-
const
|
|
286
|
+
pe(() => l, [l]);
|
|
287
|
+
const b = Ue(
|
|
288
288
|
() => ({ start: _, stop: l, visible: n }),
|
|
289
289
|
[_, l, n]
|
|
290
290
|
), C = 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(
|
|
291
|
+
return /* @__PURE__ */ m.jsxs(Jt.Provider, { value: b, 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(
|
|
@@ -309,7 +309,7 @@ function An({
|
|
|
309
309
|
className: "cta-loader__bar-fill",
|
|
310
310
|
style: {
|
|
311
311
|
transform: r ? "scaleX(1)" : "scaleX(0)",
|
|
312
|
-
transition: `transform ${
|
|
312
|
+
transition: `transform ${ht}ms linear`
|
|
313
313
|
}
|
|
314
314
|
},
|
|
315
315
|
o
|
|
@@ -317,55 +317,55 @@ function An({
|
|
|
317
317
|
] }) })
|
|
318
318
|
] });
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function Xt(e, t) {
|
|
321
321
|
return function() {
|
|
322
322
|
return e.apply(t, arguments);
|
|
323
323
|
};
|
|
324
324
|
}
|
|
325
|
-
const { toString:
|
|
326
|
-
const n =
|
|
325
|
+
const { toString: Nn } = Object.prototype, { getPrototypeOf: it } = Object, { iterator: Ie, toStringTag: qt } = Symbol, $e = /* @__PURE__ */ ((e) => (t) => {
|
|
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)), fe = (e) => (e = e.toLowerCase(), (t) => $e(t) === e), Ge = (e) => (t) => typeof t === e, { isArray: be } = Array, Ce = Ge("undefined");
|
|
329
|
+
function Te(e) {
|
|
330
|
+
return e !== null && !Ce(e) && e.constructor !== null && !Ce(e.constructor) && re(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
331
331
|
}
|
|
332
|
-
const
|
|
333
|
-
function
|
|
332
|
+
const Vt = fe("ArrayBuffer");
|
|
333
|
+
function vn(e) {
|
|
334
334
|
let t;
|
|
335
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
335
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Vt(e.buffer), t;
|
|
336
336
|
}
|
|
337
|
-
const
|
|
338
|
-
if (
|
|
337
|
+
const xn = Ge("string"), re = Ge("function"), Kt = Ge("number"), Ne = (e) => e !== null && typeof e == "object", Ln = (e) => e === !0 || e === !1, je = (e) => {
|
|
338
|
+
if ($e(e) !== "object")
|
|
339
339
|
return !1;
|
|
340
|
-
const t =
|
|
341
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
342
|
-
},
|
|
343
|
-
if (!
|
|
340
|
+
const t = it(e);
|
|
341
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(qt in e) && !(Ie in e);
|
|
342
|
+
}, Pn = (e) => {
|
|
343
|
+
if (!Ne(e) || Te(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
|
-
},
|
|
350
|
+
}, On = fe("Date"), kn = fe("File"), Fn = fe("Blob"), jn = fe("FileList"), Bn = (e) => Ne(e) && re(e.pipe), Yn = (e) => {
|
|
351
351
|
let t;
|
|
352
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
353
|
-
t === "object" &&
|
|
354
|
-
},
|
|
352
|
+
return e && (typeof FormData == "function" && e instanceof FormData || re(e.append) && ((t = $e(e)) === "formdata" || // detect form-data instance
|
|
353
|
+
t === "object" && re(e.toString) && e.toString() === "[object FormData]"));
|
|
354
|
+
}, Mn = fe("URLSearchParams"), [Hn, In, $n, Gn] = [
|
|
355
355
|
"ReadableStream",
|
|
356
356
|
"Request",
|
|
357
357
|
"Response",
|
|
358
358
|
"Headers"
|
|
359
|
-
].map(
|
|
360
|
-
function
|
|
359
|
+
].map(fe), Jn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
360
|
+
function ve(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]), be(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 (Te(e))
|
|
369
369
|
return;
|
|
370
370
|
const i = n ? Object.getOwnPropertyNames(e) : Object.keys(e), o = i.length;
|
|
371
371
|
let a;
|
|
@@ -373,8 +373,8 @@ function Ue(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
373
373
|
a = i[s], t.call(null, e[a], a, e);
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
|
-
function
|
|
377
|
-
if (
|
|
376
|
+
function zt(e, t) {
|
|
377
|
+
if (Te(e))
|
|
378
378
|
return null;
|
|
379
379
|
t = t.toLowerCase();
|
|
380
380
|
const n = Object.keys(e);
|
|
@@ -384,23 +384,23 @@ function qt(e, t) {
|
|
|
384
384
|
return r;
|
|
385
385
|
return null;
|
|
386
386
|
}
|
|
387
|
-
const
|
|
388
|
-
function
|
|
389
|
-
const { caseless: e, skipUndefined: t } =
|
|
387
|
+
const _e = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Zt = (e) => !Ce(e) && e !== _e;
|
|
388
|
+
function Ze() {
|
|
389
|
+
const { caseless: e, skipUndefined: t } = Zt(this) && this || {}, n = {}, s = (r, i) => {
|
|
390
390
|
if (i === "__proto__" || i === "constructor" || i === "prototype")
|
|
391
391
|
return;
|
|
392
|
-
const o = e &&
|
|
393
|
-
|
|
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) : be(r) ? n[o] = r.slice() : (!t || !Ce(r)) && (n[o] = r);
|
|
394
394
|
};
|
|
395
395
|
for (let r = 0, i = arguments.length; r < i; r++)
|
|
396
|
-
arguments[r] &&
|
|
396
|
+
arguments[r] && ve(arguments[r], s);
|
|
397
397
|
return n;
|
|
398
398
|
}
|
|
399
|
-
const
|
|
399
|
+
const Xn = (e, t, n, { allOwnKeys: s } = {}) => (ve(
|
|
400
400
|
t,
|
|
401
401
|
(r, i) => {
|
|
402
|
-
n &&
|
|
403
|
-
value:
|
|
402
|
+
n && re(r) ? Object.defineProperty(e, i, {
|
|
403
|
+
value: Xt(r, n),
|
|
404
404
|
writable: !0,
|
|
405
405
|
enumerable: !0,
|
|
406
406
|
configurable: !0
|
|
@@ -412,7 +412,7 @@ const Gn = (e, t, n, { allOwnKeys: s } = {}) => (Ue(
|
|
|
412
412
|
});
|
|
413
413
|
},
|
|
414
414
|
{ allOwnKeys: s }
|
|
415
|
-
), e),
|
|
415
|
+
), e), qn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Vn = (e, t, n, s) => {
|
|
416
416
|
e.prototype = Object.create(
|
|
417
417
|
t.prototype,
|
|
418
418
|
s
|
|
@@ -424,56 +424,56 @@ const Gn = (e, t, n, { allOwnKeys: s } = {}) => (Ue(
|
|
|
424
424
|
}), Object.defineProperty(e, "super", {
|
|
425
425
|
value: t.prototype
|
|
426
426
|
}), n && Object.assign(e.prototype, n);
|
|
427
|
-
},
|
|
427
|
+
}, Kn = (e, t, n, s) => {
|
|
428
428
|
let r, i, o;
|
|
429
429
|
const a = {};
|
|
430
430
|
if (t = t || {}, e == null) return t;
|
|
431
431
|
do {
|
|
432
432
|
for (r = Object.getOwnPropertyNames(e), i = r.length; i-- > 0; )
|
|
433
433
|
o = r[i], (!s || s(o, e, t)) && !a[o] && (t[o] = e[o], a[o] = !0);
|
|
434
|
-
e = n !== !1 &&
|
|
434
|
+
e = n !== !1 && it(e);
|
|
435
435
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
436
436
|
return t;
|
|
437
|
-
},
|
|
437
|
+
}, zn = (e, t, n) => {
|
|
438
438
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
439
439
|
const s = e.indexOf(t, n);
|
|
440
440
|
return s !== -1 && s === n;
|
|
441
|
-
},
|
|
441
|
+
}, Zn = (e) => {
|
|
442
442
|
if (!e) return null;
|
|
443
|
-
if (
|
|
443
|
+
if (be(e)) return e;
|
|
444
444
|
let t = e.length;
|
|
445
|
-
if (!
|
|
445
|
+
if (!Kt(t)) return null;
|
|
446
446
|
const n = new Array(t);
|
|
447
447
|
for (; t-- > 0; )
|
|
448
448
|
n[t] = e[t];
|
|
449
449
|
return n;
|
|
450
|
-
},
|
|
451
|
-
const s = (e && e[
|
|
450
|
+
}, Wn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && it(Uint8Array)), Qn = (e, t) => {
|
|
451
|
+
const s = (e && e[Ie]).call(e);
|
|
452
452
|
let r;
|
|
453
453
|
for (; (r = s.next()) && !r.done; ) {
|
|
454
454
|
const i = r.value;
|
|
455
455
|
t.call(e, i[0], i[1]);
|
|
456
456
|
}
|
|
457
|
-
},
|
|
457
|
+
}, es = (e, t) => {
|
|
458
458
|
let n;
|
|
459
459
|
const s = [];
|
|
460
460
|
for (; (n = e.exec(t)) !== null; )
|
|
461
461
|
s.push(n);
|
|
462
462
|
return s;
|
|
463
|
-
},
|
|
463
|
+
}, ts = fe("HTMLFormElement"), ns = (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(n, s, r) {
|
|
464
464
|
return s.toUpperCase() + r;
|
|
465
|
-
}),
|
|
465
|
+
}), wt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), ss = fe("RegExp"), Wt = (e, t) => {
|
|
466
466
|
const n = Object.getOwnPropertyDescriptors(e), s = {};
|
|
467
|
-
|
|
467
|
+
ve(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
|
-
},
|
|
472
|
-
|
|
473
|
-
if (
|
|
471
|
+
}, rs = (e) => {
|
|
472
|
+
Wt(e, (t, n) => {
|
|
473
|
+
if (re(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
474
474
|
return !1;
|
|
475
475
|
const s = e[n];
|
|
476
|
-
if (
|
|
476
|
+
if (re(s)) {
|
|
477
477
|
if (t.enumerable = !1, "writable" in t) {
|
|
478
478
|
t.writable = !1;
|
|
479
479
|
return;
|
|
@@ -483,108 +483,108 @@ const Gn = (e, t, n, { allOwnKeys: s } = {}) => (Ue(
|
|
|
483
483
|
});
|
|
484
484
|
}
|
|
485
485
|
});
|
|
486
|
-
},
|
|
486
|
+
}, is = (e, t) => {
|
|
487
487
|
const n = {}, s = (r) => {
|
|
488
488
|
r.forEach((i) => {
|
|
489
489
|
n[i] = !0;
|
|
490
490
|
});
|
|
491
491
|
};
|
|
492
|
-
return
|
|
493
|
-
},
|
|
494
|
-
},
|
|
495
|
-
function
|
|
496
|
-
return !!(e &&
|
|
492
|
+
return be(e) ? s(e) : s(String(e).split(t)), n;
|
|
493
|
+
}, os = () => {
|
|
494
|
+
}, as = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
495
|
+
function cs(e) {
|
|
496
|
+
return !!(e && re(e.append) && e[qt] === "FormData" && e[Ie]);
|
|
497
497
|
}
|
|
498
|
-
const
|
|
498
|
+
const ls = (e) => {
|
|
499
499
|
const t = new Array(10), n = (s, r) => {
|
|
500
|
-
if (
|
|
500
|
+
if (Ne(s)) {
|
|
501
501
|
if (t.indexOf(s) >= 0)
|
|
502
502
|
return;
|
|
503
|
-
if (
|
|
503
|
+
if (Te(s))
|
|
504
504
|
return s;
|
|
505
505
|
if (!("toJSON" in s)) {
|
|
506
506
|
t[r] = s;
|
|
507
|
-
const i =
|
|
508
|
-
return
|
|
509
|
-
const
|
|
510
|
-
!
|
|
507
|
+
const i = be(s) ? [] : {};
|
|
508
|
+
return ve(s, (o, a) => {
|
|
509
|
+
const f = n(o, r + 1);
|
|
510
|
+
!Ce(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
|
-
},
|
|
517
|
+
}, ds = fe("AsyncFunction"), us = (e) => e && (Ne(e) || re(e)) && re(e.then) && re(e.catch), Qt = ((e, t) => e ? setImmediate : t ? ((n, s) => (_e.addEventListener(
|
|
518
518
|
"message",
|
|
519
519
|
({ source: r, data: i }) => {
|
|
520
|
-
r ===
|
|
520
|
+
r === _e && 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:
|
|
527
|
-
isArrayBuffer:
|
|
528
|
-
isBuffer:
|
|
529
|
-
isFormData:
|
|
530
|
-
isArrayBufferView:
|
|
531
|
-
isString:
|
|
532
|
-
isNumber:
|
|
533
|
-
isBoolean:
|
|
534
|
-
isObject:
|
|
535
|
-
isPlainObject:
|
|
536
|
-
isEmptyObject:
|
|
537
|
-
isReadableStream:
|
|
538
|
-
isRequest:
|
|
539
|
-
isResponse:
|
|
540
|
-
isHeaders:
|
|
541
|
-
isUndefined:
|
|
542
|
-
isDate:
|
|
543
|
-
isFile:
|
|
544
|
-
isBlob:
|
|
545
|
-
isRegExp:
|
|
546
|
-
isFunction:
|
|
547
|
-
isStream:
|
|
548
|
-
isURLSearchParams:
|
|
549
|
-
isTypedArray:
|
|
550
|
-
isFileList:
|
|
551
|
-
forEach:
|
|
552
|
-
merge:
|
|
553
|
-
extend:
|
|
554
|
-
trim:
|
|
555
|
-
stripBOM:
|
|
556
|
-
inherits:
|
|
557
|
-
toFlatObject:
|
|
558
|
-
kindOf:
|
|
559
|
-
kindOfTest:
|
|
560
|
-
endsWith:
|
|
561
|
-
toArray:
|
|
562
|
-
forEachEntry:
|
|
563
|
-
matchAll:
|
|
564
|
-
isHTMLForm:
|
|
565
|
-
hasOwnProperty:
|
|
566
|
-
hasOwnProp:
|
|
524
|
+
s.push(r), _e.postMessage(n, "*");
|
|
525
|
+
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(typeof setImmediate == "function", re(_e.postMessage)), ps = typeof queueMicrotask < "u" ? queueMicrotask.bind(_e) : typeof process < "u" && process.nextTick || Qt, fs = (e) => e != null && re(e[Ie]), c = {
|
|
526
|
+
isArray: be,
|
|
527
|
+
isArrayBuffer: Vt,
|
|
528
|
+
isBuffer: Te,
|
|
529
|
+
isFormData: Yn,
|
|
530
|
+
isArrayBufferView: vn,
|
|
531
|
+
isString: xn,
|
|
532
|
+
isNumber: Kt,
|
|
533
|
+
isBoolean: Ln,
|
|
534
|
+
isObject: Ne,
|
|
535
|
+
isPlainObject: je,
|
|
536
|
+
isEmptyObject: Pn,
|
|
537
|
+
isReadableStream: Hn,
|
|
538
|
+
isRequest: In,
|
|
539
|
+
isResponse: $n,
|
|
540
|
+
isHeaders: Gn,
|
|
541
|
+
isUndefined: Ce,
|
|
542
|
+
isDate: On,
|
|
543
|
+
isFile: kn,
|
|
544
|
+
isBlob: Fn,
|
|
545
|
+
isRegExp: ss,
|
|
546
|
+
isFunction: re,
|
|
547
|
+
isStream: Bn,
|
|
548
|
+
isURLSearchParams: Mn,
|
|
549
|
+
isTypedArray: Wn,
|
|
550
|
+
isFileList: jn,
|
|
551
|
+
forEach: ve,
|
|
552
|
+
merge: Ze,
|
|
553
|
+
extend: Xn,
|
|
554
|
+
trim: Jn,
|
|
555
|
+
stripBOM: qn,
|
|
556
|
+
inherits: Vn,
|
|
557
|
+
toFlatObject: Kn,
|
|
558
|
+
kindOf: $e,
|
|
559
|
+
kindOfTest: fe,
|
|
560
|
+
endsWith: zn,
|
|
561
|
+
toArray: Zn,
|
|
562
|
+
forEachEntry: Qn,
|
|
563
|
+
matchAll: es,
|
|
564
|
+
isHTMLForm: ts,
|
|
565
|
+
hasOwnProperty: wt,
|
|
566
|
+
hasOwnProp: wt,
|
|
567
567
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
568
|
-
reduceDescriptors:
|
|
569
|
-
freezeMethods:
|
|
570
|
-
toObjectSet:
|
|
571
|
-
toCamelCase:
|
|
572
|
-
noop:
|
|
573
|
-
toFiniteNumber:
|
|
574
|
-
findKey:
|
|
575
|
-
global:
|
|
576
|
-
isContextDefined:
|
|
577
|
-
isSpecCompliantForm:
|
|
578
|
-
toJSONObject:
|
|
579
|
-
isAsyncFn:
|
|
580
|
-
isThenable:
|
|
581
|
-
setImmediate:
|
|
582
|
-
asap:
|
|
583
|
-
isIterable:
|
|
568
|
+
reduceDescriptors: Wt,
|
|
569
|
+
freezeMethods: rs,
|
|
570
|
+
toObjectSet: is,
|
|
571
|
+
toCamelCase: ns,
|
|
572
|
+
noop: os,
|
|
573
|
+
toFiniteNumber: as,
|
|
574
|
+
findKey: zt,
|
|
575
|
+
global: _e,
|
|
576
|
+
isContextDefined: Zt,
|
|
577
|
+
isSpecCompliantForm: cs,
|
|
578
|
+
toJSONObject: ls,
|
|
579
|
+
isAsyncFn: ds,
|
|
580
|
+
isThenable: us,
|
|
581
|
+
setImmediate: Qt,
|
|
582
|
+
asap: ps,
|
|
583
|
+
isIterable: fs
|
|
584
584
|
};
|
|
585
|
-
let
|
|
585
|
+
let R = class en extends Error {
|
|
586
586
|
static from(t, n, s, r, i, o) {
|
|
587
|
-
const a = new
|
|
587
|
+
const a = new en(t.message, n || t.code, s, r, i);
|
|
588
588
|
return a.cause = t, a.name = t.name, o && Object.assign(a, o), a;
|
|
589
589
|
}
|
|
590
590
|
/**
|
|
@@ -621,92 +621,92 @@ let b = class Zt extends Error {
|
|
|
621
621
|
};
|
|
622
622
|
}
|
|
623
623
|
};
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
const
|
|
637
|
-
function
|
|
624
|
+
R.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
625
|
+
R.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
626
|
+
R.ECONNABORTED = "ECONNABORTED";
|
|
627
|
+
R.ETIMEDOUT = "ETIMEDOUT";
|
|
628
|
+
R.ERR_NETWORK = "ERR_NETWORK";
|
|
629
|
+
R.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
630
|
+
R.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
631
|
+
R.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
632
|
+
R.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
633
|
+
R.ERR_CANCELED = "ERR_CANCELED";
|
|
634
|
+
R.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
635
|
+
R.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
636
|
+
const ms = null;
|
|
637
|
+
function We(e) {
|
|
638
638
|
return c.isPlainObject(e) || c.isArray(e);
|
|
639
639
|
}
|
|
640
|
-
function
|
|
640
|
+
function tn(e) {
|
|
641
641
|
return c.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
642
642
|
}
|
|
643
|
-
function
|
|
643
|
+
function yt(e, t, n) {
|
|
644
644
|
return e ? e.concat(t).map(function(r, i) {
|
|
645
|
-
return r =
|
|
645
|
+
return r = tn(r), !n && i ? "[" + r + "]" : r;
|
|
646
646
|
}).join(n ? "." : "") : t;
|
|
647
647
|
}
|
|
648
|
-
function
|
|
649
|
-
return c.isArray(e) && !e.some(
|
|
648
|
+
function _s(e) {
|
|
649
|
+
return c.isArray(e) && !e.some(We);
|
|
650
650
|
}
|
|
651
|
-
const
|
|
651
|
+
const hs = c.toFlatObject(c, {}, null, function(t) {
|
|
652
652
|
return /^is[A-Z]/.test(t);
|
|
653
653
|
});
|
|
654
|
-
function
|
|
654
|
+
function Je(e, t, n) {
|
|
655
655
|
if (!c.isObject(e))
|
|
656
656
|
throw new TypeError("target must be an object");
|
|
657
657
|
t = t || new FormData(), n = c.toFlatObject(n, {
|
|
658
658
|
metaTokens: !0,
|
|
659
659
|
dots: !1,
|
|
660
660
|
indexes: !1
|
|
661
|
-
}, !1, function(
|
|
662
|
-
return !c.isUndefined(h[
|
|
661
|
+
}, !1, function(w, h) {
|
|
662
|
+
return !c.isUndefined(h[w]);
|
|
663
663
|
});
|
|
664
|
-
const s = n.metaTokens, r = n.visitor || l, i = n.dots, o = n.indexes,
|
|
664
|
+
const s = n.metaTokens, r = n.visitor || l, i = n.dots, o = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && c.isSpecCompliantForm(t);
|
|
665
665
|
if (!c.isFunction(r))
|
|
666
666
|
throw new TypeError("visitor must be a function");
|
|
667
|
-
function d(
|
|
668
|
-
if (
|
|
669
|
-
if (c.isDate(
|
|
670
|
-
return
|
|
671
|
-
if (c.isBoolean(
|
|
672
|
-
return
|
|
673
|
-
if (!
|
|
674
|
-
throw new
|
|
675
|
-
return c.isArrayBuffer(
|
|
676
|
-
}
|
|
677
|
-
function l(
|
|
678
|
-
let
|
|
679
|
-
if (
|
|
680
|
-
if (c.endsWith(
|
|
681
|
-
|
|
682
|
-
else if (c.isArray(
|
|
683
|
-
return
|
|
684
|
-
!(c.isUndefined(
|
|
667
|
+
function d(p) {
|
|
668
|
+
if (p === null) return "";
|
|
669
|
+
if (c.isDate(p))
|
|
670
|
+
return p.toISOString();
|
|
671
|
+
if (c.isBoolean(p))
|
|
672
|
+
return p.toString();
|
|
673
|
+
if (!f && c.isBlob(p))
|
|
674
|
+
throw new R("Blob is not supported. Use a Buffer instead.");
|
|
675
|
+
return c.isArrayBuffer(p) || c.isTypedArray(p) ? f && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
|
|
676
|
+
}
|
|
677
|
+
function l(p, w, h) {
|
|
678
|
+
let D = p;
|
|
679
|
+
if (p && !h && typeof p == "object") {
|
|
680
|
+
if (c.endsWith(w, "{}"))
|
|
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, "[]")) && (D = c.toArray(p)))
|
|
683
|
+
return w = tn(w), D.forEach(function(T, j) {
|
|
684
|
+
!(c.isUndefined(T) || T === null) && t.append(
|
|
685
685
|
// eslint-disable-next-line no-nested-ternary
|
|
686
|
-
o === !0 ?
|
|
687
|
-
d(
|
|
686
|
+
o === !0 ? yt([w], j, i) : o === null ? w : w + "[]",
|
|
687
|
+
d(T)
|
|
688
688
|
);
|
|
689
689
|
}), !1;
|
|
690
690
|
}
|
|
691
|
-
return
|
|
691
|
+
return We(p) ? !0 : (t.append(yt(h, w, i), d(p)), !1);
|
|
692
692
|
}
|
|
693
|
-
const _ = [],
|
|
693
|
+
const _ = [], b = Object.assign(hs, {
|
|
694
694
|
defaultVisitor: l,
|
|
695
695
|
convertValue: d,
|
|
696
|
-
isVisitable:
|
|
696
|
+
isVisitable: We
|
|
697
697
|
});
|
|
698
|
-
function C(
|
|
699
|
-
if (!c.isUndefined(
|
|
700
|
-
if (_.indexOf(
|
|
701
|
-
throw Error("Circular reference detected in " +
|
|
702
|
-
_.push(
|
|
703
|
-
(!(c.isUndefined(
|
|
698
|
+
function C(p, w) {
|
|
699
|
+
if (!c.isUndefined(p)) {
|
|
700
|
+
if (_.indexOf(p) !== -1)
|
|
701
|
+
throw Error("Circular reference detected in " + w.join("."));
|
|
702
|
+
_.push(p), c.forEach(p, function(D, F) {
|
|
703
|
+
(!(c.isUndefined(D) || D === null) && r.call(
|
|
704
704
|
t,
|
|
705
|
-
|
|
706
|
-
c.isString(
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
)) === !0 && C(
|
|
705
|
+
D,
|
|
706
|
+
c.isString(F) ? F.trim() : F,
|
|
707
|
+
w,
|
|
708
|
+
b
|
|
709
|
+
)) === !0 && C(D, w ? w.concat(F) : [F]);
|
|
710
710
|
}), _.pop();
|
|
711
711
|
}
|
|
712
712
|
}
|
|
@@ -714,7 +714,7 @@ function He(e, t, n) {
|
|
|
714
714
|
throw new TypeError("data must be an object");
|
|
715
715
|
return C(e), t;
|
|
716
716
|
}
|
|
717
|
-
function
|
|
717
|
+
function gt(e) {
|
|
718
718
|
const t = {
|
|
719
719
|
"!": "%21",
|
|
720
720
|
"'": "%27",
|
|
@@ -728,38 +728,38 @@ function ht(e) {
|
|
|
728
728
|
return t[s];
|
|
729
729
|
});
|
|
730
730
|
}
|
|
731
|
-
function
|
|
732
|
-
this._pairs = [], e &&
|
|
731
|
+
function ot(e, t) {
|
|
732
|
+
this._pairs = [], e && Je(e, this, t);
|
|
733
733
|
}
|
|
734
|
-
const
|
|
735
|
-
|
|
734
|
+
const nn = ot.prototype;
|
|
735
|
+
nn.append = function(t, n) {
|
|
736
736
|
this._pairs.push([t, n]);
|
|
737
737
|
};
|
|
738
|
-
|
|
738
|
+
nn.toString = function(t) {
|
|
739
739
|
const n = t ? function(s) {
|
|
740
|
-
return t.call(this, s,
|
|
741
|
-
} :
|
|
740
|
+
return t.call(this, s, gt);
|
|
741
|
+
} : gt;
|
|
742
742
|
return this._pairs.map(function(r) {
|
|
743
743
|
return n(r[0]) + "=" + n(r[1]);
|
|
744
744
|
}, "").join("&");
|
|
745
745
|
};
|
|
746
|
-
function
|
|
746
|
+
function ws(e) {
|
|
747
747
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
748
748
|
}
|
|
749
|
-
function
|
|
749
|
+
function sn(e, t, n) {
|
|
750
750
|
if (!t)
|
|
751
751
|
return e;
|
|
752
|
-
const s = n && n.encode ||
|
|
752
|
+
const s = n && n.encode || ws, r = c.isFunction(n) ? {
|
|
753
753
|
serialize: n
|
|
754
754
|
} : n, i = r && r.serialize;
|
|
755
755
|
let o;
|
|
756
|
-
if (i ? o = i(t, r) : o = c.isURLSearchParams(t) ? t.toString() : new
|
|
756
|
+
if (i ? o = i(t, r) : o = c.isURLSearchParams(t) ? t.toString() : new ot(t, r).toString(s), o) {
|
|
757
757
|
const a = e.indexOf("#");
|
|
758
758
|
a !== -1 && (e = e.slice(0, a)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
759
759
|
}
|
|
760
760
|
return e;
|
|
761
761
|
}
|
|
762
|
-
class
|
|
762
|
+
class Ct {
|
|
763
763
|
constructor() {
|
|
764
764
|
this.handlers = [];
|
|
765
765
|
}
|
|
@@ -814,43 +814,43 @@ class wt {
|
|
|
814
814
|
});
|
|
815
815
|
}
|
|
816
816
|
}
|
|
817
|
-
const
|
|
817
|
+
const at = {
|
|
818
818
|
silentJSONParsing: !0,
|
|
819
819
|
forcedJSONParsing: !0,
|
|
820
820
|
clarifyTimeoutError: !1,
|
|
821
821
|
legacyInterceptorReqResOrdering: !0
|
|
822
|
-
},
|
|
822
|
+
}, ys = typeof URLSearchParams < "u" ? URLSearchParams : ot, gs = typeof FormData < "u" ? FormData : null, Cs = typeof Blob < "u" ? Blob : null, bs = {
|
|
823
823
|
isBrowser: !0,
|
|
824
824
|
classes: {
|
|
825
|
-
URLSearchParams:
|
|
826
|
-
FormData:
|
|
827
|
-
Blob:
|
|
825
|
+
URLSearchParams: ys,
|
|
826
|
+
FormData: gs,
|
|
827
|
+
Blob: Cs
|
|
828
828
|
},
|
|
829
829
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
830
|
-
},
|
|
831
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
830
|
+
}, ct = typeof window < "u" && typeof document < "u", Qe = typeof navigator == "object" && navigator || void 0, Rs = ct && (!Qe || ["ReactNative", "NativeScript", "NS"].indexOf(Qe.product) < 0), Es = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
831
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Ss = ct && window.location.href || "http://localhost", Ds = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
832
832
|
__proto__: null,
|
|
833
|
-
hasBrowserEnv:
|
|
834
|
-
hasStandardBrowserEnv:
|
|
835
|
-
hasStandardBrowserWebWorkerEnv:
|
|
836
|
-
navigator:
|
|
837
|
-
origin:
|
|
838
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
839
|
-
...
|
|
840
|
-
...
|
|
833
|
+
hasBrowserEnv: ct,
|
|
834
|
+
hasStandardBrowserEnv: Rs,
|
|
835
|
+
hasStandardBrowserWebWorkerEnv: Es,
|
|
836
|
+
navigator: Qe,
|
|
837
|
+
origin: Ss
|
|
838
|
+
}, Symbol.toStringTag, { value: "Module" })), ee = {
|
|
839
|
+
...Ds,
|
|
840
|
+
...bs
|
|
841
841
|
};
|
|
842
|
-
function
|
|
843
|
-
return
|
|
842
|
+
function As(e, t) {
|
|
843
|
+
return Je(e, new ee.classes.URLSearchParams(), {
|
|
844
844
|
visitor: function(n, s, r, i) {
|
|
845
|
-
return
|
|
845
|
+
return ee.isNode && c.isBuffer(n) ? (this.append(s, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
846
846
|
},
|
|
847
847
|
...t
|
|
848
848
|
});
|
|
849
849
|
}
|
|
850
|
-
function
|
|
850
|
+
function Us(e) {
|
|
851
851
|
return c.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
852
852
|
}
|
|
853
|
-
function
|
|
853
|
+
function Ts(e) {
|
|
854
854
|
const t = {}, n = Object.keys(e);
|
|
855
855
|
let s;
|
|
856
856
|
const r = n.length;
|
|
@@ -859,22 +859,22 @@ function As(e) {
|
|
|
859
859
|
i = n[s], t[i] = e[i];
|
|
860
860
|
return t;
|
|
861
861
|
}
|
|
862
|
-
function
|
|
862
|
+
function rn(e) {
|
|
863
863
|
function t(n, s, r, i) {
|
|
864
864
|
let o = n[i++];
|
|
865
865
|
if (o === "__proto__") return !0;
|
|
866
|
-
const a = Number.isFinite(+o),
|
|
867
|
-
return o = !o && c.isArray(r) ? r.length : o,
|
|
866
|
+
const a = Number.isFinite(+o), f = i >= n.length;
|
|
867
|
+
return o = !o && c.isArray(r) ? r.length : o, f ? (c.hasOwnProp(r, o) ? r[o] = [r[o], s] : r[o] = s, !a) : ((!r[o] || !c.isObject(r[o])) && (r[o] = []), t(n, s, r[o], i) && c.isArray(r[o]) && (r[o] = Ts(r[o])), !a);
|
|
868
868
|
}
|
|
869
869
|
if (c.isFormData(e) && c.isFunction(e.entries)) {
|
|
870
870
|
const n = {};
|
|
871
871
|
return c.forEachEntry(e, (s, r) => {
|
|
872
|
-
t(
|
|
872
|
+
t(Us(s), r, n, 0);
|
|
873
873
|
}), n;
|
|
874
874
|
}
|
|
875
875
|
return null;
|
|
876
876
|
}
|
|
877
|
-
function
|
|
877
|
+
function Ns(e, t, n) {
|
|
878
878
|
if (c.isString(e))
|
|
879
879
|
try {
|
|
880
880
|
return (t || JSON.parse)(e), c.trim(e);
|
|
@@ -884,13 +884,13 @@ function Us(e, t, n) {
|
|
|
884
884
|
}
|
|
885
885
|
return (n || JSON.stringify)(e);
|
|
886
886
|
}
|
|
887
|
-
const
|
|
888
|
-
transitional:
|
|
887
|
+
const xe = {
|
|
888
|
+
transitional: at,
|
|
889
889
|
adapter: ["xhr", "http", "fetch"],
|
|
890
890
|
transformRequest: [function(t, n) {
|
|
891
891
|
const s = n.getContentType() || "", r = s.indexOf("application/json") > -1, i = c.isObject(t);
|
|
892
892
|
if (i && c.isHTMLForm(t) && (t = new FormData(t)), c.isFormData(t))
|
|
893
|
-
return r ? JSON.stringify(
|
|
893
|
+
return r ? JSON.stringify(rn(t)) : t;
|
|
894
894
|
if (c.isArrayBuffer(t) || c.isBuffer(t) || c.isStream(t) || c.isFile(t) || c.isBlob(t) || c.isReadableStream(t))
|
|
895
895
|
return t;
|
|
896
896
|
if (c.isArrayBufferView(t))
|
|
@@ -900,20 +900,20 @@ const Te = {
|
|
|
900
900
|
let a;
|
|
901
901
|
if (i) {
|
|
902
902
|
if (s.indexOf("application/x-www-form-urlencoded") > -1)
|
|
903
|
-
return
|
|
903
|
+
return As(t, this.formSerializer).toString();
|
|
904
904
|
if ((a = c.isFileList(t)) || s.indexOf("multipart/form-data") > -1) {
|
|
905
|
-
const
|
|
906
|
-
return
|
|
905
|
+
const f = this.env && this.env.FormData;
|
|
906
|
+
return Je(
|
|
907
907
|
a ? { "files[]": t } : t,
|
|
908
|
-
|
|
908
|
+
f && new f(),
|
|
909
909
|
this.formSerializer
|
|
910
910
|
);
|
|
911
911
|
}
|
|
912
912
|
}
|
|
913
|
-
return i || r ? (n.setContentType("application/json", !1),
|
|
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 || xe.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 Te = {
|
|
|
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" ? R.from(a, R.ERR_BAD_RESPONSE, this, null, this.response) : a;
|
|
926
926
|
}
|
|
927
927
|
}
|
|
928
928
|
return t;
|
|
@@ -937,8 +937,8 @@ const Te = {
|
|
|
937
937
|
maxContentLength: -1,
|
|
938
938
|
maxBodyLength: -1,
|
|
939
939
|
env: {
|
|
940
|
-
FormData:
|
|
941
|
-
Blob:
|
|
940
|
+
FormData: ee.classes.FormData,
|
|
941
|
+
Blob: ee.classes.Blob
|
|
942
942
|
},
|
|
943
943
|
validateStatus: function(t) {
|
|
944
944
|
return t >= 200 && t < 300;
|
|
@@ -951,9 +951,9 @@ const Te = {
|
|
|
951
951
|
}
|
|
952
952
|
};
|
|
953
953
|
c.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
954
|
-
|
|
954
|
+
xe.headers[e] = {};
|
|
955
955
|
});
|
|
956
|
-
const
|
|
956
|
+
const vs = c.toObjectSet([
|
|
957
957
|
"age",
|
|
958
958
|
"authorization",
|
|
959
959
|
"content-length",
|
|
@@ -971,29 +971,29 @@ const Ts = c.toObjectSet([
|
|
|
971
971
|
"referer",
|
|
972
972
|
"retry-after",
|
|
973
973
|
"user-agent"
|
|
974
|
-
]),
|
|
974
|
+
]), xs = (e) => {
|
|
975
975
|
const t = {};
|
|
976
976
|
let n, s, r;
|
|
977
977
|
return e && e.split(`
|
|
978
978
|
`).forEach(function(o) {
|
|
979
|
-
r = o.indexOf(":"), n = o.substring(0, r).trim().toLowerCase(), s = o.substring(r + 1).trim(), !(!n || t[n] &&
|
|
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
|
-
},
|
|
982
|
-
function
|
|
981
|
+
}, bt = /* @__PURE__ */ Symbol("internals");
|
|
982
|
+
function Se(e) {
|
|
983
983
|
return e && String(e).trim().toLowerCase();
|
|
984
984
|
}
|
|
985
|
-
function
|
|
986
|
-
return e === !1 || e == null ? e : c.isArray(e) ? e.map(
|
|
985
|
+
function Be(e) {
|
|
986
|
+
return e === !1 || e == null ? e : c.isArray(e) ? e.map(Be) : String(e);
|
|
987
987
|
}
|
|
988
|
-
function
|
|
988
|
+
function Ls(e) {
|
|
989
989
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
990
990
|
let s;
|
|
991
991
|
for (; s = n.exec(e); )
|
|
992
992
|
t[s[1]] = s[2];
|
|
993
993
|
return t;
|
|
994
994
|
}
|
|
995
|
-
const
|
|
996
|
-
function
|
|
995
|
+
const Ps = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
996
|
+
function qe(e, t, n, s, r) {
|
|
997
997
|
if (c.isFunction(s))
|
|
998
998
|
return s.call(this, t, n);
|
|
999
999
|
if (r && (t = n), !!c.isString(t)) {
|
|
@@ -1003,10 +1003,10 @@ function $e(e, t, n, s, r) {
|
|
|
1003
1003
|
return s.test(t);
|
|
1004
1004
|
}
|
|
1005
1005
|
}
|
|
1006
|
-
function
|
|
1006
|
+
function Os(e) {
|
|
1007
1007
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, s) => n.toUpperCase() + s);
|
|
1008
1008
|
}
|
|
1009
|
-
function
|
|
1009
|
+
function ks(e, t) {
|
|
1010
1010
|
const n = c.toCamelCase(" " + t);
|
|
1011
1011
|
["get", "set", "has"].forEach((s) => {
|
|
1012
1012
|
Object.defineProperty(e, s + n, {
|
|
@@ -1017,30 +1017,30 @@ function Ps(e, t) {
|
|
|
1017
1017
|
});
|
|
1018
1018
|
});
|
|
1019
1019
|
}
|
|
1020
|
-
let
|
|
1020
|
+
let ie = 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
|
-
function i(a,
|
|
1027
|
-
const l =
|
|
1026
|
+
function i(a, f, d) {
|
|
1027
|
+
const l = Se(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);
|
|
1031
|
-
(!_ || r[_] === void 0 || d === !0 || d === void 0 && r[_] !== !1) && (r[_ ||
|
|
1031
|
+
(!_ || r[_] === void 0 || d === !0 || d === void 0 && r[_] !== !1) && (r[_ || f] = Be(a));
|
|
1032
1032
|
}
|
|
1033
|
-
const o = (a,
|
|
1033
|
+
const o = (a, f) => c.forEach(a, (d, l) => i(d, l, f));
|
|
1034
1034
|
if (c.isPlainObject(t) || t instanceof this.constructor)
|
|
1035
1035
|
o(t, n);
|
|
1036
|
-
else if (c.isString(t) && (t = t.trim()) && !
|
|
1037
|
-
o(
|
|
1036
|
+
else if (c.isString(t) && (t = t.trim()) && !Ps(t))
|
|
1037
|
+
o(xs(t), n);
|
|
1038
1038
|
else if (c.isObject(t) && c.isIterable(t)) {
|
|
1039
|
-
let a = {},
|
|
1039
|
+
let a = {}, f, d;
|
|
1040
1040
|
for (const l of t) {
|
|
1041
1041
|
if (!c.isArray(l))
|
|
1042
1042
|
throw TypeError("Object iterator must return a key-value pair");
|
|
1043
|
-
a[d = l[0]] = (
|
|
1043
|
+
a[d = l[0]] = (f = a[d]) ? c.isArray(f) ? [...f, l[1]] : [f, l[1]] : l[1];
|
|
1044
1044
|
}
|
|
1045
1045
|
o(a, n);
|
|
1046
1046
|
} else
|
|
@@ -1048,14 +1048,14 @@ let te = class {
|
|
|
1048
1048
|
return this;
|
|
1049
1049
|
}
|
|
1050
1050
|
get(t, n) {
|
|
1051
|
-
if (t =
|
|
1051
|
+
if (t = Se(t), t) {
|
|
1052
1052
|
const s = c.findKey(this, t);
|
|
1053
1053
|
if (s) {
|
|
1054
1054
|
const r = this[s];
|
|
1055
1055
|
if (!n)
|
|
1056
1056
|
return r;
|
|
1057
1057
|
if (n === !0)
|
|
1058
|
-
return
|
|
1058
|
+
return Ls(r);
|
|
1059
1059
|
if (c.isFunction(n))
|
|
1060
1060
|
return n.call(this, r, s);
|
|
1061
1061
|
if (c.isRegExp(n))
|
|
@@ -1065,9 +1065,9 @@ let te = class {
|
|
|
1065
1065
|
}
|
|
1066
1066
|
}
|
|
1067
1067
|
has(t, n) {
|
|
1068
|
-
if (t =
|
|
1068
|
+
if (t = Se(t), t) {
|
|
1069
1069
|
const s = c.findKey(this, t);
|
|
1070
|
-
return !!(s && this[s] !== void 0 && (!n ||
|
|
1070
|
+
return !!(s && this[s] !== void 0 && (!n || qe(this, this[s], s, n)));
|
|
1071
1071
|
}
|
|
1072
1072
|
return !1;
|
|
1073
1073
|
}
|
|
@@ -1075,9 +1075,9 @@ let te = class {
|
|
|
1075
1075
|
const s = this;
|
|
1076
1076
|
let r = !1;
|
|
1077
1077
|
function i(o) {
|
|
1078
|
-
if (o =
|
|
1078
|
+
if (o = Se(o), o) {
|
|
1079
1079
|
const a = c.findKey(s, o);
|
|
1080
|
-
a && (!n ||
|
|
1080
|
+
a && (!n || qe(s, s[a], a, n)) && (delete s[a], r = !0);
|
|
1081
1081
|
}
|
|
1082
1082
|
}
|
|
1083
1083
|
return c.isArray(t) ? t.forEach(i) : i(t), r;
|
|
@@ -1087,7 +1087,7 @@ let te = class {
|
|
|
1087
1087
|
let s = n.length, r = !1;
|
|
1088
1088
|
for (; s--; ) {
|
|
1089
1089
|
const i = n[s];
|
|
1090
|
-
(!t ||
|
|
1090
|
+
(!t || qe(this, this[i], i, t, !0)) && (delete this[i], r = !0);
|
|
1091
1091
|
}
|
|
1092
1092
|
return r;
|
|
1093
1093
|
}
|
|
@@ -1096,11 +1096,11 @@ let te = class {
|
|
|
1096
1096
|
return c.forEach(this, (r, i) => {
|
|
1097
1097
|
const o = c.findKey(s, i);
|
|
1098
1098
|
if (o) {
|
|
1099
|
-
n[o] =
|
|
1099
|
+
n[o] = Be(r), delete n[i];
|
|
1100
1100
|
return;
|
|
1101
1101
|
}
|
|
1102
|
-
const a = t ?
|
|
1103
|
-
a !== i && delete n[i], n[a] =
|
|
1102
|
+
const a = t ? Os(i) : String(i).trim();
|
|
1103
|
+
a !== i && delete n[i], n[a] = Be(r), s[a] = !0;
|
|
1104
1104
|
}), this;
|
|
1105
1105
|
}
|
|
1106
1106
|
concat(...t) {
|
|
@@ -1133,18 +1133,18 @@ let te = class {
|
|
|
1133
1133
|
return n.forEach((r) => s.set(r)), s;
|
|
1134
1134
|
}
|
|
1135
1135
|
static accessor(t) {
|
|
1136
|
-
const s = (this[
|
|
1136
|
+
const s = (this[bt] = this[bt] = {
|
|
1137
1137
|
accessors: {}
|
|
1138
1138
|
}).accessors, r = this.prototype;
|
|
1139
1139
|
function i(o) {
|
|
1140
|
-
const a =
|
|
1141
|
-
s[a] || (
|
|
1140
|
+
const a = Se(o);
|
|
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
|
+
ie.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
1147
|
+
c.reduceDescriptors(ie.prototype, ({ value: e }, t) => {
|
|
1148
1148
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
1149
1149
|
return {
|
|
1150
1150
|
get: () => e,
|
|
@@ -1153,18 +1153,18 @@ c.reduceDescriptors(te.prototype, ({ value: e }, t) => {
|
|
|
1153
1153
|
}
|
|
1154
1154
|
};
|
|
1155
1155
|
});
|
|
1156
|
-
c.freezeMethods(
|
|
1157
|
-
function
|
|
1158
|
-
const n = this ||
|
|
1156
|
+
c.freezeMethods(ie);
|
|
1157
|
+
function Ve(e, t) {
|
|
1158
|
+
const n = this || xe, s = t || n, r = ie.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);
|
|
1162
1162
|
}), r.normalize(), i;
|
|
1163
1163
|
}
|
|
1164
|
-
function
|
|
1164
|
+
function on(e) {
|
|
1165
1165
|
return !!(e && e.__CANCEL__);
|
|
1166
1166
|
}
|
|
1167
|
-
let
|
|
1167
|
+
let Le = class extends R {
|
|
1168
1168
|
/**
|
|
1169
1169
|
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
1170
1170
|
*
|
|
@@ -1175,40 +1175,40 @@ let Ne = class extends b {
|
|
|
1175
1175
|
* @returns {CanceledError} The created error.
|
|
1176
1176
|
*/
|
|
1177
1177
|
constructor(t, n, s) {
|
|
1178
|
-
super(t ?? "canceled",
|
|
1178
|
+
super(t ?? "canceled", R.ERR_CANCELED, n, s), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
1179
1179
|
}
|
|
1180
1180
|
};
|
|
1181
|
-
function
|
|
1181
|
+
function an(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 R(
|
|
1184
1184
|
"Request failed with status code " + n.status,
|
|
1185
|
-
[
|
|
1185
|
+
[R.ERR_BAD_REQUEST, R.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
1186
1186
|
n.config,
|
|
1187
1187
|
n.request,
|
|
1188
1188
|
n
|
|
1189
1189
|
));
|
|
1190
1190
|
}
|
|
1191
|
-
function
|
|
1191
|
+
function Fs(e) {
|
|
1192
1192
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1193
1193
|
return t && t[1] || "";
|
|
1194
1194
|
}
|
|
1195
|
-
function
|
|
1195
|
+
function js(e, t) {
|
|
1196
1196
|
e = e || 10;
|
|
1197
1197
|
const n = new Array(e), s = new Array(e);
|
|
1198
1198
|
let r = 0, i = 0, o;
|
|
1199
|
-
return t = t !== void 0 ? t : 1e3, function(
|
|
1199
|
+
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
1200
1200
|
const d = Date.now(), l = s[i];
|
|
1201
|
-
o || (o = d), n[r] =
|
|
1202
|
-
let _ = i,
|
|
1201
|
+
o || (o = d), n[r] = f, s[r] = d;
|
|
1202
|
+
let _ = i, b = 0;
|
|
1203
1203
|
for (; _ !== r; )
|
|
1204
|
-
|
|
1204
|
+
b += n[_++], _ = _ % e;
|
|
1205
1205
|
if (r = (r + 1) % e, r === i && (i = (i + 1) % e), d - o < t)
|
|
1206
1206
|
return;
|
|
1207
1207
|
const C = l && d - l;
|
|
1208
|
-
return C ? Math.round(
|
|
1208
|
+
return C ? Math.round(b * 1e3 / C) : void 0;
|
|
1209
1209
|
};
|
|
1210
1210
|
}
|
|
1211
|
-
function
|
|
1211
|
+
function Bs(e, t) {
|
|
1212
1212
|
let n = 0, s = 1e3 / t, r, i;
|
|
1213
1213
|
const o = (d, l = Date.now()) => {
|
|
1214
1214
|
n = l, r = null, i && (clearTimeout(i), i = null), e(...d);
|
|
@@ -1220,17 +1220,17 @@ function Fs(e, t) {
|
|
|
1220
1220
|
}, s - _)));
|
|
1221
1221
|
}, () => r && o(r)];
|
|
1222
1222
|
}
|
|
1223
|
-
const
|
|
1223
|
+
const He = (e, t, n = 3) => {
|
|
1224
1224
|
let s = 0;
|
|
1225
|
-
const r =
|
|
1226
|
-
return
|
|
1227
|
-
const o = i.loaded, a = i.lengthComputable ? i.total : void 0,
|
|
1225
|
+
const r = js(50, 250);
|
|
1226
|
+
return Bs((i) => {
|
|
1227
|
+
const o = i.loaded, a = i.lengthComputable ? i.total : void 0, f = o - s, d = r(f), l = o <= a;
|
|
1228
1228
|
s = o;
|
|
1229
1229
|
const _ = {
|
|
1230
1230
|
loaded: o,
|
|
1231
1231
|
total: a,
|
|
1232
1232
|
progress: a ? o / a : void 0,
|
|
1233
|
-
bytes:
|
|
1233
|
+
bytes: f,
|
|
1234
1234
|
rate: d || void 0,
|
|
1235
1235
|
estimated: d && a && l ? (a - o) / d : void 0,
|
|
1236
1236
|
event: i,
|
|
@@ -1239,17 +1239,17 @@ const je = (e, t, n = 3) => {
|
|
|
1239
1239
|
};
|
|
1240
1240
|
e(_);
|
|
1241
1241
|
}, n);
|
|
1242
|
-
},
|
|
1242
|
+
}, Rt = (e, t) => {
|
|
1243
1243
|
const n = e != null;
|
|
1244
1244
|
return [(s) => t[0]({
|
|
1245
1245
|
lengthComputable: n,
|
|
1246
1246
|
total: e,
|
|
1247
1247
|
loaded: s
|
|
1248
1248
|
}), t[1]];
|
|
1249
|
-
},
|
|
1250
|
-
new URL(
|
|
1251
|
-
|
|
1252
|
-
) : () => !0,
|
|
1249
|
+
}, Et = (e) => (...t) => c.asap(() => e(...t)), Ys = ee.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, ee.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
1250
|
+
new URL(ee.origin),
|
|
1251
|
+
ee.navigator && /(msie|trident)/i.test(ee.navigator.userAgent)
|
|
1252
|
+
) : () => !0, Ms = ee.hasStandardBrowserEnv ? (
|
|
1253
1253
|
// Standard browser envs support document.cookie
|
|
1254
1254
|
{
|
|
1255
1255
|
write(e, t, n, s, r, i, o) {
|
|
@@ -1278,28 +1278,28 @@ const je = (e, t, n = 3) => {
|
|
|
1278
1278
|
}
|
|
1279
1279
|
}
|
|
1280
1280
|
);
|
|
1281
|
-
function
|
|
1281
|
+
function Hs(e) {
|
|
1282
1282
|
return typeof e != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1283
1283
|
}
|
|
1284
|
-
function
|
|
1284
|
+
function Is(e, t) {
|
|
1285
1285
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1286
1286
|
}
|
|
1287
|
-
function
|
|
1288
|
-
let s = !
|
|
1289
|
-
return e && (s || n == !1) ?
|
|
1287
|
+
function cn(e, t, n) {
|
|
1288
|
+
let s = !Hs(t);
|
|
1289
|
+
return e && (s || n == !1) ? Is(e, t) : t;
|
|
1290
1290
|
}
|
|
1291
|
-
const
|
|
1292
|
-
function
|
|
1291
|
+
const St = (e) => e instanceof ie ? { ...e } : e;
|
|
1292
|
+
function ye(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, _, b) {
|
|
1296
|
+
return c.isPlainObject(d) && c.isPlainObject(l) ? c.merge.call({ caseless: b }, 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, _, b) {
|
|
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, _, b);
|
|
1302
|
+
} else return s(d, l, _, b);
|
|
1303
1303
|
}
|
|
1304
1304
|
function i(d, l) {
|
|
1305
1305
|
if (!c.isUndefined(l))
|
|
@@ -1317,7 +1317,7 @@ function pe(e, t) {
|
|
|
1317
1317
|
if (_ in e)
|
|
1318
1318
|
return s(void 0, d);
|
|
1319
1319
|
}
|
|
1320
|
-
const
|
|
1320
|
+
const f = {
|
|
1321
1321
|
url: i,
|
|
1322
1322
|
method: i,
|
|
1323
1323
|
data: i,
|
|
@@ -1346,98 +1346,98 @@ function pe(e, t) {
|
|
|
1346
1346
|
socketPath: o,
|
|
1347
1347
|
responseEncoding: o,
|
|
1348
1348
|
validateStatus: a,
|
|
1349
|
-
headers: (d, l, _) => r(
|
|
1349
|
+
headers: (d, l, _) => r(St(d), St(l), _, !0)
|
|
1350
1350
|
};
|
|
1351
1351
|
return c.forEach(
|
|
1352
1352
|
Object.keys({ ...e, ...t }),
|
|
1353
1353
|
function(l) {
|
|
1354
1354
|
if (l === "__proto__" || l === "constructor" || l === "prototype")
|
|
1355
1355
|
return;
|
|
1356
|
-
const _ = c.hasOwnProp(
|
|
1357
|
-
c.isUndefined(
|
|
1356
|
+
const _ = c.hasOwnProp(f, l) ? f[l] : r, b = _(e[l], t[l], l);
|
|
1357
|
+
c.isUndefined(b) && _ !== a || (n[l] = b);
|
|
1358
1358
|
}
|
|
1359
1359
|
), n;
|
|
1360
1360
|
}
|
|
1361
|
-
const
|
|
1362
|
-
const t =
|
|
1361
|
+
const ln = (e) => {
|
|
1362
|
+
const t = ye({}, 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 = ie.from(o), t.url = sn(cn(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 (ee.hasStandardBrowserEnv || ee.hasStandardBrowserWebWorkerEnv)
|
|
1369
1369
|
o.setContentType(void 0);
|
|
1370
1370
|
else if (c.isFunction(n.getHeaders)) {
|
|
1371
|
-
const
|
|
1372
|
-
Object.entries(
|
|
1371
|
+
const f = n.getHeaders(), d = ["content-type", "content-length"];
|
|
1372
|
+
Object.entries(f).forEach(([l, _]) => {
|
|
1373
1373
|
d.includes(l.toLowerCase()) && o.set(l, _);
|
|
1374
1374
|
});
|
|
1375
1375
|
}
|
|
1376
1376
|
}
|
|
1377
|
-
if (
|
|
1378
|
-
const
|
|
1379
|
-
|
|
1377
|
+
if (ee.hasStandardBrowserEnv && (s && c.isFunction(s) && (s = s(t)), s || s !== !1 && Ys(t.url))) {
|
|
1378
|
+
const f = r && i && Ms.read(i);
|
|
1379
|
+
f && o.set(r, f);
|
|
1380
1380
|
}
|
|
1381
1381
|
return t;
|
|
1382
|
-
},
|
|
1382
|
+
}, $s = typeof XMLHttpRequest < "u", Gs = $s && function(e) {
|
|
1383
1383
|
return new Promise(function(n, s) {
|
|
1384
|
-
const r =
|
|
1384
|
+
const r = ln(e);
|
|
1385
1385
|
let i = r.data;
|
|
1386
|
-
const o =
|
|
1387
|
-
let { responseType: a, onUploadProgress:
|
|
1388
|
-
function
|
|
1389
|
-
C && C(),
|
|
1386
|
+
const o = ie.from(r.headers).normalize();
|
|
1387
|
+
let { responseType: a, onUploadProgress: f, onDownloadProgress: d } = r, l, _, b, C, p;
|
|
1388
|
+
function w() {
|
|
1389
|
+
C && C(), 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 D() {
|
|
1394
1394
|
if (!h)
|
|
1395
1395
|
return;
|
|
1396
|
-
const
|
|
1396
|
+
const T = ie.from(
|
|
1397
1397
|
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
|
|
1398
|
-
),
|
|
1398
|
+
), M = {
|
|
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: T,
|
|
1403
1403
|
config: e,
|
|
1404
1404
|
request: h
|
|
1405
1405
|
};
|
|
1406
|
-
|
|
1407
|
-
n(
|
|
1408
|
-
}, function(
|
|
1409
|
-
s(
|
|
1410
|
-
},
|
|
1406
|
+
an(function(J) {
|
|
1407
|
+
n(J), w();
|
|
1408
|
+
}, function(J) {
|
|
1409
|
+
s(J), w();
|
|
1410
|
+
}, M), 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 = D : h.onreadystatechange = function() {
|
|
1413
|
+
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(D);
|
|
1414
1414
|
}, h.onabort = function() {
|
|
1415
|
-
h && (s(new
|
|
1415
|
+
h && (s(new R("Request aborted", R.ECONNABORTED, e, h)), h = null);
|
|
1416
1416
|
}, h.onerror = function(j) {
|
|
1417
|
-
const
|
|
1418
|
-
|
|
1417
|
+
const M = j && j.message ? j.message : "Network Error", O = new R(M, R.ERR_NETWORK, e, h);
|
|
1418
|
+
O.event = j || null, s(O), h = null;
|
|
1419
1419
|
}, h.ontimeout = function() {
|
|
1420
1420
|
let j = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
|
|
1421
|
-
const
|
|
1422
|
-
r.timeoutErrorMessage && (j = r.timeoutErrorMessage), s(new
|
|
1421
|
+
const M = r.transitional || at;
|
|
1422
|
+
r.timeoutErrorMessage && (j = r.timeoutErrorMessage), s(new R(
|
|
1423
1423
|
j,
|
|
1424
|
-
|
|
1424
|
+
M.clarifyTimeoutError ? R.ETIMEDOUT : R.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(j,
|
|
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(j, M) {
|
|
1429
|
+
h.setRequestHeader(M, j);
|
|
1430
|
+
}), c.isUndefined(r.withCredentials) || (h.withCredentials = !!r.withCredentials), a && a !== "json" && (h.responseType = r.responseType), d && ([b, p] = He(d, !0), h.addEventListener("progress", b)), f && h.upload && ([_, C] = He(f), h.upload.addEventListener("progress", _), h.upload.addEventListener("loadend", C)), (r.cancelToken || r.signal) && (l = (T) => {
|
|
1431
|
+
h && (s(!T || T.type ? new Le(null, e, h) : T), 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 F = Fs(r.url);
|
|
1434
|
+
if (F && ee.protocols.indexOf(F) === -1) {
|
|
1435
|
+
s(new R("Unsupported protocol " + F + ":", R.ERR_BAD_REQUEST, e));
|
|
1436
1436
|
return;
|
|
1437
1437
|
}
|
|
1438
1438
|
h.send(i || null);
|
|
1439
1439
|
});
|
|
1440
|
-
},
|
|
1440
|
+
}, Js = (e, t) => {
|
|
1441
1441
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1442
1442
|
if (t || n) {
|
|
1443
1443
|
let s = new AbortController(), r;
|
|
@@ -1445,11 +1445,11 @@ const on = (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 R ? l : new Le(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 R(`timeout of ${t}ms exceeded`, R.ETIMEDOUT));
|
|
1453
1453
|
}, t);
|
|
1454
1454
|
const a = () => {
|
|
1455
1455
|
e && (o && clearTimeout(o), o = null, e.forEach((d) => {
|
|
@@ -1457,10 +1457,10 @@ const on = (e) => {
|
|
|
1457
1457
|
}), e = null);
|
|
1458
1458
|
};
|
|
1459
1459
|
e.forEach((d) => d.addEventListener("abort", i));
|
|
1460
|
-
const { signal:
|
|
1461
|
-
return
|
|
1460
|
+
const { signal: f } = s;
|
|
1461
|
+
return f.unsubscribe = () => c.asap(a), f;
|
|
1462
1462
|
}
|
|
1463
|
-
},
|
|
1463
|
+
}, Xs = function* (e, t) {
|
|
1464
1464
|
let n = e.byteLength;
|
|
1465
1465
|
if (n < t) {
|
|
1466
1466
|
yield e;
|
|
@@ -1469,10 +1469,10 @@ const on = (e) => {
|
|
|
1469
1469
|
let s = 0, r;
|
|
1470
1470
|
for (; s < n; )
|
|
1471
1471
|
r = s + t, yield e.slice(s, r), s = r;
|
|
1472
|
-
},
|
|
1473
|
-
for await (const n of
|
|
1474
|
-
yield*
|
|
1475
|
-
},
|
|
1472
|
+
}, qs = async function* (e, t) {
|
|
1473
|
+
for await (const n of Vs(e))
|
|
1474
|
+
yield* Xs(n, t);
|
|
1475
|
+
}, Vs = async function* (e) {
|
|
1476
1476
|
if (e[Symbol.asyncIterator]) {
|
|
1477
1477
|
yield* e;
|
|
1478
1478
|
return;
|
|
@@ -1488,200 +1488,200 @@ const on = (e) => {
|
|
|
1488
1488
|
} finally {
|
|
1489
1489
|
await t.cancel();
|
|
1490
1490
|
}
|
|
1491
|
-
},
|
|
1492
|
-
const r =
|
|
1493
|
-
let i = 0, o, a = (
|
|
1494
|
-
o || (o = !0, s && s(
|
|
1491
|
+
}, Dt = (e, t, n, s) => {
|
|
1492
|
+
const r = qs(e, t);
|
|
1493
|
+
let i = 0, o, a = (f) => {
|
|
1494
|
+
o || (o = !0, s && s(f));
|
|
1495
1495
|
};
|
|
1496
1496
|
return new ReadableStream({
|
|
1497
|
-
async pull(
|
|
1497
|
+
async pull(f) {
|
|
1498
1498
|
try {
|
|
1499
1499
|
const { done: d, value: l } = await r.next();
|
|
1500
1500
|
if (d) {
|
|
1501
|
-
a(),
|
|
1501
|
+
a(), f.close();
|
|
1502
1502
|
return;
|
|
1503
1503
|
}
|
|
1504
1504
|
let _ = l.byteLength;
|
|
1505
1505
|
if (n) {
|
|
1506
|
-
let
|
|
1507
|
-
n(
|
|
1506
|
+
let b = i += _;
|
|
1507
|
+
n(b);
|
|
1508
1508
|
}
|
|
1509
|
-
|
|
1509
|
+
f.enqueue(new Uint8Array(l));
|
|
1510
1510
|
} catch (d) {
|
|
1511
1511
|
throw a(d), d;
|
|
1512
1512
|
}
|
|
1513
1513
|
},
|
|
1514
|
-
cancel(
|
|
1515
|
-
return a(
|
|
1514
|
+
cancel(f) {
|
|
1515
|
+
return a(f), r.return();
|
|
1516
1516
|
}
|
|
1517
1517
|
}, {
|
|
1518
1518
|
highWaterMark: 2
|
|
1519
1519
|
});
|
|
1520
|
-
},
|
|
1520
|
+
}, At = 64 * 1024, { isFunction: Fe } = c, Ks = (({ Request: e, Response: t }) => ({
|
|
1521
1521
|
Request: e,
|
|
1522
1522
|
Response: t
|
|
1523
1523
|
}))(c.global), {
|
|
1524
|
-
ReadableStream:
|
|
1525
|
-
TextEncoder:
|
|
1526
|
-
} = c.global,
|
|
1524
|
+
ReadableStream: Ut,
|
|
1525
|
+
TextEncoder: Tt
|
|
1526
|
+
} = c.global, Nt = (e, ...t) => {
|
|
1527
1527
|
try {
|
|
1528
1528
|
return !!e(...t);
|
|
1529
1529
|
} catch {
|
|
1530
1530
|
return !1;
|
|
1531
1531
|
}
|
|
1532
|
-
},
|
|
1532
|
+
}, zs = (e) => {
|
|
1533
1533
|
e = c.merge.call({
|
|
1534
1534
|
skipUndefined: !0
|
|
1535
|
-
},
|
|
1536
|
-
const { fetch: t, Request: n, Response: s } = e, r = t ?
|
|
1535
|
+
}, Ks, e);
|
|
1536
|
+
const { fetch: t, Request: n, Response: s } = e, r = t ? Fe(t) : typeof fetch == "function", i = Fe(n), o = Fe(s);
|
|
1537
1537
|
if (!r)
|
|
1538
1538
|
return !1;
|
|
1539
|
-
const a = r &&
|
|
1540
|
-
let
|
|
1541
|
-
const
|
|
1542
|
-
body: new
|
|
1539
|
+
const a = r && Fe(Ut), f = r && (typeof Tt == "function" ? /* @__PURE__ */ ((p) => (w) => p.encode(w))(new Tt()) : async (p) => new Uint8Array(await new n(p).arrayBuffer())), d = i && a && Nt(() => {
|
|
1540
|
+
let p = !1;
|
|
1541
|
+
const w = new n(ee.origin, {
|
|
1542
|
+
body: new Ut(),
|
|
1543
1543
|
method: "POST",
|
|
1544
1544
|
get duplex() {
|
|
1545
|
-
return
|
|
1545
|
+
return p = !0, "half";
|
|
1546
1546
|
}
|
|
1547
1547
|
}).headers.has("Content-Type");
|
|
1548
|
-
return
|
|
1549
|
-
}), l = o && a &&
|
|
1550
|
-
stream: l && ((
|
|
1548
|
+
return p && !w;
|
|
1549
|
+
}), l = o && a && Nt(() => c.isReadableStream(new s("").body)), _ = {
|
|
1550
|
+
stream: l && ((p) => p.body)
|
|
1551
1551
|
};
|
|
1552
|
-
r && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((
|
|
1553
|
-
!_[
|
|
1554
|
-
let
|
|
1555
|
-
if (
|
|
1556
|
-
return
|
|
1557
|
-
throw new
|
|
1552
|
+
r && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((p) => {
|
|
1553
|
+
!_[p] && (_[p] = (w, h) => {
|
|
1554
|
+
let D = w && w[p];
|
|
1555
|
+
if (D)
|
|
1556
|
+
return D.call(w);
|
|
1557
|
+
throw new R(`Response type '${p}' is not supported`, R.ERR_NOT_SUPPORT, h);
|
|
1558
1558
|
});
|
|
1559
1559
|
});
|
|
1560
|
-
const
|
|
1561
|
-
if (
|
|
1560
|
+
const b = async (p) => {
|
|
1561
|
+
if (p == null)
|
|
1562
1562
|
return 0;
|
|
1563
|
-
if (c.isBlob(
|
|
1564
|
-
return
|
|
1565
|
-
if (c.isSpecCompliantForm(
|
|
1566
|
-
return (await new n(
|
|
1563
|
+
if (c.isBlob(p))
|
|
1564
|
+
return p.size;
|
|
1565
|
+
if (c.isSpecCompliantForm(p))
|
|
1566
|
+
return (await new n(ee.origin, {
|
|
1567
1567
|
method: "POST",
|
|
1568
|
-
body:
|
|
1568
|
+
body: p
|
|
1569
1569
|
}).arrayBuffer()).byteLength;
|
|
1570
|
-
if (c.isArrayBufferView(
|
|
1571
|
-
return
|
|
1572
|
-
if (c.isURLSearchParams(
|
|
1573
|
-
return (await p
|
|
1574
|
-
}, C = async (
|
|
1575
|
-
const h = c.toFiniteNumber(
|
|
1576
|
-
return h ??
|
|
1570
|
+
if (c.isArrayBufferView(p) || c.isArrayBuffer(p))
|
|
1571
|
+
return p.byteLength;
|
|
1572
|
+
if (c.isURLSearchParams(p) && (p = p + ""), c.isString(p))
|
|
1573
|
+
return (await f(p)).byteLength;
|
|
1574
|
+
}, C = async (p, w) => {
|
|
1575
|
+
const h = c.toFiniteNumber(p.getContentLength());
|
|
1576
|
+
return h ?? b(w);
|
|
1577
1577
|
};
|
|
1578
|
-
return async (
|
|
1578
|
+
return async (p) => {
|
|
1579
1579
|
let {
|
|
1580
|
-
url:
|
|
1580
|
+
url: w,
|
|
1581
1581
|
method: h,
|
|
1582
|
-
data:
|
|
1583
|
-
signal:
|
|
1584
|
-
cancelToken:
|
|
1582
|
+
data: D,
|
|
1583
|
+
signal: F,
|
|
1584
|
+
cancelToken: T,
|
|
1585
1585
|
timeout: j,
|
|
1586
|
-
onDownloadProgress:
|
|
1587
|
-
onUploadProgress:
|
|
1588
|
-
responseType:
|
|
1589
|
-
headers:
|
|
1590
|
-
withCredentials:
|
|
1591
|
-
fetchOptions:
|
|
1592
|
-
} =
|
|
1593
|
-
|
|
1594
|
-
let
|
|
1595
|
-
const
|
|
1596
|
-
|
|
1586
|
+
onDownloadProgress: M,
|
|
1587
|
+
onUploadProgress: O,
|
|
1588
|
+
responseType: J,
|
|
1589
|
+
headers: ce,
|
|
1590
|
+
withCredentials: k = "same-origin",
|
|
1591
|
+
fetchOptions: B
|
|
1592
|
+
} = ln(p), le = t || fetch;
|
|
1593
|
+
J = J ? (J + "").toLowerCase() : "text";
|
|
1594
|
+
let Z = Js([F, T && T.toAbortSignal()], j), U = null;
|
|
1595
|
+
const L = Z && Z.unsubscribe && (() => {
|
|
1596
|
+
Z.unsubscribe();
|
|
1597
1597
|
});
|
|
1598
|
-
let
|
|
1598
|
+
let V;
|
|
1599
1599
|
try {
|
|
1600
|
-
if (
|
|
1601
|
-
let u = new n(
|
|
1600
|
+
if (O && d && h !== "get" && h !== "head" && (V = await C(ce, D)) !== 0) {
|
|
1601
|
+
let u = new n(w, {
|
|
1602
1602
|
method: "POST",
|
|
1603
|
-
body:
|
|
1603
|
+
body: D,
|
|
1604
1604
|
duplex: "half"
|
|
1605
|
-
}),
|
|
1606
|
-
if (c.isFormData(
|
|
1607
|
-
const [
|
|
1608
|
-
|
|
1609
|
-
|
|
1605
|
+
}), g;
|
|
1606
|
+
if (c.isFormData(D) && (g = u.headers.get("content-type")) && ce.setContentType(g), u.body) {
|
|
1607
|
+
const [A, E] = Rt(
|
|
1608
|
+
V,
|
|
1609
|
+
He(Et(O))
|
|
1610
1610
|
);
|
|
1611
|
-
|
|
1611
|
+
D = Dt(u.body, At, A, E);
|
|
1612
1612
|
}
|
|
1613
1613
|
}
|
|
1614
|
-
c.isString(
|
|
1615
|
-
const
|
|
1616
|
-
...
|
|
1617
|
-
signal:
|
|
1614
|
+
c.isString(k) || (k = k ? "include" : "omit");
|
|
1615
|
+
const x = i && "credentials" in n.prototype, se = {
|
|
1616
|
+
...B,
|
|
1617
|
+
signal: Z,
|
|
1618
1618
|
method: h.toUpperCase(),
|
|
1619
|
-
headers:
|
|
1620
|
-
body:
|
|
1619
|
+
headers: ce.normalize().toJSON(),
|
|
1620
|
+
body: D,
|
|
1621
1621
|
duplex: "half",
|
|
1622
|
-
credentials:
|
|
1622
|
+
credentials: x ? k : void 0
|
|
1623
1623
|
};
|
|
1624
|
-
|
|
1625
|
-
let
|
|
1626
|
-
const
|
|
1627
|
-
if (l && (
|
|
1624
|
+
U = i && new n(w, se);
|
|
1625
|
+
let y = await (i ? le(U, B) : le(w, se));
|
|
1626
|
+
const K = l && (J === "stream" || J === "response");
|
|
1627
|
+
if (l && (M || K && L)) {
|
|
1628
1628
|
const u = {};
|
|
1629
|
-
["status", "statusText", "headers"].forEach((
|
|
1630
|
-
u[
|
|
1629
|
+
["status", "statusText", "headers"].forEach((Y) => {
|
|
1630
|
+
u[Y] = y[Y];
|
|
1631
1631
|
});
|
|
1632
|
-
const
|
|
1633
|
-
|
|
1634
|
-
|
|
1632
|
+
const g = c.toFiniteNumber(y.headers.get("content-length")), [A, E] = M && Rt(
|
|
1633
|
+
g,
|
|
1634
|
+
He(Et(M), !0)
|
|
1635
1635
|
) || [];
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1636
|
+
y = new s(
|
|
1637
|
+
Dt(y.body, At, A, () => {
|
|
1638
|
+
E && E(), L && L();
|
|
1639
1639
|
}),
|
|
1640
1640
|
u
|
|
1641
1641
|
);
|
|
1642
1642
|
}
|
|
1643
|
-
|
|
1644
|
-
let
|
|
1645
|
-
return !
|
|
1646
|
-
|
|
1647
|
-
data:
|
|
1648
|
-
headers:
|
|
1649
|
-
status:
|
|
1650
|
-
statusText:
|
|
1651
|
-
config:
|
|
1652
|
-
request:
|
|
1643
|
+
J = J || "text";
|
|
1644
|
+
let N = await _[c.findKey(_, J) || "text"](y, p);
|
|
1645
|
+
return !K && L && L(), await new Promise((u, g) => {
|
|
1646
|
+
an(u, g, {
|
|
1647
|
+
data: N,
|
|
1648
|
+
headers: ie.from(y.headers),
|
|
1649
|
+
status: y.status,
|
|
1650
|
+
statusText: y.statusText,
|
|
1651
|
+
config: p,
|
|
1652
|
+
request: U
|
|
1653
1653
|
});
|
|
1654
1654
|
});
|
|
1655
|
-
} catch (
|
|
1656
|
-
throw
|
|
1657
|
-
new
|
|
1655
|
+
} catch (x) {
|
|
1656
|
+
throw L && L(), x && x.name === "TypeError" && /Load failed|fetch/i.test(x.message) ? Object.assign(
|
|
1657
|
+
new R("Network Error", R.ERR_NETWORK, p, U, x && x.response),
|
|
1658
1658
|
{
|
|
1659
|
-
cause:
|
|
1659
|
+
cause: x.cause || x
|
|
1660
1660
|
}
|
|
1661
|
-
) :
|
|
1661
|
+
) : R.from(x, x && x.code, p, U, x && x.response);
|
|
1662
1662
|
}
|
|
1663
1663
|
};
|
|
1664
|
-
},
|
|
1664
|
+
}, Zs = /* @__PURE__ */ new Map(), dn = (e) => {
|
|
1665
1665
|
let t = e && e.env || {};
|
|
1666
1666
|
const { fetch: n, Request: s, Response: r } = t, i = [
|
|
1667
1667
|
s,
|
|
1668
1668
|
r,
|
|
1669
1669
|
n
|
|
1670
1670
|
];
|
|
1671
|
-
let o = i.length, a = o,
|
|
1671
|
+
let o = i.length, a = o, f, d, l = Zs;
|
|
1672
1672
|
for (; a--; )
|
|
1673
|
-
|
|
1673
|
+
f = i[a], d = l.get(f), d === void 0 && l.set(f, d = a ? /* @__PURE__ */ new Map() : zs(t)), l = d;
|
|
1674
1674
|
return d;
|
|
1675
1675
|
};
|
|
1676
|
-
|
|
1677
|
-
const
|
|
1678
|
-
http:
|
|
1679
|
-
xhr:
|
|
1676
|
+
dn();
|
|
1677
|
+
const lt = {
|
|
1678
|
+
http: ms,
|
|
1679
|
+
xhr: Gs,
|
|
1680
1680
|
fetch: {
|
|
1681
|
-
get:
|
|
1681
|
+
get: dn
|
|
1682
1682
|
}
|
|
1683
1683
|
};
|
|
1684
|
-
c.forEach(
|
|
1684
|
+
c.forEach(lt, (e, t) => {
|
|
1685
1685
|
if (e) {
|
|
1686
1686
|
try {
|
|
1687
1687
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1690,8 +1690,8 @@ c.forEach(it, (e, t) => {
|
|
|
1690
1690
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1691
1691
|
}
|
|
1692
1692
|
});
|
|
1693
|
-
const
|
|
1694
|
-
function
|
|
1693
|
+
const vt = (e) => `- ${e}`, Ws = (e) => c.isFunction(e) || e === null || e === !1;
|
|
1694
|
+
function Qs(e, t) {
|
|
1695
1695
|
e = c.isArray(e) ? e : [e];
|
|
1696
1696
|
const { length: n } = e;
|
|
1697
1697
|
let s, r;
|
|
@@ -1699,78 +1699,78 @@ function Zs(e, t) {
|
|
|
1699
1699
|
for (let o = 0; o < n; o++) {
|
|
1700
1700
|
s = e[o];
|
|
1701
1701
|
let a;
|
|
1702
|
-
if (r = s, !
|
|
1703
|
-
throw new
|
|
1702
|
+
if (r = s, !Ws(s) && (r = lt[(a = String(s)).toLowerCase()], r === void 0))
|
|
1703
|
+
throw new R(`Unknown adapter '${a}'`);
|
|
1704
1704
|
if (r && (c.isFunction(r) || (r = r.get(t))))
|
|
1705
1705
|
break;
|
|
1706
1706
|
i[a || "#" + o] = r;
|
|
1707
1707
|
}
|
|
1708
1708
|
if (!r) {
|
|
1709
1709
|
const o = Object.entries(i).map(
|
|
1710
|
-
([
|
|
1710
|
+
([f, d]) => `adapter ${f} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1711
1711
|
);
|
|
1712
1712
|
let a = n ? o.length > 1 ? `since :
|
|
1713
|
-
` + o.map(
|
|
1714
|
-
`) : " " +
|
|
1715
|
-
throw new
|
|
1713
|
+
` + o.map(vt).join(`
|
|
1714
|
+
`) : " " + vt(o[0]) : "as no adapter specified";
|
|
1715
|
+
throw new R(
|
|
1716
1716
|
"There is no suitable adapter to dispatch the request " + a,
|
|
1717
1717
|
"ERR_NOT_SUPPORT"
|
|
1718
1718
|
);
|
|
1719
1719
|
}
|
|
1720
1720
|
return r;
|
|
1721
1721
|
}
|
|
1722
|
-
const
|
|
1722
|
+
const un = {
|
|
1723
1723
|
/**
|
|
1724
1724
|
* Resolve an adapter from a list of adapter names or functions.
|
|
1725
1725
|
* @type {Function}
|
|
1726
1726
|
*/
|
|
1727
|
-
getAdapter:
|
|
1727
|
+
getAdapter: Qs,
|
|
1728
1728
|
/**
|
|
1729
1729
|
* Exposes all known adapters
|
|
1730
1730
|
* @type {Object<string, Function|Object>}
|
|
1731
1731
|
*/
|
|
1732
|
-
adapters:
|
|
1732
|
+
adapters: lt
|
|
1733
1733
|
};
|
|
1734
|
-
function
|
|
1734
|
+
function Ke(e) {
|
|
1735
1735
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1736
|
-
throw new
|
|
1736
|
+
throw new Le(null, e);
|
|
1737
1737
|
}
|
|
1738
|
-
function
|
|
1739
|
-
return
|
|
1738
|
+
function xt(e) {
|
|
1739
|
+
return Ke(e), e.headers = ie.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),
|
|
1743
|
-
return
|
|
1742
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), un.getAdapter(e.adapter || xe.adapter, e)(e).then(function(s) {
|
|
1743
|
+
return Ke(e), s.data = Ve.call(
|
|
1744
1744
|
e,
|
|
1745
1745
|
e.transformResponse,
|
|
1746
1746
|
s
|
|
1747
|
-
), s.headers =
|
|
1747
|
+
), s.headers = ie.from(s.headers), s;
|
|
1748
1748
|
}, function(s) {
|
|
1749
|
-
return
|
|
1749
|
+
return on(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 = ie.from(s.response.headers))), Promise.reject(s);
|
|
1754
1754
|
});
|
|
1755
1755
|
}
|
|
1756
|
-
const
|
|
1756
|
+
const pn = "1.13.5", Xe = {};
|
|
1757
1757
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1758
|
-
|
|
1758
|
+
Xe[e] = function(s) {
|
|
1759
1759
|
return typeof s === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1760
1760
|
};
|
|
1761
1761
|
});
|
|
1762
|
-
const
|
|
1763
|
-
|
|
1762
|
+
const Lt = {};
|
|
1763
|
+
Xe.transitional = function(t, n, s) {
|
|
1764
1764
|
function r(i, o) {
|
|
1765
|
-
return "[Axios v" +
|
|
1765
|
+
return "[Axios v" + pn + "] Transitional option '" + i + "'" + o + (s ? ". " + s : "");
|
|
1766
1766
|
}
|
|
1767
1767
|
return (i, o, a) => {
|
|
1768
1768
|
if (t === !1)
|
|
1769
|
-
throw new
|
|
1769
|
+
throw new R(
|
|
1770
1770
|
r(o, " has been removed" + (n ? " in " + n : "")),
|
|
1771
|
-
|
|
1771
|
+
R.ERR_DEPRECATED
|
|
1772
1772
|
);
|
|
1773
|
-
return n && !
|
|
1773
|
+
return n && !Lt[o] && (Lt[o] = !0, console.warn(
|
|
1774
1774
|
r(
|
|
1775
1775
|
o,
|
|
1776
1776
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
@@ -1778,35 +1778,35 @@ Ie.transitional = function(t, n, s) {
|
|
|
1778
1778
|
)), t ? t(i, o, a) : !0;
|
|
1779
1779
|
};
|
|
1780
1780
|
};
|
|
1781
|
-
|
|
1781
|
+
Xe.spelling = function(t) {
|
|
1782
1782
|
return (n, s) => (console.warn(`${s} is likely a misspelling of ${t}`), !0);
|
|
1783
1783
|
};
|
|
1784
|
-
function
|
|
1784
|
+
function er(e, t, n) {
|
|
1785
1785
|
if (typeof e != "object")
|
|
1786
|
-
throw new
|
|
1786
|
+
throw new R("options must be an object", R.ERR_BAD_OPTION_VALUE);
|
|
1787
1787
|
const s = Object.keys(e);
|
|
1788
1788
|
let r = s.length;
|
|
1789
1789
|
for (; r-- > 0; ) {
|
|
1790
1790
|
const i = s[r], o = t[i];
|
|
1791
1791
|
if (o) {
|
|
1792
|
-
const a = e[i],
|
|
1793
|
-
if (
|
|
1794
|
-
throw new
|
|
1792
|
+
const a = e[i], f = a === void 0 || o(a, i, e);
|
|
1793
|
+
if (f !== !0)
|
|
1794
|
+
throw new R("option " + i + " must be " + f, R.ERR_BAD_OPTION_VALUE);
|
|
1795
1795
|
continue;
|
|
1796
1796
|
}
|
|
1797
1797
|
if (n !== !0)
|
|
1798
|
-
throw new
|
|
1798
|
+
throw new R("Unknown option " + i, R.ERR_BAD_OPTION);
|
|
1799
1799
|
}
|
|
1800
1800
|
}
|
|
1801
|
-
const
|
|
1802
|
-
assertOptions:
|
|
1803
|
-
validators:
|
|
1804
|
-
},
|
|
1805
|
-
let
|
|
1801
|
+
const Ye = {
|
|
1802
|
+
assertOptions: er,
|
|
1803
|
+
validators: Xe
|
|
1804
|
+
}, de = Ye.validators;
|
|
1805
|
+
let he = class {
|
|
1806
1806
|
constructor(t) {
|
|
1807
1807
|
this.defaults = t || {}, this.interceptors = {
|
|
1808
|
-
request: new
|
|
1809
|
-
response: new
|
|
1808
|
+
request: new Ct(),
|
|
1809
|
+
response: new Ct()
|
|
1810
1810
|
};
|
|
1811
1811
|
}
|
|
1812
1812
|
/**
|
|
@@ -1835,21 +1835,21 @@ let de = 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 = ye(this.defaults, n);
|
|
1839
1839
|
const { transitional: s, paramsSerializer: r, headers: i } = n;
|
|
1840
|
-
s !== void 0 &&
|
|
1841
|
-
silentJSONParsing:
|
|
1842
|
-
forcedJSONParsing:
|
|
1843
|
-
clarifyTimeoutError:
|
|
1844
|
-
legacyInterceptorReqResOrdering:
|
|
1840
|
+
s !== void 0 && Ye.assertOptions(s, {
|
|
1841
|
+
silentJSONParsing: de.transitional(de.boolean),
|
|
1842
|
+
forcedJSONParsing: de.transitional(de.boolean),
|
|
1843
|
+
clarifyTimeoutError: de.transitional(de.boolean),
|
|
1844
|
+
legacyInterceptorReqResOrdering: de.transitional(de.boolean)
|
|
1845
1845
|
}, !1), r != null && (c.isFunction(r) ? n.paramsSerializer = {
|
|
1846
1846
|
serialize: r
|
|
1847
|
-
} :
|
|
1848
|
-
encode:
|
|
1849
|
-
serialize:
|
|
1850
|
-
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0),
|
|
1851
|
-
baseUrl:
|
|
1852
|
-
withXsrfToken:
|
|
1847
|
+
} : Ye.assertOptions(r, {
|
|
1848
|
+
encode: de.function,
|
|
1849
|
+
serialize: de.function
|
|
1850
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Ye.assertOptions(n, {
|
|
1851
|
+
baseUrl: de.spelling("baseURL"),
|
|
1852
|
+
withXsrfToken: de.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,
|
|
@@ -1857,59 +1857,59 @@ let de = class {
|
|
|
1857
1857
|
);
|
|
1858
1858
|
i && c.forEach(
|
|
1859
1859
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1860
|
-
(
|
|
1861
|
-
delete i[
|
|
1860
|
+
(p) => {
|
|
1861
|
+
delete i[p];
|
|
1862
1862
|
}
|
|
1863
|
-
), n.headers =
|
|
1863
|
+
), n.headers = ie.concat(o, i);
|
|
1864
1864
|
const a = [];
|
|
1865
|
-
let
|
|
1866
|
-
this.interceptors.request.forEach(function(
|
|
1867
|
-
if (typeof
|
|
1865
|
+
let f = !0;
|
|
1866
|
+
this.interceptors.request.forEach(function(w) {
|
|
1867
|
+
if (typeof w.runWhen == "function" && w.runWhen(n) === !1)
|
|
1868
1868
|
return;
|
|
1869
|
-
|
|
1870
|
-
const h = n.transitional ||
|
|
1871
|
-
h && h.legacyInterceptorReqResOrdering ? a.unshift(
|
|
1869
|
+
f = f && w.synchronous;
|
|
1870
|
+
const h = n.transitional || at;
|
|
1871
|
+
h && h.legacyInterceptorReqResOrdering ? a.unshift(w.fulfilled, w.rejected) : a.push(w.fulfilled, w.rejected);
|
|
1872
1872
|
});
|
|
1873
1873
|
const d = [];
|
|
1874
|
-
this.interceptors.response.forEach(function(
|
|
1875
|
-
d.push(
|
|
1874
|
+
this.interceptors.response.forEach(function(w) {
|
|
1875
|
+
d.push(w.fulfilled, w.rejected);
|
|
1876
1876
|
});
|
|
1877
|
-
let l, _ = 0,
|
|
1878
|
-
if (!
|
|
1879
|
-
const
|
|
1880
|
-
for (
|
|
1881
|
-
l = l.then(
|
|
1877
|
+
let l, _ = 0, b;
|
|
1878
|
+
if (!f) {
|
|
1879
|
+
const p = [xt.bind(this), void 0];
|
|
1880
|
+
for (p.unshift(...a), p.push(...d), b = p.length, l = Promise.resolve(n); _ < b; )
|
|
1881
|
+
l = l.then(p[_++], p[_++]);
|
|
1882
1882
|
return l;
|
|
1883
1883
|
}
|
|
1884
|
-
|
|
1884
|
+
b = a.length;
|
|
1885
1885
|
let C = n;
|
|
1886
|
-
for (; _ <
|
|
1887
|
-
const
|
|
1886
|
+
for (; _ < b; ) {
|
|
1887
|
+
const p = a[_++], w = a[_++];
|
|
1888
1888
|
try {
|
|
1889
|
-
C =
|
|
1889
|
+
C = p(C);
|
|
1890
1890
|
} catch (h) {
|
|
1891
|
-
|
|
1891
|
+
w.call(this, h);
|
|
1892
1892
|
break;
|
|
1893
1893
|
}
|
|
1894
1894
|
}
|
|
1895
1895
|
try {
|
|
1896
|
-
l =
|
|
1897
|
-
} catch (
|
|
1898
|
-
return Promise.reject(
|
|
1896
|
+
l = xt.call(this, C);
|
|
1897
|
+
} catch (p) {
|
|
1898
|
+
return Promise.reject(p);
|
|
1899
1899
|
}
|
|
1900
|
-
for (_ = 0,
|
|
1900
|
+
for (_ = 0, b = d.length; _ < b; )
|
|
1901
1901
|
l = l.then(d[_++], d[_++]);
|
|
1902
1902
|
return l;
|
|
1903
1903
|
}
|
|
1904
1904
|
getUri(t) {
|
|
1905
|
-
t =
|
|
1906
|
-
const n =
|
|
1907
|
-
return
|
|
1905
|
+
t = ye(this.defaults, t);
|
|
1906
|
+
const n = cn(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1907
|
+
return sn(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
|
+
he.prototype[t] = function(n, s) {
|
|
1912
|
+
return this.request(ye(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(ye(a || {}, {
|
|
1923
1923
|
method: t,
|
|
1924
1924
|
headers: s ? {
|
|
1925
1925
|
"Content-Type": "multipart/form-data"
|
|
@@ -1929,9 +1929,9 @@ c.forEach(["post", "put", "patch"], function(t) {
|
|
|
1929
1929
|
}));
|
|
1930
1930
|
};
|
|
1931
1931
|
}
|
|
1932
|
-
|
|
1932
|
+
he.prototype[t] = n(), he.prototype[t + "Form"] = n(!0);
|
|
1933
1933
|
});
|
|
1934
|
-
let
|
|
1934
|
+
let tr = class fn {
|
|
1935
1935
|
constructor(t) {
|
|
1936
1936
|
if (typeof t != "function")
|
|
1937
1937
|
throw new TypeError("executor must be a function.");
|
|
@@ -1955,7 +1955,7 @@ let Qs = class dn {
|
|
|
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 Le(i, o, a), n(s.reason));
|
|
1959
1959
|
});
|
|
1960
1960
|
}
|
|
1961
1961
|
/**
|
|
@@ -1997,22 +1997,22 @@ let Qs = class dn {
|
|
|
1997
1997
|
static source() {
|
|
1998
1998
|
let t;
|
|
1999
1999
|
return {
|
|
2000
|
-
token: new
|
|
2000
|
+
token: new fn(function(r) {
|
|
2001
2001
|
t = r;
|
|
2002
2002
|
}),
|
|
2003
2003
|
cancel: t
|
|
2004
2004
|
};
|
|
2005
2005
|
}
|
|
2006
2006
|
};
|
|
2007
|
-
function
|
|
2007
|
+
function nr(e) {
|
|
2008
2008
|
return function(n) {
|
|
2009
2009
|
return e.apply(null, n);
|
|
2010
2010
|
};
|
|
2011
2011
|
}
|
|
2012
|
-
function
|
|
2012
|
+
function sr(e) {
|
|
2013
2013
|
return c.isObject(e) && e.isAxiosError === !0;
|
|
2014
2014
|
}
|
|
2015
|
-
const
|
|
2015
|
+
const et = {
|
|
2016
2016
|
Continue: 100,
|
|
2017
2017
|
SwitchingProtocols: 101,
|
|
2018
2018
|
Processing: 102,
|
|
@@ -2083,75 +2083,75 @@ const ze = {
|
|
|
2083
2083
|
SslHandshakeFailed: 525,
|
|
2084
2084
|
InvalidSslCertificate: 526
|
|
2085
2085
|
};
|
|
2086
|
-
Object.entries(
|
|
2087
|
-
|
|
2086
|
+
Object.entries(et).forEach(([e, t]) => {
|
|
2087
|
+
et[t] = e;
|
|
2088
2088
|
});
|
|
2089
|
-
function
|
|
2090
|
-
const t = new
|
|
2091
|
-
return c.extend(n,
|
|
2092
|
-
return
|
|
2089
|
+
function mn(e) {
|
|
2090
|
+
const t = new he(e), n = Xt(he.prototype.request, t);
|
|
2091
|
+
return c.extend(n, he.prototype, t, { allOwnKeys: !0 }), c.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(r) {
|
|
2092
|
+
return mn(ye(e, r));
|
|
2093
2093
|
}, n;
|
|
2094
2094
|
}
|
|
2095
|
-
const
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2095
|
+
const G = mn(xe);
|
|
2096
|
+
G.Axios = he;
|
|
2097
|
+
G.CanceledError = Le;
|
|
2098
|
+
G.CancelToken = tr;
|
|
2099
|
+
G.isCancel = on;
|
|
2100
|
+
G.VERSION = pn;
|
|
2101
|
+
G.toFormData = Je;
|
|
2102
|
+
G.AxiosError = R;
|
|
2103
|
+
G.Cancel = G.CanceledError;
|
|
2104
|
+
G.all = function(t) {
|
|
2105
2105
|
return Promise.all(t);
|
|
2106
2106
|
};
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2107
|
+
G.spread = nr;
|
|
2108
|
+
G.isAxiosError = sr;
|
|
2109
|
+
G.mergeConfig = ye;
|
|
2110
|
+
G.AxiosHeaders = ie;
|
|
2111
|
+
G.formToJSON = (e) => rn(c.isHTMLForm(e) ? new FormData(e) : e);
|
|
2112
|
+
G.getAdapter = un.getAdapter;
|
|
2113
|
+
G.HttpStatusCode = et;
|
|
2114
|
+
G.default = G;
|
|
2115
2115
|
const {
|
|
2116
|
-
Axios:
|
|
2117
|
-
AxiosError:
|
|
2118
|
-
CanceledError:
|
|
2119
|
-
isCancel:
|
|
2120
|
-
CancelToken:
|
|
2121
|
-
VERSION:
|
|
2122
|
-
all:
|
|
2123
|
-
Cancel:
|
|
2124
|
-
isAxiosError:
|
|
2125
|
-
spread:
|
|
2126
|
-
toFormData:
|
|
2127
|
-
AxiosHeaders:
|
|
2128
|
-
HttpStatusCode:
|
|
2129
|
-
formToJSON:
|
|
2130
|
-
getAdapter:
|
|
2131
|
-
mergeConfig:
|
|
2132
|
-
} =
|
|
2116
|
+
Axios: Gr,
|
|
2117
|
+
AxiosError: Jr,
|
|
2118
|
+
CanceledError: Xr,
|
|
2119
|
+
isCancel: qr,
|
|
2120
|
+
CancelToken: Vr,
|
|
2121
|
+
VERSION: Kr,
|
|
2122
|
+
all: zr,
|
|
2123
|
+
Cancel: Zr,
|
|
2124
|
+
isAxiosError: Wr,
|
|
2125
|
+
spread: Qr,
|
|
2126
|
+
toFormData: ei,
|
|
2127
|
+
AxiosHeaders: ti,
|
|
2128
|
+
HttpStatusCode: ni,
|
|
2129
|
+
formToJSON: si,
|
|
2130
|
+
getAdapter: ri,
|
|
2131
|
+
mergeConfig: ii
|
|
2132
|
+
} = G, Pt = (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((C) => C(t,
|
|
2137
|
+
const b = t;
|
|
2138
|
+
t = l ?? (typeof _ != "object" || _ === null) ? _ : Object.assign({}, t, _), n.forEach((C) => C(t, b));
|
|
2139
2139
|
}
|
|
2140
|
-
}, r = () => t, a = { setState: s, getState: r, getInitialState: () =>
|
|
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
|
-
},
|
|
2143
|
-
function
|
|
2144
|
-
const n =
|
|
2142
|
+
}, rr = ((e) => e ? Pt(e) : Pt), ir = (e) => e;
|
|
2143
|
+
function or(e, t = ir) {
|
|
2144
|
+
const n = Ae.useSyncExternalStore(
|
|
2145
2145
|
e.subscribe,
|
|
2146
|
-
|
|
2147
|
-
|
|
2146
|
+
Ae.useCallback(() => t(e.getState()), [e, t]),
|
|
2147
|
+
Ae.useCallback(() => t(e.getInitialState()), [e, t])
|
|
2148
2148
|
);
|
|
2149
|
-
return
|
|
2149
|
+
return Ae.useDebugValue(n), n;
|
|
2150
2150
|
}
|
|
2151
|
-
const
|
|
2152
|
-
const t =
|
|
2151
|
+
const Ot = (e) => {
|
|
2152
|
+
const t = rr(e), n = (s) => or(t, s);
|
|
2153
2153
|
return Object.assign(n, t), n;
|
|
2154
|
-
},
|
|
2154
|
+
}, ar = ((e) => e ? Ot(e) : Ot), ge = ar((e) => ({
|
|
2155
2155
|
newsSelectedCandles: null,
|
|
2156
2156
|
newsPlayEndTimestamp: null,
|
|
2157
2157
|
newsTargetCandle: null,
|
|
@@ -2162,7 +2162,7 @@ const xt = (e) => {
|
|
|
2162
2162
|
setNewsTargetCandle: (t) => e({ newsTargetCandle: t }),
|
|
2163
2163
|
setGapCount: (t) => e({ gapCount: t }),
|
|
2164
2164
|
setReplayMode: (t) => e({ isReplayMode: t })
|
|
2165
|
-
})),
|
|
2165
|
+
})), cr = {
|
|
2166
2166
|
"1D": "D1",
|
|
2167
2167
|
D: "D1",
|
|
2168
2168
|
240: "H4",
|
|
@@ -2172,7 +2172,7 @@ const xt = (e) => {
|
|
|
2172
2172
|
15: "M15",
|
|
2173
2173
|
5: "M5",
|
|
2174
2174
|
1: "M1"
|
|
2175
|
-
},
|
|
2175
|
+
}, tt = (e) => ({
|
|
2176
2176
|
1: 60,
|
|
2177
2177
|
5: 300,
|
|
2178
2178
|
// 5 minutes
|
|
@@ -2182,19 +2182,19 @@ const xt = (e) => {
|
|
|
2182
2182
|
// 30 minutes
|
|
2183
2183
|
60: 3600
|
|
2184
2184
|
// 60 minutes (1 hour)
|
|
2185
|
-
})[e] || 3600,
|
|
2186
|
-
const e =
|
|
2185
|
+
})[e] || 3600, _n = [10, 15, 20, 25, 30, 35, 40, 45, 50], hn = It(null), lr = () => {
|
|
2186
|
+
const e = $t(hn);
|
|
2187
2187
|
if (!e)
|
|
2188
2188
|
throw new Error("useWidgetContext must be used inside WidgetProvider");
|
|
2189
2189
|
return e;
|
|
2190
|
-
},
|
|
2190
|
+
}, dr = ({
|
|
2191
2191
|
children: e,
|
|
2192
2192
|
selectedTimeframe: t,
|
|
2193
2193
|
setSelectedTimeframe: n,
|
|
2194
2194
|
currentSymbol: s,
|
|
2195
2195
|
setCurrentSymbol: r
|
|
2196
2196
|
}) => /* @__PURE__ */ m.jsx(
|
|
2197
|
-
|
|
2197
|
+
hn.Provider,
|
|
2198
2198
|
{
|
|
2199
2199
|
value: {
|
|
2200
2200
|
currentSymbol: s,
|
|
@@ -2205,17 +2205,17 @@ const xt = (e) => {
|
|
|
2205
2205
|
children: e
|
|
2206
2206
|
}
|
|
2207
2207
|
);
|
|
2208
|
-
const
|
|
2209
|
-
const
|
|
2210
|
-
const
|
|
2208
|
+
const wn = (...e) => e.filter((t, n, s) => !!t && t.trim() !== "" && s.indexOf(t) === n).join(" ").trim();
|
|
2209
|
+
const ur = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
2210
|
+
const pr = (e) => e.replace(
|
|
2211
2211
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
2212
2212
|
(t, n, s) => s ? s.toUpperCase() : n.toLowerCase()
|
|
2213
2213
|
);
|
|
2214
|
-
const
|
|
2215
|
-
const t =
|
|
2214
|
+
const kt = (e) => {
|
|
2215
|
+
const t = pr(e);
|
|
2216
2216
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
2217
2217
|
};
|
|
2218
|
-
var
|
|
2218
|
+
var fr = {
|
|
2219
2219
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2220
2220
|
width: 24,
|
|
2221
2221
|
height: 24,
|
|
@@ -2226,13 +2226,13 @@ var ur = {
|
|
|
2226
2226
|
strokeLinecap: "round",
|
|
2227
2227
|
strokeLinejoin: "round"
|
|
2228
2228
|
};
|
|
2229
|
-
const
|
|
2229
|
+
const mr = (e) => {
|
|
2230
2230
|
for (const t in e)
|
|
2231
2231
|
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
2232
2232
|
return !0;
|
|
2233
2233
|
return !1;
|
|
2234
2234
|
};
|
|
2235
|
-
const
|
|
2235
|
+
const _r = Gt(
|
|
2236
2236
|
({
|
|
2237
2237
|
color: e = "currentColor",
|
|
2238
2238
|
size: t = 24,
|
|
@@ -2242,43 +2242,43 @@ const fr = Ht(
|
|
|
2242
2242
|
children: i,
|
|
2243
2243
|
iconNode: o,
|
|
2244
2244
|
...a
|
|
2245
|
-
},
|
|
2245
|
+
}, f) => ze(
|
|
2246
2246
|
"svg",
|
|
2247
2247
|
{
|
|
2248
|
-
ref:
|
|
2249
|
-
...
|
|
2248
|
+
ref: f,
|
|
2249
|
+
...fr,
|
|
2250
2250
|
width: t,
|
|
2251
2251
|
height: t,
|
|
2252
2252
|
stroke: e,
|
|
2253
2253
|
strokeWidth: s ? Number(n) * 24 / Number(t) : n,
|
|
2254
|
-
className:
|
|
2255
|
-
...!i && !
|
|
2254
|
+
className: wn("lucide", r),
|
|
2255
|
+
...!i && !mr(a) && { "aria-hidden": "true" },
|
|
2256
2256
|
...a
|
|
2257
2257
|
},
|
|
2258
2258
|
[
|
|
2259
|
-
...o.map(([d, l]) =>
|
|
2259
|
+
...o.map(([d, l]) => ze(d, l)),
|
|
2260
2260
|
...Array.isArray(i) ? i : [i]
|
|
2261
2261
|
]
|
|
2262
2262
|
)
|
|
2263
2263
|
);
|
|
2264
|
-
const
|
|
2265
|
-
const n =
|
|
2266
|
-
({ className: s, ...r }, i) =>
|
|
2264
|
+
const dt = (e, t) => {
|
|
2265
|
+
const n = Gt(
|
|
2266
|
+
({ className: s, ...r }, i) => ze(_r, {
|
|
2267
2267
|
ref: i,
|
|
2268
2268
|
iconNode: t,
|
|
2269
|
-
className:
|
|
2270
|
-
`lucide-${
|
|
2269
|
+
className: wn(
|
|
2270
|
+
`lucide-${ur(kt(e))}`,
|
|
2271
2271
|
`lucide-${e}`,
|
|
2272
2272
|
s
|
|
2273
2273
|
),
|
|
2274
2274
|
...r
|
|
2275
2275
|
})
|
|
2276
2276
|
);
|
|
2277
|
-
return n.displayName =
|
|
2277
|
+
return n.displayName = kt(e), n;
|
|
2278
2278
|
};
|
|
2279
|
-
const
|
|
2280
|
-
const
|
|
2281
|
-
const
|
|
2279
|
+
const hr = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], wr = dt("chevron-down", hr);
|
|
2280
|
+
const yr = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], gr = dt("chevron-left", yr);
|
|
2281
|
+
const Cr = [
|
|
2282
2282
|
[
|
|
2283
2283
|
"path",
|
|
2284
2284
|
{
|
|
@@ -2288,22 +2288,22 @@ const yr = [
|
|
|
2288
2288
|
],
|
|
2289
2289
|
["path", { d: "M19.8 17.8a7.5 7.5 0 0 0 .003-10.603", key: "yol142" }],
|
|
2290
2290
|
["path", { d: "M17 15a3.5 3.5 0 0 0-.025-4.975", key: "ssbmkc" }]
|
|
2291
|
-
],
|
|
2291
|
+
], br = dt("speech", Cr), nt = (e, t) => {
|
|
2292
2292
|
if (!e || e === "-" || e.trim() === "" || !t || t === "-" || t.trim() === "")
|
|
2293
2293
|
return "news-widget__orange";
|
|
2294
2294
|
const n = e.trim().replace(/[kKmMbB%]/g, "").replace(/[^\d.-]/g, ""), s = t.trim().replace(/[kKmMbB%]/g, "").replace(/[^\d.-]/g, ""), r = parseFloat(n) || 0, i = parseFloat(s) || 0;
|
|
2295
2295
|
return r > i ? "news-widget__green" : r === i ? "news-widget__orange" : "news-widget__red";
|
|
2296
|
-
},
|
|
2296
|
+
}, Ft = (e) => e.trim().replaceAll(" ", "").replaceAll("_", ""), Rr = new Intl.DateTimeFormat("en-US", {
|
|
2297
2297
|
year: "numeric",
|
|
2298
2298
|
month: "long",
|
|
2299
2299
|
day: "2-digit",
|
|
2300
2300
|
hour: "2-digit",
|
|
2301
2301
|
minute: "2-digit",
|
|
2302
2302
|
hour12: !1
|
|
2303
|
-
}),
|
|
2304
|
-
const t =
|
|
2303
|
+
}), yn = (e) => {
|
|
2304
|
+
const t = Rr.formatToParts(e), n = (s) => t.find((r) => r.type === s)?.value ?? "";
|
|
2305
2305
|
return `${n("year")} ${n("month")} ${n("day")}, ${n("hour")}:${n("minute")}`;
|
|
2306
|
-
},
|
|
2306
|
+
}, Er = ({
|
|
2307
2307
|
currency: e,
|
|
2308
2308
|
size: t = 24
|
|
2309
2309
|
}) => /* @__PURE__ */ m.jsx(
|
|
@@ -2315,7 +2315,7 @@ const yr = [
|
|
|
2315
2315
|
width: t,
|
|
2316
2316
|
height: t
|
|
2317
2317
|
}
|
|
2318
|
-
),
|
|
2318
|
+
), Sr = ({
|
|
2319
2319
|
title: e,
|
|
2320
2320
|
date: t,
|
|
2321
2321
|
forecast: n,
|
|
@@ -2323,9 +2323,9 @@ const yr = [
|
|
|
2323
2323
|
currency: r
|
|
2324
2324
|
}) => /* @__PURE__ */ m.jsxs("div", { className: "news-widget_news_card__container", children: [
|
|
2325
2325
|
/* @__PURE__ */ m.jsxs("div", { className: "news-widget_news_card__header", children: [
|
|
2326
|
-
r && /* @__PURE__ */ m.jsx("div", { className: "news-widget_news_card__currency_icon", children: /* @__PURE__ */ m.jsx(
|
|
2326
|
+
r && /* @__PURE__ */ m.jsx("div", { className: "news-widget_news_card__currency_icon", children: /* @__PURE__ */ m.jsx(Er, { currency: r }) }),
|
|
2327
2327
|
/* @__PURE__ */ m.jsxs("div", { className: "news-widget_news_card__meta", children: [
|
|
2328
|
-
/* @__PURE__ */ m.jsx("div", { className: "news-widget_news_card__date", children:
|
|
2328
|
+
/* @__PURE__ */ m.jsx("div", { className: "news-widget_news_card__date", children: yn(new Date(t ?? 0)) }),
|
|
2329
2329
|
/* @__PURE__ */ m.jsx("div", { className: "news-widget_news_card__title", children: e })
|
|
2330
2330
|
] })
|
|
2331
2331
|
] }),
|
|
@@ -2335,7 +2335,7 @@ const yr = [
|
|
|
2335
2335
|
/* @__PURE__ */ m.jsx(
|
|
2336
2336
|
"div",
|
|
2337
2337
|
{
|
|
2338
|
-
className: `news-widget_news_card__font_semibold ${
|
|
2338
|
+
className: `news-widget_news_card__font_semibold ${nt(String(s), String(n))}`,
|
|
2339
2339
|
children: s || "-"
|
|
2340
2340
|
}
|
|
2341
2341
|
)
|
|
@@ -2346,7 +2346,7 @@ const yr = [
|
|
|
2346
2346
|
] })
|
|
2347
2347
|
] })
|
|
2348
2348
|
] });
|
|
2349
|
-
function
|
|
2349
|
+
function Dr(e) {
|
|
2350
2350
|
switch (e) {
|
|
2351
2351
|
case "post":
|
|
2352
2352
|
return "news-widget__bg_green";
|
|
@@ -2356,7 +2356,7 @@ function Er(e) {
|
|
|
2356
2356
|
return "news-widget__bg_orange";
|
|
2357
2357
|
}
|
|
2358
2358
|
}
|
|
2359
|
-
const
|
|
2359
|
+
const Ar = ({
|
|
2360
2360
|
eventData: e,
|
|
2361
2361
|
showStatus: t = !0,
|
|
2362
2362
|
showPreviousValues: n = !1,
|
|
@@ -2368,7 +2368,7 @@ const Sr = ({
|
|
|
2368
2368
|
/* @__PURE__ */ m.jsx("div", { className: "news-widget_event_details_card__header_row", children: /* @__PURE__ */ m.jsxs("div", { className: "news-widget_event_details_card__header_inner", children: [
|
|
2369
2369
|
/* @__PURE__ */ m.jsxs("div", { className: "news-widget_event_details_card__timestamp_row", children: [
|
|
2370
2370
|
/* @__PURE__ */ m.jsxs("p", { className: "news-widget_event_details_card__timestamp", children: [
|
|
2371
|
-
e?.timestamp &&
|
|
2371
|
+
e?.timestamp && yn(
|
|
2372
2372
|
new Date(e?.timestamp ?? 0)
|
|
2373
2373
|
),
|
|
2374
2374
|
" "
|
|
@@ -2378,7 +2378,7 @@ const Sr = ({
|
|
|
2378
2378
|
/* @__PURE__ */ m.jsx(
|
|
2379
2379
|
"div",
|
|
2380
2380
|
{
|
|
2381
|
-
className: `news-widget_event_details_card__status ${
|
|
2381
|
+
className: `news-widget_event_details_card__status ${Dr(e.status)}`
|
|
2382
2382
|
}
|
|
2383
2383
|
),
|
|
2384
2384
|
e.status === "post" && "Actual Released",
|
|
@@ -2404,7 +2404,7 @@ const Sr = ({
|
|
|
2404
2404
|
e?.event_time && ` ${e?.event_time}`
|
|
2405
2405
|
] }),
|
|
2406
2406
|
e?.slug == "FOMC" && /* @__PURE__ */ m.jsx(
|
|
2407
|
-
|
|
2407
|
+
br,
|
|
2408
2408
|
{
|
|
2409
2409
|
stroke: "url(#gradient)",
|
|
2410
2410
|
className: "news-widget_event_details_card__speech_icon"
|
|
@@ -2419,7 +2419,7 @@ const Sr = ({
|
|
|
2419
2419
|
/* @__PURE__ */ m.jsx(
|
|
2420
2420
|
"span",
|
|
2421
2421
|
{
|
|
2422
|
-
className: `news-widget_event_details_card__text_bold ${
|
|
2422
|
+
className: `news-widget_event_details_card__text_bold ${nt(e?.actual, e?.forecast)}`,
|
|
2423
2423
|
children: e?.actual || "Soon"
|
|
2424
2424
|
}
|
|
2425
2425
|
)
|
|
@@ -2435,7 +2435,7 @@ const Sr = ({
|
|
|
2435
2435
|
/* @__PURE__ */ m.jsx(
|
|
2436
2436
|
"span",
|
|
2437
2437
|
{
|
|
2438
|
-
className: `news-widget_event_details_card__text_bold ${
|
|
2438
|
+
className: `news-widget_event_details_card__text_bold ${nt(
|
|
2439
2439
|
e?.similar?.referenceEvent?.previous_actual,
|
|
2440
2440
|
e?.similar?.referenceEvent?.previous_forecast
|
|
2441
2441
|
)}`,
|
|
@@ -2477,7 +2477,7 @@ const Sr = ({
|
|
|
2477
2477
|
] }),
|
|
2478
2478
|
e?.similar?.referenceEvent?.previousEvents.length > 0 && /* @__PURE__ */ m.jsx("div", { className: "news-widget_event_details_card__previous_events_list", children: e?.similar?.referenceEvent?.previousEvents?.map(
|
|
2479
2479
|
(i, o) => /* @__PURE__ */ m.jsx(
|
|
2480
|
-
|
|
2480
|
+
Sr,
|
|
2481
2481
|
{
|
|
2482
2482
|
title: i.event_name,
|
|
2483
2483
|
date: new Date(i.timestamp),
|
|
@@ -2491,16 +2491,16 @@ const Sr = ({
|
|
|
2491
2491
|
] })
|
|
2492
2492
|
}
|
|
2493
2493
|
)
|
|
2494
|
-
] }),
|
|
2494
|
+
] }), Ur = ({
|
|
2495
2495
|
newsDetail: e,
|
|
2496
2496
|
children: t,
|
|
2497
2497
|
isCompared: n
|
|
2498
2498
|
}) => {
|
|
2499
|
-
const [s, r] =
|
|
2499
|
+
const [s, r] = ae(!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(
|
|
2503
|
-
|
|
2503
|
+
Ar,
|
|
2504
2504
|
{
|
|
2505
2505
|
eventData: e.event,
|
|
2506
2506
|
showPreviousValues: !n,
|
|
@@ -2514,13 +2514,13 @@ const Sr = ({
|
|
|
2514
2514
|
type: "button",
|
|
2515
2515
|
className: `news-widget__button news-widget_event_details__ghost_button ${s ? "news-widget_event_details__ghost_button_open" : ""}`,
|
|
2516
2516
|
onClick: () => r(!s),
|
|
2517
|
-
children: /* @__PURE__ */ m.jsx(
|
|
2517
|
+
children: /* @__PURE__ */ m.jsx(wr, { className: "news-widget_event_details__icon" })
|
|
2518
2518
|
}
|
|
2519
2519
|
)
|
|
2520
2520
|
] }),
|
|
2521
2521
|
/* @__PURE__ */ m.jsx("div", { className: "news-widget_event_details__chart_wrapper", children: /* @__PURE__ */ m.jsx("div", { className: "news-widget_event_details__chart", children: t }) })
|
|
2522
2522
|
] });
|
|
2523
|
-
},
|
|
2523
|
+
}, Tr = [
|
|
2524
2524
|
{ name: "LTC_USD", type: "CFD", pipLocation: -1 },
|
|
2525
2525
|
{ name: "HK33_HKD", type: "CFD", pipLocation: 0 },
|
|
2526
2526
|
{ name: "USD_JPY", type: "CURRENCY", pipLocation: -2 },
|
|
@@ -2651,79 +2651,79 @@ const Sr = ({
|
|
|
2651
2651
|
{ name: "BCO_USD", type: "CFD", pipLocation: -2 },
|
|
2652
2652
|
{ name: "AUD_JPY", type: "CURRENCY", pipLocation: -2 }
|
|
2653
2653
|
];
|
|
2654
|
-
function
|
|
2654
|
+
function Nr(e, t, n = 1) {
|
|
2655
2655
|
if (t === 0 || !isFinite(t)) return n;
|
|
2656
2656
|
const s = e / t;
|
|
2657
2657
|
return isFinite(s) ? s : n;
|
|
2658
2658
|
}
|
|
2659
|
-
function
|
|
2659
|
+
function jt(e) {
|
|
2660
2660
|
if (e.length === 0) return 0;
|
|
2661
2661
|
const t = [...e].sort((s, r) => s - r), n = Math.floor(t.length / 2);
|
|
2662
2662
|
return t.length % 2 !== 0 ? t[n] : (t[n - 1] + t[n]) / 2;
|
|
2663
2663
|
}
|
|
2664
|
-
function
|
|
2664
|
+
function vr(e, t, n = []) {
|
|
2665
2665
|
if (e.length === 0) return [];
|
|
2666
|
-
const s = n.map((l) => Math.abs(l.c - l.o)), r = e.map((l) => Math.abs(l.c - l.o)), i =
|
|
2666
|
+
const s = n.map((l) => Math.abs(l.c - l.o)), r = e.map((l) => Math.abs(l.c - l.o)), i = jt(r), o = jt(s), a = Nr(o, i), f = e[0].o, d = t.c;
|
|
2667
2667
|
return e.map((l) => {
|
|
2668
|
-
const _ = (l.o -
|
|
2668
|
+
const _ = (l.o - f) * a + d, b = (l.h - f) * a + d, C = (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(C, _,
|
|
2673
|
-
c:
|
|
2671
|
+
h: Math.max(b, _, p),
|
|
2672
|
+
l: Math.min(C, _, p),
|
|
2673
|
+
c: p
|
|
2674
2674
|
};
|
|
2675
2675
|
});
|
|
2676
2676
|
}
|
|
2677
|
-
const
|
|
2678
|
-
const t = new Date(e +
|
|
2679
|
-
return n === 0 ? !1 : n === 1 ? s >=
|
|
2680
|
-
},
|
|
2681
|
-
const t = new Date(e +
|
|
2682
|
-
if (n === 0 || n === 1 && s <
|
|
2677
|
+
const we = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 : parseInt(e, 10) * 60, st = 8, gn = 4, rt = 5, Cn = (e) => {
|
|
2678
|
+
const t = new Date(e + st * 60 * 60 * 1e3), n = t.getUTCDay(), s = t.getUTCHours();
|
|
2679
|
+
return n === 0 ? !1 : n === 1 ? s >= rt : n === 6 ? s <= gn : !0;
|
|
2680
|
+
}, bn = (e) => {
|
|
2681
|
+
const t = new Date(e + st * 60 * 60 * 1e3), n = t.getUTCDay(), s = t.getUTCHours();
|
|
2682
|
+
if (n === 0 || n === 1 && s < rt || n === 6 && s >= gn) {
|
|
2683
2683
|
const r = (8 - n) % 7;
|
|
2684
|
-
return t.setUTCDate(t.getUTCDate() + r), t.setUTCHours(
|
|
2684
|
+
return t.setUTCDate(t.getUTCDate() + r), t.setUTCHours(rt, 0, 0, 0), t.getTime() - st * 60 * 60 * 1e3;
|
|
2685
2685
|
}
|
|
2686
2686
|
return e;
|
|
2687
|
-
},
|
|
2688
|
-
const s =
|
|
2687
|
+
}, xr = (e, t, n) => {
|
|
2688
|
+
const s = we(t) * 1e3, r = [];
|
|
2689
2689
|
let i = e;
|
|
2690
2690
|
for (let o = 0; o < n; o++)
|
|
2691
|
-
i += s,
|
|
2691
|
+
i += s, Cn(i) || (i = bn(i)), r.push(i);
|
|
2692
2692
|
return r;
|
|
2693
|
-
},
|
|
2693
|
+
}, Bt = (e, t, n, s) => {
|
|
2694
2694
|
if (n <= 0) return [];
|
|
2695
2695
|
if (s === "24x7") {
|
|
2696
|
-
const i =
|
|
2696
|
+
const i = we(t) * 1e3;
|
|
2697
2697
|
return Array.from(
|
|
2698
2698
|
{ length: n },
|
|
2699
2699
|
(o, a) => e + (a + 1) * i
|
|
2700
2700
|
);
|
|
2701
2701
|
}
|
|
2702
2702
|
if (s === "1700-1700")
|
|
2703
|
-
return
|
|
2704
|
-
const r =
|
|
2703
|
+
return xr(e, t, n);
|
|
2704
|
+
const r = we(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 = we(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 = we(n) * 1e3;
|
|
2719
2719
|
let o = 0, a = e;
|
|
2720
2720
|
for (; a < t; )
|
|
2721
|
-
a += i,
|
|
2721
|
+
a += i, Cn(a) || (a = bn(a)), a <= t && o++;
|
|
2722
2722
|
return o;
|
|
2723
2723
|
}
|
|
2724
|
-
const r =
|
|
2724
|
+
const r = we(n) * 1e3;
|
|
2725
2725
|
return Math.max(0, Math.floor((t - e) / r));
|
|
2726
|
-
},
|
|
2726
|
+
}, Rn = [
|
|
2727
2727
|
{
|
|
2728
2728
|
ticker: "EUR_JPY",
|
|
2729
2729
|
display_name: "EURJPY",
|
|
@@ -3124,7 +3124,7 @@ const ue = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3124
3124
|
type: "commodity",
|
|
3125
3125
|
session: "1700-1700"
|
|
3126
3126
|
}
|
|
3127
|
-
],
|
|
3127
|
+
], Pr = ({
|
|
3128
3128
|
replayTabId: e,
|
|
3129
3129
|
futureBarsRef: t,
|
|
3130
3130
|
highlightBarsRef: n,
|
|
@@ -3134,23 +3134,23 @@ const ue = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3134
3134
|
resolution: i,
|
|
3135
3135
|
symbol: o
|
|
3136
3136
|
}) => {
|
|
3137
|
-
const a =
|
|
3137
|
+
const a = ge(
|
|
3138
3138
|
(C) => C.newsSelectedCandles
|
|
3139
|
-
),
|
|
3139
|
+
), f = ge((C) => C.newsTargetCandle), d = ge(
|
|
3140
3140
|
(C) => C.newsPlayEndTimestamp
|
|
3141
|
-
), l =
|
|
3142
|
-
return
|
|
3141
|
+
), l = ge((C) => C.gapCount), _ = ue(a), b = ue(null);
|
|
3142
|
+
return pe(() => {
|
|
3143
3143
|
const C = {
|
|
3144
3144
|
current: null
|
|
3145
3145
|
};
|
|
3146
|
-
let
|
|
3146
|
+
let p = null, w = !1;
|
|
3147
3147
|
return (async () => {
|
|
3148
|
-
if (!
|
|
3149
|
-
if (a?.length &&
|
|
3150
|
-
if (
|
|
3148
|
+
if (!w) {
|
|
3149
|
+
if (a?.length && f !== null) {
|
|
3150
|
+
if (b.current === a) return;
|
|
3151
3151
|
t.current = [];
|
|
3152
|
-
const
|
|
3153
|
-
if (_.current ||
|
|
3152
|
+
const h = d != null;
|
|
3153
|
+
if (_.current || h)
|
|
3154
3154
|
try {
|
|
3155
3155
|
s?.current?.resetCache(), s?.current?.activeChart().resetData();
|
|
3156
3156
|
} catch {
|
|
@@ -3159,57 +3159,56 @@ const ue = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3159
3159
|
s?.current?.activeChart().executeActionById("timeScaleReset");
|
|
3160
3160
|
} catch {
|
|
3161
3161
|
}
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
p[p.length - 1].timestamp,
|
|
3162
|
+
const F = [...a].slice(-50 - (l || 0)), T = vr(
|
|
3163
|
+
F,
|
|
3164
|
+
f[f.length - 1],
|
|
3165
|
+
f
|
|
3166
|
+
), M = Rn.find(
|
|
3167
|
+
(U) => U.ticker === o || U.display_name === o
|
|
3168
|
+
)?.session || "24x7", O = Bt(
|
|
3169
|
+
f[f.length - 1].timestamp,
|
|
3171
3170
|
i,
|
|
3172
3171
|
l || 0,
|
|
3173
|
-
|
|
3174
|
-
),
|
|
3175
|
-
l ?
|
|
3172
|
+
M
|
|
3173
|
+
), J = Bt(
|
|
3174
|
+
l ? O[O.length - 1] : f[f.length - 1].timestamp,
|
|
3176
3175
|
i,
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
), k =
|
|
3180
|
-
(
|
|
3181
|
-
open:
|
|
3182
|
-
high:
|
|
3183
|
-
low:
|
|
3184
|
-
close:
|
|
3185
|
-
time:
|
|
3176
|
+
T.length,
|
|
3177
|
+
M
|
|
3178
|
+
), k = T.map(
|
|
3179
|
+
(U, L) => ({
|
|
3180
|
+
open: U.o,
|
|
3181
|
+
high: U.h,
|
|
3182
|
+
low: U.l,
|
|
3183
|
+
close: U.c,
|
|
3184
|
+
time: J[L]
|
|
3186
3185
|
})
|
|
3187
|
-
).sort((
|
|
3186
|
+
).sort((U, L) => U.time - L.time);
|
|
3188
3187
|
n.current = k.slice(-50);
|
|
3189
|
-
let
|
|
3190
|
-
const
|
|
3191
|
-
C.current && (clearInterval(C.current), C.current = null),
|
|
3188
|
+
let B = 0, le = 0;
|
|
3189
|
+
const Z = async () => {
|
|
3190
|
+
C.current && (clearInterval(C.current), C.current = null), b.current = a;
|
|
3192
3191
|
try {
|
|
3193
3192
|
a && k.length > 0;
|
|
3194
|
-
} catch (
|
|
3195
|
-
console.error("Error setting visible range:",
|
|
3193
|
+
} catch (U) {
|
|
3194
|
+
console.error("Error setting visible range:", U);
|
|
3196
3195
|
}
|
|
3197
3196
|
};
|
|
3198
|
-
k.length === 0 ? (t.current = [], await
|
|
3199
|
-
C.current = setInterval(() => {
|
|
3200
|
-
if (
|
|
3201
|
-
if (r(e, k[
|
|
3202
|
-
t.current = k.slice(0,
|
|
3203
|
-
else if (
|
|
3197
|
+
k.length === 0 ? (t.current = [], await Z()) : p = setTimeout(() => {
|
|
3198
|
+
w || (C.current = setInterval(() => {
|
|
3199
|
+
if (B < k.length) {
|
|
3200
|
+
if (r(e, k[B]))
|
|
3201
|
+
t.current = k.slice(0, B + 1), B++, le = 0, B === k.length && (t.current = k, Z());
|
|
3202
|
+
else if (le++, le >= 10) {
|
|
3204
3203
|
t.current = [...k];
|
|
3205
3204
|
try {
|
|
3206
3205
|
s?.current?.activeChart().resetData();
|
|
3207
3206
|
} catch {
|
|
3208
3207
|
}
|
|
3209
|
-
|
|
3208
|
+
Z();
|
|
3210
3209
|
}
|
|
3211
3210
|
}
|
|
3212
|
-
}, 150);
|
|
3211
|
+
}, 150));
|
|
3213
3212
|
}, 700);
|
|
3214
3213
|
} else {
|
|
3215
3214
|
if (t.current = [], _.current)
|
|
@@ -3217,12 +3216,12 @@ const ue = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3217
3216
|
s?.current?.resetCache(), s?.current?.activeChart().resetData();
|
|
3218
3217
|
} catch {
|
|
3219
3218
|
}
|
|
3220
|
-
|
|
3219
|
+
b.current = null;
|
|
3221
3220
|
}
|
|
3222
3221
|
_.current = a;
|
|
3223
3222
|
}
|
|
3224
3223
|
})(), () => {
|
|
3225
|
-
|
|
3224
|
+
w = !0, p && clearTimeout(p), C.current && (t.current = [], clearInterval(C.current));
|
|
3226
3225
|
};
|
|
3227
3226
|
}, [
|
|
3228
3227
|
r,
|
|
@@ -3230,16 +3229,16 @@ const ue = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3230
3229
|
n,
|
|
3231
3230
|
d,
|
|
3232
3231
|
a,
|
|
3233
|
-
|
|
3232
|
+
f,
|
|
3234
3233
|
e,
|
|
3235
3234
|
i,
|
|
3236
3235
|
o,
|
|
3237
3236
|
s,
|
|
3238
3237
|
l
|
|
3239
|
-
]),
|
|
3238
|
+
]), pe(() => {
|
|
3240
3239
|
a === null && (n.current = []);
|
|
3241
3240
|
}, [n, a]), /* @__PURE__ */ m.jsx(m.Fragment, {});
|
|
3242
|
-
},
|
|
3241
|
+
}, Or = ({
|
|
3243
3242
|
children: e,
|
|
3244
3243
|
eventId: t,
|
|
3245
3244
|
widgetKey: n,
|
|
@@ -3248,57 +3247,60 @@ const ue = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3248
3247
|
theme: i,
|
|
3249
3248
|
newsDetail: o,
|
|
3250
3249
|
selectedCandles: a,
|
|
3251
|
-
defaultSymbol:
|
|
3250
|
+
defaultSymbol: f,
|
|
3252
3251
|
currentSymbol: d,
|
|
3253
3252
|
currentTimeFrame: l,
|
|
3254
3253
|
isUpcoming: _ = !1,
|
|
3255
|
-
isElapsed:
|
|
3254
|
+
isElapsed: b = !1,
|
|
3256
3255
|
onBack: C,
|
|
3257
|
-
pushBar:
|
|
3258
|
-
|
|
3256
|
+
pushBar: p,
|
|
3257
|
+
iframeRef: w,
|
|
3259
3258
|
futureRef: h,
|
|
3260
|
-
|
|
3261
|
-
|
|
3259
|
+
pendingMessageRef: D,
|
|
3260
|
+
iframeReadyToListenRef: F,
|
|
3261
|
+
highlightBarsRef: T,
|
|
3262
|
+
setGapCountExternal: j,
|
|
3263
|
+
setReplayModeExternal: M
|
|
3262
3264
|
}) => {
|
|
3263
|
-
const
|
|
3264
|
-
setNewsTargetCandle:
|
|
3265
|
-
setGapCount:
|
|
3266
|
-
setNewsPlayEndTimestamp:
|
|
3267
|
-
setNewsSelectedCandles:
|
|
3268
|
-
} =
|
|
3269
|
-
return
|
|
3265
|
+
const O = ue(null), { setCurrentSymbol: J, setSelectedTimeframe: ce } = lr(), {
|
|
3266
|
+
setNewsTargetCandle: k,
|
|
3267
|
+
setGapCount: B,
|
|
3268
|
+
setNewsPlayEndTimestamp: le,
|
|
3269
|
+
setNewsSelectedCandles: Z
|
|
3270
|
+
} = ge();
|
|
3271
|
+
return pe(() => {
|
|
3270
3272
|
if (!t || t == "" || !s) return;
|
|
3271
|
-
const
|
|
3273
|
+
const U = () => {
|
|
3272
3274
|
if (s) {
|
|
3273
|
-
const
|
|
3274
|
-
|
|
3275
|
+
const y = s?.activeChart();
|
|
3276
|
+
y && y.getAllShapes().forEach((K) => {
|
|
3275
3277
|
try {
|
|
3276
|
-
|
|
3277
|
-
} catch (
|
|
3278
|
-
console.error("Failed to remove shape",
|
|
3278
|
+
y.removeEntity(K.id);
|
|
3279
|
+
} catch (N) {
|
|
3280
|
+
console.error("Failed to remove shape", N);
|
|
3279
3281
|
}
|
|
3280
3282
|
});
|
|
3281
3283
|
}
|
|
3282
|
-
},
|
|
3283
|
-
const { data:
|
|
3284
|
+
}, L = async () => {
|
|
3285
|
+
const { data: y, status: K } = await G.get(
|
|
3284
3286
|
`https://corprate-widget.iccandle.ai/news/${t}`,
|
|
3285
3287
|
{
|
|
3286
3288
|
headers: { "api-key": n },
|
|
3287
|
-
params: { symbol:
|
|
3289
|
+
params: { symbol: f }
|
|
3288
3290
|
}
|
|
3289
3291
|
);
|
|
3290
|
-
if (
|
|
3292
|
+
if (K !== 200) {
|
|
3291
3293
|
console.error("Failed to fetch news detail");
|
|
3292
3294
|
return;
|
|
3293
3295
|
}
|
|
3294
|
-
return
|
|
3296
|
+
return y;
|
|
3295
3297
|
};
|
|
3296
|
-
let
|
|
3297
|
-
const
|
|
3298
|
-
const
|
|
3299
|
-
return
|
|
3298
|
+
let V = !1;
|
|
3299
|
+
const x = [], se = (y, K) => {
|
|
3300
|
+
const N = window.setTimeout(y, K);
|
|
3301
|
+
return x.push(N), N;
|
|
3300
3302
|
};
|
|
3301
|
-
return
|
|
3303
|
+
return O.current = s, s.onChartReady(async () => {
|
|
3302
3304
|
i === "dark" || i === "system" ? (s.applyOverrides({
|
|
3303
3305
|
//chart background
|
|
3304
3306
|
"paneProperties.background": "#000000",
|
|
@@ -3320,19 +3322,11 @@ const ue = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3320
3322
|
"--tv-color-platform-background",
|
|
3321
3323
|
"#f9fafb"
|
|
3322
3324
|
));
|
|
3323
|
-
const
|
|
3324
|
-
if (!
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
!0,
|
|
3329
|
-
!0
|
|
3330
|
-
);
|
|
3331
|
-
w && g.bringToFront([w]), j.current = !0;
|
|
3332
|
-
}
|
|
3333
|
-
const J = async (w, S) => {
|
|
3334
|
-
await g.createShape(
|
|
3335
|
-
{ time: S },
|
|
3325
|
+
const y = s.activeChart();
|
|
3326
|
+
if (!y) return;
|
|
3327
|
+
const K = async (E, Y) => {
|
|
3328
|
+
await y.createShape(
|
|
3329
|
+
{ time: Y },
|
|
3336
3330
|
{
|
|
3337
3331
|
shape: "vertical_line",
|
|
3338
3332
|
lock: !0,
|
|
@@ -3340,44 +3334,44 @@ const ue = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3340
3334
|
overrides: { linestyle: 2, linewidth: 1 }
|
|
3341
3335
|
}
|
|
3342
3336
|
);
|
|
3343
|
-
const
|
|
3344
|
-
let
|
|
3345
|
-
if (
|
|
3346
|
-
const
|
|
3347
|
-
(
|
|
3337
|
+
const H = await y.exportData(), S = H.data.findIndex((v) => v[0] === Y);
|
|
3338
|
+
let z = a;
|
|
3339
|
+
if (S != -1 && !z && (z = [..._n].sort((v, X) => X - v).find((v) => H.data[S + v]) ?? null), S != -1 && z) {
|
|
3340
|
+
const v = E, X = H.data[S + z][0], I = H.data.filter(
|
|
3341
|
+
(oe) => oe[0] > v && oe[0] <= X
|
|
3348
3342
|
) ?? [];
|
|
3349
|
-
let
|
|
3350
|
-
if (
|
|
3351
|
-
const
|
|
3352
|
-
(
|
|
3343
|
+
let Q = null, me = null;
|
|
3344
|
+
if (I.length > 0) {
|
|
3345
|
+
const oe = I.reduce(
|
|
3346
|
+
(te, ne, P, q) => Number(ne[3]) < Number(q[te][3]) ? P : te,
|
|
3353
3347
|
0
|
|
3354
|
-
),
|
|
3355
|
-
|
|
3356
|
-
time:
|
|
3357
|
-
value: Number(
|
|
3348
|
+
), $ = I[oe];
|
|
3349
|
+
me = {
|
|
3350
|
+
time: $[0],
|
|
3351
|
+
value: Number($[3])
|
|
3358
3352
|
};
|
|
3359
3353
|
}
|
|
3360
|
-
if (
|
|
3361
|
-
const
|
|
3362
|
-
(
|
|
3354
|
+
if (I.length > 0) {
|
|
3355
|
+
const oe = I.reduce(
|
|
3356
|
+
(te, ne, P, q) => Number(ne[2]) > Number(q[te][2]) ? P : te,
|
|
3363
3357
|
0
|
|
3364
|
-
),
|
|
3365
|
-
|
|
3366
|
-
time:
|
|
3367
|
-
value: Number(
|
|
3358
|
+
), $ = I[oe];
|
|
3359
|
+
Q = {
|
|
3360
|
+
time: $[0],
|
|
3361
|
+
value: Number($[2])
|
|
3368
3362
|
};
|
|
3369
3363
|
}
|
|
3370
|
-
if (
|
|
3371
|
-
const
|
|
3372
|
-
await
|
|
3364
|
+
if (Q && me && I.length > 0) {
|
|
3365
|
+
const oe = Q.value, $ = me.value, ne = H.data[S + 1][1];
|
|
3366
|
+
await y.createMultipointShape(
|
|
3373
3367
|
[
|
|
3374
3368
|
{
|
|
3375
|
-
time:
|
|
3376
|
-
price:
|
|
3369
|
+
time: v,
|
|
3370
|
+
price: ne
|
|
3377
3371
|
},
|
|
3378
3372
|
{
|
|
3379
|
-
time:
|
|
3380
|
-
price:
|
|
3373
|
+
time: X,
|
|
3374
|
+
price: oe
|
|
3381
3375
|
}
|
|
3382
3376
|
],
|
|
3383
3377
|
{
|
|
@@ -3396,15 +3390,15 @@ const ue = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3396
3390
|
frozen: !0
|
|
3397
3391
|
}
|
|
3398
3392
|
}
|
|
3399
|
-
), await
|
|
3393
|
+
), await y.createMultipointShape(
|
|
3400
3394
|
[
|
|
3401
3395
|
{
|
|
3402
|
-
time:
|
|
3403
|
-
price:
|
|
3396
|
+
time: v,
|
|
3397
|
+
price: $
|
|
3404
3398
|
},
|
|
3405
3399
|
{
|
|
3406
|
-
time:
|
|
3407
|
-
price:
|
|
3400
|
+
time: X,
|
|
3401
|
+
price: ne
|
|
3408
3402
|
}
|
|
3409
3403
|
],
|
|
3410
3404
|
{
|
|
@@ -3422,15 +3416,15 @@ const ue = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3422
3416
|
frozen: !0
|
|
3423
3417
|
}
|
|
3424
3418
|
}
|
|
3425
|
-
), await
|
|
3419
|
+
), await y.createMultipointShape(
|
|
3426
3420
|
[
|
|
3427
3421
|
{
|
|
3428
|
-
time:
|
|
3429
|
-
price:
|
|
3422
|
+
time: v,
|
|
3423
|
+
price: oe
|
|
3430
3424
|
},
|
|
3431
3425
|
{
|
|
3432
|
-
time:
|
|
3433
|
-
price:
|
|
3426
|
+
time: X,
|
|
3427
|
+
price: oe
|
|
3434
3428
|
}
|
|
3435
3429
|
],
|
|
3436
3430
|
{
|
|
@@ -3443,15 +3437,15 @@ const ue = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3443
3437
|
extendRight: !0
|
|
3444
3438
|
}
|
|
3445
3439
|
}
|
|
3446
|
-
), await
|
|
3440
|
+
), await y.createMultipointShape(
|
|
3447
3441
|
[
|
|
3448
3442
|
{
|
|
3449
|
-
time:
|
|
3450
|
-
price:
|
|
3443
|
+
time: v,
|
|
3444
|
+
price: $
|
|
3451
3445
|
},
|
|
3452
3446
|
{
|
|
3453
|
-
time:
|
|
3454
|
-
price:
|
|
3447
|
+
time: X,
|
|
3448
|
+
price: $
|
|
3455
3449
|
}
|
|
3456
3450
|
],
|
|
3457
3451
|
{
|
|
@@ -3465,26 +3459,26 @@ const ue = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3465
3459
|
}
|
|
3466
3460
|
}
|
|
3467
3461
|
);
|
|
3468
|
-
const
|
|
3469
|
-
(
|
|
3462
|
+
const P = Tr.find(
|
|
3463
|
+
(Oe) => Ft(Oe.name) == Ft(d)
|
|
3470
3464
|
)?.pipLocation;
|
|
3471
|
-
let
|
|
3472
|
-
if (
|
|
3473
|
-
const
|
|
3474
|
-
Math.abs((
|
|
3465
|
+
let q = "", W = "";
|
|
3466
|
+
if (P) {
|
|
3467
|
+
const Oe = Math.pow(10, -P), ut = parseFloat(
|
|
3468
|
+
Math.abs((oe - ne) * Oe).toFixed(
|
|
3475
3469
|
1
|
|
3476
3470
|
)
|
|
3477
|
-
),
|
|
3478
|
-
Math.abs((
|
|
3471
|
+
), pt = parseFloat(
|
|
3472
|
+
Math.abs(($ - ne) * Oe).toFixed(
|
|
3479
3473
|
1
|
|
3480
3474
|
)
|
|
3481
3475
|
);
|
|
3482
|
-
|
|
3476
|
+
q = `${ut >= 0 ? "+" : ""}${ut.toFixed(2)} pip`, W = `${pt >= 0 ? "-" : ""}${pt.toFixed(2)} pip`;
|
|
3483
3477
|
}
|
|
3484
|
-
await
|
|
3478
|
+
await y.createShape(
|
|
3485
3479
|
{
|
|
3486
|
-
time:
|
|
3487
|
-
price:
|
|
3480
|
+
time: Q.time,
|
|
3481
|
+
price: Q.value
|
|
3488
3482
|
},
|
|
3489
3483
|
{
|
|
3490
3484
|
shape: "arrow_down",
|
|
@@ -3492,14 +3486,14 @@ const ue = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3492
3486
|
arrowColor: "#12B76A",
|
|
3493
3487
|
fontsize: 11,
|
|
3494
3488
|
color: "#12B76A",
|
|
3495
|
-
text:
|
|
3489
|
+
text: q,
|
|
3496
3490
|
bold: !0
|
|
3497
3491
|
}
|
|
3498
3492
|
}
|
|
3499
|
-
), await
|
|
3493
|
+
), await y.createShape(
|
|
3500
3494
|
{
|
|
3501
|
-
time:
|
|
3502
|
-
price:
|
|
3495
|
+
time: me.time,
|
|
3496
|
+
price: me.value
|
|
3503
3497
|
},
|
|
3504
3498
|
{
|
|
3505
3499
|
shape: "arrow_up",
|
|
@@ -3507,19 +3501,19 @@ const ue = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3507
3501
|
arrowColor: "#D92D20",
|
|
3508
3502
|
fontsize: 11,
|
|
3509
3503
|
color: "#D92D20",
|
|
3510
|
-
text:
|
|
3504
|
+
text: W,
|
|
3511
3505
|
bold: !0
|
|
3512
3506
|
}
|
|
3513
3507
|
}
|
|
3514
3508
|
);
|
|
3515
|
-
const
|
|
3516
|
-
await
|
|
3509
|
+
const Pe = Math.floor((v + X) / 2);
|
|
3510
|
+
await y.createShape(
|
|
3517
3511
|
{
|
|
3518
|
-
time:
|
|
3512
|
+
time: Pe
|
|
3519
3513
|
},
|
|
3520
3514
|
{
|
|
3521
3515
|
shape: "text",
|
|
3522
|
-
text: `${
|
|
3516
|
+
text: `${z} candles`,
|
|
3523
3517
|
zOrder: "top",
|
|
3524
3518
|
overrides: {
|
|
3525
3519
|
fontsize: 12,
|
|
@@ -3531,19 +3525,20 @@ const ue = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3531
3525
|
);
|
|
3532
3526
|
}
|
|
3533
3527
|
}
|
|
3534
|
-
if (
|
|
3535
|
-
from:
|
|
3536
|
-
to:
|
|
3528
|
+
if (H && H.data.length > 0 && H.data[0][0] >= H.data[H.data.length - 1][0] && await y.setVisibleRange({
|
|
3529
|
+
from: H.data[0][0],
|
|
3530
|
+
to: H.data[H.data.length - 1][0]
|
|
3537
3531
|
}), _ && r) {
|
|
3538
|
-
const
|
|
3539
|
-
await
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3532
|
+
const v = Math.floor(Date.now() / 1e3), X = Y, I = y.resolution(), Q = 3600 * 24 * 7;
|
|
3533
|
+
v - Q >= X + Q && await y.setVisibleRange(
|
|
3534
|
+
{
|
|
3535
|
+
from: v - Q,
|
|
3536
|
+
to: X + Q
|
|
3537
|
+
},
|
|
3538
|
+
{ applyDefaultRightMargin: !0, percentRightMargin: 50 }
|
|
3539
|
+
), se(() => {
|
|
3540
|
+
V || O.current !== s || Number(I) <= 30 && y.createShape(
|
|
3541
|
+
{ time: X },
|
|
3547
3542
|
{
|
|
3548
3543
|
shape: "vertical_line",
|
|
3549
3544
|
lock: !0,
|
|
@@ -3553,116 +3548,140 @@ const ue = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3553
3548
|
);
|
|
3554
3549
|
}, 2e3);
|
|
3555
3550
|
}
|
|
3556
|
-
},
|
|
3557
|
-
if (
|
|
3558
|
-
const
|
|
3559
|
-
if (
|
|
3560
|
-
|
|
3561
|
-
const
|
|
3562
|
-
|
|
3563
|
-
const
|
|
3564
|
-
|
|
3565
|
-
from:
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3551
|
+
}, N = async () => {
|
|
3552
|
+
if (V || O.current !== s) return;
|
|
3553
|
+
const E = await L();
|
|
3554
|
+
if (V || O.current !== s) return;
|
|
3555
|
+
U();
|
|
3556
|
+
const Y = (E?.event?.timestamp ?? 0) / 1e3, H = tt(l), S = Y - Y % H;
|
|
3557
|
+
y.getVisibleBarsRange() || await new Promise((X) => setTimeout(X, 2e3));
|
|
3558
|
+
const v = y.getVisibleBarsRange();
|
|
3559
|
+
v && v.from <= Y && Y <= v.to ? await K(Y, S) : (_ || await y.setVisibleRange(
|
|
3560
|
+
{ from: Y },
|
|
3561
|
+
{ applyDefaultRightMargin: !0, percentRightMargin: 50 }
|
|
3562
|
+
), await K(Y, S));
|
|
3563
|
+
}, u = () => {
|
|
3564
|
+
se(() => {
|
|
3565
|
+
V || O.current !== s || d == y.symbol() || (async () => {
|
|
3570
3566
|
try {
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3567
|
+
j(0), M(!1), Z(null), w.current?.contentWindow?.postMessage(
|
|
3568
|
+
{ action: "handleClose" },
|
|
3569
|
+
"*"
|
|
3570
|
+
), J(y.symbol());
|
|
3571
|
+
} catch (E) {
|
|
3572
|
+
console.log("error=>", E);
|
|
3574
3573
|
}
|
|
3575
3574
|
})();
|
|
3576
3575
|
}, 300);
|
|
3577
|
-
},
|
|
3578
|
-
|
|
3579
|
-
|
|
3576
|
+
}, g = (E) => {
|
|
3577
|
+
se(() => {
|
|
3578
|
+
V || O.current !== s || l == E || (async () => {
|
|
3580
3579
|
try {
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3580
|
+
j(0), M(!1), Z(null), w.current?.contentWindow?.postMessage(
|
|
3581
|
+
{ action: "handleClose" },
|
|
3582
|
+
"*"
|
|
3583
|
+
), ce(E);
|
|
3584
|
+
} catch (Y) {
|
|
3585
|
+
console.log("error=>", Y);
|
|
3584
3586
|
}
|
|
3585
3587
|
})();
|
|
3586
3588
|
}, 300);
|
|
3587
3589
|
};
|
|
3588
|
-
|
|
3590
|
+
y.onSymbolChanged().subscribe(null, u), y.onIntervalChanged().subscribe(null, g);
|
|
3589
3591
|
try {
|
|
3590
|
-
|
|
3591
|
-
} catch (
|
|
3592
|
-
console.log("error=>",
|
|
3592
|
+
b || await N();
|
|
3593
|
+
} catch (E) {
|
|
3594
|
+
console.log("error=>", E);
|
|
3593
3595
|
}
|
|
3594
|
-
|
|
3596
|
+
V && (() => {
|
|
3595
3597
|
try {
|
|
3596
|
-
|
|
3598
|
+
y.onSymbolChanged().unsubscribe(null, u);
|
|
3597
3599
|
} catch {
|
|
3598
3600
|
}
|
|
3599
3601
|
try {
|
|
3600
|
-
|
|
3602
|
+
y.onIntervalChanged().unsubscribe(null, g);
|
|
3601
3603
|
} catch {
|
|
3602
3604
|
}
|
|
3603
3605
|
})();
|
|
3604
3606
|
}), () => {
|
|
3605
|
-
|
|
3607
|
+
V = !0, x.forEach((y) => window.clearTimeout(y)), U(), O.current === s && (O.current = null);
|
|
3606
3608
|
};
|
|
3607
3609
|
}, [
|
|
3608
3610
|
i,
|
|
3609
3611
|
n,
|
|
3610
3612
|
s,
|
|
3611
3613
|
_,
|
|
3612
|
-
|
|
3614
|
+
f,
|
|
3613
3615
|
a,
|
|
3614
3616
|
r,
|
|
3615
3617
|
t,
|
|
3616
3618
|
l,
|
|
3617
|
-
|
|
3619
|
+
ce,
|
|
3618
3620
|
d,
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3621
|
+
J,
|
|
3622
|
+
b,
|
|
3623
|
+
le,
|
|
3624
|
+
Z,
|
|
3625
|
+
B,
|
|
3623
3626
|
k,
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
]),
|
|
3627
|
+
j,
|
|
3628
|
+
M,
|
|
3629
|
+
w
|
|
3630
|
+
]), pe(() => {
|
|
3628
3631
|
s && s.onChartReady(async () => {
|
|
3629
|
-
const
|
|
3630
|
-
|
|
3632
|
+
const U = s?.activeChart();
|
|
3633
|
+
U && U.onDataLoaded().subscribe(
|
|
3631
3634
|
null,
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
(
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
timestamp: T[0] * 1e3
|
|
3643
|
-
}));
|
|
3644
|
-
if (_) {
|
|
3645
|
-
const T = N[N.length - 1], q = {
|
|
3646
|
-
o: T[1],
|
|
3647
|
-
h: T[2],
|
|
3648
|
-
l: T[3],
|
|
3649
|
-
c: T[4],
|
|
3650
|
-
timestamp: T[0] * 1e3
|
|
3651
|
-
}, Z = I.resolution(), u = ue(Z) * 1e3, w = q.timestamp, S = r?.timestamp ?? 0, D = Math.floor(S / u) * u, $ = gn.find((A) => A.ticker === d)?.session || "24x7", W = vr(
|
|
3652
|
-
w,
|
|
3653
|
-
D,
|
|
3654
|
-
Z,
|
|
3655
|
-
$
|
|
3656
|
-
), R = N.slice(-50).map((A) => ({
|
|
3657
|
-
o: A[1],
|
|
3658
|
-
h: A[2],
|
|
3659
|
-
l: A[3],
|
|
3660
|
-
c: A[4],
|
|
3661
|
-
timestamp: A[0] * 1e3
|
|
3635
|
+
() => {
|
|
3636
|
+
setTimeout(async () => {
|
|
3637
|
+
const { data: L } = await U.exportData(), V = tt(l), x = (r?.timestamp ?? 0) / 1e3, se = x - x % V, y = L.findIndex(
|
|
3638
|
+
(N) => N[0] === se
|
|
3639
|
+
), K = L.slice(y - 49, y + 1).map((N) => ({
|
|
3640
|
+
o: N[1],
|
|
3641
|
+
h: N[2],
|
|
3642
|
+
l: N[3],
|
|
3643
|
+
c: N[4],
|
|
3644
|
+
timestamp: N[0] * 1e3
|
|
3662
3645
|
}));
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3646
|
+
if (_) {
|
|
3647
|
+
const N = L[L.length - 1], u = {
|
|
3648
|
+
o: N[1],
|
|
3649
|
+
h: N[2],
|
|
3650
|
+
l: N[3],
|
|
3651
|
+
c: N[4],
|
|
3652
|
+
timestamp: N[0] * 1e3
|
|
3653
|
+
}, g = U.resolution(), A = we(g) * 1e3, E = u.timestamp, Y = r?.timestamp ?? 0, H = Math.floor(Y / A) * A, S = Rn.find(
|
|
3654
|
+
(I) => I.ticker === d || I.display_name === d
|
|
3655
|
+
)?.session || "24x7", z = Lr(
|
|
3656
|
+
E,
|
|
3657
|
+
H,
|
|
3658
|
+
g,
|
|
3659
|
+
S
|
|
3660
|
+
), v = L.slice(-50).map((I) => ({
|
|
3661
|
+
o: I[1],
|
|
3662
|
+
h: I[2],
|
|
3663
|
+
l: I[3],
|
|
3664
|
+
c: I[4],
|
|
3665
|
+
timestamp: I[0] * 1e3
|
|
3666
|
+
}));
|
|
3667
|
+
B(z), k(v);
|
|
3668
|
+
const X = { newsTargetCandle: v, gapCount: z };
|
|
3669
|
+
D.current = X, F.current && (w.current?.contentWindow?.postMessage(
|
|
3670
|
+
D.current,
|
|
3671
|
+
"*"
|
|
3672
|
+
), D.current = null);
|
|
3673
|
+
} else {
|
|
3674
|
+
k(K), B(0);
|
|
3675
|
+
const N = {
|
|
3676
|
+
newsTargetCandle: K,
|
|
3677
|
+
gapCount: 0
|
|
3678
|
+
};
|
|
3679
|
+
D.current = N, F.current && (w.current?.contentWindow?.postMessage(
|
|
3680
|
+
D.current,
|
|
3681
|
+
"*"
|
|
3682
|
+
), D.current = null);
|
|
3683
|
+
}
|
|
3684
|
+
}, 100);
|
|
3666
3685
|
},
|
|
3667
3686
|
!0
|
|
3668
3687
|
);
|
|
@@ -3670,12 +3689,13 @@ const ue = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3670
3689
|
}, [
|
|
3671
3690
|
t,
|
|
3672
3691
|
r?.timestamp,
|
|
3673
|
-
O,
|
|
3674
3692
|
k,
|
|
3693
|
+
B,
|
|
3675
3694
|
l,
|
|
3676
3695
|
_,
|
|
3677
3696
|
d,
|
|
3678
|
-
s
|
|
3697
|
+
s,
|
|
3698
|
+
D
|
|
3679
3699
|
]), /* @__PURE__ */ m.jsx("div", { className: "news-widget_detail_page__container", children: /* @__PURE__ */ m.jsxs("div", { className: "news-widget_detail_page__right_border", children: [
|
|
3680
3700
|
/* @__PURE__ */ m.jsx("div", { className: "news-widget_detail_page__title_container", children: /* @__PURE__ */ m.jsxs("div", { className: "news-widget_detail_page__title_padding", children: [
|
|
3681
3701
|
/* @__PURE__ */ m.jsx(
|
|
@@ -3684,214 +3704,223 @@ const ue = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3684
3704
|
type: "button",
|
|
3685
3705
|
className: "news-widget__button news-widget__button--ghost news-widget__button--icon news-widget_detail_page__back_button",
|
|
3686
3706
|
onClick: C,
|
|
3687
|
-
children: /* @__PURE__ */ m.jsx(
|
|
3707
|
+
children: /* @__PURE__ */ m.jsx(gr, { className: "news-widget_detail_page__back_icon" })
|
|
3688
3708
|
}
|
|
3689
3709
|
),
|
|
3690
3710
|
/* @__PURE__ */ m.jsx("p", { className: "news-widget_detail_page__title_text", children: "Economic Calendar Analysis" })
|
|
3691
3711
|
] }) }),
|
|
3692
|
-
/* @__PURE__ */ m.jsx("div", { className: "news-widget_detail_page__event_details", children: /* @__PURE__ */ m.jsxs(
|
|
3712
|
+
/* @__PURE__ */ m.jsx("div", { className: "news-widget_detail_page__event_details", children: /* @__PURE__ */ m.jsxs(Ur, { newsDetail: o, children: [
|
|
3693
3713
|
e,
|
|
3694
3714
|
_ && /* @__PURE__ */ m.jsx(
|
|
3695
|
-
|
|
3715
|
+
Pr,
|
|
3696
3716
|
{
|
|
3697
3717
|
replayTabId: t || "news",
|
|
3698
3718
|
futureBarsRef: h,
|
|
3699
|
-
highlightBarsRef:
|
|
3700
|
-
pushBar:
|
|
3701
|
-
tvWidgetRef:
|
|
3719
|
+
highlightBarsRef: T,
|
|
3720
|
+
pushBar: p,
|
|
3721
|
+
tvWidgetRef: O,
|
|
3702
3722
|
resolution: l || "15",
|
|
3703
3723
|
symbol: d
|
|
3704
3724
|
}
|
|
3705
3725
|
)
|
|
3706
3726
|
] }) })
|
|
3707
3727
|
] }) });
|
|
3708
|
-
},
|
|
3728
|
+
}, De = "https://widget-result-news.iccandle.ai", Yt = "https://corprate-widget.iccandle.ai/news", kr = ({
|
|
3709
3729
|
chartWidget: e,
|
|
3710
3730
|
children: t,
|
|
3711
3731
|
widgetKey: n,
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3732
|
+
userId: s,
|
|
3733
|
+
defaultSymbol: r,
|
|
3734
|
+
chartInterval: i = "15",
|
|
3735
|
+
theme: o,
|
|
3736
|
+
symbolMapper: a,
|
|
3737
|
+
pushBar: f,
|
|
3738
|
+
futureRef: d,
|
|
3739
|
+
highlightBarsRef: l,
|
|
3740
|
+
setGapCountExternal: _,
|
|
3741
|
+
setReplayModeExternal: b
|
|
3721
3742
|
// setNewsPlayEndTimestampExternal,
|
|
3722
3743
|
}) => {
|
|
3723
|
-
const { start:
|
|
3744
|
+
const { start: C } = An(), [p, w] = ae(""), [h, D] = ae(i), [F, T] = ae(r), [j, M] = ae(i), [O, J] = ae(r), [ce, k] = ae(null), [B, le] = ae(
|
|
3724
3745
|
null
|
|
3725
|
-
), {
|
|
3726
|
-
setNewsSelectedCandles:
|
|
3727
|
-
setNewsPlayEndTimestamp:
|
|
3728
|
-
newsTargetCandle:
|
|
3729
|
-
gapCount:
|
|
3730
|
-
} =
|
|
3731
|
-
|
|
3732
|
-
if (
|
|
3733
|
-
if (
|
|
3734
|
-
|
|
3746
|
+
), Z = ue(null), U = ue(!1), {
|
|
3747
|
+
setNewsSelectedCandles: L,
|
|
3748
|
+
setNewsPlayEndTimestamp: V,
|
|
3749
|
+
newsTargetCandle: x,
|
|
3750
|
+
gapCount: se
|
|
3751
|
+
} = ge(), y = ue(null), K = cr[h] || "M15", N = tt("60"), u = B?.[0]?.timestamp ? B?.[0]?.timestamp / 1e3 : 0, g = u - u % N, A = B?.[0]?.candleData.H1?.candles, E = A?.findIndex(($) => $.timestamp === g) || 0, H = (A?.length || 0) - E <= 10, S = "next_pip_up_10" in (B?.[0]?.candleData[K]?.metadata ?? {}), z = !!p && !S, v = ue(z), X = ue(!1);
|
|
3752
|
+
pe(() => {
|
|
3753
|
+
if (z !== v.current) {
|
|
3754
|
+
if (v.current = z, X.current) {
|
|
3755
|
+
X.current = !1;
|
|
3735
3756
|
return;
|
|
3736
3757
|
}
|
|
3737
|
-
|
|
3758
|
+
C();
|
|
3738
3759
|
}
|
|
3739
|
-
}, [
|
|
3740
|
-
const
|
|
3741
|
-
const { data:
|
|
3742
|
-
`${
|
|
3760
|
+
}, [z, C]), pe(() => {
|
|
3761
|
+
const $ = async (P) => {
|
|
3762
|
+
const { data: q, status: W } = await G.get(
|
|
3763
|
+
`${Yt}/${P}`,
|
|
3743
3764
|
{
|
|
3744
3765
|
headers: { "api-key": n },
|
|
3745
|
-
params: { symbol:
|
|
3766
|
+
params: { symbol: r }
|
|
3746
3767
|
}
|
|
3747
3768
|
);
|
|
3748
|
-
return
|
|
3749
|
-
},
|
|
3750
|
-
const { data:
|
|
3751
|
-
`${
|
|
3769
|
+
return W !== 200 ? (console.error("Failed to fetch news detail"), null) : q;
|
|
3770
|
+
}, te = async (P) => {
|
|
3771
|
+
const { data: q, status: W } = await G.get(
|
|
3772
|
+
`${Yt}/similar-details`,
|
|
3752
3773
|
{
|
|
3753
3774
|
headers: { "api-key": n },
|
|
3754
|
-
params: { event_id:
|
|
3775
|
+
params: { event_id: P }
|
|
3755
3776
|
}
|
|
3756
3777
|
);
|
|
3757
|
-
return
|
|
3778
|
+
return W !== 200 ? (console.error("Failed to fetch compared news"), null) : q;
|
|
3758
3779
|
};
|
|
3759
3780
|
(async () => {
|
|
3760
|
-
if (
|
|
3761
|
-
const [
|
|
3762
|
-
|
|
3763
|
-
|
|
3781
|
+
if (p === "") return;
|
|
3782
|
+
const [P, q] = await Promise.all([
|
|
3783
|
+
$(p),
|
|
3784
|
+
te(p)
|
|
3764
3785
|
]);
|
|
3765
|
-
|
|
3786
|
+
P && k(P), q && le(q);
|
|
3766
3787
|
})();
|
|
3767
|
-
}, [n,
|
|
3768
|
-
const
|
|
3769
|
-
|
|
3788
|
+
}, [n, p, r]);
|
|
3789
|
+
const I = Me(() => {
|
|
3790
|
+
b(!1), _(0), L(null), V(null);
|
|
3770
3791
|
}, [
|
|
3792
|
+
b,
|
|
3771
3793
|
_,
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
await e?.headerReady(), ne?.clearMarks(2), localStorage.setItem(
|
|
3794
|
+
L,
|
|
3795
|
+
V
|
|
3796
|
+
]), Q = Me(() => {
|
|
3797
|
+
w(""), T(r), I();
|
|
3798
|
+
}, [r, I]);
|
|
3799
|
+
pe(() => {
|
|
3800
|
+
const $ = async ({ origin: te, data: ne }) => {
|
|
3801
|
+
if (te !== De || typeof ne != "string") return;
|
|
3802
|
+
const P = JSON.parse(ne);
|
|
3803
|
+
if (P.action == "back")
|
|
3804
|
+
Q();
|
|
3805
|
+
else if (P.action == "back-to-similar-events")
|
|
3806
|
+
I();
|
|
3807
|
+
else if (P.action == "eventClicked") {
|
|
3808
|
+
X.current = !0, C();
|
|
3809
|
+
const W = P.data.event, Pe = e?.activeChart();
|
|
3810
|
+
await e?.headerReady(), Pe?.clearMarks(2), localStorage.setItem(
|
|
3790
3811
|
"iccandle:current-news-event",
|
|
3791
3812
|
JSON.stringify({
|
|
3792
|
-
actual:
|
|
3793
|
-
event_name:
|
|
3794
|
-
forecast:
|
|
3795
|
-
id:
|
|
3796
|
-
metric:
|
|
3797
|
-
previous:
|
|
3798
|
-
timestamp:
|
|
3799
|
-
currency:
|
|
3813
|
+
actual: W.actual,
|
|
3814
|
+
event_name: W.event_name,
|
|
3815
|
+
forecast: W.forecast,
|
|
3816
|
+
id: W.id,
|
|
3817
|
+
metric: W.metric,
|
|
3818
|
+
previous: W.previous,
|
|
3819
|
+
timestamp: W.timestamp,
|
|
3820
|
+
currency: W.currency
|
|
3800
3821
|
})
|
|
3801
|
-
),
|
|
3802
|
-
} else if (
|
|
3803
|
-
const
|
|
3804
|
-
if (
|
|
3805
|
-
|
|
3806
|
-
const
|
|
3807
|
-
|
|
3808
|
-
} else if (
|
|
3809
|
-
const
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
gapCount: Q,
|
|
3813
|
-
ts: M?.[M.length - 1]?.timestamp ?? null
|
|
3814
|
-
}), _(H.isReplay), l(Q), O(H.selectedCandles), k(
|
|
3815
|
-
M?.[M.length - 1]?.timestamp ?? null
|
|
3822
|
+
), Pe?.refreshMarks(), M(h), J(F), w(W.id);
|
|
3823
|
+
} else if (P.action == "intervalChanged" || P.action == "symbolChanged") {
|
|
3824
|
+
const q = P.data;
|
|
3825
|
+
if (q.type === 2) return;
|
|
3826
|
+
q.resolution && D(q.resolution);
|
|
3827
|
+
const W = a?.[q.symbol] ?? r;
|
|
3828
|
+
T(W);
|
|
3829
|
+
} else if (P.action == "replay") {
|
|
3830
|
+
const q = P.data;
|
|
3831
|
+
b(q.isReplay), _(se), L(q.selectedCandles), V(
|
|
3832
|
+
x?.[x.length - 1]?.timestamp ?? null
|
|
3816
3833
|
);
|
|
3817
|
-
}
|
|
3834
|
+
} else P.action == "iframe-ready" && (U.current = !0, Z.current?.contentWindow?.postMessage(
|
|
3835
|
+
y.current,
|
|
3836
|
+
"*"
|
|
3837
|
+
), y.current = null);
|
|
3818
3838
|
};
|
|
3819
|
-
return window.addEventListener("message",
|
|
3839
|
+
return window.addEventListener("message", $), () => window.removeEventListener("message", $);
|
|
3820
3840
|
}, [
|
|
3821
|
-
|
|
3822
|
-
|
|
3841
|
+
x,
|
|
3842
|
+
se,
|
|
3823
3843
|
e,
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3844
|
+
r,
|
|
3845
|
+
C,
|
|
3846
|
+
I,
|
|
3847
|
+
Q,
|
|
3848
|
+
a,
|
|
3849
|
+
y,
|
|
3829
3850
|
// setCurrentSymbolCompared,
|
|
3830
3851
|
// setSelectedTimeframeCompared,
|
|
3852
|
+
M,
|
|
3853
|
+
J,
|
|
3854
|
+
F,
|
|
3855
|
+
h,
|
|
3856
|
+
b,
|
|
3831
3857
|
_,
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
O
|
|
3858
|
+
V,
|
|
3859
|
+
L
|
|
3835
3860
|
// setNewsPlayEndTimestampExternal,
|
|
3836
3861
|
]);
|
|
3837
|
-
const
|
|
3838
|
-
const
|
|
3839
|
-
return
|
|
3840
|
-
`next_pip_up_${
|
|
3841
|
-
`next_pip_down_${
|
|
3862
|
+
const me = Ue(() => {
|
|
3863
|
+
const $ = B?.[0]?.candleData?.[K]?.metadata;
|
|
3864
|
+
return $ ? [..._n].sort((te, ne) => ne - te).find((te) => [
|
|
3865
|
+
`next_pip_up_${te}`,
|
|
3866
|
+
`next_pip_down_${te}`
|
|
3842
3867
|
].some(
|
|
3843
|
-
(
|
|
3868
|
+
(P) => $[P] !== void 0
|
|
3844
3869
|
)) ?? null : null;
|
|
3845
|
-
}, [
|
|
3846
|
-
|
|
3847
|
-
const
|
|
3848
|
-
|
|
3870
|
+
}, [B, K]);
|
|
3871
|
+
pe(() => {
|
|
3872
|
+
const $ = () => {
|
|
3873
|
+
Q();
|
|
3849
3874
|
};
|
|
3850
|
-
return window.addEventListener("popstate",
|
|
3851
|
-
}, [
|
|
3852
|
-
const
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3875
|
+
return window.addEventListener("popstate", $), () => window.removeEventListener("popstate", $);
|
|
3876
|
+
}, [Q]);
|
|
3877
|
+
const oe = Ue(() => p ? B ? S ? `${De}/${p}?apiKey=${n}&userId=${s}&theme=${o}&interval=${j}&symbol=${O}` : `${De}/similar-events/${p}?apiKey=${n}&userId=${s}&theme=${o}` : `${De}?apiKey=${n}&userId=${s}&theme=${o}` : `${De}?apiKey=${n}&userId=${s}&theme=${o}`, [
|
|
3878
|
+
p,
|
|
3879
|
+
B,
|
|
3880
|
+
S,
|
|
3856
3881
|
n,
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3882
|
+
o,
|
|
3883
|
+
s,
|
|
3884
|
+
j,
|
|
3885
|
+
O
|
|
3860
3886
|
]);
|
|
3861
3887
|
return /* @__PURE__ */ m.jsxs("div", { className: "news-widget_main__container news-widget_main__container--lg", children: [
|
|
3862
3888
|
/* @__PURE__ */ m.jsx(
|
|
3863
3889
|
"div",
|
|
3864
3890
|
{
|
|
3865
3891
|
className: "news-widget_main__left",
|
|
3866
|
-
style: { display:
|
|
3892
|
+
style: { display: p && !S ? "flex" : "none" },
|
|
3867
3893
|
children: /* @__PURE__ */ m.jsx(
|
|
3868
|
-
|
|
3894
|
+
dr,
|
|
3869
3895
|
{
|
|
3870
|
-
selectedTimeframe:
|
|
3871
|
-
setSelectedTimeframe:
|
|
3872
|
-
currentSymbol:
|
|
3873
|
-
setCurrentSymbol:
|
|
3896
|
+
selectedTimeframe: h,
|
|
3897
|
+
setSelectedTimeframe: D,
|
|
3898
|
+
currentSymbol: F,
|
|
3899
|
+
setCurrentSymbol: T,
|
|
3874
3900
|
children: /* @__PURE__ */ m.jsx(
|
|
3875
|
-
|
|
3901
|
+
Or,
|
|
3876
3902
|
{
|
|
3877
|
-
eventId:
|
|
3903
|
+
eventId: p,
|
|
3878
3904
|
chartWidget: e,
|
|
3879
3905
|
widgetKey: n,
|
|
3880
|
-
theme:
|
|
3881
|
-
defaultSymbol:
|
|
3882
|
-
newsDetail:
|
|
3883
|
-
isUpcoming:
|
|
3884
|
-
event:
|
|
3885
|
-
selectedCandles:
|
|
3886
|
-
currentTimeFrame:
|
|
3887
|
-
currentSymbol:
|
|
3888
|
-
onBack:
|
|
3889
|
-
isElapsed:
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3906
|
+
theme: o,
|
|
3907
|
+
defaultSymbol: r,
|
|
3908
|
+
newsDetail: ce,
|
|
3909
|
+
isUpcoming: H,
|
|
3910
|
+
event: ce?.event,
|
|
3911
|
+
selectedCandles: me,
|
|
3912
|
+
currentTimeFrame: h,
|
|
3913
|
+
currentSymbol: F,
|
|
3914
|
+
onBack: Q,
|
|
3915
|
+
isElapsed: S,
|
|
3916
|
+
iframeRef: Z,
|
|
3917
|
+
pendingMessageRef: y,
|
|
3918
|
+
iframeReadyToListenRef: U,
|
|
3919
|
+
pushBar: f,
|
|
3920
|
+
futureRef: d,
|
|
3921
|
+
highlightBarsRef: l,
|
|
3922
|
+
setReplayModeExternal: b,
|
|
3923
|
+
setGapCountExternal: _,
|
|
3895
3924
|
children: t
|
|
3896
3925
|
}
|
|
3897
3926
|
)
|
|
@@ -3902,25 +3931,26 @@ const ue = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3902
3931
|
/* @__PURE__ */ m.jsx(
|
|
3903
3932
|
"iframe",
|
|
3904
3933
|
{
|
|
3905
|
-
src:
|
|
3906
|
-
|
|
3934
|
+
src: oe,
|
|
3935
|
+
ref: Z,
|
|
3936
|
+
className: p && !S ? "news-widget_main__iframe_half" : "news-widget_main__iframe_full"
|
|
3907
3937
|
}
|
|
3908
3938
|
)
|
|
3909
3939
|
] });
|
|
3910
|
-
},
|
|
3911
|
-
function
|
|
3940
|
+
}, Fr = "https://api.iccandle.ai", jr = '"Inter Tight", ui-sans-serif, system-ui, sans-serif';
|
|
3941
|
+
function Mt(e) {
|
|
3912
3942
|
return {
|
|
3913
3943
|
iccandle_primary: e.iccandle_primary,
|
|
3914
3944
|
iccandle_border: e.iccandle_border,
|
|
3915
3945
|
iccandle_text: e.iccandle_text,
|
|
3916
3946
|
iccandle_background: e.iccandle_background,
|
|
3917
3947
|
iccandle_primary_gradient_end: e.iccandle_primary_gradient_end,
|
|
3918
|
-
iccandle_font: e.icc_font ?? e.iccandle_font ??
|
|
3948
|
+
iccandle_font: e.icc_font ?? e.iccandle_font ?? jr
|
|
3919
3949
|
};
|
|
3920
3950
|
}
|
|
3921
|
-
const
|
|
3951
|
+
const Br = async (e) => {
|
|
3922
3952
|
const t = await fetch(
|
|
3923
|
-
`${
|
|
3953
|
+
`${Fr}/corporate-client/v1/widgetStyle/search/user/?service_type=news`,
|
|
3924
3954
|
{ headers: { "api-key": e } }
|
|
3925
3955
|
);
|
|
3926
3956
|
if (!t.ok)
|
|
@@ -3928,10 +3958,10 @@ const Fr = async (e) => {
|
|
|
3928
3958
|
const n = await t.json();
|
|
3929
3959
|
return {
|
|
3930
3960
|
...n,
|
|
3931
|
-
dark:
|
|
3932
|
-
light:
|
|
3961
|
+
dark: Mt(n.dark),
|
|
3962
|
+
light: Mt(n.light)
|
|
3933
3963
|
};
|
|
3934
|
-
},
|
|
3964
|
+
}, Ht = {
|
|
3935
3965
|
iccandle_font: "--iccandle-font",
|
|
3936
3966
|
iccandle_primary: "--iccandle-primary",
|
|
3937
3967
|
iccandle_border: "--iccandle-border",
|
|
@@ -3939,32 +3969,32 @@ const Fr = async (e) => {
|
|
|
3939
3969
|
iccandle_background: "--iccandle-background",
|
|
3940
3970
|
iccandle_primary_gradient_end: "--iccandle-primary-gradient-end"
|
|
3941
3971
|
};
|
|
3942
|
-
function
|
|
3943
|
-
const [n, s] =
|
|
3944
|
-
|
|
3945
|
-
|
|
3972
|
+
function Yr(e, t) {
|
|
3973
|
+
const [n, s] = ae(null);
|
|
3974
|
+
pe(() => {
|
|
3975
|
+
Br(e).then((d) => {
|
|
3946
3976
|
s(d);
|
|
3947
3977
|
});
|
|
3948
3978
|
}, [e]);
|
|
3949
|
-
const r =
|
|
3979
|
+
const r = ue(null), [i, o] = ae(null), a = Ue(() => t === "system" ? window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : t, [t]), f = Ue(() => {
|
|
3950
3980
|
if (n)
|
|
3951
3981
|
return a === "dark" ? n.dark : n.light;
|
|
3952
3982
|
}, [n, a]);
|
|
3953
|
-
return
|
|
3954
|
-
if (typeof window > "u" || !
|
|
3983
|
+
return pe(() => {
|
|
3984
|
+
if (typeof window > "u" || !f || !i) return;
|
|
3955
3985
|
const d = i;
|
|
3956
|
-
Object.keys(
|
|
3986
|
+
Object.keys(Ht).forEach(
|
|
3957
3987
|
(l) => {
|
|
3958
3988
|
d.style.setProperty(
|
|
3959
|
-
|
|
3960
|
-
|
|
3989
|
+
Ht[l],
|
|
3990
|
+
f[l]
|
|
3961
3991
|
);
|
|
3962
3992
|
}
|
|
3963
3993
|
);
|
|
3964
|
-
}, [
|
|
3994
|
+
}, [f, i]), { rootRef: r, setRootEl: o, resolvedTheme: a };
|
|
3965
3995
|
}
|
|
3966
|
-
const
|
|
3967
|
-
const { rootRef: t, setRootEl: n, resolvedTheme: s } =
|
|
3996
|
+
const oi = (e) => {
|
|
3997
|
+
const { rootRef: t, setRootEl: n, resolvedTheme: s } = Yr(
|
|
3968
3998
|
e.widgetKey,
|
|
3969
3999
|
e.theme
|
|
3970
4000
|
);
|
|
@@ -3975,10 +4005,10 @@ const ri = (e) => {
|
|
|
3975
4005
|
t.current = r, n(r);
|
|
3976
4006
|
},
|
|
3977
4007
|
className: `news-widget__container news-widget ${s === "dark" ? "dark" : ""}`,
|
|
3978
|
-
children: /* @__PURE__ */ m.jsx(
|
|
4008
|
+
children: /* @__PURE__ */ m.jsx(Tn, { theme: s, children: /* @__PURE__ */ m.jsx(kr, { ...e, children: e.children }) })
|
|
3979
4009
|
}
|
|
3980
4010
|
);
|
|
3981
4011
|
};
|
|
3982
4012
|
export {
|
|
3983
|
-
|
|
4013
|
+
oi as NewsWidget
|
|
3984
4014
|
};
|