@eigenpal/docx-editor-agents 1.4.0 → 1.5.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.
- package/dist/bridge.d.mts +1 -1
- package/dist/bridge.d.ts +1 -1
- package/dist/bridge.js +1 -1
- package/dist/bridge.mjs +1 -1
- package/dist/chunk-3XKOKAHP.mjs +75 -0
- package/dist/chunk-4I6U7BWX.mjs +2 -0
- package/dist/chunk-BFGKTTP7.mjs +1 -0
- package/dist/chunk-HSVOT6AW.mjs +5 -0
- package/dist/chunk-HTMMNA3I.js +75 -0
- package/dist/chunk-RYT33AHF.js +1 -0
- package/dist/{chunk-7PTBNHAH.js → chunk-UTMAYI7M.js} +2 -2
- package/dist/chunk-VPUAYS3Y.js +5 -0
- package/dist/{headless-OEZEYHNL.mjs → headless-6HFY6GHX.mjs} +1 -1
- package/dist/headless-HVIRJIN4.js +1 -0
- package/dist/index.d.mts +3 -14
- package/dist/index.d.ts +3 -14
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/mcp.d.mts +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +1 -1
- package/dist/react.mjs +1 -1
- package/dist/{server-BaVhdHCd.d.mts → server-D1vJRNf0.d.mts} +46 -43
- package/dist/{server-BaVhdHCd.d.ts → server-D1vJRNf0.d.ts} +46 -43
- package/dist/server.d.mts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +1 -1
- package/dist/server.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-2OIX7TUX.mjs +0 -75
- package/dist/chunk-4W7OEW2I.js +0 -75
- package/dist/chunk-LX3NJWKV.js +0 -1
- package/dist/chunk-NFAEIOLC.mjs +0 -1
- package/dist/chunk-P4DRISTP.mjs +0 -5
- package/dist/chunk-XUAUDUJU.js +0 -5
- package/dist/chunk-YQIAKHOL.mjs +0 -2
- package/dist/headless-ES4B5CTK.js +0 -1
package/dist/chunk-LX3NJWKV.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkXUAUDUJU_js=require('./chunk-XUAUDUJU.js'),chunk4W7OEW2I_js=require('./chunk-4W7OEW2I.js');function g(n,e){let{paragraphIndex:t,author:o="AI",text:s,search:a}=e,r=chunkXUAUDUJU_js.b(n,t),i=(n.comments??[]).map(m=>m.id),p=i.length>0?Math.max(...i)+1:1,c={id:p,author:o,date:new Date().toISOString(),content:[{type:"paragraph",content:[{type:"run",content:[{type:"text",text:s}]}],formatting:{}}]};if(n.comments||(n.comments=[]),n.comments.push(c),a){let m=chunkXUAUDUJU_js.j(r,a,t);r.content.splice(m.endRunIndex+1,0,{type:"commentRangeEnd",id:p}),r.content.splice(m.startRunIndex,0,{type:"commentRangeStart",id:p});}else r.content.unshift({type:"commentRangeStart",id:p}),r.content.push({type:"commentRangeEnd",id:p});return p}function y(n,e,t){let o=n.comments??[];if(!o.find(p=>p.id===e))throw new chunkXUAUDUJU_js.i(e);let a=o.map(p=>p.id),r=Math.max(...a)+1,i={id:r,author:t.author??"AI",date:new Date().toISOString(),parentId:e,content:[{type:"paragraph",content:[{type:"run",content:[{type:"text",text:t.text}]}],formatting:{}}]};return o.push(i),r}function k(n,e){let t=n.comments??[],o=t.find(r=>r.id===e);if(!o)throw new chunkXUAUDUJU_js.i(e);let s=o.parentId!==void 0,a=new Set([e]);if(!s)for(let r of t)r.parentId===e&&a.add(r.id);n.comments=t.filter(r=>!a.has(r.id)),!s&&chunkXUAUDUJU_js.c(n,r=>{for(let i=r.content.length-1;i>=0;i--){let p=r.content[i];(p.type==="commentRangeStart"||p.type==="commentRangeEnd")&&p.id===e&&r.content.splice(i,1);}});}function C(n,e){if(!H(n,e,"accept"))throw new chunkXUAUDUJU_js.g(e)}function I(n,e){if(!H(n,e,"reject"))throw new chunkXUAUDUJU_js.g(e)}function F(n){return M(n,"accept")}function N(n){return M(n,"reject")}function M(n,e){let t=0;return chunkXUAUDUJU_js.c(n,o=>{for(let s=o.content.length-1;s>=0;s--){let a=o.content[s];chunkXUAUDUJU_js.a(a)&&(W(o,s,a,e),t++);}}),t}function H(n,e,t){let o=false;return chunkXUAUDUJU_js.c(n,s=>{for(let a=s.content.length-1;a>=0;a--){let r=s.content[a];chunkXUAUDUJU_js.a(r)&&r.info.id===e&&(W(s,a,r,t),o=true);}if(o)return false}),o}function W(n,e,t,o){if(t.type==="insertion"&&o==="accept"||t.type==="deletion"&&o==="reject"||t.type==="moveTo"&&o==="accept"||t.type==="moveFrom"&&o==="reject"){let a=t.content;n.content.splice(e,1,...a);}else n.content.splice(e,1);}function x(n,e){let{paragraphIndex:t,search:o,author:s="AI",replaceWith:a}=e,r=chunkXUAUDUJU_js.b(n,t),{startIndex:i,endIndex:p}=chunkXUAUDUJU_js.k(r,o,t),c=new Date().toISOString(),m=w(n),h=r.content.slice(i,p+1),R={type:"deletion",info:{id:m,author:s,date:c},content:h},v={type:"insertion",info:{id:m+1,author:s,date:c},content:[{type:"run",content:[{type:"text",text:a}]}]};r.content.splice(i,p-i+1,R,v);}function G(n,e){let{paragraphIndex:t,author:o="AI",insertText:s,position:a="after",search:r}=e,i=chunkXUAUDUJU_js.b(n,t),p=new Date().toISOString(),m={type:"insertion",info:{id:w(n),author:o,date:p},content:[{type:"run",content:[{type:"text",text:s}]}]};if(r){let{startIndex:h,endIndex:R}=chunkXUAUDUJU_js.k(i,r,t),v=a==="after"?R+1:h;i.content.splice(v,0,m);}else a==="before"?i.content.unshift(m):i.content.push(m);}function L(n,e){let{paragraphIndex:t,search:o,author:s="AI"}=e,a=chunkXUAUDUJU_js.b(n,t),{startIndex:r,endIndex:i}=chunkXUAUDUJU_js.k(a,o,t),p=new Date().toISOString(),c=w(n),m=a.content.slice(r,i+1),h={type:"deletion",info:{id:c,author:s,date:p},content:m};a.content.splice(r,i-r+1,h);}var S=new WeakMap;function w(n){let e=S.get(n);e===void 0&&(e=0,chunkXUAUDUJU_js.c(n,o=>{for(let s of o.content)chunkXUAUDUJU_js.a(s)&&(e=Math.max(e,s.info.id));}));let t=e+1;return S.set(n,t+1),t}function U(n,e,t="AI"){let o=[],s=0,a=0,r=0,i=0,p=0;for(let c of e.accept??[])try{C(n,c),s++;}catch(m){o.push({operation:"accept",id:c,error:m.message});}for(let c of e.reject??[])try{I(n,c),a++;}catch(m){o.push({operation:"reject",id:c,error:m.message});}for(let c of e.comments??[])try{g(n,{...c,author:c.author??t}),r++;}catch(m){o.push({operation:"comment",search:c.search,error:m.message});}for(let c of e.replies??[])try{y(n,c.commentId,{author:c.author??t,text:c.text}),i++;}catch(m){o.push({operation:"reply",id:c.commentId,error:m.message});}for(let c of e.proposals??[])try{x(n,{...c,author:c.author??t}),p++;}catch(m){o.push({operation:"proposal",search:c.search,error:m.message});}return {accepted:s,rejected:a,commentsAdded:r,repliesAdded:i,proposalsAdded:p,errors:o}}var X=class n{constructor(e,t="AI",o){let s=o??e.originalBuffer,{originalBuffer:a,...r}=e;this.doc=structuredClone(r),s&&(this.doc.originalBuffer=s),this.author=t;}static async fromBuffer(e,t="AI"){let o=await chunk4W7OEW2I_js.w(e,{preloadFonts:false});return new n(o,t,e)}get body(){return this.doc.package.document}resolveAuthor(e){return e??this.author}getContent(e){return chunkXUAUDUJU_js.d(this.body,e)}getContentAsText(e){return chunkXUAUDUJU_js.e(chunkXUAUDUJU_js.d(this.body,e))}getChanges(e){return chunkXUAUDUJU_js.l(this.body,e,{footnotes:this.doc.package.footnotes,endnotes:this.doc.package.endnotes})}getComments(e){return chunkXUAUDUJU_js.m(this.body,e)}addComment(e,t){let o=typeof e=="number"?{paragraphIndex:e,text:t,author:this.author}:{...e,author:this.resolveAuthor(e.author)};return g(this.body,o)}replyTo(e,t){let o=typeof t=="string"?{text:t,author:this.author}:{...t,author:this.resolveAuthor(t.author)};return y(this.body,e,o)}removeComment(e){k(this.body,e);}replace(e,t,o){let s=typeof e=="number"?{paragraphIndex:e,search:t,replaceWith:o,author:this.author}:{...e,author:this.resolveAuthor(e.author)};x(this.body,s);}proposeReplacement(e){this.replace(e);}proposeInsertion(e){G(this.body,{...e,author:this.resolveAuthor(e.author)});}proposeDeletion(e){L(this.body,{...e,author:this.resolveAuthor(e.author)});}assertNotNoteOnly(e){if(this.getChanges().some(s=>s.id===e))return;let o=this.getChanges({includeFootnotes:true,includeEndnotes:true}).find(s=>s.id===e&&s.noteType!==void 0);if(o)throw new chunkXUAUDUJU_js.h(e,o.noteType,o.noteId)}acceptChange(e){this.assertNotNoteOnly(e),C(this.body,e);}rejectChange(e){this.assertNotNoteOnly(e),I(this.body,e);}acceptAll(){return F(this.body)}rejectAll(){return N(this.body)}applyReview(e){return U(this.body,e,this.author)}toDocument(){return this.doc}async toBuffer(){if(!this.doc.originalBuffer)throw new Error("Cannot create buffer: no original DOCX buffer was provided. Use DocxReviewer.fromBuffer() or pass originalBuffer to the constructor.");let{repackDocx:e}=await import('./headless-ES4B5CTK.js');return e(this.doc)}};exports.a=X;
|
package/dist/chunk-NFAEIOLC.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {d,e,l,m,h,b,j,i,c,k as k$1,g as g$1,a}from'./chunk-P4DRISTP.mjs';import {w as w$1}from'./chunk-2OIX7TUX.mjs';function g(n,e){let{paragraphIndex:t,author:o="AI",text:s,search:a}=e,r=b(n,t),i=(n.comments??[]).map(m=>m.id),p=i.length>0?Math.max(...i)+1:1,c={id:p,author:o,date:new Date().toISOString(),content:[{type:"paragraph",content:[{type:"run",content:[{type:"text",text:s}]}],formatting:{}}]};if(n.comments||(n.comments=[]),n.comments.push(c),a){let m=j(r,a,t);r.content.splice(m.endRunIndex+1,0,{type:"commentRangeEnd",id:p}),r.content.splice(m.startRunIndex,0,{type:"commentRangeStart",id:p});}else r.content.unshift({type:"commentRangeStart",id:p}),r.content.push({type:"commentRangeEnd",id:p});return p}function y(n,e,t){let o=n.comments??[];if(!o.find(p=>p.id===e))throw new i(e);let a=o.map(p=>p.id),r=Math.max(...a)+1,i$1={id:r,author:t.author??"AI",date:new Date().toISOString(),parentId:e,content:[{type:"paragraph",content:[{type:"run",content:[{type:"text",text:t.text}]}],formatting:{}}]};return o.push(i$1),r}function k(n,e){let t=n.comments??[],o=t.find(r=>r.id===e);if(!o)throw new i(e);let s=o.parentId!==void 0,a=new Set([e]);if(!s)for(let r of t)r.parentId===e&&a.add(r.id);n.comments=t.filter(r=>!a.has(r.id)),!s&&c(n,r=>{for(let i=r.content.length-1;i>=0;i--){let p=r.content[i];(p.type==="commentRangeStart"||p.type==="commentRangeEnd")&&p.id===e&&r.content.splice(i,1);}});}function C(n,e){if(!H(n,e,"accept"))throw new g$1(e)}function I(n,e){if(!H(n,e,"reject"))throw new g$1(e)}function F(n){return M(n,"accept")}function N(n){return M(n,"reject")}function M(n,e){let t=0;return c(n,o=>{for(let s=o.content.length-1;s>=0;s--){let a$1=o.content[s];a(a$1)&&(W(o,s,a$1,e),t++);}}),t}function H(n,e,t){let o=false;return c(n,s=>{for(let a$1=s.content.length-1;a$1>=0;a$1--){let r=s.content[a$1];a(r)&&r.info.id===e&&(W(s,a$1,r,t),o=true);}if(o)return false}),o}function W(n,e,t,o){if(t.type==="insertion"&&o==="accept"||t.type==="deletion"&&o==="reject"||t.type==="moveTo"&&o==="accept"||t.type==="moveFrom"&&o==="reject"){let a=t.content;n.content.splice(e,1,...a);}else n.content.splice(e,1);}function x(n,e){let{paragraphIndex:t,search:o,author:s="AI",replaceWith:a}=e,r=b(n,t),{startIndex:i,endIndex:p}=k$1(r,o,t),c=new Date().toISOString(),m=w(n),h=r.content.slice(i,p+1),R={type:"deletion",info:{id:m,author:s,date:c},content:h},v={type:"insertion",info:{id:m+1,author:s,date:c},content:[{type:"run",content:[{type:"text",text:a}]}]};r.content.splice(i,p-i+1,R,v);}function G(n,e){let{paragraphIndex:t,author:o="AI",insertText:s,position:a="after",search:r}=e,i=b(n,t),p=new Date().toISOString(),m={type:"insertion",info:{id:w(n),author:o,date:p},content:[{type:"run",content:[{type:"text",text:s}]}]};if(r){let{startIndex:h,endIndex:R}=k$1(i,r,t),v=a==="after"?R+1:h;i.content.splice(v,0,m);}else a==="before"?i.content.unshift(m):i.content.push(m);}function L(n,e){let{paragraphIndex:t,search:o,author:s="AI"}=e,a=b(n,t),{startIndex:r,endIndex:i}=k$1(a,o,t),p=new Date().toISOString(),c=w(n),m=a.content.slice(r,i+1),h={type:"deletion",info:{id:c,author:s,date:p},content:m};a.content.splice(r,i-r+1,h);}var S=new WeakMap;function w(n){let e=S.get(n);e===void 0&&(e=0,c(n,o=>{for(let s of o.content)a(s)&&(e=Math.max(e,s.info.id));}));let t=e+1;return S.set(n,t+1),t}function U(n,e,t="AI"){let o=[],s=0,a=0,r=0,i=0,p=0;for(let c of e.accept??[])try{C(n,c),s++;}catch(m){o.push({operation:"accept",id:c,error:m.message});}for(let c of e.reject??[])try{I(n,c),a++;}catch(m){o.push({operation:"reject",id:c,error:m.message});}for(let c of e.comments??[])try{g(n,{...c,author:c.author??t}),r++;}catch(m){o.push({operation:"comment",search:c.search,error:m.message});}for(let c of e.replies??[])try{y(n,c.commentId,{author:c.author??t,text:c.text}),i++;}catch(m){o.push({operation:"reply",id:c.commentId,error:m.message});}for(let c of e.proposals??[])try{x(n,{...c,author:c.author??t}),p++;}catch(m){o.push({operation:"proposal",search:c.search,error:m.message});}return {accepted:s,rejected:a,commentsAdded:r,repliesAdded:i,proposalsAdded:p,errors:o}}var X=class n{constructor(e,t="AI",o){let s=o??e.originalBuffer,{originalBuffer:a,...r}=e;this.doc=structuredClone(r),s&&(this.doc.originalBuffer=s),this.author=t;}static async fromBuffer(e,t="AI"){let o=await w$1(e,{preloadFonts:false});return new n(o,t,e)}get body(){return this.doc.package.document}resolveAuthor(e){return e??this.author}getContent(e){return d(this.body,e)}getContentAsText(e$1){return e(d(this.body,e$1))}getChanges(e){return l(this.body,e,{footnotes:this.doc.package.footnotes,endnotes:this.doc.package.endnotes})}getComments(e){return m(this.body,e)}addComment(e,t){let o=typeof e=="number"?{paragraphIndex:e,text:t,author:this.author}:{...e,author:this.resolveAuthor(e.author)};return g(this.body,o)}replyTo(e,t){let o=typeof t=="string"?{text:t,author:this.author}:{...t,author:this.resolveAuthor(t.author)};return y(this.body,e,o)}removeComment(e){k(this.body,e);}replace(e,t,o){let s=typeof e=="number"?{paragraphIndex:e,search:t,replaceWith:o,author:this.author}:{...e,author:this.resolveAuthor(e.author)};x(this.body,s);}proposeReplacement(e){this.replace(e);}proposeInsertion(e){G(this.body,{...e,author:this.resolveAuthor(e.author)});}proposeDeletion(e){L(this.body,{...e,author:this.resolveAuthor(e.author)});}assertNotNoteOnly(e){if(this.getChanges().some(s=>s.id===e))return;let o=this.getChanges({includeFootnotes:true,includeEndnotes:true}).find(s=>s.id===e&&s.noteType!==void 0);if(o)throw new h(e,o.noteType,o.noteId)}acceptChange(e){this.assertNotNoteOnly(e),C(this.body,e);}rejectChange(e){this.assertNotNoteOnly(e),I(this.body,e);}acceptAll(){return F(this.body)}rejectAll(){return N(this.body)}applyReview(e){return U(this.body,e,this.author)}toDocument(){return this.doc}async toBuffer(){if(!this.doc.originalBuffer)throw new Error("Cannot create buffer: no original DOCX buffer was provided. Use DocxReviewer.fromBuffer() or pass originalBuffer to the constructor.");let{repackDocx:e}=await import('./headless-OEZEYHNL.mjs');return e(this.doc)}};export{X as a};
|
package/dist/chunk-P4DRISTP.mjs
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import {U as U$1,V,H as H$1,I,va}from'./chunk-2OIX7TUX.mjs';import {m as m$1}from'./chunk-XDZHYYU6.mjs';function m(o){return o.type==="insertion"||o.type==="deletion"||o.type==="moveFrom"||o.type==="moveTo"}function b(o){let t=[];for(let r of o)r.type==="run"?t.push(H$1(r)):r.type==="hyperlink"&&t.push(I(r));return t.join("")}function v(o,t){let r=0;for(let n of o.content)if(n.type==="paragraph"){if(r===t)return n;r++;}else if(n.type==="table"){for(let a of n.rows)for(let e of a.cells)for(let i of e.content)if(i.type==="paragraph"){if(r===t)return i;r++;}}else r++;throw new Error(`Paragraph index ${t} out of bounds (max: ${r-1})`)}function L(o,t,r){let n=0;for(let a of o)if(a.type==="paragraph"){if(r(a,n)===false)return;n++;}else if(a.type==="table"){for(let e of a.rows)for(let i of e.cells)for(let s of i.content)if(s.type==="paragraph"){if(r(s,n)===false)return;n++;}}else t&&n++;}function F(o,t){L(o.content,true,t);}function k(o,t){L(o.content,false,t);}function xe(o,t={}){let{fromIndex:r,toIndex:n,includeTrackedChanges:a=true,includeCommentAnchors:e=true}=t,i=[],s=0;for(let c of o.content)if(c.type==="paragraph")j(s,r,n)&&i.push(ee(c,s,a,e)),s++;else if(c.type==="table"){j(s,r,n)&&i.push(te(c,s,a,e));for(let l of c.rows)for(let u of l.cells)for(let f of u.content)f.type==="paragraph"&&s++;}else s++;return i}function j(o,t,r){return (t===void 0||o>=t)&&(r===void 0||o<=r)}function ee(o,t,r,n){let a=H(o,r,n),e=o.formatting?.styleId,i=o.paraId;return U$1(e)?{type:"heading",index:t,paraId:i,level:V(e)??1,text:a}:o.listRendering?{type:"list-item",index:t,paraId:i,text:a,listLevel:o.listRendering.level??0,listType:o.listRendering.isBullet?"bullet":"number"}:{type:"paragraph",index:t,paraId:i,text:a}}function te(o,t,r,n){let a=[],e=[];for(let i of o.rows){let s=[],c=[];for(let l of i.cells){let u=[],f;for(let d of l.content)d.type==="paragraph"&&(f===void 0&&(f=d.paraId),u.push(H(d,r,n)));s.push(u.join(`
|
|
2
|
-
`)),c.push(f);}a.push(s),e.push(c);}return {type:"table",index:t,rows:a,cellParaIds:e}}function ye(o){let t=[],r=n=>n.paraId?n.paraId:String(n.index);for(let n of o)switch(n.type){case "heading":t.push(`[${r(n)}] (h${n.level}) ${n.text}`);break;case "paragraph":t.push(`[${r(n)}] ${n.text}`);break;case "list-item":{let a=" ".repeat(n.listLevel),e=n.listType==="bullet"?"\u2022":"-";t.push(`[${r(n)}] ${a}${e} ${n.text}`);break}case "table":{let a=n.index;for(let e=0;e<n.rows.length;e++)for(let i=0;i<n.rows[e].length;i++){let c=n.rows[e][i].split(`
|
|
3
|
-
`),l=n.cellParaIds?.[e]?.[i];for(let u=0;u<c.length;u++){let f=u===0&&l?l:String(a);t.push(`[${f}] (table, row ${e+1}, col ${i+1}) ${c[u]}`),a++;}}break}}return t.join(`
|
|
4
|
-
`)}function H(o,t,r){let n=[],a=new Set;for(let e of o.content){if(e.type==="commentRangeStart"&&r){a.add(e.id),n.push(`[comment:${e.id}]`);continue}if(e.type==="commentRangeEnd"&&r){a.has(e.id)&&(a.delete(e.id),n.push("[/comment]"));continue}if(e.type==="run")n.push(H$1(e));else if(e.type==="hyperlink")n.push(I(e));else if(m(e)){let i=b(e.content);e.type==="insertion"||e.type==="moveTo"?t&&n.push(`[+${i}+]{by:${e.info.author}}`):t?n.push(`[-${i}-]{by:${e.info.author}}`):n.push(i);}}return n.join("")}var C=class extends Error{constructor(t,r){let n=r!==void 0?` in paragraph ${r}`:" in document";super(`Text not found${n}: "${t}"`),this.name="TextNotFoundError";}},N=class extends Error{constructor(t){super(`Tracked change not found: id=${t}`),this.name="ChangeNotFoundError";}},z=class extends Error{constructor(t,r,n){super(`Tracked change id=${t} lives inside a ${r} (noteId=${n}); accept/reject operate on the document body only and cannot yet mutate ${r} changes. Surfaced for discovery via getChanges({ include${r==="footnote"?"Footnotes":"Endnotes"}: true }).`),this.name="NoteChangeNotEditableError";}},R=class extends Error{constructor(t){super(`Comment not found: id=${t}`),this.name="CommentNotFoundError";}};function J(o){let t=[],r=0;for(let n=0;n<o.content.length;n++){let a=o.content[n];if(a.type==="run"){let e=H$1(a);t.push({contentIndex:n,run:a,text:e,startPos:r}),r+=e.length;}else if(a.type==="hyperlink")for(let e=0;e<a.children.length;e++){let i=a.children[e];if(i.type==="run"){let s=H$1(i);t.push({contentIndex:n,run:i,text:s,startPos:r}),r+=s.length;}}else if(m(a)){if(a.type==="insertion"||a.type==="moveTo")continue;for(let e=0;e<a.content.length;e++){let i=a.content[e];if(i.type==="run"){let s=H$1(i);t.push({contentIndex:n,run:i,text:s,startPos:r}),r+=s.length;}else if(i.type==="hyperlink"){for(let s of i.children)if(s.type==="run"){let c=H$1(s);t.push({contentIndex:n,run:s,text:c,startPos:r}),r+=c.length;}}}}}return t}function w(o){return J(o).map(t=>t.text).join("")}function ne(o,t,r){let n=J(o),a=n.map(u=>u.text).join(""),e=oe(a,t);if(!e)throw new C(t,r);let i=-1,s=0;for(let u=0;u<n.length;u++)if(e.start<n[u].startPos+n[u].text.length){i=u,s=e.start-n[u].startPos;break}let c=-1,l=0;for(let u=n.length-1;u>=0;u--)if(e.end>n[u].startPos){c=u,l=e.end-n[u].startPos;break}if(i===-1||c===-1)throw new C(t,r);return {startRunIndex:n[i].contentIndex,startOffset:s,endRunIndex:n[c].contentIndex,endOffset:l}}function Ie(o,t,r){let n=ne(o,t,r),{startRunIndex:a,endRunIndex:e}=n,{startOffset:i,endOffset:s}=n,c=o.content[e];if(c.type==="run"){let u=H$1(c);if(s<u.length){let f=W(u.slice(s),c);G(c,u.slice(0,s)),o.content.splice(e+1,0,f);}}let l=o.content[a];if(l.type==="run"&&i>0){let u=H$1(l),f=W(u.slice(0,i),l);G(l,u.slice(i)),o.content.splice(a,0,f),a++,e++;}return {startIndex:a,endIndex:e}}function W(o,t){return {type:"run",content:[{type:"text",text:o}],formatting:t.formatting?{...t.formatting}:void 0}}function G(o,t){let r=o.content.find(n=>n.type==="text");r&&(r.text=t);}function U(o){let t=[],r=[],n=true;for(let a=0;a<o.length;a++){let e=o[a];if(!"\u200B\u200C\u200D\uFEFF\xAD".includes(e)){if("\u201C\u201D\u201E\u201F".includes(e)&&(e='"'),"\u2018\u2019\u201A\u201B".includes(e)&&(e="'"),"\u2013\u2014\u2012\u2015".includes(e)&&(e="-"),e==="\u2026"){t.push(".",".","."),r.push(a,a,a),n=false;continue}if(/\s/.test(e)||e==="\xA0"){n||(t.push(" "),r.push(a),n=true);continue}t.push(e.toLowerCase()),r.push(a),n=false;}}return t.length>0&&t[t.length-1]===" "&&(t.pop(),r.pop()),{text:t.join(""),posMap:r}}function X(o,t,r,n){let a=o.posMap[t],e=o.posMap[t+r-1]+1;for(;e<n.length&&"\u200B\u200C\u200D\uFEFF\xAD".includes(n[e]);)e++;return {start:a,end:e}}function oe(o,t){if(!t||!o)return null;let r=o.indexOf(t);if(r!==-1)return {start:r,end:r+t.length};let n=U(o),a=U(t);if(!a.text)return null;let e=n.text.indexOf(a.text);if(e!==-1)return X(n,e,a.text.length,o);let i=a.text.split(" ");if(i.length>=3)for(let s=1;s<=Math.min(2,i.length-2);s++){let c=i.slice(0,-s).join(" "),l=n.text.indexOf(c);if(l!==-1)return X(n,l,c.length,o)}return null}function ke(o,t,r){let n=new Map,a=(i,s,c)=>{let l=null;for(let u of i.content)if(m(u)){l===null&&(l=w(i));let f=b(u.content),d=u.info.id,x=`${c.noteType??"body"}:${c.noteId??""}:${d}`,h=n.get(x);h&&h.paragraphIndex===s?h.text+=f:n.set(x,{id:d,type:u.type,author:u.info.author,date:u.info.date??null,text:f,context:l,paragraphIndex:s,...c.noteId!==void 0?{noteId:c.noteId}:{},...c.noteType!==void 0?{noteType:c.noteType}:{}});}};if(F(o,(i,s)=>a(i,s,{})),t?.includeFootnotes&&r?.footnotes)for(let i of r.footnotes)k(i,(s,c)=>a(s,c,{noteId:i.id,noteType:"footnote"}));if(t?.includeEndnotes&&r?.endnotes)for(let i of r.endnotes)k(i,(s,c)=>a(s,c,{noteId:i.id,noteType:"endnote"}));return Array.from(n.values()).filter(i=>!(t?.author&&i.author!==t.author||t?.type&&i.type!==t.type))}function we(o,t){let r=o.comments??[];if(r.length===0)return [];let n=re(o),a=[],e=new Map;for(let s of r)if(s.parentId!==void 0){let c=e.get(s.parentId)??[];c.push(s),e.set(s.parentId,c);}else a.push(s);return a.map(s=>{let c=n.get(s.id),l=(e.get(s.id)??[]).map(u=>({id:u.id,author:u.author,date:u.date??null,text:K(u)}));return {id:s.id,author:s.author,date:s.date??null,text:K(s),anchoredText:c?.text??"",paragraphIndex:c?.paragraphIndex??-1,replies:l,done:s.done??false}}).filter(s=>!(t?.author&&s.author!==t.author||t?.done!==void 0&&s.done!==t.done))}function K(o){return o.content.map(t=>w(t)).join(`
|
|
5
|
-
`)}function re(o){let t=new Map,r=new Map;return F(o,(n,a)=>{for(let e of n.content)if(e.type==="commentRangeStart")r.set(e.id,{paragraphIndex:a,parts:[]});else if(e.type==="commentRangeEnd"){let i=r.get(e.id);i&&(t.set(e.id,{text:i.parts.join(""),paragraphIndex:i.paragraphIndex}),r.delete(e.id));}else if(e.type==="run"){let i=H$1(e);for(let s of r.values())s.parts.push(i);}else if(e.type==="hyperlink"){let i=e.children.filter(s=>s.type==="run").map(H$1).join("");for(let s of r.values())s.parts.push(i);}else if(m(e)){if(e.type==="insertion"||e.type==="moveTo")continue;let i=b(e.content);for(let s of r.values())s.parts.push(i);}}),t}function ae(o){let t=o.toDocument().package?.document;if(!t)return new Map;let r=new Map,n=0;for(let a of t.content)if(a.type==="paragraph"){let e=a.paraId;r.set(e??String(n),n),n++;}else if(a.type==="table")for(let e of a.rows)for(let i of e.cells)for(let s of i.content)s.type==="paragraph"&&n++;else n++;return r}function ie(o){let t=[],r=n=>{for(let a of n.content)a.type==="text"&&t.push(a.text??"");};for(let n of o.content)if(n.type==="run")r(n);else if(n.type==="hyperlink")for(let a of n.children)a.type==="run"&&r(a);else if(n.type==="deletion"||n.type==="moveFrom"){for(let a of n.content)if(a.type==="run")r(a);else if(a.type==="hyperlink")for(let e of a.children)e.type==="run"&&r(e);}return t.join("")}function B(o,t){let n={type:"run",content:[{type:"text",text:t,preserveSpace:/^\s|\s$/.test(t)}]};return o.formatting&&(n.formatting={...o.formatting}),o.propertyChanges&&(n.propertyChanges=[...o.propertyChanges]),n}function se(o){return o.content.map(t=>t.type==="text"?t.text:"").join("")}function M(o,t,r,n,a){let e=se(o);if(!e)return;let i=a.value,s=i+e.length;n.push({run:o,parent:t,index:r,text:e,start:i,end:s}),a.value=s;}function Q(o,t,r){o.children.forEach((n,a)=>{n.type==="run"&&M(n,o.children,a,t,r);});}function S(o,t){let r=[],n={value:0};return o.content.forEach((a,e)=>{a.type==="run"?M(a,o.content,e,r,n):a.type==="hyperlink"?Q(a,r,n):(a.type==="deletion"||a.type==="moveFrom"||t&&(a.type==="insertion"||a.type==="moveTo"))&&a.content.forEach((i,s)=>{i.type==="run"?M(i,a.content,s,r,n):i.type==="hyperlink"&&Q(i,r,n);});}),r}function ce(o,t){let r={...o??{}};t.bold!==void 0&&(r.bold=t.bold||void 0),t.italic!==void 0&&(r.italic=t.italic||void 0),t.underline!==void 0&&(t.underline?r.underline={style:typeof t.underline=="object"&&t.underline.style?t.underline.style:"single"}:delete r.underline),t.strike!==void 0&&(r.strike=t.strike||void 0),t.color!==void 0&&(t.color&&(t.color.rgb||t.color.themeColor)?r.color={rgb:t.color.rgb,themeColor:t.color.themeColor}:delete r.color),t.highlight!==void 0&&(t.highlight?r.highlight=va(t.highlight)||t.highlight:delete r.highlight),t.fontSize!==void 0&&(t.fontSize>0?r.fontSize=m$1(t.fontSize):delete r.fontSize),t.fontFamily!==void 0&&(t.fontFamily&&(t.fontFamily.ascii||t.fontFamily.hAnsi)?r.fontFamily={ascii:t.fontFamily.ascii,hAnsi:t.fontFamily.hAnsi??t.fontFamily.ascii}:delete r.fontFamily);for(let n of Object.keys(r))r[n]===void 0&&delete r[n];return Object.keys(r).length>0?r:void 0}function $(o,t){o.formatting=ce(o.formatting,t);}function ue(o,t,r,n){let a=o.run.content.every(s=>s.type==="text");if(t<=0&&r>=o.text.length||!a){$(o.run,n);return}let e=[];t>0&&e.push(B(o.run,o.text.slice(0,t)));let i=B(o.run,o.text.slice(t,r));$(i,n),e.push(i),r<o.text.length&&e.push(B(o.run,o.text.slice(r))),o.parent.splice(o.index,1,...e);}function le(o,t,r,n){let e=S(o,false).filter(i=>i.start<r&&i.end>t);if(e.length===0)return true;for(let i=e.length-1;i>=0;i--){let s=e[i];ue(s,Math.max(0,t-s.start),Math.min(s.text.length,r-s.start),n);}return true}function fe(o,t){let r=S(o,true);for(let n of r)$(n.run,t);return true}function pe(o,t){if(!t)return null;let n=S(o,false).map(e=>e.text).join(""),a=n.indexOf(t);return a===-1||n.indexOf(t,a+1)!==-1?null:{from:a,to:a+t.length}}function de(o,t){return o?!!o.styles?.some(r=>r.styleId===t&&r.type==="paragraph"):true}function Ee(o){let t=new Set,r=null;function n(){return r===null&&(r=ae(o)),r}function a(){if(t.size===0)return;let e=o.getComments(),i=o.getChanges(),s={commentCount:e.length,changeCount:i.length,comments:e,changes:i};for(let c of t)try{c(s);}catch(l){console.error("reviewerBridge content listener threw:",l);}}return {getContentAsText(e){return o.getContentAsText(e)},getContent(e){return o.getContent(e)},getComments(e){return o.getComments(e)},getChanges(e){return o.getChanges(e)},findText(e,i){if(!e)return [];let s=i?.caseSensitive??false,c=i?.limit??20,l=s?e:e.toLowerCase(),u=o.toDocument().package?.document;if(!u)return [];let f=[],d=40,x=0;for(let h of u.content){if(f.length>=c)break;if(h.type==="table"){for(let Z of h.rows)for(let _ of Z.cells)for(let q of _.content)q.type==="paragraph"&&x++;continue}if(h.type!=="paragraph"){x++;continue}let E=h,V=x++,y=ie(E),D=s?y:y.toLowerCase(),g=D.indexOf(l);if(g===-1||D.indexOf(l,g+1)!==-1)continue;let Y=y.slice(g,g+e.length);f.push({paraId:E.paraId??String(V),match:Y,before:y.slice(Math.max(0,g-d),g),after:y.slice(g+e.length,g+e.length+d)});}return f},getSelection(){return null},addComment(e){let i=n().get(e.paraId);if(i===void 0)return null;try{let s=o.addComment({paragraphIndex:i,text:e.text,author:e.author,search:e.search});return a(),s}catch{return null}},replyTo(e,i){try{let s=o.replyTo(e,i);return a(),s}catch{return null}},resolveComment(e){let s=o.toDocument().package?.document?.comments?.find(c=>c.id===e);if(!s)throw new R(e);s.done=true,a();},proposeChange(e){let i=n().get(e.paraId);if(i===void 0)return false;let s=e.search==="",c=e.replaceWith==="";if(s&&c)return false;try{return s?o.proposeInsertion({paragraphIndex:i,insertText:e.replaceWith,author:e.author}):c?o.proposeDeletion({paragraphIndex:i,search:e.search,author:e.author}):o.replace({paragraphIndex:i,search:e.search,replaceWith:e.replaceWith,author:e.author}),a(),true}catch{return false}},scrollTo(e){return n().has(e)},applyFormatting(e){let i=n().get(e.paraId);if(i===void 0)return false;let s=o.toDocument().package?.document;if(!s)return false;try{let c=s?v(s,i):null;if(!c)return false;if(e.search){let l=pe(c,e.search);if(!l)return false;le(c,l.from,l.to,e.marks);}else fe(c,e.marks);return a(),true}catch{return false}},setParagraphStyle(e){let i=n().get(e.paraId);if(i===void 0)return false;let s=o.toDocument(),c=s.package?.document;if(!c||!de(s.package?.styles,e.styleId))return false;try{let l=v(c,i);return l.formatting={...l.formatting??{},styleId:e.styleId},a(),true}catch{return false}},getPage(){return null},getPages(){return []},getTotalPages(){return 0},getCurrentPage(){return 0},onContentChange(e){return t.add(e),()=>{t.delete(e);}},onSelectionChange(){return ()=>{}}}}export{m as a,v as b,F as c,xe as d,ye as e,C as f,N as g,z as h,R as i,ne as j,Ie as k,ke as l,we as m,Ee as n};
|
package/dist/chunk-XUAUDUJU.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
'use strict';var chunk4W7OEW2I_js=require('./chunk-4W7OEW2I.js'),chunkEPRXZTIE_js=require('./chunk-EPRXZTIE.js');function m(o){return o.type==="insertion"||o.type==="deletion"||o.type==="moveFrom"||o.type==="moveTo"}function b(o){let t=[];for(let r of o)r.type==="run"?t.push(chunk4W7OEW2I_js.H(r)):r.type==="hyperlink"&&t.push(chunk4W7OEW2I_js.I(r));return t.join("")}function v(o,t){let r=0;for(let n of o.content)if(n.type==="paragraph"){if(r===t)return n;r++;}else if(n.type==="table"){for(let a of n.rows)for(let e of a.cells)for(let i of e.content)if(i.type==="paragraph"){if(r===t)return i;r++;}}else r++;throw new Error(`Paragraph index ${t} out of bounds (max: ${r-1})`)}function L(o,t,r){let n=0;for(let a of o)if(a.type==="paragraph"){if(r(a,n)===false)return;n++;}else if(a.type==="table"){for(let e of a.rows)for(let i of e.cells)for(let s of i.content)if(s.type==="paragraph"){if(r(s,n)===false)return;n++;}}else t&&n++;}function F(o,t){L(o.content,true,t);}function k(o,t){L(o.content,false,t);}function xe(o,t={}){let{fromIndex:r,toIndex:n,includeTrackedChanges:a=true,includeCommentAnchors:e=true}=t,i=[],s=0;for(let c of o.content)if(c.type==="paragraph")j(s,r,n)&&i.push(ee(c,s,a,e)),s++;else if(c.type==="table"){j(s,r,n)&&i.push(te(c,s,a,e));for(let l of c.rows)for(let u of l.cells)for(let f of u.content)f.type==="paragraph"&&s++;}else s++;return i}function j(o,t,r){return (t===void 0||o>=t)&&(r===void 0||o<=r)}function ee(o,t,r,n){let a=H(o,r,n),e=o.formatting?.styleId,i=o.paraId;return chunk4W7OEW2I_js.U(e)?{type:"heading",index:t,paraId:i,level:chunk4W7OEW2I_js.V(e)??1,text:a}:o.listRendering?{type:"list-item",index:t,paraId:i,text:a,listLevel:o.listRendering.level??0,listType:o.listRendering.isBullet?"bullet":"number"}:{type:"paragraph",index:t,paraId:i,text:a}}function te(o,t,r,n){let a=[],e=[];for(let i of o.rows){let s=[],c=[];for(let l of i.cells){let u=[],f;for(let d of l.content)d.type==="paragraph"&&(f===void 0&&(f=d.paraId),u.push(H(d,r,n)));s.push(u.join(`
|
|
2
|
-
`)),c.push(f);}a.push(s),e.push(c);}return {type:"table",index:t,rows:a,cellParaIds:e}}function ye(o){let t=[],r=n=>n.paraId?n.paraId:String(n.index);for(let n of o)switch(n.type){case "heading":t.push(`[${r(n)}] (h${n.level}) ${n.text}`);break;case "paragraph":t.push(`[${r(n)}] ${n.text}`);break;case "list-item":{let a=" ".repeat(n.listLevel),e=n.listType==="bullet"?"\u2022":"-";t.push(`[${r(n)}] ${a}${e} ${n.text}`);break}case "table":{let a=n.index;for(let e=0;e<n.rows.length;e++)for(let i=0;i<n.rows[e].length;i++){let c=n.rows[e][i].split(`
|
|
3
|
-
`),l=n.cellParaIds?.[e]?.[i];for(let u=0;u<c.length;u++){let f=u===0&&l?l:String(a);t.push(`[${f}] (table, row ${e+1}, col ${i+1}) ${c[u]}`),a++;}}break}}return t.join(`
|
|
4
|
-
`)}function H(o,t,r){let n=[],a=new Set;for(let e of o.content){if(e.type==="commentRangeStart"&&r){a.add(e.id),n.push(`[comment:${e.id}]`);continue}if(e.type==="commentRangeEnd"&&r){a.has(e.id)&&(a.delete(e.id),n.push("[/comment]"));continue}if(e.type==="run")n.push(chunk4W7OEW2I_js.H(e));else if(e.type==="hyperlink")n.push(chunk4W7OEW2I_js.I(e));else if(m(e)){let i=b(e.content);e.type==="insertion"||e.type==="moveTo"?t&&n.push(`[+${i}+]{by:${e.info.author}}`):t?n.push(`[-${i}-]{by:${e.info.author}}`):n.push(i);}}return n.join("")}var C=class extends Error{constructor(t,r){let n=r!==void 0?` in paragraph ${r}`:" in document";super(`Text not found${n}: "${t}"`),this.name="TextNotFoundError";}},N=class extends Error{constructor(t){super(`Tracked change not found: id=${t}`),this.name="ChangeNotFoundError";}},z=class extends Error{constructor(t,r,n){super(`Tracked change id=${t} lives inside a ${r} (noteId=${n}); accept/reject operate on the document body only and cannot yet mutate ${r} changes. Surfaced for discovery via getChanges({ include${r==="footnote"?"Footnotes":"Endnotes"}: true }).`),this.name="NoteChangeNotEditableError";}},R=class extends Error{constructor(t){super(`Comment not found: id=${t}`),this.name="CommentNotFoundError";}};function J(o){let t=[],r=0;for(let n=0;n<o.content.length;n++){let a=o.content[n];if(a.type==="run"){let e=chunk4W7OEW2I_js.H(a);t.push({contentIndex:n,run:a,text:e,startPos:r}),r+=e.length;}else if(a.type==="hyperlink")for(let e=0;e<a.children.length;e++){let i=a.children[e];if(i.type==="run"){let s=chunk4W7OEW2I_js.H(i);t.push({contentIndex:n,run:i,text:s,startPos:r}),r+=s.length;}}else if(m(a)){if(a.type==="insertion"||a.type==="moveTo")continue;for(let e=0;e<a.content.length;e++){let i=a.content[e];if(i.type==="run"){let s=chunk4W7OEW2I_js.H(i);t.push({contentIndex:n,run:i,text:s,startPos:r}),r+=s.length;}else if(i.type==="hyperlink"){for(let s of i.children)if(s.type==="run"){let c=chunk4W7OEW2I_js.H(s);t.push({contentIndex:n,run:s,text:c,startPos:r}),r+=c.length;}}}}}return t}function w(o){return J(o).map(t=>t.text).join("")}function ne(o,t,r){let n=J(o),a=n.map(u=>u.text).join(""),e=oe(a,t);if(!e)throw new C(t,r);let i=-1,s=0;for(let u=0;u<n.length;u++)if(e.start<n[u].startPos+n[u].text.length){i=u,s=e.start-n[u].startPos;break}let c=-1,l=0;for(let u=n.length-1;u>=0;u--)if(e.end>n[u].startPos){c=u,l=e.end-n[u].startPos;break}if(i===-1||c===-1)throw new C(t,r);return {startRunIndex:n[i].contentIndex,startOffset:s,endRunIndex:n[c].contentIndex,endOffset:l}}function Ie(o,t,r){let n=ne(o,t,r),{startRunIndex:a,endRunIndex:e}=n,{startOffset:i,endOffset:s}=n,c=o.content[e];if(c.type==="run"){let u=chunk4W7OEW2I_js.H(c);if(s<u.length){let f=W(u.slice(s),c);G(c,u.slice(0,s)),o.content.splice(e+1,0,f);}}let l=o.content[a];if(l.type==="run"&&i>0){let u=chunk4W7OEW2I_js.H(l),f=W(u.slice(0,i),l);G(l,u.slice(i)),o.content.splice(a,0,f),a++,e++;}return {startIndex:a,endIndex:e}}function W(o,t){return {type:"run",content:[{type:"text",text:o}],formatting:t.formatting?{...t.formatting}:void 0}}function G(o,t){let r=o.content.find(n=>n.type==="text");r&&(r.text=t);}function U(o){let t=[],r=[],n=true;for(let a=0;a<o.length;a++){let e=o[a];if(!"\u200B\u200C\u200D\uFEFF\xAD".includes(e)){if("\u201C\u201D\u201E\u201F".includes(e)&&(e='"'),"\u2018\u2019\u201A\u201B".includes(e)&&(e="'"),"\u2013\u2014\u2012\u2015".includes(e)&&(e="-"),e==="\u2026"){t.push(".",".","."),r.push(a,a,a),n=false;continue}if(/\s/.test(e)||e==="\xA0"){n||(t.push(" "),r.push(a),n=true);continue}t.push(e.toLowerCase()),r.push(a),n=false;}}return t.length>0&&t[t.length-1]===" "&&(t.pop(),r.pop()),{text:t.join(""),posMap:r}}function X(o,t,r,n){let a=o.posMap[t],e=o.posMap[t+r-1]+1;for(;e<n.length&&"\u200B\u200C\u200D\uFEFF\xAD".includes(n[e]);)e++;return {start:a,end:e}}function oe(o,t){if(!t||!o)return null;let r=o.indexOf(t);if(r!==-1)return {start:r,end:r+t.length};let n=U(o),a=U(t);if(!a.text)return null;let e=n.text.indexOf(a.text);if(e!==-1)return X(n,e,a.text.length,o);let i=a.text.split(" ");if(i.length>=3)for(let s=1;s<=Math.min(2,i.length-2);s++){let c=i.slice(0,-s).join(" "),l=n.text.indexOf(c);if(l!==-1)return X(n,l,c.length,o)}return null}function ke(o,t,r){let n=new Map,a=(i,s,c)=>{let l=null;for(let u of i.content)if(m(u)){l===null&&(l=w(i));let f=b(u.content),d=u.info.id,x=`${c.noteType??"body"}:${c.noteId??""}:${d}`,h=n.get(x);h&&h.paragraphIndex===s?h.text+=f:n.set(x,{id:d,type:u.type,author:u.info.author,date:u.info.date??null,text:f,context:l,paragraphIndex:s,...c.noteId!==void 0?{noteId:c.noteId}:{},...c.noteType!==void 0?{noteType:c.noteType}:{}});}};if(F(o,(i,s)=>a(i,s,{})),t?.includeFootnotes&&r?.footnotes)for(let i of r.footnotes)k(i,(s,c)=>a(s,c,{noteId:i.id,noteType:"footnote"}));if(t?.includeEndnotes&&r?.endnotes)for(let i of r.endnotes)k(i,(s,c)=>a(s,c,{noteId:i.id,noteType:"endnote"}));return Array.from(n.values()).filter(i=>!(t?.author&&i.author!==t.author||t?.type&&i.type!==t.type))}function we(o,t){let r=o.comments??[];if(r.length===0)return [];let n=re(o),a=[],e=new Map;for(let s of r)if(s.parentId!==void 0){let c=e.get(s.parentId)??[];c.push(s),e.set(s.parentId,c);}else a.push(s);return a.map(s=>{let c=n.get(s.id),l=(e.get(s.id)??[]).map(u=>({id:u.id,author:u.author,date:u.date??null,text:K(u)}));return {id:s.id,author:s.author,date:s.date??null,text:K(s),anchoredText:c?.text??"",paragraphIndex:c?.paragraphIndex??-1,replies:l,done:s.done??false}}).filter(s=>!(t?.author&&s.author!==t.author||t?.done!==void 0&&s.done!==t.done))}function K(o){return o.content.map(t=>w(t)).join(`
|
|
5
|
-
`)}function re(o){let t=new Map,r=new Map;return F(o,(n,a)=>{for(let e of n.content)if(e.type==="commentRangeStart")r.set(e.id,{paragraphIndex:a,parts:[]});else if(e.type==="commentRangeEnd"){let i=r.get(e.id);i&&(t.set(e.id,{text:i.parts.join(""),paragraphIndex:i.paragraphIndex}),r.delete(e.id));}else if(e.type==="run"){let i=chunk4W7OEW2I_js.H(e);for(let s of r.values())s.parts.push(i);}else if(e.type==="hyperlink"){let i=e.children.filter(s=>s.type==="run").map(chunk4W7OEW2I_js.H).join("");for(let s of r.values())s.parts.push(i);}else if(m(e)){if(e.type==="insertion"||e.type==="moveTo")continue;let i=b(e.content);for(let s of r.values())s.parts.push(i);}}),t}function ae(o){let t=o.toDocument().package?.document;if(!t)return new Map;let r=new Map,n=0;for(let a of t.content)if(a.type==="paragraph"){let e=a.paraId;r.set(e??String(n),n),n++;}else if(a.type==="table")for(let e of a.rows)for(let i of e.cells)for(let s of i.content)s.type==="paragraph"&&n++;else n++;return r}function ie(o){let t=[],r=n=>{for(let a of n.content)a.type==="text"&&t.push(a.text??"");};for(let n of o.content)if(n.type==="run")r(n);else if(n.type==="hyperlink")for(let a of n.children)a.type==="run"&&r(a);else if(n.type==="deletion"||n.type==="moveFrom"){for(let a of n.content)if(a.type==="run")r(a);else if(a.type==="hyperlink")for(let e of a.children)e.type==="run"&&r(e);}return t.join("")}function B(o,t){let n={type:"run",content:[{type:"text",text:t,preserveSpace:/^\s|\s$/.test(t)}]};return o.formatting&&(n.formatting={...o.formatting}),o.propertyChanges&&(n.propertyChanges=[...o.propertyChanges]),n}function se(o){return o.content.map(t=>t.type==="text"?t.text:"").join("")}function M(o,t,r,n,a){let e=se(o);if(!e)return;let i=a.value,s=i+e.length;n.push({run:o,parent:t,index:r,text:e,start:i,end:s}),a.value=s;}function Q(o,t,r){o.children.forEach((n,a)=>{n.type==="run"&&M(n,o.children,a,t,r);});}function S(o,t){let r=[],n={value:0};return o.content.forEach((a,e)=>{a.type==="run"?M(a,o.content,e,r,n):a.type==="hyperlink"?Q(a,r,n):(a.type==="deletion"||a.type==="moveFrom"||t&&(a.type==="insertion"||a.type==="moveTo"))&&a.content.forEach((i,s)=>{i.type==="run"?M(i,a.content,s,r,n):i.type==="hyperlink"&&Q(i,r,n);});}),r}function ce(o,t){let r={...o??{}};t.bold!==void 0&&(r.bold=t.bold||void 0),t.italic!==void 0&&(r.italic=t.italic||void 0),t.underline!==void 0&&(t.underline?r.underline={style:typeof t.underline=="object"&&t.underline.style?t.underline.style:"single"}:delete r.underline),t.strike!==void 0&&(r.strike=t.strike||void 0),t.color!==void 0&&(t.color&&(t.color.rgb||t.color.themeColor)?r.color={rgb:t.color.rgb,themeColor:t.color.themeColor}:delete r.color),t.highlight!==void 0&&(t.highlight?r.highlight=chunk4W7OEW2I_js.va(t.highlight)||t.highlight:delete r.highlight),t.fontSize!==void 0&&(t.fontSize>0?r.fontSize=chunkEPRXZTIE_js.m(t.fontSize):delete r.fontSize),t.fontFamily!==void 0&&(t.fontFamily&&(t.fontFamily.ascii||t.fontFamily.hAnsi)?r.fontFamily={ascii:t.fontFamily.ascii,hAnsi:t.fontFamily.hAnsi??t.fontFamily.ascii}:delete r.fontFamily);for(let n of Object.keys(r))r[n]===void 0&&delete r[n];return Object.keys(r).length>0?r:void 0}function $(o,t){o.formatting=ce(o.formatting,t);}function ue(o,t,r,n){let a=o.run.content.every(s=>s.type==="text");if(t<=0&&r>=o.text.length||!a){$(o.run,n);return}let e=[];t>0&&e.push(B(o.run,o.text.slice(0,t)));let i=B(o.run,o.text.slice(t,r));$(i,n),e.push(i),r<o.text.length&&e.push(B(o.run,o.text.slice(r))),o.parent.splice(o.index,1,...e);}function le(o,t,r,n){let e=S(o,false).filter(i=>i.start<r&&i.end>t);if(e.length===0)return true;for(let i=e.length-1;i>=0;i--){let s=e[i];ue(s,Math.max(0,t-s.start),Math.min(s.text.length,r-s.start),n);}return true}function fe(o,t){let r=S(o,true);for(let n of r)$(n.run,t);return true}function pe(o,t){if(!t)return null;let n=S(o,false).map(e=>e.text).join(""),a=n.indexOf(t);return a===-1||n.indexOf(t,a+1)!==-1?null:{from:a,to:a+t.length}}function de(o,t){return o?!!o.styles?.some(r=>r.styleId===t&&r.type==="paragraph"):true}function Ee(o){let t=new Set,r=null;function n(){return r===null&&(r=ae(o)),r}function a(){if(t.size===0)return;let e=o.getComments(),i=o.getChanges(),s={commentCount:e.length,changeCount:i.length,comments:e,changes:i};for(let c of t)try{c(s);}catch(l){console.error("reviewerBridge content listener threw:",l);}}return {getContentAsText(e){return o.getContentAsText(e)},getContent(e){return o.getContent(e)},getComments(e){return o.getComments(e)},getChanges(e){return o.getChanges(e)},findText(e,i){if(!e)return [];let s=i?.caseSensitive??false,c=i?.limit??20,l=s?e:e.toLowerCase(),u=o.toDocument().package?.document;if(!u)return [];let f=[],d=40,x=0;for(let h of u.content){if(f.length>=c)break;if(h.type==="table"){for(let Z of h.rows)for(let _ of Z.cells)for(let q of _.content)q.type==="paragraph"&&x++;continue}if(h.type!=="paragraph"){x++;continue}let E=h,V=x++,y=ie(E),D=s?y:y.toLowerCase(),g=D.indexOf(l);if(g===-1||D.indexOf(l,g+1)!==-1)continue;let Y=y.slice(g,g+e.length);f.push({paraId:E.paraId??String(V),match:Y,before:y.slice(Math.max(0,g-d),g),after:y.slice(g+e.length,g+e.length+d)});}return f},getSelection(){return null},addComment(e){let i=n().get(e.paraId);if(i===void 0)return null;try{let s=o.addComment({paragraphIndex:i,text:e.text,author:e.author,search:e.search});return a(),s}catch{return null}},replyTo(e,i){try{let s=o.replyTo(e,i);return a(),s}catch{return null}},resolveComment(e){let s=o.toDocument().package?.document?.comments?.find(c=>c.id===e);if(!s)throw new R(e);s.done=true,a();},proposeChange(e){let i=n().get(e.paraId);if(i===void 0)return false;let s=e.search==="",c=e.replaceWith==="";if(s&&c)return false;try{return s?o.proposeInsertion({paragraphIndex:i,insertText:e.replaceWith,author:e.author}):c?o.proposeDeletion({paragraphIndex:i,search:e.search,author:e.author}):o.replace({paragraphIndex:i,search:e.search,replaceWith:e.replaceWith,author:e.author}),a(),true}catch{return false}},scrollTo(e){return n().has(e)},applyFormatting(e){let i=n().get(e.paraId);if(i===void 0)return false;let s=o.toDocument().package?.document;if(!s)return false;try{let c=s?v(s,i):null;if(!c)return false;if(e.search){let l=pe(c,e.search);if(!l)return false;le(c,l.from,l.to,e.marks);}else fe(c,e.marks);return a(),true}catch{return false}},setParagraphStyle(e){let i=n().get(e.paraId);if(i===void 0)return false;let s=o.toDocument(),c=s.package?.document;if(!c||!de(s.package?.styles,e.styleId))return false;try{let l=v(c,i);return l.formatting={...l.formatting??{},styleId:e.styleId},a(),true}catch{return false}},getPage(){return null},getPages(){return []},getTotalPages(){return 0},getCurrentPage(){return 0},onContentChange(e){return t.add(e),()=>{t.delete(e);}},onSelectionChange(){return ()=>{}}}}exports.a=m;exports.b=v;exports.c=F;exports.d=xe;exports.e=ye;exports.f=C;exports.g=N;exports.h=z;exports.i=R;exports.j=ne;exports.k=Ie;exports.l=ke;exports.m=we;exports.n=Ee;
|
package/dist/chunk-YQIAKHOL.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {m,l,d,e}from'./chunk-P4DRISTP.mjs';function y(n){return !n||n.length===0?"":n.map(i=>{let s=i;return s?.content?s.content.map(e=>e.content?.map(t=>t.text||"").join("")||"").join(""):""}).join(`
|
|
2
|
-
`)}function u(n){let i=n.getEditorRef();if(i){let e=i.getDocument();if(e?.package?.document)return e.package.document}return n.getDocument()?.package?.document??null}function T(n,i="AI"){function s(e){return e??i}return {getContentAsText(e$1){let t=u(n);return t?e(d(t,e$1)):""},getContent(e){let t=u(n);return t?d(t,e):[]},getComments(e){let t=u(n);if(!t)return [];let r=m(t,e);if(r.length>0)return r;let l=n.getComments();if(l.length===0)return [];let a=new Map,g=[];for(let o of l)if(o.parentId){let c=a.get(o.parentId);c?c.push(o):a.set(o.parentId,[o]);}else g.push(o);let m$1=[];for(let o of g){if(e?.author&&o.author!==e.author||e?.done!==void 0&&(o.done??false)!==e.done)continue;let c=a.get(o.id)??[];m$1.push({id:o.id,author:o.author,date:o.date??null,text:y(o.content),anchoredText:"",paragraphIndex:-1,replies:c.map(p=>({id:p.id,author:p.author,date:p.date??null,text:y(p.content)})),done:o.done??false});}return m$1},getChanges(e){let t=u(n);return t?l(t,e):[]},findText(e,t){return n.findInDocument(e,t)},getSelection(){return n.getSelectionInfo()},addComment(e){return n.addComment({paraId:e.paraId,text:e.text,author:s(e.author),search:e.search})},replyTo(e,t){return n.replyToComment(e,t.text,s(t.author))},resolveComment(e){n.resolveComment(e);},proposeChange(e){return n.proposeChange({paraId:e.paraId,search:e.search,replaceWith:e.replaceWith,author:s(e.author)})},applyFormatting(e){return n.applyFormatting({paraId:e.paraId,search:e.search,marks:e.marks})},setParagraphStyle(e){return n.setParagraphStyle({paraId:e.paraId,styleId:e.styleId})},getPage(e){return n.getPageContent(e)},getPages(e){let t=n.getTotalPages(),r=Math.max(1,Math.min(e.from,t)),l=Math.max(r,Math.min(e.to,t)),a=[];for(let g=r;g<=l;g++){let m=n.getPageContent(g);m&&a.push(m);}return a},getTotalPages(){return n.getTotalPages()},getCurrentPage(){return n.getCurrentPage()},scrollTo(e){return n.scrollToParaId(e)},onContentChange(e){return n.onContentChange(()=>{let t=u(n),r=t?m(t):[],l$1=t?l(t):[];try{e({commentCount:r.length,changeCount:l$1.length,comments:r,changes:l$1});}catch(a){console.error("onContentChange listener threw:",a);}})},onSelectionChange(e){return n.onSelectionChange(()=>{try{e(n.getSelectionInfo());}catch(t){console.error("onSelectionChange listener threw:",t);}})}}}export{T as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';var chunk4W7OEW2I_js=require('./chunk-4W7OEW2I.js'),chunk4QRVKNI4_js=require('./chunk-4QRVKNI4.js'),chunkEPRXZTIE_js=require('./chunk-EPRXZTIE.js');Object.defineProperty(exports,"ContentControlBoundError",{enumerable:true,get:function(){return chunk4W7OEW2I_js.ga}});Object.defineProperty(exports,"ContentControlLockedError",{enumerable:true,get:function(){return chunk4W7OEW2I_js.ea}});Object.defineProperty(exports,"ContentControlNotFoundError",{enumerable:true,get:function(){return chunk4W7OEW2I_js.da}});Object.defineProperty(exports,"ContentControlTypeError",{enumerable:true,get:function(){return chunk4W7OEW2I_js.fa}});Object.defineProperty(exports,"ContentControlValueError",{enumerable:true,get:function(){return chunk4W7OEW2I_js.ja}});Object.defineProperty(exports,"DEFAULT_AI_ACTIONS",{enumerable:true,get:function(){return chunk4W7OEW2I_js.Qa}});Object.defineProperty(exports,"DocumentAgent",{enumerable:true,get:function(){return chunk4W7OEW2I_js.x}});Object.defineProperty(exports,"RepeatingSectionError",{enumerable:true,get:function(){return chunk4W7OEW2I_js.oa}});Object.defineProperty(exports,"VERSION",{enumerable:true,get:function(){return chunk4W7OEW2I_js.Sa}});Object.defineProperty(exports,"addRepeatingSectionItem",{enumerable:true,get:function(){return chunk4W7OEW2I_js.pa}});Object.defineProperty(exports,"attemptSelectiveSave",{enumerable:true,get:function(){return chunk4W7OEW2I_js.i}});Object.defineProperty(exports,"blendColors",{enumerable:true,get:function(){return chunk4W7OEW2I_js.Ha}});Object.defineProperty(exports,"buildExtendedSelectionContext",{enumerable:true,get:function(){return chunk4W7OEW2I_js.E}});Object.defineProperty(exports,"buildPatchedDocumentXml",{enumerable:true,get:function(){return chunk4W7OEW2I_js.h}});Object.defineProperty(exports,"buildSelectionContext",{enumerable:true,get:function(){return chunk4W7OEW2I_js.D}});Object.defineProperty(exports,"buildSelectionContextFromContext",{enumerable:true,get:function(){return chunk4W7OEW2I_js.B}});Object.defineProperty(exports,"colorsEqual",{enumerable:true,get:function(){return chunk4W7OEW2I_js.Ia}});Object.defineProperty(exports,"comparePositions",{enumerable:true,get:function(){return chunk4W7OEW2I_js.Na}});Object.defineProperty(exports,"countCharacters",{enumerable:true,get:function(){return chunk4W7OEW2I_js.M}});Object.defineProperty(exports,"countWords",{enumerable:true,get:function(){return chunk4W7OEW2I_js.L}});Object.defineProperty(exports,"createAgent",{enumerable:true,get:function(){return chunk4W7OEW2I_js.y}});Object.defineProperty(exports,"createAgentFromDocument",{enumerable:true,get:function(){return chunk4W7OEW2I_js.z}});Object.defineProperty(exports,"createCollapsedRange",{enumerable:true,get:function(){return chunk4W7OEW2I_js.Ka}});Object.defineProperty(exports,"createCommand",{enumerable:true,get:function(){return chunk4W7OEW2I_js.Ra}});Object.defineProperty(exports,"createDocumentWithText",{enumerable:true,get:function(){return chunk4W7OEW2I_js.ua}});Object.defineProperty(exports,"createDocx",{enumerable:true,get:function(){return chunk4W7OEW2I_js.f}});Object.defineProperty(exports,"createEmptyDocument",{enumerable:true,get:function(){return chunk4W7OEW2I_js.ta}});Object.defineProperty(exports,"createRange",{enumerable:true,get:function(){return chunk4W7OEW2I_js.La}});Object.defineProperty(exports,"createRgbColor",{enumerable:true,get:function(){return chunk4W7OEW2I_js.Ea}});Object.defineProperty(exports,"createThemeColor",{enumerable:true,get:function(){return chunk4W7OEW2I_js.Da}});Object.defineProperty(exports,"darkenColor",{enumerable:true,get:function(){return chunk4W7OEW2I_js.Fa}});Object.defineProperty(exports,"detectVariables",{enumerable:true,get:function(){return chunk4W7OEW2I_js.j}});Object.defineProperty(exports,"detectVariablesDetailed",{enumerable:true,get:function(){return chunk4W7OEW2I_js.k}});Object.defineProperty(exports,"detectVariablesInBody",{enumerable:true,get:function(){return chunk4W7OEW2I_js.l}});Object.defineProperty(exports,"detectVariablesInParagraph",{enumerable:true,get:function(){return chunk4W7OEW2I_js.m}});Object.defineProperty(exports,"documentHasVariables",{enumerable:true,get:function(){return chunk4W7OEW2I_js.v}});Object.defineProperty(exports,"extractVariablesFromText",{enumerable:true,get:function(){return chunk4W7OEW2I_js.n}});Object.defineProperty(exports,"findContentControl",{enumerable:true,get:function(){return chunk4W7OEW2I_js.ca}});Object.defineProperty(exports,"findContentControls",{enumerable:true,get:function(){return chunk4W7OEW2I_js.ba}});Object.defineProperty(exports,"formatSdtDate",{enumerable:true,get:function(){return chunk4W7OEW2I_js.ka}});Object.defineProperty(exports,"formatVariable",{enumerable:true,get:function(){return chunk4W7OEW2I_js.r}});Object.defineProperty(exports,"getActionDescription",{enumerable:true,get:function(){return chunk4W7OEW2I_js.Pa}});Object.defineProperty(exports,"getActionLabel",{enumerable:true,get:function(){return chunk4W7OEW2I_js.Oa}});Object.defineProperty(exports,"getAgentContext",{enumerable:true,get:function(){return chunk4W7OEW2I_js.A}});Object.defineProperty(exports,"getBlockIndexForParagraph",{enumerable:true,get:function(){return chunk4W7OEW2I_js.$}});Object.defineProperty(exports,"getBodyCharacterCount",{enumerable:true,get:function(){return chunk4W7OEW2I_js.O}});Object.defineProperty(exports,"getBodyText",{enumerable:true,get:function(){return chunk4W7OEW2I_js.K}});Object.defineProperty(exports,"getBodyWordCount",{enumerable:true,get:function(){return chunk4W7OEW2I_js.N}});Object.defineProperty(exports,"getContentControlText",{enumerable:true,get:function(){return chunk4W7OEW2I_js.aa}});Object.defineProperty(exports,"getContrastingColor",{enumerable:true,get:function(){return chunk4W7OEW2I_js.Ba}});Object.defineProperty(exports,"getDocumentSummary",{enumerable:true,get:function(){return chunk4W7OEW2I_js.C}});Object.defineProperty(exports,"getDocumentWatermark",{enumerable:true,get:function(){return chunk4W7OEW2I_js.ra}});Object.defineProperty(exports,"getFormattingAtPosition",{enumerable:true,get:function(){return chunk4W7OEW2I_js.R}});Object.defineProperty(exports,"getHyperlinkAtPosition",{enumerable:true,get:function(){return chunk4W7OEW2I_js.T}});Object.defineProperty(exports,"getHyperlinkText",{enumerable:true,get:function(){return chunk4W7OEW2I_js.I}});Object.defineProperty(exports,"getParagraphAtIndex",{enumerable:true,get:function(){return chunk4W7OEW2I_js._}});Object.defineProperty(exports,"getParagraphText",{enumerable:true,get:function(){return chunk4W7OEW2I_js.G}});Object.defineProperty(exports,"getParagraphs",{enumerable:true,get:function(){return chunk4W7OEW2I_js.Z}});Object.defineProperty(exports,"getRunText",{enumerable:true,get:function(){return chunk4W7OEW2I_js.H}});Object.defineProperty(exports,"getSelectionFormattingSummary",{enumerable:true,get:function(){return chunk4W7OEW2I_js.F}});Object.defineProperty(exports,"getTableText",{enumerable:true,get:function(){return chunk4W7OEW2I_js.J}});Object.defineProperty(exports,"getTextAfter",{enumerable:true,get:function(){return chunk4W7OEW2I_js.Q}});Object.defineProperty(exports,"getTextBefore",{enumerable:true,get:function(){return chunk4W7OEW2I_js.P}});Object.defineProperty(exports,"hasHyperlinks",{enumerable:true,get:function(){return chunk4W7OEW2I_js.X}});Object.defineProperty(exports,"hasImages",{enumerable:true,get:function(){return chunk4W7OEW2I_js.W}});Object.defineProperty(exports,"hasTables",{enumerable:true,get:function(){return chunk4W7OEW2I_js.Y}});Object.defineProperty(exports,"hasTemplateVariables",{enumerable:true,get:function(){return chunk4W7OEW2I_js.o}});Object.defineProperty(exports,"isBlack",{enumerable:true,get:function(){return chunk4W7OEW2I_js.za}});Object.defineProperty(exports,"isHeadingStyle",{enumerable:true,get:function(){return chunk4W7OEW2I_js.U}});Object.defineProperty(exports,"isPositionInHyperlink",{enumerable:true,get:function(){return chunk4W7OEW2I_js.S}});Object.defineProperty(exports,"isPositionInRange",{enumerable:true,get:function(){return chunk4W7OEW2I_js.Ma}});Object.defineProperty(exports,"isRepeatingSection",{enumerable:true,get:function(){return chunk4W7OEW2I_js.ma}});Object.defineProperty(exports,"isRepeatingSectionItem",{enumerable:true,get:function(){return chunk4W7OEW2I_js.na}});Object.defineProperty(exports,"isValidVariableName",{enumerable:true,get:function(){return chunk4W7OEW2I_js.p}});Object.defineProperty(exports,"isWhite",{enumerable:true,get:function(){return chunk4W7OEW2I_js.Aa}});Object.defineProperty(exports,"isZodSchema",{enumerable:true,get:function(){return chunk4W7OEW2I_js.Ja}});Object.defineProperty(exports,"lightenColor",{enumerable:true,get:function(){return chunk4W7OEW2I_js.Ga}});Object.defineProperty(exports,"mapHexToHighlightName",{enumerable:true,get:function(){return chunk4W7OEW2I_js.va}});Object.defineProperty(exports,"parseColorString",{enumerable:true,get:function(){return chunk4W7OEW2I_js.Ca}});Object.defineProperty(exports,"parseDocx",{enumerable:true,get:function(){return chunk4W7OEW2I_js.w}});Object.defineProperty(exports,"parseHeadingLevel",{enumerable:true,get:function(){return chunk4W7OEW2I_js.V}});Object.defineProperty(exports,"parseVariable",{enumerable:true,get:function(){return chunk4W7OEW2I_js.s}});Object.defineProperty(exports,"removeContentControl",{enumerable:true,get:function(){return chunk4W7OEW2I_js.ia}});Object.defineProperty(exports,"removeRepeatingSectionItem",{enumerable:true,get:function(){return chunk4W7OEW2I_js.qa}});Object.defineProperty(exports,"removeVariables",{enumerable:true,get:function(){return chunk4W7OEW2I_js.u}});Object.defineProperty(exports,"repackDocx",{enumerable:true,get:function(){return chunk4W7OEW2I_js.d}});Object.defineProperty(exports,"replaceVariables",{enumerable:true,get:function(){return chunk4W7OEW2I_js.t}});Object.defineProperty(exports,"resolveColor",{enumerable:true,get:function(){return chunk4W7OEW2I_js.wa}});Object.defineProperty(exports,"resolveHighlightColor",{enumerable:true,get:function(){return chunk4W7OEW2I_js.xa}});Object.defineProperty(exports,"resolveShadingColor",{enumerable:true,get:function(){return chunk4W7OEW2I_js.ya}});Object.defineProperty(exports,"sanitizeVariableName",{enumerable:true,get:function(){return chunk4W7OEW2I_js.q}});Object.defineProperty(exports,"serializeDocumentBody",{enumerable:true,get:function(){return chunk4W7OEW2I_js.b}});Object.defineProperty(exports,"serializeDocx",{enumerable:true,get:function(){return chunk4W7OEW2I_js.c}});Object.defineProperty(exports,"serializeSectionProperties",{enumerable:true,get:function(){return chunk4W7OEW2I_js.a}});Object.defineProperty(exports,"setContentControlContent",{enumerable:true,get:function(){return chunk4W7OEW2I_js.ha}});Object.defineProperty(exports,"setContentControlValue",{enumerable:true,get:function(){return chunk4W7OEW2I_js.la}});Object.defineProperty(exports,"setDocumentWatermark",{enumerable:true,get:function(){return chunk4W7OEW2I_js.sa}});Object.defineProperty(exports,"updateMultipleFiles",{enumerable:true,get:function(){return chunk4W7OEW2I_js.e}});Object.defineProperty(exports,"validatePatchSafety",{enumerable:true,get:function(){return chunk4W7OEW2I_js.g}});Object.defineProperty(exports,"createTemplateProcessor",{enumerable:true,get:function(){return chunk4QRVKNI4_js.j}});Object.defineProperty(exports,"getMissingVariables",{enumerable:true,get:function(){return chunk4QRVKNI4_js.g}});Object.defineProperty(exports,"getTemplateTags",{enumerable:true,get:function(){return chunk4QRVKNI4_js.e}});Object.defineProperty(exports,"previewTemplate",{enumerable:true,get:function(){return chunk4QRVKNI4_js.h}});Object.defineProperty(exports,"processTemplate",{enumerable:true,get:function(){return chunk4QRVKNI4_js.a}});Object.defineProperty(exports,"processTemplateAdvanced",{enumerable:true,get:function(){return chunk4QRVKNI4_js.i}});Object.defineProperty(exports,"processTemplateAsBlob",{enumerable:true,get:function(){return chunk4QRVKNI4_js.c}});Object.defineProperty(exports,"processTemplateDetailed",{enumerable:true,get:function(){return chunk4QRVKNI4_js.b}});Object.defineProperty(exports,"validateTemplate",{enumerable:true,get:function(){return chunk4QRVKNI4_js.f}});Object.defineProperty(exports,"PluginRegistry",{enumerable:true,get:function(){return chunkEPRXZTIE_js.a}});Object.defineProperty(exports,"createPluginRegistrar",{enumerable:true,get:function(){return chunkEPRXZTIE_js.d}});Object.defineProperty(exports,"emuToPixels",{enumerable:true,get:function(){return chunkEPRXZTIE_js.g}});Object.defineProperty(exports,"emuToTwips",{enumerable:true,get:function(){return chunkEPRXZTIE_js.i}});Object.defineProperty(exports,"executeCommand",{enumerable:true,get:function(){return chunkEPRXZTIE_js.o}});Object.defineProperty(exports,"executeCommands",{enumerable:true,get:function(){return chunkEPRXZTIE_js.p}});Object.defineProperty(exports,"formatPx",{enumerable:true,get:function(){return chunkEPRXZTIE_js.n}});Object.defineProperty(exports,"halfPointsToPixels",{enumerable:true,get:function(){return chunkEPRXZTIE_js.l}});Object.defineProperty(exports,"pixelsToEmu",{enumerable:true,get:function(){return chunkEPRXZTIE_js.h}});Object.defineProperty(exports,"pixelsToTwips",{enumerable:true,get:function(){return chunkEPRXZTIE_js.f}});Object.defineProperty(exports,"pluginRegistry",{enumerable:true,get:function(){return chunkEPRXZTIE_js.b}});Object.defineProperty(exports,"pointsToHalfPoints",{enumerable:true,get:function(){return chunkEPRXZTIE_js.m}});Object.defineProperty(exports,"pointsToPixels",{enumerable:true,get:function(){return chunkEPRXZTIE_js.k}});Object.defineProperty(exports,"registerPlugins",{enumerable:true,get:function(){return chunkEPRXZTIE_js.c}});Object.defineProperty(exports,"twipsToEmu",{enumerable:true,get:function(){return chunkEPRXZTIE_js.j}});Object.defineProperty(exports,"twipsToPixels",{enumerable:true,get:function(){return chunkEPRXZTIE_js.e}});
|