@univerjs-pro/sheets-shape 0.21.1 → 0.22.0-insiders.20260513-0b53885

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/README.md CHANGED
@@ -1,30 +1,36 @@
1
1
  # @univerjs-pro/sheets-shape
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/@univerjs-pro/sheets-shape)](https://npmjs.org/packages/@univerjs-pro/sheets-shape)
4
- [![license](https://img.shields.io/npm/l/@univerjs-pro/sheets-shape)](https://img.shields.io/npm/l/@univerjs-pro/sheets-shape)
3
+ [![npm version](https://img.shields.io/npm/v/@univerjs-pro/sheets-shape?style=flat-square)](https://npmjs.com/package/@univerjs-pro/sheets-shape)
4
+ [![downloads](https://img.shields.io/npm/dm/@univerjs-pro/sheets-shape?style=flat-square)](https://npmjs.com/package/@univerjs-pro/sheets-shape)
5
5
 
6
- ## Introduction
6
+ `@univerjs-pro/sheets-shape` provides shape and drawing model integration for Univer Sheets.
7
7
 
8
- Sheets Shape provides the core shape/drawing model and services for Univer Sheets. It allows users to insert, update, and remove various shapes (rectangles, circles, connectors, etc.) on spreadsheet worksheets. This package handles shape data management, mutations, and the underlying shape model logic. It is typically used together with `@univerjs-pro/sheets-shape-ui`, which provides the UI interactions for shapes.
8
+ ## Package Overview
9
9
 
10
- ## Usage
11
-
12
- ### Installation
10
+ | Package | UMD global | CSS | Locales | Facade entry |
11
+ | --- | --- | :---: | :---: | :---: |
12
+ | `@univerjs-pro/sheets-shape` | `UniverProSheetsShape` | No | No | Yes |
13
13
 
14
- ```shell
15
- # Using npm
16
- npm install @univerjs-pro/sheets-shape-ui @univerjs-pro/sheets-shape
14
+ ## Installation
17
15
 
18
- # Using pnpm
19
- pnpm add @univerjs-pro/sheets-shape-ui @univerjs-pro/sheets-shape
16
+ ```sh
17
+ pnpm add @univerjs-pro/sheets-shape
18
+ # or
19
+ npm install @univerjs-pro/sheets-shape
20
20
  ```
21
21
 
22
- ### Import
22
+ Keep all `@univerjs/*` and `@univerjs-pro/*` packages on the same version.
23
+
24
+ ## Usage
23
25
 
24
26
  ```ts
25
27
  import { UniverSheetsShapePlugin } from '@univerjs-pro/sheets-shape';
26
- import { UniverSheetsShapeUIPlugin } from '@univerjs-pro/sheets-shape-ui';
27
28
 
28
29
  univer.registerPlugin(UniverSheetsShapePlugin);
29
- univer.registerPlugin(UniverSheetsShapeUIPlugin);
30
30
  ```
31
+
32
+ ## Resources
33
+
34
+ - [Documentation](https://docs.univer.ai/guides/pro)
35
+ - [NPM package](https://npmjs.com/package/@univerjs-pro/sheets-shape)
36
+
package/lib/cjs/facade.js CHANGED
@@ -1 +1 @@
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;
1
+ const _0x5016ed=_0x5e0b;(function(_0x1c1631,_0x5ee4f7){const _0x51fc40=_0x5e0b,_0x1af7fb=_0x1c1631();while(!![]){try{const _0x580e43=parseInt(_0x51fc40(0x1c6))/0x1*(-parseInt(_0x51fc40(0x1c2))/0x2)+parseInt(_0x51fc40(0x199))/0x3*(-parseInt(_0x51fc40(0x21c))/0x4)+parseInt(_0x51fc40(0x1cf))/0x5+parseInt(_0x51fc40(0x1c8))/0x6+-parseInt(_0x51fc40(0x1ec))/0x7*(parseInt(_0x51fc40(0x21d))/0x8)+-parseInt(_0x51fc40(0x197))/0x9*(-parseInt(_0x51fc40(0x1e8))/0xa)+parseInt(_0x51fc40(0x1b8))/0xb*(-parseInt(_0x51fc40(0x19a))/0xc);if(_0x580e43===_0x5ee4f7)break;else _0x1af7fb['push'](_0x1af7fb['shift']());}catch(_0x438472){_0x1af7fb['push'](_0x1af7fb['shift']());}}}(_0x5d3b,0x60c55),Object['defineProperty'](exports,Symbol[_0x5016ed(0x1c5)],{'value':_0x5016ed(0x1da)}));function _0x5e0b(_0x8138f9,_0x10c98c){_0x8138f9=_0x8138f9-0x197;const _0x5d3b1d=_0x5d3b();let _0x5e0b2c=_0x5d3b1d[_0x8138f9];return _0x5e0b2c;}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[_0x5016ed(0x1f3)]{get['ShapeTypeEnum'](){const _0xb81cda=_0x5016ed;return _univerjs_pro_engine_shape[_0xb81cda(0x1f7)];}get[_0x5016ed(0x1d2)](){const _0x5f9f5=_0x5016ed;return _univerjs_pro_engine_shape[_0x5f9f5(0x1d2)];}get[_0x5016ed(0x214)](){const _0x4c017a=_0x5016ed;return _univerjs_pro_engine_shape[_0x4c017a(0x214)];}get[_0x5016ed(0x221)](){const _0x511e7d=_0x5016ed;return _univerjs_pro_engine_shape[_0x511e7d(0x221)];}get[_0x5016ed(0x211)](){return _univerjs_pro_engine_shape['ShapeLineDashEnum'];}get[_0x5016ed(0x21f)](){return _univerjs_pro_engine_shape['ShapeLineCapEnum'];}get['ShapeLineJoinEnum'](){return _univerjs_pro_engine_shape['ShapeLineJoinEnum'];}get[_0x5016ed(0x1a0)](){return _univerjs_pro_engine_shape['ShapeArrowTypeEnum'];}get[_0x5016ed(0x1b2)](){const _0x2612f6=_0x5016ed;return _univerjs_pro_engine_shape[_0x2612f6(0x1b2)];}};_univerjs_core_facade['FEnum']['extend'](FSheetsShapeEnumMixin);function _typeof(_0xd99017){'@babel/helpers - typeof';const _0x2d8717=_0x5016ed;return _typeof=_0x2d8717(0x20d)==typeof Symbol&&_0x2d8717(0x1bc)==typeof Symbol['iterator']?function(_0x5bcf01){return typeof _0x5bcf01;}:function(_0x3ddcaa){const _0x5a5f00=_0x2d8717;return _0x3ddcaa&&_0x5a5f00(0x20d)==typeof Symbol&&_0x3ddcaa['constructor']===Symbol&&_0x3ddcaa!==Symbol[_0x5a5f00(0x19b)]?'symbol':typeof _0x3ddcaa;},_typeof(_0xd99017);}function toPrimitive(_0xf4555a,_0x306d0a){const _0x522c55=_0x5016ed;if(_0x522c55(0x1a2)!=_typeof(_0xf4555a)||!_0xf4555a)return _0xf4555a;var _0x26234c=_0xf4555a[Symbol[_0x522c55(0x1f0)]];if(void 0x0!==_0x26234c){var _0x4b2bab=_0x26234c[_0x522c55(0x22b)](_0xf4555a,_0x306d0a||'default');if(_0x522c55(0x1a2)!=_typeof(_0x4b2bab))return _0x4b2bab;throw new TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x522c55(0x1b1)===_0x306d0a?String:Number)(_0xf4555a);}function toPropertyKey(_0x374695){const _0x430908=_0x5016ed;var _0x2c67ea=toPrimitive(_0x374695,_0x430908(0x1b1));return _0x430908(0x1bc)==_typeof(_0x2c67ea)?_0x2c67ea:_0x2c67ea+'';}function _0x5d3b(){const _0xafda7d=['setStrokeColor','call','capType','9WvzPnJ','gradientStops','288621EqHprg','304896SzXSMM','prototype','drawId','drawingType','getDrawingByParam','flipX','ShapeArrowTypeEnum','_resolveExistingOrFreeEndpoint','object','isLineShape','from','getShapes','NoFill','\x20not\x20found','SheetSkeletonService','computeConnectorRouteLayout','push','DRAWING_SHAPE','IDrawingManagerService','DrawingTypeEnum','fillType','updateContext','fill','string','ShapeArrowSizeEnum','gradientAngle','point','color','executeCommand','flipY','11PafmHQ','setPosition','getWorkbook','isConnectorShape','symbol','getStartConnectInfo','getShapeRelation','type','SheetsShapeService','getShapeData','27290czMrCm','gradientType','subUnitId','toStringTag','15fqtfsk','getConnectionSites','4537506KPbaTS','setShapeType','defineProperty','stringify','FWorksheet','entries','ISheetDrawingService','1944320YhZqPj','setStrokeOpacity','ensureSkeleton','ShapeFillEnum','length','getShapeId','getAdjustValueByName','setShapeGradientFill','getAdjustPoints','setEndArrowType','SetShapeDrawingDataCommand','Module','width','height','Invalid\x20shape\x20type\x20for\x20connector.\x20Received\x20','getSize','connectionSiteIndex','rotation','DEFAULT_SHAPE_HEIGHT','getDrawingData','opacity','setShapeSolidFill','_preloadShapeProperties','generateRandomId','InsertShapeCommand','5754170dAKiKo','UpdateConnectorRelationCommand','setEndArrowSize','endArrow','1808919lGowVO','getSheetId','getUnitId','_commandService','toPrimitive','shape','abs','FEnum','keys','setHeight','_resolveEndpoints','ShapeTypeEnum','getDrawingPoints','connectShapes','shapeData','setStartArrowType','cos','sin','startArrow','RemoveSheetDrawingCommand','setStrokeLineDashType','SolidFill','adjustValues','build','find','size','updateShape','_injector','worldRect','FConnectorShape','getAdjustNames','transform','removeShape','function','setWidth','left','getShapeType','ShapeLineDashEnum','setNoneFill','DEFAULT_SHAPE_WIDTH','ShapeGradientTypeEnum','shapeType','cxnIndex','stroke','unitId','setAbsolutePosition','setStrokeLineType','get','24AAMmDL','16itqEXl','Shape\x20type\x20is\x20required.\x20Please\x20call\x20setShapeType()\x20before\x20build().','ShapeLineCapEnum','GradientFill','ShapeLineTypeEnum','setStartArrowSize','getConnectorLinePoints','convertPositionCellToSheetOverGrid','Skeleton\x20for\x20unitId\x20','getPosition','top','getEndConnectInfo','getShapeModel'];_0x5d3b=function(){return _0xafda7d;};return _0x5d3b();}function _defineProperty(_0x200b57,_0x30610e,_0x425fea){const _0x12a453=_0x5016ed;return(_0x30610e=toPropertyKey(_0x30610e))in _0x200b57?Object[_0x12a453(0x1ca)](_0x200b57,_0x30610e,{'value':_0x425fea,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x200b57[_0x30610e]=_0x425fea,_0x200b57;}var FShape=class{constructor(_0x333ccf,_0x646e7a,_0x2b1bbe,_0x1a9f3a){const _0x2986b1=_0x5016ed;_defineProperty(this,'unitId',void 0x0),_defineProperty(this,_0x2986b1(0x1c4),void 0x0),_defineProperty(this,_0x2986b1(0x19c),void 0x0),_defineProperty(this,'x',0x0),_defineProperty(this,'y',0x0),_defineProperty(this,'width',_univerjs_pro_sheets_shape[_0x2986b1(0x213)]),_defineProperty(this,_0x2986b1(0x1dc),_univerjs_pro_sheets_shape[_0x2986b1(0x1e1)]),_defineProperty(this,'shapeType',void 0x0),_defineProperty(this,'shapeData',{}),_defineProperty(this,_0x2986b1(0x207),void 0x0),this[_0x2986b1(0x218)]=_0x333ccf,this[_0x2986b1(0x1c4)]=_0x646e7a,this['drawId']=_0x2b1bbe||(0x0,_univerjs_core['generateRandomId'])(),this[_0x2986b1(0x207)]=_0x1a9f3a;}[_0x5016ed(0x1b9)](_0x30c4fc,_0x1bbbde,_0x371738,_0x27c641){const _0x140de1=_0x5016ed,_0x36b810=this[_0x140de1(0x207)][_0x140de1(0x21b)](_univerjs_sheets[_0x140de1(0x1a8)])[_0x140de1(0x1d1)](this['unitId'],this[_0x140de1(0x1c4)]);if(!_0x36b810)throw new Error('Skeleton\x20for\x20unitId\x20'+this[_0x140de1(0x218)]+'\x20and\x20subUnitId\x20'+this[_0x140de1(0x1c4)]+_0x140de1(0x1a7));const {transform:_0x2db934}=(0x0,_univerjs_sheets[_0x140de1(0x224)])(this[_0x140de1(0x218)],this[_0x140de1(0x1c4)],{'row':_0x30c4fc,'column':_0x1bbbde,'rowOffset':_0x371738,'columnOffset':_0x27c641},0x1,0x1,_0x36b810);return this['x']=_0x2db934[_0x140de1(0x20f)],this['y']=_0x2db934[_0x140de1(0x227)],this;}[_0x5016ed(0x219)](_0x104889,_0x54227b){return this['x']=_0x104889,this['y']=_0x54227b,this;}[_0x5016ed(0x1c9)](_0x56b012){const _0x145454=_0x5016ed;return this[_0x145454(0x215)]=_0x56b012,this;}[_0x5016ed(0x1e4)](_0x1836ad,_0x39bdae){const _0x1f81ce=_0x5016ed;if(!this[_0x1f81ce(0x1fa)]['fill'])this[_0x1f81ce(0x1fa)][_0x1f81ce(0x1b0)]={};this['shapeData'][_0x1f81ce(0x1b0)][_0x1f81ce(0x1ae)]=_univerjs_pro_engine_shape[_0x1f81ce(0x1d2)][_0x1f81ce(0x201)];if(_0x1836ad!==void 0x0)this['shapeData'][_0x1f81ce(0x1b0)]['color']=_0x1836ad;if(_0x39bdae!==void 0x0)this[_0x1f81ce(0x1fa)][_0x1f81ce(0x1b0)][_0x1f81ce(0x1e3)]=_0x39bdae;return this;}[_0x5016ed(0x1d6)](_0x18577f,_0x1dc01b,_0x206521){const _0xcee18d=_0x5016ed;if(_0x1dc01b===void 0x0||_0x1dc01b['length']===0x0)throw new Error('colorStops\x20is\x20required\x20and\x20should\x20contain\x20at\x20least\x20one\x20color\x20stop.');if(!this[_0xcee18d(0x1fa)]['fill'])this[_0xcee18d(0x1fa)][_0xcee18d(0x1b0)]={};this[_0xcee18d(0x1fa)]['fill'][_0xcee18d(0x198)]=_0x1dc01b,this[_0xcee18d(0x1fa)]['fill'][_0xcee18d(0x1ae)]=_univerjs_pro_engine_shape['ShapeFillEnum'][_0xcee18d(0x220)],this[_0xcee18d(0x1fa)][_0xcee18d(0x1b0)][_0xcee18d(0x1c3)]=_0x18577f;if(_0x206521!==void 0x0)this[_0xcee18d(0x1fa)][_0xcee18d(0x1b0)][_0xcee18d(0x1b3)]=_0x206521;return this;}[_0x5016ed(0x212)](){const _0x4cecd8=_0x5016ed;return this[_0x4cecd8(0x1fa)]['fill']={'fillType':_univerjs_pro_engine_shape[_0x4cecd8(0x1d2)][_0x4cecd8(0x1a6)]},this;}[_0x5016ed(0x22a)](_0x2654e6){const _0x495b52=_0x5016ed;if(!this[_0x495b52(0x1fa)][_0x495b52(0x217)])this[_0x495b52(0x1fa)][_0x495b52(0x217)]={};return this['shapeData'][_0x495b52(0x217)][_0x495b52(0x1b5)]=_0x2654e6,this;}['setStrokeWidth'](_0x4ebf3a){const _0x8c176b=_0x5016ed;if(!this['shapeData'][_0x8c176b(0x217)])this[_0x8c176b(0x1fa)][_0x8c176b(0x217)]={};return this[_0x8c176b(0x1fa)][_0x8c176b(0x217)]['width']=_0x4ebf3a,this;}[_0x5016ed(0x200)](_0x341325){const _0x5019f5=_0x5016ed;if(!this[_0x5019f5(0x1fa)]['stroke'])this[_0x5019f5(0x1fa)][_0x5019f5(0x217)]={};return this[_0x5019f5(0x1fa)][_0x5019f5(0x217)]['dashType']=_0x341325,this;}['setStrokeLineJoinType'](_0x4e6fc9){const _0xb2022e=_0x5016ed;if(!this[_0xb2022e(0x1fa)]['stroke'])this[_0xb2022e(0x1fa)][_0xb2022e(0x217)]={};return this[_0xb2022e(0x1fa)][_0xb2022e(0x217)]['lineJoinType']=_0x4e6fc9,this;}['setStrokeLineCapType'](_0xe257a4){const _0x5990bc=_0x5016ed;if(!this[_0x5990bc(0x1fa)]['stroke'])this[_0x5990bc(0x1fa)]['stroke']={};return this[_0x5990bc(0x1fa)]['stroke'][_0x5990bc(0x22c)]=_0xe257a4,this;}[_0x5016ed(0x1d0)](_0xad66c0){const _0x18947c=_0x5016ed;if(!this['shapeData'][_0x18947c(0x217)])this[_0x18947c(0x1fa)][_0x18947c(0x217)]={};return this[_0x18947c(0x1fa)][_0x18947c(0x217)][_0x18947c(0x1e3)]=_0xad66c0,this;}[_0x5016ed(0x21a)](_0x5bd188){const _0x368714=_0x5016ed;if(!this[_0x368714(0x1fa)][_0x368714(0x217)])this[_0x368714(0x1fa)][_0x368714(0x217)]={};return this[_0x368714(0x1fa)]['stroke']['lineStrokeType']=_0x5bd188,this;}[_0x5016ed(0x20e)](_0x4852a8){const _0x4821b8=_0x5016ed;return this[_0x4821b8(0x1db)]=_0x4852a8,this;}[_0x5016ed(0x1f5)](_0x1a8715){return this['height']=_0x1a8715,this;}[_0x5016ed(0x1a3)](){const _0x17a334=_0x5016ed,_0x37be63=this[_0x17a334(0x207)][_0x17a334(0x21b)](_univerjs_pro_sheets_shape[_0x17a334(0x1c0)])[_0x17a334(0x229)](this[_0x17a334(0x218)],this[_0x17a334(0x1c4)],this[_0x17a334(0x19c)]);if(_0x37be63)return(0x0,_univerjs_pro_engine_shape[_0x17a334(0x1bb)])(_0x37be63[_0x17a334(0x210)]());if(this[_0x17a334(0x215)])return(0x0,_univerjs_pro_engine_shape[_0x17a334(0x1bb)])(this[_0x17a334(0x215)]);return![];}[_0x5016ed(0x1c7)](){const _0x39aa83=_0x5016ed,_0xd51df4=this[_0x39aa83(0x207)]['get'](_univerjs_pro_sheets_shape[_0x39aa83(0x1c0)])['getShapeModel'](this['unitId'],this[_0x39aa83(0x1c4)],this[_0x39aa83(0x19c)]);if(!_0xd51df4)return[];const _0x39dc15=this[_0x39aa83(0x207)][_0x39aa83(0x21b)](_univerjs_drawing[_0x39aa83(0x1ac)])[_0x39aa83(0x19e)]({'unitId':this['unitId'],'subUnitId':this[_0x39aa83(0x1c4)],'drawingId':this[_0x39aa83(0x19c)]});if(!(_0x39dc15===null||_0x39dc15===void 0x0?void 0x0:_0x39dc15['transform']))return[];const {width:width=0x0,height:height=0x0}=_0x39dc15['transform'];return _0xd51df4[_0x39aa83(0x1af)]({'width':width,'height':height}),_0xd51df4['getConnectionSiteList']();}[_0x5016ed(0x1d7)](){const _0x2cbaa7=_0x5016ed,_0xb2b498=this[_0x2cbaa7(0x207)][_0x2cbaa7(0x21b)](_univerjs_pro_sheets_shape['SheetsShapeService'])[_0x2cbaa7(0x229)](this['unitId'],this[_0x2cbaa7(0x1c4)],this['drawId']);if(!_0xb2b498)return[];const _0x55ddd0=this[_0x2cbaa7(0x207)][_0x2cbaa7(0x21b)](_univerjs_drawing[_0x2cbaa7(0x1ac)])[_0x2cbaa7(0x19e)]({'unitId':this[_0x2cbaa7(0x218)],'subUnitId':this['subUnitId'],'drawingId':this['drawId']});if(!(_0x55ddd0===null||_0x55ddd0===void 0x0?void 0x0:_0x55ddd0[_0x2cbaa7(0x20b)]))return[];const {width:width=0x0,height:height=0x0}=_0x55ddd0[_0x2cbaa7(0x20b)];return _0xb2b498[_0x2cbaa7(0x1af)]({'width':width,'height':height}),_0xb2b498[_0x2cbaa7(0x1f8)]();}[_0x5016ed(0x223)](){const _0xeae39c=_0x5016ed,_0x25c82a=this[_0xeae39c(0x207)]['get'](_univerjs_pro_sheets_shape[_0xeae39c(0x1c0)])[_0xeae39c(0x229)](this[_0xeae39c(0x218)],this[_0xeae39c(0x1c4)],this[_0xeae39c(0x19c)]);if(!_0x25c82a)return[];if(!(0x0,_univerjs_pro_engine_shape['isConnectorShape'])(_0x25c82a['getShapeType']()))return[];const _0x1081fd=this[_0xeae39c(0x207)]['get'](_univerjs_drawing[_0xeae39c(0x1ac)])[_0xeae39c(0x19e)]({'unitId':this[_0xeae39c(0x218)],'subUnitId':this[_0xeae39c(0x1c4)],'drawingId':this[_0xeae39c(0x19c)]});if(!(_0x1081fd===null||_0x1081fd===void 0x0?void 0x0:_0x1081fd['transform']))return[];const {width:width=0x0,height:height=0x0}=_0x1081fd[_0xeae39c(0x20b)];return _0x25c82a[_0xeae39c(0x1af)]({'width':width,'height':height}),_0x25c82a[_0xeae39c(0x223)]();}[_0x5016ed(0x1bd)](){const _0xdad9e6=_0x5016ed;var _0x50aa8c;const _0x2d6a6b=this[_0xdad9e6(0x207)][_0xdad9e6(0x21b)](_univerjs_pro_sheets_shape['SheetsShapeService'])[_0xdad9e6(0x229)](this[_0xdad9e6(0x218)],this['subUnitId'],this[_0xdad9e6(0x19c)]);if(!_0x2d6a6b)return null;return(_0x50aa8c=_0x2d6a6b[_0xdad9e6(0x1bd)]())!==null&&_0x50aa8c!==void 0x0?_0x50aa8c:null;}[_0x5016ed(0x228)](){const _0x5d431e=_0x5016ed;var _0x1178b0;const _0x4dd6b1=this[_0x5d431e(0x207)][_0x5d431e(0x21b)](_univerjs_pro_sheets_shape[_0x5d431e(0x1c0)])[_0x5d431e(0x229)](this[_0x5d431e(0x218)],this[_0x5d431e(0x1c4)],this['drawId']);if(!_0x4dd6b1)return null;return(_0x1178b0=_0x4dd6b1[_0x5d431e(0x228)]())!==null&&_0x1178b0!==void 0x0?_0x1178b0:null;}['build'](){const _0x5cb783=_0x5016ed;var _0x1aa785,_0x724570;if(!this[_0x5cb783(0x215)])throw new Error(_0x5cb783(0x21e));if(this['x']===0x0||this['y']===0x0){const _0x376e0e=this['_injector'][_0x5cb783(0x21b)](_univerjs_sheets[_0x5cb783(0x1a8)])['ensureSkeleton'](this[_0x5cb783(0x218)],this['subUnitId']);if(!_0x376e0e)throw new Error(_0x5cb783(0x225)+this['unitId']+'\x20and\x20subUnitId\x20'+this[_0x5cb783(0x1c4)]+_0x5cb783(0x1a7));const {transform:_0x20b2d4}=(0x0,_univerjs_sheets[_0x5cb783(0x224)])(this[_0x5cb783(0x218)],this[_0x5cb783(0x1c4)],{'row':0x1,'column':0x1,'rowOffset':0x0,'columnOffset':0x0},0x1,0x1,_0x376e0e);this['x']=this['x']>0x0?this['x']:_0x20b2d4[_0x5cb783(0x20f)],this['y']=this['y']>0x0?this['y']:_0x20b2d4[_0x5cb783(0x227)];}return this['width']=(_0x1aa785=this[_0x5cb783(0x1db)])!==null&&_0x1aa785!==void 0x0?_0x1aa785:_univerjs_pro_sheets_shape['DEFAULT_SHAPE_WIDTH'],this[_0x5cb783(0x1dc)]=(_0x724570=this[_0x5cb783(0x1dc)])!==null&&_0x724570!==void 0x0?_0x724570:_univerjs_pro_sheets_shape['DEFAULT_SHAPE_HEIGHT'],{'unitId':this['unitId'],'subUnitId':this[_0x5cb783(0x1c4)],'shapeId':this[_0x5cb783(0x19c)],'shapeType':this[_0x5cb783(0x215)],'shapeData':Object[_0x5cb783(0x1f4)](this[_0x5cb783(0x1fa)])[_0x5cb783(0x1d3)]>0x0?this[_0x5cb783(0x1fa)]:void 0x0,'x':this['x'],'y':this['y'],'width':this[_0x5cb783(0x1db)],'height':this[_0x5cb783(0x1dc)]};}[_0x5016ed(0x1d4)](){const _0x43f3d8=_0x5016ed;return this[_0x43f3d8(0x19c)];}[_0x5016ed(0x210)](){return this['shapeType'];}[_0x5016ed(0x1c1)](){const _0x1a237b=_0x5016ed;return this[_0x1a237b(0x1fa)];}[_0x5016ed(0x226)](){return{'x':this['x'],'y':this['y']};}[_0x5016ed(0x1de)](){const _0x13dff0=_0x5016ed;return{'width':this[_0x13dff0(0x1db)],'height':this[_0x13dff0(0x1dc)]};}},FConnectorShape=class extends FShape{constructor(_0x31d3aa,_0x204cdf,_0x2b474f,_0x2b9f70){const _0x27fb0e=_0x5016ed;super(_0x31d3aa,_0x204cdf,_0x2b474f,_0x2b9f70),_defineProperty(this,_0x27fb0e(0x1fa),{});}[_0x5016ed(0x1c9)](_0x584e88){const _0x26a577=_0x5016ed;if(!(0x0,_univerjs_pro_engine_shape[_0x26a577(0x1bb)])(_0x584e88))throw new Error(_0x26a577(0x1dd)+_0x584e88+',\x20but\x20expected\x20a\x20connector\x20shape\x20type.');return super['setShapeType'](_0x584e88),this;}[_0x5016ed(0x1fb)](_0x134376){const _0x14ab06=_0x5016ed;var _0x59fe31,_0x311882;if(!((_0x59fe31=this[_0x14ab06(0x1fa)])===null||_0x59fe31===void 0x0?void 0x0:_0x59fe31['ln']))this['shapeData']['ln']={};if(!((_0x311882=this[_0x14ab06(0x1fa)])===null||_0x311882===void 0x0||(_0x311882=_0x311882['ln'])===null||_0x311882===void 0x0?void 0x0:_0x311882[_0x14ab06(0x1fe)]))this[_0x14ab06(0x1fa)]['ln']['startArrow']={};return this[_0x14ab06(0x1fa)]['ln'][_0x14ab06(0x1fe)][_0x14ab06(0x1bf)]=_0x134376,this;}[_0x5016ed(0x1d8)](_0x349ddb){const _0x4d2093=_0x5016ed;var _0x1f09b8,_0x29f232;if(!((_0x1f09b8=this[_0x4d2093(0x1fa)])===null||_0x1f09b8===void 0x0?void 0x0:_0x1f09b8['ln']))this[_0x4d2093(0x1fa)]['ln']={};if(!((_0x29f232=this['shapeData'])===null||_0x29f232===void 0x0||(_0x29f232=_0x29f232['ln'])===null||_0x29f232===void 0x0?void 0x0:_0x29f232[_0x4d2093(0x1eb)]))this['shapeData']['ln'][_0x4d2093(0x1eb)]={};return this[_0x4d2093(0x1fa)]['ln'][_0x4d2093(0x1eb)][_0x4d2093(0x1bf)]=_0x349ddb,this;}[_0x5016ed(0x222)](_0x42ca95){const _0x2a35c9=_0x5016ed;var _0x55b62e,_0x2a115e;if(!((_0x55b62e=this[_0x2a35c9(0x1fa)])===null||_0x55b62e===void 0x0?void 0x0:_0x55b62e['ln']))this[_0x2a35c9(0x1fa)]['ln']={};if(!((_0x2a115e=this['shapeData'])===null||_0x2a115e===void 0x0||(_0x2a115e=_0x2a115e['ln'])===null||_0x2a115e===void 0x0?void 0x0:_0x2a115e[_0x2a35c9(0x1fe)]))this['shapeData']['ln'][_0x2a35c9(0x1fe)]={};return this[_0x2a35c9(0x1fa)]['ln'][_0x2a35c9(0x1fe)][_0x2a35c9(0x205)]=_0x42ca95,this;}[_0x5016ed(0x1ea)](_0x4ad048){const _0x16d96e=_0x5016ed;var _0x112e21,_0x196542;if(!((_0x112e21=this[_0x16d96e(0x1fa)])===null||_0x112e21===void 0x0?void 0x0:_0x112e21['ln']))this[_0x16d96e(0x1fa)]['ln']={};if(!((_0x196542=this['shapeData'])===null||_0x196542===void 0x0||(_0x196542=_0x196542['ln'])===null||_0x196542===void 0x0?void 0x0:_0x196542[_0x16d96e(0x1eb)]))this[_0x16d96e(0x1fa)]['ln'][_0x16d96e(0x1eb)]={};return this[_0x16d96e(0x1fa)]['ln']['endArrow'][_0x16d96e(0x205)]=_0x4ad048,this;}[_0x5016ed(0x203)](){const _0x12bf5a=_0x5016ed;return super[_0x12bf5a(0x203)]();}[_0x5016ed(0x228)](){var _0x53a75e;return((_0x53a75e=this['shapeData'])===null||_0x53a75e===void 0x0||(_0x53a75e=_0x53a75e['relation'])===null||_0x53a75e===void 0x0?void 0x0:_0x53a75e['to'])||null;}[_0x5016ed(0x1bd)](){const _0xbccea1=_0x5016ed;var _0x3cb51e;return((_0x3cb51e=this['shapeData'])===null||_0x3cb51e===void 0x0||(_0x3cb51e=_0x3cb51e['relation'])===null||_0x3cb51e===void 0x0?void 0x0:_0x3cb51e[_0xbccea1(0x1a4)])||null;}};function computeConnectionPointInfo(_0x508edb,_0x53eec1,_0x1599a0,_0x4bfc37,_0x5535b0,_0x1e0e21){const _0x59d038=_0x5016ed,_0x4eafb8=_0x5535b0[_0x59d038(0x229)](_0x508edb,_0x53eec1,_0x1599a0);if(!_0x4eafb8)return null;const _0x810338=_0x1e0e21[_0x59d038(0x19e)]({'unitId':_0x508edb,'subUnitId':_0x53eec1,'drawingId':_0x1599a0});if(!(_0x810338===null||_0x810338===void 0x0?void 0x0:_0x810338[_0x59d038(0x20b)]))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x20ad9a}=_0x810338[_0x59d038(0x20b)];_0x4eafb8[_0x59d038(0x1af)]({'width':width,'height':height});const _0x1d3fef=_0x4eafb8['getConnectionSiteList']()[_0x59d038(0x204)](_0x27264a=>_0x27264a['index']===_0x4bfc37);if(!_0x1d3fef)return null;let _0x28dcfd=flipX?width-_0x1d3fef['x']:_0x1d3fef['x'],_0x12d62c=flipY?height-_0x1d3fef['y']:_0x1d3fef['y'];if(_0x20ad9a&&_0x20ad9a!==0x0){const _0x50965e=_0x20ad9a*Math['PI']/0xb4,_0x50ada5=Math[_0x59d038(0x1fc)](_0x50965e),_0x4f74c3=Math[_0x59d038(0x1fd)](_0x50965e),_0x2834e0=width/0x2,_0x3dfa51=height/0x2,_0x1da314=_0x28dcfd-_0x2834e0,_0x4fc4fe=_0x12d62c-_0x3dfa51;_0x28dcfd=_0x2834e0+_0x1da314*_0x50ada5-_0x4fc4fe*_0x4f74c3,_0x12d62c=_0x3dfa51+_0x1da314*_0x4f74c3+_0x4fc4fe*_0x50ada5;}_0x28dcfd+=left,_0x12d62c+=top;let _0x52691d=_0x1d3fef['ang']/0xea60;if(flipX)_0x52691d=0xb4-_0x52691d;if(flipY)_0x52691d=-_0x52691d;_0x52691d+=_0x20ad9a||0x0,_0x52691d=(_0x52691d%0x168+0x168)%0x168;const _0x412a24=(0x0,_univerjs_pro_engine_shape['getBasicShapeRotateBound'])({'left':left,'top':top,'width':width,'height':height},_0x20ad9a||0x0);return{'point':{'x':_0x28dcfd,'y':_0x12d62c},'angle':_0x52691d,'bounds':_0x412a24};}function calculateFreeEndpointAngle(_0x540ece,_0x5186b9){const _0x306946=_0x5016ed,_0x47d48d=_0x5186b9['x']-_0x540ece['x'],_0x5d316f=_0x5186b9['y']-_0x540ece['y'];if(Math[_0x306946(0x1f2)](_0x47d48d)>=Math[_0x306946(0x1f2)](_0x5d316f))return _0x47d48d>=0x0?0xb4:0x0;return _0x5d316f>=0x0?0x10e:0x5a;}function computeFreeEndpointInfo(_0x3be494,_0x1afe6b,_0x527439,_0x5565cb,_0x399fa0,_0x11feb6,_0x3c65a1){const _0x43f236=_0x5016ed,_0x576375=_0x11feb6['getShapeModel'](_0x3be494,_0x1afe6b,_0x527439);if(!_0x576375)return null;const _0x2bee32=_0x3c65a1[_0x43f236(0x19e)]({'unitId':_0x3be494,'subUnitId':_0x1afe6b,'drawingId':_0x527439});if(!(_0x2bee32===null||_0x2bee32===void 0x0?void 0x0:_0x2bee32[_0x43f236(0x20b)]))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![]}=_0x2bee32[_0x43f236(0x20b)];_0x576375[_0x43f236(0x1af)]({'width':width,'height':height});const _0x1598ff=_0x576375[_0x43f236(0x223)]();if(_0x1598ff[_0x43f236(0x1d3)]<0x2)return null;const _0x39febd=_0x5565cb?_0x1598ff[0x0]:_0x1598ff[_0x1598ff[_0x43f236(0x1d3)]-0x1],_0x59e396=new _univerjs_pro_engine_shape['ConnectorCoordinateTransform']({'left':left,'top':top,'width':width,'height':height,'flipX':flipX,'flipY':flipY})['localToWorld'](_0x39febd);return{'point':_0x59e396,'angle':calculateFreeEndpointAngle(_0x399fa0[_0x43f236(0x1b4)],_0x59e396),'bounds':{'left':_0x59e396['x'],'top':_0x59e396['y'],'width':0x0,'height':0x0}};}var FWorksheetShapeMixin=class extends _univerjs_sheets_facade['FWorksheet']{async['insertShape'](_0x47ad7e){const _0x1692c1=_0x5016ed,{unitId:_0x2a744d,subUnitId:_0x3f45d2,shapeId:_0x14f8d4,shapeType:_0x32ef2d,shapeData:_0x7a4a3f,x:_0x3371f2,y:_0x2ddcf4,width:_0x4bb3a5,height:_0x430943}=_0x47ad7e;return this[_0x1692c1(0x1ef)][_0x1692c1(0x1b6)](_univerjs_pro_sheets_shape[_0x1692c1(0x1e7)]['id'],{'unitId':_0x2a744d,'subUnitId':_0x3f45d2,'shapeId':_0x14f8d4,'shapeType':_0x32ef2d,'shapeData':_0x7a4a3f,'position':{'x':_0x3371f2,'y':_0x2ddcf4},'width':_0x4bb3a5,'height':_0x430943});}async[_0x5016ed(0x206)](_0x40cf20){const _0x2a4650=_0x5016ed,{unitId:_0x4d8d8e,subUnitId:_0x33997f,shapeId:_0x45d59d,shapeType:_0x407e95,shapeData:_0x1f96b7,x:_0x5c10b5,y:_0x3cd376,width:_0x43140f,height:_0x19d432}=_0x40cf20;return this['_commandService'][_0x2a4650(0x1b6)](_univerjs_pro_sheets_shape[_0x2a4650(0x1d9)]['id'],{'unitId':_0x4d8d8e,'subUnitId':_0x33997f,'shapeId':_0x45d59d,'shapeType':_0x407e95,'shapeData':_0x1f96b7,'position':{'x':_0x5c10b5,'y':_0x3cd376},'width':_0x43140f,'height':_0x19d432});}['newShape'](_0x119ad4){const _0x43a307=_0x5016ed,_0x5afe86=this['getWorkbook']()['getUnitId'](),_0x1bd1f7=this[_0x43a307(0x1ed)]();if(_0x119ad4){const _0xc3ecbf=new FShape(_0x5afe86,_0x1bd1f7,_0x119ad4[_0x43a307(0x19c)],this[_0x43a307(0x207)]);return this['_preloadShapeProperties'](_0xc3ecbf,_0x5afe86,_0x1bd1f7,_0x119ad4[_0x43a307(0x19c)]),_0xc3ecbf;}return new FShape(_0x5afe86,_0x1bd1f7,(0x0,_univerjs_core['generateRandomId'])(),this['_injector']);}['newConnector'](_0x5d9084){const _0x441a0a=_0x5016ed,_0x270f6c=this[_0x441a0a(0x1ba)]()[_0x441a0a(0x1ee)](),_0x419ca0=this['getSheetId']();if(_0x5d9084){const _0x31409d=new FConnectorShape(_0x270f6c,_0x419ca0,_0x5d9084['drawId'],this[_0x441a0a(0x207)]);return this['_preloadShapeProperties'](_0x31409d,_0x270f6c,_0x419ca0,_0x5d9084[_0x441a0a(0x19c)]),_0x31409d;}return new FConnectorShape(_0x270f6c,_0x419ca0,(0x0,_univerjs_core[_0x441a0a(0x1e6)])(),this[_0x441a0a(0x207)]);}[_0x5016ed(0x1a5)](){const _0x30b99a=_0x5016ed,_0x1416f2=this[_0x30b99a(0x207)][_0x30b99a(0x21b)](_univerjs_sheets_drawing[_0x30b99a(0x1ce)]),_0x47e23c=this[_0x30b99a(0x1ba)]()[_0x30b99a(0x1ee)](),_0x2c10b3=this[_0x30b99a(0x1ed)](),_0x4f9b84=_0x1416f2[_0x30b99a(0x1e2)](_0x47e23c,_0x2c10b3);if(!_0x4f9b84)return[];const _0x260010=[];for(const [_0x449a74,_0x550302]of Object[_0x30b99a(0x1cd)](_0x4f9b84))if(_0x550302&&_0x550302[_0x30b99a(0x19d)]===_univerjs_core[_0x30b99a(0x1ad)][_0x30b99a(0x1ab)]){const _0x209436=new FShape(_0x47e23c,_0x2c10b3,_0x449a74,this[_0x30b99a(0x207)]);this[_0x30b99a(0x1e5)](_0x209436,_0x47e23c,_0x2c10b3,_0x449a74),_0x260010[_0x30b99a(0x1aa)](_0x209436);}return _0x260010;}[_0x5016ed(0x20c)](_0x5ec03b){const _0x246b83=_0x5016ed,{unitId:_0x28059e,subUnitId:_0x320a04,drawId:_0x3cd27a}=_0x5ec03b;return this['_commandService'][_0x246b83(0x1b6)](_univerjs_sheets_drawing[_0x246b83(0x1ff)]['id'],{'unitId':_0x28059e,'drawings':[{'unitId':_0x28059e,'subUnitId':_0x320a04,'drawingId':_0x3cd27a,'drawingType':_univerjs_core['DrawingTypeEnum'][_0x246b83(0x1ab)]}]});}async[_0x5016ed(0x1f9)](_0x1f6c6d){const _0x28ffc8=_0x5016ed,{connector:_0x156fe2,startTarget:_0x146904,endTarget:_0x4b9395}=_0x1f6c6d;if(!_0x146904&&!_0x4b9395)return![];const _0x33176c=this[_0x28ffc8(0x1ba)]()['getUnitId'](),_0x2a7cfe=this['getSheetId'](),_0x3706fb=this[_0x28ffc8(0x207)][_0x28ffc8(0x21b)](_univerjs_pro_sheets_shape[_0x28ffc8(0x1c0)]),_0x287c57=this['_injector'][_0x28ffc8(0x21b)](_univerjs_drawing[_0x28ffc8(0x1ac)]),_0x49df08=_0x3706fb[_0x28ffc8(0x229)](_0x33176c,_0x2a7cfe,_0x156fe2[_0x28ffc8(0x19c)]);if(!_0x49df08)return![];const _0x335602=_0x49df08[_0x28ffc8(0x210)](),_0x34c1b8=_0x49df08[_0x28ffc8(0x1be)](),_0x3a6dd3={};for(const _0x55fe4b of _0x49df08[_0x28ffc8(0x20a)]()){const _0x33e836=_0x49df08[_0x28ffc8(0x1d5)](_0x55fe4b);if(_0x33e836!==void 0x0)_0x3a6dd3[_0x55fe4b]=_0x33e836;}const {startInfo:_0x13612d,endInfo:_0x4a1e45}=this[_0x28ffc8(0x1f6)](_0x33176c,_0x2a7cfe,_0x156fe2,_0x49df08,_0x146904,_0x4b9395,_0x3706fb,_0x287c57,_0x34c1b8);if(!_0x13612d||!_0x4a1e45)return![];const _0x365820=(0x0,_univerjs_pro_engine_shape[_0x28ffc8(0x1a9)])((0x0,_univerjs_pro_engine_shape['routeConnectorLineShape'])(_0x13612d,_0x4a1e45,_0x335602),_0x335602),_0x49fd3f={};if(_0x146904)_0x49fd3f[_0x28ffc8(0x1a4)]={'shapeId':_0x146904[_0x28ffc8(0x1f1)][_0x28ffc8(0x19c)],'cxnIndex':_0x146904[_0x28ffc8(0x1df)]};else{if(_0x34c1b8===null||_0x34c1b8===void 0x0?void 0x0:_0x34c1b8[_0x28ffc8(0x1a4)])_0x49fd3f[_0x28ffc8(0x1a4)]=_0x34c1b8[_0x28ffc8(0x1a4)];}if(_0x4b9395)_0x49fd3f['to']={'shapeId':_0x4b9395['shape'][_0x28ffc8(0x19c)],'cxnIndex':_0x4b9395[_0x28ffc8(0x1df)]};else{if(_0x34c1b8===null||_0x34c1b8===void 0x0?void 0x0:_0x34c1b8['to'])_0x49fd3f['to']=_0x34c1b8['to'];}return this[_0x28ffc8(0x1ef)]['executeCommand'](_univerjs_pro_sheets_shape[_0x28ffc8(0x1e9)]['id'],{'unitId':_0x33176c,'subUnitId':_0x2a7cfe,'connectorShapeId':_0x156fe2['drawId'],'width':_0x365820['worldRect'][_0x28ffc8(0x1db)],'height':_0x365820[_0x28ffc8(0x208)][_0x28ffc8(0x1dc)],'left':_0x365820['worldRect'][_0x28ffc8(0x20f)],'top':_0x365820[_0x28ffc8(0x208)]['top'],'flipX':_0x365820[_0x28ffc8(0x208)][_0x28ffc8(0x19f)]||![],'flipY':_0x365820[_0x28ffc8(0x208)][_0x28ffc8(0x1b7)]||![],'oldAdjustValues':_0x3a6dd3,'newAdjustValues':_0x365820[_0x28ffc8(0x202)],'newLineType':_0x365820['lineType'],'oldLineType':_0x335602,'rotation':_0x365820[_0x28ffc8(0x1e0)],'oldRelation':_0x34c1b8,'newRelation':_0x49fd3f});}[_0x5016ed(0x1e5)](_0x1e9071,_0x251ab1,_0x293755,_0x4f7493){const _0x57e7f5=_0x5016ed,_0xae159c=this['_injector'][_0x57e7f5(0x21b)](_univerjs_drawing[_0x57e7f5(0x1ac)])[_0x57e7f5(0x19e)]({'unitId':_0x251ab1,'subUnitId':_0x293755,'drawingId':_0x4f7493});if(_0xae159c===null||_0xae159c===void 0x0?void 0x0:_0xae159c[_0x57e7f5(0x20b)]){var _0x57f9ea,_0xbce360,_0x5cf96b,_0x99c23;_0x1e9071['x']=(_0x57f9ea=_0xae159c[_0x57e7f5(0x20b)][_0x57e7f5(0x20f)])!==null&&_0x57f9ea!==void 0x0?_0x57f9ea:0x0,_0x1e9071['y']=(_0xbce360=_0xae159c[_0x57e7f5(0x20b)][_0x57e7f5(0x227)])!==null&&_0xbce360!==void 0x0?_0xbce360:0x0,_0x1e9071[_0x57e7f5(0x1db)]=(_0x5cf96b=_0xae159c[_0x57e7f5(0x20b)][_0x57e7f5(0x1db)])!==null&&_0x5cf96b!==void 0x0?_0x5cf96b:_0x1e9071[_0x57e7f5(0x1db)],_0x1e9071['height']=(_0x99c23=_0xae159c[_0x57e7f5(0x20b)][_0x57e7f5(0x1dc)])!==null&&_0x99c23!==void 0x0?_0x99c23:_0x1e9071[_0x57e7f5(0x1dc)];}const _0x21ea8c=this[_0x57e7f5(0x207)][_0x57e7f5(0x21b)](_univerjs_pro_sheets_shape['SheetsShapeService'])['getShapeModel'](_0x251ab1,_0x293755,_0x4f7493);if(_0x21ea8c){_0x1e9071[_0x57e7f5(0x215)]=_0x21ea8c['getShapeType']();const _0x25c4ee=_0x21ea8c['getShapeData']();if(_0x25c4ee)_0x1e9071['shapeData']=JSON['parse'](JSON[_0x57e7f5(0x1cb)](_0x25c4ee));}}[_0x5016ed(0x1f6)](_0x2b1f6b,_0x471796,_0x40bca1,_0x44b435,_0x14d173,_0x5a5c81,_0x2c1f6f,_0x56301e,_0x3ebf51){const _0x285935=_0x5016ed;let _0x4f28d0=null,_0x218701=null;if(_0x14d173)_0x4f28d0=computeConnectionPointInfo(_0x2b1f6b,_0x471796,_0x14d173[_0x285935(0x1f1)]['drawId'],_0x14d173[_0x285935(0x1df)],_0x2c1f6f,_0x56301e);if(_0x5a5c81)_0x218701=computeConnectionPointInfo(_0x2b1f6b,_0x471796,_0x5a5c81['shape'][_0x285935(0x19c)],_0x5a5c81[_0x285935(0x1df)],_0x2c1f6f,_0x56301e);if(!_0x4f28d0)_0x4f28d0=this[_0x285935(0x1a1)](_0x2b1f6b,_0x471796,_0x40bca1[_0x285935(0x19c)],!![],_0x218701,_0x3ebf51===null||_0x3ebf51===void 0x0?void 0x0:_0x3ebf51[_0x285935(0x1a4)],_0x2c1f6f,_0x56301e);if(!_0x218701)_0x218701=this[_0x285935(0x1a1)](_0x2b1f6b,_0x471796,_0x40bca1[_0x285935(0x19c)],![],_0x4f28d0,_0x3ebf51===null||_0x3ebf51===void 0x0?void 0x0:_0x3ebf51['to'],_0x2c1f6f,_0x56301e);return{'startInfo':_0x4f28d0,'endInfo':_0x218701};}[_0x5016ed(0x1a1)](_0x207218,_0x133cfb,_0x3b8c2f,_0x4f0e49,_0x532280,_0x23dd90,_0x2ce37b,_0x4e066b){const _0x4acf54=_0x5016ed;if(_0x23dd90){const _0x12f778=computeConnectionPointInfo(_0x207218,_0x133cfb,_0x23dd90['shapeId'],_0x23dd90[_0x4acf54(0x216)],_0x2ce37b,_0x4e066b);if(_0x12f778)return _0x12f778;}if(!_0x532280)return null;return computeFreeEndpointInfo(_0x207218,_0x133cfb,_0x3b8c2f,_0x4f0e49,_0x532280,_0x2ce37b,_0x4e066b);}};_univerjs_sheets_facade[_0x5016ed(0x1cc)]['extend'](FWorksheetShapeMixin),exports[_0x5016ed(0x209)]=FConnectorShape,exports['FShape']=FShape;
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
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;
1
+ const _0xe533fd=_0x4113;function _0x4113(_0xe78dcf,_0x408c8d){_0xe78dcf=_0xe78dcf-0x120;const _0x192e0a=_0x192e();let _0x411338=_0x192e0a[_0xe78dcf];return _0x411338;}(function(_0xb34538,_0x48fe3){const _0x1d2bff=_0x4113,_0x31475a=_0xb34538();while(!![]){try{const _0x4d39e5=parseInt(_0x1d2bff(0x1d6))/0x1+parseInt(_0x1d2bff(0x179))/0x2*(-parseInt(_0x1d2bff(0x1b2))/0x3)+-parseInt(_0x1d2bff(0x155))/0x4+parseInt(_0x1d2bff(0x1b0))/0x5+parseInt(_0x1d2bff(0x191))/0x6*(-parseInt(_0x1d2bff(0x147))/0x7)+parseInt(_0x1d2bff(0x198))/0x8+parseInt(_0x1d2bff(0x19d))/0x9*(-parseInt(_0x1d2bff(0x130))/0xa);if(_0x4d39e5===_0x48fe3)break;else _0x31475a['push'](_0x31475a['shift']());}catch(_0x4e1640){_0x31475a['push'](_0x31475a['shift']());}}}(_0x192e,0x433cb),Object[_0xe533fd(0x145)](exports,Symbol[_0xe533fd(0x1cc)],{'value':_0xe533fd(0x1d3)}));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(_0x401e06){'@babel/helpers - typeof';const _0x428b24=_0xe533fd;return _typeof='function'==typeof Symbol&&_0x428b24(0x124)==typeof Symbol[_0x428b24(0x1e8)]?function(_0x3d4766){return typeof _0x3d4766;}:function(_0x12121d){const _0x12d40c=_0x428b24;return _0x12121d&&_0x12d40c(0x176)==typeof Symbol&&_0x12121d['constructor']===Symbol&&_0x12121d!==Symbol[_0x12d40c(0x1d8)]?_0x12d40c(0x124):typeof _0x12121d;},_typeof(_0x401e06);}function toPrimitive(_0x2eb2aa,_0x58bc6e){const _0x11a946=_0xe533fd;if(_0x11a946(0x143)!=_typeof(_0x2eb2aa)||!_0x2eb2aa)return _0x2eb2aa;var _0x3fc239=_0x2eb2aa[Symbol[_0x11a946(0x1c8)]];if(void 0x0!==_0x3fc239){var _0x2b7158=_0x3fc239[_0x11a946(0x1bb)](_0x2eb2aa,_0x58bc6e||'default');if(_0x11a946(0x143)!=_typeof(_0x2b7158))return _0x2b7158;throw new TypeError(_0x11a946(0x174));}return(_0x11a946(0x19a)===_0x58bc6e?String:Number)(_0x2eb2aa);}function toPropertyKey(_0x5d8b1d){const _0x1ba8f8=_0xe533fd;var _0x2e99ca=toPrimitive(_0x5d8b1d,_0x1ba8f8(0x19a));return _0x1ba8f8(0x124)==_typeof(_0x2e99ca)?_0x2e99ca:_0x2e99ca+'';}function _defineProperty(_0x57f93c,_0x22234f,_0x2b4d3b){const _0x46af1d=_0xe533fd;return(_0x22234f=toPropertyKey(_0x22234f))in _0x57f93c?Object[_0x46af1d(0x145)](_0x57f93c,_0x22234f,{'value':_0x2b4d3b,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x57f93c[_0x22234f]=_0x2b4d3b,_0x57f93c;}var SheetShapeModelManager=class extends _univerjs_core['Disposable']{constructor(){const _0x147757=_0xe533fd;super(),_defineProperty(this,_0x147757(0x16f),new Map()),_defineProperty(this,_0x147757(0x1ce),new Set()),_defineProperty(this,_0x147757(0x1d4),new Set());}['addShape'](_0x186d0f,_0x106371,_0x1d9220){const _0x4556c0=_0xe533fd,_0x228c8e=new _univerjs_pro_engine_shape[(_0x4556c0(0x1cb))](_0x186d0f,_0x106371,_0x1d9220);this[_0x4556c0(0x16f)][_0x4556c0(0x14a)](_0x106371,_0x228c8e);if((0x0,_univerjs_pro_engine_shape[_0x4556c0(0x149)])(_0x186d0f))this['_linesIds'][_0x4556c0(0x1d9)](_0x106371);return _0x228c8e;}[_0xe533fd(0x1d0)](_0xc24859){const _0x56e2ba=_0xe533fd,_0xd4de33=[];for(const _0x54fada of this['_linesIds']){const _0x2a2b5c=this['_shapes'][_0x56e2ba(0x1a8)](_0x54fada);if(_0x2a2b5c){const _0x42aba2=_0x2a2b5c[_0x56e2ba(0x139)]();if(_0x42aba2){var _0x6a77bf,_0x154201;if(((_0x6a77bf=_0x42aba2[_0x56e2ba(0x1e2)])===null||_0x6a77bf===void 0x0?void 0x0:_0x6a77bf[_0x56e2ba(0x1d2)])===_0xc24859)_0xd4de33[_0x56e2ba(0x167)]({..._0x42aba2[_0x56e2ba(0x1e2)],'lineShapeId':_0x54fada,'isFrom':!![]});if(((_0x154201=_0x42aba2['to'])===null||_0x154201===void 0x0?void 0x0:_0x154201[_0x56e2ba(0x1d2)])===_0xc24859)_0xd4de33[_0x56e2ba(0x167)]({..._0x42aba2['to'],'lineShapeId':_0x54fada,'isFrom':![]});}}}return _0xd4de33;}[_0xe533fd(0x152)](_0x5c2906){const _0x1847ce=_0xe533fd,_0x556594=this['_shapes']['get'](_0x5c2906);if(_0x556594)return _0x556594[_0x1847ce(0x139)]();}['getShapeType'](_0xa0cd9d){const _0x430ea5=_0xe533fd,_0x39e120=this[_0x430ea5(0x16f)]['get'](_0xa0cd9d);if(_0x39e120)return _0x39e120[_0x430ea5(0x1d5)]();}[_0xe533fd(0x186)](_0x5dd765){const _0x22e185=_0xe533fd;return this[_0x22e185(0x16f)][_0x22e185(0x1ae)](_0x5dd765);}['removeShape'](_0x900e55){const _0xec8db2=_0xe533fd,_0x3562d0=this[_0xec8db2(0x16f)][_0xec8db2(0x1a8)](_0x900e55);if(!_0x3562d0)return;if((0x0,_univerjs_pro_engine_shape[_0xec8db2(0x149)])(_0x3562d0[_0xec8db2(0x1d5)]()))this[_0xec8db2(0x1ce)][_0xec8db2(0x148)](_0x900e55);this[_0xec8db2(0x16f)]['delete'](_0x900e55);}[_0xe533fd(0x195)](){const _0x2f9e46=_0xe533fd,_0x26bcfe=[];return this[_0x2f9e46(0x16f)][_0x2f9e46(0x159)](_0xdabbb3=>{const _0x12b2f9=_0x2f9e46;_0x26bcfe[_0x12b2f9(0x167)](_0xdabbb3[_0x12b2f9(0x195)]());}),_0x26bcfe;}[_0xe533fd(0x144)](_0x3394a6){const _0x29d003=_0xe533fd;for(const _0x2171b6 of _0x3394a6){const {id:_0x3d7a35,shapeType:_0x5c0957}=_0x2171b6,_0x3cf8ad=this[_0x29d003(0x1e1)](_0x5c0957,_0x3d7a35,_0x2171b6['shapeData']);if(_0x3cf8ad&&_0x3cf8ad['isLineShape']())this[_0x29d003(0x1ce)][_0x29d003(0x1d9)](_0x3d7a35);}}[_0xe533fd(0x1c2)](){const _0x4e3dd0=_0xe533fd;if(this[_0x4e3dd0(0x135)])return;this['_shapes'][_0x4e3dd0(0x159)](_0xbb2726=>{_0xbb2726['dispose']();}),this[_0x4e3dd0(0x16f)][_0x4e3dd0(0x1b4)](),this[_0x4e3dd0(0x1ce)]['clear'](),this[_0x4e3dd0(0x1d4)][_0x4e3dd0(0x1b4)](),super[_0x4e3dd0(0x1c2)]();}};function __decorateParam(_0x164c1b,_0x3e6aa0){return function(_0x29cdee,_0x2149a5){_0x3e6aa0(_0x29cdee,_0x2149a5,_0x164c1b);};}function __decorate(_0x4b8874,_0x203d68,_0x41bc65,_0x276260){const _0xb8511f=_0xe533fd;var _0x4a91c7=arguments['length'],_0x294627=_0x4a91c7<0x3?_0x203d68:_0x276260===null?_0x276260=Object[_0xb8511f(0x140)](_0x203d68,_0x41bc65):_0x276260,_0x18e531;if(typeof Reflect===_0xb8511f(0x143)&&typeof Reflect['decorate']===_0xb8511f(0x176))_0x294627=Reflect[_0xb8511f(0x142)](_0x4b8874,_0x203d68,_0x41bc65,_0x276260);else{for(var _0x14ae50=_0x4b8874[_0xb8511f(0x1ca)]-0x1;_0x14ae50>=0x0;_0x14ae50--)if(_0x18e531=_0x4b8874[_0x14ae50])_0x294627=(_0x4a91c7<0x3?_0x18e531(_0x294627):_0x4a91c7>0x3?_0x18e531(_0x203d68,_0x41bc65,_0x294627):_0x18e531(_0x203d68,_0x41bc65))||_0x294627;}return _0x4a91c7>0x3&&_0x294627&&Object[_0xb8511f(0x145)](_0x203d68,_0x41bc65,_0x294627),_0x294627;}const SHEET_SHAPE_PLUGIN='SHEET_SHAPE_PLUGIN';let SheetsShapeService=class SheetsShapeService extends _univerjs_core[_0xe533fd(0x13d)]{constructor(_0x3098b6){const _0x1108b3=_0xe533fd;super(),this[_0x1108b3(0x12a)]=_0x3098b6,_defineProperty(this,'_shapeModelManagerMap',new Map()),this[_0x1108b3(0x123)]();}[_0xe533fd(0x1a0)](_0x467feb,_0x1f6cd3){const _0x5e633e=_0xe533fd;let _0x5a3f56=this[_0x5e633e(0x1b5)]['get'](_0x467feb);!_0x5a3f56&&(_0x5a3f56=new Map(),this[_0x5e633e(0x1b5)][_0x5e633e(0x14a)](_0x467feb,_0x5a3f56));let _0x35ae6d=_0x5a3f56['get'](_0x1f6cd3);return!_0x35ae6d&&(_0x35ae6d=new SheetShapeModelManager(),_0x5a3f56[_0x5e633e(0x14a)](_0x1f6cd3,_0x35ae6d)),_0x35ae6d;}[_0xe533fd(0x1a3)](_0x2602dc,_0x42b20a,_0x4359d6,_0x2701d4,_0x3cd3fe){const _0x56f2eb=_0xe533fd;this[_0x56f2eb(0x1a0)](_0x2602dc,_0x42b20a)[_0x56f2eb(0x1e1)](_0x4359d6,_0x2701d4,_0x3cd3fe);}[_0xe533fd(0x1c9)](_0x4f8438,_0x4e2327,_0x5a1a75){const _0x25e117=_0xe533fd;this[_0x25e117(0x1a0)](_0x4f8438,_0x4e2327)['removeShape'](_0x5a1a75);}[_0xe533fd(0x1c0)](_0x5da298,_0x54ffc8,_0x30556b){const _0x225ce2=_0xe533fd;return this[_0x225ce2(0x1a0)](_0x5da298,_0x54ffc8)[_0x225ce2(0x1d5)](_0x30556b);}[_0xe533fd(0x1d5)](_0x34adff,_0x3308e5,_0x2e9fa2){const _0x5df5d4=_0xe533fd;return this[_0x5df5d4(0x1a0)](_0x34adff,_0x3308e5)['getShapeType'](_0x2e9fa2);}[_0xe533fd(0x186)](_0x4ec34c,_0x482adc,_0x1a85c4){const _0x5c5960=_0xe533fd;return this[_0x5c5960(0x1a0)](_0x4ec34c,_0x482adc)[_0x5c5960(0x186)](_0x1a85c4);}[_0xe533fd(0x17e)](_0x584dd8,_0x520a32,_0x2df932){const _0x5768ee=_0xe533fd;return this[_0x5768ee(0x1a0)](_0x584dd8,_0x520a32)['getShapeType'](_0x2df932);}[_0xe533fd(0x1de)](_0x5aaf86,_0x3b09c5,_0x49ea62){const _0x6d7437=_0xe533fd,_0x31a114=this[_0x6d7437(0x1a0)](_0x5aaf86,_0x3b09c5);if(!_0x31a114[_0x6d7437(0x1d5)](_0x49ea62))return;const _0x1fc026=_0x31a114[_0x6d7437(0x16f)][_0x6d7437(0x1a8)](_0x49ea62);if(!_0x1fc026)return;return _0x1fc026[_0x6d7437(0x1e3)]();}[_0xe533fd(0x168)](_0x532df1,_0x3fc11a,_0x482fb4){const _0xafc88b=_0xe533fd;return this[_0xafc88b(0x1a0)](_0x532df1,_0x3fc11a)[_0xafc88b(0x16f)]['get'](_0x482fb4);}[_0xe533fd(0x1d0)](_0x4e0ff7,_0x564a85,_0x85da59){const _0x162c93=_0xe533fd;return this['_ensureShapeModelManager'](_0x4e0ff7,_0x564a85)[_0x162c93(0x1d0)](_0x85da59);}['getLineShapeRelation'](_0x5301de,_0x17724b,_0x417fba){const _0x204808=_0xe533fd,_0x33c5a9=this[_0x204808(0x1a0)](_0x5301de,_0x17724b)[_0x204808(0x16f)][_0x204808(0x1a8)](_0x417fba);if(!_0x33c5a9)return;return _0x33c5a9[_0x204808(0x139)]();}[_0xe533fd(0x1df)](){}[_0xe533fd(0x126)](_0x489ee2){const _0x76d9fe=_0xe533fd,_0x1f8023={},_0x3882ed=this['_shapeModelManagerMap'][_0x76d9fe(0x1a8)](_0x489ee2);if(_0x3882ed)_0x3882ed[_0x76d9fe(0x159)]((_0x5cf29d,_0x2f58d9)=>{const _0x35d551=_0x76d9fe,_0xd1cc0f=_0x5cf29d[_0x35d551(0x195)]();if(_0xd1cc0f[_0x35d551(0x1ca)]>0x0)_0x1f8023[_0x2f58d9]=_0xd1cc0f;});return JSON[_0x76d9fe(0x15f)](_0x1f8023);}[_0xe533fd(0x163)](_0xfde516,_0x48dea8){const _0x25f845=_0xe533fd;Object['keys'](_0x48dea8)[_0x25f845(0x159)](_0x484307=>{const _0x58845d=_0x25f845;this['_ensureShapeModelManager'](_0xfde516,_0x484307)[_0x58845d(0x144)](_0x48dea8[_0x484307]);});}[_0xe533fd(0x195)](){const _0x5602b6=_0xe533fd,_0x54eda0={};return this[_0x5602b6(0x1b5)][_0x5602b6(0x159)]((_0xb5589a,_0x191bc3)=>{const _0x43f97e=_0x5602b6;_0x54eda0[_0x191bc3]={},_0xb5589a[_0x43f97e(0x159)]((_0x199516,_0x30a54d)=>{_0x54eda0[_0x191bc3][_0x30a54d]=_0x199516['toJSON']();});}),_0x54eda0;}[_0xe533fd(0x144)](_0x23e2bd){const _0xfb5fd7=_0xe533fd;Object[_0xfb5fd7(0x14d)](_0x23e2bd)[_0xfb5fd7(0x159)](_0x382208=>{const _0x5e7e46=_0xfb5fd7,_0x4c4113=_0x23e2bd[_0x382208];Object[_0x5e7e46(0x14d)](_0x4c4113)['forEach'](_0x4cd635=>{const _0x46b28f=_0x5e7e46;this[_0x46b28f(0x1a0)](_0x382208,_0x4cd635)[_0x46b28f(0x144)](_0x4c4113[_0x4cd635]);});});}['_initSnapshot'](){const _0x242b08=_0xe533fd;this[_0x242b08(0x12a)][_0x242b08(0x153)]({'pluginName':SHEET_SHAPE_PLUGIN,'businesses':[_univerjs_core[_0x242b08(0x1b7)][_0x242b08(0x141)]],'toJson':_0x338de9=>this['_serializeShapeForUnit'](_0x338de9),'parseJson':_0x25dfb3=>JSON[_0x242b08(0x1dc)](_0x25dfb3),'onLoad':(_0x4676bf,_0xfa1643)=>{const _0x479776=_0x242b08;this[_0x479776(0x163)](_0x4676bf,_0xfa1643);},'onUnLoad':_0x7008f1=>{const _0x225e25=_0x242b08,_0x291deb=this[_0x225e25(0x1b5)][_0x225e25(0x1a8)](_0x7008f1);_0x291deb&&(_0x291deb[_0x225e25(0x159)](_0x3d03db=>{const _0x5c573b=_0x225e25;_0x3d03db[_0x5c573b(0x1c2)]();}),this['_shapeModelManagerMap'][_0x225e25(0x148)](_0x7008f1));}});}[_0xe533fd(0x1c2)](){const _0x1f996d=_0xe533fd;this['_shapeModelManagerMap'][_0x1f996d(0x159)](_0x91f88c=>{const _0x867762=_0x1f996d;_0x91f88c[_0x867762(0x159)](_0x2c43bb=>{const _0x13515a=_0x867762;_0x2c43bb[_0x13515a(0x1c2)]();});});}};SheetsShapeService=__decorate([__decorateParam(0x0,_univerjs_core['IResourceManagerService'])],SheetsShapeService);const InsertSheetsShapeMutation={'id':_0xe533fd(0x134),'type':_univerjs_core[_0xe533fd(0x18f)][_0xe533fd(0x137)],'handler':(_0x26f456,_0x1ab7bf)=>{const _0x29b00b=_0xe533fd,{unitId:_0x235a1a,subUnitId:_0x3b6877,shapeType:_0x3001a5,shapeId:_0x54cc59,shapeData:_0x2dc809}=_0x1ab7bf;return _0x26f456[_0x29b00b(0x1a8)](SheetsShapeService)[_0x29b00b(0x1a3)](_0x235a1a,_0x3b6877,_0x3001a5,_0x54cc59,_0x2dc809),!![];}},RemoveSheetsShapeMutation={'id':_0xe533fd(0x1c5),'type':_univerjs_core[_0xe533fd(0x18f)][_0xe533fd(0x137)],'handler':(_0x1e166f,_0x2d01a9)=>{const _0x2330dc=_0xe533fd,{unitId:_0x263df2,subUnitId:_0x26c8bc,shapeId:_0x306c08}=_0x2d01a9;return _0x1e166f['get'](SheetsShapeService)[_0x2330dc(0x1c9)](_0x263df2,_0x26c8bc,_0x306c08),!![];}},InsertShapeCommand={'type':_univerjs_core[_0xe533fd(0x18f)][_0xe533fd(0x19f)],'id':_0xe533fd(0x157),'handler':(_0x145206,_0x292224)=>{const _0x637487=_0xe533fd;var _0x5a2ce6,_0x1d68a4;const _0x1e3cdd=(0x0,_univerjs_sheets[_0x637487(0x171)])(_0x145206[_0x637487(0x1a8)](_univerjs_core[_0x637487(0x18a)]),_0x292224);if(!_0x1e3cdd)return![];const _0x1a5efb=_0x145206['get'](_univerjs_sheets[_0x637487(0x16d)]),{unitId:_0x3cd742,subUnitId:_0x4951bb}=_0x1e3cdd,_0x25b999=_0x1a5efb[_0x637487(0x192)](_0x3cd742,_0x4951bb);if(!_0x25b999)return![];const _0x24f92e=_0x145206[_0x637487(0x1a8)](_univerjs_core[_0x637487(0x180)]),_0x4e48d1=_0x145206[_0x637487(0x1a8)](_univerjs_core['IUndoRedoService']),_0x1f4966=_0x145206[_0x637487(0x1a8)](_univerjs_sheets['SheetInterceptorService']),_0x4e0e2e=_0x145206[_0x637487(0x1a8)](_univerjs_sheets_drawing['ISheetDrawingService']),{shapeType:_0x27806a,shapeData:_0x577c72}=_0x292224,_0x577a37=_0x292224[_0x637487(0x1d2)]||(0x0,_univerjs_core[_0x637487(0x1e5)])(),_0xa1e07e={'unitId':_0x3cd742,'subUnitId':_0x4951bb,'shapeId':_0x577a37,'shapeType':_0x27806a,'shapeData':_0x577c72},_0x4bb139=_0x292224['width']||0xc8,_0x167488=_0x292224[_0x637487(0x1e9)]||0xc8;let _0x21e99d=0x0,_0x4d79c8=0x0,_0x1ef27d={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0},_0x133bc3={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0};if(_0x292224['position']){const {x:_0x3bdd8e,y:_0x4ba86b}=_0x292224['position'];_0x21e99d=_0x3bdd8e,_0x4d79c8=_0x4ba86b,_0x1ef27d=_0x25b999[_0x637487(0x177)](_0x3bdd8e,_0x4ba86b),_0x133bc3=_0x25b999[_0x637487(0x177)](_0x3bdd8e+_0x4bb139,_0x4ba86b+_0x167488);}else{if(_0x292224[_0x637487(0x175)]){const {startRow:_0x2ebcec,startColumn:_0x556fd7}=_0x292224[_0x637487(0x175)],_0x4e070e=0xa,_0x56c4f3=0xa;_0x1ef27d={'row':_0x2ebcec,'rowOffset':_0x4e070e,'column':_0x556fd7,'columnOffset':_0x56c4f3};const _0x3a3edd=_0x25b999['getCellWithCoordByIndex'](_0x2ebcec,_0x556fd7);_0x21e99d=_0x3a3edd[_0x637487(0x181)]+_0x56c4f3,_0x4d79c8=_0x3a3edd[_0x637487(0x164)]+_0x4e070e,_0x133bc3=_0x25b999[_0x637487(0x177)](_0x21e99d+_0x4bb139,_0x4d79c8+_0x167488);}}const _0x3b314e={'from':_0x1ef27d,'to':_0x133bc3},_0xa0c394={'unitId':_0x3cd742,'subUnitId':_0x4951bb,'drawingId':_0x577a37,'drawingType':_univerjs_core[_0x637487(0x1c6)][_0x637487(0x17d)],'sheetTransform':_0x3b314e,'transform':{'left':_0x21e99d,'top':_0x4d79c8,'width':_0x4bb139,'height':_0x167488},'data':{'shapeType':_0x27806a,'shapeData':_0x577c72},'axisAlignSheetTransform':_0x3b314e,'allowTransform':!![]};(0x0,_univerjs_pro_engine_shape[_0x637487(0x149)])(_0x27806a)&&(_0xa0c394[_0x637487(0x17b)]['fill']=![],_0xa0c394[_0x637487(0x17b)]['rotateEnabled']=![],_0xa0c394[_0x637487(0x17b)]['resizeEnabled']=![],_0xa0c394[_0x637487(0x17b)][_0x637487(0x1e6)]=![],_0xa0c394[_0x637487(0x125)]['rotateEnabled']=![],_0xa0c394['transform'][_0x637487(0x178)]=![],_0xa0c394[_0x637487(0x125)][_0x637487(0x1e6)]=![]);const {undo:_0x5db76c,redo:_0x93331d,objects:_0x1056b6}=_0x4e0e2e[_0x637487(0x1b6)]([_0xa0c394]),_0x1fbd4c=_0x1f4966[_0x637487(0x1c4)]({'id':_univerjs_sheets_drawing[_0x637487(0x199)]['id'],'params':{'unitId':_0x3cd742,'drawings':[_0xa0c394]}}),_0x9cdd4=[...(_0x5a2ce6=_0x1fbd4c[_0x637487(0x129)])!==null&&_0x5a2ce6!==void 0x0?_0x5a2ce6:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x3cd742,'subUnitId':_0x4951bb,'op':_0x93331d,'objects':_0x1056b6,'type':_univerjs_sheets_drawing[_0x637487(0x1a7)]['INSERT']}},{'id':_univerjs_sheets_drawing[_0x637487(0x17f)]['id'],'params':[_0x3cd742]},..._0x1fbd4c[_0x637487(0x158)],{'id':InsertSheetsShapeMutation['id'],'params':_0xa1e07e}],_0x37a733=[{'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x3cd742,'subUnitId':_0x4951bb,'shapeId':_0x577a37}},...(_0x1d68a4=_0x1fbd4c[_0x637487(0x13a)])!==null&&_0x1d68a4!==void 0x0?_0x1d68a4:[],{'id':_univerjs_sheets_drawing[_0x637487(0x151)]['id'],'params':{'unitId':_0x3cd742,'subUnitId':_0x4951bb,'op':_0x5db76c,'objects':_0x1056b6,'type':_univerjs_sheets_drawing[_0x637487(0x1a7)]['REMOVE']}},{'id':_univerjs_sheets_drawing[_0x637487(0x17f)]['id'],'params':[_0x3cd742]},..._0x1fbd4c[_0x637487(0x14e)]];if((0x0,_univerjs_core['sequenceExecute'])(_0x9cdd4,_0x24f92e)[_0x637487(0x160)])return _0x4e48d1['pushUndoRedo']({'unitID':_0x3cd742,'undoMutations':_0x37a733,'redoMutations':_0x9cdd4}),!![];return![];}},UpdateSheetsShapeDataMutation={'id':_0xe533fd(0x138),'type':_univerjs_core[_0xe533fd(0x18f)][_0xe533fd(0x137)],'handler':(_0x24458e,_0x415d1b)=>{const _0x2e7568=_0xe533fd,{unitId:_0x23d328,subUnitId:_0x3b900a,shapeType:_0xd8c2bc,shapeId:_0x24e5aa,shapeData:_0x5b2c68}=_0x415d1b,_0xb8d0a3=_0x24458e[_0x2e7568(0x1a8)](SheetsShapeService)[_0x2e7568(0x168)](_0x23d328,_0x3b900a,_0x24e5aa);if(_0xb8d0a3){if(_0xd8c2bc!==void 0x0)_0xb8d0a3[_0x2e7568(0x1df)](_0xd8c2bc);if(_0x5b2c68)_0xb8d0a3===null||_0xb8d0a3===void 0x0||_0xb8d0a3['setShapeData'](_0x5b2c68,!![]);}return!![];}},SetShapeDrawingDataCommand={'type':_univerjs_core[_0xe533fd(0x18f)][_0xe533fd(0x19f)],'id':_0xe533fd(0x1a9),'handler':(_0x7f6b63,_0x332e08)=>{const _0x563af6=_0xe533fd;var _0x1646a3,_0x13c0e0;const _0x3e59df=(0x0,_univerjs_sheets['getSheetCommandTarget'])(_0x7f6b63[_0x563af6(0x1a8)](_univerjs_core['IUniverInstanceService']),_0x332e08);if(!_0x3e59df)return![];const _0x17e7e0=_0x7f6b63[_0x563af6(0x1a8)](_univerjs_sheets[_0x563af6(0x16d)]),{unitId:_0x26e2f3,subUnitId:_0x54efe4}=_0x3e59df,_0xe2f40e=_0x17e7e0[_0x563af6(0x192)](_0x26e2f3,_0x54efe4);if(!_0xe2f40e)return![];const _0x3c4fdb=_0x7f6b63['get'](SheetsShapeService),{shapeId:_0x43d06f,shapeType:_0x32eb60,shapeData:_0x425f23,position:_0x50b214,width:_0x4b4c81,height:_0x4ad5da}=_0x332e08,_0x4ecdcf=_0x3c4fdb[_0x563af6(0x168)](_0x26e2f3,_0x54efe4,_0x43d06f);if(!_0x4ecdcf)return![];const _0xea105e=_0x7f6b63[_0x563af6(0x1a8)](_univerjs_core[_0x563af6(0x180)]),_0x424f47=_0x7f6b63[_0x563af6(0x1a8)](_univerjs_core['IUndoRedoService']),_0x4e79e9=_0x7f6b63['get'](_univerjs_sheets[_0x563af6(0x1e4)]),_0x1e70f1=_0x7f6b63[_0x563af6(0x1a8)](_univerjs_sheets_drawing[_0x563af6(0x1a1)]),_0xdbaa0f={'unitId':_0x26e2f3,'subUnitId':_0x54efe4,'shapeId':_0x43d06f,'shapeType':_0x32eb60,'shapeData':_0x425f23},_0x29e926=_0x4ecdcf[_0x563af6(0x1d5)](),_0x2f77a8=_0x4ecdcf[_0x563af6(0x1e3)](),{x:_0x2cdb1c,y:_0x4796ce}=_0x50b214,_0x306f31={'from':_0xe2f40e[_0x563af6(0x177)](_0x2cdb1c,_0x4796ce),'to':_0xe2f40e[_0x563af6(0x177)](_0x2cdb1c+_0x4b4c81,_0x4796ce+_0x4ad5da)},_0x5cf639={'unitId':_0x26e2f3,'subUnitId':_0x54efe4,'drawingId':_0x43d06f,'drawingType':_univerjs_core[_0x563af6(0x1c6)]['DRAWING_SHAPE'],'sheetTransform':_0x306f31,'transform':{'left':_0x2cdb1c,'top':_0x4796ce,'width':_0x4b4c81,'height':_0x4ad5da},'data':{'shapeType':_0x32eb60,'shapeData':_0x425f23},'axisAlignSheetTransform':_0x306f31,'allowTransform':!![]};(0x0,_univerjs_pro_engine_shape[_0x563af6(0x149)])(_0x32eb60)&&(_0x5cf639[_0x563af6(0x17b)]['fill']=![],_0x5cf639['data'][_0x563af6(0x1a2)]=![],_0x5cf639['data'][_0x563af6(0x178)]=![],_0x5cf639[_0x563af6(0x17b)][_0x563af6(0x1e6)]=![],_0x5cf639[_0x563af6(0x125)][_0x563af6(0x1a2)]=![],_0x5cf639['transform'][_0x563af6(0x178)]=![],_0x5cf639[_0x563af6(0x125)][_0x563af6(0x1e6)]=![]);const {undo:_0x2430b1,redo:_0x5c6c24,objects:_0x2b5302}=_0x1e70f1[_0x563af6(0x12f)]([_0x5cf639]),_0x3abbbd=_0x4e79e9[_0x563af6(0x1c4)]({'id':_univerjs_sheets_drawing[_0x563af6(0x120)]['id'],'params':{'unitId':_0x26e2f3,'drawings':[_0x5cf639]}}),_0x410821=[...(_0x1646a3=_0x3abbbd[_0x563af6(0x129)])!==null&&_0x1646a3!==void 0x0?_0x1646a3:[],{'id':_univerjs_sheets_drawing[_0x563af6(0x151)]['id'],'params':{'unitId':_0x26e2f3,'subUnitId':_0x54efe4,'op':_0x5c6c24,'objects':_0x2b5302,'type':_univerjs_sheets_drawing[_0x563af6(0x1a7)][_0x563af6(0x1ba)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x26e2f3]},..._0x3abbbd[_0x563af6(0x158)],{'id':UpdateSheetsShapeDataMutation['id'],'params':_0xdbaa0f}],_0x390fc6=[...(_0x13c0e0=_0x3abbbd[_0x563af6(0x13a)])!==null&&_0x13c0e0!==void 0x0?_0x13c0e0:[],{'id':_univerjs_sheets_drawing[_0x563af6(0x151)]['id'],'params':{'unitId':_0x26e2f3,'subUnitId':_0x54efe4,'op':_0x2430b1,'objects':_0x2b5302,'type':_univerjs_sheets_drawing[_0x563af6(0x1a7)][_0x563af6(0x1ba)]}},{'id':_univerjs_sheets_drawing[_0x563af6(0x17f)]['id'],'params':[_0x26e2f3]},..._0x3abbbd[_0x563af6(0x14e)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x26e2f3,'subUnitId':_0x54efe4,'shapeType':_0x29e926,'shapeId':_0x43d06f,'shapeData':_0x2f77a8}}];if((0x0,_univerjs_core['sequenceExecute'])(_0x410821,_0xea105e)[_0x563af6(0x160)])return _0x424f47['pushUndoRedo']({'unitID':_0x26e2f3,'undoMutations':_0x390fc6,'redoMutations':_0x410821}),!![];return![];}},ToggleSheetsShapeFlipCommand={'type':_univerjs_core[_0xe533fd(0x18f)][_0xe533fd(0x19f)],'id':_0xe533fd(0x173),'handler':(_0xccfe,_0x1856bc)=>{const _0xdecbff=_0xe533fd;var _0x32c763,_0x543709;const _0x2865af=(0x0,_univerjs_sheets[_0xdecbff(0x171)])(_0xccfe[_0xdecbff(0x1a8)](_univerjs_core[_0xdecbff(0x18a)]),_0x1856bc);if(!_0x2865af)return![];const _0x3af104=_0xccfe[_0xdecbff(0x1a8)](_univerjs_sheets[_0xdecbff(0x16d)]),{unitId:_0xa2ef25,subUnitId:_0x393f82}=_0x2865af,_0x2bd405=_0x3af104[_0xdecbff(0x1aa)](_0xa2ef25,_0x393f82);if(!_0x2bd405)return![];const _0x15f141=_0xccfe['get'](_univerjs_sheets_drawing[_0xdecbff(0x1a1)]),{shapeId:_0x419a2f,flipH:_0x1074d3,flipV:_0x422597}=_0x1856bc,_0x1500f1=_0x15f141[_0xdecbff(0x1db)]({'unitId':_0xa2ef25,'subUnitId':_0x393f82,'drawingId':_0x419a2f});if(!_0x1500f1)return![];const _0x2e8836=_0xccfe['get'](SheetsShapeService)[_0xdecbff(0x168)](_0xa2ef25,_0x393f82,_0x419a2f);if(!_0x2e8836)return![];const _0x1a9f08=_0xccfe[_0xdecbff(0x1a8)](_univerjs_core[_0xdecbff(0x180)]),_0x47a02b=_0xccfe[_0xdecbff(0x1a8)](_univerjs_core['IUndoRedoService']),_0x161e63=_0xccfe[_0xdecbff(0x1a8)](_univerjs_sheets['SheetInterceptorService']),_0x18a041={..._0x1500f1[_0xdecbff(0x125)]};if(_0x1074d3!==void 0x0)_0x18a041['flipX']=!_0x18a041[_0xdecbff(0x1d7)];if(_0x422597!==void 0x0)_0x18a041[_0xdecbff(0x127)]=!_0x18a041['flipY'];const _0x4a3eb6=(0x0,_univerjs_sheets_drawing['transformToDrawingPosition'])(_0x18a041,_0x2bd405),_0x24e0ee=(0x0,_univerjs_sheets_drawing['transformToAxisAlignPosition'])(_0x18a041,_0x2bd405),_0x5a4209=_0x2e8836[_0xdecbff(0x1d5)](),_0x4698f0=_0x2e8836['getShapeData'](),_0xf530ed={'unitId':_0xa2ef25,'subUnitId':_0x393f82,'drawingId':_0x419a2f,'drawingType':_univerjs_core[_0xdecbff(0x1c6)][_0xdecbff(0x17d)],'sheetTransform':_0x4a3eb6,'transform':_0x18a041,'data':{'shapeType':_0x5a4209,'shapeData':_0x4698f0},'axisAlignSheetTransform':_0x24e0ee,'allowTransform':!![]},{undo:_0x1d8ba2,redo:_0x2f0671,objects:_0xe44e80}=_0x15f141[_0xdecbff(0x12f)]([_0xf530ed]),_0x55409b=_0x161e63[_0xdecbff(0x1c4)]({'id':_univerjs_sheets_drawing[_0xdecbff(0x120)]['id'],'params':{'unitId':_0xa2ef25,'drawings':[_0xf530ed]}}),_0x804e83=[...(_0x32c763=_0x55409b['preRedos'])!==null&&_0x32c763!==void 0x0?_0x32c763:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0xa2ef25,'subUnitId':_0x393f82,'op':_0x2f0671,'objects':_0xe44e80,'type':_univerjs_sheets_drawing[_0xdecbff(0x1a7)][_0xdecbff(0x1ba)]}},{'id':_univerjs_sheets_drawing[_0xdecbff(0x17f)]['id'],'params':[_0xa2ef25]},..._0x55409b[_0xdecbff(0x158)]],_0x4a7d19=[...(_0x543709=_0x55409b[_0xdecbff(0x13a)])!==null&&_0x543709!==void 0x0?_0x543709:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0xa2ef25,'subUnitId':_0x393f82,'op':_0x1d8ba2,'objects':_0xe44e80,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0xdecbff(0x1ba)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0xa2ef25]},..._0x55409b[_0xdecbff(0x14e)]];if((0x0,_univerjs_pro_engine_shape[_0xdecbff(0x149)])(_0x5a4209)){const _0x4d342d=_0x2e8836[_0xdecbff(0x139)]();if(_0x4d342d){const _0x49758b={..._0x4d342d};_0x49758b[_0xdecbff(0x1e2)]=void 0x0,_0x49758b['to']=void 0x0,_0x804e83[_0xdecbff(0x167)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0xa2ef25,'subUnitId':_0x393f82,'shapeId':_0x419a2f,'shapeType':_0x5a4209,'shapeData':{'relation':_0x49758b}}}),_0x4a7d19['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0xa2ef25,'subUnitId':_0x393f82,'shapeId':_0x419a2f,'shapeType':_0x5a4209,'shapeData':{'relation':_0x4d342d}}});}}if((0x0,_univerjs_core[_0xdecbff(0x1e7)])(_0x804e83,_0x1a9f08)['result'])return _0x47a02b[_0xdecbff(0x19e)]({'unitID':_0xa2ef25,'undoMutations':_0x4a7d19,'redoMutations':_0x804e83}),!![];return![];}},SetSheetsShapeRotateCommand={'type':_univerjs_core[_0xe533fd(0x18f)]['COMMAND'],'id':_0xe533fd(0x16e),'handler':(_0x5700c9,_0x445dfb)=>{const _0x5af87c=_0xe533fd;var _0x4d9ad4,_0x5c4bf0;const _0x325920=(0x0,_univerjs_sheets[_0x5af87c(0x171)])(_0x5700c9['get'](_univerjs_core[_0x5af87c(0x18a)]),_0x445dfb);if(!_0x325920)return![];const _0x249905=_0x5700c9[_0x5af87c(0x1a8)](_univerjs_sheets[_0x5af87c(0x16d)]),{unitId:_0x3631ef,subUnitId:_0x3cf977}=_0x325920,_0x157ef4=_0x249905[_0x5af87c(0x1aa)](_0x3631ef,_0x3cf977);if(!_0x157ef4)return![];const _0xaf3137=_0x5700c9[_0x5af87c(0x1a8)](_univerjs_sheets_drawing[_0x5af87c(0x1a1)]),{shapeId:_0xb18c21,rotate:_0x447e29}=_0x445dfb,_0x5f51cd=_0xaf3137['getDrawingByParam']({'unitId':_0x3631ef,'subUnitId':_0x3cf977,'drawingId':_0xb18c21});if(!_0x5f51cd)return![];const _0x5c1d9c=_0x5700c9[_0x5af87c(0x1a8)](SheetsShapeService)[_0x5af87c(0x168)](_0x3631ef,_0x3cf977,_0xb18c21);if(!_0x5c1d9c)return![];const _0x4447d6=_0x5700c9[_0x5af87c(0x1a8)](_univerjs_core['ICommandService']),_0xcf84b7=_0x5700c9[_0x5af87c(0x1a8)](_univerjs_core['IUndoRedoService']),_0xffb85a=_0x5700c9[_0x5af87c(0x1a8)](_univerjs_sheets[_0x5af87c(0x1e4)]),_0x3aa246={..._0x5f51cd[_0x5af87c(0x125)]};if(_0x447e29!==void 0x0)_0x3aa246['angle']=(_0x3aa246[_0x5af87c(0x19b)]||0x0)+_0x447e29;const _0xeac987=(0x0,_univerjs_sheets_drawing[_0x5af87c(0x18b)])(_0x3aa246,_0x157ef4),_0x2bebf5=(0x0,_univerjs_sheets_drawing[_0x5af87c(0x16c)])(_0x3aa246,_0x157ef4),_0x44c7f1=_0x5c1d9c['getShapeType'](),_0x4b0030=_0x5c1d9c[_0x5af87c(0x1e3)](),_0x487333={'unitId':_0x3631ef,'subUnitId':_0x3cf977,'drawingId':_0xb18c21,'drawingType':_univerjs_core[_0x5af87c(0x1c6)]['DRAWING_SHAPE'],'sheetTransform':_0xeac987,'transform':_0x3aa246,'data':{'shapeType':_0x44c7f1,'shapeData':_0x4b0030},'axisAlignSheetTransform':_0x2bebf5,'allowTransform':!![]},{undo:_0x181544,redo:_0x244d71,objects:_0x48c458}=_0xaf3137[_0x5af87c(0x12f)]([_0x487333]),_0x35c742=_0xffb85a[_0x5af87c(0x1c4)]({'id':_univerjs_sheets_drawing['SetSheetDrawingCommand']['id'],'params':{'unitId':_0x3631ef,'drawings':[_0x487333]}}),_0x18dcdc=[...(_0x4d9ad4=_0x35c742['preRedos'])!==null&&_0x4d9ad4!==void 0x0?_0x4d9ad4:[],{'id':_univerjs_sheets_drawing[_0x5af87c(0x151)]['id'],'params':{'unitId':_0x3631ef,'subUnitId':_0x3cf977,'op':_0x244d71,'objects':_0x48c458,'type':_univerjs_sheets_drawing[_0x5af87c(0x1a7)]['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x5af87c(0x17f)]['id'],'params':[_0x3631ef]},..._0x35c742[_0x5af87c(0x158)]],_0x3cc1c7=[...(_0x5c4bf0=_0x35c742[_0x5af87c(0x13a)])!==null&&_0x5c4bf0!==void 0x0?_0x5c4bf0:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x3631ef,'subUnitId':_0x3cf977,'op':_0x181544,'objects':_0x48c458,'type':_univerjs_sheets_drawing[_0x5af87c(0x1a7)][_0x5af87c(0x1ba)]}},{'id':_univerjs_sheets_drawing[_0x5af87c(0x17f)]['id'],'params':[_0x3631ef]},..._0x35c742['undos']];if((0x0,_univerjs_core[_0x5af87c(0x1e7)])(_0x18dcdc,_0x4447d6)[_0x5af87c(0x160)])return _0xcf84b7[_0x5af87c(0x19e)]({'unitID':_0x3631ef,'undoMutations':_0x3cc1c7,'redoMutations':_0x18dcdc}),!![];return![];}},SetSheetsShapeTextVerticalToggleCommand={'type':_univerjs_core[_0xe533fd(0x18f)]['COMMAND'],'id':'sheet.command.set-shape-text-vertical-toggle','handler':(_0x749fb9,_0x1f9509)=>{const _0x549781=_0xe533fd;var _0x2b6dc0;const _0x34ec02=(0x0,_univerjs_sheets[_0x549781(0x171)])(_0x749fb9[_0x549781(0x1a8)](_univerjs_core[_0x549781(0x18a)]),_0x1f9509);if(!_0x34ec02)return![];const {unitId:_0x2a71e0,subUnitId:_0x38c80b}=_0x34ec02,{shapeId:_0x202ee3}=_0x1f9509,_0x4a2f63=_0x749fb9[_0x549781(0x1a8)](SheetsShapeService)['getShapeModel'](_0x2a71e0,_0x38c80b,_0x202ee3);if(!_0x4a2f63)return![];const _0xeea135=_0x4a2f63['getShapeTextData'](),_0x127d0d=(_0x2b6dc0=_0xeea135===null||_0xeea135===void 0x0?void 0x0:_0xeea135[_0x549781(0x1b9)])!==null&&_0x2b6dc0!==void 0x0?_0x2b6dc0:!![],_0x115471=!_0x127d0d,_0x5176aa=_0x749fb9[_0x549781(0x1a8)](_univerjs_core[_0x549781(0x180)]),_0x15fcfb=_0x749fb9[_0x549781(0x1a8)](_univerjs_core['IUndoRedoService']),_0x278b46={'unitId':_0x2a71e0,'subUnitId':_0x38c80b,'shapeId':_0x202ee3,'shapeData':{'shapeText':{'isHorizontal':_0x115471}}},_0x151177={'unitId':_0x2a71e0,'subUnitId':_0x38c80b,'shapeId':_0x202ee3,'shapeData':{'shapeText':{'isHorizontal':_0x127d0d}}},_0x3e6d02=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x278b46}],_0x539acd=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x151177}];if((0x0,_univerjs_core[_0x549781(0x1e7)])(_0x3e6d02,_0x5176aa)[_0x549781(0x160)])return _0x15fcfb['pushUndoRedo']({'unitID':_0x2a71e0,'undoMutations':_0x539acd,'redoMutations':_0x3e6d02}),!![];return![];}},UpdateConnectorRelationCommand={'type':_univerjs_core[_0xe533fd(0x18f)]['COMMAND'],'id':_0xe533fd(0x14c),'handler':(_0x3f91c3,_0x43accb)=>{const _0x748be4=_0xe533fd;var _0x245dba,_0x90e89f,_0x355448,_0x2f9cc0;const _0x5c796a=(0x0,_univerjs_sheets['getSheetCommandTarget'])(_0x3f91c3['get'](_univerjs_core[_0x748be4(0x18a)]),_0x43accb);if(!_0x5c796a)return![];const _0x25035d=_0x3f91c3[_0x748be4(0x1a8)](_univerjs_sheets['SheetSkeletonService']),{unitId:_0x5e8ead,subUnitId:_0x17ccae}=_0x5c796a,_0x53bd4b=_0x25035d[_0x748be4(0x1aa)](_0x5e8ead,_0x17ccae);if(!_0x53bd4b)return![];const _0x5b5d37=_0x3f91c3['get'](_univerjs_sheets_drawing['ISheetDrawingService']),{connectorShapeId:_0x39f06f,width:_0x2e51b7,height:_0x574823,left:_0x4765d2,top:_0x52e7d7,flipX:_0x32ccf4,flipY:_0x29b88f,rotation:_0x299d3b,oldAdjustValues:_0xd215a2,newAdjustValues:_0x433c86,oldLineType:_0x3d8641,newLineType:_0x318baa,oldRelation:_0x31b5de,newRelation:_0xe56b69}=_0x43accb,_0x222d49=_0x5b5d37[_0x748be4(0x1db)]({'unitId':_0x5e8ead,'subUnitId':_0x17ccae,'drawingId':_0x39f06f});if(!_0x222d49)return![];const _0x39c001=_0x3f91c3[_0x748be4(0x1a8)](SheetsShapeService)[_0x748be4(0x168)](_0x5e8ead,_0x17ccae,_0x39f06f);if(!_0x39c001)return![];const _0x233a6a=_0x3f91c3[_0x748be4(0x1a8)](_univerjs_core[_0x748be4(0x180)]),_0x556cb0=_0x3f91c3[_0x748be4(0x1a8)](_univerjs_core[_0x748be4(0x13b)]),_0x2586d8=_0x3f91c3[_0x748be4(0x1a8)](_univerjs_sheets['SheetInterceptorService']),_0x7496bf={..._0x222d49['transform'],'width':_0x2e51b7,'height':_0x574823,'left':_0x4765d2,'top':_0x52e7d7,'flipX':_0x32ccf4,'flipY':_0x29b88f,'angle':(_0x245dba=_0x299d3b!==null&&_0x299d3b!==void 0x0?_0x299d3b:(_0x90e89f=_0x222d49[_0x748be4(0x125)])===null||_0x90e89f===void 0x0?void 0x0:_0x90e89f[_0x748be4(0x19b)])!==null&&_0x245dba!==void 0x0?_0x245dba:0x0},_0x41c7d8=(0x0,_univerjs_sheets_drawing[_0x748be4(0x18b)])(_0x7496bf,_0x53bd4b),_0x52ac73=(0x0,_univerjs_sheets_drawing[_0x748be4(0x16c)])(_0x7496bf,_0x53bd4b),_0x3c0cfa=_0x39c001[_0x748be4(0x1d5)](),_0x33b52e=_0x39c001['getShapeData'](),_0x5836e4={'unitId':_0x5e8ead,'subUnitId':_0x17ccae,'drawingId':_0x39f06f,'drawingType':_univerjs_core[_0x748be4(0x1c6)][_0x748be4(0x17d)],'sheetTransform':_0x41c7d8,'transform':_0x7496bf,'data':{'shapeType':_0x318baa||_0x3d8641||_0x3c0cfa,'shapeData':{..._0x33b52e,'adjustValues':_0x433c86||_0xd215a2||(_0x33b52e===null||_0x33b52e===void 0x0?void 0x0:_0x33b52e['adjustValues']),'relation':_0xe56b69||_0x31b5de||(_0x33b52e===null||_0x33b52e===void 0x0?void 0x0:_0x33b52e[_0x748be4(0x1e0)])}},'axisAlignSheetTransform':_0x52ac73,'allowTransform':!![]},{undo:_0x1985d0,redo:_0x5dd7b4,objects:_0x31b88d}=_0x5b5d37[_0x748be4(0x12f)]([_0x5836e4]),_0x229d97=_0x2586d8[_0x748be4(0x1c4)]({'id':_univerjs_sheets_drawing[_0x748be4(0x120)]['id'],'params':{'unitId':_0x5e8ead,'drawings':[_0x5836e4]}}),_0xc011b5=[...(_0x355448=_0x229d97['preRedos'])!==null&&_0x355448!==void 0x0?_0x355448:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x5e8ead,'subUnitId':_0x17ccae,'op':_0x5dd7b4,'objects':_0x31b88d,'type':_univerjs_sheets_drawing[_0x748be4(0x1a7)][_0x748be4(0x1ba)]}},{'id':_univerjs_sheets_drawing[_0x748be4(0x17f)]['id'],'params':[_0x5e8ead]},..._0x229d97['redos'],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x5e8ead,'subUnitId':_0x17ccae,'shapeId':_0x39f06f,'shapeType':_0x318baa,'shapeData':{'adjustValues':_0x433c86,'relation':_0xe56b69}}}],_0x5d9ab0=[...(_0x2f9cc0=_0x229d97[_0x748be4(0x13a)])!==null&&_0x2f9cc0!==void 0x0?_0x2f9cc0:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x5e8ead,'subUnitId':_0x17ccae,'op':_0x1985d0,'objects':_0x31b88d,'type':_univerjs_sheets_drawing[_0x748be4(0x1a7)][_0x748be4(0x1ba)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x5e8ead]},..._0x229d97[_0x748be4(0x14e)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x5e8ead,'subUnitId':_0x17ccae,'shapeId':_0x39f06f,'shapeType':_0x3c0cfa,'shapeData':{..._0x33b52e,'adjustValues':_0xd215a2||(_0x33b52e===null||_0x33b52e===void 0x0?void 0x0:_0x33b52e[_0x748be4(0x197)]),'relation':_0x31b5de||(_0x33b52e===null||_0x33b52e===void 0x0?void 0x0:_0x33b52e[_0x748be4(0x1e0)])}}}];if((0x0,_univerjs_core[_0x748be4(0x1e7)])(_0xc011b5,_0x233a6a)[_0x748be4(0x160)])return _0x556cb0[_0x748be4(0x19e)]({'unitID':_0x5e8ead,'undoMutations':_0x5d9ab0,'redoMutations':_0xc011b5}),!![];return![];}},UpdateLineShapeResizeCommand={'type':_univerjs_core[_0xe533fd(0x18f)]['COMMAND'],'id':_0xe533fd(0x133),'handler':(_0x52f955,_0x5808f8)=>{const _0x3f0050=_0xe533fd;var _0x11e2eb,_0x3ad7a9;const _0x51ad24=(0x0,_univerjs_sheets[_0x3f0050(0x171)])(_0x52f955[_0x3f0050(0x1a8)](_univerjs_core[_0x3f0050(0x18a)]),_0x5808f8);if(!_0x51ad24)return![];const _0x2095ee=_0x52f955['get'](_univerjs_sheets[_0x3f0050(0x16d)]),{unitId:_0x4d2136,subUnitId:_0x32cf2d}=_0x51ad24,_0x4ecf68=_0x2095ee[_0x3f0050(0x1aa)](_0x4d2136,_0x32cf2d);if(!_0x4ecf68)return![];const _0x7da8a1=_0x52f955[_0x3f0050(0x1a8)](_univerjs_sheets_drawing[_0x3f0050(0x1a1)]),{shapeId:_0x5e6ecf,width:_0x3b3aab,height:_0x13648b,left:_0x4f5108,top:_0x5469a5,flipX:_0x6fb37e,flipY:_0xf642ee,angle:_0x164109,oldAdjustValues:_0x1befac,newAdjustValues:_0xc1f991,oldLineType:_0x44aef5,newLineType:_0x8c8879}=_0x5808f8,_0x360bff=_0x7da8a1['getDrawingByParam']({'unitId':_0x4d2136,'subUnitId':_0x32cf2d,'drawingId':_0x5e6ecf});if(!_0x360bff)return![];const _0x4a936c=_0x52f955[_0x3f0050(0x1a8)](SheetsShapeService)[_0x3f0050(0x168)](_0x4d2136,_0x32cf2d,_0x5e6ecf);if(!_0x4a936c)return![];const _0x12bb10=_0x52f955[_0x3f0050(0x1a8)](_univerjs_core[_0x3f0050(0x180)]),_0x64e62=_0x52f955[_0x3f0050(0x1a8)](_univerjs_core['IUndoRedoService']),_0x405692=_0x52f955[_0x3f0050(0x1a8)](_univerjs_sheets[_0x3f0050(0x1e4)]),_0x4b4e9f={..._0x360bff[_0x3f0050(0x125)],'width':_0x3b3aab,'height':_0x13648b,'left':_0x4f5108,'top':_0x5469a5,'flipX':_0x6fb37e,'flipY':_0xf642ee,'angle':_0x164109},_0x2683b7=(0x0,_univerjs_sheets_drawing[_0x3f0050(0x18b)])(_0x4b4e9f,_0x4ecf68),_0x5150bf=(0x0,_univerjs_sheets_drawing[_0x3f0050(0x16c)])(_0x4b4e9f,_0x4ecf68),_0x2c93b9=_0x4a936c['getShapeType'](),_0x350b93=_0x4a936c[_0x3f0050(0x1e3)](),_0x4e9574={'unitId':_0x4d2136,'subUnitId':_0x32cf2d,'drawingId':_0x5e6ecf,'drawingType':_univerjs_core['DrawingTypeEnum']['DRAWING_SHAPE'],'sheetTransform':_0x2683b7,'transform':_0x4b4e9f,'data':{'shapeType':_0x8c8879||_0x44aef5||_0x2c93b9,'shapeData':{..._0x350b93,'adjustValues':_0xc1f991||_0x1befac||(_0x350b93===null||_0x350b93===void 0x0?void 0x0:_0x350b93[_0x3f0050(0x197)])}},'axisAlignSheetTransform':_0x5150bf,'allowTransform':!![]},{undo:_0x286c51,redo:_0x71ab1,objects:_0x5d821b}=_0x7da8a1[_0x3f0050(0x12f)]([_0x4e9574]),_0x689a02=_0x405692[_0x3f0050(0x1c4)]({'id':_univerjs_sheets_drawing[_0x3f0050(0x120)]['id'],'params':{'unitId':_0x4d2136,'drawings':[_0x4e9574]}}),_0x248a70=[...(_0x11e2eb=_0x689a02['preRedos'])!==null&&_0x11e2eb!==void 0x0?_0x11e2eb:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x4d2136,'subUnitId':_0x32cf2d,'op':_0x71ab1,'objects':_0x5d821b,'type':_univerjs_sheets_drawing[_0x3f0050(0x1a7)][_0x3f0050(0x1ba)]}},{'id':_univerjs_sheets_drawing[_0x3f0050(0x17f)]['id'],'params':[_0x4d2136]},..._0x689a02[_0x3f0050(0x158)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x4d2136,'subUnitId':_0x32cf2d,'shapeId':_0x5e6ecf,'shapeType':_0x8c8879,'shapeData':{'adjustValues':_0xc1f991}}}],_0x4c15be=[...(_0x3ad7a9=_0x689a02['preUndos'])!==null&&_0x3ad7a9!==void 0x0?_0x3ad7a9:[],{'id':_univerjs_sheets_drawing[_0x3f0050(0x151)]['id'],'params':{'unitId':_0x4d2136,'subUnitId':_0x32cf2d,'op':_0x286c51,'objects':_0x5d821b,'type':_univerjs_sheets_drawing[_0x3f0050(0x1a7)][_0x3f0050(0x1ba)]}},{'id':_univerjs_sheets_drawing[_0x3f0050(0x17f)]['id'],'params':[_0x4d2136]},..._0x689a02['undos'],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x4d2136,'subUnitId':_0x32cf2d,'shapeId':_0x5e6ecf,'shapeType':_0x2c93b9,'shapeData':{..._0x350b93,'adjustValues':_0x1befac||(_0x350b93===null||_0x350b93===void 0x0?void 0x0:_0x350b93[_0x3f0050(0x197)])}}}];if((0x0,_univerjs_core['sequenceExecute'])(_0x248a70,_0x12bb10)[_0x3f0050(0x160)])return _0x64e62[_0x3f0050(0x19e)]({'unitID':_0x4d2136,'undoMutations':_0x4c15be,'redoMutations':_0x248a70}),!![];return![];}},UpdateSheetsShapeTypeMutation={'id':_0xe533fd(0x1bc),'type':_univerjs_core[_0xe533fd(0x18f)][_0xe533fd(0x137)],'handler':(_0x5c5eff,_0x349a48)=>{const _0x9e0a5e=_0xe533fd,{unitId:_0x1d4ba0,subUnitId:_0x1462ae,shapeType:_0x221f3c,shapeId:_0x5aff5c,shapeData:_0x583650}=_0x349a48,_0x18869e=_0x5c5eff['get'](SheetsShapeService)[_0x9e0a5e(0x168)](_0x1d4ba0,_0x1462ae,_0x5aff5c);if(_0x18869e){_0x18869e[_0x9e0a5e(0x1df)](_0x221f3c);if(_0x583650)_0x18869e===null||_0x18869e===void 0x0||_0x18869e[_0x9e0a5e(0x1c1)](_0x583650);}return!![];}},UpdateSheetsShapeTypeCommand={'id':_0xe533fd(0x170),'type':_univerjs_core[_0xe533fd(0x18f)][_0xe533fd(0x19f)],'handler':(_0x3dfddf,_0x18c5d7)=>{const _0x36de97=_0xe533fd;if(!_0x18c5d7)return![];const _0x1554e9=_0x3dfddf[_0x36de97(0x1a8)](_univerjs_core[_0x36de97(0x180)]),_0x26b598=_0x3dfddf[_0x36de97(0x1a8)](SheetsShapeService),_0x470523=_0x3dfddf[_0x36de97(0x1a8)](_univerjs_core[_0x36de97(0x13b)]),_0x113b7d=[],_0x222ac4=[],{unitId:_0x3a64a6,subUnitId:_0x11ca33,shapeId:_0xc8bb8c,shapeType:_0x486d1d,shapeData:_0x407100}=_0x18c5d7,_0x2f02c4=_0x26b598[_0x36de97(0x168)](_0x3a64a6,_0x11ca33,_0xc8bb8c);if(_0x2f02c4){const _0x261bcd=_0x2f02c4[_0x36de97(0x1d5)](),_0x38b41d=Object['assign']({},_0x2f02c4[_0x36de97(0x1e3)]()),_0x3bcf6f={'unitId':_0x3a64a6,'subUnitId':_0x11ca33,'shapeId':_0xc8bb8c,'shapeType':_0x486d1d,'shapeData':_0x407100},_0x1c66c0={'unitId':_0x3a64a6,'subUnitId':_0x11ca33,'shapeId':_0xc8bb8c,'shapeType':_0x261bcd,'shapeData':_0x38b41d};_0x113b7d['push']({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x3bcf6f}),_0x222ac4['push']({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x1c66c0});if(_0x113b7d['every'](_0x539998=>_0x1554e9[_0x36de97(0x13e)](_0x539998['id'],_0x539998['params'])))_0x470523[_0x36de97(0x19e)]({'unitID':_0x3a64a6,'redoMutations':[..._0x113b7d],'undoMutations':[..._0x222ac4]});return!![];}return![];}};var name='@univerjs-pro/sheets-shape',version=_0xe533fd(0x196);function _0x192e(){const _0x2392ad=['clear','_shapeModelManagerMap','getBatchAddOp','UniverInstanceType','Plugin','isHorizontal','UPDATE','call','sheet.mutation.update-shape-type','getDrawingData','setConfig','UniverLicensePlugin','getBasicShapeType','setShapeData','dispose','packageName','onCommandExecute','sheet.mutation.remove-shape','DrawingTypeEnum','cxnIndex','toPrimitive','removeShape','length','ShapeModel','toStringTag','version','_linesIds','top','getBasicShapeRelation','_sheetSkeletonService','shapeId','Module','_groupIds','getShapeType','307338kFdDvf','flipX','prototype','add','merge','getDrawingByParam','parse','_configService','getShapeDataById','setShapeType','relation','addShape','from','getShapeData','SheetInterceptorService','generateRandomId','borderEnabled','sequenceExecute','iterator','height','SetSheetDrawingCommand','IDrawingManagerService','DEFAULT_SHAPE_HEIGHT','_initSnapshot','symbol','transform','_serializeShapeForUnit','flipY','index','preRedos','_resourcesManagerService','DependentOn','DEFAULT_SHAPE_WIDTH','getEndConnectInfo','find','getBatchUpdateOp','20dlxheU','routeConnectorLineShape','sheets-shape.config','sheet.command.update-line-shape-resize','sheet.mutation.insert-shape','_disposed','_addLineFollowShapeUpdates','MUTATION','sheet.mutation.update-shape-data','getShapeRelation','preUndos','IUndoRedoService','Inject','Disposable','syncExecuteCommand','filter','getOwnPropertyDescriptor','UNIVER_SHEET','decorate','object','fromJSON','defineProperty','Fail\x20to\x20get\x20shape\x20model,\x20get:\x20','23352PTzSKI','delete','isConnectorShape','set','removeLinePoints','sheet.command.update-connector-relation','keys','undos','getAdjustValueByName','params','SetDrawingApplyMutation','getLineShapeRelation','registerPluginResource','isFrom','172268LDxusS','lineType','sheet.command.insert-shape','redos','forEach','worldRect','_getConnectPointInfo','left','UpdateLineShapeResizeCommand','width','stringify','result','registerCommand','sin','_deserializeShapeForUnit','startY','InsertSheetsShapeMutation','pluginName','push','getShapeModel','touchDependencies','disposeWithMe','SetSheetsShapeRotateCommand','transformToAxisAlignPosition','SheetSkeletonService','sheet.command.set-shape-rotate','_shapes','sheet.command.update-shape-type','getSheetCommandTarget','_drawingManagerService','sheet.command.toggle-shape-flip','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','range','function','getCellIndexAndOffsetByPosition','resizeEnabled','76XkDpvc','ang','data','InsertShapeCommand','DRAWING_SHAPE','getShapeTypeById','ClearSheetDrawingTransformerOperation','ICommandService','startX','Injector','IConfigService','UpdateSheetsShapeDataMutation','updateContext','hasShape','onStarting','_initCommandInterceptor','SheetsShapeService','IUniverInstanceService','transformToDrawingPosition','SetSheetsShapeTextVerticalToggleCommand','_addLineRerouteUpdates','UpdateSheetsShapeTypeMutation','CommandType','RemoveSheetDrawingCommand','546zeRixu','ensureSkeleton','SetShapeDrawingDataCommand','UpdateSheetsShapeTypeCommand','toJSON','0.22.0-insiders.20260513-0b53885','adjustValues','2357536SvtZcY','InsertSheetDrawingCommand','string','angle','ToggleSheetsShapeFlipCommand','130257OqEMER','pushUndoRedo','COMMAND','_ensureShapeModelManager','ISheetDrawingService','rotateEnabled','insertShape','type','_sheetsShapeService','drawingType','DrawingApplyType','get','sheet.command.set-shape-drawing-data','getSkeleton','_commandService','_initCommands','_injector','has','getStartConnectInfo','916270sIWBlB','RemoveSheetsShapeMutation','10602dtlvwy','_config'];_0x192e=function(){return _0x2392ad;};return _0x192e();}const SHEETS_SHAPE_PLUGIN_CONFIG_KEY=_0xe533fd(0x132),configSymbol=Symbol(SHEETS_SHAPE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let SheetsShapeController=class SheetsShapeController extends _univerjs_core[_0xe533fd(0x13d)]{constructor(_0x45e126,_0x42bffb,_0x4b3d0b,_0x221048,_0x5307e5){const _0xbe737=_0xe533fd;super(),this[_0xbe737(0x1ab)]=_0x45e126,this['_sheetInterceptorService']=_0x42bffb,this[_0xbe737(0x1d1)]=_0x4b3d0b,this[_0xbe737(0x1a5)]=_0x221048,this[_0xbe737(0x172)]=_0x5307e5,this[_0xbe737(0x1ac)](),this[_0xbe737(0x188)]();}[_0xe533fd(0x1ac)](){const _0x2a9666=_0xe533fd;[InsertShapeCommand,SetShapeDrawingDataCommand,ToggleSheetsShapeFlipCommand,SetSheetsShapeRotateCommand,SetSheetsShapeTextVerticalToggleCommand,UpdateConnectorRelationCommand,UpdateLineShapeResizeCommand,InsertSheetsShapeMutation,RemoveSheetsShapeMutation,UpdateSheetsShapeTypeMutation,UpdateSheetsShapeDataMutation]['forEach'](_0x3770f3=>this[_0x2a9666(0x16a)](this[_0x2a9666(0x1ab)][_0x2a9666(0x161)](_0x3770f3)));}['_initCommandInterceptor'](){const _0x38623d=_0xe533fd;this[_0x38623d(0x16a)](this['_sheetInterceptorService']['interceptCommand']({'getMutations':_0x1c35fc=>{const _0x3ac33f=_0x38623d;if(_0x1c35fc['id']===_univerjs_sheets_drawing[_0x3ac33f(0x190)]['id']){const {drawings:_0x12543b}=_0x1c35fc[_0x3ac33f(0x150)],_0x51c023=_0x12543b[_0x3ac33f(0x13f)](_0x24c3c9=>_0x24c3c9[_0x3ac33f(0x1a6)]===_univerjs_core[_0x3ac33f(0x1c6)][_0x3ac33f(0x17d)]);if(_0x51c023[_0x3ac33f(0x1ca)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x155be1=[],_0x2f3853=[];return _0x51c023[_0x3ac33f(0x159)](_0x86cf92=>{const _0x411917=_0x3ac33f,{unitId:_0x38d772,subUnitId:_0x492b5b,drawingId:_0x1e2adf}=_0x86cf92,_0x12064c=this[_0x411917(0x1a5)]['getShapeModel'](_0x38d772,_0x492b5b,_0x1e2adf);if(!_0x12064c)throw new TypeError(_0x411917(0x146)+_0x12064c);_0x155be1[_0x411917(0x167)]({'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x38d772,'subUnitId':_0x492b5b,'shapeId':_0x1e2adf}}),_0x2f3853['push']({'id':InsertSheetsShapeMutation['id'],'params':{'unitId':_0x38d772,'subUnitId':_0x492b5b,'shapeId':_0x1e2adf,'shapeType':_0x12064c[_0x411917(0x1d5)](),'shapeData':_0x12064c[_0x411917(0x1e3)]()}});const _0x3404d7=this[_0x411917(0x1a5)][_0x411917(0x1d0)](_0x38d772,_0x492b5b,_0x1e2adf);if(_0x3404d7)for(const _0x2977a4 of _0x3404d7){const _0x4a39cb=_0x2977a4['lineShapeId'],_0x4edfc0=_0x2977a4[_0x411917(0x154)],_0x3e73fc=_0x4edfc0?{'from':void 0x0}:{'to':void 0x0},_0x78382f=_0x4edfc0?{'from':{'shapeId':_0x2977a4[_0x411917(0x1d2)],'cxnIndex':_0x2977a4[_0x411917(0x1c7)]}}:{'to':{'shapeId':_0x2977a4['shapeId'],'cxnIndex':_0x2977a4['cxnIndex']}};_0x155be1['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x38d772,'subUnitId':_0x492b5b,'shapeId':_0x4a39cb,'shapeData':{'relation':_0x3e73fc}}}),_0x2f3853[_0x411917(0x167)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x38d772,'subUnitId':_0x492b5b,'shapeId':_0x4a39cb,'shapeData':{'relation':_0x78382f}}});}}),{'preRedos':_0x155be1,'redos':[],'preUndos':[],'undos':_0x2f3853};}if(_0x1c35fc['id']===_univerjs_sheets_drawing['SetSheetDrawingCommand']['id']){const {drawings:_0x2f94e9}=_0x1c35fc[_0x3ac33f(0x150)],_0x6f4af1=_0x2f94e9[_0x3ac33f(0x13f)](_0x3d250c=>_0x3d250c['drawingType']===_univerjs_core['DrawingTypeEnum'][_0x3ac33f(0x17d)]);if(_0x6f4af1[_0x3ac33f(0x1ca)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x3ca3ba=[],_0x40e0a2=[];for(const _0x672839 of _0x6f4af1){const {unitId:_0xc61021,subUnitId:_0xac9119,drawingId:_0x2cfd5b,transform:_0x481a0d}=_0x672839;if(!_0xc61021||!_0xac9119||!_0x2cfd5b||!_0x481a0d)continue;const _0x172073=this[_0x3ac33f(0x1a5)]['getShapeModel'](_0xc61021,_0xac9119,_0x2cfd5b);if(!_0x172073)throw new TypeError(_0x3ac33f(0x146)+_0x172073);if((0x0,_univerjs_pro_engine_shape['isConnectorShape'])(_0x172073[_0x3ac33f(0x1d5)]())){const _0x21f84e=this[_0x3ac33f(0x1a5)][_0x3ac33f(0x152)](_0xc61021,_0xac9119,_0x2cfd5b),_0x12df5b={'from':void 0x0,'to':void 0x0};_0x21f84e&&(_0x3ca3ba[_0x3ac33f(0x167)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0xc61021,'subUnitId':_0xac9119,'shapeId':_0x2cfd5b,'shapeData':{'relation':_0x12df5b}}}),_0x40e0a2['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0xc61021,'subUnitId':_0xac9119,'shapeId':_0x2cfd5b,'shapeData':{'relation':_0x21f84e}}}));}else{const _0x138234=this[_0x3ac33f(0x1a5)]['getBasicShapeRelation'](_0xc61021,_0xac9119,_0x2cfd5b);if(_0x138234&&_0x138234[_0x3ac33f(0x1ca)]>0x0)for(const _0x621c2a of _0x138234){const _0x164216=_0x621c2a['lineShapeId'],_0x1c96c7=_0x621c2a[_0x3ac33f(0x154)],_0x12d410=this[_0x3ac33f(0x1a5)][_0x3ac33f(0x168)](_0xc61021,_0xac9119,_0x164216);if(!_0x12d410)continue;const _0x3ec9e4=_0x12d410[_0x3ac33f(0x1af)](),_0x1fbf9e=_0x12d410['getEndConnectInfo']();if(_0x3ec9e4&&_0x1fbf9e)this[_0x3ac33f(0x18d)](_0xc61021,_0xac9119,_0x164216,_0x12d410,_0x3ec9e4,_0x1fbf9e,_0x3ca3ba,_0x40e0a2,_0x2cfd5b,_0x481a0d);else this['_addLineFollowShapeUpdates'](_0xc61021,_0xac9119,_0x164216,_0x12d410,_0x1c96c7?_0x3ec9e4:_0x1fbf9e,_0x1c96c7,_0x3ca3ba,_0x40e0a2,_0x2cfd5b,_0x481a0d);}}}return{'preRedos':[],'redos':_0x3ca3ba,'preUndos':_0x40e0a2,'undos':[]};}return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};}}));}[_0xe533fd(0x15b)](_0x2fbb3a,_0x611097,_0x48c000,_0x20632e,_0x2f30ca){const _0x57b3c9=_0xe533fd;if(!_0x611097||!_0x48c000)return null;const {shapeId:_0xe18060,cxnIndex:_0x2e83b6}=_0x2fbb3a,_0x3b1e90=this['_sheetsShapeService'][_0x57b3c9(0x168)](_0x611097,_0x48c000,_0xe18060);if(!_0x3b1e90)return null;const _0x1481ea=this['_drawingManagerService'][_0x57b3c9(0x1db)]({'unitId':_0x611097,'subUnitId':_0x48c000,'drawingId':_0xe18060});if(!(_0x1481ea===null||_0x1481ea===void 0x0?void 0x0:_0x1481ea[_0x57b3c9(0x125)]))return null;let {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x57aefd}=_0x1481ea[_0x57b3c9(0x125)];if(_0x2f30ca&&_0x20632e===_0xe18060){var _0x2683bd,_0x2209c2,_0x490c7e,_0x4bb1aa,_0x12b096,_0x566b5b,_0x2d87b9;left=(_0x2683bd=_0x2f30ca[_0x57b3c9(0x15c)])!==null&&_0x2683bd!==void 0x0?_0x2683bd:left,top=(_0x2209c2=_0x2f30ca[_0x57b3c9(0x1cf)])!==null&&_0x2209c2!==void 0x0?_0x2209c2:top,width=(_0x490c7e=_0x2f30ca[_0x57b3c9(0x15e)])!==null&&_0x490c7e!==void 0x0?_0x490c7e:width,height=(_0x4bb1aa=_0x2f30ca['height'])!==null&&_0x4bb1aa!==void 0x0?_0x4bb1aa:height,flipX=(_0x12b096=_0x2f30ca[_0x57b3c9(0x1d7)])!==null&&_0x12b096!==void 0x0?_0x12b096:flipX,flipY=(_0x566b5b=_0x2f30ca[_0x57b3c9(0x127)])!==null&&_0x566b5b!==void 0x0?_0x566b5b:flipY,_0x57aefd=(_0x2d87b9=_0x2f30ca['angle'])!==null&&_0x2d87b9!==void 0x0?_0x2d87b9:_0x57aefd;}_0x3b1e90[_0x57b3c9(0x185)]({'width':width,'height':height});const _0x42fdfa=_0x3b1e90['getConnectionSiteList']()[_0x57b3c9(0x12e)](_0x22a8ff=>_0x22a8ff[_0x57b3c9(0x128)]===_0x2e83b6);if(!_0x42fdfa)return null;let _0x5daa68=flipX?width-_0x42fdfa['x']:_0x42fdfa['x'],_0x3e2186=flipY?height-_0x42fdfa['y']:_0x42fdfa['y'];if(_0x57aefd!==0x0&&_0x57aefd!==void 0x0&&_0x57aefd!==null){const _0x359750=_0x57aefd*Math['PI']/0xb4,_0x262637=Math['cos'](_0x359750),_0x1f6b36=Math[_0x57b3c9(0x162)](_0x359750),_0x590114=width/0x2,_0x3dfb93=height/0x2,_0x14f2e1=_0x5daa68-_0x590114,_0x22a055=_0x3e2186-_0x3dfb93;_0x5daa68=_0x590114+_0x14f2e1*_0x262637-_0x22a055*_0x1f6b36,_0x3e2186=_0x3dfb93+_0x14f2e1*_0x1f6b36+_0x22a055*_0x262637;}_0x5daa68+=left,_0x3e2186+=top;let _0x3b03c0=_0x42fdfa[_0x57b3c9(0x17a)]/0xea60;if(flipX)_0x3b03c0=0xb4-_0x3b03c0;if(flipY)_0x3b03c0=-_0x3b03c0;_0x3b03c0+=_0x57aefd||0x0,_0x3b03c0=(_0x3b03c0%0x168+0x168)%0x168;const _0x1ed7b4=(0x0,_univerjs_pro_engine_shape['getBasicShapeRotateBound'])({'left':left,'top':top,'width':width,'height':height},_0x57aefd||0x0);return{'point':{'x':_0x5daa68,'y':_0x3e2186},'angle':_0x3b03c0,'bounds':_0x1ed7b4};}[_0xe533fd(0x18d)](_0x4b954a,_0xcee8a9,_0x40b8d0,_0xe958cb,_0x509a57,_0x1e8499,_0x328d4a,_0x306341,_0x36ebaa,_0x1f6d7a){const _0x2f4520=_0xe533fd,_0x408d7a=this[_0x2f4520(0x1d1)][_0x2f4520(0x1aa)](_0x4b954a,_0xcee8a9);if(!_0x408d7a)return;const _0x3783d3=_0xe958cb[_0x2f4520(0x139)](),_0xec1185=_0xe958cb['getAdjustNames'](),_0xdc1bfb={},_0x1ff367={};_0xec1185['forEach'](_0x362928=>{const _0x3b9437=_0x2f4520,_0x259d6e=_0xe958cb[_0x3b9437(0x14f)](_0x362928);_0x1ff367[_0x362928]=_0x259d6e!==null&&_0x259d6e!==void 0x0?_0x259d6e:0x0;});const _0xe9b1af=this['_getConnectPointInfo'](_0x509a57,_0x4b954a,_0xcee8a9,_0x36ebaa,_0x1f6d7a),_0x3f44d2=this[_0x2f4520(0x15b)](_0x1e8499,_0x4b954a,_0xcee8a9,_0x36ebaa,_0x1f6d7a);if(_0xe9b1af&&_0x3f44d2){const _0x5083cd=_0xe958cb[_0x2f4520(0x1d5)](),_0x590b40=(0x0,_univerjs_pro_engine_shape[_0x2f4520(0x131)])(_0xe9b1af,_0x3f44d2,_0x5083cd);let _0x5886ac=_0x5083cd;if(_0x590b40){const _0x5bee6a=(0x0,_univerjs_pro_engine_shape['computeConnectorRouteLayout'])(_0x590b40,_0xe958cb[_0x2f4520(0x1d5)]()),_0x536fd9=this[_0x2f4520(0x172)][_0x2f4520(0x1bd)](_0x4b954a,_0xcee8a9);if(_0x536fd9&&_0x536fd9[_0x40b8d0]){const _0x59a15d=_0x536fd9[_0x40b8d0];_0x5886ac=_0x5bee6a[_0x2f4520(0x156)];for(const [_0x4a6ec0,_0x37818e]of Object['entries'](_0x5bee6a[_0x2f4520(0x197)]))_0xdc1bfb[_0x4a6ec0]=_0x37818e;const _0x328e1f={..._0x59a15d[_0x2f4520(0x125)],'width':_0x5bee6a[_0x2f4520(0x15a)][_0x2f4520(0x15e)],'height':_0x5bee6a[_0x2f4520(0x15a)][_0x2f4520(0x1e9)],'left':_0x5bee6a[_0x2f4520(0x15a)][_0x2f4520(0x15c)],'top':_0x5bee6a['worldRect']['top'],'flipX':_0x5bee6a['worldRect'][_0x2f4520(0x1d7)],'flipY':_0x5bee6a[_0x2f4520(0x15a)][_0x2f4520(0x127)],'angle':_0x5bee6a['rotation']},_0x5c4aea=(0x0,_univerjs_sheets_drawing['transformToDrawingPosition'])(_0x328e1f,_0x408d7a),_0xda7b99=(0x0,_univerjs_sheets_drawing['transformToAxisAlignPosition'])(_0x328e1f,_0x408d7a),_0x1b1b81={'unitId':_0x4b954a,'subUnitId':_0xcee8a9,'drawingType':_univerjs_core[_0x2f4520(0x1c6)][_0x2f4520(0x17d)],'drawingId':_0x40b8d0,'transform':_0x328e1f,'sheetTransform':_0x5c4aea,'axisAlignSheetTransform':_0xda7b99},{unitId:_0x48608c,subUnitId:_0x158710,undo:_0x29c5d8,redo:_0x25302b,objects:_0xc1569e}=this[_0x2f4520(0x172)]['getBatchUpdateOp']([_0x1b1b81]);_0x328d4a[_0x2f4520(0x167)]({'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x48608c,'subUnitId':_0x158710,'op':_0x25302b,'objects':_0xc1569e,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x2f4520(0x1ba)]}}),_0x306341['push']({'id':_univerjs_sheets_drawing[_0x2f4520(0x151)]['id'],'params':{'unitId':_0x48608c,'subUnitId':_0x158710,'op':_0x29c5d8,'objects':_0xc1569e,'type':_univerjs_sheets_drawing[_0x2f4520(0x1a7)][_0x2f4520(0x1ba)]}});}_0xe958cb[_0x2f4520(0x14b)]();}_0x328d4a[_0x2f4520(0x167)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x4b954a,'subUnitId':_0xcee8a9,'shapeId':_0x40b8d0,'shapeType':_0x5886ac,'shapeData':{'adjustValues':_0xdc1bfb,'relation':_0x3783d3}}}),_0x306341[_0x2f4520(0x167)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x4b954a,'subUnitId':_0xcee8a9,'shapeId':_0x40b8d0,'shapeType':_0x5083cd,'shapeData':{'adjustValues':_0x1ff367,'relation':_0x3783d3}}});}}[_0xe533fd(0x136)](_0x1434f7,_0x1d6c5f,_0x2f8d04,_0x271884,_0xc8dd7f,_0x2dafbb,_0x42126b,_0x4e8481,_0x5d3f66,_0x59ff3e){const _0x553dee=_0xe533fd;var _0x549e2f;if(!_0xc8dd7f)return;const _0xccbcca=this[_0x553dee(0x1d1)][_0x553dee(0x1aa)](_0x1434f7,_0x1d6c5f);if(!_0xccbcca)return;const _0x565e22=(_0x549e2f=this[_0x553dee(0x172)][_0x553dee(0x1db)]({'unitId':_0x1434f7,'subUnitId':_0x1d6c5f,'drawingId':_0x5d3f66}))===null||_0x549e2f===void 0x0?void 0x0:_0x549e2f[_0x553dee(0x125)];if(!_0x565e22)return;const _0x170bb2=_0x565e22[_0x553dee(0x15c)]!==_0x59ff3e[_0x553dee(0x15c)]||_0x565e22['top']!==_0x59ff3e[_0x553dee(0x1cf)],_0x48a066=_0x565e22[_0x553dee(0x15e)]!==_0x59ff3e[_0x553dee(0x15e)]||_0x565e22[_0x553dee(0x1e9)]!==_0x59ff3e[_0x553dee(0x1e9)],_0x2b6b59=_0x565e22[_0x553dee(0x1d7)]!==_0x59ff3e[_0x553dee(0x1d7)]||_0x565e22[_0x553dee(0x127)]!==_0x59ff3e[_0x553dee(0x127)],_0x3b8c06=_0x565e22[_0x553dee(0x19b)]!==_0x59ff3e[_0x553dee(0x19b)];if(_0x170bb2&&!_0x48a066&&!_0x2b6b59&&!_0x3b8c06){var _0x1b6cb2,_0x3a21fd,_0x5728fc,_0x115c53;const _0xcdb555=((_0x1b6cb2=_0x59ff3e[_0x553dee(0x15c)])!==null&&_0x1b6cb2!==void 0x0?_0x1b6cb2:0x0)-((_0x3a21fd=_0x565e22[_0x553dee(0x15c)])!==null&&_0x3a21fd!==void 0x0?_0x3a21fd:0x0),_0x28408e=((_0x5728fc=_0x59ff3e[_0x553dee(0x1cf)])!==null&&_0x5728fc!==void 0x0?_0x5728fc:0x0)-((_0x115c53=_0x565e22['top'])!==null&&_0x115c53!==void 0x0?_0x115c53:0x0),_0x4f494c=this[_0x553dee(0x172)][_0x553dee(0x1bd)](_0x1434f7,_0x1d6c5f);if(_0x4f494c&&_0x4f494c[_0x2f8d04]){var _0x3a2110,_0x25ac44,_0x367251,_0x5d52ff;const _0x2adaf0=_0x4f494c[_0x2f8d04],_0x1fce80={..._0x2adaf0[_0x553dee(0x125)],'left':((_0x3a2110=(_0x25ac44=_0x2adaf0[_0x553dee(0x125)])===null||_0x25ac44===void 0x0?void 0x0:_0x25ac44[_0x553dee(0x15c)])!==null&&_0x3a2110!==void 0x0?_0x3a2110:0x0)+_0xcdb555,'top':((_0x367251=(_0x5d52ff=_0x2adaf0['transform'])===null||_0x5d52ff===void 0x0?void 0x0:_0x5d52ff[_0x553dee(0x1cf)])!==null&&_0x367251!==void 0x0?_0x367251:0x0)+_0x28408e},_0x164dd7=(0x0,_univerjs_sheets_drawing[_0x553dee(0x18b)])(_0x1fce80,_0xccbcca),_0x3d5692=(0x0,_univerjs_sheets_drawing[_0x553dee(0x16c)])(_0x1fce80,_0xccbcca),_0x4dbe={'unitId':_0x1434f7,'subUnitId':_0x1d6c5f,'drawingType':_univerjs_core['DrawingTypeEnum'][_0x553dee(0x17d)],'drawingId':_0x2f8d04,'transform':_0x1fce80,'sheetTransform':_0x164dd7,'axisAlignSheetTransform':_0x3d5692},{unitId:_0x4ed7ac,subUnitId:_0x29819,undo:_0x1d084d,redo:_0x2e2cb2,objects:_0x2eca15}=this[_0x553dee(0x172)][_0x553dee(0x12f)]([_0x4dbe]);_0x42126b[_0x553dee(0x167)]({'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x4ed7ac,'subUnitId':_0x29819,'op':_0x2e2cb2,'objects':_0x2eca15,'type':_univerjs_sheets_drawing[_0x553dee(0x1a7)]['UPDATE']}}),_0x4e8481['push']({'id':_univerjs_sheets_drawing[_0x553dee(0x151)]['id'],'params':{'unitId':_0x4ed7ac,'subUnitId':_0x29819,'op':_0x1d084d,'objects':_0x2eca15,'type':_univerjs_sheets_drawing[_0x553dee(0x1a7)][_0x553dee(0x1ba)]}});}}else{const _0x3e1fe4=_0x271884['getStartConnectInfo'](),_0xf18dba=_0x271884[_0x553dee(0x12d)]();this[_0x553dee(0x18d)](_0x1434f7,_0x1d6c5f,_0x2f8d04,_0x271884,_0x3e1fe4,_0xf18dba,_0x42126b,_0x4e8481,_0x5d3f66,_0x59ff3e);}}};SheetsShapeController=__decorate([__decorateParam(0x0,_univerjs_core['ICommandService']),__decorateParam(0x1,(0x0,_univerjs_core['Inject'])(_univerjs_sheets['SheetInterceptorService'])),__decorateParam(0x2,(0x0,_univerjs_core[_0xe533fd(0x13c)])(_univerjs_sheets['SheetSkeletonService'])),__decorateParam(0x3,(0x0,_univerjs_core[_0xe533fd(0x13c)])(SheetsShapeService)),__decorateParam(0x4,(0x0,_univerjs_core[_0xe533fd(0x13c)])(_univerjs_drawing[_0xe533fd(0x121)]))],SheetsShapeController);let UniverSheetsShapePlugin=class UniverSheetsShapePlugin extends _univerjs_core[_0xe533fd(0x1b8)]{constructor(_0xef4128=defaultPluginConfig,_0x30c0be,_0x7a991d,_0x26384c){const _0x2858a5=_0xe533fd;super(),this['_config']=_0xef4128,this[_0x2858a5(0x1ad)]=_0x30c0be,this[_0x2858a5(0x1ab)]=_0x7a991d,this['_configService']=_0x26384c;const {..._0x23cad4}=(0x0,_univerjs_core[_0x2858a5(0x1da)])({},defaultPluginConfig,this[_0x2858a5(0x1b3)]);this[_0x2858a5(0x1dd)][_0x2858a5(0x1be)](SHEETS_SHAPE_PLUGIN_CONFIG_KEY,_0x23cad4);}[_0xe533fd(0x187)](){const _0x37fe90=_0xe533fd,_0x1d31b1=this[_0x37fe90(0x1ad)];[[SheetShapeModelManager],[SheetsShapeService],[SheetsShapeController]][_0x37fe90(0x159)](_0x2f97fa=>_0x1d31b1[_0x37fe90(0x1d9)](_0x2f97fa)),(0x0,_univerjs_core[_0x37fe90(0x169)])(_0x1d31b1,[[SheetsShapeService],[SheetsShapeController]]);}};_defineProperty(UniverSheetsShapePlugin,_0xe533fd(0x1a4),_univerjs_core[_0xe533fd(0x1b7)][_0xe533fd(0x141)]),_defineProperty(UniverSheetsShapePlugin,_0xe533fd(0x166),'SHEET_SHAPE_PLUGIN'),_defineProperty(UniverSheetsShapePlugin,_0xe533fd(0x1c3),name),_defineProperty(UniverSheetsShapePlugin,_0xe533fd(0x1cd),version),UniverSheetsShapePlugin=__decorate([(0x0,_univerjs_core[_0xe533fd(0x12b)])(_univerjs_pro_license[_0xe533fd(0x1bf)]),__decorateParam(0x1,(0x0,_univerjs_core[_0xe533fd(0x13c)])(_univerjs_core[_0xe533fd(0x182)])),__decorateParam(0x2,_univerjs_core[_0xe533fd(0x180)]),__decorateParam(0x3,_univerjs_core[_0xe533fd(0x183)])],UniverSheetsShapePlugin),exports[_0xe533fd(0x122)]=DEFAULT_SHAPE_HEIGHT,exports[_0xe533fd(0x12c)]=DEFAULT_SHAPE_WIDTH,exports[_0xe533fd(0x17c)]=InsertShapeCommand,exports[_0xe533fd(0x165)]=InsertSheetsShapeMutation,exports[_0xe533fd(0x1b1)]=RemoveSheetsShapeMutation,exports[_0xe533fd(0x193)]=SetShapeDrawingDataCommand,exports[_0xe533fd(0x16b)]=SetSheetsShapeRotateCommand,exports[_0xe533fd(0x18c)]=SetSheetsShapeTextVerticalToggleCommand,Object['defineProperty'](exports,_0xe533fd(0x189),{'enumerable':!![],'get':function(){return SheetsShapeService;}}),exports[_0xe533fd(0x19c)]=ToggleSheetsShapeFlipCommand,Object['defineProperty'](exports,'UniverSheetsShapePlugin',{'enumerable':!![],'get':function(){return UniverSheetsShapePlugin;}}),exports['UpdateConnectorRelationCommand']=UpdateConnectorRelationCommand,exports[_0xe533fd(0x15d)]=UpdateLineShapeResizeCommand,exports[_0xe533fd(0x184)]=UpdateSheetsShapeDataMutation,exports[_0xe533fd(0x194)]=UpdateSheetsShapeTypeCommand,exports[_0xe533fd(0x18e)]=UpdateSheetsShapeTypeMutation;