@eigenpal/docx-editor-react 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/LICENSE +204 -0
  2. package/README.md +70 -0
  3. package/dist/FindReplaceDialog-6D74QA4V.mjs +1 -0
  4. package/dist/FindReplaceDialog-RUFM7CNM.js +1 -0
  5. package/dist/FootnotePropertiesDialog-INLVLE26.mjs +1 -0
  6. package/dist/FootnotePropertiesDialog-WCGK6MV3.js +1 -0
  7. package/dist/HyperlinkDialog-G5FFKLWY.js +1 -0
  8. package/dist/HyperlinkDialog-PSJ6P3E3.mjs +1 -0
  9. package/dist/ImagePositionDialog-DTGYFFAR.js +1 -0
  10. package/dist/ImagePositionDialog-FKBG2MSL.mjs +1 -0
  11. package/dist/ImagePropertiesDialog-SO6RAOT6.js +1 -0
  12. package/dist/ImagePropertiesDialog-T77XMKJF.mjs +1 -0
  13. package/dist/KeyboardShortcutsDialog-B-h3NAat.d.mts +415 -0
  14. package/dist/KeyboardShortcutsDialog-B-h3NAat.d.ts +415 -0
  15. package/dist/PageSetupDialog-CCJAZEIN.mjs +1 -0
  16. package/dist/PageSetupDialog-UKXK6X35.js +1 -0
  17. package/dist/PrintPreview-DEhwRBC_.d.mts +93 -0
  18. package/dist/PrintPreview-DEhwRBC_.d.ts +93 -0
  19. package/dist/SplitCellDialog-NPGW4JGQ.mjs +1 -0
  20. package/dist/SplitCellDialog-RNP37SKZ.js +1 -0
  21. package/dist/TablePropertiesDialog-3QNCWNEG.mjs +1 -0
  22. package/dist/TablePropertiesDialog-AQVM7FGA.js +1 -0
  23. package/dist/chunk-5BSDRI3Z.js +1 -0
  24. package/dist/chunk-6AX4I76A.mjs +1 -0
  25. package/dist/chunk-AJ2BNSGR.mjs +1 -0
  26. package/dist/chunk-BJ5RZW6Y.js +1 -0
  27. package/dist/chunk-BMBP5UFA.mjs +1 -0
  28. package/dist/chunk-BZO4G5M6.js +1 -0
  29. package/dist/chunk-G3VEHNWI.js +2 -0
  30. package/dist/chunk-GM2S2WMT.mjs +1 -0
  31. package/dist/chunk-GNIO6SOS.js +1 -0
  32. package/dist/chunk-ICVBXT6V.mjs +2 -0
  33. package/dist/chunk-IL65NW44.mjs +2 -0
  34. package/dist/chunk-IVFYCMAM.mjs +1 -0
  35. package/dist/chunk-JGPOALUP.js +1 -0
  36. package/dist/chunk-JHSXIGTQ.js +1 -0
  37. package/dist/chunk-K5DD2LSK.mjs +1 -0
  38. package/dist/chunk-L4MDZW2J.js +1 -0
  39. package/dist/chunk-NIBCC7WQ.js +1 -0
  40. package/dist/chunk-OHNO4NRQ.mjs +1 -0
  41. package/dist/chunk-P3ADI7OT.mjs +1 -0
  42. package/dist/chunk-PGHNUFNT.js +2 -0
  43. package/dist/chunk-SW2JOSQG.mjs +2 -0
  44. package/dist/chunk-TKMHUFSP.js +1 -0
  45. package/dist/chunk-TN5C2ZYV.mjs +2 -0
  46. package/dist/chunk-UT6DJWGC.js +2 -0
  47. package/dist/chunk-YVYT3JWY.js +2 -0
  48. package/dist/chunk-ZFZJRL2R.mjs +1 -0
  49. package/dist/dialogs.d.mts +40 -0
  50. package/dist/dialogs.d.ts +40 -0
  51. package/dist/dialogs.js +1 -0
  52. package/dist/dialogs.mjs +1 -0
  53. package/dist/hooks.d.mts +497 -0
  54. package/dist/hooks.d.ts +497 -0
  55. package/dist/hooks.js +1 -0
  56. package/dist/hooks.mjs +1 -0
  57. package/dist/index.d.mts +524 -0
  58. package/dist/index.d.ts +524 -0
  59. package/dist/index.js +33 -0
  60. package/dist/index.mjs +33 -0
  61. package/dist/plugin-api.d.mts +90 -0
  62. package/dist/plugin-api.d.ts +90 -0
  63. package/dist/plugin-api.js +246 -0
  64. package/dist/plugin-api.mjs +246 -0
  65. package/dist/styles.css +1 -0
  66. package/dist/styles.d.mts +13 -0
  67. package/dist/styles.d.ts +13 -0
  68. package/dist/styles.js +1 -0
  69. package/dist/styles.mjs +1 -0
  70. package/dist/types-D35gNE-_.d.mts +106 -0
  71. package/dist/types-D35gNE-_.d.ts +106 -0
  72. package/dist/ui.d.mts +1565 -0
  73. package/dist/ui.d.ts +1565 -0
  74. package/dist/ui.js +111 -0
  75. package/dist/ui.mjs +111 -0
  76. package/dist/useFindReplace-Bc2ubEeV.d.mts +219 -0
  77. package/dist/useFindReplace-Bc2ubEeV.d.ts +219 -0
  78. package/package.json +138 -0
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkJGPOALUP_js=require('./chunk-JGPOALUP.js'),chunkGNIO6SOS_js=require('./chunk-GNIO6SOS.js'),react=require('react'),utils=require('@eigenpal/docx-editor-core/utils'),jsxRuntime=require('react/jsx-runtime');var v=[{id:"formatted",labelKey:"dialogs.pasteSpecial.keepFormatting",descriptionKey:"dialogs.pasteSpecial.keepFormattingDescription",shortcutKey:"dialogs.pasteSpecial.keepFormattingShortcut"},{id:"plainText",labelKey:"dialogs.pasteSpecial.plainText",descriptionKey:"dialogs.pasteSpecial.plainTextDescription",shortcutKey:"dialogs.pasteSpecial.plainTextShortcut"}],N=()=>jsxRuntime.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{d:"M4 4h12v2H4V4zM4 8h8v2H4V8zM4 12h10v2H4v-2zM4 16h6v2H4v-2z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M14 10l3 3-3 3v-2h-2v-2h2v-2z",fill:"currentColor",opacity:"0.6"})]}),_=()=>jsxRuntime.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{d:"M4 4h12v1H4V4zM4 7h12v1H4V7zM4 10h12v1H4v-1zM4 13h12v1H4v-1zM4 16h8v1H4v-1z",fill:"currentColor"})});function Y(e){switch(e){case "formatted":return jsxRuntime.jsx(N,{});case "plainText":return jsxRuntime.jsx(_,{});default:return null}}var j=({option:e,isSelected:t,onClick:l,onMouseEnter:y})=>jsxRuntime.jsxs("button",{type:"button",className:`docx-paste-special-option ${t?"docx-paste-special-option-selected":""}`,onClick:l,onMouseEnter:y,role:"menuitem","aria-selected":t,style:{display:"flex",alignItems:"center",gap:"12px",width:"100%",padding:"12px 16px",border:"none",background:t?"var(--doc-primary-light)":"transparent",cursor:"pointer",textAlign:"left",borderRadius:"4px",transition:"background-color 0.15s ease"},children:[jsxRuntime.jsx("span",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderRadius:"4px",background:t?"var(--doc-primary)":"var(--doc-bg-hover)",color:t?"white":"var(--doc-text-muted)"},children:Y(e.id)}),jsxRuntime.jsxs("div",{style:{flex:1},children:[jsxRuntime.jsx("div",{style:{fontSize:"14px",fontWeight:500,color:"var(--doc-text)",marginBottom:"2px"},children:e.label}),jsxRuntime.jsx("div",{style:{fontSize:"12px",color:"var(--doc-text-muted)"},children:e.description})]}),jsxRuntime.jsx("span",{style:{fontSize:"11px",color:"var(--doc-text-subtle)",fontFamily:"monospace"},children:e.shortcut})]}),oe=({isOpen:e,onClose:t,onPaste:l,position:y,className:b=""})=>{let{t:o}=chunkGNIO6SOS_js.b(),m=react.useRef(null),[g,c]=react.useState(0),[i,S]=react.useState(null),[K,C]=react.useState(false),[s,r]=react.useState(null),a=v.map(d=>({id:d.id,label:o(d.labelKey),description:o(d.descriptionKey),shortcut:o(d.shortcutKey)}));react.useEffect(()=>{if(!e){S(null),r(null),c(0);return}(async()=>{C(true),r(null);try{let p=await utils.readFromClipboard({cleanWordFormatting:!0});S(p),p||r(o("dialogs.pasteSpecial.noContent"));}catch{r(o("dialogs.pasteSpecial.clipboardError"));}finally{C(false);}})();},[e]),react.useEffect(()=>{if(!e)return;let d=p=>{m.current&&!m.current.contains(p.target)&&t();};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[e,t]),react.useEffect(()=>{if(!e)return;let d=p=>{switch(p.key){case "Escape":p.preventDefault(),t();break;case "ArrowDown":p.preventDefault(),c(f=>(f+1)%v.length);break;case "ArrowUp":p.preventDefault(),c(f=>(f-1+v.length)%v.length);break;case "Enter":p.preventDefault(),h(v[g].id);break}};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[e,g,t]);let h=react.useCallback(d=>{if(!i){r(o("dialogs.pasteSpecial.noContent"));return}l(i,d==="plainText"),t();},[i,l,t]),F=react.useCallback(()=>{let f=y?.x??(typeof window<"u"?window.innerWidth/2-160:100),w=y?.y??(typeof window<"u"?window.innerHeight/2-200/2:100);return typeof window<"u"&&(f+320>window.innerWidth&&(f=window.innerWidth-320-10),w+200>window.innerHeight&&(w=window.innerHeight-200-10),f<10&&(f=10),w<10&&(w=10)),{position:"fixed",top:w,left:f,width:320,background:"white",border:"1px solid var(--doc-border-light)",borderRadius:"8px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",zIndex:10001,overflow:"hidden"}},[y]);return e?jsxRuntime.jsxs("div",{ref:m,className:`docx-paste-special-dialog ${b}`,style:F(),role:"dialog","aria-label":o("dialogs.pasteSpecial.title"),children:[jsxRuntime.jsxs("div",{style:{padding:"12px 16px",borderBottom:"1px solid var(--doc-border)",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[jsxRuntime.jsx("span",{style:{fontSize:"14px",fontWeight:600,color:"var(--doc-text)"},children:o("dialogs.pasteSpecial.title")}),jsxRuntime.jsx("button",{type:"button",onClick:t,"aria-label":o("common.closeDialog"),style:{display:"flex",alignItems:"center",justifyContent:"center",width:"24px",height:"24px",border:"none",background:"transparent",cursor:"pointer",borderRadius:"4px",color:"var(--doc-text-muted)"},children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{d:"M4 4l8 8M12 4l-8 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),jsxRuntime.jsx("div",{style:{padding:"8px"},children:K?jsxRuntime.jsx("div",{style:{padding:"20px",textAlign:"center",color:"var(--doc-text-muted)",fontSize:"13px"},children:o("dialogs.pasteSpecial.readingClipboard")}):s?jsxRuntime.jsx("div",{style:{padding:"20px",textAlign:"center",color:"var(--doc-error)",fontSize:"13px"},children:s}):jsxRuntime.jsx("div",{role:"menu",children:a.map((d,p)=>jsxRuntime.jsx(j,{option:d,isSelected:p===g,onClick:()=>h(d.id),onMouseEnter:()=>c(p)},d.id))})}),i&&!K&&!s&&jsxRuntime.jsxs("div",{style:{padding:"8px 16px 12px",borderTop:"1px solid var(--doc-border)"},children:[jsxRuntime.jsx("div",{style:{fontSize:"11px",color:"var(--doc-text-muted)",marginBottom:"4px"},children:o("dialogs.pasteSpecial.preview")}),jsxRuntime.jsxs("div",{style:{fontSize:"12px",color:"var(--doc-text)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",padding:"6px 8px",background:"var(--doc-bg)",borderRadius:"4px"},children:['"',i.plainText.slice(0,50),i.plainText.length>50?"...":"",'"']})]})]}):null};function re(e={}){let{onPaste:t,enabled:l=true}=e,[y,b]=react.useState(false),o=react.useCallback(()=>{l&&b(true);},[l]),m=react.useCallback(()=>{b(false);},[]),g=react.useCallback(async()=>{if(!(!l||!t))try{let i=await utils.readFromClipboard({cleanWordFormatting:!0});i&&t(i,!0);}catch(i){console.error("Failed to paste as plain text:",i);}},[l,t]),c=react.useCallback(i=>l&&(i.ctrlKey||i.metaKey)&&i.shiftKey&&i.key.toLowerCase()==="v"?(i.preventDefault(),o(),true):false,[l,o]);return {isOpen:y,openDialog:o,closeDialog:m,handleKeyDown:c,pasteAsPlainText:g}}function ie(e){return v.find(t=>t.id===e)}function se(){return [...v]}function ae(){return "formatted"}function ne(e){return (e.ctrlKey||e.metaKey)&&e.shiftKey&&e.key.toLowerCase()==="v"}var I={editing:"dialogs.keyboardShortcuts.categories.editing",formatting:"dialogs.keyboardShortcuts.categories.formatting",navigation:"dialogs.keyboardShortcuts.categories.navigation",clipboard:"dialogs.keyboardShortcuts.categories.clipboard",selection:"dialogs.keyboardShortcuts.categories.selection",view:"dialogs.keyboardShortcuts.categories.view",file:"dialogs.keyboardShortcuts.categories.file",other:"dialogs.keyboardShortcuts.categories.other"},M=["file","editing","clipboard","formatting","selection","navigation","view","other"],P=[{id:"save",name:"Save",nameKey:"dialogs.keyboardShortcuts.shortcuts.save",description:"Save document",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.saveDescription",keys:"Ctrl+S",category:"file",common:true},{id:"print",name:"Print",nameKey:"dialogs.keyboardShortcuts.shortcuts.print",description:"Print document",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.printDescription",keys:"Ctrl+P",category:"file"},{id:"undo",name:"Undo",nameKey:"dialogs.keyboardShortcuts.shortcuts.undo",description:"Undo last action",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.undoDescription",keys:"Ctrl+Z",category:"editing",common:true},{id:"redo",name:"Redo",nameKey:"dialogs.keyboardShortcuts.shortcuts.redo",description:"Redo last action",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.redoDescription",keys:"Ctrl+Y",altKeys:"Ctrl+Shift+Z",category:"editing",common:true},{id:"delete",name:"Delete",nameKey:"dialogs.keyboardShortcuts.shortcuts.delete",description:"Delete selected text",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.deleteDescription",keys:"Del",altKeys:"Backspace",category:"editing"},{id:"find",name:"Find",nameKey:"dialogs.keyboardShortcuts.shortcuts.find",description:"Find text in document",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.findDescription",keys:"Ctrl+F",category:"editing",common:true},{id:"replace",name:"Find & Replace",nameKey:"dialogs.keyboardShortcuts.shortcuts.findReplace",description:"Find and replace text",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.findReplaceDescription",keys:"Ctrl+H",category:"editing"},{id:"cut",name:"Cut",nameKey:"dialogs.keyboardShortcuts.shortcuts.cut",description:"Cut selected text",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.cutDescription",keys:"Ctrl+X",category:"clipboard",common:true},{id:"copy",name:"Copy",nameKey:"dialogs.keyboardShortcuts.shortcuts.copy",description:"Copy selected text",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.copyDescription",keys:"Ctrl+C",category:"clipboard",common:true},{id:"paste",name:"Paste",nameKey:"dialogs.keyboardShortcuts.shortcuts.paste",description:"Paste from clipboard",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.pasteDescription",keys:"Ctrl+V",category:"clipboard",common:true},{id:"paste-plain",name:"Paste as Plain Text",nameKey:"dialogs.keyboardShortcuts.shortcuts.pastePlainText",description:"Paste without formatting",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.pastePlainTextDescription",keys:"Ctrl+Shift+V",category:"clipboard"},{id:"bold",name:"Bold",nameKey:"dialogs.keyboardShortcuts.shortcuts.bold",description:"Toggle bold formatting",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.boldDescription",keys:"Ctrl+B",category:"formatting",common:true},{id:"italic",name:"Italic",nameKey:"dialogs.keyboardShortcuts.shortcuts.italic",description:"Toggle italic formatting",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.italicDescription",keys:"Ctrl+I",category:"formatting",common:true},{id:"underline",name:"Underline",nameKey:"dialogs.keyboardShortcuts.shortcuts.underline",description:"Toggle underline formatting",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.underlineDescription",keys:"Ctrl+U",category:"formatting",common:true},{id:"strikethrough",name:"Strikethrough",nameKey:"dialogs.keyboardShortcuts.shortcuts.strikethrough",description:"Toggle strikethrough",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.strikethroughDescription",keys:"Ctrl+Shift+X",category:"formatting"},{id:"subscript",name:"Subscript",nameKey:"dialogs.keyboardShortcuts.shortcuts.subscript",description:"Toggle subscript",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.subscriptDescription",keys:"Ctrl+=",category:"formatting"},{id:"superscript",name:"Superscript",nameKey:"dialogs.keyboardShortcuts.shortcuts.superscript",description:"Toggle superscript",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.superscriptDescription",keys:"Ctrl+Shift+=",category:"formatting"},{id:"align-left",name:"Align Left",nameKey:"dialogs.keyboardShortcuts.shortcuts.alignLeft",description:"Left align paragraph",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.alignLeftDescription",keys:"Ctrl+L",category:"formatting"},{id:"align-center",name:"Align Center",nameKey:"dialogs.keyboardShortcuts.shortcuts.alignCenter",description:"Center align paragraph",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.alignCenterDescription",keys:"Ctrl+E",category:"formatting"},{id:"align-right",name:"Align Right",nameKey:"dialogs.keyboardShortcuts.shortcuts.alignRight",description:"Right align paragraph",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.alignRightDescription",keys:"Ctrl+R",category:"formatting"},{id:"align-justify",name:"Justify",nameKey:"dialogs.keyboardShortcuts.shortcuts.justify",description:"Justify paragraph",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.justifyDescription",keys:"Ctrl+J",category:"formatting"},{id:"indent",name:"Increase Indent",nameKey:"dialogs.keyboardShortcuts.shortcuts.increaseIndent",description:"Increase paragraph indent",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.increaseIndentDescription",keys:"Tab",category:"formatting"},{id:"outdent",name:"Decrease Indent",nameKey:"dialogs.keyboardShortcuts.shortcuts.decreaseIndent",description:"Decrease paragraph indent",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.decreaseIndentDescription",keys:"Shift+Tab",category:"formatting"},{id:"select-all",name:"Select All",nameKey:"dialogs.keyboardShortcuts.shortcuts.selectAll",description:"Select all content",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.selectAllDescription",keys:"Ctrl+A",category:"selection",common:true},{id:"select-word",name:"Select Word",nameKey:"dialogs.keyboardShortcuts.shortcuts.selectWord",description:"Select current word",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.selectWordDescription",keys:"Double-click",category:"selection"},{id:"select-paragraph",name:"Select Paragraph",nameKey:"dialogs.keyboardShortcuts.shortcuts.selectParagraph",description:"Select current paragraph",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.selectParagraphDescription",keys:"Triple-click",category:"selection"},{id:"extend-selection-word",name:"Extend Selection by Word",nameKey:"dialogs.keyboardShortcuts.shortcuts.extendSelectionByWord",description:"Extend selection to next/previous word",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.extendSelectionByWordDescription",keys:"Ctrl+Shift+Arrow",category:"selection"},{id:"extend-selection-line",name:"Extend Selection to Line Edge",nameKey:"dialogs.keyboardShortcuts.shortcuts.extendSelectionToLineEdge",description:"Extend selection to line start/end",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.extendSelectionToLineEdgeDescription",keys:"Shift+Home/End",category:"selection"},{id:"move-word",name:"Move by Word",nameKey:"dialogs.keyboardShortcuts.shortcuts.moveByWord",description:"Move cursor to next/previous word",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.moveByWordDescription",keys:"Ctrl+Arrow",category:"navigation"},{id:"move-line-start",name:"Move to Line Start",nameKey:"dialogs.keyboardShortcuts.shortcuts.moveToLineStart",description:"Move cursor to start of line",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.moveToLineStartDescription",keys:"Home",category:"navigation"},{id:"move-line-end",name:"Move to Line End",nameKey:"dialogs.keyboardShortcuts.shortcuts.moveToLineEnd",description:"Move cursor to end of line",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.moveToLineEndDescription",keys:"End",category:"navigation"},{id:"move-doc-start",name:"Move to Document Start",nameKey:"dialogs.keyboardShortcuts.shortcuts.moveToDocumentStart",description:"Move cursor to start of document",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.moveToDocumentStartDescription",keys:"Ctrl+Home",category:"navigation"},{id:"move-doc-end",name:"Move to Document End",nameKey:"dialogs.keyboardShortcuts.shortcuts.moveToDocumentEnd",description:"Move cursor to end of document",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.moveToDocumentEndDescription",keys:"Ctrl+End",category:"navigation"},{id:"page-up",name:"Page Up",nameKey:"dialogs.keyboardShortcuts.shortcuts.pageUp",description:"Scroll up one page",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.pageUpDescription",keys:"Page Up",category:"navigation"},{id:"page-down",name:"Page Down",nameKey:"dialogs.keyboardShortcuts.shortcuts.pageDown",description:"Scroll down one page",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.pageDownDescription",keys:"Page Down",category:"navigation"},{id:"zoom-in",name:"Zoom In",nameKey:"dialogs.keyboardShortcuts.shortcuts.zoomIn",description:"Increase zoom level",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.zoomInDescription",keys:"Ctrl++",altKeys:"Ctrl+Scroll Up",category:"view"},{id:"zoom-out",name:"Zoom Out",nameKey:"dialogs.keyboardShortcuts.shortcuts.zoomOut",description:"Decrease zoom level",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.zoomOutDescription",keys:"Ctrl+-",altKeys:"Ctrl+Scroll Down",category:"view"},{id:"zoom-reset",name:"Reset Zoom",nameKey:"dialogs.keyboardShortcuts.shortcuts.resetZoom",description:"Reset zoom to 100%",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.resetZoomDescription",keys:"Ctrl+0",category:"view"},{id:"shortcuts",name:"Keyboard Shortcuts",nameKey:"dialogs.keyboardShortcuts.shortcuts.keyboardShortcuts",description:"Show this help dialog",descriptionKey:"dialogs.keyboardShortcuts.shortcuts.keyboardShortcutsDescription",keys:"Ctrl+/",altKeys:"F1",category:"view"}];function Z(){return [...P]}function V(e){return P.filter(t=>t.category===e)}function G(){return P.filter(e=>e.common)}function J(e){return I[e]}function $(){return [...M]}var be=({isOpen:e,onClose:t,customShortcuts:l=[],showSearch:y=true,className:b=""})=>{let{t:o}=chunkGNIO6SOS_js.b(),m=react.useRef(null),g=react.useRef(null),[c,i]=react.useState(""),S=react.useMemo(()=>{let s=[...P];for(let r of l){let a=s.findIndex(h=>h.id===r.id);a>=0?s[a]=r:s.push(r);}return s},[l]),K=react.useMemo(()=>{if(!c.trim())return S;let s=c.toLowerCase();return S.filter(r=>{let a=r.nameKey?o(r.nameKey):r.name,h=r.descriptionKey?o(r.descriptionKey):r.description;return a.toLowerCase().includes(s)||h.toLowerCase().includes(s)||r.keys.toLowerCase().includes(s)||r.altKeys&&r.altKeys.toLowerCase().includes(s)})},[S,c,o]),C=react.useMemo(()=>{let s=new Map;for(let a of K){let h=s.get(a.category)||[];h.push(a),s.set(a.category,h);}let r=[];for(let a of M){let h=s.get(a);h&&h.length>0&&r.push({category:a,shortcuts:h});}return r},[K]);return react.useEffect(()=>{e&&y&&g.current&&setTimeout(()=>g.current?.focus(),0);},[e,y]),react.useEffect(()=>{e||i("");},[e]),react.useEffect(()=>{if(!e)return;let s=r=>{m.current&&!m.current.contains(r.target)&&t();};return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[e,t]),react.useEffect(()=>{if(!e)return;let s=r=>{r.key==="Escape"&&t();};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e,t]),e?jsxRuntime.jsx("div",{className:"docx-shortcuts-overlay",style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10001},children:jsxRuntime.jsxs("div",{ref:m,className:`docx-shortcuts-dialog ${b}`,style:{width:"600px",maxWidth:"90vw",maxHeight:"80vh",backgroundColor:"white",borderRadius:"12px",boxShadow:"0 4px 24px rgba(0, 0, 0, 0.2)",display:"flex",flexDirection:"column",overflow:"hidden"},role:"dialog","aria-label":o("dialogs.keyboardShortcuts.ariaLabel"),children:[jsxRuntime.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:"1px solid var(--doc-border)"},children:[jsxRuntime.jsx("h2",{style:{margin:0,fontSize:"18px",fontWeight:600,color:"var(--doc-text)"},children:o("dialogs.keyboardShortcuts.ariaLabel")}),jsxRuntime.jsx("button",{type:"button",onClick:t,"aria-label":o("common.closeDialog"),style:{display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",border:"none",background:"transparent",cursor:"pointer",borderRadius:"50%",color:"var(--doc-text-muted)"},children:jsxRuntime.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:jsxRuntime.jsx("path",{d:"M5 5l10 10M15 5L5 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),y&&jsxRuntime.jsx("div",{style:{padding:"12px 20px",borderBottom:"1px solid var(--doc-border)"},children:jsxRuntime.jsx("input",{ref:g,type:"text",value:c,onChange:s=>i(s.target.value),placeholder:o("dialogs.keyboardShortcuts.searchPlaceholder"),style:{width:"100%",padding:"10px 12px",fontSize:"14px",border:"1px solid var(--doc-border-light)",borderRadius:"6px",outline:"none"}})}),jsxRuntime.jsx("div",{style:{flex:1,overflowY:"auto",padding:"16px 20px"},children:C.length===0?jsxRuntime.jsx("div",{style:{textAlign:"center",padding:"32px",color:"var(--doc-text-muted)"},children:o("dialogs.keyboardShortcuts.noResults",{query:c})}):C.map(({category:s,shortcuts:r})=>jsxRuntime.jsxs("div",{style:{marginBottom:"24px"},children:[jsxRuntime.jsx("h3",{style:{margin:"0 0 12px 0",fontSize:"13px",fontWeight:600,color:"var(--doc-primary)",textTransform:"uppercase",letterSpacing:"0.5px"},children:o(I[s])}),jsxRuntime.jsx("div",{children:r.map(a=>jsxRuntime.jsx(chunkJGPOALUP_js.b,{shortcut:a,translatedName:a.nameKey?o(a.nameKey):a.name,translatedDescription:a.descriptionKey?o(a.descriptionKey):a.description},a.id))})]},s))}),jsxRuntime.jsx("div",{style:{padding:"12px 20px",borderTop:"1px solid var(--doc-border)",backgroundColor:"var(--doc-bg)",fontSize:"12px",color:"var(--doc-text-muted)",textAlign:"center"},children:(()=>{let r=o("dialogs.keyboardShortcuts.pressEscToClose",{key:"Esc"}).split("Esc");return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[r[0],jsxRuntime.jsx("kbd",{style:{padding:"2px 6px",backgroundColor:"white",borderRadius:"4px",border:"1px solid var(--doc-border-light)"},children:"Esc"}),r[1]]})})()})]})}):null};function fe(e={}){let{enabled:t=true,openShortcut:l="Ctrl+/"}=e,[y,b]=react.useState(false),o=react.useCallback(()=>{t&&b(true);},[t]),m=react.useCallback(()=>{b(false);},[]),g=react.useCallback(()=>{b(i=>!i);},[]),c=react.useCallback(i=>{if(!t)return;if((i.ctrlKey||i.metaKey)&&(i.key==="/"||i.key==="?")){i.preventDefault(),g();return}if(i.key==="F1"){i.preventDefault(),o();return}},[t,g,o]);return react.useEffect(()=>{if(t)return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[t,c]),{isOpen:y,open:o,close:m,toggle:g,handleKeyDown:c}}
2
+ exports.a=oe;exports.b=re;exports.c=ie;exports.d=se;exports.e=ae;exports.f=ne;exports.g=Z;exports.h=V;exports.i=G;exports.j=J;exports.k=$;exports.l=be;exports.m=fe;
@@ -0,0 +1,2 @@
1
+ import {b,c,a}from'./chunk-TN5C2ZYV.mjs';import {b as b$1}from'./chunk-ZFZJRL2R.mjs';import*as j from'react';import j__default,{createContext,useState,useRef,useCallback,useMemo,useEffect,Children,isValidElement,useContext}from'react';import {clsx}from'clsx';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {halfPointsToPoints}from'@eigenpal/docx-editor-core/utils/units';export{pointsToHalfPoints as d}from'@eigenpal/docx-editor-core/utils/units';import {createDefaultListState}from'@eigenpal/docx-editor-core/utils/listState';export{createDefaultListState as f}from'@eigenpal/docx-editor-core/utils/listState';import {en as en$1}from'@eigenpal/docx-editor-i18n';import*as N from'@radix-ui/react-select';import {generateThemeTintShadeMatrix,resolveColorToHex,twipsToPixels,pixelsToTwips,formatPx,resolveHighlightColor,resolveColor}from'@eigenpal/docx-editor-core/utils';import {normalizeFontFamilies}from'@eigenpal/docx-editor-core/utils/fontOptions';export{mapHexToHighlightName as g}from'@eigenpal/docx-editor-core/utils/highlightColors';import {openReportIssue}from'@eigenpal/docx-editor-core/utils/reportIssue';var Ut=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Zt=clsx,qt=(e,t)=>o=>{var r;if(t?.variants==null)return Zt(e,o?.class,o?.className);let{variants:n,defaultVariants:s}=t,i=Object.keys(n).map(a=>{let p=o?.[a],m=s?.[a];if(p===null)return null;let l=Ut(p)||Ut(m);return n[a][l]}),c=o&&Object.entries(o).reduce((a,p)=>{let[m,l]=p;return l===void 0||(a[m]=l),a},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((a,p)=>{let{class:m,className:l,...g}=p;return Object.entries(g).every(u=>{let[f,x]=u;return Array.isArray(x)?x.includes({...s,...c}[f]):{...s,...c}[f]===x})?[...a,m,l]:a},[]);return Zt(e,i,d,o?.class,o?.className)};function M(...e){return clsx(e)}var sr=qt("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-9 w-9","icon-sm":"h-7 w-7"}},defaultVariants:{variant:"default",size:"default"}}),V=j.forwardRef(({className:e,variant:t,size:o,...r},n)=>jsx("button",{className:M(sr({variant:t,size:o,className:e})),ref:n,...r}));V.displayName="Button";var ur=[8,9,10,11,12,14,16,18,20,24,28,36,48,72],pr=1,mr=400;function Xt(e,t,o){for(let r of t)if(r>e)return r;return Math.min(e+1,o)}function jt(e,t,o){for(let r=t.length-1;r>=0;r--)if(t[r]<e)return t[r];return Math.max(e-1,o)}function Jt({value:e,onChange:t,sizes:o=ur,disabled:r=false,className:n,placeholder:s="11",minSize:i=pr,maxSize:c$1=mr}){let{t:d}=b$1(),[a,p]=useState(false),[m,l]=useState(""),[g,u]=useState(false),f=useRef(null),x=useCallback(()=>{u(false),p(false);},[]),{containerRef:h,dropdownRef:b$2,dropdownStyle:y}=c({isOpen:g,onClose:x}),C=e??(parseInt(s,10)||11),I=e!==void 0?e.toString():s,L=useCallback(k=>{if(k.preventDefault(),r)return;let _=jt(C,o,i);t?.(_);},[C,o,i,r,t]),ce=useCallback(k=>{if(k.preventDefault(),r)return;let _=Xt(C,o,c$1);t?.(_);},[C,o,c$1,r,t]),F=useCallback(k=>{k.preventDefault(),!r&&(p(true),l(I),u(true),requestAnimationFrame(()=>{f.current?.focus(),f.current?.select();}));},[r,I]),Y=useCallback(k=>{l(k.target.value);},[]),de=useCallback(()=>{p(false);let k=parseFloat(m);if(!isNaN(k)&&k>=i&&k<=c$1){let _=Math.round(k*2)/2;t?.(_);}},[m,i,c$1,t]),ge=useCallback(k=>{if(k.key==="Enter")k.preventDefault(),de(),u(false);else if(k.key==="Escape")p(false),u(false);else if(k.key==="ArrowUp"){k.preventDefault();let _=Xt(C,o,c$1);l(_.toString()),t?.(_);}else if(k.key==="ArrowDown"){k.preventDefault();let _=jt(C,o,i);l(_.toString()),t?.(_);}},[de,C,o,c$1,i,t]),G=useCallback(k=>{t?.(k),u(false),p(false);},[t]),R=useCallback(k=>{k.target.tagName!=="INPUT"&&k.preventDefault();},[]);return jsxs("div",{ref:h,className:M("flex items-center",n),onMouseDown:R,children:[jsx(V,{variant:"ghost",size:"icon-sm",className:M("h-7 w-7 text-slate-500 hover:text-slate-900 hover:bg-slate-100/80 rounded-r-none",r&&"opacity-30 cursor-not-allowed"),onMouseDown:L,disabled:r||C<=i,"aria-label":d("fontSize.decrease"),"data-testid":"font-size-decrease",children:jsx(b,{name:"remove",size:18})}),jsx("div",{className:"relative",children:a?jsx("input",{ref:f,type:"text",value:m,onChange:Y,onBlur:de,onKeyDown:ge,className:M("h-7 w-10 text-center text-sm border border-slate-300 bg-white","focus:outline-none focus:ring-1 focus:ring-slate-400","rounded-none"),"aria-label":d("fontSize.label"),"data-testid":"font-size-input"}):jsx("button",{type:"button",onClick:F,className:M("h-7 w-10 text-center text-sm border border-slate-200 bg-white","hover:border-slate-300 hover:bg-slate-50","focus:outline-none focus:ring-1 focus:ring-slate-400","rounded-none",r&&"opacity-50 cursor-not-allowed"),disabled:r,"aria-label":d("fontSize.label"),"aria-haspopup":"listbox","aria-expanded":g,"data-testid":"font-size-display",children:I})}),g&&jsx("div",{ref:b$2,style:{...y,backgroundColor:"white",border:"1px solid #e2e8f0",borderRadius:6,boxShadow:"0 4px 12px rgba(0, 0, 0, 0.12)",maxHeight:240,overflowY:"auto",minWidth:60},role:"listbox","aria-label":d("fontSize.listLabel"),children:o.map(k=>jsx("button",{type:"button",onClick:()=>G(k),className:M("w-full px-3 py-1.5 text-sm text-left","hover:bg-slate-100",k===C&&"bg-slate-100 font-medium"),role:"option","aria-selected":k===C,children:k},k))}),jsx(V,{variant:"ghost",size:"icon-sm",className:M("h-7 w-7 text-slate-500 hover:text-slate-900 hover:bg-slate-100/80 rounded-l-none",r&&"opacity-30 cursor-not-allowed"),onMouseDown:ce,disabled:r||C>=c$1,"aria-label":d("fontSize.increase"),"data-testid":"font-size-increase",children:jsx(b,{name:"add",size:18})})]})}var hr={display:"inline-flex",alignItems:"center",gap:"4px"},eo={display:"inline-flex",alignItems:"center",gap:"4px"},at={display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",padding:"4px",border:"none",borderRadius:"4px",backgroundColor:"transparent",cursor:"pointer",transition:"background-color 0.1s",color:"var(--doc-text-muted)"},xr={...at,backgroundColor:"var(--doc-bg-hover)"},yr={...at,backgroundColor:"var(--doc-primary-light)",color:"var(--doc-primary)"},vr={...at,cursor:"default",opacity:.38},Cr={width:"28px",height:"28px",padding:"2px"},Sr={width:"1px",height:"20px",backgroundColor:"var(--doc-border)",margin:"0 6px"},ot=20;function rt({active:e=false,disabled:t=false,title:o,onClick:r,children:n,className:s,style:i}){let[c,d]=useState(false),a={...t?vr:e?yr:c?xr:at,...i},p=m=>{m.preventDefault();};return jsx("button",{type:"button",className:`docx-list-button ${e?"docx-list-button-active":""} ${t?"docx-list-button-disabled":""} ${s||""}`,style:a,onMouseDown:p,onClick:t?void 0:r,onMouseEnter:()=>d(true),onMouseLeave:()=>d(false),disabled:t,title:o,"aria-label":o,"aria-pressed":e,role:"button",children:n})}function to({listState:e,onBulletList:t,onNumberedList:o,onIndent:r,onOutdent:n,disabled:s=false,className:i,style:c,showIndentButtons:d=true,compact:a=false,hasIndent:p=false}){let{t:m}=b$1(),l=useCallback(()=>a?{...Cr}:{},[a]),g=e?.type==="bullet",u=e?.type==="numbered",x=(e?.isInList||g||u)&&(e?.level??0)>0||p;return jsxs("div",{className:`docx-list-buttons ${i||""}`,style:{...hr,...c},role:"group","aria-label":m("lists.ariaLabel"),children:[jsxs("div",{style:eo,role:"group","aria-label":m("lists.typeAriaLabel"),children:[jsx(rt,{active:g,disabled:s,title:m("lists.bulletList"),onClick:t,style:l(),children:jsx(b,{name:"format_list_bulleted",size:ot})}),jsx(rt,{active:u,disabled:s,title:m("lists.numberedList"),onClick:o,style:l(),children:jsx(b,{name:"format_list_numbered",size:ot})})]}),d&&jsxs(Fragment,{children:[jsx("div",{style:Sr,role:"separator"}),jsxs("div",{style:eo,role:"group","aria-label":m("lists.indentationAriaLabel"),children:[jsx(rt,{active:false,disabled:s||!x,title:m("lists.decreaseIndent"),onClick:n,style:l(),children:jsx(b,{name:"format_indent_decrease",size:ot})}),jsx(rt,{active:false,disabled:s,title:m("lists.increaseIndent"),onClick:r,style:l(),children:jsx(b,{name:"format_indent_increase",size:ot})})]})]})]})}var ro={hfInlineEditor:10,ruler:30,dropdown:100,contextMenu:1e4};var ao=[{action:"cut",labelKey:"contextMenu.cut",shortcutKey:"contextMenu.cutShortcut"},{action:"copy",labelKey:"contextMenu.copy",shortcutKey:"contextMenu.copyShortcut"},{action:"paste",labelKey:"contextMenu.paste",shortcutKey:"contextMenu.pasteShortcut"},{action:"pasteAsPlainText",labelKey:"contextMenu.pastePlainText",shortcutKey:"contextMenu.pastePlainTextShortcut",dividerAfter:true},{action:"delete",labelKey:"contextMenu.delete",shortcutKey:"contextMenu.deleteShortcut",dividerAfter:true},{action:"selectAll",labelKey:"contextMenu.selectAll",shortcutKey:"contextMenu.selectAllShortcut"}],Pr=()=>jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("circle",{cx:"4",cy:"12",r:"2",stroke:"currentColor",strokeWidth:"1.5"}),jsx("circle",{cx:"12",cy:"12",r:"2",stroke:"currentColor",strokeWidth:"1.5"}),jsx("path",{d:"M5.5 10.5L10.5 3M10.5 10.5L5.5 3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),Mr=()=>jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("rect",{x:"5",y:"5",width:"8",height:"9",rx:"1",stroke:"currentColor",strokeWidth:"1.5"}),jsx("path",{d:"M11 5V3a1 1 0 00-1-1H4a1 1 0 00-1 1v8a1 1 0 001 1h2",stroke:"currentColor",strokeWidth:"1.5"})]}),Ir=()=>jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("rect",{x:"3",y:"3",width:"10",height:"11",rx:"1",stroke:"currentColor",strokeWidth:"1.5"}),jsx("path",{d:"M6 3V2a1 1 0 011-1h2a1 1 0 011 1v1",stroke:"currentColor",strokeWidth:"1.5"}),jsx("path",{d:"M6 8h4M6 11h4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),Lr=()=>jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{d:"M4 4l8 8M12 4l-8 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),Rr=()=>jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("rect",{x:"2",y:"2",width:"12",height:"12",rx:"1",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"2 2"}),jsx("rect",{x:"4",y:"4",width:"8",height:"8",fill:"currentColor",opacity:"0.3"})]}),Er=()=>jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("rect",{x:"2",y:"6",width:"12",height:"4",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"}),jsx("rect",{x:"2",y:"10",width:"12",height:"4",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"}),jsx("path",{d:"M8 1v3M6.5 2.5h3",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]}),Ar=()=>jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("rect",{x:"2",y:"2",width:"12",height:"4",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"}),jsx("rect",{x:"2",y:"6",width:"12",height:"4",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"}),jsx("path",{d:"M8 12v3M6.5 13.5h3",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]}),Nr=()=>jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("rect",{x:"2",y:"2",width:"12",height:"4",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"}),jsx("rect",{x:"2",y:"6",width:"12",height:"4",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2",opacity:"0.3"}),jsx("rect",{x:"2",y:"10",width:"12",height:"4",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"}),jsx("path",{d:"M5 8h6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),Dr=()=>jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("rect",{x:"6",y:"2",width:"4",height:"12",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"}),jsx("rect",{x:"10",y:"2",width:"4",height:"12",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"}),jsx("path",{d:"M3 8H0.5M1.75 6.5v3",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]}),Br=()=>jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("rect",{x:"2",y:"2",width:"4",height:"12",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"}),jsx("rect",{x:"6",y:"2",width:"4",height:"12",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"}),jsx("path",{d:"M13 8h2.5M14.25 6.5v3",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]}),_r=()=>jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("rect",{x:"2",y:"2",width:"4",height:"12",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"}),jsx("rect",{x:"6",y:"2",width:"4",height:"12",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2",opacity:"0.3"}),jsx("rect",{x:"10",y:"2",width:"4",height:"12",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"}),jsx("path",{d:"M8 5v6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),Fr=()=>jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("rect",{x:"2",y:"4",width:"4",height:"8",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"}),jsx("rect",{x:"10",y:"4",width:"4",height:"8",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"}),jsx("path",{d:"M7 8h2",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),jsx("path",{d:"M8 7l1 1-1 1",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]}),Or=()=>jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("rect",{x:"2",y:"4",width:"12",height:"8",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"}),jsx("path",{d:"M8 4v8",stroke:"currentColor",strokeWidth:"1.2",strokeDasharray:"2 1"}),jsx("path",{d:"M6.5 8h-1M9.5 8h1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),Kr=()=>jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{d:"M3 3h10a1 1 0 011 1v6a1 1 0 01-1 1H6l-3 2.5V11H3a1 1 0 01-1-1V4a1 1 0 011-1z",stroke:"currentColor",strokeWidth:"1.3"}),jsx("path",{d:"M5 6h6M5 8.5h4",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]});function zr(e){switch(e){case "cut":return jsx(Pr,{});case "copy":return jsx(Mr,{});case "paste":case "pasteAsPlainText":return jsx(Ir,{});case "delete":return jsx(Lr,{});case "selectAll":return jsx(Rr,{});case "addRowAbove":return jsx(Er,{});case "addRowBelow":return jsx(Ar,{});case "deleteRow":return jsx(Nr,{});case "addColumnLeft":return jsx(Dr,{});case "addColumnRight":return jsx(Br,{});case "deleteColumn":return jsx(_r,{});case "mergeCells":return jsx(Fr,{});case "splitCell":return jsx(Or,{});case "addComment":return jsx(Kr,{});default:return null}}var Hr=({item:e,onClick:t,isHighlighted:o,onMouseEnter:r})=>e.action==="separator"?jsx("div",{className:"docx-text-context-menu-separator",style:{height:"1px",backgroundColor:"var(--doc-border)",margin:"4px 12px"}}):jsxs(Fragment,{children:[jsxs("button",{type:"button",className:`docx-text-context-menu-item ${o?"docx-text-context-menu-item-highlighted":""} ${e.disabled?"docx-text-context-menu-item-disabled":""}`,onClick:t,onMouseEnter:r,disabled:e.disabled,role:"menuitem","aria-disabled":e.disabled,style:{display:"flex",alignItems:"center",gap:"10px",width:"100%",padding:"8px 12px",border:"none",background:o&&!e.disabled?"var(--doc-primary-light)":"transparent",cursor:e.disabled?"not-allowed":"pointer",fontSize:"13px",color:e.disabled?"var(--doc-text-subtle)":"var(--doc-text)",textAlign:"left",opacity:e.disabled?.6:1},children:[jsx("span",{style:{display:"flex",color:e.disabled?"var(--doc-border)":"var(--doc-text-muted)"},children:zr(e.action)}),jsx("span",{style:{flex:1},children:e.label}),e.shortcut&&jsx("span",{style:{fontSize:"11px",color:"var(--doc-text-subtle)",fontFamily:"monospace"},children:e.shortcut})]}),e.dividerAfter&&jsx("div",{className:"docx-text-context-menu-separator",style:{height:"1px",backgroundColor:"var(--doc-border)",margin:"4px 12px"}})]}),di=({isOpen:e,position:t,hasSelection:o,isEditable:r,hasClipboardContent:n=true,onAction:s,onClose:i,items:c,className:d=""})=>{let a=useRef(null),[p,m]=useState(0),{t:l}=b$1(),g=useMemo(()=>ao.map(b=>({action:b.action,label:l(b.labelKey),shortcut:b.shortcutKey?l(b.shortcutKey):void 0,dividerAfter:b.dividerAfter})),[l]),u=(c||g).map(b=>{let y=(()=>{if(b.disabled!==void 0)return b.disabled;switch(b.action){case "cut":case "copy":case "delete":return !o;case "paste":case "pasteAsPlainText":return !r||!n;default:return false}})();return {...b,disabled:y}}),f=u.filter(b=>b.action!=="separator");useEffect(()=>{if(!e)return;let b=C=>{a.current&&!a.current.contains(C.target)&&i();},y=setTimeout(()=>{document.addEventListener("mousedown",b);},0);return ()=>{clearTimeout(y),document.removeEventListener("mousedown",b);}},[e,i]),useEffect(()=>{if(!e)return;let b=y=>{switch(y.key){case "Escape":y.preventDefault(),i();break;case "ArrowDown":y.preventDefault(),m(I=>{let L=(I+1)%f.length;for(;f[L]?.disabled&&L!==I;)L=(L+1)%f.length;return L});break;case "ArrowUp":y.preventDefault(),m(I=>{let L=(I-1+f.length)%f.length;for(;f[L]?.disabled&&L!==I;)L=(L-1+f.length)%f.length;return L});break;case "Enter":y.preventDefault();let C=f[p];C&&!C.disabled&&(s(C.action),i());break}};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[e,p,f,s,i]),useEffect(()=>{e&&m(0);},[e]);let x=useCallback(()=>{let y=u.length*36+16,C=t.x,I=t.y;return typeof window<"u"&&(C+220>window.innerWidth&&(C=window.innerWidth-220-10),I+y>window.innerHeight&&(I=window.innerHeight-y-10),C<10&&(C=10),I<10&&(I=10)),{position:"fixed",top:I,left:C,minWidth:220,background:"white",border:"1px solid var(--doc-border-light)",borderRadius:"8px",boxShadow:"0 2px 10px rgba(0, 0, 0, 0.15)",zIndex:ro.contextMenu,padding:"4px 0",overflow:"hidden"}},[t,u.length]),h=b=>{b.disabled||(s(b.action),i());};return e?jsx("div",{ref:a,className:`docx-text-context-menu ${d}`,style:x(),role:"menu","aria-label":l("contextMenu.textMenuAriaLabel"),children:u.map((b,y)=>{let C=f.findIndex(I=>I===b);return jsx(Hr,{item:b,onClick:()=>h(b),isHighlighted:C===p,onMouseEnter:()=>{C>=0&&!b.disabled&&m(C);}},`${b.action}-${y}`)})}):null};function ui(e={}){let{enabled:t=true,isEditable:o=true,containerRef:r,onAction:n}=e,[s,i]=useState(false),[c,d]=useState({x:0,y:0}),[a,p]=useState(false),m=useCallback(()=>{let x=window.getSelection(),h=x&&!x.isCollapsed&&x.toString().length>0;return p(!!h),!!h},[]),l=useCallback(x=>{t&&(x.preventDefault(),x.stopPropagation(),m(),d({x:x.clientX,y:x.clientY}),i(true));},[t,m]),g=useCallback(()=>{i(false);},[]),u=useCallback(x=>{switch(g(),x){case "cut":document.execCommand("cut");break;case "copy":document.execCommand("copy");break;case "paste":document.execCommand("paste");break;case "pasteAsPlainText":navigator.clipboard.readText?.().then(h=>{document.execCommand("insertText",false,h);}).catch(()=>{document.execCommand("paste");});break;case "delete":document.execCommand("delete");break;case "selectAll":document.execCommand("selectAll");break}n?.(x);},[g,n]),f=useCallback(x=>{l(x);},[l]);return useEffect(()=>{if(!s)return;let x=h=>{h.key==="Escape"&&g();};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[s,g]),{isOpen:s,position:c,hasSelection:a,openMenu:l,closeMenu:g,handleAction:u,onContextMenu:f}}function pi(e){return {cut:"Cut",copy:"Copy",paste:"Paste",pasteAsPlainText:"Paste as Plain Text",selectAll:"Select All",delete:"Delete",separator:"",addRowAbove:"Insert row above",addRowBelow:"Insert row below",deleteRow:"Delete row",addColumnLeft:"Insert column left",addColumnRight:"Insert column right",deleteColumn:"Delete column",mergeCells:en$1.table.mergeCells,splitCell:en$1.table.splitCell,addComment:"Comment"}[e]}function mi(e){return {cut:"Ctrl+X",copy:"Ctrl+C",paste:"Ctrl+V",pasteAsPlainText:"Ctrl+Shift+V",selectAll:"Ctrl+A",delete:"Del",separator:"",addRowAbove:"",addRowBelow:"",deleteRow:"",addColumnLeft:"",addColumnRight:"",deleteColumn:"",mergeCells:"",splitCell:"",addComment:""}[e]}function fi(){return ao.map(e=>({action:e.action,label:e.labelKey,shortcut:e.shortcutKey,dividerAfter:e.dividerAfter}))}function bi(e,t,o){switch(e){case "cut":case "copy":case "delete":return t;case "paste":case "pasteAsPlainText":return o;case "addComment":return t;case "selectAll":return true;default:return true}}var we=N.Root,De=N.Group,st=N.Value;function Te({className:e,children:t,onMouseDown:o,...r}){return jsxs(N.Trigger,{className:M("flex h-8 items-center justify-between gap-1 rounded px-2 py-1","text-sm text-slate-700 bg-transparent","hover:bg-slate-100/80 focus:outline-none focus:bg-slate-100/80","disabled:cursor-not-allowed disabled:opacity-50","transition-colors duration-150","[&>span]:truncate",e),onMouseDown:n=>{n.preventDefault(),o?.(n);},...r,children:[t,jsx(N.Icon,{asChild:true,children:jsx(Vr,{className:"h-4 w-4 text-slate-400 shrink-0"})})]})}function ke({className:e,children:t,position:o="popper",onCloseAutoFocus:r,...n}){return jsx(N.Portal,{children:jsx("div",{className:"ep-root",children:jsx(N.Content,{className:M("relative z-50 max-h-72 min-w-[8rem] overflow-hidden","rounded-lg border border-slate-200 bg-white shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",e),position:o,onCloseAutoFocus:s=>{s.preventDefault(),r?.(s);},...n,children:jsx(N.Viewport,{className:M("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),onMouseDown:s=>s.preventDefault(),children:t})})})})}function We({className:e,...t}){return jsx(N.Label,{className:M("px-2 py-1.5 text-xs font-medium text-slate-500",e),...t})}function ae({className:e,children:t,onMouseDown:o,...r}){return jsxs(N.Item,{className:M("relative flex w-full cursor-pointer select-none items-center","rounded px-2 py-1.5 text-sm text-slate-700 outline-none","hover:bg-slate-100 focus:bg-slate-100","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),onMouseDown:n=>{n.preventDefault(),o?.(n);},...r,children:[jsx(N.ItemText,{children:t}),jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(N.ItemIndicator,{children:jsx($r,{className:"h-4 w-4"})})})]})}function Ve({className:e,...t}){return jsx(N.Separator,{className:M("-mx-1 my-1 h-px bg-slate-100",e),...t})}function Vr({className:e}){return jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:jsx("path",{fillRule:"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z",clipRule:"evenodd"})})}function $r({className:e}){return jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:jsx("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z",clipRule:"evenodd"})})}var Gr=[{name:"Arial",fontFamily:"Arial, Helvetica, sans-serif",category:"sans-serif"},{name:"Calibri",fontFamily:'"Calibri", Arial, sans-serif',category:"sans-serif"},{name:"Helvetica",fontFamily:"Helvetica, Arial, sans-serif",category:"sans-serif"},{name:"Verdana",fontFamily:"Verdana, Geneva, sans-serif",category:"sans-serif"},{name:"Open Sans",fontFamily:'"Open Sans", sans-serif',category:"sans-serif"},{name:"Roboto",fontFamily:"Roboto, sans-serif",category:"sans-serif"},{name:"Times New Roman",fontFamily:'"Times New Roman", Times, serif',category:"serif"},{name:"Georgia",fontFamily:"Georgia, serif",category:"serif"},{name:"Cambria",fontFamily:"Cambria, Georgia, serif",category:"serif"},{name:"Garamond",fontFamily:"Garamond, serif",category:"serif"},{name:"Courier New",fontFamily:'"Courier New", Courier, monospace',category:"monospace"},{name:"Consolas",fontFamily:"Consolas, monospace",category:"monospace"}];function lo({value:e,onChange:t,fonts:o=Gr,disabled:r=false,className:n,placeholder:s="Arial",width:i=120,showPreview:c=true}){let{t:d}=b$1(),a=j.useMemo(()=>e?o.find(g=>g.fontFamily===e||g.name.toLowerCase()===e.toLowerCase())?.name||e:s,[e,o,s]),p=j.useCallback(l=>{let g=o.find(u=>u.name===l);g&&t?.(g.fontFamily);},[t,o]),m=j.useMemo(()=>{let l={"sans-serif":[],serif:[],monospace:[],other:[]};return o.forEach(g=>{let u=g.category||"other";l[u].push(g);}),l},[o]);return jsxs(we,{value:a,onValueChange:p,disabled:r,children:[jsx(Te,{className:M("h-8 text-sm",n),style:{minWidth:typeof i=="number"?`${i}px`:i},"aria-label":d("font.selectAriaLabel"),children:jsx(st,{placeholder:s,children:a})}),jsxs(ke,{className:"max-h-[300px]",children:[m["sans-serif"].length>0&&jsxs(De,{children:[jsx(We,{children:d("font.sansSerif")}),m["sans-serif"].map(l=>jsx(ae,{value:l.name,style:c?{fontFamily:l.fontFamily}:void 0,children:l.name},l.name))]}),m.serif.length>0&&jsxs(Fragment,{children:[jsx(Ve,{}),jsxs(De,{children:[jsx(We,{children:d("font.serif")}),m.serif.map(l=>jsx(ae,{value:l.name,style:c?{fontFamily:l.fontFamily}:void 0,children:l.name},l.name))]})]}),m.monospace.length>0&&jsxs(Fragment,{children:[jsx(Ve,{}),jsxs(De,{children:[jsx(We,{children:d("font.monospace")}),m.monospace.map(l=>jsx(ae,{value:l.name,style:c?{fontFamily:l.fontFamily}:void 0,children:l.name},l.name))]})]}),m.other.length>0&&jsxs(Fragment,{children:[jsx(Ve,{}),jsx(De,{children:m.other.map(l=>jsx(ae,{value:l.name,style:c?{fontFamily:l.fontFamily}:void 0,children:l.name},l.name))})]})]})]})}var jr=[{name:"Dark Red",nameKey:"colorPicker.colors.darkRed",hex:"C00000"},{name:"Red",nameKey:"colorPicker.colors.red",hex:"FF0000"},{name:"Orange",nameKey:"colorPicker.colors.orange",hex:"FFC000"},{name:"Yellow",nameKey:"colorPicker.colors.yellow",hex:"FFFF00"},{name:"Light Green",nameKey:"colorPicker.colors.lightGreen",hex:"92D050"},{name:"Green",nameKey:"colorPicker.colors.green",hex:"00B050"},{name:"Light Blue",nameKey:"colorPicker.colors.lightBlue",hex:"00B0F0"},{name:"Blue",nameKey:"colorPicker.colors.blue",hex:"0070C0"},{name:"Dark Blue",nameKey:"colorPicker.colors.darkBlue",hex:"002060"},{name:"Purple",nameKey:"colorPicker.colors.purple",hex:"7030A0"}],ct=18,Jr=2,Qr={position:"relative",display:"inline-block"},en={display:"flex",alignItems:"center",justifyContent:"center",width:"40px",height:"32px",padding:"2px 6px",border:"none",borderRadius:"4px",backgroundColor:"transparent",cursor:"pointer",transition:"background-color 0.1s",color:"var(--doc-text-muted)"},tn={padding:"10px",backgroundColor:"#fff",border:"1px solid #d0d0d0",borderRadius:"6px",boxShadow:"0 4px 16px rgba(0, 0, 0, 0.15)",width:"auto"},Pt={fontSize:"11px",color:"#666",marginBottom:"4px",fontWeight:500},Mt={height:"1px",backgroundColor:"#e0e0e0",margin:"8px 0"},uo={display:"grid",gap:`${Jr}px`},dt={width:`${ct}px`,height:`${ct}px`,border:"1px solid #c0c0c0",borderRadius:"2px",cursor:"pointer",padding:0,transition:"transform 0.1s, border-color 0.1s"},po={...dt,transform:"scale(1.15)",borderColor:"#333",zIndex:1},mo={...dt,borderWidth:"2px",borderColor:"#0066cc",boxShadow:"0 0 0 1px #0066cc"},on={display:"flex",alignItems:"center",gap:"8px",width:"100%",padding:"5px 8px",border:"1px solid #d0d0d0",borderRadius:"4px",backgroundColor:"#fff",cursor:"pointer",fontSize:"12px",color:"#333"},rn={display:"flex",alignItems:"center",gap:"6px"},nn={width:"70px",height:"24px",padding:"2px 6px",border:"1px solid #ccc",borderRadius:"3px",fontSize:"12px"},an={height:"24px",padding:"0 10px",border:"1px solid #ccc",borderRadius:"3px",backgroundColor:"#f5f5f5",fontSize:"12px",cursor:"pointer"},so={width:"16px",height:"4px",borderRadius:"1px",marginTop:"-2px"},ln={display:"inline-flex",alignItems:"stretch",height:"32px",gap:"2px"},sn={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:0,width:"28px",padding:"2px 4px",border:"none",borderRadius:"4px",backgroundColor:"transparent",cursor:"pointer",transition:"background-color 0.1s",color:"var(--doc-text-muted)"},cn={display:"flex",alignItems:"center",justifyContent:"center",width:"18px",padding:0,border:"none",borderRadius:"4px",backgroundColor:"transparent",cursor:"pointer",transition:"background-color 0.1s",color:"var(--doc-text-muted)"};function It(e,t,o){if(!e)return t==="text"||t==="border"?"#000000":"transparent";if(typeof e=="string"){if(t==="highlight"){let r=resolveHighlightColor(e);return r||(e==="none"?"transparent":e.startsWith("#")?e:`#${e}`)}return e.startsWith("#")?e:`#${e}`}return resolveColor(e,o)}function co(e){let t=e.replace(/^#/,"");if(t.length!==6)return false;let o=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),n=parseInt(t.slice(4,6),16);return (o*299+r*587+n*114)/1e3>230}function fo(e,t,o){return e?(typeof e=="string"?e.replace(/^#/,"").toUpperCase():resolveColorToHex(e,o))===t.toUpperCase():false}function dn({matrix:e,selectedColor:t,theme:o,onSelect:r}){let[n,s]=useState(null);return jsx("div",{style:{...uo,gridTemplateColumns:`repeat(10, ${ct}px)`},children:e.flatMap((i,c)=>i.map((d,a)=>{let p=`${c}-${a}`,m=n===p,l=fo(t,d.hex,o);return jsx("button",{type:"button",style:{...l?mo:m?po:dt,backgroundColor:`#${d.hex}`},title:d.label,"aria-label":d.label,"aria-selected":l,onClick:()=>r(d),onMouseDown:g=>g.preventDefault(),onMouseEnter:()=>s(p),onMouseLeave:()=>s(null)},p)}))})}function un({selectedColor:e,theme:t,onSelect:o}){let[r,n]=useState(null),{t:s}=b$1();return jsx("div",{style:{...uo,gridTemplateColumns:`repeat(10, ${ct}px)`},children:jr.map((i,c)=>{let d=r===c,a=fo(e,i.hex,t),p=s(i.nameKey);return jsx("button",{type:"button",style:{...a?mo:d?po:dt,backgroundColor:`#${i.hex}`},title:p,"aria-label":p,"aria-selected":a,onClick:()=>o(i.hex),onMouseDown:m=>m.preventDefault(),onMouseEnter:()=>n(c),onMouseLeave:()=>n(null)},i.hex)})})}function _e({mode:e,value:t,onChange:o,theme:r,disabled:n=false,className:s,style:i,title:c$1,icon:d,autoLabel:a,splitButton:p=true,defaultColor:m}){let[l,g]=useState(false),[u,f]=useState(false),[x,h]=useState(false),[b$2,y]=useState(false),[C,I]=useState(""),[L,ce]=useState(()=>m??(e==="highlight"?"FFFF00":e==="border"?{rgb:"000000"}:{rgb:"FF0000"})),{t:F}=b$1();useEffect(()=>{let w=It(t,e,r).replace(/^#/,"");/^[0-9A-Fa-f]{6}$/.test(w)&&I(w.toUpperCase());},[t,e,r]);let Y=useCallback(()=>g(false),[]),{containerRef:de,dropdownRef:ge,dropdownStyle:G}=c({isOpen:l,onClose:Y}),R=r?.colorScheme??null,k=useMemo(()=>generateThemeTintShadeMatrix(R),[R]),_=useMemo(()=>It(t,e,r),[t,e,r]),ue=useMemo(()=>It(L,e,r),[L,e,r]),he=useCallback(()=>{n||g(w=>!w);},[n]),xe=useCallback(w=>{let W;if(e==="highlight")W=w.hex;else {let ve={themeColor:w.themeSlot,rgb:w.hex};w.tint&&(ve.themeTint=w.tint),w.shade&&(ve.themeShade=w.shade),W=ve;}ce(W),o?.(W),g(false);},[e,o]),ye=useCallback(w=>{let W=e==="highlight"?w:{rgb:w};ce(W),o?.(W),g(false);},[e,o]),te=useCallback(()=>{o?.(e==="highlight"?"none":{auto:true}),g(false);},[e,o]),Ee=useCallback(()=>{let w=C.replace(/^#/,"").toUpperCase();if(/^[0-9A-F]{6}$/i.test(w)){let W=e==="highlight"?w:{rgb:w};ce(W),o?.(W),g(false),I("");}},[e,C,o]),O=useCallback(()=>{n||o?.(L);},[n,L,o]),qe={...en,...n?{cursor:"default",opacity:.38}:l?{backgroundColor:"var(--doc-primary-light)",color:"var(--doc-primary)"}:u?{backgroundColor:"var(--doc-bg-hover)"}:{}},oe=F(e==="text"?"formattingBar.fontColor":e==="highlight"?"formattingBar.highlightColor":"table.borderColor"),ze=d??(e==="text"?"format_color_text":e==="highlight"?"ink_highlighter":"border_color");return jsxs("div",{ref:de,className:`docx-color-picker ${s||""}`,style:{...Qr,...i},children:[p?jsxs("div",{className:"docx-color-picker-split",style:{...ln,...n?{opacity:.38,cursor:"default"}:null},children:[jsxs("button",{type:"button",className:"docx-color-picker-apply",style:{...sn,...n?{cursor:"default"}:x?{backgroundColor:"var(--doc-bg-hover)"}:null},onClick:O,onMouseDown:w=>w.preventDefault(),onMouseEnter:()=>h(true),onMouseLeave:()=>h(false),disabled:n,title:c$1||oe,"aria-label":c$1||oe,children:[jsx(b,{name:ze,size:18}),jsx("div",{style:{...so,backgroundColor:ue==="transparent"?"#fff":ue,outline:ue==="transparent"||co(ue)?"1px solid #bbb":"none"}})]}),jsx("button",{type:"button",className:"docx-color-picker-arrow",style:{...cn,...n?{cursor:"default"}:l?{backgroundColor:"var(--doc-primary-light)",color:"var(--doc-primary)"}:b$2?{backgroundColor:"var(--doc-bg-hover)"}:null},onClick:he,onMouseDown:w=>w.preventDefault(),onMouseEnter:()=>y(true),onMouseLeave:()=>y(false),disabled:n,title:c$1||oe,"aria-label":c$1||oe,"aria-haspopup":"true","aria-expanded":l,children:jsx(b,{name:"arrow_drop_down",size:18})})]}):jsxs("button",{type:"button",className:"docx-color-picker-button",style:qe,onClick:he,onMouseDown:w=>w.preventDefault(),onMouseEnter:()=>f(true),onMouseLeave:()=>f(false),disabled:n,title:c$1||oe,"aria-label":c$1||oe,"aria-haspopup":"true","aria-expanded":l,children:[jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:0},children:[jsx(b,{name:ze,size:18}),jsx("div",{style:{...so,backgroundColor:_==="transparent"?"#fff":_,outline:_==="transparent"||co(_)?"1px solid #bbb":"none"}})]}),jsx(b,{name:"arrow_drop_down",size:14})]}),l&&jsx("div",{ref:ge,className:"docx-color-picker-dropdown",style:{...G,...tn},role:"dialog","aria-label":`${oe} picker`,onMouseDown:w=>{w.target.tagName!=="INPUT"&&w.preventDefault();},children:jsxs(Fragment,{children:[jsxs("button",{type:"button",style:on,onClick:te,onMouseDown:w=>w.preventDefault(),children:[e==="highlight"?jsx("span",{style:{display:"inline-block",width:"16px",height:"16px",border:"1px solid #ccc",borderRadius:"2px",position:"relative",backgroundColor:"#fff"},children:jsx("span",{style:{position:"absolute",top:"50%",left:"-1px",right:"-1px",height:"2px",backgroundColor:"#ff0000",transform:"rotate(-45deg)"}})}):jsx("span",{style:{display:"inline-block",width:"16px",height:"16px",backgroundColor:"#000",borderRadius:"2px"}}),a??F(e==="highlight"?"colorPicker.noColor":"colorPicker.automatic")]}),jsx("div",{style:Mt}),jsx("div",{style:Pt,children:F("colorPicker.themeColors")}),jsx(dn,{matrix:k,selectedColor:t,theme:r,onSelect:xe}),jsx("div",{style:Mt}),jsx("div",{style:Pt,children:F("colorPicker.standardColors")}),jsx(un,{selectedColor:t,theme:r,onSelect:ye}),jsx("div",{style:Mt}),jsx("div",{style:Pt,children:F("colorPicker.customColor")}),jsxs("div",{style:rn,children:[jsx("span",{style:{fontSize:"12px",color:"#666"},children:"#"}),jsx("input",{type:"text",style:nn,value:C,onChange:w=>I(w.target.value.replace(/[^0-9A-Fa-f]/g,"").slice(0,6)),onKeyDown:w=>{w.key==="Enter"&&Ee();},onMouseDown:w=>{w.stopPropagation();},placeholder:"FF0000",maxLength:6,"aria-label":"Custom hex color"}),jsx("button",{type:"button",style:{...an,opacity:/^[0-9A-Fa-f]{6}$/.test(C)?1:.4,cursor:/^[0-9A-Fa-f]{6}$/.test(C)?"pointer":"default"},onClick:Ee,onMouseDown:w=>w.preventDefault(),disabled:!/^[0-9A-Fa-f]{6}$/.test(C),children:F("common.apply")})]})]})})]})}function Q({content:e,children:t,side:o="bottom",delayMs:r=400}){let[n,s]=j.useState(false),[i,c]=j.useState({x:0,y:0}),d=j.useRef(null),a=j.useRef(null),p=j.useCallback(()=>{a.current=setTimeout(()=>{if(d.current){let u=d.current.getBoundingClientRect(),f=u.left+u.width/2,x=o==="top"?u.top-8:u.bottom+8;c({x:f,y:x});}s(true);},r);},[r,o]),m=j.useCallback(()=>{a.current&&(clearTimeout(a.current),a.current=null),s(false);},[]);j.useEffect(()=>()=>{a.current&&clearTimeout(a.current);},[]);let l=t.props,g=j.cloneElement(t,{ref:d,onMouseEnter:u=>{p(),l.onMouseEnter?.(u);},onMouseLeave:u=>{m(),l.onMouseLeave?.(u);}});return jsxs(Fragment,{children:[g,n&&jsx("div",{className:"fixed z-50 px-2 py-1 text-xs font-medium text-white bg-slate-900 rounded-md shadow-lg",style:{left:i.x,top:i.y,transform:o==="top"?"translate(-50%, -100%)":o==="bottom"?"translate(-50%, 0)":void 0},children:e})]})}var je=20,Lt=[{value:"left",label:"Align Left",labelKey:"alignment.alignLeft",shortcutKey:"alignment.alignLeftShortcut",icon:jsx(b,{name:"format_align_left",size:je}),iconName:"format_align_left",shortcut:"Ctrl+L"},{value:"center",label:"Center",labelKey:"alignment.center",shortcutKey:"alignment.centerShortcut",icon:jsx(b,{name:"format_align_center",size:je}),iconName:"format_align_center",shortcut:"Ctrl+E"},{value:"right",label:"Align Right",labelKey:"alignment.alignRight",shortcutKey:"alignment.alignRightShortcut",icon:jsx(b,{name:"format_align_right",size:je}),iconName:"format_align_right",shortcut:"Ctrl+R"},{value:"both",label:"Justify",labelKey:"alignment.justify",shortcutKey:"alignment.justifyShortcut",icon:jsx(b,{name:"format_align_justify",size:je}),iconName:"format_align_justify",shortcut:"Ctrl+J"}];function ho({value:e="left",onChange:t,disabled:o=false}){let{t:r}=b$1(),[n,s]=useState(false),i=useCallback(()=>s(false),[]),{containerRef:c$1,dropdownRef:d,dropdownStyle:a,handleMouseDown:p}=c({isOpen:n,onClose:i}),m=useCallback(h=>{o||t?.(h),s(false);},[o,t]),l=Lt.find(h=>h.value===e)||Lt[0],g=r(l.labelKey),u=l.shortcutKey?r(l.shortcutKey):void 0,f=`${g}${u?` (${u})`:""}`,x=jsxs(V,{variant:"ghost",size:"icon-sm",className:M("text-slate-500 hover:text-slate-900 hover:bg-slate-100/80",n&&"bg-slate-100",o&&"opacity-30 cursor-not-allowed"),onMouseDown:p,onClick:()=>!o&&s(h=>!h),disabled:o,"aria-label":f,"aria-expanded":n,"aria-haspopup":"true","data-testid":"toolbar-alignment",children:[jsx(b,{name:l.iconName,size:je}),jsx(b,{name:"arrow_drop_down",size:14,className:"-ml-1"})]});return jsxs("div",{ref:c$1,style:{position:"relative",display:"inline-block"},children:[n?x:jsx(Q,{content:f,children:x}),n&&!o&&jsx("div",{ref:d,style:{...a,backgroundColor:"white",border:"1px solid var(--doc-border)",borderRadius:8,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.12)",padding:6},onMouseDown:h=>h.stopPropagation(),children:jsx("div",{style:{display:"flex",gap:2},children:Lt.map(h=>{let b$1=e===h.value,y=r(h.labelKey),C=h.shortcutKey?r(h.shortcutKey):void 0;return jsx("button",{type:"button",title:`${y}${C?` (${C})`:""}`,"data-testid":`alignment-${h.value}`,style:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,border:"1px solid transparent",borderRadius:4,backgroundColor:b$1?"var(--doc-primary-light)":"transparent",cursor:"pointer",color:b$1?"var(--doc-primary)":"var(--doc-text)"},onMouseDown:I=>I.preventDefault(),onMouseEnter:I=>{b$1||(I.currentTarget.style.backgroundColor="var(--doc-bg-hover)");},onMouseLeave:I=>{I.currentTarget.style.backgroundColor=b$1?"var(--doc-primary-light)":"transparent";},onClick:()=>m(h.value),children:jsx(b,{name:h.iconName,size:18})},h.value)})})})]})}var hn=[{label:"Single",labelKey:"lineSpacing.single",value:1,twipsValue:240},{label:"1.15",value:1.15,twipsValue:276},{label:"1.5",value:1.5,twipsValue:360},{label:"Double",labelKey:"lineSpacing.double",value:2,twipsValue:480}];function yo({value:e,onChange:t,options:o=hn,disabled:r=false,className:n}){let{t:s}=b$1(),i=j.useMemo(()=>e===void 0?o[0]:o.find(a=>a.twipsValue===e)||o[0],[e,o]),c=j.useCallback(a=>{let p=parseInt(a,10);isNaN(p)||t?.(p);},[t]),d=a=>a.labelKey?s(a.labelKey):a.label;return jsxs(we,{value:i.twipsValue.toString(),onValueChange:c,disabled:r,children:[jsx(Te,{className:M("h-8 text-sm gap-0.5 px-2",n),style:{width:"auto"},title:s("lineSpacing.lineSpacingTitle",{label:d(i)}),children:jsx(a,{className:"h-5 w-5 shrink-0"})}),jsxs(ke,{children:[o.map(a=>jsx(ae,{value:a.twipsValue.toString(),children:d(a)},a.twipsValue)),jsx(Ve,{}),jsx(De,{children:jsx(We,{children:s("lineSpacing.paragraphSpacing")})})]})]})}var vo=[{styleId:"Normal",name:"Normal text",nameKey:"styles.normalText",type:"paragraph",isDefault:true,priority:0,qFormat:true,fontSize:22},{styleId:"Title",name:"Title",nameKey:"styles.title",type:"paragraph",priority:1,qFormat:true,fontSize:52,bold:true},{styleId:"Subtitle",name:"Subtitle",nameKey:"styles.subtitle",type:"paragraph",priority:2,qFormat:true,fontSize:30,color:"666666"},{styleId:"Heading1",name:"Heading 1",nameKey:"styles.heading1",type:"paragraph",priority:3,qFormat:true,fontSize:40,bold:true},{styleId:"Heading2",name:"Heading 2",nameKey:"styles.heading2",type:"paragraph",priority:4,qFormat:true,fontSize:32,bold:true},{styleId:"Heading3",name:"Heading 3",nameKey:"styles.heading3",type:"paragraph",priority:5,qFormat:true,fontSize:28,bold:true}],xn="#4a6c8c",yn={Title:26,Subtitle:18,Heading1:24,Heading2:18,Heading3:16,Heading4:14,Heading5:13,Heading6:13,Normal:14};function vn(e){let t={},o=yn[e.styleId];if(o)t.fontSize=`${o}px`;else {let r=e.fontSize?e.fontSize/2:11,n=Math.min(Math.max(r,11),20);t.fontSize=`${n}px`;}return t.lineHeight="1.3",e.bold&&(t.fontWeight="bold"),e.italic&&(t.fontStyle="italic"),e.color?t.color=`#${e.color}`:e.styleId.startsWith("Heading")&&(t.color=xn),t}function Co({value:e,onChange:t,styles:o,disabled:r=false,className:n,width:s=120}){let{t:i}=b$1(),c=j.useMemo(()=>!o||o.length===0?vo:o.filter(u=>u.type==="paragraph").filter(u=>u.qFormat?true:!(u.hidden||u.semiHidden)).map(u=>{let f=vo.find(x=>x.styleId===u.styleId);return {styleId:u.styleId,name:u.name||u.styleId,nameKey:f?.nameKey,type:u.type,isDefault:u.default,qFormat:u.qFormat,priority:u.uiPriority??99,fontSize:u.rPr?.fontSize??f?.fontSize,bold:u.rPr?.bold??f?.bold,italic:u.rPr?.italic??f?.italic,color:u.rPr?.color?.rgb??f?.color}}).sort((u,f)=>(u.priority??99)-(f.priority??99)),[o]),d=j.useCallback(g=>{t?.(g);},[t]),a=g=>g.nameKey?i(g.nameKey):g.name,p=e||"Normal",m=c.find(g=>g.styleId===p),l=m?a(m):p;return jsxs(we,{value:p,onValueChange:d,disabled:r,children:[jsx(Te,{className:M("h-8 text-sm",n),style:{width:typeof s=="number"?`${s}px`:s},"aria-label":i("styles.selectAriaLabel"),children:jsx("span",{className:"truncate",children:l})}),jsx(ke,{className:"min-w-[260px] max-h-[400px]",children:c.map(g=>jsx(ae,{value:g.styleId,className:"py-2.5 px-3",children:jsx("span",{style:vn(g),children:a(g)})},g.styleId))})]})}var Sn=[{value:.5,label:"50%"},{value:.75,label:"75%"},{value:1,label:"100%"},{value:1.25,label:"125%"},{value:1.5,label:"150%"},{value:2,label:"200%"}];function So({value:e=1,onChange:t,levels:o=Sn,disabled:r=false,className:n,compact:s=false}){let{t:i}=b$1(),c=j.useMemo(()=>{let a=o.find(p=>Math.abs(p.value-e)<.001);return a?a.label:`${Math.round(e*100)}%`},[o,e]),d=j.useCallback(a=>{let p=parseFloat(a);isNaN(p)||t?.(p);},[t]);return jsxs(we,{value:e.toString(),onValueChange:d,disabled:r,children:[jsx(Te,{className:M(s?"h-7 min-w-[55px] text-xs":"h-8 min-w-[70px] text-sm",n),"aria-label":i("zoom.ariaLabel",{label:c}),children:jsx(st,{placeholder:"100%",children:c})}),jsx(ke,{children:o.map(a=>jsx(ae,{value:a.value.toString(),children:a.label},a.value))})]})}var kn=[{action:"borderAll",icon:"border_all",labelKey:"table.borders.all"},{action:"borderOutside",icon:"border_outer",labelKey:"table.borders.outside"},{action:"borderInside",icon:"border_inner",labelKey:"table.borders.inside"},{action:"borderTop",icon:"border_top",labelKey:"table.borders.top"},{action:"borderBottom",icon:"border_bottom",labelKey:"table.borders.bottom"},{action:"borderLeft",icon:"border_left",labelKey:"table.borders.left"},{action:"borderRight",icon:"border_right",labelKey:"table.borders.right"},{action:"borderNone",icon:"border_clear",labelKey:"table.borders.none"}];function ko({onAction:e,disabled:t=false}){let{t:o}=b$1(),[r,n]=useState(false),s=useCallback(()=>n(false),[]),{containerRef:i,dropdownRef:c$1,dropdownStyle:d,handleMouseDown:a}=c({isOpen:r,onClose:s}),p=useCallback(l=>{e(l),n(false);},[e]),m=jsxs(V,{variant:"ghost",size:"icon-sm",className:M("text-slate-500 hover:text-slate-900 hover:bg-slate-100/80",r&&"bg-slate-100",t&&"opacity-30 cursor-not-allowed"),onMouseDown:a,onClick:()=>!t&&n(l=>!l),disabled:t,"aria-label":o("table.borders.styleAriaLabel"),"aria-expanded":r,"aria-haspopup":"true","data-testid":"toolbar-table-borders",children:[jsx(b,{name:"border_all",size:20}),jsx(b,{name:"arrow_drop_down",size:14,className:"-ml-1"})]});return jsxs("div",{ref:i,style:{position:"relative",display:"inline-block"},children:[r?m:jsx(Q,{content:o("table.borders.tooltip"),children:m}),r&&!t&&jsx("div",{ref:c$1,style:{...d,backgroundColor:"white",border:"1px solid var(--doc-border)",borderRadius:8,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.12)",padding:6},onMouseDown:l=>l.stopPropagation(),children:jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:2},children:kn.map(({action:l,icon:g,labelKey:u})=>jsx("button",{type:"button",title:o(u),style:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,border:"1px solid transparent",borderRadius:4,backgroundColor:"transparent",cursor:"pointer",color:"var(--doc-text)"},onMouseDown:f=>f.preventDefault(),onMouseEnter:f=>{f.currentTarget.style.backgroundColor="var(--doc-bg-hover)";},onMouseLeave:f=>{f.currentTarget.style.backgroundColor="transparent";},onClick:()=>p(l),children:jsx(b,{name:g,size:18})},typeof l=="string"?l:l.type))})})]})}function Po({onAction:e,disabled:t=false,theme:o,value:r}){let{t:n}=b$1(),s=useCallback(i=>{typeof i=="string"?e({type:"borderColor",color:i.replace(/^#/,"")}):i.rgb?e({type:"borderColor",color:i.rgb.replace(/^#/,"")}):i.auto&&e({type:"borderColor",color:"000000"});},[e]);return jsx(_e,{mode:"border",value:r,onChange:s,theme:o,disabled:t,title:n("table.borderColor")})}var Ln=[{size:4,label:"0.5 pt",thickness:.5},{size:8,label:"1 pt",thickness:1},{size:12,label:"1.5 pt",thickness:1.5},{size:16,label:"2 pt",thickness:2},{size:24,label:"3 pt",thickness:3}];function Io({onAction:e,disabled:t=false}){let[o,r]=useState(false),{t:n}=b$1(),s=useCallback(()=>r(false),[]),{containerRef:i,dropdownRef:c$1,dropdownStyle:d,handleMouseDown:a}=c({isOpen:o,onClose:s}),p=useCallback(l=>{e({type:"borderWidth",size:l}),r(false);},[e]),m=jsxs(V,{variant:"ghost",size:"icon-sm",className:M("text-slate-500 hover:text-slate-900 hover:bg-slate-100/80",o&&"bg-slate-100",t&&"opacity-30 cursor-not-allowed"),onMouseDown:a,onClick:()=>!t&&r(l=>!l),disabled:t,"aria-label":n("table.borderWidth"),"aria-expanded":o,"aria-haspopup":"true","data-testid":"toolbar-table-border-width",children:[jsx(b,{name:"line_weight",size:20}),jsx(b,{name:"arrow_drop_down",size:14,className:"-ml-1"})]});return jsxs("div",{ref:i,style:{position:"relative",display:"inline-block"},children:[o?m:jsx(Q,{content:n("table.borderWidth"),children:m}),o&&!t&&jsx("div",{ref:c$1,style:{...d,backgroundColor:"white",border:"1px solid var(--doc-border)",borderRadius:8,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.12)",padding:"4px 0",minWidth:120},onMouseDown:l=>l.stopPropagation(),children:Ln.map(({size:l,label:g,thickness:u})=>jsxs("button",{type:"button",style:{display:"flex",alignItems:"center",gap:10,padding:"6px 12px",width:"100%",border:"none",backgroundColor:"transparent",cursor:"pointer",fontSize:12,color:"var(--doc-text)"},onMouseDown:f=>f.preventDefault(),onMouseEnter:f=>{f.currentTarget.style.backgroundColor="var(--doc-bg-hover)";},onMouseLeave:f=>{f.currentTarget.style.backgroundColor="transparent";},onClick:()=>p(l),children:[jsx("div",{style:{width:50,height:Math.max(u,1),backgroundColor:"#000",borderRadius:u>2?1:0}}),jsx("span",{children:g})]},l))})]})}function Lo({onAction:e,disabled:t=false,theme:o,value:r}){let{t:n}=b$1(),s=useCallback(i=>{typeof i=="string"&&e(i==="none"?{type:"cellFillColor",color:null}:{type:"cellFillColor",color:i.replace(/^#/,"")});},[e]);return jsx(_e,{mode:"highlight",value:r,onChange:s,theme:o,disabled:t,title:n("table.cellFillColor"),icon:"format_color_fill",autoLabel:n("colorPicker.noColor")})}var An={display:"flex",alignItems:"center",gap:10,padding:"7px 14px",fontSize:13,color:"var(--doc-text)",cursor:"pointer",border:"none",backgroundColor:"transparent",width:"100%",textAlign:"left"},Ue={height:1,backgroundColor:"var(--doc-border)",margin:"4px 0"},Ao={padding:"6px 14px 2px",fontSize:11,color:"var(--doc-text-muted)",fontWeight:500};function No({onAction:e,disabled:t=false,tableContext:o}){let{t:r}=b$1(),[n,s]=useState(false),[i,c$1]=useState(null),d=useCallback(()=>s(false),[]),{containerRef:a,dropdownRef:p,dropdownStyle:m,handleMouseDown:l}=c({isOpen:n,onClose:d,align:"right"}),g=o?.table?.attrs?.justification??"left",u=useCallback(h=>{e(h),s(false);},[e]),f=(h,b$1,y,C,I)=>{let L=t||I?.itemDisabled;return jsxs("button",{type:"button",role:"menuitem",style:{...An,backgroundColor:i===h&&!L?"var(--doc-bg-hover)":"transparent",color:L?"var(--doc-text-muted)":I?.danger?"var(--doc-error)":"var(--doc-text)",cursor:L?"not-allowed":"pointer"},onClick:()=>!L&&u(C),onMouseEnter:()=>c$1(h),onMouseLeave:()=>c$1(null),disabled:L,children:[jsx(b,{name:b$1,size:16,className:I?.danger&&!L?"text-red-600":""}),jsx("span",{style:{flex:1},children:y})]},h)},x=jsx(V,{variant:"ghost",size:"icon-sm",className:M("text-slate-500 hover:text-slate-900 hover:bg-slate-100/80",n&&"bg-slate-100",t&&"opacity-30 cursor-not-allowed"),onMouseDown:l,onClick:()=>!t&&s(h=>!h),disabled:t,"aria-label":r("table.moreOptions"),"aria-expanded":n,"aria-haspopup":"menu","data-testid":"toolbar-table-more",children:jsx(b,{name:"more_vert",size:20})});return jsxs("div",{ref:a,style:{position:"relative",display:"inline-block"},children:[n?x:jsx(Q,{content:r("table.moreOptions"),children:x}),n&&!t&&jsxs("div",{ref:p,style:{...m,backgroundColor:"white",border:"1px solid var(--doc-border)",borderRadius:8,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.12)",padding:"4px 0",minWidth:200,maxHeight:"70vh",overflowY:"auto"},role:"menu",onMouseDown:h=>h.stopPropagation(),children:[f("addRowAbove","add",r("table.insertRowAbove"),"addRowAbove"),f("addRowBelow","add",r("table.insertRowBelow"),"addRowBelow"),f("addColumnLeft","add",r("table.insertColumnLeft"),"addColumnLeft"),f("addColumnRight","add",r("table.insertColumnRight"),"addColumnRight"),jsx("div",{style:Ue,role:"separator"}),f("mergeCells","call_merge",r("table.mergeCells"),"mergeCells",{itemDisabled:!o?.hasMultiCellSelection}),f("splitCell","call_split",r("table.splitCell"),"splitCell",{itemDisabled:!o?.canSplitCell}),jsx("div",{style:Ue,role:"separator"}),f("deleteRow","delete",r("table.deleteRow"),"deleteRow",{danger:true,itemDisabled:(o?.rowCount??0)<=1}),f("deleteColumn","delete",r("table.deleteColumn"),"deleteColumn",{danger:true,itemDisabled:(o?.columnCount??0)<=1}),f("deleteTable","delete",r("table.deleteTable"),"deleteTable",{danger:true}),jsx("div",{style:Ue,role:"separator"}),jsx("div",{style:Ao,children:r("tableAdvanced.verticalAlignment")}),jsx("div",{style:{display:"flex",gap:4,padding:"4px 14px"},children:["top","center","bottom"].map(h=>{let b$1={top:"vertical_align_top",center:"vertical_align_center",bottom:"vertical_align_bottom"};return jsx("button",{type:"button",title:r({top:"tableAdvanced.top",center:"tableAdvanced.middle",bottom:"tableAdvanced.bottom"}[h]),style:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:28,border:"1px solid var(--doc-border)",borderRadius:4,backgroundColor:"transparent",cursor:"pointer"},onMouseDown:C=>C.preventDefault(),onMouseEnter:C=>{C.currentTarget.style.backgroundColor="var(--doc-bg-hover)";},onMouseLeave:C=>{C.currentTarget.style.backgroundColor="transparent";},onClick:()=>u({type:"cellVerticalAlign",align:h}),children:jsx(b,{name:b$1[h],size:16})},h)})}),jsx("div",{style:Ue,role:"separator"}),jsx("div",{style:Ao,children:r("tableAdvanced.tableAlignment")}),jsx("div",{style:{display:"flex",gap:4,padding:"4px 14px"},children:["left","center","right"].map(h=>{let b$1={left:"format_align_left",center:"format_align_center",right:"format_align_right"},y=g===h;return jsx("button",{type:"button",title:r({left:"tableAdvanced.alignTableLeft",center:"tableAdvanced.alignTableCenter",right:"tableAdvanced.alignTableRight"}[h]),style:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:28,border:"1px solid var(--doc-border)",borderRadius:4,backgroundColor:y?"var(--doc-primary-light)":"transparent",borderColor:y?"var(--doc-primary)":"var(--doc-border)",color:y?"var(--doc-primary)":"var(--doc-text)",cursor:"pointer"},onMouseDown:C=>C.preventDefault(),onClick:()=>u({type:"tableProperties",props:{justification:h}}),children:jsx(b,{name:b$1[h],size:16})},h)})}),jsx("div",{style:Ue,role:"separator"}),f("headerRow","table_rows",r("tableAdvanced.toggleHeaderRow"),{type:"toggleHeaderRow"}),f("distribute","view_column",r("tableAdvanced.distributeColumns"),{type:"distributeColumns"}),f("autoFit","fit_width",r("tableAdvanced.autoFit"),{type:"autoFitContents"}),f("noWrap","wrap_text",r("tableAdvanced.toggleNoWrap"),{type:"toggleNoWrap"}),jsx("div",{style:Ue,role:"separator"}),f("properties","settings",r("tableAdvanced.tableProperties"),{type:"openTableProperties"})]})]})}var Dn=20;function bt({options:e,activeValue:t,triggerIcon:o,tooltipContent:r,onSelect:n,disabled:s=false,ariaLabel:i,testId:c$1,showLabels:d=false}){let[a,p]=useState(false),m=useCallback(()=>p(false),[]),{containerRef:l,dropdownRef:g,dropdownStyle:u,handleMouseDown:f}=c({isOpen:a,onClose:m}),x=useCallback(b=>{s||n(b),p(false);},[s,n]),h=jsxs(V,{variant:"ghost",size:"icon-sm",className:M("text-slate-500 hover:text-slate-900 hover:bg-slate-100/80",a&&"bg-slate-100",s&&"opacity-30 cursor-not-allowed"),onMouseDown:f,onClick:()=>!s&&p(b=>!b),disabled:s,"aria-label":i??r,"aria-expanded":a,"aria-haspopup":"true","data-testid":c$1,children:[jsx(b,{name:o,size:Dn}),jsx(b,{name:"arrow_drop_down",size:14,className:"-ml-1"})]});return jsxs("div",{ref:l,style:{position:"relative",display:"inline-block"},children:[a?h:jsx(Q,{content:r,children:h}),a&&!s&&jsx("div",{ref:g,style:{...u,backgroundColor:"white",border:"1px solid var(--doc-border)",borderRadius:8,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.12)",padding:6},onMouseDown:b=>b.stopPropagation(),children:jsx("div",{style:{display:"flex",flexDirection:d?"column":"row",gap:d?1:2,minWidth:d?200:void 0},children:e.map(b$1=>{let y=t===b$1.value;return jsxs("button",{type:"button",title:b$1.label,"data-testid":c$1?`${c$1}-${b$1.value}`:void 0,style:{display:"flex",alignItems:"center",height:32,border:"1px solid transparent",borderRadius:4,backgroundColor:y?"var(--doc-primary-light)":"transparent",cursor:"pointer",color:y?"var(--doc-primary)":"var(--doc-text)",...d?{width:"100%",gap:10,padding:"0 10px",justifyContent:"flex-start",fontSize:13,textAlign:"left"}:{width:32,justifyContent:"center"}},onMouseDown:C=>C.preventDefault(),onMouseEnter:C=>{y||(C.currentTarget.style.backgroundColor="var(--doc-bg-hover)");},onMouseLeave:C=>{C.currentTarget.style.backgroundColor=y?"var(--doc-primary-light)":"transparent";},onClick:()=>x(b$1.value),children:[jsx(b,{name:b$1.iconName,size:18}),d&&jsx("span",{style:{flex:1},children:b$1.label})]},b$1.value)})})})]})}var Bn=[{value:"inline",labelKey:"imageWrap.inline",iconName:"wrap_text"},{value:"wrapRight",labelKey:"imageWrap.floatLeft",iconName:"format_image_left"},{value:"wrapLeft",labelKey:"imageWrap.floatRight",iconName:"format_image_right"},{value:"behind",labelKey:"imageWrap.behindText",iconName:"flip_to_back"},{value:"inFront",labelKey:"imageWrap.inFrontOfText",iconName:"flip_to_front"}];function _n(e){return e.displayMode==="float"&&e.cssFloat==="left"?"wrapRight":e.displayMode==="float"&&e.cssFloat==="right"?"wrapLeft":e.wrapType}function _o({imageContext:e,onChange:t,disabled:o=false}){let{t:r}=b$1(),n=Bn.map(c=>({...c,label:r(c.labelKey)})),s=_n(e),i=n.find(c=>c.value===s)||n[0];return jsx(bt,{options:n,activeValue:s,triggerIcon:i.iconName,tooltipContent:`Wrap: ${i.label}`,onSelect:t,disabled:o,testId:"toolbar-image-wrap",showLabels:true})}var On=[{value:"rotateCW",labelKey:"imageTransform.rotateClockwise",iconName:"rotate_right"},{value:"rotateCCW",labelKey:"imageTransform.rotateCounterClockwise",iconName:"rotate_left"},{value:"flipH",labelKey:"imageTransform.flipHorizontal",iconName:"swap_horiz"},{value:"flipV",labelKey:"imageTransform.flipVertical",iconName:"swap_vert"}];function Fo({onTransform:e,disabled:t=false}){let{t:o}=b$1(),r=On.map(n=>({...n,label:o(n.labelKey)}));return jsx(bt,{options:r,triggerIcon:"rotate_right",tooltipContent:o("imageTransform.tooltip"),onSelect:e,disabled:t,testId:"toolbar-image-transform"})}var Qe=createContext(null);function Oo(){let e=useContext(Qe);if(!e)throw new Error("useEditorToolbar must be used within an <EditorToolbar> component");return e}var le=18;function se({active:e=false,disabled:t=false,title:o,onClick:r,children:n,className:s,ariaLabel:i}){let c=i?.toLowerCase().replace(/\s+/g,"-")||o?.toLowerCase().replace(/\s+/g,"-").replace(/\([^)]*\)/g,"").trim(),d=p=>{p.preventDefault();},a=jsx(V,{variant:"ghost",size:"icon-sm",className:M("text-slate-500 hover:text-slate-900 hover:bg-slate-100/80",e&&"bg-slate-900 text-white hover:bg-slate-800 hover:text-white",t&&"opacity-30 cursor-not-allowed",s),onMouseDown:d,onClick:t?void 0:r,disabled:t,"aria-pressed":e,"aria-label":i||o,"data-testid":c?`toolbar-${c}`:void 0,children:n});return o?jsx(Q,{content:o,children:a}):a}function fe({label:e,children:t,className:o}){return jsx("div",{className:M("flex items-center gap-px px-1.5 border-r border-slate-200/50 last:border-r-0 first:pl-0",o),role:"group","aria-label":e,children:t})}function Ws(){return jsx("div",{className:"w-px h-6 bg-slate-200 mx-1.5",role:"separator"})}function Gn(e){let t=j__default.useContext(Qe);return t?{...t,...Un(e)}:e}function Un(e){let t={};for(let o of Object.keys(e))e[o]!==void 0&&(t[o]=e[o]);return t}function zo(e){let{t}=b$1(),o=Gn(e),{currentFormatting:r={},onFormat:n,onUndo:s,onRedo:i,canUndo:c=false,canRedo:d=false,disabled:a=false,className:p,style:m,enableShortcuts:l=true,editorRef:g,children:u,showFontPicker:f=true,fontFamilies:x,showFontSizePicker:h=true,showTextColorPicker:b$2=true,showHighlightColorPicker:y=true,showAlignmentButtons:C=true,showListButtons:I=true,showLineSpacingPicker:L=true,showStylePicker:ce=true,documentStyles:F,theme:Y,showZoomControl:de=true,zoom:ge,onZoomChange:G,onRefocusEditor:R,imageContext:k,onImageWrapType:_,onImageTransform:ue,onOpenImageProperties:he,tableContext:xe,onTableAction:ye,inline:te=false}=o,Ee=useRef(null),O=useCallback(A=>{!a&&n&&n(A);},[a,n]),qe=useCallback(()=>{!a&&c&&s&&s();},[a,c,s]),oe=useCallback(()=>{!a&&d&&i&&i();},[a,d,i]),ze=useCallback(A=>{!a&&n&&(n({type:"fontFamily",value:A}),requestAnimationFrame(()=>R?.()));},[a,n,R]),w=j__default.useMemo(()=>normalizeFontFamilies(x),[x]),W=useCallback(A=>{!a&&n&&(n({type:"fontSize",value:A}),requestAnimationFrame(()=>R?.()));},[a,n,R]),ve=useCallback(A=>{!a&&n&&(n({type:"textColor",value:A}),requestAnimationFrame(()=>R?.()));},[a,n,R]),St=useCallback(A=>{!a&&n&&(n({type:"highlightColor",value:typeof A=="string"?A:""}),requestAnimationFrame(()=>R?.()));},[a,n,R]),E=useCallback(A=>{!a&&n&&n({type:"alignment",value:A});},[a,n]),Ae=useCallback(()=>{!a&&n&&n("bulletList");},[a,n]),tt=useCallback(()=>{!a&&n&&n("numberedList");},[a,n]),Ne=useCallback(()=>{!a&&n&&n("indent");},[a,n]),pe=useCallback(()=>{!a&&n&&n("outdent");},[a,n]),J=useCallback(A=>{!a&&n&&(n({type:"lineSpacing",value:A}),requestAnimationFrame(()=>R?.()));},[a,n,R]),re=useCallback(A=>{!a&&n&&(n({type:"applyStyle",value:A}),requestAnimationFrame(()=>R?.()));},[a,n,R]),ne=useCallback(A=>{!a&&ye&&(ye(A),requestAnimationFrame(()=>R?.()));},[a,ye,R]);useEffect(()=>{if(!l)return;let A=B=>{let Ye=B.target,$t=g?.current,rr=Ee.current,nr=$t?.contains(Ye),ar=rr?.contains(Ye);if(!nr&&!ar)return;if((B.ctrlKey||B.metaKey)&&!B.altKey)switch(B.key.toLowerCase()){case "b":B.preventDefault(),O("bold");break;case "i":B.preventDefault(),O("italic");break;case "u":B.preventDefault(),O("underline");break;case "=":B.shiftKey?(B.preventDefault(),O("superscript")):(B.preventDefault(),O("subscript"));break;case "l":B.preventDefault(),E("left");break;case "e":B.preventDefault(),E("center");break;case "r":B.preventDefault(),E("right");break;case "j":B.preventDefault(),E("both");break;case "k":B.preventDefault(),O("insertLink");break}};return document.addEventListener("keydown",A),()=>{document.removeEventListener("keydown",A);}},[l,O,E,g]);let tr=useCallback(A=>{let B=A.target;B.tagName==="INPUT"||B.tagName==="TEXTAREA"||B.tagName==="SELECT"||B.tagName==="OPTION"||A.preventDefault();},[]),or=useCallback(A=>{let B=A.target,Ye=document.activeElement;B.tagName==="SELECT"||B.tagName==="OPTION"||Ye?.tagName==="SELECT"||requestAnimationFrame(()=>{R?.();});},[R]);return jsxs("div",{ref:Ee,className:M(!te&&"flex items-center px-2 py-1 bg-[#f1f5f9] rounded-full min-h-[36px] overflow-x-auto mx-2 mb-1",p),style:te?{display:"contents",...m}:m,role:te?void 0:"toolbar","aria-label":te?void 0:t("toolbar.ariaLabel"),"data-testid":te?void 0:"formatting-bar",onMouseDown:te?void 0:tr,onMouseUp:te?void 0:or,children:[jsxs(fe,{label:t("formattingBar.groups.history"),children:[jsx(se,{onClick:qe,disabled:a||!c,title:t("formattingBar.undoShortcut"),ariaLabel:t("formattingBar.undo"),children:jsx(b,{name:"undo",size:le})}),jsx(se,{onClick:oe,disabled:a||!d,title:t("formattingBar.redoShortcut"),ariaLabel:t("formattingBar.redo"),children:jsx(b,{name:"redo",size:le})})]}),de&&jsx(fe,{label:t("formattingBar.groups.zoom"),children:jsx(So,{value:ge,onChange:G,minZoom:.5,maxZoom:2,disabled:a,compact:true,showButtons:false})}),ce&&jsx(fe,{label:t("formattingBar.groups.styles"),children:jsx(Co,{value:r.styleId||"Normal",onChange:re,styles:F,theme:Y,disabled:a,width:120})}),(f||h)&&jsxs(fe,{label:t("formattingBar.groups.font"),children:[f&&jsx(lo,{value:r.fontFamily||"Arial",onChange:ze,fonts:w,disabled:a,width:60,placeholder:"Arial"}),h&&jsx(Jt,{value:r.fontSize!==void 0?halfPointsToPoints(r.fontSize):11,onChange:W,disabled:a,width:42,placeholder:"11"})]}),jsxs(fe,{label:t("formattingBar.groups.textFormatting"),children:[jsx(se,{onClick:()=>O("bold"),active:r.bold,disabled:a,title:t("formattingBar.boldShortcut"),ariaLabel:t("formattingBar.bold"),children:jsx(b,{name:"format_bold",size:le})}),jsx(se,{onClick:()=>O("italic"),active:r.italic,disabled:a,title:t("formattingBar.italicShortcut"),ariaLabel:t("formattingBar.italic"),children:jsx(b,{name:"format_italic",size:le})}),jsx(se,{onClick:()=>O("underline"),active:r.underline,disabled:a,title:t("formattingBar.underlineShortcut"),ariaLabel:t("formattingBar.underline"),children:jsx(b,{name:"format_underlined",size:le})}),jsx(se,{onClick:()=>O("strikethrough"),active:r.strike,disabled:a,title:t("formattingBar.strikethrough"),ariaLabel:t("formattingBar.strikethrough"),children:jsx(b,{name:"strikethrough_s",size:le})}),b$2&&jsx(_e,{mode:"text",value:r.color?.replace(/^#/,""),onChange:ve,theme:Y,disabled:a,title:t("formattingBar.fontColor")}),y&&jsx(_e,{mode:"highlight",value:r.highlight,onChange:St,theme:Y,disabled:a,title:t("formattingBar.highlightColor")}),jsx(se,{onClick:()=>O("insertLink"),disabled:a,title:t("formattingBar.insertLinkShortcut"),ariaLabel:t("formattingBar.insertLink"),children:jsx(b,{name:"link",size:le})})]}),jsxs(fe,{label:t("formattingBar.groups.script"),children:[jsx(se,{onClick:()=>O("superscript"),active:r.superscript,disabled:a,title:t("formattingBar.superscriptShortcut"),ariaLabel:t("formattingBar.superscript"),children:jsx(b,{name:"superscript",size:le})}),jsx(se,{onClick:()=>O("subscript"),active:r.subscript,disabled:a,title:t("formattingBar.subscriptShortcut"),ariaLabel:t("formattingBar.subscript"),children:jsx(b,{name:"subscript",size:le})})]}),C&&jsx(fe,{label:t("formattingBar.groups.alignment"),children:jsx(ho,{value:r.alignment||"left",onChange:E,disabled:a})}),(I||L)&&jsxs(fe,{label:t("formattingBar.groups.listFormatting"),children:[I&&jsx(to,{listState:r.listState||createDefaultListState(),onBulletList:Ae,onNumberedList:tt,onIndent:Ne,onOutdent:pe,disabled:a,showIndentButtons:true,compact:true,hasIndent:(r.indentLeft??0)>0}),L&&jsx(yo,{value:r.lineSpacing,onChange:J,disabled:a})]}),k&&_&&jsxs(fe,{label:t("formattingBar.groups.image"),children:[jsx(_o,{imageContext:k,onChange:_,disabled:a}),ue&&jsx(Fo,{onTransform:ue,disabled:a}),he&&jsx(se,{onClick:he,disabled:a,title:t("formattingBar.imagePropertiesShortcut"),ariaLabel:t("formattingBar.imageProperties"),children:jsx(b,{name:"tune",size:le})})]}),xe?.isInTable&&ye&&jsxs(fe,{label:t("formattingBar.groups.table"),children:[jsx(ko,{onAction:ne,disabled:a}),jsx(Po,{onAction:ne,disabled:a,theme:Y,value:resolveColorToHex(xe?.cellBorderColor,Y)}),jsx(Io,{onAction:ne,disabled:a}),jsx(Lo,{onAction:ne,disabled:a,theme:Y,value:xe?.cellBackgroundColor}),jsx(No,{onAction:ne,disabled:a,tableContext:xe})]}),jsx(se,{onClick:()=>O("clearFormatting"),disabled:a,title:t("formattingBar.clearFormatting"),ariaLabel:t("formattingBar.clearFormatting"),children:jsx(b,{name:"format_clear",size:le})}),u]})}function qn(e){return "type"in e&&e.type==="separator"}var Vo={display:"flex",alignItems:"center",gap:2,padding:"2px 8px",border:"none",background:"transparent",borderRadius:4,cursor:"pointer",fontSize:13,fontWeight:400,color:"var(--doc-text, #374151)",whiteSpace:"nowrap",height:28,lineHeight:"28px"},Yn={...Vo,background:"var(--doc-hover, #f3f4f6)"},$o={display:"flex",alignItems:"center",gap:8,padding:"6px 12px",border:"none",background:"transparent",cursor:"pointer",fontSize:13,color:"var(--doc-text, #374151)",width:"100%",textAlign:"left",whiteSpace:"nowrap"},Xn={...$o,opacity:.4,cursor:"default"},jn={height:1,backgroundColor:"var(--doc-border, #e5e7eb)",margin:"4px 0"},Jn={marginLeft:"auto",fontSize:12,color:"var(--doc-text-muted, #9ca3af)"},Qn={position:"absolute",left:"100%",top:-4,marginLeft:2,backgroundColor:"white",border:"1px solid var(--doc-border, #d1d5db)",borderRadius:6,boxShadow:"0 4px 12px rgba(0, 0, 0, 0.12)",padding:8,zIndex:1001};function et({label:e,items:t,disabled:o,showChevron:r=false}){let[n,s]=useState(false),[i,c]=useState(null),d=useRef(null),a=useRef(null),[p,m]=useState({top:0,left:0}),l=useCallback(()=>{s(false),c(null);},[]);useEffect(()=>{if(!n||!d.current)return;let u=d.current.getBoundingClientRect();m({top:u.bottom+2,left:u.left});},[n]),useEffect(()=>{if(!n)return;function u(h){let b=h.target;d.current&&!d.current.contains(b)&&a.current&&!a.current.contains(b)&&l();}function f(h){h.key==="Escape"&&l();}function x(){l();}return document.addEventListener("mousedown",u),document.addEventListener("keydown",f),window.addEventListener("scroll",x,true),()=>{document.removeEventListener("mousedown",u),document.removeEventListener("keydown",f),window.removeEventListener("scroll",x,true);}},[n,l]);let g=u=>{u.disabled||u.submenuContent||u.onClick&&(u.onClick(),l());};return jsxs("div",{style:{position:"relative"},children:[jsxs("button",{ref:d,type:"button",onClick:()=>!o&&s(!n),onMouseDown:u=>u.preventDefault(),disabled:o,style:n?Yn:Vo,children:[e,r&&jsx(b,{name:"arrow_drop_down",size:16})]}),n&&jsx("div",{ref:a,style:{position:"fixed",top:p.top,left:p.left,backgroundColor:"white",border:"1px solid var(--doc-border, #d1d5db)",borderRadius:6,boxShadow:"0 4px 12px rgba(0, 0, 0, 0.12)",padding:"4px 0",zIndex:1e4,minWidth:200},onMouseDown:u=>u.preventDefault(),children:t.map((u,f)=>{if(qn(u))return jsx("div",{style:jn},`sep-${f}`);let x=u;if(x.customContent)return jsx("div",{onMouseDown:y=>y.preventDefault(),children:x.customContent},x.label);let h=!!x.submenuContent,b$1=i===x.label;return jsxs("div",{style:{position:"relative"},onMouseEnter:()=>h&&c(x.label),onMouseLeave:()=>h&&c(null),children:[jsxs("button",{type:"button",style:x.disabled?Xn:$o,onClick:()=>g(x),onMouseDown:y=>y.preventDefault(),onMouseOver:y=>{x.disabled||(y.currentTarget.style.backgroundColor="var(--doc-hover, #f3f4f6)");},onMouseOut:y=>{y.currentTarget.style.backgroundColor="transparent";},disabled:x.disabled,children:[x.icon&&jsx(b,{name:x.icon,size:18}),jsx("span",{children:x.label}),x.shortcut&&jsx("span",{style:Jn,children:x.shortcut}),h&&jsx("span",{style:{marginLeft:"auto"},children:jsx(b,{name:"keyboard_arrow_right",size:16})})]}),h&&b$1&&jsx("div",{style:Qn,onMouseDown:y=>y.preventDefault(),children:x.submenuContent(l)})]},x.label)})})]})}var Bt=18,ta=2,Uo={width:Bt,height:Bt,backgroundColor:"white",border:"1px solid var(--doc-border, #d1d5db)",borderRadius:2,transition:"background-color 0.1s, border-color 0.1s",cursor:"pointer"},oa={...Uo,backgroundColor:"var(--doc-primary, #3b82f6)",border:"1px solid var(--doc-primary, #3b82f6)"},ra={marginTop:6,fontSize:11,fontWeight:500,color:"var(--doc-text, #374151)",textAlign:"center"};function Zo({onInsert:e,gridRows:t=6,gridColumns:o=6}){let[r,n]=useState(0),[s,i]=useState(0),c=useCallback(()=>{r>0&&s>0&&e(r,s);},[r,s,e]),d=[];for(let p=1;p<=t;p++)for(let m=1;m<=o;m++){let l=p<=r&&m<=s;d.push(jsx("div",{style:l?oa:Uo,onMouseEnter:()=>{n(p),i(m);},onClick:c,role:"gridcell","aria-selected":l},`${p}-${m}`));}let a=r>0&&s>0?`${s} \xD7 ${r}`:"Select size";return jsxs("div",{children:[jsx("div",{style:{display:"grid",gap:ta,gridTemplateColumns:`repeat(${o}, ${Bt}px)`},onMouseLeave:()=>{n(0),i(0);},role:"grid","aria-label":"Table size selector",children:d}),jsx("div",{style:ra,children:a})]})}function la(){return jsxs("svg",{width:"32",height:"40",viewBox:"0 0 32 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{d:"M2 0C0.9 0 0 0.9 0 2V38C0 39.1 0.9 40 2 40H30C31.1 40 32 39.1 32 38V10L22 0H2Z",fill:"#cbd5e1"}),jsx("path",{d:"M22 0L32 10H24C22.9 10 22 9.1 22 8V0Z",fill:"#94a3b8"}),jsx("rect",{x:"7",y:"18",width:"18",height:"2",rx:"1",fill:"#fff"}),jsx("rect",{x:"7",y:"23",width:"18",height:"2",rx:"1",fill:"#fff"}),jsx("rect",{x:"7",y:"28",width:"12",height:"2",rx:"1",fill:"#fff"})]})}function Ft({children:e}){return jsx("div",{className:"flex items-center flex-shrink-0",children:e})}function sa(e){return e.replace(/\.docx$/i,"")}function Yo({value:e,onChange:t,placeholder:o,editable:r=true}){let{t:n}=b$1(),s=o??n("titleBar.untitled"),i=sa(e)??"";return r?jsx("input",{type:"text",value:i,onChange:c=>{let d=c.target.value;t?.(d.endsWith(".docx")?d:d+".docx");},placeholder:s,className:"text-base font-normal text-slate-800 bg-transparent border-0 outline-none px-2 py-0 rounded hover:bg-slate-50 focus:bg-white focus:ring-1 focus:ring-slate-300 min-w-[100px] max-w-[300px] truncate leading-tight","aria-label":n("titleBar.documentNameAriaLabel")}):jsx("span",{className:"text-base font-normal text-slate-800 px-2 py-0 min-w-[100px] max-w-[300px] truncate leading-tight",children:i||s})}function Ot({children:e}){return jsx("div",{className:"flex items-center gap-2 ml-auto flex-shrink-0",children:e})}function Kt(){let{t:e}=b$1(),t=Oo(),{disabled:o=false,onFormat:r,onPrint:n,onOpen:s,onSave:i,onPageSetup:c,onInsertImage:d,onInsertTable:a,showTableInsert:p=true,onInsertPageBreak:m,onInsertTOC:l,onRefocusEditor:g}=t,u=useCallback(b=>{!o&&r&&r(b);},[o,r]),f=useCallback((b,y)=>{!o&&a&&(a(b,y),requestAnimationFrame(()=>g?.()));},[o,a,g]),x=!!n||!!c,h=x||s||i;return jsxs("div",{className:"flex items-center",role:"menubar","aria-label":e("titleBar.menuBarAriaLabel"),children:[h&&jsx(et,{label:e("toolbar.file"),disabled:o,items:[...s?[{icon:"file_upload",label:e("toolbar.open"),shortcut:e("toolbar.openShortcut"),onClick:s}]:[],...i?[{icon:"file_download",label:e("toolbar.save"),shortcut:e("toolbar.saveShortcut"),onClick:i}]:[],...(s||i)&&x?[{type:"separator"}]:[],...n?[{icon:"print",label:e("toolbar.print"),shortcut:e("toolbar.printShortcut"),onClick:n}]:[],...c?[{icon:"settings",label:e("toolbar.pageSetup"),onClick:c}]:[]]}),jsx(et,{label:e("toolbar.format"),disabled:o,items:[{icon:"format_textdirection_l_to_r",label:e("toolbar.leftToRight"),onClick:()=>u("setLtr")},{icon:"format_textdirection_r_to_l",label:e("toolbar.rightToLeft"),onClick:()=>u("setRtl")}]}),jsx(et,{label:e("toolbar.insert"),disabled:o,items:[...d?[{icon:"image",label:e("toolbar.image"),onClick:d}]:[],...p&&a?[{icon:"grid_on",label:e("toolbar.table"),submenuContent:b=>jsx(Zo,{onInsert:(y,C)=>{f(y,C),b();}})}]:[],...d||p&&a?[{type:"separator"}]:[],{icon:"page_break",label:e("toolbar.pageBreak"),onClick:m,disabled:!m},{icon:"format_list_numbered",label:e("toolbar.tableOfContents"),onClick:l,disabled:!l}]}),jsx(et,{label:e("toolbar.help"),disabled:o,items:[{label:e("toolbar.reportIssue"),onClick:()=>openReportIssue()}]})]})}function Xo({children:e}){let t=null,o=null,r=[],n=[];Children.forEach(e,i=>{isValidElement(i)&&(i.type===Ft?t=i:i.type===Ot?o=i:i.type===Kt?n.push(i):r.push(i));});let s=useCallback(i=>{let c=i.target;c.tagName==="INPUT"||c.tagName==="TEXTAREA"||c.tagName==="SELECT"||c.tagName==="OPTION"||i.preventDefault();},[]);return jsxs("div",{className:"flex items-stretch bg-white pt-2 pb-1",onMouseDown:s,"data-testid":"title-bar",children:[jsx("div",{className:"flex items-center flex-shrink-0 pl-3 pr-1",children:t||jsx(la,{})}),jsxs("div",{className:"flex flex-col justify-center flex-1 min-w-0 py-1",children:[r.length>0&&jsx("div",{className:"flex items-center gap-2 px-1",children:r}),n.length>0&&jsx("div",{className:"flex items-center px-1",children:n})]}),o&&jsx("div",{className:"flex items-center flex-shrink-0 px-3",children:o})]})}function ca({children:e,className:t,style:o,...r}){return jsx(Qe.Provider,{value:r,children:jsx("div",{className:M("flex flex-col bg-white shadow-sm flex-shrink-0",t),style:o,"data-testid":"editor-toolbar",children:e})})}var Ze=ca;Ze.TitleBar=Xo;Ze.Logo=Ft;Ze.DocumentName=Yo;Ze.MenuBar=Kt;Ze.TitleBarRight=Ot;Ze.Toolbar=zo;var Qo=12240,yt=1440,vt=1440,Ct=567,Ht=22,pa="var(--doc-text-muted)",ma="var(--doc-text-subtle)",Jo="rgba(0, 0, 0, 0.02)",fa="#4285f4",ba="#3367d6",ga="#2a56c6",Ke=5;function ha(e,t){return t==="inch"?(e/vt).toFixed(2)+'"':(e/Ct).toFixed(1)+" cm"}function vc({sectionProps:e,zoom:t=1,editable:o=false,onLeftMarginChange:r,onRightMarginChange:n,onFirstLineIndentChange:s,showFirstLineIndent:i=false,firstLineIndent:c=0,hangingIndent:d=false,indentLeft:a=0,indentRight:p=0,onIndentLeftChange:m,onIndentRightChange:l,unit:g="inch",className:u="",style:f,tabStops:x,onTabStopRemove:h}){let{t:b}=b$1(),[y,C]=useState(null),[I,L]=useState(null),[ce,F]=useState(null),[Y,de]=useState(null),ge=useRef(null),G=e?.pageWidth??Qo,R=e?.marginLeft??yt,k=e?.marginRight??yt,_=G-R-k,ue=twipsToPixels(G)*t,he=twipsToPixels(R)*t,xe=twipsToPixels(k)*t,ye=twipsToPixels(a)*t,te=twipsToPixels(p)*t,Ee=d?-c:c,O=twipsToPixels(Ee)*t,qe=he+ye,oe=ue-xe-te,ze=he+ye+O,w=useCallback((E,Ae)=>{o&&(E.preventDefault(),E.stopPropagation(),C(Ae));},[o]),W=useCallback(E=>{if(!y||!ge.current)return;let Ae=ge.current.getBoundingClientRect(),tt=E.clientX-Ae.left;de(tt);let Ne=pixelsToTwips(tt/t);if(y==="leftMargin"){let pe=G-k-720,J=Math.round(Math.max(0,Math.min(Ne,pe)));F(J),r?.(J);}else if(y==="rightMargin"){let pe=G-Ne,J=G-R-720,re=Math.round(Math.max(0,Math.min(pe,J)));F(re),n?.(re);}else if(y==="firstLineIndent"){let pe=R+a,J=Ne-pe,re=_-a-p-720,ne=Math.round(Math.max(-a,Math.min(J,re)));F(ne),s?.(ne);}else if(y==="leftIndent"){let pe=Ne-R,J=_-p-720,re=Math.round(Math.max(0,Math.min(pe,J)));F(re),m?.(re);}else if(y==="rightIndent"){let J=G-k-Ne,re=_-a-720,ne=Math.round(Math.max(0,Math.min(J,re)));F(ne),l?.(ne);}},[y,t,G,R,k,_,a,p,r,n,s,m,l]),ve=useCallback(()=>{C(null),F(null),de(null);},[]);useEffect(()=>{if(y)return document.addEventListener("mousemove",W),document.addEventListener("mouseup",ve),()=>{document.removeEventListener("mousemove",W),document.removeEventListener("mouseup",ve);}},[y,W,ve]);let St=Sa(G,t,g);return jsxs("div",{ref:ge,className:`docx-horizontal-ruler ${u}`,style:{position:"relative",width:formatPx(ue),height:Ht,backgroundColor:"transparent",overflow:"visible",userSelect:"none",cursor:y?"ew-resize":"default",...f},role:"slider","aria-label":b("ruler.horizontal"),"aria-valuemin":0,"aria-valuemax":G,children:[jsx("div",{style:{position:"absolute",top:0,left:0,width:formatPx(he),height:Ht,backgroundColor:Jo,borderRight:"1px solid rgba(0,0,0,0.06)",cursor:o?"ew-resize":"default",zIndex:1},onMouseDown:o&&r?E=>w(E,"leftMargin"):void 0}),jsx("div",{style:{position:"absolute",top:0,right:0,width:formatPx(xe),height:Ht,backgroundColor:Jo,borderLeft:"1px solid rgba(0,0,0,0.06)",cursor:o?"ew-resize":"default",zIndex:1},onMouseDown:o&&n?E=>w(E,"rightMargin"):void 0}),jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:St.map((E,Ae)=>jsx(xa,{tick:E},Ae))}),i&&jsx(Wt,{direction:"down",positionPx:ze,editable:o,isDragging:y==="firstLineIndent",isHovered:I==="firstLineIndent",onMouseEnter:()=>L("firstLineIndent"),onMouseLeave:()=>L(null),onMouseDown:E=>w(E,"firstLineIndent"),label:b("ruler.firstLineIndent")}),o&&m&&jsx(Wt,{direction:"up",positionPx:qe,editable:o,isDragging:y==="leftIndent",isHovered:I==="leftIndent",onMouseEnter:()=>L("leftIndent"),onMouseLeave:()=>L(null),onMouseDown:E=>w(E,"leftIndent"),label:b("ruler.leftIndent")}),o&&l&&jsx(Wt,{direction:"down",positionPx:oe,editable:o,isDragging:y==="rightIndent",isHovered:I==="rightIndent",onMouseEnter:()=>L("rightIndent"),onMouseLeave:()=>L(null),onMouseDown:E=>w(E,"rightIndent"),label:b("ruler.rightIndent")}),x?.map(E=>jsx(Ca,{tabStop:E,positionPx:twipsToPixels(E.position)*t,onDoubleClick:()=>h?.(E.position)},E.position)),y&&ce!==null&&Y!==null&&jsx(ya,{value:ha(ce,g),positionPx:Y})]})}function xa({tick:e}){return jsxs(Fragment,{children:[jsx("div",{style:{position:"absolute",left:formatPx(e.position),bottom:0,width:1,height:e.height,backgroundColor:ma}}),e.label&&jsx("div",{style:{position:"absolute",left:formatPx(e.position),top:3,transform:"translateX(-50%)",fontSize:"9px",color:pa,fontFamily:"sans-serif",whiteSpace:"nowrap"},children:e.label})]})}function Wt({direction:e,positionPx:t,editable:o,isDragging:r,isHovered:n,onMouseEnter:s,onMouseLeave:i,onMouseDown:c,label:d}){let a=r?ga:n?ba:fa,p=Math.round(Ke*1.6),m={position:"absolute",left:formatPx(t-Ke),width:Ke*2,height:p+2,cursor:o?"ew-resize":"default",zIndex:r?10:4,...e==="down"?{top:0}:{bottom:0}},l=e==="down"?{position:"absolute",top:1,left:0,width:0,height:0,borderLeft:`${Ke}px solid transparent`,borderRight:`${Ke}px solid transparent`,borderTop:`${p}px solid ${a}`,transition:"border-top-color 0.1s"}:{position:"absolute",bottom:1,left:0,width:0,height:0,borderLeft:`${Ke}px solid transparent`,borderRight:`${Ke}px solid transparent`,borderBottom:`${p}px solid ${a}`,transition:"border-bottom-color 0.1s"};return jsx("div",{className:"docx-ruler-indent",style:m,onMouseEnter:s,onMouseLeave:i,onMouseDown:c,role:"slider","aria-label":d,"aria-orientation":"horizontal",tabIndex:o?0:-1,children:jsx("div",{style:l})})}function ya({value:e,positionPx:t}){return jsx("div",{style:{position:"absolute",left:formatPx(t),top:-22,transform:"translateX(-50%)",backgroundColor:"#333",color:"#fff",fontSize:"10px",fontFamily:"sans-serif",padding:"2px 6px",borderRadius:3,whiteSpace:"nowrap",pointerEvents:"none",zIndex:20},children:e})}var va={left:"L",center:"C",right:"R",decimal:"D",bar:"|"};function Ca({tabStop:e,positionPx:t,onDoubleClick:o}){return jsx("div",{style:{position:"absolute",left:formatPx(t-5),bottom:0,width:10,height:12,display:"flex",alignItems:"center",justifyContent:"center",fontSize:8,fontWeight:700,color:"#555",cursor:"pointer",userSelect:"none"},onDoubleClick:r=>{r.stopPropagation(),o();},title:`${e.alignment} tab at ${(e.position/1440).toFixed(2)}"`,children:va[e.alignment]||"L"})}function Sa(e,t,o){let r=[];if(o==="inch"){let n=vt/8,s=Math.ceil(e/n);for(let i=0;i<=s;i++){let c=i*n;if(c>e)break;let d=twipsToPixels(c)*t;i%8===0?r.push({position:d,height:10,label:i/8>0?String(i/8):void 0}):i%4===0?r.push({position:d,height:6}):i%2===0?r.push({position:d,height:4}):r.push({position:d,height:2});}}else {let n=Ct/10,s=Math.ceil(e/n);for(let i=0;i<=s;i++){let c=i*n;if(c>e)break;let d=twipsToPixels(c)*t;i%10===0?r.push({position:d,height:10,label:i/10>0?String(i/10):void 0}):i%5===0?r.push({position:d,height:6}):r.push({position:d,height:3});}}return r}function Cc(e,t,o,r){let n=pixelsToTwips(e/r);return t==="left"?Math.max(0,n):Math.max(0,pixelsToTwips(o/r)-n)}function Sc(e,t=1){let o=e?.pageWidth??Qo,r=e?.marginLeft??yt,n=e?.marginRight??yt,s=twipsToPixels(o)*t,i=twipsToPixels(r)*t,c=twipsToPixels(n)*t;return {width:s,leftMargin:i,rightMargin:c,contentWidth:s-i-c}}function wc(e,t){return t==="inch"?(e/vt).toFixed(2)+'"':(e/Ct).toFixed(1)+" cm"}function Tc(e,t){let o=parseFloat(e.replace(/[^\d.]/g,""));return isNaN(o)?null:Math.round(o*(t==="inch"?vt:Ct))}
2
+ export{se as A,fe as B,Ws as C,zo as D,Ze as E,vc as F,Cc as G,Sc as H,wc as I,Tc as J,M as a,V as b,Jt as c,to as e,ro as h,di as i,ui as j,pi as k,mi as l,fi as m,bi as n,Q as o,lo as p,_e as q,ho as r,yo as s,Co as t,So as u,ko as v,Po as w,Io as x,Lo as y,No as z};
@@ -0,0 +1 @@
1
+ 'use strict';require('./chunk-L4MDZW2J.js');var chunkGNIO6SOS_js=require('./chunk-GNIO6SOS.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var fe={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"transparent",display:"flex",alignItems:"flex-start",justifyContent:"flex-end",zIndex:1e4,pointerEvents:"none"},xe={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"},ge={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"},Se={margin:0,fontSize:"14px",fontWeight:600,color:"var(--doc-text)"},be={background:"none",border:"none",fontSize:"18px",cursor:"pointer",color:"var(--doc-text-muted)",padding:"2px 6px",lineHeight:1},me={padding:"16px"},j={display:"flex",alignItems:"center",gap:"8px",marginBottom:"12px"},X={width:"60px",fontSize:"13px",color:"var(--doc-text)",flexShrink:0},I={flex:1,padding:"8px 10px",border:"1px solid var(--doc-border-input)",borderRadius:"3px",fontSize:"13px",boxSizing:"border-box",outline:"none"},$={...I,borderColor:"var(--doc-link)",boxShadow:"0 0 0 2px rgba(5, 99, 193, 0.1)"},he={display:"flex",flexDirection:"column",gap:"6px",marginLeft:"8px"},N={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"},q={...N,backgroundColor:"var(--doc-bg-hover)",color:"var(--doc-text-placeholder)",cursor:"not-allowed"},F={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)"},J={...F,color:"var(--doc-border-input)",cursor:"not-allowed"},ve={display:"flex",gap:"16px",marginTop:"4px",marginLeft:"68px"},k={display:"flex",alignItems:"center",gap:"6px",fontSize:"12px",color:"var(--doc-text-muted)",cursor:"pointer"},Q={width:"14px",height:"14px",cursor:"pointer"},Z={marginLeft:"68px",fontSize:"12px",color:"var(--doc-text-muted)",marginBottom:"8px"},ye={...Z,color:"var(--doc-error)"},Re=({style:g})=>jsxRuntime.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:g,children:jsxRuntime.jsx("polyline",{points:"18 15 12 9 6 15"})}),Te=({style:g})=>jsxRuntime.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:g,children:jsxRuntime.jsx("polyline",{points:"6 9 12 15 18 9"})});function Ce({isOpen:g,onClose:m,onFind:h,onFindNext:P,onFindPrevious:_,onReplace:O,onReplaceAll:D,onHighlightMatches:S,onClearHighlights:i,initialSearchText:y="",replaceMode:R=false,currentResult:T,className:H,style:ee}){let{t:n}=chunkGNIO6SOS_js.b(),[a,w]=react.useState(""),[v,A]=react.useState(""),[C,B]=react.useState(R),[p,te]=react.useState(false),[u,oe]=react.useState(false),[t,f]=react.useState(null),[ne,Y]=react.useState(false),[ae,U]=react.useState(false),E=react.useRef(null),K=react.useRef(null);react.useEffect(()=>{T!==void 0&&f(T);},[T]),react.useEffect(()=>{if(g){if(w(y),A(""),B(R),f(null),setTimeout(()=>{E.current?.focus(),E.current?.select();},100),y){let e=h(y,{matchCase:p,matchWholeWord:u});f(e),e?.matches&&S&&S(e.matches);}}else i&&i();},[g,y,R]);let c=react.useCallback(()=>{if(!a.trim()){f(null),i&&i();return}let e=h(a,{matchCase:p,matchWholeWord:u});f(e),e?.matches&&S?S(e.matches):i&&i();},[a,p,u,h,S,i]);react.useEffect(()=>{g&&a.trim()&&c();},[p,u]);let le=react.useCallback(e=>{w(e.target.value);},[]),re=react.useCallback(e=>{e.key==="Enter"?(e.preventDefault(),e.shiftKey?W():t?M():c()):e.key==="Escape"&&m();},[t,c,m]),ie=react.useCallback(e=>{e.key==="Enter"?(e.preventDefault(),z()):e.key==="Escape"&&m();},[m]),M=react.useCallback(()=>{if(!a.trim()){c();return}if(!t){c();return}if(P()&&t){let s=(t.currentIndex+1)%t.totalCount;f({...t,currentIndex:s});}},[a,t,c,P]),W=react.useCallback(()=>{if(!a.trim()){c();return}if(!t){c();return}if(_()&&t){let s=t.currentIndex===0?t.totalCount-1:t.currentIndex-1;f({...t,currentIndex:s});}},[a,t,c,_]),z=react.useCallback(()=>{if(!t||t.totalCount===0)return;if(O(v)){let s=h(a,{matchCase:p,matchWholeWord:u});f(s),s?.matches&&S&&S(s.matches);}},[t,v,a,p,u,O,h,S]),ce=react.useCallback(()=>{if(!a.trim())return;D(a,v,{matchCase:p,matchWholeWord:u})>0&&(f({matches:[],totalCount:0,currentIndex:-1}),i&&i());},[a,v,p,u,D,i]),se=react.useCallback(()=>{B(e=>{let s=!e;return s&&setTimeout(()=>K.current?.focus(),100),s});},[]),de=react.useCallback(e=>{e.target,e.currentTarget;},[]),pe=react.useCallback(e=>{e.key==="Escape"&&m();},[m]);if(!g)return null;let x=t&&t.totalCount>0,ue=t&&t.totalCount===0&&a.trim();return jsxRuntime.jsx("div",{className:`docx-find-replace-dialog-overlay ${H||""}`,style:{...fe,...ee},onClick:de,onKeyDown:pe,children:jsxRuntime.jsxs("div",{className:"docx-find-replace-dialog","data-testid":"find-replace-dialog",style:xe,role:"dialog","aria-modal":"false","aria-labelledby":"find-replace-dialog-title",children:[jsxRuntime.jsxs("div",{className:"docx-find-replace-dialog-header",style:ge,children:[jsxRuntime.jsx("h2",{id:"find-replace-dialog-title",style:Se,children:n(C?"dialogs.findReplace.titleFindReplace":"dialogs.findReplace.titleFind")}),jsxRuntime.jsx("button",{type:"button",className:"docx-find-replace-dialog-close",style:be,onClick:m,"aria-label":n("common.closeDialog"),children:"\xD7"})]}),jsxRuntime.jsxs("div",{className:"docx-find-replace-dialog-body",style:me,children:[jsxRuntime.jsxs("div",{className:"docx-find-replace-dialog-row",style:j,children:[jsxRuntime.jsx("label",{htmlFor:"find-text",style:X,children:n("dialogs.findReplace.findLabel")}),jsxRuntime.jsx("input",{ref:E,id:"find-text",type:"text",className:"docx-find-replace-dialog-input",style:ne?$:I,value:a,onChange:le,onKeyDown:re,onFocus:()=>Y(true),onBlur:()=>{Y(false),a.trim()&&!t&&c();},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:x?F:J,onClick:W,disabled:!x,"aria-label":n("dialogs.findReplace.findPrevious"),title:n("dialogs.findReplace.findPreviousTitle"),children:jsxRuntime.jsx(Re,{})}),jsxRuntime.jsx("button",{type:"button",className:"docx-find-replace-dialog-nav",style:x?F:J,onClick:M,disabled:!x,"aria-label":n("dialogs.findReplace.findNext"),title:n("dialogs.findReplace.findNextTitle"),children:jsxRuntime.jsx(Te,{})})]})]}),x&&jsxRuntime.jsx("div",{className:"docx-find-replace-dialog-status",style:Z,children:n("dialogs.findReplace.matchCount",{current:t.currentIndex+1,total:t.totalCount})}),ue&&jsxRuntime.jsx("div",{className:"docx-find-replace-dialog-status",style:ye,children:n("dialogs.findReplace.noResults")}),C&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs("div",{className:"docx-find-replace-dialog-row",style:j,children:[jsxRuntime.jsx("label",{htmlFor:"replace-text",style:X,children:n("dialogs.findReplace.replaceLabel")}),jsxRuntime.jsx("input",{ref:K,id:"replace-text",type:"text",className:"docx-find-replace-dialog-input",style:ae?$:I,value:v,onChange:e=>A(e.target.value),onKeyDown:ie,onFocus:()=>U(true),onBlur:()=>U(false),placeholder:n("dialogs.findReplace.replacePlaceholder"),"aria-label":n("dialogs.findReplace.replaceAriaLabel")}),jsxRuntime.jsxs("div",{style:he,children:[jsxRuntime.jsx("button",{type:"button",className:"docx-find-replace-dialog-button",style:x?N:q,onClick:z,disabled:!x,title:n("dialogs.findReplace.replaceCurrentTitle"),children:n("dialogs.findReplace.replaceButton")}),jsxRuntime.jsx("button",{type:"button",className:"docx-find-replace-dialog-button",style:x?N:q,onClick:ce,disabled:!x,title:n("dialogs.findReplace.replaceAllTitle"),children:n("dialogs.findReplace.replaceAllButton")})]})]})}),jsxRuntime.jsxs("div",{className:"docx-find-replace-dialog-options",style:ve,children:[jsxRuntime.jsxs("label",{className:"docx-find-replace-dialog-option",style:k,children:[jsxRuntime.jsx("input",{type:"checkbox",style:Q,checked:p,onChange:e=>te(e.target.checked)}),n("dialogs.findReplace.matchCase")]}),jsxRuntime.jsxs("label",{className:"docx-find-replace-dialog-option",style:k,children:[jsxRuntime.jsx("input",{type:"checkbox",style:Q,checked:u,onChange:e=>oe(e.target.checked)}),n("dialogs.findReplace.wholeWords")]}),!C&&jsxRuntime.jsx("button",{type:"button",style:{...k,background:"none",border:"none",cursor:"pointer",color:"var(--doc-link)",padding:0},onClick:se,children:n("dialogs.findReplace.toggleReplace")})]})]})]})})}var Fe=Ce;exports.a=Ce;exports.b=Fe;
@@ -0,0 +1,2 @@
1
+ import {b as b$1}from'./chunk-ZFZJRL2R.mjs';import Kt,{useRef,useState,useEffect,useCallback}from'react';import {computeSplitDialogDefaults,redistributeColumnWidths,computeSplitLayout,buildAnchorMaps}from'@eigenpal/docx-editor-core/utils';import {jsx,jsxs,Fragment}from'react/jsx-runtime';function ve({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();},s=()=>n();return document.addEventListener("mousedown",c),document.addEventListener("keydown",i),window.addEventListener("scroll",s,true),()=>{document.removeEventListener("mousedown",c),document.removeEventListener("keydown",i),window.removeEventListener("scroll",s,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 $(t,n){let l=t.rows.length,r=R(t),v=!!(n.selectedCells&&(n.selectedCells.startRow!==n.selectedCells.endRow||n.selectedCells.startCol!==n.selectedCells.endCol)),a=!!y(t,n.rowIndex,n.columnIndex)&&!v;return {table:t,selection:n,hasMultiCellSelection:v,canSplitCell:a,rowCount:l,columnCount:r}}function R(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 y(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 D(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 E(){return {type:"tableCell",content:[{type:"paragraph",content:[],formatting:{}}],formatting:{}}}function j(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 W(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=j(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 K(t,n){let l={...t.formatting??{}};return n>1?l.gridSpan=n:delete l.gridSpan,l.vMerge="continue",l}function G(t,n,l){let{anchors:r}=W(t),v=r.find(h=>n>=h.row&&n<h.row+h.rowspan&&l>=h.col&&l<h.col+h.colspan);return v?computeSplitDialogDefaults(v.rowspan,v.colspan):null}function Q(t,n,l,r,v){if(r<1||v<1)return t;let{anchors:h,totalCols:a}=W(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=redistributeColumnWidths(u,p.col,p.colspan,v),i=computeSplitLayout(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:s,byCoveredSlot:Z}=buildAnchorMaps(i.anchors),f=p.row+p.rowspan,q=a+i.deltaCols,C=[];for(let d=0;d<i.newRowCount;d++){let M=d<f?t.rows[d]:d<p.row+r?t.rows[f-1]:t.rows[d-i.deltaRows],P=[];for(let H=0;H<q;){let S=s.get(`${d}-${H}`);if(S){P.push({...S.data,formatting:_(S.data,S.colspan,S.rowspan)}),H+=S.colspan;continue}let x=Z.get(`${d}-${H}`);if(!x){H+=1;continue}P.push({...x.data,content:[],formatting:K(x.data,x.colspan)}),H+=x.colspan;}C.push({type:"tableRow",formatting:M?.formatting?{...M.formatting}:void 0,cells:P});}return {...t,rows:C,columnWidths:c}}function Y(t,n,l="after"){let r=[...t.rows],v=l==="before"?n:n+1,h=t.rows[n]||t.rows[0],a=R(t),p=D(h,a);return r.splice(v,0,p),{...t,rows:r}}function J(t,n){if(t.rows.length<=1)return t;let l=t.rows.filter((r,v)=>v!==n);return {...t,rows:l}}function X(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,E()),{...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 t0(t,n){if(R(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 e0(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 s=[],Z=0;for(let f of c.cells){let q=f.formatting?.gridSpan??1,C=Z+q-1;Z<=h&&C>=r?i===l&&Z===r?s.push({...f,formatting:{...f.formatting,gridSpan:p,vMerge:a>1?"restart":void 0}}):i>l&&Z===r&&s.push({...f,formatting:{...f.formatting,gridSpan:p,vMerge:"continue"}}):s.push(f),Z+=q;}return {...c,cells:s}});return {...t,rows:u}}function o0(t,n,l){let r=y(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 s of p.cells){let Z=s.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?s.content:[{type:"paragraph",content:[],formatting:{}}],formatting:{...s.formatting,gridSpan:void 0,vMerge:void 0}});else h&&u===n?c.push({...s,formatting:{...s.formatting,vMerge:void 0}}):s.formatting?.vMerge==="continue"?c.push({type:"tableCell",content:[{type:"paragraph",content:[],formatting:{}}],formatting:{...s.formatting,vMerge:void 0}}):c.push(s);else c.push(s);i+=Z;}return {...p,cells:c}});return {...t,rows:a}}function o({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 n0(t){return jsx(o,{...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 r0(t){return jsx(o,{...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 l0(t){return jsx(o,{...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 v0(t){return jsx(o,{...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 c0(t){return jsx(o,{...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 h0(t){return jsx(o,{...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 a0(t){return jsx(o,{...t,children:jsx("path",{d:"M200-200v-100h160l120-360H320v-100h400v100H580L460-300h140v100H200Z"})})}function i0(t){return jsx(o,{...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 p0(t){return jsx(o,{...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 m0(t){return jsx(o,{...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 s0(t){return jsx(o,{...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 u0(t){return jsx(o,{...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 d0(t){return jsx(o,{...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 Z0(t){return jsx(o,{...t,children:jsx("path",{d:"M120-120v-80h720v80H120Zm0-160v-80h480v80H120Zm0-160v-80h720v80H120Zm0-160v-80h480v80H120Zm0-160v-80h720v80H120Z"})})}function f0(t){return jsx(o,{...t,children:jsx("path",{d:"M120-120v-80h720v80H120Zm160-160v-80h400v80H280ZM120-440v-80h720v80H120Zm160-160v-80h400v80H280ZM120-760v-80h720v80H120Z"})})}function g0(t){return jsx(o,{...t,children:jsx("path",{d:"M120-760v-80h720v80H120Zm240 160v-80h480v80H360ZM120-440v-80h720v80H120Zm240 160v-80h480v80H360ZM120-120v-80h720v80H120Z"})})}function T0(t){return jsx(o,{...t,children:jsx("path",{d:"M120-120v-80h720v80H120Zm0-160v-80h720v80H120Zm0-160v-80h720v80H120Zm0-160v-80h720v80H120Zm0-160v-80h720v80H120Z"})})}function I0(t){return jsx(o,{...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 b0(t){return jsx(o,{...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 q0(t){return jsx(o,{...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 C0(t){return jsx(o,{...t,children:jsx("path",{d:"M120-120v-80h720v80H120Zm320-160v-80h400v80H440Zm0-160v-80h400v80H440Zm0-160v-80h400v80H440ZM120-760v-80h720v80H120Zm0 440v-320l160 160-160 160Z"})})}function H0(t){return jsx(o,{...t,children:jsx("path",{d:"M120-120v-80h720v80H120Zm320-160v-80h400v80H440Zm0-160v-80h400v80H440Zm0-160v-80h400v80H440ZM120-760v-80h720v80H120Zm160 440L120-480l160-160v320Z"})})}function S0(t){return jsx(o,{...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 w0(t){return jsx(o,{...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 x0(t){return jsx(o,{...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 M0(t){return jsx(o,{...t,children:jsx("path",{d:"M480-360 280-560h400L480-360Z"})})}function R0(t){return jsx(o,{...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 P0(t){return jsx(o,{...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 _0(t){return jsx(o,{...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 y0(t){return jsx(o,{...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 L0(t){return jsx(o,{...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 A0(t){return jsx(o,{...t,children:jsx("path",{d:"M120-120v-720h720v720H120Zm640-80v-240H520v240h240Zm0-560H520v240h240v-240Zm-560 0v240h240v-240H200Zm0 560h240v-240H200v240Z"})})}function k0(t){return jsx(o,{...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 B0(t){return jsx(o,{...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 D0(t){return jsx(o,{...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 E0(t){return jsx(o,{...t,children:jsx("path",{d:"M440-440H200v-80h240v-240h80v240h240v80H520v240h-80v-240Z"})})}function W0(t){return jsx(o,{...t,children:jsx("path",{d:"M200-440v-80h560v80H200Z"})})}function F0(t){return jsx(o,{...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 z0(t){return jsx(o,{...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 N0(t){return jsx(o,{...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 O0(t){return jsx(o,{...t,children:jsx("path",{d:"M440-160v-304L240-664v104h-80v-240h240v80H296l224 224v336h-80Zm154-376-58-58 128-126H560v-80h240v240h-80v-104L594-536Z"})})}function V0(t){return jsx(o,{...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 U0(t){return jsx(o,{...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 $0(t){return jsx(o,{...t,children:jsx("path",{d:"M120-280v-400h400v400H120Zm80-80h240v-240H200v240Zm-80-400v-80h720v80H120Zm480 160v-80h240v80H600Zm0 160v-80h240v80H600Zm0 160v-80h240v80H600ZM120-120v-80h720v80H120Z"})})}function j0(t){return jsx(o,{...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(o,{...t,children:jsx("path",{d:"M160-440v-80h640v80H160Z"})})}function G0(t){return jsx(o,{...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 Q0(t){return jsx(o,{...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 Y0(t){return jsx(o,{...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 J0(t){return jsx(o,{...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 X0(t){return jsx(o,{...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 tt(t){return jsx(o,{...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 et(t){return jsx(o,{...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 ot(t){return jsx(o,{...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 nt(t){return jsx(o,{...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 rt(t){return jsx(o,{...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 lt(t){return jsx(o,{...t,children:jsx("path",{d:"M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z"})})}function vt(t){return jsx(o,{...t,children:jsx("path",{d:"m296-345-56-56 240-240 240 240-56 56-184-184-184 184Z"})})}function ct(t){return jsx(o,{...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 ht(t){return jsx(o,{...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 at(t){return jsx(o,{...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 it(t){return jsx(o,{...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 pt(t){return jsx(o,{...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 mt(t){return jsx(o,{...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 st(t){return jsx(o,{...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 ut(t){return jsx(o,{...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 dt(t){return jsx(o,{...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 Zt(t){return jsx(o,{...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 ft(t){return jsx(o,{...t,children:jsx("path",{d:"M120-120v-720h80v720h-80Zm640 0v-720h80v720h-80ZM280-440v-80h80v80h-80Zm160 0v-80h80v80h-80Zm160 0v-80h80v80h-80Z"})})}function gt(t){return jsx(o,{...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 Tt(t){return jsx(o,{...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 It(t){return jsx(o,{...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 bt(t){return jsx(o,{...t,children:jsx("path",{d:"M160-760v-80h640v80H160Zm280 640v-408L336-424l-56-56 200-200 200 200-56 56-104-104v408h-80Z"})})}function qt(t){return jsx(o,{...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 Ct(t){return jsx(o,{...t,children:jsx("path",{d:"M160-120v-80h640v80H160Zm320-160L280-480l56-56 104 104v-408h80v408l104-104 56 56-200 200Z"})})}function Ht(t){return jsx(o,{...t,children:jsx("path",{d:"M120-160v-40h720v40H120Zm0-120v-80h720v80H120Zm0-160v-120h720v120H120Zm0-200v-160h720v160H120Z"})})}function St(t){return jsx(o,{...t,children:jsx("path",{d:"M480-528 296-344l-56-56 240-240 240 240-56 56-184-184Z"})})}function wt(t){return jsx(o,{...t,children:jsx("path",{d:"M480-344 240-584l56-56 184 184 184-184 56 56-240 240Z"})})}function xt(t){return jsx(o,{...t,children:jsx("path",{d:"M560-240 320-480l240-240 56 56-184 184 184 184-56 56Z"})})}function Mt(t){return jsx(o,{...t,children:jsx("path",{d:"M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z"})})}function Rt(t){return jsx(o,{...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 Pt(t){return jsx(o,{...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 _t(t){return jsx(o,{...t,children:jsx("path",{d:"M313-440l224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z"})})}function yt(t){return jsx(o,{...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 Lt(t){return jsx(o,{...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 At(t){return jsx(o,{...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 kt(t){return jsxs(o,{...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 Bt(t){return jsx(o,{...t,children:jsx("path",{d:"M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"})})}function Dt(t){return jsx(o,{...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 Et(t){return jsx(o,{...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(o,{...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 Ft(t){return jsx(o,{...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 zt(t){return jsx(o,{...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 Nt(t){return jsx(o,{...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 Ot(t){return jsx(o,{...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 Vt(t){return jsx(o,{...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 Ut(t){return jsx(o,{...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 $t={undo:n0,redo:r0,print:l0,file_download:v0,file_upload:c0,format_bold:h0,format_italic:a0,format_underlined:i0,strikethrough_s:p0,superscript:m0,subscript:s0,link:u0,format_clear:d0,format_align_left:Z0,format_align_center:f0,format_align_right:g0,format_align_justify:T0,format_line_spacing:I0,format_list_bulleted:b0,format_list_numbered:q0,format_indent_increase:C0,format_indent_decrease:H0,format_color_text:S0,ink_highlighter:w0,format_color_reset:x0,arrow_drop_down:M0,table:R0,table_chart:P0,grid_on:_0,table_rows:y0,view_column:L0,border_all:A0,border_outer:k0,border_inner:B0,border_clear:D0,add:E0,remove:W0,delete:F0,delete_sweep:z0,call_merge:N0,call_split:O0,drag_indicator:V0,image:U0,format_image_left:$0,format_image_right:j0,horizontal_rule:K0,flip_to_back:G0,flip_to_front:Q0,open_with:Y0,tune:J0,rotate_right:X0,rotate_left:tt,swap_horiz:et,swap_vert:ot,shapes:nt,format_paint:rt,expand_more:lt,expand_less:vt,border_top:ct,border_bottom:ht,border_left:at,border_right:it,border_horizontal:pt,border_vertical:mt,padding:st,text_rotation_none:ut,wrap_text:dt,height:Zt,fit_width:ft,settings:gt,border_color:Tt,format_color_fill:It,vertical_align_top:bt,vertical_align_center:qt,vertical_align_bottom:Ct,line_weight:Ht,keyboard_arrow_up:St,keyboard_arrow_down:wt,keyboard_arrow_left:xt,keyboard_arrow_right:Mt,more_vert:Rt,page_break:Pt,arrow_back:_t,done_all:yt,check_circle:Lt,chat_bubble_outline:At,chat_bubble_check:kt,check:Bt,close:Dt,add_comment:Et,comment:Wt,edit_note:Ft,rate_review:zt,visibility:Nt,format_textdirection_l_to_r:Ot,format_textdirection_r_to_l:Vt,"agent-sparkle":Ut};function g({name:t,size:n=20,className:l="",style:r}){let v=$t[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 b=16;function Gt(){return jsx(g,{name:"table_rows",size:b,style:{transform:"scaleY(-1)"}})}function Qt(){return jsx(g,{name:"table_rows",size:b})}function Yt(){return jsx(g,{name:"view_column",size:b,style:{transform:"scaleX(-1)"}})}function Jt(){return jsx(g,{name:"view_column",size:b})}function Xt(){return jsx(g,{name:"delete_sweep",size:b})}function te(){return jsx(g,{name:"delete_sweep",size:b,style:{transform:"rotate(90deg)"}})}function ee(){return jsx(g,{name:"call_merge",size:b})}function oe(){return jsx(g,{name:"call_split",size:b})}function ne(){return jsx(g,{name:"delete",size:b,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"),s={...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:s,disabled:r,onClick:v,onMouseEnter:()=>c(true),onMouseLeave:()=>c(false),title:Z,"aria-label":n,children:[l,h&&jsx("span",{children:n})]})}function L({children:t,showSeparator:n=true}){return jsxs(Fragment,{children:[jsx("div",{style:T.group,children:t}),n&&jsx("div",{style:T.separator})]})}function Ce({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}=b$1();if(!t)return null;let i=M=>{!l&&n&&t&&n(M,t);},s=t.rowCount>1,Z=t.columnCount>1,f=t.hasMultiCellSelection,q=t.canSplitCell,C={...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:C,role:"toolbar","aria-label":c("table.editingTools"),children:[jsx("span",{style:T.label,children:c("table.label")}),jsxs(L,{children:[jsx(I,{action:"addRowAbove",label:c("table.insertRowAbove"),icon:jsx(Gt,{}),disabled:l,onClick:()=>i("addRowAbove"),showLabel:h,compact:a}),jsx(I,{action:"addRowBelow",label:c("table.insertRowBelow"),icon:jsx(Qt,{}),disabled:l,onClick:()=>i("addRowBelow"),showLabel:h,compact:a}),jsx(I,{action:"deleteRow",label:c("table.deleteRow"),icon:jsx(Xt,{}),disabled:l||!s,onClick:()=>i("deleteRow"),showLabel:h,compact:a})]}),jsxs(L,{children:[jsx(I,{action:"addColumnLeft",label:c("table.insertColumnLeft"),icon:jsx(Yt,{}),disabled:l,onClick:()=>i("addColumnLeft"),showLabel:h,compact:a}),jsx(I,{action:"addColumnRight",label:c("table.insertColumnRight"),icon:jsx(Jt,{}),disabled:l,onClick:()=>i("addColumnRight"),showLabel:h,compact:a}),jsx(I,{action:"deleteColumn",label:c("table.deleteColumn"),icon:jsx(te,{}),disabled:l||!Z,onClick:()=>i("deleteColumn"),showLabel:h,compact:a})]}),jsxs(L,{showSeparator:false,children:[jsx(I,{action:"mergeCells",label:c("table.mergeCells"),icon:jsx(ee,{}),disabled:l||!f,onClick:()=>i("mergeCells"),showLabel:h,compact:a}),jsx(I,{action:"splitCell",label:c("table.splitCell"),icon:jsx(oe,{}),disabled:l||!q,onClick:()=>i("splitCell"),showLabel:h,compact:a}),jsx(I,{action:"deleteTable",label:c("table.deleteTable"),icon:jsx(ne,{}),disabled:l,onClick:()=>i("deleteTable"),showLabel:h,compact:a})]}),u]})}
2
+ export{I0 as a,g as b,ve as c,$ as d,R as e,y as f,G as g,Q as h,Y as i,J as j,X as k,t0 as l,e0 as m,o0 as n,Ce as o};
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkGNIO6SOS_js=require('./chunk-GNIO6SOS.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}=chunkGNIO6SOS_js.b(),[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
+ 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,2 @@
1
+ 'use strict';var chunkGNIO6SOS_js=require('./chunk-GNIO6SOS.js'),Kt=require('react'),utils=require('@eigenpal/docx-editor-core/utils'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Kt__default=/*#__PURE__*/_interopDefault(Kt);function ve({isOpen:t,onClose:n,align:l="left"}){let r=Kt.useRef(null),v=Kt.useRef(null),[h,a]=Kt.useState({top:0,left:0});Kt.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]),Kt.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();},s=()=>n();return document.addEventListener("mousedown",c),document.addEventListener("keydown",i),window.addEventListener("scroll",s,true),()=>{document.removeEventListener("mousedown",c),document.removeEventListener("keydown",i),window.removeEventListener("scroll",s,true);}},[t,n]);let p=Kt.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 $(t,n){let l=t.rows.length,r=R(t),v=!!(n.selectedCells&&(n.selectedCells.startRow!==n.selectedCells.endRow||n.selectedCells.startCol!==n.selectedCells.endCol)),a=!!y(t,n.rowIndex,n.columnIndex)&&!v;return {table:t,selection:n,hasMultiCellSelection:v,canSplitCell:a,rowCount:l,columnCount:r}}function R(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 y(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 D(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 E(){return {type:"tableCell",content:[{type:"paragraph",content:[],formatting:{}}],formatting:{}}}function j(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 W(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=j(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 K(t,n){let l={...t.formatting??{}};return n>1?l.gridSpan=n:delete l.gridSpan,l.vMerge="continue",l}function G(t,n,l){let{anchors:r}=W(t),v=r.find(h=>n>=h.row&&n<h.row+h.rowspan&&l>=h.col&&l<h.col+h.colspan);return v?utils.computeSplitDialogDefaults(v.rowspan,v.colspan):null}function Q(t,n,l,r,v){if(r<1||v<1)return t;let{anchors:h,totalCols:a}=W(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=utils.redistributeColumnWidths(u,p.col,p.colspan,v),i=utils.computeSplitLayout(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:s,byCoveredSlot:Z}=utils.buildAnchorMaps(i.anchors),f=p.row+p.rowspan,q=a+i.deltaCols,C=[];for(let d=0;d<i.newRowCount;d++){let M=d<f?t.rows[d]:d<p.row+r?t.rows[f-1]:t.rows[d-i.deltaRows],P=[];for(let H=0;H<q;){let S=s.get(`${d}-${H}`);if(S){P.push({...S.data,formatting:_(S.data,S.colspan,S.rowspan)}),H+=S.colspan;continue}let x=Z.get(`${d}-${H}`);if(!x){H+=1;continue}P.push({...x.data,content:[],formatting:K(x.data,x.colspan)}),H+=x.colspan;}C.push({type:"tableRow",formatting:M?.formatting?{...M.formatting}:void 0,cells:P});}return {...t,rows:C,columnWidths:c}}function Y(t,n,l="after"){let r=[...t.rows],v=l==="before"?n:n+1,h=t.rows[n]||t.rows[0],a=R(t),p=D(h,a);return r.splice(v,0,p),{...t,rows:r}}function J(t,n){if(t.rows.length<=1)return t;let l=t.rows.filter((r,v)=>v!==n);return {...t,rows:l}}function X(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,E()),{...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 t0(t,n){if(R(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 e0(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 s=[],Z=0;for(let f of c.cells){let q=f.formatting?.gridSpan??1,C=Z+q-1;Z<=h&&C>=r?i===l&&Z===r?s.push({...f,formatting:{...f.formatting,gridSpan:p,vMerge:a>1?"restart":void 0}}):i>l&&Z===r&&s.push({...f,formatting:{...f.formatting,gridSpan:p,vMerge:"continue"}}):s.push(f),Z+=q;}return {...c,cells:s}});return {...t,rows:u}}function o0(t,n,l){let r=y(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 s of p.cells){let Z=s.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?s.content:[{type:"paragraph",content:[],formatting:{}}],formatting:{...s.formatting,gridSpan:void 0,vMerge:void 0}});else h&&u===n?c.push({...s,formatting:{...s.formatting,vMerge:void 0}}):s.formatting?.vMerge==="continue"?c.push({type:"tableCell",content:[{type:"paragraph",content:[],formatting:{}}],formatting:{...s.formatting,vMerge:void 0}}):c.push(s);else c.push(s);i+=Z;}return {...p,cells:c}});return {...t,rows:a}}function o({size:t=20,className:n="",style:l,children:r}){return jsxRuntime.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 n0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 r0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 l0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 v0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 c0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 h0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 a0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.jsx("path",{d:"M200-200v-100h160l120-360H320v-100h400v100H580L460-300h140v100H200Z"})})}function i0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 p0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 m0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 s0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 u0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 d0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.jsx("path",{d:"m528-546-93-93-121-121h486v120H568l-40 94ZM792-56 460-388l-80 188H249l119-280L56-792l56-56 736 736-56 56Z"})})}function Z0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.jsx("path",{d:"M120-120v-80h720v80H120Zm0-160v-80h480v80H120Zm0-160v-80h720v80H120Zm0-160v-80h480v80H120Zm0-160v-80h720v80H120Z"})})}function f0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.jsx("path",{d:"M120-120v-80h720v80H120Zm160-160v-80h400v80H280ZM120-440v-80h720v80H120Zm160-160v-80h400v80H280ZM120-760v-80h720v80H120Z"})})}function g0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.jsx("path",{d:"M120-760v-80h720v80H120Zm240 160v-80h480v80H360ZM120-440v-80h720v80H120Zm240 160v-80h480v80H360ZM120-120v-80h720v80H120Z"})})}function T0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.jsx("path",{d:"M120-120v-80h720v80H120Zm0-160v-80h720v80H120Zm0-160v-80h720v80H120Zm0-160v-80h720v80H120Zm0-160v-80h720v80H120Z"})})}function I0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 b0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 q0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 C0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.jsx("path",{d:"M120-120v-80h720v80H120Zm320-160v-80h400v80H440Zm0-160v-80h400v80H440Zm0-160v-80h400v80H440ZM120-760v-80h720v80H120Zm0 440v-320l160 160-160 160Z"})})}function H0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.jsx("path",{d:"M120-120v-80h720v80H120Zm320-160v-80h400v80H440Zm0-160v-80h400v80H440Zm0-160v-80h400v80H440ZM120-760v-80h720v80H120Zm160 440L120-480l160-160v320Z"})})}function S0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.jsx("path",{d:"M80 0v-160h800V0H80Zm140-280 210-560h100l210 560h-96l-50-144H368l-52 144h-96Zm176-224h168l-82-232h-4l-82 232Z"})})}function w0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 x0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 M0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.jsx("path",{d:"M480-360 280-560h400L480-360Z"})})}function R0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 P0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 _0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 y0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 L0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 A0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.jsx("path",{d:"M120-120v-720h720v720H120Zm640-80v-240H520v240h240Zm0-560H520v240h240v-240Zm-560 0v240h240v-240H200Zm0 560h240v-240H200v240Z"})})}function k0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 B0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 D0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 E0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.jsx("path",{d:"M440-440H200v-80h240v-240h80v240h240v80H520v240h-80v-240Z"})})}function W0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.jsx("path",{d:"M200-440v-80h560v80H200Z"})})}function F0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 z0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 N0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 O0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.jsx("path",{d:"M440-160v-304L240-664v104h-80v-240h240v80H296l224 224v336h-80Zm154-376-58-58 128-126H560v-80h240v240h-80v-104L594-536Z"})})}function V0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 U0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 $0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.jsx("path",{d:"M120-280v-400h400v400H120Zm80-80h240v-240H200v240Zm-80-400v-80h720v80H120Zm480 160v-80h240v80H600Zm0 160v-80h240v80H600Zm0 160v-80h240v80H600ZM120-120v-80h720v80H120Z"})})}function j0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.jsx("path",{d:"M440-280v-400h400v400H440Zm80-80h240v-240H520v240ZM120-120v-80h720v80H120Zm0-160v-80h240v80H120Zm0-160v-80h240v80H120Zm0-160v-80h240v80H120Zm0-160v-80h720v80H120Z"})})}function K0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.jsx("path",{d:"M160-440v-80h640v80H160Z"})})}function G0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 Q0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 Y0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 J0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.jsx("path",{d:"M440-120v-240h80v80h320v80H520v80h-80Zm-320-80v-80h240v80H120Zm160-160v-80H120v-80h160v-80h80v240h-80Zm160-80v-80h400v80H440Zm160-160v-240h80v80h160v80H680v80h-80Zm-480-80v-80h400v80H120Z"})})}function X0(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 tt(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 et(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 ot(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 nt(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 rt(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 lt(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.jsx("path",{d:"M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z"})})}function vt(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.jsx("path",{d:"m296-345-56-56 240-240 240 240-56 56-184-184-184 184Z"})})}function ct(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 ht(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 at(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 it(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 pt(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 mt(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 st(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 ut(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 dt(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 Zt(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 ft(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.jsx("path",{d:"M120-120v-720h80v720h-80Zm640 0v-720h80v720h-80ZM280-440v-80h80v80h-80Zm160 0v-80h80v80h-80Zm160 0v-80h80v80h-80Z"})})}function gt(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 Tt(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 It(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 bt(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.jsx("path",{d:"M160-760v-80h640v80H160Zm280 640v-408L336-424l-56-56 200-200 200 200-56 56-104-104v408h-80Z"})})}function qt(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 Ct(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.jsx("path",{d:"M160-120v-80h640v80H160Zm320-160L280-480l56-56 104 104v-408h80v408l104-104 56 56-200 200Z"})})}function Ht(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.jsx("path",{d:"M120-160v-40h720v40H120Zm0-120v-80h720v80H120Zm0-160v-120h720v120H120Zm0-200v-160h720v160H120Z"})})}function St(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.jsx("path",{d:"M480-528 296-344l-56-56 240-240 240 240-56 56-184-184Z"})})}function wt(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.jsx("path",{d:"M480-344 240-584l56-56 184 184 184-184 56 56-240 240Z"})})}function xt(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.jsx("path",{d:"M560-240 320-480l240-240 56 56-184 184 184 184-56 56Z"})})}function Mt(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.jsx("path",{d:"M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z"})})}function Rt(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 Pt(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 _t(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.jsx("path",{d:"M313-440l224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z"})})}function yt(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 Lt(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 At(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 kt(t){return jsxRuntime.jsxs(o,{...t,children:[jsxRuntime.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"}),jsxRuntime.jsx("path",{fill:"#188038",d:"m421-380 227-227-45-45-182 182-92-91-45 45 137 136Z"})]})}function Bt(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.jsx("path",{d:"M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"})})}function Dt(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 Et(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 Ft(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 zt(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 Nt(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 Ot(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 Vt(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 Ut(t){return jsxRuntime.jsx(o,{...t,children:jsxRuntime.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 $t={undo:n0,redo:r0,print:l0,file_download:v0,file_upload:c0,format_bold:h0,format_italic:a0,format_underlined:i0,strikethrough_s:p0,superscript:m0,subscript:s0,link:u0,format_clear:d0,format_align_left:Z0,format_align_center:f0,format_align_right:g0,format_align_justify:T0,format_line_spacing:I0,format_list_bulleted:b0,format_list_numbered:q0,format_indent_increase:C0,format_indent_decrease:H0,format_color_text:S0,ink_highlighter:w0,format_color_reset:x0,arrow_drop_down:M0,table:R0,table_chart:P0,grid_on:_0,table_rows:y0,view_column:L0,border_all:A0,border_outer:k0,border_inner:B0,border_clear:D0,add:E0,remove:W0,delete:F0,delete_sweep:z0,call_merge:N0,call_split:O0,drag_indicator:V0,image:U0,format_image_left:$0,format_image_right:j0,horizontal_rule:K0,flip_to_back:G0,flip_to_front:Q0,open_with:Y0,tune:J0,rotate_right:X0,rotate_left:tt,swap_horiz:et,swap_vert:ot,shapes:nt,format_paint:rt,expand_more:lt,expand_less:vt,border_top:ct,border_bottom:ht,border_left:at,border_right:it,border_horizontal:pt,border_vertical:mt,padding:st,text_rotation_none:ut,wrap_text:dt,height:Zt,fit_width:ft,settings:gt,border_color:Tt,format_color_fill:It,vertical_align_top:bt,vertical_align_center:qt,vertical_align_bottom:Ct,line_weight:Ht,keyboard_arrow_up:St,keyboard_arrow_down:wt,keyboard_arrow_left:xt,keyboard_arrow_right:Mt,more_vert:Rt,page_break:Pt,arrow_back:_t,done_all:yt,check_circle:Lt,chat_bubble_outline:At,chat_bubble_check:kt,check:Bt,close:Dt,add_comment:Et,comment:Wt,edit_note:Ft,rate_review:zt,visibility:Nt,format_textdirection_l_to_r:Ot,format_textdirection_r_to_l:Vt,"agent-sparkle":Ut};function g({name:t,size:n=20,className:l="",style:r}){let v=$t[t];return v?jsxRuntime.jsx(v,{size:n,className:l,style:r}):(console.warn(`Icon not found: ${t}`),jsxRuntime.jsx("span",{className:l,style:{fontSize:n,width:n,height:n,...r},children:t}))}var b=16;function Gt(){return jsxRuntime.jsx(g,{name:"table_rows",size:b,style:{transform:"scaleY(-1)"}})}function Qt(){return jsxRuntime.jsx(g,{name:"table_rows",size:b})}function Yt(){return jsxRuntime.jsx(g,{name:"view_column",size:b,style:{transform:"scaleX(-1)"}})}function Jt(){return jsxRuntime.jsx(g,{name:"view_column",size:b})}function Xt(){return jsxRuntime.jsx(g,{name:"delete_sweep",size:b})}function te(){return jsxRuntime.jsx(g,{name:"delete_sweep",size:b,style:{transform:"rotate(90deg)"}})}function ee(){return jsxRuntime.jsx(g,{name:"call_merge",size:b})}function oe(){return jsxRuntime.jsx(g,{name:"call_split",size:b})}function ne(){return jsxRuntime.jsx(g,{name:"delete",size:b,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__default.default.useState(false),i=typeof t=="string"&&t.startsWith("delete"),s={...T.button,...a?T.buttonCompact:{},...u&&!r?T.buttonHover:{},...r?T.buttonDisabled:{},...i&&!r?T.buttonDelete:{}},Z=p?`${n} (${p})`:n;return jsxRuntime.jsxs("button",{type:"button",className:`docx-table-toolbar-button docx-table-toolbar-${typeof t=="string"?t:t.type}`,style:s,disabled:r,onClick:v,onMouseEnter:()=>c(true),onMouseLeave:()=>c(false),title:Z,"aria-label":n,children:[l,h&&jsxRuntime.jsx("span",{children:n})]})}function L({children:t,showSeparator:n=true}){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{style:T.group,children:t}),n&&jsxRuntime.jsx("div",{style:T.separator})]})}function Ce({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}=chunkGNIO6SOS_js.b();if(!t)return null;let i=M=>{!l&&n&&t&&n(M,t);},s=t.rowCount>1,Z=t.columnCount>1,f=t.hasMultiCellSelection,q=t.canSplitCell,C={...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"),jsxRuntime.jsxs("div",{className:d.join(" "),style:C,role:"toolbar","aria-label":c("table.editingTools"),children:[jsxRuntime.jsx("span",{style:T.label,children:c("table.label")}),jsxRuntime.jsxs(L,{children:[jsxRuntime.jsx(I,{action:"addRowAbove",label:c("table.insertRowAbove"),icon:jsxRuntime.jsx(Gt,{}),disabled:l,onClick:()=>i("addRowAbove"),showLabel:h,compact:a}),jsxRuntime.jsx(I,{action:"addRowBelow",label:c("table.insertRowBelow"),icon:jsxRuntime.jsx(Qt,{}),disabled:l,onClick:()=>i("addRowBelow"),showLabel:h,compact:a}),jsxRuntime.jsx(I,{action:"deleteRow",label:c("table.deleteRow"),icon:jsxRuntime.jsx(Xt,{}),disabled:l||!s,onClick:()=>i("deleteRow"),showLabel:h,compact:a})]}),jsxRuntime.jsxs(L,{children:[jsxRuntime.jsx(I,{action:"addColumnLeft",label:c("table.insertColumnLeft"),icon:jsxRuntime.jsx(Yt,{}),disabled:l,onClick:()=>i("addColumnLeft"),showLabel:h,compact:a}),jsxRuntime.jsx(I,{action:"addColumnRight",label:c("table.insertColumnRight"),icon:jsxRuntime.jsx(Jt,{}),disabled:l,onClick:()=>i("addColumnRight"),showLabel:h,compact:a}),jsxRuntime.jsx(I,{action:"deleteColumn",label:c("table.deleteColumn"),icon:jsxRuntime.jsx(te,{}),disabled:l||!Z,onClick:()=>i("deleteColumn"),showLabel:h,compact:a})]}),jsxRuntime.jsxs(L,{showSeparator:false,children:[jsxRuntime.jsx(I,{action:"mergeCells",label:c("table.mergeCells"),icon:jsxRuntime.jsx(ee,{}),disabled:l||!f,onClick:()=>i("mergeCells"),showLabel:h,compact:a}),jsxRuntime.jsx(I,{action:"splitCell",label:c("table.splitCell"),icon:jsxRuntime.jsx(oe,{}),disabled:l||!q,onClick:()=>i("splitCell"),showLabel:h,compact:a}),jsxRuntime.jsx(I,{action:"deleteTable",label:c("table.deleteTable"),icon:jsxRuntime.jsx(ne,{}),disabled:l,onClick:()=>i("deleteTable"),showLabel:h,compact:a})]}),u]})}
2
+ exports.a=I0;exports.b=g;exports.c=ve;exports.d=$;exports.e=R;exports.f=y;exports.g=G;exports.h=Q;exports.i=Y;exports.j=J;exports.k=X;exports.l=t0;exports.m=e0;exports.n=o0;exports.o=Ce;