@hyperframes/studio-server 0.7.60 → 0.7.62

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 (41) hide show
  1. package/dist/chunk-4ETS2LXI.js +192 -0
  2. package/dist/chunk-4ETS2LXI.js.map +1 -0
  3. package/dist/chunk-6XMC64FJ.js +584 -0
  4. package/dist/chunk-6XMC64FJ.js.map +1 -0
  5. package/dist/chunk-7Q5AFHU6.js +279 -0
  6. package/dist/chunk-7Q5AFHU6.js.map +1 -0
  7. package/dist/chunk-IVOJZ24X.js +457 -0
  8. package/dist/chunk-IVOJZ24X.js.map +1 -0
  9. package/dist/chunk-OK7FKBKI.js +66 -0
  10. package/dist/chunk-OK7FKBKI.js.map +1 -0
  11. package/dist/chunk-VPA335OG.js +437 -0
  12. package/dist/chunk-VPA335OG.js.map +1 -0
  13. package/dist/chunk-W2SBTCO2.js +32 -0
  14. package/dist/chunk-W2SBTCO2.js.map +1 -0
  15. package/dist/chunk-X62ASOGO.js +30 -0
  16. package/dist/chunk-X62ASOGO.js.map +1 -0
  17. package/dist/helpers/finiteMutation.js +4 -24
  18. package/dist/helpers/finiteMutation.js.map +1 -1
  19. package/dist/helpers/manualEditsRenderScript.js +5 -577
  20. package/dist/helpers/manualEditsRenderScript.js.map +1 -1
  21. package/dist/helpers/mediaCodecMap.d.ts +100 -0
  22. package/dist/helpers/mediaCodecMap.js +25 -0
  23. package/dist/helpers/mediaCodecMap.js.map +1 -0
  24. package/dist/helpers/mediaProxyPreview.d.ts +4 -0
  25. package/dist/helpers/mediaProxyPreview.js +17 -0
  26. package/dist/helpers/mediaProxyPreview.js.map +1 -0
  27. package/dist/helpers/proxyTranscoder.d.ts +61 -0
  28. package/dist/helpers/proxyTranscoder.js +30 -0
  29. package/dist/helpers/proxyTranscoder.js.map +1 -0
  30. package/dist/helpers/screenshotClip.js +3 -22
  31. package/dist/helpers/screenshotClip.js.map +1 -1
  32. package/dist/helpers/sourceMutation.d.ts +3 -0
  33. package/dist/helpers/sourceMutation.js +9 -419
  34. package/dist/helpers/sourceMutation.js.map +1 -1
  35. package/dist/helpers/studioMotionRenderScript.js +4 -186
  36. package/dist/helpers/studioMotionRenderScript.js.map +1 -1
  37. package/dist/index.d.ts +6 -202
  38. package/dist/index.js +678 -1423
  39. package/dist/index.js.map +1 -1
  40. package/dist/mediaProxyPreview-ChE1ATG4.d.ts +259 -0
  41. package/package.json +15 -3
