@univerjs-pro/sheets-shape 0.21.1-insiders.20260429-a0b1161 → 0.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/cjs/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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();}
|
|
1
|
+
function _0x5dce(_0x268913,_0x3dbc12){_0x268913=_0x268913-0xac;const _0x542693=_0x5426();let _0x5dce90=_0x542693[_0x268913];return _0x5dce90;}const _0x50d3b2=_0x5dce;(function(_0x1a1c33,_0x4dc714){const _0x47e22d=_0x5dce,_0x241ae8=_0x1a1c33();while(!![]){try{const _0x564841=-parseInt(_0x47e22d(0x139))/0x1*(-parseInt(_0x47e22d(0x12d))/0x2)+-parseInt(_0x47e22d(0xd8))/0x3+parseInt(_0x47e22d(0x114))/0x4+-parseInt(_0x47e22d(0xea))/0x5+-parseInt(_0x47e22d(0x116))/0x6+-parseInt(_0x47e22d(0xe3))/0x7+-parseInt(_0x47e22d(0x121))/0x8*(-parseInt(_0x47e22d(0xc0))/0x9);if(_0x564841===_0x4dc714)break;else _0x241ae8['push'](_0x241ae8['shift']());}catch(_0x2421b9){_0x241ae8['push'](_0x241ae8['shift']());}}}(_0x5426,0x259bf),Object[_0x50d3b2(0x10b)](exports,Symbol[_0x50d3b2(0x112)],{'value':_0x50d3b2(0xcb)}));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[_0x50d3b2(0x134)]{get['ShapeTypeEnum'](){const _0x423db3=_0x50d3b2;return _univerjs_pro_engine_shape[_0x423db3(0xfc)];}get[_0x50d3b2(0x132)](){return _univerjs_pro_engine_shape['ShapeFillEnum'];}get[_0x50d3b2(0x110)](){const _0x12c239=_0x50d3b2;return _univerjs_pro_engine_shape[_0x12c239(0x110)];}get[_0x50d3b2(0x11e)](){const _0x29dbe0=_0x50d3b2;return _univerjs_pro_engine_shape[_0x29dbe0(0x11e)];}get[_0x50d3b2(0x137)](){const _0x4054a1=_0x50d3b2;return _univerjs_pro_engine_shape[_0x4054a1(0x137)];}get[_0x50d3b2(0xae)](){const _0x29283e=_0x50d3b2;return _univerjs_pro_engine_shape[_0x29283e(0xae)];}get[_0x50d3b2(0x100)](){const _0x4b2e7c=_0x50d3b2;return _univerjs_pro_engine_shape[_0x4b2e7c(0x100)];}get[_0x50d3b2(0x12a)](){const _0x5bb496=_0x50d3b2;return _univerjs_pro_engine_shape[_0x5bb496(0x12a)];}get[_0x50d3b2(0xc8)](){const _0x448e5f=_0x50d3b2;return _univerjs_pro_engine_shape[_0x448e5f(0xc8)];}};function _0x5426(){const _0x18190c=['ShapeLineTypeEnum','lineType','adjustValues','24NbcMnN','_preloadShapeProperties','shape','IDrawingManagerService','newShape','setStartArrowSize','parse','NoFill','setStrokeColor','ShapeArrowTypeEnum','constructor','isLineShape','7894VafFgW','getStartConnectInfo','getShapeType','fillType','string','ShapeFillEnum','index','FEnum','getBasicShapeRotateBound','fill','ShapeLineDashEnum','updateContext','63ONVPrX','connectionSiteIndex','object','shapeId','lineStrokeType','length','sin','ShapeLineCapEnum','setShapeType','DEFAULT_SHAPE_WIDTH','worldRect','getShapeModel','setWidth','_resolveExistingOrFreeEndpoint','InsertShapeCommand','setStrokeOpacity','ConnectorCoordinateTransform','cxnIndex','gradientStops','getUnitId','keys','UpdateConnectorRelationCommand','SetShapeDrawingDataCommand','getDrawingPoints','GradientFill','519723JFBzBz','push','shapeType','height','entries','flipY','color','shapeData','ShapeArrowSizeEnum','relation','convertPositionCellToSheetOverGrid','Module','prototype','getSheetId','setStartArrowType','getShapeData','capType','_commandService','setEndArrowType','colorStops\x20is\x20required\x20and\x20should\x20contain\x20at\x20least\x20one\x20color\x20stop.','FShape','cos','startArrow','setNoneFill','461778VkYeNU','setStrokeLineJoinType','find',',\x20but\x20expected\x20a\x20connector\x20shape\x20type.','\x20not\x20found','drawId','get','ensureSkeleton','function','gradientType','routeConnectorLineShape','464849HQMwum','getSize','getShapeId','symbol','getPosition','call','getConnectionSiteList','1217620GaqOKh','RemoveSheetDrawingCommand','_resolveEndpoints','SheetsShapeService','type','generateRandomId','FConnectorShape','width','ISheetDrawingService','build','DRAWING_SHAPE','DrawingTypeEnum','iterator','unitId','from','localToWorld','executeCommand','Invalid\x20shape\x20type\x20for\x20connector.\x20Received\x20','ShapeTypeEnum','getShapeRelation','top','transform','ShapeLineJoinEnum','subUnitId','endArrow','setShapeSolidFill','Skeleton\x20for\x20unitId\x20','setStrokeLineCapType','getEndConnectInfo','stroke','getConnectorLinePoints','setEndArrowSize','FWorksheet','defineProperty','Shape\x20type\x20is\x20required.\x20Please\x20call\x20setShapeType()\x20before\x20build().','opacity','drawingType','rotation','ShapeGradientTypeEnum','DEFAULT_SHAPE_HEIGHT','toStringTag','getWorkbook','1193432NSBxgX','lineJoinType','614136azVukd','_injector','getDrawingByParam','\x20and\x20subUnitId\x20','isConnectorShape','SheetSkeletonService','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','left'];_0x5426=function(){return _0x18190c;};return _0x5426();}_univerjs_core_facade[_0x50d3b2(0x134)]['extend'](FSheetsShapeEnumMixin);function _typeof(_0x3d2dbc){'@babel/helpers - typeof';const _0x11c888=_0x50d3b2;return _typeof=_0x11c888(0xe0)==typeof Symbol&&_0x11c888(0xe6)==typeof Symbol[_0x11c888(0xf6)]?function(_0x2e86e9){return typeof _0x2e86e9;}:function(_0xd4424e){const _0x222ffa=_0x11c888;return _0xd4424e&&'function'==typeof Symbol&&_0xd4424e[_0x222ffa(0x12b)]===Symbol&&_0xd4424e!==Symbol[_0x222ffa(0xcc)]?_0x222ffa(0xe6):typeof _0xd4424e;},_typeof(_0x3d2dbc);}function toPrimitive(_0x4e9bbe,_0x2b8ae9){const _0x2cce8a=_0x50d3b2;if(_0x2cce8a(0x13b)!=_typeof(_0x4e9bbe)||!_0x4e9bbe)return _0x4e9bbe;var _0x30ba4a=_0x4e9bbe[Symbol['toPrimitive']];if(void 0x0!==_0x30ba4a){var _0x502e64=_0x30ba4a[_0x2cce8a(0xe8)](_0x4e9bbe,_0x2b8ae9||'default');if(_0x2cce8a(0x13b)!=_typeof(_0x502e64))return _0x502e64;throw new TypeError(_0x2cce8a(0x11c));}return('string'===_0x2b8ae9?String:Number)(_0x4e9bbe);}function toPropertyKey(_0x1c11e7){const _0x38783d=_0x50d3b2;var _0x1a3cb6=toPrimitive(_0x1c11e7,_0x38783d(0x131));return'symbol'==_typeof(_0x1a3cb6)?_0x1a3cb6:_0x1a3cb6+'';}function _defineProperty(_0x598c3a,_0x28a1b7,_0x1f579c){const _0x25a1c2=_0x50d3b2;return(_0x28a1b7=toPropertyKey(_0x28a1b7))in _0x598c3a?Object[_0x25a1c2(0x10b)](_0x598c3a,_0x28a1b7,{'value':_0x1f579c,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x598c3a[_0x28a1b7]=_0x1f579c,_0x598c3a;}var FShape=class{constructor(_0x2e094d,_0xdaabd4,_0x173d30,_0x2b119b){const _0x5a1e84=_0x50d3b2;_defineProperty(this,_0x5a1e84(0xf7),void 0x0),_defineProperty(this,_0x5a1e84(0x101),void 0x0),_defineProperty(this,_0x5a1e84(0xdd),void 0x0),_defineProperty(this,'x',0x0),_defineProperty(this,'y',0x0),_defineProperty(this,'width',_univerjs_pro_sheets_shape[_0x5a1e84(0xb0)]),_defineProperty(this,'height',_univerjs_pro_sheets_shape[_0x5a1e84(0x111)]),_defineProperty(this,'shapeType',void 0x0),_defineProperty(this,_0x5a1e84(0xc7),{}),_defineProperty(this,_0x5a1e84(0x117),void 0x0),this[_0x5a1e84(0xf7)]=_0x2e094d,this['subUnitId']=_0xdaabd4,this[_0x5a1e84(0xdd)]=_0x173d30||(0x0,_univerjs_core[_0x5a1e84(0xef)])(),this[_0x5a1e84(0x117)]=_0x2b119b;}['setPosition'](_0x1127f7,_0xb13679,_0x550ebd,_0x42bb55){const _0x552da4=_0x50d3b2,_0x332f4b=this['_injector'][_0x552da4(0xde)](_univerjs_sheets['SheetSkeletonService'])[_0x552da4(0xdf)](this[_0x552da4(0xf7)],this[_0x552da4(0x101)]);if(!_0x332f4b)throw new Error(_0x552da4(0x104)+this[_0x552da4(0xf7)]+_0x552da4(0x119)+this[_0x552da4(0x101)]+_0x552da4(0xdc));const {transform:_0x4fc4c1}=(0x0,_univerjs_sheets[_0x552da4(0xca)])(this['unitId'],this['subUnitId'],{'row':_0x1127f7,'column':_0xb13679,'rowOffset':_0x550ebd,'columnOffset':_0x42bb55},0x1,0x1,_0x332f4b);return this['x']=_0x4fc4c1[_0x552da4(0x11d)],this['y']=_0x4fc4c1[_0x552da4(0xfe)],this;}['setAbsolutePosition'](_0x36048a,_0x4901b6){return this['x']=_0x36048a,this['y']=_0x4901b6,this;}[_0x50d3b2(0xaf)](_0x1727c6){const _0x280b68=_0x50d3b2;return this[_0x280b68(0xc2)]=_0x1727c6,this;}[_0x50d3b2(0x103)](_0x551665,_0x57cf65){const _0x355662=_0x50d3b2;if(!this[_0x355662(0xc7)][_0x355662(0x136)])this[_0x355662(0xc7)]['fill']={};this[_0x355662(0xc7)][_0x355662(0x136)]['fillType']=_univerjs_pro_engine_shape[_0x355662(0x132)]['SolidFill'];if(_0x551665!==void 0x0)this['shapeData']['fill']['color']=_0x551665;if(_0x57cf65!==void 0x0)this[_0x355662(0xc7)][_0x355662(0x136)][_0x355662(0x10d)]=_0x57cf65;return this;}['setShapeGradientFill'](_0x337459,_0x42fa31,_0x2821a8){const _0x4a622c=_0x50d3b2;if(_0x42fa31===void 0x0||_0x42fa31[_0x4a622c(0xac)]===0x0)throw new Error(_0x4a622c(0xd3));if(!this[_0x4a622c(0xc7)][_0x4a622c(0x136)])this[_0x4a622c(0xc7)]['fill']={};this[_0x4a622c(0xc7)][_0x4a622c(0x136)][_0x4a622c(0xb9)]=_0x42fa31,this[_0x4a622c(0xc7)][_0x4a622c(0x136)][_0x4a622c(0x130)]=_univerjs_pro_engine_shape[_0x4a622c(0x132)][_0x4a622c(0xbf)],this['shapeData'][_0x4a622c(0x136)][_0x4a622c(0xe1)]=_0x337459;if(_0x2821a8!==void 0x0)this['shapeData'][_0x4a622c(0x136)]['gradientAngle']=_0x2821a8;return this;}[_0x50d3b2(0xd7)](){const _0x2212ba=_0x50d3b2;return this['shapeData'][_0x2212ba(0x136)]={'fillType':_univerjs_pro_engine_shape['ShapeFillEnum'][_0x2212ba(0x128)]},this;}[_0x50d3b2(0x129)](_0x1570de){const _0x56ded9=_0x50d3b2;if(!this[_0x56ded9(0xc7)][_0x56ded9(0x107)])this['shapeData'][_0x56ded9(0x107)]={};return this[_0x56ded9(0xc7)][_0x56ded9(0x107)][_0x56ded9(0xc6)]=_0x1570de,this;}['setStrokeWidth'](_0x5d8ad4){const _0x2c08a2=_0x50d3b2;if(!this[_0x2c08a2(0xc7)][_0x2c08a2(0x107)])this[_0x2c08a2(0xc7)]['stroke']={};return this['shapeData'][_0x2c08a2(0x107)][_0x2c08a2(0xf1)]=_0x5d8ad4,this;}['setStrokeLineDashType'](_0x3798ce){const _0x36e35b=_0x50d3b2;if(!this[_0x36e35b(0xc7)]['stroke'])this[_0x36e35b(0xc7)][_0x36e35b(0x107)]={};return this[_0x36e35b(0xc7)][_0x36e35b(0x107)]['dashType']=_0x3798ce,this;}[_0x50d3b2(0xd9)](_0x17294f){const _0x57f75b=_0x50d3b2;if(!this[_0x57f75b(0xc7)][_0x57f75b(0x107)])this[_0x57f75b(0xc7)][_0x57f75b(0x107)]={};return this[_0x57f75b(0xc7)][_0x57f75b(0x107)][_0x57f75b(0x115)]=_0x17294f,this;}[_0x50d3b2(0x105)](_0x44def4){const _0x28c5f1=_0x50d3b2;if(!this[_0x28c5f1(0xc7)][_0x28c5f1(0x107)])this[_0x28c5f1(0xc7)]['stroke']={};return this[_0x28c5f1(0xc7)][_0x28c5f1(0x107)][_0x28c5f1(0xd0)]=_0x44def4,this;}[_0x50d3b2(0xb6)](_0x570f89){const _0x52d55b=_0x50d3b2;if(!this[_0x52d55b(0xc7)][_0x52d55b(0x107)])this[_0x52d55b(0xc7)]['stroke']={};return this['shapeData']['stroke']['opacity']=_0x570f89,this;}['setStrokeLineType'](_0x4f02e8){const _0x183f98=_0x50d3b2;if(!this[_0x183f98(0xc7)][_0x183f98(0x107)])this['shapeData']['stroke']={};return this['shapeData'][_0x183f98(0x107)][_0x183f98(0x13d)]=_0x4f02e8,this;}[_0x50d3b2(0xb3)](_0x254822){const _0x21275a=_0x50d3b2;return this[_0x21275a(0xf1)]=_0x254822,this;}['setHeight'](_0x457905){return this['height']=_0x457905,this;}[_0x50d3b2(0x12c)](){const _0x1a3f21=_0x50d3b2,_0x3e7f7d=this['_injector'][_0x1a3f21(0xde)](_univerjs_pro_sheets_shape['SheetsShapeService'])[_0x1a3f21(0xb2)](this[_0x1a3f21(0xf7)],this[_0x1a3f21(0x101)],this['drawId']);if(_0x3e7f7d)return(0x0,_univerjs_pro_engine_shape['isConnectorShape'])(_0x3e7f7d[_0x1a3f21(0x12f)]());if(this[_0x1a3f21(0xc2)])return(0x0,_univerjs_pro_engine_shape['isConnectorShape'])(this['shapeType']);return![];}['getConnectionSites'](){const _0x262f9a=_0x50d3b2,_0x245074=this['_injector'][_0x262f9a(0xde)](_univerjs_pro_sheets_shape['SheetsShapeService'])[_0x262f9a(0xb2)](this[_0x262f9a(0xf7)],this['subUnitId'],this['drawId']);if(!_0x245074)return[];const _0x24445b=this[_0x262f9a(0x117)]['get'](_univerjs_drawing[_0x262f9a(0x124)])[_0x262f9a(0x118)]({'unitId':this['unitId'],'subUnitId':this[_0x262f9a(0x101)],'drawingId':this[_0x262f9a(0xdd)]});if(!(_0x24445b===null||_0x24445b===void 0x0?void 0x0:_0x24445b[_0x262f9a(0xff)]))return[];const {width:width=0x0,height:height=0x0}=_0x24445b[_0x262f9a(0xff)];return _0x245074['updateContext']({'width':width,'height':height}),_0x245074[_0x262f9a(0xe9)]();}['getAdjustPoints'](){const _0x9ea6d5=_0x50d3b2,_0x3ddc8a=this['_injector']['get'](_univerjs_pro_sheets_shape['SheetsShapeService'])['getShapeModel'](this[_0x9ea6d5(0xf7)],this['subUnitId'],this['drawId']);if(!_0x3ddc8a)return[];const _0x5c64ba=this['_injector'][_0x9ea6d5(0xde)](_univerjs_drawing[_0x9ea6d5(0x124)])[_0x9ea6d5(0x118)]({'unitId':this['unitId'],'subUnitId':this[_0x9ea6d5(0x101)],'drawingId':this[_0x9ea6d5(0xdd)]});if(!(_0x5c64ba===null||_0x5c64ba===void 0x0?void 0x0:_0x5c64ba[_0x9ea6d5(0xff)]))return[];const {width:width=0x0,height:height=0x0}=_0x5c64ba[_0x9ea6d5(0xff)];return _0x3ddc8a[_0x9ea6d5(0x138)]({'width':width,'height':height}),_0x3ddc8a[_0x9ea6d5(0xbe)]();}[_0x50d3b2(0x108)](){const _0x4193a6=_0x50d3b2,_0x2b2f02=this[_0x4193a6(0x117)]['get'](_univerjs_pro_sheets_shape[_0x4193a6(0xed)])[_0x4193a6(0xb2)](this['unitId'],this[_0x4193a6(0x101)],this[_0x4193a6(0xdd)]);if(!_0x2b2f02)return[];if(!(0x0,_univerjs_pro_engine_shape[_0x4193a6(0x11a)])(_0x2b2f02[_0x4193a6(0x12f)]()))return[];const _0x1668ba=this[_0x4193a6(0x117)][_0x4193a6(0xde)](_univerjs_drawing['IDrawingManagerService'])[_0x4193a6(0x118)]({'unitId':this[_0x4193a6(0xf7)],'subUnitId':this[_0x4193a6(0x101)],'drawingId':this['drawId']});if(!(_0x1668ba===null||_0x1668ba===void 0x0?void 0x0:_0x1668ba[_0x4193a6(0xff)]))return[];const {width:width=0x0,height:height=0x0}=_0x1668ba[_0x4193a6(0xff)];return _0x2b2f02[_0x4193a6(0x138)]({'width':width,'height':height}),_0x2b2f02[_0x4193a6(0x108)]();}[_0x50d3b2(0x12e)](){const _0x18f3a1=_0x50d3b2;var _0x335188;const _0x103d7a=this['_injector'][_0x18f3a1(0xde)](_univerjs_pro_sheets_shape[_0x18f3a1(0xed)])[_0x18f3a1(0xb2)](this[_0x18f3a1(0xf7)],this['subUnitId'],this['drawId']);if(!_0x103d7a)return null;return(_0x335188=_0x103d7a[_0x18f3a1(0x12e)]())!==null&&_0x335188!==void 0x0?_0x335188:null;}[_0x50d3b2(0x106)](){const _0xf6cc08=_0x50d3b2;var _0x5f0acf;const _0x44a89b=this['_injector'][_0xf6cc08(0xde)](_univerjs_pro_sheets_shape[_0xf6cc08(0xed)])[_0xf6cc08(0xb2)](this['unitId'],this[_0xf6cc08(0x101)],this[_0xf6cc08(0xdd)]);if(!_0x44a89b)return null;return(_0x5f0acf=_0x44a89b[_0xf6cc08(0x106)]())!==null&&_0x5f0acf!==void 0x0?_0x5f0acf:null;}[_0x50d3b2(0xf3)](){const _0x343e06=_0x50d3b2;var _0x2d679b,_0x1a6e16;if(!this[_0x343e06(0xc2)])throw new Error(_0x343e06(0x10c));if(this['x']===0x0||this['y']===0x0){const _0x3e9552=this[_0x343e06(0x117)][_0x343e06(0xde)](_univerjs_sheets[_0x343e06(0x11b)])['ensureSkeleton'](this[_0x343e06(0xf7)],this[_0x343e06(0x101)]);if(!_0x3e9552)throw new Error(_0x343e06(0x104)+this[_0x343e06(0xf7)]+'\x20and\x20subUnitId\x20'+this[_0x343e06(0x101)]+_0x343e06(0xdc));const {transform:_0x1baeab}=(0x0,_univerjs_sheets[_0x343e06(0xca)])(this[_0x343e06(0xf7)],this[_0x343e06(0x101)],{'row':0x1,'column':0x1,'rowOffset':0x0,'columnOffset':0x0},0x1,0x1,_0x3e9552);this['x']=this['x']>0x0?this['x']:_0x1baeab['left'],this['y']=this['y']>0x0?this['y']:_0x1baeab[_0x343e06(0xfe)];}return this[_0x343e06(0xf1)]=(_0x2d679b=this['width'])!==null&&_0x2d679b!==void 0x0?_0x2d679b:_univerjs_pro_sheets_shape[_0x343e06(0xb0)],this['height']=(_0x1a6e16=this[_0x343e06(0xc3)])!==null&&_0x1a6e16!==void 0x0?_0x1a6e16:_univerjs_pro_sheets_shape['DEFAULT_SHAPE_HEIGHT'],{'unitId':this[_0x343e06(0xf7)],'subUnitId':this[_0x343e06(0x101)],'shapeId':this[_0x343e06(0xdd)],'shapeType':this[_0x343e06(0xc2)],'shapeData':Object[_0x343e06(0xbb)](this[_0x343e06(0xc7)])[_0x343e06(0xac)]>0x0?this['shapeData']:void 0x0,'x':this['x'],'y':this['y'],'width':this['width'],'height':this[_0x343e06(0xc3)]};}[_0x50d3b2(0xe5)](){const _0x13336a=_0x50d3b2;return this[_0x13336a(0xdd)];}[_0x50d3b2(0x12f)](){const _0x2b199d=_0x50d3b2;return this[_0x2b199d(0xc2)];}[_0x50d3b2(0xcf)](){return this['shapeData'];}[_0x50d3b2(0xe7)](){return{'x':this['x'],'y':this['y']};}[_0x50d3b2(0xe4)](){const _0x4db91c=_0x50d3b2;return{'width':this[_0x4db91c(0xf1)],'height':this[_0x4db91c(0xc3)]};}},FConnectorShape=class extends FShape{constructor(_0x4549e7,_0x62a85d,_0x212246,_0x14ff2e){super(_0x4549e7,_0x62a85d,_0x212246,_0x14ff2e),_defineProperty(this,'shapeData',{});}[_0x50d3b2(0xaf)](_0x4f7218){const _0x153830=_0x50d3b2;if(!(0x0,_univerjs_pro_engine_shape[_0x153830(0x11a)])(_0x4f7218))throw new Error(_0x153830(0xfb)+_0x4f7218+_0x153830(0xdb));return super['setShapeType'](_0x4f7218),this;}[_0x50d3b2(0xce)](_0x4665c7){const _0x55ab8a=_0x50d3b2;var _0x488810,_0x282eac;if(!((_0x488810=this[_0x55ab8a(0xc7)])===null||_0x488810===void 0x0?void 0x0:_0x488810['ln']))this[_0x55ab8a(0xc7)]['ln']={};if(!((_0x282eac=this['shapeData'])===null||_0x282eac===void 0x0||(_0x282eac=_0x282eac['ln'])===null||_0x282eac===void 0x0?void 0x0:_0x282eac['startArrow']))this[_0x55ab8a(0xc7)]['ln'][_0x55ab8a(0xd6)]={};return this[_0x55ab8a(0xc7)]['ln']['startArrow'][_0x55ab8a(0xee)]=_0x4665c7,this;}[_0x50d3b2(0xd2)](_0xc1aaa2){const _0x384ea2=_0x50d3b2;var _0x4820c1,_0x42cbff;if(!((_0x4820c1=this[_0x384ea2(0xc7)])===null||_0x4820c1===void 0x0?void 0x0:_0x4820c1['ln']))this[_0x384ea2(0xc7)]['ln']={};if(!((_0x42cbff=this[_0x384ea2(0xc7)])===null||_0x42cbff===void 0x0||(_0x42cbff=_0x42cbff['ln'])===null||_0x42cbff===void 0x0?void 0x0:_0x42cbff[_0x384ea2(0x102)]))this[_0x384ea2(0xc7)]['ln'][_0x384ea2(0x102)]={};return this[_0x384ea2(0xc7)]['ln'][_0x384ea2(0x102)][_0x384ea2(0xee)]=_0xc1aaa2,this;}[_0x50d3b2(0x126)](_0x14fdb3){const _0x46e65e=_0x50d3b2;var _0x2e60e3,_0x369a01;if(!((_0x2e60e3=this['shapeData'])===null||_0x2e60e3===void 0x0?void 0x0:_0x2e60e3['ln']))this[_0x46e65e(0xc7)]['ln']={};if(!((_0x369a01=this[_0x46e65e(0xc7)])===null||_0x369a01===void 0x0||(_0x369a01=_0x369a01['ln'])===null||_0x369a01===void 0x0?void 0x0:_0x369a01['startArrow']))this[_0x46e65e(0xc7)]['ln'][_0x46e65e(0xd6)]={};return this[_0x46e65e(0xc7)]['ln'][_0x46e65e(0xd6)]['size']=_0x14fdb3,this;}[_0x50d3b2(0x109)](_0xeea96e){const _0x4cc9f9=_0x50d3b2;var _0xe4a0fb,_0x4c547d;if(!((_0xe4a0fb=this[_0x4cc9f9(0xc7)])===null||_0xe4a0fb===void 0x0?void 0x0:_0xe4a0fb['ln']))this['shapeData']['ln']={};if(!((_0x4c547d=this['shapeData'])===null||_0x4c547d===void 0x0||(_0x4c547d=_0x4c547d['ln'])===null||_0x4c547d===void 0x0?void 0x0:_0x4c547d[_0x4cc9f9(0x102)]))this[_0x4cc9f9(0xc7)]['ln'][_0x4cc9f9(0x102)]={};return this[_0x4cc9f9(0xc7)]['ln'][_0x4cc9f9(0x102)]['size']=_0xeea96e,this;}[_0x50d3b2(0xf3)](){return super['build']();}['getEndConnectInfo'](){const _0x2d0368=_0x50d3b2;var _0x3510b5;return((_0x3510b5=this[_0x2d0368(0xc7)])===null||_0x3510b5===void 0x0||(_0x3510b5=_0x3510b5[_0x2d0368(0xc9)])===null||_0x3510b5===void 0x0?void 0x0:_0x3510b5['to'])||null;}[_0x50d3b2(0x12e)](){const _0x1c2969=_0x50d3b2;var _0x21b3f2;return((_0x21b3f2=this[_0x1c2969(0xc7)])===null||_0x21b3f2===void 0x0||(_0x21b3f2=_0x21b3f2[_0x1c2969(0xc9)])===null||_0x21b3f2===void 0x0?void 0x0:_0x21b3f2['from'])||null;}};function computeConnectionPointInfo(_0x35fa70,_0x26c5a6,_0x585a6f,_0x3d4849,_0xebea6b,_0x1b5560){const _0x4ecced=_0x50d3b2,_0x221dcb=_0xebea6b[_0x4ecced(0xb2)](_0x35fa70,_0x26c5a6,_0x585a6f);if(!_0x221dcb)return null;const _0x47d147=_0x1b5560['getDrawingByParam']({'unitId':_0x35fa70,'subUnitId':_0x26c5a6,'drawingId':_0x585a6f});if(!(_0x47d147===null||_0x47d147===void 0x0?void 0x0:_0x47d147[_0x4ecced(0xff)]))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x269de5}=_0x47d147[_0x4ecced(0xff)];_0x221dcb[_0x4ecced(0x138)]({'width':width,'height':height});const _0x1a4594=_0x221dcb[_0x4ecced(0xe9)]()[_0x4ecced(0xda)](_0x56dfd1=>_0x56dfd1[_0x4ecced(0x133)]===_0x3d4849);if(!_0x1a4594)return null;let _0x3fcebf=flipX?width-_0x1a4594['x']:_0x1a4594['x'],_0x4ba150=flipY?height-_0x1a4594['y']:_0x1a4594['y'];if(_0x269de5&&_0x269de5!==0x0){const _0x24e2be=_0x269de5*Math['PI']/0xb4,_0x1fad7e=Math[_0x4ecced(0xd5)](_0x24e2be),_0x2c06b9=Math[_0x4ecced(0xad)](_0x24e2be),_0x5e8562=width/0x2,_0x2cf8b5=height/0x2,_0x480980=_0x3fcebf-_0x5e8562,_0x4ae961=_0x4ba150-_0x2cf8b5;_0x3fcebf=_0x5e8562+_0x480980*_0x1fad7e-_0x4ae961*_0x2c06b9,_0x4ba150=_0x2cf8b5+_0x480980*_0x2c06b9+_0x4ae961*_0x1fad7e;}_0x3fcebf+=left,_0x4ba150+=top;let _0x58eb0d=_0x1a4594['ang']/0xea60;if(flipX)_0x58eb0d=0xb4-_0x58eb0d;if(flipY)_0x58eb0d=-_0x58eb0d;_0x58eb0d+=_0x269de5||0x0,_0x58eb0d=(_0x58eb0d%0x168+0x168)%0x168;const _0xb03560=(0x0,_univerjs_pro_engine_shape[_0x4ecced(0x135)])({'left':left,'top':top,'width':width,'height':height},_0x269de5||0x0);return{'point':{'x':_0x3fcebf,'y':_0x4ba150},'angle':_0x58eb0d,'bounds':_0xb03560};}function calculateFreeEndpointAngle(_0x32acd6,_0x892ccc){const _0x5d035d=_0x892ccc['x']-_0x32acd6['x'],_0x3e0d77=_0x892ccc['y']-_0x32acd6['y'];if(Math['abs'](_0x5d035d)>=Math['abs'](_0x3e0d77))return _0x5d035d>=0x0?0xb4:0x0;return _0x3e0d77>=0x0?0x10e:0x5a;}function computeFreeEndpointInfo(_0x400cd4,_0x34c7be,_0x32131c,_0x4937fb,_0x45aa42,_0x3cbe31,_0x184eaf){const _0x2bfa6b=_0x50d3b2,_0x427311=_0x3cbe31[_0x2bfa6b(0xb2)](_0x400cd4,_0x34c7be,_0x32131c);if(!_0x427311)return null;const _0x28c1cd=_0x184eaf[_0x2bfa6b(0x118)]({'unitId':_0x400cd4,'subUnitId':_0x34c7be,'drawingId':_0x32131c});if(!(_0x28c1cd===null||_0x28c1cd===void 0x0?void 0x0:_0x28c1cd[_0x2bfa6b(0xff)]))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![]}=_0x28c1cd[_0x2bfa6b(0xff)];_0x427311[_0x2bfa6b(0x138)]({'width':width,'height':height});const _0xa1550e=_0x427311[_0x2bfa6b(0x108)]();if(_0xa1550e[_0x2bfa6b(0xac)]<0x2)return null;const _0x29f9f1=_0x4937fb?_0xa1550e[0x0]:_0xa1550e[_0xa1550e['length']-0x1],_0x262e5b=new _univerjs_pro_engine_shape[(_0x2bfa6b(0xb7))]({'left':left,'top':top,'width':width,'height':height,'flipX':flipX,'flipY':flipY})[_0x2bfa6b(0xf9)](_0x29f9f1);return{'point':_0x262e5b,'angle':calculateFreeEndpointAngle(_0x45aa42['point'],_0x262e5b),'bounds':{'left':_0x262e5b['x'],'top':_0x262e5b['y'],'width':0x0,'height':0x0}};}var FWorksheetShapeMixin=class extends _univerjs_sheets_facade[_0x50d3b2(0x10a)]{async['insertShape'](_0xeaec9c){const _0x1feabc=_0x50d3b2,{unitId:_0x37b77e,subUnitId:_0x29b46e,shapeId:_0x164849,shapeType:_0x7a74bd,shapeData:_0x5eb9e4,x:_0x205926,y:_0x5d1a49,width:_0x36f445,height:_0x32bebf}=_0xeaec9c;return this['_commandService'][_0x1feabc(0xfa)](_univerjs_pro_sheets_shape[_0x1feabc(0xb5)]['id'],{'unitId':_0x37b77e,'subUnitId':_0x29b46e,'shapeId':_0x164849,'shapeType':_0x7a74bd,'shapeData':_0x5eb9e4,'position':{'x':_0x205926,'y':_0x5d1a49},'width':_0x36f445,'height':_0x32bebf});}async['updateShape'](_0xf9db04){const _0x4f60aa=_0x50d3b2,{unitId:_0x41f834,subUnitId:_0x17898b,shapeId:_0x53df1f,shapeType:_0x12b268,shapeData:_0x3f3309,x:_0x1bd4b5,y:_0x3c4634,width:_0x1feeb6,height:_0x55fcab}=_0xf9db04;return this[_0x4f60aa(0xd1)][_0x4f60aa(0xfa)](_univerjs_pro_sheets_shape[_0x4f60aa(0xbd)]['id'],{'unitId':_0x41f834,'subUnitId':_0x17898b,'shapeId':_0x53df1f,'shapeType':_0x12b268,'shapeData':_0x3f3309,'position':{'x':_0x1bd4b5,'y':_0x3c4634},'width':_0x1feeb6,'height':_0x55fcab});}[_0x50d3b2(0x125)](_0x4e43b4){const _0x4d7d17=_0x50d3b2,_0x121a2c=this[_0x4d7d17(0x113)]()[_0x4d7d17(0xba)](),_0x354b21=this[_0x4d7d17(0xcd)]();if(_0x4e43b4){const _0x65e269=new FShape(_0x121a2c,_0x354b21,_0x4e43b4['drawId'],this['_injector']);return this['_preloadShapeProperties'](_0x65e269,_0x121a2c,_0x354b21,_0x4e43b4['drawId']),_0x65e269;}return new FShape(_0x121a2c,_0x354b21,(0x0,_univerjs_core[_0x4d7d17(0xef)])(),this['_injector']);}['newConnector'](_0x21f796){const _0x47aa58=_0x50d3b2,_0x44f2e2=this[_0x47aa58(0x113)]()[_0x47aa58(0xba)](),_0x1093f1=this[_0x47aa58(0xcd)]();if(_0x21f796){const _0x4daca2=new FConnectorShape(_0x44f2e2,_0x1093f1,_0x21f796[_0x47aa58(0xdd)],this[_0x47aa58(0x117)]);return this[_0x47aa58(0x122)](_0x4daca2,_0x44f2e2,_0x1093f1,_0x21f796[_0x47aa58(0xdd)]),_0x4daca2;}return new FConnectorShape(_0x44f2e2,_0x1093f1,(0x0,_univerjs_core['generateRandomId'])(),this[_0x47aa58(0x117)]);}['getShapes'](){const _0x4db511=_0x50d3b2,_0x2bdfe6=this[_0x4db511(0x117)][_0x4db511(0xde)](_univerjs_sheets_drawing[_0x4db511(0xf2)]),_0x3a61e2=this[_0x4db511(0x113)]()['getUnitId'](),_0x523108=this['getSheetId'](),_0x473eb8=_0x2bdfe6['getDrawingData'](_0x3a61e2,_0x523108);if(!_0x473eb8)return[];const _0x3bf277=[];for(const [_0x1cd2cd,_0x33c1fb]of Object[_0x4db511(0xc4)](_0x473eb8))if(_0x33c1fb&&_0x33c1fb[_0x4db511(0x10e)]===_univerjs_core[_0x4db511(0xf5)][_0x4db511(0xf4)]){const _0x4ab641=new FShape(_0x3a61e2,_0x523108,_0x1cd2cd,this[_0x4db511(0x117)]);this[_0x4db511(0x122)](_0x4ab641,_0x3a61e2,_0x523108,_0x1cd2cd),_0x3bf277[_0x4db511(0xc1)](_0x4ab641);}return _0x3bf277;}['removeShape'](_0x34ffa9){const _0x5e6b6d=_0x50d3b2,{unitId:_0x152a33,subUnitId:_0x25800e,drawId:_0x322ede}=_0x34ffa9;return this[_0x5e6b6d(0xd1)][_0x5e6b6d(0xfa)](_univerjs_sheets_drawing[_0x5e6b6d(0xeb)]['id'],{'unitId':_0x152a33,'drawings':[{'unitId':_0x152a33,'subUnitId':_0x25800e,'drawingId':_0x322ede,'drawingType':_univerjs_core[_0x5e6b6d(0xf5)]['DRAWING_SHAPE']}]});}async['connectShapes'](_0x29c4e7){const _0x27f91d=_0x50d3b2,{connector:_0x1b70e7,startTarget:_0x479df6,endTarget:_0xbbe03f}=_0x29c4e7;if(!_0x479df6&&!_0xbbe03f)return![];const _0xad3d7e=this[_0x27f91d(0x113)]()[_0x27f91d(0xba)](),_0x389303=this[_0x27f91d(0xcd)](),_0xc4c8df=this[_0x27f91d(0x117)][_0x27f91d(0xde)](_univerjs_pro_sheets_shape['SheetsShapeService']),_0x31eb4d=this[_0x27f91d(0x117)][_0x27f91d(0xde)](_univerjs_drawing[_0x27f91d(0x124)]),_0x1e94c9=_0xc4c8df[_0x27f91d(0xb2)](_0xad3d7e,_0x389303,_0x1b70e7[_0x27f91d(0xdd)]);if(!_0x1e94c9)return![];const _0x2410d1=_0x1e94c9['getShapeType'](),_0x1c75c0=_0x1e94c9[_0x27f91d(0xfd)](),_0x458ef8={};for(const _0x4259a7 of _0x1e94c9['getAdjustNames']()){const _0x392ce9=_0x1e94c9['getAdjustValueByName'](_0x4259a7);if(_0x392ce9!==void 0x0)_0x458ef8[_0x4259a7]=_0x392ce9;}const {startInfo:_0x43424d,endInfo:_0x359489}=this[_0x27f91d(0xec)](_0xad3d7e,_0x389303,_0x1b70e7,_0x1e94c9,_0x479df6,_0xbbe03f,_0xc4c8df,_0x31eb4d,_0x1c75c0);if(!_0x43424d||!_0x359489)return![];const _0x37d69c=(0x0,_univerjs_pro_engine_shape['computeConnectorRouteLayout'])((0x0,_univerjs_pro_engine_shape[_0x27f91d(0xe2)])(_0x43424d,_0x359489,_0x2410d1),_0x2410d1),_0x83c7ff={};if(_0x479df6)_0x83c7ff[_0x27f91d(0xf8)]={'shapeId':_0x479df6[_0x27f91d(0x123)][_0x27f91d(0xdd)],'cxnIndex':_0x479df6[_0x27f91d(0x13a)]};else{if(_0x1c75c0===null||_0x1c75c0===void 0x0?void 0x0:_0x1c75c0['from'])_0x83c7ff[_0x27f91d(0xf8)]=_0x1c75c0[_0x27f91d(0xf8)];}if(_0xbbe03f)_0x83c7ff['to']={'shapeId':_0xbbe03f[_0x27f91d(0x123)]['drawId'],'cxnIndex':_0xbbe03f[_0x27f91d(0x13a)]};else{if(_0x1c75c0===null||_0x1c75c0===void 0x0?void 0x0:_0x1c75c0['to'])_0x83c7ff['to']=_0x1c75c0['to'];}return this[_0x27f91d(0xd1)][_0x27f91d(0xfa)](_univerjs_pro_sheets_shape[_0x27f91d(0xbc)]['id'],{'unitId':_0xad3d7e,'subUnitId':_0x389303,'connectorShapeId':_0x1b70e7[_0x27f91d(0xdd)],'width':_0x37d69c['worldRect'][_0x27f91d(0xf1)],'height':_0x37d69c[_0x27f91d(0xb1)][_0x27f91d(0xc3)],'left':_0x37d69c[_0x27f91d(0xb1)]['left'],'top':_0x37d69c[_0x27f91d(0xb1)][_0x27f91d(0xfe)],'flipX':_0x37d69c['worldRect']['flipX']||![],'flipY':_0x37d69c[_0x27f91d(0xb1)][_0x27f91d(0xc5)]||![],'oldAdjustValues':_0x458ef8,'newAdjustValues':_0x37d69c[_0x27f91d(0x120)],'newLineType':_0x37d69c[_0x27f91d(0x11f)],'oldLineType':_0x2410d1,'rotation':_0x37d69c[_0x27f91d(0x10f)],'oldRelation':_0x1c75c0,'newRelation':_0x83c7ff});}['_preloadShapeProperties'](_0x516e81,_0xba3682,_0x378166,_0x3dc6fe){const _0x3bf36d=_0x50d3b2,_0x593681=this[_0x3bf36d(0x117)][_0x3bf36d(0xde)](_univerjs_drawing[_0x3bf36d(0x124)])[_0x3bf36d(0x118)]({'unitId':_0xba3682,'subUnitId':_0x378166,'drawingId':_0x3dc6fe});if(_0x593681===null||_0x593681===void 0x0?void 0x0:_0x593681[_0x3bf36d(0xff)]){var _0x2b6d25,_0x41bf74,_0x5b5e3b,_0x28ea50;_0x516e81['x']=(_0x2b6d25=_0x593681[_0x3bf36d(0xff)][_0x3bf36d(0x11d)])!==null&&_0x2b6d25!==void 0x0?_0x2b6d25:0x0,_0x516e81['y']=(_0x41bf74=_0x593681[_0x3bf36d(0xff)][_0x3bf36d(0xfe)])!==null&&_0x41bf74!==void 0x0?_0x41bf74:0x0,_0x516e81['width']=(_0x5b5e3b=_0x593681['transform']['width'])!==null&&_0x5b5e3b!==void 0x0?_0x5b5e3b:_0x516e81['width'],_0x516e81[_0x3bf36d(0xc3)]=(_0x28ea50=_0x593681[_0x3bf36d(0xff)][_0x3bf36d(0xc3)])!==null&&_0x28ea50!==void 0x0?_0x28ea50:_0x516e81['height'];}const _0x534614=this[_0x3bf36d(0x117)]['get'](_univerjs_pro_sheets_shape[_0x3bf36d(0xed)])[_0x3bf36d(0xb2)](_0xba3682,_0x378166,_0x3dc6fe);if(_0x534614){_0x516e81[_0x3bf36d(0xc2)]=_0x534614[_0x3bf36d(0x12f)]();const _0x4beda4=_0x534614['getShapeData']();if(_0x4beda4)_0x516e81[_0x3bf36d(0xc7)]=JSON[_0x3bf36d(0x127)](JSON['stringify'](_0x4beda4));}}[_0x50d3b2(0xec)](_0x13ad77,_0x5ec7bb,_0x4f7c02,_0x51ff77,_0x3b6fe6,_0x428deb,_0x198188,_0x37b7ed,_0x2bfd6f){const _0x3579b0=_0x50d3b2;let _0x239f96=null,_0x125465=null;if(_0x3b6fe6)_0x239f96=computeConnectionPointInfo(_0x13ad77,_0x5ec7bb,_0x3b6fe6[_0x3579b0(0x123)][_0x3579b0(0xdd)],_0x3b6fe6[_0x3579b0(0x13a)],_0x198188,_0x37b7ed);if(_0x428deb)_0x125465=computeConnectionPointInfo(_0x13ad77,_0x5ec7bb,_0x428deb[_0x3579b0(0x123)][_0x3579b0(0xdd)],_0x428deb[_0x3579b0(0x13a)],_0x198188,_0x37b7ed);if(!_0x239f96)_0x239f96=this[_0x3579b0(0xb4)](_0x13ad77,_0x5ec7bb,_0x4f7c02['drawId'],!![],_0x125465,_0x2bfd6f===null||_0x2bfd6f===void 0x0?void 0x0:_0x2bfd6f[_0x3579b0(0xf8)],_0x198188,_0x37b7ed);if(!_0x125465)_0x125465=this[_0x3579b0(0xb4)](_0x13ad77,_0x5ec7bb,_0x4f7c02[_0x3579b0(0xdd)],![],_0x239f96,_0x2bfd6f===null||_0x2bfd6f===void 0x0?void 0x0:_0x2bfd6f['to'],_0x198188,_0x37b7ed);return{'startInfo':_0x239f96,'endInfo':_0x125465};}[_0x50d3b2(0xb4)](_0x2d37f9,_0x439542,_0x1ca519,_0x46e70b,_0x151542,_0x4a96b5,_0x208aef,_0xa7f902){const _0x1122e3=_0x50d3b2;if(_0x4a96b5){const _0x4269cd=computeConnectionPointInfo(_0x2d37f9,_0x439542,_0x4a96b5[_0x1122e3(0x13c)],_0x4a96b5[_0x1122e3(0xb8)],_0x208aef,_0xa7f902);if(_0x4269cd)return _0x4269cd;}if(!_0x151542)return null;return computeFreeEndpointInfo(_0x2d37f9,_0x439542,_0x1ca519,_0x46e70b,_0x151542,_0x208aef,_0xa7f902);}};_univerjs_sheets_facade[_0x50d3b2(0x10a)]['extend'](FWorksheetShapeMixin),exports[_0x50d3b2(0xf0)]=FConnectorShape,exports[_0x50d3b2(0xd4)]=FShape;
|
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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;
|
|
1
|
+
const _0x2a18d5=_0x1514;(function(_0x54a8fb,_0x15715d){const _0x47a26f=_0x1514,_0x55a548=_0x54a8fb();while(!![]){try{const _0x149a63=parseInt(_0x47a26f(0x169))/0x1+parseInt(_0x47a26f(0x176))/0x2*(-parseInt(_0x47a26f(0xdc))/0x3)+-parseInt(_0x47a26f(0x15e))/0x4+-parseInt(_0x47a26f(0x17a))/0x5*(-parseInt(_0x47a26f(0x10b))/0x6)+parseInt(_0x47a26f(0x11b))/0x7+parseInt(_0x47a26f(0x158))/0x8+parseInt(_0x47a26f(0xf8))/0x9*(-parseInt(_0x47a26f(0xc8))/0xa);if(_0x149a63===_0x15715d)break;else _0x55a548['push'](_0x55a548['shift']());}catch(_0x154d01){_0x55a548['push'](_0x55a548['shift']());}}}(_0x50b6,0x61be1),Object[_0x2a18d5(0x14c)](exports,Symbol[_0x2a18d5(0x152)],{'value':_0x2a18d5(0xe6)}));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(_0xa469a8){'@babel/helpers - typeof';const _0xdfe174=_0x2a18d5;return _typeof=_0xdfe174(0x189)==typeof Symbol&&_0xdfe174(0x157)==typeof Symbol[_0xdfe174(0x16a)]?function(_0x5e61e4){return typeof _0x5e61e4;}:function(_0xa9853a){const _0x4e8f4e=_0xdfe174;return _0xa9853a&&_0x4e8f4e(0x189)==typeof Symbol&&_0xa9853a[_0x4e8f4e(0x151)]===Symbol&&_0xa9853a!==Symbol[_0x4e8f4e(0x121)]?_0x4e8f4e(0x157):typeof _0xa9853a;},_typeof(_0xa469a8);}function _0x50b6(){const _0x3b1473=['getBasicShapeRotateBound','getShapeType','flipY','rotation','7382990vxuwlB','rotateEnabled','width','UniverInstanceType','entries','height','getConnectionSiteList','sheet.command.update-shape-type','UpdateConnectorRelationCommand','transform','stringify','IUniverInstanceService','_linesIds','top','IDrawingManagerService','getShapeTypeById','every','version','getShapeDataById','_serializeShapeForUnit','1633602oTGcdI','keys','adjustValues','startY','DRAWING_SHAPE','sheet.mutation.update-shape-type','getBatchUpdateOp','IResourceManagerService','MUTATION','_sheetSkeletonService','Module','SheetSkeletonService','0.21.1','getBasicShapeRelation','isLineShape','SetSheetDrawingCommand','UpdateSheetsShapeDataMutation','worldRect','range','getAdjustNames','pluginName','startX','sequenceExecute','InsertSheetsShapeMutation','shapeData','_groupIds','InsertShapeCommand','clear','9RzvtyA','Injector','ICommandService','isConnectorShape','sheets-shape.config','ToggleSheetsShapeFlipCommand','_deserializeShapeForUnit','length','getShapeData','position','Disposable','DependentOn','syncExecuteCommand','relation','SetShapeDrawingDataCommand','_config','getShapeRelation','preRedos','getShapeModel','293154nHaKrA','getCellWithCoordByIndex','ShapeModel','onCommandExecute','computeConnectorRouteLayout','sheet.command.set-shape-text-vertical-toggle','touchDependencies','fromJSON','_sheetsShapeService','insertShape','assign','sheet.command.toggle-shape-flip','decorate','SetDrawingApplyMutation','SheetInterceptorService','transformToAxisAlignPosition','3499083UuqUgF','SetSheetsShapeRotateCommand','ClearSheetDrawingTransformerOperation','SHEET_SHAPE_PLUGIN','SheetsShapeService','delete','prototype','_initCommands','pushUndoRedo','getEndConnectInfo','sheet.command.update-line-shape-resize','disposeWithMe','getSheetCommandTarget','UPDATE','removeLinePoints','left','ensureSkeleton','sheet.command.insert-shape','hasShape','forEach','redos','getBatchAddOp','removeShape','_resourcesManagerService','merge','COMMAND','_initSnapshot','undos','parse','interceptCommand','call','registerPluginResource','getSkeleton','params','_initCommandInterceptor','isFrom','Fail\x20to\x20get\x20shape\x20model,\x20get:\x20','getDrawingData','setShapeData','getAdjustValueByName','generateRandomId','fill','_shapeModelManagerMap','_injector','cxnIndex','object','UNIVER_SHEET','has','routeConnectorLineShape','defineProperty','shapeId','sheet.command.set-shape-rotate','DEFAULT_SHAPE_HEIGHT','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','constructor','toStringTag','addShape','Inject','UpdateLineShapeResizeCommand','set','symbol','5171248VMPNba','toJSON','angle','InsertSheetDrawingCommand','borderEnabled','sheet.mutation.update-shape-data','1616032wPUyAg','CommandType','_addLineRerouteUpdates','add','resizeEnabled','@univerjs-pro/sheets-shape','get','registerCommand','_commandService','_getConnectPointInfo','lineShapeId','745483jPRmuL','iterator','DrawingTypeEnum','push','getDrawingByParam','_drawingManagerService','_shapes','data','setConfig','_configService','getStartConnectInfo','UpdateSheetsShapeTypeCommand','type','2IskYSL','sheet.mutation.insert-shape','IUndoRedoService','preUndos','20YqOhpM','IConfigService','sheet.command.set-shape-drawing-data','INSERT','lineType','SetSheetsShapeTextVerticalToggleCommand','dispose','setShapeType','ISheetDrawingService','cos','getCellIndexAndOffsetByPosition','from','DrawingApplyType','UpdateSheetsShapeTypeMutation','_sheetInterceptorService','function','sheet.command.update-connector-relation','getShapeTextData','flipX','UniverSheetsShapePlugin','getLineShapeRelation','string','_ensureShapeModelManager','transformToDrawingPosition'];_0x50b6=function(){return _0x3b1473;};return _0x50b6();}function toPrimitive(_0x21b1b9,_0x16ae31){const _0xc39c3f=_0x2a18d5;if('object'!=_typeof(_0x21b1b9)||!_0x21b1b9)return _0x21b1b9;var _0x48f551=_0x21b1b9[Symbol['toPrimitive']];if(void 0x0!==_0x48f551){var _0x25ad2f=_0x48f551[_0xc39c3f(0x139)](_0x21b1b9,_0x16ae31||'default');if(_0xc39c3f(0x148)!=_typeof(_0x25ad2f))return _0x25ad2f;throw new TypeError(_0xc39c3f(0x150));}return(_0xc39c3f(0xc1)===_0x16ae31?String:Number)(_0x21b1b9);}function toPropertyKey(_0x429363){const _0x234846=_0x2a18d5;var _0x46db3d=toPrimitive(_0x429363,_0x234846(0xc1));return _0x234846(0x157)==_typeof(_0x46db3d)?_0x46db3d:_0x46db3d+'';}function _defineProperty(_0x285e69,_0x4f47a1,_0x3fb90c){return(_0x4f47a1=toPropertyKey(_0x4f47a1))in _0x285e69?Object['defineProperty'](_0x285e69,_0x4f47a1,{'value':_0x3fb90c,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x285e69[_0x4f47a1]=_0x3fb90c,_0x285e69;}var SheetShapeModelManager=class extends _univerjs_core[_0x2a18d5(0x102)]{constructor(){const _0x1e953b=_0x2a18d5;super(),_defineProperty(this,'_shapes',new Map()),_defineProperty(this,_0x1e953b(0xd4),new Set()),_defineProperty(this,'_groupIds',new Set());}[_0x2a18d5(0x153)](_0x2e8c41,_0x1df41e,_0x4819d1){const _0x42d2d7=_0x2a18d5,_0x5b4449=new _univerjs_pro_engine_shape[(_0x42d2d7(0x10d))](_0x2e8c41,_0x1df41e,_0x4819d1);this['_shapes'][_0x42d2d7(0x156)](_0x1df41e,_0x5b4449);if((0x0,_univerjs_pro_engine_shape['isConnectorShape'])(_0x2e8c41))this[_0x42d2d7(0xd4)][_0x42d2d7(0x161)](_0x1df41e);return _0x5b4449;}['getBasicShapeRelation'](_0x723b0d){const _0x15ec9f=_0x2a18d5,_0x24f2ad=[];for(const _0x5c78df of this[_0x15ec9f(0xd4)]){const _0x2e827e=this[_0x15ec9f(0x16f)][_0x15ec9f(0x164)](_0x5c78df);if(_0x2e827e){const _0x184ea0=_0x2e827e['getShapeRelation']();if(_0x184ea0){var _0x58970a,_0x4cae20;if(((_0x58970a=_0x184ea0[_0x15ec9f(0x185)])===null||_0x58970a===void 0x0?void 0x0:_0x58970a['shapeId'])===_0x723b0d)_0x24f2ad['push']({..._0x184ea0[_0x15ec9f(0x185)],'lineShapeId':_0x5c78df,'isFrom':!![]});if(((_0x4cae20=_0x184ea0['to'])===null||_0x4cae20===void 0x0?void 0x0:_0x4cae20[_0x15ec9f(0x14d)])===_0x723b0d)_0x24f2ad[_0x15ec9f(0x16c)]({..._0x184ea0['to'],'lineShapeId':_0x5c78df,'isFrom':![]});}}}return _0x24f2ad;}['getLineShapeRelation'](_0x171a7a){const _0x3e28d1=_0x2a18d5,_0x29e6e3=this['_shapes'][_0x3e28d1(0x164)](_0x171a7a);if(_0x29e6e3)return _0x29e6e3['getShapeRelation']();}[_0x2a18d5(0xc5)](_0x1a125f){const _0xca1832=_0x2a18d5,_0x1255c8=this['_shapes']['get'](_0x1a125f);if(_0x1255c8)return _0x1255c8[_0xca1832(0xc5)]();}['hasShape'](_0x11241b){const _0x420c41=_0x2a18d5;return this[_0x420c41(0x16f)][_0x420c41(0x14a)](_0x11241b);}[_0x2a18d5(0x131)](_0x5970a7){const _0x22e554=_0x2a18d5,_0xa92958=this[_0x22e554(0x16f)][_0x22e554(0x164)](_0x5970a7);if(!_0xa92958)return;if((0x0,_univerjs_pro_engine_shape[_0x22e554(0xfb)])(_0xa92958['getShapeType']()))this[_0x22e554(0xd4)][_0x22e554(0x120)](_0x5970a7);this[_0x22e554(0x16f)]['delete'](_0x5970a7);}[_0x2a18d5(0x159)](){const _0x10ce04=_0x2a18d5,_0x5ba373=[];return this[_0x10ce04(0x16f)]['forEach'](_0x49b051=>{const _0x30a850=_0x10ce04;_0x5ba373[_0x30a850(0x16c)](_0x49b051[_0x30a850(0x159)]());}),_0x5ba373;}[_0x2a18d5(0x112)](_0xa3bd98){const _0x1a2378=_0x2a18d5;for(const _0x575736 of _0xa3bd98){const {id:_0x4deaed,shapeType:_0x1fb04e}=_0x575736,_0x342aca=this[_0x1a2378(0x153)](_0x1fb04e,_0x4deaed,_0x575736[_0x1a2378(0xf4)]);if(_0x342aca&&_0x342aca[_0x1a2378(0xea)]())this[_0x1a2378(0xd4)]['add'](_0x4deaed);}}[_0x2a18d5(0x180)](){const _0x5cad17=_0x2a18d5;if(this['_disposed'])return;this[_0x5cad17(0x16f)][_0x5cad17(0x12e)](_0x10e4bf=>{const _0x29f40f=_0x5cad17;_0x10e4bf[_0x29f40f(0x180)]();}),this[_0x5cad17(0x16f)][_0x5cad17(0xf7)](),this[_0x5cad17(0xd4)][_0x5cad17(0xf7)](),this[_0x5cad17(0xf5)][_0x5cad17(0xf7)](),super[_0x5cad17(0x180)]();}};function __decorateParam(_0xe540c6,_0x1ebabf){return function(_0x2142e1,_0x1519b6){_0x1ebabf(_0x2142e1,_0x1519b6,_0xe540c6);};}function __decorate(_0x346b68,_0x5326ae,_0x2aa428,_0xa156d2){const _0x313132=_0x2a18d5;var _0x1dd079=arguments['length'],_0x4e8ac0=_0x1dd079<0x3?_0x5326ae:_0xa156d2===null?_0xa156d2=Object['getOwnPropertyDescriptor'](_0x5326ae,_0x2aa428):_0xa156d2,_0x13353f;if(typeof Reflect===_0x313132(0x148)&&typeof Reflect[_0x313132(0x117)]===_0x313132(0x189))_0x4e8ac0=Reflect[_0x313132(0x117)](_0x346b68,_0x5326ae,_0x2aa428,_0xa156d2);else{for(var _0xa4ca51=_0x346b68['length']-0x1;_0xa4ca51>=0x0;_0xa4ca51--)if(_0x13353f=_0x346b68[_0xa4ca51])_0x4e8ac0=(_0x1dd079<0x3?_0x13353f(_0x4e8ac0):_0x1dd079>0x3?_0x13353f(_0x5326ae,_0x2aa428,_0x4e8ac0):_0x13353f(_0x5326ae,_0x2aa428))||_0x4e8ac0;}return _0x1dd079>0x3&&_0x4e8ac0&&Object[_0x313132(0x14c)](_0x5326ae,_0x2aa428,_0x4e8ac0),_0x4e8ac0;}function _0x1514(_0x2e8fb0,_0x55cade){_0x2e8fb0=_0x2e8fb0-0xc1;const _0x50b605=_0x50b6();let _0x1514a5=_0x50b605[_0x2e8fb0];return _0x1514a5;}const SHEET_SHAPE_PLUGIN='SHEET_SHAPE_PLUGIN';let SheetsShapeService=class SheetsShapeService extends _univerjs_core[_0x2a18d5(0x102)]{constructor(_0x40d687){const _0x2baada=_0x2a18d5;super(),this['_resourcesManagerService']=_0x40d687,_defineProperty(this,_0x2baada(0x145),new Map()),this[_0x2baada(0x135)]();}[_0x2a18d5(0xc2)](_0x412685,_0x41bad5){const _0x42e71c=_0x2a18d5;let _0xe314fb=this['_shapeModelManagerMap'][_0x42e71c(0x164)](_0x412685);!_0xe314fb&&(_0xe314fb=new Map(),this[_0x42e71c(0x145)][_0x42e71c(0x156)](_0x412685,_0xe314fb));let _0x3f1297=_0xe314fb['get'](_0x41bad5);return!_0x3f1297&&(_0x3f1297=new SheetShapeModelManager(),_0xe314fb[_0x42e71c(0x156)](_0x41bad5,_0x3f1297)),_0x3f1297;}[_0x2a18d5(0x114)](_0x592909,_0xd9ad71,_0x23671d,_0x30d7d1,_0x89b8ad){const _0x3f4aa9=_0x2a18d5;this['_ensureShapeModelManager'](_0x592909,_0xd9ad71)[_0x3f4aa9(0x153)](_0x23671d,_0x30d7d1,_0x89b8ad);}[_0x2a18d5(0x131)](_0x1ee422,_0x54f02f,_0x58288c){const _0x3b4adc=_0x2a18d5;this['_ensureShapeModelManager'](_0x1ee422,_0x54f02f)[_0x3b4adc(0x131)](_0x58288c);}['getBasicShapeType'](_0x3db012,_0x231b9e,_0x5f4516){const _0x2c9611=_0x2a18d5;return this[_0x2c9611(0xc2)](_0x3db012,_0x231b9e)[_0x2c9611(0xc5)](_0x5f4516);}[_0x2a18d5(0xc5)](_0x10f928,_0x2cf993,_0x28b6e4){const _0x438956=_0x2a18d5;return this[_0x438956(0xc2)](_0x10f928,_0x2cf993)[_0x438956(0xc5)](_0x28b6e4);}[_0x2a18d5(0x12d)](_0x3641e7,_0x9a68ca,_0x5bd7e8){return this['_ensureShapeModelManager'](_0x3641e7,_0x9a68ca)['hasShape'](_0x5bd7e8);}[_0x2a18d5(0xd7)](_0x1b7881,_0x17595c,_0x12133a){const _0x4e3b70=_0x2a18d5;return this[_0x4e3b70(0xc2)](_0x1b7881,_0x17595c)[_0x4e3b70(0xc5)](_0x12133a);}[_0x2a18d5(0xda)](_0x422315,_0x3be221,_0x4ef625){const _0x4a0617=_0x2a18d5,_0x1a4a83=this[_0x4a0617(0xc2)](_0x422315,_0x3be221);if(!_0x1a4a83[_0x4a0617(0xc5)](_0x4ef625))return;const _0xa27101=_0x1a4a83[_0x4a0617(0x16f)][_0x4a0617(0x164)](_0x4ef625);if(!_0xa27101)return;return _0xa27101[_0x4a0617(0x100)]();}[_0x2a18d5(0x10a)](_0x4ea4be,_0x217397,_0x475c39){const _0x50cdb2=_0x2a18d5;return this[_0x50cdb2(0xc2)](_0x4ea4be,_0x217397)[_0x50cdb2(0x16f)][_0x50cdb2(0x164)](_0x475c39);}['getBasicShapeRelation'](_0x143332,_0x216613,_0x5b54a9){const _0x5d7723=_0x2a18d5;return this[_0x5d7723(0xc2)](_0x143332,_0x216613)[_0x5d7723(0xe9)](_0x5b54a9);}['getLineShapeRelation'](_0x41048b,_0x3e8c5c,_0x320229){const _0x4dfb8c=_0x2a18d5,_0x2b7130=this[_0x4dfb8c(0xc2)](_0x41048b,_0x3e8c5c)[_0x4dfb8c(0x16f)][_0x4dfb8c(0x164)](_0x320229);if(!_0x2b7130)return;return _0x2b7130[_0x4dfb8c(0x108)]();}[_0x2a18d5(0x181)](){}[_0x2a18d5(0xdb)](_0x37b383){const _0x5ca9c3=_0x2a18d5,_0x46e9ea={},_0x4b1897=this[_0x5ca9c3(0x145)][_0x5ca9c3(0x164)](_0x37b383);if(_0x4b1897)_0x4b1897[_0x5ca9c3(0x12e)]((_0x10c313,_0xb06cd5)=>{const _0x46acfc=_0x5ca9c3,_0x5abb67=_0x10c313[_0x46acfc(0x159)]();if(_0x5abb67['length']>0x0)_0x46e9ea[_0xb06cd5]=_0x5abb67;});return JSON[_0x5ca9c3(0xd2)](_0x46e9ea);}['_deserializeShapeForUnit'](_0x53fee5,_0xcf1908){const _0x429316=_0x2a18d5;Object[_0x429316(0xdd)](_0xcf1908)[_0x429316(0x12e)](_0x3dfb14=>{const _0x32a258=_0x429316;this[_0x32a258(0xc2)](_0x53fee5,_0x3dfb14)[_0x32a258(0x112)](_0xcf1908[_0x3dfb14]);});}[_0x2a18d5(0x159)](){const _0x328ed8=_0x2a18d5,_0x3c24e0={};return this['_shapeModelManagerMap'][_0x328ed8(0x12e)]((_0x4dbfbe,_0x4bf583)=>{const _0x412603=_0x328ed8;_0x3c24e0[_0x4bf583]={},_0x4dbfbe[_0x412603(0x12e)]((_0x9421fd,_0x5e08ce)=>{const _0x27bbff=_0x412603;_0x3c24e0[_0x4bf583][_0x5e08ce]=_0x9421fd[_0x27bbff(0x159)]();});}),_0x3c24e0;}[_0x2a18d5(0x112)](_0x413399){const _0x8365e1=_0x2a18d5;Object[_0x8365e1(0xdd)](_0x413399)[_0x8365e1(0x12e)](_0x544446=>{const _0x493bfc=_0x8365e1,_0x4116a4=_0x413399[_0x544446];Object[_0x493bfc(0xdd)](_0x4116a4)[_0x493bfc(0x12e)](_0x4ec317=>{const _0x1e2f89=_0x493bfc;this[_0x1e2f89(0xc2)](_0x544446,_0x4ec317)[_0x1e2f89(0x112)](_0x4116a4[_0x4ec317]);});});}[_0x2a18d5(0x135)](){const _0x16f6a9=_0x2a18d5;this[_0x16f6a9(0x132)][_0x16f6a9(0x13a)]({'pluginName':SHEET_SHAPE_PLUGIN,'businesses':[_univerjs_core[_0x16f6a9(0xcb)][_0x16f6a9(0x149)]],'toJson':_0x350b5a=>this[_0x16f6a9(0xdb)](_0x350b5a),'parseJson':_0x2a7bbf=>JSON[_0x16f6a9(0x137)](_0x2a7bbf),'onLoad':(_0x164683,_0x28f80c)=>{const _0x5e7e57=_0x16f6a9;this[_0x5e7e57(0xfe)](_0x164683,_0x28f80c);},'onUnLoad':_0x1ef03a=>{const _0x4879b8=_0x16f6a9,_0x2839a7=this[_0x4879b8(0x145)][_0x4879b8(0x164)](_0x1ef03a);_0x2839a7&&(_0x2839a7[_0x4879b8(0x12e)](_0x32a8b5=>{_0x32a8b5['dispose']();}),this[_0x4879b8(0x145)][_0x4879b8(0x120)](_0x1ef03a));}});}[_0x2a18d5(0x180)](){const _0x1dc46a=_0x2a18d5;this[_0x1dc46a(0x145)][_0x1dc46a(0x12e)](_0x4e3b4d=>{const _0x29695a=_0x1dc46a;_0x4e3b4d[_0x29695a(0x12e)](_0x2e7b29=>{_0x2e7b29['dispose']();});});}};SheetsShapeService=__decorate([__decorateParam(0x0,_univerjs_core[_0x2a18d5(0xe3)])],SheetsShapeService);const InsertSheetsShapeMutation={'id':_0x2a18d5(0x177),'type':_univerjs_core[_0x2a18d5(0x15f)][_0x2a18d5(0xe4)],'handler':(_0x47afe1,_0x1004e3)=>{const {unitId:_0x13c071,subUnitId:_0x19bcae,shapeType:_0xfd6f31,shapeId:_0x5c69e8,shapeData:_0x4077eb}=_0x1004e3;return _0x47afe1['get'](SheetsShapeService)['insertShape'](_0x13c071,_0x19bcae,_0xfd6f31,_0x5c69e8,_0x4077eb),!![];}},RemoveSheetsShapeMutation={'id':'sheet.mutation.remove-shape','type':_univerjs_core['CommandType']['MUTATION'],'handler':(_0x207c2,_0x277bbe)=>{const _0x40fde7=_0x2a18d5,{unitId:_0x5850f4,subUnitId:_0x2eaf8a,shapeId:_0x3b115e}=_0x277bbe;return _0x207c2[_0x40fde7(0x164)](SheetsShapeService)[_0x40fde7(0x131)](_0x5850f4,_0x2eaf8a,_0x3b115e),!![];}},InsertShapeCommand={'type':_univerjs_core[_0x2a18d5(0x15f)][_0x2a18d5(0x134)],'id':_0x2a18d5(0x12c),'handler':(_0x4d9064,_0x6edfdb)=>{const _0x511155=_0x2a18d5;var _0x2acad0,_0x2ba7db;const _0xb4f2fc=(0x0,_univerjs_sheets[_0x511155(0x127)])(_0x4d9064[_0x511155(0x164)](_univerjs_core[_0x511155(0xd3)]),_0x6edfdb);if(!_0xb4f2fc)return![];const _0x310897=_0x4d9064[_0x511155(0x164)](_univerjs_sheets[_0x511155(0xe7)]),{unitId:_0x508450,subUnitId:_0x14bb54}=_0xb4f2fc,_0x3fb4fd=_0x310897['ensureSkeleton'](_0x508450,_0x14bb54);if(!_0x3fb4fd)return![];const _0xea867e=_0x4d9064[_0x511155(0x164)](_univerjs_core[_0x511155(0xfa)]),_0x57cba3=_0x4d9064[_0x511155(0x164)](_univerjs_core[_0x511155(0x178)]),_0x4b2be9=_0x4d9064[_0x511155(0x164)](_univerjs_sheets[_0x511155(0x119)]),_0x571e0b=_0x4d9064[_0x511155(0x164)](_univerjs_sheets_drawing[_0x511155(0x182)]),{shapeType:_0x3eab77,shapeData:_0x1605a6}=_0x6edfdb,_0x5a430b=_0x6edfdb[_0x511155(0x14d)]||(0x0,_univerjs_core[_0x511155(0x143)])(),_0x5f25a8={'unitId':_0x508450,'subUnitId':_0x14bb54,'shapeId':_0x5a430b,'shapeType':_0x3eab77,'shapeData':_0x1605a6},_0x5569ad=_0x6edfdb['width']||0xc8,_0x47bffa=_0x6edfdb['height']||0xc8;let _0x1adbdd=0x0,_0x14663c=0x0,_0xe69a2d={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0},_0x47474c={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0};if(_0x6edfdb[_0x511155(0x101)]){const {x:_0x5a4e04,y:_0x5a3423}=_0x6edfdb['position'];_0x1adbdd=_0x5a4e04,_0x14663c=_0x5a3423,_0xe69a2d=_0x3fb4fd[_0x511155(0x184)](_0x5a4e04,_0x5a3423),_0x47474c=_0x3fb4fd[_0x511155(0x184)](_0x5a4e04+_0x5569ad,_0x5a3423+_0x47bffa);}else{if(_0x6edfdb[_0x511155(0xee)]){const {startRow:_0x1ce811,startColumn:_0x13ae4e}=_0x6edfdb[_0x511155(0xee)],_0x5721e2=0xa,_0x41da4a=0xa;_0xe69a2d={'row':_0x1ce811,'rowOffset':_0x5721e2,'column':_0x13ae4e,'columnOffset':_0x41da4a};const _0xdc1222=_0x3fb4fd[_0x511155(0x10c)](_0x1ce811,_0x13ae4e);_0x1adbdd=_0xdc1222[_0x511155(0xf1)]+_0x41da4a,_0x14663c=_0xdc1222[_0x511155(0xdf)]+_0x5721e2,_0x47474c=_0x3fb4fd[_0x511155(0x184)](_0x1adbdd+_0x5569ad,_0x14663c+_0x47bffa);}}const _0x429d34={'from':_0xe69a2d,'to':_0x47474c},_0x4795dc={'unitId':_0x508450,'subUnitId':_0x14bb54,'drawingId':_0x5a430b,'drawingType':_univerjs_core[_0x511155(0x16b)][_0x511155(0xe0)],'sheetTransform':_0x429d34,'transform':{'left':_0x1adbdd,'top':_0x14663c,'width':_0x5569ad,'height':_0x47bffa},'data':{'shapeType':_0x3eab77,'shapeData':_0x1605a6},'axisAlignSheetTransform':_0x429d34,'allowTransform':!![]};(0x0,_univerjs_pro_engine_shape[_0x511155(0xfb)])(_0x3eab77)&&(_0x4795dc[_0x511155(0x170)][_0x511155(0x144)]=![],_0x4795dc[_0x511155(0x170)][_0x511155(0xc9)]=![],_0x4795dc[_0x511155(0x170)][_0x511155(0x162)]=![],_0x4795dc['data'][_0x511155(0x15c)]=![],_0x4795dc['transform'][_0x511155(0xc9)]=![],_0x4795dc['transform'][_0x511155(0x162)]=![],_0x4795dc[_0x511155(0xd1)][_0x511155(0x15c)]=![]);const {undo:_0x1d268d,redo:_0x37d62c,objects:_0x2b17d4}=_0x571e0b[_0x511155(0x130)]([_0x4795dc]),_0x3dd903=_0x4b2be9[_0x511155(0x10e)]({'id':_univerjs_sheets_drawing[_0x511155(0x15b)]['id'],'params':{'unitId':_0x508450,'drawings':[_0x4795dc]}}),_0x474a02=[...(_0x2acad0=_0x3dd903[_0x511155(0x109)])!==null&&_0x2acad0!==void 0x0?_0x2acad0:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x508450,'subUnitId':_0x14bb54,'op':_0x37d62c,'objects':_0x2b17d4,'type':_univerjs_sheets_drawing[_0x511155(0x186)][_0x511155(0x17d)]}},{'id':_univerjs_sheets_drawing[_0x511155(0x11d)]['id'],'params':[_0x508450]},..._0x3dd903['redos'],{'id':InsertSheetsShapeMutation['id'],'params':_0x5f25a8}],_0x168fad=[{'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x508450,'subUnitId':_0x14bb54,'shapeId':_0x5a430b}},...(_0x2ba7db=_0x3dd903['preUndos'])!==null&&_0x2ba7db!==void 0x0?_0x2ba7db:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x508450,'subUnitId':_0x14bb54,'op':_0x1d268d,'objects':_0x2b17d4,'type':_univerjs_sheets_drawing[_0x511155(0x186)]['REMOVE']}},{'id':_univerjs_sheets_drawing[_0x511155(0x11d)]['id'],'params':[_0x508450]},..._0x3dd903[_0x511155(0x136)]];if((0x0,_univerjs_core[_0x511155(0xf2)])(_0x474a02,_0xea867e))return _0x57cba3[_0x511155(0x123)]({'unitID':_0x508450,'undoMutations':_0x168fad,'redoMutations':_0x474a02}),!![];return![];}},UpdateSheetsShapeDataMutation={'id':_0x2a18d5(0x15d),'type':_univerjs_core[_0x2a18d5(0x15f)][_0x2a18d5(0xe4)],'handler':(_0x554549,_0x2c162e)=>{const _0x5a27c9=_0x2a18d5,{unitId:_0x56b339,subUnitId:_0x4e2eb4,shapeType:_0x3619fd,shapeId:_0x33bca7,shapeData:_0xeda8e3}=_0x2c162e,_0x3eef39=_0x554549['get'](SheetsShapeService)[_0x5a27c9(0x10a)](_0x56b339,_0x4e2eb4,_0x33bca7);if(_0x3eef39){if(_0x3619fd!==void 0x0)_0x3eef39[_0x5a27c9(0x181)](_0x3619fd);if(_0xeda8e3)_0x3eef39===null||_0x3eef39===void 0x0||_0x3eef39['setShapeData'](_0xeda8e3,!![]);}return!![];}},SetShapeDrawingDataCommand={'type':_univerjs_core[_0x2a18d5(0x15f)][_0x2a18d5(0x134)],'id':_0x2a18d5(0x17c),'handler':(_0x2b2849,_0x44bdcc)=>{const _0x3a7dea=_0x2a18d5;var _0x1be978,_0x1ef9f3;const _0x3e1852=(0x0,_univerjs_sheets[_0x3a7dea(0x127)])(_0x2b2849[_0x3a7dea(0x164)](_univerjs_core[_0x3a7dea(0xd3)]),_0x44bdcc);if(!_0x3e1852)return![];const _0xea5650=_0x2b2849['get'](_univerjs_sheets[_0x3a7dea(0xe7)]),{unitId:_0x425953,subUnitId:_0x2f591d}=_0x3e1852,_0x53e9bb=_0xea5650[_0x3a7dea(0x12b)](_0x425953,_0x2f591d);if(!_0x53e9bb)return![];const _0x28c542=_0x2b2849[_0x3a7dea(0x164)](SheetsShapeService),{shapeId:_0x3fd655,shapeType:_0x379116,shapeData:_0xe15174,position:_0x4afd20,width:_0x3dac54,height:_0x81f91b}=_0x44bdcc,_0x10b181=_0x28c542[_0x3a7dea(0x10a)](_0x425953,_0x2f591d,_0x3fd655);if(!_0x10b181)return![];const _0x395d91=_0x2b2849[_0x3a7dea(0x164)](_univerjs_core[_0x3a7dea(0xfa)]),_0x4dcaa0=_0x2b2849[_0x3a7dea(0x164)](_univerjs_core[_0x3a7dea(0x178)]),_0x535ce2=_0x2b2849[_0x3a7dea(0x164)](_univerjs_sheets[_0x3a7dea(0x119)]),_0x5a584b=_0x2b2849['get'](_univerjs_sheets_drawing[_0x3a7dea(0x182)]),_0x1b8a45={'unitId':_0x425953,'subUnitId':_0x2f591d,'shapeId':_0x3fd655,'shapeType':_0x379116,'shapeData':_0xe15174},_0x12d40a=_0x10b181['getShapeType'](),_0x336d3e=_0x10b181['getShapeData'](),{x:_0x1f8b68,y:_0x49a357}=_0x4afd20,_0x5d66c9={'from':_0x53e9bb[_0x3a7dea(0x184)](_0x1f8b68,_0x49a357),'to':_0x53e9bb[_0x3a7dea(0x184)](_0x1f8b68+_0x3dac54,_0x49a357+_0x81f91b)},_0x2aa58a={'unitId':_0x425953,'subUnitId':_0x2f591d,'drawingId':_0x3fd655,'drawingType':_univerjs_core[_0x3a7dea(0x16b)][_0x3a7dea(0xe0)],'sheetTransform':_0x5d66c9,'transform':{'left':_0x1f8b68,'top':_0x49a357,'width':_0x3dac54,'height':_0x81f91b},'data':{'shapeType':_0x379116,'shapeData':_0xe15174},'axisAlignSheetTransform':_0x5d66c9,'allowTransform':!![]};(0x0,_univerjs_pro_engine_shape[_0x3a7dea(0xfb)])(_0x379116)&&(_0x2aa58a[_0x3a7dea(0x170)][_0x3a7dea(0x144)]=![],_0x2aa58a['data'][_0x3a7dea(0xc9)]=![],_0x2aa58a[_0x3a7dea(0x170)]['resizeEnabled']=![],_0x2aa58a['data'][_0x3a7dea(0x15c)]=![],_0x2aa58a[_0x3a7dea(0xd1)]['rotateEnabled']=![],_0x2aa58a[_0x3a7dea(0xd1)]['resizeEnabled']=![],_0x2aa58a[_0x3a7dea(0xd1)][_0x3a7dea(0x15c)]=![]);const {undo:_0x1f1754,redo:_0x4eea89,objects:_0x15484f}=_0x5a584b['getBatchUpdateOp']([_0x2aa58a]),_0x1bab54=_0x535ce2[_0x3a7dea(0x10e)]({'id':_univerjs_sheets_drawing[_0x3a7dea(0xeb)]['id'],'params':{'unitId':_0x425953,'drawings':[_0x2aa58a]}}),_0x218760=[...(_0x1be978=_0x1bab54[_0x3a7dea(0x109)])!==null&&_0x1be978!==void 0x0?_0x1be978:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x425953,'subUnitId':_0x2f591d,'op':_0x4eea89,'objects':_0x15484f,'type':_univerjs_sheets_drawing[_0x3a7dea(0x186)][_0x3a7dea(0x128)]}},{'id':_univerjs_sheets_drawing[_0x3a7dea(0x11d)]['id'],'params':[_0x425953]},..._0x1bab54[_0x3a7dea(0x12f)],{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x1b8a45}],_0x561437=[...(_0x1ef9f3=_0x1bab54[_0x3a7dea(0x179)])!==null&&_0x1ef9f3!==void 0x0?_0x1ef9f3:[],{'id':_univerjs_sheets_drawing[_0x3a7dea(0x118)]['id'],'params':{'unitId':_0x425953,'subUnitId':_0x2f591d,'op':_0x1f1754,'objects':_0x15484f,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x3a7dea(0x128)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x425953]},..._0x1bab54[_0x3a7dea(0x136)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x425953,'subUnitId':_0x2f591d,'shapeType':_0x12d40a,'shapeId':_0x3fd655,'shapeData':_0x336d3e}}];if((0x0,_univerjs_core[_0x3a7dea(0xf2)])(_0x218760,_0x395d91))return _0x4dcaa0[_0x3a7dea(0x123)]({'unitID':_0x425953,'undoMutations':_0x561437,'redoMutations':_0x218760}),!![];return![];}},ToggleSheetsShapeFlipCommand={'type':_univerjs_core[_0x2a18d5(0x15f)][_0x2a18d5(0x134)],'id':_0x2a18d5(0x116),'handler':(_0x45275d,_0x1652fe)=>{const _0x2152d0=_0x2a18d5;var _0x56628e,_0x172060;const _0x4dd38e=(0x0,_univerjs_sheets[_0x2152d0(0x127)])(_0x45275d[_0x2152d0(0x164)](_univerjs_core[_0x2152d0(0xd3)]),_0x1652fe);if(!_0x4dd38e)return![];const _0x2ba4c7=_0x45275d[_0x2152d0(0x164)](_univerjs_sheets[_0x2152d0(0xe7)]),{unitId:_0x43ef7d,subUnitId:_0x5e7f81}=_0x4dd38e,_0x130fad=_0x2ba4c7[_0x2152d0(0x13b)](_0x43ef7d,_0x5e7f81);if(!_0x130fad)return![];const _0x1da19e=_0x45275d[_0x2152d0(0x164)](_univerjs_sheets_drawing[_0x2152d0(0x182)]),{shapeId:_0x581831,flipH:_0x26c41d,flipV:_0x1b2f5e}=_0x1652fe,_0x4add16=_0x1da19e[_0x2152d0(0x16d)]({'unitId':_0x43ef7d,'subUnitId':_0x5e7f81,'drawingId':_0x581831});if(!_0x4add16)return![];const _0xeab154=_0x45275d['get'](SheetsShapeService)[_0x2152d0(0x10a)](_0x43ef7d,_0x5e7f81,_0x581831);if(!_0xeab154)return![];const _0x20bbf2=_0x45275d['get'](_univerjs_core['ICommandService']),_0x5b339c=_0x45275d[_0x2152d0(0x164)](_univerjs_core[_0x2152d0(0x178)]),_0x2e13a5=_0x45275d[_0x2152d0(0x164)](_univerjs_sheets['SheetInterceptorService']),_0x28bd21={..._0x4add16[_0x2152d0(0xd1)]};if(_0x26c41d!==void 0x0)_0x28bd21[_0x2152d0(0x18c)]=!_0x28bd21[_0x2152d0(0x18c)];if(_0x1b2f5e!==void 0x0)_0x28bd21[_0x2152d0(0xc6)]=!_0x28bd21[_0x2152d0(0xc6)];const _0x438ac8=(0x0,_univerjs_sheets_drawing[_0x2152d0(0xc3)])(_0x28bd21,_0x130fad),_0x5319bc=(0x0,_univerjs_sheets_drawing[_0x2152d0(0x11a)])(_0x28bd21,_0x130fad),_0x544b73=_0xeab154[_0x2152d0(0xc5)](),_0x22fda0=_0xeab154[_0x2152d0(0x100)](),_0x4fb4fa={'unitId':_0x43ef7d,'subUnitId':_0x5e7f81,'drawingId':_0x581831,'drawingType':_univerjs_core[_0x2152d0(0x16b)][_0x2152d0(0xe0)],'sheetTransform':_0x438ac8,'transform':_0x28bd21,'data':{'shapeType':_0x544b73,'shapeData':_0x22fda0},'axisAlignSheetTransform':_0x5319bc,'allowTransform':!![]},{undo:_0x4bbba0,redo:_0x5aafb4,objects:_0x114fcd}=_0x1da19e[_0x2152d0(0xe2)]([_0x4fb4fa]),_0x1cd65d=_0x2e13a5[_0x2152d0(0x10e)]({'id':_univerjs_sheets_drawing[_0x2152d0(0xeb)]['id'],'params':{'unitId':_0x43ef7d,'drawings':[_0x4fb4fa]}}),_0xe4741=[...(_0x56628e=_0x1cd65d[_0x2152d0(0x109)])!==null&&_0x56628e!==void 0x0?_0x56628e:[],{'id':_univerjs_sheets_drawing[_0x2152d0(0x118)]['id'],'params':{'unitId':_0x43ef7d,'subUnitId':_0x5e7f81,'op':_0x5aafb4,'objects':_0x114fcd,'type':_univerjs_sheets_drawing[_0x2152d0(0x186)][_0x2152d0(0x128)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x43ef7d]},..._0x1cd65d[_0x2152d0(0x12f)]],_0x53075e=[...(_0x172060=_0x1cd65d[_0x2152d0(0x179)])!==null&&_0x172060!==void 0x0?_0x172060:[],{'id':_univerjs_sheets_drawing[_0x2152d0(0x118)]['id'],'params':{'unitId':_0x43ef7d,'subUnitId':_0x5e7f81,'op':_0x4bbba0,'objects':_0x114fcd,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x2152d0(0x128)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x43ef7d]},..._0x1cd65d[_0x2152d0(0x136)]];if((0x0,_univerjs_pro_engine_shape['isConnectorShape'])(_0x544b73)){const _0x3107d6=_0xeab154[_0x2152d0(0x108)]();if(_0x3107d6){const _0x3c5c3b={..._0x3107d6};_0x3c5c3b[_0x2152d0(0x185)]=void 0x0,_0x3c5c3b['to']=void 0x0,_0xe4741[_0x2152d0(0x16c)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x43ef7d,'subUnitId':_0x5e7f81,'shapeId':_0x581831,'shapeType':_0x544b73,'shapeData':{'relation':_0x3c5c3b}}}),_0x53075e[_0x2152d0(0x16c)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x43ef7d,'subUnitId':_0x5e7f81,'shapeId':_0x581831,'shapeType':_0x544b73,'shapeData':{'relation':_0x3107d6}}});}}if((0x0,_univerjs_core[_0x2152d0(0xf2)])(_0xe4741,_0x20bbf2))return _0x5b339c[_0x2152d0(0x123)]({'unitID':_0x43ef7d,'undoMutations':_0x53075e,'redoMutations':_0xe4741}),!![];return![];}},SetSheetsShapeRotateCommand={'type':_univerjs_core['CommandType'][_0x2a18d5(0x134)],'id':_0x2a18d5(0x14e),'handler':(_0x1c7c3c,_0x596df6)=>{const _0x13f094=_0x2a18d5;var _0x55ebb5,_0xed3ec1;const _0x854b74=(0x0,_univerjs_sheets['getSheetCommandTarget'])(_0x1c7c3c[_0x13f094(0x164)](_univerjs_core[_0x13f094(0xd3)]),_0x596df6);if(!_0x854b74)return![];const _0x55b8ef=_0x1c7c3c[_0x13f094(0x164)](_univerjs_sheets[_0x13f094(0xe7)]),{unitId:_0x38e0a1,subUnitId:_0x4d80a3}=_0x854b74,_0x254f8e=_0x55b8ef['getSkeleton'](_0x38e0a1,_0x4d80a3);if(!_0x254f8e)return![];const _0x2b7398=_0x1c7c3c[_0x13f094(0x164)](_univerjs_sheets_drawing[_0x13f094(0x182)]),{shapeId:_0x208b17,rotate:_0x1d0985}=_0x596df6,_0x12c603=_0x2b7398[_0x13f094(0x16d)]({'unitId':_0x38e0a1,'subUnitId':_0x4d80a3,'drawingId':_0x208b17});if(!_0x12c603)return![];const _0x4b7efa=_0x1c7c3c['get'](SheetsShapeService)[_0x13f094(0x10a)](_0x38e0a1,_0x4d80a3,_0x208b17);if(!_0x4b7efa)return![];const _0x124044=_0x1c7c3c[_0x13f094(0x164)](_univerjs_core[_0x13f094(0xfa)]),_0x359810=_0x1c7c3c[_0x13f094(0x164)](_univerjs_core[_0x13f094(0x178)]),_0x177edd=_0x1c7c3c[_0x13f094(0x164)](_univerjs_sheets[_0x13f094(0x119)]),_0x2a99ed={..._0x12c603['transform']};if(_0x1d0985!==void 0x0)_0x2a99ed[_0x13f094(0x15a)]=(_0x2a99ed[_0x13f094(0x15a)]||0x0)+_0x1d0985;const _0x3ccf64=(0x0,_univerjs_sheets_drawing['transformToDrawingPosition'])(_0x2a99ed,_0x254f8e),_0x356ddd=(0x0,_univerjs_sheets_drawing[_0x13f094(0x11a)])(_0x2a99ed,_0x254f8e),_0x37a7c3=_0x4b7efa[_0x13f094(0xc5)](),_0x4bcbf3=_0x4b7efa[_0x13f094(0x100)](),_0x9b7b8b={'unitId':_0x38e0a1,'subUnitId':_0x4d80a3,'drawingId':_0x208b17,'drawingType':_univerjs_core['DrawingTypeEnum'][_0x13f094(0xe0)],'sheetTransform':_0x3ccf64,'transform':_0x2a99ed,'data':{'shapeType':_0x37a7c3,'shapeData':_0x4bcbf3},'axisAlignSheetTransform':_0x356ddd,'allowTransform':!![]},{undo:_0x47a4db,redo:_0x593fa8,objects:_0x58f864}=_0x2b7398[_0x13f094(0xe2)]([_0x9b7b8b]),_0x44f676=_0x177edd[_0x13f094(0x10e)]({'id':_univerjs_sheets_drawing[_0x13f094(0xeb)]['id'],'params':{'unitId':_0x38e0a1,'drawings':[_0x9b7b8b]}}),_0xe723fd=[...(_0x55ebb5=_0x44f676[_0x13f094(0x109)])!==null&&_0x55ebb5!==void 0x0?_0x55ebb5:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x38e0a1,'subUnitId':_0x4d80a3,'op':_0x593fa8,'objects':_0x58f864,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x13f094(0x128)]}},{'id':_univerjs_sheets_drawing[_0x13f094(0x11d)]['id'],'params':[_0x38e0a1]},..._0x44f676[_0x13f094(0x12f)]],_0x1bc36f=[...(_0xed3ec1=_0x44f676[_0x13f094(0x179)])!==null&&_0xed3ec1!==void 0x0?_0xed3ec1:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x38e0a1,'subUnitId':_0x4d80a3,'op':_0x47a4db,'objects':_0x58f864,'type':_univerjs_sheets_drawing[_0x13f094(0x186)][_0x13f094(0x128)]}},{'id':_univerjs_sheets_drawing[_0x13f094(0x11d)]['id'],'params':[_0x38e0a1]},..._0x44f676['undos']];if((0x0,_univerjs_core[_0x13f094(0xf2)])(_0xe723fd,_0x124044))return _0x359810['pushUndoRedo']({'unitID':_0x38e0a1,'undoMutations':_0x1bc36f,'redoMutations':_0xe723fd}),!![];return![];}},SetSheetsShapeTextVerticalToggleCommand={'type':_univerjs_core[_0x2a18d5(0x15f)][_0x2a18d5(0x134)],'id':_0x2a18d5(0x110),'handler':(_0x280b8f,_0x4b69fd)=>{const _0x29caf3=_0x2a18d5;var _0x37185d;const _0x4d22a2=(0x0,_univerjs_sheets[_0x29caf3(0x127)])(_0x280b8f[_0x29caf3(0x164)](_univerjs_core[_0x29caf3(0xd3)]),_0x4b69fd);if(!_0x4d22a2)return![];const {unitId:_0x2c6567,subUnitId:_0x385c26}=_0x4d22a2,{shapeId:_0x4678f6}=_0x4b69fd,_0x5a0616=_0x280b8f[_0x29caf3(0x164)](SheetsShapeService)[_0x29caf3(0x10a)](_0x2c6567,_0x385c26,_0x4678f6);if(!_0x5a0616)return![];const _0x96fa5e=_0x5a0616[_0x29caf3(0x18b)](),_0x17db1b=(_0x37185d=_0x96fa5e===null||_0x96fa5e===void 0x0?void 0x0:_0x96fa5e['isHorizontal'])!==null&&_0x37185d!==void 0x0?_0x37185d:!![],_0x42a960=!_0x17db1b,_0x11ff8c=_0x280b8f['get'](_univerjs_core[_0x29caf3(0xfa)]),_0x2ee44e=_0x280b8f['get'](_univerjs_core[_0x29caf3(0x178)]),_0x88a43e={'unitId':_0x2c6567,'subUnitId':_0x385c26,'shapeId':_0x4678f6,'shapeData':{'shapeText':{'isHorizontal':_0x42a960}}},_0x3d31d0={'unitId':_0x2c6567,'subUnitId':_0x385c26,'shapeId':_0x4678f6,'shapeData':{'shapeText':{'isHorizontal':_0x17db1b}}},_0x36d8b8=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x88a43e}],_0x7a6dab=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x3d31d0}];if((0x0,_univerjs_core[_0x29caf3(0xf2)])(_0x36d8b8,_0x11ff8c))return _0x2ee44e['pushUndoRedo']({'unitID':_0x2c6567,'undoMutations':_0x7a6dab,'redoMutations':_0x36d8b8}),!![];return![];}},UpdateConnectorRelationCommand={'type':_univerjs_core['CommandType'][_0x2a18d5(0x134)],'id':_0x2a18d5(0x18a),'handler':(_0x80c18f,_0x4c0f9e)=>{const _0x6fa552=_0x2a18d5;var _0x5a46cd,_0x4fb2ae,_0x3ea708,_0x501b3f;const _0xb29db4=(0x0,_univerjs_sheets['getSheetCommandTarget'])(_0x80c18f['get'](_univerjs_core[_0x6fa552(0xd3)]),_0x4c0f9e);if(!_0xb29db4)return![];const _0x1e509a=_0x80c18f[_0x6fa552(0x164)](_univerjs_sheets['SheetSkeletonService']),{unitId:_0xc47eb7,subUnitId:_0x1be48b}=_0xb29db4,_0x22b52f=_0x1e509a['getSkeleton'](_0xc47eb7,_0x1be48b);if(!_0x22b52f)return![];const _0x2eae23=_0x80c18f[_0x6fa552(0x164)](_univerjs_sheets_drawing[_0x6fa552(0x182)]),{connectorShapeId:_0x1cfed7,width:_0x595f87,height:_0x630217,left:_0x4ffad0,top:_0x304383,flipX:_0x16dfd6,flipY:_0x1d2153,rotation:_0x3177dd,oldAdjustValues:_0x43df8e,newAdjustValues:_0x3efa2d,oldLineType:_0x432bb8,newLineType:_0x2a6ad1,oldRelation:_0x3dbee7,newRelation:_0xd94f9}=_0x4c0f9e,_0x24e54d=_0x2eae23[_0x6fa552(0x16d)]({'unitId':_0xc47eb7,'subUnitId':_0x1be48b,'drawingId':_0x1cfed7});if(!_0x24e54d)return![];const _0x3d8fbc=_0x80c18f['get'](SheetsShapeService)[_0x6fa552(0x10a)](_0xc47eb7,_0x1be48b,_0x1cfed7);if(!_0x3d8fbc)return![];const _0x59496b=_0x80c18f[_0x6fa552(0x164)](_univerjs_core['ICommandService']),_0x4e9ec5=_0x80c18f[_0x6fa552(0x164)](_univerjs_core['IUndoRedoService']),_0x16f02d=_0x80c18f[_0x6fa552(0x164)](_univerjs_sheets[_0x6fa552(0x119)]),_0x3b4c65={..._0x24e54d[_0x6fa552(0xd1)],'width':_0x595f87,'height':_0x630217,'left':_0x4ffad0,'top':_0x304383,'flipX':_0x16dfd6,'flipY':_0x1d2153,'angle':(_0x5a46cd=_0x3177dd!==null&&_0x3177dd!==void 0x0?_0x3177dd:(_0x4fb2ae=_0x24e54d[_0x6fa552(0xd1)])===null||_0x4fb2ae===void 0x0?void 0x0:_0x4fb2ae[_0x6fa552(0x15a)])!==null&&_0x5a46cd!==void 0x0?_0x5a46cd:0x0},_0x7f4f75=(0x0,_univerjs_sheets_drawing[_0x6fa552(0xc3)])(_0x3b4c65,_0x22b52f),_0x50abf9=(0x0,_univerjs_sheets_drawing[_0x6fa552(0x11a)])(_0x3b4c65,_0x22b52f),_0x455d36=_0x3d8fbc[_0x6fa552(0xc5)](),_0x118bbf=_0x3d8fbc[_0x6fa552(0x100)](),_0x44e35f={'unitId':_0xc47eb7,'subUnitId':_0x1be48b,'drawingId':_0x1cfed7,'drawingType':_univerjs_core[_0x6fa552(0x16b)]['DRAWING_SHAPE'],'sheetTransform':_0x7f4f75,'transform':_0x3b4c65,'data':{'shapeType':_0x2a6ad1||_0x432bb8||_0x455d36,'shapeData':{..._0x118bbf,'adjustValues':_0x3efa2d||_0x43df8e||(_0x118bbf===null||_0x118bbf===void 0x0?void 0x0:_0x118bbf[_0x6fa552(0xde)]),'relation':_0xd94f9||_0x3dbee7||(_0x118bbf===null||_0x118bbf===void 0x0?void 0x0:_0x118bbf[_0x6fa552(0x105)])}},'axisAlignSheetTransform':_0x50abf9,'allowTransform':!![]},{undo:_0x1af21c,redo:_0x382ee0,objects:_0x37b9e5}=_0x2eae23['getBatchUpdateOp']([_0x44e35f]),_0x4c7c7=_0x16f02d[_0x6fa552(0x10e)]({'id':_univerjs_sheets_drawing[_0x6fa552(0xeb)]['id'],'params':{'unitId':_0xc47eb7,'drawings':[_0x44e35f]}}),_0x9a1efc=[...(_0x3ea708=_0x4c7c7[_0x6fa552(0x109)])!==null&&_0x3ea708!==void 0x0?_0x3ea708:[],{'id':_univerjs_sheets_drawing[_0x6fa552(0x118)]['id'],'params':{'unitId':_0xc47eb7,'subUnitId':_0x1be48b,'op':_0x382ee0,'objects':_0x37b9e5,'type':_univerjs_sheets_drawing[_0x6fa552(0x186)][_0x6fa552(0x128)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0xc47eb7]},..._0x4c7c7[_0x6fa552(0x12f)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0xc47eb7,'subUnitId':_0x1be48b,'shapeId':_0x1cfed7,'shapeType':_0x2a6ad1,'shapeData':{'adjustValues':_0x3efa2d,'relation':_0xd94f9}}}],_0x36fc34=[...(_0x501b3f=_0x4c7c7[_0x6fa552(0x179)])!==null&&_0x501b3f!==void 0x0?_0x501b3f:[],{'id':_univerjs_sheets_drawing[_0x6fa552(0x118)]['id'],'params':{'unitId':_0xc47eb7,'subUnitId':_0x1be48b,'op':_0x1af21c,'objects':_0x37b9e5,'type':_univerjs_sheets_drawing[_0x6fa552(0x186)]['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x6fa552(0x11d)]['id'],'params':[_0xc47eb7]},..._0x4c7c7[_0x6fa552(0x136)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0xc47eb7,'subUnitId':_0x1be48b,'shapeId':_0x1cfed7,'shapeType':_0x455d36,'shapeData':{..._0x118bbf,'adjustValues':_0x43df8e||(_0x118bbf===null||_0x118bbf===void 0x0?void 0x0:_0x118bbf[_0x6fa552(0xde)]),'relation':_0x3dbee7||(_0x118bbf===null||_0x118bbf===void 0x0?void 0x0:_0x118bbf[_0x6fa552(0x105)])}}}];if((0x0,_univerjs_core[_0x6fa552(0xf2)])(_0x9a1efc,_0x59496b))return _0x4e9ec5[_0x6fa552(0x123)]({'unitID':_0xc47eb7,'undoMutations':_0x36fc34,'redoMutations':_0x9a1efc}),!![];return![];}},UpdateLineShapeResizeCommand={'type':_univerjs_core[_0x2a18d5(0x15f)][_0x2a18d5(0x134)],'id':_0x2a18d5(0x125),'handler':(_0x4f61ea,_0x32b945)=>{const _0x2602cc=_0x2a18d5;var _0x723f3d,_0x23776d;const _0x1e1681=(0x0,_univerjs_sheets['getSheetCommandTarget'])(_0x4f61ea[_0x2602cc(0x164)](_univerjs_core[_0x2602cc(0xd3)]),_0x32b945);if(!_0x1e1681)return![];const _0x5423df=_0x4f61ea[_0x2602cc(0x164)](_univerjs_sheets[_0x2602cc(0xe7)]),{unitId:_0x29356c,subUnitId:_0x52b05e}=_0x1e1681,_0xdee136=_0x5423df[_0x2602cc(0x13b)](_0x29356c,_0x52b05e);if(!_0xdee136)return![];const _0x31a8e5=_0x4f61ea[_0x2602cc(0x164)](_univerjs_sheets_drawing[_0x2602cc(0x182)]),{shapeId:_0x42aa5e,width:_0x5aadb9,height:_0xd18981,left:_0x5a5faa,top:_0x2a943c,flipX:_0x304e71,flipY:_0x329bdd,angle:_0xf50dff,oldAdjustValues:_0x512b7d,newAdjustValues:_0x23159e,oldLineType:_0x9a241e,newLineType:_0x29668e}=_0x32b945,_0x227626=_0x31a8e5['getDrawingByParam']({'unitId':_0x29356c,'subUnitId':_0x52b05e,'drawingId':_0x42aa5e});if(!_0x227626)return![];const _0x5e0130=_0x4f61ea[_0x2602cc(0x164)](SheetsShapeService)[_0x2602cc(0x10a)](_0x29356c,_0x52b05e,_0x42aa5e);if(!_0x5e0130)return![];const _0x419f8d=_0x4f61ea['get'](_univerjs_core['ICommandService']),_0x9dd4ca=_0x4f61ea[_0x2602cc(0x164)](_univerjs_core['IUndoRedoService']),_0x3c9b76=_0x4f61ea[_0x2602cc(0x164)](_univerjs_sheets[_0x2602cc(0x119)]),_0x361a65={..._0x227626['transform'],'width':_0x5aadb9,'height':_0xd18981,'left':_0x5a5faa,'top':_0x2a943c,'flipX':_0x304e71,'flipY':_0x329bdd,'angle':_0xf50dff},_0x13c6ec=(0x0,_univerjs_sheets_drawing[_0x2602cc(0xc3)])(_0x361a65,_0xdee136),_0x414bcc=(0x0,_univerjs_sheets_drawing[_0x2602cc(0x11a)])(_0x361a65,_0xdee136),_0x492778=_0x5e0130[_0x2602cc(0xc5)](),_0x3c1ba9=_0x5e0130[_0x2602cc(0x100)](),_0x493f26={'unitId':_0x29356c,'subUnitId':_0x52b05e,'drawingId':_0x42aa5e,'drawingType':_univerjs_core[_0x2602cc(0x16b)][_0x2602cc(0xe0)],'sheetTransform':_0x13c6ec,'transform':_0x361a65,'data':{'shapeType':_0x29668e||_0x9a241e||_0x492778,'shapeData':{..._0x3c1ba9,'adjustValues':_0x23159e||_0x512b7d||(_0x3c1ba9===null||_0x3c1ba9===void 0x0?void 0x0:_0x3c1ba9[_0x2602cc(0xde)])}},'axisAlignSheetTransform':_0x414bcc,'allowTransform':!![]},{undo:_0x1f943f,redo:_0x351afb,objects:_0x5c80ee}=_0x31a8e5[_0x2602cc(0xe2)]([_0x493f26]),_0x471a3a=_0x3c9b76[_0x2602cc(0x10e)]({'id':_univerjs_sheets_drawing[_0x2602cc(0xeb)]['id'],'params':{'unitId':_0x29356c,'drawings':[_0x493f26]}}),_0x171f21=[...(_0x723f3d=_0x471a3a[_0x2602cc(0x109)])!==null&&_0x723f3d!==void 0x0?_0x723f3d:[],{'id':_univerjs_sheets_drawing[_0x2602cc(0x118)]['id'],'params':{'unitId':_0x29356c,'subUnitId':_0x52b05e,'op':_0x351afb,'objects':_0x5c80ee,'type':_univerjs_sheets_drawing[_0x2602cc(0x186)][_0x2602cc(0x128)]}},{'id':_univerjs_sheets_drawing[_0x2602cc(0x11d)]['id'],'params':[_0x29356c]},..._0x471a3a[_0x2602cc(0x12f)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x29356c,'subUnitId':_0x52b05e,'shapeId':_0x42aa5e,'shapeType':_0x29668e,'shapeData':{'adjustValues':_0x23159e}}}],_0x138951=[...(_0x23776d=_0x471a3a[_0x2602cc(0x179)])!==null&&_0x23776d!==void 0x0?_0x23776d:[],{'id':_univerjs_sheets_drawing[_0x2602cc(0x118)]['id'],'params':{'unitId':_0x29356c,'subUnitId':_0x52b05e,'op':_0x1f943f,'objects':_0x5c80ee,'type':_univerjs_sheets_drawing[_0x2602cc(0x186)]['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x2602cc(0x11d)]['id'],'params':[_0x29356c]},..._0x471a3a[_0x2602cc(0x136)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x29356c,'subUnitId':_0x52b05e,'shapeId':_0x42aa5e,'shapeType':_0x492778,'shapeData':{..._0x3c1ba9,'adjustValues':_0x512b7d||(_0x3c1ba9===null||_0x3c1ba9===void 0x0?void 0x0:_0x3c1ba9['adjustValues'])}}}];if((0x0,_univerjs_core['sequenceExecute'])(_0x171f21,_0x419f8d))return _0x9dd4ca[_0x2602cc(0x123)]({'unitID':_0x29356c,'undoMutations':_0x138951,'redoMutations':_0x171f21}),!![];return![];}},UpdateSheetsShapeTypeMutation={'id':_0x2a18d5(0xe1),'type':_univerjs_core['CommandType'][_0x2a18d5(0xe4)],'handler':(_0x21ce2c,_0x4df78c)=>{const _0x442715=_0x2a18d5,{unitId:_0x28cef5,subUnitId:_0x31f597,shapeType:_0x3378f7,shapeId:_0x16918c,shapeData:_0x2af477}=_0x4df78c,_0x13f6da=_0x21ce2c[_0x442715(0x164)](SheetsShapeService)['getShapeModel'](_0x28cef5,_0x31f597,_0x16918c);if(_0x13f6da){_0x13f6da['setShapeType'](_0x3378f7);if(_0x2af477)_0x13f6da===null||_0x13f6da===void 0x0||_0x13f6da[_0x442715(0x141)](_0x2af477);}return!![];}},UpdateSheetsShapeTypeCommand={'id':_0x2a18d5(0xcf),'type':_univerjs_core[_0x2a18d5(0x15f)][_0x2a18d5(0x134)],'handler':(_0x2bd525,_0x2c82fe)=>{const _0x5c9618=_0x2a18d5;if(!_0x2c82fe)return![];const _0xb8103b=_0x2bd525[_0x5c9618(0x164)](_univerjs_core[_0x5c9618(0xfa)]),_0x2116f1=_0x2bd525[_0x5c9618(0x164)](SheetsShapeService),_0x53b379=_0x2bd525[_0x5c9618(0x164)](_univerjs_core[_0x5c9618(0x178)]),_0x38e92a=[],_0x5e5dc0=[],{unitId:_0x1a5075,subUnitId:_0x59b528,shapeId:_0x2b7e83,shapeType:_0x280d71,shapeData:_0x3e6426}=_0x2c82fe,_0x52b770=_0x2116f1['getShapeModel'](_0x1a5075,_0x59b528,_0x2b7e83);if(_0x52b770){const _0xef5e29=_0x52b770[_0x5c9618(0xc5)](),_0x580cd2=Object[_0x5c9618(0x115)]({},_0x52b770['getShapeData']()),_0x2288ea={'unitId':_0x1a5075,'subUnitId':_0x59b528,'shapeId':_0x2b7e83,'shapeType':_0x280d71,'shapeData':_0x3e6426},_0x3ee0b4={'unitId':_0x1a5075,'subUnitId':_0x59b528,'shapeId':_0x2b7e83,'shapeType':_0xef5e29,'shapeData':_0x580cd2};_0x38e92a['push']({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x2288ea}),_0x5e5dc0[_0x5c9618(0x16c)]({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x3ee0b4});if(_0x38e92a[_0x5c9618(0xd8)](_0x1dd3a3=>_0xb8103b[_0x5c9618(0x104)](_0x1dd3a3['id'],_0x1dd3a3[_0x5c9618(0x13c)])))_0x53b379['pushUndoRedo']({'unitID':_0x1a5075,'redoMutations':[..._0x38e92a],'undoMutations':[..._0x5e5dc0]});return!![];}return![];}};var name=_0x2a18d5(0x163),version=_0x2a18d5(0xe8);const SHEETS_SHAPE_PLUGIN_CONFIG_KEY=_0x2a18d5(0xfc),configSymbol=Symbol(SHEETS_SHAPE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let SheetsShapeController=class SheetsShapeController extends _univerjs_core['Disposable']{constructor(_0xb9f704,_0x28e2d4,_0x2ff18c,_0x41e58b,_0x506897){const _0x103dc1=_0x2a18d5;super(),this[_0x103dc1(0x166)]=_0xb9f704,this[_0x103dc1(0x188)]=_0x28e2d4,this[_0x103dc1(0xe5)]=_0x2ff18c,this[_0x103dc1(0x113)]=_0x41e58b,this[_0x103dc1(0x16e)]=_0x506897,this[_0x103dc1(0x122)](),this[_0x103dc1(0x13d)]();}[_0x2a18d5(0x122)](){const _0x450ed2=_0x2a18d5;[InsertShapeCommand,SetShapeDrawingDataCommand,ToggleSheetsShapeFlipCommand,SetSheetsShapeRotateCommand,SetSheetsShapeTextVerticalToggleCommand,UpdateConnectorRelationCommand,UpdateLineShapeResizeCommand,InsertSheetsShapeMutation,RemoveSheetsShapeMutation,UpdateSheetsShapeTypeMutation,UpdateSheetsShapeDataMutation]['forEach'](_0x5c4905=>this[_0x450ed2(0x126)](this[_0x450ed2(0x166)][_0x450ed2(0x165)](_0x5c4905)));}[_0x2a18d5(0x13d)](){const _0x1233a6=_0x2a18d5;this[_0x1233a6(0x126)](this[_0x1233a6(0x188)][_0x1233a6(0x138)]({'getMutations':_0x476099=>{const _0x403128=_0x1233a6;if(_0x476099['id']===_univerjs_sheets_drawing['RemoveSheetDrawingCommand']['id']){const {drawings:_0x12c31e}=_0x476099[_0x403128(0x13c)],_0x1ab5db=_0x12c31e['filter'](_0x502d11=>_0x502d11['drawingType']===_univerjs_core[_0x403128(0x16b)]['DRAWING_SHAPE']);if(_0x1ab5db['length']===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x361c63=[],_0x442031=[];return _0x1ab5db[_0x403128(0x12e)](_0x1ddcd8=>{const _0x4c521c=_0x403128,{unitId:_0x8f2465,subUnitId:_0x298707,drawingId:_0x10116a}=_0x1ddcd8,_0x3f2127=this[_0x4c521c(0x113)][_0x4c521c(0x10a)](_0x8f2465,_0x298707,_0x10116a);if(!_0x3f2127)throw new TypeError(_0x4c521c(0x13f)+_0x3f2127);_0x361c63[_0x4c521c(0x16c)]({'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x8f2465,'subUnitId':_0x298707,'shapeId':_0x10116a}}),_0x442031['push']({'id':InsertSheetsShapeMutation['id'],'params':{'unitId':_0x8f2465,'subUnitId':_0x298707,'shapeId':_0x10116a,'shapeType':_0x3f2127[_0x4c521c(0xc5)](),'shapeData':_0x3f2127[_0x4c521c(0x100)]()}});const _0xfb56b4=this[_0x4c521c(0x113)][_0x4c521c(0xe9)](_0x8f2465,_0x298707,_0x10116a);if(_0xfb56b4)for(const _0x3f21ff of _0xfb56b4){const _0x1321eb=_0x3f21ff[_0x4c521c(0x168)],_0x5ee33a=_0x3f21ff[_0x4c521c(0x13e)],_0x8e2724=_0x5ee33a?{'from':void 0x0}:{'to':void 0x0},_0x2a86fd=_0x5ee33a?{'from':{'shapeId':_0x3f21ff['shapeId'],'cxnIndex':_0x3f21ff[_0x4c521c(0x147)]}}:{'to':{'shapeId':_0x3f21ff[_0x4c521c(0x14d)],'cxnIndex':_0x3f21ff[_0x4c521c(0x147)]}};_0x361c63['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x8f2465,'subUnitId':_0x298707,'shapeId':_0x1321eb,'shapeData':{'relation':_0x8e2724}}}),_0x442031[_0x4c521c(0x16c)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x8f2465,'subUnitId':_0x298707,'shapeId':_0x1321eb,'shapeData':{'relation':_0x2a86fd}}});}}),{'preRedos':_0x361c63,'redos':[],'preUndos':[],'undos':_0x442031};}if(_0x476099['id']===_univerjs_sheets_drawing[_0x403128(0xeb)]['id']){const {drawings:_0x5af7e8}=_0x476099[_0x403128(0x13c)],_0x575869=_0x5af7e8['filter'](_0x23558b=>_0x23558b['drawingType']===_univerjs_core[_0x403128(0x16b)]['DRAWING_SHAPE']);if(_0x575869[_0x403128(0xff)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x40b8ed=[],_0x56073d=[];for(const _0x2cfe35 of _0x575869){const {unitId:_0x95f0c3,subUnitId:_0x5aa7c2,drawingId:_0x49a0e7,transform:_0x35671f}=_0x2cfe35;if(!_0x95f0c3||!_0x5aa7c2||!_0x49a0e7||!_0x35671f)continue;const _0xa4302d=this[_0x403128(0x113)][_0x403128(0x10a)](_0x95f0c3,_0x5aa7c2,_0x49a0e7);if(!_0xa4302d)throw new TypeError(_0x403128(0x13f)+_0xa4302d);if((0x0,_univerjs_pro_engine_shape[_0x403128(0xfb)])(_0xa4302d['getShapeType']())){const _0x671d4a=this['_sheetsShapeService'][_0x403128(0x18e)](_0x95f0c3,_0x5aa7c2,_0x49a0e7),_0x5d02f0={'from':void 0x0,'to':void 0x0};_0x671d4a&&(_0x40b8ed[_0x403128(0x16c)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x95f0c3,'subUnitId':_0x5aa7c2,'shapeId':_0x49a0e7,'shapeData':{'relation':_0x5d02f0}}}),_0x56073d[_0x403128(0x16c)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x95f0c3,'subUnitId':_0x5aa7c2,'shapeId':_0x49a0e7,'shapeData':{'relation':_0x671d4a}}}));}else{const _0xeecda8=this[_0x403128(0x113)][_0x403128(0xe9)](_0x95f0c3,_0x5aa7c2,_0x49a0e7);if(_0xeecda8&&_0xeecda8[_0x403128(0xff)]>0x0)for(const _0x10dea5 of _0xeecda8){const _0x164089=_0x10dea5['lineShapeId'],_0xc97777=_0x10dea5[_0x403128(0x13e)],_0x360b28=this[_0x403128(0x113)][_0x403128(0x10a)](_0x95f0c3,_0x5aa7c2,_0x164089);if(!_0x360b28)continue;const _0x45055e=_0x360b28[_0x403128(0x173)](),_0x5c2eb7=_0x360b28['getEndConnectInfo']();if(_0x45055e&&_0x5c2eb7)this[_0x403128(0x160)](_0x95f0c3,_0x5aa7c2,_0x164089,_0x360b28,_0x45055e,_0x5c2eb7,_0x40b8ed,_0x56073d,_0x49a0e7,_0x35671f);else this['_addLineFollowShapeUpdates'](_0x95f0c3,_0x5aa7c2,_0x164089,_0x360b28,_0xc97777?_0x45055e:_0x5c2eb7,_0xc97777,_0x40b8ed,_0x56073d,_0x49a0e7,_0x35671f);}}}return{'preRedos':[],'redos':_0x40b8ed,'preUndos':_0x56073d,'undos':[]};}return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};}}));}[_0x2a18d5(0x167)](_0x2cbe21,_0x396dff,_0x46a758,_0x15829d,_0x857494){const _0xfc62fe=_0x2a18d5;if(!_0x396dff||!_0x46a758)return null;const {shapeId:_0x4ba598,cxnIndex:_0x282947}=_0x2cbe21,_0x13710f=this[_0xfc62fe(0x113)]['getShapeModel'](_0x396dff,_0x46a758,_0x4ba598);if(!_0x13710f)return null;const _0x39e5b2=this[_0xfc62fe(0x16e)][_0xfc62fe(0x16d)]({'unitId':_0x396dff,'subUnitId':_0x46a758,'drawingId':_0x4ba598});if(!(_0x39e5b2===null||_0x39e5b2===void 0x0?void 0x0:_0x39e5b2[_0xfc62fe(0xd1)]))return null;let {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x24a6cb}=_0x39e5b2['transform'];if(_0x857494&&_0x15829d===_0x4ba598){var _0x50085e,_0x1ad76a,_0x14d31d,_0x3925c3,_0x409842,_0x372a8f,_0x5e367f;left=(_0x50085e=_0x857494[_0xfc62fe(0x12a)])!==null&&_0x50085e!==void 0x0?_0x50085e:left,top=(_0x1ad76a=_0x857494[_0xfc62fe(0xd5)])!==null&&_0x1ad76a!==void 0x0?_0x1ad76a:top,width=(_0x14d31d=_0x857494[_0xfc62fe(0xca)])!==null&&_0x14d31d!==void 0x0?_0x14d31d:width,height=(_0x3925c3=_0x857494[_0xfc62fe(0xcd)])!==null&&_0x3925c3!==void 0x0?_0x3925c3:height,flipX=(_0x409842=_0x857494['flipX'])!==null&&_0x409842!==void 0x0?_0x409842:flipX,flipY=(_0x372a8f=_0x857494['flipY'])!==null&&_0x372a8f!==void 0x0?_0x372a8f:flipY,_0x24a6cb=(_0x5e367f=_0x857494[_0xfc62fe(0x15a)])!==null&&_0x5e367f!==void 0x0?_0x5e367f:_0x24a6cb;}_0x13710f['updateContext']({'width':width,'height':height});const _0x117f16=_0x13710f[_0xfc62fe(0xce)]()['find'](_0x5a07db=>_0x5a07db['index']===_0x282947);if(!_0x117f16)return null;let _0x29f17d=flipX?width-_0x117f16['x']:_0x117f16['x'],_0x5d1e77=flipY?height-_0x117f16['y']:_0x117f16['y'];if(_0x24a6cb!==0x0&&_0x24a6cb!==void 0x0&&_0x24a6cb!==null){const _0x5bf4b9=_0x24a6cb*Math['PI']/0xb4,_0x24f7b5=Math[_0xfc62fe(0x183)](_0x5bf4b9),_0x2a20c5=Math['sin'](_0x5bf4b9),_0x2d5e81=width/0x2,_0x304f55=height/0x2,_0x5e844d=_0x29f17d-_0x2d5e81,_0x1d5347=_0x5d1e77-_0x304f55;_0x29f17d=_0x2d5e81+_0x5e844d*_0x24f7b5-_0x1d5347*_0x2a20c5,_0x5d1e77=_0x304f55+_0x5e844d*_0x2a20c5+_0x1d5347*_0x24f7b5;}_0x29f17d+=left,_0x5d1e77+=top;let _0x12d0ae=_0x117f16['ang']/0xea60;if(flipX)_0x12d0ae=0xb4-_0x12d0ae;if(flipY)_0x12d0ae=-_0x12d0ae;_0x12d0ae+=_0x24a6cb||0x0,_0x12d0ae=(_0x12d0ae%0x168+0x168)%0x168;const _0x17d1aa=(0x0,_univerjs_pro_engine_shape[_0xfc62fe(0xc4)])({'left':left,'top':top,'width':width,'height':height},_0x24a6cb||0x0);return{'point':{'x':_0x29f17d,'y':_0x5d1e77},'angle':_0x12d0ae,'bounds':_0x17d1aa};}[_0x2a18d5(0x160)](_0x40ab74,_0x214fcb,_0x5108bb,_0x52ffa6,_0x529b3d,_0x5488e1,_0x58d4f5,_0x1fced1,_0x3eee75,_0x242af5){const _0x49b9ab=_0x2a18d5,_0x8ea92f=this[_0x49b9ab(0xe5)][_0x49b9ab(0x13b)](_0x40ab74,_0x214fcb);if(!_0x8ea92f)return;const _0x478b83=_0x52ffa6[_0x49b9ab(0x108)](),_0x157c80=_0x52ffa6[_0x49b9ab(0xef)](),_0x4eaac2={},_0x1ac4f7={};_0x157c80[_0x49b9ab(0x12e)](_0x200e41=>{const _0x1cfb76=_0x49b9ab,_0x2baf34=_0x52ffa6[_0x1cfb76(0x142)](_0x200e41);_0x1ac4f7[_0x200e41]=_0x2baf34!==null&&_0x2baf34!==void 0x0?_0x2baf34:0x0;});const _0x19f8dd=this[_0x49b9ab(0x167)](_0x529b3d,_0x40ab74,_0x214fcb,_0x3eee75,_0x242af5),_0x465f3a=this['_getConnectPointInfo'](_0x5488e1,_0x40ab74,_0x214fcb,_0x3eee75,_0x242af5);if(_0x19f8dd&&_0x465f3a){const _0x213d25=_0x52ffa6[_0x49b9ab(0xc5)](),_0x1200f1=(0x0,_univerjs_pro_engine_shape[_0x49b9ab(0x14b)])(_0x19f8dd,_0x465f3a,_0x213d25);let _0x145899=_0x213d25;if(_0x1200f1){const _0x55c792=(0x0,_univerjs_pro_engine_shape[_0x49b9ab(0x10f)])(_0x1200f1,_0x52ffa6['getShapeType']()),_0x4e835b=this[_0x49b9ab(0x16e)][_0x49b9ab(0x140)](_0x40ab74,_0x214fcb);if(_0x4e835b&&_0x4e835b[_0x5108bb]){const _0x4d09f4=_0x4e835b[_0x5108bb];_0x145899=_0x55c792[_0x49b9ab(0x17e)];for(const [_0x21dea8,_0x5c01e5]of Object[_0x49b9ab(0xcc)](_0x55c792['adjustValues']))_0x4eaac2[_0x21dea8]=_0x5c01e5;const _0x3e1a8f={..._0x4d09f4[_0x49b9ab(0xd1)],'width':_0x55c792[_0x49b9ab(0xed)][_0x49b9ab(0xca)],'height':_0x55c792['worldRect'][_0x49b9ab(0xcd)],'left':_0x55c792[_0x49b9ab(0xed)]['left'],'top':_0x55c792[_0x49b9ab(0xed)][_0x49b9ab(0xd5)],'flipX':_0x55c792['worldRect'][_0x49b9ab(0x18c)],'flipY':_0x55c792[_0x49b9ab(0xed)]['flipY'],'angle':_0x55c792[_0x49b9ab(0xc7)]},_0x5f17bd=(0x0,_univerjs_sheets_drawing[_0x49b9ab(0xc3)])(_0x3e1a8f,_0x8ea92f),_0x242f31=(0x0,_univerjs_sheets_drawing['transformToAxisAlignPosition'])(_0x3e1a8f,_0x8ea92f),_0x130f87={'unitId':_0x40ab74,'subUnitId':_0x214fcb,'drawingType':_univerjs_core[_0x49b9ab(0x16b)]['DRAWING_SHAPE'],'drawingId':_0x5108bb,'transform':_0x3e1a8f,'sheetTransform':_0x5f17bd,'axisAlignSheetTransform':_0x242f31},{unitId:_0x124f4a,subUnitId:_0x1d4931,undo:_0x5d49fb,redo:_0x4dc3dd,objects:_0x32bfea}=this[_0x49b9ab(0x16e)]['getBatchUpdateOp']([_0x130f87]);_0x58d4f5['push']({'id':_univerjs_sheets_drawing[_0x49b9ab(0x118)]['id'],'params':{'unitId':_0x124f4a,'subUnitId':_0x1d4931,'op':_0x4dc3dd,'objects':_0x32bfea,'type':_univerjs_sheets_drawing[_0x49b9ab(0x186)][_0x49b9ab(0x128)]}}),_0x1fced1[_0x49b9ab(0x16c)]({'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x124f4a,'subUnitId':_0x1d4931,'op':_0x5d49fb,'objects':_0x32bfea,'type':_univerjs_sheets_drawing[_0x49b9ab(0x186)]['UPDATE']}});}_0x52ffa6[_0x49b9ab(0x129)]();}_0x58d4f5[_0x49b9ab(0x16c)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x40ab74,'subUnitId':_0x214fcb,'shapeId':_0x5108bb,'shapeType':_0x145899,'shapeData':{'adjustValues':_0x4eaac2,'relation':_0x478b83}}}),_0x1fced1[_0x49b9ab(0x16c)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x40ab74,'subUnitId':_0x214fcb,'shapeId':_0x5108bb,'shapeType':_0x213d25,'shapeData':{'adjustValues':_0x1ac4f7,'relation':_0x478b83}}});}}['_addLineFollowShapeUpdates'](_0x5c1f36,_0x53de35,_0x41da91,_0x3ec8c6,_0x1d3118,_0x201fa7,_0x38b4af,_0x580ffb,_0x538e59,_0x318941){const _0x953a7e=_0x2a18d5;var _0x2a053b;if(!_0x1d3118)return;const _0x3aa9f9=this['_sheetSkeletonService'][_0x953a7e(0x13b)](_0x5c1f36,_0x53de35);if(!_0x3aa9f9)return;const _0x480f24=(_0x2a053b=this[_0x953a7e(0x16e)][_0x953a7e(0x16d)]({'unitId':_0x5c1f36,'subUnitId':_0x53de35,'drawingId':_0x538e59}))===null||_0x2a053b===void 0x0?void 0x0:_0x2a053b[_0x953a7e(0xd1)];if(!_0x480f24)return;const _0x27080f=_0x480f24[_0x953a7e(0x12a)]!==_0x318941[_0x953a7e(0x12a)]||_0x480f24[_0x953a7e(0xd5)]!==_0x318941[_0x953a7e(0xd5)],_0x390891=_0x480f24[_0x953a7e(0xca)]!==_0x318941[_0x953a7e(0xca)]||_0x480f24[_0x953a7e(0xcd)]!==_0x318941[_0x953a7e(0xcd)],_0x2fac5e=_0x480f24['flipX']!==_0x318941[_0x953a7e(0x18c)]||_0x480f24[_0x953a7e(0xc6)]!==_0x318941[_0x953a7e(0xc6)],_0x4118f2=_0x480f24[_0x953a7e(0x15a)]!==_0x318941[_0x953a7e(0x15a)];if(_0x27080f&&!_0x390891&&!_0x2fac5e&&!_0x4118f2){var _0x2a72e4,_0x4216ee,_0x3de75e,_0xd66391;const _0x1094a6=((_0x2a72e4=_0x318941[_0x953a7e(0x12a)])!==null&&_0x2a72e4!==void 0x0?_0x2a72e4:0x0)-((_0x4216ee=_0x480f24['left'])!==null&&_0x4216ee!==void 0x0?_0x4216ee:0x0),_0x27b38a=((_0x3de75e=_0x318941['top'])!==null&&_0x3de75e!==void 0x0?_0x3de75e:0x0)-((_0xd66391=_0x480f24[_0x953a7e(0xd5)])!==null&&_0xd66391!==void 0x0?_0xd66391:0x0),_0x505068=this[_0x953a7e(0x16e)][_0x953a7e(0x140)](_0x5c1f36,_0x53de35);if(_0x505068&&_0x505068[_0x41da91]){var _0x33ecb1,_0x48408e,_0x416479,_0x1ea23a;const _0x2f095d=_0x505068[_0x41da91],_0x225bb6={..._0x2f095d['transform'],'left':((_0x33ecb1=(_0x48408e=_0x2f095d[_0x953a7e(0xd1)])===null||_0x48408e===void 0x0?void 0x0:_0x48408e[_0x953a7e(0x12a)])!==null&&_0x33ecb1!==void 0x0?_0x33ecb1:0x0)+_0x1094a6,'top':((_0x416479=(_0x1ea23a=_0x2f095d[_0x953a7e(0xd1)])===null||_0x1ea23a===void 0x0?void 0x0:_0x1ea23a[_0x953a7e(0xd5)])!==null&&_0x416479!==void 0x0?_0x416479:0x0)+_0x27b38a},_0xe3d902=(0x0,_univerjs_sheets_drawing[_0x953a7e(0xc3)])(_0x225bb6,_0x3aa9f9),_0x3db30c=(0x0,_univerjs_sheets_drawing[_0x953a7e(0x11a)])(_0x225bb6,_0x3aa9f9),_0x3f87ea={'unitId':_0x5c1f36,'subUnitId':_0x53de35,'drawingType':_univerjs_core[_0x953a7e(0x16b)][_0x953a7e(0xe0)],'drawingId':_0x41da91,'transform':_0x225bb6,'sheetTransform':_0xe3d902,'axisAlignSheetTransform':_0x3db30c},{unitId:_0x4f6e72,subUnitId:_0x300e2c,undo:_0x305e59,redo:_0x5f28a9,objects:_0x32c62f}=this['_drawingManagerService']['getBatchUpdateOp']([_0x3f87ea]);_0x38b4af['push']({'id':_univerjs_sheets_drawing[_0x953a7e(0x118)]['id'],'params':{'unitId':_0x4f6e72,'subUnitId':_0x300e2c,'op':_0x5f28a9,'objects':_0x32c62f,'type':_univerjs_sheets_drawing[_0x953a7e(0x186)][_0x953a7e(0x128)]}}),_0x580ffb[_0x953a7e(0x16c)]({'id':_univerjs_sheets_drawing[_0x953a7e(0x118)]['id'],'params':{'unitId':_0x4f6e72,'subUnitId':_0x300e2c,'op':_0x305e59,'objects':_0x32c62f,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x953a7e(0x128)]}});}}else{const _0x5b121c=_0x3ec8c6[_0x953a7e(0x173)](),_0x1b511e=_0x3ec8c6[_0x953a7e(0x124)]();this[_0x953a7e(0x160)](_0x5c1f36,_0x53de35,_0x41da91,_0x3ec8c6,_0x5b121c,_0x1b511e,_0x38b4af,_0x580ffb,_0x538e59,_0x318941);}}};SheetsShapeController=__decorate([__decorateParam(0x0,_univerjs_core[_0x2a18d5(0xfa)]),__decorateParam(0x1,(0x0,_univerjs_core['Inject'])(_univerjs_sheets[_0x2a18d5(0x119)])),__decorateParam(0x2,(0x0,_univerjs_core[_0x2a18d5(0x154)])(_univerjs_sheets[_0x2a18d5(0xe7)])),__decorateParam(0x3,(0x0,_univerjs_core[_0x2a18d5(0x154)])(SheetsShapeService)),__decorateParam(0x4,(0x0,_univerjs_core['Inject'])(_univerjs_drawing[_0x2a18d5(0xd6)]))],SheetsShapeController);let UniverSheetsShapePlugin=class UniverSheetsShapePlugin extends _univerjs_core['Plugin']{constructor(_0x55cef4=defaultPluginConfig,_0x19cc1e,_0x499636,_0xb76ad0){const _0x4459a3=_0x2a18d5;super(),this['_config']=_0x55cef4,this[_0x4459a3(0x146)]=_0x19cc1e,this['_commandService']=_0x499636,this['_configService']=_0xb76ad0;const {..._0x49de54}=(0x0,_univerjs_core[_0x4459a3(0x133)])({},defaultPluginConfig,this[_0x4459a3(0x107)]);this[_0x4459a3(0x172)][_0x4459a3(0x171)](SHEETS_SHAPE_PLUGIN_CONFIG_KEY,_0x49de54);}['onStarting'](){const _0x378696=_0x2a18d5,_0x32a6ea=this['_injector'];[[SheetShapeModelManager],[SheetsShapeService],[SheetsShapeController]][_0x378696(0x12e)](_0x3998a5=>_0x32a6ea[_0x378696(0x161)](_0x3998a5)),(0x0,_univerjs_core[_0x378696(0x111)])(_0x32a6ea,[[SheetsShapeService],[SheetsShapeController]]);}};_defineProperty(UniverSheetsShapePlugin,_0x2a18d5(0x175),_univerjs_core[_0x2a18d5(0xcb)]['UNIVER_SHEET']),_defineProperty(UniverSheetsShapePlugin,_0x2a18d5(0xf0),_0x2a18d5(0x11e)),_defineProperty(UniverSheetsShapePlugin,'packageName',name),_defineProperty(UniverSheetsShapePlugin,_0x2a18d5(0xd9),version),UniverSheetsShapePlugin=__decorate([(0x0,_univerjs_core[_0x2a18d5(0x103)])(_univerjs_pro_license['UniverLicensePlugin']),__decorateParam(0x1,(0x0,_univerjs_core[_0x2a18d5(0x154)])(_univerjs_core[_0x2a18d5(0xf9)])),__decorateParam(0x2,_univerjs_core[_0x2a18d5(0xfa)]),__decorateParam(0x3,_univerjs_core[_0x2a18d5(0x17b)])],UniverSheetsShapePlugin),exports[_0x2a18d5(0x14f)]=DEFAULT_SHAPE_HEIGHT,exports['DEFAULT_SHAPE_WIDTH']=DEFAULT_SHAPE_WIDTH,exports[_0x2a18d5(0xf6)]=InsertShapeCommand,exports[_0x2a18d5(0xf3)]=InsertSheetsShapeMutation,exports['RemoveSheetsShapeMutation']=RemoveSheetsShapeMutation,exports[_0x2a18d5(0x106)]=SetShapeDrawingDataCommand,exports[_0x2a18d5(0x11c)]=SetSheetsShapeRotateCommand,exports[_0x2a18d5(0x17f)]=SetSheetsShapeTextVerticalToggleCommand,Object[_0x2a18d5(0x14c)](exports,_0x2a18d5(0x11f),{'enumerable':!![],'get':function(){return SheetsShapeService;}}),exports[_0x2a18d5(0xfd)]=ToggleSheetsShapeFlipCommand,Object[_0x2a18d5(0x14c)](exports,_0x2a18d5(0x18d),{'enumerable':!![],'get':function(){return UniverSheetsShapePlugin;}}),exports[_0x2a18d5(0xd0)]=UpdateConnectorRelationCommand,exports[_0x2a18d5(0x155)]=UpdateLineShapeResizeCommand,exports[_0x2a18d5(0xec)]=UpdateSheetsShapeDataMutation,exports[_0x2a18d5(0x174)]=UpdateSheetsShapeTypeCommand,exports[_0x2a18d5(0x187)]=UpdateSheetsShapeTypeMutation;
|