revise 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/CHANGELOG.md +128 -0
  2. package/README.md +4 -1
  3. package/assets/historyMaterializeWorker-C4uxcZEh.js +607 -0
  4. package/backend.d.ts +22 -0
  5. package/backend.js +3 -1
  6. package/chunks/AgentPageRenderer-BFB0arQL.js +1 -0
  7. package/chunks/AgentPageRenderer-Dn6SaRjW.js +1 -0
  8. package/chunks/AttachmentDocumentImporter-BHDJAdky.js +1 -0
  9. package/chunks/AttachmentDocumentImporter-CxOZqzt1.js +1 -0
  10. package/chunks/BidiText-C8PBPSQY.js +160 -0
  11. package/chunks/ColorParserFull-BKH72fK8.js +446 -1
  12. package/chunks/DocumentMutator-4vBJQ74L.js +31 -0
  13. package/chunks/DocumentScrubber-COPepQKE.js +1 -0
  14. package/chunks/DocumentScrubber-Cf_QqHhF.js +1 -0
  15. package/chunks/DocumentScrubber-DS4LFDKS.js +18 -0
  16. package/chunks/DocumentStylesheet-byN5dtC6.js +7 -1
  17. package/chunks/DocxConverter-BCEB7jWY.js +1083 -0
  18. package/chunks/{DocxConverter-COV6CjUM.js → DocxConverter-C3NflpDr.js} +7 -7
  19. package/chunks/{DocxConverter-B7P52lw7.js → DocxConverter-D9ZNn4nX.js} +6 -6
  20. package/chunks/{DocxGraft-CJ12C9WP.js → DocxGraft-Ba63IRP4.js} +1 -1
  21. package/chunks/DocxGraft-DjERgl-z.js +7 -0
  22. package/chunks/{DocxGraft-DcmFuUkd.js → DocxGraft-cYlmw4Ab.js} +1 -1
  23. package/chunks/FileImporter-CHXj9sNX.js +1 -0
  24. package/chunks/FileImporter-DetvRoJc.js +1 -0
  25. package/chunks/HorizontalRuleOrnaments-gmUZ3R7Q.js +3 -1
  26. package/chunks/HtmlConverter-Sd9t49vH.js +267 -0
  27. package/chunks/ListNumbering-Qlu6AuRZ.js +23 -1
  28. package/chunks/MarkdownConverter-BdJgh8xt.js +57 -0
  29. package/chunks/MathRenderer-B0Y1h1JU.js +36 -7
  30. package/chunks/OdtConverter-BKtyx012.js +1 -0
  31. package/chunks/OdtConverter-Ce9j8PRt.js +1 -0
  32. package/chunks/OdtConverter-D709qfYb.js +31 -0
  33. package/chunks/ParagraphDiffAnalysis-DrmStvmz.js +36 -0
  34. package/chunks/PdfConverter-BA8XLTAM.js +21 -0
  35. package/chunks/PdfConverter-CkDClffR.js +438 -0
  36. package/chunks/PdfConverter-CxLxd-LJ.js +21 -0
  37. package/chunks/PdfImportService-CQCgsRX1.js +2 -0
  38. package/chunks/PdfImportService-xl7fstr-.js +2 -0
  39. package/chunks/{RtfConverter-oIwzoqCD.js → RtfConverter-BZOnMUGH.js} +5 -5
  40. package/chunks/{RtfConverter-BQGge3K-.js → RtfConverter-Bs81AfXt.js} +5 -5
  41. package/chunks/RtfConverter-DfuE5olb.js +45 -0
  42. package/chunks/TableBorders-Cdkc62cX.js +30 -0
  43. package/chunks/TableGrid-DbroRucl.js +12 -0
  44. package/chunks/TextFileDecoder--rsVs3NR.js +9 -2
  45. package/chunks/{TxtConverter-C1lp6dBS.js → TxtConverter-C-oiFUAp.js} +6 -3
  46. package/chunks/UnicodeUtils-CXtusU4g.js +10 -0
  47. package/chunks/XmlConverter-C0FnrVYk.js +70 -0
  48. package/chunks/XmlConverter-CQa8baOF.js +2 -0
  49. package/chunks/XmlConverter-DjEYaIyf.js +2 -0
  50. package/chunks/_commonjsHelpers-DaMA6jEr.js +2 -1
  51. package/chunks/_revise-sdk-lazy-harfbuzz-CDWdjF9f.js +1 -1
  52. package/chunks/_revise-sdk-lazy-harfbuzz-X8gnYTZL.js +1 -1
  53. package/chunks/ar-BdmGnaKI.js +14 -0
  54. package/chunks/backend-BIhAX-Gi.js +484 -0
  55. package/chunks/base64-Qx0OzT4p.js +196 -0
  56. package/chunks/browser-module-CFmqfGkE.js +1791 -3
  57. package/chunks/{browser-module-6b2Fq-5C.js → browser-module-CYGCfEyx.js} +1 -1
  58. package/chunks/{browser-module-CkO57IPL.js → browser-module-DgvTMhpA.js} +1 -1
  59. package/chunks/bundle.min-DRpfgV69.js +779 -5
  60. package/chunks/capture-BAJ2in5p.js +9 -0
  61. package/chunks/carrier-C5VZRMxZ.js +6 -0
  62. package/chunks/de-DldIXRFC.js +14 -0
  63. package/chunks/es-CnyKlSPK.js +14 -0
  64. package/chunks/footnoteFlatten-Bekh8ZfM.js +6 -0
  65. package/chunks/graftExport-CRRm1Oe_.js +82 -0
  66. package/chunks/html2canvas.esm-CntiHiYW.js +994 -2
  67. package/chunks/index-B1idHquf.js +1094 -0
  68. package/chunks/index-BWdRWxoH.js +1796 -13
  69. package/chunks/index-C-4H81OE.js +378 -0
  70. package/chunks/index-iZC8xN0t.js +378 -0
  71. package/chunks/{index.es-DOqegDGr.js → index.es-Bwt05m_b.js} +1 -1
  72. package/chunks/index.es-CI0QPo8w.js +780 -5
  73. package/chunks/{index.es-tXDO0RMv.js → index.es-DAQD57G4.js} +1 -1
  74. package/chunks/{jspdf.es.min-CzYti8jo.js → jspdf.es.min-CnNRolk9.js} +1 -1
  75. package/chunks/jspdf.es.min-DU74zN8b.js +1747 -32
  76. package/chunks/{jspdf.es.min-ejWOGhkJ.js → jspdf.es.min-DlTF8uTw.js} +1 -1
  77. package/chunks/jszip.min-CPW0h1Kx.js +476 -2
  78. package/chunks/katex-DWj8TvwO.js +1209 -8
  79. package/chunks/pdf-BLWDCiFF.js +1826 -10
  80. package/chunks/{pseudoLocale-CdBtPHRi.js → pseudoLocale-BoJwIubw.js} +1 -1
  81. package/chunks/{pseudoLocale-DEVWLkGC.js → pseudoLocale-DWAm7Dpa.js} +1 -1
  82. package/chunks/purify.es-BwLardii.js +107 -2
  83. package/chunks/serverDocumentSession-DASrQAbW.js +15 -0
  84. package/chunks/signatures-CBF7NZUy.js +17 -0
  85. package/chunks/tree-sitter-D6zWWUMP.js +1 -1
  86. package/chunks/web-tree-sitter-BXGZGnNj.js +2 -1
  87. package/full.js +1 -1
  88. package/index.d.ts +58 -16
  89. package/index.js +1 -1
  90. package/package.json +2 -2
  91. package/root.js +2 -2
  92. package/serverToolContract.d.ts +21 -3
  93. package/serverToolInputs.generated.d.ts +23 -2
  94. package/style.css +1 -1
  95. package/assets/historyMaterializeWorker-CoAX9ZAi.js +0 -3
  96. package/chunks/AgentPageRenderer-C0n4EnuW.js +0 -1
  97. package/chunks/AgentPageRenderer-DURfmiu0.js +0 -1
  98. package/chunks/AttachmentDocumentImporter-DSic_6At.js +0 -1
  99. package/chunks/AttachmentDocumentImporter-dNMtkxrv.js +0 -1
  100. package/chunks/BidiText-B4Hzrjg9.js +0 -1
  101. package/chunks/DocxConverter-Cq_zCEJC.js +0 -11
  102. package/chunks/DocxGraft-CQpvFcYb.js +0 -1
  103. package/chunks/FileImporter-DVnYOJHp.js +0 -1
  104. package/chunks/FileImporter-q9mCch0J.js +0 -1
  105. package/chunks/HtmlConverter-JvRlkQM3.js +0 -61
  106. package/chunks/MarkdownConverter-B-tPY7X3.js +0 -17
  107. package/chunks/OdtConverter-Br81BSoJ.js +0 -1
  108. package/chunks/OdtConverter-CQjh0vlo.js +0 -1
  109. package/chunks/OdtConverter-DYHnR4E8.js +0 -1
  110. package/chunks/PdfConverter-D26rXumc.js +0 -21
  111. package/chunks/PdfConverter-DGZpUSVf.js +0 -21
  112. package/chunks/PdfConverter-DZzVP0-B.js +0 -21
  113. package/chunks/PdfImportService-CBD8TL1k.js +0 -2
  114. package/chunks/PdfImportService-D6uUKGMf.js +0 -2
  115. package/chunks/RtfConverter-CMfZ4olw.js +0 -14
  116. package/chunks/TableBorders-BLkZYt1k.js +0 -1
  117. package/chunks/TableGrid-DVWaRZv0.js +0 -1
  118. package/chunks/ar-kgSWdrXF.js +0 -8
  119. package/chunks/backend-Cq-khfdG.js +0 -1
  120. package/chunks/base64-CfDUyGi8.js +0 -36
  121. package/chunks/capture-DU3MC7tb.js +0 -1
  122. package/chunks/carrier-WgcRSu7a.js +0 -1
  123. package/chunks/de-C2QTHrqo.js +0 -8
  124. package/chunks/es-BKboUn4q.js +0 -8
  125. package/chunks/footnoteFlatten-CW-DUcgK.js +0 -1
  126. package/chunks/graftExport-CVg7PO2A.js +0 -2
  127. package/chunks/index-CLw_BlSL.js +0 -353
  128. package/chunks/index-F-kHIwWT.js +0 -353
  129. package/chunks/serverDocumentSession-DZrYbdpk.js +0 -42
