@univerjs/preset-docs-core 0.6.4-nightly.202503101606 → 0.6.4-nightly.202503111607

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/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@univerjs/docs"),t=require("@univerjs/docs-ui"),n=require("@univerjs/engine-formula"),o=require("@univerjs/engine-render"),c=require("@univerjs/ui");require("@univerjs/docs-ui/facade");function f(e={}){const{container:i="app",header:u,footer:a,toolbar:l,menu:s,contextMenu:b,disableAutoFocus:p}=e;return{plugins:[r.UniverDocsPlugin,o.UniverRenderEnginePlugin,n.UniverFormulaEnginePlugin,[c.UniverUIPlugin,{container:i,header:u,footer:a,toolbar:l,menu:s,contextMenu:b,disableAutoFocus:p}],t.UniverDocsUIPlugin]}}exports.UniverDocsCorePreset=f;Object.keys(r).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>r[e]})});Object.keys(t).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>t[e]})});Object.keys(n).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>n[e]})});Object.keys(o).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>o[e]})});Object.keys(c).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>c[e]})});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@univerjs/docs"),t=require("@univerjs/docs-ui"),o=require("@univerjs/engine-formula"),n=require("@univerjs/engine-render"),c=require("@univerjs/network"),i=require("@univerjs/ui");require("@univerjs/network/facade");require("@univerjs/docs-ui/facade");function y(e={}){const{container:u="app",header:a,footer:l,toolbar:s,menu:b,contextMenu:p,disableAutoFocus:f}=e;return{plugins:[c.UniverNetworkPlugin,r.UniverDocsPlugin,n.UniverRenderEnginePlugin,o.UniverFormulaEnginePlugin,[i.UniverUIPlugin,{container:u,header:a,footer:l,toolbar:s,menu:b,contextMenu:p,disableAutoFocus:f}],t.UniverDocsUIPlugin]}}exports.UniverDocsCorePreset=y;Object.keys(r).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>r[e]})});Object.keys(t).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>t[e]})});Object.keys(o).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>o[e]})});Object.keys(n).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>n[e]})});Object.keys(c).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>c[e]})});Object.keys(i).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>i[e]})});
package/lib/es/index.js CHANGED
@@ -1,15 +1,18 @@
1
- import { UniverDocsPlugin as u } from "@univerjs/docs";
1
+ import { UniverDocsPlugin as f } from "@univerjs/docs";
2
2
  export * from "@univerjs/docs";
3
- import { UniverDocsUIPlugin as f } from "@univerjs/docs-ui";
3
+ import { UniverDocsUIPlugin as u } from "@univerjs/docs-ui";
4
4
  export * from "@univerjs/docs-ui";
5
5
  import { UniverFormulaEnginePlugin as l } from "@univerjs/engine-formula";
6
6
  export * from "@univerjs/engine-formula";
7
- import { UniverRenderEnginePlugin as c } from "@univerjs/engine-render";
7
+ import { UniverRenderEnginePlugin as g } from "@univerjs/engine-render";
8
8
  export * from "@univerjs/engine-render";
9
- import { UniverUIPlugin as g } from "@univerjs/ui";
9
+ import { UniverNetworkPlugin as U } from "@univerjs/network";
10
+ export * from "@univerjs/network";
11
+ import { UniverUIPlugin as c } from "@univerjs/ui";
10
12
  export * from "@univerjs/ui";
13
+ import "@univerjs/network/facade";
11
14
  import "@univerjs/docs-ui/facade";
