@docx-editor.dev/core 2.5.0 → 2.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/THIRD_PARTY_NOTICES.md +39 -1
  2. package/dist/automation.cjs +1 -1
  3. package/dist/automation.d.cts +6 -6
  4. package/dist/automation.d.ts +6 -6
  5. package/dist/automation.js +1 -1
  6. package/dist/binding.cjs +1 -1
  7. package/dist/binding.d.cts +12 -12
  8. package/dist/binding.d.ts +12 -12
  9. package/dist/binding.js +1 -1
  10. package/dist/chunk-4GQXAXTZ.js +5 -0
  11. package/dist/chunk-DGUHCJPF.cjs +18 -0
  12. package/dist/{chunk-2GSRLGUI.cjs → chunk-DY3QVCWC.cjs} +6 -6
  13. package/dist/{chunk-45FL7KH4.js → chunk-E7BXJ4BF.js} +1 -1
  14. package/dist/chunk-F7Z6PWAZ.cjs +2 -0
  15. package/dist/chunk-JEMP5YI5.cjs +15 -0
  16. package/dist/{chunk-3FRSOOND.cjs → chunk-JZXK4DKV.cjs} +1 -1
  17. package/dist/chunk-NIGGABAA.js +15 -0
  18. package/dist/chunk-OPKOTVQQ.js +18 -0
  19. package/dist/{chunk-GOEBQ26R.js → chunk-PSZH2VXP.js} +1 -1
  20. package/dist/{chunk-LJIX4ZDF.js → chunk-R75OLPL6.js} +6 -6
  21. package/dist/{chunk-JDHTCMFA.cjs → chunk-SFMAIFEN.cjs} +1 -1
  22. package/dist/chunk-SKWYEZCO.cjs +5 -0
  23. package/dist/{chunk-YTZIGUXT.js → chunk-SMRD66T5.js} +1 -1
  24. package/dist/chunk-WAVN7MAT.js +2 -0
  25. package/dist/chunk-WU7PUTVA.js +2 -0
  26. package/dist/{chunk-OHJQ7GPZ.cjs → chunk-YMYCPY5Y.cjs} +1 -1
  27. package/dist/{content-control-walk-BeAFh6Xi.d.cts → content-control-walk-CbTqHq6O.d.cts} +1 -1
  28. package/dist/{content-control-walk-CQp8l6eS.d.ts → content-control-walk-D06GijR0.d.ts} +1 -1
  29. package/dist/contracts/editor.cjs +1 -1
  30. package/dist/contracts/editor.d.cts +10 -10
  31. package/dist/contracts/editor.d.ts +10 -10
  32. package/dist/contracts/editor.js +1 -1
  33. package/dist/contracts/interaction.d.cts +9 -9
  34. package/dist/contracts/interaction.d.ts +9 -9
  35. package/dist/contracts/modules.d.cts +5 -5
  36. package/dist/contracts/modules.d.ts +5 -5
  37. package/dist/contracts/types.d.cts +3 -1
  38. package/dist/contracts/types.d.ts +3 -1
  39. package/dist/{custom-node-writes-CIC_-wad.d.cts → custom-node-writes-D9G3GKQ7.d.cts} +7 -7
  40. package/dist/{custom-node-writes-2clI36T9.d.ts → custom-node-writes-tJw8U9MO.d.ts} +7 -7
  41. package/dist/dist-YFULGVS3.js +2 -0
  42. package/dist/{editor-CUul9IuY.d.cts → editor-BZEJL3vv.d.cts} +33 -19
  43. package/dist/{editor-DIwctMcU.d.ts → editor-D2zOJztO.d.ts} +33 -19
  44. package/dist/editor.cjs +1 -1
  45. package/dist/editor.css +375 -38
  46. package/dist/editor.d.cts +42 -26
  47. package/dist/editor.d.ts +42 -26
  48. package/dist/editor.js +1 -1
  49. package/dist/harfbuzz.wasm +0 -0
  50. package/dist/{hf-references-CAp1xTv6.d.ts → hf-references-BdjsQNE_.d.ts} +2 -2
  51. package/dist/{hf-references-BPET4tlK.d.cts → hf-references-CgEOSw3i.d.cts} +2 -2
  52. package/dist/{image-resources-CSlQmPIm.d.cts → image-resources-BaHz4QAd.d.cts} +10 -10
  53. package/dist/{image-resources-e13t-pgy.d.ts → image-resources-Cl5_cNi9.d.ts} +10 -10
  54. package/dist/{index-BUsYjxF5.d.ts → index-D8L8WrNF.d.ts} +111 -21
  55. package/dist/{index-8t44iXTY.d.cts → index-_xF7n_z0.d.cts} +111 -21
  56. package/dist/index.cjs +1 -1
  57. package/dist/index.d.cts +20 -20
  58. package/dist/index.d.ts +20 -20
  59. package/dist/index.js +1 -1
  60. package/dist/layout.cjs +1 -1
  61. package/dist/layout.d.cts +71 -23
  62. package/dist/layout.d.ts +71 -23
  63. package/dist/layout.js +1 -1
  64. package/dist/node-module-shim-TTKTT66I.js +1 -0
  65. package/dist/{note-nodes-CZQXU6Fg.d.ts → note-nodes-BPSTVDMr.d.ts} +1 -1
  66. package/dist/{note-nodes-B2wWES2L.d.cts → note-nodes-C6DLxlvj.d.cts} +1 -1
  67. package/dist/{ooxml-package-Cmbe_M04.d.cts → ooxml-package-CR5us6ad.d.cts} +115 -115
  68. package/dist/{ooxml-package-BrxTmTsZ.d.ts → ooxml-package-D_CtywTW.d.ts} +115 -115
  69. package/dist/{ooxml-tree-CG0odFyi.d.cts → ooxml-tree-BU0e3DVi.d.cts} +1 -1
  70. package/dist/{ooxml-tree-CG0odFyi.d.ts → ooxml-tree-BU0e3DVi.d.ts} +1 -1
  71. package/dist/output.cjs +1 -1
  72. package/dist/output.d.cts +22 -8
  73. package/dist/output.d.ts +22 -8
  74. package/dist/output.js +1 -1
  75. package/dist/{protocol-B5oSt08P.d.cts → protocol-CD7slqvl.d.cts} +2 -2
  76. package/dist/{protocol-ooK7PAXz.d.ts → protocol-DsbfgBwA.d.ts} +2 -2
  77. package/dist/{note-properties-Dhqkro--.d.cts → review-reads-Dr0CpW6u.d.cts} +67 -67
  78. package/dist/{note-properties-BS66XmcC.d.ts → review-reads-HDvoQXK2.d.ts} +67 -67
  79. package/dist/{review-support-Bl9sN8cv.d.ts → review-support-D4ZBdUXa.d.ts} +2 -2
  80. package/dist/{review-support-CHuJxHmz.d.cts → review-support-T-riLz4Y.d.cts} +2 -2
  81. package/dist/{revision-projection-u4nT52xT.d.ts → revision-projection-UKqvPa4-.d.ts} +1 -1
  82. package/dist/{revision-projection-DRZMzoLD.d.cts → revision-projection-WzlQGBJx.d.cts} +1 -1
  83. package/dist/{semantic-cell-selection-Dc-_enhm.d.ts → semantic-cell-selection-B5vfPz4Q.d.ts} +4 -4
  84. package/dist/{semantic-cell-selection-CdNQ-a9-.d.cts → semantic-cell-selection-BTQFpN0S.d.cts} +4 -4
  85. package/dist/{semantic-interaction-DgaWs-5w.d.cts → semantic-interaction-CDNEU_Tx.d.cts} +1 -1
  86. package/dist/{semantic-interaction-CCVwyw2A.d.ts → semantic-interaction-lvpzZRpA.d.ts} +1 -1
  87. package/dist/{semantic-paint-6iIB4fhx.d.cts → semantic-paint-BBPL3u5w.d.ts} +111 -3
  88. package/dist/{semantic-paint-CKIbFkQ7.d.ts → semantic-paint-IjbL-4CT.d.cts} +111 -3
  89. package/dist/{semantic-records-B-qbrnp2.d.ts → semantic-records-CdQvpUj1.d.ts} +4 -4
  90. package/dist/{semantic-records-Dq8SlCY8.d.cts → semantic-records-DEOs3_tE.d.cts} +4 -4
  91. package/dist/{shaped-measurer-Dx4llNhK.d.cts → shaped-measurer-C2SJAjV0.d.cts} +1 -1
  92. package/dist/{shaped-measurer-BT4FqYe9.d.ts → shaped-measurer-l4o5ITJ0.d.ts} +1 -1
  93. package/dist/store.cjs +1 -1
  94. package/dist/store.d.cts +238 -238
  95. package/dist/store.d.ts +238 -238
  96. package/dist/store.js +1 -1
  97. package/dist/{tree-op-types-DOYNkKqD.d.cts → tree-op-types-CUCwPWjT.d.cts} +219 -219
  98. package/dist/{tree-op-types-CZw9QhWX.d.ts → tree-op-types-D0fTNBVW.d.ts} +219 -219
  99. package/dist/{tree-session-CF_EOhTW.d.ts → tree-session-CH1oA75f.d.ts} +61 -45
  100. package/dist/{tree-session-CtK3KgFU.d.cts → tree-session-b7bggR-S.d.cts} +61 -45
  101. package/dist/{tree-store-Jg-q7fyf.d.cts → tree-store-BqgeCa1Q.d.cts} +3 -3
  102. package/dist/{tree-store-9TaX-L0V.d.ts → tree-store-CIKASRHk.d.ts} +3 -3
  103. package/licenses/HarfBuzz-COPYING.txt +42 -0
  104. package/package.json +5 -3
  105. package/dist/chunk-2QIA75K3.js +0 -2
  106. package/dist/chunk-32NXPFYL.js +0 -5
  107. package/dist/chunk-3C533HSQ.cjs +0 -18
  108. package/dist/chunk-7GYF33B5.cjs +0 -2
  109. package/dist/chunk-H3DZP4LE.cjs +0 -5
  110. package/dist/chunk-L2GMLEHX.cjs +0 -14
  111. package/dist/chunk-QUZM6LWQ.js +0 -14
  112. package/dist/chunk-T252F4US.js +0 -18
