@univerjs-pro/sheets-shape 0.21.0 → 0.21.1-insiders.20260429-a0b1161

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/facade.js CHANGED
@@ -1 +1 @@
1
- const _0x2ffec3=_0x136b;(function(_0x5b702c,_0x4695c9){const _0x3fceb8=_0x136b,_0x581608=_0x5b702c();while(!![]){try{const _0x5083fd=-parseInt(_0x3fceb8(0x1b4))/0x1*(-parseInt(_0x3fceb8(0x221))/0x2)+-parseInt(_0x3fceb8(0x202))/0x3*(-parseInt(_0x3fceb8(0x22a))/0x4)+-parseInt(_0x3fceb8(0x20b))/0x5+-parseInt(_0x3fceb8(0x214))/0x6+-parseInt(_0x3fceb8(0x204))/0x7+-parseInt(_0x3fceb8(0x205))/0x8+parseInt(_0x3fceb8(0x1d8))/0x9*(parseInt(_0x3fceb8(0x1c4))/0xa);if(_0x5083fd===_0x4695c9)break;else _0x581608['push'](_0x581608['shift']());}catch(_0x418462){_0x581608['push'](_0x581608['shift']());}}}(_0x1762,0x67805),Object[_0x2ffec3(0x229)](exports,Symbol[_0x2ffec3(0x1b6)],{'value':_0x2ffec3(0x1ec)}));function _0x136b(_0x7be385,_0x1b9db4){_0x7be385=_0x7be385-0x1ab;const _0x1762b3=_0x1762();let _0x136b31=_0x1762b3[_0x7be385];return _0x136b31;}let _univerjs_pro_engine_shape=require('@univerjs-pro/engine-shape'),_univerjs_core_facade=require('@univerjs/core/facade'),_univerjs_pro_sheets_shape=require('@univerjs-pro/sheets-shape'),_univerjs_core=require('@univerjs/core'),_univerjs_drawing=require('@univerjs/drawing'),_univerjs_sheets=require('@univerjs/sheets'),_univerjs_sheets_drawing=require('@univerjs/sheets-drawing'),_univerjs_sheets_facade=require('@univerjs/sheets/facade');var FSheetsShapeEnumMixin=class extends _univerjs_core_facade[_0x2ffec3(0x1b7)]{get['ShapeTypeEnum'](){const _0x20746e=_0x2ffec3;return _univerjs_pro_engine_shape[_0x20746e(0x1ee)];}get[_0x2ffec3(0x225)](){const _0x2adb10=_0x2ffec3;return _univerjs_pro_engine_shape[_0x2adb10(0x225)];}get['ShapeGradientTypeEnum'](){const _0x6bfb64=_0x2ffec3;return _univerjs_pro_engine_shape[_0x6bfb64(0x222)];}get[_0x2ffec3(0x218)](){const _0x10f16b=_0x2ffec3;return _univerjs_pro_engine_shape[_0x10f16b(0x218)];}get[_0x2ffec3(0x23d)](){const _0x50438a=_0x2ffec3;return _univerjs_pro_engine_shape[_0x50438a(0x23d)];}get[_0x2ffec3(0x1e8)](){const _0x1e8d6b=_0x2ffec3;return _univerjs_pro_engine_shape[_0x1e8d6b(0x1e8)];}get[_0x2ffec3(0x233)](){const _0x5ebf9d=_0x2ffec3;return _univerjs_pro_engine_shape[_0x5ebf9d(0x233)];}get[_0x2ffec3(0x20a)](){return _univerjs_pro_engine_shape['ShapeArrowTypeEnum'];}get[_0x2ffec3(0x22f)](){return _univerjs_pro_engine_shape['ShapeArrowSizeEnum'];}};_univerjs_core_facade[_0x2ffec3(0x1b7)]['extend'](FSheetsShapeEnumMixin);function _typeof(_0x4f96e1){'@babel/helpers - typeof';const _0xfc47=_0x2ffec3;return _typeof='function'==typeof Symbol&&_0xfc47(0x1f6)==typeof Symbol[_0xfc47(0x1e5)]?function(_0x4175be){return typeof _0x4175be;}:function(_0x9607ff){const _0x1c511d=_0xfc47;return _0x9607ff&&_0x1c511d(0x1fc)==typeof Symbol&&_0x9607ff['constructor']===Symbol&&_0x9607ff!==Symbol[_0x1c511d(0x217)]?_0x1c511d(0x1f6):typeof _0x9607ff;},_typeof(_0x4f96e1);}function toPrimitive(_0x45ad38,_0x5a69df){const _0x3b5e84=_0x2ffec3;if(_0x3b5e84(0x23a)!=_typeof(_0x45ad38)||!_0x45ad38)return _0x45ad38;var _0x35142a=_0x45ad38[Symbol[_0x3b5e84(0x1f7)]];if(void 0x0!==_0x35142a){var _0x2bd39f=_0x35142a[_0x3b5e84(0x1db)](_0x45ad38,_0x5a69df||_0x3b5e84(0x20f));if(_0x3b5e84(0x23a)!=_typeof(_0x2bd39f))return _0x2bd39f;throw new TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return('string'===_0x5a69df?String:Number)(_0x45ad38);}function toPropertyKey(_0x420af5){const _0x17764f=_0x2ffec3;var _0x2e2fe2=toPrimitive(_0x420af5,_0x17764f(0x200));return _0x17764f(0x1f6)==_typeof(_0x2e2fe2)?_0x2e2fe2:_0x2e2fe2+'';}function _defineProperty(_0x490f3c,_0x260caf,_0x3d6419){const _0x19bca9=_0x2ffec3;return(_0x260caf=toPropertyKey(_0x260caf))in _0x490f3c?Object[_0x19bca9(0x229)](_0x490f3c,_0x260caf,{'value':_0x3d6419,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x490f3c[_0x260caf]=_0x3d6419,_0x490f3c;}var FShape=class{constructor(_0x609e53,_0xd65334,_0x22a753,_0x5b721b){const _0x2f60e7=_0x2ffec3;_defineProperty(this,'unitId',void 0x0),_defineProperty(this,_0x2f60e7(0x21c),void 0x0),_defineProperty(this,_0x2f60e7(0x227),void 0x0),_defineProperty(this,'x',0x0),_defineProperty(this,'y',0x0),_defineProperty(this,_0x2f60e7(0x1e6),_univerjs_pro_sheets_shape['DEFAULT_SHAPE_WIDTH']),_defineProperty(this,_0x2f60e7(0x1d2),_univerjs_pro_sheets_shape['DEFAULT_SHAPE_HEIGHT']),_defineProperty(this,_0x2f60e7(0x1fe),void 0x0),_defineProperty(this,_0x2f60e7(0x1ef),{}),_defineProperty(this,_0x2f60e7(0x1f4),void 0x0),this[_0x2f60e7(0x1bf)]=_0x609e53,this[_0x2f60e7(0x21c)]=_0xd65334,this[_0x2f60e7(0x227)]=_0x22a753||(0x0,_univerjs_core[_0x2f60e7(0x232)])(),this[_0x2f60e7(0x1f4)]=_0x5b721b;}[_0x2ffec3(0x1b8)](_0x1ca459,_0x45789a,_0x2ecb6c,_0x9b8b56){const _0x5984f8=_0x2ffec3,_0x25473f=this[_0x5984f8(0x1f4)][_0x5984f8(0x234)](_univerjs_sheets[_0x5984f8(0x22c)])[_0x5984f8(0x201)](this[_0x5984f8(0x1bf)],this[_0x5984f8(0x21c)]);if(!_0x25473f)throw new Error(_0x5984f8(0x1e3)+this[_0x5984f8(0x1bf)]+_0x5984f8(0x230)+this[_0x5984f8(0x21c)]+'\x20not\x20found');const {transform:_0x23f7ec}=(0x0,_univerjs_sheets[_0x5984f8(0x1f1)])(this[_0x5984f8(0x1bf)],this['subUnitId'],{'row':_0x1ca459,'column':_0x45789a,'rowOffset':_0x2ecb6c,'columnOffset':_0x9b8b56},0x1,0x1,_0x25473f);return this['x']=_0x23f7ec[_0x5984f8(0x1c9)],this['y']=_0x23f7ec[_0x5984f8(0x1eb)],this;}[_0x2ffec3(0x23c)](_0x44bb90,_0x5c9914){return this['x']=_0x44bb90,this['y']=_0x5c9914,this;}[_0x2ffec3(0x21a)](_0x48e5d3){const _0x141748=_0x2ffec3;return this[_0x141748(0x1fe)]=_0x48e5d3,this;}[_0x2ffec3(0x1c2)](_0x5e22b1,_0x9e734a){const _0x196f91=_0x2ffec3;if(!this[_0x196f91(0x1ef)][_0x196f91(0x1f2)])this[_0x196f91(0x1ef)][_0x196f91(0x1f2)]={};this[_0x196f91(0x1ef)][_0x196f91(0x1f2)][_0x196f91(0x1de)]=_univerjs_pro_engine_shape[_0x196f91(0x225)][_0x196f91(0x21e)];if(_0x5e22b1!==void 0x0)this[_0x196f91(0x1ef)][_0x196f91(0x1f2)]['color']=_0x5e22b1;if(_0x9e734a!==void 0x0)this['shapeData']['fill'][_0x196f91(0x219)]=_0x9e734a;return this;}[_0x2ffec3(0x1af)](_0x583f50,_0xaaae75,_0x5285b8){const _0x4007e6=_0x2ffec3;if(_0xaaae75===void 0x0||_0xaaae75[_0x4007e6(0x1bc)]===0x0)throw new Error(_0x4007e6(0x1cf));if(!this[_0x4007e6(0x1ef)][_0x4007e6(0x1f2)])this[_0x4007e6(0x1ef)][_0x4007e6(0x1f2)]={};this[_0x4007e6(0x1ef)][_0x4007e6(0x1f2)][_0x4007e6(0x21d)]=_0xaaae75,this['shapeData'][_0x4007e6(0x1f2)]['fillType']=_univerjs_pro_engine_shape[_0x4007e6(0x225)][_0x4007e6(0x1d5)],this[_0x4007e6(0x1ef)][_0x4007e6(0x1f2)][_0x4007e6(0x226)]=_0x583f50;if(_0x5285b8!==void 0x0)this[_0x4007e6(0x1ef)][_0x4007e6(0x1f2)][_0x4007e6(0x1dd)]=_0x5285b8;return this;}[_0x2ffec3(0x1f3)](){const _0x5ee519=_0x2ffec3;return this[_0x5ee519(0x1ef)][_0x5ee519(0x1f2)]={'fillType':_univerjs_pro_engine_shape[_0x5ee519(0x225)][_0x5ee519(0x210)]},this;}[_0x2ffec3(0x228)](_0x58e0c6){const _0x554a70=_0x2ffec3;if(!this[_0x554a70(0x1ef)]['stroke'])this[_0x554a70(0x1ef)][_0x554a70(0x1ed)]={};return this['shapeData'][_0x554a70(0x1ed)][_0x554a70(0x21f)]=_0x58e0c6,this;}[_0x2ffec3(0x1cb)](_0x14c66d){const _0xff80cf=_0x2ffec3;if(!this[_0xff80cf(0x1ef)]['stroke'])this['shapeData'][_0xff80cf(0x1ed)]={};return this['shapeData'][_0xff80cf(0x1ed)]['width']=_0x14c66d,this;}['setStrokeLineDashType'](_0x171a96){const _0x264f9d=_0x2ffec3;if(!this[_0x264f9d(0x1ef)][_0x264f9d(0x1ed)])this['shapeData']['stroke']={};return this['shapeData'][_0x264f9d(0x1ed)][_0x264f9d(0x1be)]=_0x171a96,this;}[_0x2ffec3(0x1f8)](_0x29dbe6){const _0x701adb=_0x2ffec3;if(!this[_0x701adb(0x1ef)][_0x701adb(0x1ed)])this['shapeData'][_0x701adb(0x1ed)]={};return this[_0x701adb(0x1ef)]['stroke']['lineJoinType']=_0x29dbe6,this;}['setStrokeLineCapType'](_0x2985cf){const _0xb3e2f1=_0x2ffec3;if(!this['shapeData'][_0xb3e2f1(0x1ed)])this[_0xb3e2f1(0x1ef)][_0xb3e2f1(0x1ed)]={};return this['shapeData']['stroke']['capType']=_0x2985cf,this;}['setStrokeOpacity'](_0x26600e){const _0x2be987=_0x2ffec3;if(!this[_0x2be987(0x1ef)][_0x2be987(0x1ed)])this[_0x2be987(0x1ef)][_0x2be987(0x1ed)]={};return this[_0x2be987(0x1ef)]['stroke'][_0x2be987(0x219)]=_0x26600e,this;}[_0x2ffec3(0x224)](_0x20a087){const _0x294dc5=_0x2ffec3;if(!this[_0x294dc5(0x1ef)][_0x294dc5(0x1ed)])this[_0x294dc5(0x1ef)][_0x294dc5(0x1ed)]={};return this['shapeData'][_0x294dc5(0x1ed)]['lineStrokeType']=_0x20a087,this;}['setWidth'](_0x4a25e1){return this['width']=_0x4a25e1,this;}['setHeight'](_0x3103fd){const _0x202043=_0x2ffec3;return this[_0x202043(0x1d2)]=_0x3103fd,this;}[_0x2ffec3(0x209)](){const _0x2c46e7=_0x2ffec3,_0x10a163=this['_injector'][_0x2c46e7(0x234)](_univerjs_pro_sheets_shape['SheetsShapeService'])['getShapeModel'](this[_0x2c46e7(0x1bf)],this[_0x2c46e7(0x21c)],this[_0x2c46e7(0x227)]);if(_0x10a163)return(0x0,_univerjs_pro_engine_shape[_0x2c46e7(0x206)])(_0x10a163[_0x2c46e7(0x1ac)]());if(this[_0x2c46e7(0x1fe)])return(0x0,_univerjs_pro_engine_shape[_0x2c46e7(0x206)])(this['shapeType']);return![];}[_0x2ffec3(0x1da)](){const _0x12b69f=_0x2ffec3,_0x542a3f=this['_injector'][_0x12b69f(0x234)](_univerjs_pro_sheets_shape[_0x12b69f(0x1ff)])[_0x12b69f(0x1b2)](this[_0x12b69f(0x1bf)],this[_0x12b69f(0x21c)],this[_0x12b69f(0x227)]);if(!_0x542a3f)return[];const _0x35545b=this[_0x12b69f(0x1f4)][_0x12b69f(0x234)](_univerjs_drawing['IDrawingManagerService'])['getDrawingByParam']({'unitId':this[_0x12b69f(0x1bf)],'subUnitId':this[_0x12b69f(0x21c)],'drawingId':this[_0x12b69f(0x227)]});if(!(_0x35545b===null||_0x35545b===void 0x0?void 0x0:_0x35545b[_0x12b69f(0x1cd)]))return[];const {width:width=0x0,height:height=0x0}=_0x35545b[_0x12b69f(0x1cd)];return _0x542a3f[_0x12b69f(0x1bb)]({'width':width,'height':height}),_0x542a3f[_0x12b69f(0x208)]();}[_0x2ffec3(0x1d0)](){const _0x375f4d=_0x2ffec3,_0x1bedb5=this[_0x375f4d(0x1f4)][_0x375f4d(0x234)](_univerjs_pro_sheets_shape[_0x375f4d(0x1ff)])['getShapeModel'](this[_0x375f4d(0x1bf)],this[_0x375f4d(0x21c)],this['drawId']);if(!_0x1bedb5)return[];const _0x3936cb=this[_0x375f4d(0x1f4)][_0x375f4d(0x234)](_univerjs_drawing[_0x375f4d(0x1c1)])[_0x375f4d(0x212)]({'unitId':this[_0x375f4d(0x1bf)],'subUnitId':this['subUnitId'],'drawingId':this[_0x375f4d(0x227)]});if(!(_0x3936cb===null||_0x3936cb===void 0x0?void 0x0:_0x3936cb[_0x375f4d(0x1cd)]))return[];const {width:width=0x0,height:height=0x0}=_0x3936cb[_0x375f4d(0x1cd)];return _0x1bedb5[_0x375f4d(0x1bb)]({'width':width,'height':height}),_0x1bedb5[_0x375f4d(0x1ad)]();}['getConnectorLinePoints'](){const _0x3215d8=_0x2ffec3,_0x583338=this[_0x3215d8(0x1f4)][_0x3215d8(0x234)](_univerjs_pro_sheets_shape['SheetsShapeService'])[_0x3215d8(0x1b2)](this[_0x3215d8(0x1bf)],this['subUnitId'],this[_0x3215d8(0x227)]);if(!_0x583338)return[];if(!(0x0,_univerjs_pro_engine_shape[_0x3215d8(0x206)])(_0x583338[_0x3215d8(0x1ac)]()))return[];const _0x41a8c8=this[_0x3215d8(0x1f4)][_0x3215d8(0x234)](_univerjs_drawing[_0x3215d8(0x1c1)])['getDrawingByParam']({'unitId':this['unitId'],'subUnitId':this[_0x3215d8(0x21c)],'drawingId':this['drawId']});if(!(_0x41a8c8===null||_0x41a8c8===void 0x0?void 0x0:_0x41a8c8[_0x3215d8(0x1cd)]))return[];const {width:width=0x0,height:height=0x0}=_0x41a8c8[_0x3215d8(0x1cd)];return _0x583338[_0x3215d8(0x1bb)]({'width':width,'height':height}),_0x583338['getConnectorLinePoints']();}[_0x2ffec3(0x1ba)](){const _0x40960a=_0x2ffec3;var _0x4dd45b;const _0x213a4c=this[_0x40960a(0x1f4)][_0x40960a(0x234)](_univerjs_pro_sheets_shape[_0x40960a(0x1ff)])[_0x40960a(0x1b2)](this[_0x40960a(0x1bf)],this[_0x40960a(0x21c)],this[_0x40960a(0x227)]);if(!_0x213a4c)return null;return(_0x4dd45b=_0x213a4c['getStartConnectInfo']())!==null&&_0x4dd45b!==void 0x0?_0x4dd45b:null;}[_0x2ffec3(0x1ab)](){const _0x1432cc=_0x2ffec3;var _0x56d483;const _0x46a9eb=this[_0x1432cc(0x1f4)][_0x1432cc(0x234)](_univerjs_pro_sheets_shape[_0x1432cc(0x1ff)])[_0x1432cc(0x1b2)](this[_0x1432cc(0x1bf)],this[_0x1432cc(0x21c)],this[_0x1432cc(0x227)]);if(!_0x46a9eb)return null;return(_0x56d483=_0x46a9eb[_0x1432cc(0x1ab)]())!==null&&_0x56d483!==void 0x0?_0x56d483:null;}[_0x2ffec3(0x231)](){const _0x4bced2=_0x2ffec3;var _0x531efe,_0x5952ad;if(!this[_0x4bced2(0x1fe)])throw new Error(_0x4bced2(0x1ae));if(this['x']===0x0||this['y']===0x0){const _0x9f74f4=this[_0x4bced2(0x1f4)]['get'](_univerjs_sheets[_0x4bced2(0x22c)])[_0x4bced2(0x201)](this[_0x4bced2(0x1bf)],this[_0x4bced2(0x21c)]);if(!_0x9f74f4)throw new Error(_0x4bced2(0x1e3)+this[_0x4bced2(0x1bf)]+_0x4bced2(0x230)+this[_0x4bced2(0x21c)]+'\x20not\x20found');const {transform:_0x1d29e0}=(0x0,_univerjs_sheets[_0x4bced2(0x1f1)])(this[_0x4bced2(0x1bf)],this[_0x4bced2(0x21c)],{'row':0x1,'column':0x1,'rowOffset':0x0,'columnOffset':0x0},0x1,0x1,_0x9f74f4);this['x']=this['x']>0x0?this['x']:_0x1d29e0['left'],this['y']=this['y']>0x0?this['y']:_0x1d29e0[_0x4bced2(0x1eb)];}return this['width']=(_0x531efe=this[_0x4bced2(0x1e6)])!==null&&_0x531efe!==void 0x0?_0x531efe:_univerjs_pro_sheets_shape['DEFAULT_SHAPE_WIDTH'],this['height']=(_0x5952ad=this[_0x4bced2(0x1d2)])!==null&&_0x5952ad!==void 0x0?_0x5952ad:_univerjs_pro_sheets_shape[_0x4bced2(0x1ea)],{'unitId':this[_0x4bced2(0x1bf)],'subUnitId':this[_0x4bced2(0x21c)],'shapeId':this[_0x4bced2(0x227)],'shapeType':this[_0x4bced2(0x1fe)],'shapeData':Object[_0x4bced2(0x220)](this[_0x4bced2(0x1ef)])[_0x4bced2(0x1bc)]>0x0?this[_0x4bced2(0x1ef)]:void 0x0,'x':this['x'],'y':this['y'],'width':this['width'],'height':this[_0x4bced2(0x1d2)]};}[_0x2ffec3(0x1b9)](){return this['drawId'];}['getShapeType'](){const _0x3137c0=_0x2ffec3;return this[_0x3137c0(0x1fe)];}[_0x2ffec3(0x1c7)](){const _0x1b031d=_0x2ffec3;return this[_0x1b031d(0x1ef)];}[_0x2ffec3(0x1c6)](){return{'x':this['x'],'y':this['y']};}[_0x2ffec3(0x1d1)](){const _0x4e1088=_0x2ffec3;return{'width':this[_0x4e1088(0x1e6)],'height':this['height']};}},FConnectorShape=class extends FShape{constructor(_0xa8374e,_0xc26624,_0x5f2d0f,_0x25ac2f){const _0x471e36=_0x2ffec3;super(_0xa8374e,_0xc26624,_0x5f2d0f,_0x25ac2f),_defineProperty(this,_0x471e36(0x1ef),{});}[_0x2ffec3(0x21a)](_0x5d046f){const _0x195888=_0x2ffec3;if(!(0x0,_univerjs_pro_engine_shape[_0x195888(0x206)])(_0x5d046f))throw new Error(_0x195888(0x215)+_0x5d046f+',\x20but\x20expected\x20a\x20connector\x20shape\x20type.');return super[_0x195888(0x21a)](_0x5d046f),this;}[_0x2ffec3(0x1df)](_0x522e99){const _0x2a577b=_0x2ffec3;var _0x30921f,_0xaa4441;if(!((_0x30921f=this['shapeData'])===null||_0x30921f===void 0x0?void 0x0:_0x30921f['ln']))this[_0x2a577b(0x1ef)]['ln']={};if(!((_0xaa4441=this[_0x2a577b(0x1ef)])===null||_0xaa4441===void 0x0||(_0xaa4441=_0xaa4441['ln'])===null||_0xaa4441===void 0x0?void 0x0:_0xaa4441[_0x2a577b(0x216)]))this[_0x2a577b(0x1ef)]['ln']['startArrow']={};return this['shapeData']['ln'][_0x2a577b(0x216)][_0x2a577b(0x1dc)]=_0x522e99,this;}[_0x2ffec3(0x223)](_0x33aa95){const _0x11a8a0=_0x2ffec3;var _0x1cba40,_0x2f2d37;if(!((_0x1cba40=this['shapeData'])===null||_0x1cba40===void 0x0?void 0x0:_0x1cba40['ln']))this['shapeData']['ln']={};if(!((_0x2f2d37=this[_0x11a8a0(0x1ef)])===null||_0x2f2d37===void 0x0||(_0x2f2d37=_0x2f2d37['ln'])===null||_0x2f2d37===void 0x0?void 0x0:_0x2f2d37['endArrow']))this[_0x11a8a0(0x1ef)]['ln'][_0x11a8a0(0x22e)]={};return this[_0x11a8a0(0x1ef)]['ln']['endArrow'][_0x11a8a0(0x1dc)]=_0x33aa95,this;}[_0x2ffec3(0x238)](_0x4cbbbf){const _0x2ac2bb=_0x2ffec3;var _0x1b867d,_0x21cc50;if(!((_0x1b867d=this[_0x2ac2bb(0x1ef)])===null||_0x1b867d===void 0x0?void 0x0:_0x1b867d['ln']))this[_0x2ac2bb(0x1ef)]['ln']={};if(!((_0x21cc50=this[_0x2ac2bb(0x1ef)])===null||_0x21cc50===void 0x0||(_0x21cc50=_0x21cc50['ln'])===null||_0x21cc50===void 0x0?void 0x0:_0x21cc50[_0x2ac2bb(0x216)]))this[_0x2ac2bb(0x1ef)]['ln'][_0x2ac2bb(0x216)]={};return this[_0x2ac2bb(0x1ef)]['ln']['startArrow']['size']=_0x4cbbbf,this;}['setEndArrowSize'](_0x267b6e){const _0x43be7a=_0x2ffec3;var _0x2ec096,_0x32bc94;if(!((_0x2ec096=this[_0x43be7a(0x1ef)])===null||_0x2ec096===void 0x0?void 0x0:_0x2ec096['ln']))this[_0x43be7a(0x1ef)]['ln']={};if(!((_0x32bc94=this[_0x43be7a(0x1ef)])===null||_0x32bc94===void 0x0||(_0x32bc94=_0x32bc94['ln'])===null||_0x32bc94===void 0x0?void 0x0:_0x32bc94[_0x43be7a(0x22e)]))this[_0x43be7a(0x1ef)]['ln']['endArrow']={};return this['shapeData']['ln'][_0x43be7a(0x22e)]['size']=_0x267b6e,this;}[_0x2ffec3(0x231)](){return super['build']();}['getEndConnectInfo'](){const _0x250e51=_0x2ffec3;var _0x461ba1;return((_0x461ba1=this['shapeData'])===null||_0x461ba1===void 0x0||(_0x461ba1=_0x461ba1[_0x250e51(0x1c0)])===null||_0x461ba1===void 0x0?void 0x0:_0x461ba1['to'])||null;}['getStartConnectInfo'](){const _0x245385=_0x2ffec3;var _0x37d791;return((_0x37d791=this[_0x245385(0x1ef)])===null||_0x37d791===void 0x0||(_0x37d791=_0x37d791[_0x245385(0x1c0)])===null||_0x37d791===void 0x0?void 0x0:_0x37d791[_0x245385(0x22b)])||null;}};function computeConnectionPointInfo(_0x3785f1,_0x369367,_0x1b3c45,_0x40077f,_0x178da2,_0x3b45e2){const _0x539e08=_0x2ffec3,_0x8c18d2=_0x178da2[_0x539e08(0x1b2)](_0x3785f1,_0x369367,_0x1b3c45);if(!_0x8c18d2)return null;const _0x4e4e43=_0x3b45e2[_0x539e08(0x212)]({'unitId':_0x3785f1,'subUnitId':_0x369367,'drawingId':_0x1b3c45});if(!(_0x4e4e43===null||_0x4e4e43===void 0x0?void 0x0:_0x4e4e43[_0x539e08(0x1cd)]))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x998d82}=_0x4e4e43[_0x539e08(0x1cd)];_0x8c18d2[_0x539e08(0x1bb)]({'width':width,'height':height});const _0x3eb5e2=_0x8c18d2['getConnectionSiteList']()[_0x539e08(0x1f5)](_0xabcbe9=>_0xabcbe9[_0x539e08(0x1d7)]===_0x40077f);if(!_0x3eb5e2)return null;let _0x152a86=flipX?width-_0x3eb5e2['x']:_0x3eb5e2['x'],_0x3aec65=flipY?height-_0x3eb5e2['y']:_0x3eb5e2['y'];if(_0x998d82&&_0x998d82!==0x0){const _0x5cecb9=_0x998d82*Math['PI']/0xb4,_0x2dcff8=Math['cos'](_0x5cecb9),_0x16d1ce=Math['sin'](_0x5cecb9),_0x133899=width/0x2,_0x42ee57=height/0x2,_0x3be980=_0x152a86-_0x133899,_0x6545ad=_0x3aec65-_0x42ee57;_0x152a86=_0x133899+_0x3be980*_0x2dcff8-_0x6545ad*_0x16d1ce,_0x3aec65=_0x42ee57+_0x3be980*_0x16d1ce+_0x6545ad*_0x2dcff8;}_0x152a86+=left,_0x3aec65+=top;let _0x3f1cae=_0x3eb5e2[_0x539e08(0x20c)]/0xea60;if(flipX)_0x3f1cae=0xb4-_0x3f1cae;if(flipY)_0x3f1cae=-_0x3f1cae;_0x3f1cae+=_0x998d82||0x0,_0x3f1cae=(_0x3f1cae%0x168+0x168)%0x168;const _0x291937=(0x0,_univerjs_pro_engine_shape[_0x539e08(0x1c3)])({'left':left,'top':top,'width':width,'height':height},_0x998d82||0x0);return{'point':{'x':_0x152a86,'y':_0x3aec65},'angle':_0x3f1cae,'bounds':_0x291937};}function calculateFreeEndpointAngle(_0x9e5594,_0x57d4c4){const _0x3fb5f0=_0x2ffec3,_0x519bbc=_0x57d4c4['x']-_0x9e5594['x'],_0x409414=_0x57d4c4['y']-_0x9e5594['y'];if(Math[_0x3fb5f0(0x1b0)](_0x519bbc)>=Math[_0x3fb5f0(0x1b0)](_0x409414))return _0x519bbc>=0x0?0xb4:0x0;return _0x409414>=0x0?0x10e:0x5a;}function computeFreeEndpointInfo(_0x3adc35,_0x5ccc42,_0x3827c4,_0x14ba6c,_0x5df9ac,_0x54eeb3,_0x30c027){const _0xe5e940=_0x2ffec3,_0x2c2212=_0x54eeb3[_0xe5e940(0x1b2)](_0x3adc35,_0x5ccc42,_0x3827c4);if(!_0x2c2212)return null;const _0x38624d=_0x30c027[_0xe5e940(0x212)]({'unitId':_0x3adc35,'subUnitId':_0x5ccc42,'drawingId':_0x3827c4});if(!(_0x38624d===null||_0x38624d===void 0x0?void 0x0:_0x38624d['transform']))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![]}=_0x38624d[_0xe5e940(0x1cd)];_0x2c2212[_0xe5e940(0x1bb)]({'width':width,'height':height});const _0x5f3f83=_0x2c2212['getConnectorLinePoints']();if(_0x5f3f83[_0xe5e940(0x1bc)]<0x2)return null;const _0x58fb7e=_0x14ba6c?_0x5f3f83[0x0]:_0x5f3f83[_0x5f3f83[_0xe5e940(0x1bc)]-0x1],_0x3a7b6a=new _univerjs_pro_engine_shape[(_0xe5e940(0x1f0))]({'left':left,'top':top,'width':width,'height':height,'flipX':flipX,'flipY':flipY})['localToWorld'](_0x58fb7e);return{'point':_0x3a7b6a,'angle':calculateFreeEndpointAngle(_0x5df9ac[_0xe5e940(0x207)],_0x3a7b6a),'bounds':{'left':_0x3a7b6a['x'],'top':_0x3a7b6a['y'],'width':0x0,'height':0x0}};}var FWorksheetShapeMixin=class extends _univerjs_sheets_facade[_0x2ffec3(0x22d)]{async['insertShape'](_0xd384ba){const _0x7dc525=_0x2ffec3,{unitId:_0x5902ad,subUnitId:_0x5bb4dc,shapeId:_0x5c1b63,shapeType:_0x49b8cc,shapeData:_0x249465,x:_0x3904e6,y:_0x30cd7c,width:_0x1d0a6d,height:_0x33c68d}=_0xd384ba;return this[_0x7dc525(0x1e0)][_0x7dc525(0x1fa)](_univerjs_pro_sheets_shape[_0x7dc525(0x23e)]['id'],{'unitId':_0x5902ad,'subUnitId':_0x5bb4dc,'shapeId':_0x5c1b63,'shapeType':_0x49b8cc,'shapeData':_0x249465,'position':{'x':_0x3904e6,'y':_0x30cd7c},'width':_0x1d0a6d,'height':_0x33c68d});}async[_0x2ffec3(0x1d3)](_0x28d65a){const _0x999cec=_0x2ffec3,{unitId:_0x2ff084,subUnitId:_0x5ab35c,shapeId:_0x77b81a,shapeType:_0x25a6a7,shapeData:_0x1d465b,x:_0x2d86da,y:_0x27ed09,width:_0x1091d2,height:_0x3430c2}=_0x28d65a;return this[_0x999cec(0x1e0)][_0x999cec(0x1fa)](_univerjs_pro_sheets_shape[_0x999cec(0x237)]['id'],{'unitId':_0x2ff084,'subUnitId':_0x5ab35c,'shapeId':_0x77b81a,'shapeType':_0x25a6a7,'shapeData':_0x1d465b,'position':{'x':_0x2d86da,'y':_0x27ed09},'width':_0x1091d2,'height':_0x3430c2});}[_0x2ffec3(0x1cc)](_0x5e17f8){const _0x2470c0=_0x2ffec3,_0x54c54d=this['getWorkbook']()[_0x2470c0(0x203)](),_0x539370=this[_0x2470c0(0x1b5)]();if(_0x5e17f8){const _0x442321=new FShape(_0x54c54d,_0x539370,_0x5e17f8['drawId'],this[_0x2470c0(0x1f4)]);return this[_0x2470c0(0x1d4)](_0x442321,_0x54c54d,_0x539370,_0x5e17f8[_0x2470c0(0x227)]),_0x442321;}return new FShape(_0x54c54d,_0x539370,(0x0,_univerjs_core[_0x2470c0(0x232)])(),this['_injector']);}[_0x2ffec3(0x239)](_0x5ad95b){const _0x22916d=_0x2ffec3,_0x2ae157=this[_0x22916d(0x1e9)]()['getUnitId'](),_0x3492c2=this[_0x22916d(0x1b5)]();if(_0x5ad95b){const _0x5baaca=new FConnectorShape(_0x2ae157,_0x3492c2,_0x5ad95b[_0x22916d(0x227)],this['_injector']);return this['_preloadShapeProperties'](_0x5baaca,_0x2ae157,_0x3492c2,_0x5ad95b['drawId']),_0x5baaca;}return new FConnectorShape(_0x2ae157,_0x3492c2,(0x0,_univerjs_core['generateRandomId'])(),this[_0x22916d(0x1f4)]);}['getShapes'](){const _0x58046d=_0x2ffec3,_0x58aa40=this['_injector'][_0x58046d(0x234)](_univerjs_sheets_drawing[_0x58046d(0x23b)]),_0x45175d=this[_0x58046d(0x1e9)]()['getUnitId'](),_0x554037=this['getSheetId'](),_0x395a2b=_0x58aa40['getDrawingData'](_0x45175d,_0x554037);if(!_0x395a2b)return[];const _0x14df61=[];for(const [_0x237f96,_0x2375e2]of Object[_0x58046d(0x1f9)](_0x395a2b))if(_0x2375e2&&_0x2375e2[_0x58046d(0x1e4)]===_univerjs_core[_0x58046d(0x1d6)][_0x58046d(0x20d)]){const _0x5e9580=new FShape(_0x45175d,_0x554037,_0x237f96,this[_0x58046d(0x1f4)]);this[_0x58046d(0x1d4)](_0x5e9580,_0x45175d,_0x554037,_0x237f96),_0x14df61[_0x58046d(0x1e7)](_0x5e9580);}return _0x14df61;}[_0x2ffec3(0x211)](_0x5f5837){const _0x4ab94a=_0x2ffec3,{unitId:_0x3b94eb,subUnitId:_0x5abaf9,drawId:_0x56c15a}=_0x5f5837;return this[_0x4ab94a(0x1e0)][_0x4ab94a(0x1fa)](_univerjs_sheets_drawing['RemoveSheetDrawingCommand']['id'],{'unitId':_0x3b94eb,'drawings':[{'unitId':_0x3b94eb,'subUnitId':_0x5abaf9,'drawingId':_0x56c15a,'drawingType':_univerjs_core[_0x4ab94a(0x1d6)][_0x4ab94a(0x20d)]}]});}async[_0x2ffec3(0x1e2)](_0x192161){const _0x457f11=_0x2ffec3,{connector:_0x414499,startTarget:_0x445909,endTarget:_0x24f5b2}=_0x192161;if(!_0x445909&&!_0x24f5b2)return![];const _0xf8c9e3=this['getWorkbook']()[_0x457f11(0x203)](),_0xf73122=this[_0x457f11(0x1b5)](),_0x41a5f8=this[_0x457f11(0x1f4)]['get'](_univerjs_pro_sheets_shape['SheetsShapeService']),_0x5c7812=this[_0x457f11(0x1f4)]['get'](_univerjs_drawing[_0x457f11(0x1c1)]),_0x3f0a14=_0x41a5f8[_0x457f11(0x1b2)](_0xf8c9e3,_0xf73122,_0x414499[_0x457f11(0x227)]);if(!_0x3f0a14)return![];const _0x3bc632=_0x3f0a14[_0x457f11(0x1ac)](),_0x2fdacd=_0x3f0a14[_0x457f11(0x236)](),_0x7cbf3a={};for(const _0x9822f0 of _0x3f0a14['getAdjustNames']()){const _0x177c0d=_0x3f0a14[_0x457f11(0x1ca)](_0x9822f0);if(_0x177c0d!==void 0x0)_0x7cbf3a[_0x9822f0]=_0x177c0d;}const {startInfo:_0x3e3792,endInfo:_0x1ab492}=this[_0x457f11(0x1b3)](_0xf8c9e3,_0xf73122,_0x414499,_0x3f0a14,_0x445909,_0x24f5b2,_0x41a5f8,_0x5c7812,_0x2fdacd);if(!_0x3e3792||!_0x1ab492)return![];const _0x482c3c=(0x0,_univerjs_pro_engine_shape['computeConnectorRouteLayout'])((0x0,_univerjs_pro_engine_shape['routeConnectorLineShape'])(_0x3e3792,_0x1ab492,_0x3bc632),_0x3bc632),_0x3565cf={};if(_0x445909)_0x3565cf[_0x457f11(0x22b)]={'shapeId':_0x445909[_0x457f11(0x21b)]['drawId'],'cxnIndex':_0x445909[_0x457f11(0x1b1)]};else{if(_0x2fdacd===null||_0x2fdacd===void 0x0?void 0x0:_0x2fdacd[_0x457f11(0x22b)])_0x3565cf[_0x457f11(0x22b)]=_0x2fdacd['from'];}if(_0x24f5b2)_0x3565cf['to']={'shapeId':_0x24f5b2[_0x457f11(0x21b)][_0x457f11(0x227)],'cxnIndex':_0x24f5b2['connectionSiteIndex']};else{if(_0x2fdacd===null||_0x2fdacd===void 0x0?void 0x0:_0x2fdacd['to'])_0x3565cf['to']=_0x2fdacd['to'];}return this[_0x457f11(0x1e0)][_0x457f11(0x1fa)](_univerjs_pro_sheets_shape['UpdateConnectorRelationCommand']['id'],{'unitId':_0xf8c9e3,'subUnitId':_0xf73122,'connectorShapeId':_0x414499[_0x457f11(0x227)],'width':_0x482c3c[_0x457f11(0x1c8)][_0x457f11(0x1e6)],'height':_0x482c3c['worldRect'][_0x457f11(0x1d2)],'left':_0x482c3c[_0x457f11(0x1c8)][_0x457f11(0x1c9)],'top':_0x482c3c['worldRect'][_0x457f11(0x1eb)],'flipX':_0x482c3c[_0x457f11(0x1c8)][_0x457f11(0x1fd)]||![],'flipY':_0x482c3c[_0x457f11(0x1c8)][_0x457f11(0x20e)]||![],'oldAdjustValues':_0x7cbf3a,'newAdjustValues':_0x482c3c['adjustValues'],'newLineType':_0x482c3c[_0x457f11(0x213)],'oldLineType':_0x3bc632,'rotation':_0x482c3c[_0x457f11(0x1fb)],'oldRelation':_0x2fdacd,'newRelation':_0x3565cf});}[_0x2ffec3(0x1d4)](_0x5ca3ec,_0x59b3c8,_0x44d61f,_0x3555ab){const _0x314b43=_0x2ffec3,_0x5e49a6=this['_injector']['get'](_univerjs_drawing[_0x314b43(0x1c1)])[_0x314b43(0x212)]({'unitId':_0x59b3c8,'subUnitId':_0x44d61f,'drawingId':_0x3555ab});if(_0x5e49a6===null||_0x5e49a6===void 0x0?void 0x0:_0x5e49a6['transform']){var _0x496830,_0x28adb5,_0x2e0d73,_0x20bbaa;_0x5ca3ec['x']=(_0x496830=_0x5e49a6[_0x314b43(0x1cd)][_0x314b43(0x1c9)])!==null&&_0x496830!==void 0x0?_0x496830:0x0,_0x5ca3ec['y']=(_0x28adb5=_0x5e49a6['transform'][_0x314b43(0x1eb)])!==null&&_0x28adb5!==void 0x0?_0x28adb5:0x0,_0x5ca3ec[_0x314b43(0x1e6)]=(_0x2e0d73=_0x5e49a6['transform']['width'])!==null&&_0x2e0d73!==void 0x0?_0x2e0d73:_0x5ca3ec[_0x314b43(0x1e6)],_0x5ca3ec[_0x314b43(0x1d2)]=(_0x20bbaa=_0x5e49a6[_0x314b43(0x1cd)][_0x314b43(0x1d2)])!==null&&_0x20bbaa!==void 0x0?_0x20bbaa:_0x5ca3ec[_0x314b43(0x1d2)];}const _0x2069de=this[_0x314b43(0x1f4)][_0x314b43(0x234)](_univerjs_pro_sheets_shape[_0x314b43(0x1ff)])[_0x314b43(0x1b2)](_0x59b3c8,_0x44d61f,_0x3555ab);if(_0x2069de){_0x5ca3ec['shapeType']=_0x2069de['getShapeType']();const _0x2171c5=_0x2069de['getShapeData']();if(_0x2171c5)_0x5ca3ec[_0x314b43(0x1ef)]=JSON[_0x314b43(0x1c5)](JSON[_0x314b43(0x1e1)](_0x2171c5));}}['_resolveEndpoints'](_0x1ed238,_0x13dd3c,_0x2f04ff,_0x2001e4,_0x10fa30,_0x3acb1e,_0x509d96,_0x1478e8,_0x4bc141){const _0x111a7e=_0x2ffec3;let _0x52afea=null,_0xb35596=null;if(_0x10fa30)_0x52afea=computeConnectionPointInfo(_0x1ed238,_0x13dd3c,_0x10fa30[_0x111a7e(0x21b)][_0x111a7e(0x227)],_0x10fa30[_0x111a7e(0x1b1)],_0x509d96,_0x1478e8);if(_0x3acb1e)_0xb35596=computeConnectionPointInfo(_0x1ed238,_0x13dd3c,_0x3acb1e[_0x111a7e(0x21b)][_0x111a7e(0x227)],_0x3acb1e[_0x111a7e(0x1b1)],_0x509d96,_0x1478e8);if(!_0x52afea)_0x52afea=this[_0x111a7e(0x1bd)](_0x1ed238,_0x13dd3c,_0x2f04ff[_0x111a7e(0x227)],!![],_0xb35596,_0x4bc141===null||_0x4bc141===void 0x0?void 0x0:_0x4bc141[_0x111a7e(0x22b)],_0x509d96,_0x1478e8);if(!_0xb35596)_0xb35596=this[_0x111a7e(0x1bd)](_0x1ed238,_0x13dd3c,_0x2f04ff[_0x111a7e(0x227)],![],_0x52afea,_0x4bc141===null||_0x4bc141===void 0x0?void 0x0:_0x4bc141['to'],_0x509d96,_0x1478e8);return{'startInfo':_0x52afea,'endInfo':_0xb35596};}[_0x2ffec3(0x1bd)](_0x2add09,_0x44a59b,_0x51b94a,_0x5ab7ad,_0x356251,_0x131ee9,_0x119271,_0x1ca4c5){const _0x2f9f39=_0x2ffec3;if(_0x131ee9){const _0x59942e=computeConnectionPointInfo(_0x2add09,_0x44a59b,_0x131ee9[_0x2f9f39(0x1ce)],_0x131ee9[_0x2f9f39(0x235)],_0x119271,_0x1ca4c5);if(_0x59942e)return _0x59942e;}if(!_0x356251)return null;return computeFreeEndpointInfo(_0x2add09,_0x44a59b,_0x51b94a,_0x5ab7ad,_0x356251,_0x119271,_0x1ca4c5);}};function _0x1762(){const _0x289783=['cxnIndex','getShapeRelation','SetShapeDrawingDataCommand','setStartArrowSize','newConnector','object','ISheetDrawingService','setAbsolutePosition','ShapeLineDashEnum','InsertShapeCommand','getEndConnectInfo','getShapeType','getDrawingPoints','Shape\x20type\x20is\x20required.\x20Please\x20call\x20setShapeType()\x20before\x20build().','setShapeGradientFill','abs','connectionSiteIndex','getShapeModel','_resolveEndpoints','1bVLFPy','getSheetId','toStringTag','FEnum','setPosition','getShapeId','getStartConnectInfo','updateContext','length','_resolveExistingOrFreeEndpoint','dashType','unitId','relation','IDrawingManagerService','setShapeSolidFill','getBasicShapeRotateBound','180ANYmpl','parse','getPosition','getShapeData','worldRect','left','getAdjustValueByName','setStrokeWidth','newShape','transform','shapeId','colorStops\x20is\x20required\x20and\x20should\x20contain\x20at\x20least\x20one\x20color\x20stop.','getAdjustPoints','getSize','height','updateShape','_preloadShapeProperties','GradientFill','DrawingTypeEnum','index','646614ieTwxj','FShape','getConnectionSites','call','type','gradientAngle','fillType','setStartArrowType','_commandService','stringify','connectShapes','Skeleton\x20for\x20unitId\x20','drawingType','iterator','width','push','ShapeLineCapEnum','getWorkbook','DEFAULT_SHAPE_HEIGHT','top','Module','stroke','ShapeTypeEnum','shapeData','ConnectorCoordinateTransform','convertPositionCellToSheetOverGrid','fill','setNoneFill','_injector','find','symbol','toPrimitive','setStrokeLineJoinType','entries','executeCommand','rotation','function','flipX','shapeType','SheetsShapeService','string','ensureSkeleton','33WaJejL','getUnitId','3912048qZuGME','4922824TtxSvX','isConnectorShape','point','getConnectionSiteList','isLineShape','ShapeArrowTypeEnum','672985EgmvHK','ang','DRAWING_SHAPE','flipY','default','NoFill','removeShape','getDrawingByParam','lineType','1650612aqfCpH','Invalid\x20shape\x20type\x20for\x20connector.\x20Received\x20','startArrow','prototype','ShapeLineTypeEnum','opacity','setShapeType','shape','subUnitId','gradientStops','SolidFill','color','keys','1271474NtJUjE','ShapeGradientTypeEnum','setEndArrowType','setStrokeLineType','ShapeFillEnum','gradientType','drawId','setStrokeColor','defineProperty','28688ZMtrWe','from','SheetSkeletonService','FWorksheet','endArrow','ShapeArrowSizeEnum','\x20and\x20subUnitId\x20','build','generateRandomId','ShapeLineJoinEnum','get'];_0x1762=function(){return _0x289783;};return _0x1762();}_univerjs_sheets_facade[_0x2ffec3(0x22d)]['extend'](FWorksheetShapeMixin),exports['FConnectorShape']=FConnectorShape,exports[_0x2ffec3(0x1d9)]=FShape;
1
+ const _0xc2e86e=_0x4387;(function(_0x45222c,_0x440e19){const _0x24639d=_0x4387,_0x1f98e7=_0x45222c();while(!![]){try{const _0x8a559b=-parseInt(_0x24639d(0x142))/0x1+parseInt(_0x24639d(0x15a))/0x2*(-parseInt(_0x24639d(0x1a9))/0x3)+-parseInt(_0x24639d(0x187))/0x4*(-parseInt(_0x24639d(0x1b8))/0x5)+-parseInt(_0x24639d(0x169))/0x6+-parseInt(_0x24639d(0x185))/0x7*(-parseInt(_0x24639d(0x1d6))/0x8)+parseInt(_0x24639d(0x196))/0x9+-parseInt(_0x24639d(0x1c0))/0xa*(-parseInt(_0x24639d(0x1bb))/0xb);if(_0x8a559b===_0x440e19)break;else _0x1f98e7['push'](_0x1f98e7['shift']());}catch(_0x57232d){_0x1f98e7['push'](_0x1f98e7['shift']());}}}(_0x1afc,0xddc05),Object[_0xc2e86e(0x1d3)](exports,Symbol[_0xc2e86e(0x1ad)],{'value':'Module'}));let _univerjs_pro_engine_shape=require('@univerjs-pro/engine-shape'),_univerjs_core_facade=require('@univerjs/core/facade'),_univerjs_pro_sheets_shape=require('@univerjs-pro/sheets-shape'),_univerjs_core=require('@univerjs/core'),_univerjs_drawing=require('@univerjs/drawing'),_univerjs_sheets=require('@univerjs/sheets'),_univerjs_sheets_drawing=require('@univerjs/sheets-drawing'),_univerjs_sheets_facade=require('@univerjs/sheets/facade');function _0x4387(_0x4ab405,_0x102eb5){_0x4ab405=_0x4ab405-0x140;const _0x1afcb5=_0x1afc();let _0x438737=_0x1afcb5[_0x4ab405];return _0x438737;}var FSheetsShapeEnumMixin=class extends _univerjs_core_facade['FEnum']{get[_0xc2e86e(0x1d7)](){const _0x2b1f4e=_0xc2e86e;return _univerjs_pro_engine_shape[_0x2b1f4e(0x1d7)];}get[_0xc2e86e(0x18c)](){const _0x2d33dd=_0xc2e86e;return _univerjs_pro_engine_shape[_0x2d33dd(0x18c)];}get[_0xc2e86e(0x194)](){const _0x7577d2=_0xc2e86e;return _univerjs_pro_engine_shape[_0x7577d2(0x194)];}get['ShapeLineTypeEnum'](){const _0x2383a6=_0xc2e86e;return _univerjs_pro_engine_shape[_0x2383a6(0x179)];}get['ShapeLineDashEnum'](){const _0x2b85b5=_0xc2e86e;return _univerjs_pro_engine_shape[_0x2b85b5(0x17e)];}get[_0xc2e86e(0x1a2)](){return _univerjs_pro_engine_shape['ShapeLineCapEnum'];}get[_0xc2e86e(0x18d)](){const _0xaf9baa=_0xc2e86e;return _univerjs_pro_engine_shape[_0xaf9baa(0x18d)];}get[_0xc2e86e(0x1a3)](){return _univerjs_pro_engine_shape['ShapeArrowTypeEnum'];}get['ShapeArrowSizeEnum'](){const _0xc70a76=_0xc2e86e;return _univerjs_pro_engine_shape[_0xc70a76(0x199)];}};_univerjs_core_facade[_0xc2e86e(0x1ab)][_0xc2e86e(0x1bf)](FSheetsShapeEnumMixin);function _typeof(_0x247ae2){'@babel/helpers - typeof';const _0xf68d5=_0xc2e86e;return _typeof='function'==typeof Symbol&&_0xf68d5(0x151)==typeof Symbol['iterator']?function(_0x3bc72b){return typeof _0x3bc72b;}:function(_0x4e8da2){const _0x58d0d3=_0xf68d5;return _0x4e8da2&&'function'==typeof Symbol&&_0x4e8da2[_0x58d0d3(0x14f)]===Symbol&&_0x4e8da2!==Symbol[_0x58d0d3(0x172)]?_0x58d0d3(0x151):typeof _0x4e8da2;},_typeof(_0x247ae2);}function toPrimitive(_0x4aa121,_0x3de90c){const _0x3e29e5=_0xc2e86e;if(_0x3e29e5(0x1c1)!=_typeof(_0x4aa121)||!_0x4aa121)return _0x4aa121;var _0x4b7f59=_0x4aa121[Symbol[_0x3e29e5(0x1b2)]];if(void 0x0!==_0x4b7f59){var _0x4dd07a=_0x4b7f59[_0x3e29e5(0x19e)](_0x4aa121,_0x3de90c||_0x3e29e5(0x163));if(_0x3e29e5(0x1c1)!=_typeof(_0x4dd07a))return _0x4dd07a;throw new TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x3e29e5(0x191)===_0x3de90c?String:Number)(_0x4aa121);}function toPropertyKey(_0x3513f7){var _0x320791=toPrimitive(_0x3513f7,'string');return'symbol'==_typeof(_0x320791)?_0x320791:_0x320791+'';}function _defineProperty(_0x19a2c0,_0x233598,_0x5a63fa){return(_0x233598=toPropertyKey(_0x233598))in _0x19a2c0?Object['defineProperty'](_0x19a2c0,_0x233598,{'value':_0x5a63fa,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x19a2c0[_0x233598]=_0x5a63fa,_0x19a2c0;}var FShape=class{constructor(_0xb23904,_0x18e030,_0x1d220f,_0x33bb3c){const _0x7ee729=_0xc2e86e;_defineProperty(this,_0x7ee729(0x1ac),void 0x0),_defineProperty(this,_0x7ee729(0x18b),void 0x0),_defineProperty(this,_0x7ee729(0x1d9),void 0x0),_defineProperty(this,'x',0x0),_defineProperty(this,'y',0x0),_defineProperty(this,'width',_univerjs_pro_sheets_shape[_0x7ee729(0x18a)]),_defineProperty(this,'height',_univerjs_pro_sheets_shape[_0x7ee729(0x1b5)]),_defineProperty(this,_0x7ee729(0x1af),void 0x0),_defineProperty(this,'shapeData',{}),_defineProperty(this,_0x7ee729(0x15e),void 0x0),this[_0x7ee729(0x1ac)]=_0xb23904,this['subUnitId']=_0x18e030,this['drawId']=_0x1d220f||(0x0,_univerjs_core[_0x7ee729(0x16b)])(),this[_0x7ee729(0x15e)]=_0x33bb3c;}[_0xc2e86e(0x1b3)](_0x6a4ea5,_0x573d4f,_0xbbdd51,_0x4264ac){const _0x3d470a=_0xc2e86e,_0x26b1ca=this[_0x3d470a(0x15e)][_0x3d470a(0x195)](_univerjs_sheets[_0x3d470a(0x1b6)])[_0x3d470a(0x167)](this[_0x3d470a(0x1ac)],this[_0x3d470a(0x18b)]);if(!_0x26b1ca)throw new Error('Skeleton\x20for\x20unitId\x20'+this[_0x3d470a(0x1ac)]+_0x3d470a(0x16a)+this['subUnitId']+_0x3d470a(0x19f));const {transform:_0x5f33bc}=(0x0,_univerjs_sheets['convertPositionCellToSheetOverGrid'])(this['unitId'],this[_0x3d470a(0x18b)],{'row':_0x6a4ea5,'column':_0x573d4f,'rowOffset':_0xbbdd51,'columnOffset':_0x4264ac},0x1,0x1,_0x26b1ca);return this['x']=_0x5f33bc[_0x3d470a(0x1b0)],this['y']=_0x5f33bc[_0x3d470a(0x17f)],this;}[_0xc2e86e(0x176)](_0x5215d1,_0x136e3f){return this['x']=_0x5215d1,this['y']=_0x136e3f,this;}['setShapeType'](_0xa3347d){const _0x2d6149=_0xc2e86e;return this[_0x2d6149(0x1af)]=_0xa3347d,this;}[_0xc2e86e(0x19b)](_0x1e1d6f,_0x53e72e){const _0x2ff1e9=_0xc2e86e;if(!this[_0x2ff1e9(0x1a7)]['fill'])this['shapeData']['fill']={};this[_0x2ff1e9(0x1a7)][_0x2ff1e9(0x146)][_0x2ff1e9(0x1d2)]=_univerjs_pro_engine_shape[_0x2ff1e9(0x18c)]['SolidFill'];if(_0x1e1d6f!==void 0x0)this[_0x2ff1e9(0x1a7)]['fill'][_0x2ff1e9(0x1d1)]=_0x1e1d6f;if(_0x53e72e!==void 0x0)this[_0x2ff1e9(0x1a7)][_0x2ff1e9(0x146)][_0x2ff1e9(0x18e)]=_0x53e72e;return this;}[_0xc2e86e(0x16d)](_0x140af7,_0x12cdad,_0xed929){const _0x262462=_0xc2e86e;if(_0x12cdad===void 0x0||_0x12cdad['length']===0x0)throw new Error('colorStops\x20is\x20required\x20and\x20should\x20contain\x20at\x20least\x20one\x20color\x20stop.');if(!this[_0x262462(0x1a7)]['fill'])this['shapeData'][_0x262462(0x146)]={};this[_0x262462(0x1a7)][_0x262462(0x146)]['gradientStops']=_0x12cdad,this[_0x262462(0x1a7)][_0x262462(0x146)]['fillType']=_univerjs_pro_engine_shape[_0x262462(0x18c)]['GradientFill'],this['shapeData'][_0x262462(0x146)]['gradientType']=_0x140af7;if(_0xed929!==void 0x0)this[_0x262462(0x1a7)]['fill'][_0x262462(0x154)]=_0xed929;return this;}[_0xc2e86e(0x1c9)](){const _0x18ee89=_0xc2e86e;return this[_0x18ee89(0x1a7)][_0x18ee89(0x146)]={'fillType':_univerjs_pro_engine_shape[_0x18ee89(0x18c)][_0x18ee89(0x189)]},this;}[_0xc2e86e(0x15b)](_0x1778b6){const _0x3aa29=_0xc2e86e;if(!this['shapeData'][_0x3aa29(0x17a)])this[_0x3aa29(0x1a7)]['stroke']={};return this[_0x3aa29(0x1a7)][_0x3aa29(0x17a)][_0x3aa29(0x1d1)]=_0x1778b6,this;}[_0xc2e86e(0x1bd)](_0x21aee0){const _0x2a005e=_0xc2e86e;if(!this[_0x2a005e(0x1a7)][_0x2a005e(0x17a)])this['shapeData'][_0x2a005e(0x17a)]={};return this['shapeData']['stroke'][_0x2a005e(0x161)]=_0x21aee0,this;}[_0xc2e86e(0x181)](_0x268db9){const _0xcf5c13=_0xc2e86e;if(!this[_0xcf5c13(0x1a7)][_0xcf5c13(0x17a)])this[_0xcf5c13(0x1a7)][_0xcf5c13(0x17a)]={};return this[_0xcf5c13(0x1a7)]['stroke'][_0xcf5c13(0x15f)]=_0x268db9,this;}[_0xc2e86e(0x1a1)](_0x6482fa){const _0x459ce2=_0xc2e86e;if(!this[_0x459ce2(0x1a7)][_0x459ce2(0x17a)])this[_0x459ce2(0x1a7)][_0x459ce2(0x17a)]={};return this['shapeData'][_0x459ce2(0x17a)][_0x459ce2(0x1db)]=_0x6482fa,this;}[_0xc2e86e(0x157)](_0x41dd7a){const _0x35db2a=_0xc2e86e;if(!this[_0x35db2a(0x1a7)][_0x35db2a(0x17a)])this['shapeData']['stroke']={};return this[_0x35db2a(0x1a7)]['stroke'][_0x35db2a(0x175)]=_0x41dd7a,this;}[_0xc2e86e(0x1cc)](_0x1594f0){const _0x2949c0=_0xc2e86e;if(!this[_0x2949c0(0x1a7)][_0x2949c0(0x17a)])this[_0x2949c0(0x1a7)][_0x2949c0(0x17a)]={};return this[_0x2949c0(0x1a7)]['stroke'][_0x2949c0(0x18e)]=_0x1594f0,this;}[_0xc2e86e(0x188)](_0x289023){const _0x424169=_0xc2e86e;if(!this['shapeData'][_0x424169(0x17a)])this[_0x424169(0x1a7)][_0x424169(0x17a)]={};return this['shapeData'][_0x424169(0x17a)][_0x424169(0x1ae)]=_0x289023,this;}['setWidth'](_0x407f4f){const _0x5863ef=_0xc2e86e;return this[_0x5863ef(0x161)]=_0x407f4f,this;}[_0xc2e86e(0x1c8)](_0x4078d1){const _0x47d67e=_0xc2e86e;return this[_0x47d67e(0x155)]=_0x4078d1,this;}[_0xc2e86e(0x1ce)](){const _0x4ea1d5=_0xc2e86e,_0xbe29d3=this[_0x4ea1d5(0x15e)]['get'](_univerjs_pro_sheets_shape[_0x4ea1d5(0x14d)])[_0x4ea1d5(0x159)](this[_0x4ea1d5(0x1ac)],this[_0x4ea1d5(0x18b)],this[_0x4ea1d5(0x1d9)]);if(_0xbe29d3)return(0x0,_univerjs_pro_engine_shape[_0x4ea1d5(0x184)])(_0xbe29d3[_0x4ea1d5(0x17b)]());if(this[_0x4ea1d5(0x1af)])return(0x0,_univerjs_pro_engine_shape[_0x4ea1d5(0x184)])(this[_0x4ea1d5(0x1af)]);return![];}[_0xc2e86e(0x178)](){const _0x6d50a4=_0xc2e86e,_0x1a9a5d=this[_0x6d50a4(0x15e)]['get'](_univerjs_pro_sheets_shape[_0x6d50a4(0x14d)])[_0x6d50a4(0x159)](this[_0x6d50a4(0x1ac)],this[_0x6d50a4(0x18b)],this[_0x6d50a4(0x1d9)]);if(!_0x1a9a5d)return[];const _0x34dad4=this[_0x6d50a4(0x15e)][_0x6d50a4(0x195)](_univerjs_drawing[_0x6d50a4(0x192)])[_0x6d50a4(0x1b7)]({'unitId':this[_0x6d50a4(0x1ac)],'subUnitId':this['subUnitId'],'drawingId':this[_0x6d50a4(0x1d9)]});if(!(_0x34dad4===null||_0x34dad4===void 0x0?void 0x0:_0x34dad4[_0x6d50a4(0x1c2)]))return[];const {width:width=0x0,height:height=0x0}=_0x34dad4[_0x6d50a4(0x1c2)];return _0x1a9a5d[_0x6d50a4(0x15c)]({'width':width,'height':height}),_0x1a9a5d[_0x6d50a4(0x141)]();}['getAdjustPoints'](){const _0xc3b757=_0xc2e86e,_0x5e3937=this['_injector'][_0xc3b757(0x195)](_univerjs_pro_sheets_shape[_0xc3b757(0x14d)])[_0xc3b757(0x159)](this['unitId'],this[_0xc3b757(0x18b)],this['drawId']);if(!_0x5e3937)return[];const _0xd34701=this[_0xc3b757(0x15e)]['get'](_univerjs_drawing[_0xc3b757(0x192)])[_0xc3b757(0x1b7)]({'unitId':this['unitId'],'subUnitId':this['subUnitId'],'drawingId':this[_0xc3b757(0x1d9)]});if(!(_0xd34701===null||_0xd34701===void 0x0?void 0x0:_0xd34701[_0xc3b757(0x1c2)]))return[];const {width:width=0x0,height:height=0x0}=_0xd34701[_0xc3b757(0x1c2)];return _0x5e3937[_0xc3b757(0x15c)]({'width':width,'height':height}),_0x5e3937['getDrawingPoints']();}['getConnectorLinePoints'](){const _0xe9fdd6=_0xc2e86e,_0x4ddc4b=this[_0xe9fdd6(0x15e)]['get'](_univerjs_pro_sheets_shape['SheetsShapeService'])[_0xe9fdd6(0x159)](this[_0xe9fdd6(0x1ac)],this['subUnitId'],this[_0xe9fdd6(0x1d9)]);if(!_0x4ddc4b)return[];if(!(0x0,_univerjs_pro_engine_shape[_0xe9fdd6(0x184)])(_0x4ddc4b['getShapeType']()))return[];const _0x36855b=this[_0xe9fdd6(0x15e)][_0xe9fdd6(0x195)](_univerjs_drawing[_0xe9fdd6(0x192)])[_0xe9fdd6(0x1b7)]({'unitId':this[_0xe9fdd6(0x1ac)],'subUnitId':this[_0xe9fdd6(0x18b)],'drawingId':this[_0xe9fdd6(0x1d9)]});if(!(_0x36855b===null||_0x36855b===void 0x0?void 0x0:_0x36855b['transform']))return[];const {width:width=0x0,height:height=0x0}=_0x36855b[_0xe9fdd6(0x1c2)];return _0x4ddc4b['updateContext']({'width':width,'height':height}),_0x4ddc4b[_0xe9fdd6(0x14e)]();}[_0xc2e86e(0x197)](){const _0x1441e7=_0xc2e86e;var _0x444ddb;const _0x29eef2=this[_0x1441e7(0x15e)]['get'](_univerjs_pro_sheets_shape[_0x1441e7(0x14d)])[_0x1441e7(0x159)](this['unitId'],this['subUnitId'],this['drawId']);if(!_0x29eef2)return null;return(_0x444ddb=_0x29eef2['getStartConnectInfo']())!==null&&_0x444ddb!==void 0x0?_0x444ddb:null;}[_0xc2e86e(0x1b4)](){const _0x576844=_0xc2e86e;var _0x1958ce;const _0x193075=this[_0x576844(0x15e)]['get'](_univerjs_pro_sheets_shape['SheetsShapeService'])[_0x576844(0x159)](this[_0x576844(0x1ac)],this[_0x576844(0x18b)],this['drawId']);if(!_0x193075)return null;return(_0x1958ce=_0x193075[_0x576844(0x1b4)]())!==null&&_0x1958ce!==void 0x0?_0x1958ce:null;}['build'](){const _0x1b880c=_0xc2e86e;var _0x5d55b5,_0x335d06;if(!this[_0x1b880c(0x1af)])throw new Error(_0x1b880c(0x1bc));if(this['x']===0x0||this['y']===0x0){const _0x277ffd=this[_0x1b880c(0x15e)][_0x1b880c(0x195)](_univerjs_sheets['SheetSkeletonService'])[_0x1b880c(0x167)](this[_0x1b880c(0x1ac)],this[_0x1b880c(0x18b)]);if(!_0x277ffd)throw new Error(_0x1b880c(0x14c)+this[_0x1b880c(0x1ac)]+_0x1b880c(0x16a)+this[_0x1b880c(0x18b)]+_0x1b880c(0x19f));const {transform:_0x46ebfb}=(0x0,_univerjs_sheets[_0x1b880c(0x1aa)])(this[_0x1b880c(0x1ac)],this[_0x1b880c(0x18b)],{'row':0x1,'column':0x1,'rowOffset':0x0,'columnOffset':0x0},0x1,0x1,_0x277ffd);this['x']=this['x']>0x0?this['x']:_0x46ebfb[_0x1b880c(0x1b0)],this['y']=this['y']>0x0?this['y']:_0x46ebfb['top'];}return this[_0x1b880c(0x161)]=(_0x5d55b5=this[_0x1b880c(0x161)])!==null&&_0x5d55b5!==void 0x0?_0x5d55b5:_univerjs_pro_sheets_shape[_0x1b880c(0x18a)],this[_0x1b880c(0x155)]=(_0x335d06=this[_0x1b880c(0x155)])!==null&&_0x335d06!==void 0x0?_0x335d06:_univerjs_pro_sheets_shape[_0x1b880c(0x1b5)],{'unitId':this[_0x1b880c(0x1ac)],'subUnitId':this[_0x1b880c(0x18b)],'shapeId':this[_0x1b880c(0x1d9)],'shapeType':this[_0x1b880c(0x1af)],'shapeData':Object['keys'](this[_0x1b880c(0x1a7)])[_0x1b880c(0x1c5)]>0x0?this[_0x1b880c(0x1a7)]:void 0x0,'x':this['x'],'y':this['y'],'width':this[_0x1b880c(0x161)],'height':this[_0x1b880c(0x155)]};}[_0xc2e86e(0x147)](){const _0x4d318b=_0xc2e86e;return this[_0x4d318b(0x1d9)];}['getShapeType'](){const _0x268063=_0xc2e86e;return this[_0x268063(0x1af)];}[_0xc2e86e(0x1d5)](){const _0x235643=_0xc2e86e;return this[_0x235643(0x1a7)];}[_0xc2e86e(0x198)](){return{'x':this['x'],'y':this['y']};}[_0xc2e86e(0x1ba)](){const _0x402cc5=_0xc2e86e;return{'width':this[_0x402cc5(0x161)],'height':this[_0x402cc5(0x155)]};}},FConnectorShape=class extends FShape{constructor(_0x3808bc,_0x3eb40d,_0xc4a716,_0x302640){const _0x4c32dc=_0xc2e86e;super(_0x3808bc,_0x3eb40d,_0xc4a716,_0x302640),_defineProperty(this,_0x4c32dc(0x1a7),{});}[_0xc2e86e(0x186)](_0x347d8a){const _0x2973f5=_0xc2e86e;if(!(0x0,_univerjs_pro_engine_shape[_0x2973f5(0x184)])(_0x347d8a))throw new Error('Invalid\x20shape\x20type\x20for\x20connector.\x20Received\x20'+_0x347d8a+_0x2973f5(0x19a));return super[_0x2973f5(0x186)](_0x347d8a),this;}[_0xc2e86e(0x1c3)](_0x418267){const _0x15a519=_0xc2e86e;var _0x5224ee,_0x598674;if(!((_0x5224ee=this[_0x15a519(0x1a7)])===null||_0x5224ee===void 0x0?void 0x0:_0x5224ee['ln']))this[_0x15a519(0x1a7)]['ln']={};if(!((_0x598674=this['shapeData'])===null||_0x598674===void 0x0||(_0x598674=_0x598674['ln'])===null||_0x598674===void 0x0?void 0x0:_0x598674[_0x15a519(0x1be)]))this[_0x15a519(0x1a7)]['ln']['startArrow']={};return this[_0x15a519(0x1a7)]['ln'][_0x15a519(0x1be)]['type']=_0x418267,this;}[_0xc2e86e(0x174)](_0x5383ad){const _0x472cfd=_0xc2e86e;var _0xce9336,_0x687b2b;if(!((_0xce9336=this[_0x472cfd(0x1a7)])===null||_0xce9336===void 0x0?void 0x0:_0xce9336['ln']))this[_0x472cfd(0x1a7)]['ln']={};if(!((_0x687b2b=this[_0x472cfd(0x1a7)])===null||_0x687b2b===void 0x0||(_0x687b2b=_0x687b2b['ln'])===null||_0x687b2b===void 0x0?void 0x0:_0x687b2b[_0x472cfd(0x164)]))this[_0x472cfd(0x1a7)]['ln']['endArrow']={};return this[_0x472cfd(0x1a7)]['ln'][_0x472cfd(0x164)][_0x472cfd(0x143)]=_0x5383ad,this;}[_0xc2e86e(0x1c6)](_0x4b4f73){const _0x274614=_0xc2e86e;var _0x46842a,_0x28d1aa;if(!((_0x46842a=this[_0x274614(0x1a7)])===null||_0x46842a===void 0x0?void 0x0:_0x46842a['ln']))this[_0x274614(0x1a7)]['ln']={};if(!((_0x28d1aa=this[_0x274614(0x1a7)])===null||_0x28d1aa===void 0x0||(_0x28d1aa=_0x28d1aa['ln'])===null||_0x28d1aa===void 0x0?void 0x0:_0x28d1aa['startArrow']))this[_0x274614(0x1a7)]['ln'][_0x274614(0x1be)]={};return this[_0x274614(0x1a7)]['ln'][_0x274614(0x1be)][_0x274614(0x190)]=_0x4b4f73,this;}[_0xc2e86e(0x158)](_0x389895){const _0x180690=_0xc2e86e;var _0x28fa02,_0x455c22;if(!((_0x28fa02=this[_0x180690(0x1a7)])===null||_0x28fa02===void 0x0?void 0x0:_0x28fa02['ln']))this[_0x180690(0x1a7)]['ln']={};if(!((_0x455c22=this[_0x180690(0x1a7)])===null||_0x455c22===void 0x0||(_0x455c22=_0x455c22['ln'])===null||_0x455c22===void 0x0?void 0x0:_0x455c22[_0x180690(0x164)]))this['shapeData']['ln'][_0x180690(0x164)]={};return this[_0x180690(0x1a7)]['ln'][_0x180690(0x164)][_0x180690(0x190)]=_0x389895,this;}[_0xc2e86e(0x1b1)](){const _0x3ba5c4=_0xc2e86e;return super[_0x3ba5c4(0x1b1)]();}[_0xc2e86e(0x1b4)](){var _0x477e83;return((_0x477e83=this['shapeData'])===null||_0x477e83===void 0x0||(_0x477e83=_0x477e83['relation'])===null||_0x477e83===void 0x0?void 0x0:_0x477e83['to'])||null;}[_0xc2e86e(0x197)](){const _0x1d4c15=_0xc2e86e;var _0x7ad6de;return((_0x7ad6de=this[_0x1d4c15(0x1a7)])===null||_0x7ad6de===void 0x0||(_0x7ad6de=_0x7ad6de['relation'])===null||_0x7ad6de===void 0x0?void 0x0:_0x7ad6de['from'])||null;}};function computeConnectionPointInfo(_0x172296,_0x26de8d,_0x139736,_0x2ea515,_0x9e1a2d,_0x1d4a5c){const _0x4d8bc9=_0xc2e86e,_0x275180=_0x9e1a2d[_0x4d8bc9(0x159)](_0x172296,_0x26de8d,_0x139736);if(!_0x275180)return null;const _0x6ba62c=_0x1d4a5c[_0x4d8bc9(0x1b7)]({'unitId':_0x172296,'subUnitId':_0x26de8d,'drawingId':_0x139736});if(!(_0x6ba62c===null||_0x6ba62c===void 0x0?void 0x0:_0x6ba62c['transform']))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x59dce2}=_0x6ba62c['transform'];_0x275180[_0x4d8bc9(0x15c)]({'width':width,'height':height});const _0x48dd0f=_0x275180[_0x4d8bc9(0x141)]()[_0x4d8bc9(0x15d)](_0x20186b=>_0x20186b[_0x4d8bc9(0x1d8)]===_0x2ea515);if(!_0x48dd0f)return null;let _0x297bbc=flipX?width-_0x48dd0f['x']:_0x48dd0f['x'],_0x30fc8a=flipY?height-_0x48dd0f['y']:_0x48dd0f['y'];if(_0x59dce2&&_0x59dce2!==0x0){const _0xc5e80f=_0x59dce2*Math['PI']/0xb4,_0x44a82b=Math['cos'](_0xc5e80f),_0x2ff806=Math[_0x4d8bc9(0x148)](_0xc5e80f),_0x463270=width/0x2,_0x13a3a4=height/0x2,_0x884902=_0x297bbc-_0x463270,_0x173c36=_0x30fc8a-_0x13a3a4;_0x297bbc=_0x463270+_0x884902*_0x44a82b-_0x173c36*_0x2ff806,_0x30fc8a=_0x13a3a4+_0x884902*_0x2ff806+_0x173c36*_0x44a82b;}_0x297bbc+=left,_0x30fc8a+=top;let _0xf5032c=_0x48dd0f[_0x4d8bc9(0x1cb)]/0xea60;if(flipX)_0xf5032c=0xb4-_0xf5032c;if(flipY)_0xf5032c=-_0xf5032c;_0xf5032c+=_0x59dce2||0x0,_0xf5032c=(_0xf5032c%0x168+0x168)%0x168;const _0x36cf1d=(0x0,_univerjs_pro_engine_shape['getBasicShapeRotateBound'])({'left':left,'top':top,'width':width,'height':height},_0x59dce2||0x0);return{'point':{'x':_0x297bbc,'y':_0x30fc8a},'angle':_0xf5032c,'bounds':_0x36cf1d};}function calculateFreeEndpointAngle(_0x324263,_0x39d797){const _0x37da48=_0xc2e86e,_0x5a2205=_0x39d797['x']-_0x324263['x'],_0x4e3579=_0x39d797['y']-_0x324263['y'];if(Math[_0x37da48(0x156)](_0x5a2205)>=Math['abs'](_0x4e3579))return _0x5a2205>=0x0?0xb4:0x0;return _0x4e3579>=0x0?0x10e:0x5a;}function computeFreeEndpointInfo(_0x48286f,_0x3ac1c4,_0x2f24b4,_0x109c64,_0x52e6ab,_0x506aee,_0x5c9b4c){const _0x57f50a=_0xc2e86e,_0x40d195=_0x506aee[_0x57f50a(0x159)](_0x48286f,_0x3ac1c4,_0x2f24b4);if(!_0x40d195)return null;const _0x1a721d=_0x5c9b4c['getDrawingByParam']({'unitId':_0x48286f,'subUnitId':_0x3ac1c4,'drawingId':_0x2f24b4});if(!(_0x1a721d===null||_0x1a721d===void 0x0?void 0x0:_0x1a721d['transform']))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![]}=_0x1a721d['transform'];_0x40d195[_0x57f50a(0x15c)]({'width':width,'height':height});const _0x1069aa=_0x40d195[_0x57f50a(0x14e)]();if(_0x1069aa[_0x57f50a(0x1c5)]<0x2)return null;const _0x52d116=_0x109c64?_0x1069aa[0x0]:_0x1069aa[_0x1069aa[_0x57f50a(0x1c5)]-0x1],_0x5c6a14=new _univerjs_pro_engine_shape[(_0x57f50a(0x1c7))]({'left':left,'top':top,'width':width,'height':height,'flipX':flipX,'flipY':flipY})[_0x57f50a(0x1a4)](_0x52d116);return{'point':_0x5c6a14,'angle':calculateFreeEndpointAngle(_0x52e6ab[_0x57f50a(0x152)],_0x5c6a14),'bounds':{'left':_0x5c6a14['x'],'top':_0x5c6a14['y'],'width':0x0,'height':0x0}};}var FWorksheetShapeMixin=class extends _univerjs_sheets_facade['FWorksheet']{async[_0xc2e86e(0x153)](_0x6414ab){const _0x1c5abd=_0xc2e86e,{unitId:_0x383c5b,subUnitId:_0x5b3616,shapeId:_0x54fd1c,shapeType:_0x10739f,shapeData:_0x2edbdf,x:_0x86a75f,y:_0x2ab2bc,width:_0x575e02,height:_0x586049}=_0x6414ab;return this[_0x1c5abd(0x16f)][_0x1c5abd(0x162)](_univerjs_pro_sheets_shape['InsertShapeCommand']['id'],{'unitId':_0x383c5b,'subUnitId':_0x5b3616,'shapeId':_0x54fd1c,'shapeType':_0x10739f,'shapeData':_0x2edbdf,'position':{'x':_0x86a75f,'y':_0x2ab2bc},'width':_0x575e02,'height':_0x586049});}async[_0xc2e86e(0x16c)](_0x39d0eb){const _0xe10586=_0xc2e86e,{unitId:_0x2f8eed,subUnitId:_0x3dfea9,shapeId:_0x47b398,shapeType:_0x2c1d83,shapeData:_0x4c093e,x:_0x434767,y:_0x1cb1bb,width:_0x3323c8,height:_0x188cb2}=_0x39d0eb;return this[_0xe10586(0x16f)]['executeCommand'](_univerjs_pro_sheets_shape['SetShapeDrawingDataCommand']['id'],{'unitId':_0x2f8eed,'subUnitId':_0x3dfea9,'shapeId':_0x47b398,'shapeType':_0x2c1d83,'shapeData':_0x4c093e,'position':{'x':_0x434767,'y':_0x1cb1bb},'width':_0x3323c8,'height':_0x188cb2});}['newShape'](_0x51dd28){const _0x1ab317=_0xc2e86e,_0x51df23=this['getWorkbook']()['getUnitId'](),_0x3fe789=this['getSheetId']();if(_0x51dd28){const _0x58678f=new FShape(_0x51df23,_0x3fe789,_0x51dd28[_0x1ab317(0x1d9)],this[_0x1ab317(0x15e)]);return this[_0x1ab317(0x1ca)](_0x58678f,_0x51df23,_0x3fe789,_0x51dd28[_0x1ab317(0x1d9)]),_0x58678f;}return new FShape(_0x51df23,_0x3fe789,(0x0,_univerjs_core[_0x1ab317(0x16b)])(),this[_0x1ab317(0x15e)]);}[_0xc2e86e(0x166)](_0x4cc1d2){const _0x547537=_0xc2e86e,_0x50eb3f=this['getWorkbook']()[_0x547537(0x177)](),_0xbbc9cb=this[_0x547537(0x17d)]();if(_0x4cc1d2){const _0x7d0f9f=new FConnectorShape(_0x50eb3f,_0xbbc9cb,_0x4cc1d2['drawId'],this[_0x547537(0x15e)]);return this[_0x547537(0x1ca)](_0x7d0f9f,_0x50eb3f,_0xbbc9cb,_0x4cc1d2[_0x547537(0x1d9)]),_0x7d0f9f;}return new FConnectorShape(_0x50eb3f,_0xbbc9cb,(0x0,_univerjs_core[_0x547537(0x16b)])(),this[_0x547537(0x15e)]);}[_0xc2e86e(0x1b9)](){const _0x51e5eb=_0xc2e86e,_0x277c65=this[_0x51e5eb(0x15e)][_0x51e5eb(0x195)](_univerjs_sheets_drawing[_0x51e5eb(0x168)]),_0x113847=this['getWorkbook']()[_0x51e5eb(0x177)](),_0x32e452=this[_0x51e5eb(0x17d)](),_0x2a3e23=_0x277c65[_0x51e5eb(0x17c)](_0x113847,_0x32e452);if(!_0x2a3e23)return[];const _0x59e4b1=[];for(const [_0x36cafd,_0x3ae78d]of Object[_0x51e5eb(0x149)](_0x2a3e23))if(_0x3ae78d&&_0x3ae78d[_0x51e5eb(0x14a)]===_univerjs_core[_0x51e5eb(0x1cf)][_0x51e5eb(0x14b)]){const _0x28b64b=new FShape(_0x113847,_0x32e452,_0x36cafd,this[_0x51e5eb(0x15e)]);this[_0x51e5eb(0x1ca)](_0x28b64b,_0x113847,_0x32e452,_0x36cafd),_0x59e4b1[_0x51e5eb(0x173)](_0x28b64b);}return _0x59e4b1;}[_0xc2e86e(0x19d)](_0x24ba71){const _0x5e3df5=_0xc2e86e,{unitId:_0x458f3f,subUnitId:_0x4eb5df,drawId:_0x452d60}=_0x24ba71;return this[_0x5e3df5(0x16f)][_0x5e3df5(0x162)](_univerjs_sheets_drawing[_0x5e3df5(0x140)]['id'],{'unitId':_0x458f3f,'drawings':[{'unitId':_0x458f3f,'subUnitId':_0x4eb5df,'drawingId':_0x452d60,'drawingType':_univerjs_core['DrawingTypeEnum'][_0x5e3df5(0x14b)]}]});}async[_0xc2e86e(0x183)](_0x152168){const _0x4eb42b=_0xc2e86e,{connector:_0x38e7d6,startTarget:_0x1b3dac,endTarget:_0x3ed800}=_0x152168;if(!_0x1b3dac&&!_0x3ed800)return![];const _0x41ce54=this[_0x4eb42b(0x193)]()[_0x4eb42b(0x177)](),_0x1587d4=this[_0x4eb42b(0x17d)](),_0x454369=this['_injector'][_0x4eb42b(0x195)](_univerjs_pro_sheets_shape[_0x4eb42b(0x14d)]),_0x5389a9=this[_0x4eb42b(0x15e)][_0x4eb42b(0x195)](_univerjs_drawing['IDrawingManagerService']),_0x37222c=_0x454369[_0x4eb42b(0x159)](_0x41ce54,_0x1587d4,_0x38e7d6[_0x4eb42b(0x1d9)]);if(!_0x37222c)return![];const _0x2b2dfe=_0x37222c[_0x4eb42b(0x17b)](),_0x584120=_0x37222c[_0x4eb42b(0x165)](),_0x48fa69={};for(const _0x54ddee of _0x37222c[_0x4eb42b(0x1a5)]()){const _0xe6e2c0=_0x37222c[_0x4eb42b(0x1a8)](_0x54ddee);if(_0xe6e2c0!==void 0x0)_0x48fa69[_0x54ddee]=_0xe6e2c0;}const {startInfo:_0x5201ad,endInfo:_0x4bfb02}=this[_0x4eb42b(0x1d0)](_0x41ce54,_0x1587d4,_0x38e7d6,_0x37222c,_0x1b3dac,_0x3ed800,_0x454369,_0x5389a9,_0x584120);if(!_0x5201ad||!_0x4bfb02)return![];const _0xdb743d=(0x0,_univerjs_pro_engine_shape[_0x4eb42b(0x1d4)])((0x0,_univerjs_pro_engine_shape['routeConnectorLineShape'])(_0x5201ad,_0x4bfb02,_0x2b2dfe),_0x2b2dfe),_0x28fe93={};if(_0x1b3dac)_0x28fe93[_0x4eb42b(0x16e)]={'shapeId':_0x1b3dac[_0x4eb42b(0x170)][_0x4eb42b(0x1d9)],'cxnIndex':_0x1b3dac['connectionSiteIndex']};else{if(_0x584120===null||_0x584120===void 0x0?void 0x0:_0x584120['from'])_0x28fe93[_0x4eb42b(0x16e)]=_0x584120['from'];}if(_0x3ed800)_0x28fe93['to']={'shapeId':_0x3ed800[_0x4eb42b(0x170)][_0x4eb42b(0x1d9)],'cxnIndex':_0x3ed800['connectionSiteIndex']};else{if(_0x584120===null||_0x584120===void 0x0?void 0x0:_0x584120['to'])_0x28fe93['to']=_0x584120['to'];}return this[_0x4eb42b(0x16f)][_0x4eb42b(0x162)](_univerjs_pro_sheets_shape[_0x4eb42b(0x1a6)]['id'],{'unitId':_0x41ce54,'subUnitId':_0x1587d4,'connectorShapeId':_0x38e7d6[_0x4eb42b(0x1d9)],'width':_0xdb743d[_0x4eb42b(0x19c)][_0x4eb42b(0x161)],'height':_0xdb743d['worldRect'][_0x4eb42b(0x155)],'left':_0xdb743d[_0x4eb42b(0x19c)][_0x4eb42b(0x1b0)],'top':_0xdb743d[_0x4eb42b(0x19c)]['top'],'flipX':_0xdb743d[_0x4eb42b(0x19c)][_0x4eb42b(0x182)]||![],'flipY':_0xdb743d[_0x4eb42b(0x19c)][_0x4eb42b(0x1c4)]||![],'oldAdjustValues':_0x48fa69,'newAdjustValues':_0xdb743d[_0x4eb42b(0x145)],'newLineType':_0xdb743d[_0x4eb42b(0x160)],'oldLineType':_0x2b2dfe,'rotation':_0xdb743d['rotation'],'oldRelation':_0x584120,'newRelation':_0x28fe93});}['_preloadShapeProperties'](_0x761846,_0x2d2f15,_0xeeeb2,_0x3be40b){const _0x5942ee=_0xc2e86e,_0x19bb25=this[_0x5942ee(0x15e)]['get'](_univerjs_drawing[_0x5942ee(0x192)])[_0x5942ee(0x1b7)]({'unitId':_0x2d2f15,'subUnitId':_0xeeeb2,'drawingId':_0x3be40b});if(_0x19bb25===null||_0x19bb25===void 0x0?void 0x0:_0x19bb25[_0x5942ee(0x1c2)]){var _0xb90c3c,_0x410458,_0x28b066,_0x49c352;_0x761846['x']=(_0xb90c3c=_0x19bb25[_0x5942ee(0x1c2)]['left'])!==null&&_0xb90c3c!==void 0x0?_0xb90c3c:0x0,_0x761846['y']=(_0x410458=_0x19bb25['transform'][_0x5942ee(0x17f)])!==null&&_0x410458!==void 0x0?_0x410458:0x0,_0x761846[_0x5942ee(0x161)]=(_0x28b066=_0x19bb25[_0x5942ee(0x1c2)][_0x5942ee(0x161)])!==null&&_0x28b066!==void 0x0?_0x28b066:_0x761846[_0x5942ee(0x161)],_0x761846[_0x5942ee(0x155)]=(_0x49c352=_0x19bb25[_0x5942ee(0x1c2)][_0x5942ee(0x155)])!==null&&_0x49c352!==void 0x0?_0x49c352:_0x761846[_0x5942ee(0x155)];}const _0x554863=this['_injector'][_0x5942ee(0x195)](_univerjs_pro_sheets_shape['SheetsShapeService'])[_0x5942ee(0x159)](_0x2d2f15,_0xeeeb2,_0x3be40b);if(_0x554863){_0x761846[_0x5942ee(0x1af)]=_0x554863[_0x5942ee(0x17b)]();const _0x1c275e=_0x554863[_0x5942ee(0x1d5)]();if(_0x1c275e)_0x761846[_0x5942ee(0x1a7)]=JSON[_0x5942ee(0x1da)](JSON[_0x5942ee(0x171)](_0x1c275e));}}[_0xc2e86e(0x1d0)](_0x1ff0f5,_0x5a07ab,_0x25b4b0,_0x106237,_0x5af14f,_0xcbcf8,_0x4a8704,_0x319659,_0x73bb9d){const _0x4df146=_0xc2e86e;let _0x2eae36=null,_0x3e44a0=null;if(_0x5af14f)_0x2eae36=computeConnectionPointInfo(_0x1ff0f5,_0x5a07ab,_0x5af14f[_0x4df146(0x170)][_0x4df146(0x1d9)],_0x5af14f[_0x4df146(0x1cd)],_0x4a8704,_0x319659);if(_0xcbcf8)_0x3e44a0=computeConnectionPointInfo(_0x1ff0f5,_0x5a07ab,_0xcbcf8['shape'][_0x4df146(0x1d9)],_0xcbcf8[_0x4df146(0x1cd)],_0x4a8704,_0x319659);if(!_0x2eae36)_0x2eae36=this[_0x4df146(0x150)](_0x1ff0f5,_0x5a07ab,_0x25b4b0['drawId'],!![],_0x3e44a0,_0x73bb9d===null||_0x73bb9d===void 0x0?void 0x0:_0x73bb9d[_0x4df146(0x16e)],_0x4a8704,_0x319659);if(!_0x3e44a0)_0x3e44a0=this[_0x4df146(0x150)](_0x1ff0f5,_0x5a07ab,_0x25b4b0[_0x4df146(0x1d9)],![],_0x2eae36,_0x73bb9d===null||_0x73bb9d===void 0x0?void 0x0:_0x73bb9d['to'],_0x4a8704,_0x319659);return{'startInfo':_0x2eae36,'endInfo':_0x3e44a0};}[_0xc2e86e(0x150)](_0x1a0ce1,_0x2fb061,_0x176da6,_0x4fb8e4,_0x32d023,_0x4af2b7,_0x17cc18,_0x22aeb8){const _0x3ec165=_0xc2e86e;if(_0x4af2b7){const _0x28a51e=computeConnectionPointInfo(_0x1a0ce1,_0x2fb061,_0x4af2b7[_0x3ec165(0x18f)],_0x4af2b7['cxnIndex'],_0x17cc18,_0x22aeb8);if(_0x28a51e)return _0x28a51e;}if(!_0x32d023)return null;return computeFreeEndpointInfo(_0x1a0ce1,_0x2fb061,_0x176da6,_0x4fb8e4,_0x32d023,_0x17cc18,_0x22aeb8);}};_univerjs_sheets_facade[_0xc2e86e(0x180)][_0xc2e86e(0x1bf)](FWorksheetShapeMixin),exports[_0xc2e86e(0x1a0)]=FConnectorShape,exports[_0xc2e86e(0x144)]=FShape;function _0x1afc(){const _0x31fe3b=['setAbsolutePosition','getUnitId','getConnectionSites','ShapeLineTypeEnum','stroke','getShapeType','getDrawingData','getSheetId','ShapeLineDashEnum','top','FWorksheet','setStrokeLineDashType','flipX','connectShapes','isConnectorShape','1124270LVOdvy','setShapeType','28NAFGHS','setStrokeLineType','NoFill','DEFAULT_SHAPE_WIDTH','subUnitId','ShapeFillEnum','ShapeLineJoinEnum','opacity','shapeId','size','string','IDrawingManagerService','getWorkbook','ShapeGradientTypeEnum','get','4304349YgHASa','getStartConnectInfo','getPosition','ShapeArrowSizeEnum',',\x20but\x20expected\x20a\x20connector\x20shape\x20type.','setShapeSolidFill','worldRect','removeShape','call','\x20not\x20found','FConnectorShape','setStrokeLineJoinType','ShapeLineCapEnum','ShapeArrowTypeEnum','localToWorld','getAdjustNames','UpdateConnectorRelationCommand','shapeData','getAdjustValueByName','3320937JPdZSE','convertPositionCellToSheetOverGrid','FEnum','unitId','toStringTag','lineStrokeType','shapeType','left','build','toPrimitive','setPosition','getEndConnectInfo','DEFAULT_SHAPE_HEIGHT','SheetSkeletonService','getDrawingByParam','617585lewfru','getShapes','getSize','7634zlDxcv','Shape\x20type\x20is\x20required.\x20Please\x20call\x20setShapeType()\x20before\x20build().','setStrokeWidth','startArrow','extend','31540bbqWfP','object','transform','setStartArrowType','flipY','length','setStartArrowSize','ConnectorCoordinateTransform','setHeight','setNoneFill','_preloadShapeProperties','ang','setStrokeOpacity','connectionSiteIndex','isLineShape','DrawingTypeEnum','_resolveEndpoints','color','fillType','defineProperty','computeConnectorRouteLayout','getShapeData','8tnyxlG','ShapeTypeEnum','index','drawId','parse','lineJoinType','RemoveSheetDrawingCommand','getConnectionSiteList','1028448Zbjwoa','type','FShape','adjustValues','fill','getShapeId','sin','entries','drawingType','DRAWING_SHAPE','Skeleton\x20for\x20unitId\x20','SheetsShapeService','getConnectorLinePoints','constructor','_resolveExistingOrFreeEndpoint','symbol','point','insertShape','gradientAngle','height','abs','setStrokeLineCapType','setEndArrowSize','getShapeModel','2HMcZGc','setStrokeColor','updateContext','find','_injector','dashType','lineType','width','executeCommand','default','endArrow','getShapeRelation','newConnector','ensureSkeleton','ISheetDrawingService','3891876JUqWVC','\x20and\x20subUnitId\x20','generateRandomId','updateShape','setShapeGradientFill','from','_commandService','shape','stringify','prototype','push','setEndArrowType','capType'];_0x1afc=function(){return _0x31fe3b;};return _0x1afc();}
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- const _0x1420e0=_0x1b33;(function(_0x2f619f,_0x382120){const _0x22ed93=_0x1b33,_0x10a848=_0x2f619f();while(!![]){try{const _0x1aa6c7=parseInt(_0x22ed93(0x1ad))/0x1*(parseInt(_0x22ed93(0x224))/0x2)+-parseInt(_0x22ed93(0x1d8))/0x3+parseInt(_0x22ed93(0x1ae))/0x4+-parseInt(_0x22ed93(0x16e))/0x5+-parseInt(_0x22ed93(0x17c))/0x6*(-parseInt(_0x22ed93(0x1ab))/0x7)+parseInt(_0x22ed93(0x22f))/0x8*(-parseInt(_0x22ed93(0x1a8))/0x9)+-parseInt(_0x22ed93(0x1b7))/0xa*(-parseInt(_0x22ed93(0x19e))/0xb);if(_0x1aa6c7===_0x382120)break;else _0x10a848['push'](_0x10a848['shift']());}catch(_0x21cd83){_0x10a848['push'](_0x10a848['shift']());}}}(_0x5df6,0x67ebd),Object[_0x1420e0(0x1c8)](exports,Symbol[_0x1420e0(0x1a6)],{'value':_0x1420e0(0x1b0)}));let _univerjs_pro_engine_shape=require('@univerjs-pro/engine-shape'),_univerjs_core=require('@univerjs/core'),_univerjs_sheets=require('@univerjs/sheets'),_univerjs_sheets_drawing=require('@univerjs/sheets-drawing'),_univerjs_pro_license=require('@univerjs-pro/license'),_univerjs_drawing=require('@univerjs/drawing');const DEFAULT_SHAPE_WIDTH=0xc8,DEFAULT_SHAPE_HEIGHT=0xc8;function _typeof(_0x358621){'@babel/helpers - typeof';const _0x3fb051=_0x1420e0;return _typeof=_0x3fb051(0x1f1)==typeof Symbol&&_0x3fb051(0x1c2)==typeof Symbol[_0x3fb051(0x215)]?function(_0x5b8544){return typeof _0x5b8544;}:function(_0x35b1b5){const _0x3f80ca=_0x3fb051;return _0x35b1b5&&'function'==typeof Symbol&&_0x35b1b5[_0x3f80ca(0x190)]===Symbol&&_0x35b1b5!==Symbol[_0x3f80ca(0x1af)]?_0x3f80ca(0x1c2):typeof _0x35b1b5;},_typeof(_0x358621);}function toPrimitive(_0x54d9dc,_0xe72839){const _0x3ed171=_0x1420e0;if(_0x3ed171(0x1f9)!=_typeof(_0x54d9dc)||!_0x54d9dc)return _0x54d9dc;var _0x35e0df=_0x54d9dc[Symbol[_0x3ed171(0x16a)]];if(void 0x0!==_0x35e0df){var _0xab6c46=_0x35e0df[_0x3ed171(0x1b5)](_0x54d9dc,_0xe72839||_0x3ed171(0x202));if(_0x3ed171(0x1f9)!=_typeof(_0xab6c46))return _0xab6c46;throw new TypeError(_0x3ed171(0x1d5));}return(_0x3ed171(0x180)===_0xe72839?String:Number)(_0x54d9dc);}function toPropertyKey(_0x18a995){const _0x3d36af=_0x1420e0;var _0x47824c=toPrimitive(_0x18a995,_0x3d36af(0x180));return _0x3d36af(0x1c2)==_typeof(_0x47824c)?_0x47824c:_0x47824c+'';}function _defineProperty(_0x40f6a6,_0x45df40,_0x5759a){const _0x3a14d0=_0x1420e0;return(_0x45df40=toPropertyKey(_0x45df40))in _0x40f6a6?Object[_0x3a14d0(0x1c8)](_0x40f6a6,_0x45df40,{'value':_0x5759a,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x40f6a6[_0x45df40]=_0x5759a,_0x40f6a6;}var SheetShapeModelManager=class extends _univerjs_core[_0x1420e0(0x177)]{constructor(){const _0xc3d89a=_0x1420e0;super(),_defineProperty(this,'_shapes',new Map()),_defineProperty(this,_0xc3d89a(0x176),new Set()),_defineProperty(this,_0xc3d89a(0x168),new Set());}['addShape'](_0x26c406,_0x2012bf,_0x5a00f7){const _0x5b3e95=_0x1420e0,_0x597f52=new _univerjs_pro_engine_shape['ShapeModel'](_0x26c406,_0x2012bf,_0x5a00f7);this[_0x5b3e95(0x1b6)][_0x5b3e95(0x1ed)](_0x2012bf,_0x597f52);if((0x0,_univerjs_pro_engine_shape[_0x5b3e95(0x1fd)])(_0x26c406))this['_linesIds'][_0x5b3e95(0x1f6)](_0x2012bf);return _0x597f52;}[_0x1420e0(0x1d1)](_0x2c825d){const _0x3c17cb=_0x1420e0,_0x2a4ff4=[];for(const _0x519f72 of this[_0x3c17cb(0x176)]){const _0x4273ab=this['_shapes']['get'](_0x519f72);if(_0x4273ab){const _0x11cc56=_0x4273ab[_0x3c17cb(0x1c1)]();if(_0x11cc56){var _0x4b7214,_0x569048;if(((_0x4b7214=_0x11cc56[_0x3c17cb(0x1cc)])===null||_0x4b7214===void 0x0?void 0x0:_0x4b7214[_0x3c17cb(0x22d)])===_0x2c825d)_0x2a4ff4['push']({..._0x11cc56[_0x3c17cb(0x1cc)],'lineShapeId':_0x519f72,'isFrom':!![]});if(((_0x569048=_0x11cc56['to'])===null||_0x569048===void 0x0?void 0x0:_0x569048[_0x3c17cb(0x22d)])===_0x2c825d)_0x2a4ff4[_0x3c17cb(0x20e)]({..._0x11cc56['to'],'lineShapeId':_0x519f72,'isFrom':![]});}}}return _0x2a4ff4;}[_0x1420e0(0x179)](_0x51a018){const _0x26dcf9=_0x1420e0,_0x2354b1=this[_0x26dcf9(0x1b6)]['get'](_0x51a018);if(_0x2354b1)return _0x2354b1[_0x26dcf9(0x1c1)]();}[_0x1420e0(0x1db)](_0x401d94){const _0x1434dc=_0x1420e0,_0x119729=this[_0x1434dc(0x1b6)][_0x1434dc(0x213)](_0x401d94);if(_0x119729)return _0x119729[_0x1434dc(0x1db)]();}[_0x1420e0(0x18b)](_0x471836){const _0x1978da=_0x1420e0;return this[_0x1978da(0x1b6)]['has'](_0x471836);}[_0x1420e0(0x1a3)](_0x348e60){const _0x2baf07=_0x1420e0,_0xdf8036=this[_0x2baf07(0x1b6)][_0x2baf07(0x213)](_0x348e60);if(!_0xdf8036)return;if((0x0,_univerjs_pro_engine_shape[_0x2baf07(0x1fd)])(_0xdf8036[_0x2baf07(0x1db)]()))this[_0x2baf07(0x176)][_0x2baf07(0x1ff)](_0x348e60);this[_0x2baf07(0x1b6)][_0x2baf07(0x1ff)](_0x348e60);}['toJSON'](){const _0x529fd2=_0x1420e0,_0x5dcef0=[];return this[_0x529fd2(0x1b6)][_0x529fd2(0x22a)](_0xb338fd=>{const _0x3e38e5=_0x529fd2;_0x5dcef0['push'](_0xb338fd[_0x3e38e5(0x16b)]());}),_0x5dcef0;}[_0x1420e0(0x1bc)](_0x4009b9){const _0xf6fa07=_0x1420e0;for(const _0x10bf92 of _0x4009b9){const {id:_0x2e11ec,shapeType:_0xaa0a2e}=_0x10bf92,_0x1417a6=this[_0xf6fa07(0x1ef)](_0xaa0a2e,_0x2e11ec,_0x10bf92[_0xf6fa07(0x1b1)]);if(_0x1417a6&&_0x1417a6[_0xf6fa07(0x1a7)]())this[_0xf6fa07(0x176)]['add'](_0x2e11ec);}}[_0x1420e0(0x22c)](){const _0x33659c=_0x1420e0;if(this[_0x33659c(0x1d2)])return;this[_0x33659c(0x1b6)][_0x33659c(0x22a)](_0x5e52d3=>{const _0x409e66=_0x33659c;_0x5e52d3[_0x409e66(0x22c)]();}),this['_shapes'][_0x33659c(0x227)](),this[_0x33659c(0x176)][_0x33659c(0x227)](),this[_0x33659c(0x168)][_0x33659c(0x227)](),super[_0x33659c(0x22c)]();}};function __decorateParam(_0x52f759,_0x31c012){return function(_0x295cca,_0x578971){_0x31c012(_0x295cca,_0x578971,_0x52f759);};}function __decorate(_0x1c3f1d,_0xb68cd6,_0x5171e4,_0x2b6bf1){const _0x112065=_0x1420e0;var _0x897924=arguments[_0x112065(0x206)],_0x4d69a3=_0x897924<0x3?_0xb68cd6:_0x2b6bf1===null?_0x2b6bf1=Object[_0x112065(0x1ec)](_0xb68cd6,_0x5171e4):_0x2b6bf1,_0x55ec87;if(typeof Reflect===_0x112065(0x1f9)&&typeof Reflect[_0x112065(0x1c4)]===_0x112065(0x1f1))_0x4d69a3=Reflect[_0x112065(0x1c4)](_0x1c3f1d,_0xb68cd6,_0x5171e4,_0x2b6bf1);else{for(var _0x5cb865=_0x1c3f1d[_0x112065(0x206)]-0x1;_0x5cb865>=0x0;_0x5cb865--)if(_0x55ec87=_0x1c3f1d[_0x5cb865])_0x4d69a3=(_0x897924<0x3?_0x55ec87(_0x4d69a3):_0x897924>0x3?_0x55ec87(_0xb68cd6,_0x5171e4,_0x4d69a3):_0x55ec87(_0xb68cd6,_0x5171e4))||_0x4d69a3;}return _0x897924>0x3&&_0x4d69a3&&Object['defineProperty'](_0xb68cd6,_0x5171e4,_0x4d69a3),_0x4d69a3;}const SHEET_SHAPE_PLUGIN=_0x1420e0(0x172);function _0x5df6(){const _0x2304d8=['UniverLicensePlugin','SetDrawingApplyMutation','UpdateLineShapeResizeCommand','add','rotateEnabled','CommandType','object','entries','packageName','routeConnectorLineShape','isConnectorShape','updateContext','delete','sheet.command.update-connector-relation','SheetsShapeService','default','_sheetInterceptorService','params','angle','length','transformToDrawingPosition','getAdjustNames','getSheetCommandTarget','setShapeData','sheet.command.insert-shape','sequenceExecute','UniverInstanceType','push','UNIVER_SHEET','worldRect','getBasicShapeType','data','get','_addLineRerouteUpdates','iterator','flipX','_serializeShapeForUnit','_initSnapshot','merge','transformToAxisAlignPosition','rotation','0.21.0','getDrawingByParam','_ensureShapeModelManager','left','_commandService','InsertShapeCommand','find','pushUndoRedo','50VLeKLN','width','sheet.command.set-shape-drawing-data','clear','every','fill','forEach','removeLinePoints','dispose','shapeId','MUTATION','184BOhWfu','syncExecuteCommand','SheetSkeletonService','IConfigService','drawingType','sheet.command.update-line-shape-resize','position','_groupIds','getBatchUpdateOp','toPrimitive','toJSON','isFrom','getEndConnectInfo','1450655ndbNKM','getSkeleton','getDrawingData','redos','SHEET_SHAPE_PLUGIN','DrawingTypeEnum','INSERT','index','_linesIds','Disposable','filter','getLineShapeRelation','startY','_resourcesManagerService','57918EQqsPN','adjustValues','transform','disposeWithMe','string','SetSheetDrawingCommand','UniverSheetsShapePlugin','@univerjs-pro/sheets-shape','UpdateSheetsShapeTypeMutation','IUniverInstanceService','keys','onCommandExecute','ISheetDrawingService','sheet.mutation.insert-shape','preRedos','hasShape','Fail\x20to\x20get\x20shape\x20model,\x20get:\x20','SetSheetsShapeTextVerticalToggleCommand','InsertSheetDrawingCommand','cos','constructor','RemoveSheetDrawingCommand','getShapeTextData','DRAWING_SHAPE','touchDependencies','flipY','_sheetsShapeService','generateRandomId','COMMAND','lineShapeId','borderEnabled','Inject','relation','REMOVE','11wLIgBp','version','sheet.mutation.update-shape-data','sheet.mutation.update-shape-type','DependentOn','removeShape','getShapeModel','sheet.command.toggle-shape-flip','toStringTag','isLineShape','251658Tpbcdx','_shapeModelManagerMap','parse','196NdXYcY','DrawingApplyType','29675KxAaYj','2110780zGFsuU','prototype','Module','shapeData','cxnIndex','preUndos','sin','call','_shapes','5172740htCncm','ensureSkeleton','UPDATE','sheet.command.update-shape-type','sheets-shape.config','fromJSON','ToggleSheetsShapeFlipCommand','getStartConnectInfo','_addLineFollowShapeUpdates','IUndoRedoService','getShapeRelation','symbol','InsertSheetsShapeMutation','decorate','SheetInterceptorService','range','_config','defineProperty','undos','sheet.mutation.remove-shape','onStarting','from','_sheetSkeletonService','insertShape','_injector','interceptCommand','getBasicShapeRelation','_disposed','_initCommands','Plugin','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','pluginName','getCellIndexAndOffsetByPosition','2094630RzlwmS','SetShapeDrawingDataCommand','height','getShapeType','getShapeData','resizeEnabled','startX','_configService','type','_deserializeShapeForUnit','UpdateSheetsShapeTypeCommand','sheet.command.set-shape-rotate','top','setShapeType','assign','_drawingManagerService','getCellWithCoordByIndex','_initCommandInterceptor','ClearSheetDrawingTransformerOperation','DEFAULT_SHAPE_HEIGHT','getOwnPropertyDescriptor','set','_getConnectPointInfo','addShape','ICommandService','function','getShapeDataById'];_0x5df6=function(){return _0x2304d8;};return _0x5df6();}let SheetsShapeService=class SheetsShapeService extends _univerjs_core[_0x1420e0(0x177)]{constructor(_0x4d1272){const _0x23026b=_0x1420e0;super(),this['_resourcesManagerService']=_0x4d1272,_defineProperty(this,'_shapeModelManagerMap',new Map()),this[_0x23026b(0x218)]();}[_0x1420e0(0x21e)](_0x488e2d,_0x52275f){const _0xc9f119=_0x1420e0;let _0x37ac1c=this['_shapeModelManagerMap'][_0xc9f119(0x213)](_0x488e2d);!_0x37ac1c&&(_0x37ac1c=new Map(),this[_0xc9f119(0x1a9)][_0xc9f119(0x1ed)](_0x488e2d,_0x37ac1c));let _0x1d1168=_0x37ac1c[_0xc9f119(0x213)](_0x52275f);return!_0x1d1168&&(_0x1d1168=new SheetShapeModelManager(),_0x37ac1c[_0xc9f119(0x1ed)](_0x52275f,_0x1d1168)),_0x1d1168;}['insertShape'](_0x159ed0,_0x46e076,_0x4ea77f,_0x7f9541,_0x494e80){const _0x1c87d8=_0x1420e0;this[_0x1c87d8(0x21e)](_0x159ed0,_0x46e076)[_0x1c87d8(0x1ef)](_0x4ea77f,_0x7f9541,_0x494e80);}['removeShape'](_0x3bba0d,_0x2d7cbe,_0x2d2b8b){const _0x16ed4f=_0x1420e0;this[_0x16ed4f(0x21e)](_0x3bba0d,_0x2d7cbe)[_0x16ed4f(0x1a3)](_0x2d2b8b);}[_0x1420e0(0x211)](_0x26f7e6,_0x406325,_0x11cc7d){const _0x463055=_0x1420e0;return this[_0x463055(0x21e)](_0x26f7e6,_0x406325)[_0x463055(0x1db)](_0x11cc7d);}[_0x1420e0(0x1db)](_0x23629d,_0x5bff6d,_0x53d876){const _0x35a2b2=_0x1420e0;return this['_ensureShapeModelManager'](_0x23629d,_0x5bff6d)[_0x35a2b2(0x1db)](_0x53d876);}['hasShape'](_0x308879,_0x5f01ab,_0x1e1baf){return this['_ensureShapeModelManager'](_0x308879,_0x5f01ab)['hasShape'](_0x1e1baf);}['getShapeTypeById'](_0x53bd53,_0x3ce88c,_0x5816ba){const _0x4e28fe=_0x1420e0;return this[_0x4e28fe(0x21e)](_0x53bd53,_0x3ce88c)[_0x4e28fe(0x1db)](_0x5816ba);}[_0x1420e0(0x1f2)](_0x53765e,_0x214fb5,_0x34c58d){const _0x19d94f=_0x1420e0,_0x45d603=this['_ensureShapeModelManager'](_0x53765e,_0x214fb5);if(!_0x45d603['getShapeType'](_0x34c58d))return;const _0x3b54b9=_0x45d603[_0x19d94f(0x1b6)]['get'](_0x34c58d);if(!_0x3b54b9)return;return _0x3b54b9[_0x19d94f(0x1dc)]();}[_0x1420e0(0x1a4)](_0x5113eb,_0x5b4fbb,_0x27e019){const _0x27d3c0=_0x1420e0;return this[_0x27d3c0(0x21e)](_0x5113eb,_0x5b4fbb)[_0x27d3c0(0x1b6)]['get'](_0x27e019);}[_0x1420e0(0x1d1)](_0x5b4025,_0x2ee420,_0x57d2e6){const _0x4fe2b3=_0x1420e0;return this[_0x4fe2b3(0x21e)](_0x5b4025,_0x2ee420)[_0x4fe2b3(0x1d1)](_0x57d2e6);}[_0x1420e0(0x179)](_0x1f112b,_0xd84fc,_0xc127ee){const _0x464517=_0x1420e0,_0x1bbd27=this[_0x464517(0x21e)](_0x1f112b,_0xd84fc)[_0x464517(0x1b6)][_0x464517(0x213)](_0xc127ee);if(!_0x1bbd27)return;return _0x1bbd27[_0x464517(0x1c1)]();}[_0x1420e0(0x1e5)](){}['_serializeShapeForUnit'](_0x566b8a){const _0x274051=_0x1420e0,_0x5b40ee={},_0x15ba9f=this[_0x274051(0x1a9)][_0x274051(0x213)](_0x566b8a);if(_0x15ba9f)_0x15ba9f[_0x274051(0x22a)]((_0xb33b5e,_0x4bf0df)=>{const _0x458443=_0x274051,_0x2f1df6=_0xb33b5e[_0x458443(0x16b)]();if(_0x2f1df6[_0x458443(0x206)]>0x0)_0x5b40ee[_0x4bf0df]=_0x2f1df6;});return JSON['stringify'](_0x5b40ee);}[_0x1420e0(0x1e1)](_0x3cfc64,_0x2d23fb){const _0x5a4ce4=_0x1420e0;Object[_0x5a4ce4(0x186)](_0x2d23fb)[_0x5a4ce4(0x22a)](_0x1bc69d=>{const _0x35495f=_0x5a4ce4;this[_0x35495f(0x21e)](_0x3cfc64,_0x1bc69d)[_0x35495f(0x1bc)](_0x2d23fb[_0x1bc69d]);});}['toJSON'](){const _0x56fd81=_0x1420e0,_0x3c76d2={};return this[_0x56fd81(0x1a9)][_0x56fd81(0x22a)]((_0x865f39,_0xb6a8e7)=>{const _0x217ce5=_0x56fd81;_0x3c76d2[_0xb6a8e7]={},_0x865f39[_0x217ce5(0x22a)]((_0x3fa35b,_0xe5c7b)=>{_0x3c76d2[_0xb6a8e7][_0xe5c7b]=_0x3fa35b['toJSON']();});}),_0x3c76d2;}['fromJSON'](_0x3bc791){const _0x85bfe2=_0x1420e0;Object[_0x85bfe2(0x186)](_0x3bc791)[_0x85bfe2(0x22a)](_0x5639a5=>{const _0xc0330=_0x85bfe2,_0x5a8809=_0x3bc791[_0x5639a5];Object[_0xc0330(0x186)](_0x5a8809)['forEach'](_0x1a2131=>{const _0x5108e9=_0xc0330;this[_0x5108e9(0x21e)](_0x5639a5,_0x1a2131)[_0x5108e9(0x1bc)](_0x5a8809[_0x1a2131]);});});}['_initSnapshot'](){const _0x588ce0=_0x1420e0;this[_0x588ce0(0x17b)]['registerPluginResource']({'pluginName':SHEET_SHAPE_PLUGIN,'businesses':[_univerjs_core[_0x588ce0(0x20d)][_0x588ce0(0x20f)]],'toJson':_0x6237b2=>this[_0x588ce0(0x217)](_0x6237b2),'parseJson':_0x2fd96d=>JSON[_0x588ce0(0x1aa)](_0x2fd96d),'onLoad':(_0x1f0462,_0x116a0c)=>{const _0x4d807e=_0x588ce0;this[_0x4d807e(0x1e1)](_0x1f0462,_0x116a0c);},'onUnLoad':_0x1e8ab3=>{const _0x2b344c=_0x588ce0,_0x296bc2=this[_0x2b344c(0x1a9)][_0x2b344c(0x213)](_0x1e8ab3);_0x296bc2&&(_0x296bc2[_0x2b344c(0x22a)](_0xf29c45=>{_0xf29c45['dispose']();}),this['_shapeModelManagerMap'][_0x2b344c(0x1ff)](_0x1e8ab3));}});}[_0x1420e0(0x22c)](){const _0x4a6cf3=_0x1420e0;this[_0x4a6cf3(0x1a9)][_0x4a6cf3(0x22a)](_0x23bc75=>{const _0x32e20f=_0x4a6cf3;_0x23bc75[_0x32e20f(0x22a)](_0x2eb625=>{const _0x3b5ca1=_0x32e20f;_0x2eb625[_0x3b5ca1(0x22c)]();});});}};SheetsShapeService=__decorate([__decorateParam(0x0,_univerjs_core['IResourceManagerService'])],SheetsShapeService);const InsertSheetsShapeMutation={'id':_0x1420e0(0x189),'type':_univerjs_core['CommandType'][_0x1420e0(0x22e)],'handler':(_0x32e0bf,_0x4046ea)=>{const _0x528ada=_0x1420e0,{unitId:_0x3d69ff,subUnitId:_0x65eb3f,shapeType:_0x1a2508,shapeId:_0x4ce2b1,shapeData:_0x14bbbf}=_0x4046ea;return _0x32e0bf['get'](SheetsShapeService)[_0x528ada(0x1ce)](_0x3d69ff,_0x65eb3f,_0x1a2508,_0x4ce2b1,_0x14bbbf),!![];}},RemoveSheetsShapeMutation={'id':_0x1420e0(0x1ca),'type':_univerjs_core[_0x1420e0(0x1f8)][_0x1420e0(0x22e)],'handler':(_0x4e2a79,_0x5458b7)=>{const _0x505240=_0x1420e0,{unitId:_0x54e5c3,subUnitId:_0x4082e7,shapeId:_0x324dd8}=_0x5458b7;return _0x4e2a79['get'](SheetsShapeService)[_0x505240(0x1a3)](_0x54e5c3,_0x4082e7,_0x324dd8),!![];}},InsertShapeCommand={'type':_univerjs_core[_0x1420e0(0x1f8)][_0x1420e0(0x198)],'id':_0x1420e0(0x20b),'handler':(_0x1ec85d,_0x4a1676)=>{const _0x20dbad=_0x1420e0;var _0x9093c5,_0x1bab8f;const _0x1bc01d=(0x0,_univerjs_sheets[_0x20dbad(0x209)])(_0x1ec85d[_0x20dbad(0x213)](_univerjs_core[_0x20dbad(0x185)]),_0x4a1676);if(!_0x1bc01d)return![];const _0x18ec6b=_0x1ec85d['get'](_univerjs_sheets[_0x20dbad(0x231)]),{unitId:_0x1d8a7d,subUnitId:_0x17013d}=_0x1bc01d,_0x4c5bcb=_0x18ec6b[_0x20dbad(0x1b8)](_0x1d8a7d,_0x17013d);if(!_0x4c5bcb)return![];const _0x455c8a=_0x1ec85d['get'](_univerjs_core[_0x20dbad(0x1f0)]),_0x296b63=_0x1ec85d[_0x20dbad(0x213)](_univerjs_core[_0x20dbad(0x1c0)]),_0x50cb4d=_0x1ec85d[_0x20dbad(0x213)](_univerjs_sheets[_0x20dbad(0x1c5)]),_0x4a2b1f=_0x1ec85d[_0x20dbad(0x213)](_univerjs_sheets_drawing[_0x20dbad(0x188)]),{shapeType:_0x3fa59d,shapeData:_0x56b599}=_0x4a1676,_0x44e505=_0x4a1676[_0x20dbad(0x22d)]||(0x0,_univerjs_core[_0x20dbad(0x197)])(),_0x3f4ef6={'unitId':_0x1d8a7d,'subUnitId':_0x17013d,'shapeId':_0x44e505,'shapeType':_0x3fa59d,'shapeData':_0x56b599},_0x308769=_0x4a1676[_0x20dbad(0x225)]||0xc8,_0x1158dd=_0x4a1676[_0x20dbad(0x1da)]||0xc8;let _0x3ba561=0x0,_0x5882c0=0x0,_0x38e48d={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0},_0x10a76a={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0};if(_0x4a1676[_0x20dbad(0x167)]){const {x:_0x4a05dd,y:_0x1ebd1e}=_0x4a1676[_0x20dbad(0x167)];_0x3ba561=_0x4a05dd,_0x5882c0=_0x1ebd1e,_0x38e48d=_0x4c5bcb[_0x20dbad(0x1d7)](_0x4a05dd,_0x1ebd1e),_0x10a76a=_0x4c5bcb['getCellIndexAndOffsetByPosition'](_0x4a05dd+_0x308769,_0x1ebd1e+_0x1158dd);}else{if(_0x4a1676[_0x20dbad(0x1c6)]){const {startRow:_0xf5416c,startColumn:_0x1c93c7}=_0x4a1676[_0x20dbad(0x1c6)],_0x53885a=0xa,_0x4a903e=0xa;_0x38e48d={'row':_0xf5416c,'rowOffset':_0x53885a,'column':_0x1c93c7,'columnOffset':_0x4a903e};const _0x40979f=_0x4c5bcb[_0x20dbad(0x1e8)](_0xf5416c,_0x1c93c7);_0x3ba561=_0x40979f[_0x20dbad(0x1de)]+_0x4a903e,_0x5882c0=_0x40979f[_0x20dbad(0x17a)]+_0x53885a,_0x10a76a=_0x4c5bcb[_0x20dbad(0x1d7)](_0x3ba561+_0x308769,_0x5882c0+_0x1158dd);}}const _0x4f6c3d={'from':_0x38e48d,'to':_0x10a76a},_0x47ea37={'unitId':_0x1d8a7d,'subUnitId':_0x17013d,'drawingId':_0x44e505,'drawingType':_univerjs_core[_0x20dbad(0x173)]['DRAWING_SHAPE'],'sheetTransform':_0x4f6c3d,'transform':{'left':_0x3ba561,'top':_0x5882c0,'width':_0x308769,'height':_0x1158dd},'data':{'shapeType':_0x3fa59d,'shapeData':_0x56b599},'axisAlignSheetTransform':_0x4f6c3d,'allowTransform':!![]};(0x0,_univerjs_pro_engine_shape[_0x20dbad(0x1fd)])(_0x3fa59d)&&(_0x47ea37[_0x20dbad(0x212)][_0x20dbad(0x229)]=![],_0x47ea37[_0x20dbad(0x212)][_0x20dbad(0x1f7)]=![],_0x47ea37[_0x20dbad(0x212)]['resizeEnabled']=![],_0x47ea37[_0x20dbad(0x212)][_0x20dbad(0x19a)]=![],_0x47ea37[_0x20dbad(0x17e)][_0x20dbad(0x1f7)]=![],_0x47ea37[_0x20dbad(0x17e)]['resizeEnabled']=![],_0x47ea37['transform']['borderEnabled']=![]);const {undo:_0x312f2a,redo:_0x4b338e,objects:_0x7bc37e}=_0x4a2b1f['getBatchAddOp']([_0x47ea37]),_0x4c8216=_0x50cb4d[_0x20dbad(0x187)]({'id':_univerjs_sheets_drawing[_0x20dbad(0x18e)]['id'],'params':{'unitId':_0x1d8a7d,'drawings':[_0x47ea37]}}),_0x24f90c=[...(_0x9093c5=_0x4c8216[_0x20dbad(0x18a)])!==null&&_0x9093c5!==void 0x0?_0x9093c5:[],{'id':_univerjs_sheets_drawing[_0x20dbad(0x1f4)]['id'],'params':{'unitId':_0x1d8a7d,'subUnitId':_0x17013d,'op':_0x4b338e,'objects':_0x7bc37e,'type':_univerjs_sheets_drawing[_0x20dbad(0x1ac)][_0x20dbad(0x174)]}},{'id':_univerjs_sheets_drawing[_0x20dbad(0x1ea)]['id'],'params':[_0x1d8a7d]},..._0x4c8216[_0x20dbad(0x171)],{'id':InsertSheetsShapeMutation['id'],'params':_0x3f4ef6}],_0x4c0c0d=[{'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x1d8a7d,'subUnitId':_0x17013d,'shapeId':_0x44e505}},...(_0x1bab8f=_0x4c8216['preUndos'])!==null&&_0x1bab8f!==void 0x0?_0x1bab8f:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x1d8a7d,'subUnitId':_0x17013d,'op':_0x312f2a,'objects':_0x7bc37e,'type':_univerjs_sheets_drawing[_0x20dbad(0x1ac)][_0x20dbad(0x19d)]}},{'id':_univerjs_sheets_drawing[_0x20dbad(0x1ea)]['id'],'params':[_0x1d8a7d]},..._0x4c8216[_0x20dbad(0x1c9)]];if((0x0,_univerjs_core['sequenceExecute'])(_0x24f90c,_0x455c8a))return _0x296b63[_0x20dbad(0x223)]({'unitID':_0x1d8a7d,'undoMutations':_0x4c0c0d,'redoMutations':_0x24f90c}),!![];return![];}},UpdateSheetsShapeDataMutation={'id':_0x1420e0(0x1a0),'type':_univerjs_core[_0x1420e0(0x1f8)][_0x1420e0(0x22e)],'handler':(_0x355d0a,_0x22505b)=>{const _0x1f08bb=_0x1420e0,{unitId:_0x45d6f6,subUnitId:_0x464833,shapeType:_0x3f774f,shapeId:_0x21fe2f,shapeData:_0x43c6b2}=_0x22505b,_0x534714=_0x355d0a[_0x1f08bb(0x213)](SheetsShapeService)['getShapeModel'](_0x45d6f6,_0x464833,_0x21fe2f);if(_0x534714){if(_0x3f774f!==void 0x0)_0x534714[_0x1f08bb(0x1e5)](_0x3f774f);if(_0x43c6b2)_0x534714===null||_0x534714===void 0x0||_0x534714[_0x1f08bb(0x20a)](_0x43c6b2,!![]);}return!![];}},SetShapeDrawingDataCommand={'type':_univerjs_core[_0x1420e0(0x1f8)][_0x1420e0(0x198)],'id':_0x1420e0(0x226),'handler':(_0x5e9978,_0x3e0dea)=>{const _0x24032f=_0x1420e0;var _0xc68246,_0x5c5f16;const _0x27eb3f=(0x0,_univerjs_sheets[_0x24032f(0x209)])(_0x5e9978['get'](_univerjs_core['IUniverInstanceService']),_0x3e0dea);if(!_0x27eb3f)return![];const _0x1b42e2=_0x5e9978[_0x24032f(0x213)](_univerjs_sheets['SheetSkeletonService']),{unitId:_0x5ef547,subUnitId:_0x5b7e24}=_0x27eb3f,_0x24cb25=_0x1b42e2[_0x24032f(0x1b8)](_0x5ef547,_0x5b7e24);if(!_0x24cb25)return![];const _0x3b2bfd=_0x5e9978['get'](SheetsShapeService),{shapeId:_0x2fa39e,shapeType:_0x1636dd,shapeData:_0x131f96,position:_0x3bcd38,width:_0x2f4668,height:_0x1dac5d}=_0x3e0dea,_0x432d67=_0x3b2bfd[_0x24032f(0x1a4)](_0x5ef547,_0x5b7e24,_0x2fa39e);if(!_0x432d67)return![];const _0x381288=_0x5e9978['get'](_univerjs_core['ICommandService']),_0x366765=_0x5e9978[_0x24032f(0x213)](_univerjs_core[_0x24032f(0x1c0)]),_0x4a6817=_0x5e9978['get'](_univerjs_sheets[_0x24032f(0x1c5)]),_0x24b6ab=_0x5e9978['get'](_univerjs_sheets_drawing[_0x24032f(0x188)]),_0x248edb={'unitId':_0x5ef547,'subUnitId':_0x5b7e24,'shapeId':_0x2fa39e,'shapeType':_0x1636dd,'shapeData':_0x131f96},_0x5947c2=_0x432d67[_0x24032f(0x1db)](),_0x4b114f=_0x432d67[_0x24032f(0x1dc)](),{x:_0x52f072,y:_0x3babc1}=_0x3bcd38,_0x5a2f0b={'from':_0x24cb25['getCellIndexAndOffsetByPosition'](_0x52f072,_0x3babc1),'to':_0x24cb25[_0x24032f(0x1d7)](_0x52f072+_0x2f4668,_0x3babc1+_0x1dac5d)},_0x492306={'unitId':_0x5ef547,'subUnitId':_0x5b7e24,'drawingId':_0x2fa39e,'drawingType':_univerjs_core[_0x24032f(0x173)][_0x24032f(0x193)],'sheetTransform':_0x5a2f0b,'transform':{'left':_0x52f072,'top':_0x3babc1,'width':_0x2f4668,'height':_0x1dac5d},'data':{'shapeType':_0x1636dd,'shapeData':_0x131f96},'axisAlignSheetTransform':_0x5a2f0b,'allowTransform':!![]};(0x0,_univerjs_pro_engine_shape['isConnectorShape'])(_0x1636dd)&&(_0x492306[_0x24032f(0x212)][_0x24032f(0x229)]=![],_0x492306[_0x24032f(0x212)][_0x24032f(0x1f7)]=![],_0x492306['data']['resizeEnabled']=![],_0x492306[_0x24032f(0x212)]['borderEnabled']=![],_0x492306[_0x24032f(0x17e)][_0x24032f(0x1f7)]=![],_0x492306['transform'][_0x24032f(0x1dd)]=![],_0x492306[_0x24032f(0x17e)]['borderEnabled']=![]);const {undo:_0x25b483,redo:_0x347ec5,objects:_0x3d8b53}=_0x24b6ab['getBatchUpdateOp']([_0x492306]),_0x13366e=_0x4a6817['onCommandExecute']({'id':_univerjs_sheets_drawing['SetSheetDrawingCommand']['id'],'params':{'unitId':_0x5ef547,'drawings':[_0x492306]}}),_0x249f63=[...(_0xc68246=_0x13366e['preRedos'])!==null&&_0xc68246!==void 0x0?_0xc68246:[],{'id':_univerjs_sheets_drawing[_0x24032f(0x1f4)]['id'],'params':{'unitId':_0x5ef547,'subUnitId':_0x5b7e24,'op':_0x347ec5,'objects':_0x3d8b53,'type':_univerjs_sheets_drawing[_0x24032f(0x1ac)]['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x24032f(0x1ea)]['id'],'params':[_0x5ef547]},..._0x13366e[_0x24032f(0x171)],{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x248edb}],_0x361894=[...(_0x5c5f16=_0x13366e[_0x24032f(0x1b3)])!==null&&_0x5c5f16!==void 0x0?_0x5c5f16:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x5ef547,'subUnitId':_0x5b7e24,'op':_0x25b483,'objects':_0x3d8b53,'type':_univerjs_sheets_drawing[_0x24032f(0x1ac)][_0x24032f(0x1b9)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x5ef547]},..._0x13366e[_0x24032f(0x1c9)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x5ef547,'subUnitId':_0x5b7e24,'shapeType':_0x5947c2,'shapeId':_0x2fa39e,'shapeData':_0x4b114f}}];if((0x0,_univerjs_core[_0x24032f(0x20c)])(_0x249f63,_0x381288))return _0x366765['pushUndoRedo']({'unitID':_0x5ef547,'undoMutations':_0x361894,'redoMutations':_0x249f63}),!![];return![];}},ToggleSheetsShapeFlipCommand={'type':_univerjs_core['CommandType'][_0x1420e0(0x198)],'id':_0x1420e0(0x1a5),'handler':(_0x14019a,_0x26a869)=>{const _0x4b2205=_0x1420e0;var _0x54be8d,_0xa679b0;const _0x40a6da=(0x0,_univerjs_sheets[_0x4b2205(0x209)])(_0x14019a['get'](_univerjs_core['IUniverInstanceService']),_0x26a869);if(!_0x40a6da)return![];const _0xf8dc51=_0x14019a[_0x4b2205(0x213)](_univerjs_sheets[_0x4b2205(0x231)]),{unitId:_0x510d76,subUnitId:_0x3248dc}=_0x40a6da,_0x11a34f=_0xf8dc51['getSkeleton'](_0x510d76,_0x3248dc);if(!_0x11a34f)return![];const _0x33c2d2=_0x14019a['get'](_univerjs_sheets_drawing[_0x4b2205(0x188)]),{shapeId:_0x278acb,flipH:_0x13c202,flipV:_0x54e872}=_0x26a869,_0x84ba81=_0x33c2d2['getDrawingByParam']({'unitId':_0x510d76,'subUnitId':_0x3248dc,'drawingId':_0x278acb});if(!_0x84ba81)return![];const _0x33f705=_0x14019a[_0x4b2205(0x213)](SheetsShapeService)[_0x4b2205(0x1a4)](_0x510d76,_0x3248dc,_0x278acb);if(!_0x33f705)return![];const _0x3567cd=_0x14019a['get'](_univerjs_core[_0x4b2205(0x1f0)]),_0x6958d=_0x14019a[_0x4b2205(0x213)](_univerjs_core[_0x4b2205(0x1c0)]),_0xa938bc=_0x14019a[_0x4b2205(0x213)](_univerjs_sheets[_0x4b2205(0x1c5)]),_0x2e51ed={..._0x84ba81[_0x4b2205(0x17e)]};if(_0x13c202!==void 0x0)_0x2e51ed[_0x4b2205(0x216)]=!_0x2e51ed[_0x4b2205(0x216)];if(_0x54e872!==void 0x0)_0x2e51ed[_0x4b2205(0x195)]=!_0x2e51ed[_0x4b2205(0x195)];const _0x81acdb=(0x0,_univerjs_sheets_drawing[_0x4b2205(0x207)])(_0x2e51ed,_0x11a34f),_0x589a57=(0x0,_univerjs_sheets_drawing[_0x4b2205(0x21a)])(_0x2e51ed,_0x11a34f),_0x5887b2=_0x33f705['getShapeType'](),_0x48f5b9=_0x33f705[_0x4b2205(0x1dc)](),_0xcecbf7={'unitId':_0x510d76,'subUnitId':_0x3248dc,'drawingId':_0x278acb,'drawingType':_univerjs_core[_0x4b2205(0x173)][_0x4b2205(0x193)],'sheetTransform':_0x81acdb,'transform':_0x2e51ed,'data':{'shapeType':_0x5887b2,'shapeData':_0x48f5b9},'axisAlignSheetTransform':_0x589a57,'allowTransform':!![]},{undo:_0x480291,redo:_0x5ea5e2,objects:_0x489f57}=_0x33c2d2[_0x4b2205(0x169)]([_0xcecbf7]),_0x57ccf4=_0xa938bc['onCommandExecute']({'id':_univerjs_sheets_drawing[_0x4b2205(0x181)]['id'],'params':{'unitId':_0x510d76,'drawings':[_0xcecbf7]}}),_0x292df1=[...(_0x54be8d=_0x57ccf4['preRedos'])!==null&&_0x54be8d!==void 0x0?_0x54be8d:[],{'id':_univerjs_sheets_drawing[_0x4b2205(0x1f4)]['id'],'params':{'unitId':_0x510d76,'subUnitId':_0x3248dc,'op':_0x5ea5e2,'objects':_0x489f57,'type':_univerjs_sheets_drawing[_0x4b2205(0x1ac)][_0x4b2205(0x1b9)]}},{'id':_univerjs_sheets_drawing[_0x4b2205(0x1ea)]['id'],'params':[_0x510d76]},..._0x57ccf4['redos']],_0x27425c=[...(_0xa679b0=_0x57ccf4[_0x4b2205(0x1b3)])!==null&&_0xa679b0!==void 0x0?_0xa679b0:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x510d76,'subUnitId':_0x3248dc,'op':_0x480291,'objects':_0x489f57,'type':_univerjs_sheets_drawing[_0x4b2205(0x1ac)][_0x4b2205(0x1b9)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x510d76]},..._0x57ccf4[_0x4b2205(0x1c9)]];if((0x0,_univerjs_pro_engine_shape[_0x4b2205(0x1fd)])(_0x5887b2)){const _0x1a5eb1=_0x33f705[_0x4b2205(0x1c1)]();if(_0x1a5eb1){const _0x29b7a4={..._0x1a5eb1};_0x29b7a4[_0x4b2205(0x1cc)]=void 0x0,_0x29b7a4['to']=void 0x0,_0x292df1[_0x4b2205(0x20e)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x510d76,'subUnitId':_0x3248dc,'shapeId':_0x278acb,'shapeType':_0x5887b2,'shapeData':{'relation':_0x29b7a4}}}),_0x27425c[_0x4b2205(0x20e)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x510d76,'subUnitId':_0x3248dc,'shapeId':_0x278acb,'shapeType':_0x5887b2,'shapeData':{'relation':_0x1a5eb1}}});}}if((0x0,_univerjs_core[_0x4b2205(0x20c)])(_0x292df1,_0x3567cd))return _0x6958d[_0x4b2205(0x223)]({'unitID':_0x510d76,'undoMutations':_0x27425c,'redoMutations':_0x292df1}),!![];return![];}},SetSheetsShapeRotateCommand={'type':_univerjs_core[_0x1420e0(0x1f8)]['COMMAND'],'id':_0x1420e0(0x1e3),'handler':(_0x3ba85d,_0x3680d8)=>{const _0x2e9a38=_0x1420e0;var _0x58183c,_0x40f7ad;const _0x5342f5=(0x0,_univerjs_sheets[_0x2e9a38(0x209)])(_0x3ba85d[_0x2e9a38(0x213)](_univerjs_core[_0x2e9a38(0x185)]),_0x3680d8);if(!_0x5342f5)return![];const _0x335e76=_0x3ba85d['get'](_univerjs_sheets[_0x2e9a38(0x231)]),{unitId:_0x3b77cc,subUnitId:_0x254053}=_0x5342f5,_0xbf7160=_0x335e76[_0x2e9a38(0x16f)](_0x3b77cc,_0x254053);if(!_0xbf7160)return![];const _0x1fee37=_0x3ba85d['get'](_univerjs_sheets_drawing[_0x2e9a38(0x188)]),{shapeId:_0x1d5370,rotate:_0x289360}=_0x3680d8,_0xeb7497=_0x1fee37[_0x2e9a38(0x21d)]({'unitId':_0x3b77cc,'subUnitId':_0x254053,'drawingId':_0x1d5370});if(!_0xeb7497)return![];const _0x145fe5=_0x3ba85d[_0x2e9a38(0x213)](SheetsShapeService)[_0x2e9a38(0x1a4)](_0x3b77cc,_0x254053,_0x1d5370);if(!_0x145fe5)return![];const _0x3681a9=_0x3ba85d[_0x2e9a38(0x213)](_univerjs_core[_0x2e9a38(0x1f0)]),_0x22d91e=_0x3ba85d[_0x2e9a38(0x213)](_univerjs_core[_0x2e9a38(0x1c0)]),_0x152eb6=_0x3ba85d['get'](_univerjs_sheets[_0x2e9a38(0x1c5)]),_0x541e03={..._0xeb7497['transform']};if(_0x289360!==void 0x0)_0x541e03['angle']=(_0x541e03[_0x2e9a38(0x205)]||0x0)+_0x289360;const _0x2f500b=(0x0,_univerjs_sheets_drawing[_0x2e9a38(0x207)])(_0x541e03,_0xbf7160),_0x226bf0=(0x0,_univerjs_sheets_drawing[_0x2e9a38(0x21a)])(_0x541e03,_0xbf7160),_0xdc3e8d=_0x145fe5[_0x2e9a38(0x1db)](),_0x205522=_0x145fe5[_0x2e9a38(0x1dc)](),_0x5a52ba={'unitId':_0x3b77cc,'subUnitId':_0x254053,'drawingId':_0x1d5370,'drawingType':_univerjs_core['DrawingTypeEnum'][_0x2e9a38(0x193)],'sheetTransform':_0x2f500b,'transform':_0x541e03,'data':{'shapeType':_0xdc3e8d,'shapeData':_0x205522},'axisAlignSheetTransform':_0x226bf0,'allowTransform':!![]},{undo:_0x11ef47,redo:_0x3d2bc0,objects:_0x46a5c3}=_0x1fee37[_0x2e9a38(0x169)]([_0x5a52ba]),_0x1ed942=_0x152eb6['onCommandExecute']({'id':_univerjs_sheets_drawing[_0x2e9a38(0x181)]['id'],'params':{'unitId':_0x3b77cc,'drawings':[_0x5a52ba]}}),_0x15efe9=[...(_0x58183c=_0x1ed942[_0x2e9a38(0x18a)])!==null&&_0x58183c!==void 0x0?_0x58183c:[],{'id':_univerjs_sheets_drawing[_0x2e9a38(0x1f4)]['id'],'params':{'unitId':_0x3b77cc,'subUnitId':_0x254053,'op':_0x3d2bc0,'objects':_0x46a5c3,'type':_univerjs_sheets_drawing[_0x2e9a38(0x1ac)]['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x2e9a38(0x1ea)]['id'],'params':[_0x3b77cc]},..._0x1ed942[_0x2e9a38(0x171)]],_0xfbc159=[...(_0x40f7ad=_0x1ed942['preUndos'])!==null&&_0x40f7ad!==void 0x0?_0x40f7ad:[],{'id':_univerjs_sheets_drawing[_0x2e9a38(0x1f4)]['id'],'params':{'unitId':_0x3b77cc,'subUnitId':_0x254053,'op':_0x11ef47,'objects':_0x46a5c3,'type':_univerjs_sheets_drawing[_0x2e9a38(0x1ac)][_0x2e9a38(0x1b9)]}},{'id':_univerjs_sheets_drawing[_0x2e9a38(0x1ea)]['id'],'params':[_0x3b77cc]},..._0x1ed942[_0x2e9a38(0x1c9)]];if((0x0,_univerjs_core[_0x2e9a38(0x20c)])(_0x15efe9,_0x3681a9))return _0x22d91e[_0x2e9a38(0x223)]({'unitID':_0x3b77cc,'undoMutations':_0xfbc159,'redoMutations':_0x15efe9}),!![];return![];}},SetSheetsShapeTextVerticalToggleCommand={'type':_univerjs_core[_0x1420e0(0x1f8)][_0x1420e0(0x198)],'id':'sheet.command.set-shape-text-vertical-toggle','handler':(_0x440e3e,_0x5be371)=>{const _0x224c10=_0x1420e0;var _0x43e645;const _0x2d74cc=(0x0,_univerjs_sheets[_0x224c10(0x209)])(_0x440e3e[_0x224c10(0x213)](_univerjs_core['IUniverInstanceService']),_0x5be371);if(!_0x2d74cc)return![];const {unitId:_0x260faa,subUnitId:_0x5f2bfe}=_0x2d74cc,{shapeId:_0x547441}=_0x5be371,_0xb4cca=_0x440e3e[_0x224c10(0x213)](SheetsShapeService)[_0x224c10(0x1a4)](_0x260faa,_0x5f2bfe,_0x547441);if(!_0xb4cca)return![];const _0x1de426=_0xb4cca[_0x224c10(0x192)](),_0x5a50fc=(_0x43e645=_0x1de426===null||_0x1de426===void 0x0?void 0x0:_0x1de426['isHorizontal'])!==null&&_0x43e645!==void 0x0?_0x43e645:!![],_0x32e0b6=!_0x5a50fc,_0x4637dc=_0x440e3e[_0x224c10(0x213)](_univerjs_core[_0x224c10(0x1f0)]),_0x36c598=_0x440e3e[_0x224c10(0x213)](_univerjs_core['IUndoRedoService']),_0xfc92af={'unitId':_0x260faa,'subUnitId':_0x5f2bfe,'shapeId':_0x547441,'shapeData':{'shapeText':{'isHorizontal':_0x32e0b6}}},_0x1ff2e0={'unitId':_0x260faa,'subUnitId':_0x5f2bfe,'shapeId':_0x547441,'shapeData':{'shapeText':{'isHorizontal':_0x5a50fc}}},_0x329f2f=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0xfc92af}],_0xaabd90=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x1ff2e0}];if((0x0,_univerjs_core[_0x224c10(0x20c)])(_0x329f2f,_0x4637dc))return _0x36c598[_0x224c10(0x223)]({'unitID':_0x260faa,'undoMutations':_0xaabd90,'redoMutations':_0x329f2f}),!![];return![];}},UpdateConnectorRelationCommand={'type':_univerjs_core['CommandType']['COMMAND'],'id':_0x1420e0(0x200),'handler':(_0x4eb513,_0x362320)=>{const _0x15e06e=_0x1420e0;var _0x5640d4,_0x4ad50c,_0x1038f1,_0x192ba2;const _0x33be35=(0x0,_univerjs_sheets[_0x15e06e(0x209)])(_0x4eb513[_0x15e06e(0x213)](_univerjs_core['IUniverInstanceService']),_0x362320);if(!_0x33be35)return![];const _0x7a71ae=_0x4eb513[_0x15e06e(0x213)](_univerjs_sheets['SheetSkeletonService']),{unitId:_0x2dbe18,subUnitId:_0x52c4fa}=_0x33be35,_0x5d0cbf=_0x7a71ae[_0x15e06e(0x16f)](_0x2dbe18,_0x52c4fa);if(!_0x5d0cbf)return![];const _0x8b1d25=_0x4eb513['get'](_univerjs_sheets_drawing[_0x15e06e(0x188)]),{connectorShapeId:_0x38da2d,width:_0x2b6899,height:_0x4f788e,left:_0x5bc50a,top:_0x3c1209,flipX:_0x306f31,flipY:_0x334239,rotation:_0x168e6b,oldAdjustValues:_0x421338,newAdjustValues:_0x215d64,oldLineType:_0x34c8f5,newLineType:_0x1278e6,oldRelation:_0x3dd505,newRelation:_0x3edda8}=_0x362320,_0x34bee5=_0x8b1d25['getDrawingByParam']({'unitId':_0x2dbe18,'subUnitId':_0x52c4fa,'drawingId':_0x38da2d});if(!_0x34bee5)return![];const _0x380d24=_0x4eb513[_0x15e06e(0x213)](SheetsShapeService)[_0x15e06e(0x1a4)](_0x2dbe18,_0x52c4fa,_0x38da2d);if(!_0x380d24)return![];const _0x2e5336=_0x4eb513['get'](_univerjs_core[_0x15e06e(0x1f0)]),_0x4fead8=_0x4eb513[_0x15e06e(0x213)](_univerjs_core[_0x15e06e(0x1c0)]),_0x596cea=_0x4eb513['get'](_univerjs_sheets['SheetInterceptorService']),_0x1f5784={..._0x34bee5[_0x15e06e(0x17e)],'width':_0x2b6899,'height':_0x4f788e,'left':_0x5bc50a,'top':_0x3c1209,'flipX':_0x306f31,'flipY':_0x334239,'angle':(_0x5640d4=_0x168e6b!==null&&_0x168e6b!==void 0x0?_0x168e6b:(_0x4ad50c=_0x34bee5[_0x15e06e(0x17e)])===null||_0x4ad50c===void 0x0?void 0x0:_0x4ad50c['angle'])!==null&&_0x5640d4!==void 0x0?_0x5640d4:0x0},_0x297944=(0x0,_univerjs_sheets_drawing[_0x15e06e(0x207)])(_0x1f5784,_0x5d0cbf),_0x139106=(0x0,_univerjs_sheets_drawing['transformToAxisAlignPosition'])(_0x1f5784,_0x5d0cbf),_0x4a69bb=_0x380d24[_0x15e06e(0x1db)](),_0x5afa1d=_0x380d24[_0x15e06e(0x1dc)](),_0x2890ac={'unitId':_0x2dbe18,'subUnitId':_0x52c4fa,'drawingId':_0x38da2d,'drawingType':_univerjs_core['DrawingTypeEnum']['DRAWING_SHAPE'],'sheetTransform':_0x297944,'transform':_0x1f5784,'data':{'shapeType':_0x1278e6||_0x34c8f5||_0x4a69bb,'shapeData':{..._0x5afa1d,'adjustValues':_0x215d64||_0x421338||(_0x5afa1d===null||_0x5afa1d===void 0x0?void 0x0:_0x5afa1d[_0x15e06e(0x17d)]),'relation':_0x3edda8||_0x3dd505||(_0x5afa1d===null||_0x5afa1d===void 0x0?void 0x0:_0x5afa1d['relation'])}},'axisAlignSheetTransform':_0x139106,'allowTransform':!![]},{undo:_0xd8b5e,redo:_0x17777d,objects:_0x2f2a06}=_0x8b1d25['getBatchUpdateOp']([_0x2890ac]),_0x5829b2=_0x596cea[_0x15e06e(0x187)]({'id':_univerjs_sheets_drawing[_0x15e06e(0x181)]['id'],'params':{'unitId':_0x2dbe18,'drawings':[_0x2890ac]}}),_0x492e70=[...(_0x1038f1=_0x5829b2[_0x15e06e(0x18a)])!==null&&_0x1038f1!==void 0x0?_0x1038f1:[],{'id':_univerjs_sheets_drawing[_0x15e06e(0x1f4)]['id'],'params':{'unitId':_0x2dbe18,'subUnitId':_0x52c4fa,'op':_0x17777d,'objects':_0x2f2a06,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x15e06e(0x1b9)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x2dbe18]},..._0x5829b2[_0x15e06e(0x171)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x2dbe18,'subUnitId':_0x52c4fa,'shapeId':_0x38da2d,'shapeType':_0x1278e6,'shapeData':{'adjustValues':_0x215d64,'relation':_0x3edda8}}}],_0x4e0305=[...(_0x192ba2=_0x5829b2['preUndos'])!==null&&_0x192ba2!==void 0x0?_0x192ba2:[],{'id':_univerjs_sheets_drawing[_0x15e06e(0x1f4)]['id'],'params':{'unitId':_0x2dbe18,'subUnitId':_0x52c4fa,'op':_0xd8b5e,'objects':_0x2f2a06,'type':_univerjs_sheets_drawing[_0x15e06e(0x1ac)][_0x15e06e(0x1b9)]}},{'id':_univerjs_sheets_drawing[_0x15e06e(0x1ea)]['id'],'params':[_0x2dbe18]},..._0x5829b2[_0x15e06e(0x1c9)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x2dbe18,'subUnitId':_0x52c4fa,'shapeId':_0x38da2d,'shapeType':_0x4a69bb,'shapeData':{..._0x5afa1d,'adjustValues':_0x421338||(_0x5afa1d===null||_0x5afa1d===void 0x0?void 0x0:_0x5afa1d[_0x15e06e(0x17d)]),'relation':_0x3dd505||(_0x5afa1d===null||_0x5afa1d===void 0x0?void 0x0:_0x5afa1d[_0x15e06e(0x19c)])}}}];if((0x0,_univerjs_core['sequenceExecute'])(_0x492e70,_0x2e5336))return _0x4fead8[_0x15e06e(0x223)]({'unitID':_0x2dbe18,'undoMutations':_0x4e0305,'redoMutations':_0x492e70}),!![];return![];}},UpdateLineShapeResizeCommand={'type':_univerjs_core[_0x1420e0(0x1f8)][_0x1420e0(0x198)],'id':_0x1420e0(0x166),'handler':(_0x525feb,_0x27c507)=>{const _0x4684ee=_0x1420e0;var _0xa0adb0,_0x2631ae;const _0x3b782e=(0x0,_univerjs_sheets[_0x4684ee(0x209)])(_0x525feb[_0x4684ee(0x213)](_univerjs_core[_0x4684ee(0x185)]),_0x27c507);if(!_0x3b782e)return![];const _0xc1caf7=_0x525feb['get'](_univerjs_sheets[_0x4684ee(0x231)]),{unitId:_0x31eeca,subUnitId:_0x59cc16}=_0x3b782e,_0x49bae5=_0xc1caf7[_0x4684ee(0x16f)](_0x31eeca,_0x59cc16);if(!_0x49bae5)return![];const _0x549530=_0x525feb[_0x4684ee(0x213)](_univerjs_sheets_drawing[_0x4684ee(0x188)]),{shapeId:_0x18140a,width:_0x1aa7bd,height:_0x35e005,left:_0x461ecb,top:_0x42342d,flipX:_0xf38230,flipY:_0x3b86b8,angle:_0x4a260f,oldAdjustValues:_0x220c98,newAdjustValues:_0x84817a,oldLineType:_0x530996,newLineType:_0x434319}=_0x27c507,_0x518793=_0x549530[_0x4684ee(0x21d)]({'unitId':_0x31eeca,'subUnitId':_0x59cc16,'drawingId':_0x18140a});if(!_0x518793)return![];const _0x5b29a8=_0x525feb[_0x4684ee(0x213)](SheetsShapeService)[_0x4684ee(0x1a4)](_0x31eeca,_0x59cc16,_0x18140a);if(!_0x5b29a8)return![];const _0x225b22=_0x525feb[_0x4684ee(0x213)](_univerjs_core[_0x4684ee(0x1f0)]),_0x4299e8=_0x525feb['get'](_univerjs_core['IUndoRedoService']),_0x2b2e92=_0x525feb[_0x4684ee(0x213)](_univerjs_sheets[_0x4684ee(0x1c5)]),_0x1ee49d={..._0x518793['transform'],'width':_0x1aa7bd,'height':_0x35e005,'left':_0x461ecb,'top':_0x42342d,'flipX':_0xf38230,'flipY':_0x3b86b8,'angle':_0x4a260f},_0x296ffe=(0x0,_univerjs_sheets_drawing['transformToDrawingPosition'])(_0x1ee49d,_0x49bae5),_0x1cd480=(0x0,_univerjs_sheets_drawing[_0x4684ee(0x21a)])(_0x1ee49d,_0x49bae5),_0x490b68=_0x5b29a8[_0x4684ee(0x1db)](),_0x2aaff1=_0x5b29a8['getShapeData'](),_0x25373d={'unitId':_0x31eeca,'subUnitId':_0x59cc16,'drawingId':_0x18140a,'drawingType':_univerjs_core['DrawingTypeEnum'][_0x4684ee(0x193)],'sheetTransform':_0x296ffe,'transform':_0x1ee49d,'data':{'shapeType':_0x434319||_0x530996||_0x490b68,'shapeData':{..._0x2aaff1,'adjustValues':_0x84817a||_0x220c98||(_0x2aaff1===null||_0x2aaff1===void 0x0?void 0x0:_0x2aaff1['adjustValues'])}},'axisAlignSheetTransform':_0x1cd480,'allowTransform':!![]},{undo:_0xf3631b,redo:_0x5ac03e,objects:_0x59c2f1}=_0x549530[_0x4684ee(0x169)]([_0x25373d]),_0x53bf91=_0x2b2e92[_0x4684ee(0x187)]({'id':_univerjs_sheets_drawing['SetSheetDrawingCommand']['id'],'params':{'unitId':_0x31eeca,'drawings':[_0x25373d]}}),_0xaff803=[...(_0xa0adb0=_0x53bf91[_0x4684ee(0x18a)])!==null&&_0xa0adb0!==void 0x0?_0xa0adb0:[],{'id':_univerjs_sheets_drawing[_0x4684ee(0x1f4)]['id'],'params':{'unitId':_0x31eeca,'subUnitId':_0x59cc16,'op':_0x5ac03e,'objects':_0x59c2f1,'type':_univerjs_sheets_drawing[_0x4684ee(0x1ac)]['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x4684ee(0x1ea)]['id'],'params':[_0x31eeca]},..._0x53bf91[_0x4684ee(0x171)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x31eeca,'subUnitId':_0x59cc16,'shapeId':_0x18140a,'shapeType':_0x434319,'shapeData':{'adjustValues':_0x84817a}}}],_0x20cf47=[...(_0x2631ae=_0x53bf91['preUndos'])!==null&&_0x2631ae!==void 0x0?_0x2631ae:[],{'id':_univerjs_sheets_drawing[_0x4684ee(0x1f4)]['id'],'params':{'unitId':_0x31eeca,'subUnitId':_0x59cc16,'op':_0xf3631b,'objects':_0x59c2f1,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x4684ee(0x1b9)]}},{'id':_univerjs_sheets_drawing[_0x4684ee(0x1ea)]['id'],'params':[_0x31eeca]},..._0x53bf91['undos'],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x31eeca,'subUnitId':_0x59cc16,'shapeId':_0x18140a,'shapeType':_0x490b68,'shapeData':{..._0x2aaff1,'adjustValues':_0x220c98||(_0x2aaff1===null||_0x2aaff1===void 0x0?void 0x0:_0x2aaff1[_0x4684ee(0x17d)])}}}];if((0x0,_univerjs_core[_0x4684ee(0x20c)])(_0xaff803,_0x225b22))return _0x4299e8[_0x4684ee(0x223)]({'unitID':_0x31eeca,'undoMutations':_0x20cf47,'redoMutations':_0xaff803}),!![];return![];}},UpdateSheetsShapeTypeMutation={'id':_0x1420e0(0x1a1),'type':_univerjs_core[_0x1420e0(0x1f8)][_0x1420e0(0x22e)],'handler':(_0x5b685f,_0x15702b)=>{const _0x32eea6=_0x1420e0,{unitId:_0x5329f8,subUnitId:_0x1ab9e4,shapeType:_0xfa0262,shapeId:_0x3719d6,shapeData:_0x457848}=_0x15702b,_0x46187a=_0x5b685f[_0x32eea6(0x213)](SheetsShapeService)[_0x32eea6(0x1a4)](_0x5329f8,_0x1ab9e4,_0x3719d6);if(_0x46187a){_0x46187a[_0x32eea6(0x1e5)](_0xfa0262);if(_0x457848)_0x46187a===null||_0x46187a===void 0x0||_0x46187a[_0x32eea6(0x20a)](_0x457848);}return!![];}},UpdateSheetsShapeTypeCommand={'id':_0x1420e0(0x1ba),'type':_univerjs_core[_0x1420e0(0x1f8)]['COMMAND'],'handler':(_0x37769b,_0x7b7a8d)=>{const _0x37990c=_0x1420e0;if(!_0x7b7a8d)return![];const _0x20f6bf=_0x37769b[_0x37990c(0x213)](_univerjs_core[_0x37990c(0x1f0)]),_0xe91832=_0x37769b[_0x37990c(0x213)](SheetsShapeService),_0xb9379c=_0x37769b[_0x37990c(0x213)](_univerjs_core[_0x37990c(0x1c0)]),_0x22f571=[],_0xa6826e=[],{unitId:_0x1c353f,subUnitId:_0xd930,shapeId:_0x23a87c,shapeType:_0x170501,shapeData:_0x1d8c75}=_0x7b7a8d,_0x3639b2=_0xe91832[_0x37990c(0x1a4)](_0x1c353f,_0xd930,_0x23a87c);if(_0x3639b2){const _0x73f1b1=_0x3639b2[_0x37990c(0x1db)](),_0x101830=Object[_0x37990c(0x1e6)]({},_0x3639b2[_0x37990c(0x1dc)]()),_0x1ae753={'unitId':_0x1c353f,'subUnitId':_0xd930,'shapeId':_0x23a87c,'shapeType':_0x170501,'shapeData':_0x1d8c75},_0x306af3={'unitId':_0x1c353f,'subUnitId':_0xd930,'shapeId':_0x23a87c,'shapeType':_0x73f1b1,'shapeData':_0x101830};_0x22f571[_0x37990c(0x20e)]({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x1ae753}),_0xa6826e[_0x37990c(0x20e)]({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x306af3});if(_0x22f571[_0x37990c(0x228)](_0x45fc4a=>_0x20f6bf[_0x37990c(0x230)](_0x45fc4a['id'],_0x45fc4a[_0x37990c(0x204)])))_0xb9379c[_0x37990c(0x223)]({'unitID':_0x1c353f,'redoMutations':[..._0x22f571],'undoMutations':[..._0xa6826e]});return!![];}return![];}};var name=_0x1420e0(0x183),version=_0x1420e0(0x21c);const SHEETS_SHAPE_PLUGIN_CONFIG_KEY=_0x1420e0(0x1bb),configSymbol=Symbol(SHEETS_SHAPE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let SheetsShapeController=class SheetsShapeController extends _univerjs_core['Disposable']{constructor(_0x56a11c,_0x2a209f,_0x3bb5e4,_0x126ee7,_0x1403fd){const _0x1595e6=_0x1420e0;super(),this[_0x1595e6(0x220)]=_0x56a11c,this[_0x1595e6(0x203)]=_0x2a209f,this[_0x1595e6(0x1cd)]=_0x3bb5e4,this[_0x1595e6(0x196)]=_0x126ee7,this[_0x1595e6(0x1e7)]=_0x1403fd,this[_0x1595e6(0x1d3)](),this[_0x1595e6(0x1e9)]();}[_0x1420e0(0x1d3)](){const _0x194010=_0x1420e0;[InsertShapeCommand,SetShapeDrawingDataCommand,ToggleSheetsShapeFlipCommand,SetSheetsShapeRotateCommand,SetSheetsShapeTextVerticalToggleCommand,UpdateConnectorRelationCommand,UpdateLineShapeResizeCommand,InsertSheetsShapeMutation,RemoveSheetsShapeMutation,UpdateSheetsShapeTypeMutation,UpdateSheetsShapeDataMutation][_0x194010(0x22a)](_0x44f473=>this[_0x194010(0x17f)](this[_0x194010(0x220)]['registerCommand'](_0x44f473)));}[_0x1420e0(0x1e9)](){const _0x30725f=_0x1420e0;this[_0x30725f(0x17f)](this[_0x30725f(0x203)][_0x30725f(0x1d0)]({'getMutations':_0xf74401=>{const _0x23c418=_0x30725f;if(_0xf74401['id']===_univerjs_sheets_drawing[_0x23c418(0x191)]['id']){const {drawings:_0x57b065}=_0xf74401[_0x23c418(0x204)],_0x37974c=_0x57b065[_0x23c418(0x178)](_0xda25a=>_0xda25a[_0x23c418(0x165)]===_univerjs_core[_0x23c418(0x173)][_0x23c418(0x193)]);if(_0x37974c[_0x23c418(0x206)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x11946e=[],_0x2a459c=[];return _0x37974c[_0x23c418(0x22a)](_0x1f2cd2=>{const _0x3eba57=_0x23c418,{unitId:_0x1ff829,subUnitId:_0x47d40b,drawingId:_0x12a753}=_0x1f2cd2,_0x1050ef=this[_0x3eba57(0x196)]['getShapeModel'](_0x1ff829,_0x47d40b,_0x12a753);if(!_0x1050ef)throw new TypeError('Fail\x20to\x20get\x20shape\x20model,\x20get:\x20'+_0x1050ef);_0x11946e[_0x3eba57(0x20e)]({'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x1ff829,'subUnitId':_0x47d40b,'shapeId':_0x12a753}}),_0x2a459c[_0x3eba57(0x20e)]({'id':InsertSheetsShapeMutation['id'],'params':{'unitId':_0x1ff829,'subUnitId':_0x47d40b,'shapeId':_0x12a753,'shapeType':_0x1050ef[_0x3eba57(0x1db)](),'shapeData':_0x1050ef['getShapeData']()}});const _0x558fa5=this[_0x3eba57(0x196)][_0x3eba57(0x1d1)](_0x1ff829,_0x47d40b,_0x12a753);if(_0x558fa5)for(const _0x37f22a of _0x558fa5){const _0x275ecd=_0x37f22a[_0x3eba57(0x199)],_0x2d03ba=_0x37f22a[_0x3eba57(0x16c)],_0x475c2a=_0x2d03ba?{'from':void 0x0}:{'to':void 0x0},_0xdac302=_0x2d03ba?{'from':{'shapeId':_0x37f22a[_0x3eba57(0x22d)],'cxnIndex':_0x37f22a['cxnIndex']}}:{'to':{'shapeId':_0x37f22a[_0x3eba57(0x22d)],'cxnIndex':_0x37f22a[_0x3eba57(0x1b2)]}};_0x11946e[_0x3eba57(0x20e)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x1ff829,'subUnitId':_0x47d40b,'shapeId':_0x275ecd,'shapeData':{'relation':_0x475c2a}}}),_0x2a459c[_0x3eba57(0x20e)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x1ff829,'subUnitId':_0x47d40b,'shapeId':_0x275ecd,'shapeData':{'relation':_0xdac302}}});}}),{'preRedos':_0x11946e,'redos':[],'preUndos':[],'undos':_0x2a459c};}if(_0xf74401['id']===_univerjs_sheets_drawing[_0x23c418(0x181)]['id']){const {drawings:_0x107b15}=_0xf74401[_0x23c418(0x204)],_0x2ee127=_0x107b15['filter'](_0x1bbdb2=>_0x1bbdb2['drawingType']===_univerjs_core[_0x23c418(0x173)][_0x23c418(0x193)]);if(_0x2ee127['length']===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x324608=[],_0x55e846=[];for(const _0x3af4ca of _0x2ee127){const {unitId:_0x2187f8,subUnitId:_0x438c40,drawingId:_0x34ffab,transform:_0x287769}=_0x3af4ca;if(!_0x2187f8||!_0x438c40||!_0x34ffab||!_0x287769)continue;const _0xe2a395=this[_0x23c418(0x196)][_0x23c418(0x1a4)](_0x2187f8,_0x438c40,_0x34ffab);if(!_0xe2a395)throw new TypeError(_0x23c418(0x18c)+_0xe2a395);if((0x0,_univerjs_pro_engine_shape[_0x23c418(0x1fd)])(_0xe2a395['getShapeType']())){const _0x4b430f=this[_0x23c418(0x196)][_0x23c418(0x179)](_0x2187f8,_0x438c40,_0x34ffab),_0x991449={'from':void 0x0,'to':void 0x0};_0x4b430f&&(_0x324608['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x2187f8,'subUnitId':_0x438c40,'shapeId':_0x34ffab,'shapeData':{'relation':_0x991449}}}),_0x55e846['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x2187f8,'subUnitId':_0x438c40,'shapeId':_0x34ffab,'shapeData':{'relation':_0x4b430f}}}));}else{const _0x3b3971=this['_sheetsShapeService'][_0x23c418(0x1d1)](_0x2187f8,_0x438c40,_0x34ffab);if(_0x3b3971&&_0x3b3971['length']>0x0)for(const _0x57634f of _0x3b3971){const _0x35b1f7=_0x57634f[_0x23c418(0x199)],_0x43ae34=_0x57634f[_0x23c418(0x16c)],_0x445751=this[_0x23c418(0x196)][_0x23c418(0x1a4)](_0x2187f8,_0x438c40,_0x35b1f7);if(!_0x445751)continue;const _0xc66c81=_0x445751['getStartConnectInfo'](),_0x5ee475=_0x445751[_0x23c418(0x16d)]();if(_0xc66c81&&_0x5ee475)this[_0x23c418(0x214)](_0x2187f8,_0x438c40,_0x35b1f7,_0x445751,_0xc66c81,_0x5ee475,_0x324608,_0x55e846,_0x34ffab,_0x287769);else this['_addLineFollowShapeUpdates'](_0x2187f8,_0x438c40,_0x35b1f7,_0x445751,_0x43ae34?_0xc66c81:_0x5ee475,_0x43ae34,_0x324608,_0x55e846,_0x34ffab,_0x287769);}}}return{'preRedos':[],'redos':_0x324608,'preUndos':_0x55e846,'undos':[]};}return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};}}));}['_getConnectPointInfo'](_0x23e598,_0x112464,_0x49d323,_0xe0daf1,_0x2129af){const _0x58f200=_0x1420e0;if(!_0x112464||!_0x49d323)return null;const {shapeId:_0x1b3159,cxnIndex:_0x1ac1b7}=_0x23e598,_0x4b6402=this[_0x58f200(0x196)][_0x58f200(0x1a4)](_0x112464,_0x49d323,_0x1b3159);if(!_0x4b6402)return null;const _0x48332d=this[_0x58f200(0x1e7)]['getDrawingByParam']({'unitId':_0x112464,'subUnitId':_0x49d323,'drawingId':_0x1b3159});if(!(_0x48332d===null||_0x48332d===void 0x0?void 0x0:_0x48332d[_0x58f200(0x17e)]))return null;let {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x44c441}=_0x48332d[_0x58f200(0x17e)];if(_0x2129af&&_0xe0daf1===_0x1b3159){var _0x319c3c,_0x28d7bf,_0x33c618,_0x29f397,_0x5054b3,_0x442c4d,_0x448fc6;left=(_0x319c3c=_0x2129af['left'])!==null&&_0x319c3c!==void 0x0?_0x319c3c:left,top=(_0x28d7bf=_0x2129af[_0x58f200(0x1e4)])!==null&&_0x28d7bf!==void 0x0?_0x28d7bf:top,width=(_0x33c618=_0x2129af['width'])!==null&&_0x33c618!==void 0x0?_0x33c618:width,height=(_0x29f397=_0x2129af[_0x58f200(0x1da)])!==null&&_0x29f397!==void 0x0?_0x29f397:height,flipX=(_0x5054b3=_0x2129af[_0x58f200(0x216)])!==null&&_0x5054b3!==void 0x0?_0x5054b3:flipX,flipY=(_0x442c4d=_0x2129af[_0x58f200(0x195)])!==null&&_0x442c4d!==void 0x0?_0x442c4d:flipY,_0x44c441=(_0x448fc6=_0x2129af['angle'])!==null&&_0x448fc6!==void 0x0?_0x448fc6:_0x44c441;}_0x4b6402[_0x58f200(0x1fe)]({'width':width,'height':height});const _0x2e392a=_0x4b6402['getConnectionSiteList']()[_0x58f200(0x222)](_0x19849f=>_0x19849f[_0x58f200(0x175)]===_0x1ac1b7);if(!_0x2e392a)return null;let _0x2783d9=flipX?width-_0x2e392a['x']:_0x2e392a['x'],_0x593c29=flipY?height-_0x2e392a['y']:_0x2e392a['y'];if(_0x44c441!==0x0&&_0x44c441!==void 0x0&&_0x44c441!==null){const _0x42917e=_0x44c441*Math['PI']/0xb4,_0x381b99=Math[_0x58f200(0x18f)](_0x42917e),_0x1bd614=Math[_0x58f200(0x1b4)](_0x42917e),_0x2d6e60=width/0x2,_0x40ad50=height/0x2,_0x26a94=_0x2783d9-_0x2d6e60,_0x2fb494=_0x593c29-_0x40ad50;_0x2783d9=_0x2d6e60+_0x26a94*_0x381b99-_0x2fb494*_0x1bd614,_0x593c29=_0x40ad50+_0x26a94*_0x1bd614+_0x2fb494*_0x381b99;}_0x2783d9+=left,_0x593c29+=top;let _0x1c629f=_0x2e392a['ang']/0xea60;if(flipX)_0x1c629f=0xb4-_0x1c629f;if(flipY)_0x1c629f=-_0x1c629f;_0x1c629f+=_0x44c441||0x0,_0x1c629f=(_0x1c629f%0x168+0x168)%0x168;const _0x563d15=(0x0,_univerjs_pro_engine_shape['getBasicShapeRotateBound'])({'left':left,'top':top,'width':width,'height':height},_0x44c441||0x0);return{'point':{'x':_0x2783d9,'y':_0x593c29},'angle':_0x1c629f,'bounds':_0x563d15};}['_addLineRerouteUpdates'](_0x284d02,_0x1b409a,_0x262172,_0x4389e6,_0x170e6f,_0x344fec,_0x94b8e6,_0x257874,_0x3a8b6c,_0x528ad9){const _0x4a2e3a=_0x1420e0,_0x1a3968=this[_0x4a2e3a(0x1cd)][_0x4a2e3a(0x16f)](_0x284d02,_0x1b409a);if(!_0x1a3968)return;const _0x4f8077=_0x4389e6[_0x4a2e3a(0x1c1)](),_0x366386=_0x4389e6[_0x4a2e3a(0x208)](),_0x267bbd={},_0x193d1b={};_0x366386[_0x4a2e3a(0x22a)](_0x281126=>{const _0x3c14d1=_0x4389e6['getAdjustValueByName'](_0x281126);_0x193d1b[_0x281126]=_0x3c14d1!==null&&_0x3c14d1!==void 0x0?_0x3c14d1:0x0;});const _0x487775=this['_getConnectPointInfo'](_0x170e6f,_0x284d02,_0x1b409a,_0x3a8b6c,_0x528ad9),_0x198691=this[_0x4a2e3a(0x1ee)](_0x344fec,_0x284d02,_0x1b409a,_0x3a8b6c,_0x528ad9);if(_0x487775&&_0x198691){const _0x15e11b=_0x4389e6['getShapeType'](),_0x47f842=(0x0,_univerjs_pro_engine_shape[_0x4a2e3a(0x1fc)])(_0x487775,_0x198691,_0x15e11b);let _0x4bef90=_0x15e11b;if(_0x47f842){const _0x416cb5=(0x0,_univerjs_pro_engine_shape['computeConnectorRouteLayout'])(_0x47f842,_0x4389e6[_0x4a2e3a(0x1db)]()),_0x30cb59=this[_0x4a2e3a(0x1e7)][_0x4a2e3a(0x170)](_0x284d02,_0x1b409a);if(_0x30cb59&&_0x30cb59[_0x262172]){const _0x140854=_0x30cb59[_0x262172];_0x4bef90=_0x416cb5['lineType'];for(const [_0x352507,_0x3492ad]of Object[_0x4a2e3a(0x1fa)](_0x416cb5['adjustValues']))_0x267bbd[_0x352507]=_0x3492ad;const _0x3ebd2f={..._0x140854[_0x4a2e3a(0x17e)],'width':_0x416cb5[_0x4a2e3a(0x210)][_0x4a2e3a(0x225)],'height':_0x416cb5[_0x4a2e3a(0x210)][_0x4a2e3a(0x1da)],'left':_0x416cb5[_0x4a2e3a(0x210)][_0x4a2e3a(0x21f)],'top':_0x416cb5[_0x4a2e3a(0x210)][_0x4a2e3a(0x1e4)],'flipX':_0x416cb5['worldRect'][_0x4a2e3a(0x216)],'flipY':_0x416cb5[_0x4a2e3a(0x210)][_0x4a2e3a(0x195)],'angle':_0x416cb5[_0x4a2e3a(0x21b)]},_0x13af0b=(0x0,_univerjs_sheets_drawing['transformToDrawingPosition'])(_0x3ebd2f,_0x1a3968),_0x3ce060=(0x0,_univerjs_sheets_drawing[_0x4a2e3a(0x21a)])(_0x3ebd2f,_0x1a3968),_0xe41bf8={'unitId':_0x284d02,'subUnitId':_0x1b409a,'drawingType':_univerjs_core[_0x4a2e3a(0x173)][_0x4a2e3a(0x193)],'drawingId':_0x262172,'transform':_0x3ebd2f,'sheetTransform':_0x13af0b,'axisAlignSheetTransform':_0x3ce060},{unitId:_0x35505b,subUnitId:_0x42b7e0,undo:_0x880f00,redo:_0xa7273f,objects:_0x39f1b3}=this[_0x4a2e3a(0x1e7)][_0x4a2e3a(0x169)]([_0xe41bf8]);_0x94b8e6[_0x4a2e3a(0x20e)]({'id':_univerjs_sheets_drawing[_0x4a2e3a(0x1f4)]['id'],'params':{'unitId':_0x35505b,'subUnitId':_0x42b7e0,'op':_0xa7273f,'objects':_0x39f1b3,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x4a2e3a(0x1b9)]}}),_0x257874[_0x4a2e3a(0x20e)]({'id':_univerjs_sheets_drawing[_0x4a2e3a(0x1f4)]['id'],'params':{'unitId':_0x35505b,'subUnitId':_0x42b7e0,'op':_0x880f00,'objects':_0x39f1b3,'type':_univerjs_sheets_drawing[_0x4a2e3a(0x1ac)]['UPDATE']}});}_0x4389e6[_0x4a2e3a(0x22b)]();}_0x94b8e6[_0x4a2e3a(0x20e)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x284d02,'subUnitId':_0x1b409a,'shapeId':_0x262172,'shapeType':_0x4bef90,'shapeData':{'adjustValues':_0x267bbd,'relation':_0x4f8077}}}),_0x257874['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x284d02,'subUnitId':_0x1b409a,'shapeId':_0x262172,'shapeType':_0x15e11b,'shapeData':{'adjustValues':_0x193d1b,'relation':_0x4f8077}}});}}[_0x1420e0(0x1bf)](_0xf9d972,_0x10fb4c,_0x597c3b,_0x3fcac3,_0x47b474,_0x39f437,_0x494f6c,_0x2fee9b,_0xcdd3fb,_0x37ed32){const _0x276d0a=_0x1420e0;var _0x1b7661;if(!_0x47b474)return;const _0x4f54af=this[_0x276d0a(0x1cd)][_0x276d0a(0x16f)](_0xf9d972,_0x10fb4c);if(!_0x4f54af)return;const _0x1a971f=(_0x1b7661=this[_0x276d0a(0x1e7)]['getDrawingByParam']({'unitId':_0xf9d972,'subUnitId':_0x10fb4c,'drawingId':_0xcdd3fb}))===null||_0x1b7661===void 0x0?void 0x0:_0x1b7661['transform'];if(!_0x1a971f)return;const _0x48c759=_0x1a971f[_0x276d0a(0x21f)]!==_0x37ed32['left']||_0x1a971f['top']!==_0x37ed32[_0x276d0a(0x1e4)],_0x401e8e=_0x1a971f[_0x276d0a(0x225)]!==_0x37ed32[_0x276d0a(0x225)]||_0x1a971f['height']!==_0x37ed32['height'],_0x2a308f=_0x1a971f[_0x276d0a(0x216)]!==_0x37ed32[_0x276d0a(0x216)]||_0x1a971f[_0x276d0a(0x195)]!==_0x37ed32[_0x276d0a(0x195)],_0x1d2c1f=_0x1a971f['angle']!==_0x37ed32[_0x276d0a(0x205)];if(_0x48c759&&!_0x401e8e&&!_0x2a308f&&!_0x1d2c1f){var _0x6b548e,_0x11ed4c,_0x5e1a37,_0x299761;const _0x661232=((_0x6b548e=_0x37ed32[_0x276d0a(0x21f)])!==null&&_0x6b548e!==void 0x0?_0x6b548e:0x0)-((_0x11ed4c=_0x1a971f['left'])!==null&&_0x11ed4c!==void 0x0?_0x11ed4c:0x0),_0x240349=((_0x5e1a37=_0x37ed32[_0x276d0a(0x1e4)])!==null&&_0x5e1a37!==void 0x0?_0x5e1a37:0x0)-((_0x299761=_0x1a971f['top'])!==null&&_0x299761!==void 0x0?_0x299761:0x0),_0x448d72=this['_drawingManagerService'][_0x276d0a(0x170)](_0xf9d972,_0x10fb4c);if(_0x448d72&&_0x448d72[_0x597c3b]){var _0x1ec79b,_0x122468,_0x424294,_0x158a17;const _0x2c8b78=_0x448d72[_0x597c3b],_0xe0f0b4={..._0x2c8b78[_0x276d0a(0x17e)],'left':((_0x1ec79b=(_0x122468=_0x2c8b78['transform'])===null||_0x122468===void 0x0?void 0x0:_0x122468[_0x276d0a(0x21f)])!==null&&_0x1ec79b!==void 0x0?_0x1ec79b:0x0)+_0x661232,'top':((_0x424294=(_0x158a17=_0x2c8b78[_0x276d0a(0x17e)])===null||_0x158a17===void 0x0?void 0x0:_0x158a17[_0x276d0a(0x1e4)])!==null&&_0x424294!==void 0x0?_0x424294:0x0)+_0x240349},_0x4c5c0b=(0x0,_univerjs_sheets_drawing['transformToDrawingPosition'])(_0xe0f0b4,_0x4f54af),_0x3689cf=(0x0,_univerjs_sheets_drawing[_0x276d0a(0x21a)])(_0xe0f0b4,_0x4f54af),_0x4d4d01={'unitId':_0xf9d972,'subUnitId':_0x10fb4c,'drawingType':_univerjs_core['DrawingTypeEnum']['DRAWING_SHAPE'],'drawingId':_0x597c3b,'transform':_0xe0f0b4,'sheetTransform':_0x4c5c0b,'axisAlignSheetTransform':_0x3689cf},{unitId:_0x46cda8,subUnitId:_0x25493b,undo:_0x309932,redo:_0x23b41e,objects:_0x25bdac}=this[_0x276d0a(0x1e7)][_0x276d0a(0x169)]([_0x4d4d01]);_0x494f6c[_0x276d0a(0x20e)]({'id':_univerjs_sheets_drawing[_0x276d0a(0x1f4)]['id'],'params':{'unitId':_0x46cda8,'subUnitId':_0x25493b,'op':_0x23b41e,'objects':_0x25bdac,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x276d0a(0x1b9)]}}),_0x2fee9b[_0x276d0a(0x20e)]({'id':_univerjs_sheets_drawing[_0x276d0a(0x1f4)]['id'],'params':{'unitId':_0x46cda8,'subUnitId':_0x25493b,'op':_0x309932,'objects':_0x25bdac,'type':_univerjs_sheets_drawing[_0x276d0a(0x1ac)]['UPDATE']}});}}else{const _0x4b6bea=_0x3fcac3[_0x276d0a(0x1be)](),_0x2e86b4=_0x3fcac3['getEndConnectInfo']();this[_0x276d0a(0x214)](_0xf9d972,_0x10fb4c,_0x597c3b,_0x3fcac3,_0x4b6bea,_0x2e86b4,_0x494f6c,_0x2fee9b,_0xcdd3fb,_0x37ed32);}}};function _0x1b33(_0x435406,_0xcccff1){_0x435406=_0x435406-0x165;const _0x5df675=_0x5df6();let _0x1b3367=_0x5df675[_0x435406];return _0x1b3367;}SheetsShapeController=__decorate([__decorateParam(0x0,_univerjs_core[_0x1420e0(0x1f0)]),__decorateParam(0x1,(0x0,_univerjs_core[_0x1420e0(0x19b)])(_univerjs_sheets['SheetInterceptorService'])),__decorateParam(0x2,(0x0,_univerjs_core['Inject'])(_univerjs_sheets['SheetSkeletonService'])),__decorateParam(0x3,(0x0,_univerjs_core[_0x1420e0(0x19b)])(SheetsShapeService)),__decorateParam(0x4,(0x0,_univerjs_core[_0x1420e0(0x19b)])(_univerjs_drawing['IDrawingManagerService']))],SheetsShapeController);let UniverSheetsShapePlugin=class UniverSheetsShapePlugin extends _univerjs_core[_0x1420e0(0x1d4)]{constructor(_0x59ac3b=defaultPluginConfig,_0x3e3722,_0x3d01c0,_0x9b7bdf){const _0x26f04d=_0x1420e0;super(),this[_0x26f04d(0x1c7)]=_0x59ac3b,this[_0x26f04d(0x1cf)]=_0x3e3722,this['_commandService']=_0x3d01c0,this['_configService']=_0x9b7bdf;const {..._0x5c4f33}=(0x0,_univerjs_core[_0x26f04d(0x219)])({},defaultPluginConfig,this[_0x26f04d(0x1c7)]);this[_0x26f04d(0x1df)]['setConfig'](SHEETS_SHAPE_PLUGIN_CONFIG_KEY,_0x5c4f33);}[_0x1420e0(0x1cb)](){const _0x2b30aa=_0x1420e0,_0x515c2a=this[_0x2b30aa(0x1cf)];[[SheetShapeModelManager],[SheetsShapeService],[SheetsShapeController]][_0x2b30aa(0x22a)](_0x405fb0=>_0x515c2a[_0x2b30aa(0x1f6)](_0x405fb0)),(0x0,_univerjs_core[_0x2b30aa(0x194)])(_0x515c2a,[[SheetsShapeService],[SheetsShapeController]]);}};_defineProperty(UniverSheetsShapePlugin,_0x1420e0(0x1e0),_univerjs_core[_0x1420e0(0x20d)][_0x1420e0(0x20f)]),_defineProperty(UniverSheetsShapePlugin,_0x1420e0(0x1d6),'SHEET_SHAPE_PLUGIN'),_defineProperty(UniverSheetsShapePlugin,_0x1420e0(0x1fb),name),_defineProperty(UniverSheetsShapePlugin,_0x1420e0(0x19f),version),UniverSheetsShapePlugin=__decorate([(0x0,_univerjs_core[_0x1420e0(0x1a2)])(_univerjs_pro_license[_0x1420e0(0x1f3)]),__decorateParam(0x1,(0x0,_univerjs_core[_0x1420e0(0x19b)])(_univerjs_core['Injector'])),__decorateParam(0x2,_univerjs_core['ICommandService']),__decorateParam(0x3,_univerjs_core[_0x1420e0(0x232)])],UniverSheetsShapePlugin),exports[_0x1420e0(0x1eb)]=DEFAULT_SHAPE_HEIGHT,exports['DEFAULT_SHAPE_WIDTH']=DEFAULT_SHAPE_WIDTH,exports[_0x1420e0(0x221)]=InsertShapeCommand,exports[_0x1420e0(0x1c3)]=InsertSheetsShapeMutation,exports['RemoveSheetsShapeMutation']=RemoveSheetsShapeMutation,exports[_0x1420e0(0x1d9)]=SetShapeDrawingDataCommand,exports['SetSheetsShapeRotateCommand']=SetSheetsShapeRotateCommand,exports[_0x1420e0(0x18d)]=SetSheetsShapeTextVerticalToggleCommand,Object[_0x1420e0(0x1c8)](exports,_0x1420e0(0x201),{'enumerable':!![],'get':function(){return SheetsShapeService;}}),exports[_0x1420e0(0x1bd)]=ToggleSheetsShapeFlipCommand,Object[_0x1420e0(0x1c8)](exports,_0x1420e0(0x182),{'enumerable':!![],'get':function(){return UniverSheetsShapePlugin;}}),exports['UpdateConnectorRelationCommand']=UpdateConnectorRelationCommand,exports[_0x1420e0(0x1f5)]=UpdateLineShapeResizeCommand,exports['UpdateSheetsShapeDataMutation']=UpdateSheetsShapeDataMutation,exports[_0x1420e0(0x1e2)]=UpdateSheetsShapeTypeCommand,exports[_0x1420e0(0x184)]=UpdateSheetsShapeTypeMutation;
1
+ const _0x411c48=_0x416a;(function(_0x9f1c4b,_0x5ab1b7){const _0x50a2ac=_0x416a,_0x24ef2d=_0x9f1c4b();while(!![]){try{const _0x10af75=parseInt(_0x50a2ac(0x236))/0x1+-parseInt(_0x50a2ac(0x1bf))/0x2+parseInt(_0x50a2ac(0x1e8))/0x3*(-parseInt(_0x50a2ac(0x18b))/0x4)+-parseInt(_0x50a2ac(0x1bd))/0x5*(parseInt(_0x50a2ac(0x1f8))/0x6)+parseInt(_0x50a2ac(0x240))/0x7*(-parseInt(_0x50a2ac(0x1e9))/0x8)+parseInt(_0x50a2ac(0x209))/0x9+parseInt(_0x50a2ac(0x21a))/0xa;if(_0x10af75===_0x5ab1b7)break;else _0x24ef2d['push'](_0x24ef2d['shift']());}catch(_0x57af1a){_0x24ef2d['push'](_0x24ef2d['shift']());}}}(_0x52f3,0xea18a),Object[_0x411c48(0x257)](exports,Symbol[_0x411c48(0x1c1)],{'value':_0x411c48(0x22c)}));let _univerjs_pro_engine_shape=require('@univerjs-pro/engine-shape'),_univerjs_core=require('@univerjs/core'),_univerjs_sheets=require('@univerjs/sheets'),_univerjs_sheets_drawing=require('@univerjs/sheets-drawing'),_univerjs_pro_license=require('@univerjs-pro/license'),_univerjs_drawing=require('@univerjs/drawing');const DEFAULT_SHAPE_WIDTH=0xc8,DEFAULT_SHAPE_HEIGHT=0xc8;function _typeof(_0x580f32){'@babel/helpers - typeof';const _0x31b1b0=_0x411c48;return _typeof='function'==typeof Symbol&&_0x31b1b0(0x1e4)==typeof Symbol[_0x31b1b0(0x234)]?function(_0x409c9a){return typeof _0x409c9a;}:function(_0x4df512){const _0x276c1f=_0x31b1b0;return _0x4df512&&_0x276c1f(0x222)==typeof Symbol&&_0x4df512[_0x276c1f(0x251)]===Symbol&&_0x4df512!==Symbol[_0x276c1f(0x1ae)]?_0x276c1f(0x1e4):typeof _0x4df512;},_typeof(_0x580f32);}function toPrimitive(_0x1657d2,_0x123112){const _0x54beb3=_0x411c48;if('object'!=_typeof(_0x1657d2)||!_0x1657d2)return _0x1657d2;var _0x558e13=_0x1657d2[Symbol['toPrimitive']];if(void 0x0!==_0x558e13){var _0x24d265=_0x558e13[_0x54beb3(0x24c)](_0x1657d2,_0x123112||_0x54beb3(0x206));if(_0x54beb3(0x245)!=_typeof(_0x24d265))return _0x24d265;throw new TypeError(_0x54beb3(0x22e));}return(_0x54beb3(0x1ef)===_0x123112?String:Number)(_0x1657d2);}function toPropertyKey(_0x1abfbd){var _0x2d638b=toPrimitive(_0x1abfbd,'string');return'symbol'==_typeof(_0x2d638b)?_0x2d638b:_0x2d638b+'';}function _defineProperty(_0x274945,_0x4a9c99,_0x3f6ab1){const _0x25994f=_0x411c48;return(_0x4a9c99=toPropertyKey(_0x4a9c99))in _0x274945?Object[_0x25994f(0x257)](_0x274945,_0x4a9c99,{'value':_0x3f6ab1,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x274945[_0x4a9c99]=_0x3f6ab1,_0x274945;}var SheetShapeModelManager=class extends _univerjs_core[_0x411c48(0x207)]{constructor(){const _0x1d0d86=_0x411c48;super(),_defineProperty(this,_0x1d0d86(0x1e1),new Map()),_defineProperty(this,_0x1d0d86(0x1a5),new Set()),_defineProperty(this,'_groupIds',new Set());}[_0x411c48(0x18d)](_0x25e10c,_0x24bec7,_0x1374b0){const _0x2d845b=_0x411c48,_0x4631f=new _univerjs_pro_engine_shape[(_0x2d845b(0x247))](_0x25e10c,_0x24bec7,_0x1374b0);this[_0x2d845b(0x1e1)][_0x2d845b(0x20a)](_0x24bec7,_0x4631f);if((0x0,_univerjs_pro_engine_shape[_0x2d845b(0x225)])(_0x25e10c))this['_linesIds'][_0x2d845b(0x1d1)](_0x24bec7);return _0x4631f;}[_0x411c48(0x1c2)](_0x102182){const _0x1b3189=_0x411c48,_0x1fc686=[];for(const _0x5a821f of this[_0x1b3189(0x1a5)]){const _0x105ed9=this[_0x1b3189(0x1e1)]['get'](_0x5a821f);if(_0x105ed9){const _0x45e966=_0x105ed9[_0x1b3189(0x20d)]();if(_0x45e966){var _0x2b5df6,_0x263c41;if(((_0x2b5df6=_0x45e966['from'])===null||_0x2b5df6===void 0x0?void 0x0:_0x2b5df6['shapeId'])===_0x102182)_0x1fc686['push']({..._0x45e966['from'],'lineShapeId':_0x5a821f,'isFrom':!![]});if(((_0x263c41=_0x45e966['to'])===null||_0x263c41===void 0x0?void 0x0:_0x263c41['shapeId'])===_0x102182)_0x1fc686[_0x1b3189(0x1e0)]({..._0x45e966['to'],'lineShapeId':_0x5a821f,'isFrom':![]});}}}return _0x1fc686;}[_0x411c48(0x1b8)](_0x4484ac){const _0x2bf75c=_0x411c48,_0x4daea3=this[_0x2bf75c(0x1e1)][_0x2bf75c(0x1e5)](_0x4484ac);if(_0x4daea3)return _0x4daea3[_0x2bf75c(0x20d)]();}['getShapeType'](_0x427399){const _0x2eacd4=_0x411c48,_0x516d04=this[_0x2eacd4(0x1e1)][_0x2eacd4(0x1e5)](_0x427399);if(_0x516d04)return _0x516d04['getShapeType']();}[_0x411c48(0x188)](_0x5b3150){const _0x2616eb=_0x411c48;return this[_0x2616eb(0x1e1)][_0x2616eb(0x1b2)](_0x5b3150);}[_0x411c48(0x19b)](_0x34d5c1){const _0x27383b=_0x411c48,_0x53504b=this['_shapes'][_0x27383b(0x1e5)](_0x34d5c1);if(!_0x53504b)return;if((0x0,_univerjs_pro_engine_shape['isConnectorShape'])(_0x53504b[_0x27383b(0x221)]()))this[_0x27383b(0x1a5)][_0x27383b(0x1f6)](_0x34d5c1);this[_0x27383b(0x1e1)][_0x27383b(0x1f6)](_0x34d5c1);}[_0x411c48(0x21c)](){const _0x5df192=_0x411c48,_0x5280f5=[];return this['_shapes'][_0x5df192(0x1b9)](_0x31449a=>{const _0x2fc3cf=_0x5df192;_0x5280f5[_0x2fc3cf(0x1e0)](_0x31449a['toJSON']());}),_0x5280f5;}[_0x411c48(0x233)](_0x618a6c){const _0x5db2b3=_0x411c48;for(const _0x134470 of _0x618a6c){const {id:_0x26dfc3,shapeType:_0x50c400}=_0x134470,_0x34b0f7=this[_0x5db2b3(0x18d)](_0x50c400,_0x26dfc3,_0x134470[_0x5db2b3(0x1aa)]);if(_0x34b0f7&&_0x34b0f7[_0x5db2b3(0x1a3)]())this['_linesIds']['add'](_0x26dfc3);}}[_0x411c48(0x1be)](){const _0x42e53e=_0x411c48;if(this['_disposed'])return;this[_0x42e53e(0x1e1)][_0x42e53e(0x1b9)](_0xd57319=>{const _0x57eb20=_0x42e53e;_0xd57319[_0x57eb20(0x1be)]();}),this[_0x42e53e(0x1e1)][_0x42e53e(0x1dd)](),this['_linesIds']['clear'](),this[_0x42e53e(0x21e)][_0x42e53e(0x1dd)](),super[_0x42e53e(0x1be)]();}};function _0x52f3(){const _0x28966c=['UpdateSheetsShapeTypeCommand','INSERT','sequenceExecute','Module','syncExecuteCommand','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','onCommandExecute','index','filter','shapeId','fromJSON','iterator','CommandType','277313fGQwpQ','getBatchAddOp','Fail\x20to\x20get\x20shape\x20model,\x20get:\x20','SetShapeDrawingDataCommand','_deserializeShapeForUnit','transformToDrawingPosition','Plugin','cxnIndex','_commandService','onStarting','947261okCUfe','touchDependencies','UPDATE','0.21.1-insiders.20260429-a0b1161','worldRect','object','_addLineRerouteUpdates','ShapeModel','insertShape','interceptCommand','transform','COMMAND','call','undos','sheet.mutation.insert-shape','sheet.command.set-shape-text-vertical-toggle','_sheetInterceptorService','constructor','getBasicShapeRotateBound','ensureSkeleton','startX','getCellIndexAndOffsetByPosition','rotation','defineProperty','every','hasShape','startY','assign','4132rbeGcy','setShapeData','addShape','ClearSheetDrawingTransformerOperation','range','SheetInterceptorService','ISheetDrawingService','getDrawingByParam','_shapeModelManagerMap','top','_drawingManagerService','removeLinePoints','sheet.mutation.update-shape-data','setConfig','params','UNIVER_SHEET','removeShape','Inject','height','getSkeleton','pushUndoRedo','SheetSkeletonService','redos','setShapeType','isLineShape','_sheetSkeletonService','_linesIds','getCellWithCoordByIndex','length','updateContext','MUTATION','shapeData','stringify','version','find','prototype','parse','DrawingTypeEnum','getSheetCommandTarget','has','_resourcesManagerService','InsertShapeCommand','getAdjustValueByName','getOwnPropertyDescriptor','data','getLineShapeRelation','forEach','REMOVE','sheet.command.set-shape-drawing-data','fill','5VILMsz','dispose','3433592jPavbi','SHEET_SHAPE_PLUGIN','toStringTag','getBasicShapeRelation','sin','SetDrawingApplyMutation','DrawingApplyType','UniverSheetsShapePlugin','isHorizontal','UpdateLineShapeResizeCommand','flipY','preUndos','getShapeTextData','UpdateSheetsShapeDataMutation','ICommandService','sheet.command.update-line-shape-resize','UpdateConnectorRelationCommand','sheet.command.update-shape-type','add','pluginName','routeConnectorLineShape','_initCommandInterceptor','ToggleSheetsShapeFlipCommand','DependentOn','getShapeDataById','DRAWING_SHAPE','getStartConnectInfo','_getConnectPointInfo','relation','drawingType','clear','rotateEnabled','getBatchUpdateOp','push','_shapes','disposeWithMe','_config','symbol','get','type','IUndoRedoService','4056sSvXtF','104YMYybp','_addLineFollowShapeUpdates','sheet.command.set-shape-rotate','computeConnectorRouteLayout','Injector','UniverLicensePlugin','string','preRedos','getShapeData','SetSheetsShapeTextVerticalToggleCommand','InsertSheetDrawingCommand','sheet.mutation.update-shape-type','_ensureShapeModelManager','delete','flipX','9337038bfaUBI','from','_initCommands','getShapeModel','_initSnapshot','SheetsShapeService','resizeEnabled','left','sheets-shape.config','RemoveSheetsShapeMutation','lineShapeId','angle','_injector','_configService','default','Disposable','cos','4015278QRPHzA','set','keys','sheet.command.insert-shape','getShapeRelation','transformToAxisAlignPosition','UpdateSheetsShapeTypeMutation','getDrawingData','SetSheetDrawingCommand','sheet.command.update-connector-relation','generateRandomId','_serializeShapeForUnit','width','decorate','adjustValues','IUniverInstanceService','position','66641870pdWGcg','_sheetsShapeService','toJSON','sheet.command.toggle-shape-flip','_groupIds','isFrom','IConfigService','getShapeType','function','ang','getAdjustNames','isConnectorShape','DEFAULT_SHAPE_HEIGHT','borderEnabled','lineType'];_0x52f3=function(){return _0x28966c;};return _0x52f3();}function __decorateParam(_0x1d47b3,_0x358752){return function(_0x3dfefe,_0x26d8b6){_0x358752(_0x3dfefe,_0x26d8b6,_0x1d47b3);};}function _0x416a(_0x5d36cb,_0x16130a){_0x5d36cb=_0x5d36cb-0x188;const _0x52f30d=_0x52f3();let _0x416ae4=_0x52f30d[_0x5d36cb];return _0x416ae4;}function __decorate(_0x1d892c,_0x1334c2,_0x1de064,_0x631f3f){const _0x33a350=_0x411c48;var _0xabaf36=arguments['length'],_0x463f09=_0xabaf36<0x3?_0x1334c2:_0x631f3f===null?_0x631f3f=Object[_0x33a350(0x1b6)](_0x1334c2,_0x1de064):_0x631f3f,_0x3ce345;if(typeof Reflect===_0x33a350(0x245)&&typeof Reflect[_0x33a350(0x216)]===_0x33a350(0x222))_0x463f09=Reflect[_0x33a350(0x216)](_0x1d892c,_0x1334c2,_0x1de064,_0x631f3f);else{for(var _0x35246a=_0x1d892c[_0x33a350(0x1a7)]-0x1;_0x35246a>=0x0;_0x35246a--)if(_0x3ce345=_0x1d892c[_0x35246a])_0x463f09=(_0xabaf36<0x3?_0x3ce345(_0x463f09):_0xabaf36>0x3?_0x3ce345(_0x1334c2,_0x1de064,_0x463f09):_0x3ce345(_0x1334c2,_0x1de064))||_0x463f09;}return _0xabaf36>0x3&&_0x463f09&&Object[_0x33a350(0x257)](_0x1334c2,_0x1de064,_0x463f09),_0x463f09;}const SHEET_SHAPE_PLUGIN=_0x411c48(0x1c0);let SheetsShapeService=class SheetsShapeService extends _univerjs_core['Disposable']{constructor(_0x2bb6b5){const _0x2827e9=_0x411c48;super(),this[_0x2827e9(0x1b3)]=_0x2bb6b5,_defineProperty(this,_0x2827e9(0x193),new Map()),this[_0x2827e9(0x1fc)]();}[_0x411c48(0x1f5)](_0x224861,_0x2461ca){const _0xdedf2c=_0x411c48;let _0x3dd9c9=this[_0xdedf2c(0x193)]['get'](_0x224861);!_0x3dd9c9&&(_0x3dd9c9=new Map(),this[_0xdedf2c(0x193)][_0xdedf2c(0x20a)](_0x224861,_0x3dd9c9));let _0x419148=_0x3dd9c9[_0xdedf2c(0x1e5)](_0x2461ca);return!_0x419148&&(_0x419148=new SheetShapeModelManager(),_0x3dd9c9['set'](_0x2461ca,_0x419148)),_0x419148;}[_0x411c48(0x248)](_0xb09b3,_0x31930f,_0x789002,_0x137199,_0x565e0c){const _0x20187f=_0x411c48;this[_0x20187f(0x1f5)](_0xb09b3,_0x31930f)[_0x20187f(0x18d)](_0x789002,_0x137199,_0x565e0c);}[_0x411c48(0x19b)](_0x34262c,_0x352e6d,_0x5b3faa){const _0x381244=_0x411c48;this[_0x381244(0x1f5)](_0x34262c,_0x352e6d)['removeShape'](_0x5b3faa);}['getBasicShapeType'](_0xe8dc8d,_0x46f9d8,_0x54d494){const _0x5e5a3a=_0x411c48;return this[_0x5e5a3a(0x1f5)](_0xe8dc8d,_0x46f9d8)[_0x5e5a3a(0x221)](_0x54d494);}[_0x411c48(0x221)](_0x1406ff,_0x4603f2,_0x177e02){const _0x504122=_0x411c48;return this[_0x504122(0x1f5)](_0x1406ff,_0x4603f2)[_0x504122(0x221)](_0x177e02);}['hasShape'](_0x3072a6,_0x301be3,_0xa33936){const _0x545bea=_0x411c48;return this[_0x545bea(0x1f5)](_0x3072a6,_0x301be3)[_0x545bea(0x188)](_0xa33936);}['getShapeTypeById'](_0x1f47cf,_0x3320de,_0x5279dd){const _0x133f66=_0x411c48;return this['_ensureShapeModelManager'](_0x1f47cf,_0x3320de)[_0x133f66(0x221)](_0x5279dd);}[_0x411c48(0x1d7)](_0x20ee71,_0x2a117a,_0x2a710e){const _0x1158c9=_0x411c48,_0xb8dd98=this['_ensureShapeModelManager'](_0x20ee71,_0x2a117a);if(!_0xb8dd98[_0x1158c9(0x221)](_0x2a710e))return;const _0x329217=_0xb8dd98['_shapes'][_0x1158c9(0x1e5)](_0x2a710e);if(!_0x329217)return;return _0x329217['getShapeData']();}[_0x411c48(0x1fb)](_0x4184fd,_0x283c7f,_0x43e210){const _0x1e06df=_0x411c48;return this['_ensureShapeModelManager'](_0x4184fd,_0x283c7f)['_shapes'][_0x1e06df(0x1e5)](_0x43e210);}[_0x411c48(0x1c2)](_0x2f3463,_0x22ed73,_0x3918e3){const _0x63ab50=_0x411c48;return this[_0x63ab50(0x1f5)](_0x2f3463,_0x22ed73)['getBasicShapeRelation'](_0x3918e3);}[_0x411c48(0x1b8)](_0x453f79,_0x1fcf56,_0x17451e){const _0x3ca8f1=_0x411c48,_0x24aaf7=this[_0x3ca8f1(0x1f5)](_0x453f79,_0x1fcf56)[_0x3ca8f1(0x1e1)][_0x3ca8f1(0x1e5)](_0x17451e);if(!_0x24aaf7)return;return _0x24aaf7[_0x3ca8f1(0x20d)]();}[_0x411c48(0x1a2)](){}[_0x411c48(0x214)](_0x282e60){const _0x3ed7ee=_0x411c48,_0x34247b={},_0x470fb5=this['_shapeModelManagerMap'][_0x3ed7ee(0x1e5)](_0x282e60);if(_0x470fb5)_0x470fb5['forEach']((_0x415a70,_0xd32dfc)=>{const _0x1240e5=_0x3ed7ee,_0x4423c8=_0x415a70[_0x1240e5(0x21c)]();if(_0x4423c8[_0x1240e5(0x1a7)]>0x0)_0x34247b[_0xd32dfc]=_0x4423c8;});return JSON[_0x3ed7ee(0x1ab)](_0x34247b);}[_0x411c48(0x23a)](_0x1bfa2b,_0x609134){const _0x554abc=_0x411c48;Object[_0x554abc(0x20b)](_0x609134)['forEach'](_0x588ca1=>{const _0x2e933b=_0x554abc;this[_0x2e933b(0x1f5)](_0x1bfa2b,_0x588ca1)[_0x2e933b(0x233)](_0x609134[_0x588ca1]);});}[_0x411c48(0x21c)](){const _0x33d69a=_0x411c48,_0x123845={};return this[_0x33d69a(0x193)][_0x33d69a(0x1b9)]((_0x1dcc3b,_0x2929e0)=>{const _0x41966e=_0x33d69a;_0x123845[_0x2929e0]={},_0x1dcc3b[_0x41966e(0x1b9)]((_0x382e6d,_0x27e489)=>{const _0x379dd3=_0x41966e;_0x123845[_0x2929e0][_0x27e489]=_0x382e6d[_0x379dd3(0x21c)]();});}),_0x123845;}[_0x411c48(0x233)](_0x326ec3){const _0x42953a=_0x411c48;Object[_0x42953a(0x20b)](_0x326ec3)[_0x42953a(0x1b9)](_0x1f2473=>{const _0x245337=_0x42953a,_0x34d6b2=_0x326ec3[_0x1f2473];Object[_0x245337(0x20b)](_0x34d6b2)[_0x245337(0x1b9)](_0x4ffc31=>{const _0x11678e=_0x245337;this[_0x11678e(0x1f5)](_0x1f2473,_0x4ffc31)['fromJSON'](_0x34d6b2[_0x4ffc31]);});});}[_0x411c48(0x1fc)](){const _0x470a06=_0x411c48;this['_resourcesManagerService']['registerPluginResource']({'pluginName':SHEET_SHAPE_PLUGIN,'businesses':[_univerjs_core['UniverInstanceType']['UNIVER_SHEET']],'toJson':_0x585bef=>this['_serializeShapeForUnit'](_0x585bef),'parseJson':_0x187716=>JSON[_0x470a06(0x1af)](_0x187716),'onLoad':(_0x5eb540,_0x21d185)=>{const _0x6e13f3=_0x470a06;this[_0x6e13f3(0x23a)](_0x5eb540,_0x21d185);},'onUnLoad':_0x58fe19=>{const _0x47ad07=_0x470a06,_0x148de7=this[_0x47ad07(0x193)][_0x47ad07(0x1e5)](_0x58fe19);_0x148de7&&(_0x148de7['forEach'](_0x21ec52=>{const _0x27a074=_0x47ad07;_0x21ec52[_0x27a074(0x1be)]();}),this[_0x47ad07(0x193)][_0x47ad07(0x1f6)](_0x58fe19));}});}[_0x411c48(0x1be)](){const _0x55e7e6=_0x411c48;this['_shapeModelManagerMap'][_0x55e7e6(0x1b9)](_0x122a9e=>{const _0x17109f=_0x55e7e6;_0x122a9e[_0x17109f(0x1b9)](_0xdc74bb=>{_0xdc74bb['dispose']();});});}};SheetsShapeService=__decorate([__decorateParam(0x0,_univerjs_core['IResourceManagerService'])],SheetsShapeService);const InsertSheetsShapeMutation={'id':_0x411c48(0x24e),'type':_univerjs_core['CommandType'][_0x411c48(0x1a9)],'handler':(_0x54a3f5,_0x5ae034)=>{const _0x509df0=_0x411c48,{unitId:_0x4d5db0,subUnitId:_0xa15381,shapeType:_0x318458,shapeId:_0x5f744,shapeData:_0x28cb2c}=_0x5ae034;return _0x54a3f5[_0x509df0(0x1e5)](SheetsShapeService)[_0x509df0(0x248)](_0x4d5db0,_0xa15381,_0x318458,_0x5f744,_0x28cb2c),!![];}},RemoveSheetsShapeMutation={'id':'sheet.mutation.remove-shape','type':_univerjs_core['CommandType'][_0x411c48(0x1a9)],'handler':(_0x2f2aae,_0x444b5c)=>{const _0x515e87=_0x411c48,{unitId:_0x2b2cfd,subUnitId:_0x151e65,shapeId:_0x46f3b3}=_0x444b5c;return _0x2f2aae[_0x515e87(0x1e5)](SheetsShapeService)[_0x515e87(0x19b)](_0x2b2cfd,_0x151e65,_0x46f3b3),!![];}},InsertShapeCommand={'type':_univerjs_core[_0x411c48(0x235)]['COMMAND'],'id':_0x411c48(0x20c),'handler':(_0x385d16,_0x1460c8)=>{const _0x164f5c=_0x411c48;var _0x2bc890,_0x243f6c;const _0x14c34e=(0x0,_univerjs_sheets[_0x164f5c(0x1b1)])(_0x385d16[_0x164f5c(0x1e5)](_univerjs_core[_0x164f5c(0x218)]),_0x1460c8);if(!_0x14c34e)return![];const _0x40aa1f=_0x385d16[_0x164f5c(0x1e5)](_univerjs_sheets[_0x164f5c(0x1a0)]),{unitId:_0x464250,subUnitId:_0x73dfb3}=_0x14c34e,_0x1763d7=_0x40aa1f[_0x164f5c(0x253)](_0x464250,_0x73dfb3);if(!_0x1763d7)return![];const _0x571207=_0x385d16[_0x164f5c(0x1e5)](_univerjs_core[_0x164f5c(0x1cd)]),_0x477a17=_0x385d16[_0x164f5c(0x1e5)](_univerjs_core[_0x164f5c(0x1e7)]),_0x120aff=_0x385d16[_0x164f5c(0x1e5)](_univerjs_sheets[_0x164f5c(0x190)]),_0x2e12cb=_0x385d16[_0x164f5c(0x1e5)](_univerjs_sheets_drawing[_0x164f5c(0x191)]),{shapeType:_0x37b693,shapeData:_0x14dc88}=_0x1460c8,_0x268762=_0x1460c8[_0x164f5c(0x232)]||(0x0,_univerjs_core[_0x164f5c(0x213)])(),_0x2168f2={'unitId':_0x464250,'subUnitId':_0x73dfb3,'shapeId':_0x268762,'shapeType':_0x37b693,'shapeData':_0x14dc88},_0x5da042=_0x1460c8[_0x164f5c(0x215)]||0xc8,_0x4f1c39=_0x1460c8['height']||0xc8;let _0x5731ee=0x0,_0xa86a0e=0x0,_0x3bdc8c={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0},_0x224a21={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0};if(_0x1460c8[_0x164f5c(0x219)]){const {x:_0x4a72a6,y:_0x292cd4}=_0x1460c8['position'];_0x5731ee=_0x4a72a6,_0xa86a0e=_0x292cd4,_0x3bdc8c=_0x1763d7['getCellIndexAndOffsetByPosition'](_0x4a72a6,_0x292cd4),_0x224a21=_0x1763d7[_0x164f5c(0x255)](_0x4a72a6+_0x5da042,_0x292cd4+_0x4f1c39);}else{if(_0x1460c8[_0x164f5c(0x18f)]){const {startRow:_0x45d111,startColumn:_0x57d753}=_0x1460c8['range'],_0x3e9010=0xa,_0x8386a=0xa;_0x3bdc8c={'row':_0x45d111,'rowOffset':_0x3e9010,'column':_0x57d753,'columnOffset':_0x8386a};const _0x2ee297=_0x1763d7[_0x164f5c(0x1a6)](_0x45d111,_0x57d753);_0x5731ee=_0x2ee297[_0x164f5c(0x254)]+_0x8386a,_0xa86a0e=_0x2ee297[_0x164f5c(0x189)]+_0x3e9010,_0x224a21=_0x1763d7[_0x164f5c(0x255)](_0x5731ee+_0x5da042,_0xa86a0e+_0x4f1c39);}}const _0x49c264={'from':_0x3bdc8c,'to':_0x224a21},_0x4763ac={'unitId':_0x464250,'subUnitId':_0x73dfb3,'drawingId':_0x268762,'drawingType':_univerjs_core['DrawingTypeEnum'][_0x164f5c(0x1d8)],'sheetTransform':_0x49c264,'transform':{'left':_0x5731ee,'top':_0xa86a0e,'width':_0x5da042,'height':_0x4f1c39},'data':{'shapeType':_0x37b693,'shapeData':_0x14dc88},'axisAlignSheetTransform':_0x49c264,'allowTransform':!![]};(0x0,_univerjs_pro_engine_shape['isConnectorShape'])(_0x37b693)&&(_0x4763ac['data'][_0x164f5c(0x1bc)]=![],_0x4763ac[_0x164f5c(0x1b7)]['rotateEnabled']=![],_0x4763ac['data']['resizeEnabled']=![],_0x4763ac[_0x164f5c(0x1b7)][_0x164f5c(0x227)]=![],_0x4763ac['transform']['rotateEnabled']=![],_0x4763ac['transform']['resizeEnabled']=![],_0x4763ac['transform']['borderEnabled']=![]);const {undo:_0x3e029a,redo:_0x475bc7,objects:_0x3b276f}=_0x2e12cb[_0x164f5c(0x237)]([_0x4763ac]),_0x4ccb15=_0x120aff[_0x164f5c(0x22f)]({'id':_univerjs_sheets_drawing[_0x164f5c(0x1f3)]['id'],'params':{'unitId':_0x464250,'drawings':[_0x4763ac]}}),_0x123994=[...(_0x2bc890=_0x4ccb15[_0x164f5c(0x1f0)])!==null&&_0x2bc890!==void 0x0?_0x2bc890:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x464250,'subUnitId':_0x73dfb3,'op':_0x475bc7,'objects':_0x3b276f,'type':_univerjs_sheets_drawing[_0x164f5c(0x1c5)][_0x164f5c(0x22a)]}},{'id':_univerjs_sheets_drawing[_0x164f5c(0x18e)]['id'],'params':[_0x464250]},..._0x4ccb15[_0x164f5c(0x1a1)],{'id':InsertSheetsShapeMutation['id'],'params':_0x2168f2}],_0x3eead8=[{'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x464250,'subUnitId':_0x73dfb3,'shapeId':_0x268762}},...(_0x243f6c=_0x4ccb15[_0x164f5c(0x1ca)])!==null&&_0x243f6c!==void 0x0?_0x243f6c:[],{'id':_univerjs_sheets_drawing[_0x164f5c(0x1c4)]['id'],'params':{'unitId':_0x464250,'subUnitId':_0x73dfb3,'op':_0x3e029a,'objects':_0x3b276f,'type':_univerjs_sheets_drawing[_0x164f5c(0x1c5)][_0x164f5c(0x1ba)]}},{'id':_univerjs_sheets_drawing[_0x164f5c(0x18e)]['id'],'params':[_0x464250]},..._0x4ccb15[_0x164f5c(0x24d)]];if((0x0,_univerjs_core[_0x164f5c(0x22b)])(_0x123994,_0x571207))return _0x477a17[_0x164f5c(0x19f)]({'unitID':_0x464250,'undoMutations':_0x3eead8,'redoMutations':_0x123994}),!![];return![];}},UpdateSheetsShapeDataMutation={'id':_0x411c48(0x197),'type':_univerjs_core[_0x411c48(0x235)][_0x411c48(0x1a9)],'handler':(_0x41c2bb,_0x3ab5e3)=>{const _0x35e20a=_0x411c48,{unitId:_0xcef817,subUnitId:_0x5748ab,shapeType:_0x120485,shapeId:_0x368b72,shapeData:_0x1efc00}=_0x3ab5e3,_0x441963=_0x41c2bb[_0x35e20a(0x1e5)](SheetsShapeService)['getShapeModel'](_0xcef817,_0x5748ab,_0x368b72);if(_0x441963){if(_0x120485!==void 0x0)_0x441963[_0x35e20a(0x1a2)](_0x120485);if(_0x1efc00)_0x441963===null||_0x441963===void 0x0||_0x441963[_0x35e20a(0x18c)](_0x1efc00,!![]);}return!![];}},SetShapeDrawingDataCommand={'type':_univerjs_core[_0x411c48(0x235)][_0x411c48(0x24b)],'id':_0x411c48(0x1bb),'handler':(_0x201af8,_0x56cfe8)=>{const _0x90c42f=_0x411c48;var _0x2d92b9,_0x6b71a1;const _0x169ff4=(0x0,_univerjs_sheets[_0x90c42f(0x1b1)])(_0x201af8[_0x90c42f(0x1e5)](_univerjs_core[_0x90c42f(0x218)]),_0x56cfe8);if(!_0x169ff4)return![];const _0x39dbce=_0x201af8['get'](_univerjs_sheets[_0x90c42f(0x1a0)]),{unitId:_0x54ac63,subUnitId:_0x3d6ac6}=_0x169ff4,_0x6deb7f=_0x39dbce['ensureSkeleton'](_0x54ac63,_0x3d6ac6);if(!_0x6deb7f)return![];const _0x527926=_0x201af8[_0x90c42f(0x1e5)](SheetsShapeService),{shapeId:_0x900989,shapeType:_0x1a1017,shapeData:_0x586f96,position:_0x3bf27d,width:_0x12c189,height:_0x1c656d}=_0x56cfe8,_0x5413f3=_0x527926['getShapeModel'](_0x54ac63,_0x3d6ac6,_0x900989);if(!_0x5413f3)return![];const _0x10f79d=_0x201af8[_0x90c42f(0x1e5)](_univerjs_core[_0x90c42f(0x1cd)]),_0x22e552=_0x201af8['get'](_univerjs_core[_0x90c42f(0x1e7)]),_0x23f013=_0x201af8[_0x90c42f(0x1e5)](_univerjs_sheets[_0x90c42f(0x190)]),_0x481fbb=_0x201af8['get'](_univerjs_sheets_drawing[_0x90c42f(0x191)]),_0x17216c={'unitId':_0x54ac63,'subUnitId':_0x3d6ac6,'shapeId':_0x900989,'shapeType':_0x1a1017,'shapeData':_0x586f96},_0x367021=_0x5413f3[_0x90c42f(0x221)](),_0x4abe8f=_0x5413f3[_0x90c42f(0x1f1)](),{x:_0x58587e,y:_0x2587d5}=_0x3bf27d,_0x1dbd5f={'from':_0x6deb7f[_0x90c42f(0x255)](_0x58587e,_0x2587d5),'to':_0x6deb7f[_0x90c42f(0x255)](_0x58587e+_0x12c189,_0x2587d5+_0x1c656d)},_0x3f89a0={'unitId':_0x54ac63,'subUnitId':_0x3d6ac6,'drawingId':_0x900989,'drawingType':_univerjs_core[_0x90c42f(0x1b0)][_0x90c42f(0x1d8)],'sheetTransform':_0x1dbd5f,'transform':{'left':_0x58587e,'top':_0x2587d5,'width':_0x12c189,'height':_0x1c656d},'data':{'shapeType':_0x1a1017,'shapeData':_0x586f96},'axisAlignSheetTransform':_0x1dbd5f,'allowTransform':!![]};(0x0,_univerjs_pro_engine_shape['isConnectorShape'])(_0x1a1017)&&(_0x3f89a0[_0x90c42f(0x1b7)][_0x90c42f(0x1bc)]=![],_0x3f89a0[_0x90c42f(0x1b7)]['rotateEnabled']=![],_0x3f89a0[_0x90c42f(0x1b7)][_0x90c42f(0x1fe)]=![],_0x3f89a0[_0x90c42f(0x1b7)][_0x90c42f(0x227)]=![],_0x3f89a0['transform'][_0x90c42f(0x1de)]=![],_0x3f89a0[_0x90c42f(0x24a)][_0x90c42f(0x1fe)]=![],_0x3f89a0[_0x90c42f(0x24a)][_0x90c42f(0x227)]=![]);const {undo:_0x489e6b,redo:_0x5e55a9,objects:_0x152615}=_0x481fbb[_0x90c42f(0x1df)]([_0x3f89a0]),_0x8b1171=_0x23f013['onCommandExecute']({'id':_univerjs_sheets_drawing[_0x90c42f(0x211)]['id'],'params':{'unitId':_0x54ac63,'drawings':[_0x3f89a0]}}),_0x29ed3e=[...(_0x2d92b9=_0x8b1171[_0x90c42f(0x1f0)])!==null&&_0x2d92b9!==void 0x0?_0x2d92b9:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x54ac63,'subUnitId':_0x3d6ac6,'op':_0x5e55a9,'objects':_0x152615,'type':_univerjs_sheets_drawing[_0x90c42f(0x1c5)]['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x90c42f(0x18e)]['id'],'params':[_0x54ac63]},..._0x8b1171[_0x90c42f(0x1a1)],{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x17216c}],_0x1e06d4=[...(_0x6b71a1=_0x8b1171[_0x90c42f(0x1ca)])!==null&&_0x6b71a1!==void 0x0?_0x6b71a1:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x54ac63,'subUnitId':_0x3d6ac6,'op':_0x489e6b,'objects':_0x152615,'type':_univerjs_sheets_drawing['DrawingApplyType']['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x90c42f(0x18e)]['id'],'params':[_0x54ac63]},..._0x8b1171[_0x90c42f(0x24d)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x54ac63,'subUnitId':_0x3d6ac6,'shapeType':_0x367021,'shapeId':_0x900989,'shapeData':_0x4abe8f}}];if((0x0,_univerjs_core[_0x90c42f(0x22b)])(_0x29ed3e,_0x10f79d))return _0x22e552[_0x90c42f(0x19f)]({'unitID':_0x54ac63,'undoMutations':_0x1e06d4,'redoMutations':_0x29ed3e}),!![];return![];}},ToggleSheetsShapeFlipCommand={'type':_univerjs_core['CommandType'][_0x411c48(0x24b)],'id':_0x411c48(0x21d),'handler':(_0x5f1678,_0x1bcc63)=>{const _0x90825b=_0x411c48;var _0x4cf4f4,_0x507ce6;const _0x752e1c=(0x0,_univerjs_sheets[_0x90825b(0x1b1)])(_0x5f1678['get'](_univerjs_core['IUniverInstanceService']),_0x1bcc63);if(!_0x752e1c)return![];const _0x309aa5=_0x5f1678['get'](_univerjs_sheets[_0x90825b(0x1a0)]),{unitId:_0x24053b,subUnitId:_0x5dab1e}=_0x752e1c,_0x3d95f4=_0x309aa5['getSkeleton'](_0x24053b,_0x5dab1e);if(!_0x3d95f4)return![];const _0x2d2b8a=_0x5f1678['get'](_univerjs_sheets_drawing[_0x90825b(0x191)]),{shapeId:_0x509b51,flipH:_0x1776ce,flipV:_0x5a4931}=_0x1bcc63,_0x4c9f68=_0x2d2b8a[_0x90825b(0x192)]({'unitId':_0x24053b,'subUnitId':_0x5dab1e,'drawingId':_0x509b51});if(!_0x4c9f68)return![];const _0x1bb1b1=_0x5f1678[_0x90825b(0x1e5)](SheetsShapeService)[_0x90825b(0x1fb)](_0x24053b,_0x5dab1e,_0x509b51);if(!_0x1bb1b1)return![];const _0x22f734=_0x5f1678[_0x90825b(0x1e5)](_univerjs_core['ICommandService']),_0x514a24=_0x5f1678['get'](_univerjs_core[_0x90825b(0x1e7)]),_0x10c650=_0x5f1678[_0x90825b(0x1e5)](_univerjs_sheets['SheetInterceptorService']),_0xf23073={..._0x4c9f68[_0x90825b(0x24a)]};if(_0x1776ce!==void 0x0)_0xf23073[_0x90825b(0x1f7)]=!_0xf23073[_0x90825b(0x1f7)];if(_0x5a4931!==void 0x0)_0xf23073[_0x90825b(0x1c9)]=!_0xf23073[_0x90825b(0x1c9)];const _0x3698d8=(0x0,_univerjs_sheets_drawing[_0x90825b(0x23b)])(_0xf23073,_0x3d95f4),_0x4838db=(0x0,_univerjs_sheets_drawing[_0x90825b(0x20e)])(_0xf23073,_0x3d95f4),_0x50c80f=_0x1bb1b1[_0x90825b(0x221)](),_0x23a8c3=_0x1bb1b1['getShapeData'](),_0x1fc005={'unitId':_0x24053b,'subUnitId':_0x5dab1e,'drawingId':_0x509b51,'drawingType':_univerjs_core['DrawingTypeEnum'][_0x90825b(0x1d8)],'sheetTransform':_0x3698d8,'transform':_0xf23073,'data':{'shapeType':_0x50c80f,'shapeData':_0x23a8c3},'axisAlignSheetTransform':_0x4838db,'allowTransform':!![]},{undo:_0xe52cf6,redo:_0x5d9881,objects:_0x2bfcc2}=_0x2d2b8a[_0x90825b(0x1df)]([_0x1fc005]),_0x2de8a5=_0x10c650[_0x90825b(0x22f)]({'id':_univerjs_sheets_drawing[_0x90825b(0x211)]['id'],'params':{'unitId':_0x24053b,'drawings':[_0x1fc005]}}),_0x572071=[...(_0x4cf4f4=_0x2de8a5[_0x90825b(0x1f0)])!==null&&_0x4cf4f4!==void 0x0?_0x4cf4f4:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x24053b,'subUnitId':_0x5dab1e,'op':_0x5d9881,'objects':_0x2bfcc2,'type':_univerjs_sheets_drawing[_0x90825b(0x1c5)]['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x90825b(0x18e)]['id'],'params':[_0x24053b]},..._0x2de8a5['redos']],_0x3d590b=[...(_0x507ce6=_0x2de8a5[_0x90825b(0x1ca)])!==null&&_0x507ce6!==void 0x0?_0x507ce6:[],{'id':_univerjs_sheets_drawing[_0x90825b(0x1c4)]['id'],'params':{'unitId':_0x24053b,'subUnitId':_0x5dab1e,'op':_0xe52cf6,'objects':_0x2bfcc2,'type':_univerjs_sheets_drawing[_0x90825b(0x1c5)]['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x90825b(0x18e)]['id'],'params':[_0x24053b]},..._0x2de8a5[_0x90825b(0x24d)]];if((0x0,_univerjs_pro_engine_shape[_0x90825b(0x225)])(_0x50c80f)){const _0x26524e=_0x1bb1b1[_0x90825b(0x20d)]();if(_0x26524e){const _0x5b14c4={..._0x26524e};_0x5b14c4[_0x90825b(0x1f9)]=void 0x0,_0x5b14c4['to']=void 0x0,_0x572071['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x24053b,'subUnitId':_0x5dab1e,'shapeId':_0x509b51,'shapeType':_0x50c80f,'shapeData':{'relation':_0x5b14c4}}}),_0x3d590b[_0x90825b(0x1e0)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x24053b,'subUnitId':_0x5dab1e,'shapeId':_0x509b51,'shapeType':_0x50c80f,'shapeData':{'relation':_0x26524e}}});}}if((0x0,_univerjs_core['sequenceExecute'])(_0x572071,_0x22f734))return _0x514a24['pushUndoRedo']({'unitID':_0x24053b,'undoMutations':_0x3d590b,'redoMutations':_0x572071}),!![];return![];}},SetSheetsShapeRotateCommand={'type':_univerjs_core[_0x411c48(0x235)][_0x411c48(0x24b)],'id':_0x411c48(0x1eb),'handler':(_0x43f1a8,_0x3d850e)=>{const _0x35c90a=_0x411c48;var _0x21d5ef,_0x44e0ab;const _0x27bef9=(0x0,_univerjs_sheets['getSheetCommandTarget'])(_0x43f1a8[_0x35c90a(0x1e5)](_univerjs_core[_0x35c90a(0x218)]),_0x3d850e);if(!_0x27bef9)return![];const _0x1cbaec=_0x43f1a8[_0x35c90a(0x1e5)](_univerjs_sheets[_0x35c90a(0x1a0)]),{unitId:_0x551b95,subUnitId:_0x3c0df2}=_0x27bef9,_0x1d7651=_0x1cbaec[_0x35c90a(0x19e)](_0x551b95,_0x3c0df2);if(!_0x1d7651)return![];const _0x5b8cf9=_0x43f1a8[_0x35c90a(0x1e5)](_univerjs_sheets_drawing[_0x35c90a(0x191)]),{shapeId:_0x4f0170,rotate:_0x3b4aad}=_0x3d850e,_0x20d25f=_0x5b8cf9[_0x35c90a(0x192)]({'unitId':_0x551b95,'subUnitId':_0x3c0df2,'drawingId':_0x4f0170});if(!_0x20d25f)return![];const _0x31cac2=_0x43f1a8[_0x35c90a(0x1e5)](SheetsShapeService)[_0x35c90a(0x1fb)](_0x551b95,_0x3c0df2,_0x4f0170);if(!_0x31cac2)return![];const _0x1902da=_0x43f1a8[_0x35c90a(0x1e5)](_univerjs_core[_0x35c90a(0x1cd)]),_0x59e85a=_0x43f1a8[_0x35c90a(0x1e5)](_univerjs_core[_0x35c90a(0x1e7)]),_0x29f947=_0x43f1a8['get'](_univerjs_sheets[_0x35c90a(0x190)]),_0x1118f9={..._0x20d25f[_0x35c90a(0x24a)]};if(_0x3b4aad!==void 0x0)_0x1118f9[_0x35c90a(0x203)]=(_0x1118f9[_0x35c90a(0x203)]||0x0)+_0x3b4aad;const _0x196136=(0x0,_univerjs_sheets_drawing['transformToDrawingPosition'])(_0x1118f9,_0x1d7651),_0x4b3c0c=(0x0,_univerjs_sheets_drawing[_0x35c90a(0x20e)])(_0x1118f9,_0x1d7651),_0x2252bd=_0x31cac2[_0x35c90a(0x221)](),_0x4ad875=_0x31cac2[_0x35c90a(0x1f1)](),_0x338977={'unitId':_0x551b95,'subUnitId':_0x3c0df2,'drawingId':_0x4f0170,'drawingType':_univerjs_core[_0x35c90a(0x1b0)]['DRAWING_SHAPE'],'sheetTransform':_0x196136,'transform':_0x1118f9,'data':{'shapeType':_0x2252bd,'shapeData':_0x4ad875},'axisAlignSheetTransform':_0x4b3c0c,'allowTransform':!![]},{undo:_0x2f14b8,redo:_0x579ba9,objects:_0x47c0bf}=_0x5b8cf9[_0x35c90a(0x1df)]([_0x338977]),_0x417f04=_0x29f947['onCommandExecute']({'id':_univerjs_sheets_drawing['SetSheetDrawingCommand']['id'],'params':{'unitId':_0x551b95,'drawings':[_0x338977]}}),_0x2462ac=[...(_0x21d5ef=_0x417f04['preRedos'])!==null&&_0x21d5ef!==void 0x0?_0x21d5ef:[],{'id':_univerjs_sheets_drawing[_0x35c90a(0x1c4)]['id'],'params':{'unitId':_0x551b95,'subUnitId':_0x3c0df2,'op':_0x579ba9,'objects':_0x47c0bf,'type':_univerjs_sheets_drawing[_0x35c90a(0x1c5)][_0x35c90a(0x242)]}},{'id':_univerjs_sheets_drawing[_0x35c90a(0x18e)]['id'],'params':[_0x551b95]},..._0x417f04[_0x35c90a(0x1a1)]],_0x294a42=[...(_0x44e0ab=_0x417f04[_0x35c90a(0x1ca)])!==null&&_0x44e0ab!==void 0x0?_0x44e0ab:[],{'id':_univerjs_sheets_drawing[_0x35c90a(0x1c4)]['id'],'params':{'unitId':_0x551b95,'subUnitId':_0x3c0df2,'op':_0x2f14b8,'objects':_0x47c0bf,'type':_univerjs_sheets_drawing[_0x35c90a(0x1c5)][_0x35c90a(0x242)]}},{'id':_univerjs_sheets_drawing[_0x35c90a(0x18e)]['id'],'params':[_0x551b95]},..._0x417f04['undos']];if((0x0,_univerjs_core[_0x35c90a(0x22b)])(_0x2462ac,_0x1902da))return _0x59e85a[_0x35c90a(0x19f)]({'unitID':_0x551b95,'undoMutations':_0x294a42,'redoMutations':_0x2462ac}),!![];return![];}},SetSheetsShapeTextVerticalToggleCommand={'type':_univerjs_core[_0x411c48(0x235)][_0x411c48(0x24b)],'id':_0x411c48(0x24f),'handler':(_0x3cf5f6,_0x549192)=>{const _0x25755b=_0x411c48;var _0x5f2c9f;const _0x15817e=(0x0,_univerjs_sheets[_0x25755b(0x1b1)])(_0x3cf5f6[_0x25755b(0x1e5)](_univerjs_core[_0x25755b(0x218)]),_0x549192);if(!_0x15817e)return![];const {unitId:_0x1ed9cb,subUnitId:_0x11e5e6}=_0x15817e,{shapeId:_0x30bc7a}=_0x549192,_0x32aabb=_0x3cf5f6[_0x25755b(0x1e5)](SheetsShapeService)[_0x25755b(0x1fb)](_0x1ed9cb,_0x11e5e6,_0x30bc7a);if(!_0x32aabb)return![];const _0x41b528=_0x32aabb[_0x25755b(0x1cb)](),_0x18612b=(_0x5f2c9f=_0x41b528===null||_0x41b528===void 0x0?void 0x0:_0x41b528[_0x25755b(0x1c7)])!==null&&_0x5f2c9f!==void 0x0?_0x5f2c9f:!![],_0x500eca=!_0x18612b,_0x5c5cd7=_0x3cf5f6['get'](_univerjs_core[_0x25755b(0x1cd)]),_0x293721=_0x3cf5f6['get'](_univerjs_core[_0x25755b(0x1e7)]),_0x16354c={'unitId':_0x1ed9cb,'subUnitId':_0x11e5e6,'shapeId':_0x30bc7a,'shapeData':{'shapeText':{'isHorizontal':_0x500eca}}},_0x34bae3={'unitId':_0x1ed9cb,'subUnitId':_0x11e5e6,'shapeId':_0x30bc7a,'shapeData':{'shapeText':{'isHorizontal':_0x18612b}}},_0x52145d=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x16354c}],_0x4f10e9=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x34bae3}];if((0x0,_univerjs_core[_0x25755b(0x22b)])(_0x52145d,_0x5c5cd7))return _0x293721[_0x25755b(0x19f)]({'unitID':_0x1ed9cb,'undoMutations':_0x4f10e9,'redoMutations':_0x52145d}),!![];return![];}},UpdateConnectorRelationCommand={'type':_univerjs_core['CommandType'][_0x411c48(0x24b)],'id':_0x411c48(0x212),'handler':(_0xb8070c,_0x34cd9b)=>{const _0x3a0e72=_0x411c48;var _0x18a194,_0x2381d9,_0x5e943d,_0x3d25d2;const _0x2403c4=(0x0,_univerjs_sheets['getSheetCommandTarget'])(_0xb8070c[_0x3a0e72(0x1e5)](_univerjs_core['IUniverInstanceService']),_0x34cd9b);if(!_0x2403c4)return![];const _0x359ac6=_0xb8070c[_0x3a0e72(0x1e5)](_univerjs_sheets[_0x3a0e72(0x1a0)]),{unitId:_0x159452,subUnitId:_0x46eb85}=_0x2403c4,_0x4b1092=_0x359ac6['getSkeleton'](_0x159452,_0x46eb85);if(!_0x4b1092)return![];const _0x5b3d80=_0xb8070c[_0x3a0e72(0x1e5)](_univerjs_sheets_drawing['ISheetDrawingService']),{connectorShapeId:_0xfbd209,width:_0xfa78d2,height:_0x634b43,left:_0x3f64ad,top:_0x56d897,flipX:_0x297132,flipY:_0x5023c7,rotation:_0x80880b,oldAdjustValues:_0x2ed9b0,newAdjustValues:_0xc40b81,oldLineType:_0x45fa26,newLineType:_0x54f4e5,oldRelation:_0x29e862,newRelation:_0x1c4b7c}=_0x34cd9b,_0x54e3f4=_0x5b3d80[_0x3a0e72(0x192)]({'unitId':_0x159452,'subUnitId':_0x46eb85,'drawingId':_0xfbd209});if(!_0x54e3f4)return![];const _0x273d91=_0xb8070c['get'](SheetsShapeService)['getShapeModel'](_0x159452,_0x46eb85,_0xfbd209);if(!_0x273d91)return![];const _0x529703=_0xb8070c[_0x3a0e72(0x1e5)](_univerjs_core[_0x3a0e72(0x1cd)]),_0x5b3b01=_0xb8070c[_0x3a0e72(0x1e5)](_univerjs_core[_0x3a0e72(0x1e7)]),_0x47868f=_0xb8070c[_0x3a0e72(0x1e5)](_univerjs_sheets[_0x3a0e72(0x190)]),_0x116991={..._0x54e3f4[_0x3a0e72(0x24a)],'width':_0xfa78d2,'height':_0x634b43,'left':_0x3f64ad,'top':_0x56d897,'flipX':_0x297132,'flipY':_0x5023c7,'angle':(_0x18a194=_0x80880b!==null&&_0x80880b!==void 0x0?_0x80880b:(_0x2381d9=_0x54e3f4[_0x3a0e72(0x24a)])===null||_0x2381d9===void 0x0?void 0x0:_0x2381d9['angle'])!==null&&_0x18a194!==void 0x0?_0x18a194:0x0},_0x4656f7=(0x0,_univerjs_sheets_drawing[_0x3a0e72(0x23b)])(_0x116991,_0x4b1092),_0x4dd67c=(0x0,_univerjs_sheets_drawing[_0x3a0e72(0x20e)])(_0x116991,_0x4b1092),_0x29fc27=_0x273d91[_0x3a0e72(0x221)](),_0x524ab1=_0x273d91[_0x3a0e72(0x1f1)](),_0x1aee2a={'unitId':_0x159452,'subUnitId':_0x46eb85,'drawingId':_0xfbd209,'drawingType':_univerjs_core[_0x3a0e72(0x1b0)][_0x3a0e72(0x1d8)],'sheetTransform':_0x4656f7,'transform':_0x116991,'data':{'shapeType':_0x54f4e5||_0x45fa26||_0x29fc27,'shapeData':{..._0x524ab1,'adjustValues':_0xc40b81||_0x2ed9b0||(_0x524ab1===null||_0x524ab1===void 0x0?void 0x0:_0x524ab1[_0x3a0e72(0x217)]),'relation':_0x1c4b7c||_0x29e862||(_0x524ab1===null||_0x524ab1===void 0x0?void 0x0:_0x524ab1[_0x3a0e72(0x1db)])}},'axisAlignSheetTransform':_0x4dd67c,'allowTransform':!![]},{undo:_0x630289,redo:_0x315d9b,objects:_0x166768}=_0x5b3d80[_0x3a0e72(0x1df)]([_0x1aee2a]),_0x1f3609=_0x47868f['onCommandExecute']({'id':_univerjs_sheets_drawing[_0x3a0e72(0x211)]['id'],'params':{'unitId':_0x159452,'drawings':[_0x1aee2a]}}),_0x45ded7=[...(_0x5e943d=_0x1f3609['preRedos'])!==null&&_0x5e943d!==void 0x0?_0x5e943d:[],{'id':_univerjs_sheets_drawing[_0x3a0e72(0x1c4)]['id'],'params':{'unitId':_0x159452,'subUnitId':_0x46eb85,'op':_0x315d9b,'objects':_0x166768,'type':_univerjs_sheets_drawing[_0x3a0e72(0x1c5)][_0x3a0e72(0x242)]}},{'id':_univerjs_sheets_drawing[_0x3a0e72(0x18e)]['id'],'params':[_0x159452]},..._0x1f3609[_0x3a0e72(0x1a1)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x159452,'subUnitId':_0x46eb85,'shapeId':_0xfbd209,'shapeType':_0x54f4e5,'shapeData':{'adjustValues':_0xc40b81,'relation':_0x1c4b7c}}}],_0x5e7729=[...(_0x3d25d2=_0x1f3609['preUndos'])!==null&&_0x3d25d2!==void 0x0?_0x3d25d2:[],{'id':_univerjs_sheets_drawing[_0x3a0e72(0x1c4)]['id'],'params':{'unitId':_0x159452,'subUnitId':_0x46eb85,'op':_0x630289,'objects':_0x166768,'type':_univerjs_sheets_drawing[_0x3a0e72(0x1c5)][_0x3a0e72(0x242)]}},{'id':_univerjs_sheets_drawing[_0x3a0e72(0x18e)]['id'],'params':[_0x159452]},..._0x1f3609[_0x3a0e72(0x24d)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x159452,'subUnitId':_0x46eb85,'shapeId':_0xfbd209,'shapeType':_0x29fc27,'shapeData':{..._0x524ab1,'adjustValues':_0x2ed9b0||(_0x524ab1===null||_0x524ab1===void 0x0?void 0x0:_0x524ab1[_0x3a0e72(0x217)]),'relation':_0x29e862||(_0x524ab1===null||_0x524ab1===void 0x0?void 0x0:_0x524ab1[_0x3a0e72(0x1db)])}}}];if((0x0,_univerjs_core['sequenceExecute'])(_0x45ded7,_0x529703))return _0x5b3b01[_0x3a0e72(0x19f)]({'unitID':_0x159452,'undoMutations':_0x5e7729,'redoMutations':_0x45ded7}),!![];return![];}},UpdateLineShapeResizeCommand={'type':_univerjs_core[_0x411c48(0x235)]['COMMAND'],'id':_0x411c48(0x1ce),'handler':(_0x4368fc,_0x307238)=>{const _0x3bfee7=_0x411c48;var _0x597d36,_0x2966f7;const _0x1658f6=(0x0,_univerjs_sheets[_0x3bfee7(0x1b1)])(_0x4368fc[_0x3bfee7(0x1e5)](_univerjs_core[_0x3bfee7(0x218)]),_0x307238);if(!_0x1658f6)return![];const _0x3dff06=_0x4368fc[_0x3bfee7(0x1e5)](_univerjs_sheets['SheetSkeletonService']),{unitId:_0x2909dc,subUnitId:_0x22e655}=_0x1658f6,_0x12cb8d=_0x3dff06[_0x3bfee7(0x19e)](_0x2909dc,_0x22e655);if(!_0x12cb8d)return![];const _0x2603c2=_0x4368fc[_0x3bfee7(0x1e5)](_univerjs_sheets_drawing[_0x3bfee7(0x191)]),{shapeId:_0x232cc6,width:_0x575874,height:_0x1f12cd,left:_0x4004c4,top:_0x57cffd,flipX:_0x3d7ec7,flipY:_0x301108,angle:_0x34757d,oldAdjustValues:_0x524db4,newAdjustValues:_0x342b63,oldLineType:_0x1da508,newLineType:_0x2c2375}=_0x307238,_0x54f928=_0x2603c2[_0x3bfee7(0x192)]({'unitId':_0x2909dc,'subUnitId':_0x22e655,'drawingId':_0x232cc6});if(!_0x54f928)return![];const _0x571a6f=_0x4368fc[_0x3bfee7(0x1e5)](SheetsShapeService)[_0x3bfee7(0x1fb)](_0x2909dc,_0x22e655,_0x232cc6);if(!_0x571a6f)return![];const _0x4b5ad3=_0x4368fc[_0x3bfee7(0x1e5)](_univerjs_core[_0x3bfee7(0x1cd)]),_0x46038f=_0x4368fc[_0x3bfee7(0x1e5)](_univerjs_core[_0x3bfee7(0x1e7)]),_0x241212=_0x4368fc[_0x3bfee7(0x1e5)](_univerjs_sheets[_0x3bfee7(0x190)]),_0x1e7d4d={..._0x54f928[_0x3bfee7(0x24a)],'width':_0x575874,'height':_0x1f12cd,'left':_0x4004c4,'top':_0x57cffd,'flipX':_0x3d7ec7,'flipY':_0x301108,'angle':_0x34757d},_0x2f308e=(0x0,_univerjs_sheets_drawing[_0x3bfee7(0x23b)])(_0x1e7d4d,_0x12cb8d),_0x423083=(0x0,_univerjs_sheets_drawing[_0x3bfee7(0x20e)])(_0x1e7d4d,_0x12cb8d),_0x2e7102=_0x571a6f[_0x3bfee7(0x221)](),_0x2be2bf=_0x571a6f[_0x3bfee7(0x1f1)](),_0x43dd6c={'unitId':_0x2909dc,'subUnitId':_0x22e655,'drawingId':_0x232cc6,'drawingType':_univerjs_core[_0x3bfee7(0x1b0)][_0x3bfee7(0x1d8)],'sheetTransform':_0x2f308e,'transform':_0x1e7d4d,'data':{'shapeType':_0x2c2375||_0x1da508||_0x2e7102,'shapeData':{..._0x2be2bf,'adjustValues':_0x342b63||_0x524db4||(_0x2be2bf===null||_0x2be2bf===void 0x0?void 0x0:_0x2be2bf[_0x3bfee7(0x217)])}},'axisAlignSheetTransform':_0x423083,'allowTransform':!![]},{undo:_0x32dbda,redo:_0x47ce1e,objects:_0x408ef8}=_0x2603c2[_0x3bfee7(0x1df)]([_0x43dd6c]),_0x1833aa=_0x241212[_0x3bfee7(0x22f)]({'id':_univerjs_sheets_drawing[_0x3bfee7(0x211)]['id'],'params':{'unitId':_0x2909dc,'drawings':[_0x43dd6c]}}),_0x1704eb=[...(_0x597d36=_0x1833aa[_0x3bfee7(0x1f0)])!==null&&_0x597d36!==void 0x0?_0x597d36:[],{'id':_univerjs_sheets_drawing[_0x3bfee7(0x1c4)]['id'],'params':{'unitId':_0x2909dc,'subUnitId':_0x22e655,'op':_0x47ce1e,'objects':_0x408ef8,'type':_univerjs_sheets_drawing[_0x3bfee7(0x1c5)]['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x3bfee7(0x18e)]['id'],'params':[_0x2909dc]},..._0x1833aa[_0x3bfee7(0x1a1)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x2909dc,'subUnitId':_0x22e655,'shapeId':_0x232cc6,'shapeType':_0x2c2375,'shapeData':{'adjustValues':_0x342b63}}}],_0x296bdd=[...(_0x2966f7=_0x1833aa[_0x3bfee7(0x1ca)])!==null&&_0x2966f7!==void 0x0?_0x2966f7:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x2909dc,'subUnitId':_0x22e655,'op':_0x32dbda,'objects':_0x408ef8,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x3bfee7(0x242)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x2909dc]},..._0x1833aa['undos'],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x2909dc,'subUnitId':_0x22e655,'shapeId':_0x232cc6,'shapeType':_0x2e7102,'shapeData':{..._0x2be2bf,'adjustValues':_0x524db4||(_0x2be2bf===null||_0x2be2bf===void 0x0?void 0x0:_0x2be2bf[_0x3bfee7(0x217)])}}}];if((0x0,_univerjs_core[_0x3bfee7(0x22b)])(_0x1704eb,_0x4b5ad3))return _0x46038f[_0x3bfee7(0x19f)]({'unitID':_0x2909dc,'undoMutations':_0x296bdd,'redoMutations':_0x1704eb}),!![];return![];}},UpdateSheetsShapeTypeMutation={'id':_0x411c48(0x1f4),'type':_univerjs_core[_0x411c48(0x235)][_0x411c48(0x1a9)],'handler':(_0xc7e656,_0x3d727b)=>{const _0x49e999=_0x411c48,{unitId:_0x204634,subUnitId:_0x50057b,shapeType:_0xb0166c,shapeId:_0x4487c,shapeData:_0x25af75}=_0x3d727b,_0x9e3388=_0xc7e656['get'](SheetsShapeService)[_0x49e999(0x1fb)](_0x204634,_0x50057b,_0x4487c);if(_0x9e3388){_0x9e3388['setShapeType'](_0xb0166c);if(_0x25af75)_0x9e3388===null||_0x9e3388===void 0x0||_0x9e3388[_0x49e999(0x18c)](_0x25af75);}return!![];}},UpdateSheetsShapeTypeCommand={'id':_0x411c48(0x1d0),'type':_univerjs_core[_0x411c48(0x235)][_0x411c48(0x24b)],'handler':(_0x33c60a,_0x3e1c05)=>{const _0x93a5c3=_0x411c48;if(!_0x3e1c05)return![];const _0x57fb85=_0x33c60a[_0x93a5c3(0x1e5)](_univerjs_core[_0x93a5c3(0x1cd)]),_0x29546c=_0x33c60a[_0x93a5c3(0x1e5)](SheetsShapeService),_0x447b31=_0x33c60a['get'](_univerjs_core[_0x93a5c3(0x1e7)]),_0x114ee9=[],_0xf531f4=[],{unitId:_0x5c74f2,subUnitId:_0x3bb31c,shapeId:_0x290c55,shapeType:_0x4a4729,shapeData:_0x5d8414}=_0x3e1c05,_0x315c51=_0x29546c['getShapeModel'](_0x5c74f2,_0x3bb31c,_0x290c55);if(_0x315c51){const _0x4e3a07=_0x315c51[_0x93a5c3(0x221)](),_0x25eb91=Object[_0x93a5c3(0x18a)]({},_0x315c51[_0x93a5c3(0x1f1)]()),_0x523367={'unitId':_0x5c74f2,'subUnitId':_0x3bb31c,'shapeId':_0x290c55,'shapeType':_0x4a4729,'shapeData':_0x5d8414},_0x50db74={'unitId':_0x5c74f2,'subUnitId':_0x3bb31c,'shapeId':_0x290c55,'shapeType':_0x4e3a07,'shapeData':_0x25eb91};_0x114ee9['push']({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x523367}),_0xf531f4[_0x93a5c3(0x1e0)]({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x50db74});if(_0x114ee9[_0x93a5c3(0x258)](_0x41a72d=>_0x57fb85[_0x93a5c3(0x22d)](_0x41a72d['id'],_0x41a72d[_0x93a5c3(0x199)])))_0x447b31[_0x93a5c3(0x19f)]({'unitID':_0x5c74f2,'redoMutations':[..._0x114ee9],'undoMutations':[..._0xf531f4]});return!![];}return![];}};var name='@univerjs-pro/sheets-shape',version=_0x411c48(0x243);const SHEETS_SHAPE_PLUGIN_CONFIG_KEY=_0x411c48(0x200),configSymbol=Symbol(SHEETS_SHAPE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let SheetsShapeController=class SheetsShapeController extends _univerjs_core[_0x411c48(0x207)]{constructor(_0x25699c,_0x15348b,_0x3c6244,_0x3e2024,_0x4ea8fc){const _0x4b8f85=_0x411c48;super(),this[_0x4b8f85(0x23e)]=_0x25699c,this[_0x4b8f85(0x250)]=_0x15348b,this[_0x4b8f85(0x1a4)]=_0x3c6244,this['_sheetsShapeService']=_0x3e2024,this[_0x4b8f85(0x195)]=_0x4ea8fc,this[_0x4b8f85(0x1fa)](),this[_0x4b8f85(0x1d4)]();}[_0x411c48(0x1fa)](){const _0x18355f=_0x411c48;[InsertShapeCommand,SetShapeDrawingDataCommand,ToggleSheetsShapeFlipCommand,SetSheetsShapeRotateCommand,SetSheetsShapeTextVerticalToggleCommand,UpdateConnectorRelationCommand,UpdateLineShapeResizeCommand,InsertSheetsShapeMutation,RemoveSheetsShapeMutation,UpdateSheetsShapeTypeMutation,UpdateSheetsShapeDataMutation][_0x18355f(0x1b9)](_0x5bbd72=>this[_0x18355f(0x1e2)](this['_commandService']['registerCommand'](_0x5bbd72)));}['_initCommandInterceptor'](){const _0x4367da=_0x411c48;this[_0x4367da(0x1e2)](this[_0x4367da(0x250)][_0x4367da(0x249)]({'getMutations':_0xd09e32=>{const _0x92b3dc=_0x4367da;if(_0xd09e32['id']===_univerjs_sheets_drawing['RemoveSheetDrawingCommand']['id']){const {drawings:_0x2e9ea4}=_0xd09e32[_0x92b3dc(0x199)],_0x55a3ec=_0x2e9ea4[_0x92b3dc(0x231)](_0x34a971=>_0x34a971[_0x92b3dc(0x1dc)]===_univerjs_core[_0x92b3dc(0x1b0)][_0x92b3dc(0x1d8)]);if(_0x55a3ec[_0x92b3dc(0x1a7)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x40f481=[],_0x172937=[];return _0x55a3ec['forEach'](_0x1488e7=>{const _0x53b60e=_0x92b3dc,{unitId:_0x46108f,subUnitId:_0xa21eda,drawingId:_0x4fd7c0}=_0x1488e7,_0x431a83=this[_0x53b60e(0x21b)][_0x53b60e(0x1fb)](_0x46108f,_0xa21eda,_0x4fd7c0);if(!_0x431a83)throw new TypeError('Fail\x20to\x20get\x20shape\x20model,\x20get:\x20'+_0x431a83);_0x40f481[_0x53b60e(0x1e0)]({'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x46108f,'subUnitId':_0xa21eda,'shapeId':_0x4fd7c0}}),_0x172937[_0x53b60e(0x1e0)]({'id':InsertSheetsShapeMutation['id'],'params':{'unitId':_0x46108f,'subUnitId':_0xa21eda,'shapeId':_0x4fd7c0,'shapeType':_0x431a83[_0x53b60e(0x221)](),'shapeData':_0x431a83[_0x53b60e(0x1f1)]()}});const _0x53eeb1=this[_0x53b60e(0x21b)][_0x53b60e(0x1c2)](_0x46108f,_0xa21eda,_0x4fd7c0);if(_0x53eeb1)for(const _0x3be444 of _0x53eeb1){const _0x12c654=_0x3be444[_0x53b60e(0x202)],_0x428b80=_0x3be444['isFrom'],_0x5e85ff=_0x428b80?{'from':void 0x0}:{'to':void 0x0},_0x5b5cbf=_0x428b80?{'from':{'shapeId':_0x3be444[_0x53b60e(0x232)],'cxnIndex':_0x3be444[_0x53b60e(0x23d)]}}:{'to':{'shapeId':_0x3be444[_0x53b60e(0x232)],'cxnIndex':_0x3be444[_0x53b60e(0x23d)]}};_0x40f481['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x46108f,'subUnitId':_0xa21eda,'shapeId':_0x12c654,'shapeData':{'relation':_0x5e85ff}}}),_0x172937['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x46108f,'subUnitId':_0xa21eda,'shapeId':_0x12c654,'shapeData':{'relation':_0x5b5cbf}}});}}),{'preRedos':_0x40f481,'redos':[],'preUndos':[],'undos':_0x172937};}if(_0xd09e32['id']===_univerjs_sheets_drawing['SetSheetDrawingCommand']['id']){const {drawings:_0x2013f1}=_0xd09e32['params'],_0x4ca2a8=_0x2013f1['filter'](_0x46c28f=>_0x46c28f['drawingType']===_univerjs_core[_0x92b3dc(0x1b0)][_0x92b3dc(0x1d8)]);if(_0x4ca2a8['length']===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x451150=[],_0x4539fb=[];for(const _0x39d453 of _0x4ca2a8){const {unitId:_0x16aa2a,subUnitId:_0x3ef679,drawingId:_0xfb05fa,transform:_0xe22e2d}=_0x39d453;if(!_0x16aa2a||!_0x3ef679||!_0xfb05fa||!_0xe22e2d)continue;const _0x54a6a4=this[_0x92b3dc(0x21b)][_0x92b3dc(0x1fb)](_0x16aa2a,_0x3ef679,_0xfb05fa);if(!_0x54a6a4)throw new TypeError(_0x92b3dc(0x238)+_0x54a6a4);if((0x0,_univerjs_pro_engine_shape[_0x92b3dc(0x225)])(_0x54a6a4[_0x92b3dc(0x221)]())){const _0x4c2dee=this['_sheetsShapeService']['getLineShapeRelation'](_0x16aa2a,_0x3ef679,_0xfb05fa),_0x33e6df={'from':void 0x0,'to':void 0x0};_0x4c2dee&&(_0x451150['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x16aa2a,'subUnitId':_0x3ef679,'shapeId':_0xfb05fa,'shapeData':{'relation':_0x33e6df}}}),_0x4539fb[_0x92b3dc(0x1e0)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x16aa2a,'subUnitId':_0x3ef679,'shapeId':_0xfb05fa,'shapeData':{'relation':_0x4c2dee}}}));}else{const _0x3ba2a8=this[_0x92b3dc(0x21b)][_0x92b3dc(0x1c2)](_0x16aa2a,_0x3ef679,_0xfb05fa);if(_0x3ba2a8&&_0x3ba2a8[_0x92b3dc(0x1a7)]>0x0)for(const _0x181122 of _0x3ba2a8){const _0x4fa816=_0x181122[_0x92b3dc(0x202)],_0x332b97=_0x181122[_0x92b3dc(0x21f)],_0x2becdd=this['_sheetsShapeService'][_0x92b3dc(0x1fb)](_0x16aa2a,_0x3ef679,_0x4fa816);if(!_0x2becdd)continue;const _0xde594c=_0x2becdd[_0x92b3dc(0x1d9)](),_0x1a61a1=_0x2becdd['getEndConnectInfo']();if(_0xde594c&&_0x1a61a1)this['_addLineRerouteUpdates'](_0x16aa2a,_0x3ef679,_0x4fa816,_0x2becdd,_0xde594c,_0x1a61a1,_0x451150,_0x4539fb,_0xfb05fa,_0xe22e2d);else this[_0x92b3dc(0x1ea)](_0x16aa2a,_0x3ef679,_0x4fa816,_0x2becdd,_0x332b97?_0xde594c:_0x1a61a1,_0x332b97,_0x451150,_0x4539fb,_0xfb05fa,_0xe22e2d);}}}return{'preRedos':[],'redos':_0x451150,'preUndos':_0x4539fb,'undos':[]};}return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};}}));}[_0x411c48(0x1da)](_0x3e3a3f,_0x5c1a0f,_0x43f13c,_0xf3a48d,_0x51f4d3){const _0x49efa7=_0x411c48;if(!_0x5c1a0f||!_0x43f13c)return null;const {shapeId:_0x4d6df8,cxnIndex:_0x9a8b42}=_0x3e3a3f,_0x262bf5=this[_0x49efa7(0x21b)][_0x49efa7(0x1fb)](_0x5c1a0f,_0x43f13c,_0x4d6df8);if(!_0x262bf5)return null;const _0x2a07d4=this['_drawingManagerService']['getDrawingByParam']({'unitId':_0x5c1a0f,'subUnitId':_0x43f13c,'drawingId':_0x4d6df8});if(!(_0x2a07d4===null||_0x2a07d4===void 0x0?void 0x0:_0x2a07d4['transform']))return null;let {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x40e057}=_0x2a07d4['transform'];if(_0x51f4d3&&_0xf3a48d===_0x4d6df8){var _0x4f8292,_0x32464e,_0x2a168e,_0x1fb363,_0x5be032,_0x420497,_0x367c0e;left=(_0x4f8292=_0x51f4d3[_0x49efa7(0x1ff)])!==null&&_0x4f8292!==void 0x0?_0x4f8292:left,top=(_0x32464e=_0x51f4d3['top'])!==null&&_0x32464e!==void 0x0?_0x32464e:top,width=(_0x2a168e=_0x51f4d3[_0x49efa7(0x215)])!==null&&_0x2a168e!==void 0x0?_0x2a168e:width,height=(_0x1fb363=_0x51f4d3['height'])!==null&&_0x1fb363!==void 0x0?_0x1fb363:height,flipX=(_0x5be032=_0x51f4d3['flipX'])!==null&&_0x5be032!==void 0x0?_0x5be032:flipX,flipY=(_0x420497=_0x51f4d3[_0x49efa7(0x1c9)])!==null&&_0x420497!==void 0x0?_0x420497:flipY,_0x40e057=(_0x367c0e=_0x51f4d3['angle'])!==null&&_0x367c0e!==void 0x0?_0x367c0e:_0x40e057;}_0x262bf5[_0x49efa7(0x1a8)]({'width':width,'height':height});const _0x4c88da=_0x262bf5['getConnectionSiteList']()[_0x49efa7(0x1ad)](_0x4541be=>_0x4541be[_0x49efa7(0x230)]===_0x9a8b42);if(!_0x4c88da)return null;let _0x514042=flipX?width-_0x4c88da['x']:_0x4c88da['x'],_0x4c10ae=flipY?height-_0x4c88da['y']:_0x4c88da['y'];if(_0x40e057!==0x0&&_0x40e057!==void 0x0&&_0x40e057!==null){const _0x15c7cf=_0x40e057*Math['PI']/0xb4,_0x231e33=Math[_0x49efa7(0x208)](_0x15c7cf),_0x2b30bc=Math[_0x49efa7(0x1c3)](_0x15c7cf),_0x567bb1=width/0x2,_0x3ec780=height/0x2,_0x18405a=_0x514042-_0x567bb1,_0x293b4b=_0x4c10ae-_0x3ec780;_0x514042=_0x567bb1+_0x18405a*_0x231e33-_0x293b4b*_0x2b30bc,_0x4c10ae=_0x3ec780+_0x18405a*_0x2b30bc+_0x293b4b*_0x231e33;}_0x514042+=left,_0x4c10ae+=top;let _0x2fba57=_0x4c88da[_0x49efa7(0x223)]/0xea60;if(flipX)_0x2fba57=0xb4-_0x2fba57;if(flipY)_0x2fba57=-_0x2fba57;_0x2fba57+=_0x40e057||0x0,_0x2fba57=(_0x2fba57%0x168+0x168)%0x168;const _0x14d2a7=(0x0,_univerjs_pro_engine_shape[_0x49efa7(0x252)])({'left':left,'top':top,'width':width,'height':height},_0x40e057||0x0);return{'point':{'x':_0x514042,'y':_0x4c10ae},'angle':_0x2fba57,'bounds':_0x14d2a7};}[_0x411c48(0x246)](_0x55dc91,_0x5921ca,_0x340214,_0x31850f,_0x28b453,_0x146aba,_0x1e8f22,_0x26ae4b,_0x515c83,_0x46c0a9){const _0x70e447=_0x411c48,_0x1d8a28=this[_0x70e447(0x1a4)][_0x70e447(0x19e)](_0x55dc91,_0x5921ca);if(!_0x1d8a28)return;const _0x40c408=_0x31850f[_0x70e447(0x20d)](),_0x485d70=_0x31850f[_0x70e447(0x224)](),_0x350903={},_0x28fb9a={};_0x485d70[_0x70e447(0x1b9)](_0x5c7d9e=>{const _0x222eb7=_0x70e447,_0x34704b=_0x31850f[_0x222eb7(0x1b5)](_0x5c7d9e);_0x28fb9a[_0x5c7d9e]=_0x34704b!==null&&_0x34704b!==void 0x0?_0x34704b:0x0;});const _0x429e27=this[_0x70e447(0x1da)](_0x28b453,_0x55dc91,_0x5921ca,_0x515c83,_0x46c0a9),_0x4d72a9=this['_getConnectPointInfo'](_0x146aba,_0x55dc91,_0x5921ca,_0x515c83,_0x46c0a9);if(_0x429e27&&_0x4d72a9){const _0x484506=_0x31850f[_0x70e447(0x221)](),_0x40d524=(0x0,_univerjs_pro_engine_shape[_0x70e447(0x1d3)])(_0x429e27,_0x4d72a9,_0x484506);let _0x931a78=_0x484506;if(_0x40d524){const _0x37e0d0=(0x0,_univerjs_pro_engine_shape[_0x70e447(0x1ec)])(_0x40d524,_0x31850f['getShapeType']()),_0x4a84e2=this[_0x70e447(0x195)][_0x70e447(0x210)](_0x55dc91,_0x5921ca);if(_0x4a84e2&&_0x4a84e2[_0x340214]){const _0x26dcb6=_0x4a84e2[_0x340214];_0x931a78=_0x37e0d0[_0x70e447(0x228)];for(const [_0x20fd7f,_0x3bc698]of Object['entries'](_0x37e0d0[_0x70e447(0x217)]))_0x350903[_0x20fd7f]=_0x3bc698;const _0x1ee6ad={..._0x26dcb6[_0x70e447(0x24a)],'width':_0x37e0d0[_0x70e447(0x244)][_0x70e447(0x215)],'height':_0x37e0d0[_0x70e447(0x244)][_0x70e447(0x19d)],'left':_0x37e0d0[_0x70e447(0x244)]['left'],'top':_0x37e0d0['worldRect'][_0x70e447(0x194)],'flipX':_0x37e0d0[_0x70e447(0x244)]['flipX'],'flipY':_0x37e0d0[_0x70e447(0x244)][_0x70e447(0x1c9)],'angle':_0x37e0d0[_0x70e447(0x256)]},_0x3d9269=(0x0,_univerjs_sheets_drawing[_0x70e447(0x23b)])(_0x1ee6ad,_0x1d8a28),_0x4507e4=(0x0,_univerjs_sheets_drawing[_0x70e447(0x20e)])(_0x1ee6ad,_0x1d8a28),_0x1ba406={'unitId':_0x55dc91,'subUnitId':_0x5921ca,'drawingType':_univerjs_core[_0x70e447(0x1b0)]['DRAWING_SHAPE'],'drawingId':_0x340214,'transform':_0x1ee6ad,'sheetTransform':_0x3d9269,'axisAlignSheetTransform':_0x4507e4},{unitId:_0x26b4e6,subUnitId:_0x532d67,undo:_0x1e5c2d,redo:_0x9690ba,objects:_0x5f4c78}=this[_0x70e447(0x195)][_0x70e447(0x1df)]([_0x1ba406]);_0x1e8f22[_0x70e447(0x1e0)]({'id':_univerjs_sheets_drawing[_0x70e447(0x1c4)]['id'],'params':{'unitId':_0x26b4e6,'subUnitId':_0x532d67,'op':_0x9690ba,'objects':_0x5f4c78,'type':_univerjs_sheets_drawing[_0x70e447(0x1c5)]['UPDATE']}}),_0x26ae4b['push']({'id':_univerjs_sheets_drawing[_0x70e447(0x1c4)]['id'],'params':{'unitId':_0x26b4e6,'subUnitId':_0x532d67,'op':_0x1e5c2d,'objects':_0x5f4c78,'type':_univerjs_sheets_drawing[_0x70e447(0x1c5)]['UPDATE']}});}_0x31850f[_0x70e447(0x196)]();}_0x1e8f22['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x55dc91,'subUnitId':_0x5921ca,'shapeId':_0x340214,'shapeType':_0x931a78,'shapeData':{'adjustValues':_0x350903,'relation':_0x40c408}}}),_0x26ae4b[_0x70e447(0x1e0)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x55dc91,'subUnitId':_0x5921ca,'shapeId':_0x340214,'shapeType':_0x484506,'shapeData':{'adjustValues':_0x28fb9a,'relation':_0x40c408}}});}}[_0x411c48(0x1ea)](_0x10643f,_0x20c796,_0x300fac,_0x571d6c,_0x23c8dd,_0x19ac78,_0x369832,_0x2827c3,_0x5f465d,_0x56892e){const _0xe92a75=_0x411c48;var _0x29df29;if(!_0x23c8dd)return;const _0xef5c4d=this[_0xe92a75(0x1a4)][_0xe92a75(0x19e)](_0x10643f,_0x20c796);if(!_0xef5c4d)return;const _0x566c87=(_0x29df29=this[_0xe92a75(0x195)][_0xe92a75(0x192)]({'unitId':_0x10643f,'subUnitId':_0x20c796,'drawingId':_0x5f465d}))===null||_0x29df29===void 0x0?void 0x0:_0x29df29['transform'];if(!_0x566c87)return;const _0x261d2e=_0x566c87[_0xe92a75(0x1ff)]!==_0x56892e[_0xe92a75(0x1ff)]||_0x566c87[_0xe92a75(0x194)]!==_0x56892e[_0xe92a75(0x194)],_0x3e1719=_0x566c87[_0xe92a75(0x215)]!==_0x56892e[_0xe92a75(0x215)]||_0x566c87['height']!==_0x56892e[_0xe92a75(0x19d)],_0x2f7998=_0x566c87[_0xe92a75(0x1f7)]!==_0x56892e[_0xe92a75(0x1f7)]||_0x566c87[_0xe92a75(0x1c9)]!==_0x56892e['flipY'],_0x42064e=_0x566c87[_0xe92a75(0x203)]!==_0x56892e['angle'];if(_0x261d2e&&!_0x3e1719&&!_0x2f7998&&!_0x42064e){var _0x1bd6bf,_0x93ec22,_0x42783f,_0x37d724;const _0x4dc546=((_0x1bd6bf=_0x56892e[_0xe92a75(0x1ff)])!==null&&_0x1bd6bf!==void 0x0?_0x1bd6bf:0x0)-((_0x93ec22=_0x566c87[_0xe92a75(0x1ff)])!==null&&_0x93ec22!==void 0x0?_0x93ec22:0x0),_0x4d282c=((_0x42783f=_0x56892e[_0xe92a75(0x194)])!==null&&_0x42783f!==void 0x0?_0x42783f:0x0)-((_0x37d724=_0x566c87[_0xe92a75(0x194)])!==null&&_0x37d724!==void 0x0?_0x37d724:0x0),_0x4bf6d0=this[_0xe92a75(0x195)][_0xe92a75(0x210)](_0x10643f,_0x20c796);if(_0x4bf6d0&&_0x4bf6d0[_0x300fac]){var _0x2bbcfb,_0x1d42ef,_0x50b73d,_0x205f38;const _0x1bdd8f=_0x4bf6d0[_0x300fac],_0x599308={..._0x1bdd8f[_0xe92a75(0x24a)],'left':((_0x2bbcfb=(_0x1d42ef=_0x1bdd8f[_0xe92a75(0x24a)])===null||_0x1d42ef===void 0x0?void 0x0:_0x1d42ef['left'])!==null&&_0x2bbcfb!==void 0x0?_0x2bbcfb:0x0)+_0x4dc546,'top':((_0x50b73d=(_0x205f38=_0x1bdd8f[_0xe92a75(0x24a)])===null||_0x205f38===void 0x0?void 0x0:_0x205f38[_0xe92a75(0x194)])!==null&&_0x50b73d!==void 0x0?_0x50b73d:0x0)+_0x4d282c},_0x3e2aaa=(0x0,_univerjs_sheets_drawing[_0xe92a75(0x23b)])(_0x599308,_0xef5c4d),_0x37b062=(0x0,_univerjs_sheets_drawing['transformToAxisAlignPosition'])(_0x599308,_0xef5c4d),_0x151023={'unitId':_0x10643f,'subUnitId':_0x20c796,'drawingType':_univerjs_core['DrawingTypeEnum'][_0xe92a75(0x1d8)],'drawingId':_0x300fac,'transform':_0x599308,'sheetTransform':_0x3e2aaa,'axisAlignSheetTransform':_0x37b062},{unitId:_0x4caba7,subUnitId:_0x344df4,undo:_0x197999,redo:_0x1f9500,objects:_0x134ff9}=this[_0xe92a75(0x195)][_0xe92a75(0x1df)]([_0x151023]);_0x369832['push']({'id':_univerjs_sheets_drawing[_0xe92a75(0x1c4)]['id'],'params':{'unitId':_0x4caba7,'subUnitId':_0x344df4,'op':_0x1f9500,'objects':_0x134ff9,'type':_univerjs_sheets_drawing[_0xe92a75(0x1c5)]['UPDATE']}}),_0x2827c3[_0xe92a75(0x1e0)]({'id':_univerjs_sheets_drawing[_0xe92a75(0x1c4)]['id'],'params':{'unitId':_0x4caba7,'subUnitId':_0x344df4,'op':_0x197999,'objects':_0x134ff9,'type':_univerjs_sheets_drawing[_0xe92a75(0x1c5)][_0xe92a75(0x242)]}});}}else{const _0x288b64=_0x571d6c[_0xe92a75(0x1d9)](),_0x5d3050=_0x571d6c['getEndConnectInfo']();this[_0xe92a75(0x246)](_0x10643f,_0x20c796,_0x300fac,_0x571d6c,_0x288b64,_0x5d3050,_0x369832,_0x2827c3,_0x5f465d,_0x56892e);}}};SheetsShapeController=__decorate([__decorateParam(0x0,_univerjs_core['ICommandService']),__decorateParam(0x1,(0x0,_univerjs_core[_0x411c48(0x19c)])(_univerjs_sheets[_0x411c48(0x190)])),__decorateParam(0x2,(0x0,_univerjs_core['Inject'])(_univerjs_sheets['SheetSkeletonService'])),__decorateParam(0x3,(0x0,_univerjs_core[_0x411c48(0x19c)])(SheetsShapeService)),__decorateParam(0x4,(0x0,_univerjs_core['Inject'])(_univerjs_drawing['IDrawingManagerService']))],SheetsShapeController);let UniverSheetsShapePlugin=class UniverSheetsShapePlugin extends _univerjs_core[_0x411c48(0x23c)]{constructor(_0x46b261=defaultPluginConfig,_0x2ae059,_0xa38b8c,_0x540dc2){const _0xb6d24e=_0x411c48;super(),this[_0xb6d24e(0x1e3)]=_0x46b261,this[_0xb6d24e(0x204)]=_0x2ae059,this[_0xb6d24e(0x23e)]=_0xa38b8c,this[_0xb6d24e(0x205)]=_0x540dc2;const {..._0x44e80d}=(0x0,_univerjs_core['merge'])({},defaultPluginConfig,this[_0xb6d24e(0x1e3)]);this['_configService'][_0xb6d24e(0x198)](SHEETS_SHAPE_PLUGIN_CONFIG_KEY,_0x44e80d);}[_0x411c48(0x23f)](){const _0x5cf9c7=_0x411c48,_0x59cea5=this[_0x5cf9c7(0x204)];[[SheetShapeModelManager],[SheetsShapeService],[SheetsShapeController]][_0x5cf9c7(0x1b9)](_0x313436=>_0x59cea5[_0x5cf9c7(0x1d1)](_0x313436)),(0x0,_univerjs_core[_0x5cf9c7(0x241)])(_0x59cea5,[[SheetsShapeService],[SheetsShapeController]]);}};_defineProperty(UniverSheetsShapePlugin,_0x411c48(0x1e6),_univerjs_core['UniverInstanceType'][_0x411c48(0x19a)]),_defineProperty(UniverSheetsShapePlugin,_0x411c48(0x1d2),_0x411c48(0x1c0)),_defineProperty(UniverSheetsShapePlugin,'packageName',name),_defineProperty(UniverSheetsShapePlugin,_0x411c48(0x1ac),version),UniverSheetsShapePlugin=__decorate([(0x0,_univerjs_core[_0x411c48(0x1d6)])(_univerjs_pro_license[_0x411c48(0x1ee)]),__decorateParam(0x1,(0x0,_univerjs_core[_0x411c48(0x19c)])(_univerjs_core[_0x411c48(0x1ed)])),__decorateParam(0x2,_univerjs_core[_0x411c48(0x1cd)]),__decorateParam(0x3,_univerjs_core[_0x411c48(0x220)])],UniverSheetsShapePlugin),exports[_0x411c48(0x226)]=DEFAULT_SHAPE_HEIGHT,exports['DEFAULT_SHAPE_WIDTH']=DEFAULT_SHAPE_WIDTH,exports[_0x411c48(0x1b4)]=InsertShapeCommand,exports['InsertSheetsShapeMutation']=InsertSheetsShapeMutation,exports[_0x411c48(0x201)]=RemoveSheetsShapeMutation,exports[_0x411c48(0x239)]=SetShapeDrawingDataCommand,exports['SetSheetsShapeRotateCommand']=SetSheetsShapeRotateCommand,exports[_0x411c48(0x1f2)]=SetSheetsShapeTextVerticalToggleCommand,Object['defineProperty'](exports,_0x411c48(0x1fd),{'enumerable':!![],'get':function(){return SheetsShapeService;}}),exports[_0x411c48(0x1d5)]=ToggleSheetsShapeFlipCommand,Object['defineProperty'](exports,_0x411c48(0x1c6),{'enumerable':!![],'get':function(){return UniverSheetsShapePlugin;}}),exports[_0x411c48(0x1cf)]=UpdateConnectorRelationCommand,exports[_0x411c48(0x1c8)]=UpdateLineShapeResizeCommand,exports[_0x411c48(0x1cc)]=UpdateSheetsShapeDataMutation,exports[_0x411c48(0x229)]=UpdateSheetsShapeTypeCommand,exports[_0x411c48(0x20f)]=UpdateSheetsShapeTypeMutation;