@univerjs-pro/live-share 0.22.1 → 0.23.0-insiders.20260522-e8f2a3b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +13 -13
package/lib/cjs/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function _0x4dfb(_0x1ddd9d,_0x3f82d0){_0x1ddd9d=_0x1ddd9d-0x157;const _0x2a1d63=_0x2a1d();let _0x4dfb8d=_0x2a1d63[_0x1ddd9d];return _0x4dfb8d;}const _0x8daa8c=_0x4dfb;(function(_0x28ec9b,_0x30b8fe){const _0x2430cc=_0x4dfb,_0x19c050=_0x28ec9b();while(!![]){try{const _0x12c9b5=-parseInt(_0x2430cc(0x164))/0x1*(-parseInt(_0x2430cc(0x175))/0x2)+parseInt(_0x2430cc(0x17d))/0x3*(parseInt(_0x2430cc(0x162))/0x4)+-parseInt(_0x2430cc(0x15f))/0x5*(parseInt(_0x2430cc(0x167))/0x6)+-parseInt(_0x2430cc(0x186))/0x7*(-parseInt(_0x2430cc(0x166))/0x8)+parseInt(_0x2430cc(0x174))/0x9+parseInt(_0x2430cc(0x17a))/0xa+-parseInt(_0x2430cc(0x15d))/0xb*(parseInt(_0x2430cc(0x16d))/0xc);if(_0x12c9b5===_0x30b8fe)break;else _0x19c050['push'](_0x19c050['shift']());}catch(_0x13bf58){_0x19c050['push'](_0x19c050['shift']());}}}(_0x2a1d,0xeee4d));let e=require(`@univerjs-pro/live-share`),t=require(`@univerjs/core`),n=require(`@univerjs/core/facade`);function r(_0x4a55f0){'@babel/helpers - typeof';const _0x320f20=_0x4dfb;return r=typeof Symbol==_0x320f20(0x182)&&typeof Symbol[_0x320f20(0x160)]==_0x320f20(0x16b)?function(_0x49952e){return typeof _0x49952e;}:function(_0x4cf0e6){const _0x89577a=_0x320f20;return _0x4cf0e6&&typeof Symbol==_0x89577a(0x182)&&_0x4cf0e6[_0x89577a(0x176)]===Symbol&&_0x4cf0e6!==Symbol[_0x89577a(0x168)]?'symbol':typeof _0x4cf0e6;},r(_0x4a55f0);}function i(_0x2a78ca,_0x37892a){const _0x30ddd1=_0x4dfb;if(r(_0x2a78ca)!=_0x30ddd1(0x183)||!_0x2a78ca)return _0x2a78ca;var _0x1f623e=_0x2a78ca[Symbol['toPrimitive']];if(_0x1f623e!==void 0x0){var _0x4e6d20=_0x1f623e[_0x30ddd1(0x15e)](_0x2a78ca,_0x37892a||_0x30ddd1(0x15a));if(r(_0x4e6d20)!=_0x30ddd1(0x183))return _0x4e6d20;throw TypeError(_0x30ddd1(0x181));}return(_0x37892a===_0x30ddd1(0x177)?String:Number)(_0x2a78ca);}function a(_0x4d47a8){const _0x32d16d=_0x4dfb;var _0x12a5ed=i(_0x4d47a8,_0x32d16d(0x177));return r(_0x12a5ed)=='symbol'?_0x12a5ed:_0x12a5ed+'';}function o(_0x59957e,_0x3cdd9d,_0x2397e7){const _0x31567e=_0x4dfb;return(_0x3cdd9d=a(_0x3cdd9d))in _0x59957e?Object[_0x31567e(0x178)](_0x59957e,_0x3cdd9d,{'value':_0x2397e7,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x59957e[_0x3cdd9d]=_0x2397e7,_0x59957e;}var s=class extends n[_0x8daa8c(0x159)]{constructor(..._0x200261){const _0x483c45=_0x8daa8c;super(..._0x200261),o(this,_0x483c45(0x17b),void 0x0);}['_initialize'](_0x11b9cc){const _0x21e1cd=_0x8daa8c;this[_0x21e1cd(0x17b)]=_0x11b9cc['get'](e[_0x21e1cd(0x184)]);}[_0x8daa8c(0x15b)](){const _0x2efac9=_0x8daa8c;var _0x2e7ab7;let _0x4634fa=this[_0x2efac9(0x17c)][_0x2efac9(0x179)](t[_0x2efac9(0x16f)])[_0x2efac9(0x16a)](t[_0x2efac9(0x171)][_0x2efac9(0x172)]);if(!_0x4634fa)throw Error(_0x2efac9(0x158));let _0xe1469f=_0x4634fa[_0x2efac9(0x17f)](),_0x35ce99=this[_0x2efac9(0x17b)][_0x2efac9(0x157)](_0xe1469f);return(_0x2e7ab7=_0x35ce99==null?void 0x0:_0x35ce99[_0x2efac9(0x17e)]())==null?e[_0x2efac9(0x16e)][_0x2efac9(0x169)]:_0x2e7ab7;}[_0x8daa8c(0x161)](){const _0x160959=_0x8daa8c;let _0x2cacb5=this['_injector'][_0x160959(0x179)](t[_0x160959(0x16f)])[_0x160959(0x16a)](t[_0x160959(0x171)][_0x160959(0x172)]);if(!_0x2cacb5)throw Error('No\x20active\x20workbook\x20found.');let _0x18b64a=_0x2cacb5[_0x160959(0x17f)](),_0xab6bc1=this[_0x160959(0x17b)]['getLiveShareCoordinatorSync'](_0x18b64a);if(!_0xab6bc1)throw Error(_0x160959(0x15c));_0xab6bc1[_0x160959(0x161)]();}[_0x8daa8c(0x170)](){const _0x43b4ff=_0x8daa8c;let _0x155681=this[_0x43b4ff(0x17c)][_0x43b4ff(0x179)](t[_0x43b4ff(0x16f)])['getCurrentUnitOfType'](t[_0x43b4ff(0x171)]['UNIVER_SHEET']);if(!_0x155681)throw Error('No\x20active\x20workbook\x20found.');let _0x23b7ff=_0x155681[_0x43b4ff(0x17f)](),_0x43910e=this[_0x43b4ff(0x17b)]['getLiveShareCoordinatorSync'](_0x23b7ff);if(!_0x43910e)throw Error(_0x43b4ff(0x15c));_0x43910e[_0x43b4ff(0x170)]();}[_0x8daa8c(0x16c)](){const _0x54f5dd=_0x8daa8c;let _0x5239e4=this[_0x54f5dd(0x17c)]['get'](t[_0x54f5dd(0x16f)])['getCurrentUnitOfType'](t['UniverInstanceType'][_0x54f5dd(0x172)]);if(!_0x5239e4)throw Error('No\x20active\x20workbook\x20found.');let _0x2710bd=_0x5239e4[_0x54f5dd(0x17f)](),_0x2a05a6=this['_liveShareController'][_0x54f5dd(0x157)](_0x2710bd);if(!_0x2a05a6)throw Error(_0x54f5dd(0x15c));_0x2a05a6[_0x54f5dd(0x163)]();}[_0x8daa8c(0x180)](){const _0x51f73c=_0x8daa8c;let _0x331e73=this[_0x51f73c(0x17c)][_0x51f73c(0x179)](t[_0x51f73c(0x16f)])[_0x51f73c(0x16a)](t[_0x51f73c(0x171)]['UNIVER_SHEET']);if(!_0x331e73)throw Error(_0x51f73c(0x158));let _0x1e0b8f=_0x331e73['getUnitId'](),_0x293462=this[_0x51f73c(0x17b)][_0x51f73c(0x157)](_0x1e0b8f);if(!_0x293462)throw Error(_0x51f73c(0x15c));_0x293462[_0x51f73c(0x180)]();}};function _0x2a1d(){const _0x5b5040=['startPresenting','12ttbQOX','LiveShareStatus','IUniverInstanceService','stopFollowing','UniverInstanceType','UNIVER_SHEET','extend','9919521AwIdgU','64502wMNwXD','constructor','string','defineProperty','get','1371100eWAShi','_liveShareController','_injector','15mLkeBG','getStatus','getUnitId','stopPresenting','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','function','object','LiveShareController','FEnum','7191219JnVAsW','getLiveShareCoordinatorSync','No\x20active\x20workbook\x20found.','FUniver','default','getLiveShareStatus','No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.','21264947pbuTsq','call','5030YtdbsV','iterator','startFollowing','562616OrfRSb','tryStartPresenting','54FMLIjh','LiveShareStatusEnum','8RzDAkU','10734rUBQMv','prototype','IDLE','getCurrentUnitOfType','symbol'];_0x2a1d=function(){return _0x5b5040;};return _0x2a1d();}n[_0x8daa8c(0x159)]['extend'](s);var c=class extends n[_0x8daa8c(0x185)]{get[_0x8daa8c(0x165)](){const _0x2398f0=_0x8daa8c;return e[_0x2398f0(0x16e)];}};n[_0x8daa8c(0x185)][_0x8daa8c(0x173)](c);
|
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xe3eeb7=_0x5543;(function(_0x5a316a,_0xde6b57){const _0x38f6f9=_0x5543,_0x5ce3f0=_0x5a316a();while(!![]){try{const _0x1eb4a5=-parseInt(_0x38f6f9(0x105))/0x1*(-parseInt(_0x38f6f9(0x11b))/0x2)+parseInt(_0x38f6f9(0x9d))/0x3+-parseInt(_0x38f6f9(0xe3))/0x4*(-parseInt(_0x38f6f9(0x7c))/0x5)+parseInt(_0x38f6f9(0x12b))/0x6*(parseInt(_0x38f6f9(0xbf))/0x7)+parseInt(_0x38f6f9(0x124))/0x8*(parseInt(_0x38f6f9(0xb2))/0x9)+-parseInt(_0x38f6f9(0xff))/0xa*(parseInt(_0x38f6f9(0x122))/0xb)+parseInt(_0x38f6f9(0x73))/0xc*(-parseInt(_0x38f6f9(0x10b))/0xd);if(_0x1eb4a5===_0xde6b57)break;else _0x5ce3f0['push'](_0x5ce3f0['shift']());}catch(_0x58f587){_0x5ce3f0['push'](_0x5ce3f0['shift']());}}}(_0x1cd4,0x83895),Object[_0xe3eeb7(0x10c)](exports,Symbol['toStringTag'],{'value':_0xe3eeb7(0x91)}));let _univerjs_core=require('@univerjs/core'),_univerjs_ui=require('@univerjs/ui'),_univerjs_design=require('@univerjs/design'),_univerjs_icons=require('@univerjs/icons'),react=require('react'),_univerjs_pro_collaboration=require('@univerjs-pro/collaboration'),_univerjs_pro_collaboration_client=require('@univerjs-pro/collaboration-client'),_univerjs_sheets=require('@univerjs/sheets'),rxjs=require('rxjs'),rxjs_operators=require('rxjs/operators'),react_jsx_runtime=require('react/jsx-runtime'),_univerjs_sheets_ui=require('@univerjs/sheets-ui');function _typeof(_0x4b8295){'@babel/helpers - typeof';const _0x3a1641=_0xe3eeb7;return _typeof=_0x3a1641(0xbd)==typeof Symbol&&_0x3a1641(0x94)==typeof Symbol[_0x3a1641(0x9b)]?function(_0x452362){return typeof _0x452362;}:function(_0x2fb376){const _0x5ec810=_0x3a1641;return _0x2fb376&&_0x5ec810(0xbd)==typeof Symbol&&_0x2fb376[_0x5ec810(0xa8)]===Symbol&&_0x2fb376!==Symbol[_0x5ec810(0x102)]?'symbol':typeof _0x2fb376;},_typeof(_0x4b8295);}function toPrimitive(_0x3b7c4a,_0x3455aa){const _0x3381c6=_0xe3eeb7;if(_0x3381c6(0xd5)!=_typeof(_0x3b7c4a)||!_0x3b7c4a)return _0x3b7c4a;var _0x27a4ec=_0x3b7c4a[Symbol['toPrimitive']];if(void 0x0!==_0x27a4ec){var _0x15fce8=_0x27a4ec[_0x3381c6(0xf5)](_0x3b7c4a,_0x3455aa||_0x3381c6(0x8e));if(_0x3381c6(0xd5)!=_typeof(_0x15fce8))return _0x15fce8;throw new TypeError(_0x3381c6(0xdd));}return(_0x3381c6(0x88)===_0x3455aa?String:Number)(_0x3b7c4a);}function toPropertyKey(_0x4f5500){const _0x5a6af7=_0xe3eeb7;var _0x29d6e2=toPrimitive(_0x4f5500,'string');return _0x5a6af7(0x94)==_typeof(_0x29d6e2)?_0x29d6e2:_0x29d6e2+'';}function _defineProperty(_0x57757a,_0x154b81,_0x22702f){const _0x415b0a=_0xe3eeb7;return(_0x154b81=toPropertyKey(_0x154b81))in _0x57757a?Object[_0x415b0a(0x10c)](_0x57757a,_0x154b81,{'value':_0x22702f,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x57757a[_0x154b81]=_0x22702f,_0x57757a;}var LiveShareService=class extends _univerjs_core[_0xe3eeb7(0x85)]{constructor(..._0x1cabd6){const _0x1c6b4e=_0xe3eeb7;super(..._0x1cabd6),_defineProperty(this,'_sharedOperations',new Set()),_defineProperty(this,_0x1c6b4e(0xde),new Set());}[_0xe3eeb7(0xb1)](_0x276b6b){const _0x21db79=_0xe3eeb7;return this[_0x21db79(0x8a)][_0x21db79(0x6d)](_0x276b6b),(0x0,_univerjs_core['toDisposable'])(()=>this[_0x21db79(0x8a)][_0x21db79(0xc1)](_0x276b6b));}[_0xe3eeb7(0xd9)](_0x3fd418){const _0x4c3bb3=_0xe3eeb7;return this['_reporters'][_0x4c3bb3(0x6d)](_0x3fd418),(0x0,_univerjs_core['toDisposable'])(()=>this['_reporters'][_0x4c3bb3(0xc1)](_0x3fd418));}[_0xe3eeb7(0x87)](_0x26e1e0){const _0x3a5308=_0xe3eeb7;return this[_0x3a5308(0x8a)][_0x3a5308(0xe9)](_0x26e1e0);}[_0xe3eeb7(0xbb)](_0x216024){const _0x536a11=_0xe3eeb7;return Array['from'](this[_0x536a11(0xde)])[_0x536a11(0xce)](_0x65b0ce=>_0x65b0ce(_0x216024));}};function __decorateParam(_0x31abe2,_0x1e1e6d){return function(_0x298410,_0x1ca876){_0x1e1e6d(_0x298410,_0x1ca876,_0x31abe2);};}function __decorate(_0x1840a2,_0x4b5f5e,_0x3b2435,_0x365e28){const _0x3642cd=_0xe3eeb7;var _0x15dcdf=arguments[_0x3642cd(0x6c)],_0x258331=_0x15dcdf<0x3?_0x4b5f5e:_0x365e28===null?_0x365e28=Object[_0x3642cd(0xf2)](_0x4b5f5e,_0x3b2435):_0x365e28,_0x152ff7;if(typeof Reflect===_0x3642cd(0xd5)&&typeof Reflect[_0x3642cd(0x81)]==='function')_0x258331=Reflect[_0x3642cd(0x81)](_0x1840a2,_0x4b5f5e,_0x3b2435,_0x365e28);else{for(var _0x10e01d=_0x1840a2[_0x3642cd(0x6c)]-0x1;_0x10e01d>=0x0;_0x10e01d--)if(_0x152ff7=_0x1840a2[_0x10e01d])_0x258331=(_0x15dcdf<0x3?_0x152ff7(_0x258331):_0x15dcdf>0x3?_0x152ff7(_0x4b5f5e,_0x3b2435,_0x258331):_0x152ff7(_0x4b5f5e,_0x3b2435))||_0x258331;}return _0x15dcdf>0x3&&_0x258331&&Object[_0x3642cd(0x10c)](_0x4b5f5e,_0x3b2435,_0x258331),_0x258331;}function _0x5543(_0x1f3a27,_0x83ab79){_0x1f3a27=_0x1f3a27-0x68;const _0x1cd411=_0x1cd4();let _0x5543ca=_0x1cd411[_0x1f3a27];return _0x5543ca;}let LiveShareController=class LiveShareController extends _univerjs_core[_0xe3eeb7(0x6f)]{constructor(_0x471970,_0x4065ee,_0x548881){const _0x42b2d8=_0xe3eeb7;super(),this[_0x42b2d8(0xb0)]=_0x471970,this[_0x42b2d8(0xa3)]=_0x4065ee,this[_0x42b2d8(0x86)]=_0x548881,_defineProperty(this,'_entities',new Map()),this['_init']();}async[_0xe3eeb7(0x7f)](_0x2fba91){const _0x2927cf=_0xe3eeb7;if(!this[_0x2927cf(0xba)][_0x2927cf(0xe9)](_0x2fba91))await this['_startLiveShareCoordinator'](_0x2fba91);return this[_0x2927cf(0xba)][_0x2927cf(0x127)](_0x2fba91);}[_0xe3eeb7(0xe6)](_0x4688b4){const _0x2736f1=_0xe3eeb7;var _0x521038;return(_0x521038=this[_0x2736f1(0xba)][_0x2736f1(0x127)](_0x4688b4))!==null&&_0x521038!==void 0x0?_0x521038:null;}[_0xe3eeb7(0xb8)](){const _0x4c0d8b=_0xe3eeb7;this[_0x4c0d8b(0xb0)][_0x4c0d8b(0xfc)](_univerjs_core[_0x4c0d8b(0x8f)][_0x4c0d8b(0x7d)])[_0x4c0d8b(0x74)]((0x0,rxjs_operators[_0x4c0d8b(0xf4)])(this[_0x4c0d8b(0x89)]))[_0x4c0d8b(0xac)](async _0x3bc524=>{const _0x46f540=_0x4c0d8b,_0x1149eb=_0x3bc524[_0x46f540(0xcc)][_0x46f540(0x6b)]();if(this[_0x46f540(0xba)][_0x46f540(0xe9)](_0x1149eb))return;this['_startLiveShareCoordinator'](_0x1149eb);}),this[_0x4c0d8b(0xb0)]['getTypeOfUnitDisposed$'](_univerjs_core[_0x4c0d8b(0x8f)]['UNIVER_SHEET'])[_0x4c0d8b(0x74)]((0x0,rxjs_operators[_0x4c0d8b(0xf4)])(this[_0x4c0d8b(0x89)]))[_0x4c0d8b(0xac)](_0x5347cc=>{const _0x702a79=_0x4c0d8b,_0x2e692d=_0x5347cc['getUnitId'](),_0x4a9a2b=this[_0x702a79(0xba)][_0x702a79(0x127)](_0x2e692d);_0x4a9a2b===null||_0x4a9a2b===void 0x0||_0x4a9a2b[_0x702a79(0xc7)]();});}async[_0xe3eeb7(0x107)](_0x2e7487){const _0x138493=_0xe3eeb7,_0x54d8ea=await this[_0x138493(0x86)][_0x138493(0x100)](_0x2e7487),_0x5458f5=this['_injector'][_0x138493(0xf8)](LiveShareCoordinator,_0x2e7487,_0x54d8ea);return _0x5458f5[_0x138493(0xa6)](),this[_0x138493(0xba)][_0x138493(0xfd)](_0x2e7487,_0x5458f5),_0x5458f5;}};LiveShareController=__decorate([__decorateParam(0x0,_univerjs_core['IUniverInstanceService']),__decorateParam(0x1,(0x0,_univerjs_core[_0xe3eeb7(0xad)])(_univerjs_core[_0xe3eeb7(0xe8)])),__decorateParam(0x2,(0x0,_univerjs_core[_0xe3eeb7(0xad)])(_univerjs_pro_collaboration_client['CollaborationSessionService']))],LiveShareController);let LiveShareStatus=function(_0x352236){const _0x2c8d80=_0xe3eeb7;return _0x352236[_0x2c8d80(0xda)]=_0x2c8d80(0xea),_0x352236[_0x2c8d80(0xcd)]='idle',_0x352236[_0x2c8d80(0xec)]=_0x2c8d80(0x75),_0x352236[_0x2c8d80(0xcf)]=_0x2c8d80(0xe7),_0x352236[_0x2c8d80(0x9e)]='presenting',_0x352236;}({});const SAME_OPERATION_SHARE_INTERVAL_KEY=_0xe3eeb7(0x108),DEFAULT_SAME_OPERATION_SHARE_INTERVAL=0xc8;let LiveShareCoordinator=class LiveShareCoordinator extends _univerjs_core[_0xe3eeb7(0x6f)]{get['_status'](){const _0x1a47dd=_0xe3eeb7;return this[_0x1a47dd(0x109)]['getValue']();}constructor(_0x18b0e5,_0x45f893,_0x3b8248,_0x402f8d,_0x42bea2){const _0x525ed6=_0xe3eeb7;super(),this['_unitID']=_0x18b0e5,this[_0x525ed6(0xb7)]=_0x45f893,this[_0x525ed6(0x7a)]=_0x3b8248,this[_0x525ed6(0xfa)]=_0x402f8d,this[_0x525ed6(0x9a)]=_0x42bea2,_defineProperty(this,'_status$',new rxjs['BehaviorSubject'](_0x525ed6(0x9c))),_defineProperty(this,_0x525ed6(0xfe),this[_0x525ed6(0x109)]['asObservable']()),_defineProperty(this,_0x525ed6(0xb8),![]),_defineProperty(this,_0x525ed6(0xa4),null),_defineProperty(this,_0x525ed6(0xdc),null);}['dispose'](){const _0x14ca08=_0xe3eeb7;var _0x43f559;(_0x43f559=this[_0x14ca08(0xa4)])===null||_0x43f559===void 0x0||_0x43f559[_0x14ca08(0xc7)](),this['_status$'][_0x14ca08(0x8c)](_0x14ca08(0x9c)),this[_0x14ca08(0x109)][_0x14ca08(0x10f)]();}[_0xe3eeb7(0xdf)](){return this['_status'];}[_0xe3eeb7(0xa6)](){const _0x4fe7e6=_0xe3eeb7;if(this[_0x4fe7e6(0xb8)])return;this[_0x4fe7e6(0xb8)]=!![],this[_0x4fe7e6(0xb7)]['sessionStatus$'][_0x4fe7e6(0x74)]((0x0,rxjs_operators[_0x4fe7e6(0xf4)])(this['dispose$']))[_0x4fe7e6(0xac)](_0x42cbbf=>{const _0x4ae044=_0x4fe7e6;switch(_0x42cbbf){case _univerjs_pro_collaboration_client[_0x4ae044(0xa0)][_0x4ae044(0xda)]:this[_0x4ae044(0x11c)]();break;case _univerjs_pro_collaboration_client['SessionStatus'][_0x4ae044(0x97)]:this['_handleOnline']();break;default:}}),this[_0x4fe7e6(0xb7)][_0x4fe7e6(0x118)][_0x4fe7e6(0x74)]((0x0,rxjs_operators[_0x4fe7e6(0xf4)])(this[_0x4fe7e6(0x89)]))[_0x4fe7e6(0xac)](_0x4dbdcf=>{const _0x3043c3=_0x4fe7e6,{eventID:_0x50c49b}=_0x4dbdcf;switch(_0x50c49b){case _univerjs_pro_collaboration['CollaborationEvent'][_0x3043c3(0x79)]:this[_0x3043c3(0xfb)](_0x4dbdcf);break;case _univerjs_pro_collaboration[_0x3043c3(0x76)][_0x3043c3(0x92)]:this['_handleOperation'](_0x4dbdcf);break;case _univerjs_pro_collaboration['CollaborationEvent'][_0x3043c3(0x71)]:this[_0x3043c3(0x117)]();break;case _univerjs_pro_collaboration['CollaborationEvent'][_0x3043c3(0x114)]:this[_0x3043c3(0x119)](_0x4dbdcf);break;default:}});}[_0xe3eeb7(0x96)](){const _0x5f5b5e=_0xe3eeb7;this[_0x5f5b5e(0xb7)][_0x5f5b5e(0x10a)]({'eventID':_univerjs_pro_collaboration[_0x5f5b5e(0x76)][_0x5f5b5e(0x11e)],'data':{'unitID':this['_unitID'],'userID':this['_collabSession']['getMemberID']()}},this[_0x5f5b5e(0x12c)]);}[_0xe3eeb7(0xc8)](){const _0x56615c=_0xe3eeb7;this[_0x56615c(0xb3)]===_0x56615c(0x12a)&&(this[_0x56615c(0x109)][_0x56615c(0x8c)](_0x56615c(0x9c)),this['_collabSession'][_0x56615c(0x10a)]({'eventID':_univerjs_pro_collaboration[_0x56615c(0x76)]['LIVESHARE_TERMINATE'],'data':{'unitID':this[_0x56615c(0x12c)]}},this[_0x56615c(0x12c)]));}[_0xe3eeb7(0x129)](){const _0x3cc055=_0xe3eeb7;if(this[_0x3cc055(0xb3)]!=='not-following')return;this[_0x3cc055(0x109)]['next']('following'),this[_0x3cc055(0x68)]();}[_0xe3eeb7(0x128)](){const _0x228714=_0xe3eeb7;if(this[_0x228714(0xb3)]!==_0x228714(0x75))return;this['_stopFollowing']();}[_0xe3eeb7(0xfb)](_0x519f59){const _0x14f427=_0xe3eeb7,{presenter:_0x2e6f9d}=_0x519f59[_0x14f427(0xc9)],_0x5c0283=this[_0x14f427(0xb7)][_0x14f427(0x120)]();this[_0x14f427(0xdc)]=_0x2e6f9d;if(_0x2e6f9d===_0x5c0283)this[_0x14f427(0x11f)](),this[_0x14f427(0xca)]();else this['_status']!==_0x14f427(0xe7)&&(this[_0x14f427(0x80)](),this[_0x14f427(0x68)]());}[_0xe3eeb7(0xa1)](){const _0x2b145b=_0xe3eeb7,_0x23574d={'eventID':_univerjs_pro_collaboration[_0x2b145b(0x76)][_0x2b145b(0x103)]};this['_collabSession']['send'](_0x23574d,this[_0x2b145b(0x12c)]);}['_handleTerminate'](){const _0x294907=_0xe3eeb7;this[_0x294907(0xdc)]=null;if(this['_status']!==_0x294907(0x12a))this['_beIdle']();}[_0xe3eeb7(0x119)](_0x52d002){const _0x4dedda=_0xe3eeb7;if(this['_status']===_0x4dedda(0x75)&&this['_presenter']===_0x52d002['data'][_0x4dedda(0xf0)]){const _0x3c3eca=(0x0,_univerjs_pro_collaboration['parseProtocolChangeset'])(_0x52d002[_0x4dedda(0xc9)])[_0x4dedda(0x111)]['reverse']()[_0x4dedda(0xef)](_0x3e5ba2=>_0x3e5ba2['id']===_univerjs_sheets['InsertSheetMutation']['id']);if(_0x3c3eca){const _0x3f37d9=_0x3c3eca[_0x4dedda(0xf1)][_0x4dedda(0x70)],_0x4e1929=_0x3c3eca[_0x4dedda(0xf1)][_0x4dedda(0xf6)]['id'];setTimeout(()=>{const _0x27e00c=_0x4dedda;this[_0x27e00c(0x9a)]['executeCommand'](_univerjs_sheets[_0x27e00c(0x126)]['id'],{'unitId':_0x3f37d9,'subUnitId':_0x4e1929},{'fromCollab':!![]});});}}}[_0xe3eeb7(0xca)](){const _0x53b7aa=_0xe3eeb7;this[_0x53b7aa(0x109)][_0x53b7aa(0x8c)](_0x53b7aa(0x12a));const _0x54ec2e=new Map(),_0x2a1255=this[_0x53b7aa(0xa4)]=new _univerjs_core[(_0x53b7aa(0xa9))]();_0x2a1255['add']((0x0,_univerjs_core[_0x53b7aa(0xe4)])(()=>{const _0x17a085=_0x53b7aa;_0x54ec2e[_0x17a085(0xc6)](_0x3d924b=>_0x3d924b[_0x17a085(0x10f)]()),_0x54ec2e[_0x17a085(0x8d)]();})),_0x2a1255['add'](this[_0x53b7aa(0x9a)][_0x53b7aa(0xc2)](_0x370e57=>{const _0x6d366d=_0x53b7aa;if(_0x370e57[_0x6d366d(0xf3)]!==_univerjs_core['CommandType']['OPERATION']||!this[_0x6d366d(0xfa)]['shouldShareOperation'](_0x370e57['id']))return;const {id:_0x262ddf}=_0x370e57;let _0x404c00;if(!_0x54ec2e[_0x6d366d(0xe9)](_0x262ddf)){var _0x2f9787;_0x404c00=new rxjs[(_0x6d366d(0xe0))](),_0x54ec2e[_0x6d366d(0xfd)](_0x262ddf,_0x404c00),_0x404c00[_0x6d366d(0x74)]((0x0,rxjs_operators['throttleTime'])((_0x2f9787=this[_0x6d366d(0x7a)][_0x6d366d(0xc0)](_0x6d366d(0x108)))!==null&&_0x2f9787!==void 0x0?_0x2f9787:DEFAULT_SAME_OPERATION_SHARE_INTERVAL,void 0x0,{'trailing':!![],'leading':!![]}))[_0x6d366d(0xac)](_0x451a87=>{const _0xa88d80=_0x6d366d;this[_0xa88d80(0xb7)][_0xa88d80(0x10a)]({'eventID':_univerjs_pro_collaboration[_0xa88d80(0x76)][_0xa88d80(0x92)],'data':{'unitID':this['_unitID'],'operations':{[_0x451a87['id']]:{'id':_0x451a87['id'],'params':JSON[_0xa88d80(0x121)](_0x451a87[_0xa88d80(0xf1)])}}}},this[_0xa88d80(0x12c)]);});}else _0x404c00=_0x54ec2e['get'](_0x262ddf);_0x404c00[_0x6d366d(0x8c)](_0x370e57);})),this['_liveShareService'][_0x53b7aa(0xbb)](this[_0x53b7aa(0x12c)])[_0x53b7aa(0xc6)](_0xaff352=>this[_0x53b7aa(0xb7)][_0x53b7aa(0x10a)]({'eventID':_univerjs_pro_collaboration[_0x53b7aa(0x76)][_0x53b7aa(0x92)],'data':{'unitID':this[_0x53b7aa(0x12c)],'operations':{[_0xaff352['id']]:{'id':_0xaff352['id'],'params':JSON['stringify'](_0xaff352[_0x53b7aa(0xf1)])}}}},this[_0x53b7aa(0x12c)]));}['_stopPresenting'](){const _0x3e5304=_0xe3eeb7;var _0x33c857;this[_0x3e5304(0x109)]['next'](_0x3e5304(0x9c)),(_0x33c857=this[_0x3e5304(0xa4)])===null||_0x33c857===void 0x0||_0x33c857[_0x3e5304(0xc7)](),this[_0x3e5304(0xa4)]=null;}[_0xe3eeb7(0x68)](){const _0x47c7bf=_0xe3eeb7;var _0x1808b9;(_0x1808b9=this[_0x47c7bf(0xa4)])===null||_0x1808b9===void 0x0||_0x1808b9['dispose'](),this['_status$']['next']('following');}['_beIdle'](){const _0x98091a=_0xe3eeb7;var _0x3f2d86;this['_status$']['next'](_0x98091a(0x9c)),(_0x3f2d86=this[_0x98091a(0xa4)])===null||_0x3f2d86===void 0x0||_0x3f2d86['dispose'](),this[_0x98091a(0xa4)]=null;}[_0xe3eeb7(0x11f)](){const _0x44cd43=_0xe3eeb7;var _0x158375;this[_0x44cd43(0x109)][_0x44cd43(0x8c)](_0x44cd43(0xe7)),(_0x158375=this[_0x44cd43(0xa4)])===null||_0x158375===void 0x0||_0x158375[_0x44cd43(0xc7)]();}['_handleOperation'](_0x1ee5a8){const _0x2a311b=_0xe3eeb7;if(['presenting',_0x2a311b(0xe7),_0x2a311b(0xea)]['includes'](this[_0x2a311b(0xb3)]))return;if(!_0x1ee5a8[_0x2a311b(0xc9)]['presenter']||_0x1ee5a8[_0x2a311b(0xc9)][_0x2a311b(0xdb)]===this[_0x2a311b(0xb7)][_0x2a311b(0x120)]())return;if(this['_status']===_0x2a311b(0x9c))this[_0x2a311b(0x68)]();const _0x581628=_0x1ee5a8[_0x2a311b(0xc9)][_0x2a311b(0xae)];Object[_0x2a311b(0xbc)](_0x581628)[_0x2a311b(0xc6)](_0x349888=>{const _0x37209e=_0x2a311b;this[_0x37209e(0x9a)][_0x37209e(0xaa)](_0x349888['id'],_0x349888[_0x37209e(0xf1)]?JSON[_0x37209e(0x112)](_0x349888['params']):null,{'fromCollab':!![]});});}[_0xe3eeb7(0x11c)](){const _0x891848=_0xe3eeb7;var _0x2ea55b;this['_status$'][_0x891848(0x8c)](_0x891848(0xea)),(_0x2ea55b=this[_0x891848(0xa4)])===null||_0x2ea55b===void 0x0||_0x2ea55b[_0x891848(0xc7)]();}[_0xe3eeb7(0x8b)](){const _0x22e37c=_0xe3eeb7;this[_0x22e37c(0x109)]['next'](_0x22e37c(0x9c)),this[_0x22e37c(0xa1)]();}};LiveShareCoordinator=__decorate([__decorateParam(0x2,_univerjs_core[_0xe3eeb7(0x72)]),__decorateParam(0x3,(0x0,_univerjs_core['Inject'])(LiveShareService)),__decorateParam(0x4,_univerjs_core['ICommandService'])],LiveShareCoordinator);function LiveShare(){const _0x3a9363=_0xe3eeb7,_0x571d0d=(0x0,_univerjs_ui['useDependency'])(LiveShareController),_0xa44256=(0x0,_univerjs_ui[_0x3a9363(0x11a)])(_univerjs_core['IUniverInstanceService']),_0x33e47d=(0x0,_univerjs_ui[_0x3a9363(0x116)])(()=>_0xa44256[_0x3a9363(0xd3)](_univerjs_core['UniverInstanceType'][_0x3a9363(0x7d)]),void 0x0,![],[]),[_0x4d49e8,_0x59fdb8]=(0x0,react['useState'])(null),[_0x890f46,_0x2d9c45]=(0x0,react['useState'])(_0x3a9363(0x9c)),_0x65bfd5=(0x0,react[_0x3a9363(0xc3)])(null);(0x0,react['useEffect'])(()=>{const _0x554937=_0x3a9363;if(_0x33e47d)_0x571d0d['getLiveShareCoordinator'](_0x33e47d[_0x554937(0x6b)]())[_0x554937(0x11d)](_0x3f1174=>{const _0x4f2d8d=_0x554937;_0x59fdb8(_0x3f1174),_0x65bfd5[_0x4f2d8d(0xaf)]=_0x3f1174[_0x4f2d8d(0xfe)][_0x4f2d8d(0xac)](_0x190210=>{_0x2d9c45(_0x190210);});});return()=>{const _0x1c2929=_0x554937;var _0x4eceb7;(_0x4eceb7=_0x65bfd5[_0x1c2929(0xaf)])===null||_0x4eceb7===void 0x0||_0x4eceb7[_0x1c2929(0xd4)](),_0x65bfd5[_0x1c2929(0xaf)]=null;};},[_0x33e47d,_0x571d0d]);if(!_0x4d49e8)return null;return(0x0,react_jsx_runtime[_0x3a9363(0xeb)])(_univerjs_design[_0x3a9363(0x93)],{'align':_0x3a9363(0x84),'disabled':_0x890f46==='offline','className':_0x3a9363(0x7b),'overlay':(0x0,react_jsx_runtime[_0x3a9363(0xeb)])(LiveShareDropdown,{'status':_0x890f46,'coordinator':_0x4d49e8}),'children':(0x0,react_jsx_runtime[_0x3a9363(0xeb)])(_0x3a9363(0x78),{'className':(0x0,_univerjs_design[_0x3a9363(0x123)])('univer-border-none\x20univer-text-gray-600\x20univer-outline-none',{'univer-cursor-not-allowed':_0x890f46==='offline','univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x890f46!==_0x3a9363(0xea)}),'type':_0x3a9363(0x78),'children':(0x0,react_jsx_runtime[_0x3a9363(0xeb)])(_univerjs_icons[_0x3a9363(0xb9)],{'className':'univer-size-4'})})});}function LiveShareDropdown(_0x5c4269){const _0x591185=_0xe3eeb7,{status:_0x13e768,coordinator:_0x36d71a}=_0x5c4269;switch(_0x13e768){case _0x591185(0x9c):return(0x0,react_jsx_runtime[_0x591185(0xeb)])(Idle,{'coordinator':_0x36d71a});case _0x591185(0x75):return(0x0,react_jsx_runtime[_0x591185(0xeb)])(Following,{'coordinator':_0x36d71a});case _0x591185(0xe7):return(0x0,react_jsx_runtime[_0x591185(0xeb)])(NotFollowing,{'coordinator':_0x36d71a});case'offline':return(0x0,react_jsx_runtime[_0x591185(0xeb)])(Offline,{});case _0x591185(0x12a):return(0x0,react_jsx_runtime['jsx'])(Presenting,{'coordinator':_0x36d71a});default:return null;}}function Idle(_0xeb9666){const _0xe4e9cf=_0xe3eeb7,{coordinator:_0x26a2e0}=_0xeb9666;return(0x0,react_jsx_runtime[_0xe4e9cf(0xee)])(react_jsx_runtime[_0xe4e9cf(0x69)],{'children':[(0x0,react_jsx_runtime[_0xe4e9cf(0xeb)])(_0xe4e9cf(0x106),{'className':_0xe4e9cf(0xed),'children':_0xe4e9cf(0x98)}),(0x0,react_jsx_runtime[_0xe4e9cf(0xeb)])(_univerjs_design[_0xe4e9cf(0xd7)],{'onClick':()=>_0x26a2e0['tryStartPresenting'](),'children':_0xe4e9cf(0x101)})]});}function Following(_0x3b808c){const _0x3632d5=_0xe3eeb7,{coordinator:_0x23a992}=_0x3b808c;return(0x0,react_jsx_runtime[_0x3632d5(0xee)])(react_jsx_runtime[_0x3632d5(0x69)],{'children':[(0x0,react_jsx_runtime[_0x3632d5(0xeb)])(_0x3632d5(0x106),{'className':_0x3632d5(0xed),'children':_0x3632d5(0x90)}),(0x0,react_jsx_runtime['jsx'])(_univerjs_design['Button'],{'onClick':()=>_0x23a992[_0x3632d5(0x128)](),'children':_0x3632d5(0xc5)})]});}function NotFollowing(_0xd119b1){const _0x49a00d=_0xe3eeb7,{coordinator:_0x7ec25b}=_0xd119b1;return(0x0,react_jsx_runtime[_0x49a00d(0xee)])(react_jsx_runtime[_0x49a00d(0x69)],{'children':[(0x0,react_jsx_runtime[_0x49a00d(0xeb)])(_0x49a00d(0x106),{'className':_0x49a00d(0xed),'children':_0x49a00d(0xcb)}),(0x0,react_jsx_runtime['jsx'])(_univerjs_design['Button'],{'variant':_0x49a00d(0xa7),'onClick':()=>_0x7ec25b[_0x49a00d(0x129)](),'children':_0x49a00d(0xd2)})]});}function _0x1cd4(){const _0x5e00d2=['_mountLiveShare','_liveShareService','_handleNewHost','getTypeOfUnitAdded$','set','status$','820860UYmbnL','requireSession','Start','prototype','LIVESHARE_FETCH_OPERATIONS','LiveShareService','3XymrJO','div','_startLiveShareCoordinator','SAME_OPERATION_SHARE_INTERVAL','_status$','send','1750151LqFXDQ','defineProperty','registerComponent','onRendered','complete','live-share.config','mutations','parse','touchDependencies','NEW_CHANGESETS','_uiPartsService','useObservable','_handleTerminate','event$','_handleNewChangeSets','useDependency','583312tNLprF','_handleOffline','then','LIVESHARE_REQUEST_HOST','_stopFollowing','getMemberID','stringify','99tGZXoW','clsx','100952psHkPk','Stop\x20presenting','SetWorksheetActiveOperation','get','stopFollowing','startFollowing','presenting','734610xkAjYU','_unitID','_startFollowing','Fragment','BuiltInUIPart','getUnitId','length','add','LiveShareController','RxDisposable','unitId','LIVESHARE_TERMINATE','IConfigService','24Xpdtas','pipe','following','CollaborationEvent','You\x27re\x20presenting\x20the\x20document','button','LIVESHARE_NEW_HOST','_configService','univer-box-border\x20univer-min-w-60\x20univer-bg-gray-900\x20univer-px-4\x20univer-py-3\x20univer-text-gray-900\x20dark:!univer-bg-white\x20dark:!univer-text-white','2530uOMhxZ','UNIVER_SHEET','UniverLiveSharePlugin','getLiveShareCoordinator','_stopPresenting','decorate','SetZoomRatioOperation','IUIPartsService','end','Disposable','_collabSessionService','shouldShareOperation','string','dispose$','_sharedOperations','_handleOnline','next','clear','default','UniverInstanceType','You\x27re\x20following\x20the\x20presenter','Module','LIVESHARE_OPERATION','Dropdown','symbol','merge','tryStartPresenting','ONLINE','Present\x20this\x20document','connectInjector','_commandService','iterator','idle','246213KqnAMW','PRESENTING','LiveShare','SessionStatus','_fetchOperations','setConfig','_injector','_commandDisposable','UniverCollaborationClientPlugin','init','text','constructor','DisposableCollection','executeCommand','LiveShareStatus','subscribe','Inject','operations','current','_univerInstanceService','registerSharedOperation','63RTeMWG','_status','0.22.1','_config','HEADER_MENU','_collabSession','_init','LiveShareIcon','_entities','getInitialStates','values','function','UNIVER_UNKNOWN','7UuZtXL','getConfig','delete','onCommandExecuted','useRef','override','Stop\x20following','forEach','dispose','stopPresenting','data','_startPresenting','You\x27re\x20not\x20following\x20the\x20presenter','unit','IDLE','map','NOT_FOLLOWING','LiveShareCoordinator','SetScrollOperation','Start\x20following','getCurrentTypeOfUnit$','unsubscribe','object','disposeWithMe','Button','mergeOverrideWithDependencies','registerInitialStateReporter','OFFLINE','presenter','_presenter','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_reporters','getStatus','Subject','registerDependencies','onStarting','2996iOBFMa','toDisposable','DependentOn','getLiveShareCoordinatorSync','not-following','Injector','has','offline','jsx','FOLLOWING','univer-mb-3\x20univer-w-full\x20univer-text-sm','jsxs','find','memberID','params','getOwnPropertyDescriptor','type','takeUntil','call','sheet','packageName','createInstance'];_0x1cd4=function(){return _0x5e00d2;};return _0x1cd4();}function Presenting(_0x5d8b01){const _0x4b7af6=_0xe3eeb7,{coordinator:_0x18453c}=_0x5d8b01;return(0x0,react_jsx_runtime['jsxs'])(react_jsx_runtime[_0x4b7af6(0x69)],{'children':[(0x0,react_jsx_runtime[_0x4b7af6(0xeb)])('div',{'className':_0x4b7af6(0xed),'children':_0x4b7af6(0x77)}),(0x0,react_jsx_runtime[_0x4b7af6(0xeb)])(_univerjs_design[_0x4b7af6(0xd7)],{'variant':_0x4b7af6(0x8e),'onClick':()=>_0x18453c['stopPresenting'](),'children':_0x4b7af6(0x125)})]});}function Offline(){const _0x3ffbae=_0xe3eeb7;return(0x0,react_jsx_runtime['jsx'])(react_jsx_runtime[_0x3ffbae(0x69)],{'children':'You\x27are\x20offline.'});}let DesktopLiveShareController=class DesktopLiveShareController extends _univerjs_core['Disposable']{constructor(_0x57031e,_0x53dd02){const _0x3cc75e=_0xe3eeb7;super(),this[_0x3cc75e(0xa3)]=_0x57031e,this['_uiPartsService']=_0x53dd02,this[_0x3cc75e(0xf9)]();}[_0xe3eeb7(0xf9)](){const _0x3027c0=_0xe3eeb7;this[_0x3027c0(0xd6)](this[_0x3027c0(0x115)][_0x3027c0(0x10d)](_univerjs_ui[_0x3027c0(0x6a)][_0x3027c0(0xb6)],()=>(0x0,_univerjs_ui[_0x3027c0(0x99)])(LiveShare,this[_0x3027c0(0xa3)])));}};DesktopLiveShareController=__decorate([__decorateParam(0x0,(0x0,_univerjs_core['Inject'])(_univerjs_core[_0xe3eeb7(0xe8)])),__decorateParam(0x1,_univerjs_ui[_0xe3eeb7(0x83)])],DesktopLiveShareController);var name='@univerjs-pro/live-share',version=_0xe3eeb7(0xb4);const LIVE_SHARE_PLUGIN_CONFIG_KEY=_0xe3eeb7(0x110),configSymbol=Symbol(LIVE_SHARE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let LiveShareCoreExtensionsController=class LiveShareCoreExtensionsController extends _univerjs_core[_0xe3eeb7(0x85)]{constructor(_0x27fd63){const _0x56fe2f=_0xe3eeb7;super(),this[_0x56fe2f(0xfa)]=_0x27fd63,this[_0x56fe2f(0xb8)]();}[_0xe3eeb7(0xb8)](){const _0x29c0c9=_0xe3eeb7;[_univerjs_sheets_ui[_0x29c0c9(0x82)]['id'],_univerjs_sheets_ui[_0x29c0c9(0xd1)]['id'],_univerjs_sheets[_0x29c0c9(0x126)]['id']][_0x29c0c9(0xc6)](_0x4b842e=>{const _0x4c2b21=_0x29c0c9;this['disposeWithMe'](this[_0x4c2b21(0xfa)][_0x4c2b21(0xb1)](_0x4b842e));});}};LiveShareCoreExtensionsController=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0xe3eeb7(0xad)])(LiveShareService))],LiveShareCoreExtensionsController);let UniverLiveSharePlugin=class UniverLiveSharePlugin extends _univerjs_core['Plugin']{constructor(_0x266ade=defaultPluginConfig,_0x31ac92,_0x1f6476){const _0xa5d645=_0xe3eeb7;super(),this['_config']=_0x266ade,this[_0xa5d645(0xa3)]=_0x31ac92,this[_0xa5d645(0x7a)]=_0x1f6476;const {..._0x1be53c}=(0x0,_univerjs_core[_0xa5d645(0x95)])({},defaultPluginConfig,this['_config']);this[_0xa5d645(0x7a)][_0xa5d645(0xa2)](LIVE_SHARE_PLUGIN_CONFIG_KEY,_0x1be53c);}[_0xe3eeb7(0xe2)](){const _0x3b7b96=_0xe3eeb7;(0x0,_univerjs_core[_0x3b7b96(0xe1)])(this[_0x3b7b96(0xa3)],(0x0,_univerjs_core[_0x3b7b96(0xd8)])([[LiveShareService],[LiveShareController],[LiveShareCoreExtensionsController],[DesktopLiveShareController]],this[_0x3b7b96(0xb5)][_0x3b7b96(0xc4)])),(0x0,_univerjs_core['touchDependencies'])(this[_0x3b7b96(0xa3)],[[LiveShareCoreExtensionsController]]);}[_0xe3eeb7(0x10e)](){const _0x3395eb=_0xe3eeb7;(0x0,_univerjs_core[_0x3395eb(0x113)])(this['_injector'],[[DesktopLiveShareController]]);}};_defineProperty(UniverLiveSharePlugin,_0xe3eeb7(0xf3),_univerjs_core[_0xe3eeb7(0x8f)][_0xe3eeb7(0xbe)]),_defineProperty(UniverLiveSharePlugin,'pluginName','UNIVER_LIVE_SHARE_PLUGIN'),_defineProperty(UniverLiveSharePlugin,_0xe3eeb7(0xf7),name),_defineProperty(UniverLiveSharePlugin,'version',version),UniverLiveSharePlugin=__decorate([(0x0,_univerjs_core[_0xe3eeb7(0xe5)])(_univerjs_pro_collaboration_client[_0xe3eeb7(0xa5)]),__decorateParam(0x1,(0x0,_univerjs_core[_0xe3eeb7(0xad)])(_univerjs_core[_0xe3eeb7(0xe8)])),__decorateParam(0x2,_univerjs_core['IConfigService'])],UniverLiveSharePlugin),Object[_0xe3eeb7(0x10c)](exports,'DesktopLiveShareController',{'enumerable':!![],'get':function(){return DesktopLiveShareController;}}),exports[_0xe3eeb7(0x9f)]=LiveShare,Object[_0xe3eeb7(0x10c)](exports,_0xe3eeb7(0x6e),{'enumerable':!![],'get':function(){return LiveShareController;}}),Object[_0xe3eeb7(0x10c)](exports,_0xe3eeb7(0xd0),{'enumerable':!![],'get':function(){return LiveShareCoordinator;}}),exports[_0xe3eeb7(0x104)]=LiveShareService,exports[_0xe3eeb7(0xab)]=LiveShareStatus,Object['defineProperty'](exports,_0xe3eeb7(0x7e),{'enumerable':!![],'get':function(){return UniverLiveSharePlugin;}});
|
|
1
|
+
const _0x2bb258=_0xbfdf;(function(_0x1d24d8,_0x1a4f5e){const _0x20c5d9=_0xbfdf,_0x22b93f=_0x1d24d8();while(!![]){try{const _0x47e9c0=parseInt(_0x20c5d9(0x155))/0x1*(parseInt(_0x20c5d9(0x14b))/0x2)+parseInt(_0x20c5d9(0x1b4))/0x3*(-parseInt(_0x20c5d9(0x19f))/0x4)+-parseInt(_0x20c5d9(0x189))/0x5*(-parseInt(_0x20c5d9(0x10e))/0x6)+-parseInt(_0x20c5d9(0x1b5))/0x7*(parseInt(_0x20c5d9(0x184))/0x8)+-parseInt(_0x20c5d9(0x12a))/0x9+parseInt(_0x20c5d9(0x168))/0xa*(-parseInt(_0x20c5d9(0x107))/0xb)+parseInt(_0x20c5d9(0x148))/0xc;if(_0x47e9c0===_0x1a4f5e)break;else _0x22b93f['push'](_0x22b93f['shift']());}catch(_0x4248d6){_0x22b93f['push'](_0x22b93f['shift']());}}}(_0x304c,0xc3ae8),Object[_0x2bb258(0xfe)](exports,Symbol[_0x2bb258(0x133)],{'value':_0x2bb258(0x188)}));function _0xbfdf(_0x1a5480,_0x511472){_0x1a5480=_0x1a5480-0xfc;const _0x304c18=_0x304c();let _0xbfdfd2=_0x304c18[_0x1a5480];return _0xbfdfd2;}let e=require(`@univerjs/core`),t=require(`@univerjs/ui`),n=require(`@univerjs/design`),r=require(`@univerjs/icons`),i=require(`react`),a=require(`@univerjs-pro/collaboration`),o=require(`@univerjs-pro/collaboration-client`),s=require(`@univerjs/sheets`),c=require(`rxjs`),l=require(`rxjs/operators`),u=require(`react/jsx-runtime`),d=require(`@univerjs/sheets-ui`);function f(_0x3b6a9e){'@babel/helpers - typeof';const _0x152948=_0x2bb258;return f=typeof Symbol==_0x152948(0x156)&&typeof Symbol[_0x152948(0x16c)]=='symbol'?function(_0x3deba0){return typeof _0x3deba0;}:function(_0x47de12){const _0x90ede9=_0x152948;return _0x47de12&&typeof Symbol==_0x90ede9(0x156)&&_0x47de12[_0x90ede9(0x1a7)]===Symbol&&_0x47de12!==Symbol[_0x90ede9(0x138)]?_0x90ede9(0x1af):typeof _0x47de12;},f(_0x3b6a9e);}function p(_0x13b518,_0x4a8efa){const _0x31040d=_0x2bb258;if(f(_0x13b518)!='object'||!_0x13b518)return _0x13b518;var _0x5e90a0=_0x13b518[Symbol[_0x31040d(0x142)]];if(_0x5e90a0!==void 0x0){var _0x119a3c=_0x5e90a0['call'](_0x13b518,_0x4a8efa||_0x31040d(0x195));if(f(_0x119a3c)!=_0x31040d(0x102))return _0x119a3c;throw TypeError(_0x31040d(0x16f));}return(_0x4a8efa===_0x31040d(0x192)?String:Number)(_0x13b518);}function m(_0x4ad7b2){const _0x545964=_0x2bb258;var _0x5c16a8=p(_0x4ad7b2,_0x545964(0x192));return f(_0x5c16a8)==_0x545964(0x1af)?_0x5c16a8:_0x5c16a8+'';}function h(_0x55d2e9,_0x5dd02f,_0x3bebc6){return(_0x5dd02f=m(_0x5dd02f))in _0x55d2e9?Object['defineProperty'](_0x55d2e9,_0x5dd02f,{'value':_0x3bebc6,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x55d2e9[_0x5dd02f]=_0x3bebc6,_0x55d2e9;}var g=class extends e[_0x2bb258(0x115)]{constructor(..._0x577af9){const _0x2282c7=_0x2bb258;super(..._0x577af9),h(this,_0x2282c7(0x1b2),new Set()),h(this,_0x2282c7(0x19c),new Set());}[_0x2bb258(0x1ac)](_0x2deb68){const _0x2407a5=_0x2bb258;return this[_0x2407a5(0x1b2)]['add'](_0x2deb68),(0x0,e[_0x2407a5(0x1ba)])(()=>this[_0x2407a5(0x1b2)][_0x2407a5(0x1bb)](_0x2deb68));}['registerInitialStateReporter'](_0x3ec300){const _0x5a63bf=_0x2bb258;return this[_0x5a63bf(0x19c)][_0x5a63bf(0x16a)](_0x3ec300),(0x0,e[_0x5a63bf(0x1ba)])(()=>this['_reporters'][_0x5a63bf(0x1bb)](_0x3ec300));}[_0x2bb258(0x11c)](_0xa4465f){const _0x19f955=_0x2bb258;return this['_sharedOperations'][_0x19f955(0x1a5)](_0xa4465f);}['getInitialStates'](_0x5bec00){const _0x12fc1c=_0x2bb258;return Array[_0x12fc1c(0x13a)](this[_0x12fc1c(0x19c)])[_0x12fc1c(0x104)](_0x470cfb=>_0x470cfb(_0x5bec00));}};function _(_0x2c8907,_0x32d5b3){return function(_0x21ea3c,_0x554189){_0x32d5b3(_0x21ea3c,_0x554189,_0x2c8907);};}function v(_0x2fcfae,_0x3ab843,_0x671a21,_0x265664){const _0x4231b4=_0x2bb258;var _0x5b8fe4=arguments[_0x4231b4(0x1ab)],_0x21329a=_0x5b8fe4<0x3?_0x3ab843:_0x265664===null?_0x265664=Object[_0x4231b4(0x158)](_0x3ab843,_0x671a21):_0x265664,_0xd6e5f3;if(typeof Reflect==_0x4231b4(0x102)&&typeof Reflect['decorate']==_0x4231b4(0x156))_0x21329a=Reflect[_0x4231b4(0x14c)](_0x2fcfae,_0x3ab843,_0x671a21,_0x265664);else{for(var _0x5d306e=_0x2fcfae['length']-0x1;_0x5d306e>=0x0;_0x5d306e--)(_0xd6e5f3=_0x2fcfae[_0x5d306e])&&(_0x21329a=(_0x5b8fe4<0x3?_0xd6e5f3(_0x21329a):_0x5b8fe4>0x3?_0xd6e5f3(_0x3ab843,_0x671a21,_0x21329a):_0xd6e5f3(_0x3ab843,_0x671a21))||_0x21329a);}return _0x5b8fe4>0x3&&_0x21329a&&Object[_0x4231b4(0xfe)](_0x3ab843,_0x671a21,_0x21329a),_0x21329a;}function _0x304c(){const _0x2a2898=['Stop\x20presenting','getMemberID','50910EjhsQE','merge','add','getStatus','iterator','set','UniverCollaborationClientPlugin','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_init','IUIPartsService','type','_handleNewChangeSets','mergeOverrideWithDependencies','stopFollowing','_collabSessionService','univer-mb-3\x20univer-w-full\x20univer-text-sm','throttleTime','RxDisposable','You\x27re\x20presenting\x20the\x20document','get','_uiPartsService','_commandService','useDependency','UniverInstanceType','idle','SetWorksheetActiveOperation','find','_stopFollowing','944ZWSuPK','Inject','pluginName','Stop\x20following','Module','25HsflmN','sessionStatus$','_status','_beIdle','IDLE','unit','clear','_stopPresenting','takeUntil','string','_handleOnline','unitId','default','stopPresenting','_collabSession','_injector','presenting','subscribe','executeCommand','_reporters','onStarting','parseProtocolChangeset','313252qlbZpK','packageName','_startPresenting','_configService','getTypeOfUnitDisposed$','getValue','has','BehaviorSubject','constructor','stringify','div','SessionStatus','length','registerSharedOperation','onRendered','LiveShareService','symbol','not-following','parse','_sharedOperations','Start\x20following','33oxerTZ','61831CZJdfc','_startFollowing','memberID','univer-size-4','clsx','toDisposable','delete','InsertSheetMutation','_commandDisposable','defineProperty','_handleOperation','getTypeOfUnitAdded$','current','object','SAME_OPERATION_SHARE_INTERVAL','map','_entities','following','1738WJRNcl','DisposableCollection','ICommandService','disposeWithMe','Fragment','_handleOffline','params','1305732dKCsda','sheet','values','IUniverInstanceService','LIVESHARE_OPERATION','_status$','touchDependencies','Disposable','CollaborationEvent','getConfig','requireSession','CollaborationSessionService','presenter','init','shouldShareOperation','startFollowing','_startLiveShareCoordinator','_presenter','_liveShareService','CommandType','send','_config','event$','NEW_CHANGESETS','Button','OPERATION','useRef','NOT_FOLLOWING','14121639rkEWve','dispose','next','registerComponent','UniverLiveSharePlugin','getInitialStates','LiveShare','tryStartPresenting','univer-border-none\x20univer-text-gray-600\x20univer-outline-none','toStringTag','jsx','live-share.config','Dropdown','_unitID','prototype','LiveShareCoordinator','from','getLiveShareCoordinatorSync','getCurrentTypeOfUnit$','LIVESHARE_TERMINATE','_handleTerminate','PRESENTING','_mountLiveShare','UNIVER_SHEET','toPrimitive','useObservable','unsubscribe','SetScrollOperation','univer-box-border\x20univer-min-w-60\x20univer-bg-gray-900\x20univer-px-4\x20univer-py-3\x20univer-text-gray-900\x20dark:!univer-bg-white\x20dark:!univer-text-white','useState','30537312xydJvj','Present\x20this\x20document','pipe','296ZEjRFE','decorate','data','onCommandExecuted','Injector','forEach','DependentOn','offline','dispose$','Plugin','9769fCCsij','function','mutations','getOwnPropertyDescriptor','LiveShareIcon','SetZoomRatioOperation','_handleNewHost','getUnitId','_fetchOperations','LIVESHARE_FETCH_OPERATIONS','UNIVER_LIVE_SHARE_PLUGIN','You\x27are\x20offline.','_univerInstanceService','jsxs','DesktopLiveShareController','IConfigService','LiveShareController'];_0x304c=function(){return _0x2a2898;};return _0x304c();}let y=class extends e[_0x2bb258(0x179)]{constructor(_0x21c39b,_0x41c944,_0x3ae172){const _0x2d1ea9=_0x2bb258;super(),this[_0x2d1ea9(0x161)]=_0x21c39b,this['_injector']=_0x41c944,this[_0x2d1ea9(0x176)]=_0x3ae172,h(this,_0x2d1ea9(0x105),new Map()),this[_0x2d1ea9(0x170)]();}async['getLiveShareCoordinator'](_0x221469){const _0x509f99=_0x2bb258;return this['_entities']['has'](_0x221469)||await this['_startLiveShareCoordinator'](_0x221469),this['_entities'][_0x509f99(0x17b)](_0x221469);}[_0x2bb258(0x13b)](_0x167787){const _0xed0b9c=_0x2bb258;var _0xb52e7f;return(_0xb52e7f=this[_0xed0b9c(0x105)][_0xed0b9c(0x17b)](_0x167787))==null?null:_0xb52e7f;}[_0x2bb258(0x170)](){const _0x590701=_0x2bb258;this[_0x590701(0x161)][_0x590701(0x100)](e[_0x590701(0x17f)][_0x590701(0x141)])[_0x590701(0x14a)]((0x0,l[_0x590701(0x191)])(this[_0x590701(0x153)]))[_0x590701(0x19a)](async _0x26fee8=>{const _0x29f075=_0x590701;let _0x13f1a3=_0x26fee8[_0x29f075(0x18e)]['getUnitId']();this[_0x29f075(0x105)][_0x29f075(0x1a5)](_0x13f1a3)||this['_startLiveShareCoordinator'](_0x13f1a3);}),this[_0x590701(0x161)][_0x590701(0x1a3)](e[_0x590701(0x17f)][_0x590701(0x141)])[_0x590701(0x14a)]((0x0,l[_0x590701(0x191)])(this['dispose$']))[_0x590701(0x19a)](_0x43352f=>{const _0x54008e=_0x590701;let _0x5600a6=_0x43352f['getUnitId'](),_0x14bf57=this[_0x54008e(0x105)]['get'](_0x5600a6);_0x14bf57==null||_0x14bf57[_0x54008e(0x12b)]();});}async[_0x2bb258(0x11e)](_0x5478fd){const _0x3a106e=_0x2bb258;let _0x3357a6=await this['_collabSessionService'][_0x3a106e(0x118)](_0x5478fd),_0xa8eab0=this['_injector']['createInstance'](x,_0x5478fd,_0x3357a6);return _0xa8eab0[_0x3a106e(0x11b)](),this[_0x3a106e(0x105)][_0x3a106e(0x16d)](_0x5478fd,_0xa8eab0),_0xa8eab0;}};y=v([_(0x0,e[_0x2bb258(0x111)]),_(0x1,(0x0,e[_0x2bb258(0x185)])(e[_0x2bb258(0x14f)])),_(0x2,(0x0,e['Inject'])(o[_0x2bb258(0x119)]))],y);let b=function(_0x4508e9){const _0x22b3a0=_0x2bb258;return _0x4508e9['OFFLINE']='offline',_0x4508e9[_0x22b3a0(0x18d)]='idle',_0x4508e9['FOLLOWING']=_0x22b3a0(0x106),_0x4508e9[_0x22b3a0(0x129)]=_0x22b3a0(0x1b0),_0x4508e9[_0x22b3a0(0x13f)]=_0x22b3a0(0x199),_0x4508e9;}({}),x=class extends e[_0x2bb258(0x179)]{get['_status'](){const _0xc655f2=_0x2bb258;return this[_0xc655f2(0x113)][_0xc655f2(0x1a4)]();}constructor(_0x19eaa2,_0x3b7263,_0x5e7df6,_0xf5a8ef,_0x5951c5){const _0x19aa68=_0x2bb258;super(),this[_0x19aa68(0x137)]=_0x19eaa2,this[_0x19aa68(0x197)]=_0x3b7263,this[_0x19aa68(0x1a2)]=_0x5e7df6,this[_0x19aa68(0x120)]=_0xf5a8ef,this[_0x19aa68(0x17d)]=_0x5951c5,h(this,'_status$',new c[(_0x19aa68(0x1a6))](_0x19aa68(0x180))),h(this,'status$',this[_0x19aa68(0x113)]['asObservable']()),h(this,_0x19aa68(0x170),!0x1),h(this,'_commandDisposable',null),h(this,'_presenter',null);}[_0x2bb258(0x12b)](){const _0x3a39bd=_0x2bb258;var _0x23bb92;(_0x23bb92=this['_commandDisposable'])==null||_0x23bb92[_0x3a39bd(0x12b)](),this[_0x3a39bd(0x113)]['next'](_0x3a39bd(0x180)),this['_status$']['complete']();}[_0x2bb258(0x16b)](){const _0x55a898=_0x2bb258;return this[_0x55a898(0x18b)];}[_0x2bb258(0x11b)](){const _0x105218=_0x2bb258;this[_0x105218(0x170)]||(this['_init']=!0x0,this[_0x105218(0x197)][_0x105218(0x18a)]['pipe']((0x0,l[_0x105218(0x191)])(this[_0x105218(0x153)]))[_0x105218(0x19a)](_0x292027=>{const _0x6bfcd1=_0x105218;switch(_0x292027){case o[_0x6bfcd1(0x1aa)]['OFFLINE']:this[_0x6bfcd1(0x10c)]();break;case o[_0x6bfcd1(0x1aa)]['ONLINE']:this[_0x6bfcd1(0x193)]();break;default:}}),this[_0x105218(0x197)][_0x105218(0x124)][_0x105218(0x14a)]((0x0,l[_0x105218(0x191)])(this[_0x105218(0x153)]))[_0x105218(0x19a)](_0x16ba2a=>{const _0x32102d=_0x105218;let {eventID:_0x48314c}=_0x16ba2a;switch(_0x48314c){case a[_0x32102d(0x116)]['LIVESHARE_NEW_HOST']:this['_handleNewHost'](_0x16ba2a);break;case a['CollaborationEvent'][_0x32102d(0x112)]:this[_0x32102d(0xff)](_0x16ba2a);break;case a[_0x32102d(0x116)][_0x32102d(0x13d)]:this['_handleTerminate']();break;case a[_0x32102d(0x116)][_0x32102d(0x125)]:this[_0x32102d(0x173)](_0x16ba2a);break;default:}}));}[_0x2bb258(0x131)](){const _0x38277d=_0x2bb258;this['_collabSession'][_0x38277d(0x122)]({'eventID':a[_0x38277d(0x116)]['LIVESHARE_REQUEST_HOST'],'data':{'unitID':this[_0x38277d(0x137)],'userID':this[_0x38277d(0x197)][_0x38277d(0x167)]()}},this[_0x38277d(0x137)]);}[_0x2bb258(0x196)](){const _0x161b56=_0x2bb258;this[_0x161b56(0x18b)]===_0x161b56(0x199)&&(this[_0x161b56(0x113)][_0x161b56(0x12c)](_0x161b56(0x180)),this[_0x161b56(0x197)][_0x161b56(0x122)]({'eventID':a[_0x161b56(0x116)][_0x161b56(0x13d)],'data':{'unitID':this[_0x161b56(0x137)]}},this[_0x161b56(0x137)]));}[_0x2bb258(0x11d)](){const _0x1c6322=_0x2bb258;this[_0x1c6322(0x18b)]===_0x1c6322(0x1b0)&&(this[_0x1c6322(0x113)][_0x1c6322(0x12c)](_0x1c6322(0x106)),this[_0x1c6322(0x1b6)]());}[_0x2bb258(0x175)](){const _0xb7db6c=_0x2bb258;this[_0xb7db6c(0x18b)]===_0xb7db6c(0x106)&&this[_0xb7db6c(0x183)]();}[_0x2bb258(0x15b)](_0x1f9dfb){const _0x577575=_0x2bb258;let {presenter:_0x47eec3}=_0x1f9dfb[_0x577575(0x14d)],_0x5e2fec=this[_0x577575(0x197)]['getMemberID']();this[_0x577575(0x11f)]=_0x47eec3,_0x47eec3===_0x5e2fec?(this['_stopFollowing'](),this[_0x577575(0x1a1)]()):this[_0x577575(0x18b)]!==_0x577575(0x1b0)&&(this[_0x577575(0x190)](),this[_0x577575(0x1b6)]());}[_0x2bb258(0x15d)](){const _0x479601=_0x2bb258;let _0x4dcee8={'eventID':a[_0x479601(0x116)][_0x479601(0x15e)]};this[_0x479601(0x197)]['send'](_0x4dcee8,this['_unitID']);}[_0x2bb258(0x13e)](){const _0x394578=_0x2bb258;this[_0x394578(0x11f)]=null,this[_0x394578(0x18b)]!==_0x394578(0x199)&&this[_0x394578(0x18c)]();}[_0x2bb258(0x173)](_0x4ef3f5){const _0x3d35b2=_0x2bb258;if(this[_0x3d35b2(0x18b)]===_0x3d35b2(0x106)&&this[_0x3d35b2(0x11f)]===_0x4ef3f5[_0x3d35b2(0x14d)][_0x3d35b2(0x1b7)]){let _0xbd517d=(0x0,a[_0x3d35b2(0x19e)])(_0x4ef3f5[_0x3d35b2(0x14d)])[_0x3d35b2(0x157)]['reverse']()[_0x3d35b2(0x182)](_0x242b43=>_0x242b43['id']===s[_0x3d35b2(0xfc)]['id']);if(_0xbd517d){let _0x145ba1=_0xbd517d[_0x3d35b2(0x10d)][_0x3d35b2(0x194)],_0x26ca88=_0xbd517d['params'][_0x3d35b2(0x10f)]['id'];setTimeout(()=>{const _0x337502=_0x3d35b2;this['_commandService']['executeCommand'](s[_0x337502(0x181)]['id'],{'unitId':_0x145ba1,'subUnitId':_0x26ca88},{'fromCollab':!0x0});});}}}[_0x2bb258(0x1a1)](){const _0x54ded2=_0x2bb258;this[_0x54ded2(0x113)][_0x54ded2(0x12c)](_0x54ded2(0x199));let _0x5911da=new Map(),_0x437185=this[_0x54ded2(0xfd)]=new e[(_0x54ded2(0x108))]();_0x437185[_0x54ded2(0x16a)]((0x0,e['toDisposable'])(()=>{const _0x3ce5f7=_0x54ded2;_0x5911da['forEach'](_0x2d6ed2=>_0x2d6ed2['complete']()),_0x5911da[_0x3ce5f7(0x18f)]();})),_0x437185[_0x54ded2(0x16a)](this[_0x54ded2(0x17d)][_0x54ded2(0x14e)](_0x2e5114=>{const _0x5cb9e9=_0x54ded2;if(_0x2e5114[_0x5cb9e9(0x172)]!==e[_0x5cb9e9(0x121)][_0x5cb9e9(0x127)]||!this[_0x5cb9e9(0x120)][_0x5cb9e9(0x11c)](_0x2e5114['id']))return;let {id:_0x20e4d5}=_0x2e5114,_0x3c71dd;if(_0x5911da[_0x5cb9e9(0x1a5)](_0x20e4d5))_0x3c71dd=_0x5911da[_0x5cb9e9(0x17b)](_0x20e4d5);else{var _0x2d03d6;_0x3c71dd=new c['Subject'](),_0x5911da[_0x5cb9e9(0x16d)](_0x20e4d5,_0x3c71dd),_0x3c71dd[_0x5cb9e9(0x14a)]((0x0,l[_0x5cb9e9(0x178)])((_0x2d03d6=this[_0x5cb9e9(0x1a2)][_0x5cb9e9(0x117)](_0x5cb9e9(0x103)))==null?0xc8:_0x2d03d6,void 0x0,{'trailing':!0x0,'leading':!0x0}))['subscribe'](_0x188489=>{const _0x5b6298=_0x5cb9e9;this[_0x5b6298(0x197)][_0x5b6298(0x122)]({'eventID':a[_0x5b6298(0x116)][_0x5b6298(0x112)],'data':{'unitID':this[_0x5b6298(0x137)],'operations':{[_0x188489['id']]:{'id':_0x188489['id'],'params':JSON[_0x5b6298(0x1a8)](_0x188489['params'])}}}},this['_unitID']);});}_0x3c71dd[_0x5cb9e9(0x12c)](_0x2e5114);})),this[_0x54ded2(0x120)][_0x54ded2(0x12f)](this[_0x54ded2(0x137)])[_0x54ded2(0x150)](_0xe49a4d=>this[_0x54ded2(0x197)][_0x54ded2(0x122)]({'eventID':a['CollaborationEvent'][_0x54ded2(0x112)],'data':{'unitID':this[_0x54ded2(0x137)],'operations':{[_0xe49a4d['id']]:{'id':_0xe49a4d['id'],'params':JSON[_0x54ded2(0x1a8)](_0xe49a4d[_0x54ded2(0x10d)])}}}},this['_unitID']));}[_0x2bb258(0x190)](){const _0x44ebd9=_0x2bb258;var _0x3933d4;this[_0x44ebd9(0x113)]['next']('idle'),(_0x3933d4=this[_0x44ebd9(0xfd)])==null||_0x3933d4[_0x44ebd9(0x12b)](),this[_0x44ebd9(0xfd)]=null;}[_0x2bb258(0x1b6)](){const _0x51c8a7=_0x2bb258;var _0x1dffd0;(_0x1dffd0=this['_commandDisposable'])==null||_0x1dffd0[_0x51c8a7(0x12b)](),this['_status$']['next']('following');}[_0x2bb258(0x18c)](){const _0x2f5f77=_0x2bb258;var _0x5ecb45;this[_0x2f5f77(0x113)][_0x2f5f77(0x12c)](_0x2f5f77(0x180)),(_0x5ecb45=this['_commandDisposable'])==null||_0x5ecb45['dispose'](),this[_0x2f5f77(0xfd)]=null;}[_0x2bb258(0x183)](){const _0x4b04f8=_0x2bb258;var _0x3b1ac1;this[_0x4b04f8(0x113)][_0x4b04f8(0x12c)](_0x4b04f8(0x1b0)),(_0x3b1ac1=this[_0x4b04f8(0xfd)])==null||_0x3b1ac1[_0x4b04f8(0x12b)]();}['_handleOperation'](_0x2c3815){const _0x4c220e=_0x2bb258;if([_0x4c220e(0x199),'not-following',_0x4c220e(0x152)]['includes'](this[_0x4c220e(0x18b)])||!_0x2c3815[_0x4c220e(0x14d)][_0x4c220e(0x11a)]||_0x2c3815[_0x4c220e(0x14d)][_0x4c220e(0x11a)]===this['_collabSession'][_0x4c220e(0x167)]())return;this['_status']==='idle'&&this[_0x4c220e(0x1b6)]();let _0x144e4c=_0x2c3815[_0x4c220e(0x14d)]['operations'];Object[_0x4c220e(0x110)](_0x144e4c)[_0x4c220e(0x150)](_0x4d3ac0=>{const _0x143fc7=_0x4c220e;this[_0x143fc7(0x17d)][_0x143fc7(0x19b)](_0x4d3ac0['id'],_0x4d3ac0[_0x143fc7(0x10d)]?JSON[_0x143fc7(0x1b1)](_0x4d3ac0[_0x143fc7(0x10d)]):null,{'fromCollab':!0x0});});}[_0x2bb258(0x10c)](){const _0xf3f518=_0x2bb258;var _0x1104ff;this[_0xf3f518(0x113)][_0xf3f518(0x12c)](_0xf3f518(0x152)),(_0x1104ff=this['_commandDisposable'])==null||_0x1104ff[_0xf3f518(0x12b)]();}[_0x2bb258(0x193)](){const _0x53796d=_0x2bb258;this[_0x53796d(0x113)]['next'](_0x53796d(0x180)),this[_0x53796d(0x15d)]();}};x=v([_(0x2,e[_0x2bb258(0x164)]),_(0x3,(0x0,e['Inject'])(g)),_(0x4,e[_0x2bb258(0x109)])],x);function S(){const _0x202695=_0x2bb258;let _0x2f5c8e=(0x0,t['useDependency'])(y),_0x162c43=(0x0,t[_0x202695(0x17e)])(e[_0x202695(0x111)]),_0x3e8336=(0x0,t[_0x202695(0x143)])(()=>_0x162c43[_0x202695(0x13c)](e[_0x202695(0x17f)][_0x202695(0x141)]),void 0x0,!0x1,[]),[_0xc55481,_0x297bf5]=(0x0,i[_0x202695(0x147)])(null),[_0x385ff1,_0x20327e]=(0x0,i[_0x202695(0x147)])(_0x202695(0x180)),_0x26ce29=(0x0,i[_0x202695(0x128)])(null);return(0x0,i['useEffect'])(()=>(_0x3e8336&&_0x2f5c8e['getLiveShareCoordinator'](_0x3e8336[_0x202695(0x15c)]())['then'](_0x1c5648=>{_0x297bf5(_0x1c5648),_0x26ce29['current']=_0x1c5648['status$']['subscribe'](_0x31328f=>{_0x20327e(_0x31328f);});}),()=>{const _0xa37fd2=_0x202695;var _0x210554;(_0x210554=_0x26ce29[_0xa37fd2(0x101)])==null||_0x210554[_0xa37fd2(0x144)](),_0x26ce29[_0xa37fd2(0x101)]=null;}),[_0x3e8336,_0x2f5c8e]),_0xc55481?(0x0,u['jsx'])(n[_0x202695(0x136)],{'align':'end','disabled':_0x385ff1===_0x202695(0x152),'className':_0x202695(0x146),'overlay':(0x0,u[_0x202695(0x134)])(C,{'status':_0x385ff1,'coordinator':_0xc55481}),'children':(0x0,u[_0x202695(0x134)])('button',{'className':(0x0,n[_0x202695(0x1b9)])(_0x202695(0x132),{'univer-cursor-not-allowed':_0x385ff1===_0x202695(0x152),'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x385ff1!=='offline'}),'type':'button','children':(0x0,u['jsx'])(r[_0x202695(0x159)],{'className':_0x202695(0x1b8)})})}):null;}function C(_0x249c04){const _0x4525fe=_0x2bb258;let {status:_0x5728a6,coordinator:_0x53fcbb}=_0x249c04;switch(_0x5728a6){case _0x4525fe(0x180):return(0x0,u['jsx'])(w,{'coordinator':_0x53fcbb});case _0x4525fe(0x106):return(0x0,u[_0x4525fe(0x134)])(T,{'coordinator':_0x53fcbb});case _0x4525fe(0x1b0):return(0x0,u[_0x4525fe(0x134)])(E,{'coordinator':_0x53fcbb});case _0x4525fe(0x152):return(0x0,u[_0x4525fe(0x134)])(O,{});case _0x4525fe(0x199):return(0x0,u[_0x4525fe(0x134)])(D,{'coordinator':_0x53fcbb});default:return null;}}function w(_0x199868){const _0x444513=_0x2bb258;let {coordinator:_0x5a4e4c}=_0x199868;return(0x0,u[_0x444513(0x162)])(u[_0x444513(0x10b)],{'children':[(0x0,u[_0x444513(0x134)])(_0x444513(0x1a9),{'className':_0x444513(0x177),'children':_0x444513(0x149)}),(0x0,u[_0x444513(0x134)])(n[_0x444513(0x126)],{'onClick':()=>_0x5a4e4c[_0x444513(0x131)](),'children':'Start'})]});}function T(_0x405bb4){const _0x556de4=_0x2bb258;let {coordinator:_0x2d565d}=_0x405bb4;return(0x0,u['jsxs'])(u[_0x556de4(0x10b)],{'children':[(0x0,u[_0x556de4(0x134)])(_0x556de4(0x1a9),{'className':_0x556de4(0x177),'children':'You\x27re\x20following\x20the\x20presenter'}),(0x0,u[_0x556de4(0x134)])(n[_0x556de4(0x126)],{'onClick':()=>_0x2d565d[_0x556de4(0x175)](),'children':_0x556de4(0x187)})]});}function E(_0xf42919){const _0x394a59=_0x2bb258;let {coordinator:_0x2b8159}=_0xf42919;return(0x0,u[_0x394a59(0x162)])(u['Fragment'],{'children':[(0x0,u[_0x394a59(0x134)])(_0x394a59(0x1a9),{'className':_0x394a59(0x177),'children':'You\x27re\x20not\x20following\x20the\x20presenter'}),(0x0,u[_0x394a59(0x134)])(n[_0x394a59(0x126)],{'variant':'text','onClick':()=>_0x2b8159[_0x394a59(0x11d)](),'children':_0x394a59(0x1b3)})]});}function D(_0x1063cd){const _0x16e623=_0x2bb258;let {coordinator:_0x483ae1}=_0x1063cd;return(0x0,u['jsxs'])(u[_0x16e623(0x10b)],{'children':[(0x0,u[_0x16e623(0x134)])(_0x16e623(0x1a9),{'className':_0x16e623(0x177),'children':_0x16e623(0x17a)}),(0x0,u[_0x16e623(0x134)])(n[_0x16e623(0x126)],{'variant':_0x16e623(0x195),'onClick':()=>_0x483ae1[_0x16e623(0x196)](),'children':_0x16e623(0x166)})]});}function O(){const _0x4e043b=_0x2bb258;return(0x0,u['jsx'])(u[_0x4e043b(0x10b)],{'children':_0x4e043b(0x160)});}let k=class extends e[_0x2bb258(0x115)]{constructor(_0x16734c,_0x40b887){const _0x4cdeae=_0x2bb258;super(),this['_injector']=_0x16734c,this[_0x4cdeae(0x17c)]=_0x40b887,this['_mountLiveShare']();}[_0x2bb258(0x140)](){const _0x903102=_0x2bb258;this[_0x903102(0x10a)](this['_uiPartsService'][_0x903102(0x12d)](t['BuiltInUIPart']['HEADER_MENU'],()=>(0x0,t['connectInjector'])(S,this[_0x903102(0x198)])));}};k=v([_(0x0,(0x0,e[_0x2bb258(0x185)])(e[_0x2bb258(0x14f)])),_(0x1,t[_0x2bb258(0x171)])],k);var A='@univerjs-pro/live-share',j='0.23.0-insiders.20260522-e8f2a3b';const M=_0x2bb258(0x135);Symbol(M);const N={};let P=class extends e[_0x2bb258(0x115)]{constructor(_0x175443){const _0x3ddd41=_0x2bb258;super(),this['_liveShareService']=_0x175443,this[_0x3ddd41(0x170)]();}[_0x2bb258(0x170)](){const _0x3812b6=_0x2bb258;[d[_0x3812b6(0x15a)]['id'],d[_0x3812b6(0x145)]['id'],s[_0x3812b6(0x181)]['id']][_0x3812b6(0x150)](_0x130e99=>{const _0x2b1166=_0x3812b6;this['disposeWithMe'](this[_0x2b1166(0x120)][_0x2b1166(0x1ac)](_0x130e99));});}};P=v([_(0x0,(0x0,e['Inject'])(g))],P);let F=class extends e[_0x2bb258(0x154)]{constructor(_0x282c76=N,_0x949f09,_0x425ff7){const _0x569058=_0x2bb258;super(),this[_0x569058(0x123)]=_0x282c76,this['_injector']=_0x949f09,this[_0x569058(0x1a2)]=_0x425ff7;let {..._0x359baf}=(0x0,e[_0x569058(0x169)])({},N,this[_0x569058(0x123)]);this[_0x569058(0x1a2)]['setConfig'](M,_0x359baf);}[_0x2bb258(0x19d)](){const _0xb5c636=_0x2bb258;(0x0,e['registerDependencies'])(this[_0xb5c636(0x198)],(0x0,e[_0xb5c636(0x174)])([[g],[y],[P],[k]],this[_0xb5c636(0x123)]['override'])),(0x0,e[_0xb5c636(0x114)])(this[_0xb5c636(0x198)],[[P]]);}[_0x2bb258(0x1ad)](){const _0x478b3c=_0x2bb258;(0x0,e[_0x478b3c(0x114)])(this['_injector'],[[k]]);}};h(F,_0x2bb258(0x172),e[_0x2bb258(0x17f)]['UNIVER_UNKNOWN']),h(F,_0x2bb258(0x186),_0x2bb258(0x15f)),h(F,_0x2bb258(0x1a0),A),h(F,'version',j),F=v([(0x0,e[_0x2bb258(0x151)])(o[_0x2bb258(0x16e)]),_(0x1,(0x0,e['Inject'])(e[_0x2bb258(0x14f)])),_(0x2,e[_0x2bb258(0x164)])],F),Object[_0x2bb258(0xfe)](exports,_0x2bb258(0x163),{'enumerable':!0x0,'get':function(){return k;}}),exports[_0x2bb258(0x130)]=S,Object[_0x2bb258(0xfe)](exports,_0x2bb258(0x165),{'enumerable':!0x0,'get':function(){return y;}}),Object[_0x2bb258(0xfe)](exports,_0x2bb258(0x139),{'enumerable':!0x0,'get':function(){return x;}}),exports[_0x2bb258(0x1ae)]=g,exports['LiveShareStatus']=b,Object[_0x2bb258(0xfe)](exports,_0x2bb258(0x12e),{'enumerable':!0x0,'get':function(){return F;}});
|
package/lib/es/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x33f4c6=_0x384d;function _0x9218(){const _0x1eaff7=['5929592knJqov','1856519uCgJEF','stopFollowing','function','411072paFKMk','1128vcCTpt','getCurrentUnitOfType','getStatus','startFollowing','default','368286awaDuh','334122fhAHel','15wqTvsG','get','string','_injector','stopPresenting','tryStartPresenting','UNIVER_SHEET','LiveShareStatusEnum','extend','startPresenting','117gqdvMP','8788Wjfahx','_liveShareController','getUnitId','IDLE','No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.','object','prototype','toPrimitive','46030MkJWJx','getLiveShareStatus','_initialize','No\x20active\x20workbook\x20found.','symbol','getLiveShareCoordinatorSync','defineProperty'];_0x9218=function(){return _0x1eaff7;};return _0x9218();}(function(_0x4a7a7a,_0x3fc3e8){const _0x4e7aed=_0x384d,_0x4951cb=_0x4a7a7a();while(!![]){try{const _0x582f00=parseInt(_0x4e7aed(0x146))/0x1+parseInt(_0x4e7aed(0x13f))/0x2+parseInt(_0x4e7aed(0x140))/0x3*(parseInt(_0x4e7aed(0x152))/0x4)+-parseInt(_0x4e7aed(0x147))/0x5*(-parseInt(_0x4e7aed(0x145))/0x6)+-parseInt(_0x4e7aed(0x13c))/0x7+-parseInt(_0x4e7aed(0x13b))/0x8+parseInt(_0x4e7aed(0x151))/0x9*(-parseInt(_0x4e7aed(0x134))/0xa);if(_0x582f00===_0x3fc3e8)break;else _0x4951cb['push'](_0x4951cb['shift']());}catch(_0x28fd0b){_0x4951cb['push'](_0x4951cb['shift']());}}}(_0x9218,0x76122));import{LiveShareController as _0x16cc3a,LiveShareStatus as _0x9acedc}from'@univerjs-pro/live-share';import{IUniverInstanceService as _0x249e90,UniverInstanceType as _0x10bf95}from'@univerjs/core';import{FEnum as _0x155462,FUniver as _0x53bf64}from'@univerjs/core/facade';function o(_0x2b34e9){'@babel/helpers - typeof';const _0x33c937=_0x384d;return o=typeof Symbol=='function'&&typeof Symbol['iterator']==_0x33c937(0x138)?function(_0x100c12){return typeof _0x100c12;}:function(_0x46bc54){const _0x1d7dc8=_0x33c937;return _0x46bc54&&typeof Symbol==_0x1d7dc8(0x13e)&&_0x46bc54['constructor']===Symbol&&_0x46bc54!==Symbol[_0x1d7dc8(0x158)]?_0x1d7dc8(0x138):typeof _0x46bc54;},o(_0x2b34e9);}function s(_0x127b68,_0x3cf494){const _0x2aeef4=_0x384d;if(o(_0x127b68)!=_0x2aeef4(0x157)||!_0x127b68)return _0x127b68;var _0x21e031=_0x127b68[Symbol[_0x2aeef4(0x159)]];if(_0x21e031!==void 0x0){var _0x45f1d0=_0x21e031['call'](_0x127b68,_0x3cf494||_0x2aeef4(0x144));if(o(_0x45f1d0)!='object')return _0x45f1d0;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x3cf494===_0x2aeef4(0x149)?String:Number)(_0x127b68);}function c(_0x8bfce3){const _0x4cd3a9=_0x384d;var _0x2b96ea=s(_0x8bfce3,'string');return o(_0x2b96ea)==_0x4cd3a9(0x138)?_0x2b96ea:_0x2b96ea+'';}function _0x384d(_0x1117cd,_0x1f6263){_0x1117cd=_0x1117cd-0x134;const _0x921858=_0x9218();let _0x384d7d=_0x921858[_0x1117cd];return _0x384d7d;}function l(_0x427b45,_0x19a992,_0x452ef4){const _0x236bb8=_0x384d;return(_0x19a992=c(_0x19a992))in _0x427b45?Object[_0x236bb8(0x13a)](_0x427b45,_0x19a992,{'value':_0x452ef4,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x427b45[_0x19a992]=_0x452ef4,_0x427b45;}var u=class extends _0x53bf64{constructor(..._0x5b7a20){super(..._0x5b7a20),l(this,'_liveShareController',void 0x0);}[_0x33f4c6(0x136)](_0x414b83){const _0x17a4dd=_0x33f4c6;this[_0x17a4dd(0x153)]=_0x414b83[_0x17a4dd(0x148)](_0x16cc3a);}[_0x33f4c6(0x135)](){const _0x3b4bde=_0x33f4c6;var _0x2a9ff6;let _0x4c5c35=this[_0x3b4bde(0x14a)][_0x3b4bde(0x148)](_0x249e90)[_0x3b4bde(0x141)](_0x10bf95['UNIVER_SHEET']);if(!_0x4c5c35)throw Error('No\x20active\x20workbook\x20found.');let _0x4e6043=_0x4c5c35['getUnitId'](),_0x11be0d=this['_liveShareController'][_0x3b4bde(0x139)](_0x4e6043);return(_0x2a9ff6=_0x11be0d==null?void 0x0:_0x11be0d[_0x3b4bde(0x142)]())==null?_0x9acedc[_0x3b4bde(0x155)]:_0x2a9ff6;}[_0x33f4c6(0x143)](){const _0x1f747f=_0x33f4c6;let _0x2e6397=this[_0x1f747f(0x14a)]['get'](_0x249e90)['getCurrentUnitOfType'](_0x10bf95['UNIVER_SHEET']);if(!_0x2e6397)throw Error(_0x1f747f(0x137));let _0xa95b3e=_0x2e6397[_0x1f747f(0x154)](),_0x23ee0b=this[_0x1f747f(0x153)][_0x1f747f(0x139)](_0xa95b3e);if(!_0x23ee0b)throw Error(_0x1f747f(0x156));_0x23ee0b[_0x1f747f(0x143)]();}[_0x33f4c6(0x13d)](){const _0x46f215=_0x33f4c6;let _0x2743a2=this[_0x46f215(0x14a)]['get'](_0x249e90)[_0x46f215(0x141)](_0x10bf95[_0x46f215(0x14d)]);if(!_0x2743a2)throw Error(_0x46f215(0x137));let _0xdf1264=_0x2743a2[_0x46f215(0x154)](),_0x21ceba=this['_liveShareController'][_0x46f215(0x139)](_0xdf1264);if(!_0x21ceba)throw Error(_0x46f215(0x156));_0x21ceba[_0x46f215(0x13d)]();}[_0x33f4c6(0x150)](){const _0x1b5092=_0x33f4c6;let _0x285e0f=this[_0x1b5092(0x14a)][_0x1b5092(0x148)](_0x249e90)[_0x1b5092(0x141)](_0x10bf95[_0x1b5092(0x14d)]);if(!_0x285e0f)throw Error(_0x1b5092(0x137));let _0x168a9b=_0x285e0f['getUnitId'](),_0x4f0fd5=this[_0x1b5092(0x153)][_0x1b5092(0x139)](_0x168a9b);if(!_0x4f0fd5)throw Error('No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.');_0x4f0fd5[_0x1b5092(0x14c)]();}[_0x33f4c6(0x14b)](){const _0x29ce34=_0x33f4c6;let _0x23447c=this[_0x29ce34(0x14a)][_0x29ce34(0x148)](_0x249e90)[_0x29ce34(0x141)](_0x10bf95[_0x29ce34(0x14d)]);if(!_0x23447c)throw Error(_0x29ce34(0x137));let _0x44aa61=_0x23447c[_0x29ce34(0x154)](),_0x197cdf=this['_liveShareController'][_0x29ce34(0x139)](_0x44aa61);if(!_0x197cdf)throw Error('No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.');_0x197cdf[_0x29ce34(0x14b)]();}};_0x53bf64[_0x33f4c6(0x14f)](u);var d=class extends _0x155462{get[_0x33f4c6(0x14e)](){return _0x9acedc;}};_0x155462['extend'](d);export{};
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x43267f=_0x5e07;(function(_0x1f2c2c,_0x43cf11){const _0x53af28=_0x5e07,_0x3f8716=_0x1f2c2c();while(!![]){try{const _0x23ce05=-parseInt(_0x53af28(0x1c0))/0x1*(parseInt(_0x53af28(0x1b9))/0x2)+-parseInt(_0x53af28(0x1e5))/0x3+-parseInt(_0x53af28(0x193))/0x4*(parseInt(_0x53af28(0x206))/0x5)+parseInt(_0x53af28(0x1a3))/0x6*(-parseInt(_0x53af28(0x20c))/0x7)+parseInt(_0x53af28(0x1c9))/0x8*(parseInt(_0x53af28(0x1f9))/0x9)+-parseInt(_0x53af28(0x20a))/0xa+parseInt(_0x53af28(0x207))/0xb;if(_0x23ce05===_0x43cf11)break;else _0x3f8716['push'](_0x3f8716['shift']());}catch(_0x569f30){_0x3f8716['push'](_0x3f8716['shift']());}}}(_0x6cd2,0xb195c));import{CommandType,DependentOn,Disposable,DisposableCollection,ICommandService,IConfigService,IUniverInstanceService,Inject,Injector,Plugin,RxDisposable,UniverInstanceType,merge,mergeOverrideWithDependencies,registerDependencies,toDisposable,touchDependencies}from'@univerjs/core';import{BuiltInUIPart,IUIPartsService,connectInjector,useDependency,useObservable}from'@univerjs/ui';import{Button,Dropdown,clsx}from'@univerjs/design';import{LiveShareIcon}from'@univerjs/icons';import{useEffect,useRef,useState}from'react';import{CollaborationEvent,parseProtocolChangeset}from'@univerjs-pro/collaboration';import{CollaborationSessionService,SessionStatus,UniverCollaborationClientPlugin}from'@univerjs-pro/collaboration-client';import{InsertSheetMutation,SetWorksheetActiveOperation}from'@univerjs/sheets';import{BehaviorSubject,Subject}from'rxjs';import{takeUntil,throttleTime}from'rxjs/operators';import{Fragment,jsx,jsxs}from'react/jsx-runtime';import{SetScrollOperation,SetZoomRatioOperation}from'@univerjs/sheets-ui';function _typeof(_0x3259cf){'@babel/helpers - typeof';const _0x52bde7=_0x5e07;return _typeof='function'==typeof Symbol&&_0x52bde7(0x1b2)==typeof Symbol['iterator']?function(_0x4e48fe){return typeof _0x4e48fe;}:function(_0x412a12){const _0x464e5c=_0x52bde7;return _0x412a12&&_0x464e5c(0x1ef)==typeof Symbol&&_0x412a12[_0x464e5c(0x1ab)]===Symbol&&_0x412a12!==Symbol[_0x464e5c(0x1c8)]?_0x464e5c(0x1b2):typeof _0x412a12;},_typeof(_0x3259cf);}function toPrimitive(_0x2cd61c,_0x9056d2){const _0x4b4caf=_0x5e07;if(_0x4b4caf(0x1a0)!=_typeof(_0x2cd61c)||!_0x2cd61c)return _0x2cd61c;var _0x43a311=_0x2cd61c[Symbol[_0x4b4caf(0x1c7)]];if(void 0x0!==_0x43a311){var _0x24d425=_0x43a311['call'](_0x2cd61c,_0x9056d2||_0x4b4caf(0x1d3));if(_0x4b4caf(0x1a0)!=_typeof(_0x24d425))return _0x24d425;throw new TypeError(_0x4b4caf(0x1b1));}return(_0x4b4caf(0x1dc)===_0x9056d2?String:Number)(_0x2cd61c);}function toPropertyKey(_0x1346e8){const _0x388902=_0x5e07;var _0x329a8e=toPrimitive(_0x1346e8,_0x388902(0x1dc));return _0x388902(0x1b2)==_typeof(_0x329a8e)?_0x329a8e:_0x329a8e+'';}function _defineProperty(_0x193b00,_0xb67046,_0x1a790f){const _0x585e14=_0x5e07;return(_0xb67046=toPropertyKey(_0xb67046))in _0x193b00?Object[_0x585e14(0x1c4)](_0x193b00,_0xb67046,{'value':_0x1a790f,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x193b00[_0xb67046]=_0x1a790f,_0x193b00;}var LiveShareService=class extends Disposable{constructor(..._0x279850){const _0x34bfc2=_0x5e07;super(..._0x279850),_defineProperty(this,_0x34bfc2(0x1fa),new Set()),_defineProperty(this,_0x34bfc2(0x1ac),new Set());}[_0x43267f(0x1db)](_0x781920){const _0xac4616=_0x43267f;return this[_0xac4616(0x1fa)]['add'](_0x781920),toDisposable(()=>this['_sharedOperations'][_0xac4616(0x200)](_0x781920));}[_0x43267f(0x1ca)](_0x46d0fc){const _0x4c5160=_0x43267f;return this[_0x4c5160(0x1ac)][_0x4c5160(0x183)](_0x46d0fc),toDisposable(()=>this['_reporters'][_0x4c5160(0x200)](_0x46d0fc));}['shouldShareOperation'](_0x1f1729){const _0x5fc19=_0x43267f;return this[_0x5fc19(0x1fa)]['has'](_0x1f1729);}[_0x43267f(0x1e9)](_0x4d618e){const _0x3a63b5=_0x43267f;return Array[_0x3a63b5(0x187)](this['_reporters'])[_0x3a63b5(0x1a1)](_0x1bc215=>_0x1bc215(_0x4d618e));}};function _0x5e07(_0x3ab236,_0x4100de){_0x3ab236=_0x3ab236-0x177;const _0x6cd26f=_0x6cd2();let _0x5e07a5=_0x6cd26f[_0x3ab236];return _0x5e07a5;}function __decorateParam(_0x4e9fe7,_0x33be22){return function(_0x9d2488,_0x3a7382){_0x33be22(_0x9d2488,_0x3a7382,_0x4e9fe7);};}function __decorate(_0x29fa24,_0x53b74c,_0x1efd38,_0x3358b6){const _0x556cb7=_0x43267f;var _0x3bdeb6=arguments[_0x556cb7(0x181)],_0x1872a2=_0x3bdeb6<0x3?_0x53b74c:_0x3358b6===null?_0x3358b6=Object[_0x556cb7(0x1a2)](_0x53b74c,_0x1efd38):_0x3358b6,_0x25103d;if(typeof Reflect===_0x556cb7(0x1a0)&&typeof Reflect[_0x556cb7(0x17d)]===_0x556cb7(0x1ef))_0x1872a2=Reflect[_0x556cb7(0x17d)](_0x29fa24,_0x53b74c,_0x1efd38,_0x3358b6);else{for(var _0x1d2318=_0x29fa24['length']-0x1;_0x1d2318>=0x0;_0x1d2318--)if(_0x25103d=_0x29fa24[_0x1d2318])_0x1872a2=(_0x3bdeb6<0x3?_0x25103d(_0x1872a2):_0x3bdeb6>0x3?_0x25103d(_0x53b74c,_0x1efd38,_0x1872a2):_0x25103d(_0x53b74c,_0x1efd38))||_0x1872a2;}return _0x3bdeb6>0x3&&_0x1872a2&&Object[_0x556cb7(0x1c4)](_0x53b74c,_0x1efd38,_0x1872a2),_0x1872a2;}let LiveShareController=class LiveShareController extends RxDisposable{constructor(_0x2140b2,_0x3fc587,_0x584ca4){const _0xaea04=_0x43267f;super(),this[_0xaea04(0x1d6)]=_0x2140b2,this['_injector']=_0x3fc587,this[_0xaea04(0x1b6)]=_0x584ca4,_defineProperty(this,'_entities',new Map()),this[_0xaea04(0x1e3)]();}async[_0x43267f(0x209)](_0x18a67d){const _0x32d49a=_0x43267f;if(!this[_0x32d49a(0x17e)][_0x32d49a(0x1cf)](_0x18a67d))await this[_0x32d49a(0x1d1)](_0x18a67d);return this[_0x32d49a(0x17e)]['get'](_0x18a67d);}[_0x43267f(0x1ff)](_0x46286e){const _0x73143b=_0x43267f;var _0x14b673;return(_0x14b673=this[_0x73143b(0x17e)][_0x73143b(0x1cd)](_0x46286e))!==null&&_0x14b673!==void 0x0?_0x14b673:null;}[_0x43267f(0x1e3)](){const _0x5c8079=_0x43267f;this[_0x5c8079(0x1d6)][_0x5c8079(0x197)](UniverInstanceType[_0x5c8079(0x1a8)])['pipe'](takeUntil(this[_0x5c8079(0x1be)]))[_0x5c8079(0x20b)](async _0x4e889a=>{const _0x46f815=_0x5c8079,_0x4cea86=_0x4e889a[_0x46f815(0x1bc)][_0x46f815(0x1da)]();if(this[_0x46f815(0x17e)][_0x46f815(0x1cf)](_0x4cea86))return;this[_0x46f815(0x1d1)](_0x4cea86);}),this[_0x5c8079(0x1d6)]['getTypeOfUnitDisposed$'](UniverInstanceType[_0x5c8079(0x1a8)])[_0x5c8079(0x1e1)](takeUntil(this['dispose$']))[_0x5c8079(0x20b)](_0x56517c=>{const _0x1d0d8f=_0x5c8079,_0x597160=_0x56517c[_0x1d0d8f(0x1da)](),_0x257bfe=this['_entities'][_0x1d0d8f(0x1cd)](_0x597160);_0x257bfe===null||_0x257bfe===void 0x0||_0x257bfe[_0x1d0d8f(0x1ce)]();});}async[_0x43267f(0x1d1)](_0x1f7800){const _0x3c87d7=_0x43267f,_0x31bdd=await this['_collabSessionService'][_0x3c87d7(0x18f)](_0x1f7800),_0x17abb8=this[_0x3c87d7(0x1c2)][_0x3c87d7(0x1ea)](LiveShareCoordinator,_0x1f7800,_0x31bdd);return _0x17abb8[_0x3c87d7(0x1fd)](),this[_0x3c87d7(0x17e)][_0x3c87d7(0x1e8)](_0x1f7800,_0x17abb8),_0x17abb8;}};LiveShareController=__decorate([__decorateParam(0x0,IUniverInstanceService),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,Inject(CollaborationSessionService))],LiveShareController);let LiveShareStatus=function(_0xe4315){const _0x514b6a=_0x43267f;return _0xe4315[_0x514b6a(0x1f5)]='offline',_0xe4315['IDLE']=_0x514b6a(0x1f3),_0xe4315['FOLLOWING']=_0x514b6a(0x1e2),_0xe4315[_0x514b6a(0x1e0)]='not-following',_0xe4315[_0x514b6a(0x184)]=_0x514b6a(0x1b7),_0xe4315;}({});const SAME_OPERATION_SHARE_INTERVAL_KEY=_0x43267f(0x1e4),DEFAULT_SAME_OPERATION_SHARE_INTERVAL=0xc8;let LiveShareCoordinator=class LiveShareCoordinator extends RxDisposable{get[_0x43267f(0x19c)](){const _0x1ce33f=_0x43267f;return this[_0x1ce33f(0x1ad)][_0x1ce33f(0x1f4)]();}constructor(_0x55e21b,_0x40d5b5,_0xde803f,_0x326f17,_0x359f2f){const _0x227f9e=_0x43267f;super(),this[_0x227f9e(0x1de)]=_0x55e21b,this[_0x227f9e(0x1c6)]=_0x40d5b5,this[_0x227f9e(0x1ec)]=_0xde803f,this['_liveShareService']=_0x326f17,this['_commandService']=_0x359f2f,_defineProperty(this,_0x227f9e(0x1ad),new BehaviorSubject(_0x227f9e(0x1f3))),_defineProperty(this,_0x227f9e(0x1a6),this[_0x227f9e(0x1ad)][_0x227f9e(0x203)]()),_defineProperty(this,_0x227f9e(0x1e3),![]),_defineProperty(this,_0x227f9e(0x1ed),null),_defineProperty(this,_0x227f9e(0x194),null);}[_0x43267f(0x1ce)](){const _0x20cfc0=_0x43267f;var _0x57994b;(_0x57994b=this[_0x20cfc0(0x1ed)])===null||_0x57994b===void 0x0||_0x57994b[_0x20cfc0(0x1ce)](),this['_status$'][_0x20cfc0(0x201)](_0x20cfc0(0x1f3)),this[_0x20cfc0(0x1ad)][_0x20cfc0(0x1f2)]();}[_0x43267f(0x180)](){const _0x2a7d48=_0x43267f;return this[_0x2a7d48(0x19c)];}['init'](){const _0x2359c5=_0x43267f;if(this[_0x2359c5(0x1e3)])return;this[_0x2359c5(0x1e3)]=!![],this['_collabSession'][_0x2359c5(0x1b3)][_0x2359c5(0x1e1)](takeUntil(this[_0x2359c5(0x1be)]))[_0x2359c5(0x20b)](_0x5e63bc=>{const _0x327f39=_0x2359c5;switch(_0x5e63bc){case SessionStatus['OFFLINE']:this[_0x327f39(0x18c)]();break;case SessionStatus[_0x327f39(0x1c1)]:this['_handleOnline']();break;default:}}),this[_0x2359c5(0x1c6)][_0x2359c5(0x1df)][_0x2359c5(0x1e1)](takeUntil(this[_0x2359c5(0x1be)]))[_0x2359c5(0x20b)](_0x10d22a=>{const _0x57b989=_0x2359c5,{eventID:_0x9987a3}=_0x10d22a;switch(_0x9987a3){case CollaborationEvent['LIVESHARE_NEW_HOST']:this[_0x57b989(0x179)](_0x10d22a);break;case CollaborationEvent['LIVESHARE_OPERATION']:this[_0x57b989(0x190)](_0x10d22a);break;case CollaborationEvent[_0x57b989(0x1d0)]:this[_0x57b989(0x195)]();break;case CollaborationEvent['NEW_CHANGESETS']:this[_0x57b989(0x198)](_0x10d22a);break;default:}});}[_0x43267f(0x1dd)](){const _0x3207db=_0x43267f;this['_collabSession'][_0x3207db(0x17f)]({'eventID':CollaborationEvent['LIVESHARE_REQUEST_HOST'],'data':{'unitID':this['_unitID'],'userID':this['_collabSession'][_0x3207db(0x1a4)]()}},this[_0x3207db(0x1de)]);}['stopPresenting'](){const _0x5f2dc5=_0x43267f;this[_0x5f2dc5(0x19c)]===_0x5f2dc5(0x1b7)&&(this['_status$'][_0x5f2dc5(0x201)](_0x5f2dc5(0x1f3)),this[_0x5f2dc5(0x1c6)][_0x5f2dc5(0x17f)]({'eventID':CollaborationEvent[_0x5f2dc5(0x1d0)],'data':{'unitID':this[_0x5f2dc5(0x1de)]}},this['_unitID']));}['startFollowing'](){const _0x6cb0c4=_0x43267f;if(this[_0x6cb0c4(0x19c)]!==_0x6cb0c4(0x19f))return;this[_0x6cb0c4(0x1ad)]['next']('following'),this['_startFollowing']();}['stopFollowing'](){const _0x3f8a44=_0x43267f;if(this[_0x3f8a44(0x19c)]!=='following')return;this[_0x3f8a44(0x1ae)]();}[_0x43267f(0x179)](_0x1393a8){const _0x5be0cc=_0x43267f,{presenter:_0x473290}=_0x1393a8['data'],_0x4d56d6=this[_0x5be0cc(0x1c6)]['getMemberID']();this[_0x5be0cc(0x194)]=_0x473290;if(_0x473290===_0x4d56d6)this[_0x5be0cc(0x1ae)](),this[_0x5be0cc(0x205)]();else this[_0x5be0cc(0x19c)]!==_0x5be0cc(0x19f)&&(this[_0x5be0cc(0x1d2)](),this['_startFollowing']());}[_0x43267f(0x199)](){const _0x260446=_0x43267f,_0x54b420={'eventID':CollaborationEvent['LIVESHARE_FETCH_OPERATIONS']};this['_collabSession'][_0x260446(0x17f)](_0x54b420,this[_0x260446(0x1de)]);}[_0x43267f(0x195)](){const _0x4f0d63=_0x43267f;this[_0x4f0d63(0x194)]=null;if(this[_0x4f0d63(0x19c)]!==_0x4f0d63(0x1b7))this[_0x4f0d63(0x19b)]();}['_handleNewChangeSets'](_0x5132eb){const _0x5c9ce7=_0x43267f;if(this[_0x5c9ce7(0x19c)]===_0x5c9ce7(0x1e2)&&this[_0x5c9ce7(0x194)]===_0x5132eb[_0x5c9ce7(0x1bf)][_0x5c9ce7(0x1a9)]){const _0x2a1c4=parseProtocolChangeset(_0x5132eb['data'])['mutations'][_0x5c9ce7(0x1fb)]()[_0x5c9ce7(0x19a)](_0x6e761=>_0x6e761['id']===InsertSheetMutation['id']);if(_0x2a1c4){const _0x4e2ab8=_0x2a1c4['params'][_0x5c9ce7(0x204)],_0x3e70b6=_0x2a1c4[_0x5c9ce7(0x17c)][_0x5c9ce7(0x1e7)]['id'];setTimeout(()=>{const _0x4a583b=_0x5c9ce7;this[_0x4a583b(0x1d7)][_0x4a583b(0x19e)](SetWorksheetActiveOperation['id'],{'unitId':_0x4e2ab8,'subUnitId':_0x3e70b6},{'fromCollab':!![]});});}}}['_startPresenting'](){const _0x352bb0=_0x43267f;this[_0x352bb0(0x1ad)][_0x352bb0(0x201)](_0x352bb0(0x1b7));const _0x3138d2=new Map(),_0x447d4e=this[_0x352bb0(0x1ed)]=new DisposableCollection();_0x447d4e[_0x352bb0(0x183)](toDisposable(()=>{const _0x298c6a=_0x352bb0;_0x3138d2[_0x298c6a(0x1fc)](_0x3c9296=>_0x3c9296[_0x298c6a(0x1f2)]()),_0x3138d2['clear']();})),_0x447d4e[_0x352bb0(0x183)](this[_0x352bb0(0x1d7)][_0x352bb0(0x1b5)](_0x5c0668=>{const _0x308d65=_0x352bb0;if(_0x5c0668['type']!==CommandType[_0x308d65(0x1f7)]||!this[_0x308d65(0x1cc)]['shouldShareOperation'](_0x5c0668['id']))return;const {id:_0x5ce639}=_0x5c0668;let _0x483408;if(!_0x3138d2[_0x308d65(0x1cf)](_0x5ce639)){var _0x347730;_0x483408=new Subject(),_0x3138d2[_0x308d65(0x1e8)](_0x5ce639,_0x483408),_0x483408['pipe'](throttleTime((_0x347730=this[_0x308d65(0x1ec)][_0x308d65(0x185)](_0x308d65(0x1e4)))!==null&&_0x347730!==void 0x0?_0x347730:DEFAULT_SAME_OPERATION_SHARE_INTERVAL,void 0x0,{'trailing':!![],'leading':!![]}))[_0x308d65(0x20b)](_0x4a1dcd=>{const _0x272a2d=_0x308d65;this[_0x272a2d(0x1c6)][_0x272a2d(0x17f)]({'eventID':CollaborationEvent[_0x272a2d(0x192)],'data':{'unitID':this[_0x272a2d(0x1de)],'operations':{[_0x4a1dcd['id']]:{'id':_0x4a1dcd['id'],'params':JSON['stringify'](_0x4a1dcd[_0x272a2d(0x17c)])}}}},this[_0x272a2d(0x1de)]);});}else _0x483408=_0x3138d2['get'](_0x5ce639);_0x483408[_0x308d65(0x201)](_0x5c0668);})),this[_0x352bb0(0x1cc)][_0x352bb0(0x1e9)](this[_0x352bb0(0x1de)])['forEach'](_0x2d34e1=>this['_collabSession'][_0x352bb0(0x17f)]({'eventID':CollaborationEvent[_0x352bb0(0x192)],'data':{'unitID':this[_0x352bb0(0x1de)],'operations':{[_0x2d34e1['id']]:{'id':_0x2d34e1['id'],'params':JSON[_0x352bb0(0x1e6)](_0x2d34e1['params'])}}}},this['_unitID']));}[_0x43267f(0x1d2)](){const _0x9481db=_0x43267f;var _0x3d90fb;this['_status$'][_0x9481db(0x201)](_0x9481db(0x1f3)),(_0x3d90fb=this[_0x9481db(0x1ed)])===null||_0x3d90fb===void 0x0||_0x3d90fb[_0x9481db(0x1ce)](),this['_commandDisposable']=null;}[_0x43267f(0x1d8)](){const _0x1437d8=_0x43267f;var _0x261bdd;(_0x261bdd=this[_0x1437d8(0x1ed)])===null||_0x261bdd===void 0x0||_0x261bdd[_0x1437d8(0x1ce)](),this['_status$'][_0x1437d8(0x201)](_0x1437d8(0x1e2));}['_beIdle'](){const _0x538408=_0x43267f;var _0x2434d1;this[_0x538408(0x1ad)][_0x538408(0x201)](_0x538408(0x1f3)),(_0x2434d1=this[_0x538408(0x1ed)])===null||_0x2434d1===void 0x0||_0x2434d1[_0x538408(0x1ce)](),this[_0x538408(0x1ed)]=null;}['_stopFollowing'](){const _0xfd6c91=_0x43267f;var _0x6b0a87;this[_0xfd6c91(0x1ad)][_0xfd6c91(0x201)]('not-following'),(_0x6b0a87=this[_0xfd6c91(0x1ed)])===null||_0x6b0a87===void 0x0||_0x6b0a87[_0xfd6c91(0x1ce)]();}[_0x43267f(0x190)](_0x4f7def){const _0xe4d062=_0x43267f;if([_0xe4d062(0x1b7),'not-following',_0xe4d062(0x1f8)]['includes'](this[_0xe4d062(0x19c)]))return;if(!_0x4f7def[_0xe4d062(0x1bf)][_0xe4d062(0x17a)]||_0x4f7def[_0xe4d062(0x1bf)][_0xe4d062(0x17a)]===this[_0xe4d062(0x1c6)][_0xe4d062(0x1a4)]())return;if(this['_status']===_0xe4d062(0x1f3))this[_0xe4d062(0x1d8)]();const _0x501e4d=_0x4f7def[_0xe4d062(0x1bf)]['operations'];Object[_0xe4d062(0x202)](_0x501e4d)[_0xe4d062(0x1fc)](_0x25efbf=>{const _0x2692fa=_0xe4d062;this[_0x2692fa(0x1d7)][_0x2692fa(0x19e)](_0x25efbf['id'],_0x25efbf['params']?JSON[_0x2692fa(0x17b)](_0x25efbf[_0x2692fa(0x17c)]):null,{'fromCollab':!![]});});}['_handleOffline'](){const _0x498524=_0x43267f;var _0x2c2652;this[_0x498524(0x1ad)][_0x498524(0x201)]('offline'),(_0x2c2652=this['_commandDisposable'])===null||_0x2c2652===void 0x0||_0x2c2652[_0x498524(0x1ce)]();}[_0x43267f(0x178)](){const _0x2213d1=_0x43267f;this[_0x2213d1(0x1ad)][_0x2213d1(0x201)](_0x2213d1(0x1f3)),this[_0x2213d1(0x199)]();}};LiveShareCoordinator=__decorate([__decorateParam(0x2,IConfigService),__decorateParam(0x3,Inject(LiveShareService)),__decorateParam(0x4,ICommandService)],LiveShareCoordinator);function LiveShare(){const _0x5915e1=_0x43267f,_0x379895=useDependency(LiveShareController),_0x388630=useDependency(IUniverInstanceService),_0xdfd42=useObservable(()=>_0x388630[_0x5915e1(0x1ee)](UniverInstanceType[_0x5915e1(0x1a8)]),void 0x0,![],[]),[_0x4a50e5,_0x4b0bfe]=useState(null),[_0x58567e,_0x2ea0aa]=useState(_0x5915e1(0x1f3)),_0x3c623e=useRef(null);useEffect(()=>{const _0x11c4e8=_0x5915e1;if(_0xdfd42)_0x379895[_0x11c4e8(0x209)](_0xdfd42[_0x11c4e8(0x1da)]())[_0x11c4e8(0x1f1)](_0x508ef6=>{const _0x35fa11=_0x11c4e8;_0x4b0bfe(_0x508ef6),_0x3c623e['current']=_0x508ef6[_0x35fa11(0x1a6)][_0x35fa11(0x20b)](_0x201338=>{_0x2ea0aa(_0x201338);});});return()=>{const _0x1ea090=_0x11c4e8;var _0x2cdb36;(_0x2cdb36=_0x3c623e[_0x1ea090(0x191)])===null||_0x2cdb36===void 0x0||_0x2cdb36[_0x1ea090(0x208)](),_0x3c623e['current']=null;};},[_0xdfd42,_0x379895]);if(!_0x4a50e5)return null;return jsx(Dropdown,{'align':_0x5915e1(0x1bd),'disabled':_0x58567e==='offline','className':_0x5915e1(0x1af),'overlay':jsx(LiveShareDropdown,{'status':_0x58567e,'coordinator':_0x4a50e5}),'children':jsx(_0x5915e1(0x18e),{'className':clsx(_0x5915e1(0x18b),{'univer-cursor-not-allowed':_0x58567e===_0x5915e1(0x1f8),'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x58567e!=='offline'}),'type':_0x5915e1(0x18e),'children':jsx(LiveShareIcon,{'className':'univer-size-4'})})});}function LiveShareDropdown(_0x581a0f){const _0x3f13f6=_0x43267f,{status:_0x3beb37,coordinator:_0x52fff9}=_0x581a0f;switch(_0x3beb37){case _0x3f13f6(0x1f3):return jsx(Idle,{'coordinator':_0x52fff9});case _0x3f13f6(0x1e2):return jsx(Following,{'coordinator':_0x52fff9});case _0x3f13f6(0x19f):return jsx(NotFollowing,{'coordinator':_0x52fff9});case _0x3f13f6(0x1f8):return jsx(Offline,{});case _0x3f13f6(0x1b7):return jsx(Presenting,{'coordinator':_0x52fff9});default:return null;}}function Idle(_0x24c505){const _0x18e90c=_0x43267f,{coordinator:_0x44c050}=_0x24c505;return jsxs(Fragment,{'children':[jsx(_0x18e90c(0x1a7),{'className':_0x18e90c(0x1c5),'children':_0x18e90c(0x1a5)}),jsx(Button,{'onClick':()=>_0x44c050[_0x18e90c(0x1dd)](),'children':'Start'})]});}function Following(_0x40ab51){const _0x95a466=_0x43267f,{coordinator:_0x3700d7}=_0x40ab51;return jsxs(Fragment,{'children':[jsx(_0x95a466(0x1a7),{'className':_0x95a466(0x1c5),'children':_0x95a466(0x177)}),jsx(Button,{'onClick':()=>_0x3700d7[_0x95a466(0x1ba)](),'children':_0x95a466(0x1b8)})]});}function NotFollowing(_0x1a1126){const _0x7075a8=_0x43267f,{coordinator:_0x43a13a}=_0x1a1126;return jsxs(Fragment,{'children':[jsx('div',{'className':_0x7075a8(0x1c5),'children':'You\x27re\x20not\x20following\x20the\x20presenter'}),jsx(Button,{'variant':'text','onClick':()=>_0x43a13a[_0x7075a8(0x18d)](),'children':_0x7075a8(0x1bb)})]});}function Presenting(_0x211314){const _0x341385=_0x43267f,{coordinator:_0x54a9f1}=_0x211314;return jsxs(Fragment,{'children':[jsx(_0x341385(0x1a7),{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':'You\x27re\x20presenting\x20the\x20document'}),jsx(Button,{'variant':_0x341385(0x1d3),'onClick':()=>_0x54a9f1['stopPresenting'](),'children':_0x341385(0x19d)})]});}function Offline(){const _0x5dd2da=_0x43267f;return jsx(Fragment,{'children':_0x5dd2da(0x1f6)});}let DesktopLiveShareController=class DesktopLiveShareController extends Disposable{constructor(_0xdf0abc,_0x755738){const _0x1057fa=_0x43267f;super(),this[_0x1057fa(0x1c2)]=_0xdf0abc,this[_0x1057fa(0x1d5)]=_0x755738,this[_0x1057fa(0x1f0)]();}['_mountLiveShare'](){const _0x227705=_0x43267f;this['disposeWithMe'](this[_0x227705(0x1d5)][_0x227705(0x1d4)](BuiltInUIPart[_0x227705(0x1eb)],()=>connectInjector(LiveShare,this[_0x227705(0x1c2)])));}};DesktopLiveShareController=__decorate([__decorateParam(0x0,Inject(Injector)),__decorateParam(0x1,IUIPartsService)],DesktopLiveShareController);var name=_0x43267f(0x1cb),version=_0x43267f(0x186);const LIVE_SHARE_PLUGIN_CONFIG_KEY=_0x43267f(0x1aa),configSymbol=Symbol(LIVE_SHARE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let LiveShareCoreExtensionsController=class LiveShareCoreExtensionsController extends Disposable{constructor(_0x2ea649){const _0x568715=_0x43267f;super(),this[_0x568715(0x1cc)]=_0x2ea649,this['_init']();}[_0x43267f(0x1e3)](){const _0x6b076e=_0x43267f;[SetZoomRatioOperation['id'],SetScrollOperation['id'],SetWorksheetActiveOperation['id']][_0x6b076e(0x1fc)](_0x59da6f=>{const _0x1f6df7=_0x6b076e;this[_0x1f6df7(0x1b4)](this[_0x1f6df7(0x1cc)]['registerSharedOperation'](_0x59da6f));});}};LiveShareCoreExtensionsController=__decorate([__decorateParam(0x0,Inject(LiveShareService))],LiveShareCoreExtensionsController);let UniverLiveSharePlugin=class UniverLiveSharePlugin extends Plugin{constructor(_0x49a16f=defaultPluginConfig,_0x292932,_0x12bbce){const _0xa6a956=_0x43267f;super(),this[_0xa6a956(0x1c3)]=_0x49a16f,this[_0xa6a956(0x1c2)]=_0x292932,this[_0xa6a956(0x1ec)]=_0x12bbce;const {..._0x173411}=merge({},defaultPluginConfig,this[_0xa6a956(0x1c3)]);this[_0xa6a956(0x1ec)][_0xa6a956(0x1fe)](LIVE_SHARE_PLUGIN_CONFIG_KEY,_0x173411);}[_0x43267f(0x182)](){const _0x1dde58=_0x43267f;registerDependencies(this['_injector'],mergeOverrideWithDependencies([[LiveShareService],[LiveShareController],[LiveShareCoreExtensionsController],[DesktopLiveShareController]],this[_0x1dde58(0x1c3)][_0x1dde58(0x1b0)])),touchDependencies(this[_0x1dde58(0x1c2)],[[LiveShareCoreExtensionsController]]);}[_0x43267f(0x196)](){touchDependencies(this['_injector'],[[DesktopLiveShareController]]);}};_defineProperty(UniverLiveSharePlugin,_0x43267f(0x188),UniverInstanceType[_0x43267f(0x1d9)]),_defineProperty(UniverLiveSharePlugin,_0x43267f(0x18a),'UNIVER_LIVE_SHARE_PLUGIN'),_defineProperty(UniverLiveSharePlugin,_0x43267f(0x189),name),_defineProperty(UniverLiveSharePlugin,'version',version),UniverLiveSharePlugin=__decorate([DependentOn(UniverCollaborationClientPlugin),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,IConfigService)],UniverLiveSharePlugin);function _0x6cd2(){const _0x1b33c6=['decorate','_entities','send','getStatus','length','onStarting','add','PRESENTING','getConfig','0.22.1','from','type','packageName','pluginName','univer-border-none\x20univer-text-gray-600\x20univer-outline-none','_handleOffline','startFollowing','button','requireSession','_handleOperation','current','LIVESHARE_OPERATION','80528zMGMbf','_presenter','_handleTerminate','onRendered','getTypeOfUnitAdded$','_handleNewChangeSets','_fetchOperations','find','_beIdle','_status','Stop\x20presenting','executeCommand','not-following','object','map','getOwnPropertyDescriptor','6GCpiuj','getMemberID','Present\x20this\x20document','status$','div','UNIVER_SHEET','memberID','live-share.config','constructor','_reporters','_status$','_stopFollowing','univer-box-border\x20univer-min-w-60\x20univer-bg-gray-900\x20univer-px-4\x20univer-py-3\x20univer-text-gray-900\x20dark:!univer-bg-white\x20dark:!univer-text-white','override','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','symbol','sessionStatus$','disposeWithMe','onCommandExecuted','_collabSessionService','presenting','Stop\x20following','197486zrbRia','stopFollowing','Start\x20following','unit','end','dispose$','data','13VzTpHT','ONLINE','_injector','_config','defineProperty','univer-mb-3\x20univer-w-full\x20univer-text-sm','_collabSession','toPrimitive','prototype','5741336luInEw','registerInitialStateReporter','@univerjs-pro/live-share','_liveShareService','get','dispose','has','LIVESHARE_TERMINATE','_startLiveShareCoordinator','_stopPresenting','default','registerComponent','_uiPartsService','_univerInstanceService','_commandService','_startFollowing','UNIVER_UNKNOWN','getUnitId','registerSharedOperation','string','tryStartPresenting','_unitID','event$','NOT_FOLLOWING','pipe','following','_init','SAME_OPERATION_SHARE_INTERVAL','32865Pimxjy','stringify','sheet','set','getInitialStates','createInstance','HEADER_MENU','_configService','_commandDisposable','getCurrentTypeOfUnit$','function','_mountLiveShare','then','complete','idle','getValue','OFFLINE','You\x27are\x20offline.','OPERATION','offline','9PQLGOB','_sharedOperations','reverse','forEach','init','setConfig','getLiveShareCoordinatorSync','delete','next','values','asObservable','unitId','_startPresenting','215lnipAF','39734574xvxeGL','unsubscribe','getLiveShareCoordinator','6694850nowrcj','subscribe','5409166rRKXbR','You\x27re\x20following\x20the\x20presenter','_handleOnline','_handleNewHost','presenter','parse','params'];_0x6cd2=function(){return _0x1b33c6;};return _0x6cd2();}export{DesktopLiveShareController,LiveShare,LiveShareController,LiveShareCoordinator,LiveShareService,LiveShareStatus,UniverLiveSharePlugin};
|
|
1
|
+
const _0x47c8f1=_0x2cb1;(function(_0x5eb62a,_0x5b0056){const _0x4aa4e3=_0x2cb1,_0x157e58=_0x5eb62a();while(!![]){try{const _0x416ffb=parseInt(_0x4aa4e3(0x1a1))/0x1*(parseInt(_0x4aa4e3(0x1a7))/0x2)+-parseInt(_0x4aa4e3(0x186))/0x3*(parseInt(_0x4aa4e3(0x1ee))/0x4)+parseInt(_0x4aa4e3(0x168))/0x5+-parseInt(_0x4aa4e3(0x1e2))/0x6*(-parseInt(_0x4aa4e3(0x182))/0x7)+parseInt(_0x4aa4e3(0x1a5))/0x8+parseInt(_0x4aa4e3(0x194))/0x9+parseInt(_0x4aa4e3(0x1e8))/0xa;if(_0x416ffb===_0x5b0056)break;else _0x157e58['push'](_0x157e58['shift']());}catch(_0x449804){_0x157e58['push'](_0x157e58['shift']());}}}(_0x2c99,0xdf190));import{CommandType as _0x5d2120,DependentOn as _0x59adfd,Disposable as _0x1ae5c9,DisposableCollection as _0x44dd53,ICommandService as _0x527d3d,IConfigService as _0x32448a,IUniverInstanceService as _0x550d63,Inject as _0x185b21,Injector as _0x9c4b6c,Plugin as _0x26cc12,RxDisposable as _0x52e06e,UniverInstanceType as _0x263358,merge as _0x30c7a2,mergeOverrideWithDependencies as _0x3b3145,registerDependencies as _0x47ae4f,toDisposable as _0x548d4a,touchDependencies as _0x188f9e}from'@univerjs/core';import{BuiltInUIPart as _0x5cc6a7,IUIPartsService as _0x428097,connectInjector as _0x3b2d74,useDependency as _0x30ee2b,useObservable as _0x3b1813}from'@univerjs/ui';import{Button as _0x3413ea,Dropdown as _0x1af53e,clsx as _0xb8b532}from'@univerjs/design';import{LiveShareIcon as _0x325dc8}from'@univerjs/icons';import{useEffect as _0x449652,useRef as _0x3db5c6,useState as _0x365589}from'react';import{CollaborationEvent as _0x44d91d,parseProtocolChangeset as _0x299112}from'@univerjs-pro/collaboration';import{CollaborationSessionService as _0x308a34,SessionStatus as _0x524a73,UniverCollaborationClientPlugin as _0x539a49}from'@univerjs-pro/collaboration-client';import{InsertSheetMutation as _0x11f332,SetWorksheetActiveOperation as _0x438a7e}from'@univerjs/sheets';import{BehaviorSubject as _0x1c9a2e,Subject as _0xd312cf}from'rxjs';import{takeUntil as _0x5b1337,throttleTime as _0x35625e}from'rxjs/operators';import{Fragment as _0x5051ba,jsx as _0x4f521d,jsxs as _0x49e20e}from'react/jsx-runtime';import{SetScrollOperation as _0x42382e,SetZoomRatioOperation as _0xda8886}from'@univerjs/sheets-ui';function L(_0x3f8a9e){'@babel/helpers - typeof';const _0x4ac844=_0x2cb1;return L=typeof Symbol==_0x4ac844(0x1eb)&&typeof Symbol['iterator']==_0x4ac844(0x1e7)?function(_0x2c3bce){return typeof _0x2c3bce;}:function(_0x14c960){const _0x46e782=_0x4ac844;return _0x14c960&&typeof Symbol==_0x46e782(0x1eb)&&_0x14c960[_0x46e782(0x195)]===Symbol&&_0x14c960!==Symbol[_0x46e782(0x1ce)]?_0x46e782(0x1e7):typeof _0x14c960;},L(_0x3f8a9e);}function R(_0x443c10,_0x2707c5){const _0x4bd19b=_0x2cb1;if(L(_0x443c10)!=_0x4bd19b(0x1c4)||!_0x443c10)return _0x443c10;var _0x277b7a=_0x443c10[Symbol[_0x4bd19b(0x1d6)]];if(_0x277b7a!==void 0x0){var _0x15b695=_0x277b7a['call'](_0x443c10,_0x2707c5||_0x4bd19b(0x1b5));if(L(_0x15b695)!=_0x4bd19b(0x1c4))return _0x15b695;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x2707c5===_0x4bd19b(0x169)?String:Number)(_0x443c10);}function z(_0x4c1fea){const _0x445e39=_0x2cb1;var _0x1fd6d5=R(_0x4c1fea,_0x445e39(0x169));return L(_0x1fd6d5)==_0x445e39(0x1e7)?_0x1fd6d5:_0x1fd6d5+'';}function B(_0x1ca2e7,_0x3cc66c,_0x48a143){const _0x2174a1=_0x2cb1;return(_0x3cc66c=z(_0x3cc66c))in _0x1ca2e7?Object[_0x2174a1(0x1aa)](_0x1ca2e7,_0x3cc66c,{'value':_0x48a143,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1ca2e7[_0x3cc66c]=_0x48a143,_0x1ca2e7;}var V=class extends _0x1ae5c9{constructor(..._0x9e0232){const _0x148746=_0x2cb1;super(..._0x9e0232),B(this,_0x148746(0x185),new Set()),B(this,_0x148746(0x19b),new Set());}[_0x47c8f1(0x1bc)](_0x3d5023){const _0x513947=_0x47c8f1;return this['_sharedOperations']['add'](_0x3d5023),_0x548d4a(()=>this[_0x513947(0x185)][_0x513947(0x1cf)](_0x3d5023));}[_0x47c8f1(0x1c2)](_0x4e64d3){const _0x385e00=_0x47c8f1;return this[_0x385e00(0x19b)][_0x385e00(0x18b)](_0x4e64d3),_0x548d4a(()=>this[_0x385e00(0x19b)][_0x385e00(0x1cf)](_0x4e64d3));}['shouldShareOperation'](_0x218ef3){const _0x5b4a01=_0x47c8f1;return this[_0x5b4a01(0x185)]['has'](_0x218ef3);}[_0x47c8f1(0x1ad)](_0x34e32f){const _0x7b7120=_0x47c8f1;return Array[_0x7b7120(0x1a2)](this['_reporters'])[_0x7b7120(0x17e)](_0x45622a=>_0x45622a(_0x34e32f));}};function H(_0x45a933,_0x498894){return function(_0x1a0349,_0x423ec3){_0x498894(_0x1a0349,_0x423ec3,_0x45a933);};}function U(_0x52438c,_0xb9bd53,_0x3a3bbb,_0x4a53f8){const _0x4a70ea=_0x47c8f1;var _0x5b50a9=arguments[_0x4a70ea(0x18e)],_0x5e1d6a=_0x5b50a9<0x3?_0xb9bd53:_0x4a53f8===null?_0x4a53f8=Object[_0x4a70ea(0x175)](_0xb9bd53,_0x3a3bbb):_0x4a53f8,_0x32188a;if(typeof Reflect==_0x4a70ea(0x1c4)&&typeof Reflect['decorate']==_0x4a70ea(0x1eb))_0x5e1d6a=Reflect[_0x4a70ea(0x1f0)](_0x52438c,_0xb9bd53,_0x3a3bbb,_0x4a53f8);else{for(var _0x3a9a5c=_0x52438c[_0x4a70ea(0x18e)]-0x1;_0x3a9a5c>=0x0;_0x3a9a5c--)(_0x32188a=_0x52438c[_0x3a9a5c])&&(_0x5e1d6a=(_0x5b50a9<0x3?_0x32188a(_0x5e1d6a):_0x5b50a9>0x3?_0x32188a(_0xb9bd53,_0x3a3bbb,_0x5e1d6a):_0x32188a(_0xb9bd53,_0x3a3bbb))||_0x5e1d6a);}return _0x5b50a9>0x3&&_0x5e1d6a&&Object[_0x4a70ea(0x1aa)](_0xb9bd53,_0x3a3bbb,_0x5e1d6a),_0x5e1d6a;}let W=class extends _0x52e06e{constructor(_0x18640b,_0x332e21,_0x4a8660){const _0x1d285a=_0x47c8f1;super(),this[_0x1d285a(0x1ea)]=_0x18640b,this['_injector']=_0x332e21,this[_0x1d285a(0x1e3)]=_0x4a8660,B(this,_0x1d285a(0x1e9),new Map()),this[_0x1d285a(0x1cc)]();}async[_0x47c8f1(0x1d5)](_0x1b64d9){const _0xbe3015=_0x47c8f1;return this['_entities'][_0xbe3015(0x1f3)](_0x1b64d9)||await this[_0xbe3015(0x1cb)](_0x1b64d9),this['_entities']['get'](_0x1b64d9);}[_0x47c8f1(0x1a9)](_0x2da612){const _0x55b93d=_0x47c8f1;var _0x16348f;return(_0x16348f=this[_0x55b93d(0x1e9)][_0x55b93d(0x192)](_0x2da612))==null?null:_0x16348f;}['_init'](){const _0x5354b9=_0x47c8f1;this[_0x5354b9(0x1ea)][_0x5354b9(0x1f2)](_0x263358['UNIVER_SHEET'])['pipe'](_0x5b1337(this['dispose$']))['subscribe'](async _0x383752=>{const _0x1869d9=_0x5354b9;let _0x47c0e7=_0x383752[_0x1869d9(0x1d3)][_0x1869d9(0x19c)]();this[_0x1869d9(0x1e9)][_0x1869d9(0x1f3)](_0x47c0e7)||this[_0x1869d9(0x1cb)](_0x47c0e7);}),this[_0x5354b9(0x1ea)][_0x5354b9(0x18d)](_0x263358[_0x5354b9(0x1d1)])[_0x5354b9(0x1da)](_0x5b1337(this[_0x5354b9(0x199)]))['subscribe'](_0x4213b8=>{const _0x3b6e17=_0x5354b9;let _0x3fd502=_0x4213b8['getUnitId'](),_0x2b5cb4=this['_entities'][_0x3b6e17(0x192)](_0x3fd502);_0x2b5cb4==null||_0x2b5cb4[_0x3b6e17(0x1c1)]();});}async[_0x47c8f1(0x1cb)](_0x11880c){const _0x467dab=_0x47c8f1;let _0x1945af=await this[_0x467dab(0x1e3)][_0x467dab(0x17b)](_0x11880c),_0x17426d=this[_0x467dab(0x1a3)][_0x467dab(0x1b4)](K,_0x11880c,_0x1945af);return _0x17426d[_0x467dab(0x16a)](),this[_0x467dab(0x1e9)][_0x467dab(0x172)](_0x11880c,_0x17426d),_0x17426d;}};W=U([H(0x0,_0x550d63),H(0x1,_0x185b21(_0x9c4b6c)),H(0x2,_0x185b21(_0x308a34))],W);let G=function(_0x5811f2){const _0x21a8d8=_0x47c8f1;return _0x5811f2[_0x21a8d8(0x191)]=_0x21a8d8(0x17a),_0x5811f2[_0x21a8d8(0x1ac)]=_0x21a8d8(0x1b1),_0x5811f2['FOLLOWING']='following',_0x5811f2[_0x21a8d8(0x1c6)]=_0x21a8d8(0x1bb),_0x5811f2[_0x21a8d8(0x1d0)]='presenting',_0x5811f2;}({}),K=class extends _0x52e06e{get['_status'](){return this['_status$']['getValue']();}constructor(_0x2ae9ac,_0x45e7ec,_0x5a7aa4,_0x3e9955,_0x54343c){const _0x17862c=_0x47c8f1;super(),this[_0x17862c(0x167)]=_0x2ae9ac,this[_0x17862c(0x1b9)]=_0x45e7ec,this[_0x17862c(0x18c)]=_0x5a7aa4,this['_liveShareService']=_0x3e9955,this['_commandService']=_0x54343c,B(this,_0x17862c(0x183),new _0x1c9a2e(_0x17862c(0x1b1))),B(this,_0x17862c(0x16e),this[_0x17862c(0x183)][_0x17862c(0x1c9)]()),B(this,_0x17862c(0x1cc),!0x1),B(this,_0x17862c(0x184),null),B(this,_0x17862c(0x1c8),null);}[_0x47c8f1(0x1c1)](){const _0x1261d2=_0x47c8f1;var _0x2a7904;(_0x2a7904=this[_0x1261d2(0x184)])==null||_0x2a7904[_0x1261d2(0x1c1)](),this['_status$'][_0x1261d2(0x16b)](_0x1261d2(0x1b1)),this['_status$'][_0x1261d2(0x180)]();}['getStatus'](){const _0x2ecc52=_0x47c8f1;return this[_0x2ecc52(0x170)];}[_0x47c8f1(0x16a)](){const _0x2bbfb8=_0x47c8f1;this[_0x2bbfb8(0x1cc)]||(this[_0x2bbfb8(0x1cc)]=!0x0,this[_0x2bbfb8(0x1b9)][_0x2bbfb8(0x179)][_0x2bbfb8(0x1da)](_0x5b1337(this[_0x2bbfb8(0x199)]))[_0x2bbfb8(0x19d)](_0x13a848=>{const _0x169b16=_0x2bbfb8;switch(_0x13a848){case _0x524a73[_0x169b16(0x191)]:this['_handleOffline']();break;case _0x524a73['ONLINE']:this[_0x169b16(0x1bd)]();break;default:}}),this[_0x2bbfb8(0x1b9)]['event$'][_0x2bbfb8(0x1da)](_0x5b1337(this[_0x2bbfb8(0x199)]))[_0x2bbfb8(0x19d)](_0x18f599=>{const _0x58af88=_0x2bbfb8;let {eventID:_0x79cc9b}=_0x18f599;switch(_0x79cc9b){case _0x44d91d['LIVESHARE_NEW_HOST']:this[_0x58af88(0x189)](_0x18f599);break;case _0x44d91d[_0x58af88(0x1ef)]:this[_0x58af88(0x177)](_0x18f599);break;case _0x44d91d[_0x58af88(0x18f)]:this[_0x58af88(0x198)]();break;case _0x44d91d[_0x58af88(0x1e1)]:this['_handleNewChangeSets'](_0x18f599);break;default:}}));}['tryStartPresenting'](){const _0x4fc86d=_0x47c8f1;this[_0x4fc86d(0x1b9)][_0x4fc86d(0x1b3)]({'eventID':_0x44d91d[_0x4fc86d(0x1d4)],'data':{'unitID':this[_0x4fc86d(0x167)],'userID':this[_0x4fc86d(0x1b9)]['getMemberID']()}},this['_unitID']);}[_0x47c8f1(0x1b0)](){const _0xee72a9=_0x47c8f1;this[_0xee72a9(0x170)]===_0xee72a9(0x1df)&&(this[_0xee72a9(0x183)]['next'](_0xee72a9(0x1b1)),this[_0xee72a9(0x1b9)][_0xee72a9(0x1b3)]({'eventID':_0x44d91d[_0xee72a9(0x18f)],'data':{'unitID':this[_0xee72a9(0x167)]}},this[_0xee72a9(0x167)]));}['startFollowing'](){const _0xfb20e1=_0x47c8f1;this[_0xfb20e1(0x170)]===_0xfb20e1(0x1bb)&&(this['_status$']['next']('following'),this[_0xfb20e1(0x1c3)]());}[_0x47c8f1(0x1a6)](){const _0x519ddb=_0x47c8f1;this[_0x519ddb(0x170)]===_0x519ddb(0x1cd)&&this[_0x519ddb(0x173)]();}['_handleNewHost'](_0x967035){const _0x3c2ae8=_0x47c8f1;let {presenter:_0x2e162d}=_0x967035['data'],_0x4f48f4=this[_0x3c2ae8(0x1b9)]['getMemberID']();this[_0x3c2ae8(0x1c8)]=_0x2e162d,_0x2e162d===_0x4f48f4?(this[_0x3c2ae8(0x173)](),this[_0x3c2ae8(0x181)]()):this[_0x3c2ae8(0x170)]!=='not-following'&&(this['_stopPresenting'](),this['_startFollowing']());}[_0x47c8f1(0x19f)](){const _0x3c4f09=_0x47c8f1;let _0x57aad0={'eventID':_0x44d91d['LIVESHARE_FETCH_OPERATIONS']};this[_0x3c4f09(0x1b9)][_0x3c4f09(0x1b3)](_0x57aad0,this[_0x3c4f09(0x167)]);}[_0x47c8f1(0x198)](){const _0x5849b4=_0x47c8f1;this[_0x5849b4(0x1c8)]=null,this[_0x5849b4(0x170)]!=='presenting'&&this[_0x5849b4(0x1e0)]();}['_handleNewChangeSets'](_0x4ec5ff){const _0x4bf4bf=_0x47c8f1;if(this[_0x4bf4bf(0x170)]==='following'&&this[_0x4bf4bf(0x1c8)]===_0x4ec5ff['data'][_0x4bf4bf(0x1d2)]){let _0x4e54bd=_0x299112(_0x4ec5ff['data'])['mutations']['reverse']()['find'](_0x402df7=>_0x402df7['id']===_0x11f332['id']);if(_0x4e54bd){let _0x1014a0=_0x4e54bd[_0x4bf4bf(0x171)][_0x4bf4bf(0x1f4)],_0x5be2ca=_0x4e54bd[_0x4bf4bf(0x171)][_0x4bf4bf(0x176)]['id'];setTimeout(()=>{const _0x28c864=_0x4bf4bf;this[_0x28c864(0x187)][_0x28c864(0x16d)](_0x438a7e['id'],{'unitId':_0x1014a0,'subUnitId':_0x5be2ca},{'fromCollab':!0x0});});}}}['_startPresenting'](){const _0x15efdf=_0x47c8f1;this['_status$']['next'](_0x15efdf(0x1df));let _0x17d7f3=new Map(),_0x21331a=this['_commandDisposable']=new _0x44dd53();_0x21331a[_0x15efdf(0x18b)](_0x548d4a(()=>{const _0x21c8f6=_0x15efdf;_0x17d7f3[_0x21c8f6(0x17f)](_0x22f94f=>_0x22f94f[_0x21c8f6(0x180)]()),_0x17d7f3[_0x21c8f6(0x1be)]();})),_0x21331a[_0x15efdf(0x18b)](this['_commandService'][_0x15efdf(0x17d)](_0x3362c9=>{const _0x2b4ac1=_0x15efdf;if(_0x3362c9[_0x2b4ac1(0x1a8)]!==_0x5d2120[_0x2b4ac1(0x1a0)]||!this[_0x2b4ac1(0x1ca)]['shouldShareOperation'](_0x3362c9['id']))return;let {id:_0x315a9e}=_0x3362c9,_0x568524;if(_0x17d7f3[_0x2b4ac1(0x1f3)](_0x315a9e))_0x568524=_0x17d7f3['get'](_0x315a9e);else{var _0x51d409;_0x568524=new _0xd312cf(),_0x17d7f3['set'](_0x315a9e,_0x568524),_0x568524[_0x2b4ac1(0x1da)](_0x35625e((_0x51d409=this[_0x2b4ac1(0x18c)]['getConfig']('SAME_OPERATION_SHARE_INTERVAL'))==null?0xc8:_0x51d409,void 0x0,{'trailing':!0x0,'leading':!0x0}))[_0x2b4ac1(0x19d)](_0x3570d5=>{const _0x5feba1=_0x2b4ac1;this[_0x5feba1(0x1b9)][_0x5feba1(0x1b3)]({'eventID':_0x44d91d['LIVESHARE_OPERATION'],'data':{'unitID':this[_0x5feba1(0x167)],'operations':{[_0x3570d5['id']]:{'id':_0x3570d5['id'],'params':JSON['stringify'](_0x3570d5[_0x5feba1(0x171)])}}}},this['_unitID']);});}_0x568524['next'](_0x3362c9);})),this[_0x15efdf(0x1ca)]['getInitialStates'](this[_0x15efdf(0x167)])['forEach'](_0x23120b=>this[_0x15efdf(0x1b9)][_0x15efdf(0x1b3)]({'eventID':_0x44d91d[_0x15efdf(0x1ef)],'data':{'unitID':this[_0x15efdf(0x167)],'operations':{[_0x23120b['id']]:{'id':_0x23120b['id'],'params':JSON['stringify'](_0x23120b[_0x15efdf(0x171)])}}}},this[_0x15efdf(0x167)]));}[_0x47c8f1(0x1b6)](){const _0x2be920=_0x47c8f1;var _0x50b9af;this['_status$'][_0x2be920(0x16b)](_0x2be920(0x1b1)),(_0x50b9af=this[_0x2be920(0x184)])==null||_0x50b9af[_0x2be920(0x1c1)](),this[_0x2be920(0x184)]=null;}[_0x47c8f1(0x1c3)](){const _0x1217fe=_0x47c8f1;var _0x4303c5;(_0x4303c5=this[_0x1217fe(0x184)])==null||_0x4303c5[_0x1217fe(0x1c1)](),this[_0x1217fe(0x183)][_0x1217fe(0x16b)]('following');}['_beIdle'](){const _0x5f6fc1=_0x47c8f1;var _0x43ae1d;this[_0x5f6fc1(0x183)]['next'](_0x5f6fc1(0x1b1)),(_0x43ae1d=this[_0x5f6fc1(0x184)])==null||_0x43ae1d[_0x5f6fc1(0x1c1)](),this[_0x5f6fc1(0x184)]=null;}[_0x47c8f1(0x173)](){const _0x3f8bcd=_0x47c8f1;var _0x45762e;this[_0x3f8bcd(0x183)][_0x3f8bcd(0x16b)](_0x3f8bcd(0x1bb)),(_0x45762e=this['_commandDisposable'])==null||_0x45762e[_0x3f8bcd(0x1c1)]();}[_0x47c8f1(0x177)](_0x39b763){const _0x518c96=_0x47c8f1;if([_0x518c96(0x1df),_0x518c96(0x1bb),_0x518c96(0x17a)][_0x518c96(0x17c)](this[_0x518c96(0x170)])||!_0x39b763[_0x518c96(0x174)]['presenter']||_0x39b763[_0x518c96(0x174)][_0x518c96(0x1ae)]===this[_0x518c96(0x1b9)][_0x518c96(0x197)]())return;this[_0x518c96(0x170)]===_0x518c96(0x1b1)&&this[_0x518c96(0x1c3)]();let _0x26d5dc=_0x39b763[_0x518c96(0x174)][_0x518c96(0x193)];Object[_0x518c96(0x1d7)](_0x26d5dc)[_0x518c96(0x17f)](_0x2c7f10=>{const _0x4643c5=_0x518c96;this[_0x4643c5(0x187)][_0x4643c5(0x16d)](_0x2c7f10['id'],_0x2c7f10[_0x4643c5(0x171)]?JSON[_0x4643c5(0x1c5)](_0x2c7f10['params']):null,{'fromCollab':!0x0});});}[_0x47c8f1(0x1d9)](){const _0x4e1193=_0x47c8f1;var _0x46f4cd;this['_status$'][_0x4e1193(0x16b)](_0x4e1193(0x17a)),(_0x46f4cd=this[_0x4e1193(0x184)])==null||_0x46f4cd['dispose']();}[_0x47c8f1(0x1bd)](){const _0x2c08a0=_0x47c8f1;this[_0x2c08a0(0x183)][_0x2c08a0(0x16b)](_0x2c08a0(0x1b1)),this[_0x2c08a0(0x19f)]();}};K=U([H(0x2,_0x32448a),H(0x3,_0x185b21(V)),H(0x4,_0x527d3d)],K);function q(){const _0x4ad21a=_0x47c8f1;let _0x4c8b04=_0x30ee2b(W),_0x2a8f48=_0x30ee2b(_0x550d63),_0x16eb48=_0x3b1813(()=>_0x2a8f48[_0x4ad21a(0x1b2)](_0x263358[_0x4ad21a(0x1d1)]),void 0x0,!0x1,[]),[_0x170cde,_0x28bf83]=_0x365589(null),[_0x3bc4c4,_0x30c2dc]=_0x365589('idle'),_0x392f38=_0x3db5c6(null);return _0x449652(()=>(_0x16eb48&&_0x4c8b04[_0x4ad21a(0x1d5)](_0x16eb48[_0x4ad21a(0x19c)]())[_0x4ad21a(0x19a)](_0x19e731=>{const _0x1dc6e7=_0x4ad21a;_0x28bf83(_0x19e731),_0x392f38['current']=_0x19e731[_0x1dc6e7(0x16e)][_0x1dc6e7(0x19d)](_0x30ddbe=>{_0x30c2dc(_0x30ddbe);});}),()=>{const _0x56edf0=_0x4ad21a;var _0x5a3540;(_0x5a3540=_0x392f38[_0x56edf0(0x1f1)])==null||_0x5a3540['unsubscribe'](),_0x392f38['current']=null;}),[_0x16eb48,_0x4c8b04]),_0x170cde?_0x4f521d(_0x1af53e,{'align':'end','disabled':_0x3bc4c4==='offline','className':_0x4ad21a(0x1ba),'overlay':_0x4f521d(ce,{'status':_0x3bc4c4,'coordinator':_0x170cde}),'children':_0x4f521d(_0x4ad21a(0x178),{'className':_0xb8b532(_0x4ad21a(0x19e),{'univer-cursor-not-allowed':_0x3bc4c4===_0x4ad21a(0x17a),'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x3bc4c4!=='offline'}),'type':_0x4ad21a(0x178),'children':_0x4f521d(_0x325dc8,{'className':_0x4ad21a(0x1c7)})})}):null;}function ce(_0x13e49e){const _0x24d331=_0x47c8f1;let {status:_0x4929b3,coordinator:_0x2c4c33}=_0x13e49e;switch(_0x4929b3){case _0x24d331(0x1b1):return _0x4f521d(le,{'coordinator':_0x2c4c33});case _0x24d331(0x1cd):return _0x4f521d(ue,{'coordinator':_0x2c4c33});case _0x24d331(0x1bb):return _0x4f521d(de,{'coordinator':_0x2c4c33});case _0x24d331(0x17a):return _0x4f521d(fe,{});case _0x24d331(0x1df):return _0x4f521d(J,{'coordinator':_0x2c4c33});default:return null;}}function le(_0x4009d2){const _0x970997=_0x47c8f1;let {coordinator:_0x4f9614}=_0x4009d2;return _0x49e20e(_0x5051ba,{'children':[_0x4f521d('div',{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':_0x970997(0x1b8)}),_0x4f521d(_0x3413ea,{'onClick':()=>_0x4f9614[_0x970997(0x1e4)](),'children':_0x970997(0x1ab)})]});}function ue(_0xd6c01f){const _0x307a88=_0x47c8f1;let {coordinator:_0x397fa0}=_0xd6c01f;return _0x49e20e(_0x5051ba,{'children':[_0x4f521d(_0x307a88(0x1d8),{'className':_0x307a88(0x1dd),'children':'You\x27re\x20following\x20the\x20presenter'}),_0x4f521d(_0x3413ea,{'onClick':()=>_0x397fa0[_0x307a88(0x1a6)](),'children':_0x307a88(0x1af)})]});}function _0x2cb1(_0x425720,_0x1ced66){_0x425720=_0x425720-0x167;const _0x2c99ce=_0x2c99();let _0x2cb1be=_0x2c99ce[_0x425720];return _0x2cb1be;}function de(_0x428c91){const _0x4db372=_0x47c8f1;let {coordinator:_0x196692}=_0x428c91;return _0x49e20e(_0x5051ba,{'children':[_0x4f521d(_0x4db372(0x1d8),{'className':_0x4db372(0x1dd),'children':_0x4db372(0x16f)}),_0x4f521d(_0x3413ea,{'variant':'text','onClick':()=>_0x196692[_0x4db372(0x1dc)](),'children':'Start\x20following'})]});}function J(_0x229033){const _0x2b84a8=_0x47c8f1;let {coordinator:_0x2255cc}=_0x229033;return _0x49e20e(_0x5051ba,{'children':[_0x4f521d(_0x2b84a8(0x1d8),{'className':_0x2b84a8(0x1dd),'children':_0x2b84a8(0x1de)}),_0x4f521d(_0x3413ea,{'variant':_0x2b84a8(0x1b5),'onClick':()=>_0x2255cc[_0x2b84a8(0x1b0)](),'children':_0x2b84a8(0x190)})]});}function fe(){const _0x4c2716=_0x47c8f1;return _0x4f521d(_0x5051ba,{'children':_0x4c2716(0x1bf)});}let Y=class extends _0x1ae5c9{constructor(_0x3bc0b8,_0x14b866){const _0x3912e8=_0x47c8f1;super(),this[_0x3912e8(0x1a3)]=_0x3bc0b8,this['_uiPartsService']=_0x14b866,this[_0x3912e8(0x16c)]();}[_0x47c8f1(0x16c)](){const _0x9f0e14=_0x47c8f1;this[_0x9f0e14(0x1db)](this['_uiPartsService'][_0x9f0e14(0x1e6)](_0x5cc6a7[_0x9f0e14(0x18a)],()=>_0x3b2d74(q,this['_injector'])));}};Y=U([H(0x0,_0x185b21(_0x9c4b6c)),H(0x1,_0x428097)],Y);var pe='@univerjs-pro/live-share',me='0.23.0-insiders.20260522-e8f2a3b';const X=_0x47c8f1(0x1b7);Symbol(X);const Z={};let Q=class extends _0x1ae5c9{constructor(_0x9f8af7){const _0x141542=_0x47c8f1;super(),this[_0x141542(0x1ca)]=_0x9f8af7,this[_0x141542(0x1cc)]();}['_init'](){const _0x243e79=_0x47c8f1;[_0xda8886['id'],_0x42382e['id'],_0x438a7e['id']][_0x243e79(0x17f)](_0x3b717e=>{const _0xeba9fc=_0x243e79;this[_0xeba9fc(0x1db)](this[_0xeba9fc(0x1ca)][_0xeba9fc(0x1bc)](_0x3b717e));});}};Q=U([H(0x0,_0x185b21(V))],Q);function _0x2c99(){const _0x57af69=['2llaBqe','type','getLiveShareCoordinatorSync','defineProperty','Start','IDLE','getInitialStates','presenter','Stop\x20following','stopPresenting','idle','getCurrentTypeOfUnit$','send','createInstance','default','_stopPresenting','live-share.config','Present\x20this\x20document','_collabSession','univer-box-border\x20univer-min-w-60\x20univer-bg-gray-900\x20univer-px-4\x20univer-py-3\x20univer-text-gray-900\x20dark:!univer-bg-white\x20dark:!univer-text-white','not-following','registerSharedOperation','_handleOnline','clear','You\x27are\x20offline.','UNIVER_UNKNOWN','dispose','registerInitialStateReporter','_startFollowing','object','parse','NOT_FOLLOWING','univer-size-4','_presenter','asObservable','_liveShareService','_startLiveShareCoordinator','_init','following','prototype','delete','PRESENTING','UNIVER_SHEET','memberID','unit','LIVESHARE_REQUEST_HOST','getLiveShareCoordinator','toPrimitive','values','div','_handleOffline','pipe','disposeWithMe','startFollowing','univer-mb-3\x20univer-w-full\x20univer-text-sm','You\x27re\x20presenting\x20the\x20document','presenting','_beIdle','NEW_CHANGESETS','6FImBYl','_collabSessionService','tryStartPresenting','setConfig','registerComponent','symbol','112340HLulmP','_entities','_univerInstanceService','function','onStarting','_config','6769988KlGxiE','LIVESHARE_OPERATION','decorate','current','getTypeOfUnitAdded$','has','unitId','_unitID','3115500zERVvT','string','init','next','_mountLiveShare','executeCommand','status$','You\x27re\x20not\x20following\x20the\x20presenter','_status','params','set','_stopFollowing','data','getOwnPropertyDescriptor','sheet','_handleOperation','button','sessionStatus$','offline','requireSession','includes','onCommandExecuted','map','forEach','complete','_startPresenting','188524UvhfLc','_status$','_commandDisposable','_sharedOperations','3OfeCFG','_commandService','onRendered','_handleNewHost','HEADER_MENU','add','_configService','getTypeOfUnitDisposed$','length','LIVESHARE_TERMINATE','Stop\x20presenting','OFFLINE','get','operations','2066553kxRyuK','constructor','UNIVER_LIVE_SHARE_PLUGIN','getMemberID','_handleTerminate','dispose$','then','_reporters','getUnitId','subscribe','univer-border-none\x20univer-text-gray-600\x20univer-outline-none','_fetchOperations','OPERATION','1048823tSCvfL','from','_injector','packageName','5332792MgfnZW','stopFollowing'];_0x2c99=function(){return _0x57af69;};return _0x2c99();}let $=class extends _0x26cc12{constructor(_0x5885e6=Z,_0x3b5eb1,_0x4afe5e){const _0x417dd4=_0x47c8f1;super(),this[_0x417dd4(0x1ed)]=_0x5885e6,this['_injector']=_0x3b5eb1,this[_0x417dd4(0x18c)]=_0x4afe5e;let {..._0x110118}=_0x30c7a2({},Z,this[_0x417dd4(0x1ed)]);this[_0x417dd4(0x18c)][_0x417dd4(0x1e5)](X,_0x110118);}[_0x47c8f1(0x1ec)](){const _0x219fd7=_0x47c8f1;_0x47ae4f(this[_0x219fd7(0x1a3)],_0x3b3145([[V],[W],[Q],[Y]],this['_config']['override'])),_0x188f9e(this[_0x219fd7(0x1a3)],[[Q]]);}[_0x47c8f1(0x188)](){const _0x18196d=_0x47c8f1;_0x188f9e(this[_0x18196d(0x1a3)],[[Y]]);}};B($,'type',_0x263358[_0x47c8f1(0x1c0)]),B($,'pluginName',_0x47c8f1(0x196)),B($,_0x47c8f1(0x1a4),pe),B($,'version',me),$=U([_0x59adfd(_0x539a49),H(0x1,_0x185b21(_0x9c4b6c)),H(0x2,_0x32448a)],$);export{Y as DesktopLiveShareController,q as LiveShare,W as LiveShareController,K as LiveShareCoordinator,V as LiveShareService,G as LiveShareStatus,$ as UniverLiveSharePlugin};
|
package/lib/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x33f4c6=_0x384d;function _0x9218(){const _0x1eaff7=['5929592knJqov','1856519uCgJEF','stopFollowing','function','411072paFKMk','1128vcCTpt','getCurrentUnitOfType','getStatus','startFollowing','default','368286awaDuh','334122fhAHel','15wqTvsG','get','string','_injector','stopPresenting','tryStartPresenting','UNIVER_SHEET','LiveShareStatusEnum','extend','startPresenting','117gqdvMP','8788Wjfahx','_liveShareController','getUnitId','IDLE','No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.','object','prototype','toPrimitive','46030MkJWJx','getLiveShareStatus','_initialize','No\x20active\x20workbook\x20found.','symbol','getLiveShareCoordinatorSync','defineProperty'];_0x9218=function(){return _0x1eaff7;};return _0x9218();}(function(_0x4a7a7a,_0x3fc3e8){const _0x4e7aed=_0x384d,_0x4951cb=_0x4a7a7a();while(!![]){try{const _0x582f00=parseInt(_0x4e7aed(0x146))/0x1+parseInt(_0x4e7aed(0x13f))/0x2+parseInt(_0x4e7aed(0x140))/0x3*(parseInt(_0x4e7aed(0x152))/0x4)+-parseInt(_0x4e7aed(0x147))/0x5*(-parseInt(_0x4e7aed(0x145))/0x6)+-parseInt(_0x4e7aed(0x13c))/0x7+-parseInt(_0x4e7aed(0x13b))/0x8+parseInt(_0x4e7aed(0x151))/0x9*(-parseInt(_0x4e7aed(0x134))/0xa);if(_0x582f00===_0x3fc3e8)break;else _0x4951cb['push'](_0x4951cb['shift']());}catch(_0x28fd0b){_0x4951cb['push'](_0x4951cb['shift']());}}}(_0x9218,0x76122));import{LiveShareController as _0x16cc3a,LiveShareStatus as _0x9acedc}from'@univerjs-pro/live-share';import{IUniverInstanceService as _0x249e90,UniverInstanceType as _0x10bf95}from'@univerjs/core';import{FEnum as _0x155462,FUniver as _0x53bf64}from'@univerjs/core/facade';function o(_0x2b34e9){'@babel/helpers - typeof';const _0x33c937=_0x384d;return o=typeof Symbol=='function'&&typeof Symbol['iterator']==_0x33c937(0x138)?function(_0x100c12){return typeof _0x100c12;}:function(_0x46bc54){const _0x1d7dc8=_0x33c937;return _0x46bc54&&typeof Symbol==_0x1d7dc8(0x13e)&&_0x46bc54['constructor']===Symbol&&_0x46bc54!==Symbol[_0x1d7dc8(0x158)]?_0x1d7dc8(0x138):typeof _0x46bc54;},o(_0x2b34e9);}function s(_0x127b68,_0x3cf494){const _0x2aeef4=_0x384d;if(o(_0x127b68)!=_0x2aeef4(0x157)||!_0x127b68)return _0x127b68;var _0x21e031=_0x127b68[Symbol[_0x2aeef4(0x159)]];if(_0x21e031!==void 0x0){var _0x45f1d0=_0x21e031['call'](_0x127b68,_0x3cf494||_0x2aeef4(0x144));if(o(_0x45f1d0)!='object')return _0x45f1d0;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x3cf494===_0x2aeef4(0x149)?String:Number)(_0x127b68);}function c(_0x8bfce3){const _0x4cd3a9=_0x384d;var _0x2b96ea=s(_0x8bfce3,'string');return o(_0x2b96ea)==_0x4cd3a9(0x138)?_0x2b96ea:_0x2b96ea+'';}function _0x384d(_0x1117cd,_0x1f6263){_0x1117cd=_0x1117cd-0x134;const _0x921858=_0x9218();let _0x384d7d=_0x921858[_0x1117cd];return _0x384d7d;}function l(_0x427b45,_0x19a992,_0x452ef4){const _0x236bb8=_0x384d;return(_0x19a992=c(_0x19a992))in _0x427b45?Object[_0x236bb8(0x13a)](_0x427b45,_0x19a992,{'value':_0x452ef4,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x427b45[_0x19a992]=_0x452ef4,_0x427b45;}var u=class extends _0x53bf64{constructor(..._0x5b7a20){super(..._0x5b7a20),l(this,'_liveShareController',void 0x0);}[_0x33f4c6(0x136)](_0x414b83){const _0x17a4dd=_0x33f4c6;this[_0x17a4dd(0x153)]=_0x414b83[_0x17a4dd(0x148)](_0x16cc3a);}[_0x33f4c6(0x135)](){const _0x3b4bde=_0x33f4c6;var _0x2a9ff6;let _0x4c5c35=this[_0x3b4bde(0x14a)][_0x3b4bde(0x148)](_0x249e90)[_0x3b4bde(0x141)](_0x10bf95['UNIVER_SHEET']);if(!_0x4c5c35)throw Error('No\x20active\x20workbook\x20found.');let _0x4e6043=_0x4c5c35['getUnitId'](),_0x11be0d=this['_liveShareController'][_0x3b4bde(0x139)](_0x4e6043);return(_0x2a9ff6=_0x11be0d==null?void 0x0:_0x11be0d[_0x3b4bde(0x142)]())==null?_0x9acedc[_0x3b4bde(0x155)]:_0x2a9ff6;}[_0x33f4c6(0x143)](){const _0x1f747f=_0x33f4c6;let _0x2e6397=this[_0x1f747f(0x14a)]['get'](_0x249e90)['getCurrentUnitOfType'](_0x10bf95['UNIVER_SHEET']);if(!_0x2e6397)throw Error(_0x1f747f(0x137));let _0xa95b3e=_0x2e6397[_0x1f747f(0x154)](),_0x23ee0b=this[_0x1f747f(0x153)][_0x1f747f(0x139)](_0xa95b3e);if(!_0x23ee0b)throw Error(_0x1f747f(0x156));_0x23ee0b[_0x1f747f(0x143)]();}[_0x33f4c6(0x13d)](){const _0x46f215=_0x33f4c6;let _0x2743a2=this[_0x46f215(0x14a)]['get'](_0x249e90)[_0x46f215(0x141)](_0x10bf95[_0x46f215(0x14d)]);if(!_0x2743a2)throw Error(_0x46f215(0x137));let _0xdf1264=_0x2743a2[_0x46f215(0x154)](),_0x21ceba=this['_liveShareController'][_0x46f215(0x139)](_0xdf1264);if(!_0x21ceba)throw Error(_0x46f215(0x156));_0x21ceba[_0x46f215(0x13d)]();}[_0x33f4c6(0x150)](){const _0x1b5092=_0x33f4c6;let _0x285e0f=this[_0x1b5092(0x14a)][_0x1b5092(0x148)](_0x249e90)[_0x1b5092(0x141)](_0x10bf95[_0x1b5092(0x14d)]);if(!_0x285e0f)throw Error(_0x1b5092(0x137));let _0x168a9b=_0x285e0f['getUnitId'](),_0x4f0fd5=this[_0x1b5092(0x153)][_0x1b5092(0x139)](_0x168a9b);if(!_0x4f0fd5)throw Error('No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.');_0x4f0fd5[_0x1b5092(0x14c)]();}[_0x33f4c6(0x14b)](){const _0x29ce34=_0x33f4c6;let _0x23447c=this[_0x29ce34(0x14a)][_0x29ce34(0x148)](_0x249e90)[_0x29ce34(0x141)](_0x10bf95[_0x29ce34(0x14d)]);if(!_0x23447c)throw Error(_0x29ce34(0x137));let _0x44aa61=_0x23447c[_0x29ce34(0x154)](),_0x197cdf=this['_liveShareController'][_0x29ce34(0x139)](_0x44aa61);if(!_0x197cdf)throw Error('No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.');_0x197cdf[_0x29ce34(0x14b)]();}};_0x53bf64[_0x33f4c6(0x14f)](u);var d=class extends _0x155462{get[_0x33f4c6(0x14e)](){return _0x9acedc;}};_0x155462['extend'](d);export{};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x43267f=_0x5e07;(function(_0x1f2c2c,_0x43cf11){const _0x53af28=_0x5e07,_0x3f8716=_0x1f2c2c();while(!![]){try{const _0x23ce05=-parseInt(_0x53af28(0x1c0))/0x1*(parseInt(_0x53af28(0x1b9))/0x2)+-parseInt(_0x53af28(0x1e5))/0x3+-parseInt(_0x53af28(0x193))/0x4*(parseInt(_0x53af28(0x206))/0x5)+parseInt(_0x53af28(0x1a3))/0x6*(-parseInt(_0x53af28(0x20c))/0x7)+parseInt(_0x53af28(0x1c9))/0x8*(parseInt(_0x53af28(0x1f9))/0x9)+-parseInt(_0x53af28(0x20a))/0xa+parseInt(_0x53af28(0x207))/0xb;if(_0x23ce05===_0x43cf11)break;else _0x3f8716['push'](_0x3f8716['shift']());}catch(_0x569f30){_0x3f8716['push'](_0x3f8716['shift']());}}}(_0x6cd2,0xb195c));import{CommandType,DependentOn,Disposable,DisposableCollection,ICommandService,IConfigService,IUniverInstanceService,Inject,Injector,Plugin,RxDisposable,UniverInstanceType,merge,mergeOverrideWithDependencies,registerDependencies,toDisposable,touchDependencies}from'@univerjs/core';import{BuiltInUIPart,IUIPartsService,connectInjector,useDependency,useObservable}from'@univerjs/ui';import{Button,Dropdown,clsx}from'@univerjs/design';import{LiveShareIcon}from'@univerjs/icons';import{useEffect,useRef,useState}from'react';import{CollaborationEvent,parseProtocolChangeset}from'@univerjs-pro/collaboration';import{CollaborationSessionService,SessionStatus,UniverCollaborationClientPlugin}from'@univerjs-pro/collaboration-client';import{InsertSheetMutation,SetWorksheetActiveOperation}from'@univerjs/sheets';import{BehaviorSubject,Subject}from'rxjs';import{takeUntil,throttleTime}from'rxjs/operators';import{Fragment,jsx,jsxs}from'react/jsx-runtime';import{SetScrollOperation,SetZoomRatioOperation}from'@univerjs/sheets-ui';function _typeof(_0x3259cf){'@babel/helpers - typeof';const _0x52bde7=_0x5e07;return _typeof='function'==typeof Symbol&&_0x52bde7(0x1b2)==typeof Symbol['iterator']?function(_0x4e48fe){return typeof _0x4e48fe;}:function(_0x412a12){const _0x464e5c=_0x52bde7;return _0x412a12&&_0x464e5c(0x1ef)==typeof Symbol&&_0x412a12[_0x464e5c(0x1ab)]===Symbol&&_0x412a12!==Symbol[_0x464e5c(0x1c8)]?_0x464e5c(0x1b2):typeof _0x412a12;},_typeof(_0x3259cf);}function toPrimitive(_0x2cd61c,_0x9056d2){const _0x4b4caf=_0x5e07;if(_0x4b4caf(0x1a0)!=_typeof(_0x2cd61c)||!_0x2cd61c)return _0x2cd61c;var _0x43a311=_0x2cd61c[Symbol[_0x4b4caf(0x1c7)]];if(void 0x0!==_0x43a311){var _0x24d425=_0x43a311['call'](_0x2cd61c,_0x9056d2||_0x4b4caf(0x1d3));if(_0x4b4caf(0x1a0)!=_typeof(_0x24d425))return _0x24d425;throw new TypeError(_0x4b4caf(0x1b1));}return(_0x4b4caf(0x1dc)===_0x9056d2?String:Number)(_0x2cd61c);}function toPropertyKey(_0x1346e8){const _0x388902=_0x5e07;var _0x329a8e=toPrimitive(_0x1346e8,_0x388902(0x1dc));return _0x388902(0x1b2)==_typeof(_0x329a8e)?_0x329a8e:_0x329a8e+'';}function _defineProperty(_0x193b00,_0xb67046,_0x1a790f){const _0x585e14=_0x5e07;return(_0xb67046=toPropertyKey(_0xb67046))in _0x193b00?Object[_0x585e14(0x1c4)](_0x193b00,_0xb67046,{'value':_0x1a790f,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x193b00[_0xb67046]=_0x1a790f,_0x193b00;}var LiveShareService=class extends Disposable{constructor(..._0x279850){const _0x34bfc2=_0x5e07;super(..._0x279850),_defineProperty(this,_0x34bfc2(0x1fa),new Set()),_defineProperty(this,_0x34bfc2(0x1ac),new Set());}[_0x43267f(0x1db)](_0x781920){const _0xac4616=_0x43267f;return this[_0xac4616(0x1fa)]['add'](_0x781920),toDisposable(()=>this['_sharedOperations'][_0xac4616(0x200)](_0x781920));}[_0x43267f(0x1ca)](_0x46d0fc){const _0x4c5160=_0x43267f;return this[_0x4c5160(0x1ac)][_0x4c5160(0x183)](_0x46d0fc),toDisposable(()=>this['_reporters'][_0x4c5160(0x200)](_0x46d0fc));}['shouldShareOperation'](_0x1f1729){const _0x5fc19=_0x43267f;return this[_0x5fc19(0x1fa)]['has'](_0x1f1729);}[_0x43267f(0x1e9)](_0x4d618e){const _0x3a63b5=_0x43267f;return Array[_0x3a63b5(0x187)](this['_reporters'])[_0x3a63b5(0x1a1)](_0x1bc215=>_0x1bc215(_0x4d618e));}};function _0x5e07(_0x3ab236,_0x4100de){_0x3ab236=_0x3ab236-0x177;const _0x6cd26f=_0x6cd2();let _0x5e07a5=_0x6cd26f[_0x3ab236];return _0x5e07a5;}function __decorateParam(_0x4e9fe7,_0x33be22){return function(_0x9d2488,_0x3a7382){_0x33be22(_0x9d2488,_0x3a7382,_0x4e9fe7);};}function __decorate(_0x29fa24,_0x53b74c,_0x1efd38,_0x3358b6){const _0x556cb7=_0x43267f;var _0x3bdeb6=arguments[_0x556cb7(0x181)],_0x1872a2=_0x3bdeb6<0x3?_0x53b74c:_0x3358b6===null?_0x3358b6=Object[_0x556cb7(0x1a2)](_0x53b74c,_0x1efd38):_0x3358b6,_0x25103d;if(typeof Reflect===_0x556cb7(0x1a0)&&typeof Reflect[_0x556cb7(0x17d)]===_0x556cb7(0x1ef))_0x1872a2=Reflect[_0x556cb7(0x17d)](_0x29fa24,_0x53b74c,_0x1efd38,_0x3358b6);else{for(var _0x1d2318=_0x29fa24['length']-0x1;_0x1d2318>=0x0;_0x1d2318--)if(_0x25103d=_0x29fa24[_0x1d2318])_0x1872a2=(_0x3bdeb6<0x3?_0x25103d(_0x1872a2):_0x3bdeb6>0x3?_0x25103d(_0x53b74c,_0x1efd38,_0x1872a2):_0x25103d(_0x53b74c,_0x1efd38))||_0x1872a2;}return _0x3bdeb6>0x3&&_0x1872a2&&Object[_0x556cb7(0x1c4)](_0x53b74c,_0x1efd38,_0x1872a2),_0x1872a2;}let LiveShareController=class LiveShareController extends RxDisposable{constructor(_0x2140b2,_0x3fc587,_0x584ca4){const _0xaea04=_0x43267f;super(),this[_0xaea04(0x1d6)]=_0x2140b2,this['_injector']=_0x3fc587,this[_0xaea04(0x1b6)]=_0x584ca4,_defineProperty(this,'_entities',new Map()),this[_0xaea04(0x1e3)]();}async[_0x43267f(0x209)](_0x18a67d){const _0x32d49a=_0x43267f;if(!this[_0x32d49a(0x17e)][_0x32d49a(0x1cf)](_0x18a67d))await this[_0x32d49a(0x1d1)](_0x18a67d);return this[_0x32d49a(0x17e)]['get'](_0x18a67d);}[_0x43267f(0x1ff)](_0x46286e){const _0x73143b=_0x43267f;var _0x14b673;return(_0x14b673=this[_0x73143b(0x17e)][_0x73143b(0x1cd)](_0x46286e))!==null&&_0x14b673!==void 0x0?_0x14b673:null;}[_0x43267f(0x1e3)](){const _0x5c8079=_0x43267f;this[_0x5c8079(0x1d6)][_0x5c8079(0x197)](UniverInstanceType[_0x5c8079(0x1a8)])['pipe'](takeUntil(this[_0x5c8079(0x1be)]))[_0x5c8079(0x20b)](async _0x4e889a=>{const _0x46f815=_0x5c8079,_0x4cea86=_0x4e889a[_0x46f815(0x1bc)][_0x46f815(0x1da)]();if(this[_0x46f815(0x17e)][_0x46f815(0x1cf)](_0x4cea86))return;this[_0x46f815(0x1d1)](_0x4cea86);}),this[_0x5c8079(0x1d6)]['getTypeOfUnitDisposed$'](UniverInstanceType[_0x5c8079(0x1a8)])[_0x5c8079(0x1e1)](takeUntil(this['dispose$']))[_0x5c8079(0x20b)](_0x56517c=>{const _0x1d0d8f=_0x5c8079,_0x597160=_0x56517c[_0x1d0d8f(0x1da)](),_0x257bfe=this['_entities'][_0x1d0d8f(0x1cd)](_0x597160);_0x257bfe===null||_0x257bfe===void 0x0||_0x257bfe[_0x1d0d8f(0x1ce)]();});}async[_0x43267f(0x1d1)](_0x1f7800){const _0x3c87d7=_0x43267f,_0x31bdd=await this['_collabSessionService'][_0x3c87d7(0x18f)](_0x1f7800),_0x17abb8=this[_0x3c87d7(0x1c2)][_0x3c87d7(0x1ea)](LiveShareCoordinator,_0x1f7800,_0x31bdd);return _0x17abb8[_0x3c87d7(0x1fd)](),this[_0x3c87d7(0x17e)][_0x3c87d7(0x1e8)](_0x1f7800,_0x17abb8),_0x17abb8;}};LiveShareController=__decorate([__decorateParam(0x0,IUniverInstanceService),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,Inject(CollaborationSessionService))],LiveShareController);let LiveShareStatus=function(_0xe4315){const _0x514b6a=_0x43267f;return _0xe4315[_0x514b6a(0x1f5)]='offline',_0xe4315['IDLE']=_0x514b6a(0x1f3),_0xe4315['FOLLOWING']=_0x514b6a(0x1e2),_0xe4315[_0x514b6a(0x1e0)]='not-following',_0xe4315[_0x514b6a(0x184)]=_0x514b6a(0x1b7),_0xe4315;}({});const SAME_OPERATION_SHARE_INTERVAL_KEY=_0x43267f(0x1e4),DEFAULT_SAME_OPERATION_SHARE_INTERVAL=0xc8;let LiveShareCoordinator=class LiveShareCoordinator extends RxDisposable{get[_0x43267f(0x19c)](){const _0x1ce33f=_0x43267f;return this[_0x1ce33f(0x1ad)][_0x1ce33f(0x1f4)]();}constructor(_0x55e21b,_0x40d5b5,_0xde803f,_0x326f17,_0x359f2f){const _0x227f9e=_0x43267f;super(),this[_0x227f9e(0x1de)]=_0x55e21b,this[_0x227f9e(0x1c6)]=_0x40d5b5,this[_0x227f9e(0x1ec)]=_0xde803f,this['_liveShareService']=_0x326f17,this['_commandService']=_0x359f2f,_defineProperty(this,_0x227f9e(0x1ad),new BehaviorSubject(_0x227f9e(0x1f3))),_defineProperty(this,_0x227f9e(0x1a6),this[_0x227f9e(0x1ad)][_0x227f9e(0x203)]()),_defineProperty(this,_0x227f9e(0x1e3),![]),_defineProperty(this,_0x227f9e(0x1ed),null),_defineProperty(this,_0x227f9e(0x194),null);}[_0x43267f(0x1ce)](){const _0x20cfc0=_0x43267f;var _0x57994b;(_0x57994b=this[_0x20cfc0(0x1ed)])===null||_0x57994b===void 0x0||_0x57994b[_0x20cfc0(0x1ce)](),this['_status$'][_0x20cfc0(0x201)](_0x20cfc0(0x1f3)),this[_0x20cfc0(0x1ad)][_0x20cfc0(0x1f2)]();}[_0x43267f(0x180)](){const _0x2a7d48=_0x43267f;return this[_0x2a7d48(0x19c)];}['init'](){const _0x2359c5=_0x43267f;if(this[_0x2359c5(0x1e3)])return;this[_0x2359c5(0x1e3)]=!![],this['_collabSession'][_0x2359c5(0x1b3)][_0x2359c5(0x1e1)](takeUntil(this[_0x2359c5(0x1be)]))[_0x2359c5(0x20b)](_0x5e63bc=>{const _0x327f39=_0x2359c5;switch(_0x5e63bc){case SessionStatus['OFFLINE']:this[_0x327f39(0x18c)]();break;case SessionStatus[_0x327f39(0x1c1)]:this['_handleOnline']();break;default:}}),this[_0x2359c5(0x1c6)][_0x2359c5(0x1df)][_0x2359c5(0x1e1)](takeUntil(this[_0x2359c5(0x1be)]))[_0x2359c5(0x20b)](_0x10d22a=>{const _0x57b989=_0x2359c5,{eventID:_0x9987a3}=_0x10d22a;switch(_0x9987a3){case CollaborationEvent['LIVESHARE_NEW_HOST']:this[_0x57b989(0x179)](_0x10d22a);break;case CollaborationEvent['LIVESHARE_OPERATION']:this[_0x57b989(0x190)](_0x10d22a);break;case CollaborationEvent[_0x57b989(0x1d0)]:this[_0x57b989(0x195)]();break;case CollaborationEvent['NEW_CHANGESETS']:this[_0x57b989(0x198)](_0x10d22a);break;default:}});}[_0x43267f(0x1dd)](){const _0x3207db=_0x43267f;this['_collabSession'][_0x3207db(0x17f)]({'eventID':CollaborationEvent['LIVESHARE_REQUEST_HOST'],'data':{'unitID':this['_unitID'],'userID':this['_collabSession'][_0x3207db(0x1a4)]()}},this[_0x3207db(0x1de)]);}['stopPresenting'](){const _0x5f2dc5=_0x43267f;this[_0x5f2dc5(0x19c)]===_0x5f2dc5(0x1b7)&&(this['_status$'][_0x5f2dc5(0x201)](_0x5f2dc5(0x1f3)),this[_0x5f2dc5(0x1c6)][_0x5f2dc5(0x17f)]({'eventID':CollaborationEvent[_0x5f2dc5(0x1d0)],'data':{'unitID':this[_0x5f2dc5(0x1de)]}},this['_unitID']));}['startFollowing'](){const _0x6cb0c4=_0x43267f;if(this[_0x6cb0c4(0x19c)]!==_0x6cb0c4(0x19f))return;this[_0x6cb0c4(0x1ad)]['next']('following'),this['_startFollowing']();}['stopFollowing'](){const _0x3f8a44=_0x43267f;if(this[_0x3f8a44(0x19c)]!=='following')return;this[_0x3f8a44(0x1ae)]();}[_0x43267f(0x179)](_0x1393a8){const _0x5be0cc=_0x43267f,{presenter:_0x473290}=_0x1393a8['data'],_0x4d56d6=this[_0x5be0cc(0x1c6)]['getMemberID']();this[_0x5be0cc(0x194)]=_0x473290;if(_0x473290===_0x4d56d6)this[_0x5be0cc(0x1ae)](),this[_0x5be0cc(0x205)]();else this[_0x5be0cc(0x19c)]!==_0x5be0cc(0x19f)&&(this[_0x5be0cc(0x1d2)](),this['_startFollowing']());}[_0x43267f(0x199)](){const _0x260446=_0x43267f,_0x54b420={'eventID':CollaborationEvent['LIVESHARE_FETCH_OPERATIONS']};this['_collabSession'][_0x260446(0x17f)](_0x54b420,this[_0x260446(0x1de)]);}[_0x43267f(0x195)](){const _0x4f0d63=_0x43267f;this[_0x4f0d63(0x194)]=null;if(this[_0x4f0d63(0x19c)]!==_0x4f0d63(0x1b7))this[_0x4f0d63(0x19b)]();}['_handleNewChangeSets'](_0x5132eb){const _0x5c9ce7=_0x43267f;if(this[_0x5c9ce7(0x19c)]===_0x5c9ce7(0x1e2)&&this[_0x5c9ce7(0x194)]===_0x5132eb[_0x5c9ce7(0x1bf)][_0x5c9ce7(0x1a9)]){const _0x2a1c4=parseProtocolChangeset(_0x5132eb['data'])['mutations'][_0x5c9ce7(0x1fb)]()[_0x5c9ce7(0x19a)](_0x6e761=>_0x6e761['id']===InsertSheetMutation['id']);if(_0x2a1c4){const _0x4e2ab8=_0x2a1c4['params'][_0x5c9ce7(0x204)],_0x3e70b6=_0x2a1c4[_0x5c9ce7(0x17c)][_0x5c9ce7(0x1e7)]['id'];setTimeout(()=>{const _0x4a583b=_0x5c9ce7;this[_0x4a583b(0x1d7)][_0x4a583b(0x19e)](SetWorksheetActiveOperation['id'],{'unitId':_0x4e2ab8,'subUnitId':_0x3e70b6},{'fromCollab':!![]});});}}}['_startPresenting'](){const _0x352bb0=_0x43267f;this[_0x352bb0(0x1ad)][_0x352bb0(0x201)](_0x352bb0(0x1b7));const _0x3138d2=new Map(),_0x447d4e=this[_0x352bb0(0x1ed)]=new DisposableCollection();_0x447d4e[_0x352bb0(0x183)](toDisposable(()=>{const _0x298c6a=_0x352bb0;_0x3138d2[_0x298c6a(0x1fc)](_0x3c9296=>_0x3c9296[_0x298c6a(0x1f2)]()),_0x3138d2['clear']();})),_0x447d4e[_0x352bb0(0x183)](this[_0x352bb0(0x1d7)][_0x352bb0(0x1b5)](_0x5c0668=>{const _0x308d65=_0x352bb0;if(_0x5c0668['type']!==CommandType[_0x308d65(0x1f7)]||!this[_0x308d65(0x1cc)]['shouldShareOperation'](_0x5c0668['id']))return;const {id:_0x5ce639}=_0x5c0668;let _0x483408;if(!_0x3138d2[_0x308d65(0x1cf)](_0x5ce639)){var _0x347730;_0x483408=new Subject(),_0x3138d2[_0x308d65(0x1e8)](_0x5ce639,_0x483408),_0x483408['pipe'](throttleTime((_0x347730=this[_0x308d65(0x1ec)][_0x308d65(0x185)](_0x308d65(0x1e4)))!==null&&_0x347730!==void 0x0?_0x347730:DEFAULT_SAME_OPERATION_SHARE_INTERVAL,void 0x0,{'trailing':!![],'leading':!![]}))[_0x308d65(0x20b)](_0x4a1dcd=>{const _0x272a2d=_0x308d65;this[_0x272a2d(0x1c6)][_0x272a2d(0x17f)]({'eventID':CollaborationEvent[_0x272a2d(0x192)],'data':{'unitID':this[_0x272a2d(0x1de)],'operations':{[_0x4a1dcd['id']]:{'id':_0x4a1dcd['id'],'params':JSON['stringify'](_0x4a1dcd[_0x272a2d(0x17c)])}}}},this[_0x272a2d(0x1de)]);});}else _0x483408=_0x3138d2['get'](_0x5ce639);_0x483408[_0x308d65(0x201)](_0x5c0668);})),this[_0x352bb0(0x1cc)][_0x352bb0(0x1e9)](this[_0x352bb0(0x1de)])['forEach'](_0x2d34e1=>this['_collabSession'][_0x352bb0(0x17f)]({'eventID':CollaborationEvent[_0x352bb0(0x192)],'data':{'unitID':this[_0x352bb0(0x1de)],'operations':{[_0x2d34e1['id']]:{'id':_0x2d34e1['id'],'params':JSON[_0x352bb0(0x1e6)](_0x2d34e1['params'])}}}},this['_unitID']));}[_0x43267f(0x1d2)](){const _0x9481db=_0x43267f;var _0x3d90fb;this['_status$'][_0x9481db(0x201)](_0x9481db(0x1f3)),(_0x3d90fb=this[_0x9481db(0x1ed)])===null||_0x3d90fb===void 0x0||_0x3d90fb[_0x9481db(0x1ce)](),this['_commandDisposable']=null;}[_0x43267f(0x1d8)](){const _0x1437d8=_0x43267f;var _0x261bdd;(_0x261bdd=this[_0x1437d8(0x1ed)])===null||_0x261bdd===void 0x0||_0x261bdd[_0x1437d8(0x1ce)](),this['_status$'][_0x1437d8(0x201)](_0x1437d8(0x1e2));}['_beIdle'](){const _0x538408=_0x43267f;var _0x2434d1;this[_0x538408(0x1ad)][_0x538408(0x201)](_0x538408(0x1f3)),(_0x2434d1=this[_0x538408(0x1ed)])===null||_0x2434d1===void 0x0||_0x2434d1[_0x538408(0x1ce)](),this[_0x538408(0x1ed)]=null;}['_stopFollowing'](){const _0xfd6c91=_0x43267f;var _0x6b0a87;this[_0xfd6c91(0x1ad)][_0xfd6c91(0x201)]('not-following'),(_0x6b0a87=this[_0xfd6c91(0x1ed)])===null||_0x6b0a87===void 0x0||_0x6b0a87[_0xfd6c91(0x1ce)]();}[_0x43267f(0x190)](_0x4f7def){const _0xe4d062=_0x43267f;if([_0xe4d062(0x1b7),'not-following',_0xe4d062(0x1f8)]['includes'](this[_0xe4d062(0x19c)]))return;if(!_0x4f7def[_0xe4d062(0x1bf)][_0xe4d062(0x17a)]||_0x4f7def[_0xe4d062(0x1bf)][_0xe4d062(0x17a)]===this[_0xe4d062(0x1c6)][_0xe4d062(0x1a4)]())return;if(this['_status']===_0xe4d062(0x1f3))this[_0xe4d062(0x1d8)]();const _0x501e4d=_0x4f7def[_0xe4d062(0x1bf)]['operations'];Object[_0xe4d062(0x202)](_0x501e4d)[_0xe4d062(0x1fc)](_0x25efbf=>{const _0x2692fa=_0xe4d062;this[_0x2692fa(0x1d7)][_0x2692fa(0x19e)](_0x25efbf['id'],_0x25efbf['params']?JSON[_0x2692fa(0x17b)](_0x25efbf[_0x2692fa(0x17c)]):null,{'fromCollab':!![]});});}['_handleOffline'](){const _0x498524=_0x43267f;var _0x2c2652;this[_0x498524(0x1ad)][_0x498524(0x201)]('offline'),(_0x2c2652=this['_commandDisposable'])===null||_0x2c2652===void 0x0||_0x2c2652[_0x498524(0x1ce)]();}[_0x43267f(0x178)](){const _0x2213d1=_0x43267f;this[_0x2213d1(0x1ad)][_0x2213d1(0x201)](_0x2213d1(0x1f3)),this[_0x2213d1(0x199)]();}};LiveShareCoordinator=__decorate([__decorateParam(0x2,IConfigService),__decorateParam(0x3,Inject(LiveShareService)),__decorateParam(0x4,ICommandService)],LiveShareCoordinator);function LiveShare(){const _0x5915e1=_0x43267f,_0x379895=useDependency(LiveShareController),_0x388630=useDependency(IUniverInstanceService),_0xdfd42=useObservable(()=>_0x388630[_0x5915e1(0x1ee)](UniverInstanceType[_0x5915e1(0x1a8)]),void 0x0,![],[]),[_0x4a50e5,_0x4b0bfe]=useState(null),[_0x58567e,_0x2ea0aa]=useState(_0x5915e1(0x1f3)),_0x3c623e=useRef(null);useEffect(()=>{const _0x11c4e8=_0x5915e1;if(_0xdfd42)_0x379895[_0x11c4e8(0x209)](_0xdfd42[_0x11c4e8(0x1da)]())[_0x11c4e8(0x1f1)](_0x508ef6=>{const _0x35fa11=_0x11c4e8;_0x4b0bfe(_0x508ef6),_0x3c623e['current']=_0x508ef6[_0x35fa11(0x1a6)][_0x35fa11(0x20b)](_0x201338=>{_0x2ea0aa(_0x201338);});});return()=>{const _0x1ea090=_0x11c4e8;var _0x2cdb36;(_0x2cdb36=_0x3c623e[_0x1ea090(0x191)])===null||_0x2cdb36===void 0x0||_0x2cdb36[_0x1ea090(0x208)](),_0x3c623e['current']=null;};},[_0xdfd42,_0x379895]);if(!_0x4a50e5)return null;return jsx(Dropdown,{'align':_0x5915e1(0x1bd),'disabled':_0x58567e==='offline','className':_0x5915e1(0x1af),'overlay':jsx(LiveShareDropdown,{'status':_0x58567e,'coordinator':_0x4a50e5}),'children':jsx(_0x5915e1(0x18e),{'className':clsx(_0x5915e1(0x18b),{'univer-cursor-not-allowed':_0x58567e===_0x5915e1(0x1f8),'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x58567e!=='offline'}),'type':_0x5915e1(0x18e),'children':jsx(LiveShareIcon,{'className':'univer-size-4'})})});}function LiveShareDropdown(_0x581a0f){const _0x3f13f6=_0x43267f,{status:_0x3beb37,coordinator:_0x52fff9}=_0x581a0f;switch(_0x3beb37){case _0x3f13f6(0x1f3):return jsx(Idle,{'coordinator':_0x52fff9});case _0x3f13f6(0x1e2):return jsx(Following,{'coordinator':_0x52fff9});case _0x3f13f6(0x19f):return jsx(NotFollowing,{'coordinator':_0x52fff9});case _0x3f13f6(0x1f8):return jsx(Offline,{});case _0x3f13f6(0x1b7):return jsx(Presenting,{'coordinator':_0x52fff9});default:return null;}}function Idle(_0x24c505){const _0x18e90c=_0x43267f,{coordinator:_0x44c050}=_0x24c505;return jsxs(Fragment,{'children':[jsx(_0x18e90c(0x1a7),{'className':_0x18e90c(0x1c5),'children':_0x18e90c(0x1a5)}),jsx(Button,{'onClick':()=>_0x44c050[_0x18e90c(0x1dd)](),'children':'Start'})]});}function Following(_0x40ab51){const _0x95a466=_0x43267f,{coordinator:_0x3700d7}=_0x40ab51;return jsxs(Fragment,{'children':[jsx(_0x95a466(0x1a7),{'className':_0x95a466(0x1c5),'children':_0x95a466(0x177)}),jsx(Button,{'onClick':()=>_0x3700d7[_0x95a466(0x1ba)](),'children':_0x95a466(0x1b8)})]});}function NotFollowing(_0x1a1126){const _0x7075a8=_0x43267f,{coordinator:_0x43a13a}=_0x1a1126;return jsxs(Fragment,{'children':[jsx('div',{'className':_0x7075a8(0x1c5),'children':'You\x27re\x20not\x20following\x20the\x20presenter'}),jsx(Button,{'variant':'text','onClick':()=>_0x43a13a[_0x7075a8(0x18d)](),'children':_0x7075a8(0x1bb)})]});}function Presenting(_0x211314){const _0x341385=_0x43267f,{coordinator:_0x54a9f1}=_0x211314;return jsxs(Fragment,{'children':[jsx(_0x341385(0x1a7),{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':'You\x27re\x20presenting\x20the\x20document'}),jsx(Button,{'variant':_0x341385(0x1d3),'onClick':()=>_0x54a9f1['stopPresenting'](),'children':_0x341385(0x19d)})]});}function Offline(){const _0x5dd2da=_0x43267f;return jsx(Fragment,{'children':_0x5dd2da(0x1f6)});}let DesktopLiveShareController=class DesktopLiveShareController extends Disposable{constructor(_0xdf0abc,_0x755738){const _0x1057fa=_0x43267f;super(),this[_0x1057fa(0x1c2)]=_0xdf0abc,this[_0x1057fa(0x1d5)]=_0x755738,this[_0x1057fa(0x1f0)]();}['_mountLiveShare'](){const _0x227705=_0x43267f;this['disposeWithMe'](this[_0x227705(0x1d5)][_0x227705(0x1d4)](BuiltInUIPart[_0x227705(0x1eb)],()=>connectInjector(LiveShare,this[_0x227705(0x1c2)])));}};DesktopLiveShareController=__decorate([__decorateParam(0x0,Inject(Injector)),__decorateParam(0x1,IUIPartsService)],DesktopLiveShareController);var name=_0x43267f(0x1cb),version=_0x43267f(0x186);const LIVE_SHARE_PLUGIN_CONFIG_KEY=_0x43267f(0x1aa),configSymbol=Symbol(LIVE_SHARE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let LiveShareCoreExtensionsController=class LiveShareCoreExtensionsController extends Disposable{constructor(_0x2ea649){const _0x568715=_0x43267f;super(),this[_0x568715(0x1cc)]=_0x2ea649,this['_init']();}[_0x43267f(0x1e3)](){const _0x6b076e=_0x43267f;[SetZoomRatioOperation['id'],SetScrollOperation['id'],SetWorksheetActiveOperation['id']][_0x6b076e(0x1fc)](_0x59da6f=>{const _0x1f6df7=_0x6b076e;this[_0x1f6df7(0x1b4)](this[_0x1f6df7(0x1cc)]['registerSharedOperation'](_0x59da6f));});}};LiveShareCoreExtensionsController=__decorate([__decorateParam(0x0,Inject(LiveShareService))],LiveShareCoreExtensionsController);let UniverLiveSharePlugin=class UniverLiveSharePlugin extends Plugin{constructor(_0x49a16f=defaultPluginConfig,_0x292932,_0x12bbce){const _0xa6a956=_0x43267f;super(),this[_0xa6a956(0x1c3)]=_0x49a16f,this[_0xa6a956(0x1c2)]=_0x292932,this[_0xa6a956(0x1ec)]=_0x12bbce;const {..._0x173411}=merge({},defaultPluginConfig,this[_0xa6a956(0x1c3)]);this[_0xa6a956(0x1ec)][_0xa6a956(0x1fe)](LIVE_SHARE_PLUGIN_CONFIG_KEY,_0x173411);}[_0x43267f(0x182)](){const _0x1dde58=_0x43267f;registerDependencies(this['_injector'],mergeOverrideWithDependencies([[LiveShareService],[LiveShareController],[LiveShareCoreExtensionsController],[DesktopLiveShareController]],this[_0x1dde58(0x1c3)][_0x1dde58(0x1b0)])),touchDependencies(this[_0x1dde58(0x1c2)],[[LiveShareCoreExtensionsController]]);}[_0x43267f(0x196)](){touchDependencies(this['_injector'],[[DesktopLiveShareController]]);}};_defineProperty(UniverLiveSharePlugin,_0x43267f(0x188),UniverInstanceType[_0x43267f(0x1d9)]),_defineProperty(UniverLiveSharePlugin,_0x43267f(0x18a),'UNIVER_LIVE_SHARE_PLUGIN'),_defineProperty(UniverLiveSharePlugin,_0x43267f(0x189),name),_defineProperty(UniverLiveSharePlugin,'version',version),UniverLiveSharePlugin=__decorate([DependentOn(UniverCollaborationClientPlugin),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,IConfigService)],UniverLiveSharePlugin);function _0x6cd2(){const _0x1b33c6=['decorate','_entities','send','getStatus','length','onStarting','add','PRESENTING','getConfig','0.22.1','from','type','packageName','pluginName','univer-border-none\x20univer-text-gray-600\x20univer-outline-none','_handleOffline','startFollowing','button','requireSession','_handleOperation','current','LIVESHARE_OPERATION','80528zMGMbf','_presenter','_handleTerminate','onRendered','getTypeOfUnitAdded$','_handleNewChangeSets','_fetchOperations','find','_beIdle','_status','Stop\x20presenting','executeCommand','not-following','object','map','getOwnPropertyDescriptor','6GCpiuj','getMemberID','Present\x20this\x20document','status$','div','UNIVER_SHEET','memberID','live-share.config','constructor','_reporters','_status$','_stopFollowing','univer-box-border\x20univer-min-w-60\x20univer-bg-gray-900\x20univer-px-4\x20univer-py-3\x20univer-text-gray-900\x20dark:!univer-bg-white\x20dark:!univer-text-white','override','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','symbol','sessionStatus$','disposeWithMe','onCommandExecuted','_collabSessionService','presenting','Stop\x20following','197486zrbRia','stopFollowing','Start\x20following','unit','end','dispose$','data','13VzTpHT','ONLINE','_injector','_config','defineProperty','univer-mb-3\x20univer-w-full\x20univer-text-sm','_collabSession','toPrimitive','prototype','5741336luInEw','registerInitialStateReporter','@univerjs-pro/live-share','_liveShareService','get','dispose','has','LIVESHARE_TERMINATE','_startLiveShareCoordinator','_stopPresenting','default','registerComponent','_uiPartsService','_univerInstanceService','_commandService','_startFollowing','UNIVER_UNKNOWN','getUnitId','registerSharedOperation','string','tryStartPresenting','_unitID','event$','NOT_FOLLOWING','pipe','following','_init','SAME_OPERATION_SHARE_INTERVAL','32865Pimxjy','stringify','sheet','set','getInitialStates','createInstance','HEADER_MENU','_configService','_commandDisposable','getCurrentTypeOfUnit$','function','_mountLiveShare','then','complete','idle','getValue','OFFLINE','You\x27are\x20offline.','OPERATION','offline','9PQLGOB','_sharedOperations','reverse','forEach','init','setConfig','getLiveShareCoordinatorSync','delete','next','values','asObservable','unitId','_startPresenting','215lnipAF','39734574xvxeGL','unsubscribe','getLiveShareCoordinator','6694850nowrcj','subscribe','5409166rRKXbR','You\x27re\x20following\x20the\x20presenter','_handleOnline','_handleNewHost','presenter','parse','params'];_0x6cd2=function(){return _0x1b33c6;};return _0x6cd2();}export{DesktopLiveShareController,LiveShare,LiveShareController,LiveShareCoordinator,LiveShareService,LiveShareStatus,UniverLiveSharePlugin};
|
|
1
|
+
const _0x47c8f1=_0x2cb1;(function(_0x5eb62a,_0x5b0056){const _0x4aa4e3=_0x2cb1,_0x157e58=_0x5eb62a();while(!![]){try{const _0x416ffb=parseInt(_0x4aa4e3(0x1a1))/0x1*(parseInt(_0x4aa4e3(0x1a7))/0x2)+-parseInt(_0x4aa4e3(0x186))/0x3*(parseInt(_0x4aa4e3(0x1ee))/0x4)+parseInt(_0x4aa4e3(0x168))/0x5+-parseInt(_0x4aa4e3(0x1e2))/0x6*(-parseInt(_0x4aa4e3(0x182))/0x7)+parseInt(_0x4aa4e3(0x1a5))/0x8+parseInt(_0x4aa4e3(0x194))/0x9+parseInt(_0x4aa4e3(0x1e8))/0xa;if(_0x416ffb===_0x5b0056)break;else _0x157e58['push'](_0x157e58['shift']());}catch(_0x449804){_0x157e58['push'](_0x157e58['shift']());}}}(_0x2c99,0xdf190));import{CommandType as _0x5d2120,DependentOn as _0x59adfd,Disposable as _0x1ae5c9,DisposableCollection as _0x44dd53,ICommandService as _0x527d3d,IConfigService as _0x32448a,IUniverInstanceService as _0x550d63,Inject as _0x185b21,Injector as _0x9c4b6c,Plugin as _0x26cc12,RxDisposable as _0x52e06e,UniverInstanceType as _0x263358,merge as _0x30c7a2,mergeOverrideWithDependencies as _0x3b3145,registerDependencies as _0x47ae4f,toDisposable as _0x548d4a,touchDependencies as _0x188f9e}from'@univerjs/core';import{BuiltInUIPart as _0x5cc6a7,IUIPartsService as _0x428097,connectInjector as _0x3b2d74,useDependency as _0x30ee2b,useObservable as _0x3b1813}from'@univerjs/ui';import{Button as _0x3413ea,Dropdown as _0x1af53e,clsx as _0xb8b532}from'@univerjs/design';import{LiveShareIcon as _0x325dc8}from'@univerjs/icons';import{useEffect as _0x449652,useRef as _0x3db5c6,useState as _0x365589}from'react';import{CollaborationEvent as _0x44d91d,parseProtocolChangeset as _0x299112}from'@univerjs-pro/collaboration';import{CollaborationSessionService as _0x308a34,SessionStatus as _0x524a73,UniverCollaborationClientPlugin as _0x539a49}from'@univerjs-pro/collaboration-client';import{InsertSheetMutation as _0x11f332,SetWorksheetActiveOperation as _0x438a7e}from'@univerjs/sheets';import{BehaviorSubject as _0x1c9a2e,Subject as _0xd312cf}from'rxjs';import{takeUntil as _0x5b1337,throttleTime as _0x35625e}from'rxjs/operators';import{Fragment as _0x5051ba,jsx as _0x4f521d,jsxs as _0x49e20e}from'react/jsx-runtime';import{SetScrollOperation as _0x42382e,SetZoomRatioOperation as _0xda8886}from'@univerjs/sheets-ui';function L(_0x3f8a9e){'@babel/helpers - typeof';const _0x4ac844=_0x2cb1;return L=typeof Symbol==_0x4ac844(0x1eb)&&typeof Symbol['iterator']==_0x4ac844(0x1e7)?function(_0x2c3bce){return typeof _0x2c3bce;}:function(_0x14c960){const _0x46e782=_0x4ac844;return _0x14c960&&typeof Symbol==_0x46e782(0x1eb)&&_0x14c960[_0x46e782(0x195)]===Symbol&&_0x14c960!==Symbol[_0x46e782(0x1ce)]?_0x46e782(0x1e7):typeof _0x14c960;},L(_0x3f8a9e);}function R(_0x443c10,_0x2707c5){const _0x4bd19b=_0x2cb1;if(L(_0x443c10)!=_0x4bd19b(0x1c4)||!_0x443c10)return _0x443c10;var _0x277b7a=_0x443c10[Symbol[_0x4bd19b(0x1d6)]];if(_0x277b7a!==void 0x0){var _0x15b695=_0x277b7a['call'](_0x443c10,_0x2707c5||_0x4bd19b(0x1b5));if(L(_0x15b695)!=_0x4bd19b(0x1c4))return _0x15b695;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x2707c5===_0x4bd19b(0x169)?String:Number)(_0x443c10);}function z(_0x4c1fea){const _0x445e39=_0x2cb1;var _0x1fd6d5=R(_0x4c1fea,_0x445e39(0x169));return L(_0x1fd6d5)==_0x445e39(0x1e7)?_0x1fd6d5:_0x1fd6d5+'';}function B(_0x1ca2e7,_0x3cc66c,_0x48a143){const _0x2174a1=_0x2cb1;return(_0x3cc66c=z(_0x3cc66c))in _0x1ca2e7?Object[_0x2174a1(0x1aa)](_0x1ca2e7,_0x3cc66c,{'value':_0x48a143,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1ca2e7[_0x3cc66c]=_0x48a143,_0x1ca2e7;}var V=class extends _0x1ae5c9{constructor(..._0x9e0232){const _0x148746=_0x2cb1;super(..._0x9e0232),B(this,_0x148746(0x185),new Set()),B(this,_0x148746(0x19b),new Set());}[_0x47c8f1(0x1bc)](_0x3d5023){const _0x513947=_0x47c8f1;return this['_sharedOperations']['add'](_0x3d5023),_0x548d4a(()=>this[_0x513947(0x185)][_0x513947(0x1cf)](_0x3d5023));}[_0x47c8f1(0x1c2)](_0x4e64d3){const _0x385e00=_0x47c8f1;return this[_0x385e00(0x19b)][_0x385e00(0x18b)](_0x4e64d3),_0x548d4a(()=>this[_0x385e00(0x19b)][_0x385e00(0x1cf)](_0x4e64d3));}['shouldShareOperation'](_0x218ef3){const _0x5b4a01=_0x47c8f1;return this[_0x5b4a01(0x185)]['has'](_0x218ef3);}[_0x47c8f1(0x1ad)](_0x34e32f){const _0x7b7120=_0x47c8f1;return Array[_0x7b7120(0x1a2)](this['_reporters'])[_0x7b7120(0x17e)](_0x45622a=>_0x45622a(_0x34e32f));}};function H(_0x45a933,_0x498894){return function(_0x1a0349,_0x423ec3){_0x498894(_0x1a0349,_0x423ec3,_0x45a933);};}function U(_0x52438c,_0xb9bd53,_0x3a3bbb,_0x4a53f8){const _0x4a70ea=_0x47c8f1;var _0x5b50a9=arguments[_0x4a70ea(0x18e)],_0x5e1d6a=_0x5b50a9<0x3?_0xb9bd53:_0x4a53f8===null?_0x4a53f8=Object[_0x4a70ea(0x175)](_0xb9bd53,_0x3a3bbb):_0x4a53f8,_0x32188a;if(typeof Reflect==_0x4a70ea(0x1c4)&&typeof Reflect['decorate']==_0x4a70ea(0x1eb))_0x5e1d6a=Reflect[_0x4a70ea(0x1f0)](_0x52438c,_0xb9bd53,_0x3a3bbb,_0x4a53f8);else{for(var _0x3a9a5c=_0x52438c[_0x4a70ea(0x18e)]-0x1;_0x3a9a5c>=0x0;_0x3a9a5c--)(_0x32188a=_0x52438c[_0x3a9a5c])&&(_0x5e1d6a=(_0x5b50a9<0x3?_0x32188a(_0x5e1d6a):_0x5b50a9>0x3?_0x32188a(_0xb9bd53,_0x3a3bbb,_0x5e1d6a):_0x32188a(_0xb9bd53,_0x3a3bbb))||_0x5e1d6a);}return _0x5b50a9>0x3&&_0x5e1d6a&&Object[_0x4a70ea(0x1aa)](_0xb9bd53,_0x3a3bbb,_0x5e1d6a),_0x5e1d6a;}let W=class extends _0x52e06e{constructor(_0x18640b,_0x332e21,_0x4a8660){const _0x1d285a=_0x47c8f1;super(),this[_0x1d285a(0x1ea)]=_0x18640b,this['_injector']=_0x332e21,this[_0x1d285a(0x1e3)]=_0x4a8660,B(this,_0x1d285a(0x1e9),new Map()),this[_0x1d285a(0x1cc)]();}async[_0x47c8f1(0x1d5)](_0x1b64d9){const _0xbe3015=_0x47c8f1;return this['_entities'][_0xbe3015(0x1f3)](_0x1b64d9)||await this[_0xbe3015(0x1cb)](_0x1b64d9),this['_entities']['get'](_0x1b64d9);}[_0x47c8f1(0x1a9)](_0x2da612){const _0x55b93d=_0x47c8f1;var _0x16348f;return(_0x16348f=this[_0x55b93d(0x1e9)][_0x55b93d(0x192)](_0x2da612))==null?null:_0x16348f;}['_init'](){const _0x5354b9=_0x47c8f1;this[_0x5354b9(0x1ea)][_0x5354b9(0x1f2)](_0x263358['UNIVER_SHEET'])['pipe'](_0x5b1337(this['dispose$']))['subscribe'](async _0x383752=>{const _0x1869d9=_0x5354b9;let _0x47c0e7=_0x383752[_0x1869d9(0x1d3)][_0x1869d9(0x19c)]();this[_0x1869d9(0x1e9)][_0x1869d9(0x1f3)](_0x47c0e7)||this[_0x1869d9(0x1cb)](_0x47c0e7);}),this[_0x5354b9(0x1ea)][_0x5354b9(0x18d)](_0x263358[_0x5354b9(0x1d1)])[_0x5354b9(0x1da)](_0x5b1337(this[_0x5354b9(0x199)]))['subscribe'](_0x4213b8=>{const _0x3b6e17=_0x5354b9;let _0x3fd502=_0x4213b8['getUnitId'](),_0x2b5cb4=this['_entities'][_0x3b6e17(0x192)](_0x3fd502);_0x2b5cb4==null||_0x2b5cb4[_0x3b6e17(0x1c1)]();});}async[_0x47c8f1(0x1cb)](_0x11880c){const _0x467dab=_0x47c8f1;let _0x1945af=await this[_0x467dab(0x1e3)][_0x467dab(0x17b)](_0x11880c),_0x17426d=this[_0x467dab(0x1a3)][_0x467dab(0x1b4)](K,_0x11880c,_0x1945af);return _0x17426d[_0x467dab(0x16a)](),this[_0x467dab(0x1e9)][_0x467dab(0x172)](_0x11880c,_0x17426d),_0x17426d;}};W=U([H(0x0,_0x550d63),H(0x1,_0x185b21(_0x9c4b6c)),H(0x2,_0x185b21(_0x308a34))],W);let G=function(_0x5811f2){const _0x21a8d8=_0x47c8f1;return _0x5811f2[_0x21a8d8(0x191)]=_0x21a8d8(0x17a),_0x5811f2[_0x21a8d8(0x1ac)]=_0x21a8d8(0x1b1),_0x5811f2['FOLLOWING']='following',_0x5811f2[_0x21a8d8(0x1c6)]=_0x21a8d8(0x1bb),_0x5811f2[_0x21a8d8(0x1d0)]='presenting',_0x5811f2;}({}),K=class extends _0x52e06e{get['_status'](){return this['_status$']['getValue']();}constructor(_0x2ae9ac,_0x45e7ec,_0x5a7aa4,_0x3e9955,_0x54343c){const _0x17862c=_0x47c8f1;super(),this[_0x17862c(0x167)]=_0x2ae9ac,this[_0x17862c(0x1b9)]=_0x45e7ec,this[_0x17862c(0x18c)]=_0x5a7aa4,this['_liveShareService']=_0x3e9955,this['_commandService']=_0x54343c,B(this,_0x17862c(0x183),new _0x1c9a2e(_0x17862c(0x1b1))),B(this,_0x17862c(0x16e),this[_0x17862c(0x183)][_0x17862c(0x1c9)]()),B(this,_0x17862c(0x1cc),!0x1),B(this,_0x17862c(0x184),null),B(this,_0x17862c(0x1c8),null);}[_0x47c8f1(0x1c1)](){const _0x1261d2=_0x47c8f1;var _0x2a7904;(_0x2a7904=this[_0x1261d2(0x184)])==null||_0x2a7904[_0x1261d2(0x1c1)](),this['_status$'][_0x1261d2(0x16b)](_0x1261d2(0x1b1)),this['_status$'][_0x1261d2(0x180)]();}['getStatus'](){const _0x2ecc52=_0x47c8f1;return this[_0x2ecc52(0x170)];}[_0x47c8f1(0x16a)](){const _0x2bbfb8=_0x47c8f1;this[_0x2bbfb8(0x1cc)]||(this[_0x2bbfb8(0x1cc)]=!0x0,this[_0x2bbfb8(0x1b9)][_0x2bbfb8(0x179)][_0x2bbfb8(0x1da)](_0x5b1337(this[_0x2bbfb8(0x199)]))[_0x2bbfb8(0x19d)](_0x13a848=>{const _0x169b16=_0x2bbfb8;switch(_0x13a848){case _0x524a73[_0x169b16(0x191)]:this['_handleOffline']();break;case _0x524a73['ONLINE']:this[_0x169b16(0x1bd)]();break;default:}}),this[_0x2bbfb8(0x1b9)]['event$'][_0x2bbfb8(0x1da)](_0x5b1337(this[_0x2bbfb8(0x199)]))[_0x2bbfb8(0x19d)](_0x18f599=>{const _0x58af88=_0x2bbfb8;let {eventID:_0x79cc9b}=_0x18f599;switch(_0x79cc9b){case _0x44d91d['LIVESHARE_NEW_HOST']:this[_0x58af88(0x189)](_0x18f599);break;case _0x44d91d[_0x58af88(0x1ef)]:this[_0x58af88(0x177)](_0x18f599);break;case _0x44d91d[_0x58af88(0x18f)]:this[_0x58af88(0x198)]();break;case _0x44d91d[_0x58af88(0x1e1)]:this['_handleNewChangeSets'](_0x18f599);break;default:}}));}['tryStartPresenting'](){const _0x4fc86d=_0x47c8f1;this[_0x4fc86d(0x1b9)][_0x4fc86d(0x1b3)]({'eventID':_0x44d91d[_0x4fc86d(0x1d4)],'data':{'unitID':this[_0x4fc86d(0x167)],'userID':this[_0x4fc86d(0x1b9)]['getMemberID']()}},this['_unitID']);}[_0x47c8f1(0x1b0)](){const _0xee72a9=_0x47c8f1;this[_0xee72a9(0x170)]===_0xee72a9(0x1df)&&(this[_0xee72a9(0x183)]['next'](_0xee72a9(0x1b1)),this[_0xee72a9(0x1b9)][_0xee72a9(0x1b3)]({'eventID':_0x44d91d[_0xee72a9(0x18f)],'data':{'unitID':this[_0xee72a9(0x167)]}},this[_0xee72a9(0x167)]));}['startFollowing'](){const _0xfb20e1=_0x47c8f1;this[_0xfb20e1(0x170)]===_0xfb20e1(0x1bb)&&(this['_status$']['next']('following'),this[_0xfb20e1(0x1c3)]());}[_0x47c8f1(0x1a6)](){const _0x519ddb=_0x47c8f1;this[_0x519ddb(0x170)]===_0x519ddb(0x1cd)&&this[_0x519ddb(0x173)]();}['_handleNewHost'](_0x967035){const _0x3c2ae8=_0x47c8f1;let {presenter:_0x2e162d}=_0x967035['data'],_0x4f48f4=this[_0x3c2ae8(0x1b9)]['getMemberID']();this[_0x3c2ae8(0x1c8)]=_0x2e162d,_0x2e162d===_0x4f48f4?(this[_0x3c2ae8(0x173)](),this[_0x3c2ae8(0x181)]()):this[_0x3c2ae8(0x170)]!=='not-following'&&(this['_stopPresenting'](),this['_startFollowing']());}[_0x47c8f1(0x19f)](){const _0x3c4f09=_0x47c8f1;let _0x57aad0={'eventID':_0x44d91d['LIVESHARE_FETCH_OPERATIONS']};this[_0x3c4f09(0x1b9)][_0x3c4f09(0x1b3)](_0x57aad0,this[_0x3c4f09(0x167)]);}[_0x47c8f1(0x198)](){const _0x5849b4=_0x47c8f1;this[_0x5849b4(0x1c8)]=null,this[_0x5849b4(0x170)]!=='presenting'&&this[_0x5849b4(0x1e0)]();}['_handleNewChangeSets'](_0x4ec5ff){const _0x4bf4bf=_0x47c8f1;if(this[_0x4bf4bf(0x170)]==='following'&&this[_0x4bf4bf(0x1c8)]===_0x4ec5ff['data'][_0x4bf4bf(0x1d2)]){let _0x4e54bd=_0x299112(_0x4ec5ff['data'])['mutations']['reverse']()['find'](_0x402df7=>_0x402df7['id']===_0x11f332['id']);if(_0x4e54bd){let _0x1014a0=_0x4e54bd[_0x4bf4bf(0x171)][_0x4bf4bf(0x1f4)],_0x5be2ca=_0x4e54bd[_0x4bf4bf(0x171)][_0x4bf4bf(0x176)]['id'];setTimeout(()=>{const _0x28c864=_0x4bf4bf;this[_0x28c864(0x187)][_0x28c864(0x16d)](_0x438a7e['id'],{'unitId':_0x1014a0,'subUnitId':_0x5be2ca},{'fromCollab':!0x0});});}}}['_startPresenting'](){const _0x15efdf=_0x47c8f1;this['_status$']['next'](_0x15efdf(0x1df));let _0x17d7f3=new Map(),_0x21331a=this['_commandDisposable']=new _0x44dd53();_0x21331a[_0x15efdf(0x18b)](_0x548d4a(()=>{const _0x21c8f6=_0x15efdf;_0x17d7f3[_0x21c8f6(0x17f)](_0x22f94f=>_0x22f94f[_0x21c8f6(0x180)]()),_0x17d7f3[_0x21c8f6(0x1be)]();})),_0x21331a[_0x15efdf(0x18b)](this['_commandService'][_0x15efdf(0x17d)](_0x3362c9=>{const _0x2b4ac1=_0x15efdf;if(_0x3362c9[_0x2b4ac1(0x1a8)]!==_0x5d2120[_0x2b4ac1(0x1a0)]||!this[_0x2b4ac1(0x1ca)]['shouldShareOperation'](_0x3362c9['id']))return;let {id:_0x315a9e}=_0x3362c9,_0x568524;if(_0x17d7f3[_0x2b4ac1(0x1f3)](_0x315a9e))_0x568524=_0x17d7f3['get'](_0x315a9e);else{var _0x51d409;_0x568524=new _0xd312cf(),_0x17d7f3['set'](_0x315a9e,_0x568524),_0x568524[_0x2b4ac1(0x1da)](_0x35625e((_0x51d409=this[_0x2b4ac1(0x18c)]['getConfig']('SAME_OPERATION_SHARE_INTERVAL'))==null?0xc8:_0x51d409,void 0x0,{'trailing':!0x0,'leading':!0x0}))[_0x2b4ac1(0x19d)](_0x3570d5=>{const _0x5feba1=_0x2b4ac1;this[_0x5feba1(0x1b9)][_0x5feba1(0x1b3)]({'eventID':_0x44d91d['LIVESHARE_OPERATION'],'data':{'unitID':this[_0x5feba1(0x167)],'operations':{[_0x3570d5['id']]:{'id':_0x3570d5['id'],'params':JSON['stringify'](_0x3570d5[_0x5feba1(0x171)])}}}},this['_unitID']);});}_0x568524['next'](_0x3362c9);})),this[_0x15efdf(0x1ca)]['getInitialStates'](this[_0x15efdf(0x167)])['forEach'](_0x23120b=>this[_0x15efdf(0x1b9)][_0x15efdf(0x1b3)]({'eventID':_0x44d91d[_0x15efdf(0x1ef)],'data':{'unitID':this[_0x15efdf(0x167)],'operations':{[_0x23120b['id']]:{'id':_0x23120b['id'],'params':JSON['stringify'](_0x23120b[_0x15efdf(0x171)])}}}},this[_0x15efdf(0x167)]));}[_0x47c8f1(0x1b6)](){const _0x2be920=_0x47c8f1;var _0x50b9af;this['_status$'][_0x2be920(0x16b)](_0x2be920(0x1b1)),(_0x50b9af=this[_0x2be920(0x184)])==null||_0x50b9af[_0x2be920(0x1c1)](),this[_0x2be920(0x184)]=null;}[_0x47c8f1(0x1c3)](){const _0x1217fe=_0x47c8f1;var _0x4303c5;(_0x4303c5=this[_0x1217fe(0x184)])==null||_0x4303c5[_0x1217fe(0x1c1)](),this[_0x1217fe(0x183)][_0x1217fe(0x16b)]('following');}['_beIdle'](){const _0x5f6fc1=_0x47c8f1;var _0x43ae1d;this[_0x5f6fc1(0x183)]['next'](_0x5f6fc1(0x1b1)),(_0x43ae1d=this[_0x5f6fc1(0x184)])==null||_0x43ae1d[_0x5f6fc1(0x1c1)](),this[_0x5f6fc1(0x184)]=null;}[_0x47c8f1(0x173)](){const _0x3f8bcd=_0x47c8f1;var _0x45762e;this[_0x3f8bcd(0x183)][_0x3f8bcd(0x16b)](_0x3f8bcd(0x1bb)),(_0x45762e=this['_commandDisposable'])==null||_0x45762e[_0x3f8bcd(0x1c1)]();}[_0x47c8f1(0x177)](_0x39b763){const _0x518c96=_0x47c8f1;if([_0x518c96(0x1df),_0x518c96(0x1bb),_0x518c96(0x17a)][_0x518c96(0x17c)](this[_0x518c96(0x170)])||!_0x39b763[_0x518c96(0x174)]['presenter']||_0x39b763[_0x518c96(0x174)][_0x518c96(0x1ae)]===this[_0x518c96(0x1b9)][_0x518c96(0x197)]())return;this[_0x518c96(0x170)]===_0x518c96(0x1b1)&&this[_0x518c96(0x1c3)]();let _0x26d5dc=_0x39b763[_0x518c96(0x174)][_0x518c96(0x193)];Object[_0x518c96(0x1d7)](_0x26d5dc)[_0x518c96(0x17f)](_0x2c7f10=>{const _0x4643c5=_0x518c96;this[_0x4643c5(0x187)][_0x4643c5(0x16d)](_0x2c7f10['id'],_0x2c7f10[_0x4643c5(0x171)]?JSON[_0x4643c5(0x1c5)](_0x2c7f10['params']):null,{'fromCollab':!0x0});});}[_0x47c8f1(0x1d9)](){const _0x4e1193=_0x47c8f1;var _0x46f4cd;this['_status$'][_0x4e1193(0x16b)](_0x4e1193(0x17a)),(_0x46f4cd=this[_0x4e1193(0x184)])==null||_0x46f4cd['dispose']();}[_0x47c8f1(0x1bd)](){const _0x2c08a0=_0x47c8f1;this[_0x2c08a0(0x183)][_0x2c08a0(0x16b)](_0x2c08a0(0x1b1)),this[_0x2c08a0(0x19f)]();}};K=U([H(0x2,_0x32448a),H(0x3,_0x185b21(V)),H(0x4,_0x527d3d)],K);function q(){const _0x4ad21a=_0x47c8f1;let _0x4c8b04=_0x30ee2b(W),_0x2a8f48=_0x30ee2b(_0x550d63),_0x16eb48=_0x3b1813(()=>_0x2a8f48[_0x4ad21a(0x1b2)](_0x263358[_0x4ad21a(0x1d1)]),void 0x0,!0x1,[]),[_0x170cde,_0x28bf83]=_0x365589(null),[_0x3bc4c4,_0x30c2dc]=_0x365589('idle'),_0x392f38=_0x3db5c6(null);return _0x449652(()=>(_0x16eb48&&_0x4c8b04[_0x4ad21a(0x1d5)](_0x16eb48[_0x4ad21a(0x19c)]())[_0x4ad21a(0x19a)](_0x19e731=>{const _0x1dc6e7=_0x4ad21a;_0x28bf83(_0x19e731),_0x392f38['current']=_0x19e731[_0x1dc6e7(0x16e)][_0x1dc6e7(0x19d)](_0x30ddbe=>{_0x30c2dc(_0x30ddbe);});}),()=>{const _0x56edf0=_0x4ad21a;var _0x5a3540;(_0x5a3540=_0x392f38[_0x56edf0(0x1f1)])==null||_0x5a3540['unsubscribe'](),_0x392f38['current']=null;}),[_0x16eb48,_0x4c8b04]),_0x170cde?_0x4f521d(_0x1af53e,{'align':'end','disabled':_0x3bc4c4==='offline','className':_0x4ad21a(0x1ba),'overlay':_0x4f521d(ce,{'status':_0x3bc4c4,'coordinator':_0x170cde}),'children':_0x4f521d(_0x4ad21a(0x178),{'className':_0xb8b532(_0x4ad21a(0x19e),{'univer-cursor-not-allowed':_0x3bc4c4===_0x4ad21a(0x17a),'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x3bc4c4!=='offline'}),'type':_0x4ad21a(0x178),'children':_0x4f521d(_0x325dc8,{'className':_0x4ad21a(0x1c7)})})}):null;}function ce(_0x13e49e){const _0x24d331=_0x47c8f1;let {status:_0x4929b3,coordinator:_0x2c4c33}=_0x13e49e;switch(_0x4929b3){case _0x24d331(0x1b1):return _0x4f521d(le,{'coordinator':_0x2c4c33});case _0x24d331(0x1cd):return _0x4f521d(ue,{'coordinator':_0x2c4c33});case _0x24d331(0x1bb):return _0x4f521d(de,{'coordinator':_0x2c4c33});case _0x24d331(0x17a):return _0x4f521d(fe,{});case _0x24d331(0x1df):return _0x4f521d(J,{'coordinator':_0x2c4c33});default:return null;}}function le(_0x4009d2){const _0x970997=_0x47c8f1;let {coordinator:_0x4f9614}=_0x4009d2;return _0x49e20e(_0x5051ba,{'children':[_0x4f521d('div',{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':_0x970997(0x1b8)}),_0x4f521d(_0x3413ea,{'onClick':()=>_0x4f9614[_0x970997(0x1e4)](),'children':_0x970997(0x1ab)})]});}function ue(_0xd6c01f){const _0x307a88=_0x47c8f1;let {coordinator:_0x397fa0}=_0xd6c01f;return _0x49e20e(_0x5051ba,{'children':[_0x4f521d(_0x307a88(0x1d8),{'className':_0x307a88(0x1dd),'children':'You\x27re\x20following\x20the\x20presenter'}),_0x4f521d(_0x3413ea,{'onClick':()=>_0x397fa0[_0x307a88(0x1a6)](),'children':_0x307a88(0x1af)})]});}function _0x2cb1(_0x425720,_0x1ced66){_0x425720=_0x425720-0x167;const _0x2c99ce=_0x2c99();let _0x2cb1be=_0x2c99ce[_0x425720];return _0x2cb1be;}function de(_0x428c91){const _0x4db372=_0x47c8f1;let {coordinator:_0x196692}=_0x428c91;return _0x49e20e(_0x5051ba,{'children':[_0x4f521d(_0x4db372(0x1d8),{'className':_0x4db372(0x1dd),'children':_0x4db372(0x16f)}),_0x4f521d(_0x3413ea,{'variant':'text','onClick':()=>_0x196692[_0x4db372(0x1dc)](),'children':'Start\x20following'})]});}function J(_0x229033){const _0x2b84a8=_0x47c8f1;let {coordinator:_0x2255cc}=_0x229033;return _0x49e20e(_0x5051ba,{'children':[_0x4f521d(_0x2b84a8(0x1d8),{'className':_0x2b84a8(0x1dd),'children':_0x2b84a8(0x1de)}),_0x4f521d(_0x3413ea,{'variant':_0x2b84a8(0x1b5),'onClick':()=>_0x2255cc[_0x2b84a8(0x1b0)](),'children':_0x2b84a8(0x190)})]});}function fe(){const _0x4c2716=_0x47c8f1;return _0x4f521d(_0x5051ba,{'children':_0x4c2716(0x1bf)});}let Y=class extends _0x1ae5c9{constructor(_0x3bc0b8,_0x14b866){const _0x3912e8=_0x47c8f1;super(),this[_0x3912e8(0x1a3)]=_0x3bc0b8,this['_uiPartsService']=_0x14b866,this[_0x3912e8(0x16c)]();}[_0x47c8f1(0x16c)](){const _0x9f0e14=_0x47c8f1;this[_0x9f0e14(0x1db)](this['_uiPartsService'][_0x9f0e14(0x1e6)](_0x5cc6a7[_0x9f0e14(0x18a)],()=>_0x3b2d74(q,this['_injector'])));}};Y=U([H(0x0,_0x185b21(_0x9c4b6c)),H(0x1,_0x428097)],Y);var pe='@univerjs-pro/live-share',me='0.23.0-insiders.20260522-e8f2a3b';const X=_0x47c8f1(0x1b7);Symbol(X);const Z={};let Q=class extends _0x1ae5c9{constructor(_0x9f8af7){const _0x141542=_0x47c8f1;super(),this[_0x141542(0x1ca)]=_0x9f8af7,this[_0x141542(0x1cc)]();}['_init'](){const _0x243e79=_0x47c8f1;[_0xda8886['id'],_0x42382e['id'],_0x438a7e['id']][_0x243e79(0x17f)](_0x3b717e=>{const _0xeba9fc=_0x243e79;this[_0xeba9fc(0x1db)](this[_0xeba9fc(0x1ca)][_0xeba9fc(0x1bc)](_0x3b717e));});}};Q=U([H(0x0,_0x185b21(V))],Q);function _0x2c99(){const _0x57af69=['2llaBqe','type','getLiveShareCoordinatorSync','defineProperty','Start','IDLE','getInitialStates','presenter','Stop\x20following','stopPresenting','idle','getCurrentTypeOfUnit$','send','createInstance','default','_stopPresenting','live-share.config','Present\x20this\x20document','_collabSession','univer-box-border\x20univer-min-w-60\x20univer-bg-gray-900\x20univer-px-4\x20univer-py-3\x20univer-text-gray-900\x20dark:!univer-bg-white\x20dark:!univer-text-white','not-following','registerSharedOperation','_handleOnline','clear','You\x27are\x20offline.','UNIVER_UNKNOWN','dispose','registerInitialStateReporter','_startFollowing','object','parse','NOT_FOLLOWING','univer-size-4','_presenter','asObservable','_liveShareService','_startLiveShareCoordinator','_init','following','prototype','delete','PRESENTING','UNIVER_SHEET','memberID','unit','LIVESHARE_REQUEST_HOST','getLiveShareCoordinator','toPrimitive','values','div','_handleOffline','pipe','disposeWithMe','startFollowing','univer-mb-3\x20univer-w-full\x20univer-text-sm','You\x27re\x20presenting\x20the\x20document','presenting','_beIdle','NEW_CHANGESETS','6FImBYl','_collabSessionService','tryStartPresenting','setConfig','registerComponent','symbol','112340HLulmP','_entities','_univerInstanceService','function','onStarting','_config','6769988KlGxiE','LIVESHARE_OPERATION','decorate','current','getTypeOfUnitAdded$','has','unitId','_unitID','3115500zERVvT','string','init','next','_mountLiveShare','executeCommand','status$','You\x27re\x20not\x20following\x20the\x20presenter','_status','params','set','_stopFollowing','data','getOwnPropertyDescriptor','sheet','_handleOperation','button','sessionStatus$','offline','requireSession','includes','onCommandExecuted','map','forEach','complete','_startPresenting','188524UvhfLc','_status$','_commandDisposable','_sharedOperations','3OfeCFG','_commandService','onRendered','_handleNewHost','HEADER_MENU','add','_configService','getTypeOfUnitDisposed$','length','LIVESHARE_TERMINATE','Stop\x20presenting','OFFLINE','get','operations','2066553kxRyuK','constructor','UNIVER_LIVE_SHARE_PLUGIN','getMemberID','_handleTerminate','dispose$','then','_reporters','getUnitId','subscribe','univer-border-none\x20univer-text-gray-600\x20univer-outline-none','_fetchOperations','OPERATION','1048823tSCvfL','from','_injector','packageName','5332792MgfnZW','stopFollowing'];_0x2c99=function(){return _0x57af69;};return _0x2c99();}let $=class extends _0x26cc12{constructor(_0x5885e6=Z,_0x3b5eb1,_0x4afe5e){const _0x417dd4=_0x47c8f1;super(),this[_0x417dd4(0x1ed)]=_0x5885e6,this['_injector']=_0x3b5eb1,this[_0x417dd4(0x18c)]=_0x4afe5e;let {..._0x110118}=_0x30c7a2({},Z,this[_0x417dd4(0x1ed)]);this[_0x417dd4(0x18c)][_0x417dd4(0x1e5)](X,_0x110118);}[_0x47c8f1(0x1ec)](){const _0x219fd7=_0x47c8f1;_0x47ae4f(this[_0x219fd7(0x1a3)],_0x3b3145([[V],[W],[Q],[Y]],this['_config']['override'])),_0x188f9e(this[_0x219fd7(0x1a3)],[[Q]]);}[_0x47c8f1(0x188)](){const _0x18196d=_0x47c8f1;_0x188f9e(this[_0x18196d(0x1a3)],[[Y]]);}};B($,'type',_0x263358[_0x47c8f1(0x1c0)]),B($,'pluginName',_0x47c8f1(0x196)),B($,_0x47c8f1(0x1a4),pe),B($,'version',me),$=U([_0x59adfd(_0x539a49),H(0x1,_0x185b21(_0x9c4b6c)),H(0x2,_0x32448a)],$);export{Y as DesktopLiveShareController,q as LiveShare,W as LiveShareController,K as LiveShareCoordinator,V as LiveShareService,G as LiveShareStatus,$ as UniverLiveSharePlugin};
|
package/lib/umd/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x35cf(_0x48ea94,_0x4b9886){_0x48ea94=_0x48ea94-0x1d2;const _0x450708=_0x4507();let _0x35cfbf=_0x450708[_0x48ea94];return _0x35cfbf;}(function(_0x50125d,_0x396486){const _0x149f33=_0x35cf,_0xf2ed45=_0x50125d();while(!![]){try{const _0x315749=parseInt(_0x149f33(0x203))/0x1+parseInt(_0x149f33(0x1f9))/0x2+parseInt(_0x149f33(0x1f1))/0x3*(-parseInt(_0x149f33(0x1fb))/0x4)+-parseInt(_0x149f33(0x201))/0x5*(-parseInt(_0x149f33(0x1f3))/0x6)+-parseInt(_0x149f33(0x204))/0x7*(parseInt(_0x149f33(0x1e9))/0x8)+parseInt(_0x149f33(0x1fd))/0x9+parseInt(_0x149f33(0x1f8))/0xa*(parseInt(_0x149f33(0x1de))/0xb);if(_0x315749===_0x396486)break;else _0xf2ed45['push'](_0xf2ed45['shift']());}catch(_0x3ee075){_0xf2ed45['push'](_0xf2ed45['shift']());}}}(_0x4507,0x5bac7),function(_0x386930,_0x2566b1){const _0x42adb0=_0x35cf;typeof exports=='object'&&typeof module<'u'?_0x2566b1(require(`@univerjs-pro/live-share`),require(`@univerjs/core`),require(`@univerjs/core/facade`)):typeof define==_0x42adb0(0x1dd)&&define[_0x42adb0(0x1ec)]?define(['@univerjs-pro/live-share',_0x42adb0(0x1fe),_0x42adb0(0x200)],_0x2566b1):(_0x386930=typeof globalThis<'u'?globalThis:_0x386930||self,_0x2566b1(_0x386930[_0x42adb0(0x1f6)],_0x386930[_0x42adb0(0x1fc)],_0x386930[_0x42adb0(0x1da)]));}(this,function(_0x4b43b4,_0x27fc07,_0x5d8f3d){const _0x593413=_0x35cf;function _0xd811a(_0x47e55d){'@babel/helpers - typeof';const _0x2c484e=_0x35cf;return _0xd811a=typeof Symbol==_0x2c484e(0x1dd)&&typeof Symbol[_0x2c484e(0x1d8)]==_0x2c484e(0x1e5)?function(_0x3f5ea4){return typeof _0x3f5ea4;}:function(_0x44a5b4){const _0x3b05c4=_0x2c484e;return _0x44a5b4&&typeof Symbol==_0x3b05c4(0x1dd)&&_0x44a5b4[_0x3b05c4(0x1f4)]===Symbol&&_0x44a5b4!==Symbol['prototype']?_0x3b05c4(0x1e5):typeof _0x44a5b4;},_0xd811a(_0x47e55d);}function _0x38b04d(_0x52ab71,_0x2b6f72){const _0x11fcbb=_0x35cf;if(_0xd811a(_0x52ab71)!='object'||!_0x52ab71)return _0x52ab71;var _0x5e3013=_0x52ab71[Symbol[_0x11fcbb(0x1e0)]];if(_0x5e3013!==void 0x0){var _0x2fc2c0=_0x5e3013[_0x11fcbb(0x1e2)](_0x52ab71,_0x2b6f72||_0x11fcbb(0x1fa));if(_0xd811a(_0x2fc2c0)!=_0x11fcbb(0x1f5))return _0x2fc2c0;throw TypeError(_0x11fcbb(0x1ed));}return(_0x2b6f72==='string'?String:Number)(_0x52ab71);}function _0x49ff52(_0x1d9f7d){const _0x42adc8=_0x35cf;var _0x38fc09=_0x38b04d(_0x1d9f7d,_0x42adc8(0x1d6));return _0xd811a(_0x38fc09)==_0x42adc8(0x1e5)?_0x38fc09:_0x38fc09+'';}function _0x17b9ff(_0x55290d,_0xc53e77,_0x12c08a){const _0x2507cb=_0x35cf;return(_0xc53e77=_0x49ff52(_0xc53e77))in _0x55290d?Object[_0x2507cb(0x1d7)](_0x55290d,_0xc53e77,{'value':_0x12c08a,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x55290d[_0xc53e77]=_0x12c08a,_0x55290d;}var _0xecfe0f=class extends _0x5d8f3d['FUniver']{constructor(..._0x524476){const _0x3f9c75=_0x35cf;super(..._0x524476),_0x17b9ff(this,_0x3f9c75(0x1e6),void 0x0);}[_0x593413(0x1e7)](_0x43e032){const _0x4aa9c6=_0x593413;this[_0x4aa9c6(0x1e6)]=_0x43e032[_0x4aa9c6(0x1d2)](_0x4b43b4[_0x4aa9c6(0x1ee)]);}[_0x593413(0x1eb)](){const _0x666983=_0x593413;var _0x48825b;let _0x45531b=this['_injector'][_0x666983(0x1d2)](_0x27fc07[_0x666983(0x1df)])[_0x666983(0x1f7)](_0x27fc07['UniverInstanceType'][_0x666983(0x1d4)]);if(!_0x45531b)throw Error(_0x666983(0x1db));let _0x22152d=_0x45531b[_0x666983(0x1ea)](),_0x44d2c3=this[_0x666983(0x1e6)][_0x666983(0x1e8)](_0x22152d);return(_0x48825b=_0x44d2c3==null?void 0x0:_0x44d2c3[_0x666983(0x1e4)]())==null?_0x4b43b4[_0x666983(0x202)]['IDLE']:_0x48825b;}['startFollowing'](){const _0x2300fa=_0x593413;let _0x478386=this[_0x2300fa(0x1ff)][_0x2300fa(0x1d2)](_0x27fc07[_0x2300fa(0x1df)])[_0x2300fa(0x1f7)](_0x27fc07[_0x2300fa(0x1e3)]['UNIVER_SHEET']);if(!_0x478386)throw Error(_0x2300fa(0x1db));let _0x286442=_0x478386[_0x2300fa(0x1ea)](),_0x1d0184=this[_0x2300fa(0x1e6)][_0x2300fa(0x1e8)](_0x286442);if(!_0x1d0184)throw Error('No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.');_0x1d0184[_0x2300fa(0x1e1)]();}['stopFollowing'](){const _0x3f7164=_0x593413;let _0x5bf5d3=this[_0x3f7164(0x1ff)][_0x3f7164(0x1d2)](_0x27fc07['IUniverInstanceService'])['getCurrentUnitOfType'](_0x27fc07[_0x3f7164(0x1e3)][_0x3f7164(0x1d4)]);if(!_0x5bf5d3)throw Error(_0x3f7164(0x1db));let _0x3d9795=_0x5bf5d3['getUnitId'](),_0xa6e7c3=this[_0x3f7164(0x1e6)][_0x3f7164(0x1e8)](_0x3d9795);if(!_0xa6e7c3)throw Error(_0x3f7164(0x1ef));_0xa6e7c3['stopFollowing']();}[_0x593413(0x1f2)](){const _0x1d777d=_0x593413;let _0x3c20a9=this[_0x1d777d(0x1ff)]['get'](_0x27fc07[_0x1d777d(0x1df)])[_0x1d777d(0x1f7)](_0x27fc07[_0x1d777d(0x1e3)]['UNIVER_SHEET']);if(!_0x3c20a9)throw Error(_0x1d777d(0x1db));let _0x83bd15=_0x3c20a9[_0x1d777d(0x1ea)](),_0x3eb537=this[_0x1d777d(0x1e6)]['getLiveShareCoordinatorSync'](_0x83bd15);if(!_0x3eb537)throw Error('No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.');_0x3eb537[_0x1d777d(0x1d9)]();}['stopPresenting'](){const _0x3dbedf=_0x593413;let _0x27ffda=this[_0x3dbedf(0x1ff)][_0x3dbedf(0x1d2)](_0x27fc07[_0x3dbedf(0x1df)])['getCurrentUnitOfType'](_0x27fc07[_0x3dbedf(0x1e3)][_0x3dbedf(0x1d4)]);if(!_0x27ffda)throw Error('No\x20active\x20workbook\x20found.');let _0x385313=_0x27ffda[_0x3dbedf(0x1ea)](),_0x55e798=this[_0x3dbedf(0x1e6)][_0x3dbedf(0x1e8)](_0x385313);if(!_0x55e798)throw Error(_0x3dbedf(0x1ef));_0x55e798[_0x3dbedf(0x1dc)]();}};_0x5d8f3d[_0x593413(0x1d3)][_0x593413(0x1d5)](_0xecfe0f);var _0x207a30=class extends _0x5d8f3d[_0x593413(0x1f0)]{get['LiveShareStatusEnum'](){const _0x5345aa=_0x593413;return _0x4b43b4[_0x5345aa(0x202)];}};_0x5d8f3d[_0x593413(0x1f0)][_0x593413(0x1d5)](_0x207a30);}));function _0x4507(){const _0x5362e2=['defineProperty','iterator','tryStartPresenting','UniverCoreFacade','No\x20active\x20workbook\x20found.','stopPresenting','function','4412661cZQRjg','IUniverInstanceService','toPrimitive','startFollowing','call','UniverInstanceType','getStatus','symbol','_liveShareController','_initialize','getLiveShareCoordinatorSync','4408OzmNst','getUnitId','getLiveShareStatus','amd','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','LiveShareController','No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.','FEnum','2174907yKTGno','startPresenting','55254kYyQth','constructor','object','UniverProLiveShare','getCurrentUnitOfType','10nXVOXZ','81130tIabqQ','default','4KZCUVL','UniverCore','5935401HjqnoG','@univerjs/core','_injector','@univerjs/core/facade','125sWrqbV','LiveShareStatus','354196wzNTZP','7434zkEePP','get','FUniver','UNIVER_SHEET','extend','string'];_0x4507=function(){return _0x5362e2;};return _0x4507();}
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x4acf(_0x570229,_0x4d1e01){_0x570229=_0x570229-0xd9;const _0x533e7b=_0x533e();let _0x4acfc3=_0x533e7b[_0x570229];return _0x4acfc3;}function _0x533e(){const _0x5b3ea8=['getUnitId','_handleTerminate','_commandService','Subject','trim','Inject','_handleOffline','UNIVER_SHEET','_collabSessionService','version','fill','Disposable','543696zXlqSz','http://www.w3.org/2000/svg','next','UniverProCollaboration','LIVESHARE_TERMINATE','getInitialStates','Start','operators','defineProperty','executeCommand','LiveShareService','prototype','subscribe','UNIVER_LIVE_SHARE_PLUGIN','CollaborationSessionService','createElement','univer-border-none\x20univer-text-gray-600\x20univer-outline-none','dispose','Stop\x20presenting','decorate','useDependency','_status','set','Module','1em','current','length','displayName','LiveShare','idSuffix','pipe','Present\x20this\x20document','_startFollowing','Plugin','asObservable','_uiPartsService','PRESENTING','157391GlvwiP','following','_injector','map','3250140Grwnxu','dispose$','IUniverInstanceService','_entities','univer-mb-3\x20univer-w-full\x20univer-text-sm','assign','UniverInstanceType','12OhSufR','presenting','entries','LiveShareCoordinator','@univerjs-pro/collaboration-client','registerInitialStateReporter','path','_handleOperation','_liveShareService','add','Injector','FOLLOWING','onStarting','getConfig','init','@univerjs/design','has','DisposableCollection','jsxs','disposeWithMe','_status$','LiveShareStatus','useObservable','@univerjs-pro/live-share','unitId','attrs','complete','operations','NOT_FOLLOWING','IUIPartsService','shouldShareOperation','stringify','function','unsubscribe','HEADER_MENU','text','UniverSheets','delete','UniverIcon','forwardRef','forEach','mutations','sessionStatus$','button','getCurrentTypeOfUnit$','rxjs/operators','RxDisposable','OFFLINE','Stop\x20following','getStatus','Dropdown','M1.98682\x202.73096C1.98682\x202.17867\x202.43457\x201.73096\x202.98682\x201.73096H14.9868C15.5391\x201.73096\x2015.9868\x202.17867\x2015.9868\x202.73096V9.90105C15.9868\x2010.4533\x2015.5391\x2010.901\x2014.9868\x2010.901H9.62183V13.5577H12.9868C13.3375\x2013.5577\x2013.6218\x2013.842\x2013.6218\x2014.1927C13.6218\x2014.5434\x2013.3375\x2014.8277\x2012.9868\x2014.8277H4.98682C4.63611\x2014.8277\x204.35181\x2014.5434\x204.35181\x2014.1927C4.35181\x2013.842\x204.63611\x2013.5577\x204.98682\x2013.5577H8.35181V10.901H2.98682C2.43457\x2010.901\x201.98682\x2010.4533\x201.98682\x209.90105V2.73096ZM3.25684\x209.63106V3.00095H14.7168V9.63106H3.25684Z','@univerjs/ui','get','You\x27re\x20following\x20the\x20presenter','UniverCore','_startLiveShareCoordinator','react','_fetchOperations','data','stopPresenting','evenodd','ONLINE','react/jsx-runtime','SetScrollOperation','DependentOn','LIVESHARE_OPERATION','UniverUi','touchDependencies','React','SetZoomRatioOperation','use','div','constructor','_handleNewChangeSets','live-share-icon','UniverProLiveShare','_stopFollowing','_sharedOperations','clear','toString','_unitID','@univerjs-pro/collaboration','UNIVER_UNKNOWN','IConfigService','CommandType','ICommandService','UniverLiveSharePlugin','_mountLiveShare','values','mergeOverrideWithDependencies','xlink:href','@univerjs/core','rxjs','send','throttleTime','_handleNewHost','You\x27are\x20offline.','find','_handleOnline','sheet','registerSharedOperation','offline','univer-box-border\x20univer-min-w-60\x20univer-bg-gray-900\x20univer-px-4\x20univer-py-3\x20univer-text-gray-900\x20dark:!univer-bg-white\x20dark:!univer-text-white','_commandDisposable','not-following','4408554sxvDYQ','7rCNWSR','replace','2014340ZhZkFF','UniverSheetsUi','tryStartPresenting','BuiltInUIPart','children','string','SAME_OPERATION_SHARE_INTERVAL','registerDependencies','useRef','takeUntil','presenter','substring','LiveShareIcon','LIVESHARE_FETCH_OPERATIONS','symbol','UniverDesign','BehaviorSubject','requireSession','univerjs-icon\x20univerjs-icon-','@univerjs/sheets','@univerjs/sheets-ui','url(#$1','toDisposable','LIVESHARE_REQUEST_HOST','merge','getTypeOfUnitDisposed$','_reporters','6rhobYq','getMemberID','then','end','_stopPresenting','stopFollowing','_init','3440259tDQrPp','idle','startFollowing','params','tag','unit','SessionStatus','InsertSheetMutation','mask','getValue','_config','_configService','object','_presenter','getTypeOfUnitAdded$','You\x27re\x20not\x20following\x20the\x20presenter','event$','random','getOwnPropertyDescriptor','0.22.1','createInstance','colorChannel1','520611CkOjFX','useState','LiveShareController','Button','_univerInstanceService','CollaborationEvent','iterator','LIVESHARE_NEW_HOST','onRendered','type','getLiveShareCoordinator','_collabSession','You\x27re\x20presenting\x20the\x20document','amd','includes','jsx','DesktopLiveShareController','Fragment','exports','toPrimitive'];_0x533e=function(){return _0x5b3ea8;};return _0x533e();}(function(_0x516241,_0x55e86e){const _0x5ef80a=_0x4acf,_0x435f28=_0x516241();while(!![]){try{const _0x106090=-parseInt(_0x5ef80a(0x191))/0x1*(-parseInt(_0x5ef80a(0x12f))/0x2)+-parseInt(_0x5ef80a(0x14c))/0x3*(parseInt(_0x5ef80a(0x19c))/0x4)+parseInt(_0x5ef80a(0x195))/0x5+parseInt(_0x5ef80a(0x111))/0x6*(-parseInt(_0x5ef80a(0x112))/0x7)+-parseInt(_0x5ef80a(0x16c))/0x8+parseInt(_0x5ef80a(0x136))/0x9+parseInt(_0x5ef80a(0x114))/0xa;if(_0x106090===_0x55e86e)break;else _0x435f28['push'](_0x435f28['shift']());}catch(_0x400e44){_0x435f28['push'](_0x435f28['shift']());}}}(_0x533e,0x5d65a),function(_0x23e054,_0x130512){const _0x5e7845=_0x4acf;typeof exports==_0x5e7845(0x142)&&typeof module<'u'?_0x130512(exports,require(`@univerjs/core`),require(`@univerjs/ui`),require(`@univerjs/design`),require(`react`),require(`@univerjs-pro/collaboration`),require(`@univerjs-pro/collaboration-client`),require(`@univerjs/sheets`),require(`rxjs`),require(`rxjs/operators`),require(`react/jsx-runtime`),require(`@univerjs/sheets-ui`)):typeof define=='function'&&define[_0x5e7845(0x159)]?define([_0x5e7845(0x15e),_0x5e7845(0x103),_0x5e7845(0xdb),_0x5e7845(0x1ab),_0x5e7845(0xe0),_0x5e7845(0xf9),_0x5e7845(0x1a0),_0x5e7845(0x127),_0x5e7845(0x104),_0x5e7845(0x1c9),_0x5e7845(0xe6),_0x5e7845(0x128)],_0x130512):(_0x23e054=typeof globalThis<'u'?globalThis:_0x23e054||self,_0x130512(_0x23e054[_0x5e7845(0xf3)]={},_0x23e054[_0x5e7845(0xde)],_0x23e054[_0x5e7845(0xea)],_0x23e054[_0x5e7845(0x123)],_0x23e054[_0x5e7845(0xec)],_0x23e054[_0x5e7845(0x16f)],_0x23e054['UniverProCollaborationClient'],_0x23e054[_0x5e7845(0x1c0)],_0x23e054[_0x5e7845(0x104)],_0x23e054[_0x5e7845(0x104)][_0x5e7845(0x173)],_0x23e054[_0x5e7845(0xec)],_0x23e054[_0x5e7845(0x115)]));}(this,function(_0x509d14,_0x4ada4b,_0x5b77b0,_0x8a090e,_0x5362bb,_0x576a7e,_0x1689a6,_0x1decf1,_0x5c23ac,_0x27168d,_0x2ab539,_0x2743dd){const _0x668e97=_0x4acf;Object[_0x668e97(0x174)](_0x509d14,Symbol['toStringTag'],{'value':_0x668e97(0x183)});function _0x51e5a9({ref:_0xd8389f,..._0x3f5bcc}){const _0x45b05a=_0x668e97;let {icon:_0x5b8171,id:_0xa47585,className:_0x1ca155,extend:_0x543f12,..._0x3b2d89}=_0x3f5bcc,_0x466da8=(_0x45b05a(0x126)+_0xa47585+'\x20'+(_0x1ca155||''))[_0x45b05a(0x164)](),_0x449ed3=(0x0,_0x5362bb[_0x45b05a(0x11c)])('_'+_0x290875());return _0x2b1fa7(_0x5b8171,''+_0xa47585,{'defIds':_0x5b8171['defIds'],'idSuffix':_0x449ed3[_0x45b05a(0x185)]},{'ref':_0xd8389f,'className':_0x466da8,..._0x3b2d89},_0x543f12);}function _0x2b1fa7(_0x15e275,_0x32dd09,_0x4a393e,_0x60d50,_0x3fb241){const _0x4ed8a6=_0x668e97;return(0x0,_0x5362bb[_0x4ed8a6(0x17b)])(_0x15e275[_0x4ed8a6(0x13a)],{'key':_0x32dd09,..._0x14147a(_0x15e275,_0x4a393e,_0x3fb241),..._0x60d50},(_0x46134b(_0x15e275,_0x4a393e)[_0x4ed8a6(0x118)]||[])['map']((_0x18b00d,_0x292059)=>_0x2b1fa7(_0x18b00d,_0x32dd09+'-'+_0x15e275['tag']+'-'+_0x292059,_0x4a393e,void 0x0,_0x3fb241)));}function _0x14147a(_0x9e258,_0x2927ed,_0x354e13){const _0x287704=_0x668e97;let _0x573c8a={..._0x9e258[_0x287704(0x1b5)]};_0x354e13!=null&&_0x354e13['colorChannel1']&&_0x573c8a[_0x287704(0x16a)]===_0x287704(0x14b)&&(_0x573c8a[_0x287704(0x16a)]=_0x354e13[_0x287704(0x14b)]),_0x9e258[_0x287704(0x13a)]==='mask'&&_0x573c8a['id']&&(_0x573c8a['id']+=_0x2927ed[_0x287704(0x189)]),Object['entries'](_0x573c8a)['forEach'](([_0xdf1cfd,_0x326435])=>{const _0x197bfd=_0x287704;_0xdf1cfd===_0x197bfd(0x13e)&&typeof _0x326435==_0x197bfd(0x119)&&(_0x573c8a[_0xdf1cfd]=_0x326435['replace'](/url\(#(.*)\)/,_0x197bfd(0x129)+_0x2927ed['idSuffix']+')'));});let {defIds:_0x3ae0da}=_0x2927ed;return!_0x3ae0da||_0x3ae0da['length']===0x0?_0x573c8a:(_0x9e258['tag']===_0x287704(0xee)&&_0x573c8a[_0x287704(0x102)]&&(_0x573c8a[_0x287704(0x102)]+=_0x2927ed[_0x287704(0x189)]),Object[_0x287704(0x19e)](_0x573c8a)['forEach'](([_0x1fbcf5,_0x30e1ef])=>{const _0x331ed3=_0x287704;typeof _0x30e1ef==_0x331ed3(0x119)&&(_0x573c8a[_0x1fbcf5]=_0x30e1ef[_0x331ed3(0x113)](/url\(#(.*)\)/,'url(#$1'+_0x2927ed['idSuffix']+')'));}),_0x573c8a);}function _0x46134b(_0x58d2c0,_0x3fecc0){const _0xa1a401=_0x668e97;var _0x877a8b;let {defIds:_0x558c53}=_0x3fecc0;return!_0x558c53||_0x558c53[_0xa1a401(0x186)]===0x0?_0x58d2c0:_0x58d2c0[_0xa1a401(0x13a)]==='defs'&&(_0x877a8b=_0x58d2c0[_0xa1a401(0x118)])!=null&&_0x877a8b[_0xa1a401(0x186)]?{..._0x58d2c0,'children':_0x58d2c0[_0xa1a401(0x118)][_0xa1a401(0x194)](_0x213d0c=>typeof _0x213d0c[_0xa1a401(0x1b5)]['id']==_0xa1a401(0x119)&&_0x558c53&&_0x558c53[_0xa1a401(0x15a)](_0x213d0c[_0xa1a401(0x1b5)]['id'])?{..._0x213d0c,'attrs':{..._0x213d0c['attrs'],'id':_0x213d0c[_0xa1a401(0x1b5)]['id']+_0x3fecc0[_0xa1a401(0x189)]}}:_0x213d0c)}:_0x58d2c0;}function _0x290875(){const _0x3d8922=_0x668e97;return Math[_0x3d8922(0x147)]()[_0x3d8922(0xf7)](0x24)[_0x3d8922(0x11f)](0x2,0x8);}_0x51e5a9[_0x668e97(0x187)]=_0x668e97(0x1c2);let _0x2c545d={'tag':'svg','attrs':{'xmlns':_0x668e97(0x16d),'fill':'none','viewBox':'0\x200\x2017\x2017','width':'1em','height':_0x668e97(0x184)},'children':[{'tag':_0x668e97(0x1a2),'attrs':{'fill':'currentColor','d':'M9.20459\x204.90474C9.20459\x204.64763\x209.35535\x204.54174\x209.54053\x204.68737L11.2643\x206.04046C11.4495\x206.18609\x2011.4495\x206.42299\x2011.2643\x206.56789L9.55334\x207.90706C9.36755\x208.05269\x209.20386\x207.90499\x209.20386\x207.68969V6.96785H8.94446C8.19543\x206.96785\x206.72595\x207.28347\x206.37646\x207.89174C6.30786\x208.00322\x206.23572\x207.97884\x206.23572\x207.89174C6.25073\x206.80828\x208.0918\x205.58895\x209.17383\x205.58895H9.20459V4.90474Z'}},{'tag':_0x668e97(0x1a2),'attrs':{'fill':'currentColor','d':_0x668e97(0xda),'fillRule':'evenodd','clipRule':_0x668e97(0xe4)}}]},_0x2e5f60=(0x0,_0x5362bb[_0x668e97(0x1c3)])(function(_0x4059d7,_0x52fa6f){const _0x489bb5=_0x668e97;return(0x0,_0x5362bb['createElement'])(_0x51e5a9,Object[_0x489bb5(0x19a)]({},_0x4059d7,{'id':_0x489bb5(0xf2),'ref':_0x52fa6f,'icon':_0x2c545d}));});_0x2e5f60[_0x668e97(0x187)]=_0x668e97(0x120);function _0x1837a8(_0x944655){'@babel/helpers - typeof';const _0x1dee6a=_0x668e97;return _0x1837a8=typeof Symbol==_0x1dee6a(0x1bc)&&typeof Symbol[_0x1dee6a(0x152)]==_0x1dee6a(0x122)?function(_0x551b8b){return typeof _0x551b8b;}:function(_0x1fb617){const _0xf52961=_0x1dee6a;return _0x1fb617&&typeof Symbol==_0xf52961(0x1bc)&&_0x1fb617[_0xf52961(0xf0)]===Symbol&&_0x1fb617!==Symbol[_0xf52961(0x177)]?_0xf52961(0x122):typeof _0x1fb617;},_0x1837a8(_0x944655);}function _0x16b57b(_0x489494,_0xe7cfd1){const _0x23d001=_0x668e97;if(_0x1837a8(_0x489494)!=_0x23d001(0x142)||!_0x489494)return _0x489494;var _0x366f20=_0x489494[Symbol[_0x23d001(0x15f)]];if(_0x366f20!==void 0x0){var _0x30b4c5=_0x366f20['call'](_0x489494,_0xe7cfd1||'default');if(_0x1837a8(_0x30b4c5)!=_0x23d001(0x142))return _0x30b4c5;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0xe7cfd1===_0x23d001(0x119)?String:Number)(_0x489494);}function _0x3176b8(_0x31229e){const _0x410d20=_0x668e97;var _0x3b1aa4=_0x16b57b(_0x31229e,_0x410d20(0x119));return _0x1837a8(_0x3b1aa4)==_0x410d20(0x122)?_0x3b1aa4:_0x3b1aa4+'';}function _0x461446(_0x238763,_0x5a9c18,_0x5c0bb9){const _0x7d61f7=_0x668e97;return(_0x5a9c18=_0x3176b8(_0x5a9c18))in _0x238763?Object[_0x7d61f7(0x174)](_0x238763,_0x5a9c18,{'value':_0x5c0bb9,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x238763[_0x5a9c18]=_0x5c0bb9,_0x238763;}var _0x2e464f=class extends _0x4ada4b[_0x668e97(0x16b)]{constructor(..._0x18bf99){super(..._0x18bf99),_0x461446(this,'_sharedOperations',new Set()),_0x461446(this,'_reporters',new Set());}['registerSharedOperation'](_0x53c702){const _0x176a6e=_0x668e97;return this['_sharedOperations'][_0x176a6e(0x1a5)](_0x53c702),(0x0,_0x4ada4b[_0x176a6e(0x12a)])(()=>this[_0x176a6e(0xf5)][_0x176a6e(0x1c1)](_0x53c702));}[_0x668e97(0x1a1)](_0x4ce59c){const _0x9d72d9=_0x668e97;return this['_reporters'][_0x9d72d9(0x1a5)](_0x4ce59c),(0x0,_0x4ada4b[_0x9d72d9(0x12a)])(()=>this[_0x9d72d9(0x12e)][_0x9d72d9(0x1c1)](_0x4ce59c));}[_0x668e97(0x1ba)](_0x10eeb4){const _0xaca2b7=_0x668e97;return this[_0xaca2b7(0xf5)]['has'](_0x10eeb4);}[_0x668e97(0x171)](_0x3dd88f){const _0x5a36da=_0x668e97;return Array['from'](this[_0x5a36da(0x12e)])[_0x5a36da(0x194)](_0x555984=>_0x555984(_0x3dd88f));}};function _0x3f0d09(_0x26ebcb,_0x140c04){return function(_0x33bff2,_0x15707e){_0x140c04(_0x33bff2,_0x15707e,_0x26ebcb);};}function _0x1d30ee(_0x51a92e,_0x2183b5,_0x3d8f8c,_0x3978fb){const _0x5a2f28=_0x668e97;var _0x46cf52=arguments[_0x5a2f28(0x186)],_0x90f25a=_0x46cf52<0x3?_0x2183b5:_0x3978fb===null?_0x3978fb=Object[_0x5a2f28(0x148)](_0x2183b5,_0x3d8f8c):_0x3978fb,_0x4eddc7;if(typeof Reflect==_0x5a2f28(0x142)&&typeof Reflect['decorate']==_0x5a2f28(0x1bc))_0x90f25a=Reflect[_0x5a2f28(0x17f)](_0x51a92e,_0x2183b5,_0x3d8f8c,_0x3978fb);else{for(var _0x4c3fe6=_0x51a92e[_0x5a2f28(0x186)]-0x1;_0x4c3fe6>=0x0;_0x4c3fe6--)(_0x4eddc7=_0x51a92e[_0x4c3fe6])&&(_0x90f25a=(_0x46cf52<0x3?_0x4eddc7(_0x90f25a):_0x46cf52>0x3?_0x4eddc7(_0x2183b5,_0x3d8f8c,_0x90f25a):_0x4eddc7(_0x2183b5,_0x3d8f8c))||_0x90f25a);}return _0x46cf52>0x3&&_0x90f25a&&Object[_0x5a2f28(0x174)](_0x2183b5,_0x3d8f8c,_0x90f25a),_0x90f25a;}let _0x4b5a71=class extends _0x4ada4b['RxDisposable']{constructor(_0x5a057f,_0x3c7aea,_0xa88efe){const _0x39db74=_0x668e97;super(),this[_0x39db74(0x150)]=_0x5a057f,this[_0x39db74(0x193)]=_0x3c7aea,this[_0x39db74(0x168)]=_0xa88efe,_0x461446(this,_0x39db74(0x198),new Map()),this['_init']();}async[_0x668e97(0x156)](_0x137649){const _0x488916=_0x668e97;return this[_0x488916(0x198)][_0x488916(0x1ac)](_0x137649)||await this[_0x488916(0xdf)](_0x137649),this[_0x488916(0x198)][_0x488916(0xdc)](_0x137649);}['getLiveShareCoordinatorSync'](_0x152197){const _0x15395a=_0x668e97;var _0xd2ecd9;return(_0xd2ecd9=this[_0x15395a(0x198)][_0x15395a(0xdc)](_0x152197))==null?null:_0xd2ecd9;}[_0x668e97(0x135)](){const _0x2b5d8a=_0x668e97;this['_univerInstanceService'][_0x2b5d8a(0x144)](_0x4ada4b[_0x2b5d8a(0x19b)][_0x2b5d8a(0x167)])[_0x2b5d8a(0x18a)]((0x0,_0x27168d[_0x2b5d8a(0x11d)])(this['dispose$']))[_0x2b5d8a(0x178)](async _0x1350d7=>{const _0x5aeed0=_0x2b5d8a;let _0x2c0b44=_0x1350d7[_0x5aeed0(0x13b)][_0x5aeed0(0x160)]();this['_entities'][_0x5aeed0(0x1ac)](_0x2c0b44)||this[_0x5aeed0(0xdf)](_0x2c0b44);}),this['_univerInstanceService'][_0x2b5d8a(0x12d)](_0x4ada4b[_0x2b5d8a(0x19b)][_0x2b5d8a(0x167)])[_0x2b5d8a(0x18a)]((0x0,_0x27168d[_0x2b5d8a(0x11d)])(this[_0x2b5d8a(0x196)]))[_0x2b5d8a(0x178)](_0x207f64=>{const _0x13d004=_0x2b5d8a;let _0x50d9f9=_0x207f64[_0x13d004(0x160)](),_0x4421ff=this['_entities'][_0x13d004(0xdc)](_0x50d9f9);_0x4421ff==null||_0x4421ff[_0x13d004(0x17d)]();});}async[_0x668e97(0xdf)](_0x25d6ca){const _0x224a84=_0x668e97;let _0x43b7c9=await this[_0x224a84(0x168)][_0x224a84(0x125)](_0x25d6ca),_0x392083=this['_injector'][_0x224a84(0x14a)](_0x375e44,_0x25d6ca,_0x43b7c9);return _0x392083[_0x224a84(0x1aa)](),this[_0x224a84(0x198)]['set'](_0x25d6ca,_0x392083),_0x392083;}};_0x4b5a71=_0x1d30ee([_0x3f0d09(0x0,_0x4ada4b['IUniverInstanceService']),_0x3f0d09(0x1,(0x0,_0x4ada4b[_0x668e97(0x165)])(_0x4ada4b['Injector'])),_0x3f0d09(0x2,(0x0,_0x4ada4b[_0x668e97(0x165)])(_0x1689a6[_0x668e97(0x17a)]))],_0x4b5a71);let _0x568bf0=function(_0x3c44f8){const _0x58e4bd=_0x668e97;return _0x3c44f8[_0x58e4bd(0x1cb)]=_0x58e4bd(0x10d),_0x3c44f8['IDLE']=_0x58e4bd(0x137),_0x3c44f8[_0x58e4bd(0x1a7)]=_0x58e4bd(0x192),_0x3c44f8[_0x58e4bd(0x1b8)]=_0x58e4bd(0x110),_0x3c44f8[_0x58e4bd(0x190)]=_0x58e4bd(0x19d),_0x3c44f8;}({}),_0x375e44=class extends _0x4ada4b[_0x668e97(0x1ca)]{get[_0x668e97(0x181)](){const _0x364735=_0x668e97;return this[_0x364735(0x1b0)][_0x364735(0x13f)]();}constructor(_0x547358,_0x27e676,_0x2d1a06,_0xed2852,_0x56fcce){const _0x31fbf7=_0x668e97;super(),this['_unitID']=_0x547358,this[_0x31fbf7(0x157)]=_0x27e676,this[_0x31fbf7(0x141)]=_0x2d1a06,this[_0x31fbf7(0x1a4)]=_0xed2852,this[_0x31fbf7(0x162)]=_0x56fcce,_0x461446(this,_0x31fbf7(0x1b0),new _0x5c23ac[(_0x31fbf7(0x124))](_0x31fbf7(0x137))),_0x461446(this,'status$',this[_0x31fbf7(0x1b0)][_0x31fbf7(0x18e)]()),_0x461446(this,_0x31fbf7(0x135),!0x1),_0x461446(this,_0x31fbf7(0x10f),null),_0x461446(this,_0x31fbf7(0x143),null);}[_0x668e97(0x17d)](){const _0x510b38=_0x668e97;var _0x138c4b;(_0x138c4b=this[_0x510b38(0x10f)])==null||_0x138c4b[_0x510b38(0x17d)](),this[_0x510b38(0x1b0)]['next'](_0x510b38(0x137)),this[_0x510b38(0x1b0)][_0x510b38(0x1b6)]();}[_0x668e97(0x1cd)](){return this['_status'];}['init'](){const _0x3c2dc6=_0x668e97;this[_0x3c2dc6(0x135)]||(this[_0x3c2dc6(0x135)]=!0x0,this['_collabSession'][_0x3c2dc6(0x1c6)][_0x3c2dc6(0x18a)]((0x0,_0x27168d[_0x3c2dc6(0x11d)])(this[_0x3c2dc6(0x196)]))['subscribe'](_0x4de4ec=>{const _0x185d27=_0x3c2dc6;switch(_0x4de4ec){case _0x1689a6[_0x185d27(0x13c)][_0x185d27(0x1cb)]:this['_handleOffline']();break;case _0x1689a6['SessionStatus'][_0x185d27(0xe5)]:this['_handleOnline']();break;default:}}),this['_collabSession'][_0x3c2dc6(0x146)]['pipe']((0x0,_0x27168d['takeUntil'])(this[_0x3c2dc6(0x196)]))[_0x3c2dc6(0x178)](_0x148479=>{const _0x488033=_0x3c2dc6;let {eventID:_0x2b9c92}=_0x148479;switch(_0x2b9c92){case _0x576a7e['CollaborationEvent'][_0x488033(0x153)]:this[_0x488033(0x107)](_0x148479);break;case _0x576a7e[_0x488033(0x151)][_0x488033(0xe9)]:this[_0x488033(0x1a3)](_0x148479);break;case _0x576a7e[_0x488033(0x151)][_0x488033(0x170)]:this['_handleTerminate']();break;case _0x576a7e[_0x488033(0x151)]['NEW_CHANGESETS']:this[_0x488033(0xf1)](_0x148479);break;default:}}));}[_0x668e97(0x116)](){const _0x104cf2=_0x668e97;this[_0x104cf2(0x157)][_0x104cf2(0x105)]({'eventID':_0x576a7e[_0x104cf2(0x151)][_0x104cf2(0x12b)],'data':{'unitID':this[_0x104cf2(0xf8)],'userID':this[_0x104cf2(0x157)]['getMemberID']()}},this[_0x104cf2(0xf8)]);}[_0x668e97(0xe3)](){const _0x306558=_0x668e97;this[_0x306558(0x181)]===_0x306558(0x19d)&&(this[_0x306558(0x1b0)]['next'](_0x306558(0x137)),this[_0x306558(0x157)][_0x306558(0x105)]({'eventID':_0x576a7e['CollaborationEvent'][_0x306558(0x170)],'data':{'unitID':this[_0x306558(0xf8)]}},this[_0x306558(0xf8)]));}['startFollowing'](){const _0x2a9175=_0x668e97;this['_status']==='not-following'&&(this[_0x2a9175(0x1b0)][_0x2a9175(0x16e)]('following'),this[_0x2a9175(0x18c)]());}[_0x668e97(0x134)](){const _0xb04d4=_0x668e97;this[_0xb04d4(0x181)]===_0xb04d4(0x192)&&this['_stopFollowing']();}['_handleNewHost'](_0x4e2231){const _0x3c060e=_0x668e97;let {presenter:_0xd037a4}=_0x4e2231['data'],_0x2b8662=this[_0x3c060e(0x157)]['getMemberID']();this['_presenter']=_0xd037a4,_0xd037a4===_0x2b8662?(this[_0x3c060e(0xf4)](),this['_startPresenting']()):this['_status']!==_0x3c060e(0x110)&&(this['_stopPresenting'](),this[_0x3c060e(0x18c)]());}[_0x668e97(0xe1)](){const _0x147576=_0x668e97;let _0x458823={'eventID':_0x576a7e[_0x147576(0x151)][_0x147576(0x121)]};this[_0x147576(0x157)][_0x147576(0x105)](_0x458823,this[_0x147576(0xf8)]);}[_0x668e97(0x161)](){const _0x253c9e=_0x668e97;this[_0x253c9e(0x143)]=null,this[_0x253c9e(0x181)]!=='presenting'&&this['_beIdle']();}[_0x668e97(0xf1)](_0x1cc2e7){const _0xf391b0=_0x668e97;if(this[_0xf391b0(0x181)]===_0xf391b0(0x192)&&this[_0xf391b0(0x143)]===_0x1cc2e7[_0xf391b0(0xe2)]['memberID']){let _0x2c3c6c=(0x0,_0x576a7e['parseProtocolChangeset'])(_0x1cc2e7['data'])[_0xf391b0(0x1c5)]['reverse']()[_0xf391b0(0x109)](_0xd5f412=>_0xd5f412['id']===_0x1decf1[_0xf391b0(0x13d)]['id']);if(_0x2c3c6c){let _0x5b2174=_0x2c3c6c['params'][_0xf391b0(0x1b4)],_0x6c73ce=_0x2c3c6c[_0xf391b0(0x139)][_0xf391b0(0x10b)]['id'];setTimeout(()=>{const _0xbc6f1f=_0xf391b0;this[_0xbc6f1f(0x162)]['executeCommand'](_0x1decf1['SetWorksheetActiveOperation']['id'],{'unitId':_0x5b2174,'subUnitId':_0x6c73ce},{'fromCollab':!0x0});});}}}['_startPresenting'](){const _0x2a8bab=_0x668e97;this[_0x2a8bab(0x1b0)][_0x2a8bab(0x16e)](_0x2a8bab(0x19d));let _0x4ef9d0=new Map(),_0x2f4937=this[_0x2a8bab(0x10f)]=new _0x4ada4b[(_0x2a8bab(0x1ad))]();_0x2f4937[_0x2a8bab(0x1a5)]((0x0,_0x4ada4b[_0x2a8bab(0x12a)])(()=>{const _0x3bd13b=_0x2a8bab;_0x4ef9d0[_0x3bd13b(0x1c4)](_0x1a323b=>_0x1a323b['complete']()),_0x4ef9d0[_0x3bd13b(0xf6)]();})),_0x2f4937['add'](this[_0x2a8bab(0x162)]['onCommandExecuted'](_0x117ed1=>{const _0x330c91=_0x2a8bab;if(_0x117ed1[_0x330c91(0x155)]!==_0x4ada4b[_0x330c91(0xfc)]['OPERATION']||!this[_0x330c91(0x1a4)][_0x330c91(0x1ba)](_0x117ed1['id']))return;let {id:_0x295144}=_0x117ed1,_0x1c0f24;if(_0x4ef9d0['has'](_0x295144))_0x1c0f24=_0x4ef9d0[_0x330c91(0xdc)](_0x295144);else{var _0x1b1d71;_0x1c0f24=new _0x5c23ac[(_0x330c91(0x163))](),_0x4ef9d0[_0x330c91(0x182)](_0x295144,_0x1c0f24),_0x1c0f24['pipe']((0x0,_0x27168d[_0x330c91(0x106)])((_0x1b1d71=this[_0x330c91(0x141)][_0x330c91(0x1a9)](_0x330c91(0x11a)))==null?0xc8:_0x1b1d71,void 0x0,{'trailing':!0x0,'leading':!0x0}))[_0x330c91(0x178)](_0x223fde=>{const _0x1cb983=_0x330c91;this[_0x1cb983(0x157)][_0x1cb983(0x105)]({'eventID':_0x576a7e[_0x1cb983(0x151)][_0x1cb983(0xe9)],'data':{'unitID':this[_0x1cb983(0xf8)],'operations':{[_0x223fde['id']]:{'id':_0x223fde['id'],'params':JSON[_0x1cb983(0x1bb)](_0x223fde[_0x1cb983(0x139)])}}}},this[_0x1cb983(0xf8)]);});}_0x1c0f24['next'](_0x117ed1);})),this[_0x2a8bab(0x1a4)][_0x2a8bab(0x171)](this[_0x2a8bab(0xf8)])['forEach'](_0x4c850a=>this[_0x2a8bab(0x157)][_0x2a8bab(0x105)]({'eventID':_0x576a7e[_0x2a8bab(0x151)][_0x2a8bab(0xe9)],'data':{'unitID':this[_0x2a8bab(0xf8)],'operations':{[_0x4c850a['id']]:{'id':_0x4c850a['id'],'params':JSON[_0x2a8bab(0x1bb)](_0x4c850a[_0x2a8bab(0x139)])}}}},this['_unitID']));}[_0x668e97(0x133)](){const _0x535f65=_0x668e97;var _0x1fd202;this[_0x535f65(0x1b0)][_0x535f65(0x16e)](_0x535f65(0x137)),(_0x1fd202=this['_commandDisposable'])==null||_0x1fd202[_0x535f65(0x17d)](),this[_0x535f65(0x10f)]=null;}['_startFollowing'](){const _0x20bcb9=_0x668e97;var _0x1cb0ea;(_0x1cb0ea=this[_0x20bcb9(0x10f)])==null||_0x1cb0ea[_0x20bcb9(0x17d)](),this['_status$'][_0x20bcb9(0x16e)](_0x20bcb9(0x192));}['_beIdle'](){const _0x4b27fb=_0x668e97;var _0x5585fd;this[_0x4b27fb(0x1b0)]['next']('idle'),(_0x5585fd=this['_commandDisposable'])==null||_0x5585fd[_0x4b27fb(0x17d)](),this[_0x4b27fb(0x10f)]=null;}['_stopFollowing'](){const _0x151455=_0x668e97;var _0x58c848;this[_0x151455(0x1b0)]['next'](_0x151455(0x110)),(_0x58c848=this['_commandDisposable'])==null||_0x58c848[_0x151455(0x17d)]();}['_handleOperation'](_0x5b514b){const _0x2bf4c0=_0x668e97;if([_0x2bf4c0(0x19d),_0x2bf4c0(0x110),_0x2bf4c0(0x10d)][_0x2bf4c0(0x15a)](this['_status'])||!_0x5b514b['data'][_0x2bf4c0(0x11e)]||_0x5b514b['data'][_0x2bf4c0(0x11e)]===this[_0x2bf4c0(0x157)][_0x2bf4c0(0x130)]())return;this[_0x2bf4c0(0x181)]===_0x2bf4c0(0x137)&&this['_startFollowing']();let _0x5dd79e=_0x5b514b[_0x2bf4c0(0xe2)][_0x2bf4c0(0x1b7)];Object[_0x2bf4c0(0x100)](_0x5dd79e)[_0x2bf4c0(0x1c4)](_0x33cda4=>{const _0x39b57d=_0x2bf4c0;this[_0x39b57d(0x162)][_0x39b57d(0x175)](_0x33cda4['id'],_0x33cda4[_0x39b57d(0x139)]?JSON['parse'](_0x33cda4[_0x39b57d(0x139)]):null,{'fromCollab':!0x0});});}[_0x668e97(0x166)](){const _0xb08d3c=_0x668e97;var _0x31ff25;this['_status$'][_0xb08d3c(0x16e)](_0xb08d3c(0x10d)),(_0x31ff25=this[_0xb08d3c(0x10f)])==null||_0x31ff25[_0xb08d3c(0x17d)]();}[_0x668e97(0x10a)](){const _0x3ef1a9=_0x668e97;this[_0x3ef1a9(0x1b0)][_0x3ef1a9(0x16e)](_0x3ef1a9(0x137)),this[_0x3ef1a9(0xe1)]();}};_0x375e44=_0x1d30ee([_0x3f0d09(0x2,_0x4ada4b[_0x668e97(0xfb)]),_0x3f0d09(0x3,(0x0,_0x4ada4b['Inject'])(_0x2e464f)),_0x3f0d09(0x4,_0x4ada4b[_0x668e97(0xfd)])],_0x375e44);function _0x5304a6(){const _0x5daefb=_0x668e97;let _0x5adb8e=(0x0,_0x5b77b0[_0x5daefb(0x180)])(_0x4b5a71),_0x1b0ef6=(0x0,_0x5b77b0[_0x5daefb(0x180)])(_0x4ada4b[_0x5daefb(0x197)]),_0x1ca0c5=(0x0,_0x5b77b0[_0x5daefb(0x1b2)])(()=>_0x1b0ef6[_0x5daefb(0x1c8)](_0x4ada4b[_0x5daefb(0x19b)][_0x5daefb(0x167)]),void 0x0,!0x1,[]),[_0x5d4bf0,_0x3da85f]=(0x0,_0x5362bb[_0x5daefb(0x14d)])(null),[_0x3f2775,_0x3c5ec7]=(0x0,_0x5362bb[_0x5daefb(0x14d)])(_0x5daefb(0x137)),_0x2ab773=(0x0,_0x5362bb[_0x5daefb(0x11c)])(null);return(0x0,_0x5362bb['useEffect'])(()=>(_0x1ca0c5&&_0x5adb8e[_0x5daefb(0x156)](_0x1ca0c5[_0x5daefb(0x160)]())[_0x5daefb(0x131)](_0x1733db=>{_0x3da85f(_0x1733db),_0x2ab773['current']=_0x1733db['status$']['subscribe'](_0x62cb4c=>{_0x3c5ec7(_0x62cb4c);});}),()=>{const _0x32db82=_0x5daefb;var _0x2275cf;(_0x2275cf=_0x2ab773['current'])==null||_0x2275cf[_0x32db82(0x1bd)](),_0x2ab773[_0x32db82(0x185)]=null;}),[_0x1ca0c5,_0x5adb8e]),_0x5d4bf0?(0x0,_0x2ab539[_0x5daefb(0x15b)])(_0x8a090e[_0x5daefb(0xd9)],{'align':_0x5daefb(0x132),'disabled':_0x3f2775===_0x5daefb(0x10d),'className':_0x5daefb(0x10e),'overlay':(0x0,_0x2ab539[_0x5daefb(0x15b)])(_0x22c476,{'status':_0x3f2775,'coordinator':_0x5d4bf0}),'children':(0x0,_0x2ab539[_0x5daefb(0x15b)])(_0x5daefb(0x1c7),{'className':(0x0,_0x8a090e['clsx'])(_0x5daefb(0x17c),{'univer-cursor-not-allowed':_0x3f2775===_0x5daefb(0x10d),'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x3f2775!=='offline'}),'type':'button','children':(0x0,_0x2ab539[_0x5daefb(0x15b)])(_0x2e5f60,{'className':'univer-size-4'})})}):null;}function _0x22c476(_0x82fa53){const _0x3e9572=_0x668e97;let {status:_0x39eb34,coordinator:_0x51d2b2}=_0x82fa53;switch(_0x39eb34){case _0x3e9572(0x137):return(0x0,_0x2ab539['jsx'])(_0xb5b0f5,{'coordinator':_0x51d2b2});case _0x3e9572(0x192):return(0x0,_0x2ab539[_0x3e9572(0x15b)])(_0x513f6e,{'coordinator':_0x51d2b2});case _0x3e9572(0x110):return(0x0,_0x2ab539[_0x3e9572(0x15b)])(_0x2eb9e2,{'coordinator':_0x51d2b2});case'offline':return(0x0,_0x2ab539[_0x3e9572(0x15b)])(_0x358b38,{});case'presenting':return(0x0,_0x2ab539[_0x3e9572(0x15b)])(_0x39b430,{'coordinator':_0x51d2b2});default:return null;}}function _0xb5b0f5(_0x3ee953){const _0x43d2d6=_0x668e97;let {coordinator:_0x2fa69c}=_0x3ee953;return(0x0,_0x2ab539[_0x43d2d6(0x1ae)])(_0x2ab539[_0x43d2d6(0x15d)],{'children':[(0x0,_0x2ab539[_0x43d2d6(0x15b)])(_0x43d2d6(0xef),{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':_0x43d2d6(0x18b)}),(0x0,_0x2ab539['jsx'])(_0x8a090e[_0x43d2d6(0x14f)],{'onClick':()=>_0x2fa69c[_0x43d2d6(0x116)](),'children':_0x43d2d6(0x172)})]});}function _0x513f6e(_0x200ae7){const _0x155fc5=_0x668e97;let {coordinator:_0x39562b}=_0x200ae7;return(0x0,_0x2ab539[_0x155fc5(0x1ae)])(_0x2ab539[_0x155fc5(0x15d)],{'children':[(0x0,_0x2ab539[_0x155fc5(0x15b)])('div',{'className':_0x155fc5(0x199),'children':_0x155fc5(0xdd)}),(0x0,_0x2ab539['jsx'])(_0x8a090e['Button'],{'onClick':()=>_0x39562b['stopFollowing'](),'children':_0x155fc5(0x1cc)})]});}function _0x2eb9e2(_0x551a5c){const _0x4ab5b6=_0x668e97;let {coordinator:_0x5860d5}=_0x551a5c;return(0x0,_0x2ab539[_0x4ab5b6(0x1ae)])(_0x2ab539[_0x4ab5b6(0x15d)],{'children':[(0x0,_0x2ab539['jsx'])(_0x4ab5b6(0xef),{'className':_0x4ab5b6(0x199),'children':_0x4ab5b6(0x145)}),(0x0,_0x2ab539[_0x4ab5b6(0x15b)])(_0x8a090e[_0x4ab5b6(0x14f)],{'variant':_0x4ab5b6(0x1bf),'onClick':()=>_0x5860d5[_0x4ab5b6(0x138)](),'children':'Start\x20following'})]});}function _0x39b430(_0x411358){const _0x42e27f=_0x668e97;let {coordinator:_0x59f0e4}=_0x411358;return(0x0,_0x2ab539[_0x42e27f(0x1ae)])(_0x2ab539[_0x42e27f(0x15d)],{'children':[(0x0,_0x2ab539[_0x42e27f(0x15b)])(_0x42e27f(0xef),{'className':_0x42e27f(0x199),'children':_0x42e27f(0x158)}),(0x0,_0x2ab539[_0x42e27f(0x15b)])(_0x8a090e[_0x42e27f(0x14f)],{'variant':'default','onClick':()=>_0x59f0e4[_0x42e27f(0xe3)](),'children':_0x42e27f(0x17e)})]});}function _0x358b38(){const _0x2ddf6f=_0x668e97;return(0x0,_0x2ab539['jsx'])(_0x2ab539[_0x2ddf6f(0x15d)],{'children':_0x2ddf6f(0x108)});}let _0x3ceac7=class extends _0x4ada4b[_0x668e97(0x16b)]{constructor(_0x3d1084,_0x40be2c){const _0x50f99f=_0x668e97;super(),this[_0x50f99f(0x193)]=_0x3d1084,this[_0x50f99f(0x18f)]=_0x40be2c,this[_0x50f99f(0xff)]();}['_mountLiveShare'](){const _0x27a0d6=_0x668e97;this['disposeWithMe'](this[_0x27a0d6(0x18f)]['registerComponent'](_0x5b77b0[_0x27a0d6(0x117)][_0x27a0d6(0x1be)],()=>(0x0,_0x5b77b0['connectInjector'])(_0x5304a6,this[_0x27a0d6(0x193)])));}};_0x3ceac7=_0x1d30ee([_0x3f0d09(0x0,(0x0,_0x4ada4b[_0x668e97(0x165)])(_0x4ada4b['Injector'])),_0x3f0d09(0x1,_0x5b77b0[_0x668e97(0x1b9)])],_0x3ceac7);var _0x21d473=_0x668e97(0x1b3),_0x277c6d=_0x668e97(0x149);let _0x30272c='live-share.config';Symbol(_0x30272c);let _0x5a6ea8={},_0x28a659=class extends _0x4ada4b[_0x668e97(0x16b)]{constructor(_0x241b7c){super(),this['_liveShareService']=_0x241b7c,this['_init']();}[_0x668e97(0x135)](){const _0x3bd495=_0x668e97;[_0x2743dd[_0x3bd495(0xed)]['id'],_0x2743dd[_0x3bd495(0xe7)]['id'],_0x1decf1['SetWorksheetActiveOperation']['id']][_0x3bd495(0x1c4)](_0x320708=>{const _0x1f1b78=_0x3bd495;this[_0x1f1b78(0x1af)](this['_liveShareService'][_0x1f1b78(0x10c)](_0x320708));});}};_0x28a659=_0x1d30ee([_0x3f0d09(0x0,(0x0,_0x4ada4b['Inject'])(_0x2e464f))],_0x28a659);let _0xfdf134=class extends _0x4ada4b[_0x668e97(0x18d)]{constructor(_0x2c46cc=_0x5a6ea8,_0x18bd58,_0x334320){const _0x5f24c1=_0x668e97;super(),this[_0x5f24c1(0x140)]=_0x2c46cc,this['_injector']=_0x18bd58,this[_0x5f24c1(0x141)]=_0x334320;let {..._0x7e778c}=(0x0,_0x4ada4b[_0x5f24c1(0x12c)])({},_0x5a6ea8,this['_config']);this[_0x5f24c1(0x141)]['setConfig'](_0x30272c,_0x7e778c);}[_0x668e97(0x1a8)](){const _0x5300b5=_0x668e97;(0x0,_0x4ada4b[_0x5300b5(0x11b)])(this[_0x5300b5(0x193)],(0x0,_0x4ada4b[_0x5300b5(0x101)])([[_0x2e464f],[_0x4b5a71],[_0x28a659],[_0x3ceac7]],this[_0x5300b5(0x140)]['override'])),(0x0,_0x4ada4b[_0x5300b5(0xeb)])(this[_0x5300b5(0x193)],[[_0x28a659]]);}[_0x668e97(0x154)](){const _0x2182d7=_0x668e97;(0x0,_0x4ada4b['touchDependencies'])(this[_0x2182d7(0x193)],[[_0x3ceac7]]);}};_0x461446(_0xfdf134,'type',_0x4ada4b[_0x668e97(0x19b)][_0x668e97(0xfa)]),_0x461446(_0xfdf134,'pluginName',_0x668e97(0x179)),_0x461446(_0xfdf134,'packageName',_0x21d473),_0x461446(_0xfdf134,_0x668e97(0x169),_0x277c6d),_0xfdf134=_0x1d30ee([(0x0,_0x4ada4b[_0x668e97(0xe8)])(_0x1689a6['UniverCollaborationClientPlugin']),_0x3f0d09(0x1,(0x0,_0x4ada4b[_0x668e97(0x165)])(_0x4ada4b[_0x668e97(0x1a6)])),_0x3f0d09(0x2,_0x4ada4b['IConfigService'])],_0xfdf134),Object[_0x668e97(0x174)](_0x509d14,_0x668e97(0x15c),{'enumerable':!0x0,'get':function(){return _0x3ceac7;}}),_0x509d14[_0x668e97(0x188)]=_0x5304a6,Object[_0x668e97(0x174)](_0x509d14,_0x668e97(0x14e),{'enumerable':!0x0,'get':function(){return _0x4b5a71;}}),Object[_0x668e97(0x174)](_0x509d14,_0x668e97(0x19f),{'enumerable':!0x0,'get':function(){return _0x375e44;}}),_0x509d14[_0x668e97(0x176)]=_0x2e464f,_0x509d14[_0x668e97(0x1b1)]=_0x568bf0,Object[_0x668e97(0x174)](_0x509d14,_0x668e97(0xfe),{'enumerable':!0x0,'get':function(){return _0xfdf134;}});}));
|
|
1
|
+
function _0x26f1(_0xf56b7d,_0x272807){_0xf56b7d=_0xf56b7d-0x198;const _0x1e551d=_0x1e55();let _0x26f19a=_0x1e551d[_0xf56b7d];return _0x26f19a;}function _0x1e55(){const _0x40c12e=['init','trim','OFFLINE','children','xlink:href','assign','toPrimitive','live-share-icon','disposeWithMe','path','Inject','call','takeUntil','useState','_collabSession','has','useRef','@univerjs-pro/collaboration-client','touchDependencies','next','startFollowing','svg','current','univer-mb-3\x20univer-w-full\x20univer-text-sm','Fragment','_sharedOperations','set','BuiltInUIPart','_liveShareService','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','event$','getInitialStates','none','_stopFollowing','InsertSheetMutation','NEW_CHANGESETS','UniverInstanceType','object','tag','RxDisposable','@univerjs/ui','_commandService','DesktopLiveShareController','http://www.w3.org/2000/svg','url(#$1','IUniverInstanceService','UNIVER_LIVE_SHARE_PLUGIN','IUIPartsService','data','CollaborationSessionService','stringify','registerDependencies','IConfigService','LIVESHARE_NEW_HOST','@univerjs-pro/live-share','entries','jsx','_configService','_presenter','NOT_FOLLOWING','delete','unit','button','attrs','constructor','mutations','forEach','UniverProCollaborationClient','UniverSheetsUi','complete','@univerjs/core','registerSharedOperation','@univerjs/design','Stop\x20following','BehaviorSubject','ICommandService','You\x27are\x20offline.','_status','react/jsx-runtime','_startPresenting','@univerjs/sheets','rxjs/operators','getOwnPropertyDescriptor','params','_init','_config','LiveShareCoordinator','LIVESHARE_FETCH_OPERATIONS','map','UniverIcon','SAME_OPERATION_SHARE_INTERVAL','HEADER_MENU','You\x27re\x20presenting\x20the\x20document','offline','not-following','_startLiveShareCoordinator','_handleOperation','UNIVER_SHEET','LIVESHARE_TERMINATE','override','defineProperty','createInstance','_unitID','getLiveShareCoordinatorSync','clear','getConfig','pluginName','_handleOffline','operators','mergeOverrideWithDependencies','presenting','LIVESHARE_REQUEST_HOST','pipe','UniverCore','requireSession','_mountLiveShare','LiveShareIcon','dispose$','_stopPresenting','_reporters','unitId','LiveShareController','get','Module','decorate','0.23.0-insiders.20260522-e8f2a3b','_collabSessionService','mask','default','add','Dropdown','parse','You\x27re\x20not\x20following\x20the\x20presenter','fill','operations','use','UniverUi','311697pZUIaN','send','OPERATION','_handleOnline','createElement','Stop\x20presenting','UniverDesign','toDisposable','Start','Disposable','M9.20459\x204.90474C9.20459\x204.64763\x209.35535\x204.54174\x209.54053\x204.68737L11.2643\x206.04046C11.4495\x206.18609\x2011.4495\x206.42299\x2011.2643\x206.56789L9.55334\x207.90706C9.36755\x208.05269\x209.20386\x207.90499\x209.20386\x207.68969V6.96785H8.94446C8.19543\x206.96785\x206.72595\x207.28347\x206.37646\x207.89174C6.30786\x208.00322\x206.23572\x207.97884\x206.23572\x207.89174C6.25073\x206.80828\x208.0918\x205.58895\x209.17383\x205.58895H9.20459V4.90474Z','getUnitId','211496pMXqdD','univer-border-none\x20univer-text-gray-600\x20univer-outline-none','univerjs-icon\x20univerjs-icon-','12rEhGAk','dispose','includes','_startFollowing','SetZoomRatioOperation','rxjs','2971430ssmZNn','stopFollowing','LiveShareStatus','idSuffix','exports','type','You\x27re\x20following\x20the\x20presenter','asObservable','_status$','currentColor','symbol','string','getStatus','1em','find','Start\x20following','getLiveShareCoordinator','PRESENTING','getTypeOfUnitDisposed$','React','@univerjs/sheets-ui','UniverLiveSharePlugin','defIds','UNIVER_UNKNOWN','shouldShareOperation','setConfig','function','substring','subscribe','Injector','_injector','_handleNewHost','UniverProCollaboration','SetWorksheetActiveOperation','LiveShareService','_univerInstanceService','end','random','status$','idle','2cXdzew','evenodd','react','univer-box-border\x20univer-min-w-60\x20univer-bg-gray-900\x20univer-px-4\x20univer-py-3\x20univer-text-gray-900\x20dark:!univer-bg-white\x20dark:!univer-text-white','Subject','colorChannel1','Button','getTypeOfUnitAdded$','getValue','15546qbVqqG','useDependency','_fetchOperations','onStarting','unsubscribe','iterator','LiveShare','_handleNewChangeSets','div','stopPresenting','replace','useObservable','_entities','16286qpZGwE','_beIdle','2632PXLiMG','then','univer-size-4','_commandDisposable','following','_uiPartsService','getMemberID','onCommandExecuted','values','Present\x20this\x20document','packageName','onRendered','displayName','156Oytdhc','CommandType','282390lVEKtC','from','jsxs','presenter','live-share.config','forwardRef','LIVESHARE_OPERATION','length','tryStartPresenting','connectInjector','text','getCurrentTypeOfUnit$','CollaborationEvent','amd'];_0x1e55=function(){return _0x40c12e;};return _0x1e55();}(function(_0x483548,_0x18d0d0){const _0x5836ec=_0x26f1,_0x716026=_0x483548();while(!![]){try{const _0x1dd2ce=-parseInt(_0x5836ec(0x222))/0x1*(-parseInt(_0x5836ec(0x238))/0x2)+-parseInt(_0x5836ec(0x22b))/0x3+-parseInt(_0x5836ec(0x1f4))/0x4*(parseInt(_0x5836ec(0x249))/0x5)+parseInt(_0x5836ec(0x247))/0x6*(-parseInt(_0x5836ec(0x23a))/0x7)+parseInt(_0x5836ec(0x1f1))/0x8+-parseInt(_0x5836ec(0x1e5))/0x9+parseInt(_0x5836ec(0x1fa))/0xa;if(_0x1dd2ce===_0x18d0d0)break;else _0x716026['push'](_0x716026['shift']());}catch(_0x1a159a){_0x716026['push'](_0x716026['shift']());}}}(_0x1e55,0x1d809),function(_0x2bd1bd,_0x45a029){const _0x4a9410=_0x26f1;typeof exports=='object'&&typeof module<'u'?_0x45a029(exports,require(`@univerjs/core`),require(`@univerjs/ui`),require(`@univerjs/design`),require(`react`),require(`@univerjs-pro/collaboration`),require(`@univerjs-pro/collaboration-client`),require(`@univerjs/sheets`),require(`rxjs`),require(`rxjs/operators`),require(`react/jsx-runtime`),require(`@univerjs/sheets-ui`)):typeof define=='function'&&define[_0x4a9410(0x256)]?define([_0x4a9410(0x1fe),_0x4a9410(0x1a2),_0x4a9410(0x27f),_0x4a9410(0x1a4),_0x4a9410(0x224),'@univerjs-pro/collaboration',_0x4a9410(0x268),_0x4a9410(0x1ac),_0x4a9410(0x1f9),_0x4a9410(0x1ad),_0x4a9410(0x1aa),_0x4a9410(0x20e)],_0x45a029):(_0x2bd1bd=typeof globalThis<'u'?globalThis:_0x2bd1bd||self,_0x45a029(_0x2bd1bd['UniverProLiveShare']={},_0x2bd1bd[_0x4a9410(0x1cd)],_0x2bd1bd[_0x4a9410(0x1e4)],_0x2bd1bd[_0x4a9410(0x1eb)],_0x2bd1bd['React'],_0x2bd1bd[_0x4a9410(0x21a)],_0x2bd1bd[_0x4a9410(0x19f)],_0x2bd1bd['UniverSheets'],_0x2bd1bd[_0x4a9410(0x1f9)],_0x2bd1bd[_0x4a9410(0x1f9)][_0x4a9410(0x1c8)],_0x2bd1bd[_0x4a9410(0x20d)],_0x2bd1bd[_0x4a9410(0x1a0)]));}(this,function(_0x5de352,_0x519061,_0x25c441,_0x4a2312,_0x2b2a65,_0x3fcb10,_0x33e94a,_0x228413,_0x2155fc,_0x3e348f,_0xa8737,_0x2ae043){const _0x59c2ed=_0x26f1;Object[_0x59c2ed(0x1c0)](_0x5de352,Symbol['toStringTag'],{'value':_0x59c2ed(0x1d7)});function _0x5f23fe({ref:_0x18ba56,..._0x91c681}){const _0x2f5a09=_0x59c2ed;let {icon:_0x137747,id:_0x434d1e,className:_0x37e9fd,extend:_0x544e31,..._0x306c0d}=_0x91c681,_0x3826ae=(_0x2f5a09(0x1f3)+_0x434d1e+'\x20'+(_0x37e9fd||''))[_0x2f5a09(0x258)](),_0x4d3498=(0x0,_0x2b2a65['useRef'])('_'+_0xdfb7b8());return _0x328e0e(_0x137747,''+_0x434d1e,{'defIds':_0x137747[_0x2f5a09(0x210)],'idSuffix':_0x4d3498[_0x2f5a09(0x26d)]},{'ref':_0x18ba56,'className':_0x3826ae,..._0x306c0d},_0x544e31);}function _0x328e0e(_0x33bb6b,_0x39bfe7,_0x266640,_0x4f569d,_0x1207ef){const _0xe2772f=_0x59c2ed;return(0x0,_0x2b2a65[_0xe2772f(0x1e9)])(_0x33bb6b['tag'],{'key':_0x39bfe7,..._0x15c2ea(_0x33bb6b,_0x266640,_0x1207ef),..._0x4f569d},(_0x5c73ec(_0x33bb6b,_0x266640)[_0xe2772f(0x25a)]||[])['map']((_0x220075,_0x572ec7)=>_0x328e0e(_0x220075,_0x39bfe7+'-'+_0x33bb6b[_0xe2772f(0x27d)]+'-'+_0x572ec7,_0x266640,void 0x0,_0x1207ef)));}function _0x15c2ea(_0x5002ab,_0x48c1ad,_0x4dd578){const _0x1f2395=_0x59c2ed;let _0x5f0fb1={..._0x5002ab[_0x1f2395(0x19b)]};_0x4dd578!=null&&_0x4dd578[_0x1f2395(0x227)]&&_0x5f0fb1[_0x1f2395(0x1e1)]===_0x1f2395(0x227)&&(_0x5f0fb1[_0x1f2395(0x1e1)]=_0x4dd578[_0x1f2395(0x227)]),_0x5002ab['tag']==='mask'&&_0x5f0fb1['id']&&(_0x5f0fb1['id']+=_0x48c1ad[_0x1f2395(0x1fd)]),Object[_0x1f2395(0x28e)](_0x5f0fb1)[_0x1f2395(0x19e)](([_0x302048,_0x158233])=>{const _0x2fc0c3=_0x1f2395;_0x302048===_0x2fc0c3(0x1db)&&typeof _0x158233==_0x2fc0c3(0x205)&&(_0x5f0fb1[_0x302048]=_0x158233[_0x2fc0c3(0x235)](/url\(#(.*)\)/,'url(#$1'+_0x48c1ad[_0x2fc0c3(0x1fd)]+')'));});let {defIds:_0x40d059}=_0x48c1ad;return!_0x40d059||_0x40d059[_0x1f2395(0x250)]===0x0?_0x5f0fb1:(_0x5002ab[_0x1f2395(0x27d)]===_0x1f2395(0x1e3)&&_0x5f0fb1[_0x1f2395(0x25b)]&&(_0x5f0fb1[_0x1f2395(0x25b)]+=_0x48c1ad[_0x1f2395(0x1fd)]),Object[_0x1f2395(0x28e)](_0x5f0fb1)[_0x1f2395(0x19e)](([_0x3dbc21,_0x220fbf])=>{const _0x45a15d=_0x1f2395;typeof _0x220fbf==_0x45a15d(0x205)&&(_0x5f0fb1[_0x3dbc21]=_0x220fbf[_0x45a15d(0x235)](/url\(#(.*)\)/,_0x45a15d(0x283)+_0x48c1ad[_0x45a15d(0x1fd)]+')'));}),_0x5f0fb1);}function _0x5c73ec(_0x1a611e,_0x47a015){const _0xd071fa=_0x59c2ed;var _0x36d730;let {defIds:_0x5a5e26}=_0x47a015;return!_0x5a5e26||_0x5a5e26['length']===0x0?_0x1a611e:_0x1a611e[_0xd071fa(0x27d)]==='defs'&&(_0x36d730=_0x1a611e['children'])!=null&&_0x36d730[_0xd071fa(0x250)]?{..._0x1a611e,'children':_0x1a611e['children'][_0xd071fa(0x1b4)](_0x583fe4=>typeof _0x583fe4['attrs']['id']==_0xd071fa(0x205)&&_0x5a5e26&&_0x5a5e26[_0xd071fa(0x1f6)](_0x583fe4[_0xd071fa(0x19b)]['id'])?{..._0x583fe4,'attrs':{..._0x583fe4[_0xd071fa(0x19b)],'id':_0x583fe4[_0xd071fa(0x19b)]['id']+_0x47a015[_0xd071fa(0x1fd)]}}:_0x583fe4)}:_0x1a611e;}function _0xdfb7b8(){const _0x16991d=_0x59c2ed;return Math[_0x16991d(0x21f)]()['toString'](0x24)[_0x16991d(0x215)](0x2,0x8);}_0x5f23fe[_0x59c2ed(0x246)]=_0x59c2ed(0x1b5);let _0x47a7e9={'tag':_0x59c2ed(0x26c),'attrs':{'xmlns':_0x59c2ed(0x282),'fill':_0x59c2ed(0x277),'viewBox':'0\x200\x2017\x2017','width':_0x59c2ed(0x207),'height':_0x59c2ed(0x207)},'children':[{'tag':_0x59c2ed(0x260),'attrs':{'fill':_0x59c2ed(0x203),'d':_0x59c2ed(0x1ef)}},{'tag':_0x59c2ed(0x260),'attrs':{'fill':'currentColor','d':'M1.98682\x202.73096C1.98682\x202.17867\x202.43457\x201.73096\x202.98682\x201.73096H14.9868C15.5391\x201.73096\x2015.9868\x202.17867\x2015.9868\x202.73096V9.90105C15.9868\x2010.4533\x2015.5391\x2010.901\x2014.9868\x2010.901H9.62183V13.5577H12.9868C13.3375\x2013.5577\x2013.6218\x2013.842\x2013.6218\x2014.1927C13.6218\x2014.5434\x2013.3375\x2014.8277\x2012.9868\x2014.8277H4.98682C4.63611\x2014.8277\x204.35181\x2014.5434\x204.35181\x2014.1927C4.35181\x2013.842\x204.63611\x2013.5577\x204.98682\x2013.5577H8.35181V10.901H2.98682C2.43457\x2010.901\x201.98682\x2010.4533\x201.98682\x209.90105V2.73096ZM3.25684\x209.63106V3.00095H14.7168V9.63106H3.25684Z','fillRule':_0x59c2ed(0x223),'clipRule':_0x59c2ed(0x223)}}]},_0x30c672=(0x0,_0x2b2a65[_0x59c2ed(0x24e)])(function(_0x5e7dcc,_0x42e7ba){const _0x567fbb=_0x59c2ed;return(0x0,_0x2b2a65[_0x567fbb(0x1e9)])(_0x5f23fe,Object[_0x567fbb(0x25c)]({},_0x5e7dcc,{'id':_0x567fbb(0x25e),'ref':_0x42e7ba,'icon':_0x47a7e9}));});_0x30c672[_0x59c2ed(0x246)]=_0x59c2ed(0x1d0);function _0x5bb987(_0x5f1544){'@babel/helpers - typeof';const _0x5de4f7=_0x59c2ed;return _0x5bb987=typeof Symbol==_0x5de4f7(0x214)&&typeof Symbol[_0x5de4f7(0x230)]==_0x5de4f7(0x204)?function(_0x3617e5){return typeof _0x3617e5;}:function(_0x2ab843){const _0x1dd436=_0x5de4f7;return _0x2ab843&&typeof Symbol==_0x1dd436(0x214)&&_0x2ab843[_0x1dd436(0x19c)]===Symbol&&_0x2ab843!==Symbol['prototype']?'symbol':typeof _0x2ab843;},_0x5bb987(_0x5f1544);}function _0x165c3f(_0x3558ad,_0x2688f5){const _0x22040a=_0x59c2ed;if(_0x5bb987(_0x3558ad)!=_0x22040a(0x27c)||!_0x3558ad)return _0x3558ad;var _0x43ded4=_0x3558ad[Symbol[_0x22040a(0x25d)]];if(_0x43ded4!==void 0x0){var _0x557f3a=_0x43ded4[_0x22040a(0x262)](_0x3558ad,_0x2688f5||_0x22040a(0x1dc));if(_0x5bb987(_0x557f3a)!=_0x22040a(0x27c))return _0x557f3a;throw TypeError(_0x22040a(0x274));}return(_0x2688f5===_0x22040a(0x205)?String:Number)(_0x3558ad);}function _0x36091e(_0x500c54){const _0x4bf1a1=_0x59c2ed;var _0x5bd423=_0x165c3f(_0x500c54,'string');return _0x5bb987(_0x5bd423)==_0x4bf1a1(0x204)?_0x5bd423:_0x5bd423+'';}function _0xbed16a(_0x318e2b,_0x56ff82,_0x2467c8){const _0x2c8d4b=_0x59c2ed;return(_0x56ff82=_0x36091e(_0x56ff82))in _0x318e2b?Object[_0x2c8d4b(0x1c0)](_0x318e2b,_0x56ff82,{'value':_0x2467c8,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x318e2b[_0x56ff82]=_0x2467c8,_0x318e2b;}var _0x174c59=class extends _0x519061[_0x59c2ed(0x1ee)]{constructor(..._0x23fe63){const _0x2804be=_0x59c2ed;super(..._0x23fe63),_0xbed16a(this,'_sharedOperations',new Set()),_0xbed16a(this,_0x2804be(0x1d3),new Set());}[_0x59c2ed(0x1a3)](_0x4e3e42){const _0x2fc162=_0x59c2ed;return this[_0x2fc162(0x270)][_0x2fc162(0x1dd)](_0x4e3e42),(0x0,_0x519061[_0x2fc162(0x1ec)])(()=>this[_0x2fc162(0x270)]['delete'](_0x4e3e42));}['registerInitialStateReporter'](_0x3c692a){const _0x3a863e=_0x59c2ed;return this[_0x3a863e(0x1d3)][_0x3a863e(0x1dd)](_0x3c692a),(0x0,_0x519061[_0x3a863e(0x1ec)])(()=>this['_reporters'][_0x3a863e(0x198)](_0x3c692a));}[_0x59c2ed(0x212)](_0x5a8a30){const _0x38dedf=_0x59c2ed;return this['_sharedOperations'][_0x38dedf(0x266)](_0x5a8a30);}[_0x59c2ed(0x276)](_0x5bb314){const _0x3a9f42=_0x59c2ed;return Array[_0x3a9f42(0x24a)](this['_reporters'])[_0x3a9f42(0x1b4)](_0x30d62=>_0x30d62(_0x5bb314));}};function _0x1fd8d0(_0x301255,_0x28ed7a){return function(_0x59119e,_0x2aad1b){_0x28ed7a(_0x59119e,_0x2aad1b,_0x301255);};}function _0x108d1e(_0x56aa7a,_0x399067,_0x2ef0ae,_0x48a477){const _0x298d81=_0x59c2ed;var _0x1391d9=arguments[_0x298d81(0x250)],_0x4e8b0d=_0x1391d9<0x3?_0x399067:_0x48a477===null?_0x48a477=Object[_0x298d81(0x1ae)](_0x399067,_0x2ef0ae):_0x48a477,_0x3df080;if(typeof Reflect==_0x298d81(0x27c)&&typeof Reflect[_0x298d81(0x1d8)]==_0x298d81(0x214))_0x4e8b0d=Reflect['decorate'](_0x56aa7a,_0x399067,_0x2ef0ae,_0x48a477);else{for(var _0x198daa=_0x56aa7a[_0x298d81(0x250)]-0x1;_0x198daa>=0x0;_0x198daa--)(_0x3df080=_0x56aa7a[_0x198daa])&&(_0x4e8b0d=(_0x1391d9<0x3?_0x3df080(_0x4e8b0d):_0x1391d9>0x3?_0x3df080(_0x399067,_0x2ef0ae,_0x4e8b0d):_0x3df080(_0x399067,_0x2ef0ae))||_0x4e8b0d);}return _0x1391d9>0x3&&_0x4e8b0d&&Object[_0x298d81(0x1c0)](_0x399067,_0x2ef0ae,_0x4e8b0d),_0x4e8b0d;}let _0x1135f5=class extends _0x519061[_0x59c2ed(0x27e)]{constructor(_0x4b41f4,_0x5439d4,_0x477965){const _0x3ae421=_0x59c2ed;super(),this[_0x3ae421(0x21d)]=_0x4b41f4,this[_0x3ae421(0x218)]=_0x5439d4,this[_0x3ae421(0x1da)]=_0x477965,_0xbed16a(this,_0x3ae421(0x237),new Map()),this[_0x3ae421(0x1b0)]();}async[_0x59c2ed(0x20a)](_0x3758e5){const _0x53093c=_0x59c2ed;return this[_0x53093c(0x237)]['has'](_0x3758e5)||await this[_0x53093c(0x1bb)](_0x3758e5),this[_0x53093c(0x237)][_0x53093c(0x1d6)](_0x3758e5);}[_0x59c2ed(0x1c3)](_0x481013){const _0x612241=_0x59c2ed;var _0x57951c;return(_0x57951c=this[_0x612241(0x237)][_0x612241(0x1d6)](_0x481013))==null?null:_0x57951c;}[_0x59c2ed(0x1b0)](){const _0x58e1cb=_0x59c2ed;this['_univerInstanceService'][_0x58e1cb(0x229)](_0x519061['UniverInstanceType'][_0x58e1cb(0x1bd)])[_0x58e1cb(0x1cc)]((0x0,_0x3e348f[_0x58e1cb(0x263)])(this[_0x58e1cb(0x1d1)]))[_0x58e1cb(0x216)](async _0x1c4b51=>{const _0xc47b23=_0x58e1cb;let _0x1c6901=_0x1c4b51[_0xc47b23(0x199)]['getUnitId']();this[_0xc47b23(0x237)]['has'](_0x1c6901)||this[_0xc47b23(0x1bb)](_0x1c6901);}),this[_0x58e1cb(0x21d)][_0x58e1cb(0x20c)](_0x519061['UniverInstanceType'][_0x58e1cb(0x1bd)])[_0x58e1cb(0x1cc)]((0x0,_0x3e348f[_0x58e1cb(0x263)])(this[_0x58e1cb(0x1d1)]))[_0x58e1cb(0x216)](_0x411c2d=>{const _0x45e7e2=_0x58e1cb;let _0x40e9b1=_0x411c2d['getUnitId'](),_0x231ee0=this['_entities'][_0x45e7e2(0x1d6)](_0x40e9b1);_0x231ee0==null||_0x231ee0[_0x45e7e2(0x1f5)]();});}async['_startLiveShareCoordinator'](_0x5d4def){const _0x5499b1=_0x59c2ed;let _0x130468=await this[_0x5499b1(0x1da)][_0x5499b1(0x1ce)](_0x5d4def),_0x459466=this[_0x5499b1(0x218)][_0x5499b1(0x1c1)](_0x2f66b7,_0x5d4def,_0x130468);return _0x459466['init'](),this[_0x5499b1(0x237)]['set'](_0x5d4def,_0x459466),_0x459466;}};_0x1135f5=_0x108d1e([_0x1fd8d0(0x0,_0x519061[_0x59c2ed(0x284)]),_0x1fd8d0(0x1,(0x0,_0x519061[_0x59c2ed(0x261)])(_0x519061[_0x59c2ed(0x217)])),_0x1fd8d0(0x2,(0x0,_0x519061['Inject'])(_0x33e94a[_0x59c2ed(0x288)]))],_0x1135f5);let _0x2a5ccc=function(_0x1cbc41){const _0x97bedc=_0x59c2ed;return _0x1cbc41[_0x97bedc(0x259)]=_0x97bedc(0x1b9),_0x1cbc41['IDLE']=_0x97bedc(0x221),_0x1cbc41['FOLLOWING']=_0x97bedc(0x23e),_0x1cbc41[_0x97bedc(0x292)]=_0x97bedc(0x1ba),_0x1cbc41[_0x97bedc(0x20b)]='presenting',_0x1cbc41;}({}),_0x2f66b7=class extends _0x519061[_0x59c2ed(0x27e)]{get[_0x59c2ed(0x1a9)](){const _0x59c69d=_0x59c2ed;return this[_0x59c69d(0x202)][_0x59c69d(0x22a)]();}constructor(_0x4d6d70,_0xb76a1d,_0x4290e9,_0x51b8f4,_0x3e99ef){const _0x13cd8f=_0x59c2ed;super(),this['_unitID']=_0x4d6d70,this[_0x13cd8f(0x265)]=_0xb76a1d,this[_0x13cd8f(0x290)]=_0x4290e9,this[_0x13cd8f(0x273)]=_0x51b8f4,this[_0x13cd8f(0x280)]=_0x3e99ef,_0xbed16a(this,'_status$',new _0x2155fc[(_0x13cd8f(0x1a6))]('idle')),_0xbed16a(this,_0x13cd8f(0x220),this[_0x13cd8f(0x202)][_0x13cd8f(0x201)]()),_0xbed16a(this,_0x13cd8f(0x1b0),!0x1),_0xbed16a(this,'_commandDisposable',null),_0xbed16a(this,_0x13cd8f(0x291),null);}[_0x59c2ed(0x1f5)](){const _0x35da33=_0x59c2ed;var _0x302de2;(_0x302de2=this[_0x35da33(0x23d)])==null||_0x302de2[_0x35da33(0x1f5)](),this[_0x35da33(0x202)][_0x35da33(0x26a)](_0x35da33(0x221)),this[_0x35da33(0x202)][_0x35da33(0x1a1)]();}[_0x59c2ed(0x206)](){const _0x44010d=_0x59c2ed;return this[_0x44010d(0x1a9)];}[_0x59c2ed(0x257)](){const _0x5bb17c=_0x59c2ed;this[_0x5bb17c(0x1b0)]||(this['_init']=!0x0,this[_0x5bb17c(0x265)]['sessionStatus$']['pipe']((0x0,_0x3e348f[_0x5bb17c(0x263)])(this[_0x5bb17c(0x1d1)]))['subscribe'](_0x3b1200=>{const _0x15c7ad=_0x5bb17c;switch(_0x3b1200){case _0x33e94a['SessionStatus'][_0x15c7ad(0x259)]:this[_0x15c7ad(0x1c7)]();break;case _0x33e94a['SessionStatus']['ONLINE']:this[_0x15c7ad(0x1e8)]();break;default:}}),this[_0x5bb17c(0x265)][_0x5bb17c(0x275)][_0x5bb17c(0x1cc)]((0x0,_0x3e348f[_0x5bb17c(0x263)])(this[_0x5bb17c(0x1d1)]))[_0x5bb17c(0x216)](_0x58e25e=>{const _0x45853a=_0x5bb17c;let {eventID:_0x43cc8f}=_0x58e25e;switch(_0x43cc8f){case _0x3fcb10[_0x45853a(0x255)][_0x45853a(0x28c)]:this[_0x45853a(0x219)](_0x58e25e);break;case _0x3fcb10[_0x45853a(0x255)][_0x45853a(0x24f)]:this[_0x45853a(0x1bc)](_0x58e25e);break;case _0x3fcb10['CollaborationEvent'][_0x45853a(0x1be)]:this['_handleTerminate']();break;case _0x3fcb10[_0x45853a(0x255)][_0x45853a(0x27a)]:this[_0x45853a(0x232)](_0x58e25e);break;default:}}));}[_0x59c2ed(0x251)](){const _0x259334=_0x59c2ed;this[_0x259334(0x265)]['send']({'eventID':_0x3fcb10[_0x259334(0x255)][_0x259334(0x1cb)],'data':{'unitID':this[_0x259334(0x1c2)],'userID':this['_collabSession']['getMemberID']()}},this[_0x259334(0x1c2)]);}[_0x59c2ed(0x234)](){const _0x36d362=_0x59c2ed;this[_0x36d362(0x1a9)]===_0x36d362(0x1ca)&&(this[_0x36d362(0x202)][_0x36d362(0x26a)](_0x36d362(0x221)),this[_0x36d362(0x265)][_0x36d362(0x1e6)]({'eventID':_0x3fcb10['CollaborationEvent'][_0x36d362(0x1be)],'data':{'unitID':this[_0x36d362(0x1c2)]}},this[_0x36d362(0x1c2)]));}[_0x59c2ed(0x26b)](){const _0x504df5=_0x59c2ed;this[_0x504df5(0x1a9)]===_0x504df5(0x1ba)&&(this[_0x504df5(0x202)][_0x504df5(0x26a)](_0x504df5(0x23e)),this['_startFollowing']());}[_0x59c2ed(0x1fb)](){const _0x2cd9d5=_0x59c2ed;this[_0x2cd9d5(0x1a9)]===_0x2cd9d5(0x23e)&&this[_0x2cd9d5(0x278)]();}[_0x59c2ed(0x219)](_0xb8366a){const _0x43c3e7=_0x59c2ed;let {presenter:_0x4b41e2}=_0xb8366a[_0x43c3e7(0x287)],_0x487fdd=this['_collabSession'][_0x43c3e7(0x240)]();this[_0x43c3e7(0x291)]=_0x4b41e2,_0x4b41e2===_0x487fdd?(this[_0x43c3e7(0x278)](),this[_0x43c3e7(0x1ab)]()):this[_0x43c3e7(0x1a9)]!==_0x43c3e7(0x1ba)&&(this[_0x43c3e7(0x1d2)](),this[_0x43c3e7(0x1f7)]());}[_0x59c2ed(0x22d)](){const _0x571c1a=_0x59c2ed;let _0x3ccc31={'eventID':_0x3fcb10[_0x571c1a(0x255)][_0x571c1a(0x1b3)]};this['_collabSession'][_0x571c1a(0x1e6)](_0x3ccc31,this[_0x571c1a(0x1c2)]);}['_handleTerminate'](){const _0x2eb787=_0x59c2ed;this[_0x2eb787(0x291)]=null,this[_0x2eb787(0x1a9)]!==_0x2eb787(0x1ca)&&this[_0x2eb787(0x239)]();}[_0x59c2ed(0x232)](_0x24c335){const _0x953720=_0x59c2ed;if(this[_0x953720(0x1a9)]===_0x953720(0x23e)&&this[_0x953720(0x291)]===_0x24c335[_0x953720(0x287)]['memberID']){let _0x4ec93e=(0x0,_0x3fcb10['parseProtocolChangeset'])(_0x24c335[_0x953720(0x287)])[_0x953720(0x19d)]['reverse']()[_0x953720(0x208)](_0x32a1eb=>_0x32a1eb['id']===_0x228413[_0x953720(0x279)]['id']);if(_0x4ec93e){let _0x141b6f=_0x4ec93e[_0x953720(0x1af)][_0x953720(0x1d4)],_0x89f71f=_0x4ec93e[_0x953720(0x1af)]['sheet']['id'];setTimeout(()=>{const _0x53d9ea=_0x953720;this[_0x53d9ea(0x280)]['executeCommand'](_0x228413[_0x53d9ea(0x21b)]['id'],{'unitId':_0x141b6f,'subUnitId':_0x89f71f},{'fromCollab':!0x0});});}}}[_0x59c2ed(0x1ab)](){const _0x471de8=_0x59c2ed;this[_0x471de8(0x202)]['next'](_0x471de8(0x1ca));let _0x5850d0=new Map(),_0x42ac6d=this[_0x471de8(0x23d)]=new _0x519061['DisposableCollection']();_0x42ac6d[_0x471de8(0x1dd)]((0x0,_0x519061['toDisposable'])(()=>{const _0x237f0f=_0x471de8;_0x5850d0[_0x237f0f(0x19e)](_0x19fe95=>_0x19fe95[_0x237f0f(0x1a1)]()),_0x5850d0[_0x237f0f(0x1c4)]();})),_0x42ac6d['add'](this['_commandService'][_0x471de8(0x241)](_0x25bd01=>{const _0x442a58=_0x471de8;if(_0x25bd01[_0x442a58(0x1ff)]!==_0x519061[_0x442a58(0x248)][_0x442a58(0x1e7)]||!this[_0x442a58(0x273)][_0x442a58(0x212)](_0x25bd01['id']))return;let {id:_0x5b0c12}=_0x25bd01,_0x434b49;if(_0x5850d0['has'](_0x5b0c12))_0x434b49=_0x5850d0[_0x442a58(0x1d6)](_0x5b0c12);else{var _0x272f84;_0x434b49=new _0x2155fc[(_0x442a58(0x226))](),_0x5850d0[_0x442a58(0x271)](_0x5b0c12,_0x434b49),_0x434b49[_0x442a58(0x1cc)]((0x0,_0x3e348f['throttleTime'])((_0x272f84=this['_configService'][_0x442a58(0x1c5)](_0x442a58(0x1b6)))==null?0xc8:_0x272f84,void 0x0,{'trailing':!0x0,'leading':!0x0}))['subscribe'](_0x134b69=>{const _0x2d1ed3=_0x442a58;this[_0x2d1ed3(0x265)][_0x2d1ed3(0x1e6)]({'eventID':_0x3fcb10[_0x2d1ed3(0x255)]['LIVESHARE_OPERATION'],'data':{'unitID':this[_0x2d1ed3(0x1c2)],'operations':{[_0x134b69['id']]:{'id':_0x134b69['id'],'params':JSON[_0x2d1ed3(0x289)](_0x134b69[_0x2d1ed3(0x1af)])}}}},this[_0x2d1ed3(0x1c2)]);});}_0x434b49['next'](_0x25bd01);})),this['_liveShareService'][_0x471de8(0x276)](this[_0x471de8(0x1c2)])['forEach'](_0x268aa3=>this[_0x471de8(0x265)]['send']({'eventID':_0x3fcb10['CollaborationEvent'][_0x471de8(0x24f)],'data':{'unitID':this['_unitID'],'operations':{[_0x268aa3['id']]:{'id':_0x268aa3['id'],'params':JSON[_0x471de8(0x289)](_0x268aa3[_0x471de8(0x1af)])}}}},this['_unitID']));}[_0x59c2ed(0x1d2)](){const _0x163582=_0x59c2ed;var _0x1f131d;this[_0x163582(0x202)]['next'](_0x163582(0x221)),(_0x1f131d=this[_0x163582(0x23d)])==null||_0x1f131d[_0x163582(0x1f5)](),this[_0x163582(0x23d)]=null;}[_0x59c2ed(0x1f7)](){const _0x4bddcc=_0x59c2ed;var _0x1319d0;(_0x1319d0=this[_0x4bddcc(0x23d)])==null||_0x1319d0[_0x4bddcc(0x1f5)](),this[_0x4bddcc(0x202)][_0x4bddcc(0x26a)](_0x4bddcc(0x23e));}[_0x59c2ed(0x239)](){const _0x446794=_0x59c2ed;var _0x17db8b;this[_0x446794(0x202)][_0x446794(0x26a)](_0x446794(0x221)),(_0x17db8b=this[_0x446794(0x23d)])==null||_0x17db8b[_0x446794(0x1f5)](),this[_0x446794(0x23d)]=null;}[_0x59c2ed(0x278)](){const _0x3e9d5b=_0x59c2ed;var _0x47ea89;this[_0x3e9d5b(0x202)][_0x3e9d5b(0x26a)](_0x3e9d5b(0x1ba)),(_0x47ea89=this['_commandDisposable'])==null||_0x47ea89['dispose']();}[_0x59c2ed(0x1bc)](_0x58b6c0){const _0x2e854d=_0x59c2ed;if([_0x2e854d(0x1ca),_0x2e854d(0x1ba),'offline'][_0x2e854d(0x1f6)](this[_0x2e854d(0x1a9)])||!_0x58b6c0['data'][_0x2e854d(0x24c)]||_0x58b6c0[_0x2e854d(0x287)][_0x2e854d(0x24c)]===this['_collabSession'][_0x2e854d(0x240)]())return;this[_0x2e854d(0x1a9)]===_0x2e854d(0x221)&&this[_0x2e854d(0x1f7)]();let _0xf2d51d=_0x58b6c0[_0x2e854d(0x287)][_0x2e854d(0x1e2)];Object[_0x2e854d(0x242)](_0xf2d51d)[_0x2e854d(0x19e)](_0x1bc7c0=>{const _0x121b6c=_0x2e854d;this['_commandService']['executeCommand'](_0x1bc7c0['id'],_0x1bc7c0[_0x121b6c(0x1af)]?JSON[_0x121b6c(0x1df)](_0x1bc7c0['params']):null,{'fromCollab':!0x0});});}['_handleOffline'](){const _0x3f91bc=_0x59c2ed;var _0x3b35fd;this[_0x3f91bc(0x202)][_0x3f91bc(0x26a)]('offline'),(_0x3b35fd=this['_commandDisposable'])==null||_0x3b35fd[_0x3f91bc(0x1f5)]();}[_0x59c2ed(0x1e8)](){const _0x5e59be=_0x59c2ed;this['_status$'][_0x5e59be(0x26a)]('idle'),this[_0x5e59be(0x22d)]();}};_0x2f66b7=_0x108d1e([_0x1fd8d0(0x2,_0x519061[_0x59c2ed(0x28b)]),_0x1fd8d0(0x3,(0x0,_0x519061[_0x59c2ed(0x261)])(_0x174c59)),_0x1fd8d0(0x4,_0x519061[_0x59c2ed(0x1a7)])],_0x2f66b7);function _0x27bd64(){const _0x4cccea=_0x59c2ed;let _0x31e6d6=(0x0,_0x25c441[_0x4cccea(0x22c)])(_0x1135f5),_0x1715be=(0x0,_0x25c441[_0x4cccea(0x22c)])(_0x519061[_0x4cccea(0x284)]),_0x112da9=(0x0,_0x25c441[_0x4cccea(0x236)])(()=>_0x1715be[_0x4cccea(0x254)](_0x519061[_0x4cccea(0x27b)][_0x4cccea(0x1bd)]),void 0x0,!0x1,[]),[_0x1cafdf,_0x279e46]=(0x0,_0x2b2a65['useState'])(null),[_0x2852e3,_0x3f2d04]=(0x0,_0x2b2a65[_0x4cccea(0x264)])(_0x4cccea(0x221)),_0x159459=(0x0,_0x2b2a65[_0x4cccea(0x267)])(null);return(0x0,_0x2b2a65['useEffect'])(()=>(_0x112da9&&_0x31e6d6[_0x4cccea(0x20a)](_0x112da9[_0x4cccea(0x1f0)]())[_0x4cccea(0x23b)](_0xbaae50=>{const _0x42caeb=_0x4cccea;_0x279e46(_0xbaae50),_0x159459[_0x42caeb(0x26d)]=_0xbaae50[_0x42caeb(0x220)][_0x42caeb(0x216)](_0x103d89=>{_0x3f2d04(_0x103d89);});}),()=>{const _0x44d8c3=_0x4cccea;var _0xe9eb69;(_0xe9eb69=_0x159459[_0x44d8c3(0x26d)])==null||_0xe9eb69[_0x44d8c3(0x22f)](),_0x159459['current']=null;}),[_0x112da9,_0x31e6d6]),_0x1cafdf?(0x0,_0xa8737[_0x4cccea(0x28f)])(_0x4a2312[_0x4cccea(0x1de)],{'align':_0x4cccea(0x21e),'disabled':_0x2852e3===_0x4cccea(0x1b9),'className':_0x4cccea(0x225),'overlay':(0x0,_0xa8737[_0x4cccea(0x28f)])(_0x5e8006,{'status':_0x2852e3,'coordinator':_0x1cafdf}),'children':(0x0,_0xa8737[_0x4cccea(0x28f)])(_0x4cccea(0x19a),{'className':(0x0,_0x4a2312['clsx'])(_0x4cccea(0x1f2),{'univer-cursor-not-allowed':_0x2852e3===_0x4cccea(0x1b9),'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x2852e3!==_0x4cccea(0x1b9)}),'type':'button','children':(0x0,_0xa8737[_0x4cccea(0x28f)])(_0x30c672,{'className':_0x4cccea(0x23c)})})}):null;}function _0x5e8006(_0x22898d){const _0x4baa9e=_0x59c2ed;let {status:_0x4fb7c4,coordinator:_0x531d10}=_0x22898d;switch(_0x4fb7c4){case _0x4baa9e(0x221):return(0x0,_0xa8737[_0x4baa9e(0x28f)])(_0x4fa07c,{'coordinator':_0x531d10});case _0x4baa9e(0x23e):return(0x0,_0xa8737['jsx'])(_0x4b4553,{'coordinator':_0x531d10});case _0x4baa9e(0x1ba):return(0x0,_0xa8737[_0x4baa9e(0x28f)])(_0xa8a1ec,{'coordinator':_0x531d10});case'offline':return(0x0,_0xa8737[_0x4baa9e(0x28f)])(_0x2bc691,{});case _0x4baa9e(0x1ca):return(0x0,_0xa8737['jsx'])(_0x13c11e,{'coordinator':_0x531d10});default:return null;}}function _0x4fa07c(_0x2d4bec){const _0x1c4196=_0x59c2ed;let {coordinator:_0x5416ac}=_0x2d4bec;return(0x0,_0xa8737[_0x1c4196(0x24b)])(_0xa8737[_0x1c4196(0x26f)],{'children':[(0x0,_0xa8737[_0x1c4196(0x28f)])('div',{'className':_0x1c4196(0x26e),'children':_0x1c4196(0x243)}),(0x0,_0xa8737[_0x1c4196(0x28f)])(_0x4a2312['Button'],{'onClick':()=>_0x5416ac[_0x1c4196(0x251)](),'children':_0x1c4196(0x1ed)})]});}function _0x4b4553(_0x1615d6){const _0x47ebd9=_0x59c2ed;let {coordinator:_0x203235}=_0x1615d6;return(0x0,_0xa8737[_0x47ebd9(0x24b)])(_0xa8737[_0x47ebd9(0x26f)],{'children':[(0x0,_0xa8737['jsx'])(_0x47ebd9(0x233),{'className':_0x47ebd9(0x26e),'children':_0x47ebd9(0x200)}),(0x0,_0xa8737[_0x47ebd9(0x28f)])(_0x4a2312[_0x47ebd9(0x228)],{'onClick':()=>_0x203235[_0x47ebd9(0x1fb)](),'children':_0x47ebd9(0x1a5)})]});}function _0xa8a1ec(_0x7286a){const _0x39d19b=_0x59c2ed;let {coordinator:_0x3f01a9}=_0x7286a;return(0x0,_0xa8737[_0x39d19b(0x24b)])(_0xa8737[_0x39d19b(0x26f)],{'children':[(0x0,_0xa8737[_0x39d19b(0x28f)])('div',{'className':_0x39d19b(0x26e),'children':_0x39d19b(0x1e0)}),(0x0,_0xa8737[_0x39d19b(0x28f)])(_0x4a2312[_0x39d19b(0x228)],{'variant':_0x39d19b(0x253),'onClick':()=>_0x3f01a9[_0x39d19b(0x26b)](),'children':_0x39d19b(0x209)})]});}function _0x13c11e(_0x46f568){const _0x57ba42=_0x59c2ed;let {coordinator:_0x104ba7}=_0x46f568;return(0x0,_0xa8737[_0x57ba42(0x24b)])(_0xa8737[_0x57ba42(0x26f)],{'children':[(0x0,_0xa8737[_0x57ba42(0x28f)])(_0x57ba42(0x233),{'className':_0x57ba42(0x26e),'children':_0x57ba42(0x1b8)}),(0x0,_0xa8737['jsx'])(_0x4a2312['Button'],{'variant':_0x57ba42(0x1dc),'onClick':()=>_0x104ba7[_0x57ba42(0x234)](),'children':_0x57ba42(0x1ea)})]});}function _0x2bc691(){const _0x3cc155=_0x59c2ed;return(0x0,_0xa8737[_0x3cc155(0x28f)])(_0xa8737[_0x3cc155(0x26f)],{'children':_0x3cc155(0x1a8)});}let _0xaaf350=class extends _0x519061['Disposable']{constructor(_0x5a4731,_0x199d5a){const _0x2dd12a=_0x59c2ed;super(),this[_0x2dd12a(0x218)]=_0x5a4731,this[_0x2dd12a(0x23f)]=_0x199d5a,this['_mountLiveShare']();}[_0x59c2ed(0x1cf)](){const _0x5889ec=_0x59c2ed;this[_0x5889ec(0x25f)](this[_0x5889ec(0x23f)]['registerComponent'](_0x25c441[_0x5889ec(0x272)][_0x5889ec(0x1b7)],()=>(0x0,_0x25c441[_0x5889ec(0x252)])(_0x27bd64,this[_0x5889ec(0x218)])));}};_0xaaf350=_0x108d1e([_0x1fd8d0(0x0,(0x0,_0x519061[_0x59c2ed(0x261)])(_0x519061[_0x59c2ed(0x217)])),_0x1fd8d0(0x1,_0x25c441[_0x59c2ed(0x286)])],_0xaaf350);var _0x5c21f2=_0x59c2ed(0x28d),_0x48e574=_0x59c2ed(0x1d9);let _0x254703=_0x59c2ed(0x24d);Symbol(_0x254703);let _0xe26486={},_0x508fe3=class extends _0x519061[_0x59c2ed(0x1ee)]{constructor(_0x4171cb){const _0x2394af=_0x59c2ed;super(),this[_0x2394af(0x273)]=_0x4171cb,this[_0x2394af(0x1b0)]();}[_0x59c2ed(0x1b0)](){const _0x5436b7=_0x59c2ed;[_0x2ae043[_0x5436b7(0x1f8)]['id'],_0x2ae043['SetScrollOperation']['id'],_0x228413[_0x5436b7(0x21b)]['id']][_0x5436b7(0x19e)](_0x12b041=>{const _0x2cb168=_0x5436b7;this[_0x2cb168(0x25f)](this['_liveShareService'][_0x2cb168(0x1a3)](_0x12b041));});}};_0x508fe3=_0x108d1e([_0x1fd8d0(0x0,(0x0,_0x519061[_0x59c2ed(0x261)])(_0x174c59))],_0x508fe3);let _0x1c752c=class extends _0x519061['Plugin']{constructor(_0x41664e=_0xe26486,_0x3b216e,_0x41cbfe){const _0x5b6780=_0x59c2ed;super(),this['_config']=_0x41664e,this[_0x5b6780(0x218)]=_0x3b216e,this[_0x5b6780(0x290)]=_0x41cbfe;let {..._0x31dca8}=(0x0,_0x519061['merge'])({},_0xe26486,this[_0x5b6780(0x1b1)]);this[_0x5b6780(0x290)][_0x5b6780(0x213)](_0x254703,_0x31dca8);}[_0x59c2ed(0x22e)](){const _0x54810b=_0x59c2ed;(0x0,_0x519061[_0x54810b(0x28a)])(this[_0x54810b(0x218)],(0x0,_0x519061[_0x54810b(0x1c9)])([[_0x174c59],[_0x1135f5],[_0x508fe3],[_0xaaf350]],this[_0x54810b(0x1b1)][_0x54810b(0x1bf)])),(0x0,_0x519061[_0x54810b(0x269)])(this['_injector'],[[_0x508fe3]]);}[_0x59c2ed(0x245)](){const _0xd09b02=_0x59c2ed;(0x0,_0x519061[_0xd09b02(0x269)])(this[_0xd09b02(0x218)],[[_0xaaf350]]);}};_0xbed16a(_0x1c752c,'type',_0x519061[_0x59c2ed(0x27b)][_0x59c2ed(0x211)]),_0xbed16a(_0x1c752c,_0x59c2ed(0x1c6),_0x59c2ed(0x285)),_0xbed16a(_0x1c752c,_0x59c2ed(0x244),_0x5c21f2),_0xbed16a(_0x1c752c,'version',_0x48e574),_0x1c752c=_0x108d1e([(0x0,_0x519061['DependentOn'])(_0x33e94a['UniverCollaborationClientPlugin']),_0x1fd8d0(0x1,(0x0,_0x519061[_0x59c2ed(0x261)])(_0x519061[_0x59c2ed(0x217)])),_0x1fd8d0(0x2,_0x519061[_0x59c2ed(0x28b)])],_0x1c752c),Object['defineProperty'](_0x5de352,_0x59c2ed(0x281),{'enumerable':!0x0,'get':function(){return _0xaaf350;}}),_0x5de352[_0x59c2ed(0x231)]=_0x27bd64,Object['defineProperty'](_0x5de352,_0x59c2ed(0x1d5),{'enumerable':!0x0,'get':function(){return _0x1135f5;}}),Object[_0x59c2ed(0x1c0)](_0x5de352,_0x59c2ed(0x1b2),{'enumerable':!0x0,'get':function(){return _0x2f66b7;}}),_0x5de352[_0x59c2ed(0x21c)]=_0x174c59,_0x5de352[_0x59c2ed(0x1fc)]=_0x2a5ccc,Object[_0x59c2ed(0x1c0)](_0x5de352,_0x59c2ed(0x20f),{'enumerable':!0x0,'get':function(){return _0x1c752c;}});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/live-share",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0-insiders.20260522-e8f2a3b",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Live share collaboration plugin for Univer Pro.",
|
|
6
6
|
"author": "DreamNum Co., Ltd. <developer@univer.ai>",
|
|
@@ -62,24 +62,24 @@
|
|
|
62
62
|
"rxjs": ">=7.0.0"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@univerjs/icons": "
|
|
66
|
-
"@univerjs/
|
|
67
|
-
"@univerjs/
|
|
68
|
-
"@univerjs
|
|
69
|
-
"@univerjs
|
|
70
|
-
"@univerjs/
|
|
71
|
-
"@univerjs/
|
|
72
|
-
"@univerjs/sheets": "0.
|
|
65
|
+
"@univerjs/icons": "1.3.0",
|
|
66
|
+
"@univerjs-pro/collaboration": "0.23.0-insiders.20260522-e8f2a3b",
|
|
67
|
+
"@univerjs-pro/collaboration-client": "0.23.0-insiders.20260522-e8f2a3b",
|
|
68
|
+
"@univerjs/core": "0.23.0-insiders.20260522-e8f2a3b",
|
|
69
|
+
"@univerjs/ui": "0.23.0-insiders.20260522-e8f2a3b",
|
|
70
|
+
"@univerjs/design": "0.23.0-insiders.20260522-e8f2a3b",
|
|
71
|
+
"@univerjs/sheets": "0.23.0-insiders.20260522-e8f2a3b",
|
|
72
|
+
"@univerjs/sheets-ui": "0.23.0-insiders.20260522-e8f2a3b"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
|
-
"postcss": "^8.5.
|
|
75
|
+
"postcss": "^8.5.14",
|
|
76
76
|
"react": "18.3.1",
|
|
77
77
|
"rxjs": "7.8.2",
|
|
78
78
|
"tailwindcss": "^3.4.17",
|
|
79
79
|
"typescript": "^6.0.3",
|
|
80
|
-
"vitest": "^4.1.
|
|
81
|
-
"@univerjs-infra/shared": "0.
|
|
82
|
-
"@univerjs/protocol": "0.
|
|
80
|
+
"vitest": "^4.1.6",
|
|
81
|
+
"@univerjs-infra/shared": "0.23.0",
|
|
82
|
+
"@univerjs/protocol": "0.23.0-insiders.20260522-e8f2a3b"
|
|
83
83
|
},
|
|
84
84
|
"scripts": {
|
|
85
85
|
"test": "vitest run",
|