@@ -0,0 +1,2 @@
1
+ import {pd,S,U as U$1,Da,gb,hb,gc,qb,bb,jb,pb}from'./chunk-OPKOTVQQ.js';var L=8,je=["color","background","spanClassName","avatarUrl"],We=["color","background","spanClassName"],Ve=new Set(["http","https","data","blob"]),Xe=/^([a-zA-Z][a-zA-Z0-9+.-]*):/;function Ye(t){let e=t.replace(/[\u0000-\u0020\u007f]/g,"");if(e.length===0)return;let n=Xe.exec(e);if(n)return !Ve.has(n[1].toLowerCase())||/^data:/i.test(e)&&!/^data:image\/(?!svg)/i.test(e)?void 0:e;let o=r=>e[r]==="/"||e[r]==="\\";return o(0)&&o(1)?void 0:e}function Ze(t){if(typeof t=="string")return t.length>0?{color:t}:null;if(t===null||typeof t!="object")return null;let e={},n=Object.prototype.hasOwnProperty;for(let o of je){if(!n.call(t,o))continue;let r=t[o];if(!(typeof r!="string"||r.length===0)){if(o==="avatarUrl"){let a=Ye(r);a!==void 0&&(e.avatarUrl=a);continue}e[o]=r;}}return Object.keys(e).length>0?e:null}function U(t){return `var(--doc-review-author-${t%L})`}function de(t){let e=new Map;if(t===void 0||t==="kind"||t==="author")return e;for(let[n,o]of Object.entries(t.authors)){let r=Ze(o);r&&e.set(n,r);}return e}function en(t,e){let n=de(e);return [...t].map(([o,r])=>{let a=n.get(o);return {author:o,slot:r,color:a?.color??U(r),...a?{style:a}:{}}})}var qe=128;function O(t,e,n=qe){let o=e.length<n?e.length:n,r=t;for(let a=0;a<o;a+=1)r=Math.imul(r^e.charCodeAt(a),16777619);return Math.imul(r^e.length,16777619)}function Je(t,e,n){let o=O(2166136261,n);for(let r of t.keys())o=O(o,r);for(let[r,a]of e){o=O(o,r);for(let i of We)o=O(o,a[i]??"",1/0);}return `${t.size}.${e.size}.${(o>>>0).toString(36)}`}function ce(t){return t===null?"kind":t.key}var G=new WeakMap;function ye(t,e){if(t==="kind")return null;let n=G.get(e);if(n&&n.option===t)return n.context;let o=de(t),r=t===void 0||t==="author"?"author":t.others??"author";if(o.size===0&&r==="kind")return G.set(e,{option:t,context:null}),null;let a=et(e),i=new Map;for(let[l,d]of o){if(!d.spanClassName)continue;let c=d.spanClassName.split(/\s+/).filter(u=>u.length>0);c.length>0&&i.set(l,c);}let s={authorSlots:a,styles:o,classTokens:i,others:r,key:Je(a,o,r)};return G.set(e,{option:t,context:s}),s}var se=new WeakMap;function Qe(t){let e=se.get(t);if(e)return e;let n=[],o=new Set,r=a=>{a===""||o.has(a)||(o.add(a),n.push(a));};for(let a of S(t)){for(let s of a.lines)for(let l of s.spans){let d=l.revisions;if(d!==void 0)for(let c=0;c<d.length;c+=1)r(d[c].author);for(let c of l.props){if(c.localName!=="rPrChange"&&c.localName!=="pPrChange")continue;let u=c.attributes?.author;r(u??"");break}}let i=a.markRevisions;if(i)for(let s=0;s<i.length;s+=1)r(i[s].author);}return se.set(t,n),n}var le=new WeakMap;function et(t){let e=le.get(t);if(e)return e;let n=new Map,o=r=>{for(let a of Qe(r))n.has(a)||n.set(a,n.size);};for(let r of t.pages){o(r.fragments),r.header&&o(r.header.fragments),r.footer&&o(r.footer.fragments);for(let a of [r.footnotes,r.endnotes])if(a){a.separator&&o(a.separator.fragments);for(let i of a.notes)o(i.fragments);}for(let a of [r.anchoredDrawings,r.header?.anchoredDrawings,r.footer?.anchoredDrawings])if(a)for(let i of a)i.textboxStory&&o(i.textboxStory.fragments);}return le.set(t,n),n}function tn(t,e){let n=null;for(let o of e)o===""||t.has(o)||(n===null&&(n=new Map(t)),n.has(o)||n.set(o,n.size));return n??t}function ue(t,e,n){if(t===void 0||t.length===0)return null;let o=t[t.length-1],r=t.some(s=>s.kind==="delete"||s.kind==="moveFrom"),a=o.kind,i=a==="delete"||a==="moveFrom"?"line-through":a==="insert"||a==="moveTo"?"underline":null;return {attribution:o,line:r&&i==="underline"?"line-through":i,decorationStyle:a==="moveFrom"||a==="moveTo"?"double":a==="insert"?"dashed":"solid",color:r?"var(--doc-revision-deletion)":"var(--doc-revision-insertion)",authorColor:n?.get(o.author)?.color??U(e?.get(o.author)??0),deleted:r}}function he(t,e,n,o,r,a){for(let i of [n.footnotes,n.endnotes])i&&e.append(tt(t,n,i,o,r,a));}function tt(t,e,n,o,r,a){let i=t.createElement("div");if(i.className="docx-notes",i.dataset.docxNotes=n.kind,i.dataset.docxNotesPlacement=n.placement,i.style.position="absolute",i.style.left=`${(n.box.x-e.box.x)*o.scale}px`,i.style.top=`${(n.box.y-e.box.y)*o.scale}px`,i.style.width=`${n.box.width*o.scale}px`,i.style.height=`${n.box.height*o.scale}px`,n.separator){let s=t.createElement("div");s.className="docx-note-separator",s.dataset.docxNoteSeparator=n.separator.kind,s.setAttribute("contenteditable","false"),s.setAttribute("aria-hidden","true"),s.style.position="absolute",s.style.left=`${(n.separator.box.x-n.box.x)*o.scale}px`,s.style.top=`${(n.separator.box.y-n.box.y)*o.scale}px`,s.style.width=`${n.separator.box.width*o.scale}px`,s.style.height=`${Math.max(n.separator.box.height,.75)*o.scale}px`;let l=n.separator.ruleStyle;if(l||n.separator.synthetic||n.separator.fragments.length===0)nt(s,t,l??"single",o.scale);else for(let d of n.separator.fragments)s.append(d.kind==="table"?a(t,d,o):r(t,d,o));i.append(s);}for(let s of n.notes){let l=t.createElement("div");l.className="docx-note",l.dataset.docxNote=s.noteKind,l.dataset.docxNoteId=String(s.noteId),l.dataset.docxNoteScope=s.scopeId,s.mark!==null&&(l.dataset.docxNoteMark=s.mark),s.continuation&&(l.dataset.docxNoteContinuation=""),l.setAttribute("role","doc-footnote"),l.style.position="absolute",l.style.left=`${(s.box.x-n.box.x)*o.scale}px`,l.style.top=`${(s.box.y-n.box.y)*o.scale}px`,l.style.width=`${s.box.width*o.scale}px`,l.style.height=`${s.box.height*o.scale}px`;for(let d of s.fragments)l.append(d.kind==="table"?a(t,d,o):r(t,d,o));i.append(l);}return i}function nt(t,e,n,o){t.dataset.docxNoteRule=n;let r=Math.max(1,o*.75);if(n==="single"){t.style.borderTop=`${r}px solid currentColor`,t.style.opacity="0.85";return}t.style.opacity="0.85";let a=Math.max(1,o*1.25);for(let i of [0,r+a]){let s=e.createElement("div");s.setAttribute("aria-hidden","true"),s.style.position="absolute",s.style.left="0",s.style.right="0",s.style.top=`${i}px`,s.style.height="0",s.style.borderTop=`${r}px solid currentColor`,t.append(s);}}var pe=Object.freeze({"image/svg+xml":"SVG","image/tiff":"TIFF","image/x-emf":"EMF","image/x-wmf":"WMF",unknown:"Unknown"}),z=new WeakMap,j=new WeakMap,ot=256;function fe(t,e){let n=z.get(t);if(n)return n;let o=new Map,r=new Map;return n=Object.freeze({urlForReady(a,i){let s=o.get(a.resourceKey);if(s)return s;let l=e.create(a,i);return o.set(a.resourceKey,l),l},imageFor(a,i,s){let l=r.get(a);if(l&&l.resourceKey===i)return l.element;let d=s.createElement("img");return r.size<ot&&r.set(a,{element:d,resourceKey:i,...l?.readyElement?{readyElement:l.readyElement}:{}}),d},imageForPending(a){return r.get(a)?.element??null},readyElementFor(a){return r.get(a)?.readyElement??null},rememberReadyElement(a,i){let s=r.get(a);s&&r.set(a,{...s,readyElement:i});},reconcile(a,i){for(let[s,l]of o)a.has(s)||(e.revoke(l),o.delete(s));for(let[s,l]of r)i.has(s)||(l.element.removeAttribute("src"),r.delete(s));},revokeAll(){for(let a of o.values())e.revoke(a);o.clear();for(let a of r.values())a.element.removeAttribute("src");r.clear();}}),z.set(t,n),n}function W(t,e){return `${e.paintInstance??""}|${t.drawingNodeId}`}function sn(t){z.get(t)?.revokeAll(),z.delete(t);}function w(t){return Number.isFinite(t)?String(t):"0"}function xe(t,e){if(t.length<3||e.width<=0||e.height<=0)return null;let n=[];for(let o of t){if(!Number.isFinite(o.x)||!Number.isFinite(o.y))return null;let r=(o.x-e.x)/e.width*100,a=(o.y-e.y)/e.height*100;n.push(`${w(r)}% ${w(a)}%`);}return `polygon(${n.join(", ")})`}function be(t){let e=t.geometry.contentBounds;return pb({transform:t.transform,contentWidth:e.width,contentHeight:e.height})}function me(t){let{effects:e}=t,n=[];if(e.grayscale&&n.push("grayscale(1)"),e.brightness!==0&&Number.isFinite(e.brightness)){let o=1+e.brightness/100;Number.isFinite(o)&&n.push(`brightness(${w(Math.max(0,o))})`);}if(e.contrast!==0&&Number.isFinite(e.contrast)){let o=1+e.contrast/100;Number.isFinite(o)&&n.push(`contrast(${w(Math.max(0,o))})`);}return n.length>0?n.join(" "):void 0}function ve(t,e){let{crop:n}=t,o=Math.max(0,Math.min(1,n.left)),r=Math.max(0,Math.min(1,n.top)),a=Math.max(0,Math.min(1,n.right)),i=Math.max(0,Math.min(1,n.bottom)),s=Math.max(1e-4,1-o-a),l=Math.max(1e-4,1-r-i);return Object.freeze({width:`${w(1/s*100)}%`,height:`${w(1/l*100)}%`,left:`${w(-o/s*100)}%`,top:`${w(-r/l*100)}%`})}function rt(t,e){let{resource:n}=t;switch(n.kind){case "external":return e.externalResource;case "missing":return e.missingResource;case "pending":return e.pendingResource;case "unrenderable":switch(n.reason){case "unsupported-format":return e.unsupportedFormat(pe[n.mime]??pe.unknown);case "non-picture-graphic":return e.nonPictureGraphic(t.placeholderGraphicKind??"graphic");case "signature-mismatch":return e.contentMismatch;case "decode-failed":return e.decodeFailed;case "resource-limit":return e.resourceLimit;default:return e.invalidResource}default:return e.invalidResource}}function I(t,e,n){let{accessibility:o}=e;o.hidden||(t.setAttribute("role",n?"link":"img"),o.label?t.setAttribute("aria-label",o.label):n||t.setAttribute("aria-hidden","true"));}function C(t,e,n,o){let r=o?.x??0,a=o?.y??0;t.style.position="absolute",t.style.left=`${(e.x-r)*n}px`,t.style.top=`${(e.y-a)*n}px`,t.style.width=`${e.width*n}px`,t.style.height=`${e.height*n}px`,t.style.boxSizing="border-box",t.style.overflow="hidden",t.style.pointerEvents="auto";}function at(t,e,n,o,r){let a=t.paintBounds,i=t.geometry.contentBounds,s=ve(t);return [o,n.scale,r?.x??0,r?.y??0,a.x,a.y,a.width,a.height,i.x,i.y,i.width,i.height,xe(t.geometry.clipPolygon??[],a)??"",me(t)??"",be(t)??"",s.width,s.height,s.left,s.top,n.inertLinks?"":t.hyperlinkHref??"",t.accessibility.label??""].join("|")}function M(t,e,n,o){let r=t.createElement("div");r.className="docx-drawing docx-drawing-placeholder",r.dataset.drawingNodeId=e.drawingNodeId,C(r,e.paintBounds,n.scale,o);let a=t.createElement("div");a.className="docx-drawing-placeholder-card";let i=t.createElement("span");return i.className="docx-drawing-placeholder-label",i.textContent=rt(e,n.strings),a.append(i),r.append(a),e.hyperlinkHref&&!n.inertLinks?(r.dataset.docxDrawingLink=e.drawingNodeId,r.dataset.docxDrawingLinkKind="external",r.dataset.docxDrawingLinkHref=e.hyperlinkHref,r.setAttribute("tabindex","-1"),I(r,e,true)):I(r,e,false),r}function it(t,e,n,o,r,a){let i=e.resource;if(i.kind!=="ready")return M(t,e,n,a);let s=W(e,n),l=r?.readyElementFor?.(s)??t.createElement("div"),d=at(e,i,n,o,a);if(j.get(l)===d)return l;l.className="docx-drawing docx-drawing-ready",l.style.cssText="",l.dataset.drawingNodeId=e.drawingNodeId,delete l.dataset.docxDrawingLink,delete l.dataset.docxDrawingLinkKind,delete l.dataset.docxDrawingLinkHref,l.removeAttribute("aria-hidden"),l.removeAttribute("aria-label"),l.removeAttribute("role"),l.removeAttribute("tabindex"),C(l,e.paintBounds,n.scale,a);let c=xe(e.geometry.clipPolygon??[],e.paintBounds);c&&(l.style.clipPath=c);let u=t.createElement("div");u.className="docx-drawing-image-frame",u.style.position="absolute";let y=e.geometry.contentBounds,x=e.paintBounds;u.style.left=`${(y.x-x.x)*n.scale}px`,u.style.top=`${(y.y-x.y)*n.scale}px`,u.style.width=`${y.width*n.scale}px`,u.style.height=`${y.height*n.scale}px`;let h=me(e);h&&(u.style.filter=h);let g=t.createElement("div");g.className="docx-drawing-transform-stage",g.style.position="relative",g.style.width="100%",g.style.height="100%";let k=be(e);k&&(g.style.transform=k,g.style.transformOrigin="0 0");let S=t.createElement("div");S.className="docx-drawing-crop-viewport",S.style.position="relative",S.style.width="100%",S.style.height="100%",S.style.overflow="hidden";let m=r?.imageFor?.(s,i.resourceKey,t)??t.createElement("img");m.className="docx-drawing-image",m.setAttribute("draggable","false"),m.getAttribute("src")!==o&&m.setAttribute("src",o),m.setAttribute("alt","");let A=ve(e);return m.style.position="absolute",m.style.width=A.width,m.style.height=A.height,m.style.left=A.left,m.style.top=A.top,m.style.maxWidth="none",m.style.maxHeight="none",S.append(m),g.append(S),u.append(g),l.replaceChildren(u),e.hyperlinkHref&&!n.inertLinks?(l.dataset.docxDrawingLink=e.drawingNodeId,l.dataset.docxDrawingLinkKind="external",l.dataset.docxDrawingLinkHref=e.hyperlinkHref,l.setAttribute("tabindex","-1"),I(l,e,true)):I(l,e,false),r?.rememberReadyElement?.(s,l),j.set(l,d),l}var ge="http://www.w3.org/2000/svg";function st(t,e,n,o){let r=e.vectorShape,a=t.createElement("div");a.className="docx-drawing docx-drawing-shape",a.dataset.drawingNodeId=e.drawingNodeId,C(a,e.paintBounds,n.scale,o);let i=e.geometry.contentBounds,s=e.paintBounds,l=t.createElement("div");l.className="docx-drawing-image-frame",l.style.position="absolute",l.style.left=`${(i.x-s.x)*n.scale}px`,l.style.top=`${(i.y-s.y)*n.scale}px`,l.style.width=`${i.width*n.scale}px`,l.style.height=`${i.height*n.scale}px`;let d=t.createElementNS(ge,"svg");d.setAttribute("viewBox",`0 0 ${w(Math.max(1,r.extentEmu.cx))} ${w(Math.max(1,r.extentEmu.cy))}`),d.setAttribute("preserveAspectRatio","none"),d.setAttribute("width","100%"),d.setAttribute("height","100%"),d.style.display="block";let c=t.createElementNS(ge,"path"),u=r.subpathsEmu.map(y=>`M${y.map(x=>`${w(x.x)} ${w(x.y)}`).join("L")}Z`).join("");return c.setAttribute("d",u),c.setAttribute("fill",r.fillHex!==null?`#${r.fillHex}`:"none"),c.setAttribute("fill-rule","evenodd"),r.strokeHex!==null&&(c.setAttribute("stroke",`#${r.strokeHex}`),c.setAttribute("stroke-width",w(Math.max(1,r.strokeWidthEmu)))),d.append(c),l.append(d),a.append(l),e.hyperlinkHref&&!n.inertLinks?(a.dataset.docxDrawingLink=e.drawingNodeId,a.dataset.docxDrawingLinkKind="external",a.dataset.docxDrawingLinkHref=e.hyperlinkHref,a.setAttribute("tabindex","-1"),I(a,e,true)):I(a,e,false),a}function lt(t,e,n,o,r){let a=o.scale,i=t.createElement("div");i.className="docx-drawing docx-drawing-textbox",i.dataset.drawingNodeId=e.drawingNodeId,i.setAttribute("contenteditable","false"),C(i,e.paintBounds,o.scale,r),i.style.overflow="hidden";let s=(e.x-e.paintBounds.x)*a,l=(e.y-e.paintBounds.y)*a;if(n.fillHex!==null||n.strokeHex!==null){let c=t.createElement("div");c.className="docx-drawing-textbox-box",c.style.position="absolute",c.style.left=`${s}px`,c.style.top=`${l}px`,c.style.width=`${e.width*a}px`,c.style.height=`${e.height*a}px`,c.style.boxSizing="border-box",n.fillHex!==null&&(c.style.backgroundColor=`#${n.fillHex}`),n.strokeHex!==null&&(c.style.border=`${Math.max(n.strokeWidthPt*a,.5)}px solid #${n.strokeHex}`),i.append(c);}let d=t.createElement("div");d.className="docx-drawing-textbox-content",d.style.position="absolute",d.style.left=`${s+n.contentOffset.x*a}px`,d.style.top=`${l+n.contentOffset.y*a}px`,d.style.width=`${n.contentWidth*a}px`,d.style.height=`${Math.max(0,n.contentHeight)*a}px`,d.style.overflow="hidden";for(let c of n.fragments)d.append(o.paintStoryFragment(t,c));for(let c of d.querySelectorAll("[data-paragraph-id]"))delete c.dataset.paragraphId;return i.append(d),I(i,e,false),i}function Re(t,e,n,o,r){if(e.accessibility.hidden||e.paintBounds.width<=0||e.paintBounds.height<=0)return null;if(e.kind==="anchoredDrawing"&&e.textboxStory!==void 0&&n.paintStoryFragment!==void 0)return lt(t,e,e.textboxStory,n,r);if(e.vectorShape&&e.vectorShape.subpathsEmu.length>0)return st(t,e,n,r);let{resource:a}=e;if(a.kind==="ready"){if(!n.imageUrlPort||!o)return M(t,e,n,r);let i=o.urlForReady(a.validatedHandle,a.mime);return i?it(t,e,n,i,o,r):M(t,e,n,r)}if(a.kind==="pending"){let i=o?.readyElementFor?.(W(e,n))??o?.imageForPending?.(W(e,n))?.closest(".docx-drawing-ready");return i?(j.delete(i),i.dataset.drawingNodeId=e.drawingNodeId,C(i,e.paintBounds,n.scale,r),i):M(t,e,n,r)}return M(t,e,n,r)}function Se(t,e,n,o,r){let a=[];for(let i of e.drawings??[]){let s=Re(t,i,n,o,r);s&&a.push(s);}return Object.freeze(a)}function we(t,e,n,o,r,a){let i=[];for(let s of e){if(qb(s)!==n)continue;let l=Re(t,s,o,r,a);l&&(l.dataset.drawingLayer=n,i.push(l));}return Object.freeze(i)}function Ae(t){let e=new Set,n=i=>{i.resource.kind==="ready"&&e.add(i.resource.resourceKey);},o=i=>{for(let s of i.drawings??[])n(s);},r=i=>{for(let s of i.lines)o(s);},a=i=>{if(i.kind==="table"){for(let s of i.rows)for(let l of s.cells)for(let d of l.blocks)a(d);return}r(i);};for(let i of t.pages){for(let s of i.anchoredDrawings??[])n(s);for(let s of i.fragments)a(s);for(let s of [i.header,i.footer])if(s){for(let l of s.anchoredDrawings??[])n(l);for(let l of s.fragments)a(l);}}return e}function ke(t){let e=new Set,n=(r,a)=>{e.add(`p${r}|${a.drawingNodeId}`);},o=(r,a)=>{if(a.kind==="table"){for(let i of a.rows)for(let s of i.cells)for(let l of s.blocks)o(r,l);return}for(let i of a.lines)for(let s of i.drawings??[])n(r,s);};for(let r of t.pages){for(let a of r.anchoredDrawings??[])n(r.index,a);for(let a of r.fragments)o(r.index,a);for(let a of [r.header,r.footer])if(a){for(let i of a.anchoredDrawings??[])n(r.index,i);for(let i of a.fragments)o(r.index,i);}}return e}function $e(t){return [t.missingResource,t.externalResource,t.invalidResource,t.contentMismatch,t.decodeFailed,t.resourceLimit,t.pendingResource,t.unsupportedFormat("probe"),t.nonPictureGraphic("probe")].join("\0")}var V=Object.freeze({unsupportedFormat:t=>`Unsupported image format (${t})`,nonPictureGraphic:t=>`Unsupported graphic (${t})`,missingResource:"Image missing",externalResource:"External image not loaded",invalidResource:"Invalid image",contentMismatch:"Image content does not match its type",decodeFailed:"Image could not be decoded",resourceLimit:"Image exceeds size limits",pendingResource:"Loading image"});function ln(t){return Object.freeze({unsupportedFormat:e=>t("image.unsupportedFormat",{format:e}),nonPictureGraphic:e=>t("image.nonPictureGraphic",{kind:e}),missingResource:t("image.missingResource"),externalResource:t("image.externalResource"),invalidResource:t("image.invalidResource"),contentMismatch:t("image.contentMismatch"),decodeFailed:t("image.decodeFailed"),resourceLimit:t("image.resourceLimit"),pendingResource:t("image.pendingResource")})}var dt=/^[0-9A-Fa-f]{6}$/;function ct(t){switch(t){case "dashed":return "dashed";case "dotted":return "dotted";case "double":case "triple":return "solid";default:return "solid"}}function Ee(t){return t&&dt.test(t)?t:"000000"}function X(t,e){let n=t.createElement("div");return n.className=e,n.setAttribute("aria-hidden","true"),n.setAttribute("contenteditable","false"),n.style.position="absolute",n.style.left="0",n.style.top="0",n.style.right="0",n.style.bottom="0",n.style.overflow="visible",n.style.pointerEvents="none",n.style.boxSizing="border-box",n}function _(t,e,n,o){if(!n)return;let r=`#${Ee(n.color)}`,a=`${Math.max(0,n.widthPt*o)}px`;if(t.style[`border${e}Width`]=a,t.style[`border${e}Color`]=r,n.style==="double"||n.style==="triple"){t.style[`border${e}Style`]="none";return}t.style[`border${e}Style`]=ct(n.style);}function Y(t,e,n,o,r){let a=t.createElement("div");a.className=r,a.dataset.edge=n.side,a.dataset.stroke=n.role,a.style.position="absolute",a.style.left=`${n.x*o}px`,a.style.top=`${n.y*o}px`,a.style.width=`${n.width*o}px`,a.style.height=`${n.height*o}px`,a.style.pointerEvents="none",a.style.backgroundColor=`#${Ee(n.color)}`,n.cssStyle!=="solid"&&(a.dataset.cssStyle=n.cssStyle),e.append(a);}function yt(t){let e=new Set;for(let n of t)e.add(`${n.side}\0${n.role}`);return e}function ut(t,e,n,o){let r=yt(n),a=y=>r.has(`${y}\0middle`),i=X(t,"docx-table-border-double"),s=X(t,"docx-table-border-triple"),l=X(t,"docx-table-border-edge"),d=false,c=false,u=false;for(let y of n){if(y.role==="edge"){u=true,Y(t,l,y,o,"docx-table-border-edge-stroke");continue}if(a(y.side)){c=true,Y(t,s,y,o,"docx-table-border-triple-stroke");continue}(y.role==="outer"||y.role==="inner")&&(d=true,Y(t,i,y,o,"docx-table-border-double-stroke"));}d&&e.append(i),c&&e.append(s),u&&e.append(l);}function Pe(t,e,n,o){_(e,"Top",n?.top,o),_(e,"Right",n?.right,o),_(e,"Bottom",n?.bottom,o),_(e,"Left",n?.left,o),n?.strokes&&n.strokes.length>0&&ut(t,e,n.strokes,o);}var Z="when-selected",De=new WeakMap,Le=0;function ht(t){let e=De.get(t);return e||(Le+=1,e=`alias${Le}`,De.set(t,e)),e}function Be(t){return {...t,drawingStrings:t.drawingStrings??V,urlRegistry:t.urlRegistry??null}}function pt(t){let e={...t,inertLinks:true};return Object.freeze({scale:t.scale,strings:t.drawingStrings,...t.imageUrlPort?{imageUrlPort:t.imageUrlPort}:{},...t.inertLinks?{inertLinks:true}:{},...t.paintInstance?{paintInstance:t.paintInstance}:{},paintStoryFragment:(n,o)=>o.kind==="table"?H(n,o,e):F(n,o,e)})}function Oe(t){return Object.freeze({ctx:pt(t),urlRegistry:t.urlRegistry})}function Ie(t,e,n,o,r,a){K(t,e,U$1(n),o,r,a);}function K(t,e,n,o,r,a,i=true){if(n.length===0)return;let s=Oe(o),l=t.createElement("div");l.className=a==="behind"?"docx-drawing-layer docx-drawing-layer-behind":"docx-drawing-layer docx-drawing-layer-front",l.style.position="absolute",l.style.inset="0",l.style.pointerEvents="none";for(let d of we(t,n,a,s.ctx,s.urlRegistry,r)){if(d.style.pointerEvents=i?"auto":"none",!i)for(let c of d.querySelectorAll(".docx-drawing"))c.style.pointerEvents="none";l.append(d);}l.childElementCount>0&&e.append(l);}function Ue(t){return t.horizontalFrame==="page"||t.verticalFrame==="page"}function ze(t,e,n){let o=e.paintBounds,r=e.horizontalFrame==="page"?n.x+(o.x-e.horizontalFrameOrigin):t.box.x+o.x,a=e.verticalFrame==="page"?n.y+(o.y-e.verticalFrameOrigin):t.box.y+o.y,i=r-o.x,s=a-o.y,l=d=>Object.freeze({x:d.x+i,y:d.y+s,width:d.width,height:d.height});return Object.freeze({...e,x:e.x+i,y:e.y+s,paintBounds:l(o),hitBounds:l(e.hitBounds),geometry:Object.freeze({...e.geometry,contentBounds:l(e.geometry.contentBounds),paintBounds:l(e.geometry.paintBounds),...e.geometry.clipPolygon?{clipPolygon:Object.freeze(e.geometry.clipPolygon.map(d=>Object.freeze({x:d.x+i,y:d.y+s})))}:{}})})}function gt(t,e,n,o,r,a){let i=o.map(l=>ze(n,l,a)),s=t.createElement("div");s.className="docx-hf-behind-layer",s.dataset.docxHfBehind=n.kind,s.setAttribute("contenteditable","false"),s.style.position="absolute",s.style.inset="0",s.style.overflow="hidden",s.style.pointerEvents="none",K(t,s,i,r,a,"behind",false),s.childElementCount>0&&e.append(s);}function ft(t,e,n,o,r,a,i,s=false){let l=o.filter(Ue).map(d=>ze(n,d,a));K(t,e,l,r,a,i,s);}var T=/^[0-9A-Fa-f]{6}$/,Te=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u,xt=new Map(Object.entries({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"})),bt=new Map(Object.entries({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 mt(t){return t.doubleStrike?"double":t.strike?"single":"none"}function vt(t){return t==="thick"||t.endsWith("Heavy")}function _e(t){if(!t.underline)return null;let e=t.underline.color&&T.test(t.underline.color)?t.underline.color:null;return {cssStyle:xt.get(t.underline.variant)??"solid",color:e,heavy:vt(t.underline.variant)}}function Ke(t,e,n,o){t.textDecorationLine=e,t.textDecorationStyle=n,o.color&&(t.textDecorationColor=`#${o.color}`),o.heavy&&(t.textDecorationThickness=`max(${2*o.scale}px, 0.12em)`);}function Me(t,e,n){e!=="none"&&Ke(t,"line-through",e==="double"?"double":"solid",{scale:n});}function Ce(t,e,n){Ke(t,"underline",e.cssStyle,{color:e.color,heavy:e.heavy,scale:n});}function Rt(t,e,n){let o=e.color?`#${e.color}`:"currentColor";t.borderBottomWidth=`${(e.heavy?2:1)*n}px`,t.borderBottomStyle=e.cssStyle==="wavy"?"solid":e.cssStyle,t.borderBottomColor=o;}function q(t,e,n){let o=t.style,r=n.scale,a=e.verticalAlign==="baseline"?1:.75;o.fontSize=`${e.fontSizePt*a*r}px`,e.bold&&(o.fontWeight="bold"),e.italic&&(o.fontStyle="italic");let i=e.fontFamily&&Te.test(e.fontFamily)?e.fontFamily:n.defaultFontFamily&&Te.test(n.defaultFontFamily)?n.defaultFontFamily:null;if(i){let d=n.fontAlias?.(i);o.fontFamily=d?`"${d}", "${i}", ${pd}`:`"${i}", ${pd}`;}e.color&&T.test(e.color)&&(o.color=`#${e.color}`);let s=e.highlight?bt.get(e.highlight):void 0;s?(o.backgroundColor=s,t.dataset.highlight=e.highlight??""):e.shading&&T.test(e.shading)&&(o.backgroundColor=`#${e.shading}`),e.caps&&(o.textTransform="uppercase"),e.smallCaps&&(o.fontVariant="small-caps");let l=bb(e);l!==0&&(o.position="relative",o.top=`${-l*r}px`),e.characterSpacingPt!==0&&(o.letterSpacing=`${e.characterSpacingPt*r}px`),e.horizontalScalePercent!==100&&(o.transformOrigin="left",o.transform=`scaleX(${e.horizontalScalePercent/100})`);}function Ge(t,e,n,o,r){let a=n===" "?null:_e(o),i=mt(o),s=e;if(a&&i!=="none"){let l=t.createElement("span");l.dataset.docxDeco="underline",Ce(l.style,a,r);let d=t.createElement("span");d.dataset.docxDeco="strike",Me(d.style,i,r),l.append(d),e.append(l),s=d;}else a?Ce(e.style,a,r):i!=="none"&&Me(e.style,i,r);s.textContent=n;}function $(t,e,n,o){let r=t.createElement(e);return r.style.position="absolute",r.style.left=`${n.x*o}px`,r.style.top=`${n.y*o}px`,r.style.width=`${n.width*o}px`,r.style.height=`${n.height*o}px`,r}function St(t,e,n){let o=e.fieldAtom;!o||(t.dataset.fieldAtom=o.formField?"form":"field",!(o.formField?n.shadeFormFields!==false:(n.fieldShading??Z)!=="never"))||(t.classList.add("docx-field-atom"),(o.formField||(n.fieldShading??Z)==="always")&&t.classList.add("docx-field-atom--shaded"));}function wt(t,e,n){let o=jb(e.props),r=n.revisionStyles,a=ue(e.revisions,r?.authorSlots,r?.styles);if(!(!a&&!o)){if(a){let{attribution:i}=a;t.classList.add("docx-revision",`docx-revision-${i.kind}`),t.dataset.revisionKind=i.kind,t.dataset.revisionId=i.id,i.author!==""&&(t.dataset.reviewAuthor=i.author),i.date!==void 0&&(t.dataset.revisionDate=i.date);let s=r?.styles.get(i.author);if(r){t.dataset.reviewAuthorSlot=String((r.authorSlots.get(i.author)??0)%L);let c=r.classTokens.get(i.author);if(c)for(let u=0;u<c.length;u+=1)t.classList.add(c[u]);}let d=r!==void 0&&(s?.color!==void 0||r.others==="author")?a.authorColor:a.color;t.style.color=d,t.style.backgroundColor=s?.background??(a.deleted?"var(--doc-revision-deletion-wash)":"var(--doc-revision-insertion-wash)"),a.line&&(t.style.textDecorationLine=a.line,t.style.textDecorationStyle=a.decorationStyle,t.style.textDecorationColor=d);return}if(t.classList.add("docx-revision","docx-revision-format"),t.dataset.revisionKind="format",t.dataset.revisionId=o.id,o.author!==""&&(t.dataset.reviewAuthor=o.author),o.date!==void 0&&(t.dataset.revisionDate=o.date),r){let i=r.styles.get(o.author);t.dataset.reviewAuthorSlot=String((r.authorSlots.get(o.author)??0)%L);let s=r.classTokens.get(o.author);if(s)for(let l=0;l<s.length;l+=1)t.classList.add(s[l]);i?.color!==void 0&&(t.style.color=i.color),i?.background!==void 0&&(t.style.backgroundColor=i.background);}}}function At(t,e,n,o){let r=gb(e),a=t.createElement("span");a.className=`docx-revision-pmark docx-revision-pmark-${r.kind}`,a.setAttribute("aria-hidden","true"),a.contentEditable="false",a.dataset.revisionKind=r.kind,a.dataset.revisionId=r.id,r.author!==""&&(a.dataset.reviewAuthor=r.author),a.dataset.revisionIds=e.map(d=>d.id).join(" "),a.dataset.revisionKinds=e.map(d=>d.kind).join(" "),a.textContent="\xB6",a.style.position="absolute",a.style.pointerEvents="none",a.style.marginLeft=`${2*n}px`;let i=hb(r),s=o?.styles.get(r.author),l=o?(o.authorSlots.get(r.author)??0)%L:0;if(o){a.dataset.reviewAuthorSlot=String(l);let d=o.classTokens.get(r.author);if(d)for(let c=0;c<d.length;c+=1)a.classList.add(d[c]);}return a.style.color=s?.color??(o?.others==="author"?U(l):i?"var(--doc-revision-deletion)":"var(--doc-revision-insertion)"),i&&(a.style.textDecorationLine="line-through"),a}function kt(t,e,n){let o=[],r=e.lines[e.lines.length-1];for(let i of e.lines){let s=[...i.spans.flatMap(y=>y.revisions??[]),...i===r?e.markRevisions??[]:[]];if(s.length===0)continue;let l=s.some(y=>y.kind==="delete"||y.kind==="moveFrom"),d=i.box.y-e.box.y,c=d+i.box.height,u=o[o.length-1];if(u&&u.deleted===l&&d<=u.bottom+.5){u.bottom=Math.max(u.bottom,c);continue}o.push({top:d,bottom:c,deleted:l});}if(o.length===0)return null;let a=t.createElement("div");a.className="docx-change-bars",a.setAttribute("aria-hidden","true"),a.style.position="absolute",a.style.inset="0",a.style.pointerEvents="none";for(let i of o){let s=t.createElement("div");s.className=`docx-change-bar docx-change-bar-${i.deleted?"deletion":"insertion"}`,s.style.position="absolute",s.style.top=`${i.top*n}px`,s.style.height=`${(i.bottom-i.top)*n}px`,s.style.left=`${(-e.box.x-$t)*n}px`,s.style.width=`${Et*n}px`,s.style.pointerEvents="none",s.style.backgroundColor=i.deleted?"var(--doc-revision-deletion)":"var(--doc-revision-insertion)",a.append(s);}return a}var $t=7.5,Et=1.5;function Pt(t,e,n,o,r){let a=t.createElement("span");if(a.className="layout-run layout-run-text",a.style.display="inline-block",a.style.verticalAlign="baseline",a.style.boxSizing="border-box",a.style.height=`${o*n.scale}px`,a.style.paddingTop=`${r*n.scale}px`,a.style.lineHeight=`${(o-r)*n.scale}px`,e.range.end>e.range.start?(a.dataset.paragraphId=e.range.paragraphId,a.dataset.start=String(e.range.start),a.dataset.end=String(e.range.end)):(a.setAttribute("aria-hidden","true"),a.contentEditable="false"),q(a,e.style,n),St(a,e,n),wt(a,e,n),(e.style.horizontalScalePercent!==100||e.text===" ")&&(a.style.width=`${e.box.width*n.scale}px`),e.text===" "){a.style.overflow="hidden",a.style.verticalAlign="top";let i=_e(e.style);i&&(a.dataset.docxTabUnderline="",Rt(a.style,i,n.scale));}return Ge(t,a,e.text,e.style,n.scale),e.projected&&(a.dataset.docxField="",a.setAttribute("contenteditable","false"),e.noteNav?(a.style.userSelect="none",e.noteNav.direction==="to-note"?(a.dataset.docxNoteRef="",a.dataset.docxNoteScope=e.noteNav.scopeId,e.text.length>0&&a.setAttribute("aria-description",e.text)):(a.dataset.docxNoteMarkBack="",a.dataset.docxNoteScope=e.noteNav.scopeId)):(a.style.pointerEvents="none",a.style.userSelect="none")),a}function Fe(t,e,n){let o=t.createElement("a");return o.className="docx-hyperlink",o.dataset.docxLink=e.id,o.dataset.docxLinkKind=e.kind,o.setAttribute("tabindex","-1"),!n.inertLinks&&e.href&&(o.setAttribute("href",e.href),e.kind==="external"&&o.setAttribute("rel","noopener noreferrer")),e.tooltip&&o.setAttribute("title",e.tooltip),o.style.display="inline-block",o.style.verticalAlign="baseline",o.style.textDecoration="none",o.style.color="inherit",o}function Dt(t,e,n){let o=n.scale,r=t.createElement("div");r.className="docx-line layout-line",r.dataset.lineId=e.id,r.dataset.paragraphId=e.range.paragraphId,r.style.position="absolute",r.style.top=`${e.box.y*o}px`,r.style.left=`${e.contentX*o}px`,r.style.height=`${e.box.height*o}px`,r.style.fontSize="0",r.style.whiteSpace="pre",r.style.overflow="visible";let a=e.leading??0,i=Math.min(Math.max(a,...e.spans.map(f=>f.box.height+a),e.spans.length===0?e.box.height-(e.trailingSpacing??0):0),e.box.height),s=Math.max(0,e.box.height-i);r.style.boxSizing="border-box",r.style.paddingBottom=`${s*o}px`,r.style.lineHeight=`${(e.box.height-s)*o}px`;let l=null,d=null,c=null,u=new Map;for(let[f,b]of gc(e).entries())u.set(b.paragraphId,f);let y=f=>u.get(f)??0,x=[...e.drawings??[]].sort((f,b)=>y(f.paragraphId)-y(b.paragraphId)||f.start-b.start),h=0,g=(f,b)=>{for(;h<x.length&&(y(x[h].paragraphId)<y(f)||y(x[h].paragraphId)===y(f)&&x[h].start<b);){let p=x[h],v=Math.max(0,p.advanceEnd-p.advanceStart),R=t.createElement("span");R.className="docx-inline-drawing-advance",R.dataset.docxMarker="",R.setAttribute("contenteditable","false"),R.setAttribute("aria-hidden","true"),R.style.display="inline-block",R.style.width=`${v*o}px`,R.style.height=`${p.baselineOffset*o}px`,R.style.lineHeight="0",R.style.pointerEvents="none",R.style.verticalAlign="baseline",r.append(R),h+=1,l=null,d=null;}},k=f=>{let b=f.wrapAdvanceBefore??0;if(b<=.001)return;let p=t.createElement("span");p.className="docx-wrap-advance",p.dataset.docxMarker="",p.setAttribute("contenteditable","false"),p.setAttribute("aria-hidden","true"),p.style.display="inline-block",p.style.width=`${b*o}px`,p.style.height="0",p.style.lineHeight="0",p.style.pointerEvents="none",p.style.verticalAlign="baseline",r.append(p),l=null,d=null;},S=0,m=false;for(let[f,b]of e.spans.entries()){g(b.range.paragraphId,b.range.start),k(b);let p=Math.min(b.box.height+a,e.box.height),v=Pt(t,b,n,p,a);S>0&&!m&&(v.style.marginLeft=`${S*o}px`);let R=e.spans[f+1],P=Lt(e,f+1,y);m=P>0&&R!==void 0&&Tt(b,R),m&&(v.style.wordSpacing=`${P*o}px`),S=P;let D=b.link;if(!D){l=null,d=null,c=null,r.append(v);continue}if(b.fieldAtom){l!==null&&d===D.id&&c===b.range.start||(l=Fe(t,D,n),d=D.id,c=b.range.start,r.append(l)),l.append(v);continue}(!l||d!==D.id||c!==null)&&(l=Fe(t,D,n),d=D.id,c=null,r.append(l)),l.append(v);}if(g(gc(e)[gc(e).length-1]?.paragraphId??e.range.paragraphId,Number.POSITIVE_INFINITY),e.spans.length===0){let f=t.createElement("br");f.style.lineHeight=`${e.box.height*o}px`,r.append(f);}let A=Object.freeze({x:e.contentX,y:e.box.y,width:e.box.width,height:e.box.height}),E=Oe(Be(n));if(e.drawings&&e.drawings.length>0)for(let f of Se(t,e,E.ctx,E.urlRegistry,A))r.append(f);return r}function Lt(t,e,n){if(e<=0||e>=t.spans.length)return 0;let o=t.spans[e-1],r=t.spans[e],a=n(o.range.paragraphId),i=n(r.range.paragraphId);if(t.drawings?.some(d=>{let c=n(d.paragraphId),u=c>a||c===a&&d.start>=o.range.start,y=c<i||c===i&&d.start<r.range.start;return u&&y}))return 0;let l=r.box.x-(o.box.x+o.box.width)-(r.wrapAdvanceBefore??0);return l>.25?l:0}var It=/[\t\n\r \u00A0\u1361\u{10100}-\u{10102}\u{1039F}\u{1091F}]/u;function Tt(t,e){return !t.text.endsWith(" ")||t.style.horizontalScalePercent!==100||!Mt(t,e)||(e.wrapAdvanceBefore??0)>.001?false:!It.test(t.text.slice(0,-1))}function Mt(t,e){return !t.link&&!e.link?true:!t.link||!e.link||t.link.id!==e.link.id||!!t.fieldAtom!=!!e.fieldAtom?false:!t.fieldAtom||t.range.start===e.range.start}function F(t,e,n){let o=n.scale,r=$(t,"div",e.box,o);r.className="docx-paragraph-fragment layout-paragraph",r.dataset.paragraphId=e.paragraphId,r.dataset.fragmentIndex=String(e.fragmentIndex),n.readOnlyParagraphIds?.has(e.paragraphId)&&(r.classList.add("docx-generated-region"),r.dataset.docxReadOnly="",r.setAttribute("contenteditable","false"),r.setAttribute("aria-readonly","true")),n.emptyTocPlaceholderIds?.has(e.paragraphId)&&(r.classList.add("docx-toc-empty-placeholder"),r.dataset.docxTocEmpty=""),e.shading&&T.test(e.shading)&&e.shadingBox&&r.append(Nt(t,e,o)),e.marker&&r.append(Ct(t,e,n));for(let i of e.lines)for(let s of i.spans){if(!s.tabLeader)continue;let l=Ht(t,e,i,s,n);l&&r.append(l);}let a=kt(t,e,o);if(a&&r.append(a),e.markRevisions&&e.markRevisions.length>0){let i=At(t,e.markRevisions,o,n.revisionStyles),s=e.lines[e.lines.length-1];if(s){let l=s.spans[s.spans.length-1];i.style.top=`${(s.box.y-e.box.y)*o}px`,i.style.left=`${((l?l.box.x+l.box.width:s.contentX)-e.box.x)*o}px`,r.append(i);}}for(let i of e.lines){let s=Dt(t,i,n);s.style.top=`${(i.box.y-e.box.y)*o}px`,s.style.left=`${(i.contentX-e.box.x)*o}px`,r.append(s);}if(e.borders)for(let i of e.borders)r.append(He(t,e,i,o));else e.bottomBorder&&r.append(He(t,e,{side:"bottom",edge:e.bottomBorder.edge,box:e.bottomBorder.box},o));return r}function Ct(t,e,n){let o=e.marker,r=n.scale,a=e.lines[0]?.leading??0,i=$(t,"span",o.box,r);i.className="docx-list-marker",i.dataset.docxMarker="",i.setAttribute("contenteditable","false"),i.setAttribute("aria-hidden","true"),i.style.left=`${(o.box.x-e.box.x)*r}px`,i.style.top=`${(o.box.y-e.box.y)*r}px`,i.style.display="block",i.style.overflow="visible",i.style.whiteSpace="pre";let s=e.lines[0],l=s?Math.max(a,...s.spans.map(y=>y.box.height+a),s.spans.length===0?s.box.height-(s.trailingSpacing??0):0):o.box.height,d=Math.min(l,o.box.height),c=Math.max(0,o.box.height-d);i.style.fontSize="0",i.style.boxSizing="border-box",i.style.paddingBottom=`${c*r}px`,i.style.lineHeight=`${d*r}px`;let u=t.createElement("span");return u.style.display="inline-block",u.style.verticalAlign="baseline",u.style.boxSizing="border-box",u.style.height=`${d*r}px`,u.style.paddingTop=`${a*r}px`,u.style.lineHeight=`${(d-a)*r}px`,q(u,o.style,n),Ge(t,u,o.text,o.style,r),i.append(u),i}var Ft=512;function Ht(t,e,n,o,r){let a=o.tabLeader?Da.get(o.tabLeader):void 0;if(!a||o.box.width<=0)return null;let i=r.scale,s=t.createElement("div");s.className="docx-tab-leader",s.dataset.docxTabLeader="",s.setAttribute("contenteditable","false"),s.setAttribute("aria-hidden","true"),s.style.position="absolute",s.style.left=`${(o.box.x-e.box.x)*i}px`,s.style.top=`${(n.box.y-e.box.y)*i}px`,s.style.width=`${o.box.width*i}px`,s.style.height=`${n.box.height*i}px`,s.style.overflow="hidden",s.style.whiteSpace="pre",s.style.pointerEvents="none",s.style.userSelect="none";let l=n.leading??0,d=Math.min(o.box.height+l,n.box.height),c=Math.max(0,n.box.height-d);s.style.fontSize="0",s.style.boxSizing="border-box",s.style.paddingBottom=`${c*i}px`,s.style.lineHeight=`${(n.box.height-c)*i}px`;let u=t.createElement("span");u.style.display="inline-block",u.style.verticalAlign="baseline",q(u,o.style,r),u.style.boxSizing="border-box",u.style.height=`${d*i}px`,u.style.paddingTop=`${l*i}px`,u.style.lineHeight=`${(d-l)*i}px`,o.tabLeader==="heavy"&&(u.style.fontWeight="bold");let y=o.tabLeaderAdvancePt&&o.tabLeaderAdvancePt>0?o.tabLeaderAdvancePt:Math.max(.5,o.style.fontSizePt*.2),x=Math.min(Ft,Math.max(1,Math.floor(o.box.width/y)+2));return u.textContent=a.repeat(x),u.style.letterSpacing="0",s.append(u),s}function Nt(t,e,n){let o=e.shadingBox,r=$(t,"div",o,n);return r.className="docx-paragraph-shading",r.setAttribute("aria-hidden","true"),r.style.left=`${(o.x-e.box.x)*n}px`,r.style.top=`${(o.y-e.box.y)*n}px`,r.style.backgroundColor=`#${e.shading}`,r}function He(t,e,n,o){let r=$(t,"div",n.box,o);r.className=`docx-paragraph-border docx-paragraph-border-${n.side}`,r.setAttribute("aria-hidden","true");let a=(n.box.x-e.box.x)*o,i=(n.box.y-e.box.y)*o,s=n.side==="left"||n.side==="right"||n.side==="bar",l=(s?n.box.width:n.box.height)*o,c=Bt(n.edge.val)?l:Math.max(1,l);r.style.left=`${n.side==="right"?a-(c-l):a}px`,r.style.top=`${n.side==="bottom"?i-(c-l):i}px`,s?r.style.width=`${c}px`:r.style.height=`${c}px`;let u=n.edge.color&&T.test(n.edge.color)?n.edge.color:"000000";return r.style.backgroundColor=`#${u}`,Ot(r,n.edge.val,u,s,c,o),r}function Bt(t){return t==="double"||t==="triple"||t==="doubleWave"||t.startsWith("thinThick")||t.startsWith("thickThin")}function Ot(t,e,n,o,r,a){switch(e){case "dashed":case "dashSmallGap":case "dotDash":case "dotDotDash":case "dashDotStroked":{let i=Math.max(4,4*a);t.style.backgroundImage=`linear-gradient(to ${o?"bottom":"right"}, #${n} 60%, transparent 60%)`,t.style.backgroundSize=o?`100% ${i}px`:`${i}px 100%`;return}case "dotted":{let i=Math.max(3,3*a);t.style.backgroundImage=`linear-gradient(to ${o?"bottom":"right"}, #${n} 35%, transparent 35%)`,t.style.backgroundSize=o?`100% ${i}px`:`${i}px 100%`;return}case "double":case "doubleWave":case "triple":case "thinThickSmallGap":case "thickThinSmallGap":case "thinThickThinSmallGap":case "thinThickMediumGap":case "thickThinMediumGap":case "thinThickThinMediumGap":case "thinThickLargeGap":case "thickThinLargeGap":case "thinThickThinLargeGap":{let i=Math.max(1,r/3);t.style.backgroundColor="transparent",o?(t.style.borderLeft=`${i}px solid #${n}`,t.style.borderRight=`${i}px solid #${n}`):(t.style.borderTop=`${i}px solid #${n}`,t.style.borderBottom=`${i}px solid #${n}`),t.style.boxSizing="border-box";return}case "threeDEmboss":case "ridge":{t.style.backgroundColor="transparent";let i=o?"borderLeft":"borderTop";t.style[i]=`${Math.max(1,r)}px ridge #${n}`,o?t.style.width="0px":t.style.height="0px";return}case "threeDEngrave":case "groove":{t.style.backgroundColor="transparent";let i=o?"borderLeft":"borderTop";t.style[i]=`${Math.max(1,r)}px groove #${n}`,o?t.style.width="0px":t.style.height="0px";return}case "inset":{t.style.backgroundColor="transparent";let i=o?"borderLeft":"borderTop";t.style[i]=`${Math.max(1,r)}px inset #${n}`,o?t.style.width="0px":t.style.height="0px";return}case "outset":{t.style.backgroundColor="transparent";let i=o?"borderLeft":"borderTop";t.style[i]=`${Math.max(1,r)}px outset #${n}`,o?t.style.width="0px":t.style.height="0px";return}default:return}}function Ut(t,e,n,o){let r=o.scale,a=$(t,"div",e.box,r);if(a.className="docx-table-cell",a.style.left=`${(e.box.x-n.x)*r}px`,a.style.top=`${(e.box.y-n.y)*r}px`,a.style.boxSizing="border-box",a.style.overflow="visible",a.dataset.cellId=e.id,a.dataset.gridColumn=String(e.gridColumn),a.dataset.gridSpan=String(e.gridSpan),e.rowSpan&&e.rowSpan>1&&(a.dataset.rowSpan=String(e.rowSpan)),e.paintInert||e.vMergeContinue)return a.dataset.vMergeContinue="true",a.style.border="none",a.style.backgroundColor="transparent",a;a.style.border="none",Pe(t,a,e.borders,r),e.shading&&T.test(e.shading)&&(a.style.backgroundColor=`#${e.shading}`);for(let i of e.blocks){let s=i.kind==="table"?H(t,i,o):F(t,i,o);s.style.left=`${(i.box.x-e.box.x)*r}px`,s.style.top=`${(i.box.y-e.box.y)*r}px`,a.append(s);}return a}function H(t,e,n){let o=n.scale,r=$(t,"div",e.box,o);r.className="docx-table-fragment layout-table",r.dataset.tableId=e.tableId,r.dataset.fragmentIndex=String(e.fragmentIndex),r.style.overflow="visible";for(let a of e.rows){let i=$(t,"div",a.box,o);i.className="docx-table-row",a.revisionKind&&(i.classList.add("docx-table-row--revision",a.revisionKind==="insert"?"layout-revision-ins":"layout-revision-del"),i.dataset.revisionKind=a.revisionKind,a.revisionId!==void 0&&(i.dataset.revisionId=a.revisionId),a.revisionAuthor!==void 0&&(i.dataset.reviewAuthor=a.revisionAuthor),a.revisionDate!==void 0&&(i.dataset.revisionDate=a.revisionDate)),i.dataset.rowId=a.id,a.isHeaderRepeat&&(i.dataset.headerRepeat="true"),i.style.left=`${(a.box.x-e.box.x)*o}px`,i.style.top=`${(a.box.y-e.box.y)*o}px`,i.style.overflow="visible";for(let s of a.cells)i.append(Ut(t,s,a.box,n));r.append(i);}return r}function zt(t,e,n,o){let r={...n,paintInstance:`p${e.index}`},a=$(t,"div",e.box,r.scale);if(a.className="docx-page",a.style.fontFamily=pd,a.dataset.pageIndex=String(e.index),r.ariaHidden&&(a.setAttribute("aria-hidden","true"),a.setAttribute("role","presentation")),a.dataset.materialized=String(o),!o)return a;let i=Object.freeze({x:e.box.x,y:e.box.y,width:e.box.width,height:e.box.height}),s=Object.freeze({x:-(e.contentBox.x-e.box.x),y:-(e.contentBox.y-e.box.y),width:e.box.width,height:e.box.height});Ie(t,a,e,r,s,"behind");for(let d of [e.header,e.footer])d?.anchoredDrawings?.length&&gt(t,a,d,d.anchoredDrawings,r,{x:e.box.x,y:e.box.y,width:e.box.width,height:e.box.height});let l=t.createElement("div");l.className="docx-page-content",l.style.position="absolute",l.style.left=`${(e.contentBox.x-e.box.x)*r.scale}px`,l.style.top=`${(e.contentBox.y-e.box.y)*r.scale}px`,l.style.width=`${e.contentBox.width*r.scale}px`,l.style.height=`${e.contentBox.height*r.scale}px`,r.activeHeaderFooterRId&&l.setAttribute("contenteditable","false");for(let d of e.columnSeparators??[]){let c=t.createElement("div");c.className="docx-column-separator",c.setAttribute("contenteditable","false"),c.style.position="absolute",c.style.left=`${d.x*r.scale}px`,c.style.top=`${d.y*r.scale}px`,c.style.width=`${d.width*r.scale}px`,c.style.height=`${d.height*r.scale}px`,c.style.backgroundColor="currentColor",c.style.pointerEvents="none",l.append(c);}for(let d of e.fragments)l.append(d.kind==="table"?H(t,d,r):F(t,d,r));a.append(l),Ie(t,a,e,r,s,"inFront"),he(t,a,e,r,F,H);for(let d of ["header","footer"]){if(e[d])continue;let c=t.createElement("div");c.className="docx-hf docx-hf--placeholder",c.dataset.docxHf=d,c.setAttribute("contenteditable","false");let u=d==="header"?e.contentBox.y-e.box.y:e.box.y+e.box.height-(e.contentBox.y+e.contentBox.height),y=Math.min(u,_t);if(y<=0)continue;let x=Math.max(0,Math.min(Kt,u-y)),h=d==="header"?x:e.box.height-x-y;c.style.position="absolute",c.style.left=`${(e.contentBox.x-e.box.x)*r.scale}px`,c.style.top=`${h*r.scale}px`,c.style.width=`${e.contentBox.width*r.scale}px`,c.style.height=`${y*r.scale}px`,a.append(c);}for(let d of [e.header,e.footer]){if(!d)continue;let c=d.anchoredDrawings??[],u=!!r.activeHeaderFooterRId&&!!d.rId&&r.activeHeaderFooterRId===d.rId&&(r.activeHeaderFooterPageIndex===void 0||r.activeHeaderFooterPageIndex===e.index),y=t.createElement("div");y.className="docx-hf",y.dataset.docxHf=d.kind,d.rId&&(y.dataset.docxRId=d.rId),u?(y.dataset.docxHfActive="",y.setAttribute("contenteditable","true")):y.setAttribute("contenteditable","false"),y.style.position="absolute",y.style.left=`${(d.box.x-e.box.x)*r.scale}px`,y.style.top=`${(d.box.y-e.box.y)*r.scale}px`,y.style.width=`${d.box.width*r.scale}px`;let x=u?d.kind==="footer"?Math.max(d.box.height,e.box.y+e.box.height-d.box.y):Math.max(d.box.height,e.contentBox.y-d.box.y):d.box.height;y.style.height=`${x*r.scale}px`,y.style.overflow="visible";let h=(e.box.x-d.box.x)*r.scale,g=(e.box.y-d.box.y)*r.scale,k=h+e.box.width*r.scale,S=g+e.box.height*r.scale;y.style.clipPath=`polygon(${h}px ${g}px, ${k}px ${g}px, ${k}px ${S}px, ${h}px ${S}px)`;let m=Object.freeze({x:0,y:0,width:d.box.width,height:d.box.height}),A=c.filter(b=>!Ue(b)),E={...r,inertLinks:true};for(let b of d.fragments)y.append(b.kind==="table"?H(t,b,E):F(t,b,E));K(t,y,A,Be(r),m,"inFront",u),a.append(y);let f=t.createElement("div");f.className="docx-hf-edit-hint",f.dataset.docxHfHint=d.kind,f.setAttribute("contenteditable","false"),f.style.position="absolute",f.style.left=y.style.left,f.style.width=y.style.width,f.style.top=d.kind==="header"?`${(d.box.y+d.box.height-e.box.y)*r.scale}px`:`${(d.box.y-e.box.y)*r.scale}px`,d.kind==="footer"&&(f.style.transform="translateY(-100%)"),a.append(f),ft(t,a,d,c,r,i,"inFront",u);}return Wt(t,a,e,r),a}var _t=30,Kt=36,Gt=16,jt=new Set(["dropdown","comboBox","date","checkbox"]);function Wt(t,e,n,o){let r=o.contentControlChrome,a=r?.suppressedIds,i=(n.contentControls??[]).filter(y=>a?.has(y.id)!==true),s=[...i,...(r?.additionalBoundaries??[]).filter(y=>a?.has(y.id)!==true&&!i.some(x=>x.id===y.id))];if(s.length===0)return;let l=r?.showAll===true,d=r?.activeIds,c=r?.hoverIds,u=r?.tocControlIds;for(let y of s){let x=u?.has(y.id)===true,h=!x&&d?.has(y.id)===true,g=c?.has(y.id)===true;e.append(Vt(t,n,y,o.scale,h,g,l||h||x&&g,r?.checkedIds?.has(y.id),x,r?.readOnly===true));}}function Vt(t,e,n,o,r,a,i,s,l,d){let c=t.createElement("div");c.className="docx-content-control-chrome",c.dataset.docxContentControl=n.id,c.dataset.docxMarker="",c.dataset.controlType=n.controlType,c.dataset.lock=n.effectiveLock,n.bound&&(c.dataset.bound=""),n.placeholder&&(c.dataset.placeholder=""),l&&(c.dataset.docxToc=""),d&&(c.dataset.readOnly=""),r&&(c.dataset.active=""),a&&(c.dataset.hover=""),i&&(c.dataset.boundaryVisible=""),c.setAttribute("contenteditable","false"),c.setAttribute("role","group"),n.alias&&(c.dataset.alias=n.alias),n.tag&&(c.dataset.tag=n.tag),n.alias&&c.setAttribute("aria-label",n.alias),c.style.position="absolute",c.style.inset="0",c.style.pointerEvents="none",c.style.zIndex="2";let u=e.contentBox.x-e.box.x,y=e.contentBox.y-e.box.y;for(let h of n.fragments){if(h.pageIndex!==e.index)continue;let g=t.createElement("div");g.className="docx-content-control-boundary",g.dataset.docxMarker="",g.setAttribute("contenteditable","false"),g.setAttribute("aria-hidden","true"),g.style.position="absolute",g.style.left=`${(u+h.box.x)*o}px`,g.style.top=`${(y+h.box.y)*o}px`,g.style.width=`${Math.max(h.box.width,1)*o}px`,g.style.height=`${Math.max(h.box.height,1)*o}px`,g.style.pointerEvents="none",c.append(g);}let x=n.fragments.find(h=>h.pageIndex===e.index);if(x&&n.alias){let h=t.createElement("div");h.className="docx-content-control-label",h.dataset.docxMarker="",h.setAttribute("contenteditable","false"),h.setAttribute("aria-hidden","true"),h.textContent=n.alias,h.style.position="absolute",h.style.left=`${(u+x.box.x)*o}px`,h.style.top=`${Math.max(0,(y+x.box.y)*o-Gt)}px`,h.style.pointerEvents="none",c.append(h);}if(x&&jt.has(n.controlType)){let h=t.createElement("button");h.type="button",h.className="docx-content-control-widget",h.dataset.docxMarker="",h.dataset.docxCcWidget=n.controlType,h.dataset.docxCcId=n.id,h.setAttribute("contenteditable","false"),h.setAttribute("tabindex","-1"),n.controlType==="checkbox"?h.setAttribute("role","checkbox"):n.controlType==="dropdown"||n.controlType==="comboBox"?h.setAttribute("role","listbox"):n.controlType==="date"&&h.setAttribute("role","button"),n.alias&&(h.dataset.name=n.alias),n.alias&&h.setAttribute("aria-label",n.alias),n.controlType==="checkbox"&&(h.setAttribute("data-checked",s?"true":"false"),h.setAttribute("aria-checked",s?"true":"false"));let g=n.effectiveLock==="contentLocked"||n.effectiveLock==="sdtContentLocked";(d||g||n.bound)&&(h.disabled=true,h.dataset.disabledReason=d?"readOnly":n.bound?"bound":"locked",h.setAttribute("aria-disabled","true")),h.style.position="absolute",h.style.left=`${(u+x.box.x+x.box.width)*o-18}px`,h.style.top=`${(y+x.box.y)*o}px`,h.style.width="16px",h.style.height="16px",h.style.pointerEvents="auto",h.style.padding="0",h.style.margin="0",h.style.cursor=h.disabled?"not-allowed":"pointer",c.append(h);}return c}var Ne=new WeakMap;function Xt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Yt(t,e,n,o){let r=t.element;return !t.materialized&&Xt(t.record.box,e.box)&&r.style.left===`${e.box.x*n}px`&&r.style.top===`${e.box.y*n}px`&&r.style.width===`${e.box.width*n}px`&&r.style.height===`${e.box.height*n}px`&&r.getAttribute("aria-hidden")===(o?"true":null)}function Zt(t,e,n={}){let o=n.contentControlChrome,r=o?`${o.showAll===true?"1":"0"}:${o.activeIds?[...o.activeIds].sort().join(","):""}:${o.checkedIds?[...o.checkedIds].sort().join(","):""}:${o.tocControlIds?[...o.tocControlIds].sort().join(","):""}:${o.suppressedIds?[...o.suppressedIds].sort().join(","):""}:${o.readOnly===true?"ro":""}`:"",a=n.drawingStrings??V,i=n.imageUrlPort!==void 0?fe(t,n.imageUrlPort):null,s=o?.additionalBoundaries?o.additionalBoundaries.flatMap(p=>p.fragments.map(v=>`${p.id}:${v.pageIndex}:${v.box.x}:${v.box.y}:${v.box.width}:${v.box.height}`)).sort().join(","):"",l=n.readOnlyParagraphIds?[...n.readOnlyParagraphIds].sort().join(","):"",d=n.emptyTocPlaceholderIds?[...n.emptyTocPlaceholderIds].sort().join(","):"",c=o?.tocControlIds?[...o.tocControlIds].sort().join(","):"",u=ye(n.revisionStyles,e),y={scale:n.scale??96/72,ariaHidden:n.ariaHidden??true,drawingStrings:a,urlRegistry:i,...n.fontAlias?{fontAlias:n.fontAlias}:{},...n.readOnlyParagraphIds?{readOnlyParagraphIds:n.readOnlyParagraphIds}:{},...n.emptyTocPlaceholderIds?{emptyTocPlaceholderIds:n.emptyTocPlaceholderIds}:{},...n.defaultFontFamily?{defaultFontFamily:n.defaultFontFamily}:{},...n.fieldShading?{fieldShading:n.fieldShading}:{},...n.shadeFormFields!==void 0?{shadeFormFields:n.shadeFormFields}:{},...u?{revisionStyles:u}:{},...n.imageUrlPort?{imageUrlPort:n.imageUrlPort}:{},...n.activeHeaderFooterRId?{activeHeaderFooterRId:n.activeHeaderFooterRId}:{},...n.activeHeaderFooterPageIndex!==void 0?{activeHeaderFooterPageIndex:n.activeHeaderFooterPageIndex}:{},...o?{contentControlChrome:o}:{}},x=t.ownerDocument,h=`${y.scale}|${y.ariaHidden}|${y.fontAlias?ht(y.fontAlias):""}|${y.defaultFontFamily??""}|${y.activeHeaderFooterRId??""}|${y.activeHeaderFooterPageIndex??""}|cc:${r}:${s}|toc:${c}|ro:${l}|tocEmpty:${d}|${n.imageUrlPort?"url":""}|${$e(a)}|rev:${ce(u)}`,g=Ne.get(t),S=g?.parameters===h?new Map(g.pages.map(p=>[p.record,p])):null,m=g?new Map(g.pages.map(p=>[p.record.index,p])):null,A=e.pages.map(p=>{let v=n.materialize?.has(p.index)??true,R=S?.get(p);if(R&&R.materialized===v)return R;let P=v?null:m?.get(p.index);return P&&Yt(P,p,y.scale,y.ariaHidden)?{record:p,materialized:false,element:P.element}:{record:p,materialized:v,element:zt(x,p,y,v)}});Ne.set(t,{parameters:h,pages:A}),t.dataset.revision=String(e.revision),i&&i.reconcile(Ae(e),ke(e));let E=new Set(A.map(p=>p.element)),f=t.firstChild;for(;f;){let p=f.nextSibling;E.has(f)||f.remove(),f=p;}let b=t.firstChild;for(let p of A){if(p.element===b){b=b.nextSibling;continue}t.insertBefore(p.element,b);}}function qt(t,e,n,o){let r=t.ownerDocument,a=o.scale,i=[];for(let s of n){let l=e.pages[s.pageIndex];if(!l)continue;let d=r.createElement("div");d.className=s.className??o.className??"docx-cell-selection-rect",d.style.position="absolute";let c=o.pageOffsetX?.get(s.pageIndex)??0;d.style.left=`${(l.contentBox.x+s.x+c)*a}px`,d.style.top=`${(l.contentBox.y+s.y)*a}px`,d.style.width=`${s.width*a}px`,d.style.height=`${s.height*a}px`,s.reviewAuthor&&(d.dataset.reviewAuthor=s.reviewAuthor.author,d.dataset.reviewAuthorSlot=String(s.reviewAuthor.slot%L),d.style.setProperty("--doc-review-author-current",s.reviewAuthor.color)),i.push(d);}t.replaceChildren(...i);}
2
+ export{de as a,en as b,et as c,tn as d,sn as e,V as f,ln as g,Z as h,Zt as i,qt as j};
@@ -0,0 +1,2 @@
1
+ var r=null,n=null;function o(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 i(e){return e.replace(/[a-z][a-z0-9+.-]*:\/\/[^\s"')]+/gi,t=>o(t))}function d(e){if(e instanceof URL)return e.href;let t=globalThis.location?.href;try{return t?new URL(e,t).href:e}catch{return e}}function l(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");let t=d(e);if(n!==null&&n!==t){console.warn(`setHarfBuzzWasmUrl: the shaper already read its binary location from ${o(n)}, so this call has no effect in the current session. Move the call before the first editor is created and reload the page.`);return}r!==null&&r!==t&&console.warn(`setHarfBuzzWasmUrl: replacing ${o(r)} with ${o(t)}. Two callers are configuring the shaper with different URLs; the later one wins.`),r=t;}function c(e){return n=r??e,n}function f(e){return e instanceof Error&&/process\.getBuiltinModule/.test(e.message)}function u(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 and 22.3. Upgrade Node; \`setHarfBuzzWasmUrl\` does not apply here. (${i(e instanceof Error?e.message:String(e))})`}function h(e){let t=i(e instanceof Error?e.message:String(e));return `the HarfBuzz WASM binary could not be loaded from ${n===null?"its bundled location":o(n)}. 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 p(e,t){let s=`expected HarfBuzz ${e}, loaded ${t}`;return r===null?`${s}. The bundled binary does not match this build of the engine.`:`${s}. The copy served at ${o(r)} is from a different version of \`@docx-editor.dev/core\`. Re-copy \`@docx-editor.dev/core/harfbuzz.wasm\` from the installed package into your served assets, and reload the page.`}
2
+ export{l as a,c as b,f as c,u as d,h as e,p as f};
@@ -1 +1 @@
1
- 'use strict';var t=class extends Error{name="EditorFontError";code;request;diagnostic;constructor(r,o,e={}){super(o,{cause:e.cause}),this.code=r,this.request=e.request,this.diagnostic=e.diagnostic;}};exports.a=t;
1
+ 'use strict';var t=class extends Error{name="EditorFontError";code;request;diagnostic;constructor(r,n,e={}){super(n,{cause:e.cause}),this.code=r,this.request=e.request,this.diagnostic=e.diagnostic;}};exports.a=t;
@@ -1,4 +1,4 @@
1
- import { O as OoxmlNode, a as OoxmlElement, b as OoxmlContentControlNode, c as OoxmlGenericElementNode, d as OoxmlContentControlContentNode } from './ooxml-tree-CG0odFyi.cjs';
1
+ import { O as OoxmlNode, a as OoxmlElement, b as OoxmlContentControlNode, c as OoxmlGenericElementNode, d as OoxmlContentControlContentNode } from './ooxml-tree-BU0e3DVi.cjs';
2
2
 
3
3
  /** Nested content-control wrappers deeper than this stop flattening; content stays preserved. */
4
4
  declare const MAX_CONTENT_CONTROL_NESTING = 32;
@@ -1,4 +1,4 @@
1
- import { O as OoxmlNode, a as OoxmlElement, b as OoxmlContentControlNode, c as OoxmlGenericElementNode, d as OoxmlContentControlContentNode } from './ooxml-tree-CG0odFyi.js';
1
+ import { O as OoxmlNode, a as OoxmlElement, b as OoxmlContentControlNode, c as OoxmlGenericElementNode, d as OoxmlContentControlContentNode } from './ooxml-tree-BU0e3DVi.js';
2
2
 
3
3
  /** Nested content-control wrappers deeper than this stop flattening; content stays preserved. */
4
4
  declare const MAX_CONTENT_CONTROL_NESTING = 32;
@@ -1 +1 @@
1
- 'use strict';var chunkOHJQ7GPZ_cjs=require('../chunk-OHJQ7GPZ.cjs');Object.defineProperty(exports,"EditorFontError",{enumerable:true,get:function(){return chunkOHJQ7GPZ_cjs.a}});
1
+ 'use strict';var chunkYMYCPY5Y_cjs=require('../chunk-YMYCPY5Y.cjs');Object.defineProperty(exports,"EditorFontError",{enumerable:true,get:function(){return chunkYMYCPY5Y_cjs.a}});
@@ -1,11 +1,11 @@
1
1
  export { ContentControlSummary, DocEdits, DocQueries, DocQueryResults, ParagraphSummary } from './document.cjs';
2
- export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind } from '../review-support-CHuJxHmz.cjs';
3
- export { A as AuthoredNoteNumbering, C as CanResult, p as DocumentChange, q as DocumentEditingMode, r as DocumentHandle, D as DocumentSource, l as Editor, a as EditorCommand, t as EditorCommandShape, u as EditorCommands, w as EditorError, x as EditorEvents, E as EditorFontError, y as EditorFontErrorCode, z as EditorHeaderFooterCommands, B as EditorNoteCommands, G as EditorPosition, H as EditorQueries, J as EditorQuery, K as EditorQueryResults, L as EditorScope, M as EditorSelection, N as EditorSnapshot, F as FontConfiguration, k as FontFaceRequest, i as FontSource, j as FontSourceSubstitution, O as FurnitureVariant, P as HeaderFooterSlotArgs, Q as HeaderFooterState, R as HyperlinkInfo, I as ImageContext, b as ImageCropPercent, U as InteractionAffinity, W as InteractionOutcome, X as InteractionOutcomeCode, Y as NoteKind, _ as NotePropertiesSide, $ as NotePropertiesState, a0 as PageSetup, a1 as ResolvedNoteNumbering, a2 as ReviewActivationOptions, a3 as ReviewCommentPlacement, a4 as ReviewCustomPlacement, a5 as ReviewItemPlacement, a6 as ReviewItemPlacementBase, a7 as ReviewItemQuery, a8 as ReviewRevisionPlacement, S as SelectedImageState, a9 as SemanticIdentity, aa as SemanticTarget, T as TableBorderEdgeTarget, m as TableBorderSpec, n as TableBorderStyle, ab as TableBorderTarget, ac as TableCellVerticalAlignment, ad as TableColumnDividerResizeTarget, ae as TableColumnOccurrenceTarget, o as TableContext, af as TableRightEdgeResizeTarget, ag as TableRowOccurrenceTarget, ah as TextMatch, V as ViewScope, ai as ZoomFitTarget, Z as ZoomMode } from '../editor-CUul9IuY.cjs';
4
- export { S as SemanticPosition, a as SemanticSelection } from '../semantic-interaction-DgaWs-5w.cjs';
5
- export { Block, ColorValue, ContainerRef, ContentControl, ContentControlFilter, ContentControlType, DocAnchor, DocAnchorRange, DocComment, DocLocation, DocRange, DocTarget, DocumentBody, DocxDocument, DocxDocumentJSON, ExecErrorCode, ExecResult, Extent, FontDefinition, HeaderFooterSet, IndentFormatting, NumberingRef, PageMargins, Paragraph, Point, Rect, Revision, RevisionType, Run, RunFormatting, Section, SectionProperties, StyleDefinition, StyleDefinitions, Table, TableCell, TableRow, Theme, ThemeColorScheme, Unsubscribe, Watermark } from './types.cjs';
6
- export { f as DrawingHorizontalReferenceFrame, c as DrawingKind, e as DrawingLocks, d as DrawingPositionInput, g as DrawingVerticalReferenceFrame, b as ImageWrapTarget, R as RevisionAddress } from '../tree-op-types-DOYNkKqD.cjs';
7
- export { I as ImageResourceState, P as PreservedImageMime, R as RenderableImageMime, S as SupportedImageMime, V as ValidatedImageBytesHandle, a as VectorImageMime } from '../image-resources-CSlQmPIm.cjs';
8
- import '../ooxml-tree-CG0odFyi.cjs';
9
- import '../semantic-records-Dq8SlCY8.cjs';
10
- import '../revision-projection-DRZMzoLD.cjs';
11
- import '../ooxml-package-Cmbe_M04.cjs';
2
+ export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind } from '../review-support-T-riLz4Y.cjs';
3
+ export { A as AuthoredNoteNumbering, C as CanResult, q as DocumentChange, r as DocumentEditingMode, t as DocumentHandle, D as DocumentSource, m as Editor, b as EditorCommand, u as EditorCommandShape, w as EditorCommands, x as EditorError, y as EditorEvents, E as EditorFontError, z as EditorFontErrorCode, B as EditorHeaderFooterCommands, G as EditorNoteCommands, H as EditorPosition, J as EditorQueries, K as EditorQuery, L as EditorQueryResults, M as EditorScope, N as EditorSelection, a as EditorSnapshot, F as FontConfiguration, l as FontFaceRequest, j as FontSource, k as FontSourceSubstitution, O as FurnitureVariant, P as HeaderFooterSlotArgs, Q as HeaderFooterState, R as HyperlinkInfo, I as ImageContext, c as ImageCropPercent, U as InteractionAffinity, W as InteractionOutcome, X as InteractionOutcomeCode, Y as NoteKind, _ as NotePropertiesSide, $ as NotePropertiesState, a0 as PageSetup, a1 as ResolvedNoteNumbering, a2 as ReviewActivationOptions, a3 as ReviewCommentPlacement, a4 as ReviewCustomPlacement, a5 as ReviewItemPlacement, a6 as ReviewItemPlacementBase, a7 as ReviewItemQuery, a8 as ReviewRevisionPlacement, S as SelectedImageState, a9 as SemanticIdentity, aa as SemanticTarget, T as TableBorderEdgeTarget, n as TableBorderSpec, o as TableBorderStyle, ab as TableBorderTarget, ac as TableCellVerticalAlignment, ad as TableColumnDividerResizeTarget, ae as TableColumnOccurrenceTarget, p as TableContext, af as TableRightEdgeResizeTarget, ag as TableRowOccurrenceTarget, ah as TextMatch, V as ViewScope, ai as ZoomFitTarget, Z as ZoomMode } from '../editor-BZEJL3vv.cjs';
4
+ export { S as SemanticPosition, a as SemanticSelection } from '../semantic-interaction-CDNEU_Tx.cjs';
5
+ export { Block, ColorValue, ContainerRef, ContentControl, ContentControlFilter, ContentControlType, DocAnchor, DocAnchorRange, DocComment, DocLocation, DocRange, DocTarget, DocumentBody, DocxDocument, DocxDocumentJSON, ExecErrorCode, ExecResult, Extent, FontDefinition, HeaderFooterSet, IndentFormatting, NumberingRef, PageMargins, Paragraph, Point, Rect, Revision, RevisionType, Run, RunFormatting, Section, SectionProperties, SelectionPin, StyleDefinition, StyleDefinitions, Table, TableCell, TableRow, Theme, ThemeColorScheme, Unsubscribe, Watermark } from './types.cjs';
6
+ export { f as DrawingHorizontalReferenceFrame, c as DrawingKind, e as DrawingLocks, d as DrawingPositionInput, g as DrawingVerticalReferenceFrame, b as ImageWrapTarget, R as RevisionAddress } from '../tree-op-types-CUCwPWjT.cjs';
7
+ export { I as ImageResourceState, P as PreservedImageMime, R as RenderableImageMime, S as SupportedImageMime, V as ValidatedImageBytesHandle, a as VectorImageMime } from '../image-resources-BaHz4QAd.cjs';
8
+ import '../ooxml-tree-BU0e3DVi.cjs';
9
+ import '../semantic-records-DEOs3_tE.cjs';
10
+ import '../revision-projection-WzlQGBJx.cjs';
11
+ import '../ooxml-package-CR5us6ad.cjs';
@@ -1,11 +1,11 @@
1
1
  export { ContentControlSummary, DocEdits, DocQueries, DocQueryResults, ParagraphSummary } from './document.js';
2
- export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind } from '../review-support-Bl9sN8cv.js';
3
- export { A as AuthoredNoteNumbering, C as CanResult, p as DocumentChange, q as DocumentEditingMode, r as DocumentHandle, D as DocumentSource, l as Editor, a as EditorCommand, t as EditorCommandShape, u as EditorCommands, w as EditorError, x as EditorEvents, E as EditorFontError, y as EditorFontErrorCode, z as EditorHeaderFooterCommands, B as EditorNoteCommands, G as EditorPosition, H as EditorQueries, J as EditorQuery, K as EditorQueryResults, L as EditorScope, M as EditorSelection, N as EditorSnapshot, F as FontConfiguration, k as FontFaceRequest, i as FontSource, j as FontSourceSubstitution, O as FurnitureVariant, P as HeaderFooterSlotArgs, Q as HeaderFooterState, R as HyperlinkInfo, I as ImageContext, b as ImageCropPercent, U as InteractionAffinity, W as InteractionOutcome, X as InteractionOutcomeCode, Y as NoteKind, _ as NotePropertiesSide, $ as NotePropertiesState, a0 as PageSetup, a1 as ResolvedNoteNumbering, a2 as ReviewActivationOptions, a3 as ReviewCommentPlacement, a4 as ReviewCustomPlacement, a5 as ReviewItemPlacement, a6 as ReviewItemPlacementBase, a7 as ReviewItemQuery, a8 as ReviewRevisionPlacement, S as SelectedImageState, a9 as SemanticIdentity, aa as SemanticTarget, T as TableBorderEdgeTarget, m as TableBorderSpec, n as TableBorderStyle, ab as TableBorderTarget, ac as TableCellVerticalAlignment, ad as TableColumnDividerResizeTarget, ae as TableColumnOccurrenceTarget, o as TableContext, af as TableRightEdgeResizeTarget, ag as TableRowOccurrenceTarget, ah as TextMatch, V as ViewScope, ai as ZoomFitTarget, Z as ZoomMode } from '../editor-DIwctMcU.js';
4
- export { S as SemanticPosition, a as SemanticSelection } from '../semantic-interaction-CCVwyw2A.js';
5
- export { Block, ColorValue, ContainerRef, ContentControl, ContentControlFilter, ContentControlType, DocAnchor, DocAnchorRange, DocComment, DocLocation, DocRange, DocTarget, DocumentBody, DocxDocument, DocxDocumentJSON, ExecErrorCode, ExecResult, Extent, FontDefinition, HeaderFooterSet, IndentFormatting, NumberingRef, PageMargins, Paragraph, Point, Rect, Revision, RevisionType, Run, RunFormatting, Section, SectionProperties, StyleDefinition, StyleDefinitions, Table, TableCell, TableRow, Theme, ThemeColorScheme, Unsubscribe, Watermark } from './types.js';
6
- export { f as DrawingHorizontalReferenceFrame, c as DrawingKind, e as DrawingLocks, d as DrawingPositionInput, g as DrawingVerticalReferenceFrame, b as ImageWrapTarget, R as RevisionAddress } from '../tree-op-types-CZw9QhWX.js';
7
- export { I as ImageResourceState, P as PreservedImageMime, R as RenderableImageMime, S as SupportedImageMime, V as ValidatedImageBytesHandle, a as VectorImageMime } from '../image-resources-e13t-pgy.js';
8
- import '../ooxml-tree-CG0odFyi.js';
9
- import '../semantic-records-B-qbrnp2.js';
10
- import '../revision-projection-u4nT52xT.js';
11
- import '../ooxml-package-BrxTmTsZ.js';
2
+ export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind } from '../review-support-D4ZBdUXa.js';
3
+ export { A as AuthoredNoteNumbering, C as CanResult, q as DocumentChange, r as DocumentEditingMode, t as DocumentHandle, D as DocumentSource, m as Editor, b as EditorCommand, u as EditorCommandShape, w as EditorCommands, x as EditorError, y as EditorEvents, E as EditorFontError, z as EditorFontErrorCode, B as EditorHeaderFooterCommands, G as EditorNoteCommands, H as EditorPosition, J as EditorQueries, K as EditorQuery, L as EditorQueryResults, M as EditorScope, N as EditorSelection, a as EditorSnapshot, F as FontConfiguration, l as FontFaceRequest, j as FontSource, k as FontSourceSubstitution, O as FurnitureVariant, P as HeaderFooterSlotArgs, Q as HeaderFooterState, R as HyperlinkInfo, I as ImageContext, c as ImageCropPercent, U as InteractionAffinity, W as InteractionOutcome, X as InteractionOutcomeCode, Y as NoteKind, _ as NotePropertiesSide, $ as NotePropertiesState, a0 as PageSetup, a1 as ResolvedNoteNumbering, a2 as ReviewActivationOptions, a3 as ReviewCommentPlacement, a4 as ReviewCustomPlacement, a5 as ReviewItemPlacement, a6 as ReviewItemPlacementBase, a7 as ReviewItemQuery, a8 as ReviewRevisionPlacement, S as SelectedImageState, a9 as SemanticIdentity, aa as SemanticTarget, T as TableBorderEdgeTarget, n as TableBorderSpec, o as TableBorderStyle, ab as TableBorderTarget, ac as TableCellVerticalAlignment, ad as TableColumnDividerResizeTarget, ae as TableColumnOccurrenceTarget, p as TableContext, af as TableRightEdgeResizeTarget, ag as TableRowOccurrenceTarget, ah as TextMatch, V as ViewScope, ai as ZoomFitTarget, Z as ZoomMode } from '../editor-D2zOJztO.js';
4
+ export { S as SemanticPosition, a as SemanticSelection } from '../semantic-interaction-lvpzZRpA.js';
5
+ export { Block, ColorValue, ContainerRef, ContentControl, ContentControlFilter, ContentControlType, DocAnchor, DocAnchorRange, DocComment, DocLocation, DocRange, DocTarget, DocumentBody, DocxDocument, DocxDocumentJSON, ExecErrorCode, ExecResult, Extent, FontDefinition, HeaderFooterSet, IndentFormatting, NumberingRef, PageMargins, Paragraph, Point, Rect, Revision, RevisionType, Run, RunFormatting, Section, SectionProperties, SelectionPin, StyleDefinition, StyleDefinitions, Table, TableCell, TableRow, Theme, ThemeColorScheme, Unsubscribe, Watermark } from './types.js';
6
+ export { f as DrawingHorizontalReferenceFrame, c as DrawingKind, e as DrawingLocks, d as DrawingPositionInput, g as DrawingVerticalReferenceFrame, b as ImageWrapTarget, R as RevisionAddress } from '../tree-op-types-D0fTNBVW.js';
7
+ export { I as ImageResourceState, P as PreservedImageMime, R as RenderableImageMime, S as SupportedImageMime, V as ValidatedImageBytesHandle, a as VectorImageMime } from '../image-resources-Cl5_cNi9.js';
8
+ import '../ooxml-tree-BU0e3DVi.js';
9
+ import '../semantic-records-CdQvpUj1.js';
10
+ import '../revision-projection-UKqvPa4-.js';
11
+ import '../ooxml-package-D_CtywTW.js';
@@ -1 +1 @@
1
- export{a as EditorFontError}from'../chunk-GOEBQ26R.js';
1
+ export{a as EditorFontError}from'../chunk-PSZH2VXP.js';
@@ -1,11 +1,11 @@
1
- export { L as EditorScope, U as InteractionAffinity, W as InteractionOutcome, X as InteractionOutcomeCode, a9 as SemanticIdentity, aa as SemanticTarget, V as ViewScope } from '../editor-CUul9IuY.cjs';
1
+ export { M as EditorScope, U as InteractionAffinity, W as InteractionOutcome, X as InteractionOutcomeCode, a9 as SemanticIdentity, aa as SemanticTarget, V as ViewScope } from '../editor-BZEJL3vv.cjs';
2
2
  import './document.cjs';
3
3
  import './types.cjs';
4
- import '../review-support-CHuJxHmz.cjs';
5
- import '../ooxml-tree-CG0odFyi.cjs';
6
- import '../tree-op-types-DOYNkKqD.cjs';
7
- import '../semantic-interaction-DgaWs-5w.cjs';
8
- import '../semantic-records-Dq8SlCY8.cjs';
9
- import '../image-resources-CSlQmPIm.cjs';
10
- import '../ooxml-package-Cmbe_M04.cjs';
11
- import '../revision-projection-DRZMzoLD.cjs';
4
+ import '../review-support-T-riLz4Y.cjs';
5
+ import '../ooxml-tree-BU0e3DVi.cjs';
6
+ import '../tree-op-types-CUCwPWjT.cjs';
7
+ import '../semantic-interaction-CDNEU_Tx.cjs';
8
+ import '../semantic-records-DEOs3_tE.cjs';
9
+ import '../image-resources-BaHz4QAd.cjs';
10
+ import '../ooxml-package-CR5us6ad.cjs';
11
+ import '../revision-projection-WzlQGBJx.cjs';
@@ -1,11 +1,11 @@
1
- export { L as EditorScope, U as InteractionAffinity, W as InteractionOutcome, X as InteractionOutcomeCode, a9 as SemanticIdentity, aa as SemanticTarget, V as ViewScope } from '../editor-DIwctMcU.js';
1
+ export { M as EditorScope, U as InteractionAffinity, W as InteractionOutcome, X as InteractionOutcomeCode, a9 as SemanticIdentity, aa as SemanticTarget, V as ViewScope } from '../editor-D2zOJztO.js';
2
2
  import './document.js';
3
3
  import './types.js';
4
- import '../review-support-Bl9sN8cv.js';
5
- import '../ooxml-tree-CG0odFyi.js';
6
- import '../tree-op-types-CZw9QhWX.js';
7
- import '../semantic-interaction-CCVwyw2A.js';
8
- import '../semantic-records-B-qbrnp2.js';
9
- import '../image-resources-e13t-pgy.js';
10
- import '../ooxml-package-BrxTmTsZ.js';
11
- import '../revision-projection-u4nT52xT.js';
4
+ import '../review-support-D4ZBdUXa.js';
5
+ import '../ooxml-tree-BU0e3DVi.js';
6
+ import '../tree-op-types-D0fTNBVW.js';
7
+ import '../semantic-interaction-lvpzZRpA.js';
8
+ import '../semantic-records-CdQvpUj1.js';
9
+ import '../image-resources-Cl5_cNi9.js';
10
+ import '../ooxml-package-D_CtywTW.js';
11
+ import '../revision-projection-UKqvPa4-.js';
@@ -1,8 +1,8 @@
1
- import { e as OoxmlPart } from '../ooxml-tree-CG0odFyi.cjs';
2
- export { R as RevisionAddress } from '../tree-op-types-DOYNkKqD.cjs';
3
- import { R as RevisionDisplayMode } from '../revision-projection-DRZMzoLD.cjs';
4
- import { R as ReviewModelInput, a as ReviewItem, b as ReviewRevisionItem } from '../review-support-CHuJxHmz.cjs';
5
- export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, e as ReviewPosition, f as ReviewRange, g as ReviewRevisionKind } from '../review-support-CHuJxHmz.cjs';
1
+ import { e as OoxmlPart } from '../ooxml-tree-BU0e3DVi.cjs';
2
+ export { R as RevisionAddress } from '../tree-op-types-CUCwPWjT.cjs';
3
+ import { R as RevisionDisplayMode } from '../revision-projection-WzlQGBJx.cjs';
4
+ import { R as ReviewModelInput, a as ReviewItem, b as ReviewRevisionItem } from '../review-support-T-riLz4Y.cjs';
5
+ export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, e as ReviewPosition, f as ReviewRange, g as ReviewRevisionKind } from '../review-support-T-riLz4Y.cjs';
6
6
 
