@univerjs-pro/sheets-shape 0.18.0 → 0.19.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/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x418a27=_0x377f;(function(_0x3ea5ee,_0x1501e4){const _0x210de3=_0x377f,_0xf8830a=_0x3ea5ee();while(!![]){try{const _0x4358cc=parseInt(_0x210de3(0xbf))/0x1*(parseInt(_0x210de3(0xaa))/0x2)+parseInt(_0x210de3(0xf7))/0x3*(-parseInt(_0x210de3(0x97))/0x4)+parseInt(_0x210de3(0xeb))/0x5+-parseInt(_0x210de3(0xa0))/0x6*(parseInt(_0x210de3(0x9d))/0x7)+-parseInt(_0x210de3(0x86))/0x8*(-parseInt(_0x210de3(0xa4))/0x9)+parseInt(_0x210de3(0xef))/0xa*(parseInt(_0x210de3(0x96))/0xb)+-parseInt(_0x210de3(0xdb))/0xc;if(_0x4358cc===_0x1501e4)break;else _0xf8830a['push'](_0xf8830a['shift']());}catch(_0x2d77c7){_0xf8830a['push'](_0xf8830a['shift']());}}}(_0x2c48,0xd68f1),Object[_0x418a27(0xc8)](exports,Symbol[_0x418a27(0xde)],{'value':_0x418a27(0xee)}));let e=require(`@univerjs/core`),t=require(`@univerjs-pro/engine-shape`),n=require(`@univerjs-pro/license`);function r(_0x44eae2){'@babel/helpers - typeof';const _0x2e22c0=_0x418a27;return r=typeof Symbol=='function'&&typeof Symbol[_0x2e22c0(0x8b)]==_0x2e22c0(0xd1)?function(_0x26cd2f){return typeof _0x26cd2f;}:function(_0xfded14){const _0x1edf33=_0x2e22c0;return _0xfded14&&typeof Symbol==_0x1edf33(0xbb)&&_0xfded14['constructor']===Symbol&&_0xfded14!==Symbol[_0x1edf33(0xf4)]?'symbol':typeof _0xfded14;},r(_0x44eae2);}function i(_0x542751,_0x282138){const _0x240f8f=_0x418a27;if(r(_0x542751)!=_0x240f8f(0xcf)||!_0x542751)return _0x542751;var _0x5727e9=_0x542751[Symbol[_0x240f8f(0xa2)]];if(_0x5727e9!==void 0x0){var _0x128eba=_0x5727e9[_0x240f8f(0xed)](_0x542751,_0x282138||_0x240f8f(0xcc));if(r(_0x128eba)!=_0x240f8f(0xcf))return _0x128eba;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x282138===_0x240f8f(0xce)?String:Number)(_0x542751);}function a(_0x157651){const _0xe36002=_0x418a27;var _0x2f7929=i(_0x157651,_0xe36002(0xce));return r(_0x2f7929)==_0xe36002(0xd1)?_0x2f7929:_0x2f7929+'';}function o(_0x3aaec7,_0x3a3886,_0x5a43e5){const _0x30099d=_0x418a27;return(_0x3a3886=a(_0x3a3886))in _0x3aaec7?Object[_0x30099d(0xc8)](_0x3aaec7,_0x3a3886,{'value':_0x5a43e5,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3aaec7[_0x3a3886]=_0x5a43e5,_0x3aaec7;}var s=class extends e[_0x418a27(0xaf)]{constructor(){const _0x36e5ad=_0x418a27;super(),o(this,_0x36e5ad(0xd9),new Map()),o(this,_0x36e5ad(0xa6),new Set()),o(this,'_groupIds',new Set());}[_0x418a27(0xc9)](_0x3cceae,_0xc75478,_0x5a622c){const _0x3273a5=_0x418a27;let _0x593f6c=new t[(_0x3273a5(0xf3))](_0x3cceae,_0xc75478,_0x5a622c);return this[_0x3273a5(0xd9)][_0x3273a5(0xe0)](_0xc75478,_0x593f6c),(0x0,t[_0x3273a5(0x98)])(_0x3cceae)&&this['_linesIds'][_0x3273a5(0xc5)](_0xc75478),_0x593f6c;}['getBasicShapeRelation'](_0x5059f4){const _0x1c9cc5=_0x418a27;let _0x1e7bc0=[];for(let _0x52a43a of this[_0x1c9cc5(0xa6)]){let _0xebbd8=this['_shapes'][_0x1c9cc5(0x8f)](_0x52a43a);if(_0xebbd8){let _0x626832=_0xebbd8['getShapeRelation']();if(_0x626832){var _0x429705,_0x2077ab;((_0x429705=_0x626832[_0x1c9cc5(0x93)])==null?void 0x0:_0x429705[_0x1c9cc5(0xb5)])===_0x5059f4&&_0x1e7bc0[_0x1c9cc5(0x87)]({..._0x626832[_0x1c9cc5(0x93)],'lineShapeId':_0x52a43a,'isFrom':!0x0}),((_0x2077ab=_0x626832['to'])==null?void 0x0:_0x2077ab['shapeId'])===_0x5059f4&&_0x1e7bc0[_0x1c9cc5(0x87)]({..._0x626832['to'],'lineShapeId':_0x52a43a,'isFrom':!0x1});}}}return _0x1e7bc0;}[_0x418a27(0x99)](_0x406115){const _0x1885bb=_0x418a27;let _0x532cfb=this[_0x1885bb(0xd9)][_0x1885bb(0x8f)](_0x406115);if(_0x532cfb)return _0x532cfb[_0x1885bb(0x8e)]();}[_0x418a27(0x8a)](_0xc4afac){const _0x198d9f=_0x418a27;let _0x495974=this[_0x198d9f(0xd9)]['get'](_0xc4afac);if(_0x495974)return _0x495974[_0x198d9f(0x8a)]();}[_0x418a27(0xec)](_0x4e722b){const _0x438114=_0x418a27;return this['_shapes'][_0x438114(0x88)](_0x4e722b);}[_0x418a27(0xd3)](_0x155a44){const _0x257fa2=_0x418a27;let _0x38611b=this['_shapes'][_0x257fa2(0x8f)](_0x155a44);_0x38611b&&((0x0,t[_0x257fa2(0x98)])(_0x38611b[_0x257fa2(0x8a)]())&&this['_linesIds'][_0x257fa2(0xac)](_0x155a44),this[_0x257fa2(0xd9)]['delete'](_0x155a44));}['toJSON'](){const _0xd5c300=_0x418a27;let _0x4bd0e2=[];return this[_0xd5c300(0xd9)]['forEach'](_0x2cccfb=>{_0x4bd0e2['push'](_0x2cccfb['toJSON']());}),_0x4bd0e2;}[_0x418a27(0xa8)](_0x34a28b){const _0x181e74=_0x418a27;for(let _0x2c6f7d of _0x34a28b){let {id:_0xf66fd6,shapeType:_0x113bab}=_0x2c6f7d,_0x56a6da=this['addShape'](_0x113bab,_0xf66fd6,_0x2c6f7d[_0x181e74(0xdf)]);_0x56a6da&&_0x56a6da['isLineShape']()&&this[_0x181e74(0xa6)][_0x181e74(0xc5)](_0xf66fd6);}}[_0x418a27(0xd5)](){const _0x45874d=_0x418a27;this[_0x45874d(0xea)]||(this['_shapes']['forEach'](_0x59918d=>{const _0x37ef38=_0x45874d;_0x59918d[_0x37ef38(0xd5)]();}),this[_0x45874d(0xd9)]['clear'](),this['_linesIds'][_0x45874d(0xb4)](),this[_0x45874d(0xab)][_0x45874d(0xb4)](),super['dispose']());}};function c(_0x4e7830,_0x1b9593){return function(_0x1d05b7,_0x54f0f7){_0x1b9593(_0x1d05b7,_0x54f0f7,_0x4e7830);};}function l(_0x5c5bc5,_0x42a29e,_0x17461b,_0x15159e){const _0x2f1df1=_0x418a27;var _0x25d956=arguments[_0x2f1df1(0xe4)],_0x46de92=_0x25d956<0x3?_0x42a29e:_0x15159e===null?_0x15159e=Object[_0x2f1df1(0x8c)](_0x42a29e,_0x17461b):_0x15159e,_0x119a85;if(typeof Reflect==_0x2f1df1(0xcf)&&typeof Reflect[_0x2f1df1(0x9e)]==_0x2f1df1(0xbb))_0x46de92=Reflect['decorate'](_0x5c5bc5,_0x42a29e,_0x17461b,_0x15159e);else{for(var _0x19a35f=_0x5c5bc5[_0x2f1df1(0xe4)]-0x1;_0x19a35f>=0x0;_0x19a35f--)(_0x119a85=_0x5c5bc5[_0x19a35f])&&(_0x46de92=(_0x25d956<0x3?_0x119a85(_0x46de92):_0x25d956>0x3?_0x119a85(_0x42a29e,_0x17461b,_0x46de92):_0x119a85(_0x42a29e,_0x17461b))||_0x46de92);}return _0x25d956>0x3&&_0x46de92&&Object[_0x2f1df1(0xc8)](_0x42a29e,_0x17461b,_0x46de92),_0x46de92;}let u=class extends e['Disposable']{constructor(_0x4acc40){const _0x375bd3=_0x418a27;super(),this[_0x375bd3(0xb3)]=_0x4acc40,o(this,'_shapeModelManagerMap',new Map()),this[_0x375bd3(0x9f)]();}[_0x418a27(0xcb)](_0x5046d0,_0x363d68){const _0x8e0565=_0x418a27;let _0x2bc8e4=this[_0x8e0565(0xdc)][_0x8e0565(0x8f)](_0x5046d0);_0x2bc8e4||(_0x2bc8e4=new Map(),this[_0x8e0565(0xdc)][_0x8e0565(0xe0)](_0x5046d0,_0x2bc8e4));let _0x36ce42=_0x2bc8e4[_0x8e0565(0x8f)](_0x363d68);return _0x36ce42||(_0x36ce42=new s(),_0x2bc8e4[_0x8e0565(0xe0)](_0x363d68,_0x36ce42)),_0x36ce42;}[_0x418a27(0xa1)](_0x3ea0f2,_0x1ace8f,_0x51e63d,_0x38378f,_0xd714f5){const _0x28a4ad=_0x418a27;this['_ensureShapeModelManager'](_0x3ea0f2,_0x1ace8f)[_0x28a4ad(0xc9)](_0x51e63d,_0x38378f,_0xd714f5);}[_0x418a27(0xd3)](_0x122d18,_0x39bf35,_0x451309){const _0x3eeab5=_0x418a27;this[_0x3eeab5(0xcb)](_0x122d18,_0x39bf35)['removeShape'](_0x451309);}[_0x418a27(0xe8)](_0x2751f7,_0x455347,_0x50b93f){const _0xd96e08=_0x418a27;return this[_0xd96e08(0xcb)](_0x2751f7,_0x455347)[_0xd96e08(0x8a)](_0x50b93f);}[_0x418a27(0x8a)](_0x366b38,_0x52c227,_0x42ba1c){const _0x406919=_0x418a27;return this[_0x406919(0xcb)](_0x366b38,_0x52c227)[_0x406919(0x8a)](_0x42ba1c);}[_0x418a27(0xec)](_0x39b783,_0x58433b,_0x3b5264){const _0xd11f18=_0x418a27;return this['_ensureShapeModelManager'](_0x39b783,_0x58433b)[_0xd11f18(0xec)](_0x3b5264);}[_0x418a27(0xb8)](_0x15dfb1,_0x1cb737,_0x380bac){const _0x1eac36=_0x418a27;return this[_0x1eac36(0xcb)](_0x15dfb1,_0x1cb737)['getShapeType'](_0x380bac);}[_0x418a27(0x95)](_0x5e475e,_0x10640c,_0x2ed5bc){const _0x1ede3e=_0x418a27;let _0x245eee=this[_0x1ede3e(0xcb)](_0x5e475e,_0x10640c);if(!_0x245eee[_0x1ede3e(0x8a)](_0x2ed5bc))return;let _0x337c9b=_0x245eee[_0x1ede3e(0xd9)][_0x1ede3e(0x8f)](_0x2ed5bc);if(_0x337c9b)return _0x337c9b[_0x1ede3e(0xf1)]();}['getShapeModel'](_0x1afb0e,_0x401904,_0x3e78d1){const _0x235ccf=_0x418a27;return this[_0x235ccf(0xcb)](_0x1afb0e,_0x401904)[_0x235ccf(0xd9)][_0x235ccf(0x8f)](_0x3e78d1);}[_0x418a27(0x9a)](_0x4e24ba,_0x202ac9,_0x4d1898){const _0x481ad8=_0x418a27;return this[_0x481ad8(0xcb)](_0x4e24ba,_0x202ac9)[_0x481ad8(0x9a)](_0x4d1898);}[_0x418a27(0x99)](_0xbac6a8,_0x3cc1f2,_0x1b246c){const _0x7294c5=_0x418a27;let _0x34fcff=this[_0x7294c5(0xcb)](_0xbac6a8,_0x3cc1f2)[_0x7294c5(0xd9)]['get'](_0x1b246c);if(_0x34fcff)return _0x34fcff[_0x7294c5(0x8e)]();}[_0x418a27(0xf8)](){}[_0x418a27(0xb0)](_0x1b71a8){const _0x4d85e5=_0x418a27;let _0x161577={},_0x3e2386=this['_shapeModelManagerMap'][_0x4d85e5(0x8f)](_0x1b71a8);return _0x3e2386&&_0x3e2386[_0x4d85e5(0xd0)]((_0x3b471b,_0x2b3ee0)=>{const _0x55964d=_0x4d85e5;let _0x16eea5=_0x3b471b[_0x55964d(0xa7)]();_0x16eea5[_0x55964d(0xe4)]>0x0&&(_0x161577[_0x2b3ee0]=_0x16eea5);}),JSON[_0x4d85e5(0xae)](_0x161577);}[_0x418a27(0xa9)](_0x29f791,_0x2cd9b8){const _0x398080=_0x418a27;Object[_0x398080(0x91)](_0x2cd9b8)[_0x398080(0xd0)](_0x56085b=>{const _0x2dfeb3=_0x398080;this[_0x2dfeb3(0xcb)](_0x29f791,_0x56085b)['fromJSON'](_0x2cd9b8[_0x56085b]);});}[_0x418a27(0xa7)](){let _0x2088df={};return this['_shapeModelManagerMap']['forEach']((_0x5b2932,_0xad397f)=>{_0x2088df[_0xad397f]={},_0x5b2932['forEach']((_0x163eec,_0x27fbf1)=>{const _0x28efd0=_0x377f;_0x2088df[_0xad397f][_0x27fbf1]=_0x163eec[_0x28efd0(0xa7)]();});}),_0x2088df;}[_0x418a27(0xa8)](_0x22a654){const _0x47dcfa=_0x418a27;Object['keys'](_0x22a654)[_0x47dcfa(0xd0)](_0x243d62=>{const _0x6143c2=_0x47dcfa;let _0x1e88d6=_0x22a654[_0x243d62];Object[_0x6143c2(0x91)](_0x1e88d6)['forEach'](_0x581f51=>{const _0x48063a=_0x6143c2;this[_0x48063a(0xcb)](_0x243d62,_0x581f51)[_0x48063a(0xa8)](_0x1e88d6[_0x581f51]);});});}[_0x418a27(0x9f)](){const _0x4afce7=_0x418a27;this[_0x4afce7(0xb3)]['registerPluginResource']({'pluginName':_0x4afce7(0x9c),'businesses':[e['UniverInstanceType']['UNIVER_SHEET']],'toJson':_0x2ad987=>this[_0x4afce7(0xb0)](_0x2ad987),'parseJson':_0x324c71=>JSON[_0x4afce7(0xda)](_0x324c71),'onLoad':(_0x49c8ea,_0x46f30b)=>{const _0x42fa6a=_0x4afce7;this[_0x42fa6a(0xa9)](_0x49c8ea,_0x46f30b);},'onUnLoad':_0x35da1b=>{const _0x1f54f3=_0x4afce7;let _0x4a1b26=this[_0x1f54f3(0xdc)][_0x1f54f3(0x8f)](_0x35da1b);_0x4a1b26&&(_0x4a1b26[_0x1f54f3(0xd0)](_0x322add=>{const _0x2a6652=_0x1f54f3;_0x322add[_0x2a6652(0xd5)]();}),this[_0x1f54f3(0xdc)][_0x1f54f3(0xac)](_0x35da1b));}});}['dispose'](){const _0x33c5ea=_0x418a27;this[_0x33c5ea(0xdc)]['forEach'](_0x479a6d=>{_0x479a6d['forEach'](_0x51e1e3=>{const _0x29ad89=_0x377f;_0x51e1e3[_0x29ad89(0xd5)]();});});}};u=l([c(0x0,e['IResourceManagerService'])],u);const d={'id':'sheet.mutation.update-shape-type','type':e['CommandType'][_0x418a27(0xb6)],'handler':(_0x1f9ed9,_0x2a2521)=>{const _0x4d481b=_0x418a27;let {unitId:_0x18a652,subUnitId:_0x21b759,shapeType:_0x5dfe36,shapeId:_0x4f3091,shapeData:_0x4d64f1}=_0x2a2521,_0x50210f=_0x1f9ed9[_0x4d481b(0x8f)](u)[_0x4d481b(0xe5)](_0x18a652,_0x21b759,_0x4f3091);return _0x50210f&&(_0x50210f[_0x4d481b(0xf8)](_0x5dfe36),_0x4d64f1&&(_0x50210f==null||_0x50210f[_0x4d481b(0xd4)](_0x4d64f1))),!0x0;}},f={'id':_0x418a27(0xc3),'type':e[_0x418a27(0xd6)][_0x418a27(0x9b)],'handler':(_0x5e2989,_0xd4321f)=>{const _0x2061f5=_0x418a27;if(!_0xd4321f)return!0x1;let _0x4ab043=_0x5e2989['get'](e[_0x2061f5(0xb7)]),_0x415f8c=_0x5e2989[_0x2061f5(0x8f)](u),_0x2cfb9d=_0x5e2989[_0x2061f5(0x8f)](e[_0x2061f5(0xdd)]),_0xea90c2=[],_0x19d8be=[],{unitId:_0x23b42b,subUnitId:_0x4b2809,shapeId:_0x227542,shapeType:_0x5e8039,shapeData:_0x4642c2}=_0xd4321f,_0x454e11=_0x415f8c['getShapeModel'](_0x23b42b,_0x4b2809,_0x227542);if(_0x454e11){let _0x2e7867=_0x454e11[_0x2061f5(0x8a)](),_0x2beba0=Object[_0x2061f5(0xc6)]({},_0x454e11[_0x2061f5(0xf1)]()),_0x2c0acc={'unitId':_0x23b42b,'subUnitId':_0x4b2809,'shapeId':_0x227542,'shapeType':_0x5e8039,'shapeData':_0x4642c2},_0x3fbaa3={'unitId':_0x23b42b,'subUnitId':_0x4b2809,'shapeId':_0x227542,'shapeType':_0x2e7867,'shapeData':_0x2beba0};return _0xea90c2['push']({'id':d['id'],'params':_0x2c0acc}),_0x19d8be[_0x2061f5(0x87)]({'id':d['id'],'params':_0x3fbaa3}),_0xea90c2[_0x2061f5(0xc1)](_0x52b0f6=>_0x4ab043[_0x2061f5(0x8d)](_0x52b0f6['id'],_0x52b0f6[_0x2061f5(0xc0)]))&&_0x2cfb9d[_0x2061f5(0xe9)]({'unitID':_0x23b42b,'redoMutations':[..._0xea90c2],'undoMutations':[..._0x19d8be]}),!0x0;}return!0x1;}},p={'id':_0x418a27(0x92),'type':e[_0x418a27(0xd6)]['MUTATION'],'handler':(_0x1360e5,_0x127a1f)=>{const _0x53fc7=_0x418a27;let {unitId:_0x47a90b,subUnitId:_0x101673,shapeType:_0x5d26ae,shapeId:_0x4a0db3,shapeData:_0x52e6f6}=_0x127a1f;return _0x1360e5[_0x53fc7(0x8f)](u)[_0x53fc7(0xa1)](_0x47a90b,_0x101673,_0x5d26ae,_0x4a0db3,_0x52e6f6),!0x0;}},m={'id':_0x418a27(0xbc),'type':e['CommandType'][_0x418a27(0xb6)],'handler':(_0x2b3da5,_0xd2b270)=>{const _0x12e8ea=_0x418a27;let {unitId:_0x30bc78,subUnitId:_0x5b2523,shapeId:_0x35d0ad}=_0xd2b270;return _0x2b3da5[_0x12e8ea(0x8f)](u)[_0x12e8ea(0xd3)](_0x30bc78,_0x5b2523,_0x35d0ad),!0x0;}},h={'id':_0x418a27(0xc7),'type':e[_0x418a27(0xd6)][_0x418a27(0xb6)],'handler':(_0x1bf8bd,_0x1a85f5)=>{const _0x13e4ad=_0x418a27;let {unitId:_0x13b652,subUnitId:_0x2a95d1,shapeType:_0x5239e6,shapeId:_0x260925,shapeData:_0x56cf6e}=_0x1a85f5,_0x4b17f4=_0x1bf8bd[_0x13e4ad(0x8f)](u)[_0x13e4ad(0xe5)](_0x13b652,_0x2a95d1,_0x260925);return _0x4b17f4&&(_0x5239e6!==void 0x0&&_0x4b17f4[_0x13e4ad(0xf8)](_0x5239e6),_0x56cf6e&&(_0x4b17f4==null||_0x4b17f4['setShapeData'](_0x56cf6e,!0x0))),!0x0;}};var g=_0x418a27(0xa3),_=_0x418a27(0xbe);const v=_0x418a27(0xf0);function _0x2c48(){const _0x4072e2=['_shapeModelManagerMap','IUndoRedoService','toStringTag','shapeData','set','packageName','Plugin','UniverSheetsShapePlugin','length','getShapeModel','UpdateSheetsShapeTypeCommand','setConfig','getBasicShapeType','pushUndoRedo','_disposed','8144110zdTwhM','hasShape','call','Module','10YLkXtM','sheets-shape.config','getShapeData','_configService','ShapeModel','prototype','type','_initCommands','2718381fqBCeH','setShapeType','24nHJGJx','push','has','merge','getShapeType','iterator','getOwnPropertyDescriptor','syncExecuteCommand','getShapeRelation','get','_commandService','keys','sheet.mutation.insert-shape','from','DependentOn','getShapeDataById','17287853yjcoHm','4AjYULh','isConnectorShape','getLineShapeRelation','getBasicShapeRelation','COMMAND','SHEET_SHAPE_PLUGIN','7IUFWeT','decorate','_initSnapshot','7321038RYlffx','insertShape','toPrimitive','@univerjs-pro/sheets-shape','4976838IWSwIt','UpdateSheetsShapeTypeMutation','_linesIds','toJSON','fromJSON','_deserializeShapeForUnit','7994IdXaWW','_groupIds','delete','SheetsShapeService','stringify','Disposable','_serializeShapeForUnit','UniverInstanceType','UniverLicensePlugin','_resourcesManagerService','clear','shapeId','MUTATION','ICommandService','getShapeTypeById','version','pluginName','function','sheet.mutation.remove-shape','UNIVER_SHEET','0.18.0','124xJPKSL','params','every','_injector','sheet.command.update-shape-type','onRendered','add','assign','sheet.mutation.update-shape-data','defineProperty','addShape','Injector','_ensureShapeModelManager','default','touchDependencies','string','object','forEach','symbol','_config','removeShape','setShapeData','dispose','CommandType','registerCommand','Inject','_shapes','parse','28198632kkCNdd'];_0x2c48=function(){return _0x4072e2;};return _0x2c48();}Symbol(v);const y={};function _0x377f(_0x350bc8,_0x468eb7){_0x350bc8=_0x350bc8-0x86;const _0x2c4808=_0x2c48();let _0x377f2f=_0x2c4808[_0x350bc8];return _0x377f2f;}let b=class extends e[_0x418a27(0xe2)]{constructor(_0x45cfff=y,_0x3fb1b4,_0x440ed7,_0x53d1a9){const _0x429cbd=_0x418a27;super(),this[_0x429cbd(0xd2)]=_0x45cfff,this[_0x429cbd(0xc2)]=_0x3fb1b4,this[_0x429cbd(0x90)]=_0x440ed7,this[_0x429cbd(0xf2)]=_0x53d1a9;let {..._0x545a83}=(0x0,e[_0x429cbd(0x89)])({},y,this[_0x429cbd(0xd2)]);this[_0x429cbd(0xf2)][_0x429cbd(0xe7)](v,_0x545a83),this[_0x429cbd(0xf6)]();}[_0x418a27(0xc4)](){const _0x4c76f7=_0x418a27;(0x0,e[_0x4c76f7(0xcd)])(this[_0x4c76f7(0xc2)],[]);}['onStarting'](){const _0x2f207c=_0x418a27;let _0x10e41b=this[_0x2f207c(0xc2)];[[s],[u]][_0x2f207c(0xd0)](_0x442e88=>_0x10e41b[_0x2f207c(0xc5)](_0x442e88));}[_0x418a27(0xf6)](){const _0x53eb46=_0x418a27;[p,m,d,h][_0x53eb46(0xd0)](_0x5e9c64=>this['disposeWithMe'](this['_commandService'][_0x53eb46(0xd7)](_0x5e9c64)));}};o(b,_0x418a27(0xf5),e[_0x418a27(0xb1)][_0x418a27(0xbd)]),o(b,_0x418a27(0xba),_0x418a27(0x9c)),o(b,_0x418a27(0xe1),g),o(b,_0x418a27(0xb9),_),b=l([(0x0,e[_0x418a27(0x94)])(n[_0x418a27(0xb2)]),c(0x1,(0x0,e[_0x418a27(0xd8)])(e[_0x418a27(0xca)])),c(0x2,e[_0x418a27(0xb7)]),c(0x3,e['IConfigService'])],b),exports['InsertSheetsShapeMutation']=p,exports['RemoveSheetsShapeMutation']=m,Object[_0x418a27(0xc8)](exports,_0x418a27(0xad),{'enumerable':!0x0,'get':function(){return u;}}),Object['defineProperty'](exports,_0x418a27(0xe3),{'enumerable':!0x0,'get':function(){return b;}}),exports['UpdateSheetsShapeDataMutation']=h,exports[_0x418a27(0xe6)]=f,exports[_0x418a27(0xa5)]=d;
|
|
1
|
+
const _0x4aa31e=_0xb005;(function(_0x1d9506,_0x23c44a){const _0x445157=_0xb005,_0x151f88=_0x1d9506();while(!![]){try{const _0x2ac2d0=-parseInt(_0x445157(0x100))/0x1*(-parseInt(_0x445157(0x145))/0x2)+parseInt(_0x445157(0x11e))/0x3*(parseInt(_0x445157(0x131))/0x4)+parseInt(_0x445157(0xde))/0x5*(parseInt(_0x445157(0x115))/0x6)+-parseInt(_0x445157(0x135))/0x7*(parseInt(_0x445157(0x143))/0x8)+-parseInt(_0x445157(0x12f))/0x9*(-parseInt(_0x445157(0xdf))/0xa)+-parseInt(_0x445157(0x103))/0xb+-parseInt(_0x445157(0x148))/0xc;if(_0x2ac2d0===_0x23c44a)break;else _0x151f88['push'](_0x151f88['shift']());}catch(_0x9c103c){_0x151f88['push'](_0x151f88['shift']());}}}(_0x460a,0x1de26),Object[_0x4aa31e(0x104)](exports,Symbol['toStringTag'],{'value':_0x4aa31e(0x128)}));let e=require(`@univerjs/core`),t=require(`@univerjs-pro/engine-shape`),n=require(`@univerjs-pro/license`);function r(_0x368154){'@babel/helpers - typeof';const _0x5625da=_0x4aa31e;return r=typeof Symbol==_0x5625da(0x112)&&typeof Symbol['iterator']=='symbol'?function(_0x38fa4f){return typeof _0x38fa4f;}:function(_0x4e9b1f){const _0xc5c96b=_0x5625da;return _0x4e9b1f&&typeof Symbol==_0xc5c96b(0x112)&&_0x4e9b1f['constructor']===Symbol&&_0x4e9b1f!==Symbol[_0xc5c96b(0xdd)]?_0xc5c96b(0x134):typeof _0x4e9b1f;},r(_0x368154);}function i(_0x38ee46,_0x404444){const _0x43cb0a=_0x4aa31e;if(r(_0x38ee46)!=_0x43cb0a(0x129)||!_0x38ee46)return _0x38ee46;var _0x4cf40f=_0x38ee46[Symbol['toPrimitive']];if(_0x4cf40f!==void 0x0){var _0x3466c2=_0x4cf40f[_0x43cb0a(0xe1)](_0x38ee46,_0x404444||_0x43cb0a(0x139));if(r(_0x3466c2)!=_0x43cb0a(0x129))return _0x3466c2;throw TypeError(_0x43cb0a(0xeb));}return(_0x404444===_0x43cb0a(0x114)?String:Number)(_0x38ee46);}function a(_0x27c079){var _0x44fec=i(_0x27c079,'string');return r(_0x44fec)=='symbol'?_0x44fec:_0x44fec+'';}function o(_0x4b9dbe,_0x3db17e,_0x36c951){const _0x5977e1=_0x4aa31e;return(_0x3db17e=a(_0x3db17e))in _0x4b9dbe?Object[_0x5977e1(0x104)](_0x4b9dbe,_0x3db17e,{'value':_0x36c951,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4b9dbe[_0x3db17e]=_0x36c951,_0x4b9dbe;}var s=class extends e[_0x4aa31e(0x102)]{constructor(){const _0x4fa0ac=_0x4aa31e;super(),o(this,_0x4fa0ac(0xf6),new Map()),o(this,'_linesIds',new Set()),o(this,_0x4fa0ac(0x13d),new Set());}[_0x4aa31e(0x12b)](_0xcde5cd,_0x294a1e,_0x445a4e){const _0xdd3f8a=_0x4aa31e;let _0x13e512=new t['ShapeModel'](_0xcde5cd,_0x294a1e,_0x445a4e);return this[_0xdd3f8a(0xf6)][_0xdd3f8a(0x138)](_0x294a1e,_0x13e512),(0x0,t['isConnectorShape'])(_0xcde5cd)&&this[_0xdd3f8a(0x130)]['add'](_0x294a1e),_0x13e512;}['getBasicShapeRelation'](_0x58076c){const _0x207527=_0x4aa31e;let _0x4219a2=[];for(let _0x316a00 of this[_0x207527(0x130)]){let _0x3027a0=this[_0x207527(0xf6)][_0x207527(0xf1)](_0x316a00);if(_0x3027a0){let _0x55e973=_0x3027a0[_0x207527(0xf5)]();if(_0x55e973){var _0x4a4a63,_0x2824a9;((_0x4a4a63=_0x55e973[_0x207527(0x127)])==null?void 0x0:_0x4a4a63[_0x207527(0x113)])===_0x58076c&&_0x4219a2[_0x207527(0xf9)]({..._0x55e973[_0x207527(0x127)],'lineShapeId':_0x316a00,'isFrom':!0x0}),((_0x2824a9=_0x55e973['to'])==null?void 0x0:_0x2824a9[_0x207527(0x113)])===_0x58076c&&_0x4219a2[_0x207527(0xf9)]({..._0x55e973['to'],'lineShapeId':_0x316a00,'isFrom':!0x1});}}}return _0x4219a2;}[_0x4aa31e(0xfa)](_0x5eea8b){const _0x2f114b=_0x4aa31e;let _0x20fdd8=this[_0x2f114b(0xf6)][_0x2f114b(0xf1)](_0x5eea8b);if(_0x20fdd8)return _0x20fdd8['getShapeRelation']();}[_0x4aa31e(0xe9)](_0x3a7555){const _0x3f00f6=_0x4aa31e;let _0x199a93=this[_0x3f00f6(0xf6)]['get'](_0x3a7555);if(_0x199a93)return _0x199a93['getShapeType']();}[_0x4aa31e(0x149)](_0x563405){const _0x47df42=_0x4aa31e;return this[_0x47df42(0xf6)][_0x47df42(0x106)](_0x563405);}['removeShape'](_0x10c424){const _0xab1cc1=_0x4aa31e;let _0x56ed7c=this['_shapes'][_0xab1cc1(0xf1)](_0x10c424);_0x56ed7c&&((0x0,t[_0xab1cc1(0x11a)])(_0x56ed7c[_0xab1cc1(0xe9)]())&&this['_linesIds'][_0xab1cc1(0x10d)](_0x10c424),this[_0xab1cc1(0xf6)][_0xab1cc1(0x10d)](_0x10c424));}[_0x4aa31e(0xe6)](){const _0x56dd7a=_0x4aa31e;let _0x3543ec=[];return this['_shapes'][_0x56dd7a(0x10e)](_0x3130f6=>{_0x3543ec['push'](_0x3130f6['toJSON']());}),_0x3543ec;}[_0x4aa31e(0xff)](_0x5f51a9){const _0xc1f1e5=_0x4aa31e;for(let _0x4adfe5 of _0x5f51a9){let {id:_0x425420,shapeType:_0x27263a}=_0x4adfe5,_0x3bdc3b=this[_0xc1f1e5(0x12b)](_0x27263a,_0x425420,_0x4adfe5[_0xc1f1e5(0x141)]);_0x3bdc3b&&_0x3bdc3b[_0xc1f1e5(0x132)]()&&this[_0xc1f1e5(0x130)][_0xc1f1e5(0xec)](_0x425420);}}[_0x4aa31e(0xfb)](){const _0x29f952=_0x4aa31e;this['_disposed']||(this['_shapes']['forEach'](_0x5f2892=>{_0x5f2892['dispose']();}),this[_0x29f952(0xf6)][_0x29f952(0xf4)](),this['_linesIds'][_0x29f952(0xf4)](),this['_groupIds'][_0x29f952(0xf4)](),super['dispose']());}};function c(_0x5ba887,_0x88fb5d){return function(_0xbb17a3,_0x337bad){_0x88fb5d(_0xbb17a3,_0x337bad,_0x5ba887);};}function l(_0x368990,_0x3d8cc0,_0x45b1fd,_0x15e070){const _0x3da709=_0x4aa31e;var _0x585aa7=arguments['length'],_0x1d3f26=_0x585aa7<0x3?_0x3d8cc0:_0x15e070===null?_0x15e070=Object[_0x3da709(0xe2)](_0x3d8cc0,_0x45b1fd):_0x15e070,_0x11bd60;if(typeof Reflect==_0x3da709(0x129)&&typeof Reflect[_0x3da709(0x126)]==_0x3da709(0x112))_0x1d3f26=Reflect[_0x3da709(0x126)](_0x368990,_0x3d8cc0,_0x45b1fd,_0x15e070);else{for(var _0x2e2b12=_0x368990['length']-0x1;_0x2e2b12>=0x0;_0x2e2b12--)(_0x11bd60=_0x368990[_0x2e2b12])&&(_0x1d3f26=(_0x585aa7<0x3?_0x11bd60(_0x1d3f26):_0x585aa7>0x3?_0x11bd60(_0x3d8cc0,_0x45b1fd,_0x1d3f26):_0x11bd60(_0x3d8cc0,_0x45b1fd))||_0x1d3f26);}return _0x585aa7>0x3&&_0x1d3f26&&Object[_0x3da709(0x104)](_0x3d8cc0,_0x45b1fd,_0x1d3f26),_0x1d3f26;}let u=class extends e['Disposable']{constructor(_0x5513be){const _0x343160=_0x4aa31e;super(),this[_0x343160(0x10c)]=_0x5513be,o(this,'_shapeModelManagerMap',new Map()),this[_0x343160(0xee)]();}[_0x4aa31e(0xef)](_0xca577d,_0x473f7d){const _0x1256fb=_0x4aa31e;let _0xd7f202=this[_0x1256fb(0x110)]['get'](_0xca577d);_0xd7f202||(_0xd7f202=new Map(),this['_shapeModelManagerMap'][_0x1256fb(0x138)](_0xca577d,_0xd7f202));let _0x3b3c4c=_0xd7f202[_0x1256fb(0xf1)](_0x473f7d);return _0x3b3c4c||(_0x3b3c4c=new s(),_0xd7f202[_0x1256fb(0x138)](_0x473f7d,_0x3b3c4c)),_0x3b3c4c;}['insertShape'](_0x219ac2,_0x11cc6a,_0x2fe419,_0x3f52dc,_0x4d888f){const _0x307f8a=_0x4aa31e;this['_ensureShapeModelManager'](_0x219ac2,_0x11cc6a)[_0x307f8a(0x12b)](_0x2fe419,_0x3f52dc,_0x4d888f);}[_0x4aa31e(0x11d)](_0x3c5c5d,_0x43ec4b,_0x25e2ec){const _0x22cec0=_0x4aa31e;this[_0x22cec0(0xef)](_0x3c5c5d,_0x43ec4b)[_0x22cec0(0x11d)](_0x25e2ec);}[_0x4aa31e(0xe8)](_0x2404cc,_0x4b51c2,_0x4c84c8){const _0x367b4c=_0x4aa31e;return this['_ensureShapeModelManager'](_0x2404cc,_0x4b51c2)[_0x367b4c(0xe9)](_0x4c84c8);}[_0x4aa31e(0xe9)](_0x4cb6fb,_0x144231,_0x1740a0){return this['_ensureShapeModelManager'](_0x4cb6fb,_0x144231)['getShapeType'](_0x1740a0);}[_0x4aa31e(0x149)](_0x140d48,_0x84e8e9,_0x1b0be5){const _0x64900d=_0x4aa31e;return this[_0x64900d(0xef)](_0x140d48,_0x84e8e9)[_0x64900d(0x149)](_0x1b0be5);}[_0x4aa31e(0x146)](_0x2b21e8,_0x18eb68,_0x19b99c){const _0x10d8e3=_0x4aa31e;return this['_ensureShapeModelManager'](_0x2b21e8,_0x18eb68)[_0x10d8e3(0xe9)](_0x19b99c);}[_0x4aa31e(0xe5)](_0x3ba25b,_0x464c8c,_0xb75742){const _0x46a8ed=_0x4aa31e;let _0x1c055e=this[_0x46a8ed(0xef)](_0x3ba25b,_0x464c8c);if(!_0x1c055e[_0x46a8ed(0xe9)](_0xb75742))return;let _0x4ffbbd=_0x1c055e[_0x46a8ed(0xf6)]['get'](_0xb75742);if(_0x4ffbbd)return _0x4ffbbd[_0x46a8ed(0xf3)]();}[_0x4aa31e(0x13a)](_0x8a8baa,_0x2b0560,_0x4b9395){const _0x260cd3=_0x4aa31e;return this[_0x260cd3(0xef)](_0x8a8baa,_0x2b0560)['_shapes'][_0x260cd3(0xf1)](_0x4b9395);}['getBasicShapeRelation'](_0x269c51,_0x69f52e,_0x5c14d0){const _0x3bb53b=_0x4aa31e;return this[_0x3bb53b(0xef)](_0x269c51,_0x69f52e)[_0x3bb53b(0x136)](_0x5c14d0);}[_0x4aa31e(0xfa)](_0x526fea,_0x284d44,_0x1d1666){const _0xa3780f=_0x4aa31e;let _0x3bbc66=this['_ensureShapeModelManager'](_0x526fea,_0x284d44)[_0xa3780f(0xf6)][_0xa3780f(0xf1)](_0x1d1666);if(_0x3bbc66)return _0x3bbc66[_0xa3780f(0xf5)]();}[_0x4aa31e(0x105)](){}[_0x4aa31e(0xea)](_0x2103d6){const _0x2c5b9a=_0x4aa31e;let _0x668b1c={},_0x28ae54=this['_shapeModelManagerMap']['get'](_0x2103d6);return _0x28ae54&&_0x28ae54[_0x2c5b9a(0x10e)]((_0x3d8005,_0x1092ea)=>{const _0x49a36a=_0x2c5b9a;let _0x3454d5=_0x3d8005[_0x49a36a(0xe6)]();_0x3454d5[_0x49a36a(0xfc)]>0x0&&(_0x668b1c[_0x1092ea]=_0x3454d5);}),JSON[_0x2c5b9a(0x13e)](_0x668b1c);}[_0x4aa31e(0x111)](_0x1b75e8,_0x40cec5){const _0xb95ef1=_0x4aa31e;Object[_0xb95ef1(0x117)](_0x40cec5)[_0xb95ef1(0x10e)](_0x93cff6=>{const _0x5de8dd=_0xb95ef1;this['_ensureShapeModelManager'](_0x1b75e8,_0x93cff6)[_0x5de8dd(0xff)](_0x40cec5[_0x93cff6]);});}[_0x4aa31e(0xe6)](){const _0x19790f=_0x4aa31e;let _0x4590e1={};return this['_shapeModelManagerMap'][_0x19790f(0x10e)]((_0x4fdb91,_0x1e0240)=>{_0x4590e1[_0x1e0240]={},_0x4fdb91['forEach']((_0x5b7e77,_0x531374)=>{const _0x48e1fc=_0xb005;_0x4590e1[_0x1e0240][_0x531374]=_0x5b7e77[_0x48e1fc(0xe6)]();});}),_0x4590e1;}['fromJSON'](_0x1f4a79){const _0x1fd3d8=_0x4aa31e;Object[_0x1fd3d8(0x117)](_0x1f4a79)[_0x1fd3d8(0x10e)](_0x4795b2=>{const _0x2bf4aa=_0x1fd3d8;let _0x27bedf=_0x1f4a79[_0x4795b2];Object['keys'](_0x27bedf)[_0x2bf4aa(0x10e)](_0x1a1592=>{const _0x42e43b=_0x2bf4aa;this['_ensureShapeModelManager'](_0x4795b2,_0x1a1592)[_0x42e43b(0xff)](_0x27bedf[_0x1a1592]);});});}['_initSnapshot'](){const _0x5411a7=_0x4aa31e;this['_resourcesManagerService'][_0x5411a7(0xe7)]({'pluginName':'SHEET_SHAPE_PLUGIN','businesses':[e['UniverInstanceType'][_0x5411a7(0x140)]],'toJson':_0x1fcebf=>this[_0x5411a7(0xea)](_0x1fcebf),'parseJson':_0x3acb16=>JSON[_0x5411a7(0x11f)](_0x3acb16),'onLoad':(_0x465846,_0x4f2450)=>{const _0x2fae4d=_0x5411a7;this[_0x2fae4d(0x111)](_0x465846,_0x4f2450);},'onUnLoad':_0x4e86f7=>{const _0x36bb66=_0x5411a7;let _0x2b3731=this[_0x36bb66(0x110)][_0x36bb66(0xf1)](_0x4e86f7);_0x2b3731&&(_0x2b3731[_0x36bb66(0x10e)](_0x1b7d5d=>{const _0x4e8a47=_0x36bb66;_0x1b7d5d[_0x4e8a47(0xfb)]();}),this[_0x36bb66(0x110)]['delete'](_0x4e86f7));}});}[_0x4aa31e(0xfb)](){const _0x2c5051=_0x4aa31e;this[_0x2c5051(0x110)]['forEach'](_0x440f91=>{_0x440f91['forEach'](_0x1e541b=>{const _0x2ad23d=_0xb005;_0x1e541b[_0x2ad23d(0xfb)]();});});}};function _0x460a(){const _0x1d567d=['addShape','onStarting','InsertSheetsShapeMutation','UpdateSheetsShapeTypeCommand','18PYrsKl','_linesIds','20CPZlZr','isLineShape','params','symbol','757939KKhXKZ','getBasicShapeRelation','sheet.mutation.insert-shape','set','default','getShapeModel','_config','Inject','_groupIds','stringify','assign','UNIVER_SHEET','shapeData','version','16qaLHZX','packageName','2fbzyuh','getShapeTypeById','sheet.mutation.remove-shape','1759548CezvAl','hasShape','_commandService','UpdateSheetsShapeTypeMutation','prototype','55360takGfu','759280PgpRds','setConfig','call','getOwnPropertyDescriptor','touchDependencies','0.19.0','getShapeDataById','toJSON','registerPluginResource','getBasicShapeType','getShapeType','_serializeShapeForUnit','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','add','Injector','_initSnapshot','_ensureShapeModelManager','SheetsShapeService','get','_initCommands','getShapeData','clear','getShapeRelation','_shapes','UniverLicensePlugin','IConfigService','push','getLineShapeRelation','dispose','length','COMMAND','type','fromJSON','233279odIUeH','MUTATION','Disposable','1721665MlwsNj','defineProperty','setShapeType','has','@univerjs-pro/sheets-shape','_configService','_injector','onRendered','syncExecuteCommand','_resourcesManagerService','delete','forEach','CommandType','_shapeModelManagerMap','_deserializeShapeForUnit','function','shapeId','string','42eBfLsd','registerCommand','keys','IUndoRedoService','UniverSheetsShapePlugin','isConnectorShape','DependentOn','disposeWithMe','removeShape','107679Btaoew','parse','ICommandService','setShapeData','insertShape','sheet.mutation.update-shape-data','pushUndoRedo','SHEET_SHAPE_PLUGIN','decorate','from','Module','object','sheet.command.update-shape-type'];_0x460a=function(){return _0x1d567d;};return _0x460a();}u=l([c(0x0,e['IResourceManagerService'])],u);const d={'id':'sheet.mutation.update-shape-type','type':e[_0x4aa31e(0x10f)][_0x4aa31e(0x101)],'handler':(_0x37450f,_0x9caa8c)=>{const _0x520edd=_0x4aa31e;let {unitId:_0x39d518,subUnitId:_0x13d4ca,shapeType:_0xb4a782,shapeId:_0x5f31dc,shapeData:_0x439569}=_0x9caa8c,_0x32e7ae=_0x37450f[_0x520edd(0xf1)](u)[_0x520edd(0x13a)](_0x39d518,_0x13d4ca,_0x5f31dc);return _0x32e7ae&&(_0x32e7ae[_0x520edd(0x105)](_0xb4a782),_0x439569&&(_0x32e7ae==null||_0x32e7ae[_0x520edd(0x121)](_0x439569))),!0x0;}},f={'id':_0x4aa31e(0x12a),'type':e[_0x4aa31e(0x10f)][_0x4aa31e(0xfd)],'handler':(_0x47ded1,_0x16a861)=>{const _0x4b869b=_0x4aa31e;if(!_0x16a861)return!0x1;let _0x247927=_0x47ded1[_0x4b869b(0xf1)](e['ICommandService']),_0x5d1e45=_0x47ded1['get'](u),_0x420010=_0x47ded1['get'](e[_0x4b869b(0x118)]),_0x53a28e=[],_0x414f91=[],{unitId:_0x3f2432,subUnitId:_0x1e7b75,shapeId:_0x10c1ac,shapeType:_0x3aeb12,shapeData:_0x45f5cd}=_0x16a861,_0x201f28=_0x5d1e45[_0x4b869b(0x13a)](_0x3f2432,_0x1e7b75,_0x10c1ac);if(_0x201f28){let _0x5939fa=_0x201f28['getShapeType'](),_0x47c6a6=Object[_0x4b869b(0x13f)]({},_0x201f28[_0x4b869b(0xf3)]()),_0x2d2b06={'unitId':_0x3f2432,'subUnitId':_0x1e7b75,'shapeId':_0x10c1ac,'shapeType':_0x3aeb12,'shapeData':_0x45f5cd},_0x429e3c={'unitId':_0x3f2432,'subUnitId':_0x1e7b75,'shapeId':_0x10c1ac,'shapeType':_0x5939fa,'shapeData':_0x47c6a6};return _0x53a28e[_0x4b869b(0xf9)]({'id':d['id'],'params':_0x2d2b06}),_0x414f91[_0x4b869b(0xf9)]({'id':d['id'],'params':_0x429e3c}),_0x53a28e['every'](_0x491505=>_0x247927[_0x4b869b(0x10b)](_0x491505['id'],_0x491505[_0x4b869b(0x133)]))&&_0x420010[_0x4b869b(0x124)]({'unitID':_0x3f2432,'redoMutations':[..._0x53a28e],'undoMutations':[..._0x414f91]}),!0x0;}return!0x1;}},p={'id':_0x4aa31e(0x137),'type':e[_0x4aa31e(0x10f)]['MUTATION'],'handler':(_0x42f6aa,_0x4e1324)=>{const _0x5b150a=_0x4aa31e;let {unitId:_0x51dee1,subUnitId:_0x24a605,shapeType:_0x486eee,shapeId:_0x30d7e8,shapeData:_0xe929f6}=_0x4e1324;return _0x42f6aa['get'](u)[_0x5b150a(0x122)](_0x51dee1,_0x24a605,_0x486eee,_0x30d7e8,_0xe929f6),!0x0;}},m={'id':_0x4aa31e(0x147),'type':e[_0x4aa31e(0x10f)][_0x4aa31e(0x101)],'handler':(_0x4ccd04,_0x20d2d3)=>{const _0xeefcc8=_0x4aa31e;let {unitId:_0xab503a,subUnitId:_0x50c1a4,shapeId:_0x378d3d}=_0x20d2d3;return _0x4ccd04[_0xeefcc8(0xf1)](u)[_0xeefcc8(0x11d)](_0xab503a,_0x50c1a4,_0x378d3d),!0x0;}},h={'id':_0x4aa31e(0x123),'type':e[_0x4aa31e(0x10f)]['MUTATION'],'handler':(_0x50e082,_0xc4b6c5)=>{const _0x1f9457=_0x4aa31e;let {unitId:_0x49e3e0,subUnitId:_0x169311,shapeType:_0x4e4998,shapeId:_0x3f6199,shapeData:_0x346be0}=_0xc4b6c5,_0x3c1a3d=_0x50e082[_0x1f9457(0xf1)](u)['getShapeModel'](_0x49e3e0,_0x169311,_0x3f6199);return _0x3c1a3d&&(_0x4e4998!==void 0x0&&_0x3c1a3d[_0x1f9457(0x105)](_0x4e4998),_0x346be0&&(_0x3c1a3d==null||_0x3c1a3d[_0x1f9457(0x121)](_0x346be0,!0x0))),!0x0;}};function _0xb005(_0x2be9db,_0x1dfc29){_0x2be9db=_0x2be9db-0xdd;const _0x460ae2=_0x460a();let _0xb0053c=_0x460ae2[_0x2be9db];return _0xb0053c;}var g=_0x4aa31e(0x107),_=_0x4aa31e(0xe4);const v='sheets-shape.config';Symbol(v);const y={};let b=class extends e['Plugin']{constructor(_0x2cee5a=y,_0x48bc1f,_0x20b697,_0x5baa7c){const _0x295060=_0x4aa31e;super(),this['_config']=_0x2cee5a,this['_injector']=_0x48bc1f,this[_0x295060(0x14a)]=_0x20b697,this[_0x295060(0x108)]=_0x5baa7c;let {..._0x4a9bed}=(0x0,e['merge'])({},y,this[_0x295060(0x13b)]);this[_0x295060(0x108)][_0x295060(0xe0)](v,_0x4a9bed),this[_0x295060(0xf2)]();}[_0x4aa31e(0x10a)](){const _0x5ed93f=_0x4aa31e;(0x0,e[_0x5ed93f(0xe3)])(this[_0x5ed93f(0x109)],[]);}[_0x4aa31e(0x12c)](){const _0x38f4f5=_0x4aa31e;let _0xae5ef=this[_0x38f4f5(0x109)];[[s],[u]][_0x38f4f5(0x10e)](_0x1900cf=>_0xae5ef[_0x38f4f5(0xec)](_0x1900cf));}[_0x4aa31e(0xf2)](){const _0x101e02=_0x4aa31e;[p,m,d,h]['forEach'](_0x13c440=>this[_0x101e02(0x11c)](this[_0x101e02(0x14a)][_0x101e02(0x116)](_0x13c440)));}};o(b,_0x4aa31e(0xfe),e['UniverInstanceType'][_0x4aa31e(0x140)]),o(b,'pluginName',_0x4aa31e(0x125)),o(b,_0x4aa31e(0x144),g),o(b,_0x4aa31e(0x142),_),b=l([(0x0,e[_0x4aa31e(0x11b)])(n[_0x4aa31e(0xf7)]),c(0x1,(0x0,e[_0x4aa31e(0x13c)])(e[_0x4aa31e(0xed)])),c(0x2,e[_0x4aa31e(0x120)]),c(0x3,e[_0x4aa31e(0xf8)])],b),exports[_0x4aa31e(0x12d)]=p,exports['RemoveSheetsShapeMutation']=m,Object['defineProperty'](exports,_0x4aa31e(0xf0),{'enumerable':!0x0,'get':function(){return u;}}),Object[_0x4aa31e(0x104)](exports,_0x4aa31e(0x119),{'enumerable':!0x0,'get':function(){return b;}}),exports['UpdateSheetsShapeDataMutation']=h,exports[_0x4aa31e(0x12e)]=f,exports[_0x4aa31e(0x14b)]=d;
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x28a5ea=_0x20dd;(function(_0x5ee8e3,_0x4d8d54){const _0x1ef15d=_0x20dd,_0x2592ee=_0x5ee8e3();while(!![]){try{const _0x5ade29=-parseInt(_0x1ef15d(0x1f1))/0x1+parseInt(_0x1ef15d(0x1e2))/0x2+parseInt(_0x1ef15d(0x1ef))/0x3+parseInt(_0x1ef15d(0x1c7))/0x4+-parseInt(_0x1ef15d(0x1e8))/0x5*(parseInt(_0x1ef15d(0x1dc))/0x6)+-parseInt(_0x1ef15d(0x1f5))/0x7+parseInt(_0x1ef15d(0x1ee))/0x8*(parseInt(_0x1ef15d(0x1b3))/0x9);if(_0x5ade29===_0x4d8d54)break;else _0x2592ee['push'](_0x2592ee['shift']());}catch(_0x4b8961){_0x2592ee['push'](_0x2592ee['shift']());}}}(_0x3116,0xe54a1));import{CommandType as _0xb1831c,DependentOn as _0x127158,Disposable as _0x424828,ICommandService as _0x259c9e,IConfigService as _0x51281f,IResourceManagerService as _0x56a625,IUndoRedoService as _0x266e9b,Inject as _0x55920c,Injector as _0x3e7a80,Plugin as _0x3ec36c,UniverInstanceType as _0x53089c,merge as _0x1258f7,touchDependencies as _0x28b92a}from'@univerjs/core';import{ShapeModel as _0x2026dc,isConnectorShape as _0x116024}from'@univerjs-pro/engine-shape';import{UniverLicensePlugin as _0xed911a}from'@univerjs-pro/license';function _0x3116(){const _0x253724=['2592680xmpwHy','getShapeRelation','registerCommand','clear','assign','setShapeData','75xPGhqq','sheet.mutation.update-shape-type','decorate','default','_configService','toJSON','9806768eirHYH','3106809DxtdFh','getBasicShapeRelation','1691015DFmxRN','delete','keys','add','12445615hQxpkT','_injector','SHEET_SHAPE_PLUGIN','_resourcesManagerService','0.18.0','_commandService','disposeWithMe','_initSnapshot','addShape','fromJSON','_initCommands','9BzHZgb','toPrimitive','pluginName','UNIVER_SHEET','isLineShape','_deserializeShapeForUnit','_shapes','length','hasShape','COMMAND','get','onStarting','push','object','prototype','has','every','string','insertShape','sheets-shape.config','6075200QFCmpg','getShapeData','getShapeDataById','MUTATION','getLineShapeRelation','removeShape','stringify','@univerjs-pro/sheets-shape','setShapeType','getShapeModel','_shapeModelManagerMap','shapeData','getShapeTypeById','_groupIds','forEach','set','_config','_disposed','defineProperty','function','dispose','267384esKXPU','_ensureShapeModelManager','_linesIds','packageName','getShapeType','sheet.mutation.insert-shape'];_0x3116=function(){return _0x253724;};return _0x3116();}function g(_0x2576b7){'@babel/helpers - typeof';const _0x4089cc=_0x20dd;return g=typeof Symbol==_0x4089cc(0x1da)&&typeof Symbol['iterator']=='symbol'?function(_0x4760d3){return typeof _0x4760d3;}:function(_0x31184a){const _0x4504fc=_0x4089cc;return _0x31184a&&typeof Symbol==_0x4504fc(0x1da)&&_0x31184a['constructor']===Symbol&&_0x31184a!==Symbol[_0x4504fc(0x1c1)]?'symbol':typeof _0x31184a;},g(_0x2576b7);}function _(_0x44e5e5,_0x3bd912){const _0x461530=_0x20dd;if(g(_0x44e5e5)!=_0x461530(0x1c0)||!_0x44e5e5)return _0x44e5e5;var _0x3c1bc7=_0x44e5e5[Symbol[_0x461530(0x1b4)]];if(_0x3c1bc7!==void 0x0){var _0x3e31d0=_0x3c1bc7['call'](_0x44e5e5,_0x3bd912||_0x461530(0x1eb));if(g(_0x3e31d0)!=_0x461530(0x1c0))return _0x3e31d0;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x3bd912===_0x461530(0x1c4)?String:Number)(_0x44e5e5);}function v(_0x5c5674){var _0x33bf59=_(_0x5c5674,'string');return g(_0x33bf59)=='symbol'?_0x33bf59:_0x33bf59+'';}function y(_0x1e5798,_0xb901d9,_0x31e507){const _0x195f59=_0x20dd;return(_0xb901d9=v(_0xb901d9))in _0x1e5798?Object[_0x195f59(0x1d9)](_0x1e5798,_0xb901d9,{'value':_0x31e507,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1e5798[_0xb901d9]=_0x31e507,_0x1e5798;}function _0x20dd(_0x580e11,_0x3f6171){_0x580e11=_0x580e11-0x1b1;const _0x31169a=_0x3116();let _0x20ddf4=_0x31169a[_0x580e11];return _0x20ddf4;}var b=class extends _0x424828{constructor(){const _0x1aad8a=_0x20dd;super(),y(this,_0x1aad8a(0x1b9),new Map()),y(this,_0x1aad8a(0x1de),new Set()),y(this,'_groupIds',new Set());}[_0x28a5ea(0x1fd)](_0x20ef64,_0x44503c,_0x22dd2b){const _0x2c3894=_0x28a5ea;let _0x4e2d24=new _0x2026dc(_0x20ef64,_0x44503c,_0x22dd2b);return this['_shapes']['set'](_0x44503c,_0x4e2d24),_0x116024(_0x20ef64)&&this[_0x2c3894(0x1de)][_0x2c3894(0x1f4)](_0x44503c),_0x4e2d24;}['getBasicShapeRelation'](_0x1ee517){const _0x2cd14d=_0x28a5ea;let _0x438271=[];for(let _0x2b2029 of this[_0x2cd14d(0x1de)]){let _0xc4e157=this[_0x2cd14d(0x1b9)][_0x2cd14d(0x1bd)](_0x2b2029);if(_0xc4e157){let _0xcd6ec0=_0xc4e157[_0x2cd14d(0x1e3)]();if(_0xcd6ec0){var _0x307a3b,_0x47c400;((_0x307a3b=_0xcd6ec0['from'])==null?void 0x0:_0x307a3b['shapeId'])===_0x1ee517&&_0x438271['push']({..._0xcd6ec0['from'],'lineShapeId':_0x2b2029,'isFrom':!0x0}),((_0x47c400=_0xcd6ec0['to'])==null?void 0x0:_0x47c400['shapeId'])===_0x1ee517&&_0x438271['push']({..._0xcd6ec0['to'],'lineShapeId':_0x2b2029,'isFrom':!0x1});}}}return _0x438271;}[_0x28a5ea(0x1cb)](_0x56ab54){const _0x49d5ce=_0x28a5ea;let _0x2dd07b=this[_0x49d5ce(0x1b9)][_0x49d5ce(0x1bd)](_0x56ab54);if(_0x2dd07b)return _0x2dd07b[_0x49d5ce(0x1e3)]();}[_0x28a5ea(0x1e0)](_0x3cb3ca){const _0x34c89a=_0x28a5ea;let _0x377e58=this[_0x34c89a(0x1b9)][_0x34c89a(0x1bd)](_0x3cb3ca);if(_0x377e58)return _0x377e58['getShapeType']();}[_0x28a5ea(0x1bb)](_0x5b11bb){const _0x596625=_0x28a5ea;return this[_0x596625(0x1b9)][_0x596625(0x1c2)](_0x5b11bb);}[_0x28a5ea(0x1cc)](_0x5eeedf){const _0x5c30a0=_0x28a5ea;let _0x97c29d=this[_0x5c30a0(0x1b9)][_0x5c30a0(0x1bd)](_0x5eeedf);_0x97c29d&&(_0x116024(_0x97c29d[_0x5c30a0(0x1e0)]())&&this['_linesIds'][_0x5c30a0(0x1f2)](_0x5eeedf),this['_shapes'][_0x5c30a0(0x1f2)](_0x5eeedf));}['toJSON'](){const _0x567ca9=_0x28a5ea;let _0x6f98ba=[];return this[_0x567ca9(0x1b9)][_0x567ca9(0x1d5)](_0x40874e=>{const _0xc3c342=_0x567ca9;_0x6f98ba[_0xc3c342(0x1bf)](_0x40874e['toJSON']());}),_0x6f98ba;}[_0x28a5ea(0x1b1)](_0x5d3afb){const _0x26dbc6=_0x28a5ea;for(let _0x5b6e41 of _0x5d3afb){let {id:_0x43e3eb,shapeType:_0x210187}=_0x5b6e41,_0x24c139=this[_0x26dbc6(0x1fd)](_0x210187,_0x43e3eb,_0x5b6e41[_0x26dbc6(0x1d2)]);_0x24c139&&_0x24c139[_0x26dbc6(0x1b7)]()&&this[_0x26dbc6(0x1de)]['add'](_0x43e3eb);}}[_0x28a5ea(0x1db)](){const _0x1bf90f=_0x28a5ea;this[_0x1bf90f(0x1d8)]||(this[_0x1bf90f(0x1b9)][_0x1bf90f(0x1d5)](_0x4d5eb2=>{const _0x1bb418=_0x1bf90f;_0x4d5eb2[_0x1bb418(0x1db)]();}),this[_0x1bf90f(0x1b9)][_0x1bf90f(0x1e5)](),this[_0x1bf90f(0x1de)]['clear'](),this[_0x1bf90f(0x1d4)][_0x1bf90f(0x1e5)](),super[_0x1bf90f(0x1db)]());}};function x(_0x59e91d,_0x4520d3){return function(_0x1dbaf4,_0x1800b1){_0x4520d3(_0x1dbaf4,_0x1800b1,_0x59e91d);};}function S(_0x48fdef,_0x248653,_0xf402ae,_0x2ab4d2){const _0x40b5d8=_0x28a5ea;var _0x588f46=arguments[_0x40b5d8(0x1ba)],_0x31d865=_0x588f46<0x3?_0x248653:_0x2ab4d2===null?_0x2ab4d2=Object['getOwnPropertyDescriptor'](_0x248653,_0xf402ae):_0x2ab4d2,_0xb6582b;if(typeof Reflect=='object'&&typeof Reflect[_0x40b5d8(0x1ea)]==_0x40b5d8(0x1da))_0x31d865=Reflect[_0x40b5d8(0x1ea)](_0x48fdef,_0x248653,_0xf402ae,_0x2ab4d2);else{for(var _0x14bfb2=_0x48fdef[_0x40b5d8(0x1ba)]-0x1;_0x14bfb2>=0x0;_0x14bfb2--)(_0xb6582b=_0x48fdef[_0x14bfb2])&&(_0x31d865=(_0x588f46<0x3?_0xb6582b(_0x31d865):_0x588f46>0x3?_0xb6582b(_0x248653,_0xf402ae,_0x31d865):_0xb6582b(_0x248653,_0xf402ae))||_0x31d865);}return _0x588f46>0x3&&_0x31d865&&Object[_0x40b5d8(0x1d9)](_0x248653,_0xf402ae,_0x31d865),_0x31d865;}let C=class extends _0x424828{constructor(_0x273f9f){const _0x6245ff=_0x28a5ea;super(),this['_resourcesManagerService']=_0x273f9f,y(this,_0x6245ff(0x1d1),new Map()),this[_0x6245ff(0x1fc)]();}[_0x28a5ea(0x1dd)](_0x176bbd,_0x3b35b9){const _0x22207b=_0x28a5ea;let _0x2e1cad=this[_0x22207b(0x1d1)][_0x22207b(0x1bd)](_0x176bbd);_0x2e1cad||(_0x2e1cad=new Map(),this['_shapeModelManagerMap'][_0x22207b(0x1d6)](_0x176bbd,_0x2e1cad));let _0x8808bd=_0x2e1cad[_0x22207b(0x1bd)](_0x3b35b9);return _0x8808bd||(_0x8808bd=new b(),_0x2e1cad[_0x22207b(0x1d6)](_0x3b35b9,_0x8808bd)),_0x8808bd;}[_0x28a5ea(0x1c5)](_0x4e9a6e,_0x178b9c,_0x159dae,_0x343af3,_0x30afb4){const _0x47b4d9=_0x28a5ea;this[_0x47b4d9(0x1dd)](_0x4e9a6e,_0x178b9c)[_0x47b4d9(0x1fd)](_0x159dae,_0x343af3,_0x30afb4);}[_0x28a5ea(0x1cc)](_0x51a9aa,_0x503d6,_0x376840){const _0x191891=_0x28a5ea;this[_0x191891(0x1dd)](_0x51a9aa,_0x503d6)[_0x191891(0x1cc)](_0x376840);}['getBasicShapeType'](_0x43c98d,_0x352f80,_0x287558){const _0x2d6e6e=_0x28a5ea;return this[_0x2d6e6e(0x1dd)](_0x43c98d,_0x352f80)[_0x2d6e6e(0x1e0)](_0x287558);}[_0x28a5ea(0x1e0)](_0x417f6d,_0x4107f4,_0x1f6434){const _0x37c92b=_0x28a5ea;return this['_ensureShapeModelManager'](_0x417f6d,_0x4107f4)[_0x37c92b(0x1e0)](_0x1f6434);}['hasShape'](_0x2c247e,_0x561c9f,_0x27eb60){const _0x4921b6=_0x28a5ea;return this[_0x4921b6(0x1dd)](_0x2c247e,_0x561c9f)[_0x4921b6(0x1bb)](_0x27eb60);}[_0x28a5ea(0x1d3)](_0x5dbeea,_0x41e37f,_0x55122e){const _0x267b43=_0x28a5ea;return this[_0x267b43(0x1dd)](_0x5dbeea,_0x41e37f)['getShapeType'](_0x55122e);}[_0x28a5ea(0x1c9)](_0x5ec6b9,_0x291311,_0x5c4a0d){const _0xc1b4d9=_0x28a5ea;let _0x5d37f9=this[_0xc1b4d9(0x1dd)](_0x5ec6b9,_0x291311);if(!_0x5d37f9[_0xc1b4d9(0x1e0)](_0x5c4a0d))return;let _0x4563d7=_0x5d37f9[_0xc1b4d9(0x1b9)][_0xc1b4d9(0x1bd)](_0x5c4a0d);if(_0x4563d7)return _0x4563d7['getShapeData']();}[_0x28a5ea(0x1d0)](_0x1b4ed0,_0x320ff5,_0x2de6d7){const _0x543d05=_0x28a5ea;return this[_0x543d05(0x1dd)](_0x1b4ed0,_0x320ff5)[_0x543d05(0x1b9)][_0x543d05(0x1bd)](_0x2de6d7);}['getBasicShapeRelation'](_0x4c7455,_0x1c10b3,_0x62a082){const _0x7de41d=_0x28a5ea;return this['_ensureShapeModelManager'](_0x4c7455,_0x1c10b3)[_0x7de41d(0x1f0)](_0x62a082);}['getLineShapeRelation'](_0x2c662d,_0x263375,_0x527124){const _0x495047=_0x28a5ea;let _0x1e30df=this[_0x495047(0x1dd)](_0x2c662d,_0x263375)[_0x495047(0x1b9)][_0x495047(0x1bd)](_0x527124);if(_0x1e30df)return _0x1e30df[_0x495047(0x1e3)]();}[_0x28a5ea(0x1cf)](){}['_serializeShapeForUnit'](_0x200f9b){const _0x7084b6=_0x28a5ea;let _0x28e5ef={},_0x1dadfc=this[_0x7084b6(0x1d1)]['get'](_0x200f9b);return _0x1dadfc&&_0x1dadfc[_0x7084b6(0x1d5)]((_0x1eeb08,_0x7115b1)=>{const _0x1c57eb=_0x7084b6;let _0x448358=_0x1eeb08[_0x1c57eb(0x1ed)]();_0x448358['length']>0x0&&(_0x28e5ef[_0x7115b1]=_0x448358);}),JSON[_0x7084b6(0x1cd)](_0x28e5ef);}[_0x28a5ea(0x1b8)](_0x45549f,_0x254ff3){const _0x308f18=_0x28a5ea;Object[_0x308f18(0x1f3)](_0x254ff3)['forEach'](_0x4bb4fc=>{const _0x45397d=_0x308f18;this[_0x45397d(0x1dd)](_0x45549f,_0x4bb4fc)[_0x45397d(0x1b1)](_0x254ff3[_0x4bb4fc]);});}['toJSON'](){const _0x814c69=_0x28a5ea;let _0x5b41df={};return this[_0x814c69(0x1d1)]['forEach']((_0x3a0a0d,_0x3301fb)=>{const _0x17d8dd=_0x814c69;_0x5b41df[_0x3301fb]={},_0x3a0a0d[_0x17d8dd(0x1d5)]((_0x2a2cf9,_0x5e3da8)=>{const _0x3170f4=_0x17d8dd;_0x5b41df[_0x3301fb][_0x5e3da8]=_0x2a2cf9[_0x3170f4(0x1ed)]();});}),_0x5b41df;}[_0x28a5ea(0x1b1)](_0x2951d6){const _0x4dc8d2=_0x28a5ea;Object[_0x4dc8d2(0x1f3)](_0x2951d6)['forEach'](_0x469c3c=>{const _0x5ad3f7=_0x4dc8d2;let _0x314fea=_0x2951d6[_0x469c3c];Object[_0x5ad3f7(0x1f3)](_0x314fea)[_0x5ad3f7(0x1d5)](_0x3d2159=>{const _0x15a3e9=_0x5ad3f7;this[_0x15a3e9(0x1dd)](_0x469c3c,_0x3d2159)[_0x15a3e9(0x1b1)](_0x314fea[_0x3d2159]);});});}['_initSnapshot'](){const _0x18b873=_0x28a5ea;this[_0x18b873(0x1f8)]['registerPluginResource']({'pluginName':_0x18b873(0x1f7),'businesses':[_0x53089c[_0x18b873(0x1b6)]],'toJson':_0x1e95ba=>this['_serializeShapeForUnit'](_0x1e95ba),'parseJson':_0x1b76ba=>JSON['parse'](_0x1b76ba),'onLoad':(_0x55cbff,_0x492a84)=>{const _0x1e2a7a=_0x18b873;this[_0x1e2a7a(0x1b8)](_0x55cbff,_0x492a84);},'onUnLoad':_0x593039=>{const _0x188a2d=_0x18b873;let _0x37f71f=this['_shapeModelManagerMap'][_0x188a2d(0x1bd)](_0x593039);_0x37f71f&&(_0x37f71f[_0x188a2d(0x1d5)](_0x436ca0=>{const _0x1e06f3=_0x188a2d;_0x436ca0[_0x1e06f3(0x1db)]();}),this[_0x188a2d(0x1d1)]['delete'](_0x593039));}});}[_0x28a5ea(0x1db)](){const _0x5009df=_0x28a5ea;this[_0x5009df(0x1d1)][_0x5009df(0x1d5)](_0x42e3e2=>{const _0x522439=_0x5009df;_0x42e3e2[_0x522439(0x1d5)](_0x2e9ae5=>{const _0xb4cd1=_0x522439;_0x2e9ae5[_0xb4cd1(0x1db)]();});});}};C=S([x(0x0,_0x56a625)],C);const w={'id':_0x28a5ea(0x1e9),'type':_0xb1831c[_0x28a5ea(0x1ca)],'handler':(_0x280c48,_0x447d53)=>{const _0x218ecb=_0x28a5ea;let {unitId:_0x497dbc,subUnitId:_0x380c47,shapeType:_0x50da28,shapeId:_0x3771ff,shapeData:_0x526e9d}=_0x447d53,_0x354f5b=_0x280c48['get'](C)[_0x218ecb(0x1d0)](_0x497dbc,_0x380c47,_0x3771ff);return _0x354f5b&&(_0x354f5b[_0x218ecb(0x1cf)](_0x50da28),_0x526e9d&&(_0x354f5b==null||_0x354f5b[_0x218ecb(0x1e7)](_0x526e9d))),!0x0;}},T={'id':'sheet.command.update-shape-type','type':_0xb1831c[_0x28a5ea(0x1bc)],'handler':(_0x2c75af,_0x18d291)=>{const _0x4bd9c2=_0x28a5ea;if(!_0x18d291)return!0x1;let _0x559e39=_0x2c75af[_0x4bd9c2(0x1bd)](_0x259c9e),_0x4ea816=_0x2c75af[_0x4bd9c2(0x1bd)](C),_0xe1069a=_0x2c75af[_0x4bd9c2(0x1bd)](_0x266e9b),_0x20ec44=[],_0x14fb49=[],{unitId:_0x148fa0,subUnitId:_0x12064e,shapeId:_0xfaa4e0,shapeType:_0x23618a,shapeData:_0x1674b2}=_0x18d291,_0x2543e3=_0x4ea816['getShapeModel'](_0x148fa0,_0x12064e,_0xfaa4e0);if(_0x2543e3){let _0x2696bc=_0x2543e3[_0x4bd9c2(0x1e0)](),_0x513a3a=Object[_0x4bd9c2(0x1e6)]({},_0x2543e3[_0x4bd9c2(0x1c8)]()),_0x352980={'unitId':_0x148fa0,'subUnitId':_0x12064e,'shapeId':_0xfaa4e0,'shapeType':_0x23618a,'shapeData':_0x1674b2},_0x54e471={'unitId':_0x148fa0,'subUnitId':_0x12064e,'shapeId':_0xfaa4e0,'shapeType':_0x2696bc,'shapeData':_0x513a3a};return _0x20ec44[_0x4bd9c2(0x1bf)]({'id':w['id'],'params':_0x352980}),_0x14fb49['push']({'id':w['id'],'params':_0x54e471}),_0x20ec44[_0x4bd9c2(0x1c3)](_0x3475ca=>_0x559e39['syncExecuteCommand'](_0x3475ca['id'],_0x3475ca['params']))&&_0xe1069a['pushUndoRedo']({'unitID':_0x148fa0,'redoMutations':[..._0x20ec44],'undoMutations':[..._0x14fb49]}),!0x0;}return!0x1;}},E={'id':_0x28a5ea(0x1e1),'type':_0xb1831c[_0x28a5ea(0x1ca)],'handler':(_0x44a535,_0x5635eb)=>{const _0x609b50=_0x28a5ea;let {unitId:_0x421db1,subUnitId:_0x35b1ec,shapeType:_0x114314,shapeId:_0x35a2fa,shapeData:_0x1bff87}=_0x5635eb;return _0x44a535[_0x609b50(0x1bd)](C)[_0x609b50(0x1c5)](_0x421db1,_0x35b1ec,_0x114314,_0x35a2fa,_0x1bff87),!0x0;}},D={'id':'sheet.mutation.remove-shape','type':_0xb1831c[_0x28a5ea(0x1ca)],'handler':(_0x2d53af,_0x921922)=>{const _0x454765=_0x28a5ea;let {unitId:_0x248175,subUnitId:_0x1fbe1b,shapeId:_0x351c98}=_0x921922;return _0x2d53af[_0x454765(0x1bd)](C)[_0x454765(0x1cc)](_0x248175,_0x1fbe1b,_0x351c98),!0x0;}},O={'id':'sheet.mutation.update-shape-data','type':_0xb1831c[_0x28a5ea(0x1ca)],'handler':(_0x5d144a,_0x132d7b)=>{const _0x111b9d=_0x28a5ea;let {unitId:_0x2a2123,subUnitId:_0x554464,shapeType:_0x17511a,shapeId:_0x442021,shapeData:_0x1e8e0b}=_0x132d7b,_0x1c5416=_0x5d144a[_0x111b9d(0x1bd)](C)[_0x111b9d(0x1d0)](_0x2a2123,_0x554464,_0x442021);return _0x1c5416&&(_0x17511a!==void 0x0&&_0x1c5416[_0x111b9d(0x1cf)](_0x17511a),_0x1e8e0b&&(_0x1c5416==null||_0x1c5416['setShapeData'](_0x1e8e0b,!0x0))),!0x0;}};var k=_0x28a5ea(0x1ce),A=_0x28a5ea(0x1f9);const j=_0x28a5ea(0x1c6);Symbol(j);const M={};let N=class extends _0x3ec36c{constructor(_0x2d7382=M,_0x10d89,_0x993fc7,_0x311236){const _0x420853=_0x28a5ea;super(),this[_0x420853(0x1d7)]=_0x2d7382,this[_0x420853(0x1f6)]=_0x10d89,this[_0x420853(0x1fa)]=_0x993fc7,this[_0x420853(0x1ec)]=_0x311236;let {..._0x1f9126}=_0x1258f7({},M,this['_config']);this[_0x420853(0x1ec)]['setConfig'](j,_0x1f9126),this['_initCommands']();}['onRendered'](){_0x28b92a(this['_injector'],[]);}[_0x28a5ea(0x1be)](){const _0x13e93f=_0x28a5ea;let _0x5c89b4=this[_0x13e93f(0x1f6)];[[b],[C]][_0x13e93f(0x1d5)](_0x108215=>_0x5c89b4[_0x13e93f(0x1f4)](_0x108215));}[_0x28a5ea(0x1b2)](){const _0x1c7eb3=_0x28a5ea;[E,D,w,O]['forEach'](_0x43ddab=>this[_0x1c7eb3(0x1fb)](this['_commandService'][_0x1c7eb3(0x1e4)](_0x43ddab)));}};y(N,'type',_0x53089c[_0x28a5ea(0x1b6)]),y(N,_0x28a5ea(0x1b5),'SHEET_SHAPE_PLUGIN'),y(N,_0x28a5ea(0x1df),k),y(N,'version',A),N=S([_0x127158(_0xed911a),x(0x1,_0x55920c(_0x3e7a80)),x(0x2,_0x259c9e),x(0x3,_0x51281f)],N);export{E as InsertSheetsShapeMutation,D as RemoveSheetsShapeMutation,C as SheetsShapeService,N as UniverSheetsShapePlugin,O as UpdateSheetsShapeDataMutation,T as UpdateSheetsShapeTypeCommand,w as UpdateSheetsShapeTypeMutation};
|
|
1
|
+
const _0x4c845f=_0x2c82;(function(_0x2eb0dd,_0x1252f7){const _0x550649=_0x2c82,_0x5e8956=_0x2eb0dd();while(!![]){try{const _0x232cd9=parseInt(_0x550649(0x1fe))/0x1*(parseInt(_0x550649(0x1ff))/0x2)+parseInt(_0x550649(0x1d0))/0x3*(-parseInt(_0x550649(0x208))/0x4)+parseInt(_0x550649(0x202))/0x5*(-parseInt(_0x550649(0x1eb))/0x6)+-parseInt(_0x550649(0x1f6))/0x7+-parseInt(_0x550649(0x1e3))/0x8*(-parseInt(_0x550649(0x1fc))/0x9)+parseInt(_0x550649(0x218))/0xa+-parseInt(_0x550649(0x1f0))/0xb*(-parseInt(_0x550649(0x1fb))/0xc);if(_0x232cd9===_0x1252f7)break;else _0x5e8956['push'](_0x5e8956['shift']());}catch(_0x3cb0cd){_0x5e8956['push'](_0x5e8956['shift']());}}}(_0x46f1,0xa2a81));import{CommandType as _0x564fb6,DependentOn as _0x4c3550,Disposable as _0x24c3c3,ICommandService as _0x23a80e,IConfigService as _0x344690,IResourceManagerService as _0x47ef38,IUndoRedoService as _0x340978,Inject as _0x299397,Injector as _0x441a1a,Plugin as _0xf3b44b,UniverInstanceType as _0x9e6c36,merge as _0x42bbf3,touchDependencies as _0x1601a1}from'@univerjs/core';import{ShapeModel as _0x244526,isConnectorShape as _0x41f54d}from'@univerjs-pro/engine-shape';import{UniverLicensePlugin as _0x59912c}from'@univerjs-pro/license';function _0x2c82(_0x19c3ba,_0x4a7bad){_0x19c3ba=_0x19c3ba-0x1d0;const _0x46f1a2=_0x46f1();let _0x2c82be=_0x46f1a2[_0x19c3ba];return _0x2c82be;}function g(_0x215fe4){'@babel/helpers - typeof';const _0x34c62e=_0x2c82;return g=typeof Symbol==_0x34c62e(0x1da)&&typeof Symbol['iterator']==_0x34c62e(0x1d2)?function(_0x1f116d){return typeof _0x1f116d;}:function(_0x249510){const _0x2b6d34=_0x34c62e;return _0x249510&&typeof Symbol==_0x2b6d34(0x1da)&&_0x249510[_0x2b6d34(0x205)]===Symbol&&_0x249510!==Symbol[_0x2b6d34(0x20f)]?_0x2b6d34(0x1d2):typeof _0x249510;},g(_0x215fe4);}function _0x46f1(){const _0x204050=['parse','947548gJblkg','sheet.mutation.update-shape-type','version','getBasicShapeType','shapeData','1476EHwteo','9eINiba','setShapeType','4reqmif','5912YheLEz','getShapeData','MUTATION','15OBAOmQ','_linesIds','addShape','constructor','_initSnapshot','get','4334828bllqxk','toPrimitive','insertShape','onRendered','set','removeShape','COMMAND','prototype','from','_deserializeShapeForUnit','SHEET_SHAPE_PLUGIN','dispose','setConfig','pushUndoRedo','type','sheet.mutation.remove-shape','21040BJwiVP','_shapes','sheet.mutation.update-shape-data','add','toJSON','0.19.0','UNIVER_SHEET','_ensureShapeModelManager','_groupIds','_disposed','getShapeTypeById','keys','clear','string','3yqUsjH','delete','symbol','getShapeModel','has','_configService','length','fromJSON','registerCommand','every','function','push','hasShape','stringify','registerPluginResource','params','getBasicShapeRelation','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','default','4182616YeMGKN','getShapeDataById','shapeId','getLineShapeRelation','forEach','sheets-shape.config','_config','object','1752042mkdUVR','sheet.command.update-shape-type','_initCommands','getOwnPropertyDescriptor','isLineShape','198946qlGrvF','getShapeType','_serializeShapeForUnit','decorate','_shapeModelManagerMap'];_0x46f1=function(){return _0x204050;};return _0x46f1();}function _(_0x4b42c1,_0x161b0d){const _0x5c39cf=_0x2c82;if(g(_0x4b42c1)!=_0x5c39cf(0x1ea)||!_0x4b42c1)return _0x4b42c1;var _0x30bfe8=_0x4b42c1[Symbol[_0x5c39cf(0x209)]];if(_0x30bfe8!==void 0x0){var _0x3f4d84=_0x30bfe8['call'](_0x4b42c1,_0x161b0d||_0x5c39cf(0x1e2));if(g(_0x3f4d84)!=_0x5c39cf(0x1ea))return _0x3f4d84;throw TypeError(_0x5c39cf(0x1e1));}return(_0x161b0d===_0x5c39cf(0x225)?String:Number)(_0x4b42c1);}function v(_0x4d8895){const _0x1fcfef=_0x2c82;var _0x5d939d=_(_0x4d8895,_0x1fcfef(0x225));return g(_0x5d939d)=='symbol'?_0x5d939d:_0x5d939d+'';}function y(_0x38045d,_0x2d6640,_0x247597){return(_0x2d6640=v(_0x2d6640))in _0x38045d?Object['defineProperty'](_0x38045d,_0x2d6640,{'value':_0x247597,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x38045d[_0x2d6640]=_0x247597,_0x38045d;}var b=class extends _0x24c3c3{constructor(){const _0x464829=_0x2c82;super(),y(this,_0x464829(0x219),new Map()),y(this,_0x464829(0x203),new Set()),y(this,_0x464829(0x220),new Set());}[_0x4c845f(0x204)](_0x17e1c5,_0xcf0d7e,_0x5d3356){const _0x5e4bad=_0x4c845f;let _0x14ef2a=new _0x244526(_0x17e1c5,_0xcf0d7e,_0x5d3356);return this[_0x5e4bad(0x219)][_0x5e4bad(0x20c)](_0xcf0d7e,_0x14ef2a),_0x41f54d(_0x17e1c5)&&this[_0x5e4bad(0x203)]['add'](_0xcf0d7e),_0x14ef2a;}[_0x4c845f(0x1e0)](_0x466171){const _0x199248=_0x4c845f;let _0x30a2b0=[];for(let _0x3c6af1 of this[_0x199248(0x203)]){let _0x4186af=this['_shapes'][_0x199248(0x207)](_0x3c6af1);if(_0x4186af){let _0xbfed16=_0x4186af['getShapeRelation']();if(_0xbfed16){var _0x1e92df,_0x4f5b63;((_0x1e92df=_0xbfed16[_0x199248(0x210)])==null?void 0x0:_0x1e92df[_0x199248(0x1e5)])===_0x466171&&_0x30a2b0[_0x199248(0x1db)]({..._0xbfed16['from'],'lineShapeId':_0x3c6af1,'isFrom':!0x0}),((_0x4f5b63=_0xbfed16['to'])==null?void 0x0:_0x4f5b63[_0x199248(0x1e5)])===_0x466171&&_0x30a2b0[_0x199248(0x1db)]({..._0xbfed16['to'],'lineShapeId':_0x3c6af1,'isFrom':!0x1});}}}return _0x30a2b0;}[_0x4c845f(0x1e6)](_0x1db441){const _0x562063=_0x4c845f;let _0x2cc54b=this[_0x562063(0x219)][_0x562063(0x207)](_0x1db441);if(_0x2cc54b)return _0x2cc54b['getShapeRelation']();}['getShapeType'](_0x52c98e){const _0x55d71b=_0x4c845f;let _0x4fed67=this[_0x55d71b(0x219)]['get'](_0x52c98e);if(_0x4fed67)return _0x4fed67[_0x55d71b(0x1f1)]();}[_0x4c845f(0x1dc)](_0x238ce5){const _0x27610d=_0x4c845f;return this['_shapes'][_0x27610d(0x1d4)](_0x238ce5);}['removeShape'](_0x43708e){const _0x2ad3d8=_0x4c845f;let _0x567c9c=this['_shapes'][_0x2ad3d8(0x207)](_0x43708e);_0x567c9c&&(_0x41f54d(_0x567c9c[_0x2ad3d8(0x1f1)]())&&this['_linesIds'][_0x2ad3d8(0x1d1)](_0x43708e),this['_shapes']['delete'](_0x43708e));}[_0x4c845f(0x21c)](){const _0x37bdb2=_0x4c845f;let _0x527913=[];return this[_0x37bdb2(0x219)]['forEach'](_0x2b14dc=>{const _0x4e63b4=_0x37bdb2;_0x527913[_0x4e63b4(0x1db)](_0x2b14dc[_0x4e63b4(0x21c)]());}),_0x527913;}[_0x4c845f(0x1d7)](_0x3092e5){const _0x5c64fd=_0x4c845f;for(let _0x3301c3 of _0x3092e5){let {id:_0x47bda6,shapeType:_0x30d750}=_0x3301c3,_0x1ab81e=this['addShape'](_0x30d750,_0x47bda6,_0x3301c3[_0x5c64fd(0x1fa)]);_0x1ab81e&&_0x1ab81e[_0x5c64fd(0x1ef)]()&&this['_linesIds'][_0x5c64fd(0x21b)](_0x47bda6);}}[_0x4c845f(0x213)](){const _0x4ee1c3=_0x4c845f;this[_0x4ee1c3(0x221)]||(this[_0x4ee1c3(0x219)][_0x4ee1c3(0x1e7)](_0x2e3414=>{_0x2e3414['dispose']();}),this[_0x4ee1c3(0x219)][_0x4ee1c3(0x224)](),this[_0x4ee1c3(0x203)][_0x4ee1c3(0x224)](),this['_groupIds'][_0x4ee1c3(0x224)](),super[_0x4ee1c3(0x213)]());}};function x(_0x19f025,_0x270324){return function(_0x3b36cb,_0x5b7f1c){_0x270324(_0x3b36cb,_0x5b7f1c,_0x19f025);};}function S(_0x4b128a,_0x3edbf7,_0x342e4c,_0x56bca){const _0x3d526c=_0x4c845f;var _0x1d7924=arguments[_0x3d526c(0x1d6)],_0x5bac77=_0x1d7924<0x3?_0x3edbf7:_0x56bca===null?_0x56bca=Object[_0x3d526c(0x1ee)](_0x3edbf7,_0x342e4c):_0x56bca,_0xe76073;if(typeof Reflect==_0x3d526c(0x1ea)&&typeof Reflect[_0x3d526c(0x1f3)]==_0x3d526c(0x1da))_0x5bac77=Reflect['decorate'](_0x4b128a,_0x3edbf7,_0x342e4c,_0x56bca);else{for(var _0x27f517=_0x4b128a['length']-0x1;_0x27f517>=0x0;_0x27f517--)(_0xe76073=_0x4b128a[_0x27f517])&&(_0x5bac77=(_0x1d7924<0x3?_0xe76073(_0x5bac77):_0x1d7924>0x3?_0xe76073(_0x3edbf7,_0x342e4c,_0x5bac77):_0xe76073(_0x3edbf7,_0x342e4c))||_0x5bac77);}return _0x1d7924>0x3&&_0x5bac77&&Object['defineProperty'](_0x3edbf7,_0x342e4c,_0x5bac77),_0x5bac77;}let C=class extends _0x24c3c3{constructor(_0x420774){const _0x23a4bc=_0x4c845f;super(),this['_resourcesManagerService']=_0x420774,y(this,_0x23a4bc(0x1f4),new Map()),this[_0x23a4bc(0x206)]();}[_0x4c845f(0x21f)](_0x4592ab,_0x49206c){const _0x553236=_0x4c845f;let _0x1a1ab8=this[_0x553236(0x1f4)][_0x553236(0x207)](_0x4592ab);_0x1a1ab8||(_0x1a1ab8=new Map(),this[_0x553236(0x1f4)][_0x553236(0x20c)](_0x4592ab,_0x1a1ab8));let _0x16ca84=_0x1a1ab8[_0x553236(0x207)](_0x49206c);return _0x16ca84||(_0x16ca84=new b(),_0x1a1ab8['set'](_0x49206c,_0x16ca84)),_0x16ca84;}[_0x4c845f(0x20a)](_0x56950e,_0x4015d2,_0x435642,_0x3720ef,_0x3bfe8b){const _0x5659e8=_0x4c845f;this[_0x5659e8(0x21f)](_0x56950e,_0x4015d2)['addShape'](_0x435642,_0x3720ef,_0x3bfe8b);}['removeShape'](_0x1c60b0,_0x37985c,_0x500fcc){const _0x37627d=_0x4c845f;this['_ensureShapeModelManager'](_0x1c60b0,_0x37985c)[_0x37627d(0x20d)](_0x500fcc);}[_0x4c845f(0x1f9)](_0x5933e6,_0x3c1428,_0x4c93f5){const _0x4d6bcd=_0x4c845f;return this[_0x4d6bcd(0x21f)](_0x5933e6,_0x3c1428)[_0x4d6bcd(0x1f1)](_0x4c93f5);}[_0x4c845f(0x1f1)](_0x3e68f7,_0x9ef5b4,_0x543d9e){const _0x1d90c2=_0x4c845f;return this[_0x1d90c2(0x21f)](_0x3e68f7,_0x9ef5b4)[_0x1d90c2(0x1f1)](_0x543d9e);}[_0x4c845f(0x1dc)](_0x35cf4c,_0x5a1672,_0x4022fd){const _0x106604=_0x4c845f;return this['_ensureShapeModelManager'](_0x35cf4c,_0x5a1672)[_0x106604(0x1dc)](_0x4022fd);}[_0x4c845f(0x222)](_0x144ac6,_0xd70bb8,_0x5510f){const _0x1c1321=_0x4c845f;return this['_ensureShapeModelManager'](_0x144ac6,_0xd70bb8)[_0x1c1321(0x1f1)](_0x5510f);}[_0x4c845f(0x1e4)](_0x2c734e,_0x485056,_0x562cb8){const _0x4f3c9f=_0x4c845f;let _0x2dfe4f=this[_0x4f3c9f(0x21f)](_0x2c734e,_0x485056);if(!_0x2dfe4f[_0x4f3c9f(0x1f1)](_0x562cb8))return;let _0x427f73=_0x2dfe4f[_0x4f3c9f(0x219)][_0x4f3c9f(0x207)](_0x562cb8);if(_0x427f73)return _0x427f73['getShapeData']();}[_0x4c845f(0x1d3)](_0x372886,_0x362a21,_0x4b7f38){const _0xf67317=_0x4c845f;return this[_0xf67317(0x21f)](_0x372886,_0x362a21)[_0xf67317(0x219)][_0xf67317(0x207)](_0x4b7f38);}[_0x4c845f(0x1e0)](_0x37be24,_0x1c4422,_0x2226d7){const _0x345ddf=_0x4c845f;return this[_0x345ddf(0x21f)](_0x37be24,_0x1c4422)[_0x345ddf(0x1e0)](_0x2226d7);}[_0x4c845f(0x1e6)](_0x29bb7c,_0x266e5d,_0x437fa5){const _0x5cf384=_0x4c845f;let _0x1a55e8=this[_0x5cf384(0x21f)](_0x29bb7c,_0x266e5d)['_shapes']['get'](_0x437fa5);if(_0x1a55e8)return _0x1a55e8['getShapeRelation']();}['setShapeType'](){}[_0x4c845f(0x1f2)](_0x4600ca){const _0x34d20e=_0x4c845f;let _0x5959bb={},_0x416405=this['_shapeModelManagerMap'][_0x34d20e(0x207)](_0x4600ca);return _0x416405&&_0x416405['forEach']((_0x328d69,_0x493b48)=>{const _0x1236c0=_0x34d20e;let _0x2d1dab=_0x328d69[_0x1236c0(0x21c)]();_0x2d1dab[_0x1236c0(0x1d6)]>0x0&&(_0x5959bb[_0x493b48]=_0x2d1dab);}),JSON[_0x34d20e(0x1dd)](_0x5959bb);}[_0x4c845f(0x211)](_0x1620e7,_0x13f346){const _0x33e6b5=_0x4c845f;Object[_0x33e6b5(0x223)](_0x13f346)[_0x33e6b5(0x1e7)](_0x59cc16=>{const _0x51ae2b=_0x33e6b5;this[_0x51ae2b(0x21f)](_0x1620e7,_0x59cc16)[_0x51ae2b(0x1d7)](_0x13f346[_0x59cc16]);});}[_0x4c845f(0x21c)](){let _0x192e3c={};return this['_shapeModelManagerMap']['forEach']((_0x17cfc1,_0x6c8c31)=>{const _0x20997d=_0x2c82;_0x192e3c[_0x6c8c31]={},_0x17cfc1[_0x20997d(0x1e7)]((_0x3eed93,_0x3dd647)=>{const _0x55b924=_0x20997d;_0x192e3c[_0x6c8c31][_0x3dd647]=_0x3eed93[_0x55b924(0x21c)]();});}),_0x192e3c;}['fromJSON'](_0x2b9aa6){const _0x3cb7c8=_0x4c845f;Object[_0x3cb7c8(0x223)](_0x2b9aa6)[_0x3cb7c8(0x1e7)](_0xa77f3f=>{const _0x2cac5c=_0x3cb7c8;let _0x23e50b=_0x2b9aa6[_0xa77f3f];Object[_0x2cac5c(0x223)](_0x23e50b)[_0x2cac5c(0x1e7)](_0x41faa0=>{const _0x4c2166=_0x2cac5c;this[_0x4c2166(0x21f)](_0xa77f3f,_0x41faa0)[_0x4c2166(0x1d7)](_0x23e50b[_0x41faa0]);});});}[_0x4c845f(0x206)](){const _0xd42709=_0x4c845f;this['_resourcesManagerService'][_0xd42709(0x1de)]({'pluginName':_0xd42709(0x212),'businesses':[_0x9e6c36[_0xd42709(0x21e)]],'toJson':_0x27902b=>this[_0xd42709(0x1f2)](_0x27902b),'parseJson':_0x5b474d=>JSON[_0xd42709(0x1f5)](_0x5b474d),'onLoad':(_0x4afaa7,_0x2bcbb4)=>{this['_deserializeShapeForUnit'](_0x4afaa7,_0x2bcbb4);},'onUnLoad':_0x29d896=>{const _0x19cf53=_0xd42709;let _0x464d69=this[_0x19cf53(0x1f4)][_0x19cf53(0x207)](_0x29d896);_0x464d69&&(_0x464d69[_0x19cf53(0x1e7)](_0x23fdd1=>{const _0x5694ee=_0x19cf53;_0x23fdd1[_0x5694ee(0x213)]();}),this[_0x19cf53(0x1f4)]['delete'](_0x29d896));}});}[_0x4c845f(0x213)](){const _0x5ad7c5=_0x4c845f;this[_0x5ad7c5(0x1f4)][_0x5ad7c5(0x1e7)](_0x48ea70=>{const _0x353834=_0x5ad7c5;_0x48ea70[_0x353834(0x1e7)](_0x22184d=>{const _0x156a55=_0x353834;_0x22184d[_0x156a55(0x213)]();});});}};C=S([x(0x0,_0x47ef38)],C);const w={'id':_0x4c845f(0x1f7),'type':_0x564fb6['MUTATION'],'handler':(_0x19f627,_0x2fa4ae)=>{const _0xa67d4=_0x4c845f;let {unitId:_0x5c5b50,subUnitId:_0x1a4108,shapeType:_0x38be1b,shapeId:_0x310cab,shapeData:_0x1c480d}=_0x2fa4ae,_0x196697=_0x19f627[_0xa67d4(0x207)](C)['getShapeModel'](_0x5c5b50,_0x1a4108,_0x310cab);return _0x196697&&(_0x196697[_0xa67d4(0x1fd)](_0x38be1b),_0x1c480d&&(_0x196697==null||_0x196697['setShapeData'](_0x1c480d))),!0x0;}},T={'id':_0x4c845f(0x1ec),'type':_0x564fb6[_0x4c845f(0x20e)],'handler':(_0x235e8f,_0x7afcd)=>{const _0x586bd8=_0x4c845f;if(!_0x7afcd)return!0x1;let _0x51c5e8=_0x235e8f[_0x586bd8(0x207)](_0x23a80e),_0x362d77=_0x235e8f[_0x586bd8(0x207)](C),_0x26d965=_0x235e8f[_0x586bd8(0x207)](_0x340978),_0x3a92bd=[],_0x5a0f12=[],{unitId:_0x1a8743,subUnitId:_0x5b5be2,shapeId:_0x2d0413,shapeType:_0x2f1e2e,shapeData:_0x166f31}=_0x7afcd,_0x2a0bde=_0x362d77[_0x586bd8(0x1d3)](_0x1a8743,_0x5b5be2,_0x2d0413);if(_0x2a0bde){let _0x413e8a=_0x2a0bde[_0x586bd8(0x1f1)](),_0x2c27ff=Object['assign']({},_0x2a0bde[_0x586bd8(0x200)]()),_0x139f33={'unitId':_0x1a8743,'subUnitId':_0x5b5be2,'shapeId':_0x2d0413,'shapeType':_0x2f1e2e,'shapeData':_0x166f31},_0x185109={'unitId':_0x1a8743,'subUnitId':_0x5b5be2,'shapeId':_0x2d0413,'shapeType':_0x413e8a,'shapeData':_0x2c27ff};return _0x3a92bd[_0x586bd8(0x1db)]({'id':w['id'],'params':_0x139f33}),_0x5a0f12[_0x586bd8(0x1db)]({'id':w['id'],'params':_0x185109}),_0x3a92bd[_0x586bd8(0x1d9)](_0x56780e=>_0x51c5e8['syncExecuteCommand'](_0x56780e['id'],_0x56780e[_0x586bd8(0x1df)]))&&_0x26d965[_0x586bd8(0x215)]({'unitID':_0x1a8743,'redoMutations':[..._0x3a92bd],'undoMutations':[..._0x5a0f12]}),!0x0;}return!0x1;}},E={'id':'sheet.mutation.insert-shape','type':_0x564fb6['MUTATION'],'handler':(_0x5e925d,_0x29ddfc)=>{const _0x226043=_0x4c845f;let {unitId:_0x4a0ef1,subUnitId:_0x5012ec,shapeType:_0x539523,shapeId:_0x42f62c,shapeData:_0x4dbbab}=_0x29ddfc;return _0x5e925d[_0x226043(0x207)](C)[_0x226043(0x20a)](_0x4a0ef1,_0x5012ec,_0x539523,_0x42f62c,_0x4dbbab),!0x0;}},D={'id':_0x4c845f(0x217),'type':_0x564fb6[_0x4c845f(0x201)],'handler':(_0x2a3f4b,_0x430087)=>{const _0xc8cb31=_0x4c845f;let {unitId:_0x3b79a0,subUnitId:_0x590739,shapeId:_0x3fbe0c}=_0x430087;return _0x2a3f4b[_0xc8cb31(0x207)](C)[_0xc8cb31(0x20d)](_0x3b79a0,_0x590739,_0x3fbe0c),!0x0;}},O={'id':_0x4c845f(0x21a),'type':_0x564fb6[_0x4c845f(0x201)],'handler':(_0xa6522b,_0x5c7482)=>{const _0x40d8d2=_0x4c845f;let {unitId:_0x1c0b11,subUnitId:_0x3b5680,shapeType:_0x470993,shapeId:_0x18298d,shapeData:_0x13bc42}=_0x5c7482,_0xef88e4=_0xa6522b['get'](C)[_0x40d8d2(0x1d3)](_0x1c0b11,_0x3b5680,_0x18298d);return _0xef88e4&&(_0x470993!==void 0x0&&_0xef88e4[_0x40d8d2(0x1fd)](_0x470993),_0x13bc42&&(_0xef88e4==null||_0xef88e4['setShapeData'](_0x13bc42,!0x0))),!0x0;}};var k='@univerjs-pro/sheets-shape',A=_0x4c845f(0x21d);const j=_0x4c845f(0x1e8);Symbol(j);const M={};let N=class extends _0xf3b44b{constructor(_0x53bb60=M,_0x215e7a,_0x2b5d5f,_0x2125a9){const _0x452f52=_0x4c845f;super(),this[_0x452f52(0x1e9)]=_0x53bb60,this['_injector']=_0x215e7a,this['_commandService']=_0x2b5d5f,this[_0x452f52(0x1d5)]=_0x2125a9;let {..._0x360859}=_0x42bbf3({},M,this[_0x452f52(0x1e9)]);this[_0x452f52(0x1d5)][_0x452f52(0x214)](j,_0x360859),this[_0x452f52(0x1ed)]();}[_0x4c845f(0x20b)](){_0x1601a1(this['_injector'],[]);}['onStarting'](){const _0x401c32=_0x4c845f;let _0x21791e=this['_injector'];[[b],[C]][_0x401c32(0x1e7)](_0x1e4e95=>_0x21791e[_0x401c32(0x21b)](_0x1e4e95));}[_0x4c845f(0x1ed)](){const _0x493396=_0x4c845f;[E,D,w,O][_0x493396(0x1e7)](_0x39080c=>this['disposeWithMe'](this['_commandService'][_0x493396(0x1d8)](_0x39080c)));}};y(N,_0x4c845f(0x216),_0x9e6c36[_0x4c845f(0x21e)]),y(N,'pluginName','SHEET_SHAPE_PLUGIN'),y(N,'packageName',k),y(N,_0x4c845f(0x1f8),A),N=S([_0x4c3550(_0x59912c),x(0x1,_0x299397(_0x441a1a)),x(0x2,_0x23a80e),x(0x3,_0x344690)],N);export{E as InsertSheetsShapeMutation,D as RemoveSheetsShapeMutation,C as SheetsShapeService,N as UniverSheetsShapePlugin,O as UpdateSheetsShapeDataMutation,T as UpdateSheetsShapeTypeCommand,w as UpdateSheetsShapeTypeMutation};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x28a5ea=_0x20dd;(function(_0x5ee8e3,_0x4d8d54){const _0x1ef15d=_0x20dd,_0x2592ee=_0x5ee8e3();while(!![]){try{const _0x5ade29=-parseInt(_0x1ef15d(0x1f1))/0x1+parseInt(_0x1ef15d(0x1e2))/0x2+parseInt(_0x1ef15d(0x1ef))/0x3+parseInt(_0x1ef15d(0x1c7))/0x4+-parseInt(_0x1ef15d(0x1e8))/0x5*(parseInt(_0x1ef15d(0x1dc))/0x6)+-parseInt(_0x1ef15d(0x1f5))/0x7+parseInt(_0x1ef15d(0x1ee))/0x8*(parseInt(_0x1ef15d(0x1b3))/0x9);if(_0x5ade29===_0x4d8d54)break;else _0x2592ee['push'](_0x2592ee['shift']());}catch(_0x4b8961){_0x2592ee['push'](_0x2592ee['shift']());}}}(_0x3116,0xe54a1));import{CommandType as _0xb1831c,DependentOn as _0x127158,Disposable as _0x424828,ICommandService as _0x259c9e,IConfigService as _0x51281f,IResourceManagerService as _0x56a625,IUndoRedoService as _0x266e9b,Inject as _0x55920c,Injector as _0x3e7a80,Plugin as _0x3ec36c,UniverInstanceType as _0x53089c,merge as _0x1258f7,touchDependencies as _0x28b92a}from'@univerjs/core';import{ShapeModel as _0x2026dc,isConnectorShape as _0x116024}from'@univerjs-pro/engine-shape';import{UniverLicensePlugin as _0xed911a}from'@univerjs-pro/license';function _0x3116(){const _0x253724=['2592680xmpwHy','getShapeRelation','registerCommand','clear','assign','setShapeData','75xPGhqq','sheet.mutation.update-shape-type','decorate','default','_configService','toJSON','9806768eirHYH','3106809DxtdFh','getBasicShapeRelation','1691015DFmxRN','delete','keys','add','12445615hQxpkT','_injector','SHEET_SHAPE_PLUGIN','_resourcesManagerService','0.18.0','_commandService','disposeWithMe','_initSnapshot','addShape','fromJSON','_initCommands','9BzHZgb','toPrimitive','pluginName','UNIVER_SHEET','isLineShape','_deserializeShapeForUnit','_shapes','length','hasShape','COMMAND','get','onStarting','push','object','prototype','has','every','string','insertShape','sheets-shape.config','6075200QFCmpg','getShapeData','getShapeDataById','MUTATION','getLineShapeRelation','removeShape','stringify','@univerjs-pro/sheets-shape','setShapeType','getShapeModel','_shapeModelManagerMap','shapeData','getShapeTypeById','_groupIds','forEach','set','_config','_disposed','defineProperty','function','dispose','267384esKXPU','_ensureShapeModelManager','_linesIds','packageName','getShapeType','sheet.mutation.insert-shape'];_0x3116=function(){return _0x253724;};return _0x3116();}function g(_0x2576b7){'@babel/helpers - typeof';const _0x4089cc=_0x20dd;return g=typeof Symbol==_0x4089cc(0x1da)&&typeof Symbol['iterator']=='symbol'?function(_0x4760d3){return typeof _0x4760d3;}:function(_0x31184a){const _0x4504fc=_0x4089cc;return _0x31184a&&typeof Symbol==_0x4504fc(0x1da)&&_0x31184a['constructor']===Symbol&&_0x31184a!==Symbol[_0x4504fc(0x1c1)]?'symbol':typeof _0x31184a;},g(_0x2576b7);}function _(_0x44e5e5,_0x3bd912){const _0x461530=_0x20dd;if(g(_0x44e5e5)!=_0x461530(0x1c0)||!_0x44e5e5)return _0x44e5e5;var _0x3c1bc7=_0x44e5e5[Symbol[_0x461530(0x1b4)]];if(_0x3c1bc7!==void 0x0){var _0x3e31d0=_0x3c1bc7['call'](_0x44e5e5,_0x3bd912||_0x461530(0x1eb));if(g(_0x3e31d0)!=_0x461530(0x1c0))return _0x3e31d0;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x3bd912===_0x461530(0x1c4)?String:Number)(_0x44e5e5);}function v(_0x5c5674){var _0x33bf59=_(_0x5c5674,'string');return g(_0x33bf59)=='symbol'?_0x33bf59:_0x33bf59+'';}function y(_0x1e5798,_0xb901d9,_0x31e507){const _0x195f59=_0x20dd;return(_0xb901d9=v(_0xb901d9))in _0x1e5798?Object[_0x195f59(0x1d9)](_0x1e5798,_0xb901d9,{'value':_0x31e507,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1e5798[_0xb901d9]=_0x31e507,_0x1e5798;}function _0x20dd(_0x580e11,_0x3f6171){_0x580e11=_0x580e11-0x1b1;const _0x31169a=_0x3116();let _0x20ddf4=_0x31169a[_0x580e11];return _0x20ddf4;}var b=class extends _0x424828{constructor(){const _0x1aad8a=_0x20dd;super(),y(this,_0x1aad8a(0x1b9),new Map()),y(this,_0x1aad8a(0x1de),new Set()),y(this,'_groupIds',new Set());}[_0x28a5ea(0x1fd)](_0x20ef64,_0x44503c,_0x22dd2b){const _0x2c3894=_0x28a5ea;let _0x4e2d24=new _0x2026dc(_0x20ef64,_0x44503c,_0x22dd2b);return this['_shapes']['set'](_0x44503c,_0x4e2d24),_0x116024(_0x20ef64)&&this[_0x2c3894(0x1de)][_0x2c3894(0x1f4)](_0x44503c),_0x4e2d24;}['getBasicShapeRelation'](_0x1ee517){const _0x2cd14d=_0x28a5ea;let _0x438271=[];for(let _0x2b2029 of this[_0x2cd14d(0x1de)]){let _0xc4e157=this[_0x2cd14d(0x1b9)][_0x2cd14d(0x1bd)](_0x2b2029);if(_0xc4e157){let _0xcd6ec0=_0xc4e157[_0x2cd14d(0x1e3)]();if(_0xcd6ec0){var _0x307a3b,_0x47c400;((_0x307a3b=_0xcd6ec0['from'])==null?void 0x0:_0x307a3b['shapeId'])===_0x1ee517&&_0x438271['push']({..._0xcd6ec0['from'],'lineShapeId':_0x2b2029,'isFrom':!0x0}),((_0x47c400=_0xcd6ec0['to'])==null?void 0x0:_0x47c400['shapeId'])===_0x1ee517&&_0x438271['push']({..._0xcd6ec0['to'],'lineShapeId':_0x2b2029,'isFrom':!0x1});}}}return _0x438271;}[_0x28a5ea(0x1cb)](_0x56ab54){const _0x49d5ce=_0x28a5ea;let _0x2dd07b=this[_0x49d5ce(0x1b9)][_0x49d5ce(0x1bd)](_0x56ab54);if(_0x2dd07b)return _0x2dd07b[_0x49d5ce(0x1e3)]();}[_0x28a5ea(0x1e0)](_0x3cb3ca){const _0x34c89a=_0x28a5ea;let _0x377e58=this[_0x34c89a(0x1b9)][_0x34c89a(0x1bd)](_0x3cb3ca);if(_0x377e58)return _0x377e58['getShapeType']();}[_0x28a5ea(0x1bb)](_0x5b11bb){const _0x596625=_0x28a5ea;return this[_0x596625(0x1b9)][_0x596625(0x1c2)](_0x5b11bb);}[_0x28a5ea(0x1cc)](_0x5eeedf){const _0x5c30a0=_0x28a5ea;let _0x97c29d=this[_0x5c30a0(0x1b9)][_0x5c30a0(0x1bd)](_0x5eeedf);_0x97c29d&&(_0x116024(_0x97c29d[_0x5c30a0(0x1e0)]())&&this['_linesIds'][_0x5c30a0(0x1f2)](_0x5eeedf),this['_shapes'][_0x5c30a0(0x1f2)](_0x5eeedf));}['toJSON'](){const _0x567ca9=_0x28a5ea;let _0x6f98ba=[];return this[_0x567ca9(0x1b9)][_0x567ca9(0x1d5)](_0x40874e=>{const _0xc3c342=_0x567ca9;_0x6f98ba[_0xc3c342(0x1bf)](_0x40874e['toJSON']());}),_0x6f98ba;}[_0x28a5ea(0x1b1)](_0x5d3afb){const _0x26dbc6=_0x28a5ea;for(let _0x5b6e41 of _0x5d3afb){let {id:_0x43e3eb,shapeType:_0x210187}=_0x5b6e41,_0x24c139=this[_0x26dbc6(0x1fd)](_0x210187,_0x43e3eb,_0x5b6e41[_0x26dbc6(0x1d2)]);_0x24c139&&_0x24c139[_0x26dbc6(0x1b7)]()&&this[_0x26dbc6(0x1de)]['add'](_0x43e3eb);}}[_0x28a5ea(0x1db)](){const _0x1bf90f=_0x28a5ea;this[_0x1bf90f(0x1d8)]||(this[_0x1bf90f(0x1b9)][_0x1bf90f(0x1d5)](_0x4d5eb2=>{const _0x1bb418=_0x1bf90f;_0x4d5eb2[_0x1bb418(0x1db)]();}),this[_0x1bf90f(0x1b9)][_0x1bf90f(0x1e5)](),this[_0x1bf90f(0x1de)]['clear'](),this[_0x1bf90f(0x1d4)][_0x1bf90f(0x1e5)](),super[_0x1bf90f(0x1db)]());}};function x(_0x59e91d,_0x4520d3){return function(_0x1dbaf4,_0x1800b1){_0x4520d3(_0x1dbaf4,_0x1800b1,_0x59e91d);};}function S(_0x48fdef,_0x248653,_0xf402ae,_0x2ab4d2){const _0x40b5d8=_0x28a5ea;var _0x588f46=arguments[_0x40b5d8(0x1ba)],_0x31d865=_0x588f46<0x3?_0x248653:_0x2ab4d2===null?_0x2ab4d2=Object['getOwnPropertyDescriptor'](_0x248653,_0xf402ae):_0x2ab4d2,_0xb6582b;if(typeof Reflect=='object'&&typeof Reflect[_0x40b5d8(0x1ea)]==_0x40b5d8(0x1da))_0x31d865=Reflect[_0x40b5d8(0x1ea)](_0x48fdef,_0x248653,_0xf402ae,_0x2ab4d2);else{for(var _0x14bfb2=_0x48fdef[_0x40b5d8(0x1ba)]-0x1;_0x14bfb2>=0x0;_0x14bfb2--)(_0xb6582b=_0x48fdef[_0x14bfb2])&&(_0x31d865=(_0x588f46<0x3?_0xb6582b(_0x31d865):_0x588f46>0x3?_0xb6582b(_0x248653,_0xf402ae,_0x31d865):_0xb6582b(_0x248653,_0xf402ae))||_0x31d865);}return _0x588f46>0x3&&_0x31d865&&Object[_0x40b5d8(0x1d9)](_0x248653,_0xf402ae,_0x31d865),_0x31d865;}let C=class extends _0x424828{constructor(_0x273f9f){const _0x6245ff=_0x28a5ea;super(),this['_resourcesManagerService']=_0x273f9f,y(this,_0x6245ff(0x1d1),new Map()),this[_0x6245ff(0x1fc)]();}[_0x28a5ea(0x1dd)](_0x176bbd,_0x3b35b9){const _0x22207b=_0x28a5ea;let _0x2e1cad=this[_0x22207b(0x1d1)][_0x22207b(0x1bd)](_0x176bbd);_0x2e1cad||(_0x2e1cad=new Map(),this['_shapeModelManagerMap'][_0x22207b(0x1d6)](_0x176bbd,_0x2e1cad));let _0x8808bd=_0x2e1cad[_0x22207b(0x1bd)](_0x3b35b9);return _0x8808bd||(_0x8808bd=new b(),_0x2e1cad[_0x22207b(0x1d6)](_0x3b35b9,_0x8808bd)),_0x8808bd;}[_0x28a5ea(0x1c5)](_0x4e9a6e,_0x178b9c,_0x159dae,_0x343af3,_0x30afb4){const _0x47b4d9=_0x28a5ea;this[_0x47b4d9(0x1dd)](_0x4e9a6e,_0x178b9c)[_0x47b4d9(0x1fd)](_0x159dae,_0x343af3,_0x30afb4);}[_0x28a5ea(0x1cc)](_0x51a9aa,_0x503d6,_0x376840){const _0x191891=_0x28a5ea;this[_0x191891(0x1dd)](_0x51a9aa,_0x503d6)[_0x191891(0x1cc)](_0x376840);}['getBasicShapeType'](_0x43c98d,_0x352f80,_0x287558){const _0x2d6e6e=_0x28a5ea;return this[_0x2d6e6e(0x1dd)](_0x43c98d,_0x352f80)[_0x2d6e6e(0x1e0)](_0x287558);}[_0x28a5ea(0x1e0)](_0x417f6d,_0x4107f4,_0x1f6434){const _0x37c92b=_0x28a5ea;return this['_ensureShapeModelManager'](_0x417f6d,_0x4107f4)[_0x37c92b(0x1e0)](_0x1f6434);}['hasShape'](_0x2c247e,_0x561c9f,_0x27eb60){const _0x4921b6=_0x28a5ea;return this[_0x4921b6(0x1dd)](_0x2c247e,_0x561c9f)[_0x4921b6(0x1bb)](_0x27eb60);}[_0x28a5ea(0x1d3)](_0x5dbeea,_0x41e37f,_0x55122e){const _0x267b43=_0x28a5ea;return this[_0x267b43(0x1dd)](_0x5dbeea,_0x41e37f)['getShapeType'](_0x55122e);}[_0x28a5ea(0x1c9)](_0x5ec6b9,_0x291311,_0x5c4a0d){const _0xc1b4d9=_0x28a5ea;let _0x5d37f9=this[_0xc1b4d9(0x1dd)](_0x5ec6b9,_0x291311);if(!_0x5d37f9[_0xc1b4d9(0x1e0)](_0x5c4a0d))return;let _0x4563d7=_0x5d37f9[_0xc1b4d9(0x1b9)][_0xc1b4d9(0x1bd)](_0x5c4a0d);if(_0x4563d7)return _0x4563d7['getShapeData']();}[_0x28a5ea(0x1d0)](_0x1b4ed0,_0x320ff5,_0x2de6d7){const _0x543d05=_0x28a5ea;return this[_0x543d05(0x1dd)](_0x1b4ed0,_0x320ff5)[_0x543d05(0x1b9)][_0x543d05(0x1bd)](_0x2de6d7);}['getBasicShapeRelation'](_0x4c7455,_0x1c10b3,_0x62a082){const _0x7de41d=_0x28a5ea;return this['_ensureShapeModelManager'](_0x4c7455,_0x1c10b3)[_0x7de41d(0x1f0)](_0x62a082);}['getLineShapeRelation'](_0x2c662d,_0x263375,_0x527124){const _0x495047=_0x28a5ea;let _0x1e30df=this[_0x495047(0x1dd)](_0x2c662d,_0x263375)[_0x495047(0x1b9)][_0x495047(0x1bd)](_0x527124);if(_0x1e30df)return _0x1e30df[_0x495047(0x1e3)]();}[_0x28a5ea(0x1cf)](){}['_serializeShapeForUnit'](_0x200f9b){const _0x7084b6=_0x28a5ea;let _0x28e5ef={},_0x1dadfc=this[_0x7084b6(0x1d1)]['get'](_0x200f9b);return _0x1dadfc&&_0x1dadfc[_0x7084b6(0x1d5)]((_0x1eeb08,_0x7115b1)=>{const _0x1c57eb=_0x7084b6;let _0x448358=_0x1eeb08[_0x1c57eb(0x1ed)]();_0x448358['length']>0x0&&(_0x28e5ef[_0x7115b1]=_0x448358);}),JSON[_0x7084b6(0x1cd)](_0x28e5ef);}[_0x28a5ea(0x1b8)](_0x45549f,_0x254ff3){const _0x308f18=_0x28a5ea;Object[_0x308f18(0x1f3)](_0x254ff3)['forEach'](_0x4bb4fc=>{const _0x45397d=_0x308f18;this[_0x45397d(0x1dd)](_0x45549f,_0x4bb4fc)[_0x45397d(0x1b1)](_0x254ff3[_0x4bb4fc]);});}['toJSON'](){const _0x814c69=_0x28a5ea;let _0x5b41df={};return this[_0x814c69(0x1d1)]['forEach']((_0x3a0a0d,_0x3301fb)=>{const _0x17d8dd=_0x814c69;_0x5b41df[_0x3301fb]={},_0x3a0a0d[_0x17d8dd(0x1d5)]((_0x2a2cf9,_0x5e3da8)=>{const _0x3170f4=_0x17d8dd;_0x5b41df[_0x3301fb][_0x5e3da8]=_0x2a2cf9[_0x3170f4(0x1ed)]();});}),_0x5b41df;}[_0x28a5ea(0x1b1)](_0x2951d6){const _0x4dc8d2=_0x28a5ea;Object[_0x4dc8d2(0x1f3)](_0x2951d6)['forEach'](_0x469c3c=>{const _0x5ad3f7=_0x4dc8d2;let _0x314fea=_0x2951d6[_0x469c3c];Object[_0x5ad3f7(0x1f3)](_0x314fea)[_0x5ad3f7(0x1d5)](_0x3d2159=>{const _0x15a3e9=_0x5ad3f7;this[_0x15a3e9(0x1dd)](_0x469c3c,_0x3d2159)[_0x15a3e9(0x1b1)](_0x314fea[_0x3d2159]);});});}['_initSnapshot'](){const _0x18b873=_0x28a5ea;this[_0x18b873(0x1f8)]['registerPluginResource']({'pluginName':_0x18b873(0x1f7),'businesses':[_0x53089c[_0x18b873(0x1b6)]],'toJson':_0x1e95ba=>this['_serializeShapeForUnit'](_0x1e95ba),'parseJson':_0x1b76ba=>JSON['parse'](_0x1b76ba),'onLoad':(_0x55cbff,_0x492a84)=>{const _0x1e2a7a=_0x18b873;this[_0x1e2a7a(0x1b8)](_0x55cbff,_0x492a84);},'onUnLoad':_0x593039=>{const _0x188a2d=_0x18b873;let _0x37f71f=this['_shapeModelManagerMap'][_0x188a2d(0x1bd)](_0x593039);_0x37f71f&&(_0x37f71f[_0x188a2d(0x1d5)](_0x436ca0=>{const _0x1e06f3=_0x188a2d;_0x436ca0[_0x1e06f3(0x1db)]();}),this[_0x188a2d(0x1d1)]['delete'](_0x593039));}});}[_0x28a5ea(0x1db)](){const _0x5009df=_0x28a5ea;this[_0x5009df(0x1d1)][_0x5009df(0x1d5)](_0x42e3e2=>{const _0x522439=_0x5009df;_0x42e3e2[_0x522439(0x1d5)](_0x2e9ae5=>{const _0xb4cd1=_0x522439;_0x2e9ae5[_0xb4cd1(0x1db)]();});});}};C=S([x(0x0,_0x56a625)],C);const w={'id':_0x28a5ea(0x1e9),'type':_0xb1831c[_0x28a5ea(0x1ca)],'handler':(_0x280c48,_0x447d53)=>{const _0x218ecb=_0x28a5ea;let {unitId:_0x497dbc,subUnitId:_0x380c47,shapeType:_0x50da28,shapeId:_0x3771ff,shapeData:_0x526e9d}=_0x447d53,_0x354f5b=_0x280c48['get'](C)[_0x218ecb(0x1d0)](_0x497dbc,_0x380c47,_0x3771ff);return _0x354f5b&&(_0x354f5b[_0x218ecb(0x1cf)](_0x50da28),_0x526e9d&&(_0x354f5b==null||_0x354f5b[_0x218ecb(0x1e7)](_0x526e9d))),!0x0;}},T={'id':'sheet.command.update-shape-type','type':_0xb1831c[_0x28a5ea(0x1bc)],'handler':(_0x2c75af,_0x18d291)=>{const _0x4bd9c2=_0x28a5ea;if(!_0x18d291)return!0x1;let _0x559e39=_0x2c75af[_0x4bd9c2(0x1bd)](_0x259c9e),_0x4ea816=_0x2c75af[_0x4bd9c2(0x1bd)](C),_0xe1069a=_0x2c75af[_0x4bd9c2(0x1bd)](_0x266e9b),_0x20ec44=[],_0x14fb49=[],{unitId:_0x148fa0,subUnitId:_0x12064e,shapeId:_0xfaa4e0,shapeType:_0x23618a,shapeData:_0x1674b2}=_0x18d291,_0x2543e3=_0x4ea816['getShapeModel'](_0x148fa0,_0x12064e,_0xfaa4e0);if(_0x2543e3){let _0x2696bc=_0x2543e3[_0x4bd9c2(0x1e0)](),_0x513a3a=Object[_0x4bd9c2(0x1e6)]({},_0x2543e3[_0x4bd9c2(0x1c8)]()),_0x352980={'unitId':_0x148fa0,'subUnitId':_0x12064e,'shapeId':_0xfaa4e0,'shapeType':_0x23618a,'shapeData':_0x1674b2},_0x54e471={'unitId':_0x148fa0,'subUnitId':_0x12064e,'shapeId':_0xfaa4e0,'shapeType':_0x2696bc,'shapeData':_0x513a3a};return _0x20ec44[_0x4bd9c2(0x1bf)]({'id':w['id'],'params':_0x352980}),_0x14fb49['push']({'id':w['id'],'params':_0x54e471}),_0x20ec44[_0x4bd9c2(0x1c3)](_0x3475ca=>_0x559e39['syncExecuteCommand'](_0x3475ca['id'],_0x3475ca['params']))&&_0xe1069a['pushUndoRedo']({'unitID':_0x148fa0,'redoMutations':[..._0x20ec44],'undoMutations':[..._0x14fb49]}),!0x0;}return!0x1;}},E={'id':_0x28a5ea(0x1e1),'type':_0xb1831c[_0x28a5ea(0x1ca)],'handler':(_0x44a535,_0x5635eb)=>{const _0x609b50=_0x28a5ea;let {unitId:_0x421db1,subUnitId:_0x35b1ec,shapeType:_0x114314,shapeId:_0x35a2fa,shapeData:_0x1bff87}=_0x5635eb;return _0x44a535[_0x609b50(0x1bd)](C)[_0x609b50(0x1c5)](_0x421db1,_0x35b1ec,_0x114314,_0x35a2fa,_0x1bff87),!0x0;}},D={'id':'sheet.mutation.remove-shape','type':_0xb1831c[_0x28a5ea(0x1ca)],'handler':(_0x2d53af,_0x921922)=>{const _0x454765=_0x28a5ea;let {unitId:_0x248175,subUnitId:_0x1fbe1b,shapeId:_0x351c98}=_0x921922;return _0x2d53af[_0x454765(0x1bd)](C)[_0x454765(0x1cc)](_0x248175,_0x1fbe1b,_0x351c98),!0x0;}},O={'id':'sheet.mutation.update-shape-data','type':_0xb1831c[_0x28a5ea(0x1ca)],'handler':(_0x5d144a,_0x132d7b)=>{const _0x111b9d=_0x28a5ea;let {unitId:_0x2a2123,subUnitId:_0x554464,shapeType:_0x17511a,shapeId:_0x442021,shapeData:_0x1e8e0b}=_0x132d7b,_0x1c5416=_0x5d144a[_0x111b9d(0x1bd)](C)[_0x111b9d(0x1d0)](_0x2a2123,_0x554464,_0x442021);return _0x1c5416&&(_0x17511a!==void 0x0&&_0x1c5416[_0x111b9d(0x1cf)](_0x17511a),_0x1e8e0b&&(_0x1c5416==null||_0x1c5416['setShapeData'](_0x1e8e0b,!0x0))),!0x0;}};var k=_0x28a5ea(0x1ce),A=_0x28a5ea(0x1f9);const j=_0x28a5ea(0x1c6);Symbol(j);const M={};let N=class extends _0x3ec36c{constructor(_0x2d7382=M,_0x10d89,_0x993fc7,_0x311236){const _0x420853=_0x28a5ea;super(),this[_0x420853(0x1d7)]=_0x2d7382,this[_0x420853(0x1f6)]=_0x10d89,this[_0x420853(0x1fa)]=_0x993fc7,this[_0x420853(0x1ec)]=_0x311236;let {..._0x1f9126}=_0x1258f7({},M,this['_config']);this[_0x420853(0x1ec)]['setConfig'](j,_0x1f9126),this['_initCommands']();}['onRendered'](){_0x28b92a(this['_injector'],[]);}[_0x28a5ea(0x1be)](){const _0x13e93f=_0x28a5ea;let _0x5c89b4=this[_0x13e93f(0x1f6)];[[b],[C]][_0x13e93f(0x1d5)](_0x108215=>_0x5c89b4[_0x13e93f(0x1f4)](_0x108215));}[_0x28a5ea(0x1b2)](){const _0x1c7eb3=_0x28a5ea;[E,D,w,O]['forEach'](_0x43ddab=>this[_0x1c7eb3(0x1fb)](this['_commandService'][_0x1c7eb3(0x1e4)](_0x43ddab)));}};y(N,'type',_0x53089c[_0x28a5ea(0x1b6)]),y(N,_0x28a5ea(0x1b5),'SHEET_SHAPE_PLUGIN'),y(N,_0x28a5ea(0x1df),k),y(N,'version',A),N=S([_0x127158(_0xed911a),x(0x1,_0x55920c(_0x3e7a80)),x(0x2,_0x259c9e),x(0x3,_0x51281f)],N);export{E as InsertSheetsShapeMutation,D as RemoveSheetsShapeMutation,C as SheetsShapeService,N as UniverSheetsShapePlugin,O as UpdateSheetsShapeDataMutation,T as UpdateSheetsShapeTypeCommand,w as UpdateSheetsShapeTypeMutation};
|
|
1
|
+
const _0x4c845f=_0x2c82;(function(_0x2eb0dd,_0x1252f7){const _0x550649=_0x2c82,_0x5e8956=_0x2eb0dd();while(!![]){try{const _0x232cd9=parseInt(_0x550649(0x1fe))/0x1*(parseInt(_0x550649(0x1ff))/0x2)+parseInt(_0x550649(0x1d0))/0x3*(-parseInt(_0x550649(0x208))/0x4)+parseInt(_0x550649(0x202))/0x5*(-parseInt(_0x550649(0x1eb))/0x6)+-parseInt(_0x550649(0x1f6))/0x7+-parseInt(_0x550649(0x1e3))/0x8*(-parseInt(_0x550649(0x1fc))/0x9)+parseInt(_0x550649(0x218))/0xa+-parseInt(_0x550649(0x1f0))/0xb*(-parseInt(_0x550649(0x1fb))/0xc);if(_0x232cd9===_0x1252f7)break;else _0x5e8956['push'](_0x5e8956['shift']());}catch(_0x3cb0cd){_0x5e8956['push'](_0x5e8956['shift']());}}}(_0x46f1,0xa2a81));import{CommandType as _0x564fb6,DependentOn as _0x4c3550,Disposable as _0x24c3c3,ICommandService as _0x23a80e,IConfigService as _0x344690,IResourceManagerService as _0x47ef38,IUndoRedoService as _0x340978,Inject as _0x299397,Injector as _0x441a1a,Plugin as _0xf3b44b,UniverInstanceType as _0x9e6c36,merge as _0x42bbf3,touchDependencies as _0x1601a1}from'@univerjs/core';import{ShapeModel as _0x244526,isConnectorShape as _0x41f54d}from'@univerjs-pro/engine-shape';import{UniverLicensePlugin as _0x59912c}from'@univerjs-pro/license';function _0x2c82(_0x19c3ba,_0x4a7bad){_0x19c3ba=_0x19c3ba-0x1d0;const _0x46f1a2=_0x46f1();let _0x2c82be=_0x46f1a2[_0x19c3ba];return _0x2c82be;}function g(_0x215fe4){'@babel/helpers - typeof';const _0x34c62e=_0x2c82;return g=typeof Symbol==_0x34c62e(0x1da)&&typeof Symbol['iterator']==_0x34c62e(0x1d2)?function(_0x1f116d){return typeof _0x1f116d;}:function(_0x249510){const _0x2b6d34=_0x34c62e;return _0x249510&&typeof Symbol==_0x2b6d34(0x1da)&&_0x249510[_0x2b6d34(0x205)]===Symbol&&_0x249510!==Symbol[_0x2b6d34(0x20f)]?_0x2b6d34(0x1d2):typeof _0x249510;},g(_0x215fe4);}function _0x46f1(){const _0x204050=['parse','947548gJblkg','sheet.mutation.update-shape-type','version','getBasicShapeType','shapeData','1476EHwteo','9eINiba','setShapeType','4reqmif','5912YheLEz','getShapeData','MUTATION','15OBAOmQ','_linesIds','addShape','constructor','_initSnapshot','get','4334828bllqxk','toPrimitive','insertShape','onRendered','set','removeShape','COMMAND','prototype','from','_deserializeShapeForUnit','SHEET_SHAPE_PLUGIN','dispose','setConfig','pushUndoRedo','type','sheet.mutation.remove-shape','21040BJwiVP','_shapes','sheet.mutation.update-shape-data','add','toJSON','0.19.0','UNIVER_SHEET','_ensureShapeModelManager','_groupIds','_disposed','getShapeTypeById','keys','clear','string','3yqUsjH','delete','symbol','getShapeModel','has','_configService','length','fromJSON','registerCommand','every','function','push','hasShape','stringify','registerPluginResource','params','getBasicShapeRelation','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','default','4182616YeMGKN','getShapeDataById','shapeId','getLineShapeRelation','forEach','sheets-shape.config','_config','object','1752042mkdUVR','sheet.command.update-shape-type','_initCommands','getOwnPropertyDescriptor','isLineShape','198946qlGrvF','getShapeType','_serializeShapeForUnit','decorate','_shapeModelManagerMap'];_0x46f1=function(){return _0x204050;};return _0x46f1();}function _(_0x4b42c1,_0x161b0d){const _0x5c39cf=_0x2c82;if(g(_0x4b42c1)!=_0x5c39cf(0x1ea)||!_0x4b42c1)return _0x4b42c1;var _0x30bfe8=_0x4b42c1[Symbol[_0x5c39cf(0x209)]];if(_0x30bfe8!==void 0x0){var _0x3f4d84=_0x30bfe8['call'](_0x4b42c1,_0x161b0d||_0x5c39cf(0x1e2));if(g(_0x3f4d84)!=_0x5c39cf(0x1ea))return _0x3f4d84;throw TypeError(_0x5c39cf(0x1e1));}return(_0x161b0d===_0x5c39cf(0x225)?String:Number)(_0x4b42c1);}function v(_0x4d8895){const _0x1fcfef=_0x2c82;var _0x5d939d=_(_0x4d8895,_0x1fcfef(0x225));return g(_0x5d939d)=='symbol'?_0x5d939d:_0x5d939d+'';}function y(_0x38045d,_0x2d6640,_0x247597){return(_0x2d6640=v(_0x2d6640))in _0x38045d?Object['defineProperty'](_0x38045d,_0x2d6640,{'value':_0x247597,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x38045d[_0x2d6640]=_0x247597,_0x38045d;}var b=class extends _0x24c3c3{constructor(){const _0x464829=_0x2c82;super(),y(this,_0x464829(0x219),new Map()),y(this,_0x464829(0x203),new Set()),y(this,_0x464829(0x220),new Set());}[_0x4c845f(0x204)](_0x17e1c5,_0xcf0d7e,_0x5d3356){const _0x5e4bad=_0x4c845f;let _0x14ef2a=new _0x244526(_0x17e1c5,_0xcf0d7e,_0x5d3356);return this[_0x5e4bad(0x219)][_0x5e4bad(0x20c)](_0xcf0d7e,_0x14ef2a),_0x41f54d(_0x17e1c5)&&this[_0x5e4bad(0x203)]['add'](_0xcf0d7e),_0x14ef2a;}[_0x4c845f(0x1e0)](_0x466171){const _0x199248=_0x4c845f;let _0x30a2b0=[];for(let _0x3c6af1 of this[_0x199248(0x203)]){let _0x4186af=this['_shapes'][_0x199248(0x207)](_0x3c6af1);if(_0x4186af){let _0xbfed16=_0x4186af['getShapeRelation']();if(_0xbfed16){var _0x1e92df,_0x4f5b63;((_0x1e92df=_0xbfed16[_0x199248(0x210)])==null?void 0x0:_0x1e92df[_0x199248(0x1e5)])===_0x466171&&_0x30a2b0[_0x199248(0x1db)]({..._0xbfed16['from'],'lineShapeId':_0x3c6af1,'isFrom':!0x0}),((_0x4f5b63=_0xbfed16['to'])==null?void 0x0:_0x4f5b63[_0x199248(0x1e5)])===_0x466171&&_0x30a2b0[_0x199248(0x1db)]({..._0xbfed16['to'],'lineShapeId':_0x3c6af1,'isFrom':!0x1});}}}return _0x30a2b0;}[_0x4c845f(0x1e6)](_0x1db441){const _0x562063=_0x4c845f;let _0x2cc54b=this[_0x562063(0x219)][_0x562063(0x207)](_0x1db441);if(_0x2cc54b)return _0x2cc54b['getShapeRelation']();}['getShapeType'](_0x52c98e){const _0x55d71b=_0x4c845f;let _0x4fed67=this[_0x55d71b(0x219)]['get'](_0x52c98e);if(_0x4fed67)return _0x4fed67[_0x55d71b(0x1f1)]();}[_0x4c845f(0x1dc)](_0x238ce5){const _0x27610d=_0x4c845f;return this['_shapes'][_0x27610d(0x1d4)](_0x238ce5);}['removeShape'](_0x43708e){const _0x2ad3d8=_0x4c845f;let _0x567c9c=this['_shapes'][_0x2ad3d8(0x207)](_0x43708e);_0x567c9c&&(_0x41f54d(_0x567c9c[_0x2ad3d8(0x1f1)]())&&this['_linesIds'][_0x2ad3d8(0x1d1)](_0x43708e),this['_shapes']['delete'](_0x43708e));}[_0x4c845f(0x21c)](){const _0x37bdb2=_0x4c845f;let _0x527913=[];return this[_0x37bdb2(0x219)]['forEach'](_0x2b14dc=>{const _0x4e63b4=_0x37bdb2;_0x527913[_0x4e63b4(0x1db)](_0x2b14dc[_0x4e63b4(0x21c)]());}),_0x527913;}[_0x4c845f(0x1d7)](_0x3092e5){const _0x5c64fd=_0x4c845f;for(let _0x3301c3 of _0x3092e5){let {id:_0x47bda6,shapeType:_0x30d750}=_0x3301c3,_0x1ab81e=this['addShape'](_0x30d750,_0x47bda6,_0x3301c3[_0x5c64fd(0x1fa)]);_0x1ab81e&&_0x1ab81e[_0x5c64fd(0x1ef)]()&&this['_linesIds'][_0x5c64fd(0x21b)](_0x47bda6);}}[_0x4c845f(0x213)](){const _0x4ee1c3=_0x4c845f;this[_0x4ee1c3(0x221)]||(this[_0x4ee1c3(0x219)][_0x4ee1c3(0x1e7)](_0x2e3414=>{_0x2e3414['dispose']();}),this[_0x4ee1c3(0x219)][_0x4ee1c3(0x224)](),this[_0x4ee1c3(0x203)][_0x4ee1c3(0x224)](),this['_groupIds'][_0x4ee1c3(0x224)](),super[_0x4ee1c3(0x213)]());}};function x(_0x19f025,_0x270324){return function(_0x3b36cb,_0x5b7f1c){_0x270324(_0x3b36cb,_0x5b7f1c,_0x19f025);};}function S(_0x4b128a,_0x3edbf7,_0x342e4c,_0x56bca){const _0x3d526c=_0x4c845f;var _0x1d7924=arguments[_0x3d526c(0x1d6)],_0x5bac77=_0x1d7924<0x3?_0x3edbf7:_0x56bca===null?_0x56bca=Object[_0x3d526c(0x1ee)](_0x3edbf7,_0x342e4c):_0x56bca,_0xe76073;if(typeof Reflect==_0x3d526c(0x1ea)&&typeof Reflect[_0x3d526c(0x1f3)]==_0x3d526c(0x1da))_0x5bac77=Reflect['decorate'](_0x4b128a,_0x3edbf7,_0x342e4c,_0x56bca);else{for(var _0x27f517=_0x4b128a['length']-0x1;_0x27f517>=0x0;_0x27f517--)(_0xe76073=_0x4b128a[_0x27f517])&&(_0x5bac77=(_0x1d7924<0x3?_0xe76073(_0x5bac77):_0x1d7924>0x3?_0xe76073(_0x3edbf7,_0x342e4c,_0x5bac77):_0xe76073(_0x3edbf7,_0x342e4c))||_0x5bac77);}return _0x1d7924>0x3&&_0x5bac77&&Object['defineProperty'](_0x3edbf7,_0x342e4c,_0x5bac77),_0x5bac77;}let C=class extends _0x24c3c3{constructor(_0x420774){const _0x23a4bc=_0x4c845f;super(),this['_resourcesManagerService']=_0x420774,y(this,_0x23a4bc(0x1f4),new Map()),this[_0x23a4bc(0x206)]();}[_0x4c845f(0x21f)](_0x4592ab,_0x49206c){const _0x553236=_0x4c845f;let _0x1a1ab8=this[_0x553236(0x1f4)][_0x553236(0x207)](_0x4592ab);_0x1a1ab8||(_0x1a1ab8=new Map(),this[_0x553236(0x1f4)][_0x553236(0x20c)](_0x4592ab,_0x1a1ab8));let _0x16ca84=_0x1a1ab8[_0x553236(0x207)](_0x49206c);return _0x16ca84||(_0x16ca84=new b(),_0x1a1ab8['set'](_0x49206c,_0x16ca84)),_0x16ca84;}[_0x4c845f(0x20a)](_0x56950e,_0x4015d2,_0x435642,_0x3720ef,_0x3bfe8b){const _0x5659e8=_0x4c845f;this[_0x5659e8(0x21f)](_0x56950e,_0x4015d2)['addShape'](_0x435642,_0x3720ef,_0x3bfe8b);}['removeShape'](_0x1c60b0,_0x37985c,_0x500fcc){const _0x37627d=_0x4c845f;this['_ensureShapeModelManager'](_0x1c60b0,_0x37985c)[_0x37627d(0x20d)](_0x500fcc);}[_0x4c845f(0x1f9)](_0x5933e6,_0x3c1428,_0x4c93f5){const _0x4d6bcd=_0x4c845f;return this[_0x4d6bcd(0x21f)](_0x5933e6,_0x3c1428)[_0x4d6bcd(0x1f1)](_0x4c93f5);}[_0x4c845f(0x1f1)](_0x3e68f7,_0x9ef5b4,_0x543d9e){const _0x1d90c2=_0x4c845f;return this[_0x1d90c2(0x21f)](_0x3e68f7,_0x9ef5b4)[_0x1d90c2(0x1f1)](_0x543d9e);}[_0x4c845f(0x1dc)](_0x35cf4c,_0x5a1672,_0x4022fd){const _0x106604=_0x4c845f;return this['_ensureShapeModelManager'](_0x35cf4c,_0x5a1672)[_0x106604(0x1dc)](_0x4022fd);}[_0x4c845f(0x222)](_0x144ac6,_0xd70bb8,_0x5510f){const _0x1c1321=_0x4c845f;return this['_ensureShapeModelManager'](_0x144ac6,_0xd70bb8)[_0x1c1321(0x1f1)](_0x5510f);}[_0x4c845f(0x1e4)](_0x2c734e,_0x485056,_0x562cb8){const _0x4f3c9f=_0x4c845f;let _0x2dfe4f=this[_0x4f3c9f(0x21f)](_0x2c734e,_0x485056);if(!_0x2dfe4f[_0x4f3c9f(0x1f1)](_0x562cb8))return;let _0x427f73=_0x2dfe4f[_0x4f3c9f(0x219)][_0x4f3c9f(0x207)](_0x562cb8);if(_0x427f73)return _0x427f73['getShapeData']();}[_0x4c845f(0x1d3)](_0x372886,_0x362a21,_0x4b7f38){const _0xf67317=_0x4c845f;return this[_0xf67317(0x21f)](_0x372886,_0x362a21)[_0xf67317(0x219)][_0xf67317(0x207)](_0x4b7f38);}[_0x4c845f(0x1e0)](_0x37be24,_0x1c4422,_0x2226d7){const _0x345ddf=_0x4c845f;return this[_0x345ddf(0x21f)](_0x37be24,_0x1c4422)[_0x345ddf(0x1e0)](_0x2226d7);}[_0x4c845f(0x1e6)](_0x29bb7c,_0x266e5d,_0x437fa5){const _0x5cf384=_0x4c845f;let _0x1a55e8=this[_0x5cf384(0x21f)](_0x29bb7c,_0x266e5d)['_shapes']['get'](_0x437fa5);if(_0x1a55e8)return _0x1a55e8['getShapeRelation']();}['setShapeType'](){}[_0x4c845f(0x1f2)](_0x4600ca){const _0x34d20e=_0x4c845f;let _0x5959bb={},_0x416405=this['_shapeModelManagerMap'][_0x34d20e(0x207)](_0x4600ca);return _0x416405&&_0x416405['forEach']((_0x328d69,_0x493b48)=>{const _0x1236c0=_0x34d20e;let _0x2d1dab=_0x328d69[_0x1236c0(0x21c)]();_0x2d1dab[_0x1236c0(0x1d6)]>0x0&&(_0x5959bb[_0x493b48]=_0x2d1dab);}),JSON[_0x34d20e(0x1dd)](_0x5959bb);}[_0x4c845f(0x211)](_0x1620e7,_0x13f346){const _0x33e6b5=_0x4c845f;Object[_0x33e6b5(0x223)](_0x13f346)[_0x33e6b5(0x1e7)](_0x59cc16=>{const _0x51ae2b=_0x33e6b5;this[_0x51ae2b(0x21f)](_0x1620e7,_0x59cc16)[_0x51ae2b(0x1d7)](_0x13f346[_0x59cc16]);});}[_0x4c845f(0x21c)](){let _0x192e3c={};return this['_shapeModelManagerMap']['forEach']((_0x17cfc1,_0x6c8c31)=>{const _0x20997d=_0x2c82;_0x192e3c[_0x6c8c31]={},_0x17cfc1[_0x20997d(0x1e7)]((_0x3eed93,_0x3dd647)=>{const _0x55b924=_0x20997d;_0x192e3c[_0x6c8c31][_0x3dd647]=_0x3eed93[_0x55b924(0x21c)]();});}),_0x192e3c;}['fromJSON'](_0x2b9aa6){const _0x3cb7c8=_0x4c845f;Object[_0x3cb7c8(0x223)](_0x2b9aa6)[_0x3cb7c8(0x1e7)](_0xa77f3f=>{const _0x2cac5c=_0x3cb7c8;let _0x23e50b=_0x2b9aa6[_0xa77f3f];Object[_0x2cac5c(0x223)](_0x23e50b)[_0x2cac5c(0x1e7)](_0x41faa0=>{const _0x4c2166=_0x2cac5c;this[_0x4c2166(0x21f)](_0xa77f3f,_0x41faa0)[_0x4c2166(0x1d7)](_0x23e50b[_0x41faa0]);});});}[_0x4c845f(0x206)](){const _0xd42709=_0x4c845f;this['_resourcesManagerService'][_0xd42709(0x1de)]({'pluginName':_0xd42709(0x212),'businesses':[_0x9e6c36[_0xd42709(0x21e)]],'toJson':_0x27902b=>this[_0xd42709(0x1f2)](_0x27902b),'parseJson':_0x5b474d=>JSON[_0xd42709(0x1f5)](_0x5b474d),'onLoad':(_0x4afaa7,_0x2bcbb4)=>{this['_deserializeShapeForUnit'](_0x4afaa7,_0x2bcbb4);},'onUnLoad':_0x29d896=>{const _0x19cf53=_0xd42709;let _0x464d69=this[_0x19cf53(0x1f4)][_0x19cf53(0x207)](_0x29d896);_0x464d69&&(_0x464d69[_0x19cf53(0x1e7)](_0x23fdd1=>{const _0x5694ee=_0x19cf53;_0x23fdd1[_0x5694ee(0x213)]();}),this[_0x19cf53(0x1f4)]['delete'](_0x29d896));}});}[_0x4c845f(0x213)](){const _0x5ad7c5=_0x4c845f;this[_0x5ad7c5(0x1f4)][_0x5ad7c5(0x1e7)](_0x48ea70=>{const _0x353834=_0x5ad7c5;_0x48ea70[_0x353834(0x1e7)](_0x22184d=>{const _0x156a55=_0x353834;_0x22184d[_0x156a55(0x213)]();});});}};C=S([x(0x0,_0x47ef38)],C);const w={'id':_0x4c845f(0x1f7),'type':_0x564fb6['MUTATION'],'handler':(_0x19f627,_0x2fa4ae)=>{const _0xa67d4=_0x4c845f;let {unitId:_0x5c5b50,subUnitId:_0x1a4108,shapeType:_0x38be1b,shapeId:_0x310cab,shapeData:_0x1c480d}=_0x2fa4ae,_0x196697=_0x19f627[_0xa67d4(0x207)](C)['getShapeModel'](_0x5c5b50,_0x1a4108,_0x310cab);return _0x196697&&(_0x196697[_0xa67d4(0x1fd)](_0x38be1b),_0x1c480d&&(_0x196697==null||_0x196697['setShapeData'](_0x1c480d))),!0x0;}},T={'id':_0x4c845f(0x1ec),'type':_0x564fb6[_0x4c845f(0x20e)],'handler':(_0x235e8f,_0x7afcd)=>{const _0x586bd8=_0x4c845f;if(!_0x7afcd)return!0x1;let _0x51c5e8=_0x235e8f[_0x586bd8(0x207)](_0x23a80e),_0x362d77=_0x235e8f[_0x586bd8(0x207)](C),_0x26d965=_0x235e8f[_0x586bd8(0x207)](_0x340978),_0x3a92bd=[],_0x5a0f12=[],{unitId:_0x1a8743,subUnitId:_0x5b5be2,shapeId:_0x2d0413,shapeType:_0x2f1e2e,shapeData:_0x166f31}=_0x7afcd,_0x2a0bde=_0x362d77[_0x586bd8(0x1d3)](_0x1a8743,_0x5b5be2,_0x2d0413);if(_0x2a0bde){let _0x413e8a=_0x2a0bde[_0x586bd8(0x1f1)](),_0x2c27ff=Object['assign']({},_0x2a0bde[_0x586bd8(0x200)]()),_0x139f33={'unitId':_0x1a8743,'subUnitId':_0x5b5be2,'shapeId':_0x2d0413,'shapeType':_0x2f1e2e,'shapeData':_0x166f31},_0x185109={'unitId':_0x1a8743,'subUnitId':_0x5b5be2,'shapeId':_0x2d0413,'shapeType':_0x413e8a,'shapeData':_0x2c27ff};return _0x3a92bd[_0x586bd8(0x1db)]({'id':w['id'],'params':_0x139f33}),_0x5a0f12[_0x586bd8(0x1db)]({'id':w['id'],'params':_0x185109}),_0x3a92bd[_0x586bd8(0x1d9)](_0x56780e=>_0x51c5e8['syncExecuteCommand'](_0x56780e['id'],_0x56780e[_0x586bd8(0x1df)]))&&_0x26d965[_0x586bd8(0x215)]({'unitID':_0x1a8743,'redoMutations':[..._0x3a92bd],'undoMutations':[..._0x5a0f12]}),!0x0;}return!0x1;}},E={'id':'sheet.mutation.insert-shape','type':_0x564fb6['MUTATION'],'handler':(_0x5e925d,_0x29ddfc)=>{const _0x226043=_0x4c845f;let {unitId:_0x4a0ef1,subUnitId:_0x5012ec,shapeType:_0x539523,shapeId:_0x42f62c,shapeData:_0x4dbbab}=_0x29ddfc;return _0x5e925d[_0x226043(0x207)](C)[_0x226043(0x20a)](_0x4a0ef1,_0x5012ec,_0x539523,_0x42f62c,_0x4dbbab),!0x0;}},D={'id':_0x4c845f(0x217),'type':_0x564fb6[_0x4c845f(0x201)],'handler':(_0x2a3f4b,_0x430087)=>{const _0xc8cb31=_0x4c845f;let {unitId:_0x3b79a0,subUnitId:_0x590739,shapeId:_0x3fbe0c}=_0x430087;return _0x2a3f4b[_0xc8cb31(0x207)](C)[_0xc8cb31(0x20d)](_0x3b79a0,_0x590739,_0x3fbe0c),!0x0;}},O={'id':_0x4c845f(0x21a),'type':_0x564fb6[_0x4c845f(0x201)],'handler':(_0xa6522b,_0x5c7482)=>{const _0x40d8d2=_0x4c845f;let {unitId:_0x1c0b11,subUnitId:_0x3b5680,shapeType:_0x470993,shapeId:_0x18298d,shapeData:_0x13bc42}=_0x5c7482,_0xef88e4=_0xa6522b['get'](C)[_0x40d8d2(0x1d3)](_0x1c0b11,_0x3b5680,_0x18298d);return _0xef88e4&&(_0x470993!==void 0x0&&_0xef88e4[_0x40d8d2(0x1fd)](_0x470993),_0x13bc42&&(_0xef88e4==null||_0xef88e4['setShapeData'](_0x13bc42,!0x0))),!0x0;}};var k='@univerjs-pro/sheets-shape',A=_0x4c845f(0x21d);const j=_0x4c845f(0x1e8);Symbol(j);const M={};let N=class extends _0xf3b44b{constructor(_0x53bb60=M,_0x215e7a,_0x2b5d5f,_0x2125a9){const _0x452f52=_0x4c845f;super(),this[_0x452f52(0x1e9)]=_0x53bb60,this['_injector']=_0x215e7a,this['_commandService']=_0x2b5d5f,this[_0x452f52(0x1d5)]=_0x2125a9;let {..._0x360859}=_0x42bbf3({},M,this[_0x452f52(0x1e9)]);this[_0x452f52(0x1d5)][_0x452f52(0x214)](j,_0x360859),this[_0x452f52(0x1ed)]();}[_0x4c845f(0x20b)](){_0x1601a1(this['_injector'],[]);}['onStarting'](){const _0x401c32=_0x4c845f;let _0x21791e=this['_injector'];[[b],[C]][_0x401c32(0x1e7)](_0x1e4e95=>_0x21791e[_0x401c32(0x21b)](_0x1e4e95));}[_0x4c845f(0x1ed)](){const _0x493396=_0x4c845f;[E,D,w,O][_0x493396(0x1e7)](_0x39080c=>this['disposeWithMe'](this['_commandService'][_0x493396(0x1d8)](_0x39080c)));}};y(N,_0x4c845f(0x216),_0x9e6c36[_0x4c845f(0x21e)]),y(N,'pluginName','SHEET_SHAPE_PLUGIN'),y(N,'packageName',k),y(N,_0x4c845f(0x1f8),A),N=S([_0x4c3550(_0x59912c),x(0x1,_0x299397(_0x441a1a)),x(0x2,_0x23a80e),x(0x3,_0x344690)],N);export{E as InsertSheetsShapeMutation,D as RemoveSheetsShapeMutation,C as SheetsShapeService,N as UniverSheetsShapePlugin,O as UpdateSheetsShapeDataMutation,T as UpdateSheetsShapeTypeCommand,w as UpdateSheetsShapeTypeMutation};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x26a5b4,_0x258089){const _0x8ff58a=_0xdb8c,_0x16497b=_0x26a5b4();while(!![]){try{const _0x4393fb=-parseInt(_0x8ff58a(0x227))/0x1+parseInt(_0x8ff58a(0x216))/0x2*(-parseInt(_0x8ff58a(0x21d))/0x3)+parseInt(_0x8ff58a(0x1f6))/0x4*(parseInt(_0x8ff58a(0x233))/0x5)+parseInt(_0x8ff58a(0x234))/0x6*(-parseInt(_0x8ff58a(0x237))/0x7)+-parseInt(_0x8ff58a(0x1df))/0x8*(parseInt(_0x8ff58a(0x1f1))/0x9)+-parseInt(_0x8ff58a(0x1e8))/0xa+parseInt(_0x8ff58a(0x224))/0xb;if(_0x4393fb===_0x258089)break;else _0x16497b['push'](_0x16497b['shift']());}catch(_0xf4e3b0){_0x16497b['push'](_0x16497b['shift']());}}}(_0x3005,0xd58cf),function(_0x1cd844,_0x327a46){const _0x3e399b=_0xdb8c;typeof exports=='object'&&typeof module<'u'?_0x327a46(exports,require(`@univerjs/core`),require(`@univerjs-pro/engine-shape`),require(`@univerjs-pro/license`)):typeof define=='function'&&define[_0x3e399b(0x212)]?define(['exports',_0x3e399b(0x1f9),_0x3e399b(0x202),_0x3e399b(0x1e4)],_0x327a46):(_0x1cd844=typeof globalThis<'u'?globalThis:_0x1cd844||self,_0x327a46(_0x1cd844['UniverProSheetsShape']={},_0x1cd844[_0x3e399b(0x1ee)],_0x1cd844[_0x3e399b(0x1e5)],_0x1cd844[_0x3e399b(0x226)]));}(this,function(_0x13db26,_0x32983f,_0x164d60,_0x2c2932){const _0x3ce4fe=_0xdb8c;Object[_0x3ce4fe(0x21a)](_0x13db26,Symbol[_0x3ce4fe(0x1fb)],{'value':_0x3ce4fe(0x1d3)});function _0x2dc2e7(_0x3659ec){'@babel/helpers - typeof';const _0x307570=_0x3ce4fe;return _0x2dc2e7=typeof Symbol==_0x307570(0x22e)&&typeof Symbol[_0x307570(0x1d2)]=='symbol'?function(_0x3f19b3){return typeof _0x3f19b3;}:function(_0xf624fc){const _0x30689f=_0x307570;return _0xf624fc&&typeof Symbol==_0x30689f(0x22e)&&_0xf624fc[_0x30689f(0x1e9)]===Symbol&&_0xf624fc!==Symbol[_0x30689f(0x205)]?_0x30689f(0x1f8):typeof _0xf624fc;},_0x2dc2e7(_0x3659ec);}function _0x2f4faf(_0x20205f,_0x527497){const _0x360aa6=_0x3ce4fe;if(_0x2dc2e7(_0x20205f)!=_0x360aa6(0x1d9)||!_0x20205f)return _0x20205f;var _0x15a42b=_0x20205f[Symbol['toPrimitive']];if(_0x15a42b!==void 0x0){var _0x5d58e1=_0x15a42b[_0x360aa6(0x236)](_0x20205f,_0x527497||_0x360aa6(0x22d));if(_0x2dc2e7(_0x5d58e1)!='object')return _0x5d58e1;throw TypeError(_0x360aa6(0x1cf));}return(_0x527497===_0x360aa6(0x20b)?String:Number)(_0x20205f);}function _0x5a0799(_0x333c38){const _0x3f6d75=_0x3ce4fe;var _0x2068bf=_0x2f4faf(_0x333c38,'string');return _0x2dc2e7(_0x2068bf)==_0x3f6d75(0x1f8)?_0x2068bf:_0x2068bf+'';}function _0x2f075d(_0x2eef2d,_0x3450be,_0x284dc){const _0x5abfcc=_0x3ce4fe;return(_0x3450be=_0x5a0799(_0x3450be))in _0x2eef2d?Object[_0x5abfcc(0x21a)](_0x2eef2d,_0x3450be,{'value':_0x284dc,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x2eef2d[_0x3450be]=_0x284dc,_0x2eef2d;}var _0x13c0aa=class extends _0x32983f[_0x3ce4fe(0x219)]{constructor(){const _0x3ff769=_0x3ce4fe;super(),_0x2f075d(this,_0x3ff769(0x207),new Map()),_0x2f075d(this,_0x3ff769(0x1ef),new Set()),_0x2f075d(this,'_groupIds',new Set());}[_0x3ce4fe(0x1f7)](_0x18d232,_0x501cd6,_0x58b3fb){const _0x522154=_0x3ce4fe;let _0x2e109b=new _0x164d60[(_0x522154(0x21e))](_0x18d232,_0x501cd6,_0x58b3fb);return this[_0x522154(0x207)][_0x522154(0x222)](_0x501cd6,_0x2e109b),(0x0,_0x164d60[_0x522154(0x235)])(_0x18d232)&&this[_0x522154(0x1ef)]['add'](_0x501cd6),_0x2e109b;}['getBasicShapeRelation'](_0x1c5ad8){const _0x472153=_0x3ce4fe;let _0x4d27c5=[];for(let _0x3101b4 of this[_0x472153(0x1ef)]){let _0x2ef4d1=this['_shapes'][_0x472153(0x1ea)](_0x3101b4);if(_0x2ef4d1){let _0xe831a7=_0x2ef4d1[_0x472153(0x1f2)]();if(_0xe831a7){var _0x2f6b28,_0x3ed0ae;((_0x2f6b28=_0xe831a7[_0x472153(0x1fe)])==null?void 0x0:_0x2f6b28['shapeId'])===_0x1c5ad8&&_0x4d27c5['push']({..._0xe831a7[_0x472153(0x1fe)],'lineShapeId':_0x3101b4,'isFrom':!0x0}),((_0x3ed0ae=_0xe831a7['to'])==null?void 0x0:_0x3ed0ae['shapeId'])===_0x1c5ad8&&_0x4d27c5[_0x472153(0x23b)]({..._0xe831a7['to'],'lineShapeId':_0x3101b4,'isFrom':!0x1});}}}return _0x4d27c5;}[_0x3ce4fe(0x1da)](_0x110045){const _0x599a25=_0x3ce4fe;let _0x4b6993=this[_0x599a25(0x207)][_0x599a25(0x1ea)](_0x110045);if(_0x4b6993)return _0x4b6993[_0x599a25(0x1f2)]();}['getShapeType'](_0x4286f5){const _0x25e687=_0x3ce4fe;let _0x27f0ee=this[_0x25e687(0x207)][_0x25e687(0x1ea)](_0x4286f5);if(_0x27f0ee)return _0x27f0ee['getShapeType']();}[_0x3ce4fe(0x223)](_0x45628d){const _0x575004=_0x3ce4fe;return this[_0x575004(0x207)]['has'](_0x45628d);}[_0x3ce4fe(0x1d1)](_0x44fe98){const _0x40cc2a=_0x3ce4fe;let _0x3e54a7=this['_shapes']['get'](_0x44fe98);_0x3e54a7&&((0x0,_0x164d60[_0x40cc2a(0x235)])(_0x3e54a7[_0x40cc2a(0x210)]())&&this[_0x40cc2a(0x1ef)][_0x40cc2a(0x21c)](_0x44fe98),this[_0x40cc2a(0x207)][_0x40cc2a(0x21c)](_0x44fe98));}['toJSON'](){const _0x252950=_0x3ce4fe;let _0x56c324=[];return this[_0x252950(0x207)][_0x252950(0x22b)](_0x3e35c5=>{const _0x524e72=_0x252950;_0x56c324[_0x524e72(0x23b)](_0x3e35c5[_0x524e72(0x1dc)]());}),_0x56c324;}['fromJSON'](_0x552472){const _0x4c9d61=_0x3ce4fe;for(let _0x52a418 of _0x552472){let {id:_0x4c72cc,shapeType:_0xb3271}=_0x52a418,_0x553569=this['addShape'](_0xb3271,_0x4c72cc,_0x52a418['shapeData']);_0x553569&&_0x553569[_0x4c9d61(0x20f)]()&&this[_0x4c9d61(0x1ef)]['add'](_0x4c72cc);}}[_0x3ce4fe(0x1eb)](){const _0x5395d0=_0x3ce4fe;this['_disposed']||(this[_0x5395d0(0x207)][_0x5395d0(0x22b)](_0x28e748=>{const _0x234bb1=_0x5395d0;_0x28e748[_0x234bb1(0x1eb)]();}),this['_shapes']['clear'](),this['_linesIds']['clear'](),this['_groupIds'][_0x5395d0(0x215)](),super[_0x5395d0(0x1eb)]());}};function _0x542afb(_0x44c1c5,_0x129d9a){return function(_0x47c6ca,_0x5f3dde){_0x129d9a(_0x47c6ca,_0x5f3dde,_0x44c1c5);};}function _0x3dbae4(_0x471d1b,_0x1bf135,_0x1fed28,_0x2a6bd5){const _0x306658=_0x3ce4fe;var _0x2b04d1=arguments[_0x306658(0x1d7)],_0xf4a03c=_0x2b04d1<0x3?_0x1bf135:_0x2a6bd5===null?_0x2a6bd5=Object[_0x306658(0x232)](_0x1bf135,_0x1fed28):_0x2a6bd5,_0x822111;if(typeof Reflect==_0x306658(0x1d9)&&typeof Reflect['decorate']=='function')_0xf4a03c=Reflect['decorate'](_0x471d1b,_0x1bf135,_0x1fed28,_0x2a6bd5);else{for(var _0x5a35d7=_0x471d1b['length']-0x1;_0x5a35d7>=0x0;_0x5a35d7--)(_0x822111=_0x471d1b[_0x5a35d7])&&(_0xf4a03c=(_0x2b04d1<0x3?_0x822111(_0xf4a03c):_0x2b04d1>0x3?_0x822111(_0x1bf135,_0x1fed28,_0xf4a03c):_0x822111(_0x1bf135,_0x1fed28))||_0xf4a03c);}return _0x2b04d1>0x3&&_0xf4a03c&&Object[_0x306658(0x21a)](_0x1bf135,_0x1fed28,_0xf4a03c),_0xf4a03c;}let _0x8572f0=class extends _0x32983f['Disposable']{constructor(_0x3392d7){const _0x3940a4=_0x3ce4fe;super(),this[_0x3940a4(0x1f5)]=_0x3392d7,_0x2f075d(this,'_shapeModelManagerMap',new Map()),this[_0x3940a4(0x1e7)]();}[_0x3ce4fe(0x22a)](_0x3b8996,_0x22c422){const _0x5cadec=_0x3ce4fe;let _0x3369ce=this[_0x5cadec(0x1e6)][_0x5cadec(0x1ea)](_0x3b8996);_0x3369ce||(_0x3369ce=new Map(),this[_0x5cadec(0x1e6)][_0x5cadec(0x222)](_0x3b8996,_0x3369ce));let _0x1909dc=_0x3369ce[_0x5cadec(0x1ea)](_0x22c422);return _0x1909dc||(_0x1909dc=new _0x13c0aa(),_0x3369ce[_0x5cadec(0x222)](_0x22c422,_0x1909dc)),_0x1909dc;}['insertShape'](_0x2607eb,_0x59d85a,_0xb04d51,_0x388a71,_0x4c6826){const _0xc40979=_0x3ce4fe;this[_0xc40979(0x22a)](_0x2607eb,_0x59d85a)['addShape'](_0xb04d51,_0x388a71,_0x4c6826);}[_0x3ce4fe(0x1d1)](_0x296208,_0x57ccc5,_0x4169fa){const _0x4fe1fb=_0x3ce4fe;this['_ensureShapeModelManager'](_0x296208,_0x57ccc5)[_0x4fe1fb(0x1d1)](_0x4169fa);}['getBasicShapeType'](_0x27ee4c,_0x52ac77,_0x2c3c02){const _0x3ff895=_0x3ce4fe;return this['_ensureShapeModelManager'](_0x27ee4c,_0x52ac77)[_0x3ff895(0x210)](_0x2c3c02);}[_0x3ce4fe(0x210)](_0x548287,_0x2873bb,_0x43eaa1){const _0x26075f=_0x3ce4fe;return this[_0x26075f(0x22a)](_0x548287,_0x2873bb)[_0x26075f(0x210)](_0x43eaa1);}[_0x3ce4fe(0x223)](_0x1c3f65,_0x2b9eeb,_0x591872){const _0x7bd419=_0x3ce4fe;return this[_0x7bd419(0x22a)](_0x1c3f65,_0x2b9eeb)['hasShape'](_0x591872);}[_0x3ce4fe(0x209)](_0x5013d6,_0xcbb3ac,_0x336206){const _0x1f3d86=_0x3ce4fe;return this['_ensureShapeModelManager'](_0x5013d6,_0xcbb3ac)[_0x1f3d86(0x210)](_0x336206);}['getShapeDataById'](_0x5d1bbf,_0x312013,_0x3f1a29){const _0x5510e1=_0x3ce4fe;let _0x2c6282=this['_ensureShapeModelManager'](_0x5d1bbf,_0x312013);if(!_0x2c6282['getShapeType'](_0x3f1a29))return;let _0x533b77=_0x2c6282['_shapes'][_0x5510e1(0x1ea)](_0x3f1a29);if(_0x533b77)return _0x533b77[_0x5510e1(0x1e2)]();}[_0x3ce4fe(0x1d4)](_0x70f31b,_0x1d6dcd,_0x34a38c){const _0x4661cd=_0x3ce4fe;return this[_0x4661cd(0x22a)](_0x70f31b,_0x1d6dcd)[_0x4661cd(0x207)][_0x4661cd(0x1ea)](_0x34a38c);}[_0x3ce4fe(0x1ff)](_0x120f4d,_0x5616f0,_0x4c2d00){const _0x13eca9=_0x3ce4fe;return this[_0x13eca9(0x22a)](_0x120f4d,_0x5616f0)['getBasicShapeRelation'](_0x4c2d00);}[_0x3ce4fe(0x1da)](_0x1c2bf1,_0x17c886,_0x1c9e5d){const _0x233a9e=_0x3ce4fe;let _0x59aa16=this['_ensureShapeModelManager'](_0x1c2bf1,_0x17c886)[_0x233a9e(0x207)][_0x233a9e(0x1ea)](_0x1c9e5d);if(_0x59aa16)return _0x59aa16[_0x233a9e(0x1f2)]();}['setShapeType'](){}[_0x3ce4fe(0x1de)](_0x335cc7){const _0x2a918a=_0x3ce4fe;let _0x4d9e73={},_0x22c519=this[_0x2a918a(0x1e6)][_0x2a918a(0x1ea)](_0x335cc7);return _0x22c519&&_0x22c519['forEach']((_0x4f989c,_0x1ede96)=>{const _0xcfb9ec=_0x2a918a;let _0x2d47bc=_0x4f989c[_0xcfb9ec(0x1dc)]();_0x2d47bc[_0xcfb9ec(0x1d7)]>0x0&&(_0x4d9e73[_0x1ede96]=_0x2d47bc);}),JSON[_0x2a918a(0x1fc)](_0x4d9e73);}[_0x3ce4fe(0x1d0)](_0x162690,_0x408f83){const _0x54ce8a=_0x3ce4fe;Object[_0x54ce8a(0x211)](_0x408f83)[_0x54ce8a(0x22b)](_0x4daa66=>{const _0x2fcaaa=_0x54ce8a;this[_0x2fcaaa(0x22a)](_0x162690,_0x4daa66)[_0x2fcaaa(0x20c)](_0x408f83[_0x4daa66]);});}[_0x3ce4fe(0x1dc)](){const _0x5a6a75=_0x3ce4fe;let _0x569c14={};return this['_shapeModelManagerMap'][_0x5a6a75(0x22b)]((_0x3b6582,_0xbccfd4)=>{const _0x2b0296=_0x5a6a75;_0x569c14[_0xbccfd4]={},_0x3b6582[_0x2b0296(0x22b)]((_0x4f9416,_0x42fd65)=>{const _0x1e4e83=_0x2b0296;_0x569c14[_0xbccfd4][_0x42fd65]=_0x4f9416[_0x1e4e83(0x1dc)]();});}),_0x569c14;}[_0x3ce4fe(0x20c)](_0x295db1){const _0x16bd28=_0x3ce4fe;Object[_0x16bd28(0x211)](_0x295db1)[_0x16bd28(0x22b)](_0x71ac40=>{const _0x1fd95c=_0x16bd28;let _0x80b19b=_0x295db1[_0x71ac40];Object[_0x1fd95c(0x211)](_0x80b19b)[_0x1fd95c(0x22b)](_0x1f4eea=>{const _0x71782=_0x1fd95c;this[_0x71782(0x22a)](_0x71ac40,_0x1f4eea)[_0x71782(0x20c)](_0x80b19b[_0x1f4eea]);});});}[_0x3ce4fe(0x1e7)](){const _0x3173d9=_0x3ce4fe;this[_0x3173d9(0x1f5)]['registerPluginResource']({'pluginName':'SHEET_SHAPE_PLUGIN','businesses':[_0x32983f['UniverInstanceType'][_0x3173d9(0x200)]],'toJson':_0x521739=>this[_0x3173d9(0x1de)](_0x521739),'parseJson':_0x215da5=>JSON['parse'](_0x215da5),'onLoad':(_0x56776f,_0x5e5713)=>{const _0x4f8954=_0x3173d9;this[_0x4f8954(0x1d0)](_0x56776f,_0x5e5713);},'onUnLoad':_0x400773=>{const _0x51107e=_0x3173d9;let _0x1076ba=this[_0x51107e(0x1e6)][_0x51107e(0x1ea)](_0x400773);_0x1076ba&&(_0x1076ba['forEach'](_0x4cecb5=>{const _0x31c2f2=_0x51107e;_0x4cecb5[_0x31c2f2(0x1eb)]();}),this['_shapeModelManagerMap'][_0x51107e(0x21c)](_0x400773));}});}[_0x3ce4fe(0x1eb)](){const _0x56815b=_0x3ce4fe;this[_0x56815b(0x1e6)]['forEach'](_0x200cf2=>{const _0x28a84c=_0x56815b;_0x200cf2[_0x28a84c(0x22b)](_0x483d7a=>{const _0x5322d3=_0x28a84c;_0x483d7a[_0x5322d3(0x1eb)]();});});}};_0x8572f0=_0x3dbae4([_0x542afb(0x0,_0x32983f[_0x3ce4fe(0x1ec)])],_0x8572f0);let _0x11fe45={'id':_0x3ce4fe(0x1d6),'type':_0x32983f[_0x3ce4fe(0x208)][_0x3ce4fe(0x213)],'handler':(_0x29a81b,_0x29af60)=>{const _0x314105=_0x3ce4fe;let {unitId:_0x55036e,subUnitId:_0x42b69c,shapeType:_0x25cb18,shapeId:_0x4e4c3a,shapeData:_0x5bd88f}=_0x29af60,_0x23c2b7=_0x29a81b[_0x314105(0x1ea)](_0x8572f0)[_0x314105(0x1d4)](_0x55036e,_0x42b69c,_0x4e4c3a);return _0x23c2b7&&(_0x23c2b7[_0x314105(0x239)](_0x25cb18),_0x5bd88f&&(_0x23c2b7==null||_0x23c2b7[_0x314105(0x1f4)](_0x5bd88f))),!0x0;}},_0x4205fd={'id':_0x3ce4fe(0x230),'type':_0x32983f[_0x3ce4fe(0x208)][_0x3ce4fe(0x1fd)],'handler':(_0x58b498,_0x464add)=>{const _0x45a0d0=_0x3ce4fe;if(!_0x464add)return!0x1;let _0xfec5c5=_0x58b498['get'](_0x32983f[_0x45a0d0(0x1f0)]),_0x5c1844=_0x58b498[_0x45a0d0(0x1ea)](_0x8572f0),_0x42ae4e=_0x58b498['get'](_0x32983f[_0x45a0d0(0x23a)]),_0x56b7ec=[],_0x2c5636=[],{unitId:_0x102bb4,subUnitId:_0x4f1b5e,shapeId:_0x423d00,shapeType:_0x33c7ce,shapeData:_0xe1ab4d}=_0x464add,_0x4ed84e=_0x5c1844['getShapeModel'](_0x102bb4,_0x4f1b5e,_0x423d00);if(_0x4ed84e){let _0x51d8d8=_0x4ed84e[_0x45a0d0(0x210)](),_0x2afeb8=Object['assign']({},_0x4ed84e[_0x45a0d0(0x1e2)]()),_0x3bcfc8={'unitId':_0x102bb4,'subUnitId':_0x4f1b5e,'shapeId':_0x423d00,'shapeType':_0x33c7ce,'shapeData':_0xe1ab4d},_0x15ad0d={'unitId':_0x102bb4,'subUnitId':_0x4f1b5e,'shapeId':_0x423d00,'shapeType':_0x51d8d8,'shapeData':_0x2afeb8};return _0x56b7ec[_0x45a0d0(0x23b)]({'id':_0x11fe45['id'],'params':_0x3bcfc8}),_0x2c5636[_0x45a0d0(0x23b)]({'id':_0x11fe45['id'],'params':_0x15ad0d}),_0x56b7ec['every'](_0x284fa9=>_0xfec5c5[_0x45a0d0(0x1d8)](_0x284fa9['id'],_0x284fa9[_0x45a0d0(0x218)]))&&_0x42ae4e[_0x45a0d0(0x203)]({'unitID':_0x102bb4,'redoMutations':[..._0x56b7ec],'undoMutations':[..._0x2c5636]}),!0x0;}return!0x1;}},_0x1badef={'id':_0x3ce4fe(0x217),'type':_0x32983f[_0x3ce4fe(0x208)][_0x3ce4fe(0x213)],'handler':(_0x4dca7c,_0x29e114)=>{const _0x4a9a78=_0x3ce4fe;let {unitId:_0x5e6749,subUnitId:_0x15e721,shapeType:_0x539c00,shapeId:_0x48db4e,shapeData:_0x304b9e}=_0x29e114;return _0x4dca7c[_0x4a9a78(0x1ea)](_0x8572f0)[_0x4a9a78(0x1ed)](_0x5e6749,_0x15e721,_0x539c00,_0x48db4e,_0x304b9e),!0x0;}},_0x595fc0={'id':_0x3ce4fe(0x22f),'type':_0x32983f[_0x3ce4fe(0x208)][_0x3ce4fe(0x213)],'handler':(_0x55abaa,_0xd37af9)=>{const _0x48955f=_0x3ce4fe;let {unitId:_0x3e8563,subUnitId:_0x1a970b,shapeId:_0xd93473}=_0xd37af9;return _0x55abaa[_0x48955f(0x1ea)](_0x8572f0)[_0x48955f(0x1d1)](_0x3e8563,_0x1a970b,_0xd93473),!0x0;}},_0x39b106={'id':_0x3ce4fe(0x21b),'type':_0x32983f[_0x3ce4fe(0x208)][_0x3ce4fe(0x213)],'handler':(_0xc3f11f,_0xfbc2bc)=>{const _0x514131=_0x3ce4fe;let {unitId:_0x310a97,subUnitId:_0x30f59d,shapeType:_0x2b0456,shapeId:_0x414203,shapeData:_0x3e350c}=_0xfbc2bc,_0x3a674d=_0xc3f11f[_0x514131(0x1ea)](_0x8572f0)['getShapeModel'](_0x310a97,_0x30f59d,_0x414203);return _0x3a674d&&(_0x2b0456!==void 0x0&&_0x3a674d[_0x514131(0x239)](_0x2b0456),_0x3e350c&&(_0x3a674d==null||_0x3a674d['setShapeData'](_0x3e350c,!0x0))),!0x0;}};var _0x10e42a='@univerjs-pro/sheets-shape',_0x22d05a=_0x3ce4fe(0x20e);let _0x35e060=_0x3ce4fe(0x1fa);Symbol(_0x35e060);let _0x54bdce={},_0x104a5e=class extends _0x32983f['Plugin']{constructor(_0x3693e4=_0x54bdce,_0x361099,_0x56de59,_0x1dcdb2){const _0x5cfca9=_0x3ce4fe;super(),this[_0x5cfca9(0x20a)]=_0x3693e4,this[_0x5cfca9(0x228)]=_0x361099,this[_0x5cfca9(0x1d5)]=_0x56de59,this['_configService']=_0x1dcdb2;let {..._0x5ab124}=(0x0,_0x32983f[_0x5cfca9(0x214)])({},_0x54bdce,this['_config']);this['_configService'][_0x5cfca9(0x1e1)](_0x35e060,_0x5ab124),this[_0x5cfca9(0x221)]();}['onRendered'](){const _0xaa18dc=_0x3ce4fe;(0x0,_0x32983f[_0xaa18dc(0x1dd)])(this[_0xaa18dc(0x228)],[]);}[_0x3ce4fe(0x1db)](){const _0xe19ef3=_0x3ce4fe;let _0x245be5=this[_0xe19ef3(0x228)];[[_0x13c0aa],[_0x8572f0]][_0xe19ef3(0x22b)](_0x237e19=>_0x245be5[_0xe19ef3(0x220)](_0x237e19));}['_initCommands'](){const _0x2219d3=_0x3ce4fe;[_0x1badef,_0x595fc0,_0x11fe45,_0x39b106]['forEach'](_0x2a8cec=>this['disposeWithMe'](this['_commandService'][_0x2219d3(0x1ce)](_0x2a8cec)));}};_0x2f075d(_0x104a5e,_0x3ce4fe(0x229),_0x32983f[_0x3ce4fe(0x20d)][_0x3ce4fe(0x200)]),_0x2f075d(_0x104a5e,_0x3ce4fe(0x201),_0x3ce4fe(0x1e0)),_0x2f075d(_0x104a5e,'packageName',_0x10e42a),_0x2f075d(_0x104a5e,_0x3ce4fe(0x1e3),_0x22d05a),_0x104a5e=_0x3dbae4([(0x0,_0x32983f[_0x3ce4fe(0x238)])(_0x2c2932['UniverLicensePlugin']),_0x542afb(0x1,(0x0,_0x32983f[_0x3ce4fe(0x1f3)])(_0x32983f[_0x3ce4fe(0x22c)])),_0x542afb(0x2,_0x32983f[_0x3ce4fe(0x1f0)]),_0x542afb(0x3,_0x32983f[_0x3ce4fe(0x204)])],_0x104a5e),_0x13db26[_0x3ce4fe(0x225)]=_0x1badef,_0x13db26[_0x3ce4fe(0x231)]=_0x595fc0,Object[_0x3ce4fe(0x21a)](_0x13db26,_0x3ce4fe(0x21f),{'enumerable':!0x0,'get':function(){return _0x8572f0;}}),Object[_0x3ce4fe(0x21a)](_0x13db26,'UniverSheetsShapePlugin',{'enumerable':!0x0,'get':function(){return _0x104a5e;}}),_0x13db26['UpdateSheetsShapeDataMutation']=_0x39b106,_0x13db26[_0x3ce4fe(0x206)]=_0x4205fd,_0x13db26['UpdateSheetsShapeTypeMutation']=_0x11fe45;}));function _0xdb8c(_0x21db7c,_0x1dec7c){_0x21db7c=_0x21db7c-0x1ce;const _0x3005ab=_0x3005();let _0xdb8c2c=_0x3005ab[_0x21db7c];return _0xdb8c2c;}function _0x3005(){const _0x16e0de=['fromJSON','UniverInstanceType','0.18.0','isLineShape','getShapeType','keys','amd','MUTATION','merge','clear','776VuTyam','sheet.mutation.insert-shape','params','Disposable','defineProperty','sheet.mutation.update-shape-data','delete','3582Rtwyhn','ShapeModel','SheetsShapeService','add','_initCommands','set','hasShape','43321245mxxzqh','InsertSheetsShapeMutation','UniverProLicense','1363798geirrd','_injector','type','_ensureShapeModelManager','forEach','Injector','default','function','sheet.mutation.remove-shape','sheet.command.update-shape-type','RemoveSheetsShapeMutation','getOwnPropertyDescriptor','6721485RwyoSE','348HxsUKD','isConnectorShape','call','136934krLBrz','DependentOn','setShapeType','IUndoRedoService','push','registerCommand','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_deserializeShapeForUnit','removeShape','iterator','Module','getShapeModel','_commandService','sheet.mutation.update-shape-type','length','syncExecuteCommand','object','getLineShapeRelation','onStarting','toJSON','touchDependencies','_serializeShapeForUnit','8rKLYuc','SHEET_SHAPE_PLUGIN','setConfig','getShapeData','version','@univerjs-pro/license','UniverProEngineShape','_shapeModelManagerMap','_initSnapshot','842600ULWzOD','constructor','get','dispose','IResourceManagerService','insertShape','UniverCore','_linesIds','ICommandService','12257667iemqjI','getShapeRelation','Inject','setShapeData','_resourcesManagerService','4KSiJDQ','addShape','symbol','@univerjs/core','sheets-shape.config','toStringTag','stringify','COMMAND','from','getBasicShapeRelation','UNIVER_SHEET','pluginName','@univerjs-pro/engine-shape','pushUndoRedo','IConfigService','prototype','UpdateSheetsShapeTypeCommand','_shapes','CommandType','getShapeTypeById','_config','string'];_0x3005=function(){return _0x16e0de;};return _0x3005();}
|
|
1
|
+
(function(_0x47a8b6,_0x2bd78f){const _0x23f856=_0x6b5e,_0x109e94=_0x47a8b6();while(!![]){try{const _0x27c928=-parseInt(_0x23f856(0xf3))/0x1+parseInt(_0x23f856(0x143))/0x2*(parseInt(_0x23f856(0x126))/0x3)+-parseInt(_0x23f856(0x13e))/0x4+parseInt(_0x23f856(0xfc))/0x5+-parseInt(_0x23f856(0x147))/0x6*(-parseInt(_0x23f856(0xe9))/0x7)+parseInt(_0x23f856(0x13d))/0x8*(-parseInt(_0x23f856(0x14f))/0x9)+parseInt(_0x23f856(0x127))/0xa;if(_0x27c928===_0x2bd78f)break;else _0x109e94['push'](_0x109e94['shift']());}catch(_0x37fdcc){_0x109e94['push'](_0x109e94['shift']());}}}(_0x5e47,0x954bf),function(_0x206fba,_0x503348){const _0xc5c39f=_0x6b5e;typeof exports==_0xc5c39f(0x141)&&typeof module<'u'?_0x503348(exports,require(`@univerjs/core`),require(`@univerjs-pro/engine-shape`),require(`@univerjs-pro/license`)):typeof define==_0xc5c39f(0xee)&&define[_0xc5c39f(0x109)]?define([_0xc5c39f(0x12f),_0xc5c39f(0x118),_0xc5c39f(0x105),'@univerjs-pro/license'],_0x503348):(_0x206fba=typeof globalThis<'u'?globalThis:_0x206fba||self,_0x503348(_0x206fba['UniverProSheetsShape']={},_0x206fba['UniverCore'],_0x206fba[_0xc5c39f(0x11a)],_0x206fba[_0xc5c39f(0x135)]));}(this,function(_0x12e3ef,_0x15b111,_0x432763,_0x32de89){const _0x295366=_0x6b5e;Object[_0x295366(0x132)](_0x12e3ef,Symbol['toStringTag'],{'value':_0x295366(0x12b)});function _0x10cecb(_0x5f74dd){'@babel/helpers - typeof';const _0x40afdb=_0x295366;return _0x10cecb=typeof Symbol=='function'&&typeof Symbol[_0x40afdb(0xe6)]==_0x40afdb(0x114)?function(_0x3d059c){return typeof _0x3d059c;}:function(_0x52d9ce){const _0x32a2a5=_0x40afdb;return _0x52d9ce&&typeof Symbol=='function'&&_0x52d9ce['constructor']===Symbol&&_0x52d9ce!==Symbol[_0x32a2a5(0xeb)]?_0x32a2a5(0x114):typeof _0x52d9ce;},_0x10cecb(_0x5f74dd);}function _0x1146f2(_0x188bd9,_0x46ec72){const _0x40f96f=_0x295366;if(_0x10cecb(_0x188bd9)!=_0x40f96f(0x141)||!_0x188bd9)return _0x188bd9;var _0x4b0dfd=_0x188bd9[Symbol[_0x40f96f(0x121)]];if(_0x4b0dfd!==void 0x0){var _0x8da520=_0x4b0dfd[_0x40f96f(0x13f)](_0x188bd9,_0x46ec72||_0x40f96f(0x133));if(_0x10cecb(_0x8da520)!='object')return _0x8da520;throw TypeError(_0x40f96f(0x103));}return(_0x46ec72==='string'?String:Number)(_0x188bd9);}function _0x3ae964(_0x4385c1){const _0x1e35e6=_0x295366;var _0x3e7fe2=_0x1146f2(_0x4385c1,'string');return _0x10cecb(_0x3e7fe2)==_0x1e35e6(0x114)?_0x3e7fe2:_0x3e7fe2+'';}function _0x529e3d(_0x17b286,_0x5af15d,_0x331aee){const _0x6b88a6=_0x295366;return(_0x5af15d=_0x3ae964(_0x5af15d))in _0x17b286?Object[_0x6b88a6(0x132)](_0x17b286,_0x5af15d,{'value':_0x331aee,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x17b286[_0x5af15d]=_0x331aee,_0x17b286;}var _0x7ea750=class extends _0x15b111[_0x295366(0x12d)]{constructor(){const _0x5b7dc3=_0x295366;super(),_0x529e3d(this,'_shapes',new Map()),_0x529e3d(this,'_linesIds',new Set()),_0x529e3d(this,_0x5b7dc3(0x137),new Set());}[_0x295366(0xfd)](_0x126335,_0x33af9d,_0x265631){const _0x2e701d=_0x295366;let _0x2f7814=new _0x432763[(_0x2e701d(0x10a))](_0x126335,_0x33af9d,_0x265631);return this[_0x2e701d(0x11c)][_0x2e701d(0x117)](_0x33af9d,_0x2f7814),(0x0,_0x432763[_0x2e701d(0xe4)])(_0x126335)&&this['_linesIds']['add'](_0x33af9d),_0x2f7814;}[_0x295366(0x106)](_0xd4426c){const _0x28837d=_0x295366;let _0x1205e1=[];for(let _0x2e18a1 of this[_0x28837d(0xe2)]){let _0x3ce473=this[_0x28837d(0x11c)]['get'](_0x2e18a1);if(_0x3ce473){let _0x44ba7a=_0x3ce473['getShapeRelation']();if(_0x44ba7a){var _0x322891,_0x444f81;((_0x322891=_0x44ba7a[_0x28837d(0x139)])==null?void 0x0:_0x322891[_0x28837d(0x12c)])===_0xd4426c&&_0x1205e1[_0x28837d(0xf9)]({..._0x44ba7a[_0x28837d(0x139)],'lineShapeId':_0x2e18a1,'isFrom':!0x0}),((_0x444f81=_0x44ba7a['to'])==null?void 0x0:_0x444f81[_0x28837d(0x12c)])===_0xd4426c&&_0x1205e1[_0x28837d(0xf9)]({..._0x44ba7a['to'],'lineShapeId':_0x2e18a1,'isFrom':!0x1});}}}return _0x1205e1;}[_0x295366(0x11f)](_0x24bf2d){const _0x512a75=_0x295366;let _0x50597d=this['_shapes'][_0x512a75(0xed)](_0x24bf2d);if(_0x50597d)return _0x50597d[_0x512a75(0x10e)]();}['getShapeType'](_0x5bd397){const _0x2ccd03=_0x295366;let _0x29e72e=this[_0x2ccd03(0x11c)][_0x2ccd03(0xed)](_0x5bd397);if(_0x29e72e)return _0x29e72e[_0x2ccd03(0x122)]();}[_0x295366(0x144)](_0xbb406c){const _0x31e167=_0x295366;return this[_0x31e167(0x11c)][_0x31e167(0x11e)](_0xbb406c);}[_0x295366(0x13c)](_0x272e02){const _0x5e57aa=_0x295366;let _0x3ca8c7=this['_shapes'][_0x5e57aa(0xed)](_0x272e02);_0x3ca8c7&&((0x0,_0x432763[_0x5e57aa(0xe4)])(_0x3ca8c7[_0x5e57aa(0x122)]())&&this[_0x5e57aa(0xe2)][_0x5e57aa(0x111)](_0x272e02),this[_0x5e57aa(0x11c)][_0x5e57aa(0x111)](_0x272e02));}[_0x295366(0x14a)](){const _0x268951=_0x295366;let _0x1a8ddb=[];return this[_0x268951(0x11c)][_0x268951(0xff)](_0x41530d=>{const _0x58e01c=_0x268951;_0x1a8ddb[_0x58e01c(0xf9)](_0x41530d[_0x58e01c(0x14a)]());}),_0x1a8ddb;}[_0x295366(0x131)](_0x5633cc){const _0x347105=_0x295366;for(let _0x480161 of _0x5633cc){let {id:_0x1bc0c8,shapeType:_0x44bcff}=_0x480161,_0x5ddc7f=this[_0x347105(0xfd)](_0x44bcff,_0x1bc0c8,_0x480161[_0x347105(0x138)]);_0x5ddc7f&&_0x5ddc7f[_0x347105(0x136)]()&&this[_0x347105(0xe2)][_0x347105(0x14e)](_0x1bc0c8);}}[_0x295366(0xf1)](){const _0x59a6b7=_0x295366;this[_0x59a6b7(0x145)]||(this[_0x59a6b7(0x11c)][_0x59a6b7(0xff)](_0x162604=>{_0x162604['dispose']();}),this['_shapes']['clear'](),this[_0x59a6b7(0xe2)][_0x59a6b7(0x134)](),this[_0x59a6b7(0x137)][_0x59a6b7(0x134)](),super[_0x59a6b7(0xf1)]());}};function _0x502dc4(_0x19b9d0,_0x235ed8){return function(_0xe41436,_0xb6632a){_0x235ed8(_0xe41436,_0xb6632a,_0x19b9d0);};}function _0x1d63f0(_0x118fac,_0x2d4683,_0x1b5f62,_0x35830e){const _0x59f525=_0x295366;var _0x21303b=arguments[_0x59f525(0xf8)],_0x5b732d=_0x21303b<0x3?_0x2d4683:_0x35830e===null?_0x35830e=Object[_0x59f525(0x151)](_0x2d4683,_0x1b5f62):_0x35830e,_0x4593ed;if(typeof Reflect==_0x59f525(0x141)&&typeof Reflect[_0x59f525(0x128)]==_0x59f525(0xee))_0x5b732d=Reflect[_0x59f525(0x128)](_0x118fac,_0x2d4683,_0x1b5f62,_0x35830e);else{for(var _0x137a3e=_0x118fac['length']-0x1;_0x137a3e>=0x0;_0x137a3e--)(_0x4593ed=_0x118fac[_0x137a3e])&&(_0x5b732d=(_0x21303b<0x3?_0x4593ed(_0x5b732d):_0x21303b>0x3?_0x4593ed(_0x2d4683,_0x1b5f62,_0x5b732d):_0x4593ed(_0x2d4683,_0x1b5f62))||_0x5b732d);}return _0x21303b>0x3&&_0x5b732d&&Object[_0x59f525(0x132)](_0x2d4683,_0x1b5f62,_0x5b732d),_0x5b732d;}let _0x1f085e=class extends _0x15b111[_0x295366(0x12d)]{constructor(_0x7d9bc9){const _0x52b2c2=_0x295366;super(),this[_0x52b2c2(0xef)]=_0x7d9bc9,_0x529e3d(this,'_shapeModelManagerMap',new Map()),this[_0x52b2c2(0x129)]();}[_0x295366(0x130)](_0x440e7c,_0x521c50){const _0x5b9697=_0x295366;let _0x499d25=this[_0x5b9697(0xec)][_0x5b9697(0xed)](_0x440e7c);_0x499d25||(_0x499d25=new Map(),this[_0x5b9697(0xec)][_0x5b9697(0x117)](_0x440e7c,_0x499d25));let _0x39d836=_0x499d25[_0x5b9697(0xed)](_0x521c50);return _0x39d836||(_0x39d836=new _0x7ea750(),_0x499d25['set'](_0x521c50,_0x39d836)),_0x39d836;}['insertShape'](_0x552bca,_0x220d37,_0x1c5387,_0x2dfa0e,_0x458c69){const _0x2e05ca=_0x295366;this['_ensureShapeModelManager'](_0x552bca,_0x220d37)[_0x2e05ca(0xfd)](_0x1c5387,_0x2dfa0e,_0x458c69);}[_0x295366(0x13c)](_0x411e9f,_0x5392fd,_0x2ae26e){const _0x344df5=_0x295366;this['_ensureShapeModelManager'](_0x411e9f,_0x5392fd)[_0x344df5(0x13c)](_0x2ae26e);}[_0x295366(0x13a)](_0x4c25ce,_0x26d8fa,_0x75a0c3){const _0x216cb1=_0x295366;return this[_0x216cb1(0x130)](_0x4c25ce,_0x26d8fa)[_0x216cb1(0x122)](_0x75a0c3);}[_0x295366(0x122)](_0x2d54ae,_0x22443a,_0x326d3d){const _0x36414f=_0x295366;return this[_0x36414f(0x130)](_0x2d54ae,_0x22443a)[_0x36414f(0x122)](_0x326d3d);}[_0x295366(0x144)](_0x57be0c,_0x540cf6,_0x254d82){const _0x492d97=_0x295366;return this[_0x492d97(0x130)](_0x57be0c,_0x540cf6)[_0x492d97(0x144)](_0x254d82);}[_0x295366(0x102)](_0x1f30b5,_0x624ca1,_0x4fa1ed){const _0x58ccf3=_0x295366;return this[_0x58ccf3(0x130)](_0x1f30b5,_0x624ca1)[_0x58ccf3(0x122)](_0x4fa1ed);}[_0x295366(0xfb)](_0x22a4e1,_0x4afd15,_0xb03eb5){const _0x5ce716=_0x295366;let _0xde6bf7=this[_0x5ce716(0x130)](_0x22a4e1,_0x4afd15);if(!_0xde6bf7[_0x5ce716(0x122)](_0xb03eb5))return;let _0x11de5b=_0xde6bf7['_shapes']['get'](_0xb03eb5);if(_0x11de5b)return _0x11de5b['getShapeData']();}[_0x295366(0x113)](_0x3f185a,_0x167aa7,_0x2844a6){const _0x8547ac=_0x295366;return this[_0x8547ac(0x130)](_0x3f185a,_0x167aa7)[_0x8547ac(0x11c)][_0x8547ac(0xed)](_0x2844a6);}[_0x295366(0x106)](_0x56cd15,_0x2b7bad,_0x2b4298){return this['_ensureShapeModelManager'](_0x56cd15,_0x2b7bad)['getBasicShapeRelation'](_0x2b4298);}[_0x295366(0x11f)](_0x3bea59,_0x53b55d,_0x5a3112){const _0x226ae8=_0x295366;let _0x435101=this[_0x226ae8(0x130)](_0x3bea59,_0x53b55d)[_0x226ae8(0x11c)][_0x226ae8(0xed)](_0x5a3112);if(_0x435101)return _0x435101[_0x226ae8(0x10e)]();}[_0x295366(0xf7)](){}['_serializeShapeForUnit'](_0x24d7c3){const _0x18097c=_0x295366;let _0xfc40f4={},_0x510fee=this[_0x18097c(0xec)][_0x18097c(0xed)](_0x24d7c3);return _0x510fee&&_0x510fee[_0x18097c(0xff)]((_0x2e5112,_0x23eb42)=>{const _0x4c72a4=_0x18097c;let _0x341336=_0x2e5112[_0x4c72a4(0x14a)]();_0x341336['length']>0x0&&(_0xfc40f4[_0x23eb42]=_0x341336);}),JSON[_0x18097c(0x125)](_0xfc40f4);}[_0x295366(0x101)](_0x922254,_0x5eec5d){const _0x198291=_0x295366;Object[_0x198291(0x11d)](_0x5eec5d)[_0x198291(0xff)](_0x21a78e=>{const _0x2bcbb9=_0x198291;this[_0x2bcbb9(0x130)](_0x922254,_0x21a78e)[_0x2bcbb9(0x131)](_0x5eec5d[_0x21a78e]);});}['toJSON'](){const _0x250880=_0x295366;let _0x2e88dd={};return this[_0x250880(0xec)]['forEach']((_0x3e61e,_0x41c613)=>{const _0xef3e07=_0x250880;_0x2e88dd[_0x41c613]={},_0x3e61e[_0xef3e07(0xff)]((_0x5a1a18,_0x2fc96f)=>{_0x2e88dd[_0x41c613][_0x2fc96f]=_0x5a1a18['toJSON']();});}),_0x2e88dd;}[_0x295366(0x131)](_0x4fb673){const _0x22d370=_0x295366;Object[_0x22d370(0x11d)](_0x4fb673)[_0x22d370(0xff)](_0x3f346f=>{const _0x3d0dbd=_0x22d370;let _0x5ea7a2=_0x4fb673[_0x3f346f];Object[_0x3d0dbd(0x11d)](_0x5ea7a2)[_0x3d0dbd(0xff)](_0x58a3e8=>{const _0x5175f7=_0x3d0dbd;this['_ensureShapeModelManager'](_0x3f346f,_0x58a3e8)[_0x5175f7(0x131)](_0x5ea7a2[_0x58a3e8]);});});}[_0x295366(0x129)](){const _0x19495f=_0x295366;this['_resourcesManagerService'][_0x19495f(0xfa)]({'pluginName':'SHEET_SHAPE_PLUGIN','businesses':[_0x15b111[_0x19495f(0x108)]['UNIVER_SHEET']],'toJson':_0x50cce5=>this[_0x19495f(0x104)](_0x50cce5),'parseJson':_0x433e9c=>JSON[_0x19495f(0x148)](_0x433e9c),'onLoad':(_0x12ea36,_0x1efc8f)=>{const _0x2346d3=_0x19495f;this[_0x2346d3(0x101)](_0x12ea36,_0x1efc8f);},'onUnLoad':_0x30973e=>{const _0x4f4d4d=_0x19495f;let _0x437c5e=this[_0x4f4d4d(0xec)]['get'](_0x30973e);_0x437c5e&&(_0x437c5e['forEach'](_0x189c31=>{const _0x519e42=_0x4f4d4d;_0x189c31[_0x519e42(0xf1)]();}),this[_0x4f4d4d(0xec)][_0x4f4d4d(0x111)](_0x30973e));}});}[_0x295366(0xf1)](){const _0xaa2b94=_0x295366;this[_0xaa2b94(0xec)][_0xaa2b94(0xff)](_0x44dac3=>{_0x44dac3['forEach'](_0x567787=>{_0x567787['dispose']();});});}};_0x1f085e=_0x1d63f0([_0x502dc4(0x0,_0x15b111[_0x295366(0x12e)])],_0x1f085e);let _0x4eb1cf={'id':'sheet.mutation.update-shape-type','type':_0x15b111[_0x295366(0x12a)]['MUTATION'],'handler':(_0x1c6476,_0x4840bb)=>{const _0x29d21f=_0x295366;let {unitId:_0xf86ebd,subUnitId:_0x4ed295,shapeType:_0x101b45,shapeId:_0x33c8d7,shapeData:_0x6420e2}=_0x4840bb,_0xfaab5=_0x1c6476['get'](_0x1f085e)[_0x29d21f(0x113)](_0xf86ebd,_0x4ed295,_0x33c8d7);return _0xfaab5&&(_0xfaab5[_0x29d21f(0xf7)](_0x101b45),_0x6420e2&&(_0xfaab5==null||_0xfaab5[_0x29d21f(0x150)](_0x6420e2))),!0x0;}},_0x12a369={'id':_0x295366(0xfe),'type':_0x15b111[_0x295366(0x12a)][_0x295366(0x10c)],'handler':(_0x10da66,_0x3a0909)=>{const _0x22566a=_0x295366;if(!_0x3a0909)return!0x1;let _0x5a3b8f=_0x10da66[_0x22566a(0xed)](_0x15b111['ICommandService']),_0x168467=_0x10da66[_0x22566a(0xed)](_0x1f085e),_0x216f62=_0x10da66[_0x22566a(0xed)](_0x15b111[_0x22566a(0x146)]),_0x26fdd2=[],_0x37db7b=[],{unitId:_0x28207a,subUnitId:_0x5197dd,shapeId:_0xf41209,shapeType:_0x230ff3,shapeData:_0x201c57}=_0x3a0909,_0x40f102=_0x168467[_0x22566a(0x113)](_0x28207a,_0x5197dd,_0xf41209);if(_0x40f102){let _0x567e4e=_0x40f102['getShapeType'](),_0x4fe6fc=Object['assign']({},_0x40f102[_0x22566a(0x10f)]()),_0x370bb7={'unitId':_0x28207a,'subUnitId':_0x5197dd,'shapeId':_0xf41209,'shapeType':_0x230ff3,'shapeData':_0x201c57},_0xf561f2={'unitId':_0x28207a,'subUnitId':_0x5197dd,'shapeId':_0xf41209,'shapeType':_0x567e4e,'shapeData':_0x4fe6fc};return _0x26fdd2['push']({'id':_0x4eb1cf['id'],'params':_0x370bb7}),_0x37db7b[_0x22566a(0xf9)]({'id':_0x4eb1cf['id'],'params':_0xf561f2}),_0x26fdd2[_0x22566a(0x14c)](_0x138b32=>_0x5a3b8f['syncExecuteCommand'](_0x138b32['id'],_0x138b32[_0x22566a(0x123)]))&&_0x216f62[_0x22566a(0x10d)]({'unitID':_0x28207a,'redoMutations':[..._0x26fdd2],'undoMutations':[..._0x37db7b]}),!0x0;}return!0x1;}},_0x436905={'id':_0x295366(0x140),'type':_0x15b111[_0x295366(0x12a)][_0x295366(0xf0)],'handler':(_0x15e8e7,_0x3f1103)=>{const _0x44e39e=_0x295366;let {unitId:_0x24b971,subUnitId:_0x5b4e81,shapeType:_0x4b51d2,shapeId:_0x5a8646,shapeData:_0x4cd691}=_0x3f1103;return _0x15e8e7[_0x44e39e(0xed)](_0x1f085e)[_0x44e39e(0xe7)](_0x24b971,_0x5b4e81,_0x4b51d2,_0x5a8646,_0x4cd691),!0x0;}},_0x161b46={'id':_0x295366(0xe5),'type':_0x15b111[_0x295366(0x12a)][_0x295366(0xf0)],'handler':(_0x2821bf,_0x4bff2d)=>{const _0x3e079b=_0x295366;let {unitId:_0xd528d4,subUnitId:_0x36f862,shapeId:_0x4edab5}=_0x4bff2d;return _0x2821bf[_0x3e079b(0xed)](_0x1f085e)[_0x3e079b(0x13c)](_0xd528d4,_0x36f862,_0x4edab5),!0x0;}},_0x3a5522={'id':_0x295366(0x11b),'type':_0x15b111[_0x295366(0x12a)][_0x295366(0xf0)],'handler':(_0x3759b2,_0x56c1af)=>{const _0x101276=_0x295366;let {unitId:_0x3f69ed,subUnitId:_0x41ae2b,shapeType:_0xfb6644,shapeId:_0x2cd3eb,shapeData:_0x24de20}=_0x56c1af,_0x34d503=_0x3759b2[_0x101276(0xed)](_0x1f085e)[_0x101276(0x113)](_0x3f69ed,_0x41ae2b,_0x2cd3eb);return _0x34d503&&(_0xfb6644!==void 0x0&&_0x34d503[_0x101276(0xf7)](_0xfb6644),_0x24de20&&(_0x34d503==null||_0x34d503['setShapeData'](_0x24de20,!0x0))),!0x0;}};var _0x220423=_0x295366(0x124),_0x4bd68a='0.19.0';let _0x344579='sheets-shape.config';Symbol(_0x344579);let _0x2cdfa3={},_0x54581c=class extends _0x15b111['Plugin']{constructor(_0x208ed6=_0x2cdfa3,_0xf2e1a3,_0x78caa8,_0x388813){const _0x1b6761=_0x295366;super(),this[_0x1b6761(0x116)]=_0x208ed6,this[_0x1b6761(0xe8)]=_0xf2e1a3,this['_commandService']=_0x78caa8,this['_configService']=_0x388813;let {..._0x1b0107}=(0x0,_0x15b111['merge'])({},_0x2cdfa3,this['_config']);this[_0x1b6761(0x120)][_0x1b6761(0xe0)](_0x344579,_0x1b0107),this[_0x1b6761(0x10b)]();}[_0x295366(0xe3)](){const _0x2311aa=_0x295366;(0x0,_0x15b111[_0x2311aa(0xf2)])(this[_0x2311aa(0xe8)],[]);}[_0x295366(0xf4)](){const _0x53051d=_0x295366;let _0x1c56d4=this[_0x53051d(0xe8)];[[_0x7ea750],[_0x1f085e]][_0x53051d(0xff)](_0xc7ec7d=>_0x1c56d4[_0x53051d(0x14e)](_0xc7ec7d));}[_0x295366(0x10b)](){const _0x318dba=_0x295366;[_0x436905,_0x161b46,_0x4eb1cf,_0x3a5522][_0x318dba(0xff)](_0x4773a1=>this[_0x318dba(0x107)](this[_0x318dba(0x14b)]['registerCommand'](_0x4773a1)));}};_0x529e3d(_0x54581c,_0x295366(0x115),_0x15b111[_0x295366(0x108)][_0x295366(0xf6)]),_0x529e3d(_0x54581c,_0x295366(0x142),_0x295366(0xea)),_0x529e3d(_0x54581c,_0x295366(0x149),_0x220423),_0x529e3d(_0x54581c,_0x295366(0x14d),_0x4bd68a),_0x54581c=_0x1d63f0([(0x0,_0x15b111[_0x295366(0x119)])(_0x32de89['UniverLicensePlugin']),_0x502dc4(0x1,(0x0,_0x15b111['Inject'])(_0x15b111[_0x295366(0xe1)])),_0x502dc4(0x2,_0x15b111[_0x295366(0x13b)]),_0x502dc4(0x3,_0x15b111['IConfigService'])],_0x54581c),_0x12e3ef[_0x295366(0x110)]=_0x436905,_0x12e3ef['RemoveSheetsShapeMutation']=_0x161b46,Object[_0x295366(0x132)](_0x12e3ef,_0x295366(0x100),{'enumerable':!0x0,'get':function(){return _0x1f085e;}}),Object[_0x295366(0x132)](_0x12e3ef,_0x295366(0x112),{'enumerable':!0x0,'get':function(){return _0x54581c;}}),_0x12e3ef[_0x295366(0xf5)]=_0x3a5522,_0x12e3ef['UpdateSheetsShapeTypeCommand']=_0x12a369,_0x12e3ef['UpdateSheetsShapeTypeMutation']=_0x4eb1cf;}));function _0x6b5e(_0x10d7b6,_0x295e1e){_0x10d7b6=_0x10d7b6-0xe0;const _0x5e473f=_0x5e47();let _0x6b5e8d=_0x5e473f[_0x10d7b6];return _0x6b5e8d;}function _0x5e47(){const _0x45b54c=['insertShape','_injector','22435TPmgYd','SHEET_SHAPE_PLUGIN','prototype','_shapeModelManagerMap','get','function','_resourcesManagerService','MUTATION','dispose','touchDependencies','859779WhALke','onStarting','UpdateSheetsShapeDataMutation','UNIVER_SHEET','setShapeType','length','push','registerPluginResource','getShapeDataById','731305wvSFGc','addShape','sheet.command.update-shape-type','forEach','SheetsShapeService','_deserializeShapeForUnit','getShapeTypeById','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_serializeShapeForUnit','@univerjs-pro/engine-shape','getBasicShapeRelation','disposeWithMe','UniverInstanceType','amd','ShapeModel','_initCommands','COMMAND','pushUndoRedo','getShapeRelation','getShapeData','InsertSheetsShapeMutation','delete','UniverSheetsShapePlugin','getShapeModel','symbol','type','_config','set','@univerjs/core','DependentOn','UniverProEngineShape','sheet.mutation.update-shape-data','_shapes','keys','has','getLineShapeRelation','_configService','toPrimitive','getShapeType','params','@univerjs-pro/sheets-shape','stringify','33GoKvHy','20425880snmhfF','decorate','_initSnapshot','CommandType','Module','shapeId','Disposable','IResourceManagerService','exports','_ensureShapeModelManager','fromJSON','defineProperty','default','clear','UniverProLicense','isLineShape','_groupIds','shapeData','from','getBasicShapeType','ICommandService','removeShape','79408oPnRmT','2813624hfxroe','call','sheet.mutation.insert-shape','object','pluginName','34872cjUpho','hasShape','_disposed','IUndoRedoService','1770abKcWd','parse','packageName','toJSON','_commandService','every','version','add','1044SvVhrY','setShapeData','getOwnPropertyDescriptor','setConfig','Injector','_linesIds','onRendered','isConnectorShape','sheet.mutation.remove-shape','iterator'];_0x5e47=function(){return _0x45b54c;};return _0x5e47();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/sheets-shape",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "shape for Univer.",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -53,15 +53,15 @@
|
|
|
53
53
|
"npm": ">=8.0.0"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@univerjs-pro/engine-shape": "0.
|
|
57
|
-
"@univerjs/
|
|
58
|
-
"@univerjs
|
|
56
|
+
"@univerjs-pro/engine-shape": "0.19.0",
|
|
57
|
+
"@univerjs-pro/license": "0.19.0",
|
|
58
|
+
"@univerjs/core": "0.19.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"typescript": "^
|
|
62
|
-
"vitest": "^4.1.
|
|
63
|
-
"@univerjs/
|
|
64
|
-
"@univerjs
|
|
61
|
+
"typescript": "^6.0.2",
|
|
62
|
+
"vitest": "^4.1.1",
|
|
63
|
+
"@univerjs-infra/shared": "0.19.0",
|
|
64
|
+
"@univerjs/sheets": "0.19.0"
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|
|
67
67
|
"test": "vitest run",
|