@burdenoff/microfe-support 2026.819.2 → 2026.819.4

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 (105) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +7 -0
  2. package/dist/generated/global-types.d.ts +217 -1
  3. package/dist/generated/global-types.js +16 -14
  4. package/dist/generated/global-types.js.map +1 -1
  5. package/dist/microfe-support.css +1 -1
  6. package/dist/node_modules/@tiptap/core/dist/index.js +3453 -0
  7. package/dist/node_modules/@tiptap/core/dist/index.js.map +1 -0
  8. package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +21 -0
  9. package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js.map +1 -0
  10. package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js +76 -0
  11. package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js.map +1 -0
  12. package/dist/node_modules/@tiptap/extension-bold/dist/index.js +74 -0
  13. package/dist/node_modules/@tiptap/extension-bold/dist/index.js.map +1 -0
  14. package/dist/node_modules/@tiptap/extension-code/dist/index.js +68 -0
  15. package/dist/node_modules/@tiptap/extension-code/dist/index.js.map +1 -0
  16. package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +160 -0
  17. package/dist/node_modules/@tiptap/extension-code-block/dist/index.js.map +1 -0
  18. package/dist/node_modules/@tiptap/extension-document/dist/index.js +12 -0
  19. package/dist/node_modules/@tiptap/extension-document/dist/index.js.map +1 -0
  20. package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js +51 -0
  21. package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js.map +1 -0
  22. package/dist/node_modules/@tiptap/extension-heading/dist/index.js +68 -0
  23. package/dist/node_modules/@tiptap/extension-heading/dist/index.js.map +1 -0
  24. package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +50 -0
  25. package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js.map +1 -0
  26. package/dist/node_modules/@tiptap/extension-italic/dist/index.js +71 -0
  27. package/dist/node_modules/@tiptap/extension-italic/dist/index.js.map +1 -0
  28. package/dist/node_modules/@tiptap/extension-link/dist/index.js +373 -0
  29. package/dist/node_modules/@tiptap/extension-link/dist/index.js.map +1 -0
  30. package/dist/node_modules/@tiptap/extension-list/dist/index.js +964 -0
  31. package/dist/node_modules/@tiptap/extension-list/dist/index.js.map +1 -0
  32. package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +46 -0
  33. package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js.map +1 -0
  34. package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js +7 -0
  35. package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js.map +1 -0
  36. package/dist/node_modules/@tiptap/extension-strike/dist/index.js +56 -0
  37. package/dist/node_modules/@tiptap/extension-strike/dist/index.js.map +1 -0
  38. package/dist/node_modules/@tiptap/extension-text/dist/index.js +15 -0
  39. package/dist/node_modules/@tiptap/extension-text/dist/index.js.map +1 -0
  40. package/dist/node_modules/@tiptap/extension-underline/dist/index.js +63 -0
  41. package/dist/node_modules/@tiptap/extension-underline/dist/index.js.map +1 -0
  42. package/dist/node_modules/@tiptap/extensions/dist/index.js +459 -0
  43. package/dist/node_modules/@tiptap/extensions/dist/index.js.map +1 -0
  44. package/dist/node_modules/@tiptap/react/dist/index.js +316 -0
  45. package/dist/node_modules/@tiptap/react/dist/index.js.map +1 -0
  46. package/dist/node_modules/@tiptap/starter-kit/dist/index.js +29 -0
  47. package/dist/node_modules/@tiptap/starter-kit/dist/index.js.map +1 -0
  48. package/dist/node_modules/fast-equals/dist/es/index.js +267 -0
  49. package/dist/node_modules/fast-equals/dist/es/index.js.map +1 -0
  50. package/dist/node_modules/linkifyjs/dist/linkify.js +514 -0
  51. package/dist/node_modules/linkifyjs/dist/linkify.js.map +1 -0
  52. package/dist/node_modules/orderedmap/dist/index.js +69 -0
  53. package/dist/node_modules/orderedmap/dist/index.js.map +1 -0
  54. package/dist/node_modules/prosemirror-commands/dist/index.js +335 -0
  55. package/dist/node_modules/prosemirror-commands/dist/index.js.map +1 -0
  56. package/dist/node_modules/prosemirror-dropcursor/dist/index.js +113 -0
  57. package/dist/node_modules/prosemirror-dropcursor/dist/index.js.map +1 -0
  58. package/dist/node_modules/prosemirror-gapcursor/dist/index.js +173 -0
  59. package/dist/node_modules/prosemirror-gapcursor/dist/index.js.map +1 -0
  60. package/dist/node_modules/prosemirror-history/dist/index.js +214 -0
  61. package/dist/node_modules/prosemirror-history/dist/index.js.map +1 -0
  62. package/dist/node_modules/prosemirror-keymap/dist/index.js +52 -0
  63. package/dist/node_modules/prosemirror-keymap/dist/index.js.map +1 -0
  64. package/dist/node_modules/prosemirror-model/dist/index.js +1786 -0
  65. package/dist/node_modules/prosemirror-model/dist/index.js.map +1 -0
  66. package/dist/node_modules/prosemirror-schema-list/dist/index.js +75 -0
  67. package/dist/node_modules/prosemirror-schema-list/dist/index.js.map +1 -0
  68. package/dist/node_modules/prosemirror-state/dist/index.js +527 -0
  69. package/dist/node_modules/prosemirror-state/dist/index.js.map +1 -0
  70. package/dist/node_modules/prosemirror-transform/dist/index.js +1153 -0
  71. package/dist/node_modules/prosemirror-transform/dist/index.js.map +1 -0
  72. package/dist/node_modules/prosemirror-view/dist/index.js +3296 -0
  73. package/dist/node_modules/prosemirror-view/dist/index.js.map +1 -0
  74. package/dist/node_modules/rope-sequence/dist/index.js +85 -0
  75. package/dist/node_modules/rope-sequence/dist/index.js.map +1 -0
  76. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +56 -0
  77. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js.map +1 -0
  78. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +54 -0
  79. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js.map +1 -0
  80. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +54 -0
  81. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +1 -0
  82. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +46 -0
  83. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +1 -0
  84. package/dist/node_modules/use-sync-external-store/shim/index.js +12 -0
  85. package/dist/node_modules/use-sync-external-store/shim/index.js.map +1 -0
  86. package/dist/node_modules/use-sync-external-store/shim/with-selector.js +12 -0
  87. package/dist/node_modules/use-sync-external-store/shim/with-selector.js.map +1 -0
  88. package/dist/node_modules/w3c-keyname/index.js +90 -0
  89. package/dist/node_modules/w3c-keyname/index.js.map +1 -0
  90. package/dist/support/components/careers/BulkCandidateDialogs.d.ts +2 -3
  91. package/dist/support/components/careers/BulkCandidateDialogs.js +178 -188
  92. package/dist/support/components/careers/BulkCandidateDialogs.js.map +1 -1
  93. package/dist/support/components/careers/RichTextEditor.d.ts +16 -0
  94. package/dist/support/components/careers/RichTextEditor.js +87 -0
  95. package/dist/support/components/careers/RichTextEditor.js.map +1 -0
  96. package/dist/support/pages/JobApplicationDetailPage.d.ts +1 -0
  97. package/dist/support/pages/JobApplicationDetailPage.js +338 -336
  98. package/dist/support/pages/JobApplicationDetailPage.js.map +1 -1
  99. package/dist/support/pages/JobApplicationsPage.js +383 -339
  100. package/dist/support/pages/JobApplicationsPage.js.map +1 -1
  101. package/dist/support/pages/JobPostingDetailPage.js +310 -303
  102. package/dist/support/pages/JobPostingDetailPage.js.map +1 -1
  103. package/dist/support/utils/bulkCandidateOperations.js +31 -65
  104. package/dist/support/utils/bulkCandidateOperations.js.map +1 -1
  105. package/package.json +4 -1