7
7
  /**
8
8
  * `@docx-editor.dev/core/contracts/modules` — the `EditorModule` seam.
@@ -1,8 +1,8 @@
1
- import { e as OoxmlPart } from '../ooxml-tree-CG0odFyi.js';
2
- export { R as RevisionAddress } from '../tree-op-types-CZw9QhWX.js';
3
- import { R as RevisionDisplayMode } from '../revision-projection-u4nT52xT.js';
4
- import { R as ReviewModelInput, a as ReviewItem, b as ReviewRevisionItem } from '../review-support-Bl9sN8cv.js';
5
- export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, e as ReviewPosition, f as ReviewRange, g as ReviewRevisionKind } from '../review-support-Bl9sN8cv.js';
1
+ import { e as OoxmlPart } from '../ooxml-tree-BU0e3DVi.js';
2
+ export { R as RevisionAddress } from '../tree-op-types-D0fTNBVW.js';
3
+ import { R as RevisionDisplayMode } from '../revision-projection-UKqvPa4-.js';
4
+ import { R as ReviewModelInput, a as ReviewItem, b as ReviewRevisionItem } from '../review-support-D4ZBdUXa.js';
5
+ export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, e as ReviewPosition, f as ReviewRange, g as ReviewRevisionKind } from '../review-support-D4ZBdUXa.js';
6
6
 
7
7
  /**
8
8
  * `@docx-editor.dev/core/contracts/modules` — the `EditorModule` seam.
@@ -4,6 +4,8 @@
4
4
  * `@docx-editor.dev/core/contracts/types` re-exports this module verbatim, through
5
5
  * `types-barrel.ts`. There is no `@docx-editor.dev/core/types` subpath.
6
6
  */
