payload-richtext-tiptap 0.0.120 → 0.0.121
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/src/fields/TiptapEditor/extensions/ImageUpload/view/ImageUpload.js +1 -1
- package/dist/src/fields/TiptapEditor/extensions/ImageUpload/view/ImageUpload.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/extension-kit.js +1 -1
- package/dist/src/fields/TiptapEditor/extensions/extension-kit.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ export const ImageUploadBuilder = (openAssetHQHandler)=>{
|
|
|
10
10
|
if (asset && !done) {
|
|
11
11
|
if (asset.type === "IMAGE") {
|
|
12
12
|
let title = asset.title;
|
|
13
|
-
if (i18next.language !== "en") {
|
|
13
|
+
if (i18next.language !== "en" && !!asset.title_locale[i18next.language.toUpperCase()]) {
|
|
14
14
|
title = asset.title_locale[i18next.language.toUpperCase()];
|
|
15
15
|
}
|
|
16
16
|
editor.chain().focus().setImageBlock({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../src/fields/TiptapEditor/extensions/ImageUpload/view/ImageUpload.tsx"],"sourcesContent":["import { Editor, NodeViewWrapper } from \"@tiptap/react\";\nimport i18next from \"i18next\";\nimport { ImagePlus } from \"lucide-react\";\nimport { useCallback, useState } from \"react\";\nimport {\n AssetReturnType,\n AssetType,\n openAssetHQType,\n} from \"src/fields/TiptapEditor/types.js\";\nexport const ImageUploadBuilder = (openAssetHQHandler: openAssetHQType) => {\n const ImageUpload = ({\n getPos,\n editor,\n node,\n }: {\n getPos: () => number;\n editor: Editor;\n node: { attrs: { type?: AssetType } };\n }) => {\n const [done, setDone] = useState(false);\n const onUpload = useCallback(\n (asset: AssetReturnType) => {\n if (asset && !done) {\n if (asset.type === \"IMAGE\") {\n let title = asset.title;\n if (i18next.language !== \"en\") {\n title = asset.title_locale[i18next.language.toUpperCase()];\n }\n editor\n .chain()\n .focus()\n .setImageBlock({\n src: asset?.optimizedImageUrl || asset.fullUrl,\n assetId: asset.id,\n caption: title,\n })\n .deleteRange({ from: getPos(), to: getPos() })\n .focus()\n .run();\n setDone(true);\n } else {\n console.log(\"calling editor setVideoBlock.\", {\n src: asset.videoUrl,\n poster: asset.fullUrl,\n assetId: asset.id,\n playlistUrl: asset.playlistUrl,\n });\n editor\n .chain()\n .focus()\n .setVideoBlock({\n src: asset.videoUrl,\n poster: asset.fullUrl,\n assetId: asset.id,\n playlistUrl: asset.playlistUrl,\n })\n .deleteRange({ from: getPos(), to: getPos() })\n .focus()\n .run();\n setDone(true);\n }\n } else {\n console.info(\n \"ImageUpload onUpload called but this is a finished component.\"\n );\n }\n },\n [getPos, editor]\n );\n\n return (\n <NodeViewWrapper>\n <div className=\"p-0 m-0\" data-drag-handle>\n <a\n href=\"#\"\n className=\"text-black text-sm font-medium uppercase hover:cursor-pointer p-2.5 bg-white rounded-[7px] transition ease-in-out delay-150 hover:scale-110 hover:bg-amber-600 shadow justify-between items-center flex flex-row\"\n onClick={(e) => {\n e.preventDefault();\n openAssetHQHandler(onUpload, null, node?.attrs?.type ?? \"image\");\n }}\n >\n <ImagePlus className=\"mr-2\" />\n Select an asset\n </a>\n </div>\n </NodeViewWrapper>\n );\n };\n\n return ImageUpload;\n};\n"],"names":["NodeViewWrapper","i18next","ImagePlus","useCallback","useState","ImageUploadBuilder","openAssetHQHandler","ImageUpload","getPos","editor","node","done","setDone","onUpload","asset","type","title","language","title_locale","toUpperCase","chain","focus","setImageBlock","src","optimizedImageUrl","fullUrl","assetId","id","caption","deleteRange","from","to","run","console","log","videoUrl","poster","playlistUrl","setVideoBlock","info","div","className","data-drag-handle","a","href","onClick","e","preventDefault","attrs"],"mappings":";AAAA,SAAiBA,eAAe,QAAQ,gBAAgB;AACxD,OAAOC,aAAa,UAAU;AAC9B,SAASC,SAAS,QAAQ,eAAe;AACzC,SAASC,WAAW,EAAEC,QAAQ,QAAQ,QAAQ;AAM9C,OAAO,MAAMC,qBAAqB,CAACC;IACjC,MAAMC,cAAc,CAAC,EACnBC,MAAM,EACNC,MAAM,EACNC,IAAI,EAKL;QACC,MAAM,CAACC,MAAMC,QAAQ,GAAGR,SAAS;QACjC,MAAMS,WAAWV,YACf,CAACW;YACC,IAAIA,SAAS,CAACH,MAAM;gBAClB,IAAIG,MAAMC,IAAI,KAAK,SAAS;oBAC1B,IAAIC,QAAQF,MAAME,KAAK;oBACvB,IAAIf,QAAQgB,QAAQ,KAAK,
|
|
1
|
+
{"version":3,"sources":["../../../../../../../src/fields/TiptapEditor/extensions/ImageUpload/view/ImageUpload.tsx"],"sourcesContent":["import { Editor, NodeViewWrapper } from \"@tiptap/react\";\nimport i18next from \"i18next\";\nimport { ImagePlus } from \"lucide-react\";\nimport { useCallback, useState } from \"react\";\nimport {\n AssetReturnType,\n AssetType,\n openAssetHQType,\n} from \"src/fields/TiptapEditor/types.js\";\nexport const ImageUploadBuilder = (openAssetHQHandler: openAssetHQType) => {\n const ImageUpload = ({\n getPos,\n editor,\n node,\n }: {\n getPos: () => number;\n editor: Editor;\n node: { attrs: { type?: AssetType } };\n }) => {\n const [done, setDone] = useState(false);\n const onUpload = useCallback(\n (asset: AssetReturnType) => {\n if (asset && !done) {\n if (asset.type === \"IMAGE\") {\n let title = asset.title;\n if (i18next.language !== \"en\" && !!asset.title_locale[i18next.language.toUpperCase()]) {\n title = asset.title_locale[i18next.language.toUpperCase()];\n }\n editor\n .chain()\n .focus()\n .setImageBlock({\n src: asset?.optimizedImageUrl || asset.fullUrl,\n assetId: asset.id,\n caption: title,\n })\n .deleteRange({ from: getPos(), to: getPos() })\n .focus()\n .run();\n setDone(true);\n } else {\n console.log(\"calling editor setVideoBlock.\", {\n src: asset.videoUrl,\n poster: asset.fullUrl,\n assetId: asset.id,\n playlistUrl: asset.playlistUrl,\n });\n editor\n .chain()\n .focus()\n .setVideoBlock({\n src: asset.videoUrl,\n poster: asset.fullUrl,\n assetId: asset.id,\n playlistUrl: asset.playlistUrl,\n })\n .deleteRange({ from: getPos(), to: getPos() })\n .focus()\n .run();\n setDone(true);\n }\n } else {\n console.info(\n \"ImageUpload onUpload called but this is a finished component.\"\n );\n }\n },\n [getPos, editor]\n );\n\n return (\n <NodeViewWrapper>\n <div className=\"p-0 m-0\" data-drag-handle>\n <a\n href=\"#\"\n className=\"text-black text-sm font-medium uppercase hover:cursor-pointer p-2.5 bg-white rounded-[7px] transition ease-in-out delay-150 hover:scale-110 hover:bg-amber-600 shadow justify-between items-center flex flex-row\"\n onClick={(e) => {\n e.preventDefault();\n openAssetHQHandler(onUpload, null, node?.attrs?.type ?? \"image\");\n }}\n >\n <ImagePlus className=\"mr-2\" />\n Select an asset\n </a>\n </div>\n </NodeViewWrapper>\n );\n };\n\n return ImageUpload;\n};\n"],"names":["NodeViewWrapper","i18next","ImagePlus","useCallback","useState","ImageUploadBuilder","openAssetHQHandler","ImageUpload","getPos","editor","node","done","setDone","onUpload","asset","type","title","language","title_locale","toUpperCase","chain","focus","setImageBlock","src","optimizedImageUrl","fullUrl","assetId","id","caption","deleteRange","from","to","run","console","log","videoUrl","poster","playlistUrl","setVideoBlock","info","div","className","data-drag-handle","a","href","onClick","e","preventDefault","attrs"],"mappings":";AAAA,SAAiBA,eAAe,QAAQ,gBAAgB;AACxD,OAAOC,aAAa,UAAU;AAC9B,SAASC,SAAS,QAAQ,eAAe;AACzC,SAASC,WAAW,EAAEC,QAAQ,QAAQ,QAAQ;AAM9C,OAAO,MAAMC,qBAAqB,CAACC;IACjC,MAAMC,cAAc,CAAC,EACnBC,MAAM,EACNC,MAAM,EACNC,IAAI,EAKL;QACC,MAAM,CAACC,MAAMC,QAAQ,GAAGR,SAAS;QACjC,MAAMS,WAAWV,YACf,CAACW;YACC,IAAIA,SAAS,CAACH,MAAM;gBAClB,IAAIG,MAAMC,IAAI,KAAK,SAAS;oBAC1B,IAAIC,QAAQF,MAAME,KAAK;oBACvB,I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;;;;;IAMxC;IAEA,OAAOlC;AACT,EAAE"}
|
|
@@ -63,7 +63,7 @@ export const ExtensionKit = ({ dir = "ltr", openAssetHQHandler })=>[
|
|
|
63
63
|
(async ()=>{
|
|
64
64
|
openAssetHQHandler((asset)=>{
|
|
65
65
|
let title = asset.title;
|
|
66
|
-
if (i18next.language !== "en") {
|
|
66
|
+
if (i18next.language !== "en" && !!asset.title_locale[i18next.language.toUpperCase()]) {
|
|
67
67
|
title = asset.title_locale[i18next.language.toUpperCase()];
|
|
68
68
|
}
|
|
69
69
|
currentEditor.chain().setImageBlockAt({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/fields/TiptapEditor/extensions/extension-kit.ts"],"sourcesContent":["import {\n AICommand,\n AudioBlock,\n BlockquoteFigure,\n CharacterCount,\n Color,\n Document,\n Dropcursor,\n Facebook,\n Figcaption,\n FileHandler,\n Focus,\n FontFamily,\n FontSize,\n Heading,\n Highlight,\n HorizontalRule,\n LinkPreview,\n ImageBlock,\n InsideLinks,\n Instagram,\n Link,\n Linkedin,\n Placeholder,\n Selection,\n SlashCommand,\n StarterKit,\n Subscript,\n Superscript,\n TaskItem,\n TaskList,\n TextAlign,\n TextStyle,\n Tiktok,\n TrailingNode,\n Twitter,\n Typography,\n Underline,\n VideoBlock,\n Youtube,\n Iframe,\n} from \"./index.js\";\n\nimport { ImageUpload } from \"./ImageUpload/ImageUpload.js\";\n\nimport History from \"@tiptap/extension-history\";\nimport { Markdown } from \"tiptap-markdown\";\nimport API from \"../lib/api.js\";\nimport { openAssetHQType } from \"../types.js\";\nimport i18next from \"i18next\";\n\ninterface ExtensionKitProps {\n openAssetHQHandler: openAssetHQType;\n dir?: \"ltr\" | \"rtl\";\n}\n\nexport const ExtensionKit = ({\n dir = \"ltr\",\n openAssetHQHandler,\n}: ExtensionKitProps) => [\n Markdown,\n Document,\n TaskList,\n TaskItem.configure({\n nested: true,\n }),\n Selection,\n Heading.configure({\n levels: [1, 2, 3, 4, 5, 6],\n }),\n HorizontalRule,\n StarterKit.configure({\n document: false,\n dropcursor: false,\n heading: false,\n horizontalRule: false,\n blockquote: false,\n history: false,\n codeBlock: false,\n }),\n TextStyle,\n // FontSize,\n // FontFamily,\n // Color,\n TrailingNode,\n Link.configure({\n openOnClick: false,\n }),\n // Highlight.configure({ multicolor: true }),\n Underline,\n CharacterCount.configure({ limit: 50000 }),\n ImageUpload.configure({\n openAssetHQHandler,\n }),\n ImageBlock,\n VideoBlock,\n AudioBlock,\n FileHandler.configure({\n allowedMimeTypes: [\"image/png\", \"image/jpeg\", \"image/gif\", \"image/webp\"],\n onDrop: (currentEditor, files, pos) => {\n const file = files[0];\n (async () => {\n openAssetHQHandler(\n (asset) => {\n let title = asset.title;\n if (i18next.language !== \"en\") {\n title = asset.title_locale[i18next.language.toUpperCase()];\n }\n currentEditor\n .chain()\n .setImageBlockAt({\n pos,\n src: asset?.optimizedImageUrl || asset.fullUrl,\n caption: title,\n })\n .focus()\n .run();\n },\n file,\n \"image\"\n );\n })();\n },\n onPaste: (currentEditor, files) => {\n files.forEach(async () => {\n const url = await API.uploadImage();\n\n return currentEditor\n .chain()\n .setImageBlockAt({\n pos: currentEditor.state.selection.anchor,\n src: url,\n })\n .focus()\n .run();\n });\n },\n }),\n // Emoji.configure({\n // enableEmoticons: true,\n // suggestion: emojiSuggestion,\n // }),\n TextAlign.extend({\n addKeyboardShortcuts() {\n return {};\n },\n }).configure({\n defaultAlignment: dir === \"rtl\" ? \"right\" : \"left\",\n types: [\"heading\", \"paragraph\"],\n }),\n Subscript,\n Superscript,\n Typography,\n Placeholder.configure({\n includeChildren: true,\n showOnlyCurrent: false,\n placeholder: () => \"\",\n }),\n SlashCommand,\n Focus,\n Figcaption,\n BlockquoteFigure,\n Dropcursor.configure({\n width: 2,\n class: \"ProseMirror-dropcursor border-black\",\n }),\n History,\n Twitter,\n Tiktok,\n Instagram,\n Facebook,\n Linkedin,\n Youtube,\n InsideLinks,\n Iframe,\n AICommand,\n LinkPreview,\n];\n\nexport default ExtensionKit;\n"],"names":["AICommand","AudioBlock","BlockquoteFigure","CharacterCount","Document","Dropcursor","Facebook","Figcaption","FileHandler","Focus","Heading","HorizontalRule","LinkPreview","ImageBlock","InsideLinks","Instagram","Link","Linkedin","Placeholder","Selection","SlashCommand","StarterKit","Subscript","Superscript","TaskItem","TaskList","TextAlign","TextStyle","Tiktok","TrailingNode","Twitter","Typography","Underline","VideoBlock","Youtube","Iframe","ImageUpload","History","Markdown","API","i18next","ExtensionKit","dir","openAssetHQHandler","configure","nested","levels","document","dropcursor","heading","horizontalRule","blockquote","history","codeBlock","openOnClick","limit","allowedMimeTypes","onDrop","currentEditor","files","pos","file","asset","title","language","title_locale","toUpperCase","chain","setImageBlockAt","src","optimizedImageUrl","fullUrl","caption","focus","run","onPaste","forEach","url","uploadImage","state","selection","anchor","extend","addKeyboardShortcuts","defaultAlignment","types","includeChildren","showOnlyCurrent","placeholder","width","class"],"mappings":"AAAA,SACEA,SAAS,EACTC,UAAU,EACVC,gBAAgB,EAChBC,cAAc,EAEdC,QAAQ,EACRC,UAAU,EACVC,QAAQ,EACRC,UAAU,EACVC,WAAW,EACXC,KAAK,EAGLC,OAAO,EAEPC,cAAc,EACdC,WAAW,EACXC,UAAU,EACVC,WAAW,EACXC,SAAS,EACTC,IAAI,EACJC,QAAQ,EACRC,WAAW,EACXC,SAAS,EACTC,YAAY,EACZC,UAAU,EACVC,SAAS,EACTC,WAAW,EACXC,QAAQ,EACRC,QAAQ,EACRC,SAAS,EACTC,SAAS,EACTC,MAAM,EACNC,YAAY,EACZC,OAAO,EACPC,UAAU,EACVC,SAAS,EACTC,UAAU,EACVC,OAAO,EACPC,MAAM,QACD,aAAa;AAEpB,SAASC,WAAW,QAAQ,+BAA+B;AAE3D,OAAOC,aAAa,4BAA4B;AAChD,SAASC,QAAQ,QAAQ,kBAAkB;AAC3C,OAAOC,SAAS,gBAAgB;AAEhC,OAAOC,aAAa,UAAU;AAO9B,OAAO,MAAMC,eAAe,CAAC,EAC3BC,MAAM,KAAK,EACXC,kBAAkB,EACA,GAAK;QACvBL;QACAlC;QACAqB;QACAD,SAASoB,SAAS,CAAC;YACjBC,QAAQ;QACV;QACA1B;QACAT,QAAQkC,SAAS,CAAC;YAChBE,QAAQ;gBAAC;gBAAG;gBAAG;gBAAG;gBAAG;gBAAG;aAAE;QAC5B;QACAnC;QACAU,WAAWuB,SAAS,CAAC;YACnBG,UAAU;YACVC,YAAY;YACZC,SAAS;YACTC,gBAAgB;YAChBC,YAAY;YACZC,SAAS;YACTC,WAAW;QACb;QACA1B;QACA,YAAY;QACZ,cAAc;QACd,SAAS;QACTE;QACAb,KAAK4B,SAAS,CAAC;YACbU,aAAa;QACf;QACA,6CAA6C;QAC7CtB;QACA7B,eAAeyC,SAAS,CAAC;YAAEW,OAAO;QAAM;QACxCnB,YAAYQ,SAAS,CAAC;YACpBD;QACF;QACA9B;QACAoB;QACAhC;QACAO,YAAYoC,SAAS,CAAC;YACpBY,kBAAkB;gBAAC;gBAAa;gBAAc;gBAAa;aAAa;YACxEC,QAAQ,CAACC,eAAeC,OAAOC;gBAC7B,MAAMC,OAAOF,KAAK,CAAC,EAAE;gBACpB,CAAA;oBACChB,mBACE,CAACmB;wBACC,IAAIC,QAAQD,MAAMC,KAAK;wBACvB,IAAIvB,QAAQwB,QAAQ,KAAK,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/fields/TiptapEditor/extensions/extension-kit.ts"],"sourcesContent":["import {\n AICommand,\n AudioBlock,\n BlockquoteFigure,\n CharacterCount,\n Color,\n Document,\n Dropcursor,\n Facebook,\n Figcaption,\n FileHandler,\n Focus,\n FontFamily,\n FontSize,\n Heading,\n Highlight,\n HorizontalRule,\n LinkPreview,\n ImageBlock,\n InsideLinks,\n Instagram,\n Link,\n Linkedin,\n Placeholder,\n Selection,\n SlashCommand,\n StarterKit,\n Subscript,\n Superscript,\n TaskItem,\n TaskList,\n TextAlign,\n TextStyle,\n Tiktok,\n TrailingNode,\n Twitter,\n Typography,\n Underline,\n VideoBlock,\n Youtube,\n Iframe,\n} from \"./index.js\";\n\nimport { ImageUpload } from \"./ImageUpload/ImageUpload.js\";\n\nimport History from \"@tiptap/extension-history\";\nimport { Markdown } from \"tiptap-markdown\";\nimport API from \"../lib/api.js\";\nimport { openAssetHQType } from \"../types.js\";\nimport i18next from \"i18next\";\n\ninterface ExtensionKitProps {\n openAssetHQHandler: openAssetHQType;\n dir?: \"ltr\" | \"rtl\";\n}\n\nexport const ExtensionKit = ({\n dir = \"ltr\",\n openAssetHQHandler,\n}: ExtensionKitProps) => [\n Markdown,\n Document,\n TaskList,\n TaskItem.configure({\n nested: true,\n }),\n Selection,\n Heading.configure({\n levels: [1, 2, 3, 4, 5, 6],\n }),\n HorizontalRule,\n StarterKit.configure({\n document: false,\n dropcursor: false,\n heading: false,\n horizontalRule: false,\n blockquote: false,\n history: false,\n codeBlock: false,\n }),\n TextStyle,\n // FontSize,\n // FontFamily,\n // Color,\n TrailingNode,\n Link.configure({\n openOnClick: false,\n }),\n // Highlight.configure({ multicolor: true }),\n Underline,\n CharacterCount.configure({ limit: 50000 }),\n ImageUpload.configure({\n openAssetHQHandler,\n }),\n ImageBlock,\n VideoBlock,\n AudioBlock,\n FileHandler.configure({\n allowedMimeTypes: [\"image/png\", \"image/jpeg\", \"image/gif\", \"image/webp\"],\n onDrop: (currentEditor, files, pos) => {\n const file = files[0];\n (async () => {\n openAssetHQHandler(\n (asset) => {\n let title = asset.title;\n if (i18next.language !== \"en\" && !!asset.title_locale[i18next.language.toUpperCase()]) {\n title = asset.title_locale[i18next.language.toUpperCase()];\n }\n currentEditor\n .chain()\n .setImageBlockAt({\n pos,\n src: asset?.optimizedImageUrl || asset.fullUrl,\n caption: title,\n })\n .focus()\n .run();\n },\n file,\n \"image\"\n );\n })();\n },\n onPaste: (currentEditor, files) => {\n files.forEach(async () => {\n const url = await API.uploadImage();\n\n return currentEditor\n .chain()\n .setImageBlockAt({\n pos: currentEditor.state.selection.anchor,\n src: url,\n })\n .focus()\n .run();\n });\n },\n }),\n // Emoji.configure({\n // enableEmoticons: true,\n // suggestion: emojiSuggestion,\n // }),\n TextAlign.extend({\n addKeyboardShortcuts() {\n return {};\n },\n }).configure({\n defaultAlignment: dir === \"rtl\" ? \"right\" : \"left\",\n types: [\"heading\", \"paragraph\"],\n }),\n Subscript,\n Superscript,\n Typography,\n Placeholder.configure({\n includeChildren: true,\n showOnlyCurrent: false,\n placeholder: () => \"\",\n }),\n SlashCommand,\n Focus,\n Figcaption,\n BlockquoteFigure,\n Dropcursor.configure({\n width: 2,\n class: \"ProseMirror-dropcursor border-black\",\n }),\n History,\n Twitter,\n Tiktok,\n Instagram,\n Facebook,\n Linkedin,\n Youtube,\n InsideLinks,\n Iframe,\n AICommand,\n LinkPreview,\n];\n\nexport default ExtensionKit;\n"],"names":["AICommand","AudioBlock","BlockquoteFigure","CharacterCount","Document","Dropcursor","Facebook","Figcaption","FileHandler","Focus","Heading","HorizontalRule","LinkPreview","ImageBlock","InsideLinks","Instagram","Link","Linkedin","Placeholder","Selection","SlashCommand","StarterKit","Subscript","Superscript","TaskItem","TaskList","TextAlign","TextStyle","Tiktok","TrailingNode","Twitter","Typography","Underline","VideoBlock","Youtube","Iframe","ImageUpload","History","Markdown","API","i18next","ExtensionKit","dir","openAssetHQHandler","configure","nested","levels","document","dropcursor","heading","horizontalRule","blockquote","history","codeBlock","openOnClick","limit","allowedMimeTypes","onDrop","currentEditor","files","pos","file","asset","title","language","title_locale","toUpperCase","chain","setImageBlockAt","src","optimizedImageUrl","fullUrl","caption","focus","run","onPaste","forEach","url","uploadImage","state","selection","anchor","extend","addKeyboardShortcuts","defaultAlignment","types","includeChildren","showOnlyCurrent","placeholder","width","class"],"mappings":"AAAA,SACEA,SAAS,EACTC,UAAU,EACVC,gBAAgB,EAChBC,cAAc,EAEdC,QAAQ,EACRC,UAAU,EACVC,QAAQ,EACRC,UAAU,EACVC,WAAW,EACXC,KAAK,EAGL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