@@ -0,0 +1,21 @@
1
+ //#region node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js
2
+ function e(e, t, n) {
3
+ if (e === "slot") return 0;
4
+ if (e instanceof Function) return e(t);
5
+ let { children: r, ...i } = t ?? {};
6
+ if (e === "svg") throw Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");
7
+ return n && Array.isArray(r) ? [
8
+ e,
9
+ i,
10
+ ...r
11
+ ] : [
12
+ e,
13
+ i,
14
+ r
15
+ ];
16
+ }
17
+ var t = (t, n) => e(t, n, !1);
18
+ //#endregion
19
+ export { t as createElement, t as h, t as jsx };
20
+
21
+ //# sourceMappingURL=jsx-runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsx-runtime.js","names":[],"sources":["../../../../../../node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js"],"sourcesContent":["// src/jsx-runtime.ts\nfunction Fragment(props) {\n return props.children;\n}\nfunction render(tag, attributes, hasMultipleChildren) {\n if (tag === \"slot\") {\n return 0;\n }\n if (tag instanceof Function) {\n return tag(attributes);\n }\n const { children, ...rest } = attributes != null ? attributes : {};\n if (tag === \"svg\") {\n throw new Error(\n \"SVG elements are not supported in the JSX syntax, use the array syntax instead\"\n );\n }\n if (hasMultipleChildren && Array.isArray(children)) {\n return [tag, rest, ...children];\n }\n return [tag, rest, children];\n}\nvar h = (tag, attributes) => render(tag, attributes, false);\nvar jsxs = (tag, attributes) => render(tag, attributes, true);\nvar jsxDEV = (tag, attributes, _key, isStaticChildren) => {\n return render(tag, attributes, Boolean(isStaticChildren));\n};\nexport {\n Fragment,\n h as createElement,\n h,\n h as jsx,\n jsxDEV,\n jsxs\n};\n//# sourceMappingURL=jsx-runtime.js.map"],"x_google_ignoreList":[0],"mappings":";AAIA,SAAS,EAAO,GAAK,GAAY,GAAqB;CACpD,IAAI,MAAQ,QACV,OAAO;CAET,IAAI,aAAe,UACjB,OAAO,EAAI,CAAU;CAEvB,IAAM,EAAE,aAAU,GAAG,MAAS,KAAkC,CAAC;CACjE,IAAI,MAAQ,OACV,MAAU,MACR,gFACF;CAKF,OAHI,KAAuB,MAAM,QAAQ,CAAQ,IACxC;EAAC;EAAK;EAAM,GAAG;CAAQ,IAEzB;EAAC;EAAK;EAAM;CAAQ;AAC7B;AACA,IAAI,KAAK,GAAK,MAAe,EAAO,GAAK,GAAY,EAAK"}
@@ -0,0 +1,76 @@
1
+ import { Slice as e } from "../../../prosemirror-model/dist/index.js";
2
+ import { TextSelection as t } from "../../../prosemirror-state/dist/index.js";
3
+ import { Node as n, mergeAttributes as r, wrappingInputRule as i } from "../../core/dist/index.js";
4
+ import { createElement as a } from "../../core/dist/jsx-runtime/jsx-runtime.js";
5
+ //#region node_modules/@tiptap/extension-blockquote/dist/index.js
6
+ var o = (n, r) => {
7
+ let { state: i } = n, { selection: a } = i;
8
+ if (!a.empty) return !1;
9
+ let { $from: o } = a;
10
+ if (o.parentOffset !== 0) return !1;
11
+ let s = o.depth - 1;
12
+ if (s < 0) return !1;
13
+ let c = o.node(s), l = o.index(s);
14
+ if (l === 0) return !1;
15
+ if (c.type === r) return n.commands.lift(r.name);
16
+ let u = c.child(l - 1);
17
+ if (u.type !== r || !u.lastChild?.isTextblock) return !1;
18
+ let d = o.before() - 1 - 1;
19
+ return n.commands.command(({ tr: n, dispatch: r }) => {
20
+ if (!r) return !0;
21
+ let i = o.parent.content, a = new e(i, 0, 0);
22
+ return n.replace(d, o.after(), a), n.setSelection(t.create(n.doc, d + i.size)), n.scrollIntoView(), r(n), !0;
23
+ });
24
+ }, s = /^\s*>\s$/, c = n.create({
25
+ name: "blockquote",
26
+ addOptions() {
27
+ return { HTMLAttributes: {} };
28
+ },
29
+ content: "block+",
30
+ group: "block",
31
+ defining: !0,
32
+ parseHTML() {
33
+ return [{ tag: "blockquote" }];
34
+ },
35
+ renderHTML({ HTMLAttributes: e }) {
36
+ return /* @__PURE__ */ a("blockquote", {
37
+ ...r(this.options.HTMLAttributes, e),
38
+ children: /* @__PURE__ */ a("slot", {})
39
+ });
40
+ },
41
+ parseMarkdown: (e, t) => {
42
+ let n = t.parseBlockChildren ?? t.parseChildren;
43
+ return t.createNode("blockquote", void 0, n(e.tokens || []));
44
+ },
45
+ renderMarkdown: (e, t) => {
46
+ if (!e.content) return "";
47
+ let n = [];
48
+ return e.content.forEach((e, r) => {
49
+ let i = (t.renderChild?.call(t, e, r) ?? t.renderChildren([e])).split("\n").map((e) => e.trim() === "" ? ">" : `> ${e}`);
50
+ n.push(i.join("\n"));
51
+ }), n.join("\n>\n");
52
+ },
53
+ addCommands() {
54
+ return {
55
+ setBlockquote: () => ({ commands: e }) => e.wrapIn(this.name),
56
+ toggleBlockquote: () => ({ commands: e }) => e.toggleWrap(this.name),
57
+ unsetBlockquote: () => ({ commands: e }) => e.lift(this.name)
58
+ };
59
+ },
60
+ addKeyboardShortcuts() {
61
+ return {
62
+ "Mod-Shift-b": () => this.editor.commands.toggleBlockquote(),
63
+ Backspace: () => o(this.editor, this.type)
64
+ };
65
+ },
66
+ addInputRules() {
67
+ return [i({
68
+ find: s,
69
+ type: this.type
70
+ })];
71
+ }
72
+ });
73
+ //#endregion
74
+ export { c as Blockquote, s as inputRegex };
75
+
76
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["Node"],"sources":["../../../../../node_modules/@tiptap/extension-blockquote/dist/index.js"],"sourcesContent":["// src/blockquote.tsx\nimport { mergeAttributes, Node, wrappingInputRule } from \"@tiptap/core\";\n\n// src/handleBackspace.ts\nimport { Slice } from \"@tiptap/pm/model\";\nimport { TextSelection } from \"@tiptap/pm/state\";\nvar handleBackspace = (editor, type) => {\n var _a;\n const { state } = editor;\n const { selection } = state;\n if (!selection.empty) return false;\n const { $from } = selection;\n if ($from.parentOffset !== 0) return false;\n const parentDepth = $from.depth - 1;\n if (parentDepth < 0) return false;\n const parent = $from.node(parentDepth);\n const index = $from.index(parentDepth);\n if (index === 0) return false;\n if (parent.type === type) {\n return editor.commands.lift(type.name);\n }\n const previous = parent.child(index - 1);\n if (previous.type !== type || !((_a = previous.lastChild) == null ? void 0 : _a.isTextblock)) {\n return false;\n }\n const blockStart = $from.before();\n const insideBlockquoteEnd = blockStart - 1;\n const targetPos = insideBlockquoteEnd - 1;\n return editor.commands.command(({ tr, dispatch }) => {\n if (!dispatch) {\n return true;\n }\n const content = $from.parent.content;\n const slice = new Slice(content, 0, 0);\n tr.replace(targetPos, $from.after(), slice);\n tr.setSelection(TextSelection.create(tr.doc, targetPos + content.size));\n tr.scrollIntoView();\n dispatch(tr);\n return true;\n });\n};\n\n// src/blockquote.tsx\nimport { jsx } from \"@tiptap/core/jsx-runtime\";\nvar inputRegex = /^\\s*>\\s$/;\nvar Blockquote = Node.create({\n name: \"blockquote\",\n addOptions() {\n return {\n HTMLAttributes: {}\n };\n },\n content: \"block+\",\n group: \"block\",\n defining: true,\n parseHTML() {\n return [{ tag: \"blockquote\" }];\n },\n renderHTML({ HTMLAttributes }) {\n return /* @__PURE__ */ jsx(\"blockquote\", { ...mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), children: /* @__PURE__ */ jsx(\"slot\", {}) });\n },\n parseMarkdown: (token, helpers) => {\n var _a;\n const parseBlockChildren = (_a = helpers.parseBlockChildren) != null ? _a : helpers.parseChildren;\n return helpers.createNode(\"blockquote\", void 0, parseBlockChildren(token.tokens || []));\n },\n renderMarkdown: (node, h) => {\n if (!node.content) {\n return \"\";\n }\n const prefix = \">\";\n const result = [];\n node.content.forEach((child, index) => {\n var _a, _b;\n const childContent = (_b = (_a = h.renderChild) == null ? void 0 : _a.call(h, child, index)) != null ? _b : h.renderChildren([child]);\n const lines = childContent.split(\"\\n\");\n const linesWithPrefix = lines.map((line) => {\n if (line.trim() === \"\") {\n return prefix;\n }\n return `${prefix} ${line}`;\n });\n result.push(linesWithPrefix.join(\"\\n\"));\n });\n return result.join(`\n${prefix}\n`);\n },\n addCommands() {\n return {\n setBlockquote: () => ({ commands }) => {\n return commands.wrapIn(this.name);\n },\n toggleBlockquote: () => ({ commands }) => {\n return commands.toggleWrap(this.name);\n },\n unsetBlockquote: () => ({ commands }) => {\n return commands.lift(this.name);\n }\n };\n },\n addKeyboardShortcuts() {\n return {\n \"Mod-Shift-b\": () => this.editor.commands.toggleBlockquote(),\n Backspace: () => handleBackspace(this.editor, this.type)\n };\n },\n addInputRules() {\n return [\n wrappingInputRule({\n find: inputRegex,\n type: this.type\n })\n ];\n }\n});\n\n// src/index.ts\nvar index_default = Blockquote;\nexport {\n Blockquote,\n index_default as default,\n inputRegex\n};\n//# sourceMappingURL=index.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;AAMA,IAAI,KAAmB,GAAQ,MAAS;CAEtC,IAAM,EAAE,aAAU,GACZ,EAAE,iBAAc;CACtB,IAAI,CAAC,EAAU,OAAO,OAAO;CAC7B,IAAM,EAAE,aAAU;CAClB,IAAI,EAAM,iBAAiB,GAAG,OAAO;CACrC,IAAM,IAAc,EAAM,QAAQ;CAClC,IAAI,IAAc,GAAG,OAAO;CAC5B,IAAM,IAAS,EAAM,KAAK,CAAW,GAC/B,IAAQ,EAAM,MAAM,CAAW;CACrC,IAAI,MAAU,GAAG,OAAO;CACxB,IAAI,EAAO,SAAS,GAClB,OAAO,EAAO,SAAS,KAAK,EAAK,IAAI;CAEvC,IAAM,IAAW,EAAO,MAAM,IAAQ,CAAC;CACvC,IAAI,EAAS,SAAS,KAAQ,CAAQ,EAAS,WAAiC,aAC9E,OAAO;CAIT,IAAM,IAFa,EAAM,OACY,IAAI,IACD;CACxC,OAAO,EAAO,SAAS,SAAS,EAAE,OAAI,kBAAe;EACnD,IAAI,CAAC,GACH,OAAO;EAET,IAAM,IAAU,EAAM,OAAO,SACvB,IAAQ,IAAI,EAAM,GAAS,GAAG,CAAC;EAKrC,OAJA,EAAG,QAAQ,GAAW,EAAM,MAAM,GAAG,CAAK,GAC1C,EAAG,aAAa,EAAc,OAAO,EAAG,KAAK,IAAY,EAAQ,IAAI,CAAC,GACtE,EAAG,eAAe,GAClB,EAAS,CAAE,GACJ;CACT,CAAC;AACH,GAII,IAAa,YACb,IAAaA,EAAK,OAAO;CAC3B,MAAM;CACN,aAAa;EACX,OAAO,EACL,gBAAgB,CAAC,EACnB;CACF;CACA,SAAS;CACT,OA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t, markPasteRule as n, mergeAttributes as r } from "../../core/dist/index.js";
2
+ import { createElement as i } from "../../core/dist/jsx-runtime/jsx-runtime.js";
3
+ //#region node_modules/@tiptap/extension-bold/dist/index.js
4
+ var a = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, o = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, s = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, c = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, l = e.create({
5
+ name: "bold",
6
+ addOptions() {
7
+ return { HTMLAttributes: {} };
8
+ },
9
+ parseHTML() {
10
+ return [
11
+ { tag: "strong" },
12
+ {
13
+ tag: "b",
14
+ getAttrs: (e) => e.style.fontWeight !== "normal" && null
15
+ },
16
+ {
17
+ style: "font-weight=400",
18
+ clearMark: (e) => e.type.name === this.name
19
+ },
20
+ {
21
+ style: "font-weight",
22
+ getAttrs: (e) => /^(bold(er)?|[5-9]\d{2,})$/.test(e) && null
23
+ }
24
+ ];
25
+ },
26
+ renderHTML({ HTMLAttributes: e }) {
27
+ return /* @__PURE__ */ i("strong", {
28
+ ...r(this.options.HTMLAttributes, e),
29
+ children: /* @__PURE__ */ i("slot", {})
30
+ });
31
+ },
32
+ markdownTokenName: "strong",
33
+ parseMarkdown: (e, t) => t.applyMark("bold", t.parseInline(e.tokens || [])),
34
+ markdownOptions: { htmlReopen: {
35
+ open: "<strong>",
36
+ close: "</strong>"
37
+ } },
38
+ renderMarkdown: (e, t) => `**${t.renderChildren(e)}**`,
39
+ addCommands() {
40
+ return {
41
+ setBold: () => ({ commands: e }) => e.setMark(this.name),
42
+ toggleBold: () => ({ commands: e }) => e.toggleMark(this.name),
43
+ unsetBold: () => ({ commands: e }) => e.unsetMark(this.name)
44
+ };
45
+ },
46
+ addKeyboardShortcuts() {
47
+ return {
48
+ "Mod-b": () => this.editor.commands.toggleBold(),
49
+ "Mod-B": () => this.editor.commands.toggleBold()
50
+ };
51
+ },
52
+ addInputRules() {
53
+ return [t({
54
+ find: a,
55
+ type: this.type
56
+ }), t({
57
+ find: s,
58
+ type: this.type
59
+ })];
60
+ },
61
+ addPasteRules() {
62
+ return [n({
63
+ find: o,
64
+ type: this.type
65
+ }), n({
66
+ find: c,
67
+ type: this.type
68
+ })];
69
+ }
70
+ });
71
+ //#endregion
72
+ export { l as Bold, a as starInputRegex, o as starPasteRegex, s as underscoreInputRegex, c as underscorePasteRegex };
73
+
74
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../node_modules/@tiptap/extension-bold/dist/index.js"],"sourcesContent":["// src/bold.tsx\nimport { Mark, markInputRule, markPasteRule, mergeAttributes } from \"@tiptap/core\";\nimport { jsx } from \"@tiptap/core/jsx-runtime\";\nvar starInputRegex = /(?:^|\\s)(\\*\\*(?!\\s+\\*\\*)((?:[^*]+))\\*\\*(?!\\s+\\*\\*))$/;\nvar starPasteRegex = /(?:^|\\s)(\\*\\*(?!\\s+\\*\\*)((?:[^*]+))\\*\\*(?!\\s+\\*\\*))/g;\nvar underscoreInputRegex = /(?:^|\\s)(__(?!\\s+__)((?:[^_]+))__(?!\\s+__))$/;\nvar underscorePasteRegex = /(?:^|\\s)(__(?!\\s+__)((?:[^_]+))__(?!\\s+__))/g;\nvar Bold = Mark.create({\n name: \"bold\",\n addOptions() {\n return {\n HTMLAttributes: {}\n };\n },\n parseHTML() {\n return [\n {\n tag: \"strong\"\n },\n {\n tag: \"b\",\n getAttrs: (node) => node.style.fontWeight !== \"normal\" && null\n },\n {\n style: \"font-weight=400\",\n clearMark: (mark) => mark.type.name === this.name\n },\n {\n style: \"font-weight\",\n getAttrs: (value) => /^(bold(er)?|[5-9]\\d{2,})$/.test(value) && null\n }\n ];\n },\n renderHTML({ HTMLAttributes }) {\n return /* @__PURE__ */ jsx(\"strong\", { ...mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), children: /* @__PURE__ */ jsx(\"slot\", {}) });\n },\n markdownTokenName: \"strong\",\n parseMarkdown: (token, helpers) => {\n return helpers.applyMark(\"bold\", helpers.parseInline(token.tokens || []));\n },\n markdownOptions: {\n htmlReopen: {\n open: \"<strong>\",\n close: \"</strong>\"\n }\n },\n renderMarkdown: (node, h) => {\n return `**${h.renderChildren(node)}**`;\n },\n addCommands() {\n return {\n setBold: () => ({ commands }) => {\n return commands.setMark(this.name);\n },\n toggleBold: () => ({ commands }) => {\n return commands.toggleMark(this.name);\n },\n unsetBold: () => ({ commands }) => {\n return commands.unsetMark(this.name);\n }\n };\n },\n addKeyboardShortcuts() {\n return {\n \"Mod-b\": () => this.editor.commands.toggleBold(),\n \"Mod-B\": () => this.editor.commands.toggleBold()\n };\n },\n addInputRules() {\n return [\n markInputRule({\n find: starInputRegex,\n type: this.type\n }),\n markInputRule({\n find: underscoreInputRegex,\n type: this.type\n })\n ];\n },\n addPasteRules() {\n return [\n markPasteRule({\n find: starPasteRegex,\n type: this.type\n }),\n markPasteRule({\n find: underscorePasteRegex,\n type: this.type\n })\n ];\n }\n});\n\n// src/index.ts\nvar index_default = Bold;\nexport {\n Bold,\n index_default as default,\n starInputRegex,\n starPasteRegex,\n underscoreInputRegex,\n underscorePasteRegex\n};\n//# sourceMappingURL=index.js.map"],"x_google_ignoreList":[0],"mappings":";;;AAGA,IAAI,IAAiB,wDACjB,IAAiB,wDACjB,IAAuB,gDACvB,IAAuB,gDACvB,IAAO,EAAK,OAAO;CACrB,MAAM;CACN,aAAa;EACX,OAAO,EACL,gBAAgB,CAAC,EACnB;CACF;CACA,YAAY;EACV,OAAO;GACL,EACE,KAAK,SACP;GACA;IACE,KAAK;IACL,WAAW,MAAS,EAAK,MAAM,eAAe,YAAY;GAC5D;GACA;IACE,OAAO;IACP,YAAY,MAAS,EAAK,KAAK,SAAS,KAAK;GAC/C;GACA;IACE,OAAO;IACP,WAAW,MAAU,4BAA4B,KAAK,CAAK,KAAK;GAClE;EACF;CACF;CACA,WAAW,EAAE,qBAAkB;EAC7B,OAAuB,kBAAI,UAAU;GAAE,GAAG,EAAgB,KAAK,QAAQ,gBAAgB,CAAc;GAAG,UAA0B,kBAAI,QAAQ,CAAC,CAAC;EAAE,CAAC;CACrJ;CACA,mBAAmB;CACnB,gBAAgB,GAAO,MACd,EAAQ,UAAU,QAAQ,EAAQ,YAAY,EAAM,UAAU,CAAC,CAAC,CAAC;CAE1E,iBAAiB,EACf,YAAY;EACV,MAAM;EACN,OAAO;CACT,EACF;CACA,iBAAiB,GAAM,MACd,KAAK,EAAE,eAAe,CAAI,EAAE;CAErC,cAAc;EACZ,OAAO;GACL,gBAAgB,EAAE,kBACT,EAAS,QAAQ,KAAK,IAAI;GAEnC,mBAAmB,EAAE,kBACZ,EAAS,WAAW,KAAK,IAAI;GAEtC,kBAAkB,EAAE,kBACX,EAAS,UAAU,KAAK,IAAI;EAEvC;CACF;CACA,uBAAuB;EACrB,OAAO;GACL,eAAe,KAAK,OAAO,SAAS,WAAW;GAC/C,eAAe,KAAK,OAAO,SAAS,WAAW;EACjD;CACF;CACA,gBAAgB;EACd,OAAO,CACL,EAAc;GACZ,MAAM;GACN,MAAM,KAAK;EACb,CAAC,GACD,EAAc;GACZ,MAAM;GACN,MAAM,KAAK;EACb,CAAC,CACH;CACF;CACA,gBAAgB;EACd,OAAO,CACL,EAAc;GACZ,MAAM;GACN,MAAM,KAAK;EACb,CAAC,GACD,EAAc;GACZ,MAAM;GACN,MAAM,KAAK;EACb,CAAC,CACH;CACF;AACF,CAAC"}
@@ -0,0 +1,68 @@
1
+ import { Mark as e, markInputRule as t, markPasteRule as n, mergeAttributes as r } from "../../core/dist/index.js";
2
+ //#region node_modules/@tiptap/extension-code/dist/index.js
3
+ var i = (e) => {
4
+ let t = /`([^`]+)`(?!`)$/.exec(e);
5
+ return !t || t.index > 0 && e[t.index - 1] === "`" ? null : {
6
+ index: t.index,
7
+ text: t[0],
8
+ replaceWith: t[1]
9
+ };
10
+ }, a = (e) => {
11
+ let t = /`([^`]+)`(?!`)/g, n = [], r;
12
+ for (; (r = t.exec(e)) !== null;) r.index > 0 && e[r.index - 1] === "`" || n.push({
13
+ index: r.index,
14
+ text: r[0],
15
+ replaceWith: r[1]
16
+ });
17
+ return n;
18
+ }, o = e.create({
19
+ name: "code",
20
+ addOptions() {
21
+ return { HTMLAttributes: {} };
22
+ },
23
+ excludes: "_",
24
+ code: !0,
25
+ exitable: !0,
26
+ parseHTML() {
27
+ return [{ tag: "code" }];
28
+ },
29
+ renderHTML({ HTMLAttributes: e }) {
30
+ return [
31
+ "code",
32
+ r(this.options.HTMLAttributes, e),
33
+ 0
34
+ ];
35
+ },
36
+ markdownTokenName: "codespan",
37
+ parseMarkdown: (e, t) => t.applyMark("code", [{
38
+ type: "text",
39
+ text: e.text || ""
40
+ }]),
41
+ renderMarkdown: (e, t) => e.content ? `\`${t.renderChildren(e.content)}\`` : "",
42
+ addCommands() {
43
+ return {
44
+ setCode: () => ({ commands: e }) => e.setMark(this.name),
45
+ toggleCode: () => ({ commands: e }) => e.toggleMark(this.name),
46
+ unsetCode: () => ({ commands: e }) => e.unsetMark(this.name)
47
+ };
48
+ },
49
+ addKeyboardShortcuts() {
50
+ return { "Mod-e": () => this.editor.commands.toggleCode() };
51
+ },
52
+ addInputRules() {
53
+ return [t({
54
+ find: i,
55
+ type: this.type
56
+ })];
57
+ },
58
+ addPasteRules() {
59
+ return [n({
60
+ find: a,
61
+ type: this.type
62
+ })];
63
+ }
64
+ });
65
+ //#endregion
66
+ export { o as Code, i as inputRegexMatch, a as pasteRegexMatch };
67
+
68
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../node_modules/@tiptap/extension-code/dist/index.js"],"sourcesContent":["// src/code.ts\nimport { Mark, markInputRule, markPasteRule, mergeAttributes } from \"@tiptap/core\";\nvar inputRegex = /(^|[^`])`([^`]+)`(?!`)$/;\nvar pasteRegex = /(^|[^`])`([^`]+)`(?!`)/g;\nvar inputRegexMatch = (text) => {\n const match = /`([^`]+)`(?!`)$/.exec(text);\n if (!match) {\n return null;\n }\n if (match.index > 0 && text[match.index - 1] === \"`\") {\n return null;\n }\n return {\n index: match.index,\n text: match[0],\n replaceWith: match[1]\n };\n};\nvar pasteRegexMatch = (text) => {\n const regex = /`([^`]+)`(?!`)/g;\n const matches = [];\n let match;\n while ((match = regex.exec(text)) !== null) {\n if (match.index > 0 && text[match.index - 1] === \"`\") {\n continue;\n }\n matches.push({\n index: match.index,\n text: match[0],\n replaceWith: match[1]\n });\n }\n return matches;\n};\nvar Code = Mark.create({\n name: \"code\",\n addOptions() {\n return {\n HTMLAttributes: {}\n };\n },\n excludes: \"_\",\n code: true,\n exitable: true,\n parseHTML() {\n return [{ tag: \"code\" }];\n },\n renderHTML({ HTMLAttributes }) {\n return [\"code\", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n },\n markdownTokenName: \"codespan\",\n parseMarkdown: (token, helpers) => {\n return helpers.applyMark(\"code\", [{ type: \"text\", text: token.text || \"\" }]);\n },\n renderMarkdown: (node, h) => {\n if (!node.content) {\n return \"\";\n }\n return `\\`${h.renderChildren(node.content)}\\``;\n },\n addCommands() {\n return {\n setCode: () => ({ commands }) => {\n return commands.setMark(this.name);\n },\n toggleCode: () => ({ commands }) => {\n return commands.toggleMark(this.name);\n },\n unsetCode: () => ({ commands }) => {\n return commands.unsetMark(this.name);\n }\n };\n },\n addKeyboardShortcuts() {\n return {\n \"Mod-e\": () => this.editor.commands.toggleCode()\n };\n },\n addInputRules() {\n return [\n markInputRule({\n find: inputRegexMatch,\n type: this.type\n })\n ];\n },\n addPasteRules() {\n return [\n markPasteRule({\n find: pasteRegexMatch,\n type: this.type\n })\n ];\n }\n});\n\n// src/index.ts\nvar index_default = Code;\nexport {\n Code,\n index_default as default,\n inputRegex,\n inputRegexMatch,\n pasteRegex,\n pasteRegexMatch\n};\n//#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AAO,SAAS,WAAW,EACjD;CACF;CACA,gBAAgB;EACd,OAAO,CACL,EAAc;GACZ,MAAM;GACN,MAAM,KAAK;EACb,CAAC,CACH;CACF;CACA,gBAAgB;EACd,OAAO,CACL,EAAc;GACZ,MAAM;GACN,MAAM,KAAK;EACb,CAAC,CACH;CACF;AACF,CAAC"}
@@ -0,0 +1,160 @@
1
+ import { Plugin as e, PluginKey as t, Selection as n, TextSelection as r } from "../../../prosemirror-state/dist/index.js";
2
+ import { Node as i, mergeAttributes as a, textblockTypeInputRule as o } from "../../core/dist/index.js";
3
+ //#region node_modules/@tiptap/extension-code-block/dist/index.js
4
+ var s = 4, c = /^```([a-z]+)?[\s\n]$/, l = /^~~~([a-z]+)?[\s\n]$/, u = i.create({
5
+ name: "codeBlock",
6
+ addOptions() {
7
+ return {
8
+ languageClassPrefix: "language-",
9
+ exitOnTripleEnter: !0,
10
+ exitOnArrowDown: !0,
11
+ exitOnArrowUp: !0,
12
+ defaultLanguage: null,
13
+ enableTabIndentation: !1,
14
+ tabSize: s,
15
+ HTMLAttributes: {}
16
+ };
17
+ },
18
+ content: "text*",
19
+ marks: "",
20
+ group: "block",
21
+ code: !0,
22
+ defining: !0,
23
+ addAttributes() {
24
+ return { language: {
25
+ default: this.options.defaultLanguage,
26
+ parseHTML: (e) => {
27
+ let { languageClassPrefix: t } = this.options;
28
+ return t && [...e.firstElementChild?.classList || []].filter((e) => e.startsWith(t)).map((e) => e.replace(t, ""))[0] || null;
29
+ },
30
+ rendered: !1
31
+ } };
32
+ },
33
+ parseHTML() {
34
+ return [{
35
+ tag: "pre",
36
+ preserveWhitespace: "full"
37
+ }];
38
+ },
39
+ renderHTML({ node: e, HTMLAttributes: t }) {
40
+ return [
41
+ "pre",
42
+ a(this.options.HTMLAttributes, t),
43
+ [
44
+ "code",
45
+ { class: e.attrs.language ? this.options.languageClassPrefix + e.attrs.language : null },
46
+ 0
47
+ ]
48
+ ];
49
+ },
50
+ markdownTokenName: "code",
51
+ parseMarkdown: (e, t) => e.raw?.startsWith("```") === !1 && e.raw?.startsWith("~~~") === !1 && e.codeBlockStyle !== "indented" ? [] : t.createNode("codeBlock", { language: e.lang || null }, e.text ? [t.createTextNode(e.text)] : []),
52
+ renderMarkdown: (e, t) => {
53
+ let n = "", r = e.attrs?.language || "";
54
+ return n = e.content ? [
55
+ `\`\`\`${r}`,
56
+ t.renderChildren(e.content),
57
+ "```"
58
+ ].join("\n") : `\`\`\`${r}
59
+
60
+ \`\`\``, n;
61
+ },
62
+ addCommands() {
63
+ return {
64
+ setCodeBlock: (e) => ({ commands: t }) => t.setNode(this.name, e),
65
+ toggleCodeBlock: (e) => ({ commands: t }) => t.toggleNode(this.name, "paragraph", e)
66
+ };
67
+ },
68
+ addKeyboardShortcuts() {
69
+ return {
70
+ "Mod-Alt-c": () => this.editor.commands.toggleCodeBlock(),
71
+ Backspace: () => {
72
+ let { empty: e, $anchor: t } = this.editor.state.selection, n = t.pos === 1;
73
+ return !e || t.parent.type.name !== this.name ? !1 : n || !t.parent.textContent.length ? this.editor.commands.clearNodes() : !1;
74
+ },
75
+ Tab: ({ editor: e }) => {
76
+ if (!this.options.enableTabIndentation) return !1;
77
+ let t = this.options.tabSize ?? s, { state: n } = e, { selection: r } = n, { $from: i, empty: a } = r;
78
+ if (i.parent.type !== this.type) return !1;
79
+ let o = " ".repeat(t);
80
+ return a ? e.commands.insertContent(o) : e.commands.command(({ tr: e }) => {
81
+ let { from: t, to: i } = r, a = n.doc.textBetween(t, i, "\n", "\n").split("\n").map((e) => o + e).join("\n");
82
+ return e.replaceWith(t, i, n.schema.text(a)), !0;
83
+ });
84
+ },
85
+ "Shift-Tab": ({ editor: e }) => {
86
+ if (!this.options.enableTabIndentation) return !1;
87
+ let t = this.options.tabSize ?? s, { state: n } = e, { selection: i } = n, { $from: a, empty: o } = i;
88
+ return a.parent.type === this.type ? o ? e.commands.command(({ tr: e }) => {
89
+ let { pos: i } = a, o = a.start(), s = a.end(), c = n.doc.textBetween(o, s, "\n", "\n").split("\n"), l = 0, u = 0, d = i - o;
90
+ for (let e = 0; e < c.length; e += 1) {
91
+ if (u + c[e].length >= d) {
92
+ l = e;
93
+ break;
94
+ }
95
+ u += c[e].length + 1;
96
+ }
97
+ let f = c[l].match(/^ */)?.[0] || "", p = Math.min(f.length, t);
98
+ if (p === 0) return !0;
99
+ let m = o;
100
+ for (let e = 0; e < l; e += 1) m += c[e].length + 1;
101
+ return e.delete(m, m + p), i - m <= p && e.setSelection(r.create(e.doc, m)), !0;
102
+ }) : e.commands.command(({ tr: e }) => {
103
+ let { from: r, to: a } = i, o = n.doc.textBetween(r, a, "\n", "\n").split("\n").map((e) => {
104
+ let n = e.match(/^ */)?.[0] || "", r = Math.min(n.length, t);
105
+ return e.slice(r);
106
+ }).join("\n");
107
+ return e.replaceWith(r, a, n.schema.text(o)), !0;
108
+ }) : !1;
109
+ },
110
+ Enter: ({ editor: e }) => {
111
+ if (!this.options.exitOnTripleEnter) return !1;
112
+ let { state: t } = e, { selection: n } = t, { $from: r, empty: i } = n;
113
+ if (!i || r.parent.type !== this.type) return !1;
114
+ let a = r.parentOffset === r.parent.nodeSize - 2, o = r.parent.textContent.endsWith("\n\n");
115
+ return !a || !o ? !1 : e.chain().command(({ tr: e }) => (e.delete(r.pos - 2, r.pos), !0)).exitCode().run();
116
+ },
117
+ ArrowUp: ({ editor: e }) => {
118
+ if (!this.options.exitOnArrowUp) return !1;
119
+ let { state: t } = e, { selection: n } = t, { $from: r, empty: i } = n;
120
+ if (!i || r.parent.type !== this.type || r.parentOffset !== 0) return !1;
121
+ let a = r.before();
122
+ return a > 0 ? !1 : e.commands.insertDefaultBlock({ pos: a });
123
+ },
124
+ ArrowDown: ({ editor: e }) => {
125
+ if (!this.options.exitOnArrowDown) return !1;
126
+ let { state: t } = e, { selection: r, doc: i } = t, { $from: a, empty: o } = r;
127
+ if (!o || a.parent.type !== this.type || a.parentOffset !== a.parent.nodeSize - 2) return !1;
128
+ let s = a.after();
129
+ return s === void 0 ? !1 : i.nodeAt(s) ? e.commands.command(({ tr: e }) => (e.setSelection(n.near(i.resolve(s))), !0)) : e.commands.exitCode();
130
+ }
131
+ };
132
+ },
133
+ addInputRules() {
134
+ return [o({
135
+ find: c,
136
+ type: this.type,
137
+ getAttributes: (e) => ({ language: e[1] })
138
+ }), o({
139
+ find: l,
140
+ type: this.type,
141
+ getAttributes: (e) => ({ language: e[1] })
142
+ })];
143
+ },
144
+ addProseMirrorPlugins() {
145
+ return [new e({
146
+ key: new t("codeBlockVSCodeHandler"),
147
+ props: { handlePaste: (e, t) => {
148
+ if (!t.clipboardData || this.editor.isActive(this.type.name)) return !1;
149
+ let n = t.clipboardData.getData("text/plain"), i = t.clipboardData.getData("vscode-editor-data"), a = (i ? JSON.parse(i) : void 0)?.mode;
150
+ if (!n || !a) return !1;
151
+ let { tr: o, schema: s } = e.state, c = s.text(n.replace(/\r\n?/g, "\n"));
152
+ return o.replaceSelectionWith(this.type.create({ language: a }, c)), o.selection.$from.parent.type !== this.type && o.setSelection(r.near(o.doc.resolve(Math.max(0, o.selection.from - 2)))), o.setMeta("paste", !0), e.dispatch(o), !0;
153
+ } }
154
+ })];
155
+ }
156
+ });
157
+ //#endregion
158
+ export { u as CodeBlock, c as backtickInputRegex, l as tildeInputRegex };
159
+
160
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["Node"],"sources":["../../../../../node_modules/@tiptap/extension-code-block/dist/index.js"],"sourcesContent":["// src/code-block.ts\nimport { mergeAttributes, Node, textblockTypeInputRule } from \"@tiptap/core\";\nimport { Plugin, PluginKey, Selection, TextSelection } from \"@tiptap/pm/state\";\nvar DEFAULT_TAB_SIZE = 4;\nvar backtickInputRegex = /^```([a-z]+)?[\\s\\n]$/;\nvar tildeInputRegex = /^~~~([a-z]+)?[\\s\\n]$/;\nvar CodeBlock = Node.create({\n name: \"codeBlock\",\n addOptions() {\n return {\n languageClassPrefix: \"language-\",\n exitOnTripleEnter: true,\n exitOnArrowDown: true,\n exitOnArrowUp: true,\n defaultLanguage: null,\n enableTabIndentation: false,\n tabSize: DEFAULT_TAB_SIZE,\n HTMLAttributes: {}\n };\n },\n content: \"text*\",\n marks: \"\",\n group: \"block\",\n code: true,\n defining: true,\n addAttributes() {\n return {\n language: {\n default: this.options.defaultLanguage,\n parseHTML: (element) => {\n var _a;\n const { languageClassPrefix } = this.options;\n if (!languageClassPrefix) {\n return null;\n }\n const classNames = [...((_a = element.firstElementChild) == null ? void 0 : _a.classList) || []];\n const languages = classNames.filter((className) => className.startsWith(languageClassPrefix)).map((className) => className.replace(languageClassPrefix, \"\"));\n const language = languages[0];\n if (!language) {\n return null;\n }\n return language;\n },\n rendered: false\n }\n };\n },\n parseHTML() {\n return [\n {\n tag: \"pre\",\n preserveWhitespace: \"full\"\n }\n ];\n },\n renderHTML({ node, HTMLAttributes }) {\n return [\n \"pre\",\n mergeAttributes(this.options.HTMLAttributes, HTMLAttributes),\n [\n \"code\",\n {\n class: node.attrs.language ? this.options.languageClassPrefix + node.attrs.language : null\n },\n 0\n ]\n ];\n },\n markdownTokenName: \"code\",\n parseMarkdown: (token, helpers) => {\n var _a, _b;\n if (((_a = token.raw) == null ? void 0 : _a.startsWith(\"```\")) === false && ((_b = token.raw) == null ? void 0 : _b.startsWith(\"~~~\")) === false && token.codeBlockStyle !== \"indented\") {\n return [];\n }\n return helpers.createNode(\n \"codeBlock\",\n { language: token.lang || null },\n token.text ? [helpers.createTextNode(token.text)] : []\n );\n },\n renderMarkdown: (node, h) => {\n var _a;\n let output = \"\";\n const language = ((_a = node.attrs) == null ? void 0 : _a.language) || \"\";\n if (!node.content) {\n output = `\\`\\`\\`${language}\n\n\\`\\`\\``;\n } else {\n const lines = [`\\`\\`\\`${language}`, h.renderChildren(node.content), \"```\"];\n output = lines.join(\"\\n\");\n }\n return output;\n },\n addCommands() {\n return {\n setCodeBlock: (attributes) => ({ commands }) => {\n return commands.setNode(this.name, attributes);\n },\n toggleCodeBlock: (attributes) => ({ commands }) => {\n return commands.toggleNode(this.name, \"paragraph\", attributes);\n }\n };\n },\n addKeyboardShortcuts() {\n return {\n \"Mod-Alt-c\": () => this.editor.commands.toggleCodeBlock(),\n // remove code block when at start of document or code block is empty\n Backspace: () => {\n const { empty, $anchor } = this.editor.state.selection;\n const isAtStart = $anchor.pos === 1;\n if (!empty || $anchor.parent.type.name !== this.name) {\n return false;\n }\n if (isAtStart || !$anchor.parent.textContent.length) {\n return this.editor.commands.clearNodes();\n }\n return false;\n },\n // handle tab indentation\n Tab: ({ editor }) => {\n var _a;\n if (!this.options.enableTabIndentation) {\n return false;\n }\n const tabSize = (_a = this.options.tabSize) != null ? _a : DEFAULT_TAB_SIZE;\n const { state } = editor;\n const { selection } = state;\n const { $from, empty } = selection;\n if ($from.parent.type !== this.type) {\n return false;\n }\n const indent = \" \".repeat(tabSize);\n if (empty) {\n return editor.commands.insertContent(indent);\n }\n return editor.commands.command(({ tr }) => {\n const { from, to } = selection;\n const text = state.doc.textBetween(from, to, \"\\n\", \"\\n\");\n const lines = text.split(\"\\n\");\n const indentedText = lines.map((line) => indent + line).join(\"\\n\");\n tr.replaceWith(from, to, state.schema.text(indentedText));\n return true;\n });\n },\n // handle shift+tab reverse indentation\n \"Shift-Tab\": ({ editor }) => {\n var _a;\n if (!this.options.enableTabIndentation) {\n return false;\n }\n const tabSize = (_a = this.options.tabSize) != null ? _a : DEFAULT_TAB_SIZE;\n const { state } = editor;\n const { selection } = state;\n const { $from, empty } = selection;\n if ($from.parent.type !== this.type) {\n return false;\n }\n if (empty) {\n return editor.commands.command(({ tr }) => {\n var _a2;\n const { pos } = $from;\n const codeBlockStart = $from.start();\n const codeBlockEnd = $from.end();\n const allText = state.doc.textBetween(codeBlockStart, codeBlockEnd, \"\\n\", \"\\n\");\n const lines = allText.split(\"\\n\");\n let currentLineIndex = 0;\n let charCount = 0;\n const relativeCursorPos = pos - codeBlockStart;\n for (let i = 0; i < lines.length; i += 1) {\n if (charCount + lines[i].length >= relativeCursorPos) {\n currentLineIndex = i;\n break;\n }\n charCount += lines[i].length + 1;\n }\n const currentLine = lines[currentLineIndex];\n const leadingSpaces = ((_a2 = currentLine.match(/^ */)) == null ? void 0 : _a2[0]) || \"\";\n const spacesToRemove = Math.min(leadingSpaces.length, tabSize);\n if (spacesToRemove === 0) {\n return true;\n }\n let lineStartPos = codeBlockStart;\n for (let i = 0; i < currentLineIndex; i += 1) {\n lineStartPos += lines[i].length + 1;\n }\n tr.delete(lineStartPos, lineStartPos + spacesToRemove);\n const cursorPosInLine = pos - lineStartPos;\n if (cursorPosInLine <= spacesToRemove) {\n tr.setSelection(TextSelection.create(tr.doc, lineStartPos));\n }\n return true;\n });\n }\n return editor.commands.command(({ tr }) => {\n const { from, to } = selection;\n const text = state.doc.textBetween(from, to, \"\\n\", \"\\n\");\n const lines = text.split(\"\\n\");\n const reverseIndentText = lines.map((line) => {\n var _a2;\n const leadingSpaces = ((_a2 = line.match(/^ */)) == null ? void 0 : _a2[0]) || \"\";\n const spacesToRemove = Math.min(leadingSpaces.length, tabSize);\n return line.slice(spacesToRemove);\n }).join(\"\\n\");\n tr.replaceWith(from, to, state.schema.text(reverseIndentText));\n return true;\n });\n },\n // exit node on triple enter\n Enter: ({ editor }) => {\n if (!this.options.exitOnTripleEnter) {\n return false;\n }\n const { state } = editor;\n const { selection } = state;\n const { $from, empty } = selection;\n if (!empty || $from.parent.type !== this.type) {\n return false;\n }\n const isAtEnd = $from.parentOffset === $from.parent.nodeSize - 2;\n const endsWithDoubleNewline = $from.parent.textContent.endsWith(\"\\n\\n\");\n if (!isAtEnd || !endsWithDoubleNewline) {\n return false;\n }\n return editor.chain().command(({ tr }) => {\n tr.delete($from.pos - 2, $from.pos);\n return true;\n }).exitCode().run();\n },\n // exit node on arrow up if there is no node before it\n ArrowUp: ({ editor }) => {\n if (!this.options.exitOnArrowUp) {\n return false;\n }\n const { state } = editor;\n const { selection } = state;\n const { $from, empty } = selection;\n if (!empty || $from.parent.type !== this.type) {\n return false;\n }\n if ($from.parentOffset !== 0) {\n return false;\n }\n const before = $from.before();\n if (before > 0) {\n return false;\n }\n return editor.commands.insertDefaultBlock({ pos: before });\n },\n // exit node on arrow down\n ArrowDown: ({ editor }) => {\n if (!this.options.exitOnArrowDown) {\n return false;\n }\n const { state } = editor;\n const { selection, doc } = state;\n const { $from, empty } = selection;\n if (!empty || $from.parent.type !== this.type) {\n return false;\n }\n const isAtEnd = $from.parentOffset === $from.parent.nodeSize - 2;\n if (!isAtEnd) {\n return false;\n }\n const after = $from.after();\n if (after === void 0) {\n return false;\n }\n const nodeAfter = doc.nodeAt(after);\n if (nodeAfter) {\n return editor.commands.command(({ tr }) => {\n tr.setSelection(Selection.near(doc.resolve(after)));\n return true;\n });\n }\n return editor.commands.exitCode();\n }\n };\n },\n addInputRules() {\n return [\n textblockTypeInputRule({\n find: backtickInputRegex,\n type: this.type,\n getAttributes: (match) => ({\n language: match[1]\n })\n }),\n textblockTypeInputRule({\n find: tildeInputRegex,\n type: this.type,\n getAttributes: (match) => ({\n language: match[1]\n })\n })\n ];\n },\n addProseMirrorPlugins() {\n return [\n // this plugin creates a code block for pasted content from VS Code\n // we can also detect the copied code language\n new Plugin({\n key: new PluginKey(\"codeBlockVSCodeHandler\"),\n props: {\n handlePaste: (view, event) => {\n if (!event.clipboardData) {\n return false;\n }\n if (this.editor.isActive(this.type.name)) {\n return false;\n }\n const text = event.clipboardData.getData(\"text/plain\");\n const vscode = event.clipboardData.getData(\"vscode-editor-data\");\n const vscodeData = vscode ? JSON.parse(vscode) : void 0;\n const language = vscodeData == null ? void 0 : vscodeData.mode;\n if (!text || !language) {\n return false;\n }\n const { tr, schema } = view.state;\n const textNode = schema.text(text.replace(/\\r\\n?/g, \"\\n\"));\n tr.replaceSelectionWith(this.type.create({ language }, textNode));\n if (tr.selection.$from.parent.type !== this.type) {\n tr.setSelection(\n TextSelection.near(tr.doc.resolve(Math.max(0, tr.selection.from - 2)))\n );\n }\n tr.setMeta(\"paste\", true);\n view.dispatch(tr);\n return true;\n }\n }\n })\n ];\n }\n});\n\n// src/index.ts\nvar index_default = CodeBlock;\nexport {\n CodeBlock,\n backtickInputRegex,\n index_default as default,\n tildeInputRegex\n};\n//# sourceMappingURL=index.js.map"],"x_google_ignoreList":[0],"mappings":";;;AAGA,IAAI,IAAmB,GACnB,IAAqB,wBACrB,IAAkB,wBAClB,IAAYA,EAAK,OAAO;CAC1B,MAAM;CACN,aAAa;EACX,OAAO;GACL,qBAAqB;GACrB,mBAAmB;GACnB,iBAAiB;GACjB,eAAe;GACf,iBAAiB;GACjB,sBAAsB;GACtB,SAAS;GACT,gBAAgB,CAAC;EACnB;CACF;CACA,SAAS;CACT,OAAO;CACP,OAAO;CACP,MAAM;CACN,UAAU;CACV,gBAAgB;EACd,OAAO,EACL,UAAU;GACR,SAAS,KAAK,QAAQ;GACtB,YAAY,MAAY;IAEtB,IAAM,EAAE,2BAAwB,KAAK;IAUrC,OATK,KAIa,CADE,GAAU,EAAQ,mBAAyC,aAAc,CAAC,CACnE,CAAC,CAAC,QAAQ,MAAc,EAAU,WAAW,CAAmB,CAAC,CAAC,CAAC,KAAK,MAAc,EAAU,QAAQ,GAAqB,EAAE,CACjI,CAAC,CAAC,MAJlB;GASX;GACA,UAAU;EACZ,EACF;CACF;CACA,YAAY;EACV,OAAO,CACL;GACE,KAAK;GACL,oBAAoB;EACtB,CACF;CACF;CACA,WAAW,EAAE,SAAM,qBAAkB;EACnC,OAAO;GACL;GACA,EAAgB,KAAK,QAAQ,gBAAgB,CAAc;GAC3D;IACE;IACA,EACE,OAAO,EAAK,MAAM,WAAW,KAAK,QAAQ,sBAAsB,EAAK,MAAM,WAAW,KACxF;IACA;GACF;EACF;CACF;CACA,mBAAmB;CACnB,gBAAgB,GAAO,MAEV,EAAM,KAA2B,WAAW,KAAK,MAAO,MAAgB,EAAM,KAA2B,WAAW,KAAK,MAAO,MAAS,EAAM,mBAAmB,aACpK,CAAC,IAEH,EAAQ,WACb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KAAK,EAAG,IAAI,QAAQ,KAAK,IAAI,GAAG,EAAG,UAAU,OAAO,CAAC,CAAC,CAAC,CACvE,GAEF,EAAG,QAAQ,SAAS,EAAI,GACxB,EAAK,SAAS,CAAE,GACT;GACT,EACF;EACF,CAAC,CACH;CACF;AACF,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { Node as e } from "../../core/dist/index.js";
2
+ //#region node_modules/@tiptap/extension-document/dist/index.js
3
+ var t = e.create({
4
+ name: "doc",
5
+ topNode: !0,
6
+ content: "block+",
7
+ renderMarkdown: (e, t) => e.content ? t.renderChildren(e.content, "\n\n") : ""
8
+ });
9
+ //#endregion
10
+ export { t as Document };
11
+
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["Node"],"sources":["../../../../../node_modules/@tiptap/extension-document/dist/index.js"],"sourcesContent":["// src/document.ts\nimport { Node } from \"@tiptap/core\";\nvar Document = Node.create({\n name: \"doc\",\n topNode: true,\n content: \"block+\",\n renderMarkdown: (node, h) => {\n if (!node.content) {\n return \"\";\n }\n return h.renderChildren(node.content, \"\\n\\n\");\n }\n});\n\n// src/index.ts\nvar index_default = Document;\nexport {\n Document,\n index_default as default\n};\n//# sourceMappingURL=index.js.map"],"x_google_ignoreList":[0],"mappings":";;AAEA,IAAI,IAAWA,EAAK,OAAO;CACzB,MAAM;CACN,SAAS;CACT,SAAS;CACT,iBAAiB,GAAM,MAChB,EAAK,UAGH,EAAE,eAAe,EAAK,SAAS,MAAM,IAFnC;AAIb,CAAC"}
@@ -0,0 +1,51 @@
1
+ import { Node as e, mergeAttributes as t } from "../../core/dist/index.js";
2
+ //#region node_modules/@tiptap/extension-hard-break/dist/index.js
3
+ var n = e.create({
4
+ name: "hardBreak",
5
+ markdownTokenName: "br",
6
+ addOptions() {
7
+ return {
8
+ keepMarks: !0,
9
+ HTMLAttributes: {}
10
+ };
11
+ },
12
+ inline: !0,
13
+ group: "inline",
14
+ selectable: !1,
15
+ linebreakReplacement: !0,
16
+ parseHTML() {
17
+ return [{ tag: "br" }];
18
+ },
19
+ renderHTML({ HTMLAttributes: e }) {
20
+ return ["br", t(this.options.HTMLAttributes, e)];
21
+ },
22
+ renderText() {
23
+ return "\n";
24
+ },
25
+ renderMarkdown: () => " \n",
26
+ parseMarkdown: () => ({ type: "hardBreak" }),
27
+ addCommands() {
28
+ return { setHardBreak: () => ({ commands: e, chain: t, state: n, editor: r }) => e.first([() => e.exitCode(), () => e.command(() => {
29
+ let { selection: e, storedMarks: i } = n;
30
+ if (e.$from.parent.type.spec.isolating) return !1;
31
+ let { keepMarks: a } = this.options, { splittableMarks: o } = r.extensionManager, s = i || e.$to.parentOffset && e.$from.marks();
32
+ return t().insertContent({ type: this.name }).command(({ tr: e, dispatch: t }) => {
33
+ if (t && s && a) {
34
+ let t = s.filter((e) => o.includes(e.type.name));
35
+ e.ensureMarks(t);
36
+ }
37
+ return !0;
38
+ }).scrollIntoView().run();
39
+ })]) };
40
+ },
41
+ addKeyboardShortcuts() {
42
+ return {
43
+ "Mod-Enter": () => this.editor.commands.setHardBreak(),
44
+ "Shift-Enter": () => this.editor.commands.setHardBreak()
45
+ };
46
+ }
47
+ });
48
+ //#endregion
49
+ export { n as HardBreak };
50
+
51
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["Node"],"sources":["../../../../../node_modules/@tiptap/extension-hard-break/dist/index.js"],"sourcesContent":["// src/hard-break.ts\nimport { mergeAttributes, Node } from \"@tiptap/core\";\nvar HardBreak = Node.create({\n name: \"hardBreak\",\n markdownTokenName: \"br\",\n addOptions() {\n return {\n keepMarks: true,\n HTMLAttributes: {}\n };\n },\n inline: true,\n group: \"inline\",\n selectable: false,\n linebreakReplacement: true,\n parseHTML() {\n return [{ tag: \"br\" }];\n },\n renderHTML({ HTMLAttributes }) {\n return [\"br\", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)];\n },\n renderText() {\n return \"\\n\";\n },\n renderMarkdown: () => ` \n`,\n parseMarkdown: () => {\n return {\n type: \"hardBreak\"\n };\n },\n addCommands() {\n return {\n setHardBreak: () => ({ commands, chain, state, editor }) => {\n return commands.first([\n () => commands.exitCode(),\n () => commands.command(() => {\n const { selection, storedMarks } = state;\n if (selection.$from.parent.type.spec.isolating) {\n return false;\n }\n const { keepMarks } = this.options;\n const { splittableMarks } = editor.extensionManager;\n const marks = storedMarks || selection.$to.parentOffset && selection.$from.marks();\n return chain().insertContent({ type: this.name }).command(({ tr, dispatch }) => {\n if (dispatch && marks && keepMarks) {\n const filteredMarks = marks.filter(\n (mark) => splittableMarks.includes(mark.type.name)\n );\n tr.ensureMarks(filteredMarks);\n }\n return true;\n }).scrollIntoView().run();\n })\n ]);\n }\n };\n },\n addKeyboardShortcuts() {\n return {\n \"Mod-Enter\": () => this.editor.commands.setHardBreak(),\n \"Shift-Enter\": () => this.editor.commands.setHardBreak()\n };\n }\n});\n\n// src/index.ts\nvar index_default = HardBreak;\nexport {\n HardBreak,\n index_default as default\n};\n//# sourceMappingURL=index.js.map"],"x_google_ignoreList":[0],"mappings":";;AAEA,IAAI,IAAYA,EAAK,OAAO;CAC1B,MAAM;CACN,mBAAmB;CACnB,aAAa;EACX,OAAO;GACL,WAAW;GACX,gBAAgB,CAAC;EACnB;CACF;CACA,QAAQ;CACR,OAAO;CACP,YAAY;CACZ,sBAAsB;CACtB,YAAY;EACV,OAAO,CAAC,EAAE,KAAK,KAAK,CAAC;CACvB;CACA,WAAW,EAAE,qBAAkB;EAC7B,OAAO,CAAC,MAAM,EAAgB,KAAK,QAAQ,gBAAgB,CAAc,CAAC;CAC5E;CACA,aAAa;EACX,OAAO;CACT;CACA,sBAAsB;CAEtB,sBACS,EACL,MAAM,YACR;CAEF,cAAc;EACZ,OAAO,EACL,qBAAqB,EAAE,aAAU,UAAO,UAAO,gBACtC,EAAS,MAAM,OACd,EAAS,SAAS,SAClB,EAAS,cAAc;GAC3B,IAAM,EAAE,cAAW,mBAAgB;GACnC,IAAI,EAAU,MAAM,OAAO,KAAK,KAAK,WACnC,OAAO;GAET,IAAM,EAAE,iBAAc,KAAK,SACrB,EAAE,uBAAoB,EAAO,kBAC7B,IAAQ,KAAe,EAAU,IAAI,gBAAgB,EAAU,MAAM,MAAM;GACjF,OAAO,EAAM,CAAC,CAAC,cAAc,EAAE,MAAM,KAAK,KAAK,CAAC,CAAC,CAAC,SAAS,EAAE,OAAI,kBAAe;IAC9E,IAAI,KAAY,KAAS,GAAW;KAClC,IAAM,IAAgB,EAAM,QACzB,MAAS,EAAgB,SAAS,EAAK,KAAK,IAAI,CACnD;KACA,EAAG,YAAY,CAAa;IAC9B;IACA,OAAO;GACT,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,IAAI;EAC1B,CAAC,CACH,CAAC,EAEL;CACF;CACA,uBAAuB;EACrB,OAAO;GACL,mBAAmB,KAAK,OAAO,SAAS,aAAa;GACrD,qBAAqB,KAAK,OAAO,SAAS,aAAa;EACzD;CACF;AACF,CAAC"}
@@ -0,0 +1,68 @@
1
+ import { Node as e, mergeAttributes as t, textblockTypeInputRule as n } from "../../core/dist/index.js";
2
+ //#region node_modules/@tiptap/extension-heading/dist/index.js
3
+ var r = e.create({
4
+ name: "heading",
5
+ addOptions() {
6
+ return {
7
+ levels: [
8
+ 1,
9
+ 2,
10
+ 3,
11
+ 4,
12
+ 5,
13
+ 6
14
+ ],
15
+ HTMLAttributes: {}
16
+ };
17
+ },
18
+ content: "inline*",
19
+ group: "block",
20
+ defining: !0,
21
+ addAttributes() {
22
+ return { level: {
23
+ default: 1,
24
+ rendered: !1
25
+ } };
26
+ },
27
+ parseHTML() {
28
+ return this.options.levels.map((e) => ({
29
+ tag: `h${e}`,
30
+ attrs: { level: e }
31
+ }));
32
+ },
33
+ renderHTML({ node: e, HTMLAttributes: n }) {
34
+ return [
35
+ `h${this.options.levels.includes(e.attrs.level) ? e.attrs.level : this.options.levels[0]}`,
36
+ t(this.options.HTMLAttributes, n),
37
+ 0
38
+ ];
39
+ },
40
+ parseMarkdown: (e, t) => t.createNode("heading", { level: e.depth || 1 }, t.parseInline(e.tokens || [])),
41
+ renderMarkdown: (e, t) => {
42
+ let n = e.attrs?.level ? parseInt(e.attrs.level, 10) : 1, r = "#".repeat(n);
43
+ return e.content ? `${r} ${t.renderChildren(e.content)}` : "";
44
+ },
45
+ addCommands() {
46
+ return {
47
+ setHeading: (e) => ({ commands: t }) => this.options.levels.includes(e.level) ? t.setNode(this.name, e) : !1,
48
+ toggleHeading: (e) => ({ commands: t }) => this.options.levels.includes(e.level) ? t.toggleNode(this.name, "paragraph", e) : !1
49
+ };
50
+ },
51
+ addKeyboardShortcuts() {
52
+ return this.options.levels.reduce((e, t) => ({
53
+ ...e,
54
+ [`Mod-Alt-${t}`]: () => this.editor.commands.toggleHeading({ level: t })
55
+ }), {});
56
+ },
57
+ addInputRules() {
58
+ return this.options.levels.map((e) => n({
59
+ find: RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),
60
+ type: this.type,
61
+ getAttributes: { level: e }
62
+ }));
63
+ }
64
+ });
65
+ //#endregion
66
+ export { r as Heading };
67
+
68
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["Node"],"sources":["../../../../../node_modules/@tiptap/extension-heading/dist/index.js"],"sourcesContent":["// src/heading.ts\nimport { mergeAttributes, Node, textblockTypeInputRule } from \"@tiptap/core\";\nvar Heading = Node.create({\n name: \"heading\",\n addOptions() {\n return {\n levels: [1, 2, 3, 4, 5, 6],\n HTMLAttributes: {}\n };\n },\n content: \"inline*\",\n group: \"block\",\n defining: true,\n addAttributes() {\n return {\n level: {\n default: 1,\n rendered: false\n }\n };\n },\n parseHTML() {\n return this.options.levels.map((level) => ({\n tag: `h${level}`,\n attrs: { level }\n }));\n },\n renderHTML({ node, HTMLAttributes }) {\n const hasLevel = this.options.levels.includes(node.attrs.level);\n const level = hasLevel ? node.attrs.level : this.options.levels[0];\n return [`h${level}`, mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n },\n parseMarkdown: (token, helpers) => {\n return helpers.createNode(\n \"heading\",\n { level: token.depth || 1 },\n helpers.parseInline(token.tokens || [])\n );\n },\n renderMarkdown: (node, h) => {\n var _a;\n const level = ((_a = node.attrs) == null ? void 0 : _a.level) ? parseInt(node.attrs.level, 10) : 1;\n const headingChars = \"#\".repeat(level);\n if (!node.content) {\n return \"\";\n }\n return `${headingChars} ${h.renderChildren(node.content)}`;\n },\n addCommands() {\n return {\n setHeading: (attributes) => ({ commands }) => {\n if (!this.options.levels.includes(attributes.level)) {\n return false;\n }\n return commands.setNode(this.name, attributes);\n },\n toggleHeading: (attributes) => ({ commands }) => {\n if (!this.options.levels.includes(attributes.level)) {\n return false;\n }\n return commands.toggleNode(this.name, \"paragraph\", attributes);\n }\n };\n },\n addKeyboardShortcuts() {\n return this.options.levels.reduce(\n (items, level) => ({\n ...items,\n [`Mod-Alt-${level}`]: () => this.editor.commands.toggleHeading({ level })\n }),\n {}\n );\n },\n addInputRules() {\n return this.options.levels.map((level) => {\n return textblockTypeInputRule({\n find: new RegExp(`^(#{${Math.min(...this.options.levels)},${level}})\\\\s$`),\n type: this.type,\n getAttributes: {\n level\n }\n });\n });\n }\n});\n\n// src/index.ts\nvar index_default = Heading;\nexport {\n Heading,\n index_default as default\n};\n//# sourceMappingURL=index.js.map"],"x_google_ignoreList":[0],"mappings":";;AAEA,IAAI,IAAUA,EAAK,OAAO;CACxB,MAAM;CACN,aAAa;EACX,OAAO;GACL,QAAQ;IAAC;IAAG;IAAG;IAAG;IAAG;IAAG;GAAC;GACzB,gBAAgB,CAAC;EACnB;CACF;CACA,SAAS;CACT,OAAO;CACP,UAAU;CACV,gBAAgB;EACd,OAAO,EACL,OAAO;GACL,SAAS;GACT,UAAU;EACZ,EACF;CACF;CACA,YAAY;EACV,OAAO,KAAK,QAAQ,OAAO,KAAK,OAAW;GACzC,KAAK,IAAI;GACT,OAAO,EAAE,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