12
- function d(r = {}) {
15
+ function E(r = {}) {
13
16
  const {
14
17
  container: o = "app",
15
18
  header: e,
@@ -21,10 +24,11 @@ function d(r = {}) {
21
24
  } = r;
22
25
  return {
23
26
  plugins: [
24
- u,
25
- c,
27
+ U,
28
+ f,
29
+ g,
26
30
  l,
27
- [g, {
31
+ [c, {
28
32
  container: o,
29
33
  header: e,
30
34
  footer: n,
@@ -33,10 +37,10 @@ function d(r = {}) {
33
37
  contextMenu: m,
34
38
  disableAutoFocus: p
35
39
  }],
36
- f
40
+ u
37
41
  ]
38
42
  };
39
43
  }
40
44
  export {
41
- d as UniverDocsCorePreset
45
+ E as UniverDocsCorePreset
42
46
  };
@@ -3,4 +3,5 @@ export * from '@univerjs/docs';
3
3
  export * from '@univerjs/docs-ui';
4
4
  export * from '@univerjs/engine-formula';
5
5
  export * from '@univerjs/engine-render';
6
+ export * from '@univerjs/network';
6
7
  export * from '@univerjs/ui';
@@ -1,10 +1,12 @@
1
1
  import { IUniverUIConfig } from '@univerjs/ui';
2
2
  import { IPreset } from './types';
3
+ import '@univerjs/network/facade';
3
4
  import '@univerjs/docs-ui/facade';
4
5
  import '@univerjs/design/lib/index.css';
5
6
  import '@univerjs/ui/lib/index.css';
6
7
  import '@univerjs/docs-ui/lib/index.css';
7
8
  export type * from '@univerjs/docs-ui/facade';
9
+ export type * from '@univerjs/network/facade';
8
10
  export interface IUniverDocsCorePresetConfig extends Pick<IUniverUIConfig, 'container' | 'header' | 'footer' | 'toolbar' | 'menu' | 'contextMenu' | 'disableAutoFocus'> {
9
11
  collaboration?: true;
10
12
  }
package/lib/umd/index.js CHANGED
@@ -67,7 +67,7 @@
67
67
  univer-invisible univer-absolute univer-left-0 univer-right-0 univer-top-[-99999px] univer-mx-auto
68
68
  univer-box-border univer-flex univer-h-full univer-flex-1 univer-items-center univer-justify-center
69
69
  univer-gap-1 univer-overflow-hidden univer-px-4
70
- `,children:E})]})}const Te=b.createIdentifier("ui.contextmenu.service");class Dt extends b.Disposable{constructor(){super(...arguments);G(this,"_currentHandler",null);G(this,"disabled",!1)}get visible(){var n,r;return(r=(n=this._currentHandler)==null?void 0:n.visible)!=null?r:!1}disable(){this.disabled=!0}enable(){this.disabled=!1}triggerContextMenu(n,r){var i;n.stopPropagation(),!this.disabled&&((i=this._currentHandler)==null||i.handleContextMenu(n,r))}hideContextMenu(){var n;(n=this._currentHandler)==null||n.hideContextMenu()}registerContextMenuHandler(n){if(this._currentHandler)throw new Error("There is already a context menu handler!");return this._currentHandler=n,b.toDisposable(()=>this._currentHandler=null)}}function i9(){const e=s.useRef(null),[t,n]=s.useState(!1),[r,i]=s.useState(""),[o,a]=s.useState([0,0]),c=s.useRef(t),d=z.useDependency(Te),m=z.useDependency(b.ICommandService),y=z.useInjector();c.current=t,s.useEffect(()=>{const L=d.registerContextMenuHandler({handleContextMenu:f,hideContextMenu(){n(!1)},get visible(){return c.current}});function E(w){e.current&&!e.current.contains(w.target)&&g()}return document.addEventListener("pointerdown",E),document.addEventListener("wheel",g),()=>{document.removeEventListener("pointerdown",E),document.removeEventListener("wheel",g),L.dispose()}},[d]);function f(L,E){n(!1),requestAnimationFrame(()=>{i(E),a([L.clientX,L.clientY]),n(!0)})}function g(){n(!1)}return v.jsx(j.Popup,{visible:t,offset:o,children:v.jsx("section",{ref:e,children:r&&v.jsx(Ar,{menuType:r,onOptionSelect:L=>{const{label:E,commandId:w,value:h}=L;m&&m.executeCommand(w!=null?w:E,{value:h}),y.get(ee).focus(),n(!1)}})})})}const Ge=b.createIdentifier("univer.global-zone-service");function Tt(){const e=z.useDependency(Ge),[t,n]=s.useState(!1),r=z.useObservable(e.componentKey$,e.componentKey),i=z.useDependency(N1),o=s.useMemo(()=>{const a=i.get(r!=null?r:"");if(a)return a},[r,i]);return s.useEffect(()=>{const a=e.visible$.subscribe(c=>{n(c)});return()=>{a.unsubscribe()}},[e.visible$]),t?v.jsx("section",{className:j.clsx("univer-absolute univer-bg-gray-100",{"univer-hidden":!t,"univer-inset-0 univer-z-[100] univer-block univer-size-full":t}),children:o&&v.jsx(o,{})}):null}function Vt(){const e=z.useDependency(ve),t=z.useObservable(e.sidebarOptions$),n=s.useRef(null),r=s.useMemo(()=>{if(!t)return null;const a={...t};for(const c of["children","header","footer"]){const d=c;if(t[d]){const m=t[d];m&&(a[d]=v.jsx(y1,{...m}))}}return a},[t]);s.useEffect(()=>(n.current&&e.setContainer(n.current),()=>{e.setContainer(void 0)}),[e]),s.useEffect(()=>{const a=d=>{e.scrollEvent$.next(d)},c=n.current;return c&&c.addEventListener("scroll",a),()=>{c==null||c.removeEventListener("scroll",a)}},[e]);const i=s.useMemo(()=>r!=null&&r.visible?typeof r.width=="number"?`${r.width}px`:r.width:0,[r]);function o(){var c;const a={...t,visible:!1};e.options.visible=!1,e.sidebarOptions$.next(a),(c=a==null?void 0:a.onClose)==null||c.call(a)}return v.jsx("section",{className:j.clsx("univer-relative univer-h-full univer-text-gray-800",{"univer-w-96 univer-translate-x-0":r==null?void 0:r.visible,"univer-w-0 univer-translate-x-full":!(r!=null&&r.visible)}),style:{width:i},children:v.jsxs("section",{className:`
70
+ `,children:E})]})}const Te=b.createIdentifier("ui.contextmenu.service");class Dt extends b.Disposable{constructor(){super(...arguments);G(this,"_currentHandler",null);G(this,"disabled",!1)}get visible(){var n,r;return(r=(n=this._currentHandler)==null?void 0:n.visible)!=null?r:!1}disable(){this.disabled=!0}enable(){this.disabled=!1}triggerContextMenu(n,r){var i;n.stopPropagation(),!this.disabled&&((i=this._currentHandler)==null||i.handleContextMenu(n,r))}hideContextMenu(){var n;(n=this._currentHandler)==null||n.hideContextMenu()}registerContextMenuHandler(n){if(this._currentHandler)throw new Error("There is already a context menu handler!");return this._currentHandler=n,b.toDisposable(()=>this._currentHandler=null)}}function i9(){const e=s.useRef(null),[t,n]=s.useState(!1),[r,i]=s.useState(""),[o,a]=s.useState([0,0]),c=s.useRef(t),d=z.useDependency(Te),m=z.useDependency(b.ICommandService),y=z.useInjector();c.current=t,s.useEffect(()=>{const L=d.registerContextMenuHandler({handleContextMenu:f,hideContextMenu(){n(!1)},get visible(){return c.current}});function E(w){e.current&&!e.current.contains(w.target)&&g()}return document.addEventListener("pointerdown",E),document.addEventListener("wheel",g),()=>{document.removeEventListener("pointerdown",E),document.removeEventListener("wheel",g),L.dispose()}},[d]);function f(L,E){n(!1),requestAnimationFrame(()=>{i(E),a([L.clientX,L.clientY]),n(!0)})}function g(){n(!1)}return v.jsx(j.Popup,{visible:t,offset:o,children:v.jsx("section",{ref:e,children:r&&v.jsx(Ar,{menuType:r,onOptionSelect:L=>{const{label:E,commandId:w,value:h}=L;m&&m.executeCommand(w!=null?w:E,{value:h}),y.get(ee).focus(),n(!1)}})})})}const Ge=b.createIdentifier("univer.global-zone-service");function Tt(){const e=z.useDependency(Ge),[t,n]=s.useState(!1),r=z.useObservable(e.componentKey$,e.componentKey),i=z.useDependency(N1),o=s.useMemo(()=>{const a=i.get(r!=null?r:"");if(a)return a},[r,i]);return s.useEffect(()=>{const a=e.visible$.subscribe(c=>{n(c)});return()=>{a.unsubscribe()}},[e.visible$]),t?v.jsx("section",{className:j.clsx("univer-absolute univer-bg-gray-100",{"univer-hidden":!t,"univer-inset-0 univer-z-[100] univer-block univer-size-full":t}),children:o&&v.jsx(o,{})}):null}function Vt(){const e=z.useDependency(ve),t=z.useObservable(e.sidebarOptions$),n=s.useRef(null),r=s.useMemo(()=>{if(!t)return null;const a={...t};for(const c of["children","header","footer"]){const d=c;if(t[d]){const{key:m,...y}=t[d];y&&(a[d]=v.jsx(y1,{...y},m))}}return a},[t]);s.useEffect(()=>(n.current&&e.setContainer(n.current),()=>{e.setContainer(void 0)}),[e]),s.useEffect(()=>{const a=d=>{e.scrollEvent$.next(d)},c=n.current;return c&&c.addEventListener("scroll",a),()=>{c==null||c.removeEventListener("scroll",a)}},[e]);const i=s.useMemo(()=>r!=null&&r.visible?typeof r.width=="number"?`${r.width}px`:r.width:0,[r]);function o(){var c;const a={...t,visible:!1};e.options.visible=!1,e.sidebarOptions$.next(a),(c=a==null?void 0:a.onClose)==null||c.call(a)}return v.jsx("section",{className:j.clsx("univer-relative univer-h-full univer-text-gray-800",{"univer-w-96 univer-translate-x-0":r==null?void 0:r.visible,"univer-w-0 univer-translate-x-full":!(r!=null&&r.visible)}),style:{width:i},children:v.jsxs("section",{className:`
71
71
  univer-box-border univer-grid univer-h-0 univer-min-h-full univer-grid-rows-[auto_1fr_auto]
72
72
  univer-overflow-y-auto univer-border-0 univer-border-b univer-border-l univer-border-solid
73
73
  univer-border-gray-200 univer-bg-white univer-scrollbar-thin univer-scrollbar-track-gray-50
@@ -112,7 +112,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
112
112
  onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
113
113
  onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
114
114
  onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
115
- onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,t0="".concat(Ko," ").concat(e0).split(/[\s\n]+/),n0="aria-",r0="data-";function J9(e,t){return e.indexOf(t)===0}function i0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;t===!1?n={aria:!0,data:!0,attr:!0}:t===!0?n={aria:!0}:n=n1({},t);var r={};return Object.keys(e).forEach(function(i){(n.aria&&(i==="role"||J9(i,n0))||n.data&&J9(i,r0)||n.attr&&t0.includes(i))&&(r[i]=e[i])}),r}var o0=Y.forwardRef(function(e,t){var n=e.prefixCls,r=e.style,i=e.className,o=e.duration,a=o===void 0?4.5:o,c=e.showProgress,d=e.pauseOnHover,m=d===void 0?!0:d,y=e.eventKey,f=e.content,g=e.closable,L=e.closeIcon,E=L===void 0?"x":L,w=e.props,h=e.onClick,I=e.onNoticeClose,O=e.times,D=e.hovering,k=Y.useState(!1),H=v1(k,2),N=H[0],A=H[1],P=Y.useState(0),$=v1(P,2),Z=$[0],R=$[1],J=Y.useState(0),X=v1(J,2),Q=X[0],s1=X[1],e1=D||N,l1=a>0&&c,f1=function(){I(y)},Z1=function(t1){(t1.key==="Enter"||t1.code==="Enter"||t1.keyCode===Qo.ENTER)&&f1()};Y.useEffect(function(){if(!e1&&a>0){var b1=Date.now()-Q,t1=setTimeout(function(){f1()},a*1e3-Q);return function(){m&&clearTimeout(t1),s1(Date.now()-b1)}}},[a,e1,O]),Y.useEffect(function(){if(!e1&&l1&&(m||Q===0)){var b1=performance.now(),t1,C1=function ie(){cancelAnimationFrame(t1),t1=requestAnimationFrame(function(de){var X1=de+Q-b1,j1=Math.min(X1/(a*1e3),1);R(j1*100),j1<1&&ie()})};return C1(),function(){m&&cancelAnimationFrame(t1)}}},[a,Q,e1,l1,O]);var k1=Y.useMemo(function(){return O1(g)==="object"&&g!==null?g:g?{closeIcon:E}:{}},[g,E]),i1=i0(k1,!0),S1=100-(!Z||Z<0?0:Z>100?100:Z),E1="".concat(n,"-notice");return Y.createElement("div",fe({},w,{ref:t,className:ke(E1,i,p1({},"".concat(E1,"-closable"),g)),style:r,onMouseEnter:function(t1){var C1;A(!0),w==null||(C1=w.onMouseEnter)===null||C1===void 0||C1.call(w,t1)},onMouseLeave:function(t1){var C1;A(!1),w==null||(C1=w.onMouseLeave)===null||C1===void 0||C1.call(w,t1)},onClick:h}),Y.createElement("div",{className:"".concat(E1,"-content")},f),g&&Y.createElement("a",fe({tabIndex:0,className:"".concat(E1,"-close"),onKeyDown:Z1,"aria-label":"Close"},i1,{onClick:function(t1){t1.preventDefault(),t1.stopPropagation(),f1()}}),k1.closeIcon),l1&&Y.createElement("progress",{className:"".concat(E1,"-progress"),max:"100",value:S1},S1+"%"))}),a0=s.createContext({}),Q9=8,K9=3,e6=16,s0=function(t){var n={offset:Q9,threshold:K9,gap:e6};if(t&&O1(t)==="object"){var r,i,o;n.offset=(r=t.offset)!==null&&r!==void 0?r:Q9,n.threshold=(i=t.threshold)!==null&&i!==void 0?i:K9,n.gap=(o=t.gap)!==null&&o!==void 0?o:e6}return[!!t,n]},l0=["className","style","classNames","styles"],c0=function(t){var n=t.configList,r=t.placement,i=t.prefixCls,o=t.className,a=t.style,c=t.motion,d=t.onAllNoticeRemoved,m=t.onNoticeClose,y=t.stack,f=s.useContext(a0),g=f.classNames,L=s.useRef({}),E=s.useState(null),w=v1(E,2),h=w[0],I=w[1],O=s.useState([]),D=v1(O,2),k=D[0],H=D[1],N=n.map(function(e1){return{config:e1,key:String(e1.key)}}),A=s0(y),P=v1(A,2),$=P[0],Z=P[1],R=Z.offset,J=Z.threshold,X=Z.gap,Q=$&&(k.length>0||N.length<=J),s1=typeof c=="function"?c(r):c;return s.useEffect(function(){$&&k.length>1&&H(function(e1){return e1.filter(function(l1){return N.some(function(f1){var Z1=f1.key;return l1===Z1})})})},[k,N,$]),s.useEffect(function(){var e1;if($&&L.current[(e1=N[N.length-1])===null||e1===void 0?void 0:e1.key]){var l1;I(L.current[(l1=N[N.length-1])===null||l1===void 0?void 0:l1.key])}},[N,$]),s.createElement(Jo,fe({key:r,className:ke(i,"".concat(i,"-").concat(r),g==null?void 0:g.list,o,p1(p1({},"".concat(i,"-stack"),!!$),"".concat(i,"-stack-expanded"),Q)),style:a,keys:N,motionAppear:!0},s1,{onAllRemoved:function(){d(r)}}),function(e1,l1){var f1=e1.config,Z1=e1.className,k1=e1.style,i1=e1.index,S1=f1,E1=S1.key,b1=S1.times,t1=String(E1),C1=f1,ie=C1.className,de=C1.style,X1=C1.classNames,j1=C1.styles,ye=et(C1,l0),R1=N.findIndex(function(A1){return A1.key===t1}),oe={};if($){var J1=N.length-1-(R1>-1?R1:i1-1),D1=r==="top"||r==="bottom"?"-50%":"0";if(J1>0){var T1,ae,W1;oe.height=Q?(T1=L.current[t1])===null||T1===void 0?void 0:T1.offsetHeight:h==null?void 0:h.offsetHeight;for(var Q1=0,G1=0;G1<J1;G1++){var u1;Q1+=((u1=L.current[N[N.length-1-G1].key])===null||u1===void 0?void 0:u1.offsetHeight)+X}var d1=(Q?Q1:J1*R)*(r.startsWith("top")?1:-1),H1=!Q&&h!==null&&h!==void 0&&h.offsetWidth&&(ae=L.current[t1])!==null&&ae!==void 0&&ae.offsetWidth?((h==null?void 0:h.offsetWidth)-R*2*(J1<3?J1:3))/((W1=L.current[t1])===null||W1===void 0?void 0:W1.offsetWidth):1;oe.transform="translate3d(".concat(D1,", ").concat(d1,"px, 0) scaleX(").concat(H1,")")}else oe.transform="translate3d(".concat(D1,", 0, 0)")}return s.createElement("div",{ref:l1,className:ke("".concat(i,"-notice-wrapper"),Z1,X1==null?void 0:X1.wrapper),style:n1(n1(n1({},k1),oe),j1==null?void 0:j1.wrapper),onMouseEnter:function(){return H(function(I1){return I1.includes(t1)?I1:[].concat(Ne(I1),[t1])})},onMouseLeave:function(){return H(function(I1){return I1.filter(function(ct){return ct!==t1})})}},s.createElement(o0,fe({},ye,{ref:function(I1){R1>-1?L.current[t1]=I1:delete L.current[t1]},prefixCls:i,classNames:X1,styles:j1,className:ke(ie,g==null?void 0:g.notice),style:de,times:b1,key:E1,eventKey:E1,onNoticeClose:m,hovering:$&&k.length>0})))})},u0=Y.forwardRef(function(e,t){var n=e.prefixCls,r=n===void 0?"rc-notification":n,i=e.container,o=e.motion,a=e.maxCount,c=e.className,d=e.style,m=e.onAllRemoved,y=e.stack,f=e.renderNotifications,g=Y.useState([]),L=v1(g,2),E=L[0],w=L[1],h=function($){var Z,R=E.find(function(J){return J.key===$});R==null||(Z=R.onClose)===null||Z===void 0||Z.call(R),w(function(J){return J.filter(function(X){return X.key!==$})})};Y.useImperativeHandle(t,function(){return{open:function($){w(function(Z){var R=Ne(Z),J=R.findIndex(function(s1){return s1.key===$.key}),X=n1({},$);if(J>=0){var Q;X.times=(((Q=Z[J])===null||Q===void 0?void 0:Q.times)||0)+1,R[J]=X}else X.times=0,R.push(X);return a>0&&R.length>a&&(R=R.slice(-a)),R})},close:function($){h($)},destroy:function(){w([])}}});var I=Y.useState({}),O=v1(I,2),D=O[0],k=O[1];Y.useEffect(function(){var P={};E.forEach(function($){var Z=$.placement,R=Z===void 0?"topRight":Z;R&&(P[R]=P[R]||[],P[R].push($))}),Object.keys(D).forEach(function($){P[$]=P[$]||[]}),k(P)},[E]);var H=function($){k(function(Z){var R=n1({},Z),J=R[$]||[];return J.length||delete R[$],R})},N=Y.useRef(!1);if(Y.useEffect(function(){Object.keys(D).length>0?N.current=!0:N.current&&(m==null||m(),N.current=!1)},[D]),!i)return null;var A=Object.keys(D);return Se.createPortal(Y.createElement(Y.Fragment,null,A.map(function(P){var $=D[P],Z=Y.createElement(c0,{key:P,configList:$,placement:P,prefixCls:r,className:c==null?void 0:c(P),style:d==null?void 0:d(P),motion:o,onNoticeClose:h,onAllNoticeRemoved:H,stack:y});return f?f(Z,{prefixCls:r,key:P}):Z})),i)}),f0=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"],d0=function(){return document.body},t6=0;function h0(){for(var e={},t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(i){i&&Object.keys(i).forEach(function(o){var a=i[o];a!==void 0&&(e[o]=a)})}),e}function v0(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.getContainer,n=t===void 0?d0:t,r=e.motion,i=e.prefixCls,o=e.maxCount,a=e.className,c=e.style,d=e.onAllRemoved,m=e.stack,y=e.renderNotifications,f=et(e,f0),g=Y.useState(),L=v1(g,2),E=L[0],w=L[1],h=Y.useRef(),I=Y.createElement(u0,{container:E,ref:h,prefixCls:i,motion:r,maxCount:o,className:a,style:c,onAllRemoved:d,stack:m,renderNotifications:y}),O=Y.useState([]),D=v1(O,2),k=D[0],H=D[1],N=Y.useMemo(function(){return{open:function(P){var $=h0(f,P);($.key===null||$.key===void 0)&&($.key="rc-notification-".concat(t6),t6+=1),H(function(Z){return[].concat(Ne(Z),[{type:"open",config:$}])})},close:function(P){H(function($){return[].concat(Ne($),[{type:"close",key:P}])})},destroy:function(){H(function(P){return[].concat(Ne(P),[{type:"destroy"}])})}}},[]);return Y.useEffect(function(){w(n())}),Y.useEffect(function(){if(h.current&&k.length){k.forEach(function($){switch($.type){case"open":h.current.open($.config);break;case"close":h.current.close($.key);break;case"destroy":h.current.destroy();break}});var A,P;H(function($){return(A!==$||!P)&&(A=$,P=$.filter(function(Z){return!k.includes(Z)})),P})}},[k]),[N,I]}const z1={notification:"univer-notification",notificationIcon:"univer-notification-icon",notificationIconSuccess:"univer-notification-icon-success",notificationIconInfo:"univer-notification-icon-info",notificationIconWarning:"univer-notification-icon-warning",notificationIconError:"univer-notification-icon-error",notificationContentContainer:"univer-notification-content-container",notificationTitle:"univer-notification-title",notificationContent:"univer-notification-content",notificationContentEllipsis:"univer-notification-content-ellipsis",notificationFade:"univer-notification-fade"},C0={success:v.jsx(lr,{className:z1.notificationIconSuccess}),info:v.jsx(ht,{className:z1.notificationIconInfo}),warning:v.jsx(ht,{className:z1.notificationIconWarning}),error:v.jsx(Q3,{className:z1.notificationIconError})},n6=new q.Subject,m0=e=>{const{type:t,content:n,title:r,lines:i=0}=e,o=j.clsx(z1.notificationContent,{[z1.notificationContentEllipsis]:i!==0});return v.jsxs(v.Fragment,{children:[v.jsx("span",{className:z1.notificationIcon,children:C0[t]}),v.jsxs("div",{className:z1.notificationContentContainer,children:[v.jsx("span",{className:z1.notificationTitle,children:r}),v.jsx("span",{className:o,style:{WebkitLineClamp:i},children:n})]})]})};function g0(){const{mountContainer:e}=s.useContext(j.ConfigContext);if(!e)return null;const[t,n]=v0({prefixCls:z1.notification,maxCount:3,closeIcon:v.jsx(Pe,{}),getContainer:()=>e,motion:{motionName:z1.notificationFade,motionAppear:!0,motionEnter:!0,motionLeave:!0}}),r=s.useRef(n6);return s.useEffect(()=>{const i=r.current.subscribe(o=>{var a,c,d;t.open({content:v.jsx(m0,{content:o.content,type:o.type,title:o.title,lines:o.lines}),key:o.key,placement:(a=o.placement)!=null?a:"topRight",duration:(c=o.duration)!=null?c:4.5,closable:(d=o.closable)!=null?d:!0})});return()=>{i.unsubscribe()}},[t]),v.jsx(v.Fragment,{children:n})}const p0={show:e=>{n6.next(e)}};var b0=Object.getOwnPropertyDescriptor,y0=(e,t,n,r)=>{for(var i=r>1?void 0:r?b0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=a(i)||i);return i},r6=(e,t)=>(n,r)=>t(n,r,e);C.DesktopNotificationService=class extends b.Disposable{constructor(t,n){super(),this._injector=t,this._uiPartsService=n,this._initUIPart()}show(t){return p0.show(t),b.toDisposable(()=>{})}_initUIPart(){this.disposeWithMe(this._uiPartsService.registerComponent(c1.GLOBAL,()=>z.connectInjector(g0,this._injector)))}},C.DesktopNotificationService=y0([r6(0,b.Inject(b.Injector)),r6(1,U1)],C.DesktopNotificationService);class a3{constructor(){G(this,"_sidebarOptions",{});G(this,"sidebarOptions$",new q.Subject);G(this,"scrollEvent$",new q.Subject);G(this,"container")}get visible(){return this._sidebarOptions.visible||!1}get options(){return this._sidebarOptions}open(t){return this._sidebarOptions={...t,id:t.id,visible:!0},this.sidebarOptions$.next(this._sidebarOptions),b.toDisposable(()=>{this.close()})}close(t){t&&this._sidebarOptions.id!==t||(this._sidebarOptions={...this._sidebarOptions,visible:!1},this.sidebarOptions$.next(this._sidebarOptions),this._sidebarOptions.onClose&&this._sidebarOptions.onClose())}getContainer(){return this.container}setContainer(t){this.container=t}}var L0=Object.getOwnPropertyDescriptor,S0=(e,t,n,r)=>{for(var i=r>1?void 0:r?L0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=a(i)||i);return i},_0=(e,t)=>(n,r)=>t(n,r,e);C.DesktopZenZoneService=class{constructor(t){G(this,"visible$",new q.BehaviorSubject(!1));G(this,"componentKey$",new q.ReplaySubject);G(this,"_temporaryHidden$",new q.BehaviorSubject(!1));G(this,"temporaryHidden$",this._temporaryHidden$.asObservable());G(this,"_visible",!1);this._componentManager=t}get visible(){return this._visible}get temporaryHidden(){return this._temporaryHidden$.getValue()}dispose(){this.visible$.next(!1),this.visible$.complete(),this.componentKey$.complete()}hide(){this._temporaryHidden$.next(!0)}show(){this._temporaryHidden$.next(!1)}set(t,n){return this._componentManager.register(t,n),this.componentKey$.next(t),b.toDisposable(()=>{this._componentManager.delete(t),this.visible$.complete(),this.componentKey$.complete()})}open(){this._visible=!0,this.visible$.next(!0)}close(){this._visible=!1,this.visible$.next(!1)}},C.DesktopZenZoneService=S0([_0(0,b.Inject(N1))],C.DesktopZenZoneService);var w0=Object.defineProperty,M0=Object.getOwnPropertyDescriptor,E0=(e,t,n)=>t in e?w0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,H0=(e,t,n,r)=>{for(var i=r>1?void 0:r?M0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=a(i)||i);return i},I0=(e,t)=>(n,r)=>t(n,r,e),O0=(e,t,n)=>E0(e,t+"",n);const D0="UNIVER_MOBILE_UI_PLUGIN";C.UniverMobileUIPlugin=class extends b.Plugin{constructor(t,n){super(),this._config=t,this._injector=n}onStarting(){b.mergeOverrideWithDependencies([[N1],[we],[Be],[U1,{useClass:_t}],[ee,{useClass:C.DesktopLayoutService}],[Ce,{useClass:C.ShortcutService}],[ze,{useClass:St}],[Y1,{useClass:C.MenuManagerService}],[Te,{useClass:Dt}],[Ft,{useClass:C.BrowserClipboardService,lazy:!0}],[Ve,{useClass:C.DesktopNotificationService,lazy:!0}],[Je,{useClass:C.DesktopDialogService,lazy:!0}],[Xe,{useClass:C.DesktopConfirmService,lazy:!0}],[ve,{useClass:a3,lazy:!0}],[Ye,{useClass:C.DesktopZenZoneService,lazy:!0}],[Ge,{useClass:C.DesktopGlobalZoneService,lazy:!0}],[Fe,{useClass:C.DesktopMessageService,lazy:!0}],[b.ILocalStorageService,{useClass:zt,lazy:!0}],[xt,{useClass:C.DesktopBeforeCloseService}],[Re,{useClass:Mt}],[je],[De,{useFactory:n=>n.createInstance(At,this._config),deps:[b.Injector]}],[C.SharedController],[C.ErrorController]],this._config.override).forEach(n=>this._injector.add(n)),this._injector.get(De),this._injector.get(C.ErrorController)}},O0(C.UniverMobileUIPlugin,"pluginName",D0),C.UniverMobileUIPlugin=H0([b.DependentOn(_e.UniverRenderEnginePlugin),I0(1,b.Inject(b.Injector))],C.UniverMobileUIPlugin);class i6 extends b.Disposable{openFile(t){return new Promise(n=>{var i,o;const r=document.createElement("input");r.type="file",r.accept=(i=t==null?void 0:t.accept)!=null?i:"",r.multiple=(o=t==null?void 0:t.multiple)!=null?o:!1,r.onchange=a=>{const c=a.target.files;c&&n(Array.from(c))},r.click()})}downloadFile(t,n){const r=document.createElement("a");r.download=n,r.href=window.URL.createObjectURL(t),r.click()}}const o6=b.createIdentifier("univer-ui.local-file.service"),T0=e=>{const n=z.useDependency(ve).getContainer();s.useEffect(()=>{if(n)return n.addEventListener("mousedown",e),()=>{n.removeEventListener("mousedown",e)}},[e,n])};var V0=Object.defineProperty,N0=Object.getOwnPropertyDescriptor,k0=(e,t,n)=>t in e?V0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,A0=(e,t,n,r)=>{for(var i=r>1?void 0:r?N0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=a(i)||i);return i},s3=(e,t)=>(n,r)=>t(n,r,e),x0=(e,t,n)=>k0(e,t+"",n);const a6="UNIVER_UI_PLUGIN",s6="DISABLE_AUTO_FOCUS";C.UniverUIPlugin=class extends b.Plugin{constructor(t=$r,n,r,i){super(),this._config=t,this._contextService=n,this._injector=r,this._configService=i;const{menu:o,...a}=b.merge({},$r,this._config);a.disableAutoFocus&&this._contextService.setContextValue(s6,!0),o&&this._configService.setConfig("menu",o,{merge:!0}),this._configService.setConfig(Pr,a)}onStarting(){b.mergeOverrideWithDependencies([[N1],[we],[Be],[U1,{useClass:_t}],[ee,{useClass:C.DesktopLayoutService}],[Ce,{useClass:C.ShortcutService}],[ze,{useClass:St}],[Y1,{useClass:C.MenuManagerService}],[Te,{useClass:Dt}],[Ft,{useClass:C.BrowserClipboardService,lazy:!0}],[Ve,{useClass:C.DesktopNotificationService,lazy:!0}],[Je,{useClass:C.DesktopDialogService,lazy:!0}],[Xe,{useClass:C.DesktopConfirmService,lazy:!0}],[ve,{useClass:a3,lazy:!0}],[Ye,{useClass:C.DesktopZenZoneService,lazy:!0}],[Ge,{useClass:C.DesktopGlobalZoneService,lazy:!0}],[Fe,{useClass:C.DesktopMessageService,lazy:!0}],[b.ILocalStorageService,{useClass:zt,lazy:!0}],[xt,{useClass:C.DesktopBeforeCloseService}],[o6,{useClass:i6}],[Re,{useClass:Mt}],[je],[De,{useFactory:n=>n.createInstance(C.DesktopUIController,this._config),deps:[b.Injector]}],[C.SharedController],[C.ErrorController],[C.ShortcutPanelController]],this._config.override).forEach(n=>this._injector.add(n)),this._injector.get(De),this._injector.get(C.ErrorController)}onReady(){this._injector.get(C.SharedController)}onSteady(){this._injector.get(C.ShortcutPanelController)}},x0(C.UniverUIPlugin,"pluginName",a6),C.UniverUIPlugin=A0([b.DependentOn(_e.UniverRenderEnginePlugin),s3(1,b.IContextService),s3(2,b.Inject(b.Injector)),s3(3,b.IConfigService)],C.UniverUIPlugin);function at(e){return e.length===0?e:e.replace(/^\s+|\s+$/gm,"")}const P0=.75,l6=78,c6=9,u6="rgba(0,0,0,0)",f6="rgb(0,0,0)";function l3(e){var c;let t=e.childNodes;if(t.length===0)return e.textContent;if(t[0].nodeName==="DIV"&&(t=t[0].childNodes),t.length===1&&t[0].nodeName==="#text")return t[0].textContent;const n=[];let r=0,i=0,o=e.textContent||"";o+=`\r
115
+ onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,t0="".concat(Ko," ").concat(e0).split(/[\s\n]+/),n0="aria-",r0="data-";function J9(e,t){return e.indexOf(t)===0}function i0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;t===!1?n={aria:!0,data:!0,attr:!0}:t===!0?n={aria:!0}:n=n1({},t);var r={};return Object.keys(e).forEach(function(i){(n.aria&&(i==="role"||J9(i,n0))||n.data&&J9(i,r0)||n.attr&&t0.includes(i))&&(r[i]=e[i])}),r}var o0=Y.forwardRef(function(e,t){var n=e.prefixCls,r=e.style,i=e.className,o=e.duration,a=o===void 0?4.5:o,c=e.showProgress,d=e.pauseOnHover,m=d===void 0?!0:d,y=e.eventKey,f=e.content,g=e.closable,L=e.closeIcon,E=L===void 0?"x":L,w=e.props,h=e.onClick,I=e.onNoticeClose,O=e.times,D=e.hovering,k=Y.useState(!1),H=v1(k,2),N=H[0],A=H[1],P=Y.useState(0),$=v1(P,2),Z=$[0],R=$[1],J=Y.useState(0),X=v1(J,2),Q=X[0],s1=X[1],e1=D||N,l1=a>0&&c,f1=function(){I(y)},Z1=function(t1){(t1.key==="Enter"||t1.code==="Enter"||t1.keyCode===Qo.ENTER)&&f1()};Y.useEffect(function(){if(!e1&&a>0){var b1=Date.now()-Q,t1=setTimeout(function(){f1()},a*1e3-Q);return function(){m&&clearTimeout(t1),s1(Date.now()-b1)}}},[a,e1,O]),Y.useEffect(function(){if(!e1&&l1&&(m||Q===0)){var b1=performance.now(),t1,C1=function ie(){cancelAnimationFrame(t1),t1=requestAnimationFrame(function(de){var X1=de+Q-b1,j1=Math.min(X1/(a*1e3),1);R(j1*100),j1<1&&ie()})};return C1(),function(){m&&cancelAnimationFrame(t1)}}},[a,Q,e1,l1,O]);var k1=Y.useMemo(function(){return O1(g)==="object"&&g!==null?g:g?{closeIcon:E}:{}},[g,E]),i1=i0(k1,!0),S1=100-(!Z||Z<0?0:Z>100?100:Z),E1="".concat(n,"-notice");return Y.createElement("div",fe({},w,{ref:t,className:ke(E1,i,p1({},"".concat(E1,"-closable"),g)),style:r,onMouseEnter:function(t1){var C1;A(!0),w==null||(C1=w.onMouseEnter)===null||C1===void 0||C1.call(w,t1)},onMouseLeave:function(t1){var C1;A(!1),w==null||(C1=w.onMouseLeave)===null||C1===void 0||C1.call(w,t1)},onClick:h}),Y.createElement("div",{className:"".concat(E1,"-content")},f),g&&Y.createElement("a",fe({tabIndex:0,className:"".concat(E1,"-close"),onKeyDown:Z1,"aria-label":"Close"},i1,{onClick:function(t1){t1.preventDefault(),t1.stopPropagation(),f1()}}),k1.closeIcon),l1&&Y.createElement("progress",{className:"".concat(E1,"-progress"),max:"100",value:S1},S1+"%"))}),a0=s.createContext({}),Q9=8,K9=3,e6=16,s0=function(t){var n={offset:Q9,threshold:K9,gap:e6};if(t&&O1(t)==="object"){var r,i,o;n.offset=(r=t.offset)!==null&&r!==void 0?r:Q9,n.threshold=(i=t.threshold)!==null&&i!==void 0?i:K9,n.gap=(o=t.gap)!==null&&o!==void 0?o:e6}return[!!t,n]},l0=["className","style","classNames","styles"],c0=function(t){var n=t.configList,r=t.placement,i=t.prefixCls,o=t.className,a=t.style,c=t.motion,d=t.onAllNoticeRemoved,m=t.onNoticeClose,y=t.stack,f=s.useContext(a0),g=f.classNames,L=s.useRef({}),E=s.useState(null),w=v1(E,2),h=w[0],I=w[1],O=s.useState([]),D=v1(O,2),k=D[0],H=D[1],N=n.map(function(e1){return{config:e1,key:String(e1.key)}}),A=s0(y),P=v1(A,2),$=P[0],Z=P[1],R=Z.offset,J=Z.threshold,X=Z.gap,Q=$&&(k.length>0||N.length<=J),s1=typeof c=="function"?c(r):c;return s.useEffect(function(){$&&k.length>1&&H(function(e1){return e1.filter(function(l1){return N.some(function(f1){var Z1=f1.key;return l1===Z1})})})},[k,N,$]),s.useEffect(function(){var e1;if($&&L.current[(e1=N[N.length-1])===null||e1===void 0?void 0:e1.key]){var l1;I(L.current[(l1=N[N.length-1])===null||l1===void 0?void 0:l1.key])}},[N,$]),s.createElement(Jo,fe({key:r,className:ke(i,"".concat(i,"-").concat(r),g==null?void 0:g.list,o,p1(p1({},"".concat(i,"-stack"),!!$),"".concat(i,"-stack-expanded"),Q)),style:a,keys:N,motionAppear:!0},s1,{onAllRemoved:function(){d(r)}}),function(e1,l1){var f1=e1.config,Z1=e1.className,k1=e1.style,i1=e1.index,S1=f1,E1=S1.key,b1=S1.times,t1=String(E1),C1=f1,ie=C1.className,de=C1.style,X1=C1.classNames,j1=C1.styles,ye=et(C1,l0),R1=N.findIndex(function(A1){return A1.key===t1}),oe={};if($){var J1=N.length-1-(R1>-1?R1:i1-1),D1=r==="top"||r==="bottom"?"-50%":"0";if(J1>0){var T1,ae,W1;oe.height=Q?(T1=L.current[t1])===null||T1===void 0?void 0:T1.offsetHeight:h==null?void 0:h.offsetHeight;for(var Q1=0,G1=0;G1<J1;G1++){var u1;Q1+=((u1=L.current[N[N.length-1-G1].key])===null||u1===void 0?void 0:u1.offsetHeight)+X}var d1=(Q?Q1:J1*R)*(r.startsWith("top")?1:-1),H1=!Q&&h!==null&&h!==void 0&&h.offsetWidth&&(ae=L.current[t1])!==null&&ae!==void 0&&ae.offsetWidth?((h==null?void 0:h.offsetWidth)-R*2*(J1<3?J1:3))/((W1=L.current[t1])===null||W1===void 0?void 0:W1.offsetWidth):1;oe.transform="translate3d(".concat(D1,", ").concat(d1,"px, 0) scaleX(").concat(H1,")")}else oe.transform="translate3d(".concat(D1,", 0, 0)")}return s.createElement("div",{ref:l1,className:ke("".concat(i,"-notice-wrapper"),Z1,X1==null?void 0:X1.wrapper),style:n1(n1(n1({},k1),oe),j1==null?void 0:j1.wrapper),onMouseEnter:function(){return H(function(I1){return I1.includes(t1)?I1:[].concat(Ne(I1),[t1])})},onMouseLeave:function(){return H(function(I1){return I1.filter(function(ct){return ct!==t1})})}},s.createElement(o0,fe({},ye,{ref:function(I1){R1>-1?L.current[t1]=I1:delete L.current[t1]},prefixCls:i,classNames:X1,styles:j1,className:ke(ie,g==null?void 0:g.notice),style:de,times:b1,key:E1,eventKey:E1,onNoticeClose:m,hovering:$&&k.length>0})))})},u0=Y.forwardRef(function(e,t){var n=e.prefixCls,r=n===void 0?"rc-notification":n,i=e.container,o=e.motion,a=e.maxCount,c=e.className,d=e.style,m=e.onAllRemoved,y=e.stack,f=e.renderNotifications,g=Y.useState([]),L=v1(g,2),E=L[0],w=L[1],h=function($){var Z,R=E.find(function(J){return J.key===$});R==null||(Z=R.onClose)===null||Z===void 0||Z.call(R),w(function(J){return J.filter(function(X){return X.key!==$})})};Y.useImperativeHandle(t,function(){return{open:function($){w(function(Z){var R=Ne(Z),J=R.findIndex(function(s1){return s1.key===$.key}),X=n1({},$);if(J>=0){var Q;X.times=(((Q=Z[J])===null||Q===void 0?void 0:Q.times)||0)+1,R[J]=X}else X.times=0,R.push(X);return a>0&&R.length>a&&(R=R.slice(-a)),R})},close:function($){h($)},destroy:function(){w([])}}});var I=Y.useState({}),O=v1(I,2),D=O[0],k=O[1];Y.useEffect(function(){var P={};E.forEach(function($){var Z=$.placement,R=Z===void 0?"topRight":Z;R&&(P[R]=P[R]||[],P[R].push($))}),Object.keys(D).forEach(function($){P[$]=P[$]||[]}),k(P)},[E]);var H=function($){k(function(Z){var R=n1({},Z),J=R[$]||[];return J.length||delete R[$],R})},N=Y.useRef(!1);if(Y.useEffect(function(){Object.keys(D).length>0?N.current=!0:N.current&&(m==null||m(),N.current=!1)},[D]),!i)return null;var A=Object.keys(D);return Se.createPortal(Y.createElement(Y.Fragment,null,A.map(function(P){var $=D[P],Z=Y.createElement(c0,{key:P,configList:$,placement:P,prefixCls:r,className:c==null?void 0:c(P),style:d==null?void 0:d(P),motion:o,onNoticeClose:h,onAllNoticeRemoved:H,stack:y});return f?f(Z,{prefixCls:r,key:P}):Z})),i)}),f0=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"],d0=function(){return document.body},t6=0;function h0(){for(var e={},t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(i){i&&Object.keys(i).forEach(function(o){var a=i[o];a!==void 0&&(e[o]=a)})}),e}function v0(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.getContainer,n=t===void 0?d0:t,r=e.motion,i=e.prefixCls,o=e.maxCount,a=e.className,c=e.style,d=e.onAllRemoved,m=e.stack,y=e.renderNotifications,f=et(e,f0),g=Y.useState(),L=v1(g,2),E=L[0],w=L[1],h=Y.useRef(),I=Y.createElement(u0,{container:E,ref:h,prefixCls:i,motion:r,maxCount:o,className:a,style:c,onAllRemoved:d,stack:m,renderNotifications:y}),O=Y.useState([]),D=v1(O,2),k=D[0],H=D[1],N=Y.useMemo(function(){return{open:function(P){var $=h0(f,P);($.key===null||$.key===void 0)&&($.key="rc-notification-".concat(t6),t6+=1),H(function(Z){return[].concat(Ne(Z),[{type:"open",config:$}])})},close:function(P){H(function($){return[].concat(Ne($),[{type:"close",key:P}])})},destroy:function(){H(function(P){return[].concat(Ne(P),[{type:"destroy"}])})}}},[]);return Y.useEffect(function(){w(n())}),Y.useEffect(function(){if(h.current&&k.length){k.forEach(function($){switch($.type){case"open":h.current.open($.config);break;case"close":h.current.close($.key);break;case"destroy":h.current.destroy();break}});var A,P;H(function($){return(A!==$||!P)&&(A=$,P=$.filter(function(Z){return!k.includes(Z)})),P})}},[k]),[N,I]}const z1={notification:"univer-notification",notificationIcon:"univer-notification-icon",notificationIconSuccess:"univer-notification-icon-success",notificationIconInfo:"univer-notification-icon-info",notificationIconWarning:"univer-notification-icon-warning",notificationIconError:"univer-notification-icon-error",notificationContentContainer:"univer-notification-content-container",notificationTitle:"univer-notification-title",notificationContent:"univer-notification-content",notificationContentEllipsis:"univer-notification-content-ellipsis",notificationFade:"univer-notification-fade"},C0={success:v.jsx(lr,{className:z1.notificationIconSuccess}),info:v.jsx(ht,{className:z1.notificationIconInfo}),warning:v.jsx(ht,{className:z1.notificationIconWarning}),error:v.jsx(Q3,{className:z1.notificationIconError})},n6=new q.Subject,m0=e=>{const{type:t,content:n,title:r,lines:i=0}=e,o=j.clsx(z1.notificationContent,{[z1.notificationContentEllipsis]:i!==0});return v.jsxs(v.Fragment,{children:[v.jsx("span",{className:z1.notificationIcon,children:C0[t]}),v.jsxs("div",{className:z1.notificationContentContainer,children:[v.jsx("span",{className:z1.notificationTitle,children:r}),v.jsx("span",{className:o,style:{WebkitLineClamp:i},children:n})]})]})};function g0(){const{mountContainer:e}=s.useContext(j.ConfigContext);if(!e)return null;const[t,n]=v0({prefixCls:z1.notification,maxCount:3,closeIcon:v.jsx(Pe,{}),getContainer:()=>e,motion:{motionName:z1.notificationFade,motionAppear:!0,motionEnter:!0,motionLeave:!0}}),r=s.useRef(n6);return s.useEffect(()=>{const i=r.current.subscribe(o=>{var a,c,d;t.open({content:v.jsx(m0,{content:o.content,type:o.type,title:o.title,lines:o.lines}),key:o.key,placement:(a=o.placement)!=null?a:"topRight",duration:(c=o.duration)!=null?c:4.5,closable:(d=o.closable)!=null?d:!0})});return()=>{i.unsubscribe()}},[t]),v.jsx(v.Fragment,{children:n})}const p0={show:e=>{n6.next(e)}};var b0=Object.getOwnPropertyDescriptor,y0=(e,t,n,r)=>{for(var i=r>1?void 0:r?b0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=a(i)||i);return i},r6=(e,t)=>(n,r)=>t(n,r,e);C.DesktopNotificationService=class extends b.Disposable{constructor(t,n){super(),this._injector=t,this._uiPartsService=n,this._initUIPart()}show(t){return p0.show(t),b.toDisposable(()=>{})}_initUIPart(){this.disposeWithMe(this._uiPartsService.registerComponent(c1.GLOBAL,()=>z.connectInjector(g0,this._injector)))}},C.DesktopNotificationService=y0([r6(0,b.Inject(b.Injector)),r6(1,U1)],C.DesktopNotificationService);class a3{constructor(){G(this,"_sidebarOptions",{});G(this,"sidebarOptions$",new q.Subject);G(this,"scrollEvent$",new q.Subject);G(this,"_container")}get visible(){return this._sidebarOptions.visible||!1}get options(){return this._sidebarOptions}open(t){return this._sidebarOptions={...t,id:t.id,visible:!0},this.sidebarOptions$.next(this._sidebarOptions),b.toDisposable(()=>{this.close()})}close(t){t&&this._sidebarOptions.id!==t||(this._sidebarOptions={...this._sidebarOptions,visible:!1},this.sidebarOptions$.next(this._sidebarOptions),this._sidebarOptions.onClose&&this._sidebarOptions.onClose())}getContainer(){return this._container}setContainer(t){this._container=t}}var L0=Object.getOwnPropertyDescriptor,S0=(e,t,n,r)=>{for(var i=r>1?void 0:r?L0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=a(i)||i);return i},_0=(e,t)=>(n,r)=>t(n,r,e);C.DesktopZenZoneService=class{constructor(t){G(this,"visible$",new q.BehaviorSubject(!1));G(this,"componentKey$",new q.ReplaySubject);G(this,"_temporaryHidden$",new q.BehaviorSubject(!1));G(this,"temporaryHidden$",this._temporaryHidden$.asObservable());G(this,"_visible",!1);this._componentManager=t}get visible(){return this._visible}get temporaryHidden(){return this._temporaryHidden$.getValue()}dispose(){this.visible$.next(!1),this.visible$.complete(),this.componentKey$.complete()}hide(){this._temporaryHidden$.next(!0)}show(){this._temporaryHidden$.next(!1)}set(t,n){return this._componentManager.register(t,n),this.componentKey$.next(t),b.toDisposable(()=>{this._componentManager.delete(t),this.visible$.complete(),this.componentKey$.complete()})}open(){this._visible=!0,this.visible$.next(!0)}close(){this._visible=!1,this.visible$.next(!1)}},C.DesktopZenZoneService=S0([_0(0,b.Inject(N1))],C.DesktopZenZoneService);var w0=Object.defineProperty,M0=Object.getOwnPropertyDescriptor,E0=(e,t,n)=>t in e?w0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,H0=(e,t,n,r)=>{for(var i=r>1?void 0:r?M0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=a(i)||i);return i},I0=(e,t)=>(n,r)=>t(n,r,e),O0=(e,t,n)=>E0(e,t+"",n);const D0="UNIVER_MOBILE_UI_PLUGIN";C.UniverMobileUIPlugin=class extends b.Plugin{constructor(t,n){super(),this._config=t,this._injector=n}onStarting(){b.mergeOverrideWithDependencies([[N1],[we],[Be],[U1,{useClass:_t}],[ee,{useClass:C.DesktopLayoutService}],[Ce,{useClass:C.ShortcutService}],[ze,{useClass:St}],[Y1,{useClass:C.MenuManagerService}],[Te,{useClass:Dt}],[Ft,{useClass:C.BrowserClipboardService,lazy:!0}],[Ve,{useClass:C.DesktopNotificationService,lazy:!0}],[Je,{useClass:C.DesktopDialogService,lazy:!0}],[Xe,{useClass:C.DesktopConfirmService,lazy:!0}],[ve,{useClass:a3,lazy:!0}],[Ye,{useClass:C.DesktopZenZoneService,lazy:!0}],[Ge,{useClass:C.DesktopGlobalZoneService,lazy:!0}],[Fe,{useClass:C.DesktopMessageService,lazy:!0}],[b.ILocalStorageService,{useClass:zt,lazy:!0}],[xt,{useClass:C.DesktopBeforeCloseService}],[Re,{useClass:Mt}],[je],[De,{useFactory:n=>n.createInstance(At,this._config),deps:[b.Injector]}],[C.SharedController],[C.ErrorController]],this._config.override).forEach(n=>this._injector.add(n)),this._injector.get(De),this._injector.get(C.ErrorController)}},O0(C.UniverMobileUIPlugin,"pluginName",D0),C.UniverMobileUIPlugin=H0([b.DependentOn(_e.UniverRenderEnginePlugin),I0(1,b.Inject(b.Injector))],C.UniverMobileUIPlugin);class i6 extends b.Disposable{openFile(t){return new Promise(n=>{var i,o;const r=document.createElement("input");r.type="file",r.accept=(i=t==null?void 0:t.accept)!=null?i:"",r.multiple=(o=t==null?void 0:t.multiple)!=null?o:!1,r.onchange=a=>{const c=a.target.files;c&&n(Array.from(c))},r.click()})}downloadFile(t,n){const r=document.createElement("a");r.download=n,r.href=window.URL.createObjectURL(t),r.click()}}const o6=b.createIdentifier("univer-ui.local-file.service"),T0=e=>{const n=z.useDependency(ve).getContainer();s.useEffect(()=>{if(n)return n.addEventListener("mousedown",e),()=>{n.removeEventListener("mousedown",e)}},[e,n])};var V0=Object.defineProperty,N0=Object.getOwnPropertyDescriptor,k0=(e,t,n)=>t in e?V0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,A0=(e,t,n,r)=>{for(var i=r>1?void 0:r?N0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=a(i)||i);return i},s3=(e,t)=>(n,r)=>t(n,r,e),x0=(e,t,n)=>k0(e,t+"",n);const a6="UNIVER_UI_PLUGIN",s6="DISABLE_AUTO_FOCUS";C.UniverUIPlugin=class extends b.Plugin{constructor(t=$r,n,r,i){super(),this._config=t,this._contextService=n,this._injector=r,this._configService=i;const{menu:o,...a}=b.merge({},$r,this._config);a.disableAutoFocus&&this._contextService.setContextValue(s6,!0),o&&this._configService.setConfig("menu",o,{merge:!0}),this._configService.setConfig(Pr,a)}onStarting(){b.mergeOverrideWithDependencies([[N1],[we],[Be],[U1,{useClass:_t}],[ee,{useClass:C.DesktopLayoutService}],[Ce,{useClass:C.ShortcutService}],[ze,{useClass:St}],[Y1,{useClass:C.MenuManagerService}],[Te,{useClass:Dt}],[Ft,{useClass:C.BrowserClipboardService,lazy:!0}],[Ve,{useClass:C.DesktopNotificationService,lazy:!0}],[Je,{useClass:C.DesktopDialogService,lazy:!0}],[Xe,{useClass:C.DesktopConfirmService,lazy:!0}],[ve,{useClass:a3,lazy:!0}],[Ye,{useClass:C.DesktopZenZoneService,lazy:!0}],[Ge,{useClass:C.DesktopGlobalZoneService,lazy:!0}],[Fe,{useClass:C.DesktopMessageService,lazy:!0}],[b.ILocalStorageService,{useClass:zt,lazy:!0}],[xt,{useClass:C.DesktopBeforeCloseService}],[o6,{useClass:i6}],[Re,{useClass:Mt}],[je],[De,{useFactory:n=>n.createInstance(C.DesktopUIController,this._config),deps:[b.Injector]}],[C.SharedController],[C.ErrorController],[C.ShortcutPanelController]],this._config.override).forEach(n=>this._injector.add(n)),this._injector.get(De),this._injector.get(C.ErrorController)}onReady(){this._injector.get(C.SharedController)}onSteady(){this._injector.get(C.ShortcutPanelController)}},x0(C.UniverUIPlugin,"pluginName",a6),C.UniverUIPlugin=A0([b.DependentOn(_e.UniverRenderEnginePlugin),s3(1,b.IContextService),s3(2,b.Inject(b.Injector)),s3(3,b.IConfigService)],C.UniverUIPlugin);function at(e){return e.length===0?e:e.replace(/^\s+|\s+$/gm,"")}const P0=.75,l6=78,c6=9,u6="rgba(0,0,0,0)",f6="rgb(0,0,0)";function l3(e){var c;let t=e.childNodes;if(t.length===0)return e.textContent;if(t[0].nodeName==="DIV"&&(t=t[0].childNodes),t.length===1&&t[0].nodeName==="#text")return t[0].textContent;const n=[];let r=0,i=0,o=e.textContent||"";o+=`\r
116
116
  `;for(let d=0;d<t.length;d++){let m=t[`${d}`],y;m.nodeName==="#text"?(y=(c=m.textContent)!=null?c:"",m=m.parentElement):y=m.innerText;const f=st(m);h6(y).forEach(L=>{const E=L.length;i+=E,r=i-E;const w=b.Tools.generateRandomId(6);n.push({sId:w,st:r,ed:i-1,ts:f})})}return b.Tools.generateRandomId(6),{id:b.Tools.generateRandomId(6),body:{dataStream:o,textRuns:n},documentStyle:{}}}function st(e,t=""){var a,c;let n=(c=(a=e==null?void 0:e.style)==null?void 0:a.cssText)!=null?c:"";if(n+=t,n=n.replace(/[\r\n]+/g,""),n.length===0)return{};const r=n.split(";"),i={},o={t:"",r:"",b:"",l:""};return r.forEach(d=>{var g;const m=d.toLowerCase(),y=at(m.substr(0,m.indexOf(":"))),f=at(m.substr(m.indexOf(":")+1));if(y==="font-weight")f==="bold"||f==="700"?i.bl=1:i.bl=0;else if(y==="font-style")f==="italic"?i.it=1:i.it=0;else if(y==="font-family"){const L=at(d),E=W0(L);i.ff=E}else if(y==="font-size"){let L=Number.parseInt(f);n.indexOf("vertical-align")>-1&&(n.indexOf("sub")>-1||n.indexOf("sup")>-1)&&(L*=2),f.indexOf("px")!==-1&&(L=R0(Number.parseInt(f,10))),i.fs=L}else if(y==="color"){const L=new b.ColorKit(f);i.cl={rgb:L.isValid?L.toRgbString():"rgb(0,0,0)"}}else if(y==="background"||y==="background-color"){const L=new b.ColorKit(f);if(L){const E=L.toRgbString();E!==u6&&E!==f6&&(i.bg={rgb:L.toRgbString()})}}else if(y==="text-decoration-line")f==="underline"?(i.ul||(i.ul={s:1}),i.ul.s=1):f==="line-through"?(i.st||(i.st={s:1}),i.st.s=1):f==="overline"&&(i.ol||(i.ol={s:1}),i.ol.s=1);else if(y==="text-decoration-color")i.hasOwnProperty("ul")&&(i.ul||(i.ul={s:1,cl:{rgb:f}}),i.ul.cl={rgb:f}),i.hasOwnProperty("st")&&(i.st||(i.st={s:1,cl:{rgb:f}}),i.st.cl={rgb:f}),i.hasOwnProperty("ol")&&(i.ol||(i.ol={s:1,cl:{rgb:f}}),i.ol.cl={rgb:f});else if(y==="text-decoration-style")i.hasOwnProperty("ul")&&(i.ul||(i.ul={s:1,t:Number(f)}),i.ul.t=Number(f)),i.hasOwnProperty("st")&&(i.st||(i.st={s:1,t:Number(f)}),i.st.t=Number(f)),i.hasOwnProperty("ol")&&(i.ol||(i.ol={s:1,t:Number(f)}),i.ol.t=Number(f));else if(y==="text-decoration"||y==="univer-strike"){const L=(g=f.split(" "))==null?void 0:g[0];L==="underline"?(i.ul||(i.ul={s:1}),i.ul.s=1):L==="line-through"?(i.st||(i.st={s:1}),i.st.s=1):L==="overline"&&(i.ol||(i.ol={s:1}),i.ol.s=1)}if(y==="univer-underline"&&(i.ul={s:1}),y==="vertical-align"&&(f==="sub"?i.va=b.BaselineOffset.SUBSCRIPT:f==="super"?i.va=b.BaselineOffset.SUPERSCRIPT:f==="top"?i.vt=1:f==="middle"?i.vt=2:f==="bottom"?i.vt=3:i.va=b.BaselineOffset.NORMAL),y==="transform"){const L=f.split(")"),E=L.findIndex(w=>w.includes("rotate"));if(E>-1){const w=L[E].match(/\d+/g);let h=0,I=0;w!=null&&w.length&&(h=+w[0]),e!=null&&e.dataset.vertical&&(I=+e.dataset.vertical),i.tr={a:h,v:I}}}if(y==="text-align"&&(f==="left"?i.ht=1:f==="center"?i.ht=2:f==="right"?i.ht=3:f==="justify"?i.ht=4:i.ht=0),i.tb!==1&&(y==="overflow-wrap"||y==="word-wrap"?f==="break-word"&&(i.tb=3):y==="text-overflow"?f==="clip"&&(i.tb=2):y==="text-break"&&f==="overflow"&&(i.tb=1)),y==="white-space"&&(f==="nowrap"?i.tb=1:f==="normal"?i.tb=3:f==="clip"&&(i.tb=2)),y==="border-color"){const L=d6(f,")");if(i.bd)for(const E in L)i.bd[E].cl.rgb=L[E];else{i.bd={b:{cl:{rgb:"#000"},s:0},t:{cl:{rgb:"#000"},s:0},l:{cl:{rgb:"#000"},s:0},r:{cl:{rgb:"#000"},s:0}};for(const E in L)i.bd[E].cl.rgb=L[E]}}if(y==="border-width"||y==="border-style"){const L=d6(f," ");for(const E in L)o[E]+=` ${L[E]}`;i.bd?(i.bd.b.s=b.getBorderStyleType(o.b),i.bd.t.s=b.getBorderStyleType(o.t),i.bd.l.s=b.getBorderStyleType(o.l),i.bd.r.s=b.getBorderStyleType(o.r)):i.bd={b:{cl:{rgb:"#000"},s:b.getBorderStyleType(o.b)},t:{cl:{rgb:"#000"},s:b.getBorderStyleType(o.t)},l:{cl:{rgb:"#000"},s:b.getBorderStyleType(o.l)},r:{cl:{rgb:"#000"},s:b.getBorderStyleType(o.r)}}}if(y==="border-bottom"||y==="border-top"||y==="border-left"||y==="border-right"||y==="border"){i.bd||(i.bd={});const L=f.split(" "),E=`${L[0]} ${L[1]}`;L.splice(0,2);const w=L.join("");if(b.getBorderStyleType(E)!==b.BorderStyleTypes.NONE&&w){const I={cl:{rgb:w},s:b.getBorderStyleType(E)};y==="border-bottom"?i.bd.b=f==="none"?null:I:y==="border-top"?i.bd.t=f==="none"?null:I:y==="border-left"?i.bd.l=f==="none"?null:I:y==="border-right"?i.bd.r=f==="none"?null:I:y==="border"&&(i.bd={r:f==="none"?null:I,t:f==="none"?null:I,b:f==="none"?null:I,l:f==="none"?null:I})}}else if(y==="--data-rotate"){const L=/[+-]?\d+/,E=f.match(L);f==="(0deg ,1)"?i.tr={a:0,v:1}:E&&(i.tr={a:Number(E[0])})}}),Object.keys(i).forEach(d=>{typeof i[d]=="object"&&!Object.keys(i[d]).length&&delete i[d]}),i}function d6(e,t){let n;t===" "?n=e.trim().split(t):n=e.trim().split(t).slice(0,-1),n.forEach(i=>`${i.trim()})`);let r={};return n.length===1?r={t:n[0],r:n[0],b:n[0],l:n[0]}:n.length===2?r={t:n[0],r:n[1],b:n[0],l:n[1]}:n.length===3?r={t:n[0],r:n[1],b:n[2],l:n[1]}:n.length===4&&(r={t:n[0],r:n[1],b:n[2],l:n[3]}),r}function h6(e){if(e==="")return[e];const t=/(?:(\n+.+)|(.+))/g;return e.match(t).map(i=>i.replace(/\n/g,`\r
117
117
  `))}function $0(e){const t=document.createElement("DIV"),n=[];t.innerHTML=e;const r=t.querySelectorAll("table col");if(!r.length)return[];for(let i=0;i<r.length;i++){const o=r[i],a=o.getAttribute("span");if(a&&+a>1)for(let c=0;c<+a;c++){const d=lt(o.getAttribute("width"),72);n.push(d)}else{const c=lt(o.getAttribute("width"),72);n.push(c)}}return n}function lt(e,t){if(!e)return t;let n;return e.includes("pt")?n=_e.ptToPx(Number.parseFloat(e)):e.includes("px")?n=Number.parseFloat(e):n=Number.parseFloat(e)*72/96,n}function U0(e){const t=document.createElement("DIV"),n=[];t.innerHTML=e;const r=t.querySelectorAll("table tr");if(!r.length)return[];for(let i=0;i<r.length;i++){const a=r[i].querySelectorAll("td");let c=lt(a[0].style.height,19);for(let d=0;d<a.length;d++){const m=a[d].getAttribute("rowSpan");if(!(m&&+m>1)){c=lt(a[d].style.height,19);break}}n.push(c)}return n}function F0(e){let t=[];const n=document.createElement("DIV");if(n.innerHTML=e,t=new Array(n.querySelectorAll("table tr").length),!t.length)return[];let r=0;const i=n.querySelectorAll("table tr");i[0].querySelectorAll("td").forEach(c=>{let d=0;const m=c.getAttribute("colSpan");m!==null?d=+m:d=1,r+=d});for(let c=0;c<t.length;c++)t[c]=new Array(r);let a=0;return i.forEach(c=>{let d=0;c.querySelectorAll("td").forEach(m=>{var L,E;const y={};if(m.querySelectorAll("span").length||m.querySelectorAll("font").length){const w=l3(m);typeof w!="string"&&(y.p=w)}const f=m.innerText;f.trim().length===0?y.v="":y.v=f;const g=st(m);for(b.Tools.isPlainObject(g)&&(y.s=g);d<r&&t[a][d]!=null;)d++;if(d!==r){if(t[a][d]==null){t[a][d]=y;const w=(L=Number(m.getAttribute("rowSpan")))!=null?L:1,h=(E=Number(m.getAttribute("colSpan")))!=null?E:1;if(w>1||h>1){const I={rs:+w-1,cs:+h-1,r:a,c:d};t[a][d].mc=I;for(let O=0;O<w;O++)for(let D=0;D<h;D++)O===0&&D===0||(t[a+O][d+D]={mc:null})}}d++}}),a++}),t}function B0(e){const t=[],n=document.createElement("DIV");n.innerHTML=e;const i=e.replace(/\r/g,"").split(`
118
118
  `),o=i[0].split(" ").length;for(let a=0;a<i.length;a++)i[a].split(" ").length<o||t.push(i[a].split(" "));for(let a=0;a<t.length;a++)for(let c=0;c<t[a].length;c++)t[a][c].length?t[a][c]={v:t[a][c]||"",m:t[a][c]||""}:t[a][c]=null;return t}function z0(e,t){e.length,e[0].length;let n=0,r=0;t&&(n=t.startRow,r=t.startColumn);const i=[];for(let o=0;o<e.length;o++)for(let a=0;a<e[o].length;a++)if(e[o][a]&&typeof e[o][a]=="object"&&"mc"in e[o][a])if(e[o][a].mc){const c=e[o][a].mc,d=c.r+n,m=d+c.rs,y=c.c+r,f=y+c.cs;i.push({startRow:d,endRow:m,startColumn:y,endColumn:f}),delete e[o][a].mc}else e[o][a]=null;return{data:e,mergeData:i}}function Z0(e){var m;let t=[];const n=document.createElement("html");n.innerHTML=e;const r=(m=n.querySelector("style"))==null?void 0:m.innerText;if(!r)return;const i=j0(r);if(t=new Array(n.querySelectorAll("table tr").length),!t.length)return[];let o=0;const a=n.querySelectorAll("table tr");a[0].querySelectorAll("td").forEach(y=>{let f=0;const g=y.getAttribute("colSpan");g!==null?f=+g:f=1,o+=f});for(let y=0;y<t.length;y++)t[y]=new Array(o);let d=0;return a.forEach(y=>{let f=0;y.querySelectorAll("td").forEach(g=>{var I,O;const L={};if(g.querySelectorAll("span").length||g.querySelectorAll("font").length){const D=l3(g);typeof D!="string"&&(L.p=D)}const E=g.innerText;E.trim().length===0?L.v="":L.v=E;let w="";for(const D in i)g.classList.contains(D)&&(w+=i[D]);const h=st(g,w);for(b.Tools.isPlainObject(h)&&(L.s=h);f<o&&t[d][f]!=null;)f++;if(f!==o){if(t[d][f]==null){t[d][f]=L;const D=(I=Number(g.getAttribute("rowSpan")))!=null?I:1,k=(O=Number(g.getAttribute("colSpan")))!=null?O:1;if(D>1||k>1){const H={rs:+D-1,cs:+k-1,r:d,c:f};t[d][f].mc=H;for(let N=0;N<D;N++)for(let A=0;A<k;A++)N===0&&A===0||(t[d+N][f+A]={mc:null})}}f++}}),d++}),t}function j0(e){const t={},n=e.replaceAll("<!--","").replaceAll("-->","").trim(),r=n==null?void 0:n.replaceAll(" ","").replaceAll(`
@@ -175,4 +175,4 @@ ${a.DataStreamTreeTokenType.TABLE_CELL_END}`;break}}}_processBeforeLink(t,e){ret
175
175
 
176
176
 
177
177
  // index
178
- (function(e,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("@univerjs/docs"),require("@univerjs/docs-ui"),require("@univerjs/engine-formula"),require("@univerjs/engine-render"),require("@univerjs/ui"),require("@univerjs/docs-ui/facade")):typeof define=="function"&&define.amd?define(["exports","@univerjs/docs","@univerjs/docs-ui","@univerjs/engine-formula","@univerjs/engine-render","@univerjs/ui","@univerjs/docs-ui/facade"],n):(e=typeof globalThis<"u"?globalThis:e||self,n(e.UniverPresetDocsCore={},e.UniverDocs,e.UniverDocsUi,e.UniverEngineFormula,e.UniverEngineRender,e.UniverUi))})(this,function(e,n,i,r,u,s){"use strict";function o(t={}){const{container:v="app",header:d,footer:c,toolbar:f,menu:U,contextMenu:j,disableAutoFocus:g}=t;return{plugins:[n.UniverDocsPlugin,u.UniverRenderEnginePlugin,r.UniverFormulaEnginePlugin,[s.UniverUIPlugin,{container:v,header:d,footer:c,toolbar:f,menu:U,contextMenu:j,disableAutoFocus:g}],i.UniverDocsUIPlugin]}}e.UniverDocsCorePreset=o,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
178
+ (function(e,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("@univerjs/docs"),require("@univerjs/docs-ui"),require("@univerjs/engine-formula"),require("@univerjs/engine-render"),require("@univerjs/network"),require("@univerjs/ui"),require("@univerjs/network/facade"),require("@univerjs/docs-ui/facade")):typeof define=="function"&&define.amd?define(["exports","@univerjs/docs","@univerjs/docs-ui","@univerjs/engine-formula","@univerjs/engine-render","@univerjs/network","@univerjs/ui","@univerjs/network/facade","@univerjs/docs-ui/facade"],n):(e=typeof globalThis<"u"?globalThis:e||self,n(e.UniverPresetDocsCore={},e.UniverDocs,e.UniverDocsUi,e.UniverEngineFormula,e.UniverEngineRender,e.UniverNetwork,e.UniverUi))})(this,function(e,n,i,r,u,s,o){"use strict";function t(v={}){const{container:d="app",header:c,footer:f,toolbar:U,menu:j,contextMenu:a,disableAutoFocus:g}=v;return{plugins:[s.UniverNetworkPlugin,n.UniverDocsPlugin,u.UniverRenderEnginePlugin,r.UniverFormulaEnginePlugin,[o.UniverUIPlugin,{container:d,header:c,footer:f,toolbar:U,menu:j,contextMenu:a,disableAutoFocus:g}],i.UniverDocsUIPlugin]}}e.UniverDocsCorePreset=t,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs/preset-docs-core",
3
- "version": "0.6.4-nightly.202503101606",
3
+ "version": "0.6.4-nightly.202503111607",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -57,15 +57,16 @@
57
57
  "rxjs": ">=7.0.0"
58
58
  },
59
59
  "dependencies": {
60
- "@univerjs/design": "0.6.4-nightly.202503101606",
61
- "@univerjs/docs": "0.6.4-nightly.202503101606",
62
- "@univerjs/docs-ui": "0.6.4-nightly.202503101606",
63
- "@univerjs/engine-formula": "0.6.4-nightly.202503101606",
64
- "@univerjs/engine-render": "0.6.4-nightly.202503101606",
65
- "@univerjs/ui": "0.6.4-nightly.202503101606"
60
+ "@univerjs/design": "0.6.4-nightly.202503111607",
61
+ "@univerjs/docs": "0.6.4-nightly.202503111607",
62
+ "@univerjs/docs-ui": "0.6.4-nightly.202503111607",
63
+ "@univerjs/engine-formula": "0.6.4-nightly.202503111607",
64
+ "@univerjs/engine-render": "0.6.4-nightly.202503111607",
65
+ "@univerjs/network": "0.6.4-nightly.202503111607",
66
+ "@univerjs/ui": "0.6.4-nightly.202503111607"
66
67
  },
67
68
  "devDependencies": {
68
- "@univerjs/core": "0.6.4-nightly.202503101606",
69
+ "@univerjs/core": "0.6.4-nightly.202503111607",
69
70
  "typescript": "^5.8.2",
70
71
  "@univerjs-infra/shared": "0.6.4"
71
72
  },