@cloudflare/kumo 2.7.0 → 2.8.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 (62) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/ai/component-registry.json +1164 -149
  3. package/ai/component-registry.md +1325 -114
  4. package/ai/schemas.ts +136 -7
  5. package/dist/.build-complete +1 -1
  6. package/dist/ai/schemas.d.ts +259 -22
  7. package/dist/ai/schemas.d.ts.map +1 -1
  8. package/dist/ai/schemas.js +1515 -1298
  9. package/dist/ai/schemas.js.map +1 -1
  10. package/dist/chunks/Maps-imwfwgb7do9lr3i5.js +2448 -0
  11. package/dist/chunks/Maps-imwfwgb7do9lr3i5.js.map +1 -0
  12. package/dist/chunks/input-area-sg518xu4pyg4m0km.js +144 -0
  13. package/dist/chunks/input-area-sg518xu4pyg4m0km.js.map +1 -0
  14. package/dist/chunks/{sidebar-ctd980heycmxsux1.js → sidebar-7whsl7qwrw5b6ip8.js} +306 -306
  15. package/dist/chunks/sidebar-7whsl7qwrw5b6ip8.js.map +1 -0
  16. package/dist/components/chart.js +1 -1
  17. package/dist/components/flow.js +2306 -2350
  18. package/dist/components/flow.js.map +1 -1
  19. package/dist/components/input.js +1 -1
  20. package/dist/components/sidebar.js +1 -1
  21. package/dist/index.js +3 -3
  22. package/dist/src/components/chart/TimeseriesChart.d.ts +8 -0
  23. package/dist/src/components/chart/TimeseriesChart.d.ts.map +1 -1
  24. package/dist/src/components/chart/index.d.ts +1 -1
  25. package/dist/src/components/chart/index.d.ts.map +1 -1
  26. package/dist/src/components/chart/timeseries-markers.d.ts +107 -0
  27. package/dist/src/components/chart/timeseries-markers.d.ts.map +1 -0
  28. package/dist/src/components/chart/timeseries-thresholds.d.ts +61 -0
  29. package/dist/src/components/chart/timeseries-thresholds.d.ts.map +1 -0
  30. package/dist/src/components/chart/timeseries-tooltip.d.ts +28 -0
  31. package/dist/src/components/chart/timeseries-tooltip.d.ts.map +1 -0
  32. package/dist/src/components/flow/connectors.d.ts +18 -0
  33. package/dist/src/components/flow/connectors.d.ts.map +1 -1
  34. package/dist/src/components/flow/diagram.d.ts +48 -41
  35. package/dist/src/components/flow/diagram.d.ts.map +1 -1
  36. package/dist/src/components/flow/flow-layout.d.ts +77 -0
  37. package/dist/src/components/flow/flow-layout.d.ts.map +1 -0
  38. package/dist/src/components/flow/node.d.ts.map +1 -1
  39. package/dist/src/components/flow/parallel.d.ts +3 -7
  40. package/dist/src/components/flow/parallel.d.ts.map +1 -1
  41. package/dist/src/components/flow/use-children.d.ts +0 -60
  42. package/dist/src/components/flow/use-children.d.ts.map +1 -1
  43. package/dist/src/components/input/input-area.d.ts +18 -0
  44. package/dist/src/components/input/input-area.d.ts.map +1 -1
  45. package/dist/src/components/sidebar/sidebar.d.ts +2 -0
  46. package/dist/src/components/sidebar/sidebar.d.ts.map +1 -1
  47. package/dist/src/primitives/index.d.ts +1 -1
  48. package/dist/src/primitives/index.d.ts.map +1 -1
  49. package/dist/src/primitives/otp-field.d.ts +1 -1
  50. package/dist/src/primitives/otp-field.d.ts.map +1 -1
  51. package/dist/styles/kumo-standalone.css +1 -1
  52. package/package.json +1 -1
  53. package/scripts/component-registry/discovery.ts +87 -0
  54. package/scripts/component-registry/index.test.ts +89 -1
  55. package/scripts/component-registry/index.ts +27 -2
  56. package/scripts/component-registry/sub-components.ts +34 -21
  57. package/scripts/generate-primitives.ts +1 -1
  58. package/dist/chunks/Maps-fkiyllhs5w0qzw1y.js +0 -2155
  59. package/dist/chunks/Maps-fkiyllhs5w0qzw1y.js.map +0 -1
  60. package/dist/chunks/input-area-ixtj4e8eny58nbf9.js +0 -78
  61. package/dist/chunks/input-area-ixtj4e8eny58nbf9.js.map +0 -1
  62. package/dist/chunks/sidebar-ctd980heycmxsux1.js.map +0 -1
