@repere/core 0.0.4 → 0.1.1
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/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var c = /* @__PURE__ */ ((e) => (e.TopLeft = "top-left", e.TopCenter = "top-center", e.TopRight = "top-right", e.RightCenter = "right-center", e.BottomRight = "bottom-right", e.BottomCenter = "bottom-center", e.BottomLeft = "bottom-left", e.LeftCenter = "left-center", e))(c || {});
|
|
2
|
-
const
|
|
3
|
-
class
|
|
2
|
+
const m = c.TopRight;
|
|
3
|
+
class y {
|
|
4
4
|
state = /* @__PURE__ */ new Map();
|
|
5
5
|
isDismissed(t) {
|
|
6
6
|
return this.state.get(t)?.isDismissed ?? !1;
|
|
@@ -22,7 +22,7 @@ class m {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
var d = /* @__PURE__ */ ((e) => (e.Fade = "fade", e.Scale = "scale", e.Grow = "grow", e.Shrink = "shrink", e.SlideUp = "slide-up", e.SlideDown = "slide-down", e.SlideLeft = "slide-left", e.SlideRight = "slide-right", e.None = "none", e))(d || {});
|
|
25
|
-
const
|
|
25
|
+
const h = {
|
|
26
26
|
[d.SlideDown]: {
|
|
27
27
|
initial: { y: -20, opacity: 0 },
|
|
28
28
|
animate: { y: 0, opacity: 1 },
|
|
@@ -72,7 +72,7 @@ const f = {
|
|
|
72
72
|
function u(e) {
|
|
73
73
|
return e ? typeof e == "string" ? { variant: e } : e : null;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function w(e, t) {
|
|
76
76
|
const i = u(e), s = u(t);
|
|
77
77
|
return !i && !s ? null : i ? s ? {
|
|
78
78
|
variant: s.variant ?? i.variant,
|
|
@@ -81,10 +81,10 @@ function y(e, t) {
|
|
|
81
81
|
ease: s.ease ?? i.ease
|
|
82
82
|
} : i : s;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function b(e) {
|
|
85
85
|
const t = u(e);
|
|
86
86
|
if (!t) return null;
|
|
87
|
-
const i =
|
|
87
|
+
const i = h[t.variant];
|
|
88
88
|
return i ? {
|
|
89
89
|
variants: i,
|
|
90
90
|
transition: {
|
|
@@ -96,29 +96,29 @@ function w(e) {
|
|
|
96
96
|
}
|
|
97
97
|
} : (console.warn(`[Repere] Unknown animation variant: ${t.variant}`), null);
|
|
98
98
|
}
|
|
99
|
-
function
|
|
100
|
-
const i = (
|
|
101
|
-
const n =
|
|
99
|
+
function x(e, t) {
|
|
100
|
+
const i = (o) => {
|
|
101
|
+
const n = o.match(/(-?\d+)%/);
|
|
102
102
|
return n ? parseFloat(n[1]) : 0;
|
|
103
|
-
}, s = i(e.x),
|
|
103
|
+
}, s = i(e.x), r = i(e.y), a = (o = 0) => r === 0 && o === 0 ? `translate(${s}%, 0)` : o === 0 ? `translate(${s}%, ${r}%)` : `translate(${s}%, calc(${r}% + ${o}px))`;
|
|
104
104
|
return {
|
|
105
105
|
initial: {
|
|
106
106
|
...t.initial,
|
|
107
|
-
transform:
|
|
107
|
+
transform: a(t.initial.y || 0)
|
|
108
108
|
},
|
|
109
109
|
animate: {
|
|
110
110
|
...t.animate,
|
|
111
|
-
transform:
|
|
111
|
+
transform: a(t.animate.y || 0)
|
|
112
112
|
},
|
|
113
113
|
exit: {
|
|
114
114
|
...t.exit,
|
|
115
|
-
transform:
|
|
115
|
+
transform: a(t.exit.y || 0)
|
|
116
116
|
}
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function k(e, t) {
|
|
120
120
|
if (!e && !t) return {};
|
|
121
|
-
const i = e?.variants, s = e?.transition,
|
|
121
|
+
const i = e?.variants, s = e?.transition, r = t?.variants, a = t?.transition, o = a?.ease ?? s?.ease ?? [0.4, 0, 0.2, 1], n = Array.isArray(o) ? `cubic-bezier(${o.join(", ")})` : o;
|
|
122
122
|
return {
|
|
123
123
|
// Initial state (when opening starts) - from onOpen animation
|
|
124
124
|
"--repere-initial-opacity": i?.initial.opacity ?? 0,
|
|
@@ -131,12 +131,12 @@ function x(e, t) {
|
|
|
131
131
|
"--repere-animate-y": `${i?.animate.y ?? 0}px`,
|
|
132
132
|
"--repere-animate-scale": i?.animate.scale ?? 1,
|
|
133
133
|
// Exit state (when closing) - from onClose animation
|
|
134
|
-
"--repere-exit-opacity":
|
|
135
|
-
"--repere-exit-x": `${
|
|
136
|
-
"--repere-exit-y": `${
|
|
137
|
-
"--repere-exit-scale":
|
|
134
|
+
"--repere-exit-opacity": r?.exit.opacity ?? 0,
|
|
135
|
+
"--repere-exit-x": `${r?.exit.x ?? 0}px`,
|
|
136
|
+
"--repere-exit-y": `${r?.exit.y ?? 0}px`,
|
|
137
|
+
"--repere-exit-scale": r?.exit.scale ?? 1,
|
|
138
138
|
// Transition timing
|
|
139
|
-
"--repere-transition-duration": `${
|
|
139
|
+
"--repere-transition-duration": `${a?.duration ?? s?.duration ?? 0.3}s`,
|
|
140
140
|
"--repere-transition-timing": n
|
|
141
141
|
};
|
|
142
142
|
}
|
|
@@ -144,10 +144,10 @@ function v(e, t) {
|
|
|
144
144
|
const i = e?.transition.duration ?? 0, s = t?.transition.duration ?? 0;
|
|
145
145
|
return Math.max(i, s) * 1e3;
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function T(e) {
|
|
148
148
|
return new Promise((t) => setTimeout(t, e));
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function g(e, t) {
|
|
151
151
|
if (t instanceof RegExp)
|
|
152
152
|
return t.test(e);
|
|
153
153
|
if (t === e)
|
|
@@ -158,7 +158,7 @@ function p(e, t) {
|
|
|
158
158
|
}
|
|
159
159
|
return !1;
|
|
160
160
|
}
|
|
161
|
-
class
|
|
161
|
+
class I {
|
|
162
162
|
store;
|
|
163
163
|
debug;
|
|
164
164
|
constructor(t, i = {}) {
|
|
@@ -169,12 +169,12 @@ class L {
|
|
|
169
169
|
* This supports wildcards - e.g., path="*" will match all pages
|
|
170
170
|
*/
|
|
171
171
|
findMatchingPages(t, i) {
|
|
172
|
-
const s = t.filter((
|
|
172
|
+
const s = t.filter((r) => typeof r.path == "function" ? r.path(i) : g(i, r.path));
|
|
173
173
|
return this.debug && console.log(
|
|
174
174
|
"[BeaconManager] Path:",
|
|
175
175
|
i,
|
|
176
176
|
"Matched pages:",
|
|
177
|
-
s.map((
|
|
177
|
+
s.map((r) => r.id).join(", ") || "none"
|
|
178
178
|
), s;
|
|
179
179
|
}
|
|
180
180
|
/**
|
|
@@ -191,23 +191,23 @@ class L {
|
|
|
191
191
|
"matching page(s):",
|
|
192
192
|
s.map((n) => n.id).join(", ")
|
|
193
193
|
);
|
|
194
|
-
const
|
|
194
|
+
const r = [], a = /* @__PURE__ */ new Set();
|
|
195
195
|
for (const n of s)
|
|
196
196
|
for (const l of n.beacons) {
|
|
197
|
-
if (
|
|
197
|
+
if (a.has(l.id)) {
|
|
198
198
|
this.debug && console.warn(
|
|
199
199
|
`[BeaconManager] Duplicate beacon ID "${l.id}" in page "${n.id}", skipping`
|
|
200
200
|
);
|
|
201
201
|
continue;
|
|
202
202
|
}
|
|
203
|
-
|
|
203
|
+
a.add(l.id), r.push(l);
|
|
204
204
|
}
|
|
205
|
-
const
|
|
206
|
-
for (const n of
|
|
205
|
+
const o = [];
|
|
206
|
+
for (const n of r)
|
|
207
207
|
await Promise.resolve(
|
|
208
208
|
this.store.isDismissed(n.id)
|
|
209
|
-
) ? this.debug && console.log("[BeaconManager] Beacon", n.id, "is dismissed") :
|
|
210
|
-
return this.debug && console.log("[BeaconManager] Active beacons:",
|
|
209
|
+
) ? this.debug && console.log("[BeaconManager] Beacon", n.id, "is dismissed") : o.push(n);
|
|
210
|
+
return this.debug && console.log("[BeaconManager] Active beacons:", o.length), o;
|
|
211
211
|
}
|
|
212
212
|
/**
|
|
213
213
|
* Get the store instance
|
|
@@ -216,46 +216,46 @@ class L {
|
|
|
216
216
|
return this.store;
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
|
-
function
|
|
220
|
-
const { x: s = 0, y:
|
|
221
|
-
let
|
|
219
|
+
function f(e, t = c.TopRight, i = { x: 0, y: 0 }) {
|
|
220
|
+
const { x: s = 0, y: r = 0 } = i;
|
|
221
|
+
let a = 0, o = 0, n = "0", l = "0";
|
|
222
222
|
switch (t) {
|
|
223
223
|
// Top positions
|
|
224
224
|
case c.TopLeft:
|
|
225
|
-
|
|
225
|
+
a = e.top + window.scrollY, o = e.left + window.scrollX, n = "-50%", l = "-100%";
|
|
226
226
|
break;
|
|
227
227
|
case c.TopCenter:
|
|
228
|
-
|
|
228
|
+
a = e.top + window.scrollY, o = e.left + window.scrollX + e.width / 2, n = "-50%", l = "-100%";
|
|
229
229
|
break;
|
|
230
230
|
case c.TopRight:
|
|
231
|
-
|
|
231
|
+
a = e.top + window.scrollY, o = e.right + window.scrollX, n = "-50%", l = "-100%";
|
|
232
232
|
break;
|
|
233
233
|
// Right positions
|
|
234
234
|
case c.RightCenter:
|
|
235
|
-
|
|
235
|
+
a = e.top + window.scrollY + e.height / 2, o = e.right + window.scrollX, n = "0", l = "-50%";
|
|
236
236
|
break;
|
|
237
237
|
// Bottom positions
|
|
238
238
|
case c.BottomLeft:
|
|
239
|
-
|
|
239
|
+
a = e.bottom + window.scrollY, o = e.left + window.scrollX, n = "-50%", l = "0";
|
|
240
240
|
break;
|
|
241
241
|
case c.BottomCenter:
|
|
242
|
-
|
|
242
|
+
a = e.bottom + window.scrollY, o = e.left + window.scrollX + e.width / 2, n = "-50%", l = "0";
|
|
243
243
|
break;
|
|
244
244
|
case c.BottomRight:
|
|
245
|
-
|
|
245
|
+
a = e.bottom + window.scrollY, o = e.right + window.scrollX, n = "-50%", l = "0";
|
|
246
246
|
break;
|
|
247
247
|
// Left positions
|
|
248
248
|
case c.LeftCenter:
|
|
249
|
-
|
|
249
|
+
a = e.top + window.scrollY + e.height / 2, o = e.left + window.scrollX, n = "-100%", l = "-50%";
|
|
250
250
|
break;
|
|
251
251
|
}
|
|
252
|
-
return
|
|
253
|
-
top:
|
|
254
|
-
left:
|
|
252
|
+
return a += r, o += s, {
|
|
253
|
+
top: a,
|
|
254
|
+
left: o,
|
|
255
255
|
translate: { x: n, y: l }
|
|
256
256
|
};
|
|
257
257
|
}
|
|
258
|
-
class
|
|
258
|
+
class L {
|
|
259
259
|
tracked = /* @__PURE__ */ new Map();
|
|
260
260
|
scrollListener = null;
|
|
261
261
|
resizeListener = null;
|
|
@@ -268,34 +268,92 @@ class z {
|
|
|
268
268
|
/**
|
|
269
269
|
* Subscribe to position updates for an element
|
|
270
270
|
*/
|
|
271
|
-
subscribe(t, i, s,
|
|
272
|
-
const
|
|
273
|
-
|
|
271
|
+
subscribe(t, i, s, r = {}) {
|
|
272
|
+
const a = t;
|
|
273
|
+
this.tracked.has(a) || this.tracked.set(a, {
|
|
274
274
|
selector: t,
|
|
275
275
|
position: i,
|
|
276
|
-
offset:
|
|
277
|
-
zIndex:
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
276
|
+
offset: r.offset,
|
|
277
|
+
zIndex: r.zIndex ?? 9999,
|
|
278
|
+
delay: r.delay,
|
|
279
|
+
callbacks: /* @__PURE__ */ new Map(),
|
|
280
|
+
element: null,
|
|
281
|
+
delayTimeoutIds: /* @__PURE__ */ new Map()
|
|
282
|
+
});
|
|
283
|
+
const o = this.tracked.get(a);
|
|
284
|
+
return o ? (o.callbacks.set(s, {
|
|
285
|
+
callback: s,
|
|
286
|
+
needsInitialDelay: (r.delay ?? 0) > 0
|
|
287
|
+
}), this.tracked.size === 1 && this.startListening(), this.scheduleInitialUpdate(a, s), () => {
|
|
288
|
+
const n = this.tracked.get(a);
|
|
289
|
+
if (n) {
|
|
290
|
+
const l = n.delayTimeoutIds.get(s);
|
|
291
|
+
if (l !== void 0 && (clearTimeout(l), n.delayTimeoutIds.delete(s)), n.callbacks.delete(s), n.callbacks.size === 0) {
|
|
292
|
+
for (const [, p] of n.delayTimeoutIds)
|
|
293
|
+
clearTimeout(p);
|
|
294
|
+
n.delayTimeoutIds.clear(), this.tracked.delete(a), this.tracked.size === 0 && this.stopListening();
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}) : () => {
|
|
283
298
|
};
|
|
284
299
|
}
|
|
300
|
+
scheduleInitialUpdate(t, i) {
|
|
301
|
+
const s = this.tracked.get(t);
|
|
302
|
+
if (!s) return;
|
|
303
|
+
const r = s.callbacks.get(i);
|
|
304
|
+
if (r)
|
|
305
|
+
if (r.needsInitialDelay && s.delay && s.delay > 0) {
|
|
306
|
+
this.debug && console.log(
|
|
307
|
+
`[PositionTracker] Delaying initial position calculation for ${t} by ${s.delay}ms`
|
|
308
|
+
);
|
|
309
|
+
const a = setTimeout(() => {
|
|
310
|
+
this.debug && console.log(
|
|
311
|
+
`[PositionTracker] Calculating position for ${t} after delay`
|
|
312
|
+
);
|
|
313
|
+
const o = s.callbacks.get(i);
|
|
314
|
+
o && (o.needsInitialDelay = !1), s.delayTimeoutIds.delete(i), this.updatePositionForCallback(t, i);
|
|
315
|
+
}, s.delay);
|
|
316
|
+
s.delayTimeoutIds.set(i, a);
|
|
317
|
+
} else
|
|
318
|
+
this.updatePositionForCallback(t, i);
|
|
319
|
+
}
|
|
320
|
+
updatePositionForCallback(t, i) {
|
|
321
|
+
const s = this.tracked.get(t);
|
|
322
|
+
if (!s) return;
|
|
323
|
+
const r = document.querySelector(s.selector);
|
|
324
|
+
if (!r) {
|
|
325
|
+
this.debug && console.log(`[PositionTracker] Element not found: ${s.selector}`), s.element = null, i(null);
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
s.element = r;
|
|
329
|
+
const a = r.getBoundingClientRect(), n = {
|
|
330
|
+
...f(
|
|
331
|
+
a,
|
|
332
|
+
s.position,
|
|
333
|
+
s.offset
|
|
334
|
+
),
|
|
335
|
+
position: "fixed",
|
|
336
|
+
zIndex: s.zIndex
|
|
337
|
+
};
|
|
338
|
+
this.debug && console.log(
|
|
339
|
+
`[PositionTracker] Updated position for ${s.selector}:`,
|
|
340
|
+
n
|
|
341
|
+
), i(n);
|
|
342
|
+
}
|
|
285
343
|
updatePosition(t) {
|
|
286
344
|
const i = this.tracked.get(t);
|
|
287
345
|
if (!i) return;
|
|
288
346
|
const s = document.querySelector(i.selector);
|
|
289
347
|
if (!s) {
|
|
290
348
|
this.debug && console.log(`[PositionTracker] Element not found: ${i.selector}`), i.element = null;
|
|
291
|
-
for (const n of i.callbacks)
|
|
349
|
+
for (const [n] of i.callbacks)
|
|
292
350
|
n(null);
|
|
293
351
|
return;
|
|
294
352
|
}
|
|
295
353
|
i.element = s;
|
|
296
|
-
const
|
|
297
|
-
...
|
|
298
|
-
|
|
354
|
+
const r = s.getBoundingClientRect(), o = {
|
|
355
|
+
...f(
|
|
356
|
+
r,
|
|
299
357
|
i.position,
|
|
300
358
|
i.offset
|
|
301
359
|
),
|
|
@@ -304,10 +362,10 @@ class z {
|
|
|
304
362
|
};
|
|
305
363
|
this.debug && console.log(
|
|
306
364
|
`[PositionTracker] Updated position for ${i.selector}:`,
|
|
307
|
-
|
|
365
|
+
o
|
|
308
366
|
);
|
|
309
|
-
for (const n of i.callbacks)
|
|
310
|
-
n(
|
|
367
|
+
for (const [n] of i.callbacks)
|
|
368
|
+
n(o);
|
|
311
369
|
}
|
|
312
370
|
updateAllPositions = () => {
|
|
313
371
|
for (const [t] of this.tracked)
|
|
@@ -328,20 +386,25 @@ class z {
|
|
|
328
386
|
* Clean up all listeners and subscriptions
|
|
329
387
|
*/
|
|
330
388
|
destroy() {
|
|
389
|
+
for (const [, t] of this.tracked) {
|
|
390
|
+
for (const [, i] of t.delayTimeoutIds)
|
|
391
|
+
clearTimeout(i);
|
|
392
|
+
t.delayTimeoutIds.clear();
|
|
393
|
+
}
|
|
331
394
|
this.stopListening(), this.tracked.clear();
|
|
332
395
|
}
|
|
333
396
|
}
|
|
334
397
|
export {
|
|
335
398
|
d as Animation,
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
399
|
+
I as BeaconManager,
|
|
400
|
+
m as DEFAULT_POSITION,
|
|
401
|
+
y as MemoryStore,
|
|
339
402
|
c as Position,
|
|
340
|
-
|
|
403
|
+
L as PositionTracker,
|
|
341
404
|
v as calculateDismissDuration,
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
405
|
+
x as combineTranslateWithAnimation,
|
|
406
|
+
b as getAnimationConfig,
|
|
407
|
+
k as getPopoverAnimationStyles,
|
|
408
|
+
w as mergeAnimationConfigs,
|
|
409
|
+
T as waitForAnimations
|
|
347
410
|
};
|
package/dist/types/beacon.d.ts
CHANGED
|
@@ -10,6 +10,12 @@ export interface TriggerConfig<TNode = unknown> {
|
|
|
10
10
|
zIndex?: number;
|
|
11
11
|
animations?: TriggerAnimations;
|
|
12
12
|
component?: TNode;
|
|
13
|
+
/**
|
|
14
|
+
* Delay in milliseconds before calculating the beacon position.
|
|
15
|
+
* Useful when the target element has entrance animations that affect its position.
|
|
16
|
+
* @default 0
|
|
17
|
+
*/
|
|
18
|
+
delay?: number;
|
|
13
19
|
}
|
|
14
20
|
export interface PopoverConfig<TNode = unknown> {
|
|
15
21
|
position?: Position;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"beacon.d.ts","sourceRoot":"","sources":["../../src/types/beacon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,WAAW,MAAM;IACrB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,aAAa,CAAC,KAAK,GAAG,OAAO;IAC5C,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MA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ACT,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;KACX,CAAC;IACF,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -19,7 +19,10 @@ export declare class PositionTracker {
|
|
|
19
19
|
subscribe(selector: string, position: Position, callback: PositionCallback, options?: {
|
|
20
20
|
offset?: Offset;
|
|
21
21
|
zIndex?: number;
|
|
22
|
+
delay?: number;
|
|
22
23
|
}): () => void;
|
|
24
|
+
private scheduleInitialUpdate;
|
|
25
|
+
private updatePositionForCallback;
|
|
23
26
|
private updatePosition;
|
|
24
27
|
private updateAllPositions;
|
|
25
28
|
private startListening;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PositionTracker.d.ts","sourceRoot":"","sources":["../../src/utils/PositionTracker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGlD,MAAM,MAAM,gBAAgB,GAAG,CAC7B,QAAQ,EAAE,wBAAwB,GAAG,IAAI,KACtC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"PositionTracker.d.ts","sourceRoot":"","sources":["../../src/utils/PositionTracker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGlD,MAAM,MAAM,gBAAgB,GAAG,CAC7B,QAAQ,EAAE,wBAAwB,GAAG,IAAI,KACtC,IAAI,CAAC;AAkBV;;;GAGG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,OAAO,CAAqC;IACpD,OAAO,CAAC,cAAc,CAA6B;IACnD,OAAO,CAAC,cAAc,CAA6B;IACnD,OAAO,CAAC,cAAc,CAA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