@univerjs-pro/edit-history-loader 0.21.1 → 0.22.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/README.md +38 -7
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +51 -45
package/README.md
CHANGED
|
@@ -1,14 +1,45 @@
|
|
|
1
1
|
# @univerjs-pro/edit-history-loader
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://npmjs.com/package/@univerjs-pro/edit-history-loader)
|
|
4
|
+
[](https://npmjs.com/package/@univerjs-pro/edit-history-loader)
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
`@univerjs-pro/edit-history-loader` provides edit history loading integration for Univer Pro.
|
|
7
|
+
|
|
8
|
+
## Package Overview
|
|
9
|
+
|
|
10
|
+
| Package | UMD global | CSS | Locales | Facade entry |
|
|
11
|
+
| --- | --- | :---: | :---: | :---: |
|
|
12
|
+
| `@univerjs-pro/edit-history-loader` | `UniverProEditHistoryLoader` | No | No | No |
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
pnpm add @univerjs-pro/edit-history-loader
|
|
18
|
+
# or
|
|
19
|
+
npm install @univerjs-pro/edit-history-loader
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Keep all `@univerjs/*` and `@univerjs-pro/*` packages on the same version.
|
|
6
23
|
|
|
7
24
|
## Usage
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
import { UniverEditHistoryLoaderPlugin } from '@univerjs-pro/edit-history-loader';
|
|
28
|
+
|
|
29
|
+
univer.registerPlugin(UniverEditHistoryLoaderPlugin);
|
|
11
30
|
```
|
|
12
31
|
|
|
13
|
-
|
|
14
|
-
|
|
32
|
+
Exported plugin classes:
|
|
33
|
+
|
|
34
|
+
- `UniverEditHistoryLoaderPlugin`
|
|
35
|
+
- `UniverEditHistoryLoaderMobilePlugin`
|
|
36
|
+
|
|
37
|
+
## Integration Notes
|
|
38
|
+
|
|
39
|
+
This package composes collaboration, edit history, and feature packages to load historical workbook states.
|
|
40
|
+
|
|
41
|
+
## Resources
|
|
42
|
+
|
|
43
|
+
- [Documentation](https://docs.univer.ai/guides/pro)
|
|
44
|
+
- [NPM package](https://npmjs.com/package/@univerjs-pro/edit-history-loader)
|
|
45
|
+
|
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3f251d=_0x1af9;(function(_0x47d30d,_0x20ae45){const _0x2e5d96=_0x1af9,_0x15843b=_0x47d30d();while(!![]){try{const _0x52ce7f=parseInt(_0x2e5d96(0x1db))/0x1*(parseInt(_0x2e5d96(0x1cd))/0x2)+-parseInt(_0x2e5d96(0x278))/0x3+-parseInt(_0x2e5d96(0x244))/0x4+parseInt(_0x2e5d96(0x1ff))/0x5+parseInt(_0x2e5d96(0x1fa))/0x6+-parseInt(_0x2e5d96(0x1fd))/0x7+parseInt(_0x2e5d96(0x227))/0x8;if(_0x52ce7f===_0x20ae45)break;else _0x15843b['push'](_0x15843b['shift']());}catch(_0x1d6244){_0x15843b['push'](_0x15843b['shift']());}}}(_0x246a,0xb3096),Object[_0x3f251d(0x1cc)](exports,Symbol[_0x3f251d(0x1f9)],{'value':_0x3f251d(0x201)}));let _univerjs_core=require('@univerjs/core'),_univerjs_sheets=require('@univerjs/sheets'),_univerjs_pro_collaboration=require('@univerjs-pro/collaboration'),_univerjs_pro_collaboration_client=require('@univerjs-pro/collaboration-client'),_univerjs_pro_edit_history_viewer=require('@univerjs-pro/edit-history-viewer'),_univerjs_pro_license=require('@univerjs-pro/license'),_univerjs_pro_sheets_chart=require('@univerjs-pro/sheets-chart'),_univerjs_pro_sheets_chart_ui=require('@univerjs-pro/sheets-chart-ui'),_univerjs_pro_sheets_pivot=require('@univerjs-pro/sheets-pivot'),_univerjs_pro_sheets_shape=require('@univerjs-pro/sheets-shape'),_univerjs_pro_sheets_shape_ui=require('@univerjs-pro/sheets-shape-ui'),_univerjs_pro_sheets_sparkline=require('@univerjs-pro/sheets-sparkline'),_univerjs_pro_sheets_sparkline_ui=require('@univerjs-pro/sheets-sparkline-ui'),_univerjs_data_validation=require('@univerjs/data-validation'),_univerjs_design=require('@univerjs/design'),_univerjs_docs=require('@univerjs/docs'),_univerjs_docs_ui=require('@univerjs/docs-ui'),_univerjs_drawing=require('@univerjs/drawing'),_univerjs_drawing_ui=require('@univerjs/drawing-ui'),_univerjs_engine_formula=require('@univerjs/engine-formula'),_univerjs_engine_render=require('@univerjs/engine-render'),_univerjs_network=require('@univerjs/network'),_univerjs_rpc=require('@univerjs/rpc'),_univerjs_sheets_conditional_formatting=require('@univerjs/sheets-conditional-formatting'),_univerjs_sheets_conditional_formatting_ui=require('@univerjs/sheets-conditional-formatting-ui'),_univerjs_sheets_data_validation=require('@univerjs/sheets-data-validation'),_univerjs_sheets_data_validation_ui=require('@univerjs/sheets-data-validation-ui'),_univerjs_sheets_drawing=require('@univerjs/sheets-drawing'),_univerjs_sheets_drawing_ui=require('@univerjs/sheets-drawing-ui'),_univerjs_sheets_filter=require('@univerjs/sheets-filter'),_univerjs_sheets_filter_ui=require('@univerjs/sheets-filter-ui'),_univerjs_sheets_formula=require('@univerjs/sheets-formula'),_univerjs_sheets_formula_ui=require('@univerjs/sheets-formula-ui'),_univerjs_sheets_hyper_link=require('@univerjs/sheets-hyper-link'),_univerjs_sheets_hyper_link_ui=require('@univerjs/sheets-hyper-link-ui'),_univerjs_sheets_numfmt=require('@univerjs/sheets-numfmt'),_univerjs_sheets_table=require('@univerjs/sheets-table'),_univerjs_sheets_ui=require('@univerjs/sheets-ui'),_univerjs_ui=require('@univerjs/ui'),rxjs=require('rxjs'),_univerjs_pro_collaboration_client_ui=require('@univerjs-pro/collaboration-client-ui'),_univerjs_icons=require('@univerjs/icons');const EDIT_HISTORY_LOADER_PLUGIN_CONFIG_KEY=_0x3f251d(0x27c),configSymbol=Symbol(EDIT_HISTORY_LOADER_PLUGIN_CONFIG_KEY),defaultPluginConfig={};function _typeof(_0x3bb067){'@babel/helpers - typeof';const _0x441da2=_0x3f251d;return _typeof='function'==typeof Symbol&&'symbol'==typeof Symbol[_0x441da2(0x24d)]?function(_0x137db6){return typeof _0x137db6;}:function(_0x47a65c){const _0xf1f675=_0x441da2;return _0x47a65c&&_0xf1f675(0x252)==typeof Symbol&&_0x47a65c[_0xf1f675(0x280)]===Symbol&&_0x47a65c!==Symbol[_0xf1f675(0x2d7)]?_0xf1f675(0x1eb):typeof _0x47a65c;},_typeof(_0x3bb067);}function toPrimitive(_0x5db712,_0x5ef3b2){const _0x5df632=_0x3f251d;if(_0x5df632(0x232)!=_typeof(_0x5db712)||!_0x5db712)return _0x5db712;var _0x11abbe=_0x5db712[Symbol[_0x5df632(0x1fe)]];if(void 0x0!==_0x11abbe){var _0x2f4a1d=_0x11abbe[_0x5df632(0x26b)](_0x5db712,_0x5ef3b2||_0x5df632(0x2a3));if(_0x5df632(0x232)!=_typeof(_0x2f4a1d))return _0x2f4a1d;throw new TypeError(_0x5df632(0x268));}return(_0x5df632(0x27b)===_0x5ef3b2?String:Number)(_0x5db712);}function toPropertyKey(_0x30eeec){const _0x28b5de=_0x3f251d;var _0x136f0a=toPrimitive(_0x30eeec,_0x28b5de(0x27b));return _0x28b5de(0x1eb)==_typeof(_0x136f0a)?_0x136f0a:_0x136f0a+'';}function _defineProperty(_0x31ace6,_0x341306,_0x1b4ab1){const _0x13cd09=_0x3f251d;return(_0x341306=toPropertyKey(_0x341306))in _0x31ace6?Object[_0x13cd09(0x1cc)](_0x31ace6,_0x341306,{'value':_0x1b4ab1,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x31ace6[_0x341306]=_0x1b4ab1,_0x31ace6;}function __decorateParam(_0x391e71,_0xa124d2){return function(_0x11ddec,_0x50c451){_0xa124d2(_0x11ddec,_0x50c451,_0x391e71);};}function __decorate(_0x159db1,_0x4cc4fc,_0x44dd14,_0x480ea2){const _0x3ca8dc=_0x3f251d;var _0x73514b=arguments[_0x3ca8dc(0x246)],_0x185034=_0x73514b<0x3?_0x4cc4fc:_0x480ea2===null?_0x480ea2=Object['getOwnPropertyDescriptor'](_0x4cc4fc,_0x44dd14):_0x480ea2,_0x5e6b4d;if(typeof Reflect===_0x3ca8dc(0x232)&&typeof Reflect[_0x3ca8dc(0x24a)]===_0x3ca8dc(0x252))_0x185034=Reflect[_0x3ca8dc(0x24a)](_0x159db1,_0x4cc4fc,_0x44dd14,_0x480ea2);else{for(var _0x2bd414=_0x159db1[_0x3ca8dc(0x246)]-0x1;_0x2bd414>=0x0;_0x2bd414--)if(_0x5e6b4d=_0x159db1[_0x2bd414])_0x185034=(_0x73514b<0x3?_0x5e6b4d(_0x185034):_0x73514b>0x3?_0x5e6b4d(_0x4cc4fc,_0x44dd14,_0x185034):_0x5e6b4d(_0x4cc4fc,_0x44dd14))||_0x185034;}return _0x73514b>0x3&&_0x185034&&Object[_0x3ca8dc(0x1cc)](_0x4cc4fc,_0x44dd14,_0x185034),_0x185034;}const DEFAULT_UNIVER_CONTAINER_ID$1=_0x3f251d(0x249),UNIVER_CONTAINER_ID_KEY=_0x3f251d(0x2ca),UNIVER_HISTORY_CONTAINER_ID=_0x3f251d(0x2ac);let HistoryLoaderService=class HistoryLoaderService extends _univerjs_core['Disposable']{constructor(_0x2791f7,_0x99f46a,_0x568232,_0x31091d,_0x45b49b,_0x174732,_0x5b5eb4,_0x35a543,_0x26349f,_0x29ff57){const _0x5e0372=_0x3f251d;super(),this[_0x5e0372(0x1cb)]=_0x2791f7,this[_0x5e0372(0x20f)]=_0x99f46a,this[_0x5e0372(0x240)]=_0x568232,this[_0x5e0372(0x209)]=_0x31091d,this['_messageService']=_0x45b49b,this['_permissionService']=_0x174732,this['_selectionProtectionRuleModel']=_0x5b5eb4,this[_0x5e0372(0x23e)]=_0x35a543,this['_sidebarService']=_0x26349f,this[_0x5e0372(0x1c8)]=_0x29ff57,_defineProperty(this,_0x5e0372(0x260),new rxjs[(_0x5e0372(0x20e))](null)),_defineProperty(this,_0x5e0372(0x25e),this[_0x5e0372(0x260)][_0x5e0372(0x26e)]()),_defineProperty(this,_0x5e0372(0x1da),new _univerjs_core['DisposableCollection']()),_defineProperty(this,_0x5e0372(0x257),new Map()),_defineProperty(this,_0x5e0372(0x22e),null),this[_0x5e0372(0x2bd)]();}get[_0x3f251d(0x2b6)](){const _0xf800e8=_0x3f251d;return this[_0xf800e8(0x260)][_0xf800e8(0x21a)];}['_init'](){const _0x52c2c4=_0x3f251d;this[_0x52c2c4(0x256)](),this[_0x52c2c4(0x218)]();}[_0x3f251d(0x256)](){const _0x1ed9e1=_0x3f251d;var _0x4e902b;const _0x48ded7=(_0x4e902b=this[_0x1ed9e1(0x240)]['getConfig'](_0x1ed9e1(0x2ca)))!==null&&_0x4e902b!==void 0x0?_0x4e902b:DEFAULT_UNIVER_CONTAINER_ID$1,_0xbfcd9f=document[_0x1ed9e1(0x2c4)](_0x48ded7);if(!_0xbfcd9f)return;const _0x490240=document[_0x1ed9e1(0x269)](_0x1ed9e1(0x287));_0x490240['id']=UNIVER_HISTORY_CONTAINER_ID,_0x490240['dataset'][_0x1ed9e1(0x20c)]=_0x1ed9e1(0x205),_0x490240[_0x1ed9e1(0x2cd)]['position']=_0x1ed9e1(0x23d),_0x490240[_0x1ed9e1(0x2cd)]['top']='0',_0x490240['style'][_0x1ed9e1(0x2d2)]='0',_0x490240[_0x1ed9e1(0x2cd)][_0x1ed9e1(0x27f)]='100%',_0x490240['style']['height']=_0x1ed9e1(0x27d),_0x490240[_0x1ed9e1(0x2cd)][_0x1ed9e1(0x294)]='49',_0x490240['style'][_0x1ed9e1(0x23f)]=_0x1ed9e1(0x293),_0xbfcd9f[_0x1ed9e1(0x251)](_0x490240);}[_0x3f251d(0x218)](){const _0x3ad268=_0x3f251d;[[_univerjs_engine_render['UniverRenderEnginePlugin']],[_univerjs_ui[_0x3ad268(0x223)],{'container':UNIVER_HISTORY_CONTAINER_ID,'header':!![],'toolbar':![],'footer':!![],'contextMenu':![],'override':[[_univerjs_ui['IDialogService'],null]]}],[_univerjs_network[_0x3ad268(0x210)]],[_univerjs_drawing['UniverDrawingPlugin'],{'override':[[_univerjs_drawing[_0x3ad268(0x24c)],null]]}],[_univerjs_docs[_0x3ad268(0x1dc)],{'hasScroll':![]}],[_univerjs_docs_ui['UniverDocsUIPlugin']],[_univerjs_sheets_numfmt[_0x3ad268(0x2b9)]],[_univerjs_sheets[_0x3ad268(0x27a)],{'notExecuteFormula':!![]}],[_univerjs_sheets_ui[_0x3ad268(0x29f)]],[_univerjs_sheets_formula['UniverSheetsFormulaPlugin']],[_univerjs_sheets_formula_ui[_0x3ad268(0x283)]],[_univerjs_pro_collaboration['UniverCollaborationPlugin']],[_univerjs_sheets_filter[_0x3ad268(0x237)]],[_univerjs_sheets_filter_ui['UniverSheetsFilterUIPlugin']],[_univerjs_sheets_conditional_formatting[_0x3ad268(0x263)]],[_univerjs_sheets_conditional_formatting_ui[_0x3ad268(0x1c7)]],[_univerjs_sheets_hyper_link['UniverSheetsHyperLinkPlugin']],[_univerjs_sheets_hyper_link_ui[_0x3ad268(0x228)]],[_univerjs_data_validation[_0x3ad268(0x1e2)]],[_univerjs_sheets_data_validation['UniverSheetsDataValidationPlugin']],[_univerjs_sheets_data_validation_ui[_0x3ad268(0x25a)]],[_univerjs_engine_formula[_0x3ad268(0x273)],{'notExecuteFormula':!![]}],[_univerjs_drawing_ui['UniverDrawingUIPlugin']],[_univerjs_sheets_drawing[_0x3ad268(0x29e)]],[_univerjs_sheets_drawing_ui[_0x3ad268(0x1ed)]],[_univerjs_pro_sheets_sparkline[_0x3ad268(0x1f0)]],[_univerjs_pro_sheets_sparkline_ui[_0x3ad268(0x1dd)]],[_univerjs_pro_sheets_chart[_0x3ad268(0x2d0)]],[_univerjs_pro_sheets_chart_ui[_0x3ad268(0x22f)]],[_univerjs_pro_sheets_shape[_0x3ad268(0x26d)]],[_univerjs_pro_sheets_shape_ui[_0x3ad268(0x29c)]],[_univerjs_pro_sheets_pivot[_0x3ad268(0x1f5)],{'notExecuteFormula':!![]}],[_univerjs_sheets_table[_0x3ad268(0x2b0)]]][_0x3ad268(0x2b8)](([_0x45a16e,_0x557ad1])=>this[_0x3ad268(0x2a2)](_0x45a16e,_0x557ad1));}[_0x3f251d(0x2cf)](){const _0x339e9c=_0x3f251d;super[_0x339e9c(0x2cf)](),this[_0x339e9c(0x203)](),this[_0x339e9c(0x257)][_0x339e9c(0x1fc)]();}[_0x3f251d(0x2a2)](_0x3b72f2,_0x295ad5,_0x1976af){const _0x4a716a=_0x3f251d;if(this['_pluginMap'][_0x4a716a(0x281)](_0x3b72f2['pluginName'])&&!_0x1976af)throw new Error(_0x4a716a(0x2c6)+_0x3b72f2[_0x4a716a(0x20a)]+_0x4a716a(0x270));this[_0x4a716a(0x257)][_0x4a716a(0x2b5)](_0x3b72f2[_0x4a716a(0x20a)],[_0x3b72f2,_0x295ad5]);}[_0x3f251d(0x2d4)](){const _0x4d9f7d=_0x3f251d;return Array[_0x4d9f7d(0x2bb)](this[_0x4d9f7d(0x257)]['values']());}[_0x3f251d(0x2bc)](_0x1cc5b7,_0x43bb0a){const _0x5a0e33=_0x3f251d,_0x2e5b3d=document['getElementById'](UNIVER_HISTORY_CONTAINER_ID);if(!_0x2e5b3d)return;_0x2e5b3d['style']['display']='block',this[_0x5a0e33(0x2c9)](_0x1cc5b7,UNIVER_HISTORY_CONTAINER_ID,_0x43bb0a);}[_0x3f251d(0x203)](){const _0x3004e1=_0x3f251d;var _0x5bd980;this[_0x3004e1(0x1da)][_0x3004e1(0x2cf)](),(_0x5bd980=this[_0x3004e1(0x2b6)])===null||_0x5bd980===void 0x0||_0x5bd980['dispose'](),this['_historyUniver$'][_0x3004e1(0x1e0)](null);const _0x1ac2ed=document['getElementById'](UNIVER_HISTORY_CONTAINER_ID);if(!_0x1ac2ed)return;_0x1ac2ed['style']['display']=_0x3004e1(0x293),this[_0x3004e1(0x22e)]&&(this['_internalWebWorker'][_0x3004e1(0x21c)](),this['_internalWebWorker']=null);}[_0x3f251d(0x2c9)](_0x2c816a,_0x167a2c,_0x59f36d){const _0x4a3bca=_0x3f251d;var _0x1a7ec4,_0x39be7e,_0x2bcb91,_0x14b512,_0xbabf23;if(this[_0x4a3bca(0x2b6)])return;const _0x3783d3=new _univerjs_core['Univer']({'locales':{[this[_0x4a3bca(0x1cb)]['getCurrentLocale']()]:this[_0x4a3bca(0x1cb)][_0x4a3bca(0x20b)]()},'override':[[_univerjs_core[_0x4a3bca(0x22d)],{'useClass':_univerjs_pro_collaboration_client[_0x4a3bca(0x298)]}]]}),_0x201a73=_0x3783d3[_0x4a3bca(0x295)]();this['disposeWithMe'](this[_0x4a3bca(0x1c8)][_0x4a3bca(0x2cb)][_0x4a3bca(0x1d2)](_0x562268=>{const _0x4be50d=_0x4a3bca;_0x201a73[_0x4be50d(0x2c3)](_univerjs_core[_0x4be50d(0x200)])[_0x4be50d(0x296)](_0x562268);})),this[_0x4a3bca(0x236)](this[_0x4a3bca(0x1c8)]['currentTheme$'][_0x4a3bca(0x1d2)](_0x410f28=>{const _0x31ee0b=_0x4a3bca;_0x201a73[_0x31ee0b(0x2c3)](_univerjs_core[_0x31ee0b(0x200)])[_0x31ee0b(0x21d)](_0x410f28);})),_0x201a73[_0x4a3bca(0x2c3)](_univerjs_core['LocaleService'])[_0x4a3bca(0x285)](this[_0x4a3bca(0x1cb)][_0x4a3bca(0x282)]()),_0x201a73[_0x4a3bca(0x2c3)](_univerjs_core['IConfigService'])[_0x4a3bca(0x214)](_univerjs_pro_collaboration_client[_0x4a3bca(0x2a6)],this[_0x4a3bca(0x240)][_0x4a3bca(0x206)](_univerjs_pro_collaboration_client[_0x4a3bca(0x2a6)]));const _0x2abccc=this['_configService']['getConfig'](_univerjs_pro_license['LS_CONFIG_KEY']);if(_0x2abccc)_0x3783d3[_0x4a3bca(0x2a2)](_univerjs_pro_license[_0x4a3bca(0x23c)],{'license':_0x2abccc['ls']});const _0x1b9223=(_0x1a7ec4=this[_0x4a3bca(0x240)][_0x4a3bca(0x206)]('edit-history-loader.config'))===null||_0x1a7ec4===void 0x0?void 0x0:_0x1a7ec4['workerURL'],_0x304474=!!_0x1b9223;_0x304474&&(this[_0x4a3bca(0x22e)]=_0x1b9223 instanceof Worker?_0x1b9223:null,_0x3783d3[_0x4a3bca(0x2a2)](_univerjs_rpc[_0x4a3bca(0x1c0)],{'workerURL':_0x1b9223}));this[_0x4a3bca(0x257)][_0x4a3bca(0x2b8)](([_0x2aa6c6,_0xf041eb])=>{const _0x1518dc=_0x4a3bca;_0x3783d3[_0x1518dc(0x2a2)](_0x2aa6c6,_0xf041eb);}),_0x3783d3[_0x4a3bca(0x2a2)](_univerjs_pro_edit_history_viewer['UniverEditHistoryViewerPlugin'],{'historyListServerUrl':(_0x39be7e=this[_0x4a3bca(0x240)][_0x4a3bca(0x206)]('edit-history-loader.config'))===null||_0x39be7e===void 0x0?void 0x0:_0x39be7e[_0x4a3bca(0x1cf)],'historyPanelComponentKey':(_0x2bcb91=this['_configService'][_0x4a3bca(0x206)]('edit-history-loader.config'))===null||_0x2bcb91===void 0x0?void 0x0:_0x2bcb91['historyPanelComponentKey'],'historyPanelHidden':(_0x14b512=this[_0x4a3bca(0x240)][_0x4a3bca(0x206)](_0x4a3bca(0x27c)))===null||_0x14b512===void 0x0?void 0x0:_0x14b512[_0x4a3bca(0x267)],'historyAIassistantEnabled':(_0xbabf23=this[_0x4a3bca(0x240)][_0x4a3bca(0x206)](_0x4a3bca(0x27c)))===null||_0xbabf23===void 0x0?void 0x0:_0xbabf23[_0x4a3bca(0x226)]}),_0x201a73[_0x4a3bca(0x2c1)](_0x11e67a=>{const _0x5d58ea=_0x4a3bca;this[_0x5d58ea(0x2da)](_0x11e67a,_0x2c816a);}),this[_0x4a3bca(0x260)]['next'](_0x3783d3);const _0x3b1e50=_0x201a73[_0x4a3bca(0x2c3)](_univerjs_pro_edit_history_viewer[_0x4a3bca(0x1be)]),_0x2a97be=this['_checkCanRevert'](_0x2c816a),_0x3c89a4=()=>{const _0x33eca1=_0x4a3bca;if(_0x59f36d)_0x3b1e50[_0x33eca1(0x1e4)](_0x2c816a,_0x167a2c,_0x2a97be,_0x59f36d);else _0x3b1e50[_0x33eca1(0x1d3)](_0x2c816a,_0x167a2c,_0x2a97be);};this[_0x4a3bca(0x1de)][_0x4a3bca(0x290)]({'content':this['_localeService']['t']('editHistory.info.initializing'),'type':_univerjs_design[_0x4a3bca(0x1bd)]['Loading']});if(_0x304474)try{_0x201a73['get'](_univerjs_rpc[_0x4a3bca(0x21f)])['whenReady']()['then'](()=>{_0x3c89a4();});}catch{_0x3c89a4();}else _0x3c89a4();}[_0x3f251d(0x2da)](_0x59a1d1,_0x4ce772){const _0x2f39f7=_0x3f251d,_0x4b46ed=_0x59a1d1[_0x2f39f7(0x2c3)](_univerjs_pro_edit_history_viewer[_0x2f39f7(0x1be)]);this[_0x2f39f7(0x1da)][_0x2f39f7(0x28c)](_0x4b46ed['status$'][_0x2f39f7(0x1d2)](_0x23e032=>{const _0x3f8554=_0x2f39f7;switch(_0x23e032){case _univerjs_pro_edit_history_viewer['HistoryModeStatus'][_0x3f8554(0x1ee)]:this['_dialogService'][_0x3f8554(0x276)](),this[_0x3f8554(0x255)][_0x3f8554(0x231)]();break;case _univerjs_pro_edit_history_viewer[_0x3f8554(0x1e6)][_0x3f8554(0x220)]:this[_0x3f8554(0x209)][_0x3f8554(0x2d8)](ExitEditHistoryOperation['id']),this['unMountHistoryContent']();break;case _univerjs_pro_edit_history_viewer['HistoryModeStatus']['Error']:this[_0x3f8554(0x203)](),this[_0x3f8554(0x1de)][_0x3f8554(0x290)]({'content':this[_0x3f8554(0x1cb)]['t'](_0x3f8554(0x25d)),'type':_univerjs_design[_0x3f8554(0x1bd)][_0x3f8554(0x21b)],'duration':0xbb8});break;default:break;}})),this['_disposableCollection']['add'](_0x4b46ed[_0x2f39f7(0x234)][_0x2f39f7(0x1d2)](async _0x31b17c=>{const _0x7600e5=_0x2f39f7;if(_0x31b17c)this[_0x7600e5(0x209)][_0x7600e5(0x2d8)](_univerjs_pro_collaboration[_0x7600e5(0x2d6)]['id'],{'unitId':_0x4ce772,'revision':_0x31b17c});}));}[_0x3f251d(0x2d1)](_0x28b3c9){const _0x1cf2cd=_0x3f251d,_0x217304=this[_0x1cf2cd(0x20f)][_0x1cf2cd(0x259)](_0x28b3c9)['getSheets']()[_0x1cf2cd(0x297)](_0x5cdbc9=>_0x5cdbc9['getSheetId']()),_0x4bfb7c=new _univerjs_sheets[(_0x1cf2cd(0x1ef))](_0x28b3c9)['id'],_0xa59e58=_0x217304[_0x1cf2cd(0x297)](_0x150d8b=>new _univerjs_sheets[(_0x1cf2cd(0x1f2))](_0x28b3c9,_0x150d8b)['id']),_0x2aac90=_0x217304[_0x1cf2cd(0x297)](_0x214066=>this[_0x1cf2cd(0x2ba)][_0x1cf2cd(0x216)](_0x28b3c9,_0x214066)[_0x1cf2cd(0x297)](_0x2a3d89=>new _univerjs_sheets[(_0x1cf2cd(0x271))](_0x28b3c9,_0x214066,_0x2a3d89[_0x1cf2cd(0x277)])['id']))[_0x1cf2cd(0x1e9)](),_0x23e5c5=new _univerjs_sheets[(_0x1cf2cd(0x2af))](_0x28b3c9)['id'];return this[_0x1cf2cd(0x2cc)]['composePermission']([_0x4bfb7c,..._0xa59e58,..._0x2aac90,_0x23e5c5])[_0x1cf2cd(0x235)](_0x26e773=>!!_0x26e773[_0x1cf2cd(0x21a)]);}};HistoryLoaderService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core['Inject'])(_univerjs_core[_0x3f251d(0x1e1)])),__decorateParam(0x1,_univerjs_core[_0x3f251d(0x2c5)]),__decorateParam(0x2,_univerjs_core[_0x3f251d(0x299)]),__decorateParam(0x3,_univerjs_core[_0x3f251d(0x1d7)]),__decorateParam(0x4,_univerjs_ui[_0x3f251d(0x253)]),__decorateParam(0x5,_univerjs_core[_0x3f251d(0x1d4)]),__decorateParam(0x6,(0x0,_univerjs_core[_0x3f251d(0x26f)])(_univerjs_sheets[_0x3f251d(0x2c7)])),__decorateParam(0x7,(0x0,_univerjs_core['Inject'])(_univerjs_ui[_0x3f251d(0x21e)])),__decorateParam(0x8,(0x0,_univerjs_core[_0x3f251d(0x26f)])(_univerjs_ui[_0x3f251d(0x254)])),__decorateParam(0x9,(0x0,_univerjs_core[_0x3f251d(0x26f)])(_univerjs_core[_0x3f251d(0x200)]))],HistoryLoaderService);const ToggleEditHistoryOperation={'id':_0x3f251d(0x2bf),'type':_univerjs_core['CommandType'][_0x3f251d(0x279)],'handler':_0x15b7b4=>{const _0x6a5eb5=_0x3f251d,_0x24498e=_0x15b7b4[_0x6a5eb5(0x2c3)](HistoryLoaderService),{unitId:_0x43ad70}=(0x0,_univerjs_sheets[_0x6a5eb5(0x202)])(_0x15b7b4[_0x6a5eb5(0x2c3)](_univerjs_core[_0x6a5eb5(0x2c5)]))||{};if(!_0x43ad70)return![];return _0x24498e[_0x6a5eb5(0x2bc)](_0x43ad70),!![];}},ExitEditHistoryOperation={'id':_0x3f251d(0x239),'type':_univerjs_core[_0x3f251d(0x28e)]['OPERATION'],'handler':()=>!![]};var name='@univerjs-pro/edit-history-loader',version=_0x3f251d(0x22a);function ToggleEditHistoryMenuFactory(_0x2782c8){const _0x2706a5=_0x3f251d;return{'id':ToggleEditHistoryOperation['id'],'type':_univerjs_ui[_0x2706a5(0x289)]['BUTTON'],'icon':_0x2706a5(0x247),'tooltip':_0x2706a5(0x2a5),'hidden$':(0x0,_univerjs_ui[_0x2706a5(0x23a)])(_0x2782c8,_univerjs_core[_0x2706a5(0x2c8)][_0x2706a5(0x2a8)]),'disabled$':(0x0,_univerjs_sheets_ui[_0x2706a5(0x27e)])(_0x2782c8,{'workbookTypes':[_univerjs_sheets[_0x2706a5(0x2a7)]],'worksheetTypes':[],'rangeTypes':[]})};}const menuSchema={[_univerjs_ui[_0x3f251d(0x22b)][_0x3f251d(0x211)]]:{[ToggleEditHistoryOperation['id']]:{'order':0.2,'menuItemFactory':ToggleEditHistoryMenuFactory}}};let MobileHistoryLoaderController=class MobileHistoryLoaderController extends _univerjs_core[_0x3f251d(0x291)]{constructor(_0x44804a,_0x59f0f9,_0x59a6d7,_0x5dd3f1,_0x2ac055,_0x292cf0,_0x2507a1,_0x821083,_0x38b3dc,_0xfa0bb3,_0x40870f){const _0x56f15c=_0x3f251d;super(),this['_commandService']=_0x44804a,this[_0x56f15c(0x1e7)]=_0x59f0f9,this['_componentManager']=_0x59a6d7,this[_0x56f15c(0x25c)]=_0x5dd3f1,this[_0x56f15c(0x1cb)]=_0x2ac055,this[_0x56f15c(0x1de)]=_0x292cf0,this[_0x56f15c(0x207)]=_0x2507a1,this['_localCacheService']=_0x821083,this[_0x56f15c(0x208)]=_0x38b3dc,this['_univerInstanceService']=_0xfa0bb3,this[_0x56f15c(0x265)]=_0x40870f,_defineProperty(this,'_revertErrorTimer',null),this[_0x56f15c(0x2bd)]();}[_0x3f251d(0x2bd)](){const _0x6259f0=_0x3f251d;[ToggleEditHistoryOperation,ExitEditHistoryOperation][_0x6259f0(0x2b8)](_0x19d862=>this[_0x6259f0(0x236)]((0x0,_univerjs_core['toDisposable'])(this[_0x6259f0(0x209)][_0x6259f0(0x1f6)](_0x19d862)))),this[_0x6259f0(0x236)](this[_0x6259f0(0x286)]['register'](_0x6259f0(0x247),_univerjs_icons[_0x6259f0(0x247)])),this['_menuManagerService'][_0x6259f0(0x274)](menuSchema),this['disposeWithMe'](this[_0x6259f0(0x209)][_0x6259f0(0x2be)](async(_0x8997e1,_0x5356ac)=>{const _0x5df77c=_0x6259f0;if(_0x8997e1['id']===_univerjs_pro_collaboration[_0x5df77c(0x2d6)]['id']){const {unitId:_0x5c4b67}=_0x8997e1[_0x5df77c(0x1d9)];this['_messageService'][_0x5df77c(0x290)]({'content':this[_0x5df77c(0x1cb)]['t'](_0x5df77c(0x2ce)),'type':_univerjs_design[_0x5df77c(0x1bd)][_0x5df77c(0x28a)],'duration':0x1388});const _0x4a1d8f=this[_0x5df77c(0x207)][_0x5df77c(0x29a)](_0x5c4b67);if(!(_0x5356ac===null||_0x5356ac===void 0x0?void 0x0:_0x5356ac[_0x5df77c(0x28f)]))this[_0x5df77c(0x1d1)](_0x4a1d8f,async()=>{const _0x2a62be=_0x5df77c,_0x52788a=this['_univerInstanceService'][_0x2a62be(0x2ab)](_univerjs_core[_0x2a62be(0x2c8)][_0x2a62be(0x2a8)]),_0x4d6a15=_0x52788a===null||_0x52788a===void 0x0?void 0x0:_0x52788a['getActiveSheet']();if(!_0x4d6a15)return![];this[_0x2a62be(0x20f)][_0x2a62be(0x1df)](_0x5c4b67);const _0x23b394=await this[_0x2a62be(0x208)]['loadUnit'](_0x5c4b67,_univerjs_core[_0x2a62be(0x2c8)]['UNIVER_SHEET']);if(_0x23b394&&_0x23b394 instanceof _univerjs_core[_0x2a62be(0x25b)])return await this['_setupSubUnitSync'](_0x23b394,_0x4d6a15[_0x2a62be(0x26a)]()),!![];return![];});else this['_handleRevertAcknowledgement'](_0x4a1d8f,async()=>{return setTimeout(()=>window['location']['reload']()),!![];},!![]);}}));}[_0x3f251d(0x1d1)](_0x4eb4c3,_0x144d4e,_0x457b47=![]){const _0x475d89=_0x3f251d,_0xcc2ab3=(0x0,rxjs['combineLatest'])([_0x4eb4c3[_0x475d89(0x2b2)][_0x475d89(0x2a1)],_0x4eb4c3[_0x475d89(0x272)]])[_0x475d89(0x1d2)](async([_0xdad0a9,_0x57993b])=>{const _0x2a67b2=_0x475d89;if(_0xdad0a9[_0x2a67b2(0x2b4)]===_univerjs_pro_collaboration['CollaborationEvent'][_0x2a67b2(0x264)]&&(_0x57993b===null||_0x57993b===void 0x0?void 0x0:_0x57993b['status'])===_univerjs_pro_collaboration_client[_0x2a67b2(0x266)][_0x2a67b2(0x2aa)]){if(_0xdad0a9[_0x2a67b2(0x25f)][_0x2a67b2(0x2d5)][_0x2a67b2(0x217)](_0xd4016=>_0xd4016['id']===_univerjs_pro_collaboration[_0x2a67b2(0x2d6)]['id'])){if(await _0x144d4e()){var _0x50af75;this[_0x2a67b2(0x25c)][_0x2a67b2(0x203)](),_0xcc2ab3['unsubscribe'](),this[_0x2a67b2(0x22c)]&&clearTimeout(this[_0x2a67b2(0x22c)]),await((_0x50af75=this[_0x2a67b2(0x1e8)])===null||_0x50af75===void 0x0?void 0x0:_0x50af75[_0x2a67b2(0x229)]()),this['_messageService'][_0x2a67b2(0x1f7)]();}}}});if(_0x457b47)this[_0x475d89(0x22c)]=setTimeout(()=>{const _0x4e3caf=_0x475d89;_0xcc2ab3['unsubscribe'](),this[_0x4e3caf(0x1de)][_0x4e3caf(0x290)]({'content':this[_0x4e3caf(0x1cb)]['t']('editHistory.panel.revertFailed'),'type':_univerjs_design[_0x4e3caf(0x1bd)][_0x4e3caf(0x21b)],'duration':0xbb8});},0x1388);}async['_setupSubUnitSync'](_0x2cd6b3,_0x15ecac){const _0x22b883=_0x3f251d;await this[_0x22b883(0x1e3)](_0x2cd6b3,_0x15ecac),_0x2cd6b3['activeSheet$']['pipe']((0x0,rxjs[_0x22b883(0x1ce)])(this[_0x22b883(0x215)]))[_0x22b883(0x1d2)](_0x1b4f63=>{const _0x172204=_0x22b883;if(_0x1b4f63)this[_0x172204(0x241)](_0x1b4f63);}),this[_0x22b883(0x265)]['urlChange$'][_0x22b883(0x225)]((0x0,rxjs['takeUntil'])(this[_0x22b883(0x215)]))[_0x22b883(0x1d2)](()=>this[_0x22b883(0x1e3)](_0x2cd6b3,_0x15ecac));}[_0x3f251d(0x241)](_0x4dec50,_0x475b4f=![]){const _0x21f4d6=_0x3f251d,_0xf45cb7=this[_0x21f4d6(0x265)][_0x21f4d6(0x258)](_0x21f4d6(0x250));if(_0x4dec50[_0x21f4d6(0x26a)]()!==_0xf45cb7)this[_0x21f4d6(0x265)][_0x21f4d6(0x1c4)](_0x21f4d6(0x250),_0x4dec50[_0x21f4d6(0x26a)](),_0x475b4f);}async[_0x3f251d(0x1e3)](_0x2e5bf1,_0xcf3dd2){const _0x499ea9=_0x3f251d;var _0x53eb46;if(!_0xcf3dd2||!_0x2e5bf1['getSheetBySheetId'](_0xcf3dd2)){const _0x3db2a4=_0x2e5bf1[_0x499ea9(0x2d3)]()[0x0],_0x4b17fb=_0x2e5bf1[_0x499ea9(0x1d6)](_0x3db2a4);if(!_0x4b17fb)return;this[_0x499ea9(0x241)](_0x4b17fb,!![]),await this[_0x499ea9(0x209)]['executeCommand'](_univerjs_sheets[_0x499ea9(0x1ea)]['id'],{'unitId':_0x2e5bf1[_0x499ea9(0x230)](),'subUnitId':_0x3db2a4});return;}if(((_0x53eb46=_0x2e5bf1[_0x499ea9(0x222)]())===null||_0x53eb46===void 0x0?void 0x0:_0x53eb46[_0x499ea9(0x26a)]())===_0xcf3dd2)return;await this[_0x499ea9(0x209)][_0x499ea9(0x2d8)](_univerjs_sheets[_0x499ea9(0x1ea)]['id'],{'unitId':_0x2e5bf1[_0x499ea9(0x230)](),'subUnitId':_0xcf3dd2});}};MobileHistoryLoaderController=__decorate([__decorateParam(0x0,_univerjs_core[_0x3f251d(0x1d7)]),__decorateParam(0x1,_univerjs_ui[_0x3f251d(0x2ae)]),__decorateParam(0x2,(0x0,_univerjs_core[_0x3f251d(0x26f)])(_univerjs_ui[_0x3f251d(0x212)])),__decorateParam(0x3,(0x0,_univerjs_core[_0x3f251d(0x26f)])(HistoryLoaderService)),__decorateParam(0x4,(0x0,_univerjs_core['Inject'])(_univerjs_core['LocaleService'])),__decorateParam(0x5,_univerjs_ui[_0x3f251d(0x253)]),__decorateParam(0x6,(0x0,_univerjs_core['Inject'])(_univerjs_pro_collaboration_client[_0x3f251d(0x248)])),__decorateParam(0x7,_univerjs_pro_collaboration_client[_0x3f251d(0x2b7)]),__decorateParam(0x8,(0x0,_univerjs_core['Inject'])(_univerjs_pro_collaboration_client[_0x3f251d(0x23b)])),__decorateParam(0x9,_univerjs_core['IUniverInstanceService']),__decorateParam(0xa,_univerjs_pro_collaboration_client_ui[_0x3f251d(0x29d)])],MobileHistoryLoaderController);const DEFAULT_UNIVER_CONTAINER_ID='univer-container',UNIVER_CONTAINER_ID_KEY$1=_0x3f251d(0x2ca),UNIVER_HISTORY_CONTAINER_ID$1=_0x3f251d(0x1ec);let MobileHistoryLoaderService=class MobileHistoryLoaderService extends _univerjs_core['Disposable']{constructor(_0x24da9e,_0x15ee3c,_0x3ab85a,_0x33a2b9,_0x4174f9,_0x72fc71,_0x491783,_0x26bb78,_0x2f9e75,_0x25188d){const _0x141462=_0x3f251d;super(),this[_0x141462(0x1cb)]=_0x24da9e,this['_univerInstanceService']=_0x15ee3c,this[_0x141462(0x240)]=_0x3ab85a,this['_commandService']=_0x33a2b9,this[_0x141462(0x1de)]=_0x4174f9,this['_permissionService']=_0x72fc71,this[_0x141462(0x2ba)]=_0x491783,this[_0x141462(0x23e)]=_0x26bb78,this[_0x141462(0x255)]=_0x2f9e75,this[_0x141462(0x1c8)]=_0x25188d,_defineProperty(this,_0x141462(0x260),new rxjs[(_0x141462(0x20e))](null)),_defineProperty(this,_0x141462(0x25e),this[_0x141462(0x260)][_0x141462(0x26e)]()),_defineProperty(this,_0x141462(0x1da),new _univerjs_core[(_0x141462(0x1fb))]()),_defineProperty(this,_0x141462(0x257),new Map()),_defineProperty(this,_0x141462(0x22e),null),this[_0x141462(0x2bd)]();}get[_0x3f251d(0x2b6)](){const _0x4dc357=_0x3f251d;return this[_0x4dc357(0x260)][_0x4dc357(0x21a)];}[_0x3f251d(0x2bd)](){const _0x29197a=_0x3f251d;this[_0x29197a(0x256)](),this['_initPlugins']();}[_0x3f251d(0x256)](){const _0x855d05=_0x3f251d;var _0x20e7b0;const _0xd075bf=(_0x20e7b0=this[_0x855d05(0x240)][_0x855d05(0x206)](_0x855d05(0x2ca)))!==null&&_0x20e7b0!==void 0x0?_0x20e7b0:DEFAULT_UNIVER_CONTAINER_ID,_0x433376=document['getElementById'](_0xd075bf);if(!_0x433376)return;const _0x61c5c6=document[_0x855d05(0x269)](_0x855d05(0x287));_0x61c5c6['id']=UNIVER_HISTORY_CONTAINER_ID$1,_0x61c5c6[_0x855d05(0x1d5)][_0x855d05(0x20c)]=_0x855d05(0x205),_0x61c5c6['style'][_0x855d05(0x1c6)]=_0x855d05(0x23d),_0x61c5c6[_0x855d05(0x2cd)][_0x855d05(0x224)]='0',_0x61c5c6[_0x855d05(0x2cd)]['left']='0',_0x61c5c6[_0x855d05(0x2cd)][_0x855d05(0x27f)]=_0x855d05(0x27d),_0x61c5c6[_0x855d05(0x2cd)][_0x855d05(0x1f1)]=_0x855d05(0x27d),_0x61c5c6[_0x855d05(0x2cd)][_0x855d05(0x294)]='49',_0x61c5c6['style']['display']='none',_0x433376[_0x855d05(0x251)](_0x61c5c6);}[_0x3f251d(0x218)](){const _0x1dec27=_0x3f251d;[[_univerjs_engine_render['UniverRenderEnginePlugin']],[_univerjs_ui[_0x1dec27(0x1c9)],{'container':UNIVER_HISTORY_CONTAINER_ID$1,'header':!![],'toolbar':![],'footer':!![],'contextMenu':![],'override':[[_univerjs_ui[_0x1dec27(0x21e)],null]]}],[_univerjs_network[_0x1dec27(0x210)]],[_univerjs_drawing['UniverDrawingPlugin'],{'override':[[_univerjs_drawing[_0x1dec27(0x24c)],null]]}],[_univerjs_docs['UniverDocsPlugin'],{'hasScroll':![]}],[_univerjs_docs_ui[_0x1dec27(0x219)]],[_univerjs_sheets_numfmt['UniverSheetsNumfmtPlugin']],[_univerjs_sheets[_0x1dec27(0x27a)],{'notExecuteFormula':!![]}],[_univerjs_sheets_ui[_0x1dec27(0x1c2)]],[_univerjs_sheets_formula[_0x1dec27(0x1e5)]],[_univerjs_sheets_formula_ui[_0x1dec27(0x283)]],[_univerjs_pro_collaboration['UniverCollaborationPlugin']],[_univerjs_sheets_filter[_0x1dec27(0x237)]],[_univerjs_sheets_conditional_formatting[_0x1dec27(0x263)]],[_univerjs_sheets_hyper_link[_0x1dec27(0x1f3)]],[_univerjs_sheets_hyper_link_ui['UniverSheetsHyperLinkUIPlugin']],[_univerjs_data_validation[_0x1dec27(0x1e2)]],[_univerjs_sheets_data_validation['UniverSheetsDataValidationPlugin']],[_univerjs_sheets_data_validation_ui[_0x1dec27(0x2ad)]],[_univerjs_engine_formula['UniverFormulaEnginePlugin'],{'notExecuteFormula':!![]}],[_univerjs_drawing_ui[_0x1dec27(0x284)]],[_univerjs_sheets_drawing[_0x1dec27(0x29e)]],[_univerjs_sheets_drawing_ui['UniverSheetsDrawingUIPlugin']],[_univerjs_pro_sheets_sparkline['UniverSheetSparklinePlugin']],[_univerjs_pro_sheets_sparkline_ui['UniverSheetSparklineUIPlugin']],[_univerjs_pro_sheets_chart[_0x1dec27(0x2d0)]],[_univerjs_pro_sheets_chart_ui[_0x1dec27(0x22f)]],[_univerjs_pro_sheets_shape[_0x1dec27(0x26d)]],[_univerjs_pro_sheets_shape_ui['UniverSheetsShapeUIPlugin']],[_univerjs_pro_sheets_pivot[_0x1dec27(0x1f5)],{'notExecuteFormula':!![]}],[_univerjs_sheets_table['UniverSheetsTablePlugin']]][_0x1dec27(0x2b8)](([_0x4f5c82,_0x10f10c])=>this[_0x1dec27(0x2a2)](_0x4f5c82,_0x10f10c));}['dispose'](){const _0x8471c2=_0x3f251d;super[_0x8471c2(0x2cf)](),this[_0x8471c2(0x203)](),this[_0x8471c2(0x257)][_0x8471c2(0x1fc)]();}[_0x3f251d(0x2a2)](_0x515217,_0x32b5d1,_0x5bdf52){const _0x3800af=_0x3f251d;if(this['_pluginMap'][_0x3800af(0x281)](_0x515217['pluginName'])&&!_0x5bdf52)throw new Error('[MobileHistoryLoaderService]:\x20Plugin\x20'+_0x515217['pluginName']+'\x20has\x20been\x20registered.');this[_0x3800af(0x257)][_0x3800af(0x2b5)](_0x515217[_0x3800af(0x20a)],[_0x515217,_0x32b5d1]);}['getAllPlugins'](){const _0x2611e7=_0x3f251d;return Array[_0x2611e7(0x2bb)](this[_0x2611e7(0x257)][_0x2611e7(0x28b)]());}['mountHistoryContent'](_0x9fb4d8,_0x5a553b){const _0x372e85=_0x3f251d,_0x28ccfd=document[_0x372e85(0x2c4)](UNIVER_HISTORY_CONTAINER_ID$1);if(!_0x28ccfd)return;_0x28ccfd['style']['display']=_0x372e85(0x2a4),this[_0x372e85(0x2c9)](_0x9fb4d8,UNIVER_HISTORY_CONTAINER_ID$1,_0x5a553b);}[_0x3f251d(0x203)](){const _0x1db5d9=_0x3f251d;var _0x32b8fa;this[_0x1db5d9(0x1da)][_0x1db5d9(0x2cf)](),(_0x32b8fa=this[_0x1db5d9(0x2b6)])===null||_0x32b8fa===void 0x0||_0x32b8fa[_0x1db5d9(0x2cf)](),this['_historyUniver$'][_0x1db5d9(0x1e0)](null);const _0x3ddeec=document['getElementById'](UNIVER_HISTORY_CONTAINER_ID$1);if(!_0x3ddeec)return;_0x3ddeec[_0x1db5d9(0x2cd)]['display']=_0x1db5d9(0x293),this[_0x1db5d9(0x22e)]&&(this['_internalWebWorker'][_0x1db5d9(0x21c)](),this[_0x1db5d9(0x22e)]=null);}['_initUniver'](_0x4fa07d,_0x2a6200,_0x5c973a){const _0x212584=_0x3f251d;var _0x2a76d3,_0x250410,_0x29fb25,_0x538850;if(this[_0x212584(0x2b6)])return;const _0x4aed33=new _univerjs_core['Univer']({'locales':{[this['_localeService'][_0x212584(0x282)]()]:this[_0x212584(0x1cb)][_0x212584(0x20b)]()},'override':[[_univerjs_core[_0x212584(0x22d)],{'useClass':_univerjs_pro_collaboration_client[_0x212584(0x298)]}]]}),_0x3c98f8=_0x4aed33[_0x212584(0x295)]();this[_0x212584(0x236)](this[_0x212584(0x1c8)][_0x212584(0x2cb)][_0x212584(0x1d2)](_0x3de66c=>{const _0x36e196=_0x212584;_0x3c98f8[_0x36e196(0x2c3)](_univerjs_core[_0x36e196(0x200)])[_0x36e196(0x296)](_0x3de66c);})),this['disposeWithMe'](this[_0x212584(0x1c8)][_0x212584(0x29b)][_0x212584(0x1d2)](_0x34076e=>{const _0x582232=_0x212584;_0x3c98f8[_0x582232(0x2c3)](_univerjs_core[_0x582232(0x200)])[_0x582232(0x21d)](_0x34076e);})),_0x3c98f8['get'](_univerjs_core[_0x212584(0x1e1)])[_0x212584(0x285)](this[_0x212584(0x1cb)]['getCurrentLocale']()),_0x3c98f8['get'](_univerjs_core[_0x212584(0x299)])[_0x212584(0x214)](_univerjs_pro_collaboration_client[_0x212584(0x2a6)],this[_0x212584(0x240)][_0x212584(0x206)](_univerjs_pro_collaboration_client['COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY']));const _0x2611ed=this['_configService'][_0x212584(0x206)](_univerjs_pro_license[_0x212584(0x2d9)]);if(_0x2611ed)_0x4aed33[_0x212584(0x2a2)](_univerjs_pro_license[_0x212584(0x23c)],{'license':_0x2611ed['ls']});const _0x564c41=(_0x2a76d3=this['_configService'][_0x212584(0x206)](_0x212584(0x27c)))===null||_0x2a76d3===void 0x0?void 0x0:_0x2a76d3[_0x212584(0x20d)],_0xfffca6=!!_0x564c41;_0xfffca6&&(this[_0x212584(0x22e)]=_0x564c41 instanceof Worker?_0x564c41:null,_0x4aed33[_0x212584(0x2a2)](_univerjs_rpc[_0x212584(0x1c0)],{'workerURL':_0x564c41}));this[_0x212584(0x257)][_0x212584(0x2b8)](([_0x5c8fac,_0x263645])=>{const _0xd42071=_0x212584;_0x4aed33[_0xd42071(0x2a2)](_0x5c8fac,_0x263645);}),_0x4aed33[_0x212584(0x2a2)](_univerjs_pro_edit_history_viewer['UniverEditHistoryViewerMobilePlugin'],{'historyListServerUrl':(_0x250410=this[_0x212584(0x240)]['getConfig'](_0x212584(0x27c)))===null||_0x250410===void 0x0?void 0x0:_0x250410['historyListServerUrl'],'historyPanelComponentKey':(_0x29fb25=this['_configService'][_0x212584(0x206)](_0x212584(0x27c)))===null||_0x29fb25===void 0x0?void 0x0:_0x29fb25['historyPanelComponentKey'],'historyPanelHidden':(_0x538850=this[_0x212584(0x240)][_0x212584(0x206)](_0x212584(0x27c)))===null||_0x538850===void 0x0?void 0x0:_0x538850[_0x212584(0x267)]}),_0x3c98f8['invoke'](_0x29837d=>{const _0xe45e78=_0x212584;this[_0xe45e78(0x2da)](_0x29837d,_0x4fa07d);}),this['_historyUniver$']['next'](_0x4aed33);const _0x50a294=_0x3c98f8[_0x212584(0x2c3)](_univerjs_pro_edit_history_viewer['HistoryManagerService']),_0x32fe40=this['_checkCanRevert'](_0x4fa07d),_0x4f6067=()=>{const _0x19d9e4=_0x212584;if(_0x5c973a)_0x50a294[_0x19d9e4(0x1e4)](_0x4fa07d,_0x2a6200,_0x32fe40,_0x5c973a);else _0x50a294[_0x19d9e4(0x1d3)](_0x4fa07d,_0x2a6200,_0x32fe40);};this['_messageService']['show']({'content':this[_0x212584(0x1cb)]['t']('editHistory.info.initializing'),'type':_univerjs_design['MessageType']['Loading']});if(_0xfffca6)try{_0x3c98f8[_0x212584(0x2c3)](_univerjs_rpc[_0x212584(0x21f)])[_0x212584(0x26c)]()[_0x212584(0x1c1)](()=>{_0x4f6067();});}catch{_0x4f6067();}else _0x4f6067();}[_0x3f251d(0x2da)](_0xa3ab38,_0x32d61e){const _0x42d5ad=_0x3f251d,_0x59cda7=_0xa3ab38[_0x42d5ad(0x2c3)](_univerjs_pro_edit_history_viewer[_0x42d5ad(0x1be)]);this[_0x42d5ad(0x1da)][_0x42d5ad(0x28c)](_0x59cda7[_0x42d5ad(0x261)][_0x42d5ad(0x1d2)](_0x4ef064=>{const _0x3af5f7=_0x42d5ad;switch(_0x4ef064){case _univerjs_pro_edit_history_viewer[_0x3af5f7(0x1e6)][_0x3af5f7(0x1ee)]:this[_0x3af5f7(0x23e)][_0x3af5f7(0x276)](),this[_0x3af5f7(0x255)][_0x3af5f7(0x231)]();break;case _univerjs_pro_edit_history_viewer[_0x3af5f7(0x1e6)][_0x3af5f7(0x220)]:this[_0x3af5f7(0x209)][_0x3af5f7(0x2d8)](ExitEditHistoryOperation['id']),this[_0x3af5f7(0x203)]();break;case _univerjs_pro_edit_history_viewer[_0x3af5f7(0x1e6)][_0x3af5f7(0x21b)]:this[_0x3af5f7(0x203)](),this[_0x3af5f7(0x1de)][_0x3af5f7(0x290)]({'content':this[_0x3af5f7(0x1cb)]['t'](_0x3af5f7(0x25d)),'type':_univerjs_design[_0x3af5f7(0x1bd)][_0x3af5f7(0x21b)],'duration':0xbb8});break;default:break;}})),this[_0x42d5ad(0x1da)]['add'](_0x59cda7[_0x42d5ad(0x234)][_0x42d5ad(0x1d2)](async _0x12d4d5=>{const _0x363f32=_0x42d5ad;if(_0x12d4d5)this[_0x363f32(0x209)]['executeCommand'](_univerjs_pro_collaboration[_0x363f32(0x2d6)]['id'],{'unitId':_0x32d61e,'revision':_0x12d4d5});}));}['_checkCanRevert'](_0x5007eb){const _0x1ffdf2=_0x3f251d,_0x4b2686=this['_univerInstanceService'][_0x1ffdf2(0x259)](_0x5007eb)[_0x1ffdf2(0x238)]()['map'](_0x37d0eb=>_0x37d0eb[_0x1ffdf2(0x26a)]()),_0x84835f=new _univerjs_sheets[(_0x1ffdf2(0x1ef))](_0x5007eb)['id'],_0xb0587=_0x4b2686[_0x1ffdf2(0x297)](_0x2ef764=>new _univerjs_sheets[(_0x1ffdf2(0x1f2))](_0x5007eb,_0x2ef764)['id']),_0x2cd20c=_0x4b2686[_0x1ffdf2(0x297)](_0xe04bdb=>this[_0x1ffdf2(0x2ba)][_0x1ffdf2(0x216)](_0x5007eb,_0xe04bdb)[_0x1ffdf2(0x297)](_0x4f3ccf=>new _univerjs_sheets['RangeProtectionPermissionEditPoint'](_0x5007eb,_0xe04bdb,_0x4f3ccf[_0x1ffdf2(0x277)])['id']))['flat'](),_0x5096e5=new _univerjs_sheets[(_0x1ffdf2(0x2af))](_0x5007eb)['id'];return this[_0x1ffdf2(0x2cc)][_0x1ffdf2(0x24f)]([_0x84835f,..._0xb0587,..._0x2cd20c,_0x5096e5])[_0x1ffdf2(0x235)](_0x55e40f=>!!_0x55e40f['value']);}};function _0x1af9(_0x452184,_0x1724c2){_0x452184=_0x452184-0x1bc;const _0x246a4c=_0x246a();let _0x1af9a6=_0x246a4c[_0x452184];return _0x1af9a6;}MobileHistoryLoaderService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x3f251d(0x26f)])(_univerjs_core[_0x3f251d(0x1e1)])),__decorateParam(0x1,_univerjs_core[_0x3f251d(0x2c5)]),__decorateParam(0x2,_univerjs_core['IConfigService']),__decorateParam(0x3,_univerjs_core[_0x3f251d(0x1d7)]),__decorateParam(0x4,_univerjs_ui[_0x3f251d(0x253)]),__decorateParam(0x5,_univerjs_core[_0x3f251d(0x1d4)]),__decorateParam(0x6,(0x0,_univerjs_core['Inject'])(_univerjs_sheets[_0x3f251d(0x2c7)])),__decorateParam(0x7,(0x0,_univerjs_core[_0x3f251d(0x26f)])(_univerjs_ui[_0x3f251d(0x21e)])),__decorateParam(0x8,(0x0,_univerjs_core[_0x3f251d(0x26f)])(_univerjs_ui['ISidebarService'])),__decorateParam(0x9,(0x0,_univerjs_core[_0x3f251d(0x26f)])(_univerjs_core[_0x3f251d(0x200)]))],MobileHistoryLoaderService);function _0x246a(){const _0x3eb9b0=['UniverSheetsChartUIPlugin','getUnitId','close','object','unsubscribe','revertRevision$','every','disposeWithMe','UniverSheetsFilterPlugin','getSheets','univer.operation.exit-edit-history','getMenuHiddenObservable','DataLoaderService','UniverLicensePlugin','absolute','_dialogService','display','_configService','_updateURLWithCurrentState','combineLatest','urlChange$','176476KYSheE','onSteady','length','HistoryIcon','CollaborationController','univer-container','decorate','UNIVER_CONTAINER_ID_KEY','IImageIoService','iterator','menu','composePermission','subunit','appendChild','function','IMessageService','ISidebarService','_sidebarService','_initContainer','_pluginMap','getParam','getUnit','UniverSheetsDataValidationUIPlugin','Workbook','_historyManagerService','editHistory.panel.listFetchError','historyUniver$','data','_historyUniver$','status$','UNIVER_HISTORY_CONTAINER_ID','UniverSheetsConditionalFormattingPlugin','CHANGESET_ACK','_urlService','CollaborationStatus','historyPanelHidden','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','createElement','getSheetId','call','whenReady','UniverSheetsShapePlugin','asObservable','Inject','\x20has\x20been\x20registered.','RangeProtectionPermissionEditPoint','state$','UniverFormulaEnginePlugin','mergeMenu','_injector','closeAll','permissionId','1466295yOfZxo','OPERATION','UniverSheetsPlugin','string','edit-history-loader.config','100%','getCurrentRangeDisable$','width','constructor','has','getCurrentLocale','UniverSheetsFormulaUIPlugin','UniverDrawingUIPlugin','setLocale','_componentManager','div','location','MenuItemType','Loading','values','add','univerContainerId','CommandType','fromCollab','show','RxDisposable','version','none','zIndex','__getInjector','setDarkMode','map','AuthzIoHttpService','IConfigService','getCollabEntity','currentTheme$','UniverSheetsShapeUIPlugin','IURLService','UniverSheetsDrawingPlugin','UniverSheetsUIPlugin','ToggleEditHistoryOperation','event$','registerPlugin','default','block','editHistory.panel.title','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','WorkbookViewHistoryPermission','UNIVER_SHEET','Plugin','SYNCED','getCurrentUnitOfType','univer-history-container','UniverSheetsDataValidationMobileUIPlugin','IMenuManagerService','WorkbookRecoverHistoryPermission','UniverSheetsTablePlugin','packageName','session','_config','eventID','set','historyUniver','ILocalCacheService','forEach','UniverSheetsNumfmtPlugin','_selectionProtectionRuleModel','from','mountHistoryContent','_init','onCommandExecuted','univer.operation.toggle-edit-history','onStarting','invoke','UniverEditHistoryLoaderPlugin','get','getElementById','IUniverInstanceService','[HistoryLoaderService]:\x20Plugin\x20','RangeProtectionRuleModel','UniverInstanceType','_initUniver','UNIVER_CONTAINER_ID','darkMode$','_permissionService','style','editHistory.panel.reverting','dispose','UniverSheetsChartPlugin','_checkCanRevert','left','getUnhiddenWorksheets','getAllPlugins','mutations','RevertRevisionMutation','prototype','executeCommand','LS_CONFIG_KEY','_initListener','editHistory.panel.revertFailed','MessageType','HistoryManagerService','activeSheet$','UniverRPCMainThreadPlugin','then','UniverSheetsMobileUIPlugin','UNIVER_UNKNOWN','setParam','_setupSubUnitSync','position','UniverSheetsConditionalFormattingUIPlugin','_themeService','UniverMobileUIPlugin','DependentOn','_localeService','defineProperty','1736394XmgMnR','takeUntil','historyListServerUrl','EDIT_HISTORY_LOADER_PLUGIN_CONFIG_KEY','_handleRevertAcknowledgement','subscribe','triggerLoadVersions','IPermissionService','dataset','getSheetBySheetId','ICommandService','MobileHistoryLoaderService','params','_disposableCollection','1pUFauA','UniverDocsPlugin','UniverSheetSparklineUIPlugin','_messageService','disposeUnit','next','LocaleService','UniverDataValidationPlugin','_updateSubUnitFromURLParams','triggerCustomVersions','UniverSheetsFormulaPlugin','HistoryModeStatus','_menuManagerService','_localCacheService','flat','SetWorksheetActivateCommand','symbol','univer-history-container-mobile','UniverSheetsDrawingUIPlugin','Entered','WorkbookEditablePermission','UniverSheetSparklinePlugin','height','WorksheetEditPermission','UniverSheetsHyperLinkPlugin','loadUnit','UniverSheetsPivotTablePlugin','registerCommand','removeAll','Injector','toStringTag','4965966TwqRwL','DisposableCollection','clear','5088958MkjEmb','toPrimitive','1264735XmzIsm','ThemeService','Module','getSheetCommandTarget','unMountHistoryContent','status','history-container','getConfig','_collaborationController','_dataLoaderService','_commandService','pluginName','getLocales','uComp','workerURL','BehaviorSubject','_univerInstanceService','UniverNetworkPlugin','OTHERS','ComponentManager','type','setConfig','dispose$','getSubunitRuleList','some','_initPlugins','UniverDocsUIPlugin','value','Error','terminate','setTheme','IDialogService','IRemoteInstanceService','Exited','register','getActiveSheet','UniverUIPlugin','top','pipe','historyAIassistantEnabled','355256HuvPTn','UniverSheetsHyperLinkUIPlugin','exhaustSavingTask','0.21.1','RibbonStartGroup','_revertErrorTimer','IAuthzIoService','_internalWebWorker'];_0x246a=function(){return _0x3eb9b0;};return _0x246a();}let UniverEditHistoryLoaderMobilePlugin=class UniverEditHistoryLoaderMobilePlugin extends _univerjs_core[_0x3f251d(0x2a9)]{constructor(_0x241346=defaultPluginConfig,_0x2b82f9,_0x370c2e){const _0x436de7=_0x3f251d;super(),this[_0x436de7(0x2b3)]=_0x241346,this[_0x436de7(0x275)]=_0x2b82f9,this[_0x436de7(0x240)]=_0x370c2e;const {menu:_0x4b9b13,..._0x46f381}=(0x0,_univerjs_core['merge'])({},defaultPluginConfig,this['_config']);if(_0x4b9b13)this[_0x436de7(0x240)][_0x436de7(0x214)](_0x436de7(0x24e),_0x4b9b13,{'merge':!![]});this['_configService'][_0x436de7(0x214)](EDIT_HISTORY_LOADER_PLUGIN_CONFIG_KEY,_0x46f381);if(this[_0x436de7(0x2b3)][_0x436de7(0x28d)])this[_0x436de7(0x240)][_0x436de7(0x214)](UNIVER_CONTAINER_ID_KEY$1,this[_0x436de7(0x2b3)]['univerContainerId']);}[_0x3f251d(0x2c0)](){const _0x2511d4=_0x3f251d;[[HistoryLoaderService,{'useClass':MobileHistoryLoaderService}],[MobileHistoryLoaderController]]['forEach'](_0x168184=>this[_0x2511d4(0x275)][_0x2511d4(0x28c)](_0x168184));}[_0x3f251d(0x245)](){const _0x58b608=_0x3f251d;this[_0x58b608(0x275)]['get'](MobileHistoryLoaderController);}};_defineProperty(UniverEditHistoryLoaderMobilePlugin,_0x3f251d(0x213),_univerjs_core[_0x3f251d(0x2c8)][_0x3f251d(0x1c3)]),_defineProperty(UniverEditHistoryLoaderMobilePlugin,_0x3f251d(0x20a),'UNIVER_EDIT_HISTORY_LOADER_MOBILE_PLUGIN'),_defineProperty(UniverEditHistoryLoaderMobilePlugin,_0x3f251d(0x2b1),name),_defineProperty(UniverEditHistoryLoaderMobilePlugin,_0x3f251d(0x292),version),UniverEditHistoryLoaderMobilePlugin=__decorate([(0x0,_univerjs_core[_0x3f251d(0x1ca)])(_univerjs_pro_license['UniverLicensePlugin']),__decorateParam(0x1,(0x0,_univerjs_core[_0x3f251d(0x26f)])(_univerjs_core['Injector'])),__decorateParam(0x2,_univerjs_core[_0x3f251d(0x299)])],UniverEditHistoryLoaderMobilePlugin);let HistoryLoaderController=class HistoryLoaderController extends _univerjs_core[_0x3f251d(0x291)]{constructor(_0x321c73,_0x5ab28b,_0x4877cf,_0x3cce21,_0x597a0c,_0x515aa5,_0x13db0b,_0x44c38a,_0xeff47b,_0x3d84ae,_0x2e27f6){const _0x58ebdf=_0x3f251d;super(),this['_commandService']=_0x321c73,this[_0x58ebdf(0x1e7)]=_0x5ab28b,this[_0x58ebdf(0x286)]=_0x4877cf,this['_historyManagerService']=_0x3cce21,this[_0x58ebdf(0x1cb)]=_0x597a0c,this[_0x58ebdf(0x1de)]=_0x515aa5,this[_0x58ebdf(0x207)]=_0x13db0b,this[_0x58ebdf(0x1e8)]=_0x44c38a,this[_0x58ebdf(0x208)]=_0xeff47b,this[_0x58ebdf(0x20f)]=_0x3d84ae,this[_0x58ebdf(0x265)]=_0x2e27f6,_defineProperty(this,_0x58ebdf(0x22c),null),this[_0x58ebdf(0x2bd)]();}[_0x3f251d(0x2bd)](){const _0x5cc157=_0x3f251d;[ToggleEditHistoryOperation,ExitEditHistoryOperation][_0x5cc157(0x2b8)](_0x28ac8a=>this[_0x5cc157(0x236)]((0x0,_univerjs_core['toDisposable'])(this[_0x5cc157(0x209)][_0x5cc157(0x1f6)](_0x28ac8a)))),this['disposeWithMe'](this[_0x5cc157(0x286)][_0x5cc157(0x221)](_0x5cc157(0x247),_univerjs_icons[_0x5cc157(0x247)])),this['_menuManagerService'][_0x5cc157(0x274)](menuSchema),this['disposeWithMe'](this[_0x5cc157(0x209)]['onCommandExecuted'](async(_0x3dd932,_0x36bdf1)=>{const _0x3e6a68=_0x5cc157;if(_0x3dd932['id']===_univerjs_pro_collaboration[_0x3e6a68(0x2d6)]['id']){const {unitId:_0x3a36f9}=_0x3dd932['params'];this[_0x3e6a68(0x1de)]['show']({'content':this[_0x3e6a68(0x1cb)]['t'](_0x3e6a68(0x2ce)),'type':_univerjs_design[_0x3e6a68(0x1bd)][_0x3e6a68(0x28a)],'duration':0x1388});const _0x43d73d=this[_0x3e6a68(0x207)]['getCollabEntity'](_0x3a36f9);if(!(_0x36bdf1===null||_0x36bdf1===void 0x0?void 0x0:_0x36bdf1[_0x3e6a68(0x28f)]))this[_0x3e6a68(0x1d1)](_0x43d73d,async()=>{const _0x6859ae=_0x3e6a68,_0x2a5f4=this[_0x6859ae(0x20f)][_0x6859ae(0x2ab)](_univerjs_core[_0x6859ae(0x2c8)][_0x6859ae(0x2a8)]),_0x314da6=_0x2a5f4===null||_0x2a5f4===void 0x0?void 0x0:_0x2a5f4['getActiveSheet']();if(!_0x314da6)return![];this[_0x6859ae(0x20f)][_0x6859ae(0x1df)](_0x3a36f9);const _0x2daddd=await this[_0x6859ae(0x208)][_0x6859ae(0x1f4)](_0x3a36f9,_univerjs_core['UniverInstanceType'][_0x6859ae(0x2a8)]);if(_0x2daddd&&_0x2daddd instanceof _univerjs_core[_0x6859ae(0x25b)])return await this[_0x6859ae(0x1c5)](_0x2daddd,_0x314da6[_0x6859ae(0x26a)]()),!![];return![];});else this[_0x3e6a68(0x1d1)](_0x43d73d,async()=>{const _0x461eb0=_0x3e6a68;return setTimeout(()=>window[_0x461eb0(0x288)]['reload']()),!![];},!![]);}}));}[_0x3f251d(0x1d1)](_0x49066b,_0x4203d3,_0x431f57=![]){const _0x56e045=_0x3f251d,_0x30d1a7=(0x0,rxjs[_0x56e045(0x242)])([_0x49066b[_0x56e045(0x2b2)]['event$'],_0x49066b[_0x56e045(0x272)]])[_0x56e045(0x1d2)](async([_0x148529,_0x215d25])=>{const _0x345566=_0x56e045;if(_0x148529[_0x345566(0x2b4)]===_univerjs_pro_collaboration['CollaborationEvent'][_0x345566(0x264)]&&(_0x215d25===null||_0x215d25===void 0x0?void 0x0:_0x215d25[_0x345566(0x204)])===_univerjs_pro_collaboration_client[_0x345566(0x266)][_0x345566(0x2aa)]){if(_0x148529[_0x345566(0x25f)]['mutations'][_0x345566(0x217)](_0x4fe6b7=>_0x4fe6b7['id']===_univerjs_pro_collaboration[_0x345566(0x2d6)]['id'])){if(await _0x4203d3()){var _0x3d29a6;this[_0x345566(0x25c)][_0x345566(0x203)](),_0x30d1a7[_0x345566(0x233)](),this['_revertErrorTimer']&&clearTimeout(this[_0x345566(0x22c)]),await((_0x3d29a6=this[_0x345566(0x1e8)])===null||_0x3d29a6===void 0x0?void 0x0:_0x3d29a6[_0x345566(0x229)]());}}}});if(_0x431f57)this['_revertErrorTimer']=setTimeout(()=>{const _0x537d12=_0x56e045;_0x30d1a7['unsubscribe'](),this[_0x537d12(0x1de)][_0x537d12(0x290)]({'content':this[_0x537d12(0x1cb)]['t'](_0x537d12(0x1bc)),'type':_univerjs_design[_0x537d12(0x1bd)][_0x537d12(0x21b)],'duration':0xbb8});},0x1388);}async[_0x3f251d(0x1c5)](_0x3fdb4c,_0x2e1059){const _0x1c7773=_0x3f251d;await this[_0x1c7773(0x1e3)](_0x3fdb4c,_0x2e1059),_0x3fdb4c[_0x1c7773(0x1bf)]['pipe']((0x0,rxjs[_0x1c7773(0x1ce)])(this[_0x1c7773(0x215)]))[_0x1c7773(0x1d2)](_0x865a0c=>{const _0x43d17a=_0x1c7773;if(_0x865a0c)this[_0x43d17a(0x241)](_0x865a0c);}),this['_urlService'][_0x1c7773(0x243)][_0x1c7773(0x225)]((0x0,rxjs['takeUntil'])(this[_0x1c7773(0x215)]))['subscribe'](()=>this['_updateSubUnitFromURLParams'](_0x3fdb4c,_0x2e1059));}[_0x3f251d(0x241)](_0x51a1e7,_0x21f885=![]){const _0x3a71d7=_0x3f251d,_0x244c01=this[_0x3a71d7(0x265)][_0x3a71d7(0x258)](_0x3a71d7(0x250));if(_0x51a1e7['getSheetId']()!==_0x244c01)this['_urlService'][_0x3a71d7(0x1c4)]('subunit',_0x51a1e7[_0x3a71d7(0x26a)](),_0x21f885);}async['_updateSubUnitFromURLParams'](_0x91e9b1,_0xa730b1){const _0x318d88=_0x3f251d;var _0x58f48f;if(!_0xa730b1||!_0x91e9b1['getSheetBySheetId'](_0xa730b1)){const _0x503330=_0x91e9b1[_0x318d88(0x2d3)]()[0x0],_0x41c1d1=_0x91e9b1[_0x318d88(0x1d6)](_0x503330);if(!_0x41c1d1)return;this[_0x318d88(0x241)](_0x41c1d1,!![]),await this[_0x318d88(0x209)][_0x318d88(0x2d8)](_univerjs_sheets[_0x318d88(0x1ea)]['id'],{'unitId':_0x91e9b1['getUnitId'](),'subUnitId':_0x503330});return;}if(((_0x58f48f=_0x91e9b1[_0x318d88(0x222)]())===null||_0x58f48f===void 0x0?void 0x0:_0x58f48f[_0x318d88(0x26a)]())===_0xa730b1)return;await this[_0x318d88(0x209)][_0x318d88(0x2d8)](_univerjs_sheets[_0x318d88(0x1ea)]['id'],{'unitId':_0x91e9b1[_0x318d88(0x230)](),'subUnitId':_0xa730b1});}};HistoryLoaderController=__decorate([__decorateParam(0x0,_univerjs_core[_0x3f251d(0x1d7)]),__decorateParam(0x1,_univerjs_ui['IMenuManagerService']),__decorateParam(0x2,(0x0,_univerjs_core[_0x3f251d(0x26f)])(_univerjs_ui[_0x3f251d(0x212)])),__decorateParam(0x3,(0x0,_univerjs_core[_0x3f251d(0x26f)])(HistoryLoaderService)),__decorateParam(0x4,(0x0,_univerjs_core['Inject'])(_univerjs_core[_0x3f251d(0x1e1)])),__decorateParam(0x5,_univerjs_ui[_0x3f251d(0x253)]),__decorateParam(0x6,(0x0,_univerjs_core['Inject'])(_univerjs_pro_collaboration_client[_0x3f251d(0x248)])),__decorateParam(0x7,_univerjs_pro_collaboration_client[_0x3f251d(0x2b7)]),__decorateParam(0x8,(0x0,_univerjs_core[_0x3f251d(0x26f)])(_univerjs_pro_collaboration_client[_0x3f251d(0x23b)])),__decorateParam(0x9,_univerjs_core[_0x3f251d(0x2c5)]),__decorateParam(0xa,_univerjs_pro_collaboration_client_ui[_0x3f251d(0x29d)])],HistoryLoaderController);let UniverEditHistoryLoaderPlugin=class UniverEditHistoryLoaderPlugin extends _univerjs_core['Plugin']{constructor(_0x4f1338=defaultPluginConfig,_0x4bedc2,_0x211456){const _0x2d0f14=_0x3f251d;super(),this[_0x2d0f14(0x2b3)]=_0x4f1338,this[_0x2d0f14(0x275)]=_0x4bedc2,this[_0x2d0f14(0x240)]=_0x211456;const {menu:_0x370bb4,..._0x3162a5}=(0x0,_univerjs_core['merge'])({},defaultPluginConfig,this[_0x2d0f14(0x2b3)]);if(_0x370bb4)this[_0x2d0f14(0x240)][_0x2d0f14(0x214)]('menu',_0x370bb4,{'merge':!![]});this[_0x2d0f14(0x240)]['setConfig'](EDIT_HISTORY_LOADER_PLUGIN_CONFIG_KEY,_0x3162a5);if(this[_0x2d0f14(0x2b3)][_0x2d0f14(0x28d)])this[_0x2d0f14(0x240)][_0x2d0f14(0x214)](UNIVER_CONTAINER_ID_KEY,this[_0x2d0f14(0x2b3)][_0x2d0f14(0x28d)]);}[_0x3f251d(0x2c0)](){const _0x4b045a=_0x3f251d;[[HistoryLoaderService],[HistoryLoaderController]][_0x4b045a(0x2b8)](_0x3c1b22=>this[_0x4b045a(0x275)]['add'](_0x3c1b22));}[_0x3f251d(0x245)](){const _0x42d498=_0x3f251d;this[_0x42d498(0x275)]['get'](HistoryLoaderController);}};_defineProperty(UniverEditHistoryLoaderPlugin,_0x3f251d(0x213),_univerjs_core[_0x3f251d(0x2c8)][_0x3f251d(0x1c3)]),_defineProperty(UniverEditHistoryLoaderPlugin,_0x3f251d(0x20a),'UNIVER_EDIT_HISTORY_LOADER_PLUGIN'),_defineProperty(UniverEditHistoryLoaderPlugin,_0x3f251d(0x2b1),name),_defineProperty(UniverEditHistoryLoaderPlugin,_0x3f251d(0x292),version),UniverEditHistoryLoaderPlugin=__decorate([(0x0,_univerjs_core[_0x3f251d(0x1ca)])(_univerjs_pro_license[_0x3f251d(0x23c)]),__decorateParam(0x1,(0x0,_univerjs_core[_0x3f251d(0x26f)])(_univerjs_core[_0x3f251d(0x1f8)])),__decorateParam(0x2,_univerjs_core[_0x3f251d(0x299)])],UniverEditHistoryLoaderPlugin),exports[_0x3f251d(0x1d0)]=EDIT_HISTORY_LOADER_PLUGIN_CONFIG_KEY,Object['defineProperty'](exports,'HistoryLoaderService',{'enumerable':!![],'get':function(){return HistoryLoaderService;}}),Object[_0x3f251d(0x1cc)](exports,_0x3f251d(0x1d8),{'enumerable':!![],'get':function(){return MobileHistoryLoaderService;}}),exports[_0x3f251d(0x2a0)]=ToggleEditHistoryOperation,exports[_0x3f251d(0x24b)]=UNIVER_CONTAINER_ID_KEY,exports[_0x3f251d(0x262)]=UNIVER_HISTORY_CONTAINER_ID,Object[_0x3f251d(0x1cc)](exports,'UniverEditHistoryLoaderMobilePlugin',{'enumerable':!![],'get':function(){return UniverEditHistoryLoaderMobilePlugin;}}),Object[_0x3f251d(0x1cc)](exports,_0x3f251d(0x2c2),{'enumerable':!![],'get':function(){return UniverEditHistoryLoaderPlugin;}});
|
|
1
|
+
const _0x55348f=_0x4be3;(function(_0x40cdda,_0x38c92e){const _0x3f5b7e=_0x4be3,_0x5c9d40=_0x40cdda();while(!![]){try{const _0xc85bc9=parseInt(_0x3f5b7e(0x1dd))/0x1*(-parseInt(_0x3f5b7e(0x19c))/0x2)+parseInt(_0x3f5b7e(0x103))/0x3*(-parseInt(_0x3f5b7e(0x1a2))/0x4)+-parseInt(_0x3f5b7e(0xf2))/0x5*(parseInt(_0x3f5b7e(0x197))/0x6)+-parseInt(_0x3f5b7e(0x14e))/0x7*(parseInt(_0x3f5b7e(0x1aa))/0x8)+-parseInt(_0x3f5b7e(0x17d))/0x9*(-parseInt(_0x3f5b7e(0x121))/0xa)+-parseInt(_0x3f5b7e(0xdb))/0xb*(parseInt(_0x3f5b7e(0x159))/0xc)+parseInt(_0x3f5b7e(0x1c1))/0xd*(parseInt(_0x3f5b7e(0x14d))/0xe);if(_0xc85bc9===_0x38c92e)break;else _0x5c9d40['push'](_0x5c9d40['shift']());}catch(_0x4153aa){_0x5c9d40['push'](_0x5c9d40['shift']());}}}(_0x2db9,0xee3c8),Object[_0x55348f(0x140)](exports,Symbol[_0x55348f(0x10f)],{'value':_0x55348f(0x1c0)}));let _univerjs_core=require('@univerjs/core'),_univerjs_sheets=require('@univerjs/sheets'),_univerjs_pro_collaboration=require('@univerjs-pro/collaboration'),_univerjs_pro_collaboration_client=require('@univerjs-pro/collaboration-client'),_univerjs_pro_edit_history_viewer=require('@univerjs-pro/edit-history-viewer'),_univerjs_pro_license=require('@univerjs-pro/license'),_univerjs_pro_sheets_chart=require('@univerjs-pro/sheets-chart'),_univerjs_pro_sheets_chart_ui=require('@univerjs-pro/sheets-chart-ui'),_univerjs_pro_sheets_pivot=require('@univerjs-pro/sheets-pivot'),_univerjs_pro_sheets_shape=require('@univerjs-pro/sheets-shape'),_univerjs_pro_sheets_shape_ui=require('@univerjs-pro/sheets-shape-ui'),_univerjs_pro_sheets_sparkline=require('@univerjs-pro/sheets-sparkline'),_univerjs_pro_sheets_sparkline_ui=require('@univerjs-pro/sheets-sparkline-ui'),_univerjs_data_validation=require('@univerjs/data-validation'),_univerjs_design=require('@univerjs/design'),_univerjs_docs=require('@univerjs/docs'),_univerjs_docs_ui=require('@univerjs/docs-ui'),_univerjs_drawing=require('@univerjs/drawing'),_univerjs_drawing_ui=require('@univerjs/drawing-ui'),_univerjs_engine_formula=require('@univerjs/engine-formula'),_univerjs_engine_render=require('@univerjs/engine-render'),_univerjs_network=require('@univerjs/network'),_univerjs_rpc=require('@univerjs/rpc'),_univerjs_sheets_conditional_formatting=require('@univerjs/sheets-conditional-formatting'),_univerjs_sheets_conditional_formatting_ui=require('@univerjs/sheets-conditional-formatting-ui'),_univerjs_sheets_data_validation=require('@univerjs/sheets-data-validation'),_univerjs_sheets_data_validation_ui=require('@univerjs/sheets-data-validation-ui'),_univerjs_sheets_drawing=require('@univerjs/sheets-drawing'),_univerjs_sheets_drawing_ui=require('@univerjs/sheets-drawing-ui'),_univerjs_sheets_filter=require('@univerjs/sheets-filter'),_univerjs_sheets_filter_ui=require('@univerjs/sheets-filter-ui'),_univerjs_sheets_formula=require('@univerjs/sheets-formula'),_univerjs_sheets_formula_ui=require('@univerjs/sheets-formula-ui'),_univerjs_sheets_hyper_link=require('@univerjs/sheets-hyper-link'),_univerjs_sheets_hyper_link_ui=require('@univerjs/sheets-hyper-link-ui'),_univerjs_sheets_numfmt=require('@univerjs/sheets-numfmt'),_univerjs_sheets_table=require('@univerjs/sheets-table'),_univerjs_sheets_ui=require('@univerjs/sheets-ui'),_univerjs_ui=require('@univerjs/ui'),rxjs=require('rxjs'),_univerjs_pro_collaboration_client_ui=require('@univerjs-pro/collaboration-client-ui'),_univerjs_icons=require('@univerjs/icons');const EDIT_HISTORY_LOADER_PLUGIN_CONFIG_KEY='edit-history-loader.config',configSymbol=Symbol(EDIT_HISTORY_LOADER_PLUGIN_CONFIG_KEY),defaultPluginConfig={};function _typeof(_0xbddf46){'@babel/helpers - typeof';const _0x2fb445=_0x55348f;return _typeof=_0x2fb445(0x1b4)==typeof Symbol&&_0x2fb445(0xed)==typeof Symbol[_0x2fb445(0x1b5)]?function(_0x2ff772){return typeof _0x2ff772;}:function(_0xf7c876){const _0x37edae=_0x2fb445;return _0xf7c876&&'function'==typeof Symbol&&_0xf7c876[_0x37edae(0x15d)]===Symbol&&_0xf7c876!==Symbol[_0x37edae(0x104)]?_0x37edae(0xed):typeof _0xf7c876;},_typeof(_0xbddf46);}function toPrimitive(_0x2d4d33,_0x4a6f6f){const _0x2d7478=_0x55348f;if('object'!=_typeof(_0x2d4d33)||!_0x2d4d33)return _0x2d4d33;var _0x5314a3=_0x2d4d33[Symbol[_0x2d7478(0x192)]];if(void 0x0!==_0x5314a3){var _0x15a76b=_0x5314a3[_0x2d7478(0x166)](_0x2d4d33,_0x4a6f6f||_0x2d7478(0x156));if(_0x2d7478(0x14c)!=_typeof(_0x15a76b))return _0x15a76b;throw new TypeError(_0x2d7478(0x10b));}return(_0x2d7478(0x1cd)===_0x4a6f6f?String:Number)(_0x2d4d33);}function toPropertyKey(_0xf00864){var _0x3cbbeb=toPrimitive(_0xf00864,'string');return'symbol'==_typeof(_0x3cbbeb)?_0x3cbbeb:_0x3cbbeb+'';}function _defineProperty(_0x351b5a,_0x315daa,_0x161741){const _0x5f3eff=_0x55348f;return(_0x315daa=toPropertyKey(_0x315daa))in _0x351b5a?Object[_0x5f3eff(0x140)](_0x351b5a,_0x315daa,{'value':_0x161741,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x351b5a[_0x315daa]=_0x161741,_0x351b5a;}function __decorateParam(_0x440b92,_0x28d667){return function(_0xc8da08,_0x31c17d){_0x28d667(_0xc8da08,_0x31c17d,_0x440b92);};}function __decorate(_0x3f0c93,_0x4bf5a8,_0x4fb971,_0xf84d6){const _0x3646ef=_0x55348f;var _0x525e96=arguments['length'],_0x128944=_0x525e96<0x3?_0x4bf5a8:_0xf84d6===null?_0xf84d6=Object[_0x3646ef(0x12d)](_0x4bf5a8,_0x4fb971):_0xf84d6,_0x2caaa4;if(typeof Reflect===_0x3646ef(0x14c)&&typeof Reflect['decorate']===_0x3646ef(0x1b4))_0x128944=Reflect[_0x3646ef(0x1db)](_0x3f0c93,_0x4bf5a8,_0x4fb971,_0xf84d6);else{for(var _0x1eb901=_0x3f0c93['length']-0x1;_0x1eb901>=0x0;_0x1eb901--)if(_0x2caaa4=_0x3f0c93[_0x1eb901])_0x128944=(_0x525e96<0x3?_0x2caaa4(_0x128944):_0x525e96>0x3?_0x2caaa4(_0x4bf5a8,_0x4fb971,_0x128944):_0x2caaa4(_0x4bf5a8,_0x4fb971))||_0x128944;}return _0x525e96>0x3&&_0x128944&&Object[_0x3646ef(0x140)](_0x4bf5a8,_0x4fb971,_0x128944),_0x128944;}const DEFAULT_UNIVER_CONTAINER_ID$1=_0x55348f(0xd4),UNIVER_CONTAINER_ID_KEY=_0x55348f(0x1a9),UNIVER_HISTORY_CONTAINER_ID=_0x55348f(0x123);let HistoryLoaderService=class HistoryLoaderService extends _univerjs_core[_0x55348f(0x11b)]{constructor(_0x14fe73,_0x1abaa6,_0x4ec3f1,_0x30e60f,_0x20b467,_0x1a019d,_0x557544,_0x15282e,_0x2f038a,_0x230bbd){const _0x15aa33=_0x55348f;super(),this[_0x15aa33(0x15f)]=_0x14fe73,this[_0x15aa33(0x179)]=_0x1abaa6,this[_0x15aa33(0xeb)]=_0x4ec3f1,this[_0x15aa33(0xf1)]=_0x30e60f,this[_0x15aa33(0x161)]=_0x20b467,this[_0x15aa33(0x1e8)]=_0x1a019d,this[_0x15aa33(0x1cc)]=_0x557544,this[_0x15aa33(0x1c9)]=_0x15282e,this[_0x15aa33(0x190)]=_0x2f038a,this[_0x15aa33(0x120)]=_0x230bbd,_defineProperty(this,_0x15aa33(0xce),new rxjs[(_0x15aa33(0xf4))](null)),_defineProperty(this,'historyUniver$',this[_0x15aa33(0xce)][_0x15aa33(0x18e)]()),_defineProperty(this,'_disposableCollection',new _univerjs_core[(_0x15aa33(0x16a))]()),_defineProperty(this,_0x15aa33(0x1d8),new Map()),_defineProperty(this,_0x15aa33(0x1ea),null),this[_0x15aa33(0x1d2)]();}get[_0x55348f(0x1b1)](){const _0x3fc253=_0x55348f;return this[_0x3fc253(0xce)][_0x3fc253(0x122)];}[_0x55348f(0x1d2)](){const _0x3b1e47=_0x55348f;this[_0x3b1e47(0x136)](),this[_0x3b1e47(0xd1)]();}[_0x55348f(0x136)](){const _0x5a6763=_0x55348f;var _0x28ab80;const _0x322940=(_0x28ab80=this[_0x5a6763(0xeb)][_0x5a6763(0x124)]('UNIVER_CONTAINER_ID'))!==null&&_0x28ab80!==void 0x0?_0x28ab80:DEFAULT_UNIVER_CONTAINER_ID$1,_0x171694=document[_0x5a6763(0x171)](_0x322940);if(!_0x171694)return;const _0x577048=document[_0x5a6763(0x1a8)](_0x5a6763(0x1ef));_0x577048['id']=UNIVER_HISTORY_CONTAINER_ID,_0x577048['dataset'][_0x5a6763(0x108)]=_0x5a6763(0xd8),_0x577048[_0x5a6763(0x16d)][_0x5a6763(0xee)]=_0x5a6763(0x174),_0x577048[_0x5a6763(0x16d)]['top']='0',_0x577048[_0x5a6763(0x16d)]['left']='0',_0x577048['style'][_0x5a6763(0x158)]=_0x5a6763(0x11e),_0x577048[_0x5a6763(0x16d)][_0x5a6763(0x107)]=_0x5a6763(0x11e),_0x577048[_0x5a6763(0x16d)][_0x5a6763(0xec)]='49',_0x577048['style'][_0x5a6763(0x18b)]=_0x5a6763(0x1e5),_0x171694[_0x5a6763(0x19b)](_0x577048);}[_0x55348f(0xd1)](){const _0x495996=_0x55348f;[[_univerjs_engine_render[_0x495996(0xef)]],[_univerjs_ui[_0x495996(0x142)],{'container':UNIVER_HISTORY_CONTAINER_ID,'header':!![],'toolbar':![],'footer':!![],'contextMenu':![],'override':[[_univerjs_ui[_0x495996(0x1b2)],null]]}],[_univerjs_network['UniverNetworkPlugin']],[_univerjs_drawing['UniverDrawingPlugin'],{'override':[[_univerjs_drawing[_0x495996(0x101)],null]]}],[_univerjs_docs[_0x495996(0x1bc)],{'hasScroll':![]}],[_univerjs_docs_ui['UniverDocsUIPlugin']],[_univerjs_sheets_numfmt[_0x495996(0x1ae)]],[_univerjs_sheets[_0x495996(0xe3)],{'notExecuteFormula':!![]}],[_univerjs_sheets_ui['UniverSheetsUIPlugin']],[_univerjs_sheets_formula[_0x495996(0xe1)]],[_univerjs_sheets_formula_ui[_0x495996(0xd6)]],[_univerjs_pro_collaboration[_0x495996(0x132)]],[_univerjs_sheets_filter[_0x495996(0x1da)]],[_univerjs_sheets_filter_ui[_0x495996(0x180)]],[_univerjs_sheets_conditional_formatting[_0x495996(0x1c4)]],[_univerjs_sheets_conditional_formatting_ui[_0x495996(0x10a)]],[_univerjs_sheets_hyper_link[_0x495996(0x106)]],[_univerjs_sheets_hyper_link_ui[_0x495996(0x11f)]],[_univerjs_data_validation[_0x495996(0x1d4)]],[_univerjs_sheets_data_validation[_0x495996(0xdc)]],[_univerjs_sheets_data_validation_ui['UniverSheetsDataValidationUIPlugin']],[_univerjs_engine_formula['UniverFormulaEnginePlugin'],{'notExecuteFormula':!![]}],[_univerjs_drawing_ui[_0x495996(0xe7)]],[_univerjs_sheets_drawing[_0x495996(0x185)]],[_univerjs_sheets_drawing_ui[_0x495996(0x155)]],[_univerjs_pro_sheets_sparkline[_0x495996(0x105)]],[_univerjs_pro_sheets_sparkline_ui['UniverSheetSparklineUIPlugin']],[_univerjs_pro_sheets_chart[_0x495996(0x144)]],[_univerjs_pro_sheets_chart_ui['UniverSheetsChartUIPlugin']],[_univerjs_pro_sheets_shape['UniverSheetsShapePlugin']],[_univerjs_pro_sheets_shape_ui[_0x495996(0xf6)]],[_univerjs_pro_sheets_pivot['UniverSheetsPivotTablePlugin'],{'notExecuteFormula':!![]}],[_univerjs_sheets_table[_0x495996(0x170)]]]['forEach'](([_0x44b276,_0x2ca1a6])=>this[_0x495996(0xf9)](_0x44b276,_0x2ca1a6));}[_0x55348f(0x129)](){const _0x7d75a6=_0x55348f;super[_0x7d75a6(0x129)](),this['unMountHistoryContent'](),this[_0x7d75a6(0x1d8)][_0x7d75a6(0xd9)]();}[_0x55348f(0xf9)](_0x38efe4,_0x61d829,_0x25691d){const _0x57ee06=_0x55348f;if(this[_0x57ee06(0x1d8)][_0x57ee06(0x17c)](_0x38efe4[_0x57ee06(0x188)])&&!_0x25691d)throw new Error(_0x57ee06(0x12b)+_0x38efe4[_0x57ee06(0x188)]+_0x57ee06(0x1ee));this['_pluginMap'][_0x57ee06(0x130)](_0x38efe4[_0x57ee06(0x188)],[_0x38efe4,_0x61d829]);}[_0x55348f(0x182)](){const _0x128eb7=_0x55348f;return Array[_0x128eb7(0x126)](this[_0x128eb7(0x1d8)][_0x128eb7(0x154)]());}['mountHistoryContent'](_0x14c134,_0x4b4713){const _0x370ec8=_0x55348f,_0x2238c1=document[_0x370ec8(0x171)](UNIVER_HISTORY_CONTAINER_ID);if(!_0x2238c1)return;_0x2238c1[_0x370ec8(0x16d)][_0x370ec8(0x18b)]=_0x370ec8(0xe6),this[_0x370ec8(0x19a)](_0x14c134,UNIVER_HISTORY_CONTAINER_ID,_0x4b4713);}[_0x55348f(0x1ca)](){const _0x532b7c=_0x55348f;var _0x28e081;this['_disposableCollection']['dispose'](),(_0x28e081=this['historyUniver'])===null||_0x28e081===void 0x0||_0x28e081[_0x532b7c(0x129)](),this[_0x532b7c(0xce)][_0x532b7c(0x15b)](null);const _0x1940d2=document[_0x532b7c(0x171)](UNIVER_HISTORY_CONTAINER_ID);if(!_0x1940d2)return;_0x1940d2[_0x532b7c(0x16d)]['display']=_0x532b7c(0x1e5),this[_0x532b7c(0x1ea)]&&(this[_0x532b7c(0x1ea)]['terminate'](),this[_0x532b7c(0x1ea)]=null);}[_0x55348f(0x19a)](_0x3a843e,_0x17974d,_0x38c835){const _0x2f3bf7=_0x55348f;var _0x11fff5,_0x59c780,_0x3faaea,_0x40222b,_0x23c04a;if(this[_0x2f3bf7(0x1b1)])return;const _0x22ab3e=new _univerjs_core[(_0x2f3bf7(0x18f))]({'locales':{[this[_0x2f3bf7(0x15f)][_0x2f3bf7(0x184)]()]:this['_localeService']['getLocales']()},'override':[[_univerjs_core[_0x2f3bf7(0x10d)],{'useClass':_univerjs_pro_collaboration_client[_0x2f3bf7(0xd5)]}]]}),_0x3cde3e=_0x22ab3e[_0x2f3bf7(0x102)]();this[_0x2f3bf7(0x1d7)](this[_0x2f3bf7(0x120)][_0x2f3bf7(0x1d9)][_0x2f3bf7(0x109)](_0x3ff8ef=>{const _0x1617b9=_0x2f3bf7;_0x3cde3e[_0x1617b9(0x1bb)](_univerjs_core[_0x1617b9(0x1c2)])['setDarkMode'](_0x3ff8ef);})),this[_0x2f3bf7(0x1d7)](this['_themeService'][_0x2f3bf7(0x111)]['subscribe'](_0x2ca950=>{const _0x22f523=_0x2f3bf7;_0x3cde3e[_0x22f523(0x1bb)](_univerjs_core[_0x22f523(0x1c2)])[_0x22f523(0x1b7)](_0x2ca950);})),_0x3cde3e[_0x2f3bf7(0x1bb)](_univerjs_core[_0x2f3bf7(0x177)])['setLocale'](this[_0x2f3bf7(0x15f)][_0x2f3bf7(0x184)]()),_0x3cde3e[_0x2f3bf7(0x1bb)](_univerjs_core['IConfigService'])[_0x2f3bf7(0x1df)](_univerjs_pro_collaboration_client['COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY'],this['_configService'][_0x2f3bf7(0x124)](_univerjs_pro_collaboration_client['COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY']));const _0x163abc=this[_0x2f3bf7(0xeb)]['getConfig'](_univerjs_pro_license[_0x2f3bf7(0x162)]);if(_0x163abc)_0x22ab3e['registerPlugin'](_univerjs_pro_license[_0x2f3bf7(0x12c)],{'license':_0x163abc['ls']});const _0x427c66=(_0x11fff5=this['_configService'][_0x2f3bf7(0x124)]('edit-history-loader.config'))===null||_0x11fff5===void 0x0?void 0x0:_0x11fff5[_0x2f3bf7(0x128)],_0x4361d6=!!_0x427c66;_0x4361d6&&(this[_0x2f3bf7(0x1ea)]=_0x427c66 instanceof Worker?_0x427c66:null,_0x22ab3e[_0x2f3bf7(0xf9)](_univerjs_rpc[_0x2f3bf7(0x1d3)],{'workerURL':_0x427c66}));this[_0x2f3bf7(0x1d8)]['forEach'](([_0x443f64,_0x22616c])=>{const _0x472791=_0x2f3bf7;_0x22ab3e[_0x472791(0xf9)](_0x443f64,_0x22616c);}),_0x22ab3e['registerPlugin'](_univerjs_pro_edit_history_viewer[_0x2f3bf7(0x15c)],{'historyListServerUrl':(_0x59c780=this[_0x2f3bf7(0xeb)]['getConfig'](_0x2f3bf7(0xcf)))===null||_0x59c780===void 0x0?void 0x0:_0x59c780[_0x2f3bf7(0x1b3)],'historyPanelComponentKey':(_0x3faaea=this[_0x2f3bf7(0xeb)][_0x2f3bf7(0x124)]('edit-history-loader.config'))===null||_0x3faaea===void 0x0?void 0x0:_0x3faaea[_0x2f3bf7(0x1a5)],'historyPanelHidden':(_0x40222b=this[_0x2f3bf7(0xeb)][_0x2f3bf7(0x124)]('edit-history-loader.config'))===null||_0x40222b===void 0x0?void 0x0:_0x40222b[_0x2f3bf7(0x13d)],'historyAIassistantEnabled':(_0x23c04a=this['_configService'][_0x2f3bf7(0x124)](_0x2f3bf7(0xcf)))===null||_0x23c04a===void 0x0?void 0x0:_0x23c04a['historyAIassistantEnabled']}),_0x3cde3e[_0x2f3bf7(0x110)](_0x1298f6=>{const _0x515cae=_0x2f3bf7;this[_0x515cae(0x145)](_0x1298f6,_0x3a843e);}),this[_0x2f3bf7(0xce)]['next'](_0x22ab3e);const _0x22d574=_0x3cde3e[_0x2f3bf7(0x1bb)](_univerjs_pro_edit_history_viewer[_0x2f3bf7(0x13e)]),_0x43449c=this[_0x2f3bf7(0x178)](_0x3a843e),_0x40347b=()=>{const _0xd51a19=_0x2f3bf7;if(_0x38c835)_0x22d574[_0xd51a19(0x1e9)](_0x3a843e,_0x17974d,_0x43449c,_0x38c835);else _0x22d574[_0xd51a19(0x134)](_0x3a843e,_0x17974d,_0x43449c);};this[_0x2f3bf7(0x161)]['show']({'content':this[_0x2f3bf7(0x15f)]['t']('editHistory.info.initializing'),'type':_univerjs_design['MessageType'][_0x2f3bf7(0x1d0)]});if(_0x4361d6)try{_0x3cde3e[_0x2f3bf7(0x1bb)](_univerjs_rpc[_0x2f3bf7(0x125)])[_0x2f3bf7(0x10e)]()['then'](()=>{_0x40347b();});}catch{_0x40347b();}else _0x40347b();}['_initListener'](_0x1638c6,_0x1f46d9){const _0x5a9969=_0x55348f,_0x511670=_0x1638c6[_0x5a9969(0x1bb)](_univerjs_pro_edit_history_viewer['HistoryManagerService']);this[_0x5a9969(0x199)]['add'](_0x511670['status$']['subscribe'](_0x2116e3=>{const _0x47ba39=_0x5a9969;switch(_0x2116e3){case _univerjs_pro_edit_history_viewer[_0x47ba39(0x173)][_0x47ba39(0x135)]:this[_0x47ba39(0x1c9)]['closeAll'](),this[_0x47ba39(0x190)][_0x47ba39(0x141)]();break;case _univerjs_pro_edit_history_viewer['HistoryModeStatus']['Exited']:this['_commandService'][_0x47ba39(0xfd)](ExitEditHistoryOperation['id']),this[_0x47ba39(0x1ca)]();break;case _univerjs_pro_edit_history_viewer[_0x47ba39(0x173)][_0x47ba39(0x15a)]:this[_0x47ba39(0x1ca)](),this[_0x47ba39(0x161)][_0x47ba39(0x117)]({'content':this[_0x47ba39(0x15f)]['t']('editHistory.panel.listFetchError'),'type':_univerjs_design['MessageType']['Error'],'duration':0xbb8});break;default:break;}})),this['_disposableCollection'][_0x5a9969(0x169)](_0x511670[_0x5a9969(0x1a6)][_0x5a9969(0x109)](async _0x20dc98=>{const _0x551770=_0x5a9969;if(_0x20dc98)this[_0x551770(0xf1)][_0x551770(0xfd)](_univerjs_pro_collaboration[_0x551770(0x11d)]['id'],{'unitId':_0x1f46d9,'revision':_0x20dc98});}));}['_checkCanRevert'](_0x27dc90){const _0x2e883a=_0x55348f,_0x493c17=this['_univerInstanceService'][_0x2e883a(0x1c8)](_0x27dc90)[_0x2e883a(0x1ac)]()[_0x2e883a(0x1de)](_0x115c84=>_0x115c84[_0x2e883a(0x1c5)]()),_0x38bfda=new _univerjs_sheets[(_0x2e883a(0x176))](_0x27dc90)['id'],_0x25fa6d=_0x493c17[_0x2e883a(0x1de)](_0x45ece3=>new _univerjs_sheets['WorksheetEditPermission'](_0x27dc90,_0x45ece3)['id']),_0x238357=_0x493c17[_0x2e883a(0x1de)](_0x7ce281=>this['_selectionProtectionRuleModel'][_0x2e883a(0x1a7)](_0x27dc90,_0x7ce281)['map'](_0x2672dc=>new _univerjs_sheets[(_0x2e883a(0x114))](_0x27dc90,_0x7ce281,_0x2672dc[_0x2e883a(0x13f)])['id']))[_0x2e883a(0x1bf)](),_0xcf70d6=new _univerjs_sheets['WorkbookRecoverHistoryPermission'](_0x27dc90)['id'];return this[_0x2e883a(0x1e8)][_0x2e883a(0xda)]([_0x38bfda,..._0x25fa6d,..._0x238357,_0xcf70d6])[_0x2e883a(0x150)](_0x34108b=>!!_0x34108b[_0x2e883a(0x122)]);}};HistoryLoaderService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x55348f(0x1e4)])(_univerjs_core[_0x55348f(0x177)])),__decorateParam(0x1,_univerjs_core[_0x55348f(0xf3)]),__decorateParam(0x2,_univerjs_core[_0x55348f(0x1ad)]),__decorateParam(0x3,_univerjs_core[_0x55348f(0xd0)]),__decorateParam(0x4,_univerjs_ui[_0x55348f(0x12f)]),__decorateParam(0x5,_univerjs_core[_0x55348f(0xff)]),__decorateParam(0x6,(0x0,_univerjs_core['Inject'])(_univerjs_sheets[_0x55348f(0x1c7)])),__decorateParam(0x7,(0x0,_univerjs_core[_0x55348f(0x1e4)])(_univerjs_ui[_0x55348f(0x1b2)])),__decorateParam(0x8,(0x0,_univerjs_core[_0x55348f(0x1e4)])(_univerjs_ui[_0x55348f(0xde)])),__decorateParam(0x9,(0x0,_univerjs_core[_0x55348f(0x1e4)])(_univerjs_core[_0x55348f(0x1c2)]))],HistoryLoaderService);const ToggleEditHistoryOperation={'id':'univer.operation.toggle-edit-history','type':_univerjs_core[_0x55348f(0x189)]['OPERATION'],'handler':_0x177326=>{const _0x19e1f6=_0x55348f,_0x499bd9=_0x177326['get'](HistoryLoaderService),{unitId:_0x532ff2}=(0x0,_univerjs_sheets[_0x19e1f6(0x116)])(_0x177326[_0x19e1f6(0x1bb)](_univerjs_core[_0x19e1f6(0xf3)]))||{};if(!_0x532ff2)return![];return _0x499bd9['mountHistoryContent'](_0x532ff2),!![];}},ExitEditHistoryOperation={'id':'univer.operation.exit-edit-history','type':_univerjs_core['CommandType'][_0x55348f(0x1e3)],'handler':()=>!![]};function _0x2db9(){const _0x1e230a=['_themeService','61790dbImbj','value','univer-history-container','getConfig','IRemoteInstanceService','from','closeAll','workerURL','dispose','ILocalCacheService','[HistoryLoaderService]:\x20Plugin\x20','UniverLicensePlugin','getOwnPropertyDescriptor','UNIVER_EDIT_HISTORY_LOADER_MOBILE_PLUGIN','IMessageService','set','CollaborationStatus','UniverCollaborationPlugin','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','triggerLoadVersions','Entered','_initContainer','editHistory.panel.reverting','UniverNetworkPlugin','_localCacheService','subunit','mergeMenu','RibbonStartGroup','historyPanelHidden','HistoryManagerService','permissionId','defineProperty','close','UniverUIPlugin','fromCollab','UniverSheetsChartPlugin','_initListener','version','top','eventID','IURLService','_updateSubUnitFromURLParams','UniverSheetsMobileUIPlugin','object','257950vSRBVh','3953299rkOIBP','setParam','every','univer-history-container-mobile','location','UniverSheetsPivotTablePlugin','values','UniverSheetsDrawingUIPlugin','default','SYNCED','width','264gvxgaJ','Error','next','UniverEditHistoryViewerPlugin','constructor','getUnitId','_localeService','SetWorksheetActivateCommand','_messageService','LS_CONFIG_KEY','_handleRevertAcknowledgement','UniverEditHistoryViewerMobilePlugin','UniverInstanceType','call','params','UNIVER_SHEET','add','DisposableCollection','_componentManager','getSheetBySheetId','style','onStarting','CollaborationController','UniverSheetsTablePlugin','getElementById','ToggleEditHistoryOperation','HistoryModeStatus','absolute','UniverEditHistoryLoaderPlugin','WorkbookEditablePermission','LocaleService','_checkCanRevert','_univerInstanceService','UniverFormulaEnginePlugin','state$','has','2025PpybMR','DataLoaderService','Plugin','UniverSheetsFilterUIPlugin','reload','getAllPlugins','getCollabEntity','getCurrentLocale','UniverSheetsDrawingPlugin','register','UNIVER_EDIT_HISTORY_LOADER_PLUGIN','pluginName','CommandType','takeUntil','display','HistoryIcon','mountHistoryContent','asObservable','Univer','_sidebarService','terminate','toPrimitive','WorkbookRecoverHistoryPermission','getCurrentRangeDisable$','univerContainerId','menu','12VOZrEf','packageName','_disposableCollection','_initUniver','appendChild','2gMsKcF','_historyManagerService','UniverSheetsShapePlugin','editHistory.panel.revertFailed','combineLatest','getUnhiddenWorksheets','4GhsELv','OTHERS','UniverDocsUIPlugin','historyPanelComponentKey','revertRevision$','getSubunitRuleList','createElement','UNIVER_CONTAINER_ID','24hHzadZ','onSteady','getSheets','IConfigService','UniverSheetsNumfmtPlugin','activeSheet$','DependentOn','historyUniver','IDialogService','historyListServerUrl','function','iterator','dispose$','setTheme','editHistory.panel.listFetchError','loadUnit','_urlService','get','UniverDocsPlugin','CHANGESET_ACK','onCommandExecuted','flat','Module','4511icFEtM','ThemeService','_menuManagerService','UniverSheetsConditionalFormattingPlugin','getSheetId','IMenuManagerService','RangeProtectionRuleModel','getUnit','_dialogService','unMountHistoryContent','dataset','_selectionProtectionRuleModel','string','exhaustSavingTask','forEach','Loading','removeAll','_init','UniverRPCMainThreadPlugin','UniverDataValidationPlugin','UniverEditHistoryLoaderMobilePlugin','_injector','disposeWithMe','_pluginMap','darkMode$','UniverSheetsFilterPlugin','decorate','_updateURLWithCurrentState','457865pjnWsc','map','setConfig','UniverSheetSparklineUIPlugin','then','data','OPERATION','Inject','none','EDIT_HISTORY_LOADER_PLUGIN_CONFIG_KEY','left','_permissionService','triggerCustomVersions','_internalWebWorker','MessageType','UniverDrawingPlugin','_collaborationController','\x20has\x20been\x20registered.','div','_historyUniver$','edit-history-loader.config','ICommandService','_initPlugins','RxDisposable','Injector','univer-container','AuthzIoHttpService','UniverSheetsFormulaUIPlugin','merge','history-container','clear','composePermission','669295zvkLiQ','UniverSheetsDataValidationPlugin','some','ISidebarService','_config','UNIVER_UNKNOWN','UniverSheetsFormulaPlugin','disposeUnit','UniverSheetsPlugin','UniverSheetsChartUIPlugin','pipe','block','UniverDrawingUIPlugin','getCurrentUnitOfType','setLocale','historyUniver$','_configService','zIndex','symbol','position','UniverRenderEnginePlugin','[MobileHistoryLoaderService]:\x20Plugin\x20','_commandService','4452875sXbtwW','IUniverInstanceService','BehaviorSubject','registerCommand','UniverSheetsShapeUIPlugin','unsubscribe','session','registerPlugin','urlChange$','Exited','type','executeCommand','event$','IPermissionService','_revertErrorTimer','IImageIoService','__getInjector','4608174zZRmHD','prototype','UniverSheetSparklinePlugin','UniverSheetsHyperLinkPlugin','height','uComp','subscribe','UniverSheetsConditionalFormattingUIPlugin','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','getParam','IAuthzIoService','whenReady','toStringTag','invoke','currentTheme$','_setupSubUnitSync','getMenuHiddenObservable','RangeProtectionPermissionEditPoint','Workbook','getSheetCommandTarget','show','_dataLoaderService','getActiveSheet','CollaborationEvent','Disposable','ComponentManager','RevertRevisionMutation','100%','UniverSheetsHyperLinkUIPlugin'];_0x2db9=function(){return _0x1e230a;};return _0x2db9();}var name='@univerjs-pro/edit-history-loader',version='0.22.0';function ToggleEditHistoryMenuFactory(_0x5f18c7){const _0x2f6307=_0x55348f;return{'id':ToggleEditHistoryOperation['id'],'type':_univerjs_ui['MenuItemType']['BUTTON'],'icon':_0x2f6307(0x18c),'tooltip':'editHistory.panel.title','hidden$':(0x0,_univerjs_ui[_0x2f6307(0x113)])(_0x5f18c7,_univerjs_core[_0x2f6307(0x165)]['UNIVER_SHEET']),'disabled$':(0x0,_univerjs_sheets_ui[_0x2f6307(0x194)])(_0x5f18c7,{'workbookTypes':[_univerjs_sheets['WorkbookViewHistoryPermission']],'worksheetTypes':[],'rangeTypes':[]})};}const menuSchema={[_univerjs_ui[_0x55348f(0x13c)][_0x55348f(0x1a3)]]:{[ToggleEditHistoryOperation['id']]:{'order':0.2,'menuItemFactory':ToggleEditHistoryMenuFactory}}};let MobileHistoryLoaderController=class MobileHistoryLoaderController extends _univerjs_core[_0x55348f(0xd2)]{constructor(_0x2d4588,_0xa15318,_0x20f49f,_0x1622ff,_0x258396,_0x5d4158,_0xff1495,_0x32ce57,_0x36ea6e,_0x218115,_0xef31df){const _0xccd171=_0x55348f;super(),this['_commandService']=_0x2d4588,this['_menuManagerService']=_0xa15318,this['_componentManager']=_0x20f49f,this['_historyManagerService']=_0x1622ff,this[_0xccd171(0x15f)]=_0x258396,this[_0xccd171(0x161)]=_0x5d4158,this['_collaborationController']=_0xff1495,this[_0xccd171(0x139)]=_0x32ce57,this['_dataLoaderService']=_0x36ea6e,this[_0xccd171(0x179)]=_0x218115,this[_0xccd171(0x1ba)]=_0xef31df,_defineProperty(this,_0xccd171(0x100),null),this[_0xccd171(0x1d2)]();}[_0x55348f(0x1d2)](){const _0x310442=_0x55348f;[ToggleEditHistoryOperation,ExitEditHistoryOperation][_0x310442(0x1cf)](_0x3445d0=>this[_0x310442(0x1d7)]((0x0,_univerjs_core['toDisposable'])(this[_0x310442(0xf1)]['registerCommand'](_0x3445d0)))),this[_0x310442(0x1d7)](this[_0x310442(0x16b)][_0x310442(0x186)]('HistoryIcon',_univerjs_icons[_0x310442(0x18c)])),this[_0x310442(0x1c3)][_0x310442(0x13b)](menuSchema),this[_0x310442(0x1d7)](this[_0x310442(0xf1)]['onCommandExecuted'](async(_0x18479c,_0x4fbc15)=>{const _0x42fb67=_0x310442;if(_0x18479c['id']===_univerjs_pro_collaboration[_0x42fb67(0x11d)]['id']){const {unitId:_0x7a7523}=_0x18479c[_0x42fb67(0x167)];this[_0x42fb67(0x161)][_0x42fb67(0x117)]({'content':this['_localeService']['t'](_0x42fb67(0x137)),'type':_univerjs_design['MessageType'][_0x42fb67(0x1d0)],'duration':0x1388});const _0x1e8704=this['_collaborationController']['getCollabEntity'](_0x7a7523);if(!(_0x4fbc15===null||_0x4fbc15===void 0x0?void 0x0:_0x4fbc15[_0x42fb67(0x143)]))this[_0x42fb67(0x163)](_0x1e8704,async()=>{const _0x83bedf=_0x42fb67,_0x30ac98=this['_univerInstanceService'][_0x83bedf(0xe8)](_univerjs_core[_0x83bedf(0x165)]['UNIVER_SHEET']),_0x3fc65c=_0x30ac98===null||_0x30ac98===void 0x0?void 0x0:_0x30ac98['getActiveSheet']();if(!_0x3fc65c)return![];this[_0x83bedf(0x179)][_0x83bedf(0xe2)](_0x7a7523);const _0x512502=await this[_0x83bedf(0x118)]['loadUnit'](_0x7a7523,_univerjs_core[_0x83bedf(0x165)][_0x83bedf(0x168)]);if(_0x512502&&_0x512502 instanceof _univerjs_core[_0x83bedf(0x115)])return await this['_setupSubUnitSync'](_0x512502,_0x3fc65c[_0x83bedf(0x1c5)]()),!![];return![];});else this[_0x42fb67(0x163)](_0x1e8704,async()=>{const _0x285d0d=_0x42fb67;return setTimeout(()=>window[_0x285d0d(0x152)]['reload']()),!![];},!![]);}}));}[_0x55348f(0x163)](_0x2a4e10,_0x4bd87e,_0x316383=![]){const _0x327f97=_0x55348f,_0x397182=(0x0,rxjs['combineLatest'])([_0x2a4e10[_0x327f97(0xf8)][_0x327f97(0xfe)],_0x2a4e10[_0x327f97(0x17b)]])[_0x327f97(0x109)](async([_0x2ffd11,_0x187fb4])=>{const _0x51a021=_0x327f97;if(_0x2ffd11[_0x51a021(0x148)]===_univerjs_pro_collaboration[_0x51a021(0x11a)][_0x51a021(0x1bd)]&&(_0x187fb4===null||_0x187fb4===void 0x0?void 0x0:_0x187fb4['status'])===_univerjs_pro_collaboration_client[_0x51a021(0x131)][_0x51a021(0x157)]){if(_0x2ffd11['data']['mutations'][_0x51a021(0xdd)](_0x4b5662=>_0x4b5662['id']===_univerjs_pro_collaboration[_0x51a021(0x11d)]['id'])){if(await _0x4bd87e()){var _0x363e7b;this[_0x51a021(0x19d)]['unMountHistoryContent'](),_0x397182['unsubscribe'](),this[_0x51a021(0x100)]&&clearTimeout(this['_revertErrorTimer']),await((_0x363e7b=this[_0x51a021(0x139)])===null||_0x363e7b===void 0x0?void 0x0:_0x363e7b[_0x51a021(0x1ce)]()),this[_0x51a021(0x161)][_0x51a021(0x1d1)]();}}}});if(_0x316383)this[_0x327f97(0x100)]=setTimeout(()=>{const _0x552eae=_0x327f97;_0x397182['unsubscribe'](),this['_messageService'][_0x552eae(0x117)]({'content':this[_0x552eae(0x15f)]['t']('editHistory.panel.revertFailed'),'type':_univerjs_design[_0x552eae(0x1eb)][_0x552eae(0x15a)],'duration':0xbb8});},0x1388);}async['_setupSubUnitSync'](_0x3f51f9,_0x42671a){const _0x418b4b=_0x55348f;await this[_0x418b4b(0x14a)](_0x3f51f9,_0x42671a),_0x3f51f9[_0x418b4b(0x1af)][_0x418b4b(0xe5)]((0x0,rxjs['takeUntil'])(this['dispose$']))[_0x418b4b(0x109)](_0x40e7e5=>{const _0x5e5cac=_0x418b4b;if(_0x40e7e5)this[_0x5e5cac(0x1dc)](_0x40e7e5);}),this[_0x418b4b(0x1ba)][_0x418b4b(0xfa)][_0x418b4b(0xe5)]((0x0,rxjs['takeUntil'])(this[_0x418b4b(0x1b6)]))['subscribe'](()=>this[_0x418b4b(0x14a)](_0x3f51f9,_0x42671a));}['_updateURLWithCurrentState'](_0x539e2b,_0x17ab5d=![]){const _0x2a4173=_0x55348f,_0x4c8e74=this[_0x2a4173(0x1ba)][_0x2a4173(0x10c)]('subunit');if(_0x539e2b[_0x2a4173(0x1c5)]()!==_0x4c8e74)this[_0x2a4173(0x1ba)]['setParam'](_0x2a4173(0x13a),_0x539e2b[_0x2a4173(0x1c5)](),_0x17ab5d);}async[_0x55348f(0x14a)](_0x2296e6,_0x1c9b1c){const _0x1fdd41=_0x55348f;var _0x150a54;if(!_0x1c9b1c||!_0x2296e6['getSheetBySheetId'](_0x1c9b1c)){const _0x3b86bc=_0x2296e6['getUnhiddenWorksheets']()[0x0],_0xaccbe8=_0x2296e6['getSheetBySheetId'](_0x3b86bc);if(!_0xaccbe8)return;this[_0x1fdd41(0x1dc)](_0xaccbe8,!![]),await this[_0x1fdd41(0xf1)][_0x1fdd41(0xfd)](_univerjs_sheets[_0x1fdd41(0x160)]['id'],{'unitId':_0x2296e6[_0x1fdd41(0x15e)](),'subUnitId':_0x3b86bc});return;}if(((_0x150a54=_0x2296e6[_0x1fdd41(0x119)]())===null||_0x150a54===void 0x0?void 0x0:_0x150a54[_0x1fdd41(0x1c5)]())===_0x1c9b1c)return;await this[_0x1fdd41(0xf1)]['executeCommand'](_univerjs_sheets[_0x1fdd41(0x160)]['id'],{'unitId':_0x2296e6[_0x1fdd41(0x15e)](),'subUnitId':_0x1c9b1c});}};MobileHistoryLoaderController=__decorate([__decorateParam(0x0,_univerjs_core[_0x55348f(0xd0)]),__decorateParam(0x1,_univerjs_ui[_0x55348f(0x1c6)]),__decorateParam(0x2,(0x0,_univerjs_core[_0x55348f(0x1e4)])(_univerjs_ui[_0x55348f(0x11c)])),__decorateParam(0x3,(0x0,_univerjs_core[_0x55348f(0x1e4)])(HistoryLoaderService)),__decorateParam(0x4,(0x0,_univerjs_core[_0x55348f(0x1e4)])(_univerjs_core['LocaleService'])),__decorateParam(0x5,_univerjs_ui[_0x55348f(0x12f)]),__decorateParam(0x6,(0x0,_univerjs_core['Inject'])(_univerjs_pro_collaboration_client[_0x55348f(0x16f)])),__decorateParam(0x7,_univerjs_pro_collaboration_client[_0x55348f(0x12a)]),__decorateParam(0x8,(0x0,_univerjs_core[_0x55348f(0x1e4)])(_univerjs_pro_collaboration_client[_0x55348f(0x17e)])),__decorateParam(0x9,_univerjs_core['IUniverInstanceService']),__decorateParam(0xa,_univerjs_pro_collaboration_client_ui[_0x55348f(0x149)])],MobileHistoryLoaderController);const DEFAULT_UNIVER_CONTAINER_ID='univer-container',UNIVER_CONTAINER_ID_KEY$1='UNIVER_CONTAINER_ID',UNIVER_HISTORY_CONTAINER_ID$1=_0x55348f(0x151);let MobileHistoryLoaderService=class MobileHistoryLoaderService extends _univerjs_core[_0x55348f(0x11b)]{constructor(_0x17fc5f,_0x36e25b,_0x3a213d,_0x16efc3,_0x5ef922,_0x130838,_0x2c7a53,_0x37771b,_0xfc5150,_0x5608e1){const _0x3a4fb0=_0x55348f;super(),this['_localeService']=_0x17fc5f,this[_0x3a4fb0(0x179)]=_0x36e25b,this['_configService']=_0x3a213d,this[_0x3a4fb0(0xf1)]=_0x16efc3,this[_0x3a4fb0(0x161)]=_0x5ef922,this['_permissionService']=_0x130838,this['_selectionProtectionRuleModel']=_0x2c7a53,this[_0x3a4fb0(0x1c9)]=_0x37771b,this[_0x3a4fb0(0x190)]=_0xfc5150,this[_0x3a4fb0(0x120)]=_0x5608e1,_defineProperty(this,'_historyUniver$',new rxjs[(_0x3a4fb0(0xf4))](null)),_defineProperty(this,_0x3a4fb0(0xea),this[_0x3a4fb0(0xce)][_0x3a4fb0(0x18e)]()),_defineProperty(this,_0x3a4fb0(0x199),new _univerjs_core[(_0x3a4fb0(0x16a))]()),_defineProperty(this,_0x3a4fb0(0x1d8),new Map()),_defineProperty(this,_0x3a4fb0(0x1ea),null),this[_0x3a4fb0(0x1d2)]();}get[_0x55348f(0x1b1)](){const _0x23ca36=_0x55348f;return this[_0x23ca36(0xce)][_0x23ca36(0x122)];}[_0x55348f(0x1d2)](){const _0x46a23f=_0x55348f;this['_initContainer'](),this[_0x46a23f(0xd1)]();}['_initContainer'](){const _0x2851e2=_0x55348f;var _0x5234b8;const _0x1e71a8=(_0x5234b8=this['_configService'][_0x2851e2(0x124)](_0x2851e2(0x1a9)))!==null&&_0x5234b8!==void 0x0?_0x5234b8:DEFAULT_UNIVER_CONTAINER_ID,_0x5293a9=document[_0x2851e2(0x171)](_0x1e71a8);if(!_0x5293a9)return;const _0x3ac49d=document[_0x2851e2(0x1a8)](_0x2851e2(0x1ef));_0x3ac49d['id']=UNIVER_HISTORY_CONTAINER_ID$1,_0x3ac49d[_0x2851e2(0x1cb)]['uComp']=_0x2851e2(0xd8),_0x3ac49d[_0x2851e2(0x16d)][_0x2851e2(0xee)]='absolute',_0x3ac49d['style'][_0x2851e2(0x147)]='0',_0x3ac49d[_0x2851e2(0x16d)][_0x2851e2(0x1e7)]='0',_0x3ac49d[_0x2851e2(0x16d)][_0x2851e2(0x158)]=_0x2851e2(0x11e),_0x3ac49d['style'][_0x2851e2(0x107)]='100%',_0x3ac49d[_0x2851e2(0x16d)][_0x2851e2(0xec)]='49',_0x3ac49d[_0x2851e2(0x16d)]['display']=_0x2851e2(0x1e5),_0x5293a9[_0x2851e2(0x19b)](_0x3ac49d);}[_0x55348f(0xd1)](){const _0x4e35f6=_0x55348f;[[_univerjs_engine_render['UniverRenderEnginePlugin']],[_univerjs_ui['UniverMobileUIPlugin'],{'container':UNIVER_HISTORY_CONTAINER_ID$1,'header':!![],'toolbar':![],'footer':!![],'contextMenu':![],'override':[[_univerjs_ui[_0x4e35f6(0x1b2)],null]]}],[_univerjs_network[_0x4e35f6(0x138)]],[_univerjs_drawing[_0x4e35f6(0x1ec)],{'override':[[_univerjs_drawing[_0x4e35f6(0x101)],null]]}],[_univerjs_docs[_0x4e35f6(0x1bc)],{'hasScroll':![]}],[_univerjs_docs_ui[_0x4e35f6(0x1a4)]],[_univerjs_sheets_numfmt['UniverSheetsNumfmtPlugin']],[_univerjs_sheets[_0x4e35f6(0xe3)],{'notExecuteFormula':!![]}],[_univerjs_sheets_ui[_0x4e35f6(0x14b)]],[_univerjs_sheets_formula[_0x4e35f6(0xe1)]],[_univerjs_sheets_formula_ui[_0x4e35f6(0xd6)]],[_univerjs_pro_collaboration[_0x4e35f6(0x132)]],[_univerjs_sheets_filter[_0x4e35f6(0x1da)]],[_univerjs_sheets_conditional_formatting[_0x4e35f6(0x1c4)]],[_univerjs_sheets_hyper_link[_0x4e35f6(0x106)]],[_univerjs_sheets_hyper_link_ui[_0x4e35f6(0x11f)]],[_univerjs_data_validation[_0x4e35f6(0x1d4)]],[_univerjs_sheets_data_validation[_0x4e35f6(0xdc)]],[_univerjs_sheets_data_validation_ui['UniverSheetsDataValidationMobileUIPlugin']],[_univerjs_engine_formula[_0x4e35f6(0x17a)],{'notExecuteFormula':!![]}],[_univerjs_drawing_ui[_0x4e35f6(0xe7)]],[_univerjs_sheets_drawing[_0x4e35f6(0x185)]],[_univerjs_sheets_drawing_ui[_0x4e35f6(0x155)]],[_univerjs_pro_sheets_sparkline[_0x4e35f6(0x105)]],[_univerjs_pro_sheets_sparkline_ui[_0x4e35f6(0x1e0)]],[_univerjs_pro_sheets_chart[_0x4e35f6(0x144)]],[_univerjs_pro_sheets_chart_ui[_0x4e35f6(0xe4)]],[_univerjs_pro_sheets_shape[_0x4e35f6(0x19e)]],[_univerjs_pro_sheets_shape_ui[_0x4e35f6(0xf6)]],[_univerjs_pro_sheets_pivot[_0x4e35f6(0x153)],{'notExecuteFormula':!![]}],[_univerjs_sheets_table[_0x4e35f6(0x170)]]]['forEach'](([_0x3fe48e,_0x1ec1ec])=>this[_0x4e35f6(0xf9)](_0x3fe48e,_0x1ec1ec));}[_0x55348f(0x129)](){const _0xe61a5e=_0x55348f;super[_0xe61a5e(0x129)](),this[_0xe61a5e(0x1ca)](),this[_0xe61a5e(0x1d8)][_0xe61a5e(0xd9)]();}['registerPlugin'](_0x281086,_0x4c3afb,_0x4d75e3){const _0x13abc7=_0x55348f;if(this[_0x13abc7(0x1d8)][_0x13abc7(0x17c)](_0x281086['pluginName'])&&!_0x4d75e3)throw new Error(_0x13abc7(0xf0)+_0x281086[_0x13abc7(0x188)]+_0x13abc7(0x1ee));this[_0x13abc7(0x1d8)]['set'](_0x281086[_0x13abc7(0x188)],[_0x281086,_0x4c3afb]);}[_0x55348f(0x182)](){const _0x3edf74=_0x55348f;return Array[_0x3edf74(0x126)](this[_0x3edf74(0x1d8)][_0x3edf74(0x154)]());}[_0x55348f(0x18d)](_0x2ae585,_0x534a71){const _0xdcf9a5=_0x55348f,_0x2206a8=document['getElementById'](UNIVER_HISTORY_CONTAINER_ID$1);if(!_0x2206a8)return;_0x2206a8['style'][_0xdcf9a5(0x18b)]=_0xdcf9a5(0xe6),this[_0xdcf9a5(0x19a)](_0x2ae585,UNIVER_HISTORY_CONTAINER_ID$1,_0x534a71);}[_0x55348f(0x1ca)](){const _0x3c519d=_0x55348f;var _0x4e1f33;this[_0x3c519d(0x199)][_0x3c519d(0x129)](),(_0x4e1f33=this[_0x3c519d(0x1b1)])===null||_0x4e1f33===void 0x0||_0x4e1f33[_0x3c519d(0x129)](),this[_0x3c519d(0xce)]['next'](null);const _0x5d24e4=document[_0x3c519d(0x171)](UNIVER_HISTORY_CONTAINER_ID$1);if(!_0x5d24e4)return;_0x5d24e4[_0x3c519d(0x16d)][_0x3c519d(0x18b)]='none',this[_0x3c519d(0x1ea)]&&(this[_0x3c519d(0x1ea)][_0x3c519d(0x191)](),this['_internalWebWorker']=null);}[_0x55348f(0x19a)](_0xf5d12c,_0x161409,_0x20d35f){const _0x257373=_0x55348f;var _0x2628d8,_0x2ed0d6,_0x20d16c,_0x47e00e;if(this[_0x257373(0x1b1)])return;const _0x1f4d14=new _univerjs_core['Univer']({'locales':{[this[_0x257373(0x15f)][_0x257373(0x184)]()]:this[_0x257373(0x15f)]['getLocales']()},'override':[[_univerjs_core[_0x257373(0x10d)],{'useClass':_univerjs_pro_collaboration_client[_0x257373(0xd5)]}]]}),_0x21340b=_0x1f4d14[_0x257373(0x102)]();this[_0x257373(0x1d7)](this[_0x257373(0x120)][_0x257373(0x1d9)]['subscribe'](_0x1e65a8=>{const _0x2e11a3=_0x257373;_0x21340b[_0x2e11a3(0x1bb)](_univerjs_core['ThemeService'])['setDarkMode'](_0x1e65a8);})),this[_0x257373(0x1d7)](this[_0x257373(0x120)][_0x257373(0x111)][_0x257373(0x109)](_0x4f389b=>{const _0x417d1c=_0x257373;_0x21340b[_0x417d1c(0x1bb)](_univerjs_core[_0x417d1c(0x1c2)])[_0x417d1c(0x1b7)](_0x4f389b);})),_0x21340b[_0x257373(0x1bb)](_univerjs_core[_0x257373(0x177)])[_0x257373(0xe9)](this[_0x257373(0x15f)]['getCurrentLocale']()),_0x21340b[_0x257373(0x1bb)](_univerjs_core[_0x257373(0x1ad)])[_0x257373(0x1df)](_univerjs_pro_collaboration_client[_0x257373(0x133)],this['_configService']['getConfig'](_univerjs_pro_collaboration_client['COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY']));const _0x585ee7=this[_0x257373(0xeb)][_0x257373(0x124)](_univerjs_pro_license[_0x257373(0x162)]);if(_0x585ee7)_0x1f4d14['registerPlugin'](_univerjs_pro_license[_0x257373(0x12c)],{'license':_0x585ee7['ls']});const _0x47fcad=(_0x2628d8=this[_0x257373(0xeb)][_0x257373(0x124)](_0x257373(0xcf)))===null||_0x2628d8===void 0x0?void 0x0:_0x2628d8[_0x257373(0x128)],_0x549021=!!_0x47fcad;_0x549021&&(this['_internalWebWorker']=_0x47fcad instanceof Worker?_0x47fcad:null,_0x1f4d14[_0x257373(0xf9)](_univerjs_rpc[_0x257373(0x1d3)],{'workerURL':_0x47fcad}));this[_0x257373(0x1d8)]['forEach'](([_0x536948,_0x18175f])=>{_0x1f4d14['registerPlugin'](_0x536948,_0x18175f);}),_0x1f4d14[_0x257373(0xf9)](_univerjs_pro_edit_history_viewer[_0x257373(0x164)],{'historyListServerUrl':(_0x2ed0d6=this[_0x257373(0xeb)][_0x257373(0x124)]('edit-history-loader.config'))===null||_0x2ed0d6===void 0x0?void 0x0:_0x2ed0d6[_0x257373(0x1b3)],'historyPanelComponentKey':(_0x20d16c=this[_0x257373(0xeb)][_0x257373(0x124)](_0x257373(0xcf)))===null||_0x20d16c===void 0x0?void 0x0:_0x20d16c['historyPanelComponentKey'],'historyPanelHidden':(_0x47e00e=this[_0x257373(0xeb)][_0x257373(0x124)]('edit-history-loader.config'))===null||_0x47e00e===void 0x0?void 0x0:_0x47e00e['historyPanelHidden']}),_0x21340b['invoke'](_0x1215fb=>{const _0x212e32=_0x257373;this[_0x212e32(0x145)](_0x1215fb,_0xf5d12c);}),this[_0x257373(0xce)][_0x257373(0x15b)](_0x1f4d14);const _0x587435=_0x21340b[_0x257373(0x1bb)](_univerjs_pro_edit_history_viewer[_0x257373(0x13e)]),_0x3ca623=this[_0x257373(0x178)](_0xf5d12c),_0x3b61ec=()=>{const _0x7f503b=_0x257373;if(_0x20d35f)_0x587435[_0x7f503b(0x1e9)](_0xf5d12c,_0x161409,_0x3ca623,_0x20d35f);else _0x587435[_0x7f503b(0x134)](_0xf5d12c,_0x161409,_0x3ca623);};this[_0x257373(0x161)][_0x257373(0x117)]({'content':this[_0x257373(0x15f)]['t']('editHistory.info.initializing'),'type':_univerjs_design[_0x257373(0x1eb)]['Loading']});if(_0x549021)try{_0x21340b['get'](_univerjs_rpc[_0x257373(0x125)])[_0x257373(0x10e)]()[_0x257373(0x1e1)](()=>{_0x3b61ec();});}catch{_0x3b61ec();}else _0x3b61ec();}['_initListener'](_0x4bce2b,_0x247487){const _0x52d61c=_0x55348f,_0x103bb7=_0x4bce2b[_0x52d61c(0x1bb)](_univerjs_pro_edit_history_viewer[_0x52d61c(0x13e)]);this[_0x52d61c(0x199)][_0x52d61c(0x169)](_0x103bb7['status$'][_0x52d61c(0x109)](_0x232fb7=>{const _0xe6a4b0=_0x52d61c;switch(_0x232fb7){case _univerjs_pro_edit_history_viewer[_0xe6a4b0(0x173)][_0xe6a4b0(0x135)]:this[_0xe6a4b0(0x1c9)][_0xe6a4b0(0x127)](),this['_sidebarService'][_0xe6a4b0(0x141)]();break;case _univerjs_pro_edit_history_viewer['HistoryModeStatus'][_0xe6a4b0(0xfb)]:this[_0xe6a4b0(0xf1)][_0xe6a4b0(0xfd)](ExitEditHistoryOperation['id']),this[_0xe6a4b0(0x1ca)]();break;case _univerjs_pro_edit_history_viewer['HistoryModeStatus']['Error']:this[_0xe6a4b0(0x1ca)](),this['_messageService']['show']({'content':this['_localeService']['t'](_0xe6a4b0(0x1b8)),'type':_univerjs_design[_0xe6a4b0(0x1eb)]['Error'],'duration':0xbb8});break;default:break;}})),this[_0x52d61c(0x199)][_0x52d61c(0x169)](_0x103bb7[_0x52d61c(0x1a6)][_0x52d61c(0x109)](async _0x16450=>{const _0x45bb7e=_0x52d61c;if(_0x16450)this[_0x45bb7e(0xf1)]['executeCommand'](_univerjs_pro_collaboration[_0x45bb7e(0x11d)]['id'],{'unitId':_0x247487,'revision':_0x16450});}));}['_checkCanRevert'](_0x588e50){const _0x4de80c=_0x55348f,_0x234054=this['_univerInstanceService'][_0x4de80c(0x1c8)](_0x588e50)[_0x4de80c(0x1ac)]()[_0x4de80c(0x1de)](_0xcc49a2=>_0xcc49a2[_0x4de80c(0x1c5)]()),_0x342518=new _univerjs_sheets[(_0x4de80c(0x176))](_0x588e50)['id'],_0x4ff4fb=_0x234054['map'](_0x3a7870=>new _univerjs_sheets['WorksheetEditPermission'](_0x588e50,_0x3a7870)['id']),_0x23057a=_0x234054[_0x4de80c(0x1de)](_0x279adb=>this['_selectionProtectionRuleModel']['getSubunitRuleList'](_0x588e50,_0x279adb)[_0x4de80c(0x1de)](_0x47d08c=>new _univerjs_sheets[(_0x4de80c(0x114))](_0x588e50,_0x279adb,_0x47d08c[_0x4de80c(0x13f)])['id']))[_0x4de80c(0x1bf)](),_0x1e8054=new _univerjs_sheets[(_0x4de80c(0x193))](_0x588e50)['id'];return this[_0x4de80c(0x1e8)][_0x4de80c(0xda)]([_0x342518,..._0x4ff4fb,..._0x23057a,_0x1e8054])['every'](_0x49d691=>!!_0x49d691['value']);}};MobileHistoryLoaderService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x55348f(0x1e4)])(_univerjs_core[_0x55348f(0x177)])),__decorateParam(0x1,_univerjs_core[_0x55348f(0xf3)]),__decorateParam(0x2,_univerjs_core[_0x55348f(0x1ad)]),__decorateParam(0x3,_univerjs_core['ICommandService']),__decorateParam(0x4,_univerjs_ui[_0x55348f(0x12f)]),__decorateParam(0x5,_univerjs_core[_0x55348f(0xff)]),__decorateParam(0x6,(0x0,_univerjs_core[_0x55348f(0x1e4)])(_univerjs_sheets[_0x55348f(0x1c7)])),__decorateParam(0x7,(0x0,_univerjs_core[_0x55348f(0x1e4)])(_univerjs_ui[_0x55348f(0x1b2)])),__decorateParam(0x8,(0x0,_univerjs_core[_0x55348f(0x1e4)])(_univerjs_ui['ISidebarService'])),__decorateParam(0x9,(0x0,_univerjs_core[_0x55348f(0x1e4)])(_univerjs_core[_0x55348f(0x1c2)]))],MobileHistoryLoaderService);let UniverEditHistoryLoaderMobilePlugin=class UniverEditHistoryLoaderMobilePlugin extends _univerjs_core[_0x55348f(0x17f)]{constructor(_0x5a9c7b=defaultPluginConfig,_0x1acb3a,_0x5b840f){const _0x34c963=_0x55348f;super(),this[_0x34c963(0xdf)]=_0x5a9c7b,this[_0x34c963(0x1d6)]=_0x1acb3a,this[_0x34c963(0xeb)]=_0x5b840f;const {menu:_0x15ab0d,..._0x271e6c}=(0x0,_univerjs_core[_0x34c963(0xd7)])({},defaultPluginConfig,this[_0x34c963(0xdf)]);if(_0x15ab0d)this[_0x34c963(0xeb)]['setConfig'](_0x34c963(0x196),_0x15ab0d,{'merge':!![]});this[_0x34c963(0xeb)][_0x34c963(0x1df)](EDIT_HISTORY_LOADER_PLUGIN_CONFIG_KEY,_0x271e6c);if(this[_0x34c963(0xdf)][_0x34c963(0x195)])this[_0x34c963(0xeb)][_0x34c963(0x1df)](UNIVER_CONTAINER_ID_KEY$1,this[_0x34c963(0xdf)]['univerContainerId']);}['onStarting'](){const _0x8f7704=_0x55348f;[[HistoryLoaderService,{'useClass':MobileHistoryLoaderService}],[MobileHistoryLoaderController]][_0x8f7704(0x1cf)](_0x3cea6a=>this[_0x8f7704(0x1d6)][_0x8f7704(0x169)](_0x3cea6a));}['onSteady'](){const _0x496b83=_0x55348f;this[_0x496b83(0x1d6)][_0x496b83(0x1bb)](MobileHistoryLoaderController);}};_defineProperty(UniverEditHistoryLoaderMobilePlugin,_0x55348f(0xfc),_univerjs_core[_0x55348f(0x165)]['UNIVER_UNKNOWN']),_defineProperty(UniverEditHistoryLoaderMobilePlugin,_0x55348f(0x188),_0x55348f(0x12e)),_defineProperty(UniverEditHistoryLoaderMobilePlugin,_0x55348f(0x198),name),_defineProperty(UniverEditHistoryLoaderMobilePlugin,'version',version),UniverEditHistoryLoaderMobilePlugin=__decorate([(0x0,_univerjs_core[_0x55348f(0x1b0)])(_univerjs_pro_license[_0x55348f(0x12c)]),__decorateParam(0x1,(0x0,_univerjs_core[_0x55348f(0x1e4)])(_univerjs_core[_0x55348f(0xd3)])),__decorateParam(0x2,_univerjs_core[_0x55348f(0x1ad)])],UniverEditHistoryLoaderMobilePlugin);let HistoryLoaderController=class HistoryLoaderController extends _univerjs_core[_0x55348f(0xd2)]{constructor(_0x1cdaaa,_0x599184,_0x3ca4e2,_0x1a87f4,_0x5548cf,_0x9c05f3,_0x139898,_0x39d731,_0x232764,_0x2052ed,_0x659183){const _0x133805=_0x55348f;super(),this['_commandService']=_0x1cdaaa,this[_0x133805(0x1c3)]=_0x599184,this[_0x133805(0x16b)]=_0x3ca4e2,this[_0x133805(0x19d)]=_0x1a87f4,this[_0x133805(0x15f)]=_0x5548cf,this[_0x133805(0x161)]=_0x9c05f3,this[_0x133805(0x1ed)]=_0x139898,this['_localCacheService']=_0x39d731,this[_0x133805(0x118)]=_0x232764,this[_0x133805(0x179)]=_0x2052ed,this[_0x133805(0x1ba)]=_0x659183,_defineProperty(this,_0x133805(0x100),null),this[_0x133805(0x1d2)]();}[_0x55348f(0x1d2)](){const _0x4bf9b4=_0x55348f;[ToggleEditHistoryOperation,ExitEditHistoryOperation][_0x4bf9b4(0x1cf)](_0x16e028=>this[_0x4bf9b4(0x1d7)]((0x0,_univerjs_core['toDisposable'])(this[_0x4bf9b4(0xf1)][_0x4bf9b4(0xf5)](_0x16e028)))),this[_0x4bf9b4(0x1d7)](this[_0x4bf9b4(0x16b)][_0x4bf9b4(0x186)](_0x4bf9b4(0x18c),_univerjs_icons[_0x4bf9b4(0x18c)])),this[_0x4bf9b4(0x1c3)][_0x4bf9b4(0x13b)](menuSchema),this[_0x4bf9b4(0x1d7)](this['_commandService'][_0x4bf9b4(0x1be)](async(_0x135a77,_0x581f8b)=>{const _0x3bbed4=_0x4bf9b4;if(_0x135a77['id']===_univerjs_pro_collaboration[_0x3bbed4(0x11d)]['id']){const {unitId:_0x3b128d}=_0x135a77[_0x3bbed4(0x167)];this[_0x3bbed4(0x161)][_0x3bbed4(0x117)]({'content':this[_0x3bbed4(0x15f)]['t'](_0x3bbed4(0x137)),'type':_univerjs_design[_0x3bbed4(0x1eb)]['Loading'],'duration':0x1388});const _0x42e6ae=this[_0x3bbed4(0x1ed)][_0x3bbed4(0x183)](_0x3b128d);if(!(_0x581f8b===null||_0x581f8b===void 0x0?void 0x0:_0x581f8b[_0x3bbed4(0x143)]))this['_handleRevertAcknowledgement'](_0x42e6ae,async()=>{const _0x6d332a=_0x3bbed4,_0xd23196=this[_0x6d332a(0x179)][_0x6d332a(0xe8)](_univerjs_core[_0x6d332a(0x165)][_0x6d332a(0x168)]),_0xff189b=_0xd23196===null||_0xd23196===void 0x0?void 0x0:_0xd23196[_0x6d332a(0x119)]();if(!_0xff189b)return![];this[_0x6d332a(0x179)][_0x6d332a(0xe2)](_0x3b128d);const _0x102ea4=await this[_0x6d332a(0x118)][_0x6d332a(0x1b9)](_0x3b128d,_univerjs_core['UniverInstanceType'][_0x6d332a(0x168)]);if(_0x102ea4&&_0x102ea4 instanceof _univerjs_core[_0x6d332a(0x115)])return await this['_setupSubUnitSync'](_0x102ea4,_0xff189b['getSheetId']()),!![];return![];});else this[_0x3bbed4(0x163)](_0x42e6ae,async()=>{const _0x5c106c=_0x3bbed4;return setTimeout(()=>window[_0x5c106c(0x152)][_0x5c106c(0x181)]()),!![];},!![]);}}));}['_handleRevertAcknowledgement'](_0x509c91,_0x4df98d,_0x9db203=![]){const _0x32dd34=_0x55348f,_0x2eec58=(0x0,rxjs[_0x32dd34(0x1a0)])([_0x509c91[_0x32dd34(0xf8)][_0x32dd34(0xfe)],_0x509c91[_0x32dd34(0x17b)]])['subscribe'](async([_0x105d38,_0x51b5ab])=>{const _0x5e934f=_0x32dd34;if(_0x105d38['eventID']===_univerjs_pro_collaboration[_0x5e934f(0x11a)][_0x5e934f(0x1bd)]&&(_0x51b5ab===null||_0x51b5ab===void 0x0?void 0x0:_0x51b5ab['status'])===_univerjs_pro_collaboration_client[_0x5e934f(0x131)][_0x5e934f(0x157)]){if(_0x105d38[_0x5e934f(0x1e2)]['mutations'][_0x5e934f(0xdd)](_0x5151a4=>_0x5151a4['id']===_univerjs_pro_collaboration[_0x5e934f(0x11d)]['id'])){if(await _0x4df98d()){var _0x190121;this[_0x5e934f(0x19d)][_0x5e934f(0x1ca)](),_0x2eec58[_0x5e934f(0xf7)](),this['_revertErrorTimer']&&clearTimeout(this[_0x5e934f(0x100)]),await((_0x190121=this[_0x5e934f(0x139)])===null||_0x190121===void 0x0?void 0x0:_0x190121[_0x5e934f(0x1ce)]());}}}});if(_0x9db203)this[_0x32dd34(0x100)]=setTimeout(()=>{const _0xf79ff=_0x32dd34;_0x2eec58[_0xf79ff(0xf7)](),this['_messageService'][_0xf79ff(0x117)]({'content':this[_0xf79ff(0x15f)]['t'](_0xf79ff(0x19f)),'type':_univerjs_design[_0xf79ff(0x1eb)]['Error'],'duration':0xbb8});},0x1388);}async[_0x55348f(0x112)](_0x57fad8,_0x5b928e){const _0x1b2c7c=_0x55348f;await this[_0x1b2c7c(0x14a)](_0x57fad8,_0x5b928e),_0x57fad8['activeSheet$']['pipe']((0x0,rxjs[_0x1b2c7c(0x18a)])(this['dispose$']))['subscribe'](_0x23a32d=>{const _0x324723=_0x1b2c7c;if(_0x23a32d)this[_0x324723(0x1dc)](_0x23a32d);}),this[_0x1b2c7c(0x1ba)][_0x1b2c7c(0xfa)][_0x1b2c7c(0xe5)]((0x0,rxjs[_0x1b2c7c(0x18a)])(this[_0x1b2c7c(0x1b6)]))[_0x1b2c7c(0x109)](()=>this[_0x1b2c7c(0x14a)](_0x57fad8,_0x5b928e));}[_0x55348f(0x1dc)](_0x302614,_0x3cc273=![]){const _0x3babb3=_0x55348f,_0x172174=this[_0x3babb3(0x1ba)][_0x3babb3(0x10c)]('subunit');if(_0x302614[_0x3babb3(0x1c5)]()!==_0x172174)this[_0x3babb3(0x1ba)][_0x3babb3(0x14f)]('subunit',_0x302614[_0x3babb3(0x1c5)](),_0x3cc273);}async[_0x55348f(0x14a)](_0x7f4969,_0x2a6568){const _0xd0b5c9=_0x55348f;var _0x4b2021;if(!_0x2a6568||!_0x7f4969[_0xd0b5c9(0x16c)](_0x2a6568)){const _0x32d8c5=_0x7f4969[_0xd0b5c9(0x1a1)]()[0x0],_0xf9691d=_0x7f4969[_0xd0b5c9(0x16c)](_0x32d8c5);if(!_0xf9691d)return;this['_updateURLWithCurrentState'](_0xf9691d,!![]),await this[_0xd0b5c9(0xf1)][_0xd0b5c9(0xfd)](_univerjs_sheets[_0xd0b5c9(0x160)]['id'],{'unitId':_0x7f4969[_0xd0b5c9(0x15e)](),'subUnitId':_0x32d8c5});return;}if(((_0x4b2021=_0x7f4969[_0xd0b5c9(0x119)]())===null||_0x4b2021===void 0x0?void 0x0:_0x4b2021[_0xd0b5c9(0x1c5)]())===_0x2a6568)return;await this[_0xd0b5c9(0xf1)]['executeCommand'](_univerjs_sheets[_0xd0b5c9(0x160)]['id'],{'unitId':_0x7f4969[_0xd0b5c9(0x15e)](),'subUnitId':_0x2a6568});}};HistoryLoaderController=__decorate([__decorateParam(0x0,_univerjs_core[_0x55348f(0xd0)]),__decorateParam(0x1,_univerjs_ui['IMenuManagerService']),__decorateParam(0x2,(0x0,_univerjs_core['Inject'])(_univerjs_ui['ComponentManager'])),__decorateParam(0x3,(0x0,_univerjs_core['Inject'])(HistoryLoaderService)),__decorateParam(0x4,(0x0,_univerjs_core[_0x55348f(0x1e4)])(_univerjs_core[_0x55348f(0x177)])),__decorateParam(0x5,_univerjs_ui[_0x55348f(0x12f)]),__decorateParam(0x6,(0x0,_univerjs_core[_0x55348f(0x1e4)])(_univerjs_pro_collaboration_client[_0x55348f(0x16f)])),__decorateParam(0x7,_univerjs_pro_collaboration_client[_0x55348f(0x12a)]),__decorateParam(0x8,(0x0,_univerjs_core[_0x55348f(0x1e4)])(_univerjs_pro_collaboration_client[_0x55348f(0x17e)])),__decorateParam(0x9,_univerjs_core['IUniverInstanceService']),__decorateParam(0xa,_univerjs_pro_collaboration_client_ui[_0x55348f(0x149)])],HistoryLoaderController);function _0x4be3(_0x1bd5ba,_0x3693ee){_0x1bd5ba=_0x1bd5ba-0xce;const _0x2db9a0=_0x2db9();let _0x4be3cf=_0x2db9a0[_0x1bd5ba];return _0x4be3cf;}let UniverEditHistoryLoaderPlugin=class UniverEditHistoryLoaderPlugin extends _univerjs_core['Plugin']{constructor(_0x344763=defaultPluginConfig,_0x1a3d65,_0x48ca21){const _0x3cae7f=_0x55348f;super(),this[_0x3cae7f(0xdf)]=_0x344763,this[_0x3cae7f(0x1d6)]=_0x1a3d65,this['_configService']=_0x48ca21;const {menu:_0xda80f2,..._0x1906a9}=(0x0,_univerjs_core['merge'])({},defaultPluginConfig,this['_config']);if(_0xda80f2)this[_0x3cae7f(0xeb)][_0x3cae7f(0x1df)](_0x3cae7f(0x196),_0xda80f2,{'merge':!![]});this[_0x3cae7f(0xeb)][_0x3cae7f(0x1df)](EDIT_HISTORY_LOADER_PLUGIN_CONFIG_KEY,_0x1906a9);if(this[_0x3cae7f(0xdf)][_0x3cae7f(0x195)])this['_configService'][_0x3cae7f(0x1df)](UNIVER_CONTAINER_ID_KEY,this['_config']['univerContainerId']);}[_0x55348f(0x16e)](){const _0x5bb257=_0x55348f;[[HistoryLoaderService],[HistoryLoaderController]]['forEach'](_0x411370=>this[_0x5bb257(0x1d6)][_0x5bb257(0x169)](_0x411370));}[_0x55348f(0x1ab)](){const _0x55603c=_0x55348f;this['_injector'][_0x55603c(0x1bb)](HistoryLoaderController);}};_defineProperty(UniverEditHistoryLoaderPlugin,_0x55348f(0xfc),_univerjs_core[_0x55348f(0x165)][_0x55348f(0xe0)]),_defineProperty(UniverEditHistoryLoaderPlugin,'pluginName',_0x55348f(0x187)),_defineProperty(UniverEditHistoryLoaderPlugin,_0x55348f(0x198),name),_defineProperty(UniverEditHistoryLoaderPlugin,_0x55348f(0x146),version),UniverEditHistoryLoaderPlugin=__decorate([(0x0,_univerjs_core[_0x55348f(0x1b0)])(_univerjs_pro_license[_0x55348f(0x12c)]),__decorateParam(0x1,(0x0,_univerjs_core[_0x55348f(0x1e4)])(_univerjs_core[_0x55348f(0xd3)])),__decorateParam(0x2,_univerjs_core[_0x55348f(0x1ad)])],UniverEditHistoryLoaderPlugin),exports[_0x55348f(0x1e6)]=EDIT_HISTORY_LOADER_PLUGIN_CONFIG_KEY,Object[_0x55348f(0x140)](exports,'HistoryLoaderService',{'enumerable':!![],'get':function(){return HistoryLoaderService;}}),Object[_0x55348f(0x140)](exports,'MobileHistoryLoaderService',{'enumerable':!![],'get':function(){return MobileHistoryLoaderService;}}),exports[_0x55348f(0x172)]=ToggleEditHistoryOperation,exports['UNIVER_CONTAINER_ID_KEY']=UNIVER_CONTAINER_ID_KEY,exports['UNIVER_HISTORY_CONTAINER_ID']=UNIVER_HISTORY_CONTAINER_ID,Object[_0x55348f(0x140)](exports,_0x55348f(0x1d5),{'enumerable':!![],'get':function(){return UniverEditHistoryLoaderMobilePlugin;}}),Object[_0x55348f(0x140)](exports,_0x55348f(0x175),{'enumerable':!![],'get':function(){return UniverEditHistoryLoaderPlugin;}});
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x1ea0aa=_0x4708;(function(_0x17bbac,_0x320fbe){const _0x1d8f0d=_0x4708,_0x240972=_0x17bbac();while(!![]){try{const _0x4adec0=parseInt(_0x1d8f0d(0x1fe))/0x1*(-parseInt(_0x1d8f0d(0x1ab))/0x2)+-parseInt(_0x1d8f0d(0x172))/0x3*(-parseInt(_0x1d8f0d(0x1eb))/0x4)+-parseInt(_0x1d8f0d(0x1d5))/0x5*(parseInt(_0x1d8f0d(0x1fb))/0x6)+parseInt(_0x1d8f0d(0x1a3))/0x7*(-parseInt(_0x1d8f0d(0x1e2))/0x8)+parseInt(_0x1d8f0d(0x186))/0x9+-parseInt(_0x1d8f0d(0x193))/0xa+parseInt(_0x1d8f0d(0x1ff))/0xb;if(_0x4adec0===_0x320fbe)break;else _0x240972['push'](_0x240972['shift']());}catch(_0x2883df){_0x240972['push'](_0x240972['shift']());}}}(_0x14cb,0x24566));import{CommandType,DependentOn,Disposable,DisposableCollection,IAuthzIoService,ICommandService,IConfigService,IPermissionService,IUniverInstanceService,Inject,Injector,LocaleService,Plugin,RxDisposable,ThemeService,Univer,UniverInstanceType,Workbook,merge,toDisposable}from'@univerjs/core';import{RangeProtectionPermissionEditPoint,RangeProtectionRuleModel,SetWorksheetActivateCommand,UniverSheetsPlugin,WorkbookEditablePermission,WorkbookRecoverHistoryPermission,WorkbookViewHistoryPermission,WorksheetEditPermission,getSheetCommandTarget}from'@univerjs/sheets';import{CollaborationEvent,RevertRevisionMutation,UniverCollaborationPlugin}from'@univerjs-pro/collaboration';import{AuthzIoHttpService,COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY,CollaborationController,CollaborationStatus,DataLoaderService,ILocalCacheService}from'@univerjs-pro/collaboration-client';import{HistoryManagerService,HistoryModeStatus,UniverEditHistoryViewerMobilePlugin,UniverEditHistoryViewerPlugin}from'@univerjs-pro/edit-history-viewer';import{LS_CONFIG_KEY,UniverLicensePlugin}from'@univerjs-pro/license';import{UniverSheetsChartPlugin}from'@univerjs-pro/sheets-chart';import{UniverSheetsChartUIPlugin}from'@univerjs-pro/sheets-chart-ui';import{UniverSheetsPivotTablePlugin}from'@univerjs-pro/sheets-pivot';import{UniverSheetsShapePlugin}from'@univerjs-pro/sheets-shape';import{UniverSheetsShapeUIPlugin}from'@univerjs-pro/sheets-shape-ui';import{UniverSheetSparklinePlugin}from'@univerjs-pro/sheets-sparkline';import{UniverSheetSparklineUIPlugin}from'@univerjs-pro/sheets-sparkline-ui';import{UniverDataValidationPlugin}from'@univerjs/data-validation';import{MessageType}from'@univerjs/design';import{UniverDocsPlugin}from'@univerjs/docs';import{UniverDocsUIPlugin}from'@univerjs/docs-ui';import{IImageIoService,UniverDrawingPlugin}from'@univerjs/drawing';import{UniverDrawingUIPlugin}from'@univerjs/drawing-ui';import{UniverFormulaEnginePlugin}from'@univerjs/engine-formula';import{UniverRenderEnginePlugin}from'@univerjs/engine-render';function _0x4708(_0xde87eb,_0x3cdea1){_0xde87eb=_0xde87eb-0x16d;const _0x14cbaf=_0x14cb();let _0x470820=_0x14cbaf[_0xde87eb];return _0x470820;}import{UniverNetworkPlugin}from'@univerjs/network';import{IRemoteInstanceService,UniverRPCMainThreadPlugin}from'@univerjs/rpc';import{UniverSheetsConditionalFormattingPlugin}from'@univerjs/sheets-conditional-formatting';import{UniverSheetsConditionalFormattingUIPlugin}from'@univerjs/sheets-conditional-formatting-ui';import{UniverSheetsDataValidationPlugin}from'@univerjs/sheets-data-validation';import{UniverSheetsDataValidationMobileUIPlugin,UniverSheetsDataValidationUIPlugin}from'@univerjs/sheets-data-validation-ui';import{UniverSheetsDrawingPlugin}from'@univerjs/sheets-drawing';import{UniverSheetsDrawingUIPlugin}from'@univerjs/sheets-drawing-ui';import{UniverSheetsFilterPlugin}from'@univerjs/sheets-filter';import{UniverSheetsFilterUIPlugin}from'@univerjs/sheets-filter-ui';import{UniverSheetsFormulaPlugin}from'@univerjs/sheets-formula';import{UniverSheetsFormulaUIPlugin}from'@univerjs/sheets-formula-ui';import{UniverSheetsHyperLinkPlugin}from'@univerjs/sheets-hyper-link';import{UniverSheetsHyperLinkUIPlugin}from'@univerjs/sheets-hyper-link-ui';import{UniverSheetsNumfmtPlugin}from'@univerjs/sheets-numfmt';import{UniverSheetsTablePlugin}from'@univerjs/sheets-table';import{UniverSheetsMobileUIPlugin,UniverSheetsUIPlugin,getCurrentRangeDisable$}from'@univerjs/sheets-ui';import{ComponentManager,IDialogService,IMenuManagerService,IMessageService,ISidebarService,MenuItemType,RibbonStartGroup,UniverMobileUIPlugin,UniverUIPlugin,getMenuHiddenObservable}from'@univerjs/ui';import{BehaviorSubject,combineLatest,takeUntil}from'rxjs';import{IURLService}from'@univerjs-pro/collaboration-client-ui';import{HistoryIcon}from'@univerjs/icons';const EDIT_HISTORY_LOADER_PLUGIN_CONFIG_KEY='edit-history-loader.config',configSymbol=Symbol(EDIT_HISTORY_LOADER_PLUGIN_CONFIG_KEY),defaultPluginConfig={};function _typeof(_0x109ef8){'@babel/helpers - typeof';const _0x55b099=_0x4708;return _typeof=_0x55b099(0x1f2)==typeof Symbol&&_0x55b099(0x1cb)==typeof Symbol[_0x55b099(0x1e0)]?function(_0x5a0e95){return typeof _0x5a0e95;}:function(_0x226571){const _0x507747=_0x55b099;return _0x226571&&'function'==typeof Symbol&&_0x226571[_0x507747(0x1e8)]===Symbol&&_0x226571!==Symbol['prototype']?_0x507747(0x1cb):typeof _0x226571;},_typeof(_0x109ef8);}function toPrimitive(_0x5dfed0,_0x21b6e8){const _0x433fde=_0x4708;if(_0x433fde(0x195)!=_typeof(_0x5dfed0)||!_0x5dfed0)return _0x5dfed0;var _0x14afc3=_0x5dfed0[Symbol[_0x433fde(0x1d3)]];if(void 0x0!==_0x14afc3){var _0x3c12fa=_0x14afc3[_0x433fde(0x1d2)](_0x5dfed0,_0x21b6e8||_0x433fde(0x1cc));if('object'!=_typeof(_0x3c12fa))return _0x3c12fa;throw new TypeError(_0x433fde(0x1a1));}return(_0x433fde(0x216)===_0x21b6e8?String:Number)(_0x5dfed0);}function toPropertyKey(_0x40fd3a){const _0x44298c=_0x4708;var _0x6e6a5d=toPrimitive(_0x40fd3a,_0x44298c(0x216));return _0x44298c(0x1cb)==_typeof(_0x6e6a5d)?_0x6e6a5d:_0x6e6a5d+'';}function _defineProperty(_0x354e7b,_0x2e26e5,_0x3ea75b){const _0x649c4e=_0x4708;return(_0x2e26e5=toPropertyKey(_0x2e26e5))in _0x354e7b?Object[_0x649c4e(0x176)](_0x354e7b,_0x2e26e5,{'value':_0x3ea75b,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x354e7b[_0x2e26e5]=_0x3ea75b,_0x354e7b;}function __decorateParam(_0x10fb6d,_0x30892b){return function(_0x308f53,_0x2d1c10){_0x30892b(_0x308f53,_0x2d1c10,_0x10fb6d);};}function __decorate(_0x24a819,_0x131aef,_0x2d010e,_0x236a62){const _0x5defbf=_0x4708;var _0x2a1fe6=arguments[_0x5defbf(0x20f)],_0xed24ad=_0x2a1fe6<0x3?_0x131aef:_0x236a62===null?_0x236a62=Object['getOwnPropertyDescriptor'](_0x131aef,_0x2d010e):_0x236a62,_0x149a8f;if(typeof Reflect==='object'&&typeof Reflect[_0x5defbf(0x19e)]===_0x5defbf(0x1f2))_0xed24ad=Reflect[_0x5defbf(0x19e)](_0x24a819,_0x131aef,_0x2d010e,_0x236a62);else{for(var _0x583d71=_0x24a819['length']-0x1;_0x583d71>=0x0;_0x583d71--)if(_0x149a8f=_0x24a819[_0x583d71])_0xed24ad=(_0x2a1fe6<0x3?_0x149a8f(_0xed24ad):_0x2a1fe6>0x3?_0x149a8f(_0x131aef,_0x2d010e,_0xed24ad):_0x149a8f(_0x131aef,_0x2d010e))||_0xed24ad;}return _0x2a1fe6>0x3&&_0xed24ad&&Object[_0x5defbf(0x176)](_0x131aef,_0x2d010e,_0xed24ad),_0xed24ad;}const DEFAULT_UNIVER_CONTAINER_ID$1=_0x1ea0aa(0x1de),UNIVER_CONTAINER_ID_KEY=_0x1ea0aa(0x1c6),UNIVER_HISTORY_CONTAINER_ID='univer-history-container';let HistoryLoaderService=class HistoryLoaderService extends Disposable{constructor(_0x2c958f,_0x3cfb4d,_0x5e0262,_0x47c679,_0x266b68,_0xea6073,_0x431045,_0x565d40,_0x52ff44,_0x163071){const _0x3e2556=_0x1ea0aa;super(),this[_0x3e2556(0x171)]=_0x2c958f,this['_univerInstanceService']=_0x3cfb4d,this[_0x3e2556(0x1a6)]=_0x5e0262,this[_0x3e2556(0x205)]=_0x47c679,this[_0x3e2556(0x197)]=_0x266b68,this[_0x3e2556(0x1df)]=_0xea6073,this['_selectionProtectionRuleModel']=_0x431045,this[_0x3e2556(0x1c5)]=_0x565d40,this[_0x3e2556(0x1c8)]=_0x52ff44,this[_0x3e2556(0x1fc)]=_0x163071,_defineProperty(this,_0x3e2556(0x212),new BehaviorSubject(null)),_defineProperty(this,_0x3e2556(0x1e9),this[_0x3e2556(0x212)][_0x3e2556(0x220)]()),_defineProperty(this,'_disposableCollection',new DisposableCollection()),_defineProperty(this,_0x3e2556(0x184),new Map()),_defineProperty(this,_0x3e2556(0x1ca),null),this[_0x3e2556(0x18d)]();}get[_0x1ea0aa(0x190)](){const _0x2d79f8=_0x1ea0aa;return this[_0x2d79f8(0x212)]['value'];}['_init'](){const _0x3e49ab=_0x1ea0aa;this['_initContainer'](),this[_0x3e49ab(0x22e)]();}[_0x1ea0aa(0x1ad)](){const _0xd33ffd=_0x1ea0aa;var _0x435297;const _0x3f622b=(_0x435297=this[_0xd33ffd(0x1a6)][_0xd33ffd(0x22c)](_0xd33ffd(0x1c6)))!==null&&_0x435297!==void 0x0?_0x435297:DEFAULT_UNIVER_CONTAINER_ID$1,_0x4305b4=document[_0xd33ffd(0x226)](_0x3f622b);if(!_0x4305b4)return;const _0x4ac13b=document[_0xd33ffd(0x224)](_0xd33ffd(0x1ac));_0x4ac13b['id']=UNIVER_HISTORY_CONTAINER_ID,_0x4ac13b[_0xd33ffd(0x1c2)]['uComp']=_0xd33ffd(0x185),_0x4ac13b[_0xd33ffd(0x1bd)][_0xd33ffd(0x223)]=_0xd33ffd(0x227),_0x4ac13b[_0xd33ffd(0x1bd)][_0xd33ffd(0x1e7)]='0',_0x4ac13b[_0xd33ffd(0x1bd)][_0xd33ffd(0x173)]='0',_0x4ac13b[_0xd33ffd(0x1bd)]['width']=_0xd33ffd(0x1dc),_0x4ac13b[_0xd33ffd(0x1bd)][_0xd33ffd(0x213)]=_0xd33ffd(0x1dc),_0x4ac13b['style'][_0xd33ffd(0x20b)]='49',_0x4ac13b[_0xd33ffd(0x1bd)]['display']=_0xd33ffd(0x187),_0x4305b4[_0xd33ffd(0x1fa)](_0x4ac13b);}[_0x1ea0aa(0x22e)](){const _0x36806e=_0x1ea0aa;[[UniverRenderEnginePlugin],[UniverUIPlugin,{'container':UNIVER_HISTORY_CONTAINER_ID,'header':!![],'toolbar':![],'footer':!![],'contextMenu':![],'override':[[IDialogService,null]]}],[UniverNetworkPlugin],[UniverDrawingPlugin,{'override':[[IImageIoService,null]]}],[UniverDocsPlugin,{'hasScroll':![]}],[UniverDocsUIPlugin],[UniverSheetsNumfmtPlugin],[UniverSheetsPlugin,{'notExecuteFormula':!![]}],[UniverSheetsUIPlugin],[UniverSheetsFormulaPlugin],[UniverSheetsFormulaUIPlugin],[UniverCollaborationPlugin],[UniverSheetsFilterPlugin],[UniverSheetsFilterUIPlugin],[UniverSheetsConditionalFormattingPlugin],[UniverSheetsConditionalFormattingUIPlugin],[UniverSheetsHyperLinkPlugin],[UniverSheetsHyperLinkUIPlugin],[UniverDataValidationPlugin],[UniverSheetsDataValidationPlugin],[UniverSheetsDataValidationUIPlugin],[UniverFormulaEnginePlugin,{'notExecuteFormula':!![]}],[UniverDrawingUIPlugin],[UniverSheetsDrawingPlugin],[UniverSheetsDrawingUIPlugin],[UniverSheetSparklinePlugin],[UniverSheetSparklineUIPlugin],[UniverSheetsChartPlugin],[UniverSheetsChartUIPlugin],[UniverSheetsShapePlugin],[UniverSheetsShapeUIPlugin],[UniverSheetsPivotTablePlugin,{'notExecuteFormula':!![]}],[UniverSheetsTablePlugin]]['forEach'](([_0x13ad2c,_0x344784])=>this[_0x36806e(0x1bc)](_0x13ad2c,_0x344784));}[_0x1ea0aa(0x1e5)](){const _0x2143f8=_0x1ea0aa;super['dispose'](),this[_0x2143f8(0x1aa)](),this[_0x2143f8(0x184)]['clear']();}[_0x1ea0aa(0x1bc)](_0x36e25e,_0x5bec81,_0x11b6f2){const _0x527580=_0x1ea0aa;if(this['_pluginMap']['has'](_0x36e25e[_0x527580(0x1b4)])&&!_0x11b6f2)throw new Error('[HistoryLoaderService]:\x20Plugin\x20'+_0x36e25e[_0x527580(0x1b4)]+_0x527580(0x17e));this['_pluginMap'][_0x527580(0x1f4)](_0x36e25e[_0x527580(0x1b4)],[_0x36e25e,_0x5bec81]);}[_0x1ea0aa(0x1e6)](){const _0x2a8f30=_0x1ea0aa;return Array['from'](this[_0x2a8f30(0x184)][_0x2a8f30(0x22d)]());}[_0x1ea0aa(0x1b0)](_0x3f332d,_0x1c2148){const _0x5e9630=_0x1ea0aa,_0x53b317=document['getElementById'](UNIVER_HISTORY_CONTAINER_ID);if(!_0x53b317)return;_0x53b317[_0x5e9630(0x1bd)][_0x5e9630(0x19a)]=_0x5e9630(0x170),this[_0x5e9630(0x1c3)](_0x3f332d,UNIVER_HISTORY_CONTAINER_ID,_0x1c2148);}[_0x1ea0aa(0x1aa)](){const _0x39e4ad=_0x1ea0aa;var _0x2498f9;this[_0x39e4ad(0x181)][_0x39e4ad(0x1e5)](),(_0x2498f9=this['historyUniver'])===null||_0x2498f9===void 0x0||_0x2498f9[_0x39e4ad(0x1e5)](),this[_0x39e4ad(0x212)][_0x39e4ad(0x182)](null);const _0x503d1e=document['getElementById'](UNIVER_HISTORY_CONTAINER_ID);if(!_0x503d1e)return;_0x503d1e[_0x39e4ad(0x1bd)][_0x39e4ad(0x19a)]=_0x39e4ad(0x187),this[_0x39e4ad(0x1ca)]&&(this[_0x39e4ad(0x1ca)]['terminate'](),this[_0x39e4ad(0x1ca)]=null);}[_0x1ea0aa(0x1c3)](_0x17d9e1,_0x1a649a,_0x5b33cb){const _0x2f3243=_0x1ea0aa;var _0x24b8c3,_0x3b1f24,_0x467d80,_0x15d2d5,_0x4c5909;if(this[_0x2f3243(0x190)])return;const _0x480aab=new Univer({'locales':{[this[_0x2f3243(0x171)]['getCurrentLocale']()]:this['_localeService'][_0x2f3243(0x1e4)]()},'override':[[IAuthzIoService,{'useClass':AuthzIoHttpService}]]}),_0x13f741=_0x480aab['__getInjector']();this[_0x2f3243(0x1f9)](this['_themeService'][_0x2f3243(0x16e)][_0x2f3243(0x228)](_0x1be2bb=>{const _0x1cd330=_0x2f3243;_0x13f741[_0x1cd330(0x1b1)](ThemeService)['setDarkMode'](_0x1be2bb);})),this[_0x2f3243(0x1f9)](this['_themeService'][_0x2f3243(0x210)]['subscribe'](_0x1e788d=>{_0x13f741['get'](ThemeService)['setTheme'](_0x1e788d);})),_0x13f741['get'](LocaleService)['setLocale'](this['_localeService'][_0x2f3243(0x1ef)]()),_0x13f741[_0x2f3243(0x1b1)](IConfigService)[_0x2f3243(0x1a8)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY,this[_0x2f3243(0x1a6)][_0x2f3243(0x22c)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY));const _0x5692e7=this[_0x2f3243(0x1a6)][_0x2f3243(0x22c)](LS_CONFIG_KEY);if(_0x5692e7)_0x480aab['registerPlugin'](UniverLicensePlugin,{'license':_0x5692e7['ls']});const _0x1715f1=(_0x24b8c3=this[_0x2f3243(0x1a6)][_0x2f3243(0x22c)](_0x2f3243(0x18a)))===null||_0x24b8c3===void 0x0?void 0x0:_0x24b8c3[_0x2f3243(0x1c0)],_0x3f5081=!!_0x1715f1;_0x3f5081&&(this[_0x2f3243(0x1ca)]=_0x1715f1 instanceof Worker?_0x1715f1:null,_0x480aab[_0x2f3243(0x1bc)](UniverRPCMainThreadPlugin,{'workerURL':_0x1715f1}));this[_0x2f3243(0x184)]['forEach'](([_0x3f3c23,_0xfd64b7])=>{const _0x1b157d=_0x2f3243;_0x480aab[_0x1b157d(0x1bc)](_0x3f3c23,_0xfd64b7);}),_0x480aab[_0x2f3243(0x1bc)](UniverEditHistoryViewerPlugin,{'historyListServerUrl':(_0x3b1f24=this['_configService'][_0x2f3243(0x22c)]('edit-history-loader.config'))===null||_0x3b1f24===void 0x0?void 0x0:_0x3b1f24['historyListServerUrl'],'historyPanelComponentKey':(_0x467d80=this[_0x2f3243(0x1a6)][_0x2f3243(0x22c)](_0x2f3243(0x18a)))===null||_0x467d80===void 0x0?void 0x0:_0x467d80[_0x2f3243(0x188)],'historyPanelHidden':(_0x15d2d5=this[_0x2f3243(0x1a6)][_0x2f3243(0x22c)](_0x2f3243(0x18a)))===null||_0x15d2d5===void 0x0?void 0x0:_0x15d2d5[_0x2f3243(0x1ec)],'historyAIassistantEnabled':(_0x4c5909=this[_0x2f3243(0x1a6)][_0x2f3243(0x22c)](_0x2f3243(0x18a)))===null||_0x4c5909===void 0x0?void 0x0:_0x4c5909[_0x2f3243(0x1cf)]}),_0x13f741[_0x2f3243(0x20a)](_0x5e78da=>{const _0x5bbbd6=_0x2f3243;this[_0x5bbbd6(0x218)](_0x5e78da,_0x17d9e1);}),this[_0x2f3243(0x212)][_0x2f3243(0x182)](_0x480aab);const _0x2a4cb1=_0x13f741[_0x2f3243(0x1b1)](HistoryManagerService),_0x53a491=this[_0x2f3243(0x21a)](_0x17d9e1),_0x318566=()=>{const _0x53d5cf=_0x2f3243;if(_0x5b33cb)_0x2a4cb1[_0x53d5cf(0x1a2)](_0x17d9e1,_0x1a649a,_0x53a491,_0x5b33cb);else _0x2a4cb1['triggerLoadVersions'](_0x17d9e1,_0x1a649a,_0x53a491);};this['_messageService']['show']({'content':this[_0x2f3243(0x171)]['t']('editHistory.info.initializing'),'type':MessageType[_0x2f3243(0x222)]});if(_0x3f5081)try{_0x13f741[_0x2f3243(0x1b1)](IRemoteInstanceService)[_0x2f3243(0x1ce)]()[_0x2f3243(0x1f3)](()=>{_0x318566();});}catch{_0x318566();}else _0x318566();}[_0x1ea0aa(0x218)](_0x2b9ab0,_0x29184e){const _0x439a29=_0x1ea0aa,_0x4d9904=_0x2b9ab0[_0x439a29(0x1b1)](HistoryManagerService);this['_disposableCollection'][_0x439a29(0x209)](_0x4d9904[_0x439a29(0x1d8)]['subscribe'](_0x1e9e0f=>{const _0xe46c4b=_0x439a29;switch(_0x1e9e0f){case HistoryModeStatus[_0xe46c4b(0x1b6)]:this['_dialogService'][_0xe46c4b(0x1f8)](),this['_sidebarService']['close']();break;case HistoryModeStatus['Exited']:this[_0xe46c4b(0x205)][_0xe46c4b(0x1b9)](ExitEditHistoryOperation['id']),this[_0xe46c4b(0x1aa)]();break;case HistoryModeStatus[_0xe46c4b(0x21c)]:this[_0xe46c4b(0x1aa)](),this[_0xe46c4b(0x197)][_0xe46c4b(0x21b)]({'content':this['_localeService']['t'](_0xe46c4b(0x21d)),'type':MessageType['Error'],'duration':0xbb8});break;default:break;}})),this[_0x439a29(0x181)][_0x439a29(0x209)](_0x4d9904[_0x439a29(0x219)]['subscribe'](async _0x27a1fb=>{const _0x312d62=_0x439a29;if(_0x27a1fb)this['_commandService'][_0x312d62(0x1b9)](RevertRevisionMutation['id'],{'unitId':_0x29184e,'revision':_0x27a1fb});}));}[_0x1ea0aa(0x21a)](_0x2687b8){const _0x16156e=_0x1ea0aa,_0x5877a3=this['_univerInstanceService'][_0x16156e(0x1a4)](_0x2687b8)[_0x16156e(0x17b)]()[_0x16156e(0x1d9)](_0x36518e=>_0x36518e['getSheetId']()),_0x2b17af=new WorkbookEditablePermission(_0x2687b8)['id'],_0x65b621=_0x5877a3[_0x16156e(0x1d9)](_0x1d37f3=>new WorksheetEditPermission(_0x2687b8,_0x1d37f3)['id']),_0x4a3b13=_0x5877a3['map'](_0x52b0b5=>this[_0x16156e(0x1b8)][_0x16156e(0x221)](_0x2687b8,_0x52b0b5)['map'](_0x33e18b=>new RangeProtectionPermissionEditPoint(_0x2687b8,_0x52b0b5,_0x33e18b['permissionId'])['id']))[_0x16156e(0x1b3)](),_0x31df2c=new WorkbookRecoverHistoryPermission(_0x2687b8)['id'];return this[_0x16156e(0x1df)][_0x16156e(0x179)]([_0x2b17af,..._0x65b621,..._0x4a3b13,_0x31df2c])['every'](_0x3b57bd=>!!_0x3b57bd[_0x16156e(0x18b)]);}};HistoryLoaderService=__decorate([__decorateParam(0x0,Inject(LocaleService)),__decorateParam(0x1,IUniverInstanceService),__decorateParam(0x2,IConfigService),__decorateParam(0x3,ICommandService),__decorateParam(0x4,IMessageService),__decorateParam(0x5,IPermissionService),__decorateParam(0x6,Inject(RangeProtectionRuleModel)),__decorateParam(0x7,Inject(IDialogService)),__decorateParam(0x8,Inject(ISidebarService)),__decorateParam(0x9,Inject(ThemeService))],HistoryLoaderService);function _0x14cb(){const _0x1299f2=['_commandService','@univerjs-pro/edit-history-loader','_historyManagerService','dispose$','add','invoke','zIndex','HistoryIcon','BUTTON','editHistory.info.initializing','length','currentTheme$','univer.operation.toggle-edit-history','_historyUniver$','height','packageName','setParam','string','fromCollab','_initListener','revertRevision$','_checkCanRevert','show','Error','editHistory.panel.listFetchError','_localCacheService','getUnhiddenWorksheets','asObservable','getSubunitRuleList','Loading','position','createElement','getActiveSheet','getElementById','absolute','subscribe','getCurrentUnitOfType','clear','historyListServerUrl','getConfig','values','_initPlugins','UNIVER_UNKNOWN','onCommandExecuted','event$','darkMode$','onStarting','block','_localeService','129qZsexH','left','__getInjector','version','defineProperty','Exited','has','composePermission','unsubscribe','getSheets','mergeMenu','_componentManager','\x20has\x20been\x20registered.','width','location','_disposableCollection','next','_urlService','_pluginMap','history-container','178794PxXqlP','none','historyPanelComponentKey','editHistory.panel.title','edit-history-loader.config','value','_updateURLWithCurrentState','_init','state$','editHistory.panel.revertFailed','historyUniver','reload','UNIVER_EDIT_HISTORY_LOADER_MOBILE_PLUGIN','2393010cjXIwX','_injector','object','loadUnit','_messageService','getSheetId','univer-history-container-mobile','display','OPERATION','setLocale','CHANGESET_ACK','decorate','_univerInstanceService','_dataLoaderService','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','triggerCustomVersions','35OmXtxn','getUnit','SYNCED','_configService','onSteady','setConfig','getSheetBySheetId','unMountHistoryContent','2nUpXFR','div','_initContainer','0.21.1','[MobileHistoryLoaderService]:\x20Plugin\x20','mountHistoryContent','get','data','flat','pluginName','pipe','Entered','_handleRevertAcknowledgement','_selectionProtectionRuleModel','executeCommand','type','status','registerPlugin','style','_collaborationController','mutations','workerURL','getCollabEntity','dataset','_initUniver','triggerLoadVersions','_dialogService','UNIVER_CONTAINER_ID','uComp','_sidebarService','_menuManagerService','_internalWebWorker','symbol','default','_setupSubUnitSync','whenReady','historyAIassistantEnabled','forEach','UNIVER_EDIT_HISTORY_LOADER_PLUGIN','call','toPrimitive','permissionId','4045tOlWuZ','registerCommand','subunit','status$','map','register','_updateSubUnitFromURLParams','100%','session','univer-container','_permissionService','iterator','setDarkMode','5552UoKEFK','setTheme','getLocales','dispose','getAllPlugins','top','constructor','historyUniver$','_config','23148ZHViSZ','historyPanelHidden','eventID','some','getCurrentLocale','from','every','function','then','set','menu','getUnitId','editHistory.panel.reverting','closeAll','disposeWithMe','appendChild','804eRHTrR','_themeService','UNIVER_SHEET','31366LbwVNQ','2889414QfVEir','univerContainerId','urlChange$','exhaustSavingTask','params','_revertErrorTimer'];_0x14cb=function(){return _0x1299f2;};return _0x14cb();}const ToggleEditHistoryOperation={'id':_0x1ea0aa(0x211),'type':CommandType[_0x1ea0aa(0x19b)],'handler':_0x52fcfc=>{const _0x1029de=_0x1ea0aa,_0x2a8636=_0x52fcfc['get'](HistoryLoaderService),{unitId:_0x59ea1d}=getSheetCommandTarget(_0x52fcfc[_0x1029de(0x1b1)](IUniverInstanceService))||{};if(!_0x59ea1d)return![];return _0x2a8636[_0x1029de(0x1b0)](_0x59ea1d),!![];}},ExitEditHistoryOperation={'id':'univer.operation.exit-edit-history','type':CommandType[_0x1ea0aa(0x19b)],'handler':()=>!![]};var name=_0x1ea0aa(0x206),version=_0x1ea0aa(0x1ae);function ToggleEditHistoryMenuFactory(_0x2dc09e){const _0x8ff1bb=_0x1ea0aa;return{'id':ToggleEditHistoryOperation['id'],'type':MenuItemType[_0x8ff1bb(0x20d)],'icon':'HistoryIcon','tooltip':_0x8ff1bb(0x189),'hidden$':getMenuHiddenObservable(_0x2dc09e,UniverInstanceType['UNIVER_SHEET']),'disabled$':getCurrentRangeDisable$(_0x2dc09e,{'workbookTypes':[WorkbookViewHistoryPermission],'worksheetTypes':[],'rangeTypes':[]})};}const menuSchema={[RibbonStartGroup['OTHERS']]:{[ToggleEditHistoryOperation['id']]:{'order':0.2,'menuItemFactory':ToggleEditHistoryMenuFactory}}};let MobileHistoryLoaderController=class MobileHistoryLoaderController extends RxDisposable{constructor(_0x42793c,_0x1315e4,_0x14d44a,_0x9cd027,_0x1b8713,_0x4128a0,_0x4085c7,_0x298ac4,_0x389ec7,_0x4e2c3b,_0x1155ab){const _0x266500=_0x1ea0aa;super(),this[_0x266500(0x205)]=_0x42793c,this[_0x266500(0x1c9)]=_0x1315e4,this['_componentManager']=_0x14d44a,this[_0x266500(0x207)]=_0x9cd027,this[_0x266500(0x171)]=_0x1b8713,this[_0x266500(0x197)]=_0x4128a0,this[_0x266500(0x1be)]=_0x4085c7,this['_localCacheService']=_0x298ac4,this['_dataLoaderService']=_0x389ec7,this['_univerInstanceService']=_0x4e2c3b,this[_0x266500(0x183)]=_0x1155ab,_defineProperty(this,_0x266500(0x204),null),this[_0x266500(0x18d)]();}[_0x1ea0aa(0x18d)](){const _0x865a62=_0x1ea0aa;[ToggleEditHistoryOperation,ExitEditHistoryOperation][_0x865a62(0x1d0)](_0x164e01=>this['disposeWithMe'](toDisposable(this[_0x865a62(0x205)][_0x865a62(0x1d6)](_0x164e01)))),this[_0x865a62(0x1f9)](this['_componentManager'][_0x865a62(0x1da)](_0x865a62(0x20c),HistoryIcon)),this[_0x865a62(0x1c9)][_0x865a62(0x17c)](menuSchema),this['disposeWithMe'](this[_0x865a62(0x205)][_0x865a62(0x230)](async(_0x28016b,_0xff8526)=>{const _0x4ed778=_0x865a62;if(_0x28016b['id']===RevertRevisionMutation['id']){const {unitId:_0x3e1ae5}=_0x28016b[_0x4ed778(0x203)];this[_0x4ed778(0x197)]['show']({'content':this[_0x4ed778(0x171)]['t'](_0x4ed778(0x1f7)),'type':MessageType['Loading'],'duration':0x1388});const _0x4b4838=this[_0x4ed778(0x1be)][_0x4ed778(0x1c1)](_0x3e1ae5);if(!(_0xff8526===null||_0xff8526===void 0x0?void 0x0:_0xff8526['fromCollab']))this[_0x4ed778(0x1b7)](_0x4b4838,async()=>{const _0x13fed3=_0x4ed778,_0x7c2aab=this['_univerInstanceService'][_0x13fed3(0x229)](UniverInstanceType['UNIVER_SHEET']),_0x31f8ba=_0x7c2aab===null||_0x7c2aab===void 0x0?void 0x0:_0x7c2aab['getActiveSheet']();if(!_0x31f8ba)return![];this[_0x13fed3(0x19f)]['disposeUnit'](_0x3e1ae5);const _0x138ef7=await this[_0x13fed3(0x1a0)][_0x13fed3(0x196)](_0x3e1ae5,UniverInstanceType[_0x13fed3(0x1fd)]);if(_0x138ef7&&_0x138ef7 instanceof Workbook)return await this[_0x13fed3(0x1cd)](_0x138ef7,_0x31f8ba[_0x13fed3(0x198)]()),!![];return![];});else this[_0x4ed778(0x1b7)](_0x4b4838,async()=>{const _0x3fc13a=_0x4ed778;return setTimeout(()=>window[_0x3fc13a(0x180)]['reload']()),!![];},!![]);}}));}['_handleRevertAcknowledgement'](_0x5622ad,_0x49963b,_0x3247a3=![]){const _0x1c29aa=_0x1ea0aa,_0x11641e=combineLatest([_0x5622ad[_0x1c29aa(0x1dd)][_0x1c29aa(0x16d)],_0x5622ad[_0x1c29aa(0x18e)]])[_0x1c29aa(0x228)](async([_0x42cc5c,_0x52c039])=>{const _0x337c14=_0x1c29aa;if(_0x42cc5c['eventID']===CollaborationEvent[_0x337c14(0x19d)]&&(_0x52c039===null||_0x52c039===void 0x0?void 0x0:_0x52c039[_0x337c14(0x1bb)])===CollaborationStatus[_0x337c14(0x1a5)]){if(_0x42cc5c[_0x337c14(0x1b2)][_0x337c14(0x1bf)][_0x337c14(0x1ee)](_0x160aef=>_0x160aef['id']===RevertRevisionMutation['id'])){if(await _0x49963b()){var _0x4fe65d;this[_0x337c14(0x207)][_0x337c14(0x1aa)](),_0x11641e['unsubscribe'](),this[_0x337c14(0x204)]&&clearTimeout(this[_0x337c14(0x204)]),await((_0x4fe65d=this['_localCacheService'])===null||_0x4fe65d===void 0x0?void 0x0:_0x4fe65d[_0x337c14(0x202)]()),this[_0x337c14(0x197)]['removeAll']();}}}});if(_0x3247a3)this['_revertErrorTimer']=setTimeout(()=>{const _0x24275f=_0x1c29aa;_0x11641e[_0x24275f(0x17a)](),this[_0x24275f(0x197)][_0x24275f(0x21b)]({'content':this[_0x24275f(0x171)]['t'](_0x24275f(0x18f)),'type':MessageType[_0x24275f(0x21c)],'duration':0xbb8});},0x1388);}async[_0x1ea0aa(0x1cd)](_0x6f12f2,_0x206405){const _0x3481e6=_0x1ea0aa;await this['_updateSubUnitFromURLParams'](_0x6f12f2,_0x206405),_0x6f12f2['activeSheet$'][_0x3481e6(0x1b5)](takeUntil(this[_0x3481e6(0x208)]))['subscribe'](_0x580d1e=>{const _0x44bae3=_0x3481e6;if(_0x580d1e)this[_0x44bae3(0x18c)](_0x580d1e);}),this['_urlService']['urlChange$'][_0x3481e6(0x1b5)](takeUntil(this[_0x3481e6(0x208)]))[_0x3481e6(0x228)](()=>this['_updateSubUnitFromURLParams'](_0x6f12f2,_0x206405));}['_updateURLWithCurrentState'](_0x4ccfcf,_0xcbdd43=![]){const _0x1a798d=_0x1ea0aa,_0x1c509b=this[_0x1a798d(0x183)]['getParam'](_0x1a798d(0x1d7));if(_0x4ccfcf['getSheetId']()!==_0x1c509b)this[_0x1a798d(0x183)][_0x1a798d(0x215)](_0x1a798d(0x1d7),_0x4ccfcf[_0x1a798d(0x198)](),_0xcbdd43);}async[_0x1ea0aa(0x1db)](_0x280e84,_0x39eec3){const _0x121de3=_0x1ea0aa;var _0x5a0a34;if(!_0x39eec3||!_0x280e84[_0x121de3(0x1a9)](_0x39eec3)){const _0x3bb48b=_0x280e84[_0x121de3(0x21f)]()[0x0],_0x3cc645=_0x280e84[_0x121de3(0x1a9)](_0x3bb48b);if(!_0x3cc645)return;this[_0x121de3(0x18c)](_0x3cc645,!![]),await this[_0x121de3(0x205)][_0x121de3(0x1b9)](SetWorksheetActivateCommand['id'],{'unitId':_0x280e84[_0x121de3(0x1f6)](),'subUnitId':_0x3bb48b});return;}if(((_0x5a0a34=_0x280e84[_0x121de3(0x225)]())===null||_0x5a0a34===void 0x0?void 0x0:_0x5a0a34[_0x121de3(0x198)]())===_0x39eec3)return;await this['_commandService'][_0x121de3(0x1b9)](SetWorksheetActivateCommand['id'],{'unitId':_0x280e84[_0x121de3(0x1f6)](),'subUnitId':_0x39eec3});}};MobileHistoryLoaderController=__decorate([__decorateParam(0x0,ICommandService),__decorateParam(0x1,IMenuManagerService),__decorateParam(0x2,Inject(ComponentManager)),__decorateParam(0x3,Inject(HistoryLoaderService)),__decorateParam(0x4,Inject(LocaleService)),__decorateParam(0x5,IMessageService),__decorateParam(0x6,Inject(CollaborationController)),__decorateParam(0x7,ILocalCacheService),__decorateParam(0x8,Inject(DataLoaderService)),__decorateParam(0x9,IUniverInstanceService),__decorateParam(0xa,IURLService)],MobileHistoryLoaderController);const DEFAULT_UNIVER_CONTAINER_ID=_0x1ea0aa(0x1de),UNIVER_CONTAINER_ID_KEY$1='UNIVER_CONTAINER_ID',UNIVER_HISTORY_CONTAINER_ID$1=_0x1ea0aa(0x199);let MobileHistoryLoaderService=class MobileHistoryLoaderService extends Disposable{constructor(_0xd5a76a,_0x92a052,_0x33b82c,_0x4db9d2,_0x5e9d5d,_0x561b7b,_0x5a859d,_0x4a3e96,_0x502b0b,_0x3abec1){const _0x3f2923=_0x1ea0aa;super(),this[_0x3f2923(0x171)]=_0xd5a76a,this[_0x3f2923(0x19f)]=_0x92a052,this['_configService']=_0x33b82c,this[_0x3f2923(0x205)]=_0x4db9d2,this[_0x3f2923(0x197)]=_0x5e9d5d,this['_permissionService']=_0x561b7b,this[_0x3f2923(0x1b8)]=_0x5a859d,this[_0x3f2923(0x1c5)]=_0x4a3e96,this['_sidebarService']=_0x502b0b,this['_themeService']=_0x3abec1,_defineProperty(this,_0x3f2923(0x212),new BehaviorSubject(null)),_defineProperty(this,_0x3f2923(0x1e9),this[_0x3f2923(0x212)][_0x3f2923(0x220)]()),_defineProperty(this,_0x3f2923(0x181),new DisposableCollection()),_defineProperty(this,'_pluginMap',new Map()),_defineProperty(this,_0x3f2923(0x1ca),null),this[_0x3f2923(0x18d)]();}get[_0x1ea0aa(0x190)](){const _0x523328=_0x1ea0aa;return this[_0x523328(0x212)][_0x523328(0x18b)];}[_0x1ea0aa(0x18d)](){const _0x1c5560=_0x1ea0aa;this[_0x1c5560(0x1ad)](),this[_0x1c5560(0x22e)]();}[_0x1ea0aa(0x1ad)](){const _0x459b08=_0x1ea0aa;var _0x4058e1;const _0x2d2fd5=(_0x4058e1=this[_0x459b08(0x1a6)][_0x459b08(0x22c)](_0x459b08(0x1c6)))!==null&&_0x4058e1!==void 0x0?_0x4058e1:DEFAULT_UNIVER_CONTAINER_ID,_0x25ad4e=document['getElementById'](_0x2d2fd5);if(!_0x25ad4e)return;const _0x17bf05=document[_0x459b08(0x224)]('div');_0x17bf05['id']=UNIVER_HISTORY_CONTAINER_ID$1,_0x17bf05[_0x459b08(0x1c2)][_0x459b08(0x1c7)]=_0x459b08(0x185),_0x17bf05[_0x459b08(0x1bd)][_0x459b08(0x223)]='absolute',_0x17bf05[_0x459b08(0x1bd)][_0x459b08(0x1e7)]='0',_0x17bf05[_0x459b08(0x1bd)][_0x459b08(0x173)]='0',_0x17bf05['style'][_0x459b08(0x17f)]='100%',_0x17bf05['style'][_0x459b08(0x213)]=_0x459b08(0x1dc),_0x17bf05[_0x459b08(0x1bd)][_0x459b08(0x20b)]='49',_0x17bf05[_0x459b08(0x1bd)][_0x459b08(0x19a)]='none',_0x25ad4e['appendChild'](_0x17bf05);}[_0x1ea0aa(0x22e)](){const _0xa87ead=_0x1ea0aa;[[UniverRenderEnginePlugin],[UniverMobileUIPlugin,{'container':UNIVER_HISTORY_CONTAINER_ID$1,'header':!![],'toolbar':![],'footer':!![],'contextMenu':![],'override':[[IDialogService,null]]}],[UniverNetworkPlugin],[UniverDrawingPlugin,{'override':[[IImageIoService,null]]}],[UniverDocsPlugin,{'hasScroll':![]}],[UniverDocsUIPlugin],[UniverSheetsNumfmtPlugin],[UniverSheetsPlugin,{'notExecuteFormula':!![]}],[UniverSheetsMobileUIPlugin],[UniverSheetsFormulaPlugin],[UniverSheetsFormulaUIPlugin],[UniverCollaborationPlugin],[UniverSheetsFilterPlugin],[UniverSheetsConditionalFormattingPlugin],[UniverSheetsHyperLinkPlugin],[UniverSheetsHyperLinkUIPlugin],[UniverDataValidationPlugin],[UniverSheetsDataValidationPlugin],[UniverSheetsDataValidationMobileUIPlugin],[UniverFormulaEnginePlugin,{'notExecuteFormula':!![]}],[UniverDrawingUIPlugin],[UniverSheetsDrawingPlugin],[UniverSheetsDrawingUIPlugin],[UniverSheetSparklinePlugin],[UniverSheetSparklineUIPlugin],[UniverSheetsChartPlugin],[UniverSheetsChartUIPlugin],[UniverSheetsShapePlugin],[UniverSheetsShapeUIPlugin],[UniverSheetsPivotTablePlugin,{'notExecuteFormula':!![]}],[UniverSheetsTablePlugin]][_0xa87ead(0x1d0)](([_0xfce5b5,_0x69ddb4])=>this[_0xa87ead(0x1bc)](_0xfce5b5,_0x69ddb4));}[_0x1ea0aa(0x1e5)](){const _0x191ff6=_0x1ea0aa;super['dispose'](),this[_0x191ff6(0x1aa)](),this[_0x191ff6(0x184)][_0x191ff6(0x22a)]();}[_0x1ea0aa(0x1bc)](_0x51bc2f,_0x1c1885,_0x116940){const _0x3740a4=_0x1ea0aa;if(this[_0x3740a4(0x184)][_0x3740a4(0x178)](_0x51bc2f[_0x3740a4(0x1b4)])&&!_0x116940)throw new Error(_0x3740a4(0x1af)+_0x51bc2f[_0x3740a4(0x1b4)]+'\x20has\x20been\x20registered.');this[_0x3740a4(0x184)][_0x3740a4(0x1f4)](_0x51bc2f['pluginName'],[_0x51bc2f,_0x1c1885]);}[_0x1ea0aa(0x1e6)](){const _0x57d63b=_0x1ea0aa;return Array[_0x57d63b(0x1f0)](this['_pluginMap'][_0x57d63b(0x22d)]());}['mountHistoryContent'](_0x56737e,_0xf4af5b){const _0xbf2694=_0x1ea0aa,_0x5738e5=document['getElementById'](UNIVER_HISTORY_CONTAINER_ID$1);if(!_0x5738e5)return;_0x5738e5['style'][_0xbf2694(0x19a)]='block',this[_0xbf2694(0x1c3)](_0x56737e,UNIVER_HISTORY_CONTAINER_ID$1,_0xf4af5b);}[_0x1ea0aa(0x1aa)](){const _0x47f153=_0x1ea0aa;var _0x222bdf;this['_disposableCollection'][_0x47f153(0x1e5)](),(_0x222bdf=this[_0x47f153(0x190)])===null||_0x222bdf===void 0x0||_0x222bdf[_0x47f153(0x1e5)](),this[_0x47f153(0x212)][_0x47f153(0x182)](null);const _0xc487aa=document['getElementById'](UNIVER_HISTORY_CONTAINER_ID$1);if(!_0xc487aa)return;_0xc487aa[_0x47f153(0x1bd)]['display']=_0x47f153(0x187),this[_0x47f153(0x1ca)]&&(this[_0x47f153(0x1ca)]['terminate'](),this[_0x47f153(0x1ca)]=null);}[_0x1ea0aa(0x1c3)](_0x31c54e,_0x363ef2,_0x54d2e6){const _0x4ddc59=_0x1ea0aa;var _0x29c995,_0x10fb45,_0xc60341,_0x36b877;if(this[_0x4ddc59(0x190)])return;const _0x4ff71e=new Univer({'locales':{[this[_0x4ddc59(0x171)][_0x4ddc59(0x1ef)]()]:this[_0x4ddc59(0x171)][_0x4ddc59(0x1e4)]()},'override':[[IAuthzIoService,{'useClass':AuthzIoHttpService}]]}),_0x1efbcd=_0x4ff71e[_0x4ddc59(0x174)]();this[_0x4ddc59(0x1f9)](this[_0x4ddc59(0x1fc)][_0x4ddc59(0x16e)][_0x4ddc59(0x228)](_0x28644b=>{const _0x4c211e=_0x4ddc59;_0x1efbcd['get'](ThemeService)[_0x4c211e(0x1e1)](_0x28644b);})),this['disposeWithMe'](this[_0x4ddc59(0x1fc)]['currentTheme$'][_0x4ddc59(0x228)](_0x1a4bde=>{const _0x78ab02=_0x4ddc59;_0x1efbcd['get'](ThemeService)[_0x78ab02(0x1e3)](_0x1a4bde);})),_0x1efbcd[_0x4ddc59(0x1b1)](LocaleService)[_0x4ddc59(0x19c)](this['_localeService'][_0x4ddc59(0x1ef)]()),_0x1efbcd[_0x4ddc59(0x1b1)](IConfigService)[_0x4ddc59(0x1a8)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY,this['_configService'][_0x4ddc59(0x22c)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY));const _0x5ce8c1=this[_0x4ddc59(0x1a6)]['getConfig'](LS_CONFIG_KEY);if(_0x5ce8c1)_0x4ff71e['registerPlugin'](UniverLicensePlugin,{'license':_0x5ce8c1['ls']});const _0x278038=(_0x29c995=this[_0x4ddc59(0x1a6)][_0x4ddc59(0x22c)](_0x4ddc59(0x18a)))===null||_0x29c995===void 0x0?void 0x0:_0x29c995[_0x4ddc59(0x1c0)],_0xa99c6a=!!_0x278038;_0xa99c6a&&(this[_0x4ddc59(0x1ca)]=_0x278038 instanceof Worker?_0x278038:null,_0x4ff71e[_0x4ddc59(0x1bc)](UniverRPCMainThreadPlugin,{'workerURL':_0x278038}));this[_0x4ddc59(0x184)]['forEach'](([_0x8a57a0,_0x5681d8])=>{const _0x3cce88=_0x4ddc59;_0x4ff71e[_0x3cce88(0x1bc)](_0x8a57a0,_0x5681d8);}),_0x4ff71e[_0x4ddc59(0x1bc)](UniverEditHistoryViewerMobilePlugin,{'historyListServerUrl':(_0x10fb45=this[_0x4ddc59(0x1a6)]['getConfig']('edit-history-loader.config'))===null||_0x10fb45===void 0x0?void 0x0:_0x10fb45[_0x4ddc59(0x22b)],'historyPanelComponentKey':(_0xc60341=this['_configService'][_0x4ddc59(0x22c)](_0x4ddc59(0x18a)))===null||_0xc60341===void 0x0?void 0x0:_0xc60341[_0x4ddc59(0x188)],'historyPanelHidden':(_0x36b877=this[_0x4ddc59(0x1a6)]['getConfig'](_0x4ddc59(0x18a)))===null||_0x36b877===void 0x0?void 0x0:_0x36b877[_0x4ddc59(0x1ec)]}),_0x1efbcd[_0x4ddc59(0x20a)](_0x5b4922=>{const _0x47f337=_0x4ddc59;this[_0x47f337(0x218)](_0x5b4922,_0x31c54e);}),this[_0x4ddc59(0x212)][_0x4ddc59(0x182)](_0x4ff71e);const _0x1c8031=_0x1efbcd[_0x4ddc59(0x1b1)](HistoryManagerService),_0x432354=this['_checkCanRevert'](_0x31c54e),_0x28a18e=()=>{const _0x263acb=_0x4ddc59;if(_0x54d2e6)_0x1c8031[_0x263acb(0x1a2)](_0x31c54e,_0x363ef2,_0x432354,_0x54d2e6);else _0x1c8031[_0x263acb(0x1c4)](_0x31c54e,_0x363ef2,_0x432354);};this[_0x4ddc59(0x197)][_0x4ddc59(0x21b)]({'content':this['_localeService']['t'](_0x4ddc59(0x20e)),'type':MessageType['Loading']});if(_0xa99c6a)try{_0x1efbcd['get'](IRemoteInstanceService)[_0x4ddc59(0x1ce)]()[_0x4ddc59(0x1f3)](()=>{_0x28a18e();});}catch{_0x28a18e();}else _0x28a18e();}['_initListener'](_0x749f5d,_0x1fb3a3){const _0x394505=_0x1ea0aa,_0x2633fc=_0x749f5d[_0x394505(0x1b1)](HistoryManagerService);this[_0x394505(0x181)]['add'](_0x2633fc['status$']['subscribe'](_0x4ea203=>{const _0x3c433d=_0x394505;switch(_0x4ea203){case HistoryModeStatus['Entered']:this[_0x3c433d(0x1c5)][_0x3c433d(0x1f8)](),this['_sidebarService']['close']();break;case HistoryModeStatus[_0x3c433d(0x177)]:this[_0x3c433d(0x205)][_0x3c433d(0x1b9)](ExitEditHistoryOperation['id']),this[_0x3c433d(0x1aa)]();break;case HistoryModeStatus[_0x3c433d(0x21c)]:this['unMountHistoryContent'](),this['_messageService']['show']({'content':this[_0x3c433d(0x171)]['t'](_0x3c433d(0x21d)),'type':MessageType[_0x3c433d(0x21c)],'duration':0xbb8});break;default:break;}})),this[_0x394505(0x181)][_0x394505(0x209)](_0x2633fc['revertRevision$']['subscribe'](async _0x4b400b=>{const _0x397e5b=_0x394505;if(_0x4b400b)this[_0x397e5b(0x205)][_0x397e5b(0x1b9)](RevertRevisionMutation['id'],{'unitId':_0x1fb3a3,'revision':_0x4b400b});}));}[_0x1ea0aa(0x21a)](_0x35eff9){const _0x552b5b=_0x1ea0aa,_0x264bc2=this[_0x552b5b(0x19f)]['getUnit'](_0x35eff9)[_0x552b5b(0x17b)]()[_0x552b5b(0x1d9)](_0x22c3e2=>_0x22c3e2[_0x552b5b(0x198)]()),_0x137dce=new WorkbookEditablePermission(_0x35eff9)['id'],_0x355c37=_0x264bc2['map'](_0x15f07e=>new WorksheetEditPermission(_0x35eff9,_0x15f07e)['id']),_0x51baed=_0x264bc2[_0x552b5b(0x1d9)](_0xcf0cb4=>this[_0x552b5b(0x1b8)][_0x552b5b(0x221)](_0x35eff9,_0xcf0cb4)['map'](_0x165054=>new RangeProtectionPermissionEditPoint(_0x35eff9,_0xcf0cb4,_0x165054[_0x552b5b(0x1d4)])['id']))['flat'](),_0x58c8ec=new WorkbookRecoverHistoryPermission(_0x35eff9)['id'];return this[_0x552b5b(0x1df)][_0x552b5b(0x179)]([_0x137dce,..._0x355c37,..._0x51baed,_0x58c8ec])[_0x552b5b(0x1f1)](_0x4d3be8=>!!_0x4d3be8[_0x552b5b(0x18b)]);}};MobileHistoryLoaderService=__decorate([__decorateParam(0x0,Inject(LocaleService)),__decorateParam(0x1,IUniverInstanceService),__decorateParam(0x2,IConfigService),__decorateParam(0x3,ICommandService),__decorateParam(0x4,IMessageService),__decorateParam(0x5,IPermissionService),__decorateParam(0x6,Inject(RangeProtectionRuleModel)),__decorateParam(0x7,Inject(IDialogService)),__decorateParam(0x8,Inject(ISidebarService)),__decorateParam(0x9,Inject(ThemeService))],MobileHistoryLoaderService);let UniverEditHistoryLoaderMobilePlugin=class UniverEditHistoryLoaderMobilePlugin extends Plugin{constructor(_0x103d29=defaultPluginConfig,_0x1366fc,_0x3219dd){const _0x5c6813=_0x1ea0aa;super(),this['_config']=_0x103d29,this[_0x5c6813(0x194)]=_0x1366fc,this['_configService']=_0x3219dd;const {menu:_0x4f7413,..._0x468f41}=merge({},defaultPluginConfig,this[_0x5c6813(0x1ea)]);if(_0x4f7413)this[_0x5c6813(0x1a6)][_0x5c6813(0x1a8)](_0x5c6813(0x1f5),_0x4f7413,{'merge':!![]});this[_0x5c6813(0x1a6)][_0x5c6813(0x1a8)](EDIT_HISTORY_LOADER_PLUGIN_CONFIG_KEY,_0x468f41);if(this[_0x5c6813(0x1ea)][_0x5c6813(0x200)])this['_configService'][_0x5c6813(0x1a8)](UNIVER_CONTAINER_ID_KEY$1,this[_0x5c6813(0x1ea)][_0x5c6813(0x200)]);}[_0x1ea0aa(0x16f)](){const _0x80169c=_0x1ea0aa;[[HistoryLoaderService,{'useClass':MobileHistoryLoaderService}],[MobileHistoryLoaderController]][_0x80169c(0x1d0)](_0x3b1a6d=>this[_0x80169c(0x194)][_0x80169c(0x209)](_0x3b1a6d));}[_0x1ea0aa(0x1a7)](){const _0x941be1=_0x1ea0aa;this[_0x941be1(0x194)][_0x941be1(0x1b1)](MobileHistoryLoaderController);}};_defineProperty(UniverEditHistoryLoaderMobilePlugin,_0x1ea0aa(0x1ba),UniverInstanceType[_0x1ea0aa(0x22f)]),_defineProperty(UniverEditHistoryLoaderMobilePlugin,'pluginName',_0x1ea0aa(0x192)),_defineProperty(UniverEditHistoryLoaderMobilePlugin,_0x1ea0aa(0x214),name),_defineProperty(UniverEditHistoryLoaderMobilePlugin,_0x1ea0aa(0x175),version),UniverEditHistoryLoaderMobilePlugin=__decorate([DependentOn(UniverLicensePlugin),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,IConfigService)],UniverEditHistoryLoaderMobilePlugin);let HistoryLoaderController=class HistoryLoaderController extends RxDisposable{constructor(_0x4bc8a3,_0x2e7cce,_0x1687f9,_0x4b3857,_0x205710,_0x3c4de6,_0x518728,_0x549222,_0x100d77,_0x1336dd,_0x3374a1){const _0x3ac34f=_0x1ea0aa;super(),this[_0x3ac34f(0x205)]=_0x4bc8a3,this[_0x3ac34f(0x1c9)]=_0x2e7cce,this['_componentManager']=_0x1687f9,this[_0x3ac34f(0x207)]=_0x4b3857,this[_0x3ac34f(0x171)]=_0x205710,this[_0x3ac34f(0x197)]=_0x3c4de6,this[_0x3ac34f(0x1be)]=_0x518728,this[_0x3ac34f(0x21e)]=_0x549222,this[_0x3ac34f(0x1a0)]=_0x100d77,this[_0x3ac34f(0x19f)]=_0x1336dd,this[_0x3ac34f(0x183)]=_0x3374a1,_defineProperty(this,'_revertErrorTimer',null),this[_0x3ac34f(0x18d)]();}[_0x1ea0aa(0x18d)](){const _0x2e1319=_0x1ea0aa;[ToggleEditHistoryOperation,ExitEditHistoryOperation][_0x2e1319(0x1d0)](_0x1db9df=>this[_0x2e1319(0x1f9)](toDisposable(this['_commandService']['registerCommand'](_0x1db9df)))),this[_0x2e1319(0x1f9)](this[_0x2e1319(0x17d)]['register'](_0x2e1319(0x20c),HistoryIcon)),this['_menuManagerService'][_0x2e1319(0x17c)](menuSchema),this[_0x2e1319(0x1f9)](this[_0x2e1319(0x205)][_0x2e1319(0x230)](async(_0x5d2a5b,_0x525a1e)=>{const _0x5ab07f=_0x2e1319;if(_0x5d2a5b['id']===RevertRevisionMutation['id']){const {unitId:_0x5cddce}=_0x5d2a5b['params'];this[_0x5ab07f(0x197)]['show']({'content':this[_0x5ab07f(0x171)]['t'](_0x5ab07f(0x1f7)),'type':MessageType[_0x5ab07f(0x222)],'duration':0x1388});const _0x242670=this[_0x5ab07f(0x1be)]['getCollabEntity'](_0x5cddce);if(!(_0x525a1e===null||_0x525a1e===void 0x0?void 0x0:_0x525a1e[_0x5ab07f(0x217)]))this[_0x5ab07f(0x1b7)](_0x242670,async()=>{const _0x16d898=_0x5ab07f,_0x20f172=this[_0x16d898(0x19f)][_0x16d898(0x229)](UniverInstanceType[_0x16d898(0x1fd)]),_0x58db71=_0x20f172===null||_0x20f172===void 0x0?void 0x0:_0x20f172[_0x16d898(0x225)]();if(!_0x58db71)return![];this[_0x16d898(0x19f)]['disposeUnit'](_0x5cddce);const _0x11c143=await this[_0x16d898(0x1a0)][_0x16d898(0x196)](_0x5cddce,UniverInstanceType['UNIVER_SHEET']);if(_0x11c143&&_0x11c143 instanceof Workbook)return await this['_setupSubUnitSync'](_0x11c143,_0x58db71[_0x16d898(0x198)]()),!![];return![];});else this[_0x5ab07f(0x1b7)](_0x242670,async()=>{const _0x1a9d91=_0x5ab07f;return setTimeout(()=>window['location'][_0x1a9d91(0x191)]()),!![];},!![]);}}));}['_handleRevertAcknowledgement'](_0x286f33,_0xbf41ee,_0x38f27e=![]){const _0x4ff292=_0x1ea0aa,_0x3308cd=combineLatest([_0x286f33[_0x4ff292(0x1dd)][_0x4ff292(0x16d)],_0x286f33[_0x4ff292(0x18e)]])[_0x4ff292(0x228)](async([_0x13971f,_0x32022c])=>{const _0x471303=_0x4ff292;if(_0x13971f[_0x471303(0x1ed)]===CollaborationEvent[_0x471303(0x19d)]&&(_0x32022c===null||_0x32022c===void 0x0?void 0x0:_0x32022c[_0x471303(0x1bb)])===CollaborationStatus[_0x471303(0x1a5)]){if(_0x13971f[_0x471303(0x1b2)][_0x471303(0x1bf)][_0x471303(0x1ee)](_0x519675=>_0x519675['id']===RevertRevisionMutation['id'])){if(await _0xbf41ee()){var _0x6a4b17;this[_0x471303(0x207)][_0x471303(0x1aa)](),_0x3308cd['unsubscribe'](),this[_0x471303(0x204)]&&clearTimeout(this[_0x471303(0x204)]),await((_0x6a4b17=this[_0x471303(0x21e)])===null||_0x6a4b17===void 0x0?void 0x0:_0x6a4b17[_0x471303(0x202)]());}}}});if(_0x38f27e)this[_0x4ff292(0x204)]=setTimeout(()=>{const _0x5d2018=_0x4ff292;_0x3308cd[_0x5d2018(0x17a)](),this[_0x5d2018(0x197)][_0x5d2018(0x21b)]({'content':this[_0x5d2018(0x171)]['t'](_0x5d2018(0x18f)),'type':MessageType['Error'],'duration':0xbb8});},0x1388);}async[_0x1ea0aa(0x1cd)](_0x38c0b8,_0x4dba3f){const _0xc7f611=_0x1ea0aa;await this[_0xc7f611(0x1db)](_0x38c0b8,_0x4dba3f),_0x38c0b8['activeSheet$'][_0xc7f611(0x1b5)](takeUntil(this[_0xc7f611(0x208)]))[_0xc7f611(0x228)](_0x37c5b0=>{if(_0x37c5b0)this['_updateURLWithCurrentState'](_0x37c5b0);}),this['_urlService'][_0xc7f611(0x201)][_0xc7f611(0x1b5)](takeUntil(this[_0xc7f611(0x208)]))[_0xc7f611(0x228)](()=>this[_0xc7f611(0x1db)](_0x38c0b8,_0x4dba3f));}[_0x1ea0aa(0x18c)](_0x4bcb8f,_0x3e03fe=![]){const _0x354adb=_0x1ea0aa,_0x1c2327=this[_0x354adb(0x183)]['getParam'](_0x354adb(0x1d7));if(_0x4bcb8f[_0x354adb(0x198)]()!==_0x1c2327)this[_0x354adb(0x183)][_0x354adb(0x215)](_0x354adb(0x1d7),_0x4bcb8f['getSheetId'](),_0x3e03fe);}async['_updateSubUnitFromURLParams'](_0x513eee,_0x43dc4e){const _0x56e242=_0x1ea0aa;var _0x5a59d8;if(!_0x43dc4e||!_0x513eee['getSheetBySheetId'](_0x43dc4e)){const _0x520ef7=_0x513eee['getUnhiddenWorksheets']()[0x0],_0x65a305=_0x513eee[_0x56e242(0x1a9)](_0x520ef7);if(!_0x65a305)return;this[_0x56e242(0x18c)](_0x65a305,!![]),await this[_0x56e242(0x205)][_0x56e242(0x1b9)](SetWorksheetActivateCommand['id'],{'unitId':_0x513eee[_0x56e242(0x1f6)](),'subUnitId':_0x520ef7});return;}if(((_0x5a59d8=_0x513eee[_0x56e242(0x225)]())===null||_0x5a59d8===void 0x0?void 0x0:_0x5a59d8[_0x56e242(0x198)]())===_0x43dc4e)return;await this[_0x56e242(0x205)][_0x56e242(0x1b9)](SetWorksheetActivateCommand['id'],{'unitId':_0x513eee[_0x56e242(0x1f6)](),'subUnitId':_0x43dc4e});}};HistoryLoaderController=__decorate([__decorateParam(0x0,ICommandService),__decorateParam(0x1,IMenuManagerService),__decorateParam(0x2,Inject(ComponentManager)),__decorateParam(0x3,Inject(HistoryLoaderService)),__decorateParam(0x4,Inject(LocaleService)),__decorateParam(0x5,IMessageService),__decorateParam(0x6,Inject(CollaborationController)),__decorateParam(0x7,ILocalCacheService),__decorateParam(0x8,Inject(DataLoaderService)),__decorateParam(0x9,IUniverInstanceService),__decorateParam(0xa,IURLService)],HistoryLoaderController);let UniverEditHistoryLoaderPlugin=class UniverEditHistoryLoaderPlugin extends Plugin{constructor(_0x17dba0=defaultPluginConfig,_0x525750,_0x4af3ef){const _0x1ea9b1=_0x1ea0aa;super(),this[_0x1ea9b1(0x1ea)]=_0x17dba0,this[_0x1ea9b1(0x194)]=_0x525750,this['_configService']=_0x4af3ef;const {menu:_0x47d346,..._0x470866}=merge({},defaultPluginConfig,this[_0x1ea9b1(0x1ea)]);if(_0x47d346)this[_0x1ea9b1(0x1a6)][_0x1ea9b1(0x1a8)](_0x1ea9b1(0x1f5),_0x47d346,{'merge':!![]});this['_configService']['setConfig'](EDIT_HISTORY_LOADER_PLUGIN_CONFIG_KEY,_0x470866);if(this[_0x1ea9b1(0x1ea)][_0x1ea9b1(0x200)])this[_0x1ea9b1(0x1a6)][_0x1ea9b1(0x1a8)](UNIVER_CONTAINER_ID_KEY,this[_0x1ea9b1(0x1ea)][_0x1ea9b1(0x200)]);}['onStarting'](){const _0x15ef16=_0x1ea0aa;[[HistoryLoaderService],[HistoryLoaderController]][_0x15ef16(0x1d0)](_0x154583=>this[_0x15ef16(0x194)][_0x15ef16(0x209)](_0x154583));}[_0x1ea0aa(0x1a7)](){const _0x3bf4fd=_0x1ea0aa;this['_injector'][_0x3bf4fd(0x1b1)](HistoryLoaderController);}};_defineProperty(UniverEditHistoryLoaderPlugin,'type',UniverInstanceType[_0x1ea0aa(0x22f)]),_defineProperty(UniverEditHistoryLoaderPlugin,_0x1ea0aa(0x1b4),_0x1ea0aa(0x1d1)),_defineProperty(UniverEditHistoryLoaderPlugin,_0x1ea0aa(0x214),name),_defineProperty(UniverEditHistoryLoaderPlugin,_0x1ea0aa(0x175),version),UniverEditHistoryLoaderPlugin=__decorate([DependentOn(UniverLicensePlugin),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,IConfigService)],UniverEditHistoryLoaderPlugin);export{EDIT_HISTORY_LOADER_PLUGIN_CONFIG_KEY,HistoryLoaderService,MobileHistoryLoaderService,ToggleEditHistoryOperation,UNIVER_CONTAINER_ID_KEY,UNIVER_HISTORY_CONTAINER_ID,UniverEditHistoryLoaderMobilePlugin,UniverEditHistoryLoaderPlugin};
|
|
1
|
+
const _0x4160e2=_0x2827;(function(_0xa83ecd,_0x2aab9d){const _0x48bdf3=_0x2827,_0x15b46a=_0xa83ecd();while(!![]){try{const _0x459a5e=-parseInt(_0x48bdf3(0x17f))/0x1*(parseInt(_0x48bdf3(0x1b0))/0x2)+parseInt(_0x48bdf3(0x174))/0x3+parseInt(_0x48bdf3(0x134))/0x4*(-parseInt(_0x48bdf3(0x175))/0x5)+parseInt(_0x48bdf3(0x1c9))/0x6+parseInt(_0x48bdf3(0x1b4))/0x7+-parseInt(_0x48bdf3(0x182))/0x8*(-parseInt(_0x48bdf3(0x15c))/0x9)+-parseInt(_0x48bdf3(0x155))/0xa;if(_0x459a5e===_0x2aab9d)break;else _0x15b46a['push'](_0x15b46a['shift']());}catch(_0x48cc7c){_0x15b46a['push'](_0x15b46a['shift']());}}}(_0x31e5,0x2f63a));import{CommandType,DependentOn,Disposable,DisposableCollection,IAuthzIoService,ICommandService,IConfigService,IPermissionService,IUniverInstanceService,Inject,Injector,LocaleService,Plugin,RxDisposable,ThemeService,Univer,UniverInstanceType,Workbook,merge,toDisposable}from'@univerjs/core';import{RangeProtectionPermissionEditPoint,RangeProtectionRuleModel,SetWorksheetActivateCommand,UniverSheetsPlugin,WorkbookEditablePermission,WorkbookRecoverHistoryPermission,WorkbookViewHistoryPermission,WorksheetEditPermission,getSheetCommandTarget}from'@univerjs/sheets';import{CollaborationEvent,RevertRevisionMutation,UniverCollaborationPlugin}from'@univerjs-pro/collaboration';import{AuthzIoHttpService,COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY,CollaborationController,CollaborationStatus,DataLoaderService,ILocalCacheService}from'@univerjs-pro/collaboration-client';function _0x31e5(){const _0x593fb4=['pipe','location','next','getCurrentLocale','historyListServerUrl','_urlService','add','function','12wLtaNQ','getLocales','_selectionProtectionRuleModel','height','_initUniver','\x20has\x20been\x20registered.','getCollabEntity','editHistory.panel.reverting','params','UNIVER_SHEET','revertRevision$','[MobileHistoryLoaderService]:\x20Plugin\x20','triggerLoadVersions','editHistory.panel.listFetchError','reload','eventID','display','CHANGESET_ACK','width','getConfig','composePermission','onSteady','getSheets','setConfig','left','urlChange$','_updateURLWithCurrentState','triggerCustomVersions','onCommandExecuted','toPrimitive','setTheme','editHistory.panel.title','univer-container','7365470giVbnj','_sidebarService','subscribe','setLocale','_initContainer','_commandService','history-container','18neQRMU','_dialogService','status$','mutations','dispose$','state$','disposeUnit','unsubscribe','iterator','string','subunit','_setupSubUnitSync','_localCacheService','packageName','setParam','_updateSubUnitFromURLParams','invoke','permissionId','_pluginMap','registerCommand','_collaborationController','mergeMenu','UNIVER_CONTAINER_ID','none','1087302DDBWFQ','137210ZBngrJ','getCurrentUnitOfType','univer-history-container-mobile','from','symbol','show','value','style','constructor','data','1LOtUMO','dispose','edit-history-loader.config','1402968ZAnCBj','_initPlugins','univerContainerId','getUnitId','length','setDarkMode','session','UNIVER_EDIT_HISTORY_LOADER_PLUGIN','getUnhiddenWorksheets','block','historyAIassistantEnabled','removeAll','_disposableCollection','getParam','univer.operation.exit-edit-history','_menuManagerService','_messageService','editHistory.panel.revertFailed','disposeWithMe','univer.operation.toggle-edit-history','top','uComp','register','_config','@univerjs-pro/edit-history-loader','createElement','map','Exited','SYNCED','_historyManagerService','_permissionService','_revertErrorTimer','appendChild','then','call','getUnit','version','_localeService','getAllPlugins','_internalWebWorker','loadUnit','_themeService','object','OTHERS','_init','position','218494lBQCsf','_handleRevertAcknowledgement','historyUniver$','getSubunitRuleList','1679510HsHcpS','OPERATION','workerURL','getSheetBySheetId','UNIVER_EDIT_HISTORY_LOADER_MOBILE_PLUGIN','some','closeAll','decorate','HistoryIcon','zIndex','getActiveSheet','[HistoryLoaderService]:\x20Plugin\x20','close','_historyUniver$','UNIVER_UNKNOWN','getElementById','type','_componentManager','values','pluginName','menu','1014720Kfypzq','get','currentTheme$','darkMode$','historyUniver','executeCommand','_injector','whenReady','__getInjector','Entered','div','onStarting','fromCollab','asObservable','dataset','Loading','exhaustSavingTask','activeSheet$','unMountHistoryContent','mountHistoryContent','status','_checkCanRevert','historyPanelHidden','_dataLoaderService','_initListener','getSheetId','forEach','_univerInstanceService','historyPanelComponentKey','editHistory.info.initializing','flat','BUTTON','_configService','100%','Error','registerPlugin','set','has','every'];_0x31e5=function(){return _0x593fb4;};return _0x31e5();}import{HistoryManagerService,HistoryModeStatus,UniverEditHistoryViewerMobilePlugin,UniverEditHistoryViewerPlugin}from'@univerjs-pro/edit-history-viewer';import{LS_CONFIG_KEY,UniverLicensePlugin}from'@univerjs-pro/license';import{UniverSheetsChartPlugin}from'@univerjs-pro/sheets-chart';import{UniverSheetsChartUIPlugin}from'@univerjs-pro/sheets-chart-ui';import{UniverSheetsPivotTablePlugin}from'@univerjs-pro/sheets-pivot';import{UniverSheetsShapePlugin}from'@univerjs-pro/sheets-shape';import{UniverSheetsShapeUIPlugin}from'@univerjs-pro/sheets-shape-ui';import{UniverSheetSparklinePlugin}from'@univerjs-pro/sheets-sparkline';import{UniverSheetSparklineUIPlugin}from'@univerjs-pro/sheets-sparkline-ui';import{UniverDataValidationPlugin}from'@univerjs/data-validation';import{MessageType}from'@univerjs/design';import{UniverDocsPlugin}from'@univerjs/docs';import{UniverDocsUIPlugin}from'@univerjs/docs-ui';import{IImageIoService,UniverDrawingPlugin}from'@univerjs/drawing';import{UniverDrawingUIPlugin}from'@univerjs/drawing-ui';import{UniverFormulaEnginePlugin}from'@univerjs/engine-formula';import{UniverRenderEnginePlugin}from'@univerjs/engine-render';import{UniverNetworkPlugin}from'@univerjs/network';import{IRemoteInstanceService,UniverRPCMainThreadPlugin}from'@univerjs/rpc';import{UniverSheetsConditionalFormattingPlugin}from'@univerjs/sheets-conditional-formatting';import{UniverSheetsConditionalFormattingUIPlugin}from'@univerjs/sheets-conditional-formatting-ui';import{UniverSheetsDataValidationPlugin}from'@univerjs/sheets-data-validation';import{UniverSheetsDataValidationMobileUIPlugin,UniverSheetsDataValidationUIPlugin}from'@univerjs/sheets-data-validation-ui';import{UniverSheetsDrawingPlugin}from'@univerjs/sheets-drawing';import{UniverSheetsDrawingUIPlugin}from'@univerjs/sheets-drawing-ui';import{UniverSheetsFilterPlugin}from'@univerjs/sheets-filter';import{UniverSheetsFilterUIPlugin}from'@univerjs/sheets-filter-ui';import{UniverSheetsFormulaPlugin}from'@univerjs/sheets-formula';import{UniverSheetsFormulaUIPlugin}from'@univerjs/sheets-formula-ui';import{UniverSheetsHyperLinkPlugin}from'@univerjs/sheets-hyper-link';import{UniverSheetsHyperLinkUIPlugin}from'@univerjs/sheets-hyper-link-ui';import{UniverSheetsNumfmtPlugin}from'@univerjs/sheets-numfmt';import{UniverSheetsTablePlugin}from'@univerjs/sheets-table';import{UniverSheetsMobileUIPlugin,UniverSheetsUIPlugin,getCurrentRangeDisable$}from'@univerjs/sheets-ui';import{ComponentManager,IDialogService,IMenuManagerService,IMessageService,ISidebarService,MenuItemType,RibbonStartGroup,UniverMobileUIPlugin,UniverUIPlugin,getMenuHiddenObservable}from'@univerjs/ui';import{BehaviorSubject,combineLatest,takeUntil}from'rxjs';import{IURLService}from'@univerjs-pro/collaboration-client-ui';import{HistoryIcon}from'@univerjs/icons';const EDIT_HISTORY_LOADER_PLUGIN_CONFIG_KEY=_0x4160e2(0x181),configSymbol=Symbol(EDIT_HISTORY_LOADER_PLUGIN_CONFIG_KEY),defaultPluginConfig={};function _typeof(_0x44d721){'@babel/helpers - typeof';const _0x282f7b=_0x4160e2;return _typeof=_0x282f7b(0x133)==typeof Symbol&&'symbol'==typeof Symbol[_0x282f7b(0x164)]?function(_0x18df75){return typeof _0x18df75;}:function(_0x1310fc){const _0x3a2cc6=_0x282f7b;return _0x1310fc&&'function'==typeof Symbol&&_0x1310fc[_0x3a2cc6(0x17d)]===Symbol&&_0x1310fc!==Symbol['prototype']?_0x3a2cc6(0x179):typeof _0x1310fc;},_typeof(_0x44d721);}function toPrimitive(_0x5689d4,_0xdd2555){const _0x13acf2=_0x4160e2;if(_0x13acf2(0x1ac)!=_typeof(_0x5689d4)||!_0x5689d4)return _0x5689d4;var _0x29e551=_0x5689d4[Symbol[_0x13acf2(0x151)]];if(void 0x0!==_0x29e551){var _0x255ade=_0x29e551[_0x13acf2(0x1a4)](_0x5689d4,_0xdd2555||'default');if(_0x13acf2(0x1ac)!=_typeof(_0x255ade))return _0x255ade;throw new TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x13acf2(0x165)===_0xdd2555?String:Number)(_0x5689d4);}function toPropertyKey(_0x43fd04){const _0xb3f23d=_0x4160e2;var _0x42a12a=toPrimitive(_0x43fd04,_0xb3f23d(0x165));return _0xb3f23d(0x179)==_typeof(_0x42a12a)?_0x42a12a:_0x42a12a+'';}function _defineProperty(_0x459c21,_0x11f26b,_0x154c8c){return(_0x11f26b=toPropertyKey(_0x11f26b))in _0x459c21?Object['defineProperty'](_0x459c21,_0x11f26b,{'value':_0x154c8c,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x459c21[_0x11f26b]=_0x154c8c,_0x459c21;}function __decorateParam(_0x11b4ba,_0x5766fc){return function(_0x259b66,_0x5de88d){_0x5766fc(_0x259b66,_0x5de88d,_0x11b4ba);};}function __decorate(_0x31099d,_0x5d4497,_0x18180c,_0x1dbab5){const _0x2e5565=_0x4160e2;var _0x1cd565=arguments[_0x2e5565(0x186)],_0x4b5bd7=_0x1cd565<0x3?_0x5d4497:_0x1dbab5===null?_0x1dbab5=Object['getOwnPropertyDescriptor'](_0x5d4497,_0x18180c):_0x1dbab5,_0x1fe41c;if(typeof Reflect===_0x2e5565(0x1ac)&&typeof Reflect[_0x2e5565(0x1bb)]===_0x2e5565(0x133))_0x4b5bd7=Reflect[_0x2e5565(0x1bb)](_0x31099d,_0x5d4497,_0x18180c,_0x1dbab5);else{for(var _0x3e29bf=_0x31099d[_0x2e5565(0x186)]-0x1;_0x3e29bf>=0x0;_0x3e29bf--)if(_0x1fe41c=_0x31099d[_0x3e29bf])_0x4b5bd7=(_0x1cd565<0x3?_0x1fe41c(_0x4b5bd7):_0x1cd565>0x3?_0x1fe41c(_0x5d4497,_0x18180c,_0x4b5bd7):_0x1fe41c(_0x5d4497,_0x18180c))||_0x4b5bd7;}return _0x1cd565>0x3&&_0x4b5bd7&&Object['defineProperty'](_0x5d4497,_0x18180c,_0x4b5bd7),_0x4b5bd7;}const DEFAULT_UNIVER_CONTAINER_ID$1=_0x4160e2(0x154),UNIVER_CONTAINER_ID_KEY=_0x4160e2(0x172),UNIVER_HISTORY_CONTAINER_ID='univer-history-container';let HistoryLoaderService=class HistoryLoaderService extends Disposable{constructor(_0x39f26b,_0x12dd88,_0xa1dbbf,_0x2dd968,_0x2aef52,_0xcd6fac,_0x1ebb81,_0x5eaed3,_0x271899,_0x26ab50){const _0x5020ef=_0x4160e2;super(),this[_0x5020ef(0x1a7)]=_0x39f26b,this[_0x5020ef(0x120)]=_0x12dd88,this[_0x5020ef(0x125)]=_0xa1dbbf,this[_0x5020ef(0x15a)]=_0x2dd968,this[_0x5020ef(0x192)]=_0x2aef52,this['_permissionService']=_0xcd6fac,this[_0x5020ef(0x136)]=_0x1ebb81,this[_0x5020ef(0x15d)]=_0x5eaed3,this[_0x5020ef(0x156)]=_0x271899,this[_0x5020ef(0x1ab)]=_0x26ab50,_defineProperty(this,_0x5020ef(0x1c1),new BehaviorSubject(null)),_defineProperty(this,_0x5020ef(0x1b2),this['_historyUniver$'][_0x5020ef(0x1d6)]()),_defineProperty(this,_0x5020ef(0x18e),new DisposableCollection()),_defineProperty(this,'_pluginMap',new Map()),_defineProperty(this,'_internalWebWorker',null),this[_0x5020ef(0x1ae)]();}get[_0x4160e2(0x1cd)](){const _0x2cdd09=_0x4160e2;return this[_0x2cdd09(0x1c1)]['value'];}[_0x4160e2(0x1ae)](){const _0x2f6241=_0x4160e2;this[_0x2f6241(0x159)](),this[_0x2f6241(0x183)]();}[_0x4160e2(0x159)](){const _0x3848ec=_0x4160e2;var _0x18726a;const _0x3ee63d=(_0x18726a=this[_0x3848ec(0x125)][_0x3848ec(0x147)](_0x3848ec(0x172)))!==null&&_0x18726a!==void 0x0?_0x18726a:DEFAULT_UNIVER_CONTAINER_ID$1,_0x30a04b=document['getElementById'](_0x3ee63d);if(!_0x30a04b)return;const _0x367358=document['createElement'](_0x3848ec(0x1d3));_0x367358['id']=UNIVER_HISTORY_CONTAINER_ID,_0x367358['dataset'][_0x3848ec(0x197)]='history-container',_0x367358[_0x3848ec(0x17c)]['position']='absolute',_0x367358[_0x3848ec(0x17c)]['top']='0',_0x367358['style']['left']='0',_0x367358['style'][_0x3848ec(0x146)]=_0x3848ec(0x126),_0x367358[_0x3848ec(0x17c)][_0x3848ec(0x137)]=_0x3848ec(0x126),_0x367358[_0x3848ec(0x17c)][_0x3848ec(0x1bd)]='49',_0x367358[_0x3848ec(0x17c)][_0x3848ec(0x144)]=_0x3848ec(0x173),_0x30a04b[_0x3848ec(0x1a2)](_0x367358);}[_0x4160e2(0x183)](){const _0x57469e=_0x4160e2;[[UniverRenderEnginePlugin],[UniverUIPlugin,{'container':UNIVER_HISTORY_CONTAINER_ID,'header':!![],'toolbar':![],'footer':!![],'contextMenu':![],'override':[[IDialogService,null]]}],[UniverNetworkPlugin],[UniverDrawingPlugin,{'override':[[IImageIoService,null]]}],[UniverDocsPlugin,{'hasScroll':![]}],[UniverDocsUIPlugin],[UniverSheetsNumfmtPlugin],[UniverSheetsPlugin,{'notExecuteFormula':!![]}],[UniverSheetsUIPlugin],[UniverSheetsFormulaPlugin],[UniverSheetsFormulaUIPlugin],[UniverCollaborationPlugin],[UniverSheetsFilterPlugin],[UniverSheetsFilterUIPlugin],[UniverSheetsConditionalFormattingPlugin],[UniverSheetsConditionalFormattingUIPlugin],[UniverSheetsHyperLinkPlugin],[UniverSheetsHyperLinkUIPlugin],[UniverDataValidationPlugin],[UniverSheetsDataValidationPlugin],[UniverSheetsDataValidationUIPlugin],[UniverFormulaEnginePlugin,{'notExecuteFormula':!![]}],[UniverDrawingUIPlugin],[UniverSheetsDrawingPlugin],[UniverSheetsDrawingUIPlugin],[UniverSheetSparklinePlugin],[UniverSheetSparklineUIPlugin],[UniverSheetsChartPlugin],[UniverSheetsChartUIPlugin],[UniverSheetsShapePlugin],[UniverSheetsShapeUIPlugin],[UniverSheetsPivotTablePlugin,{'notExecuteFormula':!![]}],[UniverSheetsTablePlugin]][_0x57469e(0x11f)](([_0x344e9d,_0x32eb4c])=>this[_0x57469e(0x128)](_0x344e9d,_0x32eb4c));}[_0x4160e2(0x180)](){const _0x4c0889=_0x4160e2;super[_0x4c0889(0x180)](),this['unMountHistoryContent'](),this[_0x4c0889(0x16e)]['clear']();}[_0x4160e2(0x128)](_0x531c41,_0x47802a,_0x51cbfe){const _0x4bba7c=_0x4160e2;if(this[_0x4bba7c(0x16e)][_0x4bba7c(0x12a)](_0x531c41[_0x4bba7c(0x1c7)])&&!_0x51cbfe)throw new Error(_0x4bba7c(0x1bf)+_0x531c41[_0x4bba7c(0x1c7)]+_0x4bba7c(0x139));this['_pluginMap'][_0x4bba7c(0x129)](_0x531c41[_0x4bba7c(0x1c7)],[_0x531c41,_0x47802a]);}[_0x4160e2(0x1a8)](){const _0x494883=_0x4160e2;return Array[_0x494883(0x178)](this[_0x494883(0x16e)][_0x494883(0x1c6)]());}[_0x4160e2(0x118)](_0x3480ca,_0x396aad){const _0x575da8=_0x4160e2,_0x243f16=document[_0x575da8(0x1c3)](UNIVER_HISTORY_CONTAINER_ID);if(!_0x243f16)return;_0x243f16[_0x575da8(0x17c)][_0x575da8(0x144)]='block',this['_initUniver'](_0x3480ca,UNIVER_HISTORY_CONTAINER_ID,_0x396aad);}[_0x4160e2(0x117)](){const _0x40a881=_0x4160e2;var _0xc39970;this[_0x40a881(0x18e)]['dispose'](),(_0xc39970=this[_0x40a881(0x1cd)])===null||_0xc39970===void 0x0||_0xc39970[_0x40a881(0x180)](),this[_0x40a881(0x1c1)][_0x40a881(0x12e)](null);const _0x4e4528=document['getElementById'](UNIVER_HISTORY_CONTAINER_ID);if(!_0x4e4528)return;_0x4e4528['style'][_0x40a881(0x144)]='none',this[_0x40a881(0x1a9)]&&(this[_0x40a881(0x1a9)]['terminate'](),this['_internalWebWorker']=null);}[_0x4160e2(0x138)](_0x2cc14c,_0x594490,_0x453a22){const _0x5465e5=_0x4160e2;var _0x8034d2,_0x4c871c,_0x1d3e55,_0x1a523d,_0x1b459b;if(this['historyUniver'])return;const _0xa314d7=new Univer({'locales':{[this[_0x5465e5(0x1a7)][_0x5465e5(0x12f)]()]:this['_localeService'][_0x5465e5(0x135)]()},'override':[[IAuthzIoService,{'useClass':AuthzIoHttpService}]]}),_0x526af6=_0xa314d7[_0x5465e5(0x1d1)]();this[_0x5465e5(0x194)](this[_0x5465e5(0x1ab)][_0x5465e5(0x1cc)]['subscribe'](_0xbcc2ae=>{const _0x561b58=_0x5465e5;_0x526af6['get'](ThemeService)[_0x561b58(0x187)](_0xbcc2ae);})),this['disposeWithMe'](this[_0x5465e5(0x1ab)][_0x5465e5(0x1cb)]['subscribe'](_0x387f97=>{const _0x4d1419=_0x5465e5;_0x526af6[_0x4d1419(0x1ca)](ThemeService)[_0x4d1419(0x152)](_0x387f97);})),_0x526af6[_0x5465e5(0x1ca)](LocaleService)[_0x5465e5(0x158)](this['_localeService'][_0x5465e5(0x12f)]()),_0x526af6['get'](IConfigService)['setConfig'](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY,this[_0x5465e5(0x125)][_0x5465e5(0x147)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY));const _0x2e5178=this[_0x5465e5(0x125)][_0x5465e5(0x147)](LS_CONFIG_KEY);if(_0x2e5178)_0xa314d7[_0x5465e5(0x128)](UniverLicensePlugin,{'license':_0x2e5178['ls']});const _0x3d789d=(_0x8034d2=this[_0x5465e5(0x125)][_0x5465e5(0x147)]('edit-history-loader.config'))===null||_0x8034d2===void 0x0?void 0x0:_0x8034d2[_0x5465e5(0x1b6)],_0x10b556=!!_0x3d789d;_0x10b556&&(this['_internalWebWorker']=_0x3d789d instanceof Worker?_0x3d789d:null,_0xa314d7[_0x5465e5(0x128)](UniverRPCMainThreadPlugin,{'workerURL':_0x3d789d}));this['_pluginMap']['forEach'](([_0x2858dd,_0x1706bc])=>{_0xa314d7['registerPlugin'](_0x2858dd,_0x1706bc);}),_0xa314d7[_0x5465e5(0x128)](UniverEditHistoryViewerPlugin,{'historyListServerUrl':(_0x4c871c=this['_configService'][_0x5465e5(0x147)](_0x5465e5(0x181)))===null||_0x4c871c===void 0x0?void 0x0:_0x4c871c[_0x5465e5(0x130)],'historyPanelComponentKey':(_0x1d3e55=this['_configService'][_0x5465e5(0x147)](_0x5465e5(0x181)))===null||_0x1d3e55===void 0x0?void 0x0:_0x1d3e55[_0x5465e5(0x121)],'historyPanelHidden':(_0x1a523d=this['_configService'][_0x5465e5(0x147)]('edit-history-loader.config'))===null||_0x1a523d===void 0x0?void 0x0:_0x1a523d[_0x5465e5(0x11b)],'historyAIassistantEnabled':(_0x1b459b=this[_0x5465e5(0x125)][_0x5465e5(0x147)](_0x5465e5(0x181)))===null||_0x1b459b===void 0x0?void 0x0:_0x1b459b[_0x5465e5(0x18c)]}),_0x526af6[_0x5465e5(0x16c)](_0x10dea9=>{const _0x342cab=_0x5465e5;this[_0x342cab(0x11d)](_0x10dea9,_0x2cc14c);}),this['_historyUniver$'][_0x5465e5(0x12e)](_0xa314d7);const _0x581f50=_0x526af6[_0x5465e5(0x1ca)](HistoryManagerService),_0x7d6d0f=this[_0x5465e5(0x11a)](_0x2cc14c),_0x2f0ddf=()=>{const _0x2579ff=_0x5465e5;if(_0x453a22)_0x581f50[_0x2579ff(0x14f)](_0x2cc14c,_0x594490,_0x7d6d0f,_0x453a22);else _0x581f50[_0x2579ff(0x140)](_0x2cc14c,_0x594490,_0x7d6d0f);};this[_0x5465e5(0x192)][_0x5465e5(0x17a)]({'content':this[_0x5465e5(0x1a7)]['t'](_0x5465e5(0x122)),'type':MessageType[_0x5465e5(0x114)]});if(_0x10b556)try{_0x526af6[_0x5465e5(0x1ca)](IRemoteInstanceService)['whenReady']()[_0x5465e5(0x1a3)](()=>{_0x2f0ddf();});}catch{_0x2f0ddf();}else _0x2f0ddf();}[_0x4160e2(0x11d)](_0x395bb0,_0x36cecb){const _0x3f1d1c=_0x4160e2,_0x53f312=_0x395bb0[_0x3f1d1c(0x1ca)](HistoryManagerService);this[_0x3f1d1c(0x18e)][_0x3f1d1c(0x132)](_0x53f312[_0x3f1d1c(0x15e)][_0x3f1d1c(0x157)](_0x5dc6e5=>{const _0x440429=_0x3f1d1c;switch(_0x5dc6e5){case HistoryModeStatus[_0x440429(0x1d2)]:this[_0x440429(0x15d)][_0x440429(0x1ba)](),this[_0x440429(0x156)][_0x440429(0x1c0)]();break;case HistoryModeStatus['Exited']:this[_0x440429(0x15a)][_0x440429(0x1ce)](ExitEditHistoryOperation['id']),this[_0x440429(0x117)]();break;case HistoryModeStatus[_0x440429(0x127)]:this['unMountHistoryContent'](),this[_0x440429(0x192)][_0x440429(0x17a)]({'content':this[_0x440429(0x1a7)]['t'](_0x440429(0x141)),'type':MessageType['Error'],'duration':0xbb8});break;default:break;}})),this[_0x3f1d1c(0x18e)][_0x3f1d1c(0x132)](_0x53f312[_0x3f1d1c(0x13e)]['subscribe'](async _0x3faea0=>{const _0x390cc6=_0x3f1d1c;if(_0x3faea0)this['_commandService'][_0x390cc6(0x1ce)](RevertRevisionMutation['id'],{'unitId':_0x36cecb,'revision':_0x3faea0});}));}['_checkCanRevert'](_0x2cfbba){const _0x5583e2=_0x4160e2,_0x2f9379=this[_0x5583e2(0x120)][_0x5583e2(0x1a5)](_0x2cfbba)[_0x5583e2(0x14a)]()['map'](_0x3fdfc8=>_0x3fdfc8[_0x5583e2(0x11e)]()),_0x5217f1=new WorkbookEditablePermission(_0x2cfbba)['id'],_0x249361=_0x2f9379[_0x5583e2(0x19c)](_0x2f0f8c=>new WorksheetEditPermission(_0x2cfbba,_0x2f0f8c)['id']),_0xfdc260=_0x2f9379[_0x5583e2(0x19c)](_0x337afa=>this['_selectionProtectionRuleModel'][_0x5583e2(0x1b3)](_0x2cfbba,_0x337afa)[_0x5583e2(0x19c)](_0x4117ea=>new RangeProtectionPermissionEditPoint(_0x2cfbba,_0x337afa,_0x4117ea[_0x5583e2(0x16d)])['id']))[_0x5583e2(0x123)](),_0x5ca834=new WorkbookRecoverHistoryPermission(_0x2cfbba)['id'];return this['_permissionService'][_0x5583e2(0x148)]([_0x5217f1,..._0x249361,..._0xfdc260,_0x5ca834])[_0x5583e2(0x12b)](_0x5524da=>!!_0x5524da['value']);}};HistoryLoaderService=__decorate([__decorateParam(0x0,Inject(LocaleService)),__decorateParam(0x1,IUniverInstanceService),__decorateParam(0x2,IConfigService),__decorateParam(0x3,ICommandService),__decorateParam(0x4,IMessageService),__decorateParam(0x5,IPermissionService),__decorateParam(0x6,Inject(RangeProtectionRuleModel)),__decorateParam(0x7,Inject(IDialogService)),__decorateParam(0x8,Inject(ISidebarService)),__decorateParam(0x9,Inject(ThemeService))],HistoryLoaderService);const ToggleEditHistoryOperation={'id':_0x4160e2(0x195),'type':CommandType[_0x4160e2(0x1b5)],'handler':_0x36de92=>{const _0x4301e5=_0x4160e2,_0x38977a=_0x36de92['get'](HistoryLoaderService),{unitId:_0x4c5e52}=getSheetCommandTarget(_0x36de92[_0x4301e5(0x1ca)](IUniverInstanceService))||{};if(!_0x4c5e52)return![];return _0x38977a[_0x4301e5(0x118)](_0x4c5e52),!![];}},ExitEditHistoryOperation={'id':_0x4160e2(0x190),'type':CommandType[_0x4160e2(0x1b5)],'handler':()=>!![]};var name=_0x4160e2(0x19a),version='0.22.0';function ToggleEditHistoryMenuFactory(_0x212f9f){const _0xe07653=_0x4160e2;return{'id':ToggleEditHistoryOperation['id'],'type':MenuItemType[_0xe07653(0x124)],'icon':_0xe07653(0x1bc),'tooltip':_0xe07653(0x153),'hidden$':getMenuHiddenObservable(_0x212f9f,UniverInstanceType[_0xe07653(0x13d)]),'disabled$':getCurrentRangeDisable$(_0x212f9f,{'workbookTypes':[WorkbookViewHistoryPermission],'worksheetTypes':[],'rangeTypes':[]})};}function _0x2827(_0x20d1bd,_0xe29a06){_0x20d1bd=_0x20d1bd-0x113;const _0x31e5c0=_0x31e5();let _0x282761=_0x31e5c0[_0x20d1bd];return _0x282761;}const menuSchema={[RibbonStartGroup[_0x4160e2(0x1ad)]]:{[ToggleEditHistoryOperation['id']]:{'order':0.2,'menuItemFactory':ToggleEditHistoryMenuFactory}}};let MobileHistoryLoaderController=class MobileHistoryLoaderController extends RxDisposable{constructor(_0x258e82,_0x1c3d96,_0x2eeaa7,_0x37d0a3,_0x456ab8,_0x2c778c,_0x2bf727,_0xcaa179,_0x2e29ae,_0xc88eb2,_0x4e3d33){const _0x4d83e5=_0x4160e2;super(),this[_0x4d83e5(0x15a)]=_0x258e82,this['_menuManagerService']=_0x1c3d96,this[_0x4d83e5(0x1c5)]=_0x2eeaa7,this[_0x4d83e5(0x19f)]=_0x37d0a3,this['_localeService']=_0x456ab8,this[_0x4d83e5(0x192)]=_0x2c778c,this[_0x4d83e5(0x170)]=_0x2bf727,this[_0x4d83e5(0x168)]=_0xcaa179,this[_0x4d83e5(0x11c)]=_0x2e29ae,this['_univerInstanceService']=_0xc88eb2,this[_0x4d83e5(0x131)]=_0x4e3d33,_defineProperty(this,_0x4d83e5(0x1a1),null),this['_init']();}[_0x4160e2(0x1ae)](){const _0x690bec=_0x4160e2;[ToggleEditHistoryOperation,ExitEditHistoryOperation][_0x690bec(0x11f)](_0x1b1bfb=>this['disposeWithMe'](toDisposable(this[_0x690bec(0x15a)]['registerCommand'](_0x1b1bfb)))),this[_0x690bec(0x194)](this[_0x690bec(0x1c5)]['register'](_0x690bec(0x1bc),HistoryIcon)),this[_0x690bec(0x191)][_0x690bec(0x171)](menuSchema),this[_0x690bec(0x194)](this[_0x690bec(0x15a)]['onCommandExecuted'](async(_0xe28ad5,_0x2fa3af)=>{const _0x4082f8=_0x690bec;if(_0xe28ad5['id']===RevertRevisionMutation['id']){const {unitId:_0x251bc3}=_0xe28ad5[_0x4082f8(0x13c)];this[_0x4082f8(0x192)][_0x4082f8(0x17a)]({'content':this[_0x4082f8(0x1a7)]['t'](_0x4082f8(0x13b)),'type':MessageType['Loading'],'duration':0x1388});const _0xb010a2=this[_0x4082f8(0x170)][_0x4082f8(0x13a)](_0x251bc3);if(!(_0x2fa3af===null||_0x2fa3af===void 0x0?void 0x0:_0x2fa3af[_0x4082f8(0x1d5)]))this[_0x4082f8(0x1b1)](_0xb010a2,async()=>{const _0xa3e3d6=_0x4082f8,_0x30aea5=this[_0xa3e3d6(0x120)]['getCurrentUnitOfType'](UniverInstanceType[_0xa3e3d6(0x13d)]),_0x3c55e7=_0x30aea5===null||_0x30aea5===void 0x0?void 0x0:_0x30aea5[_0xa3e3d6(0x1be)]();if(!_0x3c55e7)return![];this['_univerInstanceService']['disposeUnit'](_0x251bc3);const _0x37f3b4=await this[_0xa3e3d6(0x11c)][_0xa3e3d6(0x1aa)](_0x251bc3,UniverInstanceType[_0xa3e3d6(0x13d)]);if(_0x37f3b4&&_0x37f3b4 instanceof Workbook)return await this['_setupSubUnitSync'](_0x37f3b4,_0x3c55e7[_0xa3e3d6(0x11e)]()),!![];return![];});else this[_0x4082f8(0x1b1)](_0xb010a2,async()=>{const _0x4b6d31=_0x4082f8;return setTimeout(()=>window[_0x4b6d31(0x12d)][_0x4b6d31(0x142)]()),!![];},!![]);}}));}[_0x4160e2(0x1b1)](_0x51132d,_0x1e1e7f,_0x2a61e2=![]){const _0x16da73=_0x4160e2,_0x2dd933=combineLatest([_0x51132d[_0x16da73(0x188)]['event$'],_0x51132d[_0x16da73(0x161)]])[_0x16da73(0x157)](async([_0x4d350a,_0x59432a])=>{const _0x2273c8=_0x16da73;if(_0x4d350a['eventID']===CollaborationEvent[_0x2273c8(0x145)]&&(_0x59432a===null||_0x59432a===void 0x0?void 0x0:_0x59432a[_0x2273c8(0x119)])===CollaborationStatus[_0x2273c8(0x19e)]){if(_0x4d350a[_0x2273c8(0x17e)][_0x2273c8(0x15f)][_0x2273c8(0x1b9)](_0x4ef668=>_0x4ef668['id']===RevertRevisionMutation['id'])){if(await _0x1e1e7f()){var _0x43b6f9;this[_0x2273c8(0x19f)][_0x2273c8(0x117)](),_0x2dd933[_0x2273c8(0x163)](),this[_0x2273c8(0x1a1)]&&clearTimeout(this['_revertErrorTimer']),await((_0x43b6f9=this[_0x2273c8(0x168)])===null||_0x43b6f9===void 0x0?void 0x0:_0x43b6f9[_0x2273c8(0x115)]()),this['_messageService'][_0x2273c8(0x18d)]();}}}});if(_0x2a61e2)this[_0x16da73(0x1a1)]=setTimeout(()=>{const _0x3ca5ac=_0x16da73;_0x2dd933[_0x3ca5ac(0x163)](),this['_messageService'][_0x3ca5ac(0x17a)]({'content':this[_0x3ca5ac(0x1a7)]['t'](_0x3ca5ac(0x193)),'type':MessageType[_0x3ca5ac(0x127)],'duration':0xbb8});},0x1388);}async[_0x4160e2(0x167)](_0x415c35,_0x36a472){const _0x406dd3=_0x4160e2;await this[_0x406dd3(0x16b)](_0x415c35,_0x36a472),_0x415c35[_0x406dd3(0x116)][_0x406dd3(0x12c)](takeUntil(this['dispose$']))[_0x406dd3(0x157)](_0x1330f0=>{if(_0x1330f0)this['_updateURLWithCurrentState'](_0x1330f0);}),this[_0x406dd3(0x131)][_0x406dd3(0x14d)]['pipe'](takeUntil(this[_0x406dd3(0x160)]))[_0x406dd3(0x157)](()=>this['_updateSubUnitFromURLParams'](_0x415c35,_0x36a472));}['_updateURLWithCurrentState'](_0x385359,_0x259363=![]){const _0x3cdec0=_0x4160e2,_0x3b36c7=this['_urlService']['getParam'](_0x3cdec0(0x166));if(_0x385359[_0x3cdec0(0x11e)]()!==_0x3b36c7)this['_urlService'][_0x3cdec0(0x16a)]('subunit',_0x385359[_0x3cdec0(0x11e)](),_0x259363);}async[_0x4160e2(0x16b)](_0x496d20,_0x27b216){const _0x29a0d4=_0x4160e2;var _0x48ee4e;if(!_0x27b216||!_0x496d20[_0x29a0d4(0x1b7)](_0x27b216)){const _0x134b93=_0x496d20[_0x29a0d4(0x18a)]()[0x0],_0x270ed9=_0x496d20[_0x29a0d4(0x1b7)](_0x134b93);if(!_0x270ed9)return;this['_updateURLWithCurrentState'](_0x270ed9,!![]),await this[_0x29a0d4(0x15a)][_0x29a0d4(0x1ce)](SetWorksheetActivateCommand['id'],{'unitId':_0x496d20['getUnitId'](),'subUnitId':_0x134b93});return;}if(((_0x48ee4e=_0x496d20['getActiveSheet']())===null||_0x48ee4e===void 0x0?void 0x0:_0x48ee4e['getSheetId']())===_0x27b216)return;await this['_commandService']['executeCommand'](SetWorksheetActivateCommand['id'],{'unitId':_0x496d20[_0x29a0d4(0x185)](),'subUnitId':_0x27b216});}};MobileHistoryLoaderController=__decorate([__decorateParam(0x0,ICommandService),__decorateParam(0x1,IMenuManagerService),__decorateParam(0x2,Inject(ComponentManager)),__decorateParam(0x3,Inject(HistoryLoaderService)),__decorateParam(0x4,Inject(LocaleService)),__decorateParam(0x5,IMessageService),__decorateParam(0x6,Inject(CollaborationController)),__decorateParam(0x7,ILocalCacheService),__decorateParam(0x8,Inject(DataLoaderService)),__decorateParam(0x9,IUniverInstanceService),__decorateParam(0xa,IURLService)],MobileHistoryLoaderController);const DEFAULT_UNIVER_CONTAINER_ID=_0x4160e2(0x154),UNIVER_CONTAINER_ID_KEY$1=_0x4160e2(0x172),UNIVER_HISTORY_CONTAINER_ID$1=_0x4160e2(0x177);let MobileHistoryLoaderService=class MobileHistoryLoaderService extends Disposable{constructor(_0x31a9bf,_0x3f5c38,_0xfc2773,_0x53d271,_0x32d938,_0x395f1f,_0xa8581a,_0x5437bd,_0x2c119d,_0x5c4f6e){const _0x3b671e=_0x4160e2;super(),this['_localeService']=_0x31a9bf,this[_0x3b671e(0x120)]=_0x3f5c38,this[_0x3b671e(0x125)]=_0xfc2773,this[_0x3b671e(0x15a)]=_0x53d271,this[_0x3b671e(0x192)]=_0x32d938,this[_0x3b671e(0x1a0)]=_0x395f1f,this[_0x3b671e(0x136)]=_0xa8581a,this['_dialogService']=_0x5437bd,this[_0x3b671e(0x156)]=_0x2c119d,this[_0x3b671e(0x1ab)]=_0x5c4f6e,_defineProperty(this,_0x3b671e(0x1c1),new BehaviorSubject(null)),_defineProperty(this,_0x3b671e(0x1b2),this['_historyUniver$'][_0x3b671e(0x1d6)]()),_defineProperty(this,_0x3b671e(0x18e),new DisposableCollection()),_defineProperty(this,_0x3b671e(0x16e),new Map()),_defineProperty(this,_0x3b671e(0x1a9),null),this[_0x3b671e(0x1ae)]();}get['historyUniver'](){return this['_historyUniver$']['value'];}['_init'](){const _0x1f41ae=_0x4160e2;this[_0x1f41ae(0x159)](),this[_0x1f41ae(0x183)]();}['_initContainer'](){const _0x5bfa29=_0x4160e2;var _0x48905b;const _0x1a252b=(_0x48905b=this[_0x5bfa29(0x125)]['getConfig'](_0x5bfa29(0x172)))!==null&&_0x48905b!==void 0x0?_0x48905b:DEFAULT_UNIVER_CONTAINER_ID,_0x20f02a=document['getElementById'](_0x1a252b);if(!_0x20f02a)return;const _0x3e13f9=document[_0x5bfa29(0x19b)](_0x5bfa29(0x1d3));_0x3e13f9['id']=UNIVER_HISTORY_CONTAINER_ID$1,_0x3e13f9[_0x5bfa29(0x113)]['uComp']=_0x5bfa29(0x15b),_0x3e13f9[_0x5bfa29(0x17c)][_0x5bfa29(0x1af)]='absolute',_0x3e13f9[_0x5bfa29(0x17c)][_0x5bfa29(0x196)]='0',_0x3e13f9[_0x5bfa29(0x17c)][_0x5bfa29(0x14c)]='0',_0x3e13f9['style']['width']=_0x5bfa29(0x126),_0x3e13f9[_0x5bfa29(0x17c)][_0x5bfa29(0x137)]=_0x5bfa29(0x126),_0x3e13f9['style'][_0x5bfa29(0x1bd)]='49',_0x3e13f9[_0x5bfa29(0x17c)][_0x5bfa29(0x144)]=_0x5bfa29(0x173),_0x20f02a[_0x5bfa29(0x1a2)](_0x3e13f9);}[_0x4160e2(0x183)](){const _0x54c56c=_0x4160e2;[[UniverRenderEnginePlugin],[UniverMobileUIPlugin,{'container':UNIVER_HISTORY_CONTAINER_ID$1,'header':!![],'toolbar':![],'footer':!![],'contextMenu':![],'override':[[IDialogService,null]]}],[UniverNetworkPlugin],[UniverDrawingPlugin,{'override':[[IImageIoService,null]]}],[UniverDocsPlugin,{'hasScroll':![]}],[UniverDocsUIPlugin],[UniverSheetsNumfmtPlugin],[UniverSheetsPlugin,{'notExecuteFormula':!![]}],[UniverSheetsMobileUIPlugin],[UniverSheetsFormulaPlugin],[UniverSheetsFormulaUIPlugin],[UniverCollaborationPlugin],[UniverSheetsFilterPlugin],[UniverSheetsConditionalFormattingPlugin],[UniverSheetsHyperLinkPlugin],[UniverSheetsHyperLinkUIPlugin],[UniverDataValidationPlugin],[UniverSheetsDataValidationPlugin],[UniverSheetsDataValidationMobileUIPlugin],[UniverFormulaEnginePlugin,{'notExecuteFormula':!![]}],[UniverDrawingUIPlugin],[UniverSheetsDrawingPlugin],[UniverSheetsDrawingUIPlugin],[UniverSheetSparklinePlugin],[UniverSheetSparklineUIPlugin],[UniverSheetsChartPlugin],[UniverSheetsChartUIPlugin],[UniverSheetsShapePlugin],[UniverSheetsShapeUIPlugin],[UniverSheetsPivotTablePlugin,{'notExecuteFormula':!![]}],[UniverSheetsTablePlugin]][_0x54c56c(0x11f)](([_0x41dde4,_0x20be88])=>this[_0x54c56c(0x128)](_0x41dde4,_0x20be88));}['dispose'](){const _0x35dc0d=_0x4160e2;super['dispose'](),this[_0x35dc0d(0x117)](),this[_0x35dc0d(0x16e)]['clear']();}[_0x4160e2(0x128)](_0x1a8b2e,_0x536161,_0x3b45a8){const _0x36db0c=_0x4160e2;if(this[_0x36db0c(0x16e)][_0x36db0c(0x12a)](_0x1a8b2e[_0x36db0c(0x1c7)])&&!_0x3b45a8)throw new Error(_0x36db0c(0x13f)+_0x1a8b2e[_0x36db0c(0x1c7)]+'\x20has\x20been\x20registered.');this['_pluginMap'][_0x36db0c(0x129)](_0x1a8b2e[_0x36db0c(0x1c7)],[_0x1a8b2e,_0x536161]);}[_0x4160e2(0x1a8)](){const _0x504424=_0x4160e2;return Array[_0x504424(0x178)](this[_0x504424(0x16e)]['values']());}[_0x4160e2(0x118)](_0xd125f,_0x530f8a){const _0x1f8806=_0x4160e2,_0x5784f3=document[_0x1f8806(0x1c3)](UNIVER_HISTORY_CONTAINER_ID$1);if(!_0x5784f3)return;_0x5784f3[_0x1f8806(0x17c)]['display']=_0x1f8806(0x18b),this['_initUniver'](_0xd125f,UNIVER_HISTORY_CONTAINER_ID$1,_0x530f8a);}[_0x4160e2(0x117)](){const _0x18166e=_0x4160e2;var _0x4bb029;this['_disposableCollection']['dispose'](),(_0x4bb029=this[_0x18166e(0x1cd)])===null||_0x4bb029===void 0x0||_0x4bb029[_0x18166e(0x180)](),this[_0x18166e(0x1c1)][_0x18166e(0x12e)](null);const _0x435770=document[_0x18166e(0x1c3)](UNIVER_HISTORY_CONTAINER_ID$1);if(!_0x435770)return;_0x435770[_0x18166e(0x17c)][_0x18166e(0x144)]=_0x18166e(0x173),this['_internalWebWorker']&&(this[_0x18166e(0x1a9)]['terminate'](),this[_0x18166e(0x1a9)]=null);}['_initUniver'](_0x2a9e6d,_0x46ee25,_0x2eaa8d){const _0x5ac754=_0x4160e2;var _0x271c1f,_0xd6ef9f,_0x1157f6,_0x4a151a;if(this[_0x5ac754(0x1cd)])return;const _0xe71313=new Univer({'locales':{[this[_0x5ac754(0x1a7)][_0x5ac754(0x12f)]()]:this['_localeService']['getLocales']()},'override':[[IAuthzIoService,{'useClass':AuthzIoHttpService}]]}),_0x236d53=_0xe71313[_0x5ac754(0x1d1)]();this['disposeWithMe'](this['_themeService']['darkMode$'][_0x5ac754(0x157)](_0x5a6999=>{const _0x72c84d=_0x5ac754;_0x236d53[_0x72c84d(0x1ca)](ThemeService)[_0x72c84d(0x187)](_0x5a6999);})),this[_0x5ac754(0x194)](this[_0x5ac754(0x1ab)]['currentTheme$'][_0x5ac754(0x157)](_0x227ac4=>{const _0x1b6ef0=_0x5ac754;_0x236d53[_0x1b6ef0(0x1ca)](ThemeService)[_0x1b6ef0(0x152)](_0x227ac4);})),_0x236d53[_0x5ac754(0x1ca)](LocaleService)[_0x5ac754(0x158)](this[_0x5ac754(0x1a7)][_0x5ac754(0x12f)]()),_0x236d53[_0x5ac754(0x1ca)](IConfigService)[_0x5ac754(0x14b)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY,this[_0x5ac754(0x125)][_0x5ac754(0x147)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY));const _0x4f0a94=this[_0x5ac754(0x125)][_0x5ac754(0x147)](LS_CONFIG_KEY);if(_0x4f0a94)_0xe71313[_0x5ac754(0x128)](UniverLicensePlugin,{'license':_0x4f0a94['ls']});const _0x286d9f=(_0x271c1f=this[_0x5ac754(0x125)][_0x5ac754(0x147)](_0x5ac754(0x181)))===null||_0x271c1f===void 0x0?void 0x0:_0x271c1f['workerURL'],_0x4b6b8e=!!_0x286d9f;_0x4b6b8e&&(this[_0x5ac754(0x1a9)]=_0x286d9f instanceof Worker?_0x286d9f:null,_0xe71313['registerPlugin'](UniverRPCMainThreadPlugin,{'workerURL':_0x286d9f}));this[_0x5ac754(0x16e)][_0x5ac754(0x11f)](([_0x3ccda0,_0x1c7b23])=>{const _0x433c87=_0x5ac754;_0xe71313[_0x433c87(0x128)](_0x3ccda0,_0x1c7b23);}),_0xe71313[_0x5ac754(0x128)](UniverEditHistoryViewerMobilePlugin,{'historyListServerUrl':(_0xd6ef9f=this[_0x5ac754(0x125)][_0x5ac754(0x147)](_0x5ac754(0x181)))===null||_0xd6ef9f===void 0x0?void 0x0:_0xd6ef9f[_0x5ac754(0x130)],'historyPanelComponentKey':(_0x1157f6=this[_0x5ac754(0x125)]['getConfig'](_0x5ac754(0x181)))===null||_0x1157f6===void 0x0?void 0x0:_0x1157f6[_0x5ac754(0x121)],'historyPanelHidden':(_0x4a151a=this[_0x5ac754(0x125)]['getConfig'](_0x5ac754(0x181)))===null||_0x4a151a===void 0x0?void 0x0:_0x4a151a['historyPanelHidden']}),_0x236d53[_0x5ac754(0x16c)](_0x1dc6d4=>{const _0x522cf3=_0x5ac754;this[_0x522cf3(0x11d)](_0x1dc6d4,_0x2a9e6d);}),this[_0x5ac754(0x1c1)][_0x5ac754(0x12e)](_0xe71313);const _0x21b697=_0x236d53[_0x5ac754(0x1ca)](HistoryManagerService),_0x536e75=this[_0x5ac754(0x11a)](_0x2a9e6d),_0x2484b0=()=>{const _0x439cb5=_0x5ac754;if(_0x2eaa8d)_0x21b697[_0x439cb5(0x14f)](_0x2a9e6d,_0x46ee25,_0x536e75,_0x2eaa8d);else _0x21b697[_0x439cb5(0x140)](_0x2a9e6d,_0x46ee25,_0x536e75);};this['_messageService'][_0x5ac754(0x17a)]({'content':this[_0x5ac754(0x1a7)]['t'](_0x5ac754(0x122)),'type':MessageType[_0x5ac754(0x114)]});if(_0x4b6b8e)try{_0x236d53[_0x5ac754(0x1ca)](IRemoteInstanceService)[_0x5ac754(0x1d0)]()['then'](()=>{_0x2484b0();});}catch{_0x2484b0();}else _0x2484b0();}[_0x4160e2(0x11d)](_0x55a158,_0x5b4dd2){const _0x91d774=_0x4160e2,_0x36f2ae=_0x55a158[_0x91d774(0x1ca)](HistoryManagerService);this['_disposableCollection'][_0x91d774(0x132)](_0x36f2ae['status$'][_0x91d774(0x157)](_0x5d8478=>{const _0x1114d0=_0x91d774;switch(_0x5d8478){case HistoryModeStatus[_0x1114d0(0x1d2)]:this['_dialogService']['closeAll'](),this['_sidebarService']['close']();break;case HistoryModeStatus[_0x1114d0(0x19d)]:this['_commandService'][_0x1114d0(0x1ce)](ExitEditHistoryOperation['id']),this[_0x1114d0(0x117)]();break;case HistoryModeStatus[_0x1114d0(0x127)]:this[_0x1114d0(0x117)](),this[_0x1114d0(0x192)][_0x1114d0(0x17a)]({'content':this[_0x1114d0(0x1a7)]['t'](_0x1114d0(0x141)),'type':MessageType[_0x1114d0(0x127)],'duration':0xbb8});break;default:break;}})),this[_0x91d774(0x18e)][_0x91d774(0x132)](_0x36f2ae['revertRevision$']['subscribe'](async _0x4fc308=>{const _0x2c81a8=_0x91d774;if(_0x4fc308)this[_0x2c81a8(0x15a)][_0x2c81a8(0x1ce)](RevertRevisionMutation['id'],{'unitId':_0x5b4dd2,'revision':_0x4fc308});}));}[_0x4160e2(0x11a)](_0x1886be){const _0x25caa5=_0x4160e2,_0x1de1ed=this['_univerInstanceService'][_0x25caa5(0x1a5)](_0x1886be)[_0x25caa5(0x14a)]()['map'](_0x13401a=>_0x13401a[_0x25caa5(0x11e)]()),_0x480385=new WorkbookEditablePermission(_0x1886be)['id'],_0x2744a0=_0x1de1ed[_0x25caa5(0x19c)](_0x47d287=>new WorksheetEditPermission(_0x1886be,_0x47d287)['id']),_0x15da35=_0x1de1ed[_0x25caa5(0x19c)](_0x4c44b9=>this[_0x25caa5(0x136)][_0x25caa5(0x1b3)](_0x1886be,_0x4c44b9)[_0x25caa5(0x19c)](_0x1214bd=>new RangeProtectionPermissionEditPoint(_0x1886be,_0x4c44b9,_0x1214bd[_0x25caa5(0x16d)])['id']))['flat'](),_0x434f7c=new WorkbookRecoverHistoryPermission(_0x1886be)['id'];return this['_permissionService'][_0x25caa5(0x148)]([_0x480385,..._0x2744a0,..._0x15da35,_0x434f7c])['every'](_0x565c5b=>!!_0x565c5b[_0x25caa5(0x17b)]);}};MobileHistoryLoaderService=__decorate([__decorateParam(0x0,Inject(LocaleService)),__decorateParam(0x1,IUniverInstanceService),__decorateParam(0x2,IConfigService),__decorateParam(0x3,ICommandService),__decorateParam(0x4,IMessageService),__decorateParam(0x5,IPermissionService),__decorateParam(0x6,Inject(RangeProtectionRuleModel)),__decorateParam(0x7,Inject(IDialogService)),__decorateParam(0x8,Inject(ISidebarService)),__decorateParam(0x9,Inject(ThemeService))],MobileHistoryLoaderService);let UniverEditHistoryLoaderMobilePlugin=class UniverEditHistoryLoaderMobilePlugin extends Plugin{constructor(_0x395142=defaultPluginConfig,_0x179a46,_0x76a66){const _0x5cc453=_0x4160e2;super(),this[_0x5cc453(0x199)]=_0x395142,this[_0x5cc453(0x1cf)]=_0x179a46,this[_0x5cc453(0x125)]=_0x76a66;const {menu:_0x3294b1,..._0x463356}=merge({},defaultPluginConfig,this[_0x5cc453(0x199)]);if(_0x3294b1)this[_0x5cc453(0x125)][_0x5cc453(0x14b)](_0x5cc453(0x1c8),_0x3294b1,{'merge':!![]});this[_0x5cc453(0x125)]['setConfig'](EDIT_HISTORY_LOADER_PLUGIN_CONFIG_KEY,_0x463356);if(this[_0x5cc453(0x199)][_0x5cc453(0x184)])this[_0x5cc453(0x125)][_0x5cc453(0x14b)](UNIVER_CONTAINER_ID_KEY$1,this[_0x5cc453(0x199)][_0x5cc453(0x184)]);}[_0x4160e2(0x1d4)](){const _0x187d9b=_0x4160e2;[[HistoryLoaderService,{'useClass':MobileHistoryLoaderService}],[MobileHistoryLoaderController]][_0x187d9b(0x11f)](_0x348aba=>this['_injector']['add'](_0x348aba));}[_0x4160e2(0x149)](){const _0x12fd31=_0x4160e2;this['_injector'][_0x12fd31(0x1ca)](MobileHistoryLoaderController);}};_defineProperty(UniverEditHistoryLoaderMobilePlugin,'type',UniverInstanceType['UNIVER_UNKNOWN']),_defineProperty(UniverEditHistoryLoaderMobilePlugin,'pluginName',_0x4160e2(0x1b8)),_defineProperty(UniverEditHistoryLoaderMobilePlugin,_0x4160e2(0x169),name),_defineProperty(UniverEditHistoryLoaderMobilePlugin,_0x4160e2(0x1a6),version),UniverEditHistoryLoaderMobilePlugin=__decorate([DependentOn(UniverLicensePlugin),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,IConfigService)],UniverEditHistoryLoaderMobilePlugin);let HistoryLoaderController=class HistoryLoaderController extends RxDisposable{constructor(_0x348c88,_0x4378de,_0x3a9f8c,_0x210756,_0x2a7857,_0x1e1aab,_0xf3c5c8,_0x795e9b,_0x267f2e,_0x595194,_0x130c9a){const _0x37d5f5=_0x4160e2;super(),this[_0x37d5f5(0x15a)]=_0x348c88,this[_0x37d5f5(0x191)]=_0x4378de,this[_0x37d5f5(0x1c5)]=_0x3a9f8c,this['_historyManagerService']=_0x210756,this[_0x37d5f5(0x1a7)]=_0x2a7857,this['_messageService']=_0x1e1aab,this[_0x37d5f5(0x170)]=_0xf3c5c8,this[_0x37d5f5(0x168)]=_0x795e9b,this[_0x37d5f5(0x11c)]=_0x267f2e,this[_0x37d5f5(0x120)]=_0x595194,this[_0x37d5f5(0x131)]=_0x130c9a,_defineProperty(this,_0x37d5f5(0x1a1),null),this['_init']();}['_init'](){const _0x147bff=_0x4160e2;[ToggleEditHistoryOperation,ExitEditHistoryOperation][_0x147bff(0x11f)](_0x2974ab=>this[_0x147bff(0x194)](toDisposable(this[_0x147bff(0x15a)][_0x147bff(0x16f)](_0x2974ab)))),this[_0x147bff(0x194)](this[_0x147bff(0x1c5)][_0x147bff(0x198)]('HistoryIcon',HistoryIcon)),this[_0x147bff(0x191)][_0x147bff(0x171)](menuSchema),this[_0x147bff(0x194)](this['_commandService'][_0x147bff(0x150)](async(_0x2a5cad,_0x2ac638)=>{const _0x334406=_0x147bff;if(_0x2a5cad['id']===RevertRevisionMutation['id']){const {unitId:_0x505fa7}=_0x2a5cad[_0x334406(0x13c)];this['_messageService']['show']({'content':this[_0x334406(0x1a7)]['t'](_0x334406(0x13b)),'type':MessageType['Loading'],'duration':0x1388});const _0x44484d=this[_0x334406(0x170)][_0x334406(0x13a)](_0x505fa7);if(!(_0x2ac638===null||_0x2ac638===void 0x0?void 0x0:_0x2ac638[_0x334406(0x1d5)]))this[_0x334406(0x1b1)](_0x44484d,async()=>{const _0x2c16b2=_0x334406,_0x58141d=this[_0x2c16b2(0x120)][_0x2c16b2(0x176)](UniverInstanceType[_0x2c16b2(0x13d)]),_0x4227ff=_0x58141d===null||_0x58141d===void 0x0?void 0x0:_0x58141d[_0x2c16b2(0x1be)]();if(!_0x4227ff)return![];this[_0x2c16b2(0x120)][_0x2c16b2(0x162)](_0x505fa7);const _0x1f983b=await this[_0x2c16b2(0x11c)][_0x2c16b2(0x1aa)](_0x505fa7,UniverInstanceType[_0x2c16b2(0x13d)]);if(_0x1f983b&&_0x1f983b instanceof Workbook)return await this['_setupSubUnitSync'](_0x1f983b,_0x4227ff['getSheetId']()),!![];return![];});else this[_0x334406(0x1b1)](_0x44484d,async()=>{const _0x343c59=_0x334406;return setTimeout(()=>window[_0x343c59(0x12d)][_0x343c59(0x142)]()),!![];},!![]);}}));}['_handleRevertAcknowledgement'](_0xb83f33,_0x1967c3,_0x42b0fe=![]){const _0x4580dd=_0x4160e2,_0x35baa1=combineLatest([_0xb83f33[_0x4580dd(0x188)]['event$'],_0xb83f33[_0x4580dd(0x161)]])['subscribe'](async([_0x3dfa05,_0x35805a])=>{const _0x16dce1=_0x4580dd;if(_0x3dfa05[_0x16dce1(0x143)]===CollaborationEvent[_0x16dce1(0x145)]&&(_0x35805a===null||_0x35805a===void 0x0?void 0x0:_0x35805a['status'])===CollaborationStatus[_0x16dce1(0x19e)]){if(_0x3dfa05['data']['mutations']['some'](_0x7b881f=>_0x7b881f['id']===RevertRevisionMutation['id'])){if(await _0x1967c3()){var _0x2ceb35;this['_historyManagerService'][_0x16dce1(0x117)](),_0x35baa1[_0x16dce1(0x163)](),this[_0x16dce1(0x1a1)]&&clearTimeout(this[_0x16dce1(0x1a1)]),await((_0x2ceb35=this[_0x16dce1(0x168)])===null||_0x2ceb35===void 0x0?void 0x0:_0x2ceb35[_0x16dce1(0x115)]());}}}});if(_0x42b0fe)this['_revertErrorTimer']=setTimeout(()=>{const _0x27dcac=_0x4580dd;_0x35baa1[_0x27dcac(0x163)](),this[_0x27dcac(0x192)][_0x27dcac(0x17a)]({'content':this[_0x27dcac(0x1a7)]['t']('editHistory.panel.revertFailed'),'type':MessageType[_0x27dcac(0x127)],'duration':0xbb8});},0x1388);}async[_0x4160e2(0x167)](_0x3f5462,_0x554010){const _0x415492=_0x4160e2;await this[_0x415492(0x16b)](_0x3f5462,_0x554010),_0x3f5462[_0x415492(0x116)][_0x415492(0x12c)](takeUntil(this['dispose$']))['subscribe'](_0x1b6252=>{if(_0x1b6252)this['_updateURLWithCurrentState'](_0x1b6252);}),this[_0x415492(0x131)][_0x415492(0x14d)]['pipe'](takeUntil(this['dispose$']))[_0x415492(0x157)](()=>this[_0x415492(0x16b)](_0x3f5462,_0x554010));}[_0x4160e2(0x14e)](_0x9677ec,_0x423262=![]){const _0x171cc8=_0x4160e2,_0x56c00d=this[_0x171cc8(0x131)][_0x171cc8(0x18f)](_0x171cc8(0x166));if(_0x9677ec[_0x171cc8(0x11e)]()!==_0x56c00d)this[_0x171cc8(0x131)][_0x171cc8(0x16a)](_0x171cc8(0x166),_0x9677ec[_0x171cc8(0x11e)](),_0x423262);}async[_0x4160e2(0x16b)](_0x54eb56,_0x235538){const _0x27a171=_0x4160e2;var _0x4515db;if(!_0x235538||!_0x54eb56['getSheetBySheetId'](_0x235538)){const _0x59d059=_0x54eb56[_0x27a171(0x18a)]()[0x0],_0x2b287d=_0x54eb56[_0x27a171(0x1b7)](_0x59d059);if(!_0x2b287d)return;this[_0x27a171(0x14e)](_0x2b287d,!![]),await this[_0x27a171(0x15a)][_0x27a171(0x1ce)](SetWorksheetActivateCommand['id'],{'unitId':_0x54eb56[_0x27a171(0x185)](),'subUnitId':_0x59d059});return;}if(((_0x4515db=_0x54eb56[_0x27a171(0x1be)]())===null||_0x4515db===void 0x0?void 0x0:_0x4515db['getSheetId']())===_0x235538)return;await this[_0x27a171(0x15a)][_0x27a171(0x1ce)](SetWorksheetActivateCommand['id'],{'unitId':_0x54eb56[_0x27a171(0x185)](),'subUnitId':_0x235538});}};HistoryLoaderController=__decorate([__decorateParam(0x0,ICommandService),__decorateParam(0x1,IMenuManagerService),__decorateParam(0x2,Inject(ComponentManager)),__decorateParam(0x3,Inject(HistoryLoaderService)),__decorateParam(0x4,Inject(LocaleService)),__decorateParam(0x5,IMessageService),__decorateParam(0x6,Inject(CollaborationController)),__decorateParam(0x7,ILocalCacheService),__decorateParam(0x8,Inject(DataLoaderService)),__decorateParam(0x9,IUniverInstanceService),__decorateParam(0xa,IURLService)],HistoryLoaderController);let UniverEditHistoryLoaderPlugin=class UniverEditHistoryLoaderPlugin extends Plugin{constructor(_0x3e6d84=defaultPluginConfig,_0x13b446,_0x35e918){const _0x964645=_0x4160e2;super(),this['_config']=_0x3e6d84,this[_0x964645(0x1cf)]=_0x13b446,this['_configService']=_0x35e918;const {menu:_0xb87ce,..._0xf79eee}=merge({},defaultPluginConfig,this[_0x964645(0x199)]);if(_0xb87ce)this['_configService'][_0x964645(0x14b)]('menu',_0xb87ce,{'merge':!![]});this['_configService'][_0x964645(0x14b)](EDIT_HISTORY_LOADER_PLUGIN_CONFIG_KEY,_0xf79eee);if(this[_0x964645(0x199)][_0x964645(0x184)])this[_0x964645(0x125)][_0x964645(0x14b)](UNIVER_CONTAINER_ID_KEY,this[_0x964645(0x199)][_0x964645(0x184)]);}[_0x4160e2(0x1d4)](){const _0x2a13a1=_0x4160e2;[[HistoryLoaderService],[HistoryLoaderController]][_0x2a13a1(0x11f)](_0x469369=>this[_0x2a13a1(0x1cf)]['add'](_0x469369));}['onSteady'](){this['_injector']['get'](HistoryLoaderController);}};_defineProperty(UniverEditHistoryLoaderPlugin,_0x4160e2(0x1c4),UniverInstanceType[_0x4160e2(0x1c2)]),_defineProperty(UniverEditHistoryLoaderPlugin,_0x4160e2(0x1c7),_0x4160e2(0x189)),_defineProperty(UniverEditHistoryLoaderPlugin,'packageName',name),_defineProperty(UniverEditHistoryLoaderPlugin,_0x4160e2(0x1a6),version),UniverEditHistoryLoaderPlugin=__decorate([DependentOn(UniverLicensePlugin),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,IConfigService)],UniverEditHistoryLoaderPlugin);export{EDIT_HISTORY_LOADER_PLUGIN_CONFIG_KEY,HistoryLoaderService,MobileHistoryLoaderService,ToggleEditHistoryOperation,UNIVER_CONTAINER_ID_KEY,UNIVER_HISTORY_CONTAINER_ID,UniverEditHistoryLoaderMobilePlugin,UniverEditHistoryLoaderPlugin};
|