@eigenpal/docx-editor-core 1.6.0 → 1.6.1
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/agent/index.d.mts +3 -3
- package/dist/agent/index.d.ts +3 -3
- package/dist/agent/index.js +1 -1
- package/dist/agent/index.mjs +1 -1
- package/dist/chunk-47SKD7QB.mjs +4 -0
- package/dist/{chunk-CDGV7CLS.js → chunk-4HNEXEGS.js} +1 -1
- package/dist/chunk-4U2S3WV2.js +1 -0
- package/dist/{chunk-C57BOE7B.mjs → chunk-5EP47PMQ.mjs} +1 -1
- package/dist/chunk-7EU6E64E.mjs +1 -0
- package/dist/{chunk-E7UN3PVC.mjs → chunk-A7C3DGQA.mjs} +1 -1
- package/dist/chunk-BMP2OSXE.js +1 -0
- package/dist/{chunk-2KUOYHXX.js → chunk-DEQFU56O.js} +1 -1
- package/dist/chunk-DFDL337G.js +4 -0
- package/dist/chunk-DKUHG27E.js +1 -0
- package/dist/{chunk-NY36MZ55.mjs → chunk-DU5TWD2W.mjs} +1 -1
- package/dist/chunk-DUVSDFRG.js +2 -0
- package/dist/{chunk-CWPIXUU2.js → chunk-DUXHJ6QP.js} +1 -1
- package/dist/chunk-HQ76VZAN.mjs +1 -0
- package/dist/{chunk-5JULVEYK.mjs → chunk-ICNIAAH7.mjs} +1 -1
- package/dist/{chunk-F44XU6G5.js → chunk-K7NSOCSY.js} +1 -1
- package/dist/{chunk-RGHRXIIZ.js → chunk-KEDY4GFG.js} +2 -2
- package/dist/{chunk-WEQA5PPW.mjs → chunk-KPWWI5UW.mjs} +1 -1
- package/dist/chunk-NKIDBERV.js +1 -0
- package/dist/chunk-NN2EJIO7.mjs +1 -0
- package/dist/{chunk-YMXWLXVF.mjs → chunk-O4RCQNUW.mjs} +1 -1
- package/dist/chunk-O5L4BZCZ.mjs +1 -0
- package/dist/chunk-OSTMAXZZ.mjs +1 -0
- package/dist/{chunk-XTPT4TNP.mjs → chunk-OWGY46IW.mjs} +1 -1
- package/dist/chunk-PGWY6UFK.js +1 -0
- package/dist/{chunk-T3UP6LF5.js → chunk-PM4KDJJ2.js} +1 -1
- package/dist/{chunk-6AGU57TL.mjs → chunk-QCPISGPW.mjs} +1 -1
- package/dist/{chunk-WQJWT4RB.mjs → chunk-QRBFMR7Z.mjs} +1 -1
- package/dist/chunk-SHZOAUHB.mjs +1 -0
- package/dist/chunk-TT3ILFZC.js +1 -0
- package/dist/chunk-TXAB4I4M.mjs +2 -0
- package/dist/{chunk-BBJMUBTD.mjs → chunk-VMBCUUZM.mjs} +1 -1
- package/dist/{chunk-7UMOUKSF.js → chunk-WTIN6QHX.js} +1 -1
- package/dist/{chunk-V3NE7Q22.js → chunk-WVY2UXAK.js} +1 -1
- package/dist/{chunk-EJ2JAYRI.js → chunk-XCTYXYEU.js} +1 -1
- package/dist/{chunk-2ZTKTE7P.js → chunk-XCXQWCV2.js} +1 -1
- package/dist/{chunk-KSW6W2EK.mjs → chunk-YSBX4LFA.mjs} +1 -1
- package/dist/{chunk-DX5XU6JN.js → chunk-YUHOVME2.js} +1 -1
- package/dist/{content-CbBCrsr0.d.mts → content-BEFz1zcs.d.mts} +1 -1
- package/dist/{content-BebvPfXc.d.ts → content-DNcMlHU0.d.ts} +1 -1
- package/dist/{contentControlValues-Com1GnZS.d.ts → contentControlValues-2pV4M4kG.d.ts} +1 -1
- package/dist/{contentControlValues-DVJyudKU.d.mts → contentControlValues-CKWIIkkr.d.mts} +1 -1
- package/dist/core-plugins.d.mts +1 -1
- package/dist/core-plugins.d.ts +1 -1
- package/dist/core-plugins.js +1 -1
- package/dist/core-plugins.mjs +1 -1
- package/dist/core.d.mts +6 -6
- package/dist/core.d.ts +6 -6
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/docx/index.d.mts +1 -1
- package/dist/docx/index.d.ts +1 -1
- package/dist/docx/index.js +1 -1
- package/dist/docx/index.mjs +1 -1
- package/dist/docx/parser.d.mts +1 -1
- package/dist/docx/parser.d.ts +1 -1
- package/dist/docx/parser.js +1 -1
- package/dist/docx/parser.mjs +1 -1
- package/dist/docx/rezip.d.mts +1 -1
- package/dist/docx/rezip.d.ts +1 -1
- package/dist/docx/serializer/index.d.mts +2 -2
- package/dist/docx/serializer/index.d.ts +2 -2
- package/dist/editor/index.d.mts +1 -1
- package/dist/editor/index.d.ts +1 -1
- package/dist/editor/index.js +1 -1
- package/dist/editor/index.mjs +1 -1
- package/dist/{fontLoader-D9SBYuZZ.d.ts → fontLoader-CH12AtFF.d.ts} +1 -1
- package/dist/{fontLoader-B4uFKpAy.d.mts → fontLoader-D3X2Qgb_.d.mts} +1 -1
- package/dist/{headerFooterLayout-CtVsfqxQ.d.ts → headerFooterLayout-BdGTU0IA.d.ts} +31 -16
- package/dist/{headerFooterLayout-D2LZLkDC.d.mts → headerFooterLayout-D5-u-IsD.d.mts} +31 -16
- package/dist/headless.d.mts +4 -4
- package/dist/headless.d.ts +4 -4
- package/dist/headless.js +1 -1
- package/dist/headless.mjs +1 -1
- package/dist/layout-bridge/index.d.mts +2 -2
- package/dist/layout-bridge/index.d.ts +2 -2
- package/dist/layout-bridge/index.js +1 -1
- package/dist/layout-bridge/index.mjs +1 -1
- package/dist/layout-bridge/measuring/index.d.mts +1 -1
- package/dist/layout-bridge/measuring/index.d.ts +1 -1
- package/dist/layout-bridge/measuring/index.js +1 -1
- package/dist/layout-bridge/measuring/index.mjs +1 -1
- package/dist/layout-bridge/tableInsertHover.js +1 -1
- package/dist/layout-bridge/tableInsertHover.mjs +1 -1
- package/dist/layout-bridge/toFlowBlocks.d.mts +1 -1
- package/dist/layout-bridge/toFlowBlocks.d.ts +1 -1
- package/dist/layout-bridge/toFlowBlocks.js +1 -1
- package/dist/layout-bridge/toFlowBlocks.mjs +1 -1
- package/dist/layout-engine/index.d.mts +1 -1
- package/dist/layout-engine/index.d.ts +1 -1
- package/dist/layout-engine/index.js +1 -1
- package/dist/layout-engine/index.mjs +1 -1
- package/dist/layout-engine/types.d.mts +1 -1
- package/dist/layout-engine/types.d.ts +1 -1
- package/dist/layout-painter/index.d.mts +2 -2
- package/dist/layout-painter/index.d.ts +2 -2
- package/dist/layout-painter/index.js +1 -1
- package/dist/layout-painter/index.mjs +1 -1
- package/dist/layout-painter/renderPage.d.mts +2 -2
- package/dist/layout-painter/renderPage.d.ts +2 -2
- package/dist/layout-painter/renderPage.js +1 -1
- package/dist/layout-painter/renderPage.mjs +1 -1
- package/dist/managers/AutoSaveManager.d.mts +1 -1
- package/dist/managers/AutoSaveManager.d.ts +1 -1
- package/dist/managers/TableSelectionManager.d.mts +1 -1
- package/dist/managers/TableSelectionManager.d.ts +1 -1
- package/dist/managers/types.d.mts +1 -1
- package/dist/managers/types.d.ts +1 -1
- package/dist/mcp-cli.mjs +23 -23
- package/dist/mcp.d.mts +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/mcp.js +2 -2
- package/dist/mcp.mjs +1 -1
- package/dist/{nodes-BvO8GGD4.d.mts → nodes-5w_QaI3g.d.mts} +13 -1
- package/dist/{nodes-Bd6tTkp0.d.ts → nodes-qQdZtu3Z.d.ts} +13 -1
- package/dist/prosemirror/applyFormatting.js +1 -1
- package/dist/prosemirror/applyFormatting.mjs +1 -1
- package/dist/prosemirror/commands/formatting.js +1 -1
- package/dist/prosemirror/commands/formatting.mjs +1 -1
- package/dist/prosemirror/commands/index.js +1 -1
- package/dist/prosemirror/commands/index.mjs +1 -1
- package/dist/prosemirror/commands/paragraph.js +1 -1
- package/dist/prosemirror/commands/paragraph.mjs +1 -1
- package/dist/prosemirror/commentIdAllocator.d.mts +1 -1
- package/dist/prosemirror/commentIdAllocator.d.ts +1 -1
- package/dist/prosemirror/commentOps.d.mts +1 -1
- package/dist/prosemirror/commentOps.d.ts +1 -1
- package/dist/prosemirror/conversion/fromProseDoc.d.mts +1 -1
- package/dist/prosemirror/conversion/fromProseDoc.d.ts +1 -1
- package/dist/prosemirror/conversion/fromProseDoc.js +1 -1
- package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -1
- package/dist/prosemirror/conversion/index.d.mts +1 -1
- package/dist/prosemirror/conversion/index.d.ts +1 -1
- package/dist/prosemirror/conversion/index.js +1 -1
- package/dist/prosemirror/conversion/index.mjs +1 -1
- package/dist/prosemirror/extensions/index.js +1 -1
- package/dist/prosemirror/extensions/index.mjs +1 -1
- package/dist/prosemirror/index.d.mts +3 -3
- package/dist/prosemirror/index.d.ts +3 -3
- package/dist/prosemirror/index.js +2 -2
- package/dist/prosemirror/index.mjs +2 -2
- package/dist/prosemirror/plugins/index.d.mts +1 -1
- package/dist/prosemirror/plugins/index.d.ts +1 -1
- package/dist/prosemirror/queries.d.mts +1 -1
- package/dist/prosemirror/queries.d.ts +1 -1
- package/dist/prosemirror/schema/index.d.mts +2 -2
- package/dist/prosemirror/schema/index.d.ts +2 -2
- package/dist/prosemirror/schema/index.js +1 -1
- package/dist/prosemirror/schema/index.mjs +1 -1
- package/dist/prosemirror/utils/extractTrackedChanges.d.mts +1 -1
- package/dist/prosemirror/utils/extractTrackedChanges.d.ts +1 -1
- package/dist/{sectionPropertiesSerializer-CzgskSoA.d.ts → sectionPropertiesSerializer-BJSNK-Wl.d.ts} +1 -1
- package/dist/{sectionPropertiesSerializer-D3yI82iZ.d.mts → sectionPropertiesSerializer-DI3OIQ1j.d.mts} +1 -1
- package/dist/types/content.d.mts +1 -1
- package/dist/types/content.d.ts +1 -1
- package/dist/types/document.d.mts +2 -2
- package/dist/types/document.d.ts +2 -2
- package/dist/utils/comments.d.mts +1 -1
- package/dist/utils/comments.d.ts +1 -1
- package/dist/utils/index.d.mts +2 -2
- package/dist/utils/index.d.ts +2 -2
- package/dist/{variableDetector-D2-xDa2O.d.mts → variableDetector-7xBsshP0.d.mts} +1 -1
- package/dist/{variableDetector-d-PpDlNV.d.ts → variableDetector-Bv5Tm0D-.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-2KPOGFFR.js +0 -1
- package/dist/chunk-34DJT72K.js +0 -1
- package/dist/chunk-4QJEMD23.mjs +0 -4
- package/dist/chunk-4QSFBX26.mjs +0 -1
- package/dist/chunk-4SZAFWLV.mjs +0 -1
- package/dist/chunk-6KYOT4E7.js +0 -4
- package/dist/chunk-77X765ZO.js +0 -1
- package/dist/chunk-AXVWVIIN.js +0 -1
- package/dist/chunk-BKP5QMTS.js +0 -1
- package/dist/chunk-IM56AITE.mjs +0 -1
- package/dist/chunk-KK673XRZ.mjs +0 -1
- package/dist/chunk-M65C4SQJ.mjs +0 -2
- package/dist/chunk-NO6PIL32.mjs +0 -1
- package/dist/chunk-NTYJIOUE.js +0 -2
- package/dist/chunk-WCB25ESG.mjs +0 -1
- package/dist/chunk-WWG6PUWU.js +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
'use strict';require('../chunk-53VKL6CG.js');var chunk4GER4JLW_js=require('../chunk-4GER4JLW.js'),chunkI6PMX4BO_js=require('../chunk-I6PMX4BO.js'),chunkFO6IX2DB_js=require('../chunk-FO6IX2DB.js');require('../chunk-UQ6WNWXX.js');var
|
|
1
|
+
'use strict';require('../chunk-53VKL6CG.js');var chunk4GER4JLW_js=require('../chunk-4GER4JLW.js'),chunkI6PMX4BO_js=require('../chunk-I6PMX4BO.js'),chunkFO6IX2DB_js=require('../chunk-FO6IX2DB.js');require('../chunk-UQ6WNWXX.js');var chunkBMP2OSXE_js=require('../chunk-BMP2OSXE.js'),chunkDKUHG27E_js=require('../chunk-DKUHG27E.js'),chunkPGWY6UFK_js=require('../chunk-PGWY6UFK.js');require('../chunk-ISKTBM4L.js'),require('../chunk-JFZIXFRC.js'),require('../chunk-RQVHKDXK.js'),require('../chunk-LW5OFHSW.js'),require('../chunk-Z3LGMBJC.js');var chunkXCXQWCV2_js=require('../chunk-XCXQWCV2.js'),chunkGGPKPXON_js=require('../chunk-GGPKPXON.js');require('../chunk-4DCTKHS5.js');var chunkDEQFU56O_js=require('../chunk-DEQFU56O.js'),chunk4HNEXEGS_js=require('../chunk-4HNEXEGS.js');require('../chunk-2KHWHVTA.js'),require('../chunk-4272FQ2E.js');var chunk4U2S3WV2_js=require('../chunk-4U2S3WV2.js'),chunkDUVSDFRG_js=require('../chunk-DUVSDFRG.js');require('../chunk-Q2VALXEU.js'),require('../chunk-MZ7LW5CH.js'),require('../chunk-N3Y5BUKV.js');var chunkILPNMG7Q_js=require('../chunk-ILPNMG7Q.js'),chunk6LVPRTB6_js=require('../chunk-6LVPRTB6.js'),chunkLWH66Q7Q_js=require('../chunk-LWH66Q7Q.js'),chunkX6AICTHN_js=require('../chunk-X6AICTHN.js');require('../chunk-7HANRHHL.js'),require('../chunk-MJ5FQX7Q.js'),require('../chunk-C2BAPYGJ.js'),require('../chunk-BJSG6TEG.js'),require('../chunk-GSKMHXHG.js'),require('../chunk-H57LNDBH.js'),require('../chunk-3R7QHNI5.js'),require('../chunk-DC7S76ZX.js');var prosemirrorState=require('prosemirror-state');function He(t){let{selection:n,doc:r}=t,{from:e,to:o,empty:s}=n,a=r.resolve(e),l=0,u=0;r.forEach((p,w,F)=>{w<=e&&(l=F),w<=o&&(u=F);});let d={},i=a.parent,m=i.type.name==="paragraph"&&i.textContent.length===0,g=i.attrs?.defaultTextFormatting,f=t.storedMarks||n.$from.marks();m&&f.length===0&&g&&(d={...g});for(let p of f)switch(p.type.name){case "bold":d.bold=true;break;case "italic":d.italic=true;break;case "underline":d.underline={style:p.attrs.style||"single",color:p.attrs.color};break;case "strike":p.attrs.double?d.doubleStrike=true:d.strike=true;break;case "textColor":d.color={rgb:p.attrs.rgb,themeColor:p.attrs.themeColor};break;case "highlight":d.highlight=p.attrs.color;break;case "fontSize":d.fontSize=p.attrs.size;break;case "fontFamily":d.fontFamily={ascii:p.attrs.ascii,hAnsi:p.attrs.hAnsi};break;case "superscript":d.vertAlign="superscript";break;case "subscript":d.vertAlign="subscript";break}let c={},x=null;return i.type.name==="paragraph"&&(i.attrs.alignment&&(c.alignment=i.attrs.alignment),i.attrs.lineSpacing&&(c.lineSpacing=i.attrs.lineSpacing,c.lineSpacingRule=i.attrs.lineSpacingRule),i.attrs.numPr&&(c.numPr=i.attrs.numPr),i.attrs.indentLeft&&(c.indentLeft=i.attrs.indentLeft),i.attrs.indentRight&&(c.indentRight=i.attrs.indentRight),i.attrs.indentFirstLine&&(c.indentFirstLine=i.attrs.indentFirstLine),i.attrs.hangingIndent&&(c.hangingIndent=i.attrs.hangingIndent),i.attrs.tabs&&(c.tabs=i.attrs.tabs),i.attrs.bidi&&(c.bidi=true),i.attrs.styleId&&(x=i.attrs.styleId)),{hasSelection:!s,isMultiParagraph:l!==u,textFormatting:d,paragraphFormatting:c,styleId:x,startParagraphIndex:l,endParagraphIndex:u}}function V(t){if(!(typeof t!="string"||!t))try{return JSON.parse(t)}catch{return}}function k(t,n){return !(n.tag!==void 0&&t.tag!==n.tag||n.alias!==void 0&&t.alias!==n.alias||n.id!==void 0&&t.id!==n.id||n.type!==void 0&&(t.sdtType??"richText")!==n.type)}function T(t){return t.type.name==="blockSdt"||t.type.name==="sdt"}function Je(t,n,r){let e=t.attrs;return {tag:e.tag!=null?String(e.tag):void 0,alias:e.alias!=null?String(e.alias):void 0,id:typeof e.id=="number"?e.id:void 0,sdtType:e.sdtType??"richText",lock:e.lock??void 0,showingPlaceholder:e.showingPlaceholder===true?true:void 0,checked:typeof e.checked=="boolean"?e.checked:void 0,dateFormat:e.dateFormat!=null?String(e.dateFormat):void 0,listItems:V(e.listItems),dataBinding:V(e.dataBinding),dateValue:/<w:date\b[^>]*\bw:fullDate="(\d{4}-\d{2}-\d{2})/.exec(String(e.rawPropertiesXml??""))?.[1],text:t.textBetween(0,t.content.size,`
|
|
2
2
|
`),pos:n,depth:r}}function D(t,n={}){let r=[],e=(o,s,a)=>{o.forEach((l,u)=>{let d=s+u,i=T(l);i&&k(l.attrs,n)&&r.push(Je(l,d,a)),e(l,d+1,i?a+1:a);});};return e(t,0,0),r}function Oe(t,n){return D(t,n)[0]?.pos??null}function X(t,n){let r=null;return t.descendants((e,o)=>r?false:e.type.name==="blockSdt"&&k(e.attrs,n)?(r={node:e,pos:o},false):true),r}function We(t,n){let r=null;return t.descendants((e,o)=>r?false:T(e)&&k(e.attrs,n)?(r={node:e,pos:o},false):true),r}function $e(t,n){let r=t.nodeAt(n);return r&&T(r)?{node:r,pos:n}:null}function je(t,n,r,e={}){let o=X(t.doc,n);if(!o)throw new chunkFO6IX2DB_js.z(n);let s=o.node.attrs;if(!e.force&&chunkFO6IX2DB_js.E(s.lock))throw new chunkFO6IX2DB_js.A(s.lock,"edit");let a=s.sdtType??"richText";if(!e.force&&!chunkFO6IX2DB_js.D(a))throw new chunkFO6IX2DB_js.B(a);if(!e.force&&s.dataBinding!=null)throw new chunkFO6IX2DB_js.C;let{schema:l}=t,d=(a==="plainText"?[r]:r.split(`
|
|
3
|
-
`)).map(f=>l.nodes.paragraph.create(null,f?l.text(f):null)),i=o.pos+1,m=o.pos+1+o.node.content.size,g=t.tr.replaceWith(i,m,d);return (s.showingPlaceholder||/showingPlcHdr/.test(String(s.rawPropertiesXml??"")))&&g.setNodeMarkup(o.pos,void 0,{...s,showingPlaceholder:false,rawPropertiesXml:chunkFO6IX2DB_js.H(s.rawPropertiesXml==null?void 0:String(s.rawPropertiesXml))}),g}function Ke(t,n,r={}){let e=X(t.doc,n);if(!e)throw new chunkFO6IX2DB_js.z(n);let o=e.node.attrs.lock;if(!r.force&&chunkFO6IX2DB_js.F(o))throw new chunkFO6IX2DB_js.A(o,"remove");if(r.keepContent&&!r.force&&/<w15:repeatingSection(Item)?[\s/>]/.test(String(e.node.attrs.rawPropertiesXml??"")))throw new chunkFO6IX2DB_js.A(o,"remove");let s=e.pos,a=e.pos+e.node.nodeSize;return r.keepContent?t.tr.replaceWith(s,a,e.node.content):t.tr.delete(s,a)}function Ue(t,n,r,e={}){let o=We(t.doc,n);if(!o)throw new chunkFO6IX2DB_js.z(n);return H(t,o,r,e)}function Ge(t,n,r,e={}){let o=$e(t.doc,n);if(!o)throw new chunkFO6IX2DB_js.z({});return H(t,o,r,e)}function _e(t){if(t)return typeof t=="string"?{ascii:t,hAnsi:t}:t}function z(t,n,r){if(!n)return null;let e=t.marks.fontFamily,o=_e(r),s=o&&e?[e.create(o)]:void 0;return t.text(n,s)}function qe(t,n){return n.map(r=>{if(r.type!=="paragraph")return t.nodes.paragraph.create(null,null);let e=r.content.find(a=>a.type==="run"),o=e?.type==="run"?e.content.map(a=>"text"in a?a.text:"").join(""):"",s=e?.type==="run"?e.formatting?.fontFamily:void 0;return t.nodes.paragraph.create(null,z(t,o,s))})}function Qe(t,n){let r=n.find(o=>o.type==="paragraph");if(!r||r.type!=="paragraph")return [];let e=[];for(let o of r.content){if(o.type!=="run")continue;let s=o.content.map(l=>"text"in l?l.text:"").join(""),a=z(t,s,o.formatting?.fontFamily);a&&e.push(a);}return e}function H(t,n,r,e){let o=chunk34DJT72K_js.b(n.node.attrs);if(!e.force&&chunkFO6IX2DB_js.E(o.lock))throw new chunkFO6IX2DB_js.A(o.lock,"edit");if(!e.force&&chunkFO6IX2DB_js.G(o))throw new chunkFO6IX2DB_js.C;let{properties:s,content:a}=chunkFO6IX2DB_js.M(o,r),{schema:l}=t,u=n.pos+1,d=n.pos+1+n.node.content.size,i=n.node.type.name==="sdt"?Qe(l,a):qe(l,a),m=t.tr.replaceWith(u,d,i);return m.setNodeMarkup(n.pos,void 0,{...n.node.attrs,...chunk34DJT72K_js.a(s)}),m}function Ye(t){let n=0;return t.descendants(r=>(r.type.name==="blockSdt"&&typeof r.attrs.id=="number"&&(n=Math.max(n,r.attrs.id)),true)),n}function Ze(t,n,r){let e=r,o=n.toJSON(),s=a=>{if(a.type==="blockSdt"&&a.attrs){let l=++e;a.attrs={...a.attrs,id:l,rawPropertiesXml:chunkFO6IX2DB_js.S(a.attrs.rawPropertiesXml==null?void 0:String(a.attrs.rawPropertiesXml),l)};}a.content?.forEach(s);};return s(o),t.nodeFromJSON(o)}function tn(t,n){let r=t.doc.nodeAt(n);if(!r||r.type.name!=="blockSdt"||!chunkFO6IX2DB_js.O(String(r.attrs.rawPropertiesXml??"")))throw new chunkFO6IX2DB_js.R("Position is not a repeating-section item.");let e=Ze(t.schema,r,Ye(t.doc));return t.tr.insert(n+r.nodeSize,e)}function en(t,n){let r=t.doc.nodeAt(n);if(!r||r.type.name!=="blockSdt"||!chunkFO6IX2DB_js.O(String(r.attrs.rawPropertiesXml??"")))throw new chunkFO6IX2DB_js.R("Position is not a repeating-section item.");let o=t.doc.resolve(n).parent,s=0;if(o.forEach(a=>{a.type.name==="blockSdt"&&chunkFO6IX2DB_js.O(String(a.attrs.rawPropertiesXml??""))&&(s+=1);}),s<=1)throw new chunkFO6IX2DB_js.R("Cannot remove the last item of a repeating section.");return t.tr.delete(n,n+r.nodeSize)}Object.defineProperty(exports,"LayoutSelectionGate",{enumerable:true,get:function(){return chunk4GER4JLW_js.a}});Object.defineProperty(exports,"findParagraphByParaId",{enumerable:true,get:function(){return chunkI6PMX4BO_js.b}});Object.defineProperty(exports,"findStartPosForParaId",{enumerable:true,get:function(){return chunkI6PMX4BO_js.a}});Object.defineProperty(exports,"fromProseDoc",{enumerable:true,get:function(){return chunkWWG6PUWU_js.a}});Object.defineProperty(exports,"updateDocumentContent",{enumerable:true,get:function(){return chunkWWG6PUWU_js.b}});Object.defineProperty(exports,"createEmptyDoc",{enumerable:true,get:function(){return chunkBKP5QMTS_js.d}});Object.defineProperty(exports,"footnoteToProseDoc",{enumerable:true,get:function(){return chunkBKP5QMTS_js.c}});Object.defineProperty(exports,"headerFooterToProseDoc",{enumerable:true,get:function(){return chunkBKP5QMTS_js.b}});Object.defineProperty(exports,"toProseDoc",{enumerable:true,get:function(){return chunkBKP5QMTS_js.a}});Object.defineProperty(exports,"addColumnLeft",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.g}});Object.defineProperty(exports,"addColumnRight",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.h}});Object.defineProperty(exports,"addRowAbove",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.d}});Object.defineProperty(exports,"addRowBelow",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.e}});Object.defineProperty(exports,"applyTableStyle",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.E}});Object.defineProperty(exports,"autoFitContents",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.C}});Object.defineProperty(exports,"deleteColumn",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.i}});Object.defineProperty(exports,"deleteRow",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.f}});Object.defineProperty(exports,"deleteTable",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.j}});Object.defineProperty(exports,"distributeColumns",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.B}});Object.defineProperty(exports,"insertTable",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.c}});Object.defineProperty(exports,"mergeCells",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.n}});Object.defineProperty(exports,"removeTableBorders",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.r}});Object.defineProperty(exports,"selectColumn",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.m}});Object.defineProperty(exports,"selectRow",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.l}});Object.defineProperty(exports,"selectTable",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.k}});Object.defineProperty(exports,"setAllTableBorders",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.s}});Object.defineProperty(exports,"setCellBorder",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.p}});Object.defineProperty(exports,"setCellFillColor",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.F}});Object.defineProperty(exports,"setCellMargins",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.w}});Object.defineProperty(exports,"setCellTextDirection",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.x}});Object.defineProperty(exports,"setCellVerticalAlign",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.v}});Object.defineProperty(exports,"setInsideTableBorders",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.u}});Object.defineProperty(exports,"setOutsideTableBorders",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.t}});Object.defineProperty(exports,"setRowHeight",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.z}});Object.defineProperty(exports,"setTableBorderColor",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.G}});Object.defineProperty(exports,"setTableBorderWidth",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.H}});Object.defineProperty(exports,"setTableBorders",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.q}});Object.defineProperty(exports,"setTableProperties",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.D}});Object.defineProperty(exports,"splitCell",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.o}});Object.defineProperty(exports,"toggleHeaderRow",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.A}});Object.defineProperty(exports,"toggleNoWrap",{enumerable:true,get:function(){return chunk2ZTKTE7P_js.y}});Object.defineProperty(exports,"insertPageBreak",{enumerable:true,get:function(){return chunkGGPKPXON_js.a}});Object.defineProperty(exports,"addTabStop",{enumerable:true,get:function(){return chunk2KUOYHXX_js.z}});Object.defineProperty(exports,"alignCenter",{enumerable:true,get:function(){return chunk2KUOYHXX_js.c}});Object.defineProperty(exports,"alignJustify",{enumerable:true,get:function(){return chunk2KUOYHXX_js.e}});Object.defineProperty(exports,"alignLeft",{enumerable:true,get:function(){return chunk2KUOYHXX_js.b}});Object.defineProperty(exports,"alignRight",{enumerable:true,get:function(){return chunk2KUOYHXX_js.d}});Object.defineProperty(exports,"applyStyle",{enumerable:true,get:function(){return chunk2KUOYHXX_js.v}});Object.defineProperty(exports,"clearStyle",{enumerable:true,get:function(){return chunk2KUOYHXX_js.w}});Object.defineProperty(exports,"decreaseIndent",{enumerable:true,get:function(){return chunk2KUOYHXX_js.k}});Object.defineProperty(exports,"decreaseListLevel",{enumerable:true,get:function(){return chunk2KUOYHXX_js.r}});Object.defineProperty(exports,"generateTOC",{enumerable:true,get:function(){return chunk2KUOYHXX_js.D}});Object.defineProperty(exports,"increaseIndent",{enumerable:true,get:function(){return chunk2KUOYHXX_js.j}});Object.defineProperty(exports,"increaseListLevel",{enumerable:true,get:function(){return chunk2KUOYHXX_js.q}});Object.defineProperty(exports,"removeList",{enumerable:true,get:function(){return chunk2KUOYHXX_js.s}});Object.defineProperty(exports,"removeTabStop",{enumerable:true,get:function(){return chunk2KUOYHXX_js.A}});Object.defineProperty(exports,"setAlignment",{enumerable:true,get:function(){return chunk2KUOYHXX_js.a}});Object.defineProperty(exports,"setIndentFirstLine",{enumerable:true,get:function(){return chunk2KUOYHXX_js.n}});Object.defineProperty(exports,"setIndentLeft",{enumerable:true,get:function(){return chunk2KUOYHXX_js.l}});Object.defineProperty(exports,"setIndentRight",{enumerable:true,get:function(){return chunk2KUOYHXX_js.m}});Object.defineProperty(exports,"setLineSpacing",{enumerable:true,get:function(){return chunk2KUOYHXX_js.f}});Object.defineProperty(exports,"setLtr",{enumerable:true,get:function(){return chunk2KUOYHXX_js.C}});Object.defineProperty(exports,"setRtl",{enumerable:true,get:function(){return chunk2KUOYHXX_js.B}});Object.defineProperty(exports,"toggleBulletList",{enumerable:true,get:function(){return chunk2KUOYHXX_js.o}});Object.defineProperty(exports,"toggleNumberedList",{enumerable:true,get:function(){return chunk2KUOYHXX_js.p}});Object.defineProperty(exports,"clearFontFamily",{enumerable:true,get:function(){return chunkCDGV7CLS_js.o}});Object.defineProperty(exports,"clearFontSize",{enumerable:true,get:function(){return chunkCDGV7CLS_js.m}});Object.defineProperty(exports,"clearHighlight",{enumerable:true,get:function(){return chunkCDGV7CLS_js.k}});Object.defineProperty(exports,"clearTextColor",{enumerable:true,get:function(){return chunkCDGV7CLS_js.i}});Object.defineProperty(exports,"insertHyperlink",{enumerable:true,get:function(){return chunkCDGV7CLS_js.s}});Object.defineProperty(exports,"removeHyperlink",{enumerable:true,get:function(){return chunkCDGV7CLS_js.r}});Object.defineProperty(exports,"setFontFamily",{enumerable:true,get:function(){return chunkCDGV7CLS_js.n}});Object.defineProperty(exports,"setFontSize",{enumerable:true,get:function(){return chunkCDGV7CLS_js.l}});Object.defineProperty(exports,"setHighlight",{enumerable:true,get:function(){return chunkCDGV7CLS_js.j}});Object.defineProperty(exports,"setHyperlink",{enumerable:true,get:function(){return chunkCDGV7CLS_js.q}});Object.defineProperty(exports,"setTextColor",{enumerable:true,get:function(){return chunkCDGV7CLS_js.h}});Object.defineProperty(exports,"toggleBold",{enumerable:true,get:function(){return chunkCDGV7CLS_js.b}});Object.defineProperty(exports,"toggleItalic",{enumerable:true,get:function(){return chunkCDGV7CLS_js.c}});Object.defineProperty(exports,"toggleStrike",{enumerable:true,get:function(){return chunkCDGV7CLS_js.e}});Object.defineProperty(exports,"toggleSubscript",{enumerable:true,get:function(){return chunkCDGV7CLS_js.g}});Object.defineProperty(exports,"toggleSuperscript",{enumerable:true,get:function(){return chunkCDGV7CLS_js.f}});Object.defineProperty(exports,"toggleUnderline",{enumerable:true,get:function(){return chunkCDGV7CLS_js.d}});Object.defineProperty(exports,"schema",{enumerable:true,get:function(){return chunkAXVWVIIN_js.b}});Object.defineProperty(exports,"ensureParaIdsInState",{enumerable:true,get:function(){return chunkNTYJIOUE_js.p}});Object.defineProperty(exports,"findHyperlinkRangeAt",{enumerable:true,get:function(){return chunkNTYJIOUE_js.h}});Object.defineProperty(exports,"getHyperlinkAttrs",{enumerable:true,get:function(){return chunkNTYJIOUE_js.f}});Object.defineProperty(exports,"getListInfo",{enumerable:true,get:function(){return chunkNTYJIOUE_js.j}});Object.defineProperty(exports,"getParagraphAlignment",{enumerable:true,get:function(){return chunkNTYJIOUE_js.a}});Object.defineProperty(exports,"getParagraphBidi",{enumerable:true,get:function(){return chunkNTYJIOUE_js.d}});Object.defineProperty(exports,"getSelectedText",{enumerable:true,get:function(){return chunkNTYJIOUE_js.g}});Object.defineProperty(exports,"getStyleId",{enumerable:true,get:function(){return chunkNTYJIOUE_js.c}});Object.defineProperty(exports,"isHyperlinkActive",{enumerable:true,get:function(){return chunkNTYJIOUE_js.e}});Object.defineProperty(exports,"isInList",{enumerable:true,get:function(){return chunkNTYJIOUE_js.i}});Object.defineProperty(exports,"clearFormatting",{enumerable:true,get:function(){return chunkILPNMG7Q_js.h}});Object.defineProperty(exports,"createDocumentStylesPlugin",{enumerable:true,get:function(){return chunkILPNMG7Q_js.l}});Object.defineProperty(exports,"documentStylesKey",{enumerable:true,get:function(){return chunkILPNMG7Q_js.k}});Object.defineProperty(exports,"getDocumentStyleResolver",{enumerable:true,get:function(){return chunkILPNMG7Q_js.m}});Object.defineProperty(exports,"getMarkAttr",{enumerable:true,get:function(){return chunkILPNMG7Q_js.f}});Object.defineProperty(exports,"isMarkActive",{enumerable:true,get:function(){return chunkILPNMG7Q_js.e}});Object.defineProperty(exports,"createSelectionTrackerPlugin",{enumerable:true,get:function(){return chunk6LVPRTB6_js.c}});Object.defineProperty(exports,"extractSelectionContext",{enumerable:true,get:function(){return chunk6LVPRTB6_js.b}});Object.defineProperty(exports,"getSelectionContext",{enumerable:true,get:function(){return chunk6LVPRTB6_js.d}});Object.defineProperty(exports,"selectionTrackerKey",{enumerable:true,get:function(){return chunk6LVPRTB6_js.a}});Object.defineProperty(exports,"StyleResolver",{enumerable:true,get:function(){return chunkLWH66Q7Q_js.a}});Object.defineProperty(exports,"createStyleResolver",{enumerable:true,get:function(){return chunkLWH66Q7Q_js.b}});Object.defineProperty(exports,"getTableContext",{enumerable:true,get:function(){return chunkX6AICTHN_js.a}});Object.defineProperty(exports,"isInTable",{enumerable:true,get:function(){return chunkX6AICTHN_js.b}});Object.defineProperty(exports,"TextSelection",{enumerable:true,get:function(){return prosemirrorState.TextSelection}});exports.addRepeatingSectionItemTr=tn;exports.extractSelectionState=He;exports.findContentControlPos=Oe;exports.findContentControlsInPM=D;exports.removeContentControlTr=Ke;exports.removeRepeatingSectionItemTr=en;exports.setContentControlContentTr=je;exports.setContentControlValueAtPosTr=Ge;exports.setContentControlValueTr=Ue;
|
|
3
|
+
`)).map(f=>l.nodes.paragraph.create(null,f?l.text(f):null)),i=o.pos+1,m=o.pos+1+o.node.content.size,g=t.tr.replaceWith(i,m,d);return (s.showingPlaceholder||/showingPlcHdr/.test(String(s.rawPropertiesXml??"")))&&g.setNodeMarkup(o.pos,void 0,{...s,showingPlaceholder:false,rawPropertiesXml:chunkFO6IX2DB_js.H(s.rawPropertiesXml==null?void 0:String(s.rawPropertiesXml))}),g}function Ke(t,n,r={}){let e=X(t.doc,n);if(!e)throw new chunkFO6IX2DB_js.z(n);let o=e.node.attrs.lock;if(!r.force&&chunkFO6IX2DB_js.F(o))throw new chunkFO6IX2DB_js.A(o,"remove");if(r.keepContent&&!r.force&&/<w15:repeatingSection(Item)?[\s/>]/.test(String(e.node.attrs.rawPropertiesXml??"")))throw new chunkFO6IX2DB_js.A(o,"remove");let s=e.pos,a=e.pos+e.node.nodeSize;return r.keepContent?t.tr.replaceWith(s,a,e.node.content):t.tr.delete(s,a)}function Ue(t,n,r,e={}){let o=We(t.doc,n);if(!o)throw new chunkFO6IX2DB_js.z(n);return H(t,o,r,e)}function Ge(t,n,r,e={}){let o=$e(t.doc,n);if(!o)throw new chunkFO6IX2DB_js.z({});return H(t,o,r,e)}function _e(t){if(t)return typeof t=="string"?{ascii:t,hAnsi:t}:t}function z(t,n,r){if(!n)return null;let e=t.marks.fontFamily,o=_e(r),s=o&&e?[e.create(o)]:void 0;return t.text(n,s)}function qe(t,n){return n.map(r=>{if(r.type!=="paragraph")return t.nodes.paragraph.create(null,null);let e=r.content.find(a=>a.type==="run"),o=e?.type==="run"?e.content.map(a=>"text"in a?a.text:"").join(""):"",s=e?.type==="run"?e.formatting?.fontFamily:void 0;return t.nodes.paragraph.create(null,z(t,o,s))})}function Qe(t,n){let r=n.find(o=>o.type==="paragraph");if(!r||r.type!=="paragraph")return [];let e=[];for(let o of r.content){if(o.type!=="run")continue;let s=o.content.map(l=>"text"in l?l.text:"").join(""),a=z(t,s,o.formatting?.fontFamily);a&&e.push(a);}return e}function H(t,n,r,e){let o=chunkPGWY6UFK_js.e(n.node.attrs);if(!e.force&&chunkFO6IX2DB_js.E(o.lock))throw new chunkFO6IX2DB_js.A(o.lock,"edit");if(!e.force&&chunkFO6IX2DB_js.G(o))throw new chunkFO6IX2DB_js.C;let{properties:s,content:a}=chunkFO6IX2DB_js.M(o,r),{schema:l}=t,u=n.pos+1,d=n.pos+1+n.node.content.size,i=n.node.type.name==="sdt"?Qe(l,a):qe(l,a),m=t.tr.replaceWith(u,d,i);return m.setNodeMarkup(n.pos,void 0,{...n.node.attrs,...chunkPGWY6UFK_js.d(s)}),m}function Ye(t){let n=0;return t.descendants(r=>(r.type.name==="blockSdt"&&typeof r.attrs.id=="number"&&(n=Math.max(n,r.attrs.id)),true)),n}function Ze(t,n,r){let e=r,o=n.toJSON(),s=a=>{if(a.type==="blockSdt"&&a.attrs){let l=++e;a.attrs={...a.attrs,id:l,rawPropertiesXml:chunkFO6IX2DB_js.S(a.attrs.rawPropertiesXml==null?void 0:String(a.attrs.rawPropertiesXml),l)};}a.content?.forEach(s);};return s(o),t.nodeFromJSON(o)}function tn(t,n){let r=t.doc.nodeAt(n);if(!r||r.type.name!=="blockSdt"||!chunkFO6IX2DB_js.O(String(r.attrs.rawPropertiesXml??"")))throw new chunkFO6IX2DB_js.R("Position is not a repeating-section item.");let e=Ze(t.schema,r,Ye(t.doc));return t.tr.insert(n+r.nodeSize,e)}function en(t,n){let r=t.doc.nodeAt(n);if(!r||r.type.name!=="blockSdt"||!chunkFO6IX2DB_js.O(String(r.attrs.rawPropertiesXml??"")))throw new chunkFO6IX2DB_js.R("Position is not a repeating-section item.");let o=t.doc.resolve(n).parent,s=0;if(o.forEach(a=>{a.type.name==="blockSdt"&&chunkFO6IX2DB_js.O(String(a.attrs.rawPropertiesXml??""))&&(s+=1);}),s<=1)throw new chunkFO6IX2DB_js.R("Cannot remove the last item of a repeating section.");return t.tr.delete(n,n+r.nodeSize)}Object.defineProperty(exports,"LayoutSelectionGate",{enumerable:true,get:function(){return chunk4GER4JLW_js.a}});Object.defineProperty(exports,"findParagraphByParaId",{enumerable:true,get:function(){return chunkI6PMX4BO_js.b}});Object.defineProperty(exports,"findStartPosForParaId",{enumerable:true,get:function(){return chunkI6PMX4BO_js.a}});Object.defineProperty(exports,"fromProseDoc",{enumerable:true,get:function(){return chunkBMP2OSXE_js.a}});Object.defineProperty(exports,"updateDocumentContent",{enumerable:true,get:function(){return chunkBMP2OSXE_js.b}});Object.defineProperty(exports,"createEmptyDoc",{enumerable:true,get:function(){return chunkDKUHG27E_js.d}});Object.defineProperty(exports,"footnoteToProseDoc",{enumerable:true,get:function(){return chunkDKUHG27E_js.c}});Object.defineProperty(exports,"headerFooterToProseDoc",{enumerable:true,get:function(){return chunkDKUHG27E_js.b}});Object.defineProperty(exports,"toProseDoc",{enumerable:true,get:function(){return chunkDKUHG27E_js.a}});Object.defineProperty(exports,"addColumnLeft",{enumerable:true,get:function(){return chunkXCXQWCV2_js.g}});Object.defineProperty(exports,"addColumnRight",{enumerable:true,get:function(){return chunkXCXQWCV2_js.h}});Object.defineProperty(exports,"addRowAbove",{enumerable:true,get:function(){return chunkXCXQWCV2_js.d}});Object.defineProperty(exports,"addRowBelow",{enumerable:true,get:function(){return chunkXCXQWCV2_js.e}});Object.defineProperty(exports,"applyTableStyle",{enumerable:true,get:function(){return chunkXCXQWCV2_js.E}});Object.defineProperty(exports,"autoFitContents",{enumerable:true,get:function(){return chunkXCXQWCV2_js.C}});Object.defineProperty(exports,"deleteColumn",{enumerable:true,get:function(){return chunkXCXQWCV2_js.i}});Object.defineProperty(exports,"deleteRow",{enumerable:true,get:function(){return chunkXCXQWCV2_js.f}});Object.defineProperty(exports,"deleteTable",{enumerable:true,get:function(){return chunkXCXQWCV2_js.j}});Object.defineProperty(exports,"distributeColumns",{enumerable:true,get:function(){return chunkXCXQWCV2_js.B}});Object.defineProperty(exports,"insertTable",{enumerable:true,get:function(){return chunkXCXQWCV2_js.c}});Object.defineProperty(exports,"mergeCells",{enumerable:true,get:function(){return chunkXCXQWCV2_js.n}});Object.defineProperty(exports,"removeTableBorders",{enumerable:true,get:function(){return chunkXCXQWCV2_js.r}});Object.defineProperty(exports,"selectColumn",{enumerable:true,get:function(){return chunkXCXQWCV2_js.m}});Object.defineProperty(exports,"selectRow",{enumerable:true,get:function(){return chunkXCXQWCV2_js.l}});Object.defineProperty(exports,"selectTable",{enumerable:true,get:function(){return chunkXCXQWCV2_js.k}});Object.defineProperty(exports,"setAllTableBorders",{enumerable:true,get:function(){return chunkXCXQWCV2_js.s}});Object.defineProperty(exports,"setCellBorder",{enumerable:true,get:function(){return chunkXCXQWCV2_js.p}});Object.defineProperty(exports,"setCellFillColor",{enumerable:true,get:function(){return chunkXCXQWCV2_js.F}});Object.defineProperty(exports,"setCellMargins",{enumerable:true,get:function(){return chunkXCXQWCV2_js.w}});Object.defineProperty(exports,"setCellTextDirection",{enumerable:true,get:function(){return chunkXCXQWCV2_js.x}});Object.defineProperty(exports,"setCellVerticalAlign",{enumerable:true,get:function(){return chunkXCXQWCV2_js.v}});Object.defineProperty(exports,"setInsideTableBorders",{enumerable:true,get:function(){return chunkXCXQWCV2_js.u}});Object.defineProperty(exports,"setOutsideTableBorders",{enumerable:true,get:function(){return chunkXCXQWCV2_js.t}});Object.defineProperty(exports,"setRowHeight",{enumerable:true,get:function(){return chunkXCXQWCV2_js.z}});Object.defineProperty(exports,"setTableBorderColor",{enumerable:true,get:function(){return chunkXCXQWCV2_js.G}});Object.defineProperty(exports,"setTableBorderWidth",{enumerable:true,get:function(){return chunkXCXQWCV2_js.H}});Object.defineProperty(exports,"setTableBorders",{enumerable:true,get:function(){return chunkXCXQWCV2_js.q}});Object.defineProperty(exports,"setTableProperties",{enumerable:true,get:function(){return chunkXCXQWCV2_js.D}});Object.defineProperty(exports,"splitCell",{enumerable:true,get:function(){return chunkXCXQWCV2_js.o}});Object.defineProperty(exports,"toggleHeaderRow",{enumerable:true,get:function(){return chunkXCXQWCV2_js.A}});Object.defineProperty(exports,"toggleNoWrap",{enumerable:true,get:function(){return chunkXCXQWCV2_js.y}});Object.defineProperty(exports,"insertPageBreak",{enumerable:true,get:function(){return chunkGGPKPXON_js.a}});Object.defineProperty(exports,"addTabStop",{enumerable:true,get:function(){return chunkDEQFU56O_js.z}});Object.defineProperty(exports,"alignCenter",{enumerable:true,get:function(){return chunkDEQFU56O_js.c}});Object.defineProperty(exports,"alignJustify",{enumerable:true,get:function(){return chunkDEQFU56O_js.e}});Object.defineProperty(exports,"alignLeft",{enumerable:true,get:function(){return chunkDEQFU56O_js.b}});Object.defineProperty(exports,"alignRight",{enumerable:true,get:function(){return chunkDEQFU56O_js.d}});Object.defineProperty(exports,"applyStyle",{enumerable:true,get:function(){return chunkDEQFU56O_js.v}});Object.defineProperty(exports,"clearStyle",{enumerable:true,get:function(){return chunkDEQFU56O_js.w}});Object.defineProperty(exports,"decreaseIndent",{enumerable:true,get:function(){return chunkDEQFU56O_js.k}});Object.defineProperty(exports,"decreaseListLevel",{enumerable:true,get:function(){return chunkDEQFU56O_js.r}});Object.defineProperty(exports,"generateTOC",{enumerable:true,get:function(){return chunkDEQFU56O_js.D}});Object.defineProperty(exports,"increaseIndent",{enumerable:true,get:function(){return chunkDEQFU56O_js.j}});Object.defineProperty(exports,"increaseListLevel",{enumerable:true,get:function(){return chunkDEQFU56O_js.q}});Object.defineProperty(exports,"removeList",{enumerable:true,get:function(){return chunkDEQFU56O_js.s}});Object.defineProperty(exports,"removeTabStop",{enumerable:true,get:function(){return chunkDEQFU56O_js.A}});Object.defineProperty(exports,"setAlignment",{enumerable:true,get:function(){return chunkDEQFU56O_js.a}});Object.defineProperty(exports,"setIndentFirstLine",{enumerable:true,get:function(){return chunkDEQFU56O_js.n}});Object.defineProperty(exports,"setIndentLeft",{enumerable:true,get:function(){return chunkDEQFU56O_js.l}});Object.defineProperty(exports,"setIndentRight",{enumerable:true,get:function(){return chunkDEQFU56O_js.m}});Object.defineProperty(exports,"setLineSpacing",{enumerable:true,get:function(){return chunkDEQFU56O_js.f}});Object.defineProperty(exports,"setLtr",{enumerable:true,get:function(){return chunkDEQFU56O_js.C}});Object.defineProperty(exports,"setRtl",{enumerable:true,get:function(){return chunkDEQFU56O_js.B}});Object.defineProperty(exports,"toggleBulletList",{enumerable:true,get:function(){return chunkDEQFU56O_js.o}});Object.defineProperty(exports,"toggleNumberedList",{enumerable:true,get:function(){return chunkDEQFU56O_js.p}});Object.defineProperty(exports,"clearFontFamily",{enumerable:true,get:function(){return chunk4HNEXEGS_js.o}});Object.defineProperty(exports,"clearFontSize",{enumerable:true,get:function(){return chunk4HNEXEGS_js.m}});Object.defineProperty(exports,"clearHighlight",{enumerable:true,get:function(){return chunk4HNEXEGS_js.k}});Object.defineProperty(exports,"clearTextColor",{enumerable:true,get:function(){return chunk4HNEXEGS_js.i}});Object.defineProperty(exports,"insertHyperlink",{enumerable:true,get:function(){return chunk4HNEXEGS_js.s}});Object.defineProperty(exports,"removeHyperlink",{enumerable:true,get:function(){return chunk4HNEXEGS_js.r}});Object.defineProperty(exports,"setFontFamily",{enumerable:true,get:function(){return chunk4HNEXEGS_js.n}});Object.defineProperty(exports,"setFontSize",{enumerable:true,get:function(){return chunk4HNEXEGS_js.l}});Object.defineProperty(exports,"setHighlight",{enumerable:true,get:function(){return chunk4HNEXEGS_js.j}});Object.defineProperty(exports,"setHyperlink",{enumerable:true,get:function(){return chunk4HNEXEGS_js.q}});Object.defineProperty(exports,"setTextColor",{enumerable:true,get:function(){return chunk4HNEXEGS_js.h}});Object.defineProperty(exports,"toggleBold",{enumerable:true,get:function(){return chunk4HNEXEGS_js.b}});Object.defineProperty(exports,"toggleItalic",{enumerable:true,get:function(){return chunk4HNEXEGS_js.c}});Object.defineProperty(exports,"toggleStrike",{enumerable:true,get:function(){return chunk4HNEXEGS_js.e}});Object.defineProperty(exports,"toggleSubscript",{enumerable:true,get:function(){return chunk4HNEXEGS_js.g}});Object.defineProperty(exports,"toggleSuperscript",{enumerable:true,get:function(){return chunk4HNEXEGS_js.f}});Object.defineProperty(exports,"toggleUnderline",{enumerable:true,get:function(){return chunk4HNEXEGS_js.d}});Object.defineProperty(exports,"schema",{enumerable:true,get:function(){return chunk4U2S3WV2_js.b}});Object.defineProperty(exports,"ensureParaIdsInState",{enumerable:true,get:function(){return chunkDUVSDFRG_js.p}});Object.defineProperty(exports,"findHyperlinkRangeAt",{enumerable:true,get:function(){return chunkDUVSDFRG_js.h}});Object.defineProperty(exports,"getHyperlinkAttrs",{enumerable:true,get:function(){return chunkDUVSDFRG_js.f}});Object.defineProperty(exports,"getListInfo",{enumerable:true,get:function(){return chunkDUVSDFRG_js.j}});Object.defineProperty(exports,"getParagraphAlignment",{enumerable:true,get:function(){return chunkDUVSDFRG_js.a}});Object.defineProperty(exports,"getParagraphBidi",{enumerable:true,get:function(){return chunkDUVSDFRG_js.d}});Object.defineProperty(exports,"getSelectedText",{enumerable:true,get:function(){return chunkDUVSDFRG_js.g}});Object.defineProperty(exports,"getStyleId",{enumerable:true,get:function(){return chunkDUVSDFRG_js.c}});Object.defineProperty(exports,"isHyperlinkActive",{enumerable:true,get:function(){return chunkDUVSDFRG_js.e}});Object.defineProperty(exports,"isInList",{enumerable:true,get:function(){return chunkDUVSDFRG_js.i}});Object.defineProperty(exports,"clearFormatting",{enumerable:true,get:function(){return chunkILPNMG7Q_js.h}});Object.defineProperty(exports,"createDocumentStylesPlugin",{enumerable:true,get:function(){return chunkILPNMG7Q_js.l}});Object.defineProperty(exports,"documentStylesKey",{enumerable:true,get:function(){return chunkILPNMG7Q_js.k}});Object.defineProperty(exports,"getDocumentStyleResolver",{enumerable:true,get:function(){return chunkILPNMG7Q_js.m}});Object.defineProperty(exports,"getMarkAttr",{enumerable:true,get:function(){return chunkILPNMG7Q_js.f}});Object.defineProperty(exports,"isMarkActive",{enumerable:true,get:function(){return chunkILPNMG7Q_js.e}});Object.defineProperty(exports,"createSelectionTrackerPlugin",{enumerable:true,get:function(){return chunk6LVPRTB6_js.c}});Object.defineProperty(exports,"extractSelectionContext",{enumerable:true,get:function(){return chunk6LVPRTB6_js.b}});Object.defineProperty(exports,"getSelectionContext",{enumerable:true,get:function(){return chunk6LVPRTB6_js.d}});Object.defineProperty(exports,"selectionTrackerKey",{enumerable:true,get:function(){return chunk6LVPRTB6_js.a}});Object.defineProperty(exports,"StyleResolver",{enumerable:true,get:function(){return chunkLWH66Q7Q_js.a}});Object.defineProperty(exports,"createStyleResolver",{enumerable:true,get:function(){return chunkLWH66Q7Q_js.b}});Object.defineProperty(exports,"getTableContext",{enumerable:true,get:function(){return chunkX6AICTHN_js.a}});Object.defineProperty(exports,"isInTable",{enumerable:true,get:function(){return chunkX6AICTHN_js.b}});Object.defineProperty(exports,"TextSelection",{enumerable:true,get:function(){return prosemirrorState.TextSelection}});exports.addRepeatingSectionItemTr=tn;exports.extractSelectionState=He;exports.findContentControlPos=Oe;exports.findContentControlsInPM=D;exports.removeContentControlTr=Ke;exports.removeRepeatingSectionItemTr=en;exports.setContentControlContentTr=je;exports.setContentControlValueAtPosTr=Ge;exports.setContentControlValueTr=Ue;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import'../chunk-DTTWBKGN.mjs';export{a as LayoutSelectionGate}from'../chunk-Q5QOBZWT.mjs';export{b as findParagraphByParaId,a as findStartPosForParaId}from'../chunk-3SXJPJSV.mjs';import {z as z$1,E,A,D as D$1,B,C,H as H$1,F,G,M,O,R,S}from'../chunk-KOEWROYV.mjs';import'../chunk-RNOXNNSD.mjs';export{a as fromProseDoc,b as updateDocumentContent}from'../chunk-
|
|
1
|
+
import'../chunk-DTTWBKGN.mjs';export{a as LayoutSelectionGate}from'../chunk-Q5QOBZWT.mjs';export{b as findParagraphByParaId,a as findStartPosForParaId}from'../chunk-3SXJPJSV.mjs';import {z as z$1,E,A,D as D$1,B,C,H as H$1,F,G,M,O,R,S}from'../chunk-KOEWROYV.mjs';import'../chunk-RNOXNNSD.mjs';export{a as fromProseDoc,b as updateDocumentContent}from'../chunk-OSTMAXZZ.mjs';export{d as createEmptyDoc,c as footnoteToProseDoc,b as headerFooterToProseDoc,a as toProseDoc}from'../chunk-NN2EJIO7.mjs';import {e,d}from'../chunk-O5L4BZCZ.mjs';import'../chunk-LK6I3HMH.mjs';import'../chunk-QPFJJPIC.mjs';import'../chunk-GYWTUUXX.mjs';import'../chunk-3HLRRK6N.mjs';import'../chunk-W77JXDEV.mjs';export{g as addColumnLeft,h as addColumnRight,d as addRowAbove,e as addRowBelow,E as applyTableStyle,C as autoFitContents,i as deleteColumn,f as deleteRow,j as deleteTable,B as distributeColumns,c as insertTable,n as mergeCells,r as removeTableBorders,m as selectColumn,l as selectRow,k as selectTable,s as setAllTableBorders,p as setCellBorder,F as setCellFillColor,w as setCellMargins,x as setCellTextDirection,v as setCellVerticalAlign,u as setInsideTableBorders,t as setOutsideTableBorders,z as setRowHeight,G as setTableBorderColor,H as setTableBorderWidth,q as setTableBorders,D as setTableProperties,o as splitCell,A as toggleHeaderRow,y as toggleNoWrap}from'../chunk-KPWWI5UW.mjs';export{a as insertPageBreak}from'../chunk-3COGZG7O.mjs';import'../chunk-GLPOVLZD.mjs';export{z as addTabStop,c as alignCenter,e as alignJustify,b as alignLeft,d as alignRight,v as applyStyle,w as clearStyle,k as decreaseIndent,r as decreaseListLevel,D as generateTOC,j as increaseIndent,q as increaseListLevel,s as removeList,A as removeTabStop,a as setAlignment,n as setIndentFirstLine,l as setIndentLeft,m as setIndentRight,f as setLineSpacing,C as setLtr,B as setRtl,o as toggleBulletList,p as toggleNumberedList}from'../chunk-O4RCQNUW.mjs';export{o as clearFontFamily,m as clearFontSize,k as clearHighlight,i as clearTextColor,s as insertHyperlink,r as removeHyperlink,n as setFontFamily,l as setFontSize,j as setHighlight,q as setHyperlink,h as setTextColor,b as toggleBold,c as toggleItalic,e as toggleStrike,g as toggleSubscript,f as toggleSuperscript,d as toggleUnderline}from'../chunk-DU5TWD2W.mjs';import'../chunk-KQTB5Y7P.mjs';import'../chunk-6ENZQGYR.mjs';export{b as schema}from'../chunk-SHZOAUHB.mjs';export{p as ensureParaIdsInState,h as findHyperlinkRangeAt,f as getHyperlinkAttrs,j as getListInfo,a as getParagraphAlignment,d as getParagraphBidi,g as getSelectedText,c as getStyleId,e as isHyperlinkActive,i as isInList}from'../chunk-TXAB4I4M.mjs';import'../chunk-PJEB3ZWG.mjs';import'../chunk-OZMNIX6U.mjs';import'../chunk-AMENZY5F.mjs';export{h as clearFormatting,l as createDocumentStylesPlugin,k as documentStylesKey,m as getDocumentStyleResolver,f as getMarkAttr,e as isMarkActive}from'../chunk-HEJJXAXN.mjs';export{c as createSelectionTrackerPlugin,b as extractSelectionContext,d as getSelectionContext,a as selectionTrackerKey}from'../chunk-BGY3CB37.mjs';export{a as StyleResolver,b as createStyleResolver}from'../chunk-2XP6GLA4.mjs';export{a as getTableContext,b as isInTable}from'../chunk-NTBZRITU.mjs';import'../chunk-MJ6XZFVD.mjs';import'../chunk-67LVRQIR.mjs';import'../chunk-LE67NTCN.mjs';import'../chunk-KNY7SXPJ.mjs';import'../chunk-DI6CRWSW.mjs';import'../chunk-VJFIAFZ5.mjs';import'../chunk-3ANZ3252.mjs';import'../chunk-QYUPLKLP.mjs';export{TextSelection}from'prosemirror-state';function He(t){let{selection:n,doc:r}=t,{from:e,to:o,empty:s}=n,a=r.resolve(e),l=0,u=0;r.forEach((p,w,F)=>{w<=e&&(l=F),w<=o&&(u=F);});let d={},i=a.parent,m=i.type.name==="paragraph"&&i.textContent.length===0,g=i.attrs?.defaultTextFormatting,f=t.storedMarks||n.$from.marks();m&&f.length===0&&g&&(d={...g});for(let p of f)switch(p.type.name){case "bold":d.bold=true;break;case "italic":d.italic=true;break;case "underline":d.underline={style:p.attrs.style||"single",color:p.attrs.color};break;case "strike":p.attrs.double?d.doubleStrike=true:d.strike=true;break;case "textColor":d.color={rgb:p.attrs.rgb,themeColor:p.attrs.themeColor};break;case "highlight":d.highlight=p.attrs.color;break;case "fontSize":d.fontSize=p.attrs.size;break;case "fontFamily":d.fontFamily={ascii:p.attrs.ascii,hAnsi:p.attrs.hAnsi};break;case "superscript":d.vertAlign="superscript";break;case "subscript":d.vertAlign="subscript";break}let c={},x=null;return i.type.name==="paragraph"&&(i.attrs.alignment&&(c.alignment=i.attrs.alignment),i.attrs.lineSpacing&&(c.lineSpacing=i.attrs.lineSpacing,c.lineSpacingRule=i.attrs.lineSpacingRule),i.attrs.numPr&&(c.numPr=i.attrs.numPr),i.attrs.indentLeft&&(c.indentLeft=i.attrs.indentLeft),i.attrs.indentRight&&(c.indentRight=i.attrs.indentRight),i.attrs.indentFirstLine&&(c.indentFirstLine=i.attrs.indentFirstLine),i.attrs.hangingIndent&&(c.hangingIndent=i.attrs.hangingIndent),i.attrs.tabs&&(c.tabs=i.attrs.tabs),i.attrs.bidi&&(c.bidi=true),i.attrs.styleId&&(x=i.attrs.styleId)),{hasSelection:!s,isMultiParagraph:l!==u,textFormatting:d,paragraphFormatting:c,styleId:x,startParagraphIndex:l,endParagraphIndex:u}}function V(t){if(!(typeof t!="string"||!t))try{return JSON.parse(t)}catch{return}}function k(t,n){return !(n.tag!==void 0&&t.tag!==n.tag||n.alias!==void 0&&t.alias!==n.alias||n.id!==void 0&&t.id!==n.id||n.type!==void 0&&(t.sdtType??"richText")!==n.type)}function T(t){return t.type.name==="blockSdt"||t.type.name==="sdt"}function Je(t,n,r){let e=t.attrs;return {tag:e.tag!=null?String(e.tag):void 0,alias:e.alias!=null?String(e.alias):void 0,id:typeof e.id=="number"?e.id:void 0,sdtType:e.sdtType??"richText",lock:e.lock??void 0,showingPlaceholder:e.showingPlaceholder===true?true:void 0,checked:typeof e.checked=="boolean"?e.checked:void 0,dateFormat:e.dateFormat!=null?String(e.dateFormat):void 0,listItems:V(e.listItems),dataBinding:V(e.dataBinding),dateValue:/<w:date\b[^>]*\bw:fullDate="(\d{4}-\d{2}-\d{2})/.exec(String(e.rawPropertiesXml??""))?.[1],text:t.textBetween(0,t.content.size,`
|
|
2
2
|
`),pos:n,depth:r}}function D(t,n={}){let r=[],e=(o,s,a)=>{o.forEach((l,u)=>{let d=s+u,i=T(l);i&&k(l.attrs,n)&&r.push(Je(l,d,a)),e(l,d+1,i?a+1:a);});};return e(t,0,0),r}function Oe(t,n){return D(t,n)[0]?.pos??null}function X(t,n){let r=null;return t.descendants((e,o)=>r?false:e.type.name==="blockSdt"&&k(e.attrs,n)?(r={node:e,pos:o},false):true),r}function We(t,n){let r=null;return t.descendants((e,o)=>r?false:T(e)&&k(e.attrs,n)?(r={node:e,pos:o},false):true),r}function $e(t,n){let r=t.nodeAt(n);return r&&T(r)?{node:r,pos:n}:null}function je(t,n,r,e={}){let o=X(t.doc,n);if(!o)throw new z$1(n);let s=o.node.attrs;if(!e.force&&E(s.lock))throw new A(s.lock,"edit");let a=s.sdtType??"richText";if(!e.force&&!D$1(a))throw new B(a);if(!e.force&&s.dataBinding!=null)throw new C;let{schema:l}=t,d=(a==="plainText"?[r]:r.split(`
|
|
3
|
-
`)).map(f=>l.nodes.paragraph.create(null,f?l.text(f):null)),i=o.pos+1,m=o.pos+1+o.node.content.size,g=t.tr.replaceWith(i,m,d);return (s.showingPlaceholder||/showingPlcHdr/.test(String(s.rawPropertiesXml??"")))&&g.setNodeMarkup(o.pos,void 0,{...s,showingPlaceholder:false,rawPropertiesXml:H$1(s.rawPropertiesXml==null?void 0:String(s.rawPropertiesXml))}),g}function Ke(t,n,r={}){let e=X(t.doc,n);if(!e)throw new z$1(n);let o=e.node.attrs.lock;if(!r.force&&F(o))throw new A(o,"remove");if(r.keepContent&&!r.force&&/<w15:repeatingSection(Item)?[\s/>]/.test(String(e.node.attrs.rawPropertiesXml??"")))throw new A(o,"remove");let s=e.pos,a=e.pos+e.node.nodeSize;return r.keepContent?t.tr.replaceWith(s,a,e.node.content):t.tr.delete(s,a)}function Ue(t,n,r,e={}){let o=We(t.doc,n);if(!o)throw new z$1(n);return H(t,o,r,e)}function Ge(t,n,r,e={}){let o=$e(t.doc,n);if(!o)throw new z$1({});return H(t,o,r,e)}function _e(t){if(t)return typeof t=="string"?{ascii:t,hAnsi:t}:t}function z(t,n,r){if(!n)return null;let e=t.marks.fontFamily,o=_e(r),s=o&&e?[e.create(o)]:void 0;return t.text(n,s)}function qe(t,n){return n.map(r=>{if(r.type!=="paragraph")return t.nodes.paragraph.create(null,null);let e=r.content.find(a=>a.type==="run"),o=e?.type==="run"?e.content.map(a=>"text"in a?a.text:"").join(""):"",s=e?.type==="run"?e.formatting?.fontFamily:void 0;return t.nodes.paragraph.create(null,z(t,o,s))})}function Qe(t,n){let r=n.find(o=>o.type==="paragraph");if(!r||r.type!=="paragraph")return [];let e=[];for(let o of r.content){if(o.type!=="run")continue;let s=o.content.map(l=>"text"in l?l.text:"").join(""),a=z(t,s,o.formatting?.fontFamily);a&&e.push(a);}return e}function H(t,n,r,e){let o=
|
|
3
|
+
`)).map(f=>l.nodes.paragraph.create(null,f?l.text(f):null)),i=o.pos+1,m=o.pos+1+o.node.content.size,g=t.tr.replaceWith(i,m,d);return (s.showingPlaceholder||/showingPlcHdr/.test(String(s.rawPropertiesXml??"")))&&g.setNodeMarkup(o.pos,void 0,{...s,showingPlaceholder:false,rawPropertiesXml:H$1(s.rawPropertiesXml==null?void 0:String(s.rawPropertiesXml))}),g}function Ke(t,n,r={}){let e=X(t.doc,n);if(!e)throw new z$1(n);let o=e.node.attrs.lock;if(!r.force&&F(o))throw new A(o,"remove");if(r.keepContent&&!r.force&&/<w15:repeatingSection(Item)?[\s/>]/.test(String(e.node.attrs.rawPropertiesXml??"")))throw new A(o,"remove");let s=e.pos,a=e.pos+e.node.nodeSize;return r.keepContent?t.tr.replaceWith(s,a,e.node.content):t.tr.delete(s,a)}function Ue(t,n,r,e={}){let o=We(t.doc,n);if(!o)throw new z$1(n);return H(t,o,r,e)}function Ge(t,n,r,e={}){let o=$e(t.doc,n);if(!o)throw new z$1({});return H(t,o,r,e)}function _e(t){if(t)return typeof t=="string"?{ascii:t,hAnsi:t}:t}function z(t,n,r){if(!n)return null;let e=t.marks.fontFamily,o=_e(r),s=o&&e?[e.create(o)]:void 0;return t.text(n,s)}function qe(t,n){return n.map(r=>{if(r.type!=="paragraph")return t.nodes.paragraph.create(null,null);let e=r.content.find(a=>a.type==="run"),o=e?.type==="run"?e.content.map(a=>"text"in a?a.text:"").join(""):"",s=e?.type==="run"?e.formatting?.fontFamily:void 0;return t.nodes.paragraph.create(null,z(t,o,s))})}function Qe(t,n){let r=n.find(o=>o.type==="paragraph");if(!r||r.type!=="paragraph")return [];let e=[];for(let o of r.content){if(o.type!=="run")continue;let s=o.content.map(l=>"text"in l?l.text:"").join(""),a=z(t,s,o.formatting?.fontFamily);a&&e.push(a);}return e}function H(t,n,r,e$1){let o=e(n.node.attrs);if(!e$1.force&&E(o.lock))throw new A(o.lock,"edit");if(!e$1.force&&G(o))throw new C;let{properties:s,content:a}=M(o,r),{schema:l}=t,u=n.pos+1,d$1=n.pos+1+n.node.content.size,i=n.node.type.name==="sdt"?Qe(l,a):qe(l,a),m=t.tr.replaceWith(u,d$1,i);return m.setNodeMarkup(n.pos,void 0,{...n.node.attrs,...d(s)}),m}function Ye(t){let n=0;return t.descendants(r=>(r.type.name==="blockSdt"&&typeof r.attrs.id=="number"&&(n=Math.max(n,r.attrs.id)),true)),n}function Ze(t,n,r){let e=r,o=n.toJSON(),s=a=>{if(a.type==="blockSdt"&&a.attrs){let l=++e;a.attrs={...a.attrs,id:l,rawPropertiesXml:S(a.attrs.rawPropertiesXml==null?void 0:String(a.attrs.rawPropertiesXml),l)};}a.content?.forEach(s);};return s(o),t.nodeFromJSON(o)}function tn(t,n){let r=t.doc.nodeAt(n);if(!r||r.type.name!=="blockSdt"||!O(String(r.attrs.rawPropertiesXml??"")))throw new R("Position is not a repeating-section item.");let e=Ze(t.schema,r,Ye(t.doc));return t.tr.insert(n+r.nodeSize,e)}function en(t,n){let r=t.doc.nodeAt(n);if(!r||r.type.name!=="blockSdt"||!O(String(r.attrs.rawPropertiesXml??"")))throw new R("Position is not a repeating-section item.");let o=t.doc.resolve(n).parent,s=0;if(o.forEach(a=>{a.type.name==="blockSdt"&&O(String(a.attrs.rawPropertiesXml??""))&&(s+=1);}),s<=1)throw new R("Cannot remove the last item of a repeating section.");return t.tr.delete(n,n+r.nodeSize)}export{tn as addRepeatingSectionItemTr,He as extractSelectionState,Oe as findContentControlPos,D as findContentControlsInPM,Ke as removeContentControlTr,en as removeRepeatingSectionItemTr,je as setContentControlContentTr,Ge as setContentControlValueAtPosTr,Ue as setContentControlValueTr};
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
export { SelectionChangeCallback, SelectionContext, createSelectionTrackerPlugin, extractSelectionContext, getSelectionContext, selectionTrackerKey } from './selectionTracker.mjs';
|
|
10
10
|
import { PluginKey, EditorState, Transaction, Plugin } from 'prosemirror-state';
|
|
11
11
|
export { c as createDocumentStylesPlugin, d as documentStylesKey, g as getDocumentStyleResolver } from '../../documentStyles-1G0xTl1v.mjs';
|
|
12
|
-
import {
|
|
12
|
+
import { a as RevisionInfo } from '../../content-BEFz1zcs.mjs';
|
|
13
13
|
import '../../formatting-DFtuRFQY.mjs';
|
|
14
14
|
import '../../colors-C3vA7HUU.mjs';
|
|
15
15
|
import '../../styles-Dqec8Aw6.mjs';
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
export { SelectionChangeCallback, SelectionContext, createSelectionTrackerPlugin, extractSelectionContext, getSelectionContext, selectionTrackerKey } from './selectionTracker.js';
|
|
10
10
|
import { PluginKey, EditorState, Transaction, Plugin } from 'prosemirror-state';
|
|
11
11
|
export { c as createDocumentStylesPlugin, d as documentStylesKey, g as getDocumentStyleResolver } from '../../documentStyles-Bw98BwEy.js';
|
|
12
|
-
import {
|
|
12
|
+
import { a as RevisionInfo } from '../../content-DNcMlHU0.js';
|
|
13
13
|
import '../../formatting-JhqWT_XM.js';
|
|
14
14
|
import '../../colors-C3vA7HUU.js';
|
|
15
15
|
import '../../styles-gEujs7j6.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EditorView } from 'prosemirror-view';
|
|
2
2
|
import { Node } from 'prosemirror-model';
|
|
3
3
|
import { Layout } from '../layout-engine/types.mjs';
|
|
4
|
-
import '../content-
|
|
4
|
+
import '../content-BEFz1zcs.mjs';
|
|
5
5
|
import '../formatting-DFtuRFQY.mjs';
|
|
6
6
|
import '../colors-C3vA7HUU.mjs';
|
|
7
7
|
import '../docx/wrapTypes.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EditorView } from 'prosemirror-view';
|
|
2
2
|
import { Node } from 'prosemirror-model';
|
|
3
3
|
import { Layout } from '../layout-engine/types.js';
|
|
4
|
-
import '../content-
|
|
4
|
+
import '../content-DNcMlHU0.js';
|
|
5
5
|
import '../formatting-JhqWT_XM.js';
|
|
6
6
|
import '../colors-C3vA7HUU.js';
|
|
7
7
|
import '../docx/wrapTypes.js';
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import * as prosemirror_model from 'prosemirror-model';
|
|
11
11
|
import { a as ExtensionManager } from '../../types-RchZmPFN.mjs';
|
|
12
|
-
export { I as ImageAttrs, a as ImagePositionAttrs, P as ParagraphAttrs, T as TableAttrs, b as TableCellAttrs, c as TableRowAttrs } from '../../nodes-
|
|
12
|
+
export { I as ImageAttrs, a as ImagePositionAttrs, P as ParagraphAttrs, T as TableAttrs, b as TableCellAttrs, c as TableRowAttrs } from '../../nodes-5w_QaI3g.mjs';
|
|
13
13
|
export { F as FontFamilyAttrs, a as FontSizeAttrs, H as HyperlinkAttrs, T as TextColorAttrs, U as UnderlineAttrs } from '../../marks-CzrbFi4o.mjs';
|
|
14
14
|
import 'prosemirror-state';
|
|
15
15
|
import '../../colors-C3vA7HUU.mjs';
|
|
16
16
|
import '../../formatting-DFtuRFQY.mjs';
|
|
17
17
|
import '../../lists-CyGxd5Y2.mjs';
|
|
18
18
|
import '../../docx/wrapTypes.mjs';
|
|
19
|
-
import '../../content-
|
|
19
|
+
import '../../content-BEFz1zcs.mjs';
|
|
20
20
|
import '../../watermark-D90356ZM.mjs';
|
|
21
21
|
|
|
22
22
|
declare const singletonManager: ExtensionManager;
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import * as prosemirror_model from 'prosemirror-model';
|
|
11
11
|
import { a as ExtensionManager } from '../../types-RchZmPFN.js';
|
|
12
|
-
export { I as ImageAttrs, a as ImagePositionAttrs, P as ParagraphAttrs, T as TableAttrs, b as TableCellAttrs, c as TableRowAttrs } from '../../nodes-
|
|
12
|
+
export { I as ImageAttrs, a as ImagePositionAttrs, P as ParagraphAttrs, T as TableAttrs, b as TableCellAttrs, c as TableRowAttrs } from '../../nodes-qQdZtu3Z.js';
|
|
13
13
|
export { F as FontFamilyAttrs, a as FontSizeAttrs, H as HyperlinkAttrs, T as TextColorAttrs, U as UnderlineAttrs } from '../../marks-Dq1QsxKA.js';
|
|
14
14
|
import 'prosemirror-state';
|
|
15
15
|
import '../../colors-C3vA7HUU.js';
|
|
16
16
|
import '../../formatting-JhqWT_XM.js';
|
|
17
17
|
import '../../lists-Bn29SzeS.js';
|
|
18
18
|
import '../../docx/wrapTypes.js';
|
|
19
|
-
import '../../content-
|
|
19
|
+
import '../../content-DNcMlHU0.js';
|
|
20
20
|
import '../../watermark-D90356ZM.js';
|
|
21
21
|
|
|
22
22
|
declare const singletonManager: ExtensionManager;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunk4U2S3WV2_js=require('../../chunk-4U2S3WV2.js');require('../../chunk-DUVSDFRG.js'),require('../../chunk-Q2VALXEU.js'),require('../../chunk-MZ7LW5CH.js'),require('../../chunk-N3Y5BUKV.js'),require('../../chunk-ILPNMG7Q.js'),require('../../chunk-6LVPRTB6.js'),require('../../chunk-LWH66Q7Q.js'),require('../../chunk-X6AICTHN.js'),require('../../chunk-7HANRHHL.js'),require('../../chunk-MJ5FQX7Q.js'),require('../../chunk-C2BAPYGJ.js'),require('../../chunk-BJSG6TEG.js'),require('../../chunk-GSKMHXHG.js'),require('../../chunk-H57LNDBH.js'),require('../../chunk-3R7QHNI5.js'),require('../../chunk-DC7S76ZX.js');Object.defineProperty(exports,"schema",{enumerable:true,get:function(){return chunk4U2S3WV2_js.b}});Object.defineProperty(exports,"singletonManager",{enumerable:true,get:function(){return chunk4U2S3WV2_js.a}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as schema,a as singletonManager}from'../../chunk-
|
|
1
|
+
export{b as schema,a as singletonManager}from'../../chunk-SHZOAUHB.mjs';import'../../chunk-TXAB4I4M.mjs';import'../../chunk-PJEB3ZWG.mjs';import'../../chunk-OZMNIX6U.mjs';import'../../chunk-AMENZY5F.mjs';import'../../chunk-HEJJXAXN.mjs';import'../../chunk-BGY3CB37.mjs';import'../../chunk-2XP6GLA4.mjs';import'../../chunk-NTBZRITU.mjs';import'../../chunk-MJ6XZFVD.mjs';import'../../chunk-67LVRQIR.mjs';import'../../chunk-LE67NTCN.mjs';import'../../chunk-KNY7SXPJ.mjs';import'../../chunk-DI6CRWSW.mjs';import'../../chunk-VJFIAFZ5.mjs';import'../../chunk-3ANZ3252.mjs';import'../../chunk-QYUPLKLP.mjs';
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
*/
|
|
19
19
|
import { EditorState } from 'prosemirror-state';
|
|
20
20
|
import { TrackedChangeEntry } from '../../utils/comments.mjs';
|
|
21
|
-
import '../../content-
|
|
21
|
+
import '../../content-BEFz1zcs.mjs';
|
|
22
22
|
import '../../formatting-DFtuRFQY.mjs';
|
|
23
23
|
import '../../colors-C3vA7HUU.mjs';
|
|
24
24
|
import '../../docx/wrapTypes.mjs';
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
*/
|
|
19
19
|
import { EditorState } from 'prosemirror-state';
|
|
20
20
|
import { TrackedChangeEntry } from '../../utils/comments.js';
|
|
21
|
-
import '../../content-
|
|
21
|
+
import '../../content-DNcMlHU0.js';
|
|
22
22
|
import '../../formatting-JhqWT_XM.js';
|
|
23
23
|
import '../../colors-C3vA7HUU.js';
|
|
24
24
|
import '../../docx/wrapTypes.js';
|
package/dist/{sectionPropertiesSerializer-CzgskSoA.d.ts → sectionPropertiesSerializer-BJSNK-Wl.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Document } from './types/document.js';
|
|
2
|
-
import { D as DocumentBody, B as BlockContent, S as SectionProperties } from './content-
|
|
2
|
+
import { D as DocumentBody, B as BlockContent, S as SectionProperties } from './content-DNcMlHU0.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Document Serializer - Serialize complete document.xml
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Document } from './types/document.mjs';
|
|
2
|
-
import { D as DocumentBody, B as BlockContent, S as SectionProperties } from './content-
|
|
2
|
+
import { D as DocumentBody, B as BlockContent, S as SectionProperties } from './content-BEFz1zcs.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Document Serializer - Serialize complete document.xml
|
package/dist/types/content.d.mts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* @packageDocumentation
|
|
13
13
|
* @public
|
|
14
14
|
*/
|
|
15
|
-
export { B as BlockContent,
|
|
15
|
+
export { B as BlockContent, v as BlockSdt, y as BookmarkEnd, z as BookmarkStart, w as BreakContent, A as Column, C as Comment, f as CommentRangeEnd, g as CommentRangeStart, G as ComplexField, h as Deletion, D as DocumentBody, J as DrawingContent, E as Endnote, K as EndnotePosition, L as EndnoteProperties, N as Field, O as FieldCharContent, Q as FieldType, U as FooterReference, F as Footnote, V as FootnotePosition, W as FootnoteProperties, x as HeaderFooter, X as HeaderFooterType, Y as HeaderReference, H as Hyperlink, I as Image, Z as ImageCrop, _ as ImagePadding, $ as ImagePosition, a0 as ImageSize, a1 as ImageTransform, a2 as ImageWrap, a3 as InlineSdt, i as Insertion, a4 as InstrTextContent, a5 as LineNumberRestart, a6 as MathEquation, M as MoveFrom, a7 as MoveFromRangeEnd, a8 as MoveFromRangeStart, j as MoveTo, a9 as MoveToRangeEnd, aa as MoveToRangeStart, ab as NoBreakHyphenContent, ac as NoteNumberRestart, ad as NoteRefMarkContent, ae as NoteReferenceContent, af as PageOrientation, P as Paragraph, k as ParagraphContent, b as ParagraphPropertyChange, ag as PropertyChangeInfo, l as Run, m as RunContent, R as RunPropertyChange, u as SdtDataBinding, t as SdtProperties, s as SdtType, ah as Section, S as SectionProperties, ai as SectionStart, aj as SeparatorContent, ak as Shape, al as ShapeContent, am as ShapeFill, an as ShapeOutline, ao as ShapeTextBody, ap as ShapeType, aq as SimpleField, ar as SoftHyphenContent, as as SymbolContent, at as TabContent, T as Table, n as TableCell, d as TableCellPropertyChange, c as TablePropertyChange, o as TableRow, e as TableRowPropertyChange, au as TableStructuralChangeInfo, av as TextBox, p as TextContent, q as TrackedChangeInfo, r as TrackedRunChange, aw as VerticalAlign } from '../content-BEFz1zcs.mjs';
|
|
16
16
|
export { D as DEFAULT_WATERMARK_PRESETS, P as PictureWatermark, T as TextWatermark, W as Watermark, p as pictureWatermarkDisplayEmu } from '../watermark-D90356ZM.mjs';
|
|
17
17
|
import '../formatting-DFtuRFQY.mjs';
|
|
18
18
|
import '../colors-C3vA7HUU.mjs';
|
package/dist/types/content.d.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* @packageDocumentation
|
|
13
13
|
* @public
|
|
14
14
|
*/
|
|
15
|
-
export { B as BlockContent,
|
|
15
|
+
export { B as BlockContent, v as BlockSdt, y as BookmarkEnd, z as BookmarkStart, w as BreakContent, A as Column, C as Comment, f as CommentRangeEnd, g as CommentRangeStart, G as ComplexField, h as Deletion, D as DocumentBody, J as DrawingContent, E as Endnote, K as EndnotePosition, L as EndnoteProperties, N as Field, O as FieldCharContent, Q as FieldType, U as FooterReference, F as Footnote, V as FootnotePosition, W as FootnoteProperties, x as HeaderFooter, X as HeaderFooterType, Y as HeaderReference, H as Hyperlink, I as Image, Z as ImageCrop, _ as ImagePadding, $ as ImagePosition, a0 as ImageSize, a1 as ImageTransform, a2 as ImageWrap, a3 as InlineSdt, i as Insertion, a4 as InstrTextContent, a5 as LineNumberRestart, a6 as MathEquation, M as MoveFrom, a7 as MoveFromRangeEnd, a8 as MoveFromRangeStart, j as MoveTo, a9 as MoveToRangeEnd, aa as MoveToRangeStart, ab as NoBreakHyphenContent, ac as NoteNumberRestart, ad as NoteRefMarkContent, ae as NoteReferenceContent, af as PageOrientation, P as Paragraph, k as ParagraphContent, b as ParagraphPropertyChange, ag as PropertyChangeInfo, l as Run, m as RunContent, R as RunPropertyChange, u as SdtDataBinding, t as SdtProperties, s as SdtType, ah as Section, S as SectionProperties, ai as SectionStart, aj as SeparatorContent, ak as Shape, al as ShapeContent, am as ShapeFill, an as ShapeOutline, ao as ShapeTextBody, ap as ShapeType, aq as SimpleField, ar as SoftHyphenContent, as as SymbolContent, at as TabContent, T as Table, n as TableCell, d as TableCellPropertyChange, c as TablePropertyChange, o as TableRow, e as TableRowPropertyChange, au as TableStructuralChangeInfo, av as TextBox, p as TextContent, q as TrackedChangeInfo, r as TrackedRunChange, aw as VerticalAlign } from '../content-DNcMlHU0.js';
|
|
16
16
|
export { D as DEFAULT_WATERMARK_PRESETS, P as PictureWatermark, T as TextWatermark, W as Watermark, p as pictureWatermarkDisplayEmu } from '../watermark-D90356ZM.js';
|
|
17
17
|
import '../formatting-JhqWT_XM.js';
|
|
18
18
|
import '../colors-C3vA7HUU.js';
|
|
@@ -17,8 +17,8 @@ export { B as BorderSpec, C as ColorValue, S as ShadingProperties, T as ThemeCol
|
|
|
17
17
|
export { C as CellMargins, g as ConditionalFormatStyle, E as EmphasisMark, F as FloatingTableProperties, L as LineSpacingRule, d as ParagraphAlignment, P as ParagraphFormatting, h as TabLeader, e as TabStop, i as TabStopAlignment, j as TableBorders, c as TableCellFormatting, a as TableFormatting, f as TableLook, k as TableMeasurement, b as TableRowFormatting, l as TableWidthType, m as TextEffect, T as TextFormatting, U as UnderlineStyle } from '../formatting-DFtuRFQY.mjs';
|
|
18
18
|
import { a as NumberingDefinitions } from '../lists-CyGxd5Y2.mjs';
|
|
19
19
|
export { A as AbstractNumbering, d as LevelSuffix, L as ListLevel, c as ListRendering, N as NumberFormat, b as NumberingInstance } from '../lists-CyGxd5Y2.mjs';
|
|
20
|
-
import { D as DocumentBody, F as Footnote, E as Endnote,
|
|
21
|
-
export { B as BlockContent,
|
|
20
|
+
import { D as DocumentBody, F as Footnote, E as Endnote, x as HeaderFooter } from '../content-BEFz1zcs.mjs';
|
|
21
|
+
export { B as BlockContent, v as BlockSdt, y as BookmarkEnd, z as BookmarkStart, w as BreakContent, A as Column, C as Comment, f as CommentRangeEnd, g as CommentRangeStart, G as ComplexField, h as Deletion, J as DrawingContent, K as EndnotePosition, L as EndnoteProperties, N as Field, O as FieldCharContent, Q as FieldType, U as FooterReference, V as FootnotePosition, W as FootnoteProperties, X as HeaderFooterType, Y as HeaderReference, H as Hyperlink, I as Image, Z as ImageCrop, _ as ImagePadding, $ as ImagePosition, a0 as ImageSize, a1 as ImageTransform, a2 as ImageWrap, a3 as InlineSdt, i as Insertion, a4 as InstrTextContent, a5 as LineNumberRestart, a6 as MathEquation, M as MoveFrom, a7 as MoveFromRangeEnd, a8 as MoveFromRangeStart, j as MoveTo, a9 as MoveToRangeEnd, aa as MoveToRangeStart, ab as NoBreakHyphenContent, ac as NoteNumberRestart, ad as NoteRefMarkContent, ae as NoteReferenceContent, af as PageOrientation, P as Paragraph, k as ParagraphContent, b as ParagraphPropertyChange, ag as PropertyChangeInfo, l as Run, m as RunContent, R as RunPropertyChange, u as SdtDataBinding, t as SdtProperties, s as SdtType, ah as Section, S as SectionProperties, ai as SectionStart, aj as SeparatorContent, ak as Shape, al as ShapeContent, am as ShapeFill, an as ShapeOutline, ao as ShapeTextBody, ap as ShapeType, aq as SimpleField, ar as SoftHyphenContent, as as SymbolContent, at as TabContent, T as Table, n as TableCell, d as TableCellPropertyChange, c as TablePropertyChange, o as TableRow, e as TableRowPropertyChange, au as TableStructuralChangeInfo, av as TextBox, p as TextContent, q as TrackedChangeInfo, r as TrackedRunChange, aw as VerticalAlign } from '../content-BEFz1zcs.mjs';
|
|
22
22
|
export { D as DEFAULT_WATERMARK_PRESETS, P as PictureWatermark, T as TextWatermark, W as Watermark, p as pictureWatermarkDisplayEmu } from '../watermark-D90356ZM.mjs';
|
|
23
23
|
import { S as StyleDefinitions, T as Theme, F as FontTable, b as RelationshipMap, M as MediaFile } from '../styles-Dqec8Aw6.mjs';
|
|
24
24
|
export { D as DocDefaults, c as FontInfo, R as Relationship, d as RelationshipType, a as Style, e as StyleType, f as ThemeColorScheme, g as ThemeFont, h as ThemeFontScheme } from '../styles-Dqec8Aw6.mjs';
|
package/dist/types/document.d.ts
CHANGED
|
@@ -17,8 +17,8 @@ export { B as BorderSpec, C as ColorValue, S as ShadingProperties, T as ThemeCol
|
|
|
17
17
|
export { C as CellMargins, g as ConditionalFormatStyle, E as EmphasisMark, F as FloatingTableProperties, L as LineSpacingRule, d as ParagraphAlignment, P as ParagraphFormatting, h as TabLeader, e as TabStop, i as TabStopAlignment, j as TableBorders, c as TableCellFormatting, a as TableFormatting, f as TableLook, k as TableMeasurement, b as TableRowFormatting, l as TableWidthType, m as TextEffect, T as TextFormatting, U as UnderlineStyle } from '../formatting-JhqWT_XM.js';
|
|
18
18
|
import { a as NumberingDefinitions } from '../lists-Bn29SzeS.js';
|
|
19
19
|
export { A as AbstractNumbering, d as LevelSuffix, L as ListLevel, c as ListRendering, N as NumberFormat, b as NumberingInstance } from '../lists-Bn29SzeS.js';
|
|
20
|
-
import { D as DocumentBody, F as Footnote, E as Endnote,
|
|
21
|
-
export { B as BlockContent,
|
|
20
|
+
import { D as DocumentBody, F as Footnote, E as Endnote, x as HeaderFooter } from '../content-DNcMlHU0.js';
|
|
21
|
+
export { B as BlockContent, v as BlockSdt, y as BookmarkEnd, z as BookmarkStart, w as BreakContent, A as Column, C as Comment, f as CommentRangeEnd, g as CommentRangeStart, G as ComplexField, h as Deletion, J as DrawingContent, K as EndnotePosition, L as EndnoteProperties, N as Field, O as FieldCharContent, Q as FieldType, U as FooterReference, V as FootnotePosition, W as FootnoteProperties, X as HeaderFooterType, Y as HeaderReference, H as Hyperlink, I as Image, Z as ImageCrop, _ as ImagePadding, $ as ImagePosition, a0 as ImageSize, a1 as ImageTransform, a2 as ImageWrap, a3 as InlineSdt, i as Insertion, a4 as InstrTextContent, a5 as LineNumberRestart, a6 as MathEquation, M as MoveFrom, a7 as MoveFromRangeEnd, a8 as MoveFromRangeStart, j as MoveTo, a9 as MoveToRangeEnd, aa as MoveToRangeStart, ab as NoBreakHyphenContent, ac as NoteNumberRestart, ad as NoteRefMarkContent, ae as NoteReferenceContent, af as PageOrientation, P as Paragraph, k as ParagraphContent, b as ParagraphPropertyChange, ag as PropertyChangeInfo, l as Run, m as RunContent, R as RunPropertyChange, u as SdtDataBinding, t as SdtProperties, s as SdtType, ah as Section, S as SectionProperties, ai as SectionStart, aj as SeparatorContent, ak as Shape, al as ShapeContent, am as ShapeFill, an as ShapeOutline, ao as ShapeTextBody, ap as ShapeType, aq as SimpleField, ar as SoftHyphenContent, as as SymbolContent, at as TabContent, T as Table, n as TableCell, d as TableCellPropertyChange, c as TablePropertyChange, o as TableRow, e as TableRowPropertyChange, au as TableStructuralChangeInfo, av as TextBox, p as TextContent, q as TrackedChangeInfo, r as TrackedRunChange, aw as VerticalAlign } from '../content-DNcMlHU0.js';
|
|
22
22
|
export { D as DEFAULT_WATERMARK_PRESETS, P as PictureWatermark, T as TextWatermark, W as Watermark, p as pictureWatermarkDisplayEmu } from '../watermark-D90356ZM.js';
|
|
23
23
|
import { S as StyleDefinitions, T as Theme, F as FontTable, b as RelationshipMap, M as MediaFile } from '../styles-gEujs7j6.js';
|
|
24
24
|
export { D as DocDefaults, c as FontInfo, R as Relationship, d as RelationshipType, a as Style, e as StyleType, f as ThemeColorScheme, g as ThemeFont, h as ThemeFontScheme } from '../styles-gEujs7j6.js';
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
|
-
import { P as Paragraph } from '../content-
|
|
11
|
+
import { P as Paragraph } from '../content-BEFz1zcs.mjs';
|
|
12
12
|
import '../formatting-DFtuRFQY.mjs';
|
|
13
13
|
import '../colors-C3vA7HUU.mjs';
|
|
14
14
|
import '../docx/wrapTypes.mjs';
|
package/dist/utils/comments.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
|
-
import { P as Paragraph } from '../content-
|
|
11
|
+
import { P as Paragraph } from '../content-DNcMlHU0.js';
|
|
12
12
|
import '../formatting-JhqWT_XM.js';
|
|
13
13
|
import '../colors-C3vA7HUU.js';
|
|
14
14
|
import '../docx/wrapTypes.js';
|
package/dist/utils/index.d.mts
CHANGED
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export { PIXELS_PER_INCH, TWIPS_PER_INCH, clamp, eighthsToPixels, emuToPixels, emuToTwips, formatPx, halfPointsToPixels, halfPointsToPoints, pixelsToEmu, pixelsToTwips, pointsToHalfPoints, pointsToPixels, roundPixels, twipsToEmu, twipsToPixels } from './units.mjs';
|
|
11
11
|
export { C as CreateEmptyDocumentOptions, P as ProcessTemplateOptions, a as ProcessTemplateResult, T as TemplateError, z as ThemeMatrixCell, b as blendColors, c as colorsEqual, d as createDocumentWithText, e as createEmptyDocument, f as createRgbColor, g as createTemplateProcessor, h as createThemeColor, i as darkenColor, A as ensureHexPrefix, B as generateThemeTintShadeMatrix, j as getContrastingColor, k as getMissingVariables, l as getTemplateTags, D as getThemeTintShadeHex, m as isBlack, n as isWhite, o as lightenColor, p as parseColorString, q as previewTemplate, r as processTemplate, s as processTemplateAdvanced, F as processTemplateAndDownload, t as processTemplateAsBlob, u as processTemplateDetailed, v as resolveColor, G as resolveColorToHex, w as resolveHighlightColor, E as resolveHighlightToCss, x as resolveShadingColor, y as validateTemplate } from '../colorResolver-DCBfI4ld.mjs';
|
|
12
|
-
import {
|
|
12
|
+
import { l as Run, P as Paragraph } from '../content-BEFz1zcs.mjs';
|
|
13
13
|
import { T as Theme } from '../styles-Dqec8Aw6.mjs';
|
|
14
14
|
export { D as DocxInput, t as toArrayBuffer } from '../docxInput-DTbCa48g.mjs';
|
|
15
|
-
export { F as FONT_MAPPING, B as FontDefinition, I as InsertPosition, c as canRenderFont, a as countPageBreaks, b as createColumnBreak, d as createHorizontalRule, e as createLineBreak, f as createPageBreak, g as createPageBreakParagraph, h as createPageBreakRun, C as extractFontsFromDocument, i as findPageBreaks, D as getGoogleFontEquivalent, j as getLoadedFonts, k as hasPageBreakBefore, l as insertHorizontalRule, m as insertPageBreak, n as isBreakContent, o as isColumnBreak, p as isFontLoaded, r as isGoogleFontsEnabled, s as isLineBreak, q as isLoading, t as isPageBreak, E as loadDocumentFonts, u as loadFont, G as loadFontDefinitions, v as loadFontFromBuffer, H as loadFontFromUrl, J as loadFontWithMapping, w as loadFonts, K as loadFontsWithMapping, L as onFontError, x as onFontsLoaded, y as preloadCommonFonts, z as removePageBreak, A as setGoogleFontsEnabled } from '../fontLoader-
|
|
15
|
+
export { F as FONT_MAPPING, B as FontDefinition, I as InsertPosition, c as canRenderFont, a as countPageBreaks, b as createColumnBreak, d as createHorizontalRule, e as createLineBreak, f as createPageBreak, g as createPageBreakParagraph, h as createPageBreakRun, C as extractFontsFromDocument, i as findPageBreaks, D as getGoogleFontEquivalent, j as getLoadedFonts, k as hasPageBreakBefore, l as insertHorizontalRule, m as insertPageBreak, n as isBreakContent, o as isColumnBreak, p as isFontLoaded, r as isGoogleFontsEnabled, s as isLineBreak, q as isLoading, t as isPageBreak, E as loadDocumentFonts, u as loadFont, G as loadFontDefinitions, v as loadFontFromBuffer, H as loadFontFromUrl, J as loadFontWithMapping, w as loadFonts, K as loadFontsWithMapping, L as onFontError, x as onFontsLoaded, y as preloadCommonFonts, z as removePageBreak, A as setGoogleFontsEnabled } from '../fontLoader-D3X2Qgb_.mjs';
|
|
16
16
|
import { B as BorderSpec, S as ShadingProperties } from '../colors-C3vA7HUU.mjs';
|
|
17
17
|
import { P as ParagraphFormatting, T as TextFormatting } from '../formatting-DFtuRFQY.mjs';
|
|
18
18
|
export { HeadingInfo, collectHeadings } from './headingCollector.mjs';
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export { PIXELS_PER_INCH, TWIPS_PER_INCH, clamp, eighthsToPixels, emuToPixels, emuToTwips, formatPx, halfPointsToPixels, halfPointsToPoints, pixelsToEmu, pixelsToTwips, pointsToHalfPoints, pointsToPixels, roundPixels, twipsToEmu, twipsToPixels } from './units.js';
|
|
11
11
|
export { C as CreateEmptyDocumentOptions, P as ProcessTemplateOptions, a as ProcessTemplateResult, T as TemplateError, z as ThemeMatrixCell, b as blendColors, c as colorsEqual, d as createDocumentWithText, e as createEmptyDocument, f as createRgbColor, g as createTemplateProcessor, h as createThemeColor, i as darkenColor, A as ensureHexPrefix, B as generateThemeTintShadeMatrix, j as getContrastingColor, k as getMissingVariables, l as getTemplateTags, D as getThemeTintShadeHex, m as isBlack, n as isWhite, o as lightenColor, p as parseColorString, q as previewTemplate, r as processTemplate, s as processTemplateAdvanced, F as processTemplateAndDownload, t as processTemplateAsBlob, u as processTemplateDetailed, v as resolveColor, G as resolveColorToHex, w as resolveHighlightColor, E as resolveHighlightToCss, x as resolveShadingColor, y as validateTemplate } from '../colorResolver-C696sd9x.js';
|
|
12
|
-
import {
|
|
12
|
+
import { l as Run, P as Paragraph } from '../content-DNcMlHU0.js';
|
|
13
13
|
import { T as Theme } from '../styles-gEujs7j6.js';
|
|
14
14
|
export { D as DocxInput, t as toArrayBuffer } from '../docxInput-DTbCa48g.js';
|
|
15
|
-
export { F as FONT_MAPPING, B as FontDefinition, I as InsertPosition, c as canRenderFont, a as countPageBreaks, b as createColumnBreak, d as createHorizontalRule, e as createLineBreak, f as createPageBreak, g as createPageBreakParagraph, h as createPageBreakRun, C as extractFontsFromDocument, i as findPageBreaks, D as getGoogleFontEquivalent, j as getLoadedFonts, k as hasPageBreakBefore, l as insertHorizontalRule, m as insertPageBreak, n as isBreakContent, o as isColumnBreak, p as isFontLoaded, r as isGoogleFontsEnabled, s as isLineBreak, q as isLoading, t as isPageBreak, E as loadDocumentFonts, u as loadFont, G as loadFontDefinitions, v as loadFontFromBuffer, H as loadFontFromUrl, J as loadFontWithMapping, w as loadFonts, K as loadFontsWithMapping, L as onFontError, x as onFontsLoaded, y as preloadCommonFonts, z as removePageBreak, A as setGoogleFontsEnabled } from '../fontLoader-
|
|
15
|
+
export { F as FONT_MAPPING, B as FontDefinition, I as InsertPosition, c as canRenderFont, a as countPageBreaks, b as createColumnBreak, d as createHorizontalRule, e as createLineBreak, f as createPageBreak, g as createPageBreakParagraph, h as createPageBreakRun, C as extractFontsFromDocument, i as findPageBreaks, D as getGoogleFontEquivalent, j as getLoadedFonts, k as hasPageBreakBefore, l as insertHorizontalRule, m as insertPageBreak, n as isBreakContent, o as isColumnBreak, p as isFontLoaded, r as isGoogleFontsEnabled, s as isLineBreak, q as isLoading, t as isPageBreak, E as loadDocumentFonts, u as loadFont, G as loadFontDefinitions, v as loadFontFromBuffer, H as loadFontFromUrl, J as loadFontWithMapping, w as loadFonts, K as loadFontsWithMapping, L as onFontError, x as onFontsLoaded, y as preloadCommonFonts, z as removePageBreak, A as setGoogleFontsEnabled } from '../fontLoader-CH12AtFF.js';
|
|
16
16
|
import { B as BorderSpec, S as ShadingProperties } from '../colors-C3vA7HUU.js';
|
|
17
17
|
import { P as ParagraphFormatting, T as TextFormatting } from '../formatting-JhqWT_XM.js';
|
|
18
18
|
export { HeadingInfo, collectHeadings } from './headingCollector.js';
|
package/package.json
CHANGED
package/dist/chunk-2KPOGFFR.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkIMKU4O3P_js=require('./chunk-IMKU4O3P.js'),chunkDROCYKAR_js=require('./chunk-DROCYKAR.js'),chunk6KYOT4E7_js=require('./chunk-6KYOT4E7.js'),chunkMJ5FQX7Q_js=require('./chunk-MJ5FQX7Q.js'),chunkBJSG6TEG_js=require('./chunk-BJSG6TEG.js'),chunkH57LNDBH_js=require('./chunk-H57LNDBH.js');function B(e,s){let r={};for(let t of e)switch(t.type.name){case "bold":r.bold=true;break;case "italic":r.italic=true;break;case "underline":{let n=t.attrs;if(n.style||n.color){let i=n.color?chunkMJ5FQX7Q_js.a(n.color,s):void 0;r.underline={style:n.style,color:i};}else r.underline=true;break}case "strike":r.strike=true;break;case "textColor":{let n=t.attrs;(n.themeColor||n.rgb)&&(r.color=chunkMJ5FQX7Q_js.a({rgb:n.rgb,themeColor:n.themeColor,themeTint:n.themeTint,themeShade:n.themeShade},s));break}case "highlight":r.highlight=chunkMJ5FQX7Q_js.o(t.attrs.color);break;case "fontSize":{let n=t.attrs;r.fontSize=n.size/2;break}case "fontFamily":{let n=t.attrs;r.fontFamily=n.ascii||n.hAnsi;break}case "characterSpacing":{let n=t.attrs;n.spacing!=null&&n.spacing!==0&&(r.letterSpacing=chunkIMKU4O3P_js.a(n.spacing)),n.position!=null&&n.position!==0&&(r.positionPx=chunkBJSG6TEG_js.k(n.position)),n.scale!=null&&n.scale!==100&&(r.horizontalScale=n.scale),n.kerning!=null&&n.kerning>0&&(r.kerningMinPt=chunkBJSG6TEG_js.l(n.kerning));break}case "allCaps":r.allCaps=true;break;case "smallCaps":r.smallCaps=true;break;case "emboss":r.emboss=true;break;case "imprint":r.imprint=true;break;case "textShadow":r.textShadow=true;break;case "textOutline":r.textOutline=true;break;case "hidden":r.hidden=true;break;case "rtl":r.rtl=true;break;case "textEffect":{let n=t.attrs.effect;(n==="blinkBackground"||n==="lights"||n==="antsBlack"||n==="antsRed"||n==="shimmer"||n==="sparkle")&&(r.textEffect=n);break}case "emphasisMark":{let n=t.attrs.type;n==="dot"||n==="comma"||n==="circle"||n==="underDot"?r.emphasisMark=n:r.emphasisMark="dot";break}case "superscript":r.superscript=true;break;case "subscript":r.subscript=true;break;case "hyperlink":{let n=t.attrs;r.hyperlink={href:n.href,tooltip:n.tooltip};break}case "footnoteRef":{let n=t.attrs,i=typeof n.id=="string"?parseInt(n.id,10):n.id;n.noteType==="endnote"?r.endnoteRefId=i:r.footnoteRefId=i;break}case "comment":{let n=t.attrs.commentId;n&&(r.commentIds||(r.commentIds=[]),r.commentIds.push(n));break}case "insertion":r.isInsertion=true,r.changeAuthor=t.attrs.author,r.changeDate=t.attrs.date,r.changeRevisionId=t.attrs.revisionId;break;case "deletion":r.isDeletion=true,r.changeAuthor=t.attrs.author,r.changeDate=t.attrs.date,r.changeRevisionId=t.attrs.revisionId;break}return r}function G(e){let s=e.defaultTextFormatting;if(!s)return {};let r={};if(s.fontFamily){let t=s.fontFamily.ascii||s.fontFamily.hAnsi;t&&(r.fontFamily=t);}return s.fontSize!=null&&(r.fontSize=s.fontSize/2),r}function D(e){e.hyperlink&&(e.hyperlink={...e.hyperlink,noDefaultStyle:true},delete e.color,delete e.underline);}function $(e){return e==="contentLocked"||e==="sdtContentLocked"}function Y(e,s){let r=e.attrs;if(r.sdtType==="checkbox"&&!($(r.lock)||r.dataBinding!=null))return {kind:"checkbox",groupId:`sdt@${s}`,pos:s,tag:r.tag!=null?String(r.tag):void 0,alias:r.alias!=null?String(r.alias):void 0,checked:typeof r.checked=="boolean"?r.checked:void 0}}function N(e,s,r){let t=[],n=s+1,i=r.theme,l=G(e.attrs),b=e.attrs.styleId,d=typeof b=="string"&&/^TOC\d*$/i.test(b);function f(u,m,p){if(u.isText&&u.text){let a=B(u.marks,i);d&&D(a);let o={kind:"text",text:u.text,...l,...a,pmStart:m,pmEnd:m+u.nodeSize,inlineSdtWidget:p};t.push(o);}else if(u.type.name==="hardBreak")t.push({kind:"lineBreak",pmStart:m,pmEnd:m+u.nodeSize});else if(u.type.name==="tab"){let a=B(u.marks,i),o={kind:"tab",...l,...a,pmStart:m,pmEnd:m+u.nodeSize};t.push(o);}else if(u.type.name==="image"){let a=u.attrs,o=chunkIMKU4O3P_js.b(a.width||100,a.height||100,r.pageContentHeight),c=B(u.marks,i),h={kind:"image",src:a.src,width:o.width,height:o.height,alt:a.alt,transform:a.transform,wrapType:a.wrapType,displayMode:a.displayMode,cssFloat:a.cssFloat,distTop:a.distTop,distBottom:a.distBottom,distLeft:a.distLeft,distRight:a.distRight,position:a.position,cropTop:a.cropTop,cropRight:a.cropRight,cropBottom:a.cropBottom,cropLeft:a.cropLeft,opacity:a.opacity,isInsertion:c.isInsertion,isDeletion:c.isDeletion,changeAuthor:c.changeAuthor,changeDate:c.changeDate,changeRevisionId:c.changeRevisionId,pmStart:m,pmEnd:m+u.nodeSize};t.push(h);}else if(u.type.name==="field"){let a=u.attrs.fieldType,o=a==="PAGE"?"PAGE":a==="NUMPAGES"?"NUMPAGES":a==="DATE"?"DATE":a==="TIME"?"TIME":"OTHER",c=B(u.marks,i);d&&D(c),t.push({kind:"field",fieldType:o,fallback:u.attrs.displayText||"",...l,...c,pmStart:m,pmEnd:m+u.nodeSize});}else if(u.type.name==="math"){let a=u.attrs.plainText||"[equation]";t.push({kind:"text",text:a,italic:true,fontFamily:"Cambria Math",pmStart:m,pmEnd:m+u.nodeSize});}else if(u.type.name==="sdt"){let a=Y(u,m)??p,o=m+1;u.forEach((c,h)=>{f(c,o+h,a);});}}return e.forEach((u,m)=>{f(u,n+m);}),t}function j(e){return Math.max(1,Math.round(e/8*1.333))}var Z={single:"solid",double:"double",dotted:"dotted",dashed:"dashed",thick:"solid",dashSmallGap:"dashed",dotDash:"dashed",dotDotDash:"dotted",triple:"double",wave:"solid",doubleWave:"double",threeDEmboss:"ridge",threeDEngrave:"groove",outset:"outset",inset:"inset"};function w(e,s){if(!e||!e.style||e.style==="none"||e.style==="nil")return;let r={style:Z[e.style]||"solid",width:j(e.size??0),color:e.color?chunkMJ5FQX7Q_js.a(e.color,s):"#000000"};return e.space!==void 0&&(r.space=chunkBJSG6TEG_js.j(e.space)),r}function O(e,s){let r=e.borders;if(!r)return;let t={},n=["top","bottom","left","right"];for(let i of n){let l=r[i],b=l?w(l,s):void 0;t[i]=b??{width:0,style:"none"};}return Object.keys(t).length>0?t:void 0}function V(e,s){let r=[];for(let t=0;t<=s;t+=1){let n=e[t]??0;if(n<=0)break;r.push(n);}return r.length===0?"1.":`${r.join(".")}.`}var q=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]];function W(e,s){if(e<=0)return "";let r=e,t="";for(let[n,i]of q)for(;r>=n;)t+=i,r-=n;return s?t:t.toLowerCase()}function H(e,s){if(e<=0)return "";let r=e,t="";for(;r>0;){let n=(r-1)%26;t=String.fromCharCode(65+n)+t,r=Math.floor((r-1)/26);}return s?t:t.toLowerCase()}function K(e,s){if(e<=0)return "";switch(s){case "upperRoman":return W(e,true);case "lowerRoman":return W(e,false);case "upperLetter":return H(e,true);case "lowerLetter":return H(e,false);case "decimalZero":return chunkH57LNDBH_js.f(e,2);case "decimalZero3":return chunkH57LNDBH_js.f(e,3);case "decimalZero4":return chunkH57LNDBH_js.f(e,4);case "decimalZero5":return chunkH57LNDBH_js.f(e,5);case "none":return "";default:return String(e)}}function X(e,s,r){return e.replace(/%(\d)([.):\]])?/g,(t,n,i="")=>{let l=parseInt(n,10)-1;if(l<0)return "";let b=s[l]??0,d=r?.[l]??"decimal",f=K(b,d);return f?f+i:""})}function _(e,s,r){let t=e.numPr;if(!t)return null;let n=t.numId;if(n==null||n===0)return null;if(e.listIsBullet)return chunk6KYOT4E7_js.p(e.listMarker||"");let i=t.ilvl??0;if((e.listLevelNumFmts?.[i]??e.listNumFmt)==="none")return e.listMarker?e.listMarker:null;let b=e.listAbstractNumId??n,d=s.get(b)??new Array(9).fill(0),f=`${n}:${i}`;r.has(f)||(r.add(f),e.listStartOverride!=null&&(d[i]=e.listStartOverride-1)),d[i]=(d[i]??0)+1;for(let u=i+1;u<d.length;u+=1)d[u]=0;return s.set(b,d),e.listMarker&&e.listMarker.includes("%")?X(e.listMarker,d,e.listLevelNumFmts??void 0):e.listMarker?e.listMarker:V(d,i)}var J="Calibri",Q=11;function A(e,s,r,t,n){let i={};if(e.alignment){let o=e.alignment;o==="both"||o==="distribute"?i.alignment="justify":o==="left"?i.alignment="left":o==="center"?i.alignment="center":o==="right"&&(i.alignment="right");}let l=e._originalFormatting?.beforeAutospacing,b=e._originalFormatting?.afterAutospacing;(l||b||e.spaceBefore!=null||e.spaceAfter!=null||e.lineSpacing!=null)&&(i.spacing={},l?i.spacing.before=14:e.spaceBefore!=null&&(i.spacing.before=chunkIMKU4O3P_js.a(e.spaceBefore)),b?i.spacing.after=14:e.spaceAfter!=null&&(i.spacing.after=chunkIMKU4O3P_js.a(e.spaceAfter)),e.lineSpacing!=null&&(e.lineSpacingRule==="exact"||e.lineSpacingRule==="atLeast"?(i.spacing.line=chunkIMKU4O3P_js.a(e.lineSpacing),i.spacing.lineUnit="px",i.spacing.lineRule=e.lineSpacingRule):(i.spacing.line=e.lineSpacing/240,i.spacing.lineUnit="multiplier",i.spacing.lineRule="auto"))),e.spacingExplicit&&(i.spacingExplicit=e.spacingExplicit);let d=e.indentLeft,f=e.indentFirstLine,u=e.hangingIndent;if(e.numPr?.numId&&d==null&&(d=((e.numPr.ilvl??0)+1)*720,f==null&&(f=-360,u=true)),(d!=null||e.indentRight!=null||f!=null)&&(i.indent={},d!=null&&(i.indent.left=chunkIMKU4O3P_js.a(d)),e.indentRight!=null&&(i.indent.right=chunkIMKU4O3P_js.a(e.indentRight)),f!=null&&(u?i.indent.hanging=Math.abs(chunkIMKU4O3P_js.a(f)):i.indent.firstLine=chunkIMKU4O3P_js.a(f))),e.styleId&&(i.styleId=e.styleId),e.borders){let o=e.borders;i.borders={};let c=h=>h?w(h,s):void 0;o.top&&(i.borders.top=c(o.top)),o.bottom&&(i.borders.bottom=c(o.bottom)),o.left&&(i.borders.left=c(o.left)),o.right&&(i.borders.right=c(o.right)),o.between&&(i.borders.between=c(o.between)),o.bar&&(i.borders.bar=c(o.bar)),!i.borders.top&&!i.borders.bottom&&!i.borders.left&&!i.borders.right&&!i.borders.between&&!i.borders.bar&&delete i.borders;}let m=chunkMJ5FQX7Q_js.b(e.shading?.fill,s);m&&(i.shading=`#${m}`),e.tabs&&e.tabs.length>0&&(i.tabs=e.tabs.map(o=>({val:ee(o.alignment),pos:o.position,leader:o.leader}))),e.pageBreakBefore&&(i.pageBreakBefore=true),e.keepNext&&(i.keepNext=true),e.keepLines&&(i.keepLines=true),e.contextualSpacing&&(i.contextualSpacing=true),e.bidi&&(i.bidi=true),e.styleId&&(i.styleId=e.styleId),e.numPr&&(i.numPr={numId:e.numPr.numId,ilvl:e.numPr.ilvl});let p=r&&t?_(e,r,t):null;p!=null?i.listMarker=p:e.listMarker&&(i.listMarker=e.listMarker),e.listIsBullet!=null&&(i.listIsBullet=e.listIsBullet),e.listMarkerHidden&&(i.listMarkerHidden=true),e.listMarkerFontFamily&&(i.listMarkerFontFamily=e.listMarkerFontFamily),e.listMarkerFontSize&&(i.listMarkerFontSize=e.listMarkerFontSize),e.listMarkerSuffix&&(i.listMarkerSuffix=e.listMarkerSuffix),n!==void 0&&(i.defaultTabStopTwips=n);let a=e.defaultTextFormatting;if(a&&(a.fontSize!=null&&(i.defaultFontSize=a.fontSize/2),a.fontFamily&&(i.defaultFontFamily=a.fontFamily.ascii||a.fontFamily.hAnsi)),e.pPrIns&&(i.pPrIns=e.pPrIns),e.pPrDel&&(i.pPrDel=e.pPrDel),e.numPr){let o=e.pPrChange,c=Array.isArray(o)&&o.some(h=>!h?.previousFormatting?.numPr);e.pPrDel?i.listMarkerRevision="del":(e.pPrIns||c)&&(i.listMarkerRevision="ins");}return i}function ee(e){switch(e){case "left":return "start";case "right":return "end";case "center":return "center";case "decimal":return "decimal";case "bar":return "bar";case "clear":return "clear";case "num":return "start";default:return "start"}}function M(e,s,r){let t=e.attrs,n=N(e,s,r),i=A(t,r.theme,r.listCounters,r.listSeenNumIds,r.defaultTabStopTwips);return {kind:"paragraph",id:chunkIMKU4O3P_js.c(),runs:n,attrs:i,pmStart:s,pmEnd:s+e.nodeSize}}function te(e,s,r,t){let n=[],i=s+1;e.forEach(o=>{o.type.name==="paragraph"?n.push(M(o,i,r)):o.type.name==="table"&&n.push(U(o,i,r)),i+=o.nodeSize;});let l=e.attrs,b=l.width,d=l.widthType,f=b&&(!d||d==="dxa"||d==="auto")?chunkIMKU4O3P_js.a(b):void 0,u=l.margins,m=(o,c)=>{if(o!=null){let h=chunkIMKU4O3P_js.a(o);if(h>0)return h}if(c!=null){let h=chunkIMKU4O3P_js.a(c);if(h>=0)return h}return 0},p={top:m(u?.top,t?.top),right:m(u?.right,t?.right),bottom:m(u?.bottom,t?.bottom),left:m(u?.left,t?.left)},a=l.cellMarker;return {id:chunkIMKU4O3P_js.c(),blocks:n,colSpan:l.colspan,rowSpan:l.rowspan,width:f,widthValue:b,widthType:d,verticalAlign:l.verticalAlign,background:l.backgroundColor?`#${l.backgroundColor}`:void 0,borders:O(l,r.theme),padding:p,noWrap:l.noWrap||void 0,trackedMarker:a??void 0}}function ne(e,s,r,t){let n=[],i=s+1;e.forEach(d=>{(d.type.name==="tableCell"||d.type.name==="tableHeader")&&n.push(te(d,i,r,t)),i+=d.nodeSize;});let l=e.attrs,b=l._originalFormatting;return {id:chunkIMKU4O3P_js.c(),cells:n,height:l.height?chunkIMKU4O3P_js.a(l.height):void 0,heightRule:l.heightRule??void 0,isHeader:l.isHeader,cantSplit:b?.cantSplit||void 0,trackedIns:l.trIns??void 0,trackedDel:l.trDel??void 0}}function U(e,s,r){let t=[],n=s+1,i=e.attrs.cellMargins;e.forEach(c=>{c.type.name==="tableRow"&&t.push(ne(c,n,r,i)),n+=c.nodeSize;});let b=e.attrs.columnWidths?.map(chunkIMKU4O3P_js.a),d=e.attrs.width,f=e.attrs.widthType;if(!b&&t.length>0){let h=t[0].cells.map(k=>k.width);h.every(k=>k!==void 0&&k>0)&&(b=h);}let u=e.attrs.justification,m=e.attrs._originalFormatting,p=m?.indent?.value&&m.indent.type==="dxa"?chunkIMKU4O3P_js.a(m.indent.value):void 0,a=e.attrs.floating,o=a?{horzAnchor:a.horzAnchor,vertAnchor:a.vertAnchor,tblpX:a.tblpX!==void 0?chunkIMKU4O3P_js.a(a.tblpX):void 0,tblpXSpec:a.tblpXSpec,tblpY:a.tblpY!==void 0?chunkIMKU4O3P_js.a(a.tblpY):void 0,tblpYSpec:a.tblpYSpec,topFromText:a.topFromText!==void 0?chunkIMKU4O3P_js.a(a.topFromText):void 0,bottomFromText:a.bottomFromText!==void 0?chunkIMKU4O3P_js.a(a.bottomFromText):void 0,leftFromText:a.leftFromText!==void 0?chunkIMKU4O3P_js.a(a.leftFromText):void 0,rightFromText:a.rightFromText!==void 0?chunkIMKU4O3P_js.a(a.rightFromText):void 0}:void 0;return {kind:"table",id:chunkIMKU4O3P_js.c(),rows:t,columnWidths:b,width:d,widthType:f,justification:u,indent:p,floating:o,pmStart:s,pmEnd:s+e.nodeSize}}function re(e,s,r){let t=e.attrs,n=t.wrapType,i=n==="behind"||n==="inFront",l=chunkIMKU4O3P_js.b(t.width||100,t.height||100,r);return {kind:"image",id:chunkIMKU4O3P_js.c(),src:t.src,width:l.width,height:l.height,alt:t.alt,transform:t.transform,anchor:i?{isAnchored:true,offsetH:t.distLeft,offsetV:t.distTop,behindDoc:n==="behind"}:void 0,hlinkHref:t.hlinkHref,pmStart:s,pmEnd:s+e.nodeSize}}function ie(e,s,r){let t=e.attrs,n=[];return e.forEach((i,l)=>{if(i.type.name==="paragraph"){let b=M(i,s+1+l,r);n.push(b);}}),{kind:"textBox",id:chunkIMKU4O3P_js.c(),width:t.width??chunkDROCYKAR_js.b,height:t.height??void 0,fillColor:t.fillColor,outlineWidth:t.outlineWidth,outlineColor:t.outlineColor,outlineStyle:t.outlineStyle,margins:{top:t.marginTop??chunkDROCYKAR_js.a.top,bottom:t.marginBottom??chunkDROCYKAR_js.a.bottom,left:t.marginLeft??chunkDROCYKAR_js.a.left,right:t.marginRight??chunkDROCYKAR_js.a.right},content:n,displayMode:t.displayMode,cssFloat:t.cssFloat,wrapType:t.wrapType,wrapText:t.wrapText,anchorTarget:t.anchorTarget,position:t.position,distTop:t.distTop,distBottom:t.distBottom,distLeft:t.distLeft,distRight:t.distRight,pmStart:s,pmEnd:s+e.nodeSize}}function xe(e,s={}){let r=e.attrs?.defaultTabStopTwips,t={...s,defaultFont:s.defaultFont??J,defaultSize:s.defaultSize??Q,defaultTabStopTwips:s.defaultTabStopTwips??r},n=[],i=0,l={top:1440,bottom:1440,left:1440,right:1440};t.listCounters||(t.listCounters=new Map),t.listSeenNumIds||(t.listSeenNumIds=new Set);let b=(d,f,u)=>{if(d.type.name==="blockSdt"){let p=d.attrs,a={id:`sdt@${f}`,sdtType:typeof p.sdtType=="string"?p.sdtType:"richText",tag:p.tag!=null?String(p.tag):void 0,alias:p.alias!=null?String(p.alias):void 0,lock:p.lock!=null?String(p.lock):void 0,checked:typeof p.checked=="boolean"?p.checked:void 0,bound:p.dataBinding!=null?true:void 0,repeatingItem:/<w15:repeatingSectionItem[\s/>]/.test(String(p.rawPropertiesXml??""))?true:void 0},o=[...u,a];d.forEach((c,h)=>{b(c,f+1+h,o);});return}let m=n.length;switch(d.type.name){case "paragraph":{let p=M(d,f,t),a=d.attrs;n.push(p);let o=a._sectionProperties;if(o||a.sectionBreakType){let c={kind:"sectionBreak",id:chunkIMKU4O3P_js.c(),type:o?.sectionStart??a.sectionBreakType};if(o){if((o.pageWidth!==void 0||o.pageHeight!==void 0)&&(c.pageSize={w:chunkIMKU4O3P_js.a(o.pageWidth??12240),h:chunkIMKU4O3P_js.a(o.pageHeight??15840)}),o.marginTop!==void 0||o.marginBottom!==void 0||o.marginLeft!==void 0||o.marginRight!==void 0){let k={top:o.marginTop??l.top,bottom:o.marginBottom??l.bottom,left:o.marginLeft??l.left,right:o.marginRight??l.right};c.margins={top:chunkIMKU4O3P_js.a(k.top),bottom:chunkIMKU4O3P_js.a(k.bottom),left:chunkIMKU4O3P_js.a(k.left),right:chunkIMKU4O3P_js.a(k.right)},l=k;}let h=o.columnCount??1;if(h>1){let k={count:h,gap:chunkIMKU4O3P_js.a(o.columnSpace??720),equalWidth:o.equalWidth??true,separator:o.separator};c.columns=k;}}n.push(c);}}break;case "table":n.push(U(d,f,t));break;case "image":n.push(re(d,f,t.pageContentHeight));break;case "textBox":n.push(ie(d,f,t));break;case "horizontalRule":case "pageBreak":{let p={kind:"pageBreak",id:chunkIMKU4O3P_js.c(),pmStart:f,pmEnd:f+d.nodeSize};n.push(p);break}}if(u.length>0)for(let p=m;p<n.length;p++)n[p].sdtGroups=u;};return e.forEach((d,f)=>{b(d,i+f,[]);}),n}exports.a=w;exports.b=X;exports.c=xe;
|
package/dist/chunk-34DJT72K.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkJFZIXFRC_js=require('./chunk-JFZIXFRC.js'),chunkBJSG6TEG_js=require('./chunk-BJSG6TEG.js');function u(e){return {sdtType:e.sdtType,id:e.id??null,alias:e.alias??null,tag:e.tag??null,lock:e.lock??null,placeholder:e.placeholder??null,showingPlaceholder:e.showingPlaceholder??false,dateFormat:e.dateFormat??null,listItems:e.listItems?JSON.stringify(e.listItems):null,checked:e.checked??null,dataBinding:e.dataBinding?JSON.stringify(e.dataBinding):null,rawPropertiesXml:e.rawPropertiesXml??null,rawEndPropertiesXml:e.rawEndPropertiesXml??null}}function g(e){let i={sdtType:e.sdtType??"richText"};if(typeof e.id=="number"&&(i.id=e.id),e.alias!=null&&(i.alias=String(e.alias)),e.tag!=null&&(i.tag=String(e.tag)),e.lock!=null&&(i.lock=e.lock),e.placeholder!=null&&(i.placeholder=String(e.placeholder)),e.showingPlaceholder&&(i.showingPlaceholder=true),e.dateFormat!=null&&(i.dateFormat=String(e.dateFormat)),typeof e.listItems=="string"&&e.listItems)try{i.listItems=JSON.parse(e.listItems);}catch{}if(e.checked!=null&&(i.checked=e.checked),typeof e.dataBinding=="string"&&e.dataBinding)try{i.dataBinding=JSON.parse(e.dataBinding);}catch{}return e.rawPropertiesXml!=null&&(i.rawPropertiesXml=String(e.rawPropertiesXml)),e.rawEndPropertiesXml!=null&&(i.rawEndPropertiesXml=String(e.rawEndPropertiesXml)),i}function a(e){return !!e.wrap&&e.wrap.type!=="inline"}function w(e){let i=e.wrap?.type??"inline",t=e.wrap?.wrapText,l=e.position?.horizontal?.alignment;return {displayMode:d(i),cssFloat:p(i,t,l),wrapType:i,wrapText:t,anchorTarget:a(e)?"followingBlock":void 0,position:e.position?f(e.position):void 0,distTop:e.wrap?.distT!=null?chunkBJSG6TEG_js.f(e.wrap.distT):void 0,distBottom:e.wrap?.distB!=null?chunkBJSG6TEG_js.f(e.wrap.distB):void 0,distLeft:e.wrap?.distL!=null?chunkBJSG6TEG_js.f(e.wrap.distL):void 0,distRight:e.wrap?.distR!=null?chunkBJSG6TEG_js.f(e.wrap.distR):void 0}}function x(e){return e.anchorTarget==="followingBlock"||s(e)}function P(e){let i=e.position;if(!(!i?.horizontal&&!i?.vertical))return {horizontal:{relativeTo:i.horizontal?.relativeTo??"margin",alignment:i.horizontal?.align,posOffset:i.horizontal?.posOffset},vertical:{relativeTo:i.vertical?.relativeTo??"paragraph",alignment:i.vertical?.align,posOffset:i.vertical?.posOffset}}}function y(e){let i=e.wrapType??(e.displayMode==="float"?"square":"inline");if(!i||i==="inline")return;let t={type:i};return e.wrapText&&(t.wrapText=e.wrapText),e.distTop!=null&&(t.distT=chunkBJSG6TEG_js.g(e.distTop)),e.distBottom!=null&&(t.distB=chunkBJSG6TEG_js.g(e.distBottom)),e.distLeft!=null&&(t.distL=chunkBJSG6TEG_js.g(e.distLeft)),e.distRight!=null&&(t.distR=chunkBJSG6TEG_js.g(e.distRight)),t}function d(e){return e==="inline"?"inline":e==="topAndBottom"?"block":"float"}function s(e){return e.displayMode==="float"||chunkJFZIXFRC_js.a(e.wrapType)}function p(e,i,t){return e==="inline"||e==="topAndBottom"?"none":i==="left"?"right":i==="right"||t==="left"?"left":t==="right"?"right":"none"}function f(e){return {horizontal:e.horizontal?{relativeTo:e.horizontal.relativeTo,posOffset:e.horizontal.posOffset,align:e.horizontal.alignment}:void 0,vertical:e.vertical?{relativeTo:e.vertical.relativeTo,posOffset:e.vertical.posOffset,align:e.vertical.alignment}:void 0}}exports.a=u;exports.b=g;exports.c=a;exports.d=w;exports.e=x;exports.f=P;exports.g=y;
|