@univerjs-pro/docs-shape-ui 1.5.0 → 1.5.2
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 +1 -1
- package/lib/cjs/locale/ar-SA.js +1 -1
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/de-DE.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/id-ID.js +1 -1
- package/lib/cjs/locale/it-IT.js +1 -1
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/pl-PL.js +1 -1
- package/lib/cjs/locale/pt-BR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-HK.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/ar-SA.js +1 -1
- package/lib/es/locale/ca-ES.js +1 -1
- package/lib/es/locale/de-DE.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/es-ES.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/fr-FR.js +1 -1
- package/lib/es/locale/id-ID.js +1 -1
- package/lib/es/locale/it-IT.js +1 -1
- package/lib/es/locale/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.js +1 -1
- package/lib/es/locale/pl-PL.js +1 -1
- package/lib/es/locale/pt-BR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/sk-SK.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-HK.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/ar-SA.js +1 -1
- package/lib/locale/ca-ES.js +1 -1
- package/lib/locale/de-DE.js +1 -1
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/es-ES.js +1 -1
- package/lib/locale/fa-IR.js +1 -1
- package/lib/locale/fr-FR.js +1 -1
- package/lib/locale/id-ID.js +1 -1
- package/lib/locale/it-IT.js +1 -1
- package/lib/locale/ja-JP.js +1 -1
- package/lib/locale/ko-KR.js +1 -1
- package/lib/locale/pl-PL.js +1 -1
- package/lib/locale/pt-BR.js +1 -1
- package/lib/locale/ru-RU.js +1 -1
- package/lib/locale/sk-SK.js +1 -1
- package/lib/locale/vi-VN.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-HK.js +1 -1
- package/lib/locale/zh-TW.js +1 -1
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +21 -20
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xac088e=_0xa70b;(function(_0x1ebfaf,_0x436864){const _0x3d8022=_0xa70b,_0x9379dd=_0x1ebfaf();while(!![]){try{const _0x2638a2=parseInt(_0x3d8022(0x445))/0x1*(parseInt(_0x3d8022(0x2d9))/0x2)+parseInt(_0x3d8022(0x272))/0x3+-parseInt(_0x3d8022(0x45b))/0x4+parseInt(_0x3d8022(0x39f))/0x5+parseInt(_0x3d8022(0x377))/0x6+-parseInt(_0x3d8022(0x4a7))/0x7*(parseInt(_0x3d8022(0x3d5))/0x8)+-parseInt(_0x3d8022(0x1d6))/0x9*(-parseInt(_0x3d8022(0x297))/0xa);if(_0x2638a2===_0x436864)break;else _0x9379dd['push'](_0x9379dd['shift']());}catch(_0x2de193){_0x9379dd['push'](_0x9379dd['shift']());}}}(_0x404d,0x783fa),Object[_0xac088e(0x2e7)](exports,Symbol[_0xac088e(0x2c2)],{'value':_0xac088e(0x2ce)}));let e=require('@univerjs-pro/shape-editor-ui'),t=require('@univerjs/docs-ui'),n=require('@univerjs/ui'),r=require('@univerjs-pro/docs-shape'),i=require('@univerjs-pro/engine-shape'),a=require('@univerjs-pro/shape-editor'),o=require('@univerjs/core'),s=require('@univerjs/docs'),c=require('@univerjs/docs-drawing'),l=require('@univerjs/engine-render'),u=require('@univerjs/drawing'),d=require('@univerjs/drawing-ui'),f=require('react/jsx-runtime'),p=require('rxjs'),m=require('@univerjs-pro/license'),h=require('@univerjs/docs-drawing-ui'),g=require('@univerjs/icons'),_=require('@univerjs/design'),v=require('react'),y=require('@univerjs/protocol');function b(_0x61f37b,_0x2c74df){const _0x40f6a4=_0xac088e;if(_0x2c74df){if((0x0,i[_0x40f6a4(0x471)])(_0x61f37b)&&(_0x2c74df['startArrow']||_0x2c74df['endArrow']))return{'ln':{'startArrow':_0x2c74df[_0x40f6a4(0x40b)]?{'type':i[_0x40f6a4(0x1f2)][_0x40f6a4(0x3d2)],'size':i[_0x40f6a4(0x26e)][_0x40f6a4(0x216)]}:void 0x0,'endArrow':_0x2c74df[_0x40f6a4(0x349)]?{'type':i[_0x40f6a4(0x1f2)]['Arrow'],'size':i[_0x40f6a4(0x26e)]['Large']}:void 0x0}};if(_0x61f37b===i['ShapeTypeEnum'][_0x40f6a4(0x245)]&&(_0x2c74df['horizontal']||_0x2c74df['vertical']))return(0x0,a[_0x40f6a4(0x265)])({'fill':{'fillType':i[_0x40f6a4(0x484)][_0x40f6a4(0x334)],'color':'#3B82F6'},'isHorizontal':!!_0x2c74df[_0x40f6a4(0x4a5)],'stroke':{'lineStrokeType':i['ShapeLineTypeEnum']['SolidLine'],'width':0x1,'color':_0x40f6a4(0x352)}});}}function x(_0x735293,_0x54e9d4){const _0x4428c1=_0xac088e;var _0x28965f;let _0x2135a7=_0x54e9d4[_0x4428c1(0x256)]??'',_0x1fc100=(_0x28965f=_0x735293[_0x4428c1(0x28a)](_0x2135a7))==null?void 0x0:_0x28965f['getBody']();if(!_0x1fc100)return null;let _0x4c1cb6=_0x1fc100['paragraphs']??[],_0x175100=_0x4c1cb6[_0x4428c1(0x41f)](_0xd9ff67=>{const _0x5c083b=_0x4428c1;let _0x21bf9a=(0x0,o[_0x5c083b(0x247)])(_0x1fc100,_0xd9ff67);return _0x54e9d4[_0x5c083b(0x28d)]>=_0x21bf9a&&_0x54e9d4[_0x5c083b(0x28d)]<=_0xd9ff67[_0x5c083b(0x4ae)];})??_0x4c1cb6[_0x4c1cb6[_0x4428c1(0x1ee)]-0x1];return _0x175100?{'paragraphId':_0x175100[_0x4428c1(0x3e0)],'segmentId':_0x2135a7,'position':r[_0x4428c1(0x34f)][_0x4428c1(0x222)],'offset':_0x54e9d4[_0x4428c1(0x28d)]-(0x0,o[_0x4428c1(0x247)])(_0x1fc100,_0x175100)}:null;}function S(_0x3b58d8,_0x25ccc3,_0x352d94){const _0x128f34=_0xac088e;var _0x24be67,_0x2dff8f;if(!_0x352d94)return null;let _0x51bbf4=(_0x24be67=_0x3b58d8[_0x128f34(0x314)](l['IRenderManagerService'])[_0x128f34(0x4bd)](_0x25ccc3))==null?void 0x0:_0x24be67[_0x128f34(0x3e6)](t['DocParagraphMenuService'])[_0x128f34(0x3d1)];if(!_0x51bbf4)return null;let _0x55dd64=_0x352d94===_0x128f34(0x421)?{'startOffset':_0x51bbf4[_0x128f34(0x2d8)]['endOffset'],'endOffset':_0x51bbf4['moveRange'][_0x128f34(0x494)]}:_0x51bbf4[_0x128f34(0x31c)];return{'startOffset':_0x55dd64[_0x128f34(0x28d)],'endOffset':_0x55dd64[_0x128f34(0x494)],'collapsed':_0x55dd64['startOffset']===_0x55dd64[_0x128f34(0x494)],'segmentId':((_0x2dff8f=_0x51bbf4['paragraph'])==null?void 0x0:_0x2dff8f[_0x128f34(0x256)])??''};}const C={'type':o[_0xac088e(0x3b5)][_0xac088e(0x2c9)],'id':'doc.command.menu-insert-shape','handler':async(_0x2c5821,_0x2cb995)=>{const _0x567ce8=_0xac088e;let _0x111f3e=_0x2c5821[_0x567ce8(0x314)](o[_0x567ce8(0x257)])[_0x567ce8(0x3c7)](o[_0x567ce8(0x230)][_0x567ce8(0x2ba)]);if(!_0x111f3e)return!0x1;let _0x6d80f5=_0x2c5821['get'](o[_0x567ce8(0x2cf)]),_0x12d429=_0x111f3e[_0x567ce8(0x389)](),_0x393090=_0x2cb995['shapeId']??(0x0,o['generateRandomId'])(),_0x4bb7ce=_0x2cb995[_0x567ce8(0x4b0)]??r[_0x567ce8(0x1de)],_0x7a4f5b=_0x2cb995[_0x567ce8(0x3ed)]??r['DEFAULT_DOC_SHAPE_HEIGHT'],_0x203004=_0x2cb995['shapeData']??b(_0x2cb995[_0x567ce8(0x201)],_0x2cb995[_0x567ce8(0x498)]),_0x272e8a=S(_0x2c5821,_0x12d429,_0x2cb995['paragraphMenuPlacement'])??_0x2c5821[_0x567ce8(0x314)](s['DocSelectionManagerService'])[_0x567ce8(0x232)]();if(!_0x272e8a)return!0x1;let _0x302de7=x(_0x111f3e,_0x272e8a);return _0x302de7?!!_0x6d80f5[_0x567ce8(0x1e1)](r[_0x567ce8(0x1eb)]['id'],{'unitId':_0x12d429,'shapeId':_0x393090,'shapeType':_0x2cb995[_0x567ce8(0x201)],'shapeData':_0x203004,'transform':{'width':_0x4bb7ce,'height':_0x7a4f5b},'placement':{'wrappingStyle':c['TextWrappingStyle'][_0x567ce8(0x255)],'anchor':_0x302de7}}):!0x1;}},w=_0xac088e(0x31b),T='docs-shape-ui.ribbon.shape-format',E=_0xac088e(0x369),D=(0x0,o[_0xac088e(0x4f4)])('SHAPE_TEXT'),O=_0xac088e(0x42e),k='DocsShapeTextEditorContainer',A={'id':_0xac088e(0x400),'type':o[_0xac088e(0x3b5)][_0xac088e(0x2c9)],'handler':(_0x14564a,_0x3b84dc)=>{const _0x40463c=_0xac088e;let _0x315032=_0x14564a[_0x40463c(0x314)](n[_0x40463c(0x309)]),_0x20c9aa=_0x14564a[_0x40463c(0x314)](o[_0x40463c(0x2e2)]),_0x17d51b=_0x14564a['get'](u[_0x40463c(0x4ba)]);return(_0x3b84dc==null?void 0x0:_0x3b84dc[_0x40463c(0x201)])==='close'?(_0x315032['close'](E),!0x0):(_0x315032[_0x40463c(0x487)]({'id':E,'header':{'title':_0x20c9aa['t'](_0x40463c(0x4f9))},'children':{'label':E},'onClose':()=>{const _0x32097f=_0x40463c;_0x17d51b[_0x32097f(0x2c7)](null);},'width':0x168}),!0x0);}},j={'type':o[_0xac088e(0x3b5)]['OPERATION'],'id':_0xac088e(0x4b6),'handler'(){return!0x0;}};function M(_0x35f97a){const _0x2e03b9=_0xac088e;let _0x2446cc=_0x35f97a['get'](u['IDrawingManagerService'])[_0x2e03b9(0x2f0)](),_0x36733c=_0x2446cc['length']===0x1?_0x2446cc[0x0]:null;if(!_0x36733c||_0x36733c[_0x2e03b9(0x37c)]!==o['DrawingTypeEnum']['DRAWING_SHAPE'])return null;let _0x44f00c=_0x35f97a[_0x2e03b9(0x314)](r[_0x2e03b9(0x326)]),_0x383fcd=_0x44f00c[_0x2e03b9(0x3c2)](_0x36733c[_0x2e03b9(0x2e6)],_0x36733c['subUnitId'],_0x36733c[_0x2e03b9(0x270)]),_0x5a15c7=_0x44f00c[_0x2e03b9(0x4d8)](_0x36733c[_0x2e03b9(0x2e6)],_0x36733c[_0x2e03b9(0x390)],_0x36733c[_0x2e03b9(0x270)]);return _0x383fcd===void 0x0||!_0x5a15c7?null:{'drawing':_0x36733c,'shapeData':_0x5a15c7,'shapeType':_0x383fcd};}const N={'id':_0xac088e(0x4da),'type':o[_0xac088e(0x3b5)][_0xac088e(0x20a)],'handler':(_0xb439c9,_0x62c78c)=>{const _0x22b4b3=_0xac088e;let _0x1614d4=M(_0xb439c9),_0x1efdf5=(0x0,a[_0x22b4b3(0x1ff)])((_0x62c78c==null?void 0x0:_0x62c78c[_0x22b4b3(0x320)])??(_0x62c78c==null?void 0x0:_0x62c78c[_0x22b4b3(0x201)])??'');if(!_0x1614d4||!_0x1efdf5||_0x1efdf5[_0x22b4b3(0x348)]!==(0x0,a[_0x22b4b3(0x2fe)])(_0x1614d4[_0x22b4b3(0x485)]))return!0x1;let _0x182780=(0x0,a['applyQuickStyleToShapeData'])(_0x1614d4[_0x22b4b3(0x485)],_0x1efdf5);if(!_0x182780)return!0x1;let {drawing:_0x27cb34}=_0x1614d4;return _0xb439c9[_0x22b4b3(0x314)](o[_0x22b4b3(0x2cf)])[_0x22b4b3(0x290)](r[_0x22b4b3(0x218)]['id'],{'unitId':_0x27cb34['unitId'],'shapeId':_0x27cb34[_0x22b4b3(0x270)],'shapeData':_0x182780,'oldShapeJSON':{'oldShapeData':_0x1614d4[_0x22b4b3(0x485)]}});}},P={'id':'doc.operation.update-shape-type','type':o['CommandType'][_0xac088e(0x20a)],'handler':(_0x4b20fb,_0x3d7500)=>{const _0x4369c6=_0xac088e;let _0x35a9e7=M(_0x4b20fb),_0x186a6b=(_0x3d7500==null?void 0x0:_0x3d7500[_0x4369c6(0x492)])??(_0x3d7500==null?void 0x0:_0x3d7500[_0x4369c6(0x201)]);if(!_0x35a9e7||!_0x186a6b||(0x0,i[_0x4369c6(0x471)])(_0x35a9e7[_0x4369c6(0x492)])||(0x0,i[_0x4369c6(0x471)])(_0x186a6b))return!0x1;let _0x51ed27=(0x0,a['cloneShapeDataForType'])(_0x35a9e7[_0x4369c6(0x485)],_0x186a6b);if(!_0x51ed27)return!0x1;let {drawing:_0x37ac4f}=_0x35a9e7;return _0x4b20fb[_0x4369c6(0x314)](o[_0x4369c6(0x2cf)])['executeCommand'](r[_0x4369c6(0x218)]['id'],{'unitId':_0x37ac4f[_0x4369c6(0x2e6)],'shapeId':_0x37ac4f[_0x4369c6(0x270)],'shapeType':_0x186a6b,'shapeData':_0x51ed27,'replaceShapeData':!0x0,'oldShapeJSON':{'oldShapeType':_0x35a9e7[_0x4369c6(0x492)],'oldShapeData':_0x35a9e7[_0x4369c6(0x485)]}});}};function F(_0x44e3b5,_0x523302){return function(_0x5e86a5,_0x326164){_0x523302(_0x5e86a5,_0x326164,_0x44e3b5);};}function I(_0x161573,_0x2116df,_0x54f001,_0x2ca466){const _0x3a7391=_0xac088e;var _0x3617c2=arguments[_0x3a7391(0x1ee)],_0x249925=_0x3617c2<0x3?_0x2116df:_0x2ca466===null?_0x2ca466=Object[_0x3a7391(0x2fd)](_0x2116df,_0x54f001):_0x2ca466,_0x1cd7f4;if(typeof Reflect==_0x3a7391(0x4c0)&&typeof Reflect[_0x3a7391(0x1df)]==_0x3a7391(0x481))_0x249925=Reflect[_0x3a7391(0x1df)](_0x161573,_0x2116df,_0x54f001,_0x2ca466);else{for(var _0x41e001=_0x161573['length']-0x1;_0x41e001>=0x0;_0x41e001--)(_0x1cd7f4=_0x161573[_0x41e001])&&(_0x249925=(_0x3617c2<0x3?_0x1cd7f4(_0x249925):_0x3617c2>0x3?_0x1cd7f4(_0x2116df,_0x54f001,_0x249925):_0x1cd7f4(_0x2116df,_0x54f001))||_0x249925);}return _0x3617c2>0x3&&_0x249925&&Object[_0x3a7391(0x2e7)](_0x2116df,_0x54f001,_0x249925),_0x249925;}let L=class extends o[_0xac088e(0x1d9)]{constructor(_0x566955,_0x1366d3){const _0x27cf55=_0xac088e;super(),this['_clipService']=_0x566955,this[_0x27cf55(0x31f)]=_0x1366d3,this[_0x27cf55(0x480)](),this['_clipService'][_0x27cf55(0x3bb)](!0x0),this['disposeWithMe']({'dispose':()=>this['_clipService'][_0x27cf55(0x3bb)](!0x1)});}[_0xac088e(0x480)](){const _0x119e93=_0xac088e;let _0x500e29=new Map(),_0x161f91=this[_0x119e93(0x46c)][_0x119e93(0x347)]((_0x1f86e8,_0xfc4536,_0x1a8d8e,_0x7f4f42,_0x461707)=>{const _0x343c32=_0x119e93;let _0x5b9153=_0xfc4536;if(_0x5b9153===i[_0x343c32(0x436)][_0x343c32(0x467)]||_0xfc4536===_0x343c32(0x3be))return!0x1;try{let _0x279f6c=_0x500e29[_0x343c32(0x314)](_0xfc4536);return _0x279f6c||(_0x279f6c=new i[(_0x343c32(0x48e))](_0x5b9153,_0x343c32(0x396)+_0xfc4536),_0x500e29[_0x343c32(0x373)](_0xfc4536,_0x279f6c)),_0x279f6c[_0x343c32(0x4c7)](),_0x461707&&Object[_0x343c32(0x460)](_0x461707)['length']>0x0&&_0x279f6c[_0x343c32(0x2cd)]({'adjustValues':_0x461707},!0x0),_0x279f6c['updateContext']({'width':_0x1a8d8e,'height':_0x7f4f42}),_0x279f6c[_0x343c32(0x463)](_0x1f86e8,{'left':0x0,'top':0x0,'width':_0x1a8d8e,'height':_0x7f4f42});}catch{return!0x1;}});this[_0x119e93(0x38a)](_0x161f91),this[_0x119e93(0x38a)]({'dispose':()=>_0x500e29[_0x119e93(0x27d)]()});}[_0xac088e(0x269)](_0x2e3ca6,_0x273e63,_0x54d330,_0x54670e,_0x38f417){const _0x1d283f=_0xac088e;let _0x5b8ff4=this['_drawingManagerService']['getDrawingData'](_0x2e3ca6,_0x273e63)[_0x54d330];_0x5b8ff4&&_0x5b8ff4[_0x1d283f(0x37c)]===o['DrawingTypeEnum']['DRAWING_IMAGE']&&this[_0x1d283f(0x31f)][_0x1d283f(0x228)]([{..._0x5b8ff4,'prstGeom':_0x54670e,'adjustValues':_0x38f417}]);}};L=I([F(0x0,(0x0,o[_0xac088e(0x383)])(d['DrawingImageClipService'])),F(0x1,(0x0,o['Inject'])(u[_0xac088e(0x4ba)]))],L);const ee=_0xac088e(0x500),te=_0xac088e(0x4d2);function ne({onShapeClick:_0x406c8e,excludeGroups:_0x3a5e9a}){const _0x369233=_0xac088e;return(0x0,f[_0x369233(0x4de)])(e[_0x369233(0x44c)],{'excludeGroups':_0x3a5e9a,'onShapeClick':_0x406c8e,'scrollContainer':_0x369233(0x378)});}function re(){const _0x29dfd9=_0xac088e;let _0x3246ec=(0x0,n[_0x29dfd9(0x46d)])(u[_0x29dfd9(0x4ba)]),_0x2ff50c=(0x0,n[_0x29dfd9(0x46d)])(L);return _0x47d4f1=>{const _0x11a876=_0x29dfd9;let _0x3adc3c=_0x3246ec[_0x11a876(0x2f0)]()['find'](_0x106036=>_0x106036[_0x11a876(0x37c)]===o['DrawingTypeEnum'][_0x11a876(0x1e5)]);_0x3adc3c&&_0x2ff50c[_0x11a876(0x269)](_0x3adc3c[_0x11a876(0x2e6)],_0x3adc3c['subUnitId'],_0x3adc3c[_0x11a876(0x270)],_0x47d4f1[_0x11a876(0x348)]);};}function ie(){const _0x27f669=_0xac088e;let _0x345483=re();return(0x0,f[_0x27f669(0x4de)])(e[_0x27f669(0x3dc)],{'buttonLabel':_0x27f669(0x322),'excludeGroups':[e[_0x27f669(0x1e2)][_0x27f669(0x3c9)]],'onShapeClick':_0x345483});}function ae(){const _0x8ddc38=_0xac088e;let _0x255e45=(0x0,n[_0x8ddc38(0x46d)])(n[_0x8ddc38(0x2ea)]),_0x210742=(0x0,n[_0x8ddc38(0x46d)])(u[_0x8ddc38(0x4ba)]),_0xc1dc82=(0x0,n[_0x8ddc38(0x46d)])(o[_0x8ddc38(0x257)]),_0x2a91dd=_0x210742[_0x8ddc38(0x2f0)]()[0x0],_0x431b59=_0x2a91dd?_0xc1dc82[_0x8ddc38(0x24e)](_0x2a91dd['unitId']):void 0x0,_0x57b341=_0x431b59===o[_0x8ddc38(0x230)]['UNIVER_DOC']?te:_0x431b59===o[_0x8ddc38(0x230)][_0x8ddc38(0x367)]?_0x8ddc38(0x4f8):void 0x0,_0x3218e0=_0x57b341?_0x255e45[_0x8ddc38(0x314)](_0x57b341):void 0x0;return _0x3218e0?(0x0,f['jsx'])(_0x3218e0,{}):null;}function oe({paragraphMenuPlacement:_0x3ea645,PickerComponent:_0x224cca=ne}){const _0x443162=_0xac088e;let _0x2de72a=(0x0,n[_0x443162(0x46d)])(o[_0x443162(0x2cf)]);return(0x0,f[_0x443162(0x4de)])(_0x224cca,{'onShapeClick':_0x483a36=>{const _0xe531f8=_0x443162;_0x2de72a[_0xe531f8(0x290)](C['id'],{'paragraphMenuPlacement':_0x3ea645,'value':_0x483a36[_0xe531f8(0x348)],'enhanceParams':{'endArrow':_0x483a36[_0xe531f8(0x349)],'startArrow':_0x483a36[_0xe531f8(0x40b)],'horizontal':_0x483a36[_0xe531f8(0x4a5)],'vertical':_0x483a36[_0xe531f8(0x499)]}});}});}function se(_0x5b69e1){const _0x187d84=_0xac088e;return _0x5862fb=>({'id':C['id'],'type':n[_0x187d84(0x2e0)][_0x187d84(0x3a1)],'selections':[{'label':{'name':ee,'hoverable':!0x1,'selectable':!0x1,'props':_0x5b69e1?{'id':C['id'],'paragraphMenuPlacement':_0x5b69e1}:{'id':C['id']}}}],'icon':_0x187d84(0x408),'title':_0x187d84(0x2a8),'tooltip':_0x187d84(0x2a8),'hidden$':(0x0,n[_0x187d84(0x3c3)])(_0x5862fb,o[_0x187d84(0x230)]['UNIVER_DOC'])});}const ce=se(),le=se(_0xac088e(0x421)),ue=se(_0xac088e(0x3c0));function de(_0x1a8aac){const _0x4a6b74=_0xac088e;let _0x5b8e02=_0x1a8aac['get'](n[_0x4a6b74(0x309)]);return{'id':A['id'],'type':n['MenuItemType'][_0x4a6b74(0x3c1)],'icon':_0x4a6b74(0x2bc),'title':_0x4a6b74(0x259),'tooltip':_0x4a6b74(0x259),'activated$':(0x0,p[_0x4a6b74(0x23a)])(()=>_0x5b8e02[_0x4a6b74(0x1ea)][_0x4a6b74(0x424)]((0x0,p[_0x4a6b74(0x3a4)])(_0x5b8e02['options']),(0x0,p[_0x4a6b74(0x2a4)])(_0x17dfb5=>_0x17dfb5[_0x4a6b74(0x416)]===!0x0&&_0x17dfb5['id']===_0x4a6b74(0x369)),(0x0,p[_0x4a6b74(0x3bd)])())),'hidden$':(0x0,n['getMenuHiddenObservable'])(_0x1a8aac,o['UniverInstanceType'][_0x4a6b74(0x2ba)])};}function R(_0x43431e,_0x468cf9,_0x46eff7,_0x2ca1af,_0x27849d,_0x137a5b){const _0x1004b5=_0xac088e;let _0x1a8f79={'unitId':_0x468cf9,'shapeId':_0x2ca1af,'shapeData':_0x137a5b,'oldShapeJSON':_0x27849d};return _0x43431e[_0x1004b5(0x290)](r[_0x1004b5(0x218)]['id'],_0x1a8f79);}function fe(_0x45645f,_0x2cc0fe,_0x531b35,_0x480b3e,_0x3236c0,_0x452e02){const _0x8da599=_0xac088e;let _0x602aca={'unitId':_0x2cc0fe,'shapeId':_0x480b3e,'shapeData':_0x452e02,'oldShapeJSON':_0x3236c0};return _0x45645f[_0x8da599(0x290)](r['UpdateDocShapeDataCommand']['id'],_0x602aca);}const pe='docs-shape-ui.shape-format.quick-style-gallery',me=_0xac088e(0x310),he=_0xac088e(0x48f),ge='docs-shape-ui.shape-format.formula-ribbon-control',_e=_0xac088e(0x36b),ve=[{'value':c['TextWrappingStyle'][_0xac088e(0x255)],'label':_0xac088e(0x1fd),'icon':_0xac088e(0x46b)},{'value':c[_0xac088e(0x4d5)][_0xac088e(0x330)],'label':'docs-shape-ui.textWrap.square','icon':_0xac088e(0x266)},{'value':c[_0xac088e(0x4d5)][_0xac088e(0x4ab)],'label':_0xac088e(0x30c),'icon':_0xac088e(0x3b9)},{'value':c[_0xac088e(0x4d5)][_0xac088e(0x2a1)],'label':_0xac088e(0x2b5),'icon':_0xac088e(0x495)},{'value':c[_0xac088e(0x4d5)][_0xac088e(0x285)],'label':_0xac088e(0x46a),'icon':_0xac088e(0x3ab)}];function ye(){const _0x9a2cf4=_0xac088e;let _0x450851=(0x0,n[_0x9a2cf4(0x46d)])(o[_0x9a2cf4(0x2cf)]),_0x4d121a=(0x0,n[_0x9a2cf4(0x46d)])(u[_0x9a2cf4(0x4ba)]),_0x289352=(0x0,n['useDependency'])(r[_0x9a2cf4(0x326)]),_0x1c70f2=()=>{const _0x3c2596=_0x9a2cf4;var _0x33e528;let _0x3d7126=_0x4d121a[_0x3c2596(0x2f0)]();if(_0x3d7126['length']!==0x1||((_0x33e528=_0x3d7126[0x0])==null?void 0x0:_0x33e528[_0x3c2596(0x37c)])!==o[_0x3c2596(0x440)][_0x3c2596(0x2bf)])return null;let {unitId:_0x770cb2,subUnitId:_0x1b61c1,drawingId:_0x237ccd}=_0x3d7126[0x0],_0x21c47b=_0x289352[_0x3c2596(0x3c2)](_0x770cb2,_0x1b61c1,_0x237ccd),_0x559285=_0x289352[_0x3c2596(0x4d8)](_0x770cb2,_0x1b61c1,_0x237ccd);return _0x21c47b===void 0x0||!_0x559285?null:{'unitId':_0x770cb2,'subUnitId':_0x1b61c1,'drawingId':_0x237ccd,'shapeType':_0x21c47b,'shapeData':_0x559285};},_0xa4f10=(0x0,n[_0x9a2cf4(0x3f6)])(()=>new p[(_0x9a2cf4(0x221))](_0x6aea88=>{const _0x50c9fe=_0x9a2cf4;let _0x192af1=()=>_0x6aea88[_0x50c9fe(0x1f1)](_0x1c70f2()),_0x238a97=_0x4d121a['focus$'][_0x50c9fe(0x43a)](_0x192af1),_0x29bf3d=_0x450851[_0x50c9fe(0x25e)](_0xa1a42=>{_0xa1a42['id']===r['UpdateDocShapeDataMutation']['id']&&_0x192af1();});return _0x192af1(),()=>{const _0x2ab657=_0x50c9fe;_0x238a97[_0x2ab657(0x226)](),_0x29bf3d['dispose']();};}),_0x1c70f2(),!0x1,[_0x450851,_0x289352,_0x4d121a]);return{'selection':_0xa4f10,'updateShapeData':_0x59c1f3=>{const _0x53650c=_0x9a2cf4;_0xa4f10&&R(_0x450851,_0xa4f10[_0x53650c(0x2e6)],_0xa4f10[_0x53650c(0x390)],_0xa4f10[_0x53650c(0x270)],{'oldShapeData':_0xa4f10['shapeData']},_0x59c1f3);}};}function be(){const _0x13714e=_0xac088e;let {selection:_0x37a15e,updateShapeData:_0x2dce0a}=ye();return _0x37a15e?(0x0,f[_0x13714e(0x4de)])(e['ShapeStyleRibbonControl'],{'shapeData':_0x37a15e['shapeData'],'shapeType':_0x37a15e[_0x13714e(0x492)],'onUpdateShapeData':_0x2dce0a}):null;}function xe(){const _0x7fd899=_0xac088e;let _0x6cb3c8=(0x0,n[_0x7fd899(0x46d)])(o[_0x7fd899(0x2cf)]),_0x360fc7=(0x0,n[_0x7fd899(0x46d)])(o[_0x7fd899(0x2e2)]),{selection:_0x47533d}=ye();return _0x47533d?(0x0,f[_0x7fd899(0x4de)])(e[_0x7fd899(0x258)],{'type':(0x0,a[_0x7fd899(0x2fe)])(_0x47533d[_0x7fd899(0x485)]),'ariaLabel':_0x360fc7['t'](_0x7fd899(0x243)),'activePresetId':(0x0,a[_0x7fd899(0x4e1)])(_0x47533d[_0x7fd899(0x485)]),'onSelect':_0x29f65a=>_0x6cb3c8[_0x7fd899(0x290)](N['id'],{'presetId':_0x29f65a})}):null;}function Se(){const _0x1dc69d=_0xac088e;let {selection:_0x53da9b,updateShapeData:_0x57db94}=ye();return _0x53da9b?(0x0,f['jsx'])(e['ShapeTextRibbonControl'],{'fontFamilyPopupDataComponent':_0x1dc69d(0x414),'shapeData':_0x53da9b[_0x1dc69d(0x485)],'onUpdateShapeData':_0x57db94}):null;}function Ce(){const _0x274724=_0xac088e;var _0x921520;let {selection:_0x1e61a5,updateShapeData:_0xc6fd24}=ye(),_0x26d377=(0x0,e[_0x274724(0x304)])({'hostType':o['UniverInstanceType'][_0x274724(0x2ba)],'unitId':(_0x1e61a5==null?void 0x0:_0x1e61a5[_0x274724(0x2e6)])??'','subUnitId':(_0x1e61a5==null?void 0x0:_0x1e61a5[_0x274724(0x390)])??'','shapeId':(_0x1e61a5==null?void 0x0:_0x1e61a5[_0x274724(0x270)])??'','shapeData':_0x1e61a5==null?void 0x0:_0x1e61a5[_0x274724(0x485)],'registerBinding':!0x1,'showLabels':!0x0,'dropdownSide':_0x274724(0x205),'onUpdateBinding':_0x2b72c7=>_0xc6fd24({'formulaBinding':_0x2b72c7})}),_0x404e52=((_0x921520=_0x26d377[_0x274724(0x301)])==null?void 0x0:_0x921520[_0x274724(0x36f)](_0x44b969=>_0x44b969[_0x274724(0x30a)])[_0x274724(0x399)](_0x1ddad2=>_0x1ddad2[_0x274724(0x416)]!==!0x1))??[];return _0x1e61a5!=null&&_0x1e61a5[_0x274724(0x485)][_0x274724(0x3f7)]?(0x0,f[_0x274724(0x4de)])(e[_0x274724(0x23f)],{'actions':_0x404e52,'panel':_0x26d377['panel']}):null;}function we({value:_0x21d70b}){const _0x823023=_0xac088e;let _0x254c3c=(0x0,n[_0x823023(0x46d)])(o[_0x823023(0x2e2)]),_0x24f227=ve[_0x823023(0x41f)](_0x45df89=>_0x45df89[_0x823023(0x201)]===_0x21d70b)??ve[0x0];return _0x24f227?(0x0,f['jsx'])(_0x823023(0x3ae),{'children':_0x254c3c['t'](_0x24f227['label'])}):null;}const Te=_0xac088e(0x433),Ee=_0xac088e(0x28f),De='docs-shape-ui.ribbon.shape-format.formula-control',Oe=_0xac088e(0x453),ke=_0xac088e(0x4db),Ae=_0xac088e(0x4d6),je='docs-shape-ui.ribbon.shape-format.arrange-back',Me=_0xac088e(0x1f3);function Ne(_0x5f168b){const _0xf63a65=_0xac088e;let _0x27af86=_0x5f168b[_0xf63a65(0x314)](o[_0xf63a65(0x2cf)]),_0xe87547=_0x5f168b['get'](u[_0xf63a65(0x4ba)]),_0x110452=_0x5f168b[_0xf63a65(0x314)](r[_0xf63a65(0x326)]);return new p[(_0xf63a65(0x221))](_0x31578f=>{const _0x3cd73e=_0xf63a65;let _0x381dbb=()=>{const _0x5eb185=_0xa70b;let _0x546e06=z(_0x5f168b),_0x282e39=_0x546e06?_0x110452[_0x5eb185(0x4d8)](_0x546e06[_0x5eb185(0x2e6)],_0x546e06['subUnitId'],_0x546e06['drawingId']):null;_0x31578f[_0x5eb185(0x1f1)](_0x282e39?(0x0,a[_0x5eb185(0x4e1)])(_0x282e39)??'':'');},_0x5c4fec=_0xe87547['focus$'][_0x3cd73e(0x43a)](_0x381dbb),_0x1e69d6=_0x27af86[_0x3cd73e(0x25e)](_0x3930e8=>{const _0x1b9234=_0x3cd73e;_0x3930e8['id']===r[_0x1b9234(0x28b)]['id']&&_0x381dbb();});return _0x381dbb(),()=>{const _0x306aa2=_0x3cd73e;_0x5c4fec['unsubscribe'](),_0x1e69d6[_0x306aa2(0x45f)]();};});}function z(_0x452cf1){const _0x447660=_0xac088e;var _0x440de3;let _0x4985c9=_0x452cf1[_0x447660(0x314)](u[_0x447660(0x4ba)])[_0x447660(0x2f0)]();return _0x4985c9[_0x447660(0x1ee)]===0x1&&((_0x440de3=_0x4985c9[0x0])==null?void 0x0:_0x440de3[_0x447660(0x37c)])===o[_0x447660(0x440)][_0x447660(0x2bf)]?_0x4985c9[0x0]:null;}function Pe(_0x367149){const _0x893ac4=_0xac088e;return(_0x367149==null?void 0x0:_0x367149['layoutType'])===o[_0x893ac4(0x2c1)][_0x893ac4(0x1e6)]?_0x367149[_0x893ac4(0x4c4)]===o[_0x893ac4(0x4a9)]['TRUE']?c[_0x893ac4(0x4d5)][_0x893ac4(0x2a1)]:c[_0x893ac4(0x4d5)][_0x893ac4(0x285)]:(_0x367149==null?void 0x0:_0x367149[_0x893ac4(0x39e)])===o[_0x893ac4(0x2c1)][_0x893ac4(0x330)]?c['TextWrappingStyle'][_0x893ac4(0x330)]:(_0x367149==null?void 0x0:_0x367149['layoutType'])===o[_0x893ac4(0x2c1)]['WRAP_TOP_AND_BOTTOM']?c[_0x893ac4(0x4d5)][_0x893ac4(0x4ab)]:c[_0x893ac4(0x4d5)][_0x893ac4(0x255)];}function Fe(_0x2b97c4){const _0x46053e=_0xac088e;let _0x4e5937=_0x2b97c4[_0x46053e(0x314)](o[_0x46053e(0x2cf)]),_0x4e48d4=_0x2b97c4['get'](u['IDrawingManagerService']),_0x1c6b9d=_0x2b97c4['get'](o[_0x46053e(0x257)]);return new p[(_0x46053e(0x221))](_0x1f17a5=>{let _0x25be57=()=>{const _0x229905=_0xa70b;var _0x1eaa22;let _0x1ae6fc=z(_0x2b97c4),_0x290a81=_0x1ae6fc?_0x1c6b9d['getUnit'](_0x1ae6fc[_0x229905(0x2e6)],o['UniverInstanceType'][_0x229905(0x2ba)]):void 0x0;_0x1f17a5[_0x229905(0x1f1)](Pe(_0x1ae6fc?_0x290a81==null||(_0x1eaa22=_0x290a81['getSnapshot']()[_0x229905(0x2f9)])==null?void 0x0:_0x1eaa22[_0x1ae6fc[_0x229905(0x270)]]:void 0x0));},_0x39f16e=_0x4e48d4['focus$']['subscribe'](_0x25be57),_0x58a9ee=_0x4e5937['onCommandExecuted'](_0x74693d=>{const _0x5dea14=_0xa70b;_0x74693d['id']===s[_0x5dea14(0x372)]['id']&&_0x25be57();});return _0x25be57(),()=>{const _0x33028f=_0xa70b;_0x39f16e[_0x33028f(0x226)](),_0x58a9ee[_0x33028f(0x45f)]();};})[_0x46053e(0x424)]((0x0,p['distinctUntilChanged'])());}function Ie(_0x4119d6,_0x3c7a19=!0x1){const _0x37a8c5=_0xac088e;let _0x53ed0a=_0x4119d6[_0x37a8c5(0x314)](o['ICommandService']),_0x2b5c8b=_0x4119d6[_0x37a8c5(0x314)](u['IDrawingManagerService']),_0x55c64e=_0x4119d6[_0x37a8c5(0x314)](r['DocsShapeService']);return new p[(_0x37a8c5(0x221))](_0x3d2637=>{const _0x5e8683=_0x37a8c5;let _0xb4e8ee=()=>{const _0x5a0092=_0xa70b;let _0x498a3f=z(_0x4119d6);if(!_0x498a3f){_0x3d2637[_0x5a0092(0x1f1)](!0x0);return;}let _0x195e63=_0x55c64e[_0x5a0092(0x4d8)](_0x498a3f[_0x5a0092(0x2e6)],_0x498a3f[_0x5a0092(0x390)],_0x498a3f['drawingId']);_0x3d2637[_0x5a0092(0x1f1)](!_0x195e63||_0x3c7a19&&_0x195e63['formulaBinding']==null);},_0xb4ca8f=_0x2b5c8b[_0x5e8683(0x22d)]['subscribe'](_0xb4e8ee),_0x4734e4=_0x53ed0a[_0x5e8683(0x25e)](_0x538a57=>{_0x538a57['id']===r['UpdateDocShapeDataMutation']['id']&&_0xb4e8ee();});return _0xb4e8ee(),()=>{const _0xe8f9a1=_0x5e8683;_0xb4ca8f['unsubscribe'](),_0x4734e4[_0xe8f9a1(0x45f)]();};});}function Le(_0x295bcb){const _0x583636=_0xac088e;let _0x394753=_0x295bcb[_0x583636(0x314)](u[_0x583636(0x4ba)]),_0x43a1c0=_0x295bcb[_0x583636(0x314)](r[_0x583636(0x326)]);return _0x394753[_0x583636(0x22d)][_0x583636(0x424)]((0x0,p['startWith'])(_0x394753[_0x583636(0x2f0)]()),(0x0,p[_0x583636(0x2a4)])(()=>{const _0x280635=_0x583636;let _0x2ce122=z(_0x295bcb),_0x27114f=_0x2ce122?_0x43a1c0['getShapeTypeById'](_0x2ce122[_0x280635(0x2e6)],_0x2ce122[_0x280635(0x390)],_0x2ce122[_0x280635(0x270)]):void 0x0;return _0x27114f===void 0x0||(0x0,i[_0x280635(0x471)])(_0x27114f);}));}function Re(_0x535185){const _0x14f3af=_0xac088e;return{'id':N['id'],'type':n['MenuItemType'][_0x14f3af(0x3a1)],'icon':_0x14f3af(0x262),'title':_0x14f3af(0x202),'tooltip':_0x14f3af(0x202),'selections':[{'label':{'name':pe,'hoverable':!0x1,'selectable':!0x1}}],'value$':Ne(_0x535185),'hidden$':Ie(_0x535185)};}function ze(_0x55f0cc){const _0x3d8ea7=_0xac088e;return{'id':P['id'],'type':n['MenuItemType'][_0x3d8ea7(0x3a1)],'icon':_0x3d8ea7(0x408),'title':_0x3d8ea7(0x4f0),'tooltip':_0x3d8ea7(0x4f0),'slot':!0x0,'selections':[{'label':{'name':e[_0x3d8ea7(0x21c)],'hoverable':!0x1,'selectable':!0x1}}],'hidden$':Le(_0x55f0cc)};}function Be(_0x5ba544,_0x5001ae,_0x5bce79=!0x1){const _0x9835ab=_0xac088e;return _0x454ee4=>({'id':_0x5ba544,'type':n[_0x9835ab(0x2e0)][_0x9835ab(0x3c1)],'label':{'name':_0x5001ae,'hoverable':!0x1,'selectable':!0x1},'hidden$':Ie(_0x454ee4,_0x5bce79)});}const Ve=Be(Te,me),He=Be(Ee,he),Ue=Be(De,ge,!0x0);function _0x404d(){const _0x39b7fb=['_hyperLinkRegions','drawing-ui.objectListPanel.showAll','attachPopupToObject','getDrawingOrder','doc','MobileShapeEditorService','refreshAdjustControls','drawing-ui.objectListPanel.descriptionPlaceholder','IURLImageService','setPresentation','drawing-ui.objectListPanel.moveForward','registerClipDelegate','type','endArrow','_baseShapeTop','TOP','refreshFormulaPresentation','_ribbonService','presentationChanged$','DocShapeAnchorPosition','warn','fallbackWidth','#2563EB','sectionCanvas','TopmostIcon','getDrawingSearch','remove$','beginPath','drawing-ui.objectListPanel.unlockAll','params','contentHeight','PRINTING_COMPONENT_COLLECT','addImageSourceCache','entries','refreshTransform$','marginTop','ShapeFloatingToolbar','sin','_activeShapeInfo','splice','shape-editor-ui.arrange.front','ShapeTextFloatMenuRenderControllerBase','_drawingType','UNIVER_SHEET','docs-shape-ui.mobile.text','doc.shape.object-list.panel','MEDIA','docs-shape-ui.shape-format.wrapping-style-label','clone','offsetX','_getDependencies','flatMap','fillImageSource','_baseShapeLeft','RichTextEditingMutation','set','univer-grid\x20univer-gap-3','prstGeom','canEditDocumentTargets','3891744xiTriJ','parent','isRenderLinePointsMode','_getShapePopup','ShapeFloatingToolbarService','drawingType','getAutoFitPresentations','text','values','getSkeletonData','setFormulaPresentation','clearAdjustControls','Inject','_insertShapes','createControl$','footerId','beginInteraction','ObjectPermissionButton','getUnitId','disposeWithMe','HorizontalAlign','isRender','front','_shapeFormulaService','register','subUnitId','error','ImageSourceTypeEnum','DocumentViewModel','docs-shape-ui.formatShape','resolveShapeTextHyperLinkObject','clip-','_config','clipHeight','filter','ShapeTextFloatToolbar','_urlImageService','transform','_draw','layoutType','1394920ervNfT','drawWith','SELECTOR','DependentOn','getSelectedObjectMap','startWith','fill','resolveShapeTextBodyBehavior','getShapeModel','bindRenderTransformerLifecycle','objects','DocRenderController','DocsShapeWrapInFrontOfTextIcon','DRAWING_DOM','currentAdjustValues','span','ContextMenuGroup','add','headerId','M2\x203h16M2\x207.5h3M15\x207.5h3M2\x2010h3M15\x2010h3M2\x2012.5h3M15\x2012.5h3M2\x2017h16','isLineShape','DocDrawingTextWrap','CommandType','packageName','_getFocusedShapeAtPoint','version','DocsShapeWrapTopBottomIcon','getDrawingTypeNameKey','setCanUseShapeClip','1.2','distinctUntilChanged','custom','srcRect','target','BUTTON','getShapeTypeById','getMenuHiddenObservable','updateContext','.below','Vector2','getCurrentUnitOfType','_registerDrawingFocusChangeHandler','Line','forEach','DocumentSkeleton','getCanvasElement','canvas','animationEnabled','MobileObjectListPanel','[ShapeRender]\x20Failed\x20to\x20load\x20picture\x20fill\x20image','activeTarget','Arrow','pageWidth','TRUE','9232dPlKTI','current','getViewports','skeTables','asObservable','top-bottom','drawing-ui.objectListPanel.hide','ShapePickerDropdown','_context','onReady','docs-shape-ui.textWrap.square','paragraphId','_shapeEditPanelVersion','disableObjectsEvent','_update','path','_hide','with','isEditing','description','_configService','title','[DrawingShape]\x20LocaleService\x20is\x20required\x20for\x20rich\x20text\x20rendering','MobileShapeEditorControls','height','_closeShapeEditPanel','image','setPrstGeom','jsxs','OBJECT_LIST_FLOATING_SECTION_ID','DisposableCollection','call','getSnapshot','useObservable','formulaBinding','hasDefault','some','UniverDocsShapeUIPlugin','toDisposable','flipY','ShapeTextAutoFitType','UpdateDocDrawingMetadataCommand','toPrimitive','doc.operation.open-shape-object-list-panel','_updateSrcRectByTransform','_isOpenedShapeEditPanel','getValue','style','_baseShapeHeight','adjHandleFill','RENDER_CLASS_TYPE','ShapeIcon','getLastLine','_drawSimpleText','startArrow','size','getEditing','cos','canvasElement','doc.shape.floating-toolbar','close','_initSelection','shapeModel','docs-shape-format-font-family-menu','LAYOUT','visible','drawing-ui.objectListPanel.unlockHint','VIEWPORT_KEY','intercept','order','pick','_props','resetCursor','Transform','find','DOC_PARAGRAPH_T_INSERT_BELOW_MENU_ID','below','_initEditingParams','_visible','pipe','getPresentation','setFallbackVisible','BehaviorSubject','skeDrawings','drawing-ui.objectListPanel.show','drawing-ui.objectListPanel.lock','merge','isDrawingObject','EMPTY_PARAGRAPH_MENU_ID','doc.shape.text.float-menu','MoreUpIcon','_docCanvasPopManagerService','Injector','transformForAngle','docs-shape-ui.ribbon.shape-format.style-control','transformVector2SceneCoord','DocsShapeUIMenuSchema','ShapeTypeEnum','UpdateDocDrawingWrappingStyleCommand','getDocumentPermissionValue','preValue','subscribe','drawing-ui.objectListPanel.sectionFloating','_registerDrawingTransformHandler','debounceRefreshControls','doc-shape-adjust-point-','changing$','DrawingTypeEnum','_imageIoService','wrapStrategy','setOnSavingEditorData','_contextService','1ANsIcC','_docsShapeService','registerRenderModule','resolveShapeTextEditorBehaviorShapeData','calculate','setFillImage','_getSceneByUnitId','ShapePickerPanel','drawing-ui.objectListPanel.nameInput','visible$','spaceBelowApply','_loadAndSetImage','createShapeFormulaDocument','useMemo','docs-shape-ui.ribbon.shape-format.arrange-forward','actualHeight','clearControl$','back','drawFormulaShapeAnimationLayers','ShapeDefaultConfig','currentColor','complete','3572372MRRqXx','MoveUpIcon','skeHeaders','_init','dispose','keys','univer-box-border\x20univer-px-4\x20univer-text-sm','_permissionService','buildClipPath','M2\x203.5h16M2\x2016.5h16M2\x2010h5M13\x2010h5','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','FromArray','None','Plugin','registerCommand','docs-shape-ui.textWrap.inFrontText','DocsShapeWrapInlineIcon','_clipService','useDependency','getMatrix','useState','Circle','isConnectorShape','setConfig','GROUP','push','disableShapeOption','indexOf','resolveShapeTextDocumentPageHeight','drawing-ui.objectListPanel.lockHint','_adjName','setSrcRect','pages','extraProps','UniverDocsDrawingMobileUIPlugin','UniverDocsShapePlugin','isHorizontal','_registerImageShapeClipDelegate','function','FormatPainterSessionService','_commandService','ShapeFillEnum','shapeData','IContextService','open','delete','behind','VerticalAlign','UnitObject','prototype','useEffect','ShapeModel','docs-shape-ui.shape-format.text-ribbon-control','_initialize','BottomIcon','shapeType','connectInjector','endOffset','DocsShapeWrapBehindTextIcon','getDrawingOKey','_shapeFloatingToolbarService','enhanceParams','vertical','popup','setEditing','drawing-ui.objectListPanel.hideAll','SetDrawingSelectedOperation','drawing-ui.objectListPanel.lockAll','INSERT_BELLOW_MENU_ID','invert','getObjectIncludeInGroup','_mobileEditorService','headerLayoutKey','context-bar','horizontal','DocPrintInterceptorService','1281kZysRG','IConfigService','BooleanNumber','selectable','WRAP_TOP_AND_BOTTOM','shape-text-','getDrawingPoints','startIndex','vertical-center','width','name','getActualSize','_localeService','Fragment','Copy','doc.operation.open-doc-shape-format-panel','ShapeFormulaService','_docLayoutInteractionService','resolveShapeTextHyperLinkAt','IDrawingManagerService','shapeText','drawing-ui.objectListPanel.collapse','getRenderUnitById','M2\x203h16M2\x207.5h16M2\x2010h16M2\x2012.5h16M2\x2017h16','presentation','object','CURSOR_TYPE','strokeWidth','DocSelectionRenderService','behindDoc','inline','DocCanvasPopManagerService','clearAdjustValue','5.5','options','getActiveViewportByCoord','univer-grid\x20univer-gap-5\x20univer-px-4\x20univer-py-3','scene','symbol','ArrangeTypeEnum','setAdjustValueByName','DrawingCommonPanel','IImageIoService','doc.image-clip.shape-picker.component','_drawShapeText','square','TextWrappingStyle','docs-shape-ui.ribbon.shape-format.arrange-front','setDocsCustomBlockRenderViewportProvider','getShapeDataById','_injector','doc.operation.apply-shape-quick-style','docs-shape-ui.ribbon.shape-format.arrange-backward','_lastEditingShapeKey','ShapeTextHyperLinkPopupService','jsx','isInGroup','registerDependencies','resolveActiveShapeQuickStylePresetId','_baseShapeWidth','color','hideContextualTab','menu','getParent','contentVerticalOffset','_getDisposePopups','MoveDownIcon','MenuManagerPosition','enableObjectsEvent','0.14','getShapeTextData','docs-shape-ui.openPanel','reverse','shape-editor-ui.toolbar.changeShape','makeDirty','_formulaShapes','fillImageSourceType','createInternalEditorID','UUID','getState','ancestorTransform','sheet.image-clip.shape-picker.component','docs-shape-ui.objectListPanel.title','isMainScene','stroke','none','_clearCompletionFrame','permissionPointUpdate$','_isStartAdjusting','doc.shape.picker.component','_instanceService','render','_initCommands','getPageDrawingIds','getScene','create','componentKey','133173GpzfSi','resolveShapeTextDocumentRenderLayout','@univerjs-pro/docs-shape-ui','Disposable','_menuManagerService','_docDrawingShapeRenderController','getImage','SetDocDrawingArrangeCommand','DEFAULT_DOC_SHAPE_WIDTH','decorate','_drawRichText','syncExecuteCommand','ShapeGroupEnum','fontSize','drawing','DRAWING_IMAGE','WRAP_NONE','onPointerUp$','_activeAdjustInfo','URL','sidebarOptions$','InsertDocShapeCommand','BuiltInUIPart','flipX','length','RibbonInsertGroup','getTextModel','next','ShapeArrowTypeEnum','docs-shape-ui.ribbon.shape-format.wrapping-style','IRenderManagerService','_activeShapeAdjustPointList','transformByState','setCollapsedIds','CROSSHAIR','dataModel','LEFT','update$','drawing-ui.objectListPanel.expand','docs-shape-ui.textWrap.inline','getDocumentEntityPermissionObjectId','getShapeQuickStylePreset','RemoveDocDrawingCommand','value','shape-editor-ui.toolbar.quickStyles','_measure','restore','bottom','isHit','ObjectListPanelBase','OTHERS','getDrawingEffectBounds','OPERATION','_adjHandlerPointerUp','_subUnitId','subscribeEvent','left','touchDependencies','_unitId','top','TextWrapShapeIcon','round','skeFooters','0.8','Medium','formulaPresentation','UpdateDocShapeDataCommand','_activeShapeId','isRichText','string','SHAPE_CHANGE_PICKER_COMPONENT','getAdjustInfoByName','PictureFill','_clearPopups','IMenuManagerService','Observable','OFFSET','_initMenu','shape-editor-ui.arrange.back','updateDocumentStyle','unsubscribe','_openShapeEditPanel','featurePluginUpdateNotification','trim','_registerComponents','adjHandleSize','shapeKey','focus$','UniverRenderEnginePlugin','MobileDocDrawingTextWrap','UniverInstanceType','_addShapeAdjustControl','getActiveTextRange','buildShapeTextDataUpdate','drawing-ui.objectListPanel.unlock','shouldClipShapeTextDocument','ShapeEditPanel','hideInfoPopup','top-center','_updateShape','defer','onSavingEditorData$','has','drawing-ui.objectListPanel.filterLocked','IPermissionService','ShapeFormulaRibbonControl','UniverShapeEditorPlugin','onPointerDown$','updateDocumentDataMargin','docs-shape-ui.quickStyles','docs-shape-text-','Rect','ToggleShapeFloatingToolbarOperation','getParagraphContentStartOffset','Path','prepareShapeTextDocumentData','_getActiveDrawingShape','classType','DocumentDataModel','FOCUSING_COMMON_DRAWINGS','getUnitType','_loadShapePictureFill','MobileActionRow','_activeShapeModel','DOCS_COMPONENT_MAIN_LAYER_INDEX','MobileShapePickerPanel','getAllRenderersOfType','INLINE','segmentId','IUniverInstanceService','ShapeQuickStyleGallery','docs-shape-ui.objectListPanel.open','resolveShapeTextEditorWrapStrategy','drawing-ui.objectListPanel.description','IMAGE_CLIP_SHAPE_PICKER_COMPONENT','offsetY','onCommandExecuted','shapeId','clipTop','_getActiveDrawingParam','PaintIcon','add$','onTransformChange$','createShapeTextBoxShapeData','DocsShapeWrapSquareIcon','createShapeTextHyperLinkRegions','_disposePopupsByUnit','clipByShape','docs-shape-contextual-ribbon','drawing-ui.objectListPanel.empty','gradientEndColor','getShapeType','ShapeArrowSizeEnum','clip','drawingId','docs-shape-ui.mobile.style','1118598rahwJt','getFocusedUnit','div','onDblclick$','_drawRichTextLayer','getShapePopupMenus','_univerInstanceService','DocInterceptorService','angle','_getShapeAdjustPointListById','Shape','clear','_onSavingEditorData$','_canEdit','getAdjustValueByName','_updateAdjustControlPositions','_transformCalculateSrcRect','setContextValue','mergeMenu','IN_FRONT_OF_TEXT','_adjustPointObjects','resolveHyperLinkAt','ShapeRenderModeEnum','shape-editor-ui.arrange.forward','getSelfOrHeaderFooterModel','UpdateDocShapeDataMutation','data','startOffset','_toScenePoint','docs-shape-ui.ribbon.shape-format.text-control','executeCommand','ShapeFormatSettingIcon','_editingParams$','_docPrintInterceptorService','_registerIcons','_formulaKey','getShapeData','200fltycV','_formulaAnimation','oKey','changeStart$','_updateShapeAdjustControls','sectionFloating','_clearShapeAdjustControls','DRAWING_OBJECT_LAYER_INDEX','_adjHandlerPointerMove','memo','BEHIND_TEXT','_toVisualAdjustPoint','changeEnd$','map','_shapeTextEditingService','_canEditShape','_renderManagerService','docs-shape-ui.insertShape','docs-shape-ui.deleteShape','getDrawingDataForUnit','DocumentEntity','setCursor','draw','docs-shape-ui.hidePanel','_isShouldShowDrawingShapeAdjust','localeService','resize','MoreDownIcon','showContextualTab','applyPoint','docs-shape-ui.textWrap.behindText','getDocumentDrawingSegmentId','getDocumentEntityParentPermissionObjectIds','renderDrawingShape','ShapeTextHyperLinkInfo','UNIVER_DOC','_popupMenuListener','ObjectLayersIcon','onPointerMove$','autoFitType','DRAWING_SHAPE','DOCS_SHAPE_UI_PLUGIN','PositionedObjectLayoutType','toStringTag','_transform','_registerOperations','_completionFrame','_createShapeAdjustControls','focusDrawing','_renderWithCache','COMMAND','refreshShapeFillImage','composeMatrix','getUnit','setShapeData','Module','ICommandService','useReducer','_sidebarDisposable','getObjectListPanelSectionIdForDrawingType','drawing-ui.objectListPanel.close','_endLayoutInteraction','Documents','_initPrinting','calcAdjValues','moveRange','798fcYReV','scale','DocSelectionManagerService','getDrawingVisible','_iconManager','FloatingObjectToolbarPosition','getTransformerByCreate','MenuItemType','animateFormulaPresentation','LocaleService','drawing-ui.objectListPanel.dragToReorder','hidden','_layoutInteraction','unitId','defineProperty','getShapeTextRect','isolated','ComponentManager','onStarting','forward','getDrawingShapeKeyByDrawingSearch','resolveFormulaShapeAutoFitSize','PARAGRAPH','getFocusDrawings','_sidebarService','registerShapeFormatPainter','_shapeId','IconManager','backward','_getShapeInfo','editingParams$','getInverseCoord','drawings','getCurrentTypeOfUnit$','_handleCreateControl','_componentManager','getOwnPropertyDescriptor','getShapeQuickStyleType','0\x200\x2020\x2020','SpAutoFit','extensionGroups','addObject','onerror','useFormulaShapeToolbar','translateWithPrecision','stopPropagation','svg','univer-flex\x20univer-size-full\x20univer-items-center\x20univer-justify-center\x20univer-text-sm\x20univer-text-gray-500','ISidebarService','actions','save','docs-shape-ui.textWrap.topAndBottom','_getRenderModules','registerComponent','UniverDocsShapeMobileUIPlugin','docs-shape-ui.shape-format.style-ribbon-control','UniverShapeEditorMobileUIPlugin','SetDocumentPermissionCommand','canDispose','get','clearActiveDrawingObjects','UniverDocsPlugin','drawing-ui.objectListPanel.moveBackward','completeEditing','_applyFormulaAutoFitSize','_popupTargetKeys','doc.shape.edit.panel','menuRange','_initUIPart','IDocDrawingService','_drawingManagerService','presetId','1em','docs-shape-ui.crop.shape','unregister','UniverDrawingUIPlugin','normalizeShapeTextModel','DocsShapeService','max','IUIPartsService','footerLayoutKey','getVisible','_attachAdjustEvent','rect','interceptor','ShapeTextHyperLinkHoverController','_shapeRenderController','WRAP_SQUARE','getDrawingByParam','adjName','setShapeProps','SolidFill','default','drawing-ui.objectListPanel.noSelection','drawing-ui.objectListPanel.filterHidden','drawing-ui.objectListPanel.locate','IRibbonService','activateDrawingObject','fillType'];_0x404d=function(){return _0x39b7fb;};return _0x404d();}function We(_0x43218d){const _0xecd617=_0xac088e;return{'id':Me,'type':n[_0xecd617(0x2e0)][_0xecd617(0x3a1)],'icon':ve[0x0]['icon'],'label':_e,'selectionsCommandId':c[_0xecd617(0x437)]['id'],'selections':ve[_0xecd617(0x2a4)](({icon:_0x4fbf9b,label:_0x518049,value:_0x32a026})=>({'value':_0x32a026,'label':_0x518049,'icon':_0x4fbf9b,'params':()=>{const _0x1c3d0a=_0xecd617;let _0x4df502=z(_0x43218d);return _0x4df502?{'unitId':_0x4df502['unitId'],'subUnitId':_0x4df502[_0x1c3d0a(0x390)],'drawings':[{'unitId':_0x4df502[_0x1c3d0a(0x2e6)],'subUnitId':_0x4df502[_0x1c3d0a(0x390)],'drawingId':_0x4df502[_0x1c3d0a(0x270)]}],'wrappingStyle':_0x32a026}:void 0x0;}})),'value$':Fe(_0x43218d),'hidden$':Ie(_0x43218d)};}function Ge(_0x62cbf1,_0x99d0c9,_0x5d33e5,_0x1d02d0){const _0x119c5c=_0xac088e;return _0x2bd621=>({'id':_0x62cbf1,'commandId':c[_0x119c5c(0x1dd)]['id'],'type':n[_0x119c5c(0x2e0)][_0x119c5c(0x3c1)],'icon':_0x5d33e5,'title':_0x1d02d0,'tooltip':_0x1d02d0,'hidden$':Ie(_0x2bd621),'params':()=>{const _0x482541=_0x119c5c;let _0x1a83ed=z(_0x2bd621);return _0x1a83ed?{'unitId':_0x1a83ed[_0x482541(0x2e6)],'subUnitId':_0x1a83ed[_0x482541(0x390)],'drawingIds':[_0x1a83ed[_0x482541(0x270)]],'arrangeType':_0x99d0c9}:void 0x0;}});}const Ke=Ge(Oe,o[_0xac088e(0x4ce)][_0xac088e(0x2ec)],_0xac088e(0x45c),_0xac088e(0x289)),qe=Ge(ke,o[_0xac088e(0x4ce)][_0xac088e(0x2f5)],_0xac088e(0x4e9),'shape-editor-ui.arrange.backward'),Je=Ge(Ae,o['ArrangeTypeEnum'][_0xac088e(0x38d)],'TopmostIcon',_0xac088e(0x364)),Ye=Ge(je,o[_0xac088e(0x4ce)][_0xac088e(0x456)],'BottomIcon',_0xac088e(0x224));function Xe(_0x4c2498){const _0x52487f=_0xac088e;let _0xedc175=_0x4c2498[_0x52487f(0x314)](n[_0x52487f(0x309)]);return{'activated$':(0x0,p[_0x52487f(0x23a)])(()=>_0xedc175[_0x52487f(0x1ea)]['pipe']((0x0,p[_0x52487f(0x3a4)])(_0xedc175[_0x52487f(0x4c9)]),(0x0,p['map'])(_0x5a6489=>_0x5a6489[_0x52487f(0x416)]===!0x0&&_0x5a6489['id']==='doc.shape.edit.panel'),(0x0,p['distinctUntilChanged'])())),'id':j['id'],'type':n[_0x52487f(0x2e0)][_0x52487f(0x3c1)],'icon':'ShapeFormatSettingIcon','title':'docs-shape-ui.formatShape','tooltip':_0x52487f(0x394),'hidden$':Ie(_0x4c2498),'params':()=>{const _0x5ea06f=_0x52487f;let _0x40200b=z(_0x4c2498);return _0x40200b?{'unitId':_0x40200b[_0x5ea06f(0x2e6)],'subUnitId':_0x40200b[_0x5ea06f(0x390)],'drawingId':_0x40200b[_0x5ea06f(0x270)]}:void 0x0;}};}const Ze={[n[_0xac088e(0x4ea)]['RIBBON']]:{[T]:{'order':0x64,'title':_0xac088e(0x394),'contextual':!0x0,'docs-shape-ui.ribbon.shape-format.quick-styles':{'order':0x0,[N['id']]:{'order':0x0,'gridLayout':{'row':0x1,'column':0x1,'showLabel':!0x0},'menuItemFactory':Re},[P['id']]:{'order':0x1,'gridLayout':{'row':0x2,'column':0x1,'showLabel':!0x0},'menuItemFactory':ze}},'docs-shape-ui.ribbon.shape-format.style':{'order':0x1,[Te]:{'order':0x0,'gridLayout':{'row':0x1,'column':0x1,'rowSpan':0x2,'width':0x68},'menuItemFactory':Ve}},'docs-shape-ui.ribbon.shape-format.text':{'order':0x2,[Ee]:{'order':0x0,'gridLayout':{'row':0x1,'column':0x1,'rowSpan':0x2,'width':0x158},'menuItemFactory':He}},'docs-shape-ui.ribbon.shape-format.arrange':{'order':0x3,[Me]:{'order':0x0,'gridLayout':{'row':0x1,'column':0x1,'rowSpan':0x2,'columnSpan':0x2,'showLabel':!0x0},'menuItemFactory':We},[Oe]:{'order':0x1,'gridLayout':{'row':0x1,'column':0x3},'menuItemFactory':Ke},[ke]:{'order':0x2,'gridLayout':{'row':0x2,'column':0x3},'menuItemFactory':qe},[Ae]:{'order':0x3,'gridLayout':{'row':0x1,'column':0x4},'menuItemFactory':Je},[je]:{'order':0x4,'gridLayout':{'row':0x2,'column':0x4},'menuItemFactory':Ye}},'docs-shape-ui.ribbon.shape-format.formula':{'order':0x4,[De]:{'order':0x0,'gridLayout':{'row':0x1,'column':0x1,'rowSpan':0x2,'width':0x78},'menuItemFactory':Ue}},'docs-shape-ui.ribbon.shape-format.advanced':{'order':0x5,[j['id']]:{'order':0x0,'gridLayout':{'row':0x1,'column':0x1,'showLabel':!0x0},'menuItemFactory':Xe},[e[_0xac088e(0x246)]['id']]:{'order':0x1,'gridLayout':{'row':0x2,'column':0x1,'showLabel':!0x0},'menuItemFactory':e['ShapeFloatingToolbarToggleFactory']}}}}},Qe={[n['RibbonInsertGroup'][_0xac088e(0x36a)]]:{[C['id']]:{'order':0x3,'gridLayout':{'row':0x2,'column':0x2},'menuItemFactory':_0x5ce1aa=>({...ce(_0x5ce1aa),'title':void 0x0})}},[n[_0xac088e(0x1ef)][_0xac088e(0x208)]]:{[A['id']]:{'order':0x1,'gridLayout':{'row':0x1,'column':0x2,'rowSpan':0x2,'showLabel':!0x0},'menuItemFactory':de}},[n['ContextMenuPosition'][_0xac088e(0x2ef)]]:{[n[_0xac088e(0x3af)][_0xac088e(0x415)]]:{[t[_0xac088e(0x49f)]]:{[C['id']]:{'replace':!0x0,'order':0x8,'menuItemFactory':le}}},[t['DOC_CONTENT_INSERT_MENU_ID']]:{[n[_0xac088e(0x3af)][_0xac088e(0x415)]]:{[C['id']]:{'replace':!0x0,'order':0x8,'menuItemFactory':le}}},[t[_0xac088e(0x42d)]]:{[n[_0xac088e(0x3af)]['LAYOUT']]:{[C['id']]:{'replace':!0x0,'order':0x8,'menuItemFactory':ue}}},[t['DOC_PARAGRAPH_T_INSERT_MENU_ID']]:{'insert':{[C['id']]:{'replace':!0x0,'order':0x2,'menuItemFactory':ce}}},[t[_0xac088e(0x420)]]:{'insert':{[C['id']+_0xac088e(0x3c5)]:{'replace':!0x0,'order':0x2,'menuItemFactory':le}}}}};var $e=_0xac088e(0x1d8),et='1.5.0';const B={'type':o[_0xac088e(0x3b5)][_0xac088e(0x20a)],'id':'doc.operation.close-doc-shape-format-panel','handler'(){return!0x0;}},tt='docs-shape-ui.config',nt={};function V(_0x395b68){'@babel/helpers - typeof';const _0x351d87=_0xac088e;return V=typeof Symbol==_0x351d87(0x481)&&typeof Symbol['iterator']=='symbol'?function(_0x161f60){return typeof _0x161f60;}:function(_0x133ae5){const _0x4013d1=_0x351d87;return _0x133ae5&&typeof Symbol==_0x4013d1(0x481)&&_0x133ae5['constructor']===Symbol&&_0x133ae5!==Symbol[_0x4013d1(0x48c)]?_0x4013d1(0x4cd):typeof _0x133ae5;},V(_0x395b68);}function rt(_0xe8273f,_0x36b498){const _0x527f31=_0xac088e;if(V(_0xe8273f)!=_0x527f31(0x4c0)||!_0xe8273f)return _0xe8273f;var _0x55266f;if(typeof Symbol<'u'&&(_0x55266f=_0xe8273f[Symbol[_0x527f31(0x3ff)]])!==void 0x0){var _0xa48730=_0x55266f[_0x527f31(0x3f4)](_0xe8273f,_0x36b498||_0x527f31(0x335));if(V(_0xa48730)!='object')return _0xa48730;throw TypeError(_0x527f31(0x465));}return(_0x36b498===_0x527f31(0x21b)?String:Number)(_0xe8273f);}function it(_0x5985e0){const _0x42004b=_0xac088e;var _0x5b79e4=rt(_0x5985e0,_0x42004b(0x21b));return V(_0x5b79e4)==_0x42004b(0x4cd)?_0x5b79e4:_0x5b79e4+'';}function H(_0xfdb017,_0x22d10b,_0x3d3b08){const _0x592792=_0xac088e;return(_0x22d10b=it(_0x22d10b))in _0xfdb017?Object[_0x592792(0x2e7)](_0xfdb017,_0x22d10b,{'value':_0x3d3b08,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0xfdb017[_0x22d10b]=_0x3d3b08,_0xfdb017;}var at=class extends l[_0xac088e(0x27c)]{constructor(_0x284b6b,_0x20c409){const _0x411884=_0xac088e;super(_0x284b6b,_0x20c409),H(this,_0x411884(0x2f3),null),H(this,'_adjName',null),H(this,'_unitId',null),H(this,'_subUnitId',null),_0x20c409&&this[_0x411884(0x333)](_0x20c409);}[_0xac088e(0x355)](){const _0x376ef0=_0xac088e;return{'unitId':this[_0x376ef0(0x210)],'subUnitId':this[_0x376ef0(0x20c)],'drawingId':this[_0x376ef0(0x2f3)]};}[_0xac088e(0x333)](_0x594375){const _0x4a2e1f=_0xac088e;_0x594375[_0x4a2e1f(0x25f)]!==void 0x0&&(this['_shapeId']=_0x594375['shapeId']),_0x594375[_0x4a2e1f(0x332)]!==void 0x0&&(this[_0x4a2e1f(0x479)]=_0x594375[_0x4a2e1f(0x332)]),_0x594375[_0x4a2e1f(0x2e6)]!==void 0x0&&(this['_unitId']=_0x594375[_0x4a2e1f(0x2e6)]),_0x594375[_0x4a2e1f(0x390)]!==void 0x0&&(this[_0x4a2e1f(0x20c)]=_0x594375[_0x4a2e1f(0x390)]),this[_0x4a2e1f(0x1f6)]({'width':_0x594375['width'],'height':_0x594375[_0x4a2e1f(0x3ed)]});}['_draw'](_0x4df6dc){const _0x2068a7=_0xac088e;l[_0x2068a7(0x470)][_0x2068a7(0x3a0)](_0x4df6dc,{'radius':i[_0x2068a7(0x458)][_0x2068a7(0x22b)],'fill':i[_0x2068a7(0x458)][_0x2068a7(0x406)],'stroke':i[_0x2068a7(0x458)]['adjHandleStroke'],'strokeWidth':0x1,'evented':!0x0});}};function ot(_0x5a23db,_0x52a1dc,_0x240944){const _0x4c64b0=_0xac088e;let _0x516367={..._0x52a1dc,'dataModel':{..._0x52a1dc[_0x4c64b0(0x1f9)]??{},..._0x240944?{'doc':_0x240944}:null}},_0x53ffe5=(0x0,e[_0x4c64b0(0x448)])(_0x5a23db,_0x516367),_0x2f7be5=(0x0,e[_0x4c64b0(0x25a)])(_0x53ffe5);return{'clip':(0x0,e[_0x4c64b0(0x235)])(_0x53ffe5,_0x2f7be5),'wrapStrategy':_0x2f7be5};}var U=class extends l[_0xac088e(0x27c)]{constructor(_0x3376af,_0x2c382a){const _0x41a75e=_0xac088e;super(_0x3376af,_0x2c382a),H(this,'_hyperLinkRegions',[]),H(this,_0x41a75e(0x41c),void 0x0),H(this,_0x41a75e(0x298),new e['FormulaShapeAnimationController'](()=>this[_0x41a75e(0x4f1)](!0x0),()=>this[_0x41a75e(0x319)]())),H(this,'_transformCalculateSrcRect',!0x0),H(this,_0x41a75e(0x366),o['DrawingTypeEnum']['DRAWING_SHAPE']),H(this,_0x41a75e(0x42c),!0x0),this[_0x41a75e(0x41c)]={..._0x2c382a},this['_formulaAnimation']['setPresentation'](_0x2c382a['formulaPresentation'],_0x2c382a[_0x41a75e(0x2e1)]!==!0x1),this['_init'](),this['_applyFormulaAutoFitSize']();}[_0xac088e(0x45e)](){const _0x365921=_0xac088e;this[_0x365921(0x264)][_0x365921(0x20d)](_0x4bb056=>{const _0x29f126=_0x365921;this[_0x29f126(0x401)](_0x4bb056);});}[_0xac088e(0x3f0)](_0x2e6f64){const _0x23dba3=_0xac088e;this[_0x23dba3(0x41c)][_0x23dba3(0x375)]=_0x2e6f64;}[_0xac088e(0x287)](_0x396b4e){const _0x53cf3e=_0xac088e;if(this[_0x53cf3e(0x41c)][_0x53cf3e(0x3e7)])return null;let _0x3e6aed=this[_0x53cf3e(0x2f8)](_0x396b4e),{width:_0x310701,height:_0x7fabab}=this['getRealBound']();return(0x0,e[_0x53cf3e(0x4b9)])(this['_hyperLinkRegions'],{'x':(this[_0x53cf3e(0x1ed)]?-_0x3e6aed['x']:_0x3e6aed['x'])+_0x310701/0x2,'y':_0x3e6aed['y']+_0x7fabab/0x2});}['setEditing'](_0x56f145){const _0x5a9e30=_0xac088e;this[_0x5a9e30(0x41c)][_0x5a9e30(0x3e7)]=_0x56f145,this[_0x5a9e30(0x4f1)](!0x0);}[_0xac088e(0x381)](_0x34fbfc,_0x330fdd=!0x0){const _0x4ec93d=_0xac088e;this[_0x4ec93d(0x298)][_0x4ec93d(0x345)](_0x34fbfc,_0x330fdd),this[_0x4ec93d(0x41c)][_0x4ec93d(0x217)]=_0x34fbfc,this[_0x4ec93d(0x319)](),this[_0x4ec93d(0x4f1)](!0x0);}[_0xac088e(0x319)](){const _0x4a954a=_0xac088e;let _0x4bd367=this[_0x4a954a(0x41c)][_0x4a954a(0x413)],_0x165e99=_0x4bd367[_0x4a954a(0x4ed)](),_0x5e459b=(0x0,e['normalizeShapeTextModel'])(_0x165e99==null?void 0x0:_0x165e99[_0x4a954a(0x1f9)]),_0x7041cb=_0x5e459b==null?void 0x0:_0x5e459b[_0x4a954a(0x340)],_0x4cbe95=this[_0x4a954a(0x298)][_0x4a954a(0x37d)]();if(!_0x7041cb||_0x4cbe95['length']===0x0)return;_0x4bd367[_0x4a954a(0x3c4)]({'width':this[_0x4a954a(0x4b0)],'height':this[_0x4a954a(0x3ed)]});let _0x56b38b=(0x0,e[_0x4a954a(0x2ee)])({'documentData':_0x4cbe95[_0x4a954a(0x2a4)](_0x30ca20=>(0x0,a[_0x4a954a(0x451)])(_0x7041cb,_0x30ca20)),'height':this[_0x4a954a(0x3ed)],'shapeData':_0x4bd367[_0x4a954a(0x296)](),'textRect':_0x4bd367[_0x4a954a(0x2e8)]({'left':0x0,'top':0x0,'width':this[_0x4a954a(0x4b0)],'height':this['height']}),'width':this[_0x4a954a(0x4b0)]});if(_0x56b38b){var _0x3432c9;this['resize'](_0x56b38b[_0x4a954a(0x4b0)],_0x56b38b[_0x4a954a(0x3ed)]),(_0x3432c9=this[_0x4a954a(0x505)]())==null||(_0x3432c9=_0x3432c9['getTransformer']())==null||_0x3432c9[_0x4a954a(0x43d)]();}}get[_0xac088e(0x2e6)](){const _0x498d7c=_0xac088e;return this[_0x498d7c(0x41c)][_0x498d7c(0x2e6)];}get[_0xac088e(0x390)](){const _0x4fc74f=_0xac088e;return this[_0x4fc74f(0x41c)][_0x4fc74f(0x390)];}['_updateSrcRectByTransform'](_0xff7ac0){const _0xf4c2c4=_0xac088e;if(this['_props']['srcRect']==null||!this[_0xf4c2c4(0x282)])return;let {width:_0x48fbb3,height:_0x57aaa2}=this,{width:_0x16503c=0x0,height:_0x1be709=0x0}=_0xff7ac0[_0xf4c2c4(0x439)],{left:_0x54f2ed=0x0,top:_0xbaa83e=0x0,right:_0x303d84=0x0,bottom:_0x247625=0x0}=this[_0xf4c2c4(0x41c)]['srcRect'],_0x5d14f9=_0x54f2ed,_0x77d7a0=_0xbaa83e,_0x34762f=_0x303d84,_0x4b53f2=_0x247625,_0x247cab=!0x1;if(_0x16503c!==0x0&&_0x16503c!==_0x48fbb3){let _0x3851ba=_0x54f2ed/_0x16503c,_0x1b2dc1=_0x303d84/_0x16503c;_0x5d14f9=_0x48fbb3*_0x3851ba,_0x34762f=_0x48fbb3*_0x1b2dc1,_0x247cab=!0x0;}if(_0x1be709!==0x0&&_0x1be709!==_0x57aaa2){let _0x534f9d=_0xbaa83e/_0x1be709,_0x5115c2=_0x247625/_0x1be709;_0x77d7a0=_0x57aaa2*_0x534f9d,_0x4b53f2=_0x57aaa2*_0x5115c2,_0x247cab=!0x0;}_0x247cab&&this[_0xf4c2c4(0x47a)]({'left':_0x5d14f9,'top':_0x77d7a0,'right':_0x34762f,'bottom':_0x4b53f2});}[_0xac088e(0x47a)](_0x49bcab){const _0x38cb70=_0xac088e;this[_0x38cb70(0x41c)][_0x38cb70(0x3bf)]=_0x49bcab,this['makeDirty'](!0x0);}[_0xac088e(0x44a)](_0x48f9aa){const _0x180905=_0xac088e;this[_0x180905(0x41c)][_0x180905(0x3ef)]=_0x48f9aa,this[_0x180905(0x4f1)](!0x0);}set[_0xac088e(0x39c)](_0x6d8dec){this['_transform']=_0x6d8dec;}get['transform'](){const _0x34ab52=_0xac088e;this[_0x34ab52(0x2c3)]||this['_setTransForm']();let _0x2d7bce=this[_0x34ab52(0x2c3)][_0x34ab52(0x36c)]();return this[_0x34ab52(0x432)](_0x2d7bce);}get[_0xac088e(0x413)](){const _0x2ffbee=_0xac088e;return this['_props'][_0x2ffbee(0x413)];}get[_0xac088e(0x25f)](){const _0x3e12c8=_0xac088e;return this[_0x3e12c8(0x41c)]['shapeId'];}get['classType'](){const _0x5d6b22=_0xac088e;return l[_0x5d6b22(0x407)]['SHAPE'];}['_draw'](_0x53cd73,_0x2b2ff3,_0x3ca2d8,_0x59628b){const _0x4b23a5=_0xac088e;let _0x4d2e3e=this[_0x4b23a5(0x41c)][_0x4b23a5(0x413)];if(!_0x4d2e3e||!_0x2b2ff3)return;let _0x2c1aa1=_0x3ca2d8??this[_0x4b23a5(0x4b0)],_0x5ab652=_0x59628b??this['height'],_0x4fcace={'shapeType':_0x4d2e3e[_0x4b23a5(0x26d)](),'width':_0x2c1aa1,'height':_0x5ab652},_0x13e6aa={'renderMode':i[_0x4b23a5(0x288)][_0x4b23a5(0x248)],'oKey':this[_0x4b23a5(0x299)],'image':this[_0x4b23a5(0x41c)][_0x4b23a5(0x3ef)],'angle':this[_0x4b23a5(0x27a)]};_0x4d2e3e[_0x4b23a5(0x3c4)](_0x4fcace),_0x53cd73[_0x4b23a5(0x30b)]();let _0x55c5dd={'top':0x0,'left':0x0,'width':_0x2c1aa1,'height':_0x5ab652},_0x32d003=_0x4d2e3e[_0x4b23a5(0x209)](_0x55c5dd);_0x32d003?this[_0x4b23a5(0x2c8)](_0x53cd73,_0x32d003,_0x1dec9b=>{_0x4d2e3e['render'](_0x1dec9b,_0x55c5dd,_0x13e6aa);}):(this['_releaseRenderCache'](),_0x4d2e3e[_0x4b23a5(0x502)](_0x53cd73,_0x55c5dd,_0x13e6aa)),_0x53cd73['restore']();let _0x2bd740=_0x4d2e3e[_0x4b23a5(0x4ed)](),_0x3e2b10=_0x4d2e3e[_0x4b23a5(0x2e8)](_0x55c5dd),_0x539c3c=_0x4d2e3e['isLineShape']();if(_0x2bd740&&_0x3e2b10&&!_0x539c3c){_0x53cd73[_0x4b23a5(0x30b)](),this[_0x4b23a5(0x4f6)]()[_0x4b23a5(0x1ed)]&&_0x53cd73[_0x4b23a5(0x2da)](-0x1,0x1);let _0x29f5f9=_0x2c1aa1/0x2,_0x563090=_0x5ab652/0x2;_0x53cd73['translate'](-_0x29f5f9,-_0x563090),_0x53cd73[_0x4b23a5(0x357)](),this['_drawShapeText'](_0x53cd73,_0x2bd740,_0x3e2b10),_0x53cd73[_0x4b23a5(0x204)]();}}['getDrawingPoints'](_0x2db342){}[_0xac088e(0x4d3)](_0x53cc2e,_0x1ead0c,_0x4da217){const _0xcb5ab7=_0xac088e;var _0x3001ec;this[_0xcb5ab7(0x33c)]=[],this[_0xcb5ab7(0x41c)]['isEditing']||(!((_0x3001ec=_0x1ead0c['dataModel'])!=null&&_0x3001ec[_0xcb5ab7(0x340)])&&_0xcb5ab7(0x21a)in _0x1ead0c&&_0x1ead0c[_0xcb5ab7(0x21a)]===!0x1?this['_drawSimpleText'](_0x53cc2e,_0x1ead0c,_0x4da217):this[_0xcb5ab7(0x1e0)](_0x53cc2e,_0x1ead0c,_0x4da217));}[_0xac088e(0x40a)](_0x9ea244,_0x3907c5,_0x78f9d6){const _0x5c0d33=_0xac088e;this['_drawRichText'](_0x9ea244,{..._0x3907c5,'text':_0x3907c5['text']??'','dataModel':{'doc':(0x0,e['plainShapeTextToDocumentData'])(_0x3907c5,_0x5c0d33(0x244)+this['oKey'])}},_0x78f9d6);}[_0xac088e(0x1e0)](_0x784de1,_0x1f1e2c,_0x12c083){const _0x1b2f2b=_0xac088e;(0x0,e[_0x1b2f2b(0x457)])(_0x784de1,this[_0x1b2f2b(0x298)],(_0x1cc39c,_0xa84490,_0x1b67c6)=>{const _0x2a3e37=_0x1b2f2b;this[_0x2a3e37(0x276)](_0x1cc39c,_0x1f1e2c,_0x12c083,_0xa84490,_0x1b67c6===_0x2a3e37(0x3d6));});}[_0xac088e(0x276)](_0x23662c,_0x5640c7,_0x207fc8,_0x347b7a,_0x9c6217){const _0x361f8a=_0xac088e;let _0x563cd0=this[_0x361f8a(0x41c)][_0x361f8a(0x2b0)];if(!_0x5640c7[_0x361f8a(0x1f9)]||!_0x563cd0){_0x563cd0||console[_0x361f8a(0x350)](_0x361f8a(0x3eb));return;}let _0x4c44fa=(0x0,e['normalizeShapeTextModel'])(_0x5640c7[_0x361f8a(0x1f9)]);if(!_0x4c44fa)return;let _0x644544=_0x4c44fa[_0x361f8a(0x340)];if(!_0x644544)return;let _0x11c3fd=(0x0,a['createShapeFormulaDocument'])(_0x644544,_0x347b7a),_0x1b14ee=_0x4c44fa['va']??o[_0x361f8a(0x48a)][_0x361f8a(0x34b)],_0x575639=_0x4c44fa['ha']??o[_0x361f8a(0x38b)][_0x361f8a(0x1fa)],_0x1cd51a=ot(this['_props'][_0x361f8a(0x413)][_0x361f8a(0x296)](),_0x5640c7,_0x11c3fd),_0x6b3551=_0x5640c7[_0x361f8a(0x47f)],_0x35cee4=(0x0,e['prepareShapeTextDocumentData'])(_0x11c3fd,{'isHorizontal':_0x6b3551!==!0x1,'textRect':_0x207fc8,'verticalAlign':_0x1b14ee,'horizontalAlign':_0x575639,'wrapStrategy':_0x1cd51a[_0x361f8a(0x442)]}),_0x24aef5=new o[(_0x361f8a(0x24c))](_0x35cee4),_0x24b336=new l['DocumentViewModel'](_0x24aef5),_0x5428dd=l[_0x361f8a(0x3cb)][_0x361f8a(0x506)](_0x24b336,_0x563cd0);_0x5428dd[_0x361f8a(0x449)]();let _0x32473e=_0x5428dd['getActualSize']()['actualHeight'],_0x167c61=(0x0,e[_0x361f8a(0x1d7)])({'contentHeight':_0x32473e,'verticalAlign':_0x1b14ee,'viewportHeight':_0x207fc8[_0x361f8a(0x3ed)]});_0x24aef5[_0x361f8a(0x225)]({'pageSize':{'width':_0x6b3551===!0x1?_0x207fc8[_0x361f8a(0x3ed)]:_0x207fc8[_0x361f8a(0x4b0)],'height':(0x0,e[_0x361f8a(0x477)])(_0x11c3fd,_0x167c61['contentHeight'])}}),_0x24aef5[_0x361f8a(0x242)]({'t':_0x167c61[_0x361f8a(0x35f)]}),_0x5428dd[_0x361f8a(0x449)]();let _0x90466a=new l[(_0x361f8a(0x2d5))](_0x361f8a(0x4ac)+this['oKey'],_0x5428dd,{'pageMarginLeft':0x0,'pageMarginTop':0x0,'onTextFillImageLoaded':()=>this[_0x361f8a(0x4f1)](!0x0)});_0x90466a[_0x361f8a(0x2b1)](_0x207fc8[_0x361f8a(0x4b0)],_0x167c61[_0x361f8a(0x35a)]),_0x23662c[_0x361f8a(0x30b)](),_0x23662c[_0x361f8a(0x305)](_0x207fc8[_0x361f8a(0x20e)],_0x207fc8[_0x361f8a(0x211)]),_0x1cd51a[_0x361f8a(0x26f)]&&(_0x23662c['beginPath'](),_0x23662c[_0x361f8a(0x32c)](0x0,_0x167c61['clipTop'],_0x207fc8[_0x361f8a(0x4b0)],_0x167c61[_0x361f8a(0x398)]),_0x23662c['clip']()),_0x167c61[_0x361f8a(0x4e7)]&&_0x23662c['translateWithPrecision'](0x0,_0x167c61['contentVerticalOffset']),_0x90466a[_0x361f8a(0x2ad)](_0x23662c),_0x9c6217&&(this['_hyperLinkRegions']=(0x0,e[_0x361f8a(0x267)])(_0x90466a,{'left':_0x207fc8[_0x361f8a(0x20e)],'top':_0x207fc8[_0x361f8a(0x211)]+_0x167c61['contentVerticalOffset']},_0x1cd51a[_0x361f8a(0x26f)]?{'left':_0x207fc8['left'],'right':_0x207fc8[_0x361f8a(0x20e)]+_0x207fc8[_0x361f8a(0x4b0)],'top':_0x207fc8[_0x361f8a(0x211)]+_0x167c61[_0x361f8a(0x260)],'bottom':_0x207fc8[_0x361f8a(0x211)]+_0x167c61[_0x361f8a(0x260)]+_0x167c61[_0x361f8a(0x398)]}:void 0x0)),_0x23662c[_0x361f8a(0x204)](),_0x90466a['dispose'](),_0x5428dd[_0x361f8a(0x45f)](),_0x24b336[_0x361f8a(0x45f)](),_0x24aef5[_0x361f8a(0x45f)]();}[_0xac088e(0x502)](_0x58534f,_0x36821c,_0x49a628=!0x1){const _0x5bb9da=_0xac088e;if(!this[_0x5bb9da(0x416)])return this[_0x5bb9da(0x4f1)](!0x1),this;let {width:_0x1609e0,height:_0x29adfc,left:_0x850d02,top:_0x481561}=this,_0x2b3cf4=this['getRealBound']();if(_0x1609e0=_0x2b3cf4[_0x5bb9da(0x4b0)],_0x29adfc=_0x2b3cf4[_0x5bb9da(0x3ed)],_0x850d02=_0x2b3cf4[_0x5bb9da(0x20e)],_0x481561=_0x2b3cf4[_0x5bb9da(0x211)],this[_0x5bb9da(0x38c)](_0x36821c)){let {top:_0x54feba,left:_0x26e1f8,bottom:_0x396030,right:_0x34b2aa}=_0x36821c['viewBound'];if(_0x1609e0+this[_0x5bb9da(0x4c2)]+_0x850d02<_0x26e1f8||_0x34b2aa<_0x850d02||_0x29adfc+this[_0x5bb9da(0x4c2)]+_0x481561<_0x54feba||_0x396030<_0x481561)return this;}let _0x55a44f=_0x850d02+_0x1609e0/0x2,_0x17824d=_0x481561+_0x29adfc/0x2,_0x501333=this[_0x5bb9da(0x39c)]['getMatrix']();if(this[_0x5bb9da(0x41c)][_0x5bb9da(0x3e7)]){let _0x5c1b34=this[_0x5bb9da(0x4f6)](),_0x37e5b5=new l[(_0x5bb9da(0x41e))]();_0x37e5b5[_0x5bb9da(0x2cb)]({..._0x5c1b34}),_0x501333=_0x37e5b5[_0x5bb9da(0x46e)]();}return _0x58534f[_0x5bb9da(0x30b)](),this['_props']['shapeModel'][_0x5bb9da(0x379)]===!0x0||_0x58534f[_0x5bb9da(0x39c)](_0x501333[0x0],_0x501333[0x1],_0x501333[0x2],_0x501333[0x3],_0x55a44f,_0x17824d),this[_0x5bb9da(0x39d)](_0x58534f,_0x36821c,_0x1609e0,_0x29adfc),_0x58534f[_0x5bb9da(0x204)](),this[_0x5bb9da(0x4f1)](!0x1),this;}[_0xac088e(0x2f8)](_0xff9e6e){const _0x1925c9=_0xac088e;let {left:_0x219c9e,top:_0x282e55,width:_0x83eb23,height:_0x29083b}=this['getRealBound'](),_0x5454b4=this[_0x1925c9(0x39c)]['getMatrix'](),_0x273683=_0x219c9e+_0x83eb23/0x2,_0x2889b6=_0x282e55+_0x29083b/0x2,_0x27bc17=new l[(_0x1925c9(0x41e))]([_0x5454b4[0x0],_0x5454b4[0x1],_0x5454b4[0x2],_0x5454b4[0x3],_0x273683,_0x2889b6]),_0x226ac7=this[_0x1925c9(0x4e6)]();return(this[_0x1925c9(0x4df)]&&(_0x226ac7==null?void 0x0:_0x226ac7[_0x1925c9(0x24b)])===l['RENDER_CLASS_TYPE']['GROUP']?_0x226ac7[_0x1925c9(0x4f7)]['multiply'](_0x27bc17):_0x27bc17)['invert']()[_0x1925c9(0x2b4)](_0xff9e6e);}[_0xac088e(0x206)](_0x525d30){const _0x532a65=_0xac088e;let {left:_0x3555ff,top:_0xd6ad30,width:_0x103165,height:_0x275f8b}=this['getRealBound'](),_0x1fac89=_0x3555ff+_0x103165/0x2,_0x57f652=_0xd6ad30+_0x275f8b/0x2,_0x3610ae=this[_0x532a65(0x39c)][_0x532a65(0x46e)](),_0x168ca3=new l[(_0x532a65(0x41e))]([_0x3610ae[0x0],_0x3610ae[0x1],_0x3610ae[0x2],_0x3610ae[0x3],_0x1fac89,_0x57f652]),_0x506ffa=this[_0x532a65(0x4e6)](),_0x106d2b=(this['isInGroup']&&(_0x506ffa==null?void 0x0:_0x506ffa[_0x532a65(0x24b)])===l[_0x532a65(0x407)][_0x532a65(0x473)]?_0x506ffa[_0x532a65(0x4f7)]['multiply'](_0x168ca3):_0x168ca3)[_0x532a65(0x4a0)]()[_0x532a65(0x2b4)](_0x525d30),_0x109fbf=_0x103165/0x2,_0x38f57f=_0x275f8b/0x2,_0x17a494=this['_props']['shapeModel'];return _0x17a494&&_0x17a494[_0x532a65(0x3b3)]()?_0x17a494['isHitLine'](_0x106d2b['x'],_0x106d2b['y'],_0x103165,_0x275f8b):_0x106d2b['x']>=-_0x109fbf-this[_0x532a65(0x4c2)]/0x2&&_0x106d2b['x']<=_0x109fbf+this[_0x532a65(0x4c2)]/0x2&&_0x106d2b['y']>=-_0x38f57f-this[_0x532a65(0x4c2)]/0x2&&_0x106d2b['y']<=_0x38f57f+this[_0x532a65(0x4c2)]/0x2;}[_0xac088e(0x45f)](){const _0x119cc4=_0xac088e;this[_0x119cc4(0x298)][_0x119cc4(0x45f)](),this['_props']['shapeModel']=null,super[_0x119cc4(0x45f)]();}};let W=class extends o[_0xac088e(0x1d9)]{constructor(_0x24121b,_0x44637f,_0x51e977,_0x15671f){const _0x378126=_0xac088e;super(),this[_0x378126(0x3dd)]=_0x24121b,this[_0x378126(0x31f)]=_0x44637f,this['_docsShapeService']=_0x51e977,this[_0x378126(0x483)]=_0x15671f,H(this,'_activeShapeId',null),H(this,'_unitId',null),H(this,_0x378126(0x20c),null),H(this,_0x378126(0x1f5),void 0x0),H(this,_0x378126(0x286),[]),H(this,_0x378126(0x371),0x0),H(this,_0x378126(0x34a),0x0),H(this,_0x378126(0x4e2),0x0),H(this,_0x378126(0x405),0x0),H(this,_0x378126(0x4ff),!0x1),H(this,_0x378126(0x2af),!0x1),H(this,'_activeAdjustInfo',void 0x0),H(this,_0x378126(0x251),void 0x0),H(this,_0x378126(0x29f),void 0x0),H(this,_0x378126(0x20b),void 0x0),this[_0x378126(0x3c8)](),this[_0x378126(0x43c)]();}[_0xac088e(0x382)](){const _0x4949a4=_0xac088e;this[_0x4949a4(0x29d)]();}[_0xac088e(0x342)](){this['_updateShapeAdjustControls'](!0x0);}[_0xac088e(0x27b)](_0x1ec699,_0x1ee773,_0x412fb){const _0x2414ba=_0xac088e;var _0x67eabc;return(_0x67eabc=this[_0x2414ba(0x446)][_0x2414ba(0x3a7)](_0x1ec699,_0x1ee773,_0x412fb))==null?void 0x0:_0x67eabc[_0x2414ba(0x4ad)]();}['_getShapeAdjustInfosById'](_0x1bbe01,_0x21a4e0,_0x77071f,_0x445de4){const _0x279835=_0xac088e;var _0x46e86c;return(_0x46e86c=this[_0x279835(0x446)]['getShapeModel'](_0x1bbe01,_0x21a4e0,_0x77071f))==null?void 0x0:_0x46e86c[_0x279835(0x21d)](_0x445de4);}[_0xac088e(0x261)](){const _0x2379d4=_0xac088e;return this[_0x2379d4(0x210)]===null||this[_0x2379d4(0x20c)]===null||this[_0x2379d4(0x219)]===null?null:this[_0x2379d4(0x31f)]['getDrawingByParam']({'unitId':this[_0x2379d4(0x210)],'subUnitId':this[_0x2379d4(0x20c)],'drawingId':this['_activeShapeId']})??null;}[_0xac088e(0x24a)](_0x45016c){const _0x559179=_0xac088e;if(this[_0x559179(0x210)]===null||this['_subUnitId']===null||this[_0x559179(0x219)]===null)return null;let _0x9acab8=(0x0,u[_0x559179(0x2ed)])({'unitId':this[_0x559179(0x210)],'subUnitId':this[_0x559179(0x20c)],'drawingId':this[_0x559179(0x219)]}),_0x5d8762=_0x45016c[_0x559179(0x4a1)](_0x9acab8);return _0x5d8762 instanceof U?_0x5d8762:null;}['_createShapeAdjustControls'](_0x2faf1e=!0x1){const _0x42ee7c=_0xac088e;if(this[_0x42ee7c(0x210)]===null||this[_0x42ee7c(0x20c)]===null||this[_0x42ee7c(0x219)]===null)return;let _0xfe8820=this[_0x42ee7c(0x261)]();if((_0xfe8820==null?void 0x0:_0xfe8820[_0x42ee7c(0x37c)])!==o[_0x42ee7c(0x440)]['DRAWING_SHAPE']||!_0xfe8820[_0x42ee7c(0x39c)])return;let _0x5e8bca=this['_docsShapeService'][_0x42ee7c(0x3a7)](this[_0x42ee7c(0x210)],this[_0x42ee7c(0x20c)],this[_0x42ee7c(0x219)]);if(!_0x5e8bca||_0x5e8bca[_0x42ee7c(0x3b3)]())return;let {left:_0x4af635=0x0,top:_0x2f207b=0x0,width:_0x2cfd6b=0x0,height:_0xc80948=0x0,flipX:_0x4e03f5,flipY:_0x179c8e,angle:_0x2417f0=0x0}=_0xfe8820[_0x42ee7c(0x39c)];(_0x2faf1e||!this[_0x42ee7c(0x1f5)])&&(_0x5e8bca['updateContext']({'width':_0x2cfd6b,'height':_0xc80948}),this[_0x42ee7c(0x1f5)]=_0x5e8bca[_0x42ee7c(0x4ad)]());let _0x44e10c=this[_0x42ee7c(0x1f5)];if(!(_0x44e10c!=null&&_0x44e10c[_0x42ee7c(0x1ee)]))return;let {scene:_0x435d9d}=this[_0x42ee7c(0x3dd)];for(let _0x31f491 of _0x44e10c){let _0x22b4b5=this[_0x42ee7c(0x2a2)](_0x31f491,_0x2cfd6b,_0xc80948,!!_0x4e03f5,!!_0x179c8e,_0x2417f0);this[_0x42ee7c(0x231)](_0x435d9d,_0x22b4b5,_0x22b4b5[_0x42ee7c(0x332)],_0x4af635,_0x2f207b,this[_0x42ee7c(0x210)],this[_0x42ee7c(0x20c)]);}}['_toVisualAdjustPoint'](_0xedb660,_0x5b1a8b,_0x1cef02,_0x2d242c,_0x3d3764,_0x32d015){const _0x3cb0f7=_0xac088e;let _0x5c8f31=_0xedb660['x'],_0x49a5c6=_0xedb660['y'];if(_0x2d242c&&(_0x5c8f31=_0x5b1a8b-_0x5c8f31),_0x3d3764&&(_0x49a5c6=_0x1cef02-_0x49a5c6),_0x32d015!==0x0){let _0x5f3eac=_0x5b1a8b/0x2,_0x35e23b=_0x1cef02/0x2,_0x48c3ba=_0x32d015*Math['PI']/0xb4,_0x3852bb=Math[_0x3cb0f7(0x40e)](_0x48c3ba),_0x1e8b62=Math[_0x3cb0f7(0x361)](_0x48c3ba),_0x106374=_0x5c8f31-_0x5f3eac,_0x58dcf9=_0x49a5c6-_0x35e23b;_0x5c8f31=_0x5f3eac+(_0x106374*_0x3852bb-_0x58dcf9*_0x1e8b62),_0x49a5c6=_0x35e23b+(_0x106374*_0x1e8b62+_0x58dcf9*_0x3852bb);}return{'x':_0x5c8f31,'y':_0x49a5c6,'adjName':_0xedb660[_0x3cb0f7(0x332)]};}[_0xac088e(0x29b)](_0x3fbb2f=!0x1){const _0x1df9e5=_0xac088e;_0x3fbb2f&&this['_clearShapeAdjustControls'](),this[_0x1df9e5(0x2c6)](_0x3fbb2f);}['_addShapeAdjustControl'](_0x2489b2,_0x2b3a16,_0x581333,_0x1c37d0,_0x2721e5,_0x2e5a94,_0x55b853){const _0x28d816=_0xac088e;if(!this[_0x28d816(0x219)])return;let _0x59b9a2=_0x28d816(0x43e)+this[_0x28d816(0x219)]+'-'+_0x581333,_0x16bde8=_0x2489b2['getObjectIncludeInGroup'](_0x59b9a2);if(_0x16bde8){_0x16bde8[_0x28d816(0x1f6)]({'left':_0x2b3a16['x']+_0x1c37d0-i[_0x28d816(0x458)][_0x28d816(0x22b)],'top':_0x2b3a16['y']+_0x2721e5-i[_0x28d816(0x458)][_0x28d816(0x22b)]}),_0x16bde8[_0x28d816(0x4f1)](!0x0);return;}let _0x5cb1fb=new at(_0x59b9a2,{'left':_0x2b3a16['x']+_0x1c37d0-i[_0x28d816(0x458)][_0x28d816(0x22b)],'top':_0x2b3a16['y']+_0x2721e5-i[_0x28d816(0x458)][_0x28d816(0x22b)],'adjName':_0x581333,'shapeId':this['_activeShapeId'],'unitId':_0x2e5a94,'subUnitId':_0x55b853,'width':i[_0x28d816(0x458)]['adjHandleSize']+0x8,'height':i[_0x28d816(0x458)][_0x28d816(0x22b)]+0x8,'zIndex':l[_0x28d816(0x29e)]+0x1,'evented':!0x0});this[_0x28d816(0x286)][_0x28d816(0x474)](_0x5cb1fb),this[_0x28d816(0x32b)](_0x5cb1fb,_0x2489b2,_0x581333),_0x2489b2[_0x28d816(0x302)](_0x5cb1fb,l['DRAWING_OBJECT_LAYER_INDEX']+0x1);}[_0xac088e(0x29d)](){const _0x231e8d=_0xac088e;this['_adjustPointObjects'][_0x231e8d(0x3ca)](_0x38e55f=>_0x38e55f[_0x231e8d(0x45f)]()),this['_adjustPointObjects']=[];}[_0xac088e(0x281)](){const _0x2e039d=_0xac088e;this[_0x2e039d(0x2c6)]();}[_0xac088e(0x28e)](_0x41f56d,_0x31a1b1,_0x587c2e){const _0xd98339=_0xac088e;let _0x2347f5=l[_0xd98339(0x3c6)][_0xd98339(0x466)]([_0x31a1b1,_0x587c2e]),_0x424f7e=_0x41f56d[_0xd98339(0x4ca)](_0x2347f5)??_0x41f56d[_0xd98339(0x3d7)]()[0x0];return(_0x424f7e==null?void 0x0:_0x424f7e[_0xd98339(0x434)](_0x2347f5))??_0x2347f5;}['_attachAdjustEvent'](_0x164038,_0x32cd04,_0x38da7e){const _0x2ffd15=_0xac088e;this['disposeWithMe']((0x0,o[_0x2ffd15(0x3fb)])(_0x164038[_0x2ffd15(0x241)][_0x2ffd15(0x20d)]((_0x287369,_0x132c66)=>{const _0x543660=_0x2ffd15;var _0x371cd9;let _0xbdaeea=_0x164038[_0x543660(0x355)]();this['_activeAdjustInfo']=this['_getShapeAdjustInfosById'](_0xbdaeea[_0x543660(0x2e6)],_0xbdaeea[_0x543660(0x390)],_0xbdaeea[_0x543660(0x270)],_0x38da7e),this[_0x543660(0x251)]=this[_0x543660(0x446)][_0x543660(0x3a7)](_0xbdaeea[_0x543660(0x2e6)],_0xbdaeea[_0x543660(0x390)],_0xbdaeea[_0x543660(0x270)]);let _0x5608b9=this[_0x543660(0x261)](),_0x3524f7=_0x5608b9==null?void 0x0:_0x5608b9[_0x543660(0x39c)];if(!_0x5608b9||!_0x3524f7||!this[_0x543660(0x251)])return;this['_baseShapeLeft']=_0x3524f7['left']||0x0,this['_baseShapeTop']=_0x3524f7[_0x543660(0x211)]||0x0,this['_baseShapeWidth']=_0x3524f7[_0x543660(0x4b0)]||0x0,this[_0x543660(0x405)]=_0x3524f7['height']||0x0;let _0x26453f=!!_0x3524f7[_0x543660(0x1ed)],_0x3f9a76=!!_0x3524f7[_0x543660(0x3fc)],_0x409033=_0x3524f7[_0x543660(0x27a)]||0x0,_0x2a59fc={...((_0x371cd9=this[_0x543660(0x1e8)])==null?void 0x0:_0x371cd9['currentAdjustValues'])??{}};this[_0x543660(0x4ff)]=!0x0,_0x32cd04['disableObjectsEvent'](),this['_adjHandlerPointerMove']=_0x32cd04[_0x543660(0x2bd)]['subscribeEvent']((_0x2a382e,_0x4db0a1)=>{const _0x2c5ed4=_0x543660;var _0x3a56a5;if(!this[_0x2c5ed4(0x4ff)]||!this['_activeShapeModel']||!this[_0x2c5ed4(0x1e8)])return;_0x32cd04[_0x2c5ed4(0x3e2)](),_0x32cd04[_0x2c5ed4(0x2ac)](l[_0x2c5ed4(0x4c1)][_0x2c5ed4(0x1f8)]);let _0x394c35=this['_toScenePoint'](_0x32cd04,_0x2a382e[_0x2c5ed4(0x36d)],_0x2a382e[_0x2c5ed4(0x25d)]),_0x2b3c21=_0x394c35['x']-this[_0x2c5ed4(0x371)],_0xaf5751=_0x394c35['y']-this['_baseShapeTop'];if(_0x409033!==0x0){let _0x58d5e1=this[_0x2c5ed4(0x4e2)]/0x2,_0x402346=this['_baseShapeHeight']/0x2,_0x144de0=_0x409033*Math['PI']/0xb4,_0x927800=Math[_0x2c5ed4(0x40e)](_0x144de0),_0x2adac1=Math[_0x2c5ed4(0x361)](_0x144de0),_0x8aac8e=_0x2b3c21-_0x58d5e1,_0x1f07ec=_0xaf5751-_0x402346;_0x2b3c21=_0x58d5e1+(_0x8aac8e*_0x927800+_0x1f07ec*_0x2adac1),_0xaf5751=_0x402346+(-_0x8aac8e*_0x2adac1+_0x1f07ec*_0x927800);}_0x26453f&&(_0x2b3c21=this[_0x2c5ed4(0x4e2)]-_0x2b3c21),_0x3f9a76&&(_0xaf5751=this[_0x2c5ed4(0x405)]-_0xaf5751);let _0x8411d={'left':0x0,'top':0x0,'width':this[_0x2c5ed4(0x4e2)],'height':this[_0x2c5ed4(0x405)]},_0x17fbc2=this[_0x2c5ed4(0x251)][_0x2c5ed4(0x2d7)](_0x8411d,{'x':_0x2b3c21,'y':_0xaf5751},this[_0x2c5ed4(0x1e8)],_0x26453f,_0x3f9a76);if(Object[_0x2c5ed4(0x460)](_0x17fbc2)['length']!==0x0){for(let [_0x1437f9,_0x9de9f7]of Object[_0x2c5ed4(0x35d)](_0x17fbc2))this[_0x2c5ed4(0x251)][_0x2c5ed4(0x4cf)](_0x1437f9,_0x9de9f7);this['_activeShapeModel'][_0x2c5ed4(0x3c4)]({'width':this[_0x2c5ed4(0x4e2)],'height':this[_0x2c5ed4(0x405)]}),(_0x3a56a5=this['_getActiveDrawingShape'](_0x32cd04))==null||_0x3a56a5['makeDirty'](!0x0),this[_0x2c5ed4(0x1f5)]=this[_0x2c5ed4(0x27b)](_0xbdaeea['unitId'],_0xbdaeea[_0x2c5ed4(0x390)],_0xbdaeea[_0x2c5ed4(0x270)]),this[_0x2c5ed4(0x281)](),_0x4db0a1[_0x2c5ed4(0x306)]();}}),this[_0x543660(0x20b)]=_0x32cd04['onPointerUp$'][_0x543660(0x20d)]((_0x44f40a,_0x3b31f6)=>{const _0xb6853d=_0x543660;var _0x5c55a3,_0x305ea2;(_0x5c55a3=this[_0xb6853d(0x29f)])==null||_0x5c55a3[_0xb6853d(0x226)](),(_0x305ea2=this[_0xb6853d(0x20b)])==null||_0x305ea2[_0xb6853d(0x226)](),_0x32cd04[_0xb6853d(0x41d)]();let _0x3c48b7=this[_0xb6853d(0x1e8)];if(_0x3c48b7&&this['_activeShapeModel']){let _0x730b5e={};for(let _0x3dcf46 of Object['keys'](_0x3c48b7[_0xb6853d(0x3ad)])){let _0x3ad6db=this[_0xb6853d(0x251)][_0xb6853d(0x280)](_0x3dcf46);_0x3ad6db!==void 0x0&&(_0x730b5e[_0x3dcf46]=_0x3ad6db);}Object[_0xb6853d(0x460)](_0x730b5e)[_0xb6853d(0x1ee)]>0x0&&R(this[_0xb6853d(0x483)],_0xbdaeea[_0xb6853d(0x2e6)],_0xbdaeea[_0xb6853d(0x390)],_0xbdaeea[_0xb6853d(0x270)],{'oldShapeData':{'adjustValues':_0x2a59fc}},{'adjustValues':_0x730b5e});}this[_0xb6853d(0x1e8)]=void 0x0,this[_0xb6853d(0x251)]=void 0x0,this[_0xb6853d(0x4ff)]=!0x1,_0x32cd04[_0xb6853d(0x4eb)](),_0x3b31f6[_0xb6853d(0x306)]();}),_0x132c66['stopPropagation']();})));}[_0xac088e(0x43c)](){const _0x2002d2=_0xac088e;let {scene:_0x416694}=this[_0x2002d2(0x3dd)],_0x4d322f=_0x416694[_0x2002d2(0x2df)]();this['disposeWithMe'](_0x4d322f[_0x2002d2(0x29a)]['subscribe'](_0x1f6a40=>{const _0x418edc=_0x2002d2;this['_createShapeAdjustControls'](),_0x1f6a40['objects']!==null&&_0x1f6a40[_0x418edc(0x3a9)][_0x418edc(0x40c)]===0x1&&_0x1f6a40[_0x418edc(0x3a9)]['values']()[_0x418edc(0x1f1)]()[_0x418edc(0x201)]instanceof U&&(this['_isShouldShowDrawingShapeAdjust']=!0x0);})),this[_0x2002d2(0x38a)](_0x4d322f[_0x2002d2(0x43f)][_0x2002d2(0x43a)](()=>{const _0x3f9c06=_0x2002d2;this[_0x3f9c06(0x2af)]&&this[_0x3f9c06(0x29d)]();})),this[_0x2002d2(0x38a)](_0x416694[_0x2002d2(0x1e7)][_0x2002d2(0x20d)](()=>{const _0x124e4f=_0x2002d2;this['_isShouldShowDrawingShapeAdjust']&&(this[_0x124e4f(0x2af)]=!0x1,this[_0x124e4f(0x2c6)]());})),this[_0x2002d2(0x38a)](_0x4d322f[_0x2002d2(0x2a3)]['subscribe'](()=>{const _0x4e1856=_0x2002d2;this[_0x4e1856(0x210)]&&this['_subUnitId']&&this[_0x4e1856(0x219)]&&(this[_0x4e1856(0x1f5)]=this[_0x4e1856(0x27b)](this[_0x4e1856(0x210)],this[_0x4e1856(0x20c)],this[_0x4e1856(0x219)]),this[_0x4e1856(0x281)]());}));}[_0xac088e(0x3c8)](){const _0x3574c7=_0xac088e;this[_0x3574c7(0x38a)](this['_commandService'][_0x3574c7(0x25e)](_0x466ee1=>{const _0x48171e=_0x3574c7;if(_0x466ee1['id']!==r['UpdateDocShapeDataMutation']['id'])return;let {unitId:_0x4228bf,shapeId:_0x1a0316}=_0x466ee1[_0x48171e(0x359)];_0x4228bf===this['_unitId']&&_0x1a0316===this['_activeShapeId']&&this[_0x48171e(0x342)]();})),this['disposeWithMe'](this[_0x3574c7(0x31f)][_0x3574c7(0x22d)][_0x3574c7(0x43a)](_0x5f178e=>{const _0x419f97=_0x3574c7;if(_0x5f178e[_0x419f97(0x1ee)]===0x1){let _0x28c695=_0x5f178e[0x0],_0xf9c3f6=this[_0x419f97(0x31f)][_0x419f97(0x331)](_0x28c695);if((_0xf9c3f6==null?void 0x0:_0xf9c3f6[_0x419f97(0x37c)])===o[_0x419f97(0x440)][_0x419f97(0x2bf)]){this[_0x419f97(0x219)]=_0x28c695['drawingId'],this[_0x419f97(0x210)]=_0x28c695['unitId'],this[_0x419f97(0x20c)]=_0x28c695['subUnitId'],this[_0x419f97(0x1f5)]=this[_0x419f97(0x27b)](_0x28c695[_0x419f97(0x2e6)],_0x28c695['subUnitId'],_0x28c695[_0x419f97(0x270)]),this['_clearShapeAdjustControls'](),this['_createShapeAdjustControls']();return;}}this[_0x419f97(0x219)]=null,this[_0x419f97(0x1f5)]=void 0x0,this[_0x419f97(0x210)]=null,this['_subUnitId']=null,this[_0x419f97(0x29d)]();})),this[_0x3574c7(0x38a)]((0x0,p['merge'])(this[_0x3574c7(0x31f)]['update$'],this[_0x3574c7(0x31f)][_0x3574c7(0x35e)])[_0x3574c7(0x43a)](_0x4ec50a=>{const _0x561d89=_0x3574c7;var _0x3d356d;let _0x1ff5e5=_0x4ec50a['find'](_0x193ad2=>_0x193ad2[_0x561d89(0x270)]===this['_activeShapeId']&&_0x193ad2['unitId']===this[_0x561d89(0x210)]&&_0x193ad2[_0x561d89(0x390)]===this[_0x561d89(0x20c)]);_0x1ff5e5&&((_0x3d356d=this['_drawingManagerService'][_0x561d89(0x331)](_0x1ff5e5))==null?void 0x0:_0x3d356d['drawingType'])===o['DrawingTypeEnum'][_0x561d89(0x2bf)]&&this['_updateShapeAdjustControls'](!0x0);})),this[_0x3574c7(0x38a)](this[_0x3574c7(0x31f)][_0x3574c7(0x356)][_0x3574c7(0x43a)](_0x23cb2f=>{const _0x130b7d=_0x3574c7;for(let _0x443ceb of _0x23cb2f)this['_activeShapeId']===_0x443ceb[_0x130b7d(0x270)]&&(this[_0x130b7d(0x219)]=null,this[_0x130b7d(0x1f5)]=void 0x0,this[_0x130b7d(0x210)]=null,this[_0x130b7d(0x20c)]=null,this[_0x130b7d(0x29d)]());}));}};W=I([F(0x1,u['IDrawingManagerService']),F(0x2,(0x0,o[_0xac088e(0x383)])(r[_0xac088e(0x326)])),F(0x3,o[_0xac088e(0x2cf)])],W);let G=class extends o['Disposable']{constructor(_0x25f3dd,_0x48e8bd){const _0x16916c=_0xac088e;super(),this['_permissionService']=_0x25f3dd,this['_instanceService']=_0x48e8bd,H(this,_0x16916c(0x292),new p[(_0x16916c(0x427))](null)),H(this,'editingParams$',this[_0x16916c(0x292)][_0x16916c(0x3d9)]()),H(this,_0x16916c(0x27e),new p[(_0x16916c(0x427))](!0x1)),H(this,_0x16916c(0x23b),this[_0x16916c(0x27e)][_0x16916c(0x3d9)]()),H(this,_0x16916c(0x2c5),void 0x0),this[_0x16916c(0x38a)](this[_0x16916c(0x462)][_0x16916c(0x4fe)][_0x16916c(0x43a)](()=>{const _0xfb3313=_0x16916c;let _0x4c32dd=this[_0xfb3313(0x40d)]();_0x4c32dd!=null&&_0x4c32dd['visible']&&!this[_0xfb3313(0x27f)](_0x4c32dd)&&this[_0xfb3313(0x49b)](null);}));}[_0xac088e(0x45f)](){const _0x7deea6=_0xac088e;this[_0x7deea6(0x4fd)](),this[_0x7deea6(0x292)][_0x7deea6(0x1f1)](null),this['_editingParams$']['complete'](),this['_onSavingEditorData$'][_0x7deea6(0x1f1)](!0x1),this[_0x7deea6(0x27e)][_0x7deea6(0x45a)](),super[_0x7deea6(0x45f)]();}[_0xac088e(0x49b)](_0x49fa65){const _0x3fc663=_0xac088e;(_0x49fa65==null||!_0x49fa65[_0x3fc663(0x416)]||this[_0x3fc663(0x27f)](_0x49fa65))&&(this[_0x3fc663(0x4fd)](),this['_editingParams$']['next'](_0x49fa65),(_0x49fa65==null||_0x49fa65[_0x3fc663(0x416)]&&this[_0x3fc663(0x27e)]['getValue']())&&this[_0x3fc663(0x27e)][_0x3fc663(0x1f1)](!0x1));}[_0xac088e(0x443)](_0x2b08cd){const _0x43cc19=_0xac088e;this[_0x43cc19(0x27e)][_0x43cc19(0x1f1)](_0x2b08cd);}[_0xac088e(0x40d)](){const _0x93bd3d=_0xac088e;return this[_0x93bd3d(0x292)][_0x93bd3d(0x403)]();}[_0xac088e(0x27f)](_0x40443f){const _0x190d57=_0xac088e;let _0x4ffcb0=this[_0x190d57(0x501)][_0x190d57(0x2cc)](_0x40443f[_0x190d57(0x2e6)],o[_0x190d57(0x230)]['UNIVER_DOC']);if(!_0x4ffcb0)return!0x0;let _0x7c8be6=(0x0,s[_0x190d57(0x2b6)])(_0x4ffcb0,_0x40443f[_0x190d57(0x25f)]);return(0x0,s[_0x190d57(0x376)])(this[_0x190d57(0x462)],_0x40443f[_0x190d57(0x2e6)],[...(0x0,s[_0x190d57(0x2b7)])(_0x4ffcb0,_0x7c8be6,_0x190d57(0x1e4),_0x40443f['shapeId']),(0x0,s[_0x190d57(0x1fe)])(_0x7c8be6,'drawing',_0x40443f[_0x190d57(0x25f)])]);}[_0xac088e(0x318)](_0x49c77d){const _0x6bd3e4=_0xac088e;let _0x5a24ba=this[_0x6bd3e4(0x40d)]();_0x5a24ba&&this['_completionFrame']===void 0x0&&(this['setOnSavingEditorData'](!0x0),this['_completionFrame']=requestAnimationFrame(()=>{const _0x4a525c=_0x6bd3e4;this[_0x4a525c(0x2c5)]=void 0x0,this[_0x4a525c(0x40d)]()===_0x5a24ba&&this['setEditing'](null);}));}['_clearCompletionFrame'](){const _0x2c41ed=_0xac088e;this['_completionFrame']!==void 0x0&&(cancelAnimationFrame(this['_completionFrame']),this[_0x2c41ed(0x2c5)]=void 0x0);}['cancelEditing'](){const _0x11efa7=_0xac088e;this['getEditing']()&&this[_0x11efa7(0x49b)](null);}};G=I([F(0x0,o[_0xac088e(0x23e)]),F(0x1,o[_0xac088e(0x257)])],G);function _0xa70b(_0x255067,_0x25044f){_0x255067=_0x255067-0x1d6;const _0x404d3d=_0x404d();let _0xa70be1=_0x404d3d[_0x255067];return _0xa70be1;}function st(_0x11aa4f){const _0x10face=_0xac088e;return _0x11aa4f['behindText']===!0x0||_0x11aa4f['behindText']===o[_0x10face(0x4a9)][_0x10face(0x3d4)]||_0x11aa4f[_0x10face(0x39e)]===o['PositionedObjectLayoutType'][_0x10face(0x1e6)]&&_0x11aa4f[_0x10face(0x4c4)]===o[_0x10face(0x4a9)][_0x10face(0x3d4)]?t[_0x10face(0x252)]-0x1:l['DRAWING_OBJECT_LAYER_INDEX'];}let K=class extends o[_0xac088e(0x1d9)]{constructor(_0x586e01,_0x1b33f2,_0x18569a,_0x35ed2a,_0x3aaf82,_0x2aac21,_0x3bf955){const _0x11fb12=_0xac088e;super(),this[_0x11fb12(0x31f)]=_0x586e01,this[_0x11fb12(0x446)]=_0x1b33f2,this[_0x11fb12(0x4b3)]=_0x18569a,this['_imageIoService']=_0x35ed2a,this['_urlImageService']=_0x3aaf82,this[_0x11fb12(0x2a5)]=_0x2aac21,this[_0x11fb12(0x38e)]=_0x3bf955,H(this,_0x11fb12(0x4f2),new Map()),this[_0x11fb12(0x38a)](this[_0x11fb12(0x38e)][_0x11fb12(0x34e)][_0x11fb12(0x43a)](_0x4cb9ba=>{const _0x29f358=_0x11fb12;var _0x4da8ff;(_0x4da8ff=this[_0x29f358(0x4f2)][_0x29f358(0x314)](this['_formulaKey'](_0x4cb9ba['unitId'],_0x4cb9ba[_0x29f358(0x390)],_0x4cb9ba[_0x29f358(0x25f)])))==null||_0x4da8ff[_0x29f358(0x3ca)](_0x2b4a19=>_0x2b4a19[_0x29f358(0x381)](_0x4cb9ba[_0x29f358(0x4bf)],_0x4cb9ba[_0x29f358(0x3ce)]));})),this[_0x11fb12(0x38a)](this[_0x11fb12(0x31f)][_0x11fb12(0x356)]['subscribe'](_0x113ff6=>{_0x113ff6['forEach'](_0x535d1e=>{const _0x7a197=_0xa70b;this[_0x7a197(0x38e)]['unregister']({'unitId':_0x535d1e['unitId'],'subUnitId':_0x535d1e[_0x7a197(0x390)],'shapeId':_0x535d1e['drawingId']}),this[_0x7a197(0x4f2)][_0x7a197(0x488)](this[_0x7a197(0x295)](_0x535d1e[_0x7a197(0x2e6)],_0x535d1e[_0x7a197(0x390)],_0x535d1e[_0x7a197(0x270)]));});}));}[_0xac088e(0x2b8)](_0x3716fa,_0x10a0ad){const _0x3d9912=_0xac088e;let {transform:_0x56dab9,drawingType:_0x4d9f39,srcRect:_0x262043,prstGeom:_0x3e7635,groupId:_0x820a0c,unitId:_0x2910cd,subUnitId:_0x4c7ce9,drawingId:_0x15121b,isMultiTransform:_0x352f51,transforms:_0x583813,hidden:_0x690404,selectable:_0x4e8432}=_0x3716fa;if(_0x4d9f39!==o['DrawingTypeEnum'][_0x3d9912(0x2bf)]||!this['_drawingManagerService'][_0x3d9912(0x2dc)]()||_0x56dab9==null)return;let _0x61493a=this['_drawingManagerService']['getDrawingEditable'](),_0x3abe2c=_0x352f51&&_0x583813?_0x583813:[_0x56dab9],_0x2acb31=[];for(let [_0x5e9549,_0x2878da]of _0x3abe2c[_0x3d9912(0x35d)]()){let {left:_0x2b34a2,top:_0x574b8b,width:_0x1bb77c,height:_0x195d57,angle:_0x333b0b,flipX:_0x472c5d,flipY:_0x5cc092,skewX:_0x2addc7,skewY:_0x4672d7}=_0x2878da,_0x1faf20=(0x0,u['getDrawingShapeKeyByDrawingSearch'])({'unitId':_0x2910cd,'subUnitId':_0x4c7ce9,'drawingId':_0x15121b},_0x352f51?_0x5e9549:void 0x0),_0x486fa7=_0x10a0ad['getObjectIncludeInGroup'](_0x1faf20);if(_0x486fa7!=null){let _0xefca1f={'unitId':_0x2910cd,'subUnitId':_0x4c7ce9,'shapeId':_0x15121b};_0x486fa7 instanceof U&&this['refreshFormulaPresentation'](_0x486fa7,_0xefca1f),_0x486fa7[_0x3d9912(0x1f6)]({'left':_0x2b34a2,'top':_0x574b8b,'width':_0x1bb77c,'height':_0x195d57,'angle':_0x333b0b,'flipX':_0x472c5d,'flipY':_0x5cc092,'skewX':_0x2addc7,'skewY':_0x4672d7});continue;}let _0x356f54=this['_drawingManagerService'][_0x3d9912(0x33f)](_0x2910cd,_0x4c7ce9),_0x31ca05=_0x356f54[_0x3d9912(0x476)](_0x15121b);if(_0x10a0ad[_0x3d9912(0x4a1)](_0x1faf20)||!this['_drawingManagerService'][_0x3d9912(0x2dc)]())continue;let _0x478b9a=this[_0x3d9912(0x446)][_0x3d9912(0x3a7)](_0x2910cd,_0x4c7ce9,_0x15121b);if(!_0x478b9a)continue;let _0xc4346d=(0x0,i[_0x3d9912(0x471)])(_0x478b9a[_0x3d9912(0x26d)]())?{...e['SHAPE_EDITOR_TRANSFORMER_CONFIG'],'rotateEnabled':!0x1,'resizeEnabled':!0x1,'borderEnabled':!0x1}:e['SHAPE_EDITOR_TRANSFORMER_CONFIG'],_0x1a966f=_0x478b9a[_0x3d9912(0x296)]()[_0x3d9912(0x3f7)],_0x1e0155={'unitId':_0x2910cd,'subUnitId':_0x4c7ce9,'shapeId':_0x15121b};_0x1a966f&&this['_shapeFormulaService']['register'](_0x1e0155,_0x1a966f);let _0x3a90d5=new U(_0x1faf20,{..._0x2878da,'zIndex':_0x31ca05===-0x1?_0x356f54[_0x3d9912(0x1ee)]-0x1:_0x31ca05,'shapeModel':_0x478b9a,'localeService':this['_localeService'],'shapeId':_0x15121b,'unitId':_0x2910cd,'subUnitId':_0x4c7ce9,'visible':_0x690404!==!0x0,'evented':_0x4e8432!==!0x1,'formulaPresentation':_0x1a966f?this[_0x3d9912(0x38e)][_0x3d9912(0x425)](_0x1e0155):void 0x0,'animateFormulaPresentation':(_0x1a966f==null?void 0x0:_0x1a966f[_0x3d9912(0x3ce)])!==!0x1,'transformerConfig':_0xc4346d});if(_0x1a966f){let _0x3c2a44=this['_formulaKey'](_0x2910cd,_0x4c7ce9,_0x15121b),_0x4359ba=this[_0x3d9912(0x4f2)]['get'](_0x3c2a44)??new Set();_0x4359ba[_0x3d9912(0x3b0)](_0x3a90d5),this[_0x3d9912(0x4f2)][_0x3d9912(0x373)](_0x3c2a44,_0x4359ba);}this['disposeWithMe']((0x0,o[_0x3d9912(0x3fb)])(_0x3a90d5[_0x3d9912(0x275)]['subscribeEvent']((_0x438c74,_0x95fb2f)=>{const _0x460bda=_0x3d9912;_0x478b9a['isLineShape']()||_0x1a966f||(this[_0x460bda(0x2a5)][_0x460bda(0x49b)]({'visible':!0x0,'unitId':_0x2910cd,'subUnitId':_0x4c7ce9,'shapeId':_0x15121b,'shapeKey':_0x3a90d5[_0x460bda(0x299)]}),_0x95fb2f[_0x460bda(0x306)]());}))),_0x10a0ad['addObject'](_0x3a90d5,st(_0x3716fa)),_0x61493a&&_0x10a0ad['attachTransformerTo'](_0x3a90d5),_0x820a0c&&(0x0,d['insertGroupObject'])({'drawingId':_0x820a0c,'unitId':_0x2910cd,'subUnitId':_0x4c7ce9},_0x3a90d5,_0x10a0ad,this[_0x3d9912(0x31f)],_0x352f51?_0x5e9549:void 0x0),_0x3e7635!=null&&_0x3a90d5[_0x3d9912(0x3f0)](_0x3e7635),_0x262043!=null&&_0x3a90d5[_0x3d9912(0x47a)](_0x262043),this[_0x3d9912(0x24f)](_0x3a90d5,_0x478b9a[_0x3d9912(0x296)]()),_0x2acb31[_0x3d9912(0x474)](_0x3a90d5);}return _0x2acb31;}['_formulaKey'](_0x124b76,_0x21bd46,_0x40b64c){return _0x124b76+'\x00'+_0x21bd46+'\x00'+_0x40b64c;}[_0xac088e(0x34c)](_0x5e3f4a,_0xf18cff){const _0x558fb0=_0xac088e;let _0x55d56c=this[_0x558fb0(0x446)][_0x558fb0(0x3a7)](_0xf18cff[_0x558fb0(0x2e6)],_0xf18cff['subUnitId'],_0xf18cff[_0x558fb0(0x25f)]),_0x4a0061=_0x55d56c==null?void 0x0:_0x55d56c[_0x558fb0(0x296)]()['formulaBinding'],_0x723f07=this['_formulaKey'](_0xf18cff[_0x558fb0(0x2e6)],_0xf18cff['subUnitId'],_0xf18cff[_0x558fb0(0x25f)]);if(_0x4a0061){this[_0x558fb0(0x38e)]['register'](_0xf18cff,_0x4a0061);let _0x3d9b0d=this[_0x558fb0(0x4f2)][_0x558fb0(0x314)](_0x723f07)??new Set();_0x3d9b0d[_0x558fb0(0x3b0)](_0x5e3f4a),this[_0x558fb0(0x4f2)]['set'](_0x723f07,_0x3d9b0d);}else{var _0xf79b2;this[_0x558fb0(0x38e)][_0x558fb0(0x323)](_0xf18cff),(_0xf79b2=this[_0x558fb0(0x4f2)][_0x558fb0(0x314)](_0x723f07))==null||_0xf79b2[_0x558fb0(0x488)](_0x5e3f4a);}_0x5e3f4a[_0x558fb0(0x381)](_0x4a0061?this['_shapeFormulaService'][_0x558fb0(0x425)](_0xf18cff):void 0x0,(_0x4a0061==null?void 0x0:_0x4a0061['animationEnabled'])!==!0x1);}[_0xac088e(0x2ca)](_0x447937){const _0xa6345b=_0xac088e;let _0x5347d0=_0x447937[_0xa6345b(0x413)][_0xa6345b(0x296)](),_0x2051e4=_0x5347d0[_0xa6345b(0x3a5)];!_0x2051e4||_0x2051e4[_0xa6345b(0x33b)]!==i[_0xa6345b(0x484)][_0xa6345b(0x21e)]||!_0x2051e4['fillImageSource']?_0x447937[_0xa6345b(0x44a)](void 0x0):this[_0xa6345b(0x24f)](_0x447937,_0x5347d0);}[_0xac088e(0x24f)](_0x1c0b74,_0x519424){const _0x5da8c2=_0xac088e;let _0x5d7896=_0x519424[_0x5da8c2(0x3a5)];if(!_0x5d7896||_0x5d7896['fillType']!==i['ShapeFillEnum'][_0x5da8c2(0x21e)]||!_0x5d7896[_0x5da8c2(0x370)])return;let _0x44fa50=_0x5d7896[_0x5da8c2(0x370)],_0xe50964=_0x5d7896[_0x5da8c2(0x4f3)]??i[_0x5da8c2(0x392)][_0x5da8c2(0x1e9)],_0x4e7c53=this[_0x5da8c2(0x441)]['getImageSourceCache'](_0x44fa50,_0xe50964);_0x4e7c53?_0x1c0b74[_0x5da8c2(0x44a)](_0x4e7c53):this[_0x5da8c2(0x450)](_0x1c0b74,_0x44fa50,_0xe50964);}async[_0xac088e(0x450)](_0x16ea02,_0x337832,_0x218968){const _0xd04383=_0xac088e;let _0x5bc539;try{if(_0x218968===i[_0xd04383(0x392)][_0xd04383(0x4f5)])_0x5bc539=await this[_0xd04383(0x441)][_0xd04383(0x1dc)](_0x337832);else{if(_0x218968===i[_0xd04383(0x392)][_0xd04383(0x1e9)])try{_0x5bc539=await this[_0xd04383(0x39b)][_0xd04383(0x1dc)](_0x337832);}catch{_0x5bc539=_0x337832;}else _0x5bc539=_0x337832;}}catch(_0x3ab38b){console[_0xd04383(0x391)]('[ShapeRender]\x20Failed\x20to\x20resolve\x20picture\x20fill\x20source',_0x3ab38b);return;}let _0xe5fd7b=new window['Image']();_0xe5fd7b['onload']=()=>{const _0x13ec0d=_0xd04383;this[_0x13ec0d(0x441)][_0x13ec0d(0x35c)](_0x337832,_0x218968,_0xe5fd7b),_0x16ea02[_0x13ec0d(0x44a)](_0xe5fd7b);},_0xe5fd7b[_0xd04383(0x303)]=()=>{const _0x5cc5d9=_0xd04383;console[_0x5cc5d9(0x391)](_0x5cc5d9(0x3d0),_0x337832);},_0xe5fd7b['src']=_0x5bc539;}};K=I([F(0x0,u[_0xac088e(0x4ba)]),F(0x1,(0x0,o[_0xac088e(0x383)])(r[_0xac088e(0x326)])),F(0x2,(0x0,o['Inject'])(o['LocaleService'])),F(0x3,o[_0xac088e(0x4d1)]),F(0x4,o[_0xac088e(0x344)]),F(0x5,(0x0,o[_0xac088e(0x383)])(G)),F(0x6,(0x0,o[_0xac088e(0x383)])(a[_0xac088e(0x4b7)]))],K);let q=class extends o[_0xac088e(0x1d9)]{constructor(_0x56ad1e,_0x152de3,_0x1a8e57){const _0x1c0633=_0xac088e;super(),this[_0x1c0633(0x293)]=_0x56ad1e,this[_0x1c0633(0x31f)]=_0x152de3,this[_0x1c0633(0x32f)]=_0x1a8e57,this[_0x1c0633(0x2d6)]();}[_0xac088e(0x2d6)](){const _0x43a348=_0xac088e;this[_0x43a348(0x38a)](this[_0x43a348(0x293)][_0x43a348(0x32d)][_0x43a348(0x419)](this[_0x43a348(0x293)]['interceptor']['getInterceptPoints']()[_0x43a348(0x35b)],{'handler':(_0x2dd871,_0x193f83,_0x416a1c)=>{const _0x53d108=_0x43a348;var _0x38478d;let {unitId:_0xe43293,scene:_0x34ae70,skeleton:_0x260f53}=_0x193f83,{pageIndex:_0xa85f78}=_0x193f83,_0x237cd6=(_0x38478d=this[_0x53d108(0x31f)][_0x53d108(0x2aa)](_0xe43293))==null?void 0x0:_0x38478d[_0xe43293],_0x5a751d=ct(this[_0x53d108(0x293)],_0x260f53,_0xa85f78);return _0x237cd6==null||_0x237cd6[_0x53d108(0x41a)]['forEach'](_0x365cc1=>{const _0x3797c3=_0x53d108;if(_0x5a751d&&!_0x5a751d[_0x3797c3(0x23c)](_0x365cc1))return;let _0x3fca58=_0x237cd6[_0x3797c3(0x28c)][_0x365cc1];_0x3fca58[_0x3797c3(0x37c)]===o[_0x3797c3(0x440)][_0x3797c3(0x2bf)]&&!_0x3fca58[_0x3797c3(0x2e4)]&&this['_shapeRenderController'][_0x3797c3(0x2b8)](_0x3fca58,_0x34ae70);}),_0x416a1c(_0x2dd871);}}));}};q=I([F(0x0,(0x0,o['Inject'])(t[_0xac088e(0x4a6)])),F(0x1,u[_0xac088e(0x4ba)]),F(0x2,(0x0,o[_0xac088e(0x383)])(K))],q);function ct(_0x43f4c8,_0x50c75d,_0x136361){const _0x4f4169=_0xac088e;var _0x291ea6,_0x138eaa;let _0x229fea=_0x43f4c8;if(_0x229fea[_0x4f4169(0x504)])return _0x229fea['getPageDrawingIds'](_0x50c75d,_0x136361);let _0x4a36e0=_0x50c75d[_0x4f4169(0x380)]();if(!_0x4a36e0||_0x4a36e0[_0x4f4169(0x47b)][_0x4f4169(0x1ee)]<=0x1||_0x136361==null)return null;let _0x3b843c=new Set(),_0x24d421=_0x4a36e0[_0x4f4169(0x47b)][_0x136361];if(!_0x24d421)return _0x3b843c;lt(_0x24d421,_0x3b843c);let _0x2561dd=(_0x291ea6=_0x4a36e0[_0x4f4169(0x45d)][_0x4f4169(0x314)](_0x24d421[_0x4f4169(0x3b1)]))==null?void 0x0:_0x291ea6[_0x4f4169(0x314)](_0x24d421[_0x4f4169(0x4a3)]??_0x24d421[_0x4f4169(0x3d3)]),_0x4b2bcd=(_0x138eaa=_0x4a36e0[_0x4f4169(0x214)]['get'](_0x24d421[_0x4f4169(0x386)]))==null?void 0x0:_0x138eaa[_0x4f4169(0x314)](_0x24d421[_0x4f4169(0x329)]??_0x24d421[_0x4f4169(0x3d3)]);return _0x2561dd&<(_0x2561dd,_0x3b843c),_0x4b2bcd&<(_0x4b2bcd,_0x3b843c),_0x3b843c;}function lt(_0x1b4d9c,_0x5e324a){const _0x1a4763=_0xac088e;for(let _0x581790 of _0x1b4d9c[_0x1a4763(0x428)]['keys']())_0x5e324a['add'](_0x581790);for(let _0x41c3a6 of _0x1b4d9c[_0x1a4763(0x3d8)]['values']())for(let _0x2cacb5 of _0x41c3a6['rows'])for(let _0x14ba26 of _0x2cacb5['cells'])lt(_0x14ba26,_0x5e324a);}function ut(_0x1e37e1){const _0x2250b3=_0xac088e;return(0x0,f[_0x2250b3(0x4de)])(oe,{..._0x1e37e1,'PickerComponent':e[_0x2250b3(0x253)]});}function dt(){const _0x1f6cd9=_0xac088e;let _0x48a31a=(0x0,n[_0x1f6cd9(0x46d)])(o[_0x1f6cd9(0x2e2)]),_0x1623b4=re(),[_0x48f2df,_0x515346]=(0x0,v[_0x1f6cd9(0x46f)])(!0x1);return(0x0,f[_0x1f6cd9(0x3f1)])(_0x1f6cd9(0x274),{'className':_0x1f6cd9(0x374),'children':[(0x0,f[_0x1f6cd9(0x4de)])(_[_0x1f6cd9(0x250)],{'title':_0x48a31a['t'](_0x1f6cd9(0x322)),'aria-expanded':_0x48f2df,'variant':'subtle','trailing':_0x48f2df?(0x0,f[_0x1f6cd9(0x4de)])(g[_0x1f6cd9(0x42f)],{}):(0x0,f[_0x1f6cd9(0x4de)])(g[_0x1f6cd9(0x2b2)],{}),'onClick':()=>_0x515346(_0x1ad771=>!_0x1ad771)}),_0x48f2df&&(0x0,f[_0x1f6cd9(0x4de)])(e[_0x1f6cd9(0x253)],{'excludeGroups':[e[_0x1f6cd9(0x1e2)][_0x1f6cd9(0x3c9)]],'onShapeClick':_0xe946fa=>{_0x1623b4(_0xe946fa),_0x515346(!0x1);}})]});}function ft(_0x52da28){return _0x52da28['trim']()||void 0x0;}function pt(_0x5cd979,_0x5cfb34,_0x1a90c1){const _0x18d4c9=_0xac088e;var _0x162c7a,_0x49bb03;return((_0x162c7a=_0x5cd979['name'])==null?void 0x0:_0x162c7a[_0x18d4c9(0x229)]())||((_0x49bb03=_0x5cd979['title'])==null?void 0x0:_0x49bb03[_0x18d4c9(0x229)]())||_0x1a90c1['t']('drawing-ui.objectListPanel.typeNames.'+(0x0,e[_0x18d4c9(0x3ba)])(_0x5cd979[_0x18d4c9(0x37c)]))+'\x20'+(_0x5cfb34+0x1);}function mt({PanelComponent:_0x3b18b9=d[_0xac088e(0x207)]}){const _0x5dffc1=_0xac088e;let _0x5a532b=(0x0,n['useDependency'])(o[_0x5dffc1(0x2e2)]),_0x55c1cc={'title':_0x5a532b['t']('drawing-ui.objectListPanel.title'),'empty':_0x5a532b['t'](_0x5dffc1(0x26b)),'showAll':_0x5a532b['t'](_0x5dffc1(0x33d)),'hideAll':_0x5a532b['t'](_0x5dffc1(0x49c)),'lockAll':_0x5a532b['t'](_0x5dffc1(0x49e)),'unlockAll':_0x5a532b['t'](_0x5dffc1(0x358)),'moveForward':_0x5a532b['t'](_0x5dffc1(0x346)),'moveBackward':_0x5a532b['t'](_0x5dffc1(0x317)),'close':_0x5a532b['t'](_0x5dffc1(0x2d3)),'show':_0x5a532b['t'](_0x5dffc1(0x429)),'hide':_0x5a532b['t'](_0x5dffc1(0x3db)),'lock':_0x5a532b['t'](_0x5dffc1(0x42a)),'unlock':_0x5a532b['t'](_0x5dffc1(0x234)),'lockHint':_0x5a532b['t'](_0x5dffc1(0x478)),'unlockHint':_0x5a532b['t'](_0x5dffc1(0x417)),'name':_0x5a532b['t']('drawing-ui.objectListPanel.name'),'nameInput':_0x5a532b['t'](_0x5dffc1(0x44d)),'description':_0x5a532b['t'](_0x5dffc1(0x25b)),'descriptionPlaceholder':_0x5a532b['t'](_0x5dffc1(0x343)),'details':_0x5a532b['t']('drawing-ui.objectListPanel.details'),'noSelection':_0x5a532b['t'](_0x5dffc1(0x336)),'locate':_0x5a532b['t'](_0x5dffc1(0x338)),'expand':_0x5a532b['t'](_0x5dffc1(0x1fc)),'collapse':_0x5a532b['t'](_0x5dffc1(0x4bc)),'dragToReorder':_0x5a532b['t'](_0x5dffc1(0x2e3)),'search':_0x5a532b['t']('drawing-ui.objectListPanel.search'),'filterAll':_0x5a532b['t']('drawing-ui.objectListPanel.filterAll'),'filterHidden':_0x5a532b['t'](_0x5dffc1(0x337)),'filterLocked':_0x5a532b['t'](_0x5dffc1(0x23d)),'sectionCanvas':_0x5a532b['t']('drawing-ui.objectListPanel.sectionCanvas'),'sectionFloating':_0x5a532b['t'](_0x5dffc1(0x43b))},_0x40d849=(0x0,n[_0x5dffc1(0x46d)])(o[_0x5dffc1(0x2cf)]),_0x22b3c8=(0x0,n[_0x5dffc1(0x46d)])(o[_0x5dffc1(0x257)]),_0x237bc7=(0x0,n[_0x5dffc1(0x46d)])(c[_0x5dffc1(0x31e)]),_0x3a596a=(0x0,n['useDependency'])(u['IDrawingManagerService']),_0x11789a=(0x0,n[_0x5dffc1(0x46d)])(l[_0x5dffc1(0x1f4)]),[,_0x330f62]=(0x0,v[_0x5dffc1(0x2d0)])(_0x2c8622=>_0x2c8622+0x1,0x0),_0x4114ef=_0x22b3c8[_0x5dffc1(0x3c7)](o[_0x5dffc1(0x230)]['UNIVER_DOC']),_0x4510f3=(_0x4114ef==null?void 0x0:_0x4114ef[_0x5dffc1(0x389)]())??'',_0x2cf5c9=_0x4510f3,_0x3af058=(0x0,n['useObservable'])(()=>_0x3a596a['focus$'],_0x3a596a['getFocusDrawings'](),!0x1,[_0x3a596a]);(0x0,v[_0x5dffc1(0x48d)])(()=>{let _0xf86c53=_0x40d849['onCommandExecuted'](()=>_0x330f62());return()=>_0xf86c53['dispose']();},[_0x40d849]);let _0x47968d=_0x4510f3?_0x237bc7['getDrawingData'](_0x4510f3,_0x2cf5c9):{},_0x23a82b=(_0x4510f3?_0x237bc7[_0x5dffc1(0x33f)](_0x4510f3,_0x2cf5c9):[])[_0x5dffc1(0x2a4)](_0xa05ed=>_0x47968d[_0xa05ed])[_0x5dffc1(0x399)](_0x3239c9=>!!_0x3239c9)[_0x5dffc1(0x4ef)](),_0x3b37e1=_0x23a82b['reduce']((_0x1dda06,_0x554672)=>(_0x1dda06[(0x0,d['getObjectListPanelSectionIdForDrawingType'])(_0x554672[_0x5dffc1(0x37c)])]+=0x1,_0x1dda06),{'canvas':0x0,'floating':0x0}),_0x44f5ea={'canvas':0x0,'floating':0x0},_0x53ec84=_0x23a82b[_0x5dffc1(0x2a4)]((_0x29e1a2,_0x374964)=>{const _0xfe33be=_0x5dffc1;let _0xed35b2=(0x0,d[_0xfe33be(0x2d2)])(_0x29e1a2[_0xfe33be(0x37c)]),_0xa59d1f=_0xed35b2===d[_0xfe33be(0x3f2)],_0x14272c=_0x44f5ea[_0xed35b2]++;return{'id':_0x29e1a2[_0xfe33be(0x270)],'name':pt(_0x29e1a2,_0x374964,_0x5a532b),'description':_0x29e1a2[_0xfe33be(0x3e8)],'visible':_0x29e1a2['hidden']!==!0x0,'selectable':_0x29e1a2[_0xfe33be(0x4aa)]!==!0x1,'sectionId':_0xed35b2,'sectionTitle':_0xa59d1f?_0x55c1cc[_0xfe33be(0x29c)]:_0x55c1cc[_0xfe33be(0x353)],'capabilities':_0xa59d1f?{'arrange':!0x1,'reorder':!0x1}:void 0x0,'canMoveForward':!_0xa59d1f&&_0x14272c>0x0,'canMoveBackward':!_0xa59d1f&&_0x14272c<_0x3b37e1[_0xfe33be(0x3cd)]-0x1,'canReorder':!_0xa59d1f};}),_0xc3fc87=(0x0,v[_0x5dffc1(0x452)])(()=>(_0x3af058??[])[_0x5dffc1(0x399)](_0x1d217a=>_0x1d217a[_0x5dffc1(0x2e6)]===_0x4510f3&&_0x1d217a[_0x5dffc1(0x390)]===_0x2cf5c9)[_0x5dffc1(0x2a4)](_0x1b3d0d=>_0x1b3d0d[_0x5dffc1(0x270)]),[_0x3af058,_0x2cf5c9,_0x4510f3]),_0x496fbb=_0xc3fc87[_0xc3fc87[_0x5dffc1(0x1ee)]-0x1]??null,_0x1a6356=_0x31ee3d=>_0x237bc7[_0x5dffc1(0x331)]({'unitId':_0x4510f3,'subUnitId':_0x2cf5c9,'drawingId':_0x31ee3d})??null,_0x232c44=async _0x2547f7=>{const _0x38638=_0x5dffc1;_0x4510f3&&_0x2547f7[_0x38638(0x1ee)]&&await _0x40d849[_0x38638(0x290)](r[_0x38638(0x3fe)]['id'],{'unitId':_0x4510f3,'patches':_0x2547f7});},_0x59cc0f=(_0xb73000,_0x3dcae6)=>{const _0x471546=_0x5dffc1;if(!_0x4510f3)return;let _0x51b8a9=_0x3dcae6?_0xc3fc87['includes'](_0xb73000)?_0xc3fc87[_0x471546(0x399)](_0x18789a=>_0x18789a!==_0xb73000):[..._0xc3fc87,_0xb73000]:[_0xb73000];_0x40d849[_0x471546(0x1e1)](u[_0x471546(0x49d)]['id'],_0x51b8a9['map'](_0x424b34=>({'unitId':_0x4510f3,'subUnitId':_0x2cf5c9,'drawingId':_0x424b34})));let _0x5116f0=_0x51b8a9[_0x51b8a9['length']-0x1];_0x5116f0?(0x0,e[_0x471546(0x33a)])(_0x11789a,{'unitId':_0x4510f3,'subUnitId':_0x2cf5c9,'drawingId':_0x5116f0}):(0x0,e[_0x471546(0x315)])(_0x11789a,_0x4510f3);},_0xd8a1fe=async(_0x60d0e4,_0x16e9be)=>{const _0x12d99a=_0x5dffc1;await _0x232c44(_0x60d0e4[_0x12d99a(0x2a4)](_0x529807=>_0x1a6356(_0x529807))[_0x12d99a(0x399)](_0xed51ae=>!!_0xed51ae)['filter'](_0x32666c=>_0x32666c[_0x12d99a(0x2e4)]!==!0x0!==_0x16e9be)[_0x12d99a(0x2a4)](_0x138874=>({'drawingId':_0x138874['drawingId'],'hidden':!_0x16e9be})));},_0x17e4ad=async(_0x1a61b9,_0xe21464)=>{const _0x461ea5=_0x5dffc1;await _0x232c44(_0x1a61b9['map'](_0x42bbb3=>_0x1a6356(_0x42bbb3))['filter'](_0x1c726a=>!!_0x1c726a)[_0x461ea5(0x399)](_0x2edd29=>_0x2edd29[_0x461ea5(0x4aa)]!==!0x1!==_0xe21464)[_0x461ea5(0x2a4)](_0x4a2c1b=>({'drawingId':_0x4a2c1b[_0x461ea5(0x270)],'selectable':_0xe21464})));},_0x257fa5=_0x2b8571=>{const _0x4347a6=_0x5dffc1;let _0x2a4d1a=_0x1a6356(_0x2b8571);if(_0x2a4d1a)return _0x17e4ad([_0x2b8571],_0x2a4d1a[_0x4347a6(0x4aa)]===!0x1);},_0x23ac8d=async(_0x39a17d,_0x5d7d00)=>{const _0x5759f5=_0x5dffc1;let _0x2e1b82=_0x1a6356(_0x39a17d),_0x411101=ft(_0x5d7d00);!_0x2e1b82||(_0x2e1b82['name']??void 0x0)===_0x411101&&(_0x2e1b82[_0x5759f5(0x3ea)]||void 0x0)===_0x411101||await _0x232c44([{'drawingId':_0x39a17d,'name':_0x411101,'title':_0x411101}]);},_0x14db0d=async(_0x5e9c64,_0x3021cc)=>{const _0x625f13=_0x5dffc1;let _0xfa9c43=_0x1a6356(_0x5e9c64),_0x3dd209=ft(_0x3021cc);_0xfa9c43&&(_0xfa9c43[_0x625f13(0x3e8)]??void 0x0)!==_0x3dd209&&await _0x232c44([{'drawingId':_0x5e9c64,'description':_0x3dd209}]);},_0x523401=async(_0x4a5746,_0x7bc81c)=>{const _0x1d9feb=_0x5dffc1;_0x4510f3&&await _0x40d849[_0x1d9feb(0x290)](c[_0x1d9feb(0x1dd)]['id'],{'unitId':_0x4510f3,'subUnitId':_0x2cf5c9,'drawingIds':[_0x4a5746],'arrangeType':_0x7bc81c});};return _0x4510f3?(0x0,f[_0x5dffc1(0x4de)])(_0x3b18b9,{'labels':_0x55c1cc,'renderPermissionAction':_0x255791=>_0x4114ef?(0x0,f[_0x5dffc1(0x4de)])(n[_0x5dffc1(0x388)],{'target':{'unitId':_0x4510f3,'objectId':(0x0,s[_0x5dffc1(0x1fe)])((0x0,s['getDocumentDrawingSegmentId'])(_0x4114ef,_0x255791['id']),_0x5dffc1(0x1e4),_0x255791['id']),'objectType':y[_0x5dffc1(0x48b)][_0x5dffc1(0x2ab)]},'name':_0x255791[_0x5dffc1(0x4b1)],'commandId':s[_0x5dffc1(0x312)]['id'],'exists':()=>!!_0x1a6356(_0x255791['id'])},_0x4510f3+'/'+_0x255791['id']):null,'items':_0x53ec84,'selectedIds':_0xc3fc87,'focusedId':_0x496fbb,'showHeader':!0x1,'onSelect':_0x59cc0f,'onSetVisible':_0xd8a1fe,'onSetSelectable':_0x17e4ad,'onCommitName':_0x23ac8d,'onCommitDescription':_0x14db0d,'onMoveForward':async _0x381acc=>_0x523401(_0x381acc,o['ArrangeTypeEnum'][_0x5dffc1(0x2ec)]),'onMoveBackward':async _0x11f891=>_0x523401(_0x11f891,o[_0x5dffc1(0x4ce)]['backward']),'onToggleSelectable':_0x257fa5}):(0x0,f['jsx'])('div',{'className':_0x5dffc1(0x308),'children':_0x55c1cc[_0x5dffc1(0x3ea)]});}function ht(){const _0x51168d=_0xac088e;return(0x0,f[_0x51168d(0x4de)])(mt,{'PanelComponent':d[_0x51168d(0x3cf)]});}let J=class{constructor(_0x464531){const _0x41eb0d=_0xac088e;this[_0x41eb0d(0x2a7)]=_0x464531;}['updateShapeFillImage'](_0x2f6449,_0x3cb6e4){const _0x5072b7=_0xac088e;let _0x1d382d=this['_renderManagerService'][_0x5072b7(0x4bd)](_0x2f6449[_0x5072b7(0x2e6)]),_0x4b91a0=_0x1d382d==null?void 0x0:_0x1d382d[_0x5072b7(0x4cc)];if(!_0x4b91a0)return;let _0x5a489e=(0x0,u['getDrawingShapeKeyByDrawingSearch'])(_0x2f6449),_0x2fb487=_0x4b91a0[_0x5072b7(0x4a1)](_0x5a489e);_0x2fb487==null||_0x2fb487['setFillImage'](_0x3cb6e4);}};J=I([F(0x0,l[_0xac088e(0x1f4)])],J);function gt(){const _0x1a74ca=_0xac088e;let _0x36d834=(0x0,n[_0x1a74ca(0x46d)])(u[_0x1a74ca(0x4ba)]),_0x143dbb=(0x0,n['useObservable'])(()=>_0x36d834['focus$'],_0x36d834[_0x1a74ca(0x2f0)](),!0x1,[_0x36d834]);return _0x143dbb['length']===0x0?null:(0x0,f['jsx'])(_0x1a74ca(0x274),{'children':(0x0,f[_0x1a74ca(0x3f1)])(_0x1a74ca(0x274),{'className':_0x1a74ca(0x461),'children':[(0x0,f[_0x1a74ca(0x4de)])(d[_0x1a74ca(0x4d0)],{'drawings':_0x143dbb,'hasCropper':!0x1}),(0x0,f['jsx'])(h[_0x1a74ca(0x3b4)],{'drawings':_0x143dbb}),(0x0,f[_0x1a74ca(0x4de)])(h['DocDrawingPosition'],{'drawings':_0x143dbb})]})});}function _t(_0x3351a8){const _0x24e2e0=_0xac088e;let {unitId:_0x293e5c,subUnitId:_0x53ee45,shapeId:_0x5b7e05,PositionComponent:_0x19d2ed=gt}=_0x3351a8,_0x237abb=(0x0,n['useDependency'])(o[_0x24e2e0(0x2cf)]),_0x1e331d=(0x0,n[_0x24e2e0(0x46d)])(J);return(0x0,f[_0x24e2e0(0x4de)])(e[_0x24e2e0(0x236)],{..._0x3351a8,'positionEditor':(0x0,f[_0x24e2e0(0x4de)])(_0x19d2ed,{}),'onUpdateShapeData':(_0x23e196,_0xcbb3eb)=>{R(_0x237abb,_0x293e5c,_0x53ee45,_0x5b7e05,_0x23e196,_0xcbb3eb);},'onUpdateLineShapeData':(_0x4ffc06,_0x252004)=>{fe(_0x237abb,_0x293e5c,_0x53ee45,_0x5b7e05,_0x4ffc06,_0x252004);},'onUpdateShapeFillImage':_0x5ef067=>{_0x1e331d['updateShapeFillImage']({'unitId':_0x293e5c,'subUnitId':_0x53ee45,'drawingId':_0x5b7e05},_0x5ef067);}});}function vt(){const _0x51117f=_0xac088e;let _0x3038d3=(0x0,n[_0x51117f(0x46d)])(u['IDrawingManagerService']),_0x55a55d=(0x0,n[_0x51117f(0x3f6)])(_0x3038d3[_0x51117f(0x22d)],_0x3038d3[_0x51117f(0x2f0)]());return _0x55a55d[_0x51117f(0x1ee)]===0x0?null:(0x0,f[_0x51117f(0x3f1)])(_0x51117f(0x274),{'className':_0x51117f(0x4cb),'children':[(0x0,f[_0x51117f(0x4de)])(d[_0x51117f(0x4d0)],{'drawings':_0x55a55d,'hasCropper':!0x1}),(0x0,f[_0x51117f(0x4de)])(h[_0x51117f(0x22f)],{'drawings':_0x55a55d}),(0x0,f[_0x51117f(0x4de)])(h['MobileDocDrawingPosition'],{'drawings':_0x55a55d})]});}function yt(_0x4f855a){const _0x23ae63=_0xac088e;return(0x0,f[_0x23ae63(0x4de)])(e[_0x23ae63(0x3ec)],{'children':(0x0,f['jsx'])(_t,{..._0x4f855a,'PositionComponent':vt})});}function bt({popup:_0x483ac5}){const _0x52e3d4=_0xac088e;let _0x2d6c4c=(0x0,n[_0x52e3d4(0x46d)])(o[_0x52e3d4(0x2e2)]),{shapeType:_0x2dd5c1,onText:_0x50e493,onStyle:_0x2b4abe,onDelete:_0x5435cd}=_0x483ac5['extraProps'],_0x3be674=[{'key':_0x52e3d4(0x37e),'order':0x0,'item':{'id':_0x52e3d4(0x37e),'type':n[_0x52e3d4(0x2e0)][_0x52e3d4(0x3c1)],'title':_0x2d6c4c['t'](_0x52e3d4(0x368)),'disabled$':(0x0,p['of'])((0x0,i[_0x52e3d4(0x471)])(_0x2dd5c1))}},{'key':_0x52e3d4(0x404),'order':0x1,'item':{'id':_0x52e3d4(0x404),'type':n[_0x52e3d4(0x2e0)][_0x52e3d4(0x3c1)],'title':_0x2d6c4c['t'](_0x52e3d4(0x271))}},{'key':'delete','order':0x2,'item':{'id':_0x52e3d4(0x488),'type':n[_0x52e3d4(0x2e0)][_0x52e3d4(0x3c1)],'title':_0x2d6c4c['t']('docs-shape-ui.mobile.delete')}}];return(0x0,f['jsx'])(n['MobileMenu'],{'schemas':_0x3be674,'presentation':_0x52e3d4(0x4a4),'onOptionSelect':async({id:_0x21d54a})=>{const _0x395f61=_0x52e3d4;_0x21d54a===_0x395f61(0x37e)?await _0x50e493():_0x21d54a===_0x395f61(0x404)?await _0x2b4abe():_0x21d54a===_0x395f61(0x488)&&await _0x5435cd();}});}const xt=_0xac088e(0x410);function St(_0x185af9,_0x3f7c5f){const _0x52df0f=_0xac088e;var _0x929fe2;let _0x12c11a=_0x185af9==null||(_0x929fe2=_0x185af9[_0x52df0f(0x3f5)]()[_0x52df0f(0x2f9)])==null?void 0x0:_0x929fe2[_0x3f7c5f];return _0x12c11a?_0x12c11a[_0x52df0f(0x39e)]===o[_0x52df0f(0x2c1)][_0x52df0f(0x1e6)]?_0x12c11a['behindDoc']===o['BooleanNumber'][_0x52df0f(0x3d4)]?c[_0x52df0f(0x4d5)][_0x52df0f(0x2a1)]:c[_0x52df0f(0x4d5)][_0x52df0f(0x285)]:_0x12c11a[_0x52df0f(0x39e)]===o[_0x52df0f(0x2c1)][_0x52df0f(0x330)]?c[_0x52df0f(0x4d5)][_0x52df0f(0x330)]:_0x12c11a[_0x52df0f(0x39e)]===o[_0x52df0f(0x2c1)]['WRAP_TOP_AND_BOTTOM']?c[_0x52df0f(0x4d5)][_0x52df0f(0x4ab)]:c[_0x52df0f(0x4d5)][_0x52df0f(0x255)]:c['TextWrappingStyle'][_0x52df0f(0x255)];}function Ct(_0x13d04e){const _0x307530=_0xac088e;let _0x328d88=(0x0,n[_0x307530(0x46d)])(e[_0x307530(0x37b)]),_0x36c8d0=(0x0,n[_0x307530(0x3f6)])(()=>_0x328d88[_0x307530(0x44e)],_0x328d88[_0x307530(0x32a)](),!0x1,[_0x328d88]),_0x33104d=_0x13d04e[_0x307530(0x49a)][_0x307530(0x47c)];return _0x36c8d0?(0x0,f['jsx'])(wt,{..._0x33104d,'canvasElement':_0x13d04e[_0x307530(0x49a)][_0x307530(0x40f)]}):null;}function wt(_0x5d26c7){const _0x2bccf3=_0xac088e;let _0x472e21=(0x0,n['useDependency'])(o['ICommandService']),_0x27d293=(0x0,n[_0x2bccf3(0x46d)])(o['LocaleService']),_0xb59405=(0x0,n[_0x2bccf3(0x46d)])(r[_0x2bccf3(0x326)]),_0x1d9025=(0x0,n[_0x2bccf3(0x46d)])(o['IUniverInstanceService']),{unitId:_0x3b13d8,subUnitId:_0x30e020,drawingId:_0x4425b4,shapeType:_0x3cc926}=_0x5d26c7,[_0x2605f5,_0x3e091f]=(0x0,v[_0x2bccf3(0x46f)])(_0x5d26c7[_0x2bccf3(0x485)]),_0x193346=_0x1d9025[_0x2bccf3(0x2cc)](_0x3b13d8,o['UniverInstanceType'][_0x2bccf3(0x2ba)])??void 0x0,[_0x2fda7a,_0x495b58]=(0x0,v[_0x2bccf3(0x46f)])(()=>St(_0x193346,_0x4425b4)),_0x3b6ed0=(0x0,v['useMemo'])(()=>(0x0,e['getTextStyle'])(_0x2605f5),[_0x2605f5]),_0xf5cb8c=(0x0,v[_0x2bccf3(0x452)])(()=>(0x0,e[_0x2bccf3(0x1f0)])(_0x2605f5),[_0x2605f5]);(0x0,v['useEffect'])(()=>{const _0x1e0a72=_0x2bccf3;let _0x488860=_0x472e21[_0x1e0a72(0x25e)](_0x2a2830=>{const _0xb59aff=_0x1e0a72;if(_0x2a2830['id']!==r[_0xb59aff(0x28b)]['id'])return;let _0x408d6e=_0xb59405['getShapeDataById'](_0x3b13d8,_0x30e020,_0x4425b4);_0x408d6e&&_0x3e091f(_0x408d6e);});return()=>_0x488860[_0x1e0a72(0x45f)]();},[_0x472e21,_0xb59405,_0x4425b4,_0x30e020,_0x3b13d8]);let _0x1a69f8=_0x225fde=>{_0x3e091f(_0x54dca7=>({..._0x54dca7,..._0x225fde}));},_0x3b40e1=_0x49e248=>{const _0xd6e720=_0x2bccf3;let _0x5b5f3f=(0x0,e[_0xd6e720(0x233)])(_0x2605f5,_0x49e248);R(_0x472e21,_0x3b13d8,_0x30e020,_0x4425b4,{'oldShapeData':{'shapeText':_0x2605f5['shapeText']}},_0x5b5f3f),_0x1a69f8(_0x5b5f3f);},_0xea71a=_0x24ca01=>{const _0x4fab3d=_0x2bccf3;_0x495b58(_0x24ca01),_0x472e21[_0x4fab3d(0x290)](c[_0x4fab3d(0x437)]['id'],{'unitId':_0x3b13d8,'subUnitId':_0x30e020,'drawings':[{'unitId':_0x3b13d8,'subUnitId':_0x30e020,'drawingId':_0x4425b4}],'wrappingStyle':_0x24ca01});},_0x3ab06e=(0x0,e[_0x2bccf3(0x304)])({'hostType':o[_0x2bccf3(0x230)][_0x2bccf3(0x2ba)],'unitId':_0x3b13d8,'subUnitId':_0x30e020,'shapeId':_0x4425b4,'shapeData':_0x2605f5,'onUpdateBinding':_0x4ebcb4=>{const _0x2870d8=_0x2bccf3;let _0x3738a0={'formulaBinding':_0x4ebcb4};R(_0x472e21,_0x3b13d8,_0x30e020,_0x4425b4,{'oldShapeData':{'formulaBinding':_0x2605f5[_0x2870d8(0x3f7)]}},_0x3738a0),_0x1a69f8(_0x3738a0);}}),_0x214f22=[{'label':_0x27d293['t'](_0x2bccf3(0x1fd)),'value':c[_0x2bccf3(0x4d5)][_0x2bccf3(0x255)],'icon':(0x0,f[_0x2bccf3(0x4de)])(g[_0x2bccf3(0x212)],{})},{'label':_0x27d293['t'](_0x2bccf3(0x3df)),'value':c[_0x2bccf3(0x4d5)][_0x2bccf3(0x330)],'icon':(0x0,f[_0x2bccf3(0x4de)])(g['TextWrapShapeIcon'],{})},{'label':_0x27d293['t'](_0x2bccf3(0x30c)),'value':c[_0x2bccf3(0x4d5)][_0x2bccf3(0x4ab)],'icon':(0x0,f[_0x2bccf3(0x4de)])(g[_0x2bccf3(0x212)],{})},{'label':_0x27d293['t'](_0x2bccf3(0x2b5)),'value':c[_0x2bccf3(0x4d5)][_0x2bccf3(0x2a1)],'icon':(0x0,f[_0x2bccf3(0x4de)])(g[_0x2bccf3(0x212)],{})},{'label':_0x27d293['t'](_0x2bccf3(0x46a)),'value':c['TextWrappingStyle'][_0x2bccf3(0x285)],'icon':(0x0,f[_0x2bccf3(0x4de)])(g[_0x2bccf3(0x212)],{})}];return(0x0,f['jsxs'])(f['Fragment'],{'children':[(0x0,f[_0x2bccf3(0x4de)])(e[_0x2bccf3(0x360)],{'canvasElement':_0x5d26c7[_0x2bccf3(0x40f)],'shapeData':_0x2605f5,'shapeType':_0x3cc926,'textStyle':{'ff':i[_0x2bccf3(0x458)]['shapeText']['fontFamily'],'fs':i[_0x2bccf3(0x458)][_0x2bccf3(0x4bb)][_0x2bccf3(0x1e3)],'cl':{'rgb':i['ShapeDefaultConfig']['shapeText'][_0x2bccf3(0x4e3)]},..._0x3b6ed0},'textModel':_0xf5cb8c?{'ha':_0xf5cb8c['ha']??o['HorizontalAlign'][_0x2bccf3(0x1fa)],'va':_0xf5cb8c['va']??o[_0x2bccf3(0x48a)][_0x2bccf3(0x34b)]}:null,'wrappingStyle':_0x2fda7a,'wrappingStyleOptions':_0x214f22,'enableShapeFillReset':!0x0,'enableShapeStrokeReset':!0x0,'enableTextBackgroundReset':!0x0,'defaultFillColor':i[_0x2bccf3(0x458)][_0x2bccf3(0x3a5)],'defaultGradientEndColor':i['ShapeDefaultConfig'][_0x2bccf3(0x26c)],'defaultStrokeColor':i['ShapeDefaultConfig'][_0x2bccf3(0x4fb)],'extensionGroups':_0x3ab06e[_0x2bccf3(0x301)],'floatingObjectToolbarPosition':n[_0x2bccf3(0x2de)]['DOC'],'onUpdateShapeData':(_0x15af74,_0xa96554)=>{R(_0x472e21,_0x3b13d8,_0x30e020,_0x4425b4,_0x15af74,_0xa96554),_0xa96554&&_0x1a69f8(_0xa96554);},'onUpdateText':_0x3b40e1,'onUpdateWrappingStyle':_0x55ed42=>_0xea71a(_0x55ed42),'onOpenPanel':()=>{_0x472e21['executeCommand'](j['id'],{'unitId':_0x3b13d8,'subUnitId':_0x30e020,'drawingId':_0x4425b4});},'onDelete':()=>{_0x472e21['executeCommand'](c['RemoveDocDrawingCommand']['id'],{'unitId':_0x3b13d8,'drawings':[{'unitId':_0x3b13d8,'subUnitId':_0x30e020,'drawingId':_0x4425b4}]});}}),_0x3ab06e['panel']]});}function Tt({variant:_0x361a7d,extend:_0x970e4b,..._0x7f0779}){const _0x394717=_0xac088e;let _0x58d345=(0x0,f['jsx'])('rect',{'x':'7','y':_0x394717(0x4c8),'width':'6','height':'9','rx':'1','fill':_0x394717(0x459),'fillOpacity':_0x394717(0x4ec),'stroke':_0x394717(0x459),'strokeWidth':_0x394717(0x3bc)});return(0x0,f[_0x394717(0x3f1)])(_0x394717(0x307),{'aria-hidden':'true','fill':_0x394717(0x4fc),'height':_0x394717(0x321),'viewBox':_0x394717(0x2ff),'width':_0x394717(0x321),..._0x7f0779,'children':[_0x361a7d===_0x394717(0x4c5)&&(0x0,f[_0x394717(0x3f1)])(f[_0x394717(0x4b4)],{'children':[(0x0,f[_0x394717(0x4de)])('path',{'d':_0x394717(0x464),'stroke':_0x394717(0x459),'strokeLinecap':'round','strokeWidth':'1.2'}),(0x0,f[_0x394717(0x4de)])(_0x394717(0x32c),{'x':'8','y':'7','width':'4','height':'6','rx':_0x394717(0x215),'fill':'currentColor','fillOpacity':_0x394717(0x4ec),'stroke':_0x394717(0x459),'strokeWidth':_0x394717(0x3bc)})]}),_0x361a7d===_0x394717(0x4d4)&&(0x0,f[_0x394717(0x3f1)])(f[_0x394717(0x4b4)],{'children':[(0x0,f[_0x394717(0x4de)])('path',{'d':_0x394717(0x3b2),'stroke':_0x394717(0x459),'strokeLinecap':_0x394717(0x213),'strokeWidth':_0x394717(0x3bc)}),_0x58d345]}),_0x361a7d===_0x394717(0x3da)&&(0x0,f[_0x394717(0x3f1)])(f[_0x394717(0x4b4)],{'children':[(0x0,f[_0x394717(0x4de)])(_0x394717(0x3e4),{'d':'M2\x203h16M2\x2017h16','stroke':_0x394717(0x459),'strokeLinecap':_0x394717(0x213),'strokeWidth':'1.2'}),_0x58d345]}),_0x361a7d===_0x394717(0x489)&&(0x0,f['jsxs'])(f[_0x394717(0x4b4)],{'children':[_0x58d345,(0x0,f[_0x394717(0x4de)])(_0x394717(0x3e4),{'d':'M2\x203h16M2\x207.5h16M2\x2010h16M2\x2012.5h16M2\x2017h16','stroke':_0x394717(0x459),'strokeLinecap':'round','strokeWidth':_0x394717(0x3bc)})]}),_0x361a7d==='front'&&(0x0,f[_0x394717(0x3f1)])(f['Fragment'],{'children':[(0x0,f[_0x394717(0x4de)])('path',{'d':_0x394717(0x4be),'stroke':_0x394717(0x459),'strokeLinecap':_0x394717(0x213),'strokeWidth':_0x394717(0x3bc)}),(0x0,f[_0x394717(0x4de)])(_0x394717(0x32c),{'x':'7','y':_0x394717(0x4c8),'width':'6','height':'9','rx':'1','fill':_0x394717(0x459)})]})]});}const Y=_0x33718d=>_0x4af264=>(0x0,f['jsx'])(Tt,{..._0x4af264,'variant':_0x33718d}),Et={'DocsShapeWrapInlineIcon':Y(_0xac088e(0x4c5)),'DocsShapeWrapSquareIcon':Y(_0xac088e(0x4d4)),'DocsShapeWrapTopBottomIcon':Y(_0xac088e(0x3da)),'DocsShapeWrapBehindTextIcon':Y(_0xac088e(0x489)),'DocsShapeWrapInFrontOfTextIcon':Y('front')},Dt=(0x0,v[_0xac088e(0x2a0)])(()=>{const _0x23c878=_0xac088e;let _0x2cb84d=(0x0,n[_0x23c878(0x46d)])(G),_0x1e4caa=(0x0,n[_0x23c878(0x46d)])(r[_0x23c878(0x326)]),_0x55e6c6=(0x0,n['useDependency'])(u[_0x23c878(0x4ba)]),_0x40bed4=(0x0,n[_0x23c878(0x46d)])(o['ICommandService']),_0x47ba63=(0x0,v['useMemo'])(()=>({'getShapeModel':(_0x576ace,_0x3696b3,_0x1b03e9)=>_0x1e4caa[_0x23c878(0x3a7)](_0x576ace,_0x3696b3,_0x1b03e9),'getShapeData':(_0x39e562,_0x490363,_0x4e2b9b)=>_0x1e4caa[_0x23c878(0x4d8)](_0x39e562,_0x490363,_0x4e2b9b),'getDrawingTransform':(_0x53be2e,_0x4d421c,_0x307dae)=>{const _0x2fa881=_0x23c878;let _0x315887=_0x55e6c6[_0x2fa881(0x331)]({'unitId':_0x53be2e,'subUnitId':_0x4d421c,'drawingId':_0x307dae});return _0x315887==null?void 0x0:_0x315887[_0x2fa881(0x39c)];},'updateShapeText':({unitId:_0x3433c9,shapeId:_0x1c6b6c,shapeText:_0x5fd64f,oldShapeText:_0x2b1c70})=>{const _0x1442a4=_0x23c878;_0x40bed4[_0x1442a4(0x290)](r[_0x1442a4(0x218)]['id'],{'unitId':_0x3433c9,'shapeId':_0x1c6b6c,'shapeData':{'shapeText':_0x5fd64f},'oldShapeJSON':{'oldShapeData':{'shapeText':_0x2b1c70}}});},'updateHostSize':({unitId:_0x2c8e59,subUnitId:_0x72b3a8,shapeId:_0x972877,width:_0x17f2bf,height:_0x47a30d})=>{const _0x38d432=_0x23c878;_0x40bed4[_0x38d432(0x290)](c['UpdateDrawingDocTransformCommand']['id'],{'unitId':_0x2c8e59,'subUnitId':_0x72b3a8,'drawings':[{'drawingId':_0x972877,'key':_0x38d432(0x40c),'value':{'width':_0x17f2bf,'height':_0x47a30d}}]});},'allowHostSizeShrink':({unitId:_0x35d622,subUnitId:_0x27f6ab,shapeId:_0x100de9})=>(0x0,e['shouldAllowShapeTextEditorHostSizeShrink'])(_0x1e4caa['getShapeDataById'](_0x35d622,_0x27f6ab,_0x100de9))}),[_0x40bed4,_0x1e4caa,_0x55e6c6]),_0x5dffcc=(0x0,v[_0x23c878(0x452)])(()=>({'viewportKeys':{'main':t[_0x23c878(0x418)]['VIEW_MAIN']}}),[]);return(0x0,f['jsx'])(e['ShapeTextEditorContainer'],{'adapter':_0x47ba63,'editingService':_0x2cb84d,'editorUnitId':D,'positionOptions':_0x5dffcc});});let Ot=class extends o[_0xac088e(0x1d9)]{constructor(_0x1e464f,_0x41775a){const _0x332cbf=_0xac088e;super(),this[_0x332cbf(0x2fc)]=_0x1e464f,this['_iconManager']=_0x41775a,this[_0x332cbf(0x294)](),this[_0x332cbf(0x22a)]();}[_0xac088e(0x294)](){const _0x1fea04=_0xac088e;this[_0x1fea04(0x2dd)]['has']('ObjectLayersIcon')||this['disposeWithMe'](this[_0x1fea04(0x2dd)][_0x1fea04(0x38f)]({'ObjectLayersIcon':g['ObjectLayersIcon']})),this[_0x1fea04(0x2dd)][_0x1fea04(0x23c)]('BottomIcon')||this[_0x1fea04(0x38a)](this['_iconManager']['register']({'BottomIcon':g['BottomIcon']})),this[_0x1fea04(0x2dd)][_0x1fea04(0x23c)]('MoveDownIcon')||this['disposeWithMe'](this['_iconManager']['register']({'MoveDownIcon':g[_0x1fea04(0x4e9)]})),this[_0x1fea04(0x2dd)][_0x1fea04(0x23c)]('MoveUpIcon')||this[_0x1fea04(0x38a)](this[_0x1fea04(0x2dd)][_0x1fea04(0x38f)]({'MoveUpIcon':g[_0x1fea04(0x45c)]})),this['_iconManager'][_0x1fea04(0x23c)](_0x1fea04(0x291))||this[_0x1fea04(0x38a)](this['_iconManager'][_0x1fea04(0x38f)]({'ShapeFormatSettingIcon':g['ShapeFormatSettingIcon']})),this[_0x1fea04(0x2dd)][_0x1fea04(0x23c)](_0x1fea04(0x354))||this[_0x1fea04(0x38a)](this[_0x1fea04(0x2dd)][_0x1fea04(0x38f)]({'TopmostIcon':g[_0x1fea04(0x354)]})),this['disposeWithMe'](this[_0x1fea04(0x2dd)][_0x1fea04(0x38f)](Et));}[_0xac088e(0x22a)](){const _0x386ab6=_0xac088e;this[_0x386ab6(0x38a)](this['_componentManager'][_0x386ab6(0x38f)](w,yt)),this[_0x386ab6(0x38a)](this['_componentManager'][_0x386ab6(0x38f)](E,ht)),this[_0x386ab6(0x38a)](this[_0x386ab6(0x2fc)][_0x386ab6(0x38f)](xt,bt)),this['disposeWithMe'](this[_0x386ab6(0x2fc)]['register'](me,be)),this[_0x386ab6(0x38a)](this['_componentManager']['register'](pe,xe)),this[_0x386ab6(0x38a)](this['_componentManager'][_0x386ab6(0x38f)](he,Se)),this[_0x386ab6(0x38a)](this[_0x386ab6(0x2fc)]['register'](ge,Ce)),this[_0x386ab6(0x38a)](this[_0x386ab6(0x2fc)][_0x386ab6(0x38f)](_e,we)),this[_0x386ab6(0x38a)](this[_0x386ab6(0x2fc)]['register'](O,e['ShapeTextFloatToolbar'])),this[_0x386ab6(0x38a)](this['_componentManager'][_0x386ab6(0x38f)](ee,ut)),this[_0x386ab6(0x38a)](this[_0x386ab6(0x2fc)]['register'](te,dt)),this[_0x386ab6(0x2fc)][_0x386ab6(0x3f8)](d[_0x386ab6(0x25c)])||this[_0x386ab6(0x38a)](this['_componentManager']['register'](d[_0x386ab6(0x25c)],ae)),this[_0x386ab6(0x38a)](this['_componentManager'][_0x386ab6(0x38f)](k,Dt));}};Ot=I([F(0x0,(0x0,o['Inject'])(n['ComponentManager'])),F(0x1,(0x0,o[_0xac088e(0x383)])(n[_0xac088e(0x2f4)]))],Ot);let kt=class extends o[_0xac088e(0x1d9)]{constructor(_0x4fe3ef,_0x8d16f9,_0x41aedc,_0x59090a,_0x49679f,_0x1c94dc,_0x35f923,_0x5e70ea,_0x4fb29f,_0x4eac1a,_0x148e61,_0x4079f3,_0x5284f3){const _0x229a51=_0xac088e;super(),this['_univerInstanceService']=_0x4fe3ef,this['_sidebarService']=_0x8d16f9,this[_0x229a51(0x1da)]=_0x41aedc,this[_0x229a51(0x446)]=_0x59090a,this[_0x229a51(0x4b3)]=_0x49679f,this[_0x229a51(0x483)]=_0x1c94dc,this[_0x229a51(0x31f)]=_0x35f923,this[_0x229a51(0x430)]=_0x5e70ea,this['_renderManagerService']=_0x4fb29f,this[_0x229a51(0x444)]=_0x4eac1a,this[_0x229a51(0x2a5)]=_0x148e61,this[_0x229a51(0x462)]=_0x4079f3,this[_0x229a51(0x4a2)]=_0x5284f3,H(this,_0x229a51(0x2d1),null),H(this,_0x229a51(0x362),null),H(this,_0x229a51(0x402),!0x1),H(this,_0x229a51(0x3e1),0x0),H(this,'_disposePopupsByUnit',new Map()),H(this,'_popupTargetKeys',new Map()),this[_0x229a51(0x223)](),this[_0x229a51(0x38a)](this[_0x229a51(0x278)][_0x229a51(0x2fa)](o[_0x229a51(0x230)][_0x229a51(0x2ba)])[_0x229a51(0x43a)](_0x12cf4c=>{const _0x2ce02a=_0x229a51;if(!_0x12cf4c){var _0x18a798;(_0x18a798=this[_0x2ce02a(0x2d1)])==null||_0x18a798[_0x2ce02a(0x45f)]();}})),this[_0x229a51(0x2c4)](),this['disposeWithMe'](this[_0x229a51(0x31f)]['remove$'][_0x229a51(0x43a)](_0x575633=>{const _0x2ffb75=_0x229a51;for(let _0x337431 of _0x575633){let _0xd83270=_0x337431[_0x2ffb75(0x2e6)]+':'+_0x337431[_0x2ffb75(0x390)]+':'+_0x337431[_0x2ffb75(0x270)];for(let [_0x12e762,_0x4a300d]of this['_popupTargetKeys'])_0x4a300d===_0xd83270&&this[_0x2ffb75(0x21f)](_0x12e762,!0x0);}})),this[_0x229a51(0x38a)]((0x0,e['bindRenderTransformerLifecycle'])(this[_0x229a51(0x2a7)],o[_0x229a51(0x230)][_0x229a51(0x2ba)],_0x238152=>this[_0x229a51(0x2bb)](_0x238152))),this[_0x229a51(0x38a)](this[_0x229a51(0x2a5)]['editingParams$'][_0x229a51(0x43a)](_0x28f732=>{_0x28f732&&this['_clearPopups'](void 0x0,!0x0);})),this['disposeWithMe'](this[_0x229a51(0x462)][_0x229a51(0x4fe)]['subscribe'](()=>{const _0x52d34f=_0x229a51;this[_0x52d34f(0x31f)][_0x52d34f(0x2f0)]()['some'](_0x21269b=>_0x21269b[_0x52d34f(0x37c)]===o[_0x52d34f(0x440)][_0x52d34f(0x2bf)]&&this[_0x52d34f(0x278)][_0x52d34f(0x24e)](_0x21269b[_0x52d34f(0x2e6)])===o[_0x52d34f(0x230)]['UNIVER_DOC']&&!this['_canEditShape'](_0x21269b[_0x52d34f(0x2e6)],_0x21269b[_0x52d34f(0x270)]))&&(this[_0x52d34f(0x21f)](void 0x0,!0x0),this[_0x52d34f(0x3ee)]());}));}[_0xac088e(0x277)](_0x570d9c,_0x10f622,_0x4c1074,_0x1a2c27){const _0x460646=_0xac088e;return[{'label':_0x460646(0x4ee),'index':0x0,'commandId':j['id'],'commandParams':{'unitId':_0x570d9c,'subUnitId':_0x10f622,'drawingId':_0x4c1074},'disable':_0x1a2c27===o[_0x460646(0x440)][_0x460646(0x3ac)]},{'label':_0x460646(0x2a9),'index':0x1,'commandId':c[_0x460646(0x200)]['id'],'commandParams':{'unitId':_0x570d9c,'drawings':[{'unitId':_0x570d9c,'subUnitId':_0x10f622,'drawingId':_0x4c1074}]},'disable':!0x1},{'label':_0x460646(0x2ae),'index':0x2,'commandId':B['id'],'commandParams':{'unitId':_0x570d9c,'subUnitId':_0x10f622,'drawingId':_0x4c1074},'disable':!0x1}];}[_0xac088e(0x223)](){const _0x566c00=_0xac088e;this['_menuManagerService'][_0x566c00(0x284)](Qe);}[_0xac088e(0x2f6)](_0x2989e2,_0x14c50f,_0x221591){const _0x4b9d72=_0xac088e;let _0x1777f4=this['_docsShapeService']['getShapeTypeById'](_0x2989e2,_0x14c50f,_0x221591),_0x4ce385=this[_0x4b9d72(0x446)][_0x4b9d72(0x4d8)](_0x2989e2,_0x14c50f,_0x221591);return _0x1777f4===void 0x0||_0x4ce385===void 0x0?null:{'shapeData':_0x4ce385,'shapeId':_0x221591,'shapeType':_0x1777f4,'unitId':_0x2989e2,'subUnitId':_0x14c50f,'version':this[_0x4b9d72(0x3e1)],'disableShapeOption':!0x1};}[_0xac088e(0x21f)](_0x50f40b,_0x1cfb26=!0x1){const _0x54bef3=_0xac088e;if(_0x50f40b==null){[...this[_0x54bef3(0x268)][_0x54bef3(0x460)]()]['forEach'](_0x5426df=>this['_clearPopups'](_0x5426df,_0x1cfb26));return;}let _0x56c962=this['_disposePopupsByUnit'][_0x54bef3(0x314)](_0x50f40b);if(_0x56c962){for(let _0x3d1ee5=_0x56c962[_0x54bef3(0x1ee)]-0x1;_0x3d1ee5>=0x0;--_0x3d1ee5){let _0x2f200b=_0x56c962[_0x3d1ee5];(_0x1cfb26||_0x2f200b['canDispose']())&&(_0x2f200b[_0x54bef3(0x45f)](),_0x56c962['splice'](_0x3d1ee5,0x1));}_0x56c962['length']===0x0&&(this['_disposePopupsByUnit'][_0x54bef3(0x488)](_0x50f40b),this['_popupTargetKeys'][_0x54bef3(0x488)](_0x50f40b));}}[_0xac088e(0x4e8)](_0x53a77b){const _0x2cbf6e=_0xac088e;let _0x4d7daf=this[_0x2cbf6e(0x268)]['get'](_0x53a77b);if(_0x4d7daf)return _0x4d7daf;let _0x55ae98=[];return this['_disposePopupsByUnit'][_0x2cbf6e(0x373)](_0x53a77b,_0x55ae98),_0x55ae98;}[_0xac088e(0x2bb)](_0xbf3a56){const _0x349446=_0xac088e;var _0x28ee51;let _0x1205f1=new o[(_0x349446(0x3f3))](),_0x1b6cae=(_0x28ee51=this['_renderManagerService'][_0x349446(0x254)](o[_0x349446(0x230)]['UNIVER_DOC'])[_0x349446(0x41f)](_0x25ba9d=>_0x25ba9d[_0x349446(0x4cc)][_0x349446(0x2df)]()===_0xbf3a56))==null?void 0x0:_0x28ee51[_0x349446(0x2e6)];return _0x1b6cae&&(_0x1205f1['add'](_0xbf3a56[_0x349446(0x385)][_0x349446(0x43a)](()=>this[_0x349446(0x2fb)](_0xbf3a56,_0x1b6cae))),_0x1205f1['add'](_0xbf3a56[_0x349446(0x455)][_0x349446(0x43a)](()=>{this['_clearPopups'](_0x1b6cae),queueMicrotask(()=>{const _0x212f7e=_0xa70b;_0xbf3a56['getSelectedObjectMap']()[_0x212f7e(0x40c)]>0x0||!this[_0x212f7e(0x31f)][_0x212f7e(0x2f0)]()[_0x212f7e(0x3f9)](_0x3beac7=>_0x3beac7[_0x212f7e(0x2e6)]===_0x1b6cae)||(this['_contextService'][_0x212f7e(0x283)](o[_0x212f7e(0x24d)],!0x1),this['_drawingManagerService'][_0x212f7e(0x2c7)](null));});})),_0x1205f1['add'](_0xbf3a56[_0x349446(0x43f)][_0x349446(0x43a)](()=>{const _0x25613b=_0x349446;this[_0x25613b(0x21f)](_0x1b6cae,!0x0);}))),_0x1205f1;}['_handleCreateControl'](_0x32a92a,_0x4fa17d){const _0x49f2f2=_0xac088e;let _0x337aca=_0x32a92a[_0x49f2f2(0x3a3)]();if(this[_0x49f2f2(0x402)]){this['_clearPopups'](_0x4fa17d,!0x0);return;}if(_0x337aca[_0x49f2f2(0x40c)]>0x1){this[_0x49f2f2(0x21f)](_0x4fa17d);return;}let _0x4767c1=_0x337aca[_0x49f2f2(0x37f)]()[_0x49f2f2(0x1f1)]()[_0x49f2f2(0x201)];if(!_0x4767c1){this['_clearPopups'](_0x4fa17d);return;}let _0x1e2a84=this[_0x49f2f2(0x31f)][_0x49f2f2(0x496)](_0x4767c1[_0x49f2f2(0x299)]);if(!_0x1e2a84||_0x1e2a84[_0x49f2f2(0x37c)]!==o[_0x49f2f2(0x440)][_0x49f2f2(0x2bf)]){this[_0x49f2f2(0x21f)](_0x4fa17d);return;}let {unitId:_0x41ad73,subUnitId:_0x192576,drawingId:_0x1c3bb2}=_0x1e2a84;if(!this['_canEditShape'](_0x41ad73,_0x1c3bb2)){this[_0x49f2f2(0x21f)](_0x4fa17d,!0x0);return;}let _0x14ad7d=this['_getShapeInfo'](_0x41ad73,_0x192576,_0x1c3bb2);if(!_0x14ad7d){this[_0x49f2f2(0x21f)](_0x4fa17d);return;}let _0x44000d=this[_0x49f2f2(0x268)][_0x49f2f2(0x314)](_0x4fa17d),_0x32ca8a=_0x41ad73+':'+_0x192576+':'+_0x1c3bb2;if(this[_0x49f2f2(0x31a)][_0x49f2f2(0x314)](_0x4fa17d)===_0x32ca8a&&_0x44000d!=null&&_0x44000d['length'])return;this[_0x49f2f2(0x21f)](_0x4fa17d);let _0x3eb052=this[_0x49f2f2(0x2a7)][_0x49f2f2(0x4bd)](_0x41ad73),_0x5c659d=((_0x3eb052==null?void 0x0:_0x3eb052['isMainScene'])===!0x1?_0x3eb052[_0x49f2f2(0x3e6)](t[_0x49f2f2(0x4c6)]):this[_0x49f2f2(0x430)])[_0x49f2f2(0x33e)](_0x4767c1,this[_0x49f2f2(0x37a)](_0x14ad7d,()=>this[_0x49f2f2(0x21f)](_0x4fa17d,!0x0)),_0x41ad73);this['disposeWithMe'](_0x5c659d),this['_getDisposePopups'](_0x4fa17d)[_0x49f2f2(0x474)](_0x5c659d),this[_0x49f2f2(0x31a)]['set'](_0x4fa17d,_0x32ca8a),this[_0x49f2f2(0x31f)][_0x49f2f2(0x2f0)]()[_0x49f2f2(0x3f9)](_0x232352=>_0x232352['unitId']===_0x41ad73&&_0x232352[_0x49f2f2(0x390)]===_0x192576&&_0x232352['drawingId']===_0x1c3bb2)||this[_0x49f2f2(0x31f)][_0x49f2f2(0x2c7)]([{'unitId':_0x41ad73,'subUnitId':_0x192576,'drawingId':_0x1c3bb2}]);}[_0xac088e(0x37a)](_0x3fb919,_0x3893fe){const _0x3c1717=_0xac088e;let {unitId:_0x591f25,subUnitId:_0x3fdac,shapeId:_0x23cae0}=_0x3fb919,_0x2c0767={'hostType':o[_0x3c1717(0x230)][_0x3c1717(0x2ba)],'unitId':_0x591f25,'subUnitId':_0x3fdac,'shapeId':_0x23cae0};return{'componentKey':xt,'requiresStableLayout':!0x1,'direction':_0x3c1717(0x238),'offset':[0x0,0x8],'extraProps':{'shapeType':_0x3fb919[_0x3c1717(0x492)],'onText':()=>{const _0x84c527=_0x3c1717;_0x3893fe(),this[_0x84c527(0x4a2)][_0x84c527(0x487)](_0x84c527(0x37e),_0x2c0767);},'onStyle':()=>{const _0x51d648=_0x3c1717;_0x3893fe(),this[_0x51d648(0x4a2)][_0x51d648(0x487)](_0x51d648(0x404),_0x2c0767);},'onDelete':()=>this['_commandService'][_0x3c1717(0x290)](c[_0x3c1717(0x200)]['id'],{'unitId':_0x591f25,'drawings':[{'unitId':_0x591f25,'subUnitId':_0x3fdac,'drawingId':_0x23cae0}]})}};}['_canEditShape'](_0x3e01be,_0x6d96ec){const _0x50eb39=_0xac088e;let _0x222ea2=this['_univerInstanceService'][_0x50eb39(0x2cc)](_0x3e01be,o[_0x50eb39(0x230)][_0x50eb39(0x2ba)]);if(!_0x222ea2)return!0x1;let _0x5a52f0=(0x0,s[_0x50eb39(0x2b6)])(_0x222ea2,_0x6d96ec);return(0x0,s[_0x50eb39(0x376)])(this[_0x50eb39(0x462)],_0x3e01be,[...(0x0,s[_0x50eb39(0x2b7)])(_0x222ea2,_0x5a52f0,'drawing',_0x6d96ec),(0x0,s[_0x50eb39(0x1fe)])(_0x5a52f0,_0x50eb39(0x1e4),_0x6d96ec)]);}[_0xac088e(0x2c4)](){const _0x5f4861=_0xac088e;this[_0x5f4861(0x38a)](this[_0x5f4861(0x483)]['onCommandExecuted'](_0x5214eb=>{const _0x1fce6b=_0x5f4861;if(_0x5214eb['id']===j['id']){let {unitId:_0x27dcbe,subUnitId:_0x55730b,drawingId:_0x33f60b}=_0x5214eb[_0x1fce6b(0x359)];this[_0x1fce6b(0x3e1)]+=0x1,this[_0x1fce6b(0x362)]=this['_getShapeInfo'](_0x27dcbe,_0x55730b,_0x33f60b),this[_0x1fce6b(0x21f)](void 0x0,!0x0),this['_openShapeEditPanel']();}if(_0x5214eb['id']===B['id']&&(this[_0x1fce6b(0x362)]=null,this[_0x1fce6b(0x3ee)]()),_0x5214eb['id']===r[_0x1fce6b(0x28b)]['id']){var _0x451448;let {unitId:_0x3644b4,shapeId:_0x52ff6b}=_0x5214eb['params'];if(((_0x451448=this['_activeShapeInfo'])==null?void 0x0:_0x451448[_0x1fce6b(0x25f)])===_0x52ff6b){let _0x510bd9=this['_getShapeInfo'](_0x3644b4,this[_0x1fce6b(0x362)][_0x1fce6b(0x390)],_0x52ff6b);_0x510bd9&&(this['_shapeEditPanelVersion']+=0x1,_0x510bd9[_0x1fce6b(0x3b8)]=this[_0x1fce6b(0x3e1)],this[_0x1fce6b(0x362)]=_0x510bd9,this[_0x1fce6b(0x402)]&&this[_0x1fce6b(0x227)]());}}})),this[_0x5f4861(0x38a)](this['_drawingManagerService'][_0x5f4861(0x22d)]['subscribe'](_0x130c2a=>{const _0x47c1d6=_0x5f4861;if(!this[_0x47c1d6(0x402)])return;if(_0x130c2a[_0x47c1d6(0x1ee)]===0x0){this['_activeShapeInfo']=null,this[_0x47c1d6(0x3ee)]();return;}if(_0x130c2a[_0x47c1d6(0x1ee)]===0x1&&_0x130c2a[0x0][_0x47c1d6(0x37c)]===o[_0x47c1d6(0x440)][_0x47c1d6(0x2bf)]&&(this['_shapeEditPanelVersion']+=0x1,this[_0x47c1d6(0x362)]=this[_0x47c1d6(0x2f6)](_0x130c2a[0x0]['unitId'],_0x130c2a[0x0][_0x47c1d6(0x390)],_0x130c2a[0x0][_0x47c1d6(0x270)]),this[_0x47c1d6(0x362)])){this[_0x47c1d6(0x227)]();return;}let _0x232848=_0x130c2a[_0x47c1d6(0x399)](_0x2ef6e9=>_0x2ef6e9[_0x47c1d6(0x37c)]===o[_0x47c1d6(0x440)][_0x47c1d6(0x2bf)]);this[_0x47c1d6(0x3e1)]+=0x1,this[_0x47c1d6(0x362)]=this[_0x47c1d6(0x2f6)](_0x130c2a[0x0][_0x47c1d6(0x2e6)],_0x130c2a[0x0]['subUnitId'],_0x130c2a[0x0][_0x47c1d6(0x270)]),this[_0x47c1d6(0x362)]&&_0x130c2a[_0x47c1d6(0x1ee)]>0x1&&_0x232848[_0x47c1d6(0x1ee)]===_0x130c2a[_0x47c1d6(0x1ee)]?this['_openShapeEditPanel']():this['_activeShapeInfo']&&_0x232848[_0x47c1d6(0x1ee)]!==_0x130c2a[_0x47c1d6(0x1ee)]?(this[_0x47c1d6(0x362)][_0x47c1d6(0x475)]=!0x0,this[_0x47c1d6(0x227)]()):this['_closeShapeEditPanel']();}));}[_0xac088e(0x227)](){const _0x3bbd72=_0xac088e;this[_0x3bbd72(0x362)]&&(this['_sidebarDisposable']=this['_sidebarService'][_0x3bbd72(0x487)]({'id':w,'header':{'title':this[_0x3bbd72(0x4b3)]['t']('docs-shape-ui.formatShape')},'width':0x184,'children':{'label':w,...this['_activeShapeInfo']},'onClose':()=>{const _0x942301=_0x3bbd72;this['_drawingManagerService']['focusDrawing'](null),this['_contextService'][_0x942301(0x283)](o[_0x942301(0x24d)],!0x1),this[_0x942301(0x2d1)]=null;}}),this['_isOpenedShapeEditPanel']=!0x0);}['_closeShapeEditPanel'](){const _0x3b3378=_0xac088e;this[_0x3b3378(0x402)]=!0x1,this[_0x3b3378(0x2f1)][_0x3b3378(0x411)](w),this[_0x3b3378(0x2d1)]=null,this[_0x3b3378(0x444)][_0x3b3378(0x283)](o['FOCUSING_COMMON_DRAWINGS'],!0x1),this[_0x3b3378(0x31f)][_0x3b3378(0x2c7)](null);}};kt=I([F(0x0,o[_0xac088e(0x257)]),F(0x1,(0x0,o[_0xac088e(0x383)])(n['ISidebarService'])),F(0x2,n['IMenuManagerService']),F(0x3,(0x0,o[_0xac088e(0x383)])(r[_0xac088e(0x326)])),F(0x4,(0x0,o[_0xac088e(0x383)])(o[_0xac088e(0x2e2)])),F(0x5,o[_0xac088e(0x2cf)]),F(0x6,u[_0xac088e(0x4ba)]),F(0x7,(0x0,o['Inject'])(t[_0xac088e(0x4c6)])),F(0x8,l['IRenderManagerService']),F(0x9,o[_0xac088e(0x486)]),F(0xa,(0x0,o[_0xac088e(0x383)])(G)),F(0xb,o[_0xac088e(0x23e)]),F(0xc,(0x0,o['Inject'])(e[_0xac088e(0x341)]))],kt);const At=_0xac088e(0x26a);let X=class extends o[_0xac088e(0x1d9)]{constructor(_0x514640,_0x4c9a40,_0x8d12ef,_0x3540ce,_0x13fb26,_0x7420ff){const _0x5ee48a=_0xac088e;super(),this[_0x5ee48a(0x1da)]=_0x514640,this[_0x5ee48a(0x34d)]=_0x4c9a40,this[_0x5ee48a(0x31f)]=_0x8d12ef,this['_univerInstanceService']=_0x3540ce,this['_renderManagerService']=_0x13fb26,this[_0x5ee48a(0x497)]=_0x7420ff,H(this,_0x5ee48a(0x423),!0x1),this[_0x5ee48a(0x1da)][_0x5ee48a(0x284)](Ze),this['disposeWithMe']((0x0,o[_0x5ee48a(0x3fb)])(this[_0x5ee48a(0x31f)][_0x5ee48a(0x22d)][_0x5ee48a(0x43a)](()=>this[_0x5ee48a(0x3e3)]()))),this[_0x5ee48a(0x3e3)]();}[_0xac088e(0x45f)](){const _0x48e350=_0xac088e;this['_shapeFloatingToolbarService']['setFallbackVisible'](!0x1,At),this[_0x48e350(0x3e5)](),super['dispose']();}[_0xac088e(0x3e3)](){const _0x25fd6e=_0xac088e;var _0x33ac36;let _0x24400b=this[_0x25fd6e(0x31f)]['getFocusDrawings'](),_0x102869=_0x24400b[_0x25fd6e(0x1ee)]===0x1?_0x24400b[0x0]:void 0x0;if((_0x102869==null?void 0x0:_0x102869[_0x25fd6e(0x37c)])!==o[_0x25fd6e(0x440)][_0x25fd6e(0x2bf)]||this[_0x25fd6e(0x278)][_0x25fd6e(0x24e)](_0x102869['unitId'])!==o[_0x25fd6e(0x230)][_0x25fd6e(0x2ba)]){this[_0x25fd6e(0x497)][_0x25fd6e(0x426)](!0x1,At),this[_0x25fd6e(0x3e5)]();return;}let _0x16bf4a=(_0x33ac36=this[_0x25fd6e(0x2a7)]['getRenderUnitById'](_0x102869[_0x25fd6e(0x2e6)]))==null?void 0x0:_0x33ac36['engine'][_0x25fd6e(0x3cc)](),_0xdee5ef=(0x0,e['resolveShapeContextualRibbonHostMode'])(_0x16bf4a)===_0x25fd6e(0x2e9);this[_0x25fd6e(0x497)][_0x25fd6e(0x426)](_0xdee5ef,At),_0xdee5ef?this[_0x25fd6e(0x3e5)]():(this[_0x25fd6e(0x423)]=!0x0,this[_0x25fd6e(0x34d)][_0x25fd6e(0x2b3)](T,{'activate':!0x0}));}[_0xac088e(0x3e5)](){const _0x4ccbd4=_0xac088e;this[_0x4ccbd4(0x423)]&&(this[_0x4ccbd4(0x423)]=!0x1,this[_0x4ccbd4(0x34d)][_0x4ccbd4(0x4e4)](T),this[_0x4ccbd4(0x34d)][_0x4ccbd4(0x1f7)]([]));}};X=I([F(0x0,n['IMenuManagerService']),F(0x1,n[_0xac088e(0x339)]),F(0x2,u[_0xac088e(0x4ba)]),F(0x3,o[_0xac088e(0x257)]),F(0x4,l['IRenderManagerService']),F(0x5,(0x0,o['Inject'])(e[_0xac088e(0x37b)]))],X);let Z=class extends o[_0xac088e(0x1d9)]{constructor(_0x153ecd,_0x4f30b4,_0x50c53f,_0x3850cf){const _0x5af0a6=_0xac088e;super(),this[_0x5af0a6(0x483)]=_0x153ecd,this['_renderManagerService']=_0x4f30b4,this['_drawingManagerService']=_0x50c53f,this[_0x5af0a6(0x1db)]=_0x3850cf,this[_0x5af0a6(0x490)]();}['_initialize'](){const _0x90c591=_0xac088e;this[_0x90c591(0x38a)](this[_0x90c591(0x31f)][_0x90c591(0x263)]['subscribe'](_0x1e0b00=>this[_0x90c591(0x384)](_0x1e0b00))),this[_0x90c591(0x38a)](this[_0x90c591(0x31f)][_0x90c591(0x1fb)][_0x90c591(0x43a)](_0x70e69a=>{const _0x2b5d5c=_0x90c591;_0x70e69a['forEach'](_0x5183ba=>this[_0x2b5d5c(0x239)](_0x5183ba));})),this['disposeWithMe'](this['_commandService'][_0x90c591(0x25e)](_0x1926c7=>{const _0x102638=_0x90c591;if(_0x1926c7['id']!==r[_0x102638(0x28b)]['id'])return;let {unitId:_0x3f94ce,shapeId:_0x4b39b8}=_0x1926c7[_0x102638(0x359)];this['_refreshShapeData']({'unitId':_0x3f94ce,'subUnitId':_0x3f94ce,'drawingId':_0x4b39b8});}));}['_insertShapes'](_0x2f1f4b){const _0x281465=_0xac088e;_0x2f1f4b[_0x281465(0x3ca)](_0x5e64cd=>{const _0x2d42cc=_0x281465;let _0x2590d4=this[_0x2d42cc(0x44b)](_0x5e64cd['unitId']);if(!_0x2590d4)return;let _0x1e8906=this['_drawingManagerService'][_0x2d42cc(0x331)](_0x5e64cd);(_0x1e8906==null?void 0x0:_0x1e8906[_0x2d42cc(0x37c)])===o[_0x2d42cc(0x440)][_0x2d42cc(0x2bf)]&&this[_0x2d42cc(0x1db)][_0x2d42cc(0x2b8)](_0x1e8906,_0x2590d4[_0x2d42cc(0x4cc)]);});}[_0xac088e(0x239)](_0x192b54){const _0x1f83c1=_0xac088e;let _0x3097d1=this['_drawingManagerService'][_0x1f83c1(0x331)](_0x192b54);if((_0x3097d1==null?void 0x0:_0x3097d1[_0x1f83c1(0x37c)])!==o['DrawingTypeEnum'][_0x1f83c1(0x2bf)])return;let _0x121200=this[_0x1f83c1(0x44b)](_0x192b54[_0x1f83c1(0x2e6)]);if(!_0x121200||_0x3097d1[_0x1f83c1(0x39c)]==null)return;let _0x1a8336=(0x0,u[_0x1f83c1(0x2ed)])(_0x192b54),_0x4ded61=_0x121200[_0x1f83c1(0x4cc)][_0x1f83c1(0x4a1)](_0x1a8336);_0x4ded61&&(_0x4ded61[_0x1f83c1(0x47a)](_0x3097d1['srcRect']),_0x4ded61[_0x1f83c1(0x3f0)](_0x3097d1[_0x1f83c1(0x375)]),_0x4ded61[_0x1f83c1(0x4f1)](!0x0));}['_refreshShapeData'](_0x37fa4a){const _0x542a46=_0xac088e;let _0x2a2a88=this['_getSceneByUnitId'](_0x37fa4a['unitId']);if(!_0x2a2a88)return;let _0x104735=(0x0,u['getDrawingShapeKeyByDrawingSearch'])(_0x37fa4a),_0x1d9110=_0x2a2a88[_0x542a46(0x4cc)][_0x542a46(0x4a1)](_0x104735);_0x1d9110&&(this[_0x542a46(0x1db)][_0x542a46(0x2ca)](_0x1d9110),this[_0x542a46(0x1db)][_0x542a46(0x34c)](_0x1d9110,{'unitId':_0x37fa4a[_0x542a46(0x2e6)],'subUnitId':_0x37fa4a[_0x542a46(0x390)],'shapeId':_0x37fa4a[_0x542a46(0x270)]}),_0x1d9110['makeDirty'](!0x0));}[_0xac088e(0x44b)](_0x4931e1){const _0x1ddcd3=_0xac088e;if(_0x4931e1==null)return null;let _0x47f19d=this[_0x1ddcd3(0x2a7)][_0x1ddcd3(0x4bd)](_0x4931e1),_0x22f73c=_0x47f19d==null?void 0x0:_0x47f19d[_0x1ddcd3(0x4cc)];return _0x22f73c==null?null:{'scene':_0x22f73c};}};Z=I([F(0x0,o[_0xac088e(0x2cf)]),F(0x1,l[_0xac088e(0x1f4)]),F(0x2,u['IDrawingManagerService']),F(0x3,(0x0,o[_0xac088e(0x383)])(K))],Z);let Q=class extends o[_0xac088e(0x468)]{constructor(_0x2bc82a=nt,_0x450a6a,_0x4be720,_0x110b0e,_0x4e4fb1){const _0x5aaa71=_0xac088e;super(),this[_0x5aaa71(0x397)]=_0x2bc82a,this['_injector']=_0x450a6a,this[_0x5aaa71(0x483)]=_0x4be720,this[_0x5aaa71(0x3e9)]=_0x110b0e,this[_0x5aaa71(0x2a7)]=_0x4e4fb1;let {menu:_0xf6c7b4,..._0x215b08}=(0x0,o[_0x5aaa71(0x42b)])({},nt,this['_config']);_0xf6c7b4&&this[_0x5aaa71(0x3e9)][_0x5aaa71(0x472)](_0x5aaa71(0x4e5),_0xf6c7b4,{'merge':!0x0}),this['_configService'][_0x5aaa71(0x472)](tt,_0x215b08),[C,B,j,A,N,P][_0x5aaa71(0x3ca)](_0xfa169d=>this[_0x5aaa71(0x38a)](this[_0x5aaa71(0x483)]['registerCommand'](_0xfa169d)));}[_0xac088e(0x2eb)](){const _0x3dc585=_0xac088e;let _0xad886=[[Ot],[kt],[Z],[K],[q],[W],[L],[J],[G],[X]];(0x0,o[_0x3dc585(0x4e0)])(this[_0x3dc585(0x4d9)],_0xad886),this[_0x3dc585(0x4d9)][_0x3dc585(0x314)](Ot);}[_0xac088e(0x3de)](){const _0x29f98c=_0xac088e;this['disposeWithMe'](this[_0x29f98c(0x2a7)][_0x29f98c(0x447)](o['UniverInstanceType'][_0x29f98c(0x2ba)],[W])),(0x0,o[_0x29f98c(0x20f)])(this[_0x29f98c(0x4d9)],[[kt],[Z],[K],[q],[L],[J],[G],[X]]);}};H(Q,_0xac088e(0x348),o[_0xac088e(0x230)][_0xac088e(0x2ba)]),H(Q,'pluginName','DOCS_SHAPE_UI_PLUGIN'),H(Q,'packageName',$e),H(Q,_0xac088e(0x3b8),et),Q=I([(0x0,o[_0xac088e(0x3a2)])(m['UniverLicensePlugin'],s['UniverDocsPlugin'],u['UniverDrawingPlugin'],d['UniverDrawingMobileUIPlugin'],l[_0xac088e(0x22e)],t['UniverDocsMobileUIPlugin'],a[_0xac088e(0x240)],h[_0xac088e(0x47d)],r['UniverDocsShapePlugin'],e[_0xac088e(0x311)]),F(0x1,(0x0,o[_0xac088e(0x383)])(o['Injector'])),F(0x2,o['ICommandService']),F(0x3,o[_0xac088e(0x4a8)]),F(0x4,l[_0xac088e(0x1f4)])],Q);let jt=class extends o[_0xac088e(0x1d9)]{constructor(_0xa8892,_0x4d3b8e){const _0x351b40=_0xac088e;super(),this[_0x351b40(0x2fc)]=_0xa8892,this[_0x351b40(0x2dd)]=_0x4d3b8e,this['_registerIcons'](),this['_registerComponents']();}[_0xac088e(0x294)](){const _0x14abec=_0xac088e;this[_0x14abec(0x2dd)][_0x14abec(0x23c)](_0x14abec(0x2bc))||this[_0x14abec(0x38a)](this[_0x14abec(0x2dd)][_0x14abec(0x38f)]({'ObjectLayersIcon':g[_0x14abec(0x2bc)]})),this[_0x14abec(0x2dd)][_0x14abec(0x23c)](_0x14abec(0x491))||this['disposeWithMe'](this[_0x14abec(0x2dd)][_0x14abec(0x38f)]({'BottomIcon':g['BottomIcon']})),this['_iconManager'][_0x14abec(0x23c)](_0x14abec(0x4e9))||this[_0x14abec(0x38a)](this['_iconManager'][_0x14abec(0x38f)]({'MoveDownIcon':g[_0x14abec(0x4e9)]})),this[_0x14abec(0x2dd)]['has'](_0x14abec(0x45c))||this[_0x14abec(0x38a)](this['_iconManager'][_0x14abec(0x38f)]({'MoveUpIcon':g[_0x14abec(0x45c)]})),this['_iconManager'][_0x14abec(0x23c)](_0x14abec(0x291))||this[_0x14abec(0x38a)](this['_iconManager']['register']({'ShapeFormatSettingIcon':g[_0x14abec(0x291)]})),this[_0x14abec(0x2dd)][_0x14abec(0x23c)](_0x14abec(0x354))||this['disposeWithMe'](this['_iconManager'][_0x14abec(0x38f)]({'TopmostIcon':g[_0x14abec(0x354)]})),this[_0x14abec(0x38a)](this[_0x14abec(0x2dd)]['register'](Et));}['_registerComponents'](){const _0x5fa068=_0xac088e;this[_0x5fa068(0x38a)](this['_componentManager']['register'](w,_t)),this['disposeWithMe'](this[_0x5fa068(0x2fc)]['register'](E,mt)),this[_0x5fa068(0x38a)](this[_0x5fa068(0x2fc)][_0x5fa068(0x38f)](xt,Ct)),this['disposeWithMe'](this[_0x5fa068(0x2fc)][_0x5fa068(0x38f)](me,be)),this[_0x5fa068(0x38a)](this['_componentManager'][_0x5fa068(0x38f)](pe,xe)),this[_0x5fa068(0x38a)](this['_componentManager'][_0x5fa068(0x38f)](he,Se)),this[_0x5fa068(0x38a)](this[_0x5fa068(0x2fc)][_0x5fa068(0x38f)](ge,Ce)),this[_0x5fa068(0x38a)](this[_0x5fa068(0x2fc)][_0x5fa068(0x38f)](_e,we)),this[_0x5fa068(0x38a)](this[_0x5fa068(0x2fc)][_0x5fa068(0x38f)](O,e[_0x5fa068(0x39a)])),this['disposeWithMe'](this[_0x5fa068(0x2fc)]['register'](ee,oe)),this[_0x5fa068(0x38a)](this['_componentManager']['register'](te,ie)),this['_componentManager'][_0x5fa068(0x3f8)](d[_0x5fa068(0x25c)])||this[_0x5fa068(0x38a)](this[_0x5fa068(0x2fc)]['register'](d[_0x5fa068(0x25c)],ae)),this[_0x5fa068(0x38a)](this[_0x5fa068(0x2fc)][_0x5fa068(0x38f)](k,Dt));}};jt=I([F(0x0,(0x0,o['Inject'])(n['ComponentManager'])),F(0x1,(0x0,o[_0xac088e(0x383)])(n[_0xac088e(0x2f4)]))],jt);let Mt=class extends o['Disposable']{constructor(_0x13cb63,_0x152928,_0x4a8368,_0x38bc98,_0x3c8f7a,_0x7c30d3,_0x1cbfa7,_0x38f5b7,_0xb174d2){const _0x15b1a3=_0xac088e;super();let _0x26192c=_0x57af43=>{const _0x120e93=_0xa70b;let _0x4fc2d2=_0x7c30d3[_0x120e93(0x2cc)](_0x57af43[_0x120e93(0x2e6)],o['UniverInstanceType'][_0x120e93(0x2ba)]),_0x3dbb42=_0x4fc2d2?(0x0,s[_0x120e93(0x2b6)])(_0x4fc2d2,_0x57af43[_0x120e93(0x25f)]):'';return!!_0x4fc2d2&&(0x0,s[_0x120e93(0x376)])(_0x38f5b7,_0x57af43[_0x120e93(0x2e6)],[(0x0,s[_0x120e93(0x1fe)])(_0x3dbb42,_0x120e93(0x1e4),_0x57af43['shapeId']),...(0x0,s[_0x120e93(0x2b7)])(_0x4fc2d2,_0x3dbb42,_0x120e93(0x1e4),_0x57af43['shapeId'])]);},_0x40fc74=_0x1480dc=>_0x1480dc['shapeId']&&_0x26192c(_0x1480dc)?_0x4a8368[_0x15b1a3(0x4d8)](_0x1480dc['unitId'],_0x1480dc[_0x15b1a3(0x25f)])??null:null,_0x1369d0=()=>{const _0x1fe81d=_0x15b1a3;let _0x1b0eb3=_0x3c8f7a[_0x1fe81d(0x2f0)](),_0x393572=_0x1b0eb3[_0x1fe81d(0x1ee)]===0x1?_0x1b0eb3[0x0]:null;return(_0x393572==null?void 0x0:_0x393572[_0x1fe81d(0x37c)])===o[_0x1fe81d(0x440)][_0x1fe81d(0x2bf)]&&_0x393572[_0x1fe81d(0x2e6)]===_0x13cb63['unitId']?{'unitId':_0x393572[_0x1fe81d(0x2e6)],'subUnitId':_0x393572['subUnitId'],'shapeId':_0x393572[_0x1fe81d(0x270)]}:null;};this[_0x15b1a3(0x38a)]((0x0,e[_0x15b1a3(0x2f2)])(_0x13cb63,_0x152928,{'changes$':(0x0,p['merge'])(_0x3c8f7a[_0x15b1a3(0x22d)],_0x38bc98[_0x15b1a3(0x2f7)],_0x38f5b7[_0x15b1a3(0x4fe)]),'isActive':()=>{const _0x573fd8=_0x15b1a3;var _0x24add5;return((_0x24add5=_0x7c30d3[_0x573fd8(0x273)]())==null?void 0x0:_0x24add5[_0x573fd8(0x389)]())===_0x13cb63[_0x573fd8(0x2e6)]&&!_0x1cbfa7['getContextValue'](o['FOCUSING_SHAPE_TEXT_EDITOR'])&&_0x3c8f7a[_0x573fd8(0x2f0)]()[_0x573fd8(0x3f9)](_0x17444d=>_0x17444d[_0x573fd8(0x2e6)]===_0x13cb63[_0x573fd8(0x2e6)]);},'getSelectedTarget':_0x1369d0,'getSource':()=>{let _0x43fb37=_0x1369d0();return _0x43fb37?_0x40fc74(_0x43fb37):null;},'getTarget':_0x2747c0=>{const _0xd4810c=_0x15b1a3;let _0x29e2ae=_0x13cb63['scene'][_0xd4810c(0x41b)](new l[(_0xd4810c(0x3c6))](_0x2747c0[_0xd4810c(0x36d)],_0x2747c0['offsetY']));if(!(_0x29e2ae instanceof U))return null;let _0x4bc400={'unitId':_0x13cb63[_0xd4810c(0x2e6)],'subUnitId':_0x13cb63[_0xd4810c(0x2e6)],'shapeId':_0x29e2ae[_0xd4810c(0x25f)]};return _0x26192c(_0x4bc400)?_0x4bc400:null;},'getShape':_0x40fc74,'update':(_0xd72828,_0x490555,_0x555c50)=>_0xb174d2[_0x15b1a3(0x290)](r[_0x15b1a3(0x218)]['id'],{..._0xd72828,'shapeData':_0x555c50,'replaceShapeData':!0x0,'oldShapeJSON':{'oldShapeData':_0x490555}})}));}};Mt=I([F(0x1,(0x0,o[_0xac088e(0x383)])(n[_0xac088e(0x482)])),F(0x2,(0x0,o['Inject'])(r['DocsShapeService'])),F(0x3,(0x0,o[_0xac088e(0x383)])(G)),F(0x4,u['IDrawingManagerService']),F(0x5,o['IUniverInstanceService']),F(0x6,o[_0xac088e(0x486)]),F(0x7,o[_0xac088e(0x23e)]),F(0x8,o[_0xac088e(0x2cf)])],Mt);function Nt(_0x5ecbd3,_0x55b4c7){const _0xa21d5e=_0xac088e;let _0x1d4ddd=_0x5ecbd3;for(;_0x1d4ddd;){if(_0x55b4c7(_0x1d4ddd))return _0x1d4ddd;_0x1d4ddd=typeof _0x1d4ddd[_0xa21d5e(0x4e6)]==_0xa21d5e(0x481)?_0x1d4ddd[_0xa21d5e(0x4e6)]():null;}return null;}function Pt(_0x3b069d){return Nt(_0x3b069d,_0x1b1e0e=>_0x1b1e0e instanceof U);}function Ft(_0x279d56){const _0x19f769=_0xac088e;return(_0x279d56==null?void 0x0:_0x279d56[_0x19f769(0x3f7)])==null;}let It=class extends o[_0xac088e(0x1d9)]{constructor(_0x453836,_0x2f1a7c,_0x3e4f23,_0x5b169b,_0x154dcd){const _0x5992c8=_0xac088e;super(),this[_0x5992c8(0x3dd)]=_0x453836,this['_shapeTextEditingService']=_0x2f1a7c,this[_0x5992c8(0x31f)]=_0x3e4f23,this[_0x5992c8(0x4b8)]=_0x5b169b,this[_0x5992c8(0x446)]=_0x154dcd,H(this,_0x5992c8(0x4dc),null),H(this,_0x5992c8(0x2e5),null),this['_initEvents'](),this[_0x5992c8(0x412)](),this[_0x5992c8(0x422)]();}[_0xac088e(0x45f)](){const _0x7ec0b2=_0xac088e;this[_0x7ec0b2(0x2d4)](),super[_0x7ec0b2(0x45f)]();}['_initEvents'](){const _0xef39e2=_0xac088e;let {scene:_0xfc6833}=this[_0xef39e2(0x3dd)];this[_0xef39e2(0x38a)](_0xfc6833[_0xef39e2(0x275)][_0xef39e2(0x20d)]((_0x13bcb7,_0x21bf88)=>{const _0x3dac83=_0xef39e2;let {offsetX:_0x4d0df5,offsetY:_0x5eb888}=_0x13bcb7,_0x447fd8=l[_0x3dac83(0x3c6)][_0x3dac83(0x466)]([_0x4d0df5,_0x5eb888]),_0xb8b87f=Pt(_0xfc6833[_0x3dac83(0x41b)](_0x447fd8))??this[_0x3dac83(0x3b7)](_0x447fd8);if(_0xb8b87f){_0x21bf88[_0x3dac83(0x306)]();let _0x3bb2c6=this[_0x3dac83(0x446)]['getShapeModel'](_0xb8b87f['unitId'],_0xb8b87f[_0x3dac83(0x390)],_0xb8b87f['shapeId']);if(!_0x3bb2c6||(0x0,i[_0x3dac83(0x471)])(_0x3bb2c6['getShapeType']())||!Ft(_0x3bb2c6[_0x3dac83(0x296)]()))return;this[_0x3dac83(0x2a5)][_0x3dac83(0x49b)]({'visible':!0x0,'unitId':_0xb8b87f[_0x3dac83(0x2e6)],'subUnitId':_0xb8b87f[_0x3dac83(0x390)],'shapeId':_0xb8b87f[_0x3dac83(0x25f)],'shapeKey':_0xb8b87f[_0x3dac83(0x299)]});}}));}[_0xac088e(0x3b7)](_0x13b389){const _0x467bfd=_0xac088e;let {scene:_0x1f8fa4}=this[_0x467bfd(0x3dd)];return this[_0x467bfd(0x31f)][_0x467bfd(0x2f0)]()['map'](_0xeb133c=>_0x1f8fa4[_0x467bfd(0x4a1)]((0x0,u[_0x467bfd(0x2ed)])(_0xeb133c)))['find'](_0x50ba9f=>_0x50ba9f instanceof U&&_0x50ba9f[_0x467bfd(0x206)](_0x13b389))??null;}[_0xac088e(0x412)](){const _0x41bce4=_0xac088e;this[_0x41bce4(0x38a)](this[_0x41bce4(0x31f)][_0x41bce4(0x22d)][_0x41bce4(0x43a)](_0x13996a=>{const _0x5afd50=_0x41bce4;if(_0x13996a[_0x5afd50(0x1ee)]===0x1){let _0x345127=_0x13996a[0x0],_0x2f21a7=this[_0x5afd50(0x31f)][_0x5afd50(0x331)](_0x345127);if((_0x2f21a7==null?void 0x0:_0x2f21a7[_0x5afd50(0x37c)])===o[_0x5afd50(0x440)][_0x5afd50(0x2bf)]){let _0x3d86ed=this[_0x5afd50(0x2a5)][_0x5afd50(0x40d)]();if((_0x3d86ed==null?void 0x0:_0x3d86ed['shapeId'])===_0x345127[_0x5afd50(0x270)]&&_0x3d86ed[_0x5afd50(0x416)])return;(0x0,i[_0x5afd50(0x471)])(this['_docsShapeService'][_0x5afd50(0x26d)](_0x345127[_0x5afd50(0x2e6)],_0x345127[_0x5afd50(0x390)],_0x345127['drawingId']))&&this[_0x5afd50(0x2a5)][_0x5afd50(0x49b)](null);}else this[_0x5afd50(0x2a5)]['completeEditing']();}else this[_0x5afd50(0x2a5)]['completeEditing']();})),this[_0x41bce4(0x38a)](this[_0x41bce4(0x31f)][_0x41bce4(0x356)]['subscribe'](_0x26b399=>{const _0x32b2f1=_0x41bce4;let _0x4a2dc1=this['_shapeTextEditingService'][_0x32b2f1(0x40d)]();_0x4a2dc1&&_0x26b399[_0x32b2f1(0x3f9)](_0x18fb6a=>_0x18fb6a[_0x32b2f1(0x270)]===_0x4a2dc1['shapeId'])&&this[_0x32b2f1(0x2a5)][_0x32b2f1(0x49b)](null);}));}[_0xac088e(0x422)](){const _0x31f5e0=_0xac088e;this[_0x31f5e0(0x38a)](this['_shapeTextEditingService'][_0x31f5e0(0x2f7)]['subscribe'](_0x25f7ad=>{const _0x4d90b2=_0x31f5e0;(_0x25f7ad==null?void 0x0:_0x25f7ad['visible'])===!0x0&&_0x25f7ad['unitId']===this[_0x4d90b2(0x3dd)][_0x4d90b2(0x2e6)]?this['_layoutInteraction']??=this['_docLayoutInteractionService'][_0x4d90b2(0x387)]():this['_endLayoutInteraction']();let {scene:_0x4bb899}=this[_0x4d90b2(0x3dd)];if(this[_0x4d90b2(0x4dc)]){let _0x3ca72c=_0x4bb899[_0x4d90b2(0x4a1)](this[_0x4d90b2(0x4dc)]);_0x3ca72c&&_0x3ca72c[_0x4d90b2(0x49b)](!0x1);}if(_0x25f7ad){let _0x45c5bb=!!_0x25f7ad[_0x4d90b2(0x416)],_0x419b00=_0x4bb899[_0x4d90b2(0x4a1)](_0x25f7ad[_0x4d90b2(0x22c)]);_0x419b00&&(_0x419b00[_0x4d90b2(0x49b)](_0x45c5bb),this[_0x4d90b2(0x4dc)]=_0x25f7ad['shapeKey']);}else this['_lastEditingShapeKey']=null;}));}[_0xac088e(0x2d4)](){const _0x411a51=_0xac088e;var _0x34f205;(_0x34f205=this[_0x411a51(0x2e5)])==null||_0x34f205[_0x411a51(0x45f)](),this['_layoutInteraction']=null;}};It=I([F(0x1,(0x0,o['Inject'])(G)),F(0x2,u[_0xac088e(0x4ba)]),F(0x3,(0x0,o[_0xac088e(0x383)])(t['DocLayoutInteractionService'])),F(0x4,(0x0,o[_0xac088e(0x383)])(r['DocsShapeService']))],It);let Lt=class extends e[_0xac088e(0x365)]{constructor(_0x542869,_0x4103ac,_0x4b0dec,_0x1d4910,_0x5d426b,_0x49305c,_0x12df86,_0x2b480a,_0x1d0b4b,_0x1cc65c){super(_0x542869,_0x4103ac,_0x4b0dec,_0x1d4910,_0x5d426b,_0x49305c,_0x12df86,_0x2b480a,_0x1d0b4b,_0x1cc65c,{'componentKey':O,'editorUnitId':D});}};Lt=I([F(0x1,(0x0,o[_0xac088e(0x383)])(s[_0xac088e(0x2db)])),F(0x2,(0x0,o[_0xac088e(0x383)])(t[_0xac088e(0x4c6)])),F(0x3,(0x0,o[_0xac088e(0x383)])(t[_0xac088e(0x4c3)])),F(0x4,o[_0xac088e(0x2cf)]),F(0x5,(0x0,o[_0xac088e(0x383)])(t['DocEventManagerService'])),F(0x6,(0x0,o[_0xac088e(0x383)])(e['ShapeTextHyperLinkPopupService'])),F(0x7,(0x0,o[_0xac088e(0x383)])(s[_0xac088e(0x279)])),F(0x8,(0x0,o[_0xac088e(0x383)])(t[_0xac088e(0x3aa)])),F(0x9,(0x0,o[_0xac088e(0x383)])(G))],Lt);let Rt=class extends e[_0xac088e(0x32e)]{constructor(_0x2809db,_0x4b454e,_0xa0b5d7,_0x59ccb9,_0x42053b){const _0x23b183=_0xac088e;super(_0x2809db,_0x4b454e,{'editing$':_0xa0b5d7[_0x23b183(0x2f7)],'resolve':_0xc4ef0d=>{const _0x4cd5d6=_0x23b183;var _0x48e3a9;let _0xf19f60=new l[(_0x4cd5d6(0x3c6))](_0xc4ef0d[_0x4cd5d6(0x36d)],_0xc4ef0d[_0x4cd5d6(0x25d)]),_0x57bdd9=((_0x48e3a9=_0x2809db[_0x4cd5d6(0x4cc)][_0x4cd5d6(0x4ca)](_0xf19f60))==null?void 0x0:_0x48e3a9['transformVector2SceneCoord'](_0xf19f60))??_0xf19f60,_0x313543=(0x0,e[_0x4cd5d6(0x395)])(_0x2809db[_0x4cd5d6(0x4cc)][_0x4cd5d6(0x41b)](_0xf19f60)??null,_0x57bdd9);if(!(_0x313543 instanceof U))return null;let _0x5aa630=_0x313543[_0x4cd5d6(0x287)](_0x57bdd9);if(!_0x5aa630)return null;let _0x16f08c=_0x313543,_0x44e3bd={'componentKey':e[_0x4cd5d6(0x2b9)][_0x4cd5d6(0x507)],'direction':_0x4cd5d6(0x238),'offset':[0x0,0xa],'onClickOutside':()=>_0x4b454e[_0x4cd5d6(0x237)]()};return{'object':_0x313543,'info':{..._0x5aa630,'unitId':_0x313543[_0x4cd5d6(0x2e6)],'subUnitId':_0x313543['subUnitId'],'shapeKey':_0x313543[_0x4cd5d6(0x299)],'readonly':!0x0,'copyable':(0x0,s[_0x4cd5d6(0x438)])(_0x42053b,_0x313543['unitId'],_0x313543[_0x4cd5d6(0x2e6)],y['UnitAction'][_0x4cd5d6(0x4b5)])},'attachPopup':()=>_0x59ccb9[_0x4cd5d6(0x33e)](_0x16f08c,_0x44e3bd,_0x16f08c[_0x4cd5d6(0x2e6)])};}});}};Rt=I([F(0x1,(0x0,o[_0xac088e(0x383)])(e[_0xac088e(0x4dd)])),F(0x2,(0x0,o[_0xac088e(0x383)])(G)),F(0x3,(0x0,o['Inject'])(t[_0xac088e(0x4c6)])),F(0x4,o['IPermissionService'])],Rt);let zt=class extends o['Disposable']{constructor(_0x3bc92f,_0x33c387,_0x5f9b3e,_0x469771,_0x5be8c9,_0x91664d,_0x5bb4a7,_0x3fac82,_0x4bddaa,_0x585664,_0x4e652d,_0x53305d){const _0x1246a7=_0xac088e;super(),this[_0x1246a7(0x278)]=_0x3bc92f,this[_0x1246a7(0x2f1)]=_0x33c387,this['_menuManagerService']=_0x5f9b3e,this[_0x1246a7(0x446)]=_0x469771,this[_0x1246a7(0x4b3)]=_0x5be8c9,this[_0x1246a7(0x483)]=_0x91664d,this[_0x1246a7(0x31f)]=_0x5bb4a7,this[_0x1246a7(0x430)]=_0x3fac82,this[_0x1246a7(0x2a7)]=_0x4bddaa,this['_contextService']=_0x585664,this[_0x1246a7(0x2a5)]=_0x4e652d,this[_0x1246a7(0x462)]=_0x53305d,H(this,_0x1246a7(0x2d1),null),H(this,_0x1246a7(0x362),null),H(this,_0x1246a7(0x402),!0x1),H(this,_0x1246a7(0x3e1),0x0),H(this,'_disposePopupsByUnit',new Map()),H(this,'_popupTargetKeys',new Map()),this[_0x1246a7(0x223)](),this[_0x1246a7(0x38a)](this[_0x1246a7(0x278)][_0x1246a7(0x2fa)](o[_0x1246a7(0x230)][_0x1246a7(0x2ba)])['subscribe'](_0x45ef7b=>{const _0x4efd2c=_0x1246a7;if(!_0x45ef7b){var _0x515be8;(_0x515be8=this[_0x4efd2c(0x2d1)])==null||_0x515be8['dispose']();}})),this['_registerOperations'](),this[_0x1246a7(0x38a)](this[_0x1246a7(0x31f)]['remove$'][_0x1246a7(0x43a)](_0x45a6ba=>{const _0x4c110d=_0x1246a7;for(let _0x1cff7c of _0x45a6ba){let _0x36ad7e=_0x1cff7c['unitId']+':'+_0x1cff7c[_0x4c110d(0x390)]+':'+_0x1cff7c['drawingId'];for(let [_0x199c04,_0x353369]of this[_0x4c110d(0x31a)])_0x353369===_0x36ad7e&&this[_0x4c110d(0x21f)](_0x199c04,!0x0);}})),this['disposeWithMe']((0x0,e[_0x1246a7(0x3a8)])(this[_0x1246a7(0x2a7)],o[_0x1246a7(0x230)][_0x1246a7(0x2ba)],_0x1a0e56=>this[_0x1246a7(0x2bb)](_0x1a0e56))),this['disposeWithMe'](this['_shapeTextEditingService']['editingParams$'][_0x1246a7(0x43a)](_0x552e04=>{const _0x1de5e0=_0x1246a7;_0x552e04&&this[_0x1de5e0(0x21f)](void 0x0,!0x0);})),this[_0x1246a7(0x38a)](this[_0x1246a7(0x462)][_0x1246a7(0x4fe)][_0x1246a7(0x43a)](()=>{const _0x5c20d6=_0x1246a7;this[_0x5c20d6(0x31f)][_0x5c20d6(0x2f0)]()[_0x5c20d6(0x3f9)](_0xc2255e=>_0xc2255e[_0x5c20d6(0x37c)]===o['DrawingTypeEnum'][_0x5c20d6(0x2bf)]&&this[_0x5c20d6(0x278)][_0x5c20d6(0x24e)](_0xc2255e['unitId'])===o['UniverInstanceType'][_0x5c20d6(0x2ba)]&&!this[_0x5c20d6(0x2a6)](_0xc2255e[_0x5c20d6(0x2e6)],_0xc2255e[_0x5c20d6(0x270)]))&&(this['_clearPopups'](void 0x0,!0x0),this[_0x5c20d6(0x3ee)]());}));}[_0xac088e(0x223)](){const _0xaaab27=_0xac088e;this[_0xaaab27(0x1da)][_0xaaab27(0x284)](Qe);}['getShapePopupMenus'](_0x2c8ac8,_0xd1a658,_0x1a9a9b,_0x1621a3){const _0x56b772=_0xac088e;return[{'label':'docs-shape-ui.openPanel','index':0x0,'commandId':j['id'],'commandParams':{'unitId':_0x2c8ac8,'subUnitId':_0xd1a658,'drawingId':_0x1a9a9b},'disable':_0x1621a3===o['DrawingTypeEnum'][_0x56b772(0x3ac)]},{'label':_0x56b772(0x2a9),'index':0x1,'commandId':c['RemoveDocDrawingCommand']['id'],'commandParams':{'unitId':_0x2c8ac8,'drawings':[{'unitId':_0x2c8ac8,'subUnitId':_0xd1a658,'drawingId':_0x1a9a9b}]},'disable':!0x1},{'label':_0x56b772(0x2ae),'index':0x2,'commandId':B['id'],'commandParams':{'unitId':_0x2c8ac8,'subUnitId':_0xd1a658,'drawingId':_0x1a9a9b},'disable':!0x1}];}[_0xac088e(0x2f6)](_0x2b0a32,_0x5ea5c5,_0x11432e){const _0x371445=_0xac088e;let _0x5f469f=this[_0x371445(0x446)][_0x371445(0x3c2)](_0x2b0a32,_0x5ea5c5,_0x11432e),_0x3d2a72=this['_docsShapeService'][_0x371445(0x4d8)](_0x2b0a32,_0x5ea5c5,_0x11432e);return _0x5f469f!==void 0x0&&_0x3d2a72!==void 0x0?{'shapeData':_0x3d2a72,'shapeId':_0x11432e,'shapeType':_0x5f469f,'unitId':_0x2b0a32,'subUnitId':_0x5ea5c5,'version':this[_0x371445(0x3e1)],'disableShapeOption':!0x1}:null;}['_clearPopups'](_0xd240b3,_0x3ee204=!0x1){const _0x520bc2=_0xac088e;if(_0xd240b3==null){[...this[_0x520bc2(0x268)]['keys']()][_0x520bc2(0x3ca)](_0x589a70=>this[_0x520bc2(0x21f)](_0x589a70,_0x3ee204));return;}let _0x281a48=this['_disposePopupsByUnit'][_0x520bc2(0x314)](_0xd240b3);if(_0x281a48){for(let _0x40ed56=_0x281a48[_0x520bc2(0x1ee)]-0x1;_0x40ed56>=0x0;--_0x40ed56){let _0x501702=_0x281a48[_0x40ed56];(_0x3ee204||_0x501702[_0x520bc2(0x313)]())&&(_0x501702[_0x520bc2(0x45f)](),_0x281a48[_0x520bc2(0x363)](_0x40ed56,0x1));}_0x281a48['length']===0x0&&(this[_0x520bc2(0x268)][_0x520bc2(0x488)](_0xd240b3),this[_0x520bc2(0x31a)]['delete'](_0xd240b3));}}[_0xac088e(0x4e8)](_0x203c8a){const _0x5a1612=_0xac088e;let _0x5df69=this[_0x5a1612(0x268)][_0x5a1612(0x314)](_0x203c8a);if(_0x5df69)return _0x5df69;let _0x2d1632=[];return this[_0x5a1612(0x268)]['set'](_0x203c8a,_0x2d1632),_0x2d1632;}[_0xac088e(0x2bb)](_0x294735){const _0x4eace1=_0xac088e;var _0x4922c4;let _0x31f62d=new o[(_0x4eace1(0x3f3))](),_0x54319c=(_0x4922c4=this[_0x4eace1(0x2a7)][_0x4eace1(0x254)](o['UniverInstanceType'][_0x4eace1(0x2ba)])['find'](_0x5404e4=>_0x5404e4[_0x4eace1(0x4cc)]['getTransformerByCreate']()===_0x294735))==null?void 0x0:_0x4922c4[_0x4eace1(0x2e6)];return _0x54319c&&(_0x31f62d[_0x4eace1(0x3b0)](_0x294735[_0x4eace1(0x385)][_0x4eace1(0x43a)](()=>this[_0x4eace1(0x2fb)](_0x294735,_0x54319c))),_0x31f62d['add'](_0x294735[_0x4eace1(0x455)]['subscribe'](()=>{const _0x38f4b2=_0x4eace1;this[_0x38f4b2(0x21f)](_0x54319c),queueMicrotask(()=>{const _0x536ccd=_0x38f4b2;_0x294735[_0x536ccd(0x3a3)]()['size']>0x0||!this[_0x536ccd(0x31f)][_0x536ccd(0x2f0)]()['some'](_0x1f2e8f=>_0x1f2e8f[_0x536ccd(0x2e6)]===_0x54319c)||(this[_0x536ccd(0x444)][_0x536ccd(0x283)](o[_0x536ccd(0x24d)],!0x1),this[_0x536ccd(0x31f)]['focusDrawing'](null));});})),_0x31f62d['add'](_0x294735[_0x4eace1(0x43f)]['subscribe'](()=>{const _0x4b21e6=_0x4eace1;this[_0x4b21e6(0x21f)](_0x54319c,!0x0);}))),_0x31f62d;}['_handleCreateControl'](_0xaef75,_0xd09541){const _0x44ef22=_0xac088e;let _0x17b9c9=_0xaef75[_0x44ef22(0x3a3)]();if(this[_0x44ef22(0x402)]){this['_clearPopups'](_0xd09541,!0x0);return;}if(_0x17b9c9[_0x44ef22(0x40c)]>0x1){this[_0x44ef22(0x21f)](_0xd09541);return;}let _0x115c39=_0x17b9c9[_0x44ef22(0x37f)]()[_0x44ef22(0x1f1)]()[_0x44ef22(0x201)];if(!_0x115c39){this['_clearPopups'](_0xd09541);return;}let _0x2c9131=this[_0x44ef22(0x31f)][_0x44ef22(0x496)](_0x115c39[_0x44ef22(0x299)]);if(!_0x2c9131||_0x2c9131[_0x44ef22(0x37c)]!==o[_0x44ef22(0x440)][_0x44ef22(0x2bf)]){this[_0x44ef22(0x21f)](_0xd09541);return;}let {unitId:_0x3a5b1d,subUnitId:_0x15b9f1,drawingId:_0x1dda84,drawingType:_0x53dacd}=_0x2c9131;if(!this['_canEditShape'](_0x3a5b1d,_0x1dda84)){this['_clearPopups'](_0xd09541,!0x0);return;}let _0x26f09a=this[_0x44ef22(0x2f6)](_0x3a5b1d,_0x15b9f1,_0x1dda84);if(!_0x26f09a){this['_clearPopups'](_0xd09541);return;}let _0x5d4683=this[_0x44ef22(0x268)][_0x44ef22(0x314)](_0xd09541),_0xdfc601=_0x3a5b1d+':'+_0x15b9f1+':'+_0x1dda84;if(this[_0x44ef22(0x31a)][_0x44ef22(0x314)](_0xd09541)===_0xdfc601&&_0x5d4683&&_0x5d4683[_0x44ef22(0x1ee)]>0x0)return;this[_0x44ef22(0x21f)](_0xd09541);let _0x43df7d=this[_0x44ef22(0x2a7)][_0x44ef22(0x4bd)](_0x3a5b1d),_0x4f472a=((_0x43df7d==null?void 0x0:_0x43df7d[_0x44ef22(0x4fa)])===!0x1?_0x43df7d[_0x44ef22(0x3e6)](t['DocCanvasPopManagerService']):this['_docCanvasPopManagerService'])[_0x44ef22(0x33e)](_0x115c39,this[_0x44ef22(0x37a)](_0x26f09a,_0x53dacd),_0x3a5b1d);this['disposeWithMe'](_0x4f472a),this[_0x44ef22(0x4e8)](_0xd09541)[_0x44ef22(0x474)](_0x4f472a),this['_popupTargetKeys'][_0x44ef22(0x373)](_0xd09541,_0xdfc601),this['_drawingManagerService'][_0x44ef22(0x2f0)]()[_0x44ef22(0x3f9)](_0x2dc3fe=>_0x2dc3fe[_0x44ef22(0x2e6)]===_0x3a5b1d&&_0x2dc3fe['subUnitId']===_0x15b9f1&&_0x2dc3fe['drawingId']===_0x1dda84)||this[_0x44ef22(0x31f)][_0x44ef22(0x2c7)]([{'unitId':_0x3a5b1d,'subUnitId':_0x15b9f1,'drawingId':_0x1dda84}]);}[_0xac088e(0x37a)](_0x402e7e,_0x4a6a3e){const _0x2def86=_0xac088e;return{'componentKey':xt,'requiresStableLayout':!0x1,'direction':_0x2def86(0x4af),'offset':[0x0,e['SHEET_DOC_SHAPE_FLOATING_TOOLBAR_TOP_OFFSET']],'extraProps':{'unitId':_0x402e7e[_0x2def86(0x2e6)],'subUnitId':_0x402e7e[_0x2def86(0x390)],'drawingId':_0x402e7e[_0x2def86(0x25f)],'drawingType':_0x4a6a3e,'shapeType':_0x402e7e[_0x2def86(0x492)],'shapeData':_0x402e7e[_0x2def86(0x485)]}};}[_0xac088e(0x2a6)](_0x134a9c,_0x397ca1){const _0x56e30e=_0xac088e;let _0x492382=this[_0x56e30e(0x278)][_0x56e30e(0x2cc)](_0x134a9c,o['UniverInstanceType'][_0x56e30e(0x2ba)]);if(!_0x492382)return!0x1;let _0x474a07=(0x0,s['getDocumentDrawingSegmentId'])(_0x492382,_0x397ca1);return(0x0,s[_0x56e30e(0x376)])(this[_0x56e30e(0x462)],_0x134a9c,[...(0x0,s['getDocumentEntityParentPermissionObjectIds'])(_0x492382,_0x474a07,_0x56e30e(0x1e4),_0x397ca1),(0x0,s[_0x56e30e(0x1fe)])(_0x474a07,_0x56e30e(0x1e4),_0x397ca1)]);}['_registerOperations'](){const _0x535bb2=_0xac088e;this[_0x535bb2(0x38a)](this['_commandService'][_0x535bb2(0x25e)](_0x3ddc95=>{const _0x10741d=_0x535bb2;if(_0x3ddc95['id']===j['id']){let {unitId:_0x182eb8,subUnitId:_0x47c08e,drawingId:_0xed68a9}=_0x3ddc95['params'];this[_0x10741d(0x3e1)]+=0x1,this[_0x10741d(0x362)]=this['_getShapeInfo'](_0x182eb8,_0x47c08e,_0xed68a9),this[_0x10741d(0x21f)](void 0x0,!0x0),this['_openShapeEditPanel']();}if(_0x3ddc95['id']===B['id']&&(this[_0x10741d(0x362)]=null,this[_0x10741d(0x3ee)]()),_0x3ddc95['id']===r['UpdateDocShapeDataMutation']['id']){let {unitId:_0x1e5ee7,shapeId:_0x13214b}=_0x3ddc95[_0x10741d(0x359)];if(this[_0x10741d(0x362)]&&this[_0x10741d(0x362)]['shapeId']===_0x13214b){let _0x229caa=this[_0x10741d(0x2f6)](_0x1e5ee7,this['_activeShapeInfo']['subUnitId'],_0x13214b);_0x229caa&&(this[_0x10741d(0x3e1)]+=0x1,_0x229caa[_0x10741d(0x3b8)]=this['_shapeEditPanelVersion'],this[_0x10741d(0x362)]=_0x229caa,this['_isOpenedShapeEditPanel']&&this[_0x10741d(0x227)]());}}})),this[_0x535bb2(0x38a)](this[_0x535bb2(0x31f)][_0x535bb2(0x22d)][_0x535bb2(0x43a)](_0x139954=>{const _0xf624da=_0x535bb2;if(this[_0xf624da(0x402)]===!0x1)return;if(_0x139954[_0xf624da(0x1ee)]===0x0){this[_0xf624da(0x362)]=null,this[_0xf624da(0x3ee)]();return;}if(_0x139954[_0xf624da(0x1ee)]===0x1&&_0x139954[0x0]['drawingType']===o['DrawingTypeEnum']['DRAWING_SHAPE']&&(this[_0xf624da(0x3e1)]+=0x1,this['_activeShapeInfo']=this['_getShapeInfo'](_0x139954[0x0]['unitId'],_0x139954[0x0][_0xf624da(0x390)],_0x139954[0x0]['drawingId']),this['_activeShapeInfo'])){this[_0xf624da(0x227)]();return;}let _0x5aa8bb=_0x139954['filter'](_0x5abc54=>_0x5abc54[_0xf624da(0x37c)]===o[_0xf624da(0x440)][_0xf624da(0x2bf)]);if(_0x139954[_0xf624da(0x1ee)]>0x1&&_0x5aa8bb[_0xf624da(0x1ee)]===_0x139954[_0xf624da(0x1ee)]){if(this[_0xf624da(0x3e1)]+=0x1,this[_0xf624da(0x362)]=this[_0xf624da(0x2f6)](_0x139954[0x0]['unitId'],_0x139954[0x0]['subUnitId'],_0x139954[0x0][_0xf624da(0x270)]),this[_0xf624da(0x362)]){this['_openShapeEditPanel']();return;}}else{if(this[_0xf624da(0x3e1)]+=0x1,this[_0xf624da(0x362)]=this[_0xf624da(0x2f6)](_0x139954[0x0]['unitId'],_0x139954[0x0][_0xf624da(0x390)],_0x139954[0x0][_0xf624da(0x270)]),this[_0xf624da(0x362)]){this[_0xf624da(0x362)]['disableShapeOption']=!0x0,this[_0xf624da(0x227)]();return;}}this['_closeShapeEditPanel']();}));}[_0xac088e(0x227)](){const _0x4d8b7=_0xac088e;this['_activeShapeInfo']&&(this[_0x4d8b7(0x2d1)]=this[_0x4d8b7(0x2f1)][_0x4d8b7(0x487)]({'id':w,'header':{'title':this[_0x4d8b7(0x4b3)]['t'](_0x4d8b7(0x394))},'width':0x184,'children':{'label':w,...this['_activeShapeInfo']},'onClose':()=>{const _0x10e109=_0x4d8b7;this[_0x10e109(0x31f)]['focusDrawing'](null),this['_contextService'][_0x10e109(0x283)](o['FOCUSING_COMMON_DRAWINGS'],!0x1),this[_0x10e109(0x2d1)]=null;}}),this[_0x4d8b7(0x402)]=!0x0);}[_0xac088e(0x3ee)](){const _0x349883=_0xac088e;this[_0x349883(0x402)]=!0x1,this[_0x349883(0x2f1)][_0x349883(0x411)](w),this[_0x349883(0x2d1)]=null,this[_0x349883(0x444)][_0x349883(0x283)](o[_0x349883(0x24d)],!0x1),this[_0x349883(0x31f)][_0x349883(0x2c7)](null);}};zt=I([F(0x0,o[_0xac088e(0x257)]),F(0x1,(0x0,o[_0xac088e(0x383)])(n[_0xac088e(0x309)])),F(0x2,n[_0xac088e(0x220)]),F(0x3,(0x0,o['Inject'])(r[_0xac088e(0x326)])),F(0x4,(0x0,o[_0xac088e(0x383)])(o[_0xac088e(0x2e2)])),F(0x5,o[_0xac088e(0x2cf)]),F(0x6,u[_0xac088e(0x4ba)]),F(0x7,(0x0,o[_0xac088e(0x383)])(t['DocCanvasPopManagerService'])),F(0x8,l[_0xac088e(0x1f4)]),F(0x9,o[_0xac088e(0x486)]),F(0xa,(0x0,o[_0xac088e(0x383)])(G)),F(0xb,o[_0xac088e(0x23e)])],zt);let Bt=class extends o['Disposable']{constructor(_0x9d874e,_0x29235f){const _0x190be8=_0xac088e;super(),this[_0x190be8(0x446)]=_0x9d874e,this[_0x190be8(0x4b3)]=_0x29235f,this[_0x190be8(0x38a)]((0x0,o['toDisposable'])((0x0,l[_0x190be8(0x4d7)])((_0x4f290a,_0xcf6387,_0x5ab2a7)=>this[_0x190be8(0x203)](_0x4f290a,_0xcf6387,_0x5ab2a7))));}[_0xac088e(0x203)](_0x337009,_0x5af14b,_0x4d6b1d){const _0x3a20e4=_0xac088e;let _0x52031c=this[_0x3a20e4(0x446)][_0x3a20e4(0x3a7)](_0x337009,_0x5af14b);if(!_0x52031c)return null;let _0x35653a=_0x52031c[_0x3a20e4(0x296)](),_0x4ad631=(0x0,i[_0x3a20e4(0x3a6)])(_0x35653a),_0xad8858=_0x35653a[_0x3a20e4(0x4bb)];if(!_0xad8858||_0x4ad631[_0x3a20e4(0x2be)]!==i[_0x3a20e4(0x3fd)][_0x3a20e4(0x300)])return null;let _0x361e03=_0x4d6b1d[_0x3a20e4(0x351)],_0x8e7d54=_0x4d6b1d['fallbackHeight'];_0x52031c[_0x3a20e4(0x3c4)]({'width':_0x361e03,'height':_0x8e7d54});let _0x56a938=_0x52031c[_0x3a20e4(0x2e8)]({'left':0x0,'top':0x0,'width':_0x361e03,'height':_0x8e7d54}),_0x2c0aee=(0x0,e[_0x3a20e4(0x325)])(_0x3a20e4(0x1f9)in _0xad8858?_0xad8858[_0x3a20e4(0x1f9)]:void 0x0),_0x302723=(_0x2c0aee==null?void 0x0:_0x2c0aee[_0x3a20e4(0x340)])??(_0x3a20e4(0x21a)in _0xad8858?(0x0,e['plainShapeTextToDocumentData'])(_0xad8858,_0x5af14b+'-layout'):null);if(!_0x302723)return null;let _0x5d8abd=(0x0,e[_0x3a20e4(0x2ee)])({'documentData':_0x302723,'height':_0x8e7d54,'shapeData':_0x35653a,'textRect':_0x56a938,'width':_0x361e03,'widthBuffer':0x0});_0x5d8abd&&({width:_0x361e03,height:_0x8e7d54}=_0x5d8abd,_0x52031c[_0x3a20e4(0x3c4)]({'width':_0x361e03,'height':_0x8e7d54}),_0x56a938=_0x52031c[_0x3a20e4(0x2e8)]({'left':0x0,'top':0x0,'width':_0x361e03,'height':_0x8e7d54}));let _0x380fce=_0xad8858[_0x3a20e4(0x47f)]!==!0x1,_0x14d453=(0x0,e[_0x3a20e4(0x249)])(_0x302723,{'isHorizontal':_0x380fce,'textRect':_0x56a938,'verticalAlign':_0x2c0aee==null?void 0x0:_0x2c0aee['va'],'horizontalAlign':_0x2c0aee==null?void 0x0:_0x2c0aee['ha'],'wrapStrategy':(0x0,e[_0x3a20e4(0x25a)])(_0x35653a)}),_0x268d85=new o[(_0x3a20e4(0x24c))](_0x14d453),_0x3b8a83=new l[(_0x3a20e4(0x393))](_0x268d85),_0x124779=l[_0x3a20e4(0x3cb)][_0x3a20e4(0x506)](_0x3b8a83,this[_0x3a20e4(0x4b3)]);try{var _0x284ca0,_0x1e663e;_0x124779[_0x3a20e4(0x449)]();let _0x15d828=((_0x284ca0=_0x124779[_0x3a20e4(0x380)]())==null?void 0x0:_0x284ca0['pages'])??[],_0x2bf571=_0x15d828[_0x15d828[_0x3a20e4(0x1ee)]-0x1],_0xe4f0a=_0x2bf571?Math[_0x3a20e4(0x327)](0x0,((_0x1e663e=(0x0,l[_0x3a20e4(0x409)])(_0x2bf571))==null?void 0x0:_0x1e663e[_0x3a20e4(0x44f)])??0x0):0x0,_0x51e4db=_0x124779[_0x3a20e4(0x4b2)]()[_0x3a20e4(0x454)]+_0xe4f0a-(_0x380fce?_0x56a938['height']:_0x56a938[_0x3a20e4(0x4b0)]);return Number['isFinite'](_0x51e4db)?_0x380fce?{'width':_0x361e03,'height':Math[_0x3a20e4(0x327)](0x1,_0x8e7d54+_0x51e4db)}:{'width':Math['max'](0x1,_0x361e03+_0x51e4db),'height':_0x8e7d54}:null;}finally{_0x124779['dispose'](),_0x3b8a83[_0x3a20e4(0x45f)](),_0x268d85['dispose']();}}};Bt=I([F(0x0,(0x0,o[_0xac088e(0x383)])(r[_0xac088e(0x326)])),F(0x1,(0x0,o[_0xac088e(0x383)])(o[_0xac088e(0x2e2)]))],Bt);let $=class extends o['Plugin']{constructor(_0x320f07=nt,_0x148883,_0x27416e,_0x17b277,_0x4c6c68){const _0x2bf191=_0xac088e;super(),this[_0x2bf191(0x397)]=_0x320f07,this['_injector']=_0x148883,this[_0x2bf191(0x483)]=_0x27416e,this['_configService']=_0x17b277,this[_0x2bf191(0x2a7)]=_0x4c6c68;let {menu:_0x3605db,..._0x52f54c}=(0x0,o['merge'])({},nt,this[_0x2bf191(0x397)]);_0x3605db&&this[_0x2bf191(0x3e9)][_0x2bf191(0x472)](_0x2bf191(0x4e5),_0x3605db,{'merge':!0x0}),this['_configService'][_0x2bf191(0x472)](tt,_0x52f54c),this[_0x2bf191(0x503)]();}['onStarting'](){const _0x5d39ec=_0xac088e;(0x0,o['registerDependencies'])(this['_injector'],this['_getDependencies']()),this['_injector'][_0x5d39ec(0x314)](jt),this[_0x5d39ec(0x31d)]();}[_0xac088e(0x36e)](){return[[jt],[zt],[Z],[K],[q],[W],[L],[J],[Bt],[G],[X]];}['onReady'](){const _0x595c55=_0xac088e;this[_0x595c55(0x30d)]()[_0x595c55(0x3ca)](_0xf0391f=>{const _0x487c79=_0x595c55;this[_0x487c79(0x38a)](this['_renderManagerService']['registerRenderModule'](o[_0x487c79(0x230)][_0x487c79(0x2ba)],_0xf0391f));}),(0x0,o[_0x595c55(0x20f)])(this['_injector'],[[zt],[Z],[K],[q],[L],[J],[Bt],[G],[X]]);}['_getRenderModules'](){return[[W],[It],[Rt],[Mt]];}['onRendered'](){const _0x1115e9=_0xac088e;this[_0x1115e9(0x38a)](this[_0x1115e9(0x2a7)][_0x1115e9(0x447)](o[_0x1115e9(0x230)]['UNIVER_DOC'],[Lt]));}['_initCommands'](){const _0x49c221=_0xac088e;[C,B,j,A,N,P][_0x49c221(0x3ca)](_0x2ea379=>this[_0x49c221(0x38a)](this[_0x49c221(0x483)][_0x49c221(0x469)](_0x2ea379)));}[_0xac088e(0x31d)](){const _0x3532b2=_0xac088e;let _0x334927=this[_0x3532b2(0x4d9)],_0x346d5d=_0x334927[_0x3532b2(0x314)](n[_0x3532b2(0x328)]);this[_0x3532b2(0x38a)](_0x346d5d[_0x3532b2(0x30e)](n[_0x3532b2(0x1ec)]['CONTENT'],()=>(0x0,n[_0x3532b2(0x493)])(Dt,_0x334927)));}};H($,_0xac088e(0x348),o[_0xac088e(0x230)][_0xac088e(0x2ba)]),H($,'pluginName',_0xac088e(0x2c0)),H($,_0xac088e(0x3b6),$e),H($,'version',et),$=I([(0x0,o[_0xac088e(0x3a2)])(m['UniverLicensePlugin'],s[_0xac088e(0x316)],u['UniverDrawingPlugin'],d[_0xac088e(0x324)],l[_0xac088e(0x22e)],t['UniverDocsUIPlugin'],a[_0xac088e(0x240)],h['UniverDocsDrawingUIPlugin'],r[_0xac088e(0x47e)],e['UniverShapeEditorUIPlugin']),F(0x1,(0x0,o[_0xac088e(0x383)])(o[_0xac088e(0x431)])),F(0x2,o[_0xac088e(0x2cf)]),F(0x3,o[_0xac088e(0x4a8)]),F(0x4,l['IRenderManagerService'])],$),exports[_0xac088e(0x435)]=Qe,Object[_0xac088e(0x2e7)](exports,_0xac088e(0x30f),{'enumerable':!0x0,'get':function(){return Q;}}),Object['defineProperty'](exports,_0xac088e(0x3fa),{'enumerable':!0x0,'get':function(){return $;}});
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("@univerjs-pro/shape-editor-ui"),t=require("@univerjs/docs-ui"),n=require("@univerjs/ui"),r=require("@univerjs-pro/docs-shape"),i=require("@univerjs-pro/engine-shape"),a=require("@univerjs-pro/shape-editor"),o=require("@univerjs/core"),s=require("@univerjs/docs"),c=require("@univerjs/docs-drawing"),l=require("@univerjs/engine-render"),u=require("@univerjs/drawing"),d=require("@univerjs/drawing-ui"),f=require("react/jsx-runtime"),p=require("rxjs"),m=require("@univerjs-pro/license"),h=require("@univerjs/docs-drawing-ui"),g=require("@univerjs/icons"),_=require("@univerjs/design"),v=require("react"),y=require("@univerjs/protocol");function b(e,t){if(t){if((0,i.isConnectorShape)(e)&&(t.startArrow||t.endArrow))return{ln:{startArrow:t.startArrow?{type:i.ShapeArrowTypeEnum.Arrow,size:i.ShapeArrowSizeEnum.Medium}:void 0,endArrow:t.endArrow?{type:i.ShapeArrowTypeEnum.Arrow,size:i.ShapeArrowSizeEnum.Large}:void 0}};if(e===i.ShapeTypeEnum.Rect&&(t.horizontal||t.vertical))return(0,a.createShapeTextBoxShapeData)({fill:{fillType:i.ShapeFillEnum.SolidFill,color:`#3B82F6`},isHorizontal:!!t.horizontal,stroke:{lineStrokeType:i.ShapeLineTypeEnum.SolidLine,width:1,color:`#2563EB`}})}}function x(e,t){var n;let i=t.segmentId??``,a=(n=e.getSelfOrHeaderFooterModel(i))==null?void 0:n.getBody();if(!a)return null;let s=a.paragraphs??[],c=s.find(e=>{let n=(0,o.getParagraphContentStartOffset)(a,e);return t.startOffset>=n&&t.startOffset<=e.startIndex})??s[s.length-1];return c?{paragraphId:c.paragraphId,segmentId:i,position:r.DocShapeAnchorPosition.OFFSET,offset:t.startOffset-(0,o.getParagraphContentStartOffset)(a,c)}:null}function S(e,n,r){var i,a;if(!r)return null;let o=(i=e.get(l.IRenderManagerService).getRenderUnitById(n))==null?void 0:i.with(t.DocParagraphMenuService).activeTarget;if(!o)return null;let s=r===`below`?{startOffset:o.moveRange.endOffset,endOffset:o.moveRange.endOffset}:o.menuRange;return{startOffset:s.startOffset,endOffset:s.endOffset,collapsed:s.startOffset===s.endOffset,segmentId:((a=o.paragraph)==null?void 0:a.segmentId)??``}}const C={type:o.CommandType.COMMAND,id:`doc.command.menu-insert-shape`,handler:async(e,t)=>{let n=e.get(o.IUniverInstanceService).getCurrentUnitOfType(o.UniverInstanceType.UNIVER_DOC);if(!n)return!1;let i=e.get(o.ICommandService),a=n.getUnitId(),l=t.shapeId??(0,o.generateRandomId)(),u=t.width??r.DEFAULT_DOC_SHAPE_WIDTH,d=t.height??r.DEFAULT_DOC_SHAPE_HEIGHT,f=t.shapeData??b(t.value,t.enhanceParams),p=S(e,a,t.paragraphMenuPlacement)??e.get(s.DocSelectionManagerService).getActiveTextRange();if(!p)return!1;let m=x(n,p);return m?!!i.syncExecuteCommand(r.InsertDocShapeCommand.id,{unitId:a,shapeId:l,shapeType:t.value,shapeData:f,transform:{width:u,height:d},placement:{wrappingStyle:c.TextWrappingStyle.INLINE,anchor:m}}):!1}},w=`doc.shape.edit.panel`,T=`docs-shape-ui.ribbon.shape-format`,E=`doc.shape.object-list.panel`,D=(0,o.createInternalEditorID)(`SHAPE_TEXT`),O=`doc.shape.text.float-menu`,k=`DocsShapeTextEditorContainer`,A={id:`doc.operation.open-shape-object-list-panel`,type:o.CommandType.COMMAND,handler:(e,t)=>{let r=e.get(n.ISidebarService),i=e.get(o.LocaleService),a=e.get(u.IDrawingManagerService);return(t==null?void 0:t.value)===`close`?(r.close(E),!0):(r.open({id:E,header:{title:i.t(`docs-shape-ui.objectListPanel.title`)},children:{label:E},onClose:()=>{a.focusDrawing(null)},width:360}),!0)}},j={type:o.CommandType.OPERATION,id:`doc.operation.open-doc-shape-format-panel`,handler(){return!0}};function M(e){let t=e.get(u.IDrawingManagerService).getFocusDrawings(),n=t.length===1?t[0]:null;if(!n||n.drawingType!==o.DrawingTypeEnum.DRAWING_SHAPE)return null;let i=e.get(r.DocsShapeService),a=i.getShapeTypeById(n.unitId,n.subUnitId,n.drawingId),s=i.getShapeDataById(n.unitId,n.subUnitId,n.drawingId);return a===void 0||!s?null:{drawing:n,shapeData:s,shapeType:a}}const N={id:`doc.operation.apply-shape-quick-style`,type:o.CommandType.OPERATION,handler:(e,t)=>{let n=M(e),i=(0,a.getShapeQuickStylePreset)((t==null?void 0:t.presetId)??(t==null?void 0:t.value)??``);if(!n||!i||i.type!==(0,a.getShapeQuickStyleType)(n.shapeData))return!1;let s=(0,a.applyQuickStyleToShapeData)(n.shapeData,i);if(!s)return!1;let{drawing:c}=n;return e.get(o.ICommandService).executeCommand(r.UpdateDocShapeDataCommand.id,{unitId:c.unitId,shapeId:c.drawingId,shapeData:s,oldShapeJSON:{oldShapeData:n.shapeData}})}},P={id:`doc.operation.update-shape-type`,type:o.CommandType.OPERATION,handler:(e,t)=>{let n=M(e),s=(t==null?void 0:t.shapeType)??(t==null?void 0:t.value);if(!n||!s||(0,i.isConnectorShape)(n.shapeType)||(0,i.isConnectorShape)(s))return!1;let c=(0,a.cloneShapeDataForType)(n.shapeData,s);if(!c)return!1;let{drawing:l}=n;return e.get(o.ICommandService).executeCommand(r.UpdateDocShapeDataCommand.id,{unitId:l.unitId,shapeId:l.drawingId,shapeType:s,shapeData:c,replaceShapeData:!0,oldShapeJSON:{oldShapeType:n.shapeType,oldShapeData:n.shapeData}})}};function F(e,t){return function(n,r){t(n,r,e)}}function I(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}let L=class extends o.Disposable{constructor(e,t){super(),this._clipService=e,this._drawingManagerService=t,this._registerImageShapeClipDelegate(),this._clipService.setCanUseShapeClip(!0),this.disposeWithMe({dispose:()=>this._clipService.setCanUseShapeClip(!1)})}_registerImageShapeClipDelegate(){let e=/* @__PURE__ */ new Map,t=this._clipService.registerClipDelegate((t,n,r,a,o)=>{let s=n;if(s===i.ShapeTypeEnum.None||n===`custom`)return!1;try{let c=e.get(n);return c||(c=new i.ShapeModel(s,`clip-${n}`),e.set(n,c)),c.clearAdjustValue(),o&&Object.keys(o).length>0&&c.setShapeData({adjustValues:o},!0),c.updateContext({width:r,height:a}),c.buildClipPath(t,{left:0,top:0,width:r,height:a})}catch{return!1}});this.disposeWithMe(t),this.disposeWithMe({dispose:()=>e.clear()})}clipByShape(e,t,n,r,i){let a=this._drawingManagerService.getDrawingData(e,t)[n];a&&a.drawingType===o.DrawingTypeEnum.DRAWING_IMAGE&&this._drawingManagerService.featurePluginUpdateNotification([{...a,prstGeom:r,adjustValues:i}])}};L=I([F(0,(0,o.Inject)(d.DrawingImageClipService)),F(1,(0,o.Inject)(u.IDrawingManagerService))],L);const ee=`doc.shape.picker.component`,te=`doc.image-clip.shape-picker.component`;function ne({onShapeClick:t,excludeGroups:n}){return/* @__PURE__ */ (0,f.jsx)(e.ShapePickerPanel,{excludeGroups:n,onShapeClick:t,scrollContainer:`parent`})}function re(){let e=(0,n.useDependency)(u.IDrawingManagerService),t=(0,n.useDependency)(L);return n=>{let r=e.getFocusDrawings().find(e=>e.drawingType===o.DrawingTypeEnum.DRAWING_IMAGE);r&&t.clipByShape(r.unitId,r.subUnitId,r.drawingId,n.type)}}function ie(){let t=re();return/* @__PURE__ */ (0,f.jsx)(e.ShapePickerDropdown,{buttonLabel:`docs-shape-ui.crop.shape`,excludeGroups:[e.ShapeGroupEnum.Line],onShapeClick:t})}function ae(){let e=(0,n.useDependency)(n.ComponentManager),t=(0,n.useDependency)(u.IDrawingManagerService),r=(0,n.useDependency)(o.IUniverInstanceService),i=t.getFocusDrawings()[0],a=i?r.getUnitType(i.unitId):void 0,s=a===o.UniverInstanceType.UNIVER_DOC?te:a===o.UniverInstanceType.UNIVER_SHEET?`sheet.image-clip.shape-picker.component`:void 0,c=s?e.get(s):void 0;return c?/* @__PURE__ */ (0,f.jsx)(c,{}):null}function oe({paragraphMenuPlacement:e,PickerComponent:t=ne}){let r=(0,n.useDependency)(o.ICommandService);return/* @__PURE__ */ (0,f.jsx)(t,{onShapeClick:t=>{r.executeCommand(C.id,{paragraphMenuPlacement:e,value:t.type,enhanceParams:{endArrow:t.endArrow,startArrow:t.startArrow,horizontal:t.horizontal,vertical:t.vertical}})}})}function se(e){return t=>({id:C.id,type:n.MenuItemType.SELECTOR,selections:[{label:{name:ee,hoverable:!1,selectable:!1,props:e?{id:C.id,paragraphMenuPlacement:e}:{id:C.id}}}],icon:`ShapeIcon`,title:`docs-shape-ui.insertShape`,tooltip:`docs-shape-ui.insertShape`,hidden$:(0,n.getMenuHiddenObservable)(t,o.UniverInstanceType.UNIVER_DOC)})}const ce=se(),le=se(`below`),ue=se(`target`);function de(e){let t=e.get(n.ISidebarService);return{id:A.id,type:n.MenuItemType.BUTTON,icon:`ObjectLayersIcon`,title:`docs-shape-ui.objectListPanel.open`,tooltip:`docs-shape-ui.objectListPanel.open`,activated$:(0,p.defer)(()=>t.sidebarOptions$.pipe((0,p.startWith)(t.options),(0,p.map)(e=>e.visible===!0&&e.id===`doc.shape.object-list.panel`),(0,p.distinctUntilChanged)())),hidden$:(0,n.getMenuHiddenObservable)(e,o.UniverInstanceType.UNIVER_DOC)}}function R(e,t,n,i,a,o){let s={unitId:t,shapeId:i,shapeData:o,oldShapeJSON:a};return e.executeCommand(r.UpdateDocShapeDataCommand.id,s)}function fe(e,t,n,i,a,o){let s={unitId:t,shapeId:i,shapeData:o,oldShapeJSON:a};return e.executeCommand(r.UpdateDocShapeDataCommand.id,s)}const pe=`docs-shape-ui.shape-format.quick-style-gallery`,me=`docs-shape-ui.shape-format.style-ribbon-control`,he=`docs-shape-ui.shape-format.text-ribbon-control`,ge=`docs-shape-ui.shape-format.formula-ribbon-control`,_e=`docs-shape-ui.shape-format.wrapping-style-label`,ve=[{value:c.TextWrappingStyle.INLINE,label:`docs-shape-ui.textWrap.inline`,icon:`DocsShapeWrapInlineIcon`},{value:c.TextWrappingStyle.WRAP_SQUARE,label:`docs-shape-ui.textWrap.square`,icon:`DocsShapeWrapSquareIcon`},{value:c.TextWrappingStyle.WRAP_TOP_AND_BOTTOM,label:`docs-shape-ui.textWrap.topAndBottom`,icon:`DocsShapeWrapTopBottomIcon`},{value:c.TextWrappingStyle.BEHIND_TEXT,label:`docs-shape-ui.textWrap.behindText`,icon:`DocsShapeWrapBehindTextIcon`},{value:c.TextWrappingStyle.IN_FRONT_OF_TEXT,label:`docs-shape-ui.textWrap.inFrontText`,icon:`DocsShapeWrapInFrontOfTextIcon`}];function ye(){let e=(0,n.useDependency)(o.ICommandService),t=(0,n.useDependency)(u.IDrawingManagerService),i=(0,n.useDependency)(r.DocsShapeService),a=()=>{var e;let n=t.getFocusDrawings();if(n.length!==1||((e=n[0])==null?void 0:e.drawingType)!==o.DrawingTypeEnum.DRAWING_SHAPE)return null;let{unitId:r,subUnitId:a,drawingId:s}=n[0],c=i.getShapeTypeById(r,a,s),l=i.getShapeDataById(r,a,s);return c===void 0||!l?null:{unitId:r,subUnitId:a,drawingId:s,shapeType:c,shapeData:l}},s=(0,n.useObservable)(()=>new p.Observable(n=>{let i=()=>n.next(a()),o=t.focus$.subscribe(i),s=e.onCommandExecuted(e=>{e.id===r.UpdateDocShapeDataMutation.id&&i()});return i(),()=>{o.unsubscribe(),s.dispose()}}),a(),!1,[e,i,t]);return{selection:s,updateShapeData:t=>{s&&R(e,s.unitId,s.subUnitId,s.drawingId,{oldShapeData:s.shapeData},t)}}}function be(){let{selection:t,updateShapeData:n}=ye();return t?/* @__PURE__ */ (0,f.jsx)(e.ShapeStyleRibbonControl,{shapeData:t.shapeData,shapeType:t.shapeType,onUpdateShapeData:n}):null}function xe(){let t=(0,n.useDependency)(o.ICommandService),r=(0,n.useDependency)(o.LocaleService),{selection:i}=ye();return i?/* @__PURE__ */ (0,f.jsx)(e.ShapeQuickStyleGallery,{type:(0,a.getShapeQuickStyleType)(i.shapeData),ariaLabel:r.t(`docs-shape-ui.quickStyles`),activePresetId:(0,a.resolveActiveShapeQuickStylePresetId)(i.shapeData),onSelect:e=>t.executeCommand(N.id,{presetId:e})}):null}function Se(){let{selection:t,updateShapeData:n}=ye();return t?/* @__PURE__ */ (0,f.jsx)(e.ShapeTextRibbonControl,{fontFamilyPopupDataComponent:`docs-shape-format-font-family-menu`,shapeData:t.shapeData,onUpdateShapeData:n}):null}function Ce(){var t;let{selection:n,updateShapeData:r}=ye(),i=(0,e.useFormulaShapeToolbar)({hostType:o.UniverInstanceType.UNIVER_DOC,unitId:(n==null?void 0:n.unitId)??``,subUnitId:(n==null?void 0:n.subUnitId)??``,shapeId:(n==null?void 0:n.drawingId)??``,shapeData:n==null?void 0:n.shapeData,registerBinding:!1,showLabels:!0,dropdownSide:`bottom`,onUpdateBinding:e=>r({formulaBinding:e})}),a=((t=i.extensionGroups)==null?void 0:t.flatMap(e=>e.actions).filter(e=>e.visible!==!1))??[];return n!=null&&n.shapeData.formulaBinding?/* @__PURE__ */ (0,f.jsx)(e.ShapeFormulaRibbonControl,{actions:a,panel:i.panel}):null}function we({value:e}){let t=(0,n.useDependency)(o.LocaleService),r=ve.find(t=>t.value===e)??ve[0];return r?/* @__PURE__ */ (0,f.jsx)(`span`,{children:t.t(r.label)}):null}const Te=`docs-shape-ui.ribbon.shape-format.style-control`,Ee=`docs-shape-ui.ribbon.shape-format.text-control`,De=`docs-shape-ui.ribbon.shape-format.formula-control`,Oe=`docs-shape-ui.ribbon.shape-format.arrange-forward`,ke=`docs-shape-ui.ribbon.shape-format.arrange-backward`,Ae=`docs-shape-ui.ribbon.shape-format.arrange-front`,je=`docs-shape-ui.ribbon.shape-format.arrange-back`,Me=`docs-shape-ui.ribbon.shape-format.wrapping-style`;function Ne(e){let t=e.get(o.ICommandService),n=e.get(u.IDrawingManagerService),i=e.get(r.DocsShapeService);return new p.Observable(o=>{let s=()=>{let t=z(e),n=t?i.getShapeDataById(t.unitId,t.subUnitId,t.drawingId):null;o.next(n?(0,a.resolveActiveShapeQuickStylePresetId)(n)??``:``)},c=n.focus$.subscribe(s),l=t.onCommandExecuted(e=>{e.id===r.UpdateDocShapeDataMutation.id&&s()});return s(),()=>{c.unsubscribe(),l.dispose()}})}function z(e){var t;let n=e.get(u.IDrawingManagerService).getFocusDrawings();return n.length===1&&((t=n[0])==null?void 0:t.drawingType)===o.DrawingTypeEnum.DRAWING_SHAPE?n[0]:null}function Pe(e){return(e==null?void 0:e.layoutType)===o.PositionedObjectLayoutType.WRAP_NONE?e.behindDoc===o.BooleanNumber.TRUE?c.TextWrappingStyle.BEHIND_TEXT:c.TextWrappingStyle.IN_FRONT_OF_TEXT:(e==null?void 0:e.layoutType)===o.PositionedObjectLayoutType.WRAP_SQUARE?c.TextWrappingStyle.WRAP_SQUARE:(e==null?void 0:e.layoutType)===o.PositionedObjectLayoutType.WRAP_TOP_AND_BOTTOM?c.TextWrappingStyle.WRAP_TOP_AND_BOTTOM:c.TextWrappingStyle.INLINE}function Fe(e){let t=e.get(o.ICommandService),n=e.get(u.IDrawingManagerService),r=e.get(o.IUniverInstanceService);return new p.Observable(i=>{let a=()=>{var t;let n=z(e),a=n?r.getUnit(n.unitId,o.UniverInstanceType.UNIVER_DOC):void 0;i.next(Pe(n?a==null||(t=a.getSnapshot().drawings)==null?void 0:t[n.drawingId]:void 0))},c=n.focus$.subscribe(a),l=t.onCommandExecuted(e=>{e.id===s.RichTextEditingMutation.id&&a()});return a(),()=>{c.unsubscribe(),l.dispose()}}).pipe((0,p.distinctUntilChanged)())}function Ie(e,t=!1){let n=e.get(o.ICommandService),i=e.get(u.IDrawingManagerService),a=e.get(r.DocsShapeService);return new p.Observable(o=>{let s=()=>{let n=z(e);if(!n){o.next(!0);return}let r=a.getShapeDataById(n.unitId,n.subUnitId,n.drawingId);o.next(!r||t&&r.formulaBinding==null)},c=i.focus$.subscribe(s),l=n.onCommandExecuted(e=>{e.id===r.UpdateDocShapeDataMutation.id&&s()});return s(),()=>{c.unsubscribe(),l.dispose()}})}function Le(e){let t=e.get(u.IDrawingManagerService),n=e.get(r.DocsShapeService);return t.focus$.pipe((0,p.startWith)(t.getFocusDrawings()),(0,p.map)(()=>{let t=z(e),r=t?n.getShapeTypeById(t.unitId,t.subUnitId,t.drawingId):void 0;return r===void 0||(0,i.isConnectorShape)(r)}))}function Re(e){return{id:N.id,type:n.MenuItemType.SELECTOR,icon:`PaintIcon`,title:`shape-editor-ui.toolbar.quickStyles`,tooltip:`shape-editor-ui.toolbar.quickStyles`,selections:[{label:{name:pe,hoverable:!1,selectable:!1}}],value$:Ne(e),hidden$:Ie(e)}}function ze(t){return{id:P.id,type:n.MenuItemType.SELECTOR,icon:`ShapeIcon`,title:`shape-editor-ui.toolbar.changeShape`,tooltip:`shape-editor-ui.toolbar.changeShape`,slot:!0,selections:[{label:{name:e.SHAPE_CHANGE_PICKER_COMPONENT,hoverable:!1,selectable:!1}}],hidden$:Le(t)}}function Be(e,t,r=!1){return i=>({id:e,type:n.MenuItemType.BUTTON,label:{name:t,hoverable:!1,selectable:!1},hidden$:Ie(i,r)})}const Ve=Be(Te,me),He=Be(Ee,he),Ue=Be(De,ge,!0);function We(e){return{id:Me,type:n.MenuItemType.SELECTOR,icon:ve[0].icon,label:_e,selectionsCommandId:c.UpdateDocDrawingWrappingStyleCommand.id,selections:ve.map(({icon:t,label:n,value:r})=>({value:r,label:n,icon:t,params:()=>{let t=z(e);return t?{unitId:t.unitId,subUnitId:t.subUnitId,drawings:[{unitId:t.unitId,subUnitId:t.subUnitId,drawingId:t.drawingId}],wrappingStyle:r}:void 0}})),value$:Fe(e),hidden$:Ie(e)}}function Ge(e,t,r,i){return a=>({id:e,commandId:c.SetDocDrawingArrangeCommand.id,type:n.MenuItemType.BUTTON,icon:r,title:i,tooltip:i,hidden$:Ie(a),params:()=>{let e=z(a);return e?{unitId:e.unitId,subUnitId:e.subUnitId,drawingIds:[e.drawingId],arrangeType:t}:void 0}})}const Ke=Ge(Oe,o.ArrangeTypeEnum.forward,`MoveUpIcon`,`shape-editor-ui.arrange.forward`),qe=Ge(ke,o.ArrangeTypeEnum.backward,`MoveDownIcon`,`shape-editor-ui.arrange.backward`),Je=Ge(Ae,o.ArrangeTypeEnum.front,`TopmostIcon`,`shape-editor-ui.arrange.front`),Ye=Ge(je,o.ArrangeTypeEnum.back,`BottomIcon`,`shape-editor-ui.arrange.back`);function Xe(e){let t=e.get(n.ISidebarService);return{activated$:(0,p.defer)(()=>t.sidebarOptions$.pipe((0,p.startWith)(t.options),(0,p.map)(e=>e.visible===!0&&e.id===`doc.shape.edit.panel`),(0,p.distinctUntilChanged)())),id:j.id,type:n.MenuItemType.BUTTON,icon:`ShapeFormatSettingIcon`,title:`docs-shape-ui.formatShape`,tooltip:`docs-shape-ui.formatShape`,hidden$:Ie(e),params:()=>{let t=z(e);return t?{unitId:t.unitId,subUnitId:t.subUnitId,drawingId:t.drawingId}:void 0}}}const Ze={[n.MenuManagerPosition.RIBBON]:{[T]:{order:100,title:`docs-shape-ui.formatShape`,contextual:!0,"docs-shape-ui.ribbon.shape-format.quick-styles":{order:0,[N.id]:{order:0,gridLayout:{row:1,column:1,showLabel:!0},menuItemFactory:Re},[P.id]:{order:1,gridLayout:{row:2,column:1,showLabel:!0},menuItemFactory:ze}},"docs-shape-ui.ribbon.shape-format.style":{order:1,[Te]:{order:0,gridLayout:{row:1,column:1,rowSpan:2,width:104},menuItemFactory:Ve}},"docs-shape-ui.ribbon.shape-format.text":{order:2,[Ee]:{order:0,gridLayout:{row:1,column:1,rowSpan:2,width:344},menuItemFactory:He}},"docs-shape-ui.ribbon.shape-format.arrange":{order:3,[Me]:{order:0,gridLayout:{row:1,column:1,rowSpan:2,columnSpan:2,showLabel:!0},menuItemFactory:We},[Oe]:{order:1,gridLayout:{row:1,column:3},menuItemFactory:Ke},[ke]:{order:2,gridLayout:{row:2,column:3},menuItemFactory:qe},[Ae]:{order:3,gridLayout:{row:1,column:4},menuItemFactory:Je},[je]:{order:4,gridLayout:{row:2,column:4},menuItemFactory:Ye}},"docs-shape-ui.ribbon.shape-format.formula":{order:4,[De]:{order:0,gridLayout:{row:1,column:1,rowSpan:2,width:120},menuItemFactory:Ue}},"docs-shape-ui.ribbon.shape-format.advanced":{order:5,[j.id]:{order:0,gridLayout:{row:1,column:1,showLabel:!0},menuItemFactory:Xe},[e.ToggleShapeFloatingToolbarOperation.id]:{order:1,gridLayout:{row:2,column:1,showLabel:!0},menuItemFactory:e.ShapeFloatingToolbarToggleFactory}}}}},Qe={[n.RibbonInsertGroup.MEDIA]:{[C.id]:{order:3,gridLayout:{row:2,column:2},menuItemFactory:e=>({...ce(e),title:void 0})}},[n.RibbonInsertGroup.OTHERS]:{[A.id]:{order:1,gridLayout:{row:1,column:2,rowSpan:2,showLabel:!0},menuItemFactory:de}},[n.ContextMenuPosition.PARAGRAPH]:{[n.ContextMenuGroup.LAYOUT]:{[t.INSERT_BELLOW_MENU_ID]:{[C.id]:{replace:!0,order:8,menuItemFactory:le}}},[t.DOC_CONTENT_INSERT_MENU_ID]:{[n.ContextMenuGroup.LAYOUT]:{[C.id]:{replace:!0,order:8,menuItemFactory:le}}},[t.EMPTY_PARAGRAPH_MENU_ID]:{[n.ContextMenuGroup.LAYOUT]:{[C.id]:{replace:!0,order:8,menuItemFactory:ue}}},[t.DOC_PARAGRAPH_T_INSERT_MENU_ID]:{insert:{[C.id]:{replace:!0,order:2,menuItemFactory:ce}}},[t.DOC_PARAGRAPH_T_INSERT_BELOW_MENU_ID]:{insert:{[`${C.id}.below`]:{replace:!0,order:2,menuItemFactory:le}}}}};var $e=`@univerjs-pro/docs-shape-ui`,et=`1.5.2`;const B={type:o.CommandType.OPERATION,id:`doc.operation.close-doc-shape-format-panel`,handler(){return!0}},tt=`docs-shape-ui.config`,nt={};function V(e){"@babel/helpers - typeof";return V=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},V(e)}function rt(e,t){if(V(e)!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(V(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function it(e){var t=rt(e,`string`);return V(t)==`symbol`?t:t+``}function H(e,t,n){return(t=it(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var at=class extends l.Shape{constructor(e,t){super(e,t),H(this,`_shapeId`,null),H(this,`_adjName`,null),H(this,`_unitId`,null),H(this,`_subUnitId`,null),t&&this.setShapeProps(t)}getDrawingSearch(){return{unitId:this._unitId,subUnitId:this._subUnitId,drawingId:this._shapeId}}setShapeProps(e){e.shapeId!==void 0&&(this._shapeId=e.shapeId),e.adjName!==void 0&&(this._adjName=e.adjName),e.unitId!==void 0&&(this._unitId=e.unitId),e.subUnitId!==void 0&&(this._subUnitId=e.subUnitId),this.transformByState({width:e.width,height:e.height})}_draw(e){l.Circle.drawWith(e,{radius:i.ShapeDefaultConfig.adjHandleSize,fill:i.ShapeDefaultConfig.adjHandleFill,stroke:i.ShapeDefaultConfig.adjHandleStroke,strokeWidth:1,evented:!0})}};function ot(t,n,r){let i={...n,dataModel:{...n.dataModel??{},...r?{doc:r}:null}},a=(0,e.resolveShapeTextEditorBehaviorShapeData)(t,i),o=(0,e.resolveShapeTextEditorWrapStrategy)(a);return{clip:(0,e.shouldClipShapeTextDocument)(a,o),wrapStrategy:o}}var U=class extends l.Shape{constructor(t,n){super(t,n),H(this,`_hyperLinkRegions`,[]),H(this,`_props`,void 0),H(this,`_formulaAnimation`,new e.FormulaShapeAnimationController(()=>this.makeDirty(!0),()=>this._applyFormulaAutoFitSize())),H(this,`_transformCalculateSrcRect`,!0),H(this,`_drawingType`,o.DrawingTypeEnum.DRAWING_SHAPE),H(this,`isDrawingObject`,!0),this._props={...n},this._formulaAnimation.setPresentation(n.formulaPresentation,n.animateFormulaPresentation!==!1),this._init(),this._applyFormulaAutoFitSize()}_init(){this.onTransformChange$.subscribeEvent(e=>{this._updateSrcRectByTransform(e)})}setPrstGeom(e){this._props.prstGeom=e}resolveHyperLinkAt(t){if(this._props.isEditing)return null;let n=this.getInverseCoord(t),{width:r,height:i}=this.getRealBound();return(0,e.resolveShapeTextHyperLinkAt)(this._hyperLinkRegions,{x:(this.flipX?-n.x:n.x)+r/2,y:n.y+i/2})}setEditing(e){this._props.isEditing=e,this.makeDirty(!0)}setFormulaPresentation(e,t=!0){this._formulaAnimation.setPresentation(e,t),this._props.formulaPresentation=e,this._applyFormulaAutoFitSize(),this.makeDirty(!0)}_applyFormulaAutoFitSize(){let t=this._props.shapeModel,n=t.getShapeTextData(),r=(0,e.normalizeShapeTextModel)(n==null?void 0:n.dataModel),i=r==null?void 0:r.doc,o=this._formulaAnimation.getAutoFitPresentations();if(!i||o.length===0)return;t.updateContext({width:this.width,height:this.height});let s=(0,e.resolveFormulaShapeAutoFitSize)({documentData:o.map(e=>(0,a.createShapeFormulaDocument)(i,e)),height:this.height,shapeData:t.getShapeData(),textRect:t.getShapeTextRect({left:0,top:0,width:this.width,height:this.height}),width:this.width});if(s){var c;this.resize(s.width,s.height),(c=this.getScene())==null||(c=c.getTransformer())==null||c.debounceRefreshControls()}}get unitId(){return this._props.unitId}get subUnitId(){return this._props.subUnitId}_updateSrcRectByTransform(e){if(this._props.srcRect==null||!this._transformCalculateSrcRect)return;let{width:t,height:n}=this,{width:r=0,height:i=0}=e.preValue,{left:a=0,top:o=0,right:s=0,bottom:c=0}=this._props.srcRect,l=a,u=o,d=s,f=c,p=!1;if(r!==0&&r!==t){let e=a/r,n=s/r;l=t*e,d=t*n,p=!0}if(i!==0&&i!==n){let e=o/i,t=c/i;u=n*e,f=n*t,p=!0}p&&this.setSrcRect({left:l,top:u,right:d,bottom:f})}setSrcRect(e){this._props.srcRect=e,this.makeDirty(!0)}setFillImage(e){this._props.image=e,this.makeDirty(!0)}set transform(e){this._transform=e}get transform(){this._transform||this._setTransForm();let e=this._transform.clone();return this.transformForAngle(e)}get shapeModel(){return this._props.shapeModel}get shapeId(){return this._props.shapeId}get classType(){return l.RENDER_CLASS_TYPE.SHAPE}_draw(e,t,n,r){let a=this._props.shapeModel;if(!a||!t)return;let o=n??this.width,s=r??this.height,c={shapeType:a.getShapeType(),width:o,height:s},l={renderMode:i.ShapeRenderModeEnum.Path,oKey:this.oKey,image:this._props.image,angle:this.angle};a.updateContext(c),e.save();let u={top:0,left:0,width:o,height:s},d=a.getDrawingEffectBounds(u);d?this._renderWithCache(e,d,e=>{a.render(e,u,l)}):(this._releaseRenderCache(),a.render(e,u,l)),e.restore();let f=a.getShapeTextData(),p=a.getShapeTextRect(u),m=a.isLineShape();if(f&&p&&!m){e.save(),this.getState().flipX&&e.scale(-1,1);let t=o/2,n=s/2;e.translate(-t,-n),e.beginPath(),this._drawShapeText(e,f,p),e.restore()}}getDrawingPoints(e){}_drawShapeText(e,t,n){var r;this._hyperLinkRegions=[],this._props.isEditing||(!((r=t.dataModel)!=null&&r.doc)&&`isRichText`in t&&t.isRichText===!1?this._drawSimpleText(e,t,n):this._drawRichText(e,t,n))}_drawSimpleText(t,n,r){this._drawRichText(t,{...n,text:n.text??``,dataModel:{doc:(0,e.plainShapeTextToDocumentData)(n,`docs-shape-text-${this.oKey}`)}},r)}_drawRichText(t,n,r){(0,e.drawFormulaShapeAnimationLayers)(t,this._formulaAnimation,(e,t,i)=>{this._drawRichTextLayer(e,n,r,t,i===`current`)})}_drawRichTextLayer(t,n,r,i,s){let c=this._props.localeService;if(!n.dataModel||!c){c||console.warn(`[DrawingShape] LocaleService is required for rich text rendering`);return}let u=(0,e.normalizeShapeTextModel)(n.dataModel);if(!u)return;let d=u.doc;if(!d)return;let f=(0,a.createShapeFormulaDocument)(d,i),p=u.va??o.VerticalAlign.TOP,m=u.ha??o.HorizontalAlign.LEFT,h=ot(this._props.shapeModel.getShapeData(),n,f),g=n.isHorizontal,_=(0,e.prepareShapeTextDocumentData)(f,{isHorizontal:g!==!1,textRect:r,verticalAlign:p,horizontalAlign:m,wrapStrategy:h.wrapStrategy}),v=new o.DocumentDataModel(_),y=new l.DocumentViewModel(v),b=l.DocumentSkeleton.create(y,c);b.calculate();let x=b.getActualSize().actualHeight,S=(0,e.resolveShapeTextDocumentRenderLayout)({contentHeight:x,verticalAlign:p,viewportHeight:r.height});v.updateDocumentStyle({pageSize:{width:g===!1?r.height:r.width,height:(0,e.resolveShapeTextDocumentPageHeight)(f,S.contentHeight)}}),v.updateDocumentDataMargin({t:S.marginTop}),b.calculate();let C=new l.Documents(`shape-text-${this.oKey}`,b,{pageMarginLeft:0,pageMarginTop:0,onTextFillImageLoaded:()=>this.makeDirty(!0)});C.resize(r.width,S.contentHeight),t.save(),t.translateWithPrecision(r.left,r.top),h.clip&&(t.beginPath(),t.rect(0,S.clipTop,r.width,S.clipHeight),t.clip()),S.contentVerticalOffset&&t.translateWithPrecision(0,S.contentVerticalOffset),C.draw(t),s&&(this._hyperLinkRegions=(0,e.createShapeTextHyperLinkRegions)(C,{left:r.left,top:r.top+S.contentVerticalOffset},h.clip?{left:r.left,right:r.left+r.width,top:r.top+S.clipTop,bottom:r.top+S.clipTop+S.clipHeight}:void 0)),t.restore(),C.dispose(),b.dispose(),y.dispose(),v.dispose()}render(e,t,n=!1){if(!this.visible)return this.makeDirty(!1),this;let{width:r,height:i,left:a,top:o}=this,s=this.getRealBound();if(r=s.width,i=s.height,a=s.left,o=s.top,this.isRender(t)){let{top:e,left:n,bottom:s,right:c}=t.viewBound;if(r+this.strokeWidth+a<n||c<a||i+this.strokeWidth+o<e||s<o)return this}let c=a+r/2,u=o+i/2,d=this.transform.getMatrix();if(this._props.isEditing){let e=this.getState(),t=new l.Transform;t.composeMatrix({...e}),d=t.getMatrix()}return e.save(),this._props.shapeModel.isRenderLinePointsMode===!0||e.transform(d[0],d[1],d[2],d[3],c,u),this._draw(e,t,r,i),e.restore(),this.makeDirty(!1),this}getInverseCoord(e){let{left:t,top:n,width:r,height:i}=this.getRealBound(),a=this.transform.getMatrix(),o=t+r/2,s=n+i/2,c=new l.Transform([a[0],a[1],a[2],a[3],o,s]),u=this.getParent();return(this.isInGroup&&(u==null?void 0:u.classType)===l.RENDER_CLASS_TYPE.GROUP?u.ancestorTransform.multiply(c):c).invert().applyPoint(e)}isHit(e){let{left:t,top:n,width:r,height:i}=this.getRealBound(),a=t+r/2,o=n+i/2,s=this.transform.getMatrix(),c=new l.Transform([s[0],s[1],s[2],s[3],a,o]),u=this.getParent(),d=(this.isInGroup&&(u==null?void 0:u.classType)===l.RENDER_CLASS_TYPE.GROUP?u.ancestorTransform.multiply(c):c).invert().applyPoint(e),f=r/2,p=i/2,m=this._props.shapeModel;return m&&m.isLineShape()?m.isHitLine(d.x,d.y,r,i):d.x>=-f-this.strokeWidth/2&&d.x<=f+this.strokeWidth/2&&d.y>=-p-this.strokeWidth/2&&d.y<=p+this.strokeWidth/2}dispose(){this._formulaAnimation.dispose(),this._props.shapeModel=null,super.dispose()}};let W=class extends o.Disposable{constructor(e,t,n,r){super(),this._context=e,this._drawingManagerService=t,this._docsShapeService=n,this._commandService=r,H(this,`_activeShapeId`,null),H(this,`_unitId`,null),H(this,`_subUnitId`,null),H(this,`_activeShapeAdjustPointList`,void 0),H(this,`_adjustPointObjects`,[]),H(this,`_baseShapeLeft`,0),H(this,`_baseShapeTop`,0),H(this,`_baseShapeWidth`,0),H(this,`_baseShapeHeight`,0),H(this,`_isStartAdjusting`,!1),H(this,`_isShouldShowDrawingShapeAdjust`,!1),H(this,`_activeAdjustInfo`,void 0),H(this,`_activeShapeModel`,void 0),H(this,`_adjHandlerPointerMove`,void 0),H(this,`_adjHandlerPointerUp`,void 0),this._registerDrawingFocusChangeHandler(),this._registerDrawingTransformHandler()}clearAdjustControls(){this._clearShapeAdjustControls()}refreshAdjustControls(){this._updateShapeAdjustControls(!0)}_getShapeAdjustPointListById(e,t,n){var r;return(r=this._docsShapeService.getShapeModel(e,t,n))==null?void 0:r.getDrawingPoints()}_getShapeAdjustInfosById(e,t,n,r){var i;return(i=this._docsShapeService.getShapeModel(e,t,n))==null?void 0:i.getAdjustInfoByName(r)}_getActiveDrawingParam(){return this._unitId===null||this._subUnitId===null||this._activeShapeId===null?null:this._drawingManagerService.getDrawingByParam({unitId:this._unitId,subUnitId:this._subUnitId,drawingId:this._activeShapeId})??null}_getActiveDrawingShape(e){if(this._unitId===null||this._subUnitId===null||this._activeShapeId===null)return null;let t=(0,u.getDrawingShapeKeyByDrawingSearch)({unitId:this._unitId,subUnitId:this._subUnitId,drawingId:this._activeShapeId}),n=e.getObjectIncludeInGroup(t);return n instanceof U?n:null}_createShapeAdjustControls(e=!1){if(this._unitId===null||this._subUnitId===null||this._activeShapeId===null)return;let t=this._getActiveDrawingParam();if((t==null?void 0:t.drawingType)!==o.DrawingTypeEnum.DRAWING_SHAPE||!t.transform)return;let n=this._docsShapeService.getShapeModel(this._unitId,this._subUnitId,this._activeShapeId);if(!n||n.isLineShape())return;let{left:r=0,top:i=0,width:a=0,height:s=0,flipX:c,flipY:l,angle:u=0}=t.transform;(e||!this._activeShapeAdjustPointList)&&(n.updateContext({width:a,height:s}),this._activeShapeAdjustPointList=n.getDrawingPoints());let d=this._activeShapeAdjustPointList;if(!(d!=null&&d.length))return;let{scene:f}=this._context;for(let e of d){let t=this._toVisualAdjustPoint(e,a,s,!!c,!!l,u);this._addShapeAdjustControl(f,t,t.adjName,r,i,this._unitId,this._subUnitId)}}_toVisualAdjustPoint(e,t,n,r,i,a){let o=e.x,s=e.y;if(r&&(o=t-o),i&&(s=n-s),a!==0){let e=t/2,r=n/2,i=a*Math.PI/180,c=Math.cos(i),l=Math.sin(i),u=o-e,d=s-r;o=e+(u*c-d*l),s=r+(u*l+d*c)}return{x:o,y:s,adjName:e.adjName}}_updateShapeAdjustControls(e=!1){e&&this._clearShapeAdjustControls(),this._createShapeAdjustControls(e)}_addShapeAdjustControl(e,t,n,r,a,o,s){if(!this._activeShapeId)return;let c=`doc-shape-adjust-point-${this._activeShapeId}-${n}`,u=e.getObjectIncludeInGroup(c);if(u){u.transformByState({left:t.x+r-i.ShapeDefaultConfig.adjHandleSize,top:t.y+a-i.ShapeDefaultConfig.adjHandleSize}),u.makeDirty(!0);return}let d=new at(c,{left:t.x+r-i.ShapeDefaultConfig.adjHandleSize,top:t.y+a-i.ShapeDefaultConfig.adjHandleSize,adjName:n,shapeId:this._activeShapeId,unitId:o,subUnitId:s,width:i.ShapeDefaultConfig.adjHandleSize+8,height:i.ShapeDefaultConfig.adjHandleSize+8,zIndex:l.DRAWING_OBJECT_LAYER_INDEX+1,evented:!0});this._adjustPointObjects.push(d),this._attachAdjustEvent(d,e,n),e.addObject(d,l.DRAWING_OBJECT_LAYER_INDEX+1)}_clearShapeAdjustControls(){this._adjustPointObjects.forEach(e=>e.dispose()),this._adjustPointObjects=[]}_updateAdjustControlPositions(){this._createShapeAdjustControls()}_toScenePoint(e,t,n){let r=l.Vector2.FromArray([t,n]),i=e.getActiveViewportByCoord(r)??e.getViewports()[0];return(i==null?void 0:i.transformVector2SceneCoord(r))??r}_attachAdjustEvent(e,t,n){this.disposeWithMe((0,o.toDisposable)(e.onPointerDown$.subscribeEvent((r,i)=>{var a;let o=e.getDrawingSearch();this._activeAdjustInfo=this._getShapeAdjustInfosById(o.unitId,o.subUnitId,o.drawingId,n),this._activeShapeModel=this._docsShapeService.getShapeModel(o.unitId,o.subUnitId,o.drawingId);let s=this._getActiveDrawingParam(),c=s==null?void 0:s.transform;if(!s||!c||!this._activeShapeModel)return;this._baseShapeLeft=c.left||0,this._baseShapeTop=c.top||0,this._baseShapeWidth=c.width||0,this._baseShapeHeight=c.height||0;let u=!!c.flipX,d=!!c.flipY,f=c.angle||0,p={...((a=this._activeAdjustInfo)==null?void 0:a.currentAdjustValues)??{}};this._isStartAdjusting=!0,t.disableObjectsEvent(),this._adjHandlerPointerMove=t.onPointerMove$.subscribeEvent((e,n)=>{var r;if(!this._isStartAdjusting||!this._activeShapeModel||!this._activeAdjustInfo)return;t.disableObjectsEvent(),t.setCursor(l.CURSOR_TYPE.CROSSHAIR);let i=this._toScenePoint(t,e.offsetX,e.offsetY),a=i.x-this._baseShapeLeft,s=i.y-this._baseShapeTop;if(f!==0){let e=this._baseShapeWidth/2,t=this._baseShapeHeight/2,n=f*Math.PI/180,r=Math.cos(n),i=Math.sin(n),o=a-e,c=s-t;a=e+(o*r+c*i),s=t+(-o*i+c*r)}u&&(a=this._baseShapeWidth-a),d&&(s=this._baseShapeHeight-s);let c={left:0,top:0,width:this._baseShapeWidth,height:this._baseShapeHeight},p=this._activeShapeModel.calcAdjValues(c,{x:a,y:s},this._activeAdjustInfo,u,d);if(Object.keys(p).length!==0){for(let[e,t]of Object.entries(p))this._activeShapeModel.setAdjustValueByName(e,t);this._activeShapeModel.updateContext({width:this._baseShapeWidth,height:this._baseShapeHeight}),(r=this._getActiveDrawingShape(t))==null||r.makeDirty(!0),this._activeShapeAdjustPointList=this._getShapeAdjustPointListById(o.unitId,o.subUnitId,o.drawingId),this._updateAdjustControlPositions(),n.stopPropagation()}}),this._adjHandlerPointerUp=t.onPointerUp$.subscribeEvent((e,n)=>{var r,i;(r=this._adjHandlerPointerMove)==null||r.unsubscribe(),(i=this._adjHandlerPointerUp)==null||i.unsubscribe(),t.resetCursor();let a=this._activeAdjustInfo;if(a&&this._activeShapeModel){let e={};for(let t of Object.keys(a.currentAdjustValues)){let n=this._activeShapeModel.getAdjustValueByName(t);n!==void 0&&(e[t]=n)}Object.keys(e).length>0&&R(this._commandService,o.unitId,o.subUnitId,o.drawingId,{oldShapeData:{adjustValues:p}},{adjustValues:e})}this._activeAdjustInfo=void 0,this._activeShapeModel=void 0,this._isStartAdjusting=!1,t.enableObjectsEvent(),n.stopPropagation()}),i.stopPropagation()})))}_registerDrawingTransformHandler(){let{scene:e}=this._context,t=e.getTransformerByCreate();this.disposeWithMe(t.changeStart$.subscribe(e=>{this._createShapeAdjustControls(),e.objects!==null&&e.objects.size===1&&e.objects.values().next().value instanceof U&&(this._isShouldShowDrawingShapeAdjust=!0)})),this.disposeWithMe(t.changing$.subscribe(()=>{this._isShouldShowDrawingShapeAdjust&&this._clearShapeAdjustControls()})),this.disposeWithMe(e.onPointerUp$.subscribeEvent(()=>{this._isShouldShowDrawingShapeAdjust&&(this._isShouldShowDrawingShapeAdjust=!1,this._createShapeAdjustControls())})),this.disposeWithMe(t.changeEnd$.subscribe(()=>{this._unitId&&this._subUnitId&&this._activeShapeId&&(this._activeShapeAdjustPointList=this._getShapeAdjustPointListById(this._unitId,this._subUnitId,this._activeShapeId),this._updateAdjustControlPositions())}))}_registerDrawingFocusChangeHandler(){this.disposeWithMe(this._commandService.onCommandExecuted(e=>{if(e.id!==r.UpdateDocShapeDataMutation.id)return;let{unitId:t,shapeId:n}=e.params;t===this._unitId&&n===this._activeShapeId&&this.refreshAdjustControls()})),this.disposeWithMe(this._drawingManagerService.focus$.subscribe(e=>{if(e.length===1){let t=e[0],n=this._drawingManagerService.getDrawingByParam(t);if((n==null?void 0:n.drawingType)===o.DrawingTypeEnum.DRAWING_SHAPE){this._activeShapeId=t.drawingId,this._unitId=t.unitId,this._subUnitId=t.subUnitId,this._activeShapeAdjustPointList=this._getShapeAdjustPointListById(t.unitId,t.subUnitId,t.drawingId),this._clearShapeAdjustControls(),this._createShapeAdjustControls();return}}this._activeShapeId=null,this._activeShapeAdjustPointList=void 0,this._unitId=null,this._subUnitId=null,this._clearShapeAdjustControls()})),this.disposeWithMe((0,p.merge)(this._drawingManagerService.update$,this._drawingManagerService.refreshTransform$).subscribe(e=>{var t;let n=e.find(e=>e.drawingId===this._activeShapeId&&e.unitId===this._unitId&&e.subUnitId===this._subUnitId);n&&((t=this._drawingManagerService.getDrawingByParam(n))==null?void 0:t.drawingType)===o.DrawingTypeEnum.DRAWING_SHAPE&&this._updateShapeAdjustControls(!0)})),this.disposeWithMe(this._drawingManagerService.remove$.subscribe(e=>{for(let t of e)this._activeShapeId===t.drawingId&&(this._activeShapeId=null,this._activeShapeAdjustPointList=void 0,this._unitId=null,this._subUnitId=null,this._clearShapeAdjustControls())}))}};W=I([F(1,u.IDrawingManagerService),F(2,(0,o.Inject)(r.DocsShapeService)),F(3,o.ICommandService)],W);let G=class extends o.Disposable{constructor(e,t){super(),this._permissionService=e,this._instanceService=t,H(this,`_editingParams$`,new p.BehaviorSubject(null)),H(this,`editingParams$`,this._editingParams$.asObservable()),H(this,`_onSavingEditorData$`,new p.BehaviorSubject(!1)),H(this,`onSavingEditorData$`,this._onSavingEditorData$.asObservable()),H(this,`_completionFrame`,void 0),this.disposeWithMe(this._permissionService.permissionPointUpdate$.subscribe(()=>{let e=this.getEditing();e!=null&&e.visible&&!this._canEdit(e)&&this.setEditing(null)}))}dispose(){this._clearCompletionFrame(),this._editingParams$.next(null),this._editingParams$.complete(),this._onSavingEditorData$.next(!1),this._onSavingEditorData$.complete(),super.dispose()}setEditing(e){(e==null||!e.visible||this._canEdit(e))&&(this._clearCompletionFrame(),this._editingParams$.next(e),(e==null||e.visible&&this._onSavingEditorData$.getValue())&&this._onSavingEditorData$.next(!1))}setOnSavingEditorData(e){this._onSavingEditorData$.next(e)}getEditing(){return this._editingParams$.getValue()}_canEdit(e){let t=this._instanceService.getUnit(e.unitId,o.UniverInstanceType.UNIVER_DOC);if(!t)return!0;let n=(0,s.getDocumentDrawingSegmentId)(t,e.shapeId);return(0,s.canEditDocumentTargets)(this._permissionService,e.unitId,[...(0,s.getDocumentEntityParentPermissionObjectIds)(t,n,`drawing`,e.shapeId),(0,s.getDocumentEntityPermissionObjectId)(n,`drawing`,e.shapeId)])}completeEditing(e){let t=this.getEditing();t&&this._completionFrame===void 0&&(this.setOnSavingEditorData(!0),this._completionFrame=requestAnimationFrame(()=>{this._completionFrame=void 0,this.getEditing()===t&&this.setEditing(null)}))}_clearCompletionFrame(){this._completionFrame!==void 0&&(cancelAnimationFrame(this._completionFrame),this._completionFrame=void 0)}cancelEditing(){this.getEditing()&&this.setEditing(null)}};G=I([F(0,o.IPermissionService),F(1,o.IUniverInstanceService)],G);function st(e){return e.behindText===!0||e.behindText===o.BooleanNumber.TRUE||e.layoutType===o.PositionedObjectLayoutType.WRAP_NONE&&e.behindDoc===o.BooleanNumber.TRUE?t.DOCS_COMPONENT_MAIN_LAYER_INDEX-1:l.DRAWING_OBJECT_LAYER_INDEX}let K=class extends o.Disposable{constructor(e,t,n,r,i,a,o){super(),this._drawingManagerService=e,this._docsShapeService=t,this._localeService=n,this._imageIoService=r,this._urlImageService=i,this._shapeTextEditingService=a,this._shapeFormulaService=o,H(this,`_formulaShapes`,/* @__PURE__ */ new Map),this.disposeWithMe(this._shapeFormulaService.presentationChanged$.subscribe(e=>{var t;(t=this._formulaShapes.get(this._formulaKey(e.unitId,e.subUnitId,e.shapeId)))==null||t.forEach(t=>t.setFormulaPresentation(e.presentation,e.animationEnabled))})),this.disposeWithMe(this._drawingManagerService.remove$.subscribe(e=>{e.forEach(e=>{this._shapeFormulaService.unregister({unitId:e.unitId,subUnitId:e.subUnitId,shapeId:e.drawingId}),this._formulaShapes.delete(this._formulaKey(e.unitId,e.subUnitId,e.drawingId))})}))}renderDrawingShape(t,n){let{transform:r,drawingType:a,srcRect:s,prstGeom:c,groupId:l,unitId:f,subUnitId:p,drawingId:m,isMultiTransform:h,transforms:g,hidden:_,selectable:v}=t;if(a!==o.DrawingTypeEnum.DRAWING_SHAPE||!this._drawingManagerService.getDrawingVisible()||r==null)return;let y=this._drawingManagerService.getDrawingEditable(),b=h&&g?g:[r],x=[];for(let[r,a]of b.entries()){let{left:g,top:b,width:S,height:C,angle:w,flipX:T,flipY:E,skewX:D,skewY:O}=a,k=(0,u.getDrawingShapeKeyByDrawingSearch)({unitId:f,subUnitId:p,drawingId:m},h?r:void 0),A=n.getObjectIncludeInGroup(k);if(A!=null){let e={unitId:f,subUnitId:p,shapeId:m};A instanceof U&&this.refreshFormulaPresentation(A,e),A.transformByState({left:g,top:b,width:S,height:C,angle:w,flipX:T,flipY:E,skewX:D,skewY:O});continue}let j=this._drawingManagerService.getDrawingOrder(f,p),M=j.indexOf(m);if(n.getObjectIncludeInGroup(k)||!this._drawingManagerService.getDrawingVisible())continue;let N=this._docsShapeService.getShapeModel(f,p,m);if(!N)continue;let P=(0,i.isConnectorShape)(N.getShapeType())?{...e.SHAPE_EDITOR_TRANSFORMER_CONFIG,rotateEnabled:!1,resizeEnabled:!1,borderEnabled:!1}:e.SHAPE_EDITOR_TRANSFORMER_CONFIG,F=N.getShapeData().formulaBinding,I={unitId:f,subUnitId:p,shapeId:m};F&&this._shapeFormulaService.register(I,F);let L=new U(k,{...a,zIndex:M===-1?j.length-1:M,shapeModel:N,localeService:this._localeService,shapeId:m,unitId:f,subUnitId:p,visible:_!==!0,evented:v!==!1,formulaPresentation:F?this._shapeFormulaService.getPresentation(I):void 0,animateFormulaPresentation:(F==null?void 0:F.animationEnabled)!==!1,transformerConfig:P});if(F){let e=this._formulaKey(f,p,m),t=this._formulaShapes.get(e)??/* @__PURE__ */ new Set;t.add(L),this._formulaShapes.set(e,t)}this.disposeWithMe((0,o.toDisposable)(L.onDblclick$.subscribeEvent((e,t)=>{N.isLineShape()||F||(this._shapeTextEditingService.setEditing({visible:!0,unitId:f,subUnitId:p,shapeId:m,shapeKey:L.oKey}),t.stopPropagation())}))),n.addObject(L,st(t)),y&&n.attachTransformerTo(L),l&&(0,d.insertGroupObject)({drawingId:l,unitId:f,subUnitId:p},L,n,this._drawingManagerService,h?r:void 0),c!=null&&L.setPrstGeom(c),s!=null&&L.setSrcRect(s),this._loadShapePictureFill(L,N.getShapeData()),x.push(L)}return x}_formulaKey(e,t,n){return`${e}\u0000${t}\u0000${n}`}refreshFormulaPresentation(e,t){let n=this._docsShapeService.getShapeModel(t.unitId,t.subUnitId,t.shapeId),r=n==null?void 0:n.getShapeData().formulaBinding,i=this._formulaKey(t.unitId,t.subUnitId,t.shapeId);if(r){this._shapeFormulaService.register(t,r);let n=this._formulaShapes.get(i)??/* @__PURE__ */ new Set;n.add(e),this._formulaShapes.set(i,n)}else{var a;this._shapeFormulaService.unregister(t),(a=this._formulaShapes.get(i))==null||a.delete(e)}e.setFormulaPresentation(r?this._shapeFormulaService.getPresentation(t):void 0,(r==null?void 0:r.animationEnabled)!==!1)}refreshShapeFillImage(e){let t=e.shapeModel.getShapeData(),n=t.fill;!n||n.fillType!==i.ShapeFillEnum.PictureFill||!n.fillImageSource?e.setFillImage(void 0):this._loadShapePictureFill(e,t)}_loadShapePictureFill(e,t){let n=t.fill;if(!n||n.fillType!==i.ShapeFillEnum.PictureFill||!n.fillImageSource)return;let r=n.fillImageSource,a=n.fillImageSourceType??i.ImageSourceTypeEnum.URL,o=this._imageIoService.getImageSourceCache(r,a);o?e.setFillImage(o):this._loadAndSetImage(e,r,a)}async _loadAndSetImage(e,t,n){let r;try{if(n===i.ImageSourceTypeEnum.UUID)r=await this._imageIoService.getImage(t);else if(n===i.ImageSourceTypeEnum.URL)try{r=await this._urlImageService.getImage(t)}catch{r=t}else r=t}catch(e){console.error(`[ShapeRender] Failed to resolve picture fill source`,e);return}let a=new window.Image;a.onload=()=>{this._imageIoService.addImageSourceCache(t,n,a),e.setFillImage(a)},a.onerror=()=>{console.error(`[ShapeRender] Failed to load picture fill image`,t)},a.src=r}};K=I([F(0,u.IDrawingManagerService),F(1,(0,o.Inject)(r.DocsShapeService)),F(2,(0,o.Inject)(o.LocaleService)),F(3,o.IImageIoService),F(4,o.IURLImageService),F(5,(0,o.Inject)(G)),F(6,(0,o.Inject)(a.ShapeFormulaService))],K);let q=class extends o.Disposable{constructor(e,t,n){super(),this._docPrintInterceptorService=e,this._drawingManagerService=t,this._shapeRenderController=n,this._initPrinting()}_initPrinting(){this.disposeWithMe(this._docPrintInterceptorService.interceptor.intercept(this._docPrintInterceptorService.interceptor.getInterceptPoints().PRINTING_COMPONENT_COLLECT,{handler:(e,t,n)=>{var r;let{unitId:i,scene:a,skeleton:s}=t,{pageIndex:c}=t,l=(r=this._drawingManagerService.getDrawingDataForUnit(i))==null?void 0:r[i],u=ct(this._docPrintInterceptorService,s,c);return l==null||l.order.forEach(e=>{if(u&&!u.has(e))return;let t=l.data[e];t.drawingType===o.DrawingTypeEnum.DRAWING_SHAPE&&!t.hidden&&this._shapeRenderController.renderDrawingShape(t,a)}),n(e)}}))}};q=I([F(0,(0,o.Inject)(t.DocPrintInterceptorService)),F(1,u.IDrawingManagerService),F(2,(0,o.Inject)(K))],q);function ct(e,t,n){var r,i;let a=e;if(a.getPageDrawingIds)return a.getPageDrawingIds(t,n);let o=t.getSkeletonData();if(!o||o.pages.length<=1||n==null)return null;let s=/* @__PURE__ */ new Set,c=o.pages[n];if(!c)return s;lt(c,s);let l=(r=o.skeHeaders.get(c.headerId))==null?void 0:r.get(c.headerLayoutKey??c.pageWidth),u=(i=o.skeFooters.get(c.footerId))==null?void 0:i.get(c.footerLayoutKey??c.pageWidth);return l&<(l,s),u&<(u,s),s}function lt(e,t){for(let n of e.skeDrawings.keys())t.add(n);for(let n of e.skeTables.values())for(let e of n.rows)for(let n of e.cells)lt(n,t)}function ut(t){return/* @__PURE__ */ (0,f.jsx)(oe,{...t,PickerComponent:e.MobileShapePickerPanel})}function dt(){let t=(0,n.useDependency)(o.LocaleService),r=re(),[i,a]=(0,v.useState)(!1);return/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-grid univer-gap-3`,children:[/* @__PURE__ */ (0,f.jsx)(_.MobileActionRow,{title:t.t(`docs-shape-ui.crop.shape`),"aria-expanded":i,variant:`subtle`,trailing:i?/* @__PURE__ */ (0,f.jsx)(g.MoreUpIcon,{}):/* @__PURE__ */ (0,f.jsx)(g.MoreDownIcon,{}),onClick:()=>a(e=>!e)}),i&&/* @__PURE__ */ (0,f.jsx)(e.MobileShapePickerPanel,{excludeGroups:[e.ShapeGroupEnum.Line],onShapeClick:e=>{r(e),a(!1)}})]})}function ft(e){return e.trim()||void 0}function pt(t,n,r){var i,a;return((i=t.name)==null?void 0:i.trim())||((a=t.title)==null?void 0:a.trim())||`${r.t(`drawing-ui.objectListPanel.typeNames.${(0,e.getDrawingTypeNameKey)(t.drawingType)}`)} ${n+1}`}function mt({PanelComponent:t=d.ObjectListPanelBase}){let i=(0,n.useDependency)(o.LocaleService),a={title:i.t(`drawing-ui.objectListPanel.title`),empty:i.t(`drawing-ui.objectListPanel.empty`),showAll:i.t(`drawing-ui.objectListPanel.showAll`),hideAll:i.t(`drawing-ui.objectListPanel.hideAll`),lockAll:i.t(`drawing-ui.objectListPanel.lockAll`),unlockAll:i.t(`drawing-ui.objectListPanel.unlockAll`),moveForward:i.t(`drawing-ui.objectListPanel.moveForward`),moveBackward:i.t(`drawing-ui.objectListPanel.moveBackward`),close:i.t(`drawing-ui.objectListPanel.close`),show:i.t(`drawing-ui.objectListPanel.show`),hide:i.t(`drawing-ui.objectListPanel.hide`),lock:i.t(`drawing-ui.objectListPanel.lock`),unlock:i.t(`drawing-ui.objectListPanel.unlock`),lockHint:i.t(`drawing-ui.objectListPanel.lockHint`),unlockHint:i.t(`drawing-ui.objectListPanel.unlockHint`),name:i.t(`drawing-ui.objectListPanel.name`),nameInput:i.t(`drawing-ui.objectListPanel.nameInput`),description:i.t(`drawing-ui.objectListPanel.description`),descriptionPlaceholder:i.t(`drawing-ui.objectListPanel.descriptionPlaceholder`),details:i.t(`drawing-ui.objectListPanel.details`),noSelection:i.t(`drawing-ui.objectListPanel.noSelection`),locate:i.t(`drawing-ui.objectListPanel.locate`),expand:i.t(`drawing-ui.objectListPanel.expand`),collapse:i.t(`drawing-ui.objectListPanel.collapse`),dragToReorder:i.t(`drawing-ui.objectListPanel.dragToReorder`),search:i.t(`drawing-ui.objectListPanel.search`),filterAll:i.t(`drawing-ui.objectListPanel.filterAll`),filterHidden:i.t(`drawing-ui.objectListPanel.filterHidden`),filterLocked:i.t(`drawing-ui.objectListPanel.filterLocked`),sectionCanvas:i.t(`drawing-ui.objectListPanel.sectionCanvas`),sectionFloating:i.t(`drawing-ui.objectListPanel.sectionFloating`)},p=(0,n.useDependency)(o.ICommandService),m=(0,n.useDependency)(o.IUniverInstanceService),h=(0,n.useDependency)(c.IDocDrawingService),g=(0,n.useDependency)(u.IDrawingManagerService),_=(0,n.useDependency)(l.IRenderManagerService),[,b]=(0,v.useReducer)(e=>e+1,0),x=m.getCurrentUnitOfType(o.UniverInstanceType.UNIVER_DOC),S=(x==null?void 0:x.getUnitId())??``,C=S,w=(0,n.useObservable)(()=>g.focus$,g.getFocusDrawings(),!1,[g]);(0,v.useEffect)(()=>{let e=p.onCommandExecuted(()=>b());return()=>e.dispose()},[p]);let T=S?h.getDrawingData(S,C):{},E=(S?h.getDrawingOrder(S,C):[]).map(e=>T[e]).filter(e=>!!e).reverse(),D=E.reduce((e,t)=>(e[(0,d.getObjectListPanelSectionIdForDrawingType)(t.drawingType)]+=1,e),{canvas:0,floating:0}),O={canvas:0,floating:0},k=E.map((e,t)=>{let n=(0,d.getObjectListPanelSectionIdForDrawingType)(e.drawingType),r=n===d.OBJECT_LIST_FLOATING_SECTION_ID,o=O[n]++;return{id:e.drawingId,name:pt(e,t,i),description:e.description,visible:e.hidden!==!0,selectable:e.selectable!==!1,sectionId:n,sectionTitle:r?a.sectionFloating:a.sectionCanvas,capabilities:r?{arrange:!1,reorder:!1}:void 0,canMoveForward:!r&&o>0,canMoveBackward:!r&&o<D.canvas-1,canReorder:!r}}),A=(0,v.useMemo)(()=>(w??[]).filter(e=>e.unitId===S&&e.subUnitId===C).map(e=>e.drawingId),[w,C,S]),j=A[A.length-1]??null,M=e=>h.getDrawingByParam({unitId:S,subUnitId:C,drawingId:e})??null,N=async e=>{S&&e.length&&await p.executeCommand(r.UpdateDocDrawingMetadataCommand.id,{unitId:S,patches:e})},P=(t,n)=>{if(!S)return;let r=n?A.includes(t)?A.filter(e=>e!==t):[...A,t]:[t];p.syncExecuteCommand(u.SetDrawingSelectedOperation.id,r.map(e=>({unitId:S,subUnitId:C,drawingId:e})));let i=r[r.length-1];i?(0,e.activateDrawingObject)(_,{unitId:S,subUnitId:C,drawingId:i}):(0,e.clearActiveDrawingObjects)(_,S)},F=async(e,t)=>{await N(e.map(e=>M(e)).filter(e=>!!e).filter(e=>e.hidden!==!0!==t).map(e=>({drawingId:e.drawingId,hidden:!t})))},I=async(e,t)=>{await N(e.map(e=>M(e)).filter(e=>!!e).filter(e=>e.selectable!==!1!==t).map(e=>({drawingId:e.drawingId,selectable:t})))},L=e=>{let t=M(e);if(t)return I([e],t.selectable===!1)},ee=async(e,t)=>{let n=M(e),r=ft(t);!n||(n.name??void 0)===r&&(n.title||void 0)===r||await N([{drawingId:e,name:r,title:r}])},te=async(e,t)=>{let n=M(e),r=ft(t);n&&(n.description??void 0)!==r&&await N([{drawingId:e,description:r}])},ne=async(e,t)=>{S&&await p.executeCommand(c.SetDocDrawingArrangeCommand.id,{unitId:S,subUnitId:C,drawingIds:[e],arrangeType:t})};return S?/* @__PURE__ */ (0,f.jsx)(t,{labels:a,renderPermissionAction:e=>x?/* @__PURE__ */ (0,f.jsx)(n.ObjectPermissionButton,{target:{unitId:S,objectId:(0,s.getDocumentEntityPermissionObjectId)((0,s.getDocumentDrawingSegmentId)(x,e.id),`drawing`,e.id),objectType:y.UnitObject.DocumentEntity},name:e.name,commandId:s.SetDocumentPermissionCommand.id,exists:()=>!!M(e.id)},`${S}/${e.id}`):null,items:k,selectedIds:A,focusedId:j,showHeader:!1,onSelect:P,onSetVisible:F,onSetSelectable:I,onCommitName:ee,onCommitDescription:te,onMoveForward:async e=>ne(e,o.ArrangeTypeEnum.forward),onMoveBackward:async e=>ne(e,o.ArrangeTypeEnum.backward),onToggleSelectable:L}):/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-flex univer-size-full univer-items-center univer-justify-center univer-text-sm univer-text-gray-500`,children:a.title})}function ht(){return/* @__PURE__ */ (0,f.jsx)(mt,{PanelComponent:d.MobileObjectListPanel})}let J=class{constructor(e){this._renderManagerService=e}updateShapeFillImage(e,t){let n=this._renderManagerService.getRenderUnitById(e.unitId),r=n==null?void 0:n.scene;if(!r)return;let i=(0,u.getDrawingShapeKeyByDrawingSearch)(e),a=r.getObjectIncludeInGroup(i);a==null||a.setFillImage(t)}};J=I([F(0,l.IRenderManagerService)],J);function gt(){let e=(0,n.useDependency)(u.IDrawingManagerService),t=(0,n.useObservable)(()=>e.focus$,e.getFocusDrawings(),!1,[e]);return t.length===0?null:/* @__PURE__ */ (0,f.jsx)(`div`,{children:/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-box-border univer-px-4 univer-text-sm`,children:[/* @__PURE__ */ (0,f.jsx)(d.DrawingCommonPanel,{drawings:t,hasCropper:!1}),/* @__PURE__ */ (0,f.jsx)(h.DocDrawingTextWrap,{drawings:t}),/* @__PURE__ */ (0,f.jsx)(h.DocDrawingPosition,{drawings:t})]})})}function _t(t){let{unitId:r,subUnitId:i,shapeId:a,PositionComponent:s=gt}=t,c=(0,n.useDependency)(o.ICommandService),l=(0,n.useDependency)(J);return/* @__PURE__ */ (0,f.jsx)(e.ShapeEditPanel,{...t,positionEditor:/* @__PURE__ */ (0,f.jsx)(s,{}),onUpdateShapeData:(e,t)=>{R(c,r,i,a,e,t)},onUpdateLineShapeData:(e,t)=>{fe(c,r,i,a,e,t)},onUpdateShapeFillImage:e=>{l.updateShapeFillImage({unitId:r,subUnitId:i,drawingId:a},e)}})}function vt(){let e=(0,n.useDependency)(u.IDrawingManagerService),t=(0,n.useObservable)(e.focus$,e.getFocusDrawings());return t.length===0?null:/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-grid univer-gap-5 univer-px-4 univer-py-3`,children:[/* @__PURE__ */ (0,f.jsx)(d.DrawingCommonPanel,{drawings:t,hasCropper:!1}),/* @__PURE__ */ (0,f.jsx)(h.MobileDocDrawingTextWrap,{drawings:t}),/* @__PURE__ */ (0,f.jsx)(h.MobileDocDrawingPosition,{drawings:t})]})}function yt(t){return/* @__PURE__ */ (0,f.jsx)(e.MobileShapeEditorControls,{children:/* @__PURE__ */ (0,f.jsx)(_t,{...t,PositionComponent:vt})})}function bt({popup:e}){let t=(0,n.useDependency)(o.LocaleService),{shapeType:r,onText:a,onStyle:s,onDelete:c}=e.extraProps,l=[{key:`text`,order:0,item:{id:`text`,type:n.MenuItemType.BUTTON,title:t.t(`docs-shape-ui.mobile.text`),disabled$:(0,p.of)((0,i.isConnectorShape)(r))}},{key:`style`,order:1,item:{id:`style`,type:n.MenuItemType.BUTTON,title:t.t(`docs-shape-ui.mobile.style`)}},{key:`delete`,order:2,item:{id:`delete`,type:n.MenuItemType.BUTTON,title:t.t(`docs-shape-ui.mobile.delete`)}}];return/* @__PURE__ */ (0,f.jsx)(n.MobileMenu,{schemas:l,presentation:`context-bar`,onOptionSelect:async({id:e})=>{e===`text`?await a():e===`style`?await s():e===`delete`&&await c()}})}const xt=`doc.shape.floating-toolbar`;function St(e,t){var n;let r=e==null||(n=e.getSnapshot().drawings)==null?void 0:n[t];return r?r.layoutType===o.PositionedObjectLayoutType.WRAP_NONE?r.behindDoc===o.BooleanNumber.TRUE?c.TextWrappingStyle.BEHIND_TEXT:c.TextWrappingStyle.IN_FRONT_OF_TEXT:r.layoutType===o.PositionedObjectLayoutType.WRAP_SQUARE?c.TextWrappingStyle.WRAP_SQUARE:r.layoutType===o.PositionedObjectLayoutType.WRAP_TOP_AND_BOTTOM?c.TextWrappingStyle.WRAP_TOP_AND_BOTTOM:c.TextWrappingStyle.INLINE:c.TextWrappingStyle.INLINE}function Ct(t){let r=(0,n.useDependency)(e.ShapeFloatingToolbarService),i=(0,n.useObservable)(()=>r.visible$,r.getVisible(),!1,[r]),a=t.popup.extraProps;return i?/* @__PURE__ */ (0,f.jsx)(wt,{...a,canvasElement:t.popup.canvasElement}):null}function wt(t){let a=(0,n.useDependency)(o.ICommandService),s=(0,n.useDependency)(o.LocaleService),l=(0,n.useDependency)(r.DocsShapeService),u=(0,n.useDependency)(o.IUniverInstanceService),{unitId:d,subUnitId:p,drawingId:m,shapeType:h}=t,[_,y]=(0,v.useState)(t.shapeData),b=u.getUnit(d,o.UniverInstanceType.UNIVER_DOC)??void 0,[x,S]=(0,v.useState)(()=>St(b,m)),C=(0,v.useMemo)(()=>(0,e.getTextStyle)(_),[_]),w=(0,v.useMemo)(()=>(0,e.getTextModel)(_),[_]);(0,v.useEffect)(()=>{let e=a.onCommandExecuted(e=>{if(e.id!==r.UpdateDocShapeDataMutation.id)return;let t=l.getShapeDataById(d,p,m);t&&y(t)});return()=>e.dispose()},[a,l,m,p,d]);let T=e=>{y(t=>({...t,...e}))},E=t=>{let n=(0,e.buildShapeTextDataUpdate)(_,t);R(a,d,p,m,{oldShapeData:{shapeText:_.shapeText}},n),T(n)},D=e=>{S(e),a.executeCommand(c.UpdateDocDrawingWrappingStyleCommand.id,{unitId:d,subUnitId:p,drawings:[{unitId:d,subUnitId:p,drawingId:m}],wrappingStyle:e})},O=(0,e.useFormulaShapeToolbar)({hostType:o.UniverInstanceType.UNIVER_DOC,unitId:d,subUnitId:p,shapeId:m,shapeData:_,onUpdateBinding:e=>{let t={formulaBinding:e};R(a,d,p,m,{oldShapeData:{formulaBinding:_.formulaBinding}},t),T(t)}}),k=[{label:s.t(`docs-shape-ui.textWrap.inline`),value:c.TextWrappingStyle.INLINE,icon:/* @__PURE__ */ (0,f.jsx)(g.TextWrapShapeIcon,{})},{label:s.t(`docs-shape-ui.textWrap.square`),value:c.TextWrappingStyle.WRAP_SQUARE,icon:/* @__PURE__ */ (0,f.jsx)(g.TextWrapShapeIcon,{})},{label:s.t(`docs-shape-ui.textWrap.topAndBottom`),value:c.TextWrappingStyle.WRAP_TOP_AND_BOTTOM,icon:/* @__PURE__ */ (0,f.jsx)(g.TextWrapShapeIcon,{})},{label:s.t(`docs-shape-ui.textWrap.behindText`),value:c.TextWrappingStyle.BEHIND_TEXT,icon:/* @__PURE__ */ (0,f.jsx)(g.TextWrapShapeIcon,{})},{label:s.t(`docs-shape-ui.textWrap.inFrontText`),value:c.TextWrappingStyle.IN_FRONT_OF_TEXT,icon:/* @__PURE__ */ (0,f.jsx)(g.TextWrapShapeIcon,{})}];return/* @__PURE__ */ (0,f.jsxs)(f.Fragment,{children:[/* @__PURE__ */ (0,f.jsx)(e.ShapeFloatingToolbar,{canvasElement:t.canvasElement,shapeData:_,shapeType:h,textStyle:{ff:i.ShapeDefaultConfig.shapeText.fontFamily,fs:i.ShapeDefaultConfig.shapeText.fontSize,cl:{rgb:i.ShapeDefaultConfig.shapeText.color},...C},textModel:w?{ha:w.ha??o.HorizontalAlign.LEFT,va:w.va??o.VerticalAlign.TOP}:null,wrappingStyle:x,wrappingStyleOptions:k,enableShapeFillReset:!0,enableShapeStrokeReset:!0,enableTextBackgroundReset:!0,defaultFillColor:i.ShapeDefaultConfig.fill,defaultGradientEndColor:i.ShapeDefaultConfig.gradientEndColor,defaultStrokeColor:i.ShapeDefaultConfig.stroke,extensionGroups:O.extensionGroups,floatingObjectToolbarPosition:n.FloatingObjectToolbarPosition.DOC,onUpdateShapeData:(e,t)=>{R(a,d,p,m,e,t),t&&T(t)},onUpdateText:E,onUpdateWrappingStyle:e=>D(e),onOpenPanel:()=>{a.executeCommand(j.id,{unitId:d,subUnitId:p,drawingId:m})},onDelete:()=>{a.executeCommand(c.RemoveDocDrawingCommand.id,{unitId:d,drawings:[{unitId:d,subUnitId:p,drawingId:m}]})}}),O.panel]})}function Tt({variant:e,extend:t,...n}){let r=/* @__PURE__ */ (0,f.jsx)(`rect`,{x:`7`,y:`5.5`,width:`6`,height:`9`,rx:`1`,fill:`currentColor`,fillOpacity:`0.14`,stroke:`currentColor`,strokeWidth:`1.2`});return/* @__PURE__ */ (0,f.jsxs)(`svg`,{"aria-hidden":`true`,fill:`none`,height:`1em`,viewBox:`0 0 20 20`,width:`1em`,...n,children:[e===`inline`&&/* @__PURE__ */ (0,f.jsxs)(f.Fragment,{children:[/* @__PURE__ */ (0,f.jsx)(`path`,{d:`M2 3.5h16M2 16.5h16M2 10h5M13 10h5`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.2`}),/* @__PURE__ */ (0,f.jsx)(`rect`,{x:`8`,y:`7`,width:`4`,height:`6`,rx:`0.8`,fill:`currentColor`,fillOpacity:`0.14`,stroke:`currentColor`,strokeWidth:`1.2`})]}),e===`square`&&/* @__PURE__ */ (0,f.jsxs)(f.Fragment,{children:[/* @__PURE__ */ (0,f.jsx)(`path`,{d:`M2 3h16M2 7.5h3M15 7.5h3M2 10h3M15 10h3M2 12.5h3M15 12.5h3M2 17h16`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.2`}),r]}),e===`top-bottom`&&/* @__PURE__ */ (0,f.jsxs)(f.Fragment,{children:[/* @__PURE__ */ (0,f.jsx)(`path`,{d:`M2 3h16M2 17h16`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.2`}),r]}),e===`behind`&&/* @__PURE__ */ (0,f.jsxs)(f.Fragment,{children:[r,/* @__PURE__ */ (0,f.jsx)(`path`,{d:`M2 3h16M2 7.5h16M2 10h16M2 12.5h16M2 17h16`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.2`})]}),e===`front`&&/* @__PURE__ */ (0,f.jsxs)(f.Fragment,{children:[/* @__PURE__ */ (0,f.jsx)(`path`,{d:`M2 3h16M2 7.5h16M2 10h16M2 12.5h16M2 17h16`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.2`}),/* @__PURE__ */ (0,f.jsx)(`rect`,{x:`7`,y:`5.5`,width:`6`,height:`9`,rx:`1`,fill:`currentColor`})]})]})}const Y=e=>t=>/* @__PURE__ */ (0,f.jsx)(Tt,{...t,variant:e}),Et={DocsShapeWrapInlineIcon:Y(`inline`),DocsShapeWrapSquareIcon:Y(`square`),DocsShapeWrapTopBottomIcon:Y(`top-bottom`),DocsShapeWrapBehindTextIcon:Y(`behind`),DocsShapeWrapInFrontOfTextIcon:Y(`front`)},Dt=(0,v.memo)(()=>{let i=(0,n.useDependency)(G),a=(0,n.useDependency)(r.DocsShapeService),s=(0,n.useDependency)(u.IDrawingManagerService),l=(0,n.useDependency)(o.ICommandService),d=(0,v.useMemo)(()=>({getShapeModel:(e,t,n)=>a.getShapeModel(e,t,n),getShapeData:(e,t,n)=>a.getShapeDataById(e,t,n),getDrawingTransform:(e,t,n)=>{let r=s.getDrawingByParam({unitId:e,subUnitId:t,drawingId:n});return r==null?void 0:r.transform},updateShapeText:({unitId:e,shapeId:t,shapeText:n,oldShapeText:i})=>{l.executeCommand(r.UpdateDocShapeDataCommand.id,{unitId:e,shapeId:t,shapeData:{shapeText:n},oldShapeJSON:{oldShapeData:{shapeText:i}}})},updateHostSize:({unitId:e,subUnitId:t,shapeId:n,width:r,height:i})=>{l.executeCommand(c.UpdateDrawingDocTransformCommand.id,{unitId:e,subUnitId:t,drawings:[{drawingId:n,key:`size`,value:{width:r,height:i}}]})},allowHostSizeShrink:({unitId:t,subUnitId:n,shapeId:r})=>(0,e.shouldAllowShapeTextEditorHostSizeShrink)(a.getShapeDataById(t,n,r))}),[l,a,s]),p=(0,v.useMemo)(()=>({viewportKeys:{main:t.VIEWPORT_KEY.VIEW_MAIN}}),[]);return/* @__PURE__ */ (0,f.jsx)(e.ShapeTextEditorContainer,{adapter:d,editingService:i,editorUnitId:D,positionOptions:p})});let Ot=class extends o.Disposable{constructor(e,t){super(),this._componentManager=e,this._iconManager=t,this._registerIcons(),this._registerComponents()}_registerIcons(){this._iconManager.has(`ObjectLayersIcon`)||this.disposeWithMe(this._iconManager.register({ObjectLayersIcon:g.ObjectLayersIcon})),this._iconManager.has(`BottomIcon`)||this.disposeWithMe(this._iconManager.register({BottomIcon:g.BottomIcon})),this._iconManager.has(`MoveDownIcon`)||this.disposeWithMe(this._iconManager.register({MoveDownIcon:g.MoveDownIcon})),this._iconManager.has(`MoveUpIcon`)||this.disposeWithMe(this._iconManager.register({MoveUpIcon:g.MoveUpIcon})),this._iconManager.has(`ShapeFormatSettingIcon`)||this.disposeWithMe(this._iconManager.register({ShapeFormatSettingIcon:g.ShapeFormatSettingIcon})),this._iconManager.has(`TopmostIcon`)||this.disposeWithMe(this._iconManager.register({TopmostIcon:g.TopmostIcon})),this.disposeWithMe(this._iconManager.register(Et))}_registerComponents(){this.disposeWithMe(this._componentManager.register(w,yt)),this.disposeWithMe(this._componentManager.register(E,ht)),this.disposeWithMe(this._componentManager.register(xt,bt)),this.disposeWithMe(this._componentManager.register(me,be)),this.disposeWithMe(this._componentManager.register(pe,xe)),this.disposeWithMe(this._componentManager.register(he,Se)),this.disposeWithMe(this._componentManager.register(ge,Ce)),this.disposeWithMe(this._componentManager.register(_e,we)),this.disposeWithMe(this._componentManager.register(O,e.ShapeTextFloatToolbar)),this.disposeWithMe(this._componentManager.register(ee,ut)),this.disposeWithMe(this._componentManager.register(te,dt)),this._componentManager.hasDefault(d.IMAGE_CLIP_SHAPE_PICKER_COMPONENT)||this.disposeWithMe(this._componentManager.register(d.IMAGE_CLIP_SHAPE_PICKER_COMPONENT,ae)),this.disposeWithMe(this._componentManager.register(k,Dt))}};Ot=I([F(0,(0,o.Inject)(n.ComponentManager)),F(1,(0,o.Inject)(n.IconManager))],Ot);let kt=class extends o.Disposable{constructor(t,n,r,i,a,s,c,l,u,d,f,p,m){super(),this._univerInstanceService=t,this._sidebarService=n,this._menuManagerService=r,this._docsShapeService=i,this._localeService=a,this._commandService=s,this._drawingManagerService=c,this._docCanvasPopManagerService=l,this._renderManagerService=u,this._contextService=d,this._shapeTextEditingService=f,this._permissionService=p,this._mobileEditorService=m,H(this,`_sidebarDisposable`,null),H(this,`_activeShapeInfo`,null),H(this,`_isOpenedShapeEditPanel`,!1),H(this,`_shapeEditPanelVersion`,0),H(this,`_disposePopupsByUnit`,/* @__PURE__ */ new Map),H(this,`_popupTargetKeys`,/* @__PURE__ */ new Map),this._initMenu(),this.disposeWithMe(this._univerInstanceService.getCurrentTypeOfUnit$(o.UniverInstanceType.UNIVER_DOC).subscribe(e=>{if(!e){var t;(t=this._sidebarDisposable)==null||t.dispose()}})),this._registerOperations(),this.disposeWithMe(this._drawingManagerService.remove$.subscribe(e=>{for(let t of e){let e=`${t.unitId}:${t.subUnitId}:${t.drawingId}`;for(let[t,n]of this._popupTargetKeys)n===e&&this._clearPopups(t,!0)}})),this.disposeWithMe((0,e.bindRenderTransformerLifecycle)(this._renderManagerService,o.UniverInstanceType.UNIVER_DOC,e=>this._popupMenuListener(e))),this.disposeWithMe(this._shapeTextEditingService.editingParams$.subscribe(e=>{e&&this._clearPopups(void 0,!0)})),this.disposeWithMe(this._permissionService.permissionPointUpdate$.subscribe(()=>{this._drawingManagerService.getFocusDrawings().some(e=>e.drawingType===o.DrawingTypeEnum.DRAWING_SHAPE&&this._univerInstanceService.getUnitType(e.unitId)===o.UniverInstanceType.UNIVER_DOC&&!this._canEditShape(e.unitId,e.drawingId))&&(this._clearPopups(void 0,!0),this._closeShapeEditPanel())}))}getShapePopupMenus(e,t,n,r){return[{label:`docs-shape-ui.openPanel`,index:0,commandId:j.id,commandParams:{unitId:e,subUnitId:t,drawingId:n},disable:r===o.DrawingTypeEnum.DRAWING_DOM},{label:`docs-shape-ui.deleteShape`,index:1,commandId:c.RemoveDocDrawingCommand.id,commandParams:{unitId:e,drawings:[{unitId:e,subUnitId:t,drawingId:n}]},disable:!1},{label:`docs-shape-ui.hidePanel`,index:2,commandId:B.id,commandParams:{unitId:e,subUnitId:t,drawingId:n},disable:!1}]}_initMenu(){this._menuManagerService.mergeMenu(Qe)}_getShapeInfo(e,t,n){let r=this._docsShapeService.getShapeTypeById(e,t,n),i=this._docsShapeService.getShapeDataById(e,t,n);return r===void 0||i===void 0?null:{shapeData:i,shapeId:n,shapeType:r,unitId:e,subUnitId:t,version:this._shapeEditPanelVersion,disableShapeOption:!1}}_clearPopups(e,t=!1){if(e==null){[...this._disposePopupsByUnit.keys()].forEach(e=>this._clearPopups(e,t));return}let n=this._disposePopupsByUnit.get(e);if(n){for(let e=n.length-1;e>=0;--e){let r=n[e];(t||r.canDispose())&&(r.dispose(),n.splice(e,1))}n.length===0&&(this._disposePopupsByUnit.delete(e),this._popupTargetKeys.delete(e))}}_getDisposePopups(e){let t=this._disposePopupsByUnit.get(e);if(t)return t;let n=[];return this._disposePopupsByUnit.set(e,n),n}_popupMenuListener(e){var t;let n=new o.DisposableCollection,r=(t=this._renderManagerService.getAllRenderersOfType(o.UniverInstanceType.UNIVER_DOC).find(t=>t.scene.getTransformerByCreate()===e))==null?void 0:t.unitId;return r&&(n.add(e.createControl$.subscribe(()=>this._handleCreateControl(e,r))),n.add(e.clearControl$.subscribe(()=>{this._clearPopups(r),queueMicrotask(()=>{e.getSelectedObjectMap().size>0||!this._drawingManagerService.getFocusDrawings().some(e=>e.unitId===r)||(this._contextService.setContextValue(o.FOCUSING_COMMON_DRAWINGS,!1),this._drawingManagerService.focusDrawing(null))})})),n.add(e.changing$.subscribe(()=>{this._clearPopups(r,!0)}))),n}_handleCreateControl(e,n){let r=e.getSelectedObjectMap();if(this._isOpenedShapeEditPanel){this._clearPopups(n,!0);return}if(r.size>1){this._clearPopups(n);return}let i=r.values().next().value;if(!i){this._clearPopups(n);return}let a=this._drawingManagerService.getDrawingOKey(i.oKey);if(!a||a.drawingType!==o.DrawingTypeEnum.DRAWING_SHAPE){this._clearPopups(n);return}let{unitId:s,subUnitId:c,drawingId:l}=a;if(!this._canEditShape(s,l)){this._clearPopups(n,!0);return}let u=this._getShapeInfo(s,c,l);if(!u){this._clearPopups(n);return}let d=this._disposePopupsByUnit.get(n),f=`${s}:${c}:${l}`;if(this._popupTargetKeys.get(n)===f&&d!=null&&d.length)return;this._clearPopups(n);let p=this._renderManagerService.getRenderUnitById(s),m=((p==null?void 0:p.isMainScene)===!1?p.with(t.DocCanvasPopManagerService):this._docCanvasPopManagerService).attachPopupToObject(i,this._getShapePopup(u,()=>this._clearPopups(n,!0)),s);this.disposeWithMe(m),this._getDisposePopups(n).push(m),this._popupTargetKeys.set(n,f),this._drawingManagerService.getFocusDrawings().some(e=>e.unitId===s&&e.subUnitId===c&&e.drawingId===l)||this._drawingManagerService.focusDrawing([{unitId:s,subUnitId:c,drawingId:l}])}_getShapePopup(e,t){let{unitId:n,subUnitId:r,shapeId:i}=e,a={hostType:o.UniverInstanceType.UNIVER_DOC,unitId:n,subUnitId:r,shapeId:i};return{componentKey:xt,requiresStableLayout:!1,direction:`top-center`,offset:[0,8],extraProps:{shapeType:e.shapeType,onText:()=>{t(),this._mobileEditorService.open(`text`,a)},onStyle:()=>{t(),this._mobileEditorService.open(`style`,a)},onDelete:()=>this._commandService.executeCommand(c.RemoveDocDrawingCommand.id,{unitId:n,drawings:[{unitId:n,subUnitId:r,drawingId:i}]})}}}_canEditShape(e,t){let n=this._univerInstanceService.getUnit(e,o.UniverInstanceType.UNIVER_DOC);if(!n)return!1;let r=(0,s.getDocumentDrawingSegmentId)(n,t);return(0,s.canEditDocumentTargets)(this._permissionService,e,[...(0,s.getDocumentEntityParentPermissionObjectIds)(n,r,`drawing`,t),(0,s.getDocumentEntityPermissionObjectId)(r,`drawing`,t)])}_registerOperations(){this.disposeWithMe(this._commandService.onCommandExecuted(e=>{if(e.id===j.id){let{unitId:t,subUnitId:n,drawingId:r}=e.params;this._shapeEditPanelVersion+=1,this._activeShapeInfo=this._getShapeInfo(t,n,r),this._clearPopups(void 0,!0),this._openShapeEditPanel()}if(e.id===B.id&&(this._activeShapeInfo=null,this._closeShapeEditPanel()),e.id===r.UpdateDocShapeDataMutation.id){var t;let{unitId:n,shapeId:r}=e.params;if(((t=this._activeShapeInfo)==null?void 0:t.shapeId)===r){let e=this._getShapeInfo(n,this._activeShapeInfo.subUnitId,r);e&&(this._shapeEditPanelVersion+=1,e.version=this._shapeEditPanelVersion,this._activeShapeInfo=e,this._isOpenedShapeEditPanel&&this._openShapeEditPanel())}}})),this.disposeWithMe(this._drawingManagerService.focus$.subscribe(e=>{if(!this._isOpenedShapeEditPanel)return;if(e.length===0){this._activeShapeInfo=null,this._closeShapeEditPanel();return}if(e.length===1&&e[0].drawingType===o.DrawingTypeEnum.DRAWING_SHAPE&&(this._shapeEditPanelVersion+=1,this._activeShapeInfo=this._getShapeInfo(e[0].unitId,e[0].subUnitId,e[0].drawingId),this._activeShapeInfo)){this._openShapeEditPanel();return}let t=e.filter(e=>e.drawingType===o.DrawingTypeEnum.DRAWING_SHAPE);this._shapeEditPanelVersion+=1,this._activeShapeInfo=this._getShapeInfo(e[0].unitId,e[0].subUnitId,e[0].drawingId),this._activeShapeInfo&&e.length>1&&t.length===e.length?this._openShapeEditPanel():this._activeShapeInfo&&t.length!==e.length?(this._activeShapeInfo.disableShapeOption=!0,this._openShapeEditPanel()):this._closeShapeEditPanel()}))}_openShapeEditPanel(){this._activeShapeInfo&&(this._sidebarDisposable=this._sidebarService.open({id:w,header:{title:this._localeService.t(`docs-shape-ui.formatShape`)},width:388,children:{label:w,...this._activeShapeInfo},onClose:()=>{this._drawingManagerService.focusDrawing(null),this._contextService.setContextValue(o.FOCUSING_COMMON_DRAWINGS,!1),this._sidebarDisposable=null}}),this._isOpenedShapeEditPanel=!0)}_closeShapeEditPanel(){this._isOpenedShapeEditPanel=!1,this._sidebarService.close(w),this._sidebarDisposable=null,this._contextService.setContextValue(o.FOCUSING_COMMON_DRAWINGS,!1),this._drawingManagerService.focusDrawing(null)}};kt=I([F(0,o.IUniverInstanceService),F(1,(0,o.Inject)(n.ISidebarService)),F(2,n.IMenuManagerService),F(3,(0,o.Inject)(r.DocsShapeService)),F(4,(0,o.Inject)(o.LocaleService)),F(5,o.ICommandService),F(6,u.IDrawingManagerService),F(7,(0,o.Inject)(t.DocCanvasPopManagerService)),F(8,l.IRenderManagerService),F(9,o.IContextService),F(10,(0,o.Inject)(G)),F(11,o.IPermissionService),F(12,(0,o.Inject)(e.MobileShapeEditorService))],kt);const At=`docs-shape-contextual-ribbon`;let X=class extends o.Disposable{constructor(e,t,n,r,i,a){super(),this._menuManagerService=e,this._ribbonService=t,this._drawingManagerService=n,this._univerInstanceService=r,this._renderManagerService=i,this._shapeFloatingToolbarService=a,H(this,`_visible`,!1),this._menuManagerService.mergeMenu(Ze),this.disposeWithMe((0,o.toDisposable)(this._drawingManagerService.focus$.subscribe(()=>this._update()))),this._update()}dispose(){this._shapeFloatingToolbarService.setFallbackVisible(!1,At),this._hide(),super.dispose()}_update(){var t;let n=this._drawingManagerService.getFocusDrawings(),r=n.length===1?n[0]:void 0;if((r==null?void 0:r.drawingType)!==o.DrawingTypeEnum.DRAWING_SHAPE||this._univerInstanceService.getUnitType(r.unitId)!==o.UniverInstanceType.UNIVER_DOC){this._shapeFloatingToolbarService.setFallbackVisible(!1,At),this._hide();return}let i=(t=this._renderManagerService.getRenderUnitById(r.unitId))==null?void 0:t.engine.getCanvasElement(),a=(0,e.resolveShapeContextualRibbonHostMode)(i)===`isolated`;this._shapeFloatingToolbarService.setFallbackVisible(a,At),a?this._hide():(this._visible=!0,this._ribbonService.showContextualTab(T,{activate:!0}))}_hide(){this._visible&&(this._visible=!1,this._ribbonService.hideContextualTab(T),this._ribbonService.setCollapsedIds([]))}};X=I([F(0,n.IMenuManagerService),F(1,n.IRibbonService),F(2,u.IDrawingManagerService),F(3,o.IUniverInstanceService),F(4,l.IRenderManagerService),F(5,(0,o.Inject)(e.ShapeFloatingToolbarService))],X);let Z=class extends o.Disposable{constructor(e,t,n,r){super(),this._commandService=e,this._renderManagerService=t,this._drawingManagerService=n,this._docDrawingShapeRenderController=r,this._initialize()}_initialize(){this.disposeWithMe(this._drawingManagerService.add$.subscribe(e=>this._insertShapes(e))),this.disposeWithMe(this._drawingManagerService.update$.subscribe(e=>{e.forEach(e=>this._updateShape(e))})),this.disposeWithMe(this._commandService.onCommandExecuted(e=>{if(e.id!==r.UpdateDocShapeDataMutation.id)return;let{unitId:t,shapeId:n}=e.params;this._refreshShapeData({unitId:t,subUnitId:t,drawingId:n})}))}_insertShapes(e){e.forEach(e=>{let t=this._getSceneByUnitId(e.unitId);if(!t)return;let n=this._drawingManagerService.getDrawingByParam(e);(n==null?void 0:n.drawingType)===o.DrawingTypeEnum.DRAWING_SHAPE&&this._docDrawingShapeRenderController.renderDrawingShape(n,t.scene)})}_updateShape(e){let t=this._drawingManagerService.getDrawingByParam(e);if((t==null?void 0:t.drawingType)!==o.DrawingTypeEnum.DRAWING_SHAPE)return;let n=this._getSceneByUnitId(e.unitId);if(!n||t.transform==null)return;let r=(0,u.getDrawingShapeKeyByDrawingSearch)(e),i=n.scene.getObjectIncludeInGroup(r);i&&(i.setSrcRect(t.srcRect),i.setPrstGeom(t.prstGeom),i.makeDirty(!0))}_refreshShapeData(e){let t=this._getSceneByUnitId(e.unitId);if(!t)return;let n=(0,u.getDrawingShapeKeyByDrawingSearch)(e),r=t.scene.getObjectIncludeInGroup(n);r&&(this._docDrawingShapeRenderController.refreshShapeFillImage(r),this._docDrawingShapeRenderController.refreshFormulaPresentation(r,{unitId:e.unitId,subUnitId:e.subUnitId,shapeId:e.drawingId}),r.makeDirty(!0))}_getSceneByUnitId(e){if(e==null)return null;let t=this._renderManagerService.getRenderUnitById(e),n=t==null?void 0:t.scene;return n==null?null:{scene:n}}};Z=I([F(0,o.ICommandService),F(1,l.IRenderManagerService),F(2,u.IDrawingManagerService),F(3,(0,o.Inject)(K))],Z);let Q=class extends o.Plugin{constructor(e=nt,t,n,r,i){super(),this._config=e,this._injector=t,this._commandService=n,this._configService=r,this._renderManagerService=i;let{menu:a,...s}=(0,o.merge)({},nt,this._config);a&&this._configService.setConfig(`menu`,a,{merge:!0}),this._configService.setConfig(tt,s),[C,B,j,A,N,P].forEach(e=>this.disposeWithMe(this._commandService.registerCommand(e)))}onStarting(){let e=[[Ot],[kt],[Z],[K],[q],[W],[L],[J],[G],[X]];(0,o.registerDependencies)(this._injector,e),this._injector.get(Ot)}onReady(){this.disposeWithMe(this._renderManagerService.registerRenderModule(o.UniverInstanceType.UNIVER_DOC,[W])),(0,o.touchDependencies)(this._injector,[[kt],[Z],[K],[q],[L],[J],[G],[X]])}};H(Q,`type`,o.UniverInstanceType.UNIVER_DOC),H(Q,`pluginName`,`DOCS_SHAPE_UI_PLUGIN`),H(Q,`packageName`,$e),H(Q,`version`,et),Q=I([(0,o.DependentOn)(m.UniverLicensePlugin,s.UniverDocsPlugin,u.UniverDrawingPlugin,d.UniverDrawingMobileUIPlugin,l.UniverRenderEnginePlugin,t.UniverDocsMobileUIPlugin,a.UniverShapeEditorPlugin,h.UniverDocsDrawingMobileUIPlugin,r.UniverDocsShapePlugin,e.UniverShapeEditorMobileUIPlugin),F(1,(0,o.Inject)(o.Injector)),F(2,o.ICommandService),F(3,o.IConfigService),F(4,l.IRenderManagerService)],Q);let jt=class extends o.Disposable{constructor(e,t){super(),this._componentManager=e,this._iconManager=t,this._registerIcons(),this._registerComponents()}_registerIcons(){this._iconManager.has(`ObjectLayersIcon`)||this.disposeWithMe(this._iconManager.register({ObjectLayersIcon:g.ObjectLayersIcon})),this._iconManager.has(`BottomIcon`)||this.disposeWithMe(this._iconManager.register({BottomIcon:g.BottomIcon})),this._iconManager.has(`MoveDownIcon`)||this.disposeWithMe(this._iconManager.register({MoveDownIcon:g.MoveDownIcon})),this._iconManager.has(`MoveUpIcon`)||this.disposeWithMe(this._iconManager.register({MoveUpIcon:g.MoveUpIcon})),this._iconManager.has(`ShapeFormatSettingIcon`)||this.disposeWithMe(this._iconManager.register({ShapeFormatSettingIcon:g.ShapeFormatSettingIcon})),this._iconManager.has(`TopmostIcon`)||this.disposeWithMe(this._iconManager.register({TopmostIcon:g.TopmostIcon})),this.disposeWithMe(this._iconManager.register(Et))}_registerComponents(){this.disposeWithMe(this._componentManager.register(w,_t)),this.disposeWithMe(this._componentManager.register(E,mt)),this.disposeWithMe(this._componentManager.register(xt,Ct)),this.disposeWithMe(this._componentManager.register(me,be)),this.disposeWithMe(this._componentManager.register(pe,xe)),this.disposeWithMe(this._componentManager.register(he,Se)),this.disposeWithMe(this._componentManager.register(ge,Ce)),this.disposeWithMe(this._componentManager.register(_e,we)),this.disposeWithMe(this._componentManager.register(O,e.ShapeTextFloatToolbar)),this.disposeWithMe(this._componentManager.register(ee,oe)),this.disposeWithMe(this._componentManager.register(te,ie)),this._componentManager.hasDefault(d.IMAGE_CLIP_SHAPE_PICKER_COMPONENT)||this.disposeWithMe(this._componentManager.register(d.IMAGE_CLIP_SHAPE_PICKER_COMPONENT,ae)),this.disposeWithMe(this._componentManager.register(k,Dt))}};jt=I([F(0,(0,o.Inject)(n.ComponentManager)),F(1,(0,o.Inject)(n.IconManager))],jt);let Mt=class extends o.Disposable{constructor(t,n,i,a,c,u,d,f,m){super();let h=e=>{let t=u.getUnit(e.unitId,o.UniverInstanceType.UNIVER_DOC),n=t?(0,s.getDocumentDrawingSegmentId)(t,e.shapeId):``;return!!t&&(0,s.canEditDocumentTargets)(f,e.unitId,[(0,s.getDocumentEntityPermissionObjectId)(n,`drawing`,e.shapeId),...(0,s.getDocumentEntityParentPermissionObjectIds)(t,n,`drawing`,e.shapeId)])},g=e=>e.shapeId&&h(e)?i.getShapeDataById(e.unitId,e.shapeId)??null:null,_=()=>{let e=c.getFocusDrawings(),n=e.length===1?e[0]:null;return(n==null?void 0:n.drawingType)===o.DrawingTypeEnum.DRAWING_SHAPE&&n.unitId===t.unitId?{unitId:n.unitId,subUnitId:n.subUnitId,shapeId:n.drawingId}:null};this.disposeWithMe((0,e.registerShapeFormatPainter)(t,n,{changes$:(0,p.merge)(c.focus$,a.editingParams$,f.permissionPointUpdate$),isActive:()=>{var e;return((e=u.getFocusedUnit())==null?void 0:e.getUnitId())===t.unitId&&!d.getContextValue(o.FOCUSING_SHAPE_TEXT_EDITOR)&&c.getFocusDrawings().some(e=>e.unitId===t.unitId)},getSelectedTarget:_,getSource:()=>{let e=_();return e?g(e):null},getTarget:e=>{let n=t.scene.pick(new l.Vector2(e.offsetX,e.offsetY));if(!(n instanceof U))return null;let r={unitId:t.unitId,subUnitId:t.unitId,shapeId:n.shapeId};return h(r)?r:null},getShape:g,update:(e,t,n)=>m.executeCommand(r.UpdateDocShapeDataCommand.id,{...e,shapeData:n,replaceShapeData:!0,oldShapeJSON:{oldShapeData:t}})}))}};Mt=I([F(1,(0,o.Inject)(n.FormatPainterSessionService)),F(2,(0,o.Inject)(r.DocsShapeService)),F(3,(0,o.Inject)(G)),F(4,u.IDrawingManagerService),F(5,o.IUniverInstanceService),F(6,o.IContextService),F(7,o.IPermissionService),F(8,o.ICommandService)],Mt);function Nt(e,t){let n=e;for(;n;){if(t(n))return n;n=typeof n.getParent==`function`?n.getParent():null}return null}function Pt(e){return Nt(e,e=>e instanceof U)}function Ft(e){return(e==null?void 0:e.formulaBinding)==null}let It=class extends o.Disposable{constructor(e,t,n,r,i){super(),this._context=e,this._shapeTextEditingService=t,this._drawingManagerService=n,this._docLayoutInteractionService=r,this._docsShapeService=i,H(this,`_lastEditingShapeKey`,null),H(this,`_layoutInteraction`,null),this._initEvents(),this._initSelection(),this._initEditingParams()}dispose(){this._endLayoutInteraction(),super.dispose()}_initEvents(){let{scene:e}=this._context;this.disposeWithMe(e.onDblclick$.subscribeEvent((t,n)=>{let{offsetX:r,offsetY:a}=t,o=l.Vector2.FromArray([r,a]),s=Pt(e.pick(o))??this._getFocusedShapeAtPoint(o);if(s){n.stopPropagation();let e=this._docsShapeService.getShapeModel(s.unitId,s.subUnitId,s.shapeId);if(!e||(0,i.isConnectorShape)(e.getShapeType())||!Ft(e.getShapeData()))return;this._shapeTextEditingService.setEditing({visible:!0,unitId:s.unitId,subUnitId:s.subUnitId,shapeId:s.shapeId,shapeKey:s.oKey})}}))}_getFocusedShapeAtPoint(e){let{scene:t}=this._context;return this._drawingManagerService.getFocusDrawings().map(e=>t.getObjectIncludeInGroup((0,u.getDrawingShapeKeyByDrawingSearch)(e))).find(t=>t instanceof U&&t.isHit(e))??null}_initSelection(){this.disposeWithMe(this._drawingManagerService.focus$.subscribe(e=>{if(e.length===1){let t=e[0],n=this._drawingManagerService.getDrawingByParam(t);if((n==null?void 0:n.drawingType)===o.DrawingTypeEnum.DRAWING_SHAPE){let e=this._shapeTextEditingService.getEditing();if((e==null?void 0:e.shapeId)===t.drawingId&&e.visible)return;(0,i.isConnectorShape)(this._docsShapeService.getShapeType(t.unitId,t.subUnitId,t.drawingId))&&this._shapeTextEditingService.setEditing(null)}else this._shapeTextEditingService.completeEditing()}else this._shapeTextEditingService.completeEditing()})),this.disposeWithMe(this._drawingManagerService.remove$.subscribe(e=>{let t=this._shapeTextEditingService.getEditing();t&&e.some(e=>e.drawingId===t.shapeId)&&this._shapeTextEditingService.setEditing(null)}))}_initEditingParams(){this.disposeWithMe(this._shapeTextEditingService.editingParams$.subscribe(e=>{(e==null?void 0:e.visible)===!0&&e.unitId===this._context.unitId?this._layoutInteraction??=this._docLayoutInteractionService.beginInteraction():this._endLayoutInteraction();let{scene:t}=this._context;if(this._lastEditingShapeKey){let e=t.getObjectIncludeInGroup(this._lastEditingShapeKey);e&&e.setEditing(!1)}if(e){let n=!!e.visible,r=t.getObjectIncludeInGroup(e.shapeKey);r&&(r.setEditing(n),this._lastEditingShapeKey=e.shapeKey)}else this._lastEditingShapeKey=null}))}_endLayoutInteraction(){var e;(e=this._layoutInteraction)==null||e.dispose(),this._layoutInteraction=null}};It=I([F(1,(0,o.Inject)(G)),F(2,u.IDrawingManagerService),F(3,(0,o.Inject)(t.DocLayoutInteractionService)),F(4,(0,o.Inject)(r.DocsShapeService))],It);let Lt=class extends e.ShapeTextFloatMenuRenderControllerBase{constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r,i,a,o,s,c,l,{componentKey:O,editorUnitId:D})}};Lt=I([F(1,(0,o.Inject)(s.DocSelectionManagerService)),F(2,(0,o.Inject)(t.DocCanvasPopManagerService)),F(3,(0,o.Inject)(t.DocSelectionRenderService)),F(4,o.ICommandService),F(5,(0,o.Inject)(t.DocEventManagerService)),F(6,(0,o.Inject)(e.ShapeTextHyperLinkPopupService)),F(7,(0,o.Inject)(s.DocInterceptorService)),F(8,(0,o.Inject)(t.DocRenderController)),F(9,(0,o.Inject)(G))],Lt);let Rt=class extends e.ShapeTextHyperLinkHoverController{constructor(t,n,r,i,a){super(t,n,{editing$:r.editingParams$,resolve:r=>{var o;let c=new l.Vector2(r.offsetX,r.offsetY),u=((o=t.scene.getActiveViewportByCoord(c))==null?void 0:o.transformVector2SceneCoord(c))??c,d=(0,e.resolveShapeTextHyperLinkObject)(t.scene.pick(c)??null,u);if(!(d instanceof U))return null;let f=d.resolveHyperLinkAt(u);if(!f)return null;let p=d,m={componentKey:e.ShapeTextHyperLinkInfo.componentKey,direction:`top-center`,offset:[0,10],onClickOutside:()=>n.hideInfoPopup()};return{object:d,info:{...f,unitId:d.unitId,subUnitId:d.subUnitId,shapeKey:d.oKey,readonly:!0,copyable:(0,s.getDocumentPermissionValue)(a,d.unitId,d.unitId,y.UnitAction.Copy)},attachPopup:()=>i.attachPopupToObject(p,m,p.unitId)}}})}};Rt=I([F(1,(0,o.Inject)(e.ShapeTextHyperLinkPopupService)),F(2,(0,o.Inject)(G)),F(3,(0,o.Inject)(t.DocCanvasPopManagerService)),F(4,o.IPermissionService)],Rt);let zt=class extends o.Disposable{constructor(t,n,r,i,a,s,c,l,u,d,f,p){super(),this._univerInstanceService=t,this._sidebarService=n,this._menuManagerService=r,this._docsShapeService=i,this._localeService=a,this._commandService=s,this._drawingManagerService=c,this._docCanvasPopManagerService=l,this._renderManagerService=u,this._contextService=d,this._shapeTextEditingService=f,this._permissionService=p,H(this,`_sidebarDisposable`,null),H(this,`_activeShapeInfo`,null),H(this,`_isOpenedShapeEditPanel`,!1),H(this,`_shapeEditPanelVersion`,0),H(this,`_disposePopupsByUnit`,/* @__PURE__ */ new Map),H(this,`_popupTargetKeys`,/* @__PURE__ */ new Map),this._initMenu(),this.disposeWithMe(this._univerInstanceService.getCurrentTypeOfUnit$(o.UniverInstanceType.UNIVER_DOC).subscribe(e=>{if(!e){var t;(t=this._sidebarDisposable)==null||t.dispose()}})),this._registerOperations(),this.disposeWithMe(this._drawingManagerService.remove$.subscribe(e=>{for(let t of e){let e=`${t.unitId}:${t.subUnitId}:${t.drawingId}`;for(let[t,n]of this._popupTargetKeys)n===e&&this._clearPopups(t,!0)}})),this.disposeWithMe((0,e.bindRenderTransformerLifecycle)(this._renderManagerService,o.UniverInstanceType.UNIVER_DOC,e=>this._popupMenuListener(e))),this.disposeWithMe(this._shapeTextEditingService.editingParams$.subscribe(e=>{e&&this._clearPopups(void 0,!0)})),this.disposeWithMe(this._permissionService.permissionPointUpdate$.subscribe(()=>{this._drawingManagerService.getFocusDrawings().some(e=>e.drawingType===o.DrawingTypeEnum.DRAWING_SHAPE&&this._univerInstanceService.getUnitType(e.unitId)===o.UniverInstanceType.UNIVER_DOC&&!this._canEditShape(e.unitId,e.drawingId))&&(this._clearPopups(void 0,!0),this._closeShapeEditPanel())}))}_initMenu(){this._menuManagerService.mergeMenu(Qe)}getShapePopupMenus(e,t,n,r){return[{label:`docs-shape-ui.openPanel`,index:0,commandId:j.id,commandParams:{unitId:e,subUnitId:t,drawingId:n},disable:r===o.DrawingTypeEnum.DRAWING_DOM},{label:`docs-shape-ui.deleteShape`,index:1,commandId:c.RemoveDocDrawingCommand.id,commandParams:{unitId:e,drawings:[{unitId:e,subUnitId:t,drawingId:n}]},disable:!1},{label:`docs-shape-ui.hidePanel`,index:2,commandId:B.id,commandParams:{unitId:e,subUnitId:t,drawingId:n},disable:!1}]}_getShapeInfo(e,t,n){let r=this._docsShapeService.getShapeTypeById(e,t,n),i=this._docsShapeService.getShapeDataById(e,t,n);return r!==void 0&&i!==void 0?{shapeData:i,shapeId:n,shapeType:r,unitId:e,subUnitId:t,version:this._shapeEditPanelVersion,disableShapeOption:!1}:null}_clearPopups(e,t=!1){if(e==null){[...this._disposePopupsByUnit.keys()].forEach(e=>this._clearPopups(e,t));return}let n=this._disposePopupsByUnit.get(e);if(n){for(let e=n.length-1;e>=0;--e){let r=n[e];(t||r.canDispose())&&(r.dispose(),n.splice(e,1))}n.length===0&&(this._disposePopupsByUnit.delete(e),this._popupTargetKeys.delete(e))}}_getDisposePopups(e){let t=this._disposePopupsByUnit.get(e);if(t)return t;let n=[];return this._disposePopupsByUnit.set(e,n),n}_popupMenuListener(e){var t;let n=new o.DisposableCollection,r=(t=this._renderManagerService.getAllRenderersOfType(o.UniverInstanceType.UNIVER_DOC).find(t=>t.scene.getTransformerByCreate()===e))==null?void 0:t.unitId;return r&&(n.add(e.createControl$.subscribe(()=>this._handleCreateControl(e,r))),n.add(e.clearControl$.subscribe(()=>{this._clearPopups(r),queueMicrotask(()=>{e.getSelectedObjectMap().size>0||!this._drawingManagerService.getFocusDrawings().some(e=>e.unitId===r)||(this._contextService.setContextValue(o.FOCUSING_COMMON_DRAWINGS,!1),this._drawingManagerService.focusDrawing(null))})})),n.add(e.changing$.subscribe(()=>{this._clearPopups(r,!0)}))),n}_handleCreateControl(e,n){let r=e.getSelectedObjectMap();if(this._isOpenedShapeEditPanel){this._clearPopups(n,!0);return}if(r.size>1){this._clearPopups(n);return}let i=r.values().next().value;if(!i){this._clearPopups(n);return}let a=this._drawingManagerService.getDrawingOKey(i.oKey);if(!a||a.drawingType!==o.DrawingTypeEnum.DRAWING_SHAPE){this._clearPopups(n);return}let{unitId:s,subUnitId:c,drawingId:l,drawingType:u}=a;if(!this._canEditShape(s,l)){this._clearPopups(n,!0);return}let d=this._getShapeInfo(s,c,l);if(!d){this._clearPopups(n);return}let f=this._disposePopupsByUnit.get(n),p=`${s}:${c}:${l}`;if(this._popupTargetKeys.get(n)===p&&f&&f.length>0)return;this._clearPopups(n);let m=this._renderManagerService.getRenderUnitById(s),h=((m==null?void 0:m.isMainScene)===!1?m.with(t.DocCanvasPopManagerService):this._docCanvasPopManagerService).attachPopupToObject(i,this._getShapePopup(d,u),s);this.disposeWithMe(h),this._getDisposePopups(n).push(h),this._popupTargetKeys.set(n,p),this._drawingManagerService.getFocusDrawings().some(e=>e.unitId===s&&e.subUnitId===c&&e.drawingId===l)||this._drawingManagerService.focusDrawing([{unitId:s,subUnitId:c,drawingId:l}])}_getShapePopup(t,n){return{componentKey:xt,requiresStableLayout:!1,direction:`vertical-center`,offset:[0,e.SHEET_DOC_SHAPE_FLOATING_TOOLBAR_TOP_OFFSET],extraProps:{unitId:t.unitId,subUnitId:t.subUnitId,drawingId:t.shapeId,drawingType:n,shapeType:t.shapeType,shapeData:t.shapeData}}}_canEditShape(e,t){let n=this._univerInstanceService.getUnit(e,o.UniverInstanceType.UNIVER_DOC);if(!n)return!1;let r=(0,s.getDocumentDrawingSegmentId)(n,t);return(0,s.canEditDocumentTargets)(this._permissionService,e,[...(0,s.getDocumentEntityParentPermissionObjectIds)(n,r,`drawing`,t),(0,s.getDocumentEntityPermissionObjectId)(r,`drawing`,t)])}_registerOperations(){this.disposeWithMe(this._commandService.onCommandExecuted(e=>{if(e.id===j.id){let{unitId:t,subUnitId:n,drawingId:r}=e.params;this._shapeEditPanelVersion+=1,this._activeShapeInfo=this._getShapeInfo(t,n,r),this._clearPopups(void 0,!0),this._openShapeEditPanel()}if(e.id===B.id&&(this._activeShapeInfo=null,this._closeShapeEditPanel()),e.id===r.UpdateDocShapeDataMutation.id){let{unitId:t,shapeId:n}=e.params;if(this._activeShapeInfo&&this._activeShapeInfo.shapeId===n){let e=this._getShapeInfo(t,this._activeShapeInfo.subUnitId,n);e&&(this._shapeEditPanelVersion+=1,e.version=this._shapeEditPanelVersion,this._activeShapeInfo=e,this._isOpenedShapeEditPanel&&this._openShapeEditPanel())}}})),this.disposeWithMe(this._drawingManagerService.focus$.subscribe(e=>{if(this._isOpenedShapeEditPanel===!1)return;if(e.length===0){this._activeShapeInfo=null,this._closeShapeEditPanel();return}if(e.length===1&&e[0].drawingType===o.DrawingTypeEnum.DRAWING_SHAPE&&(this._shapeEditPanelVersion+=1,this._activeShapeInfo=this._getShapeInfo(e[0].unitId,e[0].subUnitId,e[0].drawingId),this._activeShapeInfo)){this._openShapeEditPanel();return}let t=e.filter(e=>e.drawingType===o.DrawingTypeEnum.DRAWING_SHAPE);if(e.length>1&&t.length===e.length){if(this._shapeEditPanelVersion+=1,this._activeShapeInfo=this._getShapeInfo(e[0].unitId,e[0].subUnitId,e[0].drawingId),this._activeShapeInfo){this._openShapeEditPanel();return}}else if(this._shapeEditPanelVersion+=1,this._activeShapeInfo=this._getShapeInfo(e[0].unitId,e[0].subUnitId,e[0].drawingId),this._activeShapeInfo){this._activeShapeInfo.disableShapeOption=!0,this._openShapeEditPanel();return}this._closeShapeEditPanel()}))}_openShapeEditPanel(){this._activeShapeInfo&&(this._sidebarDisposable=this._sidebarService.open({id:w,header:{title:this._localeService.t(`docs-shape-ui.formatShape`)},width:388,children:{label:w,...this._activeShapeInfo},onClose:()=>{this._drawingManagerService.focusDrawing(null),this._contextService.setContextValue(o.FOCUSING_COMMON_DRAWINGS,!1),this._sidebarDisposable=null}}),this._isOpenedShapeEditPanel=!0)}_closeShapeEditPanel(){this._isOpenedShapeEditPanel=!1,this._sidebarService.close(w),this._sidebarDisposable=null,this._contextService.setContextValue(o.FOCUSING_COMMON_DRAWINGS,!1),this._drawingManagerService.focusDrawing(null)}};zt=I([F(0,o.IUniverInstanceService),F(1,(0,o.Inject)(n.ISidebarService)),F(2,n.IMenuManagerService),F(3,(0,o.Inject)(r.DocsShapeService)),F(4,(0,o.Inject)(o.LocaleService)),F(5,o.ICommandService),F(6,u.IDrawingManagerService),F(7,(0,o.Inject)(t.DocCanvasPopManagerService)),F(8,l.IRenderManagerService),F(9,o.IContextService),F(10,(0,o.Inject)(G)),F(11,o.IPermissionService)],zt);let Bt=class extends o.Disposable{constructor(e,t){super(),this._docsShapeService=e,this._localeService=t,this.disposeWithMe((0,o.toDisposable)((0,l.setDocsCustomBlockRenderViewportProvider)((e,t,n)=>this._measure(e,t,n))))}_measure(t,n,r){let a=this._docsShapeService.getShapeModel(t,n);if(!a)return null;let s=a.getShapeData(),c=(0,i.resolveShapeTextBodyBehavior)(s),u=s.shapeText;if(!u||c.autoFitType!==i.ShapeTextAutoFitType.SpAutoFit)return null;let d=r.fallbackWidth,f=r.fallbackHeight;a.updateContext({width:d,height:f});let p=a.getShapeTextRect({left:0,top:0,width:d,height:f}),m=(0,e.normalizeShapeTextModel)(`dataModel`in u?u.dataModel:void 0),h=(m==null?void 0:m.doc)??(`isRichText`in u?(0,e.plainShapeTextToDocumentData)(u,`${n}-layout`):null);if(!h)return null;let g=(0,e.resolveFormulaShapeAutoFitSize)({documentData:h,height:f,shapeData:s,textRect:p,width:d,widthBuffer:0});g&&({width:d,height:f}=g,a.updateContext({width:d,height:f}),p=a.getShapeTextRect({left:0,top:0,width:d,height:f}));let _=u.isHorizontal!==!1,v=(0,e.prepareShapeTextDocumentData)(h,{isHorizontal:_,textRect:p,verticalAlign:m==null?void 0:m.va,horizontalAlign:m==null?void 0:m.ha,wrapStrategy:(0,e.resolveShapeTextEditorWrapStrategy)(s)}),y=new o.DocumentDataModel(v),b=new l.DocumentViewModel(y),x=l.DocumentSkeleton.create(b,this._localeService);try{var S,C;x.calculate();let e=((S=x.getSkeletonData())==null?void 0:S.pages)??[],t=e[e.length-1],n=t?Math.max(0,((C=(0,l.getLastLine)(t))==null?void 0:C.spaceBelowApply)??0):0,r=x.getActualSize().actualHeight+n-(_?p.height:p.width);return Number.isFinite(r)?_?{width:d,height:Math.max(1,f+r)}:{width:Math.max(1,d+r),height:f}:null}finally{x.dispose(),b.dispose(),y.dispose()}}};Bt=I([F(0,(0,o.Inject)(r.DocsShapeService)),F(1,(0,o.Inject)(o.LocaleService))],Bt);let $=class extends o.Plugin{constructor(e=nt,t,n,r,i){super(),this._config=e,this._injector=t,this._commandService=n,this._configService=r,this._renderManagerService=i;let{menu:a,...s}=(0,o.merge)({},nt,this._config);a&&this._configService.setConfig(`menu`,a,{merge:!0}),this._configService.setConfig(tt,s),this._initCommands()}onStarting(){(0,o.registerDependencies)(this._injector,this._getDependencies()),this._injector.get(jt),this._initUIPart()}_getDependencies(){return[[jt],[zt],[Z],[K],[q],[W],[L],[J],[Bt],[G],[X]]}onReady(){this._getRenderModules().forEach(e=>{this.disposeWithMe(this._renderManagerService.registerRenderModule(o.UniverInstanceType.UNIVER_DOC,e))}),(0,o.touchDependencies)(this._injector,[[zt],[Z],[K],[q],[L],[J],[Bt],[G],[X]])}_getRenderModules(){return[[W],[It],[Rt],[Mt]]}onRendered(){this.disposeWithMe(this._renderManagerService.registerRenderModule(o.UniverInstanceType.UNIVER_DOC,[Lt]))}_initCommands(){[C,B,j,A,N,P].forEach(e=>this.disposeWithMe(this._commandService.registerCommand(e)))}_initUIPart(){let e=this._injector,t=e.get(n.IUIPartsService);this.disposeWithMe(t.registerComponent(n.BuiltInUIPart.CONTENT,()=>(0,n.connectInjector)(Dt,e)))}};H($,`type`,o.UniverInstanceType.UNIVER_DOC),H($,`pluginName`,`DOCS_SHAPE_UI_PLUGIN`),H($,`packageName`,$e),H($,`version`,et),$=I([(0,o.DependentOn)(m.UniverLicensePlugin,s.UniverDocsPlugin,u.UniverDrawingPlugin,d.UniverDrawingUIPlugin,l.UniverRenderEnginePlugin,t.UniverDocsUIPlugin,a.UniverShapeEditorPlugin,h.UniverDocsDrawingUIPlugin,r.UniverDocsShapePlugin,e.UniverShapeEditorUIPlugin),F(1,(0,o.Inject)(o.Injector)),F(2,o.ICommandService),F(3,o.IConfigService),F(4,l.IRenderManagerService)],$),exports.DocsShapeUIMenuSchema=Qe,Object.defineProperty(exports,"UniverDocsShapeMobileUIPlugin",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,"UniverDocsShapeUIPlugin",{enumerable:!0,get:function(){return $}});
|