@univerjs-pro/sheets-shape 0.20.1 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/facade.js CHANGED
@@ -1 +1 @@
1
- const _0x2d9630=_0x539f;(function(_0x54d9e0,_0x46671b){const _0xa72ce=_0x539f,_0xdc917=_0x54d9e0();while(!![]){try{const _0x22d5e0=parseInt(_0xa72ce(0x106))/0x1+parseInt(_0xa72ce(0xaa))/0x2+parseInt(_0xa72ce(0xa4))/0x3*(parseInt(_0xa72ce(0xa2))/0x4)+parseInt(_0xa72ce(0xb0))/0x5+-parseInt(_0xa72ce(0x96))/0x6+-parseInt(_0xa72ce(0xdf))/0x7*(parseInt(_0xa72ce(0x100))/0x8)+-parseInt(_0xa72ce(0xd6))/0x9;if(_0x22d5e0===_0x46671b)break;else _0xdc917['push'](_0xdc917['shift']());}catch(_0x4c491f){_0xdc917['push'](_0xdc917['shift']());}}}(_0x5702,0xc1b2d));import{ConnectorCoordinateTransform as _0x3f5f02,ShapeArrowSizeEnum as _0x50cc04,ShapeArrowTypeEnum as _0x57158a,ShapeFillEnum as _0x5dbaee,ShapeGradientTypeEnum as _0x4aa13d,ShapeLineCapEnum as _0x81888a,ShapeLineDashEnum as _0x365de7,ShapeLineJoinEnum as _0x518da2,ShapeLineTypeEnum as _0x4153fd,ShapeTypeEnum as _0x332cf2,computeConnectorRouteLayout as _0x41ee51,getBasicShapeRotateBound as _0x31d35f,isConnectorShape as _0x147008,routeConnectorLineShape as _0x471885}from'@univerjs-pro/engine-shape';import{FEnum as _0x1cd10d}from'@univerjs/core/facade';import{DEFAULT_SHAPE_HEIGHT as _0x57cbf0,DEFAULT_SHAPE_WIDTH as _0x82d213,InsertShapeCommand as _0x2e53d3,SetShapeDrawingDataCommand as _0xc8e4fb,SheetsShapeService as _0x4cfbb0,UpdateConnectorRelationCommand as _0x20a1ba}from'@univerjs-pro/sheets-shape';function _0x539f(_0x3e93ed,_0x137e24){_0x3e93ed=_0x3e93ed-0x88;const _0x5702b8=_0x5702();let _0x539f5d=_0x5702b8[_0x3e93ed];return _0x539f5d;}function _0x5702(){const _0x437b2f=['width','ensureSkeleton','localToWorld','NoFill','abs','type','stringify','adjustValues','ShapeFillEnum','extend','setShapeType','cos','build','color','setPosition','keys','setEndArrowType','endArrow','setStrokeWidth','setStrokeLineCapType','subUnitId','getShapes','getStartConnectInfo','getShapeType','setStrokeColor','1264yldKvh','insertShape','iterator','executeCommand','capType','getAdjustNames','40658BZpZNQ','\x20not\x20found','gradientStops','DRAWING_SHAPE','getPosition','ShapeArrowSizeEnum','constructor','fill','length','default','top','getSize','getShapeModel','function','GradientFill','Skeleton\x20for\x20unitId\x20','startArrow','2174556hciJeU','relation','transform','unitId','isLineShape','prototype','index','setShapeGradientFill','getEndConnectInfo','entries','push','point','1660uMZCtt','ShapeLineJoinEnum','5937jhxEiy','opacity','string','_preloadShapeProperties','getConnectionSiteList','getAdjustValueByName','1723330KdVmHM','gradientType','getSheetId','flipX','getDrawingByParam','getShapeData','2080245flpsFi','shapeData','ShapeLineCapEnum','defineProperty','getDrawingPoints','getWorkbook','\x20and\x20subUnitId\x20','from','getShapeId','gradientAngle','_commandService','removeShape','ShapeArrowTypeEnum','worldRect','left','setStrokeLineDashType','shapeType','lineType','setStrokeOpacity','flipY','symbol','_injector',',\x20but\x20expected\x20a\x20connector\x20shape\x20type.','shapeId','object','ShapeTypeEnum','lineJoinType','setEndArrowSize','drawingType','height','getAdjustPoints','stroke','setNoneFill','setStrokeLineType','newShape','_resolveEndpoints','getConnectorLinePoints','setStartArrowType','8614260SFaGNx','cxnIndex','shape','size','get','fillType','updateContext','ShapeGradientTypeEnum','drawId','1183uRUcbw','SolidFil','dashType','connectionSiteIndex','getConnectionSites','setStartArrowSize','lineStrokeType','getUnitId'];_0x5702=function(){return _0x437b2f;};return _0x5702();}import{DrawingTypeEnum as _0x5dd802,generateRandomId as _0x4ad178}from'@univerjs/core';import{IDrawingManagerService as _0x1f0733}from'@univerjs/drawing';import{SheetSkeletonService as _0x45d511,convertPositionCellToSheetOverGrid as _0x30350e}from'@univerjs/sheets';import{ISheetDrawingService as _0x4f2a92,RemoveSheetDrawingCommand as _0x360a01}from'@univerjs/sheets-drawing';import{FWorksheet as _0x5b4d34}from'@univerjs/sheets/facade';var k=class extends _0x1cd10d{get[_0x2d9630(0xc9)](){return _0x332cf2;}get[_0x2d9630(0xef)](){return _0x5dbaee;}get[_0x2d9630(0xdd)](){return _0x4aa13d;}get['ShapeLineTypeEnum'](){return _0x4153fd;}get['ShapeLineDashEnum'](){return _0x365de7;}get[_0x2d9630(0xb2)](){return _0x81888a;}get[_0x2d9630(0xa3)](){return _0x518da2;}get[_0x2d9630(0xbc)](){return _0x57158a;}get[_0x2d9630(0x8a)](){return _0x50cc04;}};_0x1cd10d[_0x2d9630(0xf0)](k);function A(_0x4464a4){'@babel/helpers - typeof';const _0x5d0695=_0x2d9630;return A=typeof Symbol==_0x5d0695(0x92)&&typeof Symbol[_0x5d0695(0x102)]==_0x5d0695(0xc4)?function(_0x4243a6){return typeof _0x4243a6;}:function(_0xfe500){const _0x276cc7=_0x5d0695;return _0xfe500&&typeof Symbol==_0x276cc7(0x92)&&_0xfe500[_0x276cc7(0x8b)]===Symbol&&_0xfe500!==Symbol[_0x276cc7(0x9b)]?'symbol':typeof _0xfe500;},A(_0x4464a4);}function j(_0x1eba5a,_0x2a91b0){const _0x5c7229=_0x2d9630;if(A(_0x1eba5a)!='object'||!_0x1eba5a)return _0x1eba5a;var _0x17a97e=_0x1eba5a[Symbol['toPrimitive']];if(_0x17a97e!==void 0x0){var _0x3657a6=_0x17a97e['call'](_0x1eba5a,_0x2a91b0||_0x5c7229(0x8e));if(A(_0x3657a6)!=_0x5c7229(0xc8))return _0x3657a6;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x2a91b0==='string'?String:Number)(_0x1eba5a);}function M(_0x473586){const _0x429391=_0x2d9630;var _0x12b0a6=j(_0x473586,_0x429391(0xa6));return A(_0x12b0a6)==_0x429391(0xc4)?_0x12b0a6:_0x12b0a6+'';}function N(_0x17280a,_0xa51360,_0x3d5952){const _0x271cea=_0x2d9630;return(_0xa51360=M(_0xa51360))in _0x17280a?Object[_0x271cea(0xb3)](_0x17280a,_0xa51360,{'value':_0x3d5952,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x17280a[_0xa51360]=_0x3d5952,_0x17280a;}var P=class{constructor(_0x502165,_0x4043cb,_0x28e3eb,_0x16bb50){const _0x598ded=_0x2d9630;N(this,_0x598ded(0x99),void 0x0),N(this,_0x598ded(0xfb),void 0x0),N(this,_0x598ded(0xde),void 0x0),N(this,'x',0x0),N(this,'y',0x0),N(this,_0x598ded(0xe7),_0x82d213),N(this,_0x598ded(0xcd),_0x57cbf0),N(this,_0x598ded(0xc0),void 0x0),N(this,_0x598ded(0xb1),{}),N(this,_0x598ded(0xc5),void 0x0),this['unitId']=_0x502165,this[_0x598ded(0xfb)]=_0x4043cb,this['drawId']=_0x28e3eb||_0x4ad178(),this[_0x598ded(0xc5)]=_0x16bb50;}[_0x2d9630(0xf5)](_0x2077a9,_0x510570,_0x3f6ca6,_0x3d43a2){const _0x39c5a4=_0x2d9630;let _0xf2b3da=this[_0x39c5a4(0xc5)][_0x39c5a4(0xda)](_0x45d511)[_0x39c5a4(0xe8)](this['unitId'],this['subUnitId']);if(!_0xf2b3da)throw Error(_0x39c5a4(0x94)+this['unitId']+_0x39c5a4(0xb6)+this[_0x39c5a4(0xfb)]+'\x20not\x20found');let {transform:_0xd0da30}=_0x30350e(this[_0x39c5a4(0x99)],this[_0x39c5a4(0xfb)],{'row':_0x2077a9,'column':_0x510570,'rowOffset':_0x3f6ca6,'columnOffset':_0x3d43a2},0x1,0x1,_0xf2b3da);return this['x']=_0xd0da30[_0x39c5a4(0xbe)],this['y']=_0xd0da30[_0x39c5a4(0x8f)],this;}['setAbsolutePosition'](_0x18c9a8,_0x1065e3){return this['x']=_0x18c9a8,this['y']=_0x1065e3,this;}[_0x2d9630(0xf1)](_0x358584){const _0x32cbf8=_0x2d9630;return this[_0x32cbf8(0xc0)]=_0x358584,this;}['setShapeSolidFill'](_0x4af407,_0x1f5a9a){const _0x32a701=_0x2d9630;return this['shapeData']['fill']||(this['shapeData'][_0x32a701(0x8c)]={}),this['shapeData'][_0x32a701(0x8c)]['fillType']=_0x5dbaee[_0x32a701(0xe0)],_0x4af407!==void 0x0&&(this[_0x32a701(0xb1)][_0x32a701(0x8c)][_0x32a701(0xf4)]=_0x4af407),_0x1f5a9a!==void 0x0&&(this['shapeData'][_0x32a701(0x8c)][_0x32a701(0xa5)]=_0x1f5a9a),this;}[_0x2d9630(0x9d)](_0x4f76a3,_0x376fe2,_0x5b8ddc){const _0x1a8f82=_0x2d9630;if(_0x376fe2===void 0x0||_0x376fe2['length']===0x0)throw Error('colorStops\x20is\x20required\x20and\x20should\x20contain\x20at\x20least\x20one\x20color\x20stop.');return this['shapeData'][_0x1a8f82(0x8c)]||(this[_0x1a8f82(0xb1)][_0x1a8f82(0x8c)]={}),this[_0x1a8f82(0xb1)][_0x1a8f82(0x8c)][_0x1a8f82(0x108)]=_0x376fe2,this[_0x1a8f82(0xb1)]['fill'][_0x1a8f82(0xdb)]=_0x5dbaee[_0x1a8f82(0x93)],this[_0x1a8f82(0xb1)][_0x1a8f82(0x8c)][_0x1a8f82(0xab)]=_0x4f76a3,_0x5b8ddc!==void 0x0&&(this[_0x1a8f82(0xb1)][_0x1a8f82(0x8c)][_0x1a8f82(0xb9)]=_0x5b8ddc),this;}[_0x2d9630(0xd0)](){const _0x1f5c72=_0x2d9630;return this[_0x1f5c72(0xb1)]['fill']={'fillType':_0x5dbaee[_0x1f5c72(0xea)]},this;}[_0x2d9630(0xff)](_0x3b7a63){const _0x2a6bc0=_0x2d9630;return this['shapeData'][_0x2a6bc0(0xcf)]||(this[_0x2a6bc0(0xb1)][_0x2a6bc0(0xcf)]={}),this[_0x2a6bc0(0xb1)][_0x2a6bc0(0xcf)][_0x2a6bc0(0xf4)]=_0x3b7a63,this;}[_0x2d9630(0xf9)](_0x3f0027){const _0x5a3594=_0x2d9630;return this[_0x5a3594(0xb1)][_0x5a3594(0xcf)]||(this[_0x5a3594(0xb1)]['stroke']={}),this[_0x5a3594(0xb1)][_0x5a3594(0xcf)][_0x5a3594(0xe7)]=_0x3f0027,this;}[_0x2d9630(0xbf)](_0x190457){const _0x2fb6e6=_0x2d9630;return this[_0x2fb6e6(0xb1)][_0x2fb6e6(0xcf)]||(this[_0x2fb6e6(0xb1)][_0x2fb6e6(0xcf)]={}),this['shapeData']['stroke'][_0x2fb6e6(0xe1)]=_0x190457,this;}['setStrokeLineJoinType'](_0x2579a5){const _0x5c40f8=_0x2d9630;return this['shapeData'][_0x5c40f8(0xcf)]||(this[_0x5c40f8(0xb1)][_0x5c40f8(0xcf)]={}),this[_0x5c40f8(0xb1)][_0x5c40f8(0xcf)][_0x5c40f8(0xca)]=_0x2579a5,this;}[_0x2d9630(0xfa)](_0x3cb084){const _0x186102=_0x2d9630;return this[_0x186102(0xb1)][_0x186102(0xcf)]||(this[_0x186102(0xb1)][_0x186102(0xcf)]={}),this[_0x186102(0xb1)][_0x186102(0xcf)][_0x186102(0x104)]=_0x3cb084,this;}[_0x2d9630(0xc2)](_0x107d72){const _0x107bb8=_0x2d9630;return this[_0x107bb8(0xb1)]['stroke']||(this[_0x107bb8(0xb1)][_0x107bb8(0xcf)]={}),this[_0x107bb8(0xb1)][_0x107bb8(0xcf)][_0x107bb8(0xa5)]=_0x107d72,this;}[_0x2d9630(0xd1)](_0x22ecb7){const _0x5dc1bf=_0x2d9630;return this['shapeData'][_0x5dc1bf(0xcf)]||(this['shapeData'][_0x5dc1bf(0xcf)]={}),this[_0x5dc1bf(0xb1)][_0x5dc1bf(0xcf)][_0x5dc1bf(0xe5)]=_0x22ecb7,this;}['setWidth'](_0x16222a){return this['width']=_0x16222a,this;}['setHeight'](_0x281759){const _0x16f77b=_0x2d9630;return this[_0x16f77b(0xcd)]=_0x281759,this;}[_0x2d9630(0x9a)](){const _0x21f7de=_0x2d9630;let _0xd7d658=this[_0x21f7de(0xc5)][_0x21f7de(0xda)](_0x4cfbb0)[_0x21f7de(0x91)](this[_0x21f7de(0x99)],this[_0x21f7de(0xfb)],this[_0x21f7de(0xde)]);return _0xd7d658?_0x147008(_0xd7d658['getShapeType']()):this[_0x21f7de(0xc0)]?_0x147008(this[_0x21f7de(0xc0)]):!0x1;}[_0x2d9630(0xe3)](){const _0x317813=_0x2d9630;let _0x4c7c77=this['_injector']['get'](_0x4cfbb0)['getShapeModel'](this[_0x317813(0x99)],this[_0x317813(0xfb)],this[_0x317813(0xde)]);if(!_0x4c7c77)return[];let _0x6f6a58=this[_0x317813(0xc5)][_0x317813(0xda)](_0x1f0733)[_0x317813(0xae)]({'unitId':this[_0x317813(0x99)],'subUnitId':this[_0x317813(0xfb)],'drawingId':this[_0x317813(0xde)]});if(!(_0x6f6a58!=null&&_0x6f6a58[_0x317813(0x98)]))return[];let {width:_0x4c981d=0x0,height:_0x5576ac=0x0}=_0x6f6a58[_0x317813(0x98)];return _0x4c7c77[_0x317813(0xdc)]({'width':_0x4c981d,'height':_0x5576ac}),_0x4c7c77['getConnectionSiteList']();}[_0x2d9630(0xce)](){const _0x48da2a=_0x2d9630;let _0x33f03c=this[_0x48da2a(0xc5)][_0x48da2a(0xda)](_0x4cfbb0)[_0x48da2a(0x91)](this[_0x48da2a(0x99)],this[_0x48da2a(0xfb)],this[_0x48da2a(0xde)]);if(!_0x33f03c)return[];let _0x4f852a=this[_0x48da2a(0xc5)][_0x48da2a(0xda)](_0x1f0733)[_0x48da2a(0xae)]({'unitId':this['unitId'],'subUnitId':this[_0x48da2a(0xfb)],'drawingId':this[_0x48da2a(0xde)]});if(!(_0x4f852a!=null&&_0x4f852a[_0x48da2a(0x98)]))return[];let {width:_0x428245=0x0,height:_0x129861=0x0}=_0x4f852a['transform'];return _0x33f03c[_0x48da2a(0xdc)]({'width':_0x428245,'height':_0x129861}),_0x33f03c[_0x48da2a(0xb4)]();}[_0x2d9630(0xd4)](){const _0x4133c6=_0x2d9630;let _0x5eef8d=this['_injector'][_0x4133c6(0xda)](_0x4cfbb0)[_0x4133c6(0x91)](this[_0x4133c6(0x99)],this[_0x4133c6(0xfb)],this['drawId']);if(!_0x5eef8d||!_0x147008(_0x5eef8d[_0x4133c6(0xfe)]()))return[];let _0x400642=this[_0x4133c6(0xc5)][_0x4133c6(0xda)](_0x1f0733)[_0x4133c6(0xae)]({'unitId':this[_0x4133c6(0x99)],'subUnitId':this[_0x4133c6(0xfb)],'drawingId':this['drawId']});if(!(_0x400642!=null&&_0x400642[_0x4133c6(0x98)]))return[];let {width:_0x3d57e0=0x0,height:_0x3c5fb1=0x0}=_0x400642[_0x4133c6(0x98)];return _0x5eef8d[_0x4133c6(0xdc)]({'width':_0x3d57e0,'height':_0x3c5fb1}),_0x5eef8d[_0x4133c6(0xd4)]();}['getStartConnectInfo'](){const _0x20b4bd=_0x2d9630;var _0x525bb2;let _0x2d56db=this[_0x20b4bd(0xc5)]['get'](_0x4cfbb0)[_0x20b4bd(0x91)](this[_0x20b4bd(0x99)],this['subUnitId'],this[_0x20b4bd(0xde)]);return _0x2d56db?(_0x525bb2=_0x2d56db[_0x20b4bd(0xfd)]())==null?null:_0x525bb2:null;}[_0x2d9630(0x9e)](){const _0x1dfe31=_0x2d9630;var _0x1ae670;let _0x245e3c=this[_0x1dfe31(0xc5)][_0x1dfe31(0xda)](_0x4cfbb0)['getShapeModel'](this[_0x1dfe31(0x99)],this[_0x1dfe31(0xfb)],this[_0x1dfe31(0xde)]);return _0x245e3c?(_0x1ae670=_0x245e3c[_0x1dfe31(0x9e)]())==null?null:_0x1ae670:null;}[_0x2d9630(0xf3)](){const _0x2522e0=_0x2d9630;var _0x59ab9f,_0x493078;if(!this['shapeType'])throw Error('Shape\x20type\x20is\x20required.\x20Please\x20call\x20setShapeType()\x20before\x20build().');if(this['x']===0x0||this['y']===0x0){let _0xfc9627=this[_0x2522e0(0xc5)]['get'](_0x45d511)[_0x2522e0(0xe8)](this['unitId'],this[_0x2522e0(0xfb)]);if(!_0xfc9627)throw Error(_0x2522e0(0x94)+this['unitId']+_0x2522e0(0xb6)+this[_0x2522e0(0xfb)]+_0x2522e0(0x107));let {transform:_0x240082}=_0x30350e(this[_0x2522e0(0x99)],this['subUnitId'],{'row':0x1,'column':0x1,'rowOffset':0x0,'columnOffset':0x0},0x1,0x1,_0xfc9627);this['x']=this['x']>0x0?this['x']:_0x240082[_0x2522e0(0xbe)],this['y']=this['y']>0x0?this['y']:_0x240082['top'];}return this[_0x2522e0(0xe7)]=(_0x59ab9f=this[_0x2522e0(0xe7)])==null?_0x82d213:_0x59ab9f,this[_0x2522e0(0xcd)]=(_0x493078=this[_0x2522e0(0xcd)])==null?_0x57cbf0:_0x493078,{'unitId':this[_0x2522e0(0x99)],'subUnitId':this['subUnitId'],'shapeId':this[_0x2522e0(0xde)],'shapeType':this[_0x2522e0(0xc0)],'shapeData':Object[_0x2522e0(0xf6)](this[_0x2522e0(0xb1)])[_0x2522e0(0x8d)]>0x0?this[_0x2522e0(0xb1)]:void 0x0,'x':this['x'],'y':this['y'],'width':this[_0x2522e0(0xe7)],'height':this[_0x2522e0(0xcd)]};}[_0x2d9630(0xb8)](){const _0x264db0=_0x2d9630;return this[_0x264db0(0xde)];}['getShapeType'](){const _0x59f308=_0x2d9630;return this[_0x59f308(0xc0)];}[_0x2d9630(0xaf)](){return this['shapeData'];}[_0x2d9630(0x89)](){return{'x':this['x'],'y':this['y']};}[_0x2d9630(0x90)](){const _0xb6e2f8=_0x2d9630;return{'width':this[_0xb6e2f8(0xe7)],'height':this[_0xb6e2f8(0xcd)]};}},F=class extends P{constructor(_0x56182a,_0x1a40e0,_0x72f3,_0x1db2ee){const _0x4278dc=_0x2d9630;super(_0x56182a,_0x1a40e0,_0x72f3,_0x1db2ee),N(this,_0x4278dc(0xb1),{});}[_0x2d9630(0xf1)](_0x105cff){const _0x262dbf=_0x2d9630;if(!_0x147008(_0x105cff))throw Error('Invalid\x20shape\x20type\x20for\x20connector.\x20Received\x20'+_0x105cff+_0x262dbf(0xc6));return super[_0x262dbf(0xf1)](_0x105cff),this;}[_0x2d9630(0xd5)](_0x383959){const _0x5a0fac=_0x2d9630;var _0x4a8032,_0x5bc284;return(_0x4a8032=this['shapeData'])!=null&&_0x4a8032['ln']||(this['shapeData']['ln']={}),!((_0x5bc284=this[_0x5a0fac(0xb1)])==null||(_0x5bc284=_0x5bc284['ln'])==null)&&_0x5bc284[_0x5a0fac(0x95)]||(this[_0x5a0fac(0xb1)]['ln']['startArrow']={}),this[_0x5a0fac(0xb1)]['ln'][_0x5a0fac(0x95)][_0x5a0fac(0xec)]=_0x383959,this;}[_0x2d9630(0xf7)](_0x1a11d3){const _0x5c01c0=_0x2d9630;var _0x35d163,_0x461f05;return(_0x35d163=this['shapeData'])!=null&&_0x35d163['ln']||(this[_0x5c01c0(0xb1)]['ln']={}),!((_0x461f05=this[_0x5c01c0(0xb1)])==null||(_0x461f05=_0x461f05['ln'])==null)&&_0x461f05[_0x5c01c0(0xf8)]||(this['shapeData']['ln']['endArrow']={}),this[_0x5c01c0(0xb1)]['ln']['endArrow']['type']=_0x1a11d3,this;}[_0x2d9630(0xe4)](_0x94da41){const _0x2817a1=_0x2d9630;var _0xc77a6d,_0x17e34e;return(_0xc77a6d=this[_0x2817a1(0xb1)])!=null&&_0xc77a6d['ln']||(this[_0x2817a1(0xb1)]['ln']={}),!((_0x17e34e=this['shapeData'])==null||(_0x17e34e=_0x17e34e['ln'])==null)&&_0x17e34e[_0x2817a1(0x95)]||(this[_0x2817a1(0xb1)]['ln'][_0x2817a1(0x95)]={}),this['shapeData']['ln'][_0x2817a1(0x95)][_0x2817a1(0xd9)]=_0x94da41,this;}[_0x2d9630(0xcb)](_0x227620){const _0x5c3953=_0x2d9630;var _0x262f83,_0x351859;return(_0x262f83=this[_0x5c3953(0xb1)])!=null&&_0x262f83['ln']||(this[_0x5c3953(0xb1)]['ln']={}),!((_0x351859=this['shapeData'])==null||(_0x351859=_0x351859['ln'])==null)&&_0x351859['endArrow']||(this[_0x5c3953(0xb1)]['ln'][_0x5c3953(0xf8)]={}),this['shapeData']['ln'][_0x5c3953(0xf8)][_0x5c3953(0xd9)]=_0x227620,this;}[_0x2d9630(0xf3)](){const _0x179fb1=_0x2d9630;return super[_0x179fb1(0xf3)]();}[_0x2d9630(0x9e)](){const _0x29f692=_0x2d9630;var _0x447237;return((_0x447237=this[_0x29f692(0xb1)])==null||(_0x447237=_0x447237[_0x29f692(0x97)])==null?void 0x0:_0x447237['to'])||null;}['getStartConnectInfo'](){const _0x4b08db=_0x2d9630;var _0x16926e;return((_0x16926e=this['shapeData'])==null||(_0x16926e=_0x16926e['relation'])==null?void 0x0:_0x16926e[_0x4b08db(0xb7)])||null;}};function I(_0xfcc94,_0x17b70a,_0x3a9d1b,_0x2f3963,_0x53ae43,_0x2972a4){const _0x4b8ba5=_0x2d9630;let _0x4320b1=_0x53ae43[_0x4b8ba5(0x91)](_0xfcc94,_0x17b70a,_0x3a9d1b);if(!_0x4320b1)return null;let _0x1c5036=_0x2972a4['getDrawingByParam']({'unitId':_0xfcc94,'subUnitId':_0x17b70a,'drawingId':_0x3a9d1b});if(!(_0x1c5036!=null&&_0x1c5036[_0x4b8ba5(0x98)]))return null;let {left:_0x5205ad=0x0,top:_0x4f9555=0x0,width:_0x3d394c=0x0,height:_0x578172=0x0,flipX:_0x39b6b3=!0x1,flipY:_0x2a0eae=!0x1,angle:_0x4a7257}=_0x1c5036['transform'];_0x4320b1[_0x4b8ba5(0xdc)]({'width':_0x3d394c,'height':_0x578172});let _0x52bf4f=_0x4320b1[_0x4b8ba5(0xa8)]()['find'](_0x34b649=>_0x34b649[_0x4b8ba5(0x9c)]===_0x2f3963);if(!_0x52bf4f)return null;let _0x113d28=_0x39b6b3?_0x3d394c-_0x52bf4f['x']:_0x52bf4f['x'],_0x55f900=_0x2a0eae?_0x578172-_0x52bf4f['y']:_0x52bf4f['y'];if(_0x4a7257&&_0x4a7257!==0x0){let _0x504480=_0x4a7257*Math['PI']/0xb4,_0x2fe876=Math[_0x4b8ba5(0xf2)](_0x504480),_0x59764e=Math['sin'](_0x504480),_0x138c36=_0x3d394c/0x2,_0x3e79c0=_0x578172/0x2,_0xad0601=_0x113d28-_0x138c36,_0x4f58d7=_0x55f900-_0x3e79c0;_0x113d28=_0x138c36+_0xad0601*_0x2fe876-_0x4f58d7*_0x59764e,_0x55f900=_0x3e79c0+_0xad0601*_0x59764e+_0x4f58d7*_0x2fe876;}_0x113d28+=_0x5205ad,_0x55f900+=_0x4f9555;let _0x2f6452=_0x52bf4f['ang']/0xea60;_0x39b6b3&&(_0x2f6452=0xb4-_0x2f6452),_0x2a0eae&&(_0x2f6452=-_0x2f6452),_0x2f6452+=_0x4a7257||0x0,_0x2f6452=(_0x2f6452%0x168+0x168)%0x168;let _0x4dfd9b=_0x31d35f({'left':_0x5205ad,'top':_0x4f9555,'width':_0x3d394c,'height':_0x578172},_0x4a7257||0x0);return{'point':{'x':_0x113d28,'y':_0x55f900},'angle':_0x2f6452,'bounds':_0x4dfd9b};}function L(_0x34c3c5,_0x1bef19){const _0x3dabb5=_0x2d9630;let _0x51f24a=_0x1bef19['x']-_0x34c3c5['x'],_0x96ac2b=_0x1bef19['y']-_0x34c3c5['y'];return Math[_0x3dabb5(0xeb)](_0x51f24a)>=Math['abs'](_0x96ac2b)?_0x51f24a>=0x0?0xb4:0x0:_0x96ac2b>=0x0?0x10e:0x5a;}function R(_0x419811,_0x143f44,_0xc49bb1,_0x3d97d6,_0x5855b9,_0x372180,_0x22dbc1){const _0x19ae23=_0x2d9630;let _0x62d715=_0x372180[_0x19ae23(0x91)](_0x419811,_0x143f44,_0xc49bb1);if(!_0x62d715)return null;let _0x5043d3=_0x22dbc1[_0x19ae23(0xae)]({'unitId':_0x419811,'subUnitId':_0x143f44,'drawingId':_0xc49bb1});if(!(_0x5043d3!=null&&_0x5043d3[_0x19ae23(0x98)]))return null;let {left:_0x5dec24=0x0,top:_0x343fa3=0x0,width:_0x1e58a7=0x0,height:_0x218f4b=0x0,flipX:_0x3bf364=!0x1,flipY:_0x268869=!0x1}=_0x5043d3[_0x19ae23(0x98)];_0x62d715[_0x19ae23(0xdc)]({'width':_0x1e58a7,'height':_0x218f4b});let _0x47517a=_0x62d715[_0x19ae23(0xd4)]();if(_0x47517a[_0x19ae23(0x8d)]<0x2)return null;let _0x319d2c=_0x3d97d6?_0x47517a[0x0]:_0x47517a[_0x47517a[_0x19ae23(0x8d)]-0x1],_0x2be466=new _0x3f5f02({'left':_0x5dec24,'top':_0x343fa3,'width':_0x1e58a7,'height':_0x218f4b,'flipX':_0x3bf364,'flipY':_0x268869})[_0x19ae23(0xe9)](_0x319d2c);return{'point':_0x2be466,'angle':L(_0x5855b9[_0x19ae23(0xa1)],_0x2be466),'bounds':{'left':_0x2be466['x'],'top':_0x2be466['y'],'width':0x0,'height':0x0}};}var z=class extends _0x5b4d34{async[_0x2d9630(0x101)](_0x7f3959){const _0x4fe19f=_0x2d9630;let {unitId:_0x236eee,subUnitId:_0x15dce2,shapeId:_0x34b191,shapeType:_0x117a52,shapeData:_0x33bce4,x:_0x21f79f,y:_0x592579,width:_0x102629,height:_0x2a21a9}=_0x7f3959;return this[_0x4fe19f(0xba)]['executeCommand'](_0x2e53d3['id'],{'unitId':_0x236eee,'subUnitId':_0x15dce2,'shapeId':_0x34b191,'shapeType':_0x117a52,'shapeData':_0x33bce4,'position':{'x':_0x21f79f,'y':_0x592579},'width':_0x102629,'height':_0x2a21a9});}async['updateShape'](_0x4b1e80){const _0xc9eb2f=_0x2d9630;let {unitId:_0x278b60,subUnitId:_0x25e983,shapeId:_0x15b3b1,shapeType:_0x17ac8a,shapeData:_0x4fa334,x:_0x3033b1,y:_0x5607a9,width:_0xca80c3,height:_0x8dacb1}=_0x4b1e80;return this[_0xc9eb2f(0xba)][_0xc9eb2f(0x103)](_0xc8e4fb['id'],{'unitId':_0x278b60,'subUnitId':_0x25e983,'shapeId':_0x15b3b1,'shapeType':_0x17ac8a,'shapeData':_0x4fa334,'position':{'x':_0x3033b1,'y':_0x5607a9},'width':_0xca80c3,'height':_0x8dacb1});}[_0x2d9630(0xd2)](_0x568d29){const _0x4ab824=_0x2d9630;let _0x3d3e82=this['getWorkbook']()[_0x4ab824(0xe6)](),_0x38ac0b=this[_0x4ab824(0xac)]();if(_0x568d29){let _0x3dc406=new P(_0x3d3e82,_0x38ac0b,_0x568d29[_0x4ab824(0xde)],this['_injector']);return this[_0x4ab824(0xa7)](_0x3dc406,_0x3d3e82,_0x38ac0b,_0x568d29[_0x4ab824(0xde)]),_0x3dc406;}return new P(_0x3d3e82,_0x38ac0b,_0x4ad178(),this[_0x4ab824(0xc5)]);}['newConnector'](_0x2f71c6){const _0x2170cc=_0x2d9630;let _0x235380=this[_0x2170cc(0xb5)]()[_0x2170cc(0xe6)](),_0xd1cb0c=this[_0x2170cc(0xac)]();if(_0x2f71c6){let _0x40b4d4=new F(_0x235380,_0xd1cb0c,_0x2f71c6['drawId'],this[_0x2170cc(0xc5)]);return this[_0x2170cc(0xa7)](_0x40b4d4,_0x235380,_0xd1cb0c,_0x2f71c6[_0x2170cc(0xde)]),_0x40b4d4;}return new F(_0x235380,_0xd1cb0c,_0x4ad178(),this[_0x2170cc(0xc5)]);}[_0x2d9630(0xfc)](){const _0x1419ee=_0x2d9630;let _0x17d55e=this[_0x1419ee(0xc5)]['get'](_0x4f2a92),_0x522a1b=this[_0x1419ee(0xb5)]()[_0x1419ee(0xe6)](),_0x487c91=this[_0x1419ee(0xac)](),_0x4a7db4=_0x17d55e['getDrawingData'](_0x522a1b,_0x487c91);if(!_0x4a7db4)return[];let _0x4bf64b=[];for(let [_0x267eb9,_0x5b873e]of Object[_0x1419ee(0x9f)](_0x4a7db4))if(_0x5b873e&&_0x5b873e[_0x1419ee(0xcc)]===_0x5dd802[_0x1419ee(0x88)]){let _0x5766b0=new P(_0x522a1b,_0x487c91,_0x267eb9,this[_0x1419ee(0xc5)]);this[_0x1419ee(0xa7)](_0x5766b0,_0x522a1b,_0x487c91,_0x267eb9),_0x4bf64b[_0x1419ee(0xa0)](_0x5766b0);}return _0x4bf64b;}[_0x2d9630(0xbb)](_0x349a97){const _0x227c33=_0x2d9630;let {unitId:_0x5f2515,subUnitId:_0x10c010,drawId:_0x2757e7}=_0x349a97;return this[_0x227c33(0xba)][_0x227c33(0x103)](_0x360a01['id'],{'unitId':_0x5f2515,'drawings':[{'unitId':_0x5f2515,'subUnitId':_0x10c010,'drawingId':_0x2757e7,'drawingType':_0x5dd802['DRAWING_SHAPE']}]});}async['connectShapes'](_0x1139ba){const _0x5ea05c=_0x2d9630;let {connector:_0x595443,startTarget:_0x1ec564,endTarget:_0x5875f2}=_0x1139ba;if(!_0x1ec564&&!_0x5875f2)return!0x1;let _0x110ae7=this[_0x5ea05c(0xb5)]()[_0x5ea05c(0xe6)](),_0x212d42=this['getSheetId'](),_0x2455d9=this['_injector'][_0x5ea05c(0xda)](_0x4cfbb0),_0x277b6e=this[_0x5ea05c(0xc5)][_0x5ea05c(0xda)](_0x1f0733),_0x469e4d=_0x2455d9['getShapeModel'](_0x110ae7,_0x212d42,_0x595443[_0x5ea05c(0xde)]);if(!_0x469e4d)return!0x1;let _0x2f4b05=_0x469e4d['getShapeType'](),_0x5756d5=_0x469e4d['getShapeRelation'](),_0xb8d6fe={};for(let _0x354030 of _0x469e4d[_0x5ea05c(0x105)]()){let _0x3be7c3=_0x469e4d[_0x5ea05c(0xa9)](_0x354030);_0x3be7c3!==void 0x0&&(_0xb8d6fe[_0x354030]=_0x3be7c3);}let {startInfo:_0xa5b983,endInfo:_0x42e8ca}=this[_0x5ea05c(0xd3)](_0x110ae7,_0x212d42,_0x595443,_0x469e4d,_0x1ec564,_0x5875f2,_0x2455d9,_0x277b6e,_0x5756d5);if(!_0xa5b983||!_0x42e8ca)return!0x1;let _0x109ebd=_0x41ee51(_0x471885(_0xa5b983,_0x42e8ca,_0x2f4b05),_0x2f4b05),_0x36e8d9={};return _0x1ec564?_0x36e8d9[_0x5ea05c(0xb7)]={'shapeId':_0x1ec564['shape'][_0x5ea05c(0xde)],'cxnIndex':_0x1ec564[_0x5ea05c(0xe2)]}:_0x5756d5!=null&&_0x5756d5['from']&&(_0x36e8d9[_0x5ea05c(0xb7)]=_0x5756d5[_0x5ea05c(0xb7)]),_0x5875f2?_0x36e8d9['to']={'shapeId':_0x5875f2[_0x5ea05c(0xd8)]['drawId'],'cxnIndex':_0x5875f2['connectionSiteIndex']}:_0x5756d5!=null&&_0x5756d5['to']&&(_0x36e8d9['to']=_0x5756d5['to']),this[_0x5ea05c(0xba)]['executeCommand'](_0x20a1ba['id'],{'unitId':_0x110ae7,'subUnitId':_0x212d42,'connectorShapeId':_0x595443[_0x5ea05c(0xde)],'width':_0x109ebd['worldRect'][_0x5ea05c(0xe7)],'height':_0x109ebd[_0x5ea05c(0xbd)][_0x5ea05c(0xcd)],'left':_0x109ebd[_0x5ea05c(0xbd)][_0x5ea05c(0xbe)],'top':_0x109ebd[_0x5ea05c(0xbd)]['top'],'flipX':_0x109ebd[_0x5ea05c(0xbd)][_0x5ea05c(0xad)]||!0x1,'flipY':_0x109ebd[_0x5ea05c(0xbd)][_0x5ea05c(0xc3)]||!0x1,'oldAdjustValues':_0xb8d6fe,'newAdjustValues':_0x109ebd[_0x5ea05c(0xee)],'newLineType':_0x109ebd[_0x5ea05c(0xc1)],'oldLineType':_0x2f4b05,'rotation':_0x109ebd['rotation'],'oldRelation':_0x5756d5,'newRelation':_0x36e8d9});}['_preloadShapeProperties'](_0x113366,_0x44868a,_0x497ee9,_0x27f44e){const _0x56ed2b=_0x2d9630;let _0x43538b=this['_injector'][_0x56ed2b(0xda)](_0x1f0733)[_0x56ed2b(0xae)]({'unitId':_0x44868a,'subUnitId':_0x497ee9,'drawingId':_0x27f44e});if(_0x43538b!=null&&_0x43538b[_0x56ed2b(0x98)]){var _0x50d86c,_0x2b585b,_0x56e9b0,_0x589994;_0x113366['x']=(_0x50d86c=_0x43538b['transform'][_0x56ed2b(0xbe)])==null?0x0:_0x50d86c,_0x113366['y']=(_0x2b585b=_0x43538b['transform'][_0x56ed2b(0x8f)])==null?0x0:_0x2b585b,_0x113366[_0x56ed2b(0xe7)]=(_0x56e9b0=_0x43538b['transform'][_0x56ed2b(0xe7)])==null?_0x113366['width']:_0x56e9b0,_0x113366[_0x56ed2b(0xcd)]=(_0x589994=_0x43538b['transform'][_0x56ed2b(0xcd)])==null?_0x113366['height']:_0x589994;}let _0xcacc72=this[_0x56ed2b(0xc5)][_0x56ed2b(0xda)](_0x4cfbb0)[_0x56ed2b(0x91)](_0x44868a,_0x497ee9,_0x27f44e);if(_0xcacc72){_0x113366[_0x56ed2b(0xc0)]=_0xcacc72[_0x56ed2b(0xfe)]();let _0x55748d=_0xcacc72[_0x56ed2b(0xaf)]();_0x55748d&&(_0x113366[_0x56ed2b(0xb1)]=JSON['parse'](JSON[_0x56ed2b(0xed)](_0x55748d)));}}['_resolveEndpoints'](_0x5c1e4b,_0x58a81c,_0x213f0f,_0x59c7e5,_0x564dea,_0x51c78d,_0x190707,_0x233fc5,_0x275ebb){const _0x1f41df=_0x2d9630;let _0x194c89=null,_0x4f94fc=null;return _0x564dea&&(_0x194c89=I(_0x5c1e4b,_0x58a81c,_0x564dea[_0x1f41df(0xd8)][_0x1f41df(0xde)],_0x564dea[_0x1f41df(0xe2)],_0x190707,_0x233fc5)),_0x51c78d&&(_0x4f94fc=I(_0x5c1e4b,_0x58a81c,_0x51c78d[_0x1f41df(0xd8)][_0x1f41df(0xde)],_0x51c78d[_0x1f41df(0xe2)],_0x190707,_0x233fc5)),_0x194c89||(_0x194c89=this['_resolveExistingOrFreeEndpoint'](_0x5c1e4b,_0x58a81c,_0x213f0f['drawId'],!0x0,_0x4f94fc,_0x275ebb==null?void 0x0:_0x275ebb['from'],_0x190707,_0x233fc5)),_0x4f94fc||(_0x4f94fc=this['_resolveExistingOrFreeEndpoint'](_0x5c1e4b,_0x58a81c,_0x213f0f[_0x1f41df(0xde)],!0x1,_0x194c89,_0x275ebb==null?void 0x0:_0x275ebb['to'],_0x190707,_0x233fc5)),{'startInfo':_0x194c89,'endInfo':_0x4f94fc};}['_resolveExistingOrFreeEndpoint'](_0x1af5b4,_0x312dd8,_0x3f4628,_0x4e9107,_0x267130,_0x33a232,_0x3ba77b,_0x89a93d){const _0x279d20=_0x2d9630;if(_0x33a232){let _0x375511=I(_0x1af5b4,_0x312dd8,_0x33a232[_0x279d20(0xc7)],_0x33a232[_0x279d20(0xd7)],_0x3ba77b,_0x89a93d);if(_0x375511)return _0x375511;}return _0x267130?R(_0x1af5b4,_0x312dd8,_0x3f4628,_0x4e9107,_0x267130,_0x3ba77b,_0x89a93d):null;}};_0x5b4d34[_0x2d9630(0xf0)](z);export{F as FConnectorShape,P as FShape};
1
+ const _0x12986b=_0x5565;(function(_0x5954b7,_0xd9c166){const _0x5f24dd=_0x5565,_0x4d1e3d=_0x5954b7();while(!![]){try{const _0x18d354=-parseInt(_0x5f24dd(0x179))/0x1+-parseInt(_0x5f24dd(0x180))/0x2*(-parseInt(_0x5f24dd(0x121))/0x3)+parseInt(_0x5f24dd(0x137))/0x4+parseInt(_0x5f24dd(0x142))/0x5+parseInt(_0x5f24dd(0x157))/0x6*(parseInt(_0x5f24dd(0x18a))/0x7)+parseInt(_0x5f24dd(0x12e))/0x8*(parseInt(_0x5f24dd(0x122))/0x9)+-parseInt(_0x5f24dd(0x11c))/0xa;if(_0x18d354===_0xd9c166)break;else _0x4d1e3d['push'](_0x4d1e3d['shift']());}catch(_0x1282a8){_0x4d1e3d['push'](_0x4d1e3d['shift']());}}}(_0xa6ed,0x24e4d));function _0xa6ed(){const _0x25b3ab=['worldRect','getShapeData','insertShape','startArrow','localToWorld','2unlTMu','fill','length','ShapeGradientTypeEnum','height','getAdjustNames','setShapeSolidFill','newConnector','executeCommand','getWorkbook','133NYPpRZ','subUnitId','constructor','getShapeType','gradientStops','fillType','setAbsolutePosition','updateShape','getShapeId','toPrimitive','stroke','prototype','getDrawingPoints','size','1795900oRRInN','setShapeType','DRAWING_SHAPE','drawId','_preloadShapeProperties','95043zRvReQ','71073MZUevu','stringify','ShapeLineTypeEnum','setStrokeOpacity','newShape','ShapeLineDashEnum','getDrawingByParam','colorStops\x20is\x20required\x20and\x20should\x20contain\x20at\x20least\x20one\x20color\x20stop.','symbol','getShapeModel','color','setShapeGradientFill','152cLGNkb','capType','isLineShape','lineStrokeType','get','setEndArrowSize','setStrokeLineJoinType','connectShapes','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','200616YjrWYv','setHeight','setStrokeLineType','getAdjustValueByName','setStrokeLineDashType','cos','_resolveEndpoints','opacity','setStrokeColor','getDrawingData','getSheetId','1502235ytkUZy','Skeleton\x20for\x20unitId\x20','flipX','ensureSkeleton','width','left','shapeType','\x20not\x20found','NoFill','find','GradientFill','setPosition','_injector','rotation','unitId','getUnitId','transform','setStartArrowType','defineProperty','abs','getShapes','27948vehdkO','shape','_resolveExistingOrFreeEndpoint','updateContext','extend','relation','build','setNoneFill','ShapeTypeEnum','point','ShapeArrowTypeEnum','setEndArrowType','getEndConnectInfo','drawingType','push','adjustValues','entries','setWidth','getStartConnectInfo','setStrokeLineCapType','endArrow','function','_commandService','getConnectorLinePoints','from','getAdjustPoints','connectionSiteIndex','getConnectionSiteList','removeShape','Shape\x20type\x20is\x20required.\x20Please\x20call\x20setShapeType()\x20before\x20build().','gradientAngle','type','flipY','top','290120hpJNfC','shapeData'];_0xa6ed=function(){return _0x25b3ab;};return _0xa6ed();}import{ConnectorCoordinateTransform,ShapeArrowSizeEnum,ShapeArrowTypeEnum,ShapeFillEnum,ShapeGradientTypeEnum,ShapeLineCapEnum,ShapeLineDashEnum,ShapeLineJoinEnum,ShapeLineTypeEnum,ShapeTypeEnum,computeConnectorRouteLayout,getBasicShapeRotateBound,isConnectorShape,routeConnectorLineShape}from'@univerjs-pro/engine-shape';import{FEnum}from'@univerjs/core/facade';import{DEFAULT_SHAPE_HEIGHT,DEFAULT_SHAPE_WIDTH,InsertShapeCommand,SetShapeDrawingDataCommand,SheetsShapeService,UpdateConnectorRelationCommand}from'@univerjs-pro/sheets-shape';import{DrawingTypeEnum,generateRandomId}from'@univerjs/core';import{IDrawingManagerService}from'@univerjs/drawing';import{SheetSkeletonService,convertPositionCellToSheetOverGrid}from'@univerjs/sheets';import{ISheetDrawingService,RemoveSheetDrawingCommand}from'@univerjs/sheets-drawing';import{FWorksheet}from'@univerjs/sheets/facade';function _0x5565(_0x1ed8fe,_0x505307){_0x1ed8fe=_0x1ed8fe-0x112;const _0xa6edcf=_0xa6ed();let _0x5565a6=_0xa6edcf[_0x1ed8fe];return _0x5565a6;}var FSheetsShapeEnumMixin=class extends FEnum{get[_0x12986b(0x15f)](){return ShapeTypeEnum;}get['ShapeFillEnum'](){return ShapeFillEnum;}get[_0x12986b(0x183)](){return ShapeGradientTypeEnum;}get[_0x12986b(0x124)](){return ShapeLineTypeEnum;}get[_0x12986b(0x127)](){return ShapeLineDashEnum;}get['ShapeLineCapEnum'](){return ShapeLineCapEnum;}get['ShapeLineJoinEnum'](){return ShapeLineJoinEnum;}get[_0x12986b(0x161)](){return ShapeArrowTypeEnum;}get['ShapeArrowSizeEnum'](){return ShapeArrowSizeEnum;}};FEnum[_0x12986b(0x15b)](FSheetsShapeEnumMixin);function _typeof(_0x4570d6){'@babel/helpers - typeof';const _0x260211=_0x12986b;return _typeof=_0x260211(0x16c)==typeof Symbol&&_0x260211(0x12a)==typeof Symbol['iterator']?function(_0x27587b){return typeof _0x27587b;}:function(_0x283af7){const _0x133e61=_0x260211;return _0x283af7&&_0x133e61(0x16c)==typeof Symbol&&_0x283af7[_0x133e61(0x18c)]===Symbol&&_0x283af7!==Symbol[_0x133e61(0x119)]?_0x133e61(0x12a):typeof _0x283af7;},_typeof(_0x4570d6);}function toPrimitive(_0x46cfb5,_0x11a639){const _0x6c1bf=_0x12986b;if('object'!=_typeof(_0x46cfb5)||!_0x46cfb5)return _0x46cfb5;var _0x2a1de9=_0x46cfb5[Symbol[_0x6c1bf(0x117)]];if(void 0x0!==_0x2a1de9){var _0x54f064=_0x2a1de9['call'](_0x46cfb5,_0x11a639||'default');if('object'!=_typeof(_0x54f064))return _0x54f064;throw new TypeError(_0x6c1bf(0x136));}return('string'===_0x11a639?String:Number)(_0x46cfb5);}function toPropertyKey(_0x423d8a){const _0x3fcf73=_0x12986b;var _0x1ccda9=toPrimitive(_0x423d8a,'string');return _0x3fcf73(0x12a)==_typeof(_0x1ccda9)?_0x1ccda9:_0x1ccda9+'';}function _defineProperty(_0x4dfcac,_0x16ed89,_0x5515f7){const _0x188206=_0x12986b;return(_0x16ed89=toPropertyKey(_0x16ed89))in _0x4dfcac?Object[_0x188206(0x154)](_0x4dfcac,_0x16ed89,{'value':_0x5515f7,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4dfcac[_0x16ed89]=_0x5515f7,_0x4dfcac;}var FShape=class{constructor(_0xc2cf06,_0x5c2a17,_0x4e2809,_0x27d71a){const _0x2c8527=_0x12986b;_defineProperty(this,'unitId',void 0x0),_defineProperty(this,_0x2c8527(0x18b),void 0x0),_defineProperty(this,_0x2c8527(0x11f),void 0x0),_defineProperty(this,'x',0x0),_defineProperty(this,'y',0x0),_defineProperty(this,_0x2c8527(0x146),DEFAULT_SHAPE_WIDTH),_defineProperty(this,_0x2c8527(0x184),DEFAULT_SHAPE_HEIGHT),_defineProperty(this,_0x2c8527(0x148),void 0x0),_defineProperty(this,_0x2c8527(0x17a),{}),_defineProperty(this,_0x2c8527(0x14e),void 0x0),this[_0x2c8527(0x150)]=_0xc2cf06,this['subUnitId']=_0x5c2a17,this[_0x2c8527(0x11f)]=_0x4e2809||generateRandomId(),this[_0x2c8527(0x14e)]=_0x27d71a;}[_0x12986b(0x14d)](_0x3b9632,_0x28391a,_0x51f356,_0x2b94c9){const _0x1e4115=_0x12986b,_0x4aafdc=this[_0x1e4115(0x14e)][_0x1e4115(0x132)](SheetSkeletonService)[_0x1e4115(0x145)](this['unitId'],this[_0x1e4115(0x18b)]);if(!_0x4aafdc)throw new Error(_0x1e4115(0x143)+this['unitId']+'\x20and\x20subUnitId\x20'+this[_0x1e4115(0x18b)]+'\x20not\x20found');const {transform:_0xb8415f}=convertPositionCellToSheetOverGrid(this['unitId'],this[_0x1e4115(0x18b)],{'row':_0x3b9632,'column':_0x28391a,'rowOffset':_0x51f356,'columnOffset':_0x2b94c9},0x1,0x1,_0x4aafdc);return this['x']=_0xb8415f['left'],this['y']=_0xb8415f[_0x1e4115(0x178)],this;}[_0x12986b(0x114)](_0x30fd1a,_0x4eb5dc){return this['x']=_0x30fd1a,this['y']=_0x4eb5dc,this;}[_0x12986b(0x11d)](_0x2a59c5){const _0x375c92=_0x12986b;return this[_0x375c92(0x148)]=_0x2a59c5,this;}[_0x12986b(0x186)](_0x329ed1,_0x59c114){const _0x4b42c8=_0x12986b;if(!this['shapeData']['fill'])this['shapeData'][_0x4b42c8(0x181)]={};this[_0x4b42c8(0x17a)][_0x4b42c8(0x181)][_0x4b42c8(0x113)]=ShapeFillEnum['SolidFill'];if(_0x329ed1!==void 0x0)this[_0x4b42c8(0x17a)][_0x4b42c8(0x181)][_0x4b42c8(0x12c)]=_0x329ed1;if(_0x59c114!==void 0x0)this[_0x4b42c8(0x17a)][_0x4b42c8(0x181)][_0x4b42c8(0x13e)]=_0x59c114;return this;}[_0x12986b(0x12d)](_0x2ce4a6,_0x482e4c,_0x215296){const _0x17eb1a=_0x12986b;if(_0x482e4c===void 0x0||_0x482e4c[_0x17eb1a(0x182)]===0x0)throw new Error(_0x17eb1a(0x129));if(!this[_0x17eb1a(0x17a)][_0x17eb1a(0x181)])this[_0x17eb1a(0x17a)][_0x17eb1a(0x181)]={};this[_0x17eb1a(0x17a)]['fill'][_0x17eb1a(0x112)]=_0x482e4c,this[_0x17eb1a(0x17a)][_0x17eb1a(0x181)]['fillType']=ShapeFillEnum[_0x17eb1a(0x14c)],this['shapeData'][_0x17eb1a(0x181)]['gradientType']=_0x2ce4a6;if(_0x215296!==void 0x0)this['shapeData'][_0x17eb1a(0x181)][_0x17eb1a(0x175)]=_0x215296;return this;}[_0x12986b(0x15e)](){const _0x389766=_0x12986b;return this['shapeData'][_0x389766(0x181)]={'fillType':ShapeFillEnum[_0x389766(0x14a)]},this;}[_0x12986b(0x13f)](_0x202128){const _0xe2c675=_0x12986b;if(!this['shapeData'][_0xe2c675(0x118)])this['shapeData']['stroke']={};return this[_0xe2c675(0x17a)]['stroke'][_0xe2c675(0x12c)]=_0x202128,this;}['setStrokeWidth'](_0x316bbc){const _0x4bf49f=_0x12986b;if(!this[_0x4bf49f(0x17a)]['stroke'])this[_0x4bf49f(0x17a)][_0x4bf49f(0x118)]={};return this['shapeData'][_0x4bf49f(0x118)][_0x4bf49f(0x146)]=_0x316bbc,this;}[_0x12986b(0x13b)](_0x1382e6){const _0x467144=_0x12986b;if(!this[_0x467144(0x17a)][_0x467144(0x118)])this[_0x467144(0x17a)][_0x467144(0x118)]={};return this[_0x467144(0x17a)][_0x467144(0x118)]['dashType']=_0x1382e6,this;}[_0x12986b(0x134)](_0x1f5819){const _0x2d72dc=_0x12986b;if(!this['shapeData'][_0x2d72dc(0x118)])this['shapeData'][_0x2d72dc(0x118)]={};return this[_0x2d72dc(0x17a)][_0x2d72dc(0x118)]['lineJoinType']=_0x1f5819,this;}[_0x12986b(0x16a)](_0x58af8f){const _0x2bbeba=_0x12986b;if(!this[_0x2bbeba(0x17a)]['stroke'])this[_0x2bbeba(0x17a)][_0x2bbeba(0x118)]={};return this['shapeData'][_0x2bbeba(0x118)][_0x2bbeba(0x12f)]=_0x58af8f,this;}[_0x12986b(0x125)](_0x4ef375){const _0x172876=_0x12986b;if(!this[_0x172876(0x17a)][_0x172876(0x118)])this[_0x172876(0x17a)][_0x172876(0x118)]={};return this[_0x172876(0x17a)]['stroke'][_0x172876(0x13e)]=_0x4ef375,this;}[_0x12986b(0x139)](_0x20ed44){const _0x4c339b=_0x12986b;if(!this[_0x4c339b(0x17a)]['stroke'])this[_0x4c339b(0x17a)]['stroke']={};return this['shapeData']['stroke'][_0x4c339b(0x131)]=_0x20ed44,this;}[_0x12986b(0x168)](_0x3a5aeb){const _0xbd0a12=_0x12986b;return this[_0xbd0a12(0x146)]=_0x3a5aeb,this;}[_0x12986b(0x138)](_0x27d9bb){const _0x44bca0=_0x12986b;return this[_0x44bca0(0x184)]=_0x27d9bb,this;}[_0x12986b(0x130)](){const _0x503b66=_0x12986b,_0x1073f4=this[_0x503b66(0x14e)]['get'](SheetsShapeService)[_0x503b66(0x12b)](this[_0x503b66(0x150)],this['subUnitId'],this['drawId']);if(_0x1073f4)return isConnectorShape(_0x1073f4[_0x503b66(0x18d)]());if(this[_0x503b66(0x148)])return isConnectorShape(this[_0x503b66(0x148)]);return![];}['getConnectionSites'](){const _0x44a024=_0x12986b,_0xdfb730=this['_injector']['get'](SheetsShapeService)[_0x44a024(0x12b)](this[_0x44a024(0x150)],this[_0x44a024(0x18b)],this[_0x44a024(0x11f)]);if(!_0xdfb730)return[];const _0x27404e=this[_0x44a024(0x14e)][_0x44a024(0x132)](IDrawingManagerService)['getDrawingByParam']({'unitId':this[_0x44a024(0x150)],'subUnitId':this['subUnitId'],'drawingId':this[_0x44a024(0x11f)]});if(!(_0x27404e===null||_0x27404e===void 0x0?void 0x0:_0x27404e['transform']))return[];const {width:width=0x0,height:height=0x0}=_0x27404e[_0x44a024(0x152)];return _0xdfb730['updateContext']({'width':width,'height':height}),_0xdfb730[_0x44a024(0x172)]();}[_0x12986b(0x170)](){const _0x3f6dd2=_0x12986b,_0x17fca8=this[_0x3f6dd2(0x14e)]['get'](SheetsShapeService)['getShapeModel'](this[_0x3f6dd2(0x150)],this['subUnitId'],this['drawId']);if(!_0x17fca8)return[];const _0x1dbd3e=this[_0x3f6dd2(0x14e)]['get'](IDrawingManagerService)[_0x3f6dd2(0x128)]({'unitId':this[_0x3f6dd2(0x150)],'subUnitId':this[_0x3f6dd2(0x18b)],'drawingId':this['drawId']});if(!(_0x1dbd3e===null||_0x1dbd3e===void 0x0?void 0x0:_0x1dbd3e[_0x3f6dd2(0x152)]))return[];const {width:width=0x0,height:height=0x0}=_0x1dbd3e['transform'];return _0x17fca8['updateContext']({'width':width,'height':height}),_0x17fca8[_0x3f6dd2(0x11a)]();}['getConnectorLinePoints'](){const _0x1a17cd=_0x12986b,_0x417c9c=this[_0x1a17cd(0x14e)][_0x1a17cd(0x132)](SheetsShapeService)['getShapeModel'](this[_0x1a17cd(0x150)],this[_0x1a17cd(0x18b)],this[_0x1a17cd(0x11f)]);if(!_0x417c9c)return[];if(!isConnectorShape(_0x417c9c[_0x1a17cd(0x18d)]()))return[];const _0x10620f=this[_0x1a17cd(0x14e)][_0x1a17cd(0x132)](IDrawingManagerService)[_0x1a17cd(0x128)]({'unitId':this[_0x1a17cd(0x150)],'subUnitId':this['subUnitId'],'drawingId':this['drawId']});if(!(_0x10620f===null||_0x10620f===void 0x0?void 0x0:_0x10620f[_0x1a17cd(0x152)]))return[];const {width:width=0x0,height:height=0x0}=_0x10620f[_0x1a17cd(0x152)];return _0x417c9c[_0x1a17cd(0x15a)]({'width':width,'height':height}),_0x417c9c['getConnectorLinePoints']();}[_0x12986b(0x169)](){const _0x684f15=_0x12986b;var _0x37ae34;const _0x42a840=this[_0x684f15(0x14e)][_0x684f15(0x132)](SheetsShapeService)['getShapeModel'](this['unitId'],this['subUnitId'],this[_0x684f15(0x11f)]);if(!_0x42a840)return null;return(_0x37ae34=_0x42a840['getStartConnectInfo']())!==null&&_0x37ae34!==void 0x0?_0x37ae34:null;}['getEndConnectInfo'](){const _0x20047d=_0x12986b;var _0x4d397c;const _0x263853=this['_injector']['get'](SheetsShapeService)[_0x20047d(0x12b)](this[_0x20047d(0x150)],this[_0x20047d(0x18b)],this[_0x20047d(0x11f)]);if(!_0x263853)return null;return(_0x4d397c=_0x263853[_0x20047d(0x163)]())!==null&&_0x4d397c!==void 0x0?_0x4d397c:null;}[_0x12986b(0x15d)](){const _0x3d24c2=_0x12986b;var _0x29f0a9,_0x3b4df7;if(!this[_0x3d24c2(0x148)])throw new Error(_0x3d24c2(0x174));if(this['x']===0x0||this['y']===0x0){const _0x4cfb68=this[_0x3d24c2(0x14e)][_0x3d24c2(0x132)](SheetSkeletonService)[_0x3d24c2(0x145)](this[_0x3d24c2(0x150)],this[_0x3d24c2(0x18b)]);if(!_0x4cfb68)throw new Error(_0x3d24c2(0x143)+this['unitId']+'\x20and\x20subUnitId\x20'+this[_0x3d24c2(0x18b)]+_0x3d24c2(0x149));const {transform:_0x4d83f6}=convertPositionCellToSheetOverGrid(this[_0x3d24c2(0x150)],this['subUnitId'],{'row':0x1,'column':0x1,'rowOffset':0x0,'columnOffset':0x0},0x1,0x1,_0x4cfb68);this['x']=this['x']>0x0?this['x']:_0x4d83f6[_0x3d24c2(0x147)],this['y']=this['y']>0x0?this['y']:_0x4d83f6[_0x3d24c2(0x178)];}return this[_0x3d24c2(0x146)]=(_0x29f0a9=this[_0x3d24c2(0x146)])!==null&&_0x29f0a9!==void 0x0?_0x29f0a9:DEFAULT_SHAPE_WIDTH,this['height']=(_0x3b4df7=this[_0x3d24c2(0x184)])!==null&&_0x3b4df7!==void 0x0?_0x3b4df7:DEFAULT_SHAPE_HEIGHT,{'unitId':this[_0x3d24c2(0x150)],'subUnitId':this['subUnitId'],'shapeId':this['drawId'],'shapeType':this[_0x3d24c2(0x148)],'shapeData':Object['keys'](this[_0x3d24c2(0x17a)])[_0x3d24c2(0x182)]>0x0?this['shapeData']:void 0x0,'x':this['x'],'y':this['y'],'width':this[_0x3d24c2(0x146)],'height':this[_0x3d24c2(0x184)]};}[_0x12986b(0x116)](){const _0xc7ca46=_0x12986b;return this[_0xc7ca46(0x11f)];}[_0x12986b(0x18d)](){const _0x2a590f=_0x12986b;return this[_0x2a590f(0x148)];}[_0x12986b(0x17c)](){const _0x2e38ef=_0x12986b;return this[_0x2e38ef(0x17a)];}['getPosition'](){return{'x':this['x'],'y':this['y']};}['getSize'](){const _0x5b50aa=_0x12986b;return{'width':this[_0x5b50aa(0x146)],'height':this[_0x5b50aa(0x184)]};}},FConnectorShape=class extends FShape{constructor(_0xd3ea5e,_0x5c6292,_0x93f24,_0x2c8307){super(_0xd3ea5e,_0x5c6292,_0x93f24,_0x2c8307),_defineProperty(this,'shapeData',{});}[_0x12986b(0x11d)](_0x1101c6){const _0x26e4a2=_0x12986b;if(!isConnectorShape(_0x1101c6))throw new Error('Invalid\x20shape\x20type\x20for\x20connector.\x20Received\x20'+_0x1101c6+',\x20but\x20expected\x20a\x20connector\x20shape\x20type.');return super[_0x26e4a2(0x11d)](_0x1101c6),this;}[_0x12986b(0x153)](_0x4ae818){const _0x297941=_0x12986b;var _0x5f07e5,_0x47f60d;if(!((_0x5f07e5=this['shapeData'])===null||_0x5f07e5===void 0x0?void 0x0:_0x5f07e5['ln']))this[_0x297941(0x17a)]['ln']={};if(!((_0x47f60d=this[_0x297941(0x17a)])===null||_0x47f60d===void 0x0||(_0x47f60d=_0x47f60d['ln'])===null||_0x47f60d===void 0x0?void 0x0:_0x47f60d[_0x297941(0x17e)]))this['shapeData']['ln']['startArrow']={};return this[_0x297941(0x17a)]['ln'][_0x297941(0x17e)][_0x297941(0x176)]=_0x4ae818,this;}[_0x12986b(0x162)](_0x4ee753){const _0x4add36=_0x12986b;var _0x3d1416,_0x3afea1;if(!((_0x3d1416=this[_0x4add36(0x17a)])===null||_0x3d1416===void 0x0?void 0x0:_0x3d1416['ln']))this[_0x4add36(0x17a)]['ln']={};if(!((_0x3afea1=this[_0x4add36(0x17a)])===null||_0x3afea1===void 0x0||(_0x3afea1=_0x3afea1['ln'])===null||_0x3afea1===void 0x0?void 0x0:_0x3afea1[_0x4add36(0x16b)]))this[_0x4add36(0x17a)]['ln'][_0x4add36(0x16b)]={};return this['shapeData']['ln'][_0x4add36(0x16b)][_0x4add36(0x176)]=_0x4ee753,this;}['setStartArrowSize'](_0x3bb477){const _0x1bdc15=_0x12986b;var _0x3b2884,_0x246dcb;if(!((_0x3b2884=this[_0x1bdc15(0x17a)])===null||_0x3b2884===void 0x0?void 0x0:_0x3b2884['ln']))this[_0x1bdc15(0x17a)]['ln']={};if(!((_0x246dcb=this[_0x1bdc15(0x17a)])===null||_0x246dcb===void 0x0||(_0x246dcb=_0x246dcb['ln'])===null||_0x246dcb===void 0x0?void 0x0:_0x246dcb[_0x1bdc15(0x17e)]))this[_0x1bdc15(0x17a)]['ln'][_0x1bdc15(0x17e)]={};return this['shapeData']['ln'][_0x1bdc15(0x17e)]['size']=_0x3bb477,this;}[_0x12986b(0x133)](_0x5ccabe){const _0x255f17=_0x12986b;var _0x220f62,_0x5ee33c;if(!((_0x220f62=this[_0x255f17(0x17a)])===null||_0x220f62===void 0x0?void 0x0:_0x220f62['ln']))this[_0x255f17(0x17a)]['ln']={};if(!((_0x5ee33c=this[_0x255f17(0x17a)])===null||_0x5ee33c===void 0x0||(_0x5ee33c=_0x5ee33c['ln'])===null||_0x5ee33c===void 0x0?void 0x0:_0x5ee33c[_0x255f17(0x16b)]))this[_0x255f17(0x17a)]['ln']['endArrow']={};return this['shapeData']['ln'][_0x255f17(0x16b)][_0x255f17(0x11b)]=_0x5ccabe,this;}[_0x12986b(0x15d)](){const _0x109c99=_0x12986b;return super[_0x109c99(0x15d)]();}[_0x12986b(0x163)](){const _0x5a33ba=_0x12986b;var _0x48dcea;return((_0x48dcea=this[_0x5a33ba(0x17a)])===null||_0x48dcea===void 0x0||(_0x48dcea=_0x48dcea[_0x5a33ba(0x15c)])===null||_0x48dcea===void 0x0?void 0x0:_0x48dcea['to'])||null;}['getStartConnectInfo'](){const _0xbf8bad=_0x12986b;var _0x304082;return((_0x304082=this['shapeData'])===null||_0x304082===void 0x0||(_0x304082=_0x304082[_0xbf8bad(0x15c)])===null||_0x304082===void 0x0?void 0x0:_0x304082['from'])||null;}};function computeConnectionPointInfo(_0x54cc25,_0x3977f5,_0x5be51c,_0x27d92d,_0x297e9d,_0x4722bd){const _0x448d29=_0x12986b,_0x2b9c82=_0x297e9d[_0x448d29(0x12b)](_0x54cc25,_0x3977f5,_0x5be51c);if(!_0x2b9c82)return null;const _0x217c75=_0x4722bd['getDrawingByParam']({'unitId':_0x54cc25,'subUnitId':_0x3977f5,'drawingId':_0x5be51c});if(!(_0x217c75===null||_0x217c75===void 0x0?void 0x0:_0x217c75[_0x448d29(0x152)]))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x1b57a1}=_0x217c75[_0x448d29(0x152)];_0x2b9c82[_0x448d29(0x15a)]({'width':width,'height':height});const _0x30aba8=_0x2b9c82[_0x448d29(0x172)]()[_0x448d29(0x14b)](_0x390c1e=>_0x390c1e['index']===_0x27d92d);if(!_0x30aba8)return null;let _0xa12970=flipX?width-_0x30aba8['x']:_0x30aba8['x'],_0x558fc5=flipY?height-_0x30aba8['y']:_0x30aba8['y'];if(_0x1b57a1&&_0x1b57a1!==0x0){const _0x58ac78=_0x1b57a1*Math['PI']/0xb4,_0x24db42=Math[_0x448d29(0x13c)](_0x58ac78),_0x139712=Math['sin'](_0x58ac78),_0x5c0401=width/0x2,_0x261546=height/0x2,_0x17915f=_0xa12970-_0x5c0401,_0xbfd97c=_0x558fc5-_0x261546;_0xa12970=_0x5c0401+_0x17915f*_0x24db42-_0xbfd97c*_0x139712,_0x558fc5=_0x261546+_0x17915f*_0x139712+_0xbfd97c*_0x24db42;}_0xa12970+=left,_0x558fc5+=top;let _0x1fc16d=_0x30aba8['ang']/0xea60;if(flipX)_0x1fc16d=0xb4-_0x1fc16d;if(flipY)_0x1fc16d=-_0x1fc16d;_0x1fc16d+=_0x1b57a1||0x0,_0x1fc16d=(_0x1fc16d%0x168+0x168)%0x168;const _0x3e56c8=getBasicShapeRotateBound({'left':left,'top':top,'width':width,'height':height},_0x1b57a1||0x0);return{'point':{'x':_0xa12970,'y':_0x558fc5},'angle':_0x1fc16d,'bounds':_0x3e56c8};}function calculateFreeEndpointAngle(_0x41eef1,_0x4bb047){const _0x4849bb=_0x12986b,_0x21931a=_0x4bb047['x']-_0x41eef1['x'],_0x231eb5=_0x4bb047['y']-_0x41eef1['y'];if(Math[_0x4849bb(0x155)](_0x21931a)>=Math[_0x4849bb(0x155)](_0x231eb5))return _0x21931a>=0x0?0xb4:0x0;return _0x231eb5>=0x0?0x10e:0x5a;}function computeFreeEndpointInfo(_0x443195,_0x5f02cd,_0x45c65b,_0x36980d,_0x5ef71a,_0x297677,_0x52990b){const _0x53cd9c=_0x12986b,_0x2a53c9=_0x297677['getShapeModel'](_0x443195,_0x5f02cd,_0x45c65b);if(!_0x2a53c9)return null;const _0x355730=_0x52990b[_0x53cd9c(0x128)]({'unitId':_0x443195,'subUnitId':_0x5f02cd,'drawingId':_0x45c65b});if(!(_0x355730===null||_0x355730===void 0x0?void 0x0:_0x355730[_0x53cd9c(0x152)]))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![]}=_0x355730[_0x53cd9c(0x152)];_0x2a53c9[_0x53cd9c(0x15a)]({'width':width,'height':height});const _0x4bc9b3=_0x2a53c9[_0x53cd9c(0x16e)]();if(_0x4bc9b3['length']<0x2)return null;const _0x4aab69=_0x36980d?_0x4bc9b3[0x0]:_0x4bc9b3[_0x4bc9b3[_0x53cd9c(0x182)]-0x1],_0xa34a87=new ConnectorCoordinateTransform({'left':left,'top':top,'width':width,'height':height,'flipX':flipX,'flipY':flipY})[_0x53cd9c(0x17f)](_0x4aab69);return{'point':_0xa34a87,'angle':calculateFreeEndpointAngle(_0x5ef71a[_0x53cd9c(0x160)],_0xa34a87),'bounds':{'left':_0xa34a87['x'],'top':_0xa34a87['y'],'width':0x0,'height':0x0}};}var FWorksheetShapeMixin=class extends FWorksheet{async[_0x12986b(0x17d)](_0x580c29){const _0x1d4706=_0x12986b,{unitId:_0x557796,subUnitId:_0x2c8de1,shapeId:_0x1ba1b5,shapeType:_0x19c115,shapeData:_0x8b1d2d,x:_0xbdd58f,y:_0x3ed08b,width:_0x3806fe,height:_0x3a0255}=_0x580c29;return this[_0x1d4706(0x16d)]['executeCommand'](InsertShapeCommand['id'],{'unitId':_0x557796,'subUnitId':_0x2c8de1,'shapeId':_0x1ba1b5,'shapeType':_0x19c115,'shapeData':_0x8b1d2d,'position':{'x':_0xbdd58f,'y':_0x3ed08b},'width':_0x3806fe,'height':_0x3a0255});}async[_0x12986b(0x115)](_0x253c54){const _0x136528=_0x12986b,{unitId:_0x59821b,subUnitId:_0x26a514,shapeId:_0x409bd3,shapeType:_0x1f1eac,shapeData:_0x32916c,x:_0x1ff886,y:_0x43a7ef,width:_0x4f1d1b,height:_0x381587}=_0x253c54;return this[_0x136528(0x16d)][_0x136528(0x188)](SetShapeDrawingDataCommand['id'],{'unitId':_0x59821b,'subUnitId':_0x26a514,'shapeId':_0x409bd3,'shapeType':_0x1f1eac,'shapeData':_0x32916c,'position':{'x':_0x1ff886,'y':_0x43a7ef},'width':_0x4f1d1b,'height':_0x381587});}[_0x12986b(0x126)](_0xa66d77){const _0x50ddb8=_0x12986b,_0x1ddb90=this['getWorkbook']()[_0x50ddb8(0x151)](),_0x59cbcf=this[_0x50ddb8(0x141)]();if(_0xa66d77){const _0x484994=new FShape(_0x1ddb90,_0x59cbcf,_0xa66d77[_0x50ddb8(0x11f)],this[_0x50ddb8(0x14e)]);return this[_0x50ddb8(0x120)](_0x484994,_0x1ddb90,_0x59cbcf,_0xa66d77['drawId']),_0x484994;}return new FShape(_0x1ddb90,_0x59cbcf,generateRandomId(),this['_injector']);}[_0x12986b(0x187)](_0x4638e2){const _0x345c1d=_0x12986b,_0x2ac3f9=this[_0x345c1d(0x189)]()[_0x345c1d(0x151)](),_0x5a527d=this['getSheetId']();if(_0x4638e2){const _0x67b3c5=new FConnectorShape(_0x2ac3f9,_0x5a527d,_0x4638e2[_0x345c1d(0x11f)],this[_0x345c1d(0x14e)]);return this[_0x345c1d(0x120)](_0x67b3c5,_0x2ac3f9,_0x5a527d,_0x4638e2[_0x345c1d(0x11f)]),_0x67b3c5;}return new FConnectorShape(_0x2ac3f9,_0x5a527d,generateRandomId(),this[_0x345c1d(0x14e)]);}[_0x12986b(0x156)](){const _0x1e2a53=_0x12986b,_0x7a58bc=this[_0x1e2a53(0x14e)][_0x1e2a53(0x132)](ISheetDrawingService),_0x3f684a=this['getWorkbook']()[_0x1e2a53(0x151)](),_0x150ec7=this[_0x1e2a53(0x141)](),_0x1a246e=_0x7a58bc[_0x1e2a53(0x140)](_0x3f684a,_0x150ec7);if(!_0x1a246e)return[];const _0x2efefa=[];for(const [_0x522f1f,_0x1ccbc2]of Object[_0x1e2a53(0x167)](_0x1a246e))if(_0x1ccbc2&&_0x1ccbc2[_0x1e2a53(0x164)]===DrawingTypeEnum[_0x1e2a53(0x11e)]){const _0xc497d7=new FShape(_0x3f684a,_0x150ec7,_0x522f1f,this['_injector']);this[_0x1e2a53(0x120)](_0xc497d7,_0x3f684a,_0x150ec7,_0x522f1f),_0x2efefa[_0x1e2a53(0x165)](_0xc497d7);}return _0x2efefa;}[_0x12986b(0x173)](_0x8cfe96){const _0x2a1f39=_0x12986b,{unitId:_0x4bc8c6,subUnitId:_0xbeff8d,drawId:_0x8d6d30}=_0x8cfe96;return this[_0x2a1f39(0x16d)][_0x2a1f39(0x188)](RemoveSheetDrawingCommand['id'],{'unitId':_0x4bc8c6,'drawings':[{'unitId':_0x4bc8c6,'subUnitId':_0xbeff8d,'drawingId':_0x8d6d30,'drawingType':DrawingTypeEnum['DRAWING_SHAPE']}]});}async[_0x12986b(0x135)](_0x2504f5){const _0x2e39da=_0x12986b,{connector:_0x2b7e29,startTarget:_0x3aacbe,endTarget:_0x14b306}=_0x2504f5;if(!_0x3aacbe&&!_0x14b306)return![];const _0x51254c=this['getWorkbook']()[_0x2e39da(0x151)](),_0x2d71c5=this[_0x2e39da(0x141)](),_0xc35790=this[_0x2e39da(0x14e)][_0x2e39da(0x132)](SheetsShapeService),_0x38ea94=this[_0x2e39da(0x14e)][_0x2e39da(0x132)](IDrawingManagerService),_0x4abd55=_0xc35790[_0x2e39da(0x12b)](_0x51254c,_0x2d71c5,_0x2b7e29[_0x2e39da(0x11f)]);if(!_0x4abd55)return![];const _0x3d53d4=_0x4abd55['getShapeType'](),_0x642960=_0x4abd55['getShapeRelation'](),_0x5aea71={};for(const _0x164431 of _0x4abd55[_0x2e39da(0x185)]()){const _0x1df45a=_0x4abd55[_0x2e39da(0x13a)](_0x164431);if(_0x1df45a!==void 0x0)_0x5aea71[_0x164431]=_0x1df45a;}const {startInfo:_0x3dcae5,endInfo:_0x38b051}=this[_0x2e39da(0x13d)](_0x51254c,_0x2d71c5,_0x2b7e29,_0x4abd55,_0x3aacbe,_0x14b306,_0xc35790,_0x38ea94,_0x642960);if(!_0x3dcae5||!_0x38b051)return![];const _0x1372df=computeConnectorRouteLayout(routeConnectorLineShape(_0x3dcae5,_0x38b051,_0x3d53d4),_0x3d53d4),_0x466777={};if(_0x3aacbe)_0x466777['from']={'shapeId':_0x3aacbe[_0x2e39da(0x158)][_0x2e39da(0x11f)],'cxnIndex':_0x3aacbe[_0x2e39da(0x171)]};else{if(_0x642960===null||_0x642960===void 0x0?void 0x0:_0x642960[_0x2e39da(0x16f)])_0x466777[_0x2e39da(0x16f)]=_0x642960[_0x2e39da(0x16f)];}if(_0x14b306)_0x466777['to']={'shapeId':_0x14b306[_0x2e39da(0x158)][_0x2e39da(0x11f)],'cxnIndex':_0x14b306[_0x2e39da(0x171)]};else{if(_0x642960===null||_0x642960===void 0x0?void 0x0:_0x642960['to'])_0x466777['to']=_0x642960['to'];}return this[_0x2e39da(0x16d)][_0x2e39da(0x188)](UpdateConnectorRelationCommand['id'],{'unitId':_0x51254c,'subUnitId':_0x2d71c5,'connectorShapeId':_0x2b7e29['drawId'],'width':_0x1372df[_0x2e39da(0x17b)]['width'],'height':_0x1372df[_0x2e39da(0x17b)][_0x2e39da(0x184)],'left':_0x1372df[_0x2e39da(0x17b)][_0x2e39da(0x147)],'top':_0x1372df['worldRect'][_0x2e39da(0x178)],'flipX':_0x1372df[_0x2e39da(0x17b)][_0x2e39da(0x144)]||![],'flipY':_0x1372df['worldRect'][_0x2e39da(0x177)]||![],'oldAdjustValues':_0x5aea71,'newAdjustValues':_0x1372df[_0x2e39da(0x166)],'newLineType':_0x1372df['lineType'],'oldLineType':_0x3d53d4,'rotation':_0x1372df[_0x2e39da(0x14f)],'oldRelation':_0x642960,'newRelation':_0x466777});}[_0x12986b(0x120)](_0x3f55ef,_0x993319,_0x512a9f,_0xb4479b){const _0x33bb1b=_0x12986b,_0x442a83=this[_0x33bb1b(0x14e)][_0x33bb1b(0x132)](IDrawingManagerService)[_0x33bb1b(0x128)]({'unitId':_0x993319,'subUnitId':_0x512a9f,'drawingId':_0xb4479b});if(_0x442a83===null||_0x442a83===void 0x0?void 0x0:_0x442a83[_0x33bb1b(0x152)]){var _0x4c826b,_0x1d450d,_0x9778ae,_0x4edb0e;_0x3f55ef['x']=(_0x4c826b=_0x442a83['transform'][_0x33bb1b(0x147)])!==null&&_0x4c826b!==void 0x0?_0x4c826b:0x0,_0x3f55ef['y']=(_0x1d450d=_0x442a83[_0x33bb1b(0x152)]['top'])!==null&&_0x1d450d!==void 0x0?_0x1d450d:0x0,_0x3f55ef[_0x33bb1b(0x146)]=(_0x9778ae=_0x442a83[_0x33bb1b(0x152)][_0x33bb1b(0x146)])!==null&&_0x9778ae!==void 0x0?_0x9778ae:_0x3f55ef['width'],_0x3f55ef[_0x33bb1b(0x184)]=(_0x4edb0e=_0x442a83[_0x33bb1b(0x152)][_0x33bb1b(0x184)])!==null&&_0x4edb0e!==void 0x0?_0x4edb0e:_0x3f55ef[_0x33bb1b(0x184)];}const _0x17f1f2=this[_0x33bb1b(0x14e)][_0x33bb1b(0x132)](SheetsShapeService)[_0x33bb1b(0x12b)](_0x993319,_0x512a9f,_0xb4479b);if(_0x17f1f2){_0x3f55ef[_0x33bb1b(0x148)]=_0x17f1f2['getShapeType']();const _0x1f6398=_0x17f1f2['getShapeData']();if(_0x1f6398)_0x3f55ef[_0x33bb1b(0x17a)]=JSON['parse'](JSON[_0x33bb1b(0x123)](_0x1f6398));}}[_0x12986b(0x13d)](_0x4e659b,_0x3e3ffa,_0x4d7bc7,_0x366373,_0x18bf0d,_0x7cf596,_0x3356a7,_0x25790e,_0x450c3c){const _0x3e2c54=_0x12986b;let _0xb897b3=null,_0x22e6a5=null;if(_0x18bf0d)_0xb897b3=computeConnectionPointInfo(_0x4e659b,_0x3e3ffa,_0x18bf0d[_0x3e2c54(0x158)][_0x3e2c54(0x11f)],_0x18bf0d[_0x3e2c54(0x171)],_0x3356a7,_0x25790e);if(_0x7cf596)_0x22e6a5=computeConnectionPointInfo(_0x4e659b,_0x3e3ffa,_0x7cf596[_0x3e2c54(0x158)]['drawId'],_0x7cf596[_0x3e2c54(0x171)],_0x3356a7,_0x25790e);if(!_0xb897b3)_0xb897b3=this[_0x3e2c54(0x159)](_0x4e659b,_0x3e3ffa,_0x4d7bc7[_0x3e2c54(0x11f)],!![],_0x22e6a5,_0x450c3c===null||_0x450c3c===void 0x0?void 0x0:_0x450c3c[_0x3e2c54(0x16f)],_0x3356a7,_0x25790e);if(!_0x22e6a5)_0x22e6a5=this['_resolveExistingOrFreeEndpoint'](_0x4e659b,_0x3e3ffa,_0x4d7bc7[_0x3e2c54(0x11f)],![],_0xb897b3,_0x450c3c===null||_0x450c3c===void 0x0?void 0x0:_0x450c3c['to'],_0x3356a7,_0x25790e);return{'startInfo':_0xb897b3,'endInfo':_0x22e6a5};}[_0x12986b(0x159)](_0x4574db,_0xc2f15c,_0x2d1fe9,_0x23e9ad,_0x26d5da,_0x393f7a,_0x229045,_0x19305e){if(_0x393f7a){const _0x5b8522=computeConnectionPointInfo(_0x4574db,_0xc2f15c,_0x393f7a['shapeId'],_0x393f7a['cxnIndex'],_0x229045,_0x19305e);if(_0x5b8522)return _0x5b8522;}if(!_0x26d5da)return null;return computeFreeEndpointInfo(_0x4574db,_0xc2f15c,_0x2d1fe9,_0x23e9ad,_0x26d5da,_0x229045,_0x19305e);}};FWorksheet['extend'](FWorksheetShapeMixin);export{FConnectorShape,FShape};
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x3e0f44=_0x5cad;(function(_0x685b5f,_0x74bcd3){const _0x4ba8f6=_0x5cad,_0x48f7ce=_0x685b5f();while(!![]){try{const _0x4ca410=-parseInt(_0x4ba8f6(0x17e))/0x1+-parseInt(_0x4ba8f6(0x168))/0x2*(parseInt(_0x4ba8f6(0x126))/0x3)+parseInt(_0x4ba8f6(0x17b))/0x4*(-parseInt(_0x4ba8f6(0x15a))/0x5)+parseInt(_0x4ba8f6(0x198))/0x6*(-parseInt(_0x4ba8f6(0x10d))/0x7)+parseInt(_0x4ba8f6(0x119))/0x8*(-parseInt(_0x4ba8f6(0x19c))/0x9)+-parseInt(_0x4ba8f6(0x174))/0xa*(parseInt(_0x4ba8f6(0x16d))/0xb)+-parseInt(_0x4ba8f6(0x154))/0xc*(-parseInt(_0x4ba8f6(0x179))/0xd);if(_0x4ca410===_0x74bcd3)break;else _0x48f7ce['push'](_0x48f7ce['shift']());}catch(_0x17af09){_0x48f7ce['push'](_0x48f7ce['shift']());}}}(_0x1923,0x9c5e0));import{ShapeModel as _0x70c847,computeConnectorRouteLayout as _0x8d0a05,getBasicShapeRotateBound as _0x2f0722,isConnectorShape as _0x481196,routeConnectorLineShape as _0x5b14d9}from'@univerjs-pro/engine-shape';import{CommandType as _0x38e762,DependentOn as _0xadff15,Disposable as _0x591fbb,DrawingTypeEnum as _0x171314,ICommandService as _0x46216b,IConfigService as _0x123a36,IResourceManagerService as _0x5d82d8,IUndoRedoService as _0x38611f,IUniverInstanceService as _0x5e9d00,Inject as _0x136051,Injector as _0x50498c,Plugin as _0xefe177,UniverInstanceType as _0x339832,generateRandomId as _0x267412,merge as _0xea1431,sequenceExecute as _0x457a87,touchDependencies as _0x3df3af}from'@univerjs/core';import{SheetInterceptorService as _0x53f707,SheetSkeletonService as _0x566bb4,getSheetCommandTarget as _0x39c299}from'@univerjs/sheets';import{ClearSheetDrawingTransformerOperation as _0x16778a,DrawingApplyType as _0x1a4a4e,ISheetDrawingService as _0x5445d4,InsertSheetDrawingCommand as _0x5eb9fd,RemoveSheetDrawingCommand as _0x270a78,SetDrawingApplyMutation as _0x2a1e2d,SetSheetDrawingCommand as _0x53b7a4,transformToAxisAlignPosition as _0x59be66,transformToDrawingPosition as _0x41bba7}from'@univerjs/sheets-drawing';import{UniverLicensePlugin as _0x27586c}from'@univerjs-pro/license';import{IDrawingManagerService as _0x38a742}from'@univerjs/drawing';const I=0xc8,L=0xc8;function R(_0x260e83){'@babel/helpers - typeof';const _0x41ec2=_0x5cad;return R=typeof Symbol==_0x41ec2(0x137)&&typeof Symbol[_0x41ec2(0x18b)]=='symbol'?function(_0x57f517){return typeof _0x57f517;}:function(_0x4490bd){const _0xbcf8f8=_0x41ec2;return _0x4490bd&&typeof Symbol=='function'&&_0x4490bd[_0xbcf8f8(0x178)]===Symbol&&_0x4490bd!==Symbol['prototype']?_0xbcf8f8(0x169):typeof _0x4490bd;},R(_0x260e83);}function z(_0x242731,_0x26acbe){const _0x437539=_0x5cad;if(R(_0x242731)!=_0x437539(0x16a)||!_0x242731)return _0x242731;var _0x2679a0=_0x242731[Symbol['toPrimitive']];if(_0x2679a0!==void 0x0){var _0x37e346=_0x2679a0[_0x437539(0x165)](_0x242731,_0x26acbe||_0x437539(0x18f));if(R(_0x37e346)!=_0x437539(0x16a))return _0x37e346;throw TypeError(_0x437539(0x150));}return(_0x26acbe==='string'?String:Number)(_0x242731);}function B(_0xca2d49){const _0x3f1828=_0x5cad;var _0x5dbb6f=z(_0xca2d49,_0x3f1828(0x146));return R(_0x5dbb6f)==_0x3f1828(0x169)?_0x5dbb6f:_0x5dbb6f+'';}function V(_0x25bdb4,_0x11b40b,_0x2f10ec){const _0x3df678=_0x5cad;return(_0x11b40b=B(_0x11b40b))in _0x25bdb4?Object[_0x3df678(0x14e)](_0x25bdb4,_0x11b40b,{'value':_0x2f10ec,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x25bdb4[_0x11b40b]=_0x2f10ec,_0x25bdb4;}var H=class extends _0x591fbb{constructor(){const _0x216c84=_0x5cad;super(),V(this,_0x216c84(0x139),new Map()),V(this,_0x216c84(0x13c),new Set()),V(this,_0x216c84(0x148),new Set());}[_0x3e0f44(0x107)](_0x1ca671,_0x147119,_0x5354b8){const _0x38ed24=_0x3e0f44;let _0x467a03=new _0x70c847(_0x1ca671,_0x147119,_0x5354b8);return this[_0x38ed24(0x139)][_0x38ed24(0x138)](_0x147119,_0x467a03),_0x481196(_0x1ca671)&&this[_0x38ed24(0x13c)][_0x38ed24(0x120)](_0x147119),_0x467a03;}[_0x3e0f44(0x190)](_0x3e59ad){const _0xb99c56=_0x3e0f44;let _0x14310e=[];for(let _0x3e82c3 of this[_0xb99c56(0x13c)]){let _0x185af3=this[_0xb99c56(0x139)][_0xb99c56(0x136)](_0x3e82c3);if(_0x185af3){let _0x29dabb=_0x185af3[_0xb99c56(0x158)]();if(_0x29dabb){var _0x23298e,_0x3cec5d;((_0x23298e=_0x29dabb[_0xb99c56(0x155)])==null?void 0x0:_0x23298e[_0xb99c56(0x171)])===_0x3e59ad&&_0x14310e[_0xb99c56(0x19d)]({..._0x29dabb[_0xb99c56(0x155)],'lineShapeId':_0x3e82c3,'isFrom':!0x0}),((_0x3cec5d=_0x29dabb['to'])==null?void 0x0:_0x3cec5d[_0xb99c56(0x171)])===_0x3e59ad&&_0x14310e['push']({..._0x29dabb['to'],'lineShapeId':_0x3e82c3,'isFrom':!0x1});}}}return _0x14310e;}[_0x3e0f44(0x123)](_0xdba992){const _0x30ff92=_0x3e0f44;let _0x470446=this[_0x30ff92(0x139)][_0x30ff92(0x136)](_0xdba992);if(_0x470446)return _0x470446[_0x30ff92(0x158)]();}[_0x3e0f44(0x135)](_0x5d705c){const _0x3f74c2=_0x3e0f44;let _0x1554f7=this[_0x3f74c2(0x139)][_0x3f74c2(0x136)](_0x5d705c);if(_0x1554f7)return _0x1554f7['getShapeType']();}[_0x3e0f44(0x195)](_0xf56757){const _0x14eb20=_0x3e0f44;return this['_shapes'][_0x14eb20(0x11c)](_0xf56757);}['removeShape'](_0x322f5a){const _0x58c187=_0x3e0f44;let _0x5de8ef=this[_0x58c187(0x139)][_0x58c187(0x136)](_0x322f5a);_0x5de8ef&&(_0x481196(_0x5de8ef[_0x58c187(0x135)]())&&this[_0x58c187(0x13c)][_0x58c187(0x118)](_0x322f5a),this['_shapes'][_0x58c187(0x118)](_0x322f5a));}[_0x3e0f44(0x157)](){const _0x11bc2f=_0x3e0f44;let _0x21a1fb=[];return this['_shapes'][_0x11bc2f(0x124)](_0x2a1c8c=>{const _0x2e9646=_0x11bc2f;_0x21a1fb[_0x2e9646(0x19d)](_0x2a1c8c[_0x2e9646(0x157)]());}),_0x21a1fb;}['fromJSON'](_0x108054){const _0x1c887e=_0x3e0f44;for(let _0x5642c2 of _0x108054){let {id:_0x329f19,shapeType:_0x3ae199}=_0x5642c2,_0x58fe11=this[_0x1c887e(0x107)](_0x3ae199,_0x329f19,_0x5642c2['shapeData']);_0x58fe11&&_0x58fe11[_0x1c887e(0x166)]()&&this['_linesIds'][_0x1c887e(0x120)](_0x329f19);}}[_0x3e0f44(0x161)](){const _0x3f494c=_0x3e0f44;this[_0x3f494c(0x129)]||(this[_0x3f494c(0x139)][_0x3f494c(0x124)](_0x970a7a=>{const _0x2221fd=_0x3f494c;_0x970a7a[_0x2221fd(0x161)]();}),this['_shapes'][_0x3f494c(0x134)](),this[_0x3f494c(0x13c)][_0x3f494c(0x134)](),this['_groupIds'][_0x3f494c(0x134)](),super[_0x3f494c(0x161)]());}};function U(_0x582b7e,_0x59bd11){return function(_0x1bf810,_0x27b674){_0x59bd11(_0x1bf810,_0x27b674,_0x582b7e);};}function W(_0x23c919,_0x4b9019,_0x3c34c0,_0x4eeff0){const _0x3519de=_0x3e0f44;var _0x2595c1=arguments[_0x3519de(0x187)],_0x268bf5=_0x2595c1<0x3?_0x4b9019:_0x4eeff0===null?_0x4eeff0=Object['getOwnPropertyDescriptor'](_0x4b9019,_0x3c34c0):_0x4eeff0,_0x2f3b74;if(typeof Reflect==_0x3519de(0x16a)&&typeof Reflect[_0x3519de(0x13a)]==_0x3519de(0x137))_0x268bf5=Reflect[_0x3519de(0x13a)](_0x23c919,_0x4b9019,_0x3c34c0,_0x4eeff0);else{for(var _0x1c5a9f=_0x23c919[_0x3519de(0x187)]-0x1;_0x1c5a9f>=0x0;_0x1c5a9f--)(_0x2f3b74=_0x23c919[_0x1c5a9f])&&(_0x268bf5=(_0x2595c1<0x3?_0x2f3b74(_0x268bf5):_0x2595c1>0x3?_0x2f3b74(_0x4b9019,_0x3c34c0,_0x268bf5):_0x2f3b74(_0x4b9019,_0x3c34c0))||_0x268bf5);}return _0x2595c1>0x3&&_0x268bf5&&Object[_0x3519de(0x14e)](_0x4b9019,_0x3c34c0,_0x268bf5),_0x268bf5;}let G=class extends _0x591fbb{constructor(_0x5f034e){const _0x5aedbe=_0x3e0f44;super(),this['_resourcesManagerService']=_0x5f034e,V(this,_0x5aedbe(0x108),new Map()),this[_0x5aedbe(0x128)]();}[_0x3e0f44(0x19a)](_0x53dcf1,_0x537c42){const _0x308817=_0x3e0f44;let _0x5515e6=this[_0x308817(0x108)][_0x308817(0x136)](_0x53dcf1);_0x5515e6||(_0x5515e6=new Map(),this['_shapeModelManagerMap'][_0x308817(0x138)](_0x53dcf1,_0x5515e6));let _0x53d531=_0x5515e6['get'](_0x537c42);return _0x53d531||(_0x53d531=new H(),_0x5515e6[_0x308817(0x138)](_0x537c42,_0x53d531)),_0x53d531;}[_0x3e0f44(0x125)](_0x353106,_0x5b6693,_0x5a99ab,_0x381189,_0xb470ba){const _0x260f5f=_0x3e0f44;this[_0x260f5f(0x19a)](_0x353106,_0x5b6693)['addShape'](_0x5a99ab,_0x381189,_0xb470ba);}['removeShape'](_0x14dc7c,_0x1f82e0,_0x4fb64){const _0x341074=_0x3e0f44;this['_ensureShapeModelManager'](_0x14dc7c,_0x1f82e0)[_0x341074(0x12f)](_0x4fb64);}[_0x3e0f44(0x191)](_0x55630c,_0x485e6a,_0x5212a2){const _0x31c3bc=_0x3e0f44;return this[_0x31c3bc(0x19a)](_0x55630c,_0x485e6a)[_0x31c3bc(0x135)](_0x5212a2);}[_0x3e0f44(0x135)](_0x3b3408,_0x514cb5,_0x1a8f9f){const _0x21fa79=_0x3e0f44;return this[_0x21fa79(0x19a)](_0x3b3408,_0x514cb5)['getShapeType'](_0x1a8f9f);}[_0x3e0f44(0x195)](_0x28bcba,_0x2b23fc,_0x4c5055){const _0x3fb658=_0x3e0f44;return this[_0x3fb658(0x19a)](_0x28bcba,_0x2b23fc)['hasShape'](_0x4c5055);}['getShapeTypeById'](_0x1d2031,_0x79beed,_0x5a4241){const _0x3e5545=_0x3e0f44;return this[_0x3e5545(0x19a)](_0x1d2031,_0x79beed)[_0x3e5545(0x135)](_0x5a4241);}[_0x3e0f44(0x177)](_0x326ea3,_0x20e506,_0x93cb50){const _0x5b513a=_0x3e0f44;let _0x192f87=this[_0x5b513a(0x19a)](_0x326ea3,_0x20e506);if(!_0x192f87[_0x5b513a(0x135)](_0x93cb50))return;let _0x1aa791=_0x192f87['_shapes'][_0x5b513a(0x136)](_0x93cb50);if(_0x1aa791)return _0x1aa791[_0x5b513a(0x182)]();}[_0x3e0f44(0x173)](_0x42fdf0,_0x41b3a7,_0x37bd60){const _0xfa1d14=_0x3e0f44;return this['_ensureShapeModelManager'](_0x42fdf0,_0x41b3a7)[_0xfa1d14(0x139)][_0xfa1d14(0x136)](_0x37bd60);}[_0x3e0f44(0x190)](_0x253337,_0x2a75ef,_0x46b07f){const _0x3e24f8=_0x3e0f44;return this[_0x3e24f8(0x19a)](_0x253337,_0x2a75ef)[_0x3e24f8(0x190)](_0x46b07f);}[_0x3e0f44(0x123)](_0x5a4302,_0x5ecaf2,_0x2483fe){const _0x1f0b20=_0x3e0f44;let _0xdef431=this[_0x1f0b20(0x19a)](_0x5a4302,_0x5ecaf2)[_0x1f0b20(0x139)][_0x1f0b20(0x136)](_0x2483fe);if(_0xdef431)return _0xdef431[_0x1f0b20(0x158)]();}['setShapeType'](){}[_0x3e0f44(0x142)](_0x21e0e9){const _0x11fb16=_0x3e0f44;let _0x53e9de={},_0x210ca2=this[_0x11fb16(0x108)]['get'](_0x21e0e9);return _0x210ca2&&_0x210ca2[_0x11fb16(0x124)]((_0x253566,_0x3ce6f8)=>{const _0x41a5ff=_0x11fb16;let _0x14031d=_0x253566[_0x41a5ff(0x157)]();_0x14031d[_0x41a5ff(0x187)]>0x0&&(_0x53e9de[_0x3ce6f8]=_0x14031d);}),JSON[_0x11fb16(0x189)](_0x53e9de);}[_0x3e0f44(0x117)](_0x4fef60,_0x3d203a){const _0x222ee2=_0x3e0f44;Object[_0x222ee2(0x12a)](_0x3d203a)['forEach'](_0x1c6b63=>{const _0x4af60d=_0x222ee2;this[_0x4af60d(0x19a)](_0x4fef60,_0x1c6b63)[_0x4af60d(0x109)](_0x3d203a[_0x1c6b63]);});}[_0x3e0f44(0x157)](){const _0x2d3168=_0x3e0f44;let _0xb8228={};return this[_0x2d3168(0x108)]['forEach']((_0x36d8a5,_0x963a5a)=>{const _0x2e97a7=_0x2d3168;_0xb8228[_0x963a5a]={},_0x36d8a5[_0x2e97a7(0x124)]((_0x37fb5c,_0x371828)=>{_0xb8228[_0x963a5a][_0x371828]=_0x37fb5c['toJSON']();});}),_0xb8228;}[_0x3e0f44(0x109)](_0x59dff8){const _0x367b14=_0x3e0f44;Object[_0x367b14(0x12a)](_0x59dff8)[_0x367b14(0x124)](_0x18b5a8=>{const _0x474909=_0x367b14;let _0x432b30=_0x59dff8[_0x18b5a8];Object[_0x474909(0x12a)](_0x432b30)['forEach'](_0x282daa=>{const _0xe7db17=_0x474909;this['_ensureShapeModelManager'](_0x18b5a8,_0x282daa)[_0xe7db17(0x109)](_0x432b30[_0x282daa]);});});}[_0x3e0f44(0x128)](){const _0x15f876=_0x3e0f44;this[_0x15f876(0x110)][_0x15f876(0x186)]({'pluginName':_0x15f876(0x16f),'businesses':[_0x339832['UNIVER_SHEET']],'toJson':_0x5eff5b=>this[_0x15f876(0x142)](_0x5eff5b),'parseJson':_0x5411a7=>JSON[_0x15f876(0x11f)](_0x5411a7),'onLoad':(_0x2e72f7,_0x570749)=>{this['_deserializeShapeForUnit'](_0x2e72f7,_0x570749);},'onUnLoad':_0x439c3f=>{const _0x4370dd=_0x15f876;let _0x4fac72=this[_0x4370dd(0x108)][_0x4370dd(0x136)](_0x439c3f);_0x4fac72&&(_0x4fac72['forEach'](_0x1b4a40=>{const _0x192e9a=_0x4370dd;_0x1b4a40[_0x192e9a(0x161)]();}),this[_0x4370dd(0x108)][_0x4370dd(0x118)](_0x439c3f));}});}[_0x3e0f44(0x161)](){const _0x40bdfd=_0x3e0f44;this[_0x40bdfd(0x108)][_0x40bdfd(0x124)](_0x505bc1=>{const _0x3eb819=_0x40bdfd;_0x505bc1[_0x3eb819(0x124)](_0x40843b=>{const _0x416708=_0x3eb819;_0x40843b[_0x416708(0x161)]();});});}};G=W([U(0x0,_0x5d82d8)],G);function _0x1923(){const _0x5e4e17=['object','flipX','getBatchUpdateOp','44UYEfDi','_configService','SHEET_SHAPE_PLUGIN','getAdjustValueByName','shapeId','pluginName','getShapeModel','1463560qPSQWj','cos','pushUndoRedo','getShapeDataById','constructor','4511uvvXml','_getConnectPointInfo','962096pmEZUP','_config','params','847416QvycEs','_injector','lineType','_addLineRerouteUpdates','getShapeData','sheet.command.set-shape-rotate','transform','getBatchAddOp','registerPluginResource','length','_commandService','stringify','redos','iterator','COMMAND','onCommandExecute','getCellWithCoordByIndex','default','getBasicShapeRelation','getBasicShapeType','entries','_sheetSkeletonService','_drawingManagerService','hasShape','sheet.command.update-line-shape-resize','removeLinePoints','6187530OxQcgH','drawingType','_ensureShapeModelManager','undos','7146lgiHEv','push','adjustValues','find','getConnectionSiteList','setShapeData','fill','addShape','_shapeModelManagerMap','fromJSON','ang','0.20.1','cxnIndex','7zDPrgK','_sheetInterceptorService','isFrom','_resourcesManagerService','_addLineFollowShapeUpdates','getDrawingByParam','relation','sheet.command.insert-shape','top','setShapeType','_deserializeShapeForUnit','delete','8552SEOnTg','rotateEnabled','sheet.command.set-shape-drawing-data','has','worldRect','lineShapeId','parse','add','range','updateContext','getLineShapeRelation','forEach','insertShape','2748qbrAzZ','sin','_initSnapshot','_disposed','keys','_sheetsShapeService','sheet.command.toggle-shape-flip','sheet.command.update-connector-relation','sheet.mutation.remove-shape','removeShape','version','UPDATE','_initCommands','preUndos','clear','getShapeType','get','function','set','_shapes','decorate','assign','_linesIds','width','INSERT','angle','resizeEnabled','startX','_serializeShapeForUnit','registerCommand','getSkeleton','flipY','string','ensureSkeleton','_groupIds','index','getCellIndexAndOffsetByPosition','preRedos','REMOVE','sheet.command.update-shape-type','defineProperty','@univerjs-pro/sheets-shape','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','getEndConnectInfo','sheet.mutation.insert-shape','position','180372dJzhqP','from','data','toJSON','getShapeRelation','every','10TetCfY','height','packageName','MUTATION','left','onStarting','getDrawingData','dispose','Fail\x20to\x20get\x20shape\x20model,\x20get:\x20','_initCommandInterceptor','DRAWING_SHAPE','call','isLineShape','borderEnabled','1706obFWuz','symbol'];_0x1923=function(){return _0x5e4e17;};return _0x1923();}const K={'id':_0x3e0f44(0x152),'type':_0x38e762[_0x3e0f44(0x15d)],'handler':(_0x29e88d,_0x369c8d)=>{const _0x216901=_0x3e0f44;let {unitId:_0x54e493,subUnitId:_0x2d1e9f,shapeType:_0x566c77,shapeId:_0xf92aed,shapeData:_0x6255f7}=_0x369c8d;return _0x29e88d['get'](G)[_0x216901(0x125)](_0x54e493,_0x2d1e9f,_0x566c77,_0xf92aed,_0x6255f7),!0x0;}},q={'id':_0x3e0f44(0x12e),'type':_0x38e762[_0x3e0f44(0x15d)],'handler':(_0x438151,_0x46691d)=>{const _0x2c1cee=_0x3e0f44;let {unitId:_0x5a7efb,subUnitId:_0x393e1b,shapeId:_0x24ddc5}=_0x46691d;return _0x438151[_0x2c1cee(0x136)](G)['removeShape'](_0x5a7efb,_0x393e1b,_0x24ddc5),!0x0;}},J={'type':_0x38e762[_0x3e0f44(0x18c)],'id':_0x3e0f44(0x114),'handler':(_0x4950ac,_0x2e3b44)=>{const _0x861c2e=_0x3e0f44;var _0xfd14a5,_0x12e412;let _0x211a8f=_0x39c299(_0x4950ac[_0x861c2e(0x136)](_0x5e9d00),_0x2e3b44);if(!_0x211a8f)return!0x1;let _0x2c4680=_0x4950ac['get'](_0x566bb4),{unitId:_0x163d56,subUnitId:_0x52ad73}=_0x211a8f,_0x2eb6a4=_0x2c4680[_0x861c2e(0x147)](_0x163d56,_0x52ad73);if(!_0x2eb6a4)return!0x1;let _0x3755aa=_0x4950ac[_0x861c2e(0x136)](_0x46216b),_0x3d154e=_0x4950ac[_0x861c2e(0x136)](_0x38611f),_0x3c823d=_0x4950ac[_0x861c2e(0x136)](_0x53f707),_0x398408=_0x4950ac['get'](_0x5445d4),{shapeType:_0x1af5ef,shapeData:_0x1c5ad2}=_0x2e3b44,_0x5ec219=_0x2e3b44[_0x861c2e(0x171)]||_0x267412(),_0x302f91={'unitId':_0x163d56,'subUnitId':_0x52ad73,'shapeId':_0x5ec219,'shapeType':_0x1af5ef,'shapeData':_0x1c5ad2},_0x332fc8=_0x2e3b44[_0x861c2e(0x13d)]||0xc8,_0x903aa9=_0x2e3b44[_0x861c2e(0x15b)]||0xc8,_0x4cf534=0x0,_0x280dea=0x0,_0x533109={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0},_0x3a910c={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0};if(_0x2e3b44['position']){let {x:_0x4a3e5a,y:_0x2af992}=_0x2e3b44[_0x861c2e(0x153)];_0x4cf534=_0x4a3e5a,_0x280dea=_0x2af992,_0x533109=_0x2eb6a4[_0x861c2e(0x14a)](_0x4a3e5a,_0x2af992),_0x3a910c=_0x2eb6a4[_0x861c2e(0x14a)](_0x4a3e5a+_0x332fc8,_0x2af992+_0x903aa9);}else{if(_0x2e3b44[_0x861c2e(0x121)]){let {startRow:_0x40b299,startColumn:_0xe94951}=_0x2e3b44[_0x861c2e(0x121)];_0x533109={'row':_0x40b299,'rowOffset':0xa,'column':_0xe94951,'columnOffset':0xa};let _0x385e56=_0x2eb6a4[_0x861c2e(0x18e)](_0x40b299,_0xe94951);_0x4cf534=_0x385e56[_0x861c2e(0x141)]+0xa,_0x280dea=_0x385e56['startY']+0xa,_0x3a910c=_0x2eb6a4[_0x861c2e(0x14a)](_0x4cf534+_0x332fc8,_0x280dea+_0x903aa9);}}let _0x2fe19e={'from':_0x533109,'to':_0x3a910c},_0x55ebb6={'unitId':_0x163d56,'subUnitId':_0x52ad73,'drawingId':_0x5ec219,'drawingType':_0x171314[_0x861c2e(0x164)],'sheetTransform':_0x2fe19e,'transform':{'left':_0x4cf534,'top':_0x280dea,'width':_0x332fc8,'height':_0x903aa9},'data':{'shapeType':_0x1af5ef,'shapeData':_0x1c5ad2},'axisAlignSheetTransform':_0x2fe19e,'allowTransform':!0x0};_0x481196(_0x1af5ef)&&(_0x55ebb6[_0x861c2e(0x156)][_0x861c2e(0x106)]=!0x1,_0x55ebb6[_0x861c2e(0x156)]['rotateEnabled']=!0x1,_0x55ebb6['data'][_0x861c2e(0x140)]=!0x1,_0x55ebb6[_0x861c2e(0x156)][_0x861c2e(0x167)]=!0x1,_0x55ebb6[_0x861c2e(0x184)][_0x861c2e(0x11a)]=!0x1,_0x55ebb6[_0x861c2e(0x184)][_0x861c2e(0x140)]=!0x1,_0x55ebb6['transform'][_0x861c2e(0x167)]=!0x1);let {undo:_0x57695e,redo:_0x551b6c,objects:_0x17d3f2}=_0x398408[_0x861c2e(0x185)]([_0x55ebb6]),_0x510a82=_0x3c823d[_0x861c2e(0x18d)]({'id':_0x5eb9fd['id'],'params':{'unitId':_0x163d56,'drawings':[_0x55ebb6]}}),_0x3ecc9a=[...(_0xfd14a5=_0x510a82[_0x861c2e(0x14b)])==null?[]:_0xfd14a5,{'id':_0x2a1e2d['id'],'params':{'unitId':_0x163d56,'subUnitId':_0x52ad73,'op':_0x551b6c,'objects':_0x17d3f2,'type':_0x1a4a4e[_0x861c2e(0x13e)]}},{'id':_0x16778a['id'],'params':[_0x163d56]},..._0x510a82[_0x861c2e(0x18a)],{'id':K['id'],'params':_0x302f91}],_0x41b141=[{'id':q['id'],'params':{'unitId':_0x163d56,'subUnitId':_0x52ad73,'shapeId':_0x5ec219}},...(_0x12e412=_0x510a82[_0x861c2e(0x133)])==null?[]:_0x12e412,{'id':_0x2a1e2d['id'],'params':{'unitId':_0x163d56,'subUnitId':_0x52ad73,'op':_0x57695e,'objects':_0x17d3f2,'type':_0x1a4a4e[_0x861c2e(0x14c)]}},{'id':_0x16778a['id'],'params':[_0x163d56]},..._0x510a82[_0x861c2e(0x19b)]];return _0x457a87(_0x3ecc9a,_0x3755aa)?(_0x3d154e[_0x861c2e(0x176)]({'unitID':_0x163d56,'undoMutations':_0x41b141,'redoMutations':_0x3ecc9a}),!0x0):!0x1;}},Y={'id':'sheet.mutation.update-shape-data','type':_0x38e762[_0x3e0f44(0x15d)],'handler':(_0x51bdaf,_0x44c39c)=>{const _0x55a60b=_0x3e0f44;let {unitId:_0x140d33,subUnitId:_0x206cff,shapeType:_0x16343a,shapeId:_0x59fe38,shapeData:_0x354ab0}=_0x44c39c,_0x1a223c=_0x51bdaf[_0x55a60b(0x136)](G)[_0x55a60b(0x173)](_0x140d33,_0x206cff,_0x59fe38);return _0x1a223c&&(_0x16343a!==void 0x0&&_0x1a223c[_0x55a60b(0x116)](_0x16343a),_0x354ab0&&(_0x1a223c==null||_0x1a223c[_0x55a60b(0x105)](_0x354ab0,!0x0))),!0x0;}},ee={'type':_0x38e762[_0x3e0f44(0x18c)],'id':_0x3e0f44(0x11b),'handler':(_0x2963f8,_0x39004d)=>{const _0xd254af=_0x3e0f44;var _0x9bbf8c,_0x51bf20;let _0x57b690=_0x39c299(_0x2963f8[_0xd254af(0x136)](_0x5e9d00),_0x39004d);if(!_0x57b690)return!0x1;let _0x1db97b=_0x2963f8[_0xd254af(0x136)](_0x566bb4),{unitId:_0x4face0,subUnitId:_0x82ed7f}=_0x57b690,_0x439f60=_0x1db97b[_0xd254af(0x147)](_0x4face0,_0x82ed7f);if(!_0x439f60)return!0x1;let _0x268019=_0x2963f8['get'](G),{shapeId:_0x4801ea,shapeType:_0x161718,shapeData:_0x2ab68a,position:_0x4d68d8,width:_0x397561,height:_0x361f4a}=_0x39004d,_0x44b740=_0x268019['getShapeModel'](_0x4face0,_0x82ed7f,_0x4801ea);if(!_0x44b740)return!0x1;let _0x5e2692=_0x2963f8[_0xd254af(0x136)](_0x46216b),_0x190405=_0x2963f8[_0xd254af(0x136)](_0x38611f),_0x3aa1a7=_0x2963f8['get'](_0x53f707),_0x28fdf5=_0x2963f8['get'](_0x5445d4),_0x57b4fe={'unitId':_0x4face0,'subUnitId':_0x82ed7f,'shapeId':_0x4801ea,'shapeType':_0x161718,'shapeData':_0x2ab68a},_0x57d620=_0x44b740[_0xd254af(0x135)](),_0x1acf98=_0x44b740['getShapeData'](),{x:_0x58cb3b,y:_0x2d6f80}=_0x4d68d8,_0x4a16b7={'from':_0x439f60[_0xd254af(0x14a)](_0x58cb3b,_0x2d6f80),'to':_0x439f60[_0xd254af(0x14a)](_0x58cb3b+_0x397561,_0x2d6f80+_0x361f4a)},_0x4d4e3f={'unitId':_0x4face0,'subUnitId':_0x82ed7f,'drawingId':_0x4801ea,'drawingType':_0x171314['DRAWING_SHAPE'],'sheetTransform':_0x4a16b7,'transform':{'left':_0x58cb3b,'top':_0x2d6f80,'width':_0x397561,'height':_0x361f4a},'data':{'shapeType':_0x161718,'shapeData':_0x2ab68a},'axisAlignSheetTransform':_0x4a16b7,'allowTransform':!0x0};_0x481196(_0x161718)&&(_0x4d4e3f['data'][_0xd254af(0x106)]=!0x1,_0x4d4e3f['data'][_0xd254af(0x11a)]=!0x1,_0x4d4e3f[_0xd254af(0x156)]['resizeEnabled']=!0x1,_0x4d4e3f['data'][_0xd254af(0x167)]=!0x1,_0x4d4e3f[_0xd254af(0x184)][_0xd254af(0x11a)]=!0x1,_0x4d4e3f[_0xd254af(0x184)][_0xd254af(0x140)]=!0x1,_0x4d4e3f['transform'][_0xd254af(0x167)]=!0x1);let {undo:_0x4f6fe4,redo:_0x5d4349,objects:_0x5dd7f4}=_0x28fdf5[_0xd254af(0x16c)]([_0x4d4e3f]),_0x2ff82f=_0x3aa1a7['onCommandExecute']({'id':_0x53b7a4['id'],'params':{'unitId':_0x4face0,'drawings':[_0x4d4e3f]}}),_0x629284=[...(_0x9bbf8c=_0x2ff82f['preRedos'])==null?[]:_0x9bbf8c,{'id':_0x2a1e2d['id'],'params':{'unitId':_0x4face0,'subUnitId':_0x82ed7f,'op':_0x5d4349,'objects':_0x5dd7f4,'type':_0x1a4a4e['UPDATE']}},{'id':_0x16778a['id'],'params':[_0x4face0]},..._0x2ff82f['redos'],{'id':Y['id'],'params':_0x57b4fe}],_0x419290=[...(_0x51bf20=_0x2ff82f[_0xd254af(0x133)])==null?[]:_0x51bf20,{'id':_0x2a1e2d['id'],'params':{'unitId':_0x4face0,'subUnitId':_0x82ed7f,'op':_0x4f6fe4,'objects':_0x5dd7f4,'type':_0x1a4a4e[_0xd254af(0x131)]}},{'id':_0x16778a['id'],'params':[_0x4face0]},..._0x2ff82f[_0xd254af(0x19b)],{'id':Y['id'],'params':{'unitId':_0x4face0,'subUnitId':_0x82ed7f,'shapeType':_0x57d620,'shapeId':_0x4801ea,'shapeData':_0x1acf98}}];return _0x457a87(_0x629284,_0x5e2692)?(_0x190405[_0xd254af(0x176)]({'unitID':_0x4face0,'undoMutations':_0x419290,'redoMutations':_0x629284}),!0x0):!0x1;}},te={'type':_0x38e762[_0x3e0f44(0x18c)],'id':_0x3e0f44(0x12c),'handler':(_0x4bfa61,_0x1c6973)=>{const _0x9d4473=_0x3e0f44;var _0x2deec3,_0x50adc9;let _0x401a20=_0x39c299(_0x4bfa61[_0x9d4473(0x136)](_0x5e9d00),_0x1c6973);if(!_0x401a20)return!0x1;let _0x486036=_0x4bfa61[_0x9d4473(0x136)](_0x566bb4),{unitId:_0x4102eb,subUnitId:_0x4bd7a0}=_0x401a20,_0xc41aa6=_0x486036[_0x9d4473(0x144)](_0x4102eb,_0x4bd7a0);if(!_0xc41aa6)return!0x1;let _0x4488ec=_0x4bfa61[_0x9d4473(0x136)](_0x5445d4),{shapeId:_0x25a031,flipH:_0x290e18,flipV:_0x324325}=_0x1c6973,_0x19a2b8=_0x4488ec[_0x9d4473(0x112)]({'unitId':_0x4102eb,'subUnitId':_0x4bd7a0,'drawingId':_0x25a031});if(!_0x19a2b8)return!0x1;let _0x472b9c=_0x4bfa61[_0x9d4473(0x136)](G)[_0x9d4473(0x173)](_0x4102eb,_0x4bd7a0,_0x25a031);if(!_0x472b9c)return!0x1;let _0xdb9308=_0x4bfa61[_0x9d4473(0x136)](_0x46216b),_0xc2275=_0x4bfa61[_0x9d4473(0x136)](_0x38611f),_0xd14325=_0x4bfa61[_0x9d4473(0x136)](_0x53f707),_0x18f471={..._0x19a2b8['transform']};_0x290e18!==void 0x0&&(_0x18f471[_0x9d4473(0x16b)]=!_0x18f471[_0x9d4473(0x16b)]),_0x324325!==void 0x0&&(_0x18f471['flipY']=!_0x18f471[_0x9d4473(0x145)]);let _0x17173e=_0x41bba7(_0x18f471,_0xc41aa6),_0x23c00d=_0x59be66(_0x18f471,_0xc41aa6),_0x1b36ef=_0x472b9c[_0x9d4473(0x135)](),_0x510a51=_0x472b9c['getShapeData'](),_0x55ed23={'unitId':_0x4102eb,'subUnitId':_0x4bd7a0,'drawingId':_0x25a031,'drawingType':_0x171314[_0x9d4473(0x164)],'sheetTransform':_0x17173e,'transform':_0x18f471,'data':{'shapeType':_0x1b36ef,'shapeData':_0x510a51},'axisAlignSheetTransform':_0x23c00d,'allowTransform':!0x0},{undo:_0x5d7571,redo:_0x53ff53,objects:_0x29b5dc}=_0x4488ec[_0x9d4473(0x16c)]([_0x55ed23]),_0x5ac50c=_0xd14325[_0x9d4473(0x18d)]({'id':_0x53b7a4['id'],'params':{'unitId':_0x4102eb,'drawings':[_0x55ed23]}}),_0x48e94f=[...(_0x2deec3=_0x5ac50c[_0x9d4473(0x14b)])==null?[]:_0x2deec3,{'id':_0x2a1e2d['id'],'params':{'unitId':_0x4102eb,'subUnitId':_0x4bd7a0,'op':_0x53ff53,'objects':_0x29b5dc,'type':_0x1a4a4e[_0x9d4473(0x131)]}},{'id':_0x16778a['id'],'params':[_0x4102eb]},..._0x5ac50c['redos']],_0x74f07b=[...(_0x50adc9=_0x5ac50c[_0x9d4473(0x133)])==null?[]:_0x50adc9,{'id':_0x2a1e2d['id'],'params':{'unitId':_0x4102eb,'subUnitId':_0x4bd7a0,'op':_0x5d7571,'objects':_0x29b5dc,'type':_0x1a4a4e[_0x9d4473(0x131)]}},{'id':_0x16778a['id'],'params':[_0x4102eb]},..._0x5ac50c['undos']];if(_0x481196(_0x1b36ef)){let _0x394cff=_0x472b9c['getShapeRelation']();if(_0x394cff){let _0x277459={..._0x394cff};_0x277459['from']=void 0x0,_0x277459['to']=void 0x0,_0x48e94f['push']({'id':Y['id'],'params':{'unitId':_0x4102eb,'subUnitId':_0x4bd7a0,'shapeId':_0x25a031,'shapeType':_0x1b36ef,'shapeData':{'relation':_0x277459}}}),_0x74f07b['push']({'id':Y['id'],'params':{'unitId':_0x4102eb,'subUnitId':_0x4bd7a0,'shapeId':_0x25a031,'shapeType':_0x1b36ef,'shapeData':{'relation':_0x394cff}}});}}return _0x457a87(_0x48e94f,_0xdb9308)?(_0xc2275[_0x9d4473(0x176)]({'unitID':_0x4102eb,'undoMutations':_0x74f07b,'redoMutations':_0x48e94f}),!0x0):!0x1;}},X={'type':_0x38e762['COMMAND'],'id':_0x3e0f44(0x183),'handler':(_0x4eb349,_0x22ca5b)=>{const _0x39d0a8=_0x3e0f44;var _0x87e8d5,_0x488cbf;let _0x506bfc=_0x39c299(_0x4eb349[_0x39d0a8(0x136)](_0x5e9d00),_0x22ca5b);if(!_0x506bfc)return!0x1;let _0x300ec2=_0x4eb349[_0x39d0a8(0x136)](_0x566bb4),{unitId:_0x424d1f,subUnitId:_0x3446c1}=_0x506bfc,_0x3f68d6=_0x300ec2['getSkeleton'](_0x424d1f,_0x3446c1);if(!_0x3f68d6)return!0x1;let _0x49b7da=_0x4eb349[_0x39d0a8(0x136)](_0x5445d4),{shapeId:_0x169877,rotate:_0x442146}=_0x22ca5b,_0x162bc4=_0x49b7da[_0x39d0a8(0x112)]({'unitId':_0x424d1f,'subUnitId':_0x3446c1,'drawingId':_0x169877});if(!_0x162bc4)return!0x1;let _0x3e57c1=_0x4eb349[_0x39d0a8(0x136)](G)[_0x39d0a8(0x173)](_0x424d1f,_0x3446c1,_0x169877);if(!_0x3e57c1)return!0x1;let _0xc23b5c=_0x4eb349[_0x39d0a8(0x136)](_0x46216b),_0x5b4502=_0x4eb349[_0x39d0a8(0x136)](_0x38611f),_0xf99bfb=_0x4eb349['get'](_0x53f707),_0x887bd={..._0x162bc4[_0x39d0a8(0x184)]};_0x442146!==void 0x0&&(_0x887bd['angle']=(_0x887bd[_0x39d0a8(0x13f)]||0x0)+_0x442146);let _0x4214bd=_0x41bba7(_0x887bd,_0x3f68d6),_0x1b0715=_0x59be66(_0x887bd,_0x3f68d6),_0x1fbec9=_0x3e57c1[_0x39d0a8(0x135)](),_0x14d021=_0x3e57c1[_0x39d0a8(0x182)](),_0x11e13c={'unitId':_0x424d1f,'subUnitId':_0x3446c1,'drawingId':_0x169877,'drawingType':_0x171314[_0x39d0a8(0x164)],'sheetTransform':_0x4214bd,'transform':_0x887bd,'data':{'shapeType':_0x1fbec9,'shapeData':_0x14d021},'axisAlignSheetTransform':_0x1b0715,'allowTransform':!0x0},{undo:_0x5406c7,redo:_0x7ab81d,objects:_0x38def6}=_0x49b7da[_0x39d0a8(0x16c)]([_0x11e13c]),_0x213b09=_0xf99bfb['onCommandExecute']({'id':_0x53b7a4['id'],'params':{'unitId':_0x424d1f,'drawings':[_0x11e13c]}}),_0x311335=[...(_0x87e8d5=_0x213b09[_0x39d0a8(0x14b)])==null?[]:_0x87e8d5,{'id':_0x2a1e2d['id'],'params':{'unitId':_0x424d1f,'subUnitId':_0x3446c1,'op':_0x7ab81d,'objects':_0x38def6,'type':_0x1a4a4e['UPDATE']}},{'id':_0x16778a['id'],'params':[_0x424d1f]},..._0x213b09[_0x39d0a8(0x18a)]],_0x31ff4d=[...(_0x488cbf=_0x213b09[_0x39d0a8(0x133)])==null?[]:_0x488cbf,{'id':_0x2a1e2d['id'],'params':{'unitId':_0x424d1f,'subUnitId':_0x3446c1,'op':_0x5406c7,'objects':_0x38def6,'type':_0x1a4a4e[_0x39d0a8(0x131)]}},{'id':_0x16778a['id'],'params':[_0x424d1f]},..._0x213b09[_0x39d0a8(0x19b)]];return _0x457a87(_0x311335,_0xc23b5c)?(_0x5b4502['pushUndoRedo']({'unitID':_0x424d1f,'undoMutations':_0x31ff4d,'redoMutations':_0x311335}),!0x0):!0x1;}},Z={'type':_0x38e762[_0x3e0f44(0x18c)],'id':_0x3e0f44(0x12d),'handler':(_0x182385,_0x2305e8)=>{const _0xf42f4e=_0x3e0f44;var _0x382f0d,_0x5a9917,_0x5e80dc,_0x550261;let _0x57d878=_0x39c299(_0x182385['get'](_0x5e9d00),_0x2305e8);if(!_0x57d878)return!0x1;let _0x511812=_0x182385['get'](_0x566bb4),{unitId:_0x283cc9,subUnitId:_0x2ad311}=_0x57d878,_0xd6c9ab=_0x511812[_0xf42f4e(0x144)](_0x283cc9,_0x2ad311);if(!_0xd6c9ab)return!0x1;let _0x34253d=_0x182385['get'](_0x5445d4),{connectorShapeId:_0x503393,width:_0x2f45cf,height:_0x279dfe,left:_0x4bb5e2,top:_0x2b0b07,flipX:_0x20bb1d,flipY:_0x4a5d43,rotation:_0x57e437,oldAdjustValues:_0x4b4487,newAdjustValues:_0x5b9ae3,oldLineType:_0x113fb2,newLineType:_0x388e9d,oldRelation:_0x1f41f6,newRelation:_0x5f1689}=_0x2305e8,_0x39d7de=_0x34253d[_0xf42f4e(0x112)]({'unitId':_0x283cc9,'subUnitId':_0x2ad311,'drawingId':_0x503393});if(!_0x39d7de)return!0x1;let _0x2c904e=_0x182385['get'](G)[_0xf42f4e(0x173)](_0x283cc9,_0x2ad311,_0x503393);if(!_0x2c904e)return!0x1;let _0x9c7e62=_0x182385[_0xf42f4e(0x136)](_0x46216b),_0x44c52d=_0x182385[_0xf42f4e(0x136)](_0x38611f),_0x101300=_0x182385[_0xf42f4e(0x136)](_0x53f707),_0x437a3d={..._0x39d7de['transform'],'width':_0x2f45cf,'height':_0x279dfe,'left':_0x4bb5e2,'top':_0x2b0b07,'flipX':_0x20bb1d,'flipY':_0x4a5d43,'angle':(_0x382f0d=_0x57e437==null?(_0x5a9917=_0x39d7de[_0xf42f4e(0x184)])==null?void 0x0:_0x5a9917['angle']:_0x57e437)==null?0x0:_0x382f0d},_0x3ee9c5=_0x41bba7(_0x437a3d,_0xd6c9ab),_0x10bfa3=_0x59be66(_0x437a3d,_0xd6c9ab),_0x2961ef=_0x2c904e[_0xf42f4e(0x135)](),_0x1c4fcf=_0x2c904e[_0xf42f4e(0x182)](),_0x1abf12={'unitId':_0x283cc9,'subUnitId':_0x2ad311,'drawingId':_0x503393,'drawingType':_0x171314['DRAWING_SHAPE'],'sheetTransform':_0x3ee9c5,'transform':_0x437a3d,'data':{'shapeType':_0x388e9d||_0x113fb2||_0x2961ef,'shapeData':{..._0x1c4fcf,'adjustValues':_0x5b9ae3||_0x4b4487||(_0x1c4fcf==null?void 0x0:_0x1c4fcf[_0xf42f4e(0x19e)]),'relation':_0x5f1689||_0x1f41f6||(_0x1c4fcf==null?void 0x0:_0x1c4fcf[_0xf42f4e(0x113)])}},'axisAlignSheetTransform':_0x10bfa3,'allowTransform':!0x0},{undo:_0xa2c09c,redo:_0x25f958,objects:_0xfb6879}=_0x34253d[_0xf42f4e(0x16c)]([_0x1abf12]),_0x43ec7e=_0x101300[_0xf42f4e(0x18d)]({'id':_0x53b7a4['id'],'params':{'unitId':_0x283cc9,'drawings':[_0x1abf12]}}),_0x204491=[...(_0x5e80dc=_0x43ec7e['preRedos'])==null?[]:_0x5e80dc,{'id':_0x2a1e2d['id'],'params':{'unitId':_0x283cc9,'subUnitId':_0x2ad311,'op':_0x25f958,'objects':_0xfb6879,'type':_0x1a4a4e['UPDATE']}},{'id':_0x16778a['id'],'params':[_0x283cc9]},..._0x43ec7e[_0xf42f4e(0x18a)],{'id':Y['id'],'params':{'unitId':_0x283cc9,'subUnitId':_0x2ad311,'shapeId':_0x503393,'shapeType':_0x388e9d,'shapeData':{'adjustValues':_0x5b9ae3,'relation':_0x5f1689}}}],_0xdd5773=[...(_0x550261=_0x43ec7e[_0xf42f4e(0x133)])==null?[]:_0x550261,{'id':_0x2a1e2d['id'],'params':{'unitId':_0x283cc9,'subUnitId':_0x2ad311,'op':_0xa2c09c,'objects':_0xfb6879,'type':_0x1a4a4e[_0xf42f4e(0x131)]}},{'id':_0x16778a['id'],'params':[_0x283cc9]},..._0x43ec7e[_0xf42f4e(0x19b)],{'id':Y['id'],'params':{'unitId':_0x283cc9,'subUnitId':_0x2ad311,'shapeId':_0x503393,'shapeType':_0x2961ef,'shapeData':{..._0x1c4fcf,'adjustValues':_0x4b4487||(_0x1c4fcf==null?void 0x0:_0x1c4fcf[_0xf42f4e(0x19e)]),'relation':_0x1f41f6||(_0x1c4fcf==null?void 0x0:_0x1c4fcf[_0xf42f4e(0x113)])}}}];return _0x457a87(_0x204491,_0x9c7e62)?(_0x44c52d[_0xf42f4e(0x176)]({'unitID':_0x283cc9,'undoMutations':_0xdd5773,'redoMutations':_0x204491}),!0x0):!0x1;}},ne={'type':_0x38e762[_0x3e0f44(0x18c)],'id':_0x3e0f44(0x196),'handler':(_0x370e54,_0x37aab6)=>{const _0x3fa37a=_0x3e0f44;var _0x37d403,_0x488d64;let _0x170b39=_0x39c299(_0x370e54['get'](_0x5e9d00),_0x37aab6);if(!_0x170b39)return!0x1;let _0x279f04=_0x370e54[_0x3fa37a(0x136)](_0x566bb4),{unitId:_0x2a9819,subUnitId:_0x40a3e6}=_0x170b39,_0x46c158=_0x279f04[_0x3fa37a(0x144)](_0x2a9819,_0x40a3e6);if(!_0x46c158)return!0x1;let _0x145200=_0x370e54['get'](_0x5445d4),{shapeId:_0x1c7098,width:_0x5dc7f3,height:_0xcdf4b8,left:_0xa55081,top:_0x23194b,flipX:_0x1fbb6e,flipY:_0x45bbaf,angle:_0x2242f9,oldAdjustValues:_0x2ce6f6,newAdjustValues:_0x5898a4,oldLineType:_0x2016d0,newLineType:_0xa8fec5}=_0x37aab6,_0x4b3a7a=_0x145200[_0x3fa37a(0x112)]({'unitId':_0x2a9819,'subUnitId':_0x40a3e6,'drawingId':_0x1c7098});if(!_0x4b3a7a)return!0x1;let _0x2d8842=_0x370e54[_0x3fa37a(0x136)](G)['getShapeModel'](_0x2a9819,_0x40a3e6,_0x1c7098);if(!_0x2d8842)return!0x1;let _0x1355e7=_0x370e54['get'](_0x46216b),_0x5c1268=_0x370e54[_0x3fa37a(0x136)](_0x38611f),_0xe32d72=_0x370e54['get'](_0x53f707),_0x27ddad={..._0x4b3a7a['transform'],'width':_0x5dc7f3,'height':_0xcdf4b8,'left':_0xa55081,'top':_0x23194b,'flipX':_0x1fbb6e,'flipY':_0x45bbaf,'angle':_0x2242f9},_0x4927f0=_0x41bba7(_0x27ddad,_0x46c158),_0x279adc=_0x59be66(_0x27ddad,_0x46c158),_0x440d9f=_0x2d8842[_0x3fa37a(0x135)](),_0x4d446c=_0x2d8842[_0x3fa37a(0x182)](),_0xc8c347={'unitId':_0x2a9819,'subUnitId':_0x40a3e6,'drawingId':_0x1c7098,'drawingType':_0x171314['DRAWING_SHAPE'],'sheetTransform':_0x4927f0,'transform':_0x27ddad,'data':{'shapeType':_0xa8fec5||_0x2016d0||_0x440d9f,'shapeData':{..._0x4d446c,'adjustValues':_0x5898a4||_0x2ce6f6||(_0x4d446c==null?void 0x0:_0x4d446c[_0x3fa37a(0x19e)])}},'axisAlignSheetTransform':_0x279adc,'allowTransform':!0x0},{undo:_0x12a319,redo:_0x4b6b70,objects:_0x431ba6}=_0x145200[_0x3fa37a(0x16c)]([_0xc8c347]),_0x5e1ca8=_0xe32d72[_0x3fa37a(0x18d)]({'id':_0x53b7a4['id'],'params':{'unitId':_0x2a9819,'drawings':[_0xc8c347]}}),_0x48d395=[...(_0x37d403=_0x5e1ca8[_0x3fa37a(0x14b)])==null?[]:_0x37d403,{'id':_0x2a1e2d['id'],'params':{'unitId':_0x2a9819,'subUnitId':_0x40a3e6,'op':_0x4b6b70,'objects':_0x431ba6,'type':_0x1a4a4e[_0x3fa37a(0x131)]}},{'id':_0x16778a['id'],'params':[_0x2a9819]},..._0x5e1ca8[_0x3fa37a(0x18a)],{'id':Y['id'],'params':{'unitId':_0x2a9819,'subUnitId':_0x40a3e6,'shapeId':_0x1c7098,'shapeType':_0xa8fec5,'shapeData':{'adjustValues':_0x5898a4}}}],_0x4e9b97=[...(_0x488d64=_0x5e1ca8[_0x3fa37a(0x133)])==null?[]:_0x488d64,{'id':_0x2a1e2d['id'],'params':{'unitId':_0x2a9819,'subUnitId':_0x40a3e6,'op':_0x12a319,'objects':_0x431ba6,'type':_0x1a4a4e[_0x3fa37a(0x131)]}},{'id':_0x16778a['id'],'params':[_0x2a9819]},..._0x5e1ca8['undos'],{'id':Y['id'],'params':{'unitId':_0x2a9819,'subUnitId':_0x40a3e6,'shapeId':_0x1c7098,'shapeType':_0x440d9f,'shapeData':{..._0x4d446c,'adjustValues':_0x2ce6f6||(_0x4d446c==null?void 0x0:_0x4d446c['adjustValues'])}}}];return _0x457a87(_0x48d395,_0x1355e7)?(_0x5c1268[_0x3fa37a(0x176)]({'unitID':_0x2a9819,'undoMutations':_0x4e9b97,'redoMutations':_0x48d395}),!0x0):!0x1;}},Q={'id':'sheet.mutation.update-shape-type','type':_0x38e762['MUTATION'],'handler':(_0x247e25,_0x3220c5)=>{const _0xa80f04=_0x3e0f44;let {unitId:_0x5ae3c3,subUnitId:_0x25b073,shapeType:_0x494884,shapeId:_0x32bf18,shapeData:_0x390782}=_0x3220c5,_0xdf714b=_0x247e25['get'](G)[_0xa80f04(0x173)](_0x5ae3c3,_0x25b073,_0x32bf18);return _0xdf714b&&(_0xdf714b['setShapeType'](_0x494884),_0x390782&&(_0xdf714b==null||_0xdf714b['setShapeData'](_0x390782))),!0x0;}},re={'id':_0x3e0f44(0x14d),'type':_0x38e762['COMMAND'],'handler':(_0x895888,_0x465012)=>{const _0x3fd2de=_0x3e0f44;if(!_0x465012)return!0x1;let _0x19cc9e=_0x895888[_0x3fd2de(0x136)](_0x46216b),_0x4f9ecc=_0x895888[_0x3fd2de(0x136)](G),_0x2852ad=_0x895888[_0x3fd2de(0x136)](_0x38611f),_0x5535c7=[],_0xd60e7d=[],{unitId:_0x4300be,subUnitId:_0x45cde1,shapeId:_0x58cd18,shapeType:_0x32baec,shapeData:_0x10c30c}=_0x465012,_0x294768=_0x4f9ecc[_0x3fd2de(0x173)](_0x4300be,_0x45cde1,_0x58cd18);if(_0x294768){let _0x3cc9cb=_0x294768['getShapeType'](),_0x55b9a9=Object[_0x3fd2de(0x13b)]({},_0x294768[_0x3fd2de(0x182)]()),_0x2d6c05={'unitId':_0x4300be,'subUnitId':_0x45cde1,'shapeId':_0x58cd18,'shapeType':_0x32baec,'shapeData':_0x10c30c},_0x39a825={'unitId':_0x4300be,'subUnitId':_0x45cde1,'shapeId':_0x58cd18,'shapeType':_0x3cc9cb,'shapeData':_0x55b9a9};return _0x5535c7[_0x3fd2de(0x19d)]({'id':Q['id'],'params':_0x2d6c05}),_0xd60e7d[_0x3fd2de(0x19d)]({'id':Q['id'],'params':_0x39a825}),_0x5535c7[_0x3fd2de(0x159)](_0x32d3e1=>_0x19cc9e['syncExecuteCommand'](_0x32d3e1['id'],_0x32d3e1[_0x3fd2de(0x17d)]))&&_0x2852ad['pushUndoRedo']({'unitID':_0x4300be,'redoMutations':[..._0x5535c7],'undoMutations':[..._0xd60e7d]}),!0x0;}return!0x1;}};var ie=_0x3e0f44(0x14f),ae=_0x3e0f44(0x10b);const oe='sheets-shape.config';Symbol(oe);const se={};let ce=class extends _0x591fbb{constructor(_0x114d46,_0x1c2ad2,_0x24da62,_0x239d3e,_0x3c64fb){const _0x26a582=_0x3e0f44;super(),this['_commandService']=_0x114d46,this['_sheetInterceptorService']=_0x1c2ad2,this[_0x26a582(0x193)]=_0x24da62,this[_0x26a582(0x12b)]=_0x239d3e,this[_0x26a582(0x194)]=_0x3c64fb,this[_0x26a582(0x132)](),this[_0x26a582(0x163)]();}['_initCommands'](){const _0x204f47=_0x3e0f44;[J,ee,te,X,Z,ne,K,q,Q,Y][_0x204f47(0x124)](_0xef95ba=>this['disposeWithMe'](this[_0x204f47(0x188)][_0x204f47(0x143)](_0xef95ba)));}['_initCommandInterceptor'](){const _0x38c23a=_0x3e0f44;this['disposeWithMe'](this[_0x38c23a(0x10e)]['interceptCommand']({'getMutations':_0x4a7236=>{const _0x49791e=_0x38c23a;if(_0x4a7236['id']===_0x270a78['id']){let {drawings:_0x56945b}=_0x4a7236[_0x49791e(0x17d)],_0x4cf783=_0x56945b['filter'](_0x44272a=>_0x44272a['drawingType']===_0x171314[_0x49791e(0x164)]);if(_0x4cf783['length']===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};let _0x310cae=[],_0x1501e0=[];return _0x4cf783[_0x49791e(0x124)](_0x4d3619=>{const _0x1d484c=_0x49791e;let {unitId:_0x18585e,subUnitId:_0x220104,drawingId:_0x4fd872}=_0x4d3619,_0x5b1f18=this[_0x1d484c(0x12b)][_0x1d484c(0x173)](_0x18585e,_0x220104,_0x4fd872);if(!_0x5b1f18)throw TypeError(_0x1d484c(0x162)+_0x5b1f18);_0x310cae['push']({'id':q['id'],'params':{'unitId':_0x18585e,'subUnitId':_0x220104,'shapeId':_0x4fd872}}),_0x1501e0[_0x1d484c(0x19d)]({'id':K['id'],'params':{'unitId':_0x18585e,'subUnitId':_0x220104,'shapeId':_0x4fd872,'shapeType':_0x5b1f18['getShapeType'](),'shapeData':_0x5b1f18[_0x1d484c(0x182)]()}});let _0x5d94e1=this[_0x1d484c(0x12b)]['getBasicShapeRelation'](_0x18585e,_0x220104,_0x4fd872);if(_0x5d94e1)for(let _0x2f32f2 of _0x5d94e1){let _0x4182a2=_0x2f32f2[_0x1d484c(0x11e)],_0x429861=_0x2f32f2[_0x1d484c(0x10f)],_0x57ba10=_0x429861?{'from':void 0x0}:{'to':void 0x0},_0x5a15c8=_0x429861?{'from':{'shapeId':_0x2f32f2[_0x1d484c(0x171)],'cxnIndex':_0x2f32f2[_0x1d484c(0x10c)]}}:{'to':{'shapeId':_0x2f32f2[_0x1d484c(0x171)],'cxnIndex':_0x2f32f2['cxnIndex']}};_0x310cae['push']({'id':Y['id'],'params':{'unitId':_0x18585e,'subUnitId':_0x220104,'shapeId':_0x4182a2,'shapeData':{'relation':_0x57ba10}}}),_0x1501e0['push']({'id':Y['id'],'params':{'unitId':_0x18585e,'subUnitId':_0x220104,'shapeId':_0x4182a2,'shapeData':{'relation':_0x5a15c8}}});}}),{'preRedos':_0x310cae,'redos':[],'preUndos':[],'undos':_0x1501e0};}if(_0x4a7236['id']===_0x53b7a4['id']){let {drawings:_0x31f7db}=_0x4a7236['params'],_0x42a4f2=_0x31f7db['filter'](_0x2c4445=>_0x2c4445[_0x49791e(0x199)]===_0x171314['DRAWING_SHAPE']);if(_0x42a4f2[_0x49791e(0x187)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};let _0xe0f59c=[],_0x393f76=[];for(let _0x509aa1 of _0x42a4f2){let {unitId:_0x5e6c1c,subUnitId:_0x2d66d9,drawingId:_0xe0e3ad,transform:_0x5a3927}=_0x509aa1;if(!_0x5e6c1c||!_0x2d66d9||!_0xe0e3ad||!_0x5a3927)continue;let _0xf20a38=this['_sheetsShapeService'][_0x49791e(0x173)](_0x5e6c1c,_0x2d66d9,_0xe0e3ad);if(!_0xf20a38)throw TypeError(_0x49791e(0x162)+_0xf20a38);if(_0x481196(_0xf20a38['getShapeType']())){let _0x5b16fb=this['_sheetsShapeService'][_0x49791e(0x123)](_0x5e6c1c,_0x2d66d9,_0xe0e3ad);_0x5b16fb&&(_0xe0f59c[_0x49791e(0x19d)]({'id':Y['id'],'params':{'unitId':_0x5e6c1c,'subUnitId':_0x2d66d9,'shapeId':_0xe0e3ad,'shapeData':{'relation':{'from':void 0x0,'to':void 0x0}}}}),_0x393f76['push']({'id':Y['id'],'params':{'unitId':_0x5e6c1c,'subUnitId':_0x2d66d9,'shapeId':_0xe0e3ad,'shapeData':{'relation':_0x5b16fb}}}));}else{let _0x538071=this[_0x49791e(0x12b)][_0x49791e(0x190)](_0x5e6c1c,_0x2d66d9,_0xe0e3ad);if(_0x538071&&_0x538071['length']>0x0)for(let _0x3ccb50 of _0x538071){let _0x1ec173=_0x3ccb50[_0x49791e(0x11e)],_0x272dfd=_0x3ccb50['isFrom'],_0x3b4d7b=this['_sheetsShapeService'][_0x49791e(0x173)](_0x5e6c1c,_0x2d66d9,_0x1ec173);if(!_0x3b4d7b)continue;let _0x5033d4=_0x3b4d7b['getStartConnectInfo'](),_0x573cae=_0x3b4d7b['getEndConnectInfo']();_0x5033d4&&_0x573cae?this[_0x49791e(0x181)](_0x5e6c1c,_0x2d66d9,_0x1ec173,_0x3b4d7b,_0x5033d4,_0x573cae,_0xe0f59c,_0x393f76,_0xe0e3ad,_0x5a3927):this[_0x49791e(0x111)](_0x5e6c1c,_0x2d66d9,_0x1ec173,_0x3b4d7b,_0x272dfd?_0x5033d4:_0x573cae,_0x272dfd,_0xe0f59c,_0x393f76,_0xe0e3ad,_0x5a3927);}}}return{'preRedos':[],'redos':_0xe0f59c,'preUndos':_0x393f76,'undos':[]};}return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};}}));}[_0x3e0f44(0x17a)](_0x18c888,_0x31cd7d,_0xa82a3e,_0x4c8c74,_0x423ba5){const _0x1b1d42=_0x3e0f44;if(!_0x31cd7d||!_0xa82a3e)return null;let {shapeId:_0x411db4,cxnIndex:_0x5249aa}=_0x18c888,_0x17a0f6=this['_sheetsShapeService'][_0x1b1d42(0x173)](_0x31cd7d,_0xa82a3e,_0x411db4);if(!_0x17a0f6)return null;let _0x3811b7=this[_0x1b1d42(0x194)][_0x1b1d42(0x112)]({'unitId':_0x31cd7d,'subUnitId':_0xa82a3e,'drawingId':_0x411db4});if(!(_0x3811b7!=null&&_0x3811b7[_0x1b1d42(0x184)]))return null;let {left:_0x273c4e=0x0,top:_0x310fc9=0x0,width:_0x12f52d=0x0,height:_0x1a7c0=0x0,flipX:_0xa24b59=!0x1,flipY:_0x359599=!0x1,angle:_0x1eac7c}=_0x3811b7[_0x1b1d42(0x184)];if(_0x423ba5&&_0x4c8c74===_0x411db4){var _0x5c4f27,_0x40b15a,_0x3e4393,_0x34ff7e,_0x468713,_0x45864d,_0x3a07be;_0x273c4e=(_0x5c4f27=_0x423ba5[_0x1b1d42(0x15e)])==null?_0x273c4e:_0x5c4f27,_0x310fc9=(_0x40b15a=_0x423ba5['top'])==null?_0x310fc9:_0x40b15a,_0x12f52d=(_0x3e4393=_0x423ba5[_0x1b1d42(0x13d)])==null?_0x12f52d:_0x3e4393,_0x1a7c0=(_0x34ff7e=_0x423ba5['height'])==null?_0x1a7c0:_0x34ff7e,_0xa24b59=(_0x468713=_0x423ba5['flipX'])==null?_0xa24b59:_0x468713,_0x359599=(_0x45864d=_0x423ba5[_0x1b1d42(0x145)])==null?_0x359599:_0x45864d,_0x1eac7c=(_0x3a07be=_0x423ba5[_0x1b1d42(0x13f)])==null?_0x1eac7c:_0x3a07be;}_0x17a0f6[_0x1b1d42(0x122)]({'width':_0x12f52d,'height':_0x1a7c0});let _0x212805=_0x17a0f6[_0x1b1d42(0x1a0)]()[_0x1b1d42(0x19f)](_0x202918=>_0x202918[_0x1b1d42(0x149)]===_0x5249aa);if(!_0x212805)return null;let _0x4cd32a=_0xa24b59?_0x12f52d-_0x212805['x']:_0x212805['x'],_0x10b000=_0x359599?_0x1a7c0-_0x212805['y']:_0x212805['y'];if(_0x1eac7c!==0x0&&_0x1eac7c!=null){let _0x225365=_0x1eac7c*Math['PI']/0xb4,_0x421fd6=Math[_0x1b1d42(0x175)](_0x225365),_0x37e360=Math[_0x1b1d42(0x127)](_0x225365),_0xb008ec=_0x12f52d/0x2,_0x1d866e=_0x1a7c0/0x2,_0xa49e44=_0x4cd32a-_0xb008ec,_0x4812f6=_0x10b000-_0x1d866e;_0x4cd32a=_0xb008ec+_0xa49e44*_0x421fd6-_0x4812f6*_0x37e360,_0x10b000=_0x1d866e+_0xa49e44*_0x37e360+_0x4812f6*_0x421fd6;}_0x4cd32a+=_0x273c4e,_0x10b000+=_0x310fc9;let _0x38195b=_0x212805[_0x1b1d42(0x10a)]/0xea60;_0xa24b59&&(_0x38195b=0xb4-_0x38195b),_0x359599&&(_0x38195b=-_0x38195b),_0x38195b+=_0x1eac7c||0x0,_0x38195b=(_0x38195b%0x168+0x168)%0x168;let _0x1f34bf=_0x2f0722({'left':_0x273c4e,'top':_0x310fc9,'width':_0x12f52d,'height':_0x1a7c0},_0x1eac7c||0x0);return{'point':{'x':_0x4cd32a,'y':_0x10b000},'angle':_0x38195b,'bounds':_0x1f34bf};}[_0x3e0f44(0x181)](_0x182328,_0x1da4ba,_0x4d65d0,_0x31a399,_0xbed26d,_0x17ae1b,_0x3d19f1,_0x149dd5,_0x11e8ad,_0x47afa8){const _0x4c5db4=_0x3e0f44;let _0x24d59a=this[_0x4c5db4(0x193)][_0x4c5db4(0x144)](_0x182328,_0x1da4ba);if(!_0x24d59a)return;let _0x3c2bf7=_0x31a399[_0x4c5db4(0x158)](),_0x46701a=_0x31a399['getAdjustNames'](),_0x43d397={},_0x6a7d09={};_0x46701a[_0x4c5db4(0x124)](_0x3a886a=>{const _0x817df2=_0x4c5db4;let _0x50b742=_0x31a399[_0x817df2(0x170)](_0x3a886a);_0x6a7d09[_0x3a886a]=_0x50b742==null?0x0:_0x50b742;});let _0x2f3d35=this[_0x4c5db4(0x17a)](_0xbed26d,_0x182328,_0x1da4ba,_0x11e8ad,_0x47afa8),_0x12e4d1=this[_0x4c5db4(0x17a)](_0x17ae1b,_0x182328,_0x1da4ba,_0x11e8ad,_0x47afa8);if(_0x2f3d35&&_0x12e4d1){let _0x356724=_0x31a399[_0x4c5db4(0x135)](),_0x313329=_0x5b14d9(_0x2f3d35,_0x12e4d1,_0x356724),_0x2e2e7c=_0x356724;if(_0x313329){let _0x42ce3e=_0x8d0a05(_0x313329,_0x31a399[_0x4c5db4(0x135)]()),_0x34f459=this[_0x4c5db4(0x194)][_0x4c5db4(0x160)](_0x182328,_0x1da4ba);if(_0x34f459&&_0x34f459[_0x4d65d0]){let _0xb60947=_0x34f459[_0x4d65d0];_0x2e2e7c=_0x42ce3e[_0x4c5db4(0x180)];for(let [_0x6d8d71,_0x358e38]of Object[_0x4c5db4(0x192)](_0x42ce3e[_0x4c5db4(0x19e)]))_0x43d397[_0x6d8d71]=_0x358e38;let _0xf22c02={..._0xb60947[_0x4c5db4(0x184)],'width':_0x42ce3e[_0x4c5db4(0x11d)][_0x4c5db4(0x13d)],'height':_0x42ce3e[_0x4c5db4(0x11d)][_0x4c5db4(0x15b)],'left':_0x42ce3e[_0x4c5db4(0x11d)][_0x4c5db4(0x15e)],'top':_0x42ce3e[_0x4c5db4(0x11d)][_0x4c5db4(0x115)],'flipX':_0x42ce3e['worldRect'][_0x4c5db4(0x16b)],'flipY':_0x42ce3e['worldRect']['flipY'],'angle':_0x42ce3e['rotation']},_0xccdc04=_0x41bba7(_0xf22c02,_0x24d59a),_0x53d489=_0x59be66(_0xf22c02,_0x24d59a),_0x1cfa9c={'unitId':_0x182328,'subUnitId':_0x1da4ba,'drawingType':_0x171314[_0x4c5db4(0x164)],'drawingId':_0x4d65d0,'transform':_0xf22c02,'sheetTransform':_0xccdc04,'axisAlignSheetTransform':_0x53d489},{unitId:_0x1cb2de,subUnitId:_0x5f3be5,undo:_0x543e4b,redo:_0x3c90,objects:_0x2cb821}=this[_0x4c5db4(0x194)]['getBatchUpdateOp']([_0x1cfa9c]);_0x3d19f1['push']({'id':_0x2a1e2d['id'],'params':{'unitId':_0x1cb2de,'subUnitId':_0x5f3be5,'op':_0x3c90,'objects':_0x2cb821,'type':_0x1a4a4e[_0x4c5db4(0x131)]}}),_0x149dd5[_0x4c5db4(0x19d)]({'id':_0x2a1e2d['id'],'params':{'unitId':_0x1cb2de,'subUnitId':_0x5f3be5,'op':_0x543e4b,'objects':_0x2cb821,'type':_0x1a4a4e[_0x4c5db4(0x131)]}});}_0x31a399[_0x4c5db4(0x197)]();}_0x3d19f1[_0x4c5db4(0x19d)]({'id':Y['id'],'params':{'unitId':_0x182328,'subUnitId':_0x1da4ba,'shapeId':_0x4d65d0,'shapeType':_0x2e2e7c,'shapeData':{'adjustValues':_0x43d397,'relation':_0x3c2bf7}}}),_0x149dd5[_0x4c5db4(0x19d)]({'id':Y['id'],'params':{'unitId':_0x182328,'subUnitId':_0x1da4ba,'shapeId':_0x4d65d0,'shapeType':_0x356724,'shapeData':{'adjustValues':_0x6a7d09,'relation':_0x3c2bf7}}});}}['_addLineFollowShapeUpdates'](_0x1ccb7c,_0x59153a,_0x5b72c6,_0x387839,_0x3d607f,_0x3dbd0e,_0x281f43,_0x36cf51,_0x21717c,_0x1cad55){const _0x11f2eb=_0x3e0f44;var _0x21a29d;if(!_0x3d607f)return;let _0x3351ac=this['_sheetSkeletonService'][_0x11f2eb(0x144)](_0x1ccb7c,_0x59153a);if(!_0x3351ac)return;let _0x2a61a9=(_0x21a29d=this[_0x11f2eb(0x194)][_0x11f2eb(0x112)]({'unitId':_0x1ccb7c,'subUnitId':_0x59153a,'drawingId':_0x21717c}))==null?void 0x0:_0x21a29d[_0x11f2eb(0x184)];if(!_0x2a61a9)return;let _0x4b4769=_0x2a61a9[_0x11f2eb(0x15e)]!==_0x1cad55['left']||_0x2a61a9[_0x11f2eb(0x115)]!==_0x1cad55[_0x11f2eb(0x115)],_0x32bcf7=_0x2a61a9['width']!==_0x1cad55[_0x11f2eb(0x13d)]||_0x2a61a9[_0x11f2eb(0x15b)]!==_0x1cad55[_0x11f2eb(0x15b)],_0x47d73c=_0x2a61a9[_0x11f2eb(0x16b)]!==_0x1cad55[_0x11f2eb(0x16b)]||_0x2a61a9['flipY']!==_0x1cad55[_0x11f2eb(0x145)],_0x148708=_0x2a61a9[_0x11f2eb(0x13f)]!==_0x1cad55[_0x11f2eb(0x13f)];if(_0x4b4769&&!_0x32bcf7&&!_0x47d73c&&!_0x148708){var _0x4b4321,_0x4de82c,_0xeb6202,_0x47cc5b;let _0x2a23d5=((_0x4b4321=_0x1cad55[_0x11f2eb(0x15e)])==null?0x0:_0x4b4321)-((_0x4de82c=_0x2a61a9['left'])==null?0x0:_0x4de82c),_0x349eb3=((_0xeb6202=_0x1cad55[_0x11f2eb(0x115)])==null?0x0:_0xeb6202)-((_0x47cc5b=_0x2a61a9['top'])==null?0x0:_0x47cc5b),_0x4482c2=this['_drawingManagerService']['getDrawingData'](_0x1ccb7c,_0x59153a);if(_0x4482c2&&_0x4482c2[_0x5b72c6]){var _0x40e930,_0x495bb0,_0x6e87cf,_0x3e9cc1;let _0x5d760a=_0x4482c2[_0x5b72c6],_0x50c21f={..._0x5d760a[_0x11f2eb(0x184)],'left':((_0x40e930=(_0x495bb0=_0x5d760a[_0x11f2eb(0x184)])==null?void 0x0:_0x495bb0[_0x11f2eb(0x15e)])==null?0x0:_0x40e930)+_0x2a23d5,'top':((_0x6e87cf=(_0x3e9cc1=_0x5d760a[_0x11f2eb(0x184)])==null?void 0x0:_0x3e9cc1[_0x11f2eb(0x115)])==null?0x0:_0x6e87cf)+_0x349eb3},_0x477432=_0x41bba7(_0x50c21f,_0x3351ac),_0x2860a9=_0x59be66(_0x50c21f,_0x3351ac),_0xb0dda6={'unitId':_0x1ccb7c,'subUnitId':_0x59153a,'drawingType':_0x171314[_0x11f2eb(0x164)],'drawingId':_0x5b72c6,'transform':_0x50c21f,'sheetTransform':_0x477432,'axisAlignSheetTransform':_0x2860a9},{unitId:_0x39897c,subUnitId:_0x5f2a2a,undo:_0x639f07,redo:_0x4050c2,objects:_0x5c85a2}=this[_0x11f2eb(0x194)][_0x11f2eb(0x16c)]([_0xb0dda6]);_0x281f43[_0x11f2eb(0x19d)]({'id':_0x2a1e2d['id'],'params':{'unitId':_0x39897c,'subUnitId':_0x5f2a2a,'op':_0x4050c2,'objects':_0x5c85a2,'type':_0x1a4a4e[_0x11f2eb(0x131)]}}),_0x36cf51['push']({'id':_0x2a1e2d['id'],'params':{'unitId':_0x39897c,'subUnitId':_0x5f2a2a,'op':_0x639f07,'objects':_0x5c85a2,'type':_0x1a4a4e[_0x11f2eb(0x131)]}});}}else{let _0x37c8e5=_0x387839['getStartConnectInfo'](),_0x121e57=_0x387839[_0x11f2eb(0x151)]();this[_0x11f2eb(0x181)](_0x1ccb7c,_0x59153a,_0x5b72c6,_0x387839,_0x37c8e5,_0x121e57,_0x281f43,_0x36cf51,_0x21717c,_0x1cad55);}}};ce=W([U(0x0,_0x46216b),U(0x1,_0x136051(_0x53f707)),U(0x2,_0x136051(_0x566bb4)),U(0x3,_0x136051(G)),U(0x4,_0x136051(_0x38a742))],ce);function _0x5cad(_0x33c4eb,_0x27bfd8){_0x33c4eb=_0x33c4eb-0x105;const _0x1923d2=_0x1923();let _0x5cad75=_0x1923d2[_0x33c4eb];return _0x5cad75;}let $=class extends _0xefe177{constructor(_0x53f02d=se,_0x52409a,_0x5c9347,_0x7b4a51){const _0x50efb9=_0x3e0f44;super(),this[_0x50efb9(0x17c)]=_0x53f02d,this[_0x50efb9(0x17f)]=_0x52409a,this['_commandService']=_0x5c9347,this[_0x50efb9(0x16e)]=_0x7b4a51;let {..._0x1d7832}=_0xea1431({},se,this[_0x50efb9(0x17c)]);this['_configService']['setConfig'](oe,_0x1d7832);}[_0x3e0f44(0x15f)](){const _0x33a953=_0x3e0f44;let _0x185701=this['_injector'];[[H],[G],[ce]][_0x33a953(0x124)](_0x1dbf23=>_0x185701['add'](_0x1dbf23)),_0x3df3af(_0x185701,[[G],[ce]]);}};V($,'type',_0x339832['UNIVER_SHEET']),V($,_0x3e0f44(0x172),_0x3e0f44(0x16f)),V($,_0x3e0f44(0x15c),ie),V($,_0x3e0f44(0x130),ae),$=W([_0xadff15(_0x27586c),U(0x1,_0x136051(_0x50498c)),U(0x2,_0x46216b),U(0x3,_0x123a36)],$);export{L as DEFAULT_SHAPE_HEIGHT,I as DEFAULT_SHAPE_WIDTH,J as InsertShapeCommand,K as InsertSheetsShapeMutation,q as RemoveSheetsShapeMutation,ee as SetShapeDrawingDataCommand,X as SetSheetsShapeRotateCommand,G as SheetsShapeService,te as ToggleSheetsShapeFlipCommand,$ as UniverSheetsShapePlugin,Z as UpdateConnectorRelationCommand,ne as UpdateLineShapeResizeCommand,Y as UpdateSheetsShapeDataMutation,re as UpdateSheetsShapeTypeCommand,Q as UpdateSheetsShapeTypeMutation};
1
+ const _0xad074b=_0x1092;(function(_0x1cb9a6,_0x593195){const _0xe47d7e=_0x1092,_0x1bd9ee=_0x1cb9a6();while(!![]){try{const _0x9a48b6=-parseInt(_0xe47d7e(0x1ac))/0x1+-parseInt(_0xe47d7e(0x201))/0x2+parseInt(_0xe47d7e(0x1e0))/0x3*(-parseInt(_0xe47d7e(0x1a9))/0x4)+-parseInt(_0xe47d7e(0x1a1))/0x5+-parseInt(_0xe47d7e(0x182))/0x6+parseInt(_0xe47d7e(0x189))/0x7+-parseInt(_0xe47d7e(0x1c8))/0x8*(-parseInt(_0xe47d7e(0x1af))/0x9);if(_0x9a48b6===_0x593195)break;else _0x1bd9ee['push'](_0x1bd9ee['shift']());}catch(_0x7fee3c){_0x1bd9ee['push'](_0x1bd9ee['shift']());}}}(_0x2a32,0xbe462));import{ShapeModel,computeConnectorRouteLayout,getBasicShapeRotateBound,isConnectorShape,routeConnectorLineShape}from'@univerjs-pro/engine-shape';import{CommandType,DependentOn,Disposable,DrawingTypeEnum,ICommandService,IConfigService,IResourceManagerService,IUndoRedoService,IUniverInstanceService,Inject,Injector,Plugin,UniverInstanceType,generateRandomId,merge,sequenceExecute,touchDependencies}from'@univerjs/core';import{SheetInterceptorService,SheetSkeletonService,getSheetCommandTarget}from'@univerjs/sheets';import{ClearSheetDrawingTransformerOperation,DrawingApplyType,ISheetDrawingService,InsertSheetDrawingCommand,RemoveSheetDrawingCommand,SetDrawingApplyMutation,SetSheetDrawingCommand,transformToAxisAlignPosition,transformToDrawingPosition}from'@univerjs/sheets-drawing';import{UniverLicensePlugin}from'@univerjs-pro/license';import{IDrawingManagerService}from'@univerjs/drawing';const DEFAULT_SHAPE_WIDTH=0xc8,DEFAULT_SHAPE_HEIGHT=0xc8;function _typeof(_0x3f9c88){'@babel/helpers - typeof';const _0x563989=_0x1092;return _typeof='function'==typeof Symbol&&'symbol'==typeof Symbol[_0x563989(0x1ba)]?function(_0x1029bb){return typeof _0x1029bb;}:function(_0x3fa3a8){const _0x18f3f1=_0x563989;return _0x3fa3a8&&_0x18f3f1(0x1b2)==typeof Symbol&&_0x3fa3a8[_0x18f3f1(0x206)]===Symbol&&_0x3fa3a8!==Symbol[_0x18f3f1(0x1fa)]?_0x18f3f1(0x192):typeof _0x3fa3a8;},_typeof(_0x3f9c88);}function _0x2a32(){const _0x147226=['sheet.mutation.update-shape-type','getShapeModel','pluginName','updateContext','getSkeleton','getStartConnectInfo','1373490ChQBhI','addShape','onCommandExecute','ang','redos','left','getShapeData','keys','763444gFOMjr','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','parse','24564PupgBd','index','UPDATE','27VoYONC','pushUndoRedo','interceptCommand','function','from','isLineShape','packageName','insertShape','COMMAND','getShapeRelation','_addLineFollowShapeUpdates','iterator','push','_configService','startX','_serializeShapeForUnit','rotateEnabled','_linesIds','sheet.mutation.insert-shape','sheets-shape.config','add','sheet.command.insert-shape','stringify','delete','SHEET_SHAPE_PLUGIN','8170072jhmMMj','preUndos','startY','isHorizontal','UNIVER_SHEET','isFrom','length','_initCommands','preRedos','getAdjustValueByName','forEach','shapeId','removeShape','_initCommandInterceptor','has','_shapeModelManagerMap','sheet.command.update-connector-relation','call','_ensureShapeModelManager','fromJSON','rotation','object','find','defineProperty','3KOjLuX','REMOVE','setShapeData','_injector','MUTATION','getBasicShapeRelation','getShapeDataById','@univerjs-pro/sheets-shape','getConnectionSiteList','lineShapeId','resizeEnabled','every','_groupIds','getEndConnectInfo','disposeWithMe','registerCommand','_getConnectPointInfo','_deserializeShapeForUnit','borderEnabled','range','toPrimitive','INSERT','getDrawingData','getOwnPropertyDescriptor','flipY','getLineShapeRelation','prototype','onStarting','transform','sin','filter','getShapeTypeById','hasShape','2018428uGTQyq','get','ensureSkeleton','getDrawingByParam','angle','constructor','_sheetSkeletonService','syncExecuteCommand','DRAWING_SHAPE','setShapeType','getCellIndexAndOffsetByPosition','_config','getCellWithCoordByIndex','flipX','_drawingManagerService','getShapeType','_initSnapshot','default','data','sheet.mutation.update-shape-data','relation','width','worldRect','fill','drawingType','height','top','getBatchUpdateOp','7785468hclIGU','_shapes','position','_sheetInterceptorService','Fail\x20to\x20get\x20shape\x20model,\x20get:\x20','_addLineRerouteUpdates','_resourcesManagerService','3587500nXEtHa','shapeData','cxnIndex','_sheetsShapeService','_commandService','toJSON','undos','setConfig','set','symbol','params','lineType','dispose','decorate','adjustValues','type','string','clear'];_0x2a32=function(){return _0x147226;};return _0x2a32();}function toPrimitive(_0x520bf3,_0x22be2e){const _0x4cfcbb=_0x1092;if(_0x4cfcbb(0x1dd)!=_typeof(_0x520bf3)||!_0x520bf3)return _0x520bf3;var _0x19d5d0=_0x520bf3[Symbol[_0x4cfcbb(0x1f4)]];if(void 0x0!==_0x19d5d0){var _0x41defd=_0x19d5d0[_0x4cfcbb(0x1d9)](_0x520bf3,_0x22be2e||_0x4cfcbb(0x212));if(_0x4cfcbb(0x1dd)!=_typeof(_0x41defd))return _0x41defd;throw new TypeError(_0x4cfcbb(0x1aa));}return(_0x4cfcbb(0x199)===_0x22be2e?String:Number)(_0x520bf3);}function toPropertyKey(_0x43e403){const _0x137dbc=_0x1092;var _0x2004cc=toPrimitive(_0x43e403,_0x137dbc(0x199));return _0x137dbc(0x192)==_typeof(_0x2004cc)?_0x2004cc:_0x2004cc+'';}function _defineProperty(_0x45d32e,_0xc1e09d,_0x37a3bd){const _0x113c26=_0x1092;return(_0xc1e09d=toPropertyKey(_0xc1e09d))in _0x45d32e?Object[_0x113c26(0x1df)](_0x45d32e,_0xc1e09d,{'value':_0x37a3bd,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x45d32e[_0xc1e09d]=_0x37a3bd,_0x45d32e;}function _0x1092(_0x1d4ed7,_0x20d860){_0x1d4ed7=_0x1d4ed7-0x17f;const _0x2a3272=_0x2a32();let _0x1092fa=_0x2a3272[_0x1d4ed7];return _0x1092fa;}var SheetShapeModelManager=class extends Disposable{constructor(){const _0x4c5fa2=_0x1092;super(),_defineProperty(this,_0x4c5fa2(0x183),new Map()),_defineProperty(this,'_linesIds',new Set()),_defineProperty(this,_0x4c5fa2(0x1ec),new Set());}['addShape'](_0x5000f2,_0x1474a2,_0xae5478){const _0x26c51a=_0x1092,_0x151923=new ShapeModel(_0x5000f2,_0x1474a2,_0xae5478);this[_0x26c51a(0x183)][_0x26c51a(0x191)](_0x1474a2,_0x151923);if(isConnectorShape(_0x5000f2))this[_0x26c51a(0x1c0)][_0x26c51a(0x1c3)](_0x1474a2);return _0x151923;}['getBasicShapeRelation'](_0x224628){const _0x4f9ee7=_0x1092,_0x85e684=[];for(const _0x31f0fe of this[_0x4f9ee7(0x1c0)]){const _0x13467a=this[_0x4f9ee7(0x183)][_0x4f9ee7(0x202)](_0x31f0fe);if(_0x13467a){const _0x5871af=_0x13467a[_0x4f9ee7(0x1b8)]();if(_0x5871af){var _0x119c30,_0x3ae8de;if(((_0x119c30=_0x5871af['from'])===null||_0x119c30===void 0x0?void 0x0:_0x119c30[_0x4f9ee7(0x1d3)])===_0x224628)_0x85e684[_0x4f9ee7(0x1bb)]({..._0x5871af['from'],'lineShapeId':_0x31f0fe,'isFrom':!![]});if(((_0x3ae8de=_0x5871af['to'])===null||_0x3ae8de===void 0x0?void 0x0:_0x3ae8de[_0x4f9ee7(0x1d3)])===_0x224628)_0x85e684[_0x4f9ee7(0x1bb)]({..._0x5871af['to'],'lineShapeId':_0x31f0fe,'isFrom':![]});}}}return _0x85e684;}['getLineShapeRelation'](_0xe0f01c){const _0x41b9df=_0x1092,_0x31ca67=this[_0x41b9df(0x183)][_0x41b9df(0x202)](_0xe0f01c);if(_0x31ca67)return _0x31ca67[_0x41b9df(0x1b8)]();}[_0xad074b(0x210)](_0x52e553){const _0x221537=_0xad074b,_0x2c3f9c=this['_shapes'][_0x221537(0x202)](_0x52e553);if(_0x2c3f9c)return _0x2c3f9c['getShapeType']();}[_0xad074b(0x200)](_0x4595f8){const _0x1fa928=_0xad074b;return this[_0x1fa928(0x183)][_0x1fa928(0x1d6)](_0x4595f8);}['removeShape'](_0xf11248){const _0x1c7638=_0xad074b,_0x558be4=this[_0x1c7638(0x183)][_0x1c7638(0x202)](_0xf11248);if(!_0x558be4)return;if(isConnectorShape(_0x558be4[_0x1c7638(0x210)]()))this[_0x1c7638(0x1c0)][_0x1c7638(0x1c6)](_0xf11248);this[_0x1c7638(0x183)]['delete'](_0xf11248);}[_0xad074b(0x18e)](){const _0x3cb42a=_0xad074b,_0x53b2c9=[];return this[_0x3cb42a(0x183)][_0x3cb42a(0x1d2)](_0x17113b=>{const _0x5263c2=_0x3cb42a;_0x53b2c9['push'](_0x17113b[_0x5263c2(0x18e)]());}),_0x53b2c9;}[_0xad074b(0x1db)](_0x2d4728){const _0x3f9e1e=_0xad074b;for(const _0x3d2f40 of _0x2d4728){const {id:_0x8727ec,shapeType:_0x4357cd}=_0x3d2f40,_0x16e7a0=this['addShape'](_0x4357cd,_0x8727ec,_0x3d2f40[_0x3f9e1e(0x18a)]);if(_0x16e7a0&&_0x16e7a0[_0x3f9e1e(0x1b4)]())this['_linesIds'][_0x3f9e1e(0x1c3)](_0x8727ec);}}[_0xad074b(0x195)](){const _0x50e35a=_0xad074b;if(this['_disposed'])return;this[_0x50e35a(0x183)][_0x50e35a(0x1d2)](_0x46b319=>{const _0x491d6f=_0x50e35a;_0x46b319[_0x491d6f(0x195)]();}),this['_shapes'][_0x50e35a(0x19a)](),this[_0x50e35a(0x1c0)][_0x50e35a(0x19a)](),this[_0x50e35a(0x1ec)][_0x50e35a(0x19a)](),super[_0x50e35a(0x195)]();}};function __decorateParam(_0x2cd80d,_0x466e2c){return function(_0x276bad,_0x122170){_0x466e2c(_0x276bad,_0x122170,_0x2cd80d);};}function __decorate(_0x30d0a7,_0x2f4995,_0x439c1a,_0x574538){const _0x2e8da5=_0xad074b;var _0x115527=arguments[_0x2e8da5(0x1ce)],_0x422a08=_0x115527<0x3?_0x2f4995:_0x574538===null?_0x574538=Object[_0x2e8da5(0x1f7)](_0x2f4995,_0x439c1a):_0x574538,_0x12a181;if(typeof Reflect===_0x2e8da5(0x1dd)&&typeof Reflect[_0x2e8da5(0x196)]==='function')_0x422a08=Reflect['decorate'](_0x30d0a7,_0x2f4995,_0x439c1a,_0x574538);else{for(var _0x5e53cf=_0x30d0a7['length']-0x1;_0x5e53cf>=0x0;_0x5e53cf--)if(_0x12a181=_0x30d0a7[_0x5e53cf])_0x422a08=(_0x115527<0x3?_0x12a181(_0x422a08):_0x115527>0x3?_0x12a181(_0x2f4995,_0x439c1a,_0x422a08):_0x12a181(_0x2f4995,_0x439c1a))||_0x422a08;}return _0x115527>0x3&&_0x422a08&&Object[_0x2e8da5(0x1df)](_0x2f4995,_0x439c1a,_0x422a08),_0x422a08;}const SHEET_SHAPE_PLUGIN=_0xad074b(0x1c7);let SheetsShapeService=class SheetsShapeService extends Disposable{constructor(_0x16ad64){const _0x2c0fc6=_0xad074b;super(),this[_0x2c0fc6(0x188)]=_0x16ad64,_defineProperty(this,'_shapeModelManagerMap',new Map()),this[_0x2c0fc6(0x211)]();}[_0xad074b(0x1da)](_0x56ab05,_0x38002b){const _0x947646=_0xad074b;let _0x227b28=this['_shapeModelManagerMap'][_0x947646(0x202)](_0x56ab05);!_0x227b28&&(_0x227b28=new Map(),this[_0x947646(0x1d7)][_0x947646(0x191)](_0x56ab05,_0x227b28));let _0x2c3109=_0x227b28[_0x947646(0x202)](_0x38002b);return!_0x2c3109&&(_0x2c3109=new SheetShapeModelManager(),_0x227b28[_0x947646(0x191)](_0x38002b,_0x2c3109)),_0x2c3109;}[_0xad074b(0x1b6)](_0x24e15c,_0x39427d,_0x3b8e63,_0x4da2c1,_0x2f546b){const _0x12bbe8=_0xad074b;this['_ensureShapeModelManager'](_0x24e15c,_0x39427d)[_0x12bbe8(0x1a2)](_0x3b8e63,_0x4da2c1,_0x2f546b);}[_0xad074b(0x1d4)](_0xd54964,_0x10b143,_0x527a95){const _0x5ba3c1=_0xad074b;this[_0x5ba3c1(0x1da)](_0xd54964,_0x10b143)[_0x5ba3c1(0x1d4)](_0x527a95);}['getBasicShapeType'](_0x312e32,_0x259064,_0x314343){const _0x2d7ab2=_0xad074b;return this[_0x2d7ab2(0x1da)](_0x312e32,_0x259064)[_0x2d7ab2(0x210)](_0x314343);}[_0xad074b(0x210)](_0x561131,_0x1928cb,_0x1abc05){const _0x43e418=_0xad074b;return this[_0x43e418(0x1da)](_0x561131,_0x1928cb)[_0x43e418(0x210)](_0x1abc05);}[_0xad074b(0x200)](_0x5acd76,_0x4f1da9,_0x43d1de){const _0x1f37ac=_0xad074b;return this[_0x1f37ac(0x1da)](_0x5acd76,_0x4f1da9)[_0x1f37ac(0x200)](_0x43d1de);}[_0xad074b(0x1ff)](_0x175d37,_0x3f17d0,_0x2901cd){const _0x89dc89=_0xad074b;return this[_0x89dc89(0x1da)](_0x175d37,_0x3f17d0)[_0x89dc89(0x210)](_0x2901cd);}[_0xad074b(0x1e6)](_0x8df2f0,_0x121451,_0x465920){const _0x228405=_0xad074b,_0xdbef90=this[_0x228405(0x1da)](_0x8df2f0,_0x121451);if(!_0xdbef90[_0x228405(0x210)](_0x465920))return;const _0x1fd44b=_0xdbef90['_shapes'][_0x228405(0x202)](_0x465920);if(!_0x1fd44b)return;return _0x1fd44b[_0x228405(0x1a7)]();}[_0xad074b(0x19c)](_0x17f658,_0x30b375,_0x594aec){const _0x2aedda=_0xad074b;return this[_0x2aedda(0x1da)](_0x17f658,_0x30b375)[_0x2aedda(0x183)][_0x2aedda(0x202)](_0x594aec);}['getBasicShapeRelation'](_0x4fd271,_0x54a411,_0x24e237){const _0x245a85=_0xad074b;return this[_0x245a85(0x1da)](_0x4fd271,_0x54a411)['getBasicShapeRelation'](_0x24e237);}[_0xad074b(0x1f9)](_0x33f2dc,_0x1ff30c,_0x121abd){const _0x309c16=_0xad074b,_0x5c5e83=this[_0x309c16(0x1da)](_0x33f2dc,_0x1ff30c)[_0x309c16(0x183)][_0x309c16(0x202)](_0x121abd);if(!_0x5c5e83)return;return _0x5c5e83[_0x309c16(0x1b8)]();}[_0xad074b(0x20a)](){}[_0xad074b(0x1be)](_0x397e06){const _0x46ed40=_0xad074b,_0xcb5fe7={},_0x577c7f=this[_0x46ed40(0x1d7)][_0x46ed40(0x202)](_0x397e06);if(_0x577c7f)_0x577c7f[_0x46ed40(0x1d2)]((_0x12de8f,_0x4d94f8)=>{const _0x34c3cb=_0x46ed40,_0x32ffee=_0x12de8f[_0x34c3cb(0x18e)]();if(_0x32ffee[_0x34c3cb(0x1ce)]>0x0)_0xcb5fe7[_0x4d94f8]=_0x32ffee;});return JSON[_0x46ed40(0x1c5)](_0xcb5fe7);}[_0xad074b(0x1f1)](_0x152bab,_0x38fa49){const _0x3c2082=_0xad074b;Object['keys'](_0x38fa49)[_0x3c2082(0x1d2)](_0x33164b=>{const _0x473705=_0x3c2082;this['_ensureShapeModelManager'](_0x152bab,_0x33164b)[_0x473705(0x1db)](_0x38fa49[_0x33164b]);});}[_0xad074b(0x18e)](){const _0x4a943e=_0xad074b,_0x818801={};return this[_0x4a943e(0x1d7)]['forEach']((_0x6288f6,_0x372e94)=>{const _0x1d7baa=_0x4a943e;_0x818801[_0x372e94]={},_0x6288f6[_0x1d7baa(0x1d2)]((_0x1c9362,_0x9f51a9)=>{const _0x40875e=_0x1d7baa;_0x818801[_0x372e94][_0x9f51a9]=_0x1c9362[_0x40875e(0x18e)]();});}),_0x818801;}[_0xad074b(0x1db)](_0x36732b){const _0x146272=_0xad074b;Object[_0x146272(0x1a8)](_0x36732b)[_0x146272(0x1d2)](_0x43dc6d=>{const _0x1da130=_0x146272,_0x493963=_0x36732b[_0x43dc6d];Object[_0x1da130(0x1a8)](_0x493963)[_0x1da130(0x1d2)](_0x29cb07=>{const _0x4bf3f8=_0x1da130;this[_0x4bf3f8(0x1da)](_0x43dc6d,_0x29cb07)[_0x4bf3f8(0x1db)](_0x493963[_0x29cb07]);});});}['_initSnapshot'](){const _0x22f1d9=_0xad074b;this['_resourcesManagerService']['registerPluginResource']({'pluginName':SHEET_SHAPE_PLUGIN,'businesses':[UniverInstanceType[_0x22f1d9(0x1cc)]],'toJson':_0x3f6f92=>this[_0x22f1d9(0x1be)](_0x3f6f92),'parseJson':_0x1d14ef=>JSON[_0x22f1d9(0x1ab)](_0x1d14ef),'onLoad':(_0x489272,_0x55884a)=>{const _0x3ea2cc=_0x22f1d9;this[_0x3ea2cc(0x1f1)](_0x489272,_0x55884a);},'onUnLoad':_0x9efc0b=>{const _0x20b956=_0x22f1d9,_0x3b0571=this['_shapeModelManagerMap']['get'](_0x9efc0b);_0x3b0571&&(_0x3b0571[_0x20b956(0x1d2)](_0x5da22c=>{const _0x523fdb=_0x20b956;_0x5da22c[_0x523fdb(0x195)]();}),this[_0x20b956(0x1d7)]['delete'](_0x9efc0b));}});}['dispose'](){const _0xb8696e=_0xad074b;this[_0xb8696e(0x1d7)]['forEach'](_0x4c4267=>{const _0x592c11=_0xb8696e;_0x4c4267[_0x592c11(0x1d2)](_0x3b955e=>{const _0x3ea54d=_0x592c11;_0x3b955e[_0x3ea54d(0x195)]();});});}};SheetsShapeService=__decorate([__decorateParam(0x0,IResourceManagerService)],SheetsShapeService);const InsertSheetsShapeMutation={'id':_0xad074b(0x1c1),'type':CommandType[_0xad074b(0x1e4)],'handler':(_0x14840d,_0x1a6f97)=>{const _0x57aaa7=_0xad074b,{unitId:_0x5643d7,subUnitId:_0xfe0df9,shapeType:_0x40728c,shapeId:_0x2d9ca5,shapeData:_0x3bb542}=_0x1a6f97;return _0x14840d[_0x57aaa7(0x202)](SheetsShapeService)[_0x57aaa7(0x1b6)](_0x5643d7,_0xfe0df9,_0x40728c,_0x2d9ca5,_0x3bb542),!![];}},RemoveSheetsShapeMutation={'id':'sheet.mutation.remove-shape','type':CommandType[_0xad074b(0x1e4)],'handler':(_0x2d47af,_0x452f53)=>{const _0x52a6fe=_0xad074b,{unitId:_0x4c51b1,subUnitId:_0x43c312,shapeId:_0x3c71fd}=_0x452f53;return _0x2d47af[_0x52a6fe(0x202)](SheetsShapeService)[_0x52a6fe(0x1d4)](_0x4c51b1,_0x43c312,_0x3c71fd),!![];}},InsertShapeCommand={'type':CommandType['COMMAND'],'id':_0xad074b(0x1c4),'handler':(_0x12de0c,_0x1ee5bf)=>{const _0x1079af=_0xad074b;var _0x5d2c60,_0x122405;const _0x34c5a1=getSheetCommandTarget(_0x12de0c[_0x1079af(0x202)](IUniverInstanceService),_0x1ee5bf);if(!_0x34c5a1)return![];const _0x9ed26f=_0x12de0c[_0x1079af(0x202)](SheetSkeletonService),{unitId:_0x200981,subUnitId:_0x28764f}=_0x34c5a1,_0x40edf9=_0x9ed26f[_0x1079af(0x203)](_0x200981,_0x28764f);if(!_0x40edf9)return![];const _0x3855dd=_0x12de0c[_0x1079af(0x202)](ICommandService),_0x57f42b=_0x12de0c[_0x1079af(0x202)](IUndoRedoService),_0x277426=_0x12de0c[_0x1079af(0x202)](SheetInterceptorService),_0x2caa33=_0x12de0c[_0x1079af(0x202)](ISheetDrawingService),{shapeType:_0xafc372,shapeData:_0x2ec480}=_0x1ee5bf,_0x1ed60c=_0x1ee5bf['shapeId']||generateRandomId(),_0x29f681={'unitId':_0x200981,'subUnitId':_0x28764f,'shapeId':_0x1ed60c,'shapeType':_0xafc372,'shapeData':_0x2ec480},_0x57e9a3=_0x1ee5bf[_0x1079af(0x216)]||0xc8,_0x590206=_0x1ee5bf[_0x1079af(0x17f)]||0xc8;let _0x4b784b=0x0,_0x48e60f=0x0,_0xfdae53={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0},_0x11d3a3={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0};if(_0x1ee5bf[_0x1079af(0x184)]){const {x:_0x5417db,y:_0x158c69}=_0x1ee5bf['position'];_0x4b784b=_0x5417db,_0x48e60f=_0x158c69,_0xfdae53=_0x40edf9[_0x1079af(0x20b)](_0x5417db,_0x158c69),_0x11d3a3=_0x40edf9[_0x1079af(0x20b)](_0x5417db+_0x57e9a3,_0x158c69+_0x590206);}else{if(_0x1ee5bf[_0x1079af(0x1f3)]){const {startRow:_0x2c18a9,startColumn:_0x2bb338}=_0x1ee5bf[_0x1079af(0x1f3)],_0x16b793=0xa,_0x14da18=0xa;_0xfdae53={'row':_0x2c18a9,'rowOffset':_0x16b793,'column':_0x2bb338,'columnOffset':_0x14da18};const _0x5cb0c6=_0x40edf9[_0x1079af(0x20d)](_0x2c18a9,_0x2bb338);_0x4b784b=_0x5cb0c6[_0x1079af(0x1bd)]+_0x14da18,_0x48e60f=_0x5cb0c6[_0x1079af(0x1ca)]+_0x16b793,_0x11d3a3=_0x40edf9[_0x1079af(0x20b)](_0x4b784b+_0x57e9a3,_0x48e60f+_0x590206);}}const _0x42ef02={'from':_0xfdae53,'to':_0x11d3a3},_0x424095={'unitId':_0x200981,'subUnitId':_0x28764f,'drawingId':_0x1ed60c,'drawingType':DrawingTypeEnum[_0x1079af(0x209)],'sheetTransform':_0x42ef02,'transform':{'left':_0x4b784b,'top':_0x48e60f,'width':_0x57e9a3,'height':_0x590206},'data':{'shapeType':_0xafc372,'shapeData':_0x2ec480},'axisAlignSheetTransform':_0x42ef02,'allowTransform':!![]};isConnectorShape(_0xafc372)&&(_0x424095[_0x1079af(0x213)]['fill']=![],_0x424095[_0x1079af(0x213)][_0x1079af(0x1bf)]=![],_0x424095[_0x1079af(0x213)]['resizeEnabled']=![],_0x424095['data'][_0x1079af(0x1f2)]=![],_0x424095[_0x1079af(0x1fc)][_0x1079af(0x1bf)]=![],_0x424095['transform'][_0x1079af(0x1ea)]=![],_0x424095[_0x1079af(0x1fc)][_0x1079af(0x1f2)]=![]);const {undo:_0x19da8f,redo:_0x2b0e4e,objects:_0x90caa7}=_0x2caa33['getBatchAddOp']([_0x424095]),_0x52e0c4=_0x277426[_0x1079af(0x1a3)]({'id':InsertSheetDrawingCommand['id'],'params':{'unitId':_0x200981,'drawings':[_0x424095]}}),_0x2687ef=[...(_0x5d2c60=_0x52e0c4[_0x1079af(0x1d0)])!==null&&_0x5d2c60!==void 0x0?_0x5d2c60:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x200981,'subUnitId':_0x28764f,'op':_0x2b0e4e,'objects':_0x90caa7,'type':DrawingApplyType[_0x1079af(0x1f5)]}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x200981]},..._0x52e0c4['redos'],{'id':InsertSheetsShapeMutation['id'],'params':_0x29f681}],_0x4cbfe9=[{'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x200981,'subUnitId':_0x28764f,'shapeId':_0x1ed60c}},...(_0x122405=_0x52e0c4[_0x1079af(0x1c9)])!==null&&_0x122405!==void 0x0?_0x122405:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x200981,'subUnitId':_0x28764f,'op':_0x19da8f,'objects':_0x90caa7,'type':DrawingApplyType[_0x1079af(0x1e1)]}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x200981]},..._0x52e0c4[_0x1079af(0x18f)]];if(sequenceExecute(_0x2687ef,_0x3855dd))return _0x57f42b['pushUndoRedo']({'unitID':_0x200981,'undoMutations':_0x4cbfe9,'redoMutations':_0x2687ef}),!![];return![];}},UpdateSheetsShapeDataMutation={'id':_0xad074b(0x214),'type':CommandType[_0xad074b(0x1e4)],'handler':(_0x305c3c,_0x513adb)=>{const _0xaaf413=_0xad074b,{unitId:_0x331128,subUnitId:_0x57094e,shapeType:_0x1a2fc8,shapeId:_0x339712,shapeData:_0x131cc1}=_0x513adb,_0x25f91b=_0x305c3c[_0xaaf413(0x202)](SheetsShapeService)[_0xaaf413(0x19c)](_0x331128,_0x57094e,_0x339712);if(_0x25f91b){if(_0x1a2fc8!==void 0x0)_0x25f91b['setShapeType'](_0x1a2fc8);if(_0x131cc1)_0x25f91b===null||_0x25f91b===void 0x0||_0x25f91b[_0xaaf413(0x1e2)](_0x131cc1,!![]);}return!![];}},SetShapeDrawingDataCommand={'type':CommandType['COMMAND'],'id':'sheet.command.set-shape-drawing-data','handler':(_0x561f54,_0x52425f)=>{const _0x4787ae=_0xad074b;var _0x15fa25,_0x51d33e;const _0x5ac61a=getSheetCommandTarget(_0x561f54['get'](IUniverInstanceService),_0x52425f);if(!_0x5ac61a)return![];const _0x45315b=_0x561f54[_0x4787ae(0x202)](SheetSkeletonService),{unitId:_0x29df86,subUnitId:_0x379d22}=_0x5ac61a,_0x24cd3e=_0x45315b[_0x4787ae(0x203)](_0x29df86,_0x379d22);if(!_0x24cd3e)return![];const _0x520b2c=_0x561f54[_0x4787ae(0x202)](SheetsShapeService),{shapeId:_0x177dc3,shapeType:_0xb7123d,shapeData:_0x42084c,position:_0x294a9a,width:_0x5ed2ea,height:_0x474d5d}=_0x52425f,_0x55c954=_0x520b2c[_0x4787ae(0x19c)](_0x29df86,_0x379d22,_0x177dc3);if(!_0x55c954)return![];const _0x21fbf3=_0x561f54[_0x4787ae(0x202)](ICommandService),_0xed750d=_0x561f54[_0x4787ae(0x202)](IUndoRedoService),_0x5611de=_0x561f54[_0x4787ae(0x202)](SheetInterceptorService),_0x46e65b=_0x561f54['get'](ISheetDrawingService),_0x33ca14={'unitId':_0x29df86,'subUnitId':_0x379d22,'shapeId':_0x177dc3,'shapeType':_0xb7123d,'shapeData':_0x42084c},_0x1db55e=_0x55c954[_0x4787ae(0x210)](),_0x589b5f=_0x55c954[_0x4787ae(0x1a7)](),{x:_0x26a4c,y:_0x288e00}=_0x294a9a,_0x3fad48={'from':_0x24cd3e[_0x4787ae(0x20b)](_0x26a4c,_0x288e00),'to':_0x24cd3e[_0x4787ae(0x20b)](_0x26a4c+_0x5ed2ea,_0x288e00+_0x474d5d)},_0x56e463={'unitId':_0x29df86,'subUnitId':_0x379d22,'drawingId':_0x177dc3,'drawingType':DrawingTypeEnum['DRAWING_SHAPE'],'sheetTransform':_0x3fad48,'transform':{'left':_0x26a4c,'top':_0x288e00,'width':_0x5ed2ea,'height':_0x474d5d},'data':{'shapeType':_0xb7123d,'shapeData':_0x42084c},'axisAlignSheetTransform':_0x3fad48,'allowTransform':!![]};isConnectorShape(_0xb7123d)&&(_0x56e463[_0x4787ae(0x213)][_0x4787ae(0x218)]=![],_0x56e463[_0x4787ae(0x213)][_0x4787ae(0x1bf)]=![],_0x56e463[_0x4787ae(0x213)]['resizeEnabled']=![],_0x56e463[_0x4787ae(0x213)][_0x4787ae(0x1f2)]=![],_0x56e463[_0x4787ae(0x1fc)][_0x4787ae(0x1bf)]=![],_0x56e463[_0x4787ae(0x1fc)][_0x4787ae(0x1ea)]=![],_0x56e463['transform'][_0x4787ae(0x1f2)]=![]);const {undo:_0x594173,redo:_0x357479,objects:_0x46eb53}=_0x46e65b[_0x4787ae(0x181)]([_0x56e463]),_0x57f63b=_0x5611de[_0x4787ae(0x1a3)]({'id':SetSheetDrawingCommand['id'],'params':{'unitId':_0x29df86,'drawings':[_0x56e463]}}),_0x540351=[...(_0x15fa25=_0x57f63b[_0x4787ae(0x1d0)])!==null&&_0x15fa25!==void 0x0?_0x15fa25:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x29df86,'subUnitId':_0x379d22,'op':_0x357479,'objects':_0x46eb53,'type':DrawingApplyType[_0x4787ae(0x1ae)]}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x29df86]},..._0x57f63b[_0x4787ae(0x1a5)],{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x33ca14}],_0x4af1b5=[...(_0x51d33e=_0x57f63b['preUndos'])!==null&&_0x51d33e!==void 0x0?_0x51d33e:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x29df86,'subUnitId':_0x379d22,'op':_0x594173,'objects':_0x46eb53,'type':DrawingApplyType[_0x4787ae(0x1ae)]}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x29df86]},..._0x57f63b[_0x4787ae(0x18f)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x29df86,'subUnitId':_0x379d22,'shapeType':_0x1db55e,'shapeId':_0x177dc3,'shapeData':_0x589b5f}}];if(sequenceExecute(_0x540351,_0x21fbf3))return _0xed750d[_0x4787ae(0x1b0)]({'unitID':_0x29df86,'undoMutations':_0x4af1b5,'redoMutations':_0x540351}),!![];return![];}},ToggleSheetsShapeFlipCommand={'type':CommandType['COMMAND'],'id':'sheet.command.toggle-shape-flip','handler':(_0x1a4e21,_0x502974)=>{const _0x4068b1=_0xad074b;var _0x2a6246,_0x564540;const _0x1ca97b=getSheetCommandTarget(_0x1a4e21[_0x4068b1(0x202)](IUniverInstanceService),_0x502974);if(!_0x1ca97b)return![];const _0x1d6544=_0x1a4e21[_0x4068b1(0x202)](SheetSkeletonService),{unitId:_0x52e807,subUnitId:_0x4a6ae1}=_0x1ca97b,_0x6271ac=_0x1d6544[_0x4068b1(0x19f)](_0x52e807,_0x4a6ae1);if(!_0x6271ac)return![];const _0xd19ced=_0x1a4e21['get'](ISheetDrawingService),{shapeId:_0x6abd5c,flipH:_0xfc8f1e,flipV:_0xf1a350}=_0x502974,_0x18b0aa=_0xd19ced[_0x4068b1(0x204)]({'unitId':_0x52e807,'subUnitId':_0x4a6ae1,'drawingId':_0x6abd5c});if(!_0x18b0aa)return![];const _0x3ec937=_0x1a4e21['get'](SheetsShapeService)[_0x4068b1(0x19c)](_0x52e807,_0x4a6ae1,_0x6abd5c);if(!_0x3ec937)return![];const _0x42a2e6=_0x1a4e21[_0x4068b1(0x202)](ICommandService),_0x2c63b2=_0x1a4e21['get'](IUndoRedoService),_0x1860a8=_0x1a4e21[_0x4068b1(0x202)](SheetInterceptorService),_0x54cb6={..._0x18b0aa[_0x4068b1(0x1fc)]};if(_0xfc8f1e!==void 0x0)_0x54cb6['flipX']=!_0x54cb6[_0x4068b1(0x20e)];if(_0xf1a350!==void 0x0)_0x54cb6[_0x4068b1(0x1f8)]=!_0x54cb6['flipY'];const _0x1a7193=transformToDrawingPosition(_0x54cb6,_0x6271ac),_0x10315f=transformToAxisAlignPosition(_0x54cb6,_0x6271ac),_0x311607=_0x3ec937['getShapeType'](),_0x42d5b1=_0x3ec937[_0x4068b1(0x1a7)](),_0x31ce04={'unitId':_0x52e807,'subUnitId':_0x4a6ae1,'drawingId':_0x6abd5c,'drawingType':DrawingTypeEnum['DRAWING_SHAPE'],'sheetTransform':_0x1a7193,'transform':_0x54cb6,'data':{'shapeType':_0x311607,'shapeData':_0x42d5b1},'axisAlignSheetTransform':_0x10315f,'allowTransform':!![]},{undo:_0x3eed29,redo:_0x96a6a0,objects:_0x52dbb9}=_0xd19ced[_0x4068b1(0x181)]([_0x31ce04]),_0x2f1572=_0x1860a8['onCommandExecute']({'id':SetSheetDrawingCommand['id'],'params':{'unitId':_0x52e807,'drawings':[_0x31ce04]}}),_0x174d2d=[...(_0x2a6246=_0x2f1572[_0x4068b1(0x1d0)])!==null&&_0x2a6246!==void 0x0?_0x2a6246:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x52e807,'subUnitId':_0x4a6ae1,'op':_0x96a6a0,'objects':_0x52dbb9,'type':DrawingApplyType[_0x4068b1(0x1ae)]}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x52e807]},..._0x2f1572[_0x4068b1(0x1a5)]],_0xcf4f42=[...(_0x564540=_0x2f1572['preUndos'])!==null&&_0x564540!==void 0x0?_0x564540:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x52e807,'subUnitId':_0x4a6ae1,'op':_0x3eed29,'objects':_0x52dbb9,'type':DrawingApplyType[_0x4068b1(0x1ae)]}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x52e807]},..._0x2f1572['undos']];if(isConnectorShape(_0x311607)){const _0x1ce26d=_0x3ec937['getShapeRelation']();if(_0x1ce26d){const _0x5bff4c={..._0x1ce26d};_0x5bff4c[_0x4068b1(0x1b3)]=void 0x0,_0x5bff4c['to']=void 0x0,_0x174d2d[_0x4068b1(0x1bb)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x52e807,'subUnitId':_0x4a6ae1,'shapeId':_0x6abd5c,'shapeType':_0x311607,'shapeData':{'relation':_0x5bff4c}}}),_0xcf4f42[_0x4068b1(0x1bb)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x52e807,'subUnitId':_0x4a6ae1,'shapeId':_0x6abd5c,'shapeType':_0x311607,'shapeData':{'relation':_0x1ce26d}}});}}if(sequenceExecute(_0x174d2d,_0x42a2e6))return _0x2c63b2[_0x4068b1(0x1b0)]({'unitID':_0x52e807,'undoMutations':_0xcf4f42,'redoMutations':_0x174d2d}),!![];return![];}},SetSheetsShapeRotateCommand={'type':CommandType[_0xad074b(0x1b7)],'id':'sheet.command.set-shape-rotate','handler':(_0x596565,_0x41511e)=>{const _0x3d5073=_0xad074b;var _0x353d66,_0x419419;const _0x2d2e1d=getSheetCommandTarget(_0x596565[_0x3d5073(0x202)](IUniverInstanceService),_0x41511e);if(!_0x2d2e1d)return![];const _0x56ace1=_0x596565['get'](SheetSkeletonService),{unitId:_0x59ff20,subUnitId:_0x4b3517}=_0x2d2e1d,_0x494896=_0x56ace1[_0x3d5073(0x19f)](_0x59ff20,_0x4b3517);if(!_0x494896)return![];const _0x55ffd3=_0x596565[_0x3d5073(0x202)](ISheetDrawingService),{shapeId:_0x5ad801,rotate:_0x5e86b5}=_0x41511e,_0x3502be=_0x55ffd3['getDrawingByParam']({'unitId':_0x59ff20,'subUnitId':_0x4b3517,'drawingId':_0x5ad801});if(!_0x3502be)return![];const _0x2d4518=_0x596565['get'](SheetsShapeService)[_0x3d5073(0x19c)](_0x59ff20,_0x4b3517,_0x5ad801);if(!_0x2d4518)return![];const _0x567e59=_0x596565[_0x3d5073(0x202)](ICommandService),_0x5beb77=_0x596565[_0x3d5073(0x202)](IUndoRedoService),_0x4171b6=_0x596565['get'](SheetInterceptorService),_0x546912={..._0x3502be['transform']};if(_0x5e86b5!==void 0x0)_0x546912[_0x3d5073(0x205)]=(_0x546912[_0x3d5073(0x205)]||0x0)+_0x5e86b5;const _0x57e940=transformToDrawingPosition(_0x546912,_0x494896),_0x4709cd=transformToAxisAlignPosition(_0x546912,_0x494896),_0x5027f1=_0x2d4518[_0x3d5073(0x210)](),_0x3cbfb8=_0x2d4518[_0x3d5073(0x1a7)](),_0x175a79={'unitId':_0x59ff20,'subUnitId':_0x4b3517,'drawingId':_0x5ad801,'drawingType':DrawingTypeEnum[_0x3d5073(0x209)],'sheetTransform':_0x57e940,'transform':_0x546912,'data':{'shapeType':_0x5027f1,'shapeData':_0x3cbfb8},'axisAlignSheetTransform':_0x4709cd,'allowTransform':!![]},{undo:_0x5b1b54,redo:_0x14f14c,objects:_0x2cc892}=_0x55ffd3['getBatchUpdateOp']([_0x175a79]),_0x302dde=_0x4171b6[_0x3d5073(0x1a3)]({'id':SetSheetDrawingCommand['id'],'params':{'unitId':_0x59ff20,'drawings':[_0x175a79]}}),_0x50d93f=[...(_0x353d66=_0x302dde[_0x3d5073(0x1d0)])!==null&&_0x353d66!==void 0x0?_0x353d66:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x59ff20,'subUnitId':_0x4b3517,'op':_0x14f14c,'objects':_0x2cc892,'type':DrawingApplyType[_0x3d5073(0x1ae)]}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x59ff20]},..._0x302dde['redos']],_0x43daac=[...(_0x419419=_0x302dde[_0x3d5073(0x1c9)])!==null&&_0x419419!==void 0x0?_0x419419:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x59ff20,'subUnitId':_0x4b3517,'op':_0x5b1b54,'objects':_0x2cc892,'type':DrawingApplyType[_0x3d5073(0x1ae)]}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x59ff20]},..._0x302dde[_0x3d5073(0x18f)]];if(sequenceExecute(_0x50d93f,_0x567e59))return _0x5beb77[_0x3d5073(0x1b0)]({'unitID':_0x59ff20,'undoMutations':_0x43daac,'redoMutations':_0x50d93f}),!![];return![];}},SetSheetsShapeTextVerticalToggleCommand={'type':CommandType['COMMAND'],'id':'sheet.command.set-shape-text-vertical-toggle','handler':(_0x271937,_0x195d88)=>{const _0x568709=_0xad074b;var _0xcbb846;const _0x420067=getSheetCommandTarget(_0x271937[_0x568709(0x202)](IUniverInstanceService),_0x195d88);if(!_0x420067)return![];const {unitId:_0x544b19,subUnitId:_0x5aa0ba}=_0x420067,{shapeId:_0x179908}=_0x195d88,_0xd2a2f3=_0x271937[_0x568709(0x202)](SheetsShapeService)[_0x568709(0x19c)](_0x544b19,_0x5aa0ba,_0x179908);if(!_0xd2a2f3)return![];const _0x52d429=_0xd2a2f3['getShapeTextData'](),_0xd5c2d9=(_0xcbb846=_0x52d429===null||_0x52d429===void 0x0?void 0x0:_0x52d429[_0x568709(0x1cb)])!==null&&_0xcbb846!==void 0x0?_0xcbb846:!![],_0x3fc308=!_0xd5c2d9,_0x207688=_0x271937[_0x568709(0x202)](ICommandService),_0x48cd21=_0x271937[_0x568709(0x202)](IUndoRedoService),_0x36008b={'unitId':_0x544b19,'subUnitId':_0x5aa0ba,'shapeId':_0x179908,'shapeData':{'shapeText':{'isHorizontal':_0x3fc308}}},_0x36f903={'unitId':_0x544b19,'subUnitId':_0x5aa0ba,'shapeId':_0x179908,'shapeData':{'shapeText':{'isHorizontal':_0xd5c2d9}}},_0x2714cf=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x36008b}],_0x58adaa=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x36f903}];if(sequenceExecute(_0x2714cf,_0x207688))return _0x48cd21['pushUndoRedo']({'unitID':_0x544b19,'undoMutations':_0x58adaa,'redoMutations':_0x2714cf}),!![];return![];}},UpdateConnectorRelationCommand={'type':CommandType[_0xad074b(0x1b7)],'id':_0xad074b(0x1d8),'handler':(_0x542ae8,_0x363f6f)=>{const _0x157d72=_0xad074b;var _0x1aa744,_0x41e476,_0x23141f,_0x499900;const _0x448cc7=getSheetCommandTarget(_0x542ae8['get'](IUniverInstanceService),_0x363f6f);if(!_0x448cc7)return![];const _0x89f51d=_0x542ae8[_0x157d72(0x202)](SheetSkeletonService),{unitId:_0x5c044f,subUnitId:_0x4f5c8b}=_0x448cc7,_0x5b7f2d=_0x89f51d[_0x157d72(0x19f)](_0x5c044f,_0x4f5c8b);if(!_0x5b7f2d)return![];const _0x4a568b=_0x542ae8[_0x157d72(0x202)](ISheetDrawingService),{connectorShapeId:_0x4e51f1,width:_0x1d12a0,height:_0x70a159,left:_0x4b9475,top:_0x474284,flipX:_0x5b2289,flipY:_0x509683,rotation:_0x55e1be,oldAdjustValues:_0x360d25,newAdjustValues:_0x20d677,oldLineType:_0x12e0e3,newLineType:_0x3b986f,oldRelation:_0x1f836d,newRelation:_0x59e7c9}=_0x363f6f,_0x50d6f3=_0x4a568b[_0x157d72(0x204)]({'unitId':_0x5c044f,'subUnitId':_0x4f5c8b,'drawingId':_0x4e51f1});if(!_0x50d6f3)return![];const _0x2b83be=_0x542ae8[_0x157d72(0x202)](SheetsShapeService)[_0x157d72(0x19c)](_0x5c044f,_0x4f5c8b,_0x4e51f1);if(!_0x2b83be)return![];const _0xd27796=_0x542ae8[_0x157d72(0x202)](ICommandService),_0x365b60=_0x542ae8[_0x157d72(0x202)](IUndoRedoService),_0x5495e2=_0x542ae8[_0x157d72(0x202)](SheetInterceptorService),_0x4ae683={..._0x50d6f3[_0x157d72(0x1fc)],'width':_0x1d12a0,'height':_0x70a159,'left':_0x4b9475,'top':_0x474284,'flipX':_0x5b2289,'flipY':_0x509683,'angle':(_0x1aa744=_0x55e1be!==null&&_0x55e1be!==void 0x0?_0x55e1be:(_0x41e476=_0x50d6f3['transform'])===null||_0x41e476===void 0x0?void 0x0:_0x41e476['angle'])!==null&&_0x1aa744!==void 0x0?_0x1aa744:0x0},_0x2054c8=transformToDrawingPosition(_0x4ae683,_0x5b7f2d),_0x5c6d9c=transformToAxisAlignPosition(_0x4ae683,_0x5b7f2d),_0x4db4a0=_0x2b83be[_0x157d72(0x210)](),_0x307f8b=_0x2b83be[_0x157d72(0x1a7)](),_0x2ecc1a={'unitId':_0x5c044f,'subUnitId':_0x4f5c8b,'drawingId':_0x4e51f1,'drawingType':DrawingTypeEnum[_0x157d72(0x209)],'sheetTransform':_0x2054c8,'transform':_0x4ae683,'data':{'shapeType':_0x3b986f||_0x12e0e3||_0x4db4a0,'shapeData':{..._0x307f8b,'adjustValues':_0x20d677||_0x360d25||(_0x307f8b===null||_0x307f8b===void 0x0?void 0x0:_0x307f8b[_0x157d72(0x197)]),'relation':_0x59e7c9||_0x1f836d||(_0x307f8b===null||_0x307f8b===void 0x0?void 0x0:_0x307f8b[_0x157d72(0x215)])}},'axisAlignSheetTransform':_0x5c6d9c,'allowTransform':!![]},{undo:_0x5f14b8,redo:_0x42d5b0,objects:_0x8a1b6d}=_0x4a568b[_0x157d72(0x181)]([_0x2ecc1a]),_0x2e9b8a=_0x5495e2[_0x157d72(0x1a3)]({'id':SetSheetDrawingCommand['id'],'params':{'unitId':_0x5c044f,'drawings':[_0x2ecc1a]}}),_0x337451=[...(_0x23141f=_0x2e9b8a[_0x157d72(0x1d0)])!==null&&_0x23141f!==void 0x0?_0x23141f:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x5c044f,'subUnitId':_0x4f5c8b,'op':_0x42d5b0,'objects':_0x8a1b6d,'type':DrawingApplyType['UPDATE']}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x5c044f]},..._0x2e9b8a['redos'],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x5c044f,'subUnitId':_0x4f5c8b,'shapeId':_0x4e51f1,'shapeType':_0x3b986f,'shapeData':{'adjustValues':_0x20d677,'relation':_0x59e7c9}}}],_0x37533c=[...(_0x499900=_0x2e9b8a[_0x157d72(0x1c9)])!==null&&_0x499900!==void 0x0?_0x499900:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x5c044f,'subUnitId':_0x4f5c8b,'op':_0x5f14b8,'objects':_0x8a1b6d,'type':DrawingApplyType['UPDATE']}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x5c044f]},..._0x2e9b8a[_0x157d72(0x18f)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x5c044f,'subUnitId':_0x4f5c8b,'shapeId':_0x4e51f1,'shapeType':_0x4db4a0,'shapeData':{..._0x307f8b,'adjustValues':_0x360d25||(_0x307f8b===null||_0x307f8b===void 0x0?void 0x0:_0x307f8b[_0x157d72(0x197)]),'relation':_0x1f836d||(_0x307f8b===null||_0x307f8b===void 0x0?void 0x0:_0x307f8b[_0x157d72(0x215)])}}}];if(sequenceExecute(_0x337451,_0xd27796))return _0x365b60[_0x157d72(0x1b0)]({'unitID':_0x5c044f,'undoMutations':_0x37533c,'redoMutations':_0x337451}),!![];return![];}},UpdateLineShapeResizeCommand={'type':CommandType[_0xad074b(0x1b7)],'id':'sheet.command.update-line-shape-resize','handler':(_0x1f931a,_0x556910)=>{const _0x46ab89=_0xad074b;var _0x33a5d0,_0x533d81;const _0x1f2d60=getSheetCommandTarget(_0x1f931a[_0x46ab89(0x202)](IUniverInstanceService),_0x556910);if(!_0x1f2d60)return![];const _0x46505c=_0x1f931a['get'](SheetSkeletonService),{unitId:_0x41f716,subUnitId:_0x358bf0}=_0x1f2d60,_0x38c351=_0x46505c[_0x46ab89(0x19f)](_0x41f716,_0x358bf0);if(!_0x38c351)return![];const _0x280cde=_0x1f931a[_0x46ab89(0x202)](ISheetDrawingService),{shapeId:_0x398cad,width:_0x1879cc,height:_0x2674fc,left:_0x49143e,top:_0x3c6913,flipX:_0x50795f,flipY:_0x3f3a58,angle:_0x3702d9,oldAdjustValues:_0xd6d59c,newAdjustValues:_0xf2a74c,oldLineType:_0x475cfb,newLineType:_0x3b1945}=_0x556910,_0x369d0f=_0x280cde[_0x46ab89(0x204)]({'unitId':_0x41f716,'subUnitId':_0x358bf0,'drawingId':_0x398cad});if(!_0x369d0f)return![];const _0x66aefa=_0x1f931a[_0x46ab89(0x202)](SheetsShapeService)[_0x46ab89(0x19c)](_0x41f716,_0x358bf0,_0x398cad);if(!_0x66aefa)return![];const _0xbd9c40=_0x1f931a[_0x46ab89(0x202)](ICommandService),_0x42c0d4=_0x1f931a[_0x46ab89(0x202)](IUndoRedoService),_0x50b49a=_0x1f931a['get'](SheetInterceptorService),_0x5d8370={..._0x369d0f['transform'],'width':_0x1879cc,'height':_0x2674fc,'left':_0x49143e,'top':_0x3c6913,'flipX':_0x50795f,'flipY':_0x3f3a58,'angle':_0x3702d9},_0x5565c8=transformToDrawingPosition(_0x5d8370,_0x38c351),_0x340d00=transformToAxisAlignPosition(_0x5d8370,_0x38c351),_0x12ed20=_0x66aefa[_0x46ab89(0x210)](),_0x47e0fc=_0x66aefa[_0x46ab89(0x1a7)](),_0x48aba3={'unitId':_0x41f716,'subUnitId':_0x358bf0,'drawingId':_0x398cad,'drawingType':DrawingTypeEnum['DRAWING_SHAPE'],'sheetTransform':_0x5565c8,'transform':_0x5d8370,'data':{'shapeType':_0x3b1945||_0x475cfb||_0x12ed20,'shapeData':{..._0x47e0fc,'adjustValues':_0xf2a74c||_0xd6d59c||(_0x47e0fc===null||_0x47e0fc===void 0x0?void 0x0:_0x47e0fc[_0x46ab89(0x197)])}},'axisAlignSheetTransform':_0x340d00,'allowTransform':!![]},{undo:_0xa2fb2d,redo:_0x16ac82,objects:_0x2cae48}=_0x280cde[_0x46ab89(0x181)]([_0x48aba3]),_0x49646d=_0x50b49a[_0x46ab89(0x1a3)]({'id':SetSheetDrawingCommand['id'],'params':{'unitId':_0x41f716,'drawings':[_0x48aba3]}}),_0x2a108d=[...(_0x33a5d0=_0x49646d[_0x46ab89(0x1d0)])!==null&&_0x33a5d0!==void 0x0?_0x33a5d0:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x41f716,'subUnitId':_0x358bf0,'op':_0x16ac82,'objects':_0x2cae48,'type':DrawingApplyType[_0x46ab89(0x1ae)]}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x41f716]},..._0x49646d['redos'],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x41f716,'subUnitId':_0x358bf0,'shapeId':_0x398cad,'shapeType':_0x3b1945,'shapeData':{'adjustValues':_0xf2a74c}}}],_0x3da9e7=[...(_0x533d81=_0x49646d[_0x46ab89(0x1c9)])!==null&&_0x533d81!==void 0x0?_0x533d81:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x41f716,'subUnitId':_0x358bf0,'op':_0xa2fb2d,'objects':_0x2cae48,'type':DrawingApplyType[_0x46ab89(0x1ae)]}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x41f716]},..._0x49646d[_0x46ab89(0x18f)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x41f716,'subUnitId':_0x358bf0,'shapeId':_0x398cad,'shapeType':_0x12ed20,'shapeData':{..._0x47e0fc,'adjustValues':_0xd6d59c||(_0x47e0fc===null||_0x47e0fc===void 0x0?void 0x0:_0x47e0fc[_0x46ab89(0x197)])}}}];if(sequenceExecute(_0x2a108d,_0xbd9c40))return _0x42c0d4['pushUndoRedo']({'unitID':_0x41f716,'undoMutations':_0x3da9e7,'redoMutations':_0x2a108d}),!![];return![];}},UpdateSheetsShapeTypeMutation={'id':_0xad074b(0x19b),'type':CommandType[_0xad074b(0x1e4)],'handler':(_0x49fb38,_0x22ab35)=>{const _0x2df1ae=_0xad074b,{unitId:_0x5a7047,subUnitId:_0x4d9f9a,shapeType:_0x3ff406,shapeId:_0x4d38ad,shapeData:_0x42ccd7}=_0x22ab35,_0x551fc8=_0x49fb38[_0x2df1ae(0x202)](SheetsShapeService)[_0x2df1ae(0x19c)](_0x5a7047,_0x4d9f9a,_0x4d38ad);if(_0x551fc8){_0x551fc8[_0x2df1ae(0x20a)](_0x3ff406);if(_0x42ccd7)_0x551fc8===null||_0x551fc8===void 0x0||_0x551fc8[_0x2df1ae(0x1e2)](_0x42ccd7);}return!![];}},UpdateSheetsShapeTypeCommand={'id':'sheet.command.update-shape-type','type':CommandType[_0xad074b(0x1b7)],'handler':(_0x2be6f2,_0x372c57)=>{const _0x288506=_0xad074b;if(!_0x372c57)return![];const _0x3c70c0=_0x2be6f2[_0x288506(0x202)](ICommandService),_0x19fc32=_0x2be6f2['get'](SheetsShapeService),_0x463337=_0x2be6f2[_0x288506(0x202)](IUndoRedoService),_0x17a0d9=[],_0x4b1ca5=[],{unitId:_0xee7343,subUnitId:_0x2b7aab,shapeId:_0x45472c,shapeType:_0x560120,shapeData:_0x4257e4}=_0x372c57,_0x52d31f=_0x19fc32[_0x288506(0x19c)](_0xee7343,_0x2b7aab,_0x45472c);if(_0x52d31f){const _0x3ea21a=_0x52d31f[_0x288506(0x210)](),_0x56ae65=Object['assign']({},_0x52d31f['getShapeData']()),_0x487547={'unitId':_0xee7343,'subUnitId':_0x2b7aab,'shapeId':_0x45472c,'shapeType':_0x560120,'shapeData':_0x4257e4},_0x53fb3a={'unitId':_0xee7343,'subUnitId':_0x2b7aab,'shapeId':_0x45472c,'shapeType':_0x3ea21a,'shapeData':_0x56ae65};_0x17a0d9[_0x288506(0x1bb)]({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x487547}),_0x4b1ca5[_0x288506(0x1bb)]({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x53fb3a});if(_0x17a0d9[_0x288506(0x1eb)](_0xf95997=>_0x3c70c0[_0x288506(0x208)](_0xf95997['id'],_0xf95997[_0x288506(0x193)])))_0x463337[_0x288506(0x1b0)]({'unitID':_0xee7343,'redoMutations':[..._0x17a0d9],'undoMutations':[..._0x4b1ca5]});return!![];}return![];}};var name=_0xad074b(0x1e7),version='0.21.0';const SHEETS_SHAPE_PLUGIN_CONFIG_KEY=_0xad074b(0x1c2),configSymbol=Symbol(SHEETS_SHAPE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let SheetsShapeController=class SheetsShapeController extends Disposable{constructor(_0x5fea3a,_0x3290f4,_0xc79a14,_0x48d22e,_0xeca14c){const _0x23598c=_0xad074b;super(),this['_commandService']=_0x5fea3a,this[_0x23598c(0x185)]=_0x3290f4,this[_0x23598c(0x207)]=_0xc79a14,this['_sheetsShapeService']=_0x48d22e,this['_drawingManagerService']=_0xeca14c,this[_0x23598c(0x1cf)](),this['_initCommandInterceptor']();}[_0xad074b(0x1cf)](){const _0xc69841=_0xad074b;[InsertShapeCommand,SetShapeDrawingDataCommand,ToggleSheetsShapeFlipCommand,SetSheetsShapeRotateCommand,SetSheetsShapeTextVerticalToggleCommand,UpdateConnectorRelationCommand,UpdateLineShapeResizeCommand,InsertSheetsShapeMutation,RemoveSheetsShapeMutation,UpdateSheetsShapeTypeMutation,UpdateSheetsShapeDataMutation][_0xc69841(0x1d2)](_0x5ae6cb=>this[_0xc69841(0x1ee)](this[_0xc69841(0x18d)][_0xc69841(0x1ef)](_0x5ae6cb)));}[_0xad074b(0x1d5)](){const _0x174be1=_0xad074b;this[_0x174be1(0x1ee)](this[_0x174be1(0x185)][_0x174be1(0x1b1)]({'getMutations':_0x4ef401=>{const _0x4f0220=_0x174be1;if(_0x4ef401['id']===RemoveSheetDrawingCommand['id']){const {drawings:_0xf7e441}=_0x4ef401[_0x4f0220(0x193)],_0xb4f78e=_0xf7e441[_0x4f0220(0x1fe)](_0x345320=>_0x345320[_0x4f0220(0x219)]===DrawingTypeEnum['DRAWING_SHAPE']);if(_0xb4f78e[_0x4f0220(0x1ce)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x1538c1=[],_0x5390f6=[];return _0xb4f78e[_0x4f0220(0x1d2)](_0x4a47e4=>{const _0x4ff7e4=_0x4f0220,{unitId:_0x4247ef,subUnitId:_0x30202b,drawingId:_0x5c0e56}=_0x4a47e4,_0x410d45=this['_sheetsShapeService']['getShapeModel'](_0x4247ef,_0x30202b,_0x5c0e56);if(!_0x410d45)throw new TypeError(_0x4ff7e4(0x186)+_0x410d45);_0x1538c1[_0x4ff7e4(0x1bb)]({'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x4247ef,'subUnitId':_0x30202b,'shapeId':_0x5c0e56}}),_0x5390f6[_0x4ff7e4(0x1bb)]({'id':InsertSheetsShapeMutation['id'],'params':{'unitId':_0x4247ef,'subUnitId':_0x30202b,'shapeId':_0x5c0e56,'shapeType':_0x410d45['getShapeType'](),'shapeData':_0x410d45[_0x4ff7e4(0x1a7)]()}});const _0x5d3274=this[_0x4ff7e4(0x18c)][_0x4ff7e4(0x1e5)](_0x4247ef,_0x30202b,_0x5c0e56);if(_0x5d3274)for(const _0x2138a5 of _0x5d3274){const _0x3c0fe4=_0x2138a5[_0x4ff7e4(0x1e9)],_0x5c8b69=_0x2138a5['isFrom'],_0x5c8601=_0x5c8b69?{'from':void 0x0}:{'to':void 0x0},_0x373589=_0x5c8b69?{'from':{'shapeId':_0x2138a5[_0x4ff7e4(0x1d3)],'cxnIndex':_0x2138a5['cxnIndex']}}:{'to':{'shapeId':_0x2138a5['shapeId'],'cxnIndex':_0x2138a5[_0x4ff7e4(0x18b)]}};_0x1538c1['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x4247ef,'subUnitId':_0x30202b,'shapeId':_0x3c0fe4,'shapeData':{'relation':_0x5c8601}}}),_0x5390f6['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x4247ef,'subUnitId':_0x30202b,'shapeId':_0x3c0fe4,'shapeData':{'relation':_0x373589}}});}}),{'preRedos':_0x1538c1,'redos':[],'preUndos':[],'undos':_0x5390f6};}if(_0x4ef401['id']===SetSheetDrawingCommand['id']){const {drawings:_0x48d21e}=_0x4ef401[_0x4f0220(0x193)],_0x20326c=_0x48d21e[_0x4f0220(0x1fe)](_0x3e83c6=>_0x3e83c6[_0x4f0220(0x219)]===DrawingTypeEnum[_0x4f0220(0x209)]);if(_0x20326c[_0x4f0220(0x1ce)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x271dd0=[],_0x9c101b=[];for(const _0xf8eb4d of _0x20326c){const {unitId:_0x3c6b3e,subUnitId:_0xf9482,drawingId:_0x590098,transform:_0xba7d32}=_0xf8eb4d;if(!_0x3c6b3e||!_0xf9482||!_0x590098||!_0xba7d32)continue;const _0x5d000d=this['_sheetsShapeService']['getShapeModel'](_0x3c6b3e,_0xf9482,_0x590098);if(!_0x5d000d)throw new TypeError(_0x4f0220(0x186)+_0x5d000d);if(isConnectorShape(_0x5d000d[_0x4f0220(0x210)]())){const _0x587625=this[_0x4f0220(0x18c)][_0x4f0220(0x1f9)](_0x3c6b3e,_0xf9482,_0x590098),_0x335543={'from':void 0x0,'to':void 0x0};_0x587625&&(_0x271dd0['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x3c6b3e,'subUnitId':_0xf9482,'shapeId':_0x590098,'shapeData':{'relation':_0x335543}}}),_0x9c101b[_0x4f0220(0x1bb)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x3c6b3e,'subUnitId':_0xf9482,'shapeId':_0x590098,'shapeData':{'relation':_0x587625}}}));}else{const _0x48059e=this[_0x4f0220(0x18c)][_0x4f0220(0x1e5)](_0x3c6b3e,_0xf9482,_0x590098);if(_0x48059e&&_0x48059e['length']>0x0)for(const _0x231877 of _0x48059e){const _0x15174d=_0x231877['lineShapeId'],_0x5dc512=_0x231877[_0x4f0220(0x1cd)],_0x1e6389=this[_0x4f0220(0x18c)][_0x4f0220(0x19c)](_0x3c6b3e,_0xf9482,_0x15174d);if(!_0x1e6389)continue;const _0x4b63a9=_0x1e6389['getStartConnectInfo'](),_0x309790=_0x1e6389[_0x4f0220(0x1ed)]();if(_0x4b63a9&&_0x309790)this[_0x4f0220(0x187)](_0x3c6b3e,_0xf9482,_0x15174d,_0x1e6389,_0x4b63a9,_0x309790,_0x271dd0,_0x9c101b,_0x590098,_0xba7d32);else this['_addLineFollowShapeUpdates'](_0x3c6b3e,_0xf9482,_0x15174d,_0x1e6389,_0x5dc512?_0x4b63a9:_0x309790,_0x5dc512,_0x271dd0,_0x9c101b,_0x590098,_0xba7d32);}}}return{'preRedos':[],'redos':_0x271dd0,'preUndos':_0x9c101b,'undos':[]};}return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};}}));}[_0xad074b(0x1f0)](_0x326f5d,_0x5e62c6,_0x1e3a30,_0x51a9d7,_0x2773b5){const _0x3c81fe=_0xad074b;if(!_0x5e62c6||!_0x1e3a30)return null;const {shapeId:_0x7eee7,cxnIndex:_0x533c7e}=_0x326f5d,_0x59c6fe=this[_0x3c81fe(0x18c)][_0x3c81fe(0x19c)](_0x5e62c6,_0x1e3a30,_0x7eee7);if(!_0x59c6fe)return null;const _0x161865=this[_0x3c81fe(0x20f)][_0x3c81fe(0x204)]({'unitId':_0x5e62c6,'subUnitId':_0x1e3a30,'drawingId':_0x7eee7});if(!(_0x161865===null||_0x161865===void 0x0?void 0x0:_0x161865[_0x3c81fe(0x1fc)]))return null;let {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x1c6113}=_0x161865[_0x3c81fe(0x1fc)];if(_0x2773b5&&_0x51a9d7===_0x7eee7){var _0x4ba582,_0x119974,_0x227e64,_0x31c371,_0x59a5d0,_0x372b98,_0x10dfef;left=(_0x4ba582=_0x2773b5[_0x3c81fe(0x1a6)])!==null&&_0x4ba582!==void 0x0?_0x4ba582:left,top=(_0x119974=_0x2773b5[_0x3c81fe(0x180)])!==null&&_0x119974!==void 0x0?_0x119974:top,width=(_0x227e64=_0x2773b5[_0x3c81fe(0x216)])!==null&&_0x227e64!==void 0x0?_0x227e64:width,height=(_0x31c371=_0x2773b5[_0x3c81fe(0x17f)])!==null&&_0x31c371!==void 0x0?_0x31c371:height,flipX=(_0x59a5d0=_0x2773b5[_0x3c81fe(0x20e)])!==null&&_0x59a5d0!==void 0x0?_0x59a5d0:flipX,flipY=(_0x372b98=_0x2773b5[_0x3c81fe(0x1f8)])!==null&&_0x372b98!==void 0x0?_0x372b98:flipY,_0x1c6113=(_0x10dfef=_0x2773b5[_0x3c81fe(0x205)])!==null&&_0x10dfef!==void 0x0?_0x10dfef:_0x1c6113;}_0x59c6fe[_0x3c81fe(0x19e)]({'width':width,'height':height});const _0x194f0f=_0x59c6fe[_0x3c81fe(0x1e8)]()[_0x3c81fe(0x1de)](_0x13e2d5=>_0x13e2d5[_0x3c81fe(0x1ad)]===_0x533c7e);if(!_0x194f0f)return null;let _0x5d6a95=flipX?width-_0x194f0f['x']:_0x194f0f['x'],_0x556737=flipY?height-_0x194f0f['y']:_0x194f0f['y'];if(_0x1c6113!==0x0&&_0x1c6113!==void 0x0&&_0x1c6113!==null){const _0x352c6a=_0x1c6113*Math['PI']/0xb4,_0xa8b2c2=Math['cos'](_0x352c6a),_0x4e6cff=Math[_0x3c81fe(0x1fd)](_0x352c6a),_0x4cfc0c=width/0x2,_0x1c4595=height/0x2,_0x5aaa5f=_0x5d6a95-_0x4cfc0c,_0x4c46a3=_0x556737-_0x1c4595;_0x5d6a95=_0x4cfc0c+_0x5aaa5f*_0xa8b2c2-_0x4c46a3*_0x4e6cff,_0x556737=_0x1c4595+_0x5aaa5f*_0x4e6cff+_0x4c46a3*_0xa8b2c2;}_0x5d6a95+=left,_0x556737+=top;let _0x122f97=_0x194f0f[_0x3c81fe(0x1a4)]/0xea60;if(flipX)_0x122f97=0xb4-_0x122f97;if(flipY)_0x122f97=-_0x122f97;_0x122f97+=_0x1c6113||0x0,_0x122f97=(_0x122f97%0x168+0x168)%0x168;const _0x129e2b=getBasicShapeRotateBound({'left':left,'top':top,'width':width,'height':height},_0x1c6113||0x0);return{'point':{'x':_0x5d6a95,'y':_0x556737},'angle':_0x122f97,'bounds':_0x129e2b};}[_0xad074b(0x187)](_0x28905d,_0x352c5a,_0x3fa44c,_0x20f8d1,_0x263f50,_0x59ecc2,_0x3fe224,_0x56e789,_0x38291f,_0x230d21){const _0x17bb3a=_0xad074b,_0x367717=this[_0x17bb3a(0x207)][_0x17bb3a(0x19f)](_0x28905d,_0x352c5a);if(!_0x367717)return;const _0x5ecc4e=_0x20f8d1['getShapeRelation'](),_0x576bca=_0x20f8d1['getAdjustNames'](),_0x1af4c9={},_0xda4f45={};_0x576bca[_0x17bb3a(0x1d2)](_0x25eb58=>{const _0x3c4608=_0x17bb3a,_0x4036a6=_0x20f8d1[_0x3c4608(0x1d1)](_0x25eb58);_0xda4f45[_0x25eb58]=_0x4036a6!==null&&_0x4036a6!==void 0x0?_0x4036a6:0x0;});const _0x3662dd=this['_getConnectPointInfo'](_0x263f50,_0x28905d,_0x352c5a,_0x38291f,_0x230d21),_0x571615=this[_0x17bb3a(0x1f0)](_0x59ecc2,_0x28905d,_0x352c5a,_0x38291f,_0x230d21);if(_0x3662dd&&_0x571615){const _0x3d46b4=_0x20f8d1[_0x17bb3a(0x210)](),_0x46019b=routeConnectorLineShape(_0x3662dd,_0x571615,_0x3d46b4);let _0x4a629a=_0x3d46b4;if(_0x46019b){const _0x52d9ca=computeConnectorRouteLayout(_0x46019b,_0x20f8d1[_0x17bb3a(0x210)]()),_0x602312=this[_0x17bb3a(0x20f)]['getDrawingData'](_0x28905d,_0x352c5a);if(_0x602312&&_0x602312[_0x3fa44c]){const _0x325af9=_0x602312[_0x3fa44c];_0x4a629a=_0x52d9ca[_0x17bb3a(0x194)];for(const [_0x125c5c,_0xa9ebba]of Object['entries'](_0x52d9ca['adjustValues']))_0x1af4c9[_0x125c5c]=_0xa9ebba;const _0x191991={..._0x325af9['transform'],'width':_0x52d9ca[_0x17bb3a(0x217)][_0x17bb3a(0x216)],'height':_0x52d9ca['worldRect'][_0x17bb3a(0x17f)],'left':_0x52d9ca['worldRect']['left'],'top':_0x52d9ca[_0x17bb3a(0x217)]['top'],'flipX':_0x52d9ca[_0x17bb3a(0x217)][_0x17bb3a(0x20e)],'flipY':_0x52d9ca['worldRect']['flipY'],'angle':_0x52d9ca[_0x17bb3a(0x1dc)]},_0x173316=transformToDrawingPosition(_0x191991,_0x367717),_0x22b1bb=transformToAxisAlignPosition(_0x191991,_0x367717),_0x1095b1={'unitId':_0x28905d,'subUnitId':_0x352c5a,'drawingType':DrawingTypeEnum[_0x17bb3a(0x209)],'drawingId':_0x3fa44c,'transform':_0x191991,'sheetTransform':_0x173316,'axisAlignSheetTransform':_0x22b1bb},{unitId:_0x333fe3,subUnitId:_0x8d762,undo:_0x99ba3e,redo:_0x3aa976,objects:_0x4f4754}=this['_drawingManagerService']['getBatchUpdateOp']([_0x1095b1]);_0x3fe224[_0x17bb3a(0x1bb)]({'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x333fe3,'subUnitId':_0x8d762,'op':_0x3aa976,'objects':_0x4f4754,'type':DrawingApplyType[_0x17bb3a(0x1ae)]}}),_0x56e789[_0x17bb3a(0x1bb)]({'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x333fe3,'subUnitId':_0x8d762,'op':_0x99ba3e,'objects':_0x4f4754,'type':DrawingApplyType[_0x17bb3a(0x1ae)]}});}_0x20f8d1['removeLinePoints']();}_0x3fe224[_0x17bb3a(0x1bb)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x28905d,'subUnitId':_0x352c5a,'shapeId':_0x3fa44c,'shapeType':_0x4a629a,'shapeData':{'adjustValues':_0x1af4c9,'relation':_0x5ecc4e}}}),_0x56e789['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x28905d,'subUnitId':_0x352c5a,'shapeId':_0x3fa44c,'shapeType':_0x3d46b4,'shapeData':{'adjustValues':_0xda4f45,'relation':_0x5ecc4e}}});}}[_0xad074b(0x1b9)](_0x54e7cc,_0x2d1ea7,_0x5e4f6e,_0x144a5c,_0x6d213a,_0x3105d3,_0x3f60a7,_0x109f2c,_0x14d08c,_0x3e75f5){const _0x2ec304=_0xad074b;var _0x40b2a1;if(!_0x6d213a)return;const _0x589731=this[_0x2ec304(0x207)][_0x2ec304(0x19f)](_0x54e7cc,_0x2d1ea7);if(!_0x589731)return;const _0x3fa545=(_0x40b2a1=this[_0x2ec304(0x20f)][_0x2ec304(0x204)]({'unitId':_0x54e7cc,'subUnitId':_0x2d1ea7,'drawingId':_0x14d08c}))===null||_0x40b2a1===void 0x0?void 0x0:_0x40b2a1[_0x2ec304(0x1fc)];if(!_0x3fa545)return;const _0xfcef72=_0x3fa545[_0x2ec304(0x1a6)]!==_0x3e75f5[_0x2ec304(0x1a6)]||_0x3fa545['top']!==_0x3e75f5[_0x2ec304(0x180)],_0x59d8f6=_0x3fa545[_0x2ec304(0x216)]!==_0x3e75f5[_0x2ec304(0x216)]||_0x3fa545[_0x2ec304(0x17f)]!==_0x3e75f5[_0x2ec304(0x17f)],_0x40cf5c=_0x3fa545[_0x2ec304(0x20e)]!==_0x3e75f5[_0x2ec304(0x20e)]||_0x3fa545[_0x2ec304(0x1f8)]!==_0x3e75f5[_0x2ec304(0x1f8)],_0x154d28=_0x3fa545[_0x2ec304(0x205)]!==_0x3e75f5[_0x2ec304(0x205)];if(_0xfcef72&&!_0x59d8f6&&!_0x40cf5c&&!_0x154d28){var _0x21da39,_0x26e160,_0x7e7346,_0x279688;const _0x2051e0=((_0x21da39=_0x3e75f5[_0x2ec304(0x1a6)])!==null&&_0x21da39!==void 0x0?_0x21da39:0x0)-((_0x26e160=_0x3fa545[_0x2ec304(0x1a6)])!==null&&_0x26e160!==void 0x0?_0x26e160:0x0),_0x53d380=((_0x7e7346=_0x3e75f5[_0x2ec304(0x180)])!==null&&_0x7e7346!==void 0x0?_0x7e7346:0x0)-((_0x279688=_0x3fa545[_0x2ec304(0x180)])!==null&&_0x279688!==void 0x0?_0x279688:0x0),_0x3b0e3f=this[_0x2ec304(0x20f)][_0x2ec304(0x1f6)](_0x54e7cc,_0x2d1ea7);if(_0x3b0e3f&&_0x3b0e3f[_0x5e4f6e]){var _0x2fc099,_0x4983ed,_0xf37c58,_0x105eb0;const _0x4294f7=_0x3b0e3f[_0x5e4f6e],_0x23fd47={..._0x4294f7['transform'],'left':((_0x2fc099=(_0x4983ed=_0x4294f7[_0x2ec304(0x1fc)])===null||_0x4983ed===void 0x0?void 0x0:_0x4983ed[_0x2ec304(0x1a6)])!==null&&_0x2fc099!==void 0x0?_0x2fc099:0x0)+_0x2051e0,'top':((_0xf37c58=(_0x105eb0=_0x4294f7[_0x2ec304(0x1fc)])===null||_0x105eb0===void 0x0?void 0x0:_0x105eb0[_0x2ec304(0x180)])!==null&&_0xf37c58!==void 0x0?_0xf37c58:0x0)+_0x53d380},_0x191517=transformToDrawingPosition(_0x23fd47,_0x589731),_0x3d3234=transformToAxisAlignPosition(_0x23fd47,_0x589731),_0x39fe7d={'unitId':_0x54e7cc,'subUnitId':_0x2d1ea7,'drawingType':DrawingTypeEnum[_0x2ec304(0x209)],'drawingId':_0x5e4f6e,'transform':_0x23fd47,'sheetTransform':_0x191517,'axisAlignSheetTransform':_0x3d3234},{unitId:_0x2f08e9,subUnitId:_0xe90e44,undo:_0x13c9fe,redo:_0x319e16,objects:_0x4f939d}=this['_drawingManagerService'][_0x2ec304(0x181)]([_0x39fe7d]);_0x3f60a7['push']({'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x2f08e9,'subUnitId':_0xe90e44,'op':_0x319e16,'objects':_0x4f939d,'type':DrawingApplyType[_0x2ec304(0x1ae)]}}),_0x109f2c['push']({'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x2f08e9,'subUnitId':_0xe90e44,'op':_0x13c9fe,'objects':_0x4f939d,'type':DrawingApplyType['UPDATE']}});}}else{const _0x12a8c5=_0x144a5c[_0x2ec304(0x1a0)](),_0x3dd990=_0x144a5c[_0x2ec304(0x1ed)]();this[_0x2ec304(0x187)](_0x54e7cc,_0x2d1ea7,_0x5e4f6e,_0x144a5c,_0x12a8c5,_0x3dd990,_0x3f60a7,_0x109f2c,_0x14d08c,_0x3e75f5);}}};SheetsShapeController=__decorate([__decorateParam(0x0,ICommandService),__decorateParam(0x1,Inject(SheetInterceptorService)),__decorateParam(0x2,Inject(SheetSkeletonService)),__decorateParam(0x3,Inject(SheetsShapeService)),__decorateParam(0x4,Inject(IDrawingManagerService))],SheetsShapeController);let UniverSheetsShapePlugin=class UniverSheetsShapePlugin extends Plugin{constructor(_0x123de4=defaultPluginConfig,_0x46c4be,_0x192001,_0xacfa28){const _0x3094bb=_0xad074b;super(),this[_0x3094bb(0x20c)]=_0x123de4,this[_0x3094bb(0x1e3)]=_0x46c4be,this[_0x3094bb(0x18d)]=_0x192001,this[_0x3094bb(0x1bc)]=_0xacfa28;const {..._0x1d3bfe}=merge({},defaultPluginConfig,this[_0x3094bb(0x20c)]);this[_0x3094bb(0x1bc)][_0x3094bb(0x190)](SHEETS_SHAPE_PLUGIN_CONFIG_KEY,_0x1d3bfe);}[_0xad074b(0x1fb)](){const _0x297819=_0xad074b,_0x1d6ec7=this['_injector'];[[SheetShapeModelManager],[SheetsShapeService],[SheetsShapeController]][_0x297819(0x1d2)](_0x92493d=>_0x1d6ec7[_0x297819(0x1c3)](_0x92493d)),touchDependencies(_0x1d6ec7,[[SheetsShapeService],[SheetsShapeController]]);}};_defineProperty(UniverSheetsShapePlugin,_0xad074b(0x198),UniverInstanceType['UNIVER_SHEET']),_defineProperty(UniverSheetsShapePlugin,_0xad074b(0x19d),_0xad074b(0x1c7)),_defineProperty(UniverSheetsShapePlugin,_0xad074b(0x1b5),name),_defineProperty(UniverSheetsShapePlugin,'version',version),UniverSheetsShapePlugin=__decorate([DependentOn(UniverLicensePlugin),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,ICommandService),__decorateParam(0x3,IConfigService)],UniverSheetsShapePlugin);export{DEFAULT_SHAPE_HEIGHT,DEFAULT_SHAPE_WIDTH,InsertShapeCommand,InsertSheetsShapeMutation,RemoveSheetsShapeMutation,SetShapeDrawingDataCommand,SetSheetsShapeRotateCommand,SetSheetsShapeTextVerticalToggleCommand,SheetsShapeService,ToggleSheetsShapeFlipCommand,UniverSheetsShapePlugin,UpdateConnectorRelationCommand,UpdateLineShapeResizeCommand,UpdateSheetsShapeDataMutation,UpdateSheetsShapeTypeCommand,UpdateSheetsShapeTypeMutation};
package/lib/facade.js CHANGED
@@ -1 +1 @@
1
- const _0x2d9630=_0x539f;(function(_0x54d9e0,_0x46671b){const _0xa72ce=_0x539f,_0xdc917=_0x54d9e0();while(!![]){try{const _0x22d5e0=parseInt(_0xa72ce(0x106))/0x1+parseInt(_0xa72ce(0xaa))/0x2+parseInt(_0xa72ce(0xa4))/0x3*(parseInt(_0xa72ce(0xa2))/0x4)+parseInt(_0xa72ce(0xb0))/0x5+-parseInt(_0xa72ce(0x96))/0x6+-parseInt(_0xa72ce(0xdf))/0x7*(parseInt(_0xa72ce(0x100))/0x8)+-parseInt(_0xa72ce(0xd6))/0x9;if(_0x22d5e0===_0x46671b)break;else _0xdc917['push'](_0xdc917['shift']());}catch(_0x4c491f){_0xdc917['push'](_0xdc917['shift']());}}}(_0x5702,0xc1b2d));import{ConnectorCoordinateTransform as _0x3f5f02,ShapeArrowSizeEnum as _0x50cc04,ShapeArrowTypeEnum as _0x57158a,ShapeFillEnum as _0x5dbaee,ShapeGradientTypeEnum as _0x4aa13d,ShapeLineCapEnum as _0x81888a,ShapeLineDashEnum as _0x365de7,ShapeLineJoinEnum as _0x518da2,ShapeLineTypeEnum as _0x4153fd,ShapeTypeEnum as _0x332cf2,computeConnectorRouteLayout as _0x41ee51,getBasicShapeRotateBound as _0x31d35f,isConnectorShape as _0x147008,routeConnectorLineShape as _0x471885}from'@univerjs-pro/engine-shape';import{FEnum as _0x1cd10d}from'@univerjs/core/facade';import{DEFAULT_SHAPE_HEIGHT as _0x57cbf0,DEFAULT_SHAPE_WIDTH as _0x82d213,InsertShapeCommand as _0x2e53d3,SetShapeDrawingDataCommand as _0xc8e4fb,SheetsShapeService as _0x4cfbb0,UpdateConnectorRelationCommand as _0x20a1ba}from'@univerjs-pro/sheets-shape';function _0x539f(_0x3e93ed,_0x137e24){_0x3e93ed=_0x3e93ed-0x88;const _0x5702b8=_0x5702();let _0x539f5d=_0x5702b8[_0x3e93ed];return _0x539f5d;}function _0x5702(){const _0x437b2f=['width','ensureSkeleton','localToWorld','NoFill','abs','type','stringify','adjustValues','ShapeFillEnum','extend','setShapeType','cos','build','color','setPosition','keys','setEndArrowType','endArrow','setStrokeWidth','setStrokeLineCapType','subUnitId','getShapes','getStartConnectInfo','getShapeType','setStrokeColor','1264yldKvh','insertShape','iterator','executeCommand','capType','getAdjustNames','40658BZpZNQ','\x20not\x20found','gradientStops','DRAWING_SHAPE','getPosition','ShapeArrowSizeEnum','constructor','fill','length','default','top','getSize','getShapeModel','function','GradientFill','Skeleton\x20for\x20unitId\x20','startArrow','2174556hciJeU','relation','transform','unitId','isLineShape','prototype','index','setShapeGradientFill','getEndConnectInfo','entries','push','point','1660uMZCtt','ShapeLineJoinEnum','5937jhxEiy','opacity','string','_preloadShapeProperties','getConnectionSiteList','getAdjustValueByName','1723330KdVmHM','gradientType','getSheetId','flipX','getDrawingByParam','getShapeData','2080245flpsFi','shapeData','ShapeLineCapEnum','defineProperty','getDrawingPoints','getWorkbook','\x20and\x20subUnitId\x20','from','getShapeId','gradientAngle','_commandService','removeShape','ShapeArrowTypeEnum','worldRect','left','setStrokeLineDashType','shapeType','lineType','setStrokeOpacity','flipY','symbol','_injector',',\x20but\x20expected\x20a\x20connector\x20shape\x20type.','shapeId','object','ShapeTypeEnum','lineJoinType','setEndArrowSize','drawingType','height','getAdjustPoints','stroke','setNoneFill','setStrokeLineType','newShape','_resolveEndpoints','getConnectorLinePoints','setStartArrowType','8614260SFaGNx','cxnIndex','shape','size','get','fillType','updateContext','ShapeGradientTypeEnum','drawId','1183uRUcbw','SolidFil','dashType','connectionSiteIndex','getConnectionSites','setStartArrowSize','lineStrokeType','getUnitId'];_0x5702=function(){return _0x437b2f;};return _0x5702();}import{DrawingTypeEnum as _0x5dd802,generateRandomId as _0x4ad178}from'@univerjs/core';import{IDrawingManagerService as _0x1f0733}from'@univerjs/drawing';import{SheetSkeletonService as _0x45d511,convertPositionCellToSheetOverGrid as _0x30350e}from'@univerjs/sheets';import{ISheetDrawingService as _0x4f2a92,RemoveSheetDrawingCommand as _0x360a01}from'@univerjs/sheets-drawing';import{FWorksheet as _0x5b4d34}from'@univerjs/sheets/facade';var k=class extends _0x1cd10d{get[_0x2d9630(0xc9)](){return _0x332cf2;}get[_0x2d9630(0xef)](){return _0x5dbaee;}get[_0x2d9630(0xdd)](){return _0x4aa13d;}get['ShapeLineTypeEnum'](){return _0x4153fd;}get['ShapeLineDashEnum'](){return _0x365de7;}get[_0x2d9630(0xb2)](){return _0x81888a;}get[_0x2d9630(0xa3)](){return _0x518da2;}get[_0x2d9630(0xbc)](){return _0x57158a;}get[_0x2d9630(0x8a)](){return _0x50cc04;}};_0x1cd10d[_0x2d9630(0xf0)](k);function A(_0x4464a4){'@babel/helpers - typeof';const _0x5d0695=_0x2d9630;return A=typeof Symbol==_0x5d0695(0x92)&&typeof Symbol[_0x5d0695(0x102)]==_0x5d0695(0xc4)?function(_0x4243a6){return typeof _0x4243a6;}:function(_0xfe500){const _0x276cc7=_0x5d0695;return _0xfe500&&typeof Symbol==_0x276cc7(0x92)&&_0xfe500[_0x276cc7(0x8b)]===Symbol&&_0xfe500!==Symbol[_0x276cc7(0x9b)]?'symbol':typeof _0xfe500;},A(_0x4464a4);}function j(_0x1eba5a,_0x2a91b0){const _0x5c7229=_0x2d9630;if(A(_0x1eba5a)!='object'||!_0x1eba5a)return _0x1eba5a;var _0x17a97e=_0x1eba5a[Symbol['toPrimitive']];if(_0x17a97e!==void 0x0){var _0x3657a6=_0x17a97e['call'](_0x1eba5a,_0x2a91b0||_0x5c7229(0x8e));if(A(_0x3657a6)!=_0x5c7229(0xc8))return _0x3657a6;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x2a91b0==='string'?String:Number)(_0x1eba5a);}function M(_0x473586){const _0x429391=_0x2d9630;var _0x12b0a6=j(_0x473586,_0x429391(0xa6));return A(_0x12b0a6)==_0x429391(0xc4)?_0x12b0a6:_0x12b0a6+'';}function N(_0x17280a,_0xa51360,_0x3d5952){const _0x271cea=_0x2d9630;return(_0xa51360=M(_0xa51360))in _0x17280a?Object[_0x271cea(0xb3)](_0x17280a,_0xa51360,{'value':_0x3d5952,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x17280a[_0xa51360]=_0x3d5952,_0x17280a;}var P=class{constructor(_0x502165,_0x4043cb,_0x28e3eb,_0x16bb50){const _0x598ded=_0x2d9630;N(this,_0x598ded(0x99),void 0x0),N(this,_0x598ded(0xfb),void 0x0),N(this,_0x598ded(0xde),void 0x0),N(this,'x',0x0),N(this,'y',0x0),N(this,_0x598ded(0xe7),_0x82d213),N(this,_0x598ded(0xcd),_0x57cbf0),N(this,_0x598ded(0xc0),void 0x0),N(this,_0x598ded(0xb1),{}),N(this,_0x598ded(0xc5),void 0x0),this['unitId']=_0x502165,this[_0x598ded(0xfb)]=_0x4043cb,this['drawId']=_0x28e3eb||_0x4ad178(),this[_0x598ded(0xc5)]=_0x16bb50;}[_0x2d9630(0xf5)](_0x2077a9,_0x510570,_0x3f6ca6,_0x3d43a2){const _0x39c5a4=_0x2d9630;let _0xf2b3da=this[_0x39c5a4(0xc5)][_0x39c5a4(0xda)](_0x45d511)[_0x39c5a4(0xe8)](this['unitId'],this['subUnitId']);if(!_0xf2b3da)throw Error(_0x39c5a4(0x94)+this['unitId']+_0x39c5a4(0xb6)+this[_0x39c5a4(0xfb)]+'\x20not\x20found');let {transform:_0xd0da30}=_0x30350e(this[_0x39c5a4(0x99)],this[_0x39c5a4(0xfb)],{'row':_0x2077a9,'column':_0x510570,'rowOffset':_0x3f6ca6,'columnOffset':_0x3d43a2},0x1,0x1,_0xf2b3da);return this['x']=_0xd0da30[_0x39c5a4(0xbe)],this['y']=_0xd0da30[_0x39c5a4(0x8f)],this;}['setAbsolutePosition'](_0x18c9a8,_0x1065e3){return this['x']=_0x18c9a8,this['y']=_0x1065e3,this;}[_0x2d9630(0xf1)](_0x358584){const _0x32cbf8=_0x2d9630;return this[_0x32cbf8(0xc0)]=_0x358584,this;}['setShapeSolidFill'](_0x4af407,_0x1f5a9a){const _0x32a701=_0x2d9630;return this['shapeData']['fill']||(this['shapeData'][_0x32a701(0x8c)]={}),this['shapeData'][_0x32a701(0x8c)]['fillType']=_0x5dbaee[_0x32a701(0xe0)],_0x4af407!==void 0x0&&(this[_0x32a701(0xb1)][_0x32a701(0x8c)][_0x32a701(0xf4)]=_0x4af407),_0x1f5a9a!==void 0x0&&(this['shapeData'][_0x32a701(0x8c)][_0x32a701(0xa5)]=_0x1f5a9a),this;}[_0x2d9630(0x9d)](_0x4f76a3,_0x376fe2,_0x5b8ddc){const _0x1a8f82=_0x2d9630;if(_0x376fe2===void 0x0||_0x376fe2['length']===0x0)throw Error('colorStops\x20is\x20required\x20and\x20should\x20contain\x20at\x20least\x20one\x20color\x20stop.');return this['shapeData'][_0x1a8f82(0x8c)]||(this[_0x1a8f82(0xb1)][_0x1a8f82(0x8c)]={}),this[_0x1a8f82(0xb1)][_0x1a8f82(0x8c)][_0x1a8f82(0x108)]=_0x376fe2,this[_0x1a8f82(0xb1)]['fill'][_0x1a8f82(0xdb)]=_0x5dbaee[_0x1a8f82(0x93)],this[_0x1a8f82(0xb1)][_0x1a8f82(0x8c)][_0x1a8f82(0xab)]=_0x4f76a3,_0x5b8ddc!==void 0x0&&(this[_0x1a8f82(0xb1)][_0x1a8f82(0x8c)][_0x1a8f82(0xb9)]=_0x5b8ddc),this;}[_0x2d9630(0xd0)](){const _0x1f5c72=_0x2d9630;return this[_0x1f5c72(0xb1)]['fill']={'fillType':_0x5dbaee[_0x1f5c72(0xea)]},this;}[_0x2d9630(0xff)](_0x3b7a63){const _0x2a6bc0=_0x2d9630;return this['shapeData'][_0x2a6bc0(0xcf)]||(this[_0x2a6bc0(0xb1)][_0x2a6bc0(0xcf)]={}),this[_0x2a6bc0(0xb1)][_0x2a6bc0(0xcf)][_0x2a6bc0(0xf4)]=_0x3b7a63,this;}[_0x2d9630(0xf9)](_0x3f0027){const _0x5a3594=_0x2d9630;return this[_0x5a3594(0xb1)][_0x5a3594(0xcf)]||(this[_0x5a3594(0xb1)]['stroke']={}),this[_0x5a3594(0xb1)][_0x5a3594(0xcf)][_0x5a3594(0xe7)]=_0x3f0027,this;}[_0x2d9630(0xbf)](_0x190457){const _0x2fb6e6=_0x2d9630;return this[_0x2fb6e6(0xb1)][_0x2fb6e6(0xcf)]||(this[_0x2fb6e6(0xb1)][_0x2fb6e6(0xcf)]={}),this['shapeData']['stroke'][_0x2fb6e6(0xe1)]=_0x190457,this;}['setStrokeLineJoinType'](_0x2579a5){const _0x5c40f8=_0x2d9630;return this['shapeData'][_0x5c40f8(0xcf)]||(this[_0x5c40f8(0xb1)][_0x5c40f8(0xcf)]={}),this[_0x5c40f8(0xb1)][_0x5c40f8(0xcf)][_0x5c40f8(0xca)]=_0x2579a5,this;}[_0x2d9630(0xfa)](_0x3cb084){const _0x186102=_0x2d9630;return this[_0x186102(0xb1)][_0x186102(0xcf)]||(this[_0x186102(0xb1)][_0x186102(0xcf)]={}),this[_0x186102(0xb1)][_0x186102(0xcf)][_0x186102(0x104)]=_0x3cb084,this;}[_0x2d9630(0xc2)](_0x107d72){const _0x107bb8=_0x2d9630;return this[_0x107bb8(0xb1)]['stroke']||(this[_0x107bb8(0xb1)][_0x107bb8(0xcf)]={}),this[_0x107bb8(0xb1)][_0x107bb8(0xcf)][_0x107bb8(0xa5)]=_0x107d72,this;}[_0x2d9630(0xd1)](_0x22ecb7){const _0x5dc1bf=_0x2d9630;return this['shapeData'][_0x5dc1bf(0xcf)]||(this['shapeData'][_0x5dc1bf(0xcf)]={}),this[_0x5dc1bf(0xb1)][_0x5dc1bf(0xcf)][_0x5dc1bf(0xe5)]=_0x22ecb7,this;}['setWidth'](_0x16222a){return this['width']=_0x16222a,this;}['setHeight'](_0x281759){const _0x16f77b=_0x2d9630;return this[_0x16f77b(0xcd)]=_0x281759,this;}[_0x2d9630(0x9a)](){const _0x21f7de=_0x2d9630;let _0xd7d658=this[_0x21f7de(0xc5)][_0x21f7de(0xda)](_0x4cfbb0)[_0x21f7de(0x91)](this[_0x21f7de(0x99)],this[_0x21f7de(0xfb)],this[_0x21f7de(0xde)]);return _0xd7d658?_0x147008(_0xd7d658['getShapeType']()):this[_0x21f7de(0xc0)]?_0x147008(this[_0x21f7de(0xc0)]):!0x1;}[_0x2d9630(0xe3)](){const _0x317813=_0x2d9630;let _0x4c7c77=this['_injector']['get'](_0x4cfbb0)['getShapeModel'](this[_0x317813(0x99)],this[_0x317813(0xfb)],this[_0x317813(0xde)]);if(!_0x4c7c77)return[];let _0x6f6a58=this[_0x317813(0xc5)][_0x317813(0xda)](_0x1f0733)[_0x317813(0xae)]({'unitId':this[_0x317813(0x99)],'subUnitId':this[_0x317813(0xfb)],'drawingId':this[_0x317813(0xde)]});if(!(_0x6f6a58!=null&&_0x6f6a58[_0x317813(0x98)]))return[];let {width:_0x4c981d=0x0,height:_0x5576ac=0x0}=_0x6f6a58[_0x317813(0x98)];return _0x4c7c77[_0x317813(0xdc)]({'width':_0x4c981d,'height':_0x5576ac}),_0x4c7c77['getConnectionSiteList']();}[_0x2d9630(0xce)](){const _0x48da2a=_0x2d9630;let _0x33f03c=this[_0x48da2a(0xc5)][_0x48da2a(0xda)](_0x4cfbb0)[_0x48da2a(0x91)](this[_0x48da2a(0x99)],this[_0x48da2a(0xfb)],this[_0x48da2a(0xde)]);if(!_0x33f03c)return[];let _0x4f852a=this[_0x48da2a(0xc5)][_0x48da2a(0xda)](_0x1f0733)[_0x48da2a(0xae)]({'unitId':this['unitId'],'subUnitId':this[_0x48da2a(0xfb)],'drawingId':this[_0x48da2a(0xde)]});if(!(_0x4f852a!=null&&_0x4f852a[_0x48da2a(0x98)]))return[];let {width:_0x428245=0x0,height:_0x129861=0x0}=_0x4f852a['transform'];return _0x33f03c[_0x48da2a(0xdc)]({'width':_0x428245,'height':_0x129861}),_0x33f03c[_0x48da2a(0xb4)]();}[_0x2d9630(0xd4)](){const _0x4133c6=_0x2d9630;let _0x5eef8d=this['_injector'][_0x4133c6(0xda)](_0x4cfbb0)[_0x4133c6(0x91)](this[_0x4133c6(0x99)],this[_0x4133c6(0xfb)],this['drawId']);if(!_0x5eef8d||!_0x147008(_0x5eef8d[_0x4133c6(0xfe)]()))return[];let _0x400642=this[_0x4133c6(0xc5)][_0x4133c6(0xda)](_0x1f0733)[_0x4133c6(0xae)]({'unitId':this[_0x4133c6(0x99)],'subUnitId':this[_0x4133c6(0xfb)],'drawingId':this['drawId']});if(!(_0x400642!=null&&_0x400642[_0x4133c6(0x98)]))return[];let {width:_0x3d57e0=0x0,height:_0x3c5fb1=0x0}=_0x400642[_0x4133c6(0x98)];return _0x5eef8d[_0x4133c6(0xdc)]({'width':_0x3d57e0,'height':_0x3c5fb1}),_0x5eef8d[_0x4133c6(0xd4)]();}['getStartConnectInfo'](){const _0x20b4bd=_0x2d9630;var _0x525bb2;let _0x2d56db=this[_0x20b4bd(0xc5)]['get'](_0x4cfbb0)[_0x20b4bd(0x91)](this[_0x20b4bd(0x99)],this['subUnitId'],this[_0x20b4bd(0xde)]);return _0x2d56db?(_0x525bb2=_0x2d56db[_0x20b4bd(0xfd)]())==null?null:_0x525bb2:null;}[_0x2d9630(0x9e)](){const _0x1dfe31=_0x2d9630;var _0x1ae670;let _0x245e3c=this[_0x1dfe31(0xc5)][_0x1dfe31(0xda)](_0x4cfbb0)['getShapeModel'](this[_0x1dfe31(0x99)],this[_0x1dfe31(0xfb)],this[_0x1dfe31(0xde)]);return _0x245e3c?(_0x1ae670=_0x245e3c[_0x1dfe31(0x9e)]())==null?null:_0x1ae670:null;}[_0x2d9630(0xf3)](){const _0x2522e0=_0x2d9630;var _0x59ab9f,_0x493078;if(!this['shapeType'])throw Error('Shape\x20type\x20is\x20required.\x20Please\x20call\x20setShapeType()\x20before\x20build().');if(this['x']===0x0||this['y']===0x0){let _0xfc9627=this[_0x2522e0(0xc5)]['get'](_0x45d511)[_0x2522e0(0xe8)](this['unitId'],this[_0x2522e0(0xfb)]);if(!_0xfc9627)throw Error(_0x2522e0(0x94)+this['unitId']+_0x2522e0(0xb6)+this[_0x2522e0(0xfb)]+_0x2522e0(0x107));let {transform:_0x240082}=_0x30350e(this[_0x2522e0(0x99)],this['subUnitId'],{'row':0x1,'column':0x1,'rowOffset':0x0,'columnOffset':0x0},0x1,0x1,_0xfc9627);this['x']=this['x']>0x0?this['x']:_0x240082[_0x2522e0(0xbe)],this['y']=this['y']>0x0?this['y']:_0x240082['top'];}return this[_0x2522e0(0xe7)]=(_0x59ab9f=this[_0x2522e0(0xe7)])==null?_0x82d213:_0x59ab9f,this[_0x2522e0(0xcd)]=(_0x493078=this[_0x2522e0(0xcd)])==null?_0x57cbf0:_0x493078,{'unitId':this[_0x2522e0(0x99)],'subUnitId':this['subUnitId'],'shapeId':this[_0x2522e0(0xde)],'shapeType':this[_0x2522e0(0xc0)],'shapeData':Object[_0x2522e0(0xf6)](this[_0x2522e0(0xb1)])[_0x2522e0(0x8d)]>0x0?this[_0x2522e0(0xb1)]:void 0x0,'x':this['x'],'y':this['y'],'width':this[_0x2522e0(0xe7)],'height':this[_0x2522e0(0xcd)]};}[_0x2d9630(0xb8)](){const _0x264db0=_0x2d9630;return this[_0x264db0(0xde)];}['getShapeType'](){const _0x59f308=_0x2d9630;return this[_0x59f308(0xc0)];}[_0x2d9630(0xaf)](){return this['shapeData'];}[_0x2d9630(0x89)](){return{'x':this['x'],'y':this['y']};}[_0x2d9630(0x90)](){const _0xb6e2f8=_0x2d9630;return{'width':this[_0xb6e2f8(0xe7)],'height':this[_0xb6e2f8(0xcd)]};}},F=class extends P{constructor(_0x56182a,_0x1a40e0,_0x72f3,_0x1db2ee){const _0x4278dc=_0x2d9630;super(_0x56182a,_0x1a40e0,_0x72f3,_0x1db2ee),N(this,_0x4278dc(0xb1),{});}[_0x2d9630(0xf1)](_0x105cff){const _0x262dbf=_0x2d9630;if(!_0x147008(_0x105cff))throw Error('Invalid\x20shape\x20type\x20for\x20connector.\x20Received\x20'+_0x105cff+_0x262dbf(0xc6));return super[_0x262dbf(0xf1)](_0x105cff),this;}[_0x2d9630(0xd5)](_0x383959){const _0x5a0fac=_0x2d9630;var _0x4a8032,_0x5bc284;return(_0x4a8032=this['shapeData'])!=null&&_0x4a8032['ln']||(this['shapeData']['ln']={}),!((_0x5bc284=this[_0x5a0fac(0xb1)])==null||(_0x5bc284=_0x5bc284['ln'])==null)&&_0x5bc284[_0x5a0fac(0x95)]||(this[_0x5a0fac(0xb1)]['ln']['startArrow']={}),this[_0x5a0fac(0xb1)]['ln'][_0x5a0fac(0x95)][_0x5a0fac(0xec)]=_0x383959,this;}[_0x2d9630(0xf7)](_0x1a11d3){const _0x5c01c0=_0x2d9630;var _0x35d163,_0x461f05;return(_0x35d163=this['shapeData'])!=null&&_0x35d163['ln']||(this[_0x5c01c0(0xb1)]['ln']={}),!((_0x461f05=this[_0x5c01c0(0xb1)])==null||(_0x461f05=_0x461f05['ln'])==null)&&_0x461f05[_0x5c01c0(0xf8)]||(this['shapeData']['ln']['endArrow']={}),this[_0x5c01c0(0xb1)]['ln']['endArrow']['type']=_0x1a11d3,this;}[_0x2d9630(0xe4)](_0x94da41){const _0x2817a1=_0x2d9630;var _0xc77a6d,_0x17e34e;return(_0xc77a6d=this[_0x2817a1(0xb1)])!=null&&_0xc77a6d['ln']||(this[_0x2817a1(0xb1)]['ln']={}),!((_0x17e34e=this['shapeData'])==null||(_0x17e34e=_0x17e34e['ln'])==null)&&_0x17e34e[_0x2817a1(0x95)]||(this[_0x2817a1(0xb1)]['ln'][_0x2817a1(0x95)]={}),this['shapeData']['ln'][_0x2817a1(0x95)][_0x2817a1(0xd9)]=_0x94da41,this;}[_0x2d9630(0xcb)](_0x227620){const _0x5c3953=_0x2d9630;var _0x262f83,_0x351859;return(_0x262f83=this[_0x5c3953(0xb1)])!=null&&_0x262f83['ln']||(this[_0x5c3953(0xb1)]['ln']={}),!((_0x351859=this['shapeData'])==null||(_0x351859=_0x351859['ln'])==null)&&_0x351859['endArrow']||(this[_0x5c3953(0xb1)]['ln'][_0x5c3953(0xf8)]={}),this['shapeData']['ln'][_0x5c3953(0xf8)][_0x5c3953(0xd9)]=_0x227620,this;}[_0x2d9630(0xf3)](){const _0x179fb1=_0x2d9630;return super[_0x179fb1(0xf3)]();}[_0x2d9630(0x9e)](){const _0x29f692=_0x2d9630;var _0x447237;return((_0x447237=this[_0x29f692(0xb1)])==null||(_0x447237=_0x447237[_0x29f692(0x97)])==null?void 0x0:_0x447237['to'])||null;}['getStartConnectInfo'](){const _0x4b08db=_0x2d9630;var _0x16926e;return((_0x16926e=this['shapeData'])==null||(_0x16926e=_0x16926e['relation'])==null?void 0x0:_0x16926e[_0x4b08db(0xb7)])||null;}};function I(_0xfcc94,_0x17b70a,_0x3a9d1b,_0x2f3963,_0x53ae43,_0x2972a4){const _0x4b8ba5=_0x2d9630;let _0x4320b1=_0x53ae43[_0x4b8ba5(0x91)](_0xfcc94,_0x17b70a,_0x3a9d1b);if(!_0x4320b1)return null;let _0x1c5036=_0x2972a4['getDrawingByParam']({'unitId':_0xfcc94,'subUnitId':_0x17b70a,'drawingId':_0x3a9d1b});if(!(_0x1c5036!=null&&_0x1c5036[_0x4b8ba5(0x98)]))return null;let {left:_0x5205ad=0x0,top:_0x4f9555=0x0,width:_0x3d394c=0x0,height:_0x578172=0x0,flipX:_0x39b6b3=!0x1,flipY:_0x2a0eae=!0x1,angle:_0x4a7257}=_0x1c5036['transform'];_0x4320b1[_0x4b8ba5(0xdc)]({'width':_0x3d394c,'height':_0x578172});let _0x52bf4f=_0x4320b1[_0x4b8ba5(0xa8)]()['find'](_0x34b649=>_0x34b649[_0x4b8ba5(0x9c)]===_0x2f3963);if(!_0x52bf4f)return null;let _0x113d28=_0x39b6b3?_0x3d394c-_0x52bf4f['x']:_0x52bf4f['x'],_0x55f900=_0x2a0eae?_0x578172-_0x52bf4f['y']:_0x52bf4f['y'];if(_0x4a7257&&_0x4a7257!==0x0){let _0x504480=_0x4a7257*Math['PI']/0xb4,_0x2fe876=Math[_0x4b8ba5(0xf2)](_0x504480),_0x59764e=Math['sin'](_0x504480),_0x138c36=_0x3d394c/0x2,_0x3e79c0=_0x578172/0x2,_0xad0601=_0x113d28-_0x138c36,_0x4f58d7=_0x55f900-_0x3e79c0;_0x113d28=_0x138c36+_0xad0601*_0x2fe876-_0x4f58d7*_0x59764e,_0x55f900=_0x3e79c0+_0xad0601*_0x59764e+_0x4f58d7*_0x2fe876;}_0x113d28+=_0x5205ad,_0x55f900+=_0x4f9555;let _0x2f6452=_0x52bf4f['ang']/0xea60;_0x39b6b3&&(_0x2f6452=0xb4-_0x2f6452),_0x2a0eae&&(_0x2f6452=-_0x2f6452),_0x2f6452+=_0x4a7257||0x0,_0x2f6452=(_0x2f6452%0x168+0x168)%0x168;let _0x4dfd9b=_0x31d35f({'left':_0x5205ad,'top':_0x4f9555,'width':_0x3d394c,'height':_0x578172},_0x4a7257||0x0);return{'point':{'x':_0x113d28,'y':_0x55f900},'angle':_0x2f6452,'bounds':_0x4dfd9b};}function L(_0x34c3c5,_0x1bef19){const _0x3dabb5=_0x2d9630;let _0x51f24a=_0x1bef19['x']-_0x34c3c5['x'],_0x96ac2b=_0x1bef19['y']-_0x34c3c5['y'];return Math[_0x3dabb5(0xeb)](_0x51f24a)>=Math['abs'](_0x96ac2b)?_0x51f24a>=0x0?0xb4:0x0:_0x96ac2b>=0x0?0x10e:0x5a;}function R(_0x419811,_0x143f44,_0xc49bb1,_0x3d97d6,_0x5855b9,_0x372180,_0x22dbc1){const _0x19ae23=_0x2d9630;let _0x62d715=_0x372180[_0x19ae23(0x91)](_0x419811,_0x143f44,_0xc49bb1);if(!_0x62d715)return null;let _0x5043d3=_0x22dbc1[_0x19ae23(0xae)]({'unitId':_0x419811,'subUnitId':_0x143f44,'drawingId':_0xc49bb1});if(!(_0x5043d3!=null&&_0x5043d3[_0x19ae23(0x98)]))return null;let {left:_0x5dec24=0x0,top:_0x343fa3=0x0,width:_0x1e58a7=0x0,height:_0x218f4b=0x0,flipX:_0x3bf364=!0x1,flipY:_0x268869=!0x1}=_0x5043d3[_0x19ae23(0x98)];_0x62d715[_0x19ae23(0xdc)]({'width':_0x1e58a7,'height':_0x218f4b});let _0x47517a=_0x62d715[_0x19ae23(0xd4)]();if(_0x47517a[_0x19ae23(0x8d)]<0x2)return null;let _0x319d2c=_0x3d97d6?_0x47517a[0x0]:_0x47517a[_0x47517a[_0x19ae23(0x8d)]-0x1],_0x2be466=new _0x3f5f02({'left':_0x5dec24,'top':_0x343fa3,'width':_0x1e58a7,'height':_0x218f4b,'flipX':_0x3bf364,'flipY':_0x268869})[_0x19ae23(0xe9)](_0x319d2c);return{'point':_0x2be466,'angle':L(_0x5855b9[_0x19ae23(0xa1)],_0x2be466),'bounds':{'left':_0x2be466['x'],'top':_0x2be466['y'],'width':0x0,'height':0x0}};}var z=class extends _0x5b4d34{async[_0x2d9630(0x101)](_0x7f3959){const _0x4fe19f=_0x2d9630;let {unitId:_0x236eee,subUnitId:_0x15dce2,shapeId:_0x34b191,shapeType:_0x117a52,shapeData:_0x33bce4,x:_0x21f79f,y:_0x592579,width:_0x102629,height:_0x2a21a9}=_0x7f3959;return this[_0x4fe19f(0xba)]['executeCommand'](_0x2e53d3['id'],{'unitId':_0x236eee,'subUnitId':_0x15dce2,'shapeId':_0x34b191,'shapeType':_0x117a52,'shapeData':_0x33bce4,'position':{'x':_0x21f79f,'y':_0x592579},'width':_0x102629,'height':_0x2a21a9});}async['updateShape'](_0x4b1e80){const _0xc9eb2f=_0x2d9630;let {unitId:_0x278b60,subUnitId:_0x25e983,shapeId:_0x15b3b1,shapeType:_0x17ac8a,shapeData:_0x4fa334,x:_0x3033b1,y:_0x5607a9,width:_0xca80c3,height:_0x8dacb1}=_0x4b1e80;return this[_0xc9eb2f(0xba)][_0xc9eb2f(0x103)](_0xc8e4fb['id'],{'unitId':_0x278b60,'subUnitId':_0x25e983,'shapeId':_0x15b3b1,'shapeType':_0x17ac8a,'shapeData':_0x4fa334,'position':{'x':_0x3033b1,'y':_0x5607a9},'width':_0xca80c3,'height':_0x8dacb1});}[_0x2d9630(0xd2)](_0x568d29){const _0x4ab824=_0x2d9630;let _0x3d3e82=this['getWorkbook']()[_0x4ab824(0xe6)](),_0x38ac0b=this[_0x4ab824(0xac)]();if(_0x568d29){let _0x3dc406=new P(_0x3d3e82,_0x38ac0b,_0x568d29[_0x4ab824(0xde)],this['_injector']);return this[_0x4ab824(0xa7)](_0x3dc406,_0x3d3e82,_0x38ac0b,_0x568d29[_0x4ab824(0xde)]),_0x3dc406;}return new P(_0x3d3e82,_0x38ac0b,_0x4ad178(),this[_0x4ab824(0xc5)]);}['newConnector'](_0x2f71c6){const _0x2170cc=_0x2d9630;let _0x235380=this[_0x2170cc(0xb5)]()[_0x2170cc(0xe6)](),_0xd1cb0c=this[_0x2170cc(0xac)]();if(_0x2f71c6){let _0x40b4d4=new F(_0x235380,_0xd1cb0c,_0x2f71c6['drawId'],this[_0x2170cc(0xc5)]);return this[_0x2170cc(0xa7)](_0x40b4d4,_0x235380,_0xd1cb0c,_0x2f71c6[_0x2170cc(0xde)]),_0x40b4d4;}return new F(_0x235380,_0xd1cb0c,_0x4ad178(),this[_0x2170cc(0xc5)]);}[_0x2d9630(0xfc)](){const _0x1419ee=_0x2d9630;let _0x17d55e=this[_0x1419ee(0xc5)]['get'](_0x4f2a92),_0x522a1b=this[_0x1419ee(0xb5)]()[_0x1419ee(0xe6)](),_0x487c91=this[_0x1419ee(0xac)](),_0x4a7db4=_0x17d55e['getDrawingData'](_0x522a1b,_0x487c91);if(!_0x4a7db4)return[];let _0x4bf64b=[];for(let [_0x267eb9,_0x5b873e]of Object[_0x1419ee(0x9f)](_0x4a7db4))if(_0x5b873e&&_0x5b873e[_0x1419ee(0xcc)]===_0x5dd802[_0x1419ee(0x88)]){let _0x5766b0=new P(_0x522a1b,_0x487c91,_0x267eb9,this[_0x1419ee(0xc5)]);this[_0x1419ee(0xa7)](_0x5766b0,_0x522a1b,_0x487c91,_0x267eb9),_0x4bf64b[_0x1419ee(0xa0)](_0x5766b0);}return _0x4bf64b;}[_0x2d9630(0xbb)](_0x349a97){const _0x227c33=_0x2d9630;let {unitId:_0x5f2515,subUnitId:_0x10c010,drawId:_0x2757e7}=_0x349a97;return this[_0x227c33(0xba)][_0x227c33(0x103)](_0x360a01['id'],{'unitId':_0x5f2515,'drawings':[{'unitId':_0x5f2515,'subUnitId':_0x10c010,'drawingId':_0x2757e7,'drawingType':_0x5dd802['DRAWING_SHAPE']}]});}async['connectShapes'](_0x1139ba){const _0x5ea05c=_0x2d9630;let {connector:_0x595443,startTarget:_0x1ec564,endTarget:_0x5875f2}=_0x1139ba;if(!_0x1ec564&&!_0x5875f2)return!0x1;let _0x110ae7=this[_0x5ea05c(0xb5)]()[_0x5ea05c(0xe6)](),_0x212d42=this['getSheetId'](),_0x2455d9=this['_injector'][_0x5ea05c(0xda)](_0x4cfbb0),_0x277b6e=this[_0x5ea05c(0xc5)][_0x5ea05c(0xda)](_0x1f0733),_0x469e4d=_0x2455d9['getShapeModel'](_0x110ae7,_0x212d42,_0x595443[_0x5ea05c(0xde)]);if(!_0x469e4d)return!0x1;let _0x2f4b05=_0x469e4d['getShapeType'](),_0x5756d5=_0x469e4d['getShapeRelation'](),_0xb8d6fe={};for(let _0x354030 of _0x469e4d[_0x5ea05c(0x105)]()){let _0x3be7c3=_0x469e4d[_0x5ea05c(0xa9)](_0x354030);_0x3be7c3!==void 0x0&&(_0xb8d6fe[_0x354030]=_0x3be7c3);}let {startInfo:_0xa5b983,endInfo:_0x42e8ca}=this[_0x5ea05c(0xd3)](_0x110ae7,_0x212d42,_0x595443,_0x469e4d,_0x1ec564,_0x5875f2,_0x2455d9,_0x277b6e,_0x5756d5);if(!_0xa5b983||!_0x42e8ca)return!0x1;let _0x109ebd=_0x41ee51(_0x471885(_0xa5b983,_0x42e8ca,_0x2f4b05),_0x2f4b05),_0x36e8d9={};return _0x1ec564?_0x36e8d9[_0x5ea05c(0xb7)]={'shapeId':_0x1ec564['shape'][_0x5ea05c(0xde)],'cxnIndex':_0x1ec564[_0x5ea05c(0xe2)]}:_0x5756d5!=null&&_0x5756d5['from']&&(_0x36e8d9[_0x5ea05c(0xb7)]=_0x5756d5[_0x5ea05c(0xb7)]),_0x5875f2?_0x36e8d9['to']={'shapeId':_0x5875f2[_0x5ea05c(0xd8)]['drawId'],'cxnIndex':_0x5875f2['connectionSiteIndex']}:_0x5756d5!=null&&_0x5756d5['to']&&(_0x36e8d9['to']=_0x5756d5['to']),this[_0x5ea05c(0xba)]['executeCommand'](_0x20a1ba['id'],{'unitId':_0x110ae7,'subUnitId':_0x212d42,'connectorShapeId':_0x595443[_0x5ea05c(0xde)],'width':_0x109ebd['worldRect'][_0x5ea05c(0xe7)],'height':_0x109ebd[_0x5ea05c(0xbd)][_0x5ea05c(0xcd)],'left':_0x109ebd[_0x5ea05c(0xbd)][_0x5ea05c(0xbe)],'top':_0x109ebd[_0x5ea05c(0xbd)]['top'],'flipX':_0x109ebd[_0x5ea05c(0xbd)][_0x5ea05c(0xad)]||!0x1,'flipY':_0x109ebd[_0x5ea05c(0xbd)][_0x5ea05c(0xc3)]||!0x1,'oldAdjustValues':_0xb8d6fe,'newAdjustValues':_0x109ebd[_0x5ea05c(0xee)],'newLineType':_0x109ebd[_0x5ea05c(0xc1)],'oldLineType':_0x2f4b05,'rotation':_0x109ebd['rotation'],'oldRelation':_0x5756d5,'newRelation':_0x36e8d9});}['_preloadShapeProperties'](_0x113366,_0x44868a,_0x497ee9,_0x27f44e){const _0x56ed2b=_0x2d9630;let _0x43538b=this['_injector'][_0x56ed2b(0xda)](_0x1f0733)[_0x56ed2b(0xae)]({'unitId':_0x44868a,'subUnitId':_0x497ee9,'drawingId':_0x27f44e});if(_0x43538b!=null&&_0x43538b[_0x56ed2b(0x98)]){var _0x50d86c,_0x2b585b,_0x56e9b0,_0x589994;_0x113366['x']=(_0x50d86c=_0x43538b['transform'][_0x56ed2b(0xbe)])==null?0x0:_0x50d86c,_0x113366['y']=(_0x2b585b=_0x43538b['transform'][_0x56ed2b(0x8f)])==null?0x0:_0x2b585b,_0x113366[_0x56ed2b(0xe7)]=(_0x56e9b0=_0x43538b['transform'][_0x56ed2b(0xe7)])==null?_0x113366['width']:_0x56e9b0,_0x113366[_0x56ed2b(0xcd)]=(_0x589994=_0x43538b['transform'][_0x56ed2b(0xcd)])==null?_0x113366['height']:_0x589994;}let _0xcacc72=this[_0x56ed2b(0xc5)][_0x56ed2b(0xda)](_0x4cfbb0)[_0x56ed2b(0x91)](_0x44868a,_0x497ee9,_0x27f44e);if(_0xcacc72){_0x113366[_0x56ed2b(0xc0)]=_0xcacc72[_0x56ed2b(0xfe)]();let _0x55748d=_0xcacc72[_0x56ed2b(0xaf)]();_0x55748d&&(_0x113366[_0x56ed2b(0xb1)]=JSON['parse'](JSON[_0x56ed2b(0xed)](_0x55748d)));}}['_resolveEndpoints'](_0x5c1e4b,_0x58a81c,_0x213f0f,_0x59c7e5,_0x564dea,_0x51c78d,_0x190707,_0x233fc5,_0x275ebb){const _0x1f41df=_0x2d9630;let _0x194c89=null,_0x4f94fc=null;return _0x564dea&&(_0x194c89=I(_0x5c1e4b,_0x58a81c,_0x564dea[_0x1f41df(0xd8)][_0x1f41df(0xde)],_0x564dea[_0x1f41df(0xe2)],_0x190707,_0x233fc5)),_0x51c78d&&(_0x4f94fc=I(_0x5c1e4b,_0x58a81c,_0x51c78d[_0x1f41df(0xd8)][_0x1f41df(0xde)],_0x51c78d[_0x1f41df(0xe2)],_0x190707,_0x233fc5)),_0x194c89||(_0x194c89=this['_resolveExistingOrFreeEndpoint'](_0x5c1e4b,_0x58a81c,_0x213f0f['drawId'],!0x0,_0x4f94fc,_0x275ebb==null?void 0x0:_0x275ebb['from'],_0x190707,_0x233fc5)),_0x4f94fc||(_0x4f94fc=this['_resolveExistingOrFreeEndpoint'](_0x5c1e4b,_0x58a81c,_0x213f0f[_0x1f41df(0xde)],!0x1,_0x194c89,_0x275ebb==null?void 0x0:_0x275ebb['to'],_0x190707,_0x233fc5)),{'startInfo':_0x194c89,'endInfo':_0x4f94fc};}['_resolveExistingOrFreeEndpoint'](_0x1af5b4,_0x312dd8,_0x3f4628,_0x4e9107,_0x267130,_0x33a232,_0x3ba77b,_0x89a93d){const _0x279d20=_0x2d9630;if(_0x33a232){let _0x375511=I(_0x1af5b4,_0x312dd8,_0x33a232[_0x279d20(0xc7)],_0x33a232[_0x279d20(0xd7)],_0x3ba77b,_0x89a93d);if(_0x375511)return _0x375511;}return _0x267130?R(_0x1af5b4,_0x312dd8,_0x3f4628,_0x4e9107,_0x267130,_0x3ba77b,_0x89a93d):null;}};_0x5b4d34[_0x2d9630(0xf0)](z);export{F as FConnectorShape,P as FShape};
1
+ const _0x12986b=_0x5565;(function(_0x5954b7,_0xd9c166){const _0x5f24dd=_0x5565,_0x4d1e3d=_0x5954b7();while(!![]){try{const _0x18d354=-parseInt(_0x5f24dd(0x179))/0x1+-parseInt(_0x5f24dd(0x180))/0x2*(-parseInt(_0x5f24dd(0x121))/0x3)+parseInt(_0x5f24dd(0x137))/0x4+parseInt(_0x5f24dd(0x142))/0x5+parseInt(_0x5f24dd(0x157))/0x6*(parseInt(_0x5f24dd(0x18a))/0x7)+parseInt(_0x5f24dd(0x12e))/0x8*(parseInt(_0x5f24dd(0x122))/0x9)+-parseInt(_0x5f24dd(0x11c))/0xa;if(_0x18d354===_0xd9c166)break;else _0x4d1e3d['push'](_0x4d1e3d['shift']());}catch(_0x1282a8){_0x4d1e3d['push'](_0x4d1e3d['shift']());}}}(_0xa6ed,0x24e4d));function _0xa6ed(){const _0x25b3ab=['worldRect','getShapeData','insertShape','startArrow','localToWorld','2unlTMu','fill','length','ShapeGradientTypeEnum','height','getAdjustNames','setShapeSolidFill','newConnector','executeCommand','getWorkbook','133NYPpRZ','subUnitId','constructor','getShapeType','gradientStops','fillType','setAbsolutePosition','updateShape','getShapeId','toPrimitive','stroke','prototype','getDrawingPoints','size','1795900oRRInN','setShapeType','DRAWING_SHAPE','drawId','_preloadShapeProperties','95043zRvReQ','71073MZUevu','stringify','ShapeLineTypeEnum','setStrokeOpacity','newShape','ShapeLineDashEnum','getDrawingByParam','colorStops\x20is\x20required\x20and\x20should\x20contain\x20at\x20least\x20one\x20color\x20stop.','symbol','getShapeModel','color','setShapeGradientFill','152cLGNkb','capType','isLineShape','lineStrokeType','get','setEndArrowSize','setStrokeLineJoinType','connectShapes','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','200616YjrWYv','setHeight','setStrokeLineType','getAdjustValueByName','setStrokeLineDashType','cos','_resolveEndpoints','opacity','setStrokeColor','getDrawingData','getSheetId','1502235ytkUZy','Skeleton\x20for\x20unitId\x20','flipX','ensureSkeleton','width','left','shapeType','\x20not\x20found','NoFill','find','GradientFill','setPosition','_injector','rotation','unitId','getUnitId','transform','setStartArrowType','defineProperty','abs','getShapes','27948vehdkO','shape','_resolveExistingOrFreeEndpoint','updateContext','extend','relation','build','setNoneFill','ShapeTypeEnum','point','ShapeArrowTypeEnum','setEndArrowType','getEndConnectInfo','drawingType','push','adjustValues','entries','setWidth','getStartConnectInfo','setStrokeLineCapType','endArrow','function','_commandService','getConnectorLinePoints','from','getAdjustPoints','connectionSiteIndex','getConnectionSiteList','removeShape','Shape\x20type\x20is\x20required.\x20Please\x20call\x20setShapeType()\x20before\x20build().','gradientAngle','type','flipY','top','290120hpJNfC','shapeData'];_0xa6ed=function(){return _0x25b3ab;};return _0xa6ed();}import{ConnectorCoordinateTransform,ShapeArrowSizeEnum,ShapeArrowTypeEnum,ShapeFillEnum,ShapeGradientTypeEnum,ShapeLineCapEnum,ShapeLineDashEnum,ShapeLineJoinEnum,ShapeLineTypeEnum,ShapeTypeEnum,computeConnectorRouteLayout,getBasicShapeRotateBound,isConnectorShape,routeConnectorLineShape}from'@univerjs-pro/engine-shape';import{FEnum}from'@univerjs/core/facade';import{DEFAULT_SHAPE_HEIGHT,DEFAULT_SHAPE_WIDTH,InsertShapeCommand,SetShapeDrawingDataCommand,SheetsShapeService,UpdateConnectorRelationCommand}from'@univerjs-pro/sheets-shape';import{DrawingTypeEnum,generateRandomId}from'@univerjs/core';import{IDrawingManagerService}from'@univerjs/drawing';import{SheetSkeletonService,convertPositionCellToSheetOverGrid}from'@univerjs/sheets';import{ISheetDrawingService,RemoveSheetDrawingCommand}from'@univerjs/sheets-drawing';import{FWorksheet}from'@univerjs/sheets/facade';function _0x5565(_0x1ed8fe,_0x505307){_0x1ed8fe=_0x1ed8fe-0x112;const _0xa6edcf=_0xa6ed();let _0x5565a6=_0xa6edcf[_0x1ed8fe];return _0x5565a6;}var FSheetsShapeEnumMixin=class extends FEnum{get[_0x12986b(0x15f)](){return ShapeTypeEnum;}get['ShapeFillEnum'](){return ShapeFillEnum;}get[_0x12986b(0x183)](){return ShapeGradientTypeEnum;}get[_0x12986b(0x124)](){return ShapeLineTypeEnum;}get[_0x12986b(0x127)](){return ShapeLineDashEnum;}get['ShapeLineCapEnum'](){return ShapeLineCapEnum;}get['ShapeLineJoinEnum'](){return ShapeLineJoinEnum;}get[_0x12986b(0x161)](){return ShapeArrowTypeEnum;}get['ShapeArrowSizeEnum'](){return ShapeArrowSizeEnum;}};FEnum[_0x12986b(0x15b)](FSheetsShapeEnumMixin);function _typeof(_0x4570d6){'@babel/helpers - typeof';const _0x260211=_0x12986b;return _typeof=_0x260211(0x16c)==typeof Symbol&&_0x260211(0x12a)==typeof Symbol['iterator']?function(_0x27587b){return typeof _0x27587b;}:function(_0x283af7){const _0x133e61=_0x260211;return _0x283af7&&_0x133e61(0x16c)==typeof Symbol&&_0x283af7[_0x133e61(0x18c)]===Symbol&&_0x283af7!==Symbol[_0x133e61(0x119)]?_0x133e61(0x12a):typeof _0x283af7;},_typeof(_0x4570d6);}function toPrimitive(_0x46cfb5,_0x11a639){const _0x6c1bf=_0x12986b;if('object'!=_typeof(_0x46cfb5)||!_0x46cfb5)return _0x46cfb5;var _0x2a1de9=_0x46cfb5[Symbol[_0x6c1bf(0x117)]];if(void 0x0!==_0x2a1de9){var _0x54f064=_0x2a1de9['call'](_0x46cfb5,_0x11a639||'default');if('object'!=_typeof(_0x54f064))return _0x54f064;throw new TypeError(_0x6c1bf(0x136));}return('string'===_0x11a639?String:Number)(_0x46cfb5);}function toPropertyKey(_0x423d8a){const _0x3fcf73=_0x12986b;var _0x1ccda9=toPrimitive(_0x423d8a,'string');return _0x3fcf73(0x12a)==_typeof(_0x1ccda9)?_0x1ccda9:_0x1ccda9+'';}function _defineProperty(_0x4dfcac,_0x16ed89,_0x5515f7){const _0x188206=_0x12986b;return(_0x16ed89=toPropertyKey(_0x16ed89))in _0x4dfcac?Object[_0x188206(0x154)](_0x4dfcac,_0x16ed89,{'value':_0x5515f7,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4dfcac[_0x16ed89]=_0x5515f7,_0x4dfcac;}var FShape=class{constructor(_0xc2cf06,_0x5c2a17,_0x4e2809,_0x27d71a){const _0x2c8527=_0x12986b;_defineProperty(this,'unitId',void 0x0),_defineProperty(this,_0x2c8527(0x18b),void 0x0),_defineProperty(this,_0x2c8527(0x11f),void 0x0),_defineProperty(this,'x',0x0),_defineProperty(this,'y',0x0),_defineProperty(this,_0x2c8527(0x146),DEFAULT_SHAPE_WIDTH),_defineProperty(this,_0x2c8527(0x184),DEFAULT_SHAPE_HEIGHT),_defineProperty(this,_0x2c8527(0x148),void 0x0),_defineProperty(this,_0x2c8527(0x17a),{}),_defineProperty(this,_0x2c8527(0x14e),void 0x0),this[_0x2c8527(0x150)]=_0xc2cf06,this['subUnitId']=_0x5c2a17,this[_0x2c8527(0x11f)]=_0x4e2809||generateRandomId(),this[_0x2c8527(0x14e)]=_0x27d71a;}[_0x12986b(0x14d)](_0x3b9632,_0x28391a,_0x51f356,_0x2b94c9){const _0x1e4115=_0x12986b,_0x4aafdc=this[_0x1e4115(0x14e)][_0x1e4115(0x132)](SheetSkeletonService)[_0x1e4115(0x145)](this['unitId'],this[_0x1e4115(0x18b)]);if(!_0x4aafdc)throw new Error(_0x1e4115(0x143)+this['unitId']+'\x20and\x20subUnitId\x20'+this[_0x1e4115(0x18b)]+'\x20not\x20found');const {transform:_0xb8415f}=convertPositionCellToSheetOverGrid(this['unitId'],this[_0x1e4115(0x18b)],{'row':_0x3b9632,'column':_0x28391a,'rowOffset':_0x51f356,'columnOffset':_0x2b94c9},0x1,0x1,_0x4aafdc);return this['x']=_0xb8415f['left'],this['y']=_0xb8415f[_0x1e4115(0x178)],this;}[_0x12986b(0x114)](_0x30fd1a,_0x4eb5dc){return this['x']=_0x30fd1a,this['y']=_0x4eb5dc,this;}[_0x12986b(0x11d)](_0x2a59c5){const _0x375c92=_0x12986b;return this[_0x375c92(0x148)]=_0x2a59c5,this;}[_0x12986b(0x186)](_0x329ed1,_0x59c114){const _0x4b42c8=_0x12986b;if(!this['shapeData']['fill'])this['shapeData'][_0x4b42c8(0x181)]={};this[_0x4b42c8(0x17a)][_0x4b42c8(0x181)][_0x4b42c8(0x113)]=ShapeFillEnum['SolidFill'];if(_0x329ed1!==void 0x0)this[_0x4b42c8(0x17a)][_0x4b42c8(0x181)][_0x4b42c8(0x12c)]=_0x329ed1;if(_0x59c114!==void 0x0)this[_0x4b42c8(0x17a)][_0x4b42c8(0x181)][_0x4b42c8(0x13e)]=_0x59c114;return this;}[_0x12986b(0x12d)](_0x2ce4a6,_0x482e4c,_0x215296){const _0x17eb1a=_0x12986b;if(_0x482e4c===void 0x0||_0x482e4c[_0x17eb1a(0x182)]===0x0)throw new Error(_0x17eb1a(0x129));if(!this[_0x17eb1a(0x17a)][_0x17eb1a(0x181)])this[_0x17eb1a(0x17a)][_0x17eb1a(0x181)]={};this[_0x17eb1a(0x17a)]['fill'][_0x17eb1a(0x112)]=_0x482e4c,this[_0x17eb1a(0x17a)][_0x17eb1a(0x181)]['fillType']=ShapeFillEnum[_0x17eb1a(0x14c)],this['shapeData'][_0x17eb1a(0x181)]['gradientType']=_0x2ce4a6;if(_0x215296!==void 0x0)this['shapeData'][_0x17eb1a(0x181)][_0x17eb1a(0x175)]=_0x215296;return this;}[_0x12986b(0x15e)](){const _0x389766=_0x12986b;return this['shapeData'][_0x389766(0x181)]={'fillType':ShapeFillEnum[_0x389766(0x14a)]},this;}[_0x12986b(0x13f)](_0x202128){const _0xe2c675=_0x12986b;if(!this['shapeData'][_0xe2c675(0x118)])this['shapeData']['stroke']={};return this[_0xe2c675(0x17a)]['stroke'][_0xe2c675(0x12c)]=_0x202128,this;}['setStrokeWidth'](_0x316bbc){const _0x4bf49f=_0x12986b;if(!this[_0x4bf49f(0x17a)]['stroke'])this[_0x4bf49f(0x17a)][_0x4bf49f(0x118)]={};return this['shapeData'][_0x4bf49f(0x118)][_0x4bf49f(0x146)]=_0x316bbc,this;}[_0x12986b(0x13b)](_0x1382e6){const _0x467144=_0x12986b;if(!this[_0x467144(0x17a)][_0x467144(0x118)])this[_0x467144(0x17a)][_0x467144(0x118)]={};return this[_0x467144(0x17a)][_0x467144(0x118)]['dashType']=_0x1382e6,this;}[_0x12986b(0x134)](_0x1f5819){const _0x2d72dc=_0x12986b;if(!this['shapeData'][_0x2d72dc(0x118)])this['shapeData'][_0x2d72dc(0x118)]={};return this[_0x2d72dc(0x17a)][_0x2d72dc(0x118)]['lineJoinType']=_0x1f5819,this;}[_0x12986b(0x16a)](_0x58af8f){const _0x2bbeba=_0x12986b;if(!this[_0x2bbeba(0x17a)]['stroke'])this[_0x2bbeba(0x17a)][_0x2bbeba(0x118)]={};return this['shapeData'][_0x2bbeba(0x118)][_0x2bbeba(0x12f)]=_0x58af8f,this;}[_0x12986b(0x125)](_0x4ef375){const _0x172876=_0x12986b;if(!this[_0x172876(0x17a)][_0x172876(0x118)])this[_0x172876(0x17a)][_0x172876(0x118)]={};return this[_0x172876(0x17a)]['stroke'][_0x172876(0x13e)]=_0x4ef375,this;}[_0x12986b(0x139)](_0x20ed44){const _0x4c339b=_0x12986b;if(!this[_0x4c339b(0x17a)]['stroke'])this[_0x4c339b(0x17a)]['stroke']={};return this['shapeData']['stroke'][_0x4c339b(0x131)]=_0x20ed44,this;}[_0x12986b(0x168)](_0x3a5aeb){const _0xbd0a12=_0x12986b;return this[_0xbd0a12(0x146)]=_0x3a5aeb,this;}[_0x12986b(0x138)](_0x27d9bb){const _0x44bca0=_0x12986b;return this[_0x44bca0(0x184)]=_0x27d9bb,this;}[_0x12986b(0x130)](){const _0x503b66=_0x12986b,_0x1073f4=this[_0x503b66(0x14e)]['get'](SheetsShapeService)[_0x503b66(0x12b)](this[_0x503b66(0x150)],this['subUnitId'],this['drawId']);if(_0x1073f4)return isConnectorShape(_0x1073f4[_0x503b66(0x18d)]());if(this[_0x503b66(0x148)])return isConnectorShape(this[_0x503b66(0x148)]);return![];}['getConnectionSites'](){const _0x44a024=_0x12986b,_0xdfb730=this['_injector']['get'](SheetsShapeService)[_0x44a024(0x12b)](this[_0x44a024(0x150)],this[_0x44a024(0x18b)],this[_0x44a024(0x11f)]);if(!_0xdfb730)return[];const _0x27404e=this[_0x44a024(0x14e)][_0x44a024(0x132)](IDrawingManagerService)['getDrawingByParam']({'unitId':this[_0x44a024(0x150)],'subUnitId':this['subUnitId'],'drawingId':this[_0x44a024(0x11f)]});if(!(_0x27404e===null||_0x27404e===void 0x0?void 0x0:_0x27404e['transform']))return[];const {width:width=0x0,height:height=0x0}=_0x27404e[_0x44a024(0x152)];return _0xdfb730['updateContext']({'width':width,'height':height}),_0xdfb730[_0x44a024(0x172)]();}[_0x12986b(0x170)](){const _0x3f6dd2=_0x12986b,_0x17fca8=this[_0x3f6dd2(0x14e)]['get'](SheetsShapeService)['getShapeModel'](this[_0x3f6dd2(0x150)],this['subUnitId'],this['drawId']);if(!_0x17fca8)return[];const _0x1dbd3e=this[_0x3f6dd2(0x14e)]['get'](IDrawingManagerService)[_0x3f6dd2(0x128)]({'unitId':this[_0x3f6dd2(0x150)],'subUnitId':this[_0x3f6dd2(0x18b)],'drawingId':this['drawId']});if(!(_0x1dbd3e===null||_0x1dbd3e===void 0x0?void 0x0:_0x1dbd3e[_0x3f6dd2(0x152)]))return[];const {width:width=0x0,height:height=0x0}=_0x1dbd3e['transform'];return _0x17fca8['updateContext']({'width':width,'height':height}),_0x17fca8[_0x3f6dd2(0x11a)]();}['getConnectorLinePoints'](){const _0x1a17cd=_0x12986b,_0x417c9c=this[_0x1a17cd(0x14e)][_0x1a17cd(0x132)](SheetsShapeService)['getShapeModel'](this[_0x1a17cd(0x150)],this[_0x1a17cd(0x18b)],this[_0x1a17cd(0x11f)]);if(!_0x417c9c)return[];if(!isConnectorShape(_0x417c9c[_0x1a17cd(0x18d)]()))return[];const _0x10620f=this[_0x1a17cd(0x14e)][_0x1a17cd(0x132)](IDrawingManagerService)[_0x1a17cd(0x128)]({'unitId':this[_0x1a17cd(0x150)],'subUnitId':this['subUnitId'],'drawingId':this['drawId']});if(!(_0x10620f===null||_0x10620f===void 0x0?void 0x0:_0x10620f[_0x1a17cd(0x152)]))return[];const {width:width=0x0,height:height=0x0}=_0x10620f[_0x1a17cd(0x152)];return _0x417c9c[_0x1a17cd(0x15a)]({'width':width,'height':height}),_0x417c9c['getConnectorLinePoints']();}[_0x12986b(0x169)](){const _0x684f15=_0x12986b;var _0x37ae34;const _0x42a840=this[_0x684f15(0x14e)][_0x684f15(0x132)](SheetsShapeService)['getShapeModel'](this['unitId'],this['subUnitId'],this[_0x684f15(0x11f)]);if(!_0x42a840)return null;return(_0x37ae34=_0x42a840['getStartConnectInfo']())!==null&&_0x37ae34!==void 0x0?_0x37ae34:null;}['getEndConnectInfo'](){const _0x20047d=_0x12986b;var _0x4d397c;const _0x263853=this['_injector']['get'](SheetsShapeService)[_0x20047d(0x12b)](this[_0x20047d(0x150)],this[_0x20047d(0x18b)],this[_0x20047d(0x11f)]);if(!_0x263853)return null;return(_0x4d397c=_0x263853[_0x20047d(0x163)]())!==null&&_0x4d397c!==void 0x0?_0x4d397c:null;}[_0x12986b(0x15d)](){const _0x3d24c2=_0x12986b;var _0x29f0a9,_0x3b4df7;if(!this[_0x3d24c2(0x148)])throw new Error(_0x3d24c2(0x174));if(this['x']===0x0||this['y']===0x0){const _0x4cfb68=this[_0x3d24c2(0x14e)][_0x3d24c2(0x132)](SheetSkeletonService)[_0x3d24c2(0x145)](this[_0x3d24c2(0x150)],this[_0x3d24c2(0x18b)]);if(!_0x4cfb68)throw new Error(_0x3d24c2(0x143)+this['unitId']+'\x20and\x20subUnitId\x20'+this[_0x3d24c2(0x18b)]+_0x3d24c2(0x149));const {transform:_0x4d83f6}=convertPositionCellToSheetOverGrid(this[_0x3d24c2(0x150)],this['subUnitId'],{'row':0x1,'column':0x1,'rowOffset':0x0,'columnOffset':0x0},0x1,0x1,_0x4cfb68);this['x']=this['x']>0x0?this['x']:_0x4d83f6[_0x3d24c2(0x147)],this['y']=this['y']>0x0?this['y']:_0x4d83f6[_0x3d24c2(0x178)];}return this[_0x3d24c2(0x146)]=(_0x29f0a9=this[_0x3d24c2(0x146)])!==null&&_0x29f0a9!==void 0x0?_0x29f0a9:DEFAULT_SHAPE_WIDTH,this['height']=(_0x3b4df7=this[_0x3d24c2(0x184)])!==null&&_0x3b4df7!==void 0x0?_0x3b4df7:DEFAULT_SHAPE_HEIGHT,{'unitId':this[_0x3d24c2(0x150)],'subUnitId':this['subUnitId'],'shapeId':this['drawId'],'shapeType':this[_0x3d24c2(0x148)],'shapeData':Object['keys'](this[_0x3d24c2(0x17a)])[_0x3d24c2(0x182)]>0x0?this['shapeData']:void 0x0,'x':this['x'],'y':this['y'],'width':this[_0x3d24c2(0x146)],'height':this[_0x3d24c2(0x184)]};}[_0x12986b(0x116)](){const _0xc7ca46=_0x12986b;return this[_0xc7ca46(0x11f)];}[_0x12986b(0x18d)](){const _0x2a590f=_0x12986b;return this[_0x2a590f(0x148)];}[_0x12986b(0x17c)](){const _0x2e38ef=_0x12986b;return this[_0x2e38ef(0x17a)];}['getPosition'](){return{'x':this['x'],'y':this['y']};}['getSize'](){const _0x5b50aa=_0x12986b;return{'width':this[_0x5b50aa(0x146)],'height':this[_0x5b50aa(0x184)]};}},FConnectorShape=class extends FShape{constructor(_0xd3ea5e,_0x5c6292,_0x93f24,_0x2c8307){super(_0xd3ea5e,_0x5c6292,_0x93f24,_0x2c8307),_defineProperty(this,'shapeData',{});}[_0x12986b(0x11d)](_0x1101c6){const _0x26e4a2=_0x12986b;if(!isConnectorShape(_0x1101c6))throw new Error('Invalid\x20shape\x20type\x20for\x20connector.\x20Received\x20'+_0x1101c6+',\x20but\x20expected\x20a\x20connector\x20shape\x20type.');return super[_0x26e4a2(0x11d)](_0x1101c6),this;}[_0x12986b(0x153)](_0x4ae818){const _0x297941=_0x12986b;var _0x5f07e5,_0x47f60d;if(!((_0x5f07e5=this['shapeData'])===null||_0x5f07e5===void 0x0?void 0x0:_0x5f07e5['ln']))this[_0x297941(0x17a)]['ln']={};if(!((_0x47f60d=this[_0x297941(0x17a)])===null||_0x47f60d===void 0x0||(_0x47f60d=_0x47f60d['ln'])===null||_0x47f60d===void 0x0?void 0x0:_0x47f60d[_0x297941(0x17e)]))this['shapeData']['ln']['startArrow']={};return this[_0x297941(0x17a)]['ln'][_0x297941(0x17e)][_0x297941(0x176)]=_0x4ae818,this;}[_0x12986b(0x162)](_0x4ee753){const _0x4add36=_0x12986b;var _0x3d1416,_0x3afea1;if(!((_0x3d1416=this[_0x4add36(0x17a)])===null||_0x3d1416===void 0x0?void 0x0:_0x3d1416['ln']))this[_0x4add36(0x17a)]['ln']={};if(!((_0x3afea1=this[_0x4add36(0x17a)])===null||_0x3afea1===void 0x0||(_0x3afea1=_0x3afea1['ln'])===null||_0x3afea1===void 0x0?void 0x0:_0x3afea1[_0x4add36(0x16b)]))this[_0x4add36(0x17a)]['ln'][_0x4add36(0x16b)]={};return this['shapeData']['ln'][_0x4add36(0x16b)][_0x4add36(0x176)]=_0x4ee753,this;}['setStartArrowSize'](_0x3bb477){const _0x1bdc15=_0x12986b;var _0x3b2884,_0x246dcb;if(!((_0x3b2884=this[_0x1bdc15(0x17a)])===null||_0x3b2884===void 0x0?void 0x0:_0x3b2884['ln']))this[_0x1bdc15(0x17a)]['ln']={};if(!((_0x246dcb=this[_0x1bdc15(0x17a)])===null||_0x246dcb===void 0x0||(_0x246dcb=_0x246dcb['ln'])===null||_0x246dcb===void 0x0?void 0x0:_0x246dcb[_0x1bdc15(0x17e)]))this[_0x1bdc15(0x17a)]['ln'][_0x1bdc15(0x17e)]={};return this['shapeData']['ln'][_0x1bdc15(0x17e)]['size']=_0x3bb477,this;}[_0x12986b(0x133)](_0x5ccabe){const _0x255f17=_0x12986b;var _0x220f62,_0x5ee33c;if(!((_0x220f62=this[_0x255f17(0x17a)])===null||_0x220f62===void 0x0?void 0x0:_0x220f62['ln']))this[_0x255f17(0x17a)]['ln']={};if(!((_0x5ee33c=this[_0x255f17(0x17a)])===null||_0x5ee33c===void 0x0||(_0x5ee33c=_0x5ee33c['ln'])===null||_0x5ee33c===void 0x0?void 0x0:_0x5ee33c[_0x255f17(0x16b)]))this[_0x255f17(0x17a)]['ln']['endArrow']={};return this['shapeData']['ln'][_0x255f17(0x16b)][_0x255f17(0x11b)]=_0x5ccabe,this;}[_0x12986b(0x15d)](){const _0x109c99=_0x12986b;return super[_0x109c99(0x15d)]();}[_0x12986b(0x163)](){const _0x5a33ba=_0x12986b;var _0x48dcea;return((_0x48dcea=this[_0x5a33ba(0x17a)])===null||_0x48dcea===void 0x0||(_0x48dcea=_0x48dcea[_0x5a33ba(0x15c)])===null||_0x48dcea===void 0x0?void 0x0:_0x48dcea['to'])||null;}['getStartConnectInfo'](){const _0xbf8bad=_0x12986b;var _0x304082;return((_0x304082=this['shapeData'])===null||_0x304082===void 0x0||(_0x304082=_0x304082[_0xbf8bad(0x15c)])===null||_0x304082===void 0x0?void 0x0:_0x304082['from'])||null;}};function computeConnectionPointInfo(_0x54cc25,_0x3977f5,_0x5be51c,_0x27d92d,_0x297e9d,_0x4722bd){const _0x448d29=_0x12986b,_0x2b9c82=_0x297e9d[_0x448d29(0x12b)](_0x54cc25,_0x3977f5,_0x5be51c);if(!_0x2b9c82)return null;const _0x217c75=_0x4722bd['getDrawingByParam']({'unitId':_0x54cc25,'subUnitId':_0x3977f5,'drawingId':_0x5be51c});if(!(_0x217c75===null||_0x217c75===void 0x0?void 0x0:_0x217c75[_0x448d29(0x152)]))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x1b57a1}=_0x217c75[_0x448d29(0x152)];_0x2b9c82[_0x448d29(0x15a)]({'width':width,'height':height});const _0x30aba8=_0x2b9c82[_0x448d29(0x172)]()[_0x448d29(0x14b)](_0x390c1e=>_0x390c1e['index']===_0x27d92d);if(!_0x30aba8)return null;let _0xa12970=flipX?width-_0x30aba8['x']:_0x30aba8['x'],_0x558fc5=flipY?height-_0x30aba8['y']:_0x30aba8['y'];if(_0x1b57a1&&_0x1b57a1!==0x0){const _0x58ac78=_0x1b57a1*Math['PI']/0xb4,_0x24db42=Math[_0x448d29(0x13c)](_0x58ac78),_0x139712=Math['sin'](_0x58ac78),_0x5c0401=width/0x2,_0x261546=height/0x2,_0x17915f=_0xa12970-_0x5c0401,_0xbfd97c=_0x558fc5-_0x261546;_0xa12970=_0x5c0401+_0x17915f*_0x24db42-_0xbfd97c*_0x139712,_0x558fc5=_0x261546+_0x17915f*_0x139712+_0xbfd97c*_0x24db42;}_0xa12970+=left,_0x558fc5+=top;let _0x1fc16d=_0x30aba8['ang']/0xea60;if(flipX)_0x1fc16d=0xb4-_0x1fc16d;if(flipY)_0x1fc16d=-_0x1fc16d;_0x1fc16d+=_0x1b57a1||0x0,_0x1fc16d=(_0x1fc16d%0x168+0x168)%0x168;const _0x3e56c8=getBasicShapeRotateBound({'left':left,'top':top,'width':width,'height':height},_0x1b57a1||0x0);return{'point':{'x':_0xa12970,'y':_0x558fc5},'angle':_0x1fc16d,'bounds':_0x3e56c8};}function calculateFreeEndpointAngle(_0x41eef1,_0x4bb047){const _0x4849bb=_0x12986b,_0x21931a=_0x4bb047['x']-_0x41eef1['x'],_0x231eb5=_0x4bb047['y']-_0x41eef1['y'];if(Math[_0x4849bb(0x155)](_0x21931a)>=Math[_0x4849bb(0x155)](_0x231eb5))return _0x21931a>=0x0?0xb4:0x0;return _0x231eb5>=0x0?0x10e:0x5a;}function computeFreeEndpointInfo(_0x443195,_0x5f02cd,_0x45c65b,_0x36980d,_0x5ef71a,_0x297677,_0x52990b){const _0x53cd9c=_0x12986b,_0x2a53c9=_0x297677['getShapeModel'](_0x443195,_0x5f02cd,_0x45c65b);if(!_0x2a53c9)return null;const _0x355730=_0x52990b[_0x53cd9c(0x128)]({'unitId':_0x443195,'subUnitId':_0x5f02cd,'drawingId':_0x45c65b});if(!(_0x355730===null||_0x355730===void 0x0?void 0x0:_0x355730[_0x53cd9c(0x152)]))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![]}=_0x355730[_0x53cd9c(0x152)];_0x2a53c9[_0x53cd9c(0x15a)]({'width':width,'height':height});const _0x4bc9b3=_0x2a53c9[_0x53cd9c(0x16e)]();if(_0x4bc9b3['length']<0x2)return null;const _0x4aab69=_0x36980d?_0x4bc9b3[0x0]:_0x4bc9b3[_0x4bc9b3[_0x53cd9c(0x182)]-0x1],_0xa34a87=new ConnectorCoordinateTransform({'left':left,'top':top,'width':width,'height':height,'flipX':flipX,'flipY':flipY})[_0x53cd9c(0x17f)](_0x4aab69);return{'point':_0xa34a87,'angle':calculateFreeEndpointAngle(_0x5ef71a[_0x53cd9c(0x160)],_0xa34a87),'bounds':{'left':_0xa34a87['x'],'top':_0xa34a87['y'],'width':0x0,'height':0x0}};}var FWorksheetShapeMixin=class extends FWorksheet{async[_0x12986b(0x17d)](_0x580c29){const _0x1d4706=_0x12986b,{unitId:_0x557796,subUnitId:_0x2c8de1,shapeId:_0x1ba1b5,shapeType:_0x19c115,shapeData:_0x8b1d2d,x:_0xbdd58f,y:_0x3ed08b,width:_0x3806fe,height:_0x3a0255}=_0x580c29;return this[_0x1d4706(0x16d)]['executeCommand'](InsertShapeCommand['id'],{'unitId':_0x557796,'subUnitId':_0x2c8de1,'shapeId':_0x1ba1b5,'shapeType':_0x19c115,'shapeData':_0x8b1d2d,'position':{'x':_0xbdd58f,'y':_0x3ed08b},'width':_0x3806fe,'height':_0x3a0255});}async[_0x12986b(0x115)](_0x253c54){const _0x136528=_0x12986b,{unitId:_0x59821b,subUnitId:_0x26a514,shapeId:_0x409bd3,shapeType:_0x1f1eac,shapeData:_0x32916c,x:_0x1ff886,y:_0x43a7ef,width:_0x4f1d1b,height:_0x381587}=_0x253c54;return this[_0x136528(0x16d)][_0x136528(0x188)](SetShapeDrawingDataCommand['id'],{'unitId':_0x59821b,'subUnitId':_0x26a514,'shapeId':_0x409bd3,'shapeType':_0x1f1eac,'shapeData':_0x32916c,'position':{'x':_0x1ff886,'y':_0x43a7ef},'width':_0x4f1d1b,'height':_0x381587});}[_0x12986b(0x126)](_0xa66d77){const _0x50ddb8=_0x12986b,_0x1ddb90=this['getWorkbook']()[_0x50ddb8(0x151)](),_0x59cbcf=this[_0x50ddb8(0x141)]();if(_0xa66d77){const _0x484994=new FShape(_0x1ddb90,_0x59cbcf,_0xa66d77[_0x50ddb8(0x11f)],this[_0x50ddb8(0x14e)]);return this[_0x50ddb8(0x120)](_0x484994,_0x1ddb90,_0x59cbcf,_0xa66d77['drawId']),_0x484994;}return new FShape(_0x1ddb90,_0x59cbcf,generateRandomId(),this['_injector']);}[_0x12986b(0x187)](_0x4638e2){const _0x345c1d=_0x12986b,_0x2ac3f9=this[_0x345c1d(0x189)]()[_0x345c1d(0x151)](),_0x5a527d=this['getSheetId']();if(_0x4638e2){const _0x67b3c5=new FConnectorShape(_0x2ac3f9,_0x5a527d,_0x4638e2[_0x345c1d(0x11f)],this[_0x345c1d(0x14e)]);return this[_0x345c1d(0x120)](_0x67b3c5,_0x2ac3f9,_0x5a527d,_0x4638e2[_0x345c1d(0x11f)]),_0x67b3c5;}return new FConnectorShape(_0x2ac3f9,_0x5a527d,generateRandomId(),this[_0x345c1d(0x14e)]);}[_0x12986b(0x156)](){const _0x1e2a53=_0x12986b,_0x7a58bc=this[_0x1e2a53(0x14e)][_0x1e2a53(0x132)](ISheetDrawingService),_0x3f684a=this['getWorkbook']()[_0x1e2a53(0x151)](),_0x150ec7=this[_0x1e2a53(0x141)](),_0x1a246e=_0x7a58bc[_0x1e2a53(0x140)](_0x3f684a,_0x150ec7);if(!_0x1a246e)return[];const _0x2efefa=[];for(const [_0x522f1f,_0x1ccbc2]of Object[_0x1e2a53(0x167)](_0x1a246e))if(_0x1ccbc2&&_0x1ccbc2[_0x1e2a53(0x164)]===DrawingTypeEnum[_0x1e2a53(0x11e)]){const _0xc497d7=new FShape(_0x3f684a,_0x150ec7,_0x522f1f,this['_injector']);this[_0x1e2a53(0x120)](_0xc497d7,_0x3f684a,_0x150ec7,_0x522f1f),_0x2efefa[_0x1e2a53(0x165)](_0xc497d7);}return _0x2efefa;}[_0x12986b(0x173)](_0x8cfe96){const _0x2a1f39=_0x12986b,{unitId:_0x4bc8c6,subUnitId:_0xbeff8d,drawId:_0x8d6d30}=_0x8cfe96;return this[_0x2a1f39(0x16d)][_0x2a1f39(0x188)](RemoveSheetDrawingCommand['id'],{'unitId':_0x4bc8c6,'drawings':[{'unitId':_0x4bc8c6,'subUnitId':_0xbeff8d,'drawingId':_0x8d6d30,'drawingType':DrawingTypeEnum['DRAWING_SHAPE']}]});}async[_0x12986b(0x135)](_0x2504f5){const _0x2e39da=_0x12986b,{connector:_0x2b7e29,startTarget:_0x3aacbe,endTarget:_0x14b306}=_0x2504f5;if(!_0x3aacbe&&!_0x14b306)return![];const _0x51254c=this['getWorkbook']()[_0x2e39da(0x151)](),_0x2d71c5=this[_0x2e39da(0x141)](),_0xc35790=this[_0x2e39da(0x14e)][_0x2e39da(0x132)](SheetsShapeService),_0x38ea94=this[_0x2e39da(0x14e)][_0x2e39da(0x132)](IDrawingManagerService),_0x4abd55=_0xc35790[_0x2e39da(0x12b)](_0x51254c,_0x2d71c5,_0x2b7e29[_0x2e39da(0x11f)]);if(!_0x4abd55)return![];const _0x3d53d4=_0x4abd55['getShapeType'](),_0x642960=_0x4abd55['getShapeRelation'](),_0x5aea71={};for(const _0x164431 of _0x4abd55[_0x2e39da(0x185)]()){const _0x1df45a=_0x4abd55[_0x2e39da(0x13a)](_0x164431);if(_0x1df45a!==void 0x0)_0x5aea71[_0x164431]=_0x1df45a;}const {startInfo:_0x3dcae5,endInfo:_0x38b051}=this[_0x2e39da(0x13d)](_0x51254c,_0x2d71c5,_0x2b7e29,_0x4abd55,_0x3aacbe,_0x14b306,_0xc35790,_0x38ea94,_0x642960);if(!_0x3dcae5||!_0x38b051)return![];const _0x1372df=computeConnectorRouteLayout(routeConnectorLineShape(_0x3dcae5,_0x38b051,_0x3d53d4),_0x3d53d4),_0x466777={};if(_0x3aacbe)_0x466777['from']={'shapeId':_0x3aacbe[_0x2e39da(0x158)][_0x2e39da(0x11f)],'cxnIndex':_0x3aacbe[_0x2e39da(0x171)]};else{if(_0x642960===null||_0x642960===void 0x0?void 0x0:_0x642960[_0x2e39da(0x16f)])_0x466777[_0x2e39da(0x16f)]=_0x642960[_0x2e39da(0x16f)];}if(_0x14b306)_0x466777['to']={'shapeId':_0x14b306[_0x2e39da(0x158)][_0x2e39da(0x11f)],'cxnIndex':_0x14b306[_0x2e39da(0x171)]};else{if(_0x642960===null||_0x642960===void 0x0?void 0x0:_0x642960['to'])_0x466777['to']=_0x642960['to'];}return this[_0x2e39da(0x16d)][_0x2e39da(0x188)](UpdateConnectorRelationCommand['id'],{'unitId':_0x51254c,'subUnitId':_0x2d71c5,'connectorShapeId':_0x2b7e29['drawId'],'width':_0x1372df[_0x2e39da(0x17b)]['width'],'height':_0x1372df[_0x2e39da(0x17b)][_0x2e39da(0x184)],'left':_0x1372df[_0x2e39da(0x17b)][_0x2e39da(0x147)],'top':_0x1372df['worldRect'][_0x2e39da(0x178)],'flipX':_0x1372df[_0x2e39da(0x17b)][_0x2e39da(0x144)]||![],'flipY':_0x1372df['worldRect'][_0x2e39da(0x177)]||![],'oldAdjustValues':_0x5aea71,'newAdjustValues':_0x1372df[_0x2e39da(0x166)],'newLineType':_0x1372df['lineType'],'oldLineType':_0x3d53d4,'rotation':_0x1372df[_0x2e39da(0x14f)],'oldRelation':_0x642960,'newRelation':_0x466777});}[_0x12986b(0x120)](_0x3f55ef,_0x993319,_0x512a9f,_0xb4479b){const _0x33bb1b=_0x12986b,_0x442a83=this[_0x33bb1b(0x14e)][_0x33bb1b(0x132)](IDrawingManagerService)[_0x33bb1b(0x128)]({'unitId':_0x993319,'subUnitId':_0x512a9f,'drawingId':_0xb4479b});if(_0x442a83===null||_0x442a83===void 0x0?void 0x0:_0x442a83[_0x33bb1b(0x152)]){var _0x4c826b,_0x1d450d,_0x9778ae,_0x4edb0e;_0x3f55ef['x']=(_0x4c826b=_0x442a83['transform'][_0x33bb1b(0x147)])!==null&&_0x4c826b!==void 0x0?_0x4c826b:0x0,_0x3f55ef['y']=(_0x1d450d=_0x442a83[_0x33bb1b(0x152)]['top'])!==null&&_0x1d450d!==void 0x0?_0x1d450d:0x0,_0x3f55ef[_0x33bb1b(0x146)]=(_0x9778ae=_0x442a83[_0x33bb1b(0x152)][_0x33bb1b(0x146)])!==null&&_0x9778ae!==void 0x0?_0x9778ae:_0x3f55ef['width'],_0x3f55ef[_0x33bb1b(0x184)]=(_0x4edb0e=_0x442a83[_0x33bb1b(0x152)][_0x33bb1b(0x184)])!==null&&_0x4edb0e!==void 0x0?_0x4edb0e:_0x3f55ef[_0x33bb1b(0x184)];}const _0x17f1f2=this[_0x33bb1b(0x14e)][_0x33bb1b(0x132)](SheetsShapeService)[_0x33bb1b(0x12b)](_0x993319,_0x512a9f,_0xb4479b);if(_0x17f1f2){_0x3f55ef[_0x33bb1b(0x148)]=_0x17f1f2['getShapeType']();const _0x1f6398=_0x17f1f2['getShapeData']();if(_0x1f6398)_0x3f55ef[_0x33bb1b(0x17a)]=JSON['parse'](JSON[_0x33bb1b(0x123)](_0x1f6398));}}[_0x12986b(0x13d)](_0x4e659b,_0x3e3ffa,_0x4d7bc7,_0x366373,_0x18bf0d,_0x7cf596,_0x3356a7,_0x25790e,_0x450c3c){const _0x3e2c54=_0x12986b;let _0xb897b3=null,_0x22e6a5=null;if(_0x18bf0d)_0xb897b3=computeConnectionPointInfo(_0x4e659b,_0x3e3ffa,_0x18bf0d[_0x3e2c54(0x158)][_0x3e2c54(0x11f)],_0x18bf0d[_0x3e2c54(0x171)],_0x3356a7,_0x25790e);if(_0x7cf596)_0x22e6a5=computeConnectionPointInfo(_0x4e659b,_0x3e3ffa,_0x7cf596[_0x3e2c54(0x158)]['drawId'],_0x7cf596[_0x3e2c54(0x171)],_0x3356a7,_0x25790e);if(!_0xb897b3)_0xb897b3=this[_0x3e2c54(0x159)](_0x4e659b,_0x3e3ffa,_0x4d7bc7[_0x3e2c54(0x11f)],!![],_0x22e6a5,_0x450c3c===null||_0x450c3c===void 0x0?void 0x0:_0x450c3c[_0x3e2c54(0x16f)],_0x3356a7,_0x25790e);if(!_0x22e6a5)_0x22e6a5=this['_resolveExistingOrFreeEndpoint'](_0x4e659b,_0x3e3ffa,_0x4d7bc7[_0x3e2c54(0x11f)],![],_0xb897b3,_0x450c3c===null||_0x450c3c===void 0x0?void 0x0:_0x450c3c['to'],_0x3356a7,_0x25790e);return{'startInfo':_0xb897b3,'endInfo':_0x22e6a5};}[_0x12986b(0x159)](_0x4574db,_0xc2f15c,_0x2d1fe9,_0x23e9ad,_0x26d5da,_0x393f7a,_0x229045,_0x19305e){if(_0x393f7a){const _0x5b8522=computeConnectionPointInfo(_0x4574db,_0xc2f15c,_0x393f7a['shapeId'],_0x393f7a['cxnIndex'],_0x229045,_0x19305e);if(_0x5b8522)return _0x5b8522;}if(!_0x26d5da)return null;return computeFreeEndpointInfo(_0x4574db,_0xc2f15c,_0x2d1fe9,_0x23e9ad,_0x26d5da,_0x229045,_0x19305e);}};FWorksheet['extend'](FWorksheetShapeMixin);export{FConnectorShape,FShape};