@@ -0,0 +1 @@
1
+ import{y as p,z as N}from"./index-iZC8xN0t.js";const i="Author",h=o=>{const n=[o.children];o.notes&&n.push(o.notes),o.chrome&&n.push(o.chrome);for(const e of[o.headers,o.footers])if(e)for(const c of Object.values(e))Array.isArray(c)&&n.push(c);return n},g=(o,n)=>{n(o);for(const e of o)e&&Array.isArray(e.children)&&g(e.children,n)},y=(o,n)=>{for(const e of h(o))g(e,c=>{for(const a of c)a?.type==="text"&&n(a)})},l=o=>{o.marks&&Object.keys(o.marks).length===0&&delete o.marks},A=o=>{const n=new Set,e=c=>{typeof c=="string"&&c.length>0&&n.add(c)};for(const c of h(o))g(c,a=>{for(const t of a){if(!t||typeof t!="object")continue;e(t.suggestionId),e(t.structuralSuggestionId);for(const s of["structuralSuggestionRecord","structuralSuggestionRecords"]){const u=t[s];if(typeof u=="string")try{const f=JSON.parse(u),m=Array.isArray(f)?f:[f];for(const d of m)e(d?.id)}catch{}}const r=t.marks;if(r&&(e(r.suggestionId),typeof r.layeredInsertion=="string"))try{e(JSON.parse(r.layeredInsertion)?.id)}catch{}}});return n},S=(o,n)=>{const e=p(o);try{const c=N.createSuggestionProjectionFromYDoc(e,n);try{const a=c.doc,t={...o,children:a.children};return a.notes?t.notes=a.notes:delete t.notes,t}finally{c.ydoc.destroy()}}finally{e.destroy()}},k=(o,n)=>{o.author&&o.author!==i&&(n.add(o.author),o.author=i),delete o.initials,delete o.authorId,delete o.authorImageUrl,o.agentName&&(n.add(o.agentName),delete o.agentName)};function v(o,n){let e=structuredClone(o);const c={commentsRemoved:0,suggestionsResolved:0,hiddenRemoved:0,authorsAnonymized:0,corePropsCleared:!1};if(n.resolveSuggestions){const a=A(e);a.size>0&&(e=S(e,n.resolveSuggestions),c.suggestionsResolved=a.size)}if(n.removeComments){const a=new Set((e.comments??[]).map(t=>t.id));y(e,t=>{if(t.marks?.comment){for(const r of t.marks.comment.split(","))r&&a.add(r);delete t.marks.comment,l(t)}}),delete e.comments,c.commentsRemoved=a.size}if(n.removeHiddenText)for(const a of h(e))g(a,t=>{const r=[];for(const s of t){if(s?.type==="text"&&s.marks?.hidden){c.hiddenRemoved+=1,s.marks.footnoteRef&&(delete s.marks.hidden,l(s),r.push(s));continue}r.push(s)}r.length!==t.length&&(t.length=0,t.push(...r))});if(n.anonymizeAuthors){const a=new Set;y(e,t=>{const r=t.marks;if(r){if(r.suggestionAuthorName&&r.suggestionAuthorName!==i&&(a.add(r.suggestionAuthorName),r.suggestionAuthorName=i),typeof r.layeredInsertion=="string")try{const s=JSON.parse(r.layeredInsertion);s&&typeof s=="object"&&s.authorName&&s.authorName!==i&&(a.add(s.authorName),s.authorName=i,r.layeredInsertion=JSON.stringify(s))}catch{}if(typeof r.docxMove=="string")try{const s=JSON.parse(r.docxMove);s&&typeof s=="object"&&s.rangeAuthor&&s.rangeAuthor!==i&&(a.add(s.rangeAuthor),s.rangeAuthor=i,r.docxMove=JSON.stringify(s))}catch{}}});for(const t of h(e))g(t,r=>{for(const s of r)for(const u of["structuralSuggestionRecord","structuralSuggestionRecords"])if(typeof s?.[u]=="string")try{const f=JSON.parse(s[u]),m=Array.isArray(f)?f:[f];for(const d of m)d&&typeof d=="object"&&typeof d.agentName=="string"&&d.agentName.length>0&&d.agentName!==i&&(a.add(d.agentName),d.agentName=i);s[u]=JSON.stringify(Array.isArray(f)?m:m[0])}catch{}});for(const t of e.comments??[])k(t,a);if(e.coreProperties)for(const t of["creator","lastModifiedBy"]){const r=e.coreProperties[t];r&&r!==i&&(a.add(r),e.coreProperties[t]=i)}c.authorsAnonymized=a.size}return n.clearCoreProperties&&(e.coreProperties&&Object.keys(e.coreProperties).length>0&&(c.corePropsCleared=!0),delete e.coreProperties),{doc:e,summary:c}}export{i as SCRUBBED_AUTHOR_NAME,v as scrubDocument};
@@ -0,0 +1 @@
1
+ import{y as p,z as N}from"./index-C-4H81OE.js";const i="Author",h=o=>{const n=[o.children];o.notes&&n.push(o.notes),o.chrome&&n.push(o.chrome);for(const e of[o.headers,o.footers])if(e)for(const c of Object.values(e))Array.isArray(c)&&n.push(c);return n},g=(o,n)=>{n(o);for(const e of o)e&&Array.isArray(e.children)&&g(e.children,n)},y=(o,n)=>{for(const e of h(o))g(e,c=>{for(const a of c)a?.type==="text"&&n(a)})},l=o=>{o.marks&&Object.keys(o.marks).length===0&&delete o.marks},A=o=>{const n=new Set,e=c=>{typeof c=="string"&&c.length>0&&n.add(c)};for(const c of h(o))g(c,a=>{for(const t of a){if(!t||typeof t!="object")continue;e(t.suggestionId),e(t.structuralSuggestionId);for(const s of["structuralSuggestionRecord","structuralSuggestionRecords"]){const u=t[s];if(typeof u=="string")try{const f=JSON.parse(u),m=Array.isArray(f)?f:[f];for(const d of m)e(d?.id)}catch{}}const r=t.marks;if(r&&(e(r.suggestionId),typeof r.layeredInsertion=="string"))try{e(JSON.parse(r.layeredInsertion)?.id)}catch{}}});return n},S=(o,n)=>{const e=p(o);try{const c=N.createSuggestionProjectionFromYDoc(e,n);try{const a=c.doc,t={...o,children:a.children};return a.notes?t.notes=a.notes:delete t.notes,t}finally{c.ydoc.destroy()}}finally{e.destroy()}},k=(o,n)=>{o.author&&o.author!==i&&(n.add(o.author),o.author=i),delete o.initials,delete o.authorId,delete o.authorImageUrl,o.agentName&&(n.add(o.agentName),delete o.agentName)};function v(o,n){let e=structuredClone(o);const c={commentsRemoved:0,suggestionsResolved:0,hiddenRemoved:0,authorsAnonymized:0,corePropsCleared:!1};if(n.resolveSuggestions){const a=A(e);a.size>0&&(e=S(e,n.resolveSuggestions),c.suggestionsResolved=a.size)}if(n.removeComments){const a=new Set((e.comments??[]).map(t=>t.id));y(e,t=>{if(t.marks?.comment){for(const r of t.marks.comment.split(","))r&&a.add(r);delete t.marks.comment,l(t)}}),delete e.comments,c.commentsRemoved=a.size}if(n.removeHiddenText)for(const a of h(e))g(a,t=>{const r=[];for(const s of t){if(s?.type==="text"&&s.marks?.hidden){c.hiddenRemoved+=1,s.marks.footnoteRef&&(delete s.marks.hidden,l(s),r.push(s));continue}r.push(s)}r.length!==t.length&&(t.length=0,t.push(...r))});if(n.anonymizeAuthors){const a=new Set;y(e,t=>{const r=t.marks;if(r){if(r.suggestionAuthorName&&r.suggestionAuthorName!==i&&(a.add(r.suggestionAuthorName),r.suggestionAuthorName=i),typeof r.layeredInsertion=="string")try{const s=JSON.parse(r.layeredInsertion);s&&typeof s=="object"&&s.authorName&&s.authorName!==i&&(a.add(s.authorName),s.authorName=i,r.layeredInsertion=JSON.stringify(s))}catch{}if(typeof r.docxMove=="string")try{const s=JSON.parse(r.docxMove);s&&typeof s=="object"&&s.rangeAuthor&&s.rangeAuthor!==i&&(a.add(s.rangeAuthor),s.rangeAuthor=i,r.docxMove=JSON.stringify(s))}catch{}}});for(const t of h(e))g(t,r=>{for(const s of r)for(const u of["structuralSuggestionRecord","structuralSuggestionRecords"])if(typeof s?.[u]=="string")try{const f=JSON.parse(s[u]),m=Array.isArray(f)?f:[f];for(const d of m)d&&typeof d=="object"&&typeof d.agentName=="string"&&d.agentName.length>0&&d.agentName!==i&&(a.add(d.agentName),d.agentName=i);s[u]=JSON.stringify(Array.isArray(f)?m:m[0])}catch{}});for(const t of e.comments??[])k(t,a);if(e.coreProperties)for(const t of["creator","lastModifiedBy"]){const r=e.coreProperties[t];r&&r!==i&&(a.add(r),e.coreProperties[t]=i)}c.authorsAnonymized=a.size}return n.clearCoreProperties&&(e.coreProperties&&Object.keys(e.coreProperties).length>0&&(c.corePropsCleared=!0),delete e.coreProperties),{doc:e,summary:c}}export{i as SCRUBBED_AUTHOR_NAME,v as scrubDocument};
@@ -0,0 +1,18 @@
1
+ import{D as p}from"./DocumentMutator-4vBJQ74L.js";import{d as N}from"./backend-BIhAX-Gi.js";const i="Author",h=o=>{const n=[o.children];o.notes&&n.push(o.notes),o.chrome&&n.push(o.chrome);for(const e of[
2
+ o.headers,o.footers])if(e)for(const c of Object.values(e))Array.isArray(c)&&n.push(c);return n},g=(o,n)=>{n(o);for(const e of o)e&&Array.isArray(e.children)&&g(e.children,n)},l=(o,n)=>{for(const e of h(
3
+ o))g(e,c=>{for(const a of c)a?.type==="text"&&n(a)})},y=o=>{o.marks&&Object.keys(o.marks).length===0&&delete o.marks},A=o=>{const n=new Set,e=c=>{typeof c=="string"&&c.length>0&&n.add(c)};for(const c of h(
4
+ o))g(c,a=>{for(const t of a){if(!t||typeof t!="object")continue;e(t.suggestionId),e(t.structuralSuggestionId);for(const s of["structuralSuggestionRecord","structuralSuggestionRecords"]){const u=t[s];if(typeof u==
5
+ "string")try{const f=JSON.parse(u),m=Array.isArray(f)?f:[f];for(const d of m)e(d?.id)}catch{}}const r=t.marks;if(r&&(e(r.suggestionId),typeof r.layeredInsertion=="string"))try{e(JSON.parse(r.layeredInsertion)?.
6
+ id)}catch{}}});return n},S=(o,n)=>{const e=N(o);try{const c=p.createSuggestionProjectionFromYDoc(e,n);try{const a=c.doc,t={...o,children:a.children};return a.notes?t.notes=a.notes:delete t.notes,t}finally{
7
+ c.ydoc.destroy()}}finally{e.destroy()}},k=(o,n)=>{o.author&&o.author!==i&&(n.add(o.author),o.author=i),delete o.initials,delete o.authorId,delete o.authorImageUrl,o.agentName&&(n.add(o.agentName),delete o.
8
+ agentName)};function v(o,n){let e=structuredClone(o);const c={commentsRemoved:0,suggestionsResolved:0,hiddenRemoved:0,authorsAnonymized:0,corePropsCleared:!1};if(n.resolveSuggestions){const a=A(e);a.size>
9
+ 0&&(e=S(e,n.resolveSuggestions),c.suggestionsResolved=a.size)}if(n.removeComments){const a=new Set((e.comments??[]).map(t=>t.id));l(e,t=>{if(t.marks?.comment){for(const r of t.marks.comment.split(","))
10
+ r&&a.add(r);delete t.marks.comment,y(t)}}),delete e.comments,c.commentsRemoved=a.size}if(n.removeHiddenText)for(const a of h(e))g(a,t=>{const r=[];for(const s of t){if(s?.type==="text"&&s.marks?.hidden){
11
+ c.hiddenRemoved+=1,s.marks.footnoteRef&&(delete s.marks.hidden,y(s),r.push(s));continue}r.push(s)}r.length!==t.length&&(t.length=0,t.push(...r))});if(n.anonymizeAuthors){const a=new Set;l(e,t=>{const r=t.
12
+ marks;if(r){if(r.suggestionAuthorName&&r.suggestionAuthorName!==i&&(a.add(r.suggestionAuthorName),r.suggestionAuthorName=i),typeof r.layeredInsertion=="string")try{const s=JSON.parse(r.layeredInsertion);
13
+ s&&typeof s=="object"&&s.authorName&&s.authorName!==i&&(a.add(s.authorName),s.authorName=i,r.layeredInsertion=JSON.stringify(s))}catch{}if(typeof r.docxMove=="string")try{const s=JSON.parse(r.docxMove);
14
+ s&&typeof s=="object"&&s.rangeAuthor&&s.rangeAuthor!==i&&(a.add(s.rangeAuthor),s.rangeAuthor=i,r.docxMove=JSON.stringify(s))}catch{}}});for(const t of h(e))g(t,r=>{for(const s of r)for(const u of["str\
15
+ ucturalSuggestionRecord","structuralSuggestionRecords"])if(typeof s?.[u]=="string")try{const f=JSON.parse(s[u]),m=Array.isArray(f)?f:[f];for(const d of m)d&&typeof d=="object"&&typeof d.agentName=="st\
16
+ ring"&&d.agentName.length>0&&d.agentName!==i&&(a.add(d.agentName),d.agentName=i);s[u]=JSON.stringify(Array.isArray(f)?m:m[0])}catch{}});for(const t of e.comments??[])k(t,a);if(e.coreProperties)for(const t of[
17
+ "creator","lastModifiedBy"]){const r=e.coreProperties[t];r&&r!==i&&(a.add(r),e.coreProperties[t]=i)}c.authorsAnonymized=a.size}return n.clearCoreProperties&&(e.coreProperties&&Object.keys(e.coreProperties).
18
+ length>0&&(c.corePropsCleared=!0),delete e.coreProperties),{doc:e,summary:c}}export{i as SCRUBBED_AUTHOR_NAME,v as scrubDocument};
@@ -1 +1,7 @@
1
- const i="Revise Agent",l="Anonymous";function p(e){const n=e?.trim();return!n||n===i}function c(e){return e?.paragraphStyles.find(n=>n.default)}function f(e,n){if(!e)return;const t=e.paragraphStyles.filter(o=>o.headingLevel===n);if(t.length!==0)return t.find(o=>o.styleId.toLowerCase()===`heading${n}`)??t[0]}function d(e,n){return e?.paragraphStyles.find(t=>t.styleId===n)}function u(e,n){return n===void 0?c(e):f(e,n)}const y=["align","lineSpacing","spaceBefore","spaceAfter","contextualSpacing","keepNext","keepLines","widowControl","leftIndent","firstLineIndent","direction","borders","shading","tabStops"];function g(e,n){if(n)for(const t of e){if(t.type!=="paragraph")continue;const o=t.styleId?d(n,t.styleId):t.heading?f(n,t.heading):void 0;if(!o)continue;t.heading&&!t.styleId&&o.styleId.toLowerCase()!=="normal"&&(t.styleId=o.styleId);const r=o.paragraphAttrs??{},a=t;for(const s of y)Object.prototype.hasOwnProperty.call(r,s)&&r[s]!==void 0&&a[s]===void 0&&(a[s]=r[s]);if(o.runMarks)for(const s of t.children)s.type==="text"&&(s.marks={...o.runMarks,...s.marks})}}function h(e,n){const t=new Set(["fontSize"]);for(const r of Object.keys(e??{}))t.add(r);for(const r of Object.keys(n??{}))t.add(r);const o={};for(const r of t){const a=n?.[r];o[r]=a===void 0?!1:a}return o}export{l as A,i as R,g as a,d as b,u as c,h as d,p as i,c as s};
1
+ const i="Revise Agent",l="Anonymous";function p(e){const n=e?.trim();return!n||n===i}function c(e){return e?.paragraphStyles.find(n=>n.default)}function f(e,n){if(!e)return;const t=e.paragraphStyles.filter(
2
+ o=>o.headingLevel===n);if(t.length!==0)return t.find(o=>o.styleId.toLowerCase()===`heading${n}`)??t[0]}function d(e,n){return e?.paragraphStyles.find(t=>t.styleId===n)}function u(e,n){return n===void 0?
3
+ c(e):f(e,n)}const y=["align","lineSpacing","spaceBefore","spaceAfter","contextualSpacing","keepNext","keepLines","widowControl","leftIndent","firstLineIndent","direction","borders","shading","tabStops"];
4
+ function g(e,n){if(n)for(const t of e){if(t.type!=="paragraph")continue;const o=t.styleId?d(n,t.styleId):t.heading?f(n,t.heading):void 0;if(!o)continue;t.heading&&!t.styleId&&o.styleId.toLowerCase()!==
5
+ "normal"&&(t.styleId=o.styleId);const r=o.paragraphAttrs??{},a=t;for(const s of y)Object.prototype.hasOwnProperty.call(r,s)&&r[s]!==void 0&&a[s]===void 0&&(a[s]=r[s]);if(o.runMarks)for(const s of t.children)
6
+ s.type==="text"&&(s.marks={...o.runMarks,...s.marks})}}function h(e,n){const t=new Set(["fontSize"]);for(const r of Object.keys(e??{}))t.add(r);for(const r of Object.keys(n??{}))t.add(r);const o={};for(const r of t){
7
+ const a=n?.[r];o[r]=a===void 0?!1:a}return o}export{l as A,i as R,g as a,d as b,u as c,h as d,p as i,c as s};