@peerbots/face 0.0.0-stage → 0.1.0

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.
Files changed (50) hide show
  1. package/README.md +30 -2
  2. package/dist/VizijFaceView-3fvAa51G.d.ts +57 -0
  3. package/dist/chunk-AT25NYX2.js +211 -0
  4. package/dist/chunk-AT25NYX2.js.map +1 -0
  5. package/dist/chunk-T7QJ6B66.js +1475 -0
  6. package/dist/chunk-T7QJ6B66.js.map +1 -0
  7. package/dist/chunk-XHICGN32.js +62 -0
  8. package/dist/chunk-XHICGN32.js.map +1 -0
  9. package/dist/index.cjs +4353 -0
  10. package/dist/index.cjs.map +1 -0
  11. package/dist/index.d.ts +525 -0
  12. package/dist/index.js +1408 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/pixi.cjs +2403 -0
  15. package/dist/pixi.cjs.map +1 -0
  16. package/dist/pixi.d.ts +9 -0
  17. package/dist/pixi.js +882 -0
  18. package/dist/pixi.js.map +1 -0
  19. package/dist/vizij.cjs +1546 -0
  20. package/dist/vizij.cjs.map +1 -0
  21. package/dist/vizij.d.ts +2 -0
  22. package/dist/vizij.js +193 -0
  23. package/dist/vizij.js.map +1 -0
  24. package/package.json +114 -4
  25. package/public/FaceAssets/Hugo/cheek.png +0 -0
  26. package/public/FaceAssets/Hugo/concerned_l.png +0 -0
  27. package/public/FaceAssets/Hugo/concerned_r.png +0 -0
  28. package/public/FaceAssets/Hugo/happy_l.png +0 -0
  29. package/public/FaceAssets/Hugo/happy_r.png +0 -0
  30. package/public/FaceAssets/Hugo/hugo_spritesheet.json +97 -0
  31. package/public/FaceAssets/Hugo/hugo_spritesheet.png +0 -0
  32. package/public/FaceAssets/Hugo/neutral_l.png +0 -0
  33. package/public/FaceAssets/Hugo/neutral_r.png +0 -0
  34. package/public/FaceAssets/Hugo/sad_l.png +0 -0
  35. package/public/FaceAssets/Hugo/sad_r.png +0 -0
  36. package/public/FaceAssets/Hugo/sleepy_l.png +0 -0
  37. package/public/FaceAssets/Hugo/sleepy_r.png +0 -0
  38. package/public/FaceAssets/Hugo/surprised_l.png +0 -0
  39. package/public/FaceAssets/Hugo/surprised_r.png +0 -0
  40. package/public/FaceAssets/Icons/Concerned.png +0 -0
  41. package/public/FaceAssets/Icons/Neutral.png +0 -0
  42. package/public/FaceAssets/Icons/Sad.png +0 -0
  43. package/public/FaceAssets/Icons/Sleep.png +0 -0
  44. package/public/FaceAssets/Icons/Surprised.png +0 -0
  45. package/public/FaceAssets/Misty/misty_spritesheet.json +97 -0
  46. package/public/FaceAssets/Misty/misty_spritesheet.png +0 -0
  47. package/public/FaceAssets/Robotic/robotic_spritesheet.json +97 -0
  48. package/public/FaceAssets/Robotic/robotic_spritesheet.png +0 -0
  49. package/public/FaceAssets/Vizij/Hugo.glb +0 -0
  50. package/public/FaceAssets/Vizij/brand.svg +15 -0
