@iccandle/news 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/news-widget.cjs +6 -6
- package/dist/news-widget.js +206 -201
- package/package.json +1 -1
package/dist/news-widget.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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 Ue, { createContext as $t, useContext as Gt, useState as
|
|
2
|
+
import Ue, { createContext as $t, useContext as Gt, useState as ce, useRef as ue, useCallback as Me, useEffect as pe, useMemo as Te, forwardRef as Jt, createElement as ze } from "react";
|
|
3
3
|
var ke = { exports: {} }, Ee = {};
|
|
4
4
|
var mt;
|
|
5
5
|
function En() {
|
|
@@ -59,7 +59,7 @@ function Sn() {
|
|
|
59
59
|
case M:
|
|
60
60
|
var g = u.render;
|
|
61
61
|
return u = u.displayName, u || (u = g.displayName || g.name || "", u = u !== "" ? "ForwardRef(" + u + ")" : "ForwardRef"), u;
|
|
62
|
-
case
|
|
62
|
+
case se:
|
|
63
63
|
return g = u.displayName || null, g !== null ? g : e(u.type) || "Memo";
|
|
64
64
|
case k:
|
|
65
65
|
g = u._payload, u = u._init;
|
|
@@ -129,7 +129,7 @@ function Sn() {
|
|
|
129
129
|
}
|
|
130
130
|
function f() {
|
|
131
131
|
var u = e(this.type);
|
|
132
|
-
return
|
|
132
|
+
return re[u] || (re[u] = !0, console.error(
|
|
133
133
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
134
134
|
)), u = this.props.ref, u !== void 0 ? u : null;
|
|
135
135
|
}
|
|
@@ -215,21 +215,21 @@ React keys must be passed directly to JSX without using spread:
|
|
|
215
215
|
);
|
|
216
216
|
}
|
|
217
217
|
function _(u) {
|
|
218
|
-
|
|
218
|
+
C(u) ? u._store && (u._store.validated = 1) : typeof u == "object" && u !== null && u.$$typeof === k && (u._payload.status === "fulfilled" ? C(u._payload.value) && u._payload.value._store && (u._payload.value._store.validated = 1) : u._store && (u._store.validated = 1));
|
|
219
219
|
}
|
|
220
|
-
function
|
|
220
|
+
function C(u) {
|
|
221
221
|
return typeof u == "object" && u !== null && u.$$typeof === p;
|
|
222
222
|
}
|
|
223
|
-
var
|
|
223
|
+
var b = Ue, p = /* @__PURE__ */ Symbol.for("react.transitional.element"), w = /* @__PURE__ */ Symbol.for("react.portal"), h = /* @__PURE__ */ Symbol.for("react.fragment"), D = /* @__PURE__ */ Symbol.for("react.strict_mode"), F = /* @__PURE__ */ Symbol.for("react.profiler"), T = /* @__PURE__ */ Symbol.for("react.consumer"), j = /* @__PURE__ */ Symbol.for("react.context"), M = /* @__PURE__ */ Symbol.for("react.forward_ref"), O = /* @__PURE__ */ Symbol.for("react.suspense"), X = /* @__PURE__ */ Symbol.for("react.suspense_list"), se = /* @__PURE__ */ Symbol.for("react.memo"), k = /* @__PURE__ */ Symbol.for("react.lazy"), B = /* @__PURE__ */ Symbol.for("react.activity"), le = /* @__PURE__ */ Symbol.for("react.client.reference"), Z = b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, A = Object.prototype.hasOwnProperty, L = Array.isArray, V = console.createTask ? console.createTask : function() {
|
|
224
224
|
return null;
|
|
225
225
|
};
|
|
226
|
-
|
|
226
|
+
b = {
|
|
227
227
|
react_stack_bottom_frame: function(u) {
|
|
228
228
|
return u();
|
|
229
229
|
}
|
|
230
230
|
};
|
|
231
|
-
var x,
|
|
232
|
-
|
|
231
|
+
var x, re = {}, y = b.react_stack_bottom_frame.bind(
|
|
232
|
+
b,
|
|
233
233
|
i
|
|
234
234
|
)(), K = V(s(i)), N = {};
|
|
235
235
|
Se.Fragment = h, Se.jsx = function(u, g, U) {
|
|
@@ -272,7 +272,7 @@ function Tn({
|
|
|
272
272
|
children: e,
|
|
273
273
|
theme: t
|
|
274
274
|
}) {
|
|
275
|
-
const [n, s] =
|
|
275
|
+
const [n, s] = ce(!1), [r, i] = ce(!1), [o, a] = ce(0), f = ue(null), d = ue(null), l = Me(() => {
|
|
276
276
|
f.current && window.clearTimeout(f.current), f.current = null, d.current && window.clearTimeout(d.current), d.current = null, d.current = window.setTimeout(() => {
|
|
277
277
|
d.current = null, s(!1), i(!1);
|
|
278
278
|
}, Un);
|
|
@@ -284,11 +284,11 @@ function Tn({
|
|
|
284
284
|
}, wt);
|
|
285
285
|
}, [l]);
|
|
286
286
|
pe(() => l, [l]);
|
|
287
|
-
const
|
|
287
|
+
const C = Te(
|
|
288
288
|
() => ({ start: _, stop: l, visible: n }),
|
|
289
289
|
[_, l, n]
|
|
290
|
-
),
|
|
291
|
-
return /* @__PURE__ */ m.jsxs(Xt.Provider, { value:
|
|
290
|
+
), b = t === "light" ? "https://icc-web-assets.s3.ap-southeast-1.amazonaws.com/loader/build-up-white.webm" : "https://icc-web-assets.s3.ap-southeast-1.amazonaws.com/loader/build-up-black.webm";
|
|
291
|
+
return /* @__PURE__ */ m.jsxs(Xt.Provider, { value: C, children: [
|
|
292
292
|
e,
|
|
293
293
|
n && /* @__PURE__ */ m.jsx("div", { className: "cta-loader__overlay", children: /* @__PURE__ */ m.jsxs("div", { className: "cta-loader__content", children: [
|
|
294
294
|
/* @__PURE__ */ m.jsx(
|
|
@@ -300,7 +300,7 @@ function Tn({
|
|
|
300
300
|
playsInline: !0,
|
|
301
301
|
preload: "auto",
|
|
302
302
|
className: "cta-loader__video",
|
|
303
|
-
children: /* @__PURE__ */ m.jsx("source", { src:
|
|
303
|
+
children: /* @__PURE__ */ m.jsx("source", { src: b, 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(
|
|
@@ -327,14 +327,14 @@ const { toString: Nn } = Object.prototype, { getPrototypeOf: it } = Object, { it
|
|
|
327
327
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
328
328
|
})(/* @__PURE__ */ Object.create(null)), fe = (e) => (e = e.toLowerCase(), (t) => $e(t) === e), Ge = (e) => (t) => typeof t === e, { isArray: Re } = Array, be = Ge("undefined");
|
|
329
329
|
function Ne(e) {
|
|
330
|
-
return e !== null && !be(e) && e.constructor !== null && !be(e.constructor) &&
|
|
330
|
+
return e !== null && !be(e) && e.constructor !== null && !be(e.constructor) && ie(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
331
331
|
}
|
|
332
332
|
const Kt = fe("ArrayBuffer");
|
|
333
333
|
function vn(e) {
|
|
334
334
|
let t;
|
|
335
335
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Kt(e.buffer), t;
|
|
336
336
|
}
|
|
337
|
-
const xn = Ge("string"),
|
|
337
|
+
const xn = Ge("string"), ie = Ge("function"), zt = Ge("number"), ve = (e) => e !== null && typeof e == "object", Ln = (e) => e === !0 || e === !1, je = (e) => {
|
|
338
338
|
if ($e(e) !== "object")
|
|
339
339
|
return !1;
|
|
340
340
|
const t = it(e);
|
|
@@ -347,10 +347,10 @@ const xn = Ge("string"), re = Ge("function"), zt = Ge("number"), ve = (e) => e !
|
|
|
347
347
|
} catch {
|
|
348
348
|
return !1;
|
|
349
349
|
}
|
|
350
|
-
}, On = fe("Date"), kn = fe("File"), Fn = fe("Blob"), jn = fe("FileList"), Bn = (e) => ve(e) &&
|
|
350
|
+
}, On = fe("Date"), kn = fe("File"), Fn = fe("Blob"), jn = fe("FileList"), Bn = (e) => ve(e) && ie(e.pipe), Yn = (e) => {
|
|
351
351
|
let t;
|
|
352
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
353
|
-
t === "object" &&
|
|
352
|
+
return e && (typeof FormData == "function" && e instanceof FormData || ie(e.append) && ((t = $e(e)) === "formdata" || // detect form-data instance
|
|
353
|
+
t === "object" && ie(e.toString) && e.toString() === "[object FormData]"));
|
|
354
354
|
}, Mn = fe("URLSearchParams"), [Hn, In, $n, Gn] = [
|
|
355
355
|
"ReadableStream",
|
|
356
356
|
"Request",
|
|
@@ -399,7 +399,7 @@ function Ze() {
|
|
|
399
399
|
const Xn = (e, t, n, { allOwnKeys: s } = {}) => (xe(
|
|
400
400
|
t,
|
|
401
401
|
(r, i) => {
|
|
402
|
-
n &&
|
|
402
|
+
n && ie(r) ? Object.defineProperty(e, i, {
|
|
403
403
|
value: qt(r, n),
|
|
404
404
|
writable: !0,
|
|
405
405
|
enumerable: !0,
|
|
@@ -470,10 +470,10 @@ const Xn = (e, t, n, { allOwnKeys: s } = {}) => (xe(
|
|
|
470
470
|
}), Object.defineProperties(e, s);
|
|
471
471
|
}, rs = (e) => {
|
|
472
472
|
Qt(e, (t, n) => {
|
|
473
|
-
if (
|
|
473
|
+
if (ie(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
474
474
|
return !1;
|
|
475
475
|
const s = e[n];
|
|
476
|
-
if (
|
|
476
|
+
if (ie(s)) {
|
|
477
477
|
if (t.enumerable = !1, "writable" in t) {
|
|
478
478
|
t.writable = !1;
|
|
479
479
|
return;
|
|
@@ -493,7 +493,7 @@ const Xn = (e, t, n, { allOwnKeys: s } = {}) => (xe(
|
|
|
493
493
|
}, os = () => {
|
|
494
494
|
}, as = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
495
495
|
function cs(e) {
|
|
496
|
-
return !!(e &&
|
|
496
|
+
return !!(e && ie(e.append) && e[Vt] === "FormData" && e[Ie]);
|
|
497
497
|
}
|
|
498
498
|
const ls = (e) => {
|
|
499
499
|
const t = new Array(10), n = (s, r) => {
|
|
@@ -514,7 +514,7 @@ const ls = (e) => {
|
|
|
514
514
|
return s;
|
|
515
515
|
};
|
|
516
516
|
return n(e, 0);
|
|
517
|
-
}, ds = fe("AsyncFunction"), us = (e) => e && (ve(e) ||
|
|
517
|
+
}, ds = fe("AsyncFunction"), us = (e) => e && (ve(e) || ie(e)) && ie(e.then) && ie(e.catch), en = ((e, t) => e ? setImmediate : t ? ((n, s) => (he.addEventListener(
|
|
518
518
|
"message",
|
|
519
519
|
({ source: r, data: i }) => {
|
|
520
520
|
r === he && i === n && s.length && s.shift()();
|
|
@@ -522,7 +522,7 @@ const ls = (e) => {
|
|
|
522
522
|
!1
|
|
523
523
|
), (r) => {
|
|
524
524
|
s.push(r), he.postMessage(n, "*");
|
|
525
|
-
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(typeof setImmediate == "function",
|
|
525
|
+
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(typeof setImmediate == "function", ie(he.postMessage)), ps = typeof queueMicrotask < "u" ? queueMicrotask.bind(he) : typeof process < "u" && process.nextTick || en, fs = (e) => e != null && ie(e[Ie]), c = {
|
|
526
526
|
isArray: Re,
|
|
527
527
|
isArrayBuffer: Kt,
|
|
528
528
|
isBuffer: Ne,
|
|
@@ -543,7 +543,7 @@ const ls = (e) => {
|
|
|
543
543
|
isFile: kn,
|
|
544
544
|
isBlob: Fn,
|
|
545
545
|
isRegExp: ss,
|
|
546
|
-
isFunction:
|
|
546
|
+
isFunction: ie,
|
|
547
547
|
isStream: Bn,
|
|
548
548
|
isURLSearchParams: Mn,
|
|
549
549
|
isTypedArray: Wn,
|
|
@@ -690,12 +690,12 @@ function Je(e, t, n) {
|
|
|
690
690
|
}
|
|
691
691
|
return We(p) ? !0 : (t.append(gt(h, w, i), d(p)), !1);
|
|
692
692
|
}
|
|
693
|
-
const _ = [],
|
|
693
|
+
const _ = [], C = Object.assign(hs, {
|
|
694
694
|
defaultVisitor: l,
|
|
695
695
|
convertValue: d,
|
|
696
696
|
isVisitable: We
|
|
697
697
|
});
|
|
698
|
-
function
|
|
698
|
+
function b(p, w) {
|
|
699
699
|
if (!c.isUndefined(p)) {
|
|
700
700
|
if (_.indexOf(p) !== -1)
|
|
701
701
|
throw Error("Circular reference detected in " + w.join("."));
|
|
@@ -705,14 +705,14 @@ function Je(e, t, n) {
|
|
|
705
705
|
D,
|
|
706
706
|
c.isString(F) ? F.trim() : F,
|
|
707
707
|
w,
|
|
708
|
-
|
|
709
|
-
)) === !0 &&
|
|
708
|
+
C
|
|
709
|
+
)) === !0 && b(D, w ? w.concat(F) : [F]);
|
|
710
710
|
}), _.pop();
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
713
|
if (!c.isObject(e))
|
|
714
714
|
throw new TypeError("data must be an object");
|
|
715
|
-
return
|
|
715
|
+
return b(e), t;
|
|
716
716
|
}
|
|
717
717
|
function Ct(e) {
|
|
718
718
|
const t = {
|
|
@@ -1017,7 +1017,7 @@ function ks(e, t) {
|
|
|
1017
1017
|
});
|
|
1018
1018
|
});
|
|
1019
1019
|
}
|
|
1020
|
-
let
|
|
1020
|
+
let oe = class {
|
|
1021
1021
|
constructor(t) {
|
|
1022
1022
|
t && this.set(t);
|
|
1023
1023
|
}
|
|
@@ -1143,8 +1143,8 @@ let ie = class {
|
|
|
1143
1143
|
return c.isArray(t) ? t.forEach(i) : i(t), this;
|
|
1144
1144
|
}
|
|
1145
1145
|
};
|
|
1146
|
-
|
|
1147
|
-
c.reduceDescriptors(
|
|
1146
|
+
oe.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
1147
|
+
c.reduceDescriptors(oe.prototype, ({ value: e }, t) => {
|
|
1148
1148
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
1149
1149
|
return {
|
|
1150
1150
|
get: () => e,
|
|
@@ -1153,9 +1153,9 @@ c.reduceDescriptors(ie.prototype, ({ value: e }, t) => {
|
|
|
1153
1153
|
}
|
|
1154
1154
|
};
|
|
1155
1155
|
});
|
|
1156
|
-
c.freezeMethods(
|
|
1156
|
+
c.freezeMethods(oe);
|
|
1157
1157
|
function Ve(e, t) {
|
|
1158
|
-
const n = this || Le, s = t || n, r =
|
|
1158
|
+
const n = this || Le, 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);
|
|
@@ -1199,13 +1199,13 @@ function js(e, t) {
|
|
|
1199
1199
|
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
1200
1200
|
const d = Date.now(), l = s[i];
|
|
1201
1201
|
o || (o = d), n[r] = f, s[r] = d;
|
|
1202
|
-
let _ = i,
|
|
1202
|
+
let _ = i, C = 0;
|
|
1203
1203
|
for (; _ !== r; )
|
|
1204
|
-
|
|
1204
|
+
C += n[_++], _ = _ % e;
|
|
1205
1205
|
if (r = (r + 1) % e, r === i && (i = (i + 1) % e), d - o < t)
|
|
1206
1206
|
return;
|
|
1207
|
-
const
|
|
1208
|
-
return
|
|
1207
|
+
const b = l && d - l;
|
|
1208
|
+
return b ? Math.round(C * 1e3 / b) : void 0;
|
|
1209
1209
|
};
|
|
1210
1210
|
}
|
|
1211
1211
|
function Bs(e, t) {
|
|
@@ -1288,18 +1288,18 @@ function ln(e, t, n) {
|
|
|
1288
1288
|
let s = !Hs(t);
|
|
1289
1289
|
return e && (s || n == !1) ? Is(e, t) : t;
|
|
1290
1290
|
}
|
|
1291
|
-
const Dt = (e) => e instanceof
|
|
1291
|
+
const Dt = (e) => e instanceof oe ? { ...e } : e;
|
|
1292
1292
|
function ge(e, t) {
|
|
1293
1293
|
t = t || {};
|
|
1294
1294
|
const n = {};
|
|
1295
|
-
function s(d, l, _,
|
|
1296
|
-
return c.isPlainObject(d) && c.isPlainObject(l) ? c.merge.call({ caseless:
|
|
1295
|
+
function s(d, l, _, C) {
|
|
1296
|
+
return c.isPlainObject(d) && c.isPlainObject(l) ? c.merge.call({ caseless: C }, d, l) : c.isPlainObject(l) ? c.merge({}, l) : c.isArray(l) ? l.slice() : l;
|
|
1297
1297
|
}
|
|
1298
|
-
function r(d, l, _,
|
|
1298
|
+
function r(d, l, _, C) {
|
|
1299
1299
|
if (c.isUndefined(l)) {
|
|
1300
1300
|
if (!c.isUndefined(d))
|
|
1301
|
-
return s(void 0, d, _,
|
|
1302
|
-
} else return s(d, l, _,
|
|
1301
|
+
return s(void 0, d, _, C);
|
|
1302
|
+
} else return s(d, l, _, C);
|
|
1303
1303
|
}
|
|
1304
1304
|
function i(d, l) {
|
|
1305
1305
|
if (!c.isUndefined(l))
|
|
@@ -1353,15 +1353,15 @@ function ge(e, t) {
|
|
|
1353
1353
|
function(l) {
|
|
1354
1354
|
if (l === "__proto__" || l === "constructor" || l === "prototype")
|
|
1355
1355
|
return;
|
|
1356
|
-
const _ = c.hasOwnProp(f, l) ? f[l] : r,
|
|
1357
|
-
c.isUndefined(
|
|
1356
|
+
const _ = c.hasOwnProp(f, l) ? f[l] : r, C = _(e[l], t[l], l);
|
|
1357
|
+
c.isUndefined(C) && _ !== a || (n[l] = C);
|
|
1358
1358
|
}
|
|
1359
1359
|
), n;
|
|
1360
1360
|
}
|
|
1361
1361
|
const dn = (e) => {
|
|
1362
1362
|
const t = ge({}, e);
|
|
1363
1363
|
let { data: n, withXSRFToken: s, xsrfHeaderName: r, xsrfCookieName: i, headers: o, auth: a } = t;
|
|
1364
|
-
if (t.headers = o =
|
|
1364
|
+
if (t.headers = o = oe.from(o), t.url = rn(ln(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), a && o.set(
|
|
1365
1365
|
"Authorization",
|
|
1366
1366
|
"Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
|
|
1367
1367
|
), c.isFormData(n)) {
|
|
@@ -1383,17 +1383,17 @@ const dn = (e) => {
|
|
|
1383
1383
|
return new Promise(function(n, s) {
|
|
1384
1384
|
const r = dn(e);
|
|
1385
1385
|
let i = r.data;
|
|
1386
|
-
const o =
|
|
1387
|
-
let { responseType: a, onUploadProgress: f, onDownloadProgress: d } = r, l, _,
|
|
1386
|
+
const o = oe.from(r.headers).normalize();
|
|
1387
|
+
let { responseType: a, onUploadProgress: f, onDownloadProgress: d } = r, l, _, C, b, p;
|
|
1388
1388
|
function w() {
|
|
1389
|
-
|
|
1389
|
+
b && b(), p && p(), r.cancelToken && r.cancelToken.unsubscribe(l), r.signal && r.signal.removeEventListener("abort", l);
|
|
1390
1390
|
}
|
|
1391
1391
|
let h = new XMLHttpRequest();
|
|
1392
1392
|
h.open(r.method.toUpperCase(), r.url, !0), h.timeout = r.timeout;
|
|
1393
1393
|
function D() {
|
|
1394
1394
|
if (!h)
|
|
1395
1395
|
return;
|
|
1396
|
-
const T =
|
|
1396
|
+
const T = oe.from(
|
|
1397
1397
|
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
|
|
1398
1398
|
), M = {
|
|
1399
1399
|
data: !a || a === "text" || a === "json" ? h.responseText : h.response,
|
|
@@ -1427,7 +1427,7 @@ const dn = (e) => {
|
|
|
1427
1427
|
)), h = null;
|
|
1428
1428
|
}, i === void 0 && o.setContentType(null), "setRequestHeader" in h && c.forEach(o.toJSON(), function(j, M) {
|
|
1429
1429
|
h.setRequestHeader(M, j);
|
|
1430
|
-
}), c.isUndefined(r.withCredentials) || (h.withCredentials = !!r.withCredentials), a && a !== "json" && (h.responseType = r.responseType), d && ([
|
|
1430
|
+
}), c.isUndefined(r.withCredentials) || (h.withCredentials = !!r.withCredentials), a && a !== "json" && (h.responseType = r.responseType), d && ([C, p] = He(d, !0), h.addEventListener("progress", C)), f && h.upload && ([_, b] = He(f), h.upload.addEventListener("progress", _), h.upload.addEventListener("loadend", b)), (r.cancelToken || r.signal) && (l = (T) => {
|
|
1431
1431
|
h && (s(!T || T.type ? new Pe(null, e, h) : T), h.abort(), h = null);
|
|
1432
1432
|
}, r.cancelToken && r.cancelToken.subscribe(l), r.signal && (r.signal.aborted ? l() : r.signal.addEventListener("abort", l)));
|
|
1433
1433
|
const F = Fs(r.url);
|
|
@@ -1503,8 +1503,8 @@ const dn = (e) => {
|
|
|
1503
1503
|
}
|
|
1504
1504
|
let _ = l.byteLength;
|
|
1505
1505
|
if (n) {
|
|
1506
|
-
let
|
|
1507
|
-
n(
|
|
1506
|
+
let C = i += _;
|
|
1507
|
+
n(C);
|
|
1508
1508
|
}
|
|
1509
1509
|
f.enqueue(new Uint8Array(l));
|
|
1510
1510
|
} catch (d) {
|
|
@@ -1557,7 +1557,7 @@ const dn = (e) => {
|
|
|
1557
1557
|
throw new R(`Response type '${p}' is not supported`, R.ERR_NOT_SUPPORT, h);
|
|
1558
1558
|
});
|
|
1559
1559
|
});
|
|
1560
|
-
const
|
|
1560
|
+
const C = async (p) => {
|
|
1561
1561
|
if (p == null)
|
|
1562
1562
|
return 0;
|
|
1563
1563
|
if (c.isBlob(p))
|
|
@@ -1571,9 +1571,9 @@ const dn = (e) => {
|
|
|
1571
1571
|
return p.byteLength;
|
|
1572
1572
|
if (c.isURLSearchParams(p) && (p = p + ""), c.isString(p))
|
|
1573
1573
|
return (await f(p)).byteLength;
|
|
1574
|
-
},
|
|
1574
|
+
}, b = async (p, w) => {
|
|
1575
1575
|
const h = c.toFiniteNumber(p.getContentLength());
|
|
1576
|
-
return h ??
|
|
1576
|
+
return h ?? C(w);
|
|
1577
1577
|
};
|
|
1578
1578
|
return async (p) => {
|
|
1579
1579
|
let {
|
|
@@ -1586,7 +1586,7 @@ const dn = (e) => {
|
|
|
1586
1586
|
onDownloadProgress: M,
|
|
1587
1587
|
onUploadProgress: O,
|
|
1588
1588
|
responseType: X,
|
|
1589
|
-
headers:
|
|
1589
|
+
headers: se,
|
|
1590
1590
|
withCredentials: k = "same-origin",
|
|
1591
1591
|
fetchOptions: B
|
|
1592
1592
|
} = dn(p), le = t || fetch;
|
|
@@ -1597,13 +1597,13 @@ const dn = (e) => {
|
|
|
1597
1597
|
});
|
|
1598
1598
|
let V;
|
|
1599
1599
|
try {
|
|
1600
|
-
if (O && d && h !== "get" && h !== "head" && (V = await
|
|
1600
|
+
if (O && d && h !== "get" && h !== "head" && (V = await b(se, D)) !== 0) {
|
|
1601
1601
|
let u = new n(w, {
|
|
1602
1602
|
method: "POST",
|
|
1603
1603
|
body: D,
|
|
1604
1604
|
duplex: "half"
|
|
1605
1605
|
}), g;
|
|
1606
|
-
if (c.isFormData(D) && (g = u.headers.get("content-type")) &&
|
|
1606
|
+
if (c.isFormData(D) && (g = u.headers.get("content-type")) && se.setContentType(g), u.body) {
|
|
1607
1607
|
const [U, E] = Et(
|
|
1608
1608
|
V,
|
|
1609
1609
|
He(St(O))
|
|
@@ -1612,17 +1612,17 @@ const dn = (e) => {
|
|
|
1612
1612
|
}
|
|
1613
1613
|
}
|
|
1614
1614
|
c.isString(k) || (k = k ? "include" : "omit");
|
|
1615
|
-
const x = i && "credentials" in n.prototype,
|
|
1615
|
+
const x = i && "credentials" in n.prototype, re = {
|
|
1616
1616
|
...B,
|
|
1617
1617
|
signal: Z,
|
|
1618
1618
|
method: h.toUpperCase(),
|
|
1619
|
-
headers:
|
|
1619
|
+
headers: se.normalize().toJSON(),
|
|
1620
1620
|
body: D,
|
|
1621
1621
|
duplex: "half",
|
|
1622
1622
|
credentials: x ? k : void 0
|
|
1623
1623
|
};
|
|
1624
|
-
A = i && new n(w,
|
|
1625
|
-
let y = await (i ? le(A, B) : le(w,
|
|
1624
|
+
A = i && new n(w, re);
|
|
1625
|
+
let y = await (i ? le(A, B) : le(w, re));
|
|
1626
1626
|
const K = l && (X === "stream" || X === "response");
|
|
1627
1627
|
if (l && (M || K && L)) {
|
|
1628
1628
|
const u = {};
|
|
@@ -1645,7 +1645,7 @@ const dn = (e) => {
|
|
|
1645
1645
|
return !K && L && L(), await new Promise((u, g) => {
|
|
1646
1646
|
cn(u, g, {
|
|
1647
1647
|
data: N,
|
|
1648
|
-
headers:
|
|
1648
|
+
headers: oe.from(y.headers),
|
|
1649
1649
|
status: y.status,
|
|
1650
1650
|
statusText: y.statusText,
|
|
1651
1651
|
config: p,
|
|
@@ -1736,7 +1736,7 @@ function Ke(e) {
|
|
|
1736
1736
|
throw new Pe(null, e);
|
|
1737
1737
|
}
|
|
1738
1738
|
function Lt(e) {
|
|
1739
|
-
return Ke(e), e.headers =
|
|
1739
|
+
return Ke(e), e.headers = oe.from(e.headers), e.data = Ve.call(
|
|
1740
1740
|
e,
|
|
1741
1741
|
e.transformRequest
|
|
1742
1742
|
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), pn.getAdapter(e.adapter || Le.adapter, e)(e).then(function(s) {
|
|
@@ -1744,13 +1744,13 @@ function Lt(e) {
|
|
|
1744
1744
|
e,
|
|
1745
1745
|
e.transformResponse,
|
|
1746
1746
|
s
|
|
1747
|
-
), s.headers =
|
|
1747
|
+
), s.headers = oe.from(s.headers), s;
|
|
1748
1748
|
}, function(s) {
|
|
1749
1749
|
return an(s) || (Ke(e), s && s.response && (s.response.data = Ve.call(
|
|
1750
1750
|
e,
|
|
1751
1751
|
e.transformResponse,
|
|
1752
1752
|
s.response
|
|
1753
|
-
), s.response.headers =
|
|
1753
|
+
), s.response.headers = oe.from(s.response.headers))), Promise.reject(s);
|
|
1754
1754
|
});
|
|
1755
1755
|
}
|
|
1756
1756
|
const fn = "1.13.5", Xe = {};
|
|
@@ -1860,7 +1860,7 @@ let we = class {
|
|
|
1860
1860
|
(p) => {
|
|
1861
1861
|
delete i[p];
|
|
1862
1862
|
}
|
|
1863
|
-
), n.headers =
|
|
1863
|
+
), n.headers = oe.concat(o, i);
|
|
1864
1864
|
const a = [];
|
|
1865
1865
|
let f = !0;
|
|
1866
1866
|
this.interceptors.request.forEach(function(w) {
|
|
@@ -1874,30 +1874,30 @@ let we = class {
|
|
|
1874
1874
|
this.interceptors.response.forEach(function(w) {
|
|
1875
1875
|
d.push(w.fulfilled, w.rejected);
|
|
1876
1876
|
});
|
|
1877
|
-
let l, _ = 0,
|
|
1877
|
+
let l, _ = 0, C;
|
|
1878
1878
|
if (!f) {
|
|
1879
1879
|
const p = [Lt.bind(this), void 0];
|
|
1880
|
-
for (p.unshift(...a), p.push(...d),
|
|
1880
|
+
for (p.unshift(...a), p.push(...d), C = p.length, l = Promise.resolve(n); _ < C; )
|
|
1881
1881
|
l = l.then(p[_++], p[_++]);
|
|
1882
1882
|
return l;
|
|
1883
1883
|
}
|
|
1884
|
-
|
|
1885
|
-
let
|
|
1886
|
-
for (; _ <
|
|
1884
|
+
C = a.length;
|
|
1885
|
+
let b = n;
|
|
1886
|
+
for (; _ < C; ) {
|
|
1887
1887
|
const p = a[_++], w = a[_++];
|
|
1888
1888
|
try {
|
|
1889
|
-
|
|
1889
|
+
b = p(b);
|
|
1890
1890
|
} catch (h) {
|
|
1891
1891
|
w.call(this, h);
|
|
1892
1892
|
break;
|
|
1893
1893
|
}
|
|
1894
1894
|
}
|
|
1895
1895
|
try {
|
|
1896
|
-
l = Lt.call(this,
|
|
1896
|
+
l = Lt.call(this, b);
|
|
1897
1897
|
} catch (p) {
|
|
1898
1898
|
return Promise.reject(p);
|
|
1899
1899
|
}
|
|
1900
|
-
for (_ = 0,
|
|
1900
|
+
for (_ = 0, C = d.length; _ < C; )
|
|
1901
1901
|
l = l.then(d[_++], d[_++]);
|
|
1902
1902
|
return l;
|
|
1903
1903
|
}
|
|
@@ -2107,7 +2107,7 @@ J.all = function(t) {
|
|
|
2107
2107
|
J.spread = nr;
|
|
2108
2108
|
J.isAxiosError = sr;
|
|
2109
2109
|
J.mergeConfig = ge;
|
|
2110
|
-
J.AxiosHeaders =
|
|
2110
|
+
J.AxiosHeaders = oe;
|
|
2111
2111
|
J.formToJSON = (e) => on(c.isHTMLForm(e) ? new FormData(e) : e);
|
|
2112
2112
|
J.getAdapter = pn.getAdapter;
|
|
2113
2113
|
J.HttpStatusCode = et;
|
|
@@ -2134,8 +2134,8 @@ const {
|
|
|
2134
2134
|
const n = /* @__PURE__ */ new Set(), s = (d, l) => {
|
|
2135
2135
|
const _ = typeof d == "function" ? d(t) : d;
|
|
2136
2136
|
if (!Object.is(_, t)) {
|
|
2137
|
-
const
|
|
2138
|
-
t = l ?? (typeof _ != "object" || _ === null) ? _ : Object.assign({}, t, _), n.forEach((
|
|
2137
|
+
const C = t;
|
|
2138
|
+
t = l ?? (typeof _ != "object" || _ === null) ? _ : Object.assign({}, t, _), n.forEach((b) => b(t, C));
|
|
2139
2139
|
}
|
|
2140
2140
|
}, r = () => t, a = { setState: s, getState: r, getInitialState: () => f, subscribe: (d) => (n.add(d), () => n.delete(d)) }, f = t = e(s, r, a);
|
|
2141
2141
|
return a;
|
|
@@ -2496,7 +2496,7 @@ const Ar = ({
|
|
|
2496
2496
|
children: t,
|
|
2497
2497
|
isCompared: n
|
|
2498
2498
|
}) => {
|
|
2499
|
-
const [s, r] =
|
|
2499
|
+
const [s, r] = ce(!1);
|
|
2500
2500
|
return /* @__PURE__ */ m.jsxs("div", { className: "news-widget_event_details__container news-widget_event_details__container_sm", children: [
|
|
2501
2501
|
e && /* @__PURE__ */ m.jsxs("div", { style: { position: "relative" }, children: [
|
|
2502
2502
|
/* @__PURE__ */ m.jsx(
|
|
@@ -2665,11 +2665,11 @@ function vr(e, t, n = []) {
|
|
|
2665
2665
|
if (e.length === 0) return [];
|
|
2666
2666
|
const s = n.map((l) => Math.abs(l.c - l.o)), r = e.map((l) => Math.abs(l.c - l.o)), i = Bt(r), o = Bt(s), a = Nr(o, i), f = e[0].o, d = t.c;
|
|
2667
2667
|
return e.map((l) => {
|
|
2668
|
-
const _ = (l.o - f) * a + d,
|
|
2668
|
+
const _ = (l.o - f) * a + d, C = (l.h - f) * a + d, b = (l.l - f) * a + d, p = (l.c - f) * a + d;
|
|
2669
2669
|
return {
|
|
2670
2670
|
o: _,
|
|
2671
|
-
h: Math.max(
|
|
2672
|
-
l: Math.min(
|
|
2671
|
+
h: Math.max(C, _, p),
|
|
2672
|
+
l: Math.min(b, _, p),
|
|
2673
2673
|
c: p
|
|
2674
2674
|
};
|
|
2675
2675
|
});
|
|
@@ -3135,19 +3135,19 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3135
3135
|
symbol: o
|
|
3136
3136
|
}) => {
|
|
3137
3137
|
const a = Ce(
|
|
3138
|
-
(
|
|
3139
|
-
), f = Ce((
|
|
3140
|
-
(
|
|
3141
|
-
), l = Ce((
|
|
3138
|
+
(b) => b.newsSelectedCandles
|
|
3139
|
+
), f = Ce((b) => b.newsTargetCandle), d = Ce(
|
|
3140
|
+
(b) => b.newsPlayEndTimestamp
|
|
3141
|
+
), l = Ce((b) => b.gapCount), _ = ue(a), C = ue(null);
|
|
3142
3142
|
return pe(() => {
|
|
3143
|
-
const
|
|
3143
|
+
const b = {
|
|
3144
3144
|
current: null
|
|
3145
3145
|
};
|
|
3146
3146
|
let p = null, w = !1;
|
|
3147
3147
|
return (async () => {
|
|
3148
3148
|
if (!w) {
|
|
3149
3149
|
if (a?.length && f !== null) {
|
|
3150
|
-
if (
|
|
3150
|
+
if (C.current === a) return;
|
|
3151
3151
|
t.current = [];
|
|
3152
3152
|
const h = d != null;
|
|
3153
3153
|
if (_.current || h)
|
|
@@ -3187,7 +3187,7 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3187
3187
|
n.current = k.slice(-50);
|
|
3188
3188
|
let B = 0, le = 0;
|
|
3189
3189
|
const Z = async () => {
|
|
3190
|
-
|
|
3190
|
+
b.current && (clearInterval(b.current), b.current = null), C.current = a;
|
|
3191
3191
|
try {
|
|
3192
3192
|
a && k.length > 0;
|
|
3193
3193
|
} catch (A) {
|
|
@@ -3195,7 +3195,7 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3195
3195
|
}
|
|
3196
3196
|
};
|
|
3197
3197
|
k.length === 0 ? (t.current = [], await Z()) : p = setTimeout(() => {
|
|
3198
|
-
w || (
|
|
3198
|
+
w || (b.current = setInterval(() => {
|
|
3199
3199
|
if (B < k.length) {
|
|
3200
3200
|
if (r(e, k[B]))
|
|
3201
3201
|
t.current = k.slice(0, B + 1), B++, le = 0, B === k.length && (t.current = k, Z());
|
|
@@ -3216,12 +3216,12 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3216
3216
|
s?.current?.resetCache(), s?.current?.activeChart().resetData();
|
|
3217
3217
|
} catch {
|
|
3218
3218
|
}
|
|
3219
|
-
|
|
3219
|
+
C.current = null;
|
|
3220
3220
|
}
|
|
3221
3221
|
_.current = a;
|
|
3222
3222
|
}
|
|
3223
3223
|
})(), () => {
|
|
3224
|
-
w = !0, p && clearTimeout(p),
|
|
3224
|
+
w = !0, p && clearTimeout(p), b.current && (t.current = [], clearInterval(b.current));
|
|
3225
3225
|
};
|
|
3226
3226
|
}, [
|
|
3227
3227
|
r,
|
|
@@ -3251,8 +3251,8 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3251
3251
|
currentSymbol: d,
|
|
3252
3252
|
currentTimeFrame: l,
|
|
3253
3253
|
isUpcoming: _ = !1,
|
|
3254
|
-
isElapsed:
|
|
3255
|
-
onBack:
|
|
3254
|
+
isElapsed: C = !1,
|
|
3255
|
+
onBack: b,
|
|
3256
3256
|
pushBar: p,
|
|
3257
3257
|
iframeRef: w,
|
|
3258
3258
|
futureRef: h,
|
|
@@ -3262,7 +3262,7 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3262
3262
|
setGapCountExternal: j,
|
|
3263
3263
|
setReplayModeExternal: M
|
|
3264
3264
|
}) => {
|
|
3265
|
-
const O = ue(null), { setCurrentSymbol: X, setSelectedTimeframe:
|
|
3265
|
+
const O = ue(null), { setCurrentSymbol: X, setSelectedTimeframe: se } = lr(), {
|
|
3266
3266
|
setNewsTargetCandle: k,
|
|
3267
3267
|
setGapCount: B,
|
|
3268
3268
|
setNewsPlayEndTimestamp: le,
|
|
@@ -3271,16 +3271,18 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3271
3271
|
return pe(() => {
|
|
3272
3272
|
if (!t || t == "" || !s) return;
|
|
3273
3273
|
const A = () => {
|
|
3274
|
-
if (s)
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3274
|
+
if (s)
|
|
3275
|
+
try {
|
|
3276
|
+
const y = s?.activeChart();
|
|
3277
|
+
y && y.getAllShapes().forEach((K) => {
|
|
3278
|
+
try {
|
|
3279
|
+
y.removeEntity(K.id);
|
|
3280
|
+
} catch (N) {
|
|
3281
|
+
console.error("Failed to remove shape", N);
|
|
3282
|
+
}
|
|
3283
|
+
});
|
|
3284
|
+
} catch {
|
|
3285
|
+
}
|
|
3284
3286
|
}, L = async () => {
|
|
3285
3287
|
const { data: y, status: K } = await J.get(
|
|
3286
3288
|
`https://corprate-widget.iccandle.ai/news/${t}`,
|
|
@@ -3296,7 +3298,7 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3296
3298
|
return y;
|
|
3297
3299
|
};
|
|
3298
3300
|
let V = !1;
|
|
3299
|
-
const x = [],
|
|
3301
|
+
const x = [], re = (y, K) => {
|
|
3300
3302
|
const N = window.setTimeout(y, K);
|
|
3301
3303
|
return x.push(N), N;
|
|
3302
3304
|
};
|
|
@@ -3338,31 +3340,31 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3338
3340
|
let z = a;
|
|
3339
3341
|
if (S != -1 && !z && (z = [...hn].sort((v, q) => q - v).find((v) => H.data[S + v]) ?? null), S != -1 && z) {
|
|
3340
3342
|
const v = E, q = H.data[S + z][0], I = H.data.filter(
|
|
3341
|
-
(
|
|
3343
|
+
(ae) => ae[0] > v && ae[0] <= q
|
|
3342
3344
|
) ?? [];
|
|
3343
3345
|
let Q = null, me = null;
|
|
3344
3346
|
if (I.length > 0) {
|
|
3345
|
-
const
|
|
3347
|
+
const ae = I.reduce(
|
|
3346
3348
|
(te, ne, P, G) => Number(ne[3]) < Number(G[te][3]) ? P : te,
|
|
3347
3349
|
0
|
|
3348
|
-
), $ = I[
|
|
3350
|
+
), $ = I[ae];
|
|
3349
3351
|
me = {
|
|
3350
3352
|
time: $[0],
|
|
3351
3353
|
value: Number($[3])
|
|
3352
3354
|
};
|
|
3353
3355
|
}
|
|
3354
3356
|
if (I.length > 0) {
|
|
3355
|
-
const
|
|
3357
|
+
const ae = I.reduce(
|
|
3356
3358
|
(te, ne, P, G) => Number(ne[2]) > Number(G[te][2]) ? P : te,
|
|
3357
3359
|
0
|
|
3358
|
-
), $ = I[
|
|
3360
|
+
), $ = I[ae];
|
|
3359
3361
|
Q = {
|
|
3360
3362
|
time: $[0],
|
|
3361
3363
|
value: Number($[2])
|
|
3362
3364
|
};
|
|
3363
3365
|
}
|
|
3364
3366
|
if (Q && me && I.length > 0) {
|
|
3365
|
-
const
|
|
3367
|
+
const ae = Q.value, $ = me.value, ne = H.data[S + 1][1];
|
|
3366
3368
|
await y.createMultipointShape(
|
|
3367
3369
|
[
|
|
3368
3370
|
{
|
|
@@ -3371,7 +3373,7 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3371
3373
|
},
|
|
3372
3374
|
{
|
|
3373
3375
|
time: q,
|
|
3374
|
-
price:
|
|
3376
|
+
price: ae
|
|
3375
3377
|
}
|
|
3376
3378
|
],
|
|
3377
3379
|
{
|
|
@@ -3420,11 +3422,11 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3420
3422
|
[
|
|
3421
3423
|
{
|
|
3422
3424
|
time: v,
|
|
3423
|
-
price:
|
|
3425
|
+
price: ae
|
|
3424
3426
|
},
|
|
3425
3427
|
{
|
|
3426
3428
|
time: q,
|
|
3427
|
-
price:
|
|
3429
|
+
price: ae
|
|
3428
3430
|
}
|
|
3429
3431
|
],
|
|
3430
3432
|
{
|
|
@@ -3465,7 +3467,7 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3465
3467
|
let G = "", W = "";
|
|
3466
3468
|
if (P) {
|
|
3467
3469
|
const Oe = Math.pow(10, -P), pt = parseFloat(
|
|
3468
|
-
Math.abs((
|
|
3470
|
+
Math.abs((ae - ne) * Oe).toFixed(
|
|
3469
3471
|
1
|
|
3470
3472
|
)
|
|
3471
3473
|
), ft = parseFloat(
|
|
@@ -3536,7 +3538,7 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3536
3538
|
to: q + Q
|
|
3537
3539
|
},
|
|
3538
3540
|
{ applyDefaultRightMargin: !0, percentRightMargin: 50 }
|
|
3539
|
-
),
|
|
3541
|
+
), re(() => {
|
|
3540
3542
|
V || O.current !== s || Number(I) <= 30 && y.createShape(
|
|
3541
3543
|
{ time: q },
|
|
3542
3544
|
{
|
|
@@ -3561,7 +3563,7 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3561
3563
|
{ applyDefaultRightMargin: !0, percentRightMargin: 50 }
|
|
3562
3564
|
), await K(Y, S));
|
|
3563
3565
|
}, u = () => {
|
|
3564
|
-
|
|
3566
|
+
re(() => {
|
|
3565
3567
|
V || O.current !== s || d == y.symbol() || (async () => {
|
|
3566
3568
|
try {
|
|
3567
3569
|
j(0), M(!1), Z(null), w.current?.contentWindow?.postMessage(
|
|
@@ -3574,13 +3576,13 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3574
3576
|
})();
|
|
3575
3577
|
}, 300);
|
|
3576
3578
|
}, g = (E) => {
|
|
3577
|
-
|
|
3579
|
+
re(() => {
|
|
3578
3580
|
V || O.current !== s || l == E || (async () => {
|
|
3579
3581
|
try {
|
|
3580
3582
|
j(0), M(!1), Z(null), w.current?.contentWindow?.postMessage(
|
|
3581
3583
|
{ action: "handleClose" },
|
|
3582
3584
|
"*"
|
|
3583
|
-
),
|
|
3585
|
+
), se(E);
|
|
3584
3586
|
} catch (Y) {
|
|
3585
3587
|
console.log("error=>", Y);
|
|
3586
3588
|
}
|
|
@@ -3589,7 +3591,7 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3589
3591
|
};
|
|
3590
3592
|
y.onSymbolChanged().subscribe(null, u), y.onIntervalChanged().subscribe(null, g);
|
|
3591
3593
|
try {
|
|
3592
|
-
|
|
3594
|
+
C || await N();
|
|
3593
3595
|
} catch (E) {
|
|
3594
3596
|
console.log("error=>", E);
|
|
3595
3597
|
}
|
|
@@ -3616,10 +3618,10 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3616
3618
|
r,
|
|
3617
3619
|
t,
|
|
3618
3620
|
l,
|
|
3619
|
-
|
|
3621
|
+
se,
|
|
3620
3622
|
d,
|
|
3621
3623
|
X,
|
|
3622
|
-
|
|
3624
|
+
C,
|
|
3623
3625
|
le,
|
|
3624
3626
|
Z,
|
|
3625
3627
|
B,
|
|
@@ -3628,69 +3630,74 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3628
3630
|
M,
|
|
3629
3631
|
w
|
|
3630
3632
|
]), pe(() => {
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
s.
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
l: N[3],
|
|
3642
|
-
c: N[4],
|
|
3643
|
-
timestamp: N[0] * 1e3
|
|
3644
|
-
}));
|
|
3645
|
-
if (_) {
|
|
3646
|
-
const N = L[L.length - 1], u = {
|
|
3633
|
+
if (s) {
|
|
3634
|
+
if (t == "" || C) return;
|
|
3635
|
+
s.onChartReady(async () => {
|
|
3636
|
+
const A = s?.activeChart();
|
|
3637
|
+
se(A.resolution()), s.resetCache(), A.resetData(), A && A.onDataLoaded().subscribe(
|
|
3638
|
+
null,
|
|
3639
|
+
async () => {
|
|
3640
|
+
const { data: L } = await A.exportData(), V = tt(l), x = (r?.timestamp ?? 0) / 1e3, re = x - x % V, y = L.findIndex(
|
|
3641
|
+
(N) => N[0] === re
|
|
3642
|
+
), K = L.slice(y - 49, y + 1).map((N) => ({
|
|
3647
3643
|
o: N[1],
|
|
3648
3644
|
h: N[2],
|
|
3649
3645
|
l: N[3],
|
|
3650
3646
|
c: N[4],
|
|
3651
3647
|
timestamp: N[0] * 1e3
|
|
3652
|
-
}, g = A.resolution(), U = ye(g) * 1e3, E = u.timestamp, Y = r?.timestamp ?? 0, H = Math.floor(Y / U) * U, S = ut.find(
|
|
3653
|
-
(I) => I.ticker === d || I.display_name === d
|
|
3654
|
-
)?.session || "24x7", z = Lr(
|
|
3655
|
-
E,
|
|
3656
|
-
H,
|
|
3657
|
-
g,
|
|
3658
|
-
S
|
|
3659
|
-
), v = L.slice(-50).map((I) => ({
|
|
3660
|
-
o: I[1],
|
|
3661
|
-
h: I[2],
|
|
3662
|
-
l: I[3],
|
|
3663
|
-
c: I[4],
|
|
3664
|
-
timestamp: I[0] * 1e3
|
|
3665
3648
|
}));
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3649
|
+
if (_) {
|
|
3650
|
+
const N = L[L.length - 1], u = {
|
|
3651
|
+
o: N[1],
|
|
3652
|
+
h: N[2],
|
|
3653
|
+
l: N[3],
|
|
3654
|
+
c: N[4],
|
|
3655
|
+
timestamp: N[0] * 1e3
|
|
3656
|
+
}, g = A.resolution(), U = ye(g) * 1e3, E = u.timestamp, Y = r?.timestamp ?? 0, H = Math.floor(Y / U) * U, S = ut.find(
|
|
3657
|
+
(I) => I.ticker === d || I.display_name === d
|
|
3658
|
+
)?.session || "24x7", z = Lr(
|
|
3659
|
+
E,
|
|
3660
|
+
H,
|
|
3661
|
+
g,
|
|
3662
|
+
S
|
|
3663
|
+
), v = L.slice(-50).map((I) => ({
|
|
3664
|
+
o: I[1],
|
|
3665
|
+
h: I[2],
|
|
3666
|
+
l: I[3],
|
|
3667
|
+
c: I[4],
|
|
3668
|
+
timestamp: I[0] * 1e3
|
|
3669
|
+
}));
|
|
3670
|
+
B(z), k(v);
|
|
3671
|
+
const q = { newsTargetCandle: v, gapCount: z };
|
|
3672
|
+
D.current = q, F.current && (w.current?.contentWindow?.postMessage(
|
|
3673
|
+
D.current,
|
|
3674
|
+
"*"
|
|
3675
|
+
), D.current = null);
|
|
3676
|
+
} else {
|
|
3677
|
+
k(K), B(0);
|
|
3678
|
+
const N = {
|
|
3679
|
+
newsTargetCandle: K,
|
|
3680
|
+
gapCount: 0
|
|
3681
|
+
};
|
|
3682
|
+
D.current = N, F.current && (w.current?.contentWindow?.postMessage(
|
|
3683
|
+
D.current,
|
|
3684
|
+
"*"
|
|
3685
|
+
), D.current = null);
|
|
3686
|
+
}
|
|
3687
|
+
},
|
|
3688
|
+
!0
|
|
3689
|
+
);
|
|
3690
|
+
});
|
|
3691
|
+
}
|
|
3687
3692
|
}, [
|
|
3688
3693
|
t,
|
|
3689
3694
|
r?.timestamp,
|
|
3690
3695
|
k,
|
|
3696
|
+
se,
|
|
3691
3697
|
B,
|
|
3692
3698
|
l,
|
|
3693
3699
|
_,
|
|
3700
|
+
C,
|
|
3694
3701
|
d,
|
|
3695
3702
|
s,
|
|
3696
3703
|
D
|
|
@@ -3701,7 +3708,7 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3701
3708
|
{
|
|
3702
3709
|
type: "button",
|
|
3703
3710
|
className: "news-widget__button news-widget__button--ghost news-widget__button--icon news-widget_detail_page__back_button",
|
|
3704
|
-
onClick:
|
|
3711
|
+
onClick: b,
|
|
3705
3712
|
children: /* @__PURE__ */ m.jsx(gr, { className: "news-widget_detail_page__back_icon" })
|
|
3706
3713
|
}
|
|
3707
3714
|
),
|
|
@@ -3736,16 +3743,15 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3736
3743
|
futureRef: d,
|
|
3737
3744
|
highlightBarsRef: l,
|
|
3738
3745
|
setGapCountExternal: _,
|
|
3739
|
-
setReplayModeExternal:
|
|
3740
|
-
// setNewsPlayEndTimestampExternal,
|
|
3746
|
+
setReplayModeExternal: C
|
|
3741
3747
|
}) => {
|
|
3742
|
-
const { start:
|
|
3748
|
+
const { start: b } = An(), [p, w] = ce(""), [h, D] = ce(i), [F, T] = ce(r), [j, M] = ce(i), [O, X] = ce(r), [se, k] = ce(null), [B, le] = ce(
|
|
3743
3749
|
null
|
|
3744
3750
|
), Z = ue(null), A = ue(!1), {
|
|
3745
3751
|
setNewsSelectedCandles: L,
|
|
3746
3752
|
setNewsPlayEndTimestamp: V,
|
|
3747
3753
|
newsTargetCandle: x,
|
|
3748
|
-
gapCount:
|
|
3754
|
+
gapCount: re
|
|
3749
3755
|
} = Ce(), y = ue(null), K = cr[h] || "M15", N = tt("60"), u = B?.[0]?.timestamp ? B?.[0]?.timestamp / 1e3 : 0, g = u - u % N, U = B?.[0]?.candleData.H1?.candles, E = U?.findIndex(($) => $.timestamp === g) || 0, H = (U?.length || 0) - E <= 10, S = "next_pip_up_10" in (B?.[0]?.candleData[K]?.metadata ?? {}), z = !!p && !S, v = ue(z), q = ue(!1);
|
|
3750
3756
|
pe(() => {
|
|
3751
3757
|
if (z !== v.current) {
|
|
@@ -3753,9 +3759,9 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3753
3759
|
q.current = !1;
|
|
3754
3760
|
return;
|
|
3755
3761
|
}
|
|
3756
|
-
|
|
3762
|
+
b();
|
|
3757
3763
|
}
|
|
3758
|
-
}, [z,
|
|
3764
|
+
}, [z, b]), pe(() => {
|
|
3759
3765
|
const $ = async (P) => {
|
|
3760
3766
|
const { data: G, status: W } = await J.get(
|
|
3761
3767
|
`${Mt}/${P}`,
|
|
@@ -3785,9 +3791,9 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3785
3791
|
})();
|
|
3786
3792
|
}, [n, p, r]);
|
|
3787
3793
|
const I = Me(() => {
|
|
3788
|
-
|
|
3794
|
+
C(!1), _(0), L(null), V(null);
|
|
3789
3795
|
}, [
|
|
3790
|
-
|
|
3796
|
+
C,
|
|
3791
3797
|
_,
|
|
3792
3798
|
L,
|
|
3793
3799
|
V
|
|
@@ -3803,7 +3809,7 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3803
3809
|
else if (P.action == "back-to-similar-events")
|
|
3804
3810
|
I();
|
|
3805
3811
|
else if (P.action == "eventClicked") {
|
|
3806
|
-
q.current = !0,
|
|
3812
|
+
q.current = !0, b();
|
|
3807
3813
|
const W = P.data.event, _e = e?.activeChart();
|
|
3808
3814
|
await e?.headerReady(), _e?.clearMarks(2), localStorage.setItem(
|
|
3809
3815
|
"iccandle:current-news-event",
|
|
@@ -3827,8 +3833,9 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3827
3833
|
)?.ticker || "XAU_USD";
|
|
3828
3834
|
T(W);
|
|
3829
3835
|
} else if (P.action == "replay") {
|
|
3836
|
+
if (S) return;
|
|
3830
3837
|
const G = P.data;
|
|
3831
|
-
|
|
3838
|
+
C(G.isReplay), _(re), L(G.selectedCandles), V(
|
|
3832
3839
|
x?.[x.length - 1]?.timestamp ?? null
|
|
3833
3840
|
);
|
|
3834
3841
|
} else P.action == "iframe-ready" && (A.current = !0, Z.current?.contentWindow?.postMessage(
|
|
@@ -3838,26 +3845,24 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3838
3845
|
};
|
|
3839
3846
|
return window.addEventListener("message", $), () => window.removeEventListener("message", $);
|
|
3840
3847
|
}, [
|
|
3848
|
+
S,
|
|
3841
3849
|
x,
|
|
3842
|
-
|
|
3850
|
+
re,
|
|
3843
3851
|
e,
|
|
3844
3852
|
r,
|
|
3845
|
-
|
|
3853
|
+
b,
|
|
3846
3854
|
I,
|
|
3847
3855
|
Q,
|
|
3848
3856
|
a,
|
|
3849
3857
|
y,
|
|
3850
|
-
// setCurrentSymbolCompared,
|
|
3851
|
-
// setSelectedTimeframeCompared,
|
|
3852
3858
|
M,
|
|
3853
3859
|
X,
|
|
3854
3860
|
F,
|
|
3855
3861
|
h,
|
|
3856
|
-
|
|
3862
|
+
C,
|
|
3857
3863
|
_,
|
|
3858
3864
|
V,
|
|
3859
3865
|
L
|
|
3860
|
-
// setNewsPlayEndTimestampExternal,
|
|
3861
3866
|
]);
|
|
3862
3867
|
const me = Te(() => {
|
|
3863
3868
|
const $ = B?.[0]?.candleData?.[K]?.metadata;
|
|
@@ -3874,7 +3879,7 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3874
3879
|
};
|
|
3875
3880
|
return window.addEventListener("popstate", $), () => window.removeEventListener("popstate", $);
|
|
3876
3881
|
}, [Q]);
|
|
3877
|
-
const
|
|
3882
|
+
const ae = Te(() => p ? B ? S ? `${Ae}/${p}?apiKey=${n}&userId=${s}&theme=${o}&interval=${j}&symbol=${O}` : `${Ae}/similar-events/${p}?apiKey=${n}&userId=${s}&theme=${o}` : `${Ae}?apiKey=${n}&userId=${s}&theme=${o}` : `${Ae}?apiKey=${n}&userId=${s}&theme=${o}`, [
|
|
3878
3883
|
p,
|
|
3879
3884
|
B,
|
|
3880
3885
|
S,
|
|
@@ -3905,9 +3910,9 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3905
3910
|
widgetKey: n,
|
|
3906
3911
|
theme: o,
|
|
3907
3912
|
defaultSymbol: r,
|
|
3908
|
-
newsDetail:
|
|
3913
|
+
newsDetail: se,
|
|
3909
3914
|
isUpcoming: H,
|
|
3910
|
-
event:
|
|
3915
|
+
event: se?.event,
|
|
3911
3916
|
selectedCandles: me,
|
|
3912
3917
|
currentTimeFrame: h,
|
|
3913
3918
|
currentSymbol: F,
|
|
@@ -3919,7 +3924,7 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3919
3924
|
pushBar: f,
|
|
3920
3925
|
futureRef: d,
|
|
3921
3926
|
highlightBarsRef: l,
|
|
3922
|
-
setReplayModeExternal:
|
|
3927
|
+
setReplayModeExternal: C,
|
|
3923
3928
|
setGapCountExternal: _,
|
|
3924
3929
|
children: t
|
|
3925
3930
|
}
|
|
@@ -3931,7 +3936,7 @@ const ye = (e) => e === "1" ? 60 : e === "5" ? 300 : e === "1D" ? 1440 * 3600 :
|
|
|
3931
3936
|
/* @__PURE__ */ m.jsx(
|
|
3932
3937
|
"iframe",
|
|
3933
3938
|
{
|
|
3934
|
-
src:
|
|
3939
|
+
src: ae,
|
|
3935
3940
|
ref: Z,
|
|
3936
3941
|
className: p && !S ? "news-widget_main__iframe_half" : "news-widget_main__iframe_full"
|
|
3937
3942
|
}
|
|
@@ -3970,13 +3975,13 @@ const Br = async (e) => {
|
|
|
3970
3975
|
iccandle_primary_gradient_end: "--iccandle-primary-gradient-end"
|
|
3971
3976
|
};
|
|
3972
3977
|
function Yr(e, t) {
|
|
3973
|
-
const [n, s] =
|
|
3978
|
+
const [n, s] = ce(null);
|
|
3974
3979
|
pe(() => {
|
|
3975
3980
|
Br(e).then((d) => {
|
|
3976
3981
|
s(d);
|
|
3977
3982
|
});
|
|
3978
3983
|
}, [e]);
|
|
3979
|
-
const r = ue(null), [i, o] =
|
|
3984
|
+
const r = ue(null), [i, o] = ce(null), a = Te(() => t === "system" ? window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : t, [t]), f = Te(() => {
|
|
3980
3985
|
if (n)
|
|
3981
3986
|
return a === "dark" ? n.dark : n.light;
|
|
3982
3987
|
}, [n, a]);
|