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