package/README.md CHANGED
@@ -1,3 +1,31 @@
1
- # Temporary Holding Version
1
+ # @peerbots/face
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Canonical Peerbots Robot Face rendering engine, assets, viseme & amplitude synchronization, two-tier TTS audio caching, and modular Zustand state slices.
4
+
5
+ ## Features
6
+
7
+ - **Dual Canonical Renderers + Pluggable Strategy (`FaceRendererStrategy`)**:
8
+ - `PixiFaceView`: PixiJS v8 2D sprite & vector renderer (`Hugo`, `Simple`, `Robotic`, `Display`) with spritesheet emotions, natural blinking & breathing, smooth gaze interpolation, and amplitude-driven mouth shapes.
9
+ - `VizijFaceView`: 3D WebAssembly skeletal & blendshape renderer (`Hugo - Expressive` and custom `.glb` uploads) powered by `@vizij/runtime-react`.
10
+ - `StaticFaceFallback` & `FaceViewSkeleton`: Accessible ARIA-annotated fallback for headless browsers and WebGL-disabled environments with canonical sprite previews from `FaceAssets`.
11
+ - **Zero Backend Lock-In**: Zero Firebase, Firestore, or PubNub dependencies. Inject remote TTS (e.g., AWS Polly) via `SpeechSynthesizerAdapter` while built-in Web Speech API synthesis and `TtsAudioCache` (in-memory LRU + IndexedDB) handle caching and fallback automatically.
12
+ - **Modular Zustand Store Slices**: `createFaceRenderingSlice`, `createFaceSpeechSlice`, `createPeerbotsFaceStore`, `FaceStoreProvider`, and `useFaceStore`.
13
+
14
+ ## Assets Setup
15
+
16
+ Copy or serve `node_modules/@peerbots/face/public/FaceAssets` at `/FaceAssets` in your application's public directory (or pass a custom `assetBaseUrl` to `createPeerbotsFaceStore({ assetBaseUrl })`).
17
+
18
+ ## Development & CI
19
+
20
+ ```bash
21
+ npm ci
22
+ npm run check:ci # Typecheck, ESLint, Vitest coverage (>=80%), and Playwright Storybook WCAG 2.1 AA tests
23
+ npm run build # Build ESM + CJS + DTS bundles to dist/
24
+ npm run build-storybook # Build static Storybook documentation
25
+ ```
26
+
27
+ ## Releases & Publishing (Changesets)
28
+
29
+ 1. Record changes with `npm run changeset` and commit the generated `.changeset/*.md` file.
30
+ 2. Pushing to `main` runs `.github/workflows/publish.yml`, which opens or updates the **"Version Packages"** pull request.
31
+ 3. Merging **"Version Packages"** (with `NPM_TOKEN` configured in GitHub Actions secrets) builds `dist/` and publishes `@peerbots/face` to npm.
@@ -0,0 +1,57 @@
1
+ import * as react from 'react';
2
+
3
+ interface FaceUiLabels {
4
+ loading: string;
5
+ poweredBy: string;
6
+ tapToEnableSound: string;
7
+ allowSpeech: string;
8
+ characterSelection: string;
9
+ face: string;
10
+ uploadGlb: string;
11
+ vizijUploadGlb: string;
12
+ vizijErrorPrefix: string;
13
+ faceCapabilities: string;
14
+ color: string;
15
+ emotion: string;
16
+ speech: string;
17
+ faceSpecificSettings: string;
18
+ faceExpressivity: string;
19
+ eyes: string;
20
+ mouth: string;
21
+ cheeks: string;
22
+ emotionDisplay: string;
23
+ defaultOption: string;
24
+ noneOption: string;
25
+ emoticon: string;
26
+ emoji: string;
27
+ positioning: string;
28
+ autoRotate: string;
29
+ rotate: string;
30
+ reset: string;
31
+ zoom: string;
32
+ horizontalOffset: string;
33
+ verticalOffset: string;
34
+ faceSettings: string;
35
+ onFaceButtons: string;
36
+ showFullScreenButton: string;
37
+ showScrollButton: string;
38
+ speechBehavior: string;
39
+ newButtonSpeech: string;
40
+ interruptSpeech: string;
41
+ queueSpeech: string;
42
+ captions: string;
43
+ fontSize: string;
44
+ verticalPosition: string;
45
+ voiceSelectorLanguage: string;
46
+ voiceSelectorVoice: string;
47
+ unknownFaceType: string;
48
+ }
49
+ declare const DEFAULT_FACE_UI_LABELS: FaceUiLabels;
50
+ declare function resolveFaceUiLabels(overrides?: Partial<FaceUiLabels>): FaceUiLabels;
51
+
52
+ interface VizijFaceViewProps {
53
+ labels?: Partial<FaceUiLabels>;
54
+ }
55
+ declare function VizijFaceView({ labels }?: VizijFaceViewProps): react.JSX.Element | null;
56
+
57
+ export { DEFAULT_FACE_UI_LABELS as D, type FaceUiLabels as F, type VizijFaceViewProps as V, VizijFaceView as a, resolveFaceUiLabels as r };
@@ -0,0 +1,211 @@
1
+ import {
2
+ normalizeAssetBaseUrl
3
+ } from "./chunk-T7QJ6B66.js";
4
+
5
+ // src/helpers/emotion_mapper.ts
6
+ var EMOTION_EMOTICONS = {
7
+ Happy: ":D",
8
+ Sad: ":(",
9
+ Surprised: ":o",
10
+ Neutral: ":)",
11
+ Sleepy: ":z",
12
+ Concerned: ":/"
13
+ };
14
+ var EMOTION_EMOJIS = {
15
+ Happy: "\u{1F600}",
16
+ Sad: "\u{1F622}",
17
+ Surprised: "\u{1F62E}",
18
+ Neutral: "\u{1F610}",
19
+ Sleepy: "\u{1F634}",
20
+ Concerned: "\u{1F61F}"
21
+ };
22
+ var EMOTION_ICON_FILES = {
23
+ Neutral: "Neutral.png",
24
+ Surprised: "Surprised.png",
25
+ Happy: "Neutral.png",
26
+ Sad: "Sad.png",
27
+ Concerned: "Concerned.png",
28
+ Sleepy: "Sleep.png"
29
+ };
30
+ function getEmotionIconPath(emotion, assetBaseUrl) {
31
+ const base = normalizeAssetBaseUrl(assetBaseUrl);
32
+ const file = EMOTION_ICON_FILES[emotion] ?? EMOTION_ICON_FILES.Neutral;
33
+ return `${base}/Icons/${file}`;
34
+ }
35
+ function getEmotionEyeSpritePaths(emotion, character = "Hugo", assetBaseUrl) {
36
+ const base = normalizeAssetBaseUrl(assetBaseUrl);
37
+ const key = emotion.toLowerCase();
38
+ return {
39
+ left: `${base}/${character}/${key}_l.png`,
40
+ right: `${base}/${character}/${key}_r.png`
41
+ };
42
+ }
43
+ var emotion_mapping = {
44
+ Neutral: getEmotionIconPath("Neutral"),
45
+ Surprised: getEmotionIconPath("Surprised"),
46
+ Happy: getEmotionIconPath("Happy"),
47
+ Sad: getEmotionIconPath("Sad"),
48
+ Concerned: getEmotionIconPath("Concerned"),
49
+ Sleepy: getEmotionIconPath("Sleepy")
50
+ };
51
+
52
+ // src/hooks/useMessageVisualState.ts
53
+ import { useState, useRef, useCallback } from "react";
54
+ function useMessageVisualState(isSpeaking, config = {}) {
55
+ const {
56
+ msPerChar = 50,
57
+ persistenceDuration = 3e3,
58
+ pauseBeforeNextMsg = 500
59
+ } = config;
60
+ const [displayText, setDisplayText] = useState("");
61
+ const [visualState, setVisualState] = useState("IDLE");
62
+ const stateRef = useRef("IDLE");
63
+ const displayTextRef = useRef("");
64
+ const currentMsgRef = useRef(null);
65
+ const nextMsgRef = useRef(null);
66
+ const timerRef = useRef(0);
67
+ const charTimerRef = useRef(0);
68
+ const typingIndexRef = useRef(0);
69
+ const startShowing = useCallback(
70
+ (speech) => {
71
+ currentMsgRef.current = speech;
72
+ nextMsgRef.current = null;
73
+ stateRef.current = "SHOWING";
74
+ setVisualState("SHOWING");
75
+ typingIndexRef.current = 0;
76
+ charTimerRef.current = 0;
77
+ if (msPerChar <= 0) {
78
+ setDisplayText(speech);
79
+ displayTextRef.current = speech;
80
+ typingIndexRef.current = speech.length;
81
+ } else {
82
+ setDisplayText("");
83
+ displayTextRef.current = "";
84
+ }
85
+ },
86
+ [msPerChar]
87
+ );
88
+ const queueMessage = useCallback(
89
+ (speech) => {
90
+ if (stateRef.current === "IDLE" || stateRef.current === "PERSISTING") {
91
+ startShowing(speech);
92
+ return;
93
+ }
94
+ nextMsgRef.current = speech;
95
+ },
96
+ [startShowing]
97
+ );
98
+ const update = useCallback(
99
+ (ms) => {
100
+ const prevState = stateRef.current;
101
+ switch (stateRef.current) {
102
+ case "IDLE":
103
+ if (displayTextRef.current !== "") {
104
+ setDisplayText("");
105
+ displayTextRef.current = "";
106
+ }
107
+ if (nextMsgRef.current) {
108
+ startShowing(nextMsgRef.current);
109
+ }
110
+ break;
111
+ case "SHOWING":
112
+ if (!currentMsgRef.current) {
113
+ stateRef.current = "IDLE";
114
+ break;
115
+ }
116
+ if (msPerChar <= 0) {
117
+ if (nextMsgRef.current) {
118
+ stateRef.current = "PAUSED";
119
+ timerRef.current = 0;
120
+ } else {
121
+ stateRef.current = "WAITING_FOR_AUDIO";
122
+ }
123
+ break;
124
+ }
125
+ charTimerRef.current += ms;
126
+ if (charTimerRef.current > msPerChar) {
127
+ const fullText = currentMsgRef.current;
128
+ const charCountToAdd = Math.floor(charTimerRef.current / msPerChar);
129
+ charTimerRef.current %= msPerChar;
130
+ const nextIndex = typingIndexRef.current + charCountToAdd;
131
+ if (nextIndex >= fullText.length) {
132
+ setDisplayText(fullText);
133
+ displayTextRef.current = fullText;
134
+ typingIndexRef.current = fullText.length;
135
+ if (nextMsgRef.current) {
136
+ stateRef.current = "PAUSED";
137
+ timerRef.current = 0;
138
+ } else {
139
+ stateRef.current = "WAITING_FOR_AUDIO";
140
+ }
141
+ } else {
142
+ typingIndexRef.current = nextIndex;
143
+ const partial = fullText.substring(0, nextIndex);
144
+ setDisplayText(partial);
145
+ displayTextRef.current = partial;
146
+ }
147
+ }
148
+ break;
149
+ case "WAITING_FOR_AUDIO":
150
+ if (nextMsgRef.current) {
151
+ stateRef.current = "PAUSED";
152
+ timerRef.current = 0;
153
+ break;
154
+ }
155
+ if (!isSpeaking) {
156
+ stateRef.current = "PERSISTING";
157
+ timerRef.current = 0;
158
+ }
159
+ break;
160
+ case "PERSISTING":
161
+ if (nextMsgRef.current) {
162
+ stateRef.current = "PAUSED";
163
+ timerRef.current = 0;
164
+ break;
165
+ }
166
+ timerRef.current += ms;
167
+ if (timerRef.current > persistenceDuration) {
168
+ stateRef.current = "IDLE";
169
+ }
170
+ break;
171
+ case "PAUSED":
172
+ timerRef.current += ms;
173
+ if (timerRef.current > pauseBeforeNextMsg) {
174
+ if (nextMsgRef.current) {
175
+ startShowing(nextMsgRef.current);
176
+ } else {
177
+ stateRef.current = "WAITING_FOR_AUDIO";
178
+ }
179
+ }
180
+ break;
181
+ }
182
+ if (stateRef.current !== prevState) {
183
+ setVisualState(stateRef.current);
184
+ }
185
+ },
186
+ [
187
+ isSpeaking,
188
+ msPerChar,
189
+ persistenceDuration,
190
+ pauseBeforeNextMsg,
191
+ startShowing
192
+ ]
193
+ );
194
+ return {
195
+ displayText,
196
+ visualState,
197
+ queueMessage,
198
+ update
199
+ };
200
+ }
201
+
202
+ export {
203
+ EMOTION_EMOTICONS,
204
+ EMOTION_EMOJIS,
205
+ EMOTION_ICON_FILES,
206
+ getEmotionIconPath,
207
+ getEmotionEyeSpritePaths,
208
+ emotion_mapping,
209
+ useMessageVisualState
210
+ };
211
+ //# sourceMappingURL=chunk-AT25NYX2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/helpers/emotion_mapper.ts","../src/hooks/useMessageVisualState.ts"],"sourcesContent":["import {\n normalizeAssetBaseUrl,\n type PeerbotsEmotion,\n} from \"../types/face\";\n\nexport const EMOTION_EMOTICONS: Record<PeerbotsEmotion, string> = {\n Happy: \":D\",\n Sad: \":(\",\n Surprised: \":o\",\n Neutral: \":)\",\n Sleepy: \":z\",\n Concerned: \":/\",\n};\n\nexport const EMOTION_EMOJIS: Record<PeerbotsEmotion, string> = {\n Happy: \"😀\",\n Sad: \"😢\",\n Surprised: \"😮\",\n Neutral: \"😐\",\n Sleepy: \"😴\",\n Concerned: \"😟\",\n};\n\nexport const EMOTION_ICON_FILES: Record<PeerbotsEmotion, string> = {\n Neutral: \"Neutral.png\",\n Surprised: \"Surprised.png\",\n Happy: \"Neutral.png\",\n Sad: \"Sad.png\",\n Concerned: \"Concerned.png\",\n Sleepy: \"Sleep.png\",\n};\n\nexport function getEmotionIconPath(\n emotion: PeerbotsEmotion,\n assetBaseUrl?: string,\n): string {\n const base = normalizeAssetBaseUrl(assetBaseUrl);\n const file = EMOTION_ICON_FILES[emotion] ?? EMOTION_ICON_FILES.Neutral;\n return `${base}/Icons/${file}`;\n}\n\nexport function getEmotionEyeSpritePaths(\n emotion: PeerbotsEmotion,\n character: \"Hugo\" = \"Hugo\",\n assetBaseUrl?: string,\n): { left: string; right: string } {\n const base = normalizeAssetBaseUrl(assetBaseUrl);\n const key = emotion.toLowerCase();\n return {\n left: `${base}/${character}/${key}_l.png`,\n right: `${base}/${character}/${key}_r.png`,\n };\n}\n\nexport const emotion_mapping: Record<PeerbotsEmotion, string> = {\n Neutral: getEmotionIconPath(\"Neutral\"),\n Surprised: getEmotionIconPath(\"Surprised\"),\n Happy: getEmotionIconPath(\"Happy\"),\n Sad: getEmotionIconPath(\"Sad\"),\n Concerned: getEmotionIconPath(\"Concerned\"),\n Sleepy: getEmotionIconPath(\"Sleepy\"),\n};\n","import { useState, useRef, useCallback } from \"react\";\n\nexport type VisualState =\n | \"IDLE\"\n | \"SHOWING\"\n | \"WAITING_FOR_AUDIO\"\n | \"PERSISTING\"\n | \"PAUSED\";\n\nexport interface MessageVisualStateConfig {\n msPerChar?: number;\n persistenceDuration?: number;\n pauseBeforeNextMsg?: number;\n}\n\nexport function useMessageVisualState(\n isSpeaking: boolean,\n config: MessageVisualStateConfig = {},\n) {\n const {\n msPerChar = 50,\n persistenceDuration = 3000,\n pauseBeforeNextMsg = 500,\n } = config;\n\n const [displayText, setDisplayText] = useState(\"\");\n const [visualState, setVisualState] = useState<VisualState>(\"IDLE\");\n\n const stateRef = useRef<VisualState>(\"IDLE\");\n const displayTextRef = useRef(\"\");\n\n const currentMsgRef = useRef<string | null>(null);\n const nextMsgRef = useRef<string | null>(null);\n\n const timerRef = useRef(0);\n const charTimerRef = useRef(0);\n const typingIndexRef = useRef(0);\n\n const startShowing = useCallback(\n (speech: string) => {\n currentMsgRef.current = speech;\n nextMsgRef.current = null;\n stateRef.current = \"SHOWING\";\n setVisualState(\"SHOWING\");\n typingIndexRef.current = 0;\n charTimerRef.current = 0;\n\n if (msPerChar <= 0) {\n setDisplayText(speech);\n displayTextRef.current = speech;\n typingIndexRef.current = speech.length;\n } else {\n setDisplayText(\"\");\n displayTextRef.current = \"\";\n }\n },\n [msPerChar],\n );\n\n const queueMessage = useCallback(\n (speech: string) => {\n if (stateRef.current === \"IDLE\" || stateRef.current === \"PERSISTING\") {\n startShowing(speech);\n return;\n }\n nextMsgRef.current = speech;\n },\n [startShowing],\n );\n\n const update = useCallback(\n (ms: number) => {\n const prevState = stateRef.current;\n\n switch (stateRef.current) {\n case \"IDLE\":\n if (displayTextRef.current !== \"\") {\n setDisplayText(\"\");\n displayTextRef.current = \"\";\n }\n if (nextMsgRef.current) {\n startShowing(nextMsgRef.current);\n }\n break;\n\n case \"SHOWING\":\n if (!currentMsgRef.current) {\n stateRef.current = \"IDLE\";\n break;\n }\n\n if (msPerChar <= 0) {\n if (nextMsgRef.current) {\n stateRef.current = \"PAUSED\";\n timerRef.current = 0;\n } else {\n stateRef.current = \"WAITING_FOR_AUDIO\";\n }\n break;\n }\n\n charTimerRef.current += ms;\n if (charTimerRef.current > msPerChar) {\n const fullText = currentMsgRef.current;\n const charCountToAdd = Math.floor(charTimerRef.current / msPerChar);\n charTimerRef.current %= msPerChar;\n\n const nextIndex = typingIndexRef.current + charCountToAdd;\n\n if (nextIndex >= fullText.length) {\n setDisplayText(fullText);\n displayTextRef.current = fullText;\n typingIndexRef.current = fullText.length;\n\n if (nextMsgRef.current) {\n stateRef.current = \"PAUSED\";\n timerRef.current = 0;\n } else {\n stateRef.current = \"WAITING_FOR_AUDIO\";\n }\n } else {\n typingIndexRef.current = nextIndex;\n const partial = fullText.substring(0, nextIndex);\n setDisplayText(partial);\n displayTextRef.current = partial;\n }\n }\n break;\n\n case \"WAITING_FOR_AUDIO\":\n if (nextMsgRef.current) {\n stateRef.current = \"PAUSED\";\n timerRef.current = 0;\n break;\n }\n\n if (!isSpeaking) {\n stateRef.current = \"PERSISTING\";\n timerRef.current = 0;\n }\n break;\n\n case \"PERSISTING\":\n if (nextMsgRef.current) {\n stateRef.current = \"PAUSED\";\n timerRef.current = 0;\n break;\n }\n\n timerRef.current += ms;\n if (timerRef.current > persistenceDuration) {\n stateRef.current = \"IDLE\";\n }\n break;\n\n case \"PAUSED\":\n timerRef.current += ms;\n if (timerRef.current > pauseBeforeNextMsg) {\n if (nextMsgRef.current) {\n startShowing(nextMsgRef.current);\n } else {\n stateRef.current = \"WAITING_FOR_AUDIO\";\n }\n }\n break;\n }\n\n if (stateRef.current !== prevState) {\n setVisualState(stateRef.current);\n }\n },\n [\n isSpeaking,\n msPerChar,\n persistenceDuration,\n pauseBeforeNextMsg,\n startShowing,\n ],\n );\n\n return {\n displayText,\n visualState,\n queueMessage,\n update,\n };\n}\n"],"mappings":";;;;;AAKO,IAAM,oBAAqD;AAAA,EAChE,OAAO;AAAA,EACP,KAAK;AAAA,EACL,WAAW;AAAA,EACX,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,WAAW;AACb;AAEO,IAAM,iBAAkD;AAAA,EAC7D,OAAO;AAAA,EACP,KAAK;AAAA,EACL,WAAW;AAAA,EACX,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,WAAW;AACb;AAEO,IAAM,qBAAsD;AAAA,EACjE,SAAS;AAAA,EACT,WAAW;AAAA,EACX,OAAO;AAAA,EACP,KAAK;AAAA,EACL,WAAW;AAAA,EACX,QAAQ;AACV;AAEO,SAAS,mBACd,SACA,cACQ;AACR,QAAM,OAAO,sBAAsB,YAAY;AAC/C,QAAM,OA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