7
+ /** Ownership token for one retained selection highlight. @public */
8
+ type SelectionPin = symbol;
7
9
  /**
8
10
  * The LLM- and JSON-facing address for a piece of a document.
9
11
  *
@@ -449,4 +451,4 @@ interface Point {
449
451
  /** What every subscription returns. Calling it twice is safe. */
450
452
  type Unsubscribe = () => void;
451
453
 
452
- export type { Block, ColorValue, ContainerRef, ContentControl, ContentControlFilter, ContentControlType, DocAnchor, DocAnchorRange, DocComment, DocLocation, DocRange, DocTarget, DocumentBody, DocxDocument, DocxDocumentJSON, ExecErrorCode, ExecResult, Extent, FontDefinition, HeaderFooterSet, IndentFormatting, NumberingRef, PageMargins, Paragraph, Point, Rect, Revision, RevisionType, Run, RunFormatting, Section, SectionProperties, StyleDefinition, StyleDefinitions, Table, TableCell, TableRow, Theme, ThemeColorScheme, Unsubscribe, Watermark };
454
+ export type { Block, ColorValue, ContainerRef, ContentControl, ContentControlFilter, ContentControlType, DocAnchor, DocAnchorRange, DocComment, DocLocation, DocRange, DocTarget, DocumentBody, DocxDocument, DocxDocumentJSON, ExecErrorCode, ExecResult, Extent, FontDefinition, HeaderFooterSet, IndentFormatting, NumberingRef, PageMargins, Paragraph, Point, Rect, Revision, RevisionType, Run, RunFormatting, Section, SectionProperties, SelectionPin, StyleDefinition, StyleDefinitions, Table, TableCell, TableRow, Theme, ThemeColorScheme, Unsubscribe, Watermark };
@@ -4,6 +4,8 @@
4
4
  * `@docx-editor.dev/core/contracts/types` re-exports this module verbatim, through
