@epam/ai-dial-celebrations 1.1.16 → 1.1.18
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/{CelebrationEnvironmentContext-BxzY78Zg.js → CelebrationEnvironmentContext-CYbe8wwh.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createContext as e, useContext as t } from "react";
|
|
2
|
-
|
|
2
|
+
// src/constants/public-class-names.ts
|
|
3
3
|
var n = {
|
|
4
4
|
decor: "dial-celebrations-decor",
|
|
5
5
|
trigger: "dial-celebrations-trigger",
|
|
@@ -10,5 +10,4 @@ var n = {
|
|
|
10
10
|
labels: {},
|
|
11
11
|
isDecorBehaviorEnabled: () => !0
|
|
12
12
|
}), i = () => t(r), a = (e) => t(r).isDecorBehaviorEnabled(e);
|
|
13
|
-
//#endregion
|
|
14
13
|
export { n as i, i as n, a as r, r as t };
|
package/halloween.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { i as e, n as t, r as n } from "./CelebrationEnvironmentContext-
|
|
2
|
-
import { n as r, t as i } from "./flying-characters-
|
|
1
|
+
import { i as e, n as t, r as n } from "./CelebrationEnvironmentContext-CYbe8wwh.js";
|
|
2
|
+
import { n as r, t as i } from "./flying-characters-CRMBOYze.js";
|
|
3
3
|
import { mergeClasses as a } from "@epam/ai-dial-chat-shared";
|
|
4
4
|
import { memo as o, useCallback as s, useEffect as c, useId as l, useMemo as u, useRef as d, useState as f, useSyncExternalStore as p } from "react";
|
|
5
5
|
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
6
6
|
import { ButtonAppearance as _, IconButton as v } from "@epam/ai-dial-ui-kit";
|
|
7
|
-
|
|
7
|
+
// src/halloween/assets/halloween-logo.svg
|
|
8
8
|
var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20fill='none'%3e%3cdefs%3e%3cradialGradient%20id='skin'%20cx='.35'%20cy='.25'%20r='.85'%3e%3cstop%20stop-color='%23ffd489'/%3e%3cstop%20offset='.4'%20stop-color='%23f49532'/%3e%3cstop%20offset='1'%20stop-color='%23a43d15'/%3e%3c/radialGradient%3e%3clinearGradient%20id='hat'%20x2='1'%20y2='1'%3e%3cstop%20stop-color='%238b779d'/%3e%3cstop%20offset='1'%20stop-color='%23251b35'/%3e%3c/linearGradient%3e%3c/defs%3e%3cpath%20d='M31%2025C14%2017%205%2032%209%2046C12%2058%2024%2061%2032%2057C43%2061%2055%2054%2056%2041C58%2028%2044%2018%2031%2025Z'%20fill='url(%23skin)'%20stroke='%239d4e25'/%3e%3cpath%20d='M25%2026C16%2037%2020%2052%2028%2056M38%2025C47%2037%2044%2050%2036%2057M32%2026V57'%20stroke='%238e3d1c'%20stroke-opacity='.45'/%3e%3cpath%20d='M17%2037L28%2041L24%2033ZM46%2037L35%2041L39%2033ZM18%2046L26%2048L28%2045L34%2049L38%2046L46%2044Q35%2061%2018%2046Z'%20fill='%23ffecaa'%20stroke='%2375351a'%20stroke-width='1.5'%20stroke-linejoin='round'/%3e%3cpath%20d='M17%2024L31%203Q34%2011%2045%209L38%2016L43%2028Z'%20fill='url(%23hat)'%20stroke='%23c1a0bd'%20stroke-width='.7'/%3e%3cpath%20d='M20%2020Q31%2025%2040%2022L42%2028L17%2025Z'%20fill='%23b86331'/%3e%3cpath%20d='M27%2023L33%2024L32%2029L26%2028Z'%20stroke='%23efc876'%20stroke-width='1.5'/%3e%3cpath%20d='M10%2026Q14%2021%2021%2025Q34%2031%2044%2026Q48%2026%2051%2031Q25%2038%2010%2026Z'%20fill='url(%23hat)'%20stroke='%23c1a0bd'%20stroke-width='.7'/%3e%3c/svg%3e", b = /* @__PURE__ */ function(e) {
|
|
9
9
|
return e.Spiders = "spiders", e.Ghost = "ghost", e.Web = "web", e.Bats = "bats", e.Cat = "cat", e.Witches = "witches", e.Train = "train", e.Portal = "portal", e.Ravens = "ravens", e.Candy = "candy", e.Footprints = "footprints", e.Skeletons = "skeletons", e.Cauldron = "cauldron", e.Mimic = "mimic", e.Bowling = "bowling", e.Mummy = "mummy", e;
|
|
10
10
|
}({}), x = /* @__PURE__ */ function(e) {
|
|
@@ -258,7 +258,7 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
258
258
|
y: a - o
|
|
259
259
|
}, b, b + 420, 12), _.push(g);
|
|
260
260
|
}
|
|
261
|
-
let y = h[d - 1] + 18, b = n * .65, x = 10900, S = 12600, C = (e) => P(y, b, F((e - x) /
|
|
261
|
+
let y = h[d - 1] + 18, b = n * .65, x = 10900, S = 12600, C = (e) => P(y, b, F((e - x) / 1700, 0, 1));
|
|
262
262
|
h.forEach((e, t) => {
|
|
263
263
|
if (e < b) return;
|
|
264
264
|
let n = P(x, S, (y - e) / (y - b));
|
|
@@ -1943,14 +1943,10 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
1943
1943
|
], f = () => {
|
|
1944
1944
|
c || (c = !0, clearTimeout(s), m.disconnect(), o?.(), a.forEach((e) => e.cancel()), u.forEach((e) => document.removeEventListener(e, p, !0)), window.removeEventListener("resize", f), i());
|
|
1945
1945
|
}, p = (e) => {
|
|
1946
|
-
e.type === "scroll" && e.target instanceof Node && t.contains(e.target) || e.type
|
|
1946
|
+
e.type === "scroll" && e.target instanceof Node && t.contains(e.target) || (e.type !== "visibilitychange" || document.hidden) && f();
|
|
1947
1947
|
}, m = new MutationObserver((e) => {
|
|
1948
|
-
let n = e.filter((e) => t.contains(e.target) ? !1 : e.type
|
|
1949
|
-
|
|
1950
|
-
f();
|
|
1951
|
-
return;
|
|
1952
|
-
}
|
|
1953
|
-
n.some((e) => e.type === "childList" && e.target instanceof Element && d.some(({ element: t }) => e.target.contains(t))) && d.some(({ element: e, rect: t }) => {
|
|
1948
|
+
let n = e.filter((e) => t.contains(e.target) ? !1 : e.type !== "childList" || ![...e.addedNodes, ...e.removedNodes].every((e) => e === t || t.contains(e)));
|
|
1949
|
+
(d.some(({ element: e }) => !e.isConnected || n.some((t) => e.contains(t.target) || t.type === "attributes" && t.target instanceof Element && t.target.contains(e))) || n.some((e) => e.type === "childList" && e.target instanceof Element && d.some(({ element: t }) => e.target.contains(t))) && d.some(({ element: e, rect: t }) => {
|
|
1954
1950
|
let n = e.getBoundingClientRect();
|
|
1955
1951
|
return [
|
|
1956
1952
|
"left",
|
|
@@ -1958,7 +1954,7 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
1958
1954
|
"width",
|
|
1959
1955
|
"height"
|
|
1960
1956
|
].some((e) => Math.abs(n[e] - t[e]) > .5);
|
|
1961
|
-
}) && f();
|
|
1957
|
+
})) && f();
|
|
1962
1958
|
}), h = (e, t) => {
|
|
1963
1959
|
let n = e.animate(t.map((e) => ({
|
|
1964
1960
|
easing: "ease-in-out",
|
|
@@ -2053,7 +2049,7 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
2053
2049
|
let t = v[e].closest("li");
|
|
2054
2050
|
t && _.push(t);
|
|
2055
2051
|
}
|
|
2056
|
-
let y = new Set([
|
|
2052
|
+
let y = /* @__PURE__ */ new Set([
|
|
2057
2053
|
...m,
|
|
2058
2054
|
...h,
|
|
2059
2055
|
..._,
|
|
@@ -2648,10 +2644,13 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
2648
2644
|
})
|
|
2649
2645
|
]
|
|
2650
2646
|
});
|
|
2651
|
-
}, wt = o(() =>
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2647
|
+
}, wt = o(() => {
|
|
2648
|
+
let e = u(() => St(), []);
|
|
2649
|
+
return /* @__PURE__ */ h(r, {
|
|
2650
|
+
flights: e,
|
|
2651
|
+
Character: Ct
|
|
2652
|
+
});
|
|
2653
|
+
}), Tt = () => {
|
|
2655
2654
|
let { isMobile: e, anchors: n } = t(), r = D(), [i] = f(() => ({
|
|
2656
2655
|
isMobile: e,
|
|
2657
2656
|
reducedMotion: r
|
|
@@ -2801,7 +2800,7 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
2801
2800
|
let a = Math.max(e.top - r, r - e.bottom, 0);
|
|
2802
2801
|
if (a >= i) return null;
|
|
2803
2802
|
let o = Math.sqrt(i ** 2 - a ** 2), s = ((n < t ? e.right + o : e.left - o) - t) / (n - t);
|
|
2804
|
-
return s < 0 || s > 1 ? null : Ot + s *
|
|
2803
|
+
return s < 0 || s > 1 ? null : Ot + s * .44000000000000006;
|
|
2805
2804
|
}, Mt = (e, t, n) => {
|
|
2806
2805
|
if (!e.length) {
|
|
2807
2806
|
if (t < 96 || n < 96) return null;
|
|
@@ -3103,11 +3102,7 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
3103
3102
|
e.type === "visibilitychange" && !document.hidden || e.type === "scroll" && e.target instanceof Node && t.contains(e.target) || c();
|
|
3104
3103
|
}, u = new MutationObserver((e) => {
|
|
3105
3104
|
let n = e.filter((e) => !t.contains(e.target) && !(e.type === "childList" && [...e.addedNodes, ...e.removedNodes].every((e) => e === t || t.contains(e))));
|
|
3106
|
-
|
|
3107
|
-
c();
|
|
3108
|
-
return;
|
|
3109
|
-
}
|
|
3110
|
-
n.some((e) => e.type === "childList" && e.target instanceof Element && o.some(({ element: t }) => e.target.contains(t))) && o.some(({ element: e, rect: t }) => {
|
|
3105
|
+
(o.some(({ element: e }) => !e.isConnected || n.some((t) => e.contains(t.target) || t.type === "attributes" && t.target instanceof Element && t.target.contains(e))) || n.some((e) => e.type === "childList" && e.target instanceof Element && o.some(({ element: t }) => e.target.contains(t))) && o.some(({ element: e, rect: t }) => {
|
|
3111
3106
|
let n = e.getBoundingClientRect();
|
|
3112
3107
|
return [
|
|
3113
3108
|
"left",
|
|
@@ -3115,7 +3110,7 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
3115
3110
|
"width",
|
|
3116
3111
|
"height"
|
|
3117
3112
|
].some((e) => Math.abs(n[e] - t[e]) > .5);
|
|
3118
|
-
}) && c();
|
|
3113
|
+
})) && c();
|
|
3119
3114
|
}), d = /* @__PURE__ */ new WeakSet(), f = new ResizeObserver((e) => {
|
|
3120
3115
|
for (let t of e) {
|
|
3121
3116
|
let e = o.find((e) => e.element === t.target), n = t.borderBoxSize?.[0];
|
|
@@ -3573,7 +3568,7 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
3573
3568
|
}, [a, b]), c(() => {
|
|
3574
3569
|
if (x || p || a || v.current) return;
|
|
3575
3570
|
let t = !1, r = (e) => {
|
|
3576
|
-
e.type
|
|
3571
|
+
(e.type !== "visibilitychange" || document.hidden) && (t = !0, b());
|
|
3577
3572
|
}, i = [
|
|
3578
3573
|
"pointerdown",
|
|
3579
3574
|
"keydown",
|
|
@@ -3779,7 +3774,7 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
3779
3774
|
end: u.landing + f * 2
|
|
3780
3775
|
};
|
|
3781
3776
|
let p = _n(u.landing) + 80, m = Math.max(p + 800, _n(u.rebound.end)), h = [[m + 300, Math.min(m + 1900, rn)]];
|
|
3782
|
-
rn - h[0][1] > 4e3 && h.push([
|
|
3777
|
+
rn - h[0][1] > 4e3 && h.push([21100, rn]);
|
|
3783
3778
|
let g = u.side, _ = Cn(u, 1), v = {
|
|
3784
3779
|
x: _.x - u.side * a * .14,
|
|
3785
3780
|
y: _.y
|
|
@@ -3828,14 +3823,14 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
3828
3823
|
};
|
|
3829
3824
|
} else if (e < Kt) t = s, r = 1 - dn(2750, 3e3, 3e3, Kt, e) * .16;
|
|
3830
3825
|
else if (e < qt) {
|
|
3831
|
-
let n = cn((e - Kt) /
|
|
3826
|
+
let n = cn((e - Kt) / 600, 0, 1);
|
|
3832
3827
|
t = {
|
|
3833
3828
|
x: ln(s.x, o.x, n),
|
|
3834
3829
|
y: ln(s.y, o.y, n) - Math.sin(n * Math.PI) * a * .6
|
|
3835
3830
|
};
|
|
3836
3831
|
} else if (e < Jt) t = o, r = 1 - dn(qt, 3760, 3800, 3960, e) * .16;
|
|
3837
3832
|
else if (e < Yt) {
|
|
3838
|
-
let n = cn((e - Jt) /
|
|
3833
|
+
let n = cn((e - Jt) / 700, 0, 1);
|
|
3839
3834
|
t = {
|
|
3840
3835
|
x: l.foot.x,
|
|
3841
3836
|
y: ln(o.y, l.foot.y, n) - Math.sin(n * Math.PI) * a * .27
|
|
@@ -3934,7 +3929,7 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
3934
3929
|
let t = _n(e), n = N(t);
|
|
3935
3930
|
return {
|
|
3936
3931
|
offset: e,
|
|
3937
|
-
opacity: t < 450 ? un(0, 450, t) : 1 - un(
|
|
3932
|
+
opacity: t < 450 ? un(0, 450, t) : 1 - un(24350, 24950, t),
|
|
3938
3933
|
transform: `translate(${n.x}px, ${n.y}px) scale(${2 - n.squash}, ${n.squash})`,
|
|
3939
3934
|
easing: "linear"
|
|
3940
3935
|
};
|
|
@@ -4058,7 +4053,7 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
4058
4053
|
rebound: e.rebound
|
|
4059
4054
|
});
|
|
4060
4055
|
}
|
|
4061
|
-
s.anchors = [
|
|
4056
|
+
s.anchors = [.../* @__PURE__ */ new Set([
|
|
4062
4057
|
i,
|
|
4063
4058
|
...c.map(({ target: e }) => e),
|
|
4064
4059
|
...c.flatMap(({ support: e }) => e ? [e] : [])
|
|
@@ -4087,14 +4082,10 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
4087
4082
|
], f = () => {
|
|
4088
4083
|
l || (l = !0, clearTimeout(c), m.disconnect(), s?.(), o.forEach((e) => e.cancel()), d.forEach((e) => document.removeEventListener(e, p, !0)), window.removeEventListener("resize", f), a());
|
|
4089
4084
|
}, p = (e) => {
|
|
4090
|
-
e.type === "scroll" && e.target instanceof Node && t.contains(e.target) || e.type
|
|
4085
|
+
e.type === "scroll" && e.target instanceof Node && t.contains(e.target) || (e.type !== "visibilitychange" || document.hidden) && f();
|
|
4091
4086
|
}, m = new MutationObserver((n) => {
|
|
4092
|
-
let r = n.filter((e) => t.contains(e.target) ? !1 : e.type
|
|
4093
|
-
|
|
4094
|
-
f();
|
|
4095
|
-
return;
|
|
4096
|
-
}
|
|
4097
|
-
r.some((t) => t.type === "childList" && t.target instanceof Element && e.anchors.some(({ element: e }) => t.target.contains(e))) && e.anchors.some(({ element: e, rect: t }) => {
|
|
4087
|
+
let r = n.filter((e) => t.contains(e.target) ? !1 : e.type !== "childList" || ![...e.addedNodes, ...e.removedNodes].every((e) => e === t || t.contains(e)));
|
|
4088
|
+
(e.anchors.some(({ element: e }) => !e.isConnected || r.some((t) => e.contains(t.target) || t.type === "attributes" && t.target instanceof Element && t.target.contains(e))) || r.some((t) => t.type === "childList" && t.target instanceof Element && e.anchors.some(({ element: e }) => t.target.contains(e))) && e.anchors.some(({ element: e, rect: t }) => {
|
|
4098
4089
|
let n = e.getBoundingClientRect();
|
|
4099
4090
|
return [
|
|
4100
4091
|
"left",
|
|
@@ -4102,7 +4093,7 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
4102
4093
|
"width",
|
|
4103
4094
|
"height"
|
|
4104
4095
|
].some((e) => Math.abs(n[e] - t[e]) > .5);
|
|
4105
|
-
}) && f();
|
|
4096
|
+
})) && f();
|
|
4106
4097
|
}), h = (e, t) => {
|
|
4107
4098
|
let n = e.animate(t.map((e) => ({
|
|
4108
4099
|
easing: "ease-in-out",
|
|
@@ -4196,7 +4187,7 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
4196
4187
|
t && f(t).forEach((e) => m.add(e));
|
|
4197
4188
|
}
|
|
4198
4189
|
let _ = u.rect.left + u.rect.width / 2, v = ({ rect: e }) => Math.hypot(e.left + e.width / 2 - _, e.top + e.height / 2 - u.rect.bottom), y = [], b = [];
|
|
4199
|
-
for (let e of new Set([...p, ...m])) {
|
|
4190
|
+
for (let e of /* @__PURE__ */ new Set([...p, ...m])) {
|
|
4200
4191
|
if (e.contains(document.activeElement) || e.closest(`${On}, ${kn}`) || e.querySelector(`${On}, ${kn}`)) continue;
|
|
4201
4192
|
let t = l(e);
|
|
4202
4193
|
if (!t) continue;
|
|
@@ -4827,7 +4818,7 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
4827
4818
|
opacity: r,
|
|
4828
4819
|
easing: i
|
|
4829
4820
|
});
|
|
4830
|
-
C(0, 0, 0, 0, "steps(1, end)"), C(
|
|
4821
|
+
C(0, 0, 0, 0, "steps(1, end)"), C(.22999999999999998 * Ln, 0, 0);
|
|
4831
4822
|
for (let e = 0; e < o; e++) {
|
|
4832
4823
|
let t = e / (o - 1), n = 3200 + t * 2e3, r = {
|
|
4833
4824
|
x: Wn(m, h, t),
|
|
@@ -4958,14 +4949,10 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
4958
4949
|
], p = () => {
|
|
4959
4950
|
u || (u = !0, clearTimeout(l), h.disconnect(), _.disconnect(), c?.(), s.forEach((e) => e.cancel()), f.forEach((e) => document.removeEventListener(e, m, !0)), window.removeEventListener("resize", p), o());
|
|
4960
4951
|
}, m = (e) => {
|
|
4961
|
-
e.type === "scroll" && e.target instanceof Node && t.contains(e.target) || e.type
|
|
4952
|
+
e.type === "scroll" && e.target instanceof Node && t.contains(e.target) || (e.type !== "visibilitychange" || document.hidden) && p();
|
|
4962
4953
|
}, h = new MutationObserver((n) => {
|
|
4963
|
-
let r = n.filter((e) => t.contains(e.target) ? !1 : e.type
|
|
4964
|
-
|
|
4965
|
-
p();
|
|
4966
|
-
return;
|
|
4967
|
-
}
|
|
4968
|
-
r.some((t) => t.type === "childList" && t.target instanceof Element && e.anchors.some(({ element: e }) => t.target.contains(e))) && e.anchors.some(({ element: e, rect: t }) => {
|
|
4954
|
+
let r = n.filter((e) => t.contains(e.target) ? !1 : e.type !== "childList" || ![...e.addedNodes, ...e.removedNodes].every((e) => e === t || t.contains(e)));
|
|
4955
|
+
(e.anchors.some(({ element: e }) => !e.isConnected || r.some((t) => e.contains(t.target) || t.type === "attributes" && t.target instanceof Element && t.target.contains(e))) || r.some((t) => t.type === "childList" && t.target instanceof Element && e.anchors.some(({ element: e }) => t.target.contains(e))) && e.anchors.some(({ element: e, rect: t }) => {
|
|
4969
4956
|
let n = e.getBoundingClientRect();
|
|
4970
4957
|
return [
|
|
4971
4958
|
"left",
|
|
@@ -4973,7 +4960,7 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
4973
4960
|
"width",
|
|
4974
4961
|
"height"
|
|
4975
4962
|
].some((e) => Math.abs(n[e] - t[e]) > .5);
|
|
4976
|
-
}) && p();
|
|
4963
|
+
})) && p();
|
|
4977
4964
|
}), g = /* @__PURE__ */ new WeakSet(), _ = new ResizeObserver((t) => {
|
|
4978
4965
|
for (let n of t) {
|
|
4979
4966
|
let t = e.anchors.find(({ element: e }) => e === n.target), r = n.borderBoxSize?.[0];
|
|
@@ -5109,7 +5096,7 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
5109
5096
|
let t = !1, i = () => {
|
|
5110
5097
|
t = !0, E();
|
|
5111
5098
|
}, a = (e) => {
|
|
5112
|
-
e.type === "scroll" && e.target instanceof Node && x.current?.contains(e.target) || e.type
|
|
5099
|
+
e.type === "scroll" && e.target instanceof Node && x.current?.contains(e.target) || (e.type !== "visibilitychange" || document.hidden) && i();
|
|
5113
5100
|
}, s = [
|
|
5114
5101
|
"pointerdown",
|
|
5115
5102
|
"keydown",
|
|
@@ -5651,7 +5638,7 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
5651
5638
|
], p = [...e.homes.map(({ target: e }) => e.element), ...e.pumpkin ? [e.pumpkin.element] : []], m = () => {
|
|
5652
5639
|
u || (u = !0, clearTimeout(l), g.disconnect(), c?.(), s.forEach((e) => e.cancel()), f.forEach((e) => document.removeEventListener(e, h, !0)), window.removeEventListener("resize", m), o());
|
|
5653
5640
|
}, h = (e) => {
|
|
5654
|
-
e.type === "scroll" && e.target instanceof Node && t.contains(e.target) || e.type
|
|
5641
|
+
e.type === "scroll" && e.target instanceof Node && t.contains(e.target) || (e.type !== "visibilitychange" || document.hidden) && m();
|
|
5655
5642
|
}, g = new MutationObserver((e) => {
|
|
5656
5643
|
p.some((t) => !t.isConnected || e.some((e) => t.contains(e.target) || e.type === "attributes" && e.target instanceof Element && e.target.contains(t))) && m();
|
|
5657
5644
|
}), _ = (e, t) => {
|
|
@@ -6433,11 +6420,7 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
6433
6420
|
}, l = (t) => r.some((e) => e === t || e.contains(t)) || t instanceof Element && !!t.closest(`.${e.sceneLayer}`), u = new MutationObserver((e) => {
|
|
6434
6421
|
if (a) return;
|
|
6435
6422
|
let t = e.filter((e) => !l(e.target) && (e.type !== "childList" || ![...e.addedNodes, ...e.removedNodes].every(l)));
|
|
6436
|
-
|
|
6437
|
-
s();
|
|
6438
|
-
return;
|
|
6439
|
-
}
|
|
6440
|
-
t.some((e) => e.type === "childList" && i.some(({ element: t }) => e.target.contains(t))) && c();
|
|
6423
|
+
i.some(({ element: e }) => !e.isConnected || t.some((t) => e.contains(t.target) || t.type === "attributes" && t.target.contains(e))) ? s() : t.some((e) => e.type === "childList" && i.some(({ element: t }) => e.target.contains(t))) && c();
|
|
6441
6424
|
}), d = typeof ResizeObserver == "function" ? new ResizeObserver(c) : void 0;
|
|
6442
6425
|
return u.observe(document.documentElement, {
|
|
6443
6426
|
subtree: !0,
|
|
@@ -6671,7 +6654,7 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
6671
6654
|
c(() => {
|
|
6672
6655
|
m(n || !i.current ? null : Tr(Nr(r), i.current.getBoundingClientRect()));
|
|
6673
6656
|
}, [r, n]), c(() => {
|
|
6674
|
-
if (v(!1), !
|
|
6657
|
+
if (v(!1), !n && p && a.current && o.current && s.current && u.current) return Dr(p, a.current, o.current, s.current, () => v(!0), u.current);
|
|
6675
6658
|
}, [p, n]);
|
|
6676
6659
|
let x = p ? p.grab.height / 2 + 4 : 0, S = p ? Math.min(38, p.grab.width * .14) : 0, C = `M0 0 C${-S * 1.6} ${x * .3} ${-S * 1.8} ${-x * .6} ${-S * .8} ${-x} C${S * .1} ${-x - 7} ${S * .7} ${-x - 4} ${S * .9} ${-x + 3}`, w = `M${S * .9} ${-x + 3} C${S * 1.5} ${-x * .72} ${-S * .85} ${x * .28} ${-S * .7} ${x - 4} C${-S * .55} ${x + 8} ${S * .65} ${x + 8} ${S * .9} ${x - 3}`, T = `M${S * .9} ${x - 3} C${S * 1.2} ${x * .45} ${S * 1.1} ${x * .18} ${S * .65} ${x * .24} C${S * .3} ${x * .3} ${S * .6} ${x * .65} ${S * .82} ${x * .54}`;
|
|
6677
6660
|
return /* @__PURE__ */ g("div", {
|
|
@@ -7652,7 +7635,7 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
7652
7635
|
g,
|
|
7653
7636
|
{
|
|
7654
7637
|
...g,
|
|
7655
|
-
offset:
|
|
7638
|
+
offset: .249
|
|
7656
7639
|
},
|
|
7657
7640
|
{
|
|
7658
7641
|
...g,
|
|
@@ -8088,7 +8071,7 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
8088
8071
|
], p = () => {
|
|
8089
8072
|
l || (l = !0, clearTimeout(d), g.disconnect(), f.forEach((e) => document.removeEventListener(e, m, !0)), window.removeEventListener("resize", p), u.forEach((e) => e()), a?.replaceChildren(), s.forEach((e) => e.cancel()), o());
|
|
8090
8073
|
}, m = (e) => {
|
|
8091
|
-
e.type === "scroll" && e.target instanceof Node && t.contains(e.target) || e.type
|
|
8074
|
+
e.type === "scroll" && e.target instanceof Node && t.contains(e.target) || (e.type !== "visibilitychange" || document.hidden) && p();
|
|
8092
8075
|
}, h = e.anchors, g = new MutationObserver((e) => {
|
|
8093
8076
|
h.some((t) => !t.isConnected || e.some((e) => t.contains(e.target) || e.type === "attributes" && e.target instanceof Element && e.target.contains(t))) && p();
|
|
8094
8077
|
}), _ = (e, t) => {
|
|
@@ -9069,11 +9052,7 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
9069
9052
|
e.type === "visibilitychange" && !document.hidden || e.type === "scroll" && e.target instanceof Node && t.contains(e.target) || f();
|
|
9070
9053
|
}, m = new MutationObserver((e) => {
|
|
9071
9054
|
let n = e.filter((e) => !t.contains(e.target) && !(e.type === "childList" && [...e.addedNodes, ...e.removedNodes].every((e) => e === t || t.contains(e))));
|
|
9072
|
-
|
|
9073
|
-
f();
|
|
9074
|
-
return;
|
|
9075
|
-
}
|
|
9076
|
-
n.some((e) => e.type === "childList" && e.target instanceof Element && c.some(({ element: t }) => e.target.contains(t))) && c.some(({ element: e, rect: t }) => {
|
|
9055
|
+
(c.some(({ element: e }) => !e.isConnected || n.some((t) => e.contains(t.target) || t.type === "attributes" && t.target instanceof Element && t.target.contains(e))) || n.some((e) => e.type === "childList" && e.target instanceof Element && c.some(({ element: t }) => e.target.contains(t))) && c.some(({ element: e, rect: t }) => {
|
|
9077
9056
|
let n = e.getBoundingClientRect();
|
|
9078
9057
|
return [
|
|
9079
9058
|
"left",
|
|
@@ -9081,7 +9060,7 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
9081
9060
|
"width",
|
|
9082
9061
|
"height"
|
|
9083
9062
|
].some((e) => Math.abs(n[e] - t[e]) > .5);
|
|
9084
|
-
}) && f();
|
|
9063
|
+
})) && f();
|
|
9085
9064
|
}), h = /* @__PURE__ */ new WeakSet(), g = new ResizeObserver((e) => {
|
|
9086
9065
|
for (let t of e) {
|
|
9087
9066
|
let e = c.find(({ element: e }) => e === t.target), n = t.borderBoxSize?.[0];
|
|
@@ -9310,7 +9289,7 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
9310
9289
|
}, [o, S]), c(() => {
|
|
9311
9290
|
if (C || _ || o || y.current) return;
|
|
9312
9291
|
let t = !1, r = (e) => {
|
|
9313
|
-
e.type
|
|
9292
|
+
(e.type !== "visibilitychange" || document.hidden) && (t = !0, S());
|
|
9314
9293
|
}, i = [
|
|
9315
9294
|
"pointerdown",
|
|
9316
9295
|
"keydown",
|
|
@@ -10802,9 +10781,9 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
10802
10781
|
}, $i = ({ soundtrackUrl: e }) => {
|
|
10803
10782
|
let t = D(), n = d(null), r = d(null), i = d(null), [a, o] = f(null), [s, l] = f(!1), [u, p] = f(!1);
|
|
10804
10783
|
c(() => {
|
|
10805
|
-
o(null), p(!0), !
|
|
10784
|
+
o(null), p(!0), !t && n.current && typeof n.current.animate == "function" && (i.current = Ui(), o(Wi(n.current.getBoundingClientRect(), document.documentElement.clientWidth, i.current?.getBoundingClientRect())));
|
|
10806
10785
|
}, [t]), c(() => {
|
|
10807
|
-
if (l(!1), !
|
|
10786
|
+
if (l(!1), !t && a && n.current && r.current) return Gi(a, {
|
|
10808
10787
|
carrier: n.current,
|
|
10809
10788
|
passenger: r.current,
|
|
10810
10789
|
source: i.current
|
|
@@ -10919,7 +10898,7 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
10919
10898
|
}
|
|
10920
10899
|
}
|
|
10921
10900
|
r && c.stroke(), o.clearRect(0, 0, t.width, t.height);
|
|
10922
|
-
let i = n ? 1 : 1 - ia(e, ta,
|
|
10901
|
+
let i = n ? 1 : 1 - ia(e, ta, 2500);
|
|
10923
10902
|
o.globalAlpha = i, o.drawImage(s, 0, 0, t.width, t.height), o.globalAlpha = i * .28, o.stroke();
|
|
10924
10903
|
for (let [r, i] of t.webs.entries()) {
|
|
10925
10904
|
if (!n && e < i.delayMs) continue;
|
|
@@ -11031,7 +11010,7 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
11031
11010
|
});
|
|
11032
11011
|
}
|
|
11033
11012
|
}, ma = (e, t) => {
|
|
11034
|
-
let n = Math.random() < .5 ? 5 : 6, r = Q(0, Math.PI * 2), i = Q(.08, .16), a = Q(0, Math.PI * 2), o = e.fan, s = o ? Math.PI /
|
|
11013
|
+
let n = Math.random() < .5 ? 5 : 6, r = Q(0, Math.PI * 2), i = Q(.08, .16), a = Q(0, Math.PI * 2), o = e.fan, s = o ? Math.PI / 22 : Math.PI * 2 / la, c = (e) => t * (.91 + .05 * Math.sin(e * 3 + a) + .035 * Math.cos(e * 5 + a)), l = (t, n) => ({
|
|
11035
11014
|
x: e.x + Math.cos(t) * n * (o?.directionX ?? 1),
|
|
11036
11015
|
y: e.y + Math.sin(t) * n * (o?.directionY ?? 1)
|
|
11037
11016
|
}), u = Array.from({ length: la }, (t, n) => {
|
|
@@ -11040,7 +11019,7 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
11040
11019
|
x: e.x,
|
|
11041
11020
|
y: e.y
|
|
11042
11021
|
}, l(i, c(i))];
|
|
11043
|
-
}), d = n * (o ?
|
|
11022
|
+
}), d = n * (o ? 11 : la) * ua;
|
|
11044
11023
|
return {
|
|
11045
11024
|
spokes: u,
|
|
11046
11025
|
silk: Array.from({ length: d + 1 }, (e, t) => {
|
|
@@ -11191,7 +11170,7 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
11191
11170
|
let s = [], c = Ta(n, (e) => s.push(e)), l = i.current;
|
|
11192
11171
|
if (!l) return;
|
|
11193
11172
|
let { clientWidth: u, clientHeight: d } = document.documentElement, f = JSON.stringify(c);
|
|
11194
|
-
|
|
11173
|
+
a.current && a.current.isMobile === e && a.current.targetsKey === f && a.current.plan.width === u && a.current.plan.height === d || (a.current = {
|
|
11195
11174
|
isMobile: e,
|
|
11196
11175
|
targetsKey: f,
|
|
11197
11176
|
plan: _a({
|
|
@@ -11725,169 +11704,169 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
11725
11704
|
][t]}px)`,
|
|
11726
11705
|
easing: "ease-in-out"
|
|
11727
11706
|
}))
|
|
11728
|
-
}
|
|
11707
|
+
}, o = e ? [
|
|
11708
|
+
{
|
|
11709
|
+
time: 0,
|
|
11710
|
+
x: n + a,
|
|
11711
|
+
y: t.y - 50,
|
|
11712
|
+
opacity: 0
|
|
11713
|
+
},
|
|
11714
|
+
...Ba({
|
|
11715
|
+
time: 500,
|
|
11716
|
+
x: n + a,
|
|
11717
|
+
y: t.y - 50,
|
|
11718
|
+
angle: -5
|
|
11719
|
+
}, {
|
|
11720
|
+
time: 2800,
|
|
11721
|
+
...t
|
|
11722
|
+
}, a * .2, !0),
|
|
11723
|
+
...Ba({
|
|
11724
|
+
time: 17600,
|
|
11725
|
+
...t
|
|
11726
|
+
}, {
|
|
11727
|
+
time: 19900,
|
|
11728
|
+
x: -a,
|
|
11729
|
+
y: t.y - 90,
|
|
11730
|
+
angle: -8,
|
|
11731
|
+
opacity: 0
|
|
11732
|
+
}, a * .35, !1),
|
|
11733
|
+
{
|
|
11734
|
+
time: 2e4,
|
|
11735
|
+
x: -a,
|
|
11736
|
+
y: t.y - 90,
|
|
11737
|
+
opacity: 0
|
|
11738
|
+
}
|
|
11739
|
+
] : [
|
|
11740
|
+
{
|
|
11741
|
+
time: 0,
|
|
11742
|
+
x: -a,
|
|
11743
|
+
y: t.y - 40,
|
|
11744
|
+
opacity: 0
|
|
11745
|
+
},
|
|
11746
|
+
...Ba({
|
|
11747
|
+
time: 300,
|
|
11748
|
+
x: -a,
|
|
11749
|
+
y: t.y - 40,
|
|
11750
|
+
angle: -8
|
|
11751
|
+
}, {
|
|
11752
|
+
time: 2100,
|
|
11753
|
+
x: t.x + 42,
|
|
11754
|
+
y: t.y - 10,
|
|
11755
|
+
angle: 12
|
|
11756
|
+
}, a * .48, !0),
|
|
11757
|
+
{
|
|
11758
|
+
time: 2490,
|
|
11759
|
+
x: t.x - 5,
|
|
11760
|
+
y: t.y + 3,
|
|
11761
|
+
angle: -4,
|
|
11762
|
+
easing: "cubic-bezier(0.22, 1, 0.36, 1)"
|
|
11763
|
+
},
|
|
11764
|
+
{
|
|
11765
|
+
time: 2950,
|
|
11766
|
+
...t
|
|
11767
|
+
},
|
|
11768
|
+
{
|
|
11769
|
+
time: 9200,
|
|
11770
|
+
...t
|
|
11771
|
+
},
|
|
11772
|
+
{
|
|
11773
|
+
time: 9660,
|
|
11774
|
+
x: t.x - 10,
|
|
11775
|
+
y: t.y - 6,
|
|
11776
|
+
angle: -6,
|
|
11777
|
+
easing: "cubic-bezier(0.55, 0, 1, 0.45)"
|
|
11778
|
+
},
|
|
11779
|
+
{
|
|
11780
|
+
time: 10300,
|
|
11781
|
+
...f
|
|
11782
|
+
},
|
|
11783
|
+
{
|
|
11784
|
+
time: 10500,
|
|
11785
|
+
...f,
|
|
11786
|
+
easing: "cubic-bezier(0.22, 1, 0.36, 1)"
|
|
11787
|
+
},
|
|
11788
|
+
{
|
|
11789
|
+
time: 11400,
|
|
11790
|
+
...f,
|
|
11791
|
+
angle: -8
|
|
11792
|
+
},
|
|
11793
|
+
{
|
|
11794
|
+
time: 11900,
|
|
11795
|
+
...f
|
|
11796
|
+
},
|
|
11797
|
+
{
|
|
11798
|
+
time: 12780,
|
|
11799
|
+
...f,
|
|
11800
|
+
easing: "cubic-bezier(0.55, 0, 1, 0.45)"
|
|
11801
|
+
},
|
|
11802
|
+
{
|
|
11803
|
+
time: 13e3,
|
|
11804
|
+
x: f.x,
|
|
11805
|
+
y: f.y - 28,
|
|
11806
|
+
angle: -12,
|
|
11807
|
+
easing: "cubic-bezier(0.22, 1, 0.36, 1)"
|
|
11808
|
+
},
|
|
11809
|
+
{
|
|
11810
|
+
time: 13420,
|
|
11811
|
+
x: f.x + 8,
|
|
11812
|
+
y: f.y + 4,
|
|
11813
|
+
angle: 7,
|
|
11814
|
+
easing: "cubic-bezier(0.22, 1, 0.36, 1)"
|
|
11815
|
+
},
|
|
11816
|
+
{
|
|
11817
|
+
time: 13900,
|
|
11818
|
+
x: f.x + 6,
|
|
11819
|
+
y: f.y - 9,
|
|
11820
|
+
angle: -3
|
|
11821
|
+
},
|
|
11822
|
+
{
|
|
11823
|
+
time: 15100,
|
|
11824
|
+
...t
|
|
11825
|
+
},
|
|
11826
|
+
{
|
|
11827
|
+
time: 17800,
|
|
11828
|
+
...t,
|
|
11829
|
+
easing: "cubic-bezier(0.55, 0, 1, 0.45)"
|
|
11830
|
+
},
|
|
11831
|
+
{
|
|
11832
|
+
time: 18050,
|
|
11833
|
+
x: t.x + 14,
|
|
11834
|
+
y: t.y - 24,
|
|
11835
|
+
angle: -10,
|
|
11836
|
+
easing: "cubic-bezier(0.22, 1, 0.36, 1)"
|
|
11837
|
+
},
|
|
11838
|
+
{
|
|
11839
|
+
time: 18450,
|
|
11840
|
+
x: t.x + 28,
|
|
11841
|
+
y: t.y + 3,
|
|
11842
|
+
angle: 6,
|
|
11843
|
+
easing: "cubic-bezier(0.22, 1, 0.36, 1)"
|
|
11844
|
+
},
|
|
11845
|
+
...Ba({
|
|
11846
|
+
time: 18800,
|
|
11847
|
+
x: t.x + 32,
|
|
11848
|
+
y: t.y,
|
|
11849
|
+
angle: 0
|
|
11850
|
+
}, {
|
|
11851
|
+
time: 19900,
|
|
11852
|
+
x: n + a,
|
|
11853
|
+
y: t.y - 85,
|
|
11854
|
+
angle: -5,
|
|
11855
|
+
opacity: 0
|
|
11856
|
+
}, a * .42, !1),
|
|
11857
|
+
{
|
|
11858
|
+
time: 2e4,
|
|
11859
|
+
x: n + a,
|
|
11860
|
+
y: t.y - 85,
|
|
11861
|
+
opacity: 0
|
|
11862
|
+
}
|
|
11863
|
+
];
|
|
11729
11864
|
return {
|
|
11730
11865
|
mentor: e,
|
|
11731
11866
|
size: a,
|
|
11732
11867
|
facing: r,
|
|
11733
11868
|
rest: t,
|
|
11734
|
-
frames: za(
|
|
11735
|
-
{
|
|
11736
|
-
time: 0,
|
|
11737
|
-
x: n + a,
|
|
11738
|
-
y: t.y - 50,
|
|
11739
|
-
opacity: 0
|
|
11740
|
-
},
|
|
11741
|
-
...Ba({
|
|
11742
|
-
time: 500,
|
|
11743
|
-
x: n + a,
|
|
11744
|
-
y: t.y - 50,
|
|
11745
|
-
angle: -5
|
|
11746
|
-
}, {
|
|
11747
|
-
time: 2800,
|
|
11748
|
-
...t
|
|
11749
|
-
}, a * .2, !0),
|
|
11750
|
-
...Ba({
|
|
11751
|
-
time: 17600,
|
|
11752
|
-
...t
|
|
11753
|
-
}, {
|
|
11754
|
-
time: 19900,
|
|
11755
|
-
x: -a,
|
|
11756
|
-
y: t.y - 90,
|
|
11757
|
-
angle: -8,
|
|
11758
|
-
opacity: 0
|
|
11759
|
-
}, a * .35, !1),
|
|
11760
|
-
{
|
|
11761
|
-
time: 2e4,
|
|
11762
|
-
x: -a,
|
|
11763
|
-
y: t.y - 90,
|
|
11764
|
-
opacity: 0
|
|
11765
|
-
}
|
|
11766
|
-
] : [
|
|
11767
|
-
{
|
|
11768
|
-
time: 0,
|
|
11769
|
-
x: -a,
|
|
11770
|
-
y: t.y - 40,
|
|
11771
|
-
opacity: 0
|
|
11772
|
-
},
|
|
11773
|
-
...Ba({
|
|
11774
|
-
time: 300,
|
|
11775
|
-
x: -a,
|
|
11776
|
-
y: t.y - 40,
|
|
11777
|
-
angle: -8
|
|
11778
|
-
}, {
|
|
11779
|
-
time: 2100,
|
|
11780
|
-
x: t.x + 42,
|
|
11781
|
-
y: t.y - 10,
|
|
11782
|
-
angle: 12
|
|
11783
|
-
}, a * .48, !0),
|
|
11784
|
-
{
|
|
11785
|
-
time: 2490,
|
|
11786
|
-
x: t.x - 5,
|
|
11787
|
-
y: t.y + 3,
|
|
11788
|
-
angle: -4,
|
|
11789
|
-
easing: "cubic-bezier(0.22, 1, 0.36, 1)"
|
|
11790
|
-
},
|
|
11791
|
-
{
|
|
11792
|
-
time: 2950,
|
|
11793
|
-
...t
|
|
11794
|
-
},
|
|
11795
|
-
{
|
|
11796
|
-
time: 9200,
|
|
11797
|
-
...t
|
|
11798
|
-
},
|
|
11799
|
-
{
|
|
11800
|
-
time: 9660,
|
|
11801
|
-
x: t.x - 10,
|
|
11802
|
-
y: t.y - 6,
|
|
11803
|
-
angle: -6,
|
|
11804
|
-
easing: "cubic-bezier(0.55, 0, 1, 0.45)"
|
|
11805
|
-
},
|
|
11806
|
-
{
|
|
11807
|
-
time: 10300,
|
|
11808
|
-
...f
|
|
11809
|
-
},
|
|
11810
|
-
{
|
|
11811
|
-
time: 10500,
|
|
11812
|
-
...f,
|
|
11813
|
-
easing: "cubic-bezier(0.22, 1, 0.36, 1)"
|
|
11814
|
-
},
|
|
11815
|
-
{
|
|
11816
|
-
time: 11400,
|
|
11817
|
-
...f,
|
|
11818
|
-
angle: -8
|
|
11819
|
-
},
|
|
11820
|
-
{
|
|
11821
|
-
time: 11900,
|
|
11822
|
-
...f
|
|
11823
|
-
},
|
|
11824
|
-
{
|
|
11825
|
-
time: 12780,
|
|
11826
|
-
...f,
|
|
11827
|
-
easing: "cubic-bezier(0.55, 0, 1, 0.45)"
|
|
11828
|
-
},
|
|
11829
|
-
{
|
|
11830
|
-
time: 13e3,
|
|
11831
|
-
x: f.x,
|
|
11832
|
-
y: f.y - 28,
|
|
11833
|
-
angle: -12,
|
|
11834
|
-
easing: "cubic-bezier(0.22, 1, 0.36, 1)"
|
|
11835
|
-
},
|
|
11836
|
-
{
|
|
11837
|
-
time: 13420,
|
|
11838
|
-
x: f.x + 8,
|
|
11839
|
-
y: f.y + 4,
|
|
11840
|
-
angle: 7,
|
|
11841
|
-
easing: "cubic-bezier(0.22, 1, 0.36, 1)"
|
|
11842
|
-
},
|
|
11843
|
-
{
|
|
11844
|
-
time: 13900,
|
|
11845
|
-
x: f.x + 6,
|
|
11846
|
-
y: f.y - 9,
|
|
11847
|
-
angle: -3
|
|
11848
|
-
},
|
|
11849
|
-
{
|
|
11850
|
-
time: 15100,
|
|
11851
|
-
...t
|
|
11852
|
-
},
|
|
11853
|
-
{
|
|
11854
|
-
time: 17800,
|
|
11855
|
-
...t,
|
|
11856
|
-
easing: "cubic-bezier(0.55, 0, 1, 0.45)"
|
|
11857
|
-
},
|
|
11858
|
-
{
|
|
11859
|
-
time: 18050,
|
|
11860
|
-
x: t.x + 14,
|
|
11861
|
-
y: t.y - 24,
|
|
11862
|
-
angle: -10,
|
|
11863
|
-
easing: "cubic-bezier(0.22, 1, 0.36, 1)"
|
|
11864
|
-
},
|
|
11865
|
-
{
|
|
11866
|
-
time: 18450,
|
|
11867
|
-
x: t.x + 28,
|
|
11868
|
-
y: t.y + 3,
|
|
11869
|
-
angle: 6,
|
|
11870
|
-
easing: "cubic-bezier(0.22, 1, 0.36, 1)"
|
|
11871
|
-
},
|
|
11872
|
-
...Ba({
|
|
11873
|
-
time: 18800,
|
|
11874
|
-
x: t.x + 32,
|
|
11875
|
-
y: t.y,
|
|
11876
|
-
angle: 0
|
|
11877
|
-
}, {
|
|
11878
|
-
time: 19900,
|
|
11879
|
-
x: n + a,
|
|
11880
|
-
y: t.y - 85,
|
|
11881
|
-
angle: -5,
|
|
11882
|
-
opacity: 0
|
|
11883
|
-
}, a * .42, !1),
|
|
11884
|
-
{
|
|
11885
|
-
time: 2e4,
|
|
11886
|
-
x: n + a,
|
|
11887
|
-
y: t.y - 85,
|
|
11888
|
-
opacity: 0
|
|
11889
|
-
}
|
|
11890
|
-
]),
|
|
11869
|
+
frames: za(o),
|
|
11891
11870
|
parts: i
|
|
11892
11871
|
};
|
|
11893
11872
|
}), m = (e, t, n, r) => ({
|
|
@@ -11943,14 +11922,10 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
11943
11922
|
], p = () => {
|
|
11944
11923
|
u || (u = !0, clearTimeout(l), h.disconnect(), _.disconnect(), c?.(), s.forEach((e) => e.cancel()), f.forEach((e) => document.removeEventListener(e, m, !0)), window.removeEventListener("resize", p), o());
|
|
11945
11924
|
}, m = (e) => {
|
|
11946
|
-
e.type === "scroll" && e.target instanceof Node && t.contains(e.target) || e.type
|
|
11925
|
+
e.type === "scroll" && e.target instanceof Node && t.contains(e.target) || (e.type !== "visibilitychange" || document.hidden) && p();
|
|
11947
11926
|
}, h = new MutationObserver((n) => {
|
|
11948
|
-
let r = n.filter((e) => t.contains(e.target) ? !1 : e.type
|
|
11949
|
-
|
|
11950
|
-
p();
|
|
11951
|
-
return;
|
|
11952
|
-
}
|
|
11953
|
-
r.some((t) => t.type === "childList" && t.target instanceof Element && e.anchors.some(({ element: e }) => t.target.contains(e))) && e.anchors.some(({ element: e, rect: t }) => {
|
|
11927
|
+
let r = n.filter((e) => t.contains(e.target) ? !1 : e.type !== "childList" || ![...e.addedNodes, ...e.removedNodes].every((e) => e === t || t.contains(e)));
|
|
11928
|
+
(e.anchors.some(({ element: e }) => !e.isConnected || r.some((t) => e.contains(t.target) || t.type === "attributes" && t.target instanceof Element && t.target.contains(e))) || r.some((t) => t.type === "childList" && t.target instanceof Element && e.anchors.some(({ element: e }) => t.target.contains(e))) && e.anchors.some(({ element: e, rect: t }) => {
|
|
11954
11929
|
let n = e.getBoundingClientRect();
|
|
11955
11930
|
return [
|
|
11956
11931
|
"left",
|
|
@@ -11958,7 +11933,7 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
11958
11933
|
"width",
|
|
11959
11934
|
"height"
|
|
11960
11935
|
].some((e) => Math.abs(n[e] - t[e]) > .5);
|
|
11961
|
-
}) && p();
|
|
11936
|
+
})) && p();
|
|
11962
11937
|
}), g = /* @__PURE__ */ new WeakSet(), _ = new ResizeObserver((t) => {
|
|
11963
11938
|
for (let n of t) {
|
|
11964
11939
|
let t = e.anchors.find(({ element: e }) => e === n.target), r = n.borderBoxSize?.[0];
|
|
@@ -12342,7 +12317,7 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
12342
12317
|
let t = !1, i = () => {
|
|
12343
12318
|
t = !0, T();
|
|
12344
12319
|
}, a = (e) => {
|
|
12345
|
-
e.type === "scroll" && e.target instanceof Node && y.current?.contains(e.target) || e.type
|
|
12320
|
+
e.type === "scroll" && e.target instanceof Node && y.current?.contains(e.target) || (e.type !== "visibilitychange" || document.hidden) && i();
|
|
12346
12321
|
}, s = [
|
|
12347
12322
|
"pointerdown",
|
|
12348
12323
|
"keydown",
|
|
@@ -12833,9 +12808,9 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
12833
12808
|
}, L = (e) => {
|
|
12834
12809
|
E && I();
|
|
12835
12810
|
let t = o.current;
|
|
12836
|
-
T &&
|
|
12811
|
+
T && t && Po(e.target) && (t.dataset.spiderTap = t.dataset.spiderTap === "a" ? "b" : "a", window.clearTimeout(C), C = window.setTimeout(() => {
|
|
12837
12812
|
delete t.dataset.spiderTap;
|
|
12838
|
-
}, 700))
|
|
12813
|
+
}, 700));
|
|
12839
12814
|
}, R = () => {
|
|
12840
12815
|
document.hidden && I();
|
|
12841
12816
|
}, ee = () => {
|
|
@@ -12996,5 +12971,4 @@ var y = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
12996
12971
|
sceneIds: Le
|
|
12997
12972
|
}
|
|
12998
12973
|
}), Vo = Bo(), Ho = Vo;
|
|
12999
|
-
//#endregion
|
|
13000
12974
|
export { io as HALLOWEEN_LABELS, C as HalloweenDecorBehavior, b as HalloweenScene, Bo as createHalloweenEvent, Ho as default, Vo as halloweenEvent };
|
package/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { i as e, t } from "./CelebrationEnvironmentContext-
|
|
1
|
+
import { i as e, t } from "./CelebrationEnvironmentContext-CYbe8wwh.js";
|
|
2
2
|
import { mergeClasses as n } from "@epam/ai-dial-chat-shared";
|
|
3
3
|
import { createContext as r, memo as i, useCallback as a, useContext as o, useEffect as s, useMemo as c, useRef as l, useState as u } from "react";
|
|
4
4
|
import { createPortal as d } from "react-dom";
|
|
5
5
|
import { ErrorBoundary as f } from "react-error-boundary";
|
|
6
6
|
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
// src/utils/celebration.ts
|
|
8
8
|
var h = (e) => e.normalize("NFKC").toLowerCase().replace(/[^\p{L}\p{M}\p{N}]+/gu, " ").trim(), g = (e, t) => {
|
|
9
9
|
let n = h(e);
|
|
10
10
|
return n.length > 0 && t.some((e) => h(e) === n);
|
|
@@ -89,7 +89,7 @@ var h = (e) => e.normalize("NFKC").toLowerCase().replace(/[^\p{L}\p{M}\p{N}]+/gu
|
|
|
89
89
|
let t = B?.secretTrigger;
|
|
90
90
|
if (!t || !H?.isSecretEnabled || !g(e, t.phrases)) return !1;
|
|
91
91
|
let n = _(H.secretSceneIds, F.current);
|
|
92
|
-
return n
|
|
92
|
+
return n !== void 0 && (F.current = n, G(n), !0);
|
|
93
93
|
}, [
|
|
94
94
|
B,
|
|
95
95
|
H,
|
|
@@ -142,5 +142,4 @@ var h = (e) => e.normalize("NFKC").toLowerCase().replace(/[^\p{L}\p{M}\p{N}]+/gu
|
|
|
142
142
|
})
|
|
143
143
|
}, t.id);
|
|
144
144
|
});
|
|
145
|
-
//#endregion
|
|
146
145
|
export { e as CELEBRATIONS_CLASS, T as CelebrationDecor, C as CelebrationProvider, w as useCelebration };
|
package/new-year.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { i as e, n as t } from "./CelebrationEnvironmentContext-
|
|
2
|
-
import { n, t as r } from "./flying-characters-
|
|
1
|
+
import { i as e, n as t } from "./CelebrationEnvironmentContext-CYbe8wwh.js";
|
|
2
|
+
import { n, t as r } from "./flying-characters-CRMBOYze.js";
|
|
3
3
|
import { mergeClasses as i } from "@epam/ai-dial-chat-shared";
|
|
4
4
|
import { memo as a, useId as o, useMemo as s } from "react";
|
|
5
5
|
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
6
6
|
import { GhostIconButton as d } from "@epam/ai-dial-ui-kit";
|
|
7
|
-
|
|
7
|
+
// src/new-year/assets/new-year-logo.svg
|
|
8
8
|
var f = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20fill='none'%3e%3cdefs%3e%3clinearGradient%20id='box'%20x1='14'%20y1='24'%20x2='52'%20y2='59'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%2357988d'/%3e%3cstop%20offset='1'%20stop-color='%23184654'/%3e%3c/linearGradient%3e%3clinearGradient%20id='ribbon'%20x1='25'%20y1='9'%20x2='39'%20y2='59'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23fff1ba'/%3e%3cstop%20offset='1'%20stop-color='%23d6a449'/%3e%3c/linearGradient%3e%3c/defs%3e%3cpath%20d='M32%2024C7%2028%2013%206%2020%209c6%201%2012%2015%2012%2015Zm0%200C57%2028%2051%206%2044%209c-6%201-12%2015-12%2015Z'%20fill='url(%23ribbon)'%20stroke='%23e0be73'/%3e%3crect%20x='11'%20y='28'%20width='42'%20height='30'%20rx='4'%20fill='url(%23box)'%20stroke='%23a5cfc4'%20stroke-width='.8'/%3e%3crect%20x='8'%20y='24'%20width='48'%20height='12'%20rx='3'%20fill='url(%23box)'%20stroke='%23a5cfc4'%20stroke-width='.8'/%3e%3cpath%20d='M27%2024h10v34H27z'%20fill='url(%23ribbon)'/%3e%3cpath%20d='m49%202%201.4%204.6L55%208l-4.6%201.4L49%2014l-1.4-4.6L43%208l4.6-1.4ZM9%208l1%203%203%201-3%201-1%203-1-3-3-1%203-1Z'%20fill='%23f4d589'/%3e%3cpath%20d='m19%2041%201%203%203%201-3%201-1%203-1-3-3-1%203-1Zm26%203%201%203%203%201-3%201-1%203-1-3-3-1%203-1Z'%20fill='%23aad9ce'/%3e%3c/svg%3e", p = {
|
|
9
9
|
toastTitle: "Happy New Year!",
|
|
10
10
|
snowToastMessage: "A little winter magic. Send \"{{phrase}}\" in the start-page chat for a secret surprise.",
|
|
@@ -150,10 +150,10 @@ var f = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
150
150
|
stroke: "#638879",
|
|
151
151
|
strokeWidth: "1.1"
|
|
152
152
|
}), Array.from({ length: 24 }, (e, t) => {
|
|
153
|
-
let n = 25 + t * 50, r = n % 300 / 300;
|
|
153
|
+
let n = 25 + t * 50, r = n % 300 / 300, i = 5 + 134 * r * (1 - r);
|
|
154
154
|
return /* @__PURE__ */ l("ellipse", {
|
|
155
155
|
cx: n,
|
|
156
|
-
cy:
|
|
156
|
+
cy: i + 5,
|
|
157
157
|
rx: "3",
|
|
158
158
|
ry: "5",
|
|
159
159
|
fill: [
|
|
@@ -206,8 +206,7 @@ var f = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBo
|
|
|
206
206
|
});
|
|
207
207
|
}, b = () => /* @__PURE__ */ l(y, { scene: _.Snow }), x = () => /* @__PURE__ */ l(y, { scene: _.Confetti });
|
|
208
208
|
a(y);
|
|
209
|
-
|
|
210
|
-
//#region src/new-year/components/NewYear/NewYearSleigh.tsx
|
|
209
|
+
// src/new-year/components/NewYear/NewYearSleigh.tsx
|
|
211
210
|
var S = () => {
|
|
212
211
|
let e = o();
|
|
213
212
|
return /* @__PURE__ */ u("svg", {
|
|
@@ -331,18 +330,18 @@ var S = () => {
|
|
|
331
330
|
]
|
|
332
331
|
});
|
|
333
332
|
}, C = a(() => {
|
|
334
|
-
let e = t().isMobile
|
|
333
|
+
let e = t().isMobile, i = s(() => r({
|
|
334
|
+
count: e ? 2 : 3,
|
|
335
|
+
sizesPx: e ? [100, 115] : [
|
|
336
|
+
125,
|
|
337
|
+
145,
|
|
338
|
+
165
|
|
339
|
+
],
|
|
340
|
+
durationSeconds: 8.4,
|
|
341
|
+
staggerSeconds: .85
|
|
342
|
+
}), [e]);
|
|
335
343
|
return /* @__PURE__ */ l(n, {
|
|
336
|
-
flights:
|
|
337
|
-
count: e ? 2 : 3,
|
|
338
|
-
sizesPx: e ? [100, 115] : [
|
|
339
|
-
125,
|
|
340
|
-
145,
|
|
341
|
-
165
|
|
342
|
-
],
|
|
343
|
-
durationSeconds: 8.4,
|
|
344
|
-
staggerSeconds: .85
|
|
345
|
-
}), [e]),
|
|
344
|
+
flights: i,
|
|
346
345
|
Character: S
|
|
347
346
|
});
|
|
348
347
|
}), w = {
|
|
@@ -378,5 +377,4 @@ var S = () => {
|
|
|
378
377
|
sceneIds: [_.Confetti]
|
|
379
378
|
}
|
|
380
379
|
}, T = w;
|
|
381
|
-
//#endregion
|
|
382
380
|
export { p as NEW_YEAR_LABELS, _ as NewYearScene, T as default, w as newYearEvent };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-celebrations",
|
|
3
3
|
"description": "Seasonal start-page celebrations with lazily loaded Halloween and New Year scenes that hosts can switch on and off one by one",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.18",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"react-error-boundary": "^6.1.5"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@epam/ai-dial-chat-shared": "1.1.
|
|
33
|
+
"@epam/ai-dial-chat-shared": "1.1.18",
|
|
34
34
|
"@epam/ai-dial-ui-kit": "^0.14.2",
|
|
35
35
|
"react": "^19.2.8",
|
|
36
36
|
"react-dom": "^19.2.8"
|