@docx-editor.dev/core 2.35.0-canary.20261104032723.sha-43c2012 → 2.35.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 +9 -14
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.ts +16 -11
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.ts +12 -12
- package/dist/binding.js +1 -1
- package/dist/{chrome-print-CK3v5NhC.d.ts → chrome-print-H0uSxdg3.d.ts} +70 -17
- package/dist/{chunk-AMOFXSEO.cjs → chunk-2C75IWUN.cjs} +1 -1
- package/dist/chunk-2NFQ7OXY.cjs +1 -0
- package/dist/chunk-2V3V57SC.js +3 -0
- package/dist/chunk-32YOHLEK.cjs +32 -0
- package/dist/chunk-4NISR27M.cjs +31 -0
- package/dist/chunk-5ZE7ROGP.js +31 -0
- package/dist/{chunk-LZ64O473.js → chunk-66ZAVRGB.js} +1 -1
- package/dist/{chunk-A5GMOQWD.js → chunk-6767S7UF.js} +1 -1
- package/dist/chunk-6BZINLEN.cjs +1 -0
- package/dist/{chunk-EBIMIIC3.js → chunk-AVGSD7FB.js} +5 -5
- package/dist/{chunk-TZTKEPCC.cjs → chunk-CBJMRC4L.cjs} +1 -1
- package/dist/chunk-DCILO4XD.cjs +236 -0
- package/dist/{chunk-FBGZOGLU.cjs → chunk-DSIDCA3V.cjs} +4 -4
- package/dist/chunk-FLEFHRJG.cjs +5 -0
- package/dist/chunk-FMSXJ22B.js +2 -0
- package/dist/{chunk-7ACXKFKO.js → chunk-I4OZW2NO.js} +1 -1
- package/dist/chunk-JGE2O6IF.cjs +3 -0
- package/dist/chunk-K2BBJDM7.js +32 -0
- package/dist/chunk-LMASPHYS.js +1 -0
- package/dist/chunk-NYZP5NM3.js +4 -0
- package/dist/chunk-P3XUE72N.js +236 -0
- package/dist/{chunk-JZ4LO3ZZ.js → chunk-Q5YVLUGG.js} +1 -1
- package/dist/chunk-QALWAAPL.cjs +4 -0
- package/dist/{chunk-ELR6HXOO.js → chunk-QDUMZYTX.js} +1 -1
- package/dist/chunk-QLANEOTJ.cjs +7 -0
- package/dist/{chunk-4NPNKO5U.cjs → chunk-SJV6WCTP.cjs} +1 -1
- package/dist/{chunk-I4WSXFY6.js → chunk-TMCMXIBT.js} +4 -4
- package/dist/{chunk-GTICLPKS.cjs → chunk-TY5CE2JR.cjs} +1 -1
- package/dist/chunk-UAUB5YV6.js +7 -0
- package/dist/{chunk-Q4MUV5KX.cjs → chunk-WWZWT26M.cjs} +1 -1
- package/dist/chunk-Y3JSN52G.cjs +2 -0
- package/dist/chunk-YD3KSZJM.js +1 -0
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.ts +3 -3
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.d.ts +2 -2
- package/dist/contracts/document.d.ts +2 -2
- package/dist/contracts/editor.d.ts +8 -8
- package/dist/contracts/modules.cjs +1 -1
- package/dist/contracts/modules.d.ts +34 -13
- package/dist/contracts/modules.js +1 -1
- package/dist/contracts/types.d.ts +3 -3
- package/dist/{custom-node-writes-BC3z8NwO.d.ts → custom-node-writes-Cj0itq58.d.ts} +2 -2
- package/dist/{document-protection-8hXPdn5U.d.ts → document-protection-CDLoYQI3.d.ts} +1 -1
- package/dist/{drawing-graphic-kind-_5u2E4ee.d.ts → drawing-graphic-kind-8zt6pugF.d.ts} +2 -2
- package/dist/{drawing-preview-package-JyAqL6OV.d.ts → drawing-preview-package-8o9LSfzP.d.ts} +1 -1
- package/dist/{editor-BGCdE3tB.d.ts → editor-CujQcn1z.d.ts} +20 -10
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +3 -3
- package/dist/editor.d.ts +52 -29
- package/dist/editor.js +1 -1
- package/dist/export.cjs +2 -2
- package/dist/export.d.ts +6 -6
- package/dist/export.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +18 -18
- package/dist/index.js +1 -1
- package/dist/{layout-shaping-D2qNes9-.d.ts → layout-shaping-ZjLRz_qa.d.ts} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +25 -21
- package/dist/layout.js +1 -1
- package/dist/{note-properties-DGPzKUuA.d.ts → note-properties-BRpskBeh.d.ts} +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.ts +10 -10
- package/dist/output.js +1 -1
- package/dist/{protocol-0y3iaYj9.d.ts → protocol-GVVQQwCX.d.ts} +13 -2
- package/dist/{review-paragraph-order-DeQp2_iu.d.ts → review-paragraph-order-aEHnQTt7.d.ts} +5 -2
- package/dist/{revision-projection-CrAv-HP6.d.ts → revision-projection-vU_UiTLx.d.ts} +1 -1
- package/dist/{semantic-cell-selection-CeG_qqDV.d.ts → semantic-cell-selection-CaRIISu-.d.ts} +2 -2
- package/dist/{semantic-interaction-DcE_ZsiD.d.ts → semantic-interaction-LJtUJJS5.d.ts} +1 -1
- package/dist/{semantic-paint-DfeN6UQF.d.ts → semantic-paint-2LBYlQcn.d.ts} +11 -4
- package/dist/{semantic-record-queries-qwd9Ict6.d.ts → semantic-record-queries-C_YK2gCz.d.ts} +1 -1
- package/dist/{semantic-records-thL1rcmG.d.ts → semantic-records-AU2pIYRp.d.ts} +3 -3
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +1664 -1664
- package/dist/store.js +1 -1
- package/dist/{tree-op-types-CGlwCQXg.d.ts → tree-op-types-DmrePCMo.d.ts} +320 -11
- package/dist/{tree-package-store-D0_BOm-r.d.ts → tree-package-fragment-DXZ2B7x0.d.ts} +702 -691
- package/dist/{tree-session-contract-DkThhHjy.d.ts → tree-session-contract-D3e-5YNq.d.ts} +19 -4
- package/dist/{unsupported-elements-qj0sXi2s.d.ts → unsupported-elements-9Pz4I_F6.d.ts} +1 -1
- package/docs/accept-reject-without-scrolling.md +31 -48
- package/docs/comment-on-found-text.md +47 -23
- package/docs/custom-review-cards.md +50 -34
- package/docs/highlight-ranges.md +26 -6
- package/docs/index.md +21 -21
- package/docs/propose-rewrite.md +87 -138
- package/docs/tracked-replacement.md +41 -20
- package/package.json +2 -2
- package/dist/chunk-4C7JUJDX.cjs +0 -1
- package/dist/chunk-4HENIAFG.js +0 -1
- package/dist/chunk-6IYKYYWF.js +0 -32
- package/dist/chunk-CDAFCPT6.cjs +0 -3
- package/dist/chunk-CU6QPXKD.js +0 -2
- package/dist/chunk-EMITIPLN.js +0 -4
- package/dist/chunk-IGB66DIX.cjs +0 -30
- package/dist/chunk-JQPTNBLT.js +0 -236
- package/dist/chunk-JVWRILO3.cjs +0 -4
- package/dist/chunk-KOYEBRLV.js +0 -1
- package/dist/chunk-KZZPOZOF.cjs +0 -2
- package/dist/chunk-NPWMZIPA.cjs +0 -32
- package/dist/chunk-NS2QCOAS.js +0 -7
- package/dist/chunk-O2PGRL5D.js +0 -3
- package/dist/chunk-TFJUIP4X.cjs +0 -236
- package/dist/chunk-V3N4SOAK.cjs +0 -1
- package/dist/chunk-V6FOPP2H.js +0 -30
- package/dist/chunk-XFEIUKOS.cjs +0 -7
- package/dist/chunk-ZF4N3N3L.cjs +0 -5
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
'use strict';var chunkSJV6WCTP_cjs=require('./chunk-SJV6WCTP.cjs'),chunkCBJMRC4L_cjs=require('./chunk-CBJMRC4L.cjs'),chunkWWZWT26M_cjs=require('./chunk-WWZWT26M.cjs'),chunk2C75IWUN_cjs=require('./chunk-2C75IWUN.cjs'),chunkQALWAAPL_cjs=require('./chunk-QALWAAPL.cjs'),chunkTY5CE2JR_cjs=require('./chunk-TY5CE2JR.cjs'),chunkDCILO4XD_cjs=require('./chunk-DCILO4XD.cjs'),prosemirrorModel=require('prosemirror-model'),prosemirrorState=require('prosemirror-state'),prosemirrorView=require('prosemirror-view'),prosemirrorKeymap=require('prosemirror-keymap'),prosemirrorCommands=require('prosemirror-commands');function K(t){return t.attributes?.val}function Y(t){let e=K(t);return e===void 0||!(e==="0"||e==="false"||e==="off")}var Nr=/^[0-9A-Fa-f]{6}$/,Er=/^\d{1,6}$/;function lt(t){return t===void 0||t==="auto"?null:Nr.test(t)?`#${t}`:null}var Mr={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"},Cr={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 Dr(t){return !t||!/^[\w \-.+]{1,64}$/.test(t)?null:`"${t}"`}function yo(t,e=false){let n=chunkDCILO4XD_cjs.Qd(t);return n===null||Math.abs(n)>999999||!e&&n<0?null:n}function q(t,e=false){let n=yo(t,e);return n===null?null:`${n/20}pt`}function ho(t){let e=[],n=[],r=null,a=null;for(let o of t)switch(o.localName){case "b":e.push(`font-weight:${Y(o)?"bold":"normal"}`);break;case "i":e.push(`font-style:${Y(o)?"italic":"normal"}`);break;case "u":{let s=K(o)??"single";if(s==="none"||!Y(o))break;n.push("underline"),r=Mr[s]??"solid",a=lt(o.attributes?.color);break}case "strike":Y(o)&&n.push("line-through");break;case "dstrike":Y(o)&&n.push("line-through");break;case "caps":Y(o)&&e.push("text-transform:uppercase");break;case "smallCaps":Y(o)&&e.push("font-variant:small-caps");break;case "vertAlign":{let s=K(o);s==="superscript"?e.push("vertical-align:super","font-size:0.75em"):s==="subscript"&&e.push("vertical-align:sub","font-size:0.75em");break}case "color":{let s=lt(K(o));s&&e.push(`color:${s}`);break}case "highlight":{let s=Cr[K(o)??""];s&&e.push(`background-color:${s}`);break}case "sz":{let s=K(o);s!==void 0&&Er.test(s)&&e.push(`font-size:${Number(s)/2}pt`);break}case "rFonts":{let s=Dr(o.attributes?.ascii??o.attributes?.hAnsi);s&&e.push(`font-family:${s}`);break}case "spacing":{let s=q(K(o),true);s&&e.push(`letter-spacing:${s}`);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 Fr={left:"left",start:"left",right:"right",end:"right",center:"center",both:"justify",distribute:"justify"};function xo(t){let e=[];for(let n of t)switch(n.localName){case "jc":{let r=Fr[K(n)??""];r&&e.push(`text-align:${r}`);break}case "ind":{let r=q(n.attributes?.left??n.attributes?.start,true),a=q(n.attributes?.right??n.attributes?.end,true),o=q(n.attributes?.firstLine),s=q(n.attributes?.hanging);r&&e.push(`margin-left:${r}`),a&&e.push(`margin-right:${a}`),o?e.push(`text-indent:${o}`):s&&e.push(`text-indent:-${s}`);break}case "spacing":{let r=q(n.attributes?.before),a=q(n.attributes?.after);r&&e.push(`margin-top:${r}`),a&&e.push(`margin-bottom:${a}`);let o=yo(n.attributes?.line),s=n.attributes?.lineRule;o!==null&&s!=="exact"&&s!=="atLeast"?e.push(`line-height:${(o/240).toFixed(3)}`):o!==null&&e.push(`line-height:${o/20}pt`);break}case "shd":{let r=lt(n.attributes?.fill);r&&e.push(`background-color:${r}`);break}case "pageBreakBefore":Y(n)&&e.push("break-before:page");break;}return e.join(";")}var N=new prosemirrorModel.Schema({nodes:{doc:{content:"paragraph+"},paragraph:{content:"inline*",group:"block",attrs:{nodeId:{default:null},props:{default:[]}},toDOM:t=>{let e=xo(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=ho(e);return ["span",{"data-run-props":Br(e),...n?{style:n}:{}},0]},parseDOM:[{tag:"span[data-run-props]",getAttrs:t=>{if(typeof t=="string")return false;let e=Lr(t.getAttribute("data-run-props"));return e?{props:e}:false}}]}}});function Br(t){return JSON.stringify(Array.isArray(t)?t:[])}function Lr(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 dt(t){for(let e of t.marks)if(e.type.name==="runProps")return e.attrs.props??[];return []}function Fe(t,e){return JSON.stringify(Ae(t))===JSON.stringify(Ae(e))}function Ae(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 ct(t){if(!t||t.kind==="textValue")return [];let e=[];for(let n of t.children){if(n.kind==="textValue"||n.namespaceUri!==chunkDCILO4XD_cjs.pa||n.localName==="rPrChange"||n.localName==="pPrChange")continue;let r={};for(let a of n.attributes)a.namespaceUri===chunkDCILO4XD_cjs.pa&&(r[a.localName]=a.value);e.push(Object.keys(r).length>0?{localName:n.localName,attributes:r}:{localName:n.localName});}return e}function Po(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 L(t){if(t.kind==="textValue")return [];let e=[],n=o=>{if(o.kind!=="run")return;let s=o.children.find(i=>i.kind==="runProperties"),l=ct(s);for(let i of o.children)if(i.kind!=="runProperties"){if(i.kind==="tab"){e.push({kind:"tab"});continue}if(i.kind==="hardBreak"){e.push(chunkDCILO4XD_cjs.bc(i)?{kind:"pageBreak"}:{kind:"hardBreak"});continue}if(i.kind==="text"){let c="";for(let u of i.children)u.kind==="textValue"&&(c+=u.value);c.length>0&&e.push({kind:"text",text:c,props:l});continue}e.push({kind:"unknown",nodeId:i.id,label:Po(i),modelLength:i.kind==="drawing"||chunkDCILO4XD_cjs.Te(i)||chunkDCILO4XD_cjs.ce(i)||chunkDCILO4XD_cjs.Ub(i)!==null?1:0});}},r=o=>{if(o.kind==="run"){n(o);return}e.push({kind:"unknown",nodeId:o.id,label:Po(o),modelLength:0});},a=(o,s)=>{for(let l of o)if(!(l.kind==="textValue"||l.kind==="paragraphProperties")&&!(s>=chunkDCILO4XD_cjs.Aa)){if(chunkDCILO4XD_cjs.Ca(l)&&!chunkDCILO4XD_cjs.za(l.kind)&&s<chunkDCILO4XD_cjs.Aa){a(l.children.filter(i=>!chunkDCILO4XD_cjs.vf(l,i)),chunkDCILO4XD_cjs.Ba(l,s));continue}if(chunkDCILO4XD_cjs.ld(l)){let i=chunkDCILO4XD_cjs.nd(l);i&&a(i,chunkDCILO4XD_cjs.Ba(l,s));continue}r(l);}};return a(t.children,0),e}function de(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 ko=chunkDCILO4XD_cjs.ub(16),Oo=chunkDCILO4XD_cjs.tb();function _r(t,e){let n=Oo.get(t);if(!n){let r=[];chunkDCILO4XD_cjs.jd([t],r,0),n=Object.freeze(r),Oo.set(t,n,n.length);}for(let r of n)e.push(r);}function _(t){let e=ko.get(t);if(e)return e;let n=[];for(let r of chunkDCILO4XD_cjs.fd(t))if(r.root.kind!=="textValue")for(let a of r.root.children)_r(a,n);return ko.set(t,n),n}function Z(t){let e=de(t).map(n=>{let r=n.kind==="textValue"?void 0:n.children.find(o=>o.kind==="paragraphProperties"),a=L(n).map(o=>{switch(o.kind){case "text":return N.text(o.text,o.props.length>0?[N.marks.runProps.create({props:o.props})]:[]);case "tab":return N.node("tab");case "hardBreak":return N.node("hardBreak");case "pageBreak":return N.node("pageBreak");default:return N.node("unknownInline",{nodeId:o.nodeId,label:o.label})}});return N.node("paragraph",{nodeId:n.id,props:ct(r)},a)});return N.node("doc",null,e.length>0?e:[N.node("paragraph")])}function jr(t,e){let n=[];return t.forEach(r=>{if(r.isText&&r.text){n.push({kind:"text",text:r.text,props:dt(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+=chunkDCILO4XD_cjs.$b:n.modelLength===1&&(e+=chunkDCILO4XD_cjs.Xg);return e}function z(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 Hr(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 Ro(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 zr(t,e,n,r,a){let o=[],s=D(e),l=D(n),i=Hr(s,l),c=[],u=0,m=false;for(let g of e){if(g.kind!=="unknown"){u+=g.kind==="text"?g.text.length:1;continue}let p=u;g.modelLength===1&&i&&(i.start<u+1&&i.endBefore>u&&(m=true),i.endBefore<=u&&(p+=i.endAfter-i.endBefore)),c.push(`${g.nodeId}@${p}`),u+=g.modelLength;}if(m||JSON.stringify(c)!==JSON.stringify(z(n)))return {ok:false,reason:"unknown-content-moved",detail:t};if(Fe(r,a)||o.push({op:"setParagraphProperties",paragraphId:t,properties:Ae(a)}),i&&(i.endBefore>i.start&&o.push({op:"deleteText",paragraphId:t,start:i.start,end:i.endBefore}),i.endAfter>i.start)){let g=l.slice(i.start,i.endAfter),p=i.start,y="",P=()=>{y.length!==0&&(o.push({op:"insertText",paragraphId:t,offset:p,text:y}),p+=y.length,y="");};for(let O of g)O===" "?(P(),o.push({op:"insertTab",paragraphId:t,offset:p}),p+=1):O===`
|
|
3
|
+
`?(P(),o.push({op:"insertHardBreak",paragraphId:t,offset:p}),p+=1):O===chunkDCILO4XD_cjs.$b?(P(),o.push({op:"insertPageBreak",paragraphId:t,offset:p}),p+=1):y+=O;P();}if(!i){let g=Ro(e),p=Ro(n),y=0;for(;y<p.length;){if(Fe(g[y]??[],p[y])){y+=1;continue}let P=y,O=p[y];for(;y<p.length&&Fe(p[y],O)&&!Fe(g[y]??[],p[y]);)y+=1;o.push({op:"setRunProperties",paragraphId:t,start:P,end:y,properties:Ae(O)});}}return {ok:true,ops:o}}function ut(t,e){let n=de(t),r=new Set;for(let l of n)for(let i of L(l))i.kind==="unknown"&&i.modelLength===1&&r.add(i.nodeId);let a=l=>jr(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 s=o.length-n.length;if(s===0){let l=[];for(let[i,c]of o.entries()){let u=n[i];if(c.attrs.nodeId!==u.id)return {ok:false,reason:"paragraph-reordered",detail:String(c.attrs.nodeId)};let m=zr(u.id,L(u),a(c),ct(u.kind==="textValue"?void 0:u.children.find(g=>g.kind==="paragraphProperties")),c.attrs.props??[]);if(!m.ok)return m;l.push(...m.ops);}return {ok:true,ops:l}}return s===1?Wr(n,o,a):s===-1?$r(n,o,a):{ok:false,reason:"paragraph-count-unexplained",detail:String(s)}}function Wr(t,e,n){for(let r=0;r<t.length;r+=1){let a=t[r],o=e[r],s=e[r+1];if(!o||!s||o.attrs.nodeId!==a.id)continue;let l=s.attrs.nodeId;if(l!==null&&l!==a.id)continue;let i=n(o),c=n(s),u=L(a),m=D(i);if(m+D(c)===D(u)&&JSON.stringify(z([...i,...c]))===JSON.stringify(z(u))&&So(t,e,r,n)&&vo(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 $r(t,e,n){for(let r=0;r+1<t.length;r+=1){let a=t[r],o=t[r+1],s=e[r];if(!s||s.attrs.nodeId!==a.id)continue;let l=[...L(a),...L(o)],i=n(s);if(D(i)===D(l)&&JSON.stringify(z(i))===JSON.stringify(z(l))&&So(t,e,r,n)&&vo(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 So(t,e,n,r){for(let a=0;a<n;a+=1){let o=e[a],s=t[a];if(!o||o.attrs.nodeId!==s.id||D(r(o))!==D(L(s))||JSON.stringify(z(r(o)))!==JSON.stringify(z(L(s))))return false}return true}function vo(t,e,n,r,a){for(let o=0;n+o<t.length;o+=1){let s=t[n+o],l=e[r+o];if(!l||l.attrs.nodeId!==s.id||D(a(l))!==D(L(s))||JSON.stringify(z(a(l)))!==JSON.stringify(z(L(s))))return false}return true}function Ur(t,e){return chunkDCILO4XD_cjs.eb(t,e)!==null}function pt(t,e,n){if(!n||n.created.length>0||n.deleted.length>0||n.splitJoin.length>0)return Z(e);let r=new Map;t.forEach(i=>{let c=i.attrs.nodeId;typeof c=="string"&&r.set(c,i);});let a=new Set(n.dirty),o=de(e);if(o.length!==t.childCount)return Z(e);let s=Z(e),l=[];for(let[i,c]of o.entries()){let u=r.get(c.id);l.push(u&&!a.has(c.id)?u:s.child(i));}return N.node("doc",null,l)}var bo=0;function Io(t,e){let n=t.currentPackage();if(e===n)return {ok:true,change:null};if(!e.parts.has(e.mainDocumentPart))return {ok:false,reason:"missing-main-part"};if(e.mainDocumentPart!==n.mainDocumentPart)return {ok:false,reason:"different-main-part"};let r=t.packageRevision;return t.installAuthoritativePackageSnapshot(e),t.adoptPackageUnit(n),bo+=1,{ok:true,change:t.publishStoryWrite({change:"model-change",fromRevision:r,toRevision:r+1,commitId:`pkg-replace-${bo}`,origin:chunkDCILO4XD_cjs.g.mutationHuman,dirty:[],created:[],deleted:[],splitJoin:[],dependencyKeys:[],impact:"global",story:{kind:"body",partName:t.bodyStore().part.name}})}}var Gr=8*1024*1024;function To(){let t=new WeakMap;function*e(r){let a=t.get(r);if(a)return a.slice();let o=yield*chunkDCILO4XD_cjs.pg(r);return t=new WeakMap,o.byteLength<=Gr&&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 No(t){return _(t).map(e=>chunkDCILO4XD_cjs.Jm(t,e.id)??"").join(`
|
|
4
|
+
`)}var Jr=64,wo=new WeakMap;function ft(t,e=0){if(e>Jr)return false;let n=wo.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"||ft(a,e+1))){r=true;break}return chunkDCILO4XD_cjs.rb(t)&&wo.set(t,r),r}var Yr="/word/numbering.xml";function gt(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===Yr)&&t.parts.get(r)!==a)return false;return true}function Kr(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 Be(t,e,n,r){for(let s of e)if(s.ranges.length===0)return false;let a=new Set;for(let s of t)s.kind!=="revision"||s.ranges.length>0||mt(s,n)||a.add(chunkDCILO4XD_cjs.ml(s));for(let s of e)if(a.has(chunkDCILO4XD_cjs.ml(s)))return false;let o=new Set(e.flatMap(s=>chunkDCILO4XD_cjs.ll(s)));for(let s of t)if(s.kind==="revision"&&mt(s,n)&&chunkDCILO4XD_cjs.ll(s).some(l=>!o.has(l)&&chunkDCILO4XD_cjs.eb(r,l)))return false;return true}function Le(t,e,n,r,a=s=>s,o){let s=o?Xr(t,o,n):new Map;if(!s)return null;let l=e.get(n);if(l===void 0)return r.length===0?t:null;let i=[],c=null,{groups:u,absorbed:m}=Vr(t,e,n,r),g=a(m.size>0?r.filter(y=>!m.has(y)):r);for(let y of t){let P=y.kind==="revision"&&u.get(y)||y.kind==="comment"&&s.get(y)||y;if(P.kind==="revision"&&mt(P,n)){c===null&&(c=i.length);continue}if(c===null){let O=Kr(P,e);O!==null&&O>l&&(c=i.length);}i.push(P);}if(c===null&&(c=i.length),g.length>0){let y=g.length<2?[...g]:[...g].sort((P,O)=>chunkDCILO4XD_cjs.tl(P,e)-chunkDCILO4XD_cjs.tl(O,e));i.splice(c,0,...y);}if(u.size>0||s.size>0){let y=[];i.forEach((O,R)=>{(O.kind==="revision"?O.ranges[0]?.start:O.range?.start)?.paragraphId===n&&y.push(R);});let P=y.map(O=>i[O]).sort((O,R)=>chunkDCILO4XD_cjs.tl(O,e)-chunkDCILO4XD_cjs.tl(R,e));y.forEach((O,R)=>i[O]=P[R]);}let p=chunkDCILO4XD_cjs.gm(i);return p.length===t.length&&p.every((y,P)=>y===t[P])?t:p}function Xr(t,e,n){let r=new Map,a;for(let o of t){if(o.kind!=="comment"||!_e(o,n))continue;let s=o.range;if(!s||o.orphaned)return null;if(!a){let u=chunkDCILO4XD_cjs.eb(e,n);if(!u||u.kind!=="paragraph")return null;a=chunkDCILO4XD_cjs.Pj(u);}let l=u=>{let m=a.filter(g=>g.commentId===o.id&&g.kind===u);return m.length===1?m[0].offset:void 0},i=s.start.paragraphId===n?l("start"):s.start.offset,c=s.end.paragraphId===n?l("end"):s.end.offset;if(i===void 0||c===void 0)return null;i===s.start.offset&&c===s.end.offset||r.set(o,{...o,range:{...s,start:{...s.start,offset:i},end:{...s.end,offset:c}}});}return r}function mt(t,e){return t.ranges.length>0&&t.ranges.every(n=>n.start.paragraphId===e&&n.end.paragraphId===e)}function Co(t){return t.revisionKind==="format"&&t.formattingKind==="pPrChange"}function Vr(t,e,n,r){let a=new Map,o=new Set,s=new Map;for(let l of t)if(l.kind==="revision"&&Co(l)&&je(l,n))for(let i of chunkDCILO4XD_cjs.ll(l))s.set(i,l);if(s.size===0)return {groups:a,absorbed:o};for(let l of r){let i=chunkDCILO4XD_cjs.ll(l),c=i.length>0?s.get(i[0]):void 0;if(!c||!i.every(g=>s.get(g)===c))continue;o.add(l);let u=a.get(c)??c,m=[...u.ranges.filter(g=>g.start.paragraphId!==n),...l.ranges].sort((g,p)=>(e.get(g.start.paragraphId)??0)-(e.get(p.start.paragraphId)??0)||g.start.offset-p.start.offset);a.set(c,chunkDCILO4XD_cjs.kl({...u,ranges:m},chunkDCILO4XD_cjs.ll(c)));}return {groups:a,absorbed:o}}function _e(t,e){return t.range?t.range.start.paragraphId===e||t.range.end.paragraphId===e:false}function yt(t,e){return t.revisionKind==="structural"&&t.ranges.some(n=>n.start.paragraphId===e||n.end.paragraphId===e)}function je(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 He(t,e,n){return t.fromRevision!==e.bodyRevision||n.currentPackageRevision!==e.packageRevision+1&&(n.changePackage!==n.currentPackage||!gt(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 Qr(t,e){let n=chunkDCILO4XD_cjs.fb(t,e);if(!n)return;let r=n.children.findIndex(u=>u.id===e);if(n.kind!=="tableCell"||n.children.slice(0,r).some(Mo)){let u=Eo(n.children,r);return u?.kind==="paragraph"?u:void 0}let a=chunkDCILO4XD_cjs.fb(t,n.id);if(!a)return;let o=a.children.filter(u=>u.kind==="tableCell"),s=o.indexOf(n);if(s>0){let u=o[s-1],m=u.kind==="textValue"?void 0:u.children.filter(Mo).at(-1);return m?.kind==="paragraph"?m:void 0}let l=chunkDCILO4XD_cjs.fb(t,a.id);if(!l||l.children.find(u=>u.kind==="tableRow")!==a)return;let i=chunkDCILO4XD_cjs.fb(t,l.id);if(!i)return;let c=Eo(i.children,i.children.findIndex(u=>u.id===l.id));return c?.kind==="paragraph"?c:void 0}function Eo(t,e){for(let n=e-1;n>=0;n-=1){let r=t[n];if(r.kind!=="textValue"&&!chunkDCILO4XD_cjs.zl(r))return r}}var Mo=t=>t.kind==="paragraph"||t.kind==="table"||t.kind==="generic"&&(t.localName==="sdt"||t.localName==="customXml");function ze(t,e){let n=Qr(t,e);return n!==void 0&&n.kind!=="textValue"&&chunkDCILO4XD_cjs.Ol({...t,root:n}).some(r=>r.paragraphMark)}function Do(t,e,n,r){if(!He(t,e,r)||t.splitJoin.length!==1)return false;let a=t.splitJoin[0],o,s;if("split"in a){if(t.deleted.length>0||t.created.length!==1||t.created[0]!==a.split.tail)return false;o=s=[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],s=[a.join.kept];}for(let i of s){let c=chunkDCILO4XD_cjs.eb(r.part,i);if(!c||c.kind!=="paragraph"||chunkDCILO4XD_cjs.Ol({...r.part,root:c}).length>0)return false}if(ze(r.part,s[0]))return false;let l=i=>i!==void 0&&o.includes(i);for(let i of n){let c=i.kind==="revision"?i.ranges:i.range?[i.range]:[];for(let u of c)if(l(u.start.paragraphId)||l(u.end.paragraphId))return false}return true}function ht(t,e,n){let r=chunkDCILO4XD_cjs.sc(n);if(r.length===0)return false;let a=t.parts.get(e.name),o=a?chunkDCILO4XD_cjs.eb(a,n.id):null;if(!o)return true;let s=new Set(chunkDCILO4XD_cjs.sc(o).map(l=>l.node));return r.some(l=>!s.has(l.node))}function xt(t,e,n){let r=new Set(n.flatMap(a=>a.kind==="custom"?[a.id]:[]));if(r.size===0)return false;for(let a=chunkDCILO4XD_cjs.fb(t,e);a;a=chunkDCILO4XD_cjs.fb(t,a.id))if(a.kind==="contentControl"&&r.has(a.id))return true;return false}function Fo(t,e,n,r){if(!He(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],s=chunkDCILO4XD_cjs.eb(a,o);if(!s||s.kind!=="paragraph"||t.impact!=="text-local"&&(chunkDCILO4XD_cjs.Ol({...a,root:s}).length>0||t.impact==="flow-structural"&&chunkDCILO4XD_cjs.fb(a,o)?.localName!=="body")||ht(e.pkg,a,s)||xt(a,o,n)||ze(a,o))return null;for(let l of n){if(l.kind==="comment"){if(_e(l,o)&&t.impact!=="text-local")return null;continue}if(l.kind==="custom"){if(l.range?.start.paragraphId===o)return null;continue}if(yt(l,o)||je(l,o)&&!(t.impact==="text-local"&&Co(l)))return null}return o}var qr=4;function Ao(t){let e=t.root.children.find(n=>n.kind==="body");return e&&e.kind!=="textValue"?e:void 0}function Bo(t){return t.children.find(e=>e.kind!=="textValue"&&e.namespaceUri===chunkDCILO4XD_cjs.pa&&e.localName==="pPr")}function Zr(t,e,n,r){let a=new Map(chunkDCILO4XD_cjs.Ol({...t,root:e}).map(s=>[s.node.id,s.node])),o=chunkDCILO4XD_cjs.Ol({...n,root:r});return o.length>=a.size||!o.every(s=>a.get(s.node.id)===s.node)?false:o.length===0||Bo(e)===Bo(r)}function Lo(t,e){return chunkDCILO4XD_cjs.Ol({...t,root:e}).some(n=>n.paragraphMark)}function ea(t,e,n){if(!He(t,e,n)||!gt(e.pkg,n.currentPackage,n.part.name)||t.created.length>0||t.deleted.length>0||t.splitJoin.length>0)return null;let r=e.pkg.parts.get(n.part.name),a=r&&Ao(r),o=Ao(n.part);if(!r||!a||!o||a.children.length!==o.children.length)return null;let s=[];for(let[l,i]of o.children.entries()){let c=a.children[l];if(i!==c){if(s.length>=qr||i.kind!=="paragraph"||c.kind!=="paragraph"||i.id!==c.id||!Zr(r,c,n.part,i)||Lo(r,c)||Lo(n.part,i)||ze(n.part,i.id)||ht(e.pkg,n.part,i)||xt(n.part,i.id,e.items))return null;s.push(i.id);}}if(s.length===0)return null;for(let l of e.items)for(let i of s)if(l.kind==="comment"){if(_e(l,i))return null}else if(l.kind==="custom"){if(l.range?.start.paragraphId===i)return null}else if(yt(l,i)||je(l,i))return null;return s}function _o(t,e,n,r,a){if(!t||!e||!r.sameFilter)return null;let o=ea(t,e,n);if(!o)return null;let s=e.paragraphOrder??chunkDCILO4XD_cjs.Rk(n.part),l=e.items;for(let i of o){if(!r.patchable(i))return null;let c=a.revisionItemsOfParagraph(n.part,i);if(!Be(l,c,i,n.part))return null;let u=Le(l,s,i,c,r.filtered,n.part);if(!u)return null;l=u;}return {items:l,paragraphOrder:s}}function ta(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 na(t,e){return t.root===e.root&&t.commentsPart===e.commentsPart&&t.commentsExtendedPart===e.commentsExtendedPart&&t.stylesPart===e.stylesPart&&t.numberingRoot===e.numberingRoot&&t.furnitureParts.length===e.furnitureParts.length&&t.furnitureParts.every((n,r)=>n===e.furnitureParts[r])&&ta(t.customNodePayloads,e.customNodePayloads)}function jo(){let t=[];return {get(e){let n=t.findIndex(a=>na(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 Wo=new WeakMap;function _s(t,e){return Wo.set(t,e),t}function oa(t){return t?Wo.get(t):void 0}var ce=new WeakMap,$o={sites:new Set,paragraphs:new Map,key:"",spanning:new Set};function ra(t){return ce.get(t)??$o}function aa(t){return t.kind==="revision"&&t.revisionKind==="format"&&(t.formattingKind==="pPrChange"||t.formattingKind==="rPrChange")}function Ho(t,e){if(t.size!==e.size)return false;for(let n of e)if(!t.has(n))return false;return true}function sa(t,e){if(t.size!==e.size)return false;for(let[n,r]of e)if(t.get(n)!==r)return false;return true}function zo(t,e){return t.key===e.key&&Ho(t.sites,e.sites)&&sa(t.paragraphs,e.paragraphs)&&Ho(t.spanning,e.spanning)?t:e}function Uo(t,e,n,r){let a=oa(t),o={pkg:e,stylesRoot:n.stylesPart?.root??null,numberingRoot:n.numberingRoot},s=r?ra(r.items):$o,l=chunkWWZWT26M_cjs.c(o.stylesRoot,o.numberingRoot),i=[],c=r!==null&&r.stylesPart===n.stylesPart&&(r.numberingRoot===n.numberingRoot||s.sites.size===0&&!r.items.some(aa));return {filtered:u=>{if(!a)return u;let m=a(u,o),g=new Set(m.map(y=>y.id)),p=chunkWWZWT26M_cjs.a(u.filter(y=>!g.has(y.id)));return i.push({result:m,removed:p.sites,paragraphs:p.paragraphs,spanning:p.spanning,touched:chunkWWZWT26M_cjs.b(u),kept:chunkWWZWT26M_cjs.a(m).sites}),m},sameFilter:c,patchable:u=>c&&!s.spanning.has(u),publish:u=>{if(!a||ce.has(u)&&(i.length===0||u!==r?.items))return u;let m=i.at(-1);if(m?.result===u){let P={sites:new Set(m.removed),paragraphs:m.paragraphs,key:l,spanning:new Set(m.spanning)};return ce.set(u,zo(s,P)),u}if(!m)return ce.set(u,s.key===l?s:{...s,key:l}),u;if(s.key===l&&i.every(P=>P.removed.length===0&&!P.kept.some(O=>s.sites.has(O))))return ce.set(u,s),u;let g=new Set(s.sites),p=new Map(s.paragraphs),y=new Set(s.spanning);for(let P of i){for(let O of P.kept)g.delete(O);for(let O of P.removed)g.add(O);for(let O of P.touched)p.delete(O);for(let[O,R]of P.paragraphs)p.set(O,R);for(let O of P.touched)y.delete(O);for(let O of P.spanning)y.add(O);}return ce.set(u,zo(s,{sites:g,paragraphs:p,key:l,spanning:y})),u}}}var Yo=/^[\p{L}\p{N}\p{M} \-.+_,;]{1,64}$/u,ia=["ascii","hAnsi","cs","eastAsia"],la=["asciiTheme","hAnsiTheme","cstheme","eastAsiaTheme"],da=128,ca=/[\u0000-\u001F\u007F-\u009F]/;function M(t){return t.kind!=="textValue"}function ee(t,e){return t.attributes.find(n=>n.localName===e)?.value}function Ko(t,e){let n=new Map;for(let a of t)for(let o of a.children)if(M(o))for(let[s,l]of Qo(o,e))n.has(s)||n.set(s,l);let r=[...n.values()];return r.sort((a,o)=>a<o?-1:a>o?1:0),We.length===r.length&&We.every((a,o)=>a===r[o])?We:(We=r,r)}var We=[],Pt=new WeakMap,Xo=16,Vo=32,ue=new Map,ua=64;function pa(t,e){return t?.major===e?.major&&t?.minor===e?.minor&&t?.majorEastAsia===e?.majorEastAsia&&t?.minorEastAsia===e?.minorEastAsia&&t?.majorBidi===e?.majorBidi&&t?.minorBidi===e?.minorBidi}function fa(t,e){if(t===e)return true;if(!t||!e||t.size!==e.size)return false;for(let[n,r]of t)if(e.get(n)!==r)return false;return true}function ma(t,e,n){let r=t.children,a=ue.get(t.id),o=a?.children.deref(),s=a!==void 0&&o!==void 0&&o.length===r.length&&pa(a.themeFonts,e),l=s,i=r.map((u,m)=>{if(s&&u===o[m])return a.parts[m];let g=M(u)?Qo(u,e,n+1):null;return l&&!fa(g,a.parts[m])&&(l=false),g}),c;if(l)c=a.byFold;else {let u=new Map;for(let m of i)if(m)for(let[g,p]of m)u.has(g)||u.set(g,p);c=u;}return ue.delete(t.id),ue.set(t.id,{children:chunkDCILO4XD_cjs.yh(r),parts:i,byFold:c,themeFonts:e}),ue.size>ua&&ue.delete(ue.keys().next().value),c}function Qo(t,e,n=0){let r=e?.major??null,a=e?.minor??null,o=e?.majorEastAsia??null,s=e?.minorEastAsia??null,l=e?.majorBidi??null,i=e?.minorBidi??null,c=Pt.get(t);if(c&&c.major===r&&c.minor===a&&c.majorEastAsia===o&&c.minorEastAsia===s&&c.majorBidi===l&&c.minorBidi===i)return c.byFold;if(t.children.length>=Xo&&n<Vo&&t.localName!=="rFonts"){let p=ma(t,e,n);return Pt.set(t,{major:r,minor:a,majorEastAsia:o,minorEastAsia:s,majorBidi:l,minorBidi:i,byFold:p}),p}let u=new Map,m=p=>{if(!p||!Yo.test(p))return;let y=p.toLowerCase();u.has(y)||u.set(y,p);},g=[t];for(;g.length>0;){let p=g.pop();if(M(p)){if(p.localName==="rFonts"){for(let y of ia)m(ee(p,y));if(e)for(let y of la)m(chunkDCILO4XD_cjs.pe(ee(p,y),e));}for(let y=p.children.length-1;y>=0;y-=1)g.push(p.children[y]);}}return Pt.set(t,{major:r,minor:a,majorEastAsia:o,minorEastAsia:s,majorBidi:l,minorBidi:i,byFold:u}),u}function qo(t){let e=new Map;for(let r of t)for(let a of r.children)if(M(a))for(let[o,s]of St(a).all)e.has(o)||e.set(o,s);let n=[...e.values()];return n.sort((r,a)=>r<a?-1:r>a?1:0),n}function Js(t){let e=new Map;for(let n of t)for(let r of n.children)if(M(r))for(let[a,o]of St(r).unmapped)e.has(a)||e.set(a,o);return [...e.values()]}var Go=new WeakMap,Rt=new Map,ga={all:Rt,unmapped:Rt};function St(t,e=0){let n=Go.get(t);if(n)return n;let r=new Map,a=new Map,o=()=>{let i=r.size===0?ga:{all:r,unmapped:a.size===0?Rt:a};return Go.set(t,i),i};if(t.children.length>=Xo&&e<Vo&&t.localName!=="sym"&&t.localName!=="r"){for(let i of t.children){if(!M(i))continue;let c=St(i,e+1);for(let[u,m]of c.all)r.has(u)||r.set(u,m);for(let[u,m]of c.unmapped)a.has(u)||a.set(u,m);}return o()}let s=[t],l=new Set;for(;s.length>0;){let i=s.pop();if(!M(i))continue;let c=l.has(i)||i.localName==="r"&&i.namespaceUri===chunkDCILO4XD_cjs.pa&&chunkSJV6WCTP_cjs.a(i);if(i.localName==="sym"&&i.namespaceUri===chunkDCILO4XD_cjs.pa){let u=i.attributes.find(g=>g.localName==="font"&&(g.namespaceUri===chunkDCILO4XD_cjs.pa||g.namespaceUri===""))?.value,m=chunkSJV6WCTP_cjs.c(u);if(m!==null){let g=m.toLowerCase();r.has(g)||r.set(g,m);let p=c?null:chunkDCILO4XD_cjs.Xl(i);p&&ya(p.text)&&!a.has(g)&&a.set(g,m);}}for(let u=i.children.length-1;u>=0;u-=1){let m=i.children[u];c&&l.add(m),s.push(m);}}return o()}function ya(t){let e=t.codePointAt(0);return e!==void 0&&e>=57344&&e<=63743}function Zo(t){let e=[...t];for(;e.length>0;){let n=e.pop();if(M(n)){if(n.localName==="t"&&n.namespaceUri===chunkDCILO4XD_cjs.pa){for(let r of n.children)if(!M(r)&&r.value.length>0)return true;continue}for(let r of n.children)e.push(r);}}return false}var ha=new Set(["paragraph","character","table","numbering"]),xa=/^[0-9A-Fa-f]{6}$/,Pa=16,Jo=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 er(t){return t.children}function kt(t,e){for(let n of er(t))if(M(n)&&n.localName===e)return n}function ka(t){return Jo.get(t.name.toLowerCase())??Jo.get(t.styleId.toLowerCase())??Number.MAX_SAFE_INTEGER}function Ot(t){return t===void 0||t.length===0||t.length>da||ca.test(t)?null:t}function tr(t,e){if(!t)return [];let n=new Map;for(let o of t.children){if(!M(o)||o.localName!=="style")continue;let s=Ot(ee(o,"styleId"));s!==null&&!n.has(s)&&n.set(s,o);}let r=o=>{let s=false,l=false,i=null,c=false,u=false,m=new Set,g=o;for(let P=0;P<Pa&&g!==null&&!m.has(g);P+=1){m.add(g);let O=n.get(g);if(!O)break;let R=kt(O,"rPr");for(let I of R?er(R):[]){if(!M(I))continue;let b=ee(I,"val"),w=b!=="0"&&b!=="false"&&b!=="off";I.localName==="b"&&!c?(s=w,c=true):I.localName==="i"&&!u?(l=w,u=true):I.localName==="color"&&i===null&&b&&xa.test(b)&&(i=b);}let v=kt(O,"basedOn");g=v?Ot(ee(v,"val")):null;}let p=e?.(o),y=p?.fontFamily??null;return {fontFamily:y!==null&&Yo.test(y)?y:null,fontSizePt:p?.fontSizeHalfPoints!=null&&p.fontSizeHalfPoints>0?p.fontSizeHalfPoints/2:null,bold:s,italic:l,color:i}},a=[];for(let[o,s]of n){let l=ee(s,"type");if(l===void 0||!ha.has(l))continue;let i=kt(s,"name"),c=Ot(i?ee(i,"val"):void 0);a.push({styleId:o,name:c??o,type:l,preview:r(o)});}return a.map((o,s)=>({entry:o,index:s,rank:ka(o)})).sort((o,s)=>o.rank-s.rank||o.index-s.index).map(o=>o.entry)}var Oa=128,Ra=/[\u0000-\u001F\u007F-\u009F]/,Sa=/[\u0000-\u001F\u007F-\u009F]/g,va=200;function bt(t){return t.kind!=="textValue"}function nr(t,e){for(let n of t.children)if(bt(n)&&n.localName===e)return n}function vt(t,e){return t.attributes.find(n=>n.localName===e)?.value}function ba(t){let e=new Map;if(!t)return e;for(let n of t.children){if(!bt(n)||n.localName!=="style"||vt(n,"type")!=="paragraph")continue;let r=vt(n,"styleId");if(r===void 0||r.length===0||r.length>Oa||Ra.test(r))continue;let a=chunk2C75IWUN_cjs.g(n);a!==null&&e.set(r,a);}return e}function It(t){let e=nr(t,"pPr"),n=e?nr(e,"pStyle"):void 0;return n?vt(n,"val"):void 0}function or(t,e){let n=ba(e);if(n.size===0)return [];let r=[];for(let a of de(t)){if(!bt(a))continue;let o=It(a);if(o===void 0)continue;let s=n.get(o);if(s===void 0)continue;let l=chunkDCILO4XD_cjs.Jm(t,a.id)??"",i=a.kind==="paragraph"?chunkDCILO4XD_cjs.Lm(a,l):l,c=chunkDCILO4XD_cjs._b(i).replace(Sa," ").trim().slice(0,va);c.length!==0&&r.push({text:c,level:s,blockId:a.id});}return r}var rr=new Map,$e=new Map;function ar(){rr=$e,$e=new Map;}function Tt(t){let e=$e.get(t)??rr.get(t);return e||(e=chunkDCILO4XD_cjs.id(t)),$e.set(t,e),e}function Ia(t,e,n){let r=new Map,a=n(t);for(let o of a){let s=r.get(o.hostParagraphId);s?s.push(o):r.set(o.hostParagraphId,[o]);}return r}function Ta(t,e,n){let r=[];for(let a of Tt(t.root)){let o=e.get(a.id);if(o)for(let s of o)r.push(s);}return r}function sr(t,e,n=chunkDCILO4XD_cjs.bk){let r=[],a=new Map;for(let o of t){if(r.push(o),o.scope?.kind==="note")continue;let s=a.get(o.part);s||(s=Ia(o.part,e,n),a.set(o.part,s));for(let l of Ta(o,s)){let i=o.scope;r.push({part:o.part,root:l.root,scope:{kind:"frame",id:l.root.id,drawingNodeId:l.drawingNodeId,hostParagraphId:l.hostParagraphId,...i?.kind==="headerFooter"?{owner:i}:{}}});}}return r}var Ue=48,wa=/[\u0000-\u001F\u007F-\u009F]/g;function Na(t){let e=[],n=chunkDCILO4XD_cjs.Ei(t),r=new Map;for(let a of n.segments)chunkDCILO4XD_cjs.dh(a.node)&&r.set(a.node.id,a.formatRunIds??[]);return chunkDCILO4XD_cjs.sd(t.children,0,a=>{if(a.kind==="run"){e.push({id:a.id,start:n.spanOf(a)?.start??0});return}if(chunkDCILO4XD_cjs.dh(a))for(let o of r.get(a.id)??[]){let s=n.spanOf(o);s&&e.push({id:o,start:s.start});}},{descendRevisions:true}),e}function Ea(t){let e=chunkDCILO4XD_cjs.hd(t);return e?[{part:t,root:e}]:[]}function Ma(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[s,l]of o){if(!chunkDCILO4XD_cjs.pf(a,s)||e.has(l.part))continue;e.add(l.part);let i=chunkDCILO4XD_cjs.fd(l.part).find(c=>c.kind===r);i&&n.push({part:l.part,root:i.root,scope:{kind:"headerFooter",rId:l.rId}});}}return n}function ir(t,e,n){if(!t)return [];let r=[];for(let a of chunkDCILO4XD_cjs.bd(t.root)){let o=chunkDCILO4XD_cjs.Rc(a);!chunkDCILO4XD_cjs.Tc(a)||o===null||!n.has(o)||r.push({part:t,root:a,scope:{kind:"note",id:chunkDCILO4XD_cjs.Hc(e,o)}});}return r}function Ca(t,e){let n=Ea(t);if(e){let r=new Set;for(let a of Ma(e.headerFooterBySection,r))n.push(a);for(let a of ir(e.footnotes,"footnote",e.referencedNoteIds.footnote))n.push(a);for(let a of ir(e.endnotes,"endnote",e.referencedNoteIds.endnote))n.push(a);}return sr(n)}function lr(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 Da(t,e,n){let r=t.findIndex(a=>a.id===e);return r<0?null:{index:r,offset:n}}var dr=new chunkDCILO4XD_cjs.Wg;function Fa(t){let e=dr.get(t);return e||(e=chunkCBJMRC4L_cjs.d(t,chunkDCILO4XD_cjs.Km(t)),dr.set(t,e)),e}function wt(t,e){return chunkDCILO4XD_cjs._b(t).replace(wa," ").slice(0,e)}var Aa=1e3;function cr(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}},s=e.slice(0,Aa),l=s.map(()=>({matches:[],truncated:false})),i=s.map((u,m)=>chunkQALWAAPL_cjs.xa(u)?m:-1);if(i=i.filter(u=>u>=0),i.length===0)return l;let c=n.stories==="body"?void 0:r;ar();for(let u of Ca(t,c)){let m=0;for(let g of Tt(u.root)){if(g.kind!=="paragraph")continue;let p=m;m+=1;let y=Fa(g);if(y.text.length===0)continue;let P=null,O=false;for(let R of i){let v=l[R],I=a-v.matches.length,b=y.findOccurrences(s[R],Math.max(I,1),o);if(I===0&&b.matches.length>0){v.truncated=true,O=true;continue}for(let w of b.matches){let C=w.start+w.length;P??=Na(g);let j=y.resultRunAddressAt(w.start),$=j?Da(P,j.runId,j.offset)??lr(P,w.rawStart):lr(P,w.rawStart);v.matches.push({blockId:g.id,start:w.rawStart,length:w.rawEnd-w.rawStart,paragraphIndex:p,runIndex:$.index,runOffset:$.offset,...u.scope?{scope:u.scope}:{},text:wt(y.displaySlice(w.start,C),256),contextBefore:wt(y.displaySlice(Math.max(0,w.start-Ue),w.start),Ue),contextAfter:wt(y.displaySlice(C,C+Ue),Ue)});}b.truncated&&(v.truncated=true,O=true);}if(O&&(i=i.filter(R=>!l[R].truncated)),i.length===0)return l}}return l}var Ba=32;function ur(t){let e=null;return((n,r)=>{let a=t.revision(),o=typeof n!="string",s=`${r?.matchCase===true?"c":""}${r?.wholeWord===true?"w":""}`,l=`${r?.limit??""}:${r?.stories??"all"}`,i=JSON.stringify([s,l,n]);e?.revision!==a&&(e={revision:a,results:new Map});let c=e.results.get(i);if(c)return c;let u=t.bodyPart(),m=t.currentPackage(),g={footnote:new Set,endnote:new Set};for(let P of chunkDCILO4XD_cjs.qj(u))g[P.noteKind].add(P.noteId);let p=cr(u,o?n:[n],r,{headerFooterBySection:t.headerFooterBySection(),footnotes:chunkDCILO4XD_cjs.pj(m,"footnote")??null,endnotes:chunkDCILO4XD_cjs.pj(m,"endnote")??null,referencedNoteIds:g}),y=o?p:p[0];return e.results.size>=Ba&&e.results.delete(e.results.keys().next().value),e.results.set(i,y),y})}var La=["lt1","dk1","lt2","dk2","accent1","accent2","accent3","accent4","accent5","accent6"];function pe(t,e=null,n=null){return chunkDCILO4XD_cjs.oe(t,e,n)}function pr(t){let e=chunkDCILO4XD_cjs.re(t),n=[];for(let r of La){let a=e.get(r);if(!a)return [];n.push({slot:r,hex:a});}return n}var fr=new WeakMap;function Et(t){let e=fr.get(t);if(e!==void 0)return e;let n=chunkDCILO4XD_cjs.wb(t),r=n===null||!chunkDCILO4XD_cjs.vb(n)?null:n;return fr.set(t,r),r}var Nt=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 mr(t,e){return Object.freeze({...t,partByNode:new Nt(t.ordinalByNode,e)})}function gr(t){let e=new Map,n=new Map,r=new Map,a=new Set,o=new Map,s=new Map,l=0;for(let i of t)for(let c of _(i)){r.set(c.id,l),o.set(c.id,i),l+=1;let u=Et(c);if(u===null)continue;e.set(c.id,u);let m=u.toUpperCase(),g=s.get(m);g?(g.push(c.id),a.add(m)):(s.set(m,[c.id]),n.set(m,c.id));}return Object.freeze({paraIdByNode:e,nodeByParaId:n,ordinalByNode:r,ambiguousParaIds:a,partByNode:o,claimantsByParaId:s})}function yr(t,e){let n=t.indexOf("#");if(n===0)return null;let r=n===-1?ja(t,e):_a(t,n,e);if(!r)return null;let a=chunkDCILO4XD_cjs.eb(r,t);return a?.kind==="paragraph"?Et(a):null}function _a(t,e,n){let r=t.slice(0,e),a=n.body.name===r?n.body:void 0;a??=n.openStories.find(s=>s.name===r);let o=a?void 0:n.otherStories.find(s=>s.name===r);return a??(o?n.normalize(o):void 0)}function ja(t,e){if(chunkDCILO4XD_cjs.eb(e.body,t))return e.body;let n=e.openStories.find(r=>chunkDCILO4XD_cjs.eb(r,t)!==null);if(n)return n;for(let r of e.otherStories){let a=e.normalize(r);if(chunkDCILO4XD_cjs.eb(a,t))return a}}function Mt(t){return t.historyToken??t.historyGroup}var hr={committed:false,rejected:false,opCount:0};function W(t,e){return e===void 0?{committed:false,rejected:true,opCount:t}:{committed:false,rejected:true,opCount:t,reason:e}}function xr(t,e,n={}){let r=e.filter(u=>u.ops.length>0),a=n.partOps??[],o=[...r,...a].reduce((u,m)=>u+m.ops.length,0);if(o===0)return n.packageEdits?.length?W(0,"invalidArgs"):hr;if([...r,...a].some(u=>u.ops.some(chunkDCILO4XD_cjs.kj))||[...r,...a].some(u=>u.ops.some(chunkDCILO4XD_cjs.Fj)))return W(o,"invalidArgs");let[s,...l]=r,i=[];for(let u of l){let m=t.partFor(u.scope);if(!m)return W(o,"unknown-part");i.push({partName:m.name,ops:u.ops});}let c=t.transact(s?.scope??{kind:"body"},u=>{for(let m of n.packageEdits??[])u.applyPackage(m);for(let m of s?.ops??[])u.apply(m);for(let m of i)for(let g of m.ops)u.applyTo(m.partName,g);for(let m of a)for(let g of m.ops)u.applyTo(m.partName,g);},{...n,historyGroup:Mt(n)});return c.ok?{committed:true,rejected:false,opCount:o}:W(o,c.reason)}function Pr(t,e,n,r,a,o){let s=o.partOps??[],l=e.length+s.reduce((m,g)=>m+g.ops.length,0);if(l===0&&!o.packageEdits?.length)return hr;if(s.some(m=>m.ops.some(g=>chunkDCILO4XD_cjs.kj(g)||chunkDCILO4XD_cjs.Fj(g))))return W(l,"invalidArgs");let i=e.filter(m=>chunkDCILO4XD_cjs.kj(m)||chunkDCILO4XD_cjs.Fj(m)).length;if(i>0){if(s.length||o.packageEdits?.length||i!==e.length||e.length!==1)return W(e.length,"invalidArgs");let m=t.applyLifecycleOp(e[0],{actorId:o.actorId,historyGroup:Mt(o)});return m.ok?{committed:true,rejected:false,opCount:1}:W(1,m.detail??m.reason)}let c=o.recordsHistory===false&&o.actorId&&o.operationId?t.partFor(a)?.name:void 0,u=t.transact(a,m=>{n!==void 0&&m.selectionBefore(n),r!==void 0&&m.selectionAfter(r);for(let g of o.packageEdits??[])m.applyPackage(g);for(let g of e)m.apply(g);for(let g of s)for(let p of g.ops)m.applyTo(g.partName,p);c&&m.applyPackage(g=>chunkTY5CE2JR_cjs.a(g,c,e));},{...o,historyGroup:Mt(o)});return u.ok?{committed:true,rejected:false,opCount:l}:W(l,u.reason)}var Ha=Object.freeze([]);function za(t,e={}){return Wa(chunkDCILO4XD_cjs.lg(t),e)}function Wa(t,e={}){if(!t.ok)return t;let n=chunkQALWAAPL_cjs.sa(t.package),r=n.parts.get(n.mainDocumentPart);if(!r)return {ok:false,reason:"no-main-document-tree",detail:n.mainDocumentPart};let a=chunkDCILO4XD_cjs.Eb(r),o=new chunkQALWAAPL_cjs.S(n,chunkQALWAAPL_cjs.za(n,a),e.contentLockPolicy?{contentLockPolicy:e.contentLockPolicy}:{}),s=null,l=null,i=null,c=null,u=null;o.subscribe(d=>{c=d,u=o.currentPackage();});let m=()=>o.bodyStore(),g=()=>o.currentPackage(),p=To(),y=Object.freeze({kind:"body"}),P=(d,f)=>{let h=f?.find(k=>k.type==="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings");if(!h)return;let x=chunkDCILO4XD_cjs.N(h);return x.mode==="Internal"&&x.target.ok?d.parts.get(x.target.partName):void 0},O=(d,f,h)=>{if(d.mainRelationships!==h||d.settingsPart!==P(f,h))return false;for(let x of d.resolution)for(let k of [x.headers,x.footers])for(let S of k.values())if(f.parts.get(S.partName)!==S.part)return false;return true},R=()=>{let d=g(),f=d.relationships.get(d.mainDocumentPart);if(s&&c&&u===d&&O(s,d,f)&&s.packageRevision===c.fromRevision&&o.packageRevision===c.toRevision&&c.story?.kind==="body"&&c.impact==="text-local"&&c.created.length===0&&c.deleted.length===0&&c.splitJoin.length===0&&(s={...s,packageRevision:o.packageRevision,pkg:d,mainRelationships:f,settingsPart:P(d,f)}),!s||s.packageRevision!==o.packageRevision||s.pkg!==d){let h=chunkDCILO4XD_cjs.sf(d);s={packageRevision:o.packageRevision,pkg:d,mainRelationships:f,settingsPart:P(d,f),resolution:h,parts:chunkDCILO4XD_cjs.rf(h)};}return s},v="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",I=null,b=()=>{let d=g(),f=(d.relationships.get(d.mainDocumentPart)??[]).find(k=>k.type===v),h;if(f){let k=chunkDCILO4XD_cjs.N(f);k.mode==="Internal"&&k.target.ok&&(h=d.parts.get(k.target.partName));}h??=d.parts.get("/word/styles.xml");let x=h?.root??null;return x!==I&&(I=x,ye=null,V=null),I},w=null,C=null,j=()=>{let d=g();return w===d||(w=d,C=chunkDCILO4XD_cjs.vd(d)),C},$="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",Se=null,ve=null,X=()=>{let d=g();if(Se===d)return ve;Se=d;let f=(d.relationships.get(d.mainDocumentPart)??[]).find(k=>k.type===$),h;if(f){let k=chunkDCILO4XD_cjs.N(f);k.mode==="Internal"&&k.target.ok&&(h=d.parts.get(k.target.partName));}h??=d.parts.get("/word/settings.xml");let x=h?.root??null;return x!==ve&&(ve=x,Ie=null,ye=null,V=null),ve},Or="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",Rr="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",Ct=(d,f)=>{let h=g(),x=(h.relationships.get("/")??[]).find(S=>S.type===d),k;if(x){let S=chunkDCILO4XD_cjs.N(x);S.mode==="Internal"&&S.target.ok&&(k=h.parts.get(S.target.partName));}return k??h.parts.get(f)},Dt=null,Ge=chunkDCILO4XD_cjs.$j,Sr=()=>{let d=g();if(Dt===d)return Ge;Dt=d;let f=Ct(Or,"/docProps/core.xml"),h=Ct(Rr,"/docProps/app.xml");return Ge=chunkDCILO4XD_cjs.ak(f?.root??null,h?.root??null),Ge},vr="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Ft=null,be=null,te=()=>{let d=g();if(Ft===d)return be;Ft=d;let f=(d.relationships.get(d.mainDocumentPart)??[]).find(k=>k.type===vr),h;if(f){let k=chunkDCILO4XD_cjs.N(f);k.mode==="Internal"&&k.target.ok&&(h=d.parts.get(k.target.partName));}h??=d.parts.get("/word/theme/theme1.xml");let x=h?.root??null;return x!==be&&(be=x,Ie=null,Je=null,ye=null,V=null),be},br="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",At=null,Bt=()=>{let d=g(),f=(d.relationships.get(d.mainDocumentPart)??[]).find(k=>k.type===br),h=f?chunkDCILO4XD_cjs.N(f):null;return (h?.mode==="Internal"&&h.target.ok?d.parts.get(h.target.partName):void 0)??d.parts.get("/word/fontTable.xml")},Ir=()=>(At??=Object.freeze(chunkDCILO4XD_cjs.Sg(g(),Bt())),At),fe=null,ne=null,me=null,ge=null,ye=null,Je=null,Ie=null,Lt=()=>{let d=[m().part.root],f=new Set;for(let h of U())f.has(h)||(f.add(h),d.push(h.root));return d},Ye=()=>{let d=Lt(),f=b();return f&&d.splice(1,0,f),d},V=null,Te=null,he=null,oe=null,_t=new WeakMap,we=null,jt=d=>{let f=_t.get(d);if(f)return f;let h=chunkDCILO4XD_cjs.Eb(d);return _t.set(d,h),h},Ht=()=>{let d=o.packageRevision,f=o.openStoryToken();if(!oe||oe.revision!==d||oe.openStories!==f){let h=o.openStoryParts(),x=new Set(h.map(F=>F.name)),k=U().filter(F=>!x.has(F.name)).map(jt),S=[m().part,...h,...k],T=oe,H=T!==null&&c!==null&&T.openStories===f&&T.revision===c.fromRevision&&d===c.toRevision&&c.impact==="text-local"&&c.created.length===0&&c.deleted.length===0&&c.splitJoin.length===0&&T.parts.length===S.length&&T.parts.every((F,G)=>F.name===S[G]?.name);oe={revision:d,openStories:f,parts:S,index:H&&T?mr(T.index,S):gr(S)};}return oe.index},zt=jo(),Tr=()=>{let d=m().part.name,f=new Map;for(let h of [m().part,...U()])for(let[x,k]of chunkQALWAAPL_cjs.ja(g(),h.name,d))f.set(x,k);return f},wr=()=>[m().part,...U()],U=()=>{let d=[],f=new Set;for(let x of R().parts)for(let k of [x.headers,x.footers])for(let S of k.values())f.has(S)||(f.add(S),d.push(S));let h=g();for(let x of ["footnote","endnote"]){let k=chunkDCILO4XD_cjs.pj(h,x);!k||f.has(k)||(f.add(k),d.push(k));}return d},Wt={ok:true,session:{editable:_(m().part).length>0,paragraphIds:()=>_(m().part).map(d=>d.id),paragraphIdsIn(d=y){let f=o.partFor(d);return f?_(f).map(h=>h.id):[]},part:()=>m().part,partFor:d=>o.partFor(d),currentPackage:g,collaborationPort:d=>chunkTY5CE2JR_cjs.b(o,{documentId:d,interactive:true}),applyTreeOps(d,f,h,x=y,k={}){return Pr(o,d,f,h,x,k)},applyTreeOpsAtomic(d,f={}){return xr(o,d,f)},projectDoc:()=>Z(m().part),reconcile:d=>pt(d,m().part,c),lastCommitWasStructural:()=>c!==null&&(c.created.length>0||c.deleted.length>0||c.splitJoin.length>0||c.impact==="global"),applyPmDoc(d){let f=m(),h=ut(f.part,d);if(!h.ok)return {committed:false,rejected:true,opCount:0,reason:h.reason};if(h.ops.length===0)return {committed:false,rejected:false,opCount:0};let x=o.transact(y,k=>{for(let S of h.ops)k.apply(S);});return x.ok?{committed:true,rejected:false,opCount:h.ops.length}:{committed:false,rejected:true,opCount:h.ops.length,reason:x.reason}},storyParts:wr,bodyText:()=>No(m().part),storyText(d){let f=o.partFor(d);return f?_(f).map(h=>chunkDCILO4XD_cjs.Jm(f,h.id)??"").join(`
|
|
5
|
+
`):null},revision:()=>m().revision,revisionFor:d=>o.revisionFor(d),packageRevision:()=>o.packageRevision,canUndo:()=>o.canUndo,canRedo:()=>o.canRedo,undo:()=>{let d=o.selectionForUndo();return o.undo()===null?null:d},redo:()=>{let d=o.selectionForRedo();return o.redo()===null?null:d},beginComposition:(d=y)=>{o.beginComposition(d);},endComposition:()=>o.endComposition(),subscribe(d){return o.subscribe(d)},save(){return p(g())},saveSteps(){return p.steps(g())},headerFooterParts:()=>{let d=R().parts;return d[d.length-1]??chunkDCILO4XD_cjs.uf(g())},headerFooterPartsBySection:()=>R().parts,headerFooterResolutionBySection:()=>R().resolution,documentFonts(){return fe&&fe.revision===o.packageRevision||(fe={revision:o.packageRevision,fonts:Ko(Ye(),pe(te(),X()))}),fe.fonts},symbolFontFamilies(){return me&&me.revision===o.packageRevision||(me={revision:o.packageRevision,fonts:qo(Ye())}),me.fonts},renderedFontFamilies(){let d=b();return ne&&ne.revision===o.packageRevision&&ne.styles===d||(ne={revision:o.packageRevision,styles:d,families:chunkSJV6WCTP_cjs.f(Lt(),d,pe(te(),X()))}),ne.families},rendersText(){return ge&&ge.revision===o.packageRevision||(ge={revision:o.packageRevision,rendersText:Zo(Ye())}),ge.rendersText},documentStyles(){let d=b(),f=te(),h=X();V??=chunkSJV6WCTP_cjs.d(d,pe(f,h));let x=V;return ye??=tr(d,k=>x(k)),ye},stylesRoot:()=>b(),documentThemeFonts(){let d=te(),f=X();return Ie??=pe(d,f,Bt()?.root??null),Ie},numberingRoot:()=>j(),settingsRoot:()=>X(),documentProperties:()=>Sr(),trackingSettings:()=>chunkDCILO4XD_cjs.Yj(X()),documentThemeColors(){let d=te();return Je??=pr(d),Je},effectiveRunDefaults(d,f){let h=b(),x=te(),k=X();V??=chunkSJV6WCTP_cjs.d(h,pe(x,k));let S=m();if(!Te||Te.revision!==S.revision){let T=new Map;for(let H of _(S.part))H.kind!=="textValue"&&T.set(H.id,It(H)??null);Te={revision:S.revision,byId:T};}return V(Te.byId.get(d)??null,f)},documentOutline(){let d=m();return he&&he.revision===d.revision||(he={revision:d.revision,outline:or(d.part,b())}),he.outline},findText:ur({revision:()=>o.packageRevision,bodyPart:()=>m().part,currentPackage:g,headerFooterBySection:()=>R().resolution}),embeddedFonts:Ir,paragraphAnchors:Ht,paraIdOf:d=>yr(d,{body:m().part,openStories:o.openStoryParts(),otherStories:U(),normalize:jt}),nodeIdOf:d=>Ht().nodeByParaId.get(d.toUpperCase())??null,relationshipTarget:(d,f=y)=>{let h=g(),x=o.partFor(f);return x?chunkDCILO4XD_cjs.fj(h,x.name,d):null},bookmarks:()=>{let d=o.packageRevision;if(!we||we.revision!==d){let f=new Map(chunkDCILO4XD_cjs.Hi(m().part));for(let h of U())for(let[x,k]of chunkDCILO4XD_cjs.Hi(h))f.has(x)||f.set(x,k);we={revision:d,index:f};}return we.index},ensureHyperlinkRelationship(d,f=y){let h=o.partFor(f);return h?chunkDCILO4XD_cjs.Xa(o,()=>{let x=g(),k=chunkDCILO4XD_cjs.ej(x,d,h.name);return k?(k.pkg!==x&&o.replacePackageShell(k.pkg),k.relationshipId):null},x=>x!==null):null},reviewItems(){let d=e.reviewModel;if(!d)return Ha;let f=m(),h=`${o.packageRevision}:${f.revision}`;if(l&&l.revisionKey===h)return l.items;let x=g(),k=x.parts.get(chunkQALWAAPL_cjs.$(x,f.part.name)),S=x.parts.get(chunkQALWAAPL_cjs.aa(x,f.part.name)),T={root:f.part.root,commentsPart:k,commentsExtendedPart:S,stylesPart:chunkDCILO4XD_cjs.ud(x),numberingRoot:j(),furnitureParts:U(),customNodePayloads:Tr()},{stylesPart:H,numberingRoot:F}=T,G=Uo(d,x,T,l),$t=()=>zt.get(T)??G.filtered(d.collectReviewItems({storyPart:f.part,furnitureParts:T.furnitureParts,stylesPart:T.stylesPart,commentsPart:k,commentsExtendedPart:S,customNodePayloads:T.customNodePayloads})),Ke={part:f.part,commentsPart:k,commentsExtendedPart:S,currentPackageRevision:o.packageRevision,currentPackage:x,changePackage:u},re,xe=null;if(l&&c&&G.sameFilter&&Do(c,l,l.items,Ke))re=l.items;else {let ae=l&&c?Fo(c,l,l.items,Ke):null,Xe=ae&&l&&G.patchable(ae)?d.revisionItemsOfParagraph(f.part,ae):null;if(ae&&l&&Xe&&Be(l.items,Xe,ae,f.part)){xe=l.paragraphOrder??chunkDCILO4XD_cjs.Rk(f.part);let Pe=Le(l.items,xe,ae,Xe,G.filtered,f.part);Pe||(xe=chunkDCILO4XD_cjs.Rk(f.part)),re=Pe??$t();}else {let Pe=_o(c,l,Ke,G,d);xe=Pe?.paragraphOrder??chunkDCILO4XD_cjs.Rk(f.part),re=Pe?.items??$t();}}return zt.set(T,re=G.publish(re)),l={revisionKey:h,bodyRevision:f.revision,packageRevision:o.packageRevision,items:re,paragraphOrder:xe,commentsPart:k,commentsExtendedPart:S,pkg:x,stylesPart:H,numberingRoot:F},l.items},hasReviewContent(){let d=o.packageRevision;if(!i||i.revision!==d){let f=chunkDCILO4XD_cjs.ud(g()),h=[m().part,...U(),...f?[f]:[]];i={revision:d,present:h.some(x=>ft(x.root)||chunkDCILO4XD_cjs.Ol(x).length>0)};}return i.present},replyToComment(d,f,h,x,k,S=y,T,H={}){let F=chunkQALWAAPL_cjs.ba(o,{anchor:{paragraphId:f.paragraphId,start:f.start,end:f.end,...f.endParagraphId===void 0?{}:{endParagraphId:f.endParagraphId}},author:x,text:h,...k===void 0?{}:{date:k},...d===null?{}:{replyToCommentId:d},...T===void 0?{}:{actorId:T}},S,H.historyToken);return F.ok?F.commentId:null},setCommentResolved(d,f,h={}){return chunkQALWAAPL_cjs.ca(o,d,f,h.historyToken).ok},deleteComment(d,f=y,h,x){return this.deleteComments([{commentId:d}],f,h,x)},deleteComments(d,f=y,h,x={}){return chunkQALWAAPL_cjs.da(o,d,f,h,x.historyToken)},insertCustomNode(d,f=y,h={}){return chunkQALWAAPL_cjs.la(o,d,f,h.historyToken)},removeCustomNode(d,f=y){return chunkQALWAAPL_cjs.ma(o,d,f)},sweepCustomNodePayloads(d){return chunkDCILO4XD_cjs.Xa(o,()=>{let f=m(),h=chunkQALWAAPL_cjs.ia(o.currentPackage(),f.part.name,d);return h.ok?h.removed.length===0?{ok:true,removed:[]}:(o.replacePackageShell(h.pkg),{ok:true,removed:h.removed}):{ok:false,reason:h.reason}},f=>f.ok&&f.removed.length>0)},ensureListDefinition(d,f){return chunkDCILO4XD_cjs.Xa(o,()=>{let h=chunkDCILO4XD_cjs.Ti(g(),d,f);return h?(o.replacePackageShell(h.pkg),w=null,C=null,h.numId):null},h=>h!==null)},ensureNumberingLevel(d,f,h){return chunkDCILO4XD_cjs.Xa(o,()=>{let x=g(),k=chunkDCILO4XD_cjs.Ui(x,d,f,h);return k?k!==x?(o.replacePackageShell(k),w=null,C=null,{ok:true,changed:true}):{ok:true,changed:false}:{ok:false,changed:false}},x=>x.changed).ok},insertImage(d,f){return o.insertImage(d,f)},replaceImage(d,f,h,x,k,S){return o.replaceImage(d,f,h,x,k,S)},deleteImage(d,f){return o.deleteImage(d,f)},deleteImageTracked(d,f,h){return o.deleteImageTracked(d,f,h)},applyImageProperties:(d,f)=>o.applyImageProperties(d,f),applyFragmentPaste:(d,f)=>o.applyFragmentPaste(d,f),replacePackage:d=>Io(o,d)}};return chunkDCILO4XD_cjs.Nn(Wt.session,o),Wt}var $a=chunkDCILO4XD_cjs.g.projection;function es(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 ts(t,e,n={}){let r=null,a=false,o=()=>n.onChange?.(s()),s=()=>({revision:e.revision(),canUndo:e.canUndo(),canRedo:e.canRedo(),lastRejection:r}),l=p=>{a=true;let y=c.state.tr.replaceWith(0,c.state.doc.content.size,p.content);y.setMeta("addToHistory",false),c.dispatch(y),a=false;},i=p=>()=>(p()&&(l(e.projectDoc()),o()),true),c=new prosemirrorView.EditorView(t,{state:prosemirrorState.EditorState.create({doc:e.projectDoc(),plugins:[prosemirrorKeymap.keymap({...prosemirrorCommands.baseKeymap,Home:prosemirrorCommands.selectTextblockStart,End:prosemirrorCommands.selectTextblockEnd,"Mod-z":i(()=>e.undo()!==null),"Mod-y":i(()=>e.redo()!==null),"Shift-Mod-z":i(()=>e.redo()!==null),"Mod-b":(p,y)=>g(p,y,"b"),"Mod-i":(p,y)=>g(p,y,"i"),"Mod-u":(p,y)=>g(p,y,"u",{val:"single"})})]}),editable:()=>e.editable,handleDOMEvents:{keydown:p=>(u(p),false),beforeinput:(p,y)=>{let P=y;if(p.composing)return false;u(p);let O=P.inputType;if(O==="insertText"&&P.data!=null){P.preventDefault();let{from:R,to:v}=p.state.selection;return p.dispatch(p.state.tr.insertText(P.data,R,v)),true}if(O==="deleteContentBackward"){P.preventDefault();let{from:R,empty:v}=p.state.selection;return v?R>0?p.dispatch(p.state.tr.delete(R-1,R)):prosemirrorCommands.joinBackward(p.state,p.dispatch):prosemirrorCommands.deleteSelection(p.state,p.dispatch),true}if(O==="deleteContentForward"){P.preventDefault();let{from:R,to:v,empty:I}=p.state.selection;return I?v<p.state.doc.content.size?p.dispatch(p.state.tr.delete(R,R+1)):prosemirrorCommands.joinForward(p.state,p.dispatch):prosemirrorCommands.deleteSelection(p.state,p.dispatch),true}return O==="insertParagraph"?(P.preventDefault(),prosemirrorCommands.splitBlock(p.state,p.dispatch),true):false},compositionstart:()=>(e.beginComposition(),false),compositionend:()=>(e.endComposition(),o(),false)},dispatchTransaction(p){let y=c.state.apply(p);if(a||!p.docChanged){c.updateState(y);return}let P=e.applyPmDoc(y.doc);if(P.rejected){r=String(P.reason??"rejected"),c.updateState(y),l(e.projectDoc()),o();return}r=null,c.updateState(P.committed&&e.lastCommitWasStructural()?m(y):y),o();}});function u(p){if(p.composing||a)return;let y=p.dom.ownerDocument.getSelection(),P=y?.anchorNode,O=y?.focusNode;if(!(!y||!P||!O)&&!(!p.dom.contains(P)||!p.dom.contains(O)))try{let R=p.posAtDOM(P,y.anchorOffset),v=p.posAtDOM(O,y.focusOffset),I=p.state.selection;if(I.anchor===R&&I.head===v)return;let b=prosemirrorState.TextSelection.create(p.state.doc,R,v);p.dispatch(p.state.tr.setSelection(b).setMeta("addToHistory",!1));}catch{}}function m(p){let y=e.paragraphIds(),P=p.tr,O=false,R=0;return p.doc.forEach((v,I)=>{let b=y[R];R+=1,!(v.type.name!=="paragraph"||b===void 0)&&v.attrs.nodeId!==b&&(P=P.setNodeMarkup(I,void 0,{...v.attrs,nodeId:b}),O=true);}),O?p.apply(P.setMeta("addToHistory",false)):p}function g(p,y,P,O){let R=N.marks.runProps;if(!y)return true;let{from:v,to:I,empty:b}=p.selection;if(b)return true;let C=p.doc.resolve(v).marks().find(Se=>Se.type===R)?.attrs.props??[],j=es(C,P,O),$=p.tr;return $.removeMark(v,I,R),j.length>0&&$.addMark(v,I,R.create({props:j})),y($),true}return {view:c,state:s,undo:()=>i(()=>e.undo()!==null)(),redo:()=>i(()=>e.redo()!==null)(),toggleRunProperty(p,y){g(c.state,c.dispatch.bind(c),p,y);},destroy:()=>c.destroy()}}exports.a=N;exports.b=dt;exports.c=de;exports.d=_;exports.e=Z;exports.f=ut;exports.g=Ur;exports.h=pt;exports.i=It;exports.j=_s;exports.k=ra;exports.l=Js;exports.m=za;exports.n=Wa;exports.o=$a;exports.p=ts;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {R,Q as Q$1,T,S}from'./chunk-2V3V57SC.js';import {h,a,b,e,c,f,se as se$1,Oc,Rc,Tc,Uc,Sc,je,Pc,Qc,od,lf,Nd,Mf,Lf,d,F,yd,ma,Cc,mf,ld,pf}from'./chunk-K2BBJDM7.js';import {b as b$1}from'./chunk-QDUMZYTX.js';import {c as c$1,a as a$1,b as b$2}from'./chunk-66ZAVRGB.js';import {ve,Je,rb,Aa,pa,Ba,pd,le as le$1,f as f$1,N,va,oa,a as a$2}from'./chunk-P3XUE72N.js';var At=/^[\p{L}\p{N}\p{M} \-.+_,;]{1,64}$/u;function G(e){let t=new Map;for(let n of e)if(Array.isArray(n)){for(let o of n.slice(0,2048)){if(typeof o!="string"||!At.test(o))continue;let r=o.toLowerCase();if(t.has(r)||t.set(r,o),t.size===2048)break}if(t.size===2048)break}return Object.freeze([...t.values()])}function yn(e){let t=e&&"failures"in e?e.failures:void 0;return e==null||(e.sources?.length??0)===0&&(e.substitutions?.length??0)===0&&(t===void 0||Array.isArray(t)&&t.length===0)?void 0:e}var it=64,de=Object.freeze({family:"Calibri",sizeHalfPoints:22}),Fn=de;function oe(e,...t){let n=[e,...t],o=[],r=new Set;for(let l of n)for(let u of l.sources??[]){let c=h(u.request);r.has(c)||(r.add(c),o.push(u));}let i=[],s=new Set;for(let l of n)for(let u of l.substitutions??[]){let c=h(u.from);r.has(c)||s.has(c)||(s.add(c),i.push(u));}let a$1=G(n.map(l=>l.supportedFamilies));return Object.freeze({...a$1.length?{supportedFamilies:a$1}:{},epoch:e.epoch??0,maxFontBytes:e.maxFontBytes??a,sources:Object.freeze(o),...i.length>0?{substitutions:Object.freeze(i)}:{},defaultFont:e.defaultFont??de,...e.language!==void 0?{language:e.language}:{}})}var Rt=/^[\p{L}\p{N}\p{M} \-.+_,;]{1,64}$/u;function re(e){let t=e?.defaultFont?.family;return t!==void 0&&Rt.test(t)?t:de.family}function J(e){let t="deferred"in e?e.deferred:void 0;if(t===void 0)return {now:e};let{deferred:n,...o}=e;if(typeof t?.then!="function")return {now:o};let r=Promise.resolve(t);return r.catch(()=>{}),{now:o,later:r}}var at=new WeakSet;function kt(e){return e&&at.add(e),e}function lt(e,t){if(!t)return e;let n=e?me(e):void 0,o=t.deferred?{deferred:t.deferred}:{},r=at.has(t),i=r?t.supportedFamilies??[]:[...t.supportedFamilies??[],...n?.supportedFamilies??[]];return {...n,sources:r?t.sources??[]:[...t.sources??[],...n?.sources??[]],substitutions:r?t.substitutions??[]:[...t.substitutions??[],...n?.substitutions??[]],supportedFamilies:i.length>0?[...new Set(i)]:void 0,...o}}function Tt(e){return !!e&&((e.sources?.length??0)>0||(e.substitutions?.length??0)>0||e.deferred!==void 0)}function ut(e){let t=e&&"failures"in e?e.failures:void 0;return Array.isArray(t)?t.slice(0,256):[]}function ct(e,t){return t?t.aborted?Promise.reject(t.reason):new Promise((n,o)=>{let r=()=>o(t.reason);t.addEventListener("abort",r,{once:true}),Promise.resolve(e).then(i=>{t.removeEventListener("abort",r),n(i);},i=>{t.removeEventListener("abort",r),o(i);});}):Promise.resolve(e)}async function ft(e,t,n){let o="failures"in e?e.failures:void 0,r=s=>o===void 0?s:{...s,failures:o},i=e;for(let s=0;s<st;s+=1){let{now:a,later:l}=J(i);if(!l)return r(a);let u;try{u=await ct(l,n);}catch(c){if(n?.aborted)throw n.reason;return t(c),r(a)}for(let c of ut(u))t(c);i=lt(a,u)??a;}return t(new RangeError(`Font loading stopped after ${st} deferred steps`)),r(J(i).now)}var st=256;function me(e){if(!("failures"in e))return e;let{failures:t,...n}=e;return n}async function ge(e,t,n,o){let r=t.flatMap((a,l)=>a?[a.then(u=>({originIndex:l,ok:true,value:u??void 0}),u=>({originIndex:l,ok:false,cause:u}))]:[]);if(r.length===0)return;let i=await ct(Promise.race(r),n).catch(()=>{});if(!i||n?.aborted)return;if(i.ok)for(let a of ut(i.value))o.report(i.originIndex,a);else o.report(i.originIndex,i.cause);if(!i.ok||!Tt(i.value)){let a=t.map((l,u)=>u===i.originIndex?void 0:l);return ge(e,a,n,o)}let s=[];for(let a=0;a<Math.max(e.length,t.length);a+=1){let l=e[a],u=t[a];s.push(a===i.originIndex?lt(l,i.value):u?{...l??{sources:[]},deferred:u}:l);}try{return kt(await o.compose(s))}catch(a){n?.aborted||o.report(i.originIndex,a);return}}var Mt="docx-editor.dev/font-resolver",gt=Symbol.for("docx-editor.dev/font-resolver");function On(e){let t={value:true,enumerable:false,configurable:true};try{Object.defineProperty(e,gt,t),Object.defineProperty(e,Mt,t);}catch(n){throw new TypeError("defineFontResolver cannot mark a frozen or sealed function; mark it before freezing, or wrap it in a fresh function and mark that.",{cause:n})}return e}function An(e){return typeof e=="function"&&e[gt]===true}var ye=class extends RangeError{constructor(n,o,r){super(`Font source ${n.family} (${o} bytes) exceeds the shaping byte ceiling (${r} bytes)`);this.request=n;}request},Fe=class extends AggregateError{causes;constructor(t){let n=Object.freeze(t.slice(0,b*2));super(n,`Font origin rejected all ${n.length} face and substitution candidates`),this.causes=n;}},ie=e=>`${e.family.trim().toLowerCase()} ${e.weight} ${e.style}`;function vt(e,t,n){let o=new Map(e.map(r=>[ie(r),r]));for(let[r,i]of t)o.set(r,i);for(let r of n)o.has(ie(r.to))&&o.set(ie(r.from),r.from);return [...o.values()]}async function Rn(e,t,n={}){return he(e,t,n)}async function kn(e,t,n={}){return he(e,t,n)}async function he(e,t,n){let o=n.maxExecutionFontBytes??a;if(!Number.isSafeInteger(o)||o<=0||o>a)throw new RangeError("Font execution byte ceiling is outside the supported range");let r=e.map(_t),i,s=[],a$1=[],l=new Map,u=new Set,c=0,f=[],d=new Set,b$1=[],v=t.resolvedFaces??[],T=t.defaultFamily,C=[],P=[],g=new Set(n.placeholderOrigins??[]),x;for(let F=0;F<e.length;F+=1){pt(t.signal);let k=e[F],X=vt(v,l,f),q,B;try{let w=r[F],p;if(w){let m=await mt(w,t.signal);if(!m.ok)throw m.cause;p=m.value;}else if(typeof k=="function"){let m=await mt(Promise.resolve(k(Pt(t,T,X,c))).then(_=>({ok:!0,value:_}),_=>({ok:!1,cause:_})),t.signal);if(!m.ok)throw m.cause;p=m.value;}else p=k;if(p==null)continue;if(typeof p=="function"){K(n,k,F,new TypeError("A font origin answered with a function; pass the resolver itself rather than a function returning one"));continue}if(n.awaitDeferred){let m=J(p);m.later&&dt(m.now,m.now)&&g.add(F),p=await ft(p,_=>K(n,k,F,_),t.signal);}else {let m=J(p);p=m.now,B=m.later;}let S="failures"in p?p.failures:void 0,O=[];if(Array.isArray(S)){let m=Math.min(S.length,b);for(let _=0;_<m;_++)O.push(S[_]);S.length>m&&O.push(new Error("Additional font-origin failures were omitted"));}else S!==void 0&&O.push(S);let A;try{A=Lt(p,u,c,d,i?"maxFontBytes"in i&&i.maxFontBytes!==void 0?i.maxFontBytes:a:void 0,n.reserveOwnedBytes,n.instrumentation,o);}catch(m){for(let _ of new Set(O))K(n,k,F,_);throw m}q=A;for(let m of new Set([...A.dropped,...O]))K(n,k,F,m);let E=A.fragment;E.supportedFamilies&&s.push(E.supportedFamilies),b$1.push(...O);let U=(E.sources??[]).map(m=>(h(m.request),[ie(m.request),m.request])),Y=[...E.substitutions??[]];B!==void 0&&dt(E,p)&&g.add(F);let $=g.has(F);!i&&!$&&"defaultFont"in E&&(T=re(E)),!i&&!$&&(i=E),$&&(x??=E);let z=new Set(A.sourceKeys);if(z.size>0){f=f.filter(m=>!z.has(h(m.from)));for(let m of z)d.delete(m);}a$1.push(...E.sources??[]);for(let m of A.sourceKeys)u.add(m);c+=A.ownedBytes;for(let[m,_]of U)l.set(m,_);for(let m of Y)f.push(m),d.add(h(m.from));C[F]=me(E),B&&(P[F]=B);}catch(w){if(q?.releaseOwnedBytes?.(),t.signal?.aborted)throw t.signal.reason??w;if(w instanceof se)throw w.cause;if(K(n,k,F,w),B){let p=new Error("Font origin skipped, so its background faces were not loaded");K(n,k,F,p);}continue}}let y=P.some(Boolean)?ge(C,P,t.signal,{compose:F=>he(F,t,{...n,placeholderOrigins:g}),report:(F,k)=>K(n,e[F],F,k)}):void 0;if(i??=x,!i)return y?{sources:[],deferred:y}:void 0;let{epoch:M,...R}=oe({...i,supportedFamilies:G(s),sources:a$1,substitutions:f}),D=y?{...R,deferred:y}:R;return b$1.length===0?D:{...D,failures:Object.freeze(b$1)}}function dt(e,t){return (e.sources?.length??0)===0&&(e.substitutions?.length??0)===0&&!("defaultFont"in t)&&!("maxFontBytes"in t)}var se=class extends Error{constructor(n){super("Unable to reserve owned font bytes");this.cause=n;this.name="FontOwnershipReservationError";}cause},ae=class extends RangeError{};async function mt(e,t){if(!t)return e;pt(t);let n,o=new Promise((i,s)=>{n=s;}),r=()=>n?.(t.reason);t.addEventListener("abort",r,{once:true});try{return await Promise.race([e,o])}finally{t.removeEventListener("abort",r);}}function _t(e){if(e===null||typeof e!="object")return;let t;try{t=e.then;}catch(n){return Promise.resolve({ok:false,cause:n})}if(typeof t=="function")return Promise.resolve(e).then(n=>({ok:true,value:n}),n=>({ok:false,cause:n}))}function Lt(e$1,t,n,o,r,i,s,a$1=a){let l=e$1.sources??[],u=e$1.substitutions??[],c$1="maxFontBytes"in e$1?e$1.maxFontBytes:void 0,f$1="defaultFont"in e$1?e$1.defaultFont:void 0,d="epoch"in e$1?e$1.epoch:void 0,b$1="language"in e$1?e$1.language:void 0;if(!Array.isArray(l)||!Array.isArray(u))throw new TypeError("Font origin sources and substitutions must be arrays");let v=l.length,T=u.length;if(v>b)throw new RangeError(`Font source count must not exceed ${b}`);if(T>b)throw new RangeError(`Font substitution count must not exceed ${b}`);let C=c$1??a;if(!Number.isSafeInteger(C)||C<=0||C>a)throw new RangeError(`Font byte ceiling must be a positive safe integer no greater than ${a}`);let P=Math.min(r??C,a$1),g=0,x=[],y=new Set,M=[],R=[];for(let w=0;w<v;w+=1){let p=l[w];try{let S=pe(p.request),O=h(S);if(t.has(O)||y.has(O))continue;let A=p.availability,E=p.faceIndex,U=p.hash,Y=p.id;if(A!==void 0&&A!=="available"&&A!=="forbidden")throw new TypeError("Font source availability must be available or forbidden");if(!Number.isSafeInteger(E)||E<0)throw new RangeError("Font face index must be a non-negative safe integer");if(typeof U!="string"||U.length===0)throw new TypeError("Font source hash must be a non-empty string");let $;if(A!=="forbidden"){if(typeof Y!="string"||Y.length===0)throw new TypeError("Font source id must be a non-empty string");$=p.bytes;let z=e($);if(z>P)throw z<=(r??C)?new ye(S,z,a$1):new RangeError(`Font source ${S.family} (${z} bytes) exceeds the effective base byte ceiling (${P} bytes)`);if(t.has(O)||y.has(O))continue;if(n+g+z>c)throw new RangeError(`Font sources exceed the aggregate byte ceiling of ${c}`);g+=z;}else $=new Uint8Array(0);if(t.has(O)||y.has(O))continue;if(t.size+y.size>=b)throw new ae(`Font source count must not exceed ${b}`);y.add(O),x.push(O),M.push(Object.freeze({request:S,id:Y,bytes:$,hash:U,faceIndex:E,...A?{availability:A}:{}}));}catch(S){if(S instanceof ae)throw S;R.push(S);}}let D=new Set,F=[];for(let w=0;w<T;w+=1){let p=u[w];try{let S=pe(p.from),O=pe(p.to);h(S),h(O);let A=p.lineMetrics,E=A?Object.freeze({heightEm:A.heightEm,baselineEm:A.baselineEm}):void 0;if(E&&(!Number.isFinite(E.heightEm)||!Number.isFinite(E.baselineEm)||E.heightEm<=0||E.heightEm>4||E.baselineEm<0||E.baselineEm>E.heightEm))throw new RangeError("Font substitution line metrics must fit within a bounded em box");let U=h(S);if(t.has(U)||y.has(U)||o.has(U)||D.has(U))continue;D.add(U),F.push(Object.freeze({from:S,to:O,...E?{lineMetrics:E}:{}}));}catch(S){R.push(S);}}if((v>0||T>0)&&M.length===0&&F.length===0&&R.length>0)throw R.length===1?R[0]:new Fe(R);let k=o.size;for(let w of y)o.has(w)&&(k-=1);if(k+D.size>b)throw new RangeError(`Font substitution count must not exceed ${b}`);let X;if(f$1!==void 0){let w=f$1.family,p=f$1.sizeHalfPoints;if(h({family:w,weight:400,style:"normal"}),!Number.isSafeInteger(p)||p<=0)throw new RangeError("Default font size must be a positive safe integer in half-points");X=Object.freeze({family:w,sizeHalfPoints:p});}if(d!==void 0&&(!Number.isSafeInteger(d)||d<0))throw new RangeError("Font configuration epoch must be a non-negative safe integer");if(b$1!==void 0&&typeof b$1!="string")throw new TypeError("Font shaping language must be a string");let q;if(g>0&&i)try{q=i(g);}catch(w){throw new se(w)}let B;try{B=M.map(w=>f(w,s));}catch(w){throw q?.(),w}return {fragment:Object.freeze({supportedFamilies:G([e$1.supportedFamilies]),sources:Object.freeze(B),substitutions:Object.freeze(F),...d!==void 0?{epoch:d}:{},...c$1!==void 0?{maxFontBytes:c$1}:{},...X?{defaultFont:X}:{},...b$1!==void 0?{language:b$1}:{}}),sourceKeys:Object.freeze(x),ownedBytes:g,dropped:Object.freeze(R),releaseOwnedBytes:q}}function Nt(e){return !Number.isSafeInteger(e)||e<=0?0:e>c?c:e}function Pt(e,t,n,o){let{committedSourceBytes:r,...i}=e,s=Nt(o);return {...i,defaultFamily:t,...n.length>0?{resolvedFaces:n}:{},...s>0?{committedSourceBytes:s}:{}}}function pe(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}function pt(e){if(e?.aborted)throw e.reason??new DOMException("Font resolution was aborted","AbortError")}function K(e,t,n,o){let r;try{typeof t=="function"&&t.name.length>0&&(r=t.name);}catch{}try{o instanceof Error&&o.stack;}catch{}let i=Object.freeze({originIndex:n,...r!==void 0?{originName:r}:{},cause:o});if(e.onOriginFailure)try{let a=e.onOriginFailure(i);Promise.resolve(a).catch(l=>{console.warn("[fonts] font-origin diagnostic callback failed",l);});return}catch(a){console.warn("[fonts] font-origin diagnostic callback failed",a);}let s="";try{o instanceof Error&&o.message.length>0&&(s=`: ${o.message}`);}catch{}console.warn(`[fonts] a font origin failed and was skipped${s}`,o);}var It="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",be=256,Dt=31;function W(e,t){return e.kind!=="textValue"&&e.localName===t&&e.namespaceUri===pa}function Z(e,t){return e.attributes.find(n=>n.localName===t&&n.namespaceUri===pa)?.value}function we(e){let t=(e.relationships.get(e.mainDocumentPart)??[]).find(i=>i.type===It),n=t?N(t):void 0,r=((n?.mode==="Internal"&&n.target.ok?e.parts.get(n.target.partName):void 0)??e.parts.get("/word/fontTable.xml"))?.root;return r&&W(r,"fonts")?r:void 0}function Q(e,t){let n=e.children.find(o=>W(o,t));return n&&n.kind!=="textValue"?Z(n,"val"):void 0}function ht(e){let t=we(e),n=new Map;if(!t)return n;let o=0;for(let r of t.children){if(!W(r,"font"))continue;if(++o>be)break;let i=c$1(Z(r,"name"));if(!i)continue;let s=R(Q(r,"family"),Q(r,"pitch")),a=i.trim().toLowerCase();s&&!n.has(a)&&n.set(a,s);}return n}var Bt=new Set(["81","82"]),yt=new WeakMap,Ft=()=>false;function Nn(e){let t=we(e);if(!t)return Ft;let n=yt.get(t);if(n)return n;let o=new Set,r=0;for(let s of t.children){if(!W(s,"font"))continue;if(++r>be)break;let a=c$1(Z(s,"name")),l=Q(s,"charset")?.toLowerCase();!a||!l||!Bt.has(l)||R(Q(s,"family"),Q(s,"pitch"))==="serif"&&o.add(a.trim().toLowerCase());}let i=o.size===0?Ft:s=>o.has(s.trim().toLowerCase());return yt.set(t,i),i}function bt(e){let t=we(e),n=new Map;if(!t)return n;let o=0;for(let r of t.children){if(!W(r,"font"))continue;if(++o>be)break;let i=c$1(Z(r,"name"));if(!i)continue;let s=r.children.find(c=>W(c,"altName")),a=s&&s.kind!=="textValue"?Z(s,"val"):void 0,l=a!==void 0&&a.length<=Dt?a$1(a):null,u=i.trim().toLowerCase();l&&!n.has(u)&&n.set(u,l);}return n}function Ut(e,t,n){let o="";for(let r=t;r+1<t+n&&r+1<e.length;r+=2){let i=e[r]|e[r+1]<<8;if(i===0)break;o+=String.fromCharCode(i);}return o}function zt(e,t,n){let o="";for(let r=t;r<t+n&&r<e.length&&e[r]!==0;r++)o+=String.fromCharCode(e[r]);return o}function qt(e,t){let n=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e.length<8||n.getUint32(0,true)!==1)return;let o=0;for(let r=0;r<1e5&&o+8<=e.length;r++){let i=n.getUint32(o,true),s=n.getUint32(o+4,true);if(s<8||s%4!==0||o+s>e.length||(i===82&&s>=104&&t(Ut(e,o+40,64)),i===14))return;o+=s;}}function jt(e,t){let n=new DataView(e.buffer,e.byteOffset,e.byteLength),o=e.length>=22&&n.getUint32(0,true)===2596720087?22:0;if(!(o+18>e.length||n.getUint16(o+2,true)!==9)){o+=18;for(let i=0;i<1e5&&o+6<=e.length;i++){let s=n.getUint32(o,true),a=n.getUint16(o+4,true);if(s<3||o+s*2>e.length||(a===763&&s*2>=25&&t(zt(e,o+6+18,Math.min(32,s*2-6-18))),a===0))return;o+=s*2;}}}function wt(e,t){let n=new Map,o=i=>{if(i.trim().toLowerCase()==="system")return;let s=t(i.trim());if(s===null||n.size>=16)return;let a=s.toLowerCase();n.has(a)||n.set(a,s);},r=0;for(let[i,s]of e.partBytes){let a=i.toLowerCase();if(!a.startsWith("/word/")||a.startsWith("/word/glossary/"))continue;let l=a.endsWith(".emf"),u=a.endsWith(".wmf");if(!(!l&&!u)){if(++r>64||n.size>=16)break;l?qt(s,o):jt(s,o);}}return [...n.values()]}var Xt=2e5,xt=32,$t=new Set(["latin","ea","cs"]);function Ht(e,t){let n=/^\+(mn|mj)-(lt|ea|cs)$/.exec(e);if(!n)return;let o=n[1]==="mj";return n[2]==="ea"?o?t.majorEastAsia:t.minorEastAsia:n[2]==="cs"?o?t.majorBidi:t.minorBidi:o?t.major:t.minor}var Et=new WeakMap;function Vt(e){let t=Et.get(e);if(t)return t;let n=[],o=new Set,r=[e],i=0;for(;r.length>0&&++i<=Xt&&n.length<xt;){let s=r.pop();if(s.namespaceUri===va&&$t.has(s.localName)){let a=oa(s.attributes,"typeface");a&&!o.has(a)&&(o.add(a),n.push(a));continue}for(let a=s.children.length-1;a>=0;a-=1){let l=s.children[a];l.kind!=="textValue"&&r.push(l);}}return Et.set(e,n),n}function Xn(e,t={}){let n=new Map,o=r=>{let i=r?b$1(r):null;if(i===null||n.size>=xt)return;let s=i.toLowerCase();n.has(s)||n.set(s,i);};for(let r of e.parts.values()){let i=r.root;if(!(i.namespaceUri!==ve&&i.namespaceUri!==Je)){o(t.minor);for(let s of Vt(i))s.startsWith("+")?o(Ht(s,t)):o(s);}}for(let r of wt(e,b$1))o(r);return [...n.values()]}var Kt=256,Wt=Object.freeze([]);function le(e){let t=new WeakMap;return (n,o)=>{let r=new Set;for(let i of n){let s=[{node:i,context:o,next:0}],a=l=>{s.pop();let u=s.at(-1)?.found??r;for(let c of l)u.add(c);};for(;s.length;){let l=s[s.length-1],u=t.get(l.node);if(u?.key===l.context.key){a(u.families);continue}if(!l.children){let d=e(l.node,l.context);l.children=d.children,l.found=new Set(d.families);}let c=l.children[l.next++];if(c){s.push({...c,next:0});continue}let f=l.found.size===0?Wt:[...l.found];f.length<=Kt&&rb(l.node)?t.set(l.node,{key:l.context.key,families:f}):t.delete(l.node),a(f);}}return [...r]}}function ue(e,t){return e.children.flatMap(n=>n.kind==="textValue"?[]:[{node:n,context:t}])}var St=new WeakMap,Yt=4096;function Ct(e,t){let n=`${e.baseKey}|${e.depth+1}|${JSON.stringify(t)}`,o=St.get(e);o||St.set(e,o=new Map);let r=o.get(n);if(r)return r;let i={...e,depth:e.depth+1,cellStyle:t,key:n};return o.size<Yt&&o.set(n,i),i}function Gt(e,t){let{styles:n,theme:o,supplementalFamilies:r,depth:i}=t;if(e.kind==="table"){let l=se$1(e,468,i,n),u=[];for(let c of l?.rows??[])for(let f of c.cells){let d=Ct(t,f.styleFormatting);for(let b of f.blocks)u.push({node:b,context:d});}return {children:u.reverse()}}let s=new Set;if(e.kind==="paragraph"){let l=e.children.find(c=>c.kind==="paragraphProperties"),u=mf(n,l,t.cellStyle).runProperties;for(let c of ld(e,u,void 0,(f,d)=>pf(f,d,n),void 0,void 0,"all-markup",void 0,void 0,o)){if(!c.text||c.fontSlot!=="eastAsia"&&!r.has(c.style.fontFamily??""))continue;let f=b$1((c.fontSlot==="eastAsia"?c.style.fontFamilyEastAsia:c.style.fontFamily)??void 0);f&&s.add(f);}}let a=e.localName==="txbxContent"?{...t,cellStyle:void 0,key:`${t.baseKey}|${i}|undefined`}:t;return {families:[...s],children:ue(e,a).reverse()}}function Jt(){let e=le(Gt),t,n,o=(i,s)=>{if(!t||n!==i||t.theme!==s){let a=lf(i,s);n=i,t={key:`${a.cacheToken}|0|undefined`,baseKey:a.cacheToken,styles:a,theme:s,depth:0,supplementalFamilies:new Set([...Object.values(s.majorSupplemental??{}),...Object.values(s.minorSupplemental??{})])};}return t};return Object.assign((i,s,a)=>e([...i].reverse(),o(s,a)),{warmTableRows(i,s,a,l,u){let c=o(l,u),f=se$1(i,468,c.depth,c.styles)?.rows??[];for(let d of f.slice(s,a))for(let b of d.cells)e(b.blocks,Ct(c,b.styleFormatting));return f.length}})}function Qn(e,t,n){return Jt()(e,t,n)}function Ee(e,t){return e.attributes.find(n=>n.localName===t)?.value}var Qt=le((e,t)=>{let n=[];if(e.namespaceUri===pa){if(e.localName==="fldSimple"){let o=je(Ee(e,"instr")??"")?.font;o&&n.push(o);}if(e.localName==="p")for(let o of Zt(e))n.push(o);}return {families:n,children:ue(e,t)}});function co(e){let t=new Map;for(let n of Qt(e,{key:""})){let o=b$1(n);o!==null&&!t.has(o.toLowerCase())&&t.set(o.toLowerCase(),o);}return [...t.values()]}function Zt(e){let t=[],n=Oc(),o=[];for(let r=e.children.length-1;r>=0;r-=1){let i=e.children[r];i.kind!=="textValue"&&o.push({node:i,containerDepth:0});}for(;o.length>0;){let{node:r,containerDepth:i}=o.pop();if(i>=Aa||r.namespaceUri===pa&&r.localName==="p")continue;if(r.namespaceUri===pa&&r.localName==="fldChar"){let a=Ee(r,"fldCharType");a==="begin"?Rc(n):a==="separate"?(n.nesting===1&&Ot(n,t),Tc(n)):a==="end"&&(n.nesting===1&&Ot(n,t),Uc(n));continue}if(r.namespaceUri===pa&&(r.localName==="instrText"||r.localName==="delInstrText")){Sc(n,en(r),r.localName==="delInstrText");continue}if(r.namespaceUri===pa&&r.localName==="fldSimple"){let a=je(Ee(r,"instr")??"");a?.font&&t.push(a.font);}let s=Ba(r,i);for(let a=r.children.length-1;a>=0;a-=1){let l=r.children[a];l.kind!=="textValue"&&o.push({node:l,containerDepth:s});}}return Pc(n),t}function Ot(e,t){let n=Qc(e);if(n.overflow)return;let o=je(n.instruction);o?.font&&t.push(o.font);}function en(e){let t="",n=[...e.children].reverse();for(;n.length>0&&t.length<=256;){let o=n.pop();if(o.kind==="textValue")t+=o.value;else for(let r=o.children.length-1;r>=0;r-=1)n.push(o.children[r]);}return t}var tn=()=>true,nn=/[ᄀ-ᇿ⺀-鿿ꥠ-가-豈-︰-﹏-]/u;function fo(e,t,n,o){if(!t)return [];let r=od(t),i=lf(n,o),s=new Map;for(let a of e)for(let l of on(a)){let u=pd(l.children),c=f=>{if(f)for(let d of f.values()){let b=d.markerText===void 0||nn.test(d.markerText);for(let v of [d.markerStyle.fontFamily,b?d.markerStyle.fontFamilyEastAsia:null]){let T=b$1(v??void 0);if(T===null)continue;let C=T.toLowerCase();s.has(C)||s.set(C,T);}}};c(Nd(u,r,i,tn));for(let f of u){let d=Mf(f);for(let b of d.contents)c(Lf(b,r,i));}}return [...s.values()].sort((a,l)=>a.localeCompare(l))}function on(e){if(e.localName==="document"){for(let t of e.children)if(t.kind!=="textValue"&&t.localName==="body")return [t];return []}if(e.localName==="footnotes"||e.localName==="endnotes"){let t=[];for(let n of e.children)n.kind!=="textValue"&&(n.localName==="footnote"||n.localName==="endnote")&&t.push(n);return t}return [e]}function Ro(e,t,n,o=[]){let r=new Set,i=new Set((o??[]).map(a=>a.from.family.trim().toLowerCase())),s=new Map;for(let a of e.substitutions??[]){let l=a.from.family.trim().toLowerCase();s.has(l)||s.set(l,a.to.family.trim().toLowerCase());}for(let a of e.substitutions??[]){let l=a.from.family.trim().toLowerCase(),u=a.to.family.trim().toLowerCase(),c=[t.alternates.get(l),t.fallbacks.get(l)].some(f=>{let d=f?.trim().toLowerCase();return d!==void 0&&d!==l&&(d===u||s.get(d)===u)});u!==l&&!i.has(l)&&c&&!(n.resolve(a.from)instanceof d)&&r.add(a.from.family.toLowerCase());}return r}function rn(e,t){return e.attributes.find(n=>n.localName===t&&n.namespaceUri===pa)?.value}var sn=new Set(["document","hdr","ftr","footnotes","endnotes","comments","styles","numbering","glossaryDocument"]),an=new Set(["t","delText","instrText","delInstrText"]),ln=2e6;function un(e,t){let n=e.stylesRoot(),o=e.documentThemeFonts(),r=[...F(n),...n?yd(n).run:[]],i=ma(r,o),s=a$1(i.fontFamily??void 0)??t,a=a$1(Cc([{text:"\xE9",props:r,style:i,start:0,end:1}],o)[0]?.style.fontFamily??void 0)??s,l=a$1(i.fontFamilyEastAsia??void 0),u=a$1(i.complexLane?.fontFamily??void 0)??o.minorBidi??t,c=ht(e.currentPackage()),f=g=>c.get(g.trim().toLowerCase())??S(g),d=(g,x)=>{let y=f(g);if(!y)return x;let M=f(x);return M===void 0||M===y?x:T[y]},b=new Map,v=new Map,T$1=0;for(let g of e.currentPackage().parts.values()){if(g.root.namespaceUri!==pa||!sn.has(g.root.localName))continue;let x=[g.root];for(;x.length>0&&T$1<ln;){T$1++;let y=x.pop();if(y.kind!=="textValue"){if(y.namespaceUri===pa){if(an.has(y.localName))continue;if(y.localName==="rFonts"){for(let[M,R]of [["ascii",s],["hAnsi",a],["eastAsia",l],["cs",u]]){let D=a$1(b$2(rn(y,M))??void 0);if(!D||!R)continue;let F=D.trim().toLowerCase(),k=b.get(F)??new Set,X=M==="ascii"||M==="hAnsi",q=X?d(D,R):R;if(k.add(q),b.set(F,k),X&&f(D)){let B=v.get(F)??new Set;B.add(q),v.set(F,B);}}continue}}for(let M of y.children)x.push(M);}}}for(let g of a$2)b.delete(g);let C=new Map,P=[];for(let[g,x]of b){let y=v.get(g);x.size===1?C.set(g,[...x][0]):y?.size===1?C.set(g,[...y][0]):P.push(g);}return {fallbacks:C,ambiguousFamilies:P,defaults:new Map([...b].map(([g,x])=>[g,[...x]]))}}function cn(e,t,n=[],o="Calibri"){let r=bt(e.currentPackage()),i=un(e,o),s=t.flatMap(u=>{let c=r.get(u.trim().toLowerCase());return c?[c]:[]}),a=new Map,l=t.flatMap(u=>i.defaults.get(u.trim().toLowerCase())??[]).filter(u=>u.trim().toLowerCase()!==o.trim().toLowerCase());for(let u of [...t,...s,...n,...l]){let c=a$1(u);if(c&&!a.has(c.trim().toLowerCase())&&a.set(c.trim().toLowerCase(),c),a.size===it)break}return {families:[...a.values()],alternates:r,fallbacks:i.fallbacks,ambiguousFamilies:i.ambiguousFamilies}}function ko(e,t,n){let o=re(n),r=cn(e,t,[],o);return {plan:r,request:{families:r.families,defaultFamily:o}}}function To(e,t,n=t.fallbacks){let o=new Map(e.sources.map(u=>[h(u.request),u.request])),r=[],i=new Set((e.substitutions??[]).map(u=>h(u.from))),s=new Map((e.substitutions??[]).map(u=>[h(u.from),u])),a=u=>{let c=o.get(h(u));if(c)return {to:c};let f=s.get(h(u)),d=f&&o.get(h(f.to));if(!(!f||!d))return f.lineMetrics?{to:d,lineMetrics:f.lineMetrics}:{to:d}},l=Math.max(0,b-i.size);for(let u of t.families){let c=u.trim().toLowerCase(),f=t.alternates.get(c),d=n.get(c),b=le$1(u);for(let v of [400,700])for(let T of ["normal","italic"]){let C={family:u,weight:v,style:T};if(o.has(h(C)))continue;let P=s.has(h(C));for(let g of P?[b,f]:[b,f,d]){if(!g||g.trim().toLowerCase()===c)continue;let x={family:g,weight:v,style:T},y=o.get(h(x)),M=P?y?{to:y}:void 0:a(x);if(!M)continue;if(!i.has(h(C))){if(l===0)break;l--;}let R=Q$1(u)?.em;r.push({from:C,...M,...R?{lineMetrics:R}:{}});break}}}return oe({...e,substitutions:[...r,...e.substitutions??[]]})}function Mo(e,t,n){let o=new Set((e.substitutions??[]).map(i=>h(i.from))),r=new Set;for(let i of t.substitutions??[]){if(o.has(h(i.from)))continue;let s=i.from.family.trim().toLowerCase(),a=i.to.family.trim().toLowerCase();[n.alternates.get(s),n.fallbacks.get(s)].some(u=>u?.trim().toLowerCase()===a)||r.add(s);}return r}function vo(e,t){let n=new Map;for(let[o,r]of e)t(o)||n.set(o,r);return n}var fn={regular:{weight:400,style:"normal"},bold:{weight:700,style:"normal"},italic:{weight:400,style:"italic"},boldItalic:{weight:700,style:"italic"}};function No(e,t){let n=[],o=[],r=0;for(let i of e){let s=i.bytes.byteLength;if(!Number.isSafeInteger(s)||s>t||s>a||s>c-r){o.push(i);continue}r+=s,n.push(i);}return {sources:n,dropped:o}}function Po(e,t,n){let o=t.reduce((i,s)=>i+s.bytes.byteLength,0),r=new Set(t.filter(i=>i.request.family.trim().length>0).map(i=>h(i.request)));return dn(e,{maxFontBytes:n,aggregateBudget:Math.max(0,c-o),shadowedRequests:r})}function dn(e,t){let n=[],o=[],r=t.aggregateBudget,i=new Set;for(let s of e){let a=fn[s.style],l=Object.freeze({family:s.family,weight:a.weight,style:a.style});if(s.family.trim().length===0){o.push({request:l,partName:s.partName,reason:"malformed"});continue}let u=h(l);if(!(t.shadowedRequests?.has(u)||i.has(u))){if(i.add(u),s.bytes.byteLength>t.maxFontBytes||s.bytes.byteLength>r){o.push({request:l,partName:s.partName,reason:"overLimit"});continue}r-=s.bytes.byteLength,n.push({request:l,id:`embedded:${s.partName}#${s.style}`,bytes:s.bytes,hash:f$1(s.bytes),faceIndex:0});}}return {sources:n,dropped:o}}
|
|
2
|
+
export{co as A,Zt as B,fo as C,Ro as D,cn as E,ko as F,To as G,Mo as H,vo as I,No as J,Po as K,dn as L,G as a,yn as b,it as c,de as d,Fn as e,oe as f,re as g,J as h,lt as i,Tt as j,ut as k,me as l,Mt as m,gt as n,On as o,An as p,ye as q,Fe as r,Rn as s,kn as t,Nn as u,Xn as v,le as w,ue as x,Jt as y,Qn as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {ub,eb,kb,
|
|
1
|
+
import {ub,eb,kb,rg,ng,Ta,Sa,Jm,pa,Eb,wb,vb,Wa,qa}from'./chunk-P3XUE72N.js';var K=new Set(["document","hdr","ftr","footnotes","endnotes"]),rr=24,H=512,z=ub(rr);function G(t){let n=t.root;return n.namespaceUri===pa&&K.has(n.localName)}function tr(t){let n=[],e=r=>{if(r.kind!=="textValue"){r.namespaceUri===pa&&r.localName==="p"&&n.push(r);for(let a of r.children)e(a);}};return e(t.root),n}function X(t){let n=Eb(t);let e=[],r=new Set;for(let a of tr(n)){let i=wb(a);if(!i||!vb(i))continue;let o=i.toUpperCase();if(r.has(o))continue;r.add(o);let l=Jm(n,a.id);l!==null&&e.push(Object.freeze({paragraphId:o,nodeId:a.id,text:l}));}return Object.freeze(e)}function er(t){let n=z.get(t.root);if(n)return n;let e=W(t,"byParagraphId");return z.set(t.root,e),e}function W(t,n){let e=Eb(t);let r=new Map,a=new Set,i=o=>{if(o.kind!=="textValue"){if(o.namespaceUri===pa&&o.localName==="p"){let l=wb(o);if(l&&vb(l)){let s=l.toUpperCase();a.has(s)||(a.add(s),o.kind==="paragraph"&&(n==="byParagraphId"?r.set(s,o.id):r.set(o.id,s)));}}for(let l of o.children)i(l);}};return i(e.root),r}function V(t,n){if(t.length!==n.length)return false;for(let e=0;e<t.length;e+=1)if(t[e].root!==n[e])return false;return true}function $(t){let n=new Map,e=null,r=(o,l,s)=>{for(n.delete(o),n.set(o,{partName:l.name,root:l.root,nodeId:s});n.size>H;){let d=n.keys().next();if(d.done)break;n.delete(d.value);}},a=(o,l)=>{let s=n.get(o);if(!s)return null;let d=l.find(k=>k.name===s.partName);if(!d)return null;if(d.root===s.root)return {part:d,nodeId:s.nodeId};let u=eb(d,s.nodeId);if(!u||u.kind!=="paragraph")return null;let x=wb(u);return !x||x.toUpperCase()!==o?null:(r(o,d,s.nodeId),{part:d,nodeId:s.nodeId})};return Object.assign(o=>{let l=t(),s=a(o,l);if(s)return s;if(e&&e.ids.has(o)&&V(l,e.roots))return null;for(let d of l){let u=er(d).get(o);if(u!==void 0)return r(o,d,u),{part:d,nodeId:u}}return (!e||!V(l,e.roots))&&(e={roots:l.map(d=>d.root),ids:new Set}),e.ids.size<H&&e.ids.add(o),null},{forgetIds(o){for(let{paragraphId:l,nodeId:s}of o)n.get(l)?.nodeId!==s&&n.delete(l);},forgetAll(){n.clear();},hasHints(){return n.size>0}})}function Y(t,n,e){if(!t.hasHints())return;let r=[...e.dirty,...e.created];if(e.impact!=="text-local"||r.length===0)return t.forgetAll();let a=[];for(let i of r){let o=n.find(d=>i.startsWith(`${d.name}#`)),l=o?eb(o,i):null,s=l?.kind==="paragraph"?wb(l):null;if(!s)return t.forgetAll();a.push({paragraphId:s.toUpperCase(),nodeId:i});}t.forgetIds(a);}function q(t){let n=null;return e=>{let r=t();n?.root!==r.root&&(n={root:r.root,byNodeId:W(r,"byNodeId")});let a=n.byNodeId.get(e);if(a===void 0)return null;let i=Jm(r,e);return i===null?null:Object.freeze({paragraphId:a,nodeId:e,text:i})}}function Z(t,n){return Wa(t,n)}var ar=Object.freeze({kind:"body"}),ir=1e6;function A(t,n){if(n<=0||n>=t.length)return false;let e=t.charCodeAt(n-1),r=t.charCodeAt(n);return e>=55296&&e<=56319&&r>=56320&&r<=57343}function lr(t,n,e){if(n===e)return [];let r=0,a=Math.min(n.length,e.length);for(;r<a&&n.charCodeAt(r)===e.charCodeAt(r);)r+=1;for(;r>0&&(A(n,r)||A(e,r));)r-=1;let i=0;for(;i<n.length-r&&i<e.length-r&&n.charCodeAt(n.length-i-1)===e.charCodeAt(e.length-i-1);)i+=1;for(;i>0&&(A(n,n.length-i)||A(e,e.length-i));)i-=1;let o=n.length-r-i,l=e.slice(r,e.length-i),s=[];return o>0&&s.push({op:"deleteText",paragraphId:t,start:r,end:r+o}),l.length>0&&s.push({op:"insertText",paragraphId:t,offset:r,text:l}),Object.freeze(s)}function sr(t){let n=r=>!!r&&r.kind!=="textValue"&&r.namespaceUri===pa&&r.localName==="t"&&r.attributes.every(a=>a.namespaceUri===qa&&a.localName==="space")&&r.children.every(a=>a.kind==="textValue"),e=[];for(let r of t){let a=e.at(-1);if(!n(a)||!n(r)){e.push(r);continue}let i=a.children.map(o=>o.kind==="textValue"?o.value:"").join("")+r.children.map(o=>o.kind==="textValue"?o.value:"").join("");e[e.length-1]={...a,attributes:/^\s|\s$/.test(i)?[{kind:"xmlSpace",namespaceUri:qa,localName:"space",prefix:"xml",value:"preserve"}]:[],children:[{id:a.children[0]?.id??`${a.id}/text`,kind:"textValue",value:i}]};}return e}function F(t){if(t.kind==="textValue")return t;let n=false,e=t.children.map(r=>{let a=F(r);return a!==r&&(n=true),a});if(t.namespaceUri===pa&&t.localName==="r"){let r=sr(e);(r.length!==e.length||r.some((a,i)=>a!==e[i]))&&(e=[...r],n=true);}return n?{...t,children:e}:t}function dr(t,n,e){let r=t.parts.get(n);if(!r)return t;let a=false,i=new Set;for(let o of e)(o.op==="insertText"||o.op==="deleteText")&&!o.revision&&i.add(o.paragraphId);for(let o of i){let l=eb(r,o);if(!l||l.kind==="textValue")continue;let s=F(l);if(s===l)continue;let d=kb(r,o,s,{deferValidation:true});d.ok&&(r=d.part,a=true);}return a?rg(t,r):t}function pr(t,n){let e=n.documentId.trim();if(e.length===0||e.length>256)throw new TypeError("documentId must contain 1 to 256 characters");let r=()=>X(t.bodyStore().part),a,i=()=>{let p=t.bodyStore().part,c=t.currentPackage();if(a?.pkg===c&&a.body===p)return a.parts;let g=[p];for(let m of c.parts.values())m===p||!G(m)||g.push(m);return a={pkg:c,body:p,parts:Object.freeze(g)},a.parts},o=$(i),l=t.packageRevision,s=t.lastModelChange,d=()=>{let p=t.packageRevision,c=t.lastModelChange;p===l&&c===s||(p===l+1&&c!==null&&c!==s?Y(o,i(),c):o.forgetAll(),l=p,s=c);},u=q(()=>t.bodyStore().part),x=(p,c)=>{if(p.length===0)return {ok:true,changed:false};let g=r(),m=new Set,I=[];for(let h of p){if(typeof h.text!="string"||h.text.length>ir)return {ok:false,reason:"collaboration-text-limit"};if(typeof h.paragraphId!="string"||h.paragraphId.length===0||h.paragraphId.length>256)return {ok:false,reason:"unknown-paragraph-id"};let f=h.paragraphId.toUpperCase();if(m.has(f))return {ok:false,reason:"duplicate-paragraph-id"};m.add(f);let D=g.filter(Q=>Q.paragraphId===f);if(D.length!==1)return {ok:false,reason:"unknown-paragraph-id"};let w=D[0];I.push(...lr(w.nodeId,w.text,h.text));}if(I.length===0)return {ok:true,changed:false};let v=t.transact(ar,h=>{for(let f of I)h.apply(f);h.applyPackage(f=>dr(f,f.mainDocumentPart,I));},{origin:c.origin,actorId:c.actorId,operationId:c.operationId,recordsHistory:false});return v.ok?{ok:true,changed:v.change!==null}:{ok:false,reason:v.detail??v.reason}},k={documentId:e,interactive:n.interactive===true,paragraphs:r,paragraphByNodeId:u,paragraphTextOf(p){for(let c of i()){let g=Jm(c,p);if(g!==null)return g}return null},paragraphByStableId(p){let c=p.toUpperCase();d();let g=o(c);if(!g)return null;let m=Jm(g.part,g.nodeId);return m===null?null:Object.freeze({paragraphId:c,nodeId:g.nodeId,text:m})},applyParagraphText(p,c,g){return x([{paragraphId:p,text:c}],g)},applyParagraphTexts:x,applyRemotePackage(p,c){let g=t.publishRemotePackage(p,c);return g.ok?{ok:true,changed:g.change!==null}:{ok:false,reason:g.detail??g.reason}},revision:()=>t.packageRevision,subscribe:p=>t.subscribe(p),observePrimitiveJournal:p=>Z(t,p),hasPendingJournals:()=>Sa(t),flushPendingJournals:()=>{Ta(t);},save:()=>ng(t.currentPackage()),binaryPart(p){let c=t.currentPackage();return c.partBytes.get(p)??c.partBytes.get(p.startsWith("/")?p.slice(1):`/${p}`)??null}};return Object.freeze(k)}function cr(t,n,e){if(n===e||t>n.length)return Math.min(t,e.length);let r=0;for(;r<n.length&&r<e.length&&n[r]===e[r];)r+=1;let a=0;for(;a<n.length-r&&a<e.length-r&&n[n.length-1-a]===e[e.length-1-a];)a+=1;if(t<=r)return Math.min(t,e.length);if(t>n.length-a)return Math.min(e.length,t+e.length-n.length);let i=gr(n,e,r,a),o=i.offsets.get(t);return o===void 0&&(o=(i.table?fr(i.table,t,n,e,r):null)??Pr(t,n,e,r,a)??r,i.offsets.set(t,o)),o}var b=[],ur=16;function gr(t,n,e,r){let a=b.findIndex(o=>o.before===t&&o.after===n);if(a>=0){let[o]=b.splice(a,1);return b.push(o),o}let i={before:t,after:n,table:mr(t,n,e,r),offsets:new Map};return b.length>=ur&&b.shift(),b.push(i),i}var hr=1<<18;function mr(t,n,e,r){let a=t.length-r-e,i=n.length-r-e;if(a*i>hr)return null;let o=i+1,l=new Uint32Array((a+1)*o);for(let s=a-1;s>=0;s-=1)for(let d=i-1;d>=0;d-=1)l[s*o+d]=t[e+s]===n[e+d]?l[(s+1)*o+d+1]+1:Math.max(l[(s+1)*o+d],l[s*o+d+1]);return {lengths:l,width:o,columns:i}}function fr(t,n,e,r,a){let{lengths:i,width:o,columns:l}=t,s=n-a,d=0,u=0;for(;d<s;)u<l&&e[a+d]===r[a+u]?(d+=1,u+=1):u>=l||i[(d+1)*o+u]>=i[d*o+u+1]?d+=1:u+=1;return a+u}var yr=[32,16,8,4];function Pr(t,n,e,r,a){let i=e.slice(r,e.length-a),o=l=>{let s=i.indexOf(l);return s>=0&&i.indexOf(l,s+1)<0?s:null};for(let l of yr){let s=n.slice(Math.max(r,t-l),t);if(s.length===l){let u=o(s);if(u!==null)return r+u+s.length}let d=n.slice(t,Math.min(n.length-a,t+l));if(d.length===l){let u=o(d);if(u!==null)return r+u}}return null}export{dr as a,pr as b,cr as c};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
'use strict';var chunk32YOHLEK_cjs=require('./chunk-32YOHLEK.cjs'),chunkDCILO4XD_cjs=require('./chunk-DCILO4XD.cjs');var Gr=(e,t,n)=>{let r=e<0n,o=r?-e:e,a=o/t,i=o%t;if(n!=="towardZero"){let l=i*2n;(l>t||l===t&&(n==="halfAwayFromZero"||n==="halfToEven"&&a%2n!==0n))&&(a+=1n);}let s=r?-a:a,c=Number(s);if(!Number.isSafeInteger(c))throw new RangeError("Shaped fixed-point value exceeds the safe integer range");return c},dt=(e,t,n,r)=>{if(!Number.isSafeInteger(e))throw new RangeError("font units must be a safe integer");if(!Number.isSafeInteger(t)||t<=0)throw new RangeError("fixed-point denominator must be a positive safe integer");if(!Number.isSafeInteger(n)||n<0)throw new RangeError("fixed-point numerator must be a non-negative safe integer");if(e===0||n===0)return chunk32YOHLEK_cjs.n(0);let o=e*n;if(Number.isSafeInteger(o)){let a=Math.abs(o),i=a%t,s=(a-i)/t;return r!=="towardZero"&&(i>t-i||i===t-i&&(r==="halfAwayFromZero"||r==="halfToEven"&&s%2!==0))&&(s+=1),chunk32YOHLEK_cjs.n(s===0?0:o<0?-s:s)}return chunk32YOHLEK_cjs.n(Gr(BigInt(e)*BigInt(n),BigInt(t),r))},gn=(e,t,n,r)=>{if(!Number.isSafeInteger(t)||t<=0)throw new RangeError("font size must be a positive integer number of half points");if(t>Math.floor(Number.MAX_SAFE_INTEGER/n))throw new RangeError("font size and fixed-point scale product exceeds the safe integer range");let o=t*n,a=e*2;return i=>dt(i,a,o,r)},Sn=(e,t,n)=>{let r=t*n,o=e*2;return a=>a*r/o};var Ne=(e,t)=>e[t]<<8|e[t+1],xn=(e,t)=>e[t]*16777216+(e[t+1]<<16)+(e[t+2]<<8)+e[t+3]>>>0;function Wr(e,t){let n=(s,c)=>s>=0&&s+c<=e.length;if(!n(0,12))return false;let a=String.fromCharCode(e[0],e[1],e[2],e[3])==="ttcf"&&n(12+t*4,4)?xn(e,12+t*4):0;if(!n(a,12))return false;let i=Ne(e,a+4);for(let s=0;s<i;s+=1){let c=a+12+s*16;if(!n(c,16))return false;if(!(e[c]===99&&e[c+1]===109&&e[c+2]===97&&e[c+3]===112))continue;let u=xn(e,c+8);if(!n(u,4))return false;let y=Ne(e,u+2);for(let f=0;f<y;f+=1){let p=u+4+f*8;if(!n(p,4))return false;if(Ne(e,p)===3&&Ne(e,p+2)===0)return true}return false}return false}var bn=new WeakMap;function Rn(e,t){let n=bn.get(e);return n===void 0&&(n=Wr(t,e.faceIndex),bn.set(e,n)),n}function Fn(e){let t="",n=false;for(let r=0;r<e.length;r+=1){let o=e.charCodeAt(r);o>=32&&o<=255?(t+=String.fromCharCode(61440+o),n=true):t+=e[r];}return n?t:e}var Kr=4096,Cn=e=>typeof e=="number"?String(e):JSON.stringify(e)??typeof e,De=class{constructor(t){this.onRestart=t;}onRestart;#e=new Map;keyOf(t,n){let r=chunk32YOHLEK_cjs.t(n),o=this.#e.get(r);o===void 0&&(this.#e.size>=Kr&&(this.#e.clear(),this.onRestart()),o=this.#e.size,this.#e.set(r,o));let a=`${o}\0${Cn(t.fontSizeHalfPoints)}\0${Cn(t.bidiLevel)}\0`,i=t.context;return !i||i.before===""&&i.after===""?`${a}-${t.text}`:`${a}c${i.before.length},${i.after.length}\0${i.before}${i.after}${t.text}`}clear(){this.#e.clear();}};function le(e){try{let t=new URL(e);return t.username!==""||t.password!==""||t.search!==""||t.hash!==""?`${t.protocol}//${t.host}${t.pathname}\u2026`:e}catch{let t=e.search(/[?#]/);return t===-1?e:`${e.slice(0,t)}\u2026`}}function En(e){return e.replace(/[a-z][a-z0-9+.-]*:\/\/[^\s"')]+/gi,t=>le(t))}function jr(e){if(typeof e!="string"&&!(e instanceof URL))throw new TypeError(`setHarfBuzzWasmUrl: expected a string or URL, received ${typeof e}`);if(typeof e=="string"&&e.trim()==="")throw new TypeError("setHarfBuzzWasmUrl: expected a non-empty URL");throw new Error("setHarfBuzzWasmUrl is not supported by the CommonJS build, which loads the shaper from node_modules and finds its binary on disk. Import the ESM build instead.");}function vn(e){return e instanceof Error&&/process\.getBuiltinModule/.test(e.message)}function Ln(e){return `the text shaper cannot start on this Node version: the ESM build reaches Node builtins through \`process.getBuiltinModule\`, added in Node 20.16.0 and 22.3.0. Upgrade Node; \`setHarfBuzzWasmUrl\` does not apply here. (${En(e instanceof Error?e.message:String(e))})`}function Bn(e){let t=En(e instanceof Error?e.message:String(e));return `the HarfBuzz WASM binary could not be loaded from ${"its bundled location"}. If this bundler does not emit \`new URL(..., import.meta.url)\` assets (esbuild, Bun, and library builds that inline dynamic imports), serve \`@docx-editor.dev/core/harfbuzz.wasm\` yourself, point \`setHarfBuzzWasmUrl\` from '@docx-editor.dev/core/layout' at it before creating an editor, and reload the page. (${t})`}function Tn(e,t){let n=`expected HarfBuzz ${e}, loaded ${t}`;return `${n}. The bundled binary does not match this build of the engine.`}var ie=Object.freeze({name:"HarfBuzz",version:"14.4.0"}),Se=null,he=null;function ft(){return Se?Promise.resolve():he||(he=import('harfbuzzjs').then(e=>{let t=e.versionString();if(t!==ie.version)throw new A("shapingLibraryMismatch",{diagnostic:Tn(ie.version,t)});Se=e;}).catch(e=>{throw he=null,e instanceof A?e:vn(e)?new A("unsupportedRuntime",{diagnostic:Ln(e),cause:e}):new A("wasmUnavailable",{diagnostic:Bn(e),cause:e})}),he)}function Yr(){return Se!==null}function $r(){if(!Se)throw new A("notInitialized",{diagnostic:"Call initializeHarfBuzz() before creating a text shaper"});return Se}var A=class extends Error{name="HarfBuzzShapingError";code;limit;actual;diagnostic;constructor(t,n={}){super(`HarfBuzz shaping failed (${t})`,{cause:n.cause}),this.code=t,this.limit=n.limit,this.actual=n.actual,this.diagnostic=n.diagnostic;}},qr=16*1024*1024,Zr=1e6,Jr=1e6,Qr=1e6,eo=4,to=512,no=1024*1024,ro=16*1024*1024,oo=32*1024*1024,ao=64*1024*1024,io=64*1024*1024,so=1e6,co=1e6,lo=1e6,uo=64,po=4096,fo=4*1024*1024,mo=64*1024*1024,yo=64*1024*1024,ho=256*1024*1024,go=new Set(["COLR","CPAL","CBDT","CBLC","sbix","SVG "]),wn=["cmap","head","hhea","hmtx","maxp"],So=(e,t)=>e[t]<<8|e[t+1],xo=(e,t)=>e[t]*16777216+(e[t+1]<<16)+(e[t+2]<<8)+e[t+3]>>>0,bo=(e,t)=>String.fromCharCode(e[0],e[1],e[2],e[3])==="ttcf"?xo(e,12+t*4):0,Ro=(e,t)=>{let n=bo(e,t),r=So(e,n+4),o=new Set;for(let a=0;a<r;a+=1){let i=n+12+a*16;o.add(String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]));}return o},Fo=e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),Co=(e,t)=>{let n=chunk32YOHLEK_cjs.l(e,t);if(!n.valid)return n;let r=Ro(e,t);for(let o of wn)if(!r.has(o))return {valid:false,diagnostic:`missing required ${o} table`};return {valid:true}},mt=Co,G=(e,t,n)=>{if(!Number.isSafeInteger(e)||e<=0||e>n)throw new RangeError(`${t} must be a positive safe integer no greater than ${n}`);return e},Eo=(e,t,n)=>{if(t.length===0)return [];let r=[],o=0;for(;o<t.length;){let a=t[o].cluster,i=o+1,s=t[o].advanceX;for(;i<t.length&&t[i].cluster===a;)s+=t[i].advanceX,i+=1;let c=chunk32YOHLEK_cjs.n(s);r.push({textStart:a,textEnd:n==="rtl"?t[o-1]?.cluster??e.length:t[i]?.cluster??e.length,glyphStart:o,glyphEnd:i,advance:c,caretEdges:Object.freeze([chunk32YOHLEK_cjs.n(0),c]),fontSpan:0}),o=i;}return r},V=64,$=8,q=8,On=32,yt=V+2*$,vo=V+$+q,Lo=V+$+2*q,Bo=V+$+q,An=V+8*$,In=V+8*q+$,To=V+6*q+$,wo=V+3*q+2*$,Oo=V+3*q,xe=e=>V+e.length*Uint16Array.BYTES_PER_ELEMENT,ht=e=>Bo+xe(e),ge=e=>On+e*$,Ao=(e,t)=>yt+xe(e)+vo+ht(t),Io=e=>An+xe(e)+ge(e.length)+e.length*In,Mo=e=>{let t=new Set(e.glyphs.map(n=>n.outline));return An+xe(e.text)+ge(e.glyphs.length)+e.glyphs.length*In+ge(e.clusters.length)+e.clusters.length*To+e.clusters.reduce((n,r)=>n+ge(r.caretEdges.length),0)+ge(e.fontSpans.length)+e.fontSpans.length*wo+(e.exactAdvancesX===void 0?0:On+e.exactAdvancesX.length*q)+Oo+[...t].reduce((n,r)=>n+ht(r.path),0)},_o=(e,t)=>yt+xe(e)+Lo+t,pt=class{#e;#p;#f;#m;#y;#R;#h;#l=0;#F;#g;#S;#c;#x;#u;#t;#o=new Map;#i=new Map;#s=new Map;#n=new Map;#C=new De(()=>{this.#n.clear(),this.#r=0,this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0}));});#a=0;#r=0;#b=0;#d;constructor(t,n){chunk32YOHLEK_cjs.p(this),this.#e=t,this.#p=G(n.maxFontBytes??qr,"maximum font bytes",io),this.#f=G(n.maxInputUtf16??Zr,"maximum input UTF-16 code units",so),this.#m=G(n.maxCodepoints??Jr,"maximum input code points",co),this.#y=G(n.maxGlyphs??Qr,"maximum shaped glyphs",lo),this.#h=G(n.maxCachedFontBytes??64*1024*1024,"maximum cached font bytes",64*1024*1024),this.#R=G(n.maxCachedFaces??eo,"maximum cached faces",uo),this.#F=G(n.maxCachedShapes??to,"maximum cached shape results",po),this.#g=G(n.maxOutlineBytes??no,"maximum outline bytes",fo),this.#S=G(n.maxCachedOutlineBytes??ro,"maximum cached outline bytes",mo),this.#c=G(n.maxShapedRunBytes??oo,"maximum shaped run bytes",yo),this.#x=G(n.maxCachedShapeBytes??ao,"maximum cached shape bytes",ho),this.#u=n.instrumentation?.onFaceCacheEvent,this.#t=n.instrumentation,this.#d=new this.#e.Buffer;}dispose(){this.#o.clear(),this.#l=0,this.#i.clear(),this.#s.clear(),this.#n.clear(),this.#C.clear(),this.#a=0,this.#r=0,this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0})),this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"cleared",retainedBytes:0})),this.#d=void 0;}#v(t,n){let r=this.#o.get(t.identity);if(r)return this.#o.delete(t.identity),this.#o.set(t.identity,r),this.#u?.(Object.freeze({kind:"hit",identity:t.identity})),r;let o=chunk32YOHLEK_cjs.j(t);for(let u of wn)if(!o.has(u))throw new A("malformedFont",{diagnostic:`missing required ${u} table`});this.#t?.onByteCopy?.();let a=new this.#e.Blob(Fo(n)),i=new this.#e.Face(a,t.faceIndex),s=new this.#e.Font(i),c=s.hExtents();if(!Number.isSafeInteger(i.upem)||i.upem<=0||!Number.isSafeInteger(c.ascender)||!Number.isSafeInteger(c.descender)||!Number.isSafeInteger(c.lineGap))throw new A("malformedFont",{diagnostic:"invalid font units or horizontal metrics"});s.setScale(i.upem,i.upem);let l={identity:t.identity,blob:a,face:i,font:s,unitsPerEm:i.upem,byteLength:n.byteLength};if(n.byteLength<=this.#h){for(;this.#o.size>=this.#R||this.#l+n.byteLength>this.#h;){let u=this.#o.keys().next().value;if(u===void 0)break;this.#l-=this.#o.get(u).byteLength,this.#o.delete(u),this.#u?.(Object.freeze({kind:"evicted",identity:u}));}this.#o.set(t.identity,l),this.#l+=n.byteLength;}return this.#u?.(Object.freeze({kind:"created",identity:t.identity})),l}#L(t,n){let r=this.#i.get(t.identity)?.get(n);if(r)return this.#s.delete(r),this.#s.set(r,void 0),this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"hit",retainedBytes:this.#a})),r.outline;this.#t?.onOutlinePathCall?.();let o=t.font.glyphToPath(n),a=ht(o);if(a>this.#g)throw new A("outlineOverLimit",{limit:this.#g,actual:a});let i=Object.freeze({path:o,unitsPerEm:t.unitsPerEm}),s=Ao(t.identity,o)+3*yt+2*q;if(s>this.#S)return this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"skipped",retainedBytes:this.#a})),i;for(;this.#a+s>this.#S;){let u=this.#s.keys().next().value;if(u===void 0)break;this.#s.delete(u);let y=this.#i.get(u.identity);y.delete(u.glyphId),y.size===0&&this.#i.delete(u.identity),this.#a-=u.bytes,this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"evicted",retainedBytes:this.#a}));}let c=this.#i.get(t.identity);c||this.#i.set(t.identity,c=new Map);let l={outline:i,bytes:s,identity:t.identity,glyphId:n};return c.set(n,l),this.#s.set(l,void 0),this.#a+=s,this.#t?.onOutlineCacheEvent?.(Object.freeze({kind:"created",retainedBytes:this.#a})),i}#E(t){if(t.length>this.#f)throw new A("textOverLimit",{limit:this.#f,actual:t.length});let n=0;for(let r=0;r<t.length;){let o=t.codePointAt(r);if(r+=o>65535?2:1,n+=1,n>this.#m)throw new A("codepointsOverLimit",{limit:this.#m,actual:n})}}shape(t){if(!this.#d)throw new A("disposed");if(chunk32YOHLEK_cjs.k(t.environment.font),t.environment.font.byteLength>this.#p)throw new A("fontOverLimit",{limit:this.#p,actual:t.environment.font.byteLength});this.#E(t.text);let n=Io(t.text);if(n>this.#c)throw new A("shapedRunOverLimit",{limit:this.#c,actual:n});let r=chunk32YOHLEK_cjs.r(t.environment),o=this.#C.keyOf(t,r),a=this.#n.get(o);if(a)return this.#b-a.stamp>=Math.max(1,this.#n.size>>1)&&(this.#n.delete(o),this.#n.set(o,a),a.stamp=++this.#b),this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"hit",retainedBytes:this.#r})),a.run;if(this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"miss",retainedBytes:this.#r})),r.shapingLibrary.name!==ie.name||r.shapingLibrary.version!==ie.version)throw new A("shapingLibraryMismatch");if(r.normalization!=="none")throw new A("unsupportedNormalization");if(!Number.isSafeInteger(t.bidiLevel)||t.bidiLevel<0||(t.bidiLevel&1)===1!=(r.direction==="rtl"))throw new A("invalidBidiLevel");if(Object.keys(r.variationAxes).length>0)throw new A("unsupportedVariationAxes");if(r.fallbackOrder.length>0)throw new A("unsupportedFallback");let i=chunk32YOHLEK_cjs.i(r.font),s=chunk32YOHLEK_cjs.j(r.font);if([...go].some(p=>s.has(p))&&!s.has("glyf")&&!s.has("CFF "))throw new A("unsupportedColorFont");let c=t.text;this.#E(c);let l=t.context?.before??"",u=t.context?.after??"",y=chunk32YOHLEK_cjs.o,f=Math.max(String(l).length,String(u).length);if(typeof l!="string"||typeof u!="string"||f>y)throw new A("textOverLimit",{limit:y,actual:f});try{let p=this.#v(r.font,i),{face:g,font:h}=p,d=this.#d;d.reset();let S=Rn(r.font,i)?Fn:String,x=l+c+u,R=chunk32YOHLEK_cjs.A(x)?chunk32YOHLEK_cjs.B(p):void 0,L=M=>S(R?chunk32YOHLEK_cjs.C(M,R):M);l||u?d.addText(L(l+c+u),l.length,c.length):d.addText(L(c)),d.setDirection(r.direction==="rtl"?this.#e.Direction.RTL:this.#e.Direction.LTR),d.setScript(r.script),d.setLanguage(r.language),d.setClusterLevel(this.#e.ClusterLevel.MONOTONE_CHARACTERS);let E=Object.entries(r.features).map(([M,U])=>new this.#e.Feature(M,U));if((r.features.kern??1)!==0)for(let[M,U]of chunk32YOHLEK_cjs.x(l+c+u))E.push(new this.#e.Feature("kern",0,M,U));this.#t?.onShapeCall?.(),this.#e.shape(h,d,E);let O=d.getLength();if(O>this.#y)throw new A("glyphOverLimit",{limit:this.#y,actual:O});let B=d.getGlyphInfos(),v=d.getGlyphPositions(),w=gn(g.upem,t.fontSizeHalfPoints,r.fixedPointScale,r.roundingMode),_=Sn(g.upem,t.fontSizeHalfPoints,r.fixedPointScale),b=[],m=chunk32YOHLEK_cjs.n(0),F=chunk32YOHLEK_cjs.n(0),C=new Map,T=B.map((M,U)=>{let ee=v[U],Mt=R?.get(x.charCodeAt(M.cluster)),_t=Mt?.advance??ee?.xAdvance??0;b.push(_(_t));let Pt=w(_t),kt=w(ee?.yAdvance??0),Fe=Mt?.glyph??M.codepoint,Ur={id:Fe,cluster:M.cluster-l.length,originX:m,originY:F,advanceX:Pt,advanceY:kt,offsetX:w(ee?.xOffset??0),offsetY:w(ee?.yOffset??0),outline:C.get(Fe)??(()=>{let zt=this.#L(p,Fe);return C.set(Fe,zt),zt})()};return m=chunk32YOHLEK_cjs.n(m+Pt),F=chunk32YOHLEK_cjs.n(F+kt),Ur}),I=h.hExtents(),P=chunk32YOHLEK_cjs.u({text:c,direction:r.direction,bidiLevel:t.bidiLevel,glyphs:T,exactAdvancesX:b,clusters:Eo(c,T,r.direction),fontSpans:T.length===0?[]:[{glyphStart:0,glyphEnd:T.length,font:r.font,fallbackIndex:null}],metrics:{ascent:w(I.ascender),descent:w(-I.descender),lineGap:w(I.lineGap)}},r),z=Mo(P);if(z>this.#c)throw new A("shapedRunOverLimit",{limit:this.#c,actual:z});let D=_o(o,z);if(D>this.#x)return this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"skipped",retainedBytes:this.#r})),P;for(;this.#n.size>=this.#F||this.#r+D>this.#x;){let M=this.#n.keys().next().value;if(M===void 0)break;let U=this.#n.get(M);this.#n.delete(M),this.#r-=U.bytes,this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"evicted",retainedBytes:this.#r}));}return this.#n.set(o,{run:P,bytes:D,stamp:++this.#b}),this.#r+=D,this.#t?.onShapeCacheEvent?.(Object.freeze({kind:"stored",retainedBytes:this.#r})),P}catch(p){throw p instanceof A?p:new A("malformedFont",{diagnostic:p instanceof Error?p.message:"HarfBuzz shaping failed"})}}},gt=(e={})=>new pt($r(),e);var St=Object.freeze({maxFontBytes:16*1024*1024,maxInputUtf16:1e6,maxCodepoints:1e6,maxGlyphs:1e6,maxCachedFaces:32,maxCachedFontBytes:64*1024*1024,maxCachedShapes:512,maxOutlineBytes:1024*1024,maxCachedOutlineBytes:16*1024*1024,maxShapedRunBytes:32*1024*1024,maxCachedShapeBytes:64*1024*1024}),Ni=Object.freeze({...St,maxCachedShapes:4096});function Mn(e){let t={maxFontBytes:e.maxFontBytes,maxInputUtf16:e.maxInputUtf16,maxCodepoints:e.maxCodepoints,maxGlyphs:e.maxGlyphs,maxOutlineBytes:e.maxOutlineBytes,maxShapedRunBytes:e.maxShapedRunBytes},n=["docx-editor-layout-harfbuzz-execution-policy",1,Object.entries(t).sort(([r],[o])=>r<o?-1:r>o?1:0).map(([r,o])=>Object.freeze([r,o]))];return `layout-shaper-policy:sha256:${chunkDCILO4XD_cjs.f(new TextEncoder().encode(JSON.stringify(n)))}`}function _n(e,t=St){let n=e?.maxFontBytes??t.maxFontBytes;if(!Number.isSafeInteger(n)||n<=0||n>chunk32YOHLEK_cjs.a)throw new RangeError(`Font shaping byte ceiling must be between 1 and ${chunk32YOHLEK_cjs.a}`);return n===t.maxFontBytes?t:Object.freeze({...t,maxFontBytes:n})}function Pn(e,t,n=false){let r=false,o=Object.freeze({shape(a){if(r)throw new A("disposed");let i=a.environment.font;if(chunk32YOHLEK_cjs.k(i),i.byteLength>t.maxFontBytes)throw new A("fontOverLimit",{limit:t.maxFontBytes,actual:i.byteLength});return e.shape(a)},dispose(){r||(r=true,n&&e.dispose?.());}});return chunk32YOHLEK_cjs.q(e)?chunk32YOHLEK_cjs.p(o):o}var Po=Object.freeze({}),kn=chunk32YOHLEK_cjs.b,ko="16.0.0",zo="none",No=1e3,Do="halfToEven",Dn="cluster-edges-only",Ho="Latn",Uo=new Uint8Array(0);var Z=class extends Error{code="overLimit";constructor(t){super(t),this.name="LayoutShapingConfigurationError";}};function Go(e,t){let n=e.epoch,r=e.maxFontBytes,o=e.sources,a=e.substitutions,i=e.defaultFont,s=e.language;if(!Number.isSafeInteger(r)||r<=0||r>chunk32YOHLEK_cjs.a)throw new Z(`Font byte ceiling must not exceed the engine hard maximum of ${chunk32YOHLEK_cjs.a}`);let c=o.length,l=a?.length??0;if(c===0||c>chunk32YOHLEK_cjs.b)throw new Z(`Font source count must be between 1 and ${chunk32YOHLEK_cjs.b}`);if(l>kn)throw new Z(`Font substitution count must not exceed ${kn}`);let u=0,y=[];for(let g=0;g<c;g+=1){let h=o[g],d=h.request,S=h.availability,x=h.id,R=h.hash,L=h.faceIndex,E=S==="forbidden",O=E?Uo:h.bytes;if(!E){if(typeof x!="string"||x.length===0)throw new TypeError("Resolved font id must not be empty");let B;try{B=chunk32YOHLEK_cjs.e(O);}catch{throw new Z(`Font source ${x} must provide genuine bytes`)}if(B>r)throw new Z(`Font source ${x} exceeds the per-font byte ceiling`);if(u+=B,u>chunk32YOHLEK_cjs.c)throw new Z(`Font sources exceed the aggregate byte ceiling of ${chunk32YOHLEK_cjs.c}`)}y.push(t&&chunk32YOHLEK_cjs.g(h)!==void 0?h:Object.freeze({request:Object.freeze({family:d.family,weight:d.weight,style:d.style}),id:x,bytes:O,hash:R,faceIndex:L,...S?{availability:S}:{}}));}let f;if(a){f=[];for(let g=0;g<l;g+=1){let h=a[g],d=h.from,S=h.to,x=h.lineMetrics;f.push(Object.freeze({from:Object.freeze({family:d.family,weight:d.weight,style:d.style}),to:Object.freeze({family:S.family,weight:S.weight,style:S.style}),...x?{lineMetrics:Object.freeze({heightEm:x.heightEm,baselineEm:x.baselineEm})}:{}}));}}let p={epoch:n,maxFontBytes:r,sources:Object.freeze(y),substitutions:f?Object.freeze(f):void 0,defaultFont:Object.freeze({family:i.family,sizeHalfPoints:i.sizeHalfPoints}),language:s};return Object.freeze(p)}function zn(e,t){let n=e.map((o,a)=>({value:o,index:a,key:chunk32YOHLEK_cjs.h(t(o))})),r=new Set;for(let o of n){if(r.has(o.key))return e;r.add(o.key);}return n.sort((o,a)=>o.key<a.key?-1:o.key>a.key?1:o.index-a.index).map(({value:o})=>o)}function Wo(e,t){let n={family:e.family},r={sizeHalfPoints:e.sizeHalfPoints};return {...n,...t?r:{}}}function Nn(e,t){let n=c=>({family:c.family,weight:c.weight,style:c.style}),r=t?e.sources:zn(e.sources,c=>c.request),o=e.substitutions??[],a=t?o:zn(o,c=>c.from),i={sources:r.map(c=>{let l=c.availability??"available",u={request:n(c.request),availability:l};if(l==="forbidden")return {...u,...t?{id:c.id,faceIndex:c.faceIndex,declaredHash:c.hash}:{}};let y=chunk32YOHLEK_cjs.g(c);if(y==null)throw new TypeError("Font configuration identity requires prepared source bytes");return {...u,...t?{id:c.id}:{},faceIndex:c.faceIndex,declaredHash:c.hash,actualHash:y,byteLength:c.bytes.byteLength}}),substitutions:a.map(c=>({from:n(c.from),to:n(c.to),lineMetrics:c.lineMetrics?{heightEm:c.lineMetrics.heightEm,baselineEm:c.lineMetrics.baselineEm}:null})),defaultFont:Wo(e.defaultFont,t),language:e.language||"en"},s={epoch:e.epoch,maxFontBytes:e.maxFontBytes};return {version:1,...t?s:{},...i}}var Ko=Symbol("prepared-layout-font-configuration"),He=new WeakMap;function Vo(e){return He.has(e)}function Xo(e){let t=He.get(e);if(!t)throw new TypeError("Invalid prepared layout font configuration");return t.configuration}function qi(e){let t=He.get(e);if(!t)throw new TypeError("Invalid prepared layout font configuration");return t.sharedShapingFingerprint}function xt(e,t){return Hn(e,t,false)}function Zi(e,t){return Hn(e,t,true)}function Hn(e,t,n){let r=Go(e,n),o=Object.freeze({epoch:r.epoch,maxFontBytes:r.maxFontBytes,sources:Object.freeze(r.sources.map(y=>n&&chunk32YOHLEK_cjs.g(y)!==void 0?y:chunk32YOHLEK_cjs.f(y,{onOwnedByteCopy:t?.onFontByteCopy,onHash:t?.onFontHash}))),substitutions:r.substitutions,defaultFont:r.defaultFont,language:r.language}),a=new TextEncoder,i=Nn(o,true),s=a.encode(JSON.stringify(i)),c=Nn(o,false),l=a.encode(JSON.stringify(c)),u=Object.freeze({[Ko]:true,fingerprint:`font-config:${chunkDCILO4XD_cjs.f(s)}`});return He.set(u,{configuration:o,sharedShapingFingerprint:`shared-font-config:${chunkDCILO4XD_cjs.f(l)}`}),u}function jo(e){return xt(e).fingerprint}function Yo(e,t){let n=new TextEncoder().encode(JSON.stringify({version:1,environment:e,executionPolicy:Mn(t),ligatureCaretPolicy:Dn,fallback:chunk32YOHLEK_cjs.sa}));return `shaping:${chunkDCILO4XD_cjs.f(n)}`}async function Un(e,t,n,r,o=false){let i=Vo(e)?e:xt(e,t),s=Xo(i),{epoch:c,maxFontBytes:l,sources:u,substitutions:y,defaultFont:f}=s,p=s.language||"en",g=i.fingerprint,h=chunk32YOHLEK_cjs.m({epoch:c,maxFontBytes:l,resources:u,substitutions:y,validateFont:mt,instrumentation:{onOwnedByteCopy:t?.onFontByteCopy,onHash:t?.onFontHash,onAdmission:t?.onFontAdmission}});await ft();let d=Object.freeze({script:Ho,variationAxes:Object.freeze({}),shapingLibrary:ie,unicodeDataVersion:ko,normalization:zo,language:p,features:Po,...o?{documentLigatures:true}:{},fixedPointScale:No,roundingMode:Do});return Object.freeze({fonts:h,shaper:Pn(n??gt(r),r,n===void 0),defaultFont:f,environment:d,ligatureCaretPolicy:Dn,operation:Object.freeze({resourceEpoch:h.epoch,configEpoch:c,extensionFingerprint:g,shapingHash:Yo(d,r),producerVersion:1})})}async function $o(e,t,n){return Un(e,t,void 0,_n(n))}async function Ji(e,t,n,r,o=false){return Un(e,r,t,n,o)}function qo(e){e.shaper.dispose?.();}function bt(e){let t=new Set([0,e.text.length]);for(let r of chunk32YOHLEK_cjs.ya(e.text))t.add(r.utf16From),t.add(r.utf16To);let n=new Set([0,e.text.length]);for(let r of e.clusters)n.add(r.textStart),n.add(r.textEnd);return [...t].filter(r=>n.has(r)).sort((r,o)=>r-o)}function Ue(e,t){return bt(e).includes(t)}function Zo(e,t){return Ue(e,t)}function Jo(e,t,n){return n>=t&&Ue(e,t)&&Ue(e,n)}function Qo(e){let t=chunk32YOHLEK_cjs.ya(e.text);return bt(e).map(n=>n===e.text.length?t.length:t.findIndex(r=>r.utf16From===n))}var Ft="und";function Vn(){return typeof Intl.Segmenter=="function"}function ea(){let e=Intl.Segmenter;if(typeof e!="function")throw new Error(`Intl.Segmenter is required for word segmentation (locale: ${Ft})`);return e}function Xn(){let e=new(ea())(Ft,{granularity:"word"});return {segment(t){let n=[];for(let r of e.segment(t)){let o=r.index,a=o+r.segment.length;n.push({utf16From:o,utf16To:a,wordLike:r.isWordLike===true});}return n}}}var ta=/^[\p{L}\p{N}']$/u,na=/^\s$/u;function Gn(e){return ta.test(e)}function Wn(e){return na.test(e)}function Rt(e,t,n,r){let o=e[t],a=e[n-1];return {utf16From:o.utf16From,utf16To:a.utf16To,wordLike:r}}function jn(e){let t=chunk32YOHLEK_cjs.ya(e);if(t.length===0)return [];let n=[],r=0;for(;r<t.length;){let o=t[r];if(Wn(o.text)){let a=r+1;for(;a<t.length&&Wn(t[a].text);)a+=1;n.push(Rt(t,r,a,false)),r=a;continue}if(Gn(o.text)){let a=r+1;for(;a<t.length&&Gn(t[a].text);)a+=1;n.push(Rt(t,r,a,true)),r=a;continue}n.push(Rt(t,r,r+1,false)),r+=1;}return n}function Yn(){return {segment:jn}}function $n(e={}){let t=e.isIntlAvailable??Vn,n=e.createIntlBoundary??Xn,r=e.createFallbackBoundary??Yn;if(!t())return r();try{return n()}catch{return r()}}var Kn;function qn(){return Kn??=$n(),Kn}function ra(e,t=qn()){return t.segment(e)}function oa(e,t){return t.map(n=>({graphemeFrom:chunk32YOHLEK_cjs.Ca(e,n.utf16From),graphemeTo:chunk32YOHLEK_cjs.Ca(e,n.utf16To),wordLike:n.wordLike}))}var Zn={resourceEpoch:"resource-scoped",configEpoch:"coarse-gate",extensionFingerprint:"coarse-gate",shapingHash:"coarse-gate",producerVersion:"coarse-gate"},vt=Object.keys(Zn),Jn=vt.filter(e=>Zn[e]==="coarse-gate"),Ge=(e,t)=>{if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`${t} must be a non-negative safe integer`)},ue=(e,t)=>{if(e.trim().length===0)throw new TypeError(`${t} must not be blank`)},aa={resourceEpoch:Ge,configEpoch:Ge,extensionFingerprint:ue,shapingHash:ue,producerVersion:Ge},ia=(e,t)=>{aa[t](e[t],t);},de=e=>{for(let t of vt)ia(e,t);return Object.freeze({resourceEpoch:e.resourceEpoch,configEpoch:e.configEpoch,extensionFingerprint:e.extensionFingerprint,shapingHash:e.shapingHash,producerVersion:e.producerVersion})},sa=(e,t)=>{let n=de(e),r=de(t),o=vt.filter(a=>n[a]!==r[a]);return o.length===0?Object.freeze({status:"current"}):Object.freeze({status:"restart",changed:Object.freeze(o)})},Ct=e=>{let t=e.map(({key:n,fingerprint:r})=>(ue(n,"resource dependency key"),ue(r,"resource dependency fingerprint"),Object.freeze({key:n,fingerprint:r}))).sort((n,r)=>n.key<r.key?-1:n.key>r.key?1:0);for(let n=1;n<t.length;n+=1)if(t[n-1].key===t[n].key)throw new TypeError(`Duplicate resource dependency: ${t[n].key}`);return Object.freeze(t)},ca=e=>(Ge(e.revision,"revision"),ue(e.dependencyFingerprint,"dependencyFingerprint"),ue(e.inputFingerprint,"inputFingerprint"),Object.freeze({revision:e.revision,dependencyFingerprint:e.dependencyFingerprint,inputFingerprint:e.inputFingerprint,resourceDependencies:Ct(e.resourceDependencies),...de(e)})),la=(e,t)=>{let n=Ct(e),r=Ct(t),o=Math.max(n.length,r.length);for(let a=0;a<o;a+=1){let i=n[a],s=r[a];if(i?.key!==s?.key||i?.fingerprint!==s?.fingerprint)return {hit:false,reason:"resource-changed",resourceKey:i?.key??s.key}}return null};function ua(e,t){if(e.dependencyFingerprint!==t.dependencyFingerprint)return {hit:false,reason:"dependency-changed"};if(e.inputFingerprint!==t.inputFingerprint)return {hit:false,reason:"input-changed"};let n=la(e.resourceDependencies,t.resourceDependencies);if(n)return n;for(let r of Jn)if(e[r]!==t[r])return {hit:false,reason:"epoch-changed",epoch:r};return null}var Et=class{entries=new Map;get(t,n){let r=this.entries.get(t);if(!r)return {hit:false,reason:"absent"};let o=ua(r.provenance,n);return o||{hit:true,value:r.value,provenance:r.provenance}}set(t,n,r){this.entries.set(t,{value:n,provenance:ca(r)});}evictEpoch(t){let n=de(t),r=0;for(let[o,a]of this.entries){let i=a.provenance;Jn.some(s=>i[s]!==n[s])&&(this.entries.delete(o),r+=1);}return r}evictResources(t,n){let r=de(t),o=this.evictEpoch(r);for(let[a,i]of this.entries)i.provenance.resourceDependencies.some(c=>n.get(c.key)!==c.fingerprint)&&(this.entries.delete(a),o+=1);return o}get size(){return this.entries.size}};function Qn(e){return e.projected===true?null:e.range}function pa(e,t,n,r=false){let{page:o,story:a,host:i,noteScopeId:s,noteAreaKind:c}=e,l=a==="header"||a==="footer"?u=>chunk32YOHLEK_cjs.Ia(u,e.origin,{x:o.box.x,y:o.box.y}):void 0;chunk32YOHLEK_cjs.Ra(i,(u,y)=>{let{textboxDepth:f,textboxOwner:p,textboxPath:g,storyOrigin:h}=y,d=f===0?a:"textbox";if(r&&u.marker&&!u.lines.some(S=>S.spans.length>0)){let S=u.lines[0];if(!S||!u.marker)return;let x={range:{paragraphId:u.paragraphId,start:S.range.start,end:S.range.start},text:"",props:[],style:u.marker.style,box:{...S.box,width:0}};n({page:o,story:d,rootStory:a,root:e,storyOrigin:h,absoluteBox:Object.freeze({x:h.x+x.box.x,y:h.y+x.box.y,width:0,height:x.box.height}),noteScopeId:s,noteAreaKind:c,textboxDepth:f,textboxOwner:p,textboxPath:g,paragraph:u,paragraphId:u.paragraphId,line:S,span:x,sourceRange:null});return}for(let S of u.lines){let x=[...chunk32YOHLEK_cjs.Ya(S)].sort((R,L)=>(t.get(R.paragraphId)??Number.MAX_SAFE_INTEGER)-(t.get(L.paragraphId)??Number.MAX_SAFE_INTEGER));for(let R of x)for(let L of R.spans)n({page:o,story:d,rootStory:a,root:e,storyOrigin:h,absoluteBox:Object.freeze({x:h.x+L.box.x,y:h.y+L.box.y,width:L.box.width,height:L.box.height}),noteScopeId:s,noteAreaKind:c,textboxDepth:f,textboxOwner:p,textboxPath:g,paragraph:u,paragraphId:R.paragraphId,line:S,span:L,sourceRange:Qn(L)});}},e.origin,l);}function fa(e,t,n={}){let r=new Map(chunk32YOHLEK_cjs.fb(e).map((o,a)=>[o,a]));chunk32YOHLEK_cjs.Oa(e,o=>pa(o,r,t,n.spanlessMarkers===true));}var ya=1,er=4,te=Object.freeze({top:0,right:0,bottom:0,left:0}),tr=new WeakMap;function ha(e,t){let n=ga(e);return n===te?t:chunk32YOHLEK_cjs.yf(t,n)}function ga(e){let t=e.vectorShape;if(!t)return te;let{cx:n,cy:r}=t.extentEmu;if(!(n>=0)||!(r>=0)||n===0&&r===0)return te;let o=tr.get(t);if(o||(o=Sa(t),tr.set(t,o)),o===te)return te;let a=e.paintBounds,i=e.geometry.contentBounds;if(!(a.width>0||i.width<=0)||!(a.height>0||i.height<=0))return te;let s=n>0?i.width/n:i.height/r,c=r>0?i.height/r:i.width/n,l=(f,p,g)=>{if(g<-1e-3)return 0;let h=f*p-Math.max(0,g);return Number.isFinite(h)&&h>0?h:0},u=e.kind==="inlineDrawing"&&e.placeholderGraphicKind===null,y={left:l(o.left,s,i.x-a.x),top:u?0:l(o.top,c,i.y-a.y),right:l(o.right,s,a.x+a.width-(i.x+i.width)),bottom:l(o.bottom,c,a.y+a.height-(i.y+i.height))};return y.left||y.top||y.right||y.bottom?Object.freeze(y):te}function Sa(e){let{cx:t,cy:n}=e.extentEmu,r=0,o=0,a=t,i=n,s=(y,f)=>{r=Math.min(r,y),a=Math.max(a,y),o=Math.min(o,f),i=Math.max(i,f);},c=e.overflowVisible===true,l=c?1/0:ya,u=y=>y.x>=-l&&y.x<=t+l&&y.y>=-l&&y.y<=n+l;for(let y of e.components){if(c)for(let d of y.subpathsEmu)for(let S of d)s(S.x,S.y);let f=y.clipEmu?void 0:y.shadow;if(f){let d=1/0,S=1/0,x=-1/0,R=-1/0;for(let B of y.subpathsEmu)for(let v of B){let w=c?v.x:Math.max(0,Math.min(t,v.x)),_=c?v.y:Math.max(0,Math.min(n,v.y));d=Math.min(d,w),S=Math.min(S,_),x=Math.max(x,w),R=Math.max(R,_);}let L=chunk32YOHLEK_cjs.xf(f.blurEmu)*.75+(y.strokeHex!==null?Math.max(1,chunk32YOHLEK_cjs.xf(y.strokeWidthEmu))/2:0),E=chunk32YOHLEK_cjs.xf(f.dxEmu),O=chunk32YOHLEK_cjs.xf(f.dyEmu);d<=x&&(s(d+E-L,S+O-L),s(x+E+L,R+O+L));}if(y.strokeHex===null||y.strokeInset===true)continue;let p=Math.max(1,chunk32YOHLEK_cjs.xf(y.strokeWidthEmu))/2,g=l+Math.max(0,chunk32YOHLEK_cjs.xf(y.strokeOutsetEmu??0)),h=d=>d.x>=-g&&d.x<=t+g&&d.y>=-g&&d.y<=n+g;y.subpathsEmu.forEach((d,S)=>{let x=y.subpathsClosed?.[S]!==false,R=xa(d,x),L=x&&R.length>2?R.length:R.length-1,E=[];for(let B=0;B<L;B+=1){let v=R[B],w=R[(B+1)%R.length],_=Math.hypot(w.x-v.x,w.y-v.y),b={x:-(w.y-v.y)/_,y:(w.x-v.x)/_};if(E.push(b),!!ba(v,w,-g,t+g,-g,n+g))for(let m=0;m<2;m+=1){let F=J[m],C=v.x+(w.x-v.x)*F,T=v.y+(w.y-v.y)*F;s(C+b.x*p,T+b.y*p),s(C-b.x*p,T-b.y*p);}}if(!x&&E.length&&(y.strokeCap==="round"||y.strokeCap==="square")){for(let[B,v,w]of [[R[0],E[0],-1],[R[R.length-1],E[E.length-1],1]])if(h(B))if(y.strokeCap==="round")s(B.x-p,B.y-p),s(B.x+p,B.y+p);else {let _=B.x+w*v.y*p,b=B.y-w*v.x*p;s(_+v.x*p,b+v.y*p),s(_-v.x*p,b-v.y*p);}}let O=x&&R.length>2?E.length:E.length-1;for(let B=0;B<O;B+=1){let v=R[(B+1)%R.length];if(!h(v))continue;if(y.strokeJoin==="round"){s(v.x-p,v.y-p),s(v.x+p,v.y+p);continue}if(y.strokeJoin==="bevel")continue;let w=E[B],_=E[(B+1)%E.length],b=1+w.x*_.x+w.y*_.y;if(b<2/(er*er))continue;let m=w.y*-_.x- -w.x*_.y;if(m===0)continue;let F=m>0?-1:1;s(v.x+F*(w.x+_.x)*p/b,v.y+F*(w.y+_.y)*p/b);}});for(let d of y.arrowheadsEmu??[])if(!(!d[0]||!u(d[0])))for(let S of d)s(S.x,S.y);}return r>=0&&o>=0&&a<=t&&i<=n?te:Object.freeze({left:-r,top:-o,right:a-t,bottom:i-n})}function xa(e,t){let n=[];for(let a of e){let i=n[n.length-1];(!i||i.x!==a.x||i.y!==a.y)&&n.push(a);}let r=n[0],o=n[n.length-1];return t&&n.length>1&&r.x===o.x&&r.y===o.y&&n.pop(),n}var J=new Float64Array(2);function ba(e,t,n,r,o,a){let i=t.x-e.x,s=t.y-e.y;return J[0]=0,J[1]=1,We(-i,e.x-n)&&We(i,r-e.x)&&We(-s,e.y-o)&&We(s,a-e.y)}function We(e,t){if(e===0)return t>=0;let n=t/e;return e<0?J[0]=Math.max(J[0],n):J[1]=Math.min(J[1],n),J[0]<=J[1]}var Ra="abcdefghijklmnopqrstuvwxyz";function N(e){let t=Math.round(e.fontSizePt*2);return Math.max(1,t)}function X(e,t,n,r,o){let a=r.shaping?.context;return e.shape({text:o,fontSizeHalfPoints:N(r),bidiLevel:r.shaping?.direction==="rtl"?1:0,environment:Fa(t,n,r),...a?{context:a}:{}})}var nr=new WeakMap;function Fa(e,t,n){if(!Object.isFrozen(e)||!Object.isFrozen(e.features)||!Object.isFrozen(e.variationAxes)||!Object.isFrozen(e.shapingLibrary))return rr(e,t,n);let r=n.shaping?.direction??"ltr",o=n.shaping?.script,a=`${r}|${o??""}|${chunk32YOHLEK_cjs.w(n)?1:0}|${e.documentLigatures?chunk32YOHLEK_cjs.O(n):""}|${n.smallCaps?1:0}`,i=nr.get(e);i||nr.set(e,i=new WeakMap);let s=i.get(t);s||i.set(t,s=new Map);let c=s.get(a);return c||s.set(a,c=rr(e,t,n)),c}function rr(e,t,n){return chunk32YOHLEK_cjs.r({...e,font:t,direction:n.shaping?.direction??"ltr",script:n.shaping?.script==="Zyyy"?e.script:n.shaping?.script??e.script,features:{...e.features,kern:chunk32YOHLEK_cjs.w(n)?1:0,...e.documentLigatures?chunk32YOHLEK_cjs.N(n):{},...n.smallCaps?{smcp:1}:{}},fallbackOrder:[]})}function Ke(e,t,n,r,o){let a=o.get(n);if(a!==void 0)return a;let i=true;try{for(let s of Ra){let c=X(e,t,n,{...r,smallCaps:!0},s),l=X(e,t,n,{...r,smallCaps:!1},s);if(!(c.glyphs.length!==l.glyphs.length||c.glyphs.some((y,f)=>y.id!==l.glyphs[f]?.id))){i=!1;break}}}catch{i=false;}return o.set(n,i),i}var Ca=new Map([["garamond",{family:"Garamond",em:or(1765,539,0)}],["segoe ui",{family:"Segoe UI",em:or(2210,514,0)}]]);function or(e,t,n){return {heightEm:(e+t+n)/2048,baselineEm:(e+n)/2048}}function Lt(e){return e?Ca.get(e.trim().toLowerCase()):void 0}function Ve(e){let t=Lt(e.fontFamily);if(!t)return;let n=N(e)/2*chunk32YOHLEK_cjs.ra(e);return {height:t.em.heightEm*n,baseline:t.em.baselineEm*n}}var Ea=new Map([["roman","serif"],["swiss","sans"],["modern","mono"]]);function bs(e,t){return t==="fixed"?"mono":e?Ea.get(e):void 0}var va=new Map([["calibri","sans"],["arial","sans"],["helvetica","sans"],["verdana","sans"],["tahoma","sans"],["segoe ui","sans"],["aptos","sans"],["century gothic","sans"],["carlito","sans"],["cambria","serif"],["times new roman","serif"],["georgia","serif"],["garamond","serif"],["book antiqua","serif"],["palatino linotype","serif"],["caladea","serif"],["courier new","mono"],["consolas","mono"]]);function ar(e){let t=e.trim().toLowerCase(),n=va.get(t);if(n)return n;let r=t.split(/[\s_-]+/);if(r.includes("mono")||r.includes("monospace")||r.includes("courier"))return "mono";if(r.includes("sans"))return "sans";if(r.includes("serif")||r.includes("roman"))return "serif"}var Rs={serif:"Times New Roman",sans:"Arial",mono:"Courier New"};var Bt="Calibri, Carlito, Helvetica, Arial, sans-serif",La='"Times New Roman", "Liberation Serif", Tinos, serif',Ba='"Courier New", "Liberation Mono", Cousine, monospace',Ta='Batang, AppleMyungjo, "Noto Serif CJK KR", serif';function wa(e,t=Bt,n){if(!e)return t;if(n?.(e))return Ta;let r=ar(e);return r==="serif"?La:r==="mono"?Ba:t}var ws=new Map([["calibri","Carlito"]]),Oa=65536,Aa=256;function ir(e,t){return e===void 0?Math.max(1,Math.floor(t)):Number.isFinite(e)&&e>0?Math.max(1,Math.floor(e)):1}function sr(e){let t=new Map,n=null,r=null,o=0,a=s=>{s.older?s.older.newer=s.newer:n=s.newer,s.newer?s.newer.older=s.older:r=s.older,s.older=null,s.newer=null;},i=s=>{s.older=r,s.newer=null,r?r.newer=s:n=s,r=s;};return {get(s){let c=t.get(s);if(c!==void 0)return c!==r&&(a(c),i(c)),c.value},set(s,c){let l=t.get(s);if(l){l.value=c,l!==r&&(a(l),i(l));return}let u={key:s,value:c,older:null,newer:null};for(t.set(s,u),i(u);t.size>e&&n;){let y=n;a(y),t.delete(y.key),o+=1;}},get size(){return t.size},get evictions(){return o}}}var cr=/^[\p{L}\p{N}\p{M} \-.+_,;]{1,64}$/u;function lr(e=null){return e!=null&&typeof e.measureText=="function"}function ur(e={}){let t=e.scale??1;if(!(t>0)||!Number.isFinite(t))return null;let n=e.fallbackFamily??Bt,r=e.context??null;if(!lr(r))return null;let o=r,a=sr(ir(e.maxWidthEntries,Oa)),i=sr(ir(e.maxMetricsEntries,Aa)),s=e.fontAlias,c=new Map,l=f=>{let p=c.get(f);if(p!==void 0)return p;let g="The quick brown fox 0123",h=false;for(let d of ["monospace","serif"]){o.font=`32px ${d}`;let S=o.measureText(g).width;if(o.font=`32px "${f}", ${d}`,o.measureText(g).width!==S){h=true;break}}return c.set(f,h),h},u=f=>{let p=f.fontFamily&&cr.test(f.fontFamily)?f.fontFamily:null,g=p?s?.(p):void 0,h=g&&cr.test(g)?g:null,d=wa(p,n,e.serifHangulFace),S=p?h?`"${h}", "${p}", ${d}`:`"${p}", ${d}`:n,x=f.bold?"bold":"normal",R=f.italic?"italic":"normal",L=f.smallCaps?"small-caps":"normal",E=f.fontSizePt*chunk32YOHLEK_cjs.ra(f)*t;return `${R} ${L} ${x} ${E}px ${S}`},y=(f,p,g)=>f/t*(g.horizontalScalePercent/100)+p.length*g.characterSpacingPt;return {measure(f,p){if(f.length===0)return 0;let g=u(p),h=chunk32YOHLEK_cjs.y(p,f),d=`${g}\0${h}\0${f}`,S=a.get(d);if(S!==void 0)return y(S,f,p);o.font=g,"fontKerning"in o&&(o.fontKerning=h?"normal":"none");let x=o.measureText(f).width;return a.set(d,x),y(x,f,p)},inkBounds(f,p){if(!f||f.length>2||p.shaping?.direction==="rtl"||chunk32YOHLEK_cjs.ya(f).length!==1)return;o.font=u(p),"fontKerning"in o&&(o.fontKerning=chunk32YOHLEK_cjs.w(p)?"normal":"none");let g=o.textAlign,h=o.direction,d;try{g!==void 0&&(o.textAlign="left"),h!==void 0&&(o.direction="ltr"),d=o.measureText(f);}finally{g!==void 0&&(o.textAlign=g),h!==void 0&&(o.direction=h);}let S=d.actualBoundingBoxLeft,x=d.actualBoundingBoxRight;if(S===void 0||x===void 0||!Number.isFinite(S)||!Number.isFinite(x))return;let R=p.horizontalScalePercent/(100*t);return {left:-S*R,right:x*R}},textOutline(f,p){if(!f||p.shaping?.direction==="rtl")return;o.font=u(p),"fontKerning"in o&&(o.fontKerning=chunk32YOHLEK_cjs.w(p)?"normal":"none");let g=o.textAlign,h=o.textBaseline,d;try{g!==void 0&&(o.textAlign="left"),h!==void 0&&(o.textBaseline="alphabetic"),d=o.measureText(f);}finally{g!==void 0&&(o.textAlign=g),h!==void 0&&(o.textBaseline=h);}let S=[-(d.actualBoundingBoxLeft??NaN),-(d.actualBoundingBoxAscent??NaN),d.actualBoundingBoxRight??NaN,d.actualBoundingBoxDescent??NaN].map(O=>O/t);if(S.some(O=>!Number.isFinite(O)))return;let[x,R,L,E]=S;if(!(!(L>x)||!(E>R)))return {path:null,ink:{left:x,top:R,right:L,bottom:E}}},lineMetrics(f){let p=f.fontSizePt*chunk32YOHLEK_cjs.ra(f),g=u(f),h=i.get(g);if(h)return h;let d=Lt(f.fontFamily),S=d&&!l(d.family)&&Ve(f);if(S)return i.set(g,S),S;let x=p*1.15,R=p*.8;o.font=g,"fontKerning"in o&&(o.fontKerning=chunk32YOHLEK_cjs.w(f)?"normal":"none");let L=o.measureText("Hxg"),E=L.fontBoundingBoxAscent,O=L.fontBoundingBoxDescent;if(typeof E=="number"&&Number.isFinite(E)&&E>0&&(R=E/t,typeof O=="number"&&Number.isFinite(O)&&O>=0)){let v=(E+O)/t;v>0&&(x=Math.max(v,x));}x>0||(x=p*1.15);let B={height:x,baseline:R};return i.set(g,B),B}}}function Ia(e=1,t={}){let n=ur({...t,scale:t.scale??e});return n?{measurer:n,producer:t.fontAlias?"canvas-measurer+embedded":"canvas-measurer"}:{measurer:chunk32YOHLEK_cjs.ta(),producer:"fixed-measurer"}}function Ma(e){let t;return n=>{t===void 0&&(t=chunk32YOHLEK_cjs.jd(e.pages)?.hosts??null);let r=t?.get(n);return r?chunk32YOHLEK_cjs.hd(r.pageNumber,r.format):null}}function dr(e,t){let n=chunk32YOHLEK_cjs.uf(e,t.displayMode??chunk32YOHLEK_cjs.mb),r=chunk32YOHLEK_cjs.Od({numberingIndex:t.numberingIndex,styleCascade:t.styleCascade},n).listItems,o=t.package?{footnotesPart:chunkDCILO4XD_cjs.pj(t.package,"footnote"),endnotesPart:chunkDCILO4XD_cjs.pj(t.package,"endnote")}:void 0,a=chunk32YOHLEK_cjs.ie(n,r,o,t.package?chunk32YOHLEK_cjs.fe(t.package,e,n):void 0,t.displayMode??chunk32YOHLEK_cjs.mb);return {blocks:n,notes:o,context:a}}function pr(e,t,n,r,o){for(let a of t){if(r.length>=chunkDCILO4XD_cjs.yn)return;if(n.tokenForParagraph(a.id)!==""&&chunkDCILO4XD_cjs.Bn(e,a.id)===null)for(let i of chunkDCILO4XD_cjs.An(a)){if(r.length>=chunkDCILO4XD_cjs.yn)return;if(!i.rewritable)continue;let s=chunk32YOHLEK_cjs.Wc(i.instruction);if(s===null)continue;let c=n.liveValueOf(i.fieldNodeId,s);if(c===null&&o&&n.pageRefProjectionOf){let l=n.pageRefProjectionOf(i.fieldNodeId,s);if(l){let u=o(l.targetParagraphId);u!==null&&u.length>0&&chunk32YOHLEK_cjs.id(l.calibration,l.cached,u,Number.NaN)&&(c=u);}}c===null||c===i.cachedText||c.length>chunkDCILO4XD_cjs.zn||c.includes("\r")||r.push({paragraphId:a.id,fieldNodeId:i.fieldNodeId,text:c});}}}function _a(e,t){let{blocks:n,context:r}=dr(e,t);if(r===null)return null;let o=[];return pr(e,chunk32YOHLEK_cjs.Zc(chunk32YOHLEK_cjs.wc(n)),r,o,t.pageRefPageNumberOf),o.length===0?null:{op:"refreshFieldResults",updates:o}}function Hs(e,t){let{notes:n,context:r}=dr(e,t);if(r===null||n===void 0)return [];let o=[],a=[{noteKind:"footnote",notesPart:n.footnotesPart},{noteKind:"endnote",notesPart:n.endnotesPart}];for(let{noteKind:i,notesPart:s}of a){if(!s)continue;let c=[];for(let l of chunk32YOHLEK_cjs.ge(s,t.displayMode??chunk32YOHLEK_cjs.mb)){if(c.length>=chunkDCILO4XD_cjs.yn)break;pr(s,chunk32YOHLEK_cjs.Zc(chunk32YOHLEK_cjs.wc(l)),r,c);}c.length>0&&o.push({noteKind:i,op:{op:"refreshFieldResults",updates:c}});}return o}function Pa(e){return e.box}function fr(e,t){if(e.kind==="paragraph"){t.add(e.paragraphId);return}for(let n of e.rows)for(let r of n.cells)for(let o of r.blocks)fr(o,t);}function ka(e){let t=new Map,n=(o,a,i)=>{if(!(o.kind==="textValue"||i>chunkDCILO4XD_cjs.ec*4)){for(let s of o.children)if(s.kind!=="textValue"){if(s.kind==="paragraph"){for(let c of r)t.get(c)?.push(s.id);n(s,s.id,i+1);continue}if(s.kind==="contentControl"){t.set(s.id,[]),r.push(s.id);let c=chunkDCILO4XD_cjs.oc(s);c&&n(c,a,i+1),r.pop();let l=t.get(s.id);l&&l.length===0&&a!==null&&l.push(a);continue}n(s,a,i+1);}}},r=[];return n(e,null,0),t}function za(e,t){let n=Math.min(e.x,t.x),r=Math.min(e.y,t.y);return {x:n,y:r,width:Math.max(e.x+e.width,t.x+t.width)-n,height:Math.max(e.y+e.height,t.y+t.height)-r}}function Na(e,t){let n=chunkDCILO4XD_cjs.sc(e.root);if(n.length===0)return Da;let r=new Map;t.pages.forEach((i,s)=>{(l=>{for(let u of l){let y=new Set;fr(u,y);for(let f of y){let p=r.get(f)??[];p.push({pageIndex:s,box:Pa(u)}),r.set(f,p);}}})(i.fragments);});let o=ka(e.root),a=[];for(let i of n){let s=chunkDCILO4XD_cjs.qc(i.node),c=[...i.ancestors.map(f=>chunkDCILO4XD_cjs.qc(f).lock),s.lock],l=o.get(i.node.id)??[],u=new Map;for(let f of l)for(let p of r.get(f)??[]){let g=u.get(p.pageIndex);u.set(p.pageIndex,g?za(g,p.box):p.box);}let y=[...u.entries()].sort((f,p)=>f[0]-p[0]).map(([f,p])=>({pageIndex:f,...p}));a.push({controlId:i.node.id,type:s.type,level:chunkDCILO4XD_cjs.rc(i.node),depth:i.depth,lock:s.lock,effectiveLock:chunkDCILO4XD_cjs.vc(c),showingPlaceholder:s.showingPlaceholder,temporary:s.temporary,...s.tag===void 0?{}:{tag:s.tag},...s.alias===void 0?{}:{alias:s.alias},...s.id===void 0?{}:{id:s.id},...s.dataBinding===void 0?{}:{dataBinding:s.dataBinding},paragraphIds:l,fragments:y});}return a}var Da=Object.freeze([]);var Ha=4096;function Ua(e,t=0){if(!(e instanceof Uint8Array)||!Number.isSafeInteger(t)||t<0||e.byteLength<12)return;let n=new DataView(e.buffer,e.byteOffset,e.byteLength),r=(h,d)=>Number.isSafeInteger(h)&&Number.isSafeInteger(d)&&h>=0&&d>=0&&h<=e.length-d,o=h=>n.getUint16(h,false),a=h=>n.getUint32(h,false),i=0,s=false;if(a(0)===1953784678){s=true;let h=a(4),d=a(8);if(![65536,131072].includes(h)||!d||t>=d||!r(12,d*4))return;i=a(12+t*4);}else if(t!==0)return;if(!r(i,12)||![65536,1330926671,1953658213].includes(a(i)))return;let c=o(i+4);if(!c||c>Ha||!r(i+12,c*16))return;let l=new Map;for(let h=0;h<c;h++){let d=i+12+h*16,S=a(d),x=a(d+8),R=a(d+12);if(l.has(S)||!r(x,R))return;l.set(S,{offset:x,length:R});}let u=l.get(1751474532),y=l.get(1330851634);if(!u||u.length<20||!y||y.length<4)return;let f=o(u.offset+18),p=o(y.offset),g=n.getInt16(y.offset+2,false);if(!(f<16||f>16384||p>5||g<=0))return Object.freeze({faceIndex:t,collection:s,unitsPerEm:f,os2Version:p,xAvgCharWidth:g,averageAdvanceEm:g/f})}function mr(e,t=Ua){if(typeof e!="function"||typeof t!="function")return;let n=new WeakMap;return r=>{if(!chunk32YOHLEK_cjs.fc(r))return;let o;try{o=e(r);}catch{return}if(!o||typeof o!="object"||o.substitution!==null||o.family.trim().toLowerCase()!==r.fontFamily?.trim().toLowerCase()||typeof o.hash!="string"||!/^sha256:[0-9a-f]{64}$/u.test(o.hash)||!Number.isSafeInteger(o.faceIndex)||o.faceIndex<0)return;let a=n.get(o);if(a===void 0&&(a=t(o.bytes,o.faceIndex)??null,n.set(o,a)),!a)return;let i=r.fontSizePt*a.averageAdvanceEm/2;return Number.isFinite(i)&&i>=0&&i<=r.fontSizePt?i:void 0}}var W=(e,t)=>e[t]<<8|e[t+1],Q=(e,t)=>e[t]*16777216+(e[t+1]<<16)+(e[t+2]<<8)+e[t+3]>>>0;function Ga(e,t){let n=(i,s)=>i>=0&&i+s<=e.length;if(!n(0,12))return null;let r=Q(e,0)===1953784678;if(r&&!n(12+t*4,4))return null;let o=r?Q(e,12+t*4):0;if(!n(o,12))return null;let a=W(e,o+4);for(let i=0;i<a;i+=1){let s=o+12+i*16;if(!n(s,16))return null;if(Q(e,s)!==1668112752)continue;let c=Q(e,s+8);if(!n(c,4))return null;let l=null,u=null,y=W(e,c+2);for(let f=0;f<y;f+=1){let p=c+4+f*8;if(!n(p,8))return null;let g=W(e,p),h=W(e,p+2),d=c+Q(e,p+4);if(!n(d,2)||!(g===0||g===3&&(h===1||h===10)))continue;let x=W(e,d);x===12&&u===null&&(u=d),x===4&&l===null&&(l=d);}return u!==null?{format:12,offset:u}:l!==null?{format:4,offset:l}:null}return null}function Wa(e,t,n){let r=(u,y)=>u>=0&&u+y<=e.length,o=t.offset;if(t.format===12){if(!r(o,16))return false;let u=Q(e,o+12),y=0,f=Math.min(u,Math.floor((e.length-o-16)/12))-1;for(;y<=f;){let p=y+f>>>1,g=o+16+p*12,h=Q(e,g),d=Q(e,g+4);if(n<h)f=p-1;else if(n>d)y=p+1;else return Q(e,g+8)+(n-h)!==0}return false}if(n>65535||!r(o,14))return false;let a=W(e,o+6)>>>1,i=o+14,s=i+a*2+2,c=s+a*2,l=c+a*2;if(!r(l,a*2))return false;for(let u=0;u<a;u+=1){if(n>W(e,i+u*2))continue;let y=W(e,s+u*2);if(n<y)return false;let f=W(e,c+u*2),p=l+u*2,g=W(e,p);if(g===0)return (n+f&65535)!==0;let h=p+g+(n-y)*2;if(!r(h,2))return false;let d=W(e,h);return d!==0&&(d+f&65535)!==0}return false}var yr=new WeakMap;function hr(e,t){let n=chunk32YOHLEK_cjs.i(e),r=yr.get(e);return r===void 0&&(r=Ga(n,e.faceIndex),yr.set(e,r)),r?Wa(n,r,t):void 0}var gr=new WeakMap;function Ka(e){let t=gr.get(e);if(t!==void 0)return t;let n=chunk32YOHLEK_cjs.i(e),r=new DataView(n.buffer,n.byteOffset,n.byteLength),o=false,a=r.getUint32(0)===1953784678?r.getUint32(12+e.faceIndex*4):0,i=r.getUint16(a+4);for(let s=0;s<i;s++){let c=a+12+s*16;if(r.getUint32(c)!==1330851634)continue;let l=r.getUint32(c+8),u=r.getUint32(c+12);u>=86&&l<=n.byteLength-u&&r.getUint16(l)>=1&&(o=(r.getUint32(l+78)&1966080)!==0);break}return gr.set(e,o),o}var Sr=1.3;function xr(e,t,n,r,o,a=false){let i=n.height-r;if(!(Math.abs(i-t)<=o)&&!a||!Ka(e))return n;let c=a?i*Sr:Math.max(n.height,t*Sr),l=n.baseline-r;return {height:c,baseline:l+(c-i)/2}}var Va=.89111328125,Xa=443/2048,ja=87/2048,Ya=1/2048,$a=new Set(["Arab","Hebr","Syrc","Thaa","Nkoo"]);function br(e){return e.latinLane===void 0&&!$a.has(e.shaping?.script??"")}function Rr(e,t,n,r,o,a=true){if(!a||r!==0||!(o>0)||e.trim().toLowerCase()!=="times new roman")return r;let i=(s,c)=>Math.abs(s/o-c)<=Ya;return i(t,Va)&&i(n,Xa)?ja*o:r}var qa=.5;function Za(e,t){if(t.fontFamily===null)return false;let n=e.substitution;return n!==null&&(n.lineMetrics!==void 0||!chunkDCILO4XD_cjs.me(n.requested.family,n.resolved.family))?false:e.family===t.fontFamily||chunkDCILO4XD_cjs.me(e.family,t.fontFamily)}function Fr(e,t,n,r,o){let a=new WeakMap;return (i,s)=>{let c=chunk32YOHLEK_cjs.ra(s),l=a.get(i);l||(l=new Map,a.set(i,l));let u=N(s),y=br(s),f=Za(i,s),p=(y?u:-u)+(f?qa:0),g=l.get(p);if(g)return c===1?g:{height:g.height*c,baseline:g.baseline*c};let h,d=true,S=i.substitution?.lineMetrics;if(S){let x=u/2;h={height:S.heightEm*x,baseline:S.baselineEm*x};}else try{let x=X(e,t,i,s,""),R=x.metrics.ascent/t.fixedPointScale,L=x.metrics.descent/t.fixedPointScale,E=u/2,O=R+L,B=E*r,v=O>B?B/O:1,w=O*v,_=x.metrics.lineGap/t.fixedPointScale,b=Math.min(Math.max(0,Rr(i.family,R,L,_,E,y)),w*o),m=w+b;m>0?h=xr(i,E,{height:m,baseline:R*v+b},b,2/t.fixedPointScale,f):(h=n.lineMetrics(s),d=!1);}catch{h=n.lineMetrics(s),d=false;}return d?(l.set(p,h),c===1?h:{height:h.height*c,baseline:h.baseline*c}):h}}var Tt=2048,Ja=32,Qa=new Map([["symbol",{ascent:2059,descent:450,advances:[512,682,1460,1024,1124,1706,1593,899,682,682,1024,1124,512,1124,512,569,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,569,569,1124,1124,1124,909,1124,1479,1366,1479,1253,1251,1563,1235,1479,682,1292,1479,1405,1821,1479,1479,1573,1518,1139,1212,1251,1413,899,1573,1321,1628,1251,682,1767,682,1348,1024,1024,1292,1124,1124,1012,899,1067,842,1235,674,1235,1124,1124,1180,1067,1124,1124,1067,1124,1235,899,1180,1460,1405,1010,1405,1012,983,410,983,1124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1270,506,1124,342,1460,1024,1542,1542,1542,1542,2134,2021,1235,2021,1235,819,1124,842,1124,1124,1460,1012,942,1124,1124,1124,1124,2048,1235,2048,1348,1686,1405,1628,2021,1573,1573,1686,1573,1573,1460,1460,1460,1460,1460,1460,1460,1573,1460,1618,1618,1823,1686,1124,512,1460,1235,1235,2134,2021,1235,2021,1235,1012,674,1618,1618,1610,1460,786,786,786,786,786,786,1012,1012,1012,1012,0,674,561,1405,1405,1405,786,786,786,786,786,786,1012,1012,1012,0]}],["wingdings",{ascent:1841,descent:432,advances:[2048,2110,2344,2665,2752,1830,2492,938,2220,1826,2319,2319,2399,2399,2951,2956,2245,2751,1431,1431,1826,1135,1233,2196,1941,2208,1924,1825,1826,1826,1825,1863,1863,1203,1624,1381,1381,1929,1929,1124,1124,1826,1727,1727,1727,2275,1352,1739,2230,1819,1803,1332,1665,1529,1529,1480,1420,1627,1813,1826,1834,1825,2368,2159,1974,2233,1927,1911,1937,2099,1902,2245,2181,1597,2150,2603,1529,1951,1529,1825,1825,1825,1825,937,1529,2020,1825,1183,2171,2171,1825,1826,1826,1086,1086,0,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,2048,2048,2048,2048,2048,2048,2048,2048,641,937,641,1825,1825,1825,1825,1825,1951,937,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,2146,2146,2146,2146,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2566,2566,1627,1627,1825,1825,1825,1825,1825,1825,2006,2006,1825,1825,1589,1589,1589,1589,2186,2186,1825,1825,1787,1787,1787,1787,1825,1825,1660,1660,2171,1660,1601,1601,1601,1601,987,789,1301,1609,1826,1826,2119]}],["wingdings 2",{ascent:1727,descent:432,advances:[2048,2110,2090,2073,2086,2344,2045,2220,989,1431,1431,1826,1431,1431,1826,1431,1431,1826,1431,1431,2320,2246,1826,1826,1826,2320,2170,2170,1381,1381,1938,1938,1938,1938,1928,1928,1928,1928,1047,1047,1047,1047,1178,1178,1178,1178,1826,1321,1568,1826,1826,1826,1826,1825,1825,1826,1826,2226,1727,1548,1579,984,1035,864,1018,2048,2048,2048,2048,2048,2048,2048,2048,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,1826,0,1899,1899,1453,1453,1673,1332,1431,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,2048,2048,542,740,1135,1825,1825,1825,1825,1825,1825,1825,542,740,1135,1825,1825,1825,1825,1825,1825,1825,1825,1825,624,764,903,1461,2020,2020,2020,2020,2020,542,641,740,1135,1529,1529,1085,1085,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1496,1825,0,0,0,0,0,0]}],["wingdings 3",{ascent:1900,descent:432,advances:[2048,1825,1825,1135,1135,1444,1444,1444,1444,1825,1825,1135,1135,1677,1677,1135,1135,1135,1135,1135,1135,1135,1135,1135,1135,1135,1825,1825,1455,1455,1455,1455,2010,2010,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,2220,1825,1751,1114,1115,1660,1660,1930,1930,1930,1930,1924,1924,1924,1924,1930,1930,1931,1931,1825,1825,1232,1232,1444,1444,1444,1444,1825,1232,2005,2005,2005,2005,1801,1801,1801,1801,1801,1801,1801,1801,1085,1085,1825,0,1825,1825,1825,1825,1825,1627,1627,1825,1825,1825,1825,789,789,1825,1825,987,987,1825,1825,1184,1184,1825,1825,1579,1579,1825,1825,888,888,1825,1825,1381,1381,1825,1825,1875,1875,1825,1825,1825,1825,1825,1825,1825,789,592,493,394,1825,1825,1825,1825,1825,1085,1085,1381,1381,1628,1628,1184,1184,900,900,1825,1825,1019,1019,1825,1825,1825,1825,1825,1825,1825,1825,1825,1825,1291,1291,1291,1291,1961,1961,1825,1825,1540,1540,1540,1540,2096,2096,1825,1825,1688,1688,1688,1688,2277,2277,1825,1825,1885,1885,1885,1885,543,543,1234,1234,766,766,1234,1234,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}],["webdings",{ascent:1638,descent:410,advances:[1024,2048,2048,2048,2048,2028,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,1100,1100,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,1144,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,0,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2500,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,1377,1377,2048,1726,1058,2048,2048,2048,2048,877,1240,2048,2048,2048,2048,1357,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048,2645,2048,2048,2048,2048]}]]);function ei(e){if(chunkDCILO4XD_cjs.b(e))return Qa.get(e.toLowerCase())}function Cr(e,t,n,r){let o=N(r)/2*chunk32YOHLEK_cjs.ra(r)*(r.horizontalScalePercent/100)/Tt,a=[];for(let i=0;i<n.length;i++){let s=chunkDCILO4XD_cjs.c(n.charCodeAt(i),t),c=s===null?0:e.advances[s-Ja]??0;if(c===0)return;a.push(c*o+r.characterSpacingPt);}return a}function Er(e){let t=new WeakMap,n=r=>{let o=t.get(r);return o===void 0&&(o=ei(r.fontFamily)??null,t.set(r,o)),o};return {...e,measure(r,o){let a=n(o),i=a&&Cr(a,o.fontFamily,r,o);if(!i)return e.measure(r,o);let s=0;for(let c of i)s+=c;return s},caretAdvances(r,o){let a=n(o),i=a&&Cr(a,o.fontFamily,r,o);if(!i)return e.caretAdvances?.(r,o);let s=[0];for(let c of i)s.push(s[s.length-1]+c);return s},lineMetrics(r,o){let a=n(r);if(!a)return e.lineMetrics(r,o);let i=N(r)/2*chunk32YOHLEK_cjs.ra(r);return {height:(a.ascent+a.descent)*i/Tt,baseline:a.ascent*i/Tt}}}}var ti={M:2,L:2,Q:4,C:6,Z:0},vr=e=>{let t=Math.round(e*1e3)/1e3;return String(Object.is(t,-0)?0:t)};function wt(e,t,n){if(!(t>0)||!(n>0))return;let r=[],o=0,a=1/0,i=-1/0,s=1/0,c=-1/0;for(let l of e.glyphs){if(l.id===0)return;let u=l.outline.path,y=l.outline.unitsPerEm;if(!u)continue;if(!(y>0)||!u.startsWith("M")||/[^MLQCZ0-9eE+.,\s-]/u.test(u))return;let f=t*(l.drawScale??1)/y,p=(l.originX+l.offsetX)/n,g=(l.originY+l.offsetY)/n;for(let h of u.matchAll(/([MLQCZ])([^MLQCZ]*)/gu)){let d=h[1],S=h[2].trim().split(/[\s,]+/u).filter(Boolean).map(Number);if(S.length!==ti[d]||S.some(R=>!Number.isFinite(R)))return;let x=d;for(let R=0;R<S.length;R+=2){let L=p+S[R]*f,E=-(g+S[R+1]*f);a=Math.min(a,L),i=Math.max(i,L),s=Math.min(s,E),c=Math.max(c,E),x+=`${R?" ":""}${vr(L)} ${vr(E)}`;}if(o+=x.length,o>2e6)return;r.push(x);}}if(!(!r.length||!(i>a)||!(c>s)))return Object.freeze({path:r.join(""),ink:Object.freeze({left:a,top:s,right:i,bottom:c})})}var Ot=new WeakMap;function ni(e){let t=Ot.get(e);if(t!==void 0)return t??void 0;let n=e.path;if(!n.startsWith("M")||n.length>1e6||/[^MLQCZ0-9eE+.,\s-]/u.test(n))return;let r=1/0,o=-1/0,a=n.matchAll(/([MLQCZ])([^MLQCZ]*)/gu);for(let s of a){let c=s[1]==="Z"?0:s[1]==="C"?6:s[1]==="Q"?4:2,l=s[2].trim().split(/[\s,]+/u).filter(Boolean).map(Number);if(l.length!==c||l.some(u=>!Number.isFinite(u))){Ot.set(e,null);return}for(let u=0;u<l.length;u+=2)r=Math.min(r,l[u]),o=Math.max(o,l[u]);}let i=Number.isFinite(r)&&Number.isFinite(o)?{left:r,right:o}:void 0;return Ot.set(e,i??null),i}function Lr(e,t,n,r){if(e.clusters.length!==1||e.glyphs.length===0)return;let o=1/0,a=-1/0;for(let s of e.glyphs){if(s.id===0)return;let c=ni(s.outline),l=s.outline.unitsPerEm;if(!c||!(l>0))return;let u=(s.originX+s.offsetX)/n;o=Math.min(o,u+c.left*t*(s.drawScale??1)/l),a=Math.max(a,u+c.right*t*(s.drawScale??1)/l);}let i={left:o*r,right:a*r};return Number.isFinite(i.left)&&Number.isFinite(i.right)?i:void 0}function ri(e,t,n){if(t<12)return null;if(e.getUint32(0)!==1953784678)return 0;let o=12+(Number.isSafeInteger(n)&&n>0?n:0)*4;if(o+4>t)return null;let a=e.getUint32(o);return a+12<=t?a:null}function Br(e,t,n,r,o){let a=e.getUint16(n+4);if(a>4096||n+12+a*16>t)return null;for(let i=0;i<a;i+=1){let s=n+12+i*16;if(e.getUint32(s)!==r)continue;let c=e.getUint32(s+8),l=e.getUint32(s+12);return l<o||c+l>t?null:c}return null}function Tr(e,t){let n=e.byteLength,r=new DataView(e.buffer,e.byteOffset,n),o=ri(r,n,t);if(o===null)return null;let a=Br(r,n,o,1751474532,54);if(a===null)return null;let i=r.getUint16(a+18);if(i<=0)return null;let s=Br(r,n,o,1330851634,30);if(s===null)return null;let c=r.getInt16(s+26)/i,l=r.getInt16(s+28)/i;return !(c>0)||c>1||!(Math.abs(l)<=1)?null:{offsetEm:l,thicknessEm:c}}var Xe=.02;function At(e,t){return e.bold===true&&t.request.weight<600}function wr(e){return e.advanceX>0&&e.outline.path.length>0}function Or(e){let t=0;for(let n of e.glyphs)wr(n)&&t++;return t}function Ar(e,t,n){if(n<=0)return e;let r=new Array(e.length).fill(0);for(let a of t.glyphs){if(!wr(a))continue;let i=Math.min(Math.max(a.cluster+1,1),e.length-1);r[i]+=n;}let o=0;return e.map((a,i)=>(o+=r[i],a+o))}var oi=.5,ai=4096,ii=4,Ir=4096;function Mr(e){let t="environment"in e?e.environment:void 0,n="environment"in e?void 0:e,{shaper:r,resolveFont:o}=e,a=Er(e.fallback),i=t??{shapingLibrary:n.shapingLibrary,unicodeDataVersion:n.unicodeDataVersion,script:n?.script??"Latn",fixedPointScale:n?.fixedPointScale??1e3,normalization:n?.normalization??"none",features:n?.features??{},roundingMode:n?.roundingMode??"halfToEven",language:n?.language??"en",variationAxes:{}},s=new WeakMap,c=new WeakMap,l=chunk32YOHLEK_cjs.q(r),u=Fr(r,i,a,ii,oi),y=new WeakMap,f=new WeakMap,p=new Array(Ir),g=0,h=(b,m,F)=>{let C=p[g];C&&C.cache.delete(C.text),b.set(m,F),p[g]={cache:b,text:m},g=(g+1)%Ir;},d=b=>{let m=y.get(b);if(m!==void 0)return m;let F=o(b);return y.set(b,F),F},S=mr(d),x=(b,m,F)=>{let C=F?c:s,T=C.get(b);T||(T=new Map,C.set(b,T));let I=T.get(m);return I||(I=new Map,T.set(m,I)),I},R=new WeakMap,L=b=>{if(!b.shaping?.wordSpacingPt)return b;let m=R.get(b);return m||(m={...b,shaping:{...b.shaping,wordSpacingPt:void 0}},R.set(b,m)),m},E=(b,m)=>m.shaping?.wordSpacingPt?chunk32YOHLEK_cjs.cc(b)*m.shaping.wordSpacingPt:0,O=(b,m)=>a.measure(b,L(m))+E(b,m),B=(b,m)=>{let F=Math.max(0,a.measure(b,L(m))),C=a.caretAdvances?.(b,L(m))??chunk32YOHLEK_cjs.ac(b,F);if(!C||C.length!==b.length+1)return chunk32YOHLEK_cjs.ac(b,O(b,m));let T=Math.max(0,O(b,m)),I=0,P=0;return C.map((z,D)=>{if(D===0)return 0;b[D-1]===" "&&P++;let M=z+P*(m.shaping?.wordSpacingPt??0);return I=Math.max(I,Math.min(T,Number.isFinite(M)?M:I)),D===b.length?T:I})},v=new WeakMap,w=new WeakMap;return chunk32YOHLEK_cjs.ec({hasResolvedFont(b){return d(b)!==null},faceCovers(b,m){let F=d(m);if(!F)return;let C=w.get(F);C||(C=new Map,w.set(F,C));let T=C.get(b);if(T!==void 0)return T;let I=true;for(let P of b){let z=hr(F,P.codePointAt(0));if(z===void 0)return;if(!z){I=false;break}}return C.size<ai&&C.set(b,I),I},strikeoutMetrics(b){let m=d(b);if(!m)return;let F=v.get(m);if(F===void 0&&(F=Tr(m.bytes,m.faceIndex),v.set(m,F)),!F)return;let C=N(b)/2*chunk32YOHLEK_cjs.ra(b);return {offsetPt:F.offsetEm*C,thicknessPt:F.thicknessEm*C}},measure(b,m){if(b.length===0)return 0;let F=d(m);if(!F)return O(b,m);let C=x(F,N(m),m.smallCaps),T=m.shaping?.context,I=m.shaping?`1:${JSON.stringify(T?[m.shaping.script,m.shaping.direction,b,T.before,T.after]:[m.shaping.script,m.shaping.direction,b])}`:`0:${b}`,P=At(m,F),z=`${chunk32YOHLEK_cjs.w(m)?1:0}:${P?1:0}:${chunk32YOHLEK_cjs.O(m)}:${I}`,D=C.get(z);if(D===void 0){let M=0;try{if(m.smallCaps&&!Ke(r,i,F,m,f))return O(b,m);let U=X(r,i,F,m,b);if(U.glyphs.some(ee=>ee.id===0))return O(b,m);for(let ee of U.glyphs)M+=ee.advanceX;P&&(M+=Or(U)*(N(m)/2)*.02*i.fixedPointScale);}catch{return O(b,m)}D=M/i.fixedPointScale,h(C,z,D);}return D*chunk32YOHLEK_cjs.ra(m)*(m.horizontalScalePercent/100)+b.length*m.characterSpacingPt+E(b,m)},inkBounds(b,m){if(!b||b.length>2||m.shaping?.direction==="rtl"||chunk32YOHLEK_cjs.ya(b).length!==1)return;let F=d(m);if(!F)return a.inkBounds?.(b,m);try{if(m.smallCaps&&!Ke(r,i,F,m,f))return a.inkBounds?.(b,m);let C=X(r,i,F,m,b);return Lr(C,N(m)/2,i.fixedPointScale,chunk32YOHLEK_cjs.ra(m)*m.horizontalScalePercent/100)}catch{return}},textOutline(b,m){let F=d(m);if(!F)return a.textOutline?.(b,m);try{let C=X(r,i,F,m,b);return wt(C,N(m)/2,i.fixedPointScale)??a.textOutline?.(b,m)}catch{return a.textOutline?.(b,m)}},caretAdvances(b,m){let F=d(m);if(!F)return B(b,m);try{if(m.smallCaps&&!Ke(r,i,F,m,f))return B(b,m);let C=X(r,i,F,m,b);if(C.glyphs.some(P=>P.id===0))return B(b,m);let T=chunk32YOHLEK_cjs.bc(b,C,chunk32YOHLEK_cjs.ra(m)*(m.horizontalScalePercent/100)/i.fixedPointScale,m.characterSpacingPt,m.shaping?.wordSpacingPt??0)??chunk32YOHLEK_cjs.ac(b,C.glyphs.reduce((P,z)=>P+z.advanceX,0)*chunk32YOHLEK_cjs.ra(m)*(m.horizontalScalePercent/100)/i.fixedPointScale+b.length*m.characterSpacingPt+E(b,m));if(!T||!At(m,F))return T;let I=N(m)/2*.02*chunk32YOHLEK_cjs.ra(m)*(m.horizontalScalePercent/100);return Ar(T,C,I)}catch{return B(b,m)}},lineMetrics(b,m){let F=d(b);if(!F)return Ve(b)??a.lineMetrics(b,m);if(!m||/^[\t\n\r\f ]*$/.test(m))return u(F,b);if(l){let C=u(F,b),T=Math.max(0,C.baseline),I=Math.max(0,C.height-C.baseline);return T+I>0?{height:T+I,baseline:T}:C}try{let C=X(r,i,F,b,m),T=0,I=0;for(let P of C.fontSpans){let z=u(P.font,b);T=Math.max(T,z.baseline),I=Math.max(I,z.height-z.baseline);}if(T+I>0)return {height:T+I,baseline:T}}catch{}return u(F,b)}},S)}function si(e,t){return Mr({...t,shaper:e.shaper,environment:e.environment})}function ci(e){let{layout:t,viewport:n}=e,r=new Set;if(!n){for(let c of t.pages)r.add(c.index);return r}let o=Math.max(0,Math.trunc(e.overscanPages??1)),a=n.top+n.height,i=-1,s=-1;for(let c of t.pages){let l=c.box.y;l+c.box.height>=n.top&&l<=a&&(i===-1&&(i=c.index),s=c.index);}if(i===-1){let c=li(t,n.top);c!==null&&(i=c,s=c);}if(i!==-1){let c=Math.max(0,i-o),l=Math.min(t.pages.length-1,s+o);for(let u=c;u<=l;u+=1)r.add(u);}for(let c of e.pinnedPages??[])c>=0&&c<t.pages.length&&r.add(c);return r}function li(e,t){let n=null,r=Number.POSITIVE_INFINITY;for(let o of e.pages){let a=t<o.box.y?o.box.y-t:t>o.box.y+o.box.height?t-(o.box.y+o.box.height):0;a<r&&(r=a,n=o.index);}return n}var _r=["text-local","paragraph-local","flow-structural","global"];function Pr(e,t){return _r.indexOf(t)>_r.indexOf(e)?t:e}function ui(e){return {impact:"text-local",paragraphIds:new Set,created:new Set,deleted:new Set,dependencyKeys:new Set,structural:false,revision:e}}function di(e){let{run:t,currentRevision:n,publish:r,schedule:o}=e,a=null,i=null,s=null,c=0,l=0;function u(d){let S=e.runCooperatively;if(!S)return t(d);let x=S(d);s=x;try{for(;;){let R=x.step();if(R)return R;if(n()!==d.revision)return x.cancel(),l+=1,null;if(s!==x)return null}}finally{s===x&&(s=null);}}function y(d){let S=p(n());S.impact=Pr(S.impact,d.impact),S.structural=S.structural||d.structural;for(let x of d.paragraphIds)S.paragraphIds.add(x);for(let x of d.created)S.created.add(x);for(let x of d.deleted)S.deleted.add(x);for(let x of d.dependencyKeys)S.dependencyKeys.add(x);}let f=d=>({impact:d.impact,paragraphIds:d.paragraphIds,created:d.created,deleted:d.deleted,dependencyKeys:d.dependencyKeys,structural:d.structural,revision:d.revision});function p(d){return a||(a=ui(d)),a.revision=Math.max(a.revision,d),a}function g(){!o||i||(i=o(()=>{i=null,h();}));}function h(){i&&(i(),i=null),s&&(s.cancel(),s=null,l+=1);let d=a;if(!d)return false;a=null;let S=f(d),x=u(S);return !x||x.revision!==n()?(c+=1,y(S),g(),false):(r(x,S),true)}return {notify(d){let S=p(n());S.impact=Pr(S.impact,d.impact);for(let x of d.dirty)S.paragraphIds.add(x);for(let x of d.created)S.created.add(x),S.paragraphIds.add(x);for(let x of d.deleted)S.deleted.add(x),S.paragraphIds.add(x);for(let x of d.dependencyKeys)S.dependencyKeys.add(x);for(let x of d.splitJoin)S.structural=true,"split"in x?(S.paragraphIds.add(x.split.from),S.paragraphIds.add(x.split.tail)):(S.paragraphIds.add(x.join.kept),S.paragraphIds.add(x.join.removed));(d.impact==="flow-structural"||d.impact==="global")&&(S.structural=true),g();},invalidateAll(d,S){let x=p(d);x.impact="flow-structural",x.structural=true,S&&x.dependencyKeys.add(S),g();},flush:h,pending:()=>a?f(a):null,cancel(){i?.(),i=null,s?.cancel(),s=null,a=null;},get staleDiscards(){return c},get cancelledRuns(){return l}}}var kr=new WeakMap;function j(e){let t=kr.get(e);if(t)return t;let n=new Map,r=new Map,o=new Map,a=new Map,i=(c,l,u,y)=>{for(let f of c){if(f.kind==="paragraph")continue;let p=f.tableId;a.set(p,Math.max(a.get(p)??0,(f.columnEdges?.length??1)-1));let g=o.get(p);g||(g=new Map,o.set(p,g),n.set(p,[]),r.set(p,new Map));for(let h of f.rows){let d=g.get(h.id);d===void 0&&(d=g.size,g.set(h.id,d),r.get(p).set(d,h.cells));for(let S of h.cells)n.get(p).push({pageIndex:l,tableId:p,row:h,cell:S,rowIndex:d,isHeaderRepeat:h.isHeaderRepeat,offsetX:u,offsetY:y}),i(S.blocks,l,u,y);}}};for(let c of e.pages){i(c.fragments,c.index,0,0);for(let l of [c.header,c.footer])l&&i(l.fragments,c.index,l.box.x-c.contentBox.x,l.box.y-c.contentBox.y);for(let l of [c.footnotes,c.endnotes])if(l)for(let u of l.notes)i(u.fragments,c.index,u.box.x-c.contentBox.x,u.box.y-c.contentBox.y);}let s=new Map;for(let[c,l]of n)s.set(c,{placed:l,rows:r.get(c)??new Map,columnCount:a.get(c)??0});return kr.set(e,s),s}function Nr(e){let t=e.columnCount;for(let n of e.rows.values())for(let r of n)t=Math.max(t,ne(r).to+1);return t}var ne=e=>({from:e.gridColumn,to:e.gridColumn+Math.max(1,e.gridSpan)-1});function pi(e,t,n){if(t.tableId!==n.tableId)return null;let r=j(e).get(t.tableId);if(!r)return null;let o=Math.min(t.rowIndex,n.rowIndex),a=Math.max(t.rowIndex,n.rowIndex),i=Math.min(ne(t).from,ne(n).from),s=Math.max(ne(t).to,ne(n).to),c=p=>{let{from:g,to:h}=ne(p);return h>=i&&g<=s},l=p=>(r.rows.get(p)??[]).some(g=>g.vMergeContinue&&c(g)),u=r.rows.size+Nr(r)+2;for(let p=0;!(p>u);p+=1){let g=false;for(let[h,d]of r.rows)if(!(h<o||h>a))for(let S of d){if(!c(S))continue;let{from:x,to:R}=ne(S);x<i&&(i=x,g=true),R>s&&(s=R,g=true);}for(;o>0&&l(o);)o-=1,g=true;for(;l(a+1);)a+=1,g=true;if(!g)break}let y=[],f=new Set;for(let p of r.placed){if(p.isHeaderRepeat||p.rowIndex<o||p.rowIndex>a)continue;let{from:g,to:h}=ne(p.cell);h<i||g>s||f.has(p.cell.id)||(f.add(p.cell.id),y.push(p.cell.id));}return y.length===0?null:{kind:"cells",tableId:t.tableId,cellIds:y,rows:{from:o,to:a},columns:{from:i,to:s},text:Hr(e,t.tableId,y)}}function fi(e,t){let n=j(e).get(t);if(!n)return null;let r=[],o=new Set,a=0;for(let i of n.placed)i.isHeaderRepeat||o.has(i.cell.id)||(o.add(i.cell.id),r.push(i.cell.id),a=Math.max(a,i.rowIndex));return r.length===0?null:{kind:"cells",tableId:t,cellIds:r,rows:{from:0,to:a},columns:{from:0,to:Nr(n)-1},text:Hr(e,t,r)}}function Pc(e,t){let n=fi(e,t.tableId);if(!n)return false;let r=new Set(t.cellIds);return n.cellIds.every(o=>r.has(o))}function kc(e,t){return Dr(e,t,true)}function be(e,t){return Dr(e,t,false)}function Dr(e,t,n){let r=new Set(t),o=[],a=new Set;for(let i of j(e).values())for(let s of i.placed)if(!(s.isHeaderRepeat||!r.has(s.cell.id)))for(let c of s.cell.blocks)n&&c.kind!=="paragraph"||Re(c,o,a);return o}function Re(e,t,n){if(e.kind==="paragraph"){for(let r of chunk32YOHLEK_cjs.ab(e))n.has(r)||(n.add(r),t.push(r));return}for(let r of e.rows)if(!r.isHeaderRepeat)for(let o of r.cells)for(let a of o.blocks)Re(a,t,n);}function Hr(e,t,n){let r=be(e,n),o=r[0],a=r[r.length-1];return !o||!a?mi(e,t):{anchor:{paragraphId:o,offset:0},head:{paragraphId:a,offset:chunk32YOHLEK_cjs.Ue(e,a).length}}}function mi(e,t){let n=j(e).get(t);for(let o of n?.placed??[]){if(o.isHeaderRepeat)continue;let a=[];for(let s of o.cell.blocks)Re(s,a,new Set);let i=a[0];if(i){let s={paragraphId:i,offset:0};return {anchor:s,head:s}}}for(let o of e.pages)for(let a of chunk32YOHLEK_cjs.Ja(o)){let i={paragraphId:a.paragraphId,offset:0};return {anchor:i,head:i}}let r={paragraphId:"",offset:0};return {anchor:r,head:r}}function yi(e){let t=[...chunk32YOHLEK_cjs.Ja(e)];for(let n of [e.header,e.footer])n&&t.push(...chunk32YOHLEK_cjs.Ka(n.fragments));for(let n of [e.footnotes,e.endnotes])if(n)for(let r of n.notes)t.push(...chunk32YOHLEK_cjs.Ka(r.fragments));return t}function hi(e,t){let n=new Set(be(e,t)),r=[],o=new Set;for(let a of e.pages)for(let i of yi(a))if(n.has(i.paragraphId))for(let s of i.lines)for(let c of s.spans){let l=`${c.range.paragraphId}:${c.range.start}:${c.range.end}`;o.has(l)||(o.add(l),r.push(c));}return r}function gi(e,t){let n=new Set(t),r=[];for(let o of j(e).values())for(let a of o.placed)n.has(a.cell.id)&&r.push({pageIndex:a.pageIndex,x:a.cell.box.x+a.offsetX,y:a.cell.box.y+a.offsetY,width:a.cell.box.width,height:a.cell.box.height});return r}function Si(e,t,n=chunk32YOHLEK_cjs.Ue){let r=j(e).get(t.tableId);if(!r)return "";let o=new Set(t.cellIds),a=r.placed.some(c=>c.cell.logicalGridColumn!==void 0),i=new Map,s=new Set;for(let c of r.placed){if(c.isHeaderRepeat||!o.has(c.cell.id)||s.has(c.cell.id))continue;s.add(c.cell.id);let l=be(e,[c.cell.id]).map(f=>n(e,f)).join(`
|
|
2
|
+
`),u=i.get(c.rowIndex),y=c.cell.gridColumn+(a?Math.max(1,c.cell.gridSpan)-1:0);u?u.set(y,l):i.set(c.rowIndex,new Map([[y,l]]));}return [...i.keys()].sort((c,l)=>c-l).map(c=>{let l=i.get(c),u=[];for(let y=0;y<=t.columns.to-t.columns.from;y+=1){let f=a?t.columns.to-y:t.columns.from+y;u.push(l.get(f)??"");}return u.join(" ")}).join(`
|
|
3
|
+
`)}function It(e,t){return chunk32YOHLEK_cjs.dd(e,t)}function zc(e,t,n){if(n){let a=It(e,t);if(!a||a.tableId!==n.tableId)return null;let i=n.cellIds[0];if(!i)return null;let s=j(e).get(n.tableId);if(!s)return null;for(let c of s.placed)if(c.cell.id===i)return {tableId:n.tableId,rowId:c.row.id,cellId:i,cellIds:n.cellIds,gridColumnIndex:c.cell.logicalGridColumn??c.cell.gridColumn,isHeaderRepeat:c.isHeaderRepeat};return null}let r=It(e,t);if(!r)return null;let o=j(e).get(r.tableId);if(!o)return null;for(let a of o.placed){if(a.isHeaderRepeat)continue;let i=[];for(let s of a.cell.blocks)Re(s,i,new Set);if(i.includes(t))return {tableId:r.tableId,rowId:a.row.id,cellId:a.cell.id,cellIds:[a.cell.id],gridColumnIndex:a.cell.logicalGridColumn??a.cell.gridColumn,isHeaderRepeat:a.row.isHeaderRepeat}}return null}var zr=new WeakMap;function xi(e,t){let n=zr.get(e);if(n)return n.get(t)??null;let r=new Map;for(let[o,a]of j(e))for(let i of a.placed){if(i.isHeaderRepeat)continue;let s=[];for(let l of i.cell.blocks)Re(l,s,new Set);let c={tableId:o,rowId:i.row.id,cellId:i.cell.id,rowIndex:i.rowIndex,gridColumn:i.cell.gridColumn,gridSpan:i.cell.gridSpan};for(let l of s){let u=r.get(l);u&&u.tableId.length>=o.length||r.set(l,c);}}return zr.set(e,r),r.get(t)??null}function Nc(e,t,n){let r=xi(e,t);if(!r)return null;let o=j(e).get(r.tableId);if(!o)return null;let a=new Set;for(let l of o.placed)!l.isHeaderRepeat&&!l.cell.vMergeContinue&&l.cell.blocks.length>0&&a.add(l.cell.id);let i=[...a],s=i.indexOf(r.cellId);if(s<0)return null;let c=n==="next"?1:-1;for(let l=s+c;l>=0&&l<i.length;l+=c){let u=be(e,[i[l]]);if(u.length>0)return {cellId:i[l],paragraphIds:u}}return "end"}function bi(e,t,n){if(![e,t,n].every(Number.isFinite)||t<=0||n<=0)return {offsetPt:0,count:0};let r=Math.ceil(e/n-1e-9)*n;if(!Number.isFinite(r))return {offsetPt:0,count:0};let o=Math.max(0,r-e);return {offsetPt:o,count:Math.min(8192,Math.max(0,Math.floor((t-o)/n+1e-9)))}}exports.$=Ma;exports.A=Ft;exports.B=Vn;exports.C=Xn;exports.D=jn;exports.E=Yn;exports.F=$n;exports.G=qn;exports.H=ra;exports.I=oa;exports.J=de;exports.K=sa;exports.L=Et;exports.M=Qn;exports.N=fa;exports.O=ha;exports.P=X;exports.Q=Ke;exports.R=Lt;exports.S=bs;exports.T=ar;exports.U=Rs;exports.V=Bt;exports.W=wa;exports.X=ws;exports.Y=lr;exports.Z=ur;exports._=Ia;exports.a=dt;exports.aa=_a;exports.b=jr;exports.ba=Hs;exports.c=ie;exports.ca=Na;exports.d=ft;exports.da=wt;exports.e=Yr;exports.ea=Xe;exports.f=A;exports.fa=Mr;exports.g=mt;exports.ga=si;exports.h=gt;exports.ha=ci;exports.i=Ni;exports.ia=di;exports.j=Mn;exports.ja=pi;exports.k=_n;exports.ka=fi;exports.l=Z;exports.la=Pc;exports.m=Vo;exports.ma=kc;exports.n=Xo;exports.na=be;exports.o=qi;exports.oa=hi;exports.p=xt;exports.pa=gi;exports.q=Zi;exports.qa=Si;exports.r=jo;exports.ra=It;exports.s=$o;exports.sa=zc;exports.t=Ji;exports.ta=xi;exports.u=qo;exports.ua=Nc;exports.v=bt;exports.va=bi;exports.w=Ue;exports.x=Zo;exports.y=Jo;exports.z=Qo;
|