@docx-editor.dev/core 2.31.0 → 2.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.ts +16 -16
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.ts +17 -15
- package/dist/binding.js +1 -1
- package/dist/{chrome-print-BWvaVEhD.d.ts → chrome-print-CznJ0ucN.d.ts} +58 -23
- package/dist/chunk-25EXMBV2.cjs +5 -0
- package/dist/chunk-2CWQY27B.cjs +1 -0
- package/dist/chunk-3IEXDEFH.cjs +7 -0
- package/dist/chunk-65XBN67F.cjs +2 -0
- package/dist/{chunk-5JPIEN54.cjs → chunk-6NVZNB7O.cjs} +2 -2
- package/dist/chunk-6UDJUI3W.cjs +2 -0
- package/dist/chunk-ACLR4DMK.js +1 -0
- package/dist/{chunk-2E2RPEKX.js → chunk-B2BEELUE.js} +1 -1
- package/dist/chunk-DDFHKQFU.js +30 -0
- package/dist/{chunk-MOYYRVFV.cjs → chunk-E4IAO4CY.cjs} +1 -1
- package/dist/chunk-ETDZFNMI.js +2 -0
- package/dist/chunk-FDSL5OJU.cjs +30 -0
- package/dist/chunk-FS7CMYLT.js +4 -0
- package/dist/chunk-GDS24SZN.js +30 -0
- package/dist/chunk-GIY6NT2X.js +5 -0
- package/dist/chunk-GWM3AKUD.js +18 -0
- package/dist/chunk-HDOXACHP.js +2 -0
- package/dist/chunk-IILEENID.js +1 -0
- package/dist/chunk-L5TYBFDB.js +1 -0
- package/dist/chunk-MNF2K7NN.cjs +30 -0
- package/dist/chunk-O324RB6R.cjs +1 -0
- package/dist/chunk-OKMEMSKB.cjs +1 -0
- package/dist/chunk-QXJKYNYZ.js +1 -0
- package/dist/chunk-RALTVLB6.js +2 -0
- package/dist/chunk-SRVKFUFI.js +3 -0
- package/dist/chunk-TELQ52LG.cjs +1 -0
- package/dist/chunk-TJHE5EET.cjs +1 -0
- package/dist/chunk-UMMRURPE.js +7 -0
- package/dist/chunk-WN7ICTA5.js +1 -0
- package/dist/{chunk-XSTGE3NI.cjs → chunk-XJYZVGQR.cjs} +1 -1
- package/dist/chunk-ZGTIE3QJ.cjs +4 -0
- package/dist/chunk-ZOZI27AW.cjs +18 -0
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.ts +20 -4
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.cjs +1 -1
- package/dist/collaboration.d.ts +5 -5
- package/dist/collaboration.js +1 -1
- package/dist/contracts/document.d.ts +3 -3
- package/dist/contracts/editor.d.ts +13 -9
- package/dist/contracts/interaction.d.ts +2 -2
- package/dist/contracts/modules.d.ts +15 -12
- package/dist/contracts/types.d.ts +135 -2
- package/dist/{custom-node-writes-TeUvMP13.d.ts → custom-node-writes-CLJKGD9t.d.ts} +7 -2
- package/dist/{diagnostic-context-DJ0P1uZE.d.ts → diagnostic-context-BtDUY3v2.d.ts} +1 -1
- package/dist/{diagnostic-hints-C9JlLz1L.d.ts → diagnostic-hints-DK8-V0fk.d.ts} +2 -2
- package/dist/{document-protection-C8x3P2J6.d.ts → document-protection-NaniLHWF.d.ts} +1 -1
- package/dist/{editor-B2ShlO23.d.ts → editor-DZwOTmlR.d.ts} +104 -239
- package/dist/editor-fonts-D_-vjuJi.d.ts +53 -0
- package/dist/{editor-scope-C7ke1KJG.d.ts → editor-scope-B3L-1ALc.d.ts} +1 -1
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +2 -2
- package/dist/editor.d.ts +74 -30
- package/dist/editor.js +1 -1
- package/dist/export.cjs +2 -2
- package/dist/export.d.ts +9 -15
- package/dist/export.js +1 -1
- package/dist/{failure-NS2lsya4.d.ts → failure-6KGFrDO9.d.ts} +1 -1
- package/dist/{font-resolver-CWh40DYp.d.ts → font-resolver-BlQNGdvR.d.ts} +1 -1
- package/dist/{headless-document-view-qOpaCF82.d.ts → headless-document-view-Bcz9_Qva.d.ts} +115 -4
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +27 -25
- package/dist/index.js +1 -1
- package/dist/{layout-shaping-CWS3j0Xr.d.ts → layout-shaping-E5J4Z1Gf.d.ts} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +24 -17
- package/dist/layout.js +1 -1
- package/dist/{note-properties-QsKh24sM.d.ts → note-properties-Ds5R2_3F.d.ts} +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.ts +11 -7
- package/dist/output.js +1 -1
- package/dist/{protocol-COZJUKUY.d.ts → protocol-DKa4qt7F.d.ts} +75 -5
- package/dist/{review-paragraph-order-C_QbCKcH.d.ts → review-paragraph-order-Dc17w_6v.d.ts} +1 -1
- package/dist/revision-projection-Cn6rZJ7H.d.ts +258 -0
- package/dist/{semantic-cell-selection-Cub9FDa8.d.ts → semantic-cell-selection-BaUR0iJ4.d.ts} +2 -2
- package/dist/{semantic-interaction-dApRIYpt.d.ts → semantic-interaction-CJoHLoOl.d.ts} +1 -1
- package/dist/{semantic-paint-DLzA8sjP.d.ts → semantic-paint-BPw_n0li.d.ts} +7 -4
- package/dist/{semantic-record-queries-3yp9o11g.d.ts → semantic-record-queries-C0rJ3sB4.d.ts} +1 -1
- package/dist/{semantic-records-B-akgRch.d.ts → semantic-records-BvN-WWst.d.ts} +216 -406
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +13 -14
- package/dist/store.js +1 -1
- package/dist/{types-barrel-CkF2JbU4.d.ts → tree-op-types-C_S2niXW.d.ts} +117 -26
- package/dist/{tree-package-store-B8l8DX3Z.d.ts → tree-package-store-CRHvMyNj.d.ts} +2 -2
- package/dist/{tree-session-contract-DeLRqohz.d.ts → tree-session-contract-D1awo_dA.d.ts} +5 -5
- package/dist/unsupported-elements-CVos5cqe.d.ts +23 -0
- package/docs/accept-reject-without-scrolling.md +95 -0
- package/docs/comment-on-found-text.md +72 -0
- package/docs/custom-review-cards.md +178 -0
- package/docs/highlight-ranges.md +48 -0
- package/docs/index.md +36 -0
- package/docs/propose-rewrite.md +247 -0
- package/docs/tracked-replacement.md +68 -0
- package/package.json +3 -2
- package/dist/chunk-243W4WW2.cjs +0 -2
- package/dist/chunk-4S24UOPG.js +0 -30
- package/dist/chunk-5SO5QDMV.cjs +0 -2
- package/dist/chunk-6IDOVU6L.cjs +0 -1
- package/dist/chunk-6JIJOZDW.js +0 -1
- package/dist/chunk-BTQKU64Q.cjs +0 -1
- package/dist/chunk-DBOOTED4.cjs +0 -30
- package/dist/chunk-EOTAXOJY.cjs +0 -5
- package/dist/chunk-FDAKJ2SJ.cjs +0 -30
- package/dist/chunk-FNNOJNGY.js +0 -3
- package/dist/chunk-FT33HRZP.js +0 -5
- package/dist/chunk-HC6YNKUI.cjs +0 -1
- package/dist/chunk-HZ66UCIS.js +0 -2
- package/dist/chunk-IBRBNT37.cjs +0 -1
- package/dist/chunk-IVIN7X43.js +0 -30
- package/dist/chunk-LZY6B6IV.js +0 -4
- package/dist/chunk-N6B3BXCL.js +0 -1
- package/dist/chunk-Q5K2GGNG.js +0 -2
- package/dist/chunk-R2XINWVE.js +0 -7
- package/dist/chunk-SUEXVBPR.js +0 -1
- package/dist/chunk-T2QQHG5C.js +0 -18
- package/dist/chunk-VWIJKH4A.js +0 -1
- package/dist/chunk-WO4V6PNS.cjs +0 -18
- package/dist/chunk-XMJKFURD.cjs +0 -4
- package/dist/chunk-YQWMI6J5.cjs +0 -7
- package/dist/chunk-ZCJS7D7S.js +0 -2
- package/dist/omml-equation-BsLAa2lX.d.ts +0 -115
package/dist/chunk-EOTAXOJY.cjs
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkXSTGE3NI_cjs=require('./chunk-XSTGE3NI.cjs'),chunk5SO5QDMV_cjs=require('./chunk-5SO5QDMV.cjs'),chunkIBRBNT37_cjs=require('./chunk-IBRBNT37.cjs'),chunk243W4WW2_cjs=require('./chunk-243W4WW2.cjs'),chunk6IDOVU6L_cjs=require('./chunk-6IDOVU6L.cjs'),chunkWO4V6PNS_cjs=require('./chunk-WO4V6PNS.cjs'),prosemirrorModel=require('prosemirror-model'),prosemirrorState=require('prosemirror-state'),prosemirrorView=require('prosemirror-view'),prosemirrorKeymap=require('prosemirror-keymap'),prosemirrorCommands=require('prosemirror-commands');function Y(t){return t.attributes?.val}function W(t){let e=Y(t);return e===void 0||!(e==="0"||e==="false"||e==="off")}var Bo=/^[0-9A-Fa-f]{6}$/,Lo=/^\d{1,6}$/;function Je(t){return t===void 0||t==="auto"?null:Bo.test(t)?`#${t}`:null}var _o={single:"solid",words:"solid",thick:"solid",double:"double",dotted:"dotted",dottedHeavy:"dotted",dash:"dashed",dashedHeavy:"dashed",dashLong:"dashed",dashLongHeavy:"dashed",dotDash:"dashed",dashDotHeavy:"dashed",dotDotDash:"dashed",dashDotDotHeavy:"dashed",wave:"wavy",wavyHeavy:"wavy",wavyDouble:"wavy"},jo={black:"#000000",blue:"#0000ff",cyan:"#00ffff",darkBlue:"#000080",darkCyan:"#008080",darkGray:"#808080",darkGreen:"#008000",darkMagenta:"#800080",darkRed:"#800000",darkYellow:"#808000",green:"#00ff00",lightGray:"#c0c0c0",magenta:"#ff00ff",red:"#ff0000",yellow:"#ffff00",white:"#ffffff"};function Ho(t){return !t||!/^[\w \-.+]{1,64}$/.test(t)?null:`"${t}"`}function Dn(t,e=false){let n=chunkWO4V6PNS_cjs.nd(t);return n===null||Math.abs(n)>999999||!e&&n<0?null:n}function V(t,e=false){let n=Dn(t,e);return n===null?null:`${n/20}pt`}function An(t){let e=[],n=[],r=null,a=null;for(let o of t)switch(o.localName){case "b":e.push(`font-weight:${W(o)?"bold":"normal"}`);break;case "i":e.push(`font-style:${W(o)?"italic":"normal"}`);break;case "u":{let i=Y(o)??"single";if(i==="none"||!W(o))break;n.push("underline"),r=_o[i]??"solid",a=Je(o.attributes?.color);break}case "strike":W(o)&&n.push("line-through");break;case "dstrike":W(o)&&n.push("line-through");break;case "caps":W(o)&&e.push("text-transform:uppercase");break;case "smallCaps":W(o)&&e.push("font-variant:small-caps");break;case "vertAlign":{let i=Y(o);i==="superscript"?e.push("vertical-align:super","font-size:0.75em"):i==="subscript"&&e.push("vertical-align:sub","font-size:0.75em");break}case "color":{let i=Je(Y(o));i&&e.push(`color:${i}`);break}case "highlight":{let i=jo[Y(o)??""];i&&e.push(`background-color:${i}`);break}case "sz":{let i=Y(o);i!==void 0&&Lo.test(i)&&e.push(`font-size:${Number(i)/2}pt`);break}case "rFonts":{let i=Ho(o.attributes?.ascii??o.attributes?.hAnsi);i&&e.push(`font-family:${i}`);break}case "spacing":{let i=V(Y(o),true);i&&e.push(`letter-spacing:${i}`);break}}return n.length>0&&(e.push(`text-decoration-line:${[...new Set(n)].join(" ")}`),r&&e.push(`text-decoration-style:${r}`),a&&e.push(`text-decoration-color:${a}`)),e.join(";")}var zo={left:"left",start:"left",right:"right",end:"right",center:"center",both:"justify",distribute:"justify"};function Fn(t){let e=[];for(let n of t)switch(n.localName){case "jc":{let r=zo[Y(n)??""];r&&e.push(`text-align:${r}`);break}case "ind":{let r=V(n.attributes?.left??n.attributes?.start,true),a=V(n.attributes?.right??n.attributes?.end,true),o=V(n.attributes?.firstLine),i=V(n.attributes?.hanging);r&&e.push(`margin-left:${r}`),a&&e.push(`margin-right:${a}`),o?e.push(`text-indent:${o}`):i&&e.push(`text-indent:-${i}`);break}case "spacing":{let r=V(n.attributes?.before),a=V(n.attributes?.after);r&&e.push(`margin-top:${r}`),a&&e.push(`margin-bottom:${a}`);let o=Dn(n.attributes?.line),i=n.attributes?.lineRule;o!==null&&i!=="exact"&&i!=="atLeast"?e.push(`line-height:${(o/240).toFixed(3)}`):o!==null&&e.push(`line-height:${o/20}pt`);break}case "shd":{let r=Je(n.attributes?.fill);r&&e.push(`background-color:${r}`);break}case "pageBreakBefore":W(n)&&e.push("break-before:page");break;}return e.join(";")}var w=new prosemirrorModel.Schema({nodes:{doc:{content:"paragraph+"},paragraph:{content:"inline*",group:"block",attrs:{nodeId:{default:null},props:{default:[]}},toDOM:t=>{let e=Fn(t.attrs.props??[]);return ["p",{"data-node-id":String(t.attrs.nodeId??""),...e?{style:e}:{}},0]},parseDOM:[{tag:"p",getAttrs:t=>typeof t=="string"?null:{nodeId:t.getAttribute("data-node-id")||null,props:[]}}]},text:{group:"inline"},tab:{inline:true,group:"inline",atom:true,selectable:false,toDOM:()=>["span",{"data-token":"tab",class:"docx-tab"},"\u2192"],parseDOM:[{tag:'span[data-token="tab"]'}]},hardBreak:{inline:true,group:"inline",atom:true,selectable:false,toDOM:()=>["br"],parseDOM:[{tag:"br"}]},pageBreak:{inline:true,group:"inline",atom:true,selectable:false,toDOM:()=>["span",{"data-token":"page-break",class:"docx-page-break"}],parseDOM:[{tag:'span[data-token="page-break"]'}]},unknownInline:{inline:true,group:"inline",atom:true,selectable:false,draggable:false,attrs:{nodeId:{default:null},label:{default:""}},toDOM:t=>["span",{"data-token":"unknown","data-node-id":String(t.attrs.nodeId??""),contenteditable:"false",class:"docx-unknown-inline",title:String(t.attrs.label||"Content this editor cannot edit yet. It is preserved.")}],parseDOM:[{tag:'span[data-token="unknown"]',getAttrs:t=>typeof t=="string"?false:{nodeId:t.getAttribute("data-node-id")||null,label:""}}]}},marks:{runProps:{attrs:{props:{default:[]}},excludes:"runProps",toDOM:t=>{let e=t.attrs.props??[],n=An(e);return ["span",{"data-run-props":Uo(e),...n?{style:n}:{}},0]},parseDOM:[{tag:"span[data-run-props]",getAttrs:t=>{if(typeof t=="string")return false;let e=Wo(t.getAttribute("data-run-props"));return e?{props:e}:false}}]}}});function Uo(t){return JSON.stringify(Array.isArray(t)?t:[])}function Wo(t){if(!t)return null;try{let e=JSON.parse(t);if(!Array.isArray(e))return null;let n=[];for(let r of e){if(typeof r!="object"||r===null)return null;let a=r;if(typeof a.localName!="string"||a.attributes!==void 0&&(typeof a.attributes!="object"||a.attributes===null))return null;n.push(a.attributes===void 0?{localName:a.localName}:{localName:a.localName,attributes:a.attributes});}return n}catch{return null}}function Ge(t){for(let e of t.marks)if(e.type.name==="runProps")return e.attrs.props??[];return []}function Te(t,e){return JSON.stringify(Ie(t))===JSON.stringify(Ie(e))}function Ie(t){return [...t].map(e=>({localName:e.localName,attributes:Object.fromEntries(Object.entries(e.attributes??{}).sort(([n],[r])=>n<r?-1:1))})).sort((e,n)=>e.localName<n.localName?-1:1)}function Ke(t){if(!t||t.kind==="textValue")return [];let e=[];for(let n of t.children){if(n.kind==="textValue"||n.namespaceUri!==chunkWO4V6PNS_cjs.la||n.localName==="rPrChange"||n.localName==="pPrChange")continue;let r={};for(let a of n.attributes)a.namespaceUri===chunkWO4V6PNS_cjs.la&&(r[a.localName]=a.value);e.push(Object.keys(r).length>0?{localName:n.localName,attributes:r}:{localName:n.localName});}return e}function Bn(t){return t.kind==="textValue"?"":`${{drawing:"Picture",pict:"Picture",object:"Embedded object",fldSimple:"Field",hyperlink:"Hyperlink",sdt:"Content control",tbl:"Table"}[t.localName]??t.localName} \u2014 preserved, not editable yet`}function F(t){if(t.kind==="textValue")return [];let e=[],n=o=>{if(o.kind!=="run")return;let i=o.children.find(d=>d.kind==="runProperties"),l=Ke(i);for(let d of o.children)if(d.kind!=="runProperties"){if(d.kind==="tab"){e.push({kind:"tab"});continue}if(d.kind==="hardBreak"){e.push(chunkWO4V6PNS_cjs.ob(d)?{kind:"pageBreak"}:{kind:"hardBreak"});continue}if(d.kind==="text"){let u="";for(let x of d.children)x.kind==="textValue"&&(u+=x.value);u.length>0&&e.push({kind:"text",text:u,props:l});continue}e.push({kind:"unknown",nodeId:d.id,label:Bn(d),modelLength:d.kind==="drawing"||chunkWO4V6PNS_cjs.Ld(d)||chunkWO4V6PNS_cjs.qd(d)||chunkWO4V6PNS_cjs.fb(d)!==null?1:0});}},r=o=>{if(o.kind==="run"){n(o);return}e.push({kind:"unknown",nodeId:o.id,label:Bn(o),modelLength:0});},a=(o,i)=>{for(let l of o)if(!(l.kind==="textValue"||l.kind==="paragraphProperties")&&!(i>=chunkWO4V6PNS_cjs.wa)){if(chunkWO4V6PNS_cjs.ya(l)&&!chunkWO4V6PNS_cjs.va(l.kind)&&i<chunkWO4V6PNS_cjs.wa){a(l.children.filter(d=>!chunkWO4V6PNS_cjs.sh(l,d)),chunkWO4V6PNS_cjs.xa(l,i));continue}if(chunkWO4V6PNS_cjs.Uc(l)){let d=chunkWO4V6PNS_cjs.Wc(l);d&&a(d,chunkWO4V6PNS_cjs.xa(l,i));continue}r(l);}};return a(t.children,0),e}function ae(t){let e=[],n=r=>{if(r.kind!=="textValue"){if(r.kind==="body"){for(let a of r.children)a.kind==="paragraph"&&e.push(a);return}for(let a of r.children)n(a);}};return n(t.root),e}var Ln=chunkWO4V6PNS_cjs.ub(16),_n=chunkWO4V6PNS_cjs.tb();function Yo(t,e){let n=_n.get(t);if(!n){let r=[];chunkWO4V6PNS_cjs.Sc([t],r,0),n=Object.freeze(r),_n.set(t,n,n.length);}for(let r of n)e.push(r);}function B(t){let e=Ln.get(t);if(e)return e;let n=[];for(let r of chunkWO4V6PNS_cjs.Oc(t))if(r.root.kind!=="textValue")for(let a of r.root.children)Yo(a,n);return Ln.set(t,n),n}function q(t){let e=ae(t).map(n=>{let r=n.kind==="textValue"?void 0:n.children.find(o=>o.kind==="paragraphProperties"),a=F(n).map(o=>{switch(o.kind){case "text":return w.text(o.text,o.props.length>0?[w.marks.runProps.create({props:o.props})]:[]);case "tab":return w.node("tab");case "hardBreak":return w.node("hardBreak");case "pageBreak":return w.node("pageBreak");default:return w.node("unknownInline",{nodeId:o.nodeId,label:o.label})}});return w.node("paragraph",{nodeId:n.id,props:Ke(r)},a)});return w.node("doc",null,e.length>0?e:[w.node("paragraph")])}function Jo(t,e){let n=[];return t.forEach(r=>{if(r.isText&&r.text){n.push({kind:"text",text:r.text,props:Ge(r)});return}r.type.name==="tab"?n.push({kind:"tab"}):r.type.name==="hardBreak"?n.push({kind:"hardBreak"}):r.type.name==="pageBreak"?n.push({kind:"pageBreak"}):r.type.name==="unknownInline"&&n.push({kind:"unknown",nodeId:String(r.attrs.nodeId??""),label:String(r.attrs.label??""),modelLength:e.has(String(r.attrs.nodeId??""))?1:0});}),n}function D(t){let e="";for(let n of t)n.kind==="text"?e+=n.text:n.kind==="tab"?e+=" ":n.kind==="hardBreak"?e+=`
|
|
2
|
-
`:n.kind==="pageBreak"?e+=chunkWO4V6PNS_cjs.mb:n.modelLength===1&&(e+=chunkWO4V6PNS_cjs.qf);return e}function j(t){let e=[],n=0;for(let r of t)r.kind==="text"?n+=r.text.length:r.kind==="tab"||r.kind==="hardBreak"||r.kind==="pageBreak"?n+=1:(e.push(`${r.nodeId}@${n}`),n+=r.modelLength);return e}function Go(t,e){if(t===e)return null;let n=0,r=Math.min(t.length,e.length);for(;n<r&&t[n]===e[n];)n+=1;let a=t.length,o=e.length;for(;a>n&&o>n&&t[a-1]===e[o-1];)a-=1,o-=1;return {start:n,endBefore:a,endAfter:o}}function jn(t){let e=[];for(let n of t)if(n.kind==="text")for(let r=0;r<n.text.length;r+=1)e.push(n.props);else n.kind==="tab"||n.kind==="hardBreak"||n.kind==="pageBreak"?e.push(e[e.length-1]??[]):n.kind==="unknown"&&n.modelLength===1&&e.push([]);return e}function Ko(t,e,n,r,a){let o=[],i=D(e),l=D(n),d=Go(i,l),u=[],x=0,m=false;for(let y of e){if(y.kind!=="unknown"){x+=y.kind==="text"?y.text.length:1;continue}let p=x;y.modelLength===1&&d&&(d.start<x+1&&d.endBefore>x&&(m=true),d.endBefore<=x&&(p+=d.endAfter-d.endBefore)),u.push(`${y.nodeId}@${p}`),x+=y.modelLength;}if(m||JSON.stringify(u)!==JSON.stringify(j(n)))return {ok:false,reason:"unknown-content-moved",detail:t};if(Te(r,a)||o.push({op:"setParagraphProperties",paragraphId:t,properties:Ie(a)}),d&&(d.endBefore>d.start&&o.push({op:"deleteText",paragraphId:t,start:d.start,end:d.endBefore}),d.endAfter>d.start)){let y=l.slice(d.start,d.endAfter),p=d.start,g="",k=()=>{g.length!==0&&(o.push({op:"insertText",paragraphId:t,offset:p,text:g}),p+=g.length,g="");};for(let O of y)O===" "?(k(),o.push({op:"insertTab",paragraphId:t,offset:p}),p+=1):O===`
|
|
3
|
-
`?(k(),o.push({op:"insertHardBreak",paragraphId:t,offset:p}),p+=1):O===chunkWO4V6PNS_cjs.mb?(k(),o.push({op:"insertPageBreak",paragraphId:t,offset:p}),p+=1):g+=O;k();}if(!d){let y=jn(e),p=jn(n),g=0;for(;g<p.length;){if(Te(y[g]??[],p[g])){g+=1;continue}let k=g,O=p[g];for(;g<p.length&&Te(p[g],O)&&!Te(y[g]??[],p[g]);)g+=1;o.push({op:"setRunProperties",paragraphId:t,start:k,end:g,properties:Ie(O)});}}return {ok:true,ops:o}}function Xe(t,e){let n=ae(t),r=new Set;for(let l of n)for(let d of F(l))d.kind==="unknown"&&d.modelLength===1&&r.add(d.nodeId);let a=l=>Jo(l,r),o=[];if(e.forEach(l=>{l.type.name==="paragraph"&&o.push(l);}),o.length!==e.childCount)return {ok:false,reason:"unsupported-node"};let i=o.length-n.length;if(i===0){let l=[];for(let[d,u]of o.entries()){let x=n[d];if(u.attrs.nodeId!==x.id)return {ok:false,reason:"paragraph-reordered",detail:String(u.attrs.nodeId)};let m=Ko(x.id,F(x),a(u),Ke(x.kind==="textValue"?void 0:x.children.find(y=>y.kind==="paragraphProperties")),u.attrs.props??[]);if(!m.ok)return m;l.push(...m.ops);}return {ok:true,ops:l}}return i===1?Xo(n,o,a):i===-1?Qo(n,o,a):{ok:false,reason:"paragraph-count-unexplained",detail:String(i)}}function Xo(t,e,n){for(let r=0;r<t.length;r+=1){let a=t[r],o=e[r],i=e[r+1];if(!o||!i||o.attrs.nodeId!==a.id)continue;let l=i.attrs.nodeId;if(l!==null&&l!==a.id)continue;let d=n(o),u=n(i),x=F(a),m=D(d);if(m+D(u)===D(x)&&JSON.stringify(j([...d,...u]))===JSON.stringify(j(x))&&Hn(t,e,r,n)&&zn(t,e,r+1,r+2,n))return {ok:true,ops:[{op:"splitParagraph",paragraphId:a.id,offset:m.length}]}}return {ok:false,reason:"split-not-clean"}}function Qo(t,e,n){for(let r=0;r+1<t.length;r+=1){let a=t[r],o=t[r+1],i=e[r];if(!i||i.attrs.nodeId!==a.id)continue;let l=[...F(a),...F(o)],d=n(i);if(D(d)===D(l)&&JSON.stringify(j(d))===JSON.stringify(j(l))&&Hn(t,e,r,n)&&zn(t,e,r+2,r+1,n))return {ok:true,ops:[{op:"joinParagraphs",firstId:a.id,secondId:o.id}]}}return {ok:false,reason:"join-not-clean"}}function Hn(t,e,n,r){for(let a=0;a<n;a+=1){let o=e[a],i=t[a];if(!o||o.attrs.nodeId!==i.id||D(r(o))!==D(F(i))||JSON.stringify(j(r(o)))!==JSON.stringify(j(F(i))))return false}return true}function zn(t,e,n,r,a){for(let o=0;n+o<t.length;o+=1){let i=t[n+o],l=e[r+o];if(!l||l.attrs.nodeId!==i.id||D(a(l))!==D(F(i))||JSON.stringify(j(a(l)))!==JSON.stringify(j(F(i))))return false}return true}function Vo(t,e){return chunkWO4V6PNS_cjs.Ta(t,e)!==null}function Qe(t,e,n){if(!n||n.created.length>0||n.deleted.length>0||n.splitJoin.length>0)return q(e);let r=new Map;t.forEach(d=>{let u=d.attrs.nodeId;typeof u=="string"&&r.set(u,d);});let a=new Set(n.dirty),o=ae(e);if(o.length!==t.childCount)return q(e);let i=q(e),l=[];for(let[d,u]of o.entries()){let x=r.get(u.id);l.push(x&&!a.has(u.id)?x:i.child(d));}return w.node("doc",null,l)}var qo=8*1024*1024;function $n(){let t=new WeakMap;function*e(r){let a=t.get(r);if(a)return a.slice();let o=yield*chunkWO4V6PNS_cjs.He(r);return t=new WeakMap,o.byteLength<=qo&&t.set(r,o.slice()),o}return Object.assign(r=>{let a=e(r);for(;;){let o=a.next();if(o.done)return o.value}},{steps:e})}function Wn(t){return B(t).map(e=>chunkWO4V6PNS_cjs.hj(t,e.id)??"").join(`
|
|
4
|
-
`)}var Zo=64,Un=new WeakMap;function Ve(t,e=0){if(e>Zo)return false;let n=Un.get(t);if(n!==void 0)return n;let r=false;for(let a of t.children)if(a.kind!=="textValue"&&(a.kind==="commentRangeStart"||a.kind==="commentReference"||Ve(a,e+1))){r=true;break}return chunkWO4V6PNS_cjs.rb(t)&&Un.set(t,r),r}var er="/word/numbering.xml";function tr(t,e,n){if(t.relationships!==e.relationships||t.contentTypes!==e.contentTypes||t.parts.size!==e.parts.size)return false;for(let[r,a]of e.parts)if(!(r===n||r===er)&&t.parts.get(r)!==a)return false;return true}function nr(t,e){let n=t.kind==="revision"?t.ranges[0]??null:t.range;if(!n)return null;let r=e.get(n.start.paragraphId);return r===void 0?null:r}function Yn(t,e,n){for(let a of e)if(a.ranges.length===0)return false;let r=new Set;for(let a of t)a.kind!=="revision"||a.ranges.length>0||Gn(a,n)||r.add(chunkWO4V6PNS_cjs.Mj(a));for(let a of e)if(r.has(chunkWO4V6PNS_cjs.Mj(a)))return false;return true}function Jn(t,e,n,r){let a=e.get(n);if(a===void 0)return [...t];let o=[],i=null;for(let l of t){if(l.kind==="revision"&&Gn(l,n)){i===null&&(i=o.length);continue}if(i===null){let d=nr(l,e);d!==null&&d>a&&(i=o.length);}o.push(l);}if(i===null&&(i=o.length),r.length>0){let l=r.length<2?[...r]:[...r].sort((d,u)=>chunkWO4V6PNS_cjs.Tj(d,e)-chunkWO4V6PNS_cjs.Tj(u,e));o.splice(i,0,...l);}return chunkWO4V6PNS_cjs.Ck(o)}function Gn(t,e){return t.ranges.length>0&&t.ranges.every(n=>n.start.paragraphId===e&&n.end.paragraphId===e)}function or(t,e){return t.range?t.range.start.paragraphId===e||t.range.end.paragraphId===e:false}function rr(t,e){return t.revisionKind==="structural"&&t.ranges.some(n=>n.start.paragraphId===e||n.end.paragraphId===e)}function ar(t,e){return t.ranges.length===0||!t.ranges.some(r=>r.start.paragraphId===e||r.end.paragraphId===e)?false:!t.ranges.every(r=>r.start.paragraphId===e&&r.end.paragraphId===e)}function Kn(t,e,n){return t.fromRevision!==e.bodyRevision||n.currentPackageRevision!==e.packageRevision+1&&(n.changePackage!==n.currentPackage||!tr(e.pkg,n.currentPackage,n.part.name))||t.story!==void 0&&t.story.kind!=="body"||t.impact==="global"?false:e.commentsPart===n.commentsPart&&e.commentsExtendedPart===n.commentsExtendedPart}function Xn(t,e){let n=chunkWO4V6PNS_cjs.Ua(t,e);if(!n)return false;let r=n.children.findIndex(o=>o.id===e),a=n.children[r-1];return a?.kind==="paragraph"&&chunkWO4V6PNS_cjs.rk({...t,root:a}).some(o=>o.paragraphMark)}function Qn(t,e,n,r){if(!Kn(t,e,r)||t.splitJoin.length!==1)return false;let a=t.splitJoin[0],o,i;if("split"in a){if(t.deleted.length>0||t.created.length!==1||t.created[0]!==a.split.tail)return false;o=i=[a.split.from,a.split.tail];}else {if(t.created.length>0||t.deleted.length!==1||t.deleted[0]!==a.join.removed)return false;o=[a.join.kept,a.join.removed],i=[a.join.kept];}for(let d of i){let u=chunkWO4V6PNS_cjs.Ta(r.part,d);if(!u||u.kind!=="paragraph"||chunkWO4V6PNS_cjs.rk({...r.part,root:u}).length>0)return false}if(Xn(r.part,i[0]))return false;let l=d=>d!==void 0&&o.includes(d);for(let d of n){let u=d.kind==="revision"?d.ranges:d.range?[d.range]:[];for(let x of u)if(l(x.start.paragraphId)||l(x.end.paragraphId))return false}return true}function Vn(t,e,n,r){if(!Kn(t,e,r)||t.dirty.length!==1||t.created.length>0||t.deleted.length>0||t.splitJoin.length>0)return null;let{part:a}=r,o=t.dirty[0],i=chunkWO4V6PNS_cjs.Ta(a,o);if(!i||i.kind!=="paragraph"||t.impact!=="text-local"&&(chunkWO4V6PNS_cjs.rk({...a,root:i}).length>0||t.impact==="flow-structural"&&chunkWO4V6PNS_cjs.Ua(a,o)?.localName!=="body")||Xn(a,o))return null;for(let l of n){if(l.kind==="comment"){if(or(l,o))return null;continue}if(l.kind==="custom"){if(l.range?.start.paragraphId===o)return null;continue}if(rr(l,o)||ar(l,o))return null}return o}function sr(t,e){if(t.size!==e.size)return false;for(let[n,r]of t){let a=e.get(n);if(!a||a.nodeId!==r.nodeId||a.label!==r.label||a.data!==r.data)return false}return true}function ir(t,e){return t.root===e.root&&t.commentsPart===e.commentsPart&&t.commentsExtendedPart===e.commentsExtendedPart&&t.stylesPart===e.stylesPart&&t.furnitureParts.length===e.furnitureParts.length&&t.furnitureParts.every((n,r)=>n===e.furnitureParts[r])&&sr(t.customNodePayloads,e.customNodePayloads)}function qn(){let t=[];return {get(e){let n=t.findIndex(a=>ir(a.inputs,e));if(n<0)return;let[r]=t.splice(n,1);return t.unshift(r),r.items},set(e,n){let r=t.findIndex(a=>a.inputs.root===e.root);r>=0&&t.splice(r,1),t.unshift({inputs:e,items:n}),t.length>8&&(t.length=8);}}}var to=/^[\p{L}\p{N}\p{M} \-.+_,;]{1,64}$/u,lr=["ascii","hAnsi","cs","eastAsia"],cr=["asciiTheme","hAnsiTheme","cstheme","eastAsiaTheme"],dr=128,ur=/[\u0000-\u001F\u007F-\u009F]/;function A(t){return t.kind!=="textValue"}function Z(t,e){return t.attributes.find(n=>n.localName===e)?.value}function no(t,e){let n=new Map;for(let a of t)for(let o of a.children)if(A(o))for(let[i,l]of ao(o,e))n.has(i)||n.set(i,l);let r=[...n.values()];return r.sort((a,o)=>a<o?-1:a>o?1:0),r}var qe=new WeakMap,oo=16,ro=32;function ao(t,e,n=0){let r=e?.major??null,a=e?.minor??null,o=e?.majorEastAsia??null,i=e?.minorEastAsia??null,l=e?.majorBidi??null,d=e?.minorBidi??null,u=qe.get(t);if(u&&u.major===r&&u.minor===a&&u.majorEastAsia===o&&u.minorEastAsia===i&&u.majorBidi===l&&u.minorBidi===d)return u.byFold;if(t.children.length>=oo&&n<ro&&t.localName!=="rFonts"){let p=new Map;for(let g of t.children)if(A(g))for(let[k,O]of ao(g,e,n+1))p.has(k)||p.set(k,O);return qe.set(t,{major:r,minor:a,majorEastAsia:o,minorEastAsia:i,majorBidi:l,minorBidi:d,byFold:p}),p}let x=new Map,m=p=>{if(!p||!to.test(p))return;let g=p.toLowerCase();x.has(g)||x.set(g,p);},y=[t];for(;y.length>0;){let p=y.pop();if(A(p)){if(p.localName==="rFonts"){for(let g of lr)m(Z(p,g));if(e)for(let g of cr)m(chunk243W4WW2_cjs.Ba(Z(p,g),e));}for(let g=p.children.length-1;g>=0;g-=1)y.push(p.children[g]);}}return qe.set(t,{major:r,minor:a,majorEastAsia:o,minorEastAsia:i,majorBidi:l,minorBidi:d,byFold:x}),x}function so(t){let e=new Map;for(let r of t)for(let a of r.children)if(A(a))for(let[o,i]of io(a))e.has(o)||e.set(o,i);let n=[...e.values()];return n.sort((r,a)=>r<a?-1:r>a?1:0),n}var Zn=new WeakMap,pr=new Map;function io(t,e=0){let n=Zn.get(t);if(n)return n;let r=i=>{let l=i.size===0?pr:i;return Zn.set(t,l),l},a=new Map;if(t.children.length>=oo&&e<ro&&t.localName!=="sym"){for(let i of t.children)if(A(i))for(let[l,d]of io(i,e+1))a.has(l)||a.set(l,d);return r(a)}let o=[t];for(;o.length>0;){let i=o.pop();if(A(i)){if(i.localName==="sym"&&i.namespaceUri===chunkWO4V6PNS_cjs.la){let l=i.attributes.find(u=>u.localName==="font"&&(u.namespaceUri===chunkWO4V6PNS_cjs.la||u.namespaceUri===""))?.value,d=chunkXSTGE3NI_cjs.c(l);d!==null&&!a.has(d.toLowerCase())&&a.set(d.toLowerCase(),d);}for(let l=i.children.length-1;l>=0;l-=1)o.push(i.children[l]);}}return r(a)}function lo(t){let e=[...t];for(;e.length>0;){let n=e.pop();if(A(n)){if(n.localName==="t"&&n.namespaceUri===chunkWO4V6PNS_cjs.la){for(let r of n.children)if(!A(r)&&r.value.length>0)return true;continue}for(let r of n.children)e.push(r);}}return false}var fr=new Set(["paragraph","character","table","numbering"]),mr=/^[0-9A-Fa-f]{6}$/,gr=16,eo=new Map([["normal",0],["title",1],["subtitle",2],["heading 1",11],["heading 2",12],["heading 3",13],["heading 4",14],["heading 5",15],["heading 6",16],["heading 7",17],["heading 8",18],["heading 9",19]]);function co(t){return t.children}function Ze(t,e){for(let n of co(t))if(A(n)&&n.localName===e)return n}function yr(t){return eo.get(t.name.toLowerCase())??eo.get(t.styleId.toLowerCase())??Number.MAX_SAFE_INTEGER}function et(t){return t===void 0||t.length===0||t.length>dr||ur.test(t)?null:t}function uo(t,e){if(!t)return [];let n=new Map;for(let o of t.children){if(!A(o)||o.localName!=="style")continue;let i=et(Z(o,"styleId"));i!==null&&!n.has(i)&&n.set(i,o);}let r=o=>{let i=false,l=false,d=null,u=false,x=false,m=new Set,y=o;for(let k=0;k<gr&&y!==null&&!m.has(y);k+=1){m.add(y);let O=n.get(y);if(!O)break;let b=Ze(O,"rPr");for(let v of b?co(b):[]){if(!A(v))continue;let T=Z(v,"val"),E=T!=="0"&&T!=="false"&&T!=="off";v.localName==="b"&&!u?(i=E,u=true):v.localName==="i"&&!x?(l=E,x=true):v.localName==="color"&&d===null&&T&&mr.test(T)&&(d=T);}let R=Ze(O,"basedOn");y=R?et(Z(R,"val")):null;}let p=e?.(o),g=p?.fontFamily??null;return {fontFamily:g!==null&&to.test(g)?g:null,fontSizePt:p?.fontSizeHalfPoints!=null&&p.fontSizeHalfPoints>0?p.fontSizeHalfPoints/2:null,bold:i,italic:l,color:d}},a=[];for(let[o,i]of n){let l=Z(i,"type");if(l===void 0||!fr.has(l))continue;let d=Ze(i,"name"),u=et(d?Z(d,"val"):void 0);a.push({styleId:o,name:u??o,type:l,preview:r(o)});}return a.map((o,i)=>({entry:o,index:i,rank:yr(o)})).sort((o,i)=>o.rank-i.rank||o.index-i.index).map(o=>o.entry)}var hr=128,xr=/[\u0000-\u001F\u007F-\u009F]/,Pr=/[\u0000-\u001F\u007F-\u009F]/g,kr=200;function nt(t){return t.kind!=="textValue"}function po(t,e){for(let n of t.children)if(nt(n)&&n.localName===e)return n}function tt(t,e){return t.attributes.find(n=>n.localName===e)?.value}function Or(t){let e=new Map;if(!t)return e;for(let n of t.children){if(!nt(n)||n.localName!=="style"||tt(n,"type")!=="paragraph")continue;let r=tt(n,"styleId");if(r===void 0||r.length===0||r.length>hr||xr.test(r))continue;let a=chunkIBRBNT37_cjs.a(n);a!==null&&e.set(r,a);}return e}function ot(t){let e=po(t,"pPr"),n=e?po(e,"pStyle"):void 0;return n?tt(n,"val"):void 0}function fo(t,e){let n=Or(e);if(n.size===0)return [];let r=[];for(let a of ae(t)){if(!nt(a))continue;let o=ot(a);if(o===void 0)continue;let i=n.get(o);if(i===void 0)continue;let l=chunkWO4V6PNS_cjs.hj(t,a.id)??"",d=a.kind==="paragraph"?chunkWO4V6PNS_cjs.jj(a,l):l,u=chunkWO4V6PNS_cjs.lb(d).replace(Pr," ").trim().slice(0,kr);u.length!==0&&r.push({text:u,level:i,blockId:a.id});}return r}function Sr(t,e,n){let r=new Map,a=n(t);for(let o of a){let i=r.get(o.hostParagraphId);i?i.push(o):r.set(o.hostParagraphId,[o]);}return r}function br(t,e,n){let r=[];for(let a of chunkWO4V6PNS_cjs.Rc(t.root)){let o=e.get(a.id);if(o)for(let i of o)r.push(i);}return r}function mo(t,e,n=chunkWO4V6PNS_cjs.wi){let r=[],a=new Map;for(let o of t){if(r.push(o),o.scope?.kind==="note")continue;let i=a.get(o.part);i||(i=Sr(o.part,e,n),a.set(o.part,i));for(let l of br(o,i)){let d=o.scope;r.push({part:o.part,root:l.root,scope:{kind:"frame",id:l.root.id,drawingNodeId:l.drawingNodeId,hostParagraphId:l.hostParagraphId,...d?.kind==="headerFooter"?{owner:d}:{}}});}}return r}var Ne=48,Rr=/[\u0000-\u001F\u007F-\u009F]/g;function vr(t){let e=[],n=chunkWO4V6PNS_cjs.mg(t),r=new Map;for(let a of n.segments)chunkWO4V6PNS_cjs.yf(a.node)&&r.set(a.node.id,a.formatRunIds??[]);return chunkWO4V6PNS_cjs.$c(t.children,0,a=>{if(a.kind==="run"){e.push({id:a.id,start:n.spanOf(a)?.start??0});return}if(chunkWO4V6PNS_cjs.yf(a))for(let o of r.get(a.id)??[]){let i=n.spanOf(o);i&&e.push({id:o,start:i.start});}},{descendRevisions:true}),e}function Tr(t){let e=chunkWO4V6PNS_cjs.Qc(t);return e?[{part:t,root:e}]:[]}function Ir(t,e){let n=[];for(let r of ["header","footer"])for(let a of t){let o=r==="header"?a.headers:a.footers;for(let[i,l]of o){if(!chunkWO4V6PNS_cjs.ef(a,i)||e.has(l.part))continue;e.add(l.part);let d=chunkWO4V6PNS_cjs.Oc(l.part).find(u=>u.kind===r);d&&n.push({part:l.part,root:d.root,scope:{kind:"headerFooter",rId:l.rId}});}}return n}function go(t,e,n){if(!t)return [];let r=[];for(let a of chunkWO4V6PNS_cjs.Kc(t.root)){let o=chunkWO4V6PNS_cjs.yc(a);!chunkWO4V6PNS_cjs.Ac(a)||o===null||!n.has(o)||r.push({part:t,root:a,scope:{kind:"note",id:chunkWO4V6PNS_cjs.oc(e,o)}});}return r}function Nr(t,e){let n=Tr(t);if(e){let r=new Set;for(let a of Ir(e.headerFooterBySection,r))n.push(a);for(let a of go(e.footnotes,"footnote",e.referencedNoteIds.footnote))n.push(a);for(let a of go(e.endnotes,"endnote",e.referencedNoteIds.endnote))n.push(a);}return mo(n)}function yo(t,e){if(t.length===0)return {index:0,offset:e};for(let n=t.length-1;n>=0;n-=1){let r=t[n].start;if(e>=r)return {index:n,offset:e-r}}return {index:0,offset:e}}function Er(t,e,n){let r=t.findIndex(a=>a.id===e);return r<0?null:{index:r,offset:n}}function rt(t,e){return chunkWO4V6PNS_cjs.lb(t).replace(Rr," ").slice(0,e)}var wr=1e3;function ho(t,e,n={},r){let a=n.limit!==void 0&&Number.isInteger(n.limit)&&n.limit>0?Math.min(n.limit,2e3):2e3,o={...n.matchCase===void 0?{}:{matchCase:n.matchCase},...n.wholeWord===void 0?{}:{wholeWord:n.wholeWord}},i=e.slice(0,wr),l=i.map(()=>({matches:[],truncated:false})),d=i.map((x,m)=>chunk243W4WW2_cjs.sa(x)?m:-1);if(d=d.filter(x=>x>=0),d.length===0)return l;let u=n.stories==="body"?void 0:r;for(let x of Nr(t,u)){let m=0;for(let y of chunkWO4V6PNS_cjs.Rc(x.root)){if(y.kind!=="paragraph")continue;let p=m;m+=1;let g=chunkWO4V6PNS_cjs.hj(x.part,y.id)??"",k=chunk5SO5QDMV_cjs.d(y,g);if(k.text.length===0)continue;let O=null,b=false;for(let R of d){let v=l[R],T=a-v.matches.length,E=k.findOccurrences(i[R],Math.max(T,1),o);if(T===0&&E.matches.length>0){v.truncated=true,b=true;continue}for(let N of E.matches){let M=N.start+N.length;O??=vr(y);let L=k.resultRunAddressAt(N.start),ee=L?Er(O,L.runId,L.offset)??yo(O,N.rawStart):yo(O,N.rawStart);v.matches.push({blockId:y.id,start:N.rawStart,length:N.rawEnd-N.rawStart,paragraphIndex:p,runIndex:ee.index,runOffset:ee.offset,...x.scope?{scope:x.scope}:{},text:rt(k.displaySlice(N.start,M),256),contextBefore:rt(k.displaySlice(Math.max(0,N.start-Ne),N.start),Ne),contextAfter:rt(k.displaySlice(M,M+Ne),Ne)});}E.truncated&&(v.truncated=true,b=true);}if(b&&(d=d.filter(R=>!l[R].truncated)),d.length===0)return l}}return l}var Mr=32;function xo(t){let e=null;return((n,r)=>{let a=t.revision(),o=typeof n!="string",i=`${r?.matchCase===true?"c":""}${r?.wholeWord===true?"w":""}`,l=`${r?.limit??""}:${r?.stories??"all"}`,d=JSON.stringify([i,l,n]);e?.revision!==a&&(e={revision:a,results:new Map});let u=e.results.get(d);if(u)return u;let x=t.bodyPart(),m=t.currentPackage(),y={footnote:new Set,endnote:new Set};for(let k of chunkWO4V6PNS_cjs.mh(x))y[k.noteKind].add(k.noteId);let p=ho(x,o?n:[n],r,{headerFooterBySection:t.headerFooterBySection(),footnotes:chunkWO4V6PNS_cjs.lh(m,"footnote")??null,endnotes:chunkWO4V6PNS_cjs.lh(m,"endnote")??null,referencedNoteIds:y}),g=o?p:p[0];return e.results.size>=Mr&&e.results.delete(e.results.keys().next().value),e.results.set(d,g),g})}var Cr=["lt1","dk1","lt2","dk2","accent1","accent2","accent3","accent4","accent5","accent6"];function se(t,e=null,n=null){return chunk243W4WW2_cjs.Aa(t,e,n)}function Po(t){let e=chunkWO4V6PNS_cjs.Ed(t),n=[];for(let r of Cr){let a=e.get(r);if(!a)return [];n.push({slot:r,hex:a});}return n}var ko=new WeakMap;function st(t){let e=ko.get(t);if(e!==void 0)return e;let n=chunkWO4V6PNS_cjs.wb(t),r=n===null||!chunkWO4V6PNS_cjs.vb(n)?null:n;return ko.set(t,r),r}var at=class{#e;#t;constructor(e,n){this.#e=e,this.#t=n;}get size(){return this.#e.size}get(e){if(this.#e.has(e))return this.#t.find(n=>e.startsWith(`${n.name}#`))}has(e){return this.get(e)!==void 0}*entries(){for(let e of this.#e.keys()){let n=this.get(e);n&&(yield [e,n]);}}keys(){return this.#e.keys()}*values(){for(let[,e]of this.entries())yield e;}[Symbol.iterator](){return this.entries()}forEach(e,n){for(let[r,a]of this.entries())e.call(n,a,r,this);}};function Oo(t,e){return Object.freeze({...t,partByNode:new at(t.ordinalByNode,e)})}function So(t){let e=new Map,n=new Map,r=new Map,a=new Set,o=new Map,i=new Map,l=0;for(let d of t)for(let u of B(d)){r.set(u.id,l),o.set(u.id,d),l+=1;let x=st(u);if(x===null)continue;e.set(u.id,x);let m=x.toUpperCase(),y=i.get(m);y?(y.push(u.id),a.add(m)):(i.set(m,[u.id]),n.set(m,u.id));}return Object.freeze({paraIdByNode:e,nodeByParaId:n,ordinalByNode:r,ambiguousParaIds:a,partByNode:o,claimantsByParaId:i})}function bo(t,e){let n=t.indexOf("#");if(n<=0)return null;let r=t.slice(0,n),a=e.body.name===r?e.body:void 0;a??=e.openStories.find(l=>l.name===r);let o=a?void 0:e.otherStories.find(l=>l.name===r);if(a??=o?e.normalize(o):void 0,!a)return null;let i=chunkWO4V6PNS_cjs.Ta(a,t);return i?.kind==="paragraph"?st(i):null}function it(t){return t.historyToken??t.historyGroup}var Ro={committed:false,rejected:false,opCount:0};function H(t,e){return e===void 0?{committed:false,rejected:true,opCount:t}:{committed:false,rejected:true,opCount:t,reason:e}}function vo(t,e,n={}){let r=e.filter(x=>x.ops.length>0),a=n.partOps??[],o=[...r,...a].reduce((x,m)=>x+m.ops.length,0);if(o===0)return n.packageEdits?.length?H(0,"invalidArgs"):Ro;if([...r,...a].some(x=>x.ops.some(chunkWO4V6PNS_cjs.Vg))||[...r,...a].some(x=>x.ops.some(chunkWO4V6PNS_cjs.bi)))return H(o,"invalidArgs");let[i,...l]=r,d=[];for(let x of l){let m=t.partFor(x.scope);if(!m)return H(o,"unknown-part");d.push({partName:m.name,ops:x.ops});}let u=t.transact(i?.scope??{kind:"body"},x=>{for(let m of n.packageEdits??[])x.applyPackage(m);for(let m of i?.ops??[])x.apply(m);for(let m of d)for(let y of m.ops)x.applyTo(m.partName,y);for(let m of a)for(let y of m.ops)x.applyTo(m.partName,y);},{...n,historyGroup:it(n)});return u.ok?{committed:true,rejected:false,opCount:o}:H(o,u.reason)}function To(t,e,n,r,a,o){let i=o.partOps??[],l=e.length+i.reduce((m,y)=>m+y.ops.length,0);if(l===0&&!o.packageEdits?.length)return Ro;if(i.some(m=>m.ops.some(y=>chunkWO4V6PNS_cjs.Vg(y)||chunkWO4V6PNS_cjs.bi(y))))return H(l,"invalidArgs");let d=e.filter(m=>chunkWO4V6PNS_cjs.Vg(m)||chunkWO4V6PNS_cjs.bi(m)).length;if(d>0){if(i.length||o.packageEdits?.length||d!==e.length||e.length!==1)return H(e.length,"invalidArgs");let m=t.applyLifecycleOp(e[0],{actorId:o.actorId,historyGroup:it(o)});return m.ok?{committed:true,rejected:false,opCount:1}:H(1,m.detail??m.reason)}let u=o.recordsHistory===false&&o.actorId&&o.operationId?t.partFor(a)?.name:void 0,x=t.transact(a,m=>{n!==void 0&&m.selectionBefore(n),r!==void 0&&m.selectionAfter(r);for(let y of o.packageEdits??[])m.applyPackage(y);for(let y of e)m.apply(y);for(let y of i)for(let p of y.ops)m.applyTo(y.partName,p);u&&m.applyPackage(y=>chunk6IDOVU6L_cjs.a(y,u,e));},{...o,historyGroup:it(o)});return x.ok?{committed:true,rejected:false,opCount:l}:H(l,x.reason)}var Dr=Object.freeze([]);function Ar(t,e={}){return Fr(chunkWO4V6PNS_cjs.Ee(t),e)}function Fr(t,e={}){if(!t.ok)return t;let n=t.package,r=n.parts.get(n.mainDocumentPart);if(!r)return {ok:false,reason:"no-main-document-tree",detail:n.mainDocumentPart};let a=chunkWO4V6PNS_cjs.Eb(r),o=new chunk243W4WW2_cjs.T(n,chunk243W4WW2_cjs.ua(n,a),e.contentLockPolicy?{contentLockPolicy:e.contentLockPolicy}:{}),i=null,l=null,d=null,u=null,x=null;o.subscribe(s=>{u=s,x=o.currentPackage();});let m=()=>o.bodyStore(),y=()=>o.currentPackage(),p=$n(),g=Object.freeze({kind:"body"}),k=(s,c)=>{let f=c?.find(P=>P.type==="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings");if(!f)return;let h=chunkWO4V6PNS_cjs.J(f);return h.mode==="Internal"&&h.target.ok?s.parts.get(h.target.partName):void 0},O=(s,c,f)=>{if(s.mainRelationships!==f||s.settingsPart!==k(c,f))return false;for(let h of s.resolution)for(let P of [h.headers,h.footers])for(let S of P.values())if(c.parts.get(S.partName)!==S.part)return false;return true},b=()=>{let s=y(),c=s.relationships.get(s.mainDocumentPart);if(i&&u&&x===s&&O(i,s,c)&&i.packageRevision===u.fromRevision&&o.packageRevision===u.toRevision&&u.story?.kind==="body"&&u.impact==="text-local"&&u.created.length===0&&u.deleted.length===0&&u.splitJoin.length===0&&(i={...i,packageRevision:o.packageRevision,pkg:s,mainRelationships:c,settingsPart:k(s,c)}),!i||i.packageRevision!==o.packageRevision||i.pkg!==s){let f=chunkWO4V6PNS_cjs.hf(s);i={packageRevision:o.packageRevision,pkg:s,mainRelationships:c,settingsPart:k(s,c),resolution:f,parts:chunkWO4V6PNS_cjs.gf(f)};}return i},R="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",v="http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",T=null,E=()=>{let s=y(),c=(s.relationships.get(s.mainDocumentPart)??[]).find(P=>P.type===R),f;if(c){let P=chunkWO4V6PNS_cjs.J(c);P.mode==="Internal"&&P.target.ok&&(f=s.parts.get(P.target.partName));}f??=s.parts.get("/word/styles.xml");let h=f?.root??null;return h!==T&&(T=h,de=null,G=null),T},N=null,M=null,L=()=>{let s=y();if(N===s)return M;N=s;let c=(s.relationships.get(s.mainDocumentPart)??[]).find(h=>h.type===v),f;if(c){let h=chunkWO4V6PNS_cjs.J(c);h.mode==="Internal"&&h.target.ok&&(f=s.parts.get(h.target.partName));}return f??=s.parts.get("/word/numbering.xml"),M=f?.root??null,M},ee="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",lt=null,ge=null,J=()=>{let s=y();if(lt===s)return ge;lt=s;let c=(s.relationships.get(s.mainDocumentPart)??[]).find(P=>P.type===ee),f;if(c){let P=chunkWO4V6PNS_cjs.J(c);P.mode==="Internal"&&P.target.ok&&(f=s.parts.get(P.target.partName));}f??=s.parts.get("/word/settings.xml");let h=f?.root??null;return h!==ge&&(ge=h,he=null,de=null,G=null),ge},No="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",Eo="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",ct=(s,c)=>{let f=y(),h=(f.relationships.get("/")??[]).find(S=>S.type===s),P;if(h){let S=chunkWO4V6PNS_cjs.J(h);S.mode==="Internal"&&S.target.ok&&(P=f.parts.get(S.target.partName));}return P??f.parts.get(c)},dt=null,Ee=chunkWO4V6PNS_cjs.ui,wo=()=>{let s=y();if(dt===s)return Ee;dt=s;let c=ct(No,"/docProps/core.xml"),f=ct(Eo,"/docProps/app.xml");return Ee=chunkWO4V6PNS_cjs.vi(c?.root??null,f?.root??null),Ee},Mo="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",ut=null,ye=null,te=()=>{let s=y();if(ut===s)return ye;ut=s;let c=(s.relationships.get(s.mainDocumentPart)??[]).find(P=>P.type===Mo),f;if(c){let P=chunkWO4V6PNS_cjs.J(c);P.mode==="Internal"&&P.target.ok&&(f=s.parts.get(P.target.partName));}f??=s.parts.get("/word/theme/theme1.xml");let h=f?.root??null;return h!==ye&&(ye=h,he=null,we=null,de=null,G=null),ye},Co="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",pt=null,ft=()=>{let s=y(),c=(s.relationships.get(s.mainDocumentPart)??[]).find(P=>P.type===Co),f=c?chunkWO4V6PNS_cjs.J(c):null;return (f?.mode==="Internal"&&f.target.ok?s.parts.get(f.target.partName):void 0)??s.parts.get("/word/fontTable.xml")},Do=()=>(pt??=Object.freeze(chunkWO4V6PNS_cjs.lf(y(),ft())),pt),ie=null,ne=null,le=null,ce=null,de=null,we=null,he=null,mt=()=>{let s=[m().part.root],c=new Set;for(let f of z())c.has(f)||(c.add(f),s.push(f.root));return s},Me=()=>{let s=mt(),c=E();return c&&s.splice(1,0,c),s},G=null,xe=null,ue=null,oe=null,gt=new WeakMap,Pe=null,yt=s=>{let c=gt.get(s);if(c)return c;let f=chunkWO4V6PNS_cjs.Eb(s);return gt.set(s,f),f},ht=()=>{let s=o.packageRevision,c=o.openStoryToken();if(!oe||oe.revision!==s||oe.openStories!==c){let f=o.openStoryParts(),h=new Set(f.map(C=>C.name)),P=z().filter(C=>!h.has(C.name)).map(yt),S=[m().part,...f,...P],I=oe,_=I!==null&&u!==null&&I.openStories===c&&I.revision===u.fromRevision&&s===u.toRevision&&u.impact==="text-local"&&u.created.length===0&&u.deleted.length===0&&u.splitJoin.length===0&&I.parts.length===S.length&&I.parts.every((C,K)=>C.name===S[K]?.name);oe={revision:s,openStories:c,parts:S,index:_&&I?Oo(I.index,S):So(S)};}return oe.index},xt=qn(),Ao=()=>{let s=m().part.name,c=new Map;for(let f of [m().part,...z()])for(let[h,P]of chunk243W4WW2_cjs.ka(y(),f.name,s))c.set(h,P);return c},Fo=()=>[m().part,...z()],z=()=>{let s=[],c=new Set;for(let h of b().parts)for(let P of [h.headers,h.footers])for(let S of P.values())c.has(S)||(c.add(S),s.push(S));let f=y();for(let h of ["footnote","endnote"]){let P=chunkWO4V6PNS_cjs.lh(f,h);!P||c.has(P)||(c.add(P),s.push(P));}return s},Pt={ok:true,session:{editable:B(m().part).length>0,paragraphIds:()=>B(m().part).map(s=>s.id),paragraphIdsIn(s=g){let c=o.partFor(s);return c?B(c).map(f=>f.id):[]},part:()=>m().part,partFor:s=>o.partFor(s),currentPackage:y,collaborationPort:s=>chunk6IDOVU6L_cjs.b(o,{documentId:s}),applyTreeOps(s,c,f,h=g,P={}){return To(o,s,c,f,h,P)},applyTreeOpsAtomic(s,c={}){return vo(o,s,c)},projectDoc:()=>q(m().part),reconcile:s=>Qe(s,m().part,u),lastCommitWasStructural:()=>u!==null&&(u.created.length>0||u.deleted.length>0||u.splitJoin.length>0||u.impact==="global"),applyPmDoc(s){let c=m(),f=Xe(c.part,s);if(!f.ok)return {committed:false,rejected:true,opCount:0,reason:f.reason};if(f.ops.length===0)return {committed:false,rejected:false,opCount:0};let h=o.transact(g,P=>{for(let S of f.ops)P.apply(S);});return h.ok?{committed:true,rejected:false,opCount:f.ops.length}:{committed:false,rejected:true,opCount:f.ops.length,reason:h.reason}},storyParts:Fo,bodyText:()=>Wn(m().part),storyText(s){let c=o.partFor(s);return c?B(c).map(f=>chunkWO4V6PNS_cjs.hj(c,f.id)??"").join(`
|
|
5
|
-
`):null},revision:()=>m().revision,revisionFor:s=>o.revisionFor(s),packageRevision:()=>o.packageRevision,canUndo:()=>o.canUndo,canRedo:()=>o.canRedo,undo:()=>{let s=o.selectionForUndo();return o.undo()===null?null:s},redo:()=>{let s=o.selectionForRedo();return o.redo()===null?null:s},beginComposition:(s=g)=>{o.beginComposition(s);},endComposition:()=>o.endComposition(),subscribe(s){return o.subscribe(s)},save(){return p(y())},saveSteps(){return p.steps(y())},headerFooterParts:()=>{let s=b().parts;return s[s.length-1]??chunkWO4V6PNS_cjs.jf(y())},headerFooterPartsBySection:()=>b().parts,headerFooterResolutionBySection:()=>b().resolution,documentFonts(){return ie&&ie.revision===o.packageRevision||(ie={revision:o.packageRevision,fonts:no(Me(),se(te(),J()))}),ie.fonts},symbolFontFamilies(){return le&&le.revision===o.packageRevision||(le={revision:o.packageRevision,fonts:so(Me())}),le.fonts},renderedFontFamilies(){let s=E();return ne&&ne.revision===o.packageRevision&&ne.styles===s||(ne={revision:o.packageRevision,styles:s,families:chunkXSTGE3NI_cjs.f(mt(),s,se(te(),J()))}),ne.families},rendersText(){return ce&&ce.revision===o.packageRevision||(ce={revision:o.packageRevision,rendersText:lo(Me())}),ce.rendersText},documentStyles(){let s=E(),c=te(),f=J();G??=chunkXSTGE3NI_cjs.d(s,se(c,f));let h=G;return de??=uo(s,P=>h(P)),de},stylesRoot:()=>E(),documentThemeFonts(){let s=te(),c=J();return he??=se(s,c,ft()?.root??null),he},numberingRoot:()=>L(),settingsRoot:()=>J(),documentProperties:()=>wo(),trackingSettings:()=>chunkWO4V6PNS_cjs.ri(J()),documentThemeColors(){let s=te();return we??=Po(s),we},effectiveRunDefaults(s,c){let f=E(),h=te(),P=J();G??=chunkXSTGE3NI_cjs.d(f,se(h,P));let S=m();if(!xe||xe.revision!==S.revision){let I=new Map;for(let _ of B(S.part))_.kind!=="textValue"&&I.set(_.id,ot(_)??null);xe={revision:S.revision,byId:I};}return G(xe.byId.get(s)??null,c)},documentOutline(){let s=m();return ue&&ue.revision===s.revision||(ue={revision:s.revision,outline:fo(s.part,E())}),ue.outline},findText:xo({revision:()=>o.packageRevision,bodyPart:()=>m().part,currentPackage:y,headerFooterBySection:()=>b().resolution}),embeddedFonts:Do,paragraphAnchors:ht,paraIdOf:s=>bo(s,{body:m().part,openStories:o.openStoryParts(),otherStories:z(),normalize:yt}),nodeIdOf:s=>ht().nodeByParaId.get(s.toUpperCase())??null,relationshipTarget:(s,c=g)=>{let f=y(),h=o.partFor(c);return h?chunkWO4V6PNS_cjs.Qg(f,h.name,s):null},bookmarks:()=>{let s=o.packageRevision;if(!Pe||Pe.revision!==s){let c=new Map(chunkWO4V6PNS_cjs.rg(m().part));for(let f of z())for(let[h,P]of chunkWO4V6PNS_cjs.rg(f))c.has(h)||c.set(h,P);Pe={revision:s,index:c};}return Pe.index},ensureHyperlinkRelationship(s,c=g){let f=o.partFor(c);return f?chunkWO4V6PNS_cjs.Na(o,()=>{let h=y(),P=chunkWO4V6PNS_cjs.Pg(h,s,f.name);return P?(P.pkg!==h&&o.replacePackageShell(P.pkg),P.relationshipId):null},h=>h!==null):null},reviewItems(){let s=e.reviewModel;if(!s)return Dr;let c=m(),f=`${o.packageRevision}:${c.revision}`;if(l&&l.revisionKey===f)return l.items;let h=y(),P=h.parts.get(chunk243W4WW2_cjs.aa(h,c.part.name)),S=h.parts.get(chunk243W4WW2_cjs.ba(h,c.part.name)),I={root:c.part.root,commentsPart:P,commentsExtendedPart:S,stylesPart:chunkWO4V6PNS_cjs.bd(h),furnitureParts:z(),customNodePayloads:Ao()},_=()=>xt.get(I)??s.collectReviewItems({storyPart:c.part,furnitureParts:I.furnitureParts,stylesPart:I.stylesPart,commentsPart:P,commentsExtendedPart:S,customNodePayloads:I.customNodePayloads}),C={part:c.part,commentsPart:P,commentsExtendedPart:S,currentPackageRevision:o.packageRevision,currentPackage:h,changePackage:x},K,ke=null;if(l&&u&&Qn(u,l,l.items,C))K=l.items;else {let pe=l&&u?Vn(u,l,l.items,C):null,Ce=pe&&l?s.revisionItemsOfParagraph(c.part,pe):null;pe&&l&&Ce&&Yn(l.items,Ce,pe)?(ke=l.paragraphOrder??chunkWO4V6PNS_cjs.zj(c.part),K=Jn(l.items,ke,pe,Ce)):(ke=chunkWO4V6PNS_cjs.zj(c.part),K=_());}return xt.set(I,K),l={revisionKey:f,bodyRevision:c.revision,packageRevision:o.packageRevision,items:K,paragraphOrder:ke,commentsPart:P,commentsExtendedPart:S,pkg:h},l.items},hasReviewContent(){let s=o.packageRevision;if(!d||d.revision!==s){let c=chunkWO4V6PNS_cjs.bd(y()),f=[m().part,...z(),...c?[c]:[]];d={revision:s,present:f.some(h=>Ve(h.root)||chunkWO4V6PNS_cjs.rk(h).length>0)};}return d.present},replyToComment(s,c,f,h,P,S=g,I,_={}){let C=chunk243W4WW2_cjs.ca(o,{anchor:{paragraphId:c.paragraphId,start:c.start,end:c.end,...c.endParagraphId===void 0?{}:{endParagraphId:c.endParagraphId}},author:h,text:f,...P===void 0?{}:{date:P},...s===null?{}:{replyToCommentId:s},...I===void 0?{}:{actorId:I}},S,_.historyToken);return C.ok?C.commentId:null},setCommentResolved(s,c,f={}){return chunk243W4WW2_cjs.da(o,s,c,f.historyToken).ok},deleteComment(s,c=g,f,h){return this.deleteComments([{commentId:s}],c,f,h)},deleteComments(s,c=g,f,h={}){return chunk243W4WW2_cjs.ea(o,s,c,f,h.historyToken)},insertCustomNode(s,c=g,f={}){return chunk243W4WW2_cjs.ma(o,s,c,f.historyToken)},removeCustomNode(s,c=g){return chunk243W4WW2_cjs.na(o,s,c)},sweepCustomNodePayloads(s){return chunkWO4V6PNS_cjs.Na(o,()=>{let c=m(),f=chunk243W4WW2_cjs.ja(o.currentPackage(),c.part.name,s);return f.ok?f.removed.length===0?{ok:true,removed:[]}:(o.replacePackageShell(f.pkg),{ok:true,removed:f.removed}):{ok:false,reason:f.reason}},c=>c.ok&&c.removed.length>0)},ensureListDefinition(s){return chunkWO4V6PNS_cjs.Na(o,()=>{let c=chunkWO4V6PNS_cjs.Dg(y(),s);return c?(o.replacePackageShell(c.pkg),N=null,M=null,c.numId):null},c=>c!==null)},ensureNumberingLevel(s,c,f){return chunkWO4V6PNS_cjs.Na(o,()=>{let h=y(),P=chunkWO4V6PNS_cjs.Eg(h,s,c,f);return P?P!==h?(o.replacePackageShell(P),N=null,M=null,{ok:true,changed:true}):{ok:true,changed:false}:{ok:false,changed:false}},h=>h.changed).ok},insertImage(s,c){return o.insertImage(s,c)},replaceImage(s,c,f,h,P,S){return o.replaceImage(s,c,f,h,P,S)},deleteImage(s,c){return o.deleteImage(s,c)},deleteImageTracked(s,c,f){return o.deleteImageTracked(s,c,f)},applyImageProperties(s,c){return o.applyImageProperties(s,c)},applyFragmentPaste(s,c){return o.applyFragmentPaste(s,c)}}};return chunkWO4V6PNS_cjs.El(Pt.session,o),Pt}var Br=chunkWO4V6PNS_cjs.g.projection;function Gr(t,e,n){let r=t.filter(a=>a.localName!==e);return r.length!==t.length?r:[...r,n?{localName:e,attributes:n}:{localName:e}]}function Kr(t,e,n={}){let r=null,a=false,o=()=>n.onChange?.(i()),i=()=>({revision:e.revision(),canUndo:e.canUndo(),canRedo:e.canRedo(),lastRejection:r}),l=p=>{a=true;let g=u.state.tr.replaceWith(0,u.state.doc.content.size,p.content);g.setMeta("addToHistory",false),u.dispatch(g),a=false;},d=p=>()=>(p()&&(l(e.projectDoc()),o()),true),u=new prosemirrorView.EditorView(t,{state:prosemirrorState.EditorState.create({doc:e.projectDoc(),plugins:[prosemirrorKeymap.keymap({...prosemirrorCommands.baseKeymap,Home:prosemirrorCommands.selectTextblockStart,End:prosemirrorCommands.selectTextblockEnd,"Mod-z":d(()=>e.undo()!==null),"Mod-y":d(()=>e.redo()!==null),"Shift-Mod-z":d(()=>e.redo()!==null),"Mod-b":(p,g)=>y(p,g,"b"),"Mod-i":(p,g)=>y(p,g,"i"),"Mod-u":(p,g)=>y(p,g,"u",{val:"single"})})]}),editable:()=>e.editable,handleDOMEvents:{keydown:p=>(x(p),false),beforeinput:(p,g)=>{let k=g;if(p.composing)return false;x(p);let O=k.inputType;if(O==="insertText"&&k.data!=null){k.preventDefault();let{from:b,to:R}=p.state.selection;return p.dispatch(p.state.tr.insertText(k.data,b,R)),true}if(O==="deleteContentBackward"){k.preventDefault();let{from:b,empty:R}=p.state.selection;return R?b>0?p.dispatch(p.state.tr.delete(b-1,b)):prosemirrorCommands.joinBackward(p.state,p.dispatch):prosemirrorCommands.deleteSelection(p.state,p.dispatch),true}if(O==="deleteContentForward"){k.preventDefault();let{from:b,to:R,empty:v}=p.state.selection;return v?R<p.state.doc.content.size?p.dispatch(p.state.tr.delete(b,b+1)):prosemirrorCommands.joinForward(p.state,p.dispatch):prosemirrorCommands.deleteSelection(p.state,p.dispatch),true}return O==="insertParagraph"?(k.preventDefault(),prosemirrorCommands.splitBlock(p.state,p.dispatch),true):false},compositionstart:()=>(e.beginComposition(),false),compositionend:()=>(e.endComposition(),o(),false)},dispatchTransaction(p){let g=u.state.apply(p);if(a||!p.docChanged){u.updateState(g);return}let k=e.applyPmDoc(g.doc);if(k.rejected){r=String(k.reason??"rejected"),u.updateState(g),l(e.projectDoc()),o();return}r=null,u.updateState(k.committed&&e.lastCommitWasStructural()?m(g):g),o();}});function x(p){if(p.composing||a)return;let g=p.dom.ownerDocument.getSelection(),k=g?.anchorNode,O=g?.focusNode;if(!(!g||!k||!O)&&!(!p.dom.contains(k)||!p.dom.contains(O)))try{let b=p.posAtDOM(k,g.anchorOffset),R=p.posAtDOM(O,g.focusOffset),v=p.state.selection;if(v.anchor===b&&v.head===R)return;let T=prosemirrorState.TextSelection.create(p.state.doc,b,R);p.dispatch(p.state.tr.setSelection(T).setMeta("addToHistory",!1));}catch{}}function m(p){let g=e.paragraphIds(),k=p.tr,O=false,b=0;return p.doc.forEach((R,v)=>{let T=g[b];b+=1,!(R.type.name!=="paragraph"||T===void 0)&&R.attrs.nodeId!==T&&(k=k.setNodeMarkup(v,void 0,{...R.attrs,nodeId:T}),O=true);}),O?p.apply(k.setMeta("addToHistory",false)):p}function y(p,g,k,O){let b=w.marks.runProps;if(!g)return true;let{from:R,to:v,empty:T}=p.selection;if(T)return true;let N=p.doc.resolve(R).marks().find(ee=>ee.type===b)?.attrs.props??[],M=Gr(N,k,O),L=p.tr;return L.removeMark(R,v,b),M.length>0&&L.addMark(R,v,b.create({props:M})),g(L),true}return {view:u,state:i,undo:()=>d(()=>e.undo()!==null)(),redo:()=>d(()=>e.redo()!==null)(),toggleRunProperty(p,g){y(u.state,u.dispatch.bind(u),p,g);},destroy:()=>u.destroy()}}exports.a=w;exports.b=Ge;exports.c=ae;exports.d=B;exports.e=q;exports.f=Xe;exports.g=Vo;exports.h=Qe;exports.i=ot;exports.j=Ar;exports.k=Fr;exports.l=Br;exports.m=Kr;
|