5
5
  * `types-barrel.ts`. There is no `@docx-editor.dev/core/types` subpath.
6
6
  */
7
+ /** Ownership token for one retained selection highlight. @public */
8
+ type SelectionPin = symbol;
7
9
  /**
8
10
  * The LLM- and JSON-facing address for a piece of a document.
9
11
  *
@@ -449,4 +451,4 @@ interface Point {
449
451
  /** What every subscription returns. Calling it twice is safe. */
450
452
  type Unsubscribe = () => void;
451
453
 
452
- export type { Block, ColorValue, ContainerRef, ContentControl, ContentControlFilter, ContentControlType, DocAnchor, DocAnchorRange, DocComment, DocLocation, DocRange, DocTarget, DocumentBody, DocxDocument, DocxDocumentJSON, ExecErrorCode, ExecResult, Extent, FontDefinition, HeaderFooterSet, IndentFormatting, NumberingRef, PageMargins, Paragraph, Point, Rect, Revision, RevisionType, Run, RunFormatting, Section, SectionProperties, StyleDefinition, StyleDefinitions, Table, TableCell, TableRow, Theme, ThemeColorScheme, Unsubscribe, Watermark };
454
+ export type { Block, ColorValue, ContainerRef, ContentControl, ContentControlFilter, ContentControlType, DocAnchor, DocAnchorRange, DocComment, DocLocation, DocRange, DocTarget, DocumentBody, DocxDocument, DocxDocumentJSON, ExecErrorCode, ExecResult, Extent, FontDefinition, HeaderFooterSet, IndentFormatting, NumberingRef, PageMargins, Paragraph, Point, Rect, Revision, RevisionType, Run, RunFormatting, Section, SectionProperties, SelectionPin, StyleDefinition, StyleDefinitions, Table, TableCell, TableRow, Theme, ThemeColorScheme, Unsubscribe, Watermark };
@@ -1,10 +1,10 @@
1
- import { e as OoxmlPart, O as OoxmlNode } from './ooxml-tree-CG0odFyi.cjs';
2
- import { O as OoxmlPackage } from './ooxml-package-Cmbe_M04.cjs';
3
- import { S as SupportedImageMime, b as ImageDecodePort } from './image-resources-CSlQmPIm.cjs';
4
- import { j as DrawingTreeDocOp, a as TreeOpRejection, T as TreeDocOp } from './tree-op-types-DOYNkKqD.cjs';
5
- import { c as HeaderFooterKind, H as HeaderFooterVariant } from './hf-references-BPET4tlK.cjs';
6
- import { N as NoteKind } from './note-nodes-B2wWES2L.cjs';
7
- import { T as TreeModelChange, a as TreeStoryRef, b as TreeDocumentStore, c as TransactionContext, d as TransactOptions, S as SelectionMark, e as TreeDocumentCheckpoint } from './tree-store-Jg-q7fyf.cjs';
1
+ import { e as OoxmlPart, O as OoxmlNode } from './ooxml-tree-BU0e3DVi.cjs';
2
+ import { O as OoxmlPackage } from './ooxml-package-CR5us6ad.cjs';
3
+ import { S as SupportedImageMime, b as ImageDecodePort } from './image-resources-BaHz4QAd.cjs';
4
+ import { h as DrawingTreeDocOp, a as TreeOpRejection, T as TreeDocOp } from './tree-op-types-CUCwPWjT.cjs';
5
+ import { c as HeaderFooterKind, H as HeaderFooterVariant } from './hf-references-CgEOSw3i.cjs';
6
+ import { N as NoteKind } from './note-nodes-C6DLxlvj.cjs';
7
+ import { T as TreeModelChange, a as TreeStoryRef, b as TreeDocumentStore, c as TransactionContext, d as TransactOptions, S as SelectionMark, e as TreeDocumentCheckpoint } from './tree-store-BqgeCa1Q.cjs';
8
8
 
