@univerjs-pro/live-share 0.20.1 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/facade.js CHANGED
@@ -1 +1 @@
1
- const _0x571440=_0x3ff6;(function(_0x2a305e,_0xe182ce){const _0x1af70d=_0x3ff6,_0x1ad53c=_0x2a305e();while(!![]){try{const _0x96a389=parseInt(_0x1af70d(0x16c))/0x1+-parseInt(_0x1af70d(0x170))/0x2*(parseInt(_0x1af70d(0x16b))/0x3)+-parseInt(_0x1af70d(0x17b))/0x4+-parseInt(_0x1af70d(0x16e))/0x5*(-parseInt(_0x1af70d(0x186))/0x6)+parseInt(_0x1af70d(0x171))/0x7*(parseInt(_0x1af70d(0x188))/0x8)+parseInt(_0x1af70d(0x181))/0x9*(parseInt(_0x1af70d(0x18a))/0xa)+parseInt(_0x1af70d(0x162))/0xb*(-parseInt(_0x1af70d(0x17f))/0xc);if(_0x96a389===_0xe182ce)break;else _0x1ad53c['push'](_0x1ad53c['shift']());}catch(_0x34d7a3){_0x1ad53c['push'](_0x1ad53c['shift']());}}}(_0x5ccb,0xbbc19));function _0x3ff6(_0x2f37ee,_0x1b60b9){_0x2f37ee=_0x2f37ee-0x161;const _0x5ccb27=_0x5ccb();let _0x3ff657=_0x5ccb27[_0x2f37ee];return _0x3ff657;}function _0x5ccb(){const _0x38727d=['defineProperty','startFollowing','_liveShareController','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','LiveShareStatusEnum','IUniverInstanceService','tryStartPresenting','3436764snMjEW','string','UniverInstanceType','No\x20active\x20workbook\x20found.','2336244tBLslO','getCurrentUnitOfType','45jFhFBD','symbol','get','FUniver','getLiveShareCoordinatorSync','6UkLJfd','_initialize','2952208dXRKSv','_injector','3056620BsxMdv','prototype','No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.','11tFjEiB','LiveShareStatus','stopPresenting','FEnum','getUnitId','startPresenting','function','getStatus','call','6GIJyFM','27910imrIkF','UNIVER_SHEET','2570195awRXKs','stopFollowing','616358CrXWqD','7PhOlGY','iterator','constructor'];_0x5ccb=function(){return _0x38727d;};return _0x5ccb();}let e=require(`@univerjs-pro/live-share`),t=require(`@univerjs/core`),n=require(`@univerjs/core/facade`);function r(_0x2314de){'@babel/helpers - typeof';const _0x46f434=_0x3ff6;return r=typeof Symbol==_0x46f434(0x168)&&typeof Symbol[_0x46f434(0x172)]==_0x46f434(0x182)?function(_0x23da4c){return typeof _0x23da4c;}:function(_0x4871ef){const _0x5bd48d=_0x46f434;return _0x4871ef&&typeof Symbol==_0x5bd48d(0x168)&&_0x4871ef[_0x5bd48d(0x173)]===Symbol&&_0x4871ef!==Symbol[_0x5bd48d(0x18b)]?_0x5bd48d(0x182):typeof _0x4871ef;},r(_0x2314de);}function i(_0x441892,_0x2ea6fa){const _0x5ec59e=_0x3ff6;if(r(_0x441892)!='object'||!_0x441892)return _0x441892;var _0x3f586d=_0x441892[Symbol['toPrimitive']];if(_0x3f586d!==void 0x0){var _0x214a67=_0x3f586d[_0x5ec59e(0x16a)](_0x441892,_0x2ea6fa||'default');if(r(_0x214a67)!='object')return _0x214a67;throw TypeError(_0x5ec59e(0x177));}return(_0x2ea6fa===_0x5ec59e(0x17c)?String:Number)(_0x441892);}function a(_0x1a854e){const _0x35c20a=_0x3ff6;var _0x1b7224=i(_0x1a854e,_0x35c20a(0x17c));return r(_0x1b7224)==_0x35c20a(0x182)?_0x1b7224:_0x1b7224+'';}function o(_0x25e177,_0x4dd796,_0x5d885e){const _0x4dca45=_0x3ff6;return(_0x4dd796=a(_0x4dd796))in _0x25e177?Object[_0x4dca45(0x174)](_0x25e177,_0x4dd796,{'value':_0x5d885e,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x25e177[_0x4dd796]=_0x5d885e,_0x25e177;}var s=class extends n['FUniver']{constructor(..._0x5d423e){super(..._0x5d423e),o(this,'_liveShareController',void 0x0);}[_0x571440(0x187)](_0x230f72){const _0x2c4159=_0x571440;this[_0x2c4159(0x176)]=_0x230f72[_0x2c4159(0x183)](e['LiveShareController']);}['getLiveShareStatus'](){const _0x215202=_0x571440;var _0x56ea56;let _0x5c154d=this[_0x215202(0x189)][_0x215202(0x183)](t[_0x215202(0x179)])[_0x215202(0x180)](t['UniverInstanceType'][_0x215202(0x16d)]);if(!_0x5c154d)throw Error(_0x215202(0x17e));let _0x5c9f94=_0x5c154d['getUnitId'](),_0xfba247=this[_0x215202(0x176)][_0x215202(0x185)](_0x5c9f94);return(_0x56ea56=_0xfba247==null?void 0x0:_0xfba247[_0x215202(0x169)]())==null?e['LiveShareStatus']['IDLE']:_0x56ea56;}[_0x571440(0x175)](){const _0x252db4=_0x571440;let _0x472724=this[_0x252db4(0x189)]['get'](t['IUniverInstanceService'])['getCurrentUnitOfType'](t['UniverInstanceType']['UNIVER_SHEET']);if(!_0x472724)throw Error(_0x252db4(0x17e));let _0xa2bd69=_0x472724[_0x252db4(0x166)](),_0x4b7de7=this[_0x252db4(0x176)]['getLiveShareCoordinatorSync'](_0xa2bd69);if(!_0x4b7de7)throw Error(_0x252db4(0x161));_0x4b7de7['startFollowing']();}[_0x571440(0x16f)](){const _0x365f91=_0x571440;let _0x5ab104=this[_0x365f91(0x189)][_0x365f91(0x183)](t[_0x365f91(0x179)])[_0x365f91(0x180)](t[_0x365f91(0x17d)][_0x365f91(0x16d)]);if(!_0x5ab104)throw Error('No\x20active\x20workbook\x20found.');let _0x47ced1=_0x5ab104['getUnitId'](),_0x34a173=this[_0x365f91(0x176)]['getLiveShareCoordinatorSync'](_0x47ced1);if(!_0x34a173)throw Error(_0x365f91(0x161));_0x34a173[_0x365f91(0x16f)]();}[_0x571440(0x167)](){const _0x271624=_0x571440;let _0x37c616=this['_injector']['get'](t[_0x271624(0x179)])['getCurrentUnitOfType'](t[_0x271624(0x17d)][_0x271624(0x16d)]);if(!_0x37c616)throw Error(_0x271624(0x17e));let _0x3f9e68=_0x37c616[_0x271624(0x166)](),_0x4b96b4=this[_0x271624(0x176)]['getLiveShareCoordinatorSync'](_0x3f9e68);if(!_0x4b96b4)throw Error(_0x271624(0x161));_0x4b96b4[_0x271624(0x17a)]();}[_0x571440(0x164)](){const _0xb3a108=_0x571440;let _0x4ea933=this[_0xb3a108(0x189)][_0xb3a108(0x183)](t[_0xb3a108(0x179)])[_0xb3a108(0x180)](t[_0xb3a108(0x17d)][_0xb3a108(0x16d)]);if(!_0x4ea933)throw Error(_0xb3a108(0x17e));let _0x3d3b0d=_0x4ea933[_0xb3a108(0x166)](),_0x542f19=this['_liveShareController']['getLiveShareCoordinatorSync'](_0x3d3b0d);if(!_0x542f19)throw Error(_0xb3a108(0x161));_0x542f19[_0xb3a108(0x164)]();}};n[_0x571440(0x184)]['extend'](s);var c=class extends n[_0x571440(0x165)]{get[_0x571440(0x178)](){const _0x3e77d3=_0x571440;return e[_0x3e77d3(0x163)];}};n[_0x571440(0x165)]['extend'](c);
1
+ function _0x830c(){const _0x29865b=['IUniverInstanceService','77060IlRPst','string','defineProperty','stopFollowing','IDLE','UniverInstanceType','63kwYCvK','function','No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.','getStatus','No\x20active\x20workbook\x20found.','_liveShareController','1LRgOel','object','startFollowing','1086gfStph','4839160RXzPYB','LiveShareStatus','prototype','UNIVER_SHEET','getCurrentUnitOfType','FUniver','61916WXSKZB','2735674ecnZoz','LiveShareController','getLiveShareCoordinatorSync','tryStartPresenting','constructor','stopPresenting','21812593gyaOgD','LiveShareStatusEnum','_injector','symbol','15540jQIFjF','549EnPpuX','startPresenting','toPrimitive','extend','getUnitId','get','4051089VckLOC','FEnum','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','getLiveShareStatus','default'];_0x830c=function(){return _0x29865b;};return _0x830c();}const _0x3f9cb2=_0x54ac;function _0x54ac(_0x2ea5bb,_0x2a3ef7){_0x2ea5bb=_0x2ea5bb-0xde;const _0x830c11=_0x830c();let _0x54acf6=_0x830c11[_0x2ea5bb];return _0x54acf6;}(function(_0x2fb6a4,_0x5be36b){const _0x1f207f=_0x54ac,_0x450d3f=_0x2fb6a4();while(!![]){try{const _0x37065d=-parseInt(_0x1f207f(0xe9))/0x1*(-parseInt(_0x1f207f(0xf4))/0x2)+-parseInt(_0x1f207f(0xe3))/0x3*(-parseInt(_0x1f207f(0xf3))/0x4)+-parseInt(_0x1f207f(0xfe))/0x5*(-parseInt(_0x1f207f(0xec))/0x6)+parseInt(_0x1f207f(0x105))/0x7+-parseInt(_0x1f207f(0xed))/0x8+parseInt(_0x1f207f(0xff))/0x9*(parseInt(_0x1f207f(0x10b))/0xa)+-parseInt(_0x1f207f(0xfa))/0xb;if(_0x37065d===_0x5be36b)break;else _0x450d3f['push'](_0x450d3f['shift']());}catch(_0x52a566){_0x450d3f['push'](_0x450d3f['shift']());}}}(_0x830c,0xaee5b));let _univerjs_pro_live_share=require('@univerjs-pro/live-share'),_univerjs_core=require('@univerjs/core'),_univerjs_core_facade=require('@univerjs/core/facade');function _typeof(_0x50dd66){'@babel/helpers - typeof';const _0x3f2723=_0x54ac;return _typeof='function'==typeof Symbol&&_0x3f2723(0xfd)==typeof Symbol['iterator']?function(_0x437e6c){return typeof _0x437e6c;}:function(_0x3f995b){const _0x72d561=_0x3f2723;return _0x3f995b&&_0x72d561(0xe4)==typeof Symbol&&_0x3f995b[_0x72d561(0xf8)]===Symbol&&_0x3f995b!==Symbol[_0x72d561(0xef)]?_0x72d561(0xfd):typeof _0x3f995b;},_typeof(_0x50dd66);}function toPrimitive(_0x24cf79,_0x3460f0){const _0x4aacf8=_0x54ac;if(_0x4aacf8(0xea)!=_typeof(_0x24cf79)||!_0x24cf79)return _0x24cf79;var _0x29339c=_0x24cf79[Symbol[_0x4aacf8(0x101)]];if(void 0x0!==_0x29339c){var _0x3f28a5=_0x29339c['call'](_0x24cf79,_0x3460f0||_0x4aacf8(0x109));if(_0x4aacf8(0xea)!=_typeof(_0x3f28a5))return _0x3f28a5;throw new TypeError(_0x4aacf8(0x107));}return(_0x4aacf8(0xde)===_0x3460f0?String:Number)(_0x24cf79);}function toPropertyKey(_0xda1350){const _0xe9cf26=_0x54ac;var _0x1d8520=toPrimitive(_0xda1350,_0xe9cf26(0xde));return'symbol'==_typeof(_0x1d8520)?_0x1d8520:_0x1d8520+'';}function _defineProperty(_0x5d5c81,_0x1914c7,_0x40303f){const _0x3818bf=_0x54ac;return(_0x1914c7=toPropertyKey(_0x1914c7))in _0x5d5c81?Object[_0x3818bf(0xdf)](_0x5d5c81,_0x1914c7,{'value':_0x40303f,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x5d5c81[_0x1914c7]=_0x40303f,_0x5d5c81;}var FUniverLiveShareMixin=class extends _univerjs_core_facade[_0x3f9cb2(0xf2)]{constructor(..._0x435765){const _0x14e40b=_0x3f9cb2;super(..._0x435765),_defineProperty(this,_0x14e40b(0xe8),void 0x0);}['_initialize'](_0xca6a57){const _0x388328=_0x3f9cb2;this['_liveShareController']=_0xca6a57['get'](_univerjs_pro_live_share[_0x388328(0xf5)]);}[_0x3f9cb2(0x108)](){const _0x171981=_0x3f9cb2;var _0x6ad6f6;const _0x3cb193=this[_0x171981(0xfc)][_0x171981(0x104)](_univerjs_core['IUniverInstanceService'])[_0x171981(0xf1)](_univerjs_core[_0x171981(0xe2)][_0x171981(0xf0)]);if(!_0x3cb193)throw new Error(_0x171981(0xe7));const _0x1bd4b6=_0x3cb193['getUnitId'](),_0x48fbf4=this[_0x171981(0xe8)][_0x171981(0xf6)](_0x1bd4b6);return(_0x6ad6f6=_0x48fbf4===null||_0x48fbf4===void 0x0?void 0x0:_0x48fbf4[_0x171981(0xe6)]())!==null&&_0x6ad6f6!==void 0x0?_0x6ad6f6:_univerjs_pro_live_share['LiveShareStatus'][_0x171981(0xe1)];}[_0x3f9cb2(0xeb)](){const _0x1f0a4b=_0x3f9cb2,_0x555c63=this[_0x1f0a4b(0xfc)][_0x1f0a4b(0x104)](_univerjs_core[_0x1f0a4b(0x10a)])[_0x1f0a4b(0xf1)](_univerjs_core[_0x1f0a4b(0xe2)][_0x1f0a4b(0xf0)]);if(!_0x555c63)throw new Error(_0x1f0a4b(0xe7));const _0x5056a3=_0x555c63['getUnitId'](),_0x56d88b=this[_0x1f0a4b(0xe8)]['getLiveShareCoordinatorSync'](_0x5056a3);if(!_0x56d88b)throw new Error(_0x1f0a4b(0xe5));_0x56d88b['startFollowing']();}['stopFollowing'](){const _0x128f50=_0x3f9cb2,_0x4b2561=this[_0x128f50(0xfc)][_0x128f50(0x104)](_univerjs_core[_0x128f50(0x10a)])[_0x128f50(0xf1)](_univerjs_core[_0x128f50(0xe2)][_0x128f50(0xf0)]);if(!_0x4b2561)throw new Error(_0x128f50(0xe7));const _0x5553d9=_0x4b2561['getUnitId'](),_0x456f0f=this[_0x128f50(0xe8)][_0x128f50(0xf6)](_0x5553d9);if(!_0x456f0f)throw new Error(_0x128f50(0xe5));_0x456f0f[_0x128f50(0xe0)]();}[_0x3f9cb2(0x100)](){const _0x25cec7=_0x3f9cb2,_0x552a58=this[_0x25cec7(0xfc)][_0x25cec7(0x104)](_univerjs_core['IUniverInstanceService'])[_0x25cec7(0xf1)](_univerjs_core[_0x25cec7(0xe2)][_0x25cec7(0xf0)]);if(!_0x552a58)throw new Error(_0x25cec7(0xe7));const _0x24dd4a=_0x552a58[_0x25cec7(0x103)](),_0x4a8952=this[_0x25cec7(0xe8)][_0x25cec7(0xf6)](_0x24dd4a);if(!_0x4a8952)throw new Error(_0x25cec7(0xe5));_0x4a8952[_0x25cec7(0xf7)]();}['stopPresenting'](){const _0x34ea3c=_0x3f9cb2,_0x2b2f1c=this['_injector'][_0x34ea3c(0x104)](_univerjs_core[_0x34ea3c(0x10a)])[_0x34ea3c(0xf1)](_univerjs_core[_0x34ea3c(0xe2)]['UNIVER_SHEET']);if(!_0x2b2f1c)throw new Error('No\x20active\x20workbook\x20found.');const _0x2fd919=_0x2b2f1c[_0x34ea3c(0x103)](),_0x599e9d=this[_0x34ea3c(0xe8)][_0x34ea3c(0xf6)](_0x2fd919);if(!_0x599e9d)throw new Error('No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.');_0x599e9d[_0x34ea3c(0xf9)]();}};_univerjs_core_facade[_0x3f9cb2(0xf2)][_0x3f9cb2(0x102)](FUniverLiveShareMixin);var FLiveShareEnumMixin=class extends _univerjs_core_facade[_0x3f9cb2(0x106)]{get[_0x3f9cb2(0xfb)](){const _0x10f909=_0x3f9cb2;return _univerjs_pro_live_share[_0x10f909(0xee)];}};_univerjs_core_facade[_0x3f9cb2(0x106)][_0x3f9cb2(0x102)](FLiveShareEnumMixin);
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- const _0xda8eac=_0x1a22;(function(_0x6d52af,_0x2f7714){const _0x137e79=_0x1a22,_0x47c63e=_0x6d52af();while(!![]){try{const _0x4e0650=parseInt(_0x137e79(0xfc))/0x1+-parseInt(_0x137e79(0x125))/0x2+parseInt(_0x137e79(0x128))/0x3*(-parseInt(_0x137e79(0x130))/0x4)+parseInt(_0x137e79(0xb2))/0x5*(-parseInt(_0x137e79(0x11b))/0x6)+-parseInt(_0x137e79(0x148))/0x7+parseInt(_0x137e79(0xce))/0x8+parseInt(_0x137e79(0x15e))/0x9;if(_0x4e0650===_0x2f7714)break;else _0x47c63e['push'](_0x47c63e['shift']());}catch(_0x55427e){_0x47c63e['push'](_0x47c63e['shift']());}}}(_0x45ad,0x50a92),Object[_0xda8eac(0xe4)](exports,Symbol[_0xda8eac(0xfa)],{'value':_0xda8eac(0xa5)}));function _0x1a22(_0x280fb2,_0x2bff29){_0x280fb2=_0x280fb2-0x9e;const _0x45ad1b=_0x45ad();let _0x1a2256=_0x45ad1b[_0x280fb2];return _0x1a2256;}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(_0x43e469){'@babel/helpers - typeof';const _0x17bef8=_0xda8eac;return f=typeof Symbol=='function'&&typeof Symbol[_0x17bef8(0x154)]=='symbol'?function(_0x3aa5f0){return typeof _0x3aa5f0;}:function(_0xb83120){const _0xb3b4d4=_0x17bef8;return _0xb83120&&typeof Symbol==_0xb3b4d4(0x10c)&&_0xb83120[_0xb3b4d4(0x146)]===Symbol&&_0xb83120!==Symbol[_0xb3b4d4(0xc8)]?_0xb3b4d4(0xa2):typeof _0xb83120;},f(_0x43e469);}function p(_0x58c8e2,_0x30c885){const _0x4077ab=_0xda8eac;if(f(_0x58c8e2)!=_0x4077ab(0xeb)||!_0x58c8e2)return _0x58c8e2;var _0x284879=_0x58c8e2[Symbol['toPrimitive']];if(_0x284879!==void 0x0){var _0x41408=_0x284879[_0x4077ab(0x136)](_0x58c8e2,_0x30c885||_0x4077ab(0xf2));if(f(_0x41408)!=_0x4077ab(0xeb))return _0x41408;throw TypeError(_0x4077ab(0xd0));}return(_0x30c885===_0x4077ab(0x108)?String:Number)(_0x58c8e2);}function m(_0x1cc493){const _0x42c543=_0xda8eac;var _0x2c0bcc=p(_0x1cc493,'string');return f(_0x2c0bcc)==_0x42c543(0xa2)?_0x2c0bcc:_0x2c0bcc+'';}function h(_0xeb8d12,_0xd5de92,_0x5c9423){const _0x12e766=_0xda8eac;return(_0xd5de92=m(_0xd5de92))in _0xeb8d12?Object[_0x12e766(0xe4)](_0xeb8d12,_0xd5de92,{'value':_0x5c9423,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0xeb8d12[_0xd5de92]=_0x5c9423,_0xeb8d12;}var g=class extends e[_0xda8eac(0xbb)]{constructor(..._0x4166da){const _0x5cd878=_0xda8eac;super(..._0x4166da),h(this,_0x5cd878(0x13b),new Set()),h(this,'_reporters',new Set());}[_0xda8eac(0xb7)](_0x3a6d0b){const _0x4b6938=_0xda8eac;return this[_0x4b6938(0x13b)][_0x4b6938(0xc5)](_0x3a6d0b),(0x0,e[_0x4b6938(0x153)])(()=>this[_0x4b6938(0x13b)]['delete'](_0x3a6d0b));}['registerInitialStateReporter'](_0x1b1a53){const _0x522d01=_0xda8eac;return this[_0x522d01(0xf6)][_0x522d01(0xc5)](_0x1b1a53),(0x0,e[_0x522d01(0x153)])(()=>this[_0x522d01(0xf6)][_0x522d01(0x118)](_0x1b1a53));}[_0xda8eac(0x139)](_0x1bd53a){return this['_sharedOperations']['has'](_0x1bd53a);}[_0xda8eac(0xed)](_0x5a6cc7){const _0x31aff2=_0xda8eac;return Array[_0x31aff2(0xc1)](this['_reporters'])[_0x31aff2(0xb6)](_0x4584e0=>_0x4584e0(_0x5a6cc7));}};function _(_0xe7d615,_0x17b526){return function(_0x2675ea,_0x4b8a97){_0x17b526(_0x2675ea,_0x4b8a97,_0xe7d615);};}function v(_0x4a4e60,_0x25c9ae,_0x16323e,_0x59064b){const _0x4d83ef=_0xda8eac;var _0x126fce=arguments[_0x4d83ef(0xe2)],_0x2bec77=_0x126fce<0x3?_0x25c9ae:_0x59064b===null?_0x59064b=Object[_0x4d83ef(0x137)](_0x25c9ae,_0x16323e):_0x59064b,_0x3b98af;if(typeof Reflect==_0x4d83ef(0xeb)&&typeof Reflect[_0x4d83ef(0x14d)]=='function')_0x2bec77=Reflect[_0x4d83ef(0x14d)](_0x4a4e60,_0x25c9ae,_0x16323e,_0x59064b);else{for(var _0x2bb444=_0x4a4e60[_0x4d83ef(0xe2)]-0x1;_0x2bb444>=0x0;_0x2bb444--)(_0x3b98af=_0x4a4e60[_0x2bb444])&&(_0x2bec77=(_0x126fce<0x3?_0x3b98af(_0x2bec77):_0x126fce>0x3?_0x3b98af(_0x25c9ae,_0x16323e,_0x2bec77):_0x3b98af(_0x25c9ae,_0x16323e))||_0x2bec77);}return _0x126fce>0x3&&_0x2bec77&&Object[_0x4d83ef(0xe4)](_0x25c9ae,_0x16323e,_0x2bec77),_0x2bec77;}let y=class extends e[_0xda8eac(0x12b)]{constructor(_0x572d73,_0x16057e,_0x130f80){const _0x2ff4ea=_0xda8eac;super(),this['_univerInstanceService']=_0x572d73,this['_injector']=_0x16057e,this['_collabSessionService']=_0x130f80,h(this,_0x2ff4ea(0x135),new Map()),this[_0x2ff4ea(0x13e)]();}async[_0xda8eac(0xd6)](_0x3162aa){const _0x29f423=_0xda8eac;return this[_0x29f423(0x135)]['has'](_0x3162aa)||await this[_0x29f423(0x10e)](_0x3162aa),this[_0x29f423(0x135)][_0x29f423(0xa4)](_0x3162aa);}[_0xda8eac(0xa7)](_0x3ed3a9){const _0x2584bb=_0xda8eac;var _0x4def8e;return(_0x4def8e=this[_0x2584bb(0x135)][_0x2584bb(0xa4)](_0x3ed3a9))==null?null:_0x4def8e;}[_0xda8eac(0x13e)](){const _0x58ebc7=_0xda8eac;this[_0x58ebc7(0xda)][_0x58ebc7(0x113)](e[_0x58ebc7(0xea)]['UNIVER_SHEET'])['pipe']((0x0,l['takeUntil'])(this['dispose$']))[_0x58ebc7(0xac)](async _0x589c81=>{const _0x444feb=_0x58ebc7;let _0x196bb0=_0x589c81[_0x444feb(0xef)]();this[_0x444feb(0x135)][_0x444feb(0xd2)](_0x196bb0)||this['_startLiveShareCoordinator'](_0x196bb0);}),this['_univerInstanceService'][_0x58ebc7(0x156)](e[_0x58ebc7(0xea)]['UNIVER_SHEET'])[_0x58ebc7(0xbd)]((0x0,l['takeUntil'])(this['dispose$']))[_0x58ebc7(0xac)](_0x4be0e0=>{const _0x236af4=_0x58ebc7;let _0xdb2097=_0x4be0e0[_0x236af4(0xef)](),_0x393024=this[_0x236af4(0x135)][_0x236af4(0xa4)](_0xdb2097);_0x393024==null||_0x393024[_0x236af4(0xa6)]();});}async['_startLiveShareCoordinator'](_0x1fa5ec){const _0x125816=_0xda8eac;let _0x671d7b=await this[_0x125816(0x131)][_0x125816(0xf0)](_0x1fa5ec),_0x3404e5=this[_0x125816(0x115)][_0x125816(0x9f)](x,_0x1fa5ec,_0x671d7b);return _0x3404e5['init'](),this[_0x125816(0x135)][_0x125816(0x15b)](_0x1fa5ec,_0x3404e5),_0x3404e5;}};y=v([_(0x0,e[_0xda8eac(0x114)]),_(0x1,(0x0,e[_0xda8eac(0xe8)])(e[_0xda8eac(0xd1)])),_(0x2,(0x0,e[_0xda8eac(0xe8)])(o['CollaborationSessionService']))],y);let b=function(_0x421547){const _0x52d6ea=_0xda8eac;return _0x421547[_0x52d6ea(0x120)]=_0x52d6ea(0xb8),_0x421547['IDLE']=_0x52d6ea(0xd4),_0x421547[_0x52d6ea(0xe5)]=_0x52d6ea(0xe6),_0x421547[_0x52d6ea(0x13c)]='not-following',_0x421547[_0x52d6ea(0xe0)]=_0x52d6ea(0x13f),_0x421547;}({}),x=class extends e[_0xda8eac(0x12b)]{get[_0xda8eac(0xa9)](){const _0x148ad0=_0xda8eac;return this[_0x148ad0(0x117)]['getValue']();}constructor(_0x2aa576,_0x436acf,_0x5703f8,_0x326caa,_0x75bbd3){const _0x10f3b8=_0xda8eac;super(),this[_0x10f3b8(0xad)]=_0x2aa576,this[_0x10f3b8(0xdc)]=_0x436acf,this[_0x10f3b8(0xfe)]=_0x5703f8,this['_liveShareService']=_0x326caa,this[_0x10f3b8(0xc4)]=_0x75bbd3,h(this,_0x10f3b8(0x117),new c[(_0x10f3b8(0x107))](b[_0x10f3b8(0x12c)])),h(this,_0x10f3b8(0xa0),this[_0x10f3b8(0x117)]['asObservable']()),h(this,_0x10f3b8(0x13e),!0x1),h(this,'_commandDisposable',null),h(this,_0x10f3b8(0x112),null);}[_0xda8eac(0xa6)](){const _0x89a4a0=_0xda8eac;var _0x237f51;(_0x237f51=this['_commandDisposable'])==null||_0x237f51[_0x89a4a0(0xa6)](),this['_status$']['next'](b[_0x89a4a0(0x12c)]),this['_status$'][_0x89a4a0(0x13d)]();}[_0xda8eac(0x14b)](){return this['_status'];}[_0xda8eac(0x100)](){const _0x57b099=_0xda8eac;this[_0x57b099(0x13e)]||(this['_init']=!0x0,this['_collabSession'][_0x57b099(0x11d)][_0x57b099(0xbd)]((0x0,l['takeUntil'])(this[_0x57b099(0xb4)]))[_0x57b099(0xac)](_0x984174=>{const _0x1cb40d=_0x57b099;switch(_0x984174){case o[_0x1cb40d(0xca)][_0x1cb40d(0x120)]:this[_0x1cb40d(0x134)]();break;case o['SessionStatus'][_0x1cb40d(0xd7)]:this[_0x1cb40d(0xf5)]();break;default:}}),this[_0x57b099(0xdc)][_0x57b099(0xc7)][_0x57b099(0xbd)]((0x0,l[_0x57b099(0xf4)])(this['dispose$']))[_0x57b099(0xac)](_0x1e4532=>{const _0x2ec7b9=_0x57b099;let {eventID:_0x52a855}=_0x1e4532;switch(_0x52a855){case a[_0x2ec7b9(0x11e)]['LIVESHARE_NEW_HOST']:this[_0x2ec7b9(0xcb)](_0x1e4532);break;case a[_0x2ec7b9(0x11e)]['LIVESHARE_OPERATION']:this[_0x2ec7b9(0xa8)](_0x1e4532);break;case a[_0x2ec7b9(0x11e)][_0x2ec7b9(0x15a)]:this[_0x2ec7b9(0x160)]();break;case a['CollaborationEvent']['NEW_CHANGESETS']:this[_0x2ec7b9(0xde)](_0x1e4532);break;default:}}));}[_0xda8eac(0x103)](){const _0x417fd3=_0xda8eac;this['_collabSession'][_0x417fd3(0xdd)]({'eventID':a[_0x417fd3(0x11e)][_0x417fd3(0x12d)],'data':{'unitID':this[_0x417fd3(0xad)],'userID':this['_collabSession']['getMemberID']()}},this[_0x417fd3(0xad)]);}[_0xda8eac(0xd9)](){const _0x54711e=_0xda8eac;this[_0x54711e(0xa9)]===b[_0x54711e(0xe0)]&&(this[_0x54711e(0x117)]['next'](b['IDLE']),this[_0x54711e(0xdc)][_0x54711e(0xdd)]({'eventID':a[_0x54711e(0x11e)][_0x54711e(0x15a)],'data':{'unitID':this[_0x54711e(0xad)]}},this[_0x54711e(0xad)]));}[_0xda8eac(0x127)](){const _0x48891a=_0xda8eac;this[_0x48891a(0xa9)]===b[_0x48891a(0x13c)]&&(this[_0x48891a(0x117)][_0x48891a(0xff)](b[_0x48891a(0xe5)]),this[_0x48891a(0x9e)]());}['stopFollowing'](){const _0x5dccae=_0xda8eac;this[_0x5dccae(0xa9)]===b[_0x5dccae(0xe5)]&&this[_0x5dccae(0xe9)]();}[_0xda8eac(0xcb)](_0x111c8d){const _0x183c4f=_0xda8eac;let {presenter:_0x3617e1}=_0x111c8d[_0x183c4f(0x12f)],_0x5ce565=this[_0x183c4f(0xdc)][_0x183c4f(0x145)]();this['_presenter']=_0x3617e1,_0x3617e1===_0x5ce565?(this[_0x183c4f(0xe9)](),this[_0x183c4f(0x109)]()):this[_0x183c4f(0xa9)]!==b[_0x183c4f(0x13c)]&&(this['_stopPresenting'](),this['_startFollowing']());}[_0xda8eac(0x102)](){const _0x5dcbdd=_0xda8eac;let _0x369d9b={'eventID':a['CollaborationEvent'][_0x5dcbdd(0x15c)]};this[_0x5dcbdd(0xdc)][_0x5dcbdd(0xdd)](_0x369d9b,this[_0x5dcbdd(0xad)]);}[_0xda8eac(0x160)](){const _0x27303c=_0xda8eac;this[_0x27303c(0x112)]=null,this['_status']!==b['PRESENTING']&&this[_0x27303c(0xf9)]();}[_0xda8eac(0xde)](_0x43d4e5){const _0x327fdf=_0xda8eac;if(this['_status']===b['FOLLOWING']&&this[_0x327fdf(0x112)]===_0x43d4e5[_0x327fdf(0x12f)][_0x327fdf(0x106)]){let _0x354e94=(0x0,a['parseProtocolChangeset'])(_0x43d4e5['data'])[_0x327fdf(0xd8)][_0x327fdf(0xdf)]()[_0x327fdf(0xcd)](_0x2dae9c=>_0x2dae9c['id']===s[_0x327fdf(0x15d)]['id']);if(_0x354e94){let _0x45ea38=_0x354e94[_0x327fdf(0xba)][_0x327fdf(0x12e)],_0xd47f=_0x354e94[_0x327fdf(0xba)][_0x327fdf(0x122)]['id'];setTimeout(()=>{const _0x706e3d=_0x327fdf;this[_0x706e3d(0xc4)][_0x706e3d(0xbf)](s[_0x706e3d(0xec)]['id'],{'unitId':_0x45ea38,'subUnitId':_0xd47f},{'fromCollab':!0x0});});}}}['_startPresenting'](){const _0x5416da=_0xda8eac;this['_status$']['next'](b['PRESENTING']);let _0x4a0014=new Map(),_0x1fa3ed=this[_0x5416da(0xe7)]=new e[(_0x5416da(0x14a))]();_0x1fa3ed[_0x5416da(0xc5)]((0x0,e[_0x5416da(0x153)])(()=>{const _0x1d06cc=_0x5416da;_0x4a0014['forEach'](_0x38c726=>_0x38c726['complete']()),_0x4a0014[_0x1d06cc(0xe1)]();})),_0x1fa3ed['add'](this['_commandService'][_0x5416da(0xdb)](_0x221f84=>{const _0x4aca68=_0x5416da;if(_0x221f84['type']!==e[_0x4aca68(0xf1)][_0x4aca68(0x140)]||!this[_0x4aca68(0x126)]['shouldShareOperation'](_0x221f84['id']))return;let {id:_0x273cc1}=_0x221f84,_0x3fec16;if(_0x4a0014[_0x4aca68(0xd2)](_0x273cc1))_0x3fec16=_0x4a0014[_0x4aca68(0xa4)](_0x273cc1);else{var _0x3b6b9c;_0x3fec16=new c['Subject'](),_0x4a0014[_0x4aca68(0x15b)](_0x273cc1,_0x3fec16),_0x3fec16[_0x4aca68(0xbd)]((0x0,l[_0x4aca68(0x129)])((_0x3b6b9c=this['_configService']['getConfig'](_0x4aca68(0xb0)))==null?0xc8:_0x3b6b9c,void 0x0,{'trailing':!0x0,'leading':!0x0}))[_0x4aca68(0xac)](_0x4a5387=>{const _0x22d8ad=_0x4aca68;this[_0x22d8ad(0xdc)]['send']({'eventID':a[_0x22d8ad(0x11e)][_0x22d8ad(0x116)],'data':{'unitID':this[_0x22d8ad(0xad)],'operations':{[_0x4a5387['id']]:{'id':_0x4a5387['id'],'params':JSON['stringify'](_0x4a5387['params'])}}}},this['_unitID']);});}_0x3fec16[_0x4aca68(0xff)](_0x221f84);})),this[_0x5416da(0x126)]['getInitialStates'](this['_unitID'])[_0x5416da(0x11a)](_0x2b4ed0=>this['_collabSession'][_0x5416da(0xdd)]({'eventID':a['CollaborationEvent'][_0x5416da(0x116)],'data':{'unitID':this[_0x5416da(0xad)],'operations':{[_0x2b4ed0['id']]:{'id':_0x2b4ed0['id'],'params':JSON[_0x5416da(0x133)](_0x2b4ed0['params'])}}}},this[_0x5416da(0xad)]));}['_stopPresenting'](){const _0x4b46f5=_0xda8eac;var _0x41421d;this[_0x4b46f5(0x117)][_0x4b46f5(0xff)](b[_0x4b46f5(0x12c)]),(_0x41421d=this['_commandDisposable'])==null||_0x41421d['dispose'](),this[_0x4b46f5(0xe7)]=null;}[_0xda8eac(0x9e)](){const _0x4750e2=_0xda8eac;var _0x2f4f9f;(_0x2f4f9f=this[_0x4750e2(0xe7)])==null||_0x2f4f9f[_0x4750e2(0xa6)](),this['_status$'][_0x4750e2(0xff)](b[_0x4750e2(0xe5)]);}[_0xda8eac(0xf9)](){const _0x88e466=_0xda8eac;var _0x2a7289;this['_status$'][_0x88e466(0xff)](b['IDLE']),(_0x2a7289=this[_0x88e466(0xe7)])==null||_0x2a7289[_0x88e466(0xa6)](),this[_0x88e466(0xe7)]=null;}[_0xda8eac(0xe9)](){const _0xd3d072=_0xda8eac;var _0x4fe680;this[_0xd3d072(0x117)]['next'](b[_0xd3d072(0x13c)]),(_0x4fe680=this[_0xd3d072(0xe7)])==null||_0x4fe680[_0xd3d072(0xa6)]();}[_0xda8eac(0xa8)](_0x2677cf){const _0x433d95=_0xda8eac;if([b[_0x433d95(0xe0)],b[_0x433d95(0x13c)],b[_0x433d95(0x120)]][_0x433d95(0x101)](this[_0x433d95(0xa9)])||!_0x2677cf['data'][_0x433d95(0x111)]||_0x2677cf['data'][_0x433d95(0x111)]===this[_0x433d95(0xdc)][_0x433d95(0x145)]())return;this[_0x433d95(0xa9)]===b[_0x433d95(0x12c)]&&this[_0x433d95(0x9e)]();let _0x59b4bd=_0x2677cf[_0x433d95(0x12f)]['operations'];Object[_0x433d95(0x10a)](_0x59b4bd)[_0x433d95(0x11a)](_0x46b1bd=>{const _0x41fd93=_0x433d95;this[_0x41fd93(0xc4)][_0x41fd93(0xbf)](_0x46b1bd['id'],_0x46b1bd[_0x41fd93(0xba)]?JSON[_0x41fd93(0x11c)](_0x46b1bd['params']):null,{'fromCollab':!0x0});});}[_0xda8eac(0x134)](){const _0x3abfef=_0xda8eac;var _0x22c670;this[_0x3abfef(0x117)][_0x3abfef(0xff)](b[_0x3abfef(0x120)]),(_0x22c670=this[_0x3abfef(0xe7)])==null||_0x22c670[_0x3abfef(0xa6)]();}[_0xda8eac(0xf5)](){const _0x30b423=_0xda8eac;this[_0x30b423(0x117)]['next'](b[_0x30b423(0x12c)]),this[_0x30b423(0x102)]();}};x=v([_(0x2,e[_0xda8eac(0xbe)]),_(0x3,(0x0,e[_0xda8eac(0xe8)])(g)),_(0x4,e[_0xda8eac(0x143)])],x);function S(){const _0x367be5=_0xda8eac;let _0xd4bf2d=(0x0,t[_0x367be5(0x10d)])(y),_0x2a4ac5=(0x0,t['useDependency'])(e[_0x367be5(0x114)]),_0x5e27c5=(0x0,t[_0x367be5(0xae)])(()=>_0x2a4ac5[_0x367be5(0xcc)](e[_0x367be5(0xea)][_0x367be5(0xaa)]),void 0x0,!0x1,[]),[_0x54ff2f,_0x4a8dca]=(0x0,i[_0x367be5(0x104)])(null),[_0x487a14,_0x9cd42c]=(0x0,i[_0x367be5(0x104)])(b[_0x367be5(0x12c)]),_0x9fba98=(0x0,i[_0x367be5(0xf7)])(null);return(0x0,i[_0x367be5(0xb1)])(()=>(_0x5e27c5&&_0xd4bf2d[_0x367be5(0xd6)](_0x5e27c5[_0x367be5(0xef)]())[_0x367be5(0x142)](_0x4d8426=>{const _0x2505ee=_0x367be5;_0x4a8dca(_0x4d8426),_0x9fba98[_0x2505ee(0x155)]=_0x4d8426['status$'][_0x2505ee(0xac)](_0x3c73c5=>{_0x9cd42c(_0x3c73c5);});}),()=>{const _0x529d43=_0x367be5;var _0x246b36;(_0x246b36=_0x9fba98[_0x529d43(0x155)])==null||_0x246b36[_0x529d43(0xc0)](),_0x9fba98[_0x529d43(0x155)]=null;}),[_0x5e27c5,_0xd4bf2d]),_0x54ff2f?(0x0,u[_0x367be5(0xab)])(n[_0x367be5(0x151)],{'align':_0x367be5(0x157),'disabled':_0x487a14===b[_0x367be5(0x120)],'className':'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','overlay':(0x0,u[_0x367be5(0xab)])(C,{'status':_0x487a14,'coordinator':_0x54ff2f}),'children':(0x0,u[_0x367be5(0xab)])(_0x367be5(0xb5),{'className':(0x0,n['clsx'])('univer-border-none\x20univer-text-gray-600\x20univer-outline-none',{'univer-cursor-not-allowed':_0x487a14===b[_0x367be5(0x120)],'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x487a14!==b['OFFLINE']}),'type':'button','children':(0x0,u[_0x367be5(0xab)])(r[_0x367be5(0xaf)],{'className':_0x367be5(0x119)})})}):null;}function C(_0x297ec6){const _0x5af842=_0xda8eac;let {status:_0x5eca5a,coordinator:_0x46bd53}=_0x297ec6;switch(_0x5eca5a){case b[_0x5af842(0x12c)]:return(0x0,u[_0x5af842(0xab)])(w,{'coordinator':_0x46bd53});case b['FOLLOWING']:return(0x0,u[_0x5af842(0xab)])(T,{'coordinator':_0x46bd53});case b['NOT_FOLLOWING']:return(0x0,u[_0x5af842(0xab)])(E,{'coordinator':_0x46bd53});case b[_0x5af842(0x120)]:return(0x0,u['jsx'])(O,{});case b['PRESENTING']:return(0x0,u['jsx'])(D,{'coordinator':_0x46bd53});default:return null;}}function w(_0x25543e){const _0x3831c1=_0xda8eac;let {coordinator:_0x2bbbdc}=_0x25543e;return(0x0,u[_0x3831c1(0xee)])(u[_0x3831c1(0x132)],{'children':[(0x0,u[_0x3831c1(0xab)])('div',{'className':_0x3831c1(0xc3),'children':_0x3831c1(0xfb)}),(0x0,u[_0x3831c1(0xab)])(n['Button'],{'onClick':()=>_0x2bbbdc[_0x3831c1(0x103)](),'children':_0x3831c1(0xa3)})]});}function T(_0x4417e2){const _0x3198d6=_0xda8eac;let {coordinator:_0x38f1fe}=_0x4417e2;return(0x0,u[_0x3198d6(0xee)])(u[_0x3198d6(0x132)],{'children':[(0x0,u[_0x3198d6(0xab)])(_0x3198d6(0x14c),{'className':_0x3198d6(0xc3),'children':'You\x27re\x20following\x20the\x20presenter'}),(0x0,u['jsx'])(n[_0x3198d6(0x11f)],{'onClick':()=>_0x38f1fe[_0x3198d6(0xc2)](),'children':_0x3198d6(0x121)})]});}function E(_0x41bd2f){const _0x21cb28=_0xda8eac;let {coordinator:_0x1f7dd6}=_0x41bd2f;return(0x0,u['jsxs'])(u[_0x21cb28(0x132)],{'children':[(0x0,u['jsx'])(_0x21cb28(0x14c),{'className':_0x21cb28(0xc3),'children':_0x21cb28(0x12a)}),(0x0,u['jsx'])(n[_0x21cb28(0x11f)],{'variant':_0x21cb28(0xd5),'onClick':()=>_0x1f7dd6[_0x21cb28(0x127)](),'children':_0x21cb28(0x15f)})]});}function D(_0x3601f3){const _0x3a4ef5=_0xda8eac;let {coordinator:_0x2d8c7b}=_0x3601f3;return(0x0,u[_0x3a4ef5(0xee)])(u[_0x3a4ef5(0x132)],{'children':[(0x0,u[_0x3a4ef5(0xab)])('div',{'className':_0x3a4ef5(0xc3),'children':_0x3a4ef5(0x13a)}),(0x0,u[_0x3a4ef5(0xab)])(n[_0x3a4ef5(0x11f)],{'variant':_0x3a4ef5(0xf2),'onClick':()=>_0x2d8c7b['stopPresenting'](),'children':_0x3a4ef5(0x141)})]});}function O(){const _0x29dfe6=_0xda8eac;return(0x0,u[_0x29dfe6(0xab)])(u['Fragment'],{'children':_0x29dfe6(0xe3)});}let k=class extends e[_0xda8eac(0xbb)]{constructor(_0x387961,_0x192fe4){const _0x2321e9=_0xda8eac;super(),this['_injector']=_0x387961,this['_uiPartsService']=_0x192fe4,this[_0x2321e9(0x10b)]();}[_0xda8eac(0x10b)](){const _0x324e38=_0xda8eac;this[_0x324e38(0x14e)](this[_0x324e38(0xfd)][_0x324e38(0xc6)](t['BuiltInUIPart'][_0x324e38(0x124)],()=>(0x0,t['connectInjector'])(S,this[_0x324e38(0x115)])));}};function _0x45ad(){const _0x299360=['then','ICommandService','LiveShare','getMemberID','constructor','override','1669402vXZKFW','DependentOn','DisposableCollection','getStatus','div','decorate','disposeWithMe','pluginName','onStarting','Dropdown','LiveShareService','toDisposable','iterator','current','getTypeOfUnitDisposed$','end','touchDependencies','registerDependencies','LIVESHARE_TERMINATE','set','LIVESHARE_FETCH_OPERATIONS','InsertSheetMutation','9801351CiUdCq','Start\x20following','_handleTerminate','_startFollowing','createInstance','status$','UniverLiveSharePlugin','symbol','Start','get','Module','dispose','getLiveShareCoordinatorSync','_handleOperation','_status','UNIVER_SHEET','jsx','subscribe','_unitID','useObservable','LiveShareIcon','SAME_OPERATION_SHARE_INTERVAL','useEffect','553865UOPDPA','_config','dispose$','button','map','registerSharedOperation','offline','merge','params','Disposable','IUIPartsService','pipe','IConfigService','executeCommand','unsubscribe','from','stopFollowing','univer-mb-3\x20univer-w-full\x20univer-text-sm','_commandService','add','registerComponent','event$','prototype','LiveShareController','SessionStatus','_handleNewHost','getCurrentTypeOfUnit$','find','2188568ZZCgdh','setConfig','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','Injector','has','packageName','idle','text','getLiveShareCoordinator','ONLINE','mutations','stopPresenting','_univerInstanceService','onCommandExecuted','_collabSession','send','_handleNewChangeSets','reverse','PRESENTING','clear','length','You\x27are\x20offline.','defineProperty','FOLLOWING','following','_commandDisposable','Inject','_stopFollowing','UniverInstanceType','object','SetWorksheetActiveOperation','getInitialStates','jsxs','getUnitId','requireSession','CommandType','default','version','takeUntil','_handleOnline','_reporters','useRef','DesktopLiveShareController','_beIdle','toStringTag','Present\x20this\x20document','148795KQFCoU','_uiPartsService','_configService','next','init','includes','_fetchOperations','tryStartPresenting','useState','0.20.1','memberID','BehaviorSubject','string','_startPresenting','values','_mountLiveShare','function','useDependency','_startLiveShareCoordinator','onRendered','UniverCollaborationClientPlugin','presenter','_presenter','getTypeOfUnitAdded$','IUniverInstanceService','_injector','LIVESHARE_OPERATION','_status$','delete','univer-size-4','forEach','6PpDtLE','parse','sessionStatus$','CollaborationEvent','Button','OFFLINE','Stop\x20following','sheet','Plugin','HEADER_MENU','465226utgPrJ','_liveShareService','startFollowing','1797441VgcGQE','throttleTime','You\x27re\x20not\x20following\x20the\x20presenter','RxDisposable','IDLE','LIVESHARE_REQUEST_HOST','unitId','data','4fAzhka','_collabSessionService','Fragment','stringify','_handleOffline','_entities','call','getOwnPropertyDescriptor','type','shouldShareOperation','You\x27re\x20presenting\x20the\x20document','_sharedOperations','NOT_FOLLOWING','complete','_init','presenting','OPERATION','Stop\x20presenting'];_0x45ad=function(){return _0x299360;};return _0x45ad();}k=v([_(0x0,(0x0,e[_0xda8eac(0xe8)])(e[_0xda8eac(0xd1)])),_(0x1,t[_0xda8eac(0xbc)])],k);var A='@univerjs-pro/live-share',j=_0xda8eac(0x105);const M='live-share.config';Symbol(M);const N={};let P=class extends e[_0xda8eac(0xbb)]{constructor(_0x3d65c0){const _0x4f6b8c=_0xda8eac;super(),this[_0x4f6b8c(0x126)]=_0x3d65c0,this[_0x4f6b8c(0x13e)]();}[_0xda8eac(0x13e)](){const _0x3d6738=_0xda8eac;[d['SetZoomRatioOperation']['id'],d['SetScrollOperation']['id'],s[_0x3d6738(0xec)]['id']][_0x3d6738(0x11a)](_0x3bb1a8=>{const _0x504b7f=_0x3d6738;this[_0x504b7f(0x14e)](this[_0x504b7f(0x126)][_0x504b7f(0xb7)](_0x3bb1a8));});}};P=v([_(0x0,(0x0,e['Inject'])(g))],P);let F=class extends e[_0xda8eac(0x123)]{constructor(_0x4077c6=N,_0x1dbece,_0x4974a7){const _0x12b00f=_0xda8eac;super(),this[_0x12b00f(0xb3)]=_0x4077c6,this[_0x12b00f(0x115)]=_0x1dbece,this[_0x12b00f(0xfe)]=_0x4974a7;let {..._0x2972ff}=(0x0,e[_0x12b00f(0xb9)])({},N,this['_config']);this['_configService'][_0x12b00f(0xcf)](M,_0x2972ff);}[_0xda8eac(0x150)](){const _0x203251=_0xda8eac;(0x0,e[_0x203251(0x159)])(this['_injector'],(0x0,e['mergeOverrideWithDependencies'])([[g],[y],[P],[k]],this[_0x203251(0xb3)][_0x203251(0x147)])),(0x0,e[_0x203251(0x158)])(this[_0x203251(0x115)],[[P]]);}[_0xda8eac(0x10f)](){const _0x331615=_0xda8eac;(0x0,e['touchDependencies'])(this[_0x331615(0x115)],[[k]]);}};h(F,_0xda8eac(0x138),e[_0xda8eac(0xea)]['UNIVER_UNKNOWN']),h(F,_0xda8eac(0x14f),'UNIVER_LIVE_SHARE_PLUGIN'),h(F,_0xda8eac(0xd3),A),h(F,_0xda8eac(0xf3),j),F=v([(0x0,e[_0xda8eac(0x149)])(o[_0xda8eac(0x110)]),_(0x1,(0x0,e[_0xda8eac(0xe8)])(e[_0xda8eac(0xd1)])),_(0x2,e[_0xda8eac(0xbe)])],F),Object['defineProperty'](exports,_0xda8eac(0xf8),{'enumerable':!0x0,'get':function(){return k;}}),exports[_0xda8eac(0x144)]=S,Object[_0xda8eac(0xe4)](exports,_0xda8eac(0xc9),{'enumerable':!0x0,'get':function(){return y;}}),Object['defineProperty'](exports,'LiveShareCoordinator',{'enumerable':!0x0,'get':function(){return x;}}),exports[_0xda8eac(0x152)]=g,exports['LiveShareStatus']=b,Object[_0xda8eac(0xe4)](exports,_0xda8eac(0xa1),{'enumerable':!0x0,'get':function(){return F;}});
1
+ const _0x135073=_0x1145;(function(_0x1f27af,_0x3ca7e1){const _0x868b8a=_0x1145,_0x5487f2=_0x1f27af();while(!![]){try{const _0x2c565b=-parseInt(_0x868b8a(0x141))/0x1+parseInt(_0x868b8a(0x16d))/0x2+parseInt(_0x868b8a(0x14a))/0x3+parseInt(_0x868b8a(0xe3))/0x4+parseInt(_0x868b8a(0x153))/0x5*(-parseInt(_0x868b8a(0xca))/0x6)+-parseInt(_0x868b8a(0xd7))/0x7+parseInt(_0x868b8a(0x150))/0x8;if(_0x2c565b===_0x3ca7e1)break;else _0x5487f2['push'](_0x5487f2['shift']());}catch(_0x3f38ef){_0x5487f2['push'](_0x5487f2['shift']());}}}(_0x256c,0x6c1ec),Object['defineProperty'](exports,Symbol[_0x135073(0x111)],{'value':_0x135073(0xe4)}));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(_0x44431b){'@babel/helpers - typeof';return _typeof='function'==typeof Symbol&&'symbol'==typeof Symbol['iterator']?function(_0x51cdfe){return typeof _0x51cdfe;}:function(_0x4e267b){const _0x37fc5d=_0x1145;return _0x4e267b&&_0x37fc5d(0x11d)==typeof Symbol&&_0x4e267b[_0x37fc5d(0xd4)]===Symbol&&_0x4e267b!==Symbol[_0x37fc5d(0x159)]?_0x37fc5d(0x125):typeof _0x4e267b;},_typeof(_0x44431b);}function toPrimitive(_0x5bd151,_0x48c726){const _0x11157b=_0x135073;if(_0x11157b(0x123)!=_typeof(_0x5bd151)||!_0x5bd151)return _0x5bd151;var _0x2de596=_0x5bd151[Symbol['toPrimitive']];if(void 0x0!==_0x2de596){var _0x583463=_0x2de596[_0x11157b(0x12d)](_0x5bd151,_0x48c726||_0x11157b(0xc0));if(_0x11157b(0x123)!=_typeof(_0x583463))return _0x583463;throw new TypeError(_0x11157b(0x135));}return(_0x11157b(0x143)===_0x48c726?String:Number)(_0x5bd151);}function toPropertyKey(_0x34f41e){const _0x5d8137=_0x135073;var _0x40c7be=toPrimitive(_0x34f41e,_0x5d8137(0x143));return _0x5d8137(0x125)==_typeof(_0x40c7be)?_0x40c7be:_0x40c7be+'';}function _defineProperty(_0x112d1d,_0x176c47,_0x599726){return(_0x176c47=toPropertyKey(_0x176c47))in _0x112d1d?Object['defineProperty'](_0x112d1d,_0x176c47,{'value':_0x599726,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x112d1d[_0x176c47]=_0x599726,_0x112d1d;}var LiveShareService=class extends _univerjs_core[_0x135073(0xe9)]{constructor(..._0x3c346a){const _0x29802d=_0x135073;super(..._0x3c346a),_defineProperty(this,_0x29802d(0x117),new Set()),_defineProperty(this,_0x29802d(0x169),new Set());}[_0x135073(0xea)](_0x36eac1){const _0x3b1157=_0x135073;return this[_0x3b1157(0x117)][_0x3b1157(0x11c)](_0x36eac1),(0x0,_univerjs_core[_0x3b1157(0xc2)])(()=>this[_0x3b1157(0x117)]['delete'](_0x36eac1));}[_0x135073(0x167)](_0x57eb9f){const _0x12d66d=_0x135073;return this[_0x12d66d(0x169)][_0x12d66d(0x11c)](_0x57eb9f),(0x0,_univerjs_core[_0x12d66d(0xc2)])(()=>this[_0x12d66d(0x169)][_0x12d66d(0x12c)](_0x57eb9f));}[_0x135073(0x15d)](_0x1c0d62){const _0x11ca1e=_0x135073;return this[_0x11ca1e(0x117)][_0x11ca1e(0x10d)](_0x1c0d62);}['getInitialStates'](_0x48b33e){const _0x2f45c1=_0x135073;return Array[_0x2f45c1(0x168)](this['_reporters'])[_0x2f45c1(0x103)](_0x457e4e=>_0x457e4e(_0x48b33e));}};function __decorateParam(_0x912d30,_0x52b742){return function(_0x21419c,_0x9a9421){_0x52b742(_0x21419c,_0x9a9421,_0x912d30);};}function __decorate(_0x2a94b9,_0xa999dc,_0x1ca80c,_0x3c6ff2){const _0x375b1d=_0x135073;var _0x597633=arguments['length'],_0x489a42=_0x597633<0x3?_0xa999dc:_0x3c6ff2===null?_0x3c6ff2=Object[_0x375b1d(0xe6)](_0xa999dc,_0x1ca80c):_0x3c6ff2,_0x22cf7c;if(typeof Reflect===_0x375b1d(0x123)&&typeof Reflect[_0x375b1d(0x172)]===_0x375b1d(0x11d))_0x489a42=Reflect[_0x375b1d(0x172)](_0x2a94b9,_0xa999dc,_0x1ca80c,_0x3c6ff2);else{for(var _0x5debc0=_0x2a94b9['length']-0x1;_0x5debc0>=0x0;_0x5debc0--)if(_0x22cf7c=_0x2a94b9[_0x5debc0])_0x489a42=(_0x597633<0x3?_0x22cf7c(_0x489a42):_0x597633>0x3?_0x22cf7c(_0xa999dc,_0x1ca80c,_0x489a42):_0x22cf7c(_0xa999dc,_0x1ca80c))||_0x489a42;}return _0x597633>0x3&&_0x489a42&&Object[_0x375b1d(0xe5)](_0xa999dc,_0x1ca80c,_0x489a42),_0x489a42;}let LiveShareController=class LiveShareController extends _univerjs_core['RxDisposable']{constructor(_0xeb2143,_0x2bed34,_0x17a47e){const _0xa1cbe=_0x135073;super(),this[_0xa1cbe(0x100)]=_0xeb2143,this['_injector']=_0x2bed34,this[_0xa1cbe(0x15b)]=_0x17a47e,_defineProperty(this,_0xa1cbe(0x164),new Map()),this[_0xa1cbe(0x136)]();}async[_0x135073(0x11b)](_0x17c029){const _0x1f5f05=_0x135073;if(!this['_entities'][_0x1f5f05(0x10d)](_0x17c029))await this[_0x1f5f05(0x15f)](_0x17c029);return this[_0x1f5f05(0x164)][_0x1f5f05(0x120)](_0x17c029);}[_0x135073(0x106)](_0x3c2b25){const _0x5406d2=_0x135073;var _0x56030b;return(_0x56030b=this[_0x5406d2(0x164)][_0x5406d2(0x120)](_0x3c2b25))!==null&&_0x56030b!==void 0x0?_0x56030b:null;}[_0x135073(0x136)](){const _0x61dbc5=_0x135073;this[_0x61dbc5(0x100)][_0x61dbc5(0x10a)](_univerjs_core[_0x61dbc5(0xe7)][_0x61dbc5(0xec)])[_0x61dbc5(0xce)]((0x0,rxjs_operators['takeUntil'])(this[_0x61dbc5(0xd8)]))[_0x61dbc5(0xc8)](async _0x27488d=>{const _0x2120f4=_0x61dbc5,_0x43ada9=_0x27488d['getUnitId']();if(this['_entities']['has'](_0x43ada9))return;this[_0x2120f4(0x15f)](_0x43ada9);}),this[_0x61dbc5(0x100)][_0x61dbc5(0x13b)](_univerjs_core[_0x61dbc5(0xe7)][_0x61dbc5(0xec)])[_0x61dbc5(0xce)]((0x0,rxjs_operators[_0x61dbc5(0x13c)])(this['dispose$']))[_0x61dbc5(0xc8)](_0x302079=>{const _0x3baba6=_0x61dbc5,_0x17bdf6=_0x302079['getUnitId'](),_0x28ed60=this[_0x3baba6(0x164)][_0x3baba6(0x120)](_0x17bdf6);_0x28ed60===null||_0x28ed60===void 0x0||_0x28ed60[_0x3baba6(0x108)]();});}async[_0x135073(0x15f)](_0x501a4e){const _0x2ec2db=_0x135073,_0x22658c=await this[_0x2ec2db(0x15b)][_0x2ec2db(0x16a)](_0x501a4e),_0x4adddc=this[_0x2ec2db(0x148)]['createInstance'](LiveShareCoordinator,_0x501a4e,_0x22658c);return _0x4adddc[_0x2ec2db(0x14f)](),this[_0x2ec2db(0x164)][_0x2ec2db(0x15c)](_0x501a4e,_0x4adddc),_0x4adddc;}};LiveShareController=__decorate([__decorateParam(0x0,_univerjs_core[_0x135073(0xdf)]),__decorateParam(0x1,(0x0,_univerjs_core['Inject'])(_univerjs_core['Injector'])),__decorateParam(0x2,(0x0,_univerjs_core[_0x135073(0xfb)])(_univerjs_pro_collaboration_client[_0x135073(0x133)]))],LiveShareController);let LiveShareStatus=function(_0x25aca3){const _0x44ac2a=_0x135073;return _0x25aca3['OFFLINE']=_0x44ac2a(0xe8),_0x25aca3[_0x44ac2a(0x129)]=_0x44ac2a(0xbe),_0x25aca3[_0x44ac2a(0x16b)]=_0x44ac2a(0xc1),_0x25aca3[_0x44ac2a(0xc4)]=_0x44ac2a(0xcd),_0x25aca3[_0x44ac2a(0xda)]=_0x44ac2a(0x12e),_0x25aca3;}({});const SAME_OPERATION_SHARE_INTERVAL_KEY='SAME_OPERATION_SHARE_INTERVAL',DEFAULT_SAME_OPERATION_SHARE_INTERVAL=0xc8;let LiveShareCoordinator=class LiveShareCoordinator extends _univerjs_core['RxDisposable']{get[_0x135073(0xef)](){const _0x13b77e=_0x135073;return this[_0x13b77e(0x13f)][_0x13b77e(0xc6)]();}constructor(_0x1ac643,_0x180cdf,_0x3848a3,_0x320a2d,_0x5da81c){const _0x5b42c5=_0x135073;super(),this['_unitID']=_0x1ac643,this[_0x5b42c5(0xbc)]=_0x180cdf,this[_0x5b42c5(0xc9)]=_0x3848a3,this[_0x5b42c5(0xf7)]=_0x320a2d,this[_0x5b42c5(0x13d)]=_0x5da81c,_defineProperty(this,_0x5b42c5(0x13f),new rxjs[(_0x5b42c5(0x14e))](LiveShareStatus['IDLE'])),_defineProperty(this,_0x5b42c5(0x16c),this[_0x5b42c5(0x13f)]['asObservable']()),_defineProperty(this,_0x5b42c5(0x136),![]),_defineProperty(this,_0x5b42c5(0x16f),null),_defineProperty(this,_0x5b42c5(0x137),null);}[_0x135073(0x108)](){const _0x5ac1bd=_0x135073;var _0x12213f;(_0x12213f=this[_0x5ac1bd(0x16f)])===null||_0x12213f===void 0x0||_0x12213f['dispose'](),this['_status$'][_0x5ac1bd(0x14b)](LiveShareStatus[_0x5ac1bd(0x129)]),this[_0x5ac1bd(0x13f)][_0x5ac1bd(0xf2)]();}[_0x135073(0x156)](){const _0x21c10d=_0x135073;return this[_0x21c10d(0xef)];}[_0x135073(0x14f)](){const _0x34ac91=_0x135073;if(this[_0x34ac91(0x136)])return;this[_0x34ac91(0x136)]=!![],this[_0x34ac91(0xbc)]['sessionStatus$'][_0x34ac91(0xce)]((0x0,rxjs_operators['takeUntil'])(this['dispose$']))['subscribe'](_0x573347=>{const _0x27bb44=_0x34ac91;switch(_0x573347){case _univerjs_pro_collaboration_client[_0x27bb44(0x121)][_0x27bb44(0x113)]:this[_0x27bb44(0x10e)]();break;case _univerjs_pro_collaboration_client[_0x27bb44(0x121)][_0x27bb44(0xe0)]:this['_handleOnline']();break;default:}}),this['_collabSession'][_0x34ac91(0xf0)]['pipe']((0x0,rxjs_operators['takeUntil'])(this[_0x34ac91(0xd8)]))[_0x34ac91(0xc8)](_0x2ea1b5=>{const _0x523151=_0x34ac91,{eventID:_0x353f5b}=_0x2ea1b5;switch(_0x353f5b){case _univerjs_pro_collaboration[_0x523151(0xd0)][_0x523151(0xfc)]:this[_0x523151(0x13a)](_0x2ea1b5);break;case _univerjs_pro_collaboration[_0x523151(0xd0)][_0x523151(0x142)]:this[_0x523151(0xfe)](_0x2ea1b5);break;case _univerjs_pro_collaboration[_0x523151(0xd0)][_0x523151(0x114)]:this[_0x523151(0x126)]();break;case _univerjs_pro_collaboration[_0x523151(0xd0)][_0x523151(0x174)]:this['_handleNewChangeSets'](_0x2ea1b5);break;default:}});}[_0x135073(0x171)](){const _0x17e413=_0x135073;this[_0x17e413(0xbc)][_0x17e413(0x131)]({'eventID':_univerjs_pro_collaboration[_0x17e413(0xd0)][_0x17e413(0x101)],'data':{'unitID':this['_unitID'],'userID':this[_0x17e413(0xbc)][_0x17e413(0xd3)]()}},this[_0x17e413(0xf1)]);}['stopPresenting'](){const _0x22b0fd=_0x135073;this[_0x22b0fd(0xef)]===LiveShareStatus[_0x22b0fd(0xda)]&&(this[_0x22b0fd(0x13f)][_0x22b0fd(0x14b)](LiveShareStatus[_0x22b0fd(0x129)]),this[_0x22b0fd(0xbc)][_0x22b0fd(0x131)]({'eventID':_univerjs_pro_collaboration[_0x22b0fd(0xd0)][_0x22b0fd(0x114)],'data':{'unitID':this[_0x22b0fd(0xf1)]}},this[_0x22b0fd(0xf1)]));}[_0x135073(0x11e)](){const _0x5ae2ed=_0x135073;if(this['_status']!==LiveShareStatus[_0x5ae2ed(0xc4)])return;this['_status$'][_0x5ae2ed(0x14b)](LiveShareStatus[_0x5ae2ed(0x16b)]),this[_0x5ae2ed(0xba)]();}['stopFollowing'](){const _0x20d8e4=_0x135073;if(this[_0x20d8e4(0xef)]!==LiveShareStatus[_0x20d8e4(0x16b)])return;this[_0x20d8e4(0x110)]();}[_0x135073(0x13a)](_0x11dad3){const _0x3f5e41=_0x135073,{presenter:_0x2884ea}=_0x11dad3[_0x3f5e41(0x128)],_0x21e20d=this[_0x3f5e41(0xbc)][_0x3f5e41(0xd3)]();this[_0x3f5e41(0x137)]=_0x2884ea;if(_0x2884ea===_0x21e20d)this[_0x3f5e41(0x110)](),this[_0x3f5e41(0x160)]();else this[_0x3f5e41(0xef)]!==LiveShareStatus[_0x3f5e41(0xc4)]&&(this[_0x3f5e41(0x166)](),this[_0x3f5e41(0xba)]());}[_0x135073(0x165)](){const _0x537ec9=_0x135073,_0xc99a09={'eventID':_univerjs_pro_collaboration[_0x537ec9(0xd0)][_0x537ec9(0x15e)]};this[_0x537ec9(0xbc)][_0x537ec9(0x131)](_0xc99a09,this[_0x537ec9(0xf1)]);}[_0x135073(0x126)](){const _0x2e887a=_0x135073;this[_0x2e887a(0x137)]=null;if(this[_0x2e887a(0xef)]!==LiveShareStatus['PRESENTING'])this[_0x2e887a(0xbf)]();}[_0x135073(0x138)](_0x50026d){const _0x32dba2=_0x135073;if(this[_0x32dba2(0xef)]===LiveShareStatus[_0x32dba2(0x16b)]&&this[_0x32dba2(0x137)]===_0x50026d['data']['memberID']){const _0x207169=(0x0,_univerjs_pro_collaboration[_0x32dba2(0xb7)])(_0x50026d[_0x32dba2(0x128)])[_0x32dba2(0x134)]['reverse']()[_0x32dba2(0xcf)](_0x1eb1ad=>_0x1eb1ad['id']===_univerjs_sheets[_0x32dba2(0x115)]['id']);if(_0x207169){const _0x140f22=_0x207169['params'][_0x32dba2(0xd5)],_0x4fbc86=_0x207169[_0x32dba2(0xf4)][_0x32dba2(0x13e)]['id'];setTimeout(()=>{const _0x5591f5=_0x32dba2;this['_commandService'][_0x5591f5(0x152)](_univerjs_sheets['SetWorksheetActiveOperation']['id'],{'unitId':_0x140f22,'subUnitId':_0x4fbc86},{'fromCollab':!![]});});}}}['_startPresenting'](){const _0xdf4602=_0x135073;this[_0xdf4602(0x13f)][_0xdf4602(0x14b)](LiveShareStatus[_0xdf4602(0xda)]);const _0x353ece=new Map(),_0x116a31=this[_0xdf4602(0x16f)]=new _univerjs_core['DisposableCollection']();_0x116a31[_0xdf4602(0x11c)]((0x0,_univerjs_core[_0xdf4602(0xc2)])(()=>{const _0x14e2a3=_0xdf4602;_0x353ece[_0x14e2a3(0xdb)](_0x2c0356=>_0x2c0356['complete']()),_0x353ece[_0x14e2a3(0x12a)]();})),_0x116a31[_0xdf4602(0x11c)](this[_0xdf4602(0x13d)][_0xdf4602(0x140)](_0x709207=>{const _0x2ee020=_0xdf4602;if(_0x709207[_0x2ee020(0x157)]!==_univerjs_core[_0x2ee020(0xcb)][_0x2ee020(0x127)]||!this[_0x2ee020(0xf7)][_0x2ee020(0x15d)](_0x709207['id']))return;const {id:_0x31ea85}=_0x709207;let _0x111da1;if(!_0x353ece[_0x2ee020(0x10d)](_0x31ea85)){var _0x26fb15;_0x111da1=new rxjs[(_0x2ee020(0x14d))](),_0x353ece[_0x2ee020(0x15c)](_0x31ea85,_0x111da1),_0x111da1[_0x2ee020(0xce)]((0x0,rxjs_operators[_0x2ee020(0x161)])((_0x26fb15=this[_0x2ee020(0xc9)][_0x2ee020(0x145)](_0x2ee020(0xee)))!==null&&_0x26fb15!==void 0x0?_0x26fb15:DEFAULT_SAME_OPERATION_SHARE_INTERVAL,void 0x0,{'trailing':!![],'leading':!![]}))[_0x2ee020(0xc8)](_0x318daa=>{const _0x2bbf69=_0x2ee020;this[_0x2bbf69(0xbc)][_0x2bbf69(0x131)]({'eventID':_univerjs_pro_collaboration['CollaborationEvent'][_0x2bbf69(0x142)],'data':{'unitID':this[_0x2bbf69(0xf1)],'operations':{[_0x318daa['id']]:{'id':_0x318daa['id'],'params':JSON[_0x2bbf69(0x149)](_0x318daa['params'])}}}},this[_0x2bbf69(0xf1)]);});}else _0x111da1=_0x353ece[_0x2ee020(0x120)](_0x31ea85);_0x111da1[_0x2ee020(0x14b)](_0x709207);})),this[_0xdf4602(0xf7)][_0xdf4602(0x119)](this['_unitID'])[_0xdf4602(0xdb)](_0x4be451=>this['_collabSession'][_0xdf4602(0x131)]({'eventID':_univerjs_pro_collaboration[_0xdf4602(0xd0)][_0xdf4602(0x142)],'data':{'unitID':this[_0xdf4602(0xf1)],'operations':{[_0x4be451['id']]:{'id':_0x4be451['id'],'params':JSON['stringify'](_0x4be451['params'])}}}},this[_0xdf4602(0xf1)]));}[_0x135073(0x166)](){const _0x470ff2=_0x135073;var _0x43ae92;this[_0x470ff2(0x13f)][_0x470ff2(0x14b)](LiveShareStatus[_0x470ff2(0x129)]),(_0x43ae92=this[_0x470ff2(0x16f)])===null||_0x43ae92===void 0x0||_0x43ae92['dispose'](),this[_0x470ff2(0x16f)]=null;}[_0x135073(0xba)](){const _0x2e719f=_0x135073;var _0x5aaadc;(_0x5aaadc=this['_commandDisposable'])===null||_0x5aaadc===void 0x0||_0x5aaadc['dispose'](),this[_0x2e719f(0x13f)][_0x2e719f(0x14b)](LiveShareStatus[_0x2e719f(0x16b)]);}[_0x135073(0xbf)](){const _0x2f8ea7=_0x135073;var _0x54d31f;this[_0x2f8ea7(0x13f)][_0x2f8ea7(0x14b)](LiveShareStatus['IDLE']),(_0x54d31f=this[_0x2f8ea7(0x16f)])===null||_0x54d31f===void 0x0||_0x54d31f[_0x2f8ea7(0x108)](),this[_0x2f8ea7(0x16f)]=null;}[_0x135073(0x110)](){const _0x12d5a5=_0x135073;var _0x5c1834;this[_0x12d5a5(0x13f)][_0x12d5a5(0x14b)](LiveShareStatus[_0x12d5a5(0xc4)]),(_0x5c1834=this['_commandDisposable'])===null||_0x5c1834===void 0x0||_0x5c1834['dispose']();}[_0x135073(0xfe)](_0x44d28e){const _0x9da8fa=_0x135073;if([LiveShareStatus[_0x9da8fa(0xda)],LiveShareStatus[_0x9da8fa(0xc4)],LiveShareStatus[_0x9da8fa(0x113)]]['includes'](this[_0x9da8fa(0xef)]))return;if(!_0x44d28e['data'][_0x9da8fa(0x132)]||_0x44d28e[_0x9da8fa(0x128)][_0x9da8fa(0x132)]===this['_collabSession']['getMemberID']())return;if(this[_0x9da8fa(0xef)]===LiveShareStatus['IDLE'])this[_0x9da8fa(0xba)]();const _0x1e78b4=_0x44d28e[_0x9da8fa(0x128)]['operations'];Object[_0x9da8fa(0xf6)](_0x1e78b4)['forEach'](_0x436343=>{const _0xb17660=_0x9da8fa;this[_0xb17660(0x13d)][_0xb17660(0x152)](_0x436343['id'],_0x436343[_0xb17660(0xf4)]?JSON[_0xb17660(0x11a)](_0x436343[_0xb17660(0xf4)]):null,{'fromCollab':!![]});});}[_0x135073(0x10e)](){const _0x28d790=_0x135073;var _0x368e7c;this[_0x28d790(0x13f)][_0x28d790(0x14b)](LiveShareStatus[_0x28d790(0x113)]),(_0x368e7c=this[_0x28d790(0x16f)])===null||_0x368e7c===void 0x0||_0x368e7c[_0x28d790(0x108)]();}[_0x135073(0xf3)](){const _0x4c3eb0=_0x135073;this[_0x4c3eb0(0x13f)][_0x4c3eb0(0x14b)](LiveShareStatus[_0x4c3eb0(0x129)]),this[_0x4c3eb0(0x165)]();}};LiveShareCoordinator=__decorate([__decorateParam(0x2,_univerjs_core[_0x135073(0x15a)]),__decorateParam(0x3,(0x0,_univerjs_core['Inject'])(LiveShareService)),__decorateParam(0x4,_univerjs_core[_0x135073(0x109)])],LiveShareCoordinator);function LiveShare(){const _0x54393c=_0x135073,_0x2561d9=(0x0,_univerjs_ui[_0x54393c(0xde)])(LiveShareController),_0xa4e06=(0x0,_univerjs_ui['useDependency'])(_univerjs_core[_0x54393c(0xdf)]),_0x441629=(0x0,_univerjs_ui['useObservable'])(()=>_0xa4e06[_0x54393c(0x155)](_univerjs_core[_0x54393c(0xe7)][_0x54393c(0xec)]),void 0x0,![],[]),[_0x3a8f72,_0x317243]=(0x0,react[_0x54393c(0xbb)])(null),[_0x13dd85,_0x4f9299]=(0x0,react[_0x54393c(0xbb)])(LiveShareStatus[_0x54393c(0x129)]),_0x12b2ce=(0x0,react[_0x54393c(0x12b)])(null);(0x0,react[_0x54393c(0x139)])(()=>{const _0x3d2546=_0x54393c;if(_0x441629)_0x2561d9[_0x3d2546(0x11b)](_0x441629[_0x3d2546(0xe2)]())[_0x3d2546(0x10f)](_0x2a2d71=>{const _0x48a22e=_0x3d2546;_0x317243(_0x2a2d71),_0x12b2ce[_0x48a22e(0xb8)]=_0x2a2d71[_0x48a22e(0x16c)]['subscribe'](_0xedfc83=>{_0x4f9299(_0xedfc83);});});return()=>{const _0x57e42a=_0x3d2546;var _0x550f38;(_0x550f38=_0x12b2ce['current'])===null||_0x550f38===void 0x0||_0x550f38[_0x57e42a(0x105)](),_0x12b2ce['current']=null;};},[_0x441629,_0x2561d9]);if(!_0x3a8f72)return null;return(0x0,react_jsx_runtime[_0x54393c(0x107)])(_univerjs_design[_0x54393c(0xf9)],{'align':'end','disabled':_0x13dd85===LiveShareStatus[_0x54393c(0x113)],'className':_0x54393c(0x158),'overlay':(0x0,react_jsx_runtime['jsx'])(LiveShareDropdown,{'status':_0x13dd85,'coordinator':_0x3a8f72}),'children':(0x0,react_jsx_runtime[_0x54393c(0x107)])(_0x54393c(0x12f),{'className':(0x0,_univerjs_design[_0x54393c(0x130)])('univer-border-none\x20univer-text-gray-600\x20univer-outline-none',{'univer-cursor-not-allowed':_0x13dd85===LiveShareStatus[_0x54393c(0x113)],'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x13dd85!==LiveShareStatus[_0x54393c(0x113)]}),'type':_0x54393c(0x12f),'children':(0x0,react_jsx_runtime[_0x54393c(0x107)])(_univerjs_icons[_0x54393c(0xd2)],{'className':_0x54393c(0x10c)})})});}function LiveShareDropdown(_0x7caaf0){const _0x23c18b=_0x135073,{status:_0xdc5312,coordinator:_0x59b16d}=_0x7caaf0;switch(_0xdc5312){case LiveShareStatus['IDLE']:return(0x0,react_jsx_runtime[_0x23c18b(0x107)])(Idle,{'coordinator':_0x59b16d});case LiveShareStatus['FOLLOWING']:return(0x0,react_jsx_runtime[_0x23c18b(0x107)])(Following,{'coordinator':_0x59b16d});case LiveShareStatus[_0x23c18b(0xc4)]:return(0x0,react_jsx_runtime[_0x23c18b(0x107)])(NotFollowing,{'coordinator':_0x59b16d});case LiveShareStatus[_0x23c18b(0x113)]:return(0x0,react_jsx_runtime[_0x23c18b(0x107)])(Offline,{});case LiveShareStatus[_0x23c18b(0xda)]:return(0x0,react_jsx_runtime['jsx'])(Presenting,{'coordinator':_0x59b16d});default:return null;}}function Idle(_0x314ebf){const _0x5c5078=_0x135073,{coordinator:_0xbfdec1}=_0x314ebf;return(0x0,react_jsx_runtime[_0x5c5078(0xff)])(react_jsx_runtime['Fragment'],{'children':[(0x0,react_jsx_runtime['jsx'])('div',{'className':_0x5c5078(0x175),'children':_0x5c5078(0x102)}),(0x0,react_jsx_runtime[_0x5c5078(0x107)])(_univerjs_design[_0x5c5078(0x146)],{'onClick':()=>_0xbfdec1['tryStartPresenting'](),'children':_0x5c5078(0xc7)})]});}function Following(_0x30ab1b){const _0x23ef7f=_0x135073,{coordinator:_0xfee2b3}=_0x30ab1b;return(0x0,react_jsx_runtime[_0x23ef7f(0xff)])(react_jsx_runtime[_0x23ef7f(0x116)],{'children':[(0x0,react_jsx_runtime[_0x23ef7f(0x107)])('div',{'className':_0x23ef7f(0x175),'children':_0x23ef7f(0xc3)}),(0x0,react_jsx_runtime['jsx'])(_univerjs_design[_0x23ef7f(0x146)],{'onClick':()=>_0xfee2b3[_0x23ef7f(0x11f)](),'children':'Stop\x20following'})]});}function NotFollowing(_0x314097){const _0x4fee76=_0x135073,{coordinator:_0x2b26dd}=_0x314097;return(0x0,react_jsx_runtime[_0x4fee76(0xff)])(react_jsx_runtime['Fragment'],{'children':[(0x0,react_jsx_runtime[_0x4fee76(0x107)])(_0x4fee76(0x173),{'className':_0x4fee76(0x175),'children':_0x4fee76(0xdc)}),(0x0,react_jsx_runtime['jsx'])(_univerjs_design['Button'],{'variant':_0x4fee76(0x163),'onClick':()=>_0x2b26dd['startFollowing'](),'children':_0x4fee76(0x16e)})]});}function Presenting(_0x68fb5a){const _0x3f0d45=_0x135073,{coordinator:_0x4f4f94}=_0x68fb5a;return(0x0,react_jsx_runtime['jsxs'])(react_jsx_runtime[_0x3f0d45(0x116)],{'children':[(0x0,react_jsx_runtime['jsx'])('div',{'className':_0x3f0d45(0x175),'children':'You\x27re\x20presenting\x20the\x20document'}),(0x0,react_jsx_runtime[_0x3f0d45(0x107)])(_univerjs_design['Button'],{'variant':'default','onClick':()=>_0x4f4f94[_0x3f0d45(0x112)](),'children':_0x3f0d45(0xf5)})]});}function Offline(){const _0x42a0ad=_0x135073;return(0x0,react_jsx_runtime[_0x42a0ad(0x107)])(react_jsx_runtime['Fragment'],{'children':'You\x27are\x20offline.'});}function _0x256c(){const _0x3fe0d8=['SetWorksheetActiveOperation','_handleOperation','jsxs','_univerInstanceService','LIVESHARE_REQUEST_HOST','Present\x20this\x20document','map','IUIPartsService','unsubscribe','getLiveShareCoordinatorSync','jsx','dispose','ICommandService','getTypeOfUnitAdded$','BuiltInUIPart','univer-size-4','has','_handleOffline','then','_stopFollowing','toStringTag','stopPresenting','OFFLINE','LIVESHARE_TERMINATE','InsertSheetMutation','Fragment','_sharedOperations','0.21.0','getInitialStates','parse','getLiveShareCoordinator','add','function','startFollowing','stopFollowing','get','SessionStatus','mergeOverrideWithDependencies','object','setConfig','symbol','_handleTerminate','OPERATION','data','IDLE','clear','useRef','delete','call','presenting','button','clsx','send','presenter','CollaborationSessionService','mutations','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_init','_presenter','_handleNewChangeSets','useEffect','_handleNewHost','getTypeOfUnitDisposed$','takeUntil','_commandService','sheet','_status$','onCommandExecuted','299471QAowpW','LIVESHARE_OPERATION','string','_config','getConfig','Button','registerComponent','_injector','stringify','1604448NNDlCz','next','touchDependencies','Subject','BehaviorSubject','init','755848qhudRA','disposeWithMe','executeCommand','1248575oqveIn','Plugin','getCurrentTypeOfUnit$','getStatus','type','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','prototype','IConfigService','_collabSessionService','set','shouldShareOperation','LIVESHARE_FETCH_OPERATIONS','_startLiveShareCoordinator','_startPresenting','throttleTime','DependentOn','text','_entities','_fetchOperations','_stopPresenting','registerInitialStateReporter','from','_reporters','requireSession','FOLLOWING','status$','454824dCamFN','Start\x20following','_commandDisposable','onRendered','tryStartPresenting','decorate','div','NEW_CHANGESETS','univer-mb-3\x20univer-w-full\x20univer-text-sm','parseProtocolChangeset','current','pluginName','_startFollowing','useState','_collabSession','_uiPartsService','idle','_beIdle','default','following','toDisposable','You\x27re\x20following\x20the\x20presenter','NOT_FOLLOWING','LiveShareController','getValue','Start','subscribe','_configService','6EhWvqW','CommandType','LiveShareService','not-following','pipe','find','CollaborationEvent','Injector','LiveShareIcon','getMemberID','constructor','unitId','UNIVER_UNKNOWN','2754955TVGMfz','dispose$','version','PRESENTING','forEach','You\x27re\x20not\x20following\x20the\x20presenter','override','useDependency','IUniverInstanceService','ONLINE','LiveShareCoordinator','getUnitId','2115608wCerSA','Module','defineProperty','getOwnPropertyDescriptor','UniverInstanceType','offline','Disposable','registerSharedOperation','connectInjector','UNIVER_SHEET','live-share.config','SAME_OPERATION_SHARE_INTERVAL','_status','event$','_unitID','complete','_handleOnline','params','Stop\x20presenting','values','_liveShareService','SetZoomRatioOperation','Dropdown','_mountLiveShare','Inject','LIVESHARE_NEW_HOST'];_0x256c=function(){return _0x3fe0d8;};return _0x256c();}let DesktopLiveShareController=class DesktopLiveShareController extends _univerjs_core['Disposable']{constructor(_0x363c6f,_0x1458e6){const _0x76c541=_0x135073;super(),this[_0x76c541(0x148)]=_0x363c6f,this[_0x76c541(0xbd)]=_0x1458e6,this[_0x76c541(0xfa)]();}['_mountLiveShare'](){const _0x2a284d=_0x135073;this[_0x2a284d(0x151)](this[_0x2a284d(0xbd)][_0x2a284d(0x147)](_univerjs_ui[_0x2a284d(0x10b)]['HEADER_MENU'],()=>(0x0,_univerjs_ui[_0x2a284d(0xeb)])(LiveShare,this['_injector'])));}};DesktopLiveShareController=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x135073(0xfb)])(_univerjs_core[_0x135073(0xd1)])),__decorateParam(0x1,_univerjs_ui[_0x135073(0x104)])],DesktopLiveShareController);var name='@univerjs-pro/live-share',version=_0x135073(0x118);const LIVE_SHARE_PLUGIN_CONFIG_KEY=_0x135073(0xed),configSymbol=Symbol(LIVE_SHARE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let LiveShareCoreExtensionsController=class LiveShareCoreExtensionsController extends _univerjs_core['Disposable']{constructor(_0x1cc73e){const _0x5b0837=_0x135073;super(),this[_0x5b0837(0xf7)]=_0x1cc73e,this[_0x5b0837(0x136)]();}[_0x135073(0x136)](){const _0x11adda=_0x135073;[_univerjs_sheets_ui[_0x11adda(0xf8)]['id'],_univerjs_sheets_ui['SetScrollOperation']['id'],_univerjs_sheets[_0x11adda(0xfd)]['id']]['forEach'](_0x565dd8=>{const _0xe171a0=_0x11adda;this['disposeWithMe'](this[_0xe171a0(0xf7)]['registerSharedOperation'](_0x565dd8));});}};function _0x1145(_0x522145,_0x4f2201){_0x522145=_0x522145-0xb7;const _0x256ca6=_0x256c();let _0x114549=_0x256ca6[_0x522145];return _0x114549;}LiveShareCoreExtensionsController=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x135073(0xfb)])(LiveShareService))],LiveShareCoreExtensionsController);let UniverLiveSharePlugin=class UniverLiveSharePlugin extends _univerjs_core[_0x135073(0x154)]{constructor(_0x2fc763=defaultPluginConfig,_0x1af02d,_0x3e4b2c){const _0x576c98=_0x135073;super(),this[_0x576c98(0x144)]=_0x2fc763,this[_0x576c98(0x148)]=_0x1af02d,this[_0x576c98(0xc9)]=_0x3e4b2c;const {..._0x58796a}=(0x0,_univerjs_core['merge'])({},defaultPluginConfig,this['_config']);this['_configService'][_0x576c98(0x124)](LIVE_SHARE_PLUGIN_CONFIG_KEY,_0x58796a);}['onStarting'](){const _0x1862e3=_0x135073;(0x0,_univerjs_core['registerDependencies'])(this[_0x1862e3(0x148)],(0x0,_univerjs_core[_0x1862e3(0x122)])([[LiveShareService],[LiveShareController],[LiveShareCoreExtensionsController],[DesktopLiveShareController]],this['_config'][_0x1862e3(0xdd)])),(0x0,_univerjs_core[_0x1862e3(0x14c)])(this[_0x1862e3(0x148)],[[LiveShareCoreExtensionsController]]);}[_0x135073(0x170)](){const _0x1bb5fe=_0x135073;(0x0,_univerjs_core['touchDependencies'])(this[_0x1bb5fe(0x148)],[[DesktopLiveShareController]]);}};_defineProperty(UniverLiveSharePlugin,'type',_univerjs_core[_0x135073(0xe7)][_0x135073(0xd6)]),_defineProperty(UniverLiveSharePlugin,_0x135073(0xb9),'UNIVER_LIVE_SHARE_PLUGIN'),_defineProperty(UniverLiveSharePlugin,'packageName',name),_defineProperty(UniverLiveSharePlugin,_0x135073(0xd9),version),UniverLiveSharePlugin=__decorate([(0x0,_univerjs_core[_0x135073(0x162)])(_univerjs_pro_collaboration_client['UniverCollaborationClientPlugin']),__decorateParam(0x1,(0x0,_univerjs_core[_0x135073(0xfb)])(_univerjs_core[_0x135073(0xd1)])),__decorateParam(0x2,_univerjs_core['IConfigService'])],UniverLiveSharePlugin),Object[_0x135073(0xe5)](exports,'DesktopLiveShareController',{'enumerable':!![],'get':function(){return DesktopLiveShareController;}}),exports['LiveShare']=LiveShare,Object[_0x135073(0xe5)](exports,_0x135073(0xc5),{'enumerable':!![],'get':function(){return LiveShareController;}}),Object[_0x135073(0xe5)](exports,_0x135073(0xe1),{'enumerable':!![],'get':function(){return LiveShareCoordinator;}}),exports[_0x135073(0xcc)]=LiveShareService,exports['LiveShareStatus']=LiveShareStatus,Object[_0x135073(0xe5)](exports,'UniverLiveSharePlugin',{'enumerable':!![],'get':function(){return UniverLiveSharePlugin;}});
package/lib/es/facade.js CHANGED
@@ -1 +1 @@
1
- const _0x19d952=_0x5d5e;(function(_0x4e7718,_0x535366){const _0x1aba27=_0x5d5e,_0x2bf278=_0x4e7718();while(!![]){try{const _0x4538e9=-parseInt(_0x1aba27(0x134))/0x1*(parseInt(_0x1aba27(0x121))/0x2)+parseInt(_0x1aba27(0x132))/0x3*(parseInt(_0x1aba27(0x130))/0x4)+parseInt(_0x1aba27(0x120))/0x5+parseInt(_0x1aba27(0x12e))/0x6*(parseInt(_0x1aba27(0x129))/0x7)+-parseInt(_0x1aba27(0x137))/0x8+-parseInt(_0x1aba27(0x142))/0x9*(parseInt(_0x1aba27(0x13c))/0xa)+-parseInt(_0x1aba27(0x12a))/0xb*(-parseInt(_0x1aba27(0x122))/0xc);if(_0x4538e9===_0x535366)break;else _0x2bf278['push'](_0x2bf278['shift']());}catch(_0x558d84){_0x2bf278['push'](_0x2bf278['shift']());}}}(_0x2d45,0x71f74));import{LiveShareController as _0x53265f,LiveShareStatus as _0x3a2521}from'@univerjs-pro/live-share';import{IUniverInstanceService as _0x56883f,UniverInstanceType as _0x2cba1b}from'@univerjs/core';import{FEnum as _0x1e05d3,FUniver as _0x30cdf0}from'@univerjs/core/facade';function o(_0x39b155){'@babel/helpers - typeof';const _0xfa74f5=_0x5d5e;return o=typeof Symbol==_0xfa74f5(0x124)&&typeof Symbol[_0xfa74f5(0x135)]==_0xfa74f5(0x140)?function(_0x5841d7){return typeof _0x5841d7;}:function(_0x3e0af4){const _0x2c235f=_0xfa74f5;return _0x3e0af4&&typeof Symbol==_0x2c235f(0x124)&&_0x3e0af4[_0x2c235f(0x13d)]===Symbol&&_0x3e0af4!==Symbol[_0x2c235f(0x131)]?_0x2c235f(0x140):typeof _0x3e0af4;},o(_0x39b155);}function s(_0x5b8c0e,_0x10c053){const _0x366ad0=_0x5d5e;if(o(_0x5b8c0e)!='object'||!_0x5b8c0e)return _0x5b8c0e;var _0x2cabd7=_0x5b8c0e[Symbol['toPrimitive']];if(_0x2cabd7!==void 0x0){var _0x4cf0ec=_0x2cabd7['call'](_0x5b8c0e,_0x10c053||_0x366ad0(0x125));if(o(_0x4cf0ec)!=_0x366ad0(0x141))return _0x4cf0ec;throw TypeError(_0x366ad0(0x126));}return(_0x10c053==='string'?String:Number)(_0x5b8c0e);}function _0x2d45(){const _0x1ec9da=['88329FxDyjD','No\x20active\x20workbook\x20found.','135406cmXYtq','iterator','getUnitId','5737312ZoJNqF','string','startPresenting','extend','No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.','4633990ugLfgp','constructor','get','startFollowing','symbol','object','9CyVviY','stopPresenting','tryStartPresenting','_injector','2481120xgzGwV','2MNTirH','5004KyWqwS','IDLE','function','default','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','UNIVER_SHEET','_liveShareController','958391vRPtRL','15103TSysGR','defineProperty','getLiveShareStatus','getLiveShareCoordinatorSync','30buifbI','getCurrentUnitOfType','4UAzdgX','prototype'];_0x2d45=function(){return _0x1ec9da;};return _0x2d45();}function c(_0x8a904c){const _0x49c4d0=_0x5d5e;var _0x55c39f=s(_0x8a904c,_0x49c4d0(0x138));return o(_0x55c39f)=='symbol'?_0x55c39f:_0x55c39f+'';}function l(_0x433aaa,_0x28aecb,_0x35987a){const _0x170c0b=_0x5d5e;return(_0x28aecb=c(_0x28aecb))in _0x433aaa?Object[_0x170c0b(0x12b)](_0x433aaa,_0x28aecb,{'value':_0x35987a,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x433aaa[_0x28aecb]=_0x35987a,_0x433aaa;}var u=class extends _0x30cdf0{constructor(..._0x43aa3f){const _0x2841e9=_0x5d5e;super(..._0x43aa3f),l(this,_0x2841e9(0x128),void 0x0);}['_initialize'](_0x2a8068){const _0x9f58d7=_0x5d5e;this[_0x9f58d7(0x128)]=_0x2a8068[_0x9f58d7(0x13e)](_0x53265f);}[_0x19d952(0x12c)](){const _0x4487d5=_0x19d952;var _0x2bd637;let _0x347418=this[_0x4487d5(0x145)][_0x4487d5(0x13e)](_0x56883f)[_0x4487d5(0x12f)](_0x2cba1b[_0x4487d5(0x127)]);if(!_0x347418)throw Error(_0x4487d5(0x133));let _0x3b85f6=_0x347418['getUnitId'](),_0x1878a6=this[_0x4487d5(0x128)][_0x4487d5(0x12d)](_0x3b85f6);return(_0x2bd637=_0x1878a6==null?void 0x0:_0x1878a6['getStatus']())==null?_0x3a2521[_0x4487d5(0x123)]:_0x2bd637;}[_0x19d952(0x13f)](){const _0x3c7015=_0x19d952;let _0x150698=this[_0x3c7015(0x145)][_0x3c7015(0x13e)](_0x56883f)[_0x3c7015(0x12f)](_0x2cba1b[_0x3c7015(0x127)]);if(!_0x150698)throw Error(_0x3c7015(0x133));let _0x19dbc6=_0x150698[_0x3c7015(0x136)](),_0x2b83be=this[_0x3c7015(0x128)][_0x3c7015(0x12d)](_0x19dbc6);if(!_0x2b83be)throw Error(_0x3c7015(0x13b));_0x2b83be['startFollowing']();}['stopFollowing'](){const _0x1ae77f=_0x19d952;let _0x4e1a88=this[_0x1ae77f(0x145)][_0x1ae77f(0x13e)](_0x56883f)[_0x1ae77f(0x12f)](_0x2cba1b[_0x1ae77f(0x127)]);if(!_0x4e1a88)throw Error(_0x1ae77f(0x133));let _0x17d076=_0x4e1a88[_0x1ae77f(0x136)](),_0x5a9125=this[_0x1ae77f(0x128)]['getLiveShareCoordinatorSync'](_0x17d076);if(!_0x5a9125)throw Error(_0x1ae77f(0x13b));_0x5a9125['stopFollowing']();}[_0x19d952(0x139)](){const _0x6e943a=_0x19d952;let _0x4eba19=this[_0x6e943a(0x145)][_0x6e943a(0x13e)](_0x56883f)[_0x6e943a(0x12f)](_0x2cba1b[_0x6e943a(0x127)]);if(!_0x4eba19)throw Error('No\x20active\x20workbook\x20found.');let _0x380547=_0x4eba19['getUnitId'](),_0x37c849=this[_0x6e943a(0x128)]['getLiveShareCoordinatorSync'](_0x380547);if(!_0x37c849)throw Error(_0x6e943a(0x13b));_0x37c849[_0x6e943a(0x144)]();}[_0x19d952(0x143)](){const _0x39264b=_0x19d952;let _0x5b0220=this[_0x39264b(0x145)]['get'](_0x56883f)[_0x39264b(0x12f)](_0x2cba1b[_0x39264b(0x127)]);if(!_0x5b0220)throw Error(_0x39264b(0x133));let _0x3703b4=_0x5b0220['getUnitId'](),_0x439ca0=this[_0x39264b(0x128)][_0x39264b(0x12d)](_0x3703b4);if(!_0x439ca0)throw Error(_0x39264b(0x13b));_0x439ca0[_0x39264b(0x143)]();}};function _0x5d5e(_0x14b006,_0x1a9caa){_0x14b006=_0x14b006-0x120;const _0x2d45ce=_0x2d45();let _0x5d5e11=_0x2d45ce[_0x14b006];return _0x5d5e11;}_0x30cdf0[_0x19d952(0x13a)](u);var d=class extends _0x1e05d3{get['LiveShareStatusEnum'](){return _0x3a2521;}};_0x1e05d3[_0x19d952(0x13a)](d);export{};
1
+ const _0x4ea766=_0x183f;(function(_0x49da20,_0xdd21be){const _0x47b514=_0x183f,_0x2c11c0=_0x49da20();while(!![]){try{const _0x2bd88f=-parseInt(_0x47b514(0xe6))/0x1*(parseInt(_0x47b514(0xe4))/0x2)+-parseInt(_0x47b514(0xf2))/0x3*(parseInt(_0x47b514(0xe9))/0x4)+parseInt(_0x47b514(0xe1))/0x5*(parseInt(_0x47b514(0x104))/0x6)+parseInt(_0x47b514(0xe8))/0x7*(-parseInt(_0x47b514(0xf3))/0x8)+-parseInt(_0x47b514(0xfd))/0x9*(parseInt(_0x47b514(0xf4))/0xa)+-parseInt(_0x47b514(0xe0))/0xb+parseInt(_0x47b514(0xec))/0xc;if(_0x2bd88f===_0xdd21be)break;else _0x2c11c0['push'](_0x2c11c0['shift']());}catch(_0x49b14a){_0x2c11c0['push'](_0x2c11c0['shift']());}}}(_0x3842,0xdbc9d));import{LiveShareController,LiveShareStatus}from'@univerjs-pro/live-share';import{IUniverInstanceService,UniverInstanceType}from'@univerjs/core';import{FEnum,FUniver}from'@univerjs/core/facade';function _typeof(_0x2964a2){'@babel/helpers - typeof';const _0x331e71=_0x183f;return _typeof=_0x331e71(0xfb)==typeof Symbol&&_0x331e71(0xe3)==typeof Symbol[_0x331e71(0xdc)]?function(_0x1d554a){return typeof _0x1d554a;}:function(_0x118ed9){const _0x46d4a4=_0x331e71;return _0x118ed9&&_0x46d4a4(0xfb)==typeof Symbol&&_0x118ed9[_0x46d4a4(0xf6)]===Symbol&&_0x118ed9!==Symbol['prototype']?'symbol':typeof _0x118ed9;},_typeof(_0x2964a2);}function toPrimitive(_0x29f896,_0x47677b){const _0x5eeb52=_0x183f;if('object'!=_typeof(_0x29f896)||!_0x29f896)return _0x29f896;var _0x375f2a=_0x29f896[Symbol[_0x5eeb52(0xea)]];if(void 0x0!==_0x375f2a){var _0x34c5a9=_0x375f2a[_0x5eeb52(0xf9)](_0x29f896,_0x47677b||_0x5eeb52(0xed));if(_0x5eeb52(0xdf)!=_typeof(_0x34c5a9))return _0x34c5a9;throw new TypeError(_0x5eeb52(0xe2));}return(_0x5eeb52(0x102)===_0x47677b?String:Number)(_0x29f896);}function toPropertyKey(_0x415bc8){const _0x57d7dd=_0x183f;var _0x3591fa=toPrimitive(_0x415bc8,_0x57d7dd(0x102));return _0x57d7dd(0xe3)==_typeof(_0x3591fa)?_0x3591fa:_0x3591fa+'';}function _0x3842(){const _0xe55846=['getLiveShareCoordinatorSync','get','startFollowing','No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.','1206390NulZHS','240376TSQTbY','111350AwIufy','_liveShareController','constructor','tryStartPresenting','_injector','call','getStatus','function','No\x20active\x20workbook\x20found.','1143APUnDq','getUnitId','LiveShareStatusEnum','_initialize','UNIVER_SHEET','string','getLiveShareStatus','894DYCONS','iterator','stopFollowing','IDLE','object','3041269sUlqNT','36845uotTei','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','symbol','26rUHIVt','extend','46638LulrMd','startPresenting','371VrtKSh','8ijtrbn','toPrimitive','getCurrentUnitOfType','53951292kXBlFm','default'];_0x3842=function(){return _0xe55846;};return _0x3842();}function _defineProperty(_0x102947,_0x2471f1,_0x93787d){return(_0x2471f1=toPropertyKey(_0x2471f1))in _0x102947?Object['defineProperty'](_0x102947,_0x2471f1,{'value':_0x93787d,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x102947[_0x2471f1]=_0x93787d,_0x102947;}var FUniverLiveShareMixin=class extends FUniver{constructor(..._0x1f4cec){const _0x56d158=_0x183f;super(..._0x1f4cec),_defineProperty(this,_0x56d158(0xf5),void 0x0);}[_0x4ea766(0x100)](_0xe1da3a){const _0x5fd974=_0x4ea766;this[_0x5fd974(0xf5)]=_0xe1da3a[_0x5fd974(0xef)](LiveShareController);}[_0x4ea766(0x103)](){const _0x3f8c69=_0x4ea766;var _0x1f8d3e;const _0x5646a8=this['_injector'][_0x3f8c69(0xef)](IUniverInstanceService)[_0x3f8c69(0xeb)](UniverInstanceType['UNIVER_SHEET']);if(!_0x5646a8)throw new Error(_0x3f8c69(0xfc));const _0x363d25=_0x5646a8[_0x3f8c69(0xfe)](),_0x2482c8=this[_0x3f8c69(0xf5)]['getLiveShareCoordinatorSync'](_0x363d25);return(_0x1f8d3e=_0x2482c8===null||_0x2482c8===void 0x0?void 0x0:_0x2482c8[_0x3f8c69(0xfa)]())!==null&&_0x1f8d3e!==void 0x0?_0x1f8d3e:LiveShareStatus[_0x3f8c69(0xde)];}['startFollowing'](){const _0x59a7bf=_0x4ea766,_0x5058d6=this[_0x59a7bf(0xf8)][_0x59a7bf(0xef)](IUniverInstanceService)[_0x59a7bf(0xeb)](UniverInstanceType[_0x59a7bf(0x101)]);if(!_0x5058d6)throw new Error(_0x59a7bf(0xfc));const _0x440d0c=_0x5058d6[_0x59a7bf(0xfe)](),_0x12a103=this['_liveShareController']['getLiveShareCoordinatorSync'](_0x440d0c);if(!_0x12a103)throw new Error(_0x59a7bf(0xf1));_0x12a103[_0x59a7bf(0xf0)]();}[_0x4ea766(0xdd)](){const _0x3460ce=_0x4ea766,_0x44d7c1=this[_0x3460ce(0xf8)][_0x3460ce(0xef)](IUniverInstanceService)['getCurrentUnitOfType'](UniverInstanceType[_0x3460ce(0x101)]);if(!_0x44d7c1)throw new Error(_0x3460ce(0xfc));const _0x4fb377=_0x44d7c1[_0x3460ce(0xfe)](),_0x3be46d=this['_liveShareController']['getLiveShareCoordinatorSync'](_0x4fb377);if(!_0x3be46d)throw new Error(_0x3460ce(0xf1));_0x3be46d['stopFollowing']();}[_0x4ea766(0xe7)](){const _0x29d1ce=_0x4ea766,_0x5e09a4=this['_injector']['get'](IUniverInstanceService)[_0x29d1ce(0xeb)](UniverInstanceType[_0x29d1ce(0x101)]);if(!_0x5e09a4)throw new Error(_0x29d1ce(0xfc));const _0x20cea0=_0x5e09a4[_0x29d1ce(0xfe)](),_0x29f33a=this[_0x29d1ce(0xf5)]['getLiveShareCoordinatorSync'](_0x20cea0);if(!_0x29f33a)throw new Error(_0x29d1ce(0xf1));_0x29f33a[_0x29d1ce(0xf7)]();}['stopPresenting'](){const _0x112c70=_0x4ea766,_0x5e5f60=this[_0x112c70(0xf8)]['get'](IUniverInstanceService)[_0x112c70(0xeb)](UniverInstanceType[_0x112c70(0x101)]);if(!_0x5e5f60)throw new Error(_0x112c70(0xfc));const _0x509a2d=_0x5e5f60[_0x112c70(0xfe)](),_0x720cf=this[_0x112c70(0xf5)][_0x112c70(0xee)](_0x509a2d);if(!_0x720cf)throw new Error('No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.');_0x720cf['stopPresenting']();}};function _0x183f(_0x59f032,_0x3b39e4){_0x59f032=_0x59f032-0xdc;const _0x384288=_0x3842();let _0x183f00=_0x384288[_0x59f032];return _0x183f00;}FUniver['extend'](FUniverLiveShareMixin);var FLiveShareEnumMixin=class extends FEnum{get[_0x4ea766(0xff)](){return LiveShareStatus;}};FEnum[_0x4ea766(0xe5)](FLiveShareEnumMixin);export{};
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x316f94=_0x5391;(function(_0xe3a6e7,_0x29817e){const _0x172460=_0x5391,_0x24b1e9=_0xe3a6e7();while(!![]){try{const _0x4e53ed=parseInt(_0x172460(0x20b))/0x1+-parseInt(_0x172460(0x1be))/0x2*(-parseInt(_0x172460(0x1e8))/0x3)+parseInt(_0x172460(0x18c))/0x4*(-parseInt(_0x172460(0x1f8))/0x5)+parseInt(_0x172460(0x198))/0x6+-parseInt(_0x172460(0x1e4))/0x7+-parseInt(_0x172460(0x1e1))/0x8+-parseInt(_0x172460(0x1de))/0x9*(-parseInt(_0x172460(0x1d3))/0xa);if(_0x4e53ed===_0x29817e)break;else _0x24b1e9['push'](_0x24b1e9['shift']());}catch(_0x22466a){_0x24b1e9['push'](_0x24b1e9['shift']());}}}(_0xb49f,0x9fde8));import{CommandType as _0x59b2d3,DependentOn as _0x4a35d8,Disposable as _0x2adf71,DisposableCollection as _0x5adea4,ICommandService as _0x41335f,IConfigService as _0x557f50,IUniverInstanceService as _0x3302a5,Inject as _0x46b23b,Injector as _0x1d072d,Plugin as _0x48ed37,RxDisposable as _0x22b5ea,UniverInstanceType as _0x3134e5,merge as _0x2e2be3,mergeOverrideWithDependencies as _0x3d81e7,registerDependencies as _0x581342,toDisposable as _0x45b351,touchDependencies as _0x52a28d}from'@univerjs/core';import{BuiltInUIPart as _0x25173b,IUIPartsService as _0x3b40e4,connectInjector as _0x4f41a9,useDependency as _0x32da5a,useObservable as _0x3ea909}from'@univerjs/ui';import{Button as _0x4f7ec0,Dropdown as _0x4cb2f3,clsx as _0x3a1867}from'@univerjs/design';import{LiveShareIcon as _0x3a9d6e}from'@univerjs/icons';import{useEffect as _0x2f1cba,useRef as _0x4a2319,useState as _0x3be037}from'react';import{CollaborationEvent as _0x3715c9,parseProtocolChangeset as _0x1ff61d}from'@univerjs-pro/collaboration';import{CollaborationSessionService as _0x29346c,SessionStatus as _0x3826d2,UniverCollaborationClientPlugin as _0x42f673}from'@univerjs-pro/collaboration-client';import{InsertSheetMutation as _0x28332a,SetWorksheetActiveOperation as _0x1ff449}from'@univerjs/sheets';import{BehaviorSubject as _0x128b7d,Subject as _0x14ff59}from'rxjs';import{takeUntil as _0x136b9e,throttleTime as _0x16df4d}from'rxjs/operators';import{Fragment as _0x501d46,jsx as _0x509609,jsxs as _0x227845}from'react/jsx-runtime';import{SetScrollOperation as _0x160a49,SetZoomRatioOperation as _0xefcc16}from'@univerjs/sheets-ui';function L(_0x590d83){'@babel/helpers - typeof';const _0x4cc06f=_0x5391;return L=typeof Symbol==_0x4cc06f(0x1e2)&&typeof Symbol[_0x4cc06f(0x1b7)]==_0x4cc06f(0x1ae)?function(_0x448d45){return typeof _0x448d45;}:function(_0x3ba1b9){const _0x13799b=_0x4cc06f;return _0x3ba1b9&&typeof Symbol==_0x13799b(0x1e2)&&_0x3ba1b9['constructor']===Symbol&&_0x3ba1b9!==Symbol[_0x13799b(0x1ee)]?_0x13799b(0x1ae):typeof _0x3ba1b9;},L(_0x590d83);}function R(_0xa99d4,_0x21f9c7){const _0x31c836=_0x5391;if(L(_0xa99d4)!='object'||!_0xa99d4)return _0xa99d4;var _0x14b8c4=_0xa99d4[Symbol['toPrimitive']];if(_0x14b8c4!==void 0x0){var _0x3da7ef=_0x14b8c4[_0x31c836(0x1d4)](_0xa99d4,_0x21f9c7||_0x31c836(0x1a6));if(L(_0x3da7ef)!=_0x31c836(0x1c0))return _0x3da7ef;throw TypeError(_0x31c836(0x1e0));}return(_0x21f9c7===_0x31c836(0x1f1)?String:Number)(_0xa99d4);}function z(_0x559b23){const _0x2d957e=_0x5391;var _0x1282bb=R(_0x559b23,_0x2d957e(0x1f1));return L(_0x1282bb)==_0x2d957e(0x1ae)?_0x1282bb:_0x1282bb+'';}function B(_0x1787ef,_0x2b7d5c,_0x202a95){return(_0x2b7d5c=z(_0x2b7d5c))in _0x1787ef?Object['defineProperty'](_0x1787ef,_0x2b7d5c,{'value':_0x202a95,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1787ef[_0x2b7d5c]=_0x202a95,_0x1787ef;}var V=class extends _0x2adf71{constructor(..._0x4f4764){const _0x34512f=_0x5391;super(..._0x4f4764),B(this,'_sharedOperations',new Set()),B(this,_0x34512f(0x1d6),new Set());}[_0x316f94(0x1fd)](_0x74c681){const _0x5a68cd=_0x316f94;return this[_0x5a68cd(0x1b5)][_0x5a68cd(0x1d0)](_0x74c681),_0x45b351(()=>this[_0x5a68cd(0x1b5)][_0x5a68cd(0x1c9)](_0x74c681));}[_0x316f94(0x180)](_0x398b1e){const _0x4e4b10=_0x316f94;return this[_0x4e4b10(0x1d6)][_0x4e4b10(0x1d0)](_0x398b1e),_0x45b351(()=>this['_reporters'][_0x4e4b10(0x1c9)](_0x398b1e));}[_0x316f94(0x1c8)](_0x23fee9){const _0x51b6de=_0x316f94;return this[_0x51b6de(0x1b5)]['has'](_0x23fee9);}['getInitialStates'](_0x83ab78){const _0x18e7d2=_0x316f94;return Array['from'](this[_0x18e7d2(0x1d6)])['map'](_0x4358ad=>_0x4358ad(_0x83ab78));}};function H(_0x4398df,_0x3cdacc){return function(_0x578c4e,_0x4738fa){_0x3cdacc(_0x578c4e,_0x4738fa,_0x4398df);};}function U(_0x16ddd9,_0x52ab6c,_0xc6f07b,_0x43f9c7){const _0x217ae6=_0x316f94;var _0x5905c6=arguments[_0x217ae6(0x1db)],_0x3847a1=_0x5905c6<0x3?_0x52ab6c:_0x43f9c7===null?_0x43f9c7=Object[_0x217ae6(0x1f0)](_0x52ab6c,_0xc6f07b):_0x43f9c7,_0x407918;if(typeof Reflect==_0x217ae6(0x1c0)&&typeof Reflect[_0x217ae6(0x1ea)]==_0x217ae6(0x1e2))_0x3847a1=Reflect[_0x217ae6(0x1ea)](_0x16ddd9,_0x52ab6c,_0xc6f07b,_0x43f9c7);else{for(var _0x4b478b=_0x16ddd9['length']-0x1;_0x4b478b>=0x0;_0x4b478b--)(_0x407918=_0x16ddd9[_0x4b478b])&&(_0x3847a1=(_0x5905c6<0x3?_0x407918(_0x3847a1):_0x5905c6>0x3?_0x407918(_0x52ab6c,_0xc6f07b,_0x3847a1):_0x407918(_0x52ab6c,_0xc6f07b))||_0x3847a1);}return _0x5905c6>0x3&&_0x3847a1&&Object[_0x217ae6(0x1ba)](_0x52ab6c,_0xc6f07b,_0x3847a1),_0x3847a1;}let W=class extends _0x22b5ea{constructor(_0x2b5005,_0x483c55,_0x18f658){const _0x5844bb=_0x316f94;super(),this['_univerInstanceService']=_0x2b5005,this[_0x5844bb(0x1ca)]=_0x483c55,this['_collabSessionService']=_0x18f658,B(this,_0x5844bb(0x19d),new Map()),this[_0x5844bb(0x1f7)]();}async['getLiveShareCoordinator'](_0x474978){const _0x3e97ae=_0x316f94;return this[_0x3e97ae(0x19d)][_0x3e97ae(0x205)](_0x474978)||await this['_startLiveShareCoordinator'](_0x474978),this[_0x3e97ae(0x19d)][_0x3e97ae(0x20a)](_0x474978);}[_0x316f94(0x17f)](_0x2afed9){var _0x45f533;return(_0x45f533=this['_entities']['get'](_0x2afed9))==null?null:_0x45f533;}['_init'](){const _0x3cb980=_0x316f94;this[_0x3cb980(0x1da)][_0x3cb980(0x202)](_0x3134e5['UNIVER_SHEET'])[_0x3cb980(0x1ef)](_0x136b9e(this['dispose$']))[_0x3cb980(0x207)](async _0x449bc6=>{const _0x54fb72=_0x3cb980;let _0x399e13=_0x449bc6[_0x54fb72(0x18a)]();this[_0x54fb72(0x19d)][_0x54fb72(0x205)](_0x399e13)||this[_0x54fb72(0x182)](_0x399e13);}),this[_0x3cb980(0x1da)][_0x3cb980(0x183)](_0x3134e5[_0x3cb980(0x1fb)])[_0x3cb980(0x1ef)](_0x136b9e(this[_0x3cb980(0x1a2)]))[_0x3cb980(0x207)](_0x52dddf=>{const _0x21ae43=_0x3cb980;let _0x38c80d=_0x52dddf[_0x21ae43(0x18a)](),_0x1bd39b=this[_0x21ae43(0x19d)][_0x21ae43(0x20a)](_0x38c80d);_0x1bd39b==null||_0x1bd39b['dispose']();});}async[_0x316f94(0x182)](_0x118bb2){const _0x1c24f9=_0x316f94;let _0x53ff18=await this[_0x1c24f9(0x1bb)]['requireSession'](_0x118bb2),_0x55a184=this[_0x1c24f9(0x1ca)][_0x1c24f9(0x1cc)](K,_0x118bb2,_0x53ff18);return _0x55a184[_0x1c24f9(0x1ce)](),this[_0x1c24f9(0x19d)]['set'](_0x118bb2,_0x55a184),_0x55a184;}};W=U([H(0x0,_0x3302a5),H(0x1,_0x46b23b(_0x1d072d)),H(0x2,_0x46b23b(_0x29346c))],W);let G=function(_0x10c258){const _0xd080c1=_0x316f94;return _0x10c258[_0xd080c1(0x1a1)]='offline',_0x10c258['IDLE']=_0xd080c1(0x20f),_0x10c258[_0xd080c1(0x20d)]=_0xd080c1(0x19b),_0x10c258[_0xd080c1(0x1f4)]=_0xd080c1(0x1fc),_0x10c258[_0xd080c1(0x1eb)]=_0xd080c1(0x17c),_0x10c258;}({}),K=class extends _0x22b5ea{get[_0x316f94(0x199)](){const _0x29e248=_0x316f94;return this[_0x29e248(0x1b3)][_0x29e248(0x189)]();}constructor(_0x2408ac,_0x3e6e16,_0x273ef4,_0x50438a,_0x4cca86){const _0x3c881e=_0x316f94;super(),this[_0x3c881e(0x1d9)]=_0x2408ac,this[_0x3c881e(0x1e9)]=_0x3e6e16,this[_0x3c881e(0x1d1)]=_0x273ef4,this[_0x3c881e(0x178)]=_0x50438a,this['_commandService']=_0x4cca86,B(this,_0x3c881e(0x1b3),new _0x128b7d(G[_0x3c881e(0x1b8)])),B(this,_0x3c881e(0x177),this[_0x3c881e(0x1b3)][_0x3c881e(0x1ed)]()),B(this,_0x3c881e(0x1f7),!0x1),B(this,_0x3c881e(0x1e6),null),B(this,_0x3c881e(0x187),null);}[_0x316f94(0x1d5)](){const _0xe037be=_0x316f94;var _0x417a8d;(_0x417a8d=this['_commandDisposable'])==null||_0x417a8d['dispose'](),this[_0xe037be(0x1b3)][_0xe037be(0x1cd)](G[_0xe037be(0x1b8)]),this[_0xe037be(0x1b3)]['complete']();}['getStatus'](){const _0x3c6841=_0x316f94;return this[_0x3c6841(0x199)];}[_0x316f94(0x1ce)](){const _0x50ba0d=_0x316f94;this[_0x50ba0d(0x1f7)]||(this[_0x50ba0d(0x1f7)]=!0x0,this['_collabSession'][_0x50ba0d(0x1c7)][_0x50ba0d(0x1ef)](_0x136b9e(this[_0x50ba0d(0x1a2)]))[_0x50ba0d(0x207)](_0x39c7aa=>{const _0x441b6d=_0x50ba0d;switch(_0x39c7aa){case _0x3826d2[_0x441b6d(0x1a1)]:this['_handleOffline']();break;case _0x3826d2[_0x441b6d(0x18d)]:this[_0x441b6d(0x1cb)]();break;default:}}),this['_collabSession']['event$'][_0x50ba0d(0x1ef)](_0x136b9e(this[_0x50ba0d(0x1a2)]))['subscribe'](_0x198742=>{const _0x1d44e4=_0x50ba0d;let {eventID:_0x464edc}=_0x198742;switch(_0x464edc){case _0x3715c9[_0x1d44e4(0x1a5)]:this['_handleNewHost'](_0x198742);break;case _0x3715c9[_0x1d44e4(0x1bc)]:this[_0x1d44e4(0x17d)](_0x198742);break;case _0x3715c9[_0x1d44e4(0x1a4)]:this[_0x1d44e4(0x1ac)]();break;case _0x3715c9['NEW_CHANGESETS']:this[_0x1d44e4(0x1fa)](_0x198742);break;default:}}));}['tryStartPresenting'](){const _0x59e785=_0x316f94;this['_collabSession']['send']({'eventID':_0x3715c9[_0x59e785(0x1af)],'data':{'unitID':this[_0x59e785(0x1d9)],'userID':this[_0x59e785(0x1e9)][_0x59e785(0x18f)]()}},this[_0x59e785(0x1d9)]);}['stopPresenting'](){const _0x439c2d=_0x316f94;this[_0x439c2d(0x199)]===G[_0x439c2d(0x1eb)]&&(this['_status$'][_0x439c2d(0x1cd)](G[_0x439c2d(0x1b8)]),this[_0x439c2d(0x1e9)][_0x439c2d(0x1d2)]({'eventID':_0x3715c9['LIVESHARE_TERMINATE'],'data':{'unitID':this[_0x439c2d(0x1d9)]}},this[_0x439c2d(0x1d9)]));}['startFollowing'](){const _0x12a883=_0x316f94;this[_0x12a883(0x199)]===G['NOT_FOLLOWING']&&(this[_0x12a883(0x1b3)][_0x12a883(0x1cd)](G[_0x12a883(0x20d)]),this[_0x12a883(0x1f2)]());}['stopFollowing'](){const _0x6ac854=_0x316f94;this['_status']===G['FOLLOWING']&&this[_0x6ac854(0x1d8)]();}[_0x316f94(0x179)](_0xd601f5){const _0x418871=_0x316f94;let {presenter:_0x438b00}=_0xd601f5['data'],_0x17460e=this[_0x418871(0x1e9)][_0x418871(0x18f)]();this[_0x418871(0x187)]=_0x438b00,_0x438b00===_0x17460e?(this['_stopFollowing'](),this[_0x418871(0x194)]()):this[_0x418871(0x199)]!==G[_0x418871(0x1f4)]&&(this[_0x418871(0x1ff)](),this[_0x418871(0x1f2)]());}[_0x316f94(0x1f9)](){const _0x3828e2=_0x316f94;let _0x103491={'eventID':_0x3715c9['LIVESHARE_FETCH_OPERATIONS']};this['_collabSession'][_0x3828e2(0x1d2)](_0x103491,this[_0x3828e2(0x1d9)]);}[_0x316f94(0x1ac)](){const _0x3aa701=_0x316f94;this[_0x3aa701(0x187)]=null,this['_status']!==G[_0x3aa701(0x1eb)]&&this[_0x3aa701(0x17a)]();}[_0x316f94(0x1fa)](_0x500dfc){const _0x7da05b=_0x316f94;if(this[_0x7da05b(0x199)]===G[_0x7da05b(0x20d)]&&this[_0x7da05b(0x187)]===_0x500dfc[_0x7da05b(0x17b)]['memberID']){let _0x43f5a3=_0x1ff61d(_0x500dfc[_0x7da05b(0x17b)])[_0x7da05b(0x1f3)][_0x7da05b(0x1aa)]()[_0x7da05b(0x1a7)](_0x29521f=>_0x29521f['id']===_0x28332a['id']);if(_0x43f5a3){let _0x1be8f9=_0x43f5a3[_0x7da05b(0x1cf)][_0x7da05b(0x1a0)],_0xff2700=_0x43f5a3[_0x7da05b(0x1cf)][_0x7da05b(0x1df)]['id'];setTimeout(()=>{const _0x4f7788=_0x7da05b;this[_0x4f7788(0x195)][_0x4f7788(0x1f5)](_0x1ff449['id'],{'unitId':_0x1be8f9,'subUnitId':_0xff2700},{'fromCollab':!0x0});});}}}[_0x316f94(0x194)](){const _0x2ec733=_0x316f94;this[_0x2ec733(0x1b3)][_0x2ec733(0x1cd)](G[_0x2ec733(0x1eb)]);let _0x3a122d=new Map(),_0x172690=this[_0x2ec733(0x1e6)]=new _0x5adea4();_0x172690[_0x2ec733(0x1d0)](_0x45b351(()=>{const _0x4e09f0=_0x2ec733;_0x3a122d[_0x4e09f0(0x1ad)](_0x284dac=>_0x284dac['complete']()),_0x3a122d[_0x4e09f0(0x1ab)]();})),_0x172690[_0x2ec733(0x1d0)](this[_0x2ec733(0x195)][_0x2ec733(0x1a8)](_0x468d9e=>{const _0x476cba=_0x2ec733;if(_0x468d9e[_0x476cba(0x193)]!==_0x59b2d3[_0x476cba(0x1a9)]||!this[_0x476cba(0x178)][_0x476cba(0x1c8)](_0x468d9e['id']))return;let {id:_0xb9dc9}=_0x468d9e,_0x478df3;if(_0x3a122d[_0x476cba(0x205)](_0xb9dc9))_0x478df3=_0x3a122d['get'](_0xb9dc9);else{var _0x25df4b;_0x478df3=new _0x14ff59(),_0x3a122d[_0x476cba(0x203)](_0xb9dc9,_0x478df3),_0x478df3[_0x476cba(0x1ef)](_0x16df4d((_0x25df4b=this[_0x476cba(0x1d1)][_0x476cba(0x19f)](_0x476cba(0x197)))==null?0xc8:_0x25df4b,void 0x0,{'trailing':!0x0,'leading':!0x0}))[_0x476cba(0x207)](_0xb5fc86=>{const _0x201a01=_0x476cba;this[_0x201a01(0x1e9)][_0x201a01(0x1d2)]({'eventID':_0x3715c9[_0x201a01(0x1bc)],'data':{'unitID':this[_0x201a01(0x1d9)],'operations':{[_0xb5fc86['id']]:{'id':_0xb5fc86['id'],'params':JSON[_0x201a01(0x1b4)](_0xb5fc86['params'])}}}},this['_unitID']);});}_0x478df3[_0x476cba(0x1cd)](_0x468d9e);})),this[_0x2ec733(0x178)][_0x2ec733(0x1e5)](this['_unitID'])[_0x2ec733(0x1ad)](_0x471a72=>this[_0x2ec733(0x1e9)][_0x2ec733(0x1d2)]({'eventID':_0x3715c9[_0x2ec733(0x1bc)],'data':{'unitID':this[_0x2ec733(0x1d9)],'operations':{[_0x471a72['id']]:{'id':_0x471a72['id'],'params':JSON['stringify'](_0x471a72[_0x2ec733(0x1cf)])}}}},this[_0x2ec733(0x1d9)]));}[_0x316f94(0x1ff)](){const _0xa0307b=_0x316f94;var _0x17a87c;this[_0xa0307b(0x1b3)][_0xa0307b(0x1cd)](G[_0xa0307b(0x1b8)]),(_0x17a87c=this[_0xa0307b(0x1e6)])==null||_0x17a87c['dispose'](),this['_commandDisposable']=null;}[_0x316f94(0x1f2)](){const _0x206ece=_0x316f94;var _0x3c982a;(_0x3c982a=this[_0x206ece(0x1e6)])==null||_0x3c982a['dispose'](),this[_0x206ece(0x1b3)][_0x206ece(0x1cd)](G[_0x206ece(0x20d)]);}['_beIdle'](){const _0x853f50=_0x316f94;var _0x226aa3;this[_0x853f50(0x1b3)][_0x853f50(0x1cd)](G['IDLE']),(_0x226aa3=this['_commandDisposable'])==null||_0x226aa3[_0x853f50(0x1d5)](),this['_commandDisposable']=null;}[_0x316f94(0x1d8)](){const _0x5426a5=_0x316f94;var _0x42d82d;this['_status$'][_0x5426a5(0x1cd)](G[_0x5426a5(0x1f4)]),(_0x42d82d=this[_0x5426a5(0x1e6)])==null||_0x42d82d[_0x5426a5(0x1d5)]();}[_0x316f94(0x17d)](_0x3d43bb){const _0x4c8522=_0x316f94;if([G[_0x4c8522(0x1eb)],G['NOT_FOLLOWING'],G[_0x4c8522(0x1a1)]][_0x4c8522(0x1fe)](this[_0x4c8522(0x199)])||!_0x3d43bb[_0x4c8522(0x17b)][_0x4c8522(0x184)]||_0x3d43bb[_0x4c8522(0x17b)]['presenter']===this[_0x4c8522(0x1e9)]['getMemberID']())return;this[_0x4c8522(0x199)]===G[_0x4c8522(0x1b8)]&&this['_startFollowing']();let _0x54e36e=_0x3d43bb[_0x4c8522(0x17b)][_0x4c8522(0x1d7)];Object[_0x4c8522(0x1e7)](_0x54e36e)['forEach'](_0x15ab33=>{const _0x7f8e9=_0x4c8522;this[_0x7f8e9(0x195)][_0x7f8e9(0x1f5)](_0x15ab33['id'],_0x15ab33['params']?JSON[_0x7f8e9(0x1f6)](_0x15ab33[_0x7f8e9(0x1cf)]):null,{'fromCollab':!0x0});});}[_0x316f94(0x1b9)](){const _0x31efba=_0x316f94;var _0x46d91c;this[_0x31efba(0x1b3)][_0x31efba(0x1cd)](G[_0x31efba(0x1a1)]),(_0x46d91c=this[_0x31efba(0x1e6)])==null||_0x46d91c[_0x31efba(0x1d5)]();}[_0x316f94(0x1cb)](){const _0x3e724e=_0x316f94;this[_0x3e724e(0x1b3)]['next'](G[_0x3e724e(0x1b8)]),this[_0x3e724e(0x1f9)]();}};K=U([H(0x2,_0x557f50),H(0x3,_0x46b23b(V)),H(0x4,_0x41335f)],K);function q(){const _0x1a3a30=_0x316f94;let _0x189140=_0x32da5a(W),_0x4f313d=_0x32da5a(_0x3302a5),_0x383157=_0x3ea909(()=>_0x4f313d[_0x1a3a30(0x1b1)](_0x3134e5[_0x1a3a30(0x1fb)]),void 0x0,!0x1,[]),[_0x337bc9,_0xcc684c]=_0x3be037(null),[_0x228ee7,_0x16b755]=_0x3be037(G['IDLE']),_0x487fe9=_0x4a2319(null);return _0x2f1cba(()=>(_0x383157&&_0x189140[_0x1a3a30(0x1a3)](_0x383157[_0x1a3a30(0x18a)]())[_0x1a3a30(0x208)](_0x610749=>{const _0x394d16=_0x1a3a30;_0xcc684c(_0x610749),_0x487fe9[_0x394d16(0x1b6)]=_0x610749['status$'][_0x394d16(0x207)](_0x2c4feb=>{_0x16b755(_0x2c4feb);});}),()=>{const _0x2c5187=_0x1a3a30;var _0x1e14cc;(_0x1e14cc=_0x487fe9[_0x2c5187(0x1b6)])==null||_0x1e14cc[_0x2c5187(0x204)](),_0x487fe9['current']=null;}),[_0x383157,_0x189140]),_0x337bc9?_0x509609(_0x4cb2f3,{'align':'end','disabled':_0x228ee7===G[_0x1a3a30(0x1a1)],'className':'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','overlay':_0x509609(ce,{'status':_0x228ee7,'coordinator':_0x337bc9}),'children':_0x509609(_0x1a3a30(0x1dc),{'className':_0x3a1867(_0x1a3a30(0x19e),{'univer-cursor-not-allowed':_0x228ee7===G['OFFLINE'],'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x228ee7!==G['OFFLINE']}),'type':_0x1a3a30(0x1dc),'children':_0x509609(_0x3a9d6e,{'className':'univer-size-4'})})}):null;}function ce(_0x355703){const _0x39a89e=_0x316f94;let {status:_0x1e69d0,coordinator:_0x47d057}=_0x355703;switch(_0x1e69d0){case G[_0x39a89e(0x1b8)]:return _0x509609(le,{'coordinator':_0x47d057});case G[_0x39a89e(0x20d)]:return _0x509609(ue,{'coordinator':_0x47d057});case G[_0x39a89e(0x1f4)]:return _0x509609(de,{'coordinator':_0x47d057});case G[_0x39a89e(0x1a1)]:return _0x509609(fe,{});case G[_0x39a89e(0x1eb)]:return _0x509609(J,{'coordinator':_0x47d057});default:return null;}}function _0xb49f(){const _0x49a4c1=['has','onRendered','subscribe','then','_uiPartsService','get','275249lFqEgL','Start\x20following','FOLLOWING','_mountLiveShare','idle','status$','_liveShareService','_handleNewHost','_beIdle','data','presenting','_handleOperation','You\x27re\x20following\x20the\x20presenter','getLiveShareCoordinatorSync','registerInitialStateReporter','stopPresenting','_startLiveShareCoordinator','getTypeOfUnitDisposed$','presenter','div','@univerjs-pro/live-share','_presenter','0.20.1','getValue','getUnitId','setConfig','4IepavN','ONLINE','You\x27are\x20offline.','getMemberID','onStarting','override','You\x27re\x20not\x20following\x20the\x20presenter','type','_startPresenting','_commandService','registerComponent','SAME_OPERATION_SHARE_INTERVAL','6243396qBhOqU','_status','HEADER_MENU','following','Start','_entities','univer-border-none\x20univer-text-gray-600\x20univer-outline-none','getConfig','unitId','OFFLINE','dispose$','getLiveShareCoordinator','LIVESHARE_TERMINATE','LIVESHARE_NEW_HOST','default','find','onCommandExecuted','OPERATION','reverse','clear','_handleTerminate','forEach','symbol','LIVESHARE_REQUEST_HOST','live-share.config','getCurrentTypeOfUnit$','startFollowing','_status$','stringify','_sharedOperations','current','iterator','IDLE','_handleOffline','defineProperty','_collabSessionService','LIVESHARE_OPERATION','disposeWithMe','544582xOceXG','UNIVER_LIVE_SHARE_PLUGIN','object','version','packageName','UNIVER_UNKNOWN','_config','Stop\x20presenting','You\x27re\x20presenting\x20the\x20document','sessionStatus$','shouldShareOperation','delete','_injector','_handleOnline','createInstance','next','init','params','add','_configService','send','11210nMJkVv','call','dispose','_reporters','operations','_stopFollowing','_unitID','_univerInstanceService','length','button','text','12951oyRGuS','sheet','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','10442280Mwbzrw','function','tryStartPresenting','4946655YRvdgb','getInitialStates','_commandDisposable','values','9HfeRAq','_collabSession','decorate','PRESENTING','stopFollowing','asObservable','prototype','pipe','getOwnPropertyDescriptor','string','_startFollowing','mutations','NOT_FOLLOWING','executeCommand','parse','_init','5395165UhwbDT','_fetchOperations','_handleNewChangeSets','UNIVER_SHEET','not-following','registerSharedOperation','includes','_stopPresenting','Stop\x20following','univer-mb-3\x20univer-w-full\x20univer-text-sm','getTypeOfUnitAdded$','set','unsubscribe'];_0xb49f=function(){return _0x49a4c1;};return _0xb49f();}function le(_0xa7aaf6){const _0x5b2926=_0x316f94;let {coordinator:_0x18b3a0}=_0xa7aaf6;return _0x227845(_0x501d46,{'children':[_0x509609(_0x5b2926(0x185),{'className':_0x5b2926(0x201),'children':'Present\x20this\x20document'}),_0x509609(_0x4f7ec0,{'onClick':()=>_0x18b3a0[_0x5b2926(0x1e3)](),'children':_0x5b2926(0x19c)})]});}function ue(_0x52238a){const _0x321933=_0x316f94;let {coordinator:_0x2f8d60}=_0x52238a;return _0x227845(_0x501d46,{'children':[_0x509609(_0x321933(0x185),{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':_0x321933(0x17e)}),_0x509609(_0x4f7ec0,{'onClick':()=>_0x2f8d60[_0x321933(0x1ec)](),'children':_0x321933(0x200)})]});}function de(_0x273cf4){const _0x88b058=_0x316f94;let {coordinator:_0xd99e2d}=_0x273cf4;return _0x227845(_0x501d46,{'children':[_0x509609(_0x88b058(0x185),{'className':_0x88b058(0x201),'children':_0x88b058(0x192)}),_0x509609(_0x4f7ec0,{'variant':_0x88b058(0x1dd),'onClick':()=>_0xd99e2d[_0x88b058(0x1b2)](),'children':_0x88b058(0x20c)})]});}function J(_0x1fbc3d){const _0x2c0bf3=_0x316f94;let {coordinator:_0x4fa7f0}=_0x1fbc3d;return _0x227845(_0x501d46,{'children':[_0x509609(_0x2c0bf3(0x185),{'className':_0x2c0bf3(0x201),'children':_0x2c0bf3(0x1c6)}),_0x509609(_0x4f7ec0,{'variant':_0x2c0bf3(0x1a6),'onClick':()=>_0x4fa7f0[_0x2c0bf3(0x181)](),'children':_0x2c0bf3(0x1c5)})]});}function fe(){const _0x466b41=_0x316f94;return _0x509609(_0x501d46,{'children':_0x466b41(0x18e)});}let Y=class extends _0x2adf71{constructor(_0x352caf,_0x3d6cec){const _0xb675b1=_0x316f94;super(),this[_0xb675b1(0x1ca)]=_0x352caf,this[_0xb675b1(0x209)]=_0x3d6cec,this[_0xb675b1(0x20e)]();}[_0x316f94(0x20e)](){const _0x5cc56f=_0x316f94;this[_0x5cc56f(0x1bd)](this[_0x5cc56f(0x209)][_0x5cc56f(0x196)](_0x25173b[_0x5cc56f(0x19a)],()=>_0x4f41a9(q,this['_injector'])));}};Y=U([H(0x0,_0x46b23b(_0x1d072d)),H(0x1,_0x3b40e4)],Y);function _0x5391(_0x32d12b,_0x12e4cb){_0x32d12b=_0x32d12b-0x177;const _0xb49f3d=_0xb49f();let _0x539147=_0xb49f3d[_0x32d12b];return _0x539147;}var pe=_0x316f94(0x186),me=_0x316f94(0x188);const X=_0x316f94(0x1b0);Symbol(X);const Z={};let Q=class extends _0x2adf71{constructor(_0xe4578c){const _0xb1eb52=_0x316f94;super(),this[_0xb1eb52(0x178)]=_0xe4578c,this['_init']();}[_0x316f94(0x1f7)](){const _0x8bc95a=_0x316f94;[_0xefcc16['id'],_0x160a49['id'],_0x1ff449['id']][_0x8bc95a(0x1ad)](_0x9c10ee=>{const _0x31eb6b=_0x8bc95a;this[_0x31eb6b(0x1bd)](this['_liveShareService'][_0x31eb6b(0x1fd)](_0x9c10ee));});}};Q=U([H(0x0,_0x46b23b(V))],Q);let $=class extends _0x48ed37{constructor(_0x3b223f=Z,_0x31863f,_0x9f6c75){const _0x2c7af5=_0x316f94;super(),this[_0x2c7af5(0x1c4)]=_0x3b223f,this[_0x2c7af5(0x1ca)]=_0x31863f,this['_configService']=_0x9f6c75;let {..._0x3e1fc8}=_0x2e2be3({},Z,this['_config']);this[_0x2c7af5(0x1d1)][_0x2c7af5(0x18b)](X,_0x3e1fc8);}[_0x316f94(0x190)](){const _0x35b826=_0x316f94;_0x581342(this['_injector'],_0x3d81e7([[V],[W],[Q],[Y]],this[_0x35b826(0x1c4)][_0x35b826(0x191)])),_0x52a28d(this['_injector'],[[Q]]);}[_0x316f94(0x206)](){const _0x1f5c2b=_0x316f94;_0x52a28d(this[_0x1f5c2b(0x1ca)],[[Y]]);}};B($,'type',_0x3134e5[_0x316f94(0x1c3)]),B($,'pluginName',_0x316f94(0x1bf)),B($,_0x316f94(0x1c2),pe),B($,_0x316f94(0x1c1),me),$=U([_0x4a35d8(_0x42f673),H(0x1,_0x46b23b(_0x1d072d)),H(0x2,_0x557f50)],$);export{Y as DesktopLiveShareController,q as LiveShare,W as LiveShareController,K as LiveShareCoordinator,V as LiveShareService,G as LiveShareStatus,$ as UniverLiveSharePlugin};
1
+ const _0x145510=_0x468b;(function(_0x589d39,_0x5a2e00){const _0x38d1d8=_0x468b,_0x5a87ef=_0x589d39();while(!![]){try{const _0x730308=parseInt(_0x38d1d8(0x161))/0x1+parseInt(_0x38d1d8(0x18e))/0x2+parseInt(_0x38d1d8(0x139))/0x3*(parseInt(_0x38d1d8(0x131))/0x4)+-parseInt(_0x38d1d8(0x177))/0x5+-parseInt(_0x38d1d8(0x19c))/0x6+parseInt(_0x38d1d8(0x176))/0x7*(-parseInt(_0x38d1d8(0x188))/0x8)+parseInt(_0x38d1d8(0x183))/0x9;if(_0x730308===_0x5a2e00)break;else _0x5a87ef['push'](_0x5a87ef['shift']());}catch(_0x5ae1e4){_0x5a87ef['push'](_0x5a87ef['shift']());}}}(_0x37bc,0x69b20));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';function _0x468b(_0x135c14,_0x3899fe){_0x135c14=_0x135c14-0x12f;const _0x37bc96=_0x37bc();let _0x468bc4=_0x37bc96[_0x135c14];return _0x468bc4;}import{CollaborationEvent,parseProtocolChangeset}from'@univerjs-pro/collaboration';function _0x37bc(){const _0x10e528=['Stop\x20presenting','getValue','string','clear','getLiveShareCoordinatorSync','complete','onRendered','_configService','find','registerComponent','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','getOwnPropertyDescriptor','_status','registerSharedOperation','_mountLiveShare','stopFollowing','dispose$','init','has','_handleOnline','add','stringify','disposeWithMe','OPERATION','@univerjs-pro/live-share','getInitialStates','univer-mb-3\x20univer-w-full\x20univer-text-sm','presenting','UNIVER_SHEET','shouldShareOperation','symbol','_uiPartsService','_fetchOperations','object','302512ZyafqF','OFFLINE','dispose','set','operations','data','params','HEADER_MENU','subscribe','sessionStatus$','_stopFollowing','unitId','_startFollowing','createInstance','next','Start','sheet','status$','following','_startPresenting','asObservable','28uraIdl','3293745EhzWub','type','_config','length','_stopPresenting','defineProperty','toPrimitive','UNIVER_LIVE_SHARE_PLUGIN','You\x27are\x20offline.','pipe','stopPresenting','div','2796840asYDfY','from','ONLINE','_handleNewChangeSets','_handleOffline','454288UPbkfV','then','Start\x20following','executeCommand','version','end','1210650MlGhtA','reverse','_init','not-following','_sharedOperations','getCurrentTypeOfUnit$','getConfig','_injector','_reporters','button','registerInitialStateReporter','getStatus','send','_collabSession','1345266IkZlKw','tryStartPresenting','_commandService','univer-border-none\x20univer-text-gray-600\x20univer-outline-none','You\x27re\x20following\x20the\x20presenter','_handleNewHost','delete','decorate','_collabSessionService','LIVESHARE_FETCH_OPERATIONS','override','Stop\x20following','get','_presenter','SAME_OPERATION_SHARE_INTERVAL','current','default','unsubscribe','values','function','presenter','LIVESHARE_REQUEST_HOST','_status$','event$','_beIdle','NOT_FOLLOWING','_handleTerminate','getLiveShareCoordinator','_univerInstanceService','text','_startLiveShareCoordinator','NEW_CHANGESETS','getTypeOfUnitAdded$','PRESENTING','You\x27re\x20not\x20following\x20the\x20presenter','parse','getMemberID','includes','_unitID','_commandDisposable','constructor','2012lQltjD','startFollowing','iterator','getUnitId','FOLLOWING','pluginName','forEach','_liveShareService','1935XJrWiY','LIVESHARE_TERMINATE','_entities','LIVESHARE_OPERATION','IDLE','getTypeOfUnitDisposed$'];_0x37bc=function(){return _0x10e528;};return _0x37bc();}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(_0x2c1592){'@babel/helpers - typeof';const _0x9ddc8f=_0x468b;return _typeof=_0x9ddc8f(0x1af)==typeof Symbol&&_0x9ddc8f(0x15d)==typeof Symbol[_0x9ddc8f(0x133)]?function(_0x25b7e2){return typeof _0x25b7e2;}:function(_0x193da1){const _0x22fe08=_0x9ddc8f;return _0x193da1&&_0x22fe08(0x1af)==typeof Symbol&&_0x193da1[_0x22fe08(0x130)]===Symbol&&_0x193da1!==Symbol['prototype']?_0x22fe08(0x15d):typeof _0x193da1;},_typeof(_0x2c1592);}function toPrimitive(_0x4d3b76,_0x1823ff){const _0x5835ef=_0x468b;if('object'!=_typeof(_0x4d3b76)||!_0x4d3b76)return _0x4d3b76;var _0x35254d=_0x4d3b76[Symbol[_0x5835ef(0x17d)]];if(void 0x0!==_0x35254d){var _0xe522a=_0x35254d['call'](_0x4d3b76,_0x1823ff||_0x5835ef(0x1ac));if(_0x5835ef(0x160)!=_typeof(_0xe522a))return _0xe522a;throw new TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x5835ef(0x141)===_0x1823ff?String:Number)(_0x4d3b76);}function toPropertyKey(_0x1e7b66){const _0x2377bf=_0x468b;var _0x251fa2=toPrimitive(_0x1e7b66,_0x2377bf(0x141));return'symbol'==_typeof(_0x251fa2)?_0x251fa2:_0x251fa2+'';}function _defineProperty(_0x5b3693,_0x37ae5c,_0x1ead9e){return(_0x37ae5c=toPropertyKey(_0x37ae5c))in _0x5b3693?Object['defineProperty'](_0x5b3693,_0x37ae5c,{'value':_0x1ead9e,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x5b3693[_0x37ae5c]=_0x1ead9e,_0x5b3693;}var LiveShareService=class extends Disposable{constructor(..._0x545f8c){const _0x1c1f5f=_0x468b;super(..._0x545f8c),_defineProperty(this,_0x1c1f5f(0x192),new Set()),_defineProperty(this,_0x1c1f5f(0x196),new Set());}[_0x145510(0x14c)](_0xd2771e){const _0x44753e=_0x145510;return this[_0x44753e(0x192)]['add'](_0xd2771e),toDisposable(()=>this[_0x44753e(0x192)][_0x44753e(0x1a2)](_0xd2771e));}[_0x145510(0x198)](_0x4cf88c){const _0x4d7afc=_0x145510;return this[_0x4d7afc(0x196)][_0x4d7afc(0x153)](_0x4cf88c),toDisposable(()=>this[_0x4d7afc(0x196)][_0x4d7afc(0x1a2)](_0x4cf88c));}[_0x145510(0x15c)](_0x521b7c){const _0x412465=_0x145510;return this[_0x412465(0x192)]['has'](_0x521b7c);}[_0x145510(0x158)](_0x4e1a46){const _0x30f8e4=_0x145510;return Array[_0x30f8e4(0x184)](this['_reporters'])['map'](_0x31713c=>_0x31713c(_0x4e1a46));}};function __decorateParam(_0xb5c562,_0x1c3e5c){return function(_0x35c097,_0x2415f0){_0x1c3e5c(_0x35c097,_0x2415f0,_0xb5c562);};}function __decorate(_0x304c27,_0x1160c7,_0x128c22,_0x9f2ff1){const _0x64ccb1=_0x145510;var _0x5e7126=arguments[_0x64ccb1(0x17a)],_0x3d6f56=_0x5e7126<0x3?_0x1160c7:_0x9f2ff1===null?_0x9f2ff1=Object[_0x64ccb1(0x14a)](_0x1160c7,_0x128c22):_0x9f2ff1,_0x277d1d;if(typeof Reflect===_0x64ccb1(0x160)&&typeof Reflect[_0x64ccb1(0x1a3)]===_0x64ccb1(0x1af))_0x3d6f56=Reflect[_0x64ccb1(0x1a3)](_0x304c27,_0x1160c7,_0x128c22,_0x9f2ff1);else{for(var _0x2286d5=_0x304c27[_0x64ccb1(0x17a)]-0x1;_0x2286d5>=0x0;_0x2286d5--)if(_0x277d1d=_0x304c27[_0x2286d5])_0x3d6f56=(_0x5e7126<0x3?_0x277d1d(_0x3d6f56):_0x5e7126>0x3?_0x277d1d(_0x1160c7,_0x128c22,_0x3d6f56):_0x277d1d(_0x1160c7,_0x128c22))||_0x3d6f56;}return _0x5e7126>0x3&&_0x3d6f56&&Object[_0x64ccb1(0x17c)](_0x1160c7,_0x128c22,_0x3d6f56),_0x3d6f56;}let LiveShareController=class LiveShareController extends RxDisposable{constructor(_0x250c6f,_0x5b36c8,_0x14e218){const _0x2b9f2f=_0x145510;super(),this[_0x2b9f2f(0x1b8)]=_0x250c6f,this[_0x2b9f2f(0x195)]=_0x5b36c8,this['_collabSessionService']=_0x14e218,_defineProperty(this,_0x2b9f2f(0x13b),new Map()),this[_0x2b9f2f(0x190)]();}async[_0x145510(0x1b7)](_0x5bfac5){const _0x53b975=_0x145510;if(!this[_0x53b975(0x13b)]['has'](_0x5bfac5))await this[_0x53b975(0x1ba)](_0x5bfac5);return this[_0x53b975(0x13b)]['get'](_0x5bfac5);}[_0x145510(0x143)](_0x3e53dc){var _0x16c001;return(_0x16c001=this['_entities']['get'](_0x3e53dc))!==null&&_0x16c001!==void 0x0?_0x16c001:null;}[_0x145510(0x190)](){const _0x1df144=_0x145510;this[_0x1df144(0x1b8)][_0x1df144(0x1bc)](UniverInstanceType['UNIVER_SHEET'])[_0x1df144(0x180)](takeUntil(this[_0x1df144(0x14f)]))[_0x1df144(0x169)](async _0xc76900=>{const _0x1782e1=_0x1df144,_0xd234c1=_0xc76900[_0x1782e1(0x134)]();if(this[_0x1782e1(0x13b)][_0x1782e1(0x151)](_0xd234c1))return;this[_0x1782e1(0x1ba)](_0xd234c1);}),this[_0x1df144(0x1b8)][_0x1df144(0x13e)](UniverInstanceType[_0x1df144(0x15b)])[_0x1df144(0x180)](takeUntil(this[_0x1df144(0x14f)]))[_0x1df144(0x169)](_0x1cba0d=>{const _0x311621=_0x1df144,_0x4a9d8d=_0x1cba0d[_0x311621(0x134)](),_0x38503a=this['_entities'][_0x311621(0x1a8)](_0x4a9d8d);_0x38503a===null||_0x38503a===void 0x0||_0x38503a[_0x311621(0x163)]();});}async[_0x145510(0x1ba)](_0x1a7a36){const _0x4404e0=_0x145510,_0x2a9d85=await this[_0x4404e0(0x1a4)]['requireSession'](_0x1a7a36),_0x432388=this[_0x4404e0(0x195)][_0x4404e0(0x16e)](LiveShareCoordinator,_0x1a7a36,_0x2a9d85);return _0x432388[_0x4404e0(0x150)](),this[_0x4404e0(0x13b)][_0x4404e0(0x164)](_0x1a7a36,_0x432388),_0x432388;}};LiveShareController=__decorate([__decorateParam(0x0,IUniverInstanceService),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,Inject(CollaborationSessionService))],LiveShareController);let LiveShareStatus=function(_0x2fa46f){const _0x206757=_0x145510;return _0x2fa46f[_0x206757(0x162)]='offline',_0x2fa46f[_0x206757(0x13d)]='idle',_0x2fa46f[_0x206757(0x135)]=_0x206757(0x173),_0x2fa46f[_0x206757(0x1b5)]=_0x206757(0x191),_0x2fa46f[_0x206757(0x1bd)]=_0x206757(0x15a),_0x2fa46f;}({});const SAME_OPERATION_SHARE_INTERVAL_KEY=_0x145510(0x1aa),DEFAULT_SAME_OPERATION_SHARE_INTERVAL=0xc8;let LiveShareCoordinator=class LiveShareCoordinator extends RxDisposable{get['_status'](){const _0x640031=_0x145510;return this[_0x640031(0x1b2)][_0x640031(0x140)]();}constructor(_0x4b75ad,_0x42486a,_0x3a8f24,_0x145748,_0x4d95b4){const _0x1d1889=_0x145510;super(),this[_0x1d1889(0x1c2)]=_0x4b75ad,this[_0x1d1889(0x19b)]=_0x42486a,this['_configService']=_0x3a8f24,this[_0x1d1889(0x138)]=_0x145748,this[_0x1d1889(0x19e)]=_0x4d95b4,_defineProperty(this,_0x1d1889(0x1b2),new BehaviorSubject(LiveShareStatus[_0x1d1889(0x13d)])),_defineProperty(this,_0x1d1889(0x172),this[_0x1d1889(0x1b2)][_0x1d1889(0x175)]()),_defineProperty(this,_0x1d1889(0x190),![]),_defineProperty(this,_0x1d1889(0x12f),null),_defineProperty(this,_0x1d1889(0x1a9),null);}[_0x145510(0x163)](){const _0x540676=_0x145510;var _0x1375f6;(_0x1375f6=this['_commandDisposable'])===null||_0x1375f6===void 0x0||_0x1375f6[_0x540676(0x163)](),this[_0x540676(0x1b2)][_0x540676(0x16f)](LiveShareStatus['IDLE']),this[_0x540676(0x1b2)][_0x540676(0x144)]();}[_0x145510(0x199)](){const _0xb1b89a=_0x145510;return this[_0xb1b89a(0x14b)];}[_0x145510(0x150)](){const _0x3fc54a=_0x145510;if(this[_0x3fc54a(0x190)])return;this[_0x3fc54a(0x190)]=!![],this[_0x3fc54a(0x19b)][_0x3fc54a(0x16a)]['pipe'](takeUntil(this[_0x3fc54a(0x14f)]))['subscribe'](_0xefe6f0=>{const _0x5de895=_0x3fc54a;switch(_0xefe6f0){case SessionStatus[_0x5de895(0x162)]:this[_0x5de895(0x187)]();break;case SessionStatus[_0x5de895(0x185)]:this[_0x5de895(0x152)]();break;default:}}),this['_collabSession'][_0x3fc54a(0x1b3)]['pipe'](takeUntil(this[_0x3fc54a(0x14f)]))[_0x3fc54a(0x169)](_0x3006d8=>{const _0x6eda27=_0x3fc54a,{eventID:_0x3d4d8e}=_0x3006d8;switch(_0x3d4d8e){case CollaborationEvent['LIVESHARE_NEW_HOST']:this[_0x6eda27(0x1a1)](_0x3006d8);break;case CollaborationEvent[_0x6eda27(0x13c)]:this['_handleOperation'](_0x3006d8);break;case CollaborationEvent[_0x6eda27(0x13a)]:this[_0x6eda27(0x1b6)]();break;case CollaborationEvent[_0x6eda27(0x1bb)]:this[_0x6eda27(0x186)](_0x3006d8);break;default:}});}[_0x145510(0x19d)](){const _0x661b95=_0x145510;this[_0x661b95(0x19b)][_0x661b95(0x19a)]({'eventID':CollaborationEvent[_0x661b95(0x1b1)],'data':{'unitID':this[_0x661b95(0x1c2)],'userID':this[_0x661b95(0x19b)]['getMemberID']()}},this[_0x661b95(0x1c2)]);}[_0x145510(0x181)](){const _0x6e1112=_0x145510;this['_status']===LiveShareStatus[_0x6e1112(0x1bd)]&&(this[_0x6e1112(0x1b2)][_0x6e1112(0x16f)](LiveShareStatus[_0x6e1112(0x13d)]),this[_0x6e1112(0x19b)][_0x6e1112(0x19a)]({'eventID':CollaborationEvent[_0x6e1112(0x13a)],'data':{'unitID':this[_0x6e1112(0x1c2)]}},this[_0x6e1112(0x1c2)]));}[_0x145510(0x132)](){const _0x523a96=_0x145510;if(this[_0x523a96(0x14b)]!==LiveShareStatus['NOT_FOLLOWING'])return;this['_status$'][_0x523a96(0x16f)](LiveShareStatus[_0x523a96(0x135)]),this[_0x523a96(0x16d)]();}['stopFollowing'](){const _0x48ec01=_0x145510;if(this[_0x48ec01(0x14b)]!==LiveShareStatus[_0x48ec01(0x135)])return;this[_0x48ec01(0x16b)]();}[_0x145510(0x1a1)](_0xc062d4){const _0xc3ea15=_0x145510,{presenter:_0x1ad39a}=_0xc062d4[_0xc3ea15(0x166)],_0x1e1d8f=this[_0xc3ea15(0x19b)]['getMemberID']();this[_0xc3ea15(0x1a9)]=_0x1ad39a;if(_0x1ad39a===_0x1e1d8f)this[_0xc3ea15(0x16b)](),this[_0xc3ea15(0x174)]();else this[_0xc3ea15(0x14b)]!==LiveShareStatus[_0xc3ea15(0x1b5)]&&(this[_0xc3ea15(0x17b)](),this[_0xc3ea15(0x16d)]());}[_0x145510(0x15f)](){const _0x50c188=_0x145510,_0x1ae305={'eventID':CollaborationEvent[_0x50c188(0x1a5)]};this[_0x50c188(0x19b)]['send'](_0x1ae305,this['_unitID']);}[_0x145510(0x1b6)](){const _0x303715=_0x145510;this[_0x303715(0x1a9)]=null;if(this[_0x303715(0x14b)]!==LiveShareStatus[_0x303715(0x1bd)])this[_0x303715(0x1b4)]();}[_0x145510(0x186)](_0x8656e9){const _0x2b7b6a=_0x145510;if(this[_0x2b7b6a(0x14b)]===LiveShareStatus[_0x2b7b6a(0x135)]&&this[_0x2b7b6a(0x1a9)]===_0x8656e9[_0x2b7b6a(0x166)]['memberID']){const _0x521de4=parseProtocolChangeset(_0x8656e9[_0x2b7b6a(0x166)])['mutations'][_0x2b7b6a(0x18f)]()[_0x2b7b6a(0x147)](_0x254745=>_0x254745['id']===InsertSheetMutation['id']);if(_0x521de4){const _0x311bec=_0x521de4[_0x2b7b6a(0x167)][_0x2b7b6a(0x16c)],_0x2e15ba=_0x521de4[_0x2b7b6a(0x167)][_0x2b7b6a(0x171)]['id'];setTimeout(()=>{const _0x41a75b=_0x2b7b6a;this[_0x41a75b(0x19e)][_0x41a75b(0x18b)](SetWorksheetActiveOperation['id'],{'unitId':_0x311bec,'subUnitId':_0x2e15ba},{'fromCollab':!![]});});}}}[_0x145510(0x174)](){const _0x5abaa7=_0x145510;this[_0x5abaa7(0x1b2)][_0x5abaa7(0x16f)](LiveShareStatus[_0x5abaa7(0x1bd)]);const _0x54587d=new Map(),_0xfbb8f0=this[_0x5abaa7(0x12f)]=new DisposableCollection();_0xfbb8f0['add'](toDisposable(()=>{const _0x3c78c5=_0x5abaa7;_0x54587d[_0x3c78c5(0x137)](_0x232161=>_0x232161['complete']()),_0x54587d[_0x3c78c5(0x142)]();})),_0xfbb8f0[_0x5abaa7(0x153)](this['_commandService']['onCommandExecuted'](_0x2b3b1b=>{const _0x11d922=_0x5abaa7;if(_0x2b3b1b[_0x11d922(0x178)]!==CommandType[_0x11d922(0x156)]||!this[_0x11d922(0x138)]['shouldShareOperation'](_0x2b3b1b['id']))return;const {id:_0x3fd3c8}=_0x2b3b1b;let _0x5054c5;if(!_0x54587d[_0x11d922(0x151)](_0x3fd3c8)){var _0x4966b6;_0x5054c5=new Subject(),_0x54587d['set'](_0x3fd3c8,_0x5054c5),_0x5054c5[_0x11d922(0x180)](throttleTime((_0x4966b6=this[_0x11d922(0x146)][_0x11d922(0x194)](_0x11d922(0x1aa)))!==null&&_0x4966b6!==void 0x0?_0x4966b6:DEFAULT_SAME_OPERATION_SHARE_INTERVAL,void 0x0,{'trailing':!![],'leading':!![]}))['subscribe'](_0x3fe255=>{const _0x1b7157=_0x11d922;this[_0x1b7157(0x19b)][_0x1b7157(0x19a)]({'eventID':CollaborationEvent[_0x1b7157(0x13c)],'data':{'unitID':this['_unitID'],'operations':{[_0x3fe255['id']]:{'id':_0x3fe255['id'],'params':JSON[_0x1b7157(0x154)](_0x3fe255[_0x1b7157(0x167)])}}}},this[_0x1b7157(0x1c2)]);});}else _0x5054c5=_0x54587d[_0x11d922(0x1a8)](_0x3fd3c8);_0x5054c5[_0x11d922(0x16f)](_0x2b3b1b);})),this['_liveShareService']['getInitialStates'](this[_0x5abaa7(0x1c2)])[_0x5abaa7(0x137)](_0x1ab225=>this[_0x5abaa7(0x19b)][_0x5abaa7(0x19a)]({'eventID':CollaborationEvent[_0x5abaa7(0x13c)],'data':{'unitID':this[_0x5abaa7(0x1c2)],'operations':{[_0x1ab225['id']]:{'id':_0x1ab225['id'],'params':JSON[_0x5abaa7(0x154)](_0x1ab225['params'])}}}},this['_unitID']));}[_0x145510(0x17b)](){const _0x48679c=_0x145510;var _0x4990ab;this[_0x48679c(0x1b2)][_0x48679c(0x16f)](LiveShareStatus[_0x48679c(0x13d)]),(_0x4990ab=this['_commandDisposable'])===null||_0x4990ab===void 0x0||_0x4990ab[_0x48679c(0x163)](),this[_0x48679c(0x12f)]=null;}[_0x145510(0x16d)](){const _0x1b11c0=_0x145510;var _0x2c726f;(_0x2c726f=this[_0x1b11c0(0x12f)])===null||_0x2c726f===void 0x0||_0x2c726f[_0x1b11c0(0x163)](),this[_0x1b11c0(0x1b2)][_0x1b11c0(0x16f)](LiveShareStatus[_0x1b11c0(0x135)]);}[_0x145510(0x1b4)](){const _0x514fd0=_0x145510;var _0x146e70;this['_status$']['next'](LiveShareStatus[_0x514fd0(0x13d)]),(_0x146e70=this[_0x514fd0(0x12f)])===null||_0x146e70===void 0x0||_0x146e70[_0x514fd0(0x163)](),this[_0x514fd0(0x12f)]=null;}['_stopFollowing'](){const _0xc76920=_0x145510;var _0x1ac0c6;this[_0xc76920(0x1b2)][_0xc76920(0x16f)](LiveShareStatus[_0xc76920(0x1b5)]),(_0x1ac0c6=this[_0xc76920(0x12f)])===null||_0x1ac0c6===void 0x0||_0x1ac0c6[_0xc76920(0x163)]();}['_handleOperation'](_0x56a96d){const _0x50295d=_0x145510;if([LiveShareStatus['PRESENTING'],LiveShareStatus[_0x50295d(0x1b5)],LiveShareStatus[_0x50295d(0x162)]][_0x50295d(0x1c1)](this['_status']))return;if(!_0x56a96d[_0x50295d(0x166)][_0x50295d(0x1b0)]||_0x56a96d['data'][_0x50295d(0x1b0)]===this[_0x50295d(0x19b)][_0x50295d(0x1c0)]())return;if(this[_0x50295d(0x14b)]===LiveShareStatus[_0x50295d(0x13d)])this[_0x50295d(0x16d)]();const _0x1db15b=_0x56a96d[_0x50295d(0x166)][_0x50295d(0x165)];Object[_0x50295d(0x1ae)](_0x1db15b)[_0x50295d(0x137)](_0x357d73=>{const _0x5b390b=_0x50295d;this[_0x5b390b(0x19e)][_0x5b390b(0x18b)](_0x357d73['id'],_0x357d73['params']?JSON[_0x5b390b(0x1bf)](_0x357d73[_0x5b390b(0x167)]):null,{'fromCollab':!![]});});}[_0x145510(0x187)](){const _0x50b838=_0x145510;var _0x1018ea;this['_status$']['next'](LiveShareStatus[_0x50b838(0x162)]),(_0x1018ea=this[_0x50b838(0x12f)])===null||_0x1018ea===void 0x0||_0x1018ea[_0x50b838(0x163)]();}[_0x145510(0x152)](){const _0x16e2ec=_0x145510;this[_0x16e2ec(0x1b2)][_0x16e2ec(0x16f)](LiveShareStatus['IDLE']),this['_fetchOperations']();}};LiveShareCoordinator=__decorate([__decorateParam(0x2,IConfigService),__decorateParam(0x3,Inject(LiveShareService)),__decorateParam(0x4,ICommandService)],LiveShareCoordinator);function LiveShare(){const _0x18b18d=_0x145510,_0x398817=useDependency(LiveShareController),_0x2827f5=useDependency(IUniverInstanceService),_0x12796e=useObservable(()=>_0x2827f5[_0x18b18d(0x193)](UniverInstanceType[_0x18b18d(0x15b)]),void 0x0,![],[]),[_0x381085,_0x13eb19]=useState(null),[_0x3b9769,_0x554195]=useState(LiveShareStatus['IDLE']),_0x1b0ac0=useRef(null);useEffect(()=>{const _0x42747e=_0x18b18d;if(_0x12796e)_0x398817[_0x42747e(0x1b7)](_0x12796e['getUnitId']())[_0x42747e(0x189)](_0x539d2b=>{const _0x1c627f=_0x42747e;_0x13eb19(_0x539d2b),_0x1b0ac0['current']=_0x539d2b[_0x1c627f(0x172)][_0x1c627f(0x169)](_0x49e18f=>{_0x554195(_0x49e18f);});});return()=>{const _0x4f485e=_0x42747e;var _0x29cf09;(_0x29cf09=_0x1b0ac0['current'])===null||_0x29cf09===void 0x0||_0x29cf09[_0x4f485e(0x1ad)](),_0x1b0ac0[_0x4f485e(0x1ab)]=null;};},[_0x12796e,_0x398817]);if(!_0x381085)return null;return jsx(Dropdown,{'align':_0x18b18d(0x18d),'disabled':_0x3b9769===LiveShareStatus['OFFLINE'],'className':_0x18b18d(0x149),'overlay':jsx(LiveShareDropdown,{'status':_0x3b9769,'coordinator':_0x381085}),'children':jsx('button',{'className':clsx(_0x18b18d(0x19f),{'univer-cursor-not-allowed':_0x3b9769===LiveShareStatus[_0x18b18d(0x162)],'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x3b9769!==LiveShareStatus['OFFLINE']}),'type':_0x18b18d(0x197),'children':jsx(LiveShareIcon,{'className':'univer-size-4'})})});}function LiveShareDropdown(_0x49552a){const _0x1a9b4e=_0x145510,{status:_0x4d47d2,coordinator:_0x541606}=_0x49552a;switch(_0x4d47d2){case LiveShareStatus['IDLE']:return jsx(Idle,{'coordinator':_0x541606});case LiveShareStatus['FOLLOWING']:return jsx(Following,{'coordinator':_0x541606});case LiveShareStatus[_0x1a9b4e(0x1b5)]:return jsx(NotFollowing,{'coordinator':_0x541606});case LiveShareStatus[_0x1a9b4e(0x162)]:return jsx(Offline,{});case LiveShareStatus['PRESENTING']:return jsx(Presenting,{'coordinator':_0x541606});default:return null;}}function Idle(_0x4273ca){const _0x20c171=_0x145510,{coordinator:_0x3c5bc9}=_0x4273ca;return jsxs(Fragment,{'children':[jsx(_0x20c171(0x182),{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':'Present\x20this\x20document'}),jsx(Button,{'onClick':()=>_0x3c5bc9[_0x20c171(0x19d)](),'children':_0x20c171(0x170)})]});}function Following(_0x346a56){const _0x55a4cc=_0x145510,{coordinator:_0x134617}=_0x346a56;return jsxs(Fragment,{'children':[jsx(_0x55a4cc(0x182),{'className':_0x55a4cc(0x159),'children':_0x55a4cc(0x1a0)}),jsx(Button,{'onClick':()=>_0x134617[_0x55a4cc(0x14e)](),'children':_0x55a4cc(0x1a7)})]});}function NotFollowing(_0x57bf12){const _0x49a386=_0x145510,{coordinator:_0x29442a}=_0x57bf12;return jsxs(Fragment,{'children':[jsx(_0x49a386(0x182),{'className':_0x49a386(0x159),'children':_0x49a386(0x1be)}),jsx(Button,{'variant':_0x49a386(0x1b9),'onClick':()=>_0x29442a[_0x49a386(0x132)](),'children':_0x49a386(0x18a)})]});}function Presenting(_0x5393e8){const _0x10f9d8=_0x145510,{coordinator:_0x57135c}=_0x5393e8;return jsxs(Fragment,{'children':[jsx(_0x10f9d8(0x182),{'className':_0x10f9d8(0x159),'children':'You\x27re\x20presenting\x20the\x20document'}),jsx(Button,{'variant':_0x10f9d8(0x1ac),'onClick':()=>_0x57135c[_0x10f9d8(0x181)](),'children':_0x10f9d8(0x13f)})]});}function Offline(){const _0x353128=_0x145510;return jsx(Fragment,{'children':_0x353128(0x17f)});}let DesktopLiveShareController=class DesktopLiveShareController extends Disposable{constructor(_0x1e3586,_0x301d01){const _0x2fe817=_0x145510;super(),this[_0x2fe817(0x195)]=_0x1e3586,this['_uiPartsService']=_0x301d01,this[_0x2fe817(0x14d)]();}[_0x145510(0x14d)](){const _0x172755=_0x145510;this[_0x172755(0x155)](this[_0x172755(0x15e)][_0x172755(0x148)](BuiltInUIPart[_0x172755(0x168)],()=>connectInjector(LiveShare,this[_0x172755(0x195)])));}};DesktopLiveShareController=__decorate([__decorateParam(0x0,Inject(Injector)),__decorateParam(0x1,IUIPartsService)],DesktopLiveShareController);var name=_0x145510(0x157),version='0.21.0';const LIVE_SHARE_PLUGIN_CONFIG_KEY='live-share.config',configSymbol=Symbol(LIVE_SHARE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let LiveShareCoreExtensionsController=class LiveShareCoreExtensionsController extends Disposable{constructor(_0x4bdbcc){const _0x50a80e=_0x145510;super(),this[_0x50a80e(0x138)]=_0x4bdbcc,this[_0x50a80e(0x190)]();}[_0x145510(0x190)](){const _0x3ef097=_0x145510;[SetZoomRatioOperation['id'],SetScrollOperation['id'],SetWorksheetActiveOperation['id']][_0x3ef097(0x137)](_0x9af2a7=>{const _0xdf9e63=_0x3ef097;this['disposeWithMe'](this[_0xdf9e63(0x138)][_0xdf9e63(0x14c)](_0x9af2a7));});}};LiveShareCoreExtensionsController=__decorate([__decorateParam(0x0,Inject(LiveShareService))],LiveShareCoreExtensionsController);let UniverLiveSharePlugin=class UniverLiveSharePlugin extends Plugin{constructor(_0x36a39b=defaultPluginConfig,_0x43320d,_0x52d45e){const _0x564a81=_0x145510;super(),this[_0x564a81(0x179)]=_0x36a39b,this['_injector']=_0x43320d,this[_0x564a81(0x146)]=_0x52d45e;const {..._0x27ffc2}=merge({},defaultPluginConfig,this[_0x564a81(0x179)]);this['_configService']['setConfig'](LIVE_SHARE_PLUGIN_CONFIG_KEY,_0x27ffc2);}['onStarting'](){const _0x4e5170=_0x145510;registerDependencies(this[_0x4e5170(0x195)],mergeOverrideWithDependencies([[LiveShareService],[LiveShareController],[LiveShareCoreExtensionsController],[DesktopLiveShareController]],this['_config'][_0x4e5170(0x1a6)])),touchDependencies(this[_0x4e5170(0x195)],[[LiveShareCoreExtensionsController]]);}[_0x145510(0x145)](){const _0x10c9dd=_0x145510;touchDependencies(this[_0x10c9dd(0x195)],[[DesktopLiveShareController]]);}};_defineProperty(UniverLiveSharePlugin,_0x145510(0x178),UniverInstanceType['UNIVER_UNKNOWN']),_defineProperty(UniverLiveSharePlugin,_0x145510(0x136),_0x145510(0x17e)),_defineProperty(UniverLiveSharePlugin,'packageName',name),_defineProperty(UniverLiveSharePlugin,_0x145510(0x18c),version),UniverLiveSharePlugin=__decorate([DependentOn(UniverCollaborationClientPlugin),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,IConfigService)],UniverLiveSharePlugin);export{DesktopLiveShareController,LiveShare,LiveShareController,LiveShareCoordinator,LiveShareService,LiveShareStatus,UniverLiveSharePlugin};
package/lib/facade.js CHANGED
@@ -1 +1 @@
1
- const _0x19d952=_0x5d5e;(function(_0x4e7718,_0x535366){const _0x1aba27=_0x5d5e,_0x2bf278=_0x4e7718();while(!![]){try{const _0x4538e9=-parseInt(_0x1aba27(0x134))/0x1*(parseInt(_0x1aba27(0x121))/0x2)+parseInt(_0x1aba27(0x132))/0x3*(parseInt(_0x1aba27(0x130))/0x4)+parseInt(_0x1aba27(0x120))/0x5+parseInt(_0x1aba27(0x12e))/0x6*(parseInt(_0x1aba27(0x129))/0x7)+-parseInt(_0x1aba27(0x137))/0x8+-parseInt(_0x1aba27(0x142))/0x9*(parseInt(_0x1aba27(0x13c))/0xa)+-parseInt(_0x1aba27(0x12a))/0xb*(-parseInt(_0x1aba27(0x122))/0xc);if(_0x4538e9===_0x535366)break;else _0x2bf278['push'](_0x2bf278['shift']());}catch(_0x558d84){_0x2bf278['push'](_0x2bf278['shift']());}}}(_0x2d45,0x71f74));import{LiveShareController as _0x53265f,LiveShareStatus as _0x3a2521}from'@univerjs-pro/live-share';import{IUniverInstanceService as _0x56883f,UniverInstanceType as _0x2cba1b}from'@univerjs/core';import{FEnum as _0x1e05d3,FUniver as _0x30cdf0}from'@univerjs/core/facade';function o(_0x39b155){'@babel/helpers - typeof';const _0xfa74f5=_0x5d5e;return o=typeof Symbol==_0xfa74f5(0x124)&&typeof Symbol[_0xfa74f5(0x135)]==_0xfa74f5(0x140)?function(_0x5841d7){return typeof _0x5841d7;}:function(_0x3e0af4){const _0x2c235f=_0xfa74f5;return _0x3e0af4&&typeof Symbol==_0x2c235f(0x124)&&_0x3e0af4[_0x2c235f(0x13d)]===Symbol&&_0x3e0af4!==Symbol[_0x2c235f(0x131)]?_0x2c235f(0x140):typeof _0x3e0af4;},o(_0x39b155);}function s(_0x5b8c0e,_0x10c053){const _0x366ad0=_0x5d5e;if(o(_0x5b8c0e)!='object'||!_0x5b8c0e)return _0x5b8c0e;var _0x2cabd7=_0x5b8c0e[Symbol['toPrimitive']];if(_0x2cabd7!==void 0x0){var _0x4cf0ec=_0x2cabd7['call'](_0x5b8c0e,_0x10c053||_0x366ad0(0x125));if(o(_0x4cf0ec)!=_0x366ad0(0x141))return _0x4cf0ec;throw TypeError(_0x366ad0(0x126));}return(_0x10c053==='string'?String:Number)(_0x5b8c0e);}function _0x2d45(){const _0x1ec9da=['88329FxDyjD','No\x20active\x20workbook\x20found.','135406cmXYtq','iterator','getUnitId','5737312ZoJNqF','string','startPresenting','extend','No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.','4633990ugLfgp','constructor','get','startFollowing','symbol','object','9CyVviY','stopPresenting','tryStartPresenting','_injector','2481120xgzGwV','2MNTirH','5004KyWqwS','IDLE','function','default','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','UNIVER_SHEET','_liveShareController','958391vRPtRL','15103TSysGR','defineProperty','getLiveShareStatus','getLiveShareCoordinatorSync','30buifbI','getCurrentUnitOfType','4UAzdgX','prototype'];_0x2d45=function(){return _0x1ec9da;};return _0x2d45();}function c(_0x8a904c){const _0x49c4d0=_0x5d5e;var _0x55c39f=s(_0x8a904c,_0x49c4d0(0x138));return o(_0x55c39f)=='symbol'?_0x55c39f:_0x55c39f+'';}function l(_0x433aaa,_0x28aecb,_0x35987a){const _0x170c0b=_0x5d5e;return(_0x28aecb=c(_0x28aecb))in _0x433aaa?Object[_0x170c0b(0x12b)](_0x433aaa,_0x28aecb,{'value':_0x35987a,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x433aaa[_0x28aecb]=_0x35987a,_0x433aaa;}var u=class extends _0x30cdf0{constructor(..._0x43aa3f){const _0x2841e9=_0x5d5e;super(..._0x43aa3f),l(this,_0x2841e9(0x128),void 0x0);}['_initialize'](_0x2a8068){const _0x9f58d7=_0x5d5e;this[_0x9f58d7(0x128)]=_0x2a8068[_0x9f58d7(0x13e)](_0x53265f);}[_0x19d952(0x12c)](){const _0x4487d5=_0x19d952;var _0x2bd637;let _0x347418=this[_0x4487d5(0x145)][_0x4487d5(0x13e)](_0x56883f)[_0x4487d5(0x12f)](_0x2cba1b[_0x4487d5(0x127)]);if(!_0x347418)throw Error(_0x4487d5(0x133));let _0x3b85f6=_0x347418['getUnitId'](),_0x1878a6=this[_0x4487d5(0x128)][_0x4487d5(0x12d)](_0x3b85f6);return(_0x2bd637=_0x1878a6==null?void 0x0:_0x1878a6['getStatus']())==null?_0x3a2521[_0x4487d5(0x123)]:_0x2bd637;}[_0x19d952(0x13f)](){const _0x3c7015=_0x19d952;let _0x150698=this[_0x3c7015(0x145)][_0x3c7015(0x13e)](_0x56883f)[_0x3c7015(0x12f)](_0x2cba1b[_0x3c7015(0x127)]);if(!_0x150698)throw Error(_0x3c7015(0x133));let _0x19dbc6=_0x150698[_0x3c7015(0x136)](),_0x2b83be=this[_0x3c7015(0x128)][_0x3c7015(0x12d)](_0x19dbc6);if(!_0x2b83be)throw Error(_0x3c7015(0x13b));_0x2b83be['startFollowing']();}['stopFollowing'](){const _0x1ae77f=_0x19d952;let _0x4e1a88=this[_0x1ae77f(0x145)][_0x1ae77f(0x13e)](_0x56883f)[_0x1ae77f(0x12f)](_0x2cba1b[_0x1ae77f(0x127)]);if(!_0x4e1a88)throw Error(_0x1ae77f(0x133));let _0x17d076=_0x4e1a88[_0x1ae77f(0x136)](),_0x5a9125=this[_0x1ae77f(0x128)]['getLiveShareCoordinatorSync'](_0x17d076);if(!_0x5a9125)throw Error(_0x1ae77f(0x13b));_0x5a9125['stopFollowing']();}[_0x19d952(0x139)](){const _0x6e943a=_0x19d952;let _0x4eba19=this[_0x6e943a(0x145)][_0x6e943a(0x13e)](_0x56883f)[_0x6e943a(0x12f)](_0x2cba1b[_0x6e943a(0x127)]);if(!_0x4eba19)throw Error('No\x20active\x20workbook\x20found.');let _0x380547=_0x4eba19['getUnitId'](),_0x37c849=this[_0x6e943a(0x128)]['getLiveShareCoordinatorSync'](_0x380547);if(!_0x37c849)throw Error(_0x6e943a(0x13b));_0x37c849[_0x6e943a(0x144)]();}[_0x19d952(0x143)](){const _0x39264b=_0x19d952;let _0x5b0220=this[_0x39264b(0x145)]['get'](_0x56883f)[_0x39264b(0x12f)](_0x2cba1b[_0x39264b(0x127)]);if(!_0x5b0220)throw Error(_0x39264b(0x133));let _0x3703b4=_0x5b0220['getUnitId'](),_0x439ca0=this[_0x39264b(0x128)][_0x39264b(0x12d)](_0x3703b4);if(!_0x439ca0)throw Error(_0x39264b(0x13b));_0x439ca0[_0x39264b(0x143)]();}};function _0x5d5e(_0x14b006,_0x1a9caa){_0x14b006=_0x14b006-0x120;const _0x2d45ce=_0x2d45();let _0x5d5e11=_0x2d45ce[_0x14b006];return _0x5d5e11;}_0x30cdf0[_0x19d952(0x13a)](u);var d=class extends _0x1e05d3{get['LiveShareStatusEnum'](){return _0x3a2521;}};_0x1e05d3[_0x19d952(0x13a)](d);export{};
1
+ const _0x4ea766=_0x183f;(function(_0x49da20,_0xdd21be){const _0x47b514=_0x183f,_0x2c11c0=_0x49da20();while(!![]){try{const _0x2bd88f=-parseInt(_0x47b514(0xe6))/0x1*(parseInt(_0x47b514(0xe4))/0x2)+-parseInt(_0x47b514(0xf2))/0x3*(parseInt(_0x47b514(0xe9))/0x4)+parseInt(_0x47b514(0xe1))/0x5*(parseInt(_0x47b514(0x104))/0x6)+parseInt(_0x47b514(0xe8))/0x7*(-parseInt(_0x47b514(0xf3))/0x8)+-parseInt(_0x47b514(0xfd))/0x9*(parseInt(_0x47b514(0xf4))/0xa)+-parseInt(_0x47b514(0xe0))/0xb+parseInt(_0x47b514(0xec))/0xc;if(_0x2bd88f===_0xdd21be)break;else _0x2c11c0['push'](_0x2c11c0['shift']());}catch(_0x49b14a){_0x2c11c0['push'](_0x2c11c0['shift']());}}}(_0x3842,0xdbc9d));import{LiveShareController,LiveShareStatus}from'@univerjs-pro/live-share';import{IUniverInstanceService,UniverInstanceType}from'@univerjs/core';import{FEnum,FUniver}from'@univerjs/core/facade';function _typeof(_0x2964a2){'@babel/helpers - typeof';const _0x331e71=_0x183f;return _typeof=_0x331e71(0xfb)==typeof Symbol&&_0x331e71(0xe3)==typeof Symbol[_0x331e71(0xdc)]?function(_0x1d554a){return typeof _0x1d554a;}:function(_0x118ed9){const _0x46d4a4=_0x331e71;return _0x118ed9&&_0x46d4a4(0xfb)==typeof Symbol&&_0x118ed9[_0x46d4a4(0xf6)]===Symbol&&_0x118ed9!==Symbol['prototype']?'symbol':typeof _0x118ed9;},_typeof(_0x2964a2);}function toPrimitive(_0x29f896,_0x47677b){const _0x5eeb52=_0x183f;if('object'!=_typeof(_0x29f896)||!_0x29f896)return _0x29f896;var _0x375f2a=_0x29f896[Symbol[_0x5eeb52(0xea)]];if(void 0x0!==_0x375f2a){var _0x34c5a9=_0x375f2a[_0x5eeb52(0xf9)](_0x29f896,_0x47677b||_0x5eeb52(0xed));if(_0x5eeb52(0xdf)!=_typeof(_0x34c5a9))return _0x34c5a9;throw new TypeError(_0x5eeb52(0xe2));}return(_0x5eeb52(0x102)===_0x47677b?String:Number)(_0x29f896);}function toPropertyKey(_0x415bc8){const _0x57d7dd=_0x183f;var _0x3591fa=toPrimitive(_0x415bc8,_0x57d7dd(0x102));return _0x57d7dd(0xe3)==_typeof(_0x3591fa)?_0x3591fa:_0x3591fa+'';}function _0x3842(){const _0xe55846=['getLiveShareCoordinatorSync','get','startFollowing','No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.','1206390NulZHS','240376TSQTbY','111350AwIufy','_liveShareController','constructor','tryStartPresenting','_injector','call','getStatus','function','No\x20active\x20workbook\x20found.','1143APUnDq','getUnitId','LiveShareStatusEnum','_initialize','UNIVER_SHEET','string','getLiveShareStatus','894DYCONS','iterator','stopFollowing','IDLE','object','3041269sUlqNT','36845uotTei','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','symbol','26rUHIVt','extend','46638LulrMd','startPresenting','371VrtKSh','8ijtrbn','toPrimitive','getCurrentUnitOfType','53951292kXBlFm','default'];_0x3842=function(){return _0xe55846;};return _0x3842();}function _defineProperty(_0x102947,_0x2471f1,_0x93787d){return(_0x2471f1=toPropertyKey(_0x2471f1))in _0x102947?Object['defineProperty'](_0x102947,_0x2471f1,{'value':_0x93787d,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x102947[_0x2471f1]=_0x93787d,_0x102947;}var FUniverLiveShareMixin=class extends FUniver{constructor(..._0x1f4cec){const _0x56d158=_0x183f;super(..._0x1f4cec),_defineProperty(this,_0x56d158(0xf5),void 0x0);}[_0x4ea766(0x100)](_0xe1da3a){const _0x5fd974=_0x4ea766;this[_0x5fd974(0xf5)]=_0xe1da3a[_0x5fd974(0xef)](LiveShareController);}[_0x4ea766(0x103)](){const _0x3f8c69=_0x4ea766;var _0x1f8d3e;const _0x5646a8=this['_injector'][_0x3f8c69(0xef)](IUniverInstanceService)[_0x3f8c69(0xeb)](UniverInstanceType['UNIVER_SHEET']);if(!_0x5646a8)throw new Error(_0x3f8c69(0xfc));const _0x363d25=_0x5646a8[_0x3f8c69(0xfe)](),_0x2482c8=this[_0x3f8c69(0xf5)]['getLiveShareCoordinatorSync'](_0x363d25);return(_0x1f8d3e=_0x2482c8===null||_0x2482c8===void 0x0?void 0x0:_0x2482c8[_0x3f8c69(0xfa)]())!==null&&_0x1f8d3e!==void 0x0?_0x1f8d3e:LiveShareStatus[_0x3f8c69(0xde)];}['startFollowing'](){const _0x59a7bf=_0x4ea766,_0x5058d6=this[_0x59a7bf(0xf8)][_0x59a7bf(0xef)](IUniverInstanceService)[_0x59a7bf(0xeb)](UniverInstanceType[_0x59a7bf(0x101)]);if(!_0x5058d6)throw new Error(_0x59a7bf(0xfc));const _0x440d0c=_0x5058d6[_0x59a7bf(0xfe)](),_0x12a103=this['_liveShareController']['getLiveShareCoordinatorSync'](_0x440d0c);if(!_0x12a103)throw new Error(_0x59a7bf(0xf1));_0x12a103[_0x59a7bf(0xf0)]();}[_0x4ea766(0xdd)](){const _0x3460ce=_0x4ea766,_0x44d7c1=this[_0x3460ce(0xf8)][_0x3460ce(0xef)](IUniverInstanceService)['getCurrentUnitOfType'](UniverInstanceType[_0x3460ce(0x101)]);if(!_0x44d7c1)throw new Error(_0x3460ce(0xfc));const _0x4fb377=_0x44d7c1[_0x3460ce(0xfe)](),_0x3be46d=this['_liveShareController']['getLiveShareCoordinatorSync'](_0x4fb377);if(!_0x3be46d)throw new Error(_0x3460ce(0xf1));_0x3be46d['stopFollowing']();}[_0x4ea766(0xe7)](){const _0x29d1ce=_0x4ea766,_0x5e09a4=this['_injector']['get'](IUniverInstanceService)[_0x29d1ce(0xeb)](UniverInstanceType[_0x29d1ce(0x101)]);if(!_0x5e09a4)throw new Error(_0x29d1ce(0xfc));const _0x20cea0=_0x5e09a4[_0x29d1ce(0xfe)](),_0x29f33a=this[_0x29d1ce(0xf5)]['getLiveShareCoordinatorSync'](_0x20cea0);if(!_0x29f33a)throw new Error(_0x29d1ce(0xf1));_0x29f33a[_0x29d1ce(0xf7)]();}['stopPresenting'](){const _0x112c70=_0x4ea766,_0x5e5f60=this[_0x112c70(0xf8)]['get'](IUniverInstanceService)[_0x112c70(0xeb)](UniverInstanceType[_0x112c70(0x101)]);if(!_0x5e5f60)throw new Error(_0x112c70(0xfc));const _0x509a2d=_0x5e5f60[_0x112c70(0xfe)](),_0x720cf=this[_0x112c70(0xf5)][_0x112c70(0xee)](_0x509a2d);if(!_0x720cf)throw new Error('No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.');_0x720cf['stopPresenting']();}};function _0x183f(_0x59f032,_0x3b39e4){_0x59f032=_0x59f032-0xdc;const _0x384288=_0x3842();let _0x183f00=_0x384288[_0x59f032];return _0x183f00;}FUniver['extend'](FUniverLiveShareMixin);var FLiveShareEnumMixin=class extends FEnum{get[_0x4ea766(0xff)](){return LiveShareStatus;}};FEnum[_0x4ea766(0xe5)](FLiveShareEnumMixin);export{};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x316f94=_0x5391;(function(_0xe3a6e7,_0x29817e){const _0x172460=_0x5391,_0x24b1e9=_0xe3a6e7();while(!![]){try{const _0x4e53ed=parseInt(_0x172460(0x20b))/0x1+-parseInt(_0x172460(0x1be))/0x2*(-parseInt(_0x172460(0x1e8))/0x3)+parseInt(_0x172460(0x18c))/0x4*(-parseInt(_0x172460(0x1f8))/0x5)+parseInt(_0x172460(0x198))/0x6+-parseInt(_0x172460(0x1e4))/0x7+-parseInt(_0x172460(0x1e1))/0x8+-parseInt(_0x172460(0x1de))/0x9*(-parseInt(_0x172460(0x1d3))/0xa);if(_0x4e53ed===_0x29817e)break;else _0x24b1e9['push'](_0x24b1e9['shift']());}catch(_0x22466a){_0x24b1e9['push'](_0x24b1e9['shift']());}}}(_0xb49f,0x9fde8));import{CommandType as _0x59b2d3,DependentOn as _0x4a35d8,Disposable as _0x2adf71,DisposableCollection as _0x5adea4,ICommandService as _0x41335f,IConfigService as _0x557f50,IUniverInstanceService as _0x3302a5,Inject as _0x46b23b,Injector as _0x1d072d,Plugin as _0x48ed37,RxDisposable as _0x22b5ea,UniverInstanceType as _0x3134e5,merge as _0x2e2be3,mergeOverrideWithDependencies as _0x3d81e7,registerDependencies as _0x581342,toDisposable as _0x45b351,touchDependencies as _0x52a28d}from'@univerjs/core';import{BuiltInUIPart as _0x25173b,IUIPartsService as _0x3b40e4,connectInjector as _0x4f41a9,useDependency as _0x32da5a,useObservable as _0x3ea909}from'@univerjs/ui';import{Button as _0x4f7ec0,Dropdown as _0x4cb2f3,clsx as _0x3a1867}from'@univerjs/design';import{LiveShareIcon as _0x3a9d6e}from'@univerjs/icons';import{useEffect as _0x2f1cba,useRef as _0x4a2319,useState as _0x3be037}from'react';import{CollaborationEvent as _0x3715c9,parseProtocolChangeset as _0x1ff61d}from'@univerjs-pro/collaboration';import{CollaborationSessionService as _0x29346c,SessionStatus as _0x3826d2,UniverCollaborationClientPlugin as _0x42f673}from'@univerjs-pro/collaboration-client';import{InsertSheetMutation as _0x28332a,SetWorksheetActiveOperation as _0x1ff449}from'@univerjs/sheets';import{BehaviorSubject as _0x128b7d,Subject as _0x14ff59}from'rxjs';import{takeUntil as _0x136b9e,throttleTime as _0x16df4d}from'rxjs/operators';import{Fragment as _0x501d46,jsx as _0x509609,jsxs as _0x227845}from'react/jsx-runtime';import{SetScrollOperation as _0x160a49,SetZoomRatioOperation as _0xefcc16}from'@univerjs/sheets-ui';function L(_0x590d83){'@babel/helpers - typeof';const _0x4cc06f=_0x5391;return L=typeof Symbol==_0x4cc06f(0x1e2)&&typeof Symbol[_0x4cc06f(0x1b7)]==_0x4cc06f(0x1ae)?function(_0x448d45){return typeof _0x448d45;}:function(_0x3ba1b9){const _0x13799b=_0x4cc06f;return _0x3ba1b9&&typeof Symbol==_0x13799b(0x1e2)&&_0x3ba1b9['constructor']===Symbol&&_0x3ba1b9!==Symbol[_0x13799b(0x1ee)]?_0x13799b(0x1ae):typeof _0x3ba1b9;},L(_0x590d83);}function R(_0xa99d4,_0x21f9c7){const _0x31c836=_0x5391;if(L(_0xa99d4)!='object'||!_0xa99d4)return _0xa99d4;var _0x14b8c4=_0xa99d4[Symbol['toPrimitive']];if(_0x14b8c4!==void 0x0){var _0x3da7ef=_0x14b8c4[_0x31c836(0x1d4)](_0xa99d4,_0x21f9c7||_0x31c836(0x1a6));if(L(_0x3da7ef)!=_0x31c836(0x1c0))return _0x3da7ef;throw TypeError(_0x31c836(0x1e0));}return(_0x21f9c7===_0x31c836(0x1f1)?String:Number)(_0xa99d4);}function z(_0x559b23){const _0x2d957e=_0x5391;var _0x1282bb=R(_0x559b23,_0x2d957e(0x1f1));return L(_0x1282bb)==_0x2d957e(0x1ae)?_0x1282bb:_0x1282bb+'';}function B(_0x1787ef,_0x2b7d5c,_0x202a95){return(_0x2b7d5c=z(_0x2b7d5c))in _0x1787ef?Object['defineProperty'](_0x1787ef,_0x2b7d5c,{'value':_0x202a95,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1787ef[_0x2b7d5c]=_0x202a95,_0x1787ef;}var V=class extends _0x2adf71{constructor(..._0x4f4764){const _0x34512f=_0x5391;super(..._0x4f4764),B(this,'_sharedOperations',new Set()),B(this,_0x34512f(0x1d6),new Set());}[_0x316f94(0x1fd)](_0x74c681){const _0x5a68cd=_0x316f94;return this[_0x5a68cd(0x1b5)][_0x5a68cd(0x1d0)](_0x74c681),_0x45b351(()=>this[_0x5a68cd(0x1b5)][_0x5a68cd(0x1c9)](_0x74c681));}[_0x316f94(0x180)](_0x398b1e){const _0x4e4b10=_0x316f94;return this[_0x4e4b10(0x1d6)][_0x4e4b10(0x1d0)](_0x398b1e),_0x45b351(()=>this['_reporters'][_0x4e4b10(0x1c9)](_0x398b1e));}[_0x316f94(0x1c8)](_0x23fee9){const _0x51b6de=_0x316f94;return this[_0x51b6de(0x1b5)]['has'](_0x23fee9);}['getInitialStates'](_0x83ab78){const _0x18e7d2=_0x316f94;return Array['from'](this[_0x18e7d2(0x1d6)])['map'](_0x4358ad=>_0x4358ad(_0x83ab78));}};function H(_0x4398df,_0x3cdacc){return function(_0x578c4e,_0x4738fa){_0x3cdacc(_0x578c4e,_0x4738fa,_0x4398df);};}function U(_0x16ddd9,_0x52ab6c,_0xc6f07b,_0x43f9c7){const _0x217ae6=_0x316f94;var _0x5905c6=arguments[_0x217ae6(0x1db)],_0x3847a1=_0x5905c6<0x3?_0x52ab6c:_0x43f9c7===null?_0x43f9c7=Object[_0x217ae6(0x1f0)](_0x52ab6c,_0xc6f07b):_0x43f9c7,_0x407918;if(typeof Reflect==_0x217ae6(0x1c0)&&typeof Reflect[_0x217ae6(0x1ea)]==_0x217ae6(0x1e2))_0x3847a1=Reflect[_0x217ae6(0x1ea)](_0x16ddd9,_0x52ab6c,_0xc6f07b,_0x43f9c7);else{for(var _0x4b478b=_0x16ddd9['length']-0x1;_0x4b478b>=0x0;_0x4b478b--)(_0x407918=_0x16ddd9[_0x4b478b])&&(_0x3847a1=(_0x5905c6<0x3?_0x407918(_0x3847a1):_0x5905c6>0x3?_0x407918(_0x52ab6c,_0xc6f07b,_0x3847a1):_0x407918(_0x52ab6c,_0xc6f07b))||_0x3847a1);}return _0x5905c6>0x3&&_0x3847a1&&Object[_0x217ae6(0x1ba)](_0x52ab6c,_0xc6f07b,_0x3847a1),_0x3847a1;}let W=class extends _0x22b5ea{constructor(_0x2b5005,_0x483c55,_0x18f658){const _0x5844bb=_0x316f94;super(),this['_univerInstanceService']=_0x2b5005,this[_0x5844bb(0x1ca)]=_0x483c55,this['_collabSessionService']=_0x18f658,B(this,_0x5844bb(0x19d),new Map()),this[_0x5844bb(0x1f7)]();}async['getLiveShareCoordinator'](_0x474978){const _0x3e97ae=_0x316f94;return this[_0x3e97ae(0x19d)][_0x3e97ae(0x205)](_0x474978)||await this['_startLiveShareCoordinator'](_0x474978),this[_0x3e97ae(0x19d)][_0x3e97ae(0x20a)](_0x474978);}[_0x316f94(0x17f)](_0x2afed9){var _0x45f533;return(_0x45f533=this['_entities']['get'](_0x2afed9))==null?null:_0x45f533;}['_init'](){const _0x3cb980=_0x316f94;this[_0x3cb980(0x1da)][_0x3cb980(0x202)](_0x3134e5['UNIVER_SHEET'])[_0x3cb980(0x1ef)](_0x136b9e(this['dispose$']))[_0x3cb980(0x207)](async _0x449bc6=>{const _0x54fb72=_0x3cb980;let _0x399e13=_0x449bc6[_0x54fb72(0x18a)]();this[_0x54fb72(0x19d)][_0x54fb72(0x205)](_0x399e13)||this[_0x54fb72(0x182)](_0x399e13);}),this[_0x3cb980(0x1da)][_0x3cb980(0x183)](_0x3134e5[_0x3cb980(0x1fb)])[_0x3cb980(0x1ef)](_0x136b9e(this[_0x3cb980(0x1a2)]))[_0x3cb980(0x207)](_0x52dddf=>{const _0x21ae43=_0x3cb980;let _0x38c80d=_0x52dddf[_0x21ae43(0x18a)](),_0x1bd39b=this[_0x21ae43(0x19d)][_0x21ae43(0x20a)](_0x38c80d);_0x1bd39b==null||_0x1bd39b['dispose']();});}async[_0x316f94(0x182)](_0x118bb2){const _0x1c24f9=_0x316f94;let _0x53ff18=await this[_0x1c24f9(0x1bb)]['requireSession'](_0x118bb2),_0x55a184=this[_0x1c24f9(0x1ca)][_0x1c24f9(0x1cc)](K,_0x118bb2,_0x53ff18);return _0x55a184[_0x1c24f9(0x1ce)](),this[_0x1c24f9(0x19d)]['set'](_0x118bb2,_0x55a184),_0x55a184;}};W=U([H(0x0,_0x3302a5),H(0x1,_0x46b23b(_0x1d072d)),H(0x2,_0x46b23b(_0x29346c))],W);let G=function(_0x10c258){const _0xd080c1=_0x316f94;return _0x10c258[_0xd080c1(0x1a1)]='offline',_0x10c258['IDLE']=_0xd080c1(0x20f),_0x10c258[_0xd080c1(0x20d)]=_0xd080c1(0x19b),_0x10c258[_0xd080c1(0x1f4)]=_0xd080c1(0x1fc),_0x10c258[_0xd080c1(0x1eb)]=_0xd080c1(0x17c),_0x10c258;}({}),K=class extends _0x22b5ea{get[_0x316f94(0x199)](){const _0x29e248=_0x316f94;return this[_0x29e248(0x1b3)][_0x29e248(0x189)]();}constructor(_0x2408ac,_0x3e6e16,_0x273ef4,_0x50438a,_0x4cca86){const _0x3c881e=_0x316f94;super(),this[_0x3c881e(0x1d9)]=_0x2408ac,this[_0x3c881e(0x1e9)]=_0x3e6e16,this[_0x3c881e(0x1d1)]=_0x273ef4,this[_0x3c881e(0x178)]=_0x50438a,this['_commandService']=_0x4cca86,B(this,_0x3c881e(0x1b3),new _0x128b7d(G[_0x3c881e(0x1b8)])),B(this,_0x3c881e(0x177),this[_0x3c881e(0x1b3)][_0x3c881e(0x1ed)]()),B(this,_0x3c881e(0x1f7),!0x1),B(this,_0x3c881e(0x1e6),null),B(this,_0x3c881e(0x187),null);}[_0x316f94(0x1d5)](){const _0xe037be=_0x316f94;var _0x417a8d;(_0x417a8d=this['_commandDisposable'])==null||_0x417a8d['dispose'](),this[_0xe037be(0x1b3)][_0xe037be(0x1cd)](G[_0xe037be(0x1b8)]),this[_0xe037be(0x1b3)]['complete']();}['getStatus'](){const _0x3c6841=_0x316f94;return this[_0x3c6841(0x199)];}[_0x316f94(0x1ce)](){const _0x50ba0d=_0x316f94;this[_0x50ba0d(0x1f7)]||(this[_0x50ba0d(0x1f7)]=!0x0,this['_collabSession'][_0x50ba0d(0x1c7)][_0x50ba0d(0x1ef)](_0x136b9e(this[_0x50ba0d(0x1a2)]))[_0x50ba0d(0x207)](_0x39c7aa=>{const _0x441b6d=_0x50ba0d;switch(_0x39c7aa){case _0x3826d2[_0x441b6d(0x1a1)]:this['_handleOffline']();break;case _0x3826d2[_0x441b6d(0x18d)]:this[_0x441b6d(0x1cb)]();break;default:}}),this['_collabSession']['event$'][_0x50ba0d(0x1ef)](_0x136b9e(this[_0x50ba0d(0x1a2)]))['subscribe'](_0x198742=>{const _0x1d44e4=_0x50ba0d;let {eventID:_0x464edc}=_0x198742;switch(_0x464edc){case _0x3715c9[_0x1d44e4(0x1a5)]:this['_handleNewHost'](_0x198742);break;case _0x3715c9[_0x1d44e4(0x1bc)]:this[_0x1d44e4(0x17d)](_0x198742);break;case _0x3715c9[_0x1d44e4(0x1a4)]:this[_0x1d44e4(0x1ac)]();break;case _0x3715c9['NEW_CHANGESETS']:this[_0x1d44e4(0x1fa)](_0x198742);break;default:}}));}['tryStartPresenting'](){const _0x59e785=_0x316f94;this['_collabSession']['send']({'eventID':_0x3715c9[_0x59e785(0x1af)],'data':{'unitID':this[_0x59e785(0x1d9)],'userID':this[_0x59e785(0x1e9)][_0x59e785(0x18f)]()}},this[_0x59e785(0x1d9)]);}['stopPresenting'](){const _0x439c2d=_0x316f94;this[_0x439c2d(0x199)]===G[_0x439c2d(0x1eb)]&&(this['_status$'][_0x439c2d(0x1cd)](G[_0x439c2d(0x1b8)]),this[_0x439c2d(0x1e9)][_0x439c2d(0x1d2)]({'eventID':_0x3715c9['LIVESHARE_TERMINATE'],'data':{'unitID':this[_0x439c2d(0x1d9)]}},this[_0x439c2d(0x1d9)]));}['startFollowing'](){const _0x12a883=_0x316f94;this[_0x12a883(0x199)]===G['NOT_FOLLOWING']&&(this[_0x12a883(0x1b3)][_0x12a883(0x1cd)](G[_0x12a883(0x20d)]),this[_0x12a883(0x1f2)]());}['stopFollowing'](){const _0x6ac854=_0x316f94;this['_status']===G['FOLLOWING']&&this[_0x6ac854(0x1d8)]();}[_0x316f94(0x179)](_0xd601f5){const _0x418871=_0x316f94;let {presenter:_0x438b00}=_0xd601f5['data'],_0x17460e=this[_0x418871(0x1e9)][_0x418871(0x18f)]();this[_0x418871(0x187)]=_0x438b00,_0x438b00===_0x17460e?(this['_stopFollowing'](),this[_0x418871(0x194)]()):this[_0x418871(0x199)]!==G[_0x418871(0x1f4)]&&(this[_0x418871(0x1ff)](),this[_0x418871(0x1f2)]());}[_0x316f94(0x1f9)](){const _0x3828e2=_0x316f94;let _0x103491={'eventID':_0x3715c9['LIVESHARE_FETCH_OPERATIONS']};this['_collabSession'][_0x3828e2(0x1d2)](_0x103491,this[_0x3828e2(0x1d9)]);}[_0x316f94(0x1ac)](){const _0x3aa701=_0x316f94;this[_0x3aa701(0x187)]=null,this['_status']!==G[_0x3aa701(0x1eb)]&&this[_0x3aa701(0x17a)]();}[_0x316f94(0x1fa)](_0x500dfc){const _0x7da05b=_0x316f94;if(this[_0x7da05b(0x199)]===G[_0x7da05b(0x20d)]&&this[_0x7da05b(0x187)]===_0x500dfc[_0x7da05b(0x17b)]['memberID']){let _0x43f5a3=_0x1ff61d(_0x500dfc[_0x7da05b(0x17b)])[_0x7da05b(0x1f3)][_0x7da05b(0x1aa)]()[_0x7da05b(0x1a7)](_0x29521f=>_0x29521f['id']===_0x28332a['id']);if(_0x43f5a3){let _0x1be8f9=_0x43f5a3[_0x7da05b(0x1cf)][_0x7da05b(0x1a0)],_0xff2700=_0x43f5a3[_0x7da05b(0x1cf)][_0x7da05b(0x1df)]['id'];setTimeout(()=>{const _0x4f7788=_0x7da05b;this[_0x4f7788(0x195)][_0x4f7788(0x1f5)](_0x1ff449['id'],{'unitId':_0x1be8f9,'subUnitId':_0xff2700},{'fromCollab':!0x0});});}}}[_0x316f94(0x194)](){const _0x2ec733=_0x316f94;this[_0x2ec733(0x1b3)][_0x2ec733(0x1cd)](G[_0x2ec733(0x1eb)]);let _0x3a122d=new Map(),_0x172690=this[_0x2ec733(0x1e6)]=new _0x5adea4();_0x172690[_0x2ec733(0x1d0)](_0x45b351(()=>{const _0x4e09f0=_0x2ec733;_0x3a122d[_0x4e09f0(0x1ad)](_0x284dac=>_0x284dac['complete']()),_0x3a122d[_0x4e09f0(0x1ab)]();})),_0x172690[_0x2ec733(0x1d0)](this[_0x2ec733(0x195)][_0x2ec733(0x1a8)](_0x468d9e=>{const _0x476cba=_0x2ec733;if(_0x468d9e[_0x476cba(0x193)]!==_0x59b2d3[_0x476cba(0x1a9)]||!this[_0x476cba(0x178)][_0x476cba(0x1c8)](_0x468d9e['id']))return;let {id:_0xb9dc9}=_0x468d9e,_0x478df3;if(_0x3a122d[_0x476cba(0x205)](_0xb9dc9))_0x478df3=_0x3a122d['get'](_0xb9dc9);else{var _0x25df4b;_0x478df3=new _0x14ff59(),_0x3a122d[_0x476cba(0x203)](_0xb9dc9,_0x478df3),_0x478df3[_0x476cba(0x1ef)](_0x16df4d((_0x25df4b=this[_0x476cba(0x1d1)][_0x476cba(0x19f)](_0x476cba(0x197)))==null?0xc8:_0x25df4b,void 0x0,{'trailing':!0x0,'leading':!0x0}))[_0x476cba(0x207)](_0xb5fc86=>{const _0x201a01=_0x476cba;this[_0x201a01(0x1e9)][_0x201a01(0x1d2)]({'eventID':_0x3715c9[_0x201a01(0x1bc)],'data':{'unitID':this[_0x201a01(0x1d9)],'operations':{[_0xb5fc86['id']]:{'id':_0xb5fc86['id'],'params':JSON[_0x201a01(0x1b4)](_0xb5fc86['params'])}}}},this['_unitID']);});}_0x478df3[_0x476cba(0x1cd)](_0x468d9e);})),this[_0x2ec733(0x178)][_0x2ec733(0x1e5)](this['_unitID'])[_0x2ec733(0x1ad)](_0x471a72=>this[_0x2ec733(0x1e9)][_0x2ec733(0x1d2)]({'eventID':_0x3715c9[_0x2ec733(0x1bc)],'data':{'unitID':this[_0x2ec733(0x1d9)],'operations':{[_0x471a72['id']]:{'id':_0x471a72['id'],'params':JSON['stringify'](_0x471a72[_0x2ec733(0x1cf)])}}}},this[_0x2ec733(0x1d9)]));}[_0x316f94(0x1ff)](){const _0xa0307b=_0x316f94;var _0x17a87c;this[_0xa0307b(0x1b3)][_0xa0307b(0x1cd)](G[_0xa0307b(0x1b8)]),(_0x17a87c=this[_0xa0307b(0x1e6)])==null||_0x17a87c['dispose'](),this['_commandDisposable']=null;}[_0x316f94(0x1f2)](){const _0x206ece=_0x316f94;var _0x3c982a;(_0x3c982a=this[_0x206ece(0x1e6)])==null||_0x3c982a['dispose'](),this[_0x206ece(0x1b3)][_0x206ece(0x1cd)](G[_0x206ece(0x20d)]);}['_beIdle'](){const _0x853f50=_0x316f94;var _0x226aa3;this[_0x853f50(0x1b3)][_0x853f50(0x1cd)](G['IDLE']),(_0x226aa3=this['_commandDisposable'])==null||_0x226aa3[_0x853f50(0x1d5)](),this['_commandDisposable']=null;}[_0x316f94(0x1d8)](){const _0x5426a5=_0x316f94;var _0x42d82d;this['_status$'][_0x5426a5(0x1cd)](G[_0x5426a5(0x1f4)]),(_0x42d82d=this[_0x5426a5(0x1e6)])==null||_0x42d82d[_0x5426a5(0x1d5)]();}[_0x316f94(0x17d)](_0x3d43bb){const _0x4c8522=_0x316f94;if([G[_0x4c8522(0x1eb)],G['NOT_FOLLOWING'],G[_0x4c8522(0x1a1)]][_0x4c8522(0x1fe)](this[_0x4c8522(0x199)])||!_0x3d43bb[_0x4c8522(0x17b)][_0x4c8522(0x184)]||_0x3d43bb[_0x4c8522(0x17b)]['presenter']===this[_0x4c8522(0x1e9)]['getMemberID']())return;this[_0x4c8522(0x199)]===G[_0x4c8522(0x1b8)]&&this['_startFollowing']();let _0x54e36e=_0x3d43bb[_0x4c8522(0x17b)][_0x4c8522(0x1d7)];Object[_0x4c8522(0x1e7)](_0x54e36e)['forEach'](_0x15ab33=>{const _0x7f8e9=_0x4c8522;this[_0x7f8e9(0x195)][_0x7f8e9(0x1f5)](_0x15ab33['id'],_0x15ab33['params']?JSON[_0x7f8e9(0x1f6)](_0x15ab33[_0x7f8e9(0x1cf)]):null,{'fromCollab':!0x0});});}[_0x316f94(0x1b9)](){const _0x31efba=_0x316f94;var _0x46d91c;this[_0x31efba(0x1b3)][_0x31efba(0x1cd)](G[_0x31efba(0x1a1)]),(_0x46d91c=this[_0x31efba(0x1e6)])==null||_0x46d91c[_0x31efba(0x1d5)]();}[_0x316f94(0x1cb)](){const _0x3e724e=_0x316f94;this[_0x3e724e(0x1b3)]['next'](G[_0x3e724e(0x1b8)]),this[_0x3e724e(0x1f9)]();}};K=U([H(0x2,_0x557f50),H(0x3,_0x46b23b(V)),H(0x4,_0x41335f)],K);function q(){const _0x1a3a30=_0x316f94;let _0x189140=_0x32da5a(W),_0x4f313d=_0x32da5a(_0x3302a5),_0x383157=_0x3ea909(()=>_0x4f313d[_0x1a3a30(0x1b1)](_0x3134e5[_0x1a3a30(0x1fb)]),void 0x0,!0x1,[]),[_0x337bc9,_0xcc684c]=_0x3be037(null),[_0x228ee7,_0x16b755]=_0x3be037(G['IDLE']),_0x487fe9=_0x4a2319(null);return _0x2f1cba(()=>(_0x383157&&_0x189140[_0x1a3a30(0x1a3)](_0x383157[_0x1a3a30(0x18a)]())[_0x1a3a30(0x208)](_0x610749=>{const _0x394d16=_0x1a3a30;_0xcc684c(_0x610749),_0x487fe9[_0x394d16(0x1b6)]=_0x610749['status$'][_0x394d16(0x207)](_0x2c4feb=>{_0x16b755(_0x2c4feb);});}),()=>{const _0x2c5187=_0x1a3a30;var _0x1e14cc;(_0x1e14cc=_0x487fe9[_0x2c5187(0x1b6)])==null||_0x1e14cc[_0x2c5187(0x204)](),_0x487fe9['current']=null;}),[_0x383157,_0x189140]),_0x337bc9?_0x509609(_0x4cb2f3,{'align':'end','disabled':_0x228ee7===G[_0x1a3a30(0x1a1)],'className':'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','overlay':_0x509609(ce,{'status':_0x228ee7,'coordinator':_0x337bc9}),'children':_0x509609(_0x1a3a30(0x1dc),{'className':_0x3a1867(_0x1a3a30(0x19e),{'univer-cursor-not-allowed':_0x228ee7===G['OFFLINE'],'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x228ee7!==G['OFFLINE']}),'type':_0x1a3a30(0x1dc),'children':_0x509609(_0x3a9d6e,{'className':'univer-size-4'})})}):null;}function ce(_0x355703){const _0x39a89e=_0x316f94;let {status:_0x1e69d0,coordinator:_0x47d057}=_0x355703;switch(_0x1e69d0){case G[_0x39a89e(0x1b8)]:return _0x509609(le,{'coordinator':_0x47d057});case G[_0x39a89e(0x20d)]:return _0x509609(ue,{'coordinator':_0x47d057});case G[_0x39a89e(0x1f4)]:return _0x509609(de,{'coordinator':_0x47d057});case G[_0x39a89e(0x1a1)]:return _0x509609(fe,{});case G[_0x39a89e(0x1eb)]:return _0x509609(J,{'coordinator':_0x47d057});default:return null;}}function _0xb49f(){const _0x49a4c1=['has','onRendered','subscribe','then','_uiPartsService','get','275249lFqEgL','Start\x20following','FOLLOWING','_mountLiveShare','idle','status$','_liveShareService','_handleNewHost','_beIdle','data','presenting','_handleOperation','You\x27re\x20following\x20the\x20presenter','getLiveShareCoordinatorSync','registerInitialStateReporter','stopPresenting','_startLiveShareCoordinator','getTypeOfUnitDisposed$','presenter','div','@univerjs-pro/live-share','_presenter','0.20.1','getValue','getUnitId','setConfig','4IepavN','ONLINE','You\x27are\x20offline.','getMemberID','onStarting','override','You\x27re\x20not\x20following\x20the\x20presenter','type','_startPresenting','_commandService','registerComponent','SAME_OPERATION_SHARE_INTERVAL','6243396qBhOqU','_status','HEADER_MENU','following','Start','_entities','univer-border-none\x20univer-text-gray-600\x20univer-outline-none','getConfig','unitId','OFFLINE','dispose$','getLiveShareCoordinator','LIVESHARE_TERMINATE','LIVESHARE_NEW_HOST','default','find','onCommandExecuted','OPERATION','reverse','clear','_handleTerminate','forEach','symbol','LIVESHARE_REQUEST_HOST','live-share.config','getCurrentTypeOfUnit$','startFollowing','_status$','stringify','_sharedOperations','current','iterator','IDLE','_handleOffline','defineProperty','_collabSessionService','LIVESHARE_OPERATION','disposeWithMe','544582xOceXG','UNIVER_LIVE_SHARE_PLUGIN','object','version','packageName','UNIVER_UNKNOWN','_config','Stop\x20presenting','You\x27re\x20presenting\x20the\x20document','sessionStatus$','shouldShareOperation','delete','_injector','_handleOnline','createInstance','next','init','params','add','_configService','send','11210nMJkVv','call','dispose','_reporters','operations','_stopFollowing','_unitID','_univerInstanceService','length','button','text','12951oyRGuS','sheet','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','10442280Mwbzrw','function','tryStartPresenting','4946655YRvdgb','getInitialStates','_commandDisposable','values','9HfeRAq','_collabSession','decorate','PRESENTING','stopFollowing','asObservable','prototype','pipe','getOwnPropertyDescriptor','string','_startFollowing','mutations','NOT_FOLLOWING','executeCommand','parse','_init','5395165UhwbDT','_fetchOperations','_handleNewChangeSets','UNIVER_SHEET','not-following','registerSharedOperation','includes','_stopPresenting','Stop\x20following','univer-mb-3\x20univer-w-full\x20univer-text-sm','getTypeOfUnitAdded$','set','unsubscribe'];_0xb49f=function(){return _0x49a4c1;};return _0xb49f();}function le(_0xa7aaf6){const _0x5b2926=_0x316f94;let {coordinator:_0x18b3a0}=_0xa7aaf6;return _0x227845(_0x501d46,{'children':[_0x509609(_0x5b2926(0x185),{'className':_0x5b2926(0x201),'children':'Present\x20this\x20document'}),_0x509609(_0x4f7ec0,{'onClick':()=>_0x18b3a0[_0x5b2926(0x1e3)](),'children':_0x5b2926(0x19c)})]});}function ue(_0x52238a){const _0x321933=_0x316f94;let {coordinator:_0x2f8d60}=_0x52238a;return _0x227845(_0x501d46,{'children':[_0x509609(_0x321933(0x185),{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':_0x321933(0x17e)}),_0x509609(_0x4f7ec0,{'onClick':()=>_0x2f8d60[_0x321933(0x1ec)](),'children':_0x321933(0x200)})]});}function de(_0x273cf4){const _0x88b058=_0x316f94;let {coordinator:_0xd99e2d}=_0x273cf4;return _0x227845(_0x501d46,{'children':[_0x509609(_0x88b058(0x185),{'className':_0x88b058(0x201),'children':_0x88b058(0x192)}),_0x509609(_0x4f7ec0,{'variant':_0x88b058(0x1dd),'onClick':()=>_0xd99e2d[_0x88b058(0x1b2)](),'children':_0x88b058(0x20c)})]});}function J(_0x1fbc3d){const _0x2c0bf3=_0x316f94;let {coordinator:_0x4fa7f0}=_0x1fbc3d;return _0x227845(_0x501d46,{'children':[_0x509609(_0x2c0bf3(0x185),{'className':_0x2c0bf3(0x201),'children':_0x2c0bf3(0x1c6)}),_0x509609(_0x4f7ec0,{'variant':_0x2c0bf3(0x1a6),'onClick':()=>_0x4fa7f0[_0x2c0bf3(0x181)](),'children':_0x2c0bf3(0x1c5)})]});}function fe(){const _0x466b41=_0x316f94;return _0x509609(_0x501d46,{'children':_0x466b41(0x18e)});}let Y=class extends _0x2adf71{constructor(_0x352caf,_0x3d6cec){const _0xb675b1=_0x316f94;super(),this[_0xb675b1(0x1ca)]=_0x352caf,this[_0xb675b1(0x209)]=_0x3d6cec,this[_0xb675b1(0x20e)]();}[_0x316f94(0x20e)](){const _0x5cc56f=_0x316f94;this[_0x5cc56f(0x1bd)](this[_0x5cc56f(0x209)][_0x5cc56f(0x196)](_0x25173b[_0x5cc56f(0x19a)],()=>_0x4f41a9(q,this['_injector'])));}};Y=U([H(0x0,_0x46b23b(_0x1d072d)),H(0x1,_0x3b40e4)],Y);function _0x5391(_0x32d12b,_0x12e4cb){_0x32d12b=_0x32d12b-0x177;const _0xb49f3d=_0xb49f();let _0x539147=_0xb49f3d[_0x32d12b];return _0x539147;}var pe=_0x316f94(0x186),me=_0x316f94(0x188);const X=_0x316f94(0x1b0);Symbol(X);const Z={};let Q=class extends _0x2adf71{constructor(_0xe4578c){const _0xb1eb52=_0x316f94;super(),this[_0xb1eb52(0x178)]=_0xe4578c,this['_init']();}[_0x316f94(0x1f7)](){const _0x8bc95a=_0x316f94;[_0xefcc16['id'],_0x160a49['id'],_0x1ff449['id']][_0x8bc95a(0x1ad)](_0x9c10ee=>{const _0x31eb6b=_0x8bc95a;this[_0x31eb6b(0x1bd)](this['_liveShareService'][_0x31eb6b(0x1fd)](_0x9c10ee));});}};Q=U([H(0x0,_0x46b23b(V))],Q);let $=class extends _0x48ed37{constructor(_0x3b223f=Z,_0x31863f,_0x9f6c75){const _0x2c7af5=_0x316f94;super(),this[_0x2c7af5(0x1c4)]=_0x3b223f,this[_0x2c7af5(0x1ca)]=_0x31863f,this['_configService']=_0x9f6c75;let {..._0x3e1fc8}=_0x2e2be3({},Z,this['_config']);this[_0x2c7af5(0x1d1)][_0x2c7af5(0x18b)](X,_0x3e1fc8);}[_0x316f94(0x190)](){const _0x35b826=_0x316f94;_0x581342(this['_injector'],_0x3d81e7([[V],[W],[Q],[Y]],this[_0x35b826(0x1c4)][_0x35b826(0x191)])),_0x52a28d(this['_injector'],[[Q]]);}[_0x316f94(0x206)](){const _0x1f5c2b=_0x316f94;_0x52a28d(this[_0x1f5c2b(0x1ca)],[[Y]]);}};B($,'type',_0x3134e5[_0x316f94(0x1c3)]),B($,'pluginName',_0x316f94(0x1bf)),B($,_0x316f94(0x1c2),pe),B($,_0x316f94(0x1c1),me),$=U([_0x4a35d8(_0x42f673),H(0x1,_0x46b23b(_0x1d072d)),H(0x2,_0x557f50)],$);export{Y as DesktopLiveShareController,q as LiveShare,W as LiveShareController,K as LiveShareCoordinator,V as LiveShareService,G as LiveShareStatus,$ as UniverLiveSharePlugin};
1
+ const _0x145510=_0x468b;(function(_0x589d39,_0x5a2e00){const _0x38d1d8=_0x468b,_0x5a87ef=_0x589d39();while(!![]){try{const _0x730308=parseInt(_0x38d1d8(0x161))/0x1+parseInt(_0x38d1d8(0x18e))/0x2+parseInt(_0x38d1d8(0x139))/0x3*(parseInt(_0x38d1d8(0x131))/0x4)+-parseInt(_0x38d1d8(0x177))/0x5+-parseInt(_0x38d1d8(0x19c))/0x6+parseInt(_0x38d1d8(0x176))/0x7*(-parseInt(_0x38d1d8(0x188))/0x8)+parseInt(_0x38d1d8(0x183))/0x9;if(_0x730308===_0x5a2e00)break;else _0x5a87ef['push'](_0x5a87ef['shift']());}catch(_0x5ae1e4){_0x5a87ef['push'](_0x5a87ef['shift']());}}}(_0x37bc,0x69b20));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';function _0x468b(_0x135c14,_0x3899fe){_0x135c14=_0x135c14-0x12f;const _0x37bc96=_0x37bc();let _0x468bc4=_0x37bc96[_0x135c14];return _0x468bc4;}import{CollaborationEvent,parseProtocolChangeset}from'@univerjs-pro/collaboration';function _0x37bc(){const _0x10e528=['Stop\x20presenting','getValue','string','clear','getLiveShareCoordinatorSync','complete','onRendered','_configService','find','registerComponent','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','getOwnPropertyDescriptor','_status','registerSharedOperation','_mountLiveShare','stopFollowing','dispose$','init','has','_handleOnline','add','stringify','disposeWithMe','OPERATION','@univerjs-pro/live-share','getInitialStates','univer-mb-3\x20univer-w-full\x20univer-text-sm','presenting','UNIVER_SHEET','shouldShareOperation','symbol','_uiPartsService','_fetchOperations','object','302512ZyafqF','OFFLINE','dispose','set','operations','data','params','HEADER_MENU','subscribe','sessionStatus$','_stopFollowing','unitId','_startFollowing','createInstance','next','Start','sheet','status$','following','_startPresenting','asObservable','28uraIdl','3293745EhzWub','type','_config','length','_stopPresenting','defineProperty','toPrimitive','UNIVER_LIVE_SHARE_PLUGIN','You\x27are\x20offline.','pipe','stopPresenting','div','2796840asYDfY','from','ONLINE','_handleNewChangeSets','_handleOffline','454288UPbkfV','then','Start\x20following','executeCommand','version','end','1210650MlGhtA','reverse','_init','not-following','_sharedOperations','getCurrentTypeOfUnit$','getConfig','_injector','_reporters','button','registerInitialStateReporter','getStatus','send','_collabSession','1345266IkZlKw','tryStartPresenting','_commandService','univer-border-none\x20univer-text-gray-600\x20univer-outline-none','You\x27re\x20following\x20the\x20presenter','_handleNewHost','delete','decorate','_collabSessionService','LIVESHARE_FETCH_OPERATIONS','override','Stop\x20following','get','_presenter','SAME_OPERATION_SHARE_INTERVAL','current','default','unsubscribe','values','function','presenter','LIVESHARE_REQUEST_HOST','_status$','event$','_beIdle','NOT_FOLLOWING','_handleTerminate','getLiveShareCoordinator','_univerInstanceService','text','_startLiveShareCoordinator','NEW_CHANGESETS','getTypeOfUnitAdded$','PRESENTING','You\x27re\x20not\x20following\x20the\x20presenter','parse','getMemberID','includes','_unitID','_commandDisposable','constructor','2012lQltjD','startFollowing','iterator','getUnitId','FOLLOWING','pluginName','forEach','_liveShareService','1935XJrWiY','LIVESHARE_TERMINATE','_entities','LIVESHARE_OPERATION','IDLE','getTypeOfUnitDisposed$'];_0x37bc=function(){return _0x10e528;};return _0x37bc();}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(_0x2c1592){'@babel/helpers - typeof';const _0x9ddc8f=_0x468b;return _typeof=_0x9ddc8f(0x1af)==typeof Symbol&&_0x9ddc8f(0x15d)==typeof Symbol[_0x9ddc8f(0x133)]?function(_0x25b7e2){return typeof _0x25b7e2;}:function(_0x193da1){const _0x22fe08=_0x9ddc8f;return _0x193da1&&_0x22fe08(0x1af)==typeof Symbol&&_0x193da1[_0x22fe08(0x130)]===Symbol&&_0x193da1!==Symbol['prototype']?_0x22fe08(0x15d):typeof _0x193da1;},_typeof(_0x2c1592);}function toPrimitive(_0x4d3b76,_0x1823ff){const _0x5835ef=_0x468b;if('object'!=_typeof(_0x4d3b76)||!_0x4d3b76)return _0x4d3b76;var _0x35254d=_0x4d3b76[Symbol[_0x5835ef(0x17d)]];if(void 0x0!==_0x35254d){var _0xe522a=_0x35254d['call'](_0x4d3b76,_0x1823ff||_0x5835ef(0x1ac));if(_0x5835ef(0x160)!=_typeof(_0xe522a))return _0xe522a;throw new TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x5835ef(0x141)===_0x1823ff?String:Number)(_0x4d3b76);}function toPropertyKey(_0x1e7b66){const _0x2377bf=_0x468b;var _0x251fa2=toPrimitive(_0x1e7b66,_0x2377bf(0x141));return'symbol'==_typeof(_0x251fa2)?_0x251fa2:_0x251fa2+'';}function _defineProperty(_0x5b3693,_0x37ae5c,_0x1ead9e){return(_0x37ae5c=toPropertyKey(_0x37ae5c))in _0x5b3693?Object['defineProperty'](_0x5b3693,_0x37ae5c,{'value':_0x1ead9e,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x5b3693[_0x37ae5c]=_0x1ead9e,_0x5b3693;}var LiveShareService=class extends Disposable{constructor(..._0x545f8c){const _0x1c1f5f=_0x468b;super(..._0x545f8c),_defineProperty(this,_0x1c1f5f(0x192),new Set()),_defineProperty(this,_0x1c1f5f(0x196),new Set());}[_0x145510(0x14c)](_0xd2771e){const _0x44753e=_0x145510;return this[_0x44753e(0x192)]['add'](_0xd2771e),toDisposable(()=>this[_0x44753e(0x192)][_0x44753e(0x1a2)](_0xd2771e));}[_0x145510(0x198)](_0x4cf88c){const _0x4d7afc=_0x145510;return this[_0x4d7afc(0x196)][_0x4d7afc(0x153)](_0x4cf88c),toDisposable(()=>this[_0x4d7afc(0x196)][_0x4d7afc(0x1a2)](_0x4cf88c));}[_0x145510(0x15c)](_0x521b7c){const _0x412465=_0x145510;return this[_0x412465(0x192)]['has'](_0x521b7c);}[_0x145510(0x158)](_0x4e1a46){const _0x30f8e4=_0x145510;return Array[_0x30f8e4(0x184)](this['_reporters'])['map'](_0x31713c=>_0x31713c(_0x4e1a46));}};function __decorateParam(_0xb5c562,_0x1c3e5c){return function(_0x35c097,_0x2415f0){_0x1c3e5c(_0x35c097,_0x2415f0,_0xb5c562);};}function __decorate(_0x304c27,_0x1160c7,_0x128c22,_0x9f2ff1){const _0x64ccb1=_0x145510;var _0x5e7126=arguments[_0x64ccb1(0x17a)],_0x3d6f56=_0x5e7126<0x3?_0x1160c7:_0x9f2ff1===null?_0x9f2ff1=Object[_0x64ccb1(0x14a)](_0x1160c7,_0x128c22):_0x9f2ff1,_0x277d1d;if(typeof Reflect===_0x64ccb1(0x160)&&typeof Reflect[_0x64ccb1(0x1a3)]===_0x64ccb1(0x1af))_0x3d6f56=Reflect[_0x64ccb1(0x1a3)](_0x304c27,_0x1160c7,_0x128c22,_0x9f2ff1);else{for(var _0x2286d5=_0x304c27[_0x64ccb1(0x17a)]-0x1;_0x2286d5>=0x0;_0x2286d5--)if(_0x277d1d=_0x304c27[_0x2286d5])_0x3d6f56=(_0x5e7126<0x3?_0x277d1d(_0x3d6f56):_0x5e7126>0x3?_0x277d1d(_0x1160c7,_0x128c22,_0x3d6f56):_0x277d1d(_0x1160c7,_0x128c22))||_0x3d6f56;}return _0x5e7126>0x3&&_0x3d6f56&&Object[_0x64ccb1(0x17c)](_0x1160c7,_0x128c22,_0x3d6f56),_0x3d6f56;}let LiveShareController=class LiveShareController extends RxDisposable{constructor(_0x250c6f,_0x5b36c8,_0x14e218){const _0x2b9f2f=_0x145510;super(),this[_0x2b9f2f(0x1b8)]=_0x250c6f,this[_0x2b9f2f(0x195)]=_0x5b36c8,this['_collabSessionService']=_0x14e218,_defineProperty(this,_0x2b9f2f(0x13b),new Map()),this[_0x2b9f2f(0x190)]();}async[_0x145510(0x1b7)](_0x5bfac5){const _0x53b975=_0x145510;if(!this[_0x53b975(0x13b)]['has'](_0x5bfac5))await this[_0x53b975(0x1ba)](_0x5bfac5);return this[_0x53b975(0x13b)]['get'](_0x5bfac5);}[_0x145510(0x143)](_0x3e53dc){var _0x16c001;return(_0x16c001=this['_entities']['get'](_0x3e53dc))!==null&&_0x16c001!==void 0x0?_0x16c001:null;}[_0x145510(0x190)](){const _0x1df144=_0x145510;this[_0x1df144(0x1b8)][_0x1df144(0x1bc)](UniverInstanceType['UNIVER_SHEET'])[_0x1df144(0x180)](takeUntil(this[_0x1df144(0x14f)]))[_0x1df144(0x169)](async _0xc76900=>{const _0x1782e1=_0x1df144,_0xd234c1=_0xc76900[_0x1782e1(0x134)]();if(this[_0x1782e1(0x13b)][_0x1782e1(0x151)](_0xd234c1))return;this[_0x1782e1(0x1ba)](_0xd234c1);}),this[_0x1df144(0x1b8)][_0x1df144(0x13e)](UniverInstanceType[_0x1df144(0x15b)])[_0x1df144(0x180)](takeUntil(this[_0x1df144(0x14f)]))[_0x1df144(0x169)](_0x1cba0d=>{const _0x311621=_0x1df144,_0x4a9d8d=_0x1cba0d[_0x311621(0x134)](),_0x38503a=this['_entities'][_0x311621(0x1a8)](_0x4a9d8d);_0x38503a===null||_0x38503a===void 0x0||_0x38503a[_0x311621(0x163)]();});}async[_0x145510(0x1ba)](_0x1a7a36){const _0x4404e0=_0x145510,_0x2a9d85=await this[_0x4404e0(0x1a4)]['requireSession'](_0x1a7a36),_0x432388=this[_0x4404e0(0x195)][_0x4404e0(0x16e)](LiveShareCoordinator,_0x1a7a36,_0x2a9d85);return _0x432388[_0x4404e0(0x150)](),this[_0x4404e0(0x13b)][_0x4404e0(0x164)](_0x1a7a36,_0x432388),_0x432388;}};LiveShareController=__decorate([__decorateParam(0x0,IUniverInstanceService),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,Inject(CollaborationSessionService))],LiveShareController);let LiveShareStatus=function(_0x2fa46f){const _0x206757=_0x145510;return _0x2fa46f[_0x206757(0x162)]='offline',_0x2fa46f[_0x206757(0x13d)]='idle',_0x2fa46f[_0x206757(0x135)]=_0x206757(0x173),_0x2fa46f[_0x206757(0x1b5)]=_0x206757(0x191),_0x2fa46f[_0x206757(0x1bd)]=_0x206757(0x15a),_0x2fa46f;}({});const SAME_OPERATION_SHARE_INTERVAL_KEY=_0x145510(0x1aa),DEFAULT_SAME_OPERATION_SHARE_INTERVAL=0xc8;let LiveShareCoordinator=class LiveShareCoordinator extends RxDisposable{get['_status'](){const _0x640031=_0x145510;return this[_0x640031(0x1b2)][_0x640031(0x140)]();}constructor(_0x4b75ad,_0x42486a,_0x3a8f24,_0x145748,_0x4d95b4){const _0x1d1889=_0x145510;super(),this[_0x1d1889(0x1c2)]=_0x4b75ad,this[_0x1d1889(0x19b)]=_0x42486a,this['_configService']=_0x3a8f24,this[_0x1d1889(0x138)]=_0x145748,this[_0x1d1889(0x19e)]=_0x4d95b4,_defineProperty(this,_0x1d1889(0x1b2),new BehaviorSubject(LiveShareStatus[_0x1d1889(0x13d)])),_defineProperty(this,_0x1d1889(0x172),this[_0x1d1889(0x1b2)][_0x1d1889(0x175)]()),_defineProperty(this,_0x1d1889(0x190),![]),_defineProperty(this,_0x1d1889(0x12f),null),_defineProperty(this,_0x1d1889(0x1a9),null);}[_0x145510(0x163)](){const _0x540676=_0x145510;var _0x1375f6;(_0x1375f6=this['_commandDisposable'])===null||_0x1375f6===void 0x0||_0x1375f6[_0x540676(0x163)](),this[_0x540676(0x1b2)][_0x540676(0x16f)](LiveShareStatus['IDLE']),this[_0x540676(0x1b2)][_0x540676(0x144)]();}[_0x145510(0x199)](){const _0xb1b89a=_0x145510;return this[_0xb1b89a(0x14b)];}[_0x145510(0x150)](){const _0x3fc54a=_0x145510;if(this[_0x3fc54a(0x190)])return;this[_0x3fc54a(0x190)]=!![],this[_0x3fc54a(0x19b)][_0x3fc54a(0x16a)]['pipe'](takeUntil(this[_0x3fc54a(0x14f)]))['subscribe'](_0xefe6f0=>{const _0x5de895=_0x3fc54a;switch(_0xefe6f0){case SessionStatus[_0x5de895(0x162)]:this[_0x5de895(0x187)]();break;case SessionStatus[_0x5de895(0x185)]:this[_0x5de895(0x152)]();break;default:}}),this['_collabSession'][_0x3fc54a(0x1b3)]['pipe'](takeUntil(this[_0x3fc54a(0x14f)]))[_0x3fc54a(0x169)](_0x3006d8=>{const _0x6eda27=_0x3fc54a,{eventID:_0x3d4d8e}=_0x3006d8;switch(_0x3d4d8e){case CollaborationEvent['LIVESHARE_NEW_HOST']:this[_0x6eda27(0x1a1)](_0x3006d8);break;case CollaborationEvent[_0x6eda27(0x13c)]:this['_handleOperation'](_0x3006d8);break;case CollaborationEvent[_0x6eda27(0x13a)]:this[_0x6eda27(0x1b6)]();break;case CollaborationEvent[_0x6eda27(0x1bb)]:this[_0x6eda27(0x186)](_0x3006d8);break;default:}});}[_0x145510(0x19d)](){const _0x661b95=_0x145510;this[_0x661b95(0x19b)][_0x661b95(0x19a)]({'eventID':CollaborationEvent[_0x661b95(0x1b1)],'data':{'unitID':this[_0x661b95(0x1c2)],'userID':this[_0x661b95(0x19b)]['getMemberID']()}},this[_0x661b95(0x1c2)]);}[_0x145510(0x181)](){const _0x6e1112=_0x145510;this['_status']===LiveShareStatus[_0x6e1112(0x1bd)]&&(this[_0x6e1112(0x1b2)][_0x6e1112(0x16f)](LiveShareStatus[_0x6e1112(0x13d)]),this[_0x6e1112(0x19b)][_0x6e1112(0x19a)]({'eventID':CollaborationEvent[_0x6e1112(0x13a)],'data':{'unitID':this[_0x6e1112(0x1c2)]}},this[_0x6e1112(0x1c2)]));}[_0x145510(0x132)](){const _0x523a96=_0x145510;if(this[_0x523a96(0x14b)]!==LiveShareStatus['NOT_FOLLOWING'])return;this['_status$'][_0x523a96(0x16f)](LiveShareStatus[_0x523a96(0x135)]),this[_0x523a96(0x16d)]();}['stopFollowing'](){const _0x48ec01=_0x145510;if(this[_0x48ec01(0x14b)]!==LiveShareStatus[_0x48ec01(0x135)])return;this[_0x48ec01(0x16b)]();}[_0x145510(0x1a1)](_0xc062d4){const _0xc3ea15=_0x145510,{presenter:_0x1ad39a}=_0xc062d4[_0xc3ea15(0x166)],_0x1e1d8f=this[_0xc3ea15(0x19b)]['getMemberID']();this[_0xc3ea15(0x1a9)]=_0x1ad39a;if(_0x1ad39a===_0x1e1d8f)this[_0xc3ea15(0x16b)](),this[_0xc3ea15(0x174)]();else this[_0xc3ea15(0x14b)]!==LiveShareStatus[_0xc3ea15(0x1b5)]&&(this[_0xc3ea15(0x17b)](),this[_0xc3ea15(0x16d)]());}[_0x145510(0x15f)](){const _0x50c188=_0x145510,_0x1ae305={'eventID':CollaborationEvent[_0x50c188(0x1a5)]};this[_0x50c188(0x19b)]['send'](_0x1ae305,this['_unitID']);}[_0x145510(0x1b6)](){const _0x303715=_0x145510;this[_0x303715(0x1a9)]=null;if(this[_0x303715(0x14b)]!==LiveShareStatus[_0x303715(0x1bd)])this[_0x303715(0x1b4)]();}[_0x145510(0x186)](_0x8656e9){const _0x2b7b6a=_0x145510;if(this[_0x2b7b6a(0x14b)]===LiveShareStatus[_0x2b7b6a(0x135)]&&this[_0x2b7b6a(0x1a9)]===_0x8656e9[_0x2b7b6a(0x166)]['memberID']){const _0x521de4=parseProtocolChangeset(_0x8656e9[_0x2b7b6a(0x166)])['mutations'][_0x2b7b6a(0x18f)]()[_0x2b7b6a(0x147)](_0x254745=>_0x254745['id']===InsertSheetMutation['id']);if(_0x521de4){const _0x311bec=_0x521de4[_0x2b7b6a(0x167)][_0x2b7b6a(0x16c)],_0x2e15ba=_0x521de4[_0x2b7b6a(0x167)][_0x2b7b6a(0x171)]['id'];setTimeout(()=>{const _0x41a75b=_0x2b7b6a;this[_0x41a75b(0x19e)][_0x41a75b(0x18b)](SetWorksheetActiveOperation['id'],{'unitId':_0x311bec,'subUnitId':_0x2e15ba},{'fromCollab':!![]});});}}}[_0x145510(0x174)](){const _0x5abaa7=_0x145510;this[_0x5abaa7(0x1b2)][_0x5abaa7(0x16f)](LiveShareStatus[_0x5abaa7(0x1bd)]);const _0x54587d=new Map(),_0xfbb8f0=this[_0x5abaa7(0x12f)]=new DisposableCollection();_0xfbb8f0['add'](toDisposable(()=>{const _0x3c78c5=_0x5abaa7;_0x54587d[_0x3c78c5(0x137)](_0x232161=>_0x232161['complete']()),_0x54587d[_0x3c78c5(0x142)]();})),_0xfbb8f0[_0x5abaa7(0x153)](this['_commandService']['onCommandExecuted'](_0x2b3b1b=>{const _0x11d922=_0x5abaa7;if(_0x2b3b1b[_0x11d922(0x178)]!==CommandType[_0x11d922(0x156)]||!this[_0x11d922(0x138)]['shouldShareOperation'](_0x2b3b1b['id']))return;const {id:_0x3fd3c8}=_0x2b3b1b;let _0x5054c5;if(!_0x54587d[_0x11d922(0x151)](_0x3fd3c8)){var _0x4966b6;_0x5054c5=new Subject(),_0x54587d['set'](_0x3fd3c8,_0x5054c5),_0x5054c5[_0x11d922(0x180)](throttleTime((_0x4966b6=this[_0x11d922(0x146)][_0x11d922(0x194)](_0x11d922(0x1aa)))!==null&&_0x4966b6!==void 0x0?_0x4966b6:DEFAULT_SAME_OPERATION_SHARE_INTERVAL,void 0x0,{'trailing':!![],'leading':!![]}))['subscribe'](_0x3fe255=>{const _0x1b7157=_0x11d922;this[_0x1b7157(0x19b)][_0x1b7157(0x19a)]({'eventID':CollaborationEvent[_0x1b7157(0x13c)],'data':{'unitID':this['_unitID'],'operations':{[_0x3fe255['id']]:{'id':_0x3fe255['id'],'params':JSON[_0x1b7157(0x154)](_0x3fe255[_0x1b7157(0x167)])}}}},this[_0x1b7157(0x1c2)]);});}else _0x5054c5=_0x54587d[_0x11d922(0x1a8)](_0x3fd3c8);_0x5054c5[_0x11d922(0x16f)](_0x2b3b1b);})),this['_liveShareService']['getInitialStates'](this[_0x5abaa7(0x1c2)])[_0x5abaa7(0x137)](_0x1ab225=>this[_0x5abaa7(0x19b)][_0x5abaa7(0x19a)]({'eventID':CollaborationEvent[_0x5abaa7(0x13c)],'data':{'unitID':this[_0x5abaa7(0x1c2)],'operations':{[_0x1ab225['id']]:{'id':_0x1ab225['id'],'params':JSON[_0x5abaa7(0x154)](_0x1ab225['params'])}}}},this['_unitID']));}[_0x145510(0x17b)](){const _0x48679c=_0x145510;var _0x4990ab;this[_0x48679c(0x1b2)][_0x48679c(0x16f)](LiveShareStatus[_0x48679c(0x13d)]),(_0x4990ab=this['_commandDisposable'])===null||_0x4990ab===void 0x0||_0x4990ab[_0x48679c(0x163)](),this[_0x48679c(0x12f)]=null;}[_0x145510(0x16d)](){const _0x1b11c0=_0x145510;var _0x2c726f;(_0x2c726f=this[_0x1b11c0(0x12f)])===null||_0x2c726f===void 0x0||_0x2c726f[_0x1b11c0(0x163)](),this[_0x1b11c0(0x1b2)][_0x1b11c0(0x16f)](LiveShareStatus[_0x1b11c0(0x135)]);}[_0x145510(0x1b4)](){const _0x514fd0=_0x145510;var _0x146e70;this['_status$']['next'](LiveShareStatus[_0x514fd0(0x13d)]),(_0x146e70=this[_0x514fd0(0x12f)])===null||_0x146e70===void 0x0||_0x146e70[_0x514fd0(0x163)](),this[_0x514fd0(0x12f)]=null;}['_stopFollowing'](){const _0xc76920=_0x145510;var _0x1ac0c6;this[_0xc76920(0x1b2)][_0xc76920(0x16f)](LiveShareStatus[_0xc76920(0x1b5)]),(_0x1ac0c6=this[_0xc76920(0x12f)])===null||_0x1ac0c6===void 0x0||_0x1ac0c6[_0xc76920(0x163)]();}['_handleOperation'](_0x56a96d){const _0x50295d=_0x145510;if([LiveShareStatus['PRESENTING'],LiveShareStatus[_0x50295d(0x1b5)],LiveShareStatus[_0x50295d(0x162)]][_0x50295d(0x1c1)](this['_status']))return;if(!_0x56a96d[_0x50295d(0x166)][_0x50295d(0x1b0)]||_0x56a96d['data'][_0x50295d(0x1b0)]===this[_0x50295d(0x19b)][_0x50295d(0x1c0)]())return;if(this[_0x50295d(0x14b)]===LiveShareStatus[_0x50295d(0x13d)])this[_0x50295d(0x16d)]();const _0x1db15b=_0x56a96d[_0x50295d(0x166)][_0x50295d(0x165)];Object[_0x50295d(0x1ae)](_0x1db15b)[_0x50295d(0x137)](_0x357d73=>{const _0x5b390b=_0x50295d;this[_0x5b390b(0x19e)][_0x5b390b(0x18b)](_0x357d73['id'],_0x357d73['params']?JSON[_0x5b390b(0x1bf)](_0x357d73[_0x5b390b(0x167)]):null,{'fromCollab':!![]});});}[_0x145510(0x187)](){const _0x50b838=_0x145510;var _0x1018ea;this['_status$']['next'](LiveShareStatus[_0x50b838(0x162)]),(_0x1018ea=this[_0x50b838(0x12f)])===null||_0x1018ea===void 0x0||_0x1018ea[_0x50b838(0x163)]();}[_0x145510(0x152)](){const _0x16e2ec=_0x145510;this[_0x16e2ec(0x1b2)][_0x16e2ec(0x16f)](LiveShareStatus['IDLE']),this['_fetchOperations']();}};LiveShareCoordinator=__decorate([__decorateParam(0x2,IConfigService),__decorateParam(0x3,Inject(LiveShareService)),__decorateParam(0x4,ICommandService)],LiveShareCoordinator);function LiveShare(){const _0x18b18d=_0x145510,_0x398817=useDependency(LiveShareController),_0x2827f5=useDependency(IUniverInstanceService),_0x12796e=useObservable(()=>_0x2827f5[_0x18b18d(0x193)](UniverInstanceType[_0x18b18d(0x15b)]),void 0x0,![],[]),[_0x381085,_0x13eb19]=useState(null),[_0x3b9769,_0x554195]=useState(LiveShareStatus['IDLE']),_0x1b0ac0=useRef(null);useEffect(()=>{const _0x42747e=_0x18b18d;if(_0x12796e)_0x398817[_0x42747e(0x1b7)](_0x12796e['getUnitId']())[_0x42747e(0x189)](_0x539d2b=>{const _0x1c627f=_0x42747e;_0x13eb19(_0x539d2b),_0x1b0ac0['current']=_0x539d2b[_0x1c627f(0x172)][_0x1c627f(0x169)](_0x49e18f=>{_0x554195(_0x49e18f);});});return()=>{const _0x4f485e=_0x42747e;var _0x29cf09;(_0x29cf09=_0x1b0ac0['current'])===null||_0x29cf09===void 0x0||_0x29cf09[_0x4f485e(0x1ad)](),_0x1b0ac0[_0x4f485e(0x1ab)]=null;};},[_0x12796e,_0x398817]);if(!_0x381085)return null;return jsx(Dropdown,{'align':_0x18b18d(0x18d),'disabled':_0x3b9769===LiveShareStatus['OFFLINE'],'className':_0x18b18d(0x149),'overlay':jsx(LiveShareDropdown,{'status':_0x3b9769,'coordinator':_0x381085}),'children':jsx('button',{'className':clsx(_0x18b18d(0x19f),{'univer-cursor-not-allowed':_0x3b9769===LiveShareStatus[_0x18b18d(0x162)],'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x3b9769!==LiveShareStatus['OFFLINE']}),'type':_0x18b18d(0x197),'children':jsx(LiveShareIcon,{'className':'univer-size-4'})})});}function LiveShareDropdown(_0x49552a){const _0x1a9b4e=_0x145510,{status:_0x4d47d2,coordinator:_0x541606}=_0x49552a;switch(_0x4d47d2){case LiveShareStatus['IDLE']:return jsx(Idle,{'coordinator':_0x541606});case LiveShareStatus['FOLLOWING']:return jsx(Following,{'coordinator':_0x541606});case LiveShareStatus[_0x1a9b4e(0x1b5)]:return jsx(NotFollowing,{'coordinator':_0x541606});case LiveShareStatus[_0x1a9b4e(0x162)]:return jsx(Offline,{});case LiveShareStatus['PRESENTING']:return jsx(Presenting,{'coordinator':_0x541606});default:return null;}}function Idle(_0x4273ca){const _0x20c171=_0x145510,{coordinator:_0x3c5bc9}=_0x4273ca;return jsxs(Fragment,{'children':[jsx(_0x20c171(0x182),{'className':'univer-mb-3\x20univer-w-full\x20univer-text-sm','children':'Present\x20this\x20document'}),jsx(Button,{'onClick':()=>_0x3c5bc9[_0x20c171(0x19d)](),'children':_0x20c171(0x170)})]});}function Following(_0x346a56){const _0x55a4cc=_0x145510,{coordinator:_0x134617}=_0x346a56;return jsxs(Fragment,{'children':[jsx(_0x55a4cc(0x182),{'className':_0x55a4cc(0x159),'children':_0x55a4cc(0x1a0)}),jsx(Button,{'onClick':()=>_0x134617[_0x55a4cc(0x14e)](),'children':_0x55a4cc(0x1a7)})]});}function NotFollowing(_0x57bf12){const _0x49a386=_0x145510,{coordinator:_0x29442a}=_0x57bf12;return jsxs(Fragment,{'children':[jsx(_0x49a386(0x182),{'className':_0x49a386(0x159),'children':_0x49a386(0x1be)}),jsx(Button,{'variant':_0x49a386(0x1b9),'onClick':()=>_0x29442a[_0x49a386(0x132)](),'children':_0x49a386(0x18a)})]});}function Presenting(_0x5393e8){const _0x10f9d8=_0x145510,{coordinator:_0x57135c}=_0x5393e8;return jsxs(Fragment,{'children':[jsx(_0x10f9d8(0x182),{'className':_0x10f9d8(0x159),'children':'You\x27re\x20presenting\x20the\x20document'}),jsx(Button,{'variant':_0x10f9d8(0x1ac),'onClick':()=>_0x57135c[_0x10f9d8(0x181)](),'children':_0x10f9d8(0x13f)})]});}function Offline(){const _0x353128=_0x145510;return jsx(Fragment,{'children':_0x353128(0x17f)});}let DesktopLiveShareController=class DesktopLiveShareController extends Disposable{constructor(_0x1e3586,_0x301d01){const _0x2fe817=_0x145510;super(),this[_0x2fe817(0x195)]=_0x1e3586,this['_uiPartsService']=_0x301d01,this[_0x2fe817(0x14d)]();}[_0x145510(0x14d)](){const _0x172755=_0x145510;this[_0x172755(0x155)](this[_0x172755(0x15e)][_0x172755(0x148)](BuiltInUIPart[_0x172755(0x168)],()=>connectInjector(LiveShare,this[_0x172755(0x195)])));}};DesktopLiveShareController=__decorate([__decorateParam(0x0,Inject(Injector)),__decorateParam(0x1,IUIPartsService)],DesktopLiveShareController);var name=_0x145510(0x157),version='0.21.0';const LIVE_SHARE_PLUGIN_CONFIG_KEY='live-share.config',configSymbol=Symbol(LIVE_SHARE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let LiveShareCoreExtensionsController=class LiveShareCoreExtensionsController extends Disposable{constructor(_0x4bdbcc){const _0x50a80e=_0x145510;super(),this[_0x50a80e(0x138)]=_0x4bdbcc,this[_0x50a80e(0x190)]();}[_0x145510(0x190)](){const _0x3ef097=_0x145510;[SetZoomRatioOperation['id'],SetScrollOperation['id'],SetWorksheetActiveOperation['id']][_0x3ef097(0x137)](_0x9af2a7=>{const _0xdf9e63=_0x3ef097;this['disposeWithMe'](this[_0xdf9e63(0x138)][_0xdf9e63(0x14c)](_0x9af2a7));});}};LiveShareCoreExtensionsController=__decorate([__decorateParam(0x0,Inject(LiveShareService))],LiveShareCoreExtensionsController);let UniverLiveSharePlugin=class UniverLiveSharePlugin extends Plugin{constructor(_0x36a39b=defaultPluginConfig,_0x43320d,_0x52d45e){const _0x564a81=_0x145510;super(),this[_0x564a81(0x179)]=_0x36a39b,this['_injector']=_0x43320d,this[_0x564a81(0x146)]=_0x52d45e;const {..._0x27ffc2}=merge({},defaultPluginConfig,this[_0x564a81(0x179)]);this['_configService']['setConfig'](LIVE_SHARE_PLUGIN_CONFIG_KEY,_0x27ffc2);}['onStarting'](){const _0x4e5170=_0x145510;registerDependencies(this[_0x4e5170(0x195)],mergeOverrideWithDependencies([[LiveShareService],[LiveShareController],[LiveShareCoreExtensionsController],[DesktopLiveShareController]],this['_config'][_0x4e5170(0x1a6)])),touchDependencies(this[_0x4e5170(0x195)],[[LiveShareCoreExtensionsController]]);}[_0x145510(0x145)](){const _0x10c9dd=_0x145510;touchDependencies(this[_0x10c9dd(0x195)],[[DesktopLiveShareController]]);}};_defineProperty(UniverLiveSharePlugin,_0x145510(0x178),UniverInstanceType['UNIVER_UNKNOWN']),_defineProperty(UniverLiveSharePlugin,_0x145510(0x136),_0x145510(0x17e)),_defineProperty(UniverLiveSharePlugin,'packageName',name),_defineProperty(UniverLiveSharePlugin,_0x145510(0x18c),version),UniverLiveSharePlugin=__decorate([DependentOn(UniverCollaborationClientPlugin),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,IConfigService)],UniverLiveSharePlugin);export{DesktopLiveShareController,LiveShare,LiveShareController,LiveShareCoordinator,LiveShareService,LiveShareStatus,UniverLiveSharePlugin};
package/lib/umd/facade.js CHANGED
@@ -1 +1 @@
1
- function _0x2b9d(_0x5d3dd4,_0x1b682c){_0x5d3dd4=_0x5d3dd4-0x11a;const _0x461588=_0x4615();let _0x2b9d0b=_0x461588[_0x5d3dd4];return _0x2b9d0b;}function _0x4615(){const _0x431c7b=['FEnum','stopFollowing','symbol','IUniverInstanceService','_liveShareController','1764822fcYQIj','extend','2035239OCXBgt','LiveShareStatusEnum','object','getStatus','getLiveShareCoordinatorSync','defineProperty','2MphYcv','6062148BpPwVZ','get','getUnitId','function','UniverCoreFacade','startFollowing','58690LVtYUx','IDLE','toPrimitive','57421bfSRWr','914320avEVNG','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','tryStartPresenting','No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.','No\x20active\x20workbook\x20found.','559710fxkLgx','UNIVER_SHEET','constructor','stopPresenting','@univerjs/core','7vrlXsY','@univerjs/core/facade','default','string','getCurrentUnitOfType','_injector','228pcsVUY','UniverInstanceType','LiveShareStatus','_initialize'];_0x4615=function(){return _0x431c7b;};return _0x4615();}(function(_0x1bcf85,_0x1004a6){const _0x3d2f3d=_0x2b9d,_0x2090a1=_0x1bcf85();while(!![]){try{const _0xc6f0f2=parseInt(_0x3d2f3d(0x13e))/0x1+parseInt(_0x3d2f3d(0x134))/0x2*(parseInt(_0x3d2f3d(0x12e))/0x3)+parseInt(_0x3d2f3d(0x123))/0x4*(-parseInt(_0x3d2f3d(0x13b))/0x5)+-parseInt(_0x3d2f3d(0x12c))/0x6*(parseInt(_0x3d2f3d(0x11d))/0x7)+-parseInt(_0x3d2f3d(0x13f))/0x8+parseInt(_0x3d2f3d(0x135))/0x9+parseInt(_0x3d2f3d(0x144))/0xa;if(_0xc6f0f2===_0x1004a6)break;else _0x2090a1['push'](_0x2090a1['shift']());}catch(_0x354ad2){_0x2090a1['push'](_0x2090a1['shift']());}}}(_0x4615,0x5eb2c),function(_0x268ec6,_0x2efca3){const _0x886e6d=_0x2b9d;typeof exports=='object'&&typeof module<'u'?_0x2efca3(require(`@univerjs-pro/live-share`),require(`@univerjs/core`),require(`@univerjs/core/facade`)):typeof define==_0x886e6d(0x138)&&define['amd']?define(['@univerjs-pro/live-share',_0x886e6d(0x11c),_0x886e6d(0x11e)],_0x2efca3):(_0x268ec6=typeof globalThis<'u'?globalThis:_0x268ec6||self,_0x2efca3(_0x268ec6['UniverProLiveShare'],_0x268ec6['UniverCore'],_0x268ec6[_0x886e6d(0x139)]));}(this,function(_0x3ea532,_0x20bf07,_0x471559){const _0x4addf1=_0x2b9d;function _0xd5abc8(_0x5b6f79){'@babel/helpers - typeof';const _0x2fd719=_0x2b9d;return _0xd5abc8=typeof Symbol==_0x2fd719(0x138)&&typeof Symbol['iterator']==_0x2fd719(0x129)?function(_0x5ba69e){return typeof _0x5ba69e;}:function(_0x5ba34b){const _0x5ae719=_0x2fd719;return _0x5ba34b&&typeof Symbol=='function'&&_0x5ba34b[_0x5ae719(0x11a)]===Symbol&&_0x5ba34b!==Symbol['prototype']?'symbol':typeof _0x5ba34b;},_0xd5abc8(_0x5b6f79);}function _0x31b6f2(_0xdb617f,_0x266cbc){const _0x52930d=_0x2b9d;if(_0xd5abc8(_0xdb617f)!=_0x52930d(0x130)||!_0xdb617f)return _0xdb617f;var _0x49a13a=_0xdb617f[Symbol[_0x52930d(0x13d)]];if(_0x49a13a!==void 0x0){var _0x2d4e73=_0x49a13a['call'](_0xdb617f,_0x266cbc||_0x52930d(0x11f));if(_0xd5abc8(_0x2d4e73)!=_0x52930d(0x130))return _0x2d4e73;throw TypeError(_0x52930d(0x140));}return(_0x266cbc===_0x52930d(0x120)?String:Number)(_0xdb617f);}function _0x50e131(_0x33baae){const _0x4faceb=_0x2b9d;var _0x5b2ba1=_0x31b6f2(_0x33baae,_0x4faceb(0x120));return _0xd5abc8(_0x5b2ba1)=='symbol'?_0x5b2ba1:_0x5b2ba1+'';}function _0x3e2108(_0x534c3b,_0x5f0d2e,_0x39d522){const _0x1a8cb2=_0x2b9d;return(_0x5f0d2e=_0x50e131(_0x5f0d2e))in _0x534c3b?Object[_0x1a8cb2(0x133)](_0x534c3b,_0x5f0d2e,{'value':_0x39d522,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x534c3b[_0x5f0d2e]=_0x39d522,_0x534c3b;}var _0x4ad337=class extends _0x471559['FUniver']{constructor(..._0x1d097e){super(..._0x1d097e),_0x3e2108(this,'_liveShareController',void 0x0);}[_0x4addf1(0x126)](_0x43e2cc){const _0x103c68=_0x4addf1;this[_0x103c68(0x12b)]=_0x43e2cc[_0x103c68(0x136)](_0x3ea532['LiveShareController']);}['getLiveShareStatus'](){const _0x374de8=_0x4addf1;var _0xc1d3ce;let _0x3267d1=this[_0x374de8(0x122)][_0x374de8(0x136)](_0x20bf07['IUniverInstanceService'])[_0x374de8(0x121)](_0x20bf07[_0x374de8(0x124)][_0x374de8(0x145)]);if(!_0x3267d1)throw Error(_0x374de8(0x143));let _0x14363c=_0x3267d1[_0x374de8(0x137)](),_0x3885b8=this[_0x374de8(0x12b)][_0x374de8(0x132)](_0x14363c);return(_0xc1d3ce=_0x3885b8==null?void 0x0:_0x3885b8[_0x374de8(0x131)]())==null?_0x3ea532[_0x374de8(0x125)][_0x374de8(0x13c)]:_0xc1d3ce;}[_0x4addf1(0x13a)](){const _0xbdd190=_0x4addf1;let _0x1413d7=this[_0xbdd190(0x122)]['get'](_0x20bf07['IUniverInstanceService'])['getCurrentUnitOfType'](_0x20bf07[_0xbdd190(0x124)][_0xbdd190(0x145)]);if(!_0x1413d7)throw Error(_0xbdd190(0x143));let _0x3adee4=_0x1413d7['getUnitId'](),_0x454cf3=this[_0xbdd190(0x12b)][_0xbdd190(0x132)](_0x3adee4);if(!_0x454cf3)throw Error(_0xbdd190(0x142));_0x454cf3[_0xbdd190(0x13a)]();}[_0x4addf1(0x128)](){const _0x132982=_0x4addf1;let _0x476eb8=this[_0x132982(0x122)][_0x132982(0x136)](_0x20bf07[_0x132982(0x12a)])['getCurrentUnitOfType'](_0x20bf07[_0x132982(0x124)][_0x132982(0x145)]);if(!_0x476eb8)throw Error(_0x132982(0x143));let _0x51ba2e=_0x476eb8[_0x132982(0x137)](),_0x24f0cb=this[_0x132982(0x12b)]['getLiveShareCoordinatorSync'](_0x51ba2e);if(!_0x24f0cb)throw Error(_0x132982(0x142));_0x24f0cb[_0x132982(0x128)]();}['startPresenting'](){const _0x1be412=_0x4addf1;let _0x2d4c9e=this['_injector'][_0x1be412(0x136)](_0x20bf07[_0x1be412(0x12a)])[_0x1be412(0x121)](_0x20bf07[_0x1be412(0x124)][_0x1be412(0x145)]);if(!_0x2d4c9e)throw Error(_0x1be412(0x143));let _0x41e621=_0x2d4c9e[_0x1be412(0x137)](),_0x39891e=this[_0x1be412(0x12b)][_0x1be412(0x132)](_0x41e621);if(!_0x39891e)throw Error(_0x1be412(0x142));_0x39891e[_0x1be412(0x141)]();}[_0x4addf1(0x11b)](){const _0x4eb405=_0x4addf1;let _0x347cd2=this[_0x4eb405(0x122)]['get'](_0x20bf07[_0x4eb405(0x12a)])[_0x4eb405(0x121)](_0x20bf07['UniverInstanceType'][_0x4eb405(0x145)]);if(!_0x347cd2)throw Error(_0x4eb405(0x143));let _0x4dfb9f=_0x347cd2['getUnitId'](),_0x5419d9=this[_0x4eb405(0x12b)]['getLiveShareCoordinatorSync'](_0x4dfb9f);if(!_0x5419d9)throw Error(_0x4eb405(0x142));_0x5419d9[_0x4eb405(0x11b)]();}};_0x471559['FUniver'][_0x4addf1(0x12d)](_0x4ad337);var _0x58211d=class extends _0x471559['FEnum']{get[_0x4addf1(0x12f)](){const _0x611762=_0x4addf1;return _0x3ea532[_0x611762(0x125)];}};_0x471559[_0x4addf1(0x127)][_0x4addf1(0x12d)](_0x58211d);}));
1
+ function _0x368c(_0x3ef7fb,_0x1a198f){_0x3ef7fb=_0x3ef7fb-0xf4;const _0x4d3c5c=_0x4d3c();let _0x368c1f=_0x4d3c5c[_0x3ef7fb];return _0x368c1f;}function _0x4d3c(){const _0x5983ed=['IUniverInstanceService','getStatus','UniverCoreFacade','3585730QftnaH','LiveShareStatus','defineProperty','tryStartPresenting','_injector','getLiveShareCoordinatorSync','function','_liveShareController','object','extend','symbol','4753005mmDtBY','No\x20active\x20workbook\x20found.','12dkXUYJ','string','IDLE','get','getLiveShareStatus','FEnum','193XCEkTT','UniverCore','@univerjs-pro/live-share','8XJIIms','constructor','stopFollowing','UniverInstanceType','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','LiveShareController','No\x20LiveShareCoordinator\x20found\x20for\x20the\x20active\x20workbook.','iterator','@univerjs/core','UNIVER_SHEET','169116ZDyMgR','30303sBqOHa','startFollowing','7GqXDJJ','9464600bWccAa','@univerjs/core/facade','default','52295947uZjADc','_initialize','getUnitId','10WzUqcA','13802UMdKah','stopPresenting','getCurrentUnitOfType','startPresenting'];_0x4d3c=function(){return _0x5983ed;};return _0x4d3c();}(function(_0x278677,_0x6ffea){const _0x4d8dd4=_0x368c,_0x30e94f=_0x278677();while(!![]){try{const _0x564c0e=parseInt(_0x4d8dd4(0x10a))/0x1*(parseInt(_0x4d8dd4(0x122))/0x2)+parseInt(_0x4d8dd4(0x102))/0x3+parseInt(_0x4d8dd4(0x10d))/0x4*(parseInt(_0x4d8dd4(0xf7))/0x5)+parseInt(_0x4d8dd4(0x117))/0x6+parseInt(_0x4d8dd4(0x11a))/0x7*(parseInt(_0x4d8dd4(0x11b))/0x8)+parseInt(_0x4d8dd4(0x118))/0x9*(parseInt(_0x4d8dd4(0x121))/0xa)+-parseInt(_0x4d8dd4(0x11e))/0xb*(parseInt(_0x4d8dd4(0x104))/0xc);if(_0x564c0e===_0x6ffea)break;else _0x30e94f['push'](_0x30e94f['shift']());}catch(_0x462fe8){_0x30e94f['push'](_0x30e94f['shift']());}}}(_0x4d3c,0xc5fdb),function(_0x439255,_0x1ef3f5){const _0x346701=_0x368c;typeof exports==_0x346701(0xff)&&typeof module<'u'?_0x1ef3f5(require(`@univerjs-pro/live-share`),require(`@univerjs/core`),require(`@univerjs/core/facade`)):typeof define==_0x346701(0xfd)&&define['amd']?define([_0x346701(0x10c),_0x346701(0x115),_0x346701(0x11c)],_0x1ef3f5):(_0x439255=typeof globalThis<'u'?globalThis:_0x439255||self,_0x1ef3f5(_0x439255['UniverProLiveShare'],_0x439255[_0x346701(0x10b)],_0x439255[_0x346701(0xf6)]));}(this,function(_0x1b0532,_0x149210,_0x4f2ef0){const _0x10dcf9=_0x368c;function _0x3c6694(_0x2371bf){'@babel/helpers - typeof';const _0x143898=_0x368c;return _0x3c6694=typeof Symbol==_0x143898(0xfd)&&typeof Symbol[_0x143898(0x114)]=='symbol'?function(_0x284020){return typeof _0x284020;}:function(_0x34f0cb){const _0x385221=_0x143898;return _0x34f0cb&&typeof Symbol==_0x385221(0xfd)&&_0x34f0cb[_0x385221(0x10e)]===Symbol&&_0x34f0cb!==Symbol['prototype']?_0x385221(0x101):typeof _0x34f0cb;},_0x3c6694(_0x2371bf);}function _0x12394f(_0x4dca07,_0x3b8347){const _0x1be910=_0x368c;if(_0x3c6694(_0x4dca07)!=_0x1be910(0xff)||!_0x4dca07)return _0x4dca07;var _0x248e42=_0x4dca07[Symbol['toPrimitive']];if(_0x248e42!==void 0x0){var _0x16925d=_0x248e42['call'](_0x4dca07,_0x3b8347||_0x1be910(0x11d));if(_0x3c6694(_0x16925d)!=_0x1be910(0xff))return _0x16925d;throw TypeError(_0x1be910(0x111));}return(_0x3b8347===_0x1be910(0x105)?String:Number)(_0x4dca07);}function _0x52b3ee(_0x2a0a30){const _0xd4f1e1=_0x368c;var _0x1862e9=_0x12394f(_0x2a0a30,_0xd4f1e1(0x105));return _0x3c6694(_0x1862e9)==_0xd4f1e1(0x101)?_0x1862e9:_0x1862e9+'';}function _0x5f1870(_0x1e7a65,_0x3cda77,_0x2fbad0){const _0x12473e=_0x368c;return(_0x3cda77=_0x52b3ee(_0x3cda77))in _0x1e7a65?Object[_0x12473e(0xf9)](_0x1e7a65,_0x3cda77,{'value':_0x2fbad0,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1e7a65[_0x3cda77]=_0x2fbad0,_0x1e7a65;}var _0x49fbd6=class extends _0x4f2ef0['FUniver']{constructor(..._0x4aa26d){const _0x105502=_0x368c;super(..._0x4aa26d),_0x5f1870(this,_0x105502(0xfe),void 0x0);}[_0x10dcf9(0x11f)](_0xa5e3d0){const _0x35c764=_0x10dcf9;this['_liveShareController']=_0xa5e3d0[_0x35c764(0x107)](_0x1b0532[_0x35c764(0x112)]);}[_0x10dcf9(0x108)](){const _0x111827=_0x10dcf9;var _0x5edeab;let _0x1517e7=this[_0x111827(0xfb)][_0x111827(0x107)](_0x149210[_0x111827(0xf4)])['getCurrentUnitOfType'](_0x149210[_0x111827(0x110)][_0x111827(0x116)]);if(!_0x1517e7)throw Error(_0x111827(0x103));let _0x1252fe=_0x1517e7[_0x111827(0x120)](),_0x479c3b=this[_0x111827(0xfe)][_0x111827(0xfc)](_0x1252fe);return(_0x5edeab=_0x479c3b==null?void 0x0:_0x479c3b[_0x111827(0xf5)]())==null?_0x1b0532['LiveShareStatus'][_0x111827(0x106)]:_0x5edeab;}[_0x10dcf9(0x119)](){const _0x59a8c5=_0x10dcf9;let _0x55b49b=this[_0x59a8c5(0xfb)]['get'](_0x149210[_0x59a8c5(0xf4)])[_0x59a8c5(0x124)](_0x149210[_0x59a8c5(0x110)][_0x59a8c5(0x116)]);if(!_0x55b49b)throw Error(_0x59a8c5(0x103));let _0x5a979b=_0x55b49b[_0x59a8c5(0x120)](),_0x49e112=this[_0x59a8c5(0xfe)][_0x59a8c5(0xfc)](_0x5a979b);if(!_0x49e112)throw Error(_0x59a8c5(0x113));_0x49e112['startFollowing']();}[_0x10dcf9(0x10f)](){const _0x2be8e1=_0x10dcf9;let _0x112c44=this[_0x2be8e1(0xfb)][_0x2be8e1(0x107)](_0x149210[_0x2be8e1(0xf4)])[_0x2be8e1(0x124)](_0x149210[_0x2be8e1(0x110)]['UNIVER_SHEET']);if(!_0x112c44)throw Error(_0x2be8e1(0x103));let _0x330e8a=_0x112c44['getUnitId'](),_0x5f2622=this[_0x2be8e1(0xfe)][_0x2be8e1(0xfc)](_0x330e8a);if(!_0x5f2622)throw Error(_0x2be8e1(0x113));_0x5f2622[_0x2be8e1(0x10f)]();}[_0x10dcf9(0x125)](){const _0x2f6a5f=_0x10dcf9;let _0x4b9a17=this[_0x2f6a5f(0xfb)][_0x2f6a5f(0x107)](_0x149210[_0x2f6a5f(0xf4)])[_0x2f6a5f(0x124)](_0x149210[_0x2f6a5f(0x110)]['UNIVER_SHEET']);if(!_0x4b9a17)throw Error(_0x2f6a5f(0x103));let _0x35b2a1=_0x4b9a17[_0x2f6a5f(0x120)](),_0xdfd9d=this[_0x2f6a5f(0xfe)][_0x2f6a5f(0xfc)](_0x35b2a1);if(!_0xdfd9d)throw Error(_0x2f6a5f(0x113));_0xdfd9d[_0x2f6a5f(0xfa)]();}[_0x10dcf9(0x123)](){const _0x132702=_0x10dcf9;let _0x11a5c1=this[_0x132702(0xfb)][_0x132702(0x107)](_0x149210['IUniverInstanceService'])[_0x132702(0x124)](_0x149210[_0x132702(0x110)]['UNIVER_SHEET']);if(!_0x11a5c1)throw Error(_0x132702(0x103));let _0x220586=_0x11a5c1[_0x132702(0x120)](),_0x6f6d80=this[_0x132702(0xfe)][_0x132702(0xfc)](_0x220586);if(!_0x6f6d80)throw Error(_0x132702(0x113));_0x6f6d80[_0x132702(0x123)]();}};_0x4f2ef0['FUniver'][_0x10dcf9(0x100)](_0x49fbd6);var _0x3a5ef9=class extends _0x4f2ef0[_0x10dcf9(0x109)]{get['LiveShareStatusEnum'](){const _0x2a64af=_0x10dcf9;return _0x1b0532[_0x2a64af(0xf8)];}};_0x4f2ef0[_0x10dcf9(0x109)][_0x10dcf9(0x100)](_0x3a5ef9);}));
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x576d(_0x397d9e,_0x4995d7){_0x397d9e=_0x397d9e-0xbe;const _0x13afcb=_0x13af();let _0x576d93=_0x13afcb[_0x397d9e];return _0x576d93;}function _0x13af(){const _0x4d296e=['Module','_status$','_status','map','_handleNewChangeSets','dispose','_reporters','toStringTag','0.20.1','getInitialStates','getLiveShareCoordinator','Start','_commandService','parse','univer-border-none\x20univer-text-gray-600\x20univer-outline-none','useRef','useEffect','rxjs/operators','_commandDisposable','touchDependencies','asObservable','NOT_FOLLOWING','clsx','CollaborationSessionService','div','_startFollowing','Present\x20this\x20document','from','useDependency','30582DeGKnI','get','toString','then','defineProperty','substring','_presenter','attrs','evenodd','none','LIVESHARE_FETCH_OPERATIONS','reverse','jsxs','override','React','OFFLINE','NEW_CHANGESETS','rxjs','LIVESHARE_OPERATION','params','@univerjs/sheets-ui','IUIPartsService','_startLiveShareCoordinator','You\x27re\x20following\x20the\x20presenter','getLiveShareCoordinatorSync','165362mQALhU','1em','following','DisposableCollection','LiveShareIcon','idle','constructor','SetZoomRatioOperation','@univerjs-pro/collaboration','pluginName','complete','end','iterator','getOwnPropertyDescriptor','svg','6860oJqilN','UNIVER_LIVE_SHARE_PLUGIN','clear','You\x27are\x20offline.','You\x27re\x20presenting\x20the\x20document','@univerjs-pro/live-share','url(#$1','event$','LIVESHARE_NEW_HOST','43476ZnyycP','UNIVER_UNKNOWN','UniverProLiveShare','_fetchOperations','prototype','UniverProCollaborationClient','FOLLOWING','_handleOnline','status$','entries','_configService','unitId','SetWorksheetActiveOperation','UniverLiveSharePlugin','idSuffix','registerInitialStateReporter','BehaviorSubject','disposeWithMe','offline','ICommandService','_mountLiveShare','registerSharedOperation','add','mergeOverrideWithDependencies','SetScrollOperation','Inject','type','colorChannel1','text','univerjs-icon\x20univerjs-icon-','next','http://www.w3.org/2000/svg','symbol','use','_handleOffline','dispose$','requireSession','startFollowing','UniverSheetsUi','_handleOperation','has','throttleTime','button','_unitID','length','string','HEADER_MENU','BuiltInUIPart','defs','defIds','useState','getTypeOfUnitDisposed$','RxDisposable','find','fill','@univerjs/design','registerComponent','merge','replace','_sharedOperations','@univerjs/sheets','113897uIcNDe','_collabSessionService','registerDependencies','_uiPartsService','init','call','tag','565xRhbNg','getUnitId','LIVESHARE_TERMINATE','useObservable','LiveShare','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','data','stringify','LiveShareCoordinator','presenting','currentColor','live-share.config','tryStartPresenting','Injector','_beIdle','IUniverInstanceService','SessionStatus','LIVESHARE_REQUEST_HOST','UniverInstanceType','createInstance','stopPresenting','assign','InsertSheetMutation','LiveShareStatus','getMemberID','unsubscribe','displayName','mask','parseProtocolChangeset','operators','onCommandExecuted','CommandType','createElement','_liveShareService','children','_config','_handleNewHost','@univerjs-pro/collaboration-client','packageName','decorate','PRESENTING','IDLE','UniverSheets','CollaborationEvent','_stopPresenting','@univerjs/ui','forEach','pipe','UniverIcon','delete','jsx','path','toDisposable','send','getCurrentTypeOfUnit$','memberID','_univerInstanceService','xlink:href','function','includes','current','Button','_stopFollowing','1549135sbGvvX','getValue','trim','univer-size-4','univer-mb-3\x20univer-w-full\x20univer-text-sm','exports','_handleTerminate','Fragment','onStarting','You\x27re\x20not\x20following\x20the\x20presenter','react','Stop\x20following','values','0\x200\x2017\x2017','subscribe','_collabSession','888fcgMoe','sessionStatus$','stopFollowing','1452738uBTeLc','executeCommand','Stop\x20presenting','IConfigService','_injector','presenter','object','Start\x20following','takeUntil','set','_entities','_init'];_0x13af=function(){return _0x4d296e;};return _0x13af();}(function(_0xc03d80,_0x173d1c){const _0x28bb8e=_0x576d,_0x2ab579=_0xc03d80();while(!![]){try{const _0x21953e=parseInt(_0x28bb8e(0x13a))/0x1+-parseInt(_0x28bb8e(0xe5))/0x2+-parseInt(_0x28bb8e(0xfd))/0x3+-parseInt(_0x28bb8e(0xf4))/0x4*(-parseInt(_0x28bb8e(0x141))/0x5)+-parseInt(_0x28bb8e(0x193))/0x6+-parseInt(_0x28bb8e(0x180))/0x7+-parseInt(_0x28bb8e(0x190))/0x8*(-parseInt(_0x28bb8e(0xcc))/0x9);if(_0x21953e===_0x173d1c)break;else _0x2ab579['push'](_0x2ab579['shift']());}catch(_0x5a7fbb){_0x2ab579['push'](_0x2ab579['shift']());}}}(_0x13af,0x1e56d),function(_0x21acac,_0x3c98c0){const _0x3c6872=_0x576d;typeof exports==_0x3c6872(0x199)&&typeof module<'u'?_0x3c98c0(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==_0x3c6872(0x17b)&&define['amd']?define([_0x3c6872(0x185),'@univerjs/core',_0x3c6872(0x16e),_0x3c6872(0x134),_0x3c6872(0x18a),_0x3c6872(0xed),_0x3c6872(0x166),_0x3c6872(0x139),'rxjs',_0x3c6872(0xc0),'react/jsx-runtime',_0x3c6872(0xe0)],_0x3c98c0):(_0x21acac=typeof globalThis<'u'?globalThis:_0x21acac||self,_0x3c98c0(_0x21acac[_0x3c6872(0xff)]={},_0x21acac['UniverCore'],_0x21acac['UniverUi'],_0x21acac['UniverDesign'],_0x21acac[_0x3c6872(0xda)],_0x21acac['UniverProCollaboration'],_0x21acac[_0x3c6872(0x102)],_0x21acac[_0x3c6872(0x16b)],_0x21acac[_0x3c6872(0xdd)],_0x21acac[_0x3c6872(0xdd)][_0x3c6872(0x15e)],_0x21acac[_0x3c6872(0xda)],_0x21acac[_0x3c6872(0x123)]));}(this,function(_0x376925,_0x2c679f,_0xc1e0c9,_0x385cd9,_0x563a95,_0x186570,_0x278b6b,_0xff9b04,_0x4d837f,_0x317249,_0x235c00,_0x240968){const _0x10b09b=_0x576d;Object[_0x10b09b(0xd0)](_0x376925,Symbol[_0x10b09b(0x1a6)],{'value':_0x10b09b(0x19f)});function _0x1723f3({ref:_0x8e5106,..._0x445aa3}){const _0x369df6=_0x10b09b;let {icon:_0x17d061,id:_0x242d8e,className:_0x236740,extend:_0x1e53b9,..._0x52f821}=_0x445aa3,_0x135d2=(_0x369df6(0x11a)+_0x242d8e+'\x20'+(_0x236740||''))[_0x369df6(0x182)](),_0x4431ef=(0x0,_0x563a95[_0x369df6(0xbe)])('_'+_0x481168());return _0x1f6235(_0x17d061,''+_0x242d8e,{'defIds':_0x17d061[_0x369df6(0x12e)],'idSuffix':_0x4431ef[_0x369df6(0x17d)]},{'ref':_0x8e5106,'className':_0x135d2,..._0x52f821},_0x1e53b9);}function _0x1f6235(_0x1dc5b8,_0x2367eb,_0x116389,_0x23bcd2,_0x5d21f4){const _0x4166e1=_0x10b09b;return(0x0,_0x563a95['createElement'])(_0x1dc5b8[_0x4166e1(0x140)],{'key':_0x2367eb,..._0x431f66(_0x1dc5b8,_0x116389,_0x5d21f4),..._0x23bcd2},(_0x46de27(_0x1dc5b8,_0x116389)[_0x4166e1(0x163)]||[])[_0x4166e1(0x1a2)]((_0x2e740c,_0x3f8d56)=>_0x1f6235(_0x2e740c,_0x2367eb+'-'+_0x1dc5b8[_0x4166e1(0x140)]+'-'+_0x3f8d56,_0x116389,void 0x0,_0x5d21f4)));}function _0x431f66(_0x193a7d,_0x13ab7d,_0x515fa6){const _0x4b4f05=_0x10b09b;let _0x18fec0={..._0x193a7d['attrs']};_0x515fa6!=null&&_0x515fa6[_0x4b4f05(0x118)]&&_0x18fec0[_0x4b4f05(0x133)]===_0x4b4f05(0x118)&&(_0x18fec0[_0x4b4f05(0x133)]=_0x515fa6[_0x4b4f05(0x118)]),_0x193a7d[_0x4b4f05(0x140)]===_0x4b4f05(0x15c)&&_0x18fec0['id']&&(_0x18fec0['id']+=_0x13ab7d['idSuffix']),Object[_0x4b4f05(0x106)](_0x18fec0)[_0x4b4f05(0x16f)](([_0x11e18d,_0x1598bc])=>{const _0x151b13=_0x4b4f05;_0x11e18d===_0x151b13(0x15c)&&typeof _0x1598bc==_0x151b13(0x12a)&&(_0x18fec0[_0x11e18d]=_0x1598bc[_0x151b13(0x137)](/url\(#(.*)\)/,_0x151b13(0xfa)+_0x13ab7d[_0x151b13(0x10b)]+')'));});let {defIds:_0x591307}=_0x13ab7d;return!_0x591307||_0x591307['length']===0x0?_0x18fec0:(_0x193a7d['tag']===_0x4b4f05(0x11e)&&_0x18fec0[_0x4b4f05(0x17a)]&&(_0x18fec0[_0x4b4f05(0x17a)]+=_0x13ab7d[_0x4b4f05(0x10b)]),Object[_0x4b4f05(0x106)](_0x18fec0)[_0x4b4f05(0x16f)](([_0x225076,_0x4dc943])=>{const _0x3326a7=_0x4b4f05;typeof _0x4dc943==_0x3326a7(0x12a)&&(_0x18fec0[_0x225076]=_0x4dc943[_0x3326a7(0x137)](/url\(#(.*)\)/,'url(#$1'+_0x13ab7d[_0x3326a7(0x10b)]+')'));}),_0x18fec0);}function _0x46de27(_0x408169,_0x2d03e1){const _0x1cae99=_0x10b09b;var _0x441d8e;let {defIds:_0x5113da}=_0x2d03e1;return!_0x5113da||_0x5113da[_0x1cae99(0x129)]===0x0?_0x408169:_0x408169[_0x1cae99(0x140)]===_0x1cae99(0x12d)&&(_0x441d8e=_0x408169[_0x1cae99(0x163)])!=null&&_0x441d8e[_0x1cae99(0x129)]?{..._0x408169,'children':_0x408169['children']['map'](_0xf3938e=>typeof _0xf3938e[_0x1cae99(0xd3)]['id']==_0x1cae99(0x12a)&&_0x5113da&&_0x5113da['includes'](_0xf3938e[_0x1cae99(0xd3)]['id'])?{..._0xf3938e,'attrs':{..._0xf3938e['attrs'],'id':_0xf3938e['attrs']['id']+_0x2d03e1[_0x1cae99(0x10b)]}}:_0xf3938e)}:_0x408169;}function _0x481168(){const _0x95eeb6=_0x10b09b;return Math['random']()[_0x95eeb6(0xce)](0x24)[_0x95eeb6(0xd1)](0x2,0x8);}_0x1723f3['displayName']=_0x10b09b(0x171);let _0x500203={'tag':_0x10b09b(0xf3),'attrs':{'xmlns':_0x10b09b(0x11c),'fill':_0x10b09b(0xd5),'viewBox':_0x10b09b(0x18d),'width':_0x10b09b(0xe6),'height':_0x10b09b(0xe6)},'children':[{'tag':_0x10b09b(0x174),'attrs':{'fill':_0x10b09b(0x14b),'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':_0x10b09b(0x174),'attrs':{'fill':'currentColor','d':_0x10b09b(0x146),'fillRule':_0x10b09b(0xd4),'clipRule':_0x10b09b(0xd4)}}]},_0x263fa1=(0x0,_0x563a95['forwardRef'])(function(_0x1a899d,_0x3c600b){const _0x35151d=_0x10b09b;return(0x0,_0x563a95[_0x35151d(0x161)])(_0x1723f3,Object[_0x35151d(0x156)]({},_0x1a899d,{'id':'live-share-icon','ref':_0x3c600b,'icon':_0x500203}));});_0x263fa1[_0x10b09b(0x15b)]=_0x10b09b(0xe9);function _0x151e1c(_0x49b182){'@babel/helpers - typeof';const _0x21934f=_0x10b09b;return _0x151e1c=typeof Symbol=='function'&&typeof Symbol[_0x21934f(0xf1)]==_0x21934f(0x11d)?function(_0x24efbd){return typeof _0x24efbd;}:function(_0x58d34b){const _0x34430c=_0x21934f;return _0x58d34b&&typeof Symbol==_0x34430c(0x17b)&&_0x58d34b[_0x34430c(0xeb)]===Symbol&&_0x58d34b!==Symbol[_0x34430c(0x101)]?_0x34430c(0x11d):typeof _0x58d34b;},_0x151e1c(_0x49b182);}function _0x23c80d(_0x3e7dca,_0x3d64c3){const _0x52b8ec=_0x10b09b;if(_0x151e1c(_0x3e7dca)!=_0x52b8ec(0x199)||!_0x3e7dca)return _0x3e7dca;var _0x4f43b6=_0x3e7dca[Symbol['toPrimitive']];if(_0x4f43b6!==void 0x0){var _0x43a230=_0x4f43b6[_0x52b8ec(0x13f)](_0x3e7dca,_0x3d64c3||'default');if(_0x151e1c(_0x43a230)!='object')return _0x43a230;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x3d64c3===_0x52b8ec(0x12a)?String:Number)(_0x3e7dca);}function _0x30b203(_0xbecac){const _0x3fd683=_0x10b09b;var _0x46846f=_0x23c80d(_0xbecac,_0x3fd683(0x12a));return _0x151e1c(_0x46846f)==_0x3fd683(0x11d)?_0x46846f:_0x46846f+'';}function _0x505bbd(_0x48b9de,_0x4d3f0b,_0x3a14b8){const _0x51d4f5=_0x10b09b;return(_0x4d3f0b=_0x30b203(_0x4d3f0b))in _0x48b9de?Object[_0x51d4f5(0xd0)](_0x48b9de,_0x4d3f0b,{'value':_0x3a14b8,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x48b9de[_0x4d3f0b]=_0x3a14b8,_0x48b9de;}var _0x1c9d70=class extends _0x2c679f['Disposable']{constructor(..._0x431548){const _0x1d62b3=_0x10b09b;super(..._0x431548),_0x505bbd(this,'_sharedOperations',new Set()),_0x505bbd(this,_0x1d62b3(0x1a5),new Set());}[_0x10b09b(0x112)](_0x444abd){const _0xc80d2f=_0x10b09b;return this['_sharedOperations'][_0xc80d2f(0x113)](_0x444abd),(0x0,_0x2c679f[_0xc80d2f(0x175)])(()=>this[_0xc80d2f(0x138)]['delete'](_0x444abd));}[_0x10b09b(0x10c)](_0x4546c9){const _0x25ff0c=_0x10b09b;return this[_0x25ff0c(0x1a5)][_0x25ff0c(0x113)](_0x4546c9),(0x0,_0x2c679f['toDisposable'])(()=>this['_reporters'][_0x25ff0c(0x172)](_0x4546c9));}['shouldShareOperation'](_0x46528d){const _0xf830c7=_0x10b09b;return this['_sharedOperations'][_0xf830c7(0x125)](_0x46528d);}['getInitialStates'](_0x109faa){const _0x40bd2c=_0x10b09b;return Array[_0x40bd2c(0xca)](this[_0x40bd2c(0x1a5)])[_0x40bd2c(0x1a2)](_0xc152b7=>_0xc152b7(_0x109faa));}};function _0x282446(_0x49388a,_0x84d9f9){return function(_0x23ea23,_0x47b13d){_0x84d9f9(_0x23ea23,_0x47b13d,_0x49388a);};}function _0x169a0a(_0x194dbd,_0xed8f87,_0xbe0c4b,_0x1d138b){const _0x54edf6=_0x10b09b;var _0x5daa74=arguments[_0x54edf6(0x129)],_0xed58f0=_0x5daa74<0x3?_0xed8f87:_0x1d138b===null?_0x1d138b=Object[_0x54edf6(0xf2)](_0xed8f87,_0xbe0c4b):_0x1d138b,_0x2bc64f;if(typeof Reflect==_0x54edf6(0x199)&&typeof Reflect[_0x54edf6(0x168)]=='function')_0xed58f0=Reflect[_0x54edf6(0x168)](_0x194dbd,_0xed8f87,_0xbe0c4b,_0x1d138b);else{for(var _0x22a0d1=_0x194dbd[_0x54edf6(0x129)]-0x1;_0x22a0d1>=0x0;_0x22a0d1--)(_0x2bc64f=_0x194dbd[_0x22a0d1])&&(_0xed58f0=(_0x5daa74<0x3?_0x2bc64f(_0xed58f0):_0x5daa74>0x3?_0x2bc64f(_0xed8f87,_0xbe0c4b,_0xed58f0):_0x2bc64f(_0xed8f87,_0xbe0c4b))||_0xed58f0);}return _0x5daa74>0x3&&_0xed58f0&&Object[_0x54edf6(0xd0)](_0xed8f87,_0xbe0c4b,_0xed58f0),_0xed58f0;}let _0x528b4f=class extends _0x2c679f[_0x10b09b(0x131)]{constructor(_0xfa4e48,_0x42fd80,_0x34b5cc){const _0x37ba39=_0x10b09b;super(),this[_0x37ba39(0x179)]=_0xfa4e48,this[_0x37ba39(0x197)]=_0x42fd80,this['_collabSessionService']=_0x34b5cc,_0x505bbd(this,_0x37ba39(0x19d),new Map()),this[_0x37ba39(0x19e)]();}async[_0x10b09b(0x1a9)](_0x27f22f){const _0x17a261=_0x10b09b;return this['_entities'][_0x17a261(0x125)](_0x27f22f)||await this[_0x17a261(0xe2)](_0x27f22f),this['_entities'][_0x17a261(0xcd)](_0x27f22f);}[_0x10b09b(0xe4)](_0x2bcc8d){const _0x331764=_0x10b09b;var _0x4064ea;return(_0x4064ea=this[_0x331764(0x19d)][_0x331764(0xcd)](_0x2bcc8d))==null?null:_0x4064ea;}[_0x10b09b(0x19e)](){const _0xb8e567=_0x10b09b;this['_univerInstanceService']['getTypeOfUnitAdded$'](_0x2c679f[_0xb8e567(0x153)]['UNIVER_SHEET'])[_0xb8e567(0x170)]((0x0,_0x317249[_0xb8e567(0x19b)])(this['dispose$']))[_0xb8e567(0x18e)](async _0xbc301=>{const _0x367a36=_0xb8e567;let _0x5ee41d=_0xbc301[_0x367a36(0x142)]();this[_0x367a36(0x19d)][_0x367a36(0x125)](_0x5ee41d)||this['_startLiveShareCoordinator'](_0x5ee41d);}),this[_0xb8e567(0x179)][_0xb8e567(0x130)](_0x2c679f[_0xb8e567(0x153)]['UNIVER_SHEET'])[_0xb8e567(0x170)]((0x0,_0x317249[_0xb8e567(0x19b)])(this[_0xb8e567(0x120)]))[_0xb8e567(0x18e)](_0x195731=>{const _0x29d659=_0xb8e567;let _0x354cd9=_0x195731[_0x29d659(0x142)](),_0xff3f53=this[_0x29d659(0x19d)][_0x29d659(0xcd)](_0x354cd9);_0xff3f53==null||_0xff3f53['dispose']();});}async['_startLiveShareCoordinator'](_0x2c16d1){const _0x395b66=_0x10b09b;let _0x52fa4c=await this[_0x395b66(0x13b)][_0x395b66(0x121)](_0x2c16d1),_0xd2770=this[_0x395b66(0x197)][_0x395b66(0x154)](_0x213c44,_0x2c16d1,_0x52fa4c);return _0xd2770[_0x395b66(0x13e)](),this['_entities'][_0x395b66(0x19c)](_0x2c16d1,_0xd2770),_0xd2770;}};_0x528b4f=_0x169a0a([_0x282446(0x0,_0x2c679f['IUniverInstanceService']),_0x282446(0x1,(0x0,_0x2c679f['Inject'])(_0x2c679f[_0x10b09b(0x14e)])),_0x282446(0x2,(0x0,_0x2c679f[_0x10b09b(0x116)])(_0x278b6b[_0x10b09b(0xc6)]))],_0x528b4f);let _0x43d88c=function(_0x4e37de){const _0x4bbf56=_0x10b09b;return _0x4e37de[_0x4bbf56(0xdb)]=_0x4bbf56(0x10f),_0x4e37de[_0x4bbf56(0x16a)]=_0x4bbf56(0xea),_0x4e37de[_0x4bbf56(0x103)]=_0x4bbf56(0xe7),_0x4e37de['NOT_FOLLOWING']='not-following',_0x4e37de[_0x4bbf56(0x169)]=_0x4bbf56(0x14a),_0x4e37de;}({}),_0x213c44=class extends _0x2c679f[_0x10b09b(0x131)]{get[_0x10b09b(0x1a1)](){const _0x33b48b=_0x10b09b;return this[_0x33b48b(0x1a0)][_0x33b48b(0x181)]();}constructor(_0x3e43be,_0x3211d6,_0xc903d,_0x17a448,_0x57a64c){const _0x5e48cd=_0x10b09b;super(),this[_0x5e48cd(0x128)]=_0x3e43be,this[_0x5e48cd(0x18f)]=_0x3211d6,this[_0x5e48cd(0x107)]=_0xc903d,this['_liveShareService']=_0x17a448,this[_0x5e48cd(0x1ab)]=_0x57a64c,_0x505bbd(this,'_status$',new _0x4d837f[(_0x5e48cd(0x10d))](_0x43d88c[_0x5e48cd(0x16a)])),_0x505bbd(this,_0x5e48cd(0x105),this[_0x5e48cd(0x1a0)][_0x5e48cd(0xc3)]()),_0x505bbd(this,_0x5e48cd(0x19e),!0x1),_0x505bbd(this,_0x5e48cd(0xc1),null),_0x505bbd(this,'_presenter',null);}[_0x10b09b(0x1a4)](){const _0x5c99a5=_0x10b09b;var _0x58fb9a;(_0x58fb9a=this[_0x5c99a5(0xc1)])==null||_0x58fb9a[_0x5c99a5(0x1a4)](),this[_0x5c99a5(0x1a0)][_0x5c99a5(0x11b)](_0x43d88c[_0x5c99a5(0x16a)]),this[_0x5c99a5(0x1a0)][_0x5c99a5(0xef)]();}['getStatus'](){return this['_status'];}[_0x10b09b(0x13e)](){const _0x26c71b=_0x10b09b;this['_init']||(this[_0x26c71b(0x19e)]=!0x0,this[_0x26c71b(0x18f)][_0x26c71b(0x191)]['pipe']((0x0,_0x317249[_0x26c71b(0x19b)])(this[_0x26c71b(0x120)]))['subscribe'](_0x3ad1a2=>{const _0x101382=_0x26c71b;switch(_0x3ad1a2){case _0x278b6b['SessionStatus'][_0x101382(0xdb)]:this[_0x101382(0x11f)]();break;case _0x278b6b[_0x101382(0x151)]['ONLINE']:this['_handleOnline']();break;default:}}),this['_collabSession'][_0x26c71b(0xfb)][_0x26c71b(0x170)]((0x0,_0x317249['takeUntil'])(this[_0x26c71b(0x120)]))[_0x26c71b(0x18e)](_0x1b7558=>{const _0x50dbab=_0x26c71b;let {eventID:_0x234d4e}=_0x1b7558;switch(_0x234d4e){case _0x186570[_0x50dbab(0x16c)][_0x50dbab(0xfc)]:this['_handleNewHost'](_0x1b7558);break;case _0x186570[_0x50dbab(0x16c)][_0x50dbab(0xde)]:this[_0x50dbab(0x124)](_0x1b7558);break;case _0x186570[_0x50dbab(0x16c)][_0x50dbab(0x143)]:this[_0x50dbab(0x186)]();break;case _0x186570[_0x50dbab(0x16c)][_0x50dbab(0xdc)]:this[_0x50dbab(0x1a3)](_0x1b7558);break;default:}}));}[_0x10b09b(0x14d)](){const _0x166e70=_0x10b09b;this[_0x166e70(0x18f)][_0x166e70(0x176)]({'eventID':_0x186570[_0x166e70(0x16c)][_0x166e70(0x152)],'data':{'unitID':this['_unitID'],'userID':this[_0x166e70(0x18f)][_0x166e70(0x159)]()}},this[_0x166e70(0x128)]);}['stopPresenting'](){const _0x1748a7=_0x10b09b;this[_0x1748a7(0x1a1)]===_0x43d88c[_0x1748a7(0x169)]&&(this[_0x1748a7(0x1a0)][_0x1748a7(0x11b)](_0x43d88c[_0x1748a7(0x16a)]),this[_0x1748a7(0x18f)][_0x1748a7(0x176)]({'eventID':_0x186570[_0x1748a7(0x16c)]['LIVESHARE_TERMINATE'],'data':{'unitID':this['_unitID']}},this[_0x1748a7(0x128)]));}['startFollowing'](){const _0x296000=_0x10b09b;this['_status']===_0x43d88c['NOT_FOLLOWING']&&(this[_0x296000(0x1a0)][_0x296000(0x11b)](_0x43d88c['FOLLOWING']),this[_0x296000(0xc8)]());}[_0x10b09b(0x192)](){const _0x136eec=_0x10b09b;this[_0x136eec(0x1a1)]===_0x43d88c[_0x136eec(0x103)]&&this[_0x136eec(0x17f)]();}[_0x10b09b(0x165)](_0x1f173e){const _0x5b07f9=_0x10b09b;let {presenter:_0x4a2947}=_0x1f173e['data'],_0x17dea7=this[_0x5b07f9(0x18f)][_0x5b07f9(0x159)]();this[_0x5b07f9(0xd2)]=_0x4a2947,_0x4a2947===_0x17dea7?(this[_0x5b07f9(0x17f)](),this['_startPresenting']()):this['_status']!==_0x43d88c[_0x5b07f9(0xc4)]&&(this[_0x5b07f9(0x16d)](),this[_0x5b07f9(0xc8)]());}[_0x10b09b(0x100)](){const _0x5a30b7=_0x10b09b;let _0x4dac85={'eventID':_0x186570[_0x5a30b7(0x16c)][_0x5a30b7(0xd6)]};this[_0x5a30b7(0x18f)]['send'](_0x4dac85,this[_0x5a30b7(0x128)]);}['_handleTerminate'](){const _0x1febfc=_0x10b09b;this[_0x1febfc(0xd2)]=null,this[_0x1febfc(0x1a1)]!==_0x43d88c[_0x1febfc(0x169)]&&this[_0x1febfc(0x14f)]();}[_0x10b09b(0x1a3)](_0x21c2c8){const _0x369279=_0x10b09b;if(this[_0x369279(0x1a1)]===_0x43d88c[_0x369279(0x103)]&&this['_presenter']===_0x21c2c8[_0x369279(0x147)][_0x369279(0x178)]){let _0x4594b8=(0x0,_0x186570[_0x369279(0x15d)])(_0x21c2c8[_0x369279(0x147)])['mutations'][_0x369279(0xd7)]()[_0x369279(0x132)](_0x4ef270=>_0x4ef270['id']===_0xff9b04[_0x369279(0x157)]['id']);if(_0x4594b8){let _0x2ccd45=_0x4594b8['params'][_0x369279(0x108)],_0x1f0486=_0x4594b8[_0x369279(0xdf)]['sheet']['id'];setTimeout(()=>{const _0x5c8fee=_0x369279;this[_0x5c8fee(0x1ab)][_0x5c8fee(0x194)](_0xff9b04[_0x5c8fee(0x109)]['id'],{'unitId':_0x2ccd45,'subUnitId':_0x1f0486},{'fromCollab':!0x0});});}}}['_startPresenting'](){const _0x216485=_0x10b09b;this[_0x216485(0x1a0)][_0x216485(0x11b)](_0x43d88c[_0x216485(0x169)]);let _0x3cefbc=new Map(),_0x98602=this[_0x216485(0xc1)]=new _0x2c679f[(_0x216485(0xe8))]();_0x98602[_0x216485(0x113)]((0x0,_0x2c679f[_0x216485(0x175)])(()=>{const _0x3813da=_0x216485;_0x3cefbc[_0x3813da(0x16f)](_0x144311=>_0x144311[_0x3813da(0xef)]()),_0x3cefbc[_0x3813da(0xf6)]();})),_0x98602[_0x216485(0x113)](this[_0x216485(0x1ab)][_0x216485(0x15f)](_0x33c0dc=>{const _0x1d75df=_0x216485;if(_0x33c0dc['type']!==_0x2c679f[_0x1d75df(0x160)]['OPERATION']||!this[_0x1d75df(0x162)]['shouldShareOperation'](_0x33c0dc['id']))return;let {id:_0x42419c}=_0x33c0dc,_0x280ce3;if(_0x3cefbc['has'](_0x42419c))_0x280ce3=_0x3cefbc[_0x1d75df(0xcd)](_0x42419c);else{var _0x5d59a0;_0x280ce3=new _0x4d837f['Subject'](),_0x3cefbc[_0x1d75df(0x19c)](_0x42419c,_0x280ce3),_0x280ce3['pipe']((0x0,_0x317249[_0x1d75df(0x126)])((_0x5d59a0=this[_0x1d75df(0x107)]['getConfig']('SAME_OPERATION_SHARE_INTERVAL'))==null?0xc8:_0x5d59a0,void 0x0,{'trailing':!0x0,'leading':!0x0}))[_0x1d75df(0x18e)](_0x2dfbf7=>{const _0x3c7af8=_0x1d75df;this[_0x3c7af8(0x18f)][_0x3c7af8(0x176)]({'eventID':_0x186570[_0x3c7af8(0x16c)][_0x3c7af8(0xde)],'data':{'unitID':this[_0x3c7af8(0x128)],'operations':{[_0x2dfbf7['id']]:{'id':_0x2dfbf7['id'],'params':JSON[_0x3c7af8(0x148)](_0x2dfbf7[_0x3c7af8(0xdf)])}}}},this[_0x3c7af8(0x128)]);});}_0x280ce3[_0x1d75df(0x11b)](_0x33c0dc);})),this['_liveShareService'][_0x216485(0x1a8)](this[_0x216485(0x128)])[_0x216485(0x16f)](_0x3bc10a=>this[_0x216485(0x18f)][_0x216485(0x176)]({'eventID':_0x186570[_0x216485(0x16c)][_0x216485(0xde)],'data':{'unitID':this['_unitID'],'operations':{[_0x3bc10a['id']]:{'id':_0x3bc10a['id'],'params':JSON['stringify'](_0x3bc10a[_0x216485(0xdf)])}}}},this[_0x216485(0x128)]));}['_stopPresenting'](){const _0x4067cb=_0x10b09b;var _0x253c7a;this[_0x4067cb(0x1a0)]['next'](_0x43d88c[_0x4067cb(0x16a)]),(_0x253c7a=this[_0x4067cb(0xc1)])==null||_0x253c7a[_0x4067cb(0x1a4)](),this[_0x4067cb(0xc1)]=null;}[_0x10b09b(0xc8)](){const _0x129d6b=_0x10b09b;var _0x5739a2;(_0x5739a2=this['_commandDisposable'])==null||_0x5739a2[_0x129d6b(0x1a4)](),this[_0x129d6b(0x1a0)][_0x129d6b(0x11b)](_0x43d88c[_0x129d6b(0x103)]);}[_0x10b09b(0x14f)](){const _0x4d66ad=_0x10b09b;var _0x14ce3d;this[_0x4d66ad(0x1a0)]['next'](_0x43d88c['IDLE']),(_0x14ce3d=this['_commandDisposable'])==null||_0x14ce3d[_0x4d66ad(0x1a4)](),this[_0x4d66ad(0xc1)]=null;}[_0x10b09b(0x17f)](){const _0x244e25=_0x10b09b;var _0x198804;this[_0x244e25(0x1a0)][_0x244e25(0x11b)](_0x43d88c['NOT_FOLLOWING']),(_0x198804=this[_0x244e25(0xc1)])==null||_0x198804[_0x244e25(0x1a4)]();}[_0x10b09b(0x124)](_0x41bae1){const _0x5e70e5=_0x10b09b;if([_0x43d88c[_0x5e70e5(0x169)],_0x43d88c[_0x5e70e5(0xc4)],_0x43d88c[_0x5e70e5(0xdb)]][_0x5e70e5(0x17c)](this['_status'])||!_0x41bae1[_0x5e70e5(0x147)]['presenter']||_0x41bae1[_0x5e70e5(0x147)][_0x5e70e5(0x198)]===this[_0x5e70e5(0x18f)]['getMemberID']())return;this[_0x5e70e5(0x1a1)]===_0x43d88c[_0x5e70e5(0x16a)]&&this[_0x5e70e5(0xc8)]();let _0x42cee9=_0x41bae1[_0x5e70e5(0x147)]['operations'];Object[_0x5e70e5(0x18c)](_0x42cee9)['forEach'](_0x42cb3a=>{const _0xaf79cb=_0x5e70e5;this[_0xaf79cb(0x1ab)][_0xaf79cb(0x194)](_0x42cb3a['id'],_0x42cb3a[_0xaf79cb(0xdf)]?JSON[_0xaf79cb(0x1ac)](_0x42cb3a[_0xaf79cb(0xdf)]):null,{'fromCollab':!0x0});});}[_0x10b09b(0x11f)](){const _0x49cc0d=_0x10b09b;var _0x15b5b9;this[_0x49cc0d(0x1a0)][_0x49cc0d(0x11b)](_0x43d88c[_0x49cc0d(0xdb)]),(_0x15b5b9=this['_commandDisposable'])==null||_0x15b5b9[_0x49cc0d(0x1a4)]();}[_0x10b09b(0x104)](){const _0x150fef=_0x10b09b;this[_0x150fef(0x1a0)]['next'](_0x43d88c[_0x150fef(0x16a)]),this['_fetchOperations']();}};_0x213c44=_0x169a0a([_0x282446(0x2,_0x2c679f[_0x10b09b(0x196)]),_0x282446(0x3,(0x0,_0x2c679f[_0x10b09b(0x116)])(_0x1c9d70)),_0x282446(0x4,_0x2c679f[_0x10b09b(0x110)])],_0x213c44);function _0x35761a(){const _0x45addf=_0x10b09b;let _0x3e795d=(0x0,_0xc1e0c9[_0x45addf(0xcb)])(_0x528b4f),_0x381b67=(0x0,_0xc1e0c9['useDependency'])(_0x2c679f[_0x45addf(0x150)]),_0x13f463=(0x0,_0xc1e0c9[_0x45addf(0x144)])(()=>_0x381b67[_0x45addf(0x177)](_0x2c679f[_0x45addf(0x153)]['UNIVER_SHEET']),void 0x0,!0x1,[]),[_0x53d2ac,_0x3b1bea]=(0x0,_0x563a95[_0x45addf(0x12f)])(null),[_0x323ee5,_0x5df399]=(0x0,_0x563a95[_0x45addf(0x12f)])(_0x43d88c[_0x45addf(0x16a)]),_0x3a4918=(0x0,_0x563a95[_0x45addf(0xbe)])(null);return(0x0,_0x563a95[_0x45addf(0xbf)])(()=>(_0x13f463&&_0x3e795d[_0x45addf(0x1a9)](_0x13f463['getUnitId']())[_0x45addf(0xcf)](_0x2994d3=>{const _0x21f3a0=_0x45addf;_0x3b1bea(_0x2994d3),_0x3a4918[_0x21f3a0(0x17d)]=_0x2994d3[_0x21f3a0(0x105)][_0x21f3a0(0x18e)](_0x4ac9ae=>{_0x5df399(_0x4ac9ae);});}),()=>{const _0x18f621=_0x45addf;var _0x163209;(_0x163209=_0x3a4918[_0x18f621(0x17d)])==null||_0x163209[_0x18f621(0x15a)](),_0x3a4918[_0x18f621(0x17d)]=null;}),[_0x13f463,_0x3e795d]),_0x53d2ac?(0x0,_0x235c00[_0x45addf(0x173)])(_0x385cd9['Dropdown'],{'align':_0x45addf(0xf0),'disabled':_0x323ee5===_0x43d88c[_0x45addf(0xdb)],'className':'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','overlay':(0x0,_0x235c00['jsx'])(_0xb25e7a,{'status':_0x323ee5,'coordinator':_0x53d2ac}),'children':(0x0,_0x235c00[_0x45addf(0x173)])(_0x45addf(0x127),{'className':(0x0,_0x385cd9[_0x45addf(0xc5)])(_0x45addf(0x1ad),{'univer-cursor-not-allowed':_0x323ee5===_0x43d88c[_0x45addf(0xdb)],'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x323ee5!==_0x43d88c[_0x45addf(0xdb)]}),'type':_0x45addf(0x127),'children':(0x0,_0x235c00[_0x45addf(0x173)])(_0x263fa1,{'className':_0x45addf(0x183)})})}):null;}function _0xb25e7a(_0x22af6f){const _0x8d2896=_0x10b09b;let {status:_0x2ab022,coordinator:_0x2ed39e}=_0x22af6f;switch(_0x2ab022){case _0x43d88c[_0x8d2896(0x16a)]:return(0x0,_0x235c00[_0x8d2896(0x173)])(_0x9f3bf8,{'coordinator':_0x2ed39e});case _0x43d88c[_0x8d2896(0x103)]:return(0x0,_0x235c00['jsx'])(_0x14c4cb,{'coordinator':_0x2ed39e});case _0x43d88c['NOT_FOLLOWING']:return(0x0,_0x235c00[_0x8d2896(0x173)])(_0x31640c,{'coordinator':_0x2ed39e});case _0x43d88c[_0x8d2896(0xdb)]:return(0x0,_0x235c00[_0x8d2896(0x173)])(_0x4250a6,{});case _0x43d88c[_0x8d2896(0x169)]:return(0x0,_0x235c00[_0x8d2896(0x173)])(_0x110d39,{'coordinator':_0x2ed39e});default:return null;}}function _0x9f3bf8(_0x8be1bb){const _0x170cb0=_0x10b09b;let {coordinator:_0x18b9eb}=_0x8be1bb;return(0x0,_0x235c00[_0x170cb0(0xd8)])(_0x235c00[_0x170cb0(0x187)],{'children':[(0x0,_0x235c00[_0x170cb0(0x173)])(_0x170cb0(0xc7),{'className':_0x170cb0(0x184),'children':_0x170cb0(0xc9)}),(0x0,_0x235c00[_0x170cb0(0x173)])(_0x385cd9[_0x170cb0(0x17e)],{'onClick':()=>_0x18b9eb[_0x170cb0(0x14d)](),'children':_0x170cb0(0x1aa)})]});}function _0x14c4cb(_0x5b50d1){const _0x12e7ef=_0x10b09b;let {coordinator:_0x4f65b0}=_0x5b50d1;return(0x0,_0x235c00[_0x12e7ef(0xd8)])(_0x235c00[_0x12e7ef(0x187)],{'children':[(0x0,_0x235c00[_0x12e7ef(0x173)])('div',{'className':_0x12e7ef(0x184),'children':_0x12e7ef(0xe3)}),(0x0,_0x235c00[_0x12e7ef(0x173)])(_0x385cd9['Button'],{'onClick':()=>_0x4f65b0[_0x12e7ef(0x192)](),'children':_0x12e7ef(0x18b)})]});}function _0x31640c(_0x545132){const _0x4ec434=_0x10b09b;let {coordinator:_0x713be9}=_0x545132;return(0x0,_0x235c00[_0x4ec434(0xd8)])(_0x235c00['Fragment'],{'children':[(0x0,_0x235c00[_0x4ec434(0x173)])(_0x4ec434(0xc7),{'className':_0x4ec434(0x184),'children':_0x4ec434(0x189)}),(0x0,_0x235c00[_0x4ec434(0x173)])(_0x385cd9[_0x4ec434(0x17e)],{'variant':_0x4ec434(0x119),'onClick':()=>_0x713be9[_0x4ec434(0x122)](),'children':_0x4ec434(0x19a)})]});}function _0x110d39(_0x457fda){const _0x4dba76=_0x10b09b;let {coordinator:_0x4b6381}=_0x457fda;return(0x0,_0x235c00[_0x4dba76(0xd8)])(_0x235c00[_0x4dba76(0x187)],{'children':[(0x0,_0x235c00['jsx'])(_0x4dba76(0xc7),{'className':_0x4dba76(0x184),'children':_0x4dba76(0xf8)}),(0x0,_0x235c00['jsx'])(_0x385cd9[_0x4dba76(0x17e)],{'variant':'default','onClick':()=>_0x4b6381[_0x4dba76(0x155)](),'children':_0x4dba76(0x195)})]});}function _0x4250a6(){const _0x3b6cfe=_0x10b09b;return(0x0,_0x235c00[_0x3b6cfe(0x173)])(_0x235c00['Fragment'],{'children':_0x3b6cfe(0xf7)});}let _0x2e614c=class extends _0x2c679f['Disposable']{constructor(_0xa8e0a9,_0x46719b){const _0x5c56cd=_0x10b09b;super(),this[_0x5c56cd(0x197)]=_0xa8e0a9,this[_0x5c56cd(0x13d)]=_0x46719b,this[_0x5c56cd(0x111)]();}[_0x10b09b(0x111)](){const _0x2a2c7f=_0x10b09b;this[_0x2a2c7f(0x10e)](this['_uiPartsService'][_0x2a2c7f(0x135)](_0xc1e0c9[_0x2a2c7f(0x12c)][_0x2a2c7f(0x12b)],()=>(0x0,_0xc1e0c9['connectInjector'])(_0x35761a,this[_0x2a2c7f(0x197)])));}};_0x2e614c=_0x169a0a([_0x282446(0x0,(0x0,_0x2c679f[_0x10b09b(0x116)])(_0x2c679f[_0x10b09b(0x14e)])),_0x282446(0x1,_0xc1e0c9[_0x10b09b(0xe1)])],_0x2e614c);var _0x22412b=_0x10b09b(0xf9),_0x46a8dc=_0x10b09b(0x1a7);let _0x38f4a0=_0x10b09b(0x14c);Symbol(_0x38f4a0);let _0x26b903={},_0x2b81dc=class extends _0x2c679f['Disposable']{constructor(_0x426d92){const _0x14b2ac=_0x10b09b;super(),this[_0x14b2ac(0x162)]=_0x426d92,this['_init']();}[_0x10b09b(0x19e)](){const _0x136915=_0x10b09b;[_0x240968[_0x136915(0xec)]['id'],_0x240968[_0x136915(0x115)]['id'],_0xff9b04[_0x136915(0x109)]['id']][_0x136915(0x16f)](_0x23d581=>{const _0x58001e=_0x136915;this[_0x58001e(0x10e)](this[_0x58001e(0x162)][_0x58001e(0x112)](_0x23d581));});}};_0x2b81dc=_0x169a0a([_0x282446(0x0,(0x0,_0x2c679f['Inject'])(_0x1c9d70))],_0x2b81dc);let _0x1f3dce=class extends _0x2c679f['Plugin']{constructor(_0x103c5a=_0x26b903,_0x1b1bad,_0x2c71a1){const _0x2bfbad=_0x10b09b;super(),this[_0x2bfbad(0x164)]=_0x103c5a,this[_0x2bfbad(0x197)]=_0x1b1bad,this[_0x2bfbad(0x107)]=_0x2c71a1;let {..._0x4bab46}=(0x0,_0x2c679f[_0x2bfbad(0x136)])({},_0x26b903,this[_0x2bfbad(0x164)]);this[_0x2bfbad(0x107)]['setConfig'](_0x38f4a0,_0x4bab46);}[_0x10b09b(0x188)](){const _0x2d95b2=_0x10b09b;(0x0,_0x2c679f[_0x2d95b2(0x13c)])(this[_0x2d95b2(0x197)],(0x0,_0x2c679f[_0x2d95b2(0x114)])([[_0x1c9d70],[_0x528b4f],[_0x2b81dc],[_0x2e614c]],this[_0x2d95b2(0x164)][_0x2d95b2(0xd9)])),(0x0,_0x2c679f[_0x2d95b2(0xc2)])(this['_injector'],[[_0x2b81dc]]);}['onRendered'](){const _0x4c6bdf=_0x10b09b;(0x0,_0x2c679f[_0x4c6bdf(0xc2)])(this[_0x4c6bdf(0x197)],[[_0x2e614c]]);}};_0x505bbd(_0x1f3dce,_0x10b09b(0x117),_0x2c679f['UniverInstanceType'][_0x10b09b(0xfe)]),_0x505bbd(_0x1f3dce,_0x10b09b(0xee),_0x10b09b(0xf5)),_0x505bbd(_0x1f3dce,_0x10b09b(0x167),_0x22412b),_0x505bbd(_0x1f3dce,'version',_0x46a8dc),_0x1f3dce=_0x169a0a([(0x0,_0x2c679f['DependentOn'])(_0x278b6b['UniverCollaborationClientPlugin']),_0x282446(0x1,(0x0,_0x2c679f['Inject'])(_0x2c679f['Injector'])),_0x282446(0x2,_0x2c679f['IConfigService'])],_0x1f3dce),Object[_0x10b09b(0xd0)](_0x376925,'DesktopLiveShareController',{'enumerable':!0x0,'get':function(){return _0x2e614c;}}),_0x376925[_0x10b09b(0x145)]=_0x35761a,Object[_0x10b09b(0xd0)](_0x376925,'LiveShareController',{'enumerable':!0x0,'get':function(){return _0x528b4f;}}),Object[_0x10b09b(0xd0)](_0x376925,_0x10b09b(0x149),{'enumerable':!0x0,'get':function(){return _0x213c44;}}),_0x376925['LiveShareService']=_0x1c9d70,_0x376925[_0x10b09b(0x158)]=_0x43d88c,Object['defineProperty'](_0x376925,_0x10b09b(0x10a),{'enumerable':!0x0,'get':function(){return _0x1f3dce;}});}));
1
+ (function(_0x44839e,_0x3b0461){const _0x33395b=_0x5c72,_0x5a937f=_0x44839e();while(!![]){try{const _0x1fc3db=parseInt(_0x33395b(0x222))/0x1+parseInt(_0x33395b(0x213))/0x2*(-parseInt(_0x33395b(0x1cb))/0x3)+parseInt(_0x33395b(0x227))/0x4+parseInt(_0x33395b(0x269))/0x5*(-parseInt(_0x33395b(0x255))/0x6)+-parseInt(_0x33395b(0x1d3))/0x7+-parseInt(_0x33395b(0x1aa))/0x8+parseInt(_0x33395b(0x1f4))/0x9*(parseInt(_0x33395b(0x22f))/0xa);if(_0x1fc3db===_0x3b0461)break;else _0x5a937f['push'](_0x5a937f['shift']());}catch(_0x1f30c8){_0x5a937f['push'](_0x5a937f['shift']());}}}(_0x10dd,0x71fdf),function(_0x10b673,_0x4ce193){const _0x5dfead=_0x5c72;typeof exports==_0x5dfead(0x195)&&typeof module<'u'?_0x4ce193(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==_0x5dfead(0x1b3)&&define['amd']?define([_0x5dfead(0x1a1),_0x5dfead(0x1be),_0x5dfead(0x1ff),_0x5dfead(0x1f0),'react',_0x5dfead(0x1ab),_0x5dfead(0x1d1),_0x5dfead(0x1dc),_0x5dfead(0x1de),_0x5dfead(0x242),_0x5dfead(0x18d),_0x5dfead(0x1d2)],_0x4ce193):(_0x10b673=typeof globalThis<'u'?globalThis:_0x10b673||self,_0x4ce193(_0x10b673['UniverProLiveShare']={},_0x10b673[_0x5dfead(0x199)],_0x10b673[_0x5dfead(0x201)],_0x10b673[_0x5dfead(0x1a4)],_0x10b673[_0x5dfead(0x1eb)],_0x10b673[_0x5dfead(0x1cc)],_0x10b673['UniverProCollaborationClient'],_0x10b673['UniverSheets'],_0x10b673[_0x5dfead(0x1de)],_0x10b673[_0x5dfead(0x1de)]['operators'],_0x10b673['React'],_0x10b673['UniverSheetsUi']));}(this,function(_0x4763e5,_0x3f73d9,_0x24eb36,_0x4c2339,_0x42adbf,_0x2c4276,_0x5495db,_0xc58304,_0x465c0a,_0x1e22dc,_0x5a8d06,_0x2d22f7){const _0xf308c7=_0x5c72;Object[_0xf308c7(0x196)](_0x4763e5,Symbol[_0xf308c7(0x210)],{'value':_0xf308c7(0x19f)});function _0x91ede8({ref:_0x4ec3b6,..._0x4ba1c4}){const _0x458990=_0xf308c7;let {icon:_0x9b9831,id:_0x1dd4ef,className:_0x3248ff,extend:_0x23c213,..._0x27d904}=_0x4ba1c4,_0x39f249=(_0x458990(0x1c0)+_0x1dd4ef+'\x20'+(_0x3248ff||''))[_0x458990(0x216)](),_0x2084bd=(0x0,_0x42adbf[_0x458990(0x1e2)])('_'+_0x1801c());return _0x450c8e(_0x9b9831,''+_0x1dd4ef,{'defIds':_0x9b9831[_0x458990(0x18c)],'idSuffix':_0x2084bd[_0x458990(0x268)]},{'ref':_0x4ec3b6,'className':_0x39f249,..._0x27d904},_0x23c213);}function _0x450c8e(_0x14c3e8,_0x3ab4f6,_0x4b2dd5,_0x5bf8fe,_0x2751a5){const _0x5507f1=_0xf308c7;return(0x0,_0x42adbf['createElement'])(_0x14c3e8[_0x5507f1(0x267)],{'key':_0x3ab4f6,..._0x11d50f(_0x14c3e8,_0x4b2dd5,_0x2751a5),..._0x5bf8fe},(_0x17912d(_0x14c3e8,_0x4b2dd5)[_0x5507f1(0x202)]||[])[_0x5507f1(0x23c)]((_0x54ae0f,_0x19a9ad)=>_0x450c8e(_0x54ae0f,_0x3ab4f6+'-'+_0x14c3e8[_0x5507f1(0x267)]+'-'+_0x19a9ad,_0x4b2dd5,void 0x0,_0x2751a5)));}function _0x11d50f(_0x1bd6f8,_0x2d3b31,_0x202cf8){const _0x17d67d=_0xf308c7;let _0x1c4c0c={..._0x1bd6f8[_0x17d67d(0x24e)]};_0x202cf8!=null&&_0x202cf8[_0x17d67d(0x187)]&&_0x1c4c0c[_0x17d67d(0x194)]==='colorChannel1'&&(_0x1c4c0c[_0x17d67d(0x194)]=_0x202cf8['colorChannel1']),_0x1bd6f8[_0x17d67d(0x267)]===_0x17d67d(0x240)&&_0x1c4c0c['id']&&(_0x1c4c0c['id']+=_0x2d3b31['idSuffix']),Object['entries'](_0x1c4c0c)[_0x17d67d(0x205)](([_0x39b0d4,_0x4cf135])=>{const _0x1746d2=_0x17d67d;_0x39b0d4===_0x1746d2(0x240)&&typeof _0x4cf135==_0x1746d2(0x1f9)&&(_0x1c4c0c[_0x39b0d4]=_0x4cf135[_0x1746d2(0x241)](/url\(#(.*)\)/,_0x1746d2(0x1fd)+_0x2d3b31[_0x1746d2(0x215)]+')'));});let {defIds:_0x5e80f6}=_0x2d3b31;return!_0x5e80f6||_0x5e80f6[_0x17d67d(0x26f)]===0x0?_0x1c4c0c:(_0x1bd6f8[_0x17d67d(0x267)]===_0x17d67d(0x1a7)&&_0x1c4c0c[_0x17d67d(0x271)]&&(_0x1c4c0c['xlink:href']+=_0x2d3b31['idSuffix']),Object[_0x17d67d(0x262)](_0x1c4c0c)[_0x17d67d(0x205)](([_0x5b33ee,_0x2a6daf])=>{const _0x330320=_0x17d67d;typeof _0x2a6daf==_0x330320(0x1f9)&&(_0x1c4c0c[_0x5b33ee]=_0x2a6daf[_0x330320(0x241)](/url\(#(.*)\)/,'url(#$1'+_0x2d3b31['idSuffix']+')'));}),_0x1c4c0c);}function _0x17912d(_0x5026be,_0x381aaa){const _0x5691da=_0xf308c7;var _0x4340e9;let {defIds:_0x1da385}=_0x381aaa;return!_0x1da385||_0x1da385['length']===0x0?_0x5026be:_0x5026be[_0x5691da(0x267)]===_0x5691da(0x206)&&(_0x4340e9=_0x5026be['children'])!=null&&_0x4340e9['length']?{..._0x5026be,'children':_0x5026be[_0x5691da(0x202)][_0x5691da(0x23c)](_0x81f5be=>typeof _0x81f5be[_0x5691da(0x24e)]['id']==_0x5691da(0x1f9)&&_0x1da385&&_0x1da385[_0x5691da(0x1d5)](_0x81f5be[_0x5691da(0x24e)]['id'])?{..._0x81f5be,'attrs':{..._0x81f5be[_0x5691da(0x24e)],'id':_0x81f5be['attrs']['id']+_0x381aaa[_0x5691da(0x215)]}}:_0x81f5be)}:_0x5026be;}function _0x1801c(){const _0x5da769=_0xf308c7;return Math['random']()[_0x5da769(0x1d8)](0x24)[_0x5da769(0x1c6)](0x2,0x8);}_0x91ede8[_0xf308c7(0x246)]=_0xf308c7(0x25c);let _0xbe6af2={'tag':'svg','attrs':{'xmlns':_0xf308c7(0x1e4),'fill':_0xf308c7(0x23f),'viewBox':_0xf308c7(0x1e3),'width':'1em','height':_0xf308c7(0x189)},'children':[{'tag':_0xf308c7(0x1c7),'attrs':{'fill':'currentColor','d':_0xf308c7(0x26e)}},{'tag':_0xf308c7(0x1c7),'attrs':{'fill':_0xf308c7(0x24f),'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':_0xf308c7(0x263),'clipRule':_0xf308c7(0x263)}}]},_0x43b156=(0x0,_0x42adbf[_0xf308c7(0x190)])(function(_0x1bcd8d,_0x49166e){const _0xb3c94f=_0xf308c7;return(0x0,_0x42adbf[_0xb3c94f(0x1f8)])(_0x91ede8,Object[_0xb3c94f(0x1db)]({},_0x1bcd8d,{'id':'live-share-icon','ref':_0x49166e,'icon':_0xbe6af2}));});_0x43b156[_0xf308c7(0x246)]='LiveShareIcon';function _0x4c4062(_0x33a7fc){'@babel/helpers - typeof';const _0x18981a=_0xf308c7;return _0x4c4062=typeof Symbol==_0x18981a(0x1b3)&&typeof Symbol[_0x18981a(0x25d)]==_0x18981a(0x1a8)?function(_0x50b9e0){return typeof _0x50b9e0;}:function(_0x203819){const _0x20f8c8=_0x18981a;return _0x203819&&typeof Symbol==_0x20f8c8(0x1b3)&&_0x203819[_0x20f8c8(0x237)]===Symbol&&_0x203819!==Symbol[_0x20f8c8(0x1a0)]?_0x20f8c8(0x1a8):typeof _0x203819;},_0x4c4062(_0x33a7fc);}function _0xc6341d(_0x307b55,_0x1b6342){const _0x30f1ff=_0xf308c7;if(_0x4c4062(_0x307b55)!='object'||!_0x307b55)return _0x307b55;var _0x472786=_0x307b55[Symbol[_0x30f1ff(0x19b)]];if(_0x472786!==void 0x0){var _0x8effa7=_0x472786[_0x30f1ff(0x19e)](_0x307b55,_0x1b6342||_0x30f1ff(0x20c));if(_0x4c4062(_0x8effa7)!=_0x30f1ff(0x195))return _0x8effa7;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x1b6342==='string'?String:Number)(_0x307b55);}function _0x4bac28(_0x4086c4){const _0x5c1ed5=_0xf308c7;var _0x3d8054=_0xc6341d(_0x4086c4,_0x5c1ed5(0x1f9));return _0x4c4062(_0x3d8054)==_0x5c1ed5(0x1a8)?_0x3d8054:_0x3d8054+'';}function _0x33b425(_0x35efe2,_0x3ca49f,_0x51f0c8){const _0x4438f1=_0xf308c7;return(_0x3ca49f=_0x4bac28(_0x3ca49f))in _0x35efe2?Object[_0x4438f1(0x196)](_0x35efe2,_0x3ca49f,{'value':_0x51f0c8,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x35efe2[_0x3ca49f]=_0x51f0c8,_0x35efe2;}var _0x53f0a6=class extends _0x3f73d9[_0xf308c7(0x1f3)]{constructor(..._0x554e1d){const _0x498186=_0xf308c7;super(..._0x554e1d),_0x33b425(this,_0x498186(0x253),new Set()),_0x33b425(this,_0x498186(0x1a2),new Set());}[_0xf308c7(0x24d)](_0x564c17){const _0xa96b8b=_0xf308c7;return this['_sharedOperations'][_0xa96b8b(0x26a)](_0x564c17),(0x0,_0x3f73d9[_0xa96b8b(0x18f)])(()=>this[_0xa96b8b(0x253)][_0xa96b8b(0x1b9)](_0x564c17));}[_0xf308c7(0x1b5)](_0x5ce922){const _0x1d1303=_0xf308c7;return this[_0x1d1303(0x1a2)][_0x1d1303(0x26a)](_0x5ce922),(0x0,_0x3f73d9[_0x1d1303(0x18f)])(()=>this['_reporters'][_0x1d1303(0x1b9)](_0x5ce922));}['shouldShareOperation'](_0x20c3b2){const _0x11e6b7=_0xf308c7;return this[_0x11e6b7(0x253)]['has'](_0x20c3b2);}[_0xf308c7(0x1f1)](_0x18b455){const _0x571304=_0xf308c7;return Array[_0x571304(0x1ce)](this[_0x571304(0x1a2)])[_0x571304(0x23c)](_0x1cde17=>_0x1cde17(_0x18b455));}};function _0x1edf58(_0x2db207,_0x45d236){return function(_0x55b88a,_0x1f01c8){_0x45d236(_0x55b88a,_0x1f01c8,_0x2db207);};}function _0x55124c(_0x3b776c,_0xa743c5,_0x1ee886,_0xe49d5a){const _0x1d3d8f=_0xf308c7;var _0x589fcd=arguments['length'],_0x15e664=_0x589fcd<0x3?_0xa743c5:_0xe49d5a===null?_0xe49d5a=Object['getOwnPropertyDescriptor'](_0xa743c5,_0x1ee886):_0xe49d5a,_0x9c58a4;if(typeof Reflect=='object'&&typeof Reflect[_0x1d3d8f(0x1c8)]==_0x1d3d8f(0x1b3))_0x15e664=Reflect[_0x1d3d8f(0x1c8)](_0x3b776c,_0xa743c5,_0x1ee886,_0xe49d5a);else{for(var _0x5a34bc=_0x3b776c[_0x1d3d8f(0x26f)]-0x1;_0x5a34bc>=0x0;_0x5a34bc--)(_0x9c58a4=_0x3b776c[_0x5a34bc])&&(_0x15e664=(_0x589fcd<0x3?_0x9c58a4(_0x15e664):_0x589fcd>0x3?_0x9c58a4(_0xa743c5,_0x1ee886,_0x15e664):_0x9c58a4(_0xa743c5,_0x1ee886))||_0x15e664);}return _0x589fcd>0x3&&_0x15e664&&Object[_0x1d3d8f(0x196)](_0xa743c5,_0x1ee886,_0x15e664),_0x15e664;}let _0x2d2224=class extends _0x3f73d9['RxDisposable']{constructor(_0x598191,_0x385edd,_0x157627){const _0x5adb9f=_0xf308c7;super(),this['_univerInstanceService']=_0x598191,this[_0x5adb9f(0x23d)]=_0x385edd,this[_0x5adb9f(0x1cf)]=_0x157627,_0x33b425(this,_0x5adb9f(0x209),new Map()),this[_0x5adb9f(0x1bd)]();}async['getLiveShareCoordinator'](_0xa78719){const _0x51b23f=_0xf308c7;return this[_0x51b23f(0x209)][_0x51b23f(0x1b1)](_0xa78719)||await this[_0x51b23f(0x221)](_0xa78719),this[_0x51b23f(0x209)][_0x51b23f(0x234)](_0xa78719);}[_0xf308c7(0x272)](_0x34ee45){const _0x3ea934=_0xf308c7;var _0x21ae43;return(_0x21ae43=this['_entities'][_0x3ea934(0x234)](_0x34ee45))==null?null:_0x21ae43;}[_0xf308c7(0x1bd)](){const _0x478893=_0xf308c7;this[_0x478893(0x1dd)][_0x478893(0x1ec)](_0x3f73d9[_0x478893(0x19c)][_0x478893(0x1ad)])[_0x478893(0x261)]((0x0,_0x1e22dc[_0x478893(0x250)])(this[_0x478893(0x231)]))[_0x478893(0x1ae)](async _0x28c971=>{const _0x49d662=_0x478893;let _0x463b0c=_0x28c971[_0x49d662(0x1f7)]();this[_0x49d662(0x209)]['has'](_0x463b0c)||this[_0x49d662(0x221)](_0x463b0c);}),this[_0x478893(0x1dd)][_0x478893(0x26d)](_0x3f73d9[_0x478893(0x19c)][_0x478893(0x1ad)])[_0x478893(0x261)]((0x0,_0x1e22dc['takeUntil'])(this[_0x478893(0x231)]))[_0x478893(0x1ae)](_0x14ea90=>{const _0x568f0e=_0x478893;let _0x347c05=_0x14ea90[_0x568f0e(0x1f7)](),_0x4ec304=this['_entities'][_0x568f0e(0x234)](_0x347c05);_0x4ec304==null||_0x4ec304[_0x568f0e(0x265)]();});}async[_0xf308c7(0x221)](_0x29591e){const _0x5277cc=_0xf308c7;let _0x1b8b44=await this[_0x5277cc(0x1cf)][_0x5277cc(0x236)](_0x29591e),_0x2ff9c0=this[_0x5277cc(0x23d)][_0x5277cc(0x232)](_0xcf9b7e,_0x29591e,_0x1b8b44);return _0x2ff9c0[_0x5277cc(0x204)](),this[_0x5277cc(0x209)][_0x5277cc(0x25b)](_0x29591e,_0x2ff9c0),_0x2ff9c0;}};_0x2d2224=_0x55124c([_0x1edf58(0x0,_0x3f73d9['IUniverInstanceService']),_0x1edf58(0x1,(0x0,_0x3f73d9['Inject'])(_0x3f73d9[_0xf308c7(0x1af)])),_0x1edf58(0x2,(0x0,_0x3f73d9[_0xf308c7(0x197)])(_0x5495db[_0xf308c7(0x23a)]))],_0x2d2224);let _0x1a2ff8=function(_0x209225){const _0xbf63a1=_0xf308c7;return _0x209225[_0xbf63a1(0x26c)]=_0xbf63a1(0x1a9),_0x209225[_0xbf63a1(0x212)]=_0xbf63a1(0x1c5),_0x209225['FOLLOWING']='following',_0x209225[_0xbf63a1(0x243)]=_0xbf63a1(0x1a6),_0x209225[_0xbf63a1(0x1c2)]=_0xbf63a1(0x218),_0x209225;}({}),_0xcf9b7e=class extends _0x3f73d9[_0xf308c7(0x22a)]{get[_0xf308c7(0x1e5)](){const _0x4da577=_0xf308c7;return this['_status$'][_0x4da577(0x23b)]();}constructor(_0x381761,_0x1a4686,_0x2eab13,_0x5d6d53,_0x3cfdb5){const _0x31cb6a=_0xf308c7;super(),this['_unitID']=_0x381761,this[_0x31cb6a(0x251)]=_0x1a4686,this[_0x31cb6a(0x192)]=_0x2eab13,this[_0x31cb6a(0x1d0)]=_0x5d6d53,this[_0x31cb6a(0x1ea)]=_0x3cfdb5,_0x33b425(this,_0x31cb6a(0x24a),new _0x465c0a['BehaviorSubject'](_0x1a2ff8[_0x31cb6a(0x212)])),_0x33b425(this,_0x31cb6a(0x1ba),this[_0x31cb6a(0x24a)][_0x31cb6a(0x22c)]()),_0x33b425(this,_0x31cb6a(0x1bd),!0x1),_0x33b425(this,'_commandDisposable',null),_0x33b425(this,_0x31cb6a(0x1b7),null);}[_0xf308c7(0x265)](){const _0x18932c=_0xf308c7;var _0x5905f1;(_0x5905f1=this['_commandDisposable'])==null||_0x5905f1[_0x18932c(0x265)](),this[_0x18932c(0x24a)][_0x18932c(0x193)](_0x1a2ff8[_0x18932c(0x212)]),this[_0x18932c(0x24a)]['complete']();}[_0xf308c7(0x214)](){const _0x281a05=_0xf308c7;return this[_0x281a05(0x1e5)];}[_0xf308c7(0x204)](){const _0x48ce5b=_0xf308c7;this[_0x48ce5b(0x1bd)]||(this[_0x48ce5b(0x1bd)]=!0x0,this[_0x48ce5b(0x251)]['sessionStatus$'][_0x48ce5b(0x261)]((0x0,_0x1e22dc['takeUntil'])(this[_0x48ce5b(0x231)]))[_0x48ce5b(0x1ae)](_0x4b1c00=>{const _0x4c6fa6=_0x48ce5b;switch(_0x4b1c00){case _0x5495db[_0x4c6fa6(0x1b4)][_0x4c6fa6(0x26c)]:this[_0x4c6fa6(0x217)]();break;case _0x5495db[_0x4c6fa6(0x1b4)]['ONLINE']:this[_0x4c6fa6(0x249)]();break;default:}}),this[_0x48ce5b(0x251)][_0x48ce5b(0x20f)][_0x48ce5b(0x261)]((0x0,_0x1e22dc[_0x48ce5b(0x250)])(this[_0x48ce5b(0x231)]))[_0x48ce5b(0x1ae)](_0x41dbc6=>{const _0x432b94=_0x48ce5b;let {eventID:_0x5b929e}=_0x41dbc6;switch(_0x5b929e){case _0x2c4276[_0x432b94(0x1c3)][_0x432b94(0x260)]:this[_0x432b94(0x23e)](_0x41dbc6);break;case _0x2c4276[_0x432b94(0x1c3)][_0x432b94(0x19d)]:this[_0x432b94(0x248)](_0x41dbc6);break;case _0x2c4276[_0x432b94(0x1c3)][_0x432b94(0x1f5)]:this[_0x432b94(0x264)]();break;case _0x2c4276['CollaborationEvent']['NEW_CHANGESETS']:this[_0x432b94(0x25e)](_0x41dbc6);break;default:}}));}[_0xf308c7(0x270)](){const _0x2c4aca=_0xf308c7;this[_0x2c4aca(0x251)][_0x2c4aca(0x20a)]({'eventID':_0x2c4276[_0x2c4aca(0x1c3)][_0x2c4aca(0x1c1)],'data':{'unitID':this['_unitID'],'userID':this['_collabSession'][_0x2c4aca(0x18b)]()}},this[_0x2c4aca(0x252)]);}['stopPresenting'](){const _0x296899=_0xf308c7;this['_status']===_0x1a2ff8['PRESENTING']&&(this['_status$'][_0x296899(0x193)](_0x1a2ff8['IDLE']),this[_0x296899(0x251)][_0x296899(0x20a)]({'eventID':_0x2c4276[_0x296899(0x1c3)][_0x296899(0x1f5)],'data':{'unitID':this[_0x296899(0x252)]}},this[_0x296899(0x252)]));}['startFollowing'](){const _0x5f1732=_0xf308c7;this[_0x5f1732(0x1e5)]===_0x1a2ff8['NOT_FOLLOWING']&&(this[_0x5f1732(0x24a)]['next'](_0x1a2ff8[_0x5f1732(0x266)]),this[_0x5f1732(0x1d6)]());}[_0xf308c7(0x1d9)](){const _0x4aeb73=_0xf308c7;this[_0x4aeb73(0x1e5)]===_0x1a2ff8[_0x4aeb73(0x266)]&&this[_0x4aeb73(0x254)]();}[_0xf308c7(0x23e)](_0x17c46d){const _0x297f75=_0xf308c7;let {presenter:_0x56e500}=_0x17c46d[_0x297f75(0x1da)],_0x738856=this['_collabSession'][_0x297f75(0x18b)]();this[_0x297f75(0x1b7)]=_0x56e500,_0x56e500===_0x738856?(this[_0x297f75(0x254)](),this[_0x297f75(0x1d4)]()):this['_status']!==_0x1a2ff8['NOT_FOLLOWING']&&(this['_stopPresenting'](),this['_startFollowing']());}[_0xf308c7(0x22b)](){const _0x28724=_0xf308c7;let _0x18bd77={'eventID':_0x2c4276[_0x28724(0x1c3)]['LIVESHARE_FETCH_OPERATIONS']};this[_0x28724(0x251)][_0x28724(0x20a)](_0x18bd77,this[_0x28724(0x252)]);}[_0xf308c7(0x264)](){const _0x45315a=_0xf308c7;this[_0x45315a(0x1b7)]=null,this[_0x45315a(0x1e5)]!==_0x1a2ff8[_0x45315a(0x1c2)]&&this['_beIdle']();}[_0xf308c7(0x25e)](_0x315da4){const _0x520141=_0xf308c7;if(this[_0x520141(0x1e5)]===_0x1a2ff8[_0x520141(0x266)]&&this[_0x520141(0x1b7)]===_0x315da4[_0x520141(0x1da)][_0x520141(0x1c9)]){let _0x485ba4=(0x0,_0x2c4276[_0x520141(0x1fb)])(_0x315da4[_0x520141(0x1da)])[_0x520141(0x1b0)]['reverse']()['find'](_0x188eec=>_0x188eec['id']===_0xc58304['InsertSheetMutation']['id']);if(_0x485ba4){let _0x53d44d=_0x485ba4[_0x520141(0x1b8)]['unitId'],_0x67b880=_0x485ba4[_0x520141(0x1b8)][_0x520141(0x1bb)]['id'];setTimeout(()=>{const _0x43ef4f=_0x520141;this[_0x43ef4f(0x1ea)][_0x43ef4f(0x21e)](_0xc58304['SetWorksheetActiveOperation']['id'],{'unitId':_0x53d44d,'subUnitId':_0x67b880},{'fromCollab':!0x0});});}}}[_0xf308c7(0x1d4)](){const _0x58060c=_0xf308c7;this['_status$'][_0x58060c(0x193)](_0x1a2ff8[_0x58060c(0x1c2)]);let _0x3d737f=new Map(),_0x2b2b48=this[_0x58060c(0x24b)]=new _0x3f73d9[(_0x58060c(0x20e))]();_0x2b2b48[_0x58060c(0x26a)]((0x0,_0x3f73d9['toDisposable'])(()=>{_0x3d737f['forEach'](_0xe81476=>_0xe81476['complete']()),_0x3d737f['clear']();})),_0x2b2b48[_0x58060c(0x26a)](this[_0x58060c(0x1ea)][_0x58060c(0x257)](_0x31344d=>{const _0x4ef74e=_0x58060c;if(_0x31344d[_0x4ef74e(0x1e0)]!==_0x3f73d9['CommandType'][_0x4ef74e(0x219)]||!this[_0x4ef74e(0x1d0)][_0x4ef74e(0x230)](_0x31344d['id']))return;let {id:_0x25b173}=_0x31344d,_0x390138;if(_0x3d737f[_0x4ef74e(0x1b1)](_0x25b173))_0x390138=_0x3d737f['get'](_0x25b173);else{var _0x5956af;_0x390138=new _0x465c0a[(_0x4ef74e(0x1e9))](),_0x3d737f[_0x4ef74e(0x25b)](_0x25b173,_0x390138),_0x390138[_0x4ef74e(0x261)]((0x0,_0x1e22dc[_0x4ef74e(0x25a)])((_0x5956af=this['_configService'][_0x4ef74e(0x22e)](_0x4ef74e(0x22d)))==null?0xc8:_0x5956af,void 0x0,{'trailing':!0x0,'leading':!0x0}))[_0x4ef74e(0x1ae)](_0x309cd1=>{const _0xd6fa3c=_0x4ef74e;this[_0xd6fa3c(0x251)]['send']({'eventID':_0x2c4276[_0xd6fa3c(0x1c3)][_0xd6fa3c(0x19d)],'data':{'unitID':this[_0xd6fa3c(0x252)],'operations':{[_0x309cd1['id']]:{'id':_0x309cd1['id'],'params':JSON[_0xd6fa3c(0x200)](_0x309cd1[_0xd6fa3c(0x1b8)])}}}},this[_0xd6fa3c(0x252)]);});}_0x390138[_0x4ef74e(0x193)](_0x31344d);})),this[_0x58060c(0x1d0)][_0x58060c(0x1f1)](this['_unitID'])[_0x58060c(0x205)](_0x4517d4=>this[_0x58060c(0x251)][_0x58060c(0x20a)]({'eventID':_0x2c4276[_0x58060c(0x1c3)][_0x58060c(0x19d)],'data':{'unitID':this[_0x58060c(0x252)],'operations':{[_0x4517d4['id']]:{'id':_0x4517d4['id'],'params':JSON[_0x58060c(0x200)](_0x4517d4['params'])}}}},this['_unitID']));}[_0xf308c7(0x1fe)](){const _0x455217=_0xf308c7;var _0x2339f4;this[_0x455217(0x24a)][_0x455217(0x193)](_0x1a2ff8[_0x455217(0x212)]),(_0x2339f4=this['_commandDisposable'])==null||_0x2339f4[_0x455217(0x265)](),this[_0x455217(0x24b)]=null;}[_0xf308c7(0x1d6)](){const _0x5293d2=_0xf308c7;var _0x28fef9;(_0x28fef9=this[_0x5293d2(0x24b)])==null||_0x28fef9[_0x5293d2(0x265)](),this['_status$'][_0x5293d2(0x193)](_0x1a2ff8[_0x5293d2(0x266)]);}[_0xf308c7(0x208)](){const _0x5cdd05=_0xf308c7;var _0x4623ac;this['_status$']['next'](_0x1a2ff8[_0x5cdd05(0x212)]),(_0x4623ac=this['_commandDisposable'])==null||_0x4623ac[_0x5cdd05(0x265)](),this[_0x5cdd05(0x24b)]=null;}['_stopFollowing'](){const _0x5486e2=_0xf308c7;var _0x354fc2;this[_0x5486e2(0x24a)]['next'](_0x1a2ff8[_0x5486e2(0x243)]),(_0x354fc2=this[_0x5486e2(0x24b)])==null||_0x354fc2[_0x5486e2(0x265)]();}['_handleOperation'](_0x118abd){const _0x4250a1=_0xf308c7;if([_0x1a2ff8[_0x4250a1(0x1c2)],_0x1a2ff8[_0x4250a1(0x243)],_0x1a2ff8[_0x4250a1(0x26c)]][_0x4250a1(0x1d5)](this['_status'])||!_0x118abd[_0x4250a1(0x1da)][_0x4250a1(0x273)]||_0x118abd['data']['presenter']===this[_0x4250a1(0x251)]['getMemberID']())return;this[_0x4250a1(0x1e5)]===_0x1a2ff8['IDLE']&&this[_0x4250a1(0x1d6)]();let _0x291f61=_0x118abd[_0x4250a1(0x1da)][_0x4250a1(0x238)];Object['values'](_0x291f61)['forEach'](_0x50e0d4=>{const _0x44d359=_0x4250a1;this[_0x44d359(0x1ea)][_0x44d359(0x21e)](_0x50e0d4['id'],_0x50e0d4[_0x44d359(0x1b8)]?JSON[_0x44d359(0x1ca)](_0x50e0d4[_0x44d359(0x1b8)]):null,{'fromCollab':!0x0});});}[_0xf308c7(0x217)](){const _0x10065e=_0xf308c7;var _0x28cce8;this[_0x10065e(0x24a)]['next'](_0x1a2ff8[_0x10065e(0x26c)]),(_0x28cce8=this[_0x10065e(0x24b)])==null||_0x28cce8[_0x10065e(0x265)]();}[_0xf308c7(0x249)](){const _0xb9c06b=_0xf308c7;this[_0xb9c06b(0x24a)][_0xb9c06b(0x193)](_0x1a2ff8['IDLE']),this[_0xb9c06b(0x22b)]();}};_0xcf9b7e=_0x55124c([_0x1edf58(0x2,_0x3f73d9[_0xf308c7(0x1f2)]),_0x1edf58(0x3,(0x0,_0x3f73d9[_0xf308c7(0x197)])(_0x53f0a6)),_0x1edf58(0x4,_0x3f73d9[_0xf308c7(0x228)])],_0xcf9b7e);function _0xf6783b(){const _0x57862b=_0xf308c7;let _0x10909b=(0x0,_0x24eb36['useDependency'])(_0x2d2224),_0x34e166=(0x0,_0x24eb36[_0x57862b(0x21f)])(_0x3f73d9[_0x57862b(0x224)]),_0x53e173=(0x0,_0x24eb36[_0x57862b(0x244)])(()=>_0x34e166['getCurrentTypeOfUnit$'](_0x3f73d9['UniverInstanceType'][_0x57862b(0x1ad)]),void 0x0,!0x1,[]),[_0x42a264,_0x4c9044]=(0x0,_0x42adbf['useState'])(null),[_0x14c258,_0x3ea2b9]=(0x0,_0x42adbf['useState'])(_0x1a2ff8[_0x57862b(0x212)]),_0x2c88c3=(0x0,_0x42adbf[_0x57862b(0x1e2)])(null);return(0x0,_0x42adbf[_0x57862b(0x18a)])(()=>(_0x53e173&&_0x10909b[_0x57862b(0x20b)](_0x53e173[_0x57862b(0x1f7)]())[_0x57862b(0x1f6)](_0x12a716=>{const _0x2b00fd=_0x57862b;_0x4c9044(_0x12a716),_0x2c88c3[_0x2b00fd(0x268)]=_0x12a716[_0x2b00fd(0x1ba)][_0x2b00fd(0x1ae)](_0x1fb39e=>{_0x3ea2b9(_0x1fb39e);});}),()=>{const _0x5c8f8c=_0x57862b;var _0x4c782c;(_0x4c782c=_0x2c88c3[_0x5c8f8c(0x268)])==null||_0x4c782c[_0x5c8f8c(0x1e6)](),_0x2c88c3[_0x5c8f8c(0x268)]=null;}),[_0x53e173,_0x10909b]),_0x42a264?(0x0,_0x5a8d06[_0x57862b(0x1c4)])(_0x4c2339[_0x57862b(0x1bf)],{'align':_0x57862b(0x198),'disabled':_0x14c258===_0x1a2ff8['OFFLINE'],'className':_0x57862b(0x1e1),'overlay':(0x0,_0x5a8d06['jsx'])(_0x4efc4a,{'status':_0x14c258,'coordinator':_0x42a264}),'children':(0x0,_0x5a8d06[_0x57862b(0x1c4)])(_0x57862b(0x26b),{'className':(0x0,_0x4c2339[_0x57862b(0x1cd)])('univer-border-none\x20univer-text-gray-600\x20univer-outline-none',{'univer-cursor-not-allowed':_0x14c258===_0x1a2ff8[_0x57862b(0x26c)],'univer-cursor-pointer\x20hover:univer-bg-gray-400':_0x14c258!==_0x1a2ff8[_0x57862b(0x26c)]}),'type':_0x57862b(0x26b),'children':(0x0,_0x5a8d06[_0x57862b(0x1c4)])(_0x43b156,{'className':_0x57862b(0x247)})})}):null;}function _0x4efc4a(_0x3f6d8d){const _0x2d658f=_0xf308c7;let {status:_0x347e1d,coordinator:_0x539ff6}=_0x3f6d8d;switch(_0x347e1d){case _0x1a2ff8[_0x2d658f(0x212)]:return(0x0,_0x5a8d06['jsx'])(_0x4061e7,{'coordinator':_0x539ff6});case _0x1a2ff8[_0x2d658f(0x266)]:return(0x0,_0x5a8d06['jsx'])(_0x5557f1,{'coordinator':_0x539ff6});case _0x1a2ff8[_0x2d658f(0x243)]:return(0x0,_0x5a8d06['jsx'])(_0x45b55c,{'coordinator':_0x539ff6});case _0x1a2ff8[_0x2d658f(0x26c)]:return(0x0,_0x5a8d06[_0x2d658f(0x1c4)])(_0x1a468b,{});case _0x1a2ff8['PRESENTING']:return(0x0,_0x5a8d06[_0x2d658f(0x1c4)])(_0x5c588c,{'coordinator':_0x539ff6});default:return null;}}function _0x4061e7(_0x5930d5){const _0x2c9bd7=_0xf308c7;let {coordinator:_0x100717}=_0x5930d5;return(0x0,_0x5a8d06['jsxs'])(_0x5a8d06['Fragment'],{'children':[(0x0,_0x5a8d06[_0x2c9bd7(0x1c4)])(_0x2c9bd7(0x1ee),{'className':_0x2c9bd7(0x229),'children':_0x2c9bd7(0x223)}),(0x0,_0x5a8d06[_0x2c9bd7(0x1c4)])(_0x4c2339[_0x2c9bd7(0x21a)],{'onClick':()=>_0x100717[_0x2c9bd7(0x270)](),'children':_0x2c9bd7(0x21d)})]});}function _0x5557f1(_0x5dff24){const _0x3fa00c=_0xf308c7;let {coordinator:_0x57f988}=_0x5dff24;return(0x0,_0x5a8d06[_0x3fa00c(0x21b)])(_0x5a8d06['Fragment'],{'children':[(0x0,_0x5a8d06['jsx'])('div',{'className':_0x3fa00c(0x229),'children':'You\x27re\x20following\x20the\x20presenter'}),(0x0,_0x5a8d06['jsx'])(_0x4c2339[_0x3fa00c(0x21a)],{'onClick':()=>_0x57f988[_0x3fa00c(0x1d9)](),'children':_0x3fa00c(0x256)})]});}function _0x45b55c(_0x384cbe){const _0x577a9e=_0xf308c7;let {coordinator:_0x127634}=_0x384cbe;return(0x0,_0x5a8d06[_0x577a9e(0x21b)])(_0x5a8d06[_0x577a9e(0x225)],{'children':[(0x0,_0x5a8d06[_0x577a9e(0x1c4)])(_0x577a9e(0x1ee),{'className':_0x577a9e(0x229),'children':_0x577a9e(0x207)}),(0x0,_0x5a8d06['jsx'])(_0x4c2339['Button'],{'variant':'text','onClick':()=>_0x127634[_0x577a9e(0x245)](),'children':'Start\x20following'})]});}function _0x5c588c(_0x25ad5e){const _0xd519ff=_0xf308c7;let {coordinator:_0x48d473}=_0x25ad5e;return(0x0,_0x5a8d06[_0xd519ff(0x21b)])(_0x5a8d06[_0xd519ff(0x225)],{'children':[(0x0,_0x5a8d06['jsx'])('div',{'className':_0xd519ff(0x229),'children':_0xd519ff(0x24c)}),(0x0,_0x5a8d06[_0xd519ff(0x1c4)])(_0x4c2339['Button'],{'variant':_0xd519ff(0x20c),'onClick':()=>_0x48d473[_0xd519ff(0x20d)](),'children':_0xd519ff(0x1a3)})]});}function _0x1a468b(){const _0x2b8a08=_0xf308c7;return(0x0,_0x5a8d06[_0x2b8a08(0x1c4)])(_0x5a8d06[_0x2b8a08(0x225)],{'children':_0x2b8a08(0x203)});}let _0x4114fe=class extends _0x3f73d9[_0xf308c7(0x1f3)]{constructor(_0x115e74,_0x15ed92){const _0x1559dc=_0xf308c7;super(),this[_0x1559dc(0x23d)]=_0x115e74,this[_0x1559dc(0x1b6)]=_0x15ed92,this[_0x1559dc(0x188)]();}[_0xf308c7(0x188)](){const _0x5f38e6=_0xf308c7;this[_0x5f38e6(0x259)](this[_0x5f38e6(0x1b6)][_0x5f38e6(0x1bc)](_0x24eb36[_0x5f38e6(0x19a)][_0x5f38e6(0x18e)],()=>(0x0,_0x24eb36[_0x5f38e6(0x1fa)])(_0xf6783b,this[_0x5f38e6(0x23d)])));}};_0x4114fe=_0x55124c([_0x1edf58(0x0,(0x0,_0x3f73d9[_0xf308c7(0x197)])(_0x3f73d9[_0xf308c7(0x1af)])),_0x1edf58(0x1,_0x24eb36[_0xf308c7(0x1d7)])],_0x4114fe);var _0x409291='@univerjs-pro/live-share',_0x53f36e='0.21.0';let _0x209274='live-share.config';Symbol(_0x209274);let _0xc1a39c={},_0x41db42=class extends _0x3f73d9[_0xf308c7(0x1f3)]{constructor(_0x3f38af){const _0x198747=_0xf308c7;super(),this[_0x198747(0x1d0)]=_0x3f38af,this['_init']();}[_0xf308c7(0x1bd)](){const _0x38c97e=_0xf308c7;[_0x2d22f7['SetZoomRatioOperation']['id'],_0x2d22f7[_0x38c97e(0x233)]['id'],_0xc58304[_0x38c97e(0x220)]['id']][_0x38c97e(0x205)](_0x2e146a=>{const _0x44cb30=_0x38c97e;this[_0x44cb30(0x259)](this[_0x44cb30(0x1d0)]['registerSharedOperation'](_0x2e146a));});}};_0x41db42=_0x55124c([_0x1edf58(0x0,(0x0,_0x3f73d9['Inject'])(_0x53f0a6))],_0x41db42);let _0x8347f9=class extends _0x3f73d9['Plugin']{constructor(_0x1fa74f=_0xc1a39c,_0x359d70,_0x49b128){const _0x2de676=_0xf308c7;super(),this[_0x2de676(0x191)]=_0x1fa74f,this[_0x2de676(0x23d)]=_0x359d70,this[_0x2de676(0x192)]=_0x49b128;let {..._0x524d08}=(0x0,_0x3f73d9[_0x2de676(0x235)])({},_0xc1a39c,this[_0x2de676(0x191)]);this[_0x2de676(0x192)]['setConfig'](_0x209274,_0x524d08);}['onStarting'](){const _0x51337e=_0xf308c7;(0x0,_0x3f73d9[_0x51337e(0x1ed)])(this[_0x51337e(0x23d)],(0x0,_0x3f73d9[_0x51337e(0x1fc)])([[_0x53f0a6],[_0x2d2224],[_0x41db42],[_0x4114fe]],this[_0x51337e(0x191)][_0x51337e(0x1e7)])),(0x0,_0x3f73d9[_0x51337e(0x1ac)])(this[_0x51337e(0x23d)],[[_0x41db42]]);}[_0xf308c7(0x239)](){const _0x4a9c48=_0xf308c7;(0x0,_0x3f73d9[_0x4a9c48(0x1ac)])(this[_0x4a9c48(0x23d)],[[_0x4114fe]]);}};_0x33b425(_0x8347f9,'type',_0x3f73d9[_0xf308c7(0x19c)]['UNIVER_UNKNOWN']),_0x33b425(_0x8347f9,'pluginName',_0xf308c7(0x211)),_0x33b425(_0x8347f9,_0xf308c7(0x1ef),_0x409291),_0x33b425(_0x8347f9,_0xf308c7(0x21c),_0x53f36e),_0x8347f9=_0x55124c([(0x0,_0x3f73d9[_0xf308c7(0x1b2)])(_0x5495db[_0xf308c7(0x1df)]),_0x1edf58(0x1,(0x0,_0x3f73d9[_0xf308c7(0x197)])(_0x3f73d9[_0xf308c7(0x1af)])),_0x1edf58(0x2,_0x3f73d9[_0xf308c7(0x1f2)])],_0x8347f9),Object[_0xf308c7(0x196)](_0x4763e5,_0xf308c7(0x226),{'enumerable':!0x0,'get':function(){return _0x4114fe;}}),_0x4763e5['LiveShare']=_0xf6783b,Object[_0xf308c7(0x196)](_0x4763e5,_0xf308c7(0x1e8),{'enumerable':!0x0,'get':function(){return _0x2d2224;}}),Object['defineProperty'](_0x4763e5,_0xf308c7(0x25f),{'enumerable':!0x0,'get':function(){return _0xcf9b7e;}}),_0x4763e5[_0xf308c7(0x1a5)]=_0x53f0a6,_0x4763e5['LiveShareStatus']=_0x1a2ff8,Object['defineProperty'](_0x4763e5,_0xf308c7(0x258),{'enumerable':!0x0,'get':function(){return _0x8347f9;}});}));function _0x5c72(_0x13a595,_0x2532b9){_0x13a595=_0x13a595-0x187;const _0x10dd71=_0x10dd();let _0x5c72b8=_0x10dd71[_0x13a595];return _0x5c72b8;}function _0x10dd(){const _0x4a9ea1=['HEADER_MENU','toDisposable','forwardRef','_config','_configService','next','fill','object','defineProperty','Inject','end','UniverCore','BuiltInUIPart','toPrimitive','UniverInstanceType','LIVESHARE_OPERATION','call','Module','prototype','exports','_reporters','Stop\x20presenting','UniverDesign','LiveShareService','not-following','use','symbol','offline','4066304ylkkgY','@univerjs-pro/collaboration','touchDependencies','UNIVER_SHEET','subscribe','Injector','mutations','has','DependentOn','function','SessionStatus','registerInitialStateReporter','_uiPartsService','_presenter','params','delete','status$','sheet','registerComponent','_init','@univerjs/core','Dropdown','univerjs-icon\x20univerjs-icon-','LIVESHARE_REQUEST_HOST','PRESENTING','CollaborationEvent','jsx','idle','substring','path','decorate','memberID','parse','12IPhZln','UniverProCollaboration','clsx','from','_collabSessionService','_liveShareService','@univerjs-pro/collaboration-client','@univerjs/sheets-ui','1397627fcVZns','_startPresenting','includes','_startFollowing','IUIPartsService','toString','stopFollowing','data','assign','@univerjs/sheets','_univerInstanceService','rxjs','UniverCollaborationClientPlugin','type','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','useRef','0\x200\x2017\x2017','http://www.w3.org/2000/svg','_status','unsubscribe','override','LiveShareController','Subject','_commandService','React','getTypeOfUnitAdded$','registerDependencies','div','packageName','@univerjs/design','getInitialStates','IConfigService','Disposable','18YuzsRy','LIVESHARE_TERMINATE','then','getUnitId','createElement','string','connectInjector','parseProtocolChangeset','mergeOverrideWithDependencies','url(#$1','_stopPresenting','@univerjs/ui','stringify','UniverUi','children','You\x27are\x20offline.','init','forEach','defs','You\x27re\x20not\x20following\x20the\x20presenter','_beIdle','_entities','send','getLiveShareCoordinator','default','stopPresenting','DisposableCollection','event$','toStringTag','UNIVER_LIVE_SHARE_PLUGIN','IDLE','262382iLMeNZ','getStatus','idSuffix','trim','_handleOffline','presenting','OPERATION','Button','jsxs','version','Start','executeCommand','useDependency','SetWorksheetActiveOperation','_startLiveShareCoordinator','754547orekce','Present\x20this\x20document','IUniverInstanceService','Fragment','DesktopLiveShareController','1168324zrmhuO','ICommandService','univer-mb-3\x20univer-w-full\x20univer-text-sm','RxDisposable','_fetchOperations','asObservable','SAME_OPERATION_SHARE_INTERVAL','getConfig','4146760xpQeja','shouldShareOperation','dispose$','createInstance','SetScrollOperation','get','merge','requireSession','constructor','operations','onRendered','CollaborationSessionService','getValue','map','_injector','_handleNewHost','none','mask','replace','rxjs/operators','NOT_FOLLOWING','useObservable','startFollowing','displayName','univer-size-4','_handleOperation','_handleOnline','_status$','_commandDisposable','You\x27re\x20presenting\x20the\x20document','registerSharedOperation','attrs','currentColor','takeUntil','_collabSession','_unitID','_sharedOperations','_stopFollowing','6EyBbAH','Stop\x20following','onCommandExecuted','UniverLiveSharePlugin','disposeWithMe','throttleTime','set','UniverIcon','iterator','_handleNewChangeSets','LiveShareCoordinator','LIVESHARE_NEW_HOST','pipe','entries','evenodd','_handleTerminate','dispose','FOLLOWING','tag','current','881780GBzaiV','add','button','OFFLINE','getTypeOfUnitDisposed$','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','length','tryStartPresenting','xlink:href','getLiveShareCoordinatorSync','presenter','colorChannel1','_mountLiveShare','1em','useEffect','getMemberID','defIds','react/jsx-runtime'];_0x10dd=function(){return _0x4a9ea1;};return _0x10dd();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/live-share",
3
- "version": "0.20.1",
3
+ "version": "0.21.0",
4
4
  "private": false,
5
5
  "description": "UniverSheet normal ui-plugin-sheets",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -57,23 +57,23 @@
57
57
  },
58
58
  "dependencies": {
59
59
  "@univerjs/icons": "^1.1.1",
60
- "@univerjs-pro/collaboration": "0.20.1",
61
- "@univerjs-pro/collaboration-client": "0.20.1",
62
- "@univerjs/core": "0.20.1",
63
- "@univerjs/design": "0.20.1",
64
- "@univerjs/sheets": "0.20.1",
65
- "@univerjs/ui": "0.20.1",
66
- "@univerjs/sheets-ui": "0.20.1"
60
+ "@univerjs-pro/collaboration": "0.21.0",
61
+ "@univerjs/core": "0.21.0",
62
+ "@univerjs-pro/collaboration-client": "0.21.0",
63
+ "@univerjs/sheets": "0.21.0",
64
+ "@univerjs/sheets-ui": "0.21.0",
65
+ "@univerjs/ui": "0.21.0",
66
+ "@univerjs/design": "0.21.0"
67
67
  },
68
68
  "devDependencies": {
69
- "postcss": "^8.5.8",
69
+ "postcss": "^8.5.10",
70
70
  "react": "18.3.1",
71
71
  "rxjs": "7.8.2",
72
72
  "tailwindcss": "^3.4.17",
73
- "typescript": "^6.0.2",
74
- "vitest": "^4.1.1",
75
- "@univerjs-infra/shared": "0.20.1",
76
- "@univerjs/protocol": "0.1.49"
73
+ "typescript": "^6.0.3",
74
+ "vitest": "^4.1.4",
75
+ "@univerjs-infra/shared": "0.21.0",
76
+ "@univerjs/protocol": "0.21.0"
77
77
  },
78
78
  "scripts": {
79
79
  "test": "vitest run",