@@ -0,0 +1,192 @@
1
+ // src/helpers/studioMotionRenderScript.ts
2
+ var STUDIO_MOTION_PATH = ".hyperframes/studio-motion.json";
3
+ function hasStudioMotionEntries(manifestContent) {
4
+ try {
5
+ const parsed = JSON.parse(manifestContent);
6
+ return Array.isArray(parsed.motions) && parsed.motions.length > 0;
7
+ } catch {
8
+ return false;
9
+ }
10
+ }
11
+ function createStudioMotionRenderBodyScript(manifestContent, options = {}) {
12
+ if (!manifestContent.trim() || !hasStudioMotionEntries(manifestContent)) return null;
13
+ return `(${studioMotionRenderRuntime.toString()})(${JSON.stringify(manifestContent)}, ${JSON.stringify(options.activeCompositionPath ?? null)});`;
14
+ }
15
+ function studioMotionRenderRuntime(manifestContent, activeCompositionPath) {
16
+ const STUDIO_MOTION_TIMELINE_ID = "studio-motion";
17
+ const STUDIO_MOTION_ATTR = "data-hf-studio-motion";
18
+ const ORIGINAL_TRANSFORM_ATTR = "data-hf-studio-motion-original-transform";
19
+ const ORIGINAL_OPACITY_ATTR = "data-hf-studio-motion-original-opacity";
20
+ const ORIGINAL_VISIBILITY_ATTR = "data-hf-studio-motion-original-visibility";
21
+ const objectRecord = (value) => value && typeof value === "object" ? value : null;
22
+ const finiteNumber = (value) => typeof value === "number" && Number.isFinite(value) ? value : null;
23
+ const runtimeWindow = window;
24
+ const parseMotionValues = (value) => {
25
+ const record = objectRecord(value);
26
+ if (!record) return null;
27
+ const parsed = {};
28
+ for (const key of ["x", "y", "scale", "rotation", "opacity", "autoAlpha"]) {
29
+ const next = finiteNumber(record[key]);
30
+ if (next != null) parsed[key] = next;
31
+ }
32
+ return Object.keys(parsed).length > 0 ? parsed : null;
33
+ };
34
+ const parseCustomEase = (value) => {
35
+ const record = objectRecord(value);
36
+ if (!record) return null;
37
+ const id = typeof record.id === "string" ? record.id.trim() : "";
38
+ const data = typeof record.data === "string" ? record.data.trim() : "";
39
+ if (!id || !data) return null;
40
+ return { id, data };
41
+ };
42
+ const parsedManifest = (() => {
43
+ try {
44
+ return objectRecord(JSON.parse(manifestContent));
45
+ } catch {
46
+ return null;
47
+ }
48
+ })();
49
+ const manifestMotions = Array.isArray(parsedManifest?.motions) ? parsedManifest.motions : [];
50
+ const sourceFileForElement = (element) => {
51
+ let current = element;
52
+ while (current) {
53
+ const sourceFile = current.getAttribute("data-composition-file") ?? current.getAttribute("data-composition-src");
54
+ if (sourceFile) return sourceFile;
55
+ current = current.parentElement;
56
+ }
57
+ return activeCompositionPath ?? "index.html";
58
+ };
59
+ const elementMatchesSourceFile = (element, sourceFile) => sourceFileForElement(element) === sourceFile;
60
+ const isHTMLElement = (element) => element instanceof HTMLElement;
61
+ const querySelectorCandidates = (selector) => {
62
+ const className = selector.match(/^\.([A-Za-z0-9_-]+)$/)?.[1];
63
+ if (className) {
64
+ return Array.from(document.getElementsByTagName("*")).filter(
65
+ (element) => isHTMLElement(element) && element.classList.contains(className)
66
+ );
67
+ }
68
+ if (/^[A-Za-z][A-Za-z0-9-]*$/.test(selector)) {
69
+ return Array.from(document.getElementsByTagName(selector)).filter(isHTMLElement);
70
+ }
71
+ return Array.from(document.querySelectorAll(selector)).filter(isHTMLElement);
72
+ };
73
+ const resolveTarget = (targetRecord) => {
74
+ const sourceFile = typeof targetRecord.sourceFile === "string" ? targetRecord.sourceFile : "";
75
+ if (!sourceFile) return null;
76
+ const id = typeof targetRecord.id === "string" ? targetRecord.id : "";
77
+ if (id) {
78
+ const byId = document.getElementById(id);
79
+ if (isHTMLElement(byId) && elementMatchesSourceFile(byId, sourceFile)) return byId;
80
+ }
81
+ const selector = typeof targetRecord.selector === "string" ? targetRecord.selector : "";
82
+ if (!selector) return null;
83
+ try {
84
+ const selectorIndex = Math.max(0, Math.floor(finiteNumber(targetRecord.selectorIndex) ?? 0));
85
+ return querySelectorCandidates(selector).filter(
86
+ (element) => elementMatchesSourceFile(element, sourceFile)
87
+ )[selectorIndex] ?? null;
88
+ } catch {
89
+ return null;
90
+ }
91
+ };
92
+ const restoreElement = (element) => {
93
+ runtimeWindow.gsap?.set?.(element, { clearProps: "transform,opacity,visibility" });
94
+ element.style.transform = element.getAttribute(ORIGINAL_TRANSFORM_ATTR) ?? "";
95
+ element.style.opacity = element.getAttribute(ORIGINAL_OPACITY_ATTR) ?? "";
96
+ element.style.visibility = element.getAttribute(ORIGINAL_VISIBILITY_ATTR) ?? "";
97
+ element.removeAttribute(STUDIO_MOTION_ATTR);
98
+ element.removeAttribute(ORIGINAL_TRANSFORM_ATTR);
99
+ element.removeAttribute(ORIGINAL_OPACITY_ATTR);
100
+ element.removeAttribute(ORIGINAL_VISIBILITY_ATTR);
101
+ };
102
+ const restoreStudioMotionElements = () => {
103
+ for (const element of Array.from(document.querySelectorAll(`[${STUDIO_MOTION_ATTR}]`))) {
104
+ if (isHTMLElement(element)) restoreElement(element);
105
+ }
106
+ };
107
+ const readCurrentTime = () => {
108
+ try {
109
+ const playerTime = runtimeWindow.__player?.getTime?.();
110
+ if (typeof playerTime === "number" && Number.isFinite(playerTime)) {
111
+ return Math.max(0, playerTime);
112
+ }
113
+ } catch {
114
+ }
115
+ try {
116
+ const timelineTime = runtimeWindow.__timeline?.time?.();
117
+ if (typeof timelineTime === "number" && Number.isFinite(timelineTime)) {
118
+ return Math.max(0, timelineTime);
119
+ }
120
+ } catch {
121
+ }
122
+ return 0;
123
+ };
124
+ const resolveEase = (motion) => {
125
+ const fallback = typeof motion.ease === "string" && motion.ease.trim() ? motion.ease.trim() : "none";
126
+ const customEase = parseCustomEase(motion.customEase);
127
+ const customEasePlugin = runtimeWindow.CustomEase;
128
+ if (!customEase || typeof customEasePlugin?.create !== "function") return fallback;
129
+ try {
130
+ runtimeWindow.gsap?.registerPlugin?.(customEasePlugin);
131
+ customEasePlugin.create(customEase.id, customEase.data);
132
+ return customEase.id;
133
+ } catch {
134
+ return fallback;
135
+ }
136
+ };
137
+ const applyManifest = () => {
138
+ runtimeWindow.__timelines = runtimeWindow.__timelines ?? {};
139
+ runtimeWindow.__timelines[STUDIO_MOTION_TIMELINE_ID]?.kill?.();
140
+ delete runtimeWindow.__timelines[STUDIO_MOTION_TIMELINE_ID];
141
+ restoreStudioMotionElements();
142
+ const gsap = runtimeWindow.gsap;
143
+ if (!gsap?.timeline || manifestMotions.length === 0) return 0;
144
+ const timeline = gsap.timeline({ paused: true, defaults: { overwrite: "auto" } });
145
+ let applied = 0;
146
+ for (const motionValue of manifestMotions) {
147
+ const motion = objectRecord(motionValue);
148
+ if (!motion || motion.kind !== "gsap-motion") continue;
149
+ const targetRecord = objectRecord(motion.target);
150
+ if (!targetRecord) continue;
151
+ const target = resolveTarget(targetRecord);
152
+ if (!target || typeof timeline.fromTo !== "function") continue;
153
+ const start = finiteNumber(motion.start);
154
+ const duration = finiteNumber(motion.duration);
155
+ if (start == null || duration == null || start < 0 || duration <= 0) continue;
156
+ const from = parseMotionValues(motion.from);
157
+ const to = parseMotionValues(motion.to);
158
+ if (!from || !to) continue;
159
+ if (!target.hasAttribute(STUDIO_MOTION_ATTR)) {
160
+ target.setAttribute(ORIGINAL_TRANSFORM_ATTR, target.style.transform);
161
+ target.setAttribute(ORIGINAL_OPACITY_ATTR, target.style.opacity);
162
+ target.setAttribute(ORIGINAL_VISIBILITY_ATTR, target.style.visibility);
163
+ }
164
+ target.setAttribute(STUDIO_MOTION_ATTR, "true");
165
+ timeline.fromTo(
166
+ target,
167
+ from,
168
+ { ...to, duration, ease: resolveEase(motion), overwrite: "auto", immediateRender: false },
169
+ start
170
+ );
171
+ applied += 1;
172
+ }
173
+ if (applied === 0) {
174
+ timeline.kill?.();
175
+ return 0;
176
+ }
177
+ runtimeWindow.__timelines[STUDIO_MOTION_TIMELINE_ID] = timeline;
178
+ timeline.pause?.();
179
+ const currentTime = readCurrentTime();
180
+ if (typeof timeline.totalTime === "function") timeline.totalTime(currentTime, false);
181
+ else timeline.time?.(currentTime);
182
+ return applied;
183
+ };
184
+ runtimeWindow.__hfStudioMotionApply = applyManifest;
185
+ applyManifest();
186
+ }
187
+
188
+ export {
189
+ STUDIO_MOTION_PATH,
190
+ createStudioMotionRenderBodyScript
191
+ };
192
+ //# sourceMappingURL=chunk-4ETS2LXI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/helpers/studioMotionRenderScript.ts"],"sourcesContent":["export interface StudioMotionRenderScriptOptions {\n activeCompositionPath?: string | null;\n}\n\nexport const STUDIO_MOTION_PATH = \".hyperframes/studio-motion.json\";\n\nfunction hasStudioMotionEntries(manifestContent: string): boolean {\n try {\n const parsed = JSON.parse(manifestContent) as { motions?: unknown };\n return Array.isArray(parsed.motions) && parsed.motions.length > 0;\n } catch {\n return false;\n }\n}\n\n/**\n * Builds the render-time Studio motion runtime script, or null when no owned motion exists.\n */\nexport function createStudioMotionRenderBodyScript(\n manifestContent: string,\n options: StudioMotionRenderScriptOptions = {},\n): string | null {\n if (!manifestContent.trim() || !hasStudioMotionEntries(manifestContent)) return null;\n return `(${studioMotionRenderRuntime.toString()})(${JSON.stringify(manifestContent)}, ${JSON.stringify(options.activeCompositionPath ?? null)});`;\n}\n\nfunction studioMotionRenderRuntime(\n manifestContent: string,\n activeCompositionPath: string | null,\n): void {\n const STUDIO_MOTION_TIMELINE_ID = \"studio-motion\";\n const STUDIO_MOTION_ATTR = \"data-hf-studio-motion\";\n const ORIGINAL_TRANSFORM_ATTR = \"data-hf-studio-motion-original-transform\";\n const ORIGINAL_OPACITY_ATTR = \"data-hf-studio-motion-original-opacity\";\n const ORIGINAL_VISIBILITY_ATTR = \"data-hf-studio-motion-original-visibility\";\n\n const objectRecord = (value: unknown): Record<string, unknown> | null =>\n value && typeof value === \"object\" ? (value as Record<string, unknown>) : null;\n\n const finiteNumber = (value: unknown): number | null =>\n typeof value === \"number\" && Number.isFinite(value) ? value : null;\n\n const runtimeWindow = window as Window & {\n gsap?: {\n timeline?: (vars?: Record<string, unknown>) => {\n fromTo?: (\n target: HTMLElement,\n from: Record<string, unknown>,\n to: Record<string, unknown>,\n at: number,\n ) => unknown;\n totalTime?: (time: number, suppressEvents?: boolean) => unknown;\n time?: (time: number) => unknown;\n pause?: () => unknown;\n kill?: () => unknown;\n };\n set?: (target: HTMLElement, vars: Record<string, unknown>) => unknown;\n registerPlugin?: (...plugins: unknown[]) => unknown;\n };\n CustomEase?: { create?: (id: string, data: string) => unknown };\n __player?: { getTime?: () => number };\n __timeline?: { time?: () => number };\n __timelines?: Record<\n string,\n | {\n kill?: () => unknown;\n }\n | undefined\n >;\n __hfStudioMotionApply?: () => number;\n };\n\n const parseMotionValues = (value: unknown): Record<string, number> | null => {\n const record = objectRecord(value);\n if (!record) return null;\n const parsed: Record<string, number> = {};\n for (const key of [\"x\", \"y\", \"scale\", \"rotation\", \"opacity\", \"autoAlpha\"]) {\n const next = finiteNumber(record[key]);\n if (next != null) parsed[key] = next;\n }\n return Object.keys(parsed).length > 0 ? parsed : null;\n };\n\n const parseCustomEase = (value: unknown): { id: string; data: string } | null => {\n const record = objectRecord(value);\n if (!record) return null;\n const id = typeof record.id === \"string\" ? record.id.trim() : \"\";\n const data = typeof record.data === \"string\" ? record.data.trim() : \"\";\n if (!id || !data) return null;\n return { id, data };\n };\n\n const parsedManifest = (() => {\n try {\n return objectRecord(JSON.parse(manifestContent));\n } catch {\n return null;\n }\n })();\n const manifestMotions = Array.isArray(parsedManifest?.motions) ? parsedManifest.motions : [];\n\n const sourceFileForElement = (element: HTMLElement): string => {\n let current: HTMLElement | null = element;\n while (current) {\n const sourceFile =\n current.getAttribute(\"data-composition-file\") ??\n current.getAttribute(\"data-composition-src\");\n if (sourceFile) return sourceFile;\n current = current.parentElement;\n }\n return activeCompositionPath ?? \"index.html\";\n };\n\n const elementMatchesSourceFile = (element: HTMLElement, sourceFile: string): boolean =>\n sourceFileForElement(element) === sourceFile;\n\n const isHTMLElement = (element: Element | null): element is HTMLElement =>\n element instanceof HTMLElement;\n\n const querySelectorCandidates = (selector: string): HTMLElement[] => {\n const className = selector.match(/^\\.([A-Za-z0-9_-]+)$/)?.[1];\n if (className) {\n return Array.from(document.getElementsByTagName(\"*\")).filter(\n (element): element is HTMLElement =>\n isHTMLElement(element) && element.classList.contains(className),\n );\n }\n if (/^[A-Za-z][A-Za-z0-9-]*$/.test(selector)) {\n return Array.from(document.getElementsByTagName(selector)).filter(isHTMLElement);\n }\n return Array.from(document.querySelectorAll(selector)).filter(isHTMLElement);\n };\n\n const resolveTarget = (targetRecord: Record<string, unknown>): HTMLElement | null => {\n const sourceFile = typeof targetRecord.sourceFile === \"string\" ? targetRecord.sourceFile : \"\";\n if (!sourceFile) return null;\n const id = typeof targetRecord.id === \"string\" ? targetRecord.id : \"\";\n if (id) {\n const byId = document.getElementById(id);\n if (isHTMLElement(byId) && elementMatchesSourceFile(byId, sourceFile)) return byId;\n }\n const selector = typeof targetRecord.selector === \"string\" ? targetRecord.selector : \"\";\n if (!selector) return null;\n try {\n const selectorIndex = Math.max(0, Math.floor(finiteNumber(targetRecord.selectorIndex) ?? 0));\n return (\n querySelectorCandidates(selector).filter((element) =>\n elementMatchesSourceFile(element, sourceFile),\n )[selectorIndex] ?? null\n );\n } catch {\n return null;\n }\n };\n\n const restoreElement = (element: HTMLElement): void => {\n runtimeWindow.gsap?.set?.(element, { clearProps: \"transform,opacity,visibility\" });\n element.style.transform = element.getAttribute(ORIGINAL_TRANSFORM_ATTR) ?? \"\";\n element.style.opacity = element.getAttribute(ORIGINAL_OPACITY_ATTR) ?? \"\";\n element.style.visibility = element.getAttribute(ORIGINAL_VISIBILITY_ATTR) ?? \"\";\n element.removeAttribute(STUDIO_MOTION_ATTR);\n element.removeAttribute(ORIGINAL_TRANSFORM_ATTR);\n element.removeAttribute(ORIGINAL_OPACITY_ATTR);\n element.removeAttribute(ORIGINAL_VISIBILITY_ATTR);\n };\n\n const restoreStudioMotionElements = (): void => {\n for (const element of Array.from(document.querySelectorAll(`[${STUDIO_MOTION_ATTR}]`))) {\n if (isHTMLElement(element)) restoreElement(element);\n }\n };\n\n const readCurrentTime = (): number => {\n try {\n const playerTime = runtimeWindow.__player?.getTime?.();\n if (typeof playerTime === \"number\" && Number.isFinite(playerTime)) {\n return Math.max(0, playerTime);\n }\n } catch {\n // fall through\n }\n try {\n const timelineTime = runtimeWindow.__timeline?.time?.();\n if (typeof timelineTime === \"number\" && Number.isFinite(timelineTime)) {\n return Math.max(0, timelineTime);\n }\n } catch {\n // fall through\n }\n return 0;\n };\n\n const resolveEase = (motion: Record<string, unknown>): string => {\n const fallback =\n typeof motion.ease === \"string\" && motion.ease.trim() ? motion.ease.trim() : \"none\";\n const customEase = parseCustomEase(motion.customEase);\n const customEasePlugin = runtimeWindow.CustomEase;\n if (!customEase || typeof customEasePlugin?.create !== \"function\") return fallback;\n try {\n runtimeWindow.gsap?.registerPlugin?.(customEasePlugin);\n customEasePlugin.create(customEase.id, customEase.data);\n return customEase.id;\n } catch {\n return fallback;\n }\n };\n\n const applyManifest = (): number => {\n runtimeWindow.__timelines = runtimeWindow.__timelines ?? {};\n runtimeWindow.__timelines[STUDIO_MOTION_TIMELINE_ID]?.kill?.();\n delete runtimeWindow.__timelines[STUDIO_MOTION_TIMELINE_ID];\n restoreStudioMotionElements();\n const gsap = runtimeWindow.gsap;\n if (!gsap?.timeline || manifestMotions.length === 0) return 0;\n\n const timeline = gsap.timeline({ paused: true, defaults: { overwrite: \"auto\" } });\n let applied = 0;\n for (const motionValue of manifestMotions) {\n const motion = objectRecord(motionValue);\n if (!motion || motion.kind !== \"gsap-motion\") continue;\n const targetRecord = objectRecord(motion.target);\n if (!targetRecord) continue;\n const target = resolveTarget(targetRecord);\n if (!target || typeof timeline.fromTo !== \"function\") continue;\n const start = finiteNumber(motion.start);\n const duration = finiteNumber(motion.duration);\n if (start == null || duration == null || start < 0 || duration <= 0) continue;\n const from = parseMotionValues(motion.from);\n const to = parseMotionValues(motion.to);\n if (!from || !to) continue;\n if (!target.hasAttribute(STUDIO_MOTION_ATTR)) {\n target.setAttribute(ORIGINAL_TRANSFORM_ATTR, target.style.transform);\n target.setAttribute(ORIGINAL_OPACITY_ATTR, target.style.opacity);\n target.setAttribute(ORIGINAL_VISIBILITY_ATTR, target.style.visibility);\n }\n target.setAttribute(STUDIO_MOTION_ATTR, \"true\");\n timeline.fromTo(\n target,\n from,\n { ...to, duration, ease: resolveEase(motion), overwrite: \"auto\", immediateRender: false },\n start,\n );\n applied += 1;\n }\n\n if (applied === 0) {\n timeline.kill?.();\n return 0;\n }\n runtimeWindow.__timelines[STUDIO_MOTION_TIMELINE_ID] = timeline;\n timeline.pause?.();\n const currentTime = readCurrentTime();\n if (typeof timeline.totalTime === \"function\") timeline.totalTime(currentTime, false);\n else timeline.time?.(currentTime);\n return applied;\n };\n\n runtimeWindow.__hfStudioMotionApply = applyManifest;\n applyManifest();\n}\n"],"mappings":";AAIO,IAAM,qBAAqB;AAElC,SAAS,uBAAuB,iBAAkC;AAChE,MAAI;AACF,UAAM,SAAS,KAAK,MAAM,eAAe;AACzC,WAAO,MAAM,QAAQ,OAAO,OAAO,KAAK,OAAO,QAAQ,SAAS;AAAA,EAClE,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAKO,SAAS,mCACd,iBACA,UAA2C,CAAC,GAC7B;AACf,MAAI,CAAC,gBAAgB,KAAK,KAAK,CAAC,uBAAuB,eAAe,EAAG,QAAO;AAChF,SAAO,IAAI,0BAA0B,SAAS,CAAC,KAAK,KAAK,UAAU,eAAe,CAAC,KAAK,KAAK,UAAU,QAAQ,yBAAyB,IAAI,CAAC;AAC/I;AAEA,SAAS,0BACP,iBACA,uBACM;AACN,QAAM,4BAA4B;AAClC,QAAM,qBAAqB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