@dou-ui/flow 0.1.0-alpha.13 → 0.1.0-alpha.15

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.
@@ -1 +1 @@
1
- {"version":3,"file":"extension.js","names":[],"sources":["../../src/core/extension.ts"],"sourcesContent":["import type { ContextMenuItem } from 'dou-ui'\nimport type { Component } from 'vue'\nimport type { FlowEditorContext } from '../context'\nimport type { FlowDrawContext } from '../export/context'\nimport type { FlowConnection, PortTypes } from './connect'\nimport type { EdgeTypeSpec } from './edge-types'\nimport type { FlowMenuTarget, FlowToolbarItem } from './menu'\nimport type { FlowDocument, FlowEdge, FlowNode, Point } from './model'\nimport type { NodeTypeSpec } from './node-types'\nimport type { FlowTransaction } from './transaction'\n\n/** What an extension's hooks receive; the same as `useFlowEditor()`. */\nexport type FlowExtensionContext = FlowEditorContext\n\n/**\n * A key handler: return `false` to let the key through to the next handler\n * and the editor's own keys; anything else means it was handled.\n */\nexport type FlowKeyHandler = (event: KeyboardEvent) => boolean | void\n\n/** An undo history that replaces the editor's own, e.g. one that only undoes this user's changes. */\nexport interface FlowHistoryHandler {\n /** `false` when there is nothing to undo. */\n undo: () => boolean\n redo: () => boolean\n canUndo: () => boolean\n canRedo: () => boolean\n}\n\n/** A press on the editor that an extension may take over, e.g. a drawing tool. */\nexport interface FlowPress {\n /** Where it was pressed, in canvas coordinates. */\n point: Point\n /** The node under the pointer, if any. */\n node: FlowNode | null\n event: PointerEvent\n}\n\n/** Follows a press an extension took over, until the pointer is let go. */\nexport interface FlowPressHandler {\n move?: (point: Point, event: PointerEvent) => void\n end?: (point: Point, event: PointerEvent) => void\n /** Escape, a second finger, or the browser took the pointer. */\n cancel?: () => void\n}\n\n/**\n * A piece of the editor: node types, port types, connection rules, keys and\n * extra layers. The default node type comes as an extension too (see\n * `flowKit`), so a third-party extension stands on equal footing with it.\n */\nexport interface FlowExtension {\n name: string\n /** Higher runs first: its keys and rules are asked before others. Defaults to 100. */\n priority?: number\n nodeTypes?: NodeTypeSpec<any>[]\n /** Edge types, used by `edge.type`; `flowKit` brings `bezier`, `step` and `straight`. */\n edgeTypes?: EdgeTypeSpec<any>[]\n /**\n * The edge type of edges without a `type`, unless the editor's `edge-type`\n * prop says otherwise. The last extension that sets it wins.\n */\n edgeType?: string\n /** Looks and connection rules of port types; see the `portTypes` prop. */\n portTypes?: PortTypes\n /**\n * A connection rule, asked after the built-in ones. Return `false` to\n * refuse, or a sentence saying why. Called for every port while dragging.\n */\n canConnect?: (connection: FlowConnection, doc: FlowDocument) => boolean | string\n /** Keys, written as in `useHotkey` (e.g. `mod+g`, `shift+t`), while the canvas has focus. */\n keymap?: (context: FlowExtensionContext) => Record<string, FlowKeyHandler>\n /** Rewrites nodes and edges before they are pasted, e.g. to reset run state. */\n transformPaste?: (data: FlowDocument, context: FlowExtensionContext) => FlowDocument\n /**\n * Components drawn in canvas coordinates: `below` under the edges, `above`\n * over the nodes. They move and zoom with the canvas.\n */\n layers?: { below?: Component[]; above?: Component[] }\n /**\n * What `layers.above` shows, for `exportSVG` and `exportPNG`: SVG markup\n * in canvas coordinates, drawn over the nodes. `nodes` are the ones in the\n * picture; `draw.width` and `draw.height` are the picture's size.\n */\n drawLayer?: (context: FlowExtensionContext, draw: FlowDrawContext, nodes: FlowNode[]) => string\n /**\n * Components drawn over the editor in screen space, e.g. a panel or a\n * popup. They can call `useFlowEditor()`.\n */\n overlays?: Component[]\n /**\n * Items for the menu opened by a right click, a long press on the empty\n * canvas, or the context menu key. Extensions' items follow each other\n * in priority order; an empty list leaves them out.\n */\n contextMenu?: (context: FlowExtensionContext, target: FlowMenuTarget) => ContextMenuItem[]\n /** Buttons for the toolbar that floats above the selected nodes. */\n toolbarItems?: (context: FlowExtensionContext, nodes: FlowNode[]) => FlowToolbarItem[]\n /** Buttons for the toolbar that floats above the selected edges, when no node is selected. */\n edgeToolbarItems?: (context: FlowExtensionContext, edges: FlowEdge[]) => FlowToolbarItem[]\n /**\n * Asked first when the canvas or a node is pressed with the main button or\n * one finger, in priority order. Return handlers to take the press over;\n * the editor then doesn't select, drag or pan for it. Asked while\n * read-only too: check `context.readonly` before changing the document.\n */\n press?: (context: FlowExtensionContext, press: FlowPress) => FlowPressHandler | void\n /** Runs once the editor is mounted. Return a function to run when it unmounts. */\n setup?: (context: FlowExtensionContext) => void | (() => void)\n /**\n * Sees every change before it reaches the document, in priority order,\n * and may add steps to it. Undo and redo come through here too.\n */\n transaction?: (tr: FlowTransaction, context: FlowExtensionContext) => void\n /** Replaces the editor's undo history; the first extension that has one wins. */\n history?: (context: FlowExtensionContext) => FlowHistoryHandler\n}\n\n/** Declares an extension; only gives it a type. */\nexport function defineFlowExtension(extension: FlowExtension): FlowExtension {\n return extension\n}\n\n/** Everything the extensions contribute, gathered once per list. */\nexport interface ResolvedFlowExtensions {\n extensions: FlowExtension[]\n nodeTypes: Map<string, NodeTypeSpec>\n edgeTypes: Map<string, EdgeTypeSpec>\n edgeType: string | undefined\n portTypes: PortTypes\n rules: NonNullable<FlowExtension['canConnect']>[]\n keymaps: NonNullable<FlowExtension['keymap']>[]\n pasteTransforms: NonNullable<FlowExtension['transformPaste']>[]\n below: Component[]\n above: Component[]\n overlays: Component[]\n menus: NonNullable<FlowExtension['contextMenu']>[]\n toolbars: NonNullable<FlowExtension['toolbarItems']>[]\n edgeToolbars: NonNullable<FlowExtension['edgeToolbarItems']>[]\n drawLayers: NonNullable<FlowExtension['drawLayer']>[]\n setups: NonNullable<FlowExtension['setup']>[]\n transactions: NonNullable<FlowExtension['transaction']>[]\n history: FlowExtension['history']\n presses: NonNullable<FlowExtension['press']>[]\n}\n\ntype ExtensionList = readonly (FlowExtension | readonly FlowExtension[])[]\n\nfunction flatten(list: ExtensionList): FlowExtension[] {\n const out: FlowExtension[] = []\n for (const item of list) {\n if (Array.isArray(item)) out.push(...flatten(item))\n else out.push(item as FlowExtension)\n }\n return out\n}\n\n/** Sorts the extensions by priority and collects what they add. */\nexport function resolveFlowExtensions(list: ExtensionList): ResolvedFlowExtensions {\n const extensions = flatten(list)\n .map((extension, index) => ({ extension, index }))\n // oxlint-disable-next-line unicorn/no-array-sort -- sorts a fresh array\n .sort(\n (a, b) => (b.extension.priority ?? 100) - (a.extension.priority ?? 100) || a.index - b.index,\n )\n .map((entry) => entry.extension)\n\n const names = new Set<string>()\n const nodeTypes = new Map<string, NodeTypeSpec>()\n const edgeTypes = new Map<string, EdgeTypeSpec>()\n const portTypes: PortTypes = {}\n for (const extension of extensions) {\n if (names.has(extension.name))\n throw new Error(`[@dou-ui/flow] the extension \"${extension.name}\" is added twice`)\n names.add(extension.name)\n for (const spec of extension.nodeTypes ?? []) {\n if (nodeTypes.has(spec.type))\n throw new Error(\n `[@dou-ui/flow] node type \"${spec.type}\" from \"${extension.name}\" is already defined`,\n )\n nodeTypes.set(spec.type, spec)\n }\n for (const spec of extension.edgeTypes ?? []) {\n if (edgeTypes.has(spec.type))\n throw new Error(\n `[@dou-ui/flow] edge type \"${spec.type}\" from \"${extension.name}\" is already defined`,\n )\n edgeTypes.set(spec.type, spec)\n }\n for (const [name, spec] of Object.entries(extension.portTypes ?? {})) {\n if (name in portTypes)\n throw new Error(\n `[@dou-ui/flow] port type \"${name}\" from \"${extension.name}\" is already defined`,\n )\n portTypes[name] = spec\n }\n }\n\n const pick = <K extends keyof FlowExtension>(key: K) =>\n extensions.flatMap((e) => (e[key] ? [e[key]] : [])) as NonNullable<FlowExtension[K]>[]\n\n return {\n extensions,\n nodeTypes,\n edgeTypes,\n edgeType: extensions.reduce<string | undefined>((type, e) => e.edgeType ?? type, undefined),\n portTypes,\n rules: pick('canConnect'),\n keymaps: pick('keymap'),\n pasteTransforms: pick('transformPaste'),\n below: extensions.flatMap((e) => e.layers?.below ?? []),\n above: extensions.flatMap((e) => e.layers?.above ?? []),\n overlays: extensions.flatMap((e) => e.overlays ?? []),\n menus: pick('contextMenu'),\n presses: pick('press'),\n toolbars: pick('toolbarItems'),\n edgeToolbars: pick('edgeToolbarItems'),\n drawLayers: pick('drawLayer'),\n setups: pick('setup'),\n transactions: pick('transaction'),\n history: extensions.find((e) => e.history)?.history,\n }\n}\n"],"mappings":";;AAuHA,SAAgB,oBAAoB,WAAyC;CAC3E,OAAO;AACT;AA2BA,SAAS,QAAQ,MAAsC;CACrD,MAAM,MAAuB,CAAC;CAC9B,KAAK,MAAM,QAAQ,MACjB,IAAI,MAAM,QAAQ,IAAI,GAAG,IAAI,KAAK,GAAG,QAAQ,IAAI,CAAC;MAC7C,IAAI,KAAK,IAAqB;CAErC,OAAO;AACT;;AAGA,SAAgB,sBAAsB,MAA6C;CACjF,MAAM,aAAa,QAAQ,IAAI,CAAC,CAC7B,KAAK,WAAW,WAAW;EAAE;EAAW;CAAM,EAAE,CAAC,CAEjD,MACE,GAAG,OAAO,EAAE,UAAU,YAAY,QAAQ,EAAE,UAAU,YAAY,QAAQ,EAAE,QAAQ,EAAE,KACzF,CAAC,CACA,KAAK,UAAU,MAAM,SAAS;CAEjC,MAAM,wBAAQ,IAAI,IAAY;CAC9B,MAAM,4BAAY,IAAI,IAA0B;CAChD,MAAM,4BAAY,IAAI,IAA0B;CAChD,MAAM,YAAuB,CAAC;CAC9B,KAAK,MAAM,aAAa,YAAY;EAClC,IAAI,MAAM,IAAI,UAAU,IAAI,GAC1B,MAAM,IAAI,MAAM,iCAAiC,UAAU,KAAK,iBAAiB;EACnF,MAAM,IAAI,UAAU,IAAI;EACxB,KAAK,MAAM,QAAQ,UAAU,aAAa,CAAC,GAAG;GAC5C,IAAI,UAAU,IAAI,KAAK,IAAI,GACzB,MAAM,IAAI,MACR,6BAA6B,KAAK,KAAK,UAAU,UAAU,KAAK,qBAClE;GACF,UAAU,IAAI,KAAK,MAAM,IAAI;EAC/B;EACA,KAAK,MAAM,QAAQ,UAAU,aAAa,CAAC,GAAG;GAC5C,IAAI,UAAU,IAAI,KAAK,IAAI,GACzB,MAAM,IAAI,MACR,6BAA6B,KAAK,KAAK,UAAU,UAAU,KAAK,qBAClE;GACF,UAAU,IAAI,KAAK,MAAM,IAAI;EAC/B;EACA,KAAK,MAAM,CAAC,MAAM,SAAS,OAAO,QAAQ,UAAU,aAAa,CAAC,CAAC,GAAG;GACpE,IAAI,QAAQ,WACV,MAAM,IAAI,MACR,6BAA6B,KAAK,UAAU,UAAU,KAAK,qBAC7D;GACF,UAAU,QAAQ;EACpB;CACF;CAEA,MAAM,QAAuC,QAC3C,WAAW,SAAS,MAAO,EAAE,OAAO,CAAC,EAAE,IAAI,IAAI,CAAC,CAAE;CAEpD,OAAO;EACL;EACA;EACA;EACA,UAAU,WAAW,QAA4B,MAAM,MAAM,EAAE,YAAY,MAAM,KAAA,CAAS;EAC1F;EACA,OAAO,KAAK,YAAY;EACxB,SAAS,KAAK,QAAQ;EACtB,iBAAiB,KAAK,gBAAgB;EACtC,OAAO,WAAW,SAAS,MAAM,EAAE,QAAQ,SAAS,CAAC,CAAC;EACtD,OAAO,WAAW,SAAS,MAAM,EAAE,QAAQ,SAAS,CAAC,CAAC;EACtD,UAAU,WAAW,SAAS,MAAM,EAAE,YAAY,CAAC,CAAC;EACpD,OAAO,KAAK,aAAa;EACzB,SAAS,KAAK,OAAO;EACrB,UAAU,KAAK,cAAc;EAC7B,cAAc,KAAK,kBAAkB;EACrC,YAAY,KAAK,WAAW;EAC5B,QAAQ,KAAK,OAAO;EACpB,cAAc,KAAK,aAAa;EAChC,SAAS,WAAW,MAAM,MAAM,EAAE,OAAO,CAAC,EAAE;CAC9C;AACF"}
1
+ {"version":3,"file":"extension.js","names":[],"sources":["../../src/core/extension.ts"],"sourcesContent":["import type { ContextMenuItem } from 'dou-ui'\nimport type { Component } from 'vue'\nimport type { FlowEditorContext } from '../context'\nimport type { FlowDrawContext } from '../export/context'\nimport type { FlowConnection, PortTypes } from './connect'\nimport type { EdgeTypeSpec } from './edge-types'\nimport type { FlowMenuTarget, FlowToolbarItem } from './menu'\nimport type { FlowDocument, FlowEdge, FlowNode, Point } from './model'\nimport type { NodeTypeSpec } from './node-types'\nimport type { FlowTransaction } from './transaction'\n\n/** What an extension's hooks receive; the same as `useFlowEditor()`. */\nexport type FlowExtensionContext = FlowEditorContext\n\n/**\n * A key handler: return `false` to let the key through to the next handler\n * and the editor's own keys; anything else means it was handled.\n */\nexport type FlowKeyHandler = (event: KeyboardEvent) => boolean | void\n\n/** An undo history that replaces the editor's own, e.g. one that only undoes this user's changes. */\nexport interface FlowHistoryHandler {\n /** `false` when there is nothing to undo. */\n undo: () => boolean\n redo: () => boolean\n canUndo: () => boolean\n canRedo: () => boolean\n /**\n * Forget the changes of `group` not yet undone, e.g. a drag cancelled with\n * Escape: the editor has already put them back, outside the history.\n */\n drop?: (group: string) => void\n /** A gesture ended (a drag, a resize): the next change starts a new undo step. */\n close?: () => void\n}\n\n/** A press on the editor that an extension may take over, e.g. a drawing tool. */\nexport interface FlowPress {\n /** Where it was pressed, in canvas coordinates. */\n point: Point\n /** The node under the pointer, if any. */\n node: FlowNode | null\n event: PointerEvent\n}\n\n/** Follows a press an extension took over, until the pointer is let go. */\nexport interface FlowPressHandler {\n move?: (point: Point, event: PointerEvent) => void\n end?: (point: Point, event: PointerEvent) => void\n /** Escape, a second finger, or the browser took the pointer. */\n cancel?: () => void\n}\n\n/**\n * A piece of the editor: node types, port types, connection rules, keys and\n * extra layers. The default node type comes as an extension too (see\n * `flowKit`), so a third-party extension stands on equal footing with it.\n */\nexport interface FlowExtension {\n name: string\n /** Higher runs first: its keys and rules are asked before others. Defaults to 100. */\n priority?: number\n nodeTypes?: NodeTypeSpec<any>[]\n /** Edge types, used by `edge.type`; `flowKit` brings `bezier`, `step` and `straight`. */\n edgeTypes?: EdgeTypeSpec<any>[]\n /**\n * The edge type of edges without a `type`, unless the editor's `edge-type`\n * prop says otherwise. The last extension that sets it wins.\n */\n edgeType?: string\n /** Looks and connection rules of port types; see the `portTypes` prop. */\n portTypes?: PortTypes\n /**\n * A connection rule, asked after the built-in ones. Return `false` to\n * refuse, or a sentence saying why. Called for every port while dragging.\n */\n canConnect?: (connection: FlowConnection, doc: FlowDocument) => boolean | string\n /** Keys, written as in `useHotkey` (e.g. `mod+g`, `shift+t`), while the canvas has focus. */\n keymap?: (context: FlowExtensionContext) => Record<string, FlowKeyHandler>\n /** Rewrites nodes and edges before they are pasted, e.g. to reset run state. */\n transformPaste?: (data: FlowDocument, context: FlowExtensionContext) => FlowDocument\n /**\n * Components drawn in canvas coordinates: `below` under the edges, `above`\n * over the nodes. They move and zoom with the canvas.\n */\n layers?: { below?: Component[]; above?: Component[] }\n /**\n * What `layers.above` shows, for `exportSVG` and `exportPNG`: SVG markup\n * in canvas coordinates, drawn over the nodes. `nodes` are the ones in the\n * picture; `draw.width` and `draw.height` are the picture's size.\n */\n drawLayer?: (context: FlowExtensionContext, draw: FlowDrawContext, nodes: FlowNode[]) => string\n /**\n * Components drawn over the editor in screen space, e.g. a panel or a\n * popup. They can call `useFlowEditor()`.\n */\n overlays?: Component[]\n /**\n * Items for the menu opened by a right click, a long press on the empty\n * canvas, or the context menu key. Extensions' items follow each other\n * in priority order; an empty list leaves them out.\n */\n contextMenu?: (context: FlowExtensionContext, target: FlowMenuTarget) => ContextMenuItem[]\n /** Buttons for the toolbar that floats above the selected nodes. */\n toolbarItems?: (context: FlowExtensionContext, nodes: FlowNode[]) => FlowToolbarItem[]\n /** Buttons for the toolbar that floats above the selected edges, when no node is selected. */\n edgeToolbarItems?: (context: FlowExtensionContext, edges: FlowEdge[]) => FlowToolbarItem[]\n /**\n * Asked first when the canvas or a node is pressed with the main button or\n * one finger, in priority order. Return handlers to take the press over;\n * the editor then doesn't select, drag or pan for it. Asked while\n * read-only too: check `context.readonly` before changing the document.\n */\n press?: (context: FlowExtensionContext, press: FlowPress) => FlowPressHandler | void\n /** Runs once the editor is mounted. Return a function to run when it unmounts. */\n setup?: (context: FlowExtensionContext) => void | (() => void)\n /**\n * Sees every change before it reaches the document, in priority order,\n * and may add steps to it. Undo and redo come through here too.\n */\n transaction?: (tr: FlowTransaction, context: FlowExtensionContext) => void\n /** Replaces the editor's undo history; the first extension that has one wins. */\n history?: (context: FlowExtensionContext) => FlowHistoryHandler\n}\n\n/** Declares an extension; only gives it a type. */\nexport function defineFlowExtension(extension: FlowExtension): FlowExtension {\n return extension\n}\n\n/** Everything the extensions contribute, gathered once per list. */\nexport interface ResolvedFlowExtensions {\n extensions: FlowExtension[]\n nodeTypes: Map<string, NodeTypeSpec>\n edgeTypes: Map<string, EdgeTypeSpec>\n edgeType: string | undefined\n portTypes: PortTypes\n rules: NonNullable<FlowExtension['canConnect']>[]\n keymaps: NonNullable<FlowExtension['keymap']>[]\n pasteTransforms: NonNullable<FlowExtension['transformPaste']>[]\n below: Component[]\n above: Component[]\n overlays: Component[]\n menus: NonNullable<FlowExtension['contextMenu']>[]\n toolbars: NonNullable<FlowExtension['toolbarItems']>[]\n edgeToolbars: NonNullable<FlowExtension['edgeToolbarItems']>[]\n drawLayers: NonNullable<FlowExtension['drawLayer']>[]\n setups: NonNullable<FlowExtension['setup']>[]\n transactions: NonNullable<FlowExtension['transaction']>[]\n history: FlowExtension['history']\n presses: NonNullable<FlowExtension['press']>[]\n}\n\ntype ExtensionList = readonly (FlowExtension | readonly FlowExtension[])[]\n\nfunction flatten(list: ExtensionList): FlowExtension[] {\n const out: FlowExtension[] = []\n for (const item of list) {\n if (Array.isArray(item)) out.push(...flatten(item))\n else out.push(item as FlowExtension)\n }\n return out\n}\n\n/** Sorts the extensions by priority and collects what they add. */\nexport function resolveFlowExtensions(list: ExtensionList): ResolvedFlowExtensions {\n const extensions = flatten(list)\n .map((extension, index) => ({ extension, index }))\n // oxlint-disable-next-line unicorn/no-array-sort -- sorts a fresh array\n .sort(\n (a, b) => (b.extension.priority ?? 100) - (a.extension.priority ?? 100) || a.index - b.index,\n )\n .map((entry) => entry.extension)\n\n const names = new Set<string>()\n const nodeTypes = new Map<string, NodeTypeSpec>()\n const edgeTypes = new Map<string, EdgeTypeSpec>()\n const portTypes: PortTypes = {}\n for (const extension of extensions) {\n if (names.has(extension.name))\n throw new Error(`[@dou-ui/flow] the extension \"${extension.name}\" is added twice`)\n names.add(extension.name)\n for (const spec of extension.nodeTypes ?? []) {\n if (nodeTypes.has(spec.type))\n throw new Error(\n `[@dou-ui/flow] node type \"${spec.type}\" from \"${extension.name}\" is already defined`,\n )\n nodeTypes.set(spec.type, spec)\n }\n for (const spec of extension.edgeTypes ?? []) {\n if (edgeTypes.has(spec.type))\n throw new Error(\n `[@dou-ui/flow] edge type \"${spec.type}\" from \"${extension.name}\" is already defined`,\n )\n edgeTypes.set(spec.type, spec)\n }\n for (const [name, spec] of Object.entries(extension.portTypes ?? {})) {\n if (name in portTypes)\n throw new Error(\n `[@dou-ui/flow] port type \"${name}\" from \"${extension.name}\" is already defined`,\n )\n portTypes[name] = spec\n }\n }\n\n const pick = <K extends keyof FlowExtension>(key: K) =>\n extensions.flatMap((e) => (e[key] ? [e[key]] : [])) as NonNullable<FlowExtension[K]>[]\n\n return {\n extensions,\n nodeTypes,\n edgeTypes,\n edgeType: extensions.reduce<string | undefined>((type, e) => e.edgeType ?? type, undefined),\n portTypes,\n rules: pick('canConnect'),\n keymaps: pick('keymap'),\n pasteTransforms: pick('transformPaste'),\n below: extensions.flatMap((e) => e.layers?.below ?? []),\n above: extensions.flatMap((e) => e.layers?.above ?? []),\n overlays: extensions.flatMap((e) => e.overlays ?? []),\n menus: pick('contextMenu'),\n presses: pick('press'),\n toolbars: pick('toolbarItems'),\n edgeToolbars: pick('edgeToolbarItems'),\n drawLayers: pick('drawLayer'),\n setups: pick('setup'),\n transactions: pick('transaction'),\n history: extensions.find((e) => e.history)?.history,\n }\n}\n"],"mappings":";;AA8HA,SAAgB,oBAAoB,WAAyC;CAC3E,OAAO;AACT;AA2BA,SAAS,QAAQ,MAAsC;CACrD,MAAM,MAAuB,CAAC;CAC9B,KAAK,MAAM,QAAQ,MACjB,IAAI,MAAM,QAAQ,IAAI,GAAG,IAAI,KAAK,GAAG,QAAQ,IAAI,CAAC;MAC7C,I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