9
9
  /** A freshly allocated drawing property id, or the reason one could not be minted. */
10
10
  type DrawingPropertyIdResult = {
@@ -1,10 +1,10 @@
1
- import { e as OoxmlPart, O as OoxmlNode } from './ooxml-tree-CG0odFyi.js';
2
- import { O as OoxmlPackage } from './ooxml-package-BrxTmTsZ.js';
3
- import { S as SupportedImageMime, b as ImageDecodePort } from './image-resources-e13t-pgy.js';
4
- import { j as DrawingTreeDocOp, a as TreeOpRejection, T as TreeDocOp } from './tree-op-types-CZw9QhWX.js';
5
- import { c as HeaderFooterKind, H as HeaderFooterVariant } from './hf-references-CAp1xTv6.js';
6
- import { N as NoteKind } from './note-nodes-CZQXU6Fg.js';
7
- import { T as TreeModelChange, a as TreeStoryRef, b as TreeDocumentStore, c as TransactionContext, d as TransactOptions, S as SelectionMark, e as TreeDocumentCheckpoint } from './tree-store-9TaX-L0V.js';
1
+ import { e as OoxmlPart, O as OoxmlNode } from './ooxml-tree-BU0e3DVi.js';
2
+ import { O as OoxmlPackage } from './ooxml-package-D_CtywTW.js';
3
+ import { S as SupportedImageMime, b as ImageDecodePort } from './image-resources-Cl5_cNi9.js';
4
+ import { h as DrawingTreeDocOp, a as TreeOpRejection, T as TreeDocOp } from './tree-op-types-D0fTNBVW.js';
5
+ import { c as HeaderFooterKind, H as HeaderFooterVariant } from './hf-references-BdjsQNE_.js';
6
+ import { N as NoteKind } from './note-nodes-BPSTVDMr.js';
7
+ import { T as TreeModelChange, a as TreeStoryRef, b as TreeDocumentStore, c as TransactionContext, d as TransactOptions, S as SelectionMark, e as TreeDocumentCheckpoint } from './tree-store-CIKASRHk.js';
8
8
 
9
9
  /** A freshly allocated drawing property id, or the reason one could not be minted. */
10
10
  type DrawingPropertyIdResult = {
@@ -0,0 +1,2 @@
1
+ import {b}from'./chunk-WU7PUTVA.js';async function Pr(s={}){var _,t=s,r=typeof window=="object",a=typeof WorkerGlobalScope<"u",o=typeof process=="object"&&process.versions?.node&&process.type!="renderer";if(o){let{createRequire:e}=await import('./node-module-shim-TTKTT66I.js');var i=e(import.meta.url);}var l=(e,h)=>{throw h},b$1=import.meta.url,d="";function T(e){return t.locateFile?t.locateFile(e,d):d+e}var m,R;if(o){var L=i("fs");b$1.startsWith("file:")&&(d=i("path").dirname(i("url").fileURLToPath(b$1))+"/"),R=e=>{e=X(e)?new URL(e):e;var h=L.readFileSync(e);return h},m=async(e,h=true)=>{e=X(e)?new URL(e):e;var y=L.readFileSync(e,h?void 0:"utf8");return y},process.argv.length>1&&(process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),l=(e,h)=>{throw process.exitCode=e,h};}else if(r||a){try{d=new URL(".",b$1).href;}catch{}a&&(R=e=>{var h=new XMLHttpRequest;return h.open("GET",e,false),h.responseType="arraybuffer",h.send(null),new Uint8Array(h.response)}),m=async e=>{if(X(e))return new Promise((y,A)=>{var P=new XMLHttpRequest;P.open("GET",e,true),P.responseType="arraybuffer",P.onload=()=>{if(P.status==200||P.status==0&&P.response){y(P.response);return}A(P.status);},P.onerror=A,P.send(null);});var h=await fetch(e,{credentials:"same-origin"});if(h.ok)return h.arrayBuffer();throw new Error(h.status+" : "+h.url)};}console.log.bind(console);var C=console.error.bind(console),B,Y=false,Z,X=e=>e.startsWith("file://"),ct,it,j,ut,ft=false;function ht(){var e=j.buffer;t.HEAP8=new Int8Array(e),t.HEAPU8=ut=new Uint8Array(e),t.HEAPU16=new Uint16Array(e),t.HEAP32=new Int32Array(e),t.HEAPU32=new Uint32Array(e),t.HEAPF32=new Float32Array(e),new BigInt64Array(e),new BigUint64Array(e);}function Kt(){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)c_(t.preRun.shift());pt(dt);}function Jt(){ft=true,F.__wasm_call_ctors();}function Qt(){if(t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)o_(t.postRun.shift());pt(gt);}var O=0,M=null;function qt(e){O++,t.monitorRunDependencies?.(O);}function xt(e){if(O--,t.monitorRunDependencies?.(O),O==0&&M){var h=M;M=null,h();}}function lt(e){t.onAbort?.(e),e="Aborted("+e+")",C(e),Y=true,e+=". Build with -sASSERTIONS for more info.";var h=new WebAssembly.RuntimeError(e);throw it?.(h),h}var q;function t_(){return t.locateFile?T("harfbuzz.wasm"):b(new URL("harfbuzz.wasm",import.meta.url).href)}function __(e){if(e==q&&B)return new Uint8Array(B);if(R)return R(e);throw "both async and sync fetching of the wasm failed"}async function e_(e){if(!B)try{var h=await m(e);return new Uint8Array(h)}catch{}return __(e)}async function n_(e,h){try{var y=await e_(e),A=await WebAssembly.instantiate(y,h);return A}catch(P){C(`failed to asynchronously prepare wasm: ${P}`),lt(P);}}async function r_(e,h,y){if(!e&&!X(h)&&!o)try{var A=fetch(h,{credentials:"same-origin"}),P=await WebAssembly.instantiateStreaming(A,y);return P}catch(H){C(`wasm streaming compile failed: ${H}`),C("falling back to ArrayBuffer instantiation");}return n_(h,y)}function s_(){return {env:kt,wasi_snapshot_preview1:kt}}async function a_(){function e(H,nt){return F=H.exports,t.wasmExports=F,j=F.memory,ht(),W=F.__indirect_function_table,pr(F),xt(),F}qt();function h(H){return e(H.instance)}var y=s_();if(t.instantiateWasm)return new Promise((H,nt)=>{t.instantiateWasm(y,(dr,yr)=>{H(e(dr));});});q??=t_();var A=await r_(B,q,y),P=h(A);return P}class bt{name="ExitStatus";constructor(h){this.message=`Program terminated with exit(${h})`,this.status=h;}}var pt=e=>{for(;e.length>0;)e.shift()(t);},gt=[],o_=e=>gt.push(e),dt=[],c_=e=>dt.push(e),x=true,i_=e=>Rt(e),u_=()=>Ft(),f_=()=>lt(""),yt=0,h_=()=>{x=false,yt=0;},V={},Pt=e=>{if(e instanceof bt||e=="unwind")return Z;l(1,e);},At=()=>x||yt>0,vt=e=>{Z=e,At()||(t.onExit?.(e),Y=true),l(e,new bt(e));},l_=(e,h)=>{Z=e,vt(e);},b_=l_,p_=()=>{if(!At())try{b_(Z);}catch(e){Pt(e);}},g_=e=>{if(!Y)try{e(),p_();}catch(h){Pt(h);}},d_=()=>performance.now(),y_=(e,h)=>{if(V[e]&&(clearTimeout(V[e].id),delete V[e]),!h)return 0;var y=setTimeout(()=>{delete V[e],g_(()=>Ht(e,d_()));},h);return V[e]={id:y,timeout_ms:h},0},P_=()=>2147483648,A_=(e,h)=>Math.ceil(e/h)*h,v_=e=>{var h=j.buffer.byteLength,y=(e-h+65535)/65536|0;try{return j.grow(y),ht(),1}catch{}},T_=e=>{var h=ut.length;e>>>=0;var y=P_();if(e>y)return false;for(var A=1;A<=4;A*=2){var P=h*(1+.2/A);P=Math.min(P,e+100663296);var H=Math.min(y,A_(Math.max(e,P),65536)),nt=v_(H);if(nt)return true}return false},Tt=e=>{let h=e.length;return [h%128|128,h>>7,...e]},m_={i:127,p:127,j:126,f:125,d:124,e:111},mt=e=>Tt(Array.from(e,h=>{var y=m_[h];return y})),E_=(e,h)=>{var y=Uint8Array.of(0,97,115,109,1,0,0,0,1,...Tt([1,96,...mt(h.slice(1)),...mt(h[0]==="v"?"":h[0])]),2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),A=new WebAssembly.Module(y),P=new WebAssembly.Instance(A,{e:{f:e}}),H=P.exports.f;return H},W,Et=e=>W.get(e),H_=(e,h)=>{if(D)for(var y=e;y<e+h;y++){var A=Et(y);A&&D.set(A,y);}},D,R_=e=>(D||(D=new WeakMap,H_(0,W.length)),D.get(e)||0),tt=[],S_=()=>tt.length?tt.pop():W.grow(1),_t=(e,h)=>W.set(e,h),F_=(e,h)=>{var y=R_(e);if(y)return y;var A=S_();try{_t(A,e);}catch(H){if(!(H instanceof TypeError))throw H;var P=E_(e,h);_t(A,P);}return D.set(e,A),A},k_=e=>{D.delete(Et(e)),_t(e,null),tt.push(e);},U_=e=>St(e);t.noExitRuntime&&(x=t.noExitRuntime),t.print&&(t.print),t.printErr&&(C=t.printErr),t.wasmBinary&&(B=t.wasmBinary),t.arguments&&(t.arguments),t.thisProgram&&(t.thisProgram),t.wasmExports=F,t.stackSave=u_,t.stackRestore=i_,t.stackAlloc=U_,t.addFunction=F_,t.removeFunction=k_;var Ht,Rt,St,Ft;function pr(e){t._hb_blob_create=e.hb_blob_create,t._hb_blob_destroy=e.hb_blob_destroy,t._hb_blob_get_length=e.hb_blob_get_length,t._hb_blob_get_data=e.hb_blob_get_data,t._hb_buffer_serialize=e.hb_buffer_serialize,t._hb_buffer_create=e.hb_buffer_create,t._hb_buffer_reset=e.hb_buffer_reset,t._hb_buffer_reference=e.hb_buffer_reference,t._hb_buffer_destroy=e.hb_buffer_destroy,t._hb_buffer_get_content_type=e.hb_buffer_get_content_type,t._hb_buffer_set_direction=e.hb_buffer_set_direction,t._hb_buffer_set_script=e.hb_buffer_set_script,t._hb_buffer_set_language=e.hb_buffer_set_language,t._hb_buffer_set_flags=e.hb_buffer_set_flags,t._hb_buffer_set_cluster_level=e.hb_buffer_set_cluster_level,t._hb_buffer_clear_contents=e.hb_buffer_clear_contents,t._hb_buffer_add=e.hb_buffer_add,t._hb_buffer_get_length=e.hb_buffer_get_length,t._hb_buffer_get_glyph_infos=e.hb_buffer_get_glyph_infos,t._hb_buffer_get_glyph_positions=e.hb_buffer_get_glyph_positions,t._hb_glyph_info_get_glyph_flags=e.hb_glyph_info_get_glyph_flags,t._hb_buffer_guess_segment_properties=e.hb_buffer_guess_segment_properties,t._hb_buffer_add_utf8=e.hb_buffer_add_utf8,t._hb_buffer_add_utf16=e.hb_buffer_add_utf16,t._hb_buffer_add_codepoints=e.hb_buffer_add_codepoints,t._hb_buffer_set_message_func=e.hb_buffer_set_message_func,t._hb_language_from_string=e.hb_language_from_string,t._hb_language_to_string=e.hb_language_to_string,t._hb_script_from_string=e.hb_script_from_string,t._hb_version=e.hb_version,t._hb_version_string=e.hb_version_string,t._hb_feature_from_string=e.hb_feature_from_string,t._hb_feature_to_string=e.hb_feature_to_string,t._hb_variation_from_string=e.hb_variation_from_string,t._hb_variation_to_string=e.hb_variation_to_string,t._malloc=e.malloc,t._free=e.free,t._hb_draw_funcs_set_move_to_func=e.hb_draw_funcs_set_move_to_func,t._hb_draw_funcs_set_line_to_func=e.hb_draw_funcs_set_line_to_func,t._hb_draw_funcs_set_quadratic_to_func=e.hb_draw_funcs_set_quadratic_to_func,t._hb_draw_funcs_set_cubic_to_func=e.hb_draw_funcs_set_cubic_to_func,t._hb_draw_funcs_set_close_path_func=e.hb_draw_funcs_set_close_path_func,t._hb_draw_funcs_create=e.hb_draw_funcs_create,t._hb_draw_funcs_destroy=e.hb_draw_funcs_destroy,t._hb_face_create=e.hb_face_create,t._hb_face_reference=e.hb_face_reference,t._hb_face_destroy=e.hb_face_destroy,t._hb_face_reference_table=e.hb_face_reference_table,t._hb_face_get_upem=e.hb_face_get_upem,t._hb_face_collect_unicodes=e.hb_face_collect_unicodes,t._hb_font_funcs_create=e.hb_font_funcs_create,t._hb_font_funcs_destroy=e.hb_font_funcs_destroy,t._hb_font_funcs_set_font_h_extents_func=e.hb_font_funcs_set_font_h_extents_func,t._hb_font_funcs_set_font_v_extents_func=e.hb_font_funcs_set_font_v_extents_func,t._hb_font_funcs_set_nominal_glyph_func=e.hb_font_funcs_set_nominal_glyph_func,t._hb_font_funcs_set_nominal_glyphs_func=e.hb_font_funcs_set_nominal_glyphs_func,t._hb_font_funcs_set_variation_glyph_func=e.hb_font_funcs_set_variation_glyph_func,t._hb_font_funcs_set_glyph_h_advance_func=e.hb_font_funcs_set_glyph_h_advance_func,t._hb_font_funcs_set_glyph_v_advance_func=e.hb_font_funcs_set_glyph_v_advance_func,t._hb_font_funcs_set_glyph_h_advances_func=e.hb_font_funcs_set_glyph_h_advances_func,t._hb_font_funcs_set_glyph_v_advances_func=e.hb_font_funcs_set_glyph_v_advances_func,t._hb_font_funcs_set_glyph_h_origin_func=e.hb_font_funcs_set_glyph_h_origin_func,t._hb_font_funcs_set_glyph_v_origin_func=e.hb_font_funcs_set_glyph_v_origin_func,t._hb_font_funcs_set_glyph_h_kerning_func=e.hb_font_funcs_set_glyph_h_kerning_func,t._hb_font_funcs_set_glyph_extents_func=e.hb_font_funcs_set_glyph_extents_func,t._hb_font_funcs_set_glyph_name_func=e.hb_font_funcs_set_glyph_name_func,t._hb_font_funcs_set_glyph_from_name_func=e.hb_font_funcs_set_glyph_from_name_func,t._hb_font_get_h_extents=e.hb_font_get_h_extents,t._hb_font_get_v_extents=e.hb_font_get_v_extents,t._hb_font_get_glyph=e.hb_font_get_glyph,t._hb_font_get_nominal_glyph=e.hb_font_get_nominal_glyph,t._hb_font_get_variation_glyph=e.hb_font_get_variation_glyph,t._hb_font_get_glyph_h_advance=e.hb_font_get_glyph_h_advance,t._hb_font_get_glyph_v_advance=e.hb_font_get_glyph_v_advance,t._hb_font_get_glyph_h_origin=e.hb_font_get_glyph_h_origin,t._hb_font_get_glyph_v_origin=e.hb_font_get_glyph_v_origin,t._hb_font_get_glyph_extents=e.hb_font_get_glyph_extents,t._hb_font_get_glyph_from_name=e.hb_font_get_glyph_from_name,t._hb_font_draw_glyph_or_fail=e.hb_font_draw_glyph_or_fail,t._hb_font_paint_glyph_or_fail=e.hb_font_paint_glyph_or_fail,t._hb_font_draw_glyph=e.hb_font_draw_glyph,t._hb_font_paint_glyph=e.hb_font_paint_glyph,t._hb_font_glyph_to_string=e.hb_font_glyph_to_string,t._hb_font_create=e.hb_font_create,t._hb_font_set_variations=e.hb_font_set_variations,t._hb_font_create_sub_font=e.hb_font_create_sub_font,t._hb_font_reference=e.hb_font_reference,t._hb_font_destroy=e.hb_font_destroy,t._hb_font_get_face=e.hb_font_get_face,t._hb_font_set_funcs=e.hb_font_set_funcs,t._hb_font_set_scale=e.hb_font_set_scale,t._hb_ot_color_has_palettes=e.hb_ot_color_has_palettes,t._hb_ot_color_palette_get_count=e.hb_ot_color_palette_get_count,t._hb_ot_color_palette_get_name_id=e.hb_ot_color_palette_get_name_id,t._hb_ot_color_palette_color_get_name_id=e.hb_ot_color_palette_color_get_name_id,t._hb_ot_color_palette_get_flags=e.hb_ot_color_palette_get_flags,t._hb_ot_color_palette_get_colors=e.hb_ot_color_palette_get_colors,t._hb_ot_color_has_layers=e.hb_ot_color_has_layers,t._hb_ot_color_has_paint=e.hb_ot_color_has_paint,t._hb_ot_color_glyph_has_paint=e.hb_ot_color_glyph_has_paint,t._hb_ot_color_glyph_get_layers=e.hb_ot_color_glyph_get_layers,t._hb_ot_color_has_png=e.hb_ot_color_has_png,t._hb_ot_color_glyph_reference_png=e.hb_ot_color_glyph_reference_png,t._hb_ot_layout_get_glyph_class=e.hb_ot_layout_get_glyph_class,t._hb_ot_layout_get_ligature_carets=e.hb_ot_layout_get_ligature_carets,t._hb_ot_layout_table_get_script_tags=e.hb_ot_layout_table_get_script_tags,t._hb_ot_layout_table_get_feature_tags=e.hb_ot_layout_table_get_feature_tags,t._hb_ot_layout_script_get_language_tags=e.hb_ot_layout_script_get_language_tags,t._hb_ot_layout_language_get_feature_tags=e.hb_ot_layout_language_get_feature_tags,t._hb_ot_layout_feature_get_lookups=e.hb_ot_layout_feature_get_lookups,t._hb_ot_layout_feature_get_name_ids=e.hb_ot_layout_feature_get_name_ids,t._hb_ot_metrics_get_position_with_fallback=e.hb_ot_metrics_get_position_with_fallback,t._hb_ot_layout_lookup_get_optical_bound=e.hb_ot_layout_lookup_get_optical_bound,t._hb_ot_metrics_get_position=e.hb_ot_metrics_get_position,t._hb_ot_metrics_get_variation=e.hb_ot_metrics_get_variation,t._hb_ot_metrics_get_x_variation=e.hb_ot_metrics_get_x_variation,t._hb_ot_metrics_get_y_variation=e.hb_ot_metrics_get_y_variation,t._hb_ot_name_list_names=e.hb_ot_name_list_names,t._hb_ot_name_get_utf16=e.hb_ot_name_get_utf16,t._hb_set_create=e.hb_set_create,t._hb_set_destroy=e.hb_set_destroy,t._hb_ot_tag_to_script=e.hb_ot_tag_to_script,t._hb_ot_tag_to_language=e.hb_ot_tag_to_language,t._hb_ot_var_get_axis_infos=e.hb_ot_var_get_axis_infos,t._hb_paint_funcs_set_push_transform_func=e.hb_paint_funcs_set_push_transform_func,t._hb_paint_funcs_set_pop_transform_func=e.hb_paint_funcs_set_pop_transform_func,t._hb_paint_funcs_set_color_glyph_func=e.hb_paint_funcs_set_color_glyph_func,t._hb_paint_funcs_set_push_clip_glyph_func=e.hb_paint_funcs_set_push_clip_glyph_func,t._hb_paint_funcs_set_push_clip_rectangle_func=e.hb_paint_funcs_set_push_clip_rectangle_func,t._hb_paint_funcs_set_pop_clip_func=e.hb_paint_funcs_set_pop_clip_func,t._hb_paint_funcs_set_color_func=e.hb_paint_funcs_set_color_func,t._hb_paint_funcs_set_image_func=e.hb_paint_funcs_set_image_func,t._hb_paint_funcs_set_linear_gradient_func=e.hb_paint_funcs_set_linear_gradient_func,t._hb_paint_funcs_set_radial_gradient_func=e.hb_paint_funcs_set_radial_gradient_func,t._hb_paint_funcs_set_sweep_gradient_func=e.hb_paint_funcs_set_sweep_gradient_func,t._hb_paint_funcs_set_push_group_func=e.hb_paint_funcs_set_push_group_func,t._hb_paint_funcs_set_pop_group_func=e.hb_paint_funcs_set_pop_group_func,t._hb_paint_funcs_set_custom_palette_color_func=e.hb_paint_funcs_set_custom_palette_color_func,t._hb_paint_funcs_create=e.hb_paint_funcs_create,t._hb_paint_funcs_destroy=e.hb_paint_funcs_destroy,t._hb_color_line_get_color_stops=e.hb_color_line_get_color_stops,t._hb_color_line_get_extend=e.hb_color_line_get_extend,t._hb_set_get_population=e.hb_set_get_population,t._hb_set_next_many=e.hb_set_next_many,t._hb_shape=e.hb_shape,Ht=e._emscripten_timeout,Rt=e._emscripten_stack_restore,St=e._emscripten_stack_alloc,Ft=e.emscripten_stack_get_current;}var kt={_abort_js:f_,_emscripten_runtime_keepalive_clear:h_,_setitimer_js:y_,emscripten_resize_heap:T_,proc_exit:vt},F=await a_();function et(){if(O>0){M=et;return}if(Kt(),O>0){M=et;return}function e(){t.calledRun=true,!Y&&(Jt(),ct?.(t),t.onRuntimeInitialized?.(),Qt());}t.setStatus?(t.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>t.setStatus(""),1),e();},1)):e();}function gr(){if(t.preInit)for(typeof t.preInit=="function"&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.shift()();}return gr(),et(),ft?_=t:_=new Promise((e,h)=>{ct=e,it=h;}),_}var It=Pr;var n,c,Ct,Ar=new TextDecoder("utf8"),vr=new TextEncoder,at=new FinalizationRegistry(s=>{s();});function $(s,_){let t=s.ptr;at.register(s,()=>_(t));}function Tr(s){n=s,c=n.wasmExports,Ct=n.addFunction(_=>{c.free(_);},"vi");}function p(s){return (s.charCodeAt(0)&255)<<24|(s.charCodeAt(1)&255)<<16|(s.charCodeAt(2)&255)<<8|(s.charCodeAt(3)&255)<<0}function S(s){return [String.fromCharCode(s>>24&255),String.fromCharCode(s>>16&255),String.fromCharCode(s>>8&255),String.fromCharCode(s>>0&255)].join("")}function I(s,_){let t;return _==null?t=n.HEAPU8.indexOf(0,s):t=s+_,Ar.decode(n.HEAPU8.subarray(s,t))}function mr(s,_){let t=s/2+_;return String.fromCharCode(...n.HEAPU16.subarray(s/2,t))}function z(s){let _=c.malloc(s.length+1);for(let t=0;t<s.length;++t){let r=s.charCodeAt(t);if(r>127)throw new Error("Expected ASCII text");n.HEAPU8[_+t]=r;}return n.HEAPU8[_+s.length]=0,{ptr:_,length:s.length,free:function(){c.free(_);}}}function Er(s){let _=c.malloc(s.length);return vr.encodeInto(s,n.HEAPU8.subarray(_,_+s.length)),{ptr:_,length:s.length,free:function(){c.free(_);}}}function Hr(s){let _=c.malloc(s.length*2),t=n.HEAPU16.subarray(_/2,_/2+s.length);for(let r=0;r<t.length;++r)t[r]=s.charCodeAt(r);return {ptr:_,length:t.length,free:function(){c.free(_);}}}function Ot(s){return I(c.hb_language_to_string(s))}function Rr(s){let _=z(s),t=c.hb_language_from_string(_.ptr,-1);return _.free(),t}function Sr(s){let _=c.hb_set_get_population(s),t=c.malloc(_<<2),r=t>>2;return c.hb_set_next_many(s,-1,t,_),n.HEAPU32.subarray(r,r+_)}var Q=[void 0],Dt=[];function v(s){if(s===void 0)return 0;let _=Dt.pop()??Q.length;return Q[_]=s,_}function g(s){return Q[s]}function N(s){s!==0&&(Q[s]=void 0,Dt.push(s));}function ot(s){return {red:s>>8&255,green:s>>16&255,blue:s>>24&255,alpha:s&255}}function st(s){return (s.red<<8|s.green<<16|s.blue<<24|s.alpha)>>>0}var Gr={DEFAULT:0,USABLE_WITH_LIGHT_BACKGROUND:1,USABLE_WITH_DARK_BACKGROUND:2},Br={PAD:0,REPEAT:1,REFLECT:2},Mr={CLEAR:0,SRC:1,DEST:2,SRC_OVER:3,DEST_OVER:4,SRC_IN:5,DEST_IN:6,SRC_OUT:7,DEST_OUT:8,SRC_ATOP:9,DEST_ATOP:10,XOR:11,PLUS:12,SCREEN:13,OVERLAY:14,DARKEN:15,LIGHTEN:16,COLOR_DODGE:17,COLOR_BURN:18,HARD_LIGHT:19,SOFT_LIGHT:20,DIFFERENCE:21,EXCLUSION:22,MULTIPLY:23,HSL_HUE:24,HSL_SATURATION:25,HSL_COLOR:26,HSL_LUMINOSITY:27},Vr={HIDDEN:1},Wr={UNSAFE_TO_BREAK:1,UNSAFE_TO_CONCAT:2,SAFE_TO_INSERT_TATWEEL:4,DEFINED:7},wr=class{constructor(s){let _=s instanceof Uint8Array?s:new Uint8Array(s),t=c.malloc(_.byteLength);n.HEAPU8.set(_,t),this.ptr=c.hb_blob_create(t,_.byteLength,2,t,Ct),$(this,c.hb_blob_destroy);}},w=65535,zr={UNCLASSIFIED:0,BASE_GLYPH:1,LIGATURE:2,MARK:3,COMPONENT:4},Fr=class{constructor(s,_=0){typeof s=="number"?this.ptr=c.hb_face_reference(s):this.ptr=c.hb_face_create(s.ptr,_),this.upem=c.hb_face_get_upem(this.ptr),$(this,c.hb_face_destroy);}referenceTable(s){let _=c.hb_face_reference_table(this.ptr,p(s)),t=c.hb_blob_get_length(_);if(!t)return;let r=c.hb_blob_get_data(_,0);return n.HEAPU8.subarray(r,r+t)}getAxisInfos(){let s=n.stackSave(),_=n.stackAlloc(2048),t=n.stackAlloc(4);n.HEAPU32[t/4]=64,c.hb_ot_var_get_axis_infos(this.ptr,0,t,_);let r={};return Array.from({length:n.HEAPU32[t/4]}).forEach((a,o)=>{let i={axisIndex:n.HEAPU32[_/4+o*8],tag:S(n.HEAPU32[_/4+o*8+1]),nameId:n.HEAPU32[_/4+o*8+2],flags:n.HEAPU32[_/4+o*8+3],min:n.HEAPF32[_/4+o*8+4],default:n.HEAPF32[_/4+o*8+5],max:n.HEAPF32[_/4+o*8+6]};r[i.tag]=i;}),n.stackRestore(s),r}collectUnicodes(){let s=c.hb_set_create();c.hb_face_collect_unicodes(this.ptr,s);let _=Sr(s);return c.hb_set_destroy(s),_}getTableScriptTags(s){let _=n.stackSave(),t=p(s),r=0,a=128,o=n.stackAlloc(4),i=n.stackAlloc(512),u=[];for(;a==128;){n.HEAPU32[o/4]=a,c.hb_ot_layout_table_get_script_tags(this.ptr,t,r,o,i),a=n.HEAPU32[o/4];let f=n.HEAPU32.subarray(i/4,i/4+a);u.push(...Array.from(f).map(S)),r+=a;}return n.stackRestore(_),u}getTableFeatureTags(s){let _=n.stackSave(),t=p(s),r=0,a=128,o=n.stackAlloc(4),i=n.stackAlloc(512),u=[];for(;a==128;){n.HEAPU32[o/4]=a,c.hb_ot_layout_table_get_feature_tags(this.ptr,t,r,o,i),a=n.HEAPU32[o/4];let f=n.HEAPU32.subarray(i/4,i/4+a);u.push(...Array.from(f).map(S)),r+=a;}return n.stackRestore(_),u}getScriptLanguageTags(s,_){let t=n.stackSave(),r=p(s),a=0,o=128,i=n.stackAlloc(4),u=n.stackAlloc(512),f=[];for(;o==128;){n.HEAPU32[i/4]=o,c.hb_ot_layout_script_get_language_tags(this.ptr,r,_,a,i,u),o=n.HEAPU32[i/4];let l=n.HEAPU32.subarray(u/4,u/4+o);f.push(...Array.from(l).map(S)),a+=o;}return n.stackRestore(t),f}getLanguageFeatureTags(s,_,t){let r=n.stackSave(),a=p(s),o=0,i=128,u=n.stackAlloc(4),f=n.stackAlloc(512),l=[];for(;i==128;){n.HEAPU32[u/4]=i,c.hb_ot_layout_language_get_feature_tags(this.ptr,a,_,t,o,u,f),i=n.HEAPU32[u/4];let b=n.HEAPU32.subarray(f/4,f/4+i);l.push(...Array.from(b).map(S)),o+=i;}return n.stackRestore(r),l}getFeatureLookups(s,_){let t=n.stackSave(),r=p(s),a=0,o=128,i=n.stackAlloc(4),u=n.stackAlloc(512),f=[];for(;o==128;){n.HEAPU32[i/4]=o,c.hb_ot_layout_feature_get_lookups(this.ptr,r,_,a,i,u),o=n.HEAPU32[i/4];let l=n.HEAPU32.subarray(u/4,u/4+o);f.push(...Array.from(l)),a+=o;}return n.stackRestore(t),f}getGlyphClass(s){return c.hb_ot_layout_get_glyph_class(this.ptr,s)}listNames(){let s=n.stackSave(),_=n.stackAlloc(4),t=c.hb_ot_name_list_names(this.ptr,_),r=n.HEAPU32[_/4],a=[];for(let o=0;o<r;o++)a.push({nameId:n.HEAPU32[t/4+o*3],language:Ot(n.HEAPU32[t/4+o*3+2])});return n.stackRestore(s),a}getName(s,_){let t=n.stackSave(),r=Rr(_),a=c.hb_ot_name_get_utf16(this.ptr,s,r,0,0)+1,o=n.stackAlloc(4),i=c.malloc(a*2);n.HEAPU32[o/4]=a,c.hb_ot_name_get_utf16(this.ptr,s,r,o,i);let u=mr(i,a-1);return c.free(i),n.stackRestore(t),u}getFeatureNameIds(s,_){let t=n.stackSave(),r=p(s),a=n.stackAlloc(4),o=n.stackAlloc(4),i=n.stackAlloc(4),u=n.stackAlloc(4),f=n.stackAlloc(4),l=c.hb_ot_layout_feature_get_name_ids(this.ptr,r,_,a,o,i,u,f),b;if(l){let d=n.HEAPU32[a/4],T=n.HEAPU32[o/4],m=n.HEAPU32[i/4],R=n.HEAPU32[u/4],L=n.HEAPU32[f/4];b={paramUiLabelNameIds:Array.from({length:R},(G,C)=>L+C)},d!=w&&(b.uiLabelNameId=d),T!=w&&(b.uiTooltipTextNameId=T),m!=w&&(b.sampleTextNameId=m);}return n.stackRestore(t),b}hasColorPalettes(){return !!c.hb_ot_color_has_palettes(this.ptr)}getColorPalettes(){let s=c.hb_ot_color_palette_get_count(this.ptr),_=[],t=n.stackSave(),r=n.stackAlloc(4),a=n.stackAlloc(512);for(let o=0;o<s;o++){let i=[],u=0,f=128;for(;f===128;){n.HEAPU32[r/4]=f,c.hb_ot_color_palette_get_colors(this.ptr,o,u,r,a),f=n.HEAPU32[r/4];for(let d=0;d<f;d++){let T=ot(n.HEAPU32[a/4+d]),m=c.hb_ot_color_palette_color_get_name_id(this.ptr,u+d);m!=w&&(T.nameId=m),i.push(T);}u+=f;}let l={colors:i,flags:c.hb_ot_color_palette_get_flags(this.ptr,o)},b=c.hb_ot_color_palette_get_name_id(this.ptr,o);b!=w&&(l.nameId=b),_.push(l);}return n.stackRestore(t),_}hasColorLayers(){return !!c.hb_ot_color_has_layers(this.ptr)}getGlyphColorLayers(s){let _=[],t=n.stackSave(),r=n.stackAlloc(4),a=n.stackAlloc(1024),o=0,i=128;for(;i===128;){n.HEAPU32[r/4]=i,c.hb_ot_color_glyph_get_layers(this.ptr,s,o,r,a),i=n.HEAPU32[r/4];for(let u=0;u<i;u++){let f=a/4+u*2,l={glyph:n.HEAPU32[f]},b=n.HEAPU32[f+1];b!=65535&&(l.colorIndex=b),_.push(l);}o+=i;}return n.stackRestore(t),_}hasColorPaint(){return !!c.hb_ot_color_has_paint(this.ptr)}glyphHasColorPaint(s){return !!c.hb_ot_color_glyph_has_paint(this.ptr,s)}hasColorPng(){return !!c.hb_ot_color_has_png(this.ptr)}},Lt=class{constructor(){this.funcPtrs=[],this.userDataPtrs=[],this.ptr=c.hb_draw_funcs_create();let s=this.ptr,_=this.funcPtrs,t=this.userDataPtrs;at.register(this,()=>{c.hb_draw_funcs_destroy(s);for(let r of _)n.removeFunction(r);for(let r of t)N(r);});}setMoveToFunc(s,_){let t=v(_);this.userDataPtrs.push(t);let r=n.addFunction((a,o,i,u,f,l)=>{s(u,f,g(o),g(l));},"viiiffi");this.funcPtrs.push(r),c.hb_draw_funcs_set_move_to_func(this.ptr,r,t,0);}setLineToFunc(s,_){let t=v(_);this.userDataPtrs.push(t);let r=n.addFunction((a,o,i,u,f,l)=>{s(u,f,g(o),g(l));},"viiiffi");this.funcPtrs.push(r),c.hb_draw_funcs_set_line_to_func(this.ptr,r,t,0);}setQuadraticToFunc(s,_){let t=v(_);this.userDataPtrs.push(t);let r=n.addFunction((a,o,i,u,f,l,b,d)=>{s(u,f,l,b,g(o),g(d));},"viiiffffi");this.funcPtrs.push(r),c.hb_draw_funcs_set_quadratic_to_func(this.ptr,r,t,0);}setCubicToFunc(s,_){let t=v(_);this.userDataPtrs.push(t);let r=n.addFunction((a,o,i,u,f,l,b,d,T,m)=>{s(u,f,l,b,d,T,g(o),g(m));},"viiiffffffi");this.funcPtrs.push(r),c.hb_draw_funcs_set_cubic_to_func(this.ptr,r,t,0);}setClosePathFunc(s,_){let t=v(_);this.userDataPtrs.push(t);let r=n.addFunction((a,o,i,u)=>{s(g(o),g(u));},"viiii");this.funcPtrs.push(r),c.hb_draw_funcs_set_close_path_func(this.ptr,r,t,0);}},$r={HORIZONTAL_ASCENDER:p("hasc"),HORIZONTAL_DESCENDER:p("hdsc"),HORIZONTAL_LINE_GAP:p("hlgp"),HORIZONTAL_CLIPPING_ASCENT:p("hcla"),HORIZONTAL_CLIPPING_DESCENT:p("hcld"),VERTICAL_ASCENDER:p("vasc"),VERTICAL_DESCENDER:p("vdsc"),VERTICAL_LINE_GAP:p("vlgp"),HORIZONTAL_CARET_RISE:p("hcrs"),HORIZONTAL_CARET_RUN:p("hcrn"),HORIZONTAL_CARET_OFFSET:p("hcof"),VERTICAL_CARET_RISE:p("vcrs"),VERTICAL_CARET_RUN:p("vcrn"),VERTICAL_CARET_OFFSET:p("vcof"),X_HEIGHT:p("xhgt"),CAP_HEIGHT:p("cpht"),SUBSCRIPT_EM_X_SIZE:p("sbxs"),SUBSCRIPT_EM_Y_SIZE:p("sbys"),SUBSCRIPT_EM_X_OFFSET:p("sbxo"),SUBSCRIPT_EM_Y_OFFSET:p("sbyo"),SUPERSCRIPT_EM_X_SIZE:p("spxs"),SUPERSCRIPT_EM_Y_SIZE:p("spys"),SUPERSCRIPT_EM_X_OFFSET:p("spxo"),SUPERSCRIPT_EM_Y_OFFSET:p("spyo"),STRIKEOUT_SIZE:p("strs"),STRIKEOUT_OFFSET:p("stro"),UNDERLINE_SIZE:p("unds"),UNDERLINE_OFFSET:p("undo")},k;function kr(){return k||(k=new Lt,k.setMoveToFunc((s,_,t)=>{t.push(`M${s},${_}`);}),k.setLineToFunc((s,_,t)=>{t.push(`L${s},${_}`);}),k.setCubicToFunc((s,_,t,r,a,o,i)=>{i.push(`C${s},${_} ${t},${r} ${a},${o}`);}),k.setQuadraticToFunc((s,_,t,r,a)=>{a.push(`Q${s},${_} ${t},${r}`);}),k.setClosePathFunc(s=>{s.push("Z");})),k}var U;function Ur(){return U||(U=new Lt,U.setMoveToFunc((s,_,t)=>{t.push({type:"M",values:[s,_]});}),U.setLineToFunc((s,_,t)=>{t.push({type:"L",values:[s,_]});}),U.setCubicToFunc((s,_,t,r,a,o,i)=>{i.push({type:"C",values:[s,_,t,r,a,o]});}),U.setQuadraticToFunc((s,_,t,r,a)=>{a.push({type:"Q",values:[s,_,t,r]});}),U.setClosePathFunc(s=>{s.push({type:"Z",values:[]});})),U}var E=class Nt{constructor(_){typeof _=="number"?this.ptr=c.hb_font_reference(_):(this.ptr=c.hb_font_create(_.ptr),this._face=_),$(this,c.hb_font_destroy);}get face(){return this._face||(this._face=new Fr(c.hb_font_get_face(this.ptr))),this._face}subFont(){return new Nt(c.hb_font_create_sub_font(this.ptr))}hExtents(){let _=n.stackSave(),t=n.stackAlloc(48);c.hb_font_get_h_extents(this.ptr,t);let r={ascender:n.HEAP32[t/4],descender:n.HEAP32[t/4+1],lineGap:n.HEAP32[t/4+2]};return n.stackRestore(_),r}vExtents(){let _=n.stackSave(),t=n.stackAlloc(48);c.hb_font_get_v_extents(this.ptr,t);let r={ascender:n.HEAP32[t/4],descender:n.HEAP32[t/4+1],lineGap:n.HEAP32[t/4+2]};return n.stackRestore(_),r}glyphName(_){let t=n.stackSave(),r=256,a=n.stackAlloc(r);c.hb_font_glyph_to_string(this.ptr,_,a,r);let o=I(a);return n.stackRestore(t),o}drawGlyph(_,t,r){let a=v(r);try{c.hb_font_draw_glyph(this.ptr,_,t.ptr,a);}finally{N(a);}}drawGlyphOrFail(_,t,r){let a=v(r);try{return !!c.hb_font_draw_glyph_or_fail(this.ptr,_,t.ptr,a)}finally{N(a);}}paintGlyph(_,t,r,a=0,o={red:0,green:0,blue:0,alpha:255}){let i=v(r);try{c.hb_font_paint_glyph(this.ptr,_,t.ptr,i,a,st(o));}finally{N(i);}}paintGlyphOrFail(_,t,r,a=0,o={red:0,green:0,blue:0,alpha:255}){let i=v(r);try{return !!c.hb_font_paint_glyph_or_fail(this.ptr,_,t.ptr,i,a,st(o))}finally{N(i);}}getGlyphColorPng(_){let t=c.hb_ot_color_glyph_reference_png(this.ptr,_),r=c.hb_blob_get_length(t),a;if(r){let o=c.hb_blob_get_data(t,0);a=n.HEAPU8.slice(o,o+r);}return c.hb_blob_destroy(t),a}glyphToPath(_){let t=[];return this.drawGlyph(_,kr(),t),t.join("")}glyphHAdvance(_){return c.hb_font_get_glyph_h_advance(this.ptr,_)}glyphVAdvance(_){return c.hb_font_get_glyph_v_advance(this.ptr,_)}glyphHOrigin(_){let t=n.stackSave(),r=n.stackAlloc(4),a=n.stackAlloc(4),o;return c.hb_font_get_glyph_h_origin(this.ptr,_,r,a)&&(o=[n.HEAP32[r/4],n.HEAP32[a/4]]),n.stackRestore(t),o}glyphVOrigin(_){let t=n.stackSave(),r=n.stackAlloc(4),a=n.stackAlloc(4),o;return c.hb_font_get_glyph_v_origin(this.ptr,_,r,a)&&(o=[n.HEAP32[r/4],n.HEAP32[a/4]]),n.stackRestore(t),o}glyphExtents(_){let t=n.stackSave(),r=n.stackAlloc(16),a;return c.hb_font_get_glyph_extents(this.ptr,_,r)&&(a={xBearing:n.HEAP32[r/4],yBearing:n.HEAP32[r/4+1],width:n.HEAP32[r/4+2],height:n.HEAP32[r/4+3]}),n.stackRestore(t),a}glyph(_,t=0){let r=n.stackSave(),a=n.stackAlloc(4),o;return c.hb_font_get_glyph(this.ptr,_,t,a)&&(o=n.HEAPU32[a/4]),n.stackRestore(r),o}nominalGlyph(_){let t=n.stackSave(),r=n.stackAlloc(4),a;return c.hb_font_get_nominal_glyph(this.ptr,_,r)&&(a=n.HEAPU32[r/4]),n.stackRestore(t),a}variationGlyph(_,t){let r=n.stackSave(),a=n.stackAlloc(4),o;return c.hb_font_get_variation_glyph(this.ptr,_,t,a)&&(o=n.HEAPU32[a/4]),n.stackRestore(r),o}glyphFromName(_){let t=n.stackSave(),r=n.stackAlloc(4),a=Er(_),o;return c.hb_font_get_glyph_from_name(this.ptr,a.ptr,a.length,r)&&(o=n.HEAPU32[r/4]),a.free(),n.stackRestore(t),o}glyphToJson(_){let t=[];return this.drawGlyph(_,Ur(),t),t}setScale(_,t){c.hb_font_set_scale(this.ptr,_,t);}setVariations(_){let t=n.stackSave(),r=n.stackAlloc(8*_.length);_.forEach((a,o)=>{a.writeTo(r+o*8);}),c.hb_font_set_variations(this.ptr,r,_.length),n.stackRestore(t);}setFuncs(_){c.hb_font_set_funcs(this.ptr,_.ptr);}getLookupOpticalBound(_,t,r){return c.hb_ot_layout_lookup_get_optical_bound(this.ptr,_,t,r)}getLigatureCarets(_,t){let r=n.stackSave(),a=0,o=128,i=n.stackAlloc(4),u=n.stackAlloc(512),f=[];for(;o==128;){n.HEAPU32[i/4]=o,c.hb_ot_layout_get_ligature_carets(this.ptr,_,t,a,i,u),o=n.HEAPU32[i/4];let l=n.HEAP32.subarray(u/4,u/4+o);f.push(...Array.from(l)),a+=o;}return n.stackRestore(r),f}getMetricPosition(_){let t=n.stackSave(),r=n.stackAlloc(4),a;return c.hb_ot_metrics_get_position(this.ptr,_,r)&&(a=n.HEAP32[r/4]),n.stackRestore(t),a}getMetricPositionWithFallback(_){let t=n.stackSave(),r=n.stackAlloc(4);c.hb_ot_metrics_get_position_with_fallback(this.ptr,_,r);let a=n.HEAP32[r/4];return n.stackRestore(t),a}getMetricVariation(_){return c.hb_ot_metrics_get_variation(this.ptr,_)}getMetricXVariation(_){return c.hb_ot_metrics_get_x_variation(this.ptr,_)}getMetricYVariation(_){return c.hb_ot_metrics_get_y_variation(this.ptr,_)}},Yr=class{constructor(){this.ptr=c.hb_font_funcs_create(),$(this,c.hb_font_funcs_destroy);}setGlyphExtentsFunc(s){let _=n.addFunction((t,r,a,o,i)=>{let u=s(new E(t),a);return u?(n.HEAP32[o/4]=u.xBearing,n.HEAP32[o/4+1]=u.yBearing,n.HEAP32[o/4+2]=u.width,n.HEAP32[o/4+3]=u.height,1):0},"ippipp");c.hb_font_funcs_set_glyph_extents_func(this.ptr,_,0,0);}setGlyphFromNameFunc(s){let _=n.addFunction((t,r,a,o,i,u)=>{let f=s(new E(t),I(a,o));return f?(n.HEAPU32[i/4]=f,1):0},"ipppipp");c.hb_font_funcs_set_glyph_from_name_func(this.ptr,_,0,0);}setGlyphHAdvanceFunc(s){let _=n.addFunction((t,r,a,o)=>s(new E(t),a),"ippip");c.hb_font_funcs_set_glyph_h_advance_func(this.ptr,_,0,0);}setGlyphVAdvanceFunc(s){let _=n.addFunction((t,r,a,o)=>s(new E(t),a),"ippip");c.hb_font_funcs_set_glyph_v_advance_func(this.ptr,_,0,0);}setGlyphHOriginFunc(s){let _=n.addFunction((t,r,a,o,i,u)=>{let f=s(new E(t),a);return f?(n.HEAP32[o/4]=f[0],n.HEAP32[i/4]=f[1],1):0},"ippippp");c.hb_font_funcs_set_glyph_h_origin_func(this.ptr,_,0,0);}setGlyphVOriginFunc(s){let _=n.addFunction((t,r,a,o,i,u)=>{let f=s(new E(t),a);return f?(n.HEAP32[o/4]=f[0],n.HEAP32[i/4]=f[1],1):0},"ippippp");c.hb_font_funcs_set_glyph_v_origin_func(this.ptr,_,0,0);}setGlyphHKerningFunc(s){let _=n.addFunction((t,r,a,o,i)=>s(new E(t),a,o),"ippiip");c.hb_font_funcs_set_glyph_h_kerning_func(this.ptr,_,0,0);}setGlyphNameFunc(s){let _=new TextEncoder,t=n.addFunction((r,a,o,i,u,f)=>{let l=s(new E(r),o);return l?(_.encodeInto(l,n.HEAPU8.subarray(i,i+u)),1):0},"ippipip");c.hb_font_funcs_set_glyph_name_func(this.ptr,t,0,0);}setNominalGlyphFunc(s){let _=n.addFunction((t,r,a,o,i)=>{let u=s(new E(t),a);return u?(n.HEAPU32[o/4]=u,1):0},"ippipp");c.hb_font_funcs_set_nominal_glyph_func(this.ptr,_,0,0);}setVariationGlyphFunc(s){let _=n.addFunction((t,r,a,o,i,u)=>{let f=s(new E(t),a,o);return f?(n.HEAPU32[i/4]=f,1):0},"ippiipp");c.hb_font_funcs_set_variation_glyph_func(this.ptr,_,0,0);}setFontHExtentsFunc(s){let _=n.addFunction((t,r,a,o)=>{let i=s(new E(t));return i?(n.HEAP32[a/4]=i.ascender,n.HEAP32[a/4+1]=i.descender,n.HEAP32[a/4+2]=i.lineGap,1):0},"ipppp");c.hb_font_funcs_set_font_h_extents_func(this.ptr,_,0,0);}setFontVExtentsFunc(s){let _=n.addFunction((t,r,a,o)=>{let i=s(new E(t));return i?(n.HEAP32[a/4]=i.ascender,n.HEAP32[a/4+1]=i.descender,n.HEAP32[a/4+2]=i.lineGap,1):0},"ipppp");c.hb_font_funcs_set_font_v_extents_func(this.ptr,_,0,0);}};function rt(s){let _=c.hb_color_line_get_extend(s),t=[],r=n.stackSave(),a=n.stackAlloc(4),o=n.stackAlloc(1536),i=0,u=128;for(;u===128;){n.HEAPU32[a/4]=u,c.hb_color_line_get_color_stops(s,i,a,o),u=n.HEAPU32[a/4];for(let f=0;f<u;f++){let l=(o+f*12)/4;t.push({offset:n.HEAPF32[l],isForeground:n.HEAPU32[l+1]!==0,color:ot(n.HEAPU32[l+2])});}i+=u;}return n.stackRestore(r),{extend:_,colorStops:t}}var Zr=class{constructor(){this.funcPtrs=[],this.userDataPtrs=[],this.ptr=c.hb_paint_funcs_create();let s=this.ptr,_=this.funcPtrs,t=this.userDataPtrs;at.register(this,()=>{c.hb_paint_funcs_destroy(s);for(let r of _)n.removeFunction(r);for(let r of t)N(r);});}setPushTransformFunc(s,_){let t=v(_);this.userDataPtrs.push(t);let r=n.addFunction((a,o,i,u,f,l,b,d,T)=>s(i,u,f,l,b,d,g(o),g(T)),"viiffffffi");this.funcPtrs.push(r),c.hb_paint_funcs_set_push_transform_func(this.ptr,r,t,0);}setPopTransformFunc(s,_){let t=v(_);this.userDataPtrs.push(t);let r=n.addFunction((a,o,i)=>s(g(o),g(i)),"viii");this.funcPtrs.push(r),c.hb_paint_funcs_set_pop_transform_func(this.ptr,r,t,0);}setColorGlyphFunc(s,_){let t=v(_);this.userDataPtrs.push(t);let r=n.addFunction((a,o,i,u,f)=>s(i,new E(u),g(o),g(f))?1:0,"iiiiii");this.funcPtrs.push(r),c.hb_paint_funcs_set_color_glyph_func(this.ptr,r,t,0);}setPushClipGlyphFunc(s,_){let t=v(_);this.userDataPtrs.push(t);let r=n.addFunction((a,o,i,u,f)=>s(i,new E(u),g(o),g(f)),"viiiii");this.funcPtrs.push(r),c.hb_paint_funcs_set_push_clip_glyph_func(this.ptr,r,t,0);}setPushClipRectangleFunc(s,_){let t=v(_);this.userDataPtrs.push(t);let r=n.addFunction((a,o,i,u,f,l,b)=>s(i,u,f,l,g(o),g(b)),"viiffffi");this.funcPtrs.push(r),c.hb_paint_funcs_set_push_clip_rectangle_func(this.ptr,r,t,0);}setPopClipFunc(s,_){let t=v(_);this.userDataPtrs.push(t);let r=n.addFunction((a,o,i)=>s(g(o),g(i)),"viii");this.funcPtrs.push(r),c.hb_paint_funcs_set_pop_clip_func(this.ptr,r,t,0);}setColorFunc(s,_){let t=v(_);this.userDataPtrs.push(t);let r=n.addFunction((a,o,i,u,f)=>s(i!==0,ot(u),g(o),g(f)),"viiiii");this.funcPtrs.push(r),c.hb_paint_funcs_set_color_func(this.ptr,r,t,0);}setImageFunc(s,_){let t=v(_);this.userDataPtrs.push(t);let r=n.addFunction((a,o,i,u,f,l,b,d,T)=>{let m=c.hb_blob_get_length(i),R=c.hb_blob_get_data(i,0),L=n.HEAPU8.subarray(R,R+m),G;return d&&(G={xBearing:n.HEAP32[d/4],yBearing:n.HEAP32[d/4+1],width:n.HEAP32[d/4+2],height:n.HEAP32[d/4+3]}),s(L,u,f,S(l),G,g(o),g(T))?1:0},"iiiiiiifii");this.funcPtrs.push(r),c.hb_paint_funcs_set_image_func(this.ptr,r,t,0);}setLinearGradientFunc(s,_){let t=v(_);this.userDataPtrs.push(t);let r=n.addFunction((a,o,i,u,f,l,b,d,T,m)=>s(rt(i),u,f,l,b,d,T,g(o),g(m)),"viiiffffffi");this.funcPtrs.push(r),c.hb_paint_funcs_set_linear_gradient_func(this.ptr,r,t,0);}setRadialGradientFunc(s,_){let t=v(_);this.userDataPtrs.push(t);let r=n.addFunction((a,o,i,u,f,l,b,d,T,m)=>s(rt(i),u,f,l,b,d,T,g(o),g(m)),"viiiffffffi");this.funcPtrs.push(r),c.hb_paint_funcs_set_radial_gradient_func(this.ptr,r,t,0);}setSweepGradientFunc(s,_){let t=v(_);this.userDataPtrs.push(t);let r=n.addFunction((a,o,i,u,f,l,b,d)=>s(rt(i),u,f,l,b,g(o),g(d)),"viiiffffi");this.funcPtrs.push(r),c.hb_paint_funcs_set_sweep_gradient_func(this.ptr,r,t,0);}setPushGroupFunc(s,_){let t=v(_);this.userDataPtrs.push(t);let r=n.addFunction((a,o,i)=>s(g(o),g(i)),"viii");this.funcPtrs.push(r),c.hb_paint_funcs_set_push_group_func(this.ptr,r,t,0);}setPopGroupFunc(s,_){let t=v(_);this.userDataPtrs.push(t);let r=n.addFunction((a,o,i,u)=>s(i,g(o),g(u)),"viiii");this.funcPtrs.push(r),c.hb_paint_funcs_set_pop_group_func(this.ptr,r,t,0);}setCustomPaletteColorFunc(s,_){let t=v(_);this.userDataPtrs.push(t);let r=n.addFunction((a,o,i,u,f)=>{let l=s(i,g(o),g(f));return l!==void 0?(n.HEAPU32[u/4]=st(l),1):0},"iiiiii");this.funcPtrs.push(r),c.hb_paint_funcs_set_custom_palette_color_func(this.ptr,r,t,0);}},Ir={INVALID:0,UNICODE:1,GLYPHS:2},Cr={DEFAULT:0,NO_CLUSTERS:1,NO_POSITIONS:2,NO_GLYPH_NAMES:4,GLYPH_EXTENTS:8,GLYPH_FLAGS:16,NO_ADVANCES:32,DEFINED:63},Xr={DEFAULT:0,BOT:1,EOT:2,PRESERVE_DEFAULT_IGNORABLES:4,REMOVE_DEFAULT_IGNORABLES:8,DO_NOT_INSERT_DOTTED_CIRCLE:16,VERIFY:32,PRODUCE_UNSAFE_TO_CONCAT:64,PRODUCE_SAFE_TO_INSERT_TATWEEL:128,DEFINED:255},jr={INVALID:0,LTR:4,RTL:5,TTB:6,BTT:7},Kr={MONOTONE_GRAPHEMES:0,MONOTONE_CHARACTERS:1,CHARACTERS:2,GRAPHEMES:3,DEFAULT:0},Gt={INVALID:0,TEXT:p("TEXT"),JSON:p("JSON")},Jr=class Bt{constructor(_){_!=null?this.ptr=c.hb_buffer_reference(_):this.ptr=c.hb_buffer_create(),$(this,c.hb_buffer_destroy);}add(_,t){c.hb_buffer_add(this.ptr,_,t);}addText(_,t=0,r){let a=Hr(_);c.hb_buffer_add_utf16(this.ptr,a.ptr,a.length,t,r??a.length),a.free();}addCodePoints(_,t=0,r){let a=c.malloc(_.length*4);n.HEAPU32.subarray(a/4,a/4+_.length).set(_),c.hb_buffer_add_codepoints(this.ptr,a,_.length,t,r??_.length),c.free(a);}guessSegmentProperties(){c.hb_buffer_guess_segment_properties(this.ptr);}setDirection(_){c.hb_buffer_set_direction(this.ptr,_);}setFlags(_){c.hb_buffer_set_flags(this.ptr,_);}setLanguage(_){let t=z(_);c.hb_buffer_set_language(this.ptr,c.hb_language_from_string(t.ptr,-1)),t.free();}setScript(_){let t=z(_);c.hb_buffer_set_script(this.ptr,c.hb_script_from_string(t.ptr,-1)),t.free();}setClusterLevel(_){c.hb_buffer_set_cluster_level(this.ptr,_);}reset(){c.hb_buffer_reset(this.ptr);}clearContents(){c.hb_buffer_clear_contents(this.ptr);}setMessageFunc(_){let t=(a,o,i,u)=>{let f=I(i);return _(new Bt(a),new E(o),f)?1:0},r=n.addFunction(t,"iiiii");c.hb_buffer_set_message_func(this.ptr,r,0,0);}getLength(){return c.hb_buffer_get_length(this.ptr)}getGlyphInfos(){let _=c.hb_buffer_get_glyph_infos(this.ptr,0),t=n.HEAPU32.subarray(_/4,_/4+this.getLength()*5),r=[];for(let a=0;a<t.length;a+=5)r.push({codepoint:t[a],cluster:t[a+2],flags:c.hb_glyph_info_get_glyph_flags(_+a*4)});return r}getGlyphPositions(){let _=c.hb_buffer_get_glyph_positions(this.ptr,0)/4;if(_==0)return [];let t=n.HEAP32.subarray(_,_+this.getLength()*5),r=[];for(let a=0;a<t.length;a+=5)r.push({xAdvance:t[a],yAdvance:t[a+1],xOffset:t[a+2],yOffset:t[a+3]});return r}getGlyphInfosAndPositions(){let _=c.hb_buffer_get_glyph_infos(this.ptr,0),t=n.HEAPU32.subarray(_/4,_/4+this.getLength()*5),r=c.hb_buffer_get_glyph_positions(this.ptr,0)/4,a=r?n.HEAP32.subarray(r,r+this.getLength()*5):void 0,o=[];for(let i=0;i<t.length;i+=5){let u={codepoint:t[i],cluster:t[i+2],flags:c.hb_glyph_info_get_glyph_flags(_+i*4)};for(let[f,l]of [["mask",1],["var1",3],["var2",4]])Object.defineProperty(u,f,{value:t[i+l],enumerable:false});a&&(u.xAdvance=a[i],u.yAdvance=a[i+1],u.xOffset=a[i+2],u.yOffset=a[i+3],Object.defineProperty(u,"var",{value:a[i+4],enumerable:false})),o.push(u);}return o}updateGlyphPositions(_){let t=c.hb_buffer_get_glyph_positions(this.ptr,0)/4;if(t==0)return;let r=Math.min(_.length,this.getLength()),a=n.HEAP32.subarray(t,t+r*5);for(let o=0;o<r;o++)a[o*5]=_[o].xAdvance,a[o*5+1]=_[o].yAdvance,a[o*5+2]=_[o].xOffset,a[o*5+3]=_[o].yOffset;}serialize(_={}){let{font:t,start:r=0,end:a,format:o=Gt.TEXT,flags:i=0}=_,u=n.stackSave(),f=a??this.getLength(),l=32*1024,b=c.malloc(l),d=n.stackAlloc(4),T="";for(;r<f;){r+=c.hb_buffer_serialize(this.ptr,r,f,b,l,d,t?t.ptr:0,o,i);let m=n.HEAPU32[d/4];if(m==0)break;T+=I(b,m);}return c.free(b),n.stackRestore(u),T}getContentType(){return c.hb_buffer_get_content_type(this.ptr)}},Qr=class J{static{this.GLOBAL_START=0;}static{this.GLOBAL_END=4294967295;}constructor(_,t=1,r=J.GLOBAL_START,a=J.GLOBAL_END){this.tag=_,this.value=t,this.start=r,this.end=a;}static fromString(_){let t=n.stackSave(),r=n.stackAlloc(16),a=z(_),o;return c.hb_feature_from_string(a.ptr,-1,r)&&(o=new J(S(n.HEAPU32[r/4]),n.HEAPU32[r/4+1],n.HEAPU32[r/4+2],n.HEAPU32[r/4+3])),a.free(),n.stackRestore(t),o}toString(){let _=n.stackSave(),t=n.stackAlloc(16);this.writeTo(t);let r=128,a=n.stackAlloc(r);c.hb_feature_to_string(t,a,r);let o=I(a);return n.stackRestore(_),o}writeTo(_){n.HEAPU32[_/4]=p(this.tag),n.HEAPU32[_/4+1]=this.value,n.HEAPU32[_/4+2]=this.start,n.HEAPU32[_/4+3]=this.end;}},qr=class Mt{constructor(_,t=0){this.tag=_,this.value=t;}static fromString(_){let t=n.stackSave(),r=n.stackAlloc(8),a=z(_),o;return c.hb_variation_from_string(a.ptr,-1,r)&&(o=new Mt(S(n.HEAPU32[r/4]),n.HEAPF32[r/4+1])),a.free(),n.stackRestore(t),o}toString(){let _=n.stackSave(),t=n.stackAlloc(8);this.writeTo(t);let r=128,a=n.stackAlloc(r);c.hb_variation_to_string(t,a,r);let o=I(a);return n.stackRestore(_),o}writeTo(_){n.HEAPU32[_/4]=p(this.tag),n.HEAPF32[_/4+1]=this.value;}},K={DONT_STOP:0,GSUB:1,GPOS:2};function Or(s,_,t){let r=t?.length??0,a=n.stackSave(),o=0;r&&(o=n.stackAlloc(16*r),t.forEach((i,u)=>{i.writeTo(o+u*16);})),c.hb_shape(s.ptr,_.ptr,o,r),n.stackRestore(a);}function xr(s,_,t,r,a){let o=[],i=K.DONT_STOP,u=false;return _.setMessageFunc((f,l,b)=>{if(b.startsWith("start table GSUB")?i=K.GSUB:b.startsWith("start table GPOS")&&(i=K.GPOS),i!=a&&(u=false),a!=K.DONT_STOP&&i==a&&b.startsWith("end lookup "+r)&&(u=true),u)return false;let d=f.serialize({font:l,format:Gt.JSON,flags:Cr.NO_GLYPH_NAMES});return o.push({m:b,t:JSON.parse(d),glyphs:f.getContentType()==Ir.GLYPHS}),true}),Or(s,_,t),o}function ts(){let s=n.stackSave(),_=n.stackAlloc(12);c.hb_version(_,_+4,_+8);let t={major:n.HEAPU32[_/4],minor:n.HEAPU32[(_+4)/4],micro:n.HEAPU32[(_+8)/4]};return n.stackRestore(s),t}function _s(){return I(c.hb_version_string())}function es(s){let _=p(s);return S(c.hb_ot_tag_to_script(_))}function ns(s){let _=p(s);return Ot(c.hb_ot_tag_to_language(_))}Tr(await It());
2
+ export{Vr as AxisFlags,wr as Blob,Jr as Buffer,Ir as BufferContentType,Xr as BufferFlag,Cr as BufferSerializeFlag,Gt as BufferSerializeFormat,Kr as ClusterLevel,Gr as ColorPaletteFlags,jr as Direction,Lt as DrawFuncs,Fr as Face,Qr as Feature,E as Font,Yr as FontFuncs,zr as GlyphClass,Wr as GlyphFlag,$r as MetricsTag,Mr as PaintCompositeMode,Br as PaintExtend,Zr as PaintFuncs,K as TracePhase,qr as Variation,ns as otTagToLanguage,es as otTagToScript,Or as shape,xr as shapeWithTrace,ts as version,_s as versionString};