@zeke-02/docx-editor 0.5.2 → 0.5.4

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 (223) hide show
  1. package/LICENSE +204 -0
  2. package/dist/FindReplaceDialog-7SQOVQWH.js +1 -0
  3. package/dist/FindReplaceDialog-RK3A7MSK.mjs +1 -0
  4. package/dist/{FootnotePropertiesDialog-XQ7NIFIU.js → FootnotePropertiesDialog-2Q2SHVMR.js} +1 -1
  5. package/dist/{FootnotePropertiesDialog-TNVJJCY6.mjs → FootnotePropertiesDialog-ZKQXW3YO.mjs} +1 -1
  6. package/dist/{HyperlinkDialog-FR4IZZ7E.mjs → HyperlinkDialog-QV3CVFQU.mjs} +1 -1
  7. package/dist/HyperlinkDialog-XVAF7FVN.js +1 -0
  8. package/dist/{ImagePositionDialog-JSZSIKF5.mjs → ImagePositionDialog-EGRH3HPP.mjs} +1 -1
  9. package/dist/{ImagePositionDialog-2YXRAGZS.js → ImagePositionDialog-HIVHUTBT.js} +1 -1
  10. package/dist/ImagePropertiesDialog-67WLFIIZ.mjs +1 -0
  11. package/dist/ImagePropertiesDialog-HSM3JJ22.js +1 -0
  12. package/dist/KeyboardShortcutsDialog-B0UFuR4w.d.ts +395 -0
  13. package/dist/KeyboardShortcutsDialog-t6JKL4Aj.d.mts +395 -0
  14. package/dist/PageSetupDialog-642IAVG2.js +1 -0
  15. package/dist/PageSetupDialog-ERUQDHAY.mjs +1 -0
  16. package/dist/PluginHost-HS31VIuo.d.mts +16 -0
  17. package/dist/PluginHost-zILZO7zX.d.ts +16 -0
  18. package/dist/{SplitCellDialog-NP3JJYHD.mjs → SplitCellDialog-GFWCFCTD.mjs} +1 -1
  19. package/dist/{SplitCellDialog-JIAC3RYV.js → SplitCellDialog-M7WF7ANE.js} +1 -1
  20. package/dist/{TablePropertiesDialog-TIK4AA5M.mjs → TablePropertiesDialog-TZ7VCL6V.mjs} +1 -1
  21. package/dist/{TablePropertiesDialog-T7D4HSVP.js → TablePropertiesDialog-ZKU2FTUX.js} +1 -1
  22. package/dist/agentApi-B2Y7kexW.d.ts +486 -0
  23. package/dist/agentApi-BzUJ_kao.d.mts +486 -0
  24. package/dist/chunk-2XXILKEQ.js +1 -0
  25. package/dist/chunk-35DG3R42.js +2 -0
  26. package/dist/chunk-5UX5CD4C.js +1 -0
  27. package/dist/chunk-7QQSDIWK.mjs +2 -0
  28. package/dist/chunk-AW5TISUL.js +3 -0
  29. package/dist/chunk-B45ECEGY.js +18 -0
  30. package/dist/chunk-B7CCL7SL.mjs +2 -0
  31. package/dist/chunk-BRMTZRLJ.js +2 -0
  32. package/dist/chunk-D47GTKGU.js +2 -0
  33. package/dist/chunk-F5SERL7X.mjs +2 -0
  34. package/dist/chunk-FWPVBFKQ.mjs +1 -0
  35. package/dist/chunk-GGQK26JO.js +2 -0
  36. package/dist/chunk-GM2S2WMT.mjs +1 -0
  37. package/dist/chunk-HXDMASAR.js +1 -0
  38. package/dist/chunk-ILYKDR3C.js +1 -0
  39. package/dist/chunk-JFRDFK7V.mjs +260 -0
  40. package/dist/chunk-JPF5R2ZM.mjs +1 -0
  41. package/dist/chunk-KOXCF3CL.mjs +1 -0
  42. package/dist/chunk-KRLNX56Y.mjs +2 -0
  43. package/dist/chunk-LWOHVYKW.mjs +1 -0
  44. package/dist/chunk-MDTA25AN.mjs +60 -0
  45. package/dist/chunk-MKNSJOCN.js +70 -0
  46. package/dist/chunk-NIBCC7WQ.js +1 -0
  47. package/dist/chunk-NLFXR2VH.js +2 -0
  48. package/dist/chunk-NOLMVQNN.mjs +40 -0
  49. package/dist/chunk-ONIYA2FU.mjs +2 -0
  50. package/dist/chunk-RCIZ7OM3.mjs +70 -0
  51. package/dist/chunk-SGTUE33R.js +260 -0
  52. package/dist/{chunk-EHFEG3TX.js → chunk-SNZ57XBI.js} +1 -1
  53. package/dist/chunk-SOTWG3KJ.mjs +1 -0
  54. package/dist/chunk-TYPGB4KF.js +1 -0
  55. package/dist/chunk-U7ZW2DOO.mjs +2 -0
  56. package/dist/chunk-WO3FIV4B.js +40 -0
  57. package/dist/{chunk-PKEOQIQO.mjs → chunk-WPI3YRFO.mjs} +1 -1
  58. package/dist/chunk-XGJ2EORY.mjs +1 -0
  59. package/dist/chunk-XQZTWWRF.mjs +18 -0
  60. package/dist/chunk-Y3SEHWZ2.js +1 -0
  61. package/dist/chunk-YBEVHQCT.js +60 -0
  62. package/dist/chunk-ZVAFVHWR.mjs +3 -0
  63. package/dist/chunk-ZXPCJWVY.js +2 -0
  64. package/dist/{agentApi-DLt94vXk.d.mts → content-REFGFfEH.d.mts} +8 -755
  65. package/dist/{agentApi-DLt94vXk.d.ts → content-REFGFfEH.d.ts} +8 -755
  66. package/dist/dialogs.d.mts +25 -0
  67. package/dist/dialogs.d.ts +25 -0
  68. package/dist/dialogs.js +1 -0
  69. package/dist/dialogs.mjs +1 -0
  70. package/dist/document-Cu2vq_wS.d.mts +294 -0
  71. package/dist/document-CxOagoLQ.d.ts +294 -0
  72. package/dist/executor-WBHID2RK.mjs +1 -0
  73. package/dist/executor-Y5VUOAHY.js +1 -0
  74. package/dist/findReplace-Bue0JaXh.d.ts +138 -0
  75. package/dist/findReplace-shXbOjFQ.d.mts +138 -0
  76. package/dist/fork.d.mts +535 -0
  77. package/dist/fork.d.ts +535 -0
  78. package/dist/fork.js +1 -0
  79. package/dist/fork.mjs +1 -0
  80. package/dist/hooks.d.mts +598 -0
  81. package/dist/hooks.d.ts +598 -0
  82. package/dist/hooks.js +1 -0
  83. package/dist/hooks.mjs +1 -0
  84. package/dist/index-B5A-J9GC.d.ts +1119 -0
  85. package/dist/index-bw-PaozF.d.mts +1119 -0
  86. package/dist/index.d.mts +12 -591
  87. package/dist/index.d.ts +12 -591
  88. package/dist/index.js +1 -120
  89. package/dist/index.mjs +1 -120
  90. package/dist/layout-bridge-5GYGYKM5.mjs +1 -0
  91. package/dist/layout-bridge-QQDA7ELH.js +1 -0
  92. package/dist/plugin-api.d.mts +165 -0
  93. package/dist/plugin-api.d.ts +165 -0
  94. package/dist/plugin-api.js +1 -0
  95. package/dist/plugin-api.mjs +1 -0
  96. package/dist/processTemplate-BTBTR7AM.js +1 -0
  97. package/dist/{processTemplate-W2C5PXZB.mjs → processTemplate-MBX2KDLE.mjs} +1 -1
  98. package/dist/styles.css +1 -1
  99. package/dist/styles.d.mts +18 -0
  100. package/dist/styles.d.ts +18 -0
  101. package/dist/styles.js +1 -0
  102. package/dist/styles.mjs +1 -0
  103. package/dist/types-BF48VxkC.d.mts +18 -0
  104. package/dist/types-BF48VxkC.d.ts +18 -0
  105. package/dist/types-BnIs4sE7.d.mts +281 -0
  106. package/dist/types-BnIs4sE7.d.ts +281 -0
  107. package/dist/types-CW6HFAX6.d.ts +39 -0
  108. package/dist/types-DIsDCwTG.d.mts +39 -0
  109. package/dist/ui.d.mts +111 -552
  110. package/dist/ui.d.ts +111 -552
  111. package/dist/ui.js +111 -1
  112. package/dist/ui.mjs +111 -1
  113. package/dist/useFindReplace-DKy-s3gS.d.ts +261 -0
  114. package/dist/useFindReplace-vuoKpDKE.d.mts +261 -0
  115. package/package.json +47 -49
  116. package/dist/ClipboardManager-CVKX0v9q.d.ts +0 -464
  117. package/dist/ClipboardManager-V3aaMnWE.d.mts +0 -464
  118. package/dist/DocumentAgent-BWflKHpH.d.mts +0 -442
  119. package/dist/DocumentAgent-DsdXtetF.d.ts +0 -442
  120. package/dist/FindReplaceDialog-L3YF5HIS.mjs +0 -1
  121. package/dist/FindReplaceDialog-SEBWC5P7.js +0 -1
  122. package/dist/HyperlinkDialog-WEK6JSAC.js +0 -1
  123. package/dist/ImagePropertiesDialog-527MFLQO.mjs +0 -1
  124. package/dist/ImagePropertiesDialog-HG4K3IE7.js +0 -1
  125. package/dist/PageSetupDialog-GALVJMUB.js +0 -1
  126. package/dist/PageSetupDialog-TGQIAMI7.mjs +0 -1
  127. package/dist/TableToolbar-DUgmob2I.d.ts +0 -1273
  128. package/dist/TableToolbar-YL74HNS1.d.mts +0 -1273
  129. package/dist/chunk-23SXXIZS.js +0 -111
  130. package/dist/chunk-3F52AP2Q.js +0 -1
  131. package/dist/chunk-42O5GXM5.mjs +0 -82
  132. package/dist/chunk-54ULJEHM.mjs +0 -1
  133. package/dist/chunk-5XK326FI.mjs +0 -1
  134. package/dist/chunk-6WPRCJ5A.mjs +0 -1
  135. package/dist/chunk-76IYR7C7.mjs +0 -1
  136. package/dist/chunk-AGRIVA4G.js +0 -1
  137. package/dist/chunk-BTCQ2QI3.mjs +0 -3
  138. package/dist/chunk-BUEMG4NW.js +0 -1
  139. package/dist/chunk-BXRC4U3X.mjs +0 -2
  140. package/dist/chunk-CPAYKE6X.mjs +0 -1
  141. package/dist/chunk-DACWLFKI.mjs +0 -1
  142. package/dist/chunk-EPBFWE36.js +0 -2
  143. package/dist/chunk-FXES3YDB.js +0 -82
  144. package/dist/chunk-HI66BSGS.mjs +0 -9
  145. package/dist/chunk-INTPVEO6.mjs +0 -9
  146. package/dist/chunk-IOAGVW6Q.mjs +0 -2
  147. package/dist/chunk-JCEWC5QL.mjs +0 -4
  148. package/dist/chunk-JTIUFACT.js +0 -1
  149. package/dist/chunk-LUF7PWIC.js +0 -10
  150. package/dist/chunk-MGEN6GOE.mjs +0 -2
  151. package/dist/chunk-MOE2ZGUE.js +0 -18
  152. package/dist/chunk-MWLHJWB6.js +0 -9
  153. package/dist/chunk-OFYVDN3U.mjs +0 -2
  154. package/dist/chunk-P4VSHBGZ.js +0 -2
  155. package/dist/chunk-P5FQHIES.mjs +0 -1
  156. package/dist/chunk-PBC7XAYZ.js +0 -3
  157. package/dist/chunk-PEMB6SZT.js +0 -2
  158. package/dist/chunk-PQMSZTBB.js +0 -9
  159. package/dist/chunk-Q7UDQXAF.js +0 -1
  160. package/dist/chunk-QGTAIC5E.js +0 -1
  161. package/dist/chunk-QVPR2W5S.js +0 -1
  162. package/dist/chunk-R3QMYPL5.mjs +0 -59
  163. package/dist/chunk-RBUTXXQJ.mjs +0 -18
  164. package/dist/chunk-RRWYZ2TS.mjs +0 -111
  165. package/dist/chunk-S3STEPVO.js +0 -182
  166. package/dist/chunk-SFUM35DH.js +0 -2
  167. package/dist/chunk-SNLC6EK2.js +0 -1
  168. package/dist/chunk-TMTLIGLZ.js +0 -59
  169. package/dist/chunk-TSE2PWFX.mjs +0 -10
  170. package/dist/chunk-UKESXQS5.mjs +0 -182
  171. package/dist/chunk-UWYD42WV.js +0 -4
  172. package/dist/chunk-UXVACQCY.mjs +0 -1
  173. package/dist/chunk-W4EIKDM6.mjs +0 -2
  174. package/dist/chunk-W53SI3XW.mjs +0 -1
  175. package/dist/chunk-WNS2RBQD.js +0 -2
  176. package/dist/chunk-Z3KMSHUP.js +0 -1
  177. package/dist/core-plugins-reexport.d.mts +0 -31
  178. package/dist/core-plugins-reexport.d.ts +0 -31
  179. package/dist/core-plugins-reexport.js +0 -1
  180. package/dist/core-plugins-reexport.mjs +0 -1
  181. package/dist/core-reexport.d.mts +0 -340
  182. package/dist/core-reexport.d.ts +0 -340
  183. package/dist/core-reexport.js +0 -1
  184. package/dist/core-reexport.mjs +0 -1
  185. package/dist/documentSerializer-DtS_-oGA.d.mts +0 -664
  186. package/dist/documentSerializer-Wj1p2ASa.d.ts +0 -664
  187. package/dist/executor-C3VXF7QA.mjs +0 -1
  188. package/dist/executor-GDBV3AGV.js +0 -1
  189. package/dist/headless-reexport.d.mts +0 -197
  190. package/dist/headless-reexport.d.ts +0 -197
  191. package/dist/headless-reexport.js +0 -1
  192. package/dist/headless-reexport.mjs +0 -1
  193. package/dist/insertOperations-BTH1Asas.d.mts +0 -176
  194. package/dist/insertOperations-CbUnXAXH.d.ts +0 -176
  195. package/dist/layout-bridge-EA4DJ227.js +0 -1
  196. package/dist/layout-bridge-XDPSO6GO.mjs +0 -1
  197. package/dist/mcp-reexport.d.mts +0 -156
  198. package/dist/mcp-reexport.d.ts +0 -156
  199. package/dist/mcp-reexport.js +0 -16
  200. package/dist/mcp-reexport.mjs +0 -16
  201. package/dist/processTemplate-MJ2PCSO5.js +0 -1
  202. package/dist/react-B0W16SV6.d.ts +0 -1330
  203. package/dist/react-D0Pn1nww.d.mts +0 -1330
  204. package/dist/react.d.mts +0 -10
  205. package/dist/react.d.ts +0 -10
  206. package/dist/react.js +0 -1
  207. package/dist/react.mjs +0 -1
  208. package/dist/registry-CH9V-IX0.d.ts +0 -165
  209. package/dist/registry-CWBKYlNW.d.mts +0 -165
  210. package/dist/types-UDsUq8D3.d.mts +0 -310
  211. package/dist/types-jbivc9Lj.d.ts +0 -310
  212. package/dist/variableDetector-CdQ7ZTzA.d.mts +0 -204
  213. package/dist/variableDetector-DsRV3A9z.d.ts +0 -204
  214. package/i18n/de.json +0 -792
  215. package/i18n/en.json +0 -792
  216. package/i18n/he.json +0 -792
  217. package/i18n/pl.json +0 -792
  218. package/i18n/pt-BR.json +0 -792
  219. package/i18n/tr.json +0 -792
  220. package/i18n/zh-CN.json +0 -792
  221. /package/dist/{chunk-YC5KZSYD.js → chunk-ESZ6JRTW.js} +0 -0
  222. /package/dist/{chunk-LVGJKS7Y.mjs → chunk-TZMMD6RR.mjs} +0 -0
  223. /package/dist/{react.css → fork.css} +0 -0
