@sqren/docx-editor-react 1.7.0-fork.0 → 1.7.0-fork.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/KeyboardShortcutsDialog-B-h3NAat.d.mts +3 -3
- package/dist/KeyboardShortcutsDialog-B-h3NAat.d.ts +3 -3
- package/dist/WatermarkDialog-KRL7WMIS.mjs +1 -1
- package/dist/WatermarkDialog-XGLAH3TK.js +1 -1
- package/dist/chunk-4Y4JFAPY.mjs +1 -1
- package/dist/chunk-74OM4KEH.js +1 -1
- package/dist/chunk-7VWJSV3T.js +1 -1
- package/dist/chunk-BABMU5KA.mjs +1 -1
- package/dist/chunk-BZO4G5M6.js +1 -1
- package/dist/chunk-GNIO6SOS.js +1 -1
- package/dist/chunk-IVFYCMAM.mjs +1 -1
- package/dist/chunk-L4MDZW2J.js +1 -1
- package/dist/chunk-LNONBJQM.js +1 -1
- package/dist/chunk-OHNO4NRQ.mjs +1 -1
- package/dist/chunk-P5ZOUQIK.mjs +1 -1
- package/dist/chunk-P6METJHI.mjs +1 -1
- package/dist/chunk-WFGAQC2B.mjs +1 -1
- package/dist/chunk-WNWY6WX7.js +1 -1
- package/dist/chunk-YY52FSUR.js +1 -1
- package/dist/chunk-ZFZJRL2R.mjs +1 -1
- package/dist/dialogs.d.mts +7 -7
- package/dist/dialogs.d.ts +7 -7
- package/dist/hooks.d.mts +9 -9
- package/dist/hooks.d.ts +9 -9
- package/dist/hooks.js +1 -1
- package/dist/hooks.mjs +1 -1
- package/dist/index.d.mts +27 -27
- package/dist/index.d.ts +27 -27
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/plugin-api.d.mts +8 -8
- package/dist/plugin-api.d.ts +8 -8
- package/dist/plugin-api.js +1 -1
- package/dist/plugin-api.mjs +1 -1
- package/dist/styles.d.mts +2 -2
- package/dist/styles.d.ts +2 -2
- package/dist/types-D35gNE-_.d.mts +1 -1
- package/dist/types-D35gNE-_.d.ts +1 -1
- package/dist/ui.d.mts +12 -12
- package/dist/ui.d.ts +12 -12
- package/dist/ui.js +1 -1
- package/dist/ui.mjs +1 -1
- package/dist/useFindReplace-Bc2ubEeV.d.mts +2 -2
- package/dist/useFindReplace-Bc2ubEeV.d.ts +2 -2
- package/package.json +4 -4
package/dist/chunk-WNWY6WX7.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var chunkGNIO6SOS_js=require('./chunk-GNIO6SOS.js'),Gt=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 Gt__default=/*#__PURE__*/_interopDefault(Gt);function ce({isOpen:t,onClose:n,align:l="left"}){let r=Gt.useRef(null),v=Gt.useRef(null),[h,a]=Gt.useState({top:0,left:0});Gt.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]),Gt.useEffect(()=>{if(!t)return;let c=d=>{let f=d.target;r.current&&!r.current.contains(f)&&v.current&&!v.current.contains(f)&&n();},i=d=>{d.key==="Escape"&&n();},m=d=>{let f=d.target;f&&v.current&&v.current.contains(f)||n();};return document.addEventListener("mousedown",c),document.addEventListener("keydown",i),window.addEventListener("scroll",m,true),()=>{document.removeEventListener("mousedown",c),document.removeEventListener("keydown",i),window.removeEventListener("scroll",m,true);}},[t,n]);let p=Gt.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 E(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 D(){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(Z=>n>=Z.row&&n<Z.row+Z.rowspan&&l>=Z.col&&l<Z.col+Z.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,Z=>Z?{...p.data,formatting:_(p.data,1,1)}:{type:"tableCell",content:[{type:"paragraph",content:[],formatting:{}}],formatting:_(p.data,1,1)}),{byStart:m,byCoveredSlot:d}=utils.buildAnchorMaps(i.anchors),f=p.row+p.rowspan,q=a+i.deltaCols,C=[];for(let Z=0;Z<i.newRowCount;Z++){let M=Z<f?t.rows[Z]:Z<p.row+r?t.rows[f-1]:t.rows[Z-i.deltaRows],P=[];for(let H=0;H<q;){let S=m.get(`${Z}-${H}`);if(S){P.push({...S.data,formatting:_(S.data,S.colspan,S.rowspan)}),H+=S.colspan;continue}let x=d.get(`${Z}-${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=E(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 d=a.cells[i].formatting?.gridSpan??1;if(r<=u+d){c=l==="before"?i:i+1;break}u+=d,c=i+1;}return p.splice(c,0,D()),{...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 m=[],d=0;for(let f of c.cells){let q=f.formatting?.gridSpan??1,C=d+q-1;d<=h&&C>=r?i===l&&d===r?m.push({...f,formatting:{...f.formatting,gridSpan:p,vMerge:a>1?"restart":void 0}}):i>l&&d===r&&m.push({...f,formatting:{...f.formatting,gridSpan:p,vMerge:"continue"}}):m.push(f),d+=q;}return {...c,cells:m}});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 m of p.cells){let d=m.formatting?.gridSpan??1;if(i===l||i<=l&&l<i+d)if(v>1)for(let f=0;f<v;f++)c.push({type:"tableCell",content:f===0?m.content:[{type:"paragraph",content:[],formatting:{}}],formatting:{...m.formatting,gridSpan:void 0,vMerge:void 0}});else h&&u===n?c.push({...m,formatting:{...m.formatting,vMerge:void 0}}):m.formatting?.vMerge==="continue"?c.push({type:"tableCell",content:[{type:"paragraph",content:[],formatting:{}}],formatting:{...m.formatting,vMerge:void 0}}):c.push(m);else c.push(m);i+=d;}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 s0(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 m0(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 E0(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 D0(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 st(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 mt(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:"M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm0-80h640v-480H160v480Zm320-60q66 0 113-37t47-93q0-29-13-58t-34-55q-21-26-50-49t-50-31q-21 8-50 31t-50 49q-21 26-34 55t-13 58q0 56 47 93t140 37Z"})})}function yt(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 Lt(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 At(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 kt(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 Bt(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:"var(--doc-success)",d:"m421-380 227-227-45-45-182 182-92-91-45 45 137 136Z"})]})}function Et(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 Wt(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 Ft(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 zt(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 Nt(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 Ot(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 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-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 Ut(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 $t(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 jt={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:s0,subscript:m0,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:E0,add:D0,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:st,padding:mt,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,branding_watermark:_t,arrow_back:yt,done_all:Lt,check_circle:At,chat_bubble_outline:kt,chat_bubble_check:Bt,check:Et,close:Dt,add_comment:Wt,comment:Ft,edit_note:zt,rate_review:Nt,visibility:Ot,format_textdirection_l_to_r:Vt,format_textdirection_r_to_l:Ut,"agent-sparkle":$t};function g({name:t,size:n=20,className:l="",style:r}){let v=jt[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 Qt(){return jsxRuntime.jsx(g,{name:"table_rows",size:b,style:{transform:"scaleY(-1)"}})}function Yt(){return jsxRuntime.jsx(g,{name:"table_rows",size:b})}function Jt(){return jsxRuntime.jsx(g,{name:"view_column",size:b,style:{transform:"scaleX(-1)"}})}function Xt(){return jsxRuntime.jsx(g,{name:"view_column",size:b})}function te(){return jsxRuntime.jsx(g,{name:"delete_sweep",size:b})}function ee(){return jsxRuntime.jsx(g,{name:"delete_sweep",size:b,style:{transform:"rotate(90deg)"}})}function oe(){return jsxRuntime.jsx(g,{name:"call_merge",size:b})}function ne(){return jsxRuntime.jsx(g,{name:"call_split",size:b})}function re(){return jsxRuntime.jsx(g,{name:"delete",size:b,className:"text-destructive"})}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 var(--doc-shadow)"},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]=Gt__default.default.useState(false),i=typeof t=="string"&&t.startsWith("delete"),m={...T.button,...a?T.buttonCompact:{},...u&&!r?T.buttonHover:{},...r?T.buttonDisabled:{},...i&&!r?T.buttonDelete:{}},d=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:m,disabled:r,onClick:v,onMouseEnter:()=>c(true),onMouseLeave:()=>c(false),title:d,"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 He({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);},m=t.rowCount>1,d=t.columnCount>1,f=t.hasMultiCellSelection,q=t.canSplitCell,C={...T.container,...a?T.containerCompact:{},...p==="floating"?T.containerFloating:{},...v},Z=["docx-table-toolbar"];return r&&Z.push(r),a&&Z.push("docx-table-toolbar-compact"),p==="floating"&&Z.push("docx-table-toolbar-floating"),jsxRuntime.jsxs("div",{className:Z.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(Qt,{}),disabled:l,onClick:()=>i("addRowAbove"),showLabel:h,compact:a}),jsxRuntime.jsx(I,{action:"addRowBelow",label:c("table.insertRowBelow"),icon:jsxRuntime.jsx(Yt,{}),disabled:l,onClick:()=>i("addRowBelow"),showLabel:h,compact:a}),jsxRuntime.jsx(I,{action:"deleteRow",label:c("table.deleteRow"),icon:jsxRuntime.jsx(te,{}),disabled:l||!m,onClick:()=>i("deleteRow"),showLabel:h,compact:a})]}),jsxRuntime.jsxs(L,{children:[jsxRuntime.jsx(I,{action:"addColumnLeft",label:c("table.insertColumnLeft"),icon:jsxRuntime.jsx(Jt,{}),disabled:l,onClick:()=>i("addColumnLeft"),showLabel:h,compact:a}),jsxRuntime.jsx(I,{action:"addColumnRight",label:c("table.insertColumnRight"),icon:jsxRuntime.jsx(Xt,{}),disabled:l,onClick:()=>i("addColumnRight"),showLabel:h,compact:a}),jsxRuntime.jsx(I,{action:"deleteColumn",label:c("table.deleteColumn"),icon:jsxRuntime.jsx(ee,{}),disabled:l||!d,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(oe,{}),disabled:l||!f,onClick:()=>i("mergeCells"),showLabel:h,compact:a}),jsxRuntime.jsx(I,{action:"splitCell",label:c("table.splitCell"),icon:jsxRuntime.jsx(ne,{}),disabled:l||!q,onClick:()=>i("splitCell"),showLabel:h,compact:a}),jsxRuntime.jsx(I,{action:"deleteTable",label:c("table.deleteTable"),icon:jsxRuntime.jsx(re,{}),disabled:l,onClick:()=>i("deleteTable"),showLabel:h,compact:a})]}),u]})}
|
|
1
|
+
'use strict';var chunkGNIO6SOS_js=require('./chunk-GNIO6SOS.js'),Gt=require('react'),utils=require('@sqren/docx-editor-core/utils'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Gt__default=/*#__PURE__*/_interopDefault(Gt);function ce({isOpen:t,onClose:n,align:l="left"}){let r=Gt.useRef(null),v=Gt.useRef(null),[h,a]=Gt.useState({top:0,left:0});Gt.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]),Gt.useEffect(()=>{if(!t)return;let c=d=>{let f=d.target;r.current&&!r.current.contains(f)&&v.current&&!v.current.contains(f)&&n();},i=d=>{d.key==="Escape"&&n();},m=d=>{let f=d.target;f&&v.current&&v.current.contains(f)||n();};return document.addEventListener("mousedown",c),document.addEventListener("keydown",i),window.addEventListener("scroll",m,true),()=>{document.removeEventListener("mousedown",c),document.removeEventListener("keydown",i),window.removeEventListener("scroll",m,true);}},[t,n]);let p=Gt.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 E(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 D(){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(Z=>n>=Z.row&&n<Z.row+Z.rowspan&&l>=Z.col&&l<Z.col+Z.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,Z=>Z?{...p.data,formatting:_(p.data,1,1)}:{type:"tableCell",content:[{type:"paragraph",content:[],formatting:{}}],formatting:_(p.data,1,1)}),{byStart:m,byCoveredSlot:d}=utils.buildAnchorMaps(i.anchors),f=p.row+p.rowspan,q=a+i.deltaCols,C=[];for(let Z=0;Z<i.newRowCount;Z++){let M=Z<f?t.rows[Z]:Z<p.row+r?t.rows[f-1]:t.rows[Z-i.deltaRows],P=[];for(let H=0;H<q;){let S=m.get(`${Z}-${H}`);if(S){P.push({...S.data,formatting:_(S.data,S.colspan,S.rowspan)}),H+=S.colspan;continue}let x=d.get(`${Z}-${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=E(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 d=a.cells[i].formatting?.gridSpan??1;if(r<=u+d){c=l==="before"?i:i+1;break}u+=d,c=i+1;}return p.splice(c,0,D()),{...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 m=[],d=0;for(let f of c.cells){let q=f.formatting?.gridSpan??1,C=d+q-1;d<=h&&C>=r?i===l&&d===r?m.push({...f,formatting:{...f.formatting,gridSpan:p,vMerge:a>1?"restart":void 0}}):i>l&&d===r&&m.push({...f,formatting:{...f.formatting,gridSpan:p,vMerge:"continue"}}):m.push(f),d+=q;}return {...c,cells:m}});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 m of p.cells){let d=m.formatting?.gridSpan??1;if(i===l||i<=l&&l<i+d)if(v>1)for(let f=0;f<v;f++)c.push({type:"tableCell",content:f===0?m.content:[{type:"paragraph",content:[],formatting:{}}],formatting:{...m.formatting,gridSpan:void 0,vMerge:void 0}});else h&&u===n?c.push({...m,formatting:{...m.formatting,vMerge:void 0}}):m.formatting?.vMerge==="continue"?c.push({type:"tableCell",content:[{type:"paragraph",content:[],formatting:{}}],formatting:{...m.formatting,vMerge:void 0}}):c.push(m);else c.push(m);i+=d;}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 s0(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 m0(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 E0(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 D0(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 st(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 mt(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:"M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm0-80h640v-480H160v480Zm320-60q66 0 113-37t47-93q0-29-13-58t-34-55q-21-26-50-49t-50-31q-21 8-50 31t-50 49q-21 26-34 55t-13 58q0 56 47 93t140 37Z"})})}function yt(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 Lt(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 At(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 kt(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 Bt(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:"var(--doc-success)",d:"m421-380 227-227-45-45-182 182-92-91-45 45 137 136Z"})]})}function Et(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 Wt(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 Ft(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 zt(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 Nt(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 Ot(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 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-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 Ut(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 $t(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 jt={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:s0,subscript:m0,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:E0,add:D0,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:st,padding:mt,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,branding_watermark:_t,arrow_back:yt,done_all:Lt,check_circle:At,chat_bubble_outline:kt,chat_bubble_check:Bt,check:Et,close:Dt,add_comment:Wt,comment:Ft,edit_note:zt,rate_review:Nt,visibility:Ot,format_textdirection_l_to_r:Vt,format_textdirection_r_to_l:Ut,"agent-sparkle":$t};function g({name:t,size:n=20,className:l="",style:r}){let v=jt[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 Qt(){return jsxRuntime.jsx(g,{name:"table_rows",size:b,style:{transform:"scaleY(-1)"}})}function Yt(){return jsxRuntime.jsx(g,{name:"table_rows",size:b})}function Jt(){return jsxRuntime.jsx(g,{name:"view_column",size:b,style:{transform:"scaleX(-1)"}})}function Xt(){return jsxRuntime.jsx(g,{name:"view_column",size:b})}function te(){return jsxRuntime.jsx(g,{name:"delete_sweep",size:b})}function ee(){return jsxRuntime.jsx(g,{name:"delete_sweep",size:b,style:{transform:"rotate(90deg)"}})}function oe(){return jsxRuntime.jsx(g,{name:"call_merge",size:b})}function ne(){return jsxRuntime.jsx(g,{name:"call_split",size:b})}function re(){return jsxRuntime.jsx(g,{name:"delete",size:b,className:"text-destructive"})}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 var(--doc-shadow)"},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]=Gt__default.default.useState(false),i=typeof t=="string"&&t.startsWith("delete"),m={...T.button,...a?T.buttonCompact:{},...u&&!r?T.buttonHover:{},...r?T.buttonDisabled:{},...i&&!r?T.buttonDelete:{}},d=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:m,disabled:r,onClick:v,onMouseEnter:()=>c(true),onMouseLeave:()=>c(false),title:d,"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 He({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);},m=t.rowCount>1,d=t.columnCount>1,f=t.hasMultiCellSelection,q=t.canSplitCell,C={...T.container,...a?T.containerCompact:{},...p==="floating"?T.containerFloating:{},...v},Z=["docx-table-toolbar"];return r&&Z.push(r),a&&Z.push("docx-table-toolbar-compact"),p==="floating"&&Z.push("docx-table-toolbar-floating"),jsxRuntime.jsxs("div",{className:Z.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(Qt,{}),disabled:l,onClick:()=>i("addRowAbove"),showLabel:h,compact:a}),jsxRuntime.jsx(I,{action:"addRowBelow",label:c("table.insertRowBelow"),icon:jsxRuntime.jsx(Yt,{}),disabled:l,onClick:()=>i("addRowBelow"),showLabel:h,compact:a}),jsxRuntime.jsx(I,{action:"deleteRow",label:c("table.deleteRow"),icon:jsxRuntime.jsx(te,{}),disabled:l||!m,onClick:()=>i("deleteRow"),showLabel:h,compact:a})]}),jsxRuntime.jsxs(L,{children:[jsxRuntime.jsx(I,{action:"addColumnLeft",label:c("table.insertColumnLeft"),icon:jsxRuntime.jsx(Jt,{}),disabled:l,onClick:()=>i("addColumnLeft"),showLabel:h,compact:a}),jsxRuntime.jsx(I,{action:"addColumnRight",label:c("table.insertColumnRight"),icon:jsxRuntime.jsx(Xt,{}),disabled:l,onClick:()=>i("addColumnRight"),showLabel:h,compact:a}),jsxRuntime.jsx(I,{action:"deleteColumn",label:c("table.deleteColumn"),icon:jsxRuntime.jsx(ee,{}),disabled:l||!d,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(oe,{}),disabled:l||!f,onClick:()=>i("mergeCells"),showLabel:h,compact:a}),jsxRuntime.jsx(I,{action:"splitCell",label:c("table.splitCell"),icon:jsxRuntime.jsx(ne,{}),disabled:l||!q,onClick:()=>i("splitCell"),showLabel:h,compact:a}),jsxRuntime.jsx(I,{action:"deleteTable",label:c("table.deleteTable"),icon:jsxRuntime.jsx(re,{}),disabled:l,onClick:()=>i("deleteTable"),showLabel:h,compact:a})]}),u]})}
|
|
2
2
|
exports.a=I0;exports.b=g;exports.c=ce;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=He;
|
package/dist/chunk-YY52FSUR.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var chunkGNIO6SOS_js=require('./chunk-GNIO6SOS.js'),react=require('react'),utils=require('@
|
|
1
|
+
'use strict';var chunkGNIO6SOS_js=require('./chunk-GNIO6SOS.js'),react=require('react'),utils=require('@sqren/docx-editor-core/utils'),jsxRuntime=require('react/jsx-runtime');var E=[{labelKey:"dialogs.pageSetup.pageSizes.letter",width:12240,height:15840},{labelKey:"dialogs.pageSetup.pageSizes.a4",width:11906,height:16838},{labelKey:"dialogs.pageSetup.pageSizes.legal",width:12240,height:20160},{labelKey:"dialogs.pageSetup.pageSizes.a3",width:16838,height:23811},{labelKey:"dialogs.pageSetup.pageSizes.a5",width:8391,height:11906},{labelKey:"dialogs.pageSetup.pageSizes.b5",width:9979,height:14175},{labelKey:"dialogs.pageSetup.pageSizes.executive",width:10440,height:15120}];function f(i){return Math.round(i/utils.TWIPS_PER_INCH*100)/100}function x(i){return Math.round(i*utils.TWIPS_PER_INCH)}function J(i,l){let b=Math.min(i,l),n=Math.max(i,l);return E.findIndex(a=>Math.abs(a.width-b)<20&&Math.abs(a.height-n)<20)}var O={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"var(--doc-overlay)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},Q={backgroundColor:"var(--doc-surface)",borderRadius:8,boxShadow:"0 4px 20px var(--doc-shadow)",minWidth:400,maxWidth:480,width:"100%",margin:20},V={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},X={padding:"16px 20px",display:"flex",flexDirection:"column",gap:14},H={fontSize:12,fontWeight:600,color:"var(--doc-text-muted)",textTransform:"uppercase",letterSpacing:"0.5px"},g={display:"flex",alignItems:"center",gap:12},c={width:80,fontSize:13,color:"var(--doc-text-muted)"},y={flex:1,padding:"6px 8px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:13},N={...y},C={fontSize:11,color:"var(--doc-text-muted)",width:16},Y={padding:"12px 20px 16px",borderTop:"1px solid var(--doc-border)",display:"flex",justifyContent:"flex-end",gap:8},A={padding:"6px 16px",fontSize:13,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"},_=12240,B=15840,r=1440;function oe({isOpen:i,onClose:l,onApply:b,currentProps:n}){let{t:a}=chunkGNIO6SOS_js.b(),[u,m]=react.useState(_),[S,h]=react.useState(B),[p,K]=react.useState("portrait"),[P,M]=react.useState(r),[w,R]=react.useState(r),[z,k]=react.useState(r),[T,D]=react.useState(r);react.useEffect(()=>{if(!i)return;let e=n?.pageWidth||_,s=n?.pageHeight||B,Z=n?.orientation||(e>s?"landscape":"portrait");m(e),h(s),K(Z),M(n?.marginTop??r),R(n?.marginBottom??r),k(n?.marginLeft??r),D(n?.marginRight??r);},[i,n]);let G=react.useCallback(e=>{if(e<0)return;let s=E[e];p==="landscape"?(m(s.height),h(s.width)):(m(s.width),h(s.height));},[p]),U=react.useCallback(e=>{e!==p&&(K(e),m(S),h(u));},[p,u,S]),I=react.useCallback(()=>{b({pageWidth:u,pageHeight:S,orientation:p,marginTop:P,marginBottom:w,marginLeft:z,marginRight:T}),l();},[u,S,p,P,w,z,T,b,l]),j=react.useCallback(e=>{e.key==="Escape"&&l(),e.key==="Enter"&&I();},[l,I]);if(!i)return null;let W=J(u,S);return jsxRuntime.jsx("div",{style:O,onClick:l,onKeyDown:j,children:jsxRuntime.jsxs("div",{style:Q,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),role:"dialog","aria-label":a("dialogs.pageSetup.title"),children:[jsxRuntime.jsx("div",{style:V,children:a("dialogs.pageSetup.title")}),jsxRuntime.jsxs("div",{style:X,children:[jsxRuntime.jsx("div",{style:H,children:a("dialogs.pageSetup.pageSize")}),jsxRuntime.jsxs("div",{style:g,children:[jsxRuntime.jsx("label",{style:c,children:a("dialogs.pageSetup.sizeLabel")}),jsxRuntime.jsxs("select",{style:N,value:W,onChange:e=>G(Number(e.target.value)),children:[E.map((e,s)=>jsxRuntime.jsx("option",{value:s,children:a(e.labelKey)},e.labelKey)),W<0&&jsxRuntime.jsx("option",{value:-1,children:a("dialogs.pageSetup.custom")})]})]}),jsxRuntime.jsxs("div",{style:g,children:[jsxRuntime.jsx("label",{style:c,children:a("dialogs.pageSetup.orientation")}),jsxRuntime.jsxs("select",{style:N,value:p,onChange:e=>U(e.target.value),children:[jsxRuntime.jsx("option",{value:"portrait",children:a("dialogs.pageSetup.portrait")}),jsxRuntime.jsx("option",{value:"landscape",children:a("dialogs.pageSetup.landscape")})]})]}),jsxRuntime.jsx("div",{style:{...H,marginTop:4},children:a("dialogs.pageSetup.margins")}),jsxRuntime.jsxs("div",{style:g,children:[jsxRuntime.jsx("label",{style:c,children:a("dialogs.pageSetup.top")}),jsxRuntime.jsx("input",{type:"number",style:y,min:0,max:10,step:.1,value:f(P),onChange:e=>M(x(Number(e.target.value)||0))}),jsxRuntime.jsx("span",{style:C,children:"in"})]}),jsxRuntime.jsxs("div",{style:g,children:[jsxRuntime.jsx("label",{style:c,children:a("dialogs.pageSetup.bottom")}),jsxRuntime.jsx("input",{type:"number",style:y,min:0,max:10,step:.1,value:f(w),onChange:e=>R(x(Number(e.target.value)||0))}),jsxRuntime.jsx("span",{style:C,children:"in"})]}),jsxRuntime.jsxs("div",{style:g,children:[jsxRuntime.jsx("label",{style:c,children:a("dialogs.pageSetup.left")}),jsxRuntime.jsx("input",{type:"number",style:y,min:0,max:10,step:.1,value:f(z),onChange:e=>k(x(Number(e.target.value)||0))}),jsxRuntime.jsx("span",{style:C,children:"in"})]}),jsxRuntime.jsxs("div",{style:g,children:[jsxRuntime.jsx("label",{style:c,children:a("dialogs.pageSetup.right")}),jsxRuntime.jsx("input",{type:"number",style:y,min:0,max:10,step:.1,value:f(T),onChange:e=>D(x(Number(e.target.value)||0))}),jsxRuntime.jsx("span",{style:C,children:"in"})]})]}),jsxRuntime.jsxs("div",{style:Y,children:[jsxRuntime.jsx("button",{type:"button",style:A,onClick:l,children:a("common.cancel")}),jsxRuntime.jsx("button",{type:"button",style:{...A,backgroundColor:"var(--doc-primary)",color:"var(--doc-on-primary)",borderColor:"var(--doc-primary)"},onClick:I,children:a("common.apply")})]})]})})}exports.a=oe;
|
package/dist/chunk-ZFZJRL2R.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {createContext,useMemo,useContext}from'react';import {en,deepMerge,createT}from'@
|
|
1
|
+
import {createContext,useMemo,useContext}from'react';import {en,deepMerge,createT}from'@sqren/docx-editor-i18n';import {jsx}from'react/jsx-runtime';var s=createContext(en),l=createContext("en");function u({i18n:e,children:o}){let r=typeof e?._lang=="string"?e._lang:"en",d=useMemo(()=>deepMerge(en,e),[e]);return jsx(l.Provider,{value:r,children:jsx(s.Provider,{value:d,children:o})})}function L(){let e=useContext(s),o=useContext(l);return {t:useMemo(()=>createT(e,o),[e,o])}}export{u as a,L as b};
|
package/dist/dialogs.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
2
|
+
* @sqren/docx-editor-react/dialogs
|
|
3
3
|
*
|
|
4
4
|
* Modal dialogs for hyperlinks, find/replace, paste-special, page setup,
|
|
5
5
|
* and keyboard shortcuts. Pair with the hooks under
|
|
6
|
-
* `@
|
|
6
|
+
* `@sqren/docx-editor-react/hooks` when wiring custom UI.
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
9
|
* ```tsx
|
|
10
|
-
* import { HyperlinkDialog, FindReplaceDialog } from '@
|
|
10
|
+
* import { HyperlinkDialog, FindReplaceDialog } from '@sqren/docx-editor-react/dialogs';
|
|
11
11
|
* ```
|
|
12
12
|
*
|
|
13
13
|
* @packageDocumentation
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
*/
|
|
16
16
|
export { B as BookmarkOption, F as FindReplaceDialog, a as FindReplaceDialogProps, H as HyperlinkData, b as HyperlinkDialog, c as HyperlinkDialogProps, K as KeyboardShortcut, d as KeyboardShortcutsDialog, e as KeyboardShortcutsDialogProps, P as PasteOption, f as PasteSpecialDialog, g as PasteSpecialDialogProps, S as ShortcutCategory, U as UseKeyboardShortcutsDialogOptions, h as UseKeyboardShortcutsDialogReturn, i as UsePasteSpecialOptions, j as UsePasteSpecialReturn, x as createBookmarkLinkData, y as createHyperlinkData, z as emailToMailto, A as extractBookmarksForDialog, k as formatShortcutKeys, l as getAllCategories, m as getAllPasteOptions, n as getCategoryLabel, o as getCommonShortcuts, p as getDefaultPasteOption, q as getDefaultShortcuts, C as getDisplayText, r as getPasteOption, s as getShortcutsByCategory, D as getUrlType, E as isBookmarkHyperlinkData, G as isExternalHyperlinkData, t as isPasteSpecialShortcut, I as isValidUrl, J as normalizeUrl, L as phoneToTel, v as useKeyboardShortcutsDialog, w as usePasteSpecial } from './KeyboardShortcutsDialog-B-h3NAat.mjs';
|
|
17
17
|
import React__default from 'react';
|
|
18
|
-
import { SectionProperties } from '@
|
|
19
|
-
export { FindMatch, FindOptions, FindResult, HighlightOptions, createDefaultFindOptions, createSearchPattern, escapeRegexString, findAllMatches, getDefaultHighlightOptions, getMatchCountText, isEmptySearch, replaceAllInContent, replaceFirstInContent } from '@
|
|
20
|
-
import '@
|
|
21
|
-
import '@
|
|
18
|
+
import { SectionProperties } from '@sqren/docx-editor-core/types/document';
|
|
19
|
+
export { FindMatch, FindOptions, FindResult, HighlightOptions, createDefaultFindOptions, createSearchPattern, escapeRegexString, findAllMatches, getDefaultHighlightOptions, getMatchCountText, isEmptySearch, replaceAllInContent, replaceFirstInContent } from '@sqren/docx-editor-core/utils/findReplace';
|
|
20
|
+
import '@sqren/docx-editor-core/utils';
|
|
21
|
+
import '@sqren/docx-editor-i18n';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Page Setup Dialog
|
package/dist/dialogs.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
2
|
+
* @sqren/docx-editor-react/dialogs
|
|
3
3
|
*
|
|
4
4
|
* Modal dialogs for hyperlinks, find/replace, paste-special, page setup,
|
|
5
5
|
* and keyboard shortcuts. Pair with the hooks under
|
|
6
|
-
* `@
|
|
6
|
+
* `@sqren/docx-editor-react/hooks` when wiring custom UI.
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
9
|
* ```tsx
|
|
10
|
-
* import { HyperlinkDialog, FindReplaceDialog } from '@
|
|
10
|
+
* import { HyperlinkDialog, FindReplaceDialog } from '@sqren/docx-editor-react/dialogs';
|
|
11
11
|
* ```
|
|
12
12
|
*
|
|
13
13
|
* @packageDocumentation
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
*/
|
|
16
16
|
export { B as BookmarkOption, F as FindReplaceDialog, a as FindReplaceDialogProps, H as HyperlinkData, b as HyperlinkDialog, c as HyperlinkDialogProps, K as KeyboardShortcut, d as KeyboardShortcutsDialog, e as KeyboardShortcutsDialogProps, P as PasteOption, f as PasteSpecialDialog, g as PasteSpecialDialogProps, S as ShortcutCategory, U as UseKeyboardShortcutsDialogOptions, h as UseKeyboardShortcutsDialogReturn, i as UsePasteSpecialOptions, j as UsePasteSpecialReturn, x as createBookmarkLinkData, y as createHyperlinkData, z as emailToMailto, A as extractBookmarksForDialog, k as formatShortcutKeys, l as getAllCategories, m as getAllPasteOptions, n as getCategoryLabel, o as getCommonShortcuts, p as getDefaultPasteOption, q as getDefaultShortcuts, C as getDisplayText, r as getPasteOption, s as getShortcutsByCategory, D as getUrlType, E as isBookmarkHyperlinkData, G as isExternalHyperlinkData, t as isPasteSpecialShortcut, I as isValidUrl, J as normalizeUrl, L as phoneToTel, v as useKeyboardShortcutsDialog, w as usePasteSpecial } from './KeyboardShortcutsDialog-B-h3NAat.js';
|
|
17
17
|
import React__default from 'react';
|
|
18
|
-
import { SectionProperties } from '@
|
|
19
|
-
export { FindMatch, FindOptions, FindResult, HighlightOptions, createDefaultFindOptions, createSearchPattern, escapeRegexString, findAllMatches, getDefaultHighlightOptions, getMatchCountText, isEmptySearch, replaceAllInContent, replaceFirstInContent } from '@
|
|
20
|
-
import '@
|
|
21
|
-
import '@
|
|
18
|
+
import { SectionProperties } from '@sqren/docx-editor-core/types/document';
|
|
19
|
+
export { FindMatch, FindOptions, FindResult, HighlightOptions, createDefaultFindOptions, createSearchPattern, escapeRegexString, findAllMatches, getDefaultHighlightOptions, getMatchCountText, isEmptySearch, replaceAllInContent, replaceFirstInContent } from '@sqren/docx-editor-core/utils/findReplace';
|
|
20
|
+
import '@sqren/docx-editor-core/utils';
|
|
21
|
+
import '@sqren/docx-editor-i18n';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Page Setup Dialog
|
package/dist/hooks.d.mts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
2
|
+
* @sqren/docx-editor-react/hooks
|
|
3
3
|
*
|
|
4
4
|
* React hooks for editor history, table selection, find/replace, autosave,
|
|
5
5
|
* clipboard, and zoom. Use alongside the main `DocxEditor` component.
|
|
6
6
|
*
|
|
7
7
|
* @example
|
|
8
8
|
* ```tsx
|
|
9
|
-
* import { useAutoSave, useFindReplace } from '@
|
|
9
|
+
* import { useAutoSave, useFindReplace } from '@sqren/docx-editor-react/hooks';
|
|
10
10
|
* ```
|
|
11
11
|
*
|
|
12
12
|
* @packageDocumentation
|
|
13
13
|
* @public
|
|
14
14
|
*/
|
|
15
|
-
import { Table, Document } from '@
|
|
15
|
+
import { Table, Document } from '@sqren/docx-editor-core/types/document';
|
|
16
16
|
import { a as TableContext, c as TableAction, b as TableSplitConfig } from './useFindReplace-Bc2ubEeV.mjs';
|
|
17
17
|
export { F as FindReplaceOptions, d as FindReplaceState, U as UseFindReplaceReturn, u as useFindReplace } from './useFindReplace-Bc2ubEeV.mjs';
|
|
18
18
|
import * as React$1 from 'react';
|
|
19
19
|
import React__default, { CSSProperties, RefObject } from 'react';
|
|
20
|
-
import { HighlightRect, SelectionHighlightConfig, ParsedClipboardContent } from '@
|
|
21
|
-
import { ClipboardSelection, Theme, SavedDocumentData, AutoSaveStatus } from '@
|
|
22
|
-
export { AutoSaveStatus, ClipboardSelection, SavedDocumentData, TABLE_DATA_ATTRIBUTES, createSelectionFromDOM, formatLastSaveTime, formatStorageSize, getAutoSaveStatusLabel, getAutoSaveStorageSize, getSelectionRuns, isAutoSaveSupported } from '@
|
|
20
|
+
import { HighlightRect, SelectionHighlightConfig, ParsedClipboardContent } from '@sqren/docx-editor-core/utils';
|
|
21
|
+
import { ClipboardSelection, Theme, SavedDocumentData, AutoSaveStatus } from '@sqren/docx-editor-core';
|
|
22
|
+
export { AutoSaveStatus, ClipboardSelection, SavedDocumentData, TABLE_DATA_ATTRIBUTES, createSelectionFromDOM, formatLastSaveTime, formatStorageSize, getAutoSaveStatusLabel, getAutoSaveStorageSize, getSelectionRuns, isAutoSaveSupported } from '@sqren/docx-editor-core';
|
|
23
23
|
import { EditorView } from 'prosemirror-view';
|
|
24
24
|
import { EditorState } from 'prosemirror-state';
|
|
25
|
-
import { TrackedChangesResult } from '@
|
|
26
|
-
export { TrackedChangesResult, extractTrackedChanges } from '@
|
|
27
|
-
import '@
|
|
25
|
+
import { TrackedChangesResult } from '@sqren/docx-editor-core/prosemirror/utils/extractTrackedChanges';
|
|
26
|
+
export { TrackedChangesResult, extractTrackedChanges } from '@sqren/docx-editor-core/prosemirror/utils/extractTrackedChanges';
|
|
27
|
+
import '@sqren/docx-editor-core/utils/findReplace';
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* History hook for undo/redo functionality
|
package/dist/hooks.d.ts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
2
|
+
* @sqren/docx-editor-react/hooks
|
|
3
3
|
*
|
|
4
4
|
* React hooks for editor history, table selection, find/replace, autosave,
|
|
5
5
|
* clipboard, and zoom. Use alongside the main `DocxEditor` component.
|
|
6
6
|
*
|
|
7
7
|
* @example
|
|
8
8
|
* ```tsx
|
|
9
|
-
* import { useAutoSave, useFindReplace } from '@
|
|
9
|
+
* import { useAutoSave, useFindReplace } from '@sqren/docx-editor-react/hooks';
|
|
10
10
|
* ```
|
|
11
11
|
*
|
|
12
12
|
* @packageDocumentation
|
|
13
13
|
* @public
|
|
14
14
|
*/
|
|
15
|
-
import { Table, Document } from '@
|
|
15
|
+
import { Table, Document } from '@sqren/docx-editor-core/types/document';
|
|
16
16
|
import { a as TableContext, c as TableAction, b as TableSplitConfig } from './useFindReplace-Bc2ubEeV.js';
|
|
17
17
|
export { F as FindReplaceOptions, d as FindReplaceState, U as UseFindReplaceReturn, u as useFindReplace } from './useFindReplace-Bc2ubEeV.js';
|
|
18
18
|
import * as React$1 from 'react';
|
|
19
19
|
import React__default, { CSSProperties, RefObject } from 'react';
|
|
20
|
-
import { HighlightRect, SelectionHighlightConfig, ParsedClipboardContent } from '@
|
|
21
|
-
import { ClipboardSelection, Theme, SavedDocumentData, AutoSaveStatus } from '@
|
|
22
|
-
export { AutoSaveStatus, ClipboardSelection, SavedDocumentData, TABLE_DATA_ATTRIBUTES, createSelectionFromDOM, formatLastSaveTime, formatStorageSize, getAutoSaveStatusLabel, getAutoSaveStorageSize, getSelectionRuns, isAutoSaveSupported } from '@
|
|
20
|
+
import { HighlightRect, SelectionHighlightConfig, ParsedClipboardContent } from '@sqren/docx-editor-core/utils';
|
|
21
|
+
import { ClipboardSelection, Theme, SavedDocumentData, AutoSaveStatus } from '@sqren/docx-editor-core';
|
|
22
|
+
export { AutoSaveStatus, ClipboardSelection, SavedDocumentData, TABLE_DATA_ATTRIBUTES, createSelectionFromDOM, formatLastSaveTime, formatStorageSize, getAutoSaveStatusLabel, getAutoSaveStorageSize, getSelectionRuns, isAutoSaveSupported } from '@sqren/docx-editor-core';
|
|
23
23
|
import { EditorView } from 'prosemirror-view';
|
|
24
24
|
import { EditorState } from 'prosemirror-state';
|
|
25
|
-
import { TrackedChangesResult } from '@
|
|
26
|
-
export { TrackedChangesResult, extractTrackedChanges } from '@
|
|
27
|
-
import '@
|
|
25
|
+
import { TrackedChangesResult } from '@sqren/docx-editor-core/prosemirror/utils/extractTrackedChanges';
|
|
26
|
+
export { TrackedChangesResult, extractTrackedChanges } from '@sqren/docx-editor-core/prosemirror/utils/extractTrackedChanges';
|
|
27
|
+
import '@sqren/docx-editor-core/utils/findReplace';
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* History hook for undo/redo functionality
|
package/dist/hooks.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var chunkLNONBJQM_js=require('./chunk-LNONBJQM.js'),chunkNIBCC7WQ_js=require('./chunk-NIBCC7WQ.js'),chunkWNWY6WX7_js=require('./chunk-WNWY6WX7.js'),chunkL4MDZW2J_js=require('./chunk-L4MDZW2J.js');require('./chunk-GNIO6SOS.js'),require('./chunk-BJ5RZW6Y.js');var re=require('react'),utils=require('@eigenpal/docx-editor-core/utils'),docxEditorCore=require('@eigenpal/docx-editor-core');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var re__default=/*#__PURE__*/_interopDefault(re);function de(n){let{containerRef:e,enabled:r=true,config:s=utils.DEFAULT_SELECTION_STYLE,useOverlay:u=false,debounceMs:c=16,onSelectionChange:f}=n,[h,p]=re.useState(false),[x,v]=re.useState(""),[a,m]=re.useState([]),[d,y]=re.useState(false),S=re.useRef(null),C=re.useRef(0),o=re.useCallback(()=>{let t=e.current,b=utils.hasActiveSelection(),D=utils.getSelectedText(),A=t?utils.isSelectionWithin(t):false;if(p(b),v(D),y(A),u&&A){let $=utils.getMergedSelectionRects(t);m($);}else m([]);f&&f(b&&A,D);},[e,u,f]),i=re.useCallback(()=>{let t=performance.now();if(t-C.current<c){S.current!==null&&clearTimeout(S.current),S.current=window.setTimeout(()=>{C.current=performance.now(),o(),S.current=null;},c);return}C.current=t,o();},[c,o]),l=re.useCallback(()=>{o();},[o]),R=re.useCallback(t=>({position:"absolute",left:`${t.left}px`,top:`${t.top}px`,width:`${t.width}px`,height:`${t.height}px`,backgroundColor:s.backgroundColor,borderRadius:s.borderRadius?`${s.borderRadius}px`:void 0,border:s.borderColor?`1px solid ${s.borderColor}`:void 0,zIndex:s.zIndex??0,opacity:s.opacity??1,mixBlendMode:s.mixBlendMode,pointerEvents:"none",userSelect:"none"}),[s]);return re.useEffect(()=>(r&&!utils.areSelectionStylesInjected()&&utils.injectSelectionStyles(s),()=>{}),[r,s]),re.useEffect(()=>{if(!r)return;let t=()=>{i();};return document.addEventListener("selectionchange",t),document.addEventListener("mouseup",t),o(),()=>{document.removeEventListener("selectionchange",t),document.removeEventListener("mouseup",t),S.current!==null&&clearTimeout(S.current);}},[r,i,o]),{hasSelection:h,selectedText:x,highlightRects:a,isSelectionInContainer:d,refresh:l,getOverlayStyle:R}}function pe(n,e=utils.DEFAULT_SELECTION_STYLE){return n.map((r,s)=>re__default.default.createElement("div",{key:`selection-overlay-${s}`,style:{position:"absolute",left:`${r.left}px`,top:`${r.top}px`,width:`${r.width}px`,height:`${r.height}px`,backgroundColor:e.backgroundColor,borderRadius:e.borderRadius?`${e.borderRadius}px`:void 0,border:e.borderColor?`1px solid ${e.borderColor}`:void 0,zIndex:e.zIndex??0,opacity:e.opacity??1,mixBlendMode:e.mixBlendMode,pointerEvents:"none",userSelect:"none"}}))}function he(n={}){let{onCopy:e,onCut:r,onPaste:s,cleanWordFormatting:u=true,editable:c=true,onError:f,theme:h}=n,p=re.useRef(false),x=re.useRef(null),v=re.useCallback(async o=>{if(p.current)return false;p.current=true;try{let i=await utils.copyRuns(o.runs,{onError:f,theme:h});return i&&e?.(o),i}finally{p.current=false;}},[e,f,h]),a=re.useCallback(async o=>{if(p.current||!c)return false;p.current=true;try{let i=await utils.copyRuns(o.runs,{onError:f,theme:h});return i&&r?.(o),i}finally{p.current=false;}},[r,c,f,h]),m=re.useCallback(async(o=false)=>{if(p.current||!c)return null;p.current=true;try{if(navigator.clipboard&&navigator.clipboard.read){let i=await navigator.clipboard.read(),l="",R="";for(let b of i)b.types.includes("text/html")&&(l=await(await b.getType("text/html")).text()),b.types.includes("text/plain")&&(R=await(await b.getType("text/plain")).text());o&&(l="");let t=utils.parseClipboardHtml(l,R,u);return x.current=t,s?.(t,o),t}return null}catch(i){return f?.(i),null}finally{p.current=false;}},[c,u,s,f]),d=re.useCallback(o=>{let i=docxEditorCore.createSelectionFromDOM();if(!i)return;o.preventDefault();let l=utils.runsToClipboardContent(i.runs,true,h);o.clipboardData&&(o.clipboardData.setData("text/plain",l.plainText),o.clipboardData.setData("text/html",l.html),l.internal&&o.clipboardData.setData("application/x-docx-editor",l.internal)),e?.(i);},[e,h]),y=re.useCallback(o=>{if(!c)return;let i=docxEditorCore.createSelectionFromDOM();if(!i)return;o.preventDefault();let l=utils.runsToClipboardContent(i.runs,true,h);o.clipboardData&&(o.clipboardData.setData("text/plain",l.plainText),o.clipboardData.setData("text/html",l.html),l.internal&&o.clipboardData.setData("application/x-docx-editor",l.internal)),r?.(i);},[c,r,h]),S=re.useCallback(o=>{if(!c)return;o.preventDefault();let i=utils.handlePasteEvent(o,{cleanWordFormatting:u});if(i){x.current=i;let l=o.shiftKey??false;s?.(i,l);}},[c,u,s]),C=re.useCallback(o=>{},[]);return {copy:v,cut:a,paste:m,handleCopy:d,handleCut:y,handlePaste:S,handleKeyDown:C,isProcessing:p.current,lastPastedContent:x.current}}function Ee(n,e={}){let{storageKey:r,interval:s,enabled:u=true,maxAge:c,onSave:f,onError:h,onRecoveryAvailable:p,saveOnChange:x,debounceDelay:v}=e,a=re.useMemo(()=>new docxEditorCore.AutoSaveManager({storageKey:r,interval:s,maxAge:c,saveOnChange:x,debounceDelay:v,onSave:f,onError:h,onRecoveryAvailable:p}),[r]);re.useEffect(()=>{u?(a.enable(),a.startInterval()):a.disable();},[a,u]),re.useEffect(()=>{a.onDocumentChanged(n??null);},[a,n]),re.useEffect(()=>()=>{a.destroy();},[a]);let m=re.useSyncExternalStore(a.subscribe,a.getSnapshot),d=re.useCallback(()=>a.save(),[a]),y=re.useCallback(()=>a.clear(),[a]),S=re.useCallback(()=>a.getRecoveryData(),[a]),C=re.useCallback(()=>a.acceptRecovery(),[a]),o=re.useCallback(()=>a.dismissRecovery(),[a]),i=re.useCallback(()=>a.enable(),[a]),l=re.useCallback(()=>a.disable(),[a]);return {status:m.status,lastSaveTime:m.lastSaveTime,save:d,clearAutoSave:y,hasRecoveryData:m.hasRecoveryData,getRecoveryData:S,acceptRecovery:C,dismissRecovery:o,isEnabled:m.isEnabled,enable:i,disable:l}}var Pe=1,K=.25,W=4,Ze=.1,g=[.25,.5,.75,1,1.25,1.5,2,3,4];function _(n,e,r){return Math.max(e,Math.min(r,n))}function N(n){return Math.round(n*100)/100}function Ae(n){let e=g[0],r=Math.abs(n-e);for(let s of g){let u=Math.abs(n-s);u<r&&(r=u,e=s);}return e}function Ue(n){for(let e of g)if(e>n+.01)return e;return g[g.length-1]}function Me(n){for(let e=g.length-1;e>=0;e--)if(g[e]<n-.01)return g[e];return g[0]}function He(n={}){let{initialZoom:e=Pe,minZoom:r=K,maxZoom:s=W,zoomStep:u=Ze,enabled:c=true,containerRef:f,onZoomChange:h,enableKeyboardShortcuts:p=true,preventDefault:x=true}=n,[v,a]=re.useState(e),m=re.useRef(v);re.useEffect(()=>{m.current=v;},[v]);let d=re.useCallback(t=>{let b=N(_(t,r,s));b!==m.current&&(a(b),h?.(b));},[r,s,h]),y=re.useCallback(()=>{d(m.current+u);},[u,d]),S=re.useCallback(()=>{d(m.current-u);},[u,d]),C=re.useCallback(()=>{d(e);},[e,d]),o=re.useCallback(()=>{d(1);},[d]),i=re.useCallback((t,b)=>{if(b>0){let D=t/b;d(D);}},[d]),l=re.useCallback(t=>{if(!c||!(t.ctrlKey||t.metaKey))return;x&&t.preventDefault();let D=t.deltaY;D<0?d(m.current+u):D>0&&d(m.current-u);},[c,x,u,d]),R=re.useCallback(t=>{if(!(!c||!p||!(t.ctrlKey||t.metaKey))){if(t.key==="0"){t.preventDefault(),o();return}if(t.key==="+"||t.key==="="){t.preventDefault(),y();return}if(t.key==="-"){t.preventDefault(),S();return}}},[c,p,y,S,o]);return re.useEffect(()=>{if(!c)return;let t=f?.current;if(t)return t.addEventListener("wheel",l,{passive:false}),()=>{t.removeEventListener("wheel",l);}},[c,f,l]),re.useEffect(()=>{if(!(!c||!p))return document.addEventListener("keydown",R),()=>{document.removeEventListener("keydown",R);}},[c,p,R]),{zoom:v,setZoom:d,zoomIn:y,zoomOut:S,resetZoom:C,zoomTo100:o,zoomToFit:i,isMinZoom:v<=r,isMaxZoom:v>=s,zoomPercent:Math.round(v*100),handleWheel:l,handleKeyDown:R}}function we(){return [...g]}function Le(n){return Ae(n)}function ze(n){return Ue(n)}function ke(n){return Me(n)}function Fe(n){return `${Math.round(n*100)}%`}function Ie(n){let e=n.match(/(\d+(\.\d+)?)/);if(e){let r=parseFloat(e[1]);if(!isNaN(r))return r/100}return null}function Ke(n){return g.some(e=>Math.abs(e-n)<.01)}function We(n,e=K,r=W){return N(_(n,e,r))}Object.defineProperty(exports,"HistoryManager",{enumerable:true,get:function(){return chunkLNONBJQM_js.j}});Object.defineProperty(exports,"TABLE_DATA_ATTRIBUTES",{enumerable:true,get:function(){return chunkLNONBJQM_js.f}});Object.defineProperty(exports,"extractTrackedChanges",{enumerable:true,get:function(){return chunkLNONBJQM_js.c}});Object.defineProperty(exports,"useAutoHistory",{enumerable:true,get:function(){return chunkLNONBJQM_js.h}});Object.defineProperty(exports,"useDocumentHistory",{enumerable:true,get:function(){return chunkLNONBJQM_js.i}});Object.defineProperty(exports,"useDragAutoScroll",{enumerable:true,get:function(){return chunkLNONBJQM_js.b}});Object.defineProperty(exports,"useHistory",{enumerable:true,get:function(){return chunkLNONBJQM_js.g}});Object.defineProperty(exports,"useTableSelection",{enumerable:true,get:function(){return chunkLNONBJQM_js.e}});Object.defineProperty(exports,"useTrackedChanges",{enumerable:true,get:function(){return chunkLNONBJQM_js.d}});Object.defineProperty(exports,"useVisualLineNavigation",{enumerable:true,get:function(){return chunkLNONBJQM_js.a}});Object.defineProperty(exports,"useAspectLockedSize",{enumerable:true,get:function(){return chunkNIBCC7WQ_js.a}});Object.defineProperty(exports,"useFixedDropdown",{enumerable:true,get:function(){return chunkWNWY6WX7_js.c}});Object.defineProperty(exports,"useFindReplace",{enumerable:true,get:function(){return chunkL4MDZW2J_js.b}});Object.defineProperty(exports,"createSelectionFromDOM",{enumerable:true,get:function(){return docxEditorCore.createSelectionFromDOM}});Object.defineProperty(exports,"formatLastSaveTime",{enumerable:true,get:function(){return docxEditorCore.formatLastSaveTime}});Object.defineProperty(exports,"formatStorageSize",{enumerable:true,get:function(){return docxEditorCore.formatStorageSize}});Object.defineProperty(exports,"getAutoSaveStatusLabel",{enumerable:true,get:function(){return docxEditorCore.getAutoSaveStatusLabel}});Object.defineProperty(exports,"getAutoSaveStorageSize",{enumerable:true,get:function(){return docxEditorCore.getAutoSaveStorageSize}});Object.defineProperty(exports,"getSelectionRuns",{enumerable:true,get:function(){return docxEditorCore.getSelectionRuns}});Object.defineProperty(exports,"isAutoSaveSupported",{enumerable:true,get:function(){return docxEditorCore.isAutoSaveSupported}});exports.ZOOM_PRESETS=g;exports.clampZoom=We;exports.findNearestZoomPreset=Le;exports.formatZoom=Fe;exports.generateOverlayElements=pe;exports.getNextZoomPreset=ze;exports.getPreviousZoomPreset=ke;exports.getZoomPresets=we;exports.isZoomPreset=Ke;exports.parseZoom=Ie;exports.useAutoSave=Ee;exports.useClipboard=he;exports.useSelectionHighlight=de;exports.useWheelZoom=He;
|
|
1
|
+
'use strict';var chunkLNONBJQM_js=require('./chunk-LNONBJQM.js'),chunkNIBCC7WQ_js=require('./chunk-NIBCC7WQ.js'),chunkWNWY6WX7_js=require('./chunk-WNWY6WX7.js'),chunkL4MDZW2J_js=require('./chunk-L4MDZW2J.js');require('./chunk-GNIO6SOS.js'),require('./chunk-BJ5RZW6Y.js');var re=require('react'),utils=require('@sqren/docx-editor-core/utils'),docxEditorCore=require('@sqren/docx-editor-core');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var re__default=/*#__PURE__*/_interopDefault(re);function de(n){let{containerRef:e,enabled:r=true,config:s=utils.DEFAULT_SELECTION_STYLE,useOverlay:u=false,debounceMs:c=16,onSelectionChange:f}=n,[h,p]=re.useState(false),[x,v]=re.useState(""),[a,m]=re.useState([]),[d,y]=re.useState(false),S=re.useRef(null),C=re.useRef(0),o=re.useCallback(()=>{let t=e.current,b=utils.hasActiveSelection(),D=utils.getSelectedText(),A=t?utils.isSelectionWithin(t):false;if(p(b),v(D),y(A),u&&A){let $=utils.getMergedSelectionRects(t);m($);}else m([]);f&&f(b&&A,D);},[e,u,f]),i=re.useCallback(()=>{let t=performance.now();if(t-C.current<c){S.current!==null&&clearTimeout(S.current),S.current=window.setTimeout(()=>{C.current=performance.now(),o(),S.current=null;},c);return}C.current=t,o();},[c,o]),l=re.useCallback(()=>{o();},[o]),R=re.useCallback(t=>({position:"absolute",left:`${t.left}px`,top:`${t.top}px`,width:`${t.width}px`,height:`${t.height}px`,backgroundColor:s.backgroundColor,borderRadius:s.borderRadius?`${s.borderRadius}px`:void 0,border:s.borderColor?`1px solid ${s.borderColor}`:void 0,zIndex:s.zIndex??0,opacity:s.opacity??1,mixBlendMode:s.mixBlendMode,pointerEvents:"none",userSelect:"none"}),[s]);return re.useEffect(()=>(r&&!utils.areSelectionStylesInjected()&&utils.injectSelectionStyles(s),()=>{}),[r,s]),re.useEffect(()=>{if(!r)return;let t=()=>{i();};return document.addEventListener("selectionchange",t),document.addEventListener("mouseup",t),o(),()=>{document.removeEventListener("selectionchange",t),document.removeEventListener("mouseup",t),S.current!==null&&clearTimeout(S.current);}},[r,i,o]),{hasSelection:h,selectedText:x,highlightRects:a,isSelectionInContainer:d,refresh:l,getOverlayStyle:R}}function pe(n,e=utils.DEFAULT_SELECTION_STYLE){return n.map((r,s)=>re__default.default.createElement("div",{key:`selection-overlay-${s}`,style:{position:"absolute",left:`${r.left}px`,top:`${r.top}px`,width:`${r.width}px`,height:`${r.height}px`,backgroundColor:e.backgroundColor,borderRadius:e.borderRadius?`${e.borderRadius}px`:void 0,border:e.borderColor?`1px solid ${e.borderColor}`:void 0,zIndex:e.zIndex??0,opacity:e.opacity??1,mixBlendMode:e.mixBlendMode,pointerEvents:"none",userSelect:"none"}}))}function he(n={}){let{onCopy:e,onCut:r,onPaste:s,cleanWordFormatting:u=true,editable:c=true,onError:f,theme:h}=n,p=re.useRef(false),x=re.useRef(null),v=re.useCallback(async o=>{if(p.current)return false;p.current=true;try{let i=await utils.copyRuns(o.runs,{onError:f,theme:h});return i&&e?.(o),i}finally{p.current=false;}},[e,f,h]),a=re.useCallback(async o=>{if(p.current||!c)return false;p.current=true;try{let i=await utils.copyRuns(o.runs,{onError:f,theme:h});return i&&r?.(o),i}finally{p.current=false;}},[r,c,f,h]),m=re.useCallback(async(o=false)=>{if(p.current||!c)return null;p.current=true;try{if(navigator.clipboard&&navigator.clipboard.read){let i=await navigator.clipboard.read(),l="",R="";for(let b of i)b.types.includes("text/html")&&(l=await(await b.getType("text/html")).text()),b.types.includes("text/plain")&&(R=await(await b.getType("text/plain")).text());o&&(l="");let t=utils.parseClipboardHtml(l,R,u);return x.current=t,s?.(t,o),t}return null}catch(i){return f?.(i),null}finally{p.current=false;}},[c,u,s,f]),d=re.useCallback(o=>{let i=docxEditorCore.createSelectionFromDOM();if(!i)return;o.preventDefault();let l=utils.runsToClipboardContent(i.runs,true,h);o.clipboardData&&(o.clipboardData.setData("text/plain",l.plainText),o.clipboardData.setData("text/html",l.html),l.internal&&o.clipboardData.setData("application/x-docx-editor",l.internal)),e?.(i);},[e,h]),y=re.useCallback(o=>{if(!c)return;let i=docxEditorCore.createSelectionFromDOM();if(!i)return;o.preventDefault();let l=utils.runsToClipboardContent(i.runs,true,h);o.clipboardData&&(o.clipboardData.setData("text/plain",l.plainText),o.clipboardData.setData("text/html",l.html),l.internal&&o.clipboardData.setData("application/x-docx-editor",l.internal)),r?.(i);},[c,r,h]),S=re.useCallback(o=>{if(!c)return;o.preventDefault();let i=utils.handlePasteEvent(o,{cleanWordFormatting:u});if(i){x.current=i;let l=o.shiftKey??false;s?.(i,l);}},[c,u,s]),C=re.useCallback(o=>{},[]);return {copy:v,cut:a,paste:m,handleCopy:d,handleCut:y,handlePaste:S,handleKeyDown:C,isProcessing:p.current,lastPastedContent:x.current}}function Ee(n,e={}){let{storageKey:r,interval:s,enabled:u=true,maxAge:c,onSave:f,onError:h,onRecoveryAvailable:p,saveOnChange:x,debounceDelay:v}=e,a=re.useMemo(()=>new docxEditorCore.AutoSaveManager({storageKey:r,interval:s,maxAge:c,saveOnChange:x,debounceDelay:v,onSave:f,onError:h,onRecoveryAvailable:p}),[r]);re.useEffect(()=>{u?(a.enable(),a.startInterval()):a.disable();},[a,u]),re.useEffect(()=>{a.onDocumentChanged(n??null);},[a,n]),re.useEffect(()=>()=>{a.destroy();},[a]);let m=re.useSyncExternalStore(a.subscribe,a.getSnapshot),d=re.useCallback(()=>a.save(),[a]),y=re.useCallback(()=>a.clear(),[a]),S=re.useCallback(()=>a.getRecoveryData(),[a]),C=re.useCallback(()=>a.acceptRecovery(),[a]),o=re.useCallback(()=>a.dismissRecovery(),[a]),i=re.useCallback(()=>a.enable(),[a]),l=re.useCallback(()=>a.disable(),[a]);return {status:m.status,lastSaveTime:m.lastSaveTime,save:d,clearAutoSave:y,hasRecoveryData:m.hasRecoveryData,getRecoveryData:S,acceptRecovery:C,dismissRecovery:o,isEnabled:m.isEnabled,enable:i,disable:l}}var Pe=1,K=.25,W=4,Ze=.1,g=[.25,.5,.75,1,1.25,1.5,2,3,4];function _(n,e,r){return Math.max(e,Math.min(r,n))}function N(n){return Math.round(n*100)/100}function Ae(n){let e=g[0],r=Math.abs(n-e);for(let s of g){let u=Math.abs(n-s);u<r&&(r=u,e=s);}return e}function Ue(n){for(let e of g)if(e>n+.01)return e;return g[g.length-1]}function Me(n){for(let e=g.length-1;e>=0;e--)if(g[e]<n-.01)return g[e];return g[0]}function He(n={}){let{initialZoom:e=Pe,minZoom:r=K,maxZoom:s=W,zoomStep:u=Ze,enabled:c=true,containerRef:f,onZoomChange:h,enableKeyboardShortcuts:p=true,preventDefault:x=true}=n,[v,a]=re.useState(e),m=re.useRef(v);re.useEffect(()=>{m.current=v;},[v]);let d=re.useCallback(t=>{let b=N(_(t,r,s));b!==m.current&&(a(b),h?.(b));},[r,s,h]),y=re.useCallback(()=>{d(m.current+u);},[u,d]),S=re.useCallback(()=>{d(m.current-u);},[u,d]),C=re.useCallback(()=>{d(e);},[e,d]),o=re.useCallback(()=>{d(1);},[d]),i=re.useCallback((t,b)=>{if(b>0){let D=t/b;d(D);}},[d]),l=re.useCallback(t=>{if(!c||!(t.ctrlKey||t.metaKey))return;x&&t.preventDefault();let D=t.deltaY;D<0?d(m.current+u):D>0&&d(m.current-u);},[c,x,u,d]),R=re.useCallback(t=>{if(!(!c||!p||!(t.ctrlKey||t.metaKey))){if(t.key==="0"){t.preventDefault(),o();return}if(t.key==="+"||t.key==="="){t.preventDefault(),y();return}if(t.key==="-"){t.preventDefault(),S();return}}},[c,p,y,S,o]);return re.useEffect(()=>{if(!c)return;let t=f?.current;if(t)return t.addEventListener("wheel",l,{passive:false}),()=>{t.removeEventListener("wheel",l);}},[c,f,l]),re.useEffect(()=>{if(!(!c||!p))return document.addEventListener("keydown",R),()=>{document.removeEventListener("keydown",R);}},[c,p,R]),{zoom:v,setZoom:d,zoomIn:y,zoomOut:S,resetZoom:C,zoomTo100:o,zoomToFit:i,isMinZoom:v<=r,isMaxZoom:v>=s,zoomPercent:Math.round(v*100),handleWheel:l,handleKeyDown:R}}function we(){return [...g]}function Le(n){return Ae(n)}function ze(n){return Ue(n)}function ke(n){return Me(n)}function Fe(n){return `${Math.round(n*100)}%`}function Ie(n){let e=n.match(/(\d+(\.\d+)?)/);if(e){let r=parseFloat(e[1]);if(!isNaN(r))return r/100}return null}function Ke(n){return g.some(e=>Math.abs(e-n)<.01)}function We(n,e=K,r=W){return N(_(n,e,r))}Object.defineProperty(exports,"HistoryManager",{enumerable:true,get:function(){return chunkLNONBJQM_js.j}});Object.defineProperty(exports,"TABLE_DATA_ATTRIBUTES",{enumerable:true,get:function(){return chunkLNONBJQM_js.f}});Object.defineProperty(exports,"extractTrackedChanges",{enumerable:true,get:function(){return chunkLNONBJQM_js.c}});Object.defineProperty(exports,"useAutoHistory",{enumerable:true,get:function(){return chunkLNONBJQM_js.h}});Object.defineProperty(exports,"useDocumentHistory",{enumerable:true,get:function(){return chunkLNONBJQM_js.i}});Object.defineProperty(exports,"useDragAutoScroll",{enumerable:true,get:function(){return chunkLNONBJQM_js.b}});Object.defineProperty(exports,"useHistory",{enumerable:true,get:function(){return chunkLNONBJQM_js.g}});Object.defineProperty(exports,"useTableSelection",{enumerable:true,get:function(){return chunkLNONBJQM_js.e}});Object.defineProperty(exports,"useTrackedChanges",{enumerable:true,get:function(){return chunkLNONBJQM_js.d}});Object.defineProperty(exports,"useVisualLineNavigation",{enumerable:true,get:function(){return chunkLNONBJQM_js.a}});Object.defineProperty(exports,"useAspectLockedSize",{enumerable:true,get:function(){return chunkNIBCC7WQ_js.a}});Object.defineProperty(exports,"useFixedDropdown",{enumerable:true,get:function(){return chunkWNWY6WX7_js.c}});Object.defineProperty(exports,"useFindReplace",{enumerable:true,get:function(){return chunkL4MDZW2J_js.b}});Object.defineProperty(exports,"createSelectionFromDOM",{enumerable:true,get:function(){return docxEditorCore.createSelectionFromDOM}});Object.defineProperty(exports,"formatLastSaveTime",{enumerable:true,get:function(){return docxEditorCore.formatLastSaveTime}});Object.defineProperty(exports,"formatStorageSize",{enumerable:true,get:function(){return docxEditorCore.formatStorageSize}});Object.defineProperty(exports,"getAutoSaveStatusLabel",{enumerable:true,get:function(){return docxEditorCore.getAutoSaveStatusLabel}});Object.defineProperty(exports,"getAutoSaveStorageSize",{enumerable:true,get:function(){return docxEditorCore.getAutoSaveStorageSize}});Object.defineProperty(exports,"getSelectionRuns",{enumerable:true,get:function(){return docxEditorCore.getSelectionRuns}});Object.defineProperty(exports,"isAutoSaveSupported",{enumerable:true,get:function(){return docxEditorCore.isAutoSaveSupported}});exports.ZOOM_PRESETS=g;exports.clampZoom=We;exports.findNearestZoomPreset=Le;exports.formatZoom=Fe;exports.generateOverlayElements=pe;exports.getNextZoomPreset=ze;exports.getPreviousZoomPreset=ke;exports.getZoomPresets=we;exports.isZoomPreset=Ke;exports.parseZoom=Ie;exports.useAutoSave=Ee;exports.useClipboard=he;exports.useSelectionHighlight=de;exports.useWheelZoom=He;
|
package/dist/hooks.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{j as HistoryManager,f as TABLE_DATA_ATTRIBUTES,c as extractTrackedChanges,h as useAutoHistory,i as useDocumentHistory,b as useDragAutoScroll,g as useHistory,e as useTableSelection,d as useTrackedChanges,a as useVisualLineNavigation}from'./chunk-WFGAQC2B.mjs';export{a as useAspectLockedSize}from'./chunk-GM2S2WMT.mjs';export{c as useFixedDropdown}from'./chunk-BABMU5KA.mjs';export{b as useFindReplace}from'./chunk-OHNO4NRQ.mjs';import'./chunk-ZFZJRL2R.mjs';import'./chunk-BMBP5UFA.mjs';import re,{useState,useRef,useCallback,useEffect,useMemo,useSyncExternalStore}from'react';import {DEFAULT_SELECTION_STYLE,hasActiveSelection,getSelectedText,isSelectionWithin,getMergedSelectionRects,areSelectionStylesInjected,injectSelectionStyles,copyRuns,parseClipboardHtml,runsToClipboardContent,handlePasteEvent}from'@
|
|
1
|
+
export{j as HistoryManager,f as TABLE_DATA_ATTRIBUTES,c as extractTrackedChanges,h as useAutoHistory,i as useDocumentHistory,b as useDragAutoScroll,g as useHistory,e as useTableSelection,d as useTrackedChanges,a as useVisualLineNavigation}from'./chunk-WFGAQC2B.mjs';export{a as useAspectLockedSize}from'./chunk-GM2S2WMT.mjs';export{c as useFixedDropdown}from'./chunk-BABMU5KA.mjs';export{b as useFindReplace}from'./chunk-OHNO4NRQ.mjs';import'./chunk-ZFZJRL2R.mjs';import'./chunk-BMBP5UFA.mjs';import re,{useState,useRef,useCallback,useEffect,useMemo,useSyncExternalStore}from'react';import {DEFAULT_SELECTION_STYLE,hasActiveSelection,getSelectedText,isSelectionWithin,getMergedSelectionRects,areSelectionStylesInjected,injectSelectionStyles,copyRuns,parseClipboardHtml,runsToClipboardContent,handlePasteEvent}from'@sqren/docx-editor-core/utils';import {createSelectionFromDOM,AutoSaveManager}from'@sqren/docx-editor-core';export{createSelectionFromDOM,formatLastSaveTime,formatStorageSize,getAutoSaveStatusLabel,getAutoSaveStorageSize,getSelectionRuns,isAutoSaveSupported}from'@sqren/docx-editor-core';function de(n){let{containerRef:e,enabled:r=true,config:s=DEFAULT_SELECTION_STYLE,useOverlay:u=false,debounceMs:c=16,onSelectionChange:f}=n,[h,p]=useState(false),[x,v]=useState(""),[a,m]=useState([]),[d,y]=useState(false),S=useRef(null),C=useRef(0),o=useCallback(()=>{let t=e.current,b=hasActiveSelection(),D=getSelectedText(),A=t?isSelectionWithin(t):false;if(p(b),v(D),y(A),u&&A){let $=getMergedSelectionRects(t);m($);}else m([]);f&&f(b&&A,D);},[e,u,f]),i=useCallback(()=>{let t=performance.now();if(t-C.current<c){S.current!==null&&clearTimeout(S.current),S.current=window.setTimeout(()=>{C.current=performance.now(),o(),S.current=null;},c);return}C.current=t,o();},[c,o]),l=useCallback(()=>{o();},[o]),R=useCallback(t=>({position:"absolute",left:`${t.left}px`,top:`${t.top}px`,width:`${t.width}px`,height:`${t.height}px`,backgroundColor:s.backgroundColor,borderRadius:s.borderRadius?`${s.borderRadius}px`:void 0,border:s.borderColor?`1px solid ${s.borderColor}`:void 0,zIndex:s.zIndex??0,opacity:s.opacity??1,mixBlendMode:s.mixBlendMode,pointerEvents:"none",userSelect:"none"}),[s]);return useEffect(()=>(r&&!areSelectionStylesInjected()&&injectSelectionStyles(s),()=>{}),[r,s]),useEffect(()=>{if(!r)return;let t=()=>{i();};return document.addEventListener("selectionchange",t),document.addEventListener("mouseup",t),o(),()=>{document.removeEventListener("selectionchange",t),document.removeEventListener("mouseup",t),S.current!==null&&clearTimeout(S.current);}},[r,i,o]),{hasSelection:h,selectedText:x,highlightRects:a,isSelectionInContainer:d,refresh:l,getOverlayStyle:R}}function pe(n,e=DEFAULT_SELECTION_STYLE){return n.map((r,s)=>re.createElement("div",{key:`selection-overlay-${s}`,style:{position:"absolute",left:`${r.left}px`,top:`${r.top}px`,width:`${r.width}px`,height:`${r.height}px`,backgroundColor:e.backgroundColor,borderRadius:e.borderRadius?`${e.borderRadius}px`:void 0,border:e.borderColor?`1px solid ${e.borderColor}`:void 0,zIndex:e.zIndex??0,opacity:e.opacity??1,mixBlendMode:e.mixBlendMode,pointerEvents:"none",userSelect:"none"}}))}function he(n={}){let{onCopy:e,onCut:r,onPaste:s,cleanWordFormatting:u=true,editable:c=true,onError:f,theme:h}=n,p=useRef(false),x=useRef(null),v=useCallback(async o=>{if(p.current)return false;p.current=true;try{let i=await copyRuns(o.runs,{onError:f,theme:h});return i&&e?.(o),i}finally{p.current=false;}},[e,f,h]),a=useCallback(async o=>{if(p.current||!c)return false;p.current=true;try{let i=await copyRuns(o.runs,{onError:f,theme:h});return i&&r?.(o),i}finally{p.current=false;}},[r,c,f,h]),m=useCallback(async(o=false)=>{if(p.current||!c)return null;p.current=true;try{if(navigator.clipboard&&navigator.clipboard.read){let i=await navigator.clipboard.read(),l="",R="";for(let b of i)b.types.includes("text/html")&&(l=await(await b.getType("text/html")).text()),b.types.includes("text/plain")&&(R=await(await b.getType("text/plain")).text());o&&(l="");let t=parseClipboardHtml(l,R,u);return x.current=t,s?.(t,o),t}return null}catch(i){return f?.(i),null}finally{p.current=false;}},[c,u,s,f]),d=useCallback(o=>{let i=createSelectionFromDOM();if(!i)return;o.preventDefault();let l=runsToClipboardContent(i.runs,true,h);o.clipboardData&&(o.clipboardData.setData("text/plain",l.plainText),o.clipboardData.setData("text/html",l.html),l.internal&&o.clipboardData.setData("application/x-docx-editor",l.internal)),e?.(i);},[e,h]),y=useCallback(o=>{if(!c)return;let i=createSelectionFromDOM();if(!i)return;o.preventDefault();let l=runsToClipboardContent(i.runs,true,h);o.clipboardData&&(o.clipboardData.setData("text/plain",l.plainText),o.clipboardData.setData("text/html",l.html),l.internal&&o.clipboardData.setData("application/x-docx-editor",l.internal)),r?.(i);},[c,r,h]),S=useCallback(o=>{if(!c)return;o.preventDefault();let i=handlePasteEvent(o,{cleanWordFormatting:u});if(i){x.current=i;let l=o.shiftKey??false;s?.(i,l);}},[c,u,s]),C=useCallback(o=>{},[]);return {copy:v,cut:a,paste:m,handleCopy:d,handleCut:y,handlePaste:S,handleKeyDown:C,isProcessing:p.current,lastPastedContent:x.current}}function Ee(n,e={}){let{storageKey:r,interval:s,enabled:u=true,maxAge:c,onSave:f,onError:h,onRecoveryAvailable:p,saveOnChange:x,debounceDelay:v}=e,a=useMemo(()=>new AutoSaveManager({storageKey:r,interval:s,maxAge:c,saveOnChange:x,debounceDelay:v,onSave:f,onError:h,onRecoveryAvailable:p}),[r]);useEffect(()=>{u?(a.enable(),a.startInterval()):a.disable();},[a,u]),useEffect(()=>{a.onDocumentChanged(n??null);},[a,n]),useEffect(()=>()=>{a.destroy();},[a]);let m=useSyncExternalStore(a.subscribe,a.getSnapshot),d=useCallback(()=>a.save(),[a]),y=useCallback(()=>a.clear(),[a]),S=useCallback(()=>a.getRecoveryData(),[a]),C=useCallback(()=>a.acceptRecovery(),[a]),o=useCallback(()=>a.dismissRecovery(),[a]),i=useCallback(()=>a.enable(),[a]),l=useCallback(()=>a.disable(),[a]);return {status:m.status,lastSaveTime:m.lastSaveTime,save:d,clearAutoSave:y,hasRecoveryData:m.hasRecoveryData,getRecoveryData:S,acceptRecovery:C,dismissRecovery:o,isEnabled:m.isEnabled,enable:i,disable:l}}var Pe=1,K=.25,W=4,Ze=.1,g=[.25,.5,.75,1,1.25,1.5,2,3,4];function _(n,e,r){return Math.max(e,Math.min(r,n))}function N(n){return Math.round(n*100)/100}function Ae(n){let e=g[0],r=Math.abs(n-e);for(let s of g){let u=Math.abs(n-s);u<r&&(r=u,e=s);}return e}function Ue(n){for(let e of g)if(e>n+.01)return e;return g[g.length-1]}function Me(n){for(let e=g.length-1;e>=0;e--)if(g[e]<n-.01)return g[e];return g[0]}function He(n={}){let{initialZoom:e=Pe,minZoom:r=K,maxZoom:s=W,zoomStep:u=Ze,enabled:c=true,containerRef:f,onZoomChange:h,enableKeyboardShortcuts:p=true,preventDefault:x=true}=n,[v,a]=useState(e),m=useRef(v);useEffect(()=>{m.current=v;},[v]);let d=useCallback(t=>{let b=N(_(t,r,s));b!==m.current&&(a(b),h?.(b));},[r,s,h]),y=useCallback(()=>{d(m.current+u);},[u,d]),S=useCallback(()=>{d(m.current-u);},[u,d]),C=useCallback(()=>{d(e);},[e,d]),o=useCallback(()=>{d(1);},[d]),i=useCallback((t,b)=>{if(b>0){let D=t/b;d(D);}},[d]),l=useCallback(t=>{if(!c||!(t.ctrlKey||t.metaKey))return;x&&t.preventDefault();let D=t.deltaY;D<0?d(m.current+u):D>0&&d(m.current-u);},[c,x,u,d]),R=useCallback(t=>{if(!(!c||!p||!(t.ctrlKey||t.metaKey))){if(t.key==="0"){t.preventDefault(),o();return}if(t.key==="+"||t.key==="="){t.preventDefault(),y();return}if(t.key==="-"){t.preventDefault(),S();return}}},[c,p,y,S,o]);return useEffect(()=>{if(!c)return;let t=f?.current;if(t)return t.addEventListener("wheel",l,{passive:false}),()=>{t.removeEventListener("wheel",l);}},[c,f,l]),useEffect(()=>{if(!(!c||!p))return document.addEventListener("keydown",R),()=>{document.removeEventListener("keydown",R);}},[c,p,R]),{zoom:v,setZoom:d,zoomIn:y,zoomOut:S,resetZoom:C,zoomTo100:o,zoomToFit:i,isMinZoom:v<=r,isMaxZoom:v>=s,zoomPercent:Math.round(v*100),handleWheel:l,handleKeyDown:R}}function we(){return [...g]}function Le(n){return Ae(n)}function ze(n){return Ue(n)}function ke(n){return Me(n)}function Fe(n){return `${Math.round(n*100)}%`}function Ie(n){let e=n.match(/(\d+(\.\d+)?)/);if(e){let r=parseFloat(e[1]);if(!isNaN(r))return r/100}return null}function Ke(n){return g.some(e=>Math.abs(e-n)<.01)}function We(n,e=K,r=W){return N(_(n,e,r))}export{g as ZOOM_PRESETS,We as clampZoom,Le as findNearestZoomPreset,Fe as formatZoom,pe as generateOverlayElements,ze as getNextZoomPreset,ke as getPreviousZoomPreset,we as getZoomPresets,Ke as isZoomPreset,Ie as parseZoom,Ee as useAutoSave,he as useClipboard,de as useSelectionHighlight,He as useWheelZoom};
|