wissive 0.1.0 → 0.1.3

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/wissive.js CHANGED
@@ -1,7 +1,7 @@
1
- var et = Object.defineProperty;
2
- var tt = (o, t, e) => t in o ? et(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
3
- var g = (o, t, e) => tt(o, typeof t != "symbol" ? t + "" : t, e);
4
- function f(o = {}) {
1
+ var xt = Object.defineProperty;
2
+ var Mt = (o, t, e) => t in o ? xt(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
3
+ var v = (o, t, e) => Mt(o, typeof t != "symbol" ? t + "" : t, e);
4
+ function $(o = {}) {
5
5
  return {
6
6
  eyeOpen: 1,
7
7
  eyeScale: 1,
@@ -13,6 +13,7 @@ function f(o = {}) {
13
13
  mouthWidth: 0.8,
14
14
  mouthOpen: 0,
15
15
  mouthType: 0,
16
+ showBrows: 0,
16
17
  browY: 0,
17
18
  browTilt: 0,
18
19
  cheek: 0,
@@ -34,7 +35,7 @@ function f(o = {}) {
34
35
  ...o
35
36
  };
36
37
  }
37
- const Re = {
38
+ const rt = {
38
39
  name: "mochi",
39
40
  emotion: "happy",
40
41
  baseColor: "#F2A9B8",
@@ -50,27 +51,27 @@ const Re = {
50
51
  },
51
52
  expressions: {
52
53
  idle: [
53
- f({ eyeType: 2, eyeScale: 1, eyeGap: 28.33, eyeY: 43.33, mouthType: 0, mouthY: 53.33, mouthWidth: 0.39, mouthCurve: 0.43, cheek: 0 }),
54
+ $({ eyeType: 2, eyeScale: 1, eyeGap: 28.33, eyeY: 43.33, mouthType: 0, mouthY: 53.33, mouthWidth: 0.39, mouthCurve: 0.43, cheek: 0 }),
54
55
  // >‿<
55
- f({ eyeType: 2, eyeScale: 1, eyeGap: 28.33, eyeY: 43.33, mouthType: 0, mouthY: 53.33, mouthWidth: 0.39, mouthCurve: 0.43, cheek: 0, bob: -1.5 }),
56
- f({ eyeType: 2, eyeScale: 1, eyeGap: 28.33, eyeY: 43.33, mouthType: 0, mouthY: 53.33, mouthWidth: 0.39, mouthCurve: 0.43, cheek: 0, bob: 1 }),
56
+ $({ eyeType: 2, eyeScale: 1, eyeGap: 28.33, eyeY: 43.33, mouthType: 0, mouthY: 53.33, mouthWidth: 0.39, mouthCurve: 0.43, cheek: 0, bob: -1.5 }),
57
+ $({ eyeType: 2, eyeScale: 1, eyeGap: 28.33, eyeY: 43.33, mouthType: 0, mouthY: 53.33, mouthWidth: 0.39, mouthCurve: 0.43, cheek: 0, bob: 1 }),
57
58
  // ^‿^
58
- f({ eyeType: 2, eyeScale: 1, eyeGap: 28.33, eyeY: 43.33, mouthType: 0, mouthY: 53.33, mouthWidth: 0.39, mouthCurve: 0.43, cheek: 0 })
59
+ $({ eyeType: 2, eyeScale: 1, eyeGap: 28.33, eyeY: 43.33, mouthType: 0, mouthY: 53.33, mouthWidth: 0.39, mouthCurve: 0.43, cheek: 0 })
59
60
  ],
60
61
  near: [
61
- f({ eyeType: 2, eyeScale: 1, eyeGap: 28.33, eyeY: 43.33, mouthType: 0, mouthY: 53.33, mouthWidth: 0.39, mouthCurve: 0.43, cheek: 0, bob: -1.5 }),
62
- f({ eyeType: 2, eyeScale: 1, eyeGap: 28.33, eyeY: 43.33, mouthType: 0, mouthY: 53.33, mouthWidth: 0.39, mouthCurve: 0.43, cheek: 0, bob: -2.5 })
62
+ $({ eyeType: 2, eyeScale: 1, eyeGap: 28.33, eyeY: 43.33, mouthType: 0, mouthY: 53.33, mouthWidth: 0.39, mouthCurve: 0.43, cheek: 0, bob: -1.5 }),
63
+ $({ eyeType: 2, eyeScale: 1, eyeGap: 28.33, eyeY: 43.33, mouthType: 0, mouthY: 53.33, mouthWidth: 0.39, mouthCurve: 0.43, cheek: 0, bob: -2.5 })
63
64
  ],
64
65
  hover: [
65
- f({ eyeType: 2, eyeScale: 1, eyeGap: 28.33, eyeY: 43.33, mouthType: 0, mouthY: 53.33, mouthWidth: 0.39, mouthCurve: 0.43, cheek: 0.3, bob: -4 }),
66
- f({ eyeType: 2, eyeScale: 1, eyeGap: 28.33, eyeY: 43.33, mouthType: 0, mouthY: 53.33, mouthWidth: 0.39, mouthCurve: 0.43, cheek: 0.3, bob: -4.5 })
66
+ $({ eyeType: 2, eyeScale: 1, eyeGap: 28.33, eyeY: 43.33, mouthType: 0, mouthY: 53.33, mouthWidth: 0.39, mouthCurve: 0.43, cheek: 0.3, bob: -4 }),
67
+ $({ eyeType: 2, eyeScale: 1, eyeGap: 28.33, eyeY: 43.33, mouthType: 0, mouthY: 53.33, mouthWidth: 0.39, mouthCurve: 0.43, cheek: 0.3, bob: -4.5 })
67
68
  ],
68
69
  click: [
69
- f({ eyeType: 2, eyeScale: 1, eyeGap: 28.33, eyeY: 43.33, mouthType: 0, mouthY: 53.33, mouthWidth: 0.39, mouthCurve: 0.43, cheek: 0.5, bob: -7 }),
70
- f({ eyeType: 2, eyeScale: 1, eyeGap: 28.33, eyeY: 43.33, mouthType: 0, mouthY: 53.33, mouthWidth: 0.39, mouthCurve: 0.43, cheek: 0.5, bob: -6 })
70
+ $({ eyeType: 2, eyeScale: 1, eyeGap: 28.33, eyeY: 43.33, mouthType: 0, mouthY: 53.33, mouthWidth: 0.39, mouthCurve: 0.43, cheek: 0.5, bob: -7 }),
71
+ $({ eyeType: 2, eyeScale: 1, eyeGap: 28.33, eyeY: 43.33, mouthType: 0, mouthY: 53.33, mouthWidth: 0.39, mouthCurve: 0.43, cheek: 0.5, bob: -6 })
71
72
  ]
72
73
  }
73
- }, ot = {
74
+ }, Ft = {
74
75
  name: "zumi",
75
76
  emotion: "flutter",
76
77
  baseColor: "#F2CB4E",
@@ -86,21 +87,21 @@ const Re = {
86
87
  },
87
88
  expressions: {
88
89
  idle: [
89
- f({ eyeType: 2, eyeScale: 1, eyeGap: 30, eyeY: 43.33, mouthType: 3, mouthY: 45.83, mouthWidth: 0.27, mouthCurve: 0, cheek: 0.3 }),
90
- f({ eyeType: 2, eyeScale: 1, eyeGap: 30, eyeY: 43.33, mouthType: 3, mouthY: 45.83, mouthWidth: 0.27, mouthCurve: 0, cheek: 0.4, bob: -1.5 }),
91
- f({ eyeType: 2, eyeScale: 1, eyeGap: 30, eyeY: 43.33, mouthType: 3, mouthY: 45.83, mouthWidth: 0.27, mouthCurve: 0, cheek: 0.35, bob: 1 })
90
+ $({ eyeType: 2, eyeScale: 1, eyeGap: 30, eyeY: 43.33, mouthType: 3, mouthY: 45.83, mouthWidth: 0.27, mouthCurve: 0, cheek: 0.3 }),
91
+ $({ eyeType: 2, eyeScale: 1, eyeGap: 30, eyeY: 43.33, mouthType: 3, mouthY: 45.83, mouthWidth: 0.27, mouthCurve: 0, cheek: 0.4, bob: -1.5 }),
92
+ $({ eyeType: 2, eyeScale: 1, eyeGap: 30, eyeY: 43.33, mouthType: 3, mouthY: 45.83, mouthWidth: 0.27, mouthCurve: 0, cheek: 0.35, bob: 1 })
92
93
  ],
93
94
  near: [
94
- f({ eyeType: 2, eyeScale: 1, eyeGap: 30, eyeY: 43.33, mouthType: 3, mouthY: 45.83, mouthWidth: 0.27, mouthCurve: 0, cheek: 0.5, bob: -2 })
95
+ $({ eyeType: 2, eyeScale: 1, eyeGap: 30, eyeY: 43.33, mouthType: 3, mouthY: 45.83, mouthWidth: 0.27, mouthCurve: 0, cheek: 0.5, bob: -2 })
95
96
  ],
96
97
  hover: [
97
- f({ eyeType: 2, eyeScale: 1, eyeGap: 30, eyeY: 43.33, mouthType: 3, mouthY: 45.83, mouthWidth: 0.27, mouthCurve: 0, cheek: 0.7, bob: -4 })
98
+ $({ eyeType: 2, eyeScale: 1, eyeGap: 30, eyeY: 43.33, mouthType: 3, mouthY: 45.83, mouthWidth: 0.27, mouthCurve: 0, cheek: 0.7, bob: -4 })
98
99
  ],
99
100
  click: [
100
- f({ eyeType: 2, eyeScale: 1, eyeGap: 30, eyeY: 43.33, mouthType: 3, mouthY: 45.83, mouthWidth: 0.27, mouthCurve: 0, cheek: 0.9, bob: -6 })
101
+ $({ eyeType: 2, eyeScale: 1, eyeGap: 30, eyeY: 43.33, mouthType: 3, mouthY: 45.83, mouthWidth: 0.27, mouthCurve: 0, cheek: 0.9, bob: -6 })
101
102
  ]
102
103
  }
103
- }, it = {
104
+ }, kt = {
104
105
  name: "suri",
105
106
  emotion: "pleasure",
106
107
  baseColor: "#F28FC2",
@@ -116,20 +117,20 @@ const Re = {
116
117
  },
117
118
  expressions: {
118
119
  idle: [
119
- f({ eyeType: 1, eyeScale: 1, eyeGap: 26.67, eyeY: 45, mouthType: 0, mouthY: 53.33, mouthWidth: 0.36, mouthCurve: 0.48, cheek: 0.4 }),
120
- f({ eyeType: 1, eyeScale: 1, eyeGap: 26.67, eyeY: 45, mouthType: 0, mouthY: 53.33, mouthWidth: 0.36, mouthCurve: 0.48, cheek: 0.5, bob: 1 })
120
+ $({ eyeType: 1, eyeScale: 1, eyeGap: 26.67, eyeY: 45, mouthType: 0, mouthY: 53.33, mouthWidth: 0.36, mouthCurve: 0.48, cheek: 0.4 }),
121
+ $({ eyeType: 1, eyeScale: 1, eyeGap: 26.67, eyeY: 45, mouthType: 0, mouthY: 53.33, mouthWidth: 0.36, mouthCurve: 0.48, cheek: 0.5, bob: 1 })
121
122
  ],
122
123
  near: [
123
- f({ eyeType: 1, eyeScale: 1, eyeGap: 26.67, eyeY: 45, mouthType: 0, mouthY: 53.33, mouthWidth: 0.36, mouthCurve: 0.48, cheek: 0.6, bob: 2 })
124
+ $({ eyeType: 1, eyeScale: 1, eyeGap: 26.67, eyeY: 45, mouthType: 0, mouthY: 53.33, mouthWidth: 0.36, mouthCurve: 0.48, cheek: 0.6, bob: 2 })
124
125
  ],
125
126
  hover: [
126
- f({ eyeType: 1, eyeScale: 1, eyeGap: 26.67, eyeY: 45, mouthType: 0, mouthY: 53.33, mouthWidth: 0.36, mouthCurve: 0.48, cheek: 0.75, bob: 3.5 })
127
+ $({ eyeType: 1, eyeScale: 1, eyeGap: 26.67, eyeY: 45, mouthType: 0, mouthY: 53.33, mouthWidth: 0.36, mouthCurve: 0.48, cheek: 0.75, bob: 3.5 })
127
128
  ],
128
129
  click: [
129
- f({ eyeType: 1, eyeScale: 1, eyeGap: 26.67, eyeY: 45, mouthType: 0, mouthY: 53.33, mouthWidth: 0.36, mouthCurve: 0.48, cheek: 0.9, bob: 5 })
130
+ $({ eyeType: 1, eyeScale: 1, eyeGap: 26.67, eyeY: 45, mouthType: 0, mouthY: 53.33, mouthWidth: 0.36, mouthCurve: 0.48, cheek: 0.9, bob: 5 })
130
131
  ]
131
132
  }
132
- }, st = {
133
+ }, vt = {
133
134
  name: "nima",
134
135
  emotion: "peaceful",
135
136
  baseColor: "#9AC9A0",
@@ -145,20 +146,20 @@ const Re = {
145
146
  },
146
147
  expressions: {
147
148
  idle: [
148
- f({ eyeType: 14, eyeScale: 1, eyeGap: 25, eyeY: 43.33, mouthType: 14, mouthY: 51.67, mouthWidth: 0, mouthCurve: 0 }),
149
- f({ eyeType: 14, eyeScale: 1, eyeGap: 25, eyeY: 43.33, mouthType: 14, mouthY: 51.67, mouthWidth: 0, mouthCurve: 0, bob: 1.5 })
149
+ $({ eyeType: 14, eyeScale: 1, eyeGap: 25, eyeY: 43.33, mouthType: 14, mouthY: 51.67, mouthWidth: 0, mouthCurve: 0 }),
150
+ $({ eyeType: 14, eyeScale: 1, eyeGap: 25, eyeY: 43.33, mouthType: 14, mouthY: 51.67, mouthWidth: 0, mouthCurve: 0, bob: 1.5 })
150
151
  ],
151
152
  near: [
152
- f({ eyeType: 14, eyeScale: 1, eyeGap: 25, eyeY: 43.33, mouthType: 14, mouthY: 51.67, mouthWidth: 0, mouthCurve: 0, bob: 2 })
153
+ $({ eyeType: 14, eyeScale: 1, eyeGap: 25, eyeY: 43.33, mouthType: 14, mouthY: 51.67, mouthWidth: 0, mouthCurve: 0, bob: 2 })
153
154
  ],
154
155
  hover: [
155
- f({ eyeType: 14, eyeScale: 1, eyeGap: 25, eyeY: 43.33, mouthType: 14, mouthY: 51.67, mouthWidth: 0, mouthCurve: 0, cheek: 0.3, bob: 3 })
156
+ $({ eyeType: 14, eyeScale: 1, eyeGap: 25, eyeY: 43.33, mouthType: 14, mouthY: 51.67, mouthWidth: 0, mouthCurve: 0, cheek: 0.3, bob: 3 })
156
157
  ],
157
158
  click: [
158
- f({ eyeType: 14, eyeScale: 1, eyeGap: 25, eyeY: 43.33, mouthType: 14, mouthY: 51.67, mouthWidth: 0, mouthCurve: 0, cheek: 0.5, bob: 4.5 })
159
+ $({ eyeType: 14, eyeScale: 1, eyeGap: 25, eyeY: 43.33, mouthType: 14, mouthY: 51.67, mouthWidth: 0, mouthCurve: 0, cheek: 0.5, bob: 4.5 })
159
160
  ]
160
161
  }
161
- }, Ce = {
162
+ }, De = {
162
163
  name: "cota",
163
164
  emotion: "normal",
164
165
  baseColor: "#C9DCD3",
@@ -174,20 +175,20 @@ const Re = {
174
175
  },
175
176
  expressions: {
176
177
  idle: [
177
- f({ eyeType: 0, eyeScale: 1, eyeGap: 23.33, eyeY: 45.83, mouthType: 3, mouthY: 56.67, mouthWidth: 0.33, mouthCurve: 0 }),
178
- f({ eyeType: 0, eyeScale: 1, eyeGap: 23.33, eyeY: 45.83, mouthType: 3, mouthY: 56.67, mouthWidth: 0.33, mouthCurve: 0, bob: -0.8 })
178
+ $({ eyeType: 0, eyeScale: 1, eyeGap: 23.33, eyeY: 45.83, mouthType: 3, mouthY: 56.67, mouthWidth: 0.33, mouthCurve: 0 }),
179
+ $({ eyeType: 0, eyeScale: 1, eyeGap: 23.33, eyeY: 45.83, mouthType: 3, mouthY: 56.67, mouthWidth: 0.33, mouthCurve: 0, bob: -0.8 })
179
180
  ],
180
181
  near: [
181
- f({ eyeType: 0, eyeScale: 1, eyeGap: 23.33, eyeY: 45.83, mouthType: 3, mouthY: 56.67, mouthWidth: 0.33, mouthCurve: 0, bob: 1.2 })
182
+ $({ eyeType: 0, eyeScale: 1, eyeGap: 23.33, eyeY: 45.83, mouthType: 3, mouthY: 56.67, mouthWidth: 0.33, mouthCurve: 0, bob: 1.2 })
182
183
  ],
183
184
  hover: [
184
- f({ eyeType: 0, eyeScale: 1, eyeGap: 23.33, eyeY: 45.83, mouthType: 3, mouthY: 56.67, mouthWidth: 0.33, mouthCurve: 0, cheek: 0.2, bob: 2.5 })
185
+ $({ eyeType: 0, eyeScale: 1, eyeGap: 23.33, eyeY: 45.83, mouthType: 3, mouthY: 56.67, mouthWidth: 0.33, mouthCurve: 0, cheek: 0.2, bob: 2.5 })
185
186
  ],
186
187
  click: [
187
- f({ eyeType: 0, eyeScale: 1, eyeGap: 23.33, eyeY: 45.83, mouthType: 3, mouthY: 56.67, mouthWidth: 0.33, mouthCurve: 0, cheek: 0.4, bob: 4 })
188
+ $({ eyeType: 0, eyeScale: 1, eyeGap: 23.33, eyeY: 45.83, mouthType: 3, mouthY: 56.67, mouthWidth: 0.33, mouthCurve: 0, cheek: 0.4, bob: 4 })
188
189
  ]
189
190
  }
190
- }, at = {
191
+ }, Ct = {
191
192
  name: "dozy",
192
193
  emotion: "tired",
193
194
  baseColor: "#D6DBCF",
@@ -205,20 +206,20 @@ const Re = {
205
206
  // Cansado de verdad: párpados caídos + gotas de sudor + resoplido —
206
207
  // sin zzz, que es "dormido"; Dozy está agotado pero despierto.
207
208
  idle: [
208
- f({ eyeType: 15, eyeScale: 0.85, eyeGap: 26.67, eyeY: 45.83, mouthType: 3, mouthY: 56.67, mouthWidth: 0.24, mouthCurve: 0, sweat: 1, puff: 0.7, bob: 1.5 }),
209
- f({ eyeType: 15, eyeScale: 0.85, eyeGap: 26.67, eyeY: 45.83, mouthType: 3, mouthY: 56.67, mouthWidth: 0.24, mouthCurve: 0, sweat: 1, puff: 0.7, bob: 2.5 })
209
+ $({ eyeType: 15, eyeScale: 0.85, eyeGap: 26.67, eyeY: 45.83, mouthType: 3, mouthY: 56.67, mouthWidth: 0.24, mouthCurve: 0, sweat: 1, puff: 0.7, bob: 1.5 }),
210
+ $({ eyeType: 15, eyeScale: 0.85, eyeGap: 26.67, eyeY: 45.83, mouthType: 3, mouthY: 56.67, mouthWidth: 0.24, mouthCurve: 0, sweat: 1, puff: 0.7, bob: 2.5 })
210
211
  ],
211
212
  near: [
212
- f({ eyeType: 15, eyeScale: 0.85, eyeGap: 26.67, eyeY: 45.83, mouthType: 3, mouthY: 56.67, mouthWidth: 0.24, mouthCurve: 0, sweat: 1, puff: 0.7, bob: 3.5 })
213
+ $({ eyeType: 15, eyeScale: 0.85, eyeGap: 26.67, eyeY: 45.83, mouthType: 3, mouthY: 56.67, mouthWidth: 0.24, mouthCurve: 0, sweat: 1, puff: 0.7, bob: 3.5 })
213
214
  ],
214
215
  hover: [
215
- f({ eyeType: 15, eyeScale: 0.85, eyeGap: 26.67, eyeY: 45.83, mouthType: 3, mouthY: 56.67, mouthWidth: 0.24, mouthCurve: 0, sweat: 1, puff: 0.85, bob: 4.5 })
216
+ $({ eyeType: 15, eyeScale: 0.85, eyeGap: 26.67, eyeY: 45.83, mouthType: 3, mouthY: 56.67, mouthWidth: 0.24, mouthCurve: 0, sweat: 1, puff: 0.85, bob: 4.5 })
216
217
  ],
217
218
  click: [
218
- f({ eyeType: 15, eyeScale: 0.85, eyeGap: 26.67, eyeY: 45.83, mouthType: 3, mouthY: 56.67, mouthWidth: 0.24, mouthCurve: 0, sweat: 1, puff: 1, bob: 6.5 })
219
+ $({ eyeType: 15, eyeScale: 0.85, eyeGap: 26.67, eyeY: 45.83, mouthType: 3, mouthY: 56.67, mouthWidth: 0.24, mouthCurve: 0, sweat: 1, puff: 1, bob: 6.5 })
219
220
  ]
220
221
  }
221
- }, nt = {
222
+ }, wt = {
222
223
  name: "lumo",
223
224
  emotion: "sad",
224
225
  baseColor: "#7FA6D9",
@@ -234,20 +235,20 @@ const Re = {
234
235
  },
235
236
  expressions: {
236
237
  idle: [
237
- f({ eyeType: 16, eyeScale: 1, eyeGap: 25, eyeY: 43.33, mouthType: 3, mouthY: 55, mouthWidth: 0.3, mouthCurve: 0, tears: 1, bob: 1.8 }),
238
- f({ eyeType: 16, eyeScale: 1, eyeGap: 25, eyeY: 43.33, mouthType: 3, mouthY: 55, mouthWidth: 0.3, mouthCurve: 0, tears: 1, bob: 2.8 })
238
+ $({ eyeType: 16, eyeScale: 1, eyeGap: 25, eyeY: 43.33, mouthType: 3, mouthY: 55, mouthWidth: 0.3, mouthCurve: 0, tears: 1, bob: 1.8 }),
239
+ $({ eyeType: 16, eyeScale: 1, eyeGap: 25, eyeY: 43.33, mouthType: 3, mouthY: 55, mouthWidth: 0.3, mouthCurve: 0, tears: 1, bob: 2.8 })
239
240
  ],
240
241
  near: [
241
- f({ eyeType: 16, eyeScale: 1, eyeGap: 25, eyeY: 43.33, mouthType: 3, mouthY: 55, mouthWidth: 0.3, mouthCurve: 0, tears: 1, bob: 3.5 })
242
+ $({ eyeType: 16, eyeScale: 1, eyeGap: 25, eyeY: 43.33, mouthType: 3, mouthY: 55, mouthWidth: 0.3, mouthCurve: 0, tears: 1, bob: 3.5 })
242
243
  ],
243
244
  hover: [
244
- f({ eyeType: 16, eyeScale: 1, eyeGap: 25, eyeY: 43.33, mouthType: 3, mouthY: 55, mouthWidth: 0.3, mouthCurve: 0, tears: 1, bob: 4.8 })
245
+ $({ eyeType: 16, eyeScale: 1, eyeGap: 25, eyeY: 43.33, mouthType: 3, mouthY: 55, mouthWidth: 0.3, mouthCurve: 0, tears: 1, bob: 4.8 })
245
246
  ],
246
247
  click: [
247
- f({ eyeType: 16, eyeScale: 1, eyeGap: 25, eyeY: 43.33, mouthType: 3, mouthY: 55, mouthWidth: 0.3, mouthCurve: 0, tears: 1, bob: 6 })
248
+ $({ eyeType: 16, eyeScale: 1, eyeGap: 25, eyeY: 43.33, mouthType: 3, mouthY: 55, mouthWidth: 0.3, mouthCurve: 0, tears: 1, bob: 6 })
248
249
  ]
249
250
  }
250
- }, rt = {
251
+ }, Tt = {
251
252
  name: "fidge",
252
253
  emotion: "anxiety",
253
254
  baseColor: "#A99BD9",
@@ -263,20 +264,20 @@ const Re = {
263
264
  },
264
265
  expressions: {
265
266
  idle: [
266
- f({ eyeType: 5, eyeScale: 1, eyeGap: 25, eyeY: 43.33, mouthType: 13, mouthY: 56.67, mouthWidth: 0.08, mouthCurve: 0 }),
267
- f({ eyeType: 5, eyeScale: 1, eyeGap: 25, eyeY: 43.33, mouthType: 13, mouthY: 56.67, mouthWidth: 0.08, mouthCurve: 0, shiftX: 1.5 })
267
+ $({ eyeType: 5, eyeScale: 1, eyeGap: 25, eyeY: 43.33, mouthType: 13, mouthY: 56.67, mouthWidth: 0.08, mouthCurve: 0 }),
268
+ $({ eyeType: 5, eyeScale: 1, eyeGap: 25, eyeY: 43.33, mouthType: 13, mouthY: 56.67, mouthWidth: 0.08, mouthCurve: 0, shiftX: 1.5 })
268
269
  ],
269
270
  near: [
270
- f({ eyeType: 5, eyeScale: 1, eyeGap: 25, eyeY: 43.33, mouthType: 13, mouthY: 56.67, mouthWidth: 0.08, mouthCurve: 0, shiftX: 2.5 })
271
+ $({ eyeType: 5, eyeScale: 1, eyeGap: 25, eyeY: 43.33, mouthType: 13, mouthY: 56.67, mouthWidth: 0.08, mouthCurve: 0, shiftX: 2.5 })
271
272
  ],
272
273
  hover: [
273
- f({ eyeType: 5, eyeScale: 1, eyeGap: 25, eyeY: 43.33, mouthType: 13, mouthY: 56.67, mouthWidth: 0.08, mouthCurve: 0, shiftX: 4 })
274
+ $({ eyeType: 5, eyeScale: 1, eyeGap: 25, eyeY: 43.33, mouthType: 13, mouthY: 56.67, mouthWidth: 0.08, mouthCurve: 0, shiftX: 4 })
274
275
  ],
275
276
  click: [
276
- f({ eyeType: 5, eyeScale: 1, eyeGap: 25, eyeY: 43.33, mouthType: 13, mouthY: 56.67, mouthWidth: 0.08, mouthCurve: 0, shiftX: 6 })
277
+ $({ eyeType: 5, eyeScale: 1, eyeGap: 25, eyeY: 43.33, mouthType: 13, mouthY: 56.67, mouthWidth: 0.08, mouthCurve: 0, shiftX: 6 })
277
278
  ]
278
279
  }
279
- }, lt = {
280
+ }, St = {
280
281
  name: "brix",
281
282
  emotion: "anger",
282
283
  baseColor: "#D9566A",
@@ -292,20 +293,20 @@ const Re = {
292
293
  },
293
294
  expressions: {
294
295
  idle: [
295
- f({ eyeType: 17, eyeScale: 1, eyeGap: 28.33, eyeY: 46.67, mouthType: 0, mouthY: 61.67, mouthWidth: 0.33, mouthCurve: -0.48 }),
296
- f({ eyeType: 17, eyeScale: 1, eyeGap: 28.33, eyeY: 46.67, mouthType: 0, mouthY: 61.67, mouthWidth: 0.33, mouthCurve: -0.48 })
296
+ $({ eyeType: 17, eyeScale: 1, eyeGap: 28.33, eyeY: 46.67, mouthType: 0, mouthY: 61.67, mouthWidth: 0.33, mouthCurve: -0.48 }),
297
+ $({ eyeType: 17, eyeScale: 1, eyeGap: 28.33, eyeY: 46.67, mouthType: 0, mouthY: 61.67, mouthWidth: 0.33, mouthCurve: -0.48 })
297
298
  ],
298
299
  near: [
299
- f({ eyeType: 17, eyeScale: 1, eyeGap: 28.33, eyeY: 46.67, mouthType: 0, mouthY: 61.67, mouthWidth: 0.33, mouthCurve: -0.48 })
300
+ $({ eyeType: 17, eyeScale: 1, eyeGap: 28.33, eyeY: 46.67, mouthType: 0, mouthY: 61.67, mouthWidth: 0.33, mouthCurve: -0.48 })
300
301
  ],
301
302
  hover: [
302
- f({ eyeType: 17, eyeScale: 1, eyeGap: 28.33, eyeY: 46.67, mouthType: 0, mouthY: 61.67, mouthWidth: 0.33, mouthCurve: -0.48 })
303
+ $({ eyeType: 17, eyeScale: 1, eyeGap: 28.33, eyeY: 46.67, mouthType: 0, mouthY: 61.67, mouthWidth: 0.33, mouthCurve: -0.48 })
303
304
  ],
304
305
  click: [
305
- f({ eyeType: 17, eyeScale: 1, eyeGap: 28.33, eyeY: 46.67, mouthType: 0, mouthY: 61.67, mouthWidth: 0.33, mouthCurve: -0.48 })
306
+ $({ eyeType: 17, eyeScale: 1, eyeGap: 28.33, eyeY: 46.67, mouthType: 0, mouthY: 61.67, mouthWidth: 0.33, mouthCurve: -0.48 })
306
307
  ]
307
308
  }
308
- }, ct = {
309
+ }, Yt = {
309
310
  name: "wilt",
310
311
  emotion: "disappointed",
311
312
  baseColor: "#EBD98A",
@@ -321,20 +322,20 @@ const Re = {
321
322
  },
322
323
  expressions: {
323
324
  idle: [
324
- f({ eyeType: 15, eyeScale: 1.15, eyeGap: 25, eyeY: 43.33, mouthType: 0, mouthY: 63.33, mouthWidth: 0.45, mouthCurve: -0.54, bob: 1.5 }),
325
- f({ eyeType: 15, eyeScale: 1.15, eyeGap: 25, eyeY: 43.33, mouthType: 0, mouthY: 63.33, mouthWidth: 0.45, mouthCurve: -0.54, bob: 2.5 })
325
+ $({ eyeType: 15, eyeScale: 1.15, eyeGap: 25, eyeY: 43.33, mouthType: 0, mouthY: 63.33, mouthWidth: 0.45, mouthCurve: -0.54, bob: 1.5 }),
326
+ $({ eyeType: 15, eyeScale: 1.15, eyeGap: 25, eyeY: 43.33, mouthType: 0, mouthY: 63.33, mouthWidth: 0.45, mouthCurve: -0.54, bob: 2.5 })
326
327
  ],
327
328
  near: [
328
- f({ eyeType: 15, eyeScale: 1.15, eyeGap: 25, eyeY: 43.33, mouthType: 0, mouthY: 63.33, mouthWidth: 0.45, mouthCurve: -0.54, bob: 3.5 })
329
+ $({ eyeType: 15, eyeScale: 1.15, eyeGap: 25, eyeY: 43.33, mouthType: 0, mouthY: 63.33, mouthWidth: 0.45, mouthCurve: -0.54, bob: 3.5 })
329
330
  ],
330
331
  hover: [
331
- f({ eyeType: 15, eyeScale: 1.15, eyeGap: 25, eyeY: 43.33, mouthType: 0, mouthY: 63.33, mouthWidth: 0.45, mouthCurve: -0.54, bob: 4.5 })
332
+ $({ eyeType: 15, eyeScale: 1.15, eyeGap: 25, eyeY: 43.33, mouthType: 0, mouthY: 63.33, mouthWidth: 0.45, mouthCurve: -0.54, bob: 4.5 })
332
333
  ],
333
334
  click: [
334
- f({ eyeType: 15, eyeScale: 1.15, eyeGap: 25, eyeY: 43.33, mouthType: 0, mouthY: 63.33, mouthWidth: 0.45, mouthCurve: -0.54, bob: 6 })
335
+ $({ eyeType: 15, eyeScale: 1.15, eyeGap: 25, eyeY: 43.33, mouthType: 0, mouthY: 63.33, mouthWidth: 0.45, mouthCurve: -0.54, bob: 6 })
335
336
  ]
336
337
  }
337
- }, ht = {
338
+ }, Et = {
338
339
  name: "knot",
339
340
  emotion: "stress",
340
341
  baseColor: "#C97F76",
@@ -353,20 +354,20 @@ const Re = {
353
354
  // pero el sello de Knot es cargar con la nube de tormenta Y el garabato
354
355
  // de confusión encima a la vez — agobiado por todos lados, no solo mareado.
355
356
  idle: [
356
- f({ eyeType: 18, eyeScale: 1, eyeGap: 26.67, eyeY: 45, mouthType: 3, mouthY: 58.33, mouthWidth: 0.42, mouthCurve: 0, storm: 1, scribble: 1 }),
357
- f({ eyeType: 18, eyeScale: 1, eyeGap: 26.67, eyeY: 45, mouthType: 3, mouthY: 58.33, mouthWidth: 0.42, mouthCurve: 0, storm: 1, scribble: 1, shiftX: 1.5 })
357
+ $({ eyeType: 18, eyeScale: 1, eyeGap: 26.67, eyeY: 45, mouthType: 3, mouthY: 58.33, mouthWidth: 0.42, mouthCurve: 0, storm: 1, scribble: 1 }),
358
+ $({ eyeType: 18, eyeScale: 1, eyeGap: 26.67, eyeY: 45, mouthType: 3, mouthY: 58.33, mouthWidth: 0.42, mouthCurve: 0, storm: 1, scribble: 1, shiftX: 1.5 })
358
359
  ],
359
360
  near: [
360
- f({ eyeType: 18, eyeScale: 1, eyeGap: 26.67, eyeY: 45, mouthType: 3, mouthY: 58.33, mouthWidth: 0.42, mouthCurve: 0, storm: 1, scribble: 1, shiftX: 3 })
361
+ $({ eyeType: 18, eyeScale: 1, eyeGap: 26.67, eyeY: 45, mouthType: 3, mouthY: 58.33, mouthWidth: 0.42, mouthCurve: 0, storm: 1, scribble: 1, shiftX: 3 })
361
362
  ],
362
363
  hover: [
363
- f({ eyeType: 18, eyeScale: 1, eyeGap: 26.67, eyeY: 45, mouthType: 3, mouthY: 58.33, mouthWidth: 0.42, mouthCurve: 0, storm: 1, scribble: 1, shiftX: 4.5 })
364
+ $({ eyeType: 18, eyeScale: 1, eyeGap: 26.67, eyeY: 45, mouthType: 3, mouthY: 58.33, mouthWidth: 0.42, mouthCurve: 0, storm: 1, scribble: 1, shiftX: 4.5 })
364
365
  ],
365
366
  click: [
366
- f({ eyeType: 18, eyeScale: 1, eyeGap: 26.67, eyeY: 45, mouthType: 3, mouthY: 58.33, mouthWidth: 0.42, mouthCurve: 0, storm: 1, scribble: 1, shiftX: 6.5 })
367
+ $({ eyeType: 18, eyeScale: 1, eyeGap: 26.67, eyeY: 45, mouthType: 3, mouthY: 58.33, mouthWidth: 0.42, mouthCurve: 0, storm: 1, scribble: 1, shiftX: 6.5 })
367
368
  ]
368
369
  }
369
- }, ut = {
370
+ }, At = {
370
371
  name: "snug",
371
372
  emotion: "sleepy",
372
373
  baseColor: "#AFCBE0",
@@ -382,20 +383,20 @@ const Re = {
382
383
  },
383
384
  expressions: {
384
385
  idle: [
385
- f({ eyeType: 19, eyeScale: 1, eyeGap: 26.67, eyeY: 45, mouthType: 3, mouthY: 56.67, mouthWidth: 0.27, mouthCurve: 0, zzz: 1, bob: 0.5 }),
386
- f({ eyeType: 19, eyeScale: 1, eyeGap: 26.67, eyeY: 45, mouthType: 3, mouthY: 56.67, mouthWidth: 0.27, mouthCurve: 0, zzz: 1, bob: 1.5 })
386
+ $({ eyeType: 19, eyeScale: 1, eyeGap: 26.67, eyeY: 45, mouthType: 3, mouthY: 56.67, mouthWidth: 0.27, mouthCurve: 0, zzz: 1, bob: 0.5 }),
387
+ $({ eyeType: 19, eyeScale: 1, eyeGap: 26.67, eyeY: 45, mouthType: 3, mouthY: 56.67, mouthWidth: 0.27, mouthCurve: 0, zzz: 1, bob: 1.5 })
387
388
  ],
388
389
  near: [
389
- f({ eyeType: 19, eyeScale: 1, eyeGap: 26.67, eyeY: 45, mouthType: 3, mouthY: 56.67, mouthWidth: 0.27, mouthCurve: 0, zzz: 1, bob: 2.5 })
390
+ $({ eyeType: 19, eyeScale: 1, eyeGap: 26.67, eyeY: 45, mouthType: 3, mouthY: 56.67, mouthWidth: 0.27, mouthCurve: 0, zzz: 1, bob: 2.5 })
390
391
  ],
391
392
  hover: [
392
- f({ eyeType: 19, eyeScale: 1, eyeGap: 26.67, eyeY: 45, mouthType: 3, mouthY: 56.67, mouthWidth: 0.27, mouthCurve: 0, zzz: 1, bob: 3.8 })
393
+ $({ eyeType: 19, eyeScale: 1, eyeGap: 26.67, eyeY: 45, mouthType: 3, mouthY: 56.67, mouthWidth: 0.27, mouthCurve: 0, zzz: 1, bob: 3.8 })
393
394
  ],
394
395
  click: [
395
- f({ eyeType: 19, eyeScale: 1, eyeGap: 26.67, eyeY: 45, mouthType: 3, mouthY: 56.67, mouthWidth: 0.27, mouthCurve: 0, zzz: 1, bob: 5.5 })
396
+ $({ eyeType: 19, eyeScale: 1, eyeGap: 26.67, eyeY: 45, mouthType: 3, mouthY: 56.67, mouthWidth: 0.27, mouthCurve: 0, zzz: 1, bob: 5.5 })
396
397
  ]
397
398
  }
398
- }, dt = {
399
+ }, zt = {
399
400
  name: "pip",
400
401
  emotion: "surprised",
401
402
  baseColor: "#F0B98A",
@@ -411,20 +412,20 @@ const Re = {
411
412
  },
412
413
  expressions: {
413
414
  idle: [
414
- f({ eyeType: 20, eyeScale: 0.8, eyeGap: 21.67, eyeY: 43.33, mouthType: 1, mouthY: 55, mouthWidth: 0.21, mouthCurve: 0 }),
415
- f({ eyeType: 20, eyeScale: 0.8, eyeGap: 21.67, eyeY: 43.33, mouthType: 1, mouthY: 55, mouthWidth: 0.21, mouthCurve: 0, bob: -2 })
415
+ $({ eyeType: 20, eyeScale: 0.8, eyeGap: 21.67, eyeY: 43.33, mouthType: 1, mouthY: 55, mouthWidth: 0.21, mouthCurve: 0 }),
416
+ $({ eyeType: 20, eyeScale: 0.8, eyeGap: 21.67, eyeY: 43.33, mouthType: 1, mouthY: 55, mouthWidth: 0.21, mouthCurve: 0, bob: -2 })
416
417
  ],
417
418
  near: [
418
- f({ eyeType: 20, eyeScale: 0.8, eyeGap: 21.67, eyeY: 43.33, mouthType: 1, mouthY: 55, mouthWidth: 0.21, mouthCurve: 0, bob: -3 })
419
+ $({ eyeType: 20, eyeScale: 0.8, eyeGap: 21.67, eyeY: 43.33, mouthType: 1, mouthY: 55, mouthWidth: 0.21, mouthCurve: 0, bob: -3 })
419
420
  ],
420
421
  hover: [
421
- f({ eyeType: 20, eyeScale: 0.8, eyeGap: 21.67, eyeY: 43.33, mouthType: 1, mouthY: 55, mouthWidth: 0.21, mouthCurve: 0, bob: -5 })
422
+ $({ eyeType: 20, eyeScale: 0.8, eyeGap: 21.67, eyeY: 43.33, mouthType: 1, mouthY: 55, mouthWidth: 0.21, mouthCurve: 0, bob: -5 })
422
423
  ],
423
424
  click: [
424
- f({ eyeType: 20, eyeScale: 0.8, eyeGap: 21.67, eyeY: 43.33, mouthType: 1, mouthY: 55, mouthWidth: 0.21, mouthCurve: 0, bob: -8 })
425
+ $({ eyeType: 20, eyeScale: 0.8, eyeGap: 21.67, eyeY: 43.33, mouthType: 1, mouthY: 55, mouthWidth: 0.21, mouthCurve: 0, bob: -8 })
425
426
  ]
426
427
  }
427
- }, mt = {
428
+ }, Pt = {
428
429
  name: "void",
429
430
  emotion: "numbness",
430
431
  baseColor: "#D9C6E0",
@@ -440,92 +441,123 @@ const Re = {
440
441
  },
441
442
  expressions: {
442
443
  idle: [
443
- f({ eyeType: 20, eyeScale: 0.75, eyeGap: 23.33, eyeY: 44.17, mouthType: 3, mouthY: 56.67, mouthWidth: 0.33, mouthCurve: 0 }),
444
- f({ eyeType: 20, eyeScale: 0.75, eyeGap: 23.33, eyeY: 44.17, mouthType: 3, mouthY: 56.67, mouthWidth: 0.33, mouthCurve: 0, bob: 1 })
444
+ $({ eyeType: 20, eyeScale: 0.75, eyeGap: 23.33, eyeY: 44.17, mouthType: 3, mouthY: 56.67, mouthWidth: 0.33, mouthCurve: 0 }),
445
+ $({ eyeType: 20, eyeScale: 0.75, eyeGap: 23.33, eyeY: 44.17, mouthType: 3, mouthY: 56.67, mouthWidth: 0.33, mouthCurve: 0, bob: 1 })
445
446
  ],
446
447
  near: [
447
- f({ eyeType: 20, eyeScale: 0.75, eyeGap: 23.33, eyeY: 44.17, mouthType: 3, mouthY: 56.67, mouthWidth: 0.33, mouthCurve: 0, bob: 2 })
448
+ $({ eyeType: 20, eyeScale: 0.75, eyeGap: 23.33, eyeY: 44.17, mouthType: 3, mouthY: 56.67, mouthWidth: 0.33, mouthCurve: 0, bob: 2 })
448
449
  ],
449
450
  hover: [
450
- f({ eyeType: 20, eyeScale: 0.75, eyeGap: 23.33, eyeY: 44.17, mouthType: 3, mouthY: 56.67, mouthWidth: 0.33, mouthCurve: 0, bob: 3 })
451
+ $({ eyeType: 20, eyeScale: 0.75, eyeGap: 23.33, eyeY: 44.17, mouthType: 3, mouthY: 56.67, mouthWidth: 0.33, mouthCurve: 0, bob: 3 })
451
452
  ],
452
453
  click: [
453
- f({ eyeType: 20, eyeScale: 0.75, eyeGap: 23.33, eyeY: 44.17, mouthType: 3, mouthY: 56.67, mouthWidth: 0.33, mouthCurve: 0, bob: 4.5 })
454
+ $({ eyeType: 20, eyeScale: 0.75, eyeGap: 23.33, eyeY: 44.17, mouthType: 3, mouthY: 56.67, mouthWidth: 0.33, mouthCurve: 0, bob: 4.5 })
454
455
  ]
455
456
  }
456
- }, oe = {
457
- mochi: Re,
458
- zumi: ot,
459
- suri: it,
460
- nima: st,
461
- cota: Ce,
462
- dozy: at,
463
- lumo: nt,
464
- fidge: rt,
465
- brix: lt,
466
- wilt: ct,
467
- knot: ht,
468
- snug: ut,
469
- pip: dt,
470
- void: mt
457
+ }, ne = {
458
+ mochi: rt,
459
+ zumi: Ft,
460
+ suri: kt,
461
+ nima: vt,
462
+ cota: De,
463
+ dozy: Ct,
464
+ lumo: wt,
465
+ fidge: Tt,
466
+ brix: St,
467
+ wilt: Yt,
468
+ knot: Et,
469
+ snug: At,
470
+ pip: zt,
471
+ void: Pt
471
472
  };
472
- function We(o) {
473
+ function et(o) {
473
474
  const t = o.toLowerCase();
474
- return oe[t] ? oe[t] : Object.values(oe).find((i) => i.emotion === t) || Re;
475
+ return ne[t] ? ne[t] : Object.values(ne).find((i) => i.emotion === t) || rt;
475
476
  }
476
- function yt(o, t = {}) {
477
- const { stiffness: e = 180, damping: i = 18, mass: n = 1 } = t, c = {
477
+ const tt = {
478
+ // Suave / Natural: balance equilibrado
479
+ smooth: { stiffness: 170, damping: 18, mass: 1 },
480
+ // Elástico / Rebote: oscilación amortiguada con rebote visible
481
+ bouncy: { stiffness: 280, damping: 8, mass: 0.8 },
482
+ // Snappy / Rápido: rápido y preciso sin rebote
483
+ snappy: { stiffness: 420, damping: 30, mass: 0.6 },
484
+ // Gentle / Lento: movimiento relajado y suave
485
+ gentle: { stiffness: 55, damping: 14, mass: 1.4 },
486
+ // Instantáneo: transición directa
487
+ instant: { stiffness: 99999, damping: 9999, mass: 1e-3 }
488
+ };
489
+ function Xt(o, t = {}) {
490
+ let { stiffness: e = 170, damping: i = 18, mass: a = 1 } = t;
491
+ const r = {
478
492
  current: o,
479
493
  target: o,
480
494
  velocity: 0
481
495
  };
482
496
  return {
483
- state: c,
484
- setTarget(a) {
485
- c.target = a;
497
+ state: r,
498
+ setConfig(n) {
499
+ n.stiffness !== void 0 && (e = n.stiffness), n.damping !== void 0 && (i = n.damping), n.mass !== void 0 && (a = n.mass);
500
+ },
501
+ setTarget(n) {
502
+ r.target = n;
486
503
  },
487
- setCurrent(a) {
488
- c.current = a, c.target = a, c.velocity = 0;
504
+ setCurrent(n) {
505
+ r.current = n, r.target = n, r.velocity = 0;
489
506
  },
490
- update(a) {
491
- const $ = a / 4;
492
- let b = !1;
507
+ update(n) {
508
+ const f = n / 4;
509
+ let y = !1;
493
510
  for (let d = 0; d < 4; d++) {
494
- const M = c.current - c.target, v = -e * M, Y = -i * c.velocity, A = (v + Y) / n;
495
- c.velocity += A * $, c.current += c.velocity * $, (Math.abs(c.velocity) > 1e-4 || Math.abs(c.current - c.target) > 1e-4) && (b = !0);
511
+ const x = r.current - r.target, M = -e * x, T = -i * r.velocity, E = (M + T) / a;
512
+ r.velocity += E * f, r.current += r.velocity * f, (Math.abs(r.velocity) > 1e-4 || Math.abs(r.current - r.target) > 1e-4) && (y = !0);
496
513
  }
497
- return b || (c.current = c.target, c.velocity = 0), b;
514
+ return y || (r.current = r.target, r.velocity = 0), y;
498
515
  }
499
516
  };
500
517
  }
501
- function ft(o, t) {
518
+ const Dt = /* @__PURE__ */ new Set(["eyeType", "mouthType", "cascadeTears", "showBrows"]);
519
+ function Lt(o, t) {
502
520
  const e = Object.keys(o), i = {};
503
- for (const n of e)
504
- i[n] = yt(o[n], t);
521
+ let a = null;
522
+ for (const r of e)
523
+ i[r] = Xt(o[r], t);
505
524
  return {
506
525
  getValues() {
507
- const n = {};
508
- for (const c of e)
509
- n[c] = i[c].state.current;
510
- return n;
526
+ const r = {};
527
+ for (const n of e)
528
+ r[n] = i[n].state.current;
529
+ return r;
511
530
  },
512
- setTargets(n) {
513
- for (const c in n)
514
- c in i && i[c].setTarget(n[c]);
531
+ setConfig(r) {
532
+ if (typeof r == "string") {
533
+ a = r;
534
+ const n = tt[r] || tt.smooth;
535
+ for (const c of e)
536
+ i[c].setConfig(n);
537
+ } else {
538
+ a = null;
539
+ for (const n of e)
540
+ i[n].setConfig(r);
541
+ }
515
542
  },
516
- setValues(n) {
517
- for (const c in n)
518
- c in i && i[c].setCurrent(n[c]);
543
+ setTargets(r) {
544
+ const n = a === "instant";
545
+ for (const c in r)
546
+ c in i && (n || Dt.has(c) ? i[c].setCurrent(r[c]) : i[c].setTarget(r[c]));
519
547
  },
520
- update(n) {
521
- let c = !1;
522
- for (const a of e)
523
- i[a].update(n) && (c = !0);
524
- return c;
548
+ setValues(r) {
549
+ for (const n in r)
550
+ n in i && i[n].setCurrent(r[n]);
551
+ },
552
+ update(r) {
553
+ let n = !1;
554
+ for (const c of e)
555
+ i[c].update(r) && (n = !0);
556
+ return n;
525
557
  }
526
558
  };
527
559
  }
528
- function pt(o, t) {
560
+ function It(o, t) {
529
561
  const e = { ...o };
530
562
  switch (t) {
531
563
  case "sleeping":
@@ -603,10 +635,11 @@ function pt(o, t) {
603
635
  }
604
636
  return e;
605
637
  }
606
- class $t {
607
- constructor() {
608
- g(this, "currentState", "idle");
609
- g(this, "lastIndices", {});
638
+ class lt {
639
+ constructor(t = "idle") {
640
+ v(this, "currentState");
641
+ v(this, "lastIndices", {});
642
+ this.currentState = t;
610
643
  }
611
644
  getState() {
612
645
  return this.currentState;
@@ -665,7 +698,7 @@ class $t {
665
698
  i = t[e] || t.idle;
666
699
  break;
667
700
  }
668
- return i.map((n) => pt(n, e));
701
+ return i.map((a) => It(a, e));
669
702
  }
670
703
  pickVariant(t, e = this.currentState) {
671
704
  if (!t || t.length === 0)
@@ -673,17 +706,20 @@ class $t {
673
706
  if (t.length === 1)
674
707
  return this.lastIndices[e] = 0, t[0];
675
708
  const i = this.lastIndices[e] ?? -1;
676
- let n = Math.floor(Math.random() * t.length);
677
- for (; n === i; )
678
- n = Math.floor(Math.random() * t.length);
679
- return this.lastIndices[e] = n, t[n];
709
+ let a = Math.floor(Math.random() * t.length);
710
+ for (; a === i; )
711
+ a = Math.floor(Math.random() * t.length);
712
+ return this.lastIndices[e] = a, t[a];
680
713
  }
681
714
  }
682
- class bt {
715
+ function Do(o = "idle") {
716
+ return new lt(o);
717
+ }
718
+ class Gt {
683
719
  constructor() {
684
- g(this, "callbacks", /* @__PURE__ */ new Set());
685
- g(this, "handle", null);
686
- g(this, "lastTime", 0);
720
+ v(this, "callbacks", /* @__PURE__ */ new Set());
721
+ v(this, "handle", null);
722
+ v(this, "lastTime", 0);
687
723
  }
688
724
  add(t) {
689
725
  this.callbacks.add(t), this.handle || (this.lastTime = performance.now(), this.tick = this.tick.bind(this), this.handle = requestAnimationFrame(this.tick));
@@ -699,16 +735,238 @@ class bt {
699
735
  this.lastTime = t, this.callbacks.forEach((i) => i(e)), this.callbacks.size > 0 ? this.handle = requestAnimationFrame(this.tick) : this.handle = null;
700
736
  }
701
737
  }
702
- const O = new bt();
703
- function Ne(o = 2.2, t = 0.25) {
738
+ const B = new Gt();
739
+ function ct(o = 2.2, t = 0.25) {
704
740
  const e = [], i = o * Math.PI * 2;
705
- for (let n = 0; n <= i; n += t) {
706
- const c = n / i;
707
- e.push([Math.cos(n) * c, Math.sin(n) * c]);
741
+ for (let a = 0; a <= i; a += t) {
742
+ const r = a / i;
743
+ e.push([Math.cos(a) * r, Math.sin(a) * r]);
708
744
  }
709
745
  return e;
710
746
  }
711
- function gt(o) {
747
+ const ae = 64, ht = Math.PI * 2, j = Array.from({ length: ae }, (o, t) => t / ae * ht), ce = j.map(Math.cos), $e = j.map(Math.sin), le = (o) => Math.round(o * 100) / 100, Lo = (o, t = 0, e = 1) => o < t ? t : o > e ? e : o, Wt = (o, t, e) => o + (t - o) * e;
748
+ function Ot(o, t = 1, e = 1) {
749
+ return j.map((i, a) => {
750
+ const r = Math.abs((ce[a] ?? 0) / t) ** o, n = Math.abs(($e[a] ?? 0) / e) ** o;
751
+ return (r + n) ** (-1 / o);
752
+ });
753
+ }
754
+ function I(o, t = 1) {
755
+ const e = Math.max(...o);
756
+ if (e <= 0) return o;
757
+ const i = t / e;
758
+ return o.map((a) => a * i);
759
+ }
760
+ function Le(o, t = 0, e = 0) {
761
+ const i = new Array(ae).fill(1), a = o.length;
762
+ for (let r = 0; r < ae; r++) {
763
+ const n = ce[r] ?? 0, c = $e[r] ?? 0;
764
+ let f = 0;
765
+ for (let y = 0; y < a; y++) {
766
+ const d = o[y], x = o[(y + 1) % a], M = x.x - d.x, T = x.y - d.y, E = n * T - c * M;
767
+ if (Math.abs(E) < 1e-9) continue;
768
+ const R = d.x - t, z = d.y - e, Z = (R * T - z * M) / E, G = (R * c - z * n) / E;
769
+ Z > f && G >= 0 && G <= 1 && (f = Z);
770
+ }
771
+ i[r] = f || 1;
772
+ }
773
+ return i;
774
+ }
775
+ function _e(o, t, e, i, a, r, n = 96) {
776
+ const c = i - o, f = a - t, y = Math.hypot(c, f) || 1e-6, d = Math.atan2(f, c), x = Math.acos(Math.max(-1, Math.min(1, (e - r) / y))), M = [];
777
+ for (let T = 0; T <= n / 2; T++) {
778
+ const E = d + x + (ht - 2 * x) * T / (n / 2);
779
+ M.push({ x: o + Math.cos(E) * e, y: t + Math.sin(E) * e });
780
+ }
781
+ for (let T = 0; T <= n / 2; T++) {
782
+ const E = d - x + 2 * x * T / (n / 2);
783
+ M.push({ x: i + Math.cos(E) * r, y: a + Math.sin(E) * r });
784
+ }
785
+ return M;
786
+ }
787
+ function Bt(o, t, e, i, a) {
788
+ const r = 1 - a, n = r * r, c = a * a;
789
+ return {
790
+ x: n * r * o.x + 3 * n * a * t.x + 3 * r * c * e.x + c * a * i.x,
791
+ y: n * r * o.y + 3 * n * a * t.y + 3 * r * c * e.y + c * a * i.y
792
+ };
793
+ }
794
+ function jt() {
795
+ const o = [
796
+ [{ x: 50, y: 21.67 }, { x: 54.17, y: 17.5 }, { x: 65, y: 12.5 }, { x: 74.17, y: 16.67 }],
797
+ [{ x: 74.17, y: 16.67 }, { x: 85, y: 21.67 }, { x: 89.17, y: 35.83 }, { x: 85, y: 48.33 }],
798
+ [{ x: 85, y: 48.33 }, { x: 80.83, y: 61.67 }, { x: 66.67, y: 74.17 }, { x: 50, y: 74.17 }],
799
+ [{ x: 50, y: 74.17 }, { x: 33.33, y: 74.17 }, { x: 19.17, y: 61.67 }, { x: 15, y: 48.33 }],
800
+ [{ x: 15, y: 48.33 }, { x: 10.83, y: 35.83 }, { x: 15, y: 21.67 }, { x: 25.83, y: 16.67 }],
801
+ [{ x: 25.83, y: 16.67 }, { x: 35, y: 12.5 }, { x: 45.83, y: 17.5 }, { x: 50, y: 21.67 }]
802
+ ], t = [], e = 50, i = 46, a = 20;
803
+ for (const r of o)
804
+ for (let n = 0; n < a; n++) {
805
+ const c = Bt(r[0], r[1], r[2], r[3], n / a);
806
+ t.push({ x: (c.x - e) / 36, y: (c.y - i) / 36 });
807
+ }
808
+ return I(Le(t, 0, 0), 1.05);
809
+ }
810
+ const dt = {
811
+ // Círculo neutro
812
+ circle: new Array(ae).fill(1),
813
+ // Corazón
814
+ heart: jt(),
815
+ // Round Blob (Armónicos sutiles orgánicos)
816
+ "round-blob": I(
817
+ j.map((o) => 1 + 0.075 * Math.cos(2 * o + 0.5) + 0.035 * Math.cos(3 * o + 2.1)),
818
+ 1.02
819
+ ),
820
+ // Cápsula horizontal
821
+ capsule: I(
822
+ Le(_e(-0.45, 0, 0.62, 0.45, 0, 0.62), 0, 0),
823
+ 1.08
824
+ ),
825
+ // Squircle (Superelipse n=4.2)
826
+ "rounded-squircle": I(Ot(4.2), 1.12),
827
+ // Pera (Base ancha, parte superior cónica)
828
+ "pear-blob": I(
829
+ j.map((o) => 1 + 0.22 * Math.sin(o) + 0.08 * Math.cos(2 * o)),
830
+ 1.06
831
+ ),
832
+ // Huevo (Parte superior abovedada, base algo más compacta, proporción vertical exacta)
833
+ "egg-oval": I(
834
+ j.map((o, t) => {
835
+ const e = (ce[t] ?? 0) / 0.86, i = (($e[t] ?? 0) + 0.12 * (1 - Math.abs(ce[t] ?? 0))) / 1.16;
836
+ return Math.sqrt(e * e + i * i) ** -1;
837
+ }),
838
+ 1.08
839
+ ),
840
+ // Estrella / Puff (4 lóbulos hinchados)
841
+ "starburst-puff": I(
842
+ j.map((o) => 1 + 0.16 * Math.cos(4 * o)),
843
+ 1.08
844
+ ),
845
+ // Cápsula vertical (Píldora alta)
846
+ "pill-vertical": I(
847
+ Le(_e(0, -0.42, 0.6, 0, 0.42, 0.6), 0, 0),
848
+ 1.08
849
+ ),
850
+ // Fantasma (Cúpula arriba y ondas ruffle abajo)
851
+ "ghost-blob": I(
852
+ j.map((o) => {
853
+ const t = Math.sin(o), e = t > 0.2 ? 0.12 * Math.sin(o * 6) : 0;
854
+ return 1 + (t < 0 ? 0.08 : 0.02) + e;
855
+ }),
856
+ 1.06
857
+ ),
858
+ // Óvalo suave
859
+ oval: I(
860
+ j.map((o, t) => {
861
+ const e = (ce[t] ?? 0) / 1.15, i = ($e[t] ?? 0) / 0.9;
862
+ return Math.sqrt(e * e + i * i) ** -1;
863
+ }),
864
+ 1.05
865
+ ),
866
+ // Óvalo alargado
867
+ "elongated-oval": I(
868
+ j.map((o, t) => {
869
+ const e = (ce[t] ?? 0) / 1.25, i = ($e[t] ?? 0) / 0.82;
870
+ return Math.sqrt(e * e + i * i) ** -1;
871
+ }),
872
+ 1.08
873
+ ),
874
+ // Gota / Teardrop (Punta afilada arriba, base redonda abajo)
875
+ "teardrop-blob": I(
876
+ Le(_e(0, 0.26, 0.66, 0, -0.92, 0.06), 0, 0),
877
+ 1.08
878
+ ),
879
+ // Llama (3 crestas arriba, cuerpo curvo abajo)
880
+ "flame-blob": I(
881
+ j.map((o) => 1 + (Math.sin(o) < 0 ? 0.24 * Math.abs(Math.sin(o * 2.5)) : -0.04 * Math.cos(o * 2))),
882
+ 1.08
883
+ ),
884
+ // Droopy / Wilt (Caído)
885
+ "droopy-blob": I(
886
+ j.map((o) => {
887
+ const t = Math.sin(o);
888
+ return 1 + 0.18 * Math.max(0, t) - 0.08 * Math.max(0, -t);
889
+ }),
890
+ 1.05
891
+ ),
892
+ // Spiky blob
893
+ "spiky-blob": I(
894
+ j.map((o) => 1 + 0.18 * Math.sin(8 * o)),
895
+ 1.06
896
+ ),
897
+ // Cloud blob
898
+ "cloud-blob": I(
899
+ j.map((o) => 1 + 0.14 * Math.sin(5 * o + 0.4)),
900
+ 1.06
901
+ ),
902
+ // Wide oval
903
+ "wide-oval": I(
904
+ j.map((o, t) => {
905
+ const e = (ce[t] ?? 0) / 1.28, i = ($e[t] ?? 0) / 0.78;
906
+ return Math.sqrt(e * e + i * i) ** -1;
907
+ }),
908
+ 1.08
909
+ ),
910
+ // Soft round
911
+ "soft-round": I(
912
+ j.map((o) => 1 + 0.04 * Math.cos(4 * o)),
913
+ 1.02
914
+ ),
915
+ // Octopus blob
916
+ "octopus-blob": I(
917
+ j.map((o) => 1 + (Math.sin(o) > 0.3 ? 0.15 * Math.sin(o * 7) : 0)),
918
+ 1.06
919
+ ),
920
+ // Wave blob
921
+ "wave-blob": I(
922
+ j.map((o) => 1 + 0.12 * Math.sin(3 * o + 0.8)),
923
+ 1.04
924
+ ),
925
+ // Bear blob (Cuerpo redondeado con dos orejitas en -45° y -135°)
926
+ "bear-blob": I(
927
+ j.map((o) => {
928
+ const t = Math.exp(-Math.pow(Math.atan2(Math.sin(o - -Math.PI * 0.25), Math.cos(o - -Math.PI * 0.25)), 2) / 0.12) * 0.35, e = Math.exp(-Math.pow(Math.atan2(Math.sin(o - -Math.PI * 0.75), Math.cos(o - -Math.PI * 0.75)), 2) / 0.12) * 0.35;
929
+ return 1 + t + e;
930
+ }),
931
+ 1.12
932
+ )
933
+ };
934
+ function ot(o) {
935
+ return Rt.get(o) || dt.circle;
936
+ }
937
+ const Rt = new Map(
938
+ Object.entries(dt)
939
+ );
940
+ function Zt(o, t, e) {
941
+ const i = new Array(ae);
942
+ for (let a = 0; a < ae; a++)
943
+ i[a] = Wt(o[a] ?? 1, t[a] ?? 1, e);
944
+ return i;
945
+ }
946
+ function _t(o, t = 50, e = 50, i = 37, a = 1, r = 1) {
947
+ const n = new Array(ae);
948
+ for (let c = 0; c < ae; c++) {
949
+ const f = (o[c] ?? 1) * i, y = t + (ce[c] ?? 0) * f * a, d = e + ($e[c] ?? 0) * f * r;
950
+ n[c] = { x: y, y: d };
951
+ }
952
+ return n;
953
+ }
954
+ function Nt(o, t = 1 / 6) {
955
+ const e = o.length;
956
+ if (e < 3) return "";
957
+ const i = o[0];
958
+ let a = `M ${le(i.x)} ${le(i.y)}`;
959
+ for (let r = 0; r < e; r++) {
960
+ const n = o[(r - 1 + e) % e], c = o[r], f = o[(r + 1) % e], y = o[(r + 2) % e], d = c.x + (f.x - n.x) * t, x = c.y + (f.y - n.y) * t, M = f.x - (y.x - c.x) * t, T = f.y - (y.y - c.y) * t;
961
+ a += ` C ${le(d)} ${le(x)} ${le(M)} ${le(T)} ${le(f.x)} ${le(f.y)}`;
962
+ }
963
+ return `${a} Z`;
964
+ }
965
+ function qt(o, t = 50, e = 50, i = 37) {
966
+ const a = _t(o, t, e, i);
967
+ return Nt(a);
968
+ }
969
+ function Qt(o) {
712
970
  switch (o) {
713
971
  case "circle":
714
972
  return "M 50 13 A 37 37 0 1 0 50 87 A 37 37 0 1 0 50 13 Z";
@@ -747,7 +1005,7 @@ function gt(o) {
747
1005
  case "cloud-blob":
748
1006
  return "M 50 12.5 C 60 9.17 69.17 15.83 71.67 21.67 C 79.17 24.17 83.33 32.5 80.83 40 C 85.83 47.5 83.33 57.5 78.33 61.67 C 76.67 70.83 68.33 76.67 60 74.17 C 53.33 80 42.5 80 35.83 74.17 C 27.5 76.67 20 70 18.33 61.67 C 13.33 56.67 11.67 47.5 16.67 40 C 14.17 32.5 20 24.17 27.5 21.67 C 30.83 15 40 9.17 50 12.5 Z";
749
1007
  case "wide-oval":
750
- return "M 50 20.83 C 73.33 20.83 87.5 31.67 87.5 47.5 C 87.5 64.17 73.33 75.83 50 75.83 C 26.67 75.83 12.5 64.17 12.5 47.5 C 12.5 31.67 26.67 20.83 50 20.83 Z";
1008
+ return "M 50 25 C 74 25 88 35 88 56 C 88 74 72 82 50 82 C 28 82 12 74 12 56 C 12 35 26 25 50 25 Z";
751
1009
  case "soft-round":
752
1010
  return "M 50 15 C 73.33 15 85 26.67 85 48.33 C 85 70 73.33 80 50 80 C 26.67 80 15 70 15 48.33 C 15 26.67 26.67 15 50 15 Z";
753
1011
  case "octopus-blob":
@@ -758,398 +1016,428 @@ function gt(o) {
758
1016
  return "M 50 12 C 78 12 90 26 90 52 C 90 78 78 88 50 88 C 22 88 10 78 10 52 C 10 26 22 12 50 12 Z";
759
1017
  }
760
1018
  }
761
- const Mt = "M -4 2 C 2 2 5 -2 1 -5 C -3 -8 -10 -6 -10 -1 C -10 5 -2 8 4 4 C 9 1 7 -6 0 -7";
762
- function vt(o, t, e, i, n, c = "") {
763
- return `<g transform="translate(${o.toFixed(2)}, ${t.toFixed(2)}) scale(${e.toFixed(3)})" ${c}>
764
- <path d="${Mt}" stroke="${i}" stroke-width="${(n / e).toFixed(2)}" stroke-linecap="round" stroke-linejoin="round" fill="none" />
1019
+ const Vt = "M -4 2 C 2 2 5 -2 1 -5 C -3 -8 -10 -6 -10 -1 C -10 5 -2 8 4 4 C 9 1 7 -6 0 -7";
1020
+ function Ht(o, t, e, i, a, r = "") {
1021
+ return `<g transform="translate(${o.toFixed(2)}, ${t.toFixed(2)}) scale(${e.toFixed(3)})" ${r}>
1022
+ <path d="${Vt}" stroke="${i}" stroke-width="${(a / e).toFixed(2)}" stroke-linecap="round" stroke-linejoin="round" fill="none" />
765
1023
  </g>`;
766
1024
  }
767
- function _e(o, t, e, i, n = {}, c = 0) {
768
- const a = c || (typeof performance < "u" ? performance.now() / 1e3 : Date.now() / 1e3), h = "#2C2C2A", $ = "#F0997B", b = 3.5, M = gt(o).split(/(?=M )/).map((r) => r.trim()).filter(Boolean).map((r) => `<path d="${r}" fill="${t}" />`).join(""), { flipX: v = !1, emphasis: Y = !1 } = n, A = Math.max(-13.2, Math.min(13.2, e.gazeX ?? 0)), B = Math.max(-8.4, Math.min(8.4, e.gazeY ?? 0)), X = (e.eyeGap ?? 32) / 2, G = (e.eyeY ?? 45) + B, Z = 50 - X + A, _ = 50 + X + A, J = 40, ae = 50 + (e.shiftX ?? 0), K = e.turnAngle ?? 0, ie = (r) => {
769
- const l = r - ae, k = Math.max(-J, Math.min(J, l)), C = Math.asin(k / J), L = C + K, p = Math.cos(L), z = p > 0, P = ae + J * Math.sin(L), T = z ? Math.max(0, p / Math.cos(C)) : 0;
770
- return { projX: P, scaleX: T, isVisible: z };
771
- }, I = ie(Z), E = ie(_), s = (e.eyeScale ?? 1) * (Y ? 1.15 : 1), Se = Math.round(e.eyeType ?? 0);
772
- let le = "", fe = "";
773
- const ce = (r, l, k, C) => {
774
- if (k <= 0.01) return "";
775
- const L = s * k, p = `transform="translate(${r}, ${l}) scale(${k.toFixed(2)}, 1) translate(${-r}, ${-l})"`;
776
- switch (Se) {
1025
+ function ut(o, t, e, i, a = {}, r = 0) {
1026
+ const n = r || (typeof performance < "u" ? performance.now() / 1e3 : Date.now() / 1e3), c = "#2C2C2A", f = "#F0997B", y = 3.5;
1027
+ let d = "";
1028
+ a.radii && a.radii.length > 0 ? d = `<path class="wissive-silhouette-path" d="${qt(a.radii)}" fill="${t}" />` : d = Qt(o).split(/(?=M )/).map((l) => l.trim()).filter(Boolean).map((l) => `<path class="wissive-silhouette-path" d="${l}" fill="${t}" />`).join("");
1029
+ const { flipX: x = !1, emphasis: M = !1 } = a, T = Math.max(-13.2, Math.min(13.2, e.gazeX ?? 0)), E = Math.max(-8.4, Math.min(8.4, e.gazeY ?? 0)), R = (e.eyeGap ?? 32) / 2, z = (e.eyeY ?? 45) + E, Z = 50 - R + T, G = 50 + R + T, _ = 40, he = 50 + (e.shiftX ?? 0), xe = e.turnAngle ?? 0, K = (s) => {
1030
+ const l = s - he, C = Math.max(-_, Math.min(_, l)), S = Math.asin(C / _), w = S + xe, b = Math.cos(w), V = b > 0, ee = he + _ * Math.sin(w), k = V ? Math.max(0, b / Math.cos(S)) : 0;
1031
+ return { projX: ee, scaleX: k, isVisible: V };
1032
+ }, W = K(Z), D = K(G), h = (e.eyeScale ?? 1) * (M ? 1.15 : 1), L = Math.round(e.eyeType ?? 0);
1033
+ let we = "", Me = "";
1034
+ const Te = (s, l, C, S) => {
1035
+ if (C <= 0.01) return "";
1036
+ const w = h * C, b = `transform="translate(${s}, ${l}) scale(${C.toFixed(2)}, 1) translate(${-s}, ${-l})"`;
1037
+ switch (L) {
777
1038
  case 1:
778
- return `<g ${p}><path d="M ${r - 5.83 * s} ${l + 1.67 * s} Q ${r} ${l - 5.83 * s} ${r + 5.83 * s} ${l + 1.67 * s}" stroke="${h}" stroke-width="${b}" stroke-linecap="round" fill="none" /></g>`;
1039
+ return `<g ${b}><path d="M ${s - 5.83 * h} ${l + 2.5 * h} Q ${s} ${l - 5.83 * h} ${s + 5.83 * h} ${l + 2.5 * h}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" fill="none" /></g>`;
779
1040
  case 2:
780
- return C ? `<g ${p}><path d="M ${r + 3.33 * s} ${l - 5 * s} L ${r - 3.33 * s} ${l} L ${r + 3.33 * s} ${l + 5 * s}" stroke="${h}" stroke-width="${b}" stroke-linecap="round" stroke-linejoin="round" fill="none" /></g>` : `<g ${p}><path d="M ${r - 3.33 * s} ${l - 5 * s} L ${r + 3.33 * s} ${l} L ${r - 3.33 * s} ${l + 5 * s}" stroke="${h}" stroke-width="${b}" stroke-linecap="round" stroke-linejoin="round" fill="none" /></g>`;
1041
+ return S ? `<g ${b}><path d="M ${s - 5 * h} ${l - 5 * h} L ${s + 4.17 * h} ${l} L ${s - 5 * h} ${l + 5 * h}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" stroke-linejoin="round" fill="none" /></g>` : `<g ${b}><path d="M ${s + 5 * h} ${l - 5 * h} L ${s - 4.17 * h} ${l} L ${s + 5 * h} ${l + 5 * h}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" stroke-linejoin="round" fill="none" /></g>`;
781
1042
  case 3:
782
- return C ? `<g ${p}><line x1="${r - 5 * s}" y1="${l + 3 * s}" x2="${r + 5 * s}" y2="${l - 3 * s}" stroke="${h}" stroke-width="3.2" stroke-linecap="round" /></g>` : `<g ${p}><line x1="${r - 5 * s}" y1="${l - 3 * s}" x2="${r + 5 * s}" y2="${l + 3 * s}" stroke="${h}" stroke-width="3.2" stroke-linecap="round" /></g>`;
1043
+ return S ? `<g ${b}><path d="M ${s - 5.83 * h} ${l - 4.17 * h} L ${s + 5 * h} ${l + 4.17 * h}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" fill="none" /></g>` : `<g ${b}><path d="M ${s + 5.83 * h} ${l - 4.17 * h} L ${s - 5 * h} ${l + 4.17 * h}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" fill="none" /></g>`;
783
1044
  case 4:
784
- return C ? `<g ${p}><line x1="${r - 5 * s}" y1="${l - 3 * s}" x2="${r + 5 * s}" y2="${l + 3 * s}" stroke="${h}" stroke-width="3.2" stroke-linecap="round" /></g>` : `<g ${p}><line x1="${r - 5 * s}" y1="${l + 3 * s}" x2="${r + 5 * s}" y2="${l - 3 * s}" stroke="${h}" stroke-width="3.2" stroke-linecap="round" /></g>`;
1045
+ return S ? `<g ${b}><path d="M ${s - 5 * h} ${l + 4.17 * h} L ${s + 5.83 * h} ${l - 4.17 * h}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" fill="none" /></g>` : `<g ${b}><path d="M ${s + 5 * h} ${l + 4.17 * h} L ${s - 5.83 * h} ${l - 4.17 * h}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" fill="none" /></g>`;
785
1046
  case 5:
786
- return `<g ${p}>
787
- <ellipse cx="${r}" cy="${l}" rx="${5 * s}" ry="${5.83 * s}" fill="#ffffff" />
788
- <circle cx="${r}" cy="${l + 0.83 * s}" r="${2.17 * s}" fill="${h}" />
1047
+ return `<g ${b}>
1048
+ <ellipse cx="${s}" cy="${l}" rx="${3.33 * w}" ry="${3.33 * w}" fill="${c}" />
1049
+ <circle cx="${s - 1.25 * h}" cy="${l - 1.25 * h}" r="${1.25 * h}" fill="#FFFFFF" />
789
1050
  </g>`;
790
- case 6:
791
- return `<g ${p} fill="#E3536C"><path d="M ${r} ${l + 5 * s} C ${r - 8 * s} ${l - 2 * s} ${r - 5 * s} ${l - 7 * s} ${r} ${l - 3 * s} C ${r + 5 * s} ${l - 7 * s} ${r + 8 * s} ${l - 2 * s} ${r} ${l + 5 * s} Z" /></g>`;
792
- case 7:
793
- return `<g ${p} stroke="${h}" stroke-width="3.2">
794
- <line x1="${r - 4.5 * s}" y1="${l - 4.5 * s}" x2="${r + 4.5 * s}" y2="${l + 4.5 * s}" stroke-linecap="round" />
795
- <line x1="${r - 4.5 * s}" y1="${l + 4.5 * s}" x2="${r + 4.5 * s}" y2="${l - 4.5 * s}" stroke-linecap="round" />
1051
+ case 6: {
1052
+ const k = 5.5 * h;
1053
+ return `<g ${b}><path d="M ${s} ${l + k * 0.7} C ${s - k * 1.1} ${l - k * 0.1} ${s - k * 0.9} ${l - k * 0.9} ${s} ${l - k * 0.35} C ${s + k * 0.9} ${l - k * 0.9} ${s + k * 1.1} ${l - k * 0.1} ${s} ${l + k * 0.7} Z" fill="#E84855" /></g>`;
1054
+ }
1055
+ case 7: {
1056
+ const k = 4.2 * h;
1057
+ return `<g ${b}>
1058
+ <line x1="${s - k}" y1="${l - k}" x2="${s + k}" y2="${l + k}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" />
1059
+ <line x1="${s + k}" y1="${l - k}" x2="${s - k}" y2="${l + k}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" />
796
1060
  </g>`;
797
- case 8:
798
- return `<g ${p} stroke="${h}" stroke-width="2.8" stroke-linecap="round">
799
- <line x1="${r - 5 * s}" y1="${l - 2}" x2="${r + 5 * s}" y2="${l - 2}" />
800
- <line x1="${r - 5 * s}" y1="${l + 2}" x2="${r + 5 * s}" y2="${l + 2}" />
1061
+ }
1062
+ case 8: {
1063
+ const k = 5 * h;
1064
+ return `<g ${b}>
1065
+ <line x1="${s - k}" y1="${l - 2.2 * h}" x2="${s + k}" y2="${l - 2.2 * h}" stroke="${c}" stroke-width="${y * 0.8}" stroke-linecap="round" />
1066
+ <line x1="${s - k}" y1="${l + 2.2 * h}" x2="${s + k}" y2="${l + 2.2 * h}" stroke="${c}" stroke-width="${y * 0.8}" stroke-linecap="round" />
801
1067
  </g>`;
1068
+ }
802
1069
  case 9:
803
- return C ? "" : `<g transform="translate(0, 0)">
804
- <path d="M ${I.projX - 12} ${l - 2} L ${E.projX + 12} ${l - 2}" stroke="${h}" stroke-width="2.8" />
805
- <rect x="${I.projX - 9}" y="${l - 6}" width="16" height="12" rx="3" fill="${h}" />
806
- <rect x="${E.projX - 7}" y="${l - 6}" width="16" height="12" rx="3" fill="${h}" />
1070
+ return `<g ${b}>
1071
+ <circle cx="${s}" cy="${l}" r="${5.8 * h}" fill="none" stroke="${c}" stroke-width="2.6" />
1072
+ ${S ? `<line x1="${s - 5.8 * h}" y1="${l}" x2="${s - 10 * h}" y2="${l}" stroke="${c}" stroke-width="2.6" stroke-linecap="round" />` : ""}
807
1073
  </g>`;
808
1074
  case 10:
809
- return C ? `<g ${p}><circle cx="${r}" cy="${l}" r="${3.2 * s}" fill="${h}" /></g>` : `<g ${p}><ellipse cx="${r}" cy="${l}" rx="${6 * s}" ry="${8 * s}" fill="${h}" /></g>`;
1075
+ return S ? `<g ${b}><path d="M ${s - 5.83 * h} ${l + 1 * h} Q ${s} ${l - 5 * h} ${s + 5.83 * h} ${l + 1 * h}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" fill="none" /></g>` : `<ellipse cx="${s.toFixed(2)}" cy="${l.toFixed(2)}" rx="${(2.83 * w).toFixed(2)}" ry="${Math.max(0.5, 2.83 * w * Math.max(0.05, e.eyeOpen)).toFixed(2)}" fill="${c}" />`;
810
1076
  case 11:
811
- return C ? `<g ${p}><circle cx="${r}" cy="${l}" r="${4.2 * s}" fill="${h}" /></g>` : `<g ${p}><line x1="${r - 5 * s}" y1="${l}" x2="${r + 5 * s}" y2="${l}" stroke="${h}" stroke-width="3.2" stroke-linecap="round" /></g>`;
1077
+ return S ? `<g ${b}><line x1="${s - 5 * h}" y1="${l}" x2="${s + 5 * h}" y2="${l}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" /></g>` : `<ellipse cx="${s.toFixed(2)}" cy="${l.toFixed(2)}" rx="${(2.83 * w).toFixed(2)}" ry="${(2.83 * w).toFixed(2)}" fill="${c}" />`;
812
1078
  case 12:
813
- return `<g ${p}>
814
- <ellipse cx="${r}" cy="${l}" rx="${3 * s}" ry="${6 * s}" fill="${h}" />
815
- </g>`;
1079
+ return `<ellipse cx="${s.toFixed(2)}" cy="${l.toFixed(2)}" rx="${(2.2 * w).toFixed(2)}" ry="${(5.5 * w).toFixed(2)}" fill="${c}" />`;
816
1080
  case 13:
817
- return `<g ${p}><circle cx="${r}" cy="${l}" r="${6.5 * s}" fill="${h}" /></g>`;
1081
+ return `<circle cx="${s.toFixed(2)}" cy="${l.toFixed(2)}" r="${(4.5 * w).toFixed(2)}" fill="${c}" />`;
818
1082
  case 14:
819
- return `<g ${p}><path d="M ${r - 5.83 * s} ${l - 1.67 * s} Q ${r} ${l + 5.83 * s} ${r + 5.83 * s} ${l - 1.67 * s}" stroke="${h}" stroke-width="${b}" stroke-linecap="round" fill="none" /></g>`;
1083
+ return `<g ${b}><path d="M ${s - 5.83 * h} ${l - 1.67 * h} Q ${s} ${l + 5.83 * h} ${s + 5.83 * h} ${l - 1.67 * h}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" fill="none" /></g>`;
820
1084
  case 15:
821
- return C ? `<g ${p}><path d="M ${r + 6.67 * s} ${l + 2.5 * s} Q ${r} ${l - 5 * s} ${r - 6.67 * s} ${l - 0.83 * s}" stroke="${h}" stroke-width="${b}" stroke-linecap="round" fill="none" /></g>` : `<g ${p}><path d="M ${r - 6.67 * s} ${l + 2.5 * s} Q ${r} ${l - 5 * s} ${r + 6.67 * s} ${l - 0.83 * s}" stroke="${h}" stroke-width="${b}" stroke-linecap="round" fill="none" /></g>`;
1085
+ return S ? `<g ${b}><path d="M ${s - 5.5 * h} ${l - 1.5 * h} Q ${s + 1 * h} ${l - 3 * h} ${s + 6 * h} ${l + 3 * h}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" fill="none" /></g>` : `<g ${b}><path d="M ${s + 5.5 * h} ${l - 1.5 * h} Q ${s - 1 * h} ${l - 3 * h} ${s - 6 * h} ${l + 3 * h}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" fill="none" /></g>`;
822
1086
  case 16:
823
- return `<g ${p}><path d="M ${r} ${l - 4.17 * s} L ${r} ${l + 3.33 * s}" stroke="${h}" stroke-width="${b}" stroke-linecap="round" fill="none" /></g>`;
1087
+ return `<g ${b}><path d="M ${s} ${l - 4.17 * h} L ${s} ${l + 3.33 * h}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" fill="none" /></g>`;
824
1088
  case 17:
825
- return C ? `<g ${p}><path d="M ${r + 5.83 * s} ${l - 6.67 * s} L ${r - 5 * s} ${l + 0.83 * s}" stroke="${h}" stroke-width="${b}" stroke-linecap="round" fill="none" /></g>` : `<g ${p}><path d="M ${r - 5.83 * s} ${l - 6.67 * s} L ${r + 5 * s} ${l + 0.83 * s}" stroke="${h}" stroke-width="${b}" stroke-linecap="round" fill="none" /></g>`;
1089
+ return S ? `<g ${b}><path d="M ${s + 5.83 * h} ${l - 6.67 * h} L ${s - 5 * h} ${l + 0.83 * h}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" fill="none" /></g>` : `<g ${b}><path d="M ${s - 5.83 * h} ${l - 6.67 * h} L ${s + 5 * h} ${l + 0.83 * h}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" fill="none" /></g>`;
826
1090
  case 18: {
827
- const T = 4.6 * s, x = Ne().map(([D, ee], de) => {
828
- const H = (r + D * T).toFixed(2), te = (l + ee * T).toFixed(2);
829
- return `${de === 0 ? "M" : "L"} ${H} ${te}`;
1091
+ const k = 4.6 * h, P = ct().map(([A, J], me) => {
1092
+ const ye = (s + A * k).toFixed(2), te = (l + J * k).toFixed(2);
1093
+ return `${me === 0 ? "M" : "L"} ${ye} ${te}`;
830
1094
  }).join(" ");
831
- return `<g ${p}><path d="${x}" stroke="${h}" stroke-width="1.3" stroke-linecap="round" fill="none" /></g>`;
1095
+ return `<g ${b}><path d="${P}" stroke="${c}" stroke-width="1.3" stroke-linecap="round" fill="none" /></g>`;
832
1096
  }
833
1097
  case 19:
834
- return `<g ${p}>
835
- <circle cx="${r}" cy="${l}" r="${4.5 * s}" fill="none" stroke="${h}" stroke-width="2.63" />
836
- <path d="M ${r - 2.83 * s} ${l - 0.42 * s} Q ${r} ${l + 2.83 * s} ${r + 2.83 * s} ${l - 0.42 * s}" stroke="${h}" stroke-width="2.63" stroke-linecap="round" fill="none" />
1098
+ return `<g ${b}>
1099
+ <circle cx="${s}" cy="${l}" r="${4.5 * h}" fill="none" stroke="${c}" stroke-width="2.63" />
1100
+ <path d="M ${s - 2.83 * h} ${l - 0.42 * h} Q ${s} ${l + 2.83 * h} ${s + 2.83 * h} ${l - 0.42 * h}" stroke="${c}" stroke-width="2.63" stroke-linecap="round" fill="none" />
837
1101
  </g>`;
838
1102
  case 20:
839
- return `<g ${p}><circle cx="${r}" cy="${l}" r="${3.67 * s}" fill="none" stroke="${h}" stroke-width="2.8" /></g>`;
1103
+ return `<g ${b}><circle cx="${s}" cy="${l}" r="${3.67 * h}" fill="none" stroke="${c}" stroke-width="2.8" /></g>`;
840
1104
  case 21: {
841
- const T = 6 * s, x = T * 0.22, D = `M ${r} ${l - T} Q ${r + x} ${l - x} ${r + T} ${l} Q ${r + x} ${l + x} ${r} ${l + T} Q ${r - x} ${l + x} ${r - T} ${l} Q ${r - x} ${l - x} ${r} ${l - T} Z`;
842
- return `<g ${p}><path d="${D}" fill="${h}" /></g>`;
1105
+ const k = 6 * h, P = k * 0.45, J = [
1106
+ [s, l - k],
1107
+ [s + P * 0.59, l - P * 0.81],
1108
+ [s + k * 0.95, l - k * 0.31],
1109
+ [s + P * 0.95, l + P * 0.31],
1110
+ [s + k * 0.59, l + k * 0.81],
1111
+ [s, l + P],
1112
+ [s - k * 0.59, l + k * 0.81],
1113
+ [s - P * 0.95, l + P * 0.31],
1114
+ [s - k * 0.95, l - k * 0.31],
1115
+ [s - P * 0.59, l - P * 0.81]
1116
+ ].map((me, ye) => `${ye === 0 ? "M" : "L"} ${me[0].toFixed(2)} ${me[1].toFixed(2)}`).join(" ") + " Z";
1117
+ return `<g ${b}><path d="${J}" fill="${c}" /></g>`;
843
1118
  }
844
1119
  case 22:
845
- return `<g ${p}>
846
- <ellipse cx="${r}" cy="${l}" rx="${5.5 * s}" ry="${3.3 * s}" fill="#ffffff" stroke="${h}" stroke-width="1.4" />
847
- <circle cx="${r - 2.2 * s}" cy="${l}" r="${1.8 * s}" fill="${h}" />
848
- </g>`;
1120
+ return S ? `<g ${b}><path d="M ${s - 5 * h} ${l - 3 * h} L ${s + 4 * h} ${l - 3 * h} L ${s + 4 * h} ${l + 3 * h}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" stroke-linejoin="round" fill="none" /></g>` : `<g ${b}><path d="M ${s + 5 * h} ${l - 3 * h} L ${s - 4 * h} ${l - 3 * h} L ${s - 4 * h} ${l + 3 * h}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" stroke-linejoin="round" fill="none" /></g>`;
849
1121
  case 23:
850
- return C ? `<g ${p}><ellipse cx="${r}" cy="${l}" rx="${2.83 * s}" ry="${Math.max(0.5, 2.83 * s * Math.max(0.05, e.eyeOpen))}" fill="${h}" /></g>` : `<g ${p}><path d="M ${r - 5 * s} ${l} Q ${r} ${l + 4 * s} ${r + 5 * s} ${l}" stroke="${h}" stroke-width="${b}" stroke-linecap="round" fill="none" /></g>`;
851
- case 24: {
852
- const T = 4.2 * s, x = 5.8 * s;
853
- return `<g ${p}>
854
- <ellipse cx="${r}" cy="${l}" rx="${T}" ry="${x}" fill="${h}" />
855
- <circle cx="${r - T * 0.35}" cy="${l - x * 0.4}" r="${1.3 * s}" fill="#ffffff" />
1122
+ return S ? `<ellipse cx="${s.toFixed(2)}" cy="${l.toFixed(2)}" rx="${(2.83 * w).toFixed(2)}" ry="${Math.max(0.5, 2.83 * w * Math.max(0.05, e.eyeOpen)).toFixed(2)}" fill="${c}" />` : `<g ${b}><path d="M ${s - 5.83 * h} ${l + 1 * h} Q ${s} ${l - 5 * h} ${s + 5.83 * h} ${l + 1 * h}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" fill="none" /></g>`;
1123
+ case 24:
1124
+ return `<g ${b}>
1125
+ <ellipse cx="${s}" cy="${l}" rx="${4.2 * w}" ry="${4.8 * w}" fill="${c}" />
1126
+ <circle cx="${s - 1.5 * h}" cy="${l - 1.8 * h}" r="${1.6 * h}" fill="#FFFFFF" />
1127
+ <circle cx="${s + 1.5 * h}" cy="${l + 1.5 * h}" r="${0.9 * h}" fill="#FFFFFF" />
856
1128
  </g>`;
857
- }
858
1129
  case 25:
859
- return C ? `<g ${p}>
860
- <path d="M ${r - 5 * s} ${l} Q ${r} ${l + 2 * s} ${r + 5 * s} ${l}" stroke="${h}" stroke-width="${b}" stroke-linecap="round" fill="none" />
861
- <line x1="${r + 5 * s}" y1="${l - 0.5 * s}" x2="${r + 7 * s}" y2="${l - 2.5 * s}" stroke="${h}" stroke-width="2" stroke-linecap="round" />
862
- </g>` : `<g ${p}>
863
- <path d="M ${r - 5 * s} ${l} Q ${r} ${l + 2 * s} ${r + 5 * s} ${l}" stroke="${h}" stroke-width="${b}" stroke-linecap="round" fill="none" />
864
- <line x1="${r - 5 * s}" y1="${l - 0.5 * s}" x2="${r - 7 * s}" y2="${l - 2.5 * s}" stroke="${h}" stroke-width="2" stroke-linecap="round" />
1130
+ return S ? `<g ${b}>
1131
+ <path d="M ${s - 5.5 * h} ${l - 1 * h} Q ${s} ${l + 5.5 * h} ${s + 5.5 * h} ${l - 1 * h}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" fill="none" />
1132
+ <line x1="${s + 4.5 * h}" y1="${l}" x2="${s + 7.5 * h}" y2="${l - 3 * h}" stroke="${c}" stroke-width="${y * 0.75}" stroke-linecap="round" />
1133
+ </g>` : `<g ${b}>
1134
+ <path d="M ${s - 5.5 * h} ${l - 1 * h} Q ${s} ${l + 5.5 * h} ${s + 5.5 * h} ${l - 1 * h}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" fill="none" />
1135
+ <line x1="${s - 4.5 * h}" y1="${l}" x2="${s - 7.5 * h}" y2="${l - 3 * h}" stroke="${c}" stroke-width="${y * 0.75}" stroke-linecap="round" />
865
1136
  </g>`;
866
1137
  case 26:
867
- return `<g ${p}>
868
- <circle cx="${r}" cy="${l}" r="${5 * s}" fill="none" stroke="${h}" stroke-width="2.2" />
869
- <circle cx="${r + 1.6 * s}" cy="${l + 1.6 * s}" r="${1.7 * s}" fill="${h}" />
1138
+ return `<g ${b}>
1139
+ <circle cx="${s}" cy="${l}" r="${5.8 * w}" fill="#FFFFFF" stroke="${c}" stroke-width="2.2" />
1140
+ <circle cx="${s + (e.gazeX ? e.gazeX * 0.15 : 0)}" cy="${l + (e.gazeY ? e.gazeY * 0.15 : 0)}" r="${2.5 * w}" fill="${c}" />
870
1141
  </g>`;
871
- case 27: {
872
- const T = 4 * s, x = 8 * s;
873
- return `<g ${p}><path d="M ${r - T} ${l + x} L ${r - T} ${l - x} L ${r + T} ${l - x} L ${r + T} ${l + x}" stroke="${h}" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" fill="none" /></g>`;
874
- }
1142
+ case 27:
1143
+ return `<g ${b}><path d="M ${s - 6 * h} ${l} Q ${s} ${l - 5 * h} ${s + 6 * h} ${l}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" fill="none" /></g>`;
875
1144
  case 28:
876
- return `<g ${p}><ellipse cx="${r}" cy="${l}" rx="${4.5 * s}" ry="${3 * s}" fill="${h}" /></g>`;
1145
+ return `<g ${b}><line x1="${s - 5.5 * h}" y1="${l}" x2="${s + 5.5 * h}" y2="${l}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" /></g>`;
877
1146
  case 29:
878
- return `<g ${p}>
879
- <path d="M ${r - 4 * s} ${l - 3 * s} Q ${r} ${l - 6 * s} ${r + 4 * s} ${l - 2.5 * s}" stroke="${h}" stroke-width="2" stroke-linecap="round" fill="none" />
880
- <circle cx="${r}" cy="${l + 1.5 * s}" r="${1.6 * s}" fill="${h}" />
1147
+ return `<g ${b}>
1148
+ <ellipse cx="${s}" cy="${l + 1 * h}" rx="${2.8 * w}" ry="${2.8 * w}" fill="${c}" />
1149
+ <path d="M ${s - 4 * h} ${l - 4 * h} Q ${s} ${l - 7 * h} ${s + 4 * h} ${l - 5 * h}" stroke="${c}" stroke-width="2.2" stroke-linecap="round" fill="none" />
881
1150
  </g>`;
882
1151
  case 30:
883
- return C ? `<g ${p}><path d="M ${r + 6 * s} ${l - 6 * s} L ${r + 2 * s} ${l - 3 * s} L ${r + 5 * s} ${l - 1 * s} L ${r - 3 * s} ${l + 2 * s}" stroke="${h}" stroke-width="2.3" stroke-linecap="round" stroke-linejoin="round" fill="none" /></g>` : `<g ${p}><path d="M ${r - 6 * s} ${l - 6 * s} L ${r - 2 * s} ${l - 3 * s} L ${r - 5 * s} ${l - 1 * s} L ${r + 3 * s} ${l + 2 * s}" stroke="${h}" stroke-width="2.3" stroke-linecap="round" stroke-linejoin="round" fill="none" /></g>`;
1152
+ return `<g ${b}><path d="M ${s - 5 * h} ${l - 3 * h} L ${s - 1.5 * h} ${l + 3 * h} L ${s + 1.5 * h} ${l - 3 * h} L ${s + 5 * h} ${l + 3 * h}" stroke="${c}" stroke-width="${y * 0.8}" stroke-linecap="round" stroke-linejoin="round" fill="none" /></g>`;
884
1153
  case 31:
885
- return `<g ${p}>
886
- <circle cx="${r}" cy="${l}" r="${4 * s}" fill="none" stroke="${h}" stroke-width="2" />
887
- <circle cx="${r}" cy="${l}" r="${1.3 * s}" fill="${h}" />
1154
+ return `<g ${b}>
1155
+ <circle cx="${s}" cy="${l}" r="${4.8 * w}" fill="none" stroke="${c}" stroke-width="2.2" />
1156
+ <circle cx="${s}" cy="${l}" r="${1.8 * w}" fill="${c}" />
888
1157
  </g>`;
889
1158
  case 0:
890
1159
  default:
891
- const z = 2.83 * L, P = Math.max(0.5, z * Math.max(0.05, e.eyeOpen));
892
- return `<ellipse cx="${r.toFixed(2)}" cy="${l.toFixed(2)}" rx="${z.toFixed(2)}" ry="${P.toFixed(2)}" fill="${h}" />`;
1160
+ const V = 2.83 * w, ee = Math.max(0.5, V * Math.max(0.05, e.eyeOpen));
1161
+ return `<ellipse cx="${s.toFixed(2)}" cy="${l.toFixed(2)}" rx="${V.toFixed(2)}" ry="${ee.toFixed(2)}" fill="${c}" />`;
893
1162
  }
894
1163
  };
895
- le = I.isVisible ? ce(I.projX, G, I.scaleX, !1) : "", fe = E.isVisible ? ce(E.projX, G, E.scaleX, !0) : "";
896
- let ne = "";
897
- const se = e.tears ?? 0;
898
- if (se > 0.01) {
899
- const r = Math.min(1, se), l = a * 0.36 % 1;
900
- let k = 0, C = r, L = 1;
1164
+ we = W.isVisible ? Te(W.projX, z, W.scaleX, !1) : "", Me = D.isVisible ? Te(D.projX, z, D.scaleX, !0) : "";
1165
+ let be = "";
1166
+ const Fe = e.tears ?? 0;
1167
+ if (Fe > 0.01) {
1168
+ const s = Math.min(1, Fe), l = n * 0.36 % 1;
1169
+ let C = 0, S = s, w = 1;
901
1170
  if (l < 0.25) {
902
- const p = l / 0.25;
903
- k = p * 1.2, L = 0.75 + p * 0.35, C = r * (0.3 + p * 0.7);
1171
+ const b = l / 0.25;
1172
+ C = b * 1.2, w = 0.75 + b * 0.35, S = s * (0.3 + b * 0.7);
904
1173
  } else if (l < 0.82) {
905
- const p = (l - 0.25) / 0.57;
906
- k = 1.2 + p * 10.5, L = 1.1 - p * 0.2, C = r;
1174
+ const b = (l - 0.25) / 0.57;
1175
+ C = 1.2 + b * 10.5, w = 1.1 - b * 0.2, S = s;
907
1176
  } else {
908
- const p = (l - 0.82) / 0.18;
909
- k = 11.7 + p * 2.5, L = 0.9 - p * 0.4, C = r * (1 - p);
1177
+ const b = (l - 0.82) / 0.18;
1178
+ C = 11.7 + b * 2.5, w = 0.9 - b * 0.4, S = s * (1 - b);
910
1179
  }
911
1180
  if (e.cascadeTears)
912
- ne = `
913
- <g opacity="${C.toFixed(2)}">
914
- <path d="M ${I.projX - 3} ${G + 4} L ${I.projX - 6} 88 L ${I.projX + 2} 88 Z" fill="#7FA6D9" opacity="0.85" />
915
- <path d="M ${E.projX - 2} ${G + 4} L ${E.projX - 2} 88 L ${E.projX + 6} 88 Z" fill="#7FA6D9" opacity="0.85" />
1181
+ be = `
1182
+ <g opacity="${S.toFixed(2)}">
1183
+ <path d="M ${W.projX - 3} ${z + 4} L ${W.projX - 6} 88 L ${W.projX + 2} 88 Z" fill="#7FA6D9" opacity="0.85" />
1184
+ <path d="M ${D.projX - 2} ${z + 4} L ${D.projX - 2} 88 L ${D.projX + 6} 88 Z" fill="#7FA6D9" opacity="0.85" />
916
1185
  </g>
917
1186
  `;
918
1187
  else {
919
- const p = (G + 7).toFixed(2), z = (I.projX - 1.2).toFixed(2), P = (E.projX + 1.2).toFixed(2), T = parseFloat(z), x = parseFloat(P), D = parseFloat(p);
920
- ne = `
921
- <g opacity="${C.toFixed(2)}">
922
- <g transform="translate(0, ${k.toFixed(2)}) scale(${L.toFixed(2)})">
923
- <!-- Lágrima redondita ojo izquierdo -->
924
- <path d="M ${z} ${(D - 2.5).toFixed(2)} C ${(T + 2.2).toFixed(2)} ${(D - 0.5).toFixed(2)} ${(T + 2.2).toFixed(2)} ${(D + 2.2).toFixed(2)} ${z} ${(D + 3.2).toFixed(2)} C ${(T - 2.2).toFixed(2)} ${(D + 2.2).toFixed(2)} ${(T - 2.2).toFixed(2)} ${(D - 0.5).toFixed(2)} ${z} ${(D - 2.5).toFixed(2)} Z" fill="#ffffff" />
925
- <!-- Lágrima redondita ojo derecho -->
926
- <path d="M ${P} ${(D - 2.5).toFixed(2)} C ${(x + 2.2).toFixed(2)} ${(D - 0.5).toFixed(2)} ${(x + 2.2).toFixed(2)} ${(D + 2.2).toFixed(2)} ${P} ${(D + 3.2).toFixed(2)} C ${(x - 2.2).toFixed(2)} ${(D + 2.2).toFixed(2)} ${(x - 2.2).toFixed(2)} ${(D - 0.5).toFixed(2)} ${P} ${(D - 2.5).toFixed(2)} Z" fill="#ffffff" />
1188
+ const b = (z + 7).toFixed(2), V = (W.projX - 1.2).toFixed(2), ee = (D.projX + 1.2).toFixed(2), k = parseFloat(V), P = parseFloat(ee), A = parseFloat(b);
1189
+ be = `
1190
+ <g opacity="${S.toFixed(2)}">
1191
+ <g class="wissive-anim-tear" style="transform-origin: ${k}px ${A}px;">
1192
+ <path d="M ${k} ${(A + C - 2.5).toFixed(2)} C ${(k - 2).toFixed(2)} ${(A + C).toFixed(2)} ${(k - 2.5).toFixed(2)} ${(A + C + 2.5).toFixed(2)} ${k} ${(A + C + 3.2).toFixed(2)} C ${(k + 2.5).toFixed(2)} ${(A + C + 2.5).toFixed(2)} ${(k + 2).toFixed(2)} ${(A + C).toFixed(2)} ${k} ${(A + C - 2.5).toFixed(2)} Z" fill="#7FA6D9" transform="scale(1, ${w.toFixed(2)})" />
1193
+ </g>
1194
+ <g class="wissive-anim-tear" style="transform-origin: ${P}px ${A}px; animation-delay: -0.9s;">
1195
+ <path d="M ${P} ${(A + C - 2.5).toFixed(2)} C ${(P - 2).toFixed(2)} ${(A + C).toFixed(2)} ${(P - 2.5).toFixed(2)} ${(A + C + 2.5).toFixed(2)} ${P} ${(A + C + 3.2).toFixed(2)} C ${(P + 2.5).toFixed(2)} ${(A + C + 2.5).toFixed(2)} ${(P + 2).toFixed(2)} ${(A + C).toFixed(2)} ${P} ${(A + C - 2.5).toFixed(2)} Z" fill="#7FA6D9" transform="scale(1, ${w.toFixed(2)})" />
927
1196
  </g>
928
1197
  </g>
929
1198
  `;
930
1199
  }
931
1200
  }
932
- let R = "";
933
- if (e.zzz) {
934
- const r = a * 0.75, l = 3;
935
- R += `<g stroke="${h}" fill="none" stroke-linecap="round" stroke-linejoin="round">`;
936
- for (let k = 0; k < l; k++) {
937
- const C = (r + k / l) % 1, L = 68 + C * 20 + Math.sin(C * Math.PI * 2) * 2, p = 30 - C * 26, z = 0.5 + Math.sin(C * Math.PI) * 0.65, P = Math.sin(C * Math.PI) * 0.95, T = (1.8 + z * 0.7).toFixed(2), x = z.toFixed(2);
938
- P > 0.01 && (R += `
939
- <g transform="translate(${L.toFixed(2)}, ${p.toFixed(2)}) scale(${x}) translate(-72, -31)" opacity="${P.toFixed(2)}">
940
- <path d="M 68 28 L 76 28 L 68 34 L 76 34" stroke-width="${T}" />
941
- </g>
942
- `);
943
- }
944
- R += "</g>";
1201
+ let de = "";
1202
+ if (e.showBrows !== void 0 ? e.showBrows > 0.5 : e.browY !== 0 || e.browTilt !== 0) {
1203
+ const s = 32 + (e.browY ?? 0), l = W.projX, C = D.projX, S = 6 * h, w = e.browTilt ?? 0, b = -w;
1204
+ de = `
1205
+ <g>
1206
+ <line
1207
+ x1="${l - S}"
1208
+ y1="${s}"
1209
+ x2="${l + S}"
1210
+ y2="${s}"
1211
+ stroke="${c}"
1212
+ stroke-width="2.6"
1213
+ stroke-linecap="round"
1214
+ transform="rotate(${w}, ${l}, ${s})"
1215
+ />
1216
+ <line
1217
+ x1="${C - S}"
1218
+ y1="${s}"
1219
+ x2="${C + S}"
1220
+ y2="${s}"
1221
+ stroke="${c}"
1222
+ stroke-width="2.6"
1223
+ stroke-linecap="round"
1224
+ transform="rotate(${b}, ${C}, ${s})"
1225
+ />
1226
+ </g>
1227
+ `;
945
1228
  }
1229
+ let ie = "";
946
1230
  if (e.sweat) {
947
- const r = [
948
- { x: 80, delay: 0, scale: 1 },
949
- { x: 20, delay: 0.4, scale: 0.85 },
950
- { x: 71, delay: 0.7, scale: 0.7 }
951
- ], l = Math.min(1, e.sweat);
952
- R += '<g fill="#7FA6D9">';
953
- for (const k of r) {
954
- const C = (a * 1.2 + k.delay) % 1, L = 25 + C * 7, p = l * Math.sin(C * Math.PI);
955
- p > 0.01 && (R += `
956
- <g transform="translate(${k.x}, ${L.toFixed(2)}) scale(${k.scale}) translate(-80, -25)" opacity="${p.toFixed(2)}">
957
- <path d="M 76 26 C 76 22 80 20 80 20 C 80 20 84 22 84 26 C 84 28.5 82.2 30 80 30 C 77.8 30 76 28.5 76 26 Z" />
958
- </g>
959
- `);
960
- }
961
- R += "</g>";
1231
+ const s = Math.min(1, e.sweat);
1232
+ ie += `
1233
+ <g class="wissive-anim-sweat" opacity="${s.toFixed(2)}" fill="#7FA6D9">
1234
+ <path d="M 80 28 C 78 30 77 33 79 35 C 81 37 84 36 84 33 C 84 30 81 28 80 28 Z" />
1235
+ <path d="M 73 22 C 72 23 71.5 25 72.8 26.5 C 74 27.5 76 27 76 25 C 76 23 74 22 73 22 Z" opacity="0.75" />
1236
+ </g>
1237
+ `;
1238
+ }
1239
+ if (e.zzz) {
1240
+ const s = Math.min(1, e.zzz);
1241
+ ie += `
1242
+ <g opacity="${s.toFixed(2)}" fill="#383835" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif" font-weight="900">
1243
+ <text class="wissive-zzz-1" x="78" y="24" font-size="9" letter-spacing="-0.5">Z</text>
1244
+ <text class="wissive-zzz-2" x="84" y="16" font-size="7.5" letter-spacing="-0.5">z</text>
1245
+ <text class="wissive-zzz-3" x="89" y="9" font-size="6" letter-spacing="-0.5">z</text>
1246
+ </g>
1247
+ `;
962
1248
  }
963
1249
  if (e.storm) {
964
- const r = Math.min(1, e.storm), l = Math.sin(a * 1.4) * 1.2, k = Math.sin(a * 1.4 + 1.8) * 1.2, C = 0.85 + Math.sin(a * 1.4) * 0.15, L = 0.85 + Math.sin(a * 1.4 + 1.8) * 0.15;
965
- R += `
966
- <g opacity="${r.toFixed(2)}" fill="#8a8a86">
967
- <path transform="translate(${l.toFixed(2)}, ${(Math.abs(l) * -0.4).toFixed(2)})" opacity="${C.toFixed(2)}" d="M 22 6 C 22 3 25 1.5 27 2.3 C 27.6 0.5 30 -0.3 31.7 1 C 33.3 -0.7 36.5 0.3 36.5 3 C 38.2 3 39.5 4.5 39 6.2 C 39 8 37.3 9 35.6 9 L 24 9 C 22.3 9 22 7.5 22 6 Z" />
968
- <path transform="translate(${k.toFixed(2)}, ${(Math.abs(k) * -0.4).toFixed(2)})" opacity="${L.toFixed(2)}" d="M 62 8 C 62 5.3 64.8 3.9 66.6 4.6 C 67.2 3 69.4 2.3 71 3.5 C 72.5 1.9 75.4 2.8 75.4 5.3 C 77 5.3 78.2 6.7 77.7 8.2 C 77.7 9.8 76.1 10.7 74.6 10.7 L 63.8 10.7 C 62.3 10.7 62 9.4 62 8 Z" />
1250
+ const s = Math.min(1, e.storm), l = Math.sin(n * 1.4) * 1.2, C = Math.sin(n * 1.4 + 1.8) * 1.2, S = 0.85 + Math.sin(n * 1.4) * 0.15, w = 0.85 + Math.sin(n * 1.4 + 1.8) * 0.15;
1251
+ ie += `
1252
+ <g opacity="${s.toFixed(2)}" fill="#8a8a86">
1253
+ <path transform="translate(${l.toFixed(2)}, ${(Math.abs(l) * -0.4).toFixed(2)})" opacity="${S.toFixed(2)}" d="M 22 6 C 22 3 25 1.5 27 2.3 C 27.6 0.5 30 -0.3 31.7 1 C 33.3 -0.7 36.5 0.3 36.5 3 C 38.2 3 39.5 4.5 39 6.2 C 39 8 37.3 9 35.6 9 L 24 9 C 22.3 9 22 7.5 22 6 Z" />
1254
+ <path transform="translate(${C.toFixed(2)}, ${(Math.abs(C) * -0.4).toFixed(2)})" opacity="${w.toFixed(2)}" d="M 62 8 C 62 5.3 64.8 3.9 66.6 4.6 C 67.2 3 69.4 2.3 71 3.5 C 72.5 1.9 75.4 2.8 75.4 5.3 C 77 5.3 78.2 6.7 77.7 8.2 C 77.7 9.8 76.1 10.7 74.6 10.7 L 63.8 10.7 C 62.3 10.7 62 9.4 62 8 Z" />
969
1255
  </g>
970
1256
  `;
971
1257
  }
972
1258
  if (e.scribble) {
973
- const r = Math.min(1, e.scribble), l = Math.sin(a * 1.6) * 6, k = 1 + Math.sin(a * 2.3) * 0.06;
974
- R += `
975
- <g transform="translate(50, 3) rotate(${l.toFixed(2)}) translate(-50, -3)" opacity="${r.toFixed(2)}">
976
- ${vt(50, 3, k, "#5B7FD6", 2.3)}
1259
+ const s = Math.min(1, e.scribble), l = Math.sin(n * 1.6) * 6, C = 1 + Math.sin(n * 2.3) * 0.06;
1260
+ ie += `
1261
+ <g transform="translate(50, 3) rotate(${l.toFixed(2)}) translate(-50, -3)" opacity="${s.toFixed(2)}">
1262
+ ${Ht(50, 3, C, "#5B7FD6", 2.3)}
977
1263
  </g>
978
1264
  `;
979
1265
  }
980
1266
  if (e.puff) {
981
- const r = a * 0.55 % 1, l = e.mouthY ?? 63, k = 68 + r * 12, C = l - r * 10, L = 0.4 + r * 0.9, p = Math.min(1, e.puff) * Math.sin(r * Math.PI) * 0.8;
982
- p > 0.01 && (R += `
983
- <g fill="#B9BDB6" opacity="${p.toFixed(2)}" transform="translate(${k.toFixed(2)}, ${C.toFixed(2)}) scale(${L.toFixed(2)})">
1267
+ const s = n * 0.55 % 1, l = e.mouthY ?? 63, C = 68 + s * 12, S = l - s * 10, w = 0.4 + s * 0.9, b = Math.min(1, e.puff) * Math.sin(s * Math.PI) * 0.8;
1268
+ b > 0.01 && (ie += `
1269
+ <g fill="#B9BDB6" opacity="${b.toFixed(2)}" transform="translate(${C.toFixed(2)}, ${S.toFixed(2)}) scale(${w.toFixed(2)})">
984
1270
  <circle cx="0" cy="0" r="3.4" />
985
1271
  <circle cx="3" cy="-1.2" r="2.1" />
986
1272
  <circle cx="-2.4" cy="-1" r="1.8" />
987
1273
  </g>
988
1274
  `);
989
1275
  }
990
- let he = "";
991
- if (e.browY !== 0 || e.browTilt !== 0) {
992
- const r = 32 + e.browY + B * 0.5, l = e.browTilt, k = -e.browTilt;
993
- he = `
994
- <g transform="rotate(${l}, ${I.projX}, ${r})">
995
- <line x1="${I.projX - 6}" y1="${r}" x2="${I.projX + 6}" y2="${r}" stroke="${h}" stroke-width="2.8" stroke-linecap="round" />
996
- </g>
997
- <g transform="rotate(${k}, ${E.projX}, ${r})">
998
- <line x1="${E.projX - 6}" y1="${r}" x2="${E.projX + 6}" y2="${r}" stroke="${h}" stroke-width="2.8" stroke-linecap="round" />
1276
+ let ge = "";
1277
+ if (e.whiskers)
1278
+ ge = `
1279
+ <g stroke="${c}" stroke-width="2" stroke-linecap="round" opacity="${(e.cheek || 0.7).toFixed(2)}">
1280
+ <line x1="${W.projX - 10}" y1="52" x2="${W.projX - 18}" y2="50" />
1281
+ <line x1="${W.projX - 10}" y1="56" x2="${W.projX - 17}" y2="58" />
1282
+ <line x1="${D.projX + 10}" y1="52" x2="${D.projX + 18}" y2="50" />
1283
+ <line x1="${D.projX + 10}" y1="56" x2="${D.projX + 17}" y2="58" />
999
1284
  </g>
1000
1285
  `;
1286
+ else if (e.cheek > 0.05) {
1287
+ const s = (e.cheekRadius ?? 5.5) * (M ? 1.2 : 1), l = (e.cheekY ?? 54) + E * 0.5, C = Math.min(1, e.cheek);
1288
+ ge = `
1289
+ <ellipse cx="${W.projX - 3.5}" cy="${l}" rx="${(s * W.scaleX).toFixed(2)}" ry="${(s * 0.7).toFixed(2)}" fill="${f}" opacity="${C.toFixed(2)}" />
1290
+ <ellipse cx="${D.projX + 3.5}" cy="${l}" rx="${(s * D.scaleX).toFixed(2)}" ry="${(s * 0.7).toFixed(2)}" fill="${f}" opacity="${C.toFixed(2)}" />
1291
+ `;
1001
1292
  }
1002
- const pe = Math.round(e.mouthType ?? 0), w = Math.max(0, 14 * e.mouthWidth), m = 50 + A * 0.6, u = (e.mouthY ?? 63) + B * 0.4;
1003
- let S = "";
1004
- switch (pe) {
1005
- case 1:
1006
- S = `<ellipse cx="${m}" cy="${u}" rx="${w}" ry="${w * 1.24}" fill="#B3554A" />`;
1007
- break;
1008
- case 2: {
1009
- const r = w * 2 / 4;
1010
- let l = `M ${m - w} ${u}`;
1011
- for (let k = 1; k <= 4; k++) l += ` L ${m - w + r * k} ${u + (k % 2 ? 2.83 : 0)}`;
1012
- S = `<path d="${l}" fill="none" stroke="${h}" stroke-width="2.8" stroke-linecap="round" stroke-linejoin="round" />`;
1293
+ const Se = 50 + T * 0.8, ke = (e.mouthY ?? 63) + E * 0.6, g = (e.mouthScale ?? 1) * (M ? 1.15 : 1), ve = e.mouthCurve ?? 0, se = e.mouthOpen ?? 0, q = Math.round(e.mouthType ?? 0);
1294
+ let Y = "";
1295
+ const u = Se, m = ke, F = 5.83 * g;
1296
+ switch (q) {
1297
+ case 1: {
1298
+ const s = Math.max(1.8, (2.8 + se * 3.5) * g);
1299
+ Y = `<ellipse cx="${u.toFixed(2)}" cy="${m.toFixed(2)}" rx="${s.toFixed(2)}" ry="${(s * (1 + se * 0.4)).toFixed(2)}" fill="${c}" />`;
1013
1300
  break;
1014
1301
  }
1015
- case 3:
1016
- S = `<line x1="${m - w}" y1="${u}" x2="${m + w}" y2="${u}" stroke="${h}" stroke-width="${b}" stroke-linecap="round" />`;
1017
- break;
1018
- case 13:
1019
- S = `<circle cx="${m}" cy="${u}" r="${w * 2}" fill="none" stroke="${h}" stroke-width="2.8" />`;
1302
+ case 2:
1303
+ Y = `<path d="M ${(u - F).toFixed(2)} ${m.toFixed(2)} Q ${(u - F * 0.5).toFixed(2)} ${(m - 2.5 * g).toFixed(2)} ${u.toFixed(2)} ${m.toFixed(2)} Q ${(u + F * 0.5).toFixed(2)} ${(m + 2.5 * g).toFixed(2)} ${(u + F).toFixed(2)} ${m.toFixed(2)}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" fill="none" />`;
1020
1304
  break;
1021
- case 14:
1022
- S = "";
1305
+ case 3:
1306
+ Y = `<line x1="${(u - F).toFixed(2)}" y1="${m.toFixed(2)}" x2="${(u + F).toFixed(2)}" y2="${m.toFixed(2)}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" />`;
1023
1307
  break;
1024
- case 4:
1025
- S = `
1026
- <rect x="${m - 10}" y="${u - 4}" width="20" height="8" rx="2" fill="#ffffff" stroke="${h}" stroke-width="2.5" />
1027
- <line x1="${m - 10}" y1="${u}" x2="${m + 10}" y2="${u}" stroke="${h}" stroke-width="1.8" />
1028
- <line x1="${m - 3}" y1="${u - 4}" x2="${m - 3}" y2="${u + 4}" stroke="${h}" stroke-width="1.5" />
1029
- <line x1="${m + 3}" y1="${u - 4}" x2="${m + 3}" y2="${u + 4}" stroke="${h}" stroke-width="1.5" />
1308
+ case 4: {
1309
+ const s = 7.5 * g, l = 4.2 * g;
1310
+ Y = `
1311
+ <rect x="${(u - s).toFixed(2)}" y="${(m - l * 0.5).toFixed(2)}" width="${(s * 2).toFixed(2)}" height="${l.toFixed(2)}" rx="2" fill="#FFFFFF" stroke="${c}" stroke-width="2.2" />
1312
+ <line x1="${(u - s).toFixed(2)}" y1="${m.toFixed(2)}" x2="${(u + s).toFixed(2)}" y2="${m.toFixed(2)}" stroke="${c}" stroke-width="1.8" />
1313
+ <line x1="${(u - s * 0.33).toFixed(2)}" y1="${(m - l * 0.5).toFixed(2)}" x2="${(u - s * 0.33).toFixed(2)}" y2="${(m + l * 0.5).toFixed(2)}" stroke="${c}" stroke-width="1.8" />
1314
+ <line x1="${(u + s * 0.33).toFixed(2)}" y1="${(m - l * 0.5).toFixed(2)}" x2="${(u + s * 0.33).toFixed(2)}" y2="${(m + l * 0.5).toFixed(2)}" stroke="${c}" stroke-width="1.8" />
1030
1315
  `;
1031
1316
  break;
1032
- case 5:
1033
- S = `
1034
- <path d="M ${m - 12} ${u - 2} Q ${m} ${u + 12} ${m + 12} ${u - 2} Z" fill="${h}" />
1035
- <path d="M ${m - 10} ${u - 2} L ${m + 10} ${u - 2} L ${m + 8} ${u + 2} L ${m - 8} ${u + 2} Z" fill="#ffffff" />
1317
+ }
1318
+ case 5: {
1319
+ const s = (3.5 + se * 4.5) * g;
1320
+ Y = `
1321
+ <path d="M ${(u - F).toFixed(2)} ${m.toFixed(2)} Q ${u.toFixed(2)} ${(m + s * 2.2).toFixed(2)} ${(u + F).toFixed(2)} ${m.toFixed(2)} Z" fill="${c}" />
1322
+ <path d="M ${(u - F * 0.8).toFixed(2)} ${m.toFixed(2)} L ${(u + F * 0.8).toFixed(2)} ${m.toFixed(2)} L ${(u + F * 0.7).toFixed(2)} ${(m + s * 0.6).toFixed(2)} L ${(u - F * 0.7).toFixed(2)} ${(m + s * 0.6).toFixed(2)} Z" fill="#FFFFFF" />
1036
1323
  `;
1037
1324
  break;
1038
- case 6:
1039
- S = `<path d="M ${m - 13} ${u - 3} Q ${m} ${u + 14} ${m + 13} ${u - 3} Z" fill="#E87C8A" stroke="${h}" stroke-width="2.5" />`;
1040
- break;
1041
- case 7:
1042
- S = `
1043
- <g stroke="${h}" stroke-width="3.5" stroke-linecap="round">
1044
- <line x1="${m - 5}" y1="${u - 5}" x2="${m + 5}" y2="${u + 5}" />
1045
- <line x1="${m - 5}" y1="${u + 5}" x2="${m + 5}" y2="${u - 5}" />
1325
+ }
1326
+ case 6: {
1327
+ const s = (4 + se * 5.5) * g;
1328
+ Y = `
1329
+ <g>
1330
+ <path d="M ${(u - F).toFixed(2)} ${m.toFixed(2)} Q ${u.toFixed(2)} ${(m + s * 2.2).toFixed(2)} ${(u + F).toFixed(2)} ${m.toFixed(2)} Z" fill="${c}" />
1331
+ <path d="M ${(u - F * 0.5).toFixed(2)} ${(m + s * 1.3).toFixed(2)} Q ${u.toFixed(2)} ${(m + s * 0.8).toFixed(2)} ${(u + F * 0.5).toFixed(2)} ${(m + s * 1.3).toFixed(2)} Q ${u.toFixed(2)} ${(m + s * 2.1).toFixed(2)} ${(u - F * 0.5).toFixed(2)} ${(m + s * 1.3).toFixed(2)} Z" fill="#FF7B89" />
1046
1332
  </g>
1047
1333
  `;
1048
1334
  break;
1049
- case 8:
1050
- S = `
1051
- <g>
1052
- <line x1="12" y1="${u - 2}" x2="${m - 14}" y2="${u - 2}" stroke="#ffffff" stroke-width="2" />
1053
- <line x1="12" y1="${u + 4}" x2="${m - 14}" y2="${u + 4}" stroke="#ffffff" stroke-width="2" />
1054
- <line x1="88" y1="${u - 2}" x2="${m + 14}" y2="${u - 2}" stroke="#ffffff" stroke-width="2" />
1055
- <line x1="88" y1="${u + 4}" x2="${m + 14}" y2="${u + 4}" stroke="#ffffff" stroke-width="2" />
1056
- <rect x="${m - 15}" y="${u - 7}" width="30" height="16" rx="3" fill="#ffffff" stroke="${h}" stroke-width="2.2" />
1057
- </g>
1335
+ }
1336
+ case 7: {
1337
+ const s = 3.5 * g;
1338
+ Y = `
1339
+ <line x1="${(u - s).toFixed(2)}" y1="${(m - s).toFixed(2)}" x2="${(u + s).toFixed(2)}" y2="${(m + s).toFixed(2)}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" />
1340
+ <line x1="${(u + s).toFixed(2)}" y1="${(m - s).toFixed(2)}" x2="${(u - s).toFixed(2)}" y2="${(m + s).toFixed(2)}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" />
1341
+ `;
1342
+ break;
1343
+ }
1344
+ case 8: {
1345
+ const s = 12 * g, l = 7.5 * g;
1346
+ Y = `
1347
+ <rect x="${(u - s).toFixed(2)}" y="${(m - l * 0.4).toFixed(2)}" width="${(s * 2).toFixed(2)}" height="${l.toFixed(2)}" rx="3" fill="#FFFFFF" stroke="#8A9BA8" stroke-width="1.8" />
1348
+ <line x1="${(u - s).toFixed(2)}" y1="${m.toFixed(2)}" x2="${(u + s).toFixed(2)}" y2="${m.toFixed(2)}" stroke="#C8D4DE" stroke-width="1.2" />
1058
1349
  `;
1059
1350
  break;
1351
+ }
1060
1352
  case 9:
1061
- S = `<path d="M ${m - 6} ${u} Q ${m - 3} ${u - 3} ${m} ${u} Q ${m + 3} ${u - 3} ${m + 6} ${u}" fill="none" stroke="${h}" stroke-width="2.8" stroke-linecap="round" />`;
1353
+ Y = `
1354
+ <path d="M ${(u - F).toFixed(2)} ${m.toFixed(2)} Q ${(u - F * 0.5).toFixed(2)} ${(m + 3.2 * g).toFixed(2)} ${u.toFixed(2)} ${m.toFixed(2)} Q ${(u + F * 0.5).toFixed(2)} ${(m + 3.2 * g).toFixed(2)} ${(u + F).toFixed(2)} ${m.toFixed(2)}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" fill="none" />
1355
+ `;
1062
1356
  break;
1063
1357
  case 10:
1064
- S = `<circle cx="${m}" cy="${u}" r="2.5" fill="${h}" />`;
1358
+ Y = `<circle cx="${u.toFixed(2)}" cy="${m.toFixed(2)}" r="${(1.9 * g).toFixed(2)}" fill="${c}" />`;
1065
1359
  break;
1066
1360
  case 11:
1067
- S = `<line x1="${m - 6}" y1="${u + 3}" x2="${m + 6}" y2="${u - 3}" stroke="${h}" stroke-width="3" stroke-linecap="round" />`;
1361
+ Y = `<line x1="${(u - F * 0.8).toFixed(2)}" y1="${(m + 2.5 * g).toFixed(2)}" x2="${(u + F * 0.8).toFixed(2)}" y2="${(m - 2.5 * g).toFixed(2)}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" />`;
1068
1362
  break;
1069
1363
  case 12:
1070
- S = `<path d="M ${m - w} ${u + 4} Q ${m} ${u - 6} ${m + w} ${u + 4}" fill="none" stroke="${h}" stroke-width="3.2" stroke-linecap="round" />`;
1364
+ Y = `<path d="M ${(u - F).toFixed(2)} ${(m + 2 * g).toFixed(2)} Q ${u.toFixed(2)} ${(m - 4.5 * g).toFixed(2)} ${(u + F).toFixed(2)} ${(m + 2 * g).toFixed(2)}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" fill="none" />`;
1365
+ break;
1366
+ case 13:
1367
+ Y = `<circle cx="${u.toFixed(2)}" cy="${m.toFixed(2)}" r="${(3.2 * g).toFixed(2)}" fill="none" stroke="${c}" stroke-width="${y}" />`;
1368
+ break;
1369
+ case 14:
1370
+ Y = "";
1071
1371
  break;
1072
- case 15:
1073
- S = `
1074
- <path d="M ${m - w} ${u} Q ${m} ${u + 6} ${m + w} ${u}" fill="none" stroke="${h}" stroke-width="${b}" stroke-linecap="round" />
1075
- <path d="M ${m - 3} ${u + 2} Q ${m} ${u + 10} ${m + 3} ${u + 2} Z" fill="#E3536C" />
1372
+ case 15: {
1373
+ const s = 3.2 * g, l = 4.8 * g;
1374
+ Y = `
1375
+ <line x1="${(u - F).toFixed(2)}" y1="${m.toFixed(2)}" x2="${(u + F).toFixed(2)}" y2="${m.toFixed(2)}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" />
1376
+ <path d="M ${(u - s * 0.7).toFixed(2)} ${m.toFixed(2)} C ${(u - s).toFixed(2)} ${(m + l).toFixed(2)} ${(u + s).toFixed(2)} ${(m + l).toFixed(2)} ${(u + s * 0.7).toFixed(2)} ${m.toFixed(2)} Z" fill="#FF5E7E" stroke="${c}" stroke-width="1.8" />
1377
+ <line x1="${u.toFixed(2)}" y1="${m.toFixed(2)}" x2="${u.toFixed(2)}" y2="${(m + l * 0.65).toFixed(2)}" stroke="#D93856" stroke-width="1.2" />
1076
1378
  `;
1077
1379
  break;
1380
+ }
1078
1381
  case 16:
1079
- S = `<path d="M ${m - w} ${u} Q ${m + w * 0.3} ${u} ${m + w} ${u - 5}" fill="none" stroke="${h}" stroke-width="${b}" stroke-linecap="round" />`;
1382
+ Y = `<path d="M ${(u - F * 0.4).toFixed(2)} ${m.toFixed(2)} Q ${(u + F * 0.4).toFixed(2)} ${(m + 0.5).toFixed(2)} ${(u + F * 1.1).toFixed(2)} ${(m - 3.5 * g).toFixed(2)}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" fill="none" />`;
1080
1383
  break;
1081
1384
  case 17:
1082
- S = `<path d="M ${m - 3.5} ${u - 2} L ${m + 3.5} ${u - 2} L ${m} ${u + 4} Z" fill="#E3536C" />`;
1385
+ Y = `<path d="M ${(u - F * 0.6).toFixed(2)} ${(m + 2.5 * g).toFixed(2)} L ${u.toFixed(2)} ${(m - 2.5 * g).toFixed(2)} L ${(u + F * 0.6).toFixed(2)} ${(m + 2.5 * g).toFixed(2)} Z" fill="${c}" />`;
1083
1386
  break;
1084
1387
  case 18:
1085
- S = `<path d="M ${m - 3} ${u - 4} Q ${m + 3} ${u - 4} ${m - 1} ${u} Q ${m + 3} ${u + 4} ${m - 3} ${u + 4}" fill="none" stroke="${h}" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round" />`;
1388
+ Y = `<path d="M ${(u - F * 0.6).toFixed(2)} ${(m - 2.2 * g).toFixed(2)} Q ${(u + 1).toFixed(2)} ${m.toFixed(2)} ${(u - F * 0.6).toFixed(2)} ${(m + 2.2 * g).toFixed(2)}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" fill="none" />`;
1086
1389
  break;
1087
- case 19:
1088
- S = `<path d="M ${m - 6} ${u - 4} L ${m + 6} ${u - 4} L ${m + 4} ${u + 5} L ${m - 4} ${u + 5} Z" fill="#B3554A" stroke="${h}" stroke-width="2" />`;
1390
+ case 19: {
1391
+ const s = 5 * g, l = 5.5 * g;
1392
+ Y = `<rect x="${(u - s).toFixed(2)}" y="${(m - l * 0.5).toFixed(2)}" width="${(s * 2).toFixed(2)}" height="${l.toFixed(2)}" rx="1.5" fill="${c}" />`;
1089
1393
  break;
1394
+ }
1090
1395
  case 20:
1091
- S = `<ellipse cx="${m}" cy="${u}" rx="3" ry="1.4" fill="none" stroke="${h}" stroke-width="2.2" />`;
1396
+ Y = `<path d="M ${(u - F * 0.7).toFixed(2)} ${(m - 1).toFixed(2)} Q ${u.toFixed(2)} ${(m + 2 * g).toFixed(2)} ${(u + F * 0.7).toFixed(2)} ${(m - 1).toFixed(2)}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" fill="none" />`;
1092
1397
  break;
1093
1398
  case 21: {
1094
- const r = w;
1095
- let l = "";
1096
- for (let k = 1; k < 4; k++) {
1097
- const C = m - r + 2 * r / 4 * k;
1098
- l += `<line x1="${C.toFixed(2)}" y1="${u - 4}" x2="${C.toFixed(2)}" y2="${u + 4}" stroke="${h}" stroke-width="1.3" />`;
1099
- }
1100
- S = `<rect x="${(m - r).toFixed(2)}" y="${u - 4}" width="${(r * 2).toFixed(2)}" height="8" rx="2" fill="#ffffff" stroke="${h}" stroke-width="2.2" />${l}`;
1399
+ const s = 8 * g, l = 3.8 * g;
1400
+ Y = `
1401
+ <rect x="${(u - s).toFixed(2)}" y="${(m - l * 0.5).toFixed(2)}" width="${(s * 2).toFixed(2)}" height="${l.toFixed(2)}" rx="2" fill="#FFFFFF" stroke="${c}" stroke-width="2.2" />
1402
+ <line x1="${(u - s * 0.5).toFixed(2)}" y1="${(m - l * 0.5).toFixed(2)}" x2="${(u - s * 0.5).toFixed(2)}" y2="${(m + l * 0.5).toFixed(2)}" stroke="${c}" stroke-width="1.5" />
1403
+ <line x1="${u.toFixed(2)}" y1="${(m - l * 0.5).toFixed(2)}" x2="${u.toFixed(2)}" y2="${(m + l * 0.5).toFixed(2)}" stroke="${c}" stroke-width="1.5" />
1404
+ <line x1="${(u + s * 0.5).toFixed(2)}" y1="${(m - l * 0.5).toFixed(2)}" x2="${(u + s * 0.5).toFixed(2)}" y2="${(m + l * 0.5).toFixed(2)}" stroke="${c}" stroke-width="1.5" />
1405
+ `;
1101
1406
  break;
1102
1407
  }
1103
- case 22:
1104
- S = `
1105
- <path d="M ${m - w} ${u} Q ${m} ${u + 5} ${m + w} ${u}" fill="none" stroke="${h}" stroke-width="${b}" stroke-linecap="round" />
1106
- <path d="M ${m + w - 3} ${u + 2} Q ${m + w + 3} ${u + 6} ${m + w - 1} ${u + 9} Q ${m + w - 5} ${u + 6} ${m + w - 3} ${u + 2} Z" fill="#E3536C" />
1408
+ case 22: {
1409
+ Y = `
1410
+ <path d="M ${(u - F).toFixed(2)} ${m.toFixed(2)} Q ${u.toFixed(2)} ${(m + 3 * g).toFixed(2)} ${(u + F).toFixed(2)} ${m.toFixed(2)}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" fill="none" />
1411
+ <path d="M ${(u + F * 0.2).toFixed(2)} ${(m + 1).toFixed(2)} C ${(u + F * 0.2).toFixed(2)} ${(m + 5 * g).toFixed(2)} ${(u + F * 0.8).toFixed(2)} ${(m + 5 * g).toFixed(2)} ${(u + F * 0.8).toFixed(2)} ${(m + 1).toFixed(2)} Z" fill="#FF5E7E" stroke="${c}" stroke-width="1.5" />
1107
1412
  `;
1108
1413
  break;
1109
- case 23:
1110
- S = `
1111
- <path d="M ${m - w * 1.1} ${u - 3} Q ${m} ${u + 10} ${m + w * 1.1} ${u - 3} Z" fill="#8a2f36" />
1112
- <ellipse cx="${m}" cy="${u + 4}" rx="${w * 0.6}" ry="4" fill="#E3536C" />
1414
+ }
1415
+ case 23: {
1416
+ const s = 5.5 * g;
1417
+ Y = `
1418
+ <path d="M ${(u - F * 1.1).toFixed(2)} ${m.toFixed(2)} Q ${u.toFixed(2)} ${(m + s * 2.2).toFixed(2)} ${(u + F * 1.1).toFixed(2)} ${m.toFixed(2)} Z" fill="${c}" />
1419
+ <ellipse cx="${u.toFixed(2)}" cy="${(m + s * 1.4).toFixed(2)}" rx="${(F * 0.65).toFixed(2)}" ry="${(s * 0.65).toFixed(2)}" fill="#FF6584" />
1113
1420
  `;
1114
1421
  break;
1422
+ }
1115
1423
  case 24:
1116
- S = `
1117
- <path d="M ${m - w} ${u} Q ${m} ${u + 7} ${m + w} ${u - 2}" fill="none" stroke="${h}" stroke-width="${b}" stroke-linecap="round" />
1118
- <ellipse cx="${m + w * 0.3}" cy="${u + 3}" rx="2" ry="1.2" fill="#E3536C" opacity="0.7" />
1119
- `;
1424
+ Y = `<path d="M ${(u - F * 0.5).toFixed(2)} ${(m - 1).toFixed(2)} Q ${(u - 1).toFixed(2)} ${(m + 4 * g).toFixed(2)} ${(u + F * 0.9).toFixed(2)} ${(m + 1).toFixed(2)}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" fill="none" />`;
1120
1425
  break;
1121
1426
  case 0:
1122
1427
  default:
1123
- if (e.mouthCurve === 0)
1124
- S = `<line x1="${m - w}" y1="${u}" x2="${m + w}" y2="${u}" stroke="${h}" stroke-width="${b}" stroke-linecap="round" />`;
1125
- else {
1126
- const r = u + e.mouthCurve * 14;
1127
- S = `<path d="M ${m - w} ${u} Q ${m} ${r.toFixed(2)} ${m + w} ${u}" fill="none" stroke="${h}" stroke-width="${b}" stroke-linecap="round" />`;
1428
+ if (Math.abs(ve) < 0.05 && se < 0.05)
1429
+ Y = `<line x1="${(u - F).toFixed(2)}" y1="${m.toFixed(2)}" x2="${(u + F).toFixed(2)}" y2="${m.toFixed(2)}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" />`;
1430
+ else if (se > 0.1) {
1431
+ const s = (se * 5 + 1.5) * g, l = m + ve * 5 * g;
1432
+ Y = `<path d="M ${(u - F).toFixed(2)} ${m.toFixed(2)} Q ${u.toFixed(2)} ${(l + s).toFixed(2)} ${(u + F).toFixed(2)} ${m.toFixed(2)} Q ${u.toFixed(2)} ${(l - s * 0.3).toFixed(2)} ${(u - F).toFixed(2)} ${m.toFixed(2)} Z" fill="${c}" stroke="${c}" stroke-width="1.5" stroke-linejoin="round" />`;
1433
+ } else {
1434
+ const s = m + ve * 5 * g;
1435
+ Y = `<path d="M ${(u - F).toFixed(2)} ${m.toFixed(2)} Q ${u.toFixed(2)} ${s.toFixed(2)} ${(u + F).toFixed(2)} ${m.toFixed(2)}" stroke="${c}" stroke-width="${y}" stroke-linecap="round" fill="none" />`;
1128
1436
  }
1129
1437
  break;
1130
1438
  }
1131
- const ue = Math.max(0, Math.min(1, e.cheek));
1132
- let j = "";
1133
- e.blushStripes ? j = `
1134
- <g stroke="#E3536C" stroke-width="2" opacity="0.75" stroke-linecap="round">
1135
- <line x1="20" y1="52" x2="24" y2="58" />
1136
- <line x1="24" y1="52" x2="28" y2="58" />
1137
- <line x1="28" y1="52" x2="32" y2="58" />
1138
- <line x1="68" y1="52" x2="72" y2="58" />
1139
- <line x1="72" y1="52" x2="76" y2="58" />
1140
- <line x1="76" y1="52" x2="80" y2="58" />
1141
- </g>
1142
- ` : ue > 0.01 && (j = `
1143
- <ellipse cx="${27 + A * 0.4}" cy="${56 + B * 0.4}" rx="6" ry="4" fill="${$}" opacity="${ue.toFixed(2)}" />
1144
- <ellipse cx="${73 + A * 0.4}" cy="${56 + B * 0.4}" rx="6" ry="4" fill="${$}" opacity="${ue.toFixed(2)}" />
1145
- `);
1146
- const re = [
1147
- `translate(${(e.shiftX ?? 0).toFixed(2)}, ${e.bob.toFixed(2)})`,
1148
- v ? "translate(100, 0) scale(-1, 1)" : "",
1149
- Y ? "translate(50, 50) scale(1.1) translate(-50, -50)" : ""
1150
- ].filter(Boolean).join(" ");
1151
1439
  return `
1152
- <svg width="${i}" height="${i}" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg" style="overflow: visible;">
1440
+ <svg viewBox="0 0 100 100" width="${i}" height="${i}" xmlns="http://www.w3.org/2000/svg">
1153
1441
  <defs>
1154
1442
  <style>
1155
1443
  @keyframes wissive-zzz-loop {
@@ -1170,6 +1458,9 @@ function _e(o, t, e, i, n = {}, c = 0) {
1170
1458
  50% { transform: translateY(5px); opacity: 0.95; }
1171
1459
  100% { transform: translateY(9px); opacity: 0.15; }
1172
1460
  }
1461
+ .wissive-silhouette-path {
1462
+ transition: fill 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
1463
+ }
1173
1464
  .wissive-zzz-1 { animation: wissive-zzz-loop 3s cubic-bezier(0.33, 0, 0.25, 1) infinite 0s; transform-box: fill-box; transform-origin: center; }
1174
1465
  .wissive-zzz-2 { animation: wissive-zzz-loop 3s cubic-bezier(0.33, 0, 0.25, 1) infinite -1s; transform-box: fill-box; transform-origin: center; }
1175
1466
  .wissive-zzz-3 { animation: wissive-zzz-loop 3s cubic-bezier(0.33, 0, 0.25, 1) infinite -2s; transform-box: fill-box; transform-origin: center; }
@@ -1177,110 +1468,110 @@ function _e(o, t, e, i, n = {}, c = 0) {
1177
1468
  .wissive-anim-sweat { animation: wissive-sweat-slide 2.2s ease-in-out infinite; transform-box: fill-box; transform-origin: top center; }
1178
1469
  </style>
1179
1470
  </defs>
1180
- <g transform="${re}">
1471
+ <g transform="${x ? "translate(100, 0) scale(-1, 1)" : ""}">
1181
1472
  <!-- Silueta del cuerpo (una o varias subformas: cuerpo + orejas, brazos…) -->
1182
- ${M}
1473
+ ${d}
1183
1474
  <!-- Mejillas o Rayas -->
1184
- ${j}
1475
+ ${ge}
1185
1476
  <!-- Accesorios (ZZZ, Gotas) -->
1186
- ${R}
1477
+ ${ie}
1187
1478
  <!-- Lágrimas -->
1188
- ${ne}
1479
+ ${be}
1189
1480
  <!-- Ojos -->
1190
- ${le}
1191
- ${fe}
1481
+ ${we}
1482
+ ${Me}
1192
1483
  <!-- Cejas -->
1193
- ${he}
1484
+ ${de}
1194
1485
  <!-- Boca -->
1195
- ${S}
1486
+ ${Y}
1196
1487
  </g>
1197
1488
  </svg>
1198
1489
  `;
1199
1490
  }
1200
- function ao(o, t, e, i, n = {}) {
1201
- return _e(o, t, e, i, n);
1491
+ function Io(o, t, e, i, a = {}) {
1492
+ return ut(o, t, e, i, a);
1202
1493
  }
1203
- function Qe() {
1494
+ function mt() {
1204
1495
  return typeof window > "u" || typeof window.matchMedia != "function" ? !0 : window.matchMedia("(hover: hover)").matches;
1205
1496
  }
1206
- function kt() {
1497
+ function Ut() {
1207
1498
  return typeof window > "u" ? !1 : typeof window.matchMedia == "function" && window.matchMedia("(hover: none)").matches || "ontouchstart" in window || typeof navigator < "u" && navigator.maxTouchPoints > 0;
1208
1499
  }
1209
- const we = /* @__PURE__ */ new Set();
1210
- let Te = !1;
1211
- function qe(o) {
1212
- const t = o.clientX, e = o.clientY, i = (typeof window < "u" ? window.innerWidth : 1e3) / 2 || 1, n = (typeof window < "u" ? window.innerHeight : 1e3) / 2 || 1;
1213
- for (const c of we) {
1214
- const a = c.element.getBoundingClientRect(), h = a.left + a.width / 2, $ = a.top + a.height / 2;
1215
- if (c.onGazeMove) {
1216
- const M = Math.max(-0.6, Math.min(0.6, (t - h) / i)), v = Math.max(-0.6, Math.min(0.6, (e - $) / n));
1217
- c.onGazeMove(22 * M, 14 * v);
1500
+ const Ie = /* @__PURE__ */ new Set();
1501
+ let Ge = !1;
1502
+ function yt(o) {
1503
+ const t = o.clientX, e = o.clientY, i = (typeof window < "u" ? window.innerWidth : 1e3) / 2 || 1, a = (typeof window < "u" ? window.innerHeight : 1e3) / 2 || 1;
1504
+ for (const r of Ie) {
1505
+ const n = r.element.getBoundingClientRect(), c = n.left + n.width / 2, f = n.top + n.height / 2;
1506
+ if (r.onGazeMove) {
1507
+ const x = Math.max(-0.6, Math.min(0.6, (t - c) / i)), M = Math.max(-0.6, Math.min(0.6, (e - f) / a));
1508
+ r.onGazeMove(22 * x, 14 * M);
1218
1509
  }
1219
- if (c.isActive())
1510
+ if (r.isActive())
1220
1511
  continue;
1221
- const d = Math.hypot(t - h, e - $) <= c.nearRadius;
1222
- d !== c.isNear && (c.isNear = d, c.onNearChange(d));
1512
+ const d = Math.hypot(t - c, e - f) <= r.nearRadius;
1513
+ d !== r.isNear && (r.isNear = d, r.onNearChange(d));
1223
1514
  }
1224
1515
  }
1225
- function Ct(o) {
1226
- we.add(o), !Te && typeof window < "u" && (window.addEventListener("mousemove", qe, { passive: !0 }), Te = !0);
1516
+ function Jt(o) {
1517
+ Ie.add(o), !Ge && typeof window < "u" && (window.addEventListener("mousemove", yt, { passive: !0 }), Ge = !0);
1227
1518
  }
1228
- function wt(o) {
1229
- we.delete(o), we.size === 0 && Te && typeof window < "u" && (window.removeEventListener("mousemove", qe), Te = !1);
1519
+ function Kt(o) {
1520
+ Ie.delete(o), Ie.size === 0 && Ge && typeof window < "u" && (window.removeEventListener("mousemove", yt), Ge = !1);
1230
1521
  }
1231
- function Tt(o, t, e = 120) {
1522
+ function eo(o, t, e = 120) {
1232
1523
  if (typeof window > "u")
1233
1524
  return () => {
1234
1525
  };
1235
- let i = !1, n = !1, c = !1, a = !1;
1236
- const h = () => {
1526
+ let i = !1, a = !1, r = !1, n = !1;
1527
+ const c = () => {
1237
1528
  i = !0, t.onHoverStart();
1238
- }, $ = () => {
1239
- i = !1, n = !1, t.onHoverEnd();
1240
- }, b = (_) => {
1241
- _.button === 0 && (n = !0, t.onClickStart());
1529
+ }, f = () => {
1530
+ i = !1, a = !1, t.onHoverEnd();
1531
+ }, y = (_) => {
1532
+ _.button === 0 && (a = !0, t.onClickStart());
1242
1533
  }, d = () => {
1243
- n && (n = !1, t.onClickEnd());
1534
+ a && (a = !1, t.onClickEnd());
1535
+ }, x = () => {
1536
+ a = !0, t.onClickStart();
1244
1537
  }, M = () => {
1245
- n = !0, t.onClickStart();
1246
- }, v = () => {
1247
- n && (n = !1, t.onClickEnd());
1248
- }, Y = () => {
1249
- n && (n = !1, t.onClickEnd());
1250
- }, A = () => {
1251
- c = !0, t.onHoverStart();
1252
- }, B = () => {
1253
- c = !1, a && (a = !1, n = !1, t.onClickEnd()), t.onHoverEnd();
1254
- }, X = (_) => {
1255
- (_.key === "Enter" || _.key === " ") && (_.preventDefault(), a || (a = !0, n = !0, t.onClickStart()));
1256
- }, G = (_) => {
1257
- (_.key === "Enter" || _.key === " ") && (_.preventDefault(), a && (a = !1, n = !1, t.onClickEnd()));
1538
+ a && (a = !1, t.onClickEnd());
1539
+ }, T = () => {
1540
+ a && (a = !1, t.onClickEnd());
1541
+ }, E = () => {
1542
+ r = !0, t.onHoverStart();
1543
+ }, R = () => {
1544
+ r = !1, n && (n = !1, a = !1, t.onClickEnd()), t.onHoverEnd();
1545
+ }, z = (_) => {
1546
+ (_.key === "Enter" || _.key === " ") && (_.preventDefault(), n || (n = !0, a = !0, t.onClickStart()));
1547
+ }, Z = (_) => {
1548
+ (_.key === "Enter" || _.key === " ") && (_.preventDefault(), n && (n = !1, a = !1, t.onClickEnd()));
1258
1549
  };
1259
- o.addEventListener("mouseenter", h), o.addEventListener("mouseleave", $), o.addEventListener("mousedown", b), window.addEventListener("mouseup", d), o.addEventListener("focus", A), o.addEventListener("blur", B), o.addEventListener("keydown", X), o.addEventListener("keyup", G), o.addEventListener("touchstart", M, { passive: !0 }), window.addEventListener("touchend", v, { passive: !0 }), window.addEventListener("touchcancel", Y, { passive: !0 });
1260
- const Z = {
1550
+ o.addEventListener("mouseenter", c), o.addEventListener("mouseleave", f), o.addEventListener("mousedown", y), window.addEventListener("mouseup", d), o.addEventListener("focus", E), o.addEventListener("blur", R), o.addEventListener("keydown", z), o.addEventListener("keyup", Z), o.addEventListener("touchstart", x, { passive: !0 }), window.addEventListener("touchend", M, { passive: !0 }), window.addEventListener("touchcancel", T, { passive: !0 });
1551
+ const G = {
1261
1552
  element: o,
1262
1553
  nearRadius: e,
1263
1554
  isNear: !1,
1264
- isActive: () => i || n || c,
1555
+ isActive: () => i || a || r,
1265
1556
  onNearChange: t.onNearChange,
1266
1557
  onGazeMove: t.onGazeMove
1267
1558
  };
1268
- return (Qe() || t.onGazeMove) && Ct(Z), () => {
1269
- o.removeEventListener("mouseenter", h), o.removeEventListener("mouseleave", $), o.removeEventListener("mousedown", b), window.removeEventListener("mouseup", d), o.removeEventListener("focus", A), o.removeEventListener("blur", B), o.removeEventListener("keydown", X), o.removeEventListener("keyup", G), o.removeEventListener("touchstart", M), window.removeEventListener("touchend", v), window.removeEventListener("touchcancel", Y), wt(Z);
1559
+ return (mt() || t.onGazeMove) && Jt(G), () => {
1560
+ o.removeEventListener("mouseenter", c), o.removeEventListener("mouseleave", f), o.removeEventListener("mousedown", y), window.removeEventListener("mouseup", d), o.removeEventListener("focus", E), o.removeEventListener("blur", R), o.removeEventListener("keydown", z), o.removeEventListener("keyup", Z), o.removeEventListener("touchstart", x), window.removeEventListener("touchend", M), window.removeEventListener("touchcancel", T), Kt(G);
1270
1561
  };
1271
1562
  }
1272
- let Ae;
1273
- function ze() {
1274
- return Ae || (Ae = import(
1563
+ let Ne;
1564
+ function qe() {
1565
+ return Ne || (Ne = import(
1275
1566
  /* @vite-ignore */
1276
1567
  "cuelume"
1277
- ).catch(() => null)), Ae;
1568
+ ).catch(() => null)), Ne;
1278
1569
  }
1279
- class St {
1570
+ class to {
1280
1571
  constructor() {
1281
- g(this, "enabled", !0);
1282
- g(this, "volume", 0.6);
1283
- ze().then((t) => {
1572
+ v(this, "enabled", !0);
1573
+ v(this, "volume", 0.6);
1574
+ qe().then((t) => {
1284
1575
  try {
1285
1576
  t == null || t.setVolume(this.volume);
1286
1577
  } catch {
@@ -1294,7 +1585,7 @@ class St {
1294
1585
  return this.enabled;
1295
1586
  }
1296
1587
  setVolumeLevel(t) {
1297
- this.volume = Math.max(0, Math.min(1, t)), ze().then((e) => {
1588
+ this.volume = Math.max(0, Math.min(1, t)), qe().then((e) => {
1298
1589
  try {
1299
1590
  e == null || e.setVolume(this.volume);
1300
1591
  } catch {
@@ -1305,7 +1596,7 @@ class St {
1305
1596
  return this.volume;
1306
1597
  }
1307
1598
  playCue(t, e = {}) {
1308
- this.enabled && ze().then((i) => {
1599
+ this.enabled && qe().then((i) => {
1309
1600
  try {
1310
1601
  i == null || i.play(t, { volume: e.volume ?? this.volume });
1311
1602
  } catch {
@@ -1359,39 +1650,39 @@ class St {
1359
1650
  this.playCue(i);
1360
1651
  }
1361
1652
  }
1362
- const U = new St();
1363
- function xt(o) {
1364
- U.setEnabled(o);
1653
+ const oe = new to();
1654
+ function oo(o) {
1655
+ oe.setEnabled(o);
1365
1656
  }
1366
- function Yt() {
1367
- return U.isEnabled();
1657
+ function io() {
1658
+ return oe.isEnabled();
1368
1659
  }
1369
- function Ft(o) {
1370
- U.setVolumeLevel(o);
1660
+ function so(o) {
1661
+ oe.setVolumeLevel(o);
1371
1662
  }
1372
- function Et() {
1373
- return U.getVolumeLevel();
1663
+ function no() {
1664
+ return oe.getVolumeLevel();
1374
1665
  }
1375
- class At {
1666
+ class ao {
1376
1667
  constructor(t, e) {
1377
- g(this, "particles", []);
1378
- g(this, "canvas");
1379
- g(this, "ctx");
1380
- g(this, "animating", !1);
1381
- g(this, "rafId", null);
1382
- g(this, "size");
1383
- g(this, "dpr");
1384
- g(this, "tick", () => {
1668
+ v(this, "particles", []);
1669
+ v(this, "canvas");
1670
+ v(this, "ctx");
1671
+ v(this, "animating", !1);
1672
+ v(this, "rafId", null);
1673
+ v(this, "size");
1674
+ v(this, "dpr");
1675
+ v(this, "tick", () => {
1385
1676
  const t = this.canvas.width, e = this.canvas.height;
1386
1677
  this.ctx.clearRect(0, 0, t, e);
1387
1678
  const i = 0.016;
1388
- for (let n = this.particles.length - 1; n >= 0; n--) {
1389
- const c = this.particles[n];
1390
- if (c.life -= i, c.life <= 0) {
1391
- this.particles.splice(n, 1);
1679
+ for (let a = this.particles.length - 1; a >= 0; a--) {
1680
+ const r = this.particles[a];
1681
+ if (r.life -= i, r.life <= 0) {
1682
+ this.particles.splice(a, 1);
1392
1683
  continue;
1393
1684
  }
1394
- c.vx *= 0.95, c.vy *= 0.95, c.swayFreq && c.swayAmp && (c.x += Math.sin((c.maxLife - c.life) * c.swayFreq) * c.swayAmp), c.x += c.vx, c.y += c.vy, c.rotation += c.rotSpeed, this.drawParticle(c);
1685
+ r.vx *= 0.95, r.vy *= 0.95, r.swayFreq && r.swayAmp && (r.x += Math.sin((r.maxLife - r.life) * r.swayFreq) * r.swayAmp), r.x += r.vx, r.y += r.vy, r.rotation += r.rotSpeed, this.drawParticle(r);
1395
1686
  }
1396
1687
  this.particles.length > 0 ? this.rafId = requestAnimationFrame(this.tick) : (this.animating = !1, this.ctx.clearRect(0, 0, t, e));
1397
1688
  });
@@ -1412,202 +1703,202 @@ class At {
1412
1703
  resize(t) {
1413
1704
  this.size = t, this.dpr = typeof window < "u" && window.devicePixelRatio || 1, this.setupCanvas();
1414
1705
  }
1415
- burst(t, e = 8, i, n) {
1416
- const c = this.size * 2.5, a = i ?? c / 2, h = n ?? c / 2;
1417
- for (let $ = 0; $ < e; $++) {
1418
- const b = Math.PI * 2 * $ / e + (Math.random() - 0.5) * 0.7, d = 2.5 + Math.random() * 3.5, M = this.createParticle(t, a, h, b, d);
1419
- this.particles.push(M);
1706
+ burst(t, e = 8, i, a) {
1707
+ const r = this.size * 2.5, n = i ?? r / 2, c = a ?? r / 2;
1708
+ for (let f = 0; f < e; f++) {
1709
+ const y = Math.PI * 2 * f / e + (Math.random() - 0.5) * 0.7, d = 2.5 + Math.random() * 3.5, x = this.createParticle(t, n, c, y, d);
1710
+ this.particles.push(x);
1420
1711
  }
1421
1712
  this.animating || (this.animating = !0, this.tick());
1422
1713
  }
1423
- createParticle(t, e, i, n, c) {
1424
- const a = 10 + Math.random() * 15, h = e + Math.cos(n) * a, $ = i + Math.sin(n) * a, b = 0.6 + Math.random() * 0.5, d = {
1425
- x: h,
1426
- y: $,
1427
- vx: Math.cos(n) * c,
1428
- vy: Math.sin(n) * c - 1.2,
1429
- life: b,
1430
- maxLife: b,
1714
+ createParticle(t, e, i, a, r) {
1715
+ const n = 10 + Math.random() * 15, c = e + Math.cos(a) * n, f = i + Math.sin(a) * n, y = 0.6 + Math.random() * 0.5, d = {
1716
+ x: c,
1717
+ y: f,
1718
+ vx: Math.cos(a) * r,
1719
+ vy: Math.sin(a) * r - 1.2,
1720
+ life: y,
1721
+ maxLife: y,
1431
1722
  size: (6 + Math.random() * 8) * (this.size / 120),
1432
1723
  rotation: Math.random() * Math.PI * 2,
1433
1724
  rotSpeed: (Math.random() - 0.5) * 0.2,
1434
1725
  shape: "circle",
1435
1726
  color: "#F2A9B8",
1436
1727
  opacity: 1
1437
- }, M = Math.random() > 0.6, v = (Y) => Y[Math.floor(Math.random() * Y.length)];
1728
+ }, x = Math.random() > 0.6, M = (T) => T[Math.floor(Math.random() * T.length)];
1438
1729
  switch (t) {
1439
1730
  case "happy":
1440
- d.shape = M ? "sparkle" : "heart", d.color = v(["#F2A9B8", "#E3536C", "#FF8FAB", "#FFD1DC", "#FFF0F5"]), d.vy -= 0.6;
1731
+ d.shape = x ? "sparkle" : "heart", d.color = M(["#F2A9B8", "#E3536C", "#FF8FAB", "#FFD1DC", "#FFF0F5"]), d.vy -= 0.6;
1441
1732
  break;
1442
1733
  case "pleasure":
1443
- d.shape = M ? "circle" : "petal", d.color = v(["#F28FC2", "#FFC2DE", "#FFE3F0", "#E5739F"]), d.vy += 0.9, d.vx *= 0.6, d.rotSpeed *= 2.5, d.swayFreq = 5 + Math.random() * 3, d.swayAmp = 0.9 + Math.random() * 0.5;
1734
+ d.shape = x ? "circle" : "petal", d.color = M(["#F28FC2", "#FFC2DE", "#FFE3F0", "#E5739F"]), d.vy += 0.9, d.vx *= 0.6, d.rotSpeed *= 2.5, d.swayFreq = 5 + Math.random() * 3, d.swayAmp = 0.9 + Math.random() * 0.5;
1444
1735
  break;
1445
1736
  case "flutter":
1446
- d.shape = M ? "sparkle" : "star", d.color = v(["#F2CB4E", "#FFD700", "#FFA500", "#FFF4CC"]), d.vy -= 1, d.vx *= 1.5, d.rotSpeed *= 2;
1737
+ d.shape = x ? "sparkle" : "star", d.color = M(["#F2CB4E", "#FFD700", "#FFA500", "#FFF4CC"]), d.vy -= 1, d.vx *= 1.5, d.rotSpeed *= 2;
1447
1738
  break;
1448
1739
  case "peaceful":
1449
- d.shape = M ? "circle" : "ring", d.color = v(["#9AC9A0", "#B5E8B5", "#7FD17F", "#E8F5E9"]), d.vy -= 0.8, d.swayFreq = 8 + Math.random() * 4, d.swayAmp = 0.4 + Math.random() * 0.4;
1740
+ d.shape = x ? "circle" : "ring", d.color = M(["#9AC9A0", "#B5E8B5", "#7FD17F", "#E8F5E9"]), d.vy -= 0.8, d.swayFreq = 8 + Math.random() * 4, d.swayAmp = 0.4 + Math.random() * 0.4;
1450
1741
  break;
1451
1742
  case "normal":
1452
- d.shape = M ? "circle" : "dot", d.color = v(["#C9DCD3", "#A8C7BB", "#E4F0EA", "#8FB3A4"]), d.size *= 0.65, d.vx *= 0.5, d.vy *= 0.5;
1743
+ d.shape = x ? "circle" : "dot", d.color = M(["#C9DCD3", "#A8C7BB", "#E4F0EA", "#8FB3A4"]), d.size *= 0.65, d.vx *= 0.5, d.vy *= 0.5;
1453
1744
  break;
1454
1745
  case "tired":
1455
- d.shape = M ? "ring" : "zzz", d.color = v(["#D6DBCF", "#BFC7B8", "#EDF0E8", "#A9B3A0"]), d.vy -= 1.2, d.vx *= 0.25, d.swayFreq = 6 + Math.random() * 4, d.swayAmp = 0.5;
1746
+ d.shape = x ? "ring" : "zzz", d.color = M(["#D6DBCF", "#BFC7B8", "#EDF0E8", "#A9B3A0"]), d.vy -= 1.2, d.vx *= 0.25, d.swayFreq = 6 + Math.random() * 4, d.swayAmp = 0.5;
1456
1747
  break;
1457
1748
  case "sleepy":
1458
- d.shape = M ? "zzz" : "bubble", d.color = v(["#AFCBE0", "#D3E8F5", "#ffffff", "#8FB6D1"]), d.size *= 1.35, d.vy -= 1.5, d.vx *= 0.2, d.swayFreq = 3 + Math.random() * 2, d.swayAmp = 0.7;
1749
+ d.shape = x ? "zzz" : "bubble", d.color = M(["#AFCBE0", "#D3E8F5", "#ffffff", "#8FB6D1"]), d.size *= 1.35, d.vy -= 1.5, d.vx *= 0.2, d.swayFreq = 3 + Math.random() * 2, d.swayAmp = 0.7;
1459
1750
  break;
1460
1751
  case "sad":
1461
- d.shape = M ? "circle" : "drop", d.color = v(["#7FA6D9", "#A0C4E8", "#6B9ACF", "#E1F5FE"]), d.vy += 1.8, d.vx *= 0.3;
1752
+ d.shape = x ? "circle" : "drop", d.color = M(["#7FA6D9", "#A0C4E8", "#6B9ACF", "#E1F5FE"]), d.vy += 1.8, d.vx *= 0.3;
1462
1753
  break;
1463
1754
  case "disappointed":
1464
- d.shape = M ? "drop" : "shard", d.color = v(["#EBD98A", "#C9B86B", "#F5E9B8", "#A89550"]), d.vy += 1.2, d.vx *= 0.8, d.rotSpeed *= 4;
1755
+ d.shape = x ? "drop" : "shard", d.color = M(["#EBD98A", "#C9B86B", "#F5E9B8", "#A89550"]), d.vy += 1.2, d.vx *= 0.8, d.rotSpeed *= 4;
1465
1756
  break;
1466
1757
  case "anxiety":
1467
- d.shape = M ? "circle" : "zigzag", d.color = v(["#A99BD9", "#C4B5F0", "#8B7BC4", "#D1C4E9"]), d.size *= 0.8, d.vx *= 1.4;
1758
+ d.shape = x ? "circle" : "zigzag", d.color = M(["#A99BD9", "#C4B5F0", "#8B7BC4", "#D1C4E9"]), d.size *= 0.8, d.vx *= 1.4;
1468
1759
  break;
1469
1760
  case "stress":
1470
- d.shape = M ? "zigzag" : "spiral", d.color = v(["#C97F76", "#E09A91", "#A85F57", "#F0BDB6"]), d.size *= 0.9, d.rotSpeed *= 6, d.swayFreq = 12 + Math.random() * 6, d.swayAmp = 0.6;
1761
+ d.shape = x ? "zigzag" : "spiral", d.color = M(["#C97F76", "#E09A91", "#A85F57", "#F0BDB6"]), d.size *= 0.9, d.rotSpeed *= 6, d.swayFreq = 12 + Math.random() * 6, d.swayAmp = 0.6;
1471
1762
  break;
1472
1763
  case "anger":
1473
- d.shape = M ? "diamond" : "ember", d.color = v(["#D9566A", "#FF4444", "#FF6B35", "#FFA033"]), d.vy -= 1.4, d.vx *= 0.7, d.size *= 0.9;
1764
+ d.shape = x ? "diamond" : "ember", d.color = M(["#D9566A", "#FF4444", "#FF6B35", "#FFA033"]), d.vy -= 1.4, d.vx *= 0.7, d.size *= 0.9;
1474
1765
  break;
1475
1766
  case "surprised":
1476
- d.shape = M ? "dot" : "burst", d.color = v(["#F0B98A", "#FFCFA3", "#FF9F1C", "#FFE8D1"]), d.size *= 1.15, d.vx *= 1.8, d.vy *= 1.8;
1767
+ d.shape = x ? "dot" : "burst", d.color = M(["#F0B98A", "#FFCFA3", "#FF9F1C", "#FFE8D1"]), d.size *= 1.15, d.vx *= 1.8, d.vy *= 1.8;
1477
1768
  break;
1478
1769
  case "numbness":
1479
- d.shape = M ? "dot" : "glitch", d.color = v(["#D9C6E0", "#C0A8CC", "#EDE2F0", "#A98FB8"]), d.vx *= 0.25, d.vy *= 0.25, d.life *= 0.6, d.rotSpeed = 0;
1770
+ d.shape = x ? "dot" : "glitch", d.color = M(["#D9C6E0", "#C0A8CC", "#EDE2F0", "#A98FB8"]), d.vx *= 0.25, d.vy *= 0.25, d.life *= 0.6, d.rotSpeed = 0;
1480
1771
  break;
1481
1772
  default:
1482
- d.shape = M ? "sparkle" : "circle", d.color = v(["#F2A9B8", "#F2CB4E", "#9AC9A0"]);
1773
+ d.shape = x ? "sparkle" : "circle", d.color = M(["#F2A9B8", "#F2CB4E", "#9AC9A0"]);
1483
1774
  break;
1484
1775
  }
1485
1776
  return d;
1486
1777
  }
1487
1778
  drawParticle(t) {
1488
- const e = this.ctx, i = this.dpr, n = 1 - t.life / t.maxLife;
1489
- let c = 1;
1490
- n < 0.18 ? c = n / 0.18 : n > 0.65 && (c = (1 - n) / 0.35), c = Math.max(0, Math.min(1.2, c));
1491
- const a = t.size * c;
1492
- if (a <= 0.1) return;
1493
- const h = Math.max(0, Math.min(1, t.life / t.maxLife * 1.2));
1494
- switch (e.save(), e.translate(t.x * i, t.y * i), e.rotate(t.rotation), e.globalAlpha = h, t.shape) {
1779
+ const e = this.ctx, i = this.dpr, a = 1 - t.life / t.maxLife;
1780
+ let r = 1;
1781
+ a < 0.18 ? r = a / 0.18 : a > 0.65 && (r = (1 - a) / 0.35), r = Math.max(0, Math.min(1.2, r));
1782
+ const n = t.size * r;
1783
+ if (n <= 0.1) return;
1784
+ const c = Math.max(0, Math.min(1, t.life / t.maxLife * 1.2));
1785
+ switch (e.save(), e.translate(t.x * i, t.y * i), e.rotate(t.rotation), e.globalAlpha = c, t.shape) {
1495
1786
  case "heart":
1496
- e.fillStyle = t.color, e.beginPath(), e.moveTo(0, a * 0.35 * i), e.bezierCurveTo(
1497
- -a * 0.7 * i,
1498
- -a * 0.1 * i,
1499
- -a * 0.8 * i,
1500
- -a * 0.8 * i,
1787
+ e.fillStyle = t.color, e.beginPath(), e.moveTo(0, n * 0.35 * i), e.bezierCurveTo(
1788
+ -n * 0.7 * i,
1789
+ -n * 0.1 * i,
1790
+ -n * 0.8 * i,
1791
+ -n * 0.8 * i,
1501
1792
  0,
1502
- -a * 0.45 * i
1793
+ -n * 0.45 * i
1503
1794
  ), e.bezierCurveTo(
1504
- a * 0.8 * i,
1505
- -a * 0.8 * i,
1506
- a * 0.7 * i,
1507
- -a * 0.1 * i,
1795
+ n * 0.8 * i,
1796
+ -n * 0.8 * i,
1797
+ n * 0.7 * i,
1798
+ -n * 0.1 * i,
1508
1799
  0,
1509
- a * 0.35 * i
1800
+ n * 0.35 * i
1510
1801
  ), e.closePath(), e.fill();
1511
1802
  break;
1512
1803
  case "star": {
1513
1804
  e.fillStyle = t.color, e.beginPath();
1514
- const $ = 5, b = a * i, d = a * 0.45 * i;
1515
- for (let M = 0; M < $ * 2; M++) {
1516
- const v = M % 2 === 0 ? b : d, Y = M * Math.PI / $ - Math.PI / 2, A = Math.cos(Y) * v, B = Math.sin(Y) * v;
1517
- M === 0 ? e.moveTo(A, B) : e.lineTo(A, B);
1805
+ const f = 5, y = n * i, d = n * 0.45 * i;
1806
+ for (let x = 0; x < f * 2; x++) {
1807
+ const M = x % 2 === 0 ? y : d, T = x * Math.PI / f - Math.PI / 2, E = Math.cos(T) * M, R = Math.sin(T) * M;
1808
+ x === 0 ? e.moveTo(E, R) : e.lineTo(E, R);
1518
1809
  }
1519
1810
  e.closePath(), e.fill();
1520
1811
  break;
1521
1812
  }
1522
1813
  case "sparkle": {
1523
1814
  e.fillStyle = t.color, e.beginPath();
1524
- const $ = a * 1.1 * i;
1525
- e.moveTo(0, -$), e.quadraticCurveTo(0, 0, $, 0), e.quadraticCurveTo(0, 0, 0, $), e.quadraticCurveTo(0, 0, -$, 0), e.quadraticCurveTo(0, 0, 0, -$), e.closePath(), e.fill();
1815
+ const f = n * 1.1 * i;
1816
+ e.moveTo(0, -f), e.quadraticCurveTo(0, 0, f, 0), e.quadraticCurveTo(0, 0, 0, f), e.quadraticCurveTo(0, 0, -f, 0), e.quadraticCurveTo(0, 0, 0, -f), e.closePath(), e.fill();
1526
1817
  break;
1527
1818
  }
1528
1819
  case "drop":
1529
- e.fillStyle = t.color, e.beginPath(), e.moveTo(0, -a * 0.8 * i), e.bezierCurveTo(
1530
- a * 0.7 * i,
1531
- -a * 0.2 * i,
1532
- a * 0.6 * i,
1533
- a * 0.7 * i,
1820
+ e.fillStyle = t.color, e.beginPath(), e.moveTo(0, -n * 0.8 * i), e.bezierCurveTo(
1821
+ n * 0.7 * i,
1822
+ -n * 0.2 * i,
1823
+ n * 0.6 * i,
1824
+ n * 0.7 * i,
1534
1825
  0,
1535
- a * 0.7 * i
1826
+ n * 0.7 * i
1536
1827
  ), e.bezierCurveTo(
1537
- -a * 0.6 * i,
1538
- a * 0.7 * i,
1539
- -a * 0.7 * i,
1540
- -a * 0.2 * i,
1828
+ -n * 0.6 * i,
1829
+ n * 0.7 * i,
1830
+ -n * 0.7 * i,
1831
+ -n * 0.2 * i,
1541
1832
  0,
1542
- -a * 0.8 * i
1833
+ -n * 0.8 * i
1543
1834
  ), e.closePath(), e.fill();
1544
1835
  break;
1545
1836
  case "diamond":
1546
- e.fillStyle = t.color, e.beginPath(), e.moveTo(0, -a * i), e.lineTo(a * 0.65 * i, 0), e.lineTo(0, a * i), e.lineTo(-a * 0.65 * i, 0), e.closePath(), e.fill();
1837
+ e.fillStyle = t.color, e.beginPath(), e.moveTo(0, -n * i), e.lineTo(n * 0.65 * i, 0), e.lineTo(0, n * i), e.lineTo(-n * 0.65 * i, 0), e.closePath(), e.fill();
1547
1838
  break;
1548
1839
  case "zigzag":
1549
- e.strokeStyle = t.color, e.lineWidth = Math.max(2, a * 0.25) * i, e.lineCap = "round", e.lineJoin = "round", e.beginPath(), e.moveTo(-a * 0.6 * i, -a * 0.5 * i), e.lineTo(-a * 0.1 * i, -a * 0.1 * i), e.lineTo(-a * 0.3 * i, a * 0.1 * i), e.lineTo(a * 0.6 * i, a * 0.5 * i), e.stroke();
1840
+ e.strokeStyle = t.color, e.lineWidth = Math.max(2, n * 0.25) * i, e.lineCap = "round", e.lineJoin = "round", e.beginPath(), e.moveTo(-n * 0.6 * i, -n * 0.5 * i), e.lineTo(-n * 0.1 * i, -n * 0.1 * i), e.lineTo(-n * 0.3 * i, n * 0.1 * i), e.lineTo(n * 0.6 * i, n * 0.5 * i), e.stroke();
1550
1841
  break;
1551
1842
  case "ring":
1552
- e.strokeStyle = t.color, e.lineWidth = Math.max(1.5, a * 0.25) * i, e.beginPath(), e.arc(0, 0, a * 0.55 * i, 0, Math.PI * 2), e.stroke();
1843
+ e.strokeStyle = t.color, e.lineWidth = Math.max(1.5, n * 0.25) * i, e.beginPath(), e.arc(0, 0, n * 0.55 * i, 0, Math.PI * 2), e.stroke();
1553
1844
  break;
1554
1845
  case "zzz":
1555
- e.strokeStyle = t.color, e.lineWidth = Math.max(2, a * 0.25) * i, e.lineCap = "round", e.lineJoin = "round", e.beginPath(), e.moveTo(-a * 0.4 * i, -a * 0.5 * i), e.lineTo(a * 0.4 * i, -a * 0.5 * i), e.lineTo(-a * 0.4 * i, a * 0.5 * i), e.lineTo(a * 0.4 * i, a * 0.5 * i), e.stroke();
1846
+ e.strokeStyle = t.color, e.lineWidth = Math.max(2, n * 0.25) * i, e.lineCap = "round", e.lineJoin = "round", e.beginPath(), e.moveTo(-n * 0.4 * i, -n * 0.5 * i), e.lineTo(n * 0.4 * i, -n * 0.5 * i), e.lineTo(-n * 0.4 * i, n * 0.5 * i), e.lineTo(n * 0.4 * i, n * 0.5 * i), e.stroke();
1556
1847
  break;
1557
1848
  case "petal":
1558
- e.fillStyle = t.color, e.beginPath(), e.moveTo(0, -a * 0.9 * i), e.quadraticCurveTo(a * 0.75 * i, -a * 0.1 * i, 0, a * 0.9 * i), e.quadraticCurveTo(-a * 0.75 * i, -a * 0.1 * i, 0, -a * 0.9 * i), e.closePath(), e.fill();
1849
+ e.fillStyle = t.color, e.beginPath(), e.moveTo(0, -n * 0.9 * i), e.quadraticCurveTo(n * 0.75 * i, -n * 0.1 * i, 0, n * 0.9 * i), e.quadraticCurveTo(-n * 0.75 * i, -n * 0.1 * i, 0, -n * 0.9 * i), e.closePath(), e.fill();
1559
1850
  break;
1560
1851
  case "spiral": {
1561
- e.strokeStyle = t.color, e.lineWidth = Math.max(1.5, a * 0.2) * i, e.lineCap = "round", e.beginPath();
1562
- const $ = a * 0.85 * i;
1563
- Ne().forEach(([b, d], M) => {
1564
- const v = b * $, Y = d * $;
1565
- M === 0 ? e.moveTo(v, Y) : e.lineTo(v, Y);
1852
+ e.strokeStyle = t.color, e.lineWidth = Math.max(1.5, n * 0.2) * i, e.lineCap = "round", e.beginPath();
1853
+ const f = n * 0.85 * i;
1854
+ ct().forEach(([y, d], x) => {
1855
+ const M = y * f, T = d * f;
1856
+ x === 0 ? e.moveTo(M, T) : e.lineTo(M, T);
1566
1857
  }), e.stroke();
1567
1858
  break;
1568
1859
  }
1569
1860
  case "bubble":
1570
- e.strokeStyle = t.color, e.lineWidth = Math.max(1, a * 0.14) * i, e.beginPath(), e.arc(0, 0, a * 0.6 * i, 0, Math.PI * 2), e.stroke(), e.fillStyle = t.color, e.globalAlpha *= 0.7, e.beginPath(), e.arc(-a * 0.22 * i, -a * 0.24 * i, a * 0.13 * i, 0, Math.PI * 2), e.fill();
1861
+ e.strokeStyle = t.color, e.lineWidth = Math.max(1, n * 0.14) * i, e.beginPath(), e.arc(0, 0, n * 0.6 * i, 0, Math.PI * 2), e.stroke(), e.fillStyle = t.color, e.globalAlpha *= 0.7, e.beginPath(), e.arc(-n * 0.22 * i, -n * 0.24 * i, n * 0.13 * i, 0, Math.PI * 2), e.fill();
1571
1862
  break;
1572
1863
  case "ember": {
1573
- e.fillStyle = t.color, e.beginPath(), e.moveTo(0, -a * 0.95 * i), e.bezierCurveTo(
1574
- a * 0.5 * i,
1575
- -a * 0.2 * i,
1576
- a * 0.62 * i,
1577
- a * 0.55 * i,
1864
+ e.fillStyle = t.color, e.beginPath(), e.moveTo(0, -n * 0.95 * i), e.bezierCurveTo(
1865
+ n * 0.5 * i,
1866
+ -n * 0.2 * i,
1867
+ n * 0.62 * i,
1868
+ n * 0.55 * i,
1578
1869
  0,
1579
- a * 0.75 * i
1870
+ n * 0.75 * i
1580
1871
  ), e.bezierCurveTo(
1581
- -a * 0.62 * i,
1582
- a * 0.55 * i,
1583
- -a * 0.5 * i,
1584
- -a * 0.2 * i,
1872
+ -n * 0.62 * i,
1873
+ n * 0.55 * i,
1874
+ -n * 0.5 * i,
1875
+ -n * 0.2 * i,
1585
1876
  0,
1586
- -a * 0.95 * i
1877
+ -n * 0.95 * i
1587
1878
  ), e.closePath(), e.fill();
1588
1879
  break;
1589
1880
  }
1590
1881
  case "shard":
1591
- e.fillStyle = t.color, e.beginPath(), e.moveTo(0, -a * 0.9 * i), e.lineTo(a * 0.55 * i, -a * 0.15 * i), e.lineTo(a * 0.2 * i, a * 0.85 * i), e.lineTo(-a * 0.45 * i, a * 0.3 * i), e.closePath(), e.fill();
1882
+ e.fillStyle = t.color, e.beginPath(), e.moveTo(0, -n * 0.9 * i), e.lineTo(n * 0.55 * i, -n * 0.15 * i), e.lineTo(n * 0.2 * i, n * 0.85 * i), e.lineTo(-n * 0.45 * i, n * 0.3 * i), e.closePath(), e.fill();
1592
1883
  break;
1593
1884
  case "burst": {
1594
- e.strokeStyle = t.color, e.lineWidth = Math.max(1.5, a * 0.22) * i, e.lineCap = "round", e.beginPath();
1595
- for (let $ = 0; $ < 4; $++) {
1596
- const b = $ * Math.PI / 2, d = a * 0.3 * i, M = a * i;
1597
- e.moveTo(Math.cos(b) * d, Math.sin(b) * d), e.lineTo(Math.cos(b) * M, Math.sin(b) * M);
1885
+ e.strokeStyle = t.color, e.lineWidth = Math.max(1.5, n * 0.22) * i, e.lineCap = "round", e.beginPath();
1886
+ for (let f = 0; f < 4; f++) {
1887
+ const y = f * Math.PI / 2, d = n * 0.3 * i, x = n * i;
1888
+ e.moveTo(Math.cos(y) * d, Math.sin(y) * d), e.lineTo(Math.cos(y) * x, Math.sin(y) * x);
1598
1889
  }
1599
1890
  e.stroke();
1600
1891
  break;
1601
1892
  }
1602
1893
  case "dot":
1603
- e.fillStyle = t.color, e.beginPath(), e.arc(0, 0, a * 0.28 * i, 0, Math.PI * 2), e.fill();
1894
+ e.fillStyle = t.color, e.beginPath(), e.arc(0, 0, n * 0.28 * i, 0, Math.PI * 2), e.fill();
1604
1895
  break;
1605
1896
  case "glitch":
1606
- e.fillStyle = t.color, e.fillRect(-a * 0.6 * i, -a * 0.28 * i, a * 1.2 * i, a * 0.22 * i), e.globalAlpha *= 0.6, e.fillRect(-a * 0.25 * i, a * 0.06 * i, a * 0.9 * i, a * 0.16 * i);
1897
+ e.fillStyle = t.color, e.fillRect(-n * 0.6 * i, -n * 0.28 * i, n * 1.2 * i, n * 0.22 * i), e.globalAlpha *= 0.6, e.fillRect(-n * 0.25 * i, n * 0.06 * i, n * 0.9 * i, n * 0.16 * i);
1607
1898
  break;
1608
1899
  case "circle":
1609
1900
  default:
1610
- e.fillStyle = t.color, e.beginPath(), e.arc(0, 0, a * 0.5 * i, 0, Math.PI * 2), e.fill();
1901
+ e.fillStyle = t.color, e.beginPath(), e.arc(0, 0, n * 0.5 * i, 0, Math.PI * 2), e.fill();
1611
1902
  break;
1612
1903
  }
1613
1904
  e.restore();
@@ -1616,75 +1907,75 @@ class At {
1616
1907
  this.rafId !== null && cancelAnimationFrame(this.rafId), this.particles = [], this.canvas.remove();
1617
1908
  }
1618
1909
  }
1619
- class zt {
1910
+ class ro {
1620
1911
  constructor(t, e, i) {
1621
1912
  // Position
1622
- g(this, "posX", 0);
1623
- g(this, "posY", 0);
1913
+ v(this, "posX", 0);
1914
+ v(this, "posY", 0);
1624
1915
  // Velocity
1625
- g(this, "velX", 0);
1626
- g(this, "velY", 0);
1916
+ v(this, "velX", 0);
1917
+ v(this, "velY", 0);
1627
1918
  // Drag tracking
1628
- g(this, "dragging", !1);
1629
- g(this, "startPointerX", 0);
1630
- g(this, "startPointerY", 0);
1631
- g(this, "lastPointerX", 0);
1632
- g(this, "lastPointerY", 0);
1633
- g(this, "lastPointerTime", 0);
1919
+ v(this, "dragging", !1);
1920
+ v(this, "startPointerX", 0);
1921
+ v(this, "startPointerY", 0);
1922
+ v(this, "lastPointerX", 0);
1923
+ v(this, "lastPointerY", 0);
1924
+ v(this, "lastPointerTime", 0);
1634
1925
  // Velocity samples for a smooth toss (ring buffer of last N moves)
1635
- g(this, "velocitySamples", []);
1636
- g(this, "MAX_SAMPLES", 6);
1926
+ v(this, "velocitySamples", []);
1927
+ v(this, "MAX_SAMPLES", 6);
1637
1928
  // Spring constants for the return-to-origin bounce
1638
- g(this, "springK", 0.08);
1929
+ v(this, "springK", 0.08);
1639
1930
  // stiffness — lower = softer jelly
1640
- g(this, "springD", 0.82);
1931
+ v(this, "springD", 0.82);
1641
1932
  // damping — lower = bouncier
1642
- g(this, "tossDecay", 0.96);
1933
+ v(this, "tossDecay", 0.96);
1643
1934
  // air friction on free flight
1644
1935
  // Stretch limits
1645
- g(this, "maxStretch", 0.25);
1936
+ v(this, "maxStretch", 0.25);
1646
1937
  // Physics loop
1647
- g(this, "animating", !1);
1648
- g(this, "rafId", null);
1938
+ v(this, "animating", !1);
1939
+ v(this, "rafId", null);
1649
1940
  // Callbacks
1650
- g(this, "onUpdate");
1651
- g(this, "onDragStart");
1652
- g(this, "onDragEnd");
1941
+ v(this, "onUpdate");
1942
+ v(this, "onDragStart");
1943
+ v(this, "onDragEnd");
1653
1944
  // Element ref
1654
- g(this, "el");
1945
+ v(this, "el");
1655
1946
  // ─── Pointer Abstraction ───────────────────────────────────────────
1656
- g(this, "handlePointerDown", (t) => {
1947
+ v(this, "handlePointerDown", (t) => {
1657
1948
  t.preventDefault(), this.startDrag(t.clientX, t.clientY);
1658
1949
  });
1659
- g(this, "handlePointerMove", (t) => {
1950
+ v(this, "handlePointerMove", (t) => {
1660
1951
  this.dragging && this.moveDrag(t.clientX, t.clientY);
1661
1952
  });
1662
- g(this, "handlePointerUp", () => {
1953
+ v(this, "handlePointerUp", () => {
1663
1954
  this.dragging && this.endDrag();
1664
1955
  });
1665
- g(this, "handleTouchDown", (t) => {
1956
+ v(this, "handleTouchDown", (t) => {
1666
1957
  t.preventDefault();
1667
1958
  const e = t.touches[0];
1668
1959
  this.startDrag(e.clientX, e.clientY);
1669
1960
  });
1670
- g(this, "handleTouchMove", (t) => {
1961
+ v(this, "handleTouchMove", (t) => {
1671
1962
  if (!this.dragging) return;
1672
1963
  t.preventDefault();
1673
1964
  const e = t.touches[0];
1674
1965
  this.moveDrag(e.clientX, e.clientY);
1675
1966
  });
1676
- g(this, "handleTouchUp", () => {
1967
+ v(this, "handleTouchUp", () => {
1677
1968
  this.dragging && this.endDrag();
1678
1969
  });
1679
- g(this, "physicsTick", () => {
1970
+ v(this, "physicsTick", () => {
1680
1971
  if (this.dragging) {
1681
1972
  this.emitState(), this.rafId = requestAnimationFrame(this.physicsTick);
1682
1973
  return;
1683
1974
  }
1684
1975
  const t = -this.springK * this.posX, e = -this.springK * this.posY;
1685
1976
  this.velX = (this.velX + t) * this.springD, this.velY = (this.velY + e) * this.springD, this.velX *= this.tossDecay, this.velY *= this.tossDecay, this.posX += this.velX, this.posY += this.velY, this.emitState();
1686
- const i = Math.hypot(this.posX, this.posY), n = Math.hypot(this.velX, this.velY);
1687
- if (i < 0.3 && n < 0.1) {
1977
+ const i = Math.hypot(this.posX, this.posY), a = Math.hypot(this.velX, this.velY);
1978
+ if (i < 0.3 && a < 0.1) {
1688
1979
  this.posX = 0, this.posY = 0, this.velX = 0, this.velY = 0, this.animating = !1, this.emitState();
1689
1980
  return;
1690
1981
  }
@@ -1698,22 +1989,22 @@ class zt {
1698
1989
  this.dragging = !0, this.startPointerX = t - this.posX, this.startPointerY = e - this.posY, this.lastPointerX = t, this.lastPointerY = e, this.lastPointerTime = performance.now(), this.velocitySamples = [], this.velX = 0, this.velY = 0, this.el.style.cursor = "grabbing", (i = this.onDragStart) == null || i.call(this), this.startPhysicsLoop();
1699
1990
  }
1700
1991
  moveDrag(t, e) {
1701
- const i = performance.now(), n = Math.max(1, i - this.lastPointerTime);
1992
+ const i = performance.now(), a = Math.max(1, i - this.lastPointerTime);
1702
1993
  this.velocitySamples.push({
1703
- x: (t - this.lastPointerX) / n,
1704
- y: (e - this.lastPointerY) / n
1994
+ x: (t - this.lastPointerX) / a,
1995
+ y: (e - this.lastPointerY) / a
1705
1996
  }), this.velocitySamples.length > this.MAX_SAMPLES && this.velocitySamples.shift(), this.posX = t - this.startPointerX, this.posY = e - this.startPointerY, this.lastPointerX = t, this.lastPointerY = e, this.lastPointerTime = i;
1706
1997
  }
1707
1998
  endDrag() {
1708
1999
  var t;
1709
2000
  if (this.dragging = !1, this.el.style.cursor = "pointer", this.velocitySamples.length > 0) {
1710
2001
  let e = 0, i = 0;
1711
- for (const h of this.velocitySamples)
1712
- e += h.x, i += h.y;
1713
- const n = this.velocitySamples.length;
1714
- this.velX = e / n * 16, this.velY = i / n * 16;
1715
- const c = 25, a = Math.hypot(this.velX, this.velY);
1716
- a > c && (this.velX = this.velX / a * c, this.velY = this.velY / a * c);
2002
+ for (const c of this.velocitySamples)
2003
+ e += c.x, i += c.y;
2004
+ const a = this.velocitySamples.length;
2005
+ this.velX = e / a * 16, this.velY = i / a * 16;
2006
+ const r = 25, n = Math.hypot(this.velX, this.velY);
2007
+ n > r && (this.velX = this.velX / n * r, this.velY = this.velY / n * r);
1717
2008
  }
1718
2009
  (t = this.onDragEnd) == null || t.call(this), this.startPhysicsLoop();
1719
2010
  }
@@ -1724,11 +2015,11 @@ class zt {
1724
2015
  emitState() {
1725
2016
  let t = 1, e = 1, i = 0;
1726
2017
  if (this.dragging) {
1727
- const n = this.posX, c = this.posY, a = Math.hypot(n, c), h = Math.min(this.maxStretch, a * 2e-3), $ = Math.atan2(c, n);
1728
- t = 1 + h * Math.abs(Math.cos($)), e = 1 - h * 0.5 * Math.abs(Math.cos($)), Math.abs(Math.sin($)) > Math.abs(Math.cos($)) && (e = 1 + h * Math.abs(Math.sin($)), t = 1 - h * 0.5 * Math.abs(Math.sin($))), i = Math.atan2(c, n) * 0.06;
2018
+ const a = this.posX, r = this.posY, n = Math.hypot(a, r), c = Math.min(this.maxStretch, n * 2e-3), f = Math.atan2(r, a);
2019
+ t = 1 + c * Math.abs(Math.cos(f)), e = 1 - c * 0.5 * Math.abs(Math.cos(f)), Math.abs(Math.sin(f)) > Math.abs(Math.cos(f)) && (e = 1 + c * Math.abs(Math.sin(f)), t = 1 - c * 0.5 * Math.abs(Math.sin(f))), i = Math.atan2(r, a) * 0.06;
1729
2020
  } else {
1730
- const n = Math.hypot(this.velX, this.velY), c = Math.min(this.maxStretch, n * 0.012), a = Math.atan2(this.velY, this.velX);
1731
- t = 1 + c * Math.abs(Math.cos(a)), e = 1 - c * 0.6 * Math.abs(Math.cos(a)), Math.abs(Math.sin(a)) > Math.abs(Math.cos(a)) && (e = 1 + c * Math.abs(Math.sin(a)), t = 1 - c * 0.6 * Math.abs(Math.sin(a))), i = Math.atan2(this.velY, this.velX) * 0.04;
2021
+ const a = Math.hypot(this.velX, this.velY), r = Math.min(this.maxStretch, a * 0.012), n = Math.atan2(this.velY, this.velX);
2022
+ t = 1 + r * Math.abs(Math.cos(n)), e = 1 - r * 0.6 * Math.abs(Math.cos(n)), Math.abs(Math.sin(n)) > Math.abs(Math.cos(n)) && (e = 1 + r * Math.abs(Math.sin(n)), t = 1 - r * 0.6 * Math.abs(Math.sin(n))), i = Math.atan2(this.velY, this.velX) * 0.04;
1732
2023
  }
1733
2024
  this.onUpdate({
1734
2025
  offsetX: this.posX,
@@ -1743,17 +2034,17 @@ class zt {
1743
2034
  this.rafId !== null && cancelAnimationFrame(this.rafId), this.el.removeEventListener("mousedown", this.handlePointerDown), window.removeEventListener("mousemove", this.handlePointerMove), window.removeEventListener("mouseup", this.handlePointerUp), this.el.removeEventListener("touchstart", this.handleTouchDown), window.removeEventListener("touchmove", this.handleTouchMove), window.removeEventListener("touchend", this.handleTouchUp);
1744
2035
  }
1745
2036
  }
1746
- function Pt() {
2037
+ function lo() {
1747
2038
  return typeof window > "u" || !window.matchMedia ? !1 : window.matchMedia("(prefers-reduced-motion: reduce)").matches;
1748
2039
  }
1749
- function Xt(o) {
2040
+ function co(o) {
1750
2041
  if (typeof window > "u" || !window.matchMedia)
1751
2042
  return () => {
1752
2043
  };
1753
2044
  const t = window.matchMedia("(prefers-reduced-motion: reduce)"), e = (i) => o(i.matches);
1754
2045
  return t.addEventListener ? (t.addEventListener("change", e), () => t.removeEventListener("change", e)) : (t.addListener(e), () => t.removeListener(e));
1755
2046
  }
1756
- function Lt(o) {
2047
+ function ho(o) {
1757
2048
  let t = o.trim().replace("#", "");
1758
2049
  if (t.length === 3 && (t = t.split("").map((e) => e + e).join("")), t.length === 6) {
1759
2050
  const e = parseInt(t, 16);
@@ -1761,22 +2052,22 @@ function Lt(o) {
1761
2052
  }
1762
2053
  return [0, 0, 0];
1763
2054
  }
1764
- function Oe(o) {
1765
- const [t, e, i] = Lt(o), n = ($) => $ <= 0.03928 ? $ / 12.92 : Math.pow(($ + 0.055) / 1.055, 2.4), c = n(t), a = n(e), h = n(i);
1766
- return 0.2126 * c + 0.7152 * a + 0.0722 * h;
2055
+ function it(o) {
2056
+ const [t, e, i] = ho(o), a = (f) => f <= 0.03928 ? f / 12.92 : Math.pow((f + 0.055) / 1.055, 2.4), r = a(t), n = a(e), c = a(i);
2057
+ return 0.2126 * r + 0.7152 * n + 0.0722 * c;
1767
2058
  }
1768
- function Dt(o, t) {
1769
- const e = Oe(o), i = Oe(t), n = Math.max(e, i), c = Math.min(e, i);
1770
- return (n + 0.05) / (c + 0.05);
2059
+ function uo(o, t) {
2060
+ const e = it(o), i = it(t), a = Math.max(e, i), r = Math.min(e, i);
2061
+ return (a + 0.05) / (r + 0.05);
1771
2062
  }
1772
- function no(o, t, e = 3) {
1773
- const i = Dt(o, t);
2063
+ function Go(o, t, e = 3) {
2064
+ const i = uo(o, t);
1774
2065
  return {
1775
2066
  ratio: Number(i.toFixed(2)),
1776
2067
  passes: i >= e
1777
2068
  };
1778
2069
  }
1779
- const ro = {
2070
+ const Wo = {
1780
2071
  // Emociones positivas & energía
1781
2072
  happy: { baseColor: "#F7C6CE", strokeColor: "#1c1917" },
1782
2073
  excited: { baseColor: "#FFD54F", strokeColor: "#1c1917" },
@@ -1814,7 +2105,7 @@ const ro = {
1814
2105
  waking: { baseColor: "#FFF59D", strokeColor: "#F57F17" },
1815
2106
  spawning: { baseColor: "#E1BEE7", strokeColor: "#4A148C" }
1816
2107
  };
1817
- function Be(o) {
2108
+ function st(o) {
1818
2109
  let t = o.trim().replace("#", "");
1819
2110
  t.length === 3 && (t = t.split("").map((i) => i + i).join(""));
1820
2111
  const e = parseInt(t, 16);
@@ -1824,35 +2115,35 @@ function Be(o) {
1824
2115
  b: e & 255
1825
2116
  };
1826
2117
  }
1827
- function It(o, t, e) {
1828
- const i = Be(o), n = Be(t), c = Math.max(0, Math.min(1, e)), a = Math.round(i.r + (n.r - i.r) * c), h = Math.round(i.g + (n.g - i.g) * c), $ = Math.round(i.b + (n.b - i.b) * c), b = (d) => d.toString(16).padStart(2, "0");
1829
- return `#${b(a)}${b(h)}${b($)}`;
2118
+ function mo(o, t, e) {
2119
+ const i = st(o), a = st(t), r = Math.max(0, Math.min(1, e)), n = Math.round(i.r + (a.r - i.r) * r), c = Math.round(i.g + (a.g - i.g) * r), f = Math.round(i.b + (a.b - i.b) * r), y = (d) => d.toString(16).padStart(2, "0");
2120
+ return `#${y(n)}${y(c)}${y(f)}`;
1830
2121
  }
1831
- function lo(o, t) {
2122
+ function Oo(o, t) {
1832
2123
  return {
1833
2124
  baseColor: t,
1834
2125
  strokeColor: "#1c1917"
1835
2126
  };
1836
2127
  }
1837
- function q(o, t, e) {
2128
+ function U(o, t, e) {
1838
2129
  const i = o / t % 1;
1839
2130
  return i < e ? Math.sin(i / e * Math.PI) : 0;
1840
2131
  }
1841
- const je = {
2132
+ const nt = {
1842
2133
  // Mochi — saltitos alegres, mejillas que florecen en el apogeo
1843
2134
  bouncy(o, t, e, i) {
1844
- const n = Math.abs(Math.sin(t * e));
1845
- o.bob += n * i - i * 0.5, o.cheek += n * 0.15, o.eyeScale += n * 0.04, o.turnAngle += Math.sin(t * e * 0.5) * 0.05;
2135
+ const a = Math.abs(Math.sin(t * e));
2136
+ o.bob += a * i - i * 0.5, o.cheek += a * 0.15, o.eyeScale += a * 0.04, o.turnAngle += Math.sin(t * e * 0.5) * 0.05;
1846
2137
  },
1847
2138
  // Zumi — aleteo rápido lateral, entrecierra los ojos por el zumbido
1848
2139
  flutter(o, t, e, i) {
1849
- const n = Math.sin(t * e);
1850
- o.shiftX += n * i, o.bob += Math.cos(t * e * 0.7) * i * 0.5, o.turnAngle += n * 0.06, o.eyeScale -= Math.abs(n) * 0.03;
2140
+ const a = Math.sin(t * e);
2141
+ o.shiftX += a * i, o.bob += Math.cos(t * e * 0.7) * i * 0.5, o.turnAngle += a * 0.06, o.eyeScale -= Math.abs(a) * 0.03;
1851
2142
  },
1852
2143
  // Suri — respiración profunda y lenta, inclinación que va por detrás
1853
2144
  serene(o, t, e, i) {
1854
- const n = Math.sin(t * e);
1855
- o.bob += n * i, o.eyeScale += n * 0.05, o.cheek += (n + 1) * 0.06, o.turnAngle += Math.sin(t * e * 0.4 - 0.6) * 0.045;
2145
+ const a = Math.sin(t * e);
2146
+ o.bob += a * i, o.eyeScale += a * 0.05, o.cheek += (a + 1) * 0.06, o.turnAngle += Math.sin(t * e * 0.4 - 0.6) * 0.045;
1856
2147
  },
1857
2148
  // Nima — deriva fantasmal en ocho (frecuencias 2:1)
1858
2149
  float(o, t, e, i) {
@@ -1860,18 +2151,18 @@ const je = {
1860
2151
  },
1861
2152
  // Cota — respiración mínima y mirada que divaga sin rumbo
1862
2153
  calm(o, t, e, i) {
1863
- const n = Math.sin(t * e);
1864
- o.bob += n * i, o.eyeScale += n * 0.025, o.gazeX += Math.sin(t * e * 0.23) * 2.5, o.turnAngle += Math.sin(t * e * 0.31) * 0.03;
2154
+ const a = Math.sin(t * e);
2155
+ o.bob += a * i, o.eyeScale += a * 0.025, o.gazeX += Math.sin(t * e * 0.23) * 2.5, o.turnAngle += Math.sin(t * e * 0.31) * 0.03;
1865
2156
  },
1866
2157
  // Dozy — cabecea hasta dormirse y despierta de golpe
1867
2158
  droop(o, t, e, i) {
1868
- const n = t * e * 0.18 % 1, c = n < 0.82 ? n / 0.82 : 1 - (n - 0.82) / 0.18;
1869
- o.bob += c * i * 2.2, o.eyeOpen = Math.max(0, o.eyeOpen - c * 0.45), o.browY += c * 2, o.turnAngle += c * 0.12;
2159
+ const a = t * e * 0.18 % 1, r = a < 0.82 ? a / 0.82 : 1 - (a - 0.82) / 0.18;
2160
+ o.bob += r * i * 2.2, o.eyeOpen = Math.max(0, o.eyeOpen - r * 0.45), o.browY += r * 2, o.turnAngle += r * 0.12;
1870
2161
  },
1871
2162
  // Lumo — respiración entrecortada del llanto, mirada baja
1872
2163
  sob(o, t, e, i) {
1873
- const n = Math.sin(t * e) + Math.sin(t * e * 2.7) * 0.4;
1874
- o.bob += n * i, o.browY += 1 + Math.sin(t * e) * 0.8, o.gazeY += 1.5, o.mouthCurve -= 0.05 + Math.abs(Math.sin(t * e)) * 0.05;
2164
+ const a = Math.sin(t * e) + Math.sin(t * e * 2.7) * 0.4;
2165
+ o.bob += a * i, o.browY += 1 + Math.sin(t * e) * 0.8, o.gazeY += 1.5, o.mouthCurve -= 0.05 + Math.abs(Math.sin(t * e)) * 0.05;
1875
2166
  },
1876
2167
  // Fidge — temblor nervioso y mirada que se dispara de un lado a otro
1877
2168
  jitter(o, t, e, i) {
@@ -1879,13 +2170,13 @@ const je = {
1879
2170
  },
1880
2171
  // Brix — rumor contenido que estalla en llamaradas puntuales
1881
2172
  fiery(o, t, e, i) {
1882
- const n = Math.sin(t * e * 3.1) * 0.35, c = Math.pow(Math.max(0, Math.sin(t * e * 0.35)), 6);
1883
- o.bob += n * i - c * i * 1.8, o.shiftX += n * i * 0.5, o.eyeScale += c * 0.18, o.browY -= c * 2.5, o.browTilt -= c * 0.25;
2173
+ const a = Math.sin(t * e * 3.1) * 0.35, r = Math.pow(Math.max(0, Math.sin(t * e * 0.35)), 6);
2174
+ o.bob += a * i - r * i * 1.8, o.shiftX += a * i * 0.5, o.eyeScale += r * 0.18, o.browY -= r * 2.5, o.browTilt -= r * 0.25;
1884
2175
  },
1885
2176
  // Wilt — se desinfla y se vuelve a inflar, resignado
1886
2177
  wilt(o, t, e, i) {
1887
- const n = (Math.sin(t * e * 0.6) + 1) / 2;
1888
- o.bob += n * i * 1.8, o.mouthCurve -= n * 0.12, o.browY += n * 1.6, o.eyeScale -= n * 0.05;
2178
+ const a = (Math.sin(t * e * 0.6) + 1) / 2;
2179
+ o.bob += a * i * 1.8, o.mouthCurve -= a * 0.12, o.browY += a * 1.6, o.eyeScale -= a * 0.05;
1889
2180
  },
1890
2181
  // Knot — bamboleo circular con la cabeza rodando
1891
2182
  dizzy(o, t, e, i) {
@@ -1893,36 +2184,36 @@ const je = {
1893
2184
  },
1894
2185
  // Snug — respiración profunda de sueño, párpados pesados
1895
2186
  snooze(o, t, e, i) {
1896
- const n = Math.sin(t * e);
1897
- o.bob += n * i * 1.6, o.eyeScale += n * 0.06, o.eyeOpen *= 0.35, o.cheek += (n + 1) * 0.05, o.turnAngle += Math.sin(t * e - 0.8) * 0.05;
2187
+ const a = Math.sin(t * e);
2188
+ o.bob += a * i * 1.6, o.eyeScale += a * 0.06, o.eyeOpen *= 0.35, o.cheek += (a + 1) * 0.05, o.turnAngle += Math.sin(t * e - 0.8) * 0.05;
1898
2189
  },
1899
2190
  // Pip — sobresaltos secos; entre uno y otro aguanta la respiración con tensión
1900
2191
  pop(o, t, e, i) {
1901
- const n = q(t, 1 / (e * 0.1), 0.18), c = Math.sin(t * e * 1.6) * 0.18;
1902
- o.bob += c * i - n * i * 2.2, o.eyeScale += c * 0.02 + n * 0.22, o.browY -= n * 3, o.mouthOpen += n * 0.25;
2192
+ const a = U(t, 1 / (e * 0.1), 0.18), r = Math.sin(t * e * 1.6) * 0.18;
2193
+ o.bob += r * i - a * i * 2.2, o.eyeScale += r * 0.02 + a * 0.22, o.browY -= a * 3, o.mouthOpen += a * 0.25;
1903
2194
  },
1904
2195
  // Void — casi inmóvil, con micro-fallos tipo glitch
1905
2196
  drift(o, t, e, i) {
1906
2197
  o.bob += Math.sin(t * e) * i * 0.6;
1907
- const n = q(t, 3.7, 0.04);
1908
- o.shiftX += n * (Math.random() - 0.5) * 5, o.gazeX += n * (Math.random() - 0.5) * 6, o.eyeScale -= n * 0.08;
2198
+ const a = U(t, 3.7, 0.04);
2199
+ o.shiftX += a * (Math.random() - 0.5) * 5, o.gazeX += a * (Math.random() - 0.5) * 6, o.eyeScale -= a * 0.08;
1909
2200
  }
1910
2201
  };
1911
- function Gt(o, t, e, i, n, c = 1) {
1912
- (je[o] || je.calm)(t, e, i, n * c);
2202
+ function yo(o, t, e, i, a, r = 1) {
2203
+ (nt[o] || nt.calm)(t, e, i, a * r);
1913
2204
  }
1914
- const Wt = {
2205
+ const po = {
1915
2206
  // ── Ciclo de vida ──────────────────────────────────────────────────
1916
2207
  sleeping(o, t) {
1917
2208
  const e = Math.sin(t * 0.9);
1918
- o.eyeOpen = 0.05, o.bob += e * 2.4, o.eyeScale += e * 0.04, o.bob += q(t, 9, 0.15) * 1.8;
2209
+ o.eyeOpen = 0.05, o.bob += e * 2.4, o.eyeScale += e * 0.04, o.bob += U(t, 9, 0.15) * 1.8;
1919
2210
  },
1920
2211
  waking(o, t) {
1921
- const e = q(t, 4, 0.4);
2212
+ const e = U(t, 4, 0.4);
1922
2213
  o.bob += Math.sin(t * 2.2) * 1.6 - e * 3, o.eyeOpen = Math.min(1, 0.35 + e * 0.65), o.eyeScale += e * 0.1, o.turnAngle += Math.sin(t * 1.1) * 0.06;
1923
2214
  },
1924
2215
  listening(o, t) {
1925
- o.turnAngle += 0.1 + Math.sin(t * 1.4) * 0.03, o.bob += q(t, 2.6, 0.25) * 2.2, o.eyeScale += 0.06, o.gazeY -= 0.8;
2216
+ o.turnAngle += 0.1 + Math.sin(t * 1.4) * 0.03, o.bob += U(t, 2.6, 0.25) * 2.2, o.eyeScale += 0.06, o.gazeY -= 0.8;
1926
2217
  },
1927
2218
  thinking(o, t) {
1928
2219
  o.gazeX += -6 + Math.sin(t * 0.9) * 3, o.gazeY += -4 + Math.cos(t * 0.7) * 2, o.browY -= 1 + Math.sin(t * 1.3) * 0.8, o.turnAngle += Math.sin(t * 0.6) * 0.05;
@@ -1945,12 +2236,12 @@ const Wt = {
1945
2236
  },
1946
2237
  angry(o, t) {
1947
2238
  o.shiftX += (Math.random() - 0.5) * 3, o.bob += (Math.random() - 0.5) * 2;
1948
- const e = q(t, 2.2, 0.3);
2239
+ const e = U(t, 2.2, 0.3);
1949
2240
  o.browY -= e * 2, o.browTilt -= e * 0.2;
1950
2241
  },
1951
2242
  drowsy(o, t) {
1952
2243
  const e = (Math.sin(t * 0.8) + 1) / 2;
1953
- o.bob += e * 3, o.eyeOpen = Math.max(0.08, 0.5 - e * 0.4), o.eyeOpen += q(t, 6.5, 0.08) * 0.5, o.browY += e * 2;
2244
+ o.bob += e * 3, o.eyeOpen = Math.max(0.08, 0.5 - e * 0.4), o.eyeOpen += U(t, 6.5, 0.08) * 0.5, o.browY += e * 2;
1954
2245
  },
1955
2246
  happy(o, t) {
1956
2247
  o.bob += -Math.abs(Math.sin(t * 3.2)) * 2.4, o.cheek += 0.15 + Math.abs(Math.sin(t * 3.2)) * 0.1, o.turnAngle += Math.sin(t * 1.6) * 0.05;
@@ -1962,7 +2253,7 @@ const Wt = {
1962
2253
  o.turnAngle += Math.sin(t * 0.9) * 0.16, o.shiftX += Math.sin(t * 0.9) * 1.8, o.browTilt += 0.15 + Math.sin(t * 1.7) * 0.1, o.gazeX += Math.sin(t * 0.6) * 4;
1963
2254
  },
1964
2255
  bored(o, t) {
1965
- o.shiftX += Math.sin(t * 0.5) * 2.2, o.gazeX += 6 + Math.sin(t * 0.3) * 3, o.eyeOpen = Math.min(o.eyeOpen, 0.5), o.bob += q(t, 7, 0.2) * 2;
2256
+ o.shiftX += Math.sin(t * 0.5) * 2.2, o.gazeX += 6 + Math.sin(t * 0.3) * 3, o.eyeOpen = Math.min(o.eyeOpen, 0.5), o.bob += U(t, 7, 0.2) * 2;
1966
2257
  },
1967
2258
  proud(o, t) {
1968
2259
  o.bob += -2 + Math.sin(t * 1.1) * 0.8, o.turnAngle += Math.sin(t * 0.7) * 0.04, o.gazeY -= 2, o.cheek += 0.1;
@@ -2015,11 +2306,11 @@ const Wt = {
2015
2306
  o.gazeY += 4, o.gazeX += Math.sin(t * 4.5) * 5, o.bob += Math.abs(Math.sin(t * 4.5)) * 1.2;
2016
2307
  },
2017
2308
  sending(o, t) {
2018
- const e = q(t, 1.6, 0.3);
2309
+ const e = U(t, 1.6, 0.3);
2019
2310
  o.shiftX += e * 4, o.bob += -e * 2, o.turnAngle += e * 0.08;
2020
2311
  },
2021
2312
  receiving(o, t) {
2022
- const e = q(t, 1.6, 0.3);
2313
+ const e = U(t, 1.6, 0.3);
2023
2314
  o.shiftX += -e * 4, o.bob += e * 1.5, o.eyeScale += e * 0.12;
2024
2315
  },
2025
2316
  uploading(o, t) {
@@ -2027,7 +2318,7 @@ const Wt = {
2027
2318
  o.bob += e * 4 - 2, o.gazeY -= 2, o.eyeScale += (1 - e) * 0.05;
2028
2319
  },
2029
2320
  notifying(o, t) {
2030
- const e = q(t, 2.4, 0.12) + q(t - 0.22, 2.4, 0.12);
2321
+ const e = U(t, 2.4, 0.12) + U(t - 0.22, 2.4, 0.12);
2031
2322
  o.bob += -e * 4, o.eyeScale += e * 0.12, o.turnAngle += e * 0.06;
2032
2323
  },
2033
2324
  alerting(o, t) {
@@ -2041,45 +2332,45 @@ const Wt = {
2041
2332
  },
2042
2333
  "powering-down"(o, t) {
2043
2334
  const e = Math.min(1, t % 8 / 8);
2044
- o.bob += e * 4, o.eyeOpen = Math.max(0.03, 0.4 - e * 0.37), o.eyeOpen += q(t, 2.7, 0.05) * 0.3, o.eyeScale -= e * 0.1;
2335
+ o.bob += e * 4, o.eyeOpen = Math.max(0.03, 0.4 - e * 0.37), o.eyeOpen += U(t, 2.7, 0.05) * 0.3, o.eyeScale -= e * 0.1;
2045
2336
  }
2046
2337
  };
2047
- function Ot(o, t, e, i, n) {
2048
- const c = Wt[o];
2049
- return c ? (c(t, e, i, n), !0) : !1;
2338
+ function fo(o, t, e, i, a) {
2339
+ const r = po[o];
2340
+ return r ? (r(t, e, i, a), !0) : !1;
2050
2341
  }
2051
- const Bt = 600;
2052
- function jt(o) {
2342
+ const $o = 600;
2343
+ function bo(o) {
2053
2344
  let t = null, e = !1;
2054
2345
  const i = () => {
2055
2346
  t !== null && (clearTimeout(t), t = null), e = !1;
2056
2347
  };
2057
- return { play: (c, a = {}) => {
2058
- if (i(), c.length === 0) return;
2059
- const h = a.mode ?? "once";
2348
+ return { play: (r, n = {}) => {
2349
+ if (i(), r.length === 0) return;
2350
+ const c = n.mode ?? "once";
2060
2351
  e = !0;
2061
- let $ = 0, b = 1;
2352
+ let f = 0, y = 1;
2062
2353
  const d = () => {
2063
2354
  if (!e) return;
2064
- const M = c[$];
2065
- o.applyStep(o.resolveStep(M)), t = setTimeout(() => {
2066
- var v;
2067
- if (h === "ping-pong")
2068
- c.length > 1 && (($ + b >= c.length || $ + b < 0) && (b = -b), $ += b);
2069
- else if ($ += 1, $ >= c.length)
2070
- if (h === "loop")
2071
- $ = 0;
2355
+ const x = r[f];
2356
+ o.applyStep(o.resolveStep(x)), t = setTimeout(() => {
2357
+ var M;
2358
+ if (c === "ping-pong")
2359
+ r.length > 1 && ((f + y >= r.length || f + y < 0) && (y = -y), f += y);
2360
+ else if (f += 1, f >= r.length)
2361
+ if (c === "loop")
2362
+ f = 0;
2072
2363
  else {
2073
- i(), (v = a.onComplete) == null || v.call(a);
2364
+ i(), (M = n.onComplete) == null || M.call(n);
2074
2365
  return;
2075
2366
  }
2076
2367
  d();
2077
- }, M.duration ?? Bt);
2368
+ }, x.duration ?? $o);
2078
2369
  };
2079
2370
  d();
2080
2371
  }, stop: i, isPlaying: () => e };
2081
2372
  }
2082
- const Ve = [
2373
+ const pt = [
2083
2374
  {
2084
2375
  label: "Interacción",
2085
2376
  states: ["idle", "near", "hover", "click"]
@@ -2132,50 +2423,50 @@ const Ve = [
2132
2423
  "powering-down"
2133
2424
  ]
2134
2425
  }
2135
- ], Zt = Ve.flatMap((o) => o.states), Rt = ["idle", "near", "hover", "click"], Nt = Ve.find((o) => o.label === "Reacciones").states, _t = Zt.filter(
2136
- (o) => !Rt.includes(o)
2426
+ ], go = pt.flatMap((o) => o.states), xo = ["idle", "near", "hover", "click"], Mo = pt.find((o) => o.label === "Reacciones").states, Fo = go.filter(
2427
+ (o) => !xo.includes(o)
2137
2428
  );
2138
- function Qt(o, t) {
2139
- return o ?? t ?? Nt;
2429
+ function ko(o, t) {
2430
+ return o ?? t ?? Mo;
2140
2431
  }
2141
- function qt(o, t) {
2432
+ function vo(o, t) {
2142
2433
  if (o.length <= 1) return o[0];
2143
2434
  let e = o[Math.floor(Math.random() * o.length)];
2144
2435
  for (; e === t; )
2145
2436
  e = o[Math.floor(Math.random() * o.length)];
2146
2437
  return e;
2147
2438
  }
2148
- class Vt {
2439
+ class Co {
2149
2440
  constructor(t = [], e = {}) {
2150
- g(this, "instances", /* @__PURE__ */ new Map());
2151
- g(this, "options");
2152
- g(this, "connectedPairs", /* @__PURE__ */ new Map());
2153
- g(this, "isRunning", !1);
2154
- g(this, "update", () => {
2441
+ v(this, "instances", /* @__PURE__ */ new Map());
2442
+ v(this, "options");
2443
+ v(this, "connectedPairs", /* @__PURE__ */ new Map());
2444
+ v(this, "isRunning", !1);
2445
+ v(this, "update", () => {
2155
2446
  const t = Array.from(this.instances.values());
2156
2447
  if (t.length < 2) return;
2157
2448
  const e = /* @__PURE__ */ new Set();
2158
2449
  for (let i = 0; i < t.length; i++)
2159
- for (let n = i + 1; n < t.length; n++) {
2160
- const c = t[i], a = t[n], h = c.getPosition(), $ = a.getPosition(), b = $.x - h.x, d = $.y - h.y, M = Math.hypot(b, d);
2161
- if (M <= this.options.proximityThreshold && M > 0) {
2162
- const v = this.getPairKey(c.id, a.id);
2163
- if (e.add(v), this.options.enableGazeSync) {
2164
- const A = Math.max(-0.8, Math.min(0.8, b / 160)) * 22, B = Math.max(-0.8, Math.min(0.8, d / 160)) * 14;
2165
- c.setGaze({ x: A, y: B }), a.setGaze({ x: -A, y: -B });
2450
+ for (let a = i + 1; a < t.length; a++) {
2451
+ const r = t[i], n = t[a], c = r.getPosition(), f = n.getPosition(), y = f.x - c.x, d = f.y - c.y, x = Math.hypot(y, d);
2452
+ if (x <= this.options.proximityThreshold && x > 0) {
2453
+ const M = this.getPairKey(r.id, n.id);
2454
+ if (e.add(M), this.options.enableGazeSync) {
2455
+ const E = Math.max(-0.8, Math.min(0.8, y / 160)) * 22, R = Math.max(-0.8, Math.min(0.8, d / 160)) * 14;
2456
+ r.setGaze({ x: E, y: R }), n.setGaze({ x: -E, y: -R });
2166
2457
  }
2167
- let Y = this.connectedPairs.get(v);
2168
- Y ? Math.random() < 0.08 && this.options.enableSynergies && (c.triggerParticles(1), a.triggerParticles(1)) : (Y = {
2169
- idA: c.id,
2170
- idB: a.id,
2458
+ let T = this.connectedPairs.get(M);
2459
+ T ? Math.random() < 0.08 && this.options.enableSynergies && (r.triggerParticles(1), n.triggerParticles(1)) : (T = {
2460
+ idA: r.id,
2461
+ idB: n.id,
2171
2462
  connectedSince: Date.now()
2172
- }, this.connectedPairs.set(v, Y), this.triggerSynergy(c, a));
2463
+ }, this.connectedPairs.set(M, T), this.triggerSynergy(r, n));
2173
2464
  }
2174
2465
  }
2175
- for (const [i, n] of this.connectedPairs.entries())
2466
+ for (const [i, a] of this.connectedPairs.entries())
2176
2467
  if (!e.has(i)) {
2177
- const c = this.instances.get(n.idA), a = this.instances.get(n.idB);
2178
- c && c.setGaze({ x: 0, y: 0 }), a && a.setGaze({ x: 0, y: 0 }), this.connectedPairs.delete(i);
2468
+ const r = this.instances.get(a.idA), n = this.instances.get(a.idB);
2469
+ r && r.setGaze({ x: 0, y: 0 }), n && n.setGaze({ x: 0, y: 0 }), this.connectedPairs.delete(i);
2179
2470
  }
2180
2471
  });
2181
2472
  this.options = {
@@ -2191,10 +2482,10 @@ class Vt {
2191
2482
  !t || !t.id || this.instances.delete(t.id);
2192
2483
  }
2193
2484
  start() {
2194
- this.isRunning || (this.isRunning = !0, O.add(this.update));
2485
+ this.isRunning || (this.isRunning = !0, B.add(this.update));
2195
2486
  }
2196
2487
  stop() {
2197
- this.isRunning && (this.isRunning = !1, O.remove(this.update));
2488
+ this.isRunning && (this.isRunning = !1, B.remove(this.update));
2198
2489
  }
2199
2490
  getPairKey(t, e) {
2200
2491
  return t < e ? `${t}:${e}` : `${e}:${t}`;
@@ -2204,40 +2495,40 @@ class Vt {
2204
2495
  */
2205
2496
  triggerSynergy(t, e) {
2206
2497
  if (!this.options.enableSynergies) return;
2207
- const i = t.emotionCategory || "happy", n = e.emotionCategory || "happy";
2208
- if (U.playSound(i, "hover"), t.triggerParticles(6), e.triggerParticles(6), i === "happy" && n === "happy")
2498
+ const i = t.emotionCategory || "happy", a = e.emotionCategory || "happy";
2499
+ if (oe.playSound(i, "hover"), t.triggerParticles(6), e.triggerParticles(6), i === "happy" && a === "happy")
2209
2500
  t.bounce(), e.bounce();
2210
- else if (i === "happy" && n === "sad" || i === "sad" && n === "happy") {
2211
- const c = i === "happy" ? t : e, a = i === "sad" ? t : e;
2212
- c.setEmotion("hover"), a.setEmotion("near");
2213
- } else (i === "intense" || n === "intense") && (t.spin(0.5), e.spin(0.5));
2501
+ else if (i === "happy" && a === "sad" || i === "sad" && a === "happy") {
2502
+ const r = i === "happy" ? t : e, n = i === "sad" ? t : e;
2503
+ r.setEmotion("hover"), n.setEmotion("near");
2504
+ } else (i === "intense" || a === "intense") && (t.spin(0.5), e.spin(0.5));
2214
2505
  }
2215
2506
  destroy() {
2216
2507
  this.stop(), this.instances.clear(), this.connectedPairs.clear();
2217
2508
  }
2218
2509
  }
2219
- function Ht(o = [], t = {}) {
2220
- return new Vt(o, t);
2510
+ function wo(o = [], t = {}) {
2511
+ return new Co(o, t);
2221
2512
  }
2222
- const He = "wissive:custom:";
2223
- function Ut(o) {
2513
+ const ft = "wissive:custom:";
2514
+ function To(o) {
2224
2515
  const t = {};
2225
2516
  for (const e in o)
2226
2517
  t[e] = o[e].map((i) => ({ ...i }));
2227
2518
  return t;
2228
2519
  }
2229
- function Jt(o, t = {}) {
2230
- var b, d, M;
2231
- const e = t.eyesFrom ? oe[t.eyesFrom] : void 0, i = t.mouthFrom ? oe[t.mouthFrom] : void 0, n = t.motionFrom ? oe[t.motionFrom] : void 0, c = t.particlesFrom ? oe[t.particlesFrom] : void 0, a = t.soundFrom ? oe[t.soundFrom] : void 0, h = Ut(Ce.expressions);
2232
- for (const v in h) {
2233
- const Y = e && (((b = e.expressions[v]) == null ? void 0 : b[0]) ?? e.expressions.idle[0]), A = i && (((d = i.expressions[v]) == null ? void 0 : d[0]) ?? i.expressions.idle[0]);
2234
- h[v] = h[v].map((B) => ({
2235
- ...B,
2236
- ...Y && { eyeType: Y.eyeType, eyeScale: Y.eyeScale },
2237
- ...A && {
2238
- mouthType: A.mouthType,
2239
- mouthCurve: A.mouthCurve,
2240
- mouthWidth: A.mouthWidth
2520
+ function So(o, t = {}) {
2521
+ var y, d, x;
2522
+ const e = t.eyesFrom ? ne[t.eyesFrom] : void 0, i = t.mouthFrom ? ne[t.mouthFrom] : void 0, a = t.motionFrom ? ne[t.motionFrom] : void 0, r = t.particlesFrom ? ne[t.particlesFrom] : void 0, n = t.soundFrom ? ne[t.soundFrom] : void 0, c = To(De.expressions);
2523
+ for (const M in c) {
2524
+ const T = e && (((y = e.expressions[M]) == null ? void 0 : y[0]) ?? e.expressions.idle[0]), E = i && (((d = i.expressions[M]) == null ? void 0 : d[0]) ?? i.expressions.idle[0]);
2525
+ c[M] = c[M].map((R) => ({
2526
+ ...R,
2527
+ ...T && { eyeType: T.eyeType, eyeScale: T.eyeScale },
2528
+ ...E && {
2529
+ mouthType: E.mouthType,
2530
+ mouthCurve: E.mouthCurve,
2531
+ mouthWidth: E.mouthWidth
2241
2532
  },
2242
2533
  // Los overrides van al final y ganan: son para los tipos nuevos que
2243
2534
  // ningún personaje del catálogo tiene todavía, así que no hay un
@@ -2246,36 +2537,36 @@ function Jt(o, t = {}) {
2246
2537
  ...t.mouthTypeOverride !== void 0 && { mouthType: t.mouthTypeOverride }
2247
2538
  }));
2248
2539
  }
2249
- const $ = (M = t.stateBank) == null ? void 0 : M.filter((v) => _t.includes(v));
2540
+ const f = (x = t.stateBank) == null ? void 0 : x.filter((M) => Fo.includes(M));
2250
2541
  return {
2251
2542
  name: o,
2252
2543
  emotion: "custom",
2253
- baseColor: t.baseColor || Ce.baseColor,
2544
+ baseColor: t.baseColor || De.baseColor,
2254
2545
  silhouette: t.silhouette || "circle",
2255
- motion: n ? { ...n.motion } : { ...Ce.motion },
2256
- expressions: h,
2257
- particleEmotion: c == null ? void 0 : c.emotion,
2258
- soundEmotion: a == null ? void 0 : a.emotion,
2259
- ...$ && $.length > 0 && { autonomousStatePool: $ }
2546
+ motion: a ? { ...a.motion } : { ...De.motion },
2547
+ expressions: c,
2548
+ particleEmotion: r == null ? void 0 : r.emotion,
2549
+ soundEmotion: n == null ? void 0 : n.emotion,
2550
+ ...f && f.length > 0 && { autonomousStatePool: f }
2260
2551
  };
2261
2552
  }
2262
- function Kt(o, t) {
2263
- localStorage.setItem(He + o, JSON.stringify(t));
2553
+ function Yo(o, t) {
2554
+ localStorage.setItem(ft + o, JSON.stringify(t));
2264
2555
  }
2265
- function co(o) {
2266
- const t = localStorage.getItem(He + o);
2556
+ function Bo(o) {
2557
+ const t = localStorage.getItem(ft + o);
2267
2558
  return t ? JSON.parse(t) : null;
2268
2559
  }
2269
- function ho(o, t = {}) {
2270
- const e = Jt(o, t);
2271
- return oe[o] = e, Kt(o, e), e;
2560
+ function jo(o, t = {}) {
2561
+ const e = So(o, t);
2562
+ return ne[o] = e, Yo(o, e), e;
2272
2563
  }
2273
- const eo = {
2564
+ const Eo = {
2274
2565
  idle: 1,
2275
2566
  near: 0.7,
2276
2567
  hover: 0.5,
2277
2568
  click: 0.35
2278
- }, to = {
2569
+ }, Ao = {
2279
2570
  xs: 48,
2280
2571
  sm: 80,
2281
2572
  base: 120,
@@ -2283,405 +2574,439 @@ const eo = {
2283
2574
  xl: 200,
2284
2575
  "2xl": 240
2285
2576
  };
2286
- function Ze(o = "base") {
2287
- return typeof o == "number" ? o : to[o] ?? 120;
2577
+ function at(o = "base") {
2578
+ return typeof o == "number" ? o : Ao[o] ?? 120;
2288
2579
  }
2289
- function oo(o, t) {
2580
+ function zo(o, t) {
2290
2581
  const {
2291
2582
  target: e,
2292
2583
  size: i = "base",
2293
- interactive: n = !0,
2294
- draggable: c = !0,
2295
- nearRadius: a = 120,
2296
- sound: h = !0,
2297
- flipX: $ = !1,
2298
- emphasis: b = !1,
2584
+ interactive: a = !0,
2585
+ draggable: r = !0,
2586
+ nearRadius: n = 120,
2587
+ sound: c = !0,
2588
+ flipX: f = !1,
2589
+ emphasis: y = !1,
2299
2590
  gazeTracking: d = !1,
2300
- ambientParticles: M = !0,
2301
- autonomousStates: v = !0,
2302
- autonomousStatePool: Y,
2303
- reducedMotion: A = "auto",
2304
- theme: B = "auto"
2305
- } = t, X = We(o) || We("mochi"), G = X.motion;
2306
- let Z = Ze(i), _ = A, J = B, ae = X.baseColor;
2307
- const K = X.particleEmotion || X.emotion, ie = X.soundEmotion || X.emotion, I = () => typeof _ == "boolean" ? _ : Pt(), E = document.createElement("div");
2308
- E.className = "wissive-wrapper", E.style.width = `${Z}px`, E.style.height = `${Z}px`, E.style.display = "inline-block", E.style.position = "relative";
2309
- const s = document.createElement("div");
2310
- s.className = "wissive-emoji", s.setAttribute("role", "img"), n && s.setAttribute("tabindex", "0");
2311
- const Se = {
2591
+ ambientParticles: x = !0,
2592
+ autonomousStates: M = !0,
2593
+ autonomousStatePool: T,
2594
+ reducedMotion: E = "auto",
2595
+ theme: R = "auto"
2596
+ } = t, z = et(o) || et("mochi"), Z = z.motion;
2597
+ let G = at(i), _ = E, he = R, xe = z.baseColor;
2598
+ const K = z.particleEmotion || z.emotion, W = z.soundEmotion || z.emotion, D = () => typeof _ == "boolean" ? _ : lo(), h = document.createElement("div");
2599
+ h.className = "wissive-wrapper", h.style.width = `${G}px`, h.style.height = `${G}px`, h.style.display = "inline-block", h.style.position = "relative";
2600
+ const L = document.createElement("div");
2601
+ L.className = "wissive-emoji", L.setAttribute("role", "img"), a && L.setAttribute("tabindex", "0");
2602
+ const we = {
2312
2603
  idle: "Reposo",
2313
2604
  near: "Cerca",
2314
2605
  hover: "Hover",
2315
2606
  click: "Presionado"
2316
- }, le = (y) => {
2317
- s.setAttribute(
2607
+ }, Me = (p) => {
2608
+ L.setAttribute(
2318
2609
  "aria-label",
2319
- `${X.name} (${X.emotion}) emoji - Estado: ${Se[y] || y}`
2610
+ `${z.name} (${z.emotion}) emoji - Estado: ${we[p] || p}`
2320
2611
  );
2321
2612
  };
2322
- le("idle"), s.style.width = `${Z}px`, s.style.height = `${Z}px`, s.style.display = "inline-block", s.style.userSelect = "none", s.style.cursor = n ? "pointer" : "default", s.style.willChange = "transform", s.style.transformOrigin = "center center", E.appendChild(s), e.appendChild(E);
2323
- const fe = Xt(() => {
2324
- ee();
2613
+ Me("idle"), L.style.width = `${G}px`, L.style.height = `${G}px`, L.style.display = "inline-block", L.style.userSelect = "none", L.style.cursor = a ? "pointer" : "default", L.style.willChange = "transform", L.style.transformOrigin = "center center", h.appendChild(L), e.appendChild(h);
2614
+ const Te = co(() => {
2615
+ te();
2325
2616
  });
2326
- let ce = $, ne = b, se = d, R = h, he = c, pe = M, w = v, m = Qt(
2327
- Y,
2328
- X.autonomousStatePool
2617
+ let be = f, Fe = y, de = d, ue = c, ie = r, ge = x, Se = M, ke = ko(
2618
+ T,
2619
+ z.autonomousStatePool
2329
2620
  );
2330
- const u = new $t(), S = X.expressions.idle, ue = u.pickVariant(S, "idle"), j = ft(ue, {
2331
- stiffness: G.stiffness,
2332
- damping: G.damping
2621
+ const g = new lt(), ve = z.expressions.idle, se = g.pickVariant(ve, "idle"), q = Lt(se, {
2622
+ stiffness: Z.stiffness,
2623
+ damping: Z.damping
2333
2624
  });
2334
- let re = !1, r = !1, l = !1, k = Math.random() * 100, C = !1, L = null, p = null;
2335
- const z = new At(E, Z);
2336
- let P = {
2625
+ let Y = z.silhouette, u = [...ot(Y)], m = [...u], F = [...u], We = 0, s = 400, l = !1, C = !1, S = !1, w = !1, b = Math.random() * 100, V = !1, ee = null, k = null;
2626
+ const P = new ao(h, G);
2627
+ let A = {
2337
2628
  offsetX: 0,
2338
2629
  offsetY: 0,
2339
2630
  scaleX: 1,
2340
2631
  scaleY: 1,
2341
2632
  rotation: 0
2342
- }, T = null;
2343
- const x = () => {
2344
- T || (T = new zt(
2345
- s,
2346
- (y) => {
2347
- P = y, D();
2633
+ }, J = null;
2634
+ const me = () => {
2635
+ J || (J = new ro(
2636
+ L,
2637
+ (p) => {
2638
+ A = p, ye();
2348
2639
  },
2349
2640
  {
2350
2641
  onDragStart: () => {
2351
- R && U.playSound(ie, "click");
2642
+ ue && oe.playSound(W, "click");
2352
2643
  },
2353
2644
  onDragEnd: () => {
2354
- z.burst(K, 10), R && U.playSound(ie, "bounce");
2645
+ P.burst(K, 10), ue && oe.playSound(W, "bounce");
2355
2646
  }
2356
2647
  }
2357
2648
  ));
2358
2649
  };
2359
- he && n && x();
2360
- const D = () => {
2361
- const y = I(), F = y ? 0 : G.idleSpeed * 0.35, W = y ? 0 : 0.04, V = 1 + W * Math.cos(k * F), Q = 1 - W * Math.sin(k * F), ye = P.offsetX !== 0 || P.offsetY !== 0 || P.scaleX !== 1 || P.scaleY !== 1;
2362
- let Ye, Fe, Ee;
2363
- ye ? (Ye = V * P.scaleX, Fe = Q * P.scaleY, Ee = P.rotation) : (Ye = V, Fe = Q, Ee = 0);
2364
- const Je = P.offsetX, Ke = P.offsetY;
2365
- s.style.transform = `translate(${Je.toFixed(1)}px, ${Ke.toFixed(1)}px) rotate(${(Ee * 180 / Math.PI).toFixed(2)}deg) scale(${Ye.toFixed(4)}, ${Fe.toFixed(4)})`;
2366
- }, ee = () => {
2367
- const y = j.getValues(), F = u.getState();
2368
- let W = X.baseColor;
2369
- if (typeof J == "object" && J.baseColor && (W = J.baseColor), ae = It(ae, W, 0.15), C && (y.eyeOpen = 0.05), !I() && !Ot(
2370
- F,
2371
- y,
2372
- k,
2373
- G.idleSpeed,
2374
- G.idleAmplitude
2650
+ ie && a && me();
2651
+ const ye = () => {
2652
+ const p = D(), X = p ? 0 : Z.idleSpeed * 0.35, O = p ? 0 : 0.04, H = 1 + O * Math.cos(b * X), Q = 1 - O * Math.sin(b * X), fe = A.offsetX !== 0 || A.offsetY !== 0 || A.scaleX !== 1 || A.scaleY !== 1;
2653
+ let je, Re, Ze;
2654
+ fe ? (je = H * A.scaleX, Re = Q * A.scaleY, Ze = A.rotation) : (je = H, Re = Q, Ze = 0);
2655
+ const bt = A.offsetX, gt = A.offsetY;
2656
+ L.style.transform = `translate(${bt.toFixed(1)}px, ${gt.toFixed(1)}px) rotate(${(Ze * 180 / Math.PI).toFixed(2)}deg) scale(${je.toFixed(4)}, ${Re.toFixed(4)})`;
2657
+ }, te = () => {
2658
+ const p = q.getValues(), X = g.getState();
2659
+ let O = z.baseColor;
2660
+ if (typeof he == "object" && he.baseColor && (O = he.baseColor), xe = mo(xe, O, 0.15), V && (p.eyeOpen = 0.05), !D() && !fo(
2661
+ X,
2662
+ p,
2663
+ b,
2664
+ Z.idleSpeed,
2665
+ Z.idleAmplitude
2375
2666
  )) {
2376
- const Q = eo[F] ?? 1;
2377
- Gt(
2378
- G.motionType,
2379
- y,
2380
- k,
2381
- G.idleSpeed,
2382
- G.idleAmplitude,
2667
+ const Q = Eo[X] ?? 1;
2668
+ yo(
2669
+ Z.motionType,
2670
+ p,
2671
+ b,
2672
+ Z.idleSpeed,
2673
+ Z.idleAmplitude,
2383
2674
  Q
2384
2675
  );
2385
2676
  }
2386
- D(), s.innerHTML = _e(
2387
- X.silhouette,
2388
- ae,
2389
- y,
2390
- Z,
2391
- { flipX: ce, emphasis: ne },
2392
- k
2677
+ ye(), L.innerHTML = ut(
2678
+ z.silhouette,
2679
+ xe,
2680
+ p,
2681
+ G,
2682
+ {
2683
+ flipX: be,
2684
+ emphasis: Fe,
2685
+ radii: u
2686
+ },
2687
+ b
2393
2688
  );
2394
- }, de = (y = u.getState()) => {
2395
- u.setState(y);
2396
- const F = u.resolvePool(X.expressions, y);
2397
- if (!(!F || F.length === 0)) {
2398
- if (F.length === 1) {
2399
- const W = u.pickVariant(F, y);
2400
- j.setTargets(W), O.add(N);
2689
+ }, Oe = (p = g.getState()) => {
2690
+ g.setState(p);
2691
+ const X = g.resolvePool(z.expressions, p);
2692
+ if (!(!X || X.length === 0)) {
2693
+ if (X.length === 1) {
2694
+ const O = g.pickVariant(X, p);
2695
+ q.setTargets(O), B.add(N);
2401
2696
  return;
2402
2697
  }
2403
- C = !0, O.add(N), setTimeout(() => {
2404
- const W = u.pickVariant(F, y);
2405
- j.setTargets(W), O.add(N), setTimeout(() => {
2406
- C = !1, O.add(N);
2698
+ V = !0, B.add(N), setTimeout(() => {
2699
+ const O = g.pickVariant(X, p);
2700
+ q.setTargets(O), B.add(N), setTimeout(() => {
2701
+ V = !1, B.add(N);
2407
2702
  }, 120);
2408
2703
  }, 100);
2409
2704
  }
2410
- }, H = (y) => {
2411
- le(y), de(y);
2412
- }, te = jt({
2413
- resolveStep(y) {
2414
- return { ...y.state ? u.pickVariant(
2415
- u.resolvePool(X.expressions, y.state),
2416
- y.state
2417
- ) : {}, ...y.params };
2705
+ }, re = (p) => {
2706
+ Me(p), Oe(p);
2707
+ }, pe = bo({
2708
+ resolveStep(p) {
2709
+ return { ...p.state ? g.pickVariant(
2710
+ g.resolvePool(z.expressions, p.state),
2711
+ p.state
2712
+ ) : {}, ...p.params };
2418
2713
  },
2419
- applyStep(y) {
2420
- j.setTargets(y), O.add(N);
2714
+ applyStep(p) {
2715
+ q.setTargets(p), B.add(N);
2716
+ }
2717
+ }), N = (p) => {
2718
+ b += p;
2719
+ const X = q.update(p);
2720
+ if (l) {
2721
+ const H = (typeof performance < "u" ? performance.now() : Date.now()) - We, Q = Math.min(1, Math.max(0, H / s)), fe = 1 - Math.pow(1 - Q, 4);
2722
+ u = Zt(F, m, fe), Q >= 1 && (l = !1, u = [...m]);
2421
2723
  }
2422
- }), N = (y) => {
2423
- k += y;
2424
- const F = j.update(y);
2425
- ee(), !F && u.getState() !== "idle" && O.remove(N);
2724
+ te(), !X && !l && g.getState() !== "idle" && B.remove(N);
2426
2725
  };
2427
- O.add(N);
2428
- const Pe = () => {
2429
- const W = 3e3 + Math.random() * 4e3;
2430
- p = window.setTimeout(() => {
2431
- u.getState() === "idle" && !C && (C = !0, O.add(N), L = window.setTimeout(() => {
2432
- C = !1, O.add(N);
2433
- }, 180)), Pe();
2434
- }, W);
2726
+ B.add(N);
2727
+ const Qe = () => {
2728
+ const O = 3e3 + Math.random() * 4e3;
2729
+ k = window.setTimeout(() => {
2730
+ g.getState() === "idle" && !V && (V = !0, B.add(N), ee = window.setTimeout(() => {
2731
+ V = !1, B.add(N);
2732
+ }, 180)), Qe();
2733
+ }, O);
2435
2734
  };
2436
- Pe();
2437
- let $e = null;
2438
- const Xe = () => {
2439
- const y = G.idleIntervalMin, F = G.idleIntervalMax, W = y + Math.random() * (F - y);
2440
- $e = window.setTimeout(() => {
2441
- u.getState() === "idle" && !te.isPlaying() && de("idle"), Xe();
2442
- }, W);
2735
+ Qe();
2736
+ let Ye = null;
2737
+ const Ve = () => {
2738
+ const p = Z.idleIntervalMin, X = Z.idleIntervalMax, O = p + Math.random() * (X - p);
2739
+ Ye = window.setTimeout(() => {
2740
+ g.getState() === "idle" && !pe.isPlaying() && Oe("idle"), Ve();
2741
+ }, O);
2443
2742
  };
2444
- Xe();
2445
- let be = null, ge = null;
2446
- const Le = () => {
2447
- const W = 3500 + Math.random() * 4500;
2448
- be = window.setTimeout(() => {
2449
- if (u.getState() === "idle" && !se && !te.isPlaying()) {
2450
- const V = [
2743
+ Ve();
2744
+ let Ee = null, Ae = null;
2745
+ const He = () => {
2746
+ const O = 3500 + Math.random() * 4500;
2747
+ Ee = window.setTimeout(() => {
2748
+ if (g.getState() === "idle" && !de && !pe.isPlaying()) {
2749
+ const H = [
2451
2750
  { x: -9, y: 0 },
2452
2751
  { x: 9, y: 0 },
2453
2752
  { x: -7, y: -4 },
2454
2753
  { x: 7, y: -4 },
2455
2754
  { x: 0, y: -5 },
2456
2755
  { x: 0, y: 4 }
2457
- ], Q = V[Math.floor(Math.random() * V.length)];
2458
- j.setTargets({ gazeX: Q.x, gazeY: Q.y }), O.add(N);
2459
- const ye = 1200 + Math.random() * 1500;
2460
- ge = window.setTimeout(() => {
2461
- se || (j.setTargets({ gazeX: 0, gazeY: 0 }), O.add(N));
2462
- }, ye);
2756
+ ], Q = H[Math.floor(Math.random() * H.length)];
2757
+ q.setTargets({ gazeX: Q.x, gazeY: Q.y }), B.add(N);
2758
+ const fe = 1200 + Math.random() * 1500;
2759
+ Ae = window.setTimeout(() => {
2760
+ de || (q.setTargets({ gazeX: 0, gazeY: 0 }), B.add(N));
2761
+ }, fe);
2463
2762
  }
2464
- Le();
2465
- }, W);
2763
+ He();
2764
+ }, O);
2466
2765
  };
2467
- Le();
2468
- let Me = null;
2469
- const De = () => {
2470
- const W = 3500 + Math.random() * 5e3;
2471
- Me = window.setTimeout(() => {
2472
- if (pe && !I()) {
2473
- const V = u.getState();
2474
- if (V === "idle" || V === "near" || V === "hover") {
2766
+ He();
2767
+ let ze = null;
2768
+ const Ue = () => {
2769
+ const O = 3500 + Math.random() * 5e3;
2770
+ ze = window.setTimeout(() => {
2771
+ if (ge && !D()) {
2772
+ const H = g.getState();
2773
+ if (H === "idle" || H === "near" || H === "hover") {
2475
2774
  const Q = Math.floor(2 + Math.random() * 3);
2476
- z.burst(K, Q);
2775
+ P.burst(K, Q);
2477
2776
  }
2478
2777
  }
2479
- De();
2480
- }, W);
2778
+ Ue();
2779
+ }, O);
2481
2780
  };
2482
- De();
2483
- let ve = null, ke = null, Ie = null;
2484
- const Ge = () => {
2485
- const W = 5e3 + Math.random() * 6e3;
2486
- ve = window.setTimeout(() => {
2487
- if (w && m.length > 0 && !I() && !te.isPlaying() && u.getState() === "idle" && !re && !r && !l) {
2488
- const Q = qt(m, Ie);
2489
- Ie = Q, H(Q);
2490
- const ye = 1800 + Math.random() * 2200;
2491
- ke = window.setTimeout(() => {
2492
- u.getState() === Q && !re && !r && !l && H("idle");
2493
- }, ye);
2781
+ Ue();
2782
+ let Pe = null, Xe = null, Je = null;
2783
+ const Ke = () => {
2784
+ const O = 5e3 + Math.random() * 6e3;
2785
+ Pe = window.setTimeout(() => {
2786
+ if (Se && ke.length > 0 && !D() && !pe.isPlaying() && g.getState() === "idle" && !C && !S && !w) {
2787
+ const Q = vo(ke, Je);
2788
+ Je = Q, re(Q);
2789
+ const fe = 1800 + Math.random() * 2200;
2790
+ Xe = window.setTimeout(() => {
2791
+ g.getState() === Q && !C && !S && !w && re("idle");
2792
+ }, fe);
2494
2793
  }
2495
- Ge();
2496
- }, W);
2794
+ Ke();
2795
+ }, O);
2497
2796
  };
2498
- Ge();
2499
- const Ue = () => {
2500
- $e !== null && (clearTimeout($e), $e = null), p !== null && (clearTimeout(p), p = null), L !== null && (clearTimeout(L), L = null), be !== null && (clearTimeout(be), be = null), ge !== null && (clearTimeout(ge), ge = null), Me !== null && (clearTimeout(Me), Me = null), ve !== null && (clearTimeout(ve), ve = null), ke !== null && (clearTimeout(ke), ke = null);
2797
+ Ke();
2798
+ const $t = () => {
2799
+ Ye !== null && (clearTimeout(Ye), Ye = null), k !== null && (clearTimeout(k), k = null), ee !== null && (clearTimeout(ee), ee = null), Ee !== null && (clearTimeout(Ee), Ee = null), Ae !== null && (clearTimeout(Ae), Ae = null), ze !== null && (clearTimeout(ze), ze = null), Pe !== null && (clearTimeout(Pe), Pe = null), Xe !== null && (clearTimeout(Xe), Xe = null);
2501
2800
  };
2502
- let xe = null;
2503
- const me = () => l ? "click" : r ? "hover" : re ? "near" : "idle";
2504
- return n && (xe = Tt(
2505
- s,
2801
+ let Be = null;
2802
+ const Ce = () => w ? "click" : S ? "hover" : C ? "near" : "idle";
2803
+ return a && (Be = eo(
2804
+ L,
2506
2805
  {
2507
2806
  onHoverStart: () => {
2508
- r = !0, R && U.playSound(ie, "hover"), H(me());
2807
+ S = !0, ue && oe.playSound(W, "hover"), re(Ce());
2509
2808
  },
2510
2809
  onHoverEnd: () => {
2511
- r = !1, H(me());
2810
+ S = !1, re(Ce());
2512
2811
  },
2513
2812
  onClickStart: () => {
2514
- l = !0, R && U.playSound(ie, "click"), I() || z.burst(K, 8), H(me());
2813
+ w = !0, ue && oe.playSound(W, "click"), D() || P.burst(K, 8), re(Ce());
2515
2814
  },
2516
2815
  onClickEnd: () => {
2517
- l = !1, H(me());
2816
+ w = !1, re(Ce());
2518
2817
  },
2519
- onNearChange: (y) => {
2520
- re = y, H(me());
2818
+ onNearChange: (p) => {
2819
+ C = p, re(Ce());
2521
2820
  },
2522
- onGazeMove: (y, F) => {
2523
- se && (j.setTargets({ gazeX: y, gazeY: F }), O.add(N));
2821
+ onGazeMove: (p, X) => {
2822
+ de && (q.setTargets({ gazeX: p, gazeY: X }), B.add(N));
2524
2823
  }
2525
2824
  },
2526
- a
2825
+ n
2527
2826
  )), {
2528
2827
  id: "wissive-" + Math.random().toString(36).substring(2, 9),
2529
- name: X.name,
2530
- emotionCategory: X.emotion,
2828
+ name: z.name,
2829
+ emotionCategory: z.emotion,
2531
2830
  getElement() {
2532
- return s;
2831
+ return L;
2533
2832
  },
2534
2833
  getPosition() {
2535
- const y = s.getBoundingClientRect();
2834
+ const p = L.getBoundingClientRect();
2536
2835
  return {
2537
- x: y.left + y.width / 2,
2538
- y: y.top + y.height / 2
2836
+ x: p.left + p.width / 2,
2837
+ y: p.top + p.height / 2
2539
2838
  };
2540
2839
  },
2541
2840
  getCurrentState() {
2542
- return u.getState();
2841
+ return g.getState();
2543
2842
  },
2544
- setEmotion(y) {
2545
- I() || (y === "click" ? z.burst(K, 8) : y === "hover" && z.burst(K, 4)), H(y);
2843
+ setEmotion(p) {
2844
+ D() || (p === "click" ? P.burst(K, 8) : p === "hover" && P.burst(K, 4)), re(p);
2546
2845
  },
2547
- spin(y = 1) {
2548
- const F = j.getValues().turnAngle || 0;
2549
- j.setTargets({ turnAngle: F + Math.PI * 2 * y }), O.add(N);
2846
+ spin(p = 1) {
2847
+ const X = q.getValues().turnAngle || 0;
2848
+ q.setTargets({ turnAngle: X + Math.PI * 2 * p }), B.add(N);
2550
2849
  },
2551
2850
  bounce() {
2552
- R && U.playSound(ie, "bounce"), I() || z.burst(K, 5);
2553
- const y = j.getValues().bob || 0;
2554
- j.setTargets({ bob: y - 14 }), O.add(N);
2851
+ ue && oe.playSound(W, "bounce"), D() || P.burst(K, 5);
2852
+ const p = q.getValues().bob || 0;
2853
+ q.setTargets({ bob: p - 14 }), B.add(N);
2854
+ },
2855
+ setGaze(p) {
2856
+ q.setTargets({ gazeX: p.x, gazeY: p.y }), B.add(N);
2857
+ },
2858
+ setGazeTracking(p) {
2859
+ de = p, p || (q.setTargets({ gazeX: 0, gazeY: 0 }), B.add(N));
2555
2860
  },
2556
- setGaze(y) {
2557
- j.setTargets({ gazeX: y.x, gazeY: y.y }), O.add(N);
2861
+ setSound(p) {
2862
+ ue = p;
2558
2863
  },
2559
- setGazeTracking(y) {
2560
- se = y, y || (j.setTargets({ gazeX: 0, gazeY: 0 }), O.add(N));
2864
+ setDraggable(p) {
2865
+ ie = p, p && !J && a ? me() : !p && J && (J.destroy(), J = null, A = { offsetX: 0, offsetY: 0, scaleX: 1, scaleY: 1, rotation: 0, isDragging: !1 }, ye());
2561
2866
  },
2562
- setSound(y) {
2563
- R = y;
2867
+ setFlipX(p) {
2868
+ be = p, te();
2564
2869
  },
2565
- setDraggable(y) {
2566
- he = y, y && !T && n ? x() : !y && T && (T.destroy(), T = null, P = { offsetX: 0, offsetY: 0, scaleX: 1, scaleY: 1, rotation: 0, isDragging: !1 }, D());
2870
+ setEmphasis(p) {
2871
+ Fe = p, te();
2567
2872
  },
2568
- setFlipX(y) {
2569
- ce = y, ee();
2873
+ setAmbientParticles(p) {
2874
+ ge = p;
2570
2875
  },
2571
- setEmphasis(y) {
2572
- ne = y, ee();
2876
+ setAutonomousStates(p) {
2877
+ Se = p;
2573
2878
  },
2574
- setAmbientParticles(y) {
2575
- pe = y;
2879
+ setAutonomousStatePool(p) {
2880
+ ke = p;
2576
2881
  },
2577
- setAutonomousStates(y) {
2578
- w = y;
2882
+ setReducedMotion(p) {
2883
+ _ = p, te();
2579
2884
  },
2580
- setAutonomousStatePool(y) {
2581
- m = y;
2885
+ setTheme(p) {
2886
+ he = p, te();
2582
2887
  },
2583
- setReducedMotion(y) {
2584
- _ = y, ee();
2888
+ setSize(p) {
2889
+ G = at(p), h.style.width = `${G}px`, h.style.height = `${G}px`, L.style.width = `${G}px`, L.style.height = `${G}px`, P.resize(G), te();
2585
2890
  },
2586
- setTheme(y) {
2587
- J = y, ee();
2891
+ setSilhouette(p, X = 400) {
2892
+ Y === p && !l || (Y = p, z.silhouette = p, F = [...u], m = ot(p), We = typeof performance < "u" ? performance.now() : Date.now(), s = D() ? 0 : X, s === 0 ? (u = [...m], l = !1) : l = !0, B.add(N), te());
2588
2893
  },
2589
- setSize(y) {
2590
- Z = Ze(y), E.style.width = `${Z}px`, E.style.height = `${Z}px`, s.style.width = `${Z}px`, s.style.height = `${Z}px`, z.resize(Z), ee();
2894
+ setSpringConfig(p) {
2895
+ q.setConfig(p);
2591
2896
  },
2592
- triggerParticles(y = 8) {
2593
- I() || z.burst(K, y);
2897
+ triggerParticles(p = 8) {
2898
+ D() || P.burst(K, p);
2594
2899
  },
2595
- playSequence(y, F) {
2596
- te.play(y, F);
2900
+ playSequence(p, X) {
2901
+ pe.play(p, X);
2597
2902
  },
2598
2903
  stopSequence() {
2599
- te.stop(), de(u.getState());
2904
+ pe.stop(), Oe(g.getState());
2600
2905
  },
2601
2906
  isSequencePlaying() {
2602
- return te.isPlaying();
2907
+ return pe.isPlaying();
2603
2908
  },
2604
2909
  destroy() {
2605
- te.stop(), Ue(), fe(), O.remove(N), z.destroy(), T && T.destroy(), xe && xe(), E.remove();
2910
+ pe.stop(), $t(), Te(), B.remove(N), P.destroy(), J && J.destroy(), Be && Be(), h.remove();
2606
2911
  }
2607
2912
  };
2608
2913
  }
2609
- const uo = {
2610
- create: oo,
2611
- createGroup: Ht,
2612
- setGlobalSound: xt,
2613
- isGlobalSoundEnabled: Yt,
2614
- setGlobalVolume: Ft,
2615
- getGlobalVolume: Et,
2616
- supportsHover: Qe,
2617
- isTouchDevice: kt
2914
+ const Ro = {
2915
+ create: zo,
2916
+ createGroup: wo,
2917
+ setGlobalSound: oo,
2918
+ isGlobalSoundEnabled: io,
2919
+ setGlobalVolume: so,
2920
+ getGlobalVolume: no,
2921
+ supportsHover: mt,
2922
+ isTouchDevice: Ut
2618
2923
  };
2619
2924
  export {
2620
- Zt as ALL_STATES,
2621
- _t as ALL_WANDERABLE_STATES,
2622
- Nt as AUTONOMOUS_STATES,
2623
- Bt as DEFAULT_STEP_MS,
2624
- zt as DragPhysics,
2625
- lt as EMOJI_BRIX,
2626
- Ce as EMOJI_COTA,
2627
- at as EMOJI_DOZY,
2628
- rt as EMOJI_FIDGE,
2629
- ht as EMOJI_KNOT,
2630
- nt as EMOJI_LUMO,
2631
- Re as EMOJI_MOCHI,
2632
- st as EMOJI_NIMA,
2633
- dt as EMOJI_PIP,
2634
- ut as EMOJI_SNUG,
2635
- it as EMOJI_SURI,
2636
- mt as EMOJI_VOID,
2637
- ct as EMOJI_WILT,
2638
- ot as EMOJI_ZUMI,
2639
- Vt as EmojiGroup,
2640
- je as IDLE_MOTIONS,
2641
- oe as LIB,
2642
- Rt as PERSONALITY_DRIVEN_STATES,
2643
- At as ParticleEmitter,
2644
- to as SIZE_PRESETS,
2645
- Ve as STATE_GROUPS,
2646
- Wt as STATE_MOTIONS,
2647
- ro as STATE_THEME_MAP,
2648
- St as SoundEngine,
2649
- $t as StateManager,
2650
- uo as Wissive,
2651
- Gt as applyIdleMotion,
2652
- Ot as applyStateMotion,
2653
- Tt as attachEventListeners,
2654
- It as blendColors,
2655
- Jt as buildCustomEmoji,
2656
- _e as buildFace,
2657
- no as checkContrast,
2658
- ho as createCustomEmoji,
2659
- oo as createEmoji,
2660
- Ht as createEmojiGroup,
2661
- ft as createMultiSpring,
2662
- jt as createSequencePlayer,
2663
- uo as default,
2664
- Dt as getContrastRatio,
2665
- We as getEmojiDefinition,
2666
- Et as getGlobalVolume,
2667
- Oe as getLuminance,
2668
- gt as getSilhouettePath,
2669
- lo as getThemeForState,
2670
- Yt as isGlobalSoundEnabled,
2671
- Pt as isReducedMotionPreferred,
2672
- kt as isTouchDevice,
2673
- co as loadCustomEmoji,
2674
- yt as makeSpring,
2675
- qt as pickWithoutRepeat,
2676
- ao as renderSvgElement,
2677
- Qt as resolveAutonomousStatePool,
2678
- Ze as resolveSize,
2679
- Kt as saveCustomEmoji,
2680
- xt as setGlobalSound,
2681
- Ft as setGlobalVolume,
2682
- O as sharedLoop,
2683
- U as soundEngine,
2684
- Xt as subscribeToReducedMotion,
2685
- Qe as supportsHover
2925
+ go as ALL_STATES,
2926
+ Fo as ALL_WANDERABLE_STATES,
2927
+ j as ANGLES,
2928
+ Mo as AUTONOMOUS_STATES,
2929
+ ce as COS,
2930
+ $o as DEFAULT_STEP_MS,
2931
+ ro as DragPhysics,
2932
+ St as EMOJI_BRIX,
2933
+ De as EMOJI_COTA,
2934
+ Ct as EMOJI_DOZY,
2935
+ Tt as EMOJI_FIDGE,
2936
+ Et as EMOJI_KNOT,
2937
+ wt as EMOJI_LUMO,
2938
+ rt as EMOJI_MOCHI,
2939
+ vt as EMOJI_NIMA,
2940
+ zt as EMOJI_PIP,
2941
+ At as EMOJI_SNUG,
2942
+ kt as EMOJI_SURI,
2943
+ Pt as EMOJI_VOID,
2944
+ Yt as EMOJI_WILT,
2945
+ Ft as EMOJI_ZUMI,
2946
+ Co as EmojiGroup,
2947
+ nt as IDLE_MOTIONS,
2948
+ ne as LIB,
2949
+ xo as PERSONALITY_DRIVEN_STATES,
2950
+ ae as PROFILE_SAMPLES,
2951
+ ao as ParticleEmitter,
2952
+ dt as SILHOUETTE_PROFILES,
2953
+ $e as SIN,
2954
+ Ao as SIZE_PRESETS,
2955
+ tt as SPRING_PRESETS,
2956
+ pt as STATE_GROUPS,
2957
+ po as STATE_MOTIONS,
2958
+ Wo as STATE_THEME_MAP,
2959
+ to as SoundEngine,
2960
+ lt as StateManager,
2961
+ ht as TAU,
2962
+ Ro as Wissive,
2963
+ yo as applyIdleMotion,
2964
+ fo as applyStateMotion,
2965
+ eo as attachEventListeners,
2966
+ mo as blendColors,
2967
+ Zt as blendProfiles,
2968
+ So as buildCustomEmoji,
2969
+ ut as buildFace,
2970
+ Go as checkContrast,
2971
+ Lo as clamp,
2972
+ Nt as closedCatmullRomPath,
2973
+ jo as createCustomEmoji,
2974
+ zo as createEmoji,
2975
+ wo as createEmojiGroup,
2976
+ Lt as createMultiSpring,
2977
+ bo as createSequencePlayer,
2978
+ Do as createStateManager,
2979
+ Ro as default,
2980
+ qt as generateSilhouettePath,
2981
+ uo as getContrastRatio,
2982
+ et as getEmojiDefinition,
2983
+ no as getGlobalVolume,
2984
+ it as getLuminance,
2985
+ Qt as getSilhouettePath,
2986
+ ot as getSilhouetteProfile,
2987
+ Oo as getThemeForState,
2988
+ _e as hullOfCircles,
2989
+ io as isGlobalSoundEnabled,
2990
+ lo as isReducedMotionPreferred,
2991
+ Ut as isTouchDevice,
2992
+ Wt as lerp,
2993
+ Bo as loadCustomEmoji,
2994
+ Xt as makeSpring,
2995
+ I as normalizeRadii,
2996
+ vo as pickWithoutRepeat,
2997
+ Le as profileFromPolygon,
2998
+ le as r2,
2999
+ Io as renderSvgElement,
3000
+ ko as resolveAutonomousStatePool,
3001
+ at as resolveSize,
3002
+ Yo as saveCustomEmoji,
3003
+ oo as setGlobalSound,
3004
+ so as setGlobalVolume,
3005
+ B as sharedLoop,
3006
+ oe as soundEngine,
3007
+ co as subscribeToReducedMotion,
3008
+ Ot as superellipseProfile,
3009
+ mt as supportsHover,
3010
+ _t as toPoints
2686
3011
  };
2687
3012
  //# sourceMappingURL=wissive.js.map