@@ -0,0 +1,2 @@
1
+ import {g,f,j as j$1,a,i}from'./chunk-FWPVBFKQ.mjs';var y={dk1:"000000",lt1:"FFFFFF",dk2:"44546A",lt2:"E7E6E6",accent1:"4472C4",accent2:"ED7D31",accent3:"A5A5A5",accent4:"FFC000",accent5:"5B9BD5",accent6:"70AD47",hlink:"0563C1",folHlink:"954F72"},W={black:"000000",blue:"0000FF",cyan:"00FFFF",darkBlue:"00008B",darkCyan:"008B8B",darkGray:"A9A9A9",darkGreen:"006400",darkMagenta:"8B008B",darkRed:"8B0000",darkYellow:"808000",green:"00FF00",lightGray:"D3D3D3",magenta:"FF00FF",red:"FF0000",white:"FFFFFF",yellow:"FFFF00",none:""},x={dk1:"dk1",lt1:"lt1",dk2:"dk2",lt2:"lt2",accent1:"accent1",accent2:"accent2",accent3:"accent3",accent4:"accent4",accent5:"accent5",accent6:"accent6",hlink:"hlink",folHlink:"folHlink",dark1:"dk1",light1:"lt1",dark2:"dk2",light2:"lt2",hyperlink:"hlink",followedHyperlink:"folHlink",background1:"lt1",text1:"dk1",background2:"lt2",text2:"dk2",tx1:"dk1",tx2:"dk2",bg1:"lt1",bg2:"lt2"};function A(e){if(!e)return 1;let n=parseInt(e,16);return isNaN(n)?1:n/255}function E(e){let n=e.padStart(6,"0").slice(0,6),t=parseInt(n.slice(0,2),16),r=parseInt(n.slice(2,4),16),i=parseInt(n.slice(4,6),16);return {r:isNaN(t)?0:t,g:isNaN(r)?0:r,b:isNaN(i)?0:i}}function N(e,n,t){let r=i=>Math.max(0,Math.min(255,Math.round(i))).toString(16).padStart(2,"0");return `${r(e)}${r(n)}${r(t)}`.toUpperCase()}function M(e,n){if(n>=1)return e;if(n<=0)return "FFFFFF";let t=E(e);return N(Math.min(255,Math.max(0,Math.round(t.r*n+255*(1-n)))),Math.min(255,Math.max(0,Math.round(t.g*n+255*(1-n)))),Math.min(255,Math.max(0,Math.round(t.b*n+255*(1-n)))))}function w(e,n){if(n>=1)return e;if(n<=0)return "000000";let t=E(e);return N(Math.min(255,Math.max(0,Math.round(t.r*n))),Math.min(255,Math.max(0,Math.round(t.g*n))),Math.min(255,Math.max(0,Math.round(t.b*n))))}function j(e,n){let t=x[n]??n,r=["dk1","lt1","dk2","lt2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"],i=o=>r.includes(o);return e?.colorScheme?i(t)?e.colorScheme[t]??y[t]??"000000":"000000":i(t)?y[t]??"000000":"000000"}function U(e){if(!e)return null;let n=e.toLowerCase();return x[e]??x[n]??null}function b(e,n,t="000000"){if(!e)return `#${t}`;if(e.auto)return `#${t}`;let r;if(e.themeColor){let i=U(e.themeColor);if(i?r=j(n,i):r=e.rgb??t,e.themeTint){let o=A(e.themeTint);r=M(r,o);}else if(e.themeShade){let o=A(e.themeShade);r=w(r,o);}}else e.rgb?r=e.rgb==="auto"?t:e.rgb:r=t;return `#${r.toUpperCase().replace(/^#/,"")}`}function T(e,n){if(!(!e||e.auto)){if(e.themeColor&&n)return b(e,n).slice(1);if(e.rgb&&e.rgb!=="auto")return e.rgb.toUpperCase().replace(/^#/,"")}}function K(e){if(!e||e==="none")return "";let n=W[e];return n?`#${n}`:""}function S(e,n){return e?e.auto?"transparent":b(e,n):""}function q(e){return e.startsWith("#")?e:`#${e}`}function H(e){return K(e)||q(e)}var J=[{slot:"lt1",name:"Background 1"},{slot:"dk1",name:"Text 1"},{slot:"lt2",name:"Background 2"},{slot:"dk2",name:"Text 2"},{slot:"accent1",name:"Accent 1"},{slot:"accent2",name:"Accent 2"},{slot:"accent3",name:"Accent 3"},{slot:"accent4",name:"Accent 4"},{slot:"accent5",name:"Accent 5"},{slot:"accent6",name:"Accent 6"}],X=[{type:"base",value:0,hexValue:"",labelSuffix:""},{type:"tint",value:.8,hexValue:"CC",labelSuffix:", Lighter 80%"},{type:"tint",value:.6,hexValue:"99",labelSuffix:", Lighter 60%"},{type:"tint",value:.4,hexValue:"66",labelSuffix:", Lighter 40%"},{type:"shade",value:.75,hexValue:"BF",labelSuffix:", Darker 25%"},{type:"shade",value:.5,hexValue:"80",labelSuffix:", Darker 50%"}];function pe(e){let n=e??y;return X.map(t=>J.map(r=>{let i=n[r.slot]??y[r.slot]??"000000",o;t.type==="base"?o=i.toUpperCase():t.type==="tint"?o=M(i,1-t.value):o=w(i,t.value);let a={hex:o,themeSlot:r.slot,label:`${r.name}${t.labelSuffix}`};return t.type==="tint"&&t.hexValue?a.tint=t.hexValue:t.type==="shade"&&t.hexValue&&(a.shade=t.hexValue),a}))}var p={HTML:"text/html",PLAIN:"text/plain"};function he(e){if(!e)return [];let n=()=>{if(!e.items||e.items.length===0)return [];let l=[];for(let u of Array.from(e.items)){if(u.kind!=="file"||!u.type.startsWith("image/"))continue;let g=u.getAsFile();g&&l.push(g);}return l},t=()=>!e.files||e.files.length===0?[]:Array.from(e.files).filter(l=>l.type.startsWith("image/")),r=n(),i=r.length?r:t();if(i.length<=1)return i;let o=["image/png","image/jpeg","image/webp","image/gif","image/svg+xml","image/bmp","image/tiff"],a=l=>{let u=l[0],g=o.indexOf(u.type);g<0&&(g=Number.MAX_SAFE_INTEGER);for(let h of l.slice(1)){let m=o.indexOf(h.type);if(m<0&&(m=Number.MAX_SAFE_INTEGER),m<g){u=h,g=m;continue}m===g&&h.size>u.size&&(u=h);}return u},s=new Map;for(let l of i){let u=l.name?.trim()??"",h=(u?u.replace(/\.[^/.]+$/,"").toLowerCase():"")||`size:${l.size}`,m=s.get(h);m?m.push(l):s.set(h,[l]);}let d=[];for(let l of s.values())d.push(a(l));return d}async function be(e,n={}){let{includeFormatting:t=true,onError:r,theme:i}=n;try{let o=Y(e,t,i);return await Q(o)}catch(o){return r?.(o),false}}function Y(e,n=true,t){let r=e.map(O).join(""),i=n?oe(e,t):G(r),o=JSON.stringify(e);return {plainText:r,html:i,internal:o}}async function Q(e){try{if(navigator.clipboard&&navigator.clipboard.write){let n=[new ClipboardItem({[p.PLAIN]:new Blob([e.plainText],{type:p.PLAIN}),[p.HTML]:new Blob([e.html],{type:p.HTML})})];return await navigator.clipboard.write(n),!0}return P(e)}catch{return P(e)}}function P(e){let n=document.createElement("div");n.innerHTML=e.html,n.style.position="fixed",n.style.left="-9999px",document.body.appendChild(n);try{let t=window.getSelection();if(!t)return !1;let r=document.createRange();r.selectNodeContents(n),t.removeAllRanges(),t.addRange(r);let i=document.execCommand("copy");return t.removeAllRanges(),i}finally{document.body.removeChild(n);}}async function ye(e={}){let{cleanWordFormatting:n=true,onError:t}=e;try{if(navigator.clipboard&&navigator.clipboard.read){let r=await navigator.clipboard.read();return await Z(r,n)}return null}catch(r){return t?.(r),null}}async function Z(e,n){let t="",r="";for(let i of e)i.types.includes(p.HTML)&&(t=await(await i.getType(p.HTML)).text()),i.types.includes(p.PLAIN)&&(r=await(await i.getType(p.PLAIN)).text());return B(t,r,n)}function Se(e,n={}){let{cleanWordFormatting:t=true}=n,r=e.clipboardData;if(!r)return null;let i=r.getData(p.HTML),o=r.getData(p.PLAIN);return B(i,o,t)}function B(e,n,t=true){let r=ee(e),i=ne(e);if(i){let s=e.match(/data-docx-editor-content="([^"]+)"/);if(s)try{return {runs:JSON.parse(decodeURIComponent(s[1])),fromWord:!1,fromEditor:!0,plainText:n}}catch{}}let o=e;return r&&t&&(o=te(e)),{runs:re(o,n),fromWord:r,fromEditor:i,plainText:n}}function ee(e){return e.includes("urn:schemas-microsoft-com:office")||e.includes("mso-")||e.includes("MsoNormal")||e.includes('class="Mso')||e.includes("<!--[if gte mso")}function ne(e){return e.includes("data-docx-editor")||e.includes("docx-run")||e.includes("docx-paragraph")}function te(e){let n=e;return n=n.replace(/<!--\[if[\s\S]*?<!\[endif\]-->/gi,""),n=n.replace(/<!--[\s\S]*?-->/g,""),n=n.replace(/<\?xml[^>]*>/gi,""),n=n.replace(/<o:[^>]*>[\s\S]*?<\/o:[^>]*>/gi,""),n=n.replace(/<o:[^>]*\/>/gi,""),n=n.replace(/<w:[^>]*>[\s\S]*?<\/w:[^>]*>/gi,""),n=n.replace(/<w:[^>]*\/>/gi,""),n=n.replace(/\s*mso-[^:;]+:[^;]+;?/gi,""),n=n.replace(/\s*style="\s*"/gi,""),n=n.replace(/\s*class="[^"]*Mso[^"]*"/gi,""),n=n.replace(/<span[^>]*>\s*<\/span>/gi,""),n=n.replace(/<\/?font[^>]*>/gi,""),n=n.replace(/\s+/g," ").trim(),n}function re(e,n){if(!e||e.trim()==="")return n?[k(n)]:[];let t=document.createElement("div");t.innerHTML=e;let r=[];return F(t,r,{}),r.length===0&&n?[k(n)]:r}function F(e,n,t){if(e.nodeType===Node.TEXT_NODE){let a=e.textContent||"";(a.trim()||a.includes(" "))&&n.push(k(a,t));return}if(e.nodeType!==Node.ELEMENT_NODE)return;let r=e,i=r.tagName.toLowerCase(),o={...t,...ie(r)};switch(i){case "br":n.push(D(o));return;case "p":case "div":for(let a of r.childNodes)F(a,n,o);r.nextSibling&&n.push(D(o));return;case "b":case "strong":o.bold=true;break;case "i":case "em":o.italic=true;break;case "u":o.underline={style:"single"};break;case "s":case "strike":case "del":o.strike=true;break;case "sup":o.vertAlign="superscript";break;case "sub":o.vertAlign="subscript";break;case "code":case "pre":o.fontFamily={ascii:"Courier New"};break}for(let a of r.childNodes)F(a,n,o);}function ie(e){let n={},t=e.style;(t.fontWeight==="bold"||parseInt(t.fontWeight)>=700)&&(n.bold=true),t.fontStyle==="italic"&&(n.italic=true);let r=t.textDecoration||t.textDecorationLine;if(r&&(r.includes("underline")&&(n.underline={style:"single"}),r.includes("line-through")&&(n.strike=true)),t.fontSize){let i=parseFloat(t.fontSize);isNaN(i)||(n.fontSize=Math.round(i/1.333*2));}if(t.fontFamily){let i=t.fontFamily.replace(/["']/g,"").split(",")[0].trim();i&&(n.fontFamily={ascii:i});}if(t.color){let i=I(t.color);i&&(n.color={rgb:i});}if(t.backgroundColor&&t.backgroundColor!=="transparent"){let i=I(t.backgroundColor);i&&(n.shading={fill:{rgb:i}});}return n}function I(e){if(!e||e==="transparent"||e==="inherit")return null;if(e.startsWith("#"))return e.slice(1).toUpperCase();let n=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);if(n){let t=parseInt(n[1]).toString(16).padStart(2,"0"),r=parseInt(n[2]).toString(16).padStart(2,"0"),i=parseInt(n[3]).toString(16).padStart(2,"0");return (t+r+i).toUpperCase()}return null}function O(e){return e.content.map(n=>n.type==="text"?n.text:n.type==="tab"?" ":n.type==="break"&&n.breakType==="textWrapping"?`
2
+ `:"").join("")}function oe(e,n){return e.map(t=>ae(t,n)).join("")}function ae(e,n){let t=O(e);if(!t)return "";let r=G(t),i=e.formatting;if(!i)return r;i.bold&&(r=`<strong>${r}</strong>`),i.italic&&(r=`<em>${r}</em>`),i.underline&&(r=`<u>${r}</u>`),i.strike&&(r=`<s>${r}</s>`),i.vertAlign==="superscript"&&(r=`<sup>${r}</sup>`),i.vertAlign==="subscript"&&(r=`<sub>${r}</sub>`);let o=[];if(i.fontSize){let d=i.fontSize/2;o.push(`font-size: ${d}pt`);}i.fontFamily?.ascii&&o.push(`font-family: "${i.fontFamily.ascii}"`);let a=T(i.color,n);a&&o.push(`color: #${a}`);let s=T(i.shading?.fill,n);return s&&o.push(`background-color: #${s}`),o.length>0&&(r=`<span style="${o.join("; ")}">${r}</span>`),r}function G(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function k(e,n){return {type:"run",formatting:n,content:[{type:"text",text:e}]}}function D(e){return {type:"run",formatting:e,content:[{type:"break",breakType:"textWrapping"}]}}var se={calibri:{googleFont:"Carlito",category:"sans-serif",fallbackStack:["Calibri","Carlito","Arial","Helvetica","sans-serif"],singleLineRatio:1.2207},cambria:{googleFont:"Caladea",category:"serif",fallbackStack:["Cambria","Caladea","Georgia","serif"],singleLineRatio:1.2676},arial:{googleFont:"Arimo",category:"sans-serif",fallbackStack:["Arial","Arimo","Helvetica","sans-serif"],singleLineRatio:1.1172},"times new roman":{googleFont:"Tinos",category:"serif",fallbackStack:["Times New Roman","Tinos","Times","serif"],singleLineRatio:1.1074},"courier new":{googleFont:"Cousine",category:"monospace",fallbackStack:["Courier New","Cousine","Courier","monospace"],singleLineRatio:1.1328},georgia:{googleFont:"Tinos",category:"serif",fallbackStack:["Georgia","Tinos","Times New Roman","serif"],singleLineRatio:1.1362},verdana:{googleFont:"Open Sans",category:"sans-serif",fallbackStack:["Verdana","Open Sans","Arial","sans-serif"],singleLineRatio:1.2153},tahoma:{googleFont:"Open Sans",category:"sans-serif",fallbackStack:["Tahoma","Open Sans","Arial","sans-serif"],singleLineRatio:1.2075},"trebuchet ms":{googleFont:"Fira Sans",category:"sans-serif",fallbackStack:["Trebuchet MS","Fira Sans","Arial","sans-serif"],singleLineRatio:1.1431},"comic sans ms":{googleFont:"Comic Neue",category:"cursive",fallbackStack:["Comic Sans MS","Comic Neue","cursive"],singleLineRatio:1.3936},impact:{googleFont:"Anton",category:"sans-serif",fallbackStack:["Impact","Anton","Arial Black","sans-serif"],singleLineRatio:1.2197},"palatino linotype":{googleFont:"EB Garamond",category:"serif",fallbackStack:["Palatino Linotype","EB Garamond","Palatino","Georgia","serif"],singleLineRatio:1.0259},"book antiqua":{googleFont:"EB Garamond",category:"serif",fallbackStack:["Book Antiqua","EB Garamond","Palatino","Georgia","serif"],singleLineRatio:1.0259},garamond:{googleFont:"EB Garamond",category:"serif",fallbackStack:["Garamond","EB Garamond","Georgia","serif"],singleLineRatio:1.068},"century gothic":{googleFont:"Questrial",category:"sans-serif",fallbackStack:["Century Gothic","Questrial","Arial","sans-serif"],singleLineRatio:1.1611},"lucida sans":{googleFont:"Open Sans",category:"sans-serif",fallbackStack:["Lucida Sans","Open Sans","Arial","sans-serif"],singleLineRatio:1.1655},"lucida console":{googleFont:"Cousine",category:"monospace",fallbackStack:["Lucida Console","Cousine","Courier New","monospace"],singleLineRatio:1.1387},consolas:{googleFont:"Inconsolata",category:"monospace",fallbackStack:["Consolas","Inconsolata","Cousine","Courier New","monospace"],singleLineRatio:1.1626},"ms mincho":{googleFont:"Noto Serif JP",category:"serif",fallbackStack:["MS Mincho","Noto Serif JP","serif"],singleLineRatio:1.15},"ms gothic":{googleFont:"Noto Sans JP",category:"sans-serif",fallbackStack:["MS Gothic","Noto Sans JP","sans-serif"],singleLineRatio:1.15},simhei:{googleFont:"Noto Sans SC",category:"sans-serif",fallbackStack:["SimHei","Noto Sans SC","sans-serif"],singleLineRatio:1.15},simsun:{googleFont:"Noto Serif SC",category:"serif",fallbackStack:["SimSun","Noto Serif SC","serif"],singleLineRatio:1.15},"malgun gothic":{googleFont:"Noto Sans KR",category:"sans-serif",fallbackStack:["Malgun Gothic","Noto Sans KR","sans-serif"],singleLineRatio:1.15}},le={"sans-serif":"Arial, Helvetica, sans-serif",serif:"Times New Roman, Times, serif",monospace:"Courier New, Courier, monospace",cursive:"cursive",fantasy:"fantasy","system-ui":"system-ui, sans-serif"};function ce(e){let n=e.toLowerCase();return n.includes("mono")||n.includes("courier")||n.includes("consolas")||n.includes("console")||n.includes("code")||n.includes("terminal")?"monospace":n.includes("times")||n.includes("georgia")||n.includes("garamond")||n.includes("palatino")||n.includes("baskerville")||n.includes("bodoni")||n.includes("cambria")||n.includes("mincho")||n.includes("ming")||n.includes("song")||n.includes("serif")?"serif":n.includes("script")||n.includes("cursive")||n.includes("comic")||n.includes("brush")||n.includes("hand")?"cursive":"sans-serif"}function $(e){let n=e.trim().toLowerCase(),t=se[n];if(t)return {googleFont:t.googleFont,cssFallback:t.fallbackStack.map(_).join(", "),originalFont:e,hasGoogleEquivalent:true,singleLineRatio:t.singleLineRatio};let r=ce(e),i=le[r];return {googleFont:null,cssFallback:`${_(e)}, ${i}`,originalFont:e,hasGoogleEquivalent:false,singleLineRatio:1.15}}function _(e){return ["serif","sans-serif","monospace","cursive","fantasy","system-ui"].includes(e.toLowerCase())?e:/[\s,'"()]/.test(e)?`"${e.replace(/"/g,'\\"')}"`:e}function V(e,n){if(!n)return null;let r=e.toLowerCase().startsWith("major")?n.majorFont:n.minorFont;if(!r)return null;let i=e.toLowerCase();return i.includes("eastasia")||i.includes("ea")?r.ea??r.latin??null:i.includes("cs")||i.includes("bidi")?r.cs??r.latin??null:r.latin??null}function Le(e,n){if(!e)return {};let t={};if(e.fontFamily){let a=null;if(e.fontFamily.asciiTheme&&n?.fontScheme&&(a=V(e.fontFamily.asciiTheme,n.fontScheme)),a||(a=e.fontFamily.ascii||e.fontFamily.hAnsi||e.fontFamily.eastAsia||e.fontFamily.cs||null),a){let s=$(a);t.fontFamily=s.cssFallback;}}if(e.fontSize!==void 0&&(t.fontSize=`${g(e.fontSize)}pt`),e.bold&&(t.fontWeight="bold"),e.italic&&(t.fontStyle="italic"),e.color&&(t.color=b(e.color,n)),e.highlight&&e.highlight!=="none"&&(t.backgroundColor=H(e.highlight)),e.shading){let a=z(e.shading,n);a&&!t.backgroundColor&&(t.backgroundColor=a);}let r=[],i=[],o=[];if(e.underline&&e.underline.style!=="none"){r.push("underline");let a=ue(e.underline.style);a!=="solid"&&i.push(a),e.underline.color&&o.push(b(e.underline.color,n));}if(e.strike&&r.push("line-through"),e.doubleStrike&&r.push("line-through"),r.length>0&&(t.textDecoration=r.join(" "),i.length>0&&(t.textDecorationStyle=i[0]),o.length>0&&(t.textDecorationColor=o[0])),e.vertAlign)switch(e.vertAlign){case "superscript":t.verticalAlign="super",t.fontSize||(t.fontSize="0.83em");break;case "subscript":t.verticalAlign="sub",t.fontSize||(t.fontSize="0.83em");break}if(e.position&&e.position!==0){let a=f(e.position);t.position="relative",t.top=j$1(-a);}return e.allCaps?t.textTransform="uppercase":e.smallCaps&&(t.fontVariant="small-caps"),e.spacing!==void 0&&e.spacing!==0&&(t.letterSpacing=j$1(a(e.spacing))),e.scale!==void 0&&e.scale!==100&&(t.transform=`scaleX(${e.scale/100})`,t.display="inline-block"),e.hidden&&(t.display="none"),e.emboss&&(t.textShadow="1px 1px 1px rgba(255,255,255,0.5), -1px -1px 1px rgba(0,0,0,0.3)"),e.imprint&&(t.textShadow="-1px -1px 1px rgba(255,255,255,0.5), 1px 1px 1px rgba(0,0,0,0.3)"),e.outline&&(t.WebkitTextStroke="1px currentColor",t.WebkitTextFillColor="transparent"),e.shadow&&!e.emboss&&!e.imprint&&(t.textShadow="1px 1px 2px rgba(0,0,0,0.3)"),e.rtl&&(t.direction="rtl"),t}function ve(e,n){if(!e)return {};let t={};if(e.alignment&&(t.textAlign=de(e.alignment)),e.spaceBefore!==void 0&&(t.marginTop=j$1(a(e.spaceBefore))),e.spaceAfter!==void 0&&(t.marginBottom=j$1(a(e.spaceAfter))),e.lineSpacing!==void 0&&e.lineSpacing>0)switch(e.lineSpacingRule){case "exact":{let r=a(e.lineSpacing);r>0&&(t.lineHeight=j$1(r));break}case "atLeast":{let r=a(e.lineSpacing);r>0&&(t.minHeight=j$1(r),t.lineHeight=j$1(r));break}default:{let r=e.lineSpacing/240;r>0&&(t.lineHeight=r.toString());break}}if(e.indentLeft!==void 0&&(t.marginLeft=j$1(a(e.indentLeft))),e.indentRight!==void 0&&(t.marginRight=j$1(a(e.indentRight))),e.indentFirstLine!==void 0&&(e.hangingIndent?t.textIndent=j$1(a(e.indentFirstLine)):t.textIndent=j$1(a(e.indentFirstLine))),e.borders&&(e.borders.top&&Object.assign(t,C(e.borders.top,"Top",n)),e.borders.bottom&&Object.assign(t,C(e.borders.bottom,"Bottom",n)),e.borders.left&&Object.assign(t,C(e.borders.left,"Left",n)),e.borders.right&&Object.assign(t,C(e.borders.right,"Right",n))),e.shading){let r=z(e.shading,n);r&&(t.backgroundColor=r);}return e.bidi&&(t.direction="rtl"),e.pageBreakBefore&&(t.pageBreakBefore="always"),e.keepNext&&(t.pageBreakAfter="avoid"),e.keepLines&&(t.pageBreakInside="avoid"),t}function C(e,n="",t){if(!e||e.style==="none"||e.style==="nil")return {};let r={},i$1=e.size?i(e.size):1,o=e.color?b(e.color,t):"#000000",a=fe(e.style),s=`border${n}Width`,d=`border${n}Style`,l=`border${n}Color`;return r[s]=j$1(Math.max(1,i$1)),r[d]=a,r[l]=o,r}function z(e,n){return !e||e.pattern==="clear"||e.pattern==="nil"?"":e.fill?e.fill.auto||e.fill.rgb==="auto"||e.fill.rgb==="FFFFFF"?"":S(e.fill,n):e.pattern==="solid"&&e.color?S(e.color,n):e.pattern&&e.pattern.startsWith("pct")&&e.color?S(e.color,n):""}function ue(e){switch(e){case "double":return "double";case "dotted":case "dottedHeavy":return "dotted";case "dash":case "dashedHeavy":case "dashLong":case "dashLongHeavy":case "dotDash":case "dashDotHeavy":case "dotDotDash":case "dashDotDotHeavy":return "dashed";case "wave":case "wavyHeavy":case "wavyDouble":return "wavy";default:return "solid"}}function de(e){switch(e){case "center":return "center";case "right":return "right";case "both":case "distribute":return "justify";default:return "left"}}function fe(e){switch(e){case "none":case "nil":return "none";case "double":case "triple":return "double";case "dotted":return "dotted";case "dashed":case "dashSmallGap":return "dashed";case "threeDEmboss":return "ridge";case "threeDEngrave":return "groove";case "outset":return "outset";case "inset":return "inset";default:return "solid"}}function Ae(e){let n=[];return e.descendants((t,r)=>{if(t.type.name==="paragraph"){let i=t.attrs.outlineLevel,o=t.attrs.styleId,a=i;if(a==null&&o){let s=o.match(/^[Hh]eading(\d)$/);s&&(a=parseInt(s[1],10)-1);}if(a!=null&&a>=0&&a<=8){let s="";t.forEach(d=>{d.isText&&(s+=d.text||"");}),s.trim()&&n.push({text:s.trim(),level:a,pmPos:r});}}}),n}export{b as a,T as b,K as c,H as d,pe as e,he as f,be as g,Y as h,ye as i,Se as j,B as k,$ as l,Le as m,ve as n,C as o,Ae as p};
@@ -0,0 +1,70 @@
1
+ var S={backgroundColor:"rgba(26, 115, 232, 0.3)",borderRadius:0,zIndex:0,opacity:1,mixBlendMode:"multiply"};function T(e){let t=window.getSelection();if(!t||t.rangeCount===0||t.isCollapsed)return [];let r=t.getRangeAt(0);if(e&&!e.contains(r.commonAncestorContainer))return [];let n=r.getClientRects(),o=[],c=0,l=0;if(e){let a=e.getBoundingClientRect();c=a.left+e.scrollLeft,l=a.top+e.scrollTop;}for(let a=0;a<n.length;a++){let s=n[a];s.width===0&&s.height===0||o.push({left:s.left-c,top:s.top-l,width:s.width,height:s.height});}return o}function R(e,t=2){if(e.length<=1)return e;let r=[...e].sort((c,l)=>Math.abs(c.top-l.top)<t?c.left-l.left:c.top-l.top),n=[],o={...r[0]};for(let c=1;c<r.length;c++){let l=r[c],a=Math.abs(l.top-o.top)<t,s=l.left<=o.left+o.width+t;if(a&&s){let g=Math.max(o.left+o.width,l.left+l.width);o.width=g-o.left,o.height=Math.max(o.height,l.height);}else n.push(o),o={...l};}return n.push(o),n}function y(e){let t=T(e);return R(t)}function A(){let e=window.getSelection();return e!==null&&!e.isCollapsed&&e.rangeCount>0}function k(){let e=window.getSelection();return e?e.toString():""}function N(e){let t=window.getSelection();if(!t||t.rangeCount===0)return false;let r=t.getRangeAt(0);return e.contains(r.commonAncestorContainer)}var d=null;function I(e=S){w();let t=`
2
+ /* DOCX Editor Selection Highlighting */
3
+
4
+ /* Base selection style for all editable content */
5
+ .docx-editor [contenteditable="true"]::selection,
6
+ .docx-editor [contenteditable="true"] *::selection,
7
+ .docx-run-editable::selection,
8
+ .docx-run-editable *::selection {
9
+ background-color: ${e.backgroundColor} !important;
10
+ color: inherit !important;
11
+ }
12
+
13
+ /* Firefox selection */
14
+ .docx-editor [contenteditable="true"]::-moz-selection,
15
+ .docx-editor [contenteditable="true"] *::-moz-selection,
16
+ .docx-run-editable::-moz-selection,
17
+ .docx-run-editable *::-moz-selection {
18
+ background-color: ${e.backgroundColor} !important;
19
+ color: inherit !important;
20
+ }
21
+
22
+ /* Ensure selection is visible against all backgrounds */
23
+ .docx-run-highlighted::selection,
24
+ .docx-run-highlighted *::selection {
25
+ /* For highlighted (yellow background) text, use darker selection */
26
+ background-color: rgba(26, 115, 232, 0.5) !important;
27
+ }
28
+
29
+ .docx-run-highlighted::-moz-selection,
30
+ .docx-run-highlighted *::-moz-selection {
31
+ background-color: rgba(26, 115, 232, 0.5) !important;
32
+ }
33
+
34
+ /* Selection in dark text */
35
+ .docx-run-dark-bg::selection,
36
+ .docx-run-dark-bg *::selection {
37
+ /* Use lighter selection for dark backgrounds */
38
+ background-color: rgba(100, 181, 246, 0.5) !important;
39
+ }
40
+
41
+ .docx-run-dark-bg::-moz-selection,
42
+ .docx-run-dark-bg *::-moz-selection {
43
+ background-color: rgba(100, 181, 246, 0.5) !important;
44
+ }
45
+
46
+ /* Programmatic highlight class */
47
+ .docx-selection-highlight {
48
+ background-color: ${e.backgroundColor};
49
+ ${e.borderRadius?`border-radius: ${e.borderRadius}px;`:""}
50
+ ${e.mixBlendMode?`mix-blend-mode: ${e.mixBlendMode};`:""}
51
+ }
52
+
53
+ /* Find/replace highlight */
54
+ .docx-find-highlight {
55
+ background-color: rgba(255, 235, 59, 0.5);
56
+ border-radius: 2px;
57
+ }
58
+
59
+ .docx-find-highlight-current {
60
+ background-color: rgba(255, 152, 0, 0.6);
61
+ border-radius: 2px;
62
+ outline: 2px solid rgba(255, 152, 0, 0.8);
63
+ }
64
+
65
+ /* AI action selection preview */
66
+ .docx-ai-selection-preview {
67
+ background-color: rgba(156, 39, 176, 0.2);
68
+ border-bottom: 2px dashed rgba(156, 39, 176, 0.6);
69
+ }
70
+ `;d=document.createElement("style"),d.id="docx-selection-styles",d.textContent=t,document.head.appendChild(d);}function w(){d&&(d.remove(),d=null);let e=document.getElementById("docx-selection-styles");e&&e.remove();}function P(){return d!==null||document.getElementById("docx-selection-styles")!==null}function E(e,t,r){let n=0;for(let o=t;o<t+r&&o<e.length;o++)n+=e[o];return n}function v(e,t,r,n){let o=E(e,t,r),c=Math.floor(o/Math.max(n,1)),l=o-c*n,a=Array.from({length:n},(s,g)=>c+(g<l?1:0));return [...e.slice(0,t),...a,...e.slice(t+r)]}function H(e,t,r,n,o,c){let l=r-t.rowspan,a=n-t.colspan,s=o+l,g=t.row+t.rowspan,x=t.col+t.colspan,p=[];for(let i of e){if(i===t)continue;let u=i.row+i.rowspan,f=i.col+i.colspan,b=i.row<g&&u>t.row,C=i.col<x&&f>t.col;p.push({data:i.data,row:i.row>=g?i.row+l:i.row,col:i.col>=x?i.col+a:i.col,rowspan:i.rowspan+(l>0&&b&&!C?l:0),colspan:i.colspan+(a>0&&C&&!b?a:0)});}for(let i=0;i<r;i++)for(let u=0;u<n;u++){let f=i===0&&u===0;p.push({data:c(f,i,u),row:t.row+i,col:t.col+u,rowspan:1,colspan:1});}return {anchors:p,deltaRows:l,deltaCols:a,newRowCount:s}}function M(e){let t=new Map,r=new Map;for(let n of e){t.set(`${n.row}-${n.col}`,n);for(let o=n.row;o<n.row+n.rowspan;o++)for(let c=n.col;c<n.col+n.colspan;c++)r.set(`${o}-${c}`,n);}return {byStart:t,byCoveredSlot:r}}function O(e,t){let r=e>1||t>1;return {minRows:e,minCols:t,initialRows:e,initialCols:r?t:t+1}}var B=/[\p{L}\p{N}\p{M}_''\-]/u,W=/\s/;function m(e){return !e||e.length===0?false:B.test(e)}function h(e){return !e||e.length===0?false:W.test(e)}function D(e,t){if(!e||e.length===0)return [0,0];t=Math.max(0,Math.min(t,e.length-1));let r=e[t];if(h(r)){let n=t,o=t;for(;n>0&&h(e[n-1]);)n--;for(;o<e.length&&h(e[o]);)o++;return [n,o]}if(m(r)){let n=t,o=t;for(;n>0&&m(e[n-1]);)n--;for(;o<e.length&&m(e[o]);)o++;return [n,o]}return [t,t+1]}async function _(e){let t=e.target;if(!t||!t.files)return null;let r=t.files[0];return t.value="",r?{buffer:await r.arrayBuffer(),name:r.name.replace(/\.docx$/i,"")}:null}export{S as a,y as b,A as c,k as d,N as e,I as f,P as g,E as h,v as i,H as j,M as k,O as l,D as m,_ as n};
@@ -0,0 +1,260 @@
1
+ 'use strict';var chunkYBEVHQCT_js=require('./chunk-YBEVHQCT.js'),me=require('react'),prosemirrorState=require('prosemirror-state'),jsxRuntime=require('react/jsx-runtime'),prosemirrorView=require('prosemirror-view');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var me__default=/*#__PURE__*/_interopDefault(me);var $={position:"right",defaultSize:280,minSize:200,maxSize:500,resizable:true,collapsible:true,defaultCollapsed:false},te=chunkYBEVHQCT_js.r,ne=`
2
+ .plugin-host {
3
+ display: flex;
4
+ width: 100%;
5
+ height: 100%;
6
+ overflow: visible;
7
+ position: relative;
8
+ }
9
+
10
+ .plugin-host-editor {
11
+ flex: 1;
12
+ display: flex;
13
+ flex-direction: column;
14
+ min-width: 0;
15
+ overflow: visible;
16
+ }
17
+
18
+
19
+ .plugin-panels-left,
20
+ .plugin-panels-right {
21
+ display: flex;
22
+ flex-direction: column;
23
+ flex-shrink: 0;
24
+ background: #f8f9fa;
25
+ border-color: #e9ecef;
26
+ }
27
+
28
+ .plugin-panels-left {
29
+ border-right: 1px solid #e9ecef;
30
+ }
31
+
32
+ .plugin-panels-right {
33
+ border-left: 1px solid #e9ecef;
34
+ }
35
+
36
+ .plugin-panels-bottom {
37
+ border-top: 1px solid #e9ecef;
38
+ background: #f8f9fa;
39
+ }
40
+
41
+ .plugin-panel {
42
+ position: relative;
43
+ display: flex;
44
+ flex-direction: column;
45
+ overflow: hidden;
46
+ transition: width 0.2s ease, height 0.2s ease;
47
+ }
48
+
49
+ .plugin-panel.collapsed {
50
+ overflow: visible;
51
+ }
52
+
53
+ .plugin-panel-toggle {
54
+ display: flex;
55
+ align-items: center;
56
+ gap: 4px;
57
+ padding: 6px 8px;
58
+ background: transparent;
59
+ border: none;
60
+ cursor: pointer;
61
+ font-size: 12px;
62
+ color: #6c757d;
63
+ white-space: nowrap;
64
+ }
65
+
66
+ .plugin-panel.collapsed .plugin-panel-toggle {
67
+ writing-mode: vertical-rl;
68
+ text-orientation: mixed;
69
+ flex-direction: column;
70
+ height: 100%;
71
+ padding: 8px 6px;
72
+ }
73
+
74
+ .plugin-panel-toggle:hover {
75
+ background: #e9ecef;
76
+ color: #495057;
77
+ }
78
+
79
+ .plugin-panel-toggle-icon {
80
+ font-weight: bold;
81
+ font-size: 14px;
82
+ }
83
+
84
+ .plugin-panel.collapsed .plugin-panel-toggle-icon {
85
+ transform: rotate(90deg);
86
+ }
87
+
88
+ .plugin-panel-toggle-label {
89
+ font-weight: 500;
90
+ }
91
+
92
+ .plugin-panel-content {
93
+ flex: 1;
94
+ overflow: auto;
95
+ }
96
+
97
+ /* Right panel rendered inside viewport - scrolls with content */
98
+ .plugin-panel-in-viewport {
99
+ position: absolute;
100
+ top: 0;
101
+ /* Position is set dynamically via inline styles based on page edge */
102
+ width: 220px;
103
+ pointer-events: auto;
104
+ z-index: 10;
105
+ overflow: visible;
106
+ }
107
+
108
+ .plugin-panel-in-viewport.collapsed {
109
+ width: 32px;
110
+ }
111
+
112
+ .plugin-panel-in-viewport .plugin-panel-toggle {
113
+ position: sticky;
114
+ top: 0;
115
+ background: rgba(255, 255, 255, 0.95);
116
+ border-radius: 4px;
117
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
118
+ }
119
+
120
+ .plugin-panel-in-viewport-content {
121
+ overflow: visible;
122
+ position: relative;
123
+ }
124
+
125
+ /* Plugin overlay container for rendering highlights/decorations */
126
+ .plugin-overlays-container {
127
+ position: absolute;
128
+ top: 0;
129
+ left: 0;
130
+ right: 0;
131
+ bottom: 0;
132
+ pointer-events: none;
133
+ overflow: visible;
134
+ z-index: 5;
135
+ }
136
+
137
+ .plugin-overlay {
138
+ position: absolute;
139
+ top: 0;
140
+ left: 0;
141
+ right: 0;
142
+ bottom: 0;
143
+ pointer-events: none;
144
+ }
145
+
146
+ /* Individual overlay children manage their own pointer-events.
147
+ Do NOT set pointer-events: auto here \u2014 it overrides overlay containers
148
+ that need pointer-events: none to let clicks pass through to the editor. */
149
+ `,Ee=me.forwardRef(function({plugins:i,children:s,className:r=""},p){let[t,f]=me.useState(null),m=me.useRef(s.props);m.current=s.props;let[a,u]=me.useState(null),l=me.useMemo(()=>new chunkYBEVHQCT_js.s,[]),x=me.useSyncExternalStore(l.subscribe,l.getSnapshot),[T,h]=me.useState(()=>{let o=new Set;for(let e of i)({...$,...e.panelConfig}).defaultCollapsed&&o.add(e.id);return o}),[v]=me.useState(()=>{let o=new Map;for(let e of i){let d={...$,...e.panelConfig};o.set(e.id,d.defaultSize);}return o});me.useEffect(()=>{if(!t)return;let o=i.map(e=>({id:e.id,styles:e.styles,initialize:e.initialize,onStateChange:e.onStateChange,destroy:e.destroy}));return l.initialize(o,t),()=>{l.destroy();}},[l,t,i]),me.useEffect(()=>{let o=i.filter(e=>e.styles).map(e=>te(e.id,e.styles));return ()=>o.forEach(e=>e())},[i]),me.useEffect(()=>{if(!t?.dom)return;let o=()=>{l.updateStates(t);},e=null,d=()=>{e&&cancelAnimationFrame(e),e=requestAnimationFrame(o);};o();let c=t.dom;c.addEventListener("input",d),c.addEventListener("focus",o),c.addEventListener("click",o);let g=t.dispatch.bind(t);return t.dispatch=y=>{g(y),d();},()=>{c.removeEventListener("input",d),c.removeEventListener("focus",o),c.removeEventListener("click",o),e&&cancelAnimationFrame(e),t.dispatch=g;}},[t,l]),me.useEffect(()=>te("plugin-host-base",ne),[]);let R=me.useCallback(o=>{if(!t)return;if(t.coordsAtPos(o)){t.dom.scrollIntoView({block:"center",inline:"nearest"});let{state:d}=t,c=d.doc.resolve(Math.min(o,d.doc.content.size)),g=d.tr.setSelection(prosemirrorState.TextSelection.near(c));t.dispatch(g),t.focus();}},[t]),P=me.useCallback((o,e)=>{if(!t)return;let{state:d}=t,c=d.doc.content.size,g=Math.max(0,Math.min(o,c)),y=Math.max(0,Math.min(e,c)),L=d.tr.setSelection(prosemirrorState.TextSelection.create(d.doc,g,y));t.dispatch(L),t.focus();},[t]),E=me.useCallback(o=>l.getPluginState(o),[l]),K=me.useCallback((o,e)=>{l.setPluginState(o,e);},[l]),U=me.useCallback(()=>{t&&l.updateStates(t);},[t,l]);me.useImperativeHandle(p,()=>({getPluginState:E,setPluginState:K,getEditorView:()=>t,refreshPluginStates:U}),[E,K,t,U]);let W=me.useMemo(()=>{let o=[];for(let e of i)e.proseMirrorPlugins&&o.push(...e.proseMirrorPlugins);return o},[i]),_=me.useCallback(o=>{h(e=>{let d=new Set(e);return d.has(o)?d.delete(o):d.add(o),d});},[]),[A,F]=me.useState(null);me.useEffect(()=>{if(!a){F(null);return}let o=()=>{let c=a.pagesContainer,g=c.querySelector(".layout-page");if(!g){F(null);return}let y=a.getContainerOffset(),L=g.getBoundingClientRect(),Y=c.getBoundingClientRect(),G=(L.right-Y.left)/a.zoom,xe=y.x+G+5;F(xe);};o();let e=()=>{requestAnimationFrame(o);};window.addEventListener("resize",e);let d=new ResizeObserver(()=>{requestAnimationFrame(o);});return d.observe(a.pagesContainer),()=>{window.removeEventListener("resize",e),d.disconnect();}},[a]);let Z=me.useMemo(()=>{let o=[];if(a){for(let e of i)if(e.renderOverlay){let d=x.states.get(e.id);o.push(jsxRuntime.jsx("div",{className:"plugin-overlay","data-plugin-id":e.id,children:e.renderOverlay(a,d,t)},`overlay-${e.id}`));}}for(let e of i){if(!e.Panel||(e.panelConfig?.position??"right")!=="right")continue;let c={...$,...e.panelConfig},g=T.has(e.id),y=v.get(e.id)??c.defaultSize,L=e.Panel,Y=x.states.get(e.id),G=A!==null?`${A}px`:"calc(50% + 428px)";o.push(jsxRuntime.jsxs("div",{className:`plugin-panel-in-viewport ${g?"collapsed":""}`,style:{width:g?"32px":`${y}px`,left:G},"data-plugin-id":e.id,children:[c.collapsible&&jsxRuntime.jsx("button",{className:"plugin-panel-toggle",onClick:()=>_(e.id),title:g?`Show ${e.name}`:`Hide ${e.name}`,"aria-label":g?`Show ${e.name}`:`Hide ${e.name}`,children:jsxRuntime.jsx("span",{className:"plugin-panel-toggle-icon",children:g?"\u2039":"\u203A"})}),!g&&a&&jsxRuntime.jsx("div",{className:"plugin-panel-in-viewport-content",children:jsxRuntime.jsx(L,{editorView:t,doc:t?.state.doc??null,scrollToPosition:R,selectRange:P,pluginState:Y,panelWidth:y,renderedDomContext:a})})]},`panel-overlay-${e.id}`));}return o.length>0?o:null},[a,i,x.version,t,T,v,R,P,_,A]),j=me.useMemo(()=>{let o=[];for(let e of i){if(!e.getSidebarItems)continue;let d=x.states.get(e.id),c={editorView:t,renderedDomContext:a,anchorPositions:new Map,zoom:a?.zoom??1},g=e.getSidebarItems(d,c);o.push(...g);}return o},[i,x.version,t,a]),B=me.useCallback(o=>{u(o);let e=m.current?.onRenderedDomContextReady;typeof e=="function"&&e(o);},[]),be=me.useMemo(()=>me.cloneElement(s,{externalPlugins:W,pluginOverlays:Z,pluginSidebarItems:j,pluginRenderedDomContext:a,onRenderedDomContextReady:B,onEditorViewReady:o=>{f(o);let e=m.current?.onEditorViewReady;typeof e=="function"&&e(o);}}),[s,W,Z,j,a,B]),O=me.useMemo(()=>{let o=[],e=[],d=[];for(let c of i){if(!c.Panel)continue;let g=c.panelConfig?.position??"right";g==="left"?o.push(c):g==="bottom"?d.push(c):e.push(c);}return {left:o,right:e,bottom:d}},[i]),X=o=>{if(!o.Panel)return null;let e={...$,...o.panelConfig},d=T.has(o.id),c=v.get(o.id)??e.defaultSize,g=o.Panel,y=x.states.get(o.id);return jsxRuntime.jsxs("div",{className:`plugin-panel plugin-panel-${e.position} ${d?"collapsed":""}`,style:{[e.position==="bottom"?"height":"width"]:d?"32px":`${c}px`,minWidth:e.position!=="bottom"?d?"32px":`${e.minSize}px`:void 0,maxWidth:e.position!=="bottom"?`${e.maxSize}px`:void 0,minHeight:e.position==="bottom"?d?"32px":`${e.minSize}px`:void 0,maxHeight:e.position==="bottom"?`${e.maxSize}px`:void 0},"data-plugin-id":o.id,children:[e.collapsible&&jsxRuntime.jsxs("button",{className:"plugin-panel-toggle",onClick:()=>_(o.id),title:d?`Show ${o.name}`:`Hide ${o.name}`,"aria-label":d?`Show ${o.name}`:`Hide ${o.name}`,children:[jsxRuntime.jsx("span",{className:"plugin-panel-toggle-icon",children:d?"\u203A":"\u2039"}),d&&jsxRuntime.jsx("span",{className:"plugin-panel-toggle-label",children:o.name})]}),!d&&jsxRuntime.jsx("div",{className:"plugin-panel-content",children:jsxRuntime.jsx(g,{editorView:t,doc:t?.state.doc??null,scrollToPosition:R,selectRange:P,pluginState:y,panelWidth:c,renderedDomContext:a??null})})]},o.id)};return jsxRuntime.jsxs("div",{className:`plugin-host ${r}`,children:[O.left.length>0&&jsxRuntime.jsx("div",{className:"plugin-panels-left",children:O.left.map(X)}),jsxRuntime.jsxs("div",{className:"plugin-host-editor",children:[be,O.bottom.length>0&&jsxRuntime.jsx("div",{className:"plugin-panels-bottom",children:O.bottom.map(X)})]})]})});var oe=/\{([#/^@]?)([a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)*)\}/g,b=new prosemirrorState.PluginKey("template");function Ce(n,i,s){return `${n}:${i}:${s}`}function ie(n){let i=[];n.descendants((a,u)=>(a.isText&&a.text&&i.push({text:a.text,pos:u}),true));let s="",r=[];for(let a of i){for(let u=0;u<a.text.length;u++)r.push(a.pos+u);s+=a.text;}let p=[],t=[],f=new Map,m;for(oe.lastIndex=0;(m=oe.exec(s))!==null;){let[a,u,l]=m,x=r[m.index],T=r[m.index+a.length-1]+1,h;u==="#"?h="sectionStart":u==="/"?h="sectionEnd":u==="^"?h="invertedStart":u==="@"?h="raw":h="variable";let v=`${h}:${l}`,R=f.get(v)??0;f.set(v,R+1);let P={id:Ce(h,l,R),type:h,name:l,rawTag:a,from:x,to:T};if(h==="sectionStart"||h==="invertedStart")P.nestedVars=[],t.push(P);else if(h==="sectionEnd"){for(let E=t.length-1;E>=0;E--)if(t[E].name===l){t.splice(E,1);break}}else h==="variable"&&t.length>0&&(t[t.length-1].nestedVars?.push(l),P.insideSection=true);p.push(P);}return p}function Le(n){switch(n){case "sectionStart":case "sectionEnd":return "#3b82f6";case "invertedStart":return "#8b5cf6";case "raw":return "#ef4444";default:return "#f59e0b"}}function q(n,i,s,r){let p=[];for(let t of i){let f=t.id===s,m=t.id===r,a=Le(t.type),u=["docx-template-tag"];f&&u.push("hovered"),m&&u.push("selected"),p.push(prosemirrorView.Decoration.inline(t.from,t.to,{class:u.join(" "),"data-tag-id":t.id,style:`background-color: ${a}22; border-radius: 2px;`},{noOverlay:true}));}return prosemirrorView.DecorationSet.create(n,p)}function He(n,i){if(n.length!==i.length)return false;for(let s=0;s<n.length;s++)if(n[s].id!==i[s].id)return false;return true}function N(){return new prosemirrorState.Plugin({key:b,state:{init(n,i){let s=ie(i.doc);return {tags:s,decorations:q(i.doc,s)}},apply(n,i,s,r){if(n.docChanged){let t=ie(r.doc),f=He(i.tags,t);return {tags:t,decorations:f?i.decorations.map(n.mapping,n.doc):q(r.doc,t,i.hoveredId,i.selectedId),hoveredId:i.hoveredId,selectedId:i.selectedId}}let p=n.getMeta(b);if(p){let t=p.hoveredId??i.hoveredId,f=p.selectedId??i.selectedId;return {...i,hoveredId:t,selectedId:f,decorations:q(r.doc,i.tags,t,f)}}return {...i,decorations:i.decorations.map(n.mapping,n.doc)}}},props:{decorations(n){return b.getState(n)?.decorations??prosemirrorView.DecorationSet.empty},handleClick(n,i){let r=(b.getState(n.state)?.tags??[]).find(t=>i>=t.from&&i<=t.to);return r?(n.dispatch(n.state.tr.setMeta(b,{selectedId:r.id})),true):(b.getState(n.state)?.selectedId&&n.dispatch(n.state.tr.setMeta(b,{selectedId:void 0})),false)},handleDOMEvents:{mouseover(n,i){let r=i.target.closest?.("[data-tag-id]")?.getAttribute("data-tag-id")||void 0,p=b.getState(n.state)?.hoveredId;return r!==p&&n.dispatch(n.state.tr.setMeta(b,{hoveredId:r})),false},mouseout(n,i){return i.relatedTarget?.closest?.("[data-tag-id]")||b.getState(n.state)?.hoveredId&&n.dispatch(n.state.tr.setMeta(b,{hoveredId:void 0})),false}}}})}function ae(n){return b.getState(n)?.tags??[]}function z(n,i){n.dispatch(n.state.tr.setMeta(b,{hoveredId:i}));}function D(n,i){n.dispatch(n.state.tr.setMeta(b,{selectedId:i}));}var V=`
150
+ .docx-template-tag {
151
+ cursor: pointer;
152
+ transition: background-color 0.1s;
153
+ }
154
+
155
+ .docx-template-tag:hover,
156
+ .docx-template-tag.hovered {
157
+ filter: brightness(0.95);
158
+ }
159
+
160
+ .docx-template-tag.selected {
161
+ box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
162
+ }
163
+ `;var Oe={variable:"rgba(245, 158, 11, 0.3)",sectionStart:"rgba(59, 130, 246, 0.3)",sectionEnd:"rgba(59, 130, 246, 0.3)",invertedStart:"rgba(139, 92, 246, 0.3)",raw:"rgba(239, 68, 68, 0.3)"},$e={variable:"rgba(245, 158, 11, 0.5)",sectionStart:"rgba(59, 130, 246, 0.5)",sectionEnd:"rgba(59, 130, 246, 0.5)",invertedStart:"rgba(139, 92, 246, 0.5)",raw:"rgba(239, 68, 68, 0.5)"};function de({context:n,tags:i,hoveredId:s,selectedId:r,onHover:p,onSelect:t}){let[f,m]=me.useState(0),a=me.useCallback(()=>{let l=n.getContainerOffset(),x=[];for(let T of i){let h=n.getRectsForRange(T.from,T.to);for(let v of h)x.push({tagId:T.id,tagType:T.type,x:v.x+l.x,y:v.y+l.y,width:v.width,height:v.height});}return x},[n,i]),u=me.useMemo(()=>a(),[a,f]);return me.useEffect(()=>{let l=()=>{requestAnimationFrame(()=>m(x=>x+1));};return window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)},[]),me.useEffect(()=>{let l=new ResizeObserver(()=>{requestAnimationFrame(()=>m(x=>x+1));});return l.observe(n.pagesContainer),()=>l.disconnect()},[n.pagesContainer]),u.length===0?null:jsxRuntime.jsx("div",{className:"template-highlight-overlay",children:u.map((l,x)=>{let T=l.tagId===s,h=l.tagId===r,v=T||h?$e[l.tagType]:Oe[l.tagType];return jsxRuntime.jsx("div",{className:`template-highlight ${T?"hovered":""} ${h?"selected":""}`,style:{position:"absolute",left:l.x,top:l.y,width:l.width,height:l.height,backgroundColor:v,borderRadius:2,cursor:"pointer"},onMouseEnter:()=>p?.(l.tagId),onMouseLeave:()=>p?.(void 0),onClick:()=>t?.(l.tagId)},`${l.tagId}-${x}`)})})}var pe=`
164
+ .template-highlight-overlay {
165
+ position: absolute;
166
+ top: 0;
167
+ left: 0;
168
+ right: 0;
169
+ bottom: 0;
170
+ pointer-events: none;
171
+ overflow: visible;
172
+ }
173
+
174
+ .template-highlight {
175
+ pointer-events: auto;
176
+ transition: background-color 0.1s ease;
177
+ }
178
+
179
+ .template-highlight:hover,
180
+ .template-highlight.hovered {
181
+ filter: brightness(0.9);
182
+ }
183
+
184
+ .template-highlight.selected {
185
+ box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.6);
186
+ }
187
+ `;var Ne={variable:"#f59e0b",sectionStart:"#3b82f6",sectionEnd:"#3b82f6",invertedStart:"#8b5cf6",raw:"#ef4444"};function De(n){switch(n){case "sectionStart":return "LOOP / IF";case "invertedStart":return "IF NOT";case "raw":return "HTML";default:return ""}}var ge=`
188
+ .template-annotation-chip {
189
+ display: inline-flex;
190
+ flex-wrap: wrap;
191
+ align-items: center;
192
+ gap: 4px;
193
+ padding: 5px 10px;
194
+ background: white;
195
+ border: 1px solid #e2e8f0;
196
+ border-left: 3px solid #6c757d;
197
+ border-radius: 4px;
198
+ font-size: 11px;
199
+ cursor: pointer;
200
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
201
+ max-width: 200px;
202
+ }
203
+
204
+ .template-annotation-chip:hover,
205
+ .template-annotation-chip.hovered {
206
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
207
+ border-color: #cbd5e1;
208
+ }
209
+
210
+ .template-annotation-chip.selected {
211
+ box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
212
+ }
213
+
214
+ .template-chip-badge {
215
+ font-size: 9px;
216
+ font-weight: 600;
217
+ padding: 1px 5px;
218
+ border-radius: 3px;
219
+ color: white;
220
+ text-transform: uppercase;
221
+ letter-spacing: 0.3px;
222
+ }
223
+
224
+ .template-chip-dot {
225
+ font-size: 8px;
226
+ }
227
+
228
+ .template-chip-name {
229
+ color: #334155;
230
+ font-weight: 500;
231
+ }
232
+
233
+ .template-chip-nested {
234
+ display: flex;
235
+ flex-wrap: wrap;
236
+ gap: 4px;
237
+ width: 100%;
238
+ margin-top: 4px;
239
+ padding-top: 4px;
240
+ border-top: 1px solid rgba(0, 0, 0, 0.06);
241
+ }
242
+
243
+ .template-nested-var {
244
+ font-size: 10px;
245
+ color: #64748b;
246
+ background: rgba(0, 0, 0, 0.04);
247
+ padding: 2px 6px;
248
+ border-radius: 3px;
249
+ }
250
+
251
+ .template-nested-var:hover {
252
+ background: rgba(59, 130, 246, 0.15);
253
+ color: #1e40af;
254
+ }
255
+ `;function ue({tag:n,isHovered:i,measureRef:s,onHover:r,onSelect:p}){let t=De(n.type),f=Ne[n.type],m=n.type==="sectionStart"||n.type==="invertedStart";return jsxRuntime.jsxs("div",{ref:s,style:{display:"flex",alignItems:"flex-start"},children:[jsxRuntime.jsx("div",{style:{width:20,height:1,background:i?"#3b82f6":"#d0d0d0",marginTop:12,marginRight:4,flexShrink:0}}),jsxRuntime.jsxs("div",{className:`template-annotation-chip ${i?"hovered":""}`,style:{borderLeftColor:f},onMouseEnter:()=>r(n.id),onMouseLeave:()=>r(void 0),onClick:a=>{a.stopPropagation(),p(n.id);},onMouseDown:a=>a.stopPropagation(),title:m?`${n.rawTag}
256
+ Iterates over ${n.name}[]. Access nested properties via ${n.name}.property`:n.rawTag,children:[t&&jsxRuntime.jsx("span",{className:"template-chip-badge",style:{background:f},children:t}),!t&&jsxRuntime.jsx("span",{className:"template-chip-dot",style:{color:f},children:"\u25CF"}),jsxRuntime.jsx("span",{className:"template-chip-name",children:n.name}),m&&n.nestedVars&&n.nestedVars.length>0&&jsxRuntime.jsx("div",{className:"template-chip-nested",children:n.nestedVars.map((a,u)=>jsxRuntime.jsx("span",{className:"template-nested-var",title:`Access: ${n.name}.${a}`,children:a.includes(".")?a.split(".").pop():a},u))})]})]})}function fe(n,i,s){if(!n)return;D(n,s);let r=i.find(p=>p.id===s);if(r){let p=n.state.tr.setSelection(prosemirrorState.TextSelection.near(n.state.doc.resolve(r.from)));n.dispatch(p),n.focus();}}function he(n={}){return {id:"template",name:"Template",proseMirrorPlugins:[N()],onStateChange:s=>{let r=b.getState(s.state);if(r)return {tags:r.tags,hoveredId:r.hoveredId,selectedId:r.selectedId}},initialize:s=>({tags:[]}),getSidebarItems:(s,r)=>!s||s.tags.length===0?[]:s.tags.filter(t=>t.type!=="sectionEnd"&&!t.insideSection).map(t=>({id:`template-${t.id}`,anchorPos:t.from,priority:10,estimatedHeight:32,render:f=>me__default.default.createElement(ue,{...f,tag:t,isHovered:t.id===s.hoveredId,onHover:m=>{r.editorView&&z(r.editorView,m);},onSelect:m=>fe(r.editorView,s.tags,m)})})),renderOverlay:(s,r,p)=>!r||r.tags.length===0?null:me__default.default.createElement(de,{context:s,tags:r.tags,hoveredId:r.hoveredId,selectedId:r.selectedId,onHover:t=>{p&&z(p,t);},onSelect:t=>fe(p,r.tags,t)}),styles:`
257
+ ${V}
258
+ ${ge}
259
+ ${pe}
260
+ `}}var _e=he();exports.a=ne;exports.b=Ee;exports.c=b;exports.d=N;exports.e=ae;exports.f=z;exports.g=D;exports.h=V;exports.i=he;exports.j=_e;
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkWNS2RBQD_js=require('./chunk-WNS2RBQD.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var J={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},Q={backgroundColor:"white",borderRadius:"8px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:"400px",maxWidth:"500px",width:"100%",margin:"20px"},Z={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px 20px",borderBottom:"1px solid var(--doc-border)"},ee={margin:0,fontSize:"18px",fontWeight:600,color:"var(--doc-text)"},te={background:"none",border:"none",fontSize:"20px",cursor:"pointer",color:"var(--doc-text-muted)",padding:"4px 8px",lineHeight:1},re={padding:"20px"},v={marginBottom:"16px"},E={display:"block",marginBottom:"6px",fontSize:"14px",fontWeight:500,color:"var(--doc-text)"},x={width:"100%",padding:"10px 12px",border:"1px solid var(--doc-border-input)",borderRadius:"4px",fontSize:"14px",boxSizing:"border-box",outline:"none"},oe={...x,borderColor:"var(--doc-error)"},ie={...x,cursor:"pointer"},le={color:"var(--doc-error)",fontSize:"12px",marginTop:"4px"},z={color:"var(--doc-text-muted)",fontSize:"12px",marginTop:"4px"},ne={display:"flex",borderBottom:"1px solid var(--doc-border)",marginBottom:"16px"},H={padding:"10px 16px",border:"none",background:"none",cursor:"pointer",fontSize:"14px",color:"var(--doc-text-muted)",borderBottom:"2px solid transparent",marginBottom:"-1px"},F={...H,color:"var(--doc-link)",borderBottomColor:"var(--doc-link)",fontWeight:500},ae={display:"flex",justifyContent:"flex-end",gap:"12px",padding:"16px 20px",borderTop:"1px solid var(--doc-border)"},C={padding:"10px 20px",borderRadius:"4px",fontSize:"14px",fontWeight:500,cursor:"pointer",border:"none"},se={...C,backgroundColor:"var(--doc-link)",color:"white"},pe={...C,backgroundColor:"var(--doc-bg-hover)",color:"var(--doc-text)",border:"1px solid var(--doc-border-input)"},de={...C,backgroundColor:"var(--doc-error)",color:"white"},ce={...C,backgroundColor:"var(--doc-border-input)",color:"var(--doc-text-muted)",cursor:"not-allowed"};function G(t){if(!t||t.trim()==="")return false;let e=t.trim();if(e.startsWith("mailto:")||e.startsWith("tel:"))return e.length>7;if(e.startsWith("ftp://"))return e.length>6;try{let d=e.match(/^https?:\/\//)?e:`https://${e}`,k=new URL(d);return k.protocol==="http:"||k.protocol==="https:"}catch{return false}}function M(t){if(!t)return "";let e=t.trim();return e.startsWith("mailto:")||e.startsWith("tel:")||e.startsWith("ftp://")||e.match(/^https?:\/\//)?e:`https://${e}`}function ge(t){if(!t)return "unknown";let e=t.trim().toLowerCase();return e.startsWith("mailto:")?"email":e.startsWith("tel:")?"phone":e.startsWith("ftp://")?"ftp":e.startsWith("http://")||e.startsWith("https://")?"web":e.includes("@")&&!e.includes(" ")?"email":"web"}function ue({isOpen:t,onClose:e,onSubmit:d,onRemove:k,initialData:s,selectedText:h="",isEditing:n=false,bookmarks:R=[],className:$,style:K}){let{t:r}=chunkWNS2RBQD_js.c(),[l,g]=react.useState("url"),[p,L]=react.useState(""),[D,_]=react.useState(""),[b,N]=react.useState(""),[O,P]=react.useState(""),[y,m]=react.useState(""),[B,f]=react.useState(false),Y=react.useRef(null),U=react.useRef(null);react.useEffect(()=>{t&&(s?(s.bookmark?(g("bookmark"),N(s.bookmark)):(g("url"),L(s.url||"")),_(s.displayText||""),P(s.tooltip||"")):(g("url"),L(""),_(h),N(""),P("")),m(""),f(false));},[t,s,h]),react.useEffect(()=>{t&&setTimeout(()=>{l==="url"?Y.current?.focus():U.current?.focus();},100);},[t,l]);let V=react.useCallback(()=>{l==="url"&&p.trim()?G(p)?m(""):m(r("dialogs.hyperlink.invalidUrl")):m("");},[l,p,r]),S=react.useCallback(o=>{if(o?.preventDefault(),l==="url"){if(!p.trim()){m(r("dialogs.hyperlink.urlRequired")),f(true);return}if(!G(p)){m(r("dialogs.hyperlink.invalidUrl")),f(true);return}}else if(l==="bookmark"&&!b)return;let T={displayText:D.trim()||void 0,tooltip:O.trim()||void 0};l==="url"?T.url=M(p):T.bookmark=b,d(T);},[l,p,b,D,O,d]),X=react.useCallback(o=>{o.key==="Escape"?e():o.key==="Enter"&&!o.shiftKey&&o.target.tagName!=="TEXTAREA"&&(o.preventDefault(),S());},[e,S]),j=react.useCallback(o=>{o.target===o.currentTarget&&e();},[e]);if(!t)return null;let q=R.length>0,A=l==="url"&&p.trim()&&!y||l==="bookmark"&&b;return jsxRuntime.jsx("div",{className:`docx-hyperlink-dialog-overlay ${$||""}`,style:{...J,...K},onClick:j,onKeyDown:X,role:"dialog","aria-modal":"true","aria-labelledby":"hyperlink-dialog-title",children:jsxRuntime.jsxs("div",{className:"docx-hyperlink-dialog",style:Q,children:[jsxRuntime.jsxs("div",{className:"docx-hyperlink-dialog-header",style:Z,children:[jsxRuntime.jsx("h2",{id:"hyperlink-dialog-title",style:ee,children:r(n?"dialogs.hyperlink.titleEdit":"dialogs.hyperlink.titleInsert")}),jsxRuntime.jsx("button",{type:"button",className:"docx-hyperlink-dialog-close",style:te,onClick:e,"aria-label":r("common.closeDialog"),children:"\xD7"})]}),jsxRuntime.jsxs("form",{className:"docx-hyperlink-dialog-body",style:re,onSubmit:S,children:[q&&jsxRuntime.jsxs("div",{className:"docx-hyperlink-dialog-tabs",style:ne,children:[jsxRuntime.jsx("button",{type:"button",className:`docx-hyperlink-dialog-tab ${l==="url"?"active":""}`,style:l==="url"?F:H,onClick:()=>g("url"),"aria-selected":l==="url",children:r("dialogs.hyperlink.tabWebAddress")}),jsxRuntime.jsx("button",{type:"button",className:`docx-hyperlink-dialog-tab ${l==="bookmark"?"active":""}`,style:l==="bookmark"?F:H,onClick:()=>g("bookmark"),"aria-selected":l==="bookmark",children:r("dialogs.hyperlink.tabBookmark")})]}),l==="url"&&jsxRuntime.jsxs("div",{className:"docx-hyperlink-dialog-field",style:v,children:[jsxRuntime.jsx("label",{htmlFor:"hyperlink-url",style:E,children:r("dialogs.hyperlink.urlLabel")}),jsxRuntime.jsx("input",{ref:Y,id:"hyperlink-url",type:"text",className:"docx-hyperlink-dialog-input",style:y&&B?oe:x,value:p,onChange:o=>{L(o.target.value),B&&m("");},onBlur:()=>{f(true),V();},placeholder:r("dialogs.hyperlink.urlPlaceholder"),"aria-invalid":!!y,"aria-describedby":y?"url-error":"url-hint"}),y&&B&&jsxRuntime.jsx("div",{id:"url-error",style:le,children:y}),!y&&jsxRuntime.jsx("div",{id:"url-hint",style:z,children:r("dialogs.hyperlink.urlHint")})]}),l==="bookmark"&&jsxRuntime.jsxs("div",{className:"docx-hyperlink-dialog-field",style:v,children:[jsxRuntime.jsx("label",{htmlFor:"hyperlink-bookmark",style:E,children:r("dialogs.hyperlink.bookmarkLabel")}),jsxRuntime.jsxs("select",{ref:U,id:"hyperlink-bookmark",className:"docx-hyperlink-dialog-select",style:ie,value:b,onChange:o=>N(o.target.value),children:[jsxRuntime.jsx("option",{value:"",children:r("dialogs.hyperlink.bookmarkPlaceholder")}),R.map(o=>jsxRuntime.jsx("option",{value:o.name,children:o.label||o.name},o.name))]})]}),jsxRuntime.jsxs("div",{className:"docx-hyperlink-dialog-field",style:v,children:[jsxRuntime.jsx("label",{htmlFor:"hyperlink-display-text",style:E,children:r("dialogs.hyperlink.displayTextLabel")}),jsxRuntime.jsx("input",{id:"hyperlink-display-text",type:"text",className:"docx-hyperlink-dialog-input",style:x,value:D,onChange:o=>_(o.target.value),placeholder:r("dialogs.hyperlink.displayTextPlaceholder")}),jsxRuntime.jsx("div",{style:z,children:r("dialogs.hyperlink.displayTextHint")})]}),jsxRuntime.jsxs("div",{className:"docx-hyperlink-dialog-field",style:v,children:[jsxRuntime.jsx("label",{htmlFor:"hyperlink-tooltip",style:E,children:r("dialogs.hyperlink.tooltipLabel")}),jsxRuntime.jsx("input",{id:"hyperlink-tooltip",type:"text",className:"docx-hyperlink-dialog-input",style:x,value:O,onChange:o=>P(o.target.value),placeholder:r("dialogs.hyperlink.tooltipPlaceholder")})]})]}),jsxRuntime.jsxs("div",{className:"docx-hyperlink-dialog-footer",style:ae,children:[n&&k&&jsxRuntime.jsx("button",{type:"button",className:"docx-hyperlink-dialog-remove",style:de,onClick:k,children:r("dialogs.hyperlink.removeLink")}),jsxRuntime.jsx("div",{style:{flex:1}}),jsxRuntime.jsx("button",{type:"button",className:"docx-hyperlink-dialog-cancel",style:pe,onClick:e,children:r("common.cancel")}),jsxRuntime.jsx("button",{type:"submit",className:"docx-hyperlink-dialog-submit",style:A?se:ce,onClick:S,disabled:!A,children:r(n?"common.update":"common.insert")})]})]})})}function be(t,e){return {url:M(t),displayText:e}}function xe(t,e){return {bookmark:t,displayText:e}}function he(t){return !!t.url&&!t.bookmark}function fe(t){return !!t.bookmark}function Se(t){return t.displayText?t.displayText:t.url?t.url.replace(/^https?:\/\//,""):t.bookmark?t.bookmark:""}function Te(t){return t.startsWith("mailto:")?t:`mailto:${t}`}function ve(t){return t.startsWith("tel:")?t:`tel:${t.replace(/[\s\-\(\)\.]/g,"")}`}function Ee(t){return t.filter(e=>!e.name.startsWith("_")).map(e=>({name:e.name,label:e.name})).sort((e,d)=>e.name.localeCompare(d.name))}function Ce(){let[t,e]=react.useState({isOpen:false,isEditing:false}),d=react.useCallback(n=>{e({isOpen:true,selectedText:n,initialData:void 0,isEditing:false});},[]),k=react.useCallback(n=>{e({isOpen:true,initialData:n,selectedText:n.displayText,isEditing:true});},[]),s=react.useCallback(()=>{e(n=>({...n,isOpen:false}));},[]),h=react.useCallback(()=>{e(n=>({...n,isOpen:!n.isOpen}));},[]);return {state:t,openInsert:d,openEdit:k,close:s,toggle:h}}var Le=ue;
1
+ 'use strict';var chunkNLFXR2VH_js=require('./chunk-NLFXR2VH.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var J={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},Q={backgroundColor:"white",borderRadius:"8px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:"400px",maxWidth:"500px",width:"100%",margin:"20px"},Z={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px 20px",borderBottom:"1px solid var(--doc-border)"},ee={margin:0,fontSize:"18px",fontWeight:600,color:"var(--doc-text)"},te={background:"none",border:"none",fontSize:"20px",cursor:"pointer",color:"var(--doc-text-muted)",padding:"4px 8px",lineHeight:1},re={padding:"20px"},v={marginBottom:"16px"},E={display:"block",marginBottom:"6px",fontSize:"14px",fontWeight:500,color:"var(--doc-text)"},x={width:"100%",padding:"10px 12px",border:"1px solid var(--doc-border-input)",borderRadius:"4px",fontSize:"14px",boxSizing:"border-box",outline:"none"},oe={...x,borderColor:"var(--doc-error)"},ie={...x,cursor:"pointer"},le={color:"var(--doc-error)",fontSize:"12px",marginTop:"4px"},z={color:"var(--doc-text-muted)",fontSize:"12px",marginTop:"4px"},ne={display:"flex",borderBottom:"1px solid var(--doc-border)",marginBottom:"16px"},H={padding:"10px 16px",border:"none",background:"none",cursor:"pointer",fontSize:"14px",color:"var(--doc-text-muted)",borderBottom:"2px solid transparent",marginBottom:"-1px"},F={...H,color:"var(--doc-link)",borderBottomColor:"var(--doc-link)",fontWeight:500},ae={display:"flex",justifyContent:"flex-end",gap:"12px",padding:"16px 20px",borderTop:"1px solid var(--doc-border)"},C={padding:"10px 20px",borderRadius:"4px",fontSize:"14px",fontWeight:500,cursor:"pointer",border:"none"},se={...C,backgroundColor:"var(--doc-link)",color:"white"},pe={...C,backgroundColor:"var(--doc-bg-hover)",color:"var(--doc-text)",border:"1px solid var(--doc-border-input)"},de={...C,backgroundColor:"var(--doc-error)",color:"white"},ce={...C,backgroundColor:"var(--doc-border-input)",color:"var(--doc-text-muted)",cursor:"not-allowed"};function G(t){if(!t||t.trim()==="")return false;let e=t.trim();if(e.startsWith("mailto:")||e.startsWith("tel:"))return e.length>7;if(e.startsWith("ftp://"))return e.length>6;try{let d=e.match(/^https?:\/\//)?e:`https://${e}`,k=new URL(d);return k.protocol==="http:"||k.protocol==="https:"}catch{return false}}function M(t){if(!t)return "";let e=t.trim();return e.startsWith("mailto:")||e.startsWith("tel:")||e.startsWith("ftp://")||e.match(/^https?:\/\//)?e:`https://${e}`}function ge(t){if(!t)return "unknown";let e=t.trim().toLowerCase();return e.startsWith("mailto:")?"email":e.startsWith("tel:")?"phone":e.startsWith("ftp://")?"ftp":e.startsWith("http://")||e.startsWith("https://")?"web":e.includes("@")&&!e.includes(" ")?"email":"web"}function ue({isOpen:t,onClose:e,onSubmit:d,onRemove:k,initialData:s,selectedText:h="",isEditing:n=false,bookmarks:R=[],className:$,style:K}){let{t:r}=chunkNLFXR2VH_js.c(),[l,g]=react.useState("url"),[p,L]=react.useState(""),[D,_]=react.useState(""),[b,N]=react.useState(""),[O,P]=react.useState(""),[y,m]=react.useState(""),[B,f]=react.useState(false),Y=react.useRef(null),U=react.useRef(null);react.useEffect(()=>{t&&(s?(s.bookmark?(g("bookmark"),N(s.bookmark)):(g("url"),L(s.url||"")),_(s.displayText||""),P(s.tooltip||"")):(g("url"),L(""),_(h),N(""),P("")),m(""),f(false));},[t,s,h]),react.useEffect(()=>{t&&setTimeout(()=>{l==="url"?Y.current?.focus():U.current?.focus();},100);},[t,l]);let V=react.useCallback(()=>{l==="url"&&p.trim()?G(p)?m(""):m(r("dialogs.hyperlink.invalidUrl")):m("");},[l,p,r]),S=react.useCallback(o=>{if(o?.preventDefault(),l==="url"){if(!p.trim()){m(r("dialogs.hyperlink.urlRequired")),f(true);return}if(!G(p)){m(r("dialogs.hyperlink.invalidUrl")),f(true);return}}else if(l==="bookmark"&&!b)return;let T={displayText:D.trim()||void 0,tooltip:O.trim()||void 0};l==="url"?T.url=M(p):T.bookmark=b,d(T);},[l,p,b,D,O,d]),X=react.useCallback(o=>{o.key==="Escape"?e():o.key==="Enter"&&!o.shiftKey&&o.target.tagName!=="TEXTAREA"&&(o.preventDefault(),S());},[e,S]),j=react.useCallback(o=>{o.target===o.currentTarget&&e();},[e]);if(!t)return null;let q=R.length>0,A=l==="url"&&p.trim()&&!y||l==="bookmark"&&b;return jsxRuntime.jsx("div",{className:`docx-hyperlink-dialog-overlay ${$||""}`,style:{...J,...K},onClick:j,onKeyDown:X,role:"dialog","aria-modal":"true","aria-labelledby":"hyperlink-dialog-title",children:jsxRuntime.jsxs("div",{className:"docx-hyperlink-dialog",style:Q,children:[jsxRuntime.jsxs("div",{className:"docx-hyperlink-dialog-header",style:Z,children:[jsxRuntime.jsx("h2",{id:"hyperlink-dialog-title",style:ee,children:r(n?"dialogs.hyperlink.titleEdit":"dialogs.hyperlink.titleInsert")}),jsxRuntime.jsx("button",{type:"button",className:"docx-hyperlink-dialog-close",style:te,onClick:e,"aria-label":r("common.closeDialog"),children:"\xD7"})]}),jsxRuntime.jsxs("form",{className:"docx-hyperlink-dialog-body",style:re,onSubmit:S,children:[q&&jsxRuntime.jsxs("div",{className:"docx-hyperlink-dialog-tabs",style:ne,children:[jsxRuntime.jsx("button",{type:"button",className:`docx-hyperlink-dialog-tab ${l==="url"?"active":""}`,style:l==="url"?F:H,onClick:()=>g("url"),"aria-selected":l==="url",children:r("dialogs.hyperlink.tabWebAddress")}),jsxRuntime.jsx("button",{type:"button",className:`docx-hyperlink-dialog-tab ${l==="bookmark"?"active":""}`,style:l==="bookmark"?F:H,onClick:()=>g("bookmark"),"aria-selected":l==="bookmark",children:r("dialogs.hyperlink.tabBookmark")})]}),l==="url"&&jsxRuntime.jsxs("div",{className:"docx-hyperlink-dialog-field",style:v,children:[jsxRuntime.jsx("label",{htmlFor:"hyperlink-url",style:E,children:r("dialogs.hyperlink.urlLabel")}),jsxRuntime.jsx("input",{ref:Y,id:"hyperlink-url",type:"text",className:"docx-hyperlink-dialog-input",style:y&&B?oe:x,value:p,onChange:o=>{L(o.target.value),B&&m("");},onBlur:()=>{f(true),V();},placeholder:r("dialogs.hyperlink.urlPlaceholder"),"aria-invalid":!!y,"aria-describedby":y?"url-error":"url-hint"}),y&&B&&jsxRuntime.jsx("div",{id:"url-error",style:le,children:y}),!y&&jsxRuntime.jsx("div",{id:"url-hint",style:z,children:r("dialogs.hyperlink.urlHint")})]}),l==="bookmark"&&jsxRuntime.jsxs("div",{className:"docx-hyperlink-dialog-field",style:v,children:[jsxRuntime.jsx("label",{htmlFor:"hyperlink-bookmark",style:E,children:r("dialogs.hyperlink.bookmarkLabel")}),jsxRuntime.jsxs("select",{ref:U,id:"hyperlink-bookmark",className:"docx-hyperlink-dialog-select",style:ie,value:b,onChange:o=>N(o.target.value),children:[jsxRuntime.jsx("option",{value:"",children:r("dialogs.hyperlink.bookmarkPlaceholder")}),R.map(o=>jsxRuntime.jsx("option",{value:o.name,children:o.label||o.name},o.name))]})]}),jsxRuntime.jsxs("div",{className:"docx-hyperlink-dialog-field",style:v,children:[jsxRuntime.jsx("label",{htmlFor:"hyperlink-display-text",style:E,children:r("dialogs.hyperlink.displayTextLabel")}),jsxRuntime.jsx("input",{id:"hyperlink-display-text",type:"text",className:"docx-hyperlink-dialog-input",style:x,value:D,onChange:o=>_(o.target.value),placeholder:r("dialogs.hyperlink.displayTextPlaceholder")}),jsxRuntime.jsx("div",{style:z,children:r("dialogs.hyperlink.displayTextHint")})]}),jsxRuntime.jsxs("div",{className:"docx-hyperlink-dialog-field",style:v,children:[jsxRuntime.jsx("label",{htmlFor:"hyperlink-tooltip",style:E,children:r("dialogs.hyperlink.tooltipLabel")}),jsxRuntime.jsx("input",{id:"hyperlink-tooltip",type:"text",className:"docx-hyperlink-dialog-input",style:x,value:O,onChange:o=>P(o.target.value),placeholder:r("dialogs.hyperlink.tooltipPlaceholder")})]})]}),jsxRuntime.jsxs("div",{className:"docx-hyperlink-dialog-footer",style:ae,children:[n&&k&&jsxRuntime.jsx("button",{type:"button",className:"docx-hyperlink-dialog-remove",style:de,onClick:k,children:r("dialogs.hyperlink.removeLink")}),jsxRuntime.jsx("div",{style:{flex:1}}),jsxRuntime.jsx("button",{type:"button",className:"docx-hyperlink-dialog-cancel",style:pe,onClick:e,children:r("common.cancel")}),jsxRuntime.jsx("button",{type:"submit",className:"docx-hyperlink-dialog-submit",style:A?se:ce,onClick:S,disabled:!A,children:r(n?"common.update":"common.insert")})]})]})})}function be(t,e){return {url:M(t),displayText:e}}function xe(t,e){return {bookmark:t,displayText:e}}function he(t){return !!t.url&&!t.bookmark}function fe(t){return !!t.bookmark}function Se(t){return t.displayText?t.displayText:t.url?t.url.replace(/^https?:\/\//,""):t.bookmark?t.bookmark:""}function Te(t){return t.startsWith("mailto:")?t:`mailto:${t}`}function ve(t){return t.startsWith("tel:")?t:`tel:${t.replace(/[\s\-\(\)\.]/g,"")}`}function Ee(t){return t.filter(e=>!e.name.startsWith("_")).map(e=>({name:e.name,label:e.name})).sort((e,d)=>e.name.localeCompare(d.name))}function Ce(){let[t,e]=react.useState({isOpen:false,isEditing:false}),d=react.useCallback(n=>{e({isOpen:true,selectedText:n,initialData:void 0,isEditing:false});},[]),k=react.useCallback(n=>{e({isOpen:true,initialData:n,selectedText:n.displayText,isEditing:true});},[]),s=react.useCallback(()=>{e(n=>({...n,isOpen:false}));},[]),h=react.useCallback(()=>{e(n=>({...n,isOpen:!n.isOpen}));},[]);return {state:t,openInsert:d,openEdit:k,close:s,toggle:h}}var Le=ue;
2
2
  exports.a=G;exports.b=M;exports.c=ge;exports.d=ue;exports.e=be;exports.f=xe;exports.g=he;exports.h=fe;exports.i=Se;exports.j=Te;exports.k=ve;exports.l=Ee;exports.m=Ce;exports.n=Le;
@@ -0,0 +1 @@
1
+ import {c as c$1}from'./chunk-7QQSDIWK.mjs';import {useState,useEffect,useCallback}from'react';import {jsx,jsxs}from'react/jsx-runtime';var E=[{labelKey:"dialogs.pageSetup.pageSizes.letter",width:12240,height:15840},{labelKey:"dialogs.pageSetup.pageSizes.a4",width:11906,height:16838},{labelKey:"dialogs.pageSetup.pageSizes.legal",width:12240,height:20160},{labelKey:"dialogs.pageSetup.pageSizes.a3",width:16838,height:23811},{labelKey:"dialogs.pageSetup.pageSizes.a5",width:8391,height:11906},{labelKey:"dialogs.pageSetup.pageSizes.b5",width:9979,height:14175},{labelKey:"dialogs.pageSetup.pageSizes.executive",width:10440,height:15120}];function f(i){return Math.round(i/1440*100)/100}function x(i){return Math.round(i*1440)}function J(i,l){let b=Math.min(i,l),n=Math.max(i,l);return E.findIndex(a=>Math.abs(a.width-b)<20&&Math.abs(a.height-n)<20)}var O={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},Q={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:400,maxWidth:480,width:"100%",margin:20},V={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},X={padding:"16px 20px",display:"flex",flexDirection:"column",gap:14},H={fontSize:12,fontWeight:600,color:"var(--doc-text-muted)",textTransform:"uppercase",letterSpacing:"0.5px"},g={display:"flex",alignItems:"center",gap:12},c={width:80,fontSize:13,color:"var(--doc-text-muted)"},y={flex:1,padding:"6px 8px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:13},N={...y},C={fontSize:11,color:"var(--doc-text-muted)",width:16},Y={padding:"12px 20px 16px",borderTop:"1px solid var(--doc-border)",display:"flex",justifyContent:"flex-end",gap:8},A={padding:"6px 16px",fontSize:13,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"},_=12240,B=15840,p=1440;function ae({isOpen:i,onClose:l,onApply:b,currentProps:n}){let{t:a}=c$1(),[u,h]=useState(_),[S,m]=useState(B),[r,K]=useState("portrait"),[P,M]=useState(p),[w,R]=useState(p),[z,k]=useState(p),[T,D]=useState(p);useEffect(()=>{if(!i)return;let e=n?.pageWidth||_,s=n?.pageHeight||B,j=n?.orientation||(e>s?"landscape":"portrait");h(e),m(s),K(j),M(n?.marginTop??p),R(n?.marginBottom??p),k(n?.marginLeft??p),D(n?.marginRight??p);},[i,n]);let F=useCallback(e=>{if(e<0)return;let s=E[e];r==="landscape"?(h(s.height),m(s.width)):(h(s.width),m(s.height));},[r]),G=useCallback(e=>{e!==r&&(K(e),h(S),m(u));},[r,u,S]),I=useCallback(()=>{b({pageWidth:u,pageHeight:S,orientation:r,marginTop:P,marginBottom:w,marginLeft:z,marginRight:T}),l();},[u,S,r,P,w,z,T,b,l]),U=useCallback(e=>{e.key==="Escape"&&l(),e.key==="Enter"&&I();},[l,I]);if(!i)return null;let W=J(u,S);return jsx("div",{style:O,onClick:l,onKeyDown:U,children:jsxs("div",{style:Q,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),role:"dialog","aria-label":a("dialogs.pageSetup.title"),children:[jsx("div",{style:V,children:a("dialogs.pageSetup.title")}),jsxs("div",{style:X,children:[jsx("div",{style:H,children:a("dialogs.pageSetup.pageSize")}),jsxs("div",{style:g,children:[jsx("label",{style:c,children:a("dialogs.pageSetup.sizeLabel")}),jsxs("select",{style:N,value:W,onChange:e=>F(Number(e.target.value)),children:[E.map((e,s)=>jsx("option",{value:s,children:a(e.labelKey)},e.labelKey)),W<0&&jsx("option",{value:-1,children:a("dialogs.pageSetup.custom")})]})]}),jsxs("div",{style:g,children:[jsx("label",{style:c,children:a("dialogs.pageSetup.orientation")}),jsxs("select",{style:N,value:r,onChange:e=>G(e.target.value),children:[jsx("option",{value:"portrait",children:a("dialogs.pageSetup.portrait")}),jsx("option",{value:"landscape",children:a("dialogs.pageSetup.landscape")})]})]}),jsx("div",{style:{...H,marginTop:4},children:a("dialogs.pageSetup.margins")}),jsxs("div",{style:g,children:[jsx("label",{style:c,children:a("dialogs.pageSetup.top")}),jsx("input",{type:"number",style:y,min:0,max:10,step:.1,value:f(P),onChange:e=>M(x(Number(e.target.value)||0))}),jsx("span",{style:C,children:"in"})]}),jsxs("div",{style:g,children:[jsx("label",{style:c,children:a("dialogs.pageSetup.bottom")}),jsx("input",{type:"number",style:y,min:0,max:10,step:.1,value:f(w),onChange:e=>R(x(Number(e.target.value)||0))}),jsx("span",{style:C,children:"in"})]}),jsxs("div",{style:g,children:[jsx("label",{style:c,children:a("dialogs.pageSetup.left")}),jsx("input",{type:"number",style:y,min:0,max:10,step:.1,value:f(z),onChange:e=>k(x(Number(e.target.value)||0))}),jsx("span",{style:C,children:"in"})]}),jsxs("div",{style:g,children:[jsx("label",{style:c,children:a("dialogs.pageSetup.right")}),jsx("input",{type:"number",style:y,min:0,max:10,step:.1,value:f(T),onChange:e=>D(x(Number(e.target.value)||0))}),jsx("span",{style:C,children:"in"})]})]}),jsxs("div",{style:Y,children:[jsx("button",{type:"button",style:A,onClick:l,children:a("common.cancel")}),jsx("button",{type:"button",style:{...A,backgroundColor:"var(--doc-primary)",color:"white",borderColor:"var(--doc-primary)"},onClick:I,children:a("common.apply")})]})]})})}export{ae as a};
@@ -0,0 +1 @@
1
+ 'use strict';var chunkNLFXR2VH_js=require('./chunk-NLFXR2VH.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var ue={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"transparent",display:"flex",alignItems:"flex-start",justifyContent:"flex-end",zIndex:1e4,pointerEvents:"none"},fe={backgroundColor:"white",borderRadius:"4px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.2)",minWidth:"360px",maxWidth:"440px",width:"100%",margin:"60px 20px 20px 20px",pointerEvents:"auto"},xe={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"12px 16px",borderBottom:"1px solid var(--doc-border)",backgroundColor:"var(--doc-bg-subtle)",borderTopLeftRadius:"4px",borderTopRightRadius:"4px"},ge={margin:0,fontSize:"14px",fontWeight:600,color:"var(--doc-text)"},Se={background:"none",border:"none",fontSize:"18px",cursor:"pointer",color:"var(--doc-text-muted)",padding:"2px 6px",lineHeight:1},be={padding:"16px"},V={display:"flex",alignItems:"center",gap:"8px",marginBottom:"12px"},j={width:"60px",fontSize:"13px",color:"var(--doc-text)",flexShrink:0},k={flex:1,padding:"8px 10px",border:"1px solid var(--doc-border-input)",borderRadius:"3px",fontSize:"13px",boxSizing:"border-box",outline:"none"},X={...k,borderColor:"var(--doc-link)",boxShadow:"0 0 0 2px rgba(5, 99, 193, 0.1)"},me={display:"flex",flexDirection:"column",gap:"6px",marginLeft:"8px"},I={padding:"6px 12px",borderRadius:"3px",fontSize:"12px",fontWeight:500,cursor:"pointer",border:"1px solid var(--doc-border-input)",backgroundColor:"var(--doc-bg-input)",color:"var(--doc-text)",minWidth:"80px",textAlign:"center"},$={...I,backgroundColor:"var(--doc-bg-hover)",color:"var(--doc-text-placeholder)",cursor:"not-allowed"},N={padding:"6px 10px",borderRadius:"3px",fontSize:"14px",cursor:"pointer",border:"1px solid var(--doc-border-input)",backgroundColor:"var(--doc-bg-input)",color:"var(--doc-text)"},q={...N,color:"var(--doc-border-input)",cursor:"not-allowed"},he={display:"flex",gap:"16px",marginTop:"4px",marginLeft:"68px"},L={display:"flex",alignItems:"center",gap:"6px",fontSize:"12px",color:"var(--doc-text-muted)",cursor:"pointer"},J={width:"14px",height:"14px",cursor:"pointer"},Q={marginLeft:"68px",fontSize:"12px",color:"var(--doc-text-muted)",marginBottom:"8px"},ve={...Q,color:"var(--doc-error)"},ye=({style:x})=>jsxRuntime.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:x,children:jsxRuntime.jsx("polyline",{points:"18 15 12 9 6 15"})}),Re=({style:x})=>jsxRuntime.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:x,children:jsxRuntime.jsx("polyline",{points:"6 9 12 15 18 9"})});function Te({isOpen:x,onClose:b,onFind:m,onFindNext:F,onFindPrevious:P,onReplace:_,onReplaceAll:O,onHighlightMatches:g,onClearHighlights:r,initialSearchText:v="",replaceMode:y=false,currentResult:R,className:Z,style:H}){let{t:n}=chunkNLFXR2VH_js.c(),[a,D]=react.useState(""),[h,w]=react.useState(""),[T,A]=react.useState(y),[d,ee]=react.useState(false),[p,te]=react.useState(false),[t,u]=react.useState(null),[oe,B]=react.useState(false),[ne,Y]=react.useState(false),C=react.useRef(null),U=react.useRef(null);react.useEffect(()=>{R!==void 0&&u(R);},[R]),react.useEffect(()=>{if(x){if(D(v),w(""),A(y),u(null),setTimeout(()=>{C.current?.focus(),C.current?.select();},100),v){let e=m(v,{matchCase:d,matchWholeWord:p});u(e),e?.matches&&g&&g(e.matches);}}else r&&r();},[x,v,y]);let i=react.useCallback(()=>{if(!a.trim()){u(null),r&&r();return}let e=m(a,{matchCase:d,matchWholeWord:p});u(e),e?.matches&&g?g(e.matches):r&&r();},[a,d,p,m,g,r]);react.useEffect(()=>{x&&a.trim()&&i();},[d,p]);let ae=react.useCallback(e=>{D(e.target.value);},[]),le=react.useCallback(e=>{e.key==="Enter"?(e.preventDefault(),e.shiftKey?M():t?K():i()):e.key==="Escape"&&b();},[t,i,b]),re=react.useCallback(e=>{e.key==="Enter"?(e.preventDefault(),W()):e.key==="Escape"&&b();},[b]),K=react.useCallback(()=>{if(!a.trim()){i();return}if(!t){i();return}if(F()&&t){let c=(t.currentIndex+1)%t.totalCount;u({...t,currentIndex:c});}},[a,t,i,F]),M=react.useCallback(()=>{if(!a.trim()){i();return}if(!t){i();return}if(P()&&t){let c=t.currentIndex===0?t.totalCount-1:t.currentIndex-1;u({...t,currentIndex:c});}},[a,t,i,P]),W=react.useCallback(()=>{if(!t||t.totalCount===0)return;if(_(h)){let c=m(a,{matchCase:d,matchWholeWord:p});u(c),c?.matches&&g&&g(c.matches);}},[t,h,a,d,p,_,m,g]),ie=react.useCallback(()=>{if(!a.trim())return;O(a,h,{matchCase:d,matchWholeWord:p})>0&&(u({matches:[],totalCount:0,currentIndex:-1}),r&&r());},[a,h,d,p,O,r]),ce=react.useCallback(()=>{A(e=>{let c=!e;return c&&setTimeout(()=>U.current?.focus(),100),c});},[]),se=react.useCallback(e=>{e.target,e.currentTarget;},[]),de=react.useCallback(e=>{e.key==="Escape"&&b();},[b]);if(!x)return null;let f=t&&t.totalCount>0,pe=t&&t.totalCount===0&&a.trim();return jsxRuntime.jsx("div",{className:`docx-find-replace-dialog-overlay ${Z||""}`,style:{...ue,...H},onClick:se,onKeyDown:de,children:jsxRuntime.jsxs("div",{className:"docx-find-replace-dialog","data-testid":"find-replace-dialog",style:fe,role:"dialog","aria-modal":"false","aria-labelledby":"find-replace-dialog-title",children:[jsxRuntime.jsxs("div",{className:"docx-find-replace-dialog-header",style:xe,children:[jsxRuntime.jsx("h2",{id:"find-replace-dialog-title",style:ge,children:n(T?"dialogs.findReplace.titleFindReplace":"dialogs.findReplace.titleFind")}),jsxRuntime.jsx("button",{type:"button",className:"docx-find-replace-dialog-close",style:Se,onClick:b,"aria-label":n("common.closeDialog"),children:"\xD7"})]}),jsxRuntime.jsxs("div",{className:"docx-find-replace-dialog-body",style:be,children:[jsxRuntime.jsxs("div",{className:"docx-find-replace-dialog-row",style:V,children:[jsxRuntime.jsx("label",{htmlFor:"find-text",style:j,children:n("dialogs.findReplace.findLabel")}),jsxRuntime.jsx("input",{ref:C,id:"find-text",type:"text",className:"docx-find-replace-dialog-input",style:oe?X:k,value:a,onChange:ae,onKeyDown:le,onFocus:()=>B(true),onBlur:()=>{B(false),a.trim()&&!t&&i();},placeholder:n("dialogs.findReplace.findPlaceholder"),"aria-label":n("dialogs.findReplace.findAriaLabel")}),jsxRuntime.jsxs("div",{style:{display:"flex",gap:"4px"},children:[jsxRuntime.jsx("button",{type:"button",className:"docx-find-replace-dialog-nav",style:f?N:q,onClick:M,disabled:!f,"aria-label":n("dialogs.findReplace.findPrevious"),title:n("dialogs.findReplace.findPreviousTitle"),children:jsxRuntime.jsx(ye,{})}),jsxRuntime.jsx("button",{type:"button",className:"docx-find-replace-dialog-nav",style:f?N:q,onClick:K,disabled:!f,"aria-label":n("dialogs.findReplace.findNext"),title:n("dialogs.findReplace.findNextTitle"),children:jsxRuntime.jsx(Re,{})})]})]}),f&&jsxRuntime.jsx("div",{className:"docx-find-replace-dialog-status",style:Q,children:n("dialogs.findReplace.matchCount",{current:t.currentIndex+1,total:t.totalCount})}),pe&&jsxRuntime.jsx("div",{className:"docx-find-replace-dialog-status",style:ve,children:n("dialogs.findReplace.noResults")}),T&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs("div",{className:"docx-find-replace-dialog-row",style:V,children:[jsxRuntime.jsx("label",{htmlFor:"replace-text",style:j,children:n("dialogs.findReplace.replaceLabel")}),jsxRuntime.jsx("input",{ref:U,id:"replace-text",type:"text",className:"docx-find-replace-dialog-input",style:ne?X:k,value:h,onChange:e=>w(e.target.value),onKeyDown:re,onFocus:()=>Y(true),onBlur:()=>Y(false),placeholder:n("dialogs.findReplace.replacePlaceholder"),"aria-label":n("dialogs.findReplace.replaceAriaLabel")}),jsxRuntime.jsxs("div",{style:me,children:[jsxRuntime.jsx("button",{type:"button",className:"docx-find-replace-dialog-button",style:f?I:$,onClick:W,disabled:!f,title:n("dialogs.findReplace.replaceCurrentTitle"),children:n("dialogs.findReplace.replaceButton")}),jsxRuntime.jsx("button",{type:"button",className:"docx-find-replace-dialog-button",style:f?I:$,onClick:ie,disabled:!f,title:n("dialogs.findReplace.replaceAllTitle"),children:n("dialogs.findReplace.replaceAllButton")})]})]})}),jsxRuntime.jsxs("div",{className:"docx-find-replace-dialog-options",style:he,children:[jsxRuntime.jsxs("label",{className:"docx-find-replace-dialog-option",style:L,children:[jsxRuntime.jsx("input",{type:"checkbox",style:J,checked:d,onChange:e=>ee(e.target.checked)}),n("dialogs.findReplace.matchCase")]}),jsxRuntime.jsxs("label",{className:"docx-find-replace-dialog-option",style:L,children:[jsxRuntime.jsx("input",{type:"checkbox",style:J,checked:p,onChange:e=>te(e.target.checked)}),n("dialogs.findReplace.wholeWords")]}),!T&&jsxRuntime.jsx("button",{type:"button",style:{...L,background:"none",border:"none",cursor:"pointer",color:"var(--doc-link)",padding:0},onClick:ce,children:n("dialogs.findReplace.toggleReplace")})]})]})]})})}var Me=Te;exports.a=Te;exports.b=Me;
@@ -0,0 +1,2 @@
1
+ import {l,i,j as j$1,k}from'./chunk-RCIZ7OM3.mjs';import {c}from'./chunk-7QQSDIWK.mjs';import kt,{useRef,useState,useEffect,useCallback}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';function Yt({isOpen:t,onClose:n,align:l="left"}){let r=useRef(null),v=useRef(null),[h,a]=useState({top:0,left:0});useEffect(()=>{if(!t||!r.current)return;let c=r.current.getBoundingClientRect();l==="right"?requestAnimationFrame(()=>{if(v.current){let i=v.current.getBoundingClientRect();a({top:c.bottom+4,left:c.right-i.width});}else a({top:c.bottom+4,left:c.left});}):a({top:c.bottom+4,left:c.left});},[t,l]),useEffect(()=>{if(!t)return;let c=Z=>{let f=Z.target;r.current&&!r.current.contains(f)&&v.current&&!v.current.contains(f)&&n();},i=Z=>{Z.key==="Escape"&&n();},m=()=>n();return document.addEventListener("mousedown",c),document.addEventListener("keydown",i),window.addEventListener("scroll",m,true),()=>{document.removeEventListener("mousedown",c),document.removeEventListener("keydown",i),window.removeEventListener("scroll",m,true);}},[t,n]);let p=useCallback(c=>{c.preventDefault(),c.stopPropagation();},[]),u={position:"fixed",top:h.top,left:h.left,zIndex:1e4};return {containerRef:r,dropdownRef:v,dropdownStyle:u,handleMouseDown:p}}function e({size:t=20,className:n="",style:l,children:r}){return jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 -960 960 960",fill:"currentColor",className:n,style:{display:"inline-flex",flexShrink:0,...l},"aria-hidden":"true",children:r})}function V(t){return jsx(e,{...t,children:jsx("path",{d:"M280-200v-80h284q63 0 109.5-40T720-420q0-60-46.5-100T564-560H312l104 104-56 56-200-200 200-200 56 56-104 104h252q97 0 166.5 63T800-420q0 94-69.5 157T564-200H280Z"})})}function U(t){return jsx(e,{...t,children:jsx("path",{d:"M396-200q-97 0-166.5-63T160-420q0-94 69.5-157T396-640h252L544-744l56-56 200 200-200 200-56-56 104-104H396q-63 0-109.5 40T240-420q0 60 46.5 100T396-280h284v80H396Z"})})}function $(t){return jsx(e,{...t,children:jsx("path",{d:"M640-640v-120H320v120h-80v-200h480v200h-80Zm-480 80h640-640Zm560 100q17 0 28.5-11.5T760-500q0-17-11.5-28.5T720-540q-17 0-28.5 11.5T680-500q0 17 11.5 28.5T720-460Zm-80 260v-160H320v160h320Zm80 80H240v-160H80v-240q0-51 35-85.5t85-34.5h560q51 0 85.5 34.5T880-520v240H720v160Zm80-240v-160q0-17-11.5-28.5T760-560H200q-17 0-28.5 11.5T160-520v160h80v-80h480v80h80Z"})})}function j(t){return jsx(e,{...t,children:jsx("path",{d:"M480-320 280-520l56-58 104 104v-326h80v326l104-104 56 58-200 200ZM240-160q-33 0-56.5-23.5T160-240v-120h80v120h480v-120h80v120q0 33-23.5 56.5T720-160H240Z"})})}function K(t){return jsx(e,{...t,children:jsx("path",{d:"M440-320v-326L336-542l-56-58 200-200 200 200-56 58-104-104v326h-80ZM240-160q-33 0-56.5-23.5T160-240v-120h80v120h480v-120h80v120q0 33-23.5 56.5T720-160H240Z"})})}function G(t){return jsx(e,{...t,children:jsx("path",{d:"M272-200v-560h221q65 0 120 40t55 111q0 51-23 78.5T602-491q25 11 55.5 41t30.5 90q0 89-65 124.5T501-200H272Zm121-112h104q48 0 58.5-24.5T566-372q0-11-10.5-35.5T494-432H393v120Zm0-228h93q33 0 48-17t15-38q0-24-17-39t-44-15h-95v109Z"})})}function Q(t){return jsx(e,{...t,children:jsx("path",{d:"M200-200v-100h160l120-360H320v-100h400v100H580L460-300h140v100H200Z"})})}function Y(t){return jsx(e,{...t,children:jsx("path",{d:"M200-120v-80h560v80H200Zm123-223q-56-63-56-167v-330h103v336q0 56 28 91t82 35q54 0 82-35t28-91v-336h103v330q0 104-56 167t-157 63q-101 0-157-63Z"})})}function J(t){return jsx(e,{...t,children:jsx("path",{d:"M486-160q-76 0-135-45t-85-123l88-38q14 48 48.5 79t85.5 31q42 0 76-20t34-64q0-18-7-33t-19-27h112q5 14 7.5 28.5T694-340q0 86-61.5 133T486-160ZM80-480v-80h800v80H80Zm402-326q66 0 115.5 32.5T674-674l-88 39q-9-29-33.5-52T484-710q-41 0-68 18.5T386-640h-96q2-69 54.5-117.5T482-806Z"})})}function X(t){return jsx(e,{...t,children:jsx("path",{d:"M760-600v-80q0-17 11.5-28.5T800-720h80v-40H760v-40h120q17 0 28.5 11.5T920-760v40q0 17-11.5 28.5T880-680h-80v40h120v40H760ZM235-160l185-291-172-269h106l124 200h4l123-200h107L539-451l186 291H618L482-377h-4L342-160H235Z"})})}function t0(t){return jsx(e,{...t,children:jsx("path",{d:"M760-160v-80q0-17 11.5-28.5T800-280h80v-40H760v-40h120q17 0 28.5 11.5T920-320v40q0 17-11.5 28.5T880-240h-80v40h120v40H760Zm-525-80 185-291-172-269h106l124 200h4l123-200h107L539-531l186 291H618L482-457h-4L342-240H235Z"})})}function o0(t){return jsx(e,{...t,children:jsx("path",{d:"M440-280H280q-83 0-141.5-58.5T80-480q0-83 58.5-141.5T280-680h160v80H280q-50 0-85 35t-35 85q0 50 35 85t85 35h160v80ZM320-440v-80h320v80H320Zm200 160v-80h160q50 0 85-35t35-85q0-50-35-85t-85-35H520v-80h160q83 0 141.5 58.5T880-480q0 83-58.5 141.5T680-280H520Z"})})}function e0(t){return jsx(e,{...t,children:jsx("path",{d:"m528-546-93-93-121-121h486v120H568l-40 94ZM792-56 460-388l-80 188H249l119-280L56-792l56-56 736 736-56 56Z"})})}function n0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-120v-80h720v80H120Zm0-160v-80h480v80H120Zm0-160v-80h720v80H120Zm0-160v-80h480v80H120Zm0-160v-80h720v80H120Z"})})}function r0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-120v-80h720v80H120Zm160-160v-80h400v80H280ZM120-440v-80h720v80H120Zm160-160v-80h400v80H280ZM120-760v-80h720v80H120Z"})})}function l0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-760v-80h720v80H120Zm240 160v-80h480v80H360ZM120-440v-80h720v80H120Zm240 160v-80h480v80H360ZM120-120v-80h720v80H120Z"})})}function v0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-120v-80h720v80H120Zm0-160v-80h720v80H120Zm0-160v-80h720v80H120Zm0-160v-80h720v80H120Zm0-160v-80h720v80H120Z"})})}function c0(t){return jsx(e,{...t,children:jsx("path",{d:"M240-160 80-320l56-56 64 62v-332l-64 62-56-56 160-160 160 160-56 56-64-62v332l64-62 56 56-160 160Zm240-40v-80h400v80H480Zm0-240v-80h400v80H480Zm0-240v-80h400v80H480Z"})})}function h0(t){return jsx(e,{...t,children:jsx("path",{d:"M360-200v-80h480v80H360Zm0-240v-80h480v80H360Zm0-240v-80h480v80H360ZM200-160q-33 0-56.5-23.5T120-240q0-33 23.5-56.5T200-320q33 0 56.5 23.5T280-240q0 33-23.5 56.5T200-160Zm0-240q-33 0-56.5-23.5T120-480q0-33 23.5-56.5T200-560q33 0 56.5 23.5T280-480q0 33-23.5 56.5T200-400Zm-56.5-263.5Q120-687 120-720t23.5-56.5Q167-800 200-800t56.5 23.5Q280-753 280-720t-23.5 56.5Q233-640 200-640t-56.5-23.5Z"})})}function a0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-80v-60h100v-30h-60v-60h60v-30H120v-60h120q17 0 28.5 11.5T280-280v40q0 17-11.5 28.5T240-200q17 0 28.5 11.5T280-160v40q0 17-11.5 28.5T240-80H120Zm0-280v-110q0-17 11.5-28.5T160-510h60v-30H120v-60h120q17 0 28.5 11.5T280-560v70q0 17-11.5 28.5T240-450h-60v30h100v60H120Zm60-280v-180h-60v-60h120v240h-60Zm180 440v-80h480v80H360Zm0-240v-80h480v80H360Zm0-240v-80h480v80H360Z"})})}function i0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-120v-80h720v80H120Zm320-160v-80h400v80H440Zm0-160v-80h400v80H440Zm0-160v-80h400v80H440ZM120-760v-80h720v80H120Zm0 440v-320l160 160-160 160Z"})})}function p0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-120v-80h720v80H120Zm320-160v-80h400v80H440Zm0-160v-80h400v80H440Zm0-160v-80h400v80H440ZM120-760v-80h720v80H120Zm160 440L120-480l160-160v320Z"})})}function s0(t){return jsx(e,{...t,children:jsx("path",{d:"M80 0v-160h800V0H80Zm140-280 210-560h100l210 560h-96l-50-144H368l-52 144h-96Zm176-224h168l-82-232h-4l-82 232Z"})})}function m0(t){return jsx(e,{...t,children:jsx("path",{d:"M544-400 440-504 240-304l104 104 200-200Zm-47-161 104 104 199-199-104-104-199 199Zm-84-28 216 216-229 229q-24 24-56 24t-56-24l-2-2-26 26H60l126-126-2-2q-24-24-24-56t24-56l229-229Zm0 0 227-227q24-24 56-24t56 24l104 104q24 24 24 56t-24 56L629-373 413-589Z"})})}function u0(t){return jsx(e,{...t,children:jsx("path",{d:"M800-436q0 36-8 69t-22 63l-62-60q6-17 9-34.5t3-37.5q0-47-17.5-89T650-600L480-768l-88 86-56-56 144-142 226 222q44 42 69 99.5T800-436Zm-8 380L668-180q-41 29-88 44.5T480-120q-133 0-226.5-92.5T160-436q0-51 16-98t48-90L56-792l56-56 736 736-56 56ZM480-200q36 0 68.5-10t61.5-28L280-566q-21 32-30.5 64t-9.5 66q0 98 70 167t170 69Zm-37-204Zm110-116Z"})})}function d0(t){return jsx(e,{...t,children:jsx("path",{d:"M480-360 280-560h400L480-360Z"})})}function Z0(t){return jsx(e,{...t,children:jsx("path",{d:"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm240-240H200v160h240v-160Zm80 0v160h240v-160H520Zm-80-80v-160H200v160h240Zm80 0h240v-160H520v160ZM200-680h560v-80H200v80Z"})})}function f0(t){return jsx(e,{...t,children:jsx("path",{d:"M760-120H200q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120ZM200-640h560v-120H200v120Zm100 80H200v360h100v-360Zm360 0v360h100v-360H660Zm-80 0H380v360h200v-360Z"})})}function g0(t){return jsx(e,{...t,children:jsx("path",{d:"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h133v-133H200v133Zm213 0h134v-133H413v133Zm214 0h133v-133H627v133ZM200-413h133v-134H200v134Zm213 0h134v-134H413v134Zm214 0h133v-134H627v134ZM200-627h133v-133H200v133Zm213 0h134v-133H413v133Zm214 0h133v-133H627v133Z"})})}function T0(t){return jsx(e,{...t,children:jsx("path",{d:"M760-200v-120H200v120h560Zm0-200v-160H200v160h560Zm0-240v-120H200v120h560ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Z"})})}function I0(t){return jsx(e,{...t,children:jsx("path",{d:"M121-280v-400q0-33 23.5-56.5T201-760h559q33 0 56.5 23.5T840-680v400q0 33-23.5 56.5T760-200H201q-33 0-56.5-23.5T121-280Zm79 0h133v-400H200v400Zm213 0h133v-400H413v400Zm213 0h133v-400H626v400Z"})})}function q0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-120v-720h720v720H120Zm640-80v-240H520v240h240Zm0-560H520v240h240v-240Zm-560 0v240h240v-240H200Zm0 560h240v-240H200v240Z"})})}function b0(t){return jsx(e,{...t,children:jsx("path",{d:"M200-200h560v-560H200v560Zm-80 80v-720h720v720H120Zm160-320v-80h80v80h-80Zm160 160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 160v-80h80v80h-80Z"})})}function H0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-120v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-320v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-640v-80h80v80h-80Zm320 640v-80h80v80h-80Zm160 0v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-320v-80h80v80h-80Zm0-160v-80h80v80h-80Zm-160 0v-80h80v80h-80ZM440-120v-320H120v-80h320v-320h80v320h320v80H520v320h-80Z"})})}function C0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-120v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-320v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-320v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Z"})})}function S0(t){return jsx(e,{...t,children:jsx("path",{d:"M440-440H200v-80h240v-240h80v240h240v80H520v240h-80v-240Z"})})}function w0(t){return jsx(e,{...t,children:jsx("path",{d:"M200-440v-80h560v80H200Z"})})}function x0(t){return jsx(e,{...t,children:jsx("path",{d:"M280-120q-33 0-56.5-23.5T200-200v-520h-40v-80h200v-40h240v40h200v80h-40v520q0 33-23.5 56.5T680-120H280Zm400-600H280v520h400v-520ZM360-280h80v-360h-80v360Zm160 0h80v-360h-80v360ZM280-720v520-520Z"})})}function M0(t){return jsx(e,{...t,children:jsx("path",{d:"M600-240v-80h160v80H600Zm0-320v-80h280v80H600Zm0 160v-80h240v80H600ZM120-640H80v-80h160v-60h160v60h160v80h-40v360q0 33-23.5 56.5T440-200H200q-33 0-56.5-23.5T120-280v-360Zm80 0v360h240v-360H200Zm0 0v360-360Z"})})}function R0(t){return jsx(e,{...t,children:jsx("path",{d:"m296-160-56-56 200-200v-269L337-582l-57-57 200-200 201 201-57 57-104-104v301L296-160Zm368 1L536-286l57-57 127 128-56 56Z"})})}function P0(t){return jsx(e,{...t,children:jsx("path",{d:"M440-160v-304L240-664v104h-80v-240h240v80H296l224 224v336h-80Zm154-376-58-58 128-126H560v-80h240v240h-80v-104L594-536Z"})})}function _0(t){return jsx(e,{...t,children:jsx("path",{d:"M360-160q-33 0-56.5-23.5T280-240q0-33 23.5-56.5T360-320q33 0 56.5 23.5T440-240q0 33-23.5 56.5T360-160Zm240 0q-33 0-56.5-23.5T520-240q0-33 23.5-56.5T600-320q33 0 56.5 23.5T680-240q0 33-23.5 56.5T600-160ZM360-400q-33 0-56.5-23.5T280-480q0-33 23.5-56.5T360-560q33 0 56.5 23.5T440-480q0 33-23.5 56.5T360-400Zm240 0q-33 0-56.5-23.5T520-480q0-33 23.5-56.5T600-560q33 0 56.5 23.5T680-480q0 33-23.5 56.5T600-400ZM360-640q-33 0-56.5-23.5T280-720q0-33 23.5-56.5T360-800q33 0 56.5 23.5T440-720q0 33-23.5 56.5T360-640Zm240 0q-33 0-56.5-23.5T520-720q0-33 23.5-56.5T600-800q33 0 56.5 23.5T680-720q0 33-23.5 56.5T600-640Z"})})}function y0(t){return jsx(e,{...t,children:jsx("path",{d:"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm40-80h480L570-480 450-320l-90-120-120 160Zm-40 80v-560 560Z"})})}function L0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-280v-400h400v400H120Zm80-80h240v-240H200v240Zm-80-400v-80h720v80H120Zm480 160v-80h240v80H600Zm0 160v-80h240v80H600Zm0 160v-80h240v80H600ZM120-120v-80h720v80H120Z"})})}function A0(t){return jsx(e,{...t,children:jsx("path",{d:"M440-280v-400h400v400H440Zm80-80h240v-240H520v240ZM120-120v-80h720v80H120Zm0-160v-80h240v80H120Zm0-160v-80h240v80H120Zm0-160v-80h240v80H120Zm0-160v-80h720v80H120Z"})})}function k0(t){return jsx(e,{...t,children:jsx("path",{d:"M160-440v-80h640v80H160Z"})})}function B0(t){return jsx(e,{...t,children:jsx("path",{d:"M200-120q-33 0-56.5-23.5T120-200v-480h80v480h480v80H200Zm160-240v80q-33 0-56.5-23.5T280-360h80Zm-80-80v-80h80v80h-80Zm0-160v-80h80v80h-80Zm80-160h-80q0-33 23.5-56.5T360-840v80Zm80 480v-80h80v80h-80Zm0-480v-80h80v80h-80Zm160 0v-80h80v80h-80Zm0 480v-80h80v80h-80Zm160-480v-80q33 0 56.5 23.5T840-760h-80Zm0 400h80q0 33-23.5 56.5T760-280v-80Zm0-80v-80h80v80h-80Zm0-160v-80h80v80h-80Z"})})}function D0(t){return jsx(e,{...t,children:jsx("path",{d:"M360-280q-33 0-56.5-23.5T280-360v-400q0-33 23.5-56.5T360-840h400q33 0 56.5 23.5T840-760v400q0 33-23.5 56.5T760-280H360Zm0-80h400v-400H360v400ZM200-200v80q-33 0-56.5-23.5T120-200h80Zm-80-80v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 480v-80h80v80h-80Zm160 0v-80h80v80h-80Zm160 0v-80h80v80h-80Z"})})}function E0(t){return jsx(e,{...t,children:jsx("path",{d:"M480-80 310-250l57-57 73 73v-166h80v165l72-73 58 58L480-80ZM250-310 80-480l169-169 57 57-72 72h166v80H235l73 72-58 58Zm460 0-57-57 73-73H560v-80h165l-73-72 58-58 170 170-170 170ZM440-560v-166l-73 73-57-57 170-170 170 170-57 57-73-73v166h-80Z"})})}function W0(t){return jsx(e,{...t,children:jsx("path",{d:"M440-120v-240h80v80h320v80H520v80h-80Zm-320-80v-80h240v80H120Zm160-160v-80H120v-80h160v-80h80v240h-80Zm160-80v-80h400v80H440Zm160-160v-240h80v80h160v80H680v80h-80Zm-480-80v-80h400v80H120Z"})})}function F0(t){return jsx(e,{...t,children:jsx("path",{d:"M522-80v-82q34-5 66.5-18t61.5-34l56 58q-42 32-88 51.5T522-80Zm-80 0Q304-98 213-199.5T122-438q0-75 28.5-140.5t77-114q48.5-48.5 114-77T482-798h6l-62-62 56-58 160 160-160 160-56-56 64-64h-8q-117 0-198.5 81.5T202-438q0 104 68 182.5T442-162v82Zm322-134-58-56q21-29 34-61.5t18-66.5h82q-5 50-24.5 96T764-214Zm76-264h-82q-5-34-18-66.5T706-606l58-56q32 39 51 86t25 98Z"})})}function z0(t){return jsx(e,{...t,children:jsx("path",{d:"M440-80q-50-5-96-24.5T256-156l56-58q29 21 61.5 34t66.5 18v82Zm80 0v-82q104-15 172-93.5T760-438q0-117-81.5-198.5T480-718h-8l64 64-56 56-160-160 160-160 56 58-62 62h6q75 0 140.5 28.5t114 77q48.5 48.5 77 114T840-438q0 137-91 238.5T520-80ZM198-214q-32-42-51.5-88T122-398h82q5 34 18 66.5t34 61.5l-58 56Zm-76-264q6-51 25-98t51-86l58 56q-21 29-34 61.5T204-478h-82Z"})})}function N0(t){return jsx(e,{...t,children:jsx("path",{d:"M280-160 80-360l200-200 56 57-103 103h287v80H233l103 103-56 57Zm400-240-56-57 103-103H440v-80h287L624-743l56-57 200 200-200 200Z"})})}function O0(t){return jsx(e,{...t,children:jsx("path",{d:"M320-440v-287L217-624l-57-56 200-200 200 200-57 56-103-103v287h-80ZM600-80 400-280l57-56 103 103v-287h80v287l103-103 57 56L600-80Z"})})}function V0(t){return jsx(e,{...t,children:jsx("path",{d:"M600-360ZM320-242q10 1 19.5 1.5t20.5.5q11 0 20.5-.5T400-242v82h400v-400h-82q1-10 1.5-19.5t.5-20.5q0-11-.5-20.5T718-640h82q33 0 56.5 23.5T880-560v400q0 33-23.5 56.5T800-80H400q-33 0-56.5-23.5T320-160v-82Zm40-78q-117 0-198.5-81.5T80-600q0-117 81.5-198.5T360-880q117 0 198.5 81.5T640-600q0 117-81.5 198.5T360-320Zm0-80q83 0 141.5-58.5T560-600q0-83-58.5-141.5T360-800q-83 0-141.5 58.5T160-600q0 83 58.5 141.5T360-400Zm0-200Z"})})}function U0(t){return jsx(e,{...t,children:jsx("path",{d:"M440-80q-33 0-56.5-23.5T360-160v-160H240q-33 0-56.5-23.5T160-400v-280q0-66 47-113t113-47h480v440q0 33-23.5 56.5T720-320H600v160q0 33-23.5 56.5T520-80h-80ZM240-560h480v-200h-40v160h-80v-160h-40v80h-80v-80H320q-33 0-56.5 23.5T240-680v120Zm0 160h480v-80H240v80Zm0 0v-80 80Z"})})}function $0(t){return jsx(e,{...t,children:jsx("path",{d:"M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z"})})}function j0(t){return jsx(e,{...t,children:jsx("path",{d:"m296-345-56-56 240-240 240 240-56 56-184-184-184 184Z"})})}function K0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-120v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h720v80H120Zm160 640v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 320v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 480v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 320v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Z"})})}function G0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-120v-80h720v80H120Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 320v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 480v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 320v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 480v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Z"})})}function Q0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-120v-720h80v720h-80Zm160 0v-80h80v80h-80Zm0-320v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-320v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Z"})})}function Y0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-120v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-320v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-320v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 640v-720h80v720h-80Z"})})}function J0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-120v-60h60v60h-60Zm0-165v-60h60v60h-60Zm0-165v-60h720v60H120Zm0-165v-60h60v60h-60Zm0-165v-60h60v60h-60Zm165 660v-60h60v60h-60Zm0-660v-60h60v60h-60Zm165 660v-60h60v60h-60Zm0-165v-60h60v60h-60Zm0-330v-60h60v60h-60Zm0-165v-60h60v60h-60Zm165 660v-60h60v60h-60Zm0-660v-60h60v60h-60Zm165 660v-60h60v60h-60Zm0-165v-60h60v60h-60Zm0-330v-60h60v60h-60Zm0-165v-60h60v60h-60Z"})})}function X0(t){return jsx(e,{...t,children:jsx("path",{d:"M120-120v-60h60v60h-60Zm0-165v-60h60v60h-60Zm0-165v-60h60v60h-60Zm0-165v-60h60v60h-60Zm0-165v-60h60v60h-60Zm165 660v-60h60v60h-60Zm0-330v-60h60v60h-60Zm0-330v-60h60v60h-60Zm165 660v-720h60v720h-60Zm165 0v-60h60v60h-60Zm0-330v-60h60v60h-60Zm0-330v-60h60v60h-60Zm165 660v-60h60v60h-60Zm0-165v-60h60v60h-60Zm0-165v-60h60v60h-60Zm0-165v-60h60v60h-60Zm0-165v-60h60v60h-60Z"})})}function tt(t){return jsx(e,{...t,children:jsx("path",{d:"M320-600q17 0 28.5-11.5T360-640q0-17-11.5-28.5T320-680q-17 0-28.5 11.5T280-640q0 17 11.5 28.5T320-600Zm160 0q17 0 28.5-11.5T520-640q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640q0 17 11.5 28.5T480-600Zm160 0q17 0 28.5-11.5T680-640q0-17-11.5-28.5T640-680q-17 0-28.5 11.5T600-640q0 17 11.5 28.5T640-600ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm0-560v560-560Z"})})}function ot(t){return jsx(e,{...t,children:jsx("path",{d:"M160-200v-80h528l-42-42 56-56 138 138-138 138-56-56 42-42H160Zm116-200 164-440h80l164 440h-76l-38-112H392l-40 112h-76Zm138-176h132l-64-182h-4l-64 182Z"})})}function et(t){return jsx(e,{...t,children:jsx("path",{d:"M588-132 440-280l148-148 56 58-50 50h96q29 0 49.5-20.5T760-390q0-29-20.5-49.5T690-460H160v-80h530q63 0 106.5 43.5T840-390q0 63-43.5 106.5T690-240h-96l50 50-56 58ZM160-240v-80h200v80H160Zm0-440v-80h640v80H160Z"})})}function nt(t){return jsx(e,{...t,children:jsx("path",{d:"M480-120 320-280l56-56 64 63v-414l-64 63-56-56 160-160 160 160-56 57-64-64v414l64-63 56 56-160 160Z"})})}function rt(t){return jsx(e,{...t,children:jsx("path",{d:"M120-120v-720h80v720h-80Zm640 0v-720h80v720h-80ZM280-440v-80h80v80h-80Zm160 0v-80h80v80h-80Zm160 0v-80h80v80h-80Z"})})}function lt(t){return jsx(e,{...t,children:jsx("path",{d:"m370-80-16-128q-13-5-24.5-12T307-235l-119 50L78-375l103-78q-1-7-1-13.5v-27q0-6.5 1-13.5L78-585l110-190 119 50q11-8 23-15t24-12l16-128h220l16 128q13 5 24.5 12t22.5 15l119-50 110 190-103 78q1 7 1 13.5v27q0 6.5-2 13.5l103 78-110 190-118-50q-11 8-23 15t-24 12L590-80H370Zm70-80h79l14-106q31-8 57.5-23.5T639-327l99 41 39-68-86-65q5-14 7-29.5t2-31.5q0-16-2-31.5t-7-29.5l86-65-39-68-99 42q-22-23-48.5-38.5T533-694l-13-106h-79l-14 106q-31 8-57.5 23.5T321-633l-99-41-39 68 86 64q-5 15-7 30t-2 32q0 16 2 31t7 30l-86 65 39 68 99-42q22 23 48.5 38.5T427-266l13 106Zm42-180q58 0 99-41t41-99q0-58-41-99t-99-41q-59 0-99.5 41T342-480q0 58 40.5 99t99.5 41Zm-2-140Z"})})}function vt(t){return jsx(e,{...t,children:jsx("path",{d:"M80 0v-160h800V0H80Zm160-320h56l312-311-29-29-28-28-311 312v56Zm-80 80v-170l448-447q11-11 25.5-17t30.5-6q16 0 31 6t27 18l55 56q12 11 17.5 26t5.5 31q0 15-5.5 29.5T777-687L330-240H160Zm560-504-56-56 56 56ZM608-631l-29-29-28-28 57 57Z"})})}function ct(t){return jsx(e,{...t,children:jsx("path",{d:"m247-904 57-56 343 343q23 23 23 57t-23 57L457-313q-23 23-57 23t-57-23L153-503q-23-23-23-57t23-57l190-191-96-96Zm153 153L209-560h382L400-751Zm360 471q-33 0-56.5-23.5T680-360q0-21 12.5-45t27.5-45q9-12 19-25t21-25q11 12 21 25t19 25q15 21 27.5 45t12.5 45q0 33-23.5 56.5T760-280ZM80 0v-160h800V0H80Z"})})}function ht(t){return jsx(e,{...t,children:jsx("path",{d:"M160-760v-80h640v80H160Zm280 640v-408L336-424l-56-56 200-200 200 200-56 56-104-104v408h-80Z"})})}function at(t){return jsx(e,{...t,children:jsx("path",{d:"M440-80v-168l-64 64-56-56 160-160 160 160-56 56-64-64v168h-80ZM160-440v-80h640v80H160Zm320-120L320-720l56-56 64 64v-168h80v168l64-64 56 56-160 160Z"})})}function it(t){return jsx(e,{...t,children:jsx("path",{d:"M160-120v-80h640v80H160Zm320-160L280-480l56-56 104 104v-408h80v408l104-104 56 56-200 200Z"})})}function pt(t){return jsx(e,{...t,children:jsx("path",{d:"M120-160v-40h720v40H120Zm0-120v-80h720v80H120Zm0-160v-120h720v120H120Zm0-200v-160h720v160H120Z"})})}function st(t){return jsx(e,{...t,children:jsx("path",{d:"M480-528 296-344l-56-56 240-240 240 240-56 56-184-184Z"})})}function mt(t){return jsx(e,{...t,children:jsx("path",{d:"M480-344 240-584l56-56 184 184 184-184 56 56-240 240Z"})})}function ut(t){return jsx(e,{...t,children:jsx("path",{d:"M560-240 320-480l240-240 56 56-184 184 184 184-56 56Z"})})}function dt(t){return jsx(e,{...t,children:jsx("path",{d:"M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z"})})}function Zt(t){return jsx(e,{...t,children:jsx("path",{d:"M480-160q-33 0-56.5-23.5T400-240q0-33 23.5-56.5T480-320q33 0 56.5 23.5T560-240q0 33-23.5 56.5T480-160Zm0-240q-33 0-56.5-23.5T400-480q0-33 23.5-56.5T480-560q33 0 56.5 23.5T560-480q0 33-23.5 56.5T480-400Zm0-240q-33 0-56.5-23.5T400-720q0-33 23.5-56.5T480-800q33 0 56.5 23.5T560-720q0 33-23.5 56.5T480-640Z"})})}function ft(t){return jsx(e,{...t,children:jsx("path",{d:"M120-440v-80h160v80H120Zm200 0v-80h160v80H320Zm200 0v-80h160v80H520Zm200 0v-80h120v80H720ZM240-120q-33 0-56.5-23.5T160-200v-120h80v120h480v-120h80v120q0 33-23.5 56.5T720-120H240Zm-80-520v-120q0-33 23.5-56.5T240-840h480q33 0 56.5 23.5T800-760v120h-80v-120H240v120h-80Z"})})}function gt(t){return jsx(e,{...t,children:jsx("path",{d:"M313-440l224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z"})})}function Tt(t){return jsx(e,{...t,children:jsx("path",{d:"M268-240 42-466l57-56 170 170 56 56-57 56Zm226 0L268-466l56-57 170 170 368-368 57 57-425 424Zm0-226-57-56 198-198 57 56-198 198Z"})})}function It(t){return jsx(e,{...t,children:jsx("path",{d:"m424-296 282-282-56-56-226 226-114-114-56 56 170 170Zm56 216q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z"})})}function qt(t){return jsx(e,{...t,children:jsx("path",{d:"M80-80v-720q0-33 23.5-56.5T160-880h640q33 0 56.5 23.5T880-800v480q0 33-23.5 56.5T800-240H240L80-80Zm126-240h594v-480H160v525l46-45Zm-46 0v-480 480Z"})})}function bt(t){return jsxs(e,{...t,children:[jsx("path",{d:"M80-80v-720q0-33 23.5-56.5T160-880h640q33 0 56.5 23.5T880-800v480q0 33-23.5 56.5T800-240H240L80-80Zm126-240h594v-480H160v525l46-45Zm-46 0v-480 480Z"}),jsx("path",{fill:"#188038",d:"m421-380 227-227-45-45-182 182-92-91-45 45 137 136Z"})]})}function Ht(t){return jsx(e,{...t,children:jsx("path",{d:"M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"})})}function Ct(t){return jsx(e,{...t,children:jsx("path",{d:"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"})})}function St(t){return jsx(e,{...t,children:jsx("path",{d:"M440-400h80v-120h120v-80H520v-120h-80v120H320v80h120v120ZM80-80v-720q0-33 23.5-56.5T160-880h640q33 0 56.5 23.5T880-800v480q0 33-23.5 56.5T800-240H240L80-80Zm126-240h594v-480H160v525l46-45Zm-46 0v-480 480Z"})})}function wt(t){return jsx(e,{...t,children:jsx("path",{d:"M240-400h480v-80H240v80Zm0-120h480v-80H240v80Zm0-120h480v-80H240v80ZM80-80v-720q0-33 23.5-56.5T160-880h640q33 0 56.5 23.5T880-800v480q0 33-23.5 56.5T800-240H240L80-80Zm126-240h594v-480H160v525l46-45Zm-46 0v-480 480Z"})})}function xt(t){return jsx(e,{...t,children:jsx("path",{d:"M160-400h280v-80H160v80Zm0-160h440v-80H160v80Zm0-160h440v-80H160v80Zm360 360v-123l221-220q9-9 20-13t22-4q12 0 23 4.5t20 13.5l37 37q8 9 12.5 20t4.5 22q0 11-4 22.5T863-380L643-160H520Zm300-263-37-37 37 37ZM580-220h38l121-122-18-19-19-18-122 121v38Zm141-141-19-18 37 37-18-19Z"})})}function Mt(t){return jsx(e,{...t,children:jsx("path",{d:"M240-400h122l200-200q9-9 13.5-20.5T580-643q0-11-5-21.5T562-684l-36-38q-9-9-20-13.5t-23-4.5q-11 0-22.5 4.5T440-722L240-522v122Zm280-243-37-37 37 37ZM300-460v-38l101-101 20 18 18 20-101 101h-38Zm121-121 18 20-38-38 20 18Zm26 181h273v-80H527l-80 80ZM80-80v-720q0-33 23.5-56.5T160-880h640q33 0 56.5 23.5T880-800v480q0 33-23.5 56.5T800-240H240L80-80Zm126-240h594v-480H160v525l46-45Zm-46 0v-480 480Z"})})}function Rt(t){return jsx(e,{...t,children:jsx("path",{d:"M480-320q75 0 127.5-52.5T660-500q0-75-52.5-127.5T480-680q-75 0-127.5 52.5T300-500q0 75 52.5 127.5T480-320Zm0-72q-45 0-76.5-31.5T372-500q0-45 31.5-76.5T480-608q45 0 76.5 31.5T588-500q0 45-31.5 76.5T480-392Zm0 192q-146 0-266-81.5T40-500q54-137 174-218.5T480-800q146 0 266 81.5T920-500q-54 137-174 218.5T480-200Zm0-300Zm0 220q113 0 207.5-59.5T832-500q-50-101-144.5-160.5T480-720q-113 0-207.5 59.5T128-500q50 101 144.5 160.5T480-280Z"})})}function Pt(t){return jsx(e,{...t,children:jsx("path",{d:"M360-360v-200q-66 0-113-47t-47-113q0-66 47-113t113-47h320v80h-80v440h-80v-440h-80v440h-80Zm0-280v-160q-33 0-56.5 23.5T280-720q0 33 23.5 56.5T360-640Zm0-80ZM680-80l-56-56 64-64H120v-80h568l-64-64 56-56 160 160L680-80Z"})})}function _t(t){return jsx(e,{...t,children:jsx("path",{d:"M360-360v-200q-66 0-113-47t-47-113q0-66 47-113t113-47h320v80h-80v440h-80v-440h-80v440h-80Zm-88 160 64 64-56 56-160-160 160-160 56 56-64 64h568v80H272Zm88-440v-160q-33 0-56.5 23.5T280-720q0 33 23.5 56.5T360-640Zm0-80Z"})})}function yt(t){return jsx(e,{...t,children:jsx("path",{d:"m760-600-50-110-110-50 110-50 50-110 50 110 110 50-110 50-50 110Zm0 560-50-110-110-50 110-50 50-110 50 110 110 50-110 50-50 110ZM360-160 260-380 40-480l220-100 100-220 100 220 220 100-220 100-100 220Zm0-194 40-86 86-40-86-40-40-86-40 86-86 40 86 40 40 86Zm0-126Z"})})}var Lt={undo:V,redo:U,print:$,file_download:j,file_upload:K,format_bold:G,format_italic:Q,format_underlined:Y,strikethrough_s:J,superscript:X,subscript:t0,link:o0,format_clear:e0,format_align_left:n0,format_align_center:r0,format_align_right:l0,format_align_justify:v0,format_line_spacing:c0,format_list_bulleted:h0,format_list_numbered:a0,format_indent_increase:i0,format_indent_decrease:p0,format_color_text:s0,ink_highlighter:m0,format_color_reset:u0,arrow_drop_down:d0,table:Z0,table_chart:f0,grid_on:g0,table_rows:T0,view_column:I0,border_all:q0,border_outer:b0,border_inner:H0,border_clear:C0,add:S0,remove:w0,delete:x0,delete_sweep:M0,call_merge:R0,call_split:P0,drag_indicator:_0,image:y0,format_image_left:L0,format_image_right:A0,horizontal_rule:k0,flip_to_back:B0,flip_to_front:D0,open_with:E0,tune:W0,rotate_right:F0,rotate_left:z0,swap_horiz:N0,swap_vert:O0,shapes:V0,format_paint:U0,expand_more:$0,expand_less:j0,border_top:K0,border_bottom:G0,border_left:Q0,border_right:Y0,border_horizontal:J0,border_vertical:X0,padding:tt,text_rotation_none:ot,wrap_text:et,height:nt,fit_width:rt,settings:lt,border_color:vt,format_color_fill:ct,vertical_align_top:ht,vertical_align_center:at,vertical_align_bottom:it,line_weight:pt,keyboard_arrow_up:st,keyboard_arrow_down:mt,keyboard_arrow_left:ut,keyboard_arrow_right:dt,more_vert:Zt,page_break:ft,arrow_back:gt,done_all:Tt,check_circle:It,chat_bubble_outline:qt,chat_bubble_check:bt,check:Ht,close:Ct,add_comment:St,comment:wt,edit_note:xt,rate_review:Mt,visibility:Rt,format_textdirection_l_to_r:Pt,format_textdirection_r_to_l:_t,"agent-sparkle":yt};function g({name:t,size:n=20,className:l="",style:r}){let v=Lt[t];return v?jsx(v,{size:n,className:l,style:r}):(console.warn(`Icon not found: ${t}`),jsx("span",{className:l,style:{fontSize:n,width:n,height:n,...r},children:t}))}var q=16;function Bt(){return jsx(g,{name:"table_rows",size:q,style:{transform:"scaleY(-1)"}})}function Dt(){return jsx(g,{name:"table_rows",size:q})}function Et(){return jsx(g,{name:"view_column",size:q,style:{transform:"scaleX(-1)"}})}function Wt(){return jsx(g,{name:"view_column",size:q})}function Ft(){return jsx(g,{name:"delete_sweep",size:q})}function zt(){return jsx(g,{name:"delete_sweep",size:q,style:{transform:"rotate(90deg)"}})}function Nt(){return jsx(g,{name:"call_merge",size:q})}function Ot(){return jsx(g,{name:"call_split",size:q})}function Vt(){return jsx(g,{name:"delete",size:q,className:"text-red-600"})}var T={container:{display:"flex",alignItems:"center",gap:"4px",padding:"4px 8px",backgroundColor:"var(--doc-bg-subtle)",borderRadius:"4px",border:"1px solid var(--doc-border)",fontSize:"12px"},containerCompact:{padding:"2px 4px",gap:"2px"},containerFloating:{position:"absolute",zIndex:1e3,boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)"},group:{display:"flex",alignItems:"center",gap:"2px"},separator:{width:"1px",height:"20px",backgroundColor:"var(--doc-border-dark)",margin:"0 4px"},button:{display:"flex",alignItems:"center",justifyContent:"center",gap:"4px",padding:"4px 8px",border:"none",borderRadius:"3px",backgroundColor:"transparent",color:"var(--doc-text)",cursor:"pointer",fontSize:"12px",lineHeight:"1",transition:"background-color 0.15s, color 0.15s"},buttonCompact:{padding:"3px 5px"},buttonHover:{backgroundColor:"var(--doc-border)"},buttonDisabled:{color:"var(--doc-text-subtle)",cursor:"not-allowed"},buttonDelete:{color:"var(--doc-error)"},label:{fontSize:"11px",fontWeight:500,color:"var(--doc-text-muted)",marginRight:"8px",whiteSpace:"nowrap"}};function I({action:t,label:n,icon:l,disabled:r=false,onClick:v,showLabel:h=false,compact:a=false,shortcut:p}){let[u,c]=kt.useState(false),i=typeof t=="string"&&t.startsWith("delete"),m={...T.button,...a?T.buttonCompact:{},...u&&!r?T.buttonHover:{},...r?T.buttonDisabled:{},...i&&!r?T.buttonDelete:{}},Z=p?`${n} (${p})`:n;return jsxs("button",{type:"button",className:`docx-table-toolbar-button docx-table-toolbar-${typeof t=="string"?t:t.type}`,style:m,disabled:r,onClick:v,onMouseEnter:()=>c(true),onMouseLeave:()=>c(false),title:Z,"aria-label":n,children:[l,h&&jsx("span",{children:n})]})}function P({children:t,showSeparator:n=true}){return jsxs(Fragment,{children:[jsx("div",{style:T.group,children:t}),n&&jsx("div",{style:T.separator})]})}function co({context:t,onAction:n,disabled:l=false,className:r,style:v,showLabels:h=false,compact:a=false,position:p="top",children:u}){let{t:c$1}=c();if(!t)return null;let i=M=>{!l&&n&&t&&n(M,t);},m=t.rowCount>1,Z=t.columnCount>1,f=t.hasMultiCellSelection,b=t.canSplitCell,H={...T.container,...a?T.containerCompact:{},...p==="floating"?T.containerFloating:{},...v},d=["docx-table-toolbar"];return r&&d.push(r),a&&d.push("docx-table-toolbar-compact"),p==="floating"&&d.push("docx-table-toolbar-floating"),jsxs("div",{className:d.join(" "),style:H,role:"toolbar","aria-label":c$1("table.editingTools"),children:[jsx("span",{style:T.label,children:c$1("table.label")}),jsxs(P,{children:[jsx(I,{action:"addRowAbove",label:c$1("table.insertRowAbove"),icon:jsx(Bt,{}),disabled:l,onClick:()=>i("addRowAbove"),showLabel:h,compact:a}),jsx(I,{action:"addRowBelow",label:c$1("table.insertRowBelow"),icon:jsx(Dt,{}),disabled:l,onClick:()=>i("addRowBelow"),showLabel:h,compact:a}),jsx(I,{action:"deleteRow",label:c$1("table.deleteRow"),icon:jsx(Ft,{}),disabled:l||!m,onClick:()=>i("deleteRow"),showLabel:h,compact:a})]}),jsxs(P,{children:[jsx(I,{action:"addColumnLeft",label:c$1("table.insertColumnLeft"),icon:jsx(Et,{}),disabled:l,onClick:()=>i("addColumnLeft"),showLabel:h,compact:a}),jsx(I,{action:"addColumnRight",label:c$1("table.insertColumnRight"),icon:jsx(Wt,{}),disabled:l,onClick:()=>i("addColumnRight"),showLabel:h,compact:a}),jsx(I,{action:"deleteColumn",label:c$1("table.deleteColumn"),icon:jsx(zt,{}),disabled:l||!Z,onClick:()=>i("deleteColumn"),showLabel:h,compact:a})]}),jsxs(P,{showSeparator:false,children:[jsx(I,{action:"mergeCells",label:c$1("table.mergeCells"),icon:jsx(Nt,{}),disabled:l||!f,onClick:()=>i("mergeCells"),showLabel:h,compact:a}),jsx(I,{action:"splitCell",label:c$1("table.splitCell"),icon:jsx(Ot,{}),disabled:l||!b,onClick:()=>i("splitCell"),showLabel:h,compact:a}),jsx(I,{action:"deleteTable",label:c$1("table.deleteTable"),icon:jsx(Vt,{}),disabled:l,onClick:()=>i("deleteTable"),showLabel:h,compact:a})]}),u]})}function ho(t,n){let l=t.rows.length,r=y(t),v=!!(n.selectedCells&&(n.selectedCells.startRow!==n.selectedCells.endRow||n.selectedCells.startCol!==n.selectedCells.endCol)),a=!!F(t,n.rowIndex,n.columnIndex)&&!v;return {table:t,selection:n,hasMultiCellSelection:v,canSplitCell:a,rowCount:l,columnCount:r}}function y(t){if(!t.rows.length)return 0;let n=0;for(let l of t.rows){let r=0;for(let v of l.cells)r+=v.formatting?.gridSpan??1;n=Math.max(n,r);}return n}function F(t,n,l){let r=t.rows[n];if(!r)return null;let v=0;for(let h of r.cells){let a=h.formatting?.gridSpan??1;if(l>=v&&l<v+a)return h;v+=a;}return null}function Ut(t,n){let l=[],r=0;for(let v of t.cells){let h=v.formatting?.gridSpan??1;l.push({type:"tableCell",content:[{type:"paragraph",content:[],formatting:{}}],formatting:{...v.formatting,vMerge:void 0}}),r+=h;}for(;r<n;)l.push({type:"tableCell",content:[{type:"paragraph",content:[],formatting:{}}],formatting:{}}),r++;return {type:"tableRow",cells:l,formatting:{...t.formatting,header:false}}}function $t(){return {type:"tableCell",content:[{type:"paragraph",content:[],formatting:{}}],formatting:{}}}function jt(t,n){let l=0;for(let r of t.cells){let v=r.formatting?.gridSpan??1;if(l===n)return r;l+=v;}return null}function z(t){let n=[],l=0;for(let r=0;r<t.rows.length;r++){let v=t.rows[r],h=0;for(let a of v.cells){let p=a.formatting?.gridSpan??1;if(a.formatting?.vMerge!=="continue"){let u=1;if(a.formatting?.vMerge==="restart")for(let c=r+1;c<t.rows.length;c++){let i=jt(t.rows[c],h);if(!i||i.formatting?.vMerge!=="continue")break;u+=1;}n.push({data:a,row:r,col:h,rowspan:u,colspan:p});}h+=p,l=Math.max(l,h);}}return {anchors:n,totalCols:l}}function _(t,n,l){let r={...t.formatting??{}};return n>1?r.gridSpan=n:delete r.gridSpan,l>1?r.vMerge="restart":delete r.vMerge,Object.keys(r).length?r:void 0}function Kt(t,n){let l={...t.formatting??{}};return n>1?l.gridSpan=n:delete l.gridSpan,l.vMerge="continue",l}function ao(t,n,l$1){let{anchors:r}=z(t),v=r.find(h=>n>=h.row&&n<h.row+h.rowspan&&l$1>=h.col&&l$1<h.col+h.colspan);return v?l(v.rowspan,v.colspan):null}function io(t,n,l,r,v){if(r<1||v<1)return t;let{anchors:h,totalCols:a}=z(t),p=h.find(d=>n>=d.row&&n<d.row+d.rowspan&&l>=d.col&&l<d.col+d.colspan);if(!p||r<p.rowspan||v<p.colspan||r===1&&v===1)return t;let u=t.columnWidths&&t.columnWidths.length>0?[...t.columnWidths]:Array.from({length:a},()=>1440),c=i(u,p.col,p.colspan,v),i$1=j$1(h,p,r,v,t.rows.length,d=>d?{...p.data,formatting:_(p.data,1,1)}:{type:"tableCell",content:[{type:"paragraph",content:[],formatting:{}}],formatting:_(p.data,1,1)}),{byStart:m,byCoveredSlot:Z}=k(i$1.anchors),f=p.row+p.rowspan,b=a+i$1.deltaCols,H=[];for(let d=0;d<i$1.newRowCount;d++){let M=d<f?t.rows[d]:d<p.row+r?t.rows[f-1]:t.rows[d-i$1.deltaRows],R=[];for(let C=0;C<b;){let S=m.get(`${d}-${C}`);if(S){R.push({...S.data,formatting:_(S.data,S.colspan,S.rowspan)}),C+=S.colspan;continue}let x=Z.get(`${d}-${C}`);if(!x){C+=1;continue}R.push({...x.data,content:[],formatting:Kt(x.data,x.colspan)}),C+=x.colspan;}H.push({type:"tableRow",formatting:M?.formatting?{...M.formatting}:void 0,cells:R});}return {...t,rows:H,columnWidths:c}}function po(t,n,l="after"){let r=[...t.rows],v=l==="before"?n:n+1,h=t.rows[n]||t.rows[0],a=y(t),p=Ut(h,a);return r.splice(v,0,p),{...t,rows:r}}function so(t,n){if(t.rows.length<=1)return t;let l=t.rows.filter((r,v)=>v!==n);return {...t,rows:l}}function mo(t,n,l="after"){let r=l==="before"?n:n+1,v=t.rows.map(a=>{let p=[...a.cells],u=0,c=0;for(let i=0;i<a.cells.length;i++){let Z=a.cells[i].formatting?.gridSpan??1;if(r<=u+Z){c=l==="before"?i:i+1;break}u+=Z,c=i+1;}return p.splice(c,0,$t()),{...a,cells:p}}),h=t.columnWidths;if(t.columnWidths&&t.columnWidths.length>0){h=[...t.columnWidths];let a=t.columnWidths[n]||t.columnWidths[0]||1440;h.splice(r,0,a);}return {...t,rows:v,columnWidths:h}}function uo(t,n){if(y(t)<=1)return t;let r=t.rows.map(h=>{let a=0,p=[];for(let u of h.cells){let c=u.formatting?.gridSpan??1;n>=a&&n<a+c?c>1&&p.push({...u,formatting:{...u.formatting,gridSpan:c-1}}):p.push(u),a+=c;}return {...h,cells:p}}),v=t.columnWidths;return t.columnWidths&&t.columnWidths.length>n&&(v=t.columnWidths.filter((h,a)=>a!==n)),{...t,rows:r,columnWidths:v}}function Zo(t,n){if(!n.selectedCells)return t;let{startRow:l,startCol:r,endRow:v,endCol:h}=n.selectedCells,a=v-l+1,p=h-r+1,u=t.rows.map((c,i)=>{if(i<l||i>v)return c;let m=[],Z=0;for(let f of c.cells){let b=f.formatting?.gridSpan??1,H=Z+b-1;Z<=h&&H>=r?i===l&&Z===r?m.push({...f,formatting:{...f.formatting,gridSpan:p,vMerge:a>1?"restart":void 0}}):i>l&&Z===r&&m.push({...f,formatting:{...f.formatting,gridSpan:p,vMerge:"continue"}}):m.push(f),Z+=b;}return {...c,cells:m}});return {...t,rows:u}}function fo(t,n,l){let r=F(t,n,l);if(!r)return t;let v=r.formatting?.gridSpan??1,h=r.formatting?.vMerge==="restart";if(v<=1&&!h)return t;let a=t.rows.map((p,u)=>{if(u!==n&&!h)return p;let c=[],i=0;for(let m of p.cells){let Z=m.formatting?.gridSpan??1;if(i===l||i<=l&&l<i+Z)if(v>1)for(let f=0;f<v;f++)c.push({type:"tableCell",content:f===0?m.content:[{type:"paragraph",content:[],formatting:{}}],formatting:{...m.formatting,gridSpan:void 0,vMerge:void 0}});else h&&u===n?c.push({...m,formatting:{...m.formatting,vMerge:void 0}}):m.formatting?.vMerge==="continue"?c.push({type:"tableCell",content:[{type:"paragraph",content:[],formatting:{}}],formatting:{...m.formatting,vMerge:void 0}}):c.push(m);else c.push(m);i+=Z;}return {...p,cells:c}});return {...t,rows:a}}
2
+ export{c0 as a,g as b,Yt as c,co as d,ho as e,y as f,F as g,ao as h,io as i,po as j,so as k,mo as l,uo as m,Zo as n,fo as o};