@univerjs-pro/collaboration-client 0.25.0 → 1.0.0-alpha.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.
Files changed (97) hide show
  1. package/lib/cjs/facade.js +1 -1
  2. package/lib/cjs/index.js +1 -1
  3. package/lib/cjs/locale/ar-SA.js +1 -1
  4. package/lib/cjs/locale/ca-ES.js +1 -1
  5. package/lib/cjs/locale/de-DE.js +1 -1
  6. package/lib/cjs/locale/en-US.js +1 -1
  7. package/lib/cjs/locale/es-ES.js +1 -1
  8. package/lib/cjs/locale/fa-IR.js +1 -1
  9. package/lib/cjs/locale/fr-FR.js +1 -1
  10. package/lib/cjs/locale/id-ID.js +1 -1
  11. package/lib/cjs/locale/it-IT.js +1 -1
  12. package/lib/cjs/locale/ja-JP.js +1 -1
  13. package/lib/cjs/locale/ko-KR.js +1 -1
  14. package/lib/cjs/locale/pl-PL.js +1 -1
  15. package/lib/cjs/locale/pt-BR.js +1 -1
  16. package/lib/cjs/locale/ru-RU.js +1 -1
  17. package/lib/cjs/locale/sk-SK.js +1 -1
  18. package/lib/cjs/locale/vi-VN.js +1 -1
  19. package/lib/cjs/locale/zh-CN.js +1 -1
  20. package/lib/cjs/locale/zh-HK.js +1 -1
  21. package/lib/cjs/locale/zh-TW.js +1 -1
  22. package/lib/es/facade.js +1 -1
  23. package/lib/es/index.js +1 -1
  24. package/lib/es/locale/ar-SA.js +1 -1
  25. package/lib/es/locale/ca-ES.js +1 -1
  26. package/lib/es/locale/de-DE.js +1 -1
  27. package/lib/es/locale/en-US.js +1 -1
  28. package/lib/es/locale/es-ES.js +1 -1
  29. package/lib/es/locale/fa-IR.js +1 -1
  30. package/lib/es/locale/fr-FR.js +1 -1
  31. package/lib/es/locale/id-ID.js +1 -1
  32. package/lib/es/locale/it-IT.js +1 -1
  33. package/lib/es/locale/ja-JP.js +1 -1
  34. package/lib/es/locale/ko-KR.js +1 -1
  35. package/lib/es/locale/pl-PL.js +1 -1
  36. package/lib/es/locale/pt-BR.js +1 -1
  37. package/lib/es/locale/ru-RU.js +1 -1
  38. package/lib/es/locale/sk-SK.js +1 -1
  39. package/lib/es/locale/vi-VN.js +1 -1
  40. package/lib/es/locale/zh-CN.js +1 -1
  41. package/lib/es/locale/zh-HK.js +1 -1
  42. package/lib/es/locale/zh-TW.js +1 -1
  43. package/lib/facade.js +1 -1
  44. package/lib/index.js +1 -1
  45. package/lib/locale/ar-SA.js +1 -1
  46. package/lib/locale/ca-ES.js +1 -1
  47. package/lib/locale/de-DE.js +1 -1
  48. package/lib/locale/en-US.js +1 -1
  49. package/lib/locale/es-ES.js +1 -1
  50. package/lib/locale/fa-IR.js +1 -1
  51. package/lib/locale/fr-FR.js +1 -1
  52. package/lib/locale/id-ID.js +1 -1
  53. package/lib/locale/it-IT.js +1 -1
  54. package/lib/locale/ja-JP.js +1 -1
  55. package/lib/locale/ko-KR.js +1 -1
  56. package/lib/locale/pl-PL.js +1 -1
  57. package/lib/locale/pt-BR.js +1 -1
  58. package/lib/locale/ru-RU.js +1 -1
  59. package/lib/locale/sk-SK.js +1 -1
  60. package/lib/locale/vi-VN.js +1 -1
  61. package/lib/locale/zh-CN.js +1 -1
  62. package/lib/locale/zh-HK.js +1 -1
  63. package/lib/locale/zh-TW.js +1 -1
  64. package/lib/types/config/config.d.ts +70 -0
  65. package/lib/types/controllers/collaboration/collaboration-entity.d.ts +15 -1
  66. package/lib/types/controllers/collaboration/utils/changeset-utils.d.ts +6 -14
  67. package/lib/types/facade/f-collaboration.d.ts +38 -25
  68. package/lib/types/index.d.ts +11 -7
  69. package/lib/types/locale/types.d.ts +3 -0
  70. package/lib/types/plugin.d.ts +1 -1
  71. package/lib/types/services/attachment-remote/attachment-io.service.d.ts +22 -0
  72. package/lib/types/services/attachment-remote/types.d.ts +23 -0
  73. package/lib/types/services/data-loader/data-loader.service.d.ts +3 -0
  74. package/lib/types/services/local-cache/local-cache.service.d.ts +1 -0
  75. package/lib/umd/facade.js +1 -1
  76. package/lib/umd/index.js +1 -1
  77. package/lib/umd/locale/ar-SA.js +1 -1
  78. package/lib/umd/locale/ca-ES.js +1 -1
  79. package/lib/umd/locale/de-DE.js +1 -1
  80. package/lib/umd/locale/en-US.js +1 -1
  81. package/lib/umd/locale/es-ES.js +1 -1
  82. package/lib/umd/locale/fa-IR.js +1 -1
  83. package/lib/umd/locale/fr-FR.js +1 -1
  84. package/lib/umd/locale/id-ID.js +1 -1
  85. package/lib/umd/locale/it-IT.js +1 -1
  86. package/lib/umd/locale/ja-JP.js +1 -1
  87. package/lib/umd/locale/ko-KR.js +1 -1
  88. package/lib/umd/locale/pl-PL.js +1 -1
  89. package/lib/umd/locale/pt-BR.js +1 -1
  90. package/lib/umd/locale/ru-RU.js +1 -1
  91. package/lib/umd/locale/sk-SK.js +1 -1
  92. package/lib/umd/locale/vi-VN.js +1 -1
  93. package/lib/umd/locale/zh-CN.js +1 -1
  94. package/lib/umd/locale/zh-HK.js +1 -1
  95. package/lib/umd/locale/zh-TW.js +1 -1
  96. package/package.json +16 -14
  97. package/lib/types/controllers/config.schema.d.ts +0 -64
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- const _0x1de16c=_0x3896;(function(_0x11be8d,_0x49e442){const _0x1fad69=_0x3896,_0x51ca26=_0x11be8d();while(!![]){try{const _0x1a2d2b=parseInt(_0x1fad69(0x276))/0x1+-parseInt(_0x1fad69(0x1d6))/0x2+-parseInt(_0x1fad69(0x13b))/0x3*(-parseInt(_0x1fad69(0x345))/0x4)+parseInt(_0x1fad69(0x304))/0x5+parseInt(_0x1fad69(0x323))/0x6+-parseInt(_0x1fad69(0x3b3))/0x7*(-parseInt(_0x1fad69(0x290))/0x8)+parseInt(_0x1fad69(0x17e))/0x9*(-parseInt(_0x1fad69(0x319))/0xa);if(_0x1a2d2b===_0x49e442)break;else _0x51ca26['push'](_0x51ca26['shift']());}catch(_0x101902){_0x51ca26['push'](_0x51ca26['shift']());}}}(_0x4f3f,0x567d8),Object[_0x1de16c(0x310)](exports,Symbol[_0x1de16c(0x2b2)],{'value':'Module'}));let e=require('@univerjs-pro/collaboration'),t=require('@univerjs/core'),n=require('@univerjs/docs'),r=require('@univerjs/sheets'),i=require('rxjs'),a=require('@univerjs/protocol'),o=require('@univerjs/telemetry'),s=require('rxjs/operators'),c=require('@univerjs/network'),l=require('@univerjs-pro/license'),u=require('@univerjs/drawing'),d=require('@noble/ciphers/aes.js'),f=require('@noble/ciphers/utils.js');const p='ws://127.0.0.1:8000/universer-api/comb/connect',m=0x4e20;function ee(_0x3581ae){const _0x197530=_0x1de16c;return JSON[_0x197530(0x2d8)](_0x3581ae)[_0x197530(0x3c7)];}function h(_0x198375){'@babel/helpers - typeof';const _0x39b50b=_0x1de16c;return h=typeof Symbol=='function'&&typeof Symbol['iterator']==_0x39b50b(0x1b3)?function(_0x4ef208){return typeof _0x4ef208;}:function(_0x5a162b){const _0x5c935e=_0x39b50b;return _0x5a162b&&typeof Symbol==_0x5c935e(0x31e)&&_0x5a162b[_0x5c935e(0x340)]===Symbol&&_0x5a162b!==Symbol['prototype']?_0x5c935e(0x1b3):typeof _0x5a162b;},h(_0x198375);}function te(_0x381074,_0x465623){const _0x4ccc24=_0x1de16c;if(h(_0x381074)!=_0x4ccc24(0x29f)||!_0x381074)return _0x381074;var _0x59407b=_0x381074[Symbol[_0x4ccc24(0x228)]];if(_0x59407b!==void 0x0){var _0x50a718=_0x59407b[_0x4ccc24(0x21c)](_0x381074,_0x465623||_0x4ccc24(0x1aa));if(h(_0x50a718)!=_0x4ccc24(0x29f))return _0x50a718;throw TypeError(_0x4ccc24(0x24c));}return(_0x465623===_0x4ccc24(0x239)?String:Number)(_0x381074);}function ne(_0x4c9768){const _0x2c3804=_0x1de16c;var _0x1076ee=te(_0x4c9768,_0x2c3804(0x239));return h(_0x1076ee)==_0x2c3804(0x1b3)?_0x1076ee:_0x1076ee+'';}function g(_0x237c9a,_0x5f5901,_0xa78bc8){const _0x1a697a=_0x1de16c;return(_0x5f5901=ne(_0x5f5901))in _0x237c9a?Object[_0x1a697a(0x310)](_0x237c9a,_0x5f5901,{'value':_0xa78bc8,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x237c9a[_0x5f5901]=_0xa78bc8,_0x237c9a;}let re=function(_0x464dda){const _0x15f4c3=_0x1de16c;return _0x464dda[_0x15f4c3(0x3c6)]='OTHER_CLIENT_EDITING',_0x464dda['PERMISSION_DENIED']=_0x15f4c3(0x147),_0x464dda[_0x15f4c3(0x171)]=_0x15f4c3(0x171),_0x464dda['CLOSE_ROOM']='CLOSE_ROOM',_0x464dda[_0x15f4c3(0x21a)]=_0x15f4c3(0x21a),_0x464dda[_0x15f4c3(0x29a)]=_0x15f4c3(0x29a),_0x464dda[_0x15f4c3(0x1fa)]=_0x15f4c3(0x1fa),_0x464dda['SUBMIT_CHANGESET_TIMEOUT']=_0x15f4c3(0x2b3),_0x464dda;}({});var _=class{constructor(){const _0x16b318=_0x1de16c;g(this,'_event$',new i[(_0x16b318(0x3c5))]()),g(this,'event$',this[_0x16b318(0x3e5)]['asObservable']());}[_0x1de16c(0x262)](_0x1f8946){const _0x4ff7a4=_0x1de16c;this[_0x4ff7a4(0x3e5)][_0x4ff7a4(0x286)](_0x1f8946);}},ie=class{constructor(){const _0x55cbf6=_0x1de16c;g(this,_0x55cbf6(0x230),new i[(_0x55cbf6(0x3c5))]()),g(this,_0x55cbf6(0x2ff),this[_0x55cbf6(0x230)][_0x55cbf6(0x1ea)]());}[_0x1de16c(0x26e)](_0x2e5e27){const _0x788472=_0x1de16c;this['_commentUpdate$'][_0x788472(0x286)](_0x2e5e27);}};function v(_0x1a136c,_0x356cac){return function(_0x29faac,_0x40d199){_0x356cac(_0x29faac,_0x40d199,_0x1a136c);};}function y(_0xcd9312,_0x560e9e,_0x3573d8,_0x5d62c7){const _0x593fdd=_0x1de16c;var _0xcde944=arguments['length'],_0x45c2d6=_0xcde944<0x3?_0x560e9e:_0x5d62c7===null?_0x5d62c7=Object[_0x593fdd(0x3aa)](_0x560e9e,_0x3573d8):_0x5d62c7,_0x2925e2;if(typeof Reflect=='object'&&typeof Reflect[_0x593fdd(0x22e)]=='function')_0x45c2d6=Reflect[_0x593fdd(0x22e)](_0xcd9312,_0x560e9e,_0x3573d8,_0x5d62c7);else{for(var _0x4f64f6=_0xcd9312[_0x593fdd(0x3c7)]-0x1;_0x4f64f6>=0x0;_0x4f64f6--)(_0x2925e2=_0xcd9312[_0x4f64f6])&&(_0x45c2d6=(_0xcde944<0x3?_0x2925e2(_0x45c2d6):_0xcde944>0x3?_0x2925e2(_0x560e9e,_0x3573d8,_0x45c2d6):_0x2925e2(_0x560e9e,_0x3573d8))||_0x45c2d6);}return _0xcde944>0x3&&_0x45c2d6&&Object[_0x593fdd(0x310)](_0x560e9e,_0x3573d8,_0x45c2d6),_0x45c2d6;}let b=class extends t[_0x1de16c(0x1d2)]{constructor(_0x17460f,_0x2bd7bd){const _0x11e222=_0x1de16c;super(),this[_0x11e222(0x2a7)]=_0x17460f,this[_0x11e222(0x2fe)]=_0x2bd7bd,g(this,_0x11e222(0x2ae),new Map()),g(this,_0x11e222(0x225),new i[(_0x11e222(0x3c5))]()),this[_0x11e222(0x3b8)]((0x0,i['merge'])(this[_0x11e222(0x2a7)][_0x11e222(0x232)](t[_0x11e222(0x20a)]['UNIVER_SHEET'])[_0x11e222(0x200)]((0x0,s[_0x11e222(0x2fc)])(_0x3dc7a9=>_0x3dc7a9['getUnitId']())),this['_univerInstanceService'][_0x11e222(0x232)](t['UniverInstanceType'][_0x11e222(0x198)])[_0x11e222(0x200)]((0x0,s[_0x11e222(0x2fc)])(_0x4cbb3d=>_0x4cbb3d[_0x11e222(0x270)]())))['subscribe'](_0x4eb96c=>this[_0x11e222(0x35c)](_0x4eb96c)));}[_0x1de16c(0x1f4)](_0x58e1ca){const _0x4e3476=_0x1de16c;return this[_0x4e3476(0x2ae)]['has'](_0x58e1ca)?(0x0,i['of'])(this['_roomMembers'][_0x4e3476(0x373)](_0x58e1ca)):this[_0x4e3476(0x225)][_0x4e3476(0x200)]((0x0,s[_0x4e3476(0x2fc)])(_0x4f5fb4=>{const _0x2702ec=_0x4e3476;if(_0x4f5fb4===_0x58e1ca)return this[_0x2702ec(0x2ae)][_0x2702ec(0x373)](_0x4f5fb4);}));}['setCurrentUser'](_0x1514c0){const _0x4063b1=_0x1de16c;this[_0x4063b1(0x2fe)][_0x4063b1(0x178)](_0x1514c0);}[_0x1de16c(0x325)](){return this['_userManagerService']['getCurrentUser']();}[_0x1de16c(0x3dc)](_0x475dfe,_0xc461ad){const _0x32b6df=_0x1de16c;let _0x55be3d=this[_0x32b6df(0x2ae)][_0x32b6df(0x373)](_0x475dfe);_0x55be3d||(_0x55be3d=new ae(),this[_0x32b6df(0x2ae)][_0x32b6df(0x248)](_0x475dfe,_0x55be3d),this[_0x32b6df(0x225)][_0x32b6df(0x286)](_0x475dfe)),_0x55be3d[_0x32b6df(0x3dc)](_0xc461ad);}['removeMember'](_0x4e0166,_0xad7d41){const _0x35f0d=_0x1de16c;let _0x51ca7b=this['_roomMembers'][_0x35f0d(0x373)](_0x4e0166);_0x51ca7b&&_0x51ca7b[_0x35f0d(0x3ad)](_0xad7d41);}[_0x1de16c(0x138)](_0x577c94){const _0x206598=_0x1de16c;return this[_0x206598(0x2ae)]['get'](_0x577c94);}[_0x1de16c(0x269)](_0x487d55,_0x297282){const _0x1b4129=_0x1de16c;let _0x3d75d7=this['_roomMembers'][_0x1b4129(0x373)](_0x487d55);if(_0x3d75d7)return _0x3d75d7['getMember'](_0x297282);}[_0x1de16c(0x35c)](_0x5ab907){const _0x493b31=_0x1de16c;let _0x10fa23=this[_0x493b31(0x2ae)][_0x493b31(0x373)](_0x5ab907);_0x10fa23&&(_0x10fa23[_0x493b31(0x317)](),this[_0x493b31(0x2ae)][_0x493b31(0x1d7)](_0x5ab907));}[_0x1de16c(0x317)](){const _0x244735=_0x1de16c;this['_roomMembers'][_0x244735(0x2f3)](_0x4f863a=>_0x4f863a[_0x244735(0x317)]()),this[_0x244735(0x2ae)][_0x244735(0x12f)](),this[_0x244735(0x225)][_0x244735(0x183)]();}};b=y([v(0x0,t[_0x1de16c(0x1ca)]),v(0x1,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x13e)]))],b);var ae=class extends t[_0x1de16c(0x1d2)]{constructor(..._0x20cb0c){const _0x5ee2cc=_0x1de16c;super(..._0x20cb0c),g(this,_0x5ee2cc(0x1df),new Map()),g(this,'_members$',new i[(_0x5ee2cc(0x19f))](this[_0x5ee2cc(0x1df)])),g(this,_0x5ee2cc(0x18c),this[_0x5ee2cc(0x2b0)]['asObservable']());}[_0x1de16c(0x317)](){const _0x4d6408=_0x1de16c;this['_members']['clear'](),this[_0x4d6408(0x2b0)][_0x4d6408(0x183)]();}[_0x1de16c(0x3dc)](_0x82943d){const _0x20aae2=_0x1de16c;this[_0x20aae2(0x1df)][_0x20aae2(0x248)](_0x82943d[_0x20aae2(0x33e)],_0x82943d),this['_emitMembers']();}[_0x1de16c(0x3ad)](_0x5a034a){this['_members']['delete'](_0x5a034a),this['_emitMembers']();}[_0x1de16c(0x269)](_0x5c4359){const _0xeeab6b=_0x1de16c;return this[_0xeeab6b(0x1df)][_0xeeab6b(0x373)](_0x5c4359);}[_0x1de16c(0x363)](){const _0x37d3ac=_0x1de16c;return Array[_0x37d3ac(0x2a6)](this['_members'][_0x37d3ac(0x3f9)]());}[_0x1de16c(0x162)](){const _0x5ef064=_0x1de16c;this[_0x5ef064(0x2b0)]['next'](this['_members']);}};let oe=function(_0x598088){const _0xb878c=_0x1de16c;return _0x598088[_0x598088[_0xb878c(0x1b8)]=0x0]=_0xb878c(0x1b8),_0x598088[_0x598088[_0xb878c(0x12b)]=0x1]=_0xb878c(0x12b),_0x598088[_0x598088[_0xb878c(0x2d7)]=0x2]='OFFLINE',_0x598088[_0x598088[_0xb878c(0x28c)]=0x3]=_0xb878c(0x28c),_0x598088;}({});const se={[a[_0x1de16c(0x343)]['FAIL']]:_0x1de16c(0x1ad),[a[_0x1de16c(0x343)][_0x1de16c(0x209)]]:_0x1de16c(0x293),[a[_0x1de16c(0x343)][_0x1de16c(0x27e)]]:'session.room-not-exists',[a[_0x1de16c(0x343)]['JOIN_ROOM_PERMISSION_DENIED']]:_0x1de16c(0x3fb),[a['CmdRspCode'][_0x1de16c(0x314)]]:_0x1de16c(0x3ef)};let x=class extends t[_0x1de16c(0x1f0)]{get[_0x1de16c(0x36b)](){return this['_sessionStatus$']['getValue']();}constructor(_0x3e6122,_0x524c0f,_0x25d906,_0x2cf5d9,_0x2649e4,_0x59819d,_0x552129,_0x2f483b){const _0x41fc44=_0x1de16c;super(),this[_0x41fc44(0x1d3)]=_0x3e6122,this['_logService']=_0x25d906,this[_0x41fc44(0x2aa)]=_0x2cf5d9,this['_memberService']=_0x2649e4,this['_commentService']=_0x59819d,this['_collaborationUIEventService']=_0x552129,this[_0x41fc44(0x19b)]=_0x2f483b,g(this,_0x41fc44(0x2af),new i[(_0x41fc44(0x19f))](0x0)),g(this,'sessionStatus$',this[_0x41fc44(0x2af)][_0x41fc44(0x1ea)]()),g(this,_0x41fc44(0x3e5),new i[(_0x41fc44(0x3c5))]()),g(this,_0x41fc44(0x201),this[_0x41fc44(0x3e5)][_0x41fc44(0x1ea)]()),g(this,_0x41fc44(0x260),void 0x0),g(this,_0x41fc44(0x21b),void 0x0),g(this,_0x41fc44(0x278),void 0x0),g(this,_0x41fc44(0x1cb),!0x1),g(this,_0x41fc44(0x22b),null),this['_shouldReportTelemetry']=!!this['_telemetryService'],_0x524c0f[_0x41fc44(0x200)]((0x0,i[_0x41fc44(0x3ba)])(this['dispose$']))[_0x41fc44(0x15c)](_0x52fce4=>{const _0x4020a7=_0x41fc44;if(_0x52fce4!==void 0x0){if(this[_0x4020a7(0x260)]=_0x52fce4,_0x52fce4)this['_joinRoom'](_0x52fce4),this[_0x4020a7(0x21b)]=_0x52fce4[_0x4020a7(0x252)][_0x4020a7(0x15c)](_0x5ae439=>{const _0x1e6c87=_0x4020a7;_0x5ae439[_0x1e6c87(0x3f8)]===this[_0x1e6c87(0x1d3)]&&this[_0x1e6c87(0x3fd)](_0x5ae439);});else{var _0x362cd0;this[_0x4020a7(0x161)](),this['_sessionStatus$']['next'](0x2),(_0x362cd0=this['_socketMessageSubscription'])==null||_0x362cd0['unsubscribe'](),this[_0x4020a7(0x21b)]=null;}}});}['getMemberID'](){const _0x11ea9a=_0x1de16c;var _0x3de1ca,_0xeaecc3;return(_0x3de1ca=(_0xeaecc3=this['_socket'])==null?void 0x0:_0xeaecc3[_0x11ea9a(0x33e)])==null?null:_0x3de1ca;}[_0x1de16c(0x317)](){const _0x105d6e=_0x1de16c;super[_0x105d6e(0x317)](),this['close'](),this['dispose$'][_0x105d6e(0x286)](),this['dispose$'][_0x105d6e(0x183)]();}[_0x1de16c(0x261)](){const _0x227b5a=_0x1de16c;var _0x2863c6,_0x202196;this[_0x227b5a(0x161)](),(_0x2863c6=this[_0x227b5a(0x260)])==null||_0x2863c6[_0x227b5a(0x2d5)]({'cmd':a['CombCmd'][_0x227b5a(0x2bd)],'data':{'roomID':this[_0x227b5a(0x1d3)]}}),(_0x202196=this[_0x227b5a(0x260)])==null||_0x202196[_0x227b5a(0x261)](),this['_event$'][_0x227b5a(0x183)](),this['_sessionStatus$']['complete']();}['_onCombEvent'](_0x294fb4){const _0x551700=_0x1de16c;_0x294fb4[_0x551700(0x2e6)]===a[_0x551700(0x3ae)]['JOIN']?this[_0x551700(0x134)](_0x294fb4):_0x294fb4['cmd']===a[_0x551700(0x3ae)]['RECV']&&this[_0x551700(0x39d)](_0x294fb4);}['_joinRoom'](_0x50fe6e){const _0x5af88b=_0x1de16c;this[_0x5af88b(0x2af)][_0x5af88b(0x286)](0x1),_0x50fe6e['send']({'cmd':a[_0x5af88b(0x3ae)][_0x5af88b(0x220)],'routeKey':this[_0x5af88b(0x1d3)],'routeType':'','data':{'rooms':[{'roomID':this[_0x5af88b(0x1d3)]}]}});}['_onJoinRoomEvent'](_0xa98b47){const _0x5621c9=_0x1de16c;var _0x2731a7;if(_0xa98b47[_0x5621c9(0x308)]in se){this[_0x5621c9(0x3f4)][_0x5621c9(0x262)]({'id':'JOIN_ROOM_FAILED','data':se[_0xa98b47['code']]}),this[_0x5621c9(0x2af)][_0x5621c9(0x286)](0x2);return;}this['_sessionStatus$']['next'](0x3);let _0x3f4ce6=(_0x2731a7=_0xa98b47[_0x5621c9(0x2d2)][_0x5621c9(0x1ac)][this[_0x5621c9(0x1d3)]])==null?void 0x0:_0x2731a7['members'];_0x3f4ce6&&_0x3f4ce6[_0x5621c9(0x2f3)](_0x53ce8c=>this[_0x5621c9(0x231)][_0x5621c9(0x3dc)](this[_0x5621c9(0x1d3)],_0x53ce8c));}[_0x1de16c(0x39d)](_0x570981){const _0x204baa=_0x1de16c;try{let _0x588df7=_0x570981[_0x204baa(0x2d2)];switch(_0x588df7['eventID']){case e[_0x204baa(0x255)]['USERS_ENTER']:this[_0x204baa(0x3df)](_0x588df7),this[_0x204baa(0x3e5)][_0x204baa(0x286)](_0x588df7);break;case e[_0x204baa(0x255)][_0x204baa(0x2dc)]:this['_onUserLeave'](_0x588df7),this[_0x204baa(0x3e5)][_0x204baa(0x286)](_0x588df7);break;case e[_0x204baa(0x255)]['CHANGESET_ACK']:case e['CollaborationEvent'][_0x204baa(0x18b)]:this[_0x204baa(0x1a3)](),this[_0x204baa(0x3d4)](),this[_0x204baa(0x3e5)][_0x204baa(0x286)](_0x588df7);break;case e[_0x204baa(0x255)][_0x204baa(0x3f2)]:this[_0x204baa(0x30d)][_0x204baa(0x1e3)](_0x204baa(0x150)+JSON[_0x204baa(0x2d8)](_0x588df7)),this['_event$']['next'](_0x588df7);break;case e['CollaborationEvent'][_0x204baa(0x1e7)]:this['_commentService']['onCommentUpdate'](_0x588df7['data']),this['_event$']['next'](_0x588df7);break;default:this['_event$']['next'](_0x588df7);}}catch(_0x3dd0cc){this['_logService'][_0x204baa(0x1e3)](_0x3dd0cc,_0x570981);}}['_onUserJoin'](_0x56d6cc){const _0x33136a=_0x1de16c;this[_0x33136a(0x231)][_0x33136a(0x3dc)](this[_0x33136a(0x1d3)],_0x56d6cc[_0x33136a(0x2d2)]);}['_onUserLeave'](_0x5c7828){const _0x16e60a=_0x1de16c;this[_0x16e60a(0x231)][_0x16e60a(0x3ad)](this[_0x16e60a(0x1d3)],_0x5c7828['data'][_0x16e60a(0x33e)]);}async[_0x1de16c(0x2d5)](_0x5734cb,_0x2a2ebd){const _0xa21978=_0x1de16c;if(this[_0xa21978(0x36b)]!==0x3||!this[_0xa21978(0x260)])throw Error(_0xa21978(0x27b));try{_0x5734cb[_0xa21978(0x26d)]===e[_0xa21978(0x255)]['SUBMIT_CHANGESET']&&(this['_scheduleCollaborationTimeoutTimer'](),this['_startTelemetryCollaborationNewChangeset'](_0x5734cb)),this[_0xa21978(0x260)]['send']({'cmd':a[_0xa21978(0x3ae)][_0xa21978(0x212)],'routeKey':_0x2a2ebd,'routeType':'','data':_0x5734cb});}catch(_0x8b4417){this[_0xa21978(0x30d)][_0xa21978(0x1e3)](_0x8b4417);}}[_0x1de16c(0x22f)](){const _0x4226c4=_0x1de16c;var _0x131d83;this['_collaborationTimeoutTimer']=setTimeout(()=>{const _0x51ed25=_0x3896;this['_collaborationTimeoutTimer']=null,this[_0x51ed25(0x3f4)][_0x51ed25(0x262)]({'id':_0x51ed25(0x2b3)});},(_0x131d83=this[_0x4226c4(0x2aa)]['getConfig']('HEARTBEAT_TIMEOUT'))==null?m:_0x131d83);}[_0x1de16c(0x3d4)](){const _0x32c64e=_0x1de16c;this['_collaborationTimeoutTimer']&&(clearTimeout(this[_0x32c64e(0x278)]),this['_collaborationTimeoutTimer']=null);}[_0x1de16c(0x2a5)](_0x92635a){const _0x2cbc3c=_0x1de16c;if(!this[_0x2cbc3c(0x1cb)])return;let {data:_0x345954}=_0x92635a,{unitID:_0x2c6fc7,changeset:_0x275745}=_0x345954,{mutations:_0x2f670b,type:_0x226f3a}=_0x275745;this['_telemetryInfo']={'unitId':_0x2c6fc7,'type':_0x226f3a,'startTime':performance[_0x2cbc3c(0x322)](),'stopTime':0x0,'duration':0x0,'size':ee(_0x2f670b)};}[_0x1de16c(0x1a3)](){const _0x37139d=_0x1de16c;if(this[_0x37139d(0x1cb)]){if(!this[_0x37139d(0x22b)]){this[_0x37139d(0x30d)][_0x37139d(0x1e3)](_0x37139d(0x12e),_0x37139d(0x289));return;}this[_0x37139d(0x22b)][_0x37139d(0x1ab)]=performance[_0x37139d(0x322)](),this[_0x37139d(0x22b)]['duration']=this[_0x37139d(0x22b)][_0x37139d(0x1ab)]-this['_telemetryInfo'][_0x37139d(0x148)],this[_0x37139d(0x19b)]['capture']('collaboration_new_changeset',this[_0x37139d(0x22b)]),this[_0x37139d(0x22b)]=null;}}['_throwTelemetryCollaborationNewChangeset'](){this['_telemetryInfo']=null;}};function _0x3896(_0x263bc3,_0x35d897){_0x263bc3=_0x263bc3-0x127;const _0x4f3fac=_0x4f3f();let _0x389663=_0x4f3fac[_0x263bc3];return _0x389663;}x=y([v(0x2,t[_0x1de16c(0x243)]),v(0x3,t[_0x1de16c(0x3cb)]),v(0x4,(0x0,t[_0x1de16c(0x20f)])(b)),v(0x5,(0x0,t[_0x1de16c(0x20f)])(ie)),v(0x6,(0x0,t['Inject'])(_)),v(0x7,(0x0,t[_0x1de16c(0x37e)])(o[_0x1de16c(0x379)]))],x);const S=(0x0,t[_0x1de16c(0x26b)])(_0x1de16c(0x172));function ce(_0x284af6){return'unit-cache-'+_0x284af6;}function le(_0xeee939){const _0x1f377d=_0x1de16c;let {unitID:_0x4ebc25,mutations:_0x17ac59}=_0xeee939;return{'unitId':_0x4ebc25,'subUnitId':_0x17ac59[_0x1f377d(0x3c7)]>0x0?_0x17ac59[0x0]['params'][_0x1f377d(0x206)]:null};}let C=class{constructor(_0x274586,_0x39bf48,_0x3a3c15){const _0x399cf3=_0x1de16c;this[_0x399cf3(0x16d)]=_0x274586,this[_0x399cf3(0x226)]=_0x39bf48,this[_0x399cf3(0x330)]=_0x3a3c15;}[_0x1de16c(0x3ea)](_0x39a27e){const _0x13bad7=_0x1de16c;var _0xd5d5a0,_0x15c22c;let _0x6dc447=this['_injector'][_0x13bad7(0x373)](r[_0x13bad7(0x3cc)]),{unitId:_0x4e21ed,subUnitId:_0x4bc997}=le(_0x39a27e),_0x135ff0=_0x6dc447==null?void 0x0:_0x6dc447['getWorkbookSelections'](_0x4e21ed)['getCurrentSelections'](),_0x32adf0=(_0xd5d5a0=this[_0x13bad7(0x330)][_0x13bad7(0x309)](_0x4e21ed))==null||(_0xd5d5a0=_0xd5d5a0[_0x13bad7(0x388)]())==null?void 0x0:_0xd5d5a0['getSheetId']();if(_0x135ff0[_0x13bad7(0x3c7)]===0x0||!_0x4e21ed||!_0x4bc997)return;let _0xe94348=[{'id':r[_0x13bad7(0x17f)]['id'],'params':{'unitId':_0x4e21ed,'subUnitId':_0x32adf0,'selections':t[_0x13bad7(0x20e)][_0x13bad7(0x273)](_0x135ff0)}}],_0x58e226=this[_0x13bad7(0x226)][_0x13bad7(0x307)](_0x39a27e,_0xe94348);if(!(0x0,e[_0x13bad7(0x2f1)])(_0x58e226))throw _0x58e226['error'];let _0x1c54c8=(_0x15c22c=_0x58e226[_0x13bad7(0x249)][0x0])==null||(_0x15c22c=_0x15c22c[_0x13bad7(0x3ce)])==null?void 0x0:_0x15c22c[_0x13bad7(0x190)];if(Array['isArray'](_0x1c54c8)&&_0x1c54c8[_0x13bad7(0x3c7)]){if(_0x1c54c8[_0x13bad7(0x3c7)]===_0xe94348[0x0]['params'][_0x13bad7(0x190)][_0x13bad7(0x3c7)]&&_0x1c54c8[_0x13bad7(0x2ea)]((_0x3658b3,_0x2412e9)=>t['Rectangle'][_0x13bad7(0x3b0)](_0x3658b3['range'],_0xe94348[0x0][_0x13bad7(0x3ce)]['selections'][_0x2412e9][_0x13bad7(0x292)])))return;this[_0x13bad7(0x16d)][_0x13bad7(0x373)](t[_0x13bad7(0x2a8)])['executeCommand'](r[_0x13bad7(0x17f)]['id'],{'unitId':_0x4e21ed,'subUnitId':_0x32adf0,'selections':_0x1c54c8});}}};C=y([v(0x0,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x25d)])),v(0x1,e[_0x1de16c(0x13c)]),v(0x2,t[_0x1de16c(0x1ca)])],C);const w=(0x0,t[_0x1de16c(0x26b)])(_0x1de16c(0x159));let ue=function(_0x384e3e){const _0x3e6140=_0x1de16c;return _0x384e3e[_0x384e3e['NO_OTHER_CLIENTS_EDITING']=0x0]='NO_OTHER_CLIENTS_EDITING',_0x384e3e[_0x384e3e[_0x3e6140(0x3e3)]=0x1]=_0x3e6140(0x3e3),_0x384e3e;}({});const T=_0x1de16c(0x2dd),de={};function fe(_0x423e95){const _0x11e1ab=_0x1de16c;var _0x16b4f0;return!!((_0x16b4f0=_0x423e95[_0x11e1ab(0x3ce)])!=null&&_0x16b4f0[_0x11e1ab(0x3a0)]);}const pe=new Set([r[_0x1de16c(0x2c3)]['id']]);function me(_0xd84832,_0x126d11,_0x31281d,_0x542616,_0x3f896f){const _0x159fef=_0x1de16c;var _0x5ad98b,_0x4d9fe,_0x49e87d,_0x2d9b00;let _0x1e9d9c=[];for(let _0x20c977 of _0xd84832){if(pe[_0x159fef(0x1c7)](_0x20c977['id'])){if(_0x1e9d9c[_0x159fef(0x3c7)]>0x0)break;_0x1e9d9c[_0x159fef(0x186)](_0x20c977);break;}if(fe(_0x20c977)){if(_0x1e9d9c[_0x159fef(0x3c7)]>0x0)break;_0x1e9d9c[_0x159fef(0x186)](_0x20c977);break;}_0x1e9d9c['push'](_0x20c977);}let _0x2b38b3=(_0x5ad98b=(_0x4d9fe=_0x3f896f[_0x159fef(0x325)]())==null?void 0x0:_0x4d9fe[_0x159fef(0x237)])==null?_0x159fef(0x1a7):_0x5ad98b,_0x39fdd5=(_0x49e87d=(_0x2d9b00=_0x3f896f['getCurrentUser']())==null?void 0x0:_0x2d9b00[_0x159fef(0x33e)])==null?'unknown':_0x49e87d;return{'changeset':{'unitID':_0x126d11,'type':(0x0,e[_0x159fef(0x194)])(_0x31281d['getUnitType'](_0x126d11)),'baseRev':_0x542616[_0x159fef(0x295)](_0x126d11),'revision':0x0,'userID':_0x2b38b3,'memberID':_0x39fdd5,'mutations':_0x1e9d9c},'pendingMutations':_0xd84832[_0x159fef(0x381)](_0x1e9d9c['length'])};}function he(_0x31332c,_0x22a126,_0x202929,_0x3a6cf4,_0x17afc5){const _0x5862d6=_0x1de16c;var _0x570c47,_0x28e898,_0x36bd1c,_0x2b99e6;let _0x1e60cd=_0x31332c[_0x5862d6(0x3ee)]((_0x3b7a52,_0x5ed8fa)=>{const _0x2e8d4e=_0x5862d6;let _0x10c2dd=_0x3b7a52[_0x3b7a52[_0x2e8d4e(0x3c7)]-0x1],{id:_0x5d38c5}=_0x10c2dd==null?{}:_0x10c2dd,{id:_0x29f7ab,type:_0x1c4c07}=_0x5ed8fa,_0x5df15a=_0x5ed8fa['params'];if(_0x5d38c5&&_0x5d38c5!==_0x29f7ab)throw Error(_0x2e8d4e(0x321)+_0x5d38c5+_0x2e8d4e(0x189)+_0x29f7ab+'.');if(!_0x10c2dd)return[{'id':_0x29f7ab,'type':_0x1c4c07,'params':{'unitId':_0x5df15a[_0x2e8d4e(0x2c9)],'textRanges':_0x5df15a['textRanges'],'actions':_0x5df15a[_0x2e8d4e(0x17c)]}}];let _0x3717e1=_0x10c2dd['params'];return ge(_0x3717e1[_0x2e8d4e(0x17c)],_0x5df15a[_0x2e8d4e(0x17c)])?[..._0x3b7a52[_0x2e8d4e(0x381)](0x0,-0x1),{..._0x10c2dd,'id':_0x29f7ab,'type':_0x1c4c07,'params':{'unitId':_0x5df15a[_0x2e8d4e(0x2c9)],'textRanges':_0x5df15a[_0x2e8d4e(0x12d)],'actions':t[_0x2e8d4e(0x1bf)][_0x2e8d4e(0x2ab)](_0x3717e1[_0x2e8d4e(0x17c)],_0x5df15a[_0x2e8d4e(0x17c)])}}]:[..._0x3b7a52,{'id':_0x29f7ab,'type':_0x1c4c07,'params':{'unitId':_0x5df15a['unitId'],'textRanges':_0x5df15a[_0x2e8d4e(0x12d)],'actions':_0x5df15a['actions']}}];},[]),_0x261b12=(_0x570c47=(_0x28e898=_0x17afc5[_0x5862d6(0x325)]())==null?void 0x0:_0x28e898[_0x5862d6(0x237)])==null?_0x5862d6(0x1a7):_0x570c47,_0x569100=(_0x36bd1c=(_0x2b99e6=_0x17afc5[_0x5862d6(0x325)]())==null?void 0x0:_0x2b99e6[_0x5862d6(0x33e)])==null?_0x5862d6(0x1a7):_0x36bd1c;return{'changeset':{'unitID':_0x22a126,'type':(0x0,e[_0x5862d6(0x194)])(_0x202929[_0x5862d6(0x3c9)](_0x22a126)),'baseRev':_0x3a6cf4[_0x5862d6(0x295)](_0x22a126),'revision':0x0,'userID':_0x261b12,'memberID':_0x569100,'mutations':_0x1e60cd},'pendingMutations':_0x31332c[_0x5862d6(0x381)](_0x31332c[_0x5862d6(0x3c7)])};}function ge(_0x2583c3,_0x59307d){return!(_e(_0x2583c3)&&ve(_0x59307d)||ve(_0x2583c3)&&_e(_0x59307d));}function _e(_0x2cb178){const _0x51cfc4=_0x1de16c;return ye(_0x2cb178)[_0x51cfc4(0x3c2)](_0x3928ec=>be(_0x3928ec)&&_0x3928ec['et']===_0x51cfc4(0x1e2));}function ve(_0xfd6ede){const _0x1f82dd=_0x1de16c;return ye(_0xfd6ede)['some'](_0x453d8a=>Array['isArray'](_0x453d8a)||typeof _0x453d8a==_0x1f82dd(0x239)||typeof _0x453d8a==_0x1f82dd(0x272));}function ye(_0x213039){const _0x48d2fd=_0x1de16c;if(!Array[_0x48d2fd(0x3db)](_0x213039))return[];let _0x113c52=_0x213039[_0x48d2fd(0x39f)](_0x48d2fd(0x401))?_0x213039:_0x213039[_0x48d2fd(0x38b)](_0x892d6b=>Array[_0x48d2fd(0x3db)](_0x892d6b)&&_0x892d6b[_0x48d2fd(0x39f)]('body'));if(!Array['isArray'](_0x113c52))return[];let _0x12032b=_0x113c52[_0x48d2fd(0x21d)](_0x48d2fd(0x401));return _0x12032b===-0x1?[]:_0x113c52['slice'](_0x12032b+0x1);}function be(_0x5216f8){const _0x22fbd2=_0x1de16c;return typeof _0x5216f8=='object'&&!!_0x5216f8&&!Array[_0x22fbd2(0x3db)](_0x5216f8);}function xe(_0x37e729,_0x1170d2){const _0x36f75d=_0x1de16c;let _0x1ab6b0=new i[(_0x36f75d(0x1b7))](0x1);return setTimeout(()=>_0x1ab6b0[_0x36f75d(0x286)](_0x1170d2),_0x37e729),_0x1ab6b0[_0x36f75d(0x1ea)]()[_0x36f75d(0x200)]((0x0,i[_0x36f75d(0x2ed)])(0x1));}var E,D,O;let Se=function(_0x465441){const _0x5275fd=_0x1de16c;return _0x465441[_0x5275fd(0x257)]=_0x5275fd(0x3e0),_0x465441[_0x5275fd(0x2f8)]='synced',_0x465441[_0x5275fd(0x360)]='pending',_0x465441[_0x5275fd(0x29c)]=_0x5275fd(0x197),_0x465441[_0x5275fd(0x3e1)]=_0x5275fd(0x355),_0x465441['FETCH_MISS']=_0x5275fd(0x3f5),_0x465441[_0x5275fd(0x171)]=_0x5275fd(0x326),_0x465441[_0x5275fd(0x2d7)]=_0x5275fd(0x2fa),_0x465441;}({});const Ce=0x4e20,we=0x2bf20;var k=class{constructor(_0xd4940,_0x180084,_0x341e7c,_0x373261,_0x518d08,_0x4f330a,_0x1d477c,_0x567da8,_0xf57098){const _0x1bcdeb=_0x1de16c;this[_0x1bcdeb(0x378)]=_0xd4940,this[_0x1bcdeb(0x1a0)]=_0x180084,this['_handler']=_0x518d08,this['_commandService']=_0x4f330a,this[_0x1bcdeb(0x217)]=_0x1d477c,this[_0x1bcdeb(0x20b)]=_0x567da8,this[_0x1bcdeb(0x2e1)]=_0xf57098,g(this,'_awaitingChangeset',null),g(this,_0x1bcdeb(0x256),[]),this[_0x1bcdeb(0x1c3)]=_0x341e7c,this[_0x1bcdeb(0x256)]=_0x373261;}[_0x1de16c(0x402)](_0x592ae6){const _0x45fc79=_0x1de16c;let _0x27feb6=this[_0x45fc79(0x20b)][_0x45fc79(0x295)](this['unitID']);return _0x592ae6[_0x45fc79(0x3be)]>_0x27feb6+0x1?(this['_handler']['onMissingChangesets']({'from':_0x27feb6,'to':_0x592ae6[_0x45fc79(0x3be)]-0x1}),!0x0):!0x1;}[_0x1de16c(0x139)](_0x3754c0){const _0x2d1260=_0x1de16c;this[_0x2d1260(0x217)][_0x2d1260(0x2e9)](this[_0x2d1260(0x378)],_0x3754c0);}[_0x1de16c(0x2f4)](_0x1f6f86){const _0x149142=_0x1de16c;var _0x1afcb3,_0x50166f;(_0x1afcb3=(_0x50166f=this[_0x149142(0x36f)])[_0x149142(0x2cc)])==null||_0x1afcb3['call'](_0x50166f,_0x1f6f86);}['_transformIMECache'](_0x6f8484){const _0x4c3485=_0x1de16c;var _0x5f4c76,_0xedaabd;return(_0x5f4c76=(_0xedaabd=this[_0x4c3485(0x36f)])[_0x4c3485(0x364)])==null?void 0x0:_0x5f4c76[_0x4c3485(0x21c)](_0xedaabd,_0x6f8484);}[_0x1de16c(0x335)](_0x141c36){const _0x82c903=_0x1de16c;var _0x3538b5,_0x1173d6;return(_0x3538b5=(_0x1173d6=this[_0x82c903(0x36f)])[_0x82c903(0x32d)])==null?void 0x0:_0x3538b5[_0x82c903(0x21c)](_0x1173d6,_0x141c36);}[_0x1de16c(0x18a)](_0x7cb79f){const _0x4f8a8e=_0x1de16c;var _0x4e2263,_0x214732,_0x4f11c0;return(_0x4e2263=(_0x214732=(_0x4f11c0=this[_0x4f8a8e(0x36f)])[_0x4f8a8e(0x1d4)])==null?void 0x0:_0x214732[_0x4f8a8e(0x21c)](_0x4f11c0,_0x7cb79f))==null?_0x7cb79f:_0x4e2263;}[_0x1de16c(0x356)](_0x1b8d10){const _0x278ac8=_0x1de16c;var _0x1c93ca,_0x11cff4,_0x3d56c3;return(_0x1c93ca=(_0x11cff4=(_0x3d56c3=this[_0x278ac8(0x36f)])[_0x278ac8(0x3d8)])==null?void 0x0:_0x11cff4['call'](_0x3d56c3,_0x1b8d10))==null?_0x1b8d10:_0x1c93ca;}[_0x1de16c(0x140)](_0x5182fa){const _0x225c42=_0x1de16c;if(this[_0x225c42(0x1a0)]===t['UniverInstanceType'][_0x225c42(0x198)]){let {unitID:_0x13a47f,mutations:_0x414819,memberID:_0x19eed3}=_0x5182fa,_0x3c15ff=_0x414819['length']>0x0?_0x414819[0x0][_0x225c42(0x3ce)]['textRanges']:[];if(Array[_0x225c42(0x3db)](_0x3c15ff)&&_0x3c15ff[_0x225c42(0x3c7)]>0x0){var _0x429c2d,_0x20249b;(_0x429c2d=(_0x20249b=this[_0x225c42(0x36f)])['onSyncEditingCollabCursor'])==null||_0x429c2d[_0x225c42(0x21c)](_0x20249b,{'unitID':_0x13a47f,'memberID':_0x19eed3,'textRanges':_0x3c15ff});}}}[_0x1de16c(0x394)](){const _0x476c41=_0x1de16c;var _0x1a7334;(_0x1a7334=this[_0x476c41(0x2e1)])==null||_0x1a7334[_0x476c41(0x152)](this[_0x476c41(0x378)],this[_0x476c41(0x1a0)],this[_0x476c41(0x1c3)],this['_pendingMutations']);}[_0x1de16c(0x170)](){const _0x2f952d=_0x1de16c;return this['_revisionService'][_0x2f952d(0x295)](this[_0x2f952d(0x378)]);}[_0x1de16c(0x3a3)](){this['_revisionService']['incrementRevOfUnit'](this['unitID']);}[_0x1de16c(0x1f3)](_0x1acdf1){const _0x5bcc46=_0x1de16c;let _0x2204ca=this['_transformRemoteChangesetByIMECache'](_0x1acdf1);_0x2204ca=this[_0x5bcc46(0x356)](_0x2204ca);let _0x500c36=(0x0,t['sequenceExecute'])(_0x2204ca[_0x5bcc46(0x13f)],this[_0x5bcc46(0x3ab)],{'fromCollab':!0x0});if(!_0x500c36['result']){var _0x52567b;throw _0x500c36[_0x5bcc46(0x1e3)]instanceof Error?_0x500c36[_0x5bcc46(0x1e3)]:Error((_0x52567b=_0x500c36[_0x5bcc46(0x1e3)])==null?_0x5bcc46(0x131):_0x52567b);}this[_0x5bcc46(0x1d1)](_0x2204ca),this[_0x5bcc46(0x335)](_0x2204ca),this[_0x5bcc46(0x139)](_0x1acdf1),this[_0x5bcc46(0x2f4)](_0x2204ca),this['_syncEditingCollabCursor'](_0x2204ca),this[_0x5bcc46(0x3a3)]();}};let A=class extends k{constructor(_0x4d70a4,_0xea0274,_0x229c49,_0x1ea1af,_0x1280b3,_0x1309d0,_0x4255a5,_0x5cf209,_0xbe04c5,_0x41eef2){const _0x34ec9e=_0x1de16c;super(_0x4d70a4,_0xea0274,null,[],_0x229c49,_0x4255a5,_0x1309d0,_0x1ea1af,_0x41eef2),this['_injector']=_0x1280b3,this[_0x34ec9e(0x30d)]=_0x5cf209,this['_transformService']=_0xbe04c5,this[_0x34ec9e(0x30c)]=_0x41eef2,g(this,_0x34ec9e(0x218),_0x34ec9e(0x31c));}[_0x1de16c(0x21e)](_0x35769c){const _0xd8b379=_0x1de16c;let _0x2d1592=this[_0xd8b379(0x16d)][_0xd8b379(0x215)](j,this['unitID'],this[_0xd8b379(0x1a0)],[_0x35769c],this['_handler']);return _0x2d1592[_0xd8b379(0x35e)](),_0x2d1592[_0xd8b379(0x394)](),_0x2d1592;}['onRemoteChangeset'](_0x5f448f){const _0x2fe15b=_0x1de16c;if(this['_checkMissing'](_0x5f448f))return this[_0x2fe15b(0x16d)][_0x2fe15b(0x215)](I,this[_0x2fe15b(0x378)],this[_0x2fe15b(0x1a0)],null,[],null,[_0x5f448f],this['_handler']);try{let _0x3ece6e=this[_0x2fe15b(0x226)][_0x2fe15b(0x307)](_0x5f448f,[e[_0x2fe15b(0x247)]]);if((0x0,e[_0x2fe15b(0x2f1)])(_0x3ece6e)){let {c1Prime:_0x15cd3e}=_0x3ece6e;return this[_0x2fe15b(0x1f3)](_0x15cd3e),this;}throw _0x3ece6e['error'];}catch(_0x2db83e){return this['_logService'][_0x2fe15b(0x1e3)](_0x2db83e),this['_onConflict'](!0x1);}}['_onConflict'](_0x4bcb27){const _0x396337=_0x1de16c;return this[_0x396337(0x16d)][_0x396337(0x215)](P,this['unitID'],this[_0x396337(0x1a0)],null,[],this[_0x396337(0x36f)],_0x4bcb27);}[_0x1de16c(0x2ca)](_0x4c35fd){const _0x3308a6=_0x1de16c;if(_0x4c35fd[_0x3308a6(0x3be)]<=this[_0x3308a6(0x170)]())return this;throw Error(_0x3308a6(0x332));}['onRemoteRej'](){const _0x2efb93=_0x1de16c;throw Error(_0x2efb93(0x386));}[_0x1de16c(0x28f)](){return this;}['toggleOffline'](){const _0x4aeac5=_0x1de16c;return this[_0x4aeac5(0x16d)]['createInstance'](F,this['unitID'],this['type'],null,[],this[_0x4aeac5(0x36f)]);}[_0x1de16c(0x127)](){return this;}[_0x1de16c(0x1be)](){const _0x5a3c90=_0x1de16c;throw Error(_0x5a3c90(0x32c));}[_0x1de16c(0x14e)](){const _0x3bfc55=_0x1de16c;let _0x53dfe3=this[_0x3bfc55(0x20b)][_0x3bfc55(0x295)](this['unitID']);return this[_0x3bfc55(0x36f)][_0x3bfc55(0x3da)]({'from':_0x53dfe3,'to':0x0}),this[_0x3bfc55(0x16d)]['createInstance'](I,this[_0x3bfc55(0x378)],this[_0x3bfc55(0x1a0)],null,[],null,[],this[_0x3bfc55(0x36f)]);}};A=y([v(0x3,(0x0,t['Inject'])(e[_0x1de16c(0x2eb)])),v(0x4,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x25d)])),v(0x5,t['IUndoRedoService']),v(0x6,t[_0x1de16c(0x2a8)]),v(0x7,t[_0x1de16c(0x243)]),v(0x8,e[_0x1de16c(0x13c)]),v(0x9,(0x0,t[_0x1de16c(0x37e)])(S))],A);let j=E=class extends k{constructor(_0x4a5514,_0x1e7c4e,_0x4c1f03,_0x4edd4f,_0x112fc3,_0x3b5c92,_0x4432f1,_0x538ecf,_0x2ece2b,_0x1c746e,_0x3b6415,_0x496782,_0x55e9a2,_0x253813){const _0x234d39=_0x1de16c;super(_0x4a5514,_0x1e7c4e,null,_0x4c1f03,_0x4edd4f,_0x2ece2b,_0x55e9a2,_0x3b5c92,_0x253813),this['_injector']=_0x112fc3,this[_0x234d39(0x231)]=_0x4432f1,this[_0x234d39(0x30d)]=_0x538ecf,this[_0x234d39(0x2aa)]=_0x1c746e,this[_0x234d39(0x226)]=_0x3b6415,this['_univerInstanceService']=_0x496782,g(this,_0x234d39(0x218),_0x234d39(0x375)),g(this,_0x234d39(0x271),null),g(this,_0x234d39(0x366),null);}['appendMutation'](_0x15d359){const _0x9e4c45=_0x1de16c;return this[_0x9e4c45(0x256)][_0x9e4c45(0x186)](_0x15d359),this['_updateLocalCache'](),this;}[_0x1de16c(0x2e0)](_0x25145b){const _0x14b2b7=_0x1de16c;if(this[_0x14b2b7(0x402)](_0x25145b))return this[_0x14b2b7(0x338)](),this[_0x14b2b7(0x16d)][_0x14b2b7(0x215)](I,this[_0x14b2b7(0x378)],this['type'],null,this[_0x14b2b7(0x256)],null,[_0x25145b],this['_handler']);try{let _0x2b54fe=this[_0x14b2b7(0x226)][_0x14b2b7(0x307)](_0x25145b,this['_pendingMutations']);if((0x0,e[_0x14b2b7(0x2f1)])(_0x2b54fe)){let {c1Prime:_0x1ab778,m2Prime:_0x179d64}=_0x2b54fe;this[_0x14b2b7(0x1f3)](_0x1ab778);let _0x21aede=this['_injector'][_0x14b2b7(0x215)](E,this[_0x14b2b7(0x378)],this[_0x14b2b7(0x1a0)],_0x179d64,this[_0x14b2b7(0x36f)]);this[_0x14b2b7(0x338)]();let _0x4e2661=new Date()[_0x14b2b7(0x3f6)](),_0x7e7b18=this[_0x14b2b7(0x271)]?Math['max'](this['_scheduleCompleteTimestamp']-_0x4e2661,0x0):this[_0x14b2b7(0x3c4)]();return _0x21aede[_0x14b2b7(0x35e)](_0x7e7b18),_0x21aede;}throw _0x2b54fe[_0x14b2b7(0x1e3)];}catch(_0x254188){return this[_0x14b2b7(0x30d)][_0x14b2b7(0x1e3)](_0x254188),this[_0x14b2b7(0x369)](!0x1);}}['onRemoteAck'](_0x5069f8){const _0x9df6c8=_0x1de16c;if(_0x5069f8['revision']<=this[_0x9df6c8(0x170)]())return this;throw Error(_0x9df6c8(0x2f7));}[_0x1de16c(0x3a5)](){const _0x250c7a=_0x1de16c;throw Error(_0x250c7a(0x2e2));}[_0x1de16c(0x28f)](){return this;}[_0x1de16c(0x315)](){const _0x5698fc=_0x1de16c;return this[_0x5698fc(0x338)](),this['_injector'][_0x5698fc(0x215)](F,this[_0x5698fc(0x378)],this[_0x5698fc(0x1a0)],null,this[_0x5698fc(0x256)],this['_handler']);}['toggleOnline'](){return this;}['_schedule'](_0x52b9bb){const _0x4bf15f=_0x1de16c;let _0x374b9d=_0x52b9bb==null?this[_0x4bf15f(0x3c4)]():_0x52b9bb;this[_0x4bf15f(0x271)]=new Date()['getTime']()+_0x374b9d,this[_0x4bf15f(0x366)]=setTimeout(()=>{const _0x329055=_0x4bf15f;this[_0x329055(0x338)]();let _0x1dc146=null;switch(this[_0x329055(0x1a0)]){case t[_0x329055(0x20a)]['UNIVER_SHEET']:_0x1dc146=me(this[_0x329055(0x256)],this[_0x329055(0x378)],this[_0x329055(0x2a7)],this[_0x329055(0x20b)],this[_0x329055(0x231)]);break;case t[_0x329055(0x20a)][_0x329055(0x198)]:_0x1dc146=this[_0x329055(0x256)][_0x329055(0x2ea)](_0x12b053=>_0x12b053['id']===n[_0x329055(0x142)]['id'])?he(this[_0x329055(0x256)],this[_0x329055(0x378)],this['_univerInstanceService'],this['_revisionService'],this[_0x329055(0x231)]):me(this['_pendingMutations'],this[_0x329055(0x378)],this['_univerInstanceService'],this[_0x329055(0x20b)],this[_0x329055(0x231)]);break;default:throw Error(_0x329055(0x39a)+this['type']+_0x329055(0x30a));}let {changeset:_0x1e3e7d,pendingMutations:_0x541163}=_0x1dc146;this[_0x329055(0x36f)]['onSendChangeset'](_0x1e3e7d);let _0x4dca21=_0x541163[_0x329055(0x3c7)]?this['_injector'][_0x329055(0x215)](N,this['unitID'],this[_0x329055(0x1a0)],_0x1e3e7d,_0x541163,this[_0x329055(0x36f)],void 0x0):this[_0x329055(0x16d)][_0x329055(0x215)](M,this[_0x329055(0x378)],this[_0x329055(0x1a0)],_0x1e3e7d,this[_0x329055(0x36f)]);_0x4dca21[_0x329055(0x394)](),this[_0x329055(0x36f)][_0x329055(0x135)](this,_0x4dca21);},_0x374b9d);}[_0x1de16c(0x3c4)](){const _0x394457=_0x1de16c;var _0x223151;let _0x3b9c22=this[_0x394457(0x2aa)][_0x394457(0x26a)](T);return(_0x223151=_0x3b9c22==null?void 0x0:_0x3b9c22['sendChangesetTimeout'])==null?0x7d0:_0x223151;}[_0x1de16c(0x1be)](){const _0x3236f5=_0x1de16c;throw Error(_0x3236f5(0x213));}['_clearScheduledTask'](){const _0x335eca=_0x1de16c;this[_0x335eca(0x366)]!=null&&(clearTimeout(this['_sendingTimer']),this[_0x335eca(0x366)]=null);}['_onConflict'](_0x1a331f){const _0x38c0f4=_0x1de16c;return this[_0x38c0f4(0x338)](),this[_0x38c0f4(0x16d)][_0x38c0f4(0x215)](P,this[_0x38c0f4(0x378)],this[_0x38c0f4(0x1a0)],null,this[_0x38c0f4(0x256)],this[_0x38c0f4(0x36f)],_0x1a331f);}};j=E=y([v(0x4,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x25d)])),v(0x5,(0x0,t[_0x1de16c(0x20f)])(e[_0x1de16c(0x2eb)])),v(0x6,(0x0,t['Inject'])(b)),v(0x7,t[_0x1de16c(0x243)]),v(0x8,t['ICommandService']),v(0x9,t['IConfigService']),v(0xa,e[_0x1de16c(0x13c)]),v(0xb,t[_0x1de16c(0x1ca)]),v(0xc,t[_0x1de16c(0x374)]),v(0xd,(0x0,t['Optional'])(S))],j);let M=D=class extends k{constructor(_0x4072bc,_0x99185a,_0x3afdb0,_0x7bf4dc,_0x35c678,_0x5e4ef2,_0x42e823,_0x19a858,_0x5d9d39,_0x26dd95,_0x354101){const _0x4370ed=_0x1de16c;super(_0x4072bc,_0x99185a,_0x3afdb0,[],_0x7bf4dc,_0x42e823,_0x26dd95,_0x5e4ef2,_0x354101),this[_0x4370ed(0x16d)]=_0x35c678,this[_0x4370ed(0x30d)]=_0x19a858,this[_0x4370ed(0x226)]=_0x5d9d39,g(this,_0x4370ed(0x218),'awaiting'),g(this,_0x4370ed(0x1eb),0x0),g(this,_0x4370ed(0x39e),0x0),g(this,_0x4370ed(0x3a8),void 0x0),g(this,_0x4370ed(0x22a),void 0x0);}['appendMutation'](_0xd5f9a){const _0x42d9e8=_0x1de16c;this[_0x42d9e8(0x338)]();let _0x522233=this[_0x42d9e8(0x16d)][_0x42d9e8(0x215)](N,this[_0x42d9e8(0x378)],this[_0x42d9e8(0x1a0)],this[_0x42d9e8(0x1c3)],[_0xd5f9a],this[_0x42d9e8(0x36f)],this[_0x42d9e8(0x3a8)]);return _0x522233[_0x42d9e8(0x394)](),_0x522233;}[_0x1de16c(0x2e0)](_0x1861f6){const _0x385d21=_0x1de16c;if(this['_checkMissing'](_0x1861f6))return this[_0x385d21(0x338)](),this[_0x385d21(0x16d)][_0x385d21(0x215)](I,this[_0x385d21(0x378)],this[_0x385d21(0x1a0)],this[_0x385d21(0x1c3)],[],null,[_0x1861f6],this[_0x385d21(0x36f)]);try{let _0x39cdd2=this['_transformService'][_0x385d21(0x34d)]([_0x1861f6],[this[_0x385d21(0x1c3)]],!0x1);if((0x0,e[_0x385d21(0x20c)])(_0x39cdd2)){let {c1Prime:_0x131417,c2Prime:_0x2a584a}=_0x39cdd2;this['_executeRemoteChangeset'](_0x131417[0x0]),_0x2a584a[0x0][_0x385d21(0x336)]=this[_0x385d21(0x170)](),this[_0x385d21(0x338)]();let _0x7f60bf=this[_0x385d21(0x16d)]['createInstance'](D,this[_0x385d21(0x378)],this[_0x385d21(0x1a0)],_0x2a584a[0x0],this['_handler']);return _0x7f60bf[_0x385d21(0x394)](),_0x7f60bf;}throw _0x39cdd2[_0x385d21(0x1e3)];}catch(_0x4342ed){return this[_0x385d21(0x30d)]['error'](_0x4342ed),this[_0x385d21(0x369)](!0x1);}}[_0x1de16c(0x2ca)](_0x5234b8){const _0x5df9fa=_0x1de16c;this[_0x5df9fa(0x338)]();let _0x230a80=this[_0x5df9fa(0x20b)][_0x5df9fa(0x295)](this[_0x5df9fa(0x378)]);if(_0x5234b8[_0x5df9fa(0x3be)]<=_0x230a80)return this;if(this[_0x5df9fa(0x402)](_0x5234b8))return this[_0x5df9fa(0x16d)][_0x5df9fa(0x215)](I,this[_0x5df9fa(0x378)],this[_0x5df9fa(0x1a0)],this[_0x5df9fa(0x1c3)],[],_0x5234b8[_0x5df9fa(0x3be)],[],this[_0x5df9fa(0x36f)]);this[_0x5df9fa(0x3a3)]();let _0x17fb24=this[_0x5df9fa(0x16d)][_0x5df9fa(0x215)](A,this[_0x5df9fa(0x378)],this[_0x5df9fa(0x1a0)],this['_handler']);return _0x17fb24['_updateLocalCache'](),_0x17fb24;}[_0x1de16c(0x3a5)](_0xdc1b30){const _0x5de53d=_0x1de16c;return this['_onConflict'](!!(_0xdc1b30!=null&&_0xdc1b30[_0x5de53d(0x3e2)]));}[_0x1de16c(0x28f)](_0x50ec03){const _0x189e0a=_0x1de16c;return this['_maxTotalRetryTimeout']>we?this[_0x189e0a(0x315)]():(this[_0x189e0a(0x3a8)]=xe(this[_0x189e0a(0x1eb)],{'timeout':this[_0x189e0a(0x1eb)],'reqId':_0x50ec03[_0x189e0a(0x163)]}),this[_0x189e0a(0x22a)]=this[_0x189e0a(0x3a8)][_0x189e0a(0x15c)](({reqId:_0xf8516c,timeout:_0x175435})=>{this['_resendWithTimeout'](_0xf8516c,_0x175435);}),this);}[_0x1de16c(0x315)](){const _0x2c05df=_0x1de16c;return this[_0x2c05df(0x338)](),this[_0x2c05df(0x16d)]['createInstance'](F,this[_0x2c05df(0x378)],this[_0x2c05df(0x1a0)],this['_awaitingChangeset'],[],this[_0x2c05df(0x36f)]);}['toggleOnline'](){return this;}[_0x1de16c(0x1be)](){const _0x558022=_0x1de16c;this['_handler']['onSendChangeset'](this[_0x558022(0x1c3)]);}[_0x1de16c(0x369)](_0x65bf39){const _0x476678=_0x1de16c;return this[_0x476678(0x338)](),this[_0x476678(0x16d)][_0x476678(0x215)](P,this[_0x476678(0x378)],this[_0x476678(0x1a0)],this[_0x476678(0x1c3)],[],this[_0x476678(0x36f)],_0x65bf39);}[_0x1de16c(0x16c)](_0x2aa40a,_0x1a2370){const _0x1687ad=_0x1de16c;var _0x5181c6;_0x2aa40a===((_0x5181c6=this[_0x1687ad(0x1c3)])==null?void 0x0:_0x5181c6[_0x1687ad(0x163)])&&(this[_0x1687ad(0x1be)](),this[_0x1687ad(0x1eb)]=_0x1a2370===0x0?0x3e8:Math[_0x1687ad(0x34b)](_0x1a2370*0x2,Ce),this['_maxTotalRetryTimeout']+=this[_0x1687ad(0x1eb)]);}[_0x1de16c(0x338)](){const _0x1c0b6b=_0x1de16c;var _0x2abe7e;(_0x2abe7e=this[_0x1c0b6b(0x22a)])==null||_0x2abe7e[_0x1c0b6b(0x21f)](),this[_0x1c0b6b(0x1eb)]=0x0,this[_0x1c0b6b(0x39e)]=0x0;}};M=D=y([v(0x4,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x25d)])),v(0x5,(0x0,t['Inject'])(e[_0x1de16c(0x2eb)])),v(0x6,t[_0x1de16c(0x2a8)]),v(0x7,t['ILogService']),v(0x8,e[_0x1de16c(0x13c)]),v(0x9,t[_0x1de16c(0x374)]),v(0xa,(0x0,t['Optional'])(S))],M);let N=O=class extends k{constructor(_0x332984,_0x3d556b,_0x994c7e,_0xa1621d,_0x596df2,_0x1fa8e6,_0x4bdf9c,_0x1fac70,_0x4ecbf6,_0x259592,_0x4e2247,_0x57b1c2,_0x332d03){const _0x204c1a=_0x1de16c;super(_0x332984,_0x3d556b,_0x994c7e,_0xa1621d,_0x596df2,_0x4ecbf6,_0x57b1c2,_0x1fac70,_0x332d03),this[_0x204c1a(0x16d)]=_0x4bdf9c,this[_0x204c1a(0x30d)]=_0x259592,this[_0x204c1a(0x226)]=_0x4e2247,this[_0x204c1a(0x30c)]=_0x332d03,g(this,_0x204c1a(0x218),_0x204c1a(0x355)),g(this,_0x204c1a(0x1eb),0x0),g(this,'_maxTotalRetryTimeout',0x0),g(this,_0x204c1a(0x3a8),void 0x0),g(this,'_sender',void 0x0),_0x1fa8e6&&(this[_0x204c1a(0x3a8)]=_0x1fa8e6,this['_sender']=this[_0x204c1a(0x3a8)][_0x204c1a(0x15c)](({reqId:_0x2d2ae4,timeout:_0x53c089})=>{const _0x47b334=_0x204c1a;this[_0x47b334(0x16c)](_0x2d2ae4,_0x53c089);}));}['appendMutation'](_0x299400){const _0x33031d=_0x1de16c;return this[_0x33031d(0x256)]['push'](_0x299400),this;}[_0x1de16c(0x2e0)](_0x1150fa){const _0x2f8d3c=_0x1de16c;if(this[_0x2f8d3c(0x402)](_0x1150fa))return this['_clearScheduledTask'](),this['_injector']['createInstance'](I,this[_0x2f8d3c(0x378)],this[_0x2f8d3c(0x1a0)],this[_0x2f8d3c(0x1c3)],this['_pendingMutations'],null,[_0x1150fa],this[_0x2f8d3c(0x36f)]);try{let _0x323c9d=this['_transformService']['transformChangesets']([_0x1150fa],[this[_0x2f8d3c(0x1c3)]],!0x1);if((0x0,e[_0x2f8d3c(0x20c)])(_0x323c9d)){let {c1Prime:_0x19dfcb,c2Prime:_0x3b595e}=_0x323c9d,_0x1ef9e7=this[_0x2f8d3c(0x226)][_0x2f8d3c(0x307)](_0x19dfcb[0x0],this[_0x2f8d3c(0x256)]);if((0x0,e[_0x2f8d3c(0x2f1)])(_0x1ef9e7)){let {c1Prime:_0x437c70,m2Prime:_0x35131d}=_0x1ef9e7;return this[_0x2f8d3c(0x1f3)](_0x437c70),_0x3b595e[0x0][_0x2f8d3c(0x336)]=this[_0x2f8d3c(0x170)](),this[_0x2f8d3c(0x338)](),this[_0x2f8d3c(0x16d)][_0x2f8d3c(0x215)](O,this[_0x2f8d3c(0x378)],this[_0x2f8d3c(0x1a0)],_0x3b595e[0x0],_0x35131d,this['_handler'],void 0x0);}throw _0x1ef9e7['error'];}throw _0x323c9d[_0x2f8d3c(0x1e3)];}catch(_0x7e89fd){return this[_0x2f8d3c(0x30d)]['error'](_0x7e89fd),this[_0x2f8d3c(0x369)](!0x1);}}['onRemoteAck'](_0x3ecc3d){const _0x120e45=_0x1de16c;this[_0x120e45(0x338)]();let _0x1cb73a=this[_0x120e45(0x170)]();if(_0x3ecc3d['revision']<=_0x1cb73a)return this;if(this[_0x120e45(0x402)](_0x3ecc3d))return this['_injector'][_0x120e45(0x215)](I,this[_0x120e45(0x378)],this[_0x120e45(0x1a0)],this[_0x120e45(0x1c3)],this[_0x120e45(0x256)],_0x3ecc3d[_0x120e45(0x3be)],[],this[_0x120e45(0x36f)]);this[_0x120e45(0x3a3)]();let _0x49fadd=this[_0x120e45(0x16d)]['createInstance'](j,this[_0x120e45(0x378)],this[_0x120e45(0x1a0)],this[_0x120e45(0x256)],this[_0x120e45(0x36f)]);return _0x49fadd[_0x120e45(0x35e)](),_0x49fadd[_0x120e45(0x394)](),_0x49fadd;}['onRemoteRej'](_0x140d9c){const _0x1d3119=_0x1de16c;return this[_0x1d3119(0x369)](!!(_0x140d9c!=null&&_0x140d9c[_0x1d3119(0x3e2)]));}[_0x1de16c(0x28f)](_0x4e1150){const _0x289916=_0x1de16c;return this[_0x289916(0x39e)]>we?this[_0x289916(0x315)]():(this[_0x289916(0x3a8)]=xe(this[_0x289916(0x1eb)],{'timeout':this[_0x289916(0x1eb)],'reqId':_0x4e1150[_0x289916(0x163)]}),this[_0x289916(0x22a)]=this[_0x289916(0x3a8)][_0x289916(0x15c)](({reqId:_0x2ac1a6,timeout:_0x5d6af8})=>{this['_resendWithTimeout'](_0x2ac1a6,_0x5d6af8);}),this);}[_0x1de16c(0x315)](){const _0x7dc3f0=_0x1de16c;return this[_0x7dc3f0(0x338)](),this[_0x7dc3f0(0x16d)][_0x7dc3f0(0x215)](F,this['unitID'],this[_0x7dc3f0(0x1a0)],this[_0x7dc3f0(0x1c3)],this['_pendingMutations'],this[_0x7dc3f0(0x36f)]);}[_0x1de16c(0x127)](){return this;}['resend'](){const _0x479daf=_0x1de16c;this['_handler'][_0x479daf(0x219)](this['_awaitingChangeset']);}[_0x1de16c(0x369)](_0x11f474){const _0x15ec88=_0x1de16c;return this[_0x15ec88(0x338)](),this[_0x15ec88(0x16d)]['createInstance'](P,this[_0x15ec88(0x378)],this[_0x15ec88(0x1a0)],null,this[_0x15ec88(0x256)],this[_0x15ec88(0x36f)],_0x11f474);}[_0x1de16c(0x16c)](_0xdf29b4,_0x8aedd8){const _0x5e36fa=_0x1de16c;var _0x38356a;_0xdf29b4===((_0x38356a=this[_0x5e36fa(0x1c3)])==null?void 0x0:_0x38356a[_0x5e36fa(0x163)])&&(this[_0x5e36fa(0x1be)](),this[_0x5e36fa(0x1eb)]=_0x8aedd8===0x0?0x3e8:Math['min'](_0x8aedd8*0x2,Ce),this[_0x5e36fa(0x39e)]+=this[_0x5e36fa(0x1eb)]);}[_0x1de16c(0x338)](){const _0x1194e9=_0x1de16c;var _0x43dd66;(_0x43dd66=this['_sender'])==null||_0x43dd66[_0x1194e9(0x21f)](),this[_0x1194e9(0x1eb)]=0x0,this['_maxTotalRetryTimeout']=0x0;}};N=O=y([v(0x6,(0x0,t['Inject'])(t[_0x1de16c(0x25d)])),v(0x7,(0x0,t[_0x1de16c(0x20f)])(e[_0x1de16c(0x2eb)])),v(0x8,t[_0x1de16c(0x2a8)]),v(0x9,t[_0x1de16c(0x243)]),v(0xa,e['ITransformService']),v(0xb,t['IUndoRedoService']),v(0xc,(0x0,t[_0x1de16c(0x37e)])(S))],N);let P=class extends k{constructor(_0x377909,_0x4e3d56,_0x4d0348,_0x317747,_0xc067ac,_0x12d490=!0x1,_0x5d90a2,_0x5ad27c,_0x47e6f3,_0x45425e,_0x4dd96f,_0x1a7ab3,_0x40b1ec){const _0x4c5d37=_0x1de16c;super(_0x377909,_0x4e3d56,_0x4d0348,_0x317747,_0xc067ac,_0x5ad27c,_0x47e6f3,_0x45425e,_0x40b1ec),this[_0x4c5d37(0x16f)]=_0x12d490,this[_0x4c5d37(0x2c5)]=_0x5d90a2,this[_0x4c5d37(0x3ff)]=_0x4dd96f,this['_collaborationUIEventService']=_0x1a7ab3,this[_0x4c5d37(0x30c)]=_0x40b1ec,g(this,_0x4c5d37(0x218),_0x4c5d37(0x326)),this[_0x4c5d37(0x1f6)](),this['_clearLocalCache'](),this[_0x4c5d37(0x407)]();}[_0x1de16c(0x21e)](){return this;}[_0x1de16c(0x2e0)](){return this;}[_0x1de16c(0x2ca)](){return this;}['onRemoteRej'](){return this;}[_0x1de16c(0x28f)](){return this;}[_0x1de16c(0x315)](){return this;}[_0x1de16c(0x127)](){return this;}[_0x1de16c(0x1be)](){const _0x536b4f=_0x1de16c;throw Error(_0x536b4f(0x387));}[_0x1de16c(0x266)](){const _0x53d2d1=_0x1de16c;var _0x497395;(_0x497395=this[_0x53d2d1(0x2e1)])==null||_0x497395[_0x53d2d1(0x152)](this[_0x53d2d1(0x378)],this[_0x53d2d1(0x1a0)],null,[]);}[_0x1de16c(0x1f6)](){const _0x49d0e8=_0x1de16c;this[_0x49d0e8(0x16f)]?this[_0x49d0e8(0x3f4)]['emitEvent']({'id':'PERMISSION_DENIED'}):this[_0x49d0e8(0x3f4)][_0x49d0e8(0x262)]({'id':_0x49d0e8(0x171)});}[_0x1de16c(0x407)](){const _0x5b2ab3=_0x1de16c;this[_0x5b2ab3(0x2c5)]['updatePermissionPoint'](new r[(_0x5b2ab3(0x316))](this[_0x5b2ab3(0x378)])['id'],!0x1);}};P=y([v(0x6,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x3e7)])),v(0x7,t[_0x1de16c(0x2a8)]),v(0x8,t['IUndoRedoService']),v(0x9,(0x0,t[_0x1de16c(0x20f)])(e[_0x1de16c(0x2eb)])),v(0xa,(0x0,t['Inject'])(t[_0x1de16c(0x297)])),v(0xb,(0x0,t[_0x1de16c(0x20f)])(_)),v(0xc,(0x0,t['Optional'])(S))],P);let F=class extends k{constructor(_0x3368b8,_0x13fced,_0x3c569e,_0xa75bf7,_0x2525f6,_0x351f61,_0x3a777e,_0x593c98,_0x83a10f,_0x1c4209){const _0x25d7ed=_0x1de16c;super(_0x3368b8,_0x13fced,_0x3c569e,_0xa75bf7,_0x2525f6,_0x593c98,_0x83a10f,_0x3a777e,_0x1c4209),this['_injector']=_0x351f61,g(this,_0x25d7ed(0x218),_0x25d7ed(0x2fa));}[_0x1de16c(0x21e)](_0x6743e1){const _0x3f6b20=_0x1de16c;return this[_0x3f6b20(0x256)][_0x3f6b20(0x186)](_0x6743e1),this[_0x3f6b20(0x394)](),this;}[_0x1de16c(0x2e0)](_0x25b1b9){const _0x121130=_0x1de16c;throw Error(_0x121130(0x34f));}['onRemoteAck'](){const _0x3bab05=_0x1de16c;throw Error(_0x3bab05(0x37a));}[_0x1de16c(0x3a5)](){throw Error('[OfflineState]:\x20received\x20rejection.');}[_0x1de16c(0x28f)](){return this;}[_0x1de16c(0x315)](){return this;}[_0x1de16c(0x127)](){const _0x2e8a64=_0x1de16c;let {_injector:_0x4f563d,_pendingMutations:_0x56104f,_awaitingChangeset:_0x84e893,unitID:_0x56abd5,_handler:_0x157f88,type:_0x5596f8}=this,_0x17b3f5=Te(_0x4f563d,_0x56abd5,_0x5596f8,_0x84e893,_0x56104f,_0x157f88);return _0x17b3f5 instanceof j?_0x17b3f5[_0x2e8a64(0x35e)]():(_0x17b3f5 instanceof N||_0x17b3f5 instanceof M)&&_0x17b3f5[_0x2e8a64(0x1be)](),_0x17b3f5;}['resend'](){const _0x2a615c=_0x1de16c;throw Error(_0x2a615c(0x38f));}};F=y([v(0x5,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x25d)])),v(0x6,(0x0,t[_0x1de16c(0x20f)])(e['RevisionService'])),v(0x7,t[_0x1de16c(0x2a8)]),v(0x8,t[_0x1de16c(0x374)]),v(0x9,(0x0,t[_0x1de16c(0x37e)])(S))],F);let I=class extends k{constructor(_0x294574,_0x94ab04,_0x41d18d,_0x125c28,_0x4c3fa4,_0x10d6fd,_0x54342b,_0x570435,_0x257ee7,_0xe06725,_0x1ec77b,_0x475f8a,_0x4e9580,_0x5a84de){const _0x585b37=_0x1de16c;super(_0x294574,_0x94ab04,_0x41d18d,_0x125c28,_0x54342b,_0x1ec77b,_0x475f8a,_0x257ee7,_0x5a84de),this[_0x585b37(0x385)]=_0x4c3fa4,this[_0x585b37(0x298)]=_0x10d6fd,this[_0x585b37(0x16d)]=_0x570435,this[_0x585b37(0x30d)]=_0xe06725,this[_0x585b37(0x226)]=_0x4e9580,this[_0x585b37(0x30c)]=_0x5a84de,g(this,'status',_0x585b37(0x3f5));}['onMissedChangesetFetched'](_0x44ecd0){const _0x3ac8ff=_0x1de16c;try{if(this['_handleRemoteChangesets'](_0x44ecd0)[_0x3ac8ff(0x3ec)])throw Error(_0x3ac8ff(0x283));if(this[_0x3ac8ff(0x18f)]([...this[_0x3ac8ff(0x298)]][_0x3ac8ff(0x24f)]((_0x3232a5,_0x542704)=>_0x3232a5[_0x3ac8ff(0x3be)]-_0x542704[_0x3ac8ff(0x3be)]))[_0x3ac8ff(0x3ec)])return this['_queuedRemoteChangesets']=[],this[_0x3ac8ff(0x394)](),this[_0x3ac8ff(0x36f)][_0x3ac8ff(0x3da)]({'from':this['_getCurrentRevision'](),'to':0x0}),this;let _0x1646d3=this['_awaitingChangeset'],_0x8e2d25=this[_0x3ac8ff(0x256)],_0x21cb2e;if(_0x1646d3&&_0x8e2d25['length']!==0x0)_0x21cb2e=this[_0x3ac8ff(0x16d)][_0x3ac8ff(0x215)](N,this[_0x3ac8ff(0x378)],this[_0x3ac8ff(0x1a0)],_0x1646d3,_0x8e2d25,this[_0x3ac8ff(0x36f)],void 0x0);else{if(_0x1646d3&&_0x8e2d25[_0x3ac8ff(0x3c7)]===0x0)_0x1646d3[_0x3ac8ff(0x336)]=this['_getCurrentRevision'](),_0x21cb2e=this[_0x3ac8ff(0x16d)][_0x3ac8ff(0x215)](M,this[_0x3ac8ff(0x378)],this[_0x3ac8ff(0x1a0)],_0x1646d3,this[_0x3ac8ff(0x36f)]);else{if(_0x8e2d25['length']!==0x0){let _0x5583de=this[_0x3ac8ff(0x16d)]['createInstance'](j,this[_0x3ac8ff(0x378)],this[_0x3ac8ff(0x1a0)],_0x8e2d25,this[_0x3ac8ff(0x36f)]);_0x5583de[_0x3ac8ff(0x35e)](),_0x21cb2e=_0x5583de;}else _0x21cb2e=this[_0x3ac8ff(0x16d)]['createInstance'](A,this[_0x3ac8ff(0x378)],this['type'],this[_0x3ac8ff(0x36f)]);}}return _0x21cb2e[_0x3ac8ff(0x394)](),_0x21cb2e;}catch(_0x504fd3){return this[_0x3ac8ff(0x30d)][_0x3ac8ff(0x1e3)]('[FetchMissState]',_0x3ac8ff(0x2d9),_0x504fd3),this['_injector'][_0x3ac8ff(0x215)](P,this[_0x3ac8ff(0x378)],this[_0x3ac8ff(0x1a0)],this['_awaitingChangeset'],this['_pendingMutations'],this[_0x3ac8ff(0x36f)],!0x1);}}[_0x1de16c(0x18f)](_0x5494a3){const _0x345e6c=_0x1de16c;this[_0x345e6c(0x1cc)]();for(let _0x41fe70=0x0;_0x41fe70<_0x5494a3[_0x345e6c(0x3c7)];_0x41fe70++){let _0x118d0f=_0x5494a3[_0x41fe70],_0x2572f7=this[_0x345e6c(0x170)]();if(!(_0x118d0f[_0x345e6c(0x3be)]<=_0x2572f7)){if(_0x118d0f['revision']>_0x2572f7+0x1)return{'missingChangesets':!0x0};if(this['_isEchoedAwaitingChangeset'](_0x118d0f)){this[_0x345e6c(0x24a)]();continue;}this[_0x345e6c(0x346)](_0x118d0f),this[_0x345e6c(0x1cc)]();}}return{'missingChangesets':!0x1};}['_transformAndApplyRemoteChangeset'](_0x69eb26){const _0x16faef=_0x1de16c;let _0x4f14e7=_0x69eb26,_0x57ef82=this[_0x16faef(0x1c3)];if(_0x57ef82){let _0x216bb3=this['_transformService']['transformChangesets']([_0x69eb26],[_0x57ef82],!0x1);if(!(0x0,e[_0x16faef(0x20c)])(_0x216bb3))throw _0x216bb3['error'];_0x4f14e7=_0x216bb3['c1Prime'][0x0],_0x57ef82=_0x216bb3[_0x16faef(0x324)][0x0];}let _0x19473e=this[_0x16faef(0x256)];if(_0x19473e['length']){let _0x3f4312=this[_0x16faef(0x226)][_0x16faef(0x307)](_0x4f14e7,_0x19473e);if(!(0x0,e[_0x16faef(0x2f1)])(_0x3f4312))throw _0x3f4312[_0x16faef(0x1e3)];_0x4f14e7=_0x3f4312[_0x16faef(0x38e)],_0x19473e=_0x3f4312[_0x16faef(0x249)];}this[_0x16faef(0x1f3)](_0x4f14e7),_0x57ef82&&(_0x57ef82[_0x16faef(0x336)]=this['_getCurrentRevision']()),this[_0x16faef(0x1c3)]=_0x57ef82,this[_0x16faef(0x256)]=_0x19473e;}[_0x1de16c(0x1cc)](){const _0x3baec5=_0x1de16c;if(!this[_0x3baec5(0x1c3)]||this[_0x3baec5(0x385)]==null)return;let _0x3cde16=this[_0x3baec5(0x170)]();if(this[_0x3baec5(0x385)]<=_0x3cde16)throw Error(_0x3baec5(0x285)+this[_0x3baec5(0x385)]+'.');this[_0x3baec5(0x385)]===_0x3cde16+0x1&&this[_0x3baec5(0x24a)]();}[_0x1de16c(0x24a)](){const _0x507d98=_0x1de16c;this['_incrementRevisionNumber'](),this[_0x507d98(0x1c3)]=null,this[_0x507d98(0x385)]=null;}['_isEchoedAwaitingChangeset'](_0x570a61){const _0x18701f=_0x1de16c;let _0x279e1d=this[_0x18701f(0x1c3)];return!_0x279e1d||!_0x279e1d['sid']||_0x279e1d[_0x18701f(0x163)]===null||_0x279e1d[_0x18701f(0x163)]===void 0x0?!0x1:_0x570a61[_0x18701f(0x378)]===_0x279e1d[_0x18701f(0x378)]&&_0x570a61[_0x18701f(0x3d2)]===_0x279e1d['sid']&&_0x570a61[_0x18701f(0x163)]===_0x279e1d['reqId'];}[_0x1de16c(0x1be)](){const _0x24280c=_0x1de16c;throw Error(_0x24280c(0x348));}[_0x1de16c(0x21e)](_0x242a50){const _0x5ab464=_0x1de16c;return this[_0x5ab464(0x256)]['push'](_0x242a50),this;}[_0x1de16c(0x2e0)](_0x1e03c1){const _0x504c81=_0x1de16c;return this[_0x504c81(0x298)]['push'](_0x1e03c1),this;}['onRemoteAck'](_0x6c67af){const _0x3099b4=_0x1de16c;if(this[_0x3099b4(0x1c3)]){let _0x5f240e=this[_0x3099b4(0x170)]();return _0x6c67af[_0x3099b4(0x3be)]<=_0x5f240e||(_0x5f240e+0x1===_0x6c67af[_0x3099b4(0x3be)]?(this[_0x3099b4(0x3a3)](),this[_0x3099b4(0x1c3)]=null,this[_0x3099b4(0x385)]=null):this['_acknowledgedAwaitingRevision']=_0x6c67af[_0x3099b4(0x3be)]),this;}if(_0x6c67af['revision']<=this['_getCurrentRevision']())return this;throw Error(_0x3099b4(0x36e));}[_0x1de16c(0x3a5)](_0x4e4f6a){const _0x134b17=_0x1de16c;return this['_onConflict'](!!(_0x4e4f6a!=null&&_0x4e4f6a[_0x134b17(0x3e2)]));}[_0x1de16c(0x28f)](){return this;}[_0x1de16c(0x315)](){const _0x176fd8=_0x1de16c;return this[_0x176fd8(0x16d)]['createInstance'](F,this[_0x176fd8(0x378)],this[_0x176fd8(0x1a0)],this[_0x176fd8(0x1c3)],this[_0x176fd8(0x256)],this[_0x176fd8(0x36f)]);}['toggleOnline'](){return this;}[_0x1de16c(0x369)](_0x104583){const _0x250aa4=_0x1de16c;return this[_0x250aa4(0x16d)][_0x250aa4(0x215)](P,this['unitID'],this[_0x250aa4(0x1a0)],this[_0x250aa4(0x1c3)],this[_0x250aa4(0x256)],this[_0x250aa4(0x36f)],_0x104583);}};I=y([v(0x7,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x25d)])),v(0x8,(0x0,t[_0x1de16c(0x20f)])(e[_0x1de16c(0x2eb)])),v(0x9,t[_0x1de16c(0x243)]),v(0xa,t[_0x1de16c(0x2a8)]),v(0xb,t[_0x1de16c(0x374)]),v(0xc,e[_0x1de16c(0x13c)]),v(0xd,(0x0,t[_0x1de16c(0x37e)])(S))],I);function Te(_0x22175d,_0x2ddb0e,_0x4b49de,_0x4f6c1e,_0x213c9a,_0x4642bd){const _0x5e6026=_0x1de16c;return _0x4f6c1e&&_0x213c9a[_0x5e6026(0x3c7)]?_0x22175d[_0x5e6026(0x215)](N,_0x2ddb0e,_0x4b49de,_0x4f6c1e,_0x213c9a,_0x4642bd,void 0x0):_0x4f6c1e?_0x22175d[_0x5e6026(0x215)](M,_0x2ddb0e,_0x4b49de,_0x4f6c1e,_0x4642bd):_0x213c9a[_0x5e6026(0x3c7)]?_0x22175d[_0x5e6026(0x215)](j,_0x2ddb0e,_0x4b49de,_0x213c9a,_0x4642bd):_0x22175d[_0x5e6026(0x215)](A,_0x2ddb0e,_0x4b49de,_0x4642bd);}let L=class extends t['RxDisposable']{get['state'](){const _0x2638b5=_0x1de16c;return this[_0x2638b5(0x404)];}constructor(_0x4e040a,_0x130f9e,_0x4b03de,_0x385ffc,_0x1eeea3,_0x11b56e,_0x42d9e3,_0x35c6df,_0x2e876b,_0x2302c0,_0x33d700,_0x5219a9,_0x44c0f5,_0xf74dce){const _0x584baa=_0x1de16c;super(),this[_0x584baa(0x378)]=_0x4e040a,this[_0x584baa(0x380)]=_0x130f9e,this[_0x584baa(0x2ac)]=_0x4b03de,this[_0x584baa(0x16d)]=_0x385ffc,this[_0x584baa(0x1ba)]=_0x1eeea3,this[_0x584baa(0x3ff)]=_0x11b56e,this['_revisionService']=_0x42d9e3,this[_0x584baa(0x37d)]=_0x35c6df,this['_univerInstanceService']=_0x2e876b,this[_0x584baa(0x30d)]=_0x2302c0,this[_0x584baa(0x3ab)]=_0x33d700,this[_0x584baa(0x2c5)]=_0x5219a9,this[_0x584baa(0x238)]=_0x44c0f5,this[_0x584baa(0x2e1)]=_0xf74dce,g(this,_0x584baa(0x1cf),new i[(_0x584baa(0x19f))](null)),g(this,_0x584baa(0x2f6),this[_0x584baa(0x1cf)]['asObservable']()),g(this,_0x584baa(0x404),void 0x0),g(this,_0x584baa(0x38a),!0x1),g(this,_0x584baa(0x23e),''),g(this,_0x584baa(0x1f2),0x0),g(this,_0x584baa(0x1b6),this[_0x584baa(0x2f6)][_0x584baa(0x200)]((0x0,i[_0x584baa(0x2fc)])(_0x72fbda=>_0x72fbda?_0x72fbda[_0x584baa(0x218)]:_0x584baa(0x2fa)),(0x0,i['shareReplay'])({'bufferSize':0x1,'refCount':!0x0}))),g(this,_0x584baa(0x33f),!0x1),g(this,_0x584baa(0x265),[]);}async[_0x1de16c(0x399)](){if(this['state'])throw Error('[CollaborationEntity]:\x20initial\x20state\x20has\x20been\x20created\x20before.\x20You\x20should\x20not\x20call\x20\x22init\x22\x20twice.');await this['_init']();}[_0x1de16c(0x2ef)](){const _0x10454a=_0x1de16c;return this['_collaborationPaused']=!0x0,(0x0,t[_0x10454a(0x1db)])(()=>{const _0x272dda=_0x10454a;this[_0x272dda(0x38a)]=!0x1,this[_0x272dda(0x25b)]();});}[_0x1de16c(0x32e)](_0xce831b){const _0x3d1d0c=_0x1de16c;this[_0x3d1d0c(0x1fe)](_0xce831b);}['_updateState'](_0x382200){const _0x3d37f7=_0x1de16c;this[_0x3d37f7(0x404)]=_0x382200,this[_0x3d37f7(0x1cf)][_0x3d37f7(0x286)](_0x382200);}async[_0x1de16c(0x208)](){const _0x9a3175=_0x1de16c;if(this[_0x9a3175(0x3b7)](await this[_0x9a3175(0x263)]()),this[_0x9a3175(0x238)]){var _0x510519;(_0x510519=this[_0x9a3175(0x238)])==null||_0x510519[_0x9a3175(0x392)](this[_0x9a3175(0x378)]),this['disposeWithMe'](this['_singleActiveUnitService'][_0x9a3175(0x132)](this[_0x9a3175(0x378)])[_0x9a3175(0x15c)](_0x442e13=>{const _0x5fbe92=_0x9a3175;this[_0x5fbe92(0x30d)][_0x5fbe92(0x2f2)](_0x5fbe92(0x156),_0x5fbe92(0x33c),_0x442e13),_0x442e13===0x1?(this[_0x5fbe92(0x37d)][_0x5fbe92(0x262)]({'id':_0x5fbe92(0x3c6)}),this[_0x5fbe92(0x2c5)][_0x5fbe92(0x301)](new r['WorkbookEditablePermission'](this[_0x5fbe92(0x378)])['id'],!0x1),this[_0x5fbe92(0x2c5)]['setShowComponents'](!0x1)):(this[_0x5fbe92(0x2c5)]['updatePermissionPoint'](new r['WorkbookEditablePermission'](this['unitID'])['id'],!0x0),this[_0x5fbe92(0x2c5)]['setShowComponents'](!0x0));}));}let _0x56779e=!0x1;return this['disposeWithMe'](this[_0x9a3175(0x380)]['sessionStatus$'][_0x9a3175(0x15c)](_0x1f8cc0=>{const _0x28965b=_0x9a3175;_0x1f8cc0===0x3?this[_0x28965b(0x3dd)](_0x56779e):_0x1f8cc0===0x2&&(_0x56779e=!0x0,this[_0x28965b(0x30e)]());})),this[_0x9a3175(0x3b8)](this[_0x9a3175(0x380)][_0x9a3175(0x201)]['subscribe'](_0x7ad1a8=>{const _0x362456=_0x9a3175;try{switch(_0x7ad1a8['eventID']){case e[_0x362456(0x255)]['NEW_CHANGESETS']:this['_onRemoteChangeset']((0x0,e[_0x362456(0x320)])(_0x7ad1a8[_0x362456(0x2d2)]));break;case e[_0x362456(0x255)][_0x362456(0x3bf)]:this[_0x362456(0x2de)](_0x7ad1a8[_0x362456(0x2d2)]);break;case e[_0x362456(0x255)][_0x362456(0x357)]:this[_0x362456(0x2c1)]();break;case e[_0x362456(0x255)][_0x362456(0x18b)]:this['_onRemoteRetry'](_0x7ad1a8[_0x362456(0x2d2)]);break;case e[_0x362456(0x255)][_0x362456(0x2c8)]:this[_0x362456(0x19a)](_0x7ad1a8[_0x362456(0x2d2)]['changesets'][_0x362456(0x2fc)](_0x52c38e=>(0x0,e[_0x362456(0x320)])(_0x52c38e)));break;case e[_0x362456(0x255)]['PERMISSION_REJ']:this[_0x362456(0x2c1)]({'isPermissionRej':!0x0});break;case e[_0x362456(0x255)][_0x362456(0x26f)]:break;}}catch(_0x4e92ae){throw console['error'](_0x362456(0x409),_0x4e92ae),_0x4e92ae;}})),this['_state'];}[_0x1de16c(0x23f)](){this['_transitionLocked']=!0x1;}['_lockTransition'](){const _0x3a7207=_0x1de16c;if(this[_0x3a7207(0x33f)])throw Error('[CollaborationEntity]:\x20cannot\x20lock\x20transition\x20twice!\x20This\x20is\x20an\x20implementation\x20error,\x20meaning\x20you\x20transit\x20the\x20collaboration\x20state\x20again\x20in\x20the\x20process\x20of\x20a\x20previous\x20transition.\x20This\x20should\x20never\x20happen.');this[_0x3a7207(0x33f)]=!0x0;}[_0x1de16c(0x1fe)](_0x5f707){const _0x2bdd14=_0x1de16c;this[_0x2bdd14(0x1bb)](),this[_0x2bdd14(0x3b7)](this[_0x2bdd14(0x404)][_0x2bdd14(0x21e)](_0x5f707)),this[_0x2bdd14(0x23f)]();}[_0x1de16c(0x376)](_0x48fd39){const _0xb0e5bb=_0x1de16c;if(!(_0x48fd39['revision']<=this[_0xb0e5bb(0x20b)][_0xb0e5bb(0x295)](this[_0xb0e5bb(0x378)]))){if(this[_0xb0e5bb(0x38a)]){this['_remoteChangesetQueue'][_0xb0e5bb(0x186)](_0x48fd39);return;}this['_applyRemoteChangeset'](_0x48fd39);}}[_0x1de16c(0x25b)](){const _0x46f095=_0x1de16c;this[_0x46f095(0x265)]['forEach'](_0x3d03ab=>this[_0x46f095(0x2d1)](_0x3d03ab)),this[_0x46f095(0x265)]=[];}[_0x1de16c(0x2d1)](_0x3d817e){const _0x5b1ed5=_0x1de16c;let _0x76a0a6=this['_compressMutationService'][_0x5b1ed5(0x1c5)][_0x5b1ed5(0x14a)](this[_0x5b1ed5(0x1ba)][_0x5b1ed5(0x1c5)]['getInterceptPoints']()[_0x5b1ed5(0x128)])(_0x3d817e[_0x5b1ed5(0x13f)],null)||_0x3d817e['mutations'],_0x540241={..._0x3d817e,'mutations':_0x76a0a6};this['_lockTransition'](),this[_0x5b1ed5(0x3b7)](this[_0x5b1ed5(0x404)][_0x5b1ed5(0x2e0)](_0x540241)),this[_0x5b1ed5(0x23f)]();}[_0x1de16c(0x2de)](_0x1ef428){const _0x373de5=_0x1de16c;this[_0x373de5(0x1bb)](),this[_0x373de5(0x3b7)](this['_state']['onRemoteAck'](_0x1ef428)),this[_0x373de5(0x23f)]();}[_0x1de16c(0x2c1)](_0x5a2a16){const _0x4c8125=_0x1de16c;this[_0x4c8125(0x1bb)](),this[_0x4c8125(0x3b7)](this['_state'][_0x4c8125(0x3a5)](_0x5a2a16)),this[_0x4c8125(0x23f)]();}['_onRemoteRetry'](_0x4adb34){const _0x50adba=_0x1de16c;this['_lockTransition'](),this[_0x50adba(0x3b7)](this['_state'][_0x50adba(0x28f)](_0x4adb34)),this[_0x50adba(0x23f)]();}['_onFetchMissResult'](_0x36ed0d){const _0x540574=_0x1de16c;if(!(this[_0x540574(0x404)]instanceof I))throw TypeError('[CollaborationEntity]:\x20cannot\x20apply\x20missing\x20results\x20on\x20other\x20states!');let _0x13594c=_0x36ed0d[_0x540574(0x2fc)](_0x442626=>{const _0xef6a5=_0x540574;let _0x19fe62=this[_0xef6a5(0x1ba)][_0xef6a5(0x1c5)][_0xef6a5(0x14a)](this[_0xef6a5(0x1ba)]['interceptor'][_0xef6a5(0x368)]()[_0xef6a5(0x128)])(_0x442626['mutations'],null)||_0x442626[_0xef6a5(0x13f)];return{..._0x442626,'mutations':_0x19fe62};});this[_0x540574(0x1bb)](),this['_updateState'](this[_0x540574(0x404)][_0x540574(0x329)](_0x13594c)),this[_0x540574(0x23f)]();}['_toggleOffline'](){const _0x2af132=_0x1de16c;this[_0x2af132(0x1bb)](),this[_0x2af132(0x3b7)](this[_0x2af132(0x404)]['toggleOffline']()),this['_unlockTransition']();}[_0x1de16c(0x3dd)](_0x1e04e8=!0x1){const _0x5a60a1=_0x1de16c;this[_0x5a60a1(0x1bb)](),this[_0x5a60a1(0x3b7)](this[_0x5a60a1(0x404)][_0x5a60a1(0x127)]()),this[_0x5a60a1(0x23f)]();let _0x194db4=this[_0x5a60a1(0x404)];_0x1e04e8&&_0x194db4 instanceof A&&(this[_0x5a60a1(0x1bb)](),this['_updateState'](_0x194db4[_0x5a60a1(0x14e)]()),this[_0x5a60a1(0x23f)]());}async[_0x1de16c(0x263)](){return new Promise(_0x289a53=>{const _0x333776=_0x3896;this[_0x333776(0x380)]['sessionStatus$'][_0x333776(0x200)]((0x0,i[_0x333776(0x2ed)])(0x1))[_0x333776(0x15c)](async _0x49b754=>{const _0x43bf41=_0x333776;_0x289a53(await this[_0x43bf41(0x223)](_0x49b754===0x3));});});}['_createHandler'](){const _0x3cd7cf=_0x1de16c;let _0x51ab23=this[_0x3cd7cf(0x378)];return{'onStateChange':(_0x5d962c,_0x21cd31)=>{const _0x257ac3=_0x3cd7cf;if(_0x5d962c!==this[_0x257ac3(0x404)])throw Error('[CollaborationEntity]:\x20invalid\x20state\x20transition!\x20State\x20transferred\x20from\x20is\x20not\x20the\x20current\x20state.\x0aBefore:\x20'+_0x5d962c[_0x257ac3(0x218)]+_0x257ac3(0x137)+_0x21cd31[_0x257ac3(0x218)]+_0x257ac3(0x2bc)+this['_state'][_0x257ac3(0x218)]);this['_updateState'](_0x21cd31);},'onSendChangeset':_0xa8b839=>{const _0x1b157c=_0x3cd7cf;_0xa8b839[_0x1b157c(0x3d2)]||(_0xa8b839[_0x1b157c(0x3d2)]=this['_changesetSessionId'],_0xa8b839['reqId']=++this[_0x1b157c(0x1f2)]);let _0x255296={'eventID':e[_0x1b157c(0x255)][_0x1b157c(0x32b)],'data':{'unitID':_0xa8b839[_0x1b157c(0x378)],'unitType':this[_0x1b157c(0x2ac)],'changeset':_0xa8b839,'memberID':this[_0x1b157c(0x380)]['getMemberID']()}};this[_0x1b157c(0x380)][_0x1b157c(0x2d5)](_0x255296,this['unitID']);},'onMissingChangesets':({from:_0x1ae612,to:_0x4486a9})=>{const _0x580078=_0x3cd7cf;this[_0x580078(0x30d)]['debug'](_0x580078(0x156),_0x580078(0x3c1)+_0x1ae612+_0x580078(0x396)+_0x4486a9);let _0x57fad6={'eventID':e[_0x580078(0x255)]['FETCH_MISSING'],'data':{'unitID':_0x51ab23,'unitType':this[_0x580078(0x2ac)],'from':_0x1ae612,'to':_0x4486a9}};this[_0x580078(0x380)]['send'](_0x57fad6,this[_0x580078(0x378)]);}};}async['_createInitialStateImpl'](_0x129552){const _0x53eefe=_0x1de16c;var _0x59ad39,_0x15c913,_0x31e12a;let _0x361cd4=await((_0x59ad39=this[_0x53eefe(0x2e1)])==null?void 0x0:_0x59ad39['loadOfflineData'](this[_0x53eefe(0x378)])),_0x29e58=(_0x15c913=_0x361cd4==null?void 0x0:_0x361cd4['mutations'])==null?[]:_0x15c913,_0x3e21b9=(_0x31e12a=_0x361cd4==null?void 0x0:_0x361cd4[_0x53eefe(0x2f5)])==null?null:_0x31e12a,_0x5b73e2=!!(_0x3e21b9!=null&&_0x3e21b9[_0x53eefe(0x3d2)])&&!!(_0x3e21b9!=null&&_0x3e21b9['reqId']);this[_0x53eefe(0x23e)]=_0x5b73e2?_0x3e21b9[_0x53eefe(0x3d2)]:(0x0,e[_0x53eefe(0x333)])(),this[_0x53eefe(0x1f2)]=_0x5b73e2?_0x3e21b9['reqId']:0x0;let _0x15e7e3=this[_0x53eefe(0x378)];try{this[_0x53eefe(0x3bc)](_0x3e21b9,_0x29e58);}catch(_0x3c3f55){this[_0x53eefe(0x30d)]['error'](_0x3c3f55);}let _0xaede08=this[_0x53eefe(0x312)]();if(_0x129552){let _0x156061=Te(this[_0x53eefe(0x16d)],_0x15e7e3,this[_0x53eefe(0x2ac)],_0x3e21b9,_0x29e58,_0xaede08);return _0x156061 instanceof j?_0x156061[_0x53eefe(0x35e)]():(_0x156061 instanceof N||_0x156061 instanceof M)&&_0x156061[_0x53eefe(0x1be)](),_0x156061;}return this[_0x53eefe(0x16d)][_0x53eefe(0x215)](F,_0x15e7e3,this[_0x53eefe(0x2ac)],_0x3e21b9,_0x29e58,_0xaede08);}['_replayCachedMutations'](_0x41d9d9,_0x39d976){const _0x41c856=_0x1de16c;var _0x2fe3c3,_0x117df6;let _0x1e3b34=this[_0x41c856(0x1ba)][_0x41c856(0x1c5)]['fetchThroughInterceptors'](this[_0x41c856(0x1ba)][_0x41c856(0x1c5)][_0x41c856(0x368)]()[_0x41c856(0x128)]);(_0x2fe3c3=_0x1e3b34((_0x41d9d9==null?void 0x0:_0x41d9d9[_0x41c856(0x13f)])||[],null))==null||_0x2fe3c3['forEach'](_0x2f2ba2=>this['_commandService'][_0x41c856(0x300)](_0x2f2ba2['id'],_0x2f2ba2[_0x41c856(0x3ce)])),(_0x117df6=_0x1e3b34(_0x39d976||[],null))==null||_0x117df6[_0x41c856(0x2f3)](_0x300c3e=>this['_commandService'][_0x41c856(0x300)](_0x300c3e['id'],_0x300c3e[_0x41c856(0x3ce)]));}};L=y([v(0x3,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x25d)])),v(0x4,(0x0,t[_0x1de16c(0x20f)])(e[_0x1de16c(0x160)])),v(0x5,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x297)])),v(0x6,(0x0,t['Inject'])(e[_0x1de16c(0x2eb)])),v(0x7,(0x0,t[_0x1de16c(0x20f)])(_)),v(0x8,t[_0x1de16c(0x1ca)]),v(0x9,t[_0x1de16c(0x243)]),v(0xa,t[_0x1de16c(0x2a8)]),v(0xb,t[_0x1de16c(0x3e7)]),v(0xc,(0x0,t[_0x1de16c(0x37e)])(w)),v(0xd,(0x0,t[_0x1de16c(0x37e)])(S))],L);let R=class extends L{constructor(_0x6a7698,_0x1e029,_0xcb3351,_0x3105ff,_0x4b0b36,_0x3f2f98,_0x1a908f,_0x3c1a0e,_0xb1c8b7,_0x36f4f4,_0x304784,_0x3b7e58,_0x33b4d1,_0x329c5f){const _0x37b5f6=_0x1de16c;super(_0x6a7698,_0xcb3351,_0x1e029,_0x3105ff,_0x4b0b36,_0x3f2f98,_0x1a908f,_0x3c1a0e,_0xb1c8b7,_0x36f4f4,_0x304784,_0x3b7e58,_0x33b4d1,_0x329c5f),this[_0x37b5f6(0x378)]=_0x6a7698,this[_0x37b5f6(0x1a0)]=_0x1e029,g(this,_0x37b5f6(0x1f9),null);}[_0x1de16c(0x181)](_0x1eef9e){const _0x29a11d=_0x1de16c;this[_0x29a11d(0x1f9)]=_0x1eef9e;}['dispose'](){const _0xebd947=_0x1de16c;this[_0xebd947(0x1f9)]=null,super['dispose']();}['_createHandler'](){const _0x37443d=_0x1de16c;let _0x3ebf0f=super[_0x37443d(0x312)]();return _0x3ebf0f['onTransformIME']=_0x12e020=>{const _0x3a1f9b=_0x37443d;var _0x54ce6f,_0x5363f5;return(_0x54ce6f=this['_handlerCallback'])==null||(_0x5363f5=_0x54ce6f[_0x3a1f9b(0x364)])==null?void 0x0:_0x5363f5[_0x3a1f9b(0x21c)](_0x54ce6f,_0x12e020);},_0x3ebf0f[_0x37443d(0x32d)]=_0x57996e=>{const _0x9cad59=_0x37443d;var _0x1a6bf9,_0x3c971f;return(_0x1a6bf9=this[_0x9cad59(0x1f9)])==null||(_0x3c971f=_0x1a6bf9[_0x9cad59(0x32d)])==null?void 0x0:_0x3c971f[_0x9cad59(0x21c)](_0x1a6bf9,_0x57996e);},_0x3ebf0f[_0x37443d(0x2cc)]=_0x1affe9=>{const _0x34409a=_0x37443d;var _0x5b8feb,_0x32cb23;return(_0x5b8feb=this[_0x34409a(0x1f9)])==null||(_0x32cb23=_0x5b8feb[_0x34409a(0x2cc)])==null?void 0x0:_0x32cb23[_0x34409a(0x21c)](_0x5b8feb,_0x1affe9);},_0x3ebf0f[_0x37443d(0x204)]=_0x14e1ca=>{const _0x3df518=_0x37443d;var _0xd95b2e,_0x3fcdbb;return(_0xd95b2e=this[_0x3df518(0x1f9)])==null||(_0x3fcdbb=_0xd95b2e['onSyncEditingCollabCursor'])==null?void 0x0:_0x3fcdbb[_0x3df518(0x21c)](_0xd95b2e,_0x14e1ca);},_0x3ebf0f[_0x37443d(0x1d4)]=_0x30694e=>{const _0x2729b8=_0x37443d;var _0x361719,_0x3b1f33,_0x31628c;if(!((_0x361719=this[_0x2729b8(0x1f9)])!=null&&_0x361719[_0x2729b8(0x1d4)]))throw Error(_0x2729b8(0x241));return(_0x3b1f33=this['_handlerCallback'])==null||(_0x31628c=_0x3b1f33[_0x2729b8(0x1d4)])==null?void 0x0:_0x31628c[_0x2729b8(0x21c)](_0x3b1f33,_0x30694e);},_0x3ebf0f['onTransformRemoteChangesetByStateCache']=_0x5ec831=>{const _0x16b77d=_0x37443d;var _0x596e8b,_0x26a2b4,_0x2d3865;if(!((_0x596e8b=this[_0x16b77d(0x1f9)])!=null&&_0x596e8b[_0x16b77d(0x3d8)]))throw Error(_0x16b77d(0x2fd));return(_0x26a2b4=this[_0x16b77d(0x1f9)])==null||(_0x2d3865=_0x26a2b4[_0x16b77d(0x3d8)])==null?void 0x0:_0x2d3865[_0x16b77d(0x21c)](_0x26a2b4,_0x5ec831);},_0x3ebf0f;}async[_0x1de16c(0x208)](){const _0x50a0af=_0x1de16c;let _0x3850cd=await super[_0x50a0af(0x208)]();return this[_0x50a0af(0x3b8)](this['_commandService'][_0x50a0af(0x313)]((_0x437e6f,_0x3bab39)=>{const _0xb01300=_0x50a0af;if(_0x437e6f['type']!==t[_0xb01300(0x267)][_0xb01300(0x37c)]||_0x3bab39!=null&&_0x3bab39[_0xb01300(0x299)]||_0x3bab39!=null&&_0x3bab39[_0xb01300(0x296)]||_0x437e6f['id']===n['RichTextEditingMutation']['id'])return;let _0x38a228=_0x437e6f[_0xb01300(0x3ce)];if((_0x38a228==null?void 0x0:_0x38a228[_0xb01300(0x2c9)])!==this['unitID'])return;let _0x587383=_0x437e6f,_0x69312d=this['_compressMutationService'][_0xb01300(0x1c5)][_0xb01300(0x14a)](this[_0xb01300(0x1ba)][_0xb01300(0x1c5)][_0xb01300(0x368)]()['COMPRESS_MUTATION_SEND'])([_0x587383],this[_0xb01300(0x2a7)])||[_0x587383];this[_0xb01300(0x1fe)](_0x69312d[0x0]);})),_0x3850cd;}};R=y([v(0x3,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x25d)])),v(0x4,(0x0,t[_0x1de16c(0x20f)])(e[_0x1de16c(0x160)])),v(0x5,(0x0,t['Inject'])(t[_0x1de16c(0x297)])),v(0x6,(0x0,t[_0x1de16c(0x20f)])(e[_0x1de16c(0x2eb)])),v(0x7,(0x0,t[_0x1de16c(0x20f)])(_)),v(0x8,t[_0x1de16c(0x1ca)]),v(0x9,t[_0x1de16c(0x243)]),v(0xa,t[_0x1de16c(0x2a8)]),v(0xb,t[_0x1de16c(0x3e7)]),v(0xc,(0x0,t['Optional'])(w)),v(0xd,(0x0,t[_0x1de16c(0x37e)])(S))],R);let z=class extends L{constructor(_0x2e7a91,_0x1b4f5d,_0x19bf01,_0x486c3d,_0x58d054,_0x20f3a0,_0x1fb48c,_0x4439a5,_0x37e1e8,_0x353ddb,_0x59b6b0,_0x3c8d82,_0x4c0158,_0x5bcb09,_0x35adba){const _0xf0dbe=_0x1de16c;super(_0x2e7a91,_0x19bf01,_0x1b4f5d,_0x486c3d,_0x58d054,_0x20f3a0,_0x1fb48c,_0x37e1e8,_0x353ddb,_0x59b6b0,_0x3c8d82,_0x4c0158,_0x5bcb09,_0x35adba),this['unitID']=_0x2e7a91,this[_0xf0dbe(0x1a0)]=_0x1b4f5d,this[_0xf0dbe(0x221)]=_0x4439a5;}['_createHandler'](){const _0x472d6e=_0x1de16c;let _0x33026d=super[_0x472d6e(0x312)]();return _0x33026d[_0x472d6e(0x2cc)]=_0x10d9f2=>this[_0x472d6e(0x221)][_0x472d6e(0x3ea)](_0x10d9f2),_0x33026d;}async[_0x1de16c(0x208)](){const _0x15e563=_0x1de16c;let _0x27225d=await super[_0x15e563(0x208)]();return this['disposeWithMe'](this[_0x15e563(0x3ab)][_0x15e563(0x313)]((_0x3cbd84,_0x21f3f1)=>{const _0x18356f=_0x15e563;if(_0x3cbd84['type']!==t[_0x18356f(0x267)][_0x18356f(0x37c)]||_0x21f3f1!=null&&_0x21f3f1['fromCollab']||_0x21f3f1!=null&&_0x21f3f1[_0x18356f(0x296)])return;let _0x536928=_0x3cbd84[_0x18356f(0x3ce)];if((_0x536928==null?void 0x0:_0x536928[_0x18356f(0x2c9)])!==this[_0x18356f(0x378)])return;let _0x47451f=_0x3cbd84,_0x2e513d=this[_0x18356f(0x1ba)][_0x18356f(0x1c5)][_0x18356f(0x14a)](this[_0x18356f(0x1ba)][_0x18356f(0x1c5)][_0x18356f(0x368)]()['COMPRESS_MUTATION_SEND'])([_0x47451f],this['_univerInstanceService'])||[_0x47451f];this[_0x18356f(0x1fe)](_0x2e513d[0x0]);})),_0x27225d;}};z=y([v(0x3,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x25d)])),v(0x4,(0x0,t['Inject'])(e[_0x1de16c(0x160)])),v(0x5,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x297)])),v(0x6,(0x0,t['Inject'])(e['RevisionService'])),v(0x7,(0x0,t[_0x1de16c(0x20f)])(C)),v(0x8,(0x0,t[_0x1de16c(0x20f)])(_)),v(0x9,t[_0x1de16c(0x1ca)]),v(0xa,t[_0x1de16c(0x243)]),v(0xb,t[_0x1de16c(0x2a8)]),v(0xc,t[_0x1de16c(0x3e7)]),v(0xd,(0x0,t[_0x1de16c(0x37e)])(w)),v(0xe,(0x0,t['Optional'])(S))],z);const Ee=(0x0,t[_0x1de16c(0x26b)])(_0x1de16c(0x30b));function De(_0x3ae757){const _0x4b89ce=_0x1de16c;let _0x1ff9e5=_0x3ae757[_0x4b89ce(0x2d2)],_0x1e1c6c=JSON[_0x4b89ce(0x28b)](_0x1ff9e5);switch(_0x1e1c6c['cmd']){case a['CombCmd']['HEARTBEAT']:case a['CombCmd'][_0x4b89ce(0x354)]:{let _0x153540=_0x1e1c6c[_0x4b89ce(0x1dd)];return{..._0x1e1c6c,'data':_0x153540,'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};}case a[_0x4b89ce(0x3ae)][_0x4b89ce(0x220)]:{let _0x57f7d0=_0x1e1c6c[_0x4b89ce(0x2f9)];return{..._0x1e1c6c,'data':_0x57f7d0,'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};}case a[_0x4b89ce(0x3ae)][_0x4b89ce(0x3f7)]:{let _0x38be0e=_0x1e1c6c[_0x4b89ce(0x25f)];switch(_0x38be0e['eventID']){case e[_0x4b89ce(0x255)][_0x4b89ce(0x195)]:var _0x95cf62;return{..._0x1e1c6c,'data':{..._0x38be0e,'data':(_0x95cf62=_0x38be0e['permissionRejEvent'])==null?void 0x0:_0x95cf62['cs']},'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};case e[_0x4b89ce(0x255)][_0x4b89ce(0x3bf)]:var _0x5fd1a4;return{..._0x1e1c6c,'data':{..._0x38be0e,'data':(_0x5fd1a4=_0x38be0e[_0x4b89ce(0x193)])==null?void 0x0:_0x5fd1a4['cs']},'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};case e[_0x4b89ce(0x255)]['NEW_CHANGESETS']:var _0x573266;return{..._0x1e1c6c,'data':{..._0x38be0e,'data':(_0x573266=_0x38be0e[_0x4b89ce(0x251)])==null?void 0x0:_0x573266['cs']},'cmd':_0x1e1c6c['cmd']};case e[_0x4b89ce(0x255)]['CHANGESET_REJ']:var _0x3a3e9c;return{..._0x1e1c6c,'data':{..._0x38be0e,'data':(_0x3a3e9c=_0x38be0e[_0x4b89ce(0x2df)])==null?void 0x0:_0x3a3e9c['cs']},'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};case e[_0x4b89ce(0x255)][_0x4b89ce(0x18b)]:var _0x56297c;return{..._0x1e1c6c,'data':{..._0x38be0e,'data':(_0x56297c=_0x38be0e[_0x4b89ce(0x244)])==null?void 0x0:_0x56297c['cs']},'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};case e[_0x4b89ce(0x255)]['UPDATE_CURSOR']:return{..._0x1e1c6c,'data':{..._0x38be0e,'data':_0x38be0e[_0x4b89ce(0x37b)]},'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};case e[_0x4b89ce(0x255)]['USERS_ENTER']:return{..._0x1e1c6c,'data':{..._0x38be0e,'data':_0x38be0e[_0x4b89ce(0x141)]},'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};case e[_0x4b89ce(0x255)][_0x4b89ce(0x2dc)]:return{..._0x1e1c6c,'data':{..._0x38be0e,'data':_0x38be0e[_0x4b89ce(0x165)]},'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};case e[_0x4b89ce(0x255)]['LIVESHARE_NEW_HOST']:return{..._0x1e1c6c,'data':{..._0x38be0e,'data':_0x38be0e['liveShareNewHost']},'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};case e[_0x4b89ce(0x255)][_0x4b89ce(0x264)]:case e[_0x4b89ce(0x255)]['LIVESHARE_OPERATION']:return{..._0x1e1c6c,'data':{..._0x38be0e,'data':_0x38be0e[_0x4b89ce(0x1e5)]},'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};case e[_0x4b89ce(0x255)][_0x4b89ce(0x3cd)]:return{..._0x1e1c6c,'data':{..._0x38be0e,'data':_0x38be0e['liveShareNewHost']},'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};case e['CollaborationEvent'][_0x4b89ce(0x3f2)]:return{..._0x1e1c6c,'data':_0x38be0e,'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};case e['CollaborationEvent'][_0x4b89ce(0x1e7)]:return{..._0x1e1c6c,'data':{..._0x38be0e,'data':_0x38be0e[_0x4b89ce(0x34a)]},'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};case e['CollaborationEvent'][_0x4b89ce(0x344)]:return{..._0x1e1c6c,'data':{..._0x38be0e,'data':_0x38be0e[_0x4b89ce(0x268)]},'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};case e[_0x4b89ce(0x255)][_0x4b89ce(0x3fe)]:return{..._0x1e1c6c,'data':{..._0x38be0e,'data':_0x38be0e[_0x4b89ce(0x2e3)]},'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};case e[_0x4b89ce(0x255)][_0x4b89ce(0x26f)]:return{..._0x1e1c6c,'data':{..._0x38be0e,'data':_0x38be0e[_0x4b89ce(0x287)]},'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};default:return _0x1e1c6c;}}default:return _0x1e1c6c;}}function Oe(_0x2f64ee){const _0x15ee8a=_0x1de16c;switch(_0x2f64ee[_0x15ee8a(0x2e6)]){case a[_0x15ee8a(0x3ae)][_0x15ee8a(0x3d0)]:case a[_0x15ee8a(0x3ae)][_0x15ee8a(0x354)]:return JSON[_0x15ee8a(0x2d8)]({'cmd':_0x2f64ee['cmd'],'routeKey':_0x2f64ee[_0x15ee8a(0x3f8)]});case a[_0x15ee8a(0x3ae)][_0x15ee8a(0x212)]:{let _0x1732d0;switch(_0x2f64ee['data'][_0x15ee8a(0x26d)]){case e[_0x15ee8a(0x255)][_0x15ee8a(0x3b1)]:_0x1732d0={'eventID':e['CollaborationEvent'][_0x15ee8a(0x3b1)],'updateCursorEvent':_0x2f64ee[_0x15ee8a(0x2d2)][_0x15ee8a(0x2d2)]};break;case e[_0x15ee8a(0x255)][_0x15ee8a(0x2dc)]:_0x1732d0={'eventID':e[_0x15ee8a(0x255)]['USERS_LEAVE'],'leaveEvent':_0x2f64ee[_0x15ee8a(0x2d2)][_0x15ee8a(0x2d2)]};break;case e[_0x15ee8a(0x255)][_0x15ee8a(0x318)]:_0x1732d0={'eventID':e['CollaborationEvent'][_0x15ee8a(0x318)],'joinEvent':_0x2f64ee[_0x15ee8a(0x2d2)][_0x15ee8a(0x2d2)]};break;case e[_0x15ee8a(0x255)][_0x15ee8a(0x3b9)]:_0x1732d0={'eventID':e['CollaborationEvent']['LIVESHARE_NEW_HOST'],'liveShareNewHost':_0x2f64ee[_0x15ee8a(0x2d2)][_0x15ee8a(0x2d2)]};break;case e[_0x15ee8a(0x255)][_0x15ee8a(0x20d)]:_0x1732d0={'eventID':e[_0x15ee8a(0x255)][_0x15ee8a(0x20d)],'liveShareOperation':_0x2f64ee[_0x15ee8a(0x2d2)][_0x15ee8a(0x2d2)]};break;case e[_0x15ee8a(0x255)]['LIVESHARE_TERMINATE']:_0x1732d0={'eventID':e[_0x15ee8a(0x255)][_0x15ee8a(0x3cd)],'liveShareTerminate':_0x2f64ee[_0x15ee8a(0x2d2)][_0x15ee8a(0x2d2)]};break;case e[_0x15ee8a(0x255)][_0x15ee8a(0x1bd)]:_0x1732d0={'eventID':e['CollaborationEvent'][_0x15ee8a(0x1bd)],'liveShareRequestHost':_0x2f64ee[_0x15ee8a(0x2d2)][_0x15ee8a(0x2d2)]};break;case e[_0x15ee8a(0x255)][_0x15ee8a(0x264)]:_0x1732d0={'eventID':e[_0x15ee8a(0x255)]['LIVESHARE_FETCH_OPERATIONS']};break;default:_0x1732d0={'eventID':_0x2f64ee['data'][_0x15ee8a(0x26d)]};}return JSON[_0x15ee8a(0x2d8)]({'cmd':_0x2f64ee[_0x15ee8a(0x2e6)],'routeKey':_0x2f64ee[_0x15ee8a(0x3f8)],'collaMsg':_0x1732d0});}case a['CombCmd']['JOIN']:return JSON[_0x15ee8a(0x2d8)]({'cmd':_0x2f64ee[_0x15ee8a(0x2e6)],'routeKey':_0x2f64ee['routeKey'],'joinReq':_0x2f64ee['data']});case a[_0x15ee8a(0x3ae)]['LEAVE']:return JSON['stringify']({'cmd':_0x2f64ee['cmd'],'routeKey':_0x2f64ee['routeKey'],'leaveReq':_0x2f64ee[_0x15ee8a(0x2d2)]});default:throw Error(_0x15ee8a(0x191));}}const B=(0x0,t['createIdentifier'])(_0x1de16c(0x3ca));function ke(_0x2fd6b3,_0x47e019,_0x11a8eb){const _0x485d2b=_0x1de16c;return _0x2fd6b3+'/'+_0x47e019+_0x485d2b(0x192)+_0x11a8eb+_0x485d2b(0x1f1);}let V=class extends t['Disposable']{constructor(_0x5c980f,_0x1f8556,_0x1561fc,_0x3b2fa2,_0x57b143){const _0x16867d=_0x1de16c;super(),this[_0x16867d(0x16d)]=_0x5c980f,this[_0x16867d(0x367)]=_0x1f8556,this[_0x16867d(0x2aa)]=_0x1561fc,this[_0x16867d(0x30d)]=_0x3b2fa2,this[_0x16867d(0x229)]=_0x57b143;}[_0x1de16c(0x205)](_0x19c4ab){const _0x5dc969=_0x1de16c;let _0x46c011=this[_0x5dc969(0x16d)][_0x5dc969(0x373)](c['ISocketService']);if(!_0x46c011)throw Error(_0x5dc969(0x1c8));let _0x4b1387=_0x46c011[_0x5dc969(0x1a1)](_0x19c4ab);if(!_0x4b1387)throw Error('[CollaborationSocketService]:\x20failed\x20to\x20create\x20socket!');let _0x341001=new t[(_0x5dc969(0x157))](),_0x214276=new i['Subject']();_0x341001[_0x5dc969(0x27f)](_0x4b1387[_0x5dc969(0x26c)][_0x5dc969(0x15c)](_0x47999f=>_0x214276[_0x5dc969(0x286)](_0x47999f))),_0x341001[_0x5dc969(0x27f)]((0x0,t[_0x5dc969(0x1db)])(()=>_0x214276[_0x5dc969(0x183)]()));let _0xb38224=new i[(_0x5dc969(0x3c5))]();_0x341001[_0x5dc969(0x27f)](_0x4b1387['error$'][_0x5dc969(0x15c)](_0x240fe1=>_0xb38224[_0x5dc969(0x286)](_0x240fe1))),_0x341001[_0x5dc969(0x27f)]((0x0,t['toDisposable'])(()=>_0xb38224[_0x5dc969(0x183)]()));let _0x1295b4=new i[(_0x5dc969(0x3c5))]();_0x341001[_0x5dc969(0x27f)](_0x4b1387['message$'][_0x5dc969(0x15c)](_0x392365=>{const _0x33c86e=_0x5dc969;let _0x357e8e=De(_0x392365);_0x1295b4[_0x33c86e(0x286)](_0x357e8e);})),_0x341001[_0x5dc969(0x27f)]((0x0,t[_0x5dc969(0x1db)])(()=>_0x1295b4[_0x5dc969(0x183)]()));let _0x2531fa,_0x12d7bf=()=>{const _0x220560=_0x5dc969;_0xb38224[_0x220560(0x286)](new Event(_0x220560(0x23d))),_0x214276[_0x220560(0x286)](new Event(_0x220560(0x23d))),_0x2531fa[_0x220560(0x261)]();};return _0x2531fa={'memberID':'','close$':_0x214276[_0x5dc969(0x1ea)](),'error$':_0xb38224[_0x5dc969(0x1ea)](),'open$':_0x4b1387[_0x5dc969(0x327)],'message$':_0x1295b4[_0x5dc969(0x1ea)](),'send':_0x4e8561=>{const _0x5f1563=_0x5dc969;if(_0x4e8561[_0x5f1563(0x2e6)]===a[_0x5f1563(0x3ae)]['INGEST']){if(_0x4e8561[_0x5f1563(0x2d2)][_0x5f1563(0x26d)]===e[_0x5f1563(0x255)]['SUBMIT_CHANGESET']){this['_submitChangeset'](_0x2531fa,_0x4e8561[_0x5f1563(0x2d2)])[_0x5f1563(0x158)](_0x33fafd=>{const _0x27bcc0=_0x5f1563;this[_0x27bcc0(0x30d)][_0x27bcc0(0x1e3)](_0x33fafd),_0x12d7bf();});return;}if(_0x4e8561[_0x5f1563(0x2d2)][_0x5f1563(0x26d)]===e[_0x5f1563(0x255)][_0x5f1563(0x24b)]){let _0x945b39=_0x4e8561[_0x5f1563(0x2d2)];this[_0x5f1563(0x224)](_0x945b39)[_0x5f1563(0x129)](_0x3d77fc=>{const _0x3b8a0b=_0x5f1563;_0x1295b4[_0x3b8a0b(0x286)]({'cmd':a[_0x3b8a0b(0x3ae)]['RECV'],'code':a['CmdRspCode']['OK'],'routeKey':_0x945b39['data'][_0x3b8a0b(0x378)],'routeType':'','data':{'eventID':e[_0x3b8a0b(0x255)][_0x3b8a0b(0x2c8)],'data':{'changesets':_0x3d77fc}}});})[_0x5f1563(0x158)](_0x5dad21=>{const _0x24e1c9=_0x5f1563;this[_0x24e1c9(0x30d)][_0x24e1c9(0x1e3)](_0x5dad21),_0x12d7bf();});return;}}_0x4b1387[_0x5f1563(0x2d5)](Oe(_0x4e8561));},'close':()=>{const _0x31ae67=_0x5dc969;_0x4b1387[_0x31ae67(0x261)](),_0x341001[_0x31ae67(0x317)]();}},_0x2531fa;}async[_0x1de16c(0x33a)](_0x53d791,_0x4a0fb0){const _0x2942a8=_0x1de16c;var _0x1531c8;let {unitType:_0x3667a4,unitID:_0xd45dac,changeset:_0x5bdb74}=_0x4a0fb0[_0x2942a8(0x2d2)],_0x402c25={'unitID':_0xd45dac,'memberID':_0x53d791[_0x2942a8(0x33e)],'type':_0x3667a4,'changeset':(0x0,e[_0x2942a8(0x339)])(_0x5bdb74)},_0x45fdb8=this[_0x2942a8(0x2aa)][_0x2942a8(0x26a)](T),_0x37f199=ke((_0x1531c8=_0x45fdb8==null?void 0x0:_0x45fdb8[_0x2942a8(0x24e)])==null?'/universer-api/comb':_0x1531c8,_0x3667a4,_0xd45dac);try{await this[_0x2942a8(0x367)][_0x2942a8(0x154)](_0x37f199,{'body':_0x402c25});}catch(_0x66aa70){throw this['_logService']['error'](_0x2942a8(0x12e),'submit\x20changeset\x20error!'),_0x66aa70;}}async[_0x1de16c(0x224)](_0x1a6cd8){const _0x41c314=_0x1de16c;let {unitID:_0x329e9b,from:_0x3d9606,to:_0x3258b5,unitType:_0x2910bb}=_0x1a6cd8['data'];return(await this[_0x41c314(0x229)][_0x41c314(0x1b9)]({'metadata':void 0x0},{'unitID':_0x329e9b,'type':_0x2910bb,'from':_0x3d9606,'to':_0x3258b5}))['changesets']['map'](_0x3f7a55=>((_0x3f7a55[_0x41c314(0x13f)]===null||_0x3f7a55[_0x41c314(0x13f)]===void 0x0)&&(_0x3f7a55['mutations']=[]),_0x3f7a55));}};V=y([v(0x0,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x25d)])),v(0x1,(0x0,t['Inject'])(c[_0x1de16c(0x14d)])),v(0x2,t[_0x1de16c(0x3cb)]),v(0x3,t[_0x1de16c(0x243)]),v(0x4,e[_0x1de16c(0x35a)])],V);let H=class extends t[_0x1de16c(0x1d2)]{get['_socket'](){return this['_socket$']['getValue']();}constructor(_0x1430b0,_0x103065,_0x43b11b,_0x419d0c,_0x18353e,_0x3a9d7e){const _0xc258cc=_0x1de16c;super(),this[_0xc258cc(0x16d)]=_0x1430b0,this[_0xc258cc(0x30d)]=_0x103065,this['_configService']=_0x43b11b,this[_0xc258cc(0x17a)]=_0x419d0c,this[_0xc258cc(0x3f4)]=_0x18353e,this[_0xc258cc(0x164)]=_0x3a9d7e,g(this,_0xc258cc(0x246),new i['BehaviorSubject'](void 0x0)),g(this,_0xc258cc(0x25e),this[_0xc258cc(0x246)]['asObservable']()),g(this,_0xc258cc(0x390),null),g(this,'_sessions',new Map()),g(this,_0xc258cc(0x1a2),new i[(_0xc258cc(0x19f))](0x0)),g(this,_0xc258cc(0x1b6),this[_0xc258cc(0x1a2)][_0xc258cc(0x1ea)]()),g(this,'_socketReady',!0x1),g(this,_0xc258cc(0x38d),void 0x0),g(this,_0xc258cc(0x12a),0x0),g(this,_0xc258cc(0x21b),null),g(this,'_sendHeartbeatTimer',void 0x0),g(this,_0xc258cc(0x328),void 0x0),this[_0xc258cc(0x3c0)]();}[_0x1de16c(0x3c0)](){const _0x3934f8=_0x1de16c;this[_0x3934f8(0x164)]&&this[_0x3934f8(0x3b8)](this['_networkConditionService'][_0x3934f8(0x3d5)][_0x3934f8(0x15c)](_0x254dff=>{const _0xe00e6e=_0x3934f8;_0x254dff&&!this[_0xe00e6e(0x260)]&&this['reconnect'](),_0x254dff||this[_0xe00e6e(0x29d)]();}));}['dispose'](){const _0x1173fa=_0x1de16c;var _0x1f55db;super[_0x1173fa(0x317)](),(_0x1f55db=this['_socketMessageSubscription'])==null||_0x1f55db[_0x1173fa(0x21f)](),this['_socketMessageSubscription']=null,this['_clearRetryConnectingTimer'](),this[_0x1173fa(0x361)](),this[_0x1173fa(0x2bf)](),this[_0x1173fa(0x2b9)][_0x1173fa(0x2f3)](_0x385d36=>_0x385d36[_0x1173fa(0x317)]()),this[_0x1173fa(0x2b9)]['clear'](),this['_status$']['complete']();}async['requireSession'](_0x58b369){const _0x5e1722=_0x1de16c;if(this[_0x5e1722(0x2b9)][_0x5e1722(0x1c7)](_0x58b369))return this[_0x5e1722(0x2b9)]['get'](_0x58b369);this[_0x5e1722(0x1e9)]();let _0x1ef680=this[_0x5e1722(0x16d)][_0x5e1722(0x215)](x,_0x58b369,this[_0x5e1722(0x246)]['asObservable']());return this[_0x5e1722(0x2b9)][_0x5e1722(0x248)](_0x58b369,_0x1ef680),_0x1ef680;}['closeSession'](_0x35b74b){const _0x283f53=_0x1de16c;let _0x27f914=this['_sessions']['get'](_0x35b74b);if(_0x27f914&&(this['_sessions'][_0x283f53(0x1d7)](_0x35b74b),_0x27f914[_0x283f53(0x261)]()),!this[_0x283f53(0x2b9)][_0x283f53(0x372)]){var _0x17875e;(_0x17875e=this[_0x283f53(0x260)])==null||_0x17875e[_0x283f53(0x261)]();}}['reconnect'](){const _0x415738=_0x1de16c;this[_0x415738(0x12a)]=0x0,this[_0x415738(0x203)](),this[_0x415738(0x2cf)]();}[_0x1de16c(0x203)](){const _0xd01b64=_0x1de16c;this[_0xd01b64(0x38d)]!=null&&(clearTimeout(this[_0xd01b64(0x38d)]),this['_retryConnectingTimer']=null);}async[_0x1de16c(0x199)](){const _0x1a019d=_0x1de16c;var _0x46a296;let _0x511446=this[_0x1a019d(0x2aa)]['getConfig'](T),_0xa3caa1=(_0x46a296=_0x511446==null?void 0x0:_0x511446['collabWebSocketUrl'])==null?p:_0x46a296,_0x33aedf=await this[_0x1a019d(0x17a)][_0x1a019d(0x1a1)](_0xa3caa1);return this[_0x1a019d(0x390)]=_0x33aedf,_0x33aedf;}async[_0x1de16c(0x1e9)](){const _0x57e28b=_0x1de16c;try{var _0xda6eea,_0x889418;let _0x4e829f=(_0xda6eea=(_0x889418=this[_0x57e28b(0x260)])==null?this[_0x57e28b(0x390)]:_0x889418)==null?await this[_0x57e28b(0x199)]():_0xda6eea;if(_0x4e829f){var _0x33a407;let _0x6bc1dd=_0x4e829f[_0x57e28b(0x2d5)];_0x4e829f['send']=_0x431fae=>(_0x431fae[_0x57e28b(0x2e6)]!==a[_0x57e28b(0x3ae)]['LEAVE']&&this['_rescheduleHeartbeat'](),_0x6bc1dd[_0x57e28b(0x245)](_0x4e829f,[_0x431fae])),(_0x33a407=this[_0x57e28b(0x21b)])==null||_0x33a407['unsubscribe'](),this[_0x57e28b(0x21b)]=null,this[_0x57e28b(0x21b)]=_0x4e829f[_0x57e28b(0x252)][_0x57e28b(0x15c)](_0x14adb0=>this[_0x57e28b(0x32f)](_0x4e829f,_0x14adb0)),_0x4e829f['error$'][_0x57e28b(0x200)]((0x0,s[_0x57e28b(0x2ed)])(0x1))[_0x57e28b(0x15c)](_0x4a1220=>this['_logService'][_0x57e28b(0x1e3)](_0x57e28b(0x393),_0x4a1220)),_0x4e829f['open$'][_0x57e28b(0x200)]((0x0,s['take'])(0x1))['subscribe'](()=>{this['_onConnectionOpen'](_0x4e829f);}),_0x4e829f[_0x57e28b(0x26c)][_0x57e28b(0x200)]((0x0,s[_0x57e28b(0x2ed)])(0x1))['subscribe'](_0xe4bdaa=>{const _0x111648=_0x57e28b;this[_0x111648(0x30d)][_0x111648(0x2f2)](_0x111648(0x1c6),_0x111648(0x2cd),_0xe4bdaa),this['_onConnectionFailed']();});}}catch(_0x17e9e9){this[_0x57e28b(0x30d)]['error'](_0x17e9e9),this[_0x57e28b(0x250)]();}}['_onConnectionOpen'](_0x92d643){const _0x409b59=_0x1de16c;this[_0x409b59(0x30d)][_0x409b59(0x2f2)](_0x409b59(0x1c6),_0x409b59(0x1a5)),_0x92d643[_0x409b59(0x2d5)]({'cmd':a[_0x409b59(0x3ae)][_0x409b59(0x354)]}),this[_0x409b59(0x38c)]();}[_0x1de16c(0x29d)](){const _0x14251c=_0x1de16c;this[_0x14251c(0x384)]=!0x1,this[_0x14251c(0x390)]=null,this[_0x14251c(0x1a2)][_0x14251c(0x286)](0x2),this[_0x14251c(0x246)][_0x14251c(0x286)](null),this[_0x14251c(0x361)](),this[_0x14251c(0x2bf)]();}['_onConnectionFailed'](){const _0x3649a6=_0x1de16c;var _0x3dfa8b;this[_0x3649a6(0x29d)](),this['_retryCount']<((_0x3dfa8b=this[_0x3649a6(0x2aa)][_0x3649a6(0x26a)](_0x3649a6(0x358)))==null?0x3:_0x3dfa8b)?(this[_0x3649a6(0x3f4)][_0x3649a6(0x262)]({'id':'SOCKET_FAILED_RETRY'}),this['_tryReconnect']()):this[_0x3649a6(0x3f4)][_0x3649a6(0x262)]({'id':_0x3649a6(0x1fa)});}[_0x1de16c(0x2cf)](){const _0x57da91=_0x1de16c;var _0x40251d;let _0x325cbe=this[_0x57da91(0x12a)],_0x1088cd=this[_0x57da91(0x2aa)]['getConfig'](T),_0xcde651=_0x325cbe===0x0?0x0:((_0x40251d=_0x1088cd==null?void 0x0:_0x1088cd[_0x57da91(0x1fd)])==null?0x4e20:_0x40251d)*0x2**_0x325cbe;this[_0x57da91(0x38d)]=setTimeout(()=>{const _0x26433f=_0x57da91;clearTimeout(this['_retryConnectingTimer']),this[_0x26433f(0x38d)]=null,this['_tryEnsureSocket']();},_0xcde651),this[_0x57da91(0x12a)]+=0x1;}[_0x1de16c(0x32f)](_0x367408,_0x2f6ba6){const _0x1ccda8=_0x1de16c;let {cmd:_0x3cf819}=_0x2f6ba6;_0x3cf819===a[_0x1ccda8(0x3ae)][_0x1ccda8(0x354)]&&!this[_0x1ccda8(0x384)]&&(_0x367408[_0x1ccda8(0x33e)]=_0x2f6ba6[_0x1ccda8(0x2d2)][_0x1ccda8(0x33e)],this[_0x1ccda8(0x246)]['next'](_0x367408),this['_status$']['next'](0x3),this[_0x1ccda8(0x384)]=!0x0,this[_0x1ccda8(0x390)]=null),_0x3cf819===a[_0x1ccda8(0x3ae)][_0x1ccda8(0x3d0)]&&this[_0x1ccda8(0x361)](),this[_0x1ccda8(0x38c)]();}[_0x1de16c(0x38c)](){const _0x4417b9=_0x1de16c;var _0x36176c;this[_0x4417b9(0x2bf)](),this[_0x4417b9(0x1ec)]=setTimeout(()=>this[_0x4417b9(0x1ee)](),(_0x36176c=this[_0x4417b9(0x2aa)][_0x4417b9(0x26a)](_0x4417b9(0x143)))==null?0x7530:_0x36176c);}[_0x1de16c(0x1ee)](){const _0x5a1cfd=_0x1de16c;this['_socket'][_0x5a1cfd(0x2d5)]({'cmd':a[_0x5a1cfd(0x3ae)][_0x5a1cfd(0x3d0)]}),this[_0x5a1cfd(0x28d)]();}[_0x1de16c(0x28d)](){const _0xf497ef=_0x1de16c;var _0x9f5212;this[_0xf497ef(0x328)]=setTimeout(()=>this[_0xf497ef(0x250)](),(_0x9f5212=this[_0xf497ef(0x2aa)][_0xf497ef(0x26a)]('HEARTBEAT_TIMEOUT'))==null?m:_0x9f5212);}['_clearHeartbeatTimer'](){const _0x354d30=_0x1de16c;this['_sendHeartbeatTimer']!=null&&(clearTimeout(this[_0x354d30(0x1ec)]),this['_sendHeartbeatTimer']=null);}[_0x1de16c(0x361)](){const _0x171f9b=_0x1de16c;this[_0x171f9b(0x328)]!=null&&(clearTimeout(this[_0x171f9b(0x328)]),this[_0x171f9b(0x328)]=null);}};H=y([v(0x0,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x25d)])),v(0x1,t['ILogService']),v(0x2,t[_0x1de16c(0x3cb)]),v(0x3,B),v(0x4,(0x0,t[_0x1de16c(0x20f)])(_)),v(0x5,(0x0,t['Optional'])(Ee))],H);let U=class extends t[_0x1de16c(0x1f0)]{constructor(_0x29cfc0,_0x542124,_0x52280e,_0x2440c6){const _0x34d5b2=_0x1de16c;var _0x192a07;super(),this['_injector']=_0x29cfc0,this[_0x34d5b2(0x32a)]=_0x542124,this[_0x34d5b2(0x2aa)]=_0x52280e,this[_0x34d5b2(0x2a7)]=_0x2440c6,g(this,'_entities',new Map()),g(this,_0x34d5b2(0x352),new i[(_0x34d5b2(0x3c5))]()),g(this,'entityInit$',this[_0x34d5b2(0x352)][_0x34d5b2(0x1ea)]()),((_0x192a07=this['_configService'][_0x34d5b2(0x26a)](_0x34d5b2(0x2dd)))==null?void 0x0:_0x192a07[_0x34d5b2(0x1dc)])!==!0x1&&this[_0x34d5b2(0x208)]();}[_0x1de16c(0x317)](){const _0x2115d4=_0x1de16c;super[_0x2115d4(0x317)](),this[_0x2115d4(0x27a)]['forEach'](_0x473863=>_0x473863[_0x2115d4(0x317)]()),this[_0x2115d4(0x27a)][_0x2115d4(0x12f)]();}[_0x1de16c(0x306)](_0x3e039c){const _0x33bcfb=_0x1de16c;var _0x3babad;return(_0x3babad=this[_0x33bcfb(0x27a)][_0x33bcfb(0x373)](_0x3e039c))==null?null:_0x3babad;}[_0x1de16c(0x3a6)](_0x1d6baf){const _0x2ba52c=_0x1de16c;let _0x37dd0c=this[_0x2ba52c(0x306)](_0x1d6baf);return _0x37dd0c?(0x0,i['of'])(_0x37dd0c):this[_0x2ba52c(0x352)][_0x2ba52c(0x200)]((0x0,s[_0x2ba52c(0x15e)])(_0x1cf695=>_0x1cf695[_0x2ba52c(0x378)]===_0x1d6baf));}[_0x1de16c(0x2c7)](_0x2acae2){const _0x19febe=_0x1de16c;return(0x0,i['firstValueFrom'])(this[_0x19febe(0x3a6)](_0x2acae2)[_0x19febe(0x200)]((0x0,s['map'])(()=>void 0x0)));}[_0x1de16c(0x208)](){const _0x50f0ca=_0x1de16c;this[_0x50f0ca(0x2a7)][_0x50f0ca(0x13d)](t[_0x50f0ca(0x20a)][_0x50f0ca(0x2b5)])[_0x50f0ca(0x200)]((0x0,i[_0x50f0ca(0x3ba)])(this[_0x50f0ca(0x155)]),(0x0,s[_0x50f0ca(0x187)])(0x10))[_0x50f0ca(0x15c)](async _0x436725=>{const _0x560a8d=_0x50f0ca;let _0x498a79=_0x436725[_0x560a8d(0x341)]['getUnitId'](),_0x30cebe=await this[_0x560a8d(0x1c0)](_0x498a79,t[_0x560a8d(0x20a)]['UNIVER_SHEET']);this['_entities'][_0x560a8d(0x248)](_0x498a79,_0x30cebe);}),this[_0x50f0ca(0x2a7)][_0x50f0ca(0x13d)](t[_0x50f0ca(0x20a)][_0x50f0ca(0x198)])[_0x50f0ca(0x200)]((0x0,i[_0x50f0ca(0x3ba)])(this[_0x50f0ca(0x155)]),(0x0,s[_0x50f0ca(0x187)])(0x10))['pipe']((0x0,s['filter'])(_0x4d8b91=>!_0x4d8b91[_0x50f0ca(0x341)][_0x50f0ca(0x270)]()[_0x50f0ca(0x169)]('__')))[_0x50f0ca(0x15c)](async _0x7ca4a1=>{const _0x1737d6=_0x50f0ca;let _0x5f4ee5=_0x7ca4a1['unit'][_0x1737d6(0x270)](),_0x21f441=await this[_0x1737d6(0x1c0)](_0x5f4ee5,t[_0x1737d6(0x20a)]['UNIVER_DOC']);this['_entities']['set'](_0x5f4ee5,_0x21f441);}),(0x0,i[_0x50f0ca(0x391)])(this[_0x50f0ca(0x2a7)][_0x50f0ca(0x232)](t[_0x50f0ca(0x20a)][_0x50f0ca(0x2b5)]),this[_0x50f0ca(0x2a7)][_0x50f0ca(0x232)](t['UniverInstanceType'][_0x50f0ca(0x198)]))['pipe']((0x0,i['takeUntil'])(this[_0x50f0ca(0x155)]))[_0x50f0ca(0x15c)](_0x5aab70=>{const _0x329b54=_0x50f0ca;let _0x53eee1=_0x5aab70[_0x329b54(0x270)](),_0x679c85=this[_0x329b54(0x27a)]['get'](_0x53eee1);_0x679c85&&(_0x679c85[_0x329b54(0x317)](),this[_0x329b54(0x27a)][_0x329b54(0x1d7)](_0x53eee1));});}async[_0x1de16c(0x1c0)](_0x5a96d8,_0x1c8823){const _0x58f5d5=_0x1de16c;let _0x46ce31=await this['_collabSessionService']['requireSession'](_0x5a96d8),_0x2a72c1=this[_0x58f5d5(0x16d)][_0x58f5d5(0x215)](this[_0x58f5d5(0x1a8)](_0x1c8823),_0x5a96d8,_0x1c8823,_0x46ce31);return await _0x2a72c1[_0x58f5d5(0x399)](),this[_0x58f5d5(0x352)][_0x58f5d5(0x286)](_0x2a72c1),_0x2a72c1;}[_0x1de16c(0x1a8)](_0x2f7e3e){const _0x29d5f8=_0x1de16c;switch(_0x2f7e3e){case t[_0x29d5f8(0x20a)][_0x29d5f8(0x198)]:return R;case t[_0x29d5f8(0x20a)][_0x29d5f8(0x2b5)]:return z;default:throw Error(_0x29d5f8(0x2be)+_0x2f7e3e);}}};U=y([v(0x0,(0x0,t[_0x1de16c(0x20f)])(t['Injector'])),v(0x1,(0x0,t[_0x1de16c(0x20f)])(H)),v(0x2,t['IConfigService']),v(0x3,t[_0x1de16c(0x1ca)])],U);var Ae=_0x1de16c(0x182),je=_0x1de16c(0x1ef);function _0x4f3f(){const _0x4b9d72=['HELLO','awaiting_with_pending','_transformRemoteChangesetByStateCache','CHANGESET_REJ','RETRY_CONNECTING_MAX_COUNT','unitId\x20is\x20not\x20found','ISnapshotServerService','[CollaborationUndoRedoService]','_removeRoom','LOCAL_CACHE_INTERVAL','_schedule','subject','PENDING','_clearTimeoutTimer','resourceIDs','getAllMembers','onTransformIME','fromCharCode','_sendingTimer','_httpService','getInterceptPoints','_onConflict','loginUrlKey','sessionStatus','method','headers','[FetchingMissState]:\x20not\x20expected\x20to\x20receive\x20ack\x20when\x20`this._awaitingChangeset`\x20is\x20null!','_handler','url','DependentOn','size','get','IUndoRedoService','pending','_onRemoteChangeset','refreshPermission','unitID','ITelemetryService','[OfflineState]:\x20received\x20acknowledgement.','updateCursorEvent','MUTATION','_eventService','Optional','registerDependencies','session','slice','CollaborationImageIoService','deleteCollaborator','_socketReady','_acknowledgedAwaitingRevision','[SyncedState]:\x20received\x20rejection.','[ConflictState]:\x20invalid\x20calling\x20to\x20`resend`.','getActiveSheet','_clearUndo','_collaborationPaused','find','_rescheduleHeartbeat','_retryConnectingTimer','c1Prime','[OfflineState]:\x20invalid\x20calling\x20to\x20`resend`.','_candidateSocket','merge','editingUnit','[CollaborationSessionService]:\x20socket\x20error','_updateLocalCache','onload','\x20to\x20','SheetTransformSelectionsService','POST','init','[PendingState]:\x20unhandled\x20univer\x20type:\x20','OPTIONAL','Unknown\x20type.\x20Will\x20not\x20load\x20files\x20from\x20remote\x20address.','_onRecvEvent','_maxTotalRetryTimeout','includes','__splitChunk__','reject','collaborators','_incrementRevisionNumber','rev','onRemoteRej','getCollabEntity$','/-/object/-/batch_allowed','_resendTimer','putCollaborators','getOwnPropertyDescriptor','_commandService','DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT','removeMember','CombCmd','/universer-api/user/session-ticket','equals','UPDATE_CURSOR','_cfgEnableObjInherit','1771609QmGPdS','put','loadUnitOfRevision','BASE64','_updateState','disposeWithMe','LIVESHARE_NEW_HOST','takeUntil','MentionType','_replayCachedMutations','IContextService','revision','CHANGESET_ACK','_listenToNetworkCondition','fetching\x20missing\x20changesets\x20from\x20','some','_decreaseWaiting','_getSendChangesetTimeout','Subject','OTHER_CLIENT_EDITING','length','Failed\x20to\x20update\x20permission\x20point','getUnitType','univer-pro.collaboration-client-socket-service','IConfigService','SheetsSelectionsService','LIVESHARE_TERMINATE','params','setCfgEnableObjInherit','HEARTBEAT','src','sid','origin','_clearCollaborationTimeoutTimer','online$','CollaborationUIEventId','encrypt','onTransformRemoteChangesetByStateCache','getResourcesRequest','onMissingChangesets','isArray','updateMember','_toggleOnline','getFocusedUnit','_onUserJoin','not_collab','AWAITING_WITH_PENDING','isPermissionRej','OTHER_CLIENTS_EDITING','DRAWING_IMAGE_ALLOW_IMAGE_LIST','_event$','requireSession','IPermissionService','_transformStack','randomBytes','transformSelections','href','missingChangesets','getImageSourceCache','reduce','session.room-cnt-exceeds','requestParams','/allowed','MSG_FOR_ERROR','{fileID}','_collaborationUIEventService','fetch_missing','getTime','RECV','routeKey','values','objectActions','session.room-permission-denied','findIndex','_onCombEvent','SHOULD_CLOSE_CONN','_localeService','registerHTTPInterceptor','body','_checkMissing','enableAuthServer','_state','_config','DataLoaderService','_disableEditing','Workbook','Error\x20on\x20receiving\x20event','toggleOnline','COMPRESS_MUTATION_APPLY','then','_retryCount','JOINING','entries','textRanges','[CollaborationSession]','clear','_getSignURL','[CollaborationState]:\x20apply\x20error!','getUnitStatus$','confirm','_onJoinRoomEvent','onStateChange','saveSheetBlock','\x0aAfter:\x20','getRoom','_transformUndoredo','sheets','253569uQAsQw','ITransformService','getTypeOfUnitAdded$','UserManagerService','mutations','_syncEditingCollabCursor','joinEvent','RichTextEditingMutation','HEARTBEAT_INTERVAL','CollaborationEntity','snapshotServerUrl','action','PERMISSION_DENIED','startTime','[UniverCollaborationClientPlugin]','fetchThroughInterceptors','readAsDataURL','getCfgEnableObjInherit','HTTPService','fetchMiss','localeService','save\x20fail\x20reason\x20is\x20','createCollaborator','updateOfflineData','concatBytes','post','dispose$','[CollaborationEntity]','DisposableCollection','catch','univer-pro.collaboration-client.single-active-unit-service','_initDependencies','IMentionIOService','subscribe','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY','filter','?size=','CompressMutationService','_throwTelemetryCollaborationNewChangeset','_emitMembers','reqId','_networkConditionService','leaveEvent','SNAPSHOT_URL_KEY','_getUploadFileURL','_waitCount','startsWith','CollaborationStatus','MemberService','_resendWithTimeout','_injector','objectID','_isPermissionRej','_getCurrentRevision','CONFLICT','collaboration-client.local-cache-service','CollaborationUIEventService','floor','cfgEnableObjInherit','x-univer-host','FileId','setCurrentUser','_substituteUndoStack','_socketService','CollaborationSocketService','actions','getSheetBlock','909leoHUh','SetSelectionsOperation','OfflineState','addHandlerCallback','@univerjs-pro/collaboration-client','complete','closeSession','setWaitCount','push','delay','roles','\x20-\x20','_transformRemoteChangesetByIMECache','CHANGESET_SHOULD_RETRY','members$','SheetPermissionInitController','ICollaborationSocketService','_handleRemoteChangesets','selections','[serializeCombRequest]:\x20should\x20not\x20fall\x20into\x20default\x20branch!','/unit/','csAckEvent','mapDocumentTypeToUniverInstanceType','PERMISSION_REJ','DEFAULT_COLLAB_WEB_SOCKET_URL','awaiting','UNIVER_DOC','_createSocket','_onFetchMissResult','_telemetryService','saveSnapshot','allowed','name','BehaviorSubject','type','createSocket','_status$','_stopTelemetryCollaborationNewChangeset','_replaceFileID','socket\x20open.','objectType','unknown','_getCtorByUniverInstanceType','textEncoder','default','stopTime','roomInfos','session.join-failed','/rev/','collaboratorID','CollaborativeUndoRedoService','override','initWorkbookPermissionChange','symbol','SheetCollaborationEntity','loadDoc','status$','ReplaySubject','IDLE','fetchMissingChangesets','_compressMutationService','_lockTransition','objects','LIVESHARE_REQUEST_HOST','resend','JSONX','_startCollaboration','charCodeAt','PendingState','_awaitingChangeset','collaboration-client.auth.needGotoLoginAlert','interceptor','[CollaborationSessionService]','has','[CollaborationSocketService]:\x20failed\x20to\x20get\x20web\x20socket\x20factory!','ERROR_IMAGE','IUniverInstanceService','_shouldReportTelemetry','_acknowledgeAwaitingIfReady','AwaitingState','authzUrl','_state$','/universer-api/uniscript','_transformIMECache','Disposable','_unitID','onTransformRemoteChangesetByIMECache','/universer-api/authz','622422DpevWa','delete','focused$','__Key__','hostname','toDisposable','enableCollaboration','infoRsp','IImageIoService','_members','UniverLicensePlugin','uploadFileServerUrl','text-x','error','_imageSourceCache','liveShareOperation','b64DecodeUnicode','COMMENT_UPDATE','workbook','_tryEnsureSocket','asObservable','_resendTimeout','_sendHeartbeatTimer','/resources','_sendHeartbeat','0.25.0','RxDisposable','/new_changes','_changesetReqId','_executeRemoteChangeset','waitForRoom$','packageName','_showConflictNotification','/object/','AwaitingWithPendingState','_handlerCallback','SOCKET_FAILED','&assign=','CollaborationSessionService','retryConnectingInterval','_onLocalMutation','UUID','pipe','event$','downloadEndpointUrl','_clearRetryConnectingTimer','onSyncEditingCollabCursor','_doCreateSocket','subUnitId','getLatestCsReqIdBySid','_init','JOIN_ROOM_FULL','UniverInstanceType','_revisionService','isTransformChangesetsSuccess','LIVESHARE_OPERATION','Tools','Inject','utf8ToBytes','deserializeToCombResponse','INGEST','[PendingState]:\x20invalid\x20calling\x20to\x20`resend`.','_getAPIPrefixPath','createInstance','listRoles','_undoRedoService','status','onSendChangeset','JOIN_ROOM_FAILED','_socketMessageSubscription','call','indexOf','appendMutation','unsubscribe','JOIN','_sheetTransformSelectionsService','_updateStatus','_createInitialStateImpl','_fetchMissChangesets','_roomCreated$','_transformService','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT','toPrimitive','_snapshotServerService','_sender','_telemetryInfo','This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!','file','decorate','_scheduleCollaborationTimeoutTimer','_commentUpdate$','_memberService','getTypeOfUnitDisposed$','/block/','list','SessionStatus','_getRedoStack','userID','_singleActiveUnitService','string','_getLoginPath','version','Quantity','connection\x20error','_changesetSessionId','_unlockTransition','ErrorCode','onTransformRemoteChangesetByIMECache\x20callback\x20is\x20not\x20added\x20yet.','updateSnapshot','ILogService','csShouldRetryEvent','apply','_socket$','EmptyMutationInfo','set','m2Prime','_acknowledgeAwaiting','FETCH_MISSING','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','DEFAULT_FILE_NAME','collabSubmitChangesetUrl','sort','_onConnectionFailed','newCsEvent','message$','RETRY_CONNECTING_MAX_COUNT_KEY','HTTPRequest','CollaborationEvent','_pendingMutations','NOT_COLLAB','_snapshotService','/collaborator','_change$','_exhaustRemoteChangesetQueue','change$','Injector','socket$','collaMsg','_socket','close','emitEvent','_createInitialState','LIVESHARE_FETCH_OPERATIONS','_remoteChangesetQueue','_clearLocalCache','CommandType','updatePermissionObjEvent','getMember','getConfig','createIdentifier','close$','eventID','onCommentUpdate','UNISCRIPT_RUN','getUnitId','_scheduleCompleteTimestamp','number','deepClone','result','SyncedState','154260fVphOW','loadUnit','_collaborationTimeoutTimer','CommentService','_entities','[CollaborationSession]:\x20should\x20not\x20send\x20message\x20when\x20the\x20session\x20is\x20offline!','CollaborationSession','/universer-api/file/{fileID}/sign-url','JOIN_ROOM_NOT_EXISTS','add','isTransformMutationsWithChangesetFailure','batchAllowed','/fetchmissing?from=','[FetchMissState]:\x20missing\x20changesets\x20response\x20still\x20has\x20revision\x20gaps.','splice','[FetchingMissState]:\x20received\x20stale\x20ack\x20revision:\x20','next','uniscriptRunEvent','mergeOverrideWithDependencies','telemetry\x20info\x20is\x20not\x20initialized','copyFileMeta','parse','ONLINE','_waitForHeartbeatResponse','getGlobalObject','onRemoteRetry','16caxoBy','FileSource','range','session.room-full','[AuthServerService]:\x20you\x20should\x20provide\x20authentication\x20info\x20on\x20Node.js.','getCurrentRevOfUnit','onlyLocal','LocaleService','_queuedRemoteChangesets','fromCollab','SOCKET_FAILED_RETRY','saveChangeset','AWAITING','_onOffline','PERSON','object','loadOfflineData','_unitInfo$','HEARTBEAT_TIMEOUT_KEY','[UniverCollaborationClientPlugin]:\x20you\x20must\x20provide\x20a\x20socketService\x20implementation\x20in\x20config!','_initCloseConn','_startTelemetryCollaborationNewChangeset','from','_univerInstanceService','ICommandService','_getUndoStack','_configService','compose','_type','DEFAULT_WS_SESSION_TICKET_URL','_roomMembers','_sessionStatus$','_members$','_registerDependencies','toStringTag','SUBMIT_CHANGESET_TIMEOUT','IAuthzIoService','UNIVER_SHEET','responseType','/universer-api/snapshot','withCredentials','_sessions','&source=','replace','\x0aCurrent:\x20','LEAVE','[CollaborationController]:\x20invalid\x20univer\x20type:\x20','_clearHeartbeatTimer','HEARTBEAT_TIMEOUT','_onRemoteRejected','getSnapshotAPIPath','InsertSheetMutation','getUnitOnRev','_permissionService','you\x20should\x20override\x20\x22IUndoRedoService\x22\x20provided\x20in\x20\x22core\x22\x20package!','readyForCollab','PSEUDO_FETCH_MISSING_RESULT','unitId','onRemoteAck','_clearRedo','onTransformSelections','socket\x20close','update','_tryReconnect','_substituteRedoStack','_applyRemoteChangeset','data','_HTTPService','isInternalEditorID','send','LOCAL_CACHE_INTERVAL_KEY','OFFLINE','stringify','failed\x20to\x20apply\x20missed\x20changesets!','transformStack\x20failed!','updateCollaborator','USERS_LEAVE','collaboration-client.config','_onRemoteACK','csRejEvent','onRemoteChangeset','_localCacheService','[PendingState]:\x20received\x20rejection.','shouldCloseConn','/-/object/list','getDrawingImageAllowSize','cmd','signUrlServerUrl','ThresholdInterceptorFactory','transformUndoRedo','every','RevisionService','CollaborationController','take','ERROR_IMAGE_TYPE','pauseCollaboration','originalMeta','isTransformMutationsWithChangesetSuccess','debug','forEach','_transformSelections','awaitingChangeset','state$','[PendingState]:\x20received\x20acknowledgement.','SYNCED','joinRsp','offline','_initMergeInterceptor','map','onTransformRemoteChangesetByStateCache\x20callback\x20is\x20not\x20added\x20yet.','_userManagerService','commentUpdate$','executeCommand','updatePermissionPoint','UniverCollaborationPlugin','_getDownloadEndpointURL','1883465WrQpjU','_initRequestHeader','getCollabEntity','transformMutationsWithChangeset','code','getUnit','\x20in\x20_schedule.','univer-pro.collaboration-client.network-condition.service','localCacheService','_logService','_toggleOffline','reverse','defineProperty','location','_createHandler','onMutationExecutedForCollab','GLOBAL_ROOMS_CNT_EXCEEDS','toggleOffline','WorkbookEditablePermission','dispose','USERS_ENTER','97010NZDoVt','ImageSourceType','ImageUploadStatusType','synced','generateRandomId','function','/object','parseProtocolChangeset','Cannot\x20assemble\x20a\x20changeset\x20from\x20multiple\x20mutations\x20of\x20different\x20types:\x20','now','2634618azNqNo','c2Prime','getCurrentUser','conflict','open$','_timeoutTimer','onMissedChangesetFetched','_collabSessionService','SUBMIT_CHANGESET','[SyncedState]:\x20invalid\x20calling\x20to\x20`resend`.','onTransformState','onLocalMutation','_onMessage','_instanceService','_getAPIPrefix','[SyncedState]:\x20received\x20acknowledgement.','uuidv4','onStarting','_transformStateCache','baseRev','getDeserializedSheetBlock','_clearScheduledTask','parseChangesetToProtocol','_submitChangeset','encode','editing\x20status\x20changed\x20to','patch','memberID','_transitionLocked','constructor','unit','loadSheet','CmdRspCode','UPDATE_PERMISSION_OBJ','8DDvQVn','_transformAndApplyRemoteChangeset','pluginName','[FetchingMissState]:\x20invalid\x20calling\x20to\x20`resend`.','CLOSE_ROOM','commentUpdateEvent','min','UnitEmbedded','transformChangesets','touchDependencies','[OfflineState]:\x20received\x20changeset.','_collaborationSessionService','FetchingMissState','_entityInit$','avatar'];_0x4f3f=function(){return _0x4b9d72;};return _0x4f3f();}let Me=class extends t['Disposable']{constructor(_0x418a3f,_0x521d99){const _0x21d749=_0x1de16c;super(),this['_univerInstanceService']=_0x418a3f,this[_0x21d749(0x2aa)]=_0x521d99,this['_init']();}['_init'](){const _0x1769cf=_0x1de16c;this['disposeWithMe'](this[_0x1769cf(0x2a7)][_0x1769cf(0x1d8)][_0x1769cf(0x15c)](()=>{const _0x21a152=_0x1769cf;var _0x5046a6;let _0xc4ddaa=this[_0x21a152(0x2a7)][_0x21a152(0x3de)](),_0x562907=(_0x5046a6=this['_configService']['getConfig'](_0x21a152(0x24d)))==null?'Univer':_0x5046a6;_0xc4ddaa instanceof t[_0x21a152(0x408)]&&(_0x562907=_0xc4ddaa[_0x21a152(0x19e)]),document['title']=_0x562907;}));}};Me=y([v(0x0,t[_0x1de16c(0x1ca)]),v(0x1,t[_0x1de16c(0x3cb)])],Me);let W=class{constructor(_0x4aa04e,_0x490be0,_0x2d30f3){const _0x41ec05=_0x1de16c;this['_configService']=_0x4aa04e,this['_httpService']=_0x490be0,this[_0x41ec05(0x14f)]=_0x2d30f3,this['init']();}[_0x1de16c(0x399)](){const _0x2515e4=_0x1de16c;this[_0x2515e4(0x367)][_0x2515e4(0x400)]({'priority':0x1,'interceptor':(_0x29264e,_0x147ba5)=>_0x147ba5(_0x29264e)[_0x2515e4(0x200)]((0x0,i['concatMap'])(async _0x3cb0ca=>{const _0x159740=_0x2515e4;let _0x3cc282=_0x3cb0ca;if(_0x3cc282['status']===0x191){if(typeof window>'u')throw Error(_0x159740(0x294));if(window[_0x159740(0x133)](this['localeService']['t'](_0x159740(0x1c4)))){let _0x2935f9=window['encodeURIComponent'](window[_0x159740(0x311)]['href']);window['location'][_0x159740(0x3eb)]=this[_0x159740(0x23a)]()+'?url='+_0x2935f9;}}return _0x3cc282;}))});}['_getLoginPath'](){const _0x5910f4=_0x1de16c;var _0x240c00;let _0x37f238=this[_0x5910f4(0x2aa)][_0x5910f4(0x26a)](T);return(_0x240c00=_0x37f238==null?void 0x0:_0x37f238[_0x5910f4(0x36a)])==null?'/universer-api/oidc/authpage':_0x240c00;}};W=y([v(0x0,t[_0x1de16c(0x3cb)]),v(0x1,(0x0,t[_0x1de16c(0x20f)])(c[_0x1de16c(0x14d)])),v(0x2,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x297)]))],W);let G=class extends t[_0x1de16c(0x1d2)]{constructor(_0x3e5caa,_0x452ad5){const _0x40c0b2=_0x1de16c;super(),this[_0x40c0b2(0x2d3)]=_0x3e5caa,this[_0x40c0b2(0x2aa)]=_0x452ad5,g(this,_0x40c0b2(0x3b2),!0x1),this[_0x40c0b2(0x2fb)]();}[_0x1de16c(0x2fb)](){const _0x30c0d1=_0x1de16c;let _0x4b60aa=this;this[_0x30c0d1(0x3b8)](this[_0x30c0d1(0x2d3)]['registerHTTPInterceptor']({'priority':0x3e7,'interceptor':(0x0,c['MergeInterceptorFactory'])({'isMatch'(_0x19e05b){const _0x32f7b4=_0x30c0d1;var _0xb6adc4;if(_0x19e05b[_0x32f7b4(0x36c)]===_0x32f7b4(0x398)&&(_0xb6adc4=_0x19e05b['requestParams'])!=null&&_0xb6adc4[_0x32f7b4(0x401)]){let {objectID:_0x17405c,objectType:_0x2c1ae1}=_0x19e05b[_0x32f7b4(0x3f0)]['body']||{};if(!_0x17405c||_0x2c1ae1===void 0x0)return!0x1;let _0x203c3b=_0x4b60aa[_0x32f7b4(0x214)]()+'/'+_0x2c1ae1+_0x32f7b4(0x1f7)+_0x17405c+_0x32f7b4(0x3f1);if(_0x19e05b['url']===_0x203c3b)return!0x0;}return!0x1;},'getParamsFromRequest'(_0x2fdd2f){const _0x2ee978=_0x30c0d1;var _0x3900d7;return(_0x3900d7=_0x2fdd2f[_0x2ee978(0x3f0)])==null?void 0x0:_0x3900d7[_0x2ee978(0x401)];},'mergeParamsToRequest'(_0x1e90bb,_0x2c483e){const _0xf8bc70=_0x30c0d1;let _0x36a6c7=_0x4b60aa[_0xf8bc70(0x214)]()+_0xf8bc70(0x3a7),_0x3af6e6=_0x1e90bb[_0xf8bc70(0x3ee)]((_0x2ea1f7,_0x399214)=>{const _0x16a34f=_0xf8bc70;let {unitID:_0x4a5d80,objectID:_0x33f2d0,objectType:_0x5084fe,actions:_0x13dd93}=_0x399214;return _0x2ea1f7[_0x4a5d80]||(_0x2ea1f7[_0x4a5d80]={}),_0x2ea1f7[_0x4a5d80][_0x33f2d0]||(_0x2ea1f7[_0x4a5d80][_0x33f2d0]={'objectID':_0x33f2d0,'objectType':_0x5084fe,'actions':[]}),_0x2ea1f7[_0x4a5d80][_0x33f2d0][_0x16a34f(0x17c)]['push'](..._0x13dd93),_0x2ea1f7;},{}),_0x7ce58d=[];for(let _0x2dbe26 in _0x3af6e6)for(let _0x1a8dc5 in _0x3af6e6[_0x2dbe26]){let {actions:_0x4d28d8,objectType:_0x1b8cf6}=_0x3af6e6[_0x2dbe26][_0x1a8dc5],_0x345a5f=[...new Set(_0x4d28d8)];_0x7ce58d[_0xf8bc70(0x186)]({'unitID':_0x2dbe26,'objectID':_0x1a8dc5,'objectType':_0x1b8cf6,'actions':_0x345a5f});}return new c[(_0xf8bc70(0x254))](_0xf8bc70(0x398),_0x36a6c7,{'headers':_0x2c483e[_0xf8bc70(0x36d)],'withCredentials':_0x2c483e[_0xf8bc70(0x2b8)],'responseType':_0x2c483e[_0xf8bc70(0x2b6)],'body':{'requests':_0x7ce58d}});}},{'distributeResult'(_0x332b06,_0x1b6a91){const _0x2cb50c=_0x30c0d1;let {objectActions:_0x402f9e}=_0x332b06;return _0x1b6a91[_0x2cb50c(0x2fc)](_0x26873e=>{const _0x229d24=_0x2cb50c;let {unitID:_0x3d5f69,objectID:_0x4ab380,actions:_0x174b06}=_0x26873e,_0x449753=_0x402f9e['find'](_0x1a666c=>_0x1a666c[_0x229d24(0x378)]===_0x3d5f69&&_0x1a666c[_0x229d24(0x16e)]===_0x4ab380);return{'config':_0x26873e,'result':{'actions':_0x174b06[_0x229d24(0x2fc)](_0x12f409=>_0x449753==null?void 0x0:_0x449753[_0x229d24(0x17c)][_0x229d24(0x38b)](_0x29ed1d=>_0x29ed1d[_0x229d24(0x146)]===_0x12f409))['filter'](_0x2720f8=>!!_0x2720f8),'error':_0x332b06[_0x229d24(0x1e3)]}};});}})}));}[_0x1de16c(0x214)](){const _0x3c74df=_0x1de16c;var _0x5f536d;let _0x3d107c=this[_0x3c74df(0x2aa)][_0x3c74df(0x26a)](T);return(_0x5f536d=_0x3d107c==null?void 0x0:_0x3d107c['authzUrl'])==null?'/universer-api/authz':_0x5f536d;}async['create'](_0xdf7ce4){const _0x74f464=_0x1de16c;let _0x27d3ed=this[_0x74f464(0x214)]()+'/'+_0xdf7ce4[_0x74f464(0x1a6)]+_0x74f464(0x31f);return(await this[_0x74f464(0x2d3)][_0x74f464(0x154)](_0x27d3ed,{'body':_0xdf7ce4}))[_0x74f464(0x401)]['objectID']||'';}async[_0x1de16c(0x234)](_0x3a54c8){const _0x3a13f3=_0x1de16c;let _0x26a9e4=this[_0x3a13f3(0x214)]()+_0x3a13f3(0x2e4);return(await this[_0x3a13f3(0x2d3)]['post'](_0x26a9e4,{'body':_0x3a54c8}))[_0x3a13f3(0x401)][_0x3a13f3(0x1bc)];}async[_0x1de16c(0x2ce)](_0x179a69){const _0x55deef=_0x1de16c;var _0x1bb44e;let _0x47e612=this[_0x55deef(0x214)]()+'/'+_0x179a69[_0x55deef(0x1a6)]+'/object/'+_0x179a69[_0x55deef(0x16e)],_0xa09177=await this[_0x55deef(0x2d3)][_0x55deef(0x3b4)](_0x47e612,{'body':_0x179a69});if((_0xa09177==null||(_0x1bb44e=_0xa09177[_0x55deef(0x401)])==null||(_0x1bb44e=_0x1bb44e[_0x55deef(0x1e3)])==null?void 0x0:_0x1bb44e[_0x55deef(0x308)])!==0x1)throw Error(_0x55deef(0x3c8));}async[_0x1de16c(0x19d)](_0x2f1311){const _0x2e5f39=_0x1de16c;let _0x53db53=this[_0x2e5f39(0x214)]()+'/'+_0x2f1311[_0x2e5f39(0x1a6)]+_0x2e5f39(0x1f7)+_0x2f1311['objectID']+_0x2e5f39(0x3f1);return(await this[_0x2e5f39(0x2d3)][_0x2e5f39(0x154)](_0x53db53,{'body':_0x2f1311}))[_0x2e5f39(0x401)]['actions'];}async[_0x1de16c(0x281)](_0x43afb1){const _0x332a14=_0x1de16c;let _0x49bb90=this['_getAPIPrefixPath']()+'/-/object/-/batch_allowed';return(await this[_0x332a14(0x2d3)][_0x332a14(0x154)](_0x49bb90,{'body':{'requests':_0x43afb1}}))[_0x332a14(0x401)][_0x332a14(0x3fa)];}async[_0x1de16c(0x216)](_0x3e9d30){const _0x5f2f2b=_0x1de16c;let _0x3009d3=this[_0x5f2f2b(0x214)]()+'/'+_0x3e9d30[_0x5f2f2b(0x1a6)]+'/role',_0x3a3d6a=await this[_0x5f2f2b(0x2d3)]['post'](_0x3009d3,{'body':_0x3e9d30});return{'roles':_0x3a3d6a['body'][_0x5f2f2b(0x188)],'actions':_0x3a3d6a[_0x5f2f2b(0x401)][_0x5f2f2b(0x17c)]};}async[_0x1de16c(0x383)](_0xa22e83){const _0x3e6f25=_0x1de16c;let _0x44ce2e=this[_0x3e6f25(0x214)]()+'/collaborator';await this[_0x3e6f25(0x2d3)]['delete'](_0x44ce2e,{'params':{'collaboratorID':_0xa22e83[_0x3e6f25(0x1af)],'objectID':_0xa22e83['objectID'],'unitID':_0xa22e83[_0x3e6f25(0x378)]}});}async[_0x1de16c(0x2db)](_0x1ab065){const _0x4c53a8=_0x1de16c;let _0x526478=this[_0x4c53a8(0x214)]()+_0x4c53a8(0x259);await this[_0x4c53a8(0x2d3)][_0x4c53a8(0x33d)](_0x526478,{'body':_0x1ab065});}async[_0x1de16c(0x151)](_0x26e2fe){const _0x381efd=_0x1de16c;let _0x2ae48d=this[_0x381efd(0x214)]()+_0x381efd(0x259);await this[_0x381efd(0x2d3)][_0x381efd(0x154)](_0x2ae48d,{'body':_0x26e2fe});}async['listCollaborators'](_0x15012c){const _0x4272fb=_0x1de16c;var _0x210afa;let _0x4c3c03=this[_0x4272fb(0x214)]()+'/collaborator',_0x2d787b=await this[_0x4272fb(0x2d3)][_0x4272fb(0x373)](_0x4c3c03,{'params':{'objectID':_0x15012c[_0x4272fb(0x16e)],'unitID':_0x15012c[_0x4272fb(0x378)]}});return this[_0x4272fb(0x3cf)]((_0x210afa=_0x2d787b[_0x4272fb(0x401)][_0x4272fb(0x175)])==null?!0x1:_0x210afa),_0x2d787b[_0x4272fb(0x401)][_0x4272fb(0x3a2)];}async[_0x1de16c(0x3a9)](_0x318af9){const _0x5998a9=_0x1de16c;let _0x4627a6=this[_0x5998a9(0x214)]()+_0x5998a9(0x259);await this[_0x5998a9(0x2d3)][_0x5998a9(0x3b4)](_0x4627a6,{'body':_0x318af9});}[_0x1de16c(0x3cf)](_0x2410a9){this['_cfgEnableObjInherit']=_0x2410a9;}[_0x1de16c(0x14c)](){const _0xdb5a2a=_0x1de16c;return this[_0xdb5a2a(0x3b2)];}};G=y([v(0x0,(0x0,t['Inject'])(c[_0x1de16c(0x14d)])),v(0x1,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x3cb)]))],G);function Ne(_0x53ef06){const _0x2d66ba=_0x1de16c;let _0x4acf96=atob(_0x53ef06),_0x323e92=new Uint8Array(_0x4acf96[_0x2d66ba(0x3c7)]);for(let _0x10af90=0x0;_0x10af90<_0x4acf96['length'];_0x10af90++)_0x323e92[_0x10af90]=_0x4acf96[_0x2d66ba(0x1c1)](_0x10af90);return _0x323e92;}function Pe(_0x1ec8ad){const _0x4df657=_0x1de16c;let _0x174868='';for(let _0x1e83bc=0x0;_0x1e83bc<_0x1ec8ad[_0x4df657(0x3c7)];_0x1e83bc++)_0x174868+=String[_0x4df657(0x365)](_0x1ec8ad[_0x1e83bc]);return btoa(_0x174868);}function Fe(_0x455f2d,_0x3aae9e){const _0x1470ca=_0x1de16c;let _0x573f68=Ne(_0x3aae9e),_0x8a4ec0=(0x0,f[_0x1470ca(0x3e9)])(0x10);return Pe((0x0,f[_0x1470ca(0x153)])(_0x8a4ec0,(0x0,d['cbc'])(_0x573f68,_0x8a4ec0)[_0x1470ca(0x3d7)]((0x0,f[_0x1470ca(0x210)])(_0x455f2d))));}function Ie(){const _0x2b33d2=_0x1de16c;let _0x1868a3=(0x0,l[_0x2b33d2(0x28e)])()[_0x2b33d2(0x1d9)];if(typeof window<'u'&&window['location']!==void 0x0&&_0x1868a3){let _0x1b35fb={'time':Math[_0x2b33d2(0x174)](Date['now']()/0x3e8),'domain':location[_0x2b33d2(0x1da)]};return Fe(JSON[_0x2b33d2(0x2d8)](_0x1b35fb),_0x1868a3);}}let K=class{constructor(_0x15f5c3){const _0x2588c7=_0x1de16c;this[_0x2588c7(0x367)]=_0x15f5c3,this['_initRequestHeader']();}[_0x1de16c(0x305)](){const _0x26719a=_0x1de16c;this['_httpService'][_0x26719a(0x400)]({'interceptor':(_0x1dfd5b,_0x3c5f4a)=>{const _0xd3ce52=_0x26719a;let _0x44de7d=Ie();return _0x44de7d&&_0x1dfd5b[_0xd3ce52(0x36d)][_0xd3ce52(0x248)](_0xd3ce52(0x176),_0x44de7d),_0x3c5f4a(_0x1dfd5b);}});}};K=y([v(0x0,(0x0,t['Inject'])(c['HTTPService']))],K);let q=class extends t['RxDisposable']{constructor(_0x4447e8,_0x39b3b5,_0x2f7f5f){const _0x2b24f1=_0x1de16c;super(),this[_0x2b24f1(0x30d)]=_0x4447e8,this[_0x2b24f1(0x258)]=_0x39b3b5,this[_0x2b24f1(0x2e1)]=_0x2f7f5f,g(this,_0x2b24f1(0x2a1),new i[(_0x2b24f1(0x19f))](null)),g(this,'unitInfo$',this['_unitInfo$'][_0x2b24f1(0x1ea)]());}async[_0x1de16c(0x3b5)](_0x4e57d5,_0x1bda22,_0x34476f){const _0xc8995c=_0x1de16c;this[_0xc8995c(0x2a1)][_0xc8995c(0x286)]({'unitId':_0x4e57d5,'type':_0x1bda22});let _0x5a1afb=null;switch(_0x1bda22){case t[_0xc8995c(0x20a)][_0xc8995c(0x2b5)]:_0x5a1afb=await this[_0xc8995c(0x258)][_0xc8995c(0x342)](_0x4e57d5,_0x34476f);break;case t[_0xc8995c(0x20a)][_0xc8995c(0x198)]:_0x5a1afb=await this['_snapshotService'][_0xc8995c(0x1b5)](_0x4e57d5,_0x34476f);break;default:this['_logService'][_0xc8995c(0x1e3)]('[DataLoaderService]',_0xc8995c(0x39c));break;}return _0x5a1afb;}async[_0x1de16c(0x277)](_0x1bdc57,_0x2938e9,_0x2a5398){const _0xb75861=_0x1de16c;var _0x1563cb;this[_0xb75861(0x2a1)][_0xb75861(0x286)]({'unitId':_0x1bdc57,'type':_0x2938e9,'subUnitId':_0x2a5398});let _0x17806e=0x0,_0x21b87d=await((_0x1563cb=this[_0xb75861(0x2e1)])==null?void 0x0:_0x1563cb[_0xb75861(0x2a0)](_0x1bdc57));return _0x21b87d&&(_0x21b87d[_0xb75861(0x2f5)]||_0x21b87d[_0xb75861(0x13f)][_0xb75861(0x3c7)]!==0x0)&&(_0x17806e=_0x21b87d[_0xb75861(0x3a4)]),_0x17806e===0x0&&this['_logService'][_0xb75861(0x2f2)]('[DataLoaderService]','fetching\x20the\x20latest\x20document\x20from\x20the\x20server.'),this[_0xb75861(0x3b5)](_0x1bdc57,_0x2938e9,_0x17806e);}};q=y([v(0x0,t[_0x1de16c(0x243)]),v(0x1,(0x0,t[_0x1de16c(0x20f)])(e['SnapshotService'])),v(0x2,(0x0,t[_0x1de16c(0x37e)])(S))],q);let J=class{constructor(_0x3c1489,_0x554d65,_0x555304){const _0x27644f=_0x1de16c;this['_httpService']=_0x3c1489,this[_0x27644f(0x2aa)]=_0x554d65,this[_0x27644f(0x2a7)]=_0x555304,g(this,_0x27644f(0x168),0x0),g(this,'_change$',new i[(_0x27644f(0x3c5))]()),g(this,_0x27644f(0x25c),this['_change$']),g(this,_0x27644f(0x1e4),new Map());}[_0x1de16c(0x185)](_0xff52a7){const _0x58ee2e=_0x1de16c;this[_0x58ee2e(0x168)]=_0xff52a7,this['_change$'][_0x58ee2e(0x286)](_0xff52a7);}[_0x1de16c(0x3ed)](_0x799307,_0x5ced72){const _0x2cb3f6=_0x1de16c;if(_0x5ced72===u['ImageSourceType'][_0x2cb3f6(0x3b6)]){let _0x4fefb1=new Image();return _0x4fefb1[_0x2cb3f6(0x3d1)]=_0x799307,_0x4fefb1;}return this[_0x2cb3f6(0x1e4)][_0x2cb3f6(0x373)](_0x799307);}['addImageSourceCache'](_0x127188,_0x5b2321,_0x573736){const _0x14f90f=_0x1de16c;_0x5b2321===u[_0x14f90f(0x31a)][_0x14f90f(0x3b6)]||_0x573736==null||this[_0x14f90f(0x1e4)][_0x14f90f(0x248)](_0x127188,_0x573736);}async['getImage'](_0x4ed21a){const _0x1b2392=_0x1de16c;try{let _0x4e3313=this[_0x1b2392(0x1a4)](this[_0x1b2392(0x130)](),''+_0x4ed21a),_0x33d28e=(await this['_httpService']['get'](_0x4e3313))[_0x1b2392(0x401)];if(_0x33d28e[_0x1b2392(0x1e3)]&&_0x33d28e[_0x1b2392(0x1e3)][_0x1b2392(0x308)]===a[_0x1b2392(0x240)]['OK']){let _0x389915=(0x0,t['resolveWithBasePath'])(_0x33d28e[_0x1b2392(0x370)],this[_0x1b2392(0x303)]());return Promise['resolve'](_0x389915);}return Promise['reject'](_0x33d28e[_0x1b2392(0x1e3)]);}catch(_0x1d44de){return Promise[_0x1b2392(0x3a1)](_0x1d44de);}}async['saveImage'](_0x13c6c6){const _0x4fd577=_0x1de16c;let _0x33b77b='';if(!u[_0x4fd577(0x3e4)][_0x4fd577(0x39f)](_0x13c6c6[_0x4fd577(0x1a0)]))return this[_0x4fd577(0x3c3)](),Promise[_0x4fd577(0x3a1)](Error(u['ImageUploadStatusType'][_0x4fd577(0x2ee)]));if(_0x13c6c6[_0x4fd577(0x372)]>(0x0,u[_0x4fd577(0x2e5)])())return this[_0x4fd577(0x3c3)](),Promise[_0x4fd577(0x3a1)](Error(u[_0x4fd577(0x31b)]['ERROR_EXCEED_SIZE']));try{let _0x53e7a7=new FormData();_0x53e7a7['append'](_0x4fd577(0x22d),_0x13c6c6);let _0x4270e1=this[_0x4fd577(0x2a7)]['getFocusedUnit'](),_0x34842b=_0x4270e1==null?void 0x0:_0x4270e1[_0x4fd577(0x270)]();if(!_0x34842b)throw Error(_0x4fd577(0x359));let _0x5936b8=this[_0x4fd577(0x167)]()+_0x4fd577(0x15f)+_0x13c6c6[_0x4fd577(0x372)]['toString']()+_0x4fd577(0x2ba)+a[_0x4fd577(0x291)][_0x4fd577(0x34c)]+_0x4fd577(0x1fb)+encodeURIComponent(_0x34842b),_0x302ec8={'body':_0x53e7a7},_0x5b0548=(await this[_0x4fd577(0x367)][_0x4fd577(0x154)](_0x5936b8,_0x302ec8))[_0x4fd577(0x401)];if(typeof _0x5b0548[_0x4fd577(0x177)]!=_0x4fd577(0x239))return this['_decreaseWaiting'](),Promise[_0x4fd577(0x3a1)](Error(u[_0x4fd577(0x31b)][_0x4fd577(0x1c9)]));_0x33b77b=_0x5b0548[_0x4fd577(0x177)];}catch{return this[_0x4fd577(0x3c3)](),Promise[_0x4fd577(0x3a1)](Error(u[_0x4fd577(0x31b)][_0x4fd577(0x1c9)]));}return new Promise((_0x41d04f,_0x33b520)=>{const _0x222396=_0x4fd577;let _0x5827a3=new FileReader();_0x5827a3[_0x222396(0x14b)](_0x13c6c6),_0x5827a3[_0x222396(0x395)]=_0x4ef3a0=>{const _0x25fe3b=_0x222396;var _0x3965a8;let _0x3b71d3=(_0x3965a8=_0x4ef3a0['target'])==null?void 0x0:_0x3965a8[_0x25fe3b(0x274)];if(_0x3b71d3==null){this[_0x25fe3b(0x3c3)](),_0x33b520(Error(u['ImageUploadStatusType']['ERROR_IMAGE']));return;}_0x41d04f({'imageId':(0x0,t[_0x25fe3b(0x31d)])(0x6),'imageSourceType':u[_0x25fe3b(0x31a)][_0x25fe3b(0x1ff)],'source':_0x33b77b,'base64Cache':_0x3b71d3,'status':u[_0x25fe3b(0x31b)]['SUCCUSS']}),this[_0x25fe3b(0x3c3)]();};});}[_0x1de16c(0x167)](){const _0x25f9b8=_0x1de16c;var _0x39d888;let _0x12b1bc=this['_configService'][_0x25f9b8(0x26a)](T);return(_0x39d888=_0x12b1bc==null?void 0x0:_0x12b1bc[_0x25f9b8(0x1e1)])==null?'/universer-api/stream/file/upload':_0x39d888;}[_0x1de16c(0x130)](){const _0x30feec=_0x1de16c;var _0xb84d8e;let _0x33b975=this['_configService'][_0x30feec(0x26a)](T);return(_0xb84d8e=_0x33b975==null?void 0x0:_0x33b975[_0x30feec(0x2e7)])==null?_0x30feec(0x27d):_0xb84d8e;}[_0x1de16c(0x303)](){const _0x14e616=_0x1de16c;var _0x44e041;let _0x547722=this['_configService'][_0x14e616(0x26a)](T);return(_0x44e041=_0x547722==null?void 0x0:_0x547722[_0x14e616(0x202)])==null?location[_0x14e616(0x3d3)]:_0x44e041;}[_0x1de16c(0x1a4)](_0x396db8,_0x55fafc){const _0x47522d=_0x1de16c;return _0x396db8[_0x47522d(0x2bb)](_0x47522d(0x3f3),_0x55fafc);}[_0x1de16c(0x3c3)](){const _0x1623bd=_0x1de16c;--this['_waitCount'],this[_0x1623bd(0x25a)][_0x1623bd(0x286)](this[_0x1623bd(0x168)]);}};J=y([v(0x0,(0x0,t[_0x1de16c(0x20f)])(c[_0x1de16c(0x14d)])),v(0x1,t[_0x1de16c(0x3cb)]),v(0x2,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x1ca)]))],J);let Y=class{constructor(_0x5558ad,_0x3488ce){const _0x7f943f=_0x1de16c;this[_0x7f943f(0x2aa)]=_0x5558ad,this[_0x7f943f(0x2d3)]=_0x3488ce;}[_0x1de16c(0x214)](){const _0x1dbdaf=_0x1de16c;var _0x5d17a2;let _0x555631=this[_0x1dbdaf(0x2aa)][_0x1dbdaf(0x26a)](T);return(_0x5d17a2=_0x555631==null?void 0x0:_0x555631[_0x1dbdaf(0x1ce)])==null?_0x1dbdaf(0x1d5):_0x5d17a2;}async[_0x1de16c(0x234)](_0x3778d9){const _0x401c94=_0x1de16c;let _0x3698f8=this[_0x401c94(0x214)]()+_0x401c94(0x259);return{'list':[{'title':'People','mentions':(await this['_HTTPService'][_0x401c94(0x373)](_0x3698f8,{'params':{'objectID':_0x3778d9[_0x401c94(0x2c9)],'unitID':_0x3778d9['unitId']}}))[_0x401c94(0x401)][_0x401c94(0x3a2)][_0x401c94(0x2fc)](_0x29d44d=>({'objectId':_0x29d44d['id'],'name':_0x29d44d['subject'][_0x401c94(0x19e)],'metadata':{'icon':_0x29d44d[_0x401c94(0x35f)][_0x401c94(0x353)]},'label':_0x29d44d[_0x401c94(0x35f)][_0x401c94(0x19e)],'objectType':t['MentionType'][_0x401c94(0x29e)]})),'metadata':{},'type':t[_0x401c94(0x3bb)][_0x401c94(0x29e)]}]};}};Y=y([v(0x0,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x3cb)])),v(0x1,(0x0,t[_0x1de16c(0x20f)])(c[_0x1de16c(0x14d)]))],Y);let X=class extends t['RxDisposable']{constructor(_0x290b75,_0x9c5691,_0x5a6769,_0x56d680,_0x357b2d){const _0x1af5fe=_0x1de16c;super(),this[_0x1af5fe(0x16d)]=_0x290b75,this[_0x1af5fe(0x2a7)]=_0x9c5691,this['_permissionService']=_0x5a6769,this[_0x1af5fe(0x350)]=_0x56d680,this[_0x1af5fe(0x3f4)]=_0x357b2d,this['_initUnitPermissionChange'](),this[_0x1af5fe(0x2a4)]();}[_0x1de16c(0x2a4)](){const _0x42eaf9=_0x1de16c;let _0x2fb33d=async _0x2ea2cc=>{const _0x55d5f6=_0x3896;(await this[_0x55d5f6(0x350)][_0x55d5f6(0x3e6)](_0x2ea2cc))[_0x55d5f6(0x201)][_0x55d5f6(0x200)]((0x0,s['filter'])(_0x2ffecb=>_0x2ffecb[_0x55d5f6(0x26d)]===e[_0x55d5f6(0x255)][_0x55d5f6(0x3fe)]),(0x0,s[_0x55d5f6(0x3ba)])(this[_0x55d5f6(0x155)]))[_0x55d5f6(0x15c)](_0x55119a=>{const _0x4c4380=_0x55d5f6;let {reason:_0x273415}=_0x55119a[_0x4c4380(0x2d2)];this['_collaborationUIEventService'][_0x4c4380(0x262)]({'id':_0x4c4380(0x349),'data':_0x273415}),this[_0x4c4380(0x2c5)][_0x4c4380(0x301)](new r[(_0x4c4380(0x316))](_0x2ea2cc)['id'],!0x1),this[_0x4c4380(0x350)][_0x4c4380(0x184)](_0x2ea2cc);});};(0x0,i[_0x42eaf9(0x391)])(this['_univerInstanceService'][_0x42eaf9(0x13d)](t[_0x42eaf9(0x20a)]['UNIVER_SHEET']),this['_univerInstanceService'][_0x42eaf9(0x13d)](t[_0x42eaf9(0x20a)][_0x42eaf9(0x198)]))[_0x42eaf9(0x200)]((0x0,s[_0x42eaf9(0x2fc)])(_0x7630f9=>_0x7630f9[_0x42eaf9(0x341)][_0x42eaf9(0x270)]()),(0x0,s[_0x42eaf9(0x15e)])(_0x3467c8=>!(0x0,t[_0x42eaf9(0x2d4)])(_0x3467c8)),(0x0,s['takeUntil'])(this[_0x42eaf9(0x155)]))[_0x42eaf9(0x15c)](_0x2df618=>{_0x2fb33d(_0x2df618);});}['_initUnitPermissionChange'](){const _0x1280af=_0x1de16c;let _0x160efa=async _0x56b370=>{const _0x82923=_0x3896;let _0x5277cb=await this[_0x82923(0x350)][_0x82923(0x3e6)](_0x56b370),_0x417eab=this[_0x82923(0x16d)][_0x82923(0x373)](r[_0x82923(0x18d)]);_0x5277cb['event$'][_0x82923(0x200)]((0x0,s[_0x82923(0x15e)])(_0x557124=>_0x557124[_0x82923(0x26d)]===e[_0x82923(0x255)][_0x82923(0x344)]),(0x0,s[_0x82923(0x3ba)])(this[_0x82923(0x155)]))['subscribe'](_0x2a45e2=>{const _0x37070a=_0x82923;let {objectId:_0x19872e}=_0x2a45e2[_0x37070a(0x2d2)];_0x19872e===_0x56b370?_0x417eab[_0x37070a(0x1b2)](_0x56b370):_0x417eab[_0x37070a(0x377)](_0x56b370,_0x19872e);});};(0x0,i[_0x1280af(0x391)])(this['_univerInstanceService']['getTypeOfUnitAdded$'](t['UniverInstanceType']['UNIVER_SHEET']))[_0x1280af(0x200)]((0x0,s[_0x1280af(0x2fc)])(_0x30a179=>_0x30a179[_0x1280af(0x341)]['getUnitId']()),(0x0,s[_0x1280af(0x15e)])(_0x46f2c4=>!(0x0,t[_0x1280af(0x2d4)])(_0x46f2c4)),(0x0,s[_0x1280af(0x3ba)])(this['dispose$']))[_0x1280af(0x15c)](_0x29327b=>{_0x160efa(_0x29327b);});}};X=y([v(0x0,(0x0,t['Inject'])(t[_0x1de16c(0x25d)])),v(0x1,t[_0x1de16c(0x1ca)]),v(0x2,t[_0x1de16c(0x3e7)]),v(0x3,(0x0,t['Inject'])(H)),v(0x4,(0x0,t[_0x1de16c(0x20f)])(_))],X);let Z=class{constructor(_0x29f3ef,_0x37c022){const _0x49af95=_0x1de16c;this['_configService']=_0x29f3ef,this[_0x49af95(0x367)]=_0x37c022;}async[_0x1de16c(0x2c4)](_0x38e878,_0x2c8f38){const _0x2a7b81=_0x1de16c;var _0x512277;let {unitID:_0xb3335f,type:_0x1a2e1c,revision:_0x5da00d=0x0}=_0x2c8f38,_0x3bf189=this[_0x2a7b81(0x2c2)]()+'/'+_0x1a2e1c+_0x2a7b81(0x192)+_0xb3335f+_0x2a7b81(0x1ae)+_0x5da00d,_0x438a95=(await this['_httpService']['get'](_0x3bf189))[_0x2a7b81(0x401)],_0x1f1357=(_0x512277=_0x438a95['snapshot'])==null?void 0x0:_0x512277[_0x2a7b81(0x1e8)];if(_0x1f1357){let _0x4790f9=_0x1f1357==null?void 0x0:_0x1f1357[_0x2a7b81(0x2f0)];_0x1f1357[_0x2a7b81(0x2f0)]=e[_0x2a7b81(0x1a9)][_0x2a7b81(0x33b)]((0x0,e[_0x2a7b81(0x1e6)])(_0x4790f9)),Object[_0x2a7b81(0x12c)](_0x1f1357[_0x2a7b81(0x13a)])[_0x2a7b81(0x2f3)](([,_0x3f3be2])=>{const _0x246bc6=_0x2a7b81;let _0x23f490=_0x3f3be2[_0x246bc6(0x2f0)];_0x3f3be2[_0x246bc6(0x2f0)]=e[_0x246bc6(0x1a9)]['encode']((0x0,e['b64DecodeUnicode'])(_0x23f490));});}return _0x438a95;}async[_0x1de16c(0x17d)](_0x29c1cd,_0x524b18){const _0x1ad95d=_0x1de16c;let {unitID:_0x5a82c6,type:_0x5cab7b,blockID:_0x471dcd}=_0x524b18,_0x1ecb98=this[_0x1ad95d(0x331)]()+'/'+_0x5cab7b+'/unit/'+_0x5a82c6+'/block/'+_0x471dcd;return(await this['_httpService'][_0x1ad95d(0x373)](_0x1ecb98))[_0x1ad95d(0x401)];}async[_0x1de16c(0x337)](_0x4b3528,_0x4e7156){const _0x2c2238=_0x1de16c;let {unitID:_0x2d9b7f,type:_0x386e3e,blockID:_0x471b85}=_0x4e7156,_0x484c46=this[_0x2c2238(0x331)]()+_0x2c2238(0x233)+_0x386e3e+_0x2c2238(0x192)+_0x2d9b7f+'/block/'+_0x471b85;return(await this[_0x2c2238(0x367)][_0x2c2238(0x373)](_0x484c46))[_0x2c2238(0x401)];}async[_0x1de16c(0x1b9)](_0x31ed54,_0x244fe4){const _0x32bc8f=_0x1de16c;let {unitID:_0x5e7636,type:_0x47ec18,from:_0x4376f1,to:_0x57ada5}=_0x244fe4,_0x3f4607=this[_0x32bc8f(0x331)]()+'/'+_0x47ec18+'/unit/'+_0x5e7636+_0x32bc8f(0x282)+_0x4376f1+'&to='+_0x57ada5;return(await this['_httpService'][_0x32bc8f(0x373)](_0x3f4607))['body'];}[_0x1de16c(0x2c2)](){const _0x2991a7=_0x1de16c;var _0x309140;return(_0x309140=this[_0x2991a7(0x2aa)][_0x2991a7(0x26a)](_0x2991a7(0x166)))==null?this[_0x2991a7(0x331)]():_0x309140;}[_0x1de16c(0x331)](){const _0x5a4be8=_0x1de16c;var _0xe2cd2;let _0x6c95a8=this['_configService'][_0x5a4be8(0x26a)](T);return(_0xe2cd2=_0x6c95a8==null?void 0x0:_0x6c95a8[_0x5a4be8(0x145)])==null?_0x5a4be8(0x2b7):_0xe2cd2;}async[_0x1de16c(0x3d9)](_0x219be6,_0x53cfc8){const _0x28fdb9=_0x1de16c;let _0x447ab3='/universer-api/snapshot/'+_0x53cfc8[_0x28fdb9(0x1a0)]+_0x28fdb9(0x192)+_0x53cfc8[_0x28fdb9(0x378)]+_0x28fdb9(0x1ed);return(await this[_0x28fdb9(0x367)][_0x28fdb9(0x373)](_0x447ab3,{'params':{'resourceId':JSON[_0x28fdb9(0x2d8)](_0x53cfc8[_0x28fdb9(0x362)])}}))[_0x28fdb9(0x401)];}[_0x1de16c(0x19c)](){const _0x649aa6=_0x1de16c;throw Error(_0x649aa6(0x22c));}[_0x1de16c(0x242)](){const _0x507c64=_0x1de16c;throw Error(_0x507c64(0x22c));}[_0x1de16c(0x136)](){const _0x29c764=_0x1de16c;throw Error(_0x29c764(0x22c));}[_0x1de16c(0x29b)](){const _0x46094d=_0x1de16c;throw Error(_0x46094d(0x22c));}[_0x1de16c(0x28a)](){const _0x2d5ea1=_0x1de16c;throw Error(_0x2d5ea1(0x22c));}[_0x1de16c(0x207)](){const _0x23b0fd=_0x1de16c;throw Error(_0x23b0fd(0x22c));}};Z=y([v(0x0,t[_0x1de16c(0x3cb)]),v(0x1,(0x0,t[_0x1de16c(0x20f)])(c[_0x1de16c(0x14d)]))],Z);let Q=class extends t['LocalUndoRedoService']{constructor(_0x1c1f8b,_0x45085e,_0x1f8ef8,_0x2d9161,_0x305b5c){const _0x2377f0=_0x1de16c;super(_0x1c1f8b,_0x45085e,_0x1f8ef8),this['_transformService']=_0x2d9161,this[_0x2377f0(0x30d)]=_0x305b5c;}['transformUndoRedo'](_0x2c21e6,_0x2732b5){const _0x3b326c=_0x1de16c;let _0x89aa77=this[_0x3b326c(0x2a9)](_0x2c21e6);if(_0x89aa77)try{let _0x51a58b=this[_0x3b326c(0x3e8)](_0x89aa77,_0x2732b5);this[_0x3b326c(0x179)](_0x2c21e6,_0x51a58b);}catch(_0x330c0c){this[_0x3b326c(0x30d)]['error'](_0x3b326c(0x35b),_0x330c0c),this[_0x3b326c(0x389)](_0x2c21e6);}let _0x429ad0=this['_getRedoStack'](_0x2c21e6);if(_0x429ad0)try{let _0x16c1c9=this[_0x3b326c(0x3e8)](_0x429ad0,_0x2732b5);this[_0x3b326c(0x2d0)](_0x2c21e6,_0x16c1c9);}catch(_0x5994b8){this['_logService'][_0x3b326c(0x1e3)](_0x5994b8),this[_0x3b326c(0x2cb)](_0x2c21e6);}}[_0x1de16c(0x389)](_0x3a2f78){const _0x152f21=_0x1de16c;let _0x20edaa=this[_0x152f21(0x2a9)](_0x3a2f78);_0x20edaa&&(_0x20edaa['length']=0x0,this['_updateStatus']());}[_0x1de16c(0x2cb)](_0x5011d2){const _0x406c75=_0x1de16c;let _0x442ee2=this[_0x406c75(0x236)](_0x5011d2);_0x442ee2&&(_0x442ee2['length']=0x0,this[_0x406c75(0x222)]());}['_substituteUndoStack'](_0x568944,_0x28d381){const _0x444eea=_0x1de16c;this['_undoStacks'][_0x444eea(0x248)](_0x568944,_0x28d381),this['_updateStatus']();}['_substituteRedoStack'](_0x21bc79,_0x7c58ad){const _0xe15f9d=_0x1de16c;this['_redoStacks'][_0xe15f9d(0x248)](_0x21bc79,_0x7c58ad),this[_0xe15f9d(0x222)]();}['_transformStack'](_0xba5873,_0x17a590){const _0x4354e2=_0x1de16c;let _0x19cfc0=[],_0x2d2327=_0x17a590,_0xe93503=_0x17a590;for(let _0x2ba8cb=_0xba5873[_0x4354e2(0x3c7)]-0x1;_0x2ba8cb>=0x0;_0x2ba8cb--){let {unitID:_0x10faa8,undoMutations:_0x4fb8c7,redoMutations:_0x215636}=_0xba5873[_0x2ba8cb],_0x54cf07=this[_0x4354e2(0x226)]['transformMutationsWithChangeset'](_0x2d2327,_0x4fb8c7),_0x46780d=this[_0x4354e2(0x226)][_0x4354e2(0x307)](_0xe93503,_0x215636);if((0x0,e[_0x4354e2(0x280)])(_0x54cf07)||(0x0,e[_0x4354e2(0x280)])(_0x46780d)){this[_0x4354e2(0x30d)]['error'](_0x4354e2(0x35b),_0x4354e2(0x2da),_0x54cf07,_0x46780d);break;}_0x2d2327=_0x54cf07[_0x4354e2(0x38e)],_0xe93503=_0x46780d[_0x4354e2(0x38e)],_0x19cfc0[_0x4354e2(0x186)]({'unitID':_0x10faa8,'undoMutations':_0x54cf07['m2Prime'],'redoMutations':_0x46780d[_0x4354e2(0x249)]});}return _0x19cfc0[_0x4354e2(0x30f)]();}};Q=y([v(0x0,t['IUniverInstanceService']),v(0x1,t[_0x1de16c(0x2a8)]),v(0x2,t[_0x1de16c(0x3bd)]),v(0x3,e[_0x1de16c(0x13c)]),v(0x4,t[_0x1de16c(0x243)])],Q);let $=class extends t['Plugin']{constructor(_0x3d804d={},_0x5920d9,_0x245574,_0x263dfa){const _0x2327f1=_0x1de16c;super(),this[_0x2327f1(0x405)]=_0x3d804d,this[_0x2327f1(0x30d)]=_0x5920d9,this[_0x2327f1(0x16d)]=_0x245574,this['_configService']=_0x263dfa;let {..._0x1d95eb}=(0x0,t[_0x2327f1(0x391)])({},de,_0x3d804d);if(!_0x1d95eb['socketService'])throw Error(_0x2327f1(0x2a3));this[_0x2327f1(0x405)]=_0x1d95eb,this[_0x2327f1(0x2aa)]['setConfig'](T,_0x1d95eb);}[_0x1de16c(0x334)](){const _0x3eb148=_0x1de16c;this[_0x3eb148(0x2b1)](),this[_0x3eb148(0x15a)]();}[_0x1de16c(0x2b1)](){const _0x1b7024=_0x1de16c;var _0x1bc7a2,_0x1d219e;this[_0x1b7024(0x16d)][_0x1b7024(0x1c7)](t[_0x1b7024(0x374)])&&this['_logService'][_0x1b7024(0x1e3)](_0x1b7024(0x149),_0x1b7024(0x2c6));let _0x3e5a3c=(0x0,t[_0x1b7024(0x288)])([[t[_0x1b7024(0x374)],{'useClass':Q}],[H],[b],[C],[W],[K],[ie],[X],[_],[q],[B,{'useClass':this[_0x1b7024(0x405)]['socketService']}],[e['ISnapshotServerService'],{'useClass':Z}],[t[_0x1b7024(0x2b4)],{'useClass':G}],[u[_0x1b7024(0x1de)],{'useClass':J}],[t[_0x1b7024(0x15b)],{'useClass':Y}],[U],[Me]],(_0x1bc7a2=this[_0x1b7024(0x405)])==null?void 0x0:_0x1bc7a2[_0x1b7024(0x1b1)]);if(!((_0x1d219e=this[_0x1b7024(0x405)])!=null&&_0x1d219e['enableSingleActiveInstanceLock'])){let _0x1630ef=_0x3e5a3c[_0x1b7024(0x3fc)](([_0x11c30b])=>_0x11c30b===w);_0x1630ef!==-0x1&&_0x3e5a3c[_0x1b7024(0x284)](_0x1630ef,0x1);}(0x0,t[_0x1b7024(0x37f)])(this[_0x1b7024(0x16d)],_0x3e5a3c);}[_0x1de16c(0x15a)](){const _0x417d7e=_0x1de16c;var _0x17e78e,_0x373a91;if(this[_0x417d7e(0x16d)][_0x417d7e(0x373)](c['HTTPService'])[_0x417d7e(0x400)]({'priority':0x14,'interceptor':(0x0,c[_0x417d7e(0x2e8)])({'maxParallel':0x6})}),!((_0x17e78e=this[_0x417d7e(0x405)])!=null&&_0x17e78e['enableOfflineEditing'])){var _0x24ad6e;(_0x24ad6e=this[_0x417d7e(0x16d)][_0x417d7e(0x373)](S,t[_0x417d7e(0x23c)][_0x417d7e(0x39b)]))==null||_0x24ad6e['disableLocalCache']();}(_0x373a91=this[_0x417d7e(0x405)])!=null&&_0x373a91[_0x417d7e(0x403)]&&(0x0,t[_0x417d7e(0x34e)])(this[_0x417d7e(0x16d)],[[W]]),(0x0,t['touchDependencies'])(this[_0x417d7e(0x16d)],[[K],[U],[X]]);}};g($,_0x1de16c(0x347),'UNIVER_COLLABORATION_CLIENT_PLUGIN'),g($,_0x1de16c(0x1f5),Ae),g($,_0x1de16c(0x23b),je),$=y([(0x0,t[_0x1de16c(0x371)])(l[_0x1de16c(0x1e0)],e[_0x1de16c(0x302)],c['UniverNetworkPlugin']),v(0x1,t[_0x1de16c(0x243)]),v(0x2,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x25d)])),v(0x3,t['IConfigService'])],$),Object[_0x1de16c(0x310)](exports,'AuthzIoHttpService',{'enumerable':!0x0,'get':function(){return G;}}),Object[_0x1de16c(0x310)](exports,_0x1de16c(0x1cd),{'enumerable':!0x0,'get':function(){return M;}}),Object['defineProperty'](exports,_0x1de16c(0x1f8),{'enumerable':!0x0,'get':function(){return N;}}),exports['COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY']=T,Object[_0x1de16c(0x310)](exports,_0x1de16c(0x2ec),{'enumerable':!0x0,'get':function(){return U;}}),Object[_0x1de16c(0x310)](exports,_0x1de16c(0x144),{'enumerable':!0x0,'get':function(){return L;}}),Object[_0x1de16c(0x310)](exports,_0x1de16c(0x382),{'enumerable':!0x0,'get':function(){return J;}}),Object[_0x1de16c(0x310)](exports,_0x1de16c(0x27c),{'enumerable':!0x0,'get':function(){return x;}}),Object['defineProperty'](exports,_0x1de16c(0x1fc),{'enumerable':!0x0,'get':function(){return H;}}),Object['defineProperty'](exports,_0x1de16c(0x17b),{'enumerable':!0x0,'get':function(){return V;}}),exports[_0x1de16c(0x16a)]=Se,exports[_0x1de16c(0x3d6)]=re,exports[_0x1de16c(0x173)]=_,Object[_0x1de16c(0x310)](exports,_0x1de16c(0x1b0),{'enumerable':!0x0,'get':function(){return Q;}}),exports[_0x1de16c(0x279)]=ie,Object[_0x1de16c(0x310)](exports,'ConflictState',{'enumerable':!0x0,'get':function(){return P;}}),exports[_0x1de16c(0x196)]=p,exports[_0x1de16c(0x3ac)]=_0x1de16c(0x1d0),exports[_0x1de16c(0x2ad)]=_0x1de16c(0x3af),Object['defineProperty'](exports,_0x1de16c(0x406),{'enumerable':!0x0,'get':function(){return q;}}),Object[_0x1de16c(0x310)](exports,'DocCollaborationEntity',{'enumerable':!0x0,'get':function(){return R;}}),Object[_0x1de16c(0x310)](exports,_0x1de16c(0x351),{'enumerable':!0x0,'get':function(){return I;}}),exports['HEARTBEAT_INTERVAL_KEY']=_0x1de16c(0x143),exports[_0x1de16c(0x2a2)]=_0x1de16c(0x2c0),exports[_0x1de16c(0x18e)]=B,exports['ILocalCacheService']=S,exports['INetworkConditionService']=Ee,exports['ISingleActiveUnitService']=w,exports[_0x1de16c(0x35d)]=0x3e8,exports[_0x1de16c(0x2d6)]=_0x1de16c(0x35d),Object[_0x1de16c(0x310)](exports,_0x1de16c(0x16b),{'enumerable':!0x0,'get':function(){return b;}}),Object[_0x1de16c(0x310)](exports,'MentionIoHttpService',{'enumerable':!0x0,'get':function(){return Y;}}),Object[_0x1de16c(0x310)](exports,_0x1de16c(0x180),{'enumerable':!0x0,'get':function(){return F;}}),Object['defineProperty'](exports,_0x1de16c(0x1c2),{'enumerable':!0x0,'get':function(){return j;}}),exports[_0x1de16c(0x15d)]=_0x1de16c(0x227),exports[_0x1de16c(0x253)]='RETRY_CONNECTING_MAX_COUNT',exports[_0x1de16c(0x235)]=oe,Object['defineProperty'](exports,_0x1de16c(0x1b4),{'enumerable':!0x0,'get':function(){return z;}}),Object[_0x1de16c(0x310)](exports,_0x1de16c(0x397),{'enumerable':!0x0,'get':function(){return C;}}),Object['defineProperty'](exports,'SnapshotServerOverHTTPService',{'enumerable':!0x0,'get':function(){return Z;}}),Object['defineProperty'](exports,_0x1de16c(0x275),{'enumerable':!0x0,'get':function(){return A;}}),exports['UnitStatus']=ue,Object['defineProperty'](exports,'UniverCollaborationClientPlugin',{'enumerable':!0x0,'get':function(){return $;}}),exports[_0x1de16c(0x211)]=De,exports['getLocalCacheKey']=ce,exports['serializeCombRequest']=Oe;
1
+ const _0x545128=_0x4024;(function(_0x2f0128,_0x332042){const _0x5cb4c8=_0x4024,_0x16ea4b=_0x2f0128();while(!![]){try{const _0x14442e=-parseInt(_0x5cb4c8(0x3f7))/0x1+-parseInt(_0x5cb4c8(0x3ed))/0x2*(parseInt(_0x5cb4c8(0x426))/0x3)+-parseInt(_0x5cb4c8(0x4c0))/0x4*(parseInt(_0x5cb4c8(0x22d))/0x5)+parseInt(_0x5cb4c8(0x26c))/0x6*(-parseInt(_0x5cb4c8(0x254))/0x7)+-parseInt(_0x5cb4c8(0x47e))/0x8+parseInt(_0x5cb4c8(0x343))/0x9+-parseInt(_0x5cb4c8(0x429))/0xa*(-parseInt(_0x5cb4c8(0x30f))/0xb);if(_0x14442e===_0x332042)break;else _0x16ea4b['push'](_0x16ea4b['shift']());}catch(_0x26dd51){_0x16ea4b['push'](_0x16ea4b['shift']());}}}(_0x3e56,0x44e54),Object[_0x545128(0x34a)](exports,Symbol[_0x545128(0x2d5)],{'value':_0x545128(0x3f8)}));let e=require('@univerjs-pro/bases'),t=require('@univerjs-pro/collaboration'),n=require('@univerjs/core'),r=require('@univerjs/docs'),i=require('@univerjs/sheets'),a=require('rxjs'),o=require('@univerjs/protocol'),s=require('@univerjs/telemetry'),c=require('rxjs/operators'),l=require('@univerjs-pro/slides'),u=require('@univerjs/network'),d=require('@univerjs-pro/license'),f=require('@univerjs/drawing'),p=require('@noble/ciphers/aes.js'),m=require('@noble/ciphers/utils.js');const h='collaboration-client.config',ee={},te=_0x545128(0x2a7),ne=0x4e20;function re(_0x15ae4b){const _0x4ae8e2=_0x545128;return JSON[_0x4ae8e2(0x4a3)](_0x15ae4b)[_0x4ae8e2(0x38a)];}function g(_0x322195){'@babel/helpers - typeof';const _0x43355c=_0x545128;return g=typeof Symbol==_0x43355c(0x2d7)&&typeof Symbol[_0x43355c(0x38b)]==_0x43355c(0x3ef)?function(_0x5e8fd6){return typeof _0x5e8fd6;}:function(_0x3cc4d3){const _0x1c899c=_0x43355c;return _0x3cc4d3&&typeof Symbol=='function'&&_0x3cc4d3[_0x1c899c(0x290)]===Symbol&&_0x3cc4d3!==Symbol[_0x1c899c(0x392)]?'symbol':typeof _0x3cc4d3;},g(_0x322195);}function ie(_0x5a907c,_0xd7ada5){const _0x3c2a70=_0x545128;if(g(_0x5a907c)!='object'||!_0x5a907c)return _0x5a907c;var _0x292d60=_0x5a907c[Symbol['toPrimitive']];if(_0x292d60!==void 0x0){var _0x5b20d5=_0x292d60[_0x3c2a70(0x339)](_0x5a907c,_0xd7ada5||_0x3c2a70(0x24a));if(g(_0x5b20d5)!='object')return _0x5b20d5;throw TypeError(_0x3c2a70(0x341));}return(_0xd7ada5===_0x3c2a70(0x2f0)?String:Number)(_0x5a907c);}function ae(_0x3c3ecc){const _0x8c346f=_0x545128;var _0x5e2dd7=ie(_0x3c3ecc,_0x8c346f(0x2f0));return g(_0x5e2dd7)==_0x8c346f(0x3ef)?_0x5e2dd7:_0x5e2dd7+'';}function _(_0x4b77c9,_0x145379,_0x3984d1){const _0x2ad444=_0x545128;return(_0x145379=ae(_0x145379))in _0x4b77c9?Object[_0x2ad444(0x34a)](_0x4b77c9,_0x145379,{'value':_0x3984d1,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4b77c9[_0x145379]=_0x3984d1,_0x4b77c9;}let oe=function(_0x1b2364){const _0x3da6d5=_0x545128;return _0x1b2364[_0x3da6d5(0x201)]=_0x3da6d5(0x201),_0x1b2364[_0x3da6d5(0x35d)]='PERMISSION_DENIED',_0x1b2364[_0x3da6d5(0x2b0)]=_0x3da6d5(0x2b0),_0x1b2364[_0x3da6d5(0x337)]=_0x3da6d5(0x337),_0x1b2364['JOIN_ROOM_FAILED']='JOIN_ROOM_FAILED',_0x1b2364['SOCKET_FAILED_RETRY']='SOCKET_FAILED_RETRY',_0x1b2364['SOCKET_FAILED']=_0x3da6d5(0x239),_0x1b2364['SUBMIT_CHANGESET_TIMEOUT']='SUBMIT_CHANGESET_TIMEOUT',_0x1b2364;}({});var v=class{constructor(){const _0x47efb2=_0x545128;_(this,_0x47efb2(0x3a8),new a[(_0x47efb2(0x335))]()),_(this,_0x47efb2(0x40e),this[_0x47efb2(0x3a8)][_0x47efb2(0x49e)]());}['emitEvent'](_0x19dd0f){const _0x587a3e=_0x545128;this['_event$'][_0x587a3e(0x2c2)](_0x19dd0f);}},se=class{constructor(){const _0x151c1f=_0x545128;_(this,_0x151c1f(0x494),new a[(_0x151c1f(0x335))]()),_(this,_0x151c1f(0x375),this[_0x151c1f(0x494)][_0x151c1f(0x49e)]());}[_0x545128(0x2aa)](_0x2c25a9){const _0x26da60=_0x545128;this['_commentUpdate$'][_0x26da60(0x2c2)](_0x2c25a9);}};function y(_0x97fac2,_0x16d628){return function(_0x5bdd63,_0x32f2be){_0x16d628(_0x5bdd63,_0x32f2be,_0x97fac2);};}function b(_0x61aad4,_0x4e375c,_0x1654d9,_0x45c425){const _0x49118d=_0x545128;var _0x493c3c=arguments[_0x49118d(0x38a)],_0xa09dac=_0x493c3c<0x3?_0x4e375c:_0x45c425===null?_0x45c425=Object[_0x49118d(0x40f)](_0x4e375c,_0x1654d9):_0x45c425,_0x397d64;if(typeof Reflect==_0x49118d(0x305)&&typeof Reflect[_0x49118d(0x2bb)]==_0x49118d(0x2d7))_0xa09dac=Reflect[_0x49118d(0x2bb)](_0x61aad4,_0x4e375c,_0x1654d9,_0x45c425);else{for(var _0x4054d4=_0x61aad4['length']-0x1;_0x4054d4>=0x0;_0x4054d4--)(_0x397d64=_0x61aad4[_0x4054d4])&&(_0xa09dac=(_0x493c3c<0x3?_0x397d64(_0xa09dac):_0x493c3c>0x3?_0x397d64(_0x4e375c,_0x1654d9,_0xa09dac):_0x397d64(_0x4e375c,_0x1654d9))||_0xa09dac);}return _0x493c3c>0x3&&_0xa09dac&&Object[_0x49118d(0x34a)](_0x4e375c,_0x1654d9,_0xa09dac),_0xa09dac;}let x=class extends n['Disposable']{constructor(_0xefc8f5,_0x7f43f5){const _0x80738b=_0x545128;super(),this[_0x80738b(0x1e7)]=_0xefc8f5,this[_0x80738b(0x445)]=_0x7f43f5,_(this,'_roomMembers',new Map()),_(this,_0x80738b(0x354),new a[(_0x80738b(0x335))]()),this['disposeWithMe']((0x0,a['merge'])(this[_0x80738b(0x1e7)][_0x80738b(0x22c)](n['UniverInstanceType'][_0x80738b(0x424)])['pipe']((0x0,c[_0x80738b(0x2d9)])(_0x528169=>_0x528169[_0x80738b(0x3bb)]())),this[_0x80738b(0x1e7)][_0x80738b(0x22c)](n['UniverInstanceType']['UNIVER_DOC'])[_0x80738b(0x259)]((0x0,c[_0x80738b(0x2d9)])(_0x798f42=>_0x798f42[_0x80738b(0x3bb)]())),this['_univerInstanceService']['getTypeOfUnitDisposed$'](n[_0x80738b(0x251)][_0x80738b(0x291)])[_0x80738b(0x259)]((0x0,c[_0x80738b(0x2d9)])(_0x476ec5=>_0x476ec5['getUnitId']())))['subscribe'](_0x146dd5=>this[_0x80738b(0x48b)](_0x146dd5)));}[_0x545128(0x212)](_0x471dd8){const _0x142065=_0x545128;return this['_roomMembers'][_0x142065(0x44f)](_0x471dd8)?(0x0,a['of'])(this[_0x142065(0x307)][_0x142065(0x2f7)](_0x471dd8)):this[_0x142065(0x354)][_0x142065(0x259)]((0x0,c[_0x142065(0x2d9)])(_0x3c2a34=>{const _0x17b380=_0x142065;if(_0x3c2a34===_0x471dd8)return this[_0x17b380(0x307)][_0x17b380(0x2f7)](_0x3c2a34);}));}[_0x545128(0x4b2)](_0xb7756d){const _0x4453c1=_0x545128;this[_0x4453c1(0x445)][_0x4453c1(0x4b2)](_0xb7756d);}[_0x545128(0x40a)](){const _0x517272=_0x545128;return this[_0x517272(0x445)][_0x517272(0x40a)]();}[_0x545128(0x274)](_0x1ccfdb,_0x35277e){const _0x46a14e=_0x545128;let _0x5337ad=this['_roomMembers'][_0x46a14e(0x2f7)](_0x1ccfdb);_0x5337ad||(_0x5337ad=new ce(),this[_0x46a14e(0x307)][_0x46a14e(0x3f4)](_0x1ccfdb,_0x5337ad),this['_roomCreated$']['next'](_0x1ccfdb)),_0x5337ad['updateMember'](_0x35277e);}[_0x545128(0x2b8)](_0x7cadc1,_0x16afea){const _0x546fc4=_0x545128;let _0x4a59f0=this[_0x546fc4(0x307)]['get'](_0x7cadc1);_0x4a59f0&&_0x4a59f0[_0x546fc4(0x2b8)](_0x16afea);}[_0x545128(0x2c8)](_0x149b12){const _0x4ffdd8=_0x545128;return this['_roomMembers'][_0x4ffdd8(0x2f7)](_0x149b12);}[_0x545128(0x474)](_0x46e9a6,_0x109af8){const _0xa2d126=_0x545128;let _0x36a66e=this['_roomMembers'][_0xa2d126(0x2f7)](_0x46e9a6);if(_0x36a66e)return _0x36a66e[_0xa2d126(0x474)](_0x109af8);}['_removeRoom'](_0x2671f7){const _0x57c18=_0x545128;let _0x47ae47=this['_roomMembers'][_0x57c18(0x2f7)](_0x2671f7);_0x47ae47&&(_0x47ae47['dispose'](),this[_0x57c18(0x307)][_0x57c18(0x3b0)](_0x2671f7));}[_0x545128(0x25e)](){const _0x5c30c8=_0x545128;this[_0x5c30c8(0x307)][_0x5c30c8(0x295)](_0x5efbdf=>_0x5efbdf[_0x5c30c8(0x25e)]()),this[_0x5c30c8(0x307)][_0x5c30c8(0x47f)](),this[_0x5c30c8(0x354)]['complete']();}};x=b([y(0x0,n['IUniverInstanceService']),y(0x1,(0x0,n[_0x545128(0x304)])(n[_0x545128(0x34c)]))],x);var ce=class extends n[_0x545128(0x3de)]{constructor(..._0x10292b){const _0x2b899e=_0x545128;super(..._0x10292b),_(this,_0x2b899e(0x26a),new Map()),_(this,'_members$',new a[(_0x2b899e(0x3b2))](this[_0x2b899e(0x26a)])),_(this,_0x2b899e(0x310),this[_0x2b899e(0x263)][_0x2b899e(0x49e)]());}[_0x545128(0x25e)](){const _0x56826e=_0x545128;this['_members']['clear'](),this['_members$'][_0x56826e(0x417)]();}[_0x545128(0x274)](_0x163c27){const _0x4d5536=_0x545128;this[_0x4d5536(0x26a)]['set'](_0x163c27[_0x4d5536(0x33c)],_0x163c27),this[_0x4d5536(0x4d6)]();}[_0x545128(0x2b8)](_0x47c6dd){const _0x46a591=_0x545128;this['_members'][_0x46a591(0x3b0)](_0x47c6dd),this[_0x46a591(0x4d6)]();}[_0x545128(0x474)](_0xd50edc){const _0x2e9dc6=_0x545128;return this[_0x2e9dc6(0x26a)][_0x2e9dc6(0x2f7)](_0xd50edc);}[_0x545128(0x273)](){const _0x645ef4=_0x545128;return Array['from'](this[_0x645ef4(0x26a)]['values']());}[_0x545128(0x4d6)](){const _0x4d8002=_0x545128;this[_0x4d8002(0x263)][_0x4d8002(0x2c2)](this[_0x4d8002(0x26a)]);}};let le=function(_0x1d881a){const _0x458bb8=_0x545128;return _0x1d881a[_0x1d881a[_0x458bb8(0x40d)]=0x0]=_0x458bb8(0x40d),_0x1d881a[_0x1d881a['JOINING']=0x1]='JOINING',_0x1d881a[_0x1d881a[_0x458bb8(0x412)]=0x2]=_0x458bb8(0x412),_0x1d881a[_0x1d881a['ONLINE']=0x3]=_0x458bb8(0x469),_0x1d881a;}({});const ue={[o['CmdRspCode'][_0x545128(0x4b4)]]:_0x545128(0x493),[o[_0x545128(0x475)][_0x545128(0x462)]]:_0x545128(0x3c6),[o[_0x545128(0x475)][_0x545128(0x44c)]]:_0x545128(0x3bf),[o[_0x545128(0x475)][_0x545128(0x2d8)]]:_0x545128(0x453),[o[_0x545128(0x475)]['GLOBAL_ROOMS_CNT_EXCEEDS']]:_0x545128(0x319)};let S=class extends n[_0x545128(0x315)]{get[_0x545128(0x28f)](){const _0x541ea8=_0x545128;return this[_0x541ea8(0x243)][_0x541ea8(0x248)]();}constructor(_0x4cf229,_0x3a83fc,_0x5ac4bb,_0x19ff9c,_0x58c1d6,_0xee51a2,_0x1f1fff,_0x5655d1){const _0x25b0da=_0x545128;super(),this[_0x25b0da(0x489)]=_0x4cf229,this[_0x25b0da(0x4a2)]=_0x5ac4bb,this['_configService']=_0x19ff9c,this[_0x25b0da(0x2d3)]=_0x58c1d6,this['_commentService']=_0xee51a2,this[_0x25b0da(0x48f)]=_0x1f1fff,this[_0x25b0da(0x358)]=_0x5655d1,_(this,_0x25b0da(0x243),new a[(_0x25b0da(0x3b2))](0x0)),_(this,_0x25b0da(0x4a1),this[_0x25b0da(0x243)][_0x25b0da(0x49e)]()),_(this,'_event$',new a[(_0x25b0da(0x335))]()),_(this,_0x25b0da(0x40e),this['_event$']['asObservable']()),_(this,'_socket',void 0x0),_(this,'_socketMessageSubscription',void 0x0),_(this,_0x25b0da(0x490),void 0x0),_(this,_0x25b0da(0x216),!0x1),_(this,_0x25b0da(0x249),null),this['_shouldReportTelemetry']=!!this[_0x25b0da(0x358)],_0x3a83fc['pipe']((0x0,a[_0x25b0da(0x386)])(this[_0x25b0da(0x245)]))[_0x25b0da(0x31b)](_0x818a5c=>{const _0x721b6d=_0x25b0da;if(_0x818a5c!==void 0x0){if(this[_0x721b6d(0x443)]=_0x818a5c,_0x818a5c)this[_0x721b6d(0x210)](_0x818a5c),this[_0x721b6d(0x2d6)]=_0x818a5c[_0x721b6d(0x2c9)]['subscribe'](_0x5b1cd8=>{const _0x45ec42=_0x721b6d;_0x5b1cd8['routeKey']===this[_0x45ec42(0x489)]&&this[_0x45ec42(0x481)](_0x5b1cd8);});else{var _0x448263;this['_throwTelemetryCollaborationNewChangeset'](),this[_0x721b6d(0x243)][_0x721b6d(0x2c2)](0x2),(_0x448263=this['_socketMessageSubscription'])==null||_0x448263['unsubscribe'](),this['_socketMessageSubscription']=null;}}});}['getMemberID'](){const _0x1850de=_0x545128;var _0x591db5,_0x324212;return(_0x591db5=(_0x324212=this[_0x1850de(0x443)])==null?void 0x0:_0x324212[_0x1850de(0x33c)])==null?null:_0x591db5;}['dispose'](){const _0x460289=_0x545128;super[_0x460289(0x25e)](),this[_0x460289(0x2df)](),this[_0x460289(0x245)][_0x460289(0x2c2)](),this[_0x460289(0x245)][_0x460289(0x417)]();}['close'](){const _0x4bc34a=_0x545128;var _0x43fee4,_0x12954a;this['_throwTelemetryCollaborationNewChangeset'](),(_0x43fee4=this[_0x4bc34a(0x443)])==null||_0x43fee4[_0x4bc34a(0x1f7)]({'cmd':o[_0x4bc34a(0x2a2)][_0x4bc34a(0x1ee)],'data':{'roomID':this[_0x4bc34a(0x489)]}}),(_0x12954a=this[_0x4bc34a(0x443)])==null||_0x12954a['close'](),this[_0x4bc34a(0x3a8)][_0x4bc34a(0x417)](),this[_0x4bc34a(0x243)][_0x4bc34a(0x417)]();}[_0x545128(0x481)](_0x436bbc){const _0x4bd199=_0x545128;_0x436bbc[_0x4bd199(0x267)]===o['CombCmd']['JOIN']?this[_0x4bd199(0x400)](_0x436bbc):_0x436bbc['cmd']===o[_0x4bd199(0x2a2)][_0x4bd199(0x43f)]&&this['_onRecvEvent'](_0x436bbc);}[_0x545128(0x210)](_0xd2a4f){const _0x3c13c2=_0x545128;this[_0x3c13c2(0x243)][_0x3c13c2(0x2c2)](0x1),_0xd2a4f[_0x3c13c2(0x1f7)]({'cmd':o['CombCmd'][_0x3c13c2(0x413)],'routeKey':this[_0x3c13c2(0x489)],'routeType':'','data':{'rooms':[{'roomID':this[_0x3c13c2(0x489)]}]}});}[_0x545128(0x400)](_0x21f7f0){const _0x578ee9=_0x545128;var _0x5223c7;if(_0x21f7f0['code']in ue){this[_0x578ee9(0x48f)][_0x578ee9(0x214)]({'id':_0x578ee9(0x235),'data':ue[_0x21f7f0['code']]}),this[_0x578ee9(0x243)][_0x578ee9(0x2c2)](0x2);return;}this[_0x578ee9(0x243)][_0x578ee9(0x2c2)](0x3);let _0x3a1993=(_0x5223c7=_0x21f7f0[_0x578ee9(0x4b8)][_0x578ee9(0x3d4)][this[_0x578ee9(0x489)]])==null?void 0x0:_0x5223c7[_0x578ee9(0x255)];_0x3a1993&&_0x3a1993['forEach'](_0x4ebbb8=>this[_0x578ee9(0x2d3)][_0x578ee9(0x274)](this[_0x578ee9(0x489)],_0x4ebbb8));}['_onRecvEvent'](_0x168ec2){const _0x55e424=_0x545128;try{let _0x228a88=_0x168ec2['data'];switch(_0x228a88[_0x55e424(0x43a)]){case t[_0x55e424(0x27d)]['USERS_ENTER']:this['_onUserJoin'](_0x228a88),this[_0x55e424(0x3a8)][_0x55e424(0x2c2)](_0x228a88);break;case t[_0x55e424(0x27d)]['USERS_LEAVE']:this[_0x55e424(0x439)](_0x228a88),this['_event$'][_0x55e424(0x2c2)](_0x228a88);break;case t[_0x55e424(0x27d)][_0x55e424(0x3ff)]:case t[_0x55e424(0x27d)][_0x55e424(0x25a)]:this[_0x55e424(0x3e5)](),this[_0x55e424(0x2b6)](),this[_0x55e424(0x3a8)][_0x55e424(0x2c2)](_0x228a88);break;case t[_0x55e424(0x27d)]['MSG_FOR_ERROR']:this[_0x55e424(0x4a2)][_0x55e424(0x42e)](_0x55e424(0x41e)+JSON[_0x55e424(0x4a3)](_0x228a88)),this[_0x55e424(0x3a8)][_0x55e424(0x2c2)](_0x228a88);break;case t[_0x55e424(0x27d)]['COMMENT_UPDATE']:this[_0x55e424(0x38e)][_0x55e424(0x2aa)](_0x228a88['data']),this[_0x55e424(0x3a8)][_0x55e424(0x2c2)](_0x228a88);break;default:this['_event$']['next'](_0x228a88);}}catch(_0x1b6eb6){this[_0x55e424(0x4a2)]['error'](_0x1b6eb6,_0x168ec2);}}[_0x545128(0x237)](_0x30ed75){const _0x22894f=_0x545128;this[_0x22894f(0x2d3)][_0x22894f(0x274)](this[_0x22894f(0x489)],_0x30ed75[_0x22894f(0x4b8)]);}['_onUserLeave'](_0x2381df){const _0x2977f9=_0x545128;this[_0x2977f9(0x2d3)][_0x2977f9(0x2b8)](this[_0x2977f9(0x489)],_0x2381df[_0x2977f9(0x4b8)]['memberID']);}async[_0x545128(0x1f7)](_0x56970a,_0x3ab5c9){const _0x3c0cb7=_0x545128;if(this[_0x3c0cb7(0x28f)]!==0x3||!this['_socket'])throw Error(_0x3c0cb7(0x1fe));try{_0x56970a[_0x3c0cb7(0x43a)]===t[_0x3c0cb7(0x27d)][_0x3c0cb7(0x3b8)]&&(this[_0x3c0cb7(0x407)](),this[_0x3c0cb7(0x223)](_0x56970a)),this[_0x3c0cb7(0x443)][_0x3c0cb7(0x1f7)]({'cmd':o[_0x3c0cb7(0x2a2)][_0x3c0cb7(0x31d)],'routeKey':_0x3ab5c9,'routeType':'','data':_0x56970a});}catch(_0x3b5dc8){this['_logService'][_0x3c0cb7(0x42e)](_0x3b5dc8);}}[_0x545128(0x407)](){const _0x39574f=_0x545128;var _0x38050f;this[_0x39574f(0x490)]=setTimeout(()=>{const _0x48e78d=_0x39574f;this[_0x48e78d(0x490)]=null,this[_0x48e78d(0x48f)]['emitEvent']({'id':_0x48e78d(0x472)});},(_0x38050f=this[_0x39574f(0x2e4)][_0x39574f(0x2c0)](_0x39574f(0x465)))==null?ne:_0x38050f);}[_0x545128(0x2b6)](){const _0x92fdfc=_0x545128;this['_collaborationTimeoutTimer']&&(clearTimeout(this['_collaborationTimeoutTimer']),this[_0x92fdfc(0x490)]=null);}[_0x545128(0x223)](_0x474855){const _0x3cd7de=_0x545128;if(!this[_0x3cd7de(0x216)])return;let {data:_0x127ccd}=_0x474855,{unitID:_0x5a02de,changeset:_0x4fe9ab}=_0x127ccd,{mutations:_0x3eccc5,type:_0x5a55b0}=_0x4fe9ab;this[_0x3cd7de(0x249)]={'unitId':_0x5a02de,'type':_0x5a55b0,'startTime':performance['now'](),'stopTime':0x0,'duration':0x0,'size':re(_0x3eccc5)};}['_stopTelemetryCollaborationNewChangeset'](){const _0x392bb3=_0x545128;if(this[_0x392bb3(0x216)]){if(!this[_0x392bb3(0x249)]){this[_0x392bb3(0x4a2)][_0x392bb3(0x42e)](_0x392bb3(0x33f),'telemetry\x20info\x20is\x20not\x20initialized');return;}this['_telemetryInfo']['stopTime']=performance[_0x392bb3(0x3d6)](),this['_telemetryInfo'][_0x392bb3(0x238)]=this[_0x392bb3(0x249)][_0x392bb3(0x388)]-this[_0x392bb3(0x249)][_0x392bb3(0x20e)],this['_telemetryService'][_0x392bb3(0x39f)](_0x392bb3(0x464),this[_0x392bb3(0x249)]),this['_telemetryInfo']=null;}}[_0x545128(0x29a)](){const _0x595909=_0x545128;this[_0x595909(0x249)]=null;}};S=b([y(0x2,n[_0x545128(0x368)]),y(0x3,n['IConfigService']),y(0x4,(0x0,n[_0x545128(0x304)])(x)),y(0x5,(0x0,n['Inject'])(se)),y(0x6,(0x0,n[_0x545128(0x304)])(v)),y(0x7,(0x0,n[_0x545128(0x2da)])(s[_0x545128(0x1ea)]))],S);const C=(0x0,n[_0x545128(0x2c4)])(_0x545128(0x3ce));function de(_0x5b0a37){const _0x4cd74d=_0x545128;return _0x4cd74d(0x373)+_0x5b0a37;}function fe(_0x8f2404){const _0x4e502a=_0x545128;let {unitID:_0x56161b,mutations:_0x380976}=_0x8f2404;return{'unitId':_0x56161b,'subUnitId':_0x380976[_0x4e502a(0x38a)]>0x0?_0x380976[0x0]['params'][_0x4e502a(0x4ae)]:null};}let w=class{constructor(_0x3d5e26,_0x7c48c,_0x246550){const _0x3d4c43=_0x545128;this[_0x3d4c43(0x2f9)]=_0x3d5e26,this[_0x3d4c43(0x2ee)]=_0x7c48c,this[_0x3d4c43(0x3c8)]=_0x246550;}[_0x545128(0x25c)](_0x20f805){const _0x8a10e7=_0x545128;var _0x5cc387,_0x3eeac4;let _0x94f6a4=this[_0x8a10e7(0x2f9)][_0x8a10e7(0x2f7)](i[_0x8a10e7(0x35a)]),{unitId:_0x5071cd,subUnitId:_0x40dabf}=fe(_0x20f805),_0xb225cb=_0x94f6a4==null?void 0x0:_0x94f6a4['getWorkbookSelections'](_0x5071cd)[_0x8a10e7(0x33e)](),_0x3be61=(_0x5cc387=this[_0x8a10e7(0x3c8)][_0x8a10e7(0x200)](_0x5071cd))==null||(_0x5cc387=_0x5cc387[_0x8a10e7(0x36a)]())==null?void 0x0:_0x5cc387['getSheetId']();if(_0xb225cb[_0x8a10e7(0x38a)]===0x0||!_0x5071cd||!_0x40dabf)return;let _0x64d1d1=[{'id':i[_0x8a10e7(0x4da)]['id'],'params':{'unitId':_0x5071cd,'subUnitId':_0x3be61,'selections':n[_0x8a10e7(0x340)][_0x8a10e7(0x4cf)](_0xb225cb)}}],_0x427b5b=this['_transformService'][_0x8a10e7(0x23b)](_0x20f805,_0x64d1d1);if(!(0x0,t[_0x8a10e7(0x2b5)])(_0x427b5b))throw _0x427b5b[_0x8a10e7(0x42e)];let _0x3641df=(_0x3eeac4=_0x427b5b[_0x8a10e7(0x2e8)][0x0])==null||(_0x3eeac4=_0x3eeac4[_0x8a10e7(0x36d)])==null?void 0x0:_0x3eeac4[_0x8a10e7(0x2ed)];if(Array[_0x8a10e7(0x32e)](_0x3641df)&&_0x3641df[_0x8a10e7(0x38a)]){if(_0x3641df[_0x8a10e7(0x38a)]===_0x64d1d1[0x0][_0x8a10e7(0x36d)][_0x8a10e7(0x2ed)][_0x8a10e7(0x38a)]&&_0x3641df[_0x8a10e7(0x441)]((_0x23f1b5,_0x1cad6a)=>n[_0x8a10e7(0x4bf)][_0x8a10e7(0x4d7)](_0x23f1b5['range'],_0x64d1d1[0x0][_0x8a10e7(0x36d)][_0x8a10e7(0x2ed)][_0x1cad6a][_0x8a10e7(0x276)])))return;this[_0x8a10e7(0x2f9)][_0x8a10e7(0x2f7)](n[_0x8a10e7(0x419)])[_0x8a10e7(0x3e3)](i[_0x8a10e7(0x4da)]['id'],{'unitId':_0x5071cd,'subUnitId':_0x3be61,'selections':_0x3641df});}}};w=b([y(0x0,(0x0,n[_0x545128(0x304)])(n[_0x545128(0x24d)])),y(0x1,t[_0x545128(0x35b)]),y(0x2,n[_0x545128(0x4c4)])],w);const T=(0x0,n[_0x545128(0x2c4)])('univer-pro.collaboration-client.single-active-unit-service');let pe=function(_0xf91317){const _0x26fb87=_0x545128;return _0xf91317[_0xf91317[_0x26fb87(0x446)]=0x0]=_0x26fb87(0x446),_0xf91317[_0xf91317[_0x26fb87(0x432)]=0x1]=_0x26fb87(0x432),_0xf91317;}({});function me(_0x4e0689){const _0x40f3f0=_0x545128;var _0x5448d5;return!!((_0x5448d5=_0x4e0689[_0x40f3f0(0x36d)])!=null&&_0x5448d5[_0x40f3f0(0x29c)]);}const he=new Set([i[_0x545128(0x3e2)]['id']]),ge=new Set([l[_0x545128(0x422)]['id'],l[_0x545128(0x4a8)]['id'],l[_0x545128(0x1f4)]['id'],l['RemoveSlidePageMutation']['id']]);function _e(_0x54fffc,_0x39fc0f=he){const _0x31c70a=_0x545128;let _0x40c9e3=[];for(let _0x34d741 of _0x54fffc){if(_0x39fc0f[_0x31c70a(0x44f)](_0x34d741['id'])){if(_0x40c9e3[_0x31c70a(0x38a)]>0x0)break;_0x40c9e3[_0x31c70a(0x3f5)](_0x34d741);break;}if(me(_0x34d741)){if(_0x40c9e3['length']>0x0)break;_0x40c9e3[_0x31c70a(0x3f5)](_0x34d741);break;}_0x40c9e3[_0x31c70a(0x3f5)](_0x34d741);}return _0x40c9e3;}function ve(_0x348594,_0x4eae4d,_0x5a523c,_0x351534,_0x330ced){const _0x5a42c0=_0x545128;var _0x44e286,_0xd4bbc,_0x8eef21,_0x334a3a;let _0x4a289f=_e(_0x348594),_0x36dfde=(_0x44e286=(_0xd4bbc=_0x330ced[_0x5a42c0(0x40a)]())==null?void 0x0:_0xd4bbc[_0x5a42c0(0x28c)])==null?_0x5a42c0(0x2d4):_0x44e286,_0x16fcf1=(_0x8eef21=(_0x334a3a=_0x330ced[_0x5a42c0(0x40a)]())==null?void 0x0:_0x334a3a[_0x5a42c0(0x33c)])==null?_0x5a42c0(0x2d4):_0x8eef21;return{'changeset':{'unitID':_0x4eae4d,'type':(0x0,t[_0x5a42c0(0x486)])(_0x5a523c[_0x5a42c0(0x206)](_0x4eae4d)),'baseRev':_0x351534['getCurrentRevOfUnit'](_0x4eae4d),'revision':0x0,'userID':_0x36dfde,'memberID':_0x16fcf1,'mutations':_0x4a289f},'pendingMutations':_0x348594[_0x5a42c0(0x2f6)](_0x4a289f[_0x5a42c0(0x38a)])};}const ye=ve;function be(_0x14d788,_0x2e1b20,_0x32a955,_0x5e9f78,_0x5d1b56){return ve(_0x14d788,_0x2e1b20,_0x32a955,_0x5e9f78,_0x5d1b56);}function xe(_0x5bcced,_0x59e985,_0x36210f,_0x376013,_0x2cf638){const _0xfe21ce=_0x545128;var _0x2a779d,_0x172b70,_0x2ac63d,_0x51f7cf;let _0x5ed99c=_e(_0x5bcced,ge),_0x1cdf52=(_0x2a779d=(_0x172b70=_0x2cf638[_0xfe21ce(0x40a)]())==null?void 0x0:_0x172b70[_0xfe21ce(0x28c)])==null?_0xfe21ce(0x2d4):_0x2a779d,_0x14292c=(_0x2ac63d=(_0x51f7cf=_0x2cf638[_0xfe21ce(0x40a)]())==null?void 0x0:_0x51f7cf['memberID'])==null?'unknown':_0x2ac63d;return{'changeset':{'unitID':_0x59e985,'type':(0x0,t[_0xfe21ce(0x486)])(_0x36210f[_0xfe21ce(0x206)](_0x59e985)),'baseRev':_0x376013[_0xfe21ce(0x4ab)](_0x59e985),'revision':0x0,'userID':_0x1cdf52,'memberID':_0x14292c,'mutations':_0x5ed99c},'pendingMutations':_0x5bcced[_0xfe21ce(0x2f6)](_0x5ed99c[_0xfe21ce(0x38a)])};}function Se(_0x22a945,_0x176c43,_0x5672b8,_0x300cb3,_0x5a5a87){const _0xa1ecd9=_0x545128;var _0x22bc8d,_0x2d043e,_0x3768b6,_0x73df5e;let _0x4bc5ef=_0x22a945[_0xa1ecd9(0x29b)]((_0x1e83b7,_0x2b7e64)=>{const _0x41ced2=_0xa1ecd9;let _0x526705=_0x1e83b7[_0x1e83b7['length']-0x1],{id:_0x1ddca3}=_0x526705==null?{}:_0x526705,{id:_0x5b5698,type:_0x4cd8a7}=_0x2b7e64,_0x5c33b4=_0x2b7e64[_0x41ced2(0x36d)];if(_0x1ddca3&&_0x1ddca3!==_0x5b5698)throw Error('Cannot\x20assemble\x20a\x20changeset\x20from\x20multiple\x20mutations\x20of\x20different\x20types:\x20'+_0x1ddca3+_0x41ced2(0x3a9)+_0x5b5698+'.');if(!_0x526705)return[{'id':_0x5b5698,'type':_0x4cd8a7,'params':{'unitId':_0x5c33b4[_0x41ced2(0x222)],'textRanges':_0x5c33b4[_0x41ced2(0x311)],'actions':_0x5c33b4[_0x41ced2(0x449)]}}];let _0x3725d5=_0x526705[_0x41ced2(0x36d)];return Ce(_0x3725d5[_0x41ced2(0x449)],_0x5c33b4[_0x41ced2(0x449)])?[..._0x1e83b7[_0x41ced2(0x2f6)](0x0,-0x1),{..._0x526705,'id':_0x5b5698,'type':_0x4cd8a7,'params':{'unitId':_0x5c33b4['unitId'],'textRanges':_0x5c33b4[_0x41ced2(0x311)],'actions':n[_0x41ced2(0x4cb)]['compose'](_0x3725d5['actions'],_0x5c33b4[_0x41ced2(0x449)])}}]:[..._0x1e83b7,{'id':_0x5b5698,'type':_0x4cd8a7,'params':{'unitId':_0x5c33b4['unitId'],'textRanges':_0x5c33b4[_0x41ced2(0x311)],'actions':_0x5c33b4[_0x41ced2(0x449)]}}];},[]),_0x1cae03=(_0x22bc8d=(_0x2d043e=_0x5a5a87[_0xa1ecd9(0x40a)]())==null?void 0x0:_0x2d043e['userID'])==null?'unknown':_0x22bc8d,_0x23397d=(_0x3768b6=(_0x73df5e=_0x5a5a87[_0xa1ecd9(0x40a)]())==null?void 0x0:_0x73df5e[_0xa1ecd9(0x33c)])==null?_0xa1ecd9(0x2d4):_0x3768b6;return{'changeset':{'unitID':_0x176c43,'type':(0x0,t['mapDocumentTypeToUniverInstanceType'])(_0x5672b8['getUnitType'](_0x176c43)),'baseRev':_0x300cb3[_0xa1ecd9(0x4ab)](_0x176c43),'revision':0x0,'userID':_0x1cae03,'memberID':_0x23397d,'mutations':_0x4bc5ef},'pendingMutations':_0x22a945['slice'](_0x22a945[_0xa1ecd9(0x38a)])};}function Ce(_0x37bbde,_0x48ac42){return we(_0x37bbde)&&we(_0x48ac42)&&!Te(_0x37bbde)&&!Te(_0x48ac42);}function we(_0x1a196f){const _0x43b03f=_0x545128;return Ee(_0x1a196f)['some'](_0x4e0a82=>De(_0x4e0a82)&&_0x4e0a82['et']===_0x43b03f(0x366));}function Te(_0x281866){const _0x471689=_0x545128;return Ee(_0x281866)[_0x471689(0x39b)](_0x102c2f=>Array[_0x471689(0x32e)](_0x102c2f)||typeof _0x102c2f==_0x471689(0x2f0)||typeof _0x102c2f==_0x471689(0x2e0));}function Ee(_0x457ffe){const _0x51f827=_0x545128;if(!Array[_0x51f827(0x32e)](_0x457ffe))return[];let _0x37f818=_0x457ffe['includes'](_0x51f827(0x3b3))?_0x457ffe:_0x457ffe[_0x51f827(0x467)](_0x4e0dd4=>Array[_0x51f827(0x32e)](_0x4e0dd4)&&_0x4e0dd4[_0x51f827(0x4ac)](_0x51f827(0x3b3)));if(!Array[_0x51f827(0x32e)](_0x37f818))return[];let _0x591f07=_0x37f818[_0x51f827(0x23a)](_0x51f827(0x3b3));return _0x591f07===-0x1?[]:_0x37f818[_0x51f827(0x2f6)](_0x591f07+0x1);}function De(_0x221840){const _0x3a8167=_0x545128;return typeof _0x221840==_0x3a8167(0x305)&&!!_0x221840&&!Array[_0x3a8167(0x32e)](_0x221840);}function Oe(_0x5c0e41,_0x56876a){const _0x4a44dd=_0x545128;let _0x391c91=new a[(_0x4a44dd(0x3d8))](0x1);return setTimeout(()=>_0x391c91[_0x4a44dd(0x2c2)](_0x56876a),_0x5c0e41),_0x391c91['asObservable']()[_0x4a44dd(0x259)]((0x0,a[_0x4a44dd(0x344)])(0x1));}var E,D,O;let ke=function(_0x4b559d){const _0x373340=_0x545128;return _0x4b559d['NOT_COLLAB']='not_collab',_0x4b559d['SYNCED']=_0x373340(0x41b),_0x4b559d[_0x373340(0x299)]='pending',_0x4b559d[_0x373340(0x394)]=_0x373340(0x1ed),_0x4b559d[_0x373340(0x451)]=_0x373340(0x37b),_0x4b559d['FETCH_MISS']=_0x373340(0x380),_0x4b559d[_0x373340(0x2b0)]=_0x373340(0x217),_0x4b559d[_0x373340(0x412)]='offline',_0x4b559d;}({});const Ae=0x4e20,je=0x2bf20;var k=class{constructor(_0xbcff15,_0x200485,_0x4c0960,_0x4a9905,_0x50d24b,_0x414eb1,_0x39ccd5,_0x199e8d,_0x1a5842){const _0x37de11=_0x545128;this[_0x37de11(0x2cd)]=_0xbcff15,this['type']=_0x200485,this['_handler']=_0x50d24b,this['_commandService']=_0x414eb1,this[_0x37de11(0x487)]=_0x39ccd5,this['_revisionService']=_0x199e8d,this[_0x37de11(0x3ea)]=_0x1a5842,_(this,_0x37de11(0x226),null),_(this,_0x37de11(0x264),[]),this['_awaitingChangeset']=_0x4c0960,this['_pendingMutations']=_0x4a9905;}[_0x545128(0x4cd)](_0x72aa7e){const _0x4dfd9d=_0x545128;let _0x181663=this[_0x4dfd9d(0x258)][_0x4dfd9d(0x4ab)](this[_0x4dfd9d(0x2cd)]);return _0x72aa7e[_0x4dfd9d(0x233)]>_0x181663+0x1?(this[_0x4dfd9d(0x499)][_0x4dfd9d(0x2fc)]({'from':_0x181663,'to':_0x72aa7e[_0x4dfd9d(0x233)]-0x1}),!0x0):!0x1;}[_0x545128(0x3da)](_0x342bdd){const _0x27a196=_0x545128;this[_0x27a196(0x487)][_0x27a196(0x2a9)](this[_0x27a196(0x2cd)],_0x342bdd);}[_0x545128(0x309)](_0x50e7db){const _0x29df43=_0x545128;var _0xfa10f2,_0x73f8df;(_0xfa10f2=(_0x73f8df=this['_handler'])[_0x29df43(0x4a4)])==null||_0xfa10f2['call'](_0x73f8df,_0x50e7db);}[_0x545128(0x46d)](_0x19e59e){const _0x3ad707=_0x545128;var _0x5b385e,_0x329258;return(_0x5b385e=(_0x329258=this[_0x3ad707(0x499)])[_0x3ad707(0x4ce)])==null?void 0x0:_0x5b385e[_0x3ad707(0x339)](_0x329258,_0x19e59e);}[_0x545128(0x492)](_0x2e3b51){const _0x5d0b13=_0x545128;var _0x11e703,_0x4fb706;return(_0x11e703=(_0x4fb706=this[_0x5d0b13(0x499)])[_0x5d0b13(0x227)])==null?void 0x0:_0x11e703[_0x5d0b13(0x339)](_0x4fb706,_0x2e3b51);}[_0x545128(0x37a)](_0x520d02){const _0x1f4c41=_0x545128;var _0x1ff86f,_0x18a1af,_0x3136d7;return(_0x1ff86f=(_0x18a1af=(_0x3136d7=this[_0x1f4c41(0x499)])[_0x1f4c41(0x369)])==null?void 0x0:_0x18a1af[_0x1f4c41(0x339)](_0x3136d7,_0x520d02))==null?_0x520d02:_0x1ff86f;}['_transformRemoteChangesetByStateCache'](_0x4fa5c9){const _0x45d1c4=_0x545128;var _0x32ad48,_0x5e43b5,_0x2114ca;return(_0x32ad48=(_0x5e43b5=(_0x2114ca=this[_0x45d1c4(0x499)])[_0x45d1c4(0x2c1)])==null?void 0x0:_0x5e43b5[_0x45d1c4(0x339)](_0x2114ca,_0x4fa5c9))==null?_0x4fa5c9:_0x32ad48;}[_0x545128(0x4ca)](_0x45ad63){const _0x542c0d=_0x545128;if(this[_0x542c0d(0x393)]===n['UniverInstanceType'][_0x542c0d(0x42a)]){let {unitID:_0x33b5e8,mutations:_0x212f95,memberID:_0x26b5ab}=_0x45ad63,_0x36ea1f=_0x212f95[_0x542c0d(0x38a)]>0x0?_0x212f95[0x0]['params']['textRanges']:[];if(Array['isArray'](_0x36ea1f)&&_0x36ea1f[_0x542c0d(0x38a)]>0x0){var _0x3e3486,_0x20c575;(_0x3e3486=(_0x20c575=this[_0x542c0d(0x499)])['onSyncEditingCollabCursor'])==null||_0x3e3486['call'](_0x20c575,{'unitID':_0x33b5e8,'memberID':_0x26b5ab,'textRanges':_0x36ea1f});}}}[_0x545128(0x218)](){const _0x53ce44=_0x545128;var _0x5860f8;(_0x5860f8=this[_0x53ce44(0x3ea)])==null||_0x5860f8[_0x53ce44(0x4c5)](this['unitID'],this[_0x53ce44(0x393)],this[_0x53ce44(0x226)],this[_0x53ce44(0x264)]);}[_0x545128(0x418)](){const _0x1688b4=_0x545128;return this[_0x1688b4(0x258)][_0x1688b4(0x4ab)](this[_0x1688b4(0x2cd)]);}['_incrementRevisionNumber'](){const _0x2a1bb6=_0x545128;this['_revisionService'][_0x2a1bb6(0x48a)](this[_0x2a1bb6(0x2cd)]);}[_0x545128(0x3ac)](_0x17bf00){const _0x5c5a85=_0x545128;let _0x42c919=this[_0x5c5a85(0x37a)](_0x17bf00);_0x42c919=this['_transformRemoteChangesetByStateCache'](_0x42c919);let _0x2277b0=(0x0,n[_0x5c5a85(0x21d)])(_0x42c919[_0x5c5a85(0x329)],this[_0x5c5a85(0x2a6)],{'fromCollab':!0x0});if(!_0x2277b0['result']){var _0x41b14e;throw _0x2277b0[_0x5c5a85(0x42e)]instanceof Error?_0x2277b0[_0x5c5a85(0x42e)]:Error((_0x41b14e=_0x2277b0[_0x5c5a85(0x42e)])==null?_0x5c5a85(0x262):_0x41b14e);}this[_0x5c5a85(0x46d)](_0x42c919),this[_0x5c5a85(0x492)](_0x42c919),this['_transformUndoredo'](_0x17bf00),this[_0x5c5a85(0x309)](_0x42c919),this['_syncEditingCollabCursor'](_0x42c919),this[_0x5c5a85(0x3aa)]();}};let A=class extends k{constructor(_0x3736ec,_0x4aab34,_0x397c03,_0x4a8850,_0x13e275,_0x40c3f6,_0x75a9e6,_0x4a9ddb,_0x56ca36,_0x5e9934){const _0x213671=_0x545128;super(_0x3736ec,_0x4aab34,null,[],_0x397c03,_0x75a9e6,_0x40c3f6,_0x4a8850,_0x5e9934),this[_0x213671(0x2f9)]=_0x13e275,this['_logService']=_0x4a9ddb,this[_0x213671(0x2ee)]=_0x56ca36,this[_0x213671(0x2e6)]=_0x5e9934,_(this,_0x213671(0x2f2),_0x213671(0x41b));}['appendMutation'](_0x102ccd){const _0x1662c6=_0x545128;let _0x5e2ddc=this['_injector'][_0x1662c6(0x2f8)](j,this[_0x1662c6(0x2cd)],this[_0x1662c6(0x393)],[_0x102ccd],this[_0x1662c6(0x499)]);return _0x5e2ddc[_0x1662c6(0x39a)](),_0x5e2ddc[_0x1662c6(0x218)](),_0x5e2ddc;}[_0x545128(0x4d9)](_0x2e870b){const _0x342e60=_0x545128;if(this[_0x342e60(0x4cd)](_0x2e870b))return this[_0x342e60(0x2f9)]['createInstance'](I,this[_0x342e60(0x2cd)],this['type'],null,[],null,[_0x2e870b],this[_0x342e60(0x499)]);try{let _0x16bf24=this['_transformService'][_0x342e60(0x23b)](_0x2e870b,[t[_0x342e60(0x4d8)]]);if((0x0,t['isTransformMutationsWithChangesetSuccess'])(_0x16bf24)){let {c1Prime:_0x33f2f9}=_0x16bf24;return this['_executeRemoteChangeset'](_0x33f2f9),this;}throw _0x16bf24[_0x342e60(0x42e)];}catch(_0x71a264){return this['_logService']['error'](_0x71a264),this[_0x342e60(0x30a)](!0x1);}}[_0x545128(0x30a)](_0x4ead36){const _0x936486=_0x545128;return this[_0x936486(0x2f9)][_0x936486(0x2f8)](P,this[_0x936486(0x2cd)],this[_0x936486(0x393)],null,[],this[_0x936486(0x499)],_0x4ead36);}[_0x545128(0x336)](_0x3ab6c3){const _0x365e88=_0x545128;if(_0x3ab6c3[_0x365e88(0x233)]<=this[_0x365e88(0x418)]())return this;throw Error(_0x365e88(0x450));}[_0x545128(0x3b6)](){const _0x4bdd32=_0x545128;throw Error(_0x4bdd32(0x20b));}[_0x545128(0x1e6)](){return this;}[_0x545128(0x22a)](){const _0x4e9533=_0x545128;return this[_0x4e9533(0x2f9)][_0x4e9533(0x2f8)](F,this[_0x4e9533(0x2cd)],this['type'],null,[],this[_0x4e9533(0x499)]);}['toggleOnline'](){return this;}[_0x545128(0x204)](){const _0x2c4619=_0x545128;throw Error(_0x2c4619(0x320));}['fetchMiss'](){const _0x3a3a6b=_0x545128;let _0x19cb02=this[_0x3a3a6b(0x258)][_0x3a3a6b(0x4ab)](this['unitID']);return this[_0x3a3a6b(0x499)][_0x3a3a6b(0x2fc)]({'from':_0x19cb02,'to':0x0}),this[_0x3a3a6b(0x2f9)][_0x3a3a6b(0x2f8)](I,this['unitID'],this['type'],null,[],null,[],this['_handler']);}};A=b([y(0x3,(0x0,n['Inject'])(t[_0x545128(0x296)])),y(0x4,(0x0,n[_0x545128(0x304)])(n[_0x545128(0x24d)])),y(0x5,n[_0x545128(0x328)]),y(0x6,n[_0x545128(0x419)]),y(0x7,n['ILogService']),y(0x8,t[_0x545128(0x35b)]),y(0x9,(0x0,n['Optional'])(C))],A);let j=E=class extends k{constructor(_0x95bf2b,_0x1746fb,_0x2014d7,_0x288330,_0x10991f,_0xc019f5,_0x466de2,_0x1dbc8b,_0x229ec2,_0x2a1e4d,_0x11d16a,_0xb7fc69,_0x5aa7da,_0x566a68){const _0x2756ee=_0x545128;super(_0x95bf2b,_0x1746fb,null,_0x2014d7,_0x288330,_0x229ec2,_0x5aa7da,_0xc019f5,_0x566a68),this[_0x2756ee(0x2f9)]=_0x10991f,this['_memberService']=_0x466de2,this[_0x2756ee(0x4a2)]=_0x1dbc8b,this[_0x2756ee(0x2e4)]=_0x2a1e4d,this['_transformService']=_0x11d16a,this[_0x2756ee(0x1e7)]=_0xb7fc69,_(this,'status','pending'),_(this,_0x2756ee(0x4bb),null),_(this,_0x2756ee(0x3ec),null);}[_0x545128(0x4d0)](_0x5675d4){const _0x38b5b5=_0x545128;return this[_0x38b5b5(0x264)][_0x38b5b5(0x3f5)](_0x5675d4),this[_0x38b5b5(0x218)](),this;}[_0x545128(0x4d9)](_0x46c8f3){const _0x2e8020=_0x545128;if(this[_0x2e8020(0x4cd)](_0x46c8f3))return this[_0x2e8020(0x42b)](),this[_0x2e8020(0x2f9)][_0x2e8020(0x2f8)](I,this['unitID'],this['type'],null,this[_0x2e8020(0x264)],null,[_0x46c8f3],this[_0x2e8020(0x499)]);try{let _0xa777c3=this[_0x2e8020(0x2ee)]['transformMutationsWithChangeset'](_0x46c8f3,this['_pendingMutations']);if((0x0,t[_0x2e8020(0x2b5)])(_0xa777c3)){let {c1Prime:_0x4adc4f,m2Prime:_0x512810}=_0xa777c3;this[_0x2e8020(0x3ac)](_0x4adc4f);let _0x4004cc=this[_0x2e8020(0x2f9)][_0x2e8020(0x2f8)](E,this[_0x2e8020(0x2cd)],this[_0x2e8020(0x393)],_0x512810,this[_0x2e8020(0x499)]);this[_0x2e8020(0x42b)]();let _0x5a33d4=new Date()[_0x2e8020(0x410)](),_0x5a3f7d=this['_scheduleCompleteTimestamp']?Math[_0x2e8020(0x334)](this['_scheduleCompleteTimestamp']-_0x5a33d4,0x0):this[_0x2e8020(0x395)]();return _0x4004cc[_0x2e8020(0x39a)](_0x5a3f7d),_0x4004cc;}throw _0xa777c3[_0x2e8020(0x42e)];}catch(_0x2c0dc9){return this[_0x2e8020(0x4a2)]['error'](_0x2c0dc9),this['_onConflict'](!0x1);}}[_0x545128(0x336)](_0x853077){const _0x57143b=_0x545128;if(_0x853077[_0x57143b(0x233)]<=this[_0x57143b(0x418)]())return this;throw Error(_0x57143b(0x2bc));}[_0x545128(0x3b6)](){const _0x367953=_0x545128;throw Error(_0x367953(0x3c7));}[_0x545128(0x1e6)](){return this;}[_0x545128(0x22a)](){const _0x4eac67=_0x545128;return this[_0x4eac67(0x42b)](),this['_injector'][_0x4eac67(0x2f8)](F,this['unitID'],this[_0x4eac67(0x393)],null,this[_0x4eac67(0x264)],this['_handler']);}[_0x545128(0x349)](){return this;}['_schedule'](_0x4b7ad2){const _0xe4feab=_0x545128;let _0x240375=_0x4b7ad2==null?this[_0xe4feab(0x395)]():_0x4b7ad2;this[_0xe4feab(0x4bb)]=new Date()[_0xe4feab(0x410)]()+_0x240375,this['_sendingTimer']=setTimeout(()=>{const _0x2adbbb=_0xe4feab;this[_0x2adbbb(0x42b)]();let _0x4853b6=null;switch(this[_0x2adbbb(0x393)]){case n[_0x2adbbb(0x251)][_0x2adbbb(0x424)]:_0x4853b6=ye(this[_0x2adbbb(0x264)],this[_0x2adbbb(0x2cd)],this[_0x2adbbb(0x1e7)],this[_0x2adbbb(0x258)],this[_0x2adbbb(0x2d3)]);break;case n[_0x2adbbb(0x251)]['UNIVER_DOC']:_0x4853b6=this[_0x2adbbb(0x264)][_0x2adbbb(0x441)](_0x5ae2d0=>_0x5ae2d0['id']===r[_0x2adbbb(0x46a)]['id'])?Se(this['_pendingMutations'],this[_0x2adbbb(0x2cd)],this['_univerInstanceService'],this[_0x2adbbb(0x258)],this['_memberService']):ye(this[_0x2adbbb(0x264)],this[_0x2adbbb(0x2cd)],this[_0x2adbbb(0x1e7)],this[_0x2adbbb(0x258)],this[_0x2adbbb(0x2d3)]);break;case n[_0x2adbbb(0x251)][_0x2adbbb(0x437)]:_0x4853b6=xe(this[_0x2adbbb(0x264)],this[_0x2adbbb(0x2cd)],this[_0x2adbbb(0x1e7)],this[_0x2adbbb(0x258)],this[_0x2adbbb(0x2d3)]);break;case n['UniverInstanceType'][_0x2adbbb(0x291)]:_0x4853b6=be(this[_0x2adbbb(0x264)],this['unitID'],this['_univerInstanceService'],this[_0x2adbbb(0x258)],this[_0x2adbbb(0x2d3)]);break;default:throw Error('[PendingState]:\x20unhandled\x20univer\x20type:\x20'+this[_0x2adbbb(0x393)]+_0x2adbbb(0x257));}let {changeset:_0x5c2156,pendingMutations:_0x40fa1e}=_0x4853b6;this[_0x2adbbb(0x499)][_0x2adbbb(0x1ef)](_0x5c2156);let _0x32eb87=_0x40fa1e[_0x2adbbb(0x38a)]?this[_0x2adbbb(0x2f9)][_0x2adbbb(0x2f8)](N,this[_0x2adbbb(0x2cd)],this[_0x2adbbb(0x393)],_0x5c2156,_0x40fa1e,this[_0x2adbbb(0x499)],void 0x0):this[_0x2adbbb(0x2f9)][_0x2adbbb(0x2f8)](M,this[_0x2adbbb(0x2cd)],this[_0x2adbbb(0x393)],_0x5c2156,this[_0x2adbbb(0x499)]);_0x32eb87[_0x2adbbb(0x218)](),this[_0x2adbbb(0x499)][_0x2adbbb(0x49a)](this,_0x32eb87);},_0x240375);}['_getSendChangesetTimeout'](){const _0x326dae=_0x545128;var _0x567dcb;let _0xc15efc=this[_0x326dae(0x2e4)]['getConfig'](h);return(_0x567dcb=_0xc15efc==null?void 0x0:_0xc15efc['sendChangesetTimeout'])==null?0x7d0:_0x567dcb;}[_0x545128(0x204)](){const _0x2b9699=_0x545128;throw Error(_0x2b9699(0x4ad));}[_0x545128(0x42b)](){const _0x3440a1=_0x545128;this[_0x3440a1(0x3ec)]!=null&&(clearTimeout(this[_0x3440a1(0x3ec)]),this[_0x3440a1(0x3ec)]=null);}['_onConflict'](_0x98ba){const _0x12bdd1=_0x545128;return this[_0x12bdd1(0x42b)](),this[_0x12bdd1(0x2f9)][_0x12bdd1(0x2f8)](P,this[_0x12bdd1(0x2cd)],this['type'],null,this[_0x12bdd1(0x264)],this[_0x12bdd1(0x499)],_0x98ba);}};j=E=b([y(0x4,(0x0,n['Inject'])(n['Injector'])),y(0x5,(0x0,n[_0x545128(0x304)])(t['RevisionService'])),y(0x6,(0x0,n[_0x545128(0x304)])(x)),y(0x7,n[_0x545128(0x368)]),y(0x8,n['ICommandService']),y(0x9,n[_0x545128(0x378)]),y(0xa,t[_0x545128(0x35b)]),y(0xb,n[_0x545128(0x4c4)]),y(0xc,n[_0x545128(0x328)]),y(0xd,(0x0,n[_0x545128(0x2da)])(C))],j);let M=D=class extends k{constructor(_0xc7688c,_0x22d53c,_0x45b7bb,_0x5ace7d,_0x410b56,_0x341198,_0x56444c,_0x159119,_0x1bfa76,_0x237da4,_0x3e651f){const _0x3b5873=_0x545128;super(_0xc7688c,_0x22d53c,_0x45b7bb,[],_0x5ace7d,_0x56444c,_0x237da4,_0x341198,_0x3e651f),this[_0x3b5873(0x2f9)]=_0x410b56,this['_logService']=_0x159119,this[_0x3b5873(0x2ee)]=_0x1bfa76,_(this,'status',_0x3b5873(0x1ed)),_(this,_0x3b5873(0x33d),0x0),_(this,'_maxTotalRetryTimeout',0x0),_(this,_0x3b5873(0x338),void 0x0),_(this,_0x3b5873(0x253),void 0x0);}['appendMutation'](_0x5b227f){const _0x46fd30=_0x545128;this[_0x46fd30(0x42b)]();let _0x431fc3=this['_injector'][_0x46fd30(0x2f8)](N,this['unitID'],this[_0x46fd30(0x393)],this[_0x46fd30(0x226)],[_0x5b227f],this[_0x46fd30(0x499)],this['_resendTimer']);return _0x431fc3[_0x46fd30(0x218)](),_0x431fc3;}[_0x545128(0x4d9)](_0x91985){const _0x5df465=_0x545128;if(this[_0x5df465(0x4cd)](_0x91985))return this[_0x5df465(0x42b)](),this[_0x5df465(0x2f9)][_0x5df465(0x2f8)](I,this[_0x5df465(0x2cd)],this[_0x5df465(0x393)],this['_awaitingChangeset'],[],null,[_0x91985],this[_0x5df465(0x499)]);try{let _0x2ccd83=this[_0x5df465(0x2ee)][_0x5df465(0x333)]([_0x91985],[this[_0x5df465(0x226)]],!0x1);if((0x0,t[_0x5df465(0x241)])(_0x2ccd83)){let {c1Prime:_0x464043,c2Prime:_0x5102c9}=_0x2ccd83;this[_0x5df465(0x3ac)](_0x464043[0x0]),_0x5102c9[0x0][_0x5df465(0x421)]=this[_0x5df465(0x418)](),this[_0x5df465(0x42b)]();let _0x2284b4=this[_0x5df465(0x2f9)][_0x5df465(0x2f8)](D,this[_0x5df465(0x2cd)],this[_0x5df465(0x393)],_0x5102c9[0x0],this[_0x5df465(0x499)]);return _0x2284b4[_0x5df465(0x218)](),_0x2284b4;}throw _0x2ccd83[_0x5df465(0x42e)];}catch(_0x4e0cd1){return this[_0x5df465(0x4a2)][_0x5df465(0x42e)](_0x4e0cd1),this[_0x5df465(0x30a)](!0x1);}}[_0x545128(0x336)](_0xb2c673){const _0x381142=_0x545128;this['_clearScheduledTask']();let _0xed7f5e=this[_0x381142(0x258)][_0x381142(0x4ab)](this['unitID']);if(_0xb2c673[_0x381142(0x233)]<=_0xed7f5e)return this;if(this[_0x381142(0x4cd)](_0xb2c673))return this[_0x381142(0x2f9)][_0x381142(0x2f8)](I,this[_0x381142(0x2cd)],this[_0x381142(0x393)],this[_0x381142(0x226)],[],_0xb2c673[_0x381142(0x233)],[],this[_0x381142(0x499)]);this[_0x381142(0x3aa)]();let _0xd5fc42=this[_0x381142(0x2f9)][_0x381142(0x2f8)](A,this['unitID'],this[_0x381142(0x393)],this[_0x381142(0x499)]);return _0xd5fc42['_updateLocalCache'](),_0xd5fc42;}[_0x545128(0x3b6)](_0x5f1efc){const _0x2e5dc2=_0x545128;return this['_onConflict'](!!(_0x5f1efc!=null&&_0x5f1efc[_0x2e5dc2(0x447)]));}['onRemoteRetry'](_0xe94aa3){const _0x1a8445=_0x545128;return this[_0x1a8445(0x352)]>je?this[_0x1a8445(0x22a)]():(this['_resendTimer']=Oe(this[_0x1a8445(0x33d)],{'timeout':this[_0x1a8445(0x33d)],'reqId':_0xe94aa3[_0x1a8445(0x43b)]}),this[_0x1a8445(0x253)]=this['_resendTimer']['subscribe'](({reqId:_0x3ae3af,timeout:_0x4aacaf})=>{this['_resendWithTimeout'](_0x3ae3af,_0x4aacaf);}),this);}[_0x545128(0x22a)](){const _0x529e4a=_0x545128;return this[_0x529e4a(0x42b)](),this[_0x529e4a(0x2f9)][_0x529e4a(0x2f8)](F,this[_0x529e4a(0x2cd)],this[_0x529e4a(0x393)],this['_awaitingChangeset'],[],this[_0x529e4a(0x499)]);}[_0x545128(0x349)](){return this;}[_0x545128(0x204)](){const _0x2a35fb=_0x545128;this[_0x2a35fb(0x499)]['onSendChangeset'](this[_0x2a35fb(0x226)]);}[_0x545128(0x30a)](_0x13d95e){const _0x2d5f1d=_0x545128;return this[_0x2d5f1d(0x42b)](),this['_injector'][_0x2d5f1d(0x2f8)](P,this[_0x2d5f1d(0x2cd)],this[_0x2d5f1d(0x393)],this[_0x2d5f1d(0x226)],[],this[_0x2d5f1d(0x499)],_0x13d95e);}[_0x545128(0x46e)](_0x311d0c,_0x4ffd84){const _0x13ff45=_0x545128;var _0x51137f;_0x311d0c===((_0x51137f=this[_0x13ff45(0x226)])==null?void 0x0:_0x51137f[_0x13ff45(0x43b)])&&(this[_0x13ff45(0x204)](),this[_0x13ff45(0x33d)]=_0x4ffd84===0x0?0x3e8:Math[_0x13ff45(0x448)](_0x4ffd84*0x2,Ae),this['_maxTotalRetryTimeout']+=this['_resendTimeout']);}[_0x545128(0x42b)](){const _0x4da01f=_0x545128;var _0x2c16b6;(_0x2c16b6=this[_0x4da01f(0x253)])==null||_0x2c16b6[_0x4da01f(0x385)](),this[_0x4da01f(0x33d)]=0x0,this[_0x4da01f(0x352)]=0x0;}};M=D=b([y(0x4,(0x0,n[_0x545128(0x304)])(n[_0x545128(0x24d)])),y(0x5,(0x0,n[_0x545128(0x304)])(t[_0x545128(0x296)])),y(0x6,n['ICommandService']),y(0x7,n['ILogService']),y(0x8,t['ITransformService']),y(0x9,n[_0x545128(0x328)]),y(0xa,(0x0,n[_0x545128(0x2da)])(C))],M);let N=O=class extends k{constructor(_0x4c315f,_0x34068b,_0x2b5b9c,_0x2b6d42,_0x8388f0,_0x39de61,_0x5ab91e,_0x10fd26,_0x24b518,_0x265d59,_0x5dc7bd,_0x483f0e,_0x6211df){const _0x571856=_0x545128;super(_0x4c315f,_0x34068b,_0x2b5b9c,_0x2b6d42,_0x8388f0,_0x24b518,_0x483f0e,_0x10fd26,_0x6211df),this['_injector']=_0x5ab91e,this[_0x571856(0x4a2)]=_0x265d59,this[_0x571856(0x2ee)]=_0x5dc7bd,this[_0x571856(0x2e6)]=_0x6211df,_(this,'status',_0x571856(0x37b)),_(this,_0x571856(0x33d),0x0),_(this,_0x571856(0x352),0x0),_(this,_0x571856(0x338),void 0x0),_(this,'_sender',void 0x0),_0x39de61&&(this[_0x571856(0x338)]=_0x39de61,this[_0x571856(0x253)]=this['_resendTimer'][_0x571856(0x31b)](({reqId:_0x5bb03d,timeout:_0x2f023e})=>{const _0x11c1e5=_0x571856;this[_0x11c1e5(0x46e)](_0x5bb03d,_0x2f023e);}));}[_0x545128(0x4d0)](_0x91135a){const _0x248b60=_0x545128;return this[_0x248b60(0x264)][_0x248b60(0x3f5)](_0x91135a),this;}[_0x545128(0x4d9)](_0x7a1947){const _0x3d72b4=_0x545128;if(this[_0x3d72b4(0x4cd)](_0x7a1947))return this[_0x3d72b4(0x42b)](),this['_injector']['createInstance'](I,this['unitID'],this[_0x3d72b4(0x393)],this[_0x3d72b4(0x226)],this[_0x3d72b4(0x264)],null,[_0x7a1947],this['_handler']);try{let _0x3b8f3e=this[_0x3d72b4(0x2ee)][_0x3d72b4(0x333)]([_0x7a1947],[this['_awaitingChangeset']],!0x1);if((0x0,t[_0x3d72b4(0x241)])(_0x3b8f3e)){let {c1Prime:_0x5bcf17,c2Prime:_0x2bbfbc}=_0x3b8f3e,_0x19d158=this[_0x3d72b4(0x2ee)][_0x3d72b4(0x23b)](_0x5bcf17[0x0],this[_0x3d72b4(0x264)]);if((0x0,t[_0x3d72b4(0x2b5)])(_0x19d158)){let {c1Prime:_0x2752c2,m2Prime:_0x14143d}=_0x19d158;return this[_0x3d72b4(0x3ac)](_0x2752c2),_0x2bbfbc[0x0]['baseRev']=this[_0x3d72b4(0x418)](),this['_clearScheduledTask'](),this[_0x3d72b4(0x2f9)][_0x3d72b4(0x2f8)](O,this[_0x3d72b4(0x2cd)],this[_0x3d72b4(0x393)],_0x2bbfbc[0x0],_0x14143d,this[_0x3d72b4(0x499)],void 0x0);}throw _0x19d158['error'];}throw _0x3b8f3e[_0x3d72b4(0x42e)];}catch(_0x13394f){return this['_logService'][_0x3d72b4(0x42e)](_0x13394f),this[_0x3d72b4(0x30a)](!0x1);}}[_0x545128(0x336)](_0x4f7e8f){const _0x198cf3=_0x545128;this[_0x198cf3(0x42b)]();let _0x1d525f=this[_0x198cf3(0x418)]();if(_0x4f7e8f[_0x198cf3(0x233)]<=_0x1d525f)return this;if(this[_0x198cf3(0x4cd)](_0x4f7e8f))return this[_0x198cf3(0x2f9)]['createInstance'](I,this[_0x198cf3(0x2cd)],this[_0x198cf3(0x393)],this[_0x198cf3(0x226)],this[_0x198cf3(0x264)],_0x4f7e8f[_0x198cf3(0x233)],[],this[_0x198cf3(0x499)]);this[_0x198cf3(0x3aa)]();let _0x57abff=this[_0x198cf3(0x2f9)][_0x198cf3(0x2f8)](j,this[_0x198cf3(0x2cd)],this[_0x198cf3(0x393)],this[_0x198cf3(0x264)],this[_0x198cf3(0x499)]);return _0x57abff['_schedule'](),_0x57abff[_0x198cf3(0x218)](),_0x57abff;}[_0x545128(0x3b6)](_0x36a284){const _0x53d4da=_0x545128;return this['_onConflict'](!!(_0x36a284!=null&&_0x36a284[_0x53d4da(0x447)]));}[_0x545128(0x1e6)](_0x45ebe6){const _0x54150c=_0x545128;return this[_0x54150c(0x352)]>je?this[_0x54150c(0x22a)]():(this[_0x54150c(0x338)]=Oe(this[_0x54150c(0x33d)],{'timeout':this[_0x54150c(0x33d)],'reqId':_0x45ebe6['reqId']}),this['_sender']=this[_0x54150c(0x338)][_0x54150c(0x31b)](({reqId:_0x53d775,timeout:_0x4c0da2})=>{const _0x5e3207=_0x54150c;this[_0x5e3207(0x46e)](_0x53d775,_0x4c0da2);}),this);}[_0x545128(0x22a)](){const _0x429680=_0x545128;return this['_clearScheduledTask'](),this['_injector'][_0x429680(0x2f8)](F,this[_0x429680(0x2cd)],this[_0x429680(0x393)],this[_0x429680(0x226)],this[_0x429680(0x264)],this['_handler']);}[_0x545128(0x349)](){return this;}['resend'](){const _0x3d3577=_0x545128;this[_0x3d3577(0x499)][_0x3d3577(0x1ef)](this[_0x3d3577(0x226)]);}[_0x545128(0x30a)](_0x2b350f){const _0x52a613=_0x545128;return this[_0x52a613(0x42b)](),this['_injector'][_0x52a613(0x2f8)](P,this['unitID'],this[_0x52a613(0x393)],null,this[_0x52a613(0x264)],this['_handler'],_0x2b350f);}[_0x545128(0x46e)](_0x54c9be,_0x535c03){const _0x2d710d=_0x545128;var _0x210bfd;_0x54c9be===((_0x210bfd=this['_awaitingChangeset'])==null?void 0x0:_0x210bfd[_0x2d710d(0x43b)])&&(this['resend'](),this['_resendTimeout']=_0x535c03===0x0?0x3e8:Math['min'](_0x535c03*0x2,Ae),this[_0x2d710d(0x352)]+=this['_resendTimeout']);}['_clearScheduledTask'](){const _0x50d8c4=_0x545128;var _0x3192a9;(_0x3192a9=this[_0x50d8c4(0x253)])==null||_0x3192a9[_0x50d8c4(0x385)](),this['_resendTimeout']=0x0,this[_0x50d8c4(0x352)]=0x0;}};N=O=b([y(0x6,(0x0,n['Inject'])(n[_0x545128(0x24d)])),y(0x7,(0x0,n['Inject'])(t[_0x545128(0x296)])),y(0x8,n[_0x545128(0x419)]),y(0x9,n[_0x545128(0x368)]),y(0xa,t[_0x545128(0x35b)]),y(0xb,n['IUndoRedoService']),y(0xc,(0x0,n['Optional'])(C))],N);let P=class extends k{constructor(_0x4bdedc,_0xb4f161,_0x263ac2,_0x3e757c,_0x469431,_0x2c35eb=!0x1,_0x5056ff,_0xeedbc7,_0x3a583a,_0x875bdc,_0x518aa0,_0xb562d1,_0x7706cb){const _0x43eecc=_0x545128;super(_0x4bdedc,_0xb4f161,_0x263ac2,_0x3e757c,_0x469431,_0xeedbc7,_0x3a583a,_0x875bdc,_0x7706cb),this[_0x43eecc(0x31f)]=_0x2c35eb,this[_0x43eecc(0x1f9)]=_0x5056ff,this[_0x43eecc(0x2d0)]=_0x518aa0,this['_collaborationUIEventService']=_0xb562d1,this['localCacheService']=_0x7706cb,_(this,_0x43eecc(0x2f2),'conflict'),this[_0x43eecc(0x24e)](),this[_0x43eecc(0x2a5)](),this[_0x43eecc(0x219)]();}[_0x545128(0x4d0)](){return this;}[_0x545128(0x4d9)](){return this;}['onRemoteAck'](){return this;}[_0x545128(0x3b6)](){return this;}[_0x545128(0x1e6)](){return this;}[_0x545128(0x22a)](){return this;}['toggleOnline'](){return this;}[_0x545128(0x204)](){const _0x45668a=_0x545128;throw Error(_0x45668a(0x1f8));}['_clearLocalCache'](){const _0x433b64=_0x545128;var _0xc01383,_0x3d8a0b,_0x1ab16f;(_0xc01383=this[_0x433b64(0x3ea)])==null||(_0x3d8a0b=_0xc01383[_0x433b64(0x350)])==null||(_0x3d8a0b=_0x3d8a0b[_0x433b64(0x339)](_0xc01383,this['unitID'],'conflict'))==null||_0x3d8a0b[_0x433b64(0x35e)](()=>void 0x0),(_0x1ab16f=this[_0x433b64(0x3ea)])==null||_0x1ab16f['updateOfflineData'](this[_0x433b64(0x2cd)],this[_0x433b64(0x393)],null,[]);}[_0x545128(0x24e)](){const _0x3ab476=_0x545128;this[_0x3ab476(0x31f)]?this[_0x3ab476(0x48f)]['emitEvent']({'id':_0x3ab476(0x35d)}):this[_0x3ab476(0x48f)][_0x3ab476(0x214)]({'id':_0x3ab476(0x2b0)});}[_0x545128(0x219)](){const _0x4df7f5=_0x545128;this[_0x4df7f5(0x1f9)][_0x4df7f5(0x21c)](new i['WorkbookEditablePermission'](this[_0x4df7f5(0x2cd)])['id'],!0x1);}};function _0x3e56(){const _0x573256=['_status$','FETCH_MISSING','interceptor','registerHTTPInterceptor','transformChangesets','max','Subject','onRemoteAck','CLOSE_ROOM','_resendTimer','call','_getSignURL','result','memberID','_resendTimeout','getCurrentSelections','[CollaborationSession]','Tools','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_getConfig','2682135obLArI','take','_type','_getRedoStack','Workbook','[FetchingMissState]:\x20invalid\x20calling\x20to\x20`resend`.','toggleOnline','defineProperty','collaborators','UserManagerService','parse','LocaleService','HEARTBEAT','backupOfflineData','MergeInterceptorFactory','_maxTotalRetryTimeout','saveSnapshot','_roomCreated$','PERMISSION_REJ','reverse','CompressMutationService','_telemetryService','NEW_CHANGESETS','SheetsSelectionsService','ITransformService','connection\x20error','PERMISSION_DENIED','catch','onLocalMutation','FetchingMissState','loginUrlKey','/block/','_sendHeartbeatTimer','subject','updatePermissionObjEvent','text-x','add','ILogService','onTransformRemoteChangesetByIMECache','getActiveSheet','parseChangesetToProtocol','RETRY_CONNECTING_MAX_COUNT_KEY','params','/-/object/-/batch_allowed','_singleActiveUnitService','readAsDataURL','LIVESHARE_OPERATION','getCollabEntity','unit-cache-','sid','commentUpdate$','requireSession','SyncedState','IConfigService','/rev/','_transformRemoteChangesetByIMECache','awaiting_with_pending','loadSlide','[DataLoaderService]','saveSheetBlock','_entities','fetch_missing','/universer-api/oidc/authpage','?url=','loadUnitOfRevision','getSheetBlock','unsubscribe','takeUntil','_getDownloadEndpointURL','stopTime','/universer-api/snapshot','length','iterator','listRoles','endsWith','_commentService','getCfgEnableObjInherit','_compressMutationService','AwaitingState','prototype','type','AWAITING','_getSendChangesetTimeout','_queuedRemoteChangesets','_clearHeartbeatTimer','LIVESHARE_TERMINATE','_entityInit$','_schedule','some','snapshotServerUrl','_decreaseWaiting','unitInfo$','capture','objectActions','AwaitingWithPendingState','COMPRESS_MUTATION_SEND','_handlerCallback','getUnitStatus$','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT','createSocket','FileSource','_event$','\x20-\x20','_incrementRevisionNumber','unitId\x20is\x20not\x20found','_executeRemoteChangeset','AttachmentSourceType','_undoStacks','[FetchingMissState]:\x20not\x20expected\x20to\x20receive\x20ack\x20when\x20`this._awaitingChangeset`\x20is\x20null!','delete','csRejEvent','BehaviorSubject','body','[CollaborationSocketService]:\x20failed\x20to\x20create\x20socket!','ERROR_IMAGE','onRemoteRej','setShowComponents','SUBMIT_CHANGESET','LOCAL_CACHE_INTERVAL_KEY','/object','getUnitId','uploadFileServerUrl','IPermissionService','_toggleOnline','session.room-not-exists','b64DecodeUnicode','_getLoginPath','_getUploadFileURL','_clearRetryConnectingTimer','_state','PendingState','session.room-full','[PendingState]:\x20received\x20rejection.','_instanceService','_getUndoStack','packageName','MSG_FOR_ERROR','_initUnitPermissionChange','HELLO','collaboration-client.local-cache-service','[FetchMissState]','docStateChange$','loadDoc','UnitStatus','_candidateSocket','roomInfos','_state$','now','PSEUDO_FETCH_MISSING_RESULT','ReplaySubject','loadSheet','_transformUndoredo','[OfflineState]:\x20received\x20rejection.','uniscriptRunEvent','file','Disposable','CommentService','univer-pro.collaboration-client-socket-service','_collaborationPaused','InsertSheetMutation','executeCommand','mergeOverrideWithDependencies','_stopTelemetryCollaborationNewChangeset','_doCreateSocket','entityInit$','src','x-univer-host','_localCacheService','_timeoutTimer','_sendingTimer','22JgdXIx','utf8ToBytes','symbol','getCollabEntity$','_initRequestHeader','RETRY_CONNECTING_MAX_COUNT','_onRemoteChangeset','set','push','SnapshotServerOverHTTPService','5597xXodso','Module','upload','LIVESHARE_FETCH_OPERATIONS','collaboratorID','_waitCount','post','downloadEndpointUrl','CHANGESET_ACK','_onJoinRoomEvent','_getAPIPrefix','onMissedChangesetFetched','/allowed','headers','toString','_collabSessionService','_scheduleCollaborationTimeoutTimer','_acknowledgedAwaitingRevision','objectType','getCurrentUser','confirm','liveShareNewHost','IDLE','event$','getOwnPropertyDescriptor','getTime','href','OFFLINE','JOIN','/object/','setConfig','state','complete','_getCurrentRevision','ICommandService','pauseCollaboration','synced','withCredentials','[CollaborationAttachmentIoService]:\x20attachment\x20exceeds\x20max\x20size.','save\x20fail\x20reason\x20is\x20','_updateStatus','registerDependencies','baseRev','AddSlidePageMutation','_tryReconnect','UNIVER_SHEET','encrypt','135651XwmMin','_collaborationSessionService','/fetchmissing?from=','110kBDeOH','UNIVER_DOC','_clearScheduledTask','pluginName','requestParams','error','UniverCollaborationClientPlugin','append','&source=','OTHER_CLIENTS_EDITING','fromCollab','_sheetTransformSelectionsService','_listenToNetworkCondition','change$','UNIVER_SLIDE','deleteCollaborator','_onUserLeave','eventID','reqId','create','ERROR_EXCEED_SIZE','concatMap','RECV','/collaborator','every','/unit/','_socket','you\x20should\x20override\x20\x22IUndoRedoService\x22\x20provided\x20in\x20\x22core\x22\x20package!','_userManagerService','NO_OTHER_CLIENTS_EDITING','isPermissionRej','min','actions','ThresholdInterceptorFactory','enableAuthServer','JOIN_ROOM_NOT_EXISTS','disposeWithMe','/new_changes','has','[SyncedState]:\x20received\x20acknowledgement.','AWAITING_WITH_PENDING','_registerDependencies','session.room-permission-denied','loadUnit','getResourcesRequest','CollaborationEntity','update','Failed\x20to\x20update\x20permission\x20point','offline','session','toDisposable','error$','retryConnectingInterval','permissionRejEvent','location','name','_cfgEnableObjInherit','JOIN_ROOM_FULL','_transitionLocked','collaboration_new_changeset','HEARTBEAT_TIMEOUT','&to=','find','_upload','ONLINE','RichTextEditingMutation','/universer-api/authz','DEFAULT_COLLAB_WEB_SOCKET_URL','_transformIMECache','_resendWithTimeout','IMentionIOService','cfgEnableObjInherit','online$','SUBMIT_CHANGESET_TIMEOUT','transformStack\x20failed!','getMember','CmdRspCode','_transformAndApplyRemoteChangeset','url','originalMeta','getMemberID','getFocusedUnit','SheetCollaborationEntity','DocCollaborationEntity','_changesetReqId','2858136jRYUpO','clear','fetching\x20missing\x20changesets\x20from\x20','_onCombEvent','collabSubmitChangesetUrl','Unknown\x20type.\x20Will\x20not\x20load\x20files\x20from\x20remote\x20address.','getSnapshotAPIPath','/universer-api/file/{fileID}/sign-url','mapDocumentTypeToUniverInstanceType','_undoRedoService','socket\x20open.','_unitID','incrementRevOfUnit','_removeRoom','DEFAULT_FILE_NAME','_updateState','_substituteUndoStack','_collaborationUIEventService','_collaborationTimeoutTimer','uuidv4','_transformStateCache','session.join-failed','_commentUpdate$','getUnitOnRev','UNIVER_COLLABORATION_CLIENT_PLUGIN','socket$','CollaborationSession','_handler','onStateChange','[CollaborationEntity]:\x20cannot\x20apply\x20missing\x20results\x20on\x20other\x20states!','onlyLocal','[CollaborationSessionService]:\x20socket\x20error','asObservable','LIVESHARE_NEW_HOST','COMMENT_UPDATE','sessionStatus$','_logService','stringify','onTransformSelections','unit','HTTPService','_exhaustRemoteChangesetQueue','EnsureSlideMasterPageMutation','splice','COMPRESS_MUTATION_APPLY','getCurrentRevOfUnit','includes','[PendingState]:\x20invalid\x20calling\x20to\x20`resend`.','subUnitId','&assign=','UnitEmbedded','c2Prime','setCurrentUser','editing\x20status\x20changed\x20to','FAIL','copyFileMeta','submit\x20changeset\x20error!','USERS_ENTER','data','[UniverCollaborationClientPlugin]:\x20you\x20must\x20provide\x20a\x20socketService\x20implementation\x20in\x20config!','addImageSourceCache','_scheduleCompleteTimestamp','USERS_LEAVE','WorkbookEditablePermission','refreshPermission','Rectangle','8QySQKI','replace','_onConnectionFailed','entries','IUniverInstanceService','updateOfflineData','cbc','_eventService','responseType','resolve','_syncEditingCollabCursor','JSONX','serializeCombRequest','_checkMissing','onTransformIME','deepClone','appendMutation','[CollaborationSessionService]','UniverLicensePlugin','{fileID}','objectID','_config','_emitMembers','equals','EmptyMutationInfo','onRemoteChangeset','SetSelectionsOperation','concatBytes','onRemoteRetry','_univerInstanceService','put','list','ITelemetryService','awaitingChangeset','URL','awaiting','LEAVE','onSendChangeset','POST','onMutationExecutedForCollab','MemberService','_socketReady','MoveSlidePageMutation','hostname','title','send','[ConflictState]:\x20invalid\x20calling\x20to\x20`resend`.','_permissionService','/resources','debug','\x0aAfter:\x20','/universer-api/user/session-ticket','[CollaborationSession]:\x20should\x20not\x20send\x20message\x20when\x20the\x20session\x20is\x20offline!','_onFetchMissResult','getUnit','OTHER_CLIENT_EDITING','LIVESHARE_REQUEST_HOST','ISocketService','resend','[CollaborationEntity]','getUnitType','_init','_substituteRedoStack','state$','failed\x20to\x20apply\x20missed\x20changesets!','[SyncedState]:\x20received\x20rejection.','_httpService','CHANGESET_REJ','startTime','_redoStacks','_joinRoom','socket\x20close','waitForRoom$','_initCloseConn','emitEvent','newCsEvent','_shouldReportTelemetry','conflict','_updateLocalCache','_disableEditing','SOCKET_FAILED_RETRY','This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!','updatePermissionPoint','sequenceExecute','[OfflineState]:\x20invalid\x20calling\x20to\x20`resend`.','[CollaborationAttachmentIoService]:\x20attachment\x20type\x20is\x20not\x20accepted.','SNAPSHOT_URL_KEY','_tryEnsureSocket','unitId','_startTelemetryCollaborationNewChangeset','UNISCRIPT_RUN','_change$','_awaitingChangeset','onTransformState','Error\x20on\x20receiving\x20event','csAckEvent','toggleOffline','SessionStatus','getTypeOfUnitDisposed$','453780NmGVsY','_imageSourceCache','_submitChangeset','_rescheduleHeartbeat','_onRemoteRetry','/universer-api/uniscript','revision','_getAPIPrefixPath','JOIN_ROOM_FAILED','reject','_onUserJoin','duration','SOCKET_FAILED','indexOf','transformMutationsWithChangeset','fetching\x20the\x20latest\x20document\x20from\x20the\x20server.','_unitLoaded$','ERROR_IMAGE_TYPE','_remoteChangesetQueue','addHandlerCallback','isTransformChangesetsSuccess','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY','_sessionStatus$','SheetPermissionInitController','dispose$','/universer-api/comb','enableCollaboration','getValue','_telemetryInfo','default','ErrorCode','[CollaborationAttachmentIoService]:\x20unitId\x20is\x20not\x20found.','Injector','_showConflictNotification','joinRsp','_applyRemoteChangeset','UniverInstanceType','_retryConnectingTimer','_sender','14QRfmMv','members','updateCursorEvent','\x20in\x20_schedule.','_revisionService','pipe','CHANGESET_SHOULD_RETRY','_waitForHeartbeatResponse','transformSelections','DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT','dispose','focused$','Univer','MentionIoHttpService','[CollaborationState]:\x20apply\x20error!','_members$','_pendingMutations','_acknowledgeAwaitingIfReady','_onMessage','cmd','encode','_acknowledgeAwaiting','_members','setCfgEnableObjInherit','708786VXaPZo','encodeURIComponent','getInterceptPoints','_clearRedo','saveChangeset','DisposableCollection','_lockTransition','getAllMembers','updateMember','_handleRemoteChangesets','range','resourceIDs','_changesetSessionId','floor','_initMergeInterceptor','IAttachmentIoService','PERSON','CollaborationEvent','patch','disableLocalCache','filter','_replaceFileID','_sessions','changesets','onSyncEditingCollabCursor','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','fromCharCode','updateCollaborator','unitLoaded$','ImageSourceType','isTransformMutationsWithChangesetFailure','version','userID','IImageIoService','_socketService','sessionStatus','constructor','UNIVER_BASE','size','charCodeAt','CollaborationSocketService','forEach','RevisionService','UPDATE_CURSOR','textEncoder','PENDING','_throwTelemetryCollaborationNewChangeset','reduce','__splitChunk__','touchDependencies','leaveEvent','CollaborationUIEventService','UUID','method','CombCmd','HEARTBEAT_TIMEOUT_KEY','open$','_clearLocalCache','_commandService','ws://127.0.0.1:8000/universer-api/comb/connect','override','transformUndoRedo','onCommentUpdate','_clearUndo','ImageUploadStatusType','[CollaborationUndoRedoService]','objects','MUTATION','CONFLICT','CollaborativeUndoRedoService','_createInitialStateImpl','closeSession','base-ui.attachment-io.service','isTransformMutationsWithChangesetSuccess','_clearCollaborationTimeoutTimer','[FetchingMissState]:\x20received\x20stale\x20ack\x20revision:\x20','removeMember','init','batchAllowed','decorate','[PendingState]:\x20received\x20acknowledgement.','getImageSourceCache','getTypeOfUnitAdded$','_unitInfo$','getConfig','onTransformRemoteChangesetByStateCache','next','attachment','createIdentifier','_retryCount','_unlockTransition','CollaborationImageIoService','getRoom','message$','HEARTBEAT_INTERVAL','_transformStack','_socket$','unitID','CommandType','_fetchMissChangesets','_localeService','LocalUndoRedoService','createCollaborator','_memberService','unknown','toStringTag','_socketMessageSubscription','function','JOIN_ROOM_PERMISSION_DENIED','map','Optional','_isEchoedAwaitingChangeset','ILocalCacheService','_startCollaboration','HTTPRequest','close','number','[FetchMissState]:\x20missing\x20changesets\x20response\x20still\x20has\x20revision\x20gaps.','sort','_initDependencies','_configService','allowed','localCacheService','routeKey','m2Prime','_replayCachedMutations','_clearTimeoutTimer','DependentOn','ISnapshotServerService','selections','_transformService','_createHandler','string','_docStateChangeManagerService','status','HEARTBEAT_INTERVAL_KEY','_onRemoteRejected','_onLocalMutation','slice','get','createInstance','_injector','collaboration-client.auth.needGotoLoginAlert','origin','onMissingChangesets','_snapshotService','_onOffline','_HTTPService','fetchThroughInterceptors','BASE64','ICollaborationSocketService','merge','Inject','object','onload','_roomMembers','_snapshotServerService','_transformSelections','_onConflict','_getCtorByUniverInstanceType','commentUpdateEvent','FileId','status$','1262206RpdBra','members$','textRanges','LOCAL_CACHE_INTERVAL','_networkConditionService','/universer-api/stream/file/upload','RxDisposable','CollaborationSessionService','_sendHeartbeat','generateRandomId','session.room-cnt-exceeds','signUrlServerUrl','subscribe','socketService','INGEST','[AuthServerService]:\x20you\x20should\x20provide\x20authentication\x20info\x20on\x20Node.js.','_isPermissionRej','[SyncedState]:\x20invalid\x20calling\x20to\x20`resend`.','loadOfflineData','collaboration-client.config','startsWith','ApplyBaseJson1Mutation','SHOULD_CLOSE_CONN','loadBase','isInternalEditorID','IUndoRedoService','mutations','_onRemoteACK','getImage','delay','c1Prime','isArray'];_0x3e56=function(){return _0x573256;};return _0x3e56();}P=b([y(0x6,(0x0,n[_0x545128(0x304)])(n[_0x545128(0x3bd)])),y(0x7,n['ICommandService']),y(0x8,n[_0x545128(0x328)]),y(0x9,(0x0,n['Inject'])(t['RevisionService'])),y(0xa,(0x0,n['Inject'])(n[_0x545128(0x34e)])),y(0xb,(0x0,n[_0x545128(0x304)])(v)),y(0xc,(0x0,n[_0x545128(0x2da)])(C))],P);let F=class extends k{constructor(_0x356af9,_0x254d96,_0x397084,_0x27a32c,_0x101a59,_0x1c847d,_0x1f5bf1,_0x4c646f,_0x49bf7c,_0x3137f1){const _0x380020=_0x545128;super(_0x356af9,_0x254d96,_0x397084,_0x27a32c,_0x101a59,_0x4c646f,_0x49bf7c,_0x1f5bf1,_0x3137f1),this[_0x380020(0x2f9)]=_0x1c847d,_(this,_0x380020(0x2f2),'offline');}[_0x545128(0x4d0)](_0x3cb494){const _0x4bf32a=_0x545128;return this[_0x4bf32a(0x264)][_0x4bf32a(0x3f5)](_0x3cb494),this[_0x4bf32a(0x218)](),this;}[_0x545128(0x4d9)](_0x3e626b){throw Error('[OfflineState]:\x20received\x20changeset.');}[_0x545128(0x336)](){throw Error('[OfflineState]:\x20received\x20acknowledgement.');}[_0x545128(0x3b6)](){const _0x350e89=_0x545128;throw Error(_0x350e89(0x3db));}[_0x545128(0x1e6)](){return this;}['toggleOffline'](){return this;}[_0x545128(0x349)](){const _0x3f1b33=_0x545128;let {_injector:_0x283863,_pendingMutations:_0x4a9cf3,_awaitingChangeset:_0x32b425,unitID:_0x47e385,_handler:_0xfc1772,type:_0x5af505}=this,_0x305e2d=Me(_0x283863,_0x47e385,_0x5af505,_0x32b425,_0x4a9cf3,_0xfc1772);return _0x305e2d instanceof j?_0x305e2d[_0x3f1b33(0x39a)]():(_0x305e2d instanceof N||_0x305e2d instanceof M)&&_0x305e2d['resend'](),_0x305e2d;}[_0x545128(0x204)](){const _0x61b7f2=_0x545128;throw Error(_0x61b7f2(0x21e));}};F=b([y(0x5,(0x0,n[_0x545128(0x304)])(n[_0x545128(0x24d)])),y(0x6,(0x0,n['Inject'])(t['RevisionService'])),y(0x7,n[_0x545128(0x419)]),y(0x8,n['IUndoRedoService']),y(0x9,(0x0,n[_0x545128(0x2da)])(C))],F);let I=class extends k{constructor(_0x514a5d,_0x4f0fae,_0x5bb809,_0x3b0acc,_0x102f98,_0x509e53,_0x218ef5,_0x1b2c34,_0x3be547,_0x509a7e,_0x108bb3,_0x294e59,_0x998082,_0x482682){const _0x1046f5=_0x545128;super(_0x514a5d,_0x4f0fae,_0x5bb809,_0x3b0acc,_0x218ef5,_0x108bb3,_0x294e59,_0x3be547,_0x482682),this[_0x1046f5(0x408)]=_0x102f98,this[_0x1046f5(0x396)]=_0x509e53,this['_injector']=_0x1b2c34,this['_logService']=_0x509a7e,this[_0x1046f5(0x2ee)]=_0x998082,this[_0x1046f5(0x2e6)]=_0x482682,_(this,'status','fetch_missing');}['onMissedChangesetFetched'](_0x20e458){const _0x4dfa1f=_0x545128;try{if(this[_0x4dfa1f(0x275)](_0x20e458)['missingChangesets'])throw Error(_0x4dfa1f(0x2e1));if(this[_0x4dfa1f(0x275)]([...this[_0x4dfa1f(0x396)]][_0x4dfa1f(0x2e2)]((_0x495643,_0x4ad766)=>_0x495643['revision']-_0x4ad766[_0x4dfa1f(0x233)]))['missingChangesets'])return this['_queuedRemoteChangesets']=[],this[_0x4dfa1f(0x218)](),this['_handler'][_0x4dfa1f(0x2fc)]({'from':this[_0x4dfa1f(0x418)](),'to':0x0}),this;let _0x5ac45c=this[_0x4dfa1f(0x226)],_0x2950d9=this['_pendingMutations'],_0x5b0c24;if(_0x5ac45c&&_0x2950d9[_0x4dfa1f(0x38a)]!==0x0)_0x5b0c24=this[_0x4dfa1f(0x2f9)][_0x4dfa1f(0x2f8)](N,this[_0x4dfa1f(0x2cd)],this[_0x4dfa1f(0x393)],_0x5ac45c,_0x2950d9,this[_0x4dfa1f(0x499)],void 0x0);else{if(_0x5ac45c&&_0x2950d9[_0x4dfa1f(0x38a)]===0x0)_0x5ac45c[_0x4dfa1f(0x421)]=this[_0x4dfa1f(0x418)](),_0x5b0c24=this[_0x4dfa1f(0x2f9)][_0x4dfa1f(0x2f8)](M,this[_0x4dfa1f(0x2cd)],this[_0x4dfa1f(0x393)],_0x5ac45c,this['_handler']);else{if(_0x2950d9[_0x4dfa1f(0x38a)]!==0x0){let _0x49d7c0=this['_injector'][_0x4dfa1f(0x2f8)](j,this[_0x4dfa1f(0x2cd)],this['type'],_0x2950d9,this[_0x4dfa1f(0x499)]);_0x49d7c0[_0x4dfa1f(0x39a)](),_0x5b0c24=_0x49d7c0;}else _0x5b0c24=this[_0x4dfa1f(0x2f9)]['createInstance'](A,this['unitID'],this[_0x4dfa1f(0x393)],this[_0x4dfa1f(0x499)]);}}return _0x5b0c24[_0x4dfa1f(0x218)](),_0x5b0c24;}catch(_0x382427){return this[_0x4dfa1f(0x4a2)][_0x4dfa1f(0x42e)](_0x4dfa1f(0x3cf),_0x4dfa1f(0x20a),_0x382427),this[_0x4dfa1f(0x2f9)][_0x4dfa1f(0x2f8)](P,this[_0x4dfa1f(0x2cd)],this[_0x4dfa1f(0x393)],this[_0x4dfa1f(0x226)],this[_0x4dfa1f(0x264)],this[_0x4dfa1f(0x499)],!0x1);}}[_0x545128(0x275)](_0x3463e6){const _0x1d20e3=_0x545128;this['_acknowledgeAwaitingIfReady']();for(let _0x8e0b9e=0x0;_0x8e0b9e<_0x3463e6[_0x1d20e3(0x38a)];_0x8e0b9e++){let _0x1fd75f=_0x3463e6[_0x8e0b9e],_0x222da3=this[_0x1d20e3(0x418)]();if(!(_0x1fd75f[_0x1d20e3(0x233)]<=_0x222da3)){if(_0x1fd75f['revision']>_0x222da3+0x1)return{'missingChangesets':!0x0};if(this[_0x1d20e3(0x2db)](_0x1fd75f)){this['_acknowledgeAwaiting']();continue;}this[_0x1d20e3(0x476)](_0x1fd75f),this[_0x1d20e3(0x265)]();}}return{'missingChangesets':!0x1};}['_transformAndApplyRemoteChangeset'](_0x1fb98c){const _0x6d3a1f=_0x545128;let _0x2c9e8b=_0x1fb98c,_0x4c0378=this[_0x6d3a1f(0x226)];if(_0x4c0378){let _0x3b66ce=this['_transformService'][_0x6d3a1f(0x333)]([_0x1fb98c],[_0x4c0378],!0x1);if(!(0x0,t['isTransformChangesetsSuccess'])(_0x3b66ce))throw _0x3b66ce[_0x6d3a1f(0x42e)];_0x2c9e8b=_0x3b66ce[_0x6d3a1f(0x32d)][0x0],_0x4c0378=_0x3b66ce[_0x6d3a1f(0x4b1)][0x0];}let _0x76e2d8=this[_0x6d3a1f(0x264)];if(_0x76e2d8[_0x6d3a1f(0x38a)]){let _0x511509=this[_0x6d3a1f(0x2ee)][_0x6d3a1f(0x23b)](_0x2c9e8b,_0x76e2d8);if(!(0x0,t['isTransformMutationsWithChangesetSuccess'])(_0x511509))throw _0x511509[_0x6d3a1f(0x42e)];_0x2c9e8b=_0x511509[_0x6d3a1f(0x32d)],_0x76e2d8=_0x511509[_0x6d3a1f(0x2e8)];}this[_0x6d3a1f(0x3ac)](_0x2c9e8b),_0x4c0378&&(_0x4c0378[_0x6d3a1f(0x421)]=this['_getCurrentRevision']()),this[_0x6d3a1f(0x226)]=_0x4c0378,this[_0x6d3a1f(0x264)]=_0x76e2d8;}[_0x545128(0x265)](){const _0x33ef54=_0x545128;if(!this['_awaitingChangeset']||this[_0x33ef54(0x408)]==null)return;let _0x199696=this[_0x33ef54(0x418)]();if(this[_0x33ef54(0x408)]<=_0x199696)throw Error(_0x33ef54(0x2b7)+this[_0x33ef54(0x408)]+'.');this[_0x33ef54(0x408)]===_0x199696+0x1&&this['_acknowledgeAwaiting']();}[_0x545128(0x269)](){const _0x32cf22=_0x545128;this[_0x32cf22(0x3aa)](),this[_0x32cf22(0x226)]=null,this[_0x32cf22(0x408)]=null;}[_0x545128(0x2db)](_0x4f0d0a){const _0x118ddc=_0x545128;let _0x2ce1d0=this[_0x118ddc(0x226)];return!_0x2ce1d0||!_0x2ce1d0['sid']||_0x2ce1d0['reqId']===null||_0x2ce1d0[_0x118ddc(0x43b)]===void 0x0?!0x1:_0x4f0d0a['unitID']===_0x2ce1d0[_0x118ddc(0x2cd)]&&_0x4f0d0a[_0x118ddc(0x374)]===_0x2ce1d0[_0x118ddc(0x374)]&&_0x4f0d0a[_0x118ddc(0x43b)]===_0x2ce1d0[_0x118ddc(0x43b)];}[_0x545128(0x204)](){const _0x3b8755=_0x545128;throw Error(_0x3b8755(0x348));}[_0x545128(0x4d0)](_0x24236e){const _0x45307b=_0x545128;return this[_0x45307b(0x264)]['push'](_0x24236e),this;}[_0x545128(0x4d9)](_0x131e37){const _0x21b50b=_0x545128;return this[_0x21b50b(0x396)]['push'](_0x131e37),this;}[_0x545128(0x336)](_0x2eeef5){const _0x4e9acf=_0x545128;if(this['_awaitingChangeset']){let _0x3c5c89=this[_0x4e9acf(0x418)]();return _0x2eeef5[_0x4e9acf(0x233)]<=_0x3c5c89||(_0x3c5c89+0x1===_0x2eeef5[_0x4e9acf(0x233)]?(this['_incrementRevisionNumber'](),this[_0x4e9acf(0x226)]=null,this[_0x4e9acf(0x408)]=null):this[_0x4e9acf(0x408)]=_0x2eeef5['revision']),this;}if(_0x2eeef5[_0x4e9acf(0x233)]<=this[_0x4e9acf(0x418)]())return this;throw Error(_0x4e9acf(0x3af));}[_0x545128(0x3b6)](_0x3d7887){const _0x5c89c7=_0x545128;return this['_onConflict'](!!(_0x3d7887!=null&&_0x3d7887[_0x5c89c7(0x447)]));}[_0x545128(0x1e6)](){return this;}['toggleOffline'](){const _0x3ac95c=_0x545128;return this[_0x3ac95c(0x2f9)][_0x3ac95c(0x2f8)](F,this[_0x3ac95c(0x2cd)],this[_0x3ac95c(0x393)],this[_0x3ac95c(0x226)],this[_0x3ac95c(0x264)],this[_0x3ac95c(0x499)]);}[_0x545128(0x349)](){return this;}[_0x545128(0x30a)](_0x581d25){const _0x39b0a4=_0x545128;return this[_0x39b0a4(0x2f9)]['createInstance'](P,this['unitID'],this[_0x39b0a4(0x393)],this[_0x39b0a4(0x226)],this[_0x39b0a4(0x264)],this[_0x39b0a4(0x499)],_0x581d25);}};I=b([y(0x7,(0x0,n['Inject'])(n[_0x545128(0x24d)])),y(0x8,(0x0,n['Inject'])(t[_0x545128(0x296)])),y(0x9,n['ILogService']),y(0xa,n[_0x545128(0x419)]),y(0xb,n['IUndoRedoService']),y(0xc,t[_0x545128(0x35b)]),y(0xd,(0x0,n['Optional'])(C))],I);function Me(_0x2536b0,_0x3e324e,_0x34017f,_0x4bcb64,_0x1d77cf,_0x57e77a){const _0x4d7ede=_0x545128;return _0x4bcb64&&_0x1d77cf['length']?_0x2536b0[_0x4d7ede(0x2f8)](N,_0x3e324e,_0x34017f,_0x4bcb64,_0x1d77cf,_0x57e77a,void 0x0):_0x4bcb64?_0x2536b0[_0x4d7ede(0x2f8)](M,_0x3e324e,_0x34017f,_0x4bcb64,_0x57e77a):_0x1d77cf['length']?_0x2536b0[_0x4d7ede(0x2f8)](j,_0x3e324e,_0x34017f,_0x1d77cf,_0x57e77a):_0x2536b0['createInstance'](A,_0x3e324e,_0x34017f,_0x57e77a);}let L=class extends n['RxDisposable']{get['state'](){const _0x1e0c70=_0x545128;return this[_0x1e0c70(0x3c4)];}constructor(_0x14e91b,_0x7806ba,_0x178b37,_0x29eb5b,_0x35f266,_0xb1838a,_0x16ef17,_0x2474c6,_0x3a13c2,_0x133b58,_0x3f6f01,_0xf151b9,_0x549d98,_0x3056ac){const _0x4c6240=_0x545128;super(),this[_0x4c6240(0x2cd)]=_0x14e91b,this[_0x4c6240(0x45a)]=_0x7806ba,this['_type']=_0x178b37,this[_0x4c6240(0x2f9)]=_0x29eb5b,this['_compressMutationService']=_0x35f266,this[_0x4c6240(0x2d0)]=_0xb1838a,this['_revisionService']=_0x16ef17,this[_0x4c6240(0x4c7)]=_0x2474c6,this[_0x4c6240(0x1e7)]=_0x3a13c2,this[_0x4c6240(0x4a2)]=_0x133b58,this[_0x4c6240(0x2a6)]=_0x3f6f01,this[_0x4c6240(0x1f9)]=_0xf151b9,this[_0x4c6240(0x36f)]=_0x549d98,this[_0x4c6240(0x3ea)]=_0x3056ac,_(this,'_state$',new a[(_0x4c6240(0x3b2))](null)),_(this,_0x4c6240(0x209),this[_0x4c6240(0x3d5)][_0x4c6240(0x49e)]()),_(this,'_state',void 0x0),_(this,_0x4c6240(0x3e1),!0x1),_(this,_0x4c6240(0x278),''),_(this,_0x4c6240(0x47d),0x0),_(this,_0x4c6240(0x30e),this['state$'][_0x4c6240(0x259)]((0x0,a['map'])(_0x5d5962=>_0x5d5962?_0x5d5962[_0x4c6240(0x2f2)]:_0x4c6240(0x459)),(0x0,a['shareReplay'])({'bufferSize':0x1,'refCount':!0x0}))),_(this,_0x4c6240(0x463),!0x1),_(this,_0x4c6240(0x23f),[]);}async[_0x545128(0x2b9)](){const _0x7fae02=_0x545128;if(this[_0x7fae02(0x416)])throw Error('[CollaborationEntity]:\x20initial\x20state\x20has\x20been\x20created\x20before.\x20You\x20should\x20not\x20call\x20\x22init\x22\x20twice.');await this[_0x7fae02(0x207)]();}[_0x545128(0x41a)](){const _0xa73cde=_0x545128;return this[_0xa73cde(0x3e1)]=!0x0,(0x0,n[_0xa73cde(0x45b)])(()=>{const _0x1932dd=_0xa73cde;this[_0x1932dd(0x3e1)]=!0x1,this[_0x1932dd(0x4a7)]();});}[_0x545128(0x35f)](_0x4e9f8c){const _0x357ee0=_0x545128;this[_0x357ee0(0x2f5)](_0x4e9f8c);}[_0x545128(0x48d)](_0x1381e3){const _0x475932=_0x545128;this['_state']=_0x1381e3,this[_0x475932(0x3d5)]['next'](_0x1381e3);}async[_0x545128(0x207)](){const _0x26d26e=_0x545128;if(this[_0x26d26e(0x48d)](await this['_createInitialState']()),this[_0x26d26e(0x36f)]){var _0x53ae80;(_0x53ae80=this[_0x26d26e(0x36f)])==null||_0x53ae80['editingUnit'](this[_0x26d26e(0x2cd)]),this[_0x26d26e(0x44d)](this[_0x26d26e(0x36f)][_0x26d26e(0x3a4)](this[_0x26d26e(0x2cd)])[_0x26d26e(0x31b)](_0x4a5e1b=>{const _0x2dea44=_0x26d26e;this['_logService']['debug'](_0x2dea44(0x205),_0x2dea44(0x4b3),_0x4a5e1b),_0x4a5e1b===0x1?(this['_eventService'][_0x2dea44(0x214)]({'id':_0x2dea44(0x201)}),this[_0x2dea44(0x1f9)][_0x2dea44(0x21c)](new i['WorkbookEditablePermission'](this[_0x2dea44(0x2cd)])['id'],!0x1),this['_permissionService'][_0x2dea44(0x3b7)](!0x1)):(this['_permissionService'][_0x2dea44(0x21c)](new i[(_0x2dea44(0x4bd))](this[_0x2dea44(0x2cd)])['id'],!0x0),this[_0x2dea44(0x1f9)]['setShowComponents'](!0x0));}));}let _0x17e2d9=!0x1;return this[_0x26d26e(0x44d)](this[_0x26d26e(0x45a)][_0x26d26e(0x4a1)]['subscribe'](_0x2a95a9=>{const _0x291630=_0x26d26e;_0x2a95a9===0x3?this[_0x291630(0x3be)](_0x17e2d9):_0x2a95a9===0x2&&(_0x17e2d9=!0x0,this['_toggleOffline']());})),this['disposeWithMe'](this[_0x26d26e(0x45a)][_0x26d26e(0x40e)][_0x26d26e(0x31b)](_0x1782b2=>{const _0x43098f=_0x26d26e;try{switch(_0x1782b2[_0x43098f(0x43a)]){case t[_0x43098f(0x27d)][_0x43098f(0x359)]:this[_0x43098f(0x3f3)]((0x0,t['parseProtocolChangeset'])(_0x1782b2[_0x43098f(0x4b8)]));break;case t[_0x43098f(0x27d)][_0x43098f(0x3ff)]:this[_0x43098f(0x32a)](_0x1782b2[_0x43098f(0x4b8)]);break;case t[_0x43098f(0x27d)][_0x43098f(0x20d)]:this[_0x43098f(0x2f4)]();break;case t['CollaborationEvent'][_0x43098f(0x25a)]:this[_0x43098f(0x231)](_0x1782b2[_0x43098f(0x4b8)]);break;case t[_0x43098f(0x27d)]['PSEUDO_FETCH_MISSING_RESULT']:this[_0x43098f(0x1ff)](_0x1782b2[_0x43098f(0x4b8)][_0x43098f(0x283)][_0x43098f(0x2d9)](_0x5d3996=>(0x0,t['parseProtocolChangeset'])(_0x5d3996)));break;case t[_0x43098f(0x27d)][_0x43098f(0x355)]:this[_0x43098f(0x2f4)]({'isPermissionRej':!0x0});break;case t[_0x43098f(0x27d)][_0x43098f(0x224)]:break;}}catch(_0x1065a2){throw console[_0x43098f(0x42e)](_0x43098f(0x228),_0x1065a2),_0x1065a2;}})),this[_0x26d26e(0x3c4)];}[_0x545128(0x2c6)](){const _0xfc50b5=_0x545128;this[_0xfc50b5(0x463)]=!0x1;}[_0x545128(0x272)](){const _0x35ce00=_0x545128;if(this['_transitionLocked'])throw Error('[CollaborationEntity]:\x20cannot\x20lock\x20transition\x20twice!\x20This\x20is\x20an\x20implementation\x20error,\x20meaning\x20you\x20transit\x20the\x20collaboration\x20state\x20again\x20in\x20the\x20process\x20of\x20a\x20previous\x20transition.\x20This\x20should\x20never\x20happen.');this[_0x35ce00(0x463)]=!0x0;}[_0x545128(0x2f5)](_0x4fb940){const _0x2be9dd=_0x545128;this[_0x2be9dd(0x272)](),this[_0x2be9dd(0x48d)](this[_0x2be9dd(0x3c4)]['appendMutation'](_0x4fb940)),this['_unlockTransition']();}[_0x545128(0x3f3)](_0x7ba4d8){const _0x5eb63e=_0x545128;if(!(_0x7ba4d8['revision']<=this[_0x5eb63e(0x258)][_0x5eb63e(0x4ab)](this[_0x5eb63e(0x2cd)]))){if(this['_collaborationPaused']){this[_0x5eb63e(0x23f)][_0x5eb63e(0x3f5)](_0x7ba4d8);return;}this['_applyRemoteChangeset'](_0x7ba4d8);}}[_0x545128(0x4a7)](){const _0x4dfeca=_0x545128;this[_0x4dfeca(0x23f)][_0x4dfeca(0x295)](_0x3d0357=>this[_0x4dfeca(0x250)](_0x3d0357)),this[_0x4dfeca(0x23f)]=[];}[_0x545128(0x250)](_0x2434cc){const _0x56d0bc=_0x545128;let _0x55fad0=this['_compressMutationService'][_0x56d0bc(0x331)][_0x56d0bc(0x300)](this[_0x56d0bc(0x390)][_0x56d0bc(0x331)][_0x56d0bc(0x26e)]()['COMPRESS_MUTATION_APPLY'])(_0x2434cc['mutations'],null)||_0x2434cc[_0x56d0bc(0x329)],_0x366f9d={..._0x2434cc,'mutations':_0x55fad0};this['_lockTransition'](),this[_0x56d0bc(0x48d)](this[_0x56d0bc(0x3c4)]['onRemoteChangeset'](_0x366f9d)),this['_unlockTransition']();}[_0x545128(0x32a)](_0xc5f9d9){const _0x2b6a1f=_0x545128;this[_0x2b6a1f(0x272)](),this[_0x2b6a1f(0x48d)](this[_0x2b6a1f(0x3c4)]['onRemoteAck'](_0xc5f9d9)),this['_unlockTransition']();}[_0x545128(0x2f4)](_0x3e17c4){const _0x1b5287=_0x545128;this[_0x1b5287(0x272)](),this[_0x1b5287(0x48d)](this[_0x1b5287(0x3c4)]['onRemoteRej'](_0x3e17c4)),this[_0x1b5287(0x2c6)]();}['_onRemoteRetry'](_0x320716){const _0x468440=_0x545128;this[_0x468440(0x272)](),this[_0x468440(0x48d)](this[_0x468440(0x3c4)]['onRemoteRetry'](_0x320716)),this[_0x468440(0x2c6)]();}[_0x545128(0x1ff)](_0x15e207){const _0x3f8c5c=_0x545128;if(!(this['_state']instanceof I))throw TypeError(_0x3f8c5c(0x49b));let _0x35f1ff=_0x15e207['map'](_0x2a0ca3=>{const _0x32d67f=_0x3f8c5c;let _0x5c317a=this[_0x32d67f(0x390)][_0x32d67f(0x331)][_0x32d67f(0x300)](this[_0x32d67f(0x390)][_0x32d67f(0x331)][_0x32d67f(0x26e)]()[_0x32d67f(0x4aa)])(_0x2a0ca3['mutations'],null)||_0x2a0ca3[_0x32d67f(0x329)];return{..._0x2a0ca3,'mutations':_0x5c317a};});this['_lockTransition'](),this[_0x3f8c5c(0x48d)](this['_state'][_0x3f8c5c(0x402)](_0x35f1ff)),this[_0x3f8c5c(0x2c6)]();}['_toggleOffline'](){const _0x2c4b56=_0x545128;this[_0x2c4b56(0x272)](),this[_0x2c4b56(0x48d)](this[_0x2c4b56(0x3c4)]['toggleOffline']()),this['_unlockTransition']();}[_0x545128(0x3be)](_0x24116f=!0x1){const _0x1b5a36=_0x545128;this[_0x1b5a36(0x272)](),this[_0x1b5a36(0x48d)](this[_0x1b5a36(0x3c4)][_0x1b5a36(0x349)]()),this[_0x1b5a36(0x2c6)]();let _0x33f492=this['_state'];_0x24116f&&_0x33f492 instanceof A&&(this[_0x1b5a36(0x272)](),this[_0x1b5a36(0x48d)](_0x33f492['fetchMiss']()),this[_0x1b5a36(0x2c6)]());}async['_createInitialState'](){return new Promise(_0x3d83dd=>{const _0x220ab1=_0x4024;this[_0x220ab1(0x45a)][_0x220ab1(0x4a1)][_0x220ab1(0x259)]((0x0,a['take'])(0x1))[_0x220ab1(0x31b)](async _0x2997ae=>{const _0x1bb82f=_0x220ab1;_0x3d83dd(await this[_0x1bb82f(0x2b2)](_0x2997ae===0x3));});});}['_createHandler'](){let _0x17e1aa=this['unitID'];return{'onStateChange':(_0xd03d32,_0x5eaa01)=>{const _0x5a5b33=_0x4024;if(_0xd03d32!==this[_0x5a5b33(0x3c4)])throw Error('[CollaborationEntity]:\x20invalid\x20state\x20transition!\x20State\x20transferred\x20from\x20is\x20not\x20the\x20current\x20state.\x0aBefore:\x20'+_0xd03d32[_0x5a5b33(0x2f2)]+_0x5a5b33(0x1fc)+_0x5eaa01[_0x5a5b33(0x2f2)]+'\x0aCurrent:\x20'+this['_state'][_0x5a5b33(0x2f2)]);this[_0x5a5b33(0x48d)](_0x5eaa01);},'onSendChangeset':_0x46dedc=>{const _0x169f2a=_0x4024;_0x46dedc[_0x169f2a(0x374)]||(_0x46dedc[_0x169f2a(0x374)]=this[_0x169f2a(0x278)],_0x46dedc[_0x169f2a(0x43b)]=++this['_changesetReqId']);let _0x3a8b55={'eventID':t[_0x169f2a(0x27d)][_0x169f2a(0x3b8)],'data':{'unitID':_0x46dedc[_0x169f2a(0x2cd)],'unitType':this[_0x169f2a(0x345)],'changeset':_0x46dedc,'memberID':this['session'][_0x169f2a(0x479)]()}};this[_0x169f2a(0x45a)][_0x169f2a(0x1f7)](_0x3a8b55,this[_0x169f2a(0x2cd)]);},'onMissingChangesets':({from:_0x218fdf,to:_0x3dafca})=>{const _0x39d791=_0x4024;this[_0x39d791(0x4a2)][_0x39d791(0x1fb)]('[CollaborationEntity]',_0x39d791(0x480)+_0x218fdf+'\x20to\x20'+_0x3dafca);let _0x435b14={'eventID':t[_0x39d791(0x27d)][_0x39d791(0x330)],'data':{'unitID':_0x17e1aa,'unitType':this[_0x39d791(0x345)],'from':_0x218fdf,'to':_0x3dafca}};this[_0x39d791(0x45a)][_0x39d791(0x1f7)](_0x435b14,this[_0x39d791(0x2cd)]);}};}async[_0x545128(0x2b2)](_0x3e1879){const _0x59a58c=_0x545128;var _0x36d16a,_0xf9d2a7,_0x355a85;let _0x3fca59=await((_0x36d16a=this['_localCacheService'])==null?void 0x0:_0x36d16a['loadOfflineData'](this[_0x59a58c(0x2cd)])),_0x32b4f6=(_0xf9d2a7=_0x3fca59==null?void 0x0:_0x3fca59[_0x59a58c(0x329)])==null?[]:_0xf9d2a7,_0x26a95d=(_0x355a85=_0x3fca59==null?void 0x0:_0x3fca59[_0x59a58c(0x1eb)])==null?null:_0x355a85,_0x18836b=!!(_0x26a95d!=null&&_0x26a95d[_0x59a58c(0x374)])&&!!(_0x26a95d!=null&&_0x26a95d[_0x59a58c(0x43b)]);this[_0x59a58c(0x278)]=_0x18836b?_0x26a95d[_0x59a58c(0x374)]:(0x0,t[_0x59a58c(0x491)])(),this[_0x59a58c(0x47d)]=_0x18836b?_0x26a95d[_0x59a58c(0x43b)]:0x0;let _0x125493=this[_0x59a58c(0x2cd)];try{this[_0x59a58c(0x2e9)](_0x26a95d,_0x32b4f6);}catch(_0x16b589){this[_0x59a58c(0x4a2)][_0x59a58c(0x42e)](_0x16b589);}let _0x59aa5b=this[_0x59a58c(0x2ef)]();if(_0x3e1879){let _0xbf520e=Me(this['_injector'],_0x125493,this['_type'],_0x26a95d,_0x32b4f6,_0x59aa5b);return _0xbf520e instanceof j?_0xbf520e[_0x59a58c(0x39a)]():(_0xbf520e instanceof N||_0xbf520e instanceof M)&&_0xbf520e[_0x59a58c(0x204)](),_0xbf520e;}return this[_0x59a58c(0x2f9)][_0x59a58c(0x2f8)](F,_0x125493,this[_0x59a58c(0x345)],_0x26a95d,_0x32b4f6,_0x59aa5b);}[_0x545128(0x2e9)](_0x139277,_0x122441){const _0x46174b=_0x545128;var _0x33a58d,_0x592e13;let _0x8991c3=this['_compressMutationService']['interceptor']['fetchThroughInterceptors'](this[_0x46174b(0x390)]['interceptor'][_0x46174b(0x26e)]()['COMPRESS_MUTATION_APPLY']);(_0x33a58d=_0x8991c3((_0x139277==null?void 0x0:_0x139277[_0x46174b(0x329)])||[],null))==null||_0x33a58d[_0x46174b(0x295)](_0x5b7b42=>this['_commandService'][_0x46174b(0x3e3)](_0x5b7b42['id'],_0x5b7b42[_0x46174b(0x36d)])),(_0x592e13=_0x8991c3(_0x122441||[],null))==null||_0x592e13[_0x46174b(0x295)](_0x789ff1=>this[_0x46174b(0x2a6)][_0x46174b(0x3e3)](_0x789ff1['id'],_0x789ff1[_0x46174b(0x36d)]));}};L=b([y(0x3,(0x0,n[_0x545128(0x304)])(n[_0x545128(0x24d)])),y(0x4,(0x0,n[_0x545128(0x304)])(t[_0x545128(0x357)])),y(0x5,(0x0,n[_0x545128(0x304)])(n[_0x545128(0x34e)])),y(0x6,(0x0,n[_0x545128(0x304)])(t[_0x545128(0x296)])),y(0x7,(0x0,n['Inject'])(v)),y(0x8,n[_0x545128(0x4c4)]),y(0x9,n[_0x545128(0x368)]),y(0xa,n[_0x545128(0x419)]),y(0xb,n['IPermissionService']),y(0xc,(0x0,n[_0x545128(0x2da)])(T)),y(0xd,(0x0,n[_0x545128(0x2da)])(C))],L);let R=class extends L{constructor(_0x124921,_0x5ee172,_0x4da44a,_0x42d0c1,_0x549404,_0x5d4c4b,_0x4d101f,_0x419deb,_0x4c7a50,_0x4dc2f5,_0x52d4b3,_0x4cd2bc,_0xe54b4d,_0x342443,_0x31a083){const _0x1ec106=_0x545128;super(_0x124921,_0x4da44a,_0x5ee172,_0x42d0c1,_0x549404,_0x5d4c4b,_0x4d101f,_0x419deb,_0x4c7a50,_0x4dc2f5,_0x52d4b3,_0x4cd2bc,_0x342443,_0x31a083),this[_0x1ec106(0x2cd)]=_0x124921,this['type']=_0x5ee172,this[_0x1ec106(0x2f1)]=_0xe54b4d,_(this,_0x1ec106(0x3a3),null);}[_0x545128(0x240)](_0x58295c){const _0x1fb879=_0x545128;this[_0x1fb879(0x3a3)]=_0x58295c;}[_0x545128(0x25e)](){const _0x2d7c2a=_0x545128;this[_0x2d7c2a(0x3a3)]=null,super[_0x2d7c2a(0x25e)]();}[_0x545128(0x2ef)](){const _0x32ecfa=_0x545128;let _0x500fb1=super[_0x32ecfa(0x2ef)]();return _0x500fb1['onTransformIME']=_0x6b7d12=>{const _0x104fc5=_0x32ecfa;var _0xed4e3,_0x33a14c;return(_0xed4e3=this[_0x104fc5(0x3a3)])==null||(_0x33a14c=_0xed4e3[_0x104fc5(0x4ce)])==null?void 0x0:_0x33a14c[_0x104fc5(0x339)](_0xed4e3,_0x6b7d12);},_0x500fb1['onTransformState']=_0x5816ca=>{const _0x4a9f55=_0x32ecfa;var _0x55d2da,_0x23f7bc;return(_0x55d2da=this['_handlerCallback'])==null||(_0x23f7bc=_0x55d2da[_0x4a9f55(0x227)])==null?void 0x0:_0x23f7bc[_0x4a9f55(0x339)](_0x55d2da,_0x5816ca);},_0x500fb1['onTransformSelections']=_0x361f36=>{const _0x533601=_0x32ecfa;var _0x2481ca,_0x5d8d07;return(_0x2481ca=this['_handlerCallback'])==null||(_0x5d8d07=_0x2481ca[_0x533601(0x4a4)])==null?void 0x0:_0x5d8d07['call'](_0x2481ca,_0x361f36);},_0x500fb1[_0x32ecfa(0x284)]=_0x7fdfc=>{const _0x1cbaed=_0x32ecfa;var _0x445dfd,_0x45db57;return(_0x445dfd=this['_handlerCallback'])==null||(_0x45db57=_0x445dfd[_0x1cbaed(0x284)])==null?void 0x0:_0x45db57[_0x1cbaed(0x339)](_0x445dfd,_0x7fdfc);},_0x500fb1[_0x32ecfa(0x369)]=_0xece79c=>{const _0x40971d=_0x32ecfa;var _0x43cd51,_0x34fe90,_0x109e17;return(_0x43cd51=(_0x34fe90=this[_0x40971d(0x3a3)])==null||(_0x109e17=_0x34fe90['onTransformRemoteChangesetByIMECache'])==null?void 0x0:_0x109e17[_0x40971d(0x339)](_0x34fe90,_0xece79c))==null?_0xece79c:_0x43cd51;},_0x500fb1['onTransformRemoteChangesetByStateCache']=_0x3593a1=>{const _0x251821=_0x32ecfa;var _0x5dcddd,_0x385344,_0x517f8a;return(_0x5dcddd=(_0x385344=this['_handlerCallback'])==null||(_0x517f8a=_0x385344[_0x251821(0x2c1)])==null?void 0x0:_0x517f8a[_0x251821(0x339)](_0x385344,_0x3593a1))==null?_0x3593a1:_0x5dcddd;},_0x500fb1;}async[_0x545128(0x207)](){const _0x169bd5=_0x545128;if(this[_0x169bd5(0x2f1)]==null)throw Error('[DocCollaborationEntity]:\x20DocStateChangeManagerService\x20is\x20required.\x20Register\x20UniverDocsPlugin\x20before\x20collaboration.');let _0x5ca425=await super[_0x169bd5(0x207)]();return this[_0x169bd5(0x44d)](this[_0x169bd5(0x2f1)][_0x169bd5(0x3d0)]['subscribe'](_0x3a4eef=>{const _0x694df=_0x169bd5;if(_0x3a4eef==null||_0x3a4eef[_0x694df(0x222)]!==this[_0x694df(0x2cd)])return;let {commandId:_0x700bba,redoState:_0x4ade97,unitId:_0x1221e2}=_0x3a4eef,_0x2105cb={'id':_0x700bba,'type':n[_0x694df(0x2ce)][_0x694df(0x2af)],'params':{'unitId':_0x1221e2,'actions':_0x4ade97[_0x694df(0x449)],'textRanges':null}};this['_onLocalMutation'](_0x2105cb);})),this['disposeWithMe'](this[_0x169bd5(0x2a6)]['onMutationExecutedForCollab']((_0x1abfc1,_0x3be3c9)=>{const _0xdf7080=_0x169bd5;if(_0x1abfc1['type']!==n['CommandType'][_0xdf7080(0x2af)]||_0x3be3c9!=null&&_0x3be3c9[_0xdf7080(0x433)]||_0x3be3c9!=null&&_0x3be3c9[_0xdf7080(0x49c)]||_0x1abfc1['id']===r['RichTextEditingMutation']['id'])return;let _0x4adf16=_0x1abfc1[_0xdf7080(0x36d)];if((_0x4adf16==null?void 0x0:_0x4adf16[_0xdf7080(0x222)])!==this[_0xdf7080(0x2cd)])return;let _0x5af3e0=_0x1abfc1,_0x53af24=this[_0xdf7080(0x390)]['interceptor'][_0xdf7080(0x300)](this[_0xdf7080(0x390)][_0xdf7080(0x331)]['getInterceptPoints']()[_0xdf7080(0x3a2)])([_0x5af3e0],this[_0xdf7080(0x1e7)])||[_0x5af3e0];this['_onLocalMutation'](_0x53af24[0x0]);})),_0x5ca425;}};function _0x4024(_0x395146,_0x218042){_0x395146=_0x395146-0x1e6;const _0x3e56b8=_0x3e56();let _0x402443=_0x3e56b8[_0x395146];return _0x402443;}R=b([y(0x3,(0x0,n['Inject'])(n[_0x545128(0x24d)])),y(0x4,(0x0,n['Inject'])(t[_0x545128(0x357)])),y(0x5,(0x0,n[_0x545128(0x304)])(n[_0x545128(0x34e)])),y(0x6,(0x0,n[_0x545128(0x304)])(t[_0x545128(0x296)])),y(0x7,(0x0,n[_0x545128(0x304)])(v)),y(0x8,n[_0x545128(0x4c4)]),y(0x9,n[_0x545128(0x368)]),y(0xa,n[_0x545128(0x419)]),y(0xb,n['IPermissionService']),y(0xc,(0x0,n[_0x545128(0x2da)])(r['DocStateChangeManagerService'])),y(0xd,(0x0,n['Optional'])(T)),y(0xe,(0x0,n['Optional'])(C))],R);let Ne=class extends L{constructor(_0x23874b,_0x1e16ae,_0x2b6dd1,_0x3a5514,_0x4ecb14,_0xf77df7,_0x3ab67a,_0x574a81,_0x20cd67,_0x1d1cda,_0x3601c6,_0x223b56,_0x529cb6,_0xcb4e94){const _0x54c78f=_0x545128;super(_0x23874b,_0x2b6dd1,_0x1e16ae,_0x3a5514,_0x4ecb14,_0xf77df7,_0x3ab67a,_0x574a81,_0x20cd67,_0x1d1cda,_0x3601c6,_0x223b56,_0x529cb6,_0xcb4e94),this[_0x54c78f(0x2cd)]=_0x23874b,this['type']=_0x1e16ae;}async[_0x545128(0x207)](){const _0x298173=_0x545128;let _0x5bc828=await super[_0x298173(0x207)]();return this[_0x298173(0x44d)](this[_0x298173(0x2a6)]['onMutationExecutedForCollab']((_0x1fce34,_0x3d2601)=>{const _0x208c07=_0x298173;if(_0x1fce34[_0x208c07(0x393)]!==n[_0x208c07(0x2ce)][_0x208c07(0x2af)]||_0x3d2601!=null&&_0x3d2601['fromCollab']||_0x3d2601!=null&&_0x3d2601['onlyLocal']||_0x1fce34['id']!==e[_0x208c07(0x324)]['id'])return;let _0x3fd16f=_0x1fce34['params'];if((_0x3fd16f==null?void 0x0:_0x3fd16f[_0x208c07(0x222)])!==this['unitID'])return;let _0x32503c=_0x1fce34,_0x32dc07=this['_compressMutationService']['interceptor'][_0x208c07(0x300)](this[_0x208c07(0x390)][_0x208c07(0x331)]['getInterceptPoints']()['COMPRESS_MUTATION_SEND'])([_0x32503c],this[_0x208c07(0x1e7)])||[_0x32503c];this[_0x208c07(0x2f5)](_0x32dc07[0x0]);})),_0x5bc828;}};Ne=b([y(0x3,(0x0,n[_0x545128(0x304)])(n['Injector'])),y(0x4,(0x0,n[_0x545128(0x304)])(t[_0x545128(0x357)])),y(0x5,(0x0,n['Inject'])(n[_0x545128(0x34e)])),y(0x6,(0x0,n[_0x545128(0x304)])(t[_0x545128(0x296)])),y(0x7,(0x0,n[_0x545128(0x304)])(v)),y(0x8,n[_0x545128(0x4c4)]),y(0x9,n[_0x545128(0x368)]),y(0xa,n[_0x545128(0x419)]),y(0xb,n['IPermissionService']),y(0xc,(0x0,n[_0x545128(0x2da)])(T)),y(0xd,(0x0,n[_0x545128(0x2da)])(C))],Ne);let z=class extends L{constructor(_0x50e5e3,_0xc7108b,_0x546577,_0x4655fb,_0x586ede,_0x26ffa8,_0x1abdb2,_0x402c6a,_0x4f2b7d,_0x385884,_0x8293c1,_0x336eeb,_0x488e5c,_0x1c818c,_0x4cb997){const _0x3bae9e=_0x545128;super(_0x50e5e3,_0x546577,_0xc7108b,_0x4655fb,_0x586ede,_0x26ffa8,_0x1abdb2,_0x4f2b7d,_0x385884,_0x8293c1,_0x336eeb,_0x488e5c,_0x1c818c,_0x4cb997),this[_0x3bae9e(0x2cd)]=_0x50e5e3,this[_0x3bae9e(0x393)]=_0xc7108b,this['_sheetTransformSelectionsService']=_0x402c6a;}['_createHandler'](){const _0x5a90ff=_0x545128;let _0x4bdb42=super[_0x5a90ff(0x2ef)]();return _0x4bdb42['onTransformSelections']=_0x111906=>this[_0x5a90ff(0x434)]['transformSelections'](_0x111906),_0x4bdb42;}async[_0x545128(0x207)](){const _0x455889=_0x545128;let _0x430fa=await super[_0x455889(0x207)]();return this[_0x455889(0x44d)](this[_0x455889(0x2a6)][_0x455889(0x1f1)]((_0x5f376c,_0x4263d3)=>{const _0x1a742f=_0x455889;if(_0x5f376c[_0x1a742f(0x393)]!==n[_0x1a742f(0x2ce)][_0x1a742f(0x2af)]||_0x4263d3!=null&&_0x4263d3[_0x1a742f(0x433)]||_0x4263d3!=null&&_0x4263d3['onlyLocal'])return;let _0x4424c2=_0x5f376c[_0x1a742f(0x36d)];if((_0x4424c2==null?void 0x0:_0x4424c2['unitId'])!==this[_0x1a742f(0x2cd)])return;let _0x40cdad=_0x5f376c,_0x1fba98=this[_0x1a742f(0x390)][_0x1a742f(0x331)]['fetchThroughInterceptors'](this['_compressMutationService'][_0x1a742f(0x331)][_0x1a742f(0x26e)]()[_0x1a742f(0x3a2)])([_0x40cdad],this[_0x1a742f(0x1e7)])||[_0x40cdad];this[_0x1a742f(0x2f5)](_0x1fba98[0x0]);})),_0x430fa;}};z=b([y(0x3,(0x0,n['Inject'])(n[_0x545128(0x24d)])),y(0x4,(0x0,n[_0x545128(0x304)])(t[_0x545128(0x357)])),y(0x5,(0x0,n[_0x545128(0x304)])(n[_0x545128(0x34e)])),y(0x6,(0x0,n[_0x545128(0x304)])(t[_0x545128(0x296)])),y(0x7,(0x0,n[_0x545128(0x304)])(w)),y(0x8,(0x0,n[_0x545128(0x304)])(v)),y(0x9,n['IUniverInstanceService']),y(0xa,n['ILogService']),y(0xb,n['ICommandService']),y(0xc,n['IPermissionService']),y(0xd,(0x0,n['Optional'])(T)),y(0xe,(0x0,n[_0x545128(0x2da)])(C))],z);let B=class extends L{constructor(_0x2a7368,_0x3685a8,_0x5cbf65,_0x47f5fe,_0x55deaf,_0x2fc715,_0x260c3b,_0x146405,_0x448379,_0x5af26a,_0x2437e1,_0x5d1c7c,_0x49491a,_0x122e59){const _0x26678d=_0x545128;super(_0x2a7368,_0x5cbf65,_0x3685a8,_0x47f5fe,_0x55deaf,_0x2fc715,_0x260c3b,_0x146405,_0x448379,_0x5af26a,_0x2437e1,_0x5d1c7c,_0x49491a,_0x122e59),this[_0x26678d(0x2cd)]=_0x2a7368,this['type']=_0x3685a8;}async['_init'](){const _0x13e339=_0x545128;let _0x50be0f=await super['_init']();return this[_0x13e339(0x44d)](this[_0x13e339(0x2a6)][_0x13e339(0x1f1)]((_0x4f6348,_0x1d5be2)=>{const _0x554130=_0x13e339;if(_0x4f6348[_0x554130(0x393)]!==n[_0x554130(0x2ce)][_0x554130(0x2af)]||_0x1d5be2!=null&&_0x1d5be2[_0x554130(0x433)]||_0x1d5be2!=null&&_0x1d5be2[_0x554130(0x49c)])return;let _0x169e30=_0x4f6348[_0x554130(0x36d)];if((_0x169e30==null?void 0x0:_0x169e30[_0x554130(0x222)])!==this[_0x554130(0x2cd)])return;let _0x2bfec4=_0x4f6348,_0x458985=this[_0x554130(0x390)][_0x554130(0x331)][_0x554130(0x300)](this[_0x554130(0x390)][_0x554130(0x331)]['getInterceptPoints']()[_0x554130(0x3a2)])([_0x2bfec4],this[_0x554130(0x1e7)])||[_0x2bfec4];this[_0x554130(0x2f5)](_0x458985[0x0]);})),_0x50be0f;}};B=b([y(0x3,(0x0,n[_0x545128(0x304)])(n[_0x545128(0x24d)])),y(0x4,(0x0,n[_0x545128(0x304)])(t[_0x545128(0x357)])),y(0x5,(0x0,n[_0x545128(0x304)])(n[_0x545128(0x34e)])),y(0x6,(0x0,n[_0x545128(0x304)])(t[_0x545128(0x296)])),y(0x7,(0x0,n[_0x545128(0x304)])(v)),y(0x8,n[_0x545128(0x4c4)]),y(0x9,n['ILogService']),y(0xa,n[_0x545128(0x419)]),y(0xb,n[_0x545128(0x3bd)]),y(0xc,(0x0,n[_0x545128(0x2da)])(T)),y(0xd,(0x0,n[_0x545128(0x2da)])(C))],B);const Pe=(0x0,n['createIdentifier'])('univer-pro.collaboration-client.network-condition.service');function Fe(_0x3370a5){const _0x2029e1=_0x545128;let _0xe46e97=_0x3370a5['data'],_0x1e2e51=JSON[_0x2029e1(0x34d)](_0xe46e97);switch(_0x1e2e51[_0x2029e1(0x267)]){case o[_0x2029e1(0x2a2)][_0x2029e1(0x34f)]:case o[_0x2029e1(0x2a2)][_0x2029e1(0x3cd)]:{let _0x1b9cc8=_0x1e2e51['infoRsp'];return{..._0x1e2e51,'data':_0x1b9cc8,'cmd':_0x1e2e51[_0x2029e1(0x267)]};}case o[_0x2029e1(0x2a2)][_0x2029e1(0x413)]:{let _0x52cdfe=_0x1e2e51[_0x2029e1(0x24f)];return{..._0x1e2e51,'data':_0x52cdfe,'cmd':_0x1e2e51[_0x2029e1(0x267)]};}case o['CombCmd']['RECV']:{let _0x18104a=_0x1e2e51['collaMsg'];switch(_0x18104a[_0x2029e1(0x43a)]){case t[_0x2029e1(0x27d)]['PERMISSION_REJ']:var _0x8c7fad;return{..._0x1e2e51,'data':{..._0x18104a,'data':(_0x8c7fad=_0x18104a[_0x2029e1(0x45e)])==null?void 0x0:_0x8c7fad['cs']},'cmd':_0x1e2e51[_0x2029e1(0x267)]};case t[_0x2029e1(0x27d)][_0x2029e1(0x3ff)]:var _0x32ba13;return{..._0x1e2e51,'data':{..._0x18104a,'data':(_0x32ba13=_0x18104a[_0x2029e1(0x229)])==null?void 0x0:_0x32ba13['cs']},'cmd':_0x1e2e51[_0x2029e1(0x267)]};case t[_0x2029e1(0x27d)][_0x2029e1(0x359)]:var _0x982e40;return{..._0x1e2e51,'data':{..._0x18104a,'data':(_0x982e40=_0x18104a[_0x2029e1(0x215)])==null?void 0x0:_0x982e40['cs']},'cmd':_0x1e2e51[_0x2029e1(0x267)]};case t[_0x2029e1(0x27d)][_0x2029e1(0x20d)]:var _0x359df6;return{..._0x1e2e51,'data':{..._0x18104a,'data':(_0x359df6=_0x18104a[_0x2029e1(0x3b1)])==null?void 0x0:_0x359df6['cs']},'cmd':_0x1e2e51[_0x2029e1(0x267)]};case t[_0x2029e1(0x27d)][_0x2029e1(0x25a)]:var _0x25bd50;return{..._0x1e2e51,'data':{..._0x18104a,'data':(_0x25bd50=_0x18104a['csShouldRetryEvent'])==null?void 0x0:_0x25bd50['cs']},'cmd':_0x1e2e51['cmd']};case t[_0x2029e1(0x27d)][_0x2029e1(0x297)]:return{..._0x1e2e51,'data':{..._0x18104a,'data':_0x18104a[_0x2029e1(0x256)]},'cmd':_0x1e2e51[_0x2029e1(0x267)]};case t['CollaborationEvent'][_0x2029e1(0x4b7)]:return{..._0x1e2e51,'data':{..._0x18104a,'data':_0x18104a['joinEvent']},'cmd':_0x1e2e51[_0x2029e1(0x267)]};case t[_0x2029e1(0x27d)][_0x2029e1(0x4bc)]:return{..._0x1e2e51,'data':{..._0x18104a,'data':_0x18104a[_0x2029e1(0x29e)]},'cmd':_0x1e2e51['cmd']};case t['CollaborationEvent'][_0x2029e1(0x49f)]:return{..._0x1e2e51,'data':{..._0x18104a,'data':_0x18104a[_0x2029e1(0x40c)]},'cmd':_0x1e2e51[_0x2029e1(0x267)]};case t[_0x2029e1(0x27d)][_0x2029e1(0x3fa)]:case t[_0x2029e1(0x27d)]['LIVESHARE_OPERATION']:return{..._0x1e2e51,'data':{..._0x18104a,'data':_0x18104a['liveShareOperation']},'cmd':_0x1e2e51[_0x2029e1(0x267)]};case t['CollaborationEvent'][_0x2029e1(0x398)]:return{..._0x1e2e51,'data':{..._0x18104a,'data':_0x18104a[_0x2029e1(0x40c)]},'cmd':_0x1e2e51[_0x2029e1(0x267)]};case t[_0x2029e1(0x27d)][_0x2029e1(0x3cb)]:return{..._0x1e2e51,'data':_0x18104a,'cmd':_0x1e2e51[_0x2029e1(0x267)]};case t['CollaborationEvent'][_0x2029e1(0x4a0)]:return{..._0x1e2e51,'data':{..._0x18104a,'data':_0x18104a[_0x2029e1(0x30c)]},'cmd':_0x1e2e51[_0x2029e1(0x267)]};case t[_0x2029e1(0x27d)]['UPDATE_PERMISSION_OBJ']:return{..._0x1e2e51,'data':{..._0x18104a,'data':_0x18104a[_0x2029e1(0x365)]},'cmd':_0x1e2e51[_0x2029e1(0x267)]};case t[_0x2029e1(0x27d)][_0x2029e1(0x325)]:return{..._0x1e2e51,'data':{..._0x18104a,'data':_0x18104a['shouldCloseConn']},'cmd':_0x1e2e51[_0x2029e1(0x267)]};case t['CollaborationEvent'][_0x2029e1(0x224)]:return{..._0x1e2e51,'data':{..._0x18104a,'data':_0x18104a[_0x2029e1(0x3dc)]},'cmd':_0x1e2e51[_0x2029e1(0x267)]};default:return _0x1e2e51;}}default:return _0x1e2e51;}}function Ie(_0x1e656a){const _0x4eb2c1=_0x545128;switch(_0x1e656a['cmd']){case o['CombCmd'][_0x4eb2c1(0x34f)]:case o[_0x4eb2c1(0x2a2)][_0x4eb2c1(0x3cd)]:return JSON['stringify']({'cmd':_0x1e656a[_0x4eb2c1(0x267)],'routeKey':_0x1e656a[_0x4eb2c1(0x2e7)]});case o[_0x4eb2c1(0x2a2)][_0x4eb2c1(0x31d)]:{let _0x4b424c;switch(_0x1e656a[_0x4eb2c1(0x4b8)][_0x4eb2c1(0x43a)]){case t[_0x4eb2c1(0x27d)][_0x4eb2c1(0x297)]:_0x4b424c={'eventID':t['CollaborationEvent'][_0x4eb2c1(0x297)],'updateCursorEvent':_0x1e656a[_0x4eb2c1(0x4b8)][_0x4eb2c1(0x4b8)]};break;case t[_0x4eb2c1(0x27d)][_0x4eb2c1(0x4bc)]:_0x4b424c={'eventID':t[_0x4eb2c1(0x27d)]['USERS_LEAVE'],'leaveEvent':_0x1e656a[_0x4eb2c1(0x4b8)][_0x4eb2c1(0x4b8)]};break;case t[_0x4eb2c1(0x27d)][_0x4eb2c1(0x4b7)]:_0x4b424c={'eventID':t['CollaborationEvent']['USERS_ENTER'],'joinEvent':_0x1e656a[_0x4eb2c1(0x4b8)][_0x4eb2c1(0x4b8)]};break;case t[_0x4eb2c1(0x27d)]['LIVESHARE_NEW_HOST']:_0x4b424c={'eventID':t[_0x4eb2c1(0x27d)][_0x4eb2c1(0x49f)],'liveShareNewHost':_0x1e656a[_0x4eb2c1(0x4b8)][_0x4eb2c1(0x4b8)]};break;case t[_0x4eb2c1(0x27d)][_0x4eb2c1(0x371)]:_0x4b424c={'eventID':t['CollaborationEvent'][_0x4eb2c1(0x371)],'liveShareOperation':_0x1e656a['data'][_0x4eb2c1(0x4b8)]};break;case t[_0x4eb2c1(0x27d)][_0x4eb2c1(0x398)]:_0x4b424c={'eventID':t[_0x4eb2c1(0x27d)][_0x4eb2c1(0x398)],'liveShareTerminate':_0x1e656a[_0x4eb2c1(0x4b8)][_0x4eb2c1(0x4b8)]};break;case t['CollaborationEvent'][_0x4eb2c1(0x202)]:_0x4b424c={'eventID':t[_0x4eb2c1(0x27d)][_0x4eb2c1(0x202)],'liveShareRequestHost':_0x1e656a[_0x4eb2c1(0x4b8)]['data']};break;case t[_0x4eb2c1(0x27d)][_0x4eb2c1(0x3fa)]:_0x4b424c={'eventID':t[_0x4eb2c1(0x27d)][_0x4eb2c1(0x3fa)]};break;default:_0x4b424c={'eventID':_0x1e656a[_0x4eb2c1(0x4b8)][_0x4eb2c1(0x43a)]};}return JSON[_0x4eb2c1(0x4a3)]({'cmd':_0x1e656a[_0x4eb2c1(0x267)],'routeKey':_0x1e656a['routeKey'],'collaMsg':_0x4b424c});}case o[_0x4eb2c1(0x2a2)][_0x4eb2c1(0x413)]:return JSON[_0x4eb2c1(0x4a3)]({'cmd':_0x1e656a[_0x4eb2c1(0x267)],'routeKey':_0x1e656a[_0x4eb2c1(0x2e7)],'joinReq':_0x1e656a[_0x4eb2c1(0x4b8)]});case o['CombCmd'][_0x4eb2c1(0x1ee)]:return JSON[_0x4eb2c1(0x4a3)]({'cmd':_0x1e656a[_0x4eb2c1(0x267)],'routeKey':_0x1e656a['routeKey'],'leaveReq':_0x1e656a[_0x4eb2c1(0x4b8)]});default:throw Error('[serializeCombRequest]:\x20should\x20not\x20fall\x20into\x20default\x20branch!');}}const Le=(0x0,n[_0x545128(0x2c4)])(_0x545128(0x3e0));function Re(_0x1d7551,_0x5e3831,_0x5b4af6){const _0x57195b=_0x545128;return _0x1d7551+'/'+_0x5e3831+_0x57195b(0x442)+_0x5b4af6+_0x57195b(0x44e);}let ze=class extends n[_0x545128(0x3de)]{constructor(_0x4db899,_0x4356d6,_0x18d963,_0x3012a4,_0x2072ec){const _0x4b9cf5=_0x545128;super(),this['_injector']=_0x4db899,this[_0x4b9cf5(0x20c)]=_0x4356d6,this['_configService']=_0x18d963,this['_logService']=_0x3012a4,this[_0x4b9cf5(0x308)]=_0x2072ec;}[_0x545128(0x3e6)](_0x204df9){const _0x1faf9c=_0x545128;let _0x528854=this[_0x1faf9c(0x2f9)][_0x1faf9c(0x2f7)](u[_0x1faf9c(0x203)]);if(!_0x528854)throw Error('[CollaborationSocketService]:\x20failed\x20to\x20get\x20web\x20socket\x20factory!');let _0x3e9620=_0x528854[_0x1faf9c(0x3a6)](_0x204df9);if(!_0x3e9620)throw Error(_0x1faf9c(0x3b4));let _0x2ec119=new n[(_0x1faf9c(0x271))](),_0x1e6cdd=new a[(_0x1faf9c(0x335))]();_0x2ec119[_0x1faf9c(0x367)](_0x3e9620['close$'][_0x1faf9c(0x31b)](_0x1fcbb2=>_0x1e6cdd['next'](_0x1fcbb2))),_0x2ec119[_0x1faf9c(0x367)]((0x0,n[_0x1faf9c(0x45b)])(()=>_0x1e6cdd[_0x1faf9c(0x417)]()));let _0x51b43b=new a[(_0x1faf9c(0x335))]();_0x2ec119[_0x1faf9c(0x367)](_0x3e9620[_0x1faf9c(0x45c)][_0x1faf9c(0x31b)](_0x5b1694=>_0x51b43b[_0x1faf9c(0x2c2)](_0x5b1694))),_0x2ec119['add']((0x0,n[_0x1faf9c(0x45b)])(()=>_0x51b43b[_0x1faf9c(0x417)]()));let _0x10e0a5=new a[(_0x1faf9c(0x335))]();_0x2ec119[_0x1faf9c(0x367)](_0x3e9620[_0x1faf9c(0x2c9)][_0x1faf9c(0x31b)](_0x37b890=>{const _0x196462=_0x1faf9c;let _0x1fd261=Fe(_0x37b890);_0x10e0a5[_0x196462(0x2c2)](_0x1fd261);})),_0x2ec119[_0x1faf9c(0x367)]((0x0,n[_0x1faf9c(0x45b)])(()=>_0x10e0a5[_0x1faf9c(0x417)]()));let _0x26a760,_0x558275=()=>{const _0x2201e8=_0x1faf9c;_0x51b43b[_0x2201e8(0x2c2)](new Event(_0x2201e8(0x35c))),_0x1e6cdd[_0x2201e8(0x2c2)](new Event(_0x2201e8(0x35c))),_0x26a760[_0x2201e8(0x2df)]();};return _0x26a760={'memberID':'','close$':_0x1e6cdd[_0x1faf9c(0x49e)](),'error$':_0x51b43b['asObservable'](),'open$':_0x3e9620[_0x1faf9c(0x2a4)],'message$':_0x10e0a5[_0x1faf9c(0x49e)](),'send':_0x8c5a61=>{const _0x2f0f40=_0x1faf9c;if(_0x8c5a61[_0x2f0f40(0x267)]===o[_0x2f0f40(0x2a2)]['INGEST']){if(_0x8c5a61['data']['eventID']===t['CollaborationEvent']['SUBMIT_CHANGESET']){this['_submitChangeset'](_0x26a760,_0x8c5a61[_0x2f0f40(0x4b8)])[_0x2f0f40(0x35e)](_0x4139f4=>{const _0x3a172f=_0x2f0f40;this[_0x3a172f(0x4a2)][_0x3a172f(0x42e)](_0x4139f4),_0x558275();});return;}if(_0x8c5a61[_0x2f0f40(0x4b8)][_0x2f0f40(0x43a)]===t[_0x2f0f40(0x27d)][_0x2f0f40(0x330)]){let _0x466b31=_0x8c5a61[_0x2f0f40(0x4b8)];this[_0x2f0f40(0x2cf)](_0x466b31)['then'](_0x58678e=>{const _0x247135=_0x2f0f40;_0x10e0a5['next']({'cmd':o[_0x247135(0x2a2)]['RECV'],'code':o[_0x247135(0x475)]['OK'],'routeKey':_0x466b31[_0x247135(0x4b8)][_0x247135(0x2cd)],'routeType':'','data':{'eventID':t[_0x247135(0x27d)][_0x247135(0x3d7)],'data':{'changesets':_0x58678e}}});})['catch'](_0x32a48b=>{const _0x3ddd6d=_0x2f0f40;this[_0x3ddd6d(0x4a2)][_0x3ddd6d(0x42e)](_0x32a48b),_0x558275();});return;}}_0x3e9620[_0x2f0f40(0x1f7)](Ie(_0x8c5a61));},'close':()=>{const _0x445f5e=_0x1faf9c;_0x3e9620[_0x445f5e(0x2df)](),_0x2ec119['dispose']();}},_0x26a760;}async[_0x545128(0x22f)](_0xf5f893,_0x3de346){const _0x4044bc=_0x545128;var _0x2995a4;let {unitType:_0x22c833,unitID:_0x1b1f37,changeset:_0x1112c9}=_0x3de346[_0x4044bc(0x4b8)],_0x216e73={'unitID':_0x1b1f37,'memberID':_0xf5f893[_0x4044bc(0x33c)],'type':_0x22c833,'changeset':(0x0,t[_0x4044bc(0x36b)])(_0x1112c9)},_0x1e5f76=this[_0x4044bc(0x2e4)][_0x4044bc(0x2c0)](h),_0x4bec17=Re((_0x2995a4=_0x1e5f76==null?void 0x0:_0x1e5f76[_0x4044bc(0x482)])==null?_0x4044bc(0x246):_0x2995a4,_0x22c833,_0x1b1f37);try{await this[_0x4044bc(0x20c)]['post'](_0x4bec17,{'body':_0x216e73});}catch(_0xa5b99a){throw this['_logService'][_0x4044bc(0x42e)](_0x4044bc(0x33f),_0x4044bc(0x4b6)),_0xa5b99a;}}async[_0x545128(0x2cf)](_0x54bf7b){const _0x5a78f0=_0x545128;let {unitID:_0x6befc9,from:_0x74157d,to:_0x4394fc,unitType:_0x11057f}=_0x54bf7b[_0x5a78f0(0x4b8)];return(await this['_snapshotServerService']['fetchMissingChangesets']({'metadata':void 0x0},{'unitID':_0x6befc9,'type':_0x11057f,'from':_0x74157d,'to':_0x4394fc}))[_0x5a78f0(0x283)][_0x5a78f0(0x2d9)](_0x486b78=>((_0x486b78['mutations']===null||_0x486b78[_0x5a78f0(0x329)]===void 0x0)&&(_0x486b78['mutations']=[]),_0x486b78));}};ze=b([y(0x0,(0x0,n['Inject'])(n[_0x545128(0x24d)])),y(0x1,(0x0,n[_0x545128(0x304)])(u[_0x545128(0x4a6)])),y(0x2,n[_0x545128(0x378)]),y(0x3,n[_0x545128(0x368)]),y(0x4,t[_0x545128(0x2ec)])],ze);let V=class extends n['Disposable']{get[_0x545128(0x443)](){const _0x19aa91=_0x545128;return this[_0x19aa91(0x2cc)][_0x19aa91(0x248)]();}constructor(_0x1457e1,_0xdc6b1e,_0xf95dd4,_0x1eb4f9,_0x197aee,_0x2f342b){const _0x353ad2=_0x545128;super(),this['_injector']=_0x1457e1,this['_logService']=_0xdc6b1e,this['_configService']=_0xf95dd4,this[_0x353ad2(0x28e)]=_0x1eb4f9,this[_0x353ad2(0x48f)]=_0x197aee,this[_0x353ad2(0x313)]=_0x2f342b,_(this,_0x353ad2(0x2cc),new a[(_0x353ad2(0x3b2))](void 0x0)),_(this,_0x353ad2(0x497),this[_0x353ad2(0x2cc)]['asObservable']()),_(this,'_candidateSocket',null),_(this,_0x353ad2(0x282),new Map()),_(this,_0x353ad2(0x32f),new a[(_0x353ad2(0x3b2))](0x0)),_(this,_0x353ad2(0x30e),this[_0x353ad2(0x32f)][_0x353ad2(0x49e)]()),_(this,'_socketReady',!0x1),_(this,_0x353ad2(0x252),void 0x0),_(this,'_retryCount',0x0),_(this,_0x353ad2(0x2d6),null),_(this,_0x353ad2(0x363),void 0x0),_(this,_0x353ad2(0x3eb),void 0x0),this['_listenToNetworkCondition']();}[_0x545128(0x435)](){const _0x56010f=_0x545128;this[_0x56010f(0x313)]&&this[_0x56010f(0x44d)](this['_networkConditionService'][_0x56010f(0x471)][_0x56010f(0x31b)](_0x54ad27=>{const _0x2fbb92=_0x56010f;_0x54ad27&&!this[_0x2fbb92(0x443)]&&this['reconnect'](),_0x54ad27||this[_0x2fbb92(0x2fe)]();}));}[_0x545128(0x25e)](){const _0x2bf305=_0x545128;var _0x1c1f3e;super['dispose'](),(_0x1c1f3e=this[_0x2bf305(0x2d6)])==null||_0x1c1f3e[_0x2bf305(0x385)](),this[_0x2bf305(0x2d6)]=null,this[_0x2bf305(0x3c3)](),this['_clearTimeoutTimer'](),this[_0x2bf305(0x397)](),this['_sessions'][_0x2bf305(0x295)](_0x98ac93=>_0x98ac93[_0x2bf305(0x25e)]()),this[_0x2bf305(0x282)]['clear'](),this['_status$']['complete']();}async[_0x545128(0x376)](_0x1ecead){const _0x44a565=_0x545128;if(this['_sessions'][_0x44a565(0x44f)](_0x1ecead))return this[_0x44a565(0x282)][_0x44a565(0x2f7)](_0x1ecead);this[_0x44a565(0x221)]();let _0x1d475d=this[_0x44a565(0x2f9)][_0x44a565(0x2f8)](S,_0x1ecead,this[_0x44a565(0x2cc)][_0x44a565(0x49e)]());return this['_sessions'][_0x44a565(0x3f4)](_0x1ecead,_0x1d475d),_0x1d475d;}[_0x545128(0x2b3)](_0x4524fb){const _0x557af0=_0x545128;let _0x2eca73=this[_0x557af0(0x282)][_0x557af0(0x2f7)](_0x4524fb);if(_0x2eca73&&(this[_0x557af0(0x282)][_0x557af0(0x3b0)](_0x4524fb),_0x2eca73[_0x557af0(0x2df)]()),!this[_0x557af0(0x282)]['size']){var _0x5c66ed;(_0x5c66ed=this[_0x557af0(0x443)])==null||_0x5c66ed[_0x557af0(0x2df)]();}}['reconnect'](){this['_retryCount']=0x0,this['_clearRetryConnectingTimer'](),this['_tryReconnect']();}['_clearRetryConnectingTimer'](){const _0x5d7ab9=_0x545128;this[_0x5d7ab9(0x252)]!=null&&(clearTimeout(this[_0x5d7ab9(0x252)]),this[_0x5d7ab9(0x252)]=null);}async['_createSocket'](){const _0x277781=_0x545128;var _0x4ea57e;let _0x56de76=this[_0x277781(0x2e4)][_0x277781(0x2c0)](h),_0x251b07=(_0x4ea57e=_0x56de76==null?void 0x0:_0x56de76['collabWebSocketUrl'])==null?te:_0x4ea57e,_0xe98a43=await this[_0x277781(0x28e)]['createSocket'](_0x251b07);return this[_0x277781(0x3d3)]=_0xe98a43,_0xe98a43;}async[_0x545128(0x221)](){const _0x440f2f=_0x545128;try{var _0x1710ba,_0x33fb7c;let _0x583551=(_0x1710ba=(_0x33fb7c=this[_0x440f2f(0x443)])==null?this[_0x440f2f(0x3d3)]:_0x33fb7c)==null?await this['_createSocket']():_0x1710ba;if(_0x583551){var _0x240b99;let _0x122943=_0x583551[_0x440f2f(0x1f7)];_0x583551[_0x440f2f(0x1f7)]=_0x4eed67=>(_0x4eed67['cmd']!==o[_0x440f2f(0x2a2)]['LEAVE']&&this['_rescheduleHeartbeat'](),_0x122943['apply'](_0x583551,[_0x4eed67])),(_0x240b99=this[_0x440f2f(0x2d6)])==null||_0x240b99[_0x440f2f(0x385)](),this['_socketMessageSubscription']=null,this[_0x440f2f(0x2d6)]=_0x583551[_0x440f2f(0x2c9)][_0x440f2f(0x31b)](_0x84e923=>this[_0x440f2f(0x266)](_0x583551,_0x84e923)),_0x583551[_0x440f2f(0x45c)][_0x440f2f(0x259)]((0x0,c[_0x440f2f(0x344)])(0x1))[_0x440f2f(0x31b)](_0x388a04=>this[_0x440f2f(0x4a2)][_0x440f2f(0x42e)](_0x440f2f(0x49d),_0x388a04)),_0x583551[_0x440f2f(0x2a4)][_0x440f2f(0x259)]((0x0,c[_0x440f2f(0x344)])(0x1))[_0x440f2f(0x31b)](()=>{this['_onConnectionOpen'](_0x583551);}),_0x583551['close$'][_0x440f2f(0x259)]((0x0,c[_0x440f2f(0x344)])(0x1))[_0x440f2f(0x31b)](_0x1e696d=>{const _0x5c0e42=_0x440f2f;this['_logService'][_0x5c0e42(0x1fb)](_0x5c0e42(0x4d1),_0x5c0e42(0x211),_0x1e696d),this[_0x5c0e42(0x4c2)]();});}}catch(_0xedf243){this[_0x440f2f(0x4a2)]['error'](_0xedf243),this[_0x440f2f(0x4c2)]();}}['_onConnectionOpen'](_0x3a7b69){const _0x5b77d0=_0x545128;this[_0x5b77d0(0x4a2)][_0x5b77d0(0x1fb)](_0x5b77d0(0x4d1),_0x5b77d0(0x488)),_0x3a7b69['send']({'cmd':o[_0x5b77d0(0x2a2)][_0x5b77d0(0x3cd)]}),this[_0x5b77d0(0x230)]();}[_0x545128(0x2fe)](){const _0x4fd212=_0x545128;this[_0x4fd212(0x1f3)]=!0x1,this['_candidateSocket']=null,this[_0x4fd212(0x32f)][_0x4fd212(0x2c2)](0x2),this['_socket$'][_0x4fd212(0x2c2)](null),this[_0x4fd212(0x2ea)](),this[_0x4fd212(0x397)]();}['_onConnectionFailed'](){const _0x36ebcb=_0x545128;var _0x53308b;this[_0x36ebcb(0x2fe)](),this['_retryCount']<((_0x53308b=this[_0x36ebcb(0x2e4)][_0x36ebcb(0x2c0)](_0x36ebcb(0x3f2)))==null?0x3:_0x53308b)?(this[_0x36ebcb(0x48f)]['emitEvent']({'id':_0x36ebcb(0x21a)}),this[_0x36ebcb(0x423)]()):this[_0x36ebcb(0x48f)]['emitEvent']({'id':_0x36ebcb(0x239)});}['_tryReconnect'](){const _0x414fe3=_0x545128;var _0x436adf;let _0x3f54f4=this[_0x414fe3(0x2c5)],_0x36da55=this[_0x414fe3(0x2e4)][_0x414fe3(0x2c0)](h),_0x111d4e=_0x3f54f4===0x0?0x0:((_0x436adf=_0x36da55==null?void 0x0:_0x36da55[_0x414fe3(0x45d)])==null?0x4e20:_0x436adf)*0x2**_0x3f54f4;this[_0x414fe3(0x252)]=setTimeout(()=>{const _0x206689=_0x414fe3;clearTimeout(this['_retryConnectingTimer']),this[_0x206689(0x252)]=null,this[_0x206689(0x221)]();},_0x111d4e),this['_retryCount']+=0x1;}[_0x545128(0x266)](_0x56d4df,_0x53968d){const _0x5b0ca3=_0x545128;let {cmd:_0x289015}=_0x53968d;_0x289015===o['CombCmd']['HELLO']&&!this[_0x5b0ca3(0x1f3)]&&(_0x56d4df[_0x5b0ca3(0x33c)]=_0x53968d[_0x5b0ca3(0x4b8)]['memberID'],this[_0x5b0ca3(0x2cc)]['next'](_0x56d4df),this[_0x5b0ca3(0x32f)][_0x5b0ca3(0x2c2)](0x3),this[_0x5b0ca3(0x1f3)]=!0x0,this[_0x5b0ca3(0x3d3)]=null),_0x289015===o['CombCmd'][_0x5b0ca3(0x34f)]&&this[_0x5b0ca3(0x2ea)](),this[_0x5b0ca3(0x230)]();}[_0x545128(0x230)](){const _0x306177=_0x545128;var _0x12670f;this[_0x306177(0x397)](),this[_0x306177(0x363)]=setTimeout(()=>this[_0x306177(0x317)](),(_0x12670f=this[_0x306177(0x2e4)][_0x306177(0x2c0)]('HEARTBEAT_INTERVAL'))==null?0x7530:_0x12670f);}[_0x545128(0x317)](){const _0x46611e=_0x545128;this[_0x46611e(0x443)][_0x46611e(0x1f7)]({'cmd':o[_0x46611e(0x2a2)][_0x46611e(0x34f)]}),this[_0x46611e(0x25b)]();}[_0x545128(0x25b)](){const _0x4e943f=_0x545128;var _0x57fea8;this[_0x4e943f(0x3eb)]=setTimeout(()=>this[_0x4e943f(0x4c2)](),(_0x57fea8=this[_0x4e943f(0x2e4)]['getConfig'](_0x4e943f(0x465)))==null?ne:_0x57fea8);}[_0x545128(0x397)](){const _0x2fb613=_0x545128;this['_sendHeartbeatTimer']!=null&&(clearTimeout(this[_0x2fb613(0x363)]),this[_0x2fb613(0x363)]=null);}[_0x545128(0x2ea)](){const _0x4d9cd3=_0x545128;this['_timeoutTimer']!=null&&(clearTimeout(this[_0x4d9cd3(0x3eb)]),this['_timeoutTimer']=null);}};V=b([y(0x0,(0x0,n['Inject'])(n[_0x545128(0x24d)])),y(0x1,n['ILogService']),y(0x2,n[_0x545128(0x378)]),y(0x3,Le),y(0x4,(0x0,n['Inject'])(v)),y(0x5,(0x0,n[_0x545128(0x2da)])(Pe))],V);let H=class extends n[_0x545128(0x315)]{constructor(_0x8d79b2,_0x3f8812,_0x544238,_0x373228){const _0x542a12=_0x545128;var _0x4ad310;super(),this[_0x542a12(0x2f9)]=_0x8d79b2,this[_0x542a12(0x406)]=_0x3f8812,this[_0x542a12(0x2e4)]=_0x544238,this[_0x542a12(0x1e7)]=_0x373228,_(this,'_entities',new Map()),_(this,_0x542a12(0x399),new a[(_0x542a12(0x335))]()),_(this,_0x542a12(0x3e7),this[_0x542a12(0x399)][_0x542a12(0x49e)]()),((_0x4ad310=this[_0x542a12(0x2e4)][_0x542a12(0x2c0)](_0x542a12(0x322)))==null?void 0x0:_0x4ad310[_0x542a12(0x247)])!==!0x1&&this['_init']();}['dispose'](){const _0xca231c=_0x545128;super[_0xca231c(0x25e)](),this[_0xca231c(0x37f)][_0xca231c(0x295)](_0x287a74=>_0x287a74[_0xca231c(0x25e)]()),this[_0xca231c(0x37f)][_0xca231c(0x47f)]();}[_0x545128(0x372)](_0x2b2b89){const _0x355446=_0x545128;var _0x5954c9;return(_0x5954c9=this[_0x355446(0x37f)][_0x355446(0x2f7)](_0x2b2b89))==null?null:_0x5954c9;}[_0x545128(0x3f0)](_0x29952f){const _0x2fcf7a=_0x545128;let _0x2d1e96=this[_0x2fcf7a(0x372)](_0x29952f);return _0x2d1e96?(0x0,a['of'])(_0x2d1e96):this[_0x2fcf7a(0x399)]['pipe']((0x0,c[_0x2fcf7a(0x280)])(_0x1fef56=>_0x1fef56[_0x2fcf7a(0x2cd)]===_0x29952f));}['readyForCollab'](_0x411ec8){const _0x28c649=_0x545128;return(0x0,a['firstValueFrom'])(this[_0x28c649(0x3f0)](_0x411ec8)[_0x28c649(0x259)]((0x0,c[_0x28c649(0x2d9)])(()=>void 0x0)));}[_0x545128(0x207)](){const _0x66c895=_0x545128;this[_0x66c895(0x1e7)]['getTypeOfUnitAdded$'](n['UniverInstanceType'][_0x66c895(0x424)])['pipe']((0x0,a[_0x66c895(0x386)])(this[_0x66c895(0x245)]),(0x0,c[_0x66c895(0x32c)])(0x10))[_0x66c895(0x31b)](async _0xc08f1f=>{const _0x15e7e6=_0x66c895;let _0xb8e524=_0xc08f1f[_0x15e7e6(0x4a5)][_0x15e7e6(0x3bb)](),_0x2a197b=await this[_0x15e7e6(0x2dd)](_0xb8e524,n[_0x15e7e6(0x251)][_0x15e7e6(0x424)]);this[_0x15e7e6(0x37f)][_0x15e7e6(0x3f4)](_0xb8e524,_0x2a197b);}),this[_0x66c895(0x1e7)][_0x66c895(0x2be)](n[_0x66c895(0x251)][_0x66c895(0x42a)])[_0x66c895(0x259)]((0x0,a[_0x66c895(0x386)])(this[_0x66c895(0x245)]),(0x0,c['delay'])(0x10))[_0x66c895(0x259)]((0x0,c[_0x66c895(0x280)])(_0x337e91=>!_0x337e91[_0x66c895(0x4a5)][_0x66c895(0x3bb)]()[_0x66c895(0x323)]('__')))[_0x66c895(0x31b)](async _0x1dc63c=>{const _0x59d727=_0x66c895;let _0x345d75=_0x1dc63c['unit'][_0x59d727(0x3bb)](),_0x7fd664=await this['_startCollaboration'](_0x345d75,n[_0x59d727(0x251)][_0x59d727(0x42a)]);this[_0x59d727(0x37f)][_0x59d727(0x3f4)](_0x345d75,_0x7fd664);}),this[_0x66c895(0x1e7)]['getTypeOfUnitAdded$'](n['UniverInstanceType'][_0x66c895(0x437)])[_0x66c895(0x259)]((0x0,a[_0x66c895(0x386)])(this[_0x66c895(0x245)]),(0x0,c[_0x66c895(0x32c)])(0x10))[_0x66c895(0x31b)](async _0x5a1af9=>{const _0x187b0f=_0x66c895;let _0x515ebd=_0x5a1af9['unit'][_0x187b0f(0x3bb)](),_0x59fdeb=await this['_startCollaboration'](_0x515ebd,n[_0x187b0f(0x251)][_0x187b0f(0x437)]);this[_0x187b0f(0x37f)][_0x187b0f(0x3f4)](_0x515ebd,_0x59fdeb);}),this[_0x66c895(0x1e7)][_0x66c895(0x2be)](n[_0x66c895(0x251)]['UNIVER_BASE'])[_0x66c895(0x259)]((0x0,a[_0x66c895(0x386)])(this[_0x66c895(0x245)]),(0x0,c[_0x66c895(0x32c)])(0x10))[_0x66c895(0x31b)](async _0x508f20=>{const _0x5cca67=_0x66c895;let _0x4e3c9e=_0x508f20[_0x5cca67(0x4a5)][_0x5cca67(0x3bb)](),_0x116172=await this[_0x5cca67(0x2dd)](_0x4e3c9e,n[_0x5cca67(0x251)][_0x5cca67(0x291)]);this[_0x5cca67(0x37f)]['set'](_0x4e3c9e,_0x116172);}),(0x0,a[_0x66c895(0x303)])(this[_0x66c895(0x1e7)][_0x66c895(0x22c)](n[_0x66c895(0x251)][_0x66c895(0x424)]),this[_0x66c895(0x1e7)]['getTypeOfUnitDisposed$'](n[_0x66c895(0x251)]['UNIVER_DOC']),this[_0x66c895(0x1e7)][_0x66c895(0x22c)](n['UniverInstanceType'][_0x66c895(0x437)]),this['_univerInstanceService']['getTypeOfUnitDisposed$'](n[_0x66c895(0x251)][_0x66c895(0x291)]))[_0x66c895(0x259)]((0x0,a[_0x66c895(0x386)])(this[_0x66c895(0x245)]))[_0x66c895(0x31b)](_0x470ea5=>{const _0x1d7bc3=_0x66c895;let _0x13e7e3=_0x470ea5['getUnitId'](),_0x356ae6=this[_0x1d7bc3(0x37f)][_0x1d7bc3(0x2f7)](_0x13e7e3);_0x356ae6&&(_0x356ae6['dispose'](),this[_0x1d7bc3(0x37f)][_0x1d7bc3(0x3b0)](_0x13e7e3));});}async[_0x545128(0x2dd)](_0x44b5e0,_0x169562){const _0x5d947e=_0x545128;let _0x383353=await this['_collabSessionService'][_0x5d947e(0x376)](_0x44b5e0),_0x15a325=this['_injector'][_0x5d947e(0x2f8)](this[_0x5d947e(0x30b)](_0x169562),_0x44b5e0,_0x169562,_0x383353);return await _0x15a325[_0x5d947e(0x2b9)](),this[_0x5d947e(0x399)][_0x5d947e(0x2c2)](_0x15a325),_0x15a325;}['_getCtorByUniverInstanceType'](_0x110413){const _0x1ef387=_0x545128;switch(_0x110413){case n[_0x1ef387(0x251)][_0x1ef387(0x42a)]:return R;case n[_0x1ef387(0x251)][_0x1ef387(0x424)]:return z;case n[_0x1ef387(0x251)]['UNIVER_SLIDE']:return B;case n['UniverInstanceType'][_0x1ef387(0x291)]:return Ne;default:throw Error('[CollaborationController]:\x20invalid\x20univer\x20type:\x20'+_0x110413);}}};H=b([y(0x0,(0x0,n['Inject'])(n[_0x545128(0x24d)])),y(0x1,(0x0,n[_0x545128(0x304)])(V)),y(0x2,n[_0x545128(0x378)]),y(0x3,n['IUniverInstanceService'])],H);var Be='@univerjs-pro/collaboration-client',Ve='1.0.0-alpha.0';let He=class extends n[_0x545128(0x3de)]{constructor(_0x203cc2,_0x5fb72e){const _0x267189=_0x545128;super(),this[_0x267189(0x1e7)]=_0x203cc2,this[_0x267189(0x2e4)]=_0x5fb72e,this[_0x267189(0x207)]();}[_0x545128(0x207)](){const _0x27b451=_0x545128;this['disposeWithMe'](this['_univerInstanceService'][_0x27b451(0x25f)]['subscribe'](()=>{const _0x32662a=_0x27b451;var _0x307480;let _0x5e1ee5=this[_0x32662a(0x1e7)][_0x32662a(0x47a)](),_0x22221a=(_0x307480=this[_0x32662a(0x2e4)]['getConfig'](_0x32662a(0x48c)))==null?_0x32662a(0x260):_0x307480;_0x5e1ee5 instanceof n[_0x32662a(0x347)]&&(_0x22221a=_0x5e1ee5[_0x32662a(0x460)]),document[_0x32662a(0x1f6)]=_0x22221a;}));}};He=b([y(0x0,n['IUniverInstanceService']),y(0x1,n[_0x545128(0x378)])],He);let Ue=function(_0x44eabd){const _0xddaaa5=_0x545128;return _0x44eabd[_0xddaaa5(0x1ec)]=_0xddaaa5(0x1ec),_0x44eabd[_0xddaaa5(0x2a0)]=_0xddaaa5(0x2a0),_0x44eabd[_0xddaaa5(0x301)]=_0xddaaa5(0x301),_0x44eabd;}({});const We=(0x0,n[_0x545128(0x2c4)])(_0x545128(0x2b4));let U=class{constructor(_0x2f330f,_0x496b9a,_0x43f378){const _0x393800=_0x545128;this[_0x393800(0x20c)]=_0x2f330f,this[_0x393800(0x2e4)]=_0x496b9a,this[_0x393800(0x1e7)]=_0x43f378;}['getUploadOptions'](){const _0x3dd3a3=_0x545128;var _0x5b3126;return(_0x5b3126=this[_0x3dd3a3(0x342)]()[_0x3dd3a3(0x2c3)])==null?{}:_0x5b3126;}async['saveAttachment'](_0x536f33){const _0x2cf5a5=_0x545128;let _0xb1a79b=this['getUploadOptions']();if(Ge(_0x536f33,_0xb1a79b),_0xb1a79b[_0x2cf5a5(0x3f9)])return _0xb1a79b['upload'](_0x536f33);let _0x107c40=await this[_0x2cf5a5(0x468)](_0x536f33);return{'id':_0x107c40,'name':_0x536f33[_0x2cf5a5(0x460)],'mimeType':_0x536f33[_0x2cf5a5(0x393)],'size':_0x536f33['size'],'sourceType':_0x2cf5a5(0x2a0),'source':_0x107c40};}async[_0x545128(0x468)](_0x53f451){const _0x449432=_0x545128;let _0xbced5b=this[_0x449432(0x1e7)]['getFocusedUnit'](),_0x225f68=_0xbced5b==null?void 0x0:_0xbced5b[_0x449432(0x3bb)]();if(!_0x225f68)throw Error(_0x449432(0x24c));let _0x39794e=new FormData();_0x39794e[_0x449432(0x430)](_0x449432(0x3dd),_0x53f451);let _0x1ef40e=this[_0x449432(0x3c2)]()+'?size='+_0x53f451[_0x449432(0x292)][_0x449432(0x405)]()+_0x449432(0x431)+o[_0x449432(0x3a7)][_0x449432(0x4b0)]+_0x449432(0x4af)+encodeURIComponent(_0x225f68),_0x40e46b=(await this[_0x449432(0x20c)][_0x449432(0x3fd)](_0x1ef40e,{'body':_0x39794e}))['body'][_0x449432(0x30d)];if(typeof _0x40e46b!=_0x449432(0x2f0)||!_0x40e46b)throw Error('[CollaborationAttachmentIoService]:\x20failed\x20to\x20upload\x20attachment.');return _0x40e46b;}[_0x545128(0x3c2)](){const _0x1f52d7=_0x545128;var _0x31f603;return(_0x31f603=this[_0x1f52d7(0x342)]()[_0x1f52d7(0x3bc)])==null?'/universer-api/stream/file/upload':_0x31f603;}['_getConfig'](){const _0xc38ac8=_0x545128;var _0x19f892;return(_0x19f892=this[_0xc38ac8(0x2e4)][_0xc38ac8(0x2c0)](_0xc38ac8(0x322)))==null?{}:_0x19f892;}};U=b([y(0x0,(0x0,n[_0x545128(0x304)])(u[_0x545128(0x4a6)])),y(0x1,(0x0,n[_0x545128(0x304)])(n[_0x545128(0x378)])),y(0x2,(0x0,n[_0x545128(0x304)])(n['IUniverInstanceService']))],U);function Ge(_0xc9380f,_0x4e3597){const _0x3810c6=_0x545128;var _0x201286;if(_0x4e3597['maxSize']!=null&&_0xc9380f[_0x3810c6(0x292)]>_0x4e3597['maxSize'])throw Error(_0x3810c6(0x41d));if((_0x201286=_0x4e3597['accept'])!=null&&_0x201286[_0x3810c6(0x38a)]&&!_0x4e3597['accept'][_0x3810c6(0x39b)](_0x1178a0=>_0xc9380f[_0x3810c6(0x393)]===_0x1178a0||_0xc9380f[_0x3810c6(0x460)][_0x3810c6(0x38d)](_0x1178a0)||_0x1178a0[_0x3810c6(0x38d)]('/*')&&_0xc9380f[_0x3810c6(0x393)][_0x3810c6(0x323)](_0x1178a0[_0x3810c6(0x2f6)](0x0,-0x1))))throw Error(_0x3810c6(0x21f));}let W=class{constructor(_0x168166,_0x3b3b5c,_0x420227){const _0x4a691a=_0x545128;this[_0x4a691a(0x2e4)]=_0x168166,this[_0x4a691a(0x20c)]=_0x3b3b5c,this['localeService']=_0x420227,this[_0x4a691a(0x2b9)]();}[_0x545128(0x2b9)](){const _0x574b73=_0x545128;this['_httpService'][_0x574b73(0x332)]({'priority':0x1,'interceptor':(_0x2bf6e9,_0x5a800d)=>_0x5a800d(_0x2bf6e9)[_0x574b73(0x259)]((0x0,a[_0x574b73(0x43e)])(async _0x1b31ed=>{const _0x368bb4=_0x574b73;let _0x562153=_0x1b31ed;if(_0x562153[_0x368bb4(0x2f2)]===0x191){if(typeof window>'u')throw Error(_0x368bb4(0x31e));if(window[_0x368bb4(0x40b)](this['localeService']['t'](_0x368bb4(0x2fa)))){let _0x31dee4=window[_0x368bb4(0x26d)](window[_0x368bb4(0x45f)][_0x368bb4(0x411)]);window[_0x368bb4(0x45f)][_0x368bb4(0x411)]=this[_0x368bb4(0x3c1)]()+_0x368bb4(0x382)+_0x31dee4;}}return _0x562153;}))});}[_0x545128(0x3c1)](){const _0x473933=_0x545128;var _0x32b5e2;let _0x4e380a=this[_0x473933(0x2e4)][_0x473933(0x2c0)](h);return(_0x32b5e2=_0x4e380a==null?void 0x0:_0x4e380a[_0x473933(0x361)])==null?_0x473933(0x381):_0x32b5e2;}};W=b([y(0x0,n['IConfigService']),y(0x1,(0x0,n['Inject'])(u[_0x545128(0x4a6)])),y(0x2,(0x0,n[_0x545128(0x304)])(n['LocaleService']))],W);let G=class extends n['Disposable']{constructor(_0x344e1b,_0x4c5a95){const _0x38cd38=_0x545128;super(),this['_HTTPService']=_0x344e1b,this[_0x38cd38(0x2e4)]=_0x4c5a95,_(this,'_cfgEnableObjInherit',!0x1),this[_0x38cd38(0x27a)]();}['_initMergeInterceptor'](){const _0x29d7a0=_0x545128;let _0x322b8e=this;this['disposeWithMe'](this[_0x29d7a0(0x2ff)]['registerHTTPInterceptor']({'priority':0x3e7,'interceptor':(0x0,u[_0x29d7a0(0x351)])({'isMatch'(_0x1006ed){const _0x1a900b=_0x29d7a0;var _0x2b5e93;if(_0x1006ed[_0x1a900b(0x2a1)]===_0x1a900b(0x1f0)&&(_0x2b5e93=_0x1006ed[_0x1a900b(0x42d)])!=null&&_0x2b5e93[_0x1a900b(0x3b3)]){let {objectID:_0x4b0a39,objectType:_0x31af68}=_0x1006ed[_0x1a900b(0x42d)][_0x1a900b(0x3b3)]||{};if(!_0x4b0a39||_0x31af68===void 0x0)return!0x1;let _0x14e506=_0x322b8e[_0x1a900b(0x234)]()+'/'+_0x31af68+_0x1a900b(0x414)+_0x4b0a39+_0x1a900b(0x403);if(_0x1006ed['url']===_0x14e506)return!0x0;}return!0x1;},'getParamsFromRequest'(_0x535c64){const _0x3f8d02=_0x29d7a0;var _0x53c1ec;return(_0x53c1ec=_0x535c64[_0x3f8d02(0x42d)])==null?void 0x0:_0x53c1ec[_0x3f8d02(0x3b3)];},'mergeParamsToRequest'(_0x4c7b9c,_0x39e43a){const _0x34b01e=_0x29d7a0;let _0x13fa4a=_0x322b8e[_0x34b01e(0x234)]()+_0x34b01e(0x36e),_0x1be811=_0x4c7b9c[_0x34b01e(0x29b)]((_0x55dd83,_0x208f1b)=>{const _0x409ef4=_0x34b01e;let {unitID:_0xffcc9c,objectID:_0xc9d0cd,objectType:_0x6d94d6,actions:_0x950bc3}=_0x208f1b;return _0x55dd83[_0xffcc9c]||(_0x55dd83[_0xffcc9c]={}),_0x55dd83[_0xffcc9c][_0xc9d0cd]||(_0x55dd83[_0xffcc9c][_0xc9d0cd]={'objectID':_0xc9d0cd,'objectType':_0x6d94d6,'actions':[]}),_0x55dd83[_0xffcc9c][_0xc9d0cd][_0x409ef4(0x449)][_0x409ef4(0x3f5)](..._0x950bc3),_0x55dd83;},{}),_0x3c80f3=[];for(let _0x302bc2 in _0x1be811)for(let _0x3338f8 in _0x1be811[_0x302bc2]){let {actions:_0x41034d,objectType:_0x2b3872}=_0x1be811[_0x302bc2][_0x3338f8],_0x10a31f=[...new Set(_0x41034d)];_0x3c80f3[_0x34b01e(0x3f5)]({'unitID':_0x302bc2,'objectID':_0x3338f8,'objectType':_0x2b3872,'actions':_0x10a31f});}return new u[(_0x34b01e(0x2de))](_0x34b01e(0x1f0),_0x13fa4a,{'headers':_0x39e43a[_0x34b01e(0x404)],'withCredentials':_0x39e43a[_0x34b01e(0x41c)],'responseType':_0x39e43a[_0x34b01e(0x4c8)],'body':{'requests':_0x3c80f3}});}},{'distributeResult'(_0x3e0cdc,_0x35666b){const _0x57a4a5=_0x29d7a0;let {objectActions:_0xd2a358}=_0x3e0cdc;return _0x35666b[_0x57a4a5(0x2d9)](_0x4975fa=>{const _0x568640=_0x57a4a5;let {unitID:_0x22a082,objectID:_0x4fcb0d,actions:_0x47dad2}=_0x4975fa,_0x41e5aa=_0xd2a358['find'](_0x472a24=>_0x472a24[_0x568640(0x2cd)]===_0x22a082&&_0x472a24[_0x568640(0x4d4)]===_0x4fcb0d);return{'config':_0x4975fa,'result':{'actions':_0x47dad2['map'](_0x29b26b=>_0x41e5aa==null?void 0x0:_0x41e5aa[_0x568640(0x449)][_0x568640(0x467)](_0x86e18f=>_0x86e18f['action']===_0x29b26b))['filter'](_0xc5248b=>!!_0xc5248b),'error':_0x3e0cdc[_0x568640(0x42e)]}};});}})}));}[_0x545128(0x234)](){const _0x235459=_0x545128;var _0x5d0cc9;let _0x5f217c=this[_0x235459(0x2e4)][_0x235459(0x2c0)](h);return(_0x5d0cc9=_0x5f217c==null?void 0x0:_0x5f217c['authzUrl'])==null?_0x235459(0x46b):_0x5d0cc9;}async[_0x545128(0x43c)](_0x4ba7dc){const _0x34099d=_0x545128;let _0x16f43c=this[_0x34099d(0x234)]()+'/'+_0x4ba7dc[_0x34099d(0x409)]+_0x34099d(0x3ba);return(await this[_0x34099d(0x2ff)][_0x34099d(0x3fd)](_0x16f43c,{'body':_0x4ba7dc}))[_0x34099d(0x3b3)][_0x34099d(0x4d4)]||'';}async['list'](_0x48e6c9){const _0xd6ee06=_0x545128;let _0x26b124=this[_0xd6ee06(0x234)]()+'/-/object/list';return(await this[_0xd6ee06(0x2ff)]['post'](_0x26b124,{'body':_0x48e6c9}))['body'][_0xd6ee06(0x2ae)];}async[_0x545128(0x457)](_0x38b45c){const _0x5760a9=_0x545128;var _0x5bbfa5;let _0x40ced2=this[_0x5760a9(0x234)]()+'/'+_0x38b45c[_0x5760a9(0x409)]+'/object/'+_0x38b45c[_0x5760a9(0x4d4)],_0x33505a=await this['_HTTPService'][_0x5760a9(0x1e8)](_0x40ced2,{'body':_0x38b45c});if((_0x33505a==null||(_0x5bbfa5=_0x33505a['body'])==null||(_0x5bbfa5=_0x5bbfa5['error'])==null?void 0x0:_0x5bbfa5['code'])!==0x1)throw Error(_0x5760a9(0x458));}async[_0x545128(0x2e5)](_0x4919c3){const _0x3963bb=_0x545128;let _0x4cdd3f=this[_0x3963bb(0x234)]()+'/'+_0x4919c3[_0x3963bb(0x409)]+'/object/'+_0x4919c3[_0x3963bb(0x4d4)]+'/allowed';return(await this[_0x3963bb(0x2ff)]['post'](_0x4cdd3f,{'body':_0x4919c3}))[_0x3963bb(0x3b3)][_0x3963bb(0x449)];}async[_0x545128(0x2ba)](_0x598760){const _0x208965=_0x545128;let _0x506fa5=this['_getAPIPrefixPath']()+'/-/object/-/batch_allowed';return(await this[_0x208965(0x2ff)][_0x208965(0x3fd)](_0x506fa5,{'body':{'requests':_0x598760}}))[_0x208965(0x3b3)][_0x208965(0x3a0)];}async[_0x545128(0x38c)](_0x3f4ded){const _0x54517b=_0x545128;let _0x5a7c11=this['_getAPIPrefixPath']()+'/'+_0x3f4ded[_0x54517b(0x409)]+'/role',_0x957bc=await this[_0x54517b(0x2ff)]['post'](_0x5a7c11,{'body':_0x3f4ded});return{'roles':_0x957bc[_0x54517b(0x3b3)]['roles'],'actions':_0x957bc[_0x54517b(0x3b3)][_0x54517b(0x449)]};}async[_0x545128(0x438)](_0x418244){const _0x1cfddd=_0x545128;let _0x262786=this[_0x1cfddd(0x234)]()+'/collaborator';await this[_0x1cfddd(0x2ff)][_0x1cfddd(0x3b0)](_0x262786,{'params':{'collaboratorID':_0x418244[_0x1cfddd(0x3fb)],'objectID':_0x418244[_0x1cfddd(0x4d4)],'unitID':_0x418244[_0x1cfddd(0x2cd)]}});}async[_0x545128(0x287)](_0x4617bb){const _0x106b27=_0x545128;let _0x344dbb=this[_0x106b27(0x234)]()+_0x106b27(0x440);await this[_0x106b27(0x2ff)][_0x106b27(0x27e)](_0x344dbb,{'body':_0x4617bb});}async[_0x545128(0x2d2)](_0x340a48){const _0x47f388=_0x545128;let _0x2bdf4c=this[_0x47f388(0x234)]()+_0x47f388(0x440);await this[_0x47f388(0x2ff)][_0x47f388(0x3fd)](_0x2bdf4c,{'body':_0x340a48});}async['listCollaborators'](_0x3e8732){const _0xe18f91=_0x545128;var _0xf10f60;let _0x1b0ea4=this[_0xe18f91(0x234)]()+_0xe18f91(0x440),_0x3129eb=await this[_0xe18f91(0x2ff)][_0xe18f91(0x2f7)](_0x1b0ea4,{'params':{'objectID':_0x3e8732[_0xe18f91(0x4d4)],'unitID':_0x3e8732[_0xe18f91(0x2cd)]}});return this[_0xe18f91(0x26b)]((_0xf10f60=_0x3129eb[_0xe18f91(0x3b3)][_0xe18f91(0x470)])==null?!0x1:_0xf10f60),_0x3129eb[_0xe18f91(0x3b3)][_0xe18f91(0x34b)];}async['putCollaborators'](_0x42351){const _0x413001=_0x545128;let _0x288216=this[_0x413001(0x234)]()+_0x413001(0x440);await this[_0x413001(0x2ff)][_0x413001(0x1e8)](_0x288216,{'body':_0x42351});}['setCfgEnableObjInherit'](_0x9cfec3){const _0x1fc7eb=_0x545128;this[_0x1fc7eb(0x461)]=_0x9cfec3;}[_0x545128(0x38f)](){const _0x449bf3=_0x545128;return this[_0x449bf3(0x461)];}};G=b([y(0x0,(0x0,n['Inject'])(u['HTTPService'])),y(0x1,(0x0,n[_0x545128(0x304)])(n[_0x545128(0x378)]))],G);function Ke(_0x4679dc){const _0x8ed51d=_0x545128;let _0x266646=atob(_0x4679dc),_0x13cebe=new Uint8Array(_0x266646[_0x8ed51d(0x38a)]);for(let _0x2f1a62=0x0;_0x2f1a62<_0x266646[_0x8ed51d(0x38a)];_0x2f1a62++)_0x13cebe[_0x2f1a62]=_0x266646[_0x8ed51d(0x293)](_0x2f1a62);return _0x13cebe;}function qe(_0x281793){const _0x2b3e88=_0x545128;let _0x465c60='';for(let _0x524e66=0x0;_0x524e66<_0x281793[_0x2b3e88(0x38a)];_0x524e66++)_0x465c60+=String[_0x2b3e88(0x286)](_0x281793[_0x524e66]);return btoa(_0x465c60);}function Je(_0x453f90,_0x3e08f4){const _0x266f25=_0x545128;let _0x326a69=Ke(_0x3e08f4),_0x7baead=(0x0,m['randomBytes'])(0x10);return qe((0x0,m[_0x266f25(0x4db)])(_0x7baead,(0x0,p[_0x266f25(0x4c6)])(_0x326a69,_0x7baead)[_0x266f25(0x425)]((0x0,m[_0x266f25(0x3ee)])(_0x453f90))));}function Ye(){const _0x275f39=_0x545128;let _0x13b5f1=(0x0,d['getGlobalObject'])()['__Key__'];if(typeof window<'u'&&window['location']!==void 0x0&&_0x13b5f1){let _0x979dc3={'time':Math[_0x275f39(0x279)](Date['now']()/0x3e8),'domain':location[_0x275f39(0x1f5)]};return Je(JSON[_0x275f39(0x4a3)](_0x979dc3),_0x13b5f1);}}let K=class{constructor(_0x471d98){const _0x1c8a18=_0x545128;this['_httpService']=_0x471d98,this[_0x1c8a18(0x3f1)]();}[_0x545128(0x3f1)](){const _0x33aff0=_0x545128;this[_0x33aff0(0x20c)][_0x33aff0(0x332)]({'interceptor':(_0x10e9f2,_0x47a8ac)=>{const _0x36b1f3=_0x33aff0;let _0x4a2345=Ye();return _0x4a2345&&_0x10e9f2[_0x36b1f3(0x404)][_0x36b1f3(0x3f4)](_0x36b1f3(0x3e9),_0x4a2345),_0x47a8ac(_0x10e9f2);}});}};K=b([y(0x0,(0x0,n[_0x545128(0x304)])(u[_0x545128(0x4a6)]))],K);let q=class extends n['RxDisposable']{constructor(_0x168ef3,_0x36d0e3,_0xb78065){const _0x18f0fa=_0x545128;super(),this[_0x18f0fa(0x4a2)]=_0x168ef3,this[_0x18f0fa(0x2fd)]=_0x36d0e3,this[_0x18f0fa(0x3ea)]=_0xb78065,_(this,_0x18f0fa(0x2bf),new a[(_0x18f0fa(0x3b2))](null)),_(this,_0x18f0fa(0x23d),new a['Subject']()),_(this,_0x18f0fa(0x39e),this[_0x18f0fa(0x2bf)][_0x18f0fa(0x49e)]()),_(this,_0x18f0fa(0x288),this[_0x18f0fa(0x23d)][_0x18f0fa(0x49e)]());}[_0x545128(0x25e)](){const _0x26ecc9=_0x545128;super[_0x26ecc9(0x25e)](),this[_0x26ecc9(0x23d)]['complete'](),this[_0x26ecc9(0x2bf)][_0x26ecc9(0x417)]();}async[_0x545128(0x383)](_0x4c3315,_0x3f5a3e,_0x931ec2){const _0x378c08=_0x545128;this[_0x378c08(0x2bf)][_0x378c08(0x2c2)]({'unitId':_0x4c3315,'type':_0x3f5a3e});let _0x2d4484=null;switch(_0x3f5a3e){case n[_0x378c08(0x251)][_0x378c08(0x424)]:_0x2d4484=await this[_0x378c08(0x2fd)][_0x378c08(0x3d9)](_0x4c3315,_0x931ec2);break;case n[_0x378c08(0x251)]['UNIVER_DOC']:_0x2d4484=await this[_0x378c08(0x2fd)][_0x378c08(0x3d1)](_0x4c3315,_0x931ec2);break;case n[_0x378c08(0x251)][_0x378c08(0x437)]:_0x2d4484=await this['_snapshotService'][_0x378c08(0x37c)](_0x4c3315,_0x931ec2);break;case n[_0x378c08(0x251)][_0x378c08(0x291)]:_0x2d4484=await this['_snapshotService'][_0x378c08(0x326)](_0x4c3315,_0x931ec2);break;default:this['_logService'][_0x378c08(0x42e)]('[DataLoaderService]',_0x378c08(0x483));break;}return _0x2d4484&&this[_0x378c08(0x23d)][_0x378c08(0x2c2)](_0x2d4484),_0x2d4484;}async[_0x545128(0x454)](_0x2c0678,_0x565305,_0x3ddb5a){const _0x261a92=_0x545128;var _0x562d0d;this[_0x261a92(0x2bf)]['next']({'unitId':_0x2c0678,'type':_0x565305,'subUnitId':_0x3ddb5a});let _0x2fffa8=0x0,_0x1997b3=await((_0x562d0d=this[_0x261a92(0x3ea)])==null?void 0x0:_0x562d0d[_0x261a92(0x321)](_0x2c0678));return _0x1997b3&&(_0x1997b3['awaitingChangeset']||_0x1997b3[_0x261a92(0x329)]['length']!==0x0)&&(_0x2fffa8=_0x1997b3['rev']),_0x2fffa8===0x0&&this[_0x261a92(0x4a2)][_0x261a92(0x1fb)](_0x261a92(0x37d),_0x261a92(0x23c)),this[_0x261a92(0x383)](_0x2c0678,_0x565305,_0x2fffa8);}};q=b([y(0x0,n[_0x545128(0x368)]),y(0x1,(0x0,n[_0x545128(0x304)])(t['SnapshotService'])),y(0x2,(0x0,n[_0x545128(0x2da)])(C))],q);let J=class{constructor(_0x35822,_0xeac41f,_0x8a9006){const _0x2d83f2=_0x545128;this[_0x2d83f2(0x20c)]=_0x35822,this[_0x2d83f2(0x2e4)]=_0xeac41f,this[_0x2d83f2(0x1e7)]=_0x8a9006,_(this,'_waitCount',0x0),_(this,_0x2d83f2(0x225),new a[(_0x2d83f2(0x335))]()),_(this,_0x2d83f2(0x436),this[_0x2d83f2(0x225)]),_(this,_0x2d83f2(0x22e),new Map());}['setWaitCount'](_0x1dd592){const _0x160baa=_0x545128;this[_0x160baa(0x3fc)]=_0x1dd592,this[_0x160baa(0x225)][_0x160baa(0x2c2)](_0x1dd592);}[_0x545128(0x2bd)](_0x1c8c8c,_0x5a72c4){const _0x8c94a6=_0x545128;if(_0x5a72c4===f[_0x8c94a6(0x289)][_0x8c94a6(0x301)]){let _0x43f3cb=new Image();return _0x43f3cb[_0x8c94a6(0x3e8)]=_0x1c8c8c,_0x43f3cb;}return this['_imageSourceCache'][_0x8c94a6(0x2f7)](_0x1c8c8c);}[_0x545128(0x4ba)](_0xc6e33f,_0x4e66f6,_0x1da545){const _0x3a9a4e=_0x545128;_0x4e66f6===f[_0x3a9a4e(0x289)][_0x3a9a4e(0x301)]||_0x1da545==null||this[_0x3a9a4e(0x22e)]['set'](_0xc6e33f,_0x1da545);}async[_0x545128(0x32b)](_0x279eca){const _0x406806=_0x545128;try{let _0x177e26=this['_replaceFileID'](this[_0x406806(0x33a)](),''+_0x279eca),_0xee8ea7=(await this[_0x406806(0x20c)]['get'](_0x177e26))['body'];if(_0xee8ea7['error']&&_0xee8ea7[_0x406806(0x42e)]['code']===o[_0x406806(0x24b)]['OK']){let _0x13135a=(0x0,n['resolveWithBasePath'])(_0xee8ea7[_0x406806(0x477)],this[_0x406806(0x387)]());return Promise[_0x406806(0x4c9)](_0x13135a);}return Promise['reject'](_0xee8ea7[_0x406806(0x42e)]);}catch(_0x8bd15c){return Promise['reject'](_0x8bd15c);}}async['saveImage'](_0x587929){const _0x35d24f=_0x545128;let _0x310213='';if(!f['DRAWING_IMAGE_ALLOW_IMAGE_LIST'][_0x35d24f(0x4ac)](_0x587929['type']))return this[_0x35d24f(0x39d)](),Promise[_0x35d24f(0x236)](Error(f[_0x35d24f(0x2ac)][_0x35d24f(0x23e)]));if(_0x587929[_0x35d24f(0x292)]>(0x0,f['getDrawingImageAllowSize'])())return this[_0x35d24f(0x39d)](),Promise[_0x35d24f(0x236)](Error(f[_0x35d24f(0x2ac)][_0x35d24f(0x43d)]));try{let _0xe84820=new FormData();_0xe84820[_0x35d24f(0x430)]('file',_0x587929);let _0x5c98b1=this[_0x35d24f(0x1e7)]['getFocusedUnit'](),_0x3d0140=_0x5c98b1==null?void 0x0:_0x5c98b1[_0x35d24f(0x3bb)]();if(!_0x3d0140)throw Error(_0x35d24f(0x3ab));let _0x93e57=this[_0x35d24f(0x3c2)]()+'?size='+_0x587929[_0x35d24f(0x292)]['toString']()+_0x35d24f(0x431)+o['FileSource']['UnitEmbedded']+_0x35d24f(0x4af)+encodeURIComponent(_0x3d0140),_0x49651d={'body':_0xe84820},_0x205395=(await this[_0x35d24f(0x20c)]['post'](_0x93e57,_0x49651d))[_0x35d24f(0x3b3)];if(typeof _0x205395[_0x35d24f(0x30d)]!='string')return this[_0x35d24f(0x39d)](),Promise[_0x35d24f(0x236)](Error(f[_0x35d24f(0x2ac)][_0x35d24f(0x3b5)]));_0x310213=_0x205395[_0x35d24f(0x30d)];}catch{return this[_0x35d24f(0x39d)](),Promise['reject'](Error(f['ImageUploadStatusType'][_0x35d24f(0x3b5)]));}return new Promise((_0x422585,_0x41d54e)=>{const _0x339e78=_0x35d24f;let _0x50e9d7=new FileReader();_0x50e9d7[_0x339e78(0x370)](_0x587929),_0x50e9d7[_0x339e78(0x306)]=_0x5c2da0=>{const _0x406d6f=_0x339e78;var _0xfd4ce0;let _0x280e98=(_0xfd4ce0=_0x5c2da0['target'])==null?void 0x0:_0xfd4ce0[_0x406d6f(0x33b)];if(_0x280e98==null){this[_0x406d6f(0x39d)](),_0x41d54e(Error(f['ImageUploadStatusType'][_0x406d6f(0x3b5)]));return;}_0x422585({'imageId':(0x0,n[_0x406d6f(0x318)])(0x6),'imageSourceType':f[_0x406d6f(0x289)][_0x406d6f(0x2a0)],'source':_0x310213,'base64Cache':_0x280e98,'status':f[_0x406d6f(0x2ac)]['SUCCUSS']}),this[_0x406d6f(0x39d)]();};});}['_getUploadFileURL'](){const _0x5ea4f2=_0x545128;var _0x14689d;let _0xdcf789=this[_0x5ea4f2(0x2e4)][_0x5ea4f2(0x2c0)](h);return(_0x14689d=_0xdcf789==null?void 0x0:_0xdcf789[_0x5ea4f2(0x3bc)])==null?_0x5ea4f2(0x314):_0x14689d;}[_0x545128(0x33a)](){const _0x1ea4c5=_0x545128;var _0x159ca5;let _0x47b957=this[_0x1ea4c5(0x2e4)][_0x1ea4c5(0x2c0)](h);return(_0x159ca5=_0x47b957==null?void 0x0:_0x47b957[_0x1ea4c5(0x31a)])==null?_0x1ea4c5(0x485):_0x159ca5;}['_getDownloadEndpointURL'](){const _0x55ed16=_0x545128;var _0xad4ae1;let _0x43c02d=this[_0x55ed16(0x2e4)][_0x55ed16(0x2c0)](h);return(_0xad4ae1=_0x43c02d==null?void 0x0:_0x43c02d[_0x55ed16(0x3fe)])==null?location[_0x55ed16(0x2fb)]:_0xad4ae1;}[_0x545128(0x281)](_0x5204e2,_0x3e4115){const _0x119a0f=_0x545128;return _0x5204e2[_0x119a0f(0x4c1)](_0x119a0f(0x4d3),_0x3e4115);}[_0x545128(0x39d)](){const _0x440eab=_0x545128;--this[_0x440eab(0x3fc)],this['_change$'][_0x440eab(0x2c2)](this['_waitCount']);}};J=b([y(0x0,(0x0,n[_0x545128(0x304)])(u['HTTPService'])),y(0x1,n[_0x545128(0x378)]),y(0x2,(0x0,n['Inject'])(n[_0x545128(0x4c4)]))],J);let Y=class{constructor(_0x4a42a1,_0x14a8f5){const _0x5752a7=_0x545128;this[_0x5752a7(0x2e4)]=_0x4a42a1,this[_0x5752a7(0x2ff)]=_0x14a8f5;}['_getAPIPrefixPath'](){const _0x379a3e=_0x545128;var _0x447a84;let _0x2d8290=this[_0x379a3e(0x2e4)]['getConfig'](h);return(_0x447a84=_0x2d8290==null?void 0x0:_0x2d8290['authzUrl'])==null?_0x379a3e(0x46b):_0x447a84;}async[_0x545128(0x1e9)](_0x2d3d3c){const _0x5d58d8=_0x545128;let _0x30522d=this[_0x5d58d8(0x234)]()+_0x5d58d8(0x440);return{'list':[{'title':'People','mentions':(await this['_HTTPService']['get'](_0x30522d,{'params':{'objectID':_0x2d3d3c['unitId'],'unitID':_0x2d3d3c[_0x5d58d8(0x222)]}}))[_0x5d58d8(0x3b3)][_0x5d58d8(0x34b)][_0x5d58d8(0x2d9)](_0x588eb7=>({'objectId':_0x588eb7['id'],'name':_0x588eb7[_0x5d58d8(0x364)][_0x5d58d8(0x460)],'metadata':{'icon':_0x588eb7['subject']['avatar']},'label':_0x588eb7[_0x5d58d8(0x364)][_0x5d58d8(0x460)],'objectType':n['MentionType'][_0x5d58d8(0x27c)]})),'metadata':{},'type':n['MentionType'][_0x5d58d8(0x27c)]}]};}};Y=b([y(0x0,(0x0,n[_0x545128(0x304)])(n[_0x545128(0x378)])),y(0x1,(0x0,n[_0x545128(0x304)])(u[_0x545128(0x4a6)]))],Y);let X=class extends n[_0x545128(0x315)]{constructor(_0x3a45a5,_0x48292b,_0x1ca375,_0x5dd47b,_0x5d6d03){const _0x43f3bb=_0x545128;super(),this[_0x43f3bb(0x2f9)]=_0x3a45a5,this[_0x43f3bb(0x1e7)]=_0x48292b,this[_0x43f3bb(0x1f9)]=_0x1ca375,this[_0x43f3bb(0x427)]=_0x5dd47b,this[_0x43f3bb(0x48f)]=_0x5d6d03,this[_0x43f3bb(0x3cc)](),this['_initCloseConn']();}[_0x545128(0x213)](){const _0x3127f0=_0x545128;let _0x173e45=async _0x5b179f=>{const _0x14f679=_0x4024;(await this[_0x14f679(0x427)][_0x14f679(0x376)](_0x5b179f))[_0x14f679(0x40e)]['pipe']((0x0,c['filter'])(_0x464e55=>_0x464e55[_0x14f679(0x43a)]===t[_0x14f679(0x27d)][_0x14f679(0x325)]),(0x0,c[_0x14f679(0x386)])(this[_0x14f679(0x245)]))['subscribe'](_0x1cb7b4=>{const _0x2b685a=_0x14f679;let {reason:_0x156186}=_0x1cb7b4[_0x2b685a(0x4b8)];this[_0x2b685a(0x48f)][_0x2b685a(0x214)]({'id':_0x2b685a(0x337),'data':_0x156186}),this[_0x2b685a(0x1f9)]['updatePermissionPoint'](new i[(_0x2b685a(0x4bd))](_0x5b179f)['id'],!0x1),this[_0x2b685a(0x427)]['closeSession'](_0x5b179f);});};(0x0,a['merge'])(this[_0x3127f0(0x1e7)][_0x3127f0(0x2be)](n['UniverInstanceType']['UNIVER_SHEET']),this['_univerInstanceService'][_0x3127f0(0x2be)](n['UniverInstanceType']['UNIVER_DOC']),this[_0x3127f0(0x1e7)][_0x3127f0(0x2be)](n[_0x3127f0(0x251)][_0x3127f0(0x291)]))[_0x3127f0(0x259)]((0x0,c[_0x3127f0(0x2d9)])(_0x1f82f=>_0x1f82f[_0x3127f0(0x4a5)][_0x3127f0(0x3bb)]()),(0x0,c[_0x3127f0(0x280)])(_0x59ccaa=>!(0x0,n[_0x3127f0(0x327)])(_0x59ccaa)),(0x0,c[_0x3127f0(0x386)])(this['dispose$']))[_0x3127f0(0x31b)](_0x5128ef=>{_0x173e45(_0x5128ef);});}['_initUnitPermissionChange'](){const _0x41847f=_0x545128;let _0x519e0f=async _0x312ccd=>{const _0x5a252e=_0x4024;let _0x199733=await this['_collaborationSessionService']['requireSession'](_0x312ccd),_0x191b80=this[_0x5a252e(0x2f9)]['get'](i[_0x5a252e(0x244)]);_0x199733[_0x5a252e(0x40e)][_0x5a252e(0x259)]((0x0,c[_0x5a252e(0x280)])(_0x16f47e=>_0x16f47e[_0x5a252e(0x43a)]===t[_0x5a252e(0x27d)]['UPDATE_PERMISSION_OBJ']),(0x0,c['takeUntil'])(this[_0x5a252e(0x245)]))[_0x5a252e(0x31b)](_0xd102b8=>{const _0x1bec8a=_0x5a252e;let {objectId:_0x3e19ba}=_0xd102b8['data'];_0x3e19ba===_0x312ccd?_0x191b80['initWorkbookPermissionChange'](_0x312ccd):_0x191b80[_0x1bec8a(0x4be)](_0x312ccd,_0x3e19ba);});};(0x0,a['merge'])(this['_univerInstanceService'][_0x41847f(0x2be)](n['UniverInstanceType']['UNIVER_SHEET']))['pipe']((0x0,c[_0x41847f(0x2d9)])(_0x1b52d0=>_0x1b52d0[_0x41847f(0x4a5)][_0x41847f(0x3bb)]()),(0x0,c[_0x41847f(0x280)])(_0x916085=>!(0x0,n[_0x41847f(0x327)])(_0x916085)),(0x0,c['takeUntil'])(this[_0x41847f(0x245)]))[_0x41847f(0x31b)](_0x47650c=>{_0x519e0f(_0x47650c);});}};X=b([y(0x0,(0x0,n[_0x545128(0x304)])(n['Injector'])),y(0x1,n[_0x545128(0x4c4)]),y(0x2,n['IPermissionService']),y(0x3,(0x0,n[_0x545128(0x304)])(V)),y(0x4,(0x0,n[_0x545128(0x304)])(v))],X);let Z=class{constructor(_0x2b834b,_0xb1ec14){const _0x1a9d28=_0x545128;this[_0x1a9d28(0x2e4)]=_0x2b834b,this['_httpService']=_0xb1ec14;}async[_0x545128(0x495)](_0x132103,_0x1cfe53){const _0x426a0e=_0x545128;var _0xebf000;let {unitID:_0x2d6ed3,type:_0x405d13,revision:_0x4f8909=0x0}=_0x1cfe53,_0x17105b=this[_0x426a0e(0x484)]()+'/'+_0x405d13+_0x426a0e(0x442)+_0x2d6ed3+_0x426a0e(0x379)+_0x4f8909,_0x14738f=(await this[_0x426a0e(0x20c)][_0x426a0e(0x2f7)](_0x17105b))[_0x426a0e(0x3b3)],_0x3fd65d=(_0xebf000=_0x14738f['snapshot'])==null?void 0x0:_0xebf000['workbook'];if(_0x3fd65d){let _0x2085f2=_0x3fd65d==null?void 0x0:_0x3fd65d[_0x426a0e(0x478)];_0x3fd65d['originalMeta']=t[_0x426a0e(0x298)][_0x426a0e(0x268)]((0x0,t[_0x426a0e(0x3c0)])(_0x2085f2)),Object[_0x426a0e(0x4c3)](_0x3fd65d['sheets'])[_0x426a0e(0x295)](([,_0x418aed])=>{const _0x103ad7=_0x426a0e;let _0x71390d=_0x418aed[_0x103ad7(0x478)];_0x418aed['originalMeta']=t[_0x103ad7(0x298)][_0x103ad7(0x268)]((0x0,t[_0x103ad7(0x3c0)])(_0x71390d));});}return _0x14738f;}async[_0x545128(0x384)](_0x3d1598,_0x5e3d0c){const _0x138d26=_0x545128;let {unitID:_0x41455b,type:_0x5487f3,blockID:_0x349c5e}=_0x5e3d0c,_0x5101e9=this[_0x138d26(0x401)]()+'/'+_0x5487f3+_0x138d26(0x442)+_0x41455b+_0x138d26(0x362)+_0x349c5e;return(await this[_0x138d26(0x20c)][_0x138d26(0x2f7)](_0x5101e9))[_0x138d26(0x3b3)];}async['getDeserializedSheetBlock'](_0x448566,_0x5b39cd){const _0x1402d2=_0x545128;let {unitID:_0x53f085,type:_0x4d8e22,blockID:_0x542f31}=_0x5b39cd,_0x5c7520=this['_getAPIPrefix']()+_0x1402d2(0x362)+_0x4d8e22+'/unit/'+_0x53f085+_0x1402d2(0x362)+_0x542f31;return(await this[_0x1402d2(0x20c)]['get'](_0x5c7520))['body'];}async['fetchMissingChangesets'](_0x632084,_0x305c6c){const _0x4e8584=_0x545128;let {unitID:_0x29b666,type:_0x2911e9,from:_0x327523,to:_0x40785b}=_0x305c6c,_0x4b492a=this[_0x4e8584(0x401)]()+'/'+_0x2911e9+_0x4e8584(0x442)+_0x29b666+_0x4e8584(0x428)+_0x327523+_0x4e8584(0x466)+_0x40785b;return(await this['_httpService'][_0x4e8584(0x2f7)](_0x4b492a))[_0x4e8584(0x3b3)];}[_0x545128(0x484)](){const _0x142a69=_0x545128;var _0x5e71f9;return(_0x5e71f9=this[_0x142a69(0x2e4)]['getConfig'](_0x142a69(0x220)))==null?this['_getAPIPrefix']():_0x5e71f9;}[_0x545128(0x401)](){const _0x1a3323=_0x545128;var _0x2116b3;let _0x476eb0=this['_configService'][_0x1a3323(0x2c0)](h);return(_0x2116b3=_0x476eb0==null?void 0x0:_0x476eb0[_0x1a3323(0x39c)])==null?_0x1a3323(0x389):_0x2116b3;}async[_0x545128(0x455)](_0x2cf6c3,_0x5739c8){const _0xd2a0fd=_0x545128;let _0x596ebb='/universer-api/snapshot/'+_0x5739c8[_0xd2a0fd(0x393)]+'/unit/'+_0x5739c8[_0xd2a0fd(0x2cd)]+_0xd2a0fd(0x1fa);return(await this[_0xd2a0fd(0x20c)][_0xd2a0fd(0x2f7)](_0x596ebb,{'params':{'resourceId':JSON[_0xd2a0fd(0x4a3)](_0x5739c8[_0xd2a0fd(0x277)])}}))[_0xd2a0fd(0x3b3)];}[_0x545128(0x353)](){const _0x2fb7ff=_0x545128;throw Error(_0x2fb7ff(0x21b));}['updateSnapshot'](){const _0x5ca94f=_0x545128;throw Error(_0x5ca94f(0x21b));}[_0x545128(0x37e)](){const _0x23629c=_0x545128;throw Error(_0x23629c(0x21b));}[_0x545128(0x270)](){throw Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}[_0x545128(0x4b5)](){const _0x3b3b2e=_0x545128;throw Error(_0x3b3b2e(0x21b));}['getLatestCsReqIdBySid'](){throw Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}};Z=b([y(0x0,n['IConfigService']),y(0x1,(0x0,n[_0x545128(0x304)])(u[_0x545128(0x4a6)]))],Z);let Q=class extends n[_0x545128(0x2d1)]{constructor(_0x1d82ed,_0x226301,_0x188044,_0xd9acb8,_0x400142){const _0x480515=_0x545128;super(_0x1d82ed,_0x226301,_0x188044),this[_0x480515(0x2ee)]=_0xd9acb8,this[_0x480515(0x4a2)]=_0x400142;}[_0x545128(0x2a9)](_0x5d3dae,_0x250d69){const _0x291117=_0x545128;let _0x1f539a=this['_getUndoStack'](_0x5d3dae);if(_0x1f539a)try{let _0x3f4b87=this['_transformStack'](_0x1f539a,_0x250d69);this[_0x291117(0x48e)](_0x5d3dae,_0x3f4b87);}catch(_0x50c852){this[_0x291117(0x4a2)][_0x291117(0x42e)](_0x291117(0x2ad),_0x50c852),this[_0x291117(0x2ab)](_0x5d3dae);}let _0x1407f3=this[_0x291117(0x346)](_0x5d3dae);if(_0x1407f3)try{let _0x5b0f7a=this[_0x291117(0x2cb)](_0x1407f3,_0x250d69);this[_0x291117(0x208)](_0x5d3dae,_0x5b0f7a);}catch(_0x4f6f6e){this[_0x291117(0x4a2)][_0x291117(0x42e)](_0x4f6f6e),this[_0x291117(0x26f)](_0x5d3dae);}}[_0x545128(0x2ab)](_0x4a4c64){const _0x436331=_0x545128;let _0x85b73b=this[_0x436331(0x3c9)](_0x4a4c64);_0x85b73b&&(_0x85b73b['length']=0x0,this[_0x436331(0x41f)]());}[_0x545128(0x26f)](_0xf080f6){const _0xa0edf4=_0x545128;let _0x229534=this[_0xa0edf4(0x346)](_0xf080f6);_0x229534&&(_0x229534[_0xa0edf4(0x38a)]=0x0,this[_0xa0edf4(0x41f)]());}[_0x545128(0x48e)](_0x2ac3a6,_0x3262d3){const _0x47e71e=_0x545128;this[_0x47e71e(0x3ae)][_0x47e71e(0x3f4)](_0x2ac3a6,_0x3262d3),this['_updateStatus']();}[_0x545128(0x208)](_0x420b64,_0x5f4927){const _0x274c81=_0x545128;this[_0x274c81(0x20f)][_0x274c81(0x3f4)](_0x420b64,_0x5f4927),this[_0x274c81(0x41f)]();}['_transformStack'](_0x1e1ac0,_0x51b950){const _0x1da9b2=_0x545128;let _0xb36030=[],_0x917cf9=_0x51b950,_0x562185=_0x51b950;for(let _0x4a7f4a=_0x1e1ac0['length']-0x1;_0x4a7f4a>=0x0;_0x4a7f4a--){let {unitID:_0x2dd34e,undoMutations:_0x162ad5,redoMutations:_0x102e5e}=_0x1e1ac0[_0x4a7f4a],_0x5b2367=this[_0x1da9b2(0x2ee)]['transformMutationsWithChangeset'](_0x917cf9,_0x162ad5),_0x5a841e=this[_0x1da9b2(0x2ee)][_0x1da9b2(0x23b)](_0x562185,_0x102e5e);if((0x0,t[_0x1da9b2(0x28a)])(_0x5b2367)||(0x0,t['isTransformMutationsWithChangesetFailure'])(_0x5a841e)){this[_0x1da9b2(0x4a2)][_0x1da9b2(0x42e)]('[CollaborationUndoRedoService]',_0x1da9b2(0x473),_0x5b2367,_0x5a841e);break;}_0x917cf9=_0x5b2367[_0x1da9b2(0x32d)],_0x562185=_0x5a841e['c1Prime'],_0xb36030[_0x1da9b2(0x3f5)]({'unitID':_0x2dd34e,'undoMutations':_0x5b2367['m2Prime'],'redoMutations':_0x5a841e[_0x1da9b2(0x2e8)]});}return _0xb36030[_0x1da9b2(0x356)]();}};Q=b([y(0x0,n[_0x545128(0x4c4)]),y(0x1,n[_0x545128(0x419)]),y(0x2,n['IContextService']),y(0x3,t[_0x545128(0x35b)]),y(0x4,n[_0x545128(0x368)])],Q);let $=class extends n['Plugin']{constructor(_0x1a0c51={},_0x4c5494,_0x884b92,_0x18f645){const _0x51c55b=_0x545128;super(),this[_0x51c55b(0x4d5)]=_0x1a0c51,this[_0x51c55b(0x4a2)]=_0x4c5494,this[_0x51c55b(0x2f9)]=_0x884b92,this[_0x51c55b(0x2e4)]=_0x18f645;let {..._0x577ff5}=(0x0,n[_0x51c55b(0x303)])({},ee,_0x1a0c51);if(!_0x577ff5[_0x51c55b(0x31c)])throw Error(_0x51c55b(0x4b9));this[_0x51c55b(0x4d5)]=_0x577ff5,this[_0x51c55b(0x2e4)][_0x51c55b(0x415)](h,_0x577ff5);}['onStarting'](){const _0x4f5dc0=_0x545128;this[_0x4f5dc0(0x452)](),this['_initDependencies']();}[_0x545128(0x452)](){const _0xa8ead9=_0x545128;var _0x492940,_0x361243;this[_0xa8ead9(0x2f9)][_0xa8ead9(0x44f)](n['IUndoRedoService'])&&this[_0xa8ead9(0x4a2)]['error']('[UniverCollaborationClientPlugin]',_0xa8ead9(0x444));let _0xc50110=(0x0,n[_0xa8ead9(0x3e4)])([[n[_0xa8ead9(0x328)],{'useClass':Q}],[V],[x],[w],[W],[K],[se],[X],[v],[q],[Le,{'useClass':this[_0xa8ead9(0x4d5)]['socketService']}],[t[_0xa8ead9(0x2ec)],{'useClass':Z}],[n['IAuthzIoService'],{'useClass':G}],[f[_0xa8ead9(0x28d)],{'useClass':J}],[We,{'useClass':U}],[n[_0xa8ead9(0x46f)],{'useClass':Y}],[H],[He]],(_0x492940=this[_0xa8ead9(0x4d5)])==null?void 0x0:_0x492940[_0xa8ead9(0x2a8)]);if(!((_0x361243=this[_0xa8ead9(0x4d5)])!=null&&_0x361243['enableSingleActiveInstanceLock'])){let _0x2bff00=_0xc50110['findIndex'](([_0x4becdc])=>_0x4becdc===T);_0x2bff00!==-0x1&&_0xc50110[_0xa8ead9(0x4a9)](_0x2bff00,0x1);}(0x0,n[_0xa8ead9(0x420)])(this[_0xa8ead9(0x2f9)],_0xc50110);}[_0x545128(0x2e3)](){const _0x147f59=_0x545128;var _0x52975d,_0xa30e74;if(this['_injector'][_0x147f59(0x2f7)](u['HTTPService'])[_0x147f59(0x332)]({'priority':0x14,'interceptor':(0x0,u[_0x147f59(0x44a)])({'maxParallel':0x6})}),!((_0x52975d=this['_config'])!=null&&_0x52975d['enableOfflineEditing'])){var _0x4d86bb;(_0x4d86bb=this[_0x147f59(0x2f9)][_0x147f59(0x2f7)](C,n['Quantity']['OPTIONAL']))==null||_0x4d86bb[_0x147f59(0x27f)]();}(_0xa30e74=this['_config'])!=null&&_0xa30e74[_0x147f59(0x44b)]&&(0x0,n['touchDependencies'])(this[_0x147f59(0x2f9)],[[W]]),(0x0,n[_0x147f59(0x29d)])(this[_0x147f59(0x2f9)],[[K],[H],[X]]);}};_($,_0x545128(0x42c),_0x545128(0x496)),_($,_0x545128(0x3ca),Be),_($,_0x545128(0x28b),Ve),$=b([(0x0,n[_0x545128(0x2eb)])(d[_0x545128(0x4d2)],t['UniverCollaborationPlugin'],u['UniverNetworkPlugin']),y(0x1,n[_0x545128(0x368)]),y(0x2,(0x0,n[_0x545128(0x304)])(n[_0x545128(0x24d)])),y(0x3,n[_0x545128(0x378)])],$),exports[_0x545128(0x3ad)]=Ue,Object[_0x545128(0x34a)](exports,'AuthzIoHttpService',{'enumerable':!0x0,'get':function(){return G;}}),Object[_0x545128(0x34a)](exports,_0x545128(0x391),{'enumerable':!0x0,'get':function(){return M;}}),Object[_0x545128(0x34a)](exports,_0x545128(0x3a1),{'enumerable':!0x0,'get':function(){return N;}}),exports[_0x545128(0x285)]=h,Object['defineProperty'](exports,'CollaborationAttachmentIoService',{'enumerable':!0x0,'get':function(){return U;}}),Object[_0x545128(0x34a)](exports,'CollaborationController',{'enumerable':!0x0,'get':function(){return H;}}),Object[_0x545128(0x34a)](exports,_0x545128(0x456),{'enumerable':!0x0,'get':function(){return L;}}),Object[_0x545128(0x34a)](exports,_0x545128(0x2c7),{'enumerable':!0x0,'get':function(){return J;}}),Object[_0x545128(0x34a)](exports,_0x545128(0x498),{'enumerable':!0x0,'get':function(){return S;}}),Object['defineProperty'](exports,_0x545128(0x316),{'enumerable':!0x0,'get':function(){return V;}}),Object['defineProperty'](exports,_0x545128(0x294),{'enumerable':!0x0,'get':function(){return ze;}}),exports['CollaborationStatus']=ke,exports['CollaborationUIEventId']=oe,exports[_0x545128(0x29f)]=v,Object['defineProperty'](exports,_0x545128(0x2b1),{'enumerable':!0x0,'get':function(){return Q;}}),exports[_0x545128(0x3df)]=se,Object[_0x545128(0x34a)](exports,'ConflictState',{'enumerable':!0x0,'get':function(){return P;}}),exports[_0x545128(0x46c)]=te,exports[_0x545128(0x25d)]=_0x545128(0x232),exports['DEFAULT_WS_SESSION_TICKET_URL']=_0x545128(0x1fd),Object['defineProperty'](exports,'DataLoaderService',{'enumerable':!0x0,'get':function(){return q;}}),Object['defineProperty'](exports,_0x545128(0x47c),{'enumerable':!0x0,'get':function(){return R;}}),Object['defineProperty'](exports,_0x545128(0x360),{'enumerable':!0x0,'get':function(){return I;}}),exports[_0x545128(0x2f3)]=_0x545128(0x2ca),exports[_0x545128(0x2a3)]='HEARTBEAT_TIMEOUT',exports[_0x545128(0x27b)]=We,exports[_0x545128(0x302)]=Le,exports[_0x545128(0x2dc)]=C,exports['INetworkConditionService']=Pe,exports['ISingleActiveUnitService']=T,exports[_0x545128(0x312)]=0x3e8,exports[_0x545128(0x3b9)]=_0x545128(0x312),Object[_0x545128(0x34a)](exports,_0x545128(0x1f2),{'enumerable':!0x0,'get':function(){return x;}}),Object[_0x545128(0x34a)](exports,_0x545128(0x261),{'enumerable':!0x0,'get':function(){return Y;}}),Object[_0x545128(0x34a)](exports,'OfflineState',{'enumerable':!0x0,'get':function(){return F;}}),Object[_0x545128(0x34a)](exports,_0x545128(0x3c5),{'enumerable':!0x0,'get':function(){return j;}}),exports[_0x545128(0x242)]=_0x545128(0x3a5),exports[_0x545128(0x36c)]=_0x545128(0x3f2),exports[_0x545128(0x22b)]=le,Object[_0x545128(0x34a)](exports,_0x545128(0x47b),{'enumerable':!0x0,'get':function(){return z;}}),Object[_0x545128(0x34a)](exports,'SheetTransformSelectionsService',{'enumerable':!0x0,'get':function(){return w;}}),Object[_0x545128(0x34a)](exports,_0x545128(0x3f6),{'enumerable':!0x0,'get':function(){return Z;}}),Object[_0x545128(0x34a)](exports,_0x545128(0x377),{'enumerable':!0x0,'get':function(){return A;}}),exports[_0x545128(0x3d2)]=pe,Object[_0x545128(0x34a)](exports,_0x545128(0x42f),{'enumerable':!0x0,'get':function(){return $;}}),exports['deserializeToCombResponse']=Fe,exports['getLocalCacheKey']=de,exports[_0x545128(0x4cc)]=Ie;