@@ -0,0 +1,144 @@
1
+ "use client";
2
+ import { jsx as N } from "react/jsx-runtime";
3
+ import { i as S } from "./input-ckl5misj0jd9cu5r.js";
4
+ import * as Y from "react";
5
+ import { useRef as v, useCallback as k, useLayoutEffect as F, useEffect as A } from "react";
6
+ import { F as B, n as L } from "./field-bmglk138wa8bf3ei.js";
7
+ import { c as M } from "./vendor-styling-ofvnbcuht98q88oo.js";
8
+ import { aY as O } from "./vendor-base-ui-elpbzr8xeffrz4h2.js";
9
+ const W = typeof window < "u" ? F : A;
10
+ function f(n) {
11
+ const t = Number.parseFloat(n);
12
+ return Number.isNaN(t) ? 0 : t;
13
+ }
14
+ function P({
15
+ enabled: n,
16
+ minRows: t,
17
+ maxRows: R
18
+ }) {
19
+ const d = v(null), z = v(n);
20
+ z.current = n;
21
+ const m = v(t);
22
+ m.current = t;
23
+ const b = v(R);
24
+ b.current = R;
25
+ const a = k(() => {
26
+ const e = d.current;
27
+ if (!z.current || !e || typeof window > "u")
28
+ return;
29
+ const r = window.getComputedStyle(e), s = f(r.borderTopWidth) + f(r.borderBottomWidth), l = f(r.paddingTop) + f(r.paddingBottom), p = r.boxSizing === "border-box";
30
+ e.style.height = "auto";
31
+ let c = p ? e.scrollHeight + s : e.scrollHeight - l;
32
+ const w = m.current, o = b.current;
33
+ if (w > 0 || o && o > 0) {
34
+ const C = f(r.fontSize), u = r.lineHeight, g = u === "normal" || u === "" ? C * 1.2 : u.endsWith("px") ? f(u) : f(u) * C, x = p ? l + s : 0, h = g * w + x;
35
+ if (c = Math.max(c, h), o && o > 0) {
36
+ const y = g * o + x;
37
+ c > y ? (c = y, e.style.overflowY = "auto") : e.style.overflowY = "hidden";
38
+ } else
39
+ e.style.overflowY = "hidden";
40
+ } else
41
+ e.style.overflowY = "hidden";
42
+ e.style.height = `${c}px`;
43
+ }, []);
44
+ return W(() => {
45
+ n && a();
46
+ }), W(() => {
47
+ if (!n) return;
48
+ const e = d.current;
49
+ if (!e) return;
50
+ let r = e.clientWidth;
51
+ const s = typeof ResizeObserver < "u" ? new ResizeObserver(() => {
52
+ e.clientWidth !== r && (r = e.clientWidth, a());
53
+ }) : null;
54
+ return s?.observe(e), () => {
55
+ s?.disconnect(), e.style.height = "", e.style.overflowY = "";
56
+ };
57
+ }, [n, a]), { textareaRef: d, resize: a };
58
+ }
59
+ const I = Y.forwardRef(
60
+ (n, t) => {
61
+ const {
62
+ className: R,
63
+ onValueChange: d,
64
+ size: z = "base",
65
+ variant: m,
66
+ onChange: b,
67
+ label: a,
68
+ labelTooltip: e,
69
+ description: r,
70
+ error: s,
71
+ autoResize: l = !1,
72
+ minRows: p = 1,
73
+ maxRows: c,
74
+ rows: w,
75
+ ...o
76
+ } = n;
77
+ process.env.NODE_ENV !== "production" && m === "error" && console.warn(
78
+ '[Kumo InputArea]: variant="error" is deprecated. Error styling is now automatically applied when the `error` prop is truthy. Simply remove the variant prop and pass an error message instead.'
79
+ );
80
+ const C = m ?? (s ? "error" : "default"), { required: u } = o, { textareaRef: g, resize: x } = P({
81
+ enabled: l,
82
+ minRows: p,
83
+ maxRows: c
84
+ }), h = v(void 0), y = k(
85
+ (i) => {
86
+ g.current = i, typeof t == "function" ? i ? h.current = t(i) : h.current ? (h.current(), h.current = void 0) : t(null) : t && (t.current = i);
87
+ },
88
+ [t, g]
89
+ ), E = o.value !== void 0, H = k(
90
+ (i) => {
91
+ b?.(i), d?.(i.target.value), E || x();
92
+ },
93
+ [b, d, x, E]
94
+ ), T = M(
95
+ S({ size: z, variant: C, focusIndicator: !0 }),
96
+ "h-auto py-2",
97
+ // Input variant always comes with size, but it does not apply for textarea
98
+ l && "w-full field-sizing-content resize-none scroll-pb-2 [scrollbar-color:var(--color-kumo-line)_transparent] [scrollbar-width:thin] [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar]:bg-transparent [&::-webkit-scrollbar-track]:my-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-kumo-line [&::-webkit-scrollbar-corner]:bg-transparent",
99
+ R
100
+ );
101
+ return a || s || r ? /* @__PURE__ */ N(
102
+ B,
103
+ {
104
+ label: a,
105
+ required: u,
106
+ labelTooltip: e,
107
+ description: r,
108
+ error: L(s),
109
+ children: /* @__PURE__ */ N(
110
+ O,
111
+ {
112
+ render: (i) => /* @__PURE__ */ N(
113
+ "textarea",
114
+ {
115
+ ...i,
116
+ ref: y,
117
+ className: T,
118
+ onChange: H,
119
+ rows: l ? p : w,
120
+ ...o
121
+ }
122
+ )
123
+ }
124
+ )
125
+ }
126
+ ) : /* @__PURE__ */ N(
127
+ "textarea",
128
+ {
129
+ ref: y,
130
+ className: T,
131
+ onChange: H,
132
+ rows: l ? p : w,
133
+ ...o
134
+ }
135
+ );
136
+ }
137
+ );
138
+ I.displayName = "InputArea";
139
+ const $ = I;
140
+ export {
141
+ I,
142
+ $ as T
143
+ };
144
+ //# sourceMappingURL=input-area-sg518xu4pyg4m0km.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-area-sg518xu4pyg4m0km.js","sources":["../../src/components/input/input-area.tsx"],"sourcesContent":["import { inputVariants } from \"./input\";\nimport { cn } from \"../../utils/cn\";\nimport {\n useCallback,\n useEffect,\n useLayoutEffect,\n useRef,\n type ReactNode,\n} from \"react\";\nimport * as React from \"react\";\nimport { Field as FieldBase } from \"@base-ui/react/field\";\nimport {\n Field as KumoField,\n normalizeFieldError,\n type FieldErrorMatch,\n} from \"../field/field\";\n\n// useLayoutEffect warns when rendered with react-dom/server (React 18);\n// fall back to useEffect on the server where neither runs anyway.\nconst useIsomorphicLayoutEffect =\n typeof window !== \"undefined\" ? useLayoutEffect : useEffect;\n\nfunction parsePx(value: string): number {\n const parsed = Number.parseFloat(value);\n return Number.isNaN(parsed) ? 0 : parsed;\n}\n\n/**\n * Measures the content height of a textarea and applies it as an explicit\n * height, optionally clamped to `maxRows`. Handles box-sizing/borders and\n * container width changes (rewrapping).\n */\nfunction useTextareaAutoResize({\n enabled,\n minRows,\n maxRows,\n}: {\n enabled: boolean;\n minRows: number;\n maxRows?: number;\n}) {\n const textareaRef = useRef<HTMLTextAreaElement | null>(null);\n const enabledRef = useRef(enabled);\n enabledRef.current = enabled;\n const minRowsRef = useRef(minRows);\n minRowsRef.current = minRows;\n const maxRowsRef = useRef(maxRows);\n maxRowsRef.current = maxRows;\n\n const resize = useCallback(() => {\n const textarea = textareaRef.current;\n if (!enabledRef.current || !textarea || typeof window === \"undefined\")\n return;\n\n const style = window.getComputedStyle(textarea);\n const borders =\n parsePx(style.borderTopWidth) + parsePx(style.borderBottomWidth);\n const padding =\n parsePx(style.paddingTop) + parsePx(style.paddingBottom);\n const isBorderBox = style.boxSizing === \"border-box\";\n\n // Collapsing to `auto` lets scrollHeight report the true content height\n // (needed to shrink); measure-then-write happens within a single layout\n // pass, before paint.\n textarea.style.height = \"auto\";\n // scrollHeight = content + padding. Convert to the height the current\n // box-sizing expects: border-box needs borders added, content-box needs\n // padding removed.\n let height = isBorderBox\n ? textarea.scrollHeight + borders\n : textarea.scrollHeight - padding;\n\n const currentMinRows = minRowsRef.current;\n const currentMaxRows = maxRowsRef.current;\n if (currentMinRows > 0 || (currentMaxRows && currentMaxRows > 0)) {\n // Computed line-height is normally a px value, but some environments\n // (e.g. jsdom) can return \"normal\" or a unitless multiplier like \"1.5\".\n const fontSize = parsePx(style.fontSize);\n const rawLineHeight = style.lineHeight;\n const lineHeight =\n rawLineHeight === \"normal\" || rawLineHeight === \"\"\n ? fontSize * 1.2\n : rawLineHeight.endsWith(\"px\")\n ? parsePx(rawLineHeight)\n : parsePx(rawLineHeight) * fontSize;\n const boxSpacing = isBorderBox ? padding + borders : 0;\n const minHeight = lineHeight * currentMinRows + boxSpacing;\n height = Math.max(height, minHeight);\n\n if (currentMaxRows && currentMaxRows > 0) {\n const maxHeight = lineHeight * currentMaxRows + boxSpacing;\n if (height > maxHeight) {\n height = maxHeight;\n // Content exceeds the clamp — it must stay scrollable.\n textarea.style.overflowY = \"auto\";\n } else {\n textarea.style.overflowY = \"hidden\";\n }\n } else {\n textarea.style.overflowY = \"hidden\";\n }\n } else {\n textarea.style.overflowY = \"hidden\";\n }\n\n textarea.style.height = `${height}px`;\n }, []);\n\n // Re-measure after every commit while enabled: covers controlled value\n // changes, size/variant/className changes, and anything else that reflows.\n // Two extra synchronous layouts per render is cheap for a textarea and\n // immune to stale-dependency bugs.\n useIsomorphicLayoutEffect(() => {\n if (enabled) resize();\n });\n\n // Setup/teardown per node while enabled. Restores inline styles when\n // autoResize turns off or on unmount so the manual resize handle behavior\n // returns untouched.\n useIsomorphicLayoutEffect(() => {\n if (!enabled) return;\n const textarea = textareaRef.current;\n if (!textarea) return;\n\n // Width changes rewrap content and change the required height. Only\n // react to inline-size changes — our own height writes also fire the\n // observer and would otherwise cause redundant resize passes.\n let lastWidth = textarea.clientWidth;\n const observer =\n typeof ResizeObserver !== \"undefined\"\n ? new ResizeObserver(() => {\n if (textarea.clientWidth !== lastWidth) {\n lastWidth = textarea.clientWidth;\n resize();\n }\n })\n : null;\n observer?.observe(textarea);\n\n return () => {\n observer?.disconnect();\n textarea.style.height = \"\";\n textarea.style.overflowY = \"\";\n };\n }, [enabled, resize]);\n\n return { textareaRef, resize };\n}\n\nexport const InputArea = React.forwardRef<HTMLTextAreaElement, InputAreaProps>(\n (props, ref) => {\n const {\n className,\n onValueChange,\n size = \"base\",\n variant: variantProp,\n onChange,\n label,\n labelTooltip,\n description,\n error,\n autoResize = false,\n minRows = 1,\n maxRows,\n rows,\n ...inputProps\n } = props;\n\n // Deprecation warning for variant=\"error\"\n if (process.env.NODE_ENV !== \"production\" && variantProp === \"error\") {\n console.warn(\n '[Kumo InputArea]: variant=\"error\" is deprecated. ' +\n \"Error styling is now automatically applied when the `error` prop is truthy. \" +\n \"Simply remove the variant prop and pass an error message instead.\",\n );\n }\n\n // Auto-apply error styling when error prop is truthy\n // Explicit variant prop takes precedence for backwards compatibility\n const variant = variantProp ?? (error ? \"error\" : \"default\");\n\n // Extract required from inputProps to pass to Field for label decoration\n const { required } = inputProps;\n const { textareaRef, resize } = useTextareaAutoResize({\n enabled: autoResize,\n minRows,\n maxRows,\n });\n\n // Forwarded ref may be a React 19 callback ref returning a cleanup\n // function — honor it instead of calling ref(null) on detach.\n const refCleanup = useRef<(() => void) | void>(undefined);\n const setTextareaRef = useCallback(\n (node: HTMLTextAreaElement | null) => {\n textareaRef.current = node;\n\n if (typeof ref === \"function\") {\n if (node) {\n refCleanup.current = ref(node) as (() => void) | void;\n } else if (refCleanup.current) {\n refCleanup.current();\n refCleanup.current = undefined;\n } else {\n ref(null);\n }\n } else if (ref) {\n ref.current = node;\n }\n },\n [ref, textareaRef],\n );\n\n // Controlled inputs re-render on every keystroke, so the post-render\n // layout effect already re-measures; resizing here too would force a\n // second synchronous layout. Uncontrolled inputs don't re-render, so the\n // change handler is their only resize trigger.\n const isControlled = inputProps.value !== undefined;\n const handleChange = useCallback(\n (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n onChange?.(event);\n onValueChange?.(event.target.value);\n if (!isControlled) resize();\n },\n [onChange, onValueChange, resize, isControlled],\n );\n\n const textareaClassName = cn(\n inputVariants({ size, variant, focusIndicator: true }),\n \"h-auto py-2\", // Input variant always comes with size, but it does not apply for textarea\n autoResize &&\n \"w-full field-sizing-content resize-none scroll-pb-2 [scrollbar-color:var(--color-kumo-line)_transparent] [scrollbar-width:thin] [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar]:bg-transparent [&::-webkit-scrollbar-track]:my-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-kumo-line [&::-webkit-scrollbar-corner]:bg-transparent\",\n className,\n );\n\n // Render with Field wrapper if label, error, or description is provided\n // Use FieldBase.Control with render callback to ensure proper label-textarea association.\n // The render callback receives props with the correct id/aria-labelledby from Field context.\n if (label || error || description) {\n return (\n <KumoField\n label={label}\n required={required}\n labelTooltip={labelTooltip}\n description={description}\n error={normalizeFieldError(error)}\n >\n <FieldBase.Control\n render={(controlProps) => (\n <textarea\n {...controlProps}\n ref={setTextareaRef}\n className={textareaClassName}\n onChange={handleChange}\n rows={autoResize ? minRows : rows}\n {...inputProps}\n />\n )}\n />\n </KumoField>\n );\n }\n\n // Render bare textarea without Field wrapper\n return (\n <textarea\n ref={setTextareaRef}\n className={textareaClassName}\n onChange={handleChange}\n rows={autoResize ? minRows : rows}\n {...inputProps}\n />\n );\n },\n);\n\nInputArea.displayName = \"InputArea\";\n\n/** Alias for InputArea — provided for discoverability when migrating from other libraries */\nexport const Textarea = InputArea;\n\n/**\n * InputArea component props\n * @property {ReactNode} [label] - Label content for the textarea (enables Field wrapper)\n * @property {ReactNode} [description] - Helper text displayed below the textarea\n * @property {string | { message: ReactNode, match: FieldErrorMatch }} [error] - Error message or validation error object\n */\nexport type InputAreaProps = {\n onValueChange?: (value: string) => void;\n variant?: \"default\" | \"error\";\n size?: \"xs\" | \"sm\" | \"base\" | \"lg\";\n // Then other custom props\n children?: React.ReactNode;\n className?: string;\n /** Label content for the textarea (enables Field wrapper) - can be a string or any React node */\n label?: ReactNode;\n /** Tooltip content to display next to the label via an info icon */\n labelTooltip?: ReactNode;\n /** Helper text displayed below the textarea */\n description?: ReactNode;\n /** Error message or validation error object */\n error?: string | { message: ReactNode; match: FieldErrorMatch };\n /** Automatically resize the textarea based on its content. */\n autoResize?: boolean;\n /** Minimum number of rows to display when `autoResize` is enabled. @default 1 */\n minRows?: number;\n /** Maximum number of rows to grow to when `autoResize` is enabled; content beyond this scrolls. */\n maxRows?: number;\n\n // Finally, spread the native input props (least important)\n} & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, \"size\">;\n"],"names":["useIsomorphicLayoutEffect","useLayoutEffect","useEffect","parsePx","value","parsed","useTextareaAutoResize","enabled","minRows","maxRows","textareaRef","useRef","enabledRef","minRowsRef","maxRowsRef","resize","useCallback","textarea","style","borders","padding","isBorderBox","height","currentMinRows","currentMaxRows","fontSize","rawLineHeight","lineHeight","boxSpacing","minHeight","maxHeight","lastWidth","observer","InputArea","React","props","ref","className","onValueChange","size","variantProp","onChange","label","labelTooltip","description","error","autoResize","rows","inputProps","variant","required","refCleanup","setTextareaRef","node","isControlled","handleChange","event","textareaClassName","cn","inputVariants","jsx","KumoField","normalizeFieldError","FieldBase.Control","controlProps","Textarea"],"mappings":";;;;;;;;AAmBA,MAAMA,IACJ,OAAO,SAAW,MAAcC,IAAkBC;AAEpD,SAASC,EAAQC,GAAuB;AACtC,QAAMC,IAAS,OAAO,WAAWD,CAAK;AACtC,SAAO,OAAO,MAAMC,CAAM,IAAI,IAAIA;AACpC;AAOA,SAASC,EAAsB;AAAA,EAC7B,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AACF,GAIG;AACD,QAAMC,IAAcC,EAAmC,IAAI,GACrDC,IAAaD,EAAOJ,CAAO;AACjC,EAAAK,EAAW,UAAUL;AACrB,QAAMM,IAAaF,EAAOH,CAAO;AACjC,EAAAK,EAAW,UAAUL;AACrB,QAAMM,IAAaH,EAAOF,CAAO;AACjC,EAAAK,EAAW,UAAUL;AAErB,QAAMM,IAASC,EAAY,MAAM;AAC/B,UAAMC,IAAWP,EAAY;AAC7B,QAAI,CAACE,EAAW,WAAW,CAACK,KAAY,OAAO,SAAW;AACxD;AAEF,UAAMC,IAAQ,OAAO,iBAAiBD,CAAQ,GACxCE,IACJhB,EAAQe,EAAM,cAAc,IAAIf,EAAQe,EAAM,iBAAiB,GAC3DE,IACJjB,EAAQe,EAAM,UAAU,IAAIf,EAAQe,EAAM,aAAa,GACnDG,IAAcH,EAAM,cAAc;AAKxC,IAAAD,EAAS,MAAM,SAAS;AAIxB,QAAIK,IAASD,IACTJ,EAAS,eAAeE,IACxBF,EAAS,eAAeG;AAE5B,UAAMG,IAAiBV,EAAW,SAC5BW,IAAiBV,EAAW;AAClC,QAAIS,IAAiB,KAAMC,KAAkBA,IAAiB,GAAI;AAGhE,YAAMC,IAAWtB,EAAQe,EAAM,QAAQ,GACjCQ,IAAgBR,EAAM,YACtBS,IACJD,MAAkB,YAAYA,MAAkB,KAC5CD,IAAW,MACXC,EAAc,SAAS,IAAI,IACzBvB,EAAQuB,CAAa,IACr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