@univerjs-pro/docs-formula 1.4.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +10 -10
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x15ff4a=_0x5a0e;(function(_0x400f34,_0x5dad15){const _0x4e4264=_0x5a0e,_0x2afa0f=_0x400f34();while(!![]){try{const _0x5a8278=parseInt(_0x4e4264(0xe2))/0x1+-parseInt(_0x4e4264(0xf2))/0x2*(-parseInt(_0x4e4264(0x15c))/0x3)+parseInt(_0x4e4264(0x140))/0x4+parseInt(_0x4e4264(0x18c))/0x5+parseInt(_0x4e4264(0x104))/0x6*(-parseInt(_0x4e4264(0x166))/0x7)+-parseInt(_0x4e4264(0xe1))/0x8*(-parseInt(_0x4e4264(0x125))/0x9)+-parseInt(_0x4e4264(0x11f))/0xa*(parseInt(_0x4e4264(0x103))/0xb);if(_0x5a8278===_0x5dad15)break;else _0x2afa0f['push'](_0x2afa0f['shift']());}catch(_0x194e96){_0x2afa0f['push'](_0x2afa0f['shift']());}}}(_0x4b4d,0xa0880));import{FormulaCacheEligibilityService as _0xf3ba79,FormulaLastValuePersistenceService as _0x3b1060,HostExternalReferenceModel as _0xc15eb3,UniverProFormulaEnginePlugin as _0x4ef49e,buildUpsertHostExternalReferenceMutations as _0x51ba85,collectFormulaExternalReferenceQualifiers as _0x184125,getScalarFormulaResultCell as _0x10bd2d,resolveFormulaResultPresentation as _0x4c2bd5,resolveHostFormulaExternalReferences as _0x197c79,toFormulaLastValue as _0x4190fe}from'@univerjs-pro/engine-formula';import{CellValueType as _0x5a7e9d,CommandType as _0x6c9543,CustomRangeType as _0x139ae4,DataStreamTreeTokenType as _0x246953,DependentOn as _0x3781b4,Disposable as _0x284207,ICommandService as _0x55728f,IConfigService as _0x102468,IResourceManagerService as _0x103c6c,IUndoRedoService as _0x51122a,IUniverInstanceService as _0x48b9a6,Inject as _0x36a610,Injector as _0xed0b2,JSONX as _0x1d02d7,Plugin as _0x2f618a,TextX as _0x54417a,Tools as _0x4fc8e1,UniverInstanceType as _0x1d8d65,generateRandomId as _0x52ed00,getBodySliceForTextXAction as _0x4f7aa5,getCustomRangeInterval as _0x48951d,getParagraphContentStartOffset as _0x3f5de0,getRichTextEditPath as _0x31e082,merge as _0x1725eb,shiftExclusiveRangeOnDelete as _0x563ad3,shiftExclusiveRangeOnInsert as _0x377b49,shiftInclusiveRangeOnDelete as _0x6038f1,shiftInclusiveRangeOnInsert as _0x10b131,touchDependencies as _0x426a27}from'@univerjs/core';import{DOC_SELECTION_OPTION_PRESERVE_CARET as _0x59dee6,DocSelectionManagerService as _0x1ba5ec,DocTextResolverService as _0xebc48d,RichTextEditingMutation as _0x3731df,UniverDocsPlugin as _0x296e31}from'@univerjs/docs';import{FormulaResultStatus as _0x462723,LexerTreeBuilder as _0x5707ab,OtherFormulaBizType as _0x13c14f,RegisterOtherFormulaService as _0x540fe4}from'@univerjs/engine-formula';import{Subject as _0xb8a1ef}from'rxjs';import{UniverLicensePlugin as _0x52fcce}from'@univerjs-pro/license';const y=_0x15ff4a(0x10d),je='univer-docs-formula',Me='';function b(){return{'formulas':{}};}function x(_0x5c5632){const _0x59097a=_0x15ff4a;return!_0x5c5632||typeof _0x5c5632!=_0x59097a(0x1b3)||!(_0x59097a(0x106)in _0x5c5632)||!_0x5c5632[_0x59097a(0x106)]||typeof _0x5c5632[_0x59097a(0x106)]!=_0x59097a(0x1b3)||Array[_0x59097a(0xcc)](_0x5c5632[_0x59097a(0x106)])?!0x1:Object[_0x59097a(0x16a)](_0x5c5632[_0x59097a(0x106)])[_0x59097a(0x15f)](([_0x2353bb,_0x41cc04])=>_0x2353bb['length']>0x0&&Ne(_0x41cc04));}function Ne(_0x112ab1){const _0x36a52a=_0x15ff4a;return!_0x112ab1||typeof _0x112ab1!='object'||!S(_0x112ab1,[_0x36a52a(0x1c2),_0x36a52a(0x17d),_0x36a52a(0xeb)])||!(_0x36a52a(0x1c2)in _0x112ab1)||typeof _0x112ab1[_0x36a52a(0x1c2)]!=_0x36a52a(0x1b9)||!_0x112ab1[_0x36a52a(0x1c2)][_0x36a52a(0x12d)]()||_0x36a52a(0x17d)in _0x112ab1&&_0x112ab1[_0x36a52a(0x17d)]!=null&&(typeof _0x112ab1['numberFormat']!='object'||!S(_0x112ab1[_0x36a52a(0x17d)],['pattern'])||!(_0x36a52a(0x167)in _0x112ab1[_0x36a52a(0x17d)])||typeof _0x112ab1[_0x36a52a(0x17d)][_0x36a52a(0x167)]!=_0x36a52a(0x1b9))?!0x1:!('lastValue'in _0x112ab1)||_0x112ab1[_0x36a52a(0xeb)]==null||Pe(_0x112ab1['lastValue']);}function Pe(_0x218627){const _0x56b695=_0x15ff4a;return!_0x218627||typeof _0x218627!='object'||!S(_0x218627,['v','t',_0x56b695(0x167)])||!('v'in _0x218627)||_0x218627['v']!==null&&typeof _0x218627['v']!=_0x56b695(0x1b9)&&typeof _0x218627['v']!=_0x56b695(0x1c3)&&typeof _0x218627['v']!='boolean'||'t'in _0x218627&&_0x218627['t']!=null&&!Fe(_0x218627['t'])?!0x1:!(_0x56b695(0x167)in _0x218627)||_0x218627[_0x56b695(0x167)]==null||typeof _0x218627[_0x56b695(0x167)]=='string';}function S(_0x1ec2cd,_0x45480c){const _0x2ef36c=_0x15ff4a;let _0x3aff8e=new Set(_0x45480c);return Object['keys'](_0x1ec2cd)[_0x2ef36c(0x15f)](_0x14eb6b=>_0x3aff8e[_0x2ef36c(0x184)](_0x14eb6b));}function Fe(_0x55457d){const _0x4b69cc=_0x15ff4a;return typeof _0x55457d==_0x4b69cc(0x1c3)&&Object['values'](_0x5a7e9d)[_0x4b69cc(0x155)](_0x55457d);}const Ie=new Set([_0x246953[_0x15ff4a(0xf5)],_0x246953[_0x15ff4a(0x12c)],_0x246953[_0x15ff4a(0x19f)],_0x246953['TABLE_CELL_START'],_0x246953[_0x15ff4a(0xda)],_0x246953[_0x15ff4a(0x14f)],_0x246953[_0x15ff4a(0xf6)],_0x246953[_0x15ff4a(0x1ae)],_0x246953['COLUMN_START'],_0x246953['COLUMN_END'],_0x246953[_0x15ff4a(0x157)],_0x246953[_0x15ff4a(0x18d)],_0x246953[_0x15ff4a(0x1bf)],_0x246953[_0x15ff4a(0x1b4)]]);var C=class extends Error{constructor(){const _0x4b2b12=_0x15ff4a;super(_0x4b2b12(0x18b));}};function Le(_0xbff3b3){const _0xa4e05e=_0x15ff4a;var _0x4dfeed,_0x207615;let _0x577911=_0x4fc8e1[_0xa4e05e(0x107)](_0xbff3b3[_0xa4e05e(0xe4)]),_0x44efc4=O(_0x577911),{startOffset:_0x414928,endOffset:_0x946c2d}=We(_0x44efc4,_0xbff3b3[_0xa4e05e(0x171)],_0xbff3b3[_0xa4e05e(0x11c)]);Ve(_0x44efc4,_0x414928,_0x946c2d);let _0x1fa84f=((_0x4dfeed=_0x44efc4[_0xa4e05e(0x101)])==null?void 0x0:_0x4dfeed[_0xa4e05e(0xfd)](_0x42740a=>{const _0x2d69db=_0xa4e05e;if(!w(_0x42740a))return!0x1;let _0x25a636=_0x48951d(_0x42740a);return _0x25a636[_0x2d69db(0x11c)]>_0x414928&&_0x25a636[_0x2d69db(0x171)]<_0x946c2d;})[_0xa4e05e(0x120)](_0x24a461=>_0x24a461[_0xa4e05e(0x142)]))??[];qe(_0x44efc4,_0x414928,_0x946c2d,''),_0x44efc4[_0xa4e05e(0x101)]=[...((_0x207615=_0x44efc4[_0xa4e05e(0x101)])==null?void 0x0:_0x207615[_0xa4e05e(0xfd)](_0x2ca330=>!_0x1fa84f[_0xa4e05e(0x155)](_0x2ca330[_0xa4e05e(0x142)])&&_0x2ca330[_0xa4e05e(0x142)]!==_0xbff3b3['rangeId']))??[],He(_0xbff3b3[_0xa4e05e(0x142)],_0x414928)][_0xa4e05e(0xfc)]((_0x14fc58,_0x145048)=>_0x14fc58[_0xa4e05e(0x14c)]-_0x145048['startIndex']);let _0x1f3f48=Ue(_0xbff3b3['resource']);return _0x1fa84f['forEach'](_0x5a6824=>{delete _0x1f3f48['formulas'][_0x5a6824];}),_0x1f3f48['formulas'][_0xbff3b3[_0xa4e05e(0x142)]]=_0x4fc8e1[_0xa4e05e(0x107)](_0xbff3b3[_0xa4e05e(0x1ab)]),{'nextDocumentData':_0x577911,'nextResource':_0x1f3f48,'cursorOffset':_0x414928+0x1};}function Re(_0x184790){const _0x1cc2aa=_0x15ff4a;var _0x3ff217,_0x5963fd;let _0xfcace5=_0x4fc8e1[_0x1cc2aa(0x107)](_0x184790[_0x1cc2aa(0xe4)]),_0x4f088d=(_0x3ff217=O(_0xfcace5)[_0x1cc2aa(0x101)])==null?void 0x0:_0x3ff217[_0x1cc2aa(0x1a8)](_0x5560dc=>_0x5560dc[_0x1cc2aa(0x142)]===_0x184790['rangeId']&&w(_0x5560dc));if(!_0x4f088d||!((_0x5963fd=_0x184790[_0x1cc2aa(0x115)])!=null&&_0x5963fd['formulas'][_0x184790[_0x1cc2aa(0x142)]]))return null;let _0x34e693=Ue(_0x184790['resource']);return _0x34e693[_0x1cc2aa(0x106)][_0x184790[_0x1cc2aa(0x142)]]=_0x4fc8e1[_0x1cc2aa(0x107)](_0x184790[_0x1cc2aa(0x1ab)]),{'nextDocumentData':_0xfcace5,'nextResource':_0x34e693,'cursorOffset':_0x4f088d[_0x1cc2aa(0xdc)]+0x1};}function ze(_0x5519e7){const _0x38992e=_0x15ff4a;let _0x28824a=_0x4fc8e1[_0x38992e(0x107)](_0x5519e7[_0x38992e(0xe4)]),_0x53d6e8=Je(_0x28824a,_0x5519e7[_0x38992e(0x142)],_0x5519e7[_0x38992e(0xe6)]??'');if(_0x53d6e8==null)return null;let _0x58a8c4=Ue(_0x5519e7['resource']);return delete _0x58a8c4['formulas'][_0x5519e7[_0x38992e(0x142)]],{'nextDocumentData':_0x28824a,'nextResource':_0x58a8c4,'cursorOffset':_0x53d6e8};}function Be(_0xd90224,_0x28bd17){const _0x21111c=_0x15ff4a;var _0x5d9bf8;let _0x654a2c=_0x4fc8e1[_0x21111c(0x107)](_0xd90224),_0x462485=_0x654a2c[_0x21111c(0x135)];if(!_0x462485)return _0x654a2c;let _0x2fed89=new Map(_0x28bd17[_0x21111c(0x120)](_0x55b1ea=>[_0x55b1ea[_0x21111c(0x142)],_0x55b1ea[_0x21111c(0xe6)]])),_0x840954=((_0x5d9bf8=_0x462485['customRanges'])==null?void 0x0:_0x5d9bf8[_0x21111c(0xfd)](_0x385d8f=>w(_0x385d8f)&&_0x2fed89[_0x21111c(0x184)](_0x385d8f[_0x21111c(0x142)]))[_0x21111c(0xfc)]((_0x2117c5,_0xa881a1)=>_0xa881a1[_0x21111c(0x14c)]-_0x2117c5[_0x21111c(0x14c)]))??[];for(let _0x4393be of _0x840954)Je(_0x654a2c,_0x4393be[_0x21111c(0x142)],_0x2fed89[_0x21111c(0x1ba)](_0x4393be['rangeId'])??'');return _0x654a2c;}function w(_0x13afca){const _0x509f41=_0x15ff4a;var _0x9b02ea;return(_0x13afca==null?void 0x0:_0x13afca[_0x509f41(0xf1)])===_0x139ae4[_0x509f41(0x177)]&&_0x13afca[_0x509f41(0xef)]===!0x0&&((_0x9b02ea=_0x13afca[_0x509f41(0x121)])==null?void 0x0:_0x9b02ea[_0x509f41(0x13c)])===_0x509f41(0x1c5);}function T(_0x561296,_0x5bb11a){const _0x414b8b=_0x15ff4a;var _0x2aaf97;return _0x561296==null||(_0x2aaf97=_0x561296[_0x414b8b(0x101)])==null?void 0x0:_0x2aaf97[_0x414b8b(0x1a8)](_0x560ece=>_0x560ece['rangeId']===_0x5bb11a&&w(_0x560ece));}function Ve(_0x176d97,_0x2017b9,_0x115691){const _0x20ccf5=_0x15ff4a;if(_0x2017b9===_0x115691){if(Ie['has'](_0x176d97[_0x20ccf5(0xcb)][_0x2017b9]))throw new C();}else{for(let _0xc71586=_0x2017b9;_0xc71586<_0x115691;_0xc71586++)if(_0x176d97[_0x20ccf5(0xcb)][_0xc71586]===_0x246953['PARAGRAPH']||Ie[_0x20ccf5(0x184)](_0x176d97[_0x20ccf5(0xcb)][_0xc71586]))throw new C();}}function He(_0x34fc9e,_0x42d4da){return{'startIndex':_0x42d4da,'endIndex':_0x42d4da,'rangeId':_0x34fc9e,'rangeType':_0x139ae4['CUSTOM'],'wholeEntity':!0x0,'properties':{'kind':je}};}function Ue(_0x40abdf){const _0x1fed86=_0x15ff4a;return _0x40abdf?_0x4fc8e1[_0x1fed86(0x107)](_0x40abdf):b();}function We(_0x43ed2d,_0x13ac1e,_0x1d77dd){const _0x296adc=_0x15ff4a;let _0x3fda00=Ke(_0x43ed2d),_0x4c9286=_0x13ac1e??_0x3fda00,_0x49e44d=_0x1d77dd??_0x4c9286;return{'startOffset':Ge(Math[_0x296adc(0xd4)](_0x4c9286,_0x49e44d),_0x3fda00),'endOffset':Ge(Math[_0x296adc(0x129)](_0x4c9286,_0x49e44d),_0x3fda00)};}function Ge(_0x1887e7,_0x37e47e){return Math['max'](0x0,Math['min'](_0x1887e7,_0x37e47e));}function Ke(_0x4b38b8){const _0x27d093=_0x15ff4a;return _0x4b38b8['dataStream'][_0x27d093(0x1c7)](''+_0x246953[_0x27d093(0x1a2)]+_0x246953[_0x27d093(0xf5)])?Math[_0x27d093(0x129)](0x0,_0x4b38b8['dataStream'][_0x27d093(0xcd)]-0x2):_0x4b38b8[_0x27d093(0xcb)][_0x27d093(0x1c7)](_0x246953[_0x27d093(0xf5)])?Math['max'](0x0,_0x4b38b8[_0x27d093(0xcb)]['length']-0x1):_0x4b38b8[_0x27d093(0xcb)]['length'];}function qe(_0x558ca6,_0x42b4c5,_0x48c453,_0x21d8a5){_0x48c453>_0x42b4c5&&Xe(_0x558ca6,_0x42b4c5,_0x48c453),Ye(_0x558ca6,_0x42b4c5,_0x21d8a5);}function Je(_0x25f9b4,_0x162791,_0x1951f8){const _0x22090c=_0x15ff4a;var _0x1a7790,_0x280f84;let _0x530cf1=O(_0x25f9b4),_0x2f0cba=(_0x1a7790=_0x530cf1[_0x22090c(0x101)])==null?void 0x0:_0x1a7790[_0x22090c(0x1a8)](_0x4a765e=>_0x4a765e[_0x22090c(0x142)]===_0x162791&&w(_0x4a765e));if(!_0x2f0cba)return null;let _0x1fd924=_0x48951d(_0x2f0cba);return qe(_0x530cf1,_0x1fd924['startOffset'],_0x1fd924[_0x22090c(0x11c)],_0x1951f8),_0x530cf1[_0x22090c(0x101)]=(_0x280f84=_0x530cf1[_0x22090c(0x101)])==null?void 0x0:_0x280f84[_0x22090c(0xfd)](_0x61e26f=>_0x61e26f[_0x22090c(0x142)]!==_0x162791),_0x1fd924[_0x22090c(0x171)]+_0x1951f8[_0x22090c(0xcd)];}function Ye(_0x20f165,_0x180d53,_0x32553b){const _0x2ad807=_0x15ff4a;_0x32553b&&(_0x20f165['dataStream']=''+_0x20f165[_0x2ad807(0xcb)][_0x2ad807(0x116)](0x0,_0x180d53)+_0x32553b+_0x20f165[_0x2ad807(0xcb)][_0x2ad807(0x116)](_0x180d53),Ze(_0x20f165,_0x180d53,_0x32553b[_0x2ad807(0xcd)]));}function Xe(_0x1a44a2,_0x3c1c21,_0x1fe154){const _0x68e79c=_0x15ff4a;let _0x1e155a=_0x1fe154-_0x3c1c21;_0x1a44a2[_0x68e79c(0xcb)]=''+_0x1a44a2[_0x68e79c(0xcb)]['slice'](0x0,_0x3c1c21)+_0x1a44a2['dataStream'][_0x68e79c(0x116)](_0x1fe154),Qe(_0x1a44a2,_0x3c1c21,_0x1e155a);}function Ze(_0x1d00aa,_0x9eb13c,_0x4aeb5e){const _0x42b072=_0x15ff4a;_0x1d00aa[_0x42b072(0x160)]=$e(_0x1d00aa[_0x42b072(0x160)],_0x9eb13c,_0x4aeb5e),_0x1d00aa[_0x42b072(0x1b1)]=$e(_0x1d00aa[_0x42b072(0x1b1)],_0x9eb13c,_0x4aeb5e),_0x1d00aa[_0x42b072(0x1bc)]=$e(_0x1d00aa[_0x42b072(0x1bc)],_0x9eb13c,_0x4aeb5e),_0x1d00aa[_0x42b072(0x156)]=tt(_0x1d00aa[_0x42b072(0x156)],_0x9eb13c,_0x4aeb5e),_0x1d00aa[_0x42b072(0xd0)]=nt(_0x1d00aa[_0x42b072(0xd0)],_0x9eb13c,_0x4aeb5e),_0x1d00aa[_0x42b072(0xe0)]=E(_0x1d00aa['columnGroups'],_0x9eb13c,_0x4aeb5e),_0x1d00aa[_0x42b072(0x101)]=E(_0x1d00aa[_0x42b072(0x101)],_0x9eb13c,_0x4aeb5e),_0x1d00aa['customDecorations']=E(_0x1d00aa['customDecorations'],_0x9eb13c,_0x4aeb5e),_0x1d00aa[_0x42b072(0x15a)]=E(_0x1d00aa[_0x42b072(0x15a)],_0x9eb13c,_0x4aeb5e);}function Qe(_0x3337c2,_0x46313b,_0x2c911f){const _0x51ce41=_0x15ff4a;var _0x43bff5,_0xcbb644;_0x3337c2[_0x51ce41(0x160)]=et(_0x3337c2['paragraphs'],_0x46313b,_0x2c911f),_0x3337c2[_0x51ce41(0x1b1)]=et(_0x3337c2['sectionBreaks'],_0x46313b,_0x2c911f),_0x3337c2[_0x51ce41(0x1bc)]=et(_0x3337c2[_0x51ce41(0x1bc)],_0x46313b,_0x2c911f),_0x3337c2[_0x51ce41(0x156)]=(_0x43bff5=rt((_0xcbb644=_0x3337c2[_0x51ce41(0x156)])==null?void 0x0:_0xcbb644[_0x51ce41(0x120)](_0x316185=>({..._0x316185,'startIndex':_0x316185['st'],'endIndex':_0x316185['ed']})),_0x46313b,_0x2c911f))==null?void 0x0:_0x43bff5['map'](_0x1d0338=>{let {startIndex:_0x4b6be0,endIndex:_0x5ca453,..._0x4e24d2}=_0x1d0338;return{..._0x4e24d2,'st':_0x4b6be0,'ed':_0x5ca453};}),_0x3337c2[_0x51ce41(0xd0)]=rt(_0x3337c2[_0x51ce41(0xd0)],_0x46313b,_0x2c911f),_0x3337c2['columnGroups']=D(_0x3337c2[_0x51ce41(0xe0)],_0x46313b,_0x2c911f),_0x3337c2['customRanges']=D(_0x3337c2[_0x51ce41(0x101)],_0x46313b,_0x2c911f),_0x3337c2[_0x51ce41(0x122)]=D(_0x3337c2['customDecorations'],_0x46313b,_0x2c911f),_0x3337c2[_0x51ce41(0x15a)]=D(_0x3337c2[_0x51ce41(0x15a)],_0x46313b,_0x2c911f);}function $e(_0x31d0c5,_0x32738e,_0xadab38){const _0x209189=_0x15ff4a;return _0x31d0c5==null?void 0x0:_0x31d0c5[_0x209189(0x120)](_0x25c060=>_0x25c060[_0x209189(0x14c)]>=_0x32738e?{..._0x25c060,'startIndex':_0x25c060[_0x209189(0x14c)]+_0xadab38}:_0x25c060);}function et(_0x667c40,_0x158fce,_0x50063d){const _0x31e211=_0x15ff4a;let _0x5848b3=_0x158fce+_0x50063d;return _0x667c40==null?void 0x0:_0x667c40[_0x31e211(0x120)](_0x1d960a=>_0x1d960a[_0x31e211(0x14c)]>=_0x158fce&&_0x1d960a[_0x31e211(0x14c)]<_0x5848b3?null:_0x1d960a[_0x31e211(0x14c)]>=_0x5848b3?{..._0x1d960a,'startIndex':_0x1d960a[_0x31e211(0x14c)]-_0x50063d}:_0x1d960a)[_0x31e211(0xfd)](_0x28c604=>_0x28c604!=null);}function tt(_0x1cc3d0,_0x36d696,_0x44014a){return _0x1cc3d0==null?void 0x0:_0x1cc3d0['map'](_0x184feb=>_0x184feb['st']>=_0x36d696?{..._0x184feb,'st':_0x184feb['st']+_0x44014a,'ed':_0x184feb['ed']+_0x44014a}:_0x184feb['ed']>_0x36d696?{..._0x184feb,'ed':_0x184feb['ed']+_0x44014a}:_0x184feb);}function E(_0xd4f9b9,_0x577638,_0x218e2f){const _0x22848e=_0x15ff4a;return _0xd4f9b9==null?void 0x0:_0xd4f9b9[_0x22848e(0x120)](_0x166453=>_0x10b131(_0x166453,_0x577638,_0x218e2f));}function _0x5a0e(_0xfaf3cf,_0x3f03ff){_0xfaf3cf=_0xfaf3cf-0xcb;const _0x4b4d41=_0x4b4d();let _0x5a0e18=_0x4b4d41[_0xfaf3cf];return _0x5a0e18;}function nt(_0xcd82e6,_0x52edb2,_0x55df08){const _0xb1b930=_0x15ff4a;return _0xcd82e6==null?void 0x0:_0xcd82e6[_0xb1b930(0x120)](_0x5ae9c2=>_0x377b49(_0x5ae9c2,_0x52edb2,_0x55df08));}function D(_0x24f58d,_0x578aef,_0x1a372c){const _0x2b586c=_0x15ff4a;return _0x24f58d==null?void 0x0:_0x24f58d[_0x2b586c(0x120)](_0x2dbc3c=>_0x6038f1(_0x2dbc3c,_0x578aef,_0x1a372c))[_0x2b586c(0xfd)](_0xc87e5f=>_0xc87e5f!=null);}function rt(_0xba4c9,_0x594555,_0x360bc5){const _0x5548aa=_0x15ff4a;return _0xba4c9==null?void 0x0:_0xba4c9[_0x5548aa(0x120)](_0x2553d4=>_0x563ad3(_0x2553d4,_0x594555,_0x360bc5))[_0x5548aa(0xfd)](_0x2180fd=>_0x2180fd!=null);}function O(_0x16ae9d){const _0x1f7f4e=_0x15ff4a;if(!_0x16ae9d[_0x1f7f4e(0x135)])throw Error('Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.');return _0x16ae9d[_0x1f7f4e(0x135)];}function k(_0x52ffb0){'@babel/helpers - typeof';const _0x327b31=_0x15ff4a;return k=typeof Symbol==_0x327b31(0xd5)&&typeof Symbol['iterator']==_0x327b31(0x100)?function(_0x294fae){return typeof _0x294fae;}:function(_0x20ab0e){const _0x3cb835=_0x327b31;return _0x20ab0e&&typeof Symbol==_0x3cb835(0xd5)&&_0x20ab0e[_0x3cb835(0x14a)]===Symbol&&_0x20ab0e!==Symbol['prototype']?_0x3cb835(0x100):typeof _0x20ab0e;},k(_0x52ffb0);}function it(_0x138bec,_0x3e79c5){const _0x2032fc=_0x15ff4a;if(k(_0x138bec)!=_0x2032fc(0x1b3)||!_0x138bec)return _0x138bec;var _0xb4859d=_0x138bec[Symbol[_0x2032fc(0xfb)]];if(_0xb4859d!==void 0x0){var _0x44766b=_0xb4859d['call'](_0x138bec,_0x3e79c5||_0x2032fc(0x179));if(k(_0x44766b)!=_0x2032fc(0x1b3))return _0x44766b;throw TypeError(_0x2032fc(0x15e));}return(_0x3e79c5===_0x2032fc(0x1b9)?String:Number)(_0x138bec);}function at(_0x12c4d5){const _0x44b9d8=_0x15ff4a;var _0x3dd3b0=it(_0x12c4d5,_0x44b9d8(0x1b9));return k(_0x3dd3b0)==_0x44b9d8(0x100)?_0x3dd3b0:_0x3dd3b0+'';}function A(_0xcb365d,_0x5920c5,_0x51bbe4){const _0x467e21=_0x15ff4a;return(_0x5920c5=at(_0x5920c5))in _0xcb365d?Object[_0x467e21(0xfe)](_0xcb365d,_0x5920c5,{'value':_0x51bbe4,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0xcb365d[_0x5920c5]=_0x51bbe4,_0xcb365d;}var j=class extends _0x284207{constructor(..._0x3f935b){const _0x1612df=_0x15ff4a;super(..._0x3f935b),A(this,'_resources',new Map()),A(this,'_rawResources',new Map()),A(this,'_loadErrors',new Map()),A(this,_0x1612df(0x11d),new _0xb8a1ef()),A(this,_0x1612df(0x148),this[_0x1612df(0x11d)]['asObservable']());}[_0x15ff4a(0xdd)](_0x541a25,_0xd92d5f){const _0x3b90b1=_0x15ff4a;var _0x428c28;let _0x2b4a36=(_0x428c28=this[_0x3b90b1(0x164)][_0x3b90b1(0x1ba)](_0x541a25))==null?void 0x0:_0x428c28['formulas'][_0xd92d5f];return _0x2b4a36?_0x4fc8e1[_0x3b90b1(0x107)](_0x2b4a36):void 0x0;}['getFormulas'](_0x536127){const _0x1a4b6a=_0x15ff4a;var _0x1b8d2e;return _0x4fc8e1[_0x1a4b6a(0x107)](((_0x1b8d2e=this[_0x1a4b6a(0x164)][_0x1a4b6a(0x1ba)](_0x536127))==null?void 0x0:_0x1b8d2e['formulas'])??{});}[_0x15ff4a(0x112)](_0x1206a7){const _0x227c32=_0x15ff4a;let _0x1df6e9=this[_0x227c32(0x164)][_0x227c32(0x1ba)](_0x1206a7);return _0x1df6e9?_0x4fc8e1[_0x227c32(0x107)](_0x1df6e9):void 0x0;}[_0x15ff4a(0x131)](_0x5b8047,_0x1ed76a,_0x553b32){const _0x456b10=_0x15ff4a;return this[_0x456b10(0x19a)](_0x5b8047,{[_0x1ed76a]:_0x553b32});}[_0x15ff4a(0x193)](_0x96a0e3,_0x24777e){const _0xbc0f9f=_0x15ff4a;return this[_0xbc0f9f(0x1a1)][_0xbc0f9f(0x184)](_0x96a0e3)||!x(_0x24777e)?!0x1:(this['_resources']['set'](_0x96a0e3,{'formulas':_0x4fc8e1[_0xbc0f9f(0x107)](_0x24777e['formulas'])}),this[_0xbc0f9f(0x11d)][_0xbc0f9f(0x1b0)]({'unitId':_0x96a0e3}),!0x0);}[_0x15ff4a(0x19a)](_0x4be48b,_0x49440d){const _0x39e371=_0x15ff4a;if(this[_0x39e371(0x1a1)][_0x39e371(0x184)](_0x4be48b)||!Object[_0x39e371(0x16c)](_0x49440d)['length']||!x({'formulas':_0x49440d}))return!0x1;let _0x304468=this['_resources']['get'](_0x4be48b)??b(),_0x729f20=_0x4fc8e1['deepClone'](_0x304468);return Object[_0x39e371(0xd7)](_0x729f20[_0x39e371(0x106)],_0x4fc8e1[_0x39e371(0x107)](_0x49440d)),this[_0x39e371(0x164)][_0x39e371(0x11a)](_0x4be48b,_0x729f20),this['_change$'][_0x39e371(0x1b0)]({'unitId':_0x4be48b,'rangeIds':Object['keys'](_0x49440d)}),!0x0;}[_0x15ff4a(0x141)](_0x357079,_0x1f8310){const _0x2503e0=_0x15ff4a;if(this['_loadErrors'][_0x2503e0(0x184)](_0x357079))return!0x1;let _0x51c508=this[_0x2503e0(0x164)][_0x2503e0(0x1ba)](_0x357079);if(!(_0x51c508!=null&&_0x51c508[_0x2503e0(0x106)][_0x1f8310]))return!0x1;let _0x3434d=_0x4fc8e1[_0x2503e0(0x107)](_0x51c508);return delete _0x3434d[_0x2503e0(0x106)][_0x1f8310],this[_0x2503e0(0x164)][_0x2503e0(0x11a)](_0x357079,_0x3434d),this['_change$'][_0x2503e0(0x1b0)]({'unitId':_0x357079,'rangeIds':[_0x1f8310]}),!0x0;}[_0x15ff4a(0x11e)](_0x5dfa3e,_0x4c474d){const _0x3f4903=_0x15ff4a;return x(_0x4c474d)?(this[_0x3f4903(0x164)]['set'](_0x5dfa3e,{'formulas':_0x4fc8e1['deepClone'](_0x4c474d[_0x3f4903(0x106)])}),this[_0x3f4903(0x175)]['delete'](_0x5dfa3e),this[_0x3f4903(0x1a1)][_0x3f4903(0x18a)](_0x5dfa3e),this[_0x3f4903(0x11d)][_0x3f4903(0x1b0)]({'unitId':_0x5dfa3e}),!0x0):(this['_preserveInvalid'](_0x5dfa3e,_0x4c474d,_0x3f4903(0x1ad)),!0x1);}['serialize'](_0x590939){const _0x4253f5=_0x15ff4a;let _0x33ec27=this[_0x4253f5(0x164)][_0x4253f5(0x1ba)](_0x590939);return _0x33ec27?_0x4fc8e1['deepClone'](_0x33ec27):this[_0x4253f5(0x175)][_0x4253f5(0x184)](_0x590939)?_0x4fc8e1['deepClone'](this[_0x4253f5(0x175)][_0x4253f5(0x1ba)](_0x590939)):b();}[_0x15ff4a(0x117)](_0xdf9640){const _0x59c70e=_0x15ff4a;return this['_loadErrors'][_0x59c70e(0x1ba)](_0xdf9640);}[_0x15ff4a(0x124)](_0x5287c3){const _0x3ab74a=_0x15ff4a;this[_0x3ab74a(0x164)][_0x3ab74a(0x18a)](_0x5287c3),this[_0x3ab74a(0x175)][_0x3ab74a(0x18a)](_0x5287c3),this['_loadErrors'][_0x3ab74a(0x18a)](_0x5287c3),this[_0x3ab74a(0x11d)][_0x3ab74a(0x1b0)]({'unitId':_0x5287c3});}[_0x15ff4a(0x19e)](){const _0x4eb8ea=_0x15ff4a;this['_resources'][_0x4eb8ea(0x147)](),this[_0x4eb8ea(0x175)][_0x4eb8ea(0x147)](),this[_0x4eb8ea(0x1a1)][_0x4eb8ea(0x147)](),this[_0x4eb8ea(0x11d)][_0x4eb8ea(0x11b)](),super['dispose']();}[_0x15ff4a(0x110)](_0x3e0dc1,_0x461fd8,_0x148fc2){const _0x3ec7f9=_0x15ff4a;this['_resources'][_0x3ec7f9(0x18a)](_0x3e0dc1),this[_0x3ec7f9(0x175)][_0x3ec7f9(0x11a)](_0x3e0dc1,_0x4fc8e1['deepClone'](_0x461fd8)),this[_0x3ec7f9(0x1a1)]['set'](_0x3e0dc1,_0x148fc2),this['_change$'][_0x3ec7f9(0x1b0)]({'unitId':_0x3e0dc1});}};let ot=function(_0x389712){const _0x17bedf=_0x15ff4a;return _0x389712['EMPTY']=_0x17bedf(0x190),_0x389712['PENDING']=_0x17bedf(0xec),_0x389712['SUCCESS']=_0x17bedf(0x13d),_0x389712[_0x17bedf(0x12b)]=_0x17bedf(0x178),_0x389712;}({});function M(_0x344246,_0x316996){return function(_0x4108ba,_0x4c3ec1){_0x316996(_0x4108ba,_0x4c3ec1,_0x344246);};}function N(_0x1eaf61,_0x43de90,_0x396c78,_0x3261f5){const _0x182fa5=_0x15ff4a;var _0x13df9b=arguments[_0x182fa5(0xcd)],_0x12e490=_0x13df9b<0x3?_0x43de90:_0x3261f5===null?_0x3261f5=Object[_0x182fa5(0xce)](_0x43de90,_0x396c78):_0x3261f5,_0x1422b7;if(typeof Reflect==_0x182fa5(0x1b3)&&typeof Reflect['decorate']=='function')_0x12e490=Reflect[_0x182fa5(0x119)](_0x1eaf61,_0x43de90,_0x396c78,_0x3261f5);else{for(var _0x19f765=_0x1eaf61[_0x182fa5(0xcd)]-0x1;_0x19f765>=0x0;_0x19f765--)(_0x1422b7=_0x1eaf61[_0x19f765])&&(_0x12e490=(_0x13df9b<0x3?_0x1422b7(_0x12e490):_0x13df9b>0x3?_0x1422b7(_0x43de90,_0x396c78,_0x12e490):_0x1422b7(_0x43de90,_0x396c78))||_0x12e490);}return _0x13df9b>0x3&&_0x12e490&&Object[_0x182fa5(0xfe)](_0x43de90,_0x396c78,_0x12e490),_0x12e490;}let P=class extends _0x284207{constructor(_0x4a0044,_0x48f98d,_0xc8bb3a){const _0x5f39d2=_0x15ff4a;super(),this['_model']=_0x4a0044,this['_registrationService']=_0x48f98d,this[_0x5f39d2(0x102)]=_0xc8bb3a,A(this,_0x5f39d2(0x118),new Map()),A(this,_0x5f39d2(0x19b),new Map()),A(this,_0x5f39d2(0x149),new _0xb8a1ef()),A(this,_0x5f39d2(0x16e),this[_0x5f39d2(0x149)][_0x5f39d2(0x1bb)]()),this[_0x5f39d2(0x1b5)](this[_0x5f39d2(0x143)][_0x5f39d2(0x174)][_0x5f39d2(0x132)](_0x168693=>{const _0x76d416=_0x5f39d2;for(let _0x133dab of Object[_0x76d416(0x114)](_0x168693))for(let _0x440e24 of Object[_0x76d416(0x114)](_0x133dab))_0x440e24['forEach'](_0x1dafd3=>this['_updateFormulaResult'](_0x1dafd3));}));}[_0x15ff4a(0x176)](_0x23247f){const _0x31ac9b=_0x15ff4a;var _0x36690c;let _0x35dfc1=_0x23247f[_0x31ac9b(0x14d)](),_0x23de99=((_0x36690c=_0x23247f[_0x31ac9b(0xf9)]()['body'])==null||(_0x36690c=_0x36690c[_0x31ac9b(0x101)])==null?void 0x0:_0x36690c[_0x31ac9b(0xfd)](w))??[],_0xbe8b5d=this[_0x31ac9b(0x194)][_0x31ac9b(0x183)](_0x35dfc1),_0x4489bc=new Set();for(let _0x26f29b of _0x23de99){let _0x32e902=_0xbe8b5d[_0x26f29b[_0x31ac9b(0x142)]];_0x32e902&&(_0x4489bc[_0x31ac9b(0x10a)](F(_0x35dfc1,_0x26f29b[_0x31ac9b(0x142)])),this[_0x31ac9b(0xd2)]({'unitId':_0x35dfc1,'rangeId':_0x26f29b['rangeId']},_0x32e902));}for(let _0x46acb1 of Array['from'](this[_0x31ac9b(0x118)][_0x31ac9b(0x114)]()))_0x46acb1[_0x31ac9b(0x12e)]===_0x35dfc1&&!_0x4489bc[_0x31ac9b(0x184)](F(_0x46acb1[_0x31ac9b(0x12e)],_0x46acb1[_0x31ac9b(0x142)]))&&this[_0x31ac9b(0x113)](_0x46acb1);}[_0x15ff4a(0xd2)](_0xbd96b9,_0x34e39b){const _0x24cdb=_0x15ff4a;let _0x54ca3b=F(_0xbd96b9[_0x24cdb(0x12e)],_0xbd96b9['rangeId']),_0x5948b5=this['_registrations'][_0x24cdb(0x1ba)](_0x54ca3b),_0x43c8d2=this[_0x24cdb(0x102)]['getRevision'](_0xbd96b9[_0x24cdb(0x12e)]);if(_0x5948b5&&_0x5948b5[_0x24cdb(0x1ab)]['formula']===_0x34e39b[_0x24cdb(0x1c2)]&&_0x5948b5[_0x24cdb(0xe7)]===_0x43c8d2){_0x5948b5[_0x24cdb(0x1ab)]=_0x34e39b;let _0x223895=_0x5948b5['formulaId']?this[_0x24cdb(0x143)]['getFormulaValueSync'](_0x5948b5['unitId'],_0x5948b5['unitId'],_0x5948b5[_0x24cdb(0x1c1)])??void 0x0:void 0x0;_0x5948b5[_0x24cdb(0x146)]=_0x223895,this[_0x24cdb(0x162)](_0x54ca3b,st(_0x34e39b,_0x223895));return;}_0x5948b5!=null&&_0x5948b5[_0x24cdb(0x1c1)]&&this['_deleteRegistration'](_0x5948b5);let _0x2d5051={..._0xbd96b9,'config':_0x34e39b,'referenceRevision':_0x43c8d2,'presentation':st(_0x34e39b,void 0x0)};if(this[_0x24cdb(0x118)][_0x24cdb(0x11a)](_0x54ca3b,_0x2d5051),!_0x34e39b[_0x24cdb(0x1c2)]['trim']())return;let _0x51629e=this[_0x24cdb(0x143)]['registerFormulaWithRange'](_0xbd96b9['unitId'],_0xbd96b9[_0x24cdb(0x12e)],_0x34e39b['formula'],void 0x0,{'rangeId':_0xbd96b9[_0x24cdb(0x142)]},_0x13c14f['DOC'],_0xbd96b9['rangeId']);_0x2d5051[_0x24cdb(0x1c1)]=_0x51629e,this[_0x24cdb(0x19b)]['set'](_0x51629e,_0x54ca3b);}[_0x15ff4a(0x113)](_0x16dd0b){const _0x494efb=_0x15ff4a;let _0x5329da=F(_0x16dd0b[_0x494efb(0x12e)],_0x16dd0b[_0x494efb(0x142)]),_0x5610b2=this['_registrations'][_0x494efb(0x1ba)](_0x5329da);_0x5610b2&&(this[_0x494efb(0x109)](_0x5610b2),this[_0x494efb(0x118)][_0x494efb(0x18a)](_0x5329da));}['unregisterUnit'](_0x31567b){const _0x25bbcb=_0x15ff4a;for(let _0x3d23b3 of Array[_0x25bbcb(0x161)](this[_0x25bbcb(0x118)][_0x25bbcb(0x114)]()))_0x3d23b3['unitId']===_0x31567b&&this['unregister'](_0x3d23b3);}[_0x15ff4a(0x137)](_0x4455a8){const _0x5258dd=_0x15ff4a;var _0x22c15a;return(_0x22c15a=this['_registrations'][_0x5258dd(0x1ba)](F(_0x4455a8[_0x5258dd(0x12e)],_0x4455a8[_0x5258dd(0x142)])))==null?void 0x0:_0x22c15a[_0x5258dd(0x195)];}['getResult'](_0x264039){const _0x2ce168=_0x15ff4a;let _0x282471=this['_registrations'][_0x2ce168(0x1ba)](F(_0x264039[_0x2ce168(0x12e)],_0x264039['rangeId']));return _0x282471?I(_0x282471):void 0x0;}[_0x15ff4a(0x15d)](){const _0x3d07d1=_0x15ff4a;return Array[_0x3d07d1(0x161)](this['_registrations']['values'](),_0x4e6745=>({'identity':{'unitId':_0x4e6745[_0x3d07d1(0x12e)],'rangeId':_0x4e6745[_0x3d07d1(0x142)]},'config':_0x4e6745[_0x3d07d1(0x1ab)],'referenceRevision':_0x4e6745[_0x3d07d1(0xe7)],..._0x4e6745[_0x3d07d1(0x146)]?{'liveResult':_0x4e6745[_0x3d07d1(0x146)]}:null}));}['dispose'](){const _0x2c0afd=_0x15ff4a;for(let _0x5b42b3 of this[_0x2c0afd(0x118)][_0x2c0afd(0x114)]())this[_0x2c0afd(0x109)](_0x5b42b3);this[_0x2c0afd(0x118)][_0x2c0afd(0x147)](),this['_formulaKeys']['clear'](),this[_0x2c0afd(0x149)][_0x2c0afd(0x11b)](),super[_0x2c0afd(0x19e)]();}[_0x15ff4a(0x181)](_0x511d43){const _0x137f0a=_0x15ff4a;let _0x3672da=this[_0x137f0a(0x19b)][_0x137f0a(0x1ba)](_0x511d43[_0x137f0a(0x1c1)]),_0x220ca8=_0x3672da?this['_registrations'][_0x137f0a(0x1ba)](_0x3672da):void 0x0;_0x3672da&&_0x220ca8&&(_0x220ca8[_0x137f0a(0x146)]=_0x511d43,this[_0x137f0a(0x162)](_0x3672da,st(_0x220ca8[_0x137f0a(0x1ab)],_0x511d43)));}[_0x15ff4a(0x162)](_0xdb45c8,_0x2df0d1){const _0x4ee555=_0x15ff4a;var _0xd97d0,_0x4a8174;let _0x12e0be=this[_0x4ee555(0x118)][_0x4ee555(0x1ba)](_0xdb45c8);if(!_0x12e0be||ct(_0x12e0be[_0x4ee555(0x195)],_0x2df0d1))return;let _0x4a8c1d=_0x12e0be['presentation'],_0x1d0642=I(_0x12e0be);_0x12e0be[_0x4ee555(0x195)]=_0x2df0d1,this[_0x4ee555(0x149)]['next']({'unitId':_0x12e0be[_0x4ee555(0x12e)],'rangeId':_0x12e0be['rangeId'],'presentation':_0x2df0d1,'previousPresentation':_0x4a8c1d,'result':I(_0x12e0be),'previousResult':{..._0x1d0642,..._0x4a8c1d,'value':(_0xd97d0=_0x4a8c1d['cell'])==null?void 0x0:_0xd97d0['v'],'valueType':((_0x4a8174=_0x4a8c1d[_0x4ee555(0x13b)])==null?void 0x0:_0x4a8174['t'])??void 0x0}});}['_deleteRegistration'](_0x5eda82){const _0x13e9e4=_0x15ff4a;_0x5eda82[_0x13e9e4(0x1c1)]&&(this[_0x13e9e4(0x143)][_0x13e9e4(0x197)](_0x5eda82[_0x13e9e4(0x12e)],_0x5eda82[_0x13e9e4(0x12e)],[_0x5eda82['formulaId']]),this['_formulaKeys'][_0x13e9e4(0x18a)](_0x5eda82[_0x13e9e4(0x1c1)]));}};P=N([M(0x0,_0x36a610(j)),M(0x1,_0x36a610(_0x540fe4)),M(0x2,_0x36a610(_0xc15eb3))],P);function F(_0x5d87bf,_0x26a51a){return _0x5d87bf+'\x00'+_0x26a51a;}function st(_0x31b5a2,_0x4831cf){const _0x237e5e=_0x15ff4a;return _0x4c2bd5({'numberFormat':_0x31b5a2[_0x237e5e(0x17d)],'lastValue':_0x31b5a2[_0x237e5e(0xeb)],'result':_0x4831cf});}function I(_0x764166){const _0x5b2a56=_0x15ff4a;var _0x2a6c92,_0x36d095,_0x52d7bd;let _0x5c1f88=_0x764166[_0x5b2a56(0x195)],_0x523ebc=_0x764166['config']['formula'][_0x5b2a56(0x12d)]()?_0x5c1f88[_0x5b2a56(0x1a4)]||_0x5c1f88[_0x5b2a56(0x13b)]==null?_0x5b2a56(0xec):((_0x2a6c92=_0x764166[_0x5b2a56(0x146)])==null?void 0x0:_0x2a6c92[_0x5b2a56(0xee)])===_0x462723[_0x5b2a56(0x12b)]?_0x5b2a56(0x178):'success':_0x5b2a56(0x190);return{..._0x5c1f88,'status':_0x523ebc,'value':(_0x36d095=_0x5c1f88[_0x5b2a56(0x13b)])==null?void 0x0:_0x36d095['v'],'valueType':((_0x52d7bd=_0x5c1f88[_0x5b2a56(0x13b)])==null?void 0x0:_0x52d7bd['t'])??void 0x0};}function ct(_0x59b94c,_0x33df5f){const _0x520ed6=_0x15ff4a;var _0x29bd85,_0x152734,_0x56ae02,_0x3c4f14;return _0x59b94c[_0x520ed6(0xe6)]===_0x33df5f[_0x520ed6(0xe6)]&&_0x59b94c[_0x520ed6(0x1bd)]===_0x33df5f[_0x520ed6(0x1bd)]&&_0x59b94c[_0x520ed6(0x167)]===_0x33df5f[_0x520ed6(0x167)]&&_0x59b94c[_0x520ed6(0x134)]===_0x33df5f[_0x520ed6(0x134)]&&_0x59b94c[_0x520ed6(0x1a4)]===_0x33df5f[_0x520ed6(0x1a4)]&&((_0x29bd85=_0x59b94c[_0x520ed6(0x13b)])==null?void 0x0:_0x29bd85['t'])===((_0x152734=_0x33df5f[_0x520ed6(0x13b)])==null?void 0x0:_0x152734['t'])&&Object['is']((_0x56ae02=_0x59b94c[_0x520ed6(0x13b)])==null?void 0x0:_0x56ae02['v'],(_0x3c4f14=_0x33df5f['cell'])==null?void 0x0:_0x3c4f14['v']);}const lt={'id':'docs-formula.mutation.set-formula','type':_0x6c9543[_0x15ff4a(0x185)],'handler':(_0x4499da,_0x267dbe)=>!(_0x267dbe!=null&&_0x267dbe['unitId'])||!_0x267dbe[_0x15ff4a(0x142)]||!_0x267dbe['config']?!0x1:_0x4499da[_0x15ff4a(0x1ba)](j)[_0x15ff4a(0x131)](_0x267dbe[_0x15ff4a(0x12e)],_0x267dbe[_0x15ff4a(0x142)],_0x267dbe[_0x15ff4a(0x1ab)])},ut={'id':'docs-formula.mutation.remove-formula','type':_0x6c9543[_0x15ff4a(0x185)],'handler':(_0x143344,_0x1ca35c)=>!(_0x1ca35c!=null&&_0x1ca35c[_0x15ff4a(0x12e)])||!_0x1ca35c[_0x15ff4a(0x142)]?!0x1:_0x143344[_0x15ff4a(0x1ba)](j)[_0x15ff4a(0x141)](_0x1ca35c[_0x15ff4a(0x12e)],_0x1ca35c[_0x15ff4a(0x142)])},L={'id':_0x15ff4a(0x180),'type':_0x6c9543[_0x15ff4a(0x185)],'handler':(_0x2b9f5d,_0x30f5ed)=>!(_0x30f5ed!=null&&_0x30f5ed['unitId'])||!_0x30f5ed[_0x15ff4a(0x115)]?!0x1:_0x2b9f5d[_0x15ff4a(0x1ba)](j)[_0x15ff4a(0x193)](_0x30f5ed['unitId'],_0x30f5ed[_0x15ff4a(0x115)])},R={'id':_0x15ff4a(0xf8),'type':_0x6c9543['MUTATION'],'handler':(_0x1a7877,_0x1cf0d1)=>{const _0x1d643c=_0x15ff4a;if(!(_0x1cf0d1!=null&&_0x1cf0d1[_0x1d643c(0x12e)])||!_0x1cf0d1[_0x1d643c(0x158)][_0x1d643c(0xcd)])return!0x1;let _0x25d06f=_0x1a7877['get'](j),_0x257a61=_0x1a7877[_0x1d643c(0x1ba)](_0xc15eb3),_0x1afa65=_0x25d06f[_0x1d643c(0x112)](_0x1cf0d1[_0x1d643c(0x12e)]);if(!_0x1afa65)return!0x1;let _0x452539=_0x4fc8e1['deepClone'](_0x1afa65),_0xff299f=!0x1;for(let _0x854e1e of _0x1cf0d1[_0x1d643c(0x158)]){var _0x50e84b,_0x1bebff,_0x10d833,_0x360c30;let _0x338679=_0x452539[_0x1d643c(0x106)][_0x854e1e[_0x1d643c(0x142)]];_0x338679&&_0x338679['formula']===_0x854e1e['expectedFormula']&&((_0x50e84b=_0x338679[_0x1d643c(0x17d)])==null?void 0x0:_0x50e84b[_0x1d643c(0x167)])===_0x854e1e[_0x1d643c(0x150)]&&_0x257a61[_0x1d643c(0x15b)](_0x1cf0d1['unitId'])===_0x854e1e[_0x1d643c(0x17e)]&&(((_0x1bebff=_0x338679[_0x1d643c(0xeb)])==null?void 0x0:_0x1bebff['v'])!==_0x854e1e[_0x1d643c(0xeb)]['v']||((_0x10d833=_0x338679[_0x1d643c(0xeb)])==null?void 0x0:_0x10d833['t'])!==_0x854e1e[_0x1d643c(0xeb)]['t']||((_0x360c30=_0x338679[_0x1d643c(0xeb)])==null?void 0x0:_0x360c30['pattern'])!==_0x854e1e['lastValue'][_0x1d643c(0x167)])&&(_0x338679[_0x1d643c(0xeb)]=_0x4fc8e1[_0x1d643c(0x107)](_0x854e1e[_0x1d643c(0xeb)]),_0xff299f=!0x0);}return!_0xff299f||_0x25d06f['setResource'](_0x1cf0d1[_0x1d643c(0x12e)],_0x452539);}},z={'id':_0x15ff4a(0xd3),'type':_0x6c9543[_0x15ff4a(0x13f)],'handler':(_0x57ccc3,_0x173b6e)=>{const _0x115b2c=_0x15ff4a;if(!(_0x173b6e!=null&&_0x173b6e['formula'][_0x115b2c(0x12d)]()))return!0x1;let _0x3fe1a7=K(_0x57ccc3,_0x173b6e[_0x115b2c(0x12e)],'');if(!_0x3fe1a7)return!0x1;let _0x5dcdc5=ft(_0x173b6e['target'],_0x3fe1a7[_0x115b2c(0x135)],dt(_0x57ccc3,_0x3fe1a7[_0x115b2c(0x12e)]));if(!_0x5dcdc5)return!0x1;let _0x4e4132=pt(_0x57ccc3,_0x3fe1a7[_0x115b2c(0x12e)],_0x173b6e[_0x115b2c(0x1c2)],_0x173b6e[_0x115b2c(0x1ac)]??[]);if(!_0x4e4132)return!0x1;let _0x5f8f74=mt(_0x3fe1a7[_0x115b2c(0x135)],_0x3fe1a7[_0x115b2c(0x126)],_0x3fe1a7[_0x115b2c(0x12e)]),_0x1e7a30=ht({'documentData':_0x3fe1a7['documentData'],'resource':_0x3fe1a7[_0x115b2c(0x115)],'rangeId':_0x5f8f74,'config':{'formula':_0x173b6e[_0x115b2c(0x1c2)],..._0x173b6e['numberFormat']?{'numberFormat':_0x173b6e[_0x115b2c(0x17d)]}:null},'startOffset':_0x5dcdc5['startOffset'],'endOffset':_0x5dcdc5[_0x115b2c(0x11c)]});if(!_0x1e7a30)return!0x1;let _0x5808d4=_0x51ba85(_0x57ccc3,_0x3fe1a7[_0x115b2c(0x12e)],_0x4e4132);return!_0x5808d4||!q({'accessor':_0x57ccc3,'document':_0x3fe1a7[_0x115b2c(0xdf)],'unitId':_0x3fe1a7[_0x115b2c(0x12e)],'trigger':z['id'],'rangeId':_0x5f8f74,'previousResource':_0x3fe1a7[_0x115b2c(0x115)],'nextResource':_0x1e7a30[_0x115b2c(0xe3)],'previousDocumentData':_0x3fe1a7[_0x115b2c(0xe4)],'nextDocumentData':_0x1e7a30[_0x115b2c(0xfa)],'cursorOffset':_0x1e7a30[_0x115b2c(0x154)],'externalMutations':_0x5808d4})?!0x1:{'rangeId':_0x5f8f74,'startOffset':_0x1e7a30[_0x115b2c(0x154)]-0x1,'endOffset':_0x1e7a30[_0x115b2c(0x154)]};}},B={'id':_0x15ff4a(0x1a6),'type':_0x6c9543[_0x15ff4a(0x13f)],'handler':(_0x254f2c,_0x3094fc)=>{const _0x38cdf9=_0x15ff4a;if(!(_0x3094fc!=null&&_0x3094fc[_0x38cdf9(0x142)])||!_0x3094fc['formula'][_0x38cdf9(0x12d)]())return!0x1;let _0x946f76=K(_0x254f2c,_0x3094fc['unitId'],''),_0x18d419=_0x946f76==null?void 0x0:_0x946f76['model'][_0x38cdf9(0xdd)](_0x946f76[_0x38cdf9(0x12e)],_0x3094fc[_0x38cdf9(0x142)]),_0x1e8dc1=_0x946f76?T(_0x946f76[_0x38cdf9(0xe4)][_0x38cdf9(0x135)],_0x3094fc[_0x38cdf9(0x142)]):void 0x0;if(!_0x946f76||!_0x18d419||!_0x1e8dc1)return!0x1;let _0x160756=pt(_0x254f2c,_0x946f76[_0x38cdf9(0x12e)],_0x3094fc['formula'],_0x3094fc['externalReferences']??[]);if(!_0x160756)return!0x1;let _0x3dd232=_0x51ba85(_0x254f2c,_0x946f76['unitId'],_0x160756);if(!_0x3dd232)return!0x1;let _0x2943d9=St(_0x946f76[_0x38cdf9(0x115)]);return _0x2943d9[_0x38cdf9(0x106)][_0x3094fc[_0x38cdf9(0x142)]]={'formula':_0x3094fc['formula'],..._0x3094fc[_0x38cdf9(0x17d)]?{'numberFormat':_0x3094fc[_0x38cdf9(0x17d)]}:_0x18d419[_0x38cdf9(0x17d)]?{'numberFormat':_0x18d419['numberFormat']}:null},q({'accessor':_0x254f2c,'document':_0x946f76[_0x38cdf9(0xdf)],'unitId':_0x946f76[_0x38cdf9(0x12e)],'trigger':B['id'],'rangeId':_0x3094fc[_0x38cdf9(0x142)],'previousResource':_0x946f76[_0x38cdf9(0x115)],'nextResource':_0x2943d9,'cursorOffset':_0x1e8dc1[_0x38cdf9(0xdc)]+0x1,'externalMutations':_0x3dd232});}},V={'id':_0x15ff4a(0x188),'type':_0x6c9543['COMMAND'],'handler':(_0x14d8c2,_0x2c9aae)=>{const _0x452f56=_0x15ff4a;if(!(_0x2c9aae!=null&&_0x2c9aae[_0x452f56(0x142)]))return!0x1;let _0xf8a69c=K(_0x14d8c2,_0x2c9aae[_0x452f56(0x12e)],''),_0x339da6=_0xf8a69c==null?void 0x0:_0xf8a69c['model'][_0x452f56(0xdd)](_0xf8a69c[_0x452f56(0x12e)],_0x2c9aae[_0x452f56(0x142)]),_0x18fe79=_0xf8a69c?T(_0xf8a69c[_0x452f56(0xe4)][_0x452f56(0x135)],_0x2c9aae[_0x452f56(0x142)]):void 0x0;if(!_0xf8a69c||!_0x339da6||!_0x18fe79)return!0x1;let _0x264e9e=St(_0xf8a69c['resource']);return _0x264e9e[_0x452f56(0x106)][_0x2c9aae[_0x452f56(0x142)]]={..._0x339da6,..._0x2c9aae[_0x452f56(0x17d)]?{'numberFormat':_0x2c9aae[_0x452f56(0x17d)]}:null},_0x2c9aae[_0x452f56(0x17d)]||delete _0x264e9e['formulas'][_0x2c9aae['rangeId']][_0x452f56(0x17d)],q({'accessor':_0x14d8c2,'document':_0xf8a69c[_0x452f56(0xdf)],'unitId':_0xf8a69c[_0x452f56(0x12e)],'trigger':V['id'],'rangeId':_0x2c9aae['rangeId'],'previousResource':_0xf8a69c[_0x452f56(0x115)],'nextResource':_0x264e9e,'cursorOffset':_0x18fe79[_0x452f56(0xdc)]+0x1,'externalMutations':{}});}},H={'id':_0x15ff4a(0x169),'type':_0x6c9543[_0x15ff4a(0x13f)],'handler':(_0xb41c57,_0x3335e3)=>G(_0xb41c57,_0x3335e3,'',H['id'])},U={'id':_0x15ff4a(0x105),'type':_0x6c9543[_0x15ff4a(0x13f)],'handler':(_0x53275d,_0x983e62)=>G(_0x53275d,_0x983e62,(_0x983e62==null?void 0x0:_0x983e62[_0x15ff4a(0xe6)])??'',U['id'])},W={'id':_0x15ff4a(0x12f),'type':_0x6c9543['COMMAND'],'handler':(_0x5b8df1,_0x14d70c)=>{const _0x3d7577=_0x15ff4a;if(!(_0x14d70c!=null&&_0x14d70c['rangeId']))return!0x1;let _0x476128=K(_0x5b8df1,_0x14d70c['unitId'],'');if(!_0x476128)return!0x1;let _0x5e6219=_0x5b8df1[_0x3d7577(0x1ba)](P)[_0x3d7577(0x199)]({'unitId':_0x476128['unitId'],'rangeId':_0x14d70c[_0x3d7577(0x142)]});return _0x5e6219?G(_0x5b8df1,_0x14d70c,_0x5e6219[_0x3d7577(0xe6)],W['id']):!0x1;}};function G(_0x58b13f,_0x24fee8,_0x431c50,_0x417425){const _0x23b948=_0x15ff4a;if(!(_0x24fee8!=null&&_0x24fee8[_0x23b948(0x142)]))return!0x1;let _0x57c51e=K(_0x58b13f,_0x24fee8[_0x23b948(0x12e)],'');if(!_0x57c51e)return!0x1;let _0x43c57f=ze({'documentData':_0x57c51e['documentData'],'resource':_0x57c51e[_0x23b948(0x115)],'rangeId':_0x24fee8[_0x23b948(0x142)],'text':_0x431c50});return _0x43c57f?q({'accessor':_0x58b13f,'document':_0x57c51e[_0x23b948(0xdf)],'unitId':_0x57c51e[_0x23b948(0x12e)],'trigger':_0x417425,'rangeId':_0x24fee8[_0x23b948(0x142)],'previousResource':_0x57c51e[_0x23b948(0x115)],'nextResource':_0x43c57f[_0x23b948(0xe3)],'previousDocumentData':_0x57c51e[_0x23b948(0xe4)],'nextDocumentData':_0x43c57f[_0x23b948(0xfa)],'cursorOffset':_0x43c57f['cursorOffset'],'externalMutations':{}}):!0x1;}function K(_0x5e5727,_0x41d431,_0x5140a5){const _0x571b07=_0x15ff4a;if(_0x5140a5)return null;let _0x4e5a59=_0x5e5727[_0x571b07(0x1ba)](_0x48b9a6),_0x1bec40=(_0x41d431?_0x4e5a59[_0x571b07(0x196)](_0x41d431,_0x1d8d65[_0x571b07(0x14b)]):_0x4e5a59[_0x571b07(0x130)](_0x1d8d65[_0x571b07(0x14b)]))??null;if(!_0x1bec40)return null;let _0x3a2ecb=_0x1bec40[_0x571b07(0xf9)](),_0x341634=_0x3a2ecb['body'];if(_0x3a2ecb[_0x571b07(0xed)]||!_0x341634)return null;let _0x5ac678=_0x5e5727[_0x571b07(0x1ba)](j);return _0x5ac678['getLoadError'](_0x1bec40[_0x571b07(0x14d)]())?null:{'document':_0x1bec40,'body':_0x341634,'documentData':_0x3a2ecb,'model':_0x5ac678,'resource':_0x5ac678[_0x571b07(0x112)](_0x1bec40[_0x571b07(0x14d)]())??b(),'unitId':_0x1bec40[_0x571b07(0x14d)]()};}function dt(_0x30119e,_0x4c58a6){var _0x1837e4;return(_0x1837e4=_0x30119e['get'](_0x1ba5ec)['getTextRanges']({'subUnitId':_0x4c58a6,'unitId':_0x4c58a6}))==null?void 0x0:_0x1837e4[0x0];}function ft(_0x5c4935,_0x4f4729,_0x2c5e24){const _0x466528=_0x15ff4a;if((_0x5c4935==null?void 0x0:_0x5c4935[_0x466528(0x123)])===_0x466528(0x165)){var _0x10b7eb;let _0x32ceb8=((_0x10b7eb=_0x4f4729[_0x466528(0x160)])==null?void 0x0:_0x10b7eb[_0x466528(0xfd)](_0x24b5b2=>_0x24b5b2['paragraphId']===_0x5c4935[_0x466528(0x1a3)]))??[];if(_0x32ceb8[_0x466528(0xcd)]!==0x1)return null;let _0x22cfc4=_0x32ceb8[0x0],_0x1bbbf8=_0x3f5de0(_0x4f4729,_0x22cfc4),_0x32492c=_0x22cfc4[_0x466528(0x14c)]-_0x1bbbf8,_0x4de687=_0x5c4935[_0x466528(0x16f)]==='end'?_0x32492c:_0x5c4935[_0x466528(0x16f)];if(!Number['isInteger'](_0x4de687)||_0x4de687<0x0||_0x4de687>_0x32492c)return null;let _0x3fca58=_0x1bbbf8+_0x4de687;return{'startOffset':_0x3fca58,'endOffset':_0x3fca58};}if((_0x5c4935==null?void 0x0:_0x5c4935[_0x466528(0x123)])===_0x466528(0x1b7))return!Number['isInteger'](_0x5c4935[_0x466528(0x171)])||!Number[_0x466528(0x1a9)](_0x5c4935[_0x466528(0x11c)])?null:{'startOffset':Math[_0x466528(0xd4)](_0x5c4935[_0x466528(0x171)],_0x5c4935[_0x466528(0x11c)]),'endOffset':Math[_0x466528(0x129)](_0x5c4935[_0x466528(0x171)],_0x5c4935['endOffset'])};let _0x408f9f=(_0x5c4935==null?void 0x0:_0x5c4935[_0x466528(0x123)])==='selection'?_0x5c4935[_0x466528(0x1aa)]:_0x2c5e24;return!_0x408f9f||_0x408f9f[_0x466528(0x189)]?null:{'startOffset':Math[_0x466528(0xd4)](_0x408f9f['startOffset'],_0x408f9f[_0x466528(0x11c)]),'endOffset':Math[_0x466528(0x129)](_0x408f9f['startOffset'],_0x408f9f[_0x466528(0x11c)])};}function pt(_0x47b19f,_0x269281,_0x2d62f6,_0x1ff615){const _0x2bb949=_0x15ff4a;let _0xab04b=_0x47b19f[_0x2bb949(0x1ba)](_0x5707ab),_0x5d4e39=_0x2d62f6['startsWith']('=')?_0x2d62f6[_0x2bb949(0x116)](0x1):_0x2d62f6,_0x255bdd=_0xab04b[_0x2bb949(0x1b6)](_0x5d4e39);if(!_0x255bdd)return null;let _0x2ccdcd=_0x47b19f[_0x2bb949(0x1ba)](_0xc15eb3),_0x2cc9f2=_0x197c79({'qualifiers':_0x184125(_0x255bdd),'explicitReferences':_0x1ff615??[],'resolveBinding':_0x5f230e=>_0x2ccdcd[_0x2bb949(0x1b8)](_0x269281,_0x5f230e)});return _0x2cc9f2[_0x2bb949(0xee)]===_0x2bb949(0x17c)?_0x2cc9f2['references']:null;}function mt(_0x150197,_0x569b5e,_0x1e1a12){const _0x59ced0=_0x15ff4a;var _0x4a7ab3;let _0x2b57d6=_0x52ed00(0x6);for(;_0x150197!=null&&(_0x4a7ab3=_0x150197[_0x59ced0(0x101)])!=null&&_0x4a7ab3[_0x59ced0(0x153)](_0x406927=>_0x406927[_0x59ced0(0x142)]===_0x2b57d6)||_0x569b5e[_0x59ced0(0xdd)](_0x1e1a12,_0x2b57d6);)_0x2b57d6=_0x52ed00(0x6);return _0x2b57d6;}function ht(_0x5abf35){try{return Le(_0x5abf35);}catch(_0x442a06){if(_0x442a06 instanceof C)return null;throw _0x442a06;}}function gt(_0xe9a5ef){const _0x53e3cd=_0x15ff4a;let _0x12a2ee=_0xe9a5ef['previousDocumentData']&&_0xe9a5ef[_0x53e3cd(0xfa)]?vt(_0xe9a5ef['document'],_0xe9a5ef[_0x53e3cd(0x12e)],_0xe9a5ef[_0x53e3cd(0xf7)],_0xe9a5ef[_0x53e3cd(0xfa)],_0xe9a5ef[_0x53e3cd(0x154)],_0xe9a5ef[_0x53e3cd(0x1c6)]):null;return _0xe9a5ef['previousDocumentData']&&_0xe9a5ef[_0x53e3cd(0xfa)]&&!_0x12a2ee?null:{'documentRedo':_0x12a2ee,'resourceRedo':{'id':L['id'],'params':{'unitId':_0xe9a5ef[_0x53e3cd(0x12e)],'resource':_0xe9a5ef[_0x53e3cd(0xe3)]}},'resourceUndo':{'id':L['id'],'params':{'unitId':_0xe9a5ef['unitId'],'resource':_0xe9a5ef[_0x53e3cd(0x16d)]}}};}function _t(_0x546f17,_0x1612e3,_0x3f7c61,_0x570fdd){const _0x1ebc1d=_0x15ff4a;_0x570fdd[_0x1ebc1d(0x159)]({'id':_0x546f17[_0x1ebc1d(0x1c6)]+':'+_0x546f17[_0x1ebc1d(0x142)],'unitID':_0x546f17['unitId'],'redoMutations':[..._0x546f17['externalMutations'][_0x1ebc1d(0x136)]?[_0x546f17[_0x1ebc1d(0x192)][_0x1ebc1d(0x136)]]:[],..._0x1612e3['documentRedo']?[_0x1612e3[_0x1ebc1d(0x12a)]]:[],_0x1612e3[_0x1ebc1d(0xd1)]],'undoMutations':[_0x1612e3[_0x1ebc1d(0xd9)],..._0x3f7c61?[_0x3f7c61]:[],..._0x546f17[_0x1ebc1d(0x192)][_0x1ebc1d(0x182)]?[_0x546f17[_0x1ebc1d(0x192)][_0x1ebc1d(0x182)]]:[]]});}function q(_0x2e7c83){const _0x260e95=_0x15ff4a;let _0x3ac47a=_0x2e7c83[_0x260e95(0x18f)]['get'](_0x55728f),_0x5171f7=_0x2e7c83['accessor'][_0x260e95(0x1ba)](_0x51122a),_0x5479e0=_0x2e7c83[_0x260e95(0x18f)][_0x260e95(0x1ba)](_0x1ba5ec),_0x54dc5f=gt(_0x2e7c83);if(!_0x54dc5f)return!0x1;let _0x1ff975=!0x1,_0x2a7b36=null,_0x4ee2d2=!0x1;try{if(_0x2e7c83['externalMutations']['redoMutation']){if(!_0x3ac47a[_0x260e95(0x1be)](_0x2e7c83['externalMutations']['redoMutation']['id'],_0x2e7c83[_0x260e95(0x192)]['redoMutation'][_0x260e95(0xd6)]))return!0x1;_0x1ff975=!0x0;}if(_0x54dc5f[_0x260e95(0x12a)]){let _0x36415b=_0x3ac47a[_0x260e95(0x1be)](_0x54dc5f[_0x260e95(0x12a)]['id'],_0x54dc5f['documentRedo'][_0x260e95(0xd6)]);if(!_0x36415b)return J(_0x3ac47a,_0x2e7c83[_0x260e95(0x192)],_0x1ff975),!0x1;_0x2a7b36={'id':_0x3731df['id'],'params':{..._0x36415b,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0x3ac47a[_0x260e95(0x1be)](_0x54dc5f[_0x260e95(0xd1)]['id'],_0x54dc5f['resourceRedo'][_0x260e95(0xd6)]))return yt(_0x3ac47a,_0x2a7b36),J(_0x3ac47a,_0x2e7c83['externalMutations'],_0x1ff975),!0x1;_0x4ee2d2=!0x0,_t(_0x2e7c83,_0x54dc5f,_0x2a7b36,_0x5171f7);}catch(_0x5c4861){throw _0x4ee2d2&&_0x3ac47a[_0x260e95(0x1be)](_0x54dc5f[_0x260e95(0xd9)]['id'],_0x54dc5f[_0x260e95(0xd9)][_0x260e95(0xd6)]),yt(_0x3ac47a,_0x2a7b36),J(_0x3ac47a,_0x2e7c83['externalMutations'],_0x1ff975),_0x5c4861;}return _0x5479e0[_0x260e95(0x17b)]([{'startOffset':_0x2e7c83[_0x260e95(0x154)],'endOffset':_0x2e7c83[_0x260e95(0x154)],'segmentId':''}],{'unitId':_0x2e7c83[_0x260e95(0x12e)],'subUnitId':_0x2e7c83[_0x260e95(0x12e)]},!0x1,{[_0x59dee6]:!0x0}),!0x0;}function vt(_0x45b003,_0x2136b2,_0xa027d4,_0x2cab71,_0x52c569,_0x48098f){let _0x450d89=bt(_0xa027d4,_0x2cab71,_0x31e082(_0x45b003,''));return _0x450d89?{'id':_0x3731df['id'],'params':{'unitId':_0x2136b2,'actions':_0x450d89,'segmentId':'','textRanges':[{'startOffset':_0x52c569,'endOffset':_0x52c569,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0x48098f}}:null;}function yt(_0x1ecb92,_0x50ff69){const _0x523d88=_0x15ff4a;_0x50ff69&&_0x1ecb92[_0x523d88(0x1be)](_0x50ff69['id'],_0x50ff69[_0x523d88(0xd6)]);}function J(_0x2b47bd,_0x386431,_0x3715a4){const _0x47d1df=_0x15ff4a;_0x3715a4&&_0x386431[_0x47d1df(0x182)]&&_0x2b47bd[_0x47d1df(0x1be)](_0x386431[_0x47d1df(0x182)]['id'],_0x386431[_0x47d1df(0x182)][_0x47d1df(0xd6)]);}function bt(_0x54457d,_0x30aeca,_0x5b3b2c){const _0x5c1f43=_0x15ff4a;let _0x13392d=_0x54457d['body'],_0x154d93=_0x30aeca[_0x5c1f43(0x135)],_0x336bda=xt(_0x13392d==null?void 0x0:_0x13392d[_0x5c1f43(0xcb)],_0x154d93==null?void 0x0:_0x154d93[_0x5c1f43(0xcb)]);if(!_0x336bda||!_0x154d93)return null;let _0x38e80d=new _0x54417a();return _0x38e80d[_0x5c1f43(0x139)](_0x336bda[_0x5c1f43(0x173)]),_0x336bda[_0x5c1f43(0xcf)]>0x0&&_0x38e80d[_0x5c1f43(0x19c)](_0x336bda[_0x5c1f43(0xcf)],_0x4f7aa5(_0x154d93,_0x336bda[_0x5c1f43(0x173)],_0x336bda['start']+_0x336bda[_0x5c1f43(0xcf)],!0x1)),_0x336bda[_0x5c1f43(0x111)]>0x0&&_0x38e80d[_0x5c1f43(0x18a)](_0x336bda[_0x5c1f43(0x111)]),_0x1d02d7['getInstance']()['editOp'](_0x38e80d[_0x5c1f43(0x172)](),_0x5b3b2c);}function xt(_0x4ec429,_0x443713){const _0x5a3aa3=_0x15ff4a;if(_0x4ec429==null||_0x443713==null||_0x4ec429===_0x443713)return null;let _0x3223a0=0x0;for(;_0x3223a0<_0x4ec429['length']&&_0x3223a0<_0x443713[_0x5a3aa3(0xcd)]&&_0x4ec429[_0x3223a0]===_0x443713[_0x3223a0];)_0x3223a0+=0x1;let _0x1fbe36=_0x4ec429[_0x5a3aa3(0xcd)],_0x1da1f5=_0x443713[_0x5a3aa3(0xcd)];for(;_0x1fbe36>_0x3223a0&&_0x1da1f5>_0x3223a0&&_0x4ec429[_0x1fbe36-0x1]===_0x443713[_0x1da1f5-0x1];)--_0x1fbe36,--_0x1da1f5;return{'start':_0x3223a0,'deleteLength':_0x1fbe36-_0x3223a0,'insertLength':_0x1da1f5-_0x3223a0};}function _0x4b4d(){const _0x52b18e=['2595030xHSikP','map','properties','customDecorations','type','removeUnit','11671596AtHcUI','model','_docFormulaModel','assess','max','documentRedo','ERROR','TABLE_START','trim','unitId','docs-formula.command.convert-to-text','getCurrentUnitOfType','setFormula','subscribe','onCommandExecuted','source','body','redoMutation','getPresentation','degradeBody','retain','pluginName','cell','kind','success','_instanceService','COMMAND','3546188NjZjUf','removeFormula','rangeId','_registrationService','collectMutations','_service','liveResult','clear','change$','_presentationChanged$','constructor','UNIVER_DOC','startIndex','getUnitId','resolveText','TABLE_ROW_END','expectedNumberFormat','identity','_commandService','some','cursorOffset','includes','textRuns','COLUMN_GROUP_END','updates','pushUndoRedo','blockRanges','getRevision','6dKAnch','getRegisteredFormulas','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','every','paragraphs','from','_setPresentation','getBody','_resources','paragraph','323645tjhiRG','pattern','parse','docs-formula.command.remove','entries','docs-formula.config','keys','previousResource','presentationChanged$','position','_cacheEligibilityService','startOffset','serialize','start','formulaResult$','_rawResources','syncUnit','CUSTOM','error','default','fromEntries','replaceDocRanges','resolved','numberFormat','expectedReferenceRevision','registerCommand','docs-formula.mutation.set-resource','_updateFormulaResult','undoMutation','getFormulas','has','MUTATION','degradeDocumentData','_formulaService','docs-formula.command.set-number-format','segmentId','delete','Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries','2430410kdcKAR','BLOCK_START','data','accessor','empty','_syncScheduled','externalMutations','setResource','_model','presentation','getUnit','deleteFormula','_pendingUnitIds','getResult','setFormulas','_formulaKeys','insert','push','dispose','TABLE_ROW_START','resources','_loadErrors','PARAGRAPH','paragraphId','stale','@univerjs-pro/docs-formula','docs-formula.command.update','_syncUnit','find','isInteger','selection','config','externalReferences','invalid-resource','COLUMN_GROUP_START','_resourceManagerService','next','sectionBreaks','unitAdded$','object','CUSTOM_BLOCK','disposeWithMe','sequenceNodesBuilder','range','resolveBinding','string','get','asObservable','customBlocks','color','syncExecuteCommand','BLOCK_END','unitDisposed$','formulaId','formula','number','setConfig','univer-docs-formula','trigger','endsWith','dataStream','isArray','length','getOwnPropertyDescriptor','insertLength','tables','resourceRedo','register','docs-formula.command.insert','min','function','params','assign','_configService','resourceUndo','TABLE_CELL_END','_queueSync','endIndex','getFormula','version','document','columnGroups','8yRClmW','310175IXycFu','nextResource','documentData','unregisterUnit','text','referenceRevision','_config','_univerInstanceService','packageName','lastValue','pending','disabled','status','wholeEntity','resolveFormula','rangeType','2994dtImGv','registerProvider','forEach','SECTION_BREAK','TABLE_END','previousDocumentData','docs-formula.mutation.set-last-values','getSnapshot','nextDocumentData','toPrimitive','sort','filter','defineProperty','name','symbol','customRanges','_hostExternalReferenceModel','77hCfNgV','66vTPHWr','docs-formula.command.replace-with-text','formulas','deepClone','stringify','_deleteRegistration','add','1.4.0','eligible','DOC_FORMULA_PLUGIN','_isDisposed','_injector','_preserveInvalid','deleteLength','getResource','unregister','values','resource','slice','getLoadError','_registrations','decorate','set','complete','endOffset','_change$','load'];_0x4b4d=function(){return _0x52b18e;};return _0x4b4d();}function St(_0xcc1ed7){const _0x68bd53=_0x15ff4a;return{'formulas':Object[_0x68bd53(0x17a)](Object[_0x68bd53(0x16a)](_0xcc1ed7[_0x68bd53(0x106)])[_0x68bd53(0x120)](([_0x588a9a,_0x4c214d])=>[_0x588a9a,{..._0x4c214d,..._0x4c214d[_0x68bd53(0x17d)]?{'numberFormat':{..._0x4c214d[_0x68bd53(0x17d)]}}:null,..._0x4c214d[_0x68bd53(0xeb)]?{'lastValue':{..._0x4c214d[_0x68bd53(0xeb)]}}:null}]))};}let Y=class extends _0x284207{constructor(_0x5e178e,_0x25224e,_0x37bd1f,_0x4384b3){const _0xc8b51b=_0x15ff4a;super(),this['_instanceService']=_0x5e178e,this[_0xc8b51b(0x152)]=_0x25224e,this[_0xc8b51b(0x194)]=_0x37bd1f,this['_service']=_0x4384b3,A(this,'_pendingUnitIds',new Set()),A(this,'_syncScheduled',!0x1),A(this,_0xc8b51b(0x10e),!0x1),this['_instanceService']['getAllUnitsForType'](_0x1d8d65['UNIVER_DOC'])[_0xc8b51b(0xf4)](_0x3d457e=>this[_0xc8b51b(0x145)][_0xc8b51b(0x176)](_0x3d457e)),this['disposeWithMe'](this['_model'][_0xc8b51b(0x148)][_0xc8b51b(0x132)](({unitId:_0x9df78c})=>this[_0xc8b51b(0x1a7)](_0x9df78c))),this[_0xc8b51b(0x1b5)](this[_0xc8b51b(0x13e)][_0xc8b51b(0x1b2)][_0xc8b51b(0x132)](({unit:_0x560d39})=>{const _0x13d24f=_0xc8b51b;_0x560d39[_0x13d24f(0x123)]===_0x1d8d65[_0x13d24f(0x14b)]&&this[_0x13d24f(0xdb)](_0x560d39[_0x13d24f(0x14d)]());})),this['disposeWithMe'](this[_0xc8b51b(0x13e)][_0xc8b51b(0x1c0)][_0xc8b51b(0x132)](_0x2ab276=>{const _0x4a7d3e=_0xc8b51b;this[_0x4a7d3e(0x145)][_0x4a7d3e(0xe5)](_0x2ab276[_0x4a7d3e(0x14d)]());})),this['disposeWithMe'](this[_0xc8b51b(0x152)][_0xc8b51b(0x133)](_0x4b8c6e=>{const _0x3f218f=_0xc8b51b;if(_0x4b8c6e['id']===_0x3731df['id']&&Ct(_0x4b8c6e[_0x3f218f(0xd6)])){let _0xf67220=_0x4b8c6e[_0x3f218f(0xd6)];_0xf67220[_0x3f218f(0x189)]||this[_0x3f218f(0x1a7)](_0xf67220[_0x3f218f(0x12e)]);}}));}[_0x15ff4a(0x19e)](){const _0x491277=_0x15ff4a;this[_0x491277(0x10e)]=!0x0,super['dispose']();}[_0x15ff4a(0xdb)](_0x8bcdb7){const _0x5d7b59=_0x15ff4a;this['_pendingUnitIds'][_0x5d7b59(0x10a)](_0x8bcdb7),this['_syncScheduled']||(this[_0x5d7b59(0x191)]=!0x0,queueMicrotask(()=>{const _0x57223e=_0x5d7b59;if(this[_0x57223e(0x191)]=!0x1,this[_0x57223e(0x10e)])return;let _0x28d64a=Array[_0x57223e(0x161)](this[_0x57223e(0x198)]);this[_0x57223e(0x198)][_0x57223e(0x147)](),_0x28d64a[_0x57223e(0xf4)](_0xeb456f=>this[_0x57223e(0x1a7)](_0xeb456f));}));}[_0x15ff4a(0x1a7)](_0x5c1969){const _0x3a9785=_0x15ff4a;let _0x553e5e=this[_0x3a9785(0x13e)]['getUnit'](_0x5c1969,_0x1d8d65[_0x3a9785(0x14b)]);_0x553e5e&&this[_0x3a9785(0x145)][_0x3a9785(0x176)](_0x553e5e);}};Y=N([M(0x0,_0x48b9a6),M(0x1,_0x55728f),M(0x2,_0x36a610(j)),M(0x3,_0x36a610(P))],Y);function Ct(_0x32acf5){const _0x508b9f=_0x15ff4a;return typeof _0x32acf5==_0x508b9f(0x1b3)&&!!_0x32acf5&&'unitId'in _0x32acf5&&typeof _0x32acf5['unitId']==_0x508b9f(0x1b9)&&(!(_0x508b9f(0x189)in _0x32acf5)||_0x32acf5[_0x508b9f(0x189)]===void 0x0||typeof _0x32acf5[_0x508b9f(0x189)]=='string');}let X=class extends _0x284207{constructor(_0x4691a1,_0x8dcc88){const _0x4bde81=_0x15ff4a;super(),this['_resourceManagerService']=_0x4691a1,this[_0x4bde81(0x127)]=_0x8dcc88,this[_0x4bde81(0x1b5)](this[_0x4bde81(0x1af)]['registerPluginResource']({'pluginName':y,'businesses':[_0x1d8d65[_0x4bde81(0x14b)]],'toJson':_0x2f8c67=>JSON[_0x4bde81(0x108)](this['_docFormulaModel']['serialize'](_0x2f8c67)),'parseJson':_0x2636d6=>JSON[_0x4bde81(0x168)](_0x2636d6),'onLoad':(_0x63e948,_0x5217aa)=>{const _0x2a75d4=_0x4bde81;this[_0x2a75d4(0x127)]['load'](_0x63e948,_0x5217aa);},'onUnLoad':_0x291d39=>this[_0x4bde81(0x127)][_0x4bde81(0x124)](_0x291d39)}));}};X=N([M(0x0,_0x103c6c),M(0x1,_0x36a610(j))],X);var wt=_0x15ff4a(0x1a5),Tt=_0x15ff4a(0x10b);const Et={};let Z=class extends _0x284207{constructor(_0x80c966,_0x473a27,_0x3b81a8){const _0x25901d=_0x15ff4a;super(),this[_0x25901d(0xe9)]=_0x80c966,this[_0x25901d(0x187)]=_0x473a27,this['disposeWithMe'](_0x3b81a8[_0x25901d(0xd2)]({'resolve':(_0x207f60,_0x233915)=>{const _0x2ff264=_0x25901d;var _0x50caad;return((_0x50caad=_0x233915[_0x2ff264(0x101)])==null?void 0x0:_0x50caad['filter'](w)[_0x2ff264(0x120)](_0x257e9f=>({'startOffset':_0x257e9f[_0x2ff264(0x14c)],'endOffset':_0x257e9f[_0x2ff264(0xdc)]+0x1,'text':this[_0x2ff264(0xf0)](_0x207f60,_0x257e9f['rangeId'])})))??[];}})),this[_0x25901d(0x1b5)](this[_0x25901d(0x187)][_0x25901d(0x16e)]['subscribe'](({unitId:_0x16423c})=>{_0x3b81a8['notifyTextChanged'](_0x16423c);}));}[_0x15ff4a(0xf0)](_0x4e94c5,_0x237b4b){const _0x31c14d=_0x15ff4a;var _0x2738e6;return((_0x2738e6=this[_0x31c14d(0x187)][_0x31c14d(0x199)]({'unitId':_0x4e94c5,'rangeId':_0x237b4b}))==null?void 0x0:_0x2738e6[_0x31c14d(0xe6)])??'';}[_0x15ff4a(0x14e)](_0x472cfb,_0x876de,_0x571016){const _0x125629=_0x15ff4a;var _0x5aa4ec;let _0x209033=this[_0x125629(0xe9)]['getUnit'](_0x472cfb,_0x1d8d65[_0x125629(0x14b)]),_0x5ea3aa=_0x209033==null?void 0x0:_0x209033[_0x125629(0x163)]();if(!_0x5ea3aa)return'';let _0x2815c8=_0x5ea3aa[_0x125629(0xcb)][_0x125629(0x116)](_0x876de,_0x571016),_0x169f40=((_0x5aa4ec=_0x5ea3aa[_0x125629(0x101)])==null?void 0x0:_0x5aa4ec[_0x125629(0xfd)](_0x3db055=>w(_0x3db055)&&_0x3db055['startIndex']>=_0x876de&&_0x3db055[_0x125629(0xdc)]<_0x571016)['sort']((_0x11e139,_0x4d6aa7)=>_0x4d6aa7['startIndex']-_0x11e139['startIndex']))??[];for(let _0x102b1a of _0x169f40){let _0x4595ff=_0x102b1a[_0x125629(0x14c)]-_0x876de,_0x5285a4=_0x102b1a[_0x125629(0xdc)]-_0x876de+0x1;_0x2815c8=''+_0x2815c8[_0x125629(0x116)](0x0,_0x4595ff)+this[_0x125629(0xf0)](_0x472cfb,_0x102b1a[_0x125629(0x142)])+_0x2815c8[_0x125629(0x116)](_0x5285a4);}return _0x2815c8;}[_0x15ff4a(0x186)](_0x37817c){return Dt(_0x37817c);}[_0x15ff4a(0x138)](_0x19c65c,_0x623b4f,_0xc029d4={}){const _0x4a6779=_0x15ff4a;var _0x53c702;return Be({'id':_0x19c65c,'body':_0x623b4f,'documentStyle':{}},(((_0x53c702=_0x623b4f['customRanges'])==null?void 0x0:_0x53c702[_0x4a6779(0xfd)](w))??[])['map'](_0x25d1f3=>({'rangeId':_0x25d1f3[_0x4a6779(0x142)],'text':_0xc029d4[_0x25d1f3['rangeId']]??this['resolveFormula'](_0x19c65c,_0x25d1f3[_0x4a6779(0x142)])})))[_0x4a6779(0x135)]??{'dataStream':''};}};Z=N([M(0x0,_0x48b9a6),M(0x1,_0x36a610(P)),M(0x2,_0x36a610(_0xebc48d))],Z);function Dt(_0x4519d9){const _0xd0f84f=_0x15ff4a;var _0x39fa38,_0x228214;let _0xc381c2=Ot(_0x4519d9),_0x48af00=Be(_0x4519d9,(((_0x39fa38=_0x4519d9[_0xd0f84f(0x135)])==null||(_0x39fa38=_0x39fa38['customRanges'])==null?void 0x0:_0x39fa38['filter'](w))??[])['map'](_0x3fe27f=>({'rangeId':_0x3fe27f[_0xd0f84f(0x142)],'text':kt(_0xc381c2==null?void 0x0:_0xc381c2[_0xd0f84f(0x106)][_0x3fe27f[_0xd0f84f(0x142)]])})));return _0x48af00[_0xd0f84f(0x1a0)]=(_0x228214=_0x48af00[_0xd0f84f(0x1a0)])==null?void 0x0:_0x228214[_0xd0f84f(0xfd)](_0xc12662=>_0xc12662['name']!==y),_0x48af00;}function Ot(_0x52043c){const _0x11bda2=_0x15ff4a;var _0x5de847;let _0x55c4e0=(_0x5de847=_0x52043c['resources'])==null||(_0x5de847=_0x5de847['find'](_0x31e4cf=>_0x31e4cf[_0x11bda2(0xff)]===_0x11bda2(0x10d)))==null?void 0x0:_0x5de847[_0x11bda2(0x18e)];if(_0x55c4e0)try{let _0x53eadc=JSON[_0x11bda2(0x168)](_0x55c4e0);return x(_0x53eadc)?_0x53eadc:void 0x0;}catch{return;}}function kt(_0x1fa64d){const _0x2b1b96=_0x15ff4a;return _0x1fa64d?_0x4c2bd5({'lastValue':_0x1fa64d['lastValue'],'numberFormat':_0x1fa64d[_0x2b1b96(0x17d)]})['text']:'';}let Q=class extends _0x284207{constructor(_0x1d45d9,_0x5379e5,_0x4cdb6f){const _0x1d778d=_0x15ff4a;super(),this[_0x1d778d(0x187)]=_0x1d45d9,this[_0x1d778d(0x170)]=_0x5379e5,this[_0x1d778d(0x1b5)](_0x4cdb6f[_0x1d778d(0xf3)](this));}[_0x15ff4a(0x144)](_0x14e11d){const _0xdd67af=_0x15ff4a;let _0x1d84af=new Map();for(let _0x1daf92 of this['_formulaService'][_0xdd67af(0x15d)]()){var _0x22d2df;if(!this[_0xdd67af(0x170)][_0xdd67af(0x128)](_0x1daf92[_0xdd67af(0x1ab)][_0xdd67af(0x1c2)],_0x1daf92[_0xdd67af(0x146)])[_0xdd67af(0x10c)])continue;let _0x516dc1=_0x10bd2d(_0x1daf92['liveResult']),_0x1cc1d1=_0x516dc1?_0x4190fe(_0x516dc1):null;if(!_0x1cc1d1||At(_0x1daf92[_0xdd67af(0x1ab)]['lastValue'],_0x1cc1d1))continue;let _0x2e0136=_0x1d84af[_0xdd67af(0x1ba)](_0x1daf92['identity'][_0xdd67af(0x12e)])??[];_0x2e0136[_0xdd67af(0x19d)]({'rangeId':_0x1daf92[_0xdd67af(0x151)]['rangeId'],'expectedFormula':_0x1daf92[_0xdd67af(0x1ab)]['formula'],'expectedNumberFormat':(_0x22d2df=_0x1daf92[_0xdd67af(0x1ab)][_0xdd67af(0x17d)])==null?void 0x0:_0x22d2df[_0xdd67af(0x167)],'expectedReferenceRevision':_0x1daf92[_0xdd67af(0xe7)],'lastValue':_0x1cc1d1}),_0x1d84af[_0xdd67af(0x11a)](_0x1daf92[_0xdd67af(0x151)][_0xdd67af(0x12e)],_0x2e0136);}return Array[_0xdd67af(0x161)](_0x1d84af,([_0x597f02,_0x5c81c3])=>({'id':R['id'],'params':{'unitId':_0x597f02,'updates':_0x5c81c3}}));}};Q=N([M(0x0,_0x36a610(P)),M(0x1,_0x36a610(_0xf3ba79)),M(0x2,_0x36a610(_0x3b1060))],Q);function At(_0x544fd9,_0x5e3d80){const _0x25470b=_0x15ff4a;return(_0x544fd9==null?void 0x0:_0x544fd9['v'])===_0x5e3d80['v']&&(_0x544fd9==null?void 0x0:_0x544fd9['t'])===_0x5e3d80['t']&&(_0x544fd9==null?void 0x0:_0x544fd9[_0x25470b(0x167)])===_0x5e3d80[_0x25470b(0x167)];}let $=class extends _0x2f618a{constructor(_0x26f481=Et,_0x2be03e,_0x3636ca,_0x4c0430){const _0x279e2e=_0x15ff4a;super(),this[_0x279e2e(0xe8)]=_0x26f481,this['_injector']=_0x2be03e,this['_commandService']=_0x3636ca,this['_configService']=_0x4c0430;let {..._0x4c307b}=_0x1725eb({},Et,this['_config']);this[_0x279e2e(0xd8)][_0x279e2e(0x1c4)](_0x279e2e(0x16b),_0x4c307b);}['onStarting'](){const _0x3a4969=_0x15ff4a;this[_0x3a4969(0x10f)]['add']([j]),this[_0x3a4969(0x10f)][_0x3a4969(0x10a)]([P]),this['_injector'][_0x3a4969(0x10a)]([X]),this[_0x3a4969(0x10f)][_0x3a4969(0x10a)]([Y]),this[_0x3a4969(0x10f)]['add']([Q]),this[_0x3a4969(0x10f)][_0x3a4969(0x10a)]([Z]),_0x426a27(this[_0x3a4969(0x10f)],[[j],[X],[Y],[Q],[Z]]),[lt,ut,L,R,z,B,V,H,U,W]['forEach'](_0x17afe2=>this[_0x3a4969(0x1b5)](this[_0x3a4969(0x152)][_0x3a4969(0x17f)](_0x17afe2)));}};A($,_0x15ff4a(0x13a),y),A($,_0x15ff4a(0xea),wt),A($,_0x15ff4a(0xde),Tt),A($,_0x15ff4a(0x123),_0x1d8d65[_0x15ff4a(0x14b)]),$=N([_0x3781b4(_0x52fcce,_0x4ef49e,_0x296e31),M(0x1,_0x36a610(_0xed0b2)),M(0x2,_0x55728f),M(0x3,_0x102468)],$);export{W as ConvertDocFormulaToTextCommand,je as DOC_FORMULA_CUSTOM_RANGE_KIND,Me as DOC_FORMULA_OBJECT_REPLACEMENT,y as DOC_FORMULA_PLUGIN,Z as DocFormulaDisplayTextService,Y as DocFormulaLifecycleController,j as DocFormulaModel,X as DocFormulaResourceController,ot as DocFormulaResultStatus,P as DocFormulaService,z as InsertDocFormulaCommand,C as InvalidDocFormulaInsertRangeError,H as RemoveDocFormulaCommand,ut as RemoveDocFormulaMutation,U as ReplaceDocFormulaWithTextCommand,R as SetDocFormulaLastValuesMutation,lt as SetDocFormulaMutation,V as SetDocFormulaNumberFormatCommand,L as SetDocFormulaResourceMutation,$ as UniverDocsFormulaPlugin,B as UpdateDocFormulaCommand,Ve as assertSafeDocFormulaInsertRange,Le as buildInsertDocFormulaActions,ze as buildRemoveDocFormulaActions,Re as buildUpdateDocFormulaActions,b as createEmptyDocFormulaResource,Dt as degradeDocFormulaDocumentData,T as findDocFormulaRange,Ne as isDocFormulaConfig,w as isDocFormulaRange,x as isDocFormulaResource,Pe as isFormulaLastValue};
|
|
1
|
+
const _0xb81d4c=_0x43e1;(function(_0x287216,_0x47b045){const _0xd3e7f0=_0x43e1,_0x557293=_0x287216();while(!![]){try{const _0x436cc8=parseInt(_0xd3e7f0(0x1ce))/0x1+parseInt(_0xd3e7f0(0x1d5))/0x2+-parseInt(_0xd3e7f0(0x1a4))/0x3*(-parseInt(_0xd3e7f0(0x17e))/0x4)+parseInt(_0xd3e7f0(0x1ee))/0x5+-parseInt(_0xd3e7f0(0x1b6))/0x6+parseInt(_0xd3e7f0(0x203))/0x7+parseInt(_0xd3e7f0(0x226))/0x8*(-parseInt(_0xd3e7f0(0x181))/0x9);if(_0x436cc8===_0x47b045)break;else _0x557293['push'](_0x557293['shift']());}catch(_0x3f6d10){_0x557293['push'](_0x557293['shift']());}}}(_0x3d4a,0x97885));import{FormulaCacheEligibilityService as _0x5bfff4,FormulaLastValuePersistenceService as _0x21c0ca,HostExternalReferenceModel as _0x2be22c,UniverProFormulaEnginePlugin as _0x3c9e4a,buildUpsertHostExternalReferenceMutations as _0x5f5499,collectFormulaExternalReferenceQualifiers as _0x1bd1bb,getScalarFormulaResultCell as _0xfa1663,resolveFormulaResultPresentation as _0x157ca0,resolveHostFormulaExternalReferences as _0x1fc472,toFormulaLastValue as _0x4884df}from'@univerjs-pro/engine-formula';import{CellValueType as _0x1d3a7a,CommandType as _0x599208,CustomRangeType as _0x4e4035,DataStreamTreeTokenType as _0x4bf61f,DependentOn as _0x415d13,Disposable as _0xf99196,ICommandService as _0x41ce44,IConfigService as _0x212f05,IResourceManagerService as _0x85b6e7,IUndoRedoService as _0x5273cf,IUniverInstanceService as _0x1616da,Inject as _0x3abf00,Injector as _0x38221f,JSONX as _0x5b1be5,Plugin as _0x4cfe43,TextX as _0x7ff3ce,Tools as _0x541130,UniverInstanceType as _0x19d9b2,generateRandomId as _0x5d3298,getBodySliceForTextXAction as _0x312eb6,getCustomRangeInterval as _0x128c46,getParagraphContentStartOffset as _0x13c716,getRichTextEditPath as _0x197963,merge as _0x57fe01,shiftExclusiveRangeOnDelete as _0x463586,shiftExclusiveRangeOnInsert as _0x190d1a,shiftInclusiveRangeOnDelete as _0x4ab3ac,shiftInclusiveRangeOnInsert as _0x21d172,touchDependencies as _0x59a954}from'@univerjs/core';import{DOC_SELECTION_OPTION_PRESERVE_CARET as _0x507f67,DocSelectionManagerService as _0x3e1e9b,DocTextResolverService as _0x5a38c7,RichTextEditingMutation as _0x3ff622,UniverDocsPlugin as _0x59ac81}from'@univerjs/docs';import{FormulaResultStatus as _0xd61d8b,LexerTreeBuilder as _0x276a14,OtherFormulaBizType as _0x5593a7,RegisterOtherFormulaService as _0x3b74c8}from'@univerjs/engine-formula';import{Subject as _0x45c46f}from'rxjs';import{UniverLicensePlugin as _0x46999f}from'@univerjs-pro/license';const y='DOC_FORMULA_PLUGIN',je='univer-docs-formula',Me='';function b(){return{'formulas':{}};}function x(_0x5b91c6){const _0x56550d=_0x43e1;return!_0x5b91c6||typeof _0x5b91c6!=_0x56550d(0x234)||!(_0x56550d(0x18d)in _0x5b91c6)||!_0x5b91c6[_0x56550d(0x18d)]||typeof _0x5b91c6[_0x56550d(0x18d)]!='object'||Array[_0x56550d(0x215)](_0x5b91c6[_0x56550d(0x18d)])?!0x1:Object[_0x56550d(0x18e)](_0x5b91c6['formulas'])['every'](([_0x32e913,_0x11d7ae])=>_0x32e913[_0x56550d(0x1f2)]>0x0&&Ne(_0x11d7ae));}function Ne(_0x270303){const _0xf52ab0=_0x43e1;return!_0x270303||typeof _0x270303!=_0xf52ab0(0x234)||!S(_0x270303,[_0xf52ab0(0x1f0),_0xf52ab0(0x19e),_0xf52ab0(0x1ed)])||!(_0xf52ab0(0x1f0)in _0x270303)||typeof _0x270303[_0xf52ab0(0x1f0)]!=_0xf52ab0(0x1fc)||!_0x270303['formula']['trim']()||_0xf52ab0(0x19e)in _0x270303&&_0x270303[_0xf52ab0(0x19e)]!=null&&(typeof _0x270303[_0xf52ab0(0x19e)]!=_0xf52ab0(0x234)||!S(_0x270303['numberFormat'],['pattern'])||!(_0xf52ab0(0x168)in _0x270303[_0xf52ab0(0x19e)])||typeof _0x270303['numberFormat'][_0xf52ab0(0x168)]!='string')?!0x1:!(_0xf52ab0(0x1ed)in _0x270303)||_0x270303[_0xf52ab0(0x1ed)]==null||Pe(_0x270303[_0xf52ab0(0x1ed)]);}function Pe(_0x182fd1){const _0x60b7aa=_0x43e1;return!_0x182fd1||typeof _0x182fd1!=_0x60b7aa(0x234)||!S(_0x182fd1,['v','t',_0x60b7aa(0x168)])||!('v'in _0x182fd1)||_0x182fd1['v']!==null&&typeof _0x182fd1['v']!=_0x60b7aa(0x1fc)&&typeof _0x182fd1['v']!=_0x60b7aa(0x1eb)&&typeof _0x182fd1['v']!=_0x60b7aa(0x1b0)||'t'in _0x182fd1&&_0x182fd1['t']!=null&&!Fe(_0x182fd1['t'])?!0x1:!(_0x60b7aa(0x168)in _0x182fd1)||_0x182fd1['pattern']==null||typeof _0x182fd1[_0x60b7aa(0x168)]=='string';}function S(_0x47a6b8,_0x42f8ba){const _0x4c2983=_0x43e1;let _0x580b3c=new Set(_0x42f8ba);return Object[_0x4c2983(0x1a6)](_0x47a6b8)[_0x4c2983(0x175)](_0x398190=>_0x580b3c[_0x4c2983(0x22f)](_0x398190));}function Fe(_0x1c887c){const _0x2d31dd=_0x43e1;return typeof _0x1c887c==_0x2d31dd(0x1eb)&&Object['values'](_0x1d3a7a)[_0x2d31dd(0x222)](_0x1c887c);}const Ie=new Set([_0x4bf61f['SECTION_BREAK'],_0x4bf61f[_0xb81d4c(0x216)],_0x4bf61f['TABLE_ROW_START'],_0x4bf61f[_0xb81d4c(0x19c)],_0x4bf61f[_0xb81d4c(0x1e9)],_0x4bf61f[_0xb81d4c(0x1ef)],_0x4bf61f[_0xb81d4c(0x238)],_0x4bf61f['COLUMN_GROUP_START'],_0x4bf61f[_0xb81d4c(0x1f4)],_0x4bf61f[_0xb81d4c(0x251)],_0x4bf61f[_0xb81d4c(0x1e1)],_0x4bf61f['BLOCK_START'],_0x4bf61f['BLOCK_END'],_0x4bf61f[_0xb81d4c(0x1b4)]]);var C=class extends Error{constructor(){const _0x3619f5=_0xb81d4c;super(_0x3619f5(0x209));}};function Le(_0x45ed8f){const _0x2ee9bc=_0xb81d4c;var _0x5788d1,_0x227bf7;let _0x2b2b46=_0x541130[_0x2ee9bc(0x211)](_0x45ed8f[_0x2ee9bc(0x1ba)]),_0x5d5f37=O(_0x2b2b46),{startOffset:_0x57ace2,endOffset:_0x3aaf2c}=We(_0x5d5f37,_0x45ed8f[_0x2ee9bc(0x1b9)],_0x45ed8f['endOffset']);Ve(_0x5d5f37,_0x57ace2,_0x3aaf2c);let _0x20aa1f=((_0x5788d1=_0x5d5f37[_0x2ee9bc(0x1c4)])==null?void 0x0:_0x5788d1['filter'](_0xd8bdcb=>{const _0x18863e=_0x2ee9bc;if(!w(_0xd8bdcb))return!0x1;let _0x8a560d=_0x128c46(_0xd8bdcb);return _0x8a560d[_0x18863e(0x253)]>_0x57ace2&&_0x8a560d[_0x18863e(0x1b9)]<_0x3aaf2c;})[_0x2ee9bc(0x259)](_0x3e9489=>_0x3e9489[_0x2ee9bc(0x1dd)]))??[];qe(_0x5d5f37,_0x57ace2,_0x3aaf2c,''),_0x5d5f37[_0x2ee9bc(0x1c4)]=[...((_0x227bf7=_0x5d5f37[_0x2ee9bc(0x1c4)])==null?void 0x0:_0x227bf7[_0x2ee9bc(0x21d)](_0x850227=>!_0x20aa1f[_0x2ee9bc(0x222)](_0x850227[_0x2ee9bc(0x1dd)])&&_0x850227[_0x2ee9bc(0x1dd)]!==_0x45ed8f[_0x2ee9bc(0x1dd)]))??[],He(_0x45ed8f[_0x2ee9bc(0x1dd)],_0x57ace2)][_0x2ee9bc(0x18f)]((_0xfb2d83,_0x4c6306)=>_0xfb2d83['startIndex']-_0x4c6306[_0x2ee9bc(0x23b)]);let _0x6334ce=Ue(_0x45ed8f[_0x2ee9bc(0x1e3)]);return _0x20aa1f[_0x2ee9bc(0x171)](_0x389326=>{delete _0x6334ce['formulas'][_0x389326];}),_0x6334ce[_0x2ee9bc(0x18d)][_0x45ed8f[_0x2ee9bc(0x1dd)]]=_0x541130['deepClone'](_0x45ed8f['config']),{'nextDocumentData':_0x2b2b46,'nextResource':_0x6334ce,'cursorOffset':_0x57ace2+0x1};}function Re(_0x243588){const _0x40287f=_0xb81d4c;var _0x1b2074,_0x4d03e4;let _0x36999c=_0x541130['deepClone'](_0x243588[_0x40287f(0x1ba)]),_0x261e50=(_0x1b2074=O(_0x36999c)['customRanges'])==null?void 0x0:_0x1b2074[_0x40287f(0x1bb)](_0x1dd6ed=>_0x1dd6ed[_0x40287f(0x1dd)]===_0x243588[_0x40287f(0x1dd)]&&w(_0x1dd6ed));if(!_0x261e50||!((_0x4d03e4=_0x243588['resource'])!=null&&_0x4d03e4[_0x40287f(0x18d)][_0x243588[_0x40287f(0x1dd)]]))return null;let _0xbfbc05=Ue(_0x243588[_0x40287f(0x1e3)]);return _0xbfbc05[_0x40287f(0x18d)][_0x243588[_0x40287f(0x1dd)]]=_0x541130[_0x40287f(0x211)](_0x243588[_0x40287f(0x1c1)]),{'nextDocumentData':_0x36999c,'nextResource':_0xbfbc05,'cursorOffset':_0x261e50[_0x40287f(0x218)]+0x1};}function ze(_0x375611){const _0xc9000f=_0xb81d4c;let _0x24067b=_0x541130[_0xc9000f(0x211)](_0x375611[_0xc9000f(0x1ba)]),_0x5e9e0c=Je(_0x24067b,_0x375611[_0xc9000f(0x1dd)],_0x375611[_0xc9000f(0x24e)]??'');if(_0x5e9e0c==null)return null;let _0x2e0b14=Ue(_0x375611[_0xc9000f(0x1e3)]);return delete _0x2e0b14['formulas'][_0x375611[_0xc9000f(0x1dd)]],{'nextDocumentData':_0x24067b,'nextResource':_0x2e0b14,'cursorOffset':_0x5e9e0c};}function _0x3d4a(){const _0x337d9c=['blockRanges','customRanges','degradeDocumentData','slice','body','next','_injector','getAllUnitsForType','dataStream','getRegisteredFormulas','docs-formula.mutation.set-resource','833049UHbRqv','getOwnPropertyDescriptor','removeFormula','docs-formula.mutation.set-last-values','docs-formula.command.remove','add','resolveText','1038854TMBjdi','document','getBody','prototype','getFormula','sequenceNodesBuilder','getResource','externalMutations','rangeId','paragraphs','_service','_formulaKeys','COLUMN_GROUP_END','_queueSync','resource','selection','getSnapshot','_registrationService','UNIVER_DOC','degradeBody','TABLE_CELL_END','resourceRedo','number','nextResource','lastValue','2486270CpEqQK','TABLE_ROW_END','formula','docs-formula.command.convert-to-text','length','getInstance','COLUMN_START','replaceDocRanges','_setPresentation','unregister','docs-formula.mutation.remove-formula','function','_cacheEligibilityService','paragraph','string','editOp','params','_deleteRegistration','nextDocumentData','disabled','get','8270633EWhgXj','subscribe','end','start','delete','clear','Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries','cell','getLoadError','EMPTY','tables','setFormulas','expectedNumberFormat','previousResource','deepClone','deleteFormula','getPresentation','values','isArray','TABLE_START','DOC','endIndex','_formulaService','notifyTextChanged','max','collectMutations','filter','documentRedo','dispose','textRuns','_preserveInvalid','includes','_change$','undoMutation','success','9307072nvFKFx','getResult','_registrations','expectedReferenceRevision','getUnitId','color','PENDING','trigger','_configService','has','model','onCommandExecuted','set','toPrimitive','object','resourceUndo','registerPluginResource','COMMAND','TABLE_END','_presentationChanged$','defineProperty','startIndex','presentation','_commandService','wholeEntity','docs-formula.config','complete','removeUnit','_updateFormulaResult','registerFormulaWithRange','columnGroups','customDecorations','startsWith','PARAGRAPH','expectedFormula','CUSTOM','liveResult','unitAdded$','target','trim','text','unitDisposed$','onStarting','COLUMN_END','stale','endOffset','_docFormulaModel','MUTATION','segmentId','registerProvider','getRevision','map','_loadErrors','empty','resolveFormula','syncExecuteCommand','_isDisposed','DOC_FORMULA_PLUGIN','SUCCESS','_instanceService','assess','pattern','packageName','previousDocumentData','kind','unregisterUnit','resolveBinding','disposeWithMe','status','invalid-resource','forEach','_resourceManagerService','cursorOffset','formulaResult$','every','externalReferences','insertLength','type','getTextRanges','docs-formula.mutation.set-formula','position','error','getUnit','20ffScPR','symbol','retain','18bLJhgZ','syncUnit','assign','formulaId','serialize','_univerInstanceService','properties','insert','_config','pluginName','push','presentationChanged$','formulas','entries','sort','references','_hostExternalReferenceModel','Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.','source','sectionBreaks','register','1.5.1','isInteger','SECTION_BREAK','data','name','resolved','TABLE_CELL_START','setConfig','numberFormat','registerCommand','referenceRevision','unitId','_syncScheduled','accessor','529350EQsRqz','pending','keys','from','customBlocks','resources','min','stringify','change$','_syncUnit','parse','docs-formula.command.insert','boolean','_model','setResource','redoMutation','CUSTOM_BLOCK','paragraphId','5796324VnKJHt','_rawResources','asObservable','startOffset','documentData','find','load','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','endsWith','iterator','identity','config','_resources'];_0x3d4a=function(){return _0x337d9c;};return _0x3d4a();}function Be(_0x5c55df,_0x49eed3){const _0x38b5da=_0xb81d4c;var _0x349626;let _0x42ed82=_0x541130[_0x38b5da(0x211)](_0x5c55df),_0xee2c13=_0x42ed82[_0x38b5da(0x1c7)];if(!_0xee2c13)return _0x42ed82;let _0x9ab5df=new Map(_0x49eed3[_0x38b5da(0x259)](_0x45c857=>[_0x45c857[_0x38b5da(0x1dd)],_0x45c857[_0x38b5da(0x24e)]])),_0x4e1093=((_0x349626=_0xee2c13['customRanges'])==null?void 0x0:_0x349626[_0x38b5da(0x21d)](_0x1d3152=>w(_0x1d3152)&&_0x9ab5df[_0x38b5da(0x22f)](_0x1d3152['rangeId']))['sort']((_0x6bb730,_0x1472d1)=>_0x1472d1[_0x38b5da(0x23b)]-_0x6bb730[_0x38b5da(0x23b)]))??[];for(let _0xe1f924 of _0x4e1093)Je(_0x42ed82,_0xe1f924[_0x38b5da(0x1dd)],_0x9ab5df[_0x38b5da(0x202)](_0xe1f924['rangeId'])??'');return _0x42ed82;}function w(_0x3757ce){const _0x825f04=_0xb81d4c;var _0x44e4e5;return(_0x3757ce==null?void 0x0:_0x3757ce['rangeType'])===_0x4e4035[_0x825f04(0x249)]&&_0x3757ce[_0x825f04(0x23e)]===!0x0&&((_0x44e4e5=_0x3757ce[_0x825f04(0x187)])==null?void 0x0:_0x44e4e5[_0x825f04(0x16b)])==='univer-docs-formula';}function T(_0x39d642,_0x299675){const _0x369be2=_0xb81d4c;var _0x4fd87d;return _0x39d642==null||(_0x4fd87d=_0x39d642[_0x369be2(0x1c4)])==null?void 0x0:_0x4fd87d[_0x369be2(0x1bb)](_0x4eb271=>_0x4eb271[_0x369be2(0x1dd)]===_0x299675&&w(_0x4eb271));}function Ve(_0x2109ad,_0x3209ca,_0x2de806){const _0x4a07a5=_0xb81d4c;if(_0x3209ca===_0x2de806){if(Ie[_0x4a07a5(0x22f)](_0x2109ad['dataStream'][_0x3209ca]))throw new C();}else{for(let _0x1de862=_0x3209ca;_0x1de862<_0x2de806;_0x1de862++)if(_0x2109ad['dataStream'][_0x1de862]===_0x4bf61f[_0x4a07a5(0x247)]||Ie[_0x4a07a5(0x22f)](_0x2109ad[_0x4a07a5(0x1cb)][_0x1de862]))throw new C();}}function He(_0x490723,_0x41cf50){const _0x59da89=_0xb81d4c;return{'startIndex':_0x41cf50,'endIndex':_0x41cf50,'rangeId':_0x490723,'rangeType':_0x4e4035[_0x59da89(0x249)],'wholeEntity':!0x0,'properties':{'kind':je}};}function Ue(_0x2e2184){const _0x4c1576=_0xb81d4c;return _0x2e2184?_0x541130[_0x4c1576(0x211)](_0x2e2184):b();}function We(_0x27ce4f,_0x3179a5,_0x3aa9ab){const _0x1cc2aa=_0xb81d4c;let _0x46ea58=Ke(_0x27ce4f),_0x134f5b=_0x3179a5??_0x46ea58,_0x104fea=_0x3aa9ab??_0x134f5b;return{'startOffset':Ge(Math[_0x1cc2aa(0x1aa)](_0x134f5b,_0x104fea),_0x46ea58),'endOffset':Ge(Math[_0x1cc2aa(0x21b)](_0x134f5b,_0x104fea),_0x46ea58)};}function Ge(_0x16ca31,_0x4cbf61){const _0xb057b9=_0xb81d4c;return Math[_0xb057b9(0x21b)](0x0,Math['min'](_0x16ca31,_0x4cbf61));}function Ke(_0x161d6d){const _0x1db2d0=_0xb81d4c;return _0x161d6d[_0x1db2d0(0x1cb)][_0x1db2d0(0x1be)](''+_0x4bf61f[_0x1db2d0(0x247)]+_0x4bf61f['SECTION_BREAK'])?Math[_0x1db2d0(0x21b)](0x0,_0x161d6d[_0x1db2d0(0x1cb)][_0x1db2d0(0x1f2)]-0x2):_0x161d6d[_0x1db2d0(0x1cb)][_0x1db2d0(0x1be)](_0x4bf61f[_0x1db2d0(0x198)])?Math[_0x1db2d0(0x21b)](0x0,_0x161d6d['dataStream']['length']-0x1):_0x161d6d['dataStream'][_0x1db2d0(0x1f2)];}function qe(_0xa328aa,_0x4d1020,_0x30bac2,_0x39139d){_0x30bac2>_0x4d1020&&Xe(_0xa328aa,_0x4d1020,_0x30bac2),Ye(_0xa328aa,_0x4d1020,_0x39139d);}function Je(_0x134655,_0x416f06,_0x4a85db){const _0x5d070b=_0xb81d4c;var _0xe0c63e,_0x5334e6;let _0x358ef7=O(_0x134655),_0x35e499=(_0xe0c63e=_0x358ef7[_0x5d070b(0x1c4)])==null?void 0x0:_0xe0c63e[_0x5d070b(0x1bb)](_0x1aa972=>_0x1aa972[_0x5d070b(0x1dd)]===_0x416f06&&w(_0x1aa972));if(!_0x35e499)return null;let _0x37da4d=_0x128c46(_0x35e499);return qe(_0x358ef7,_0x37da4d[_0x5d070b(0x1b9)],_0x37da4d['endOffset'],_0x4a85db),_0x358ef7[_0x5d070b(0x1c4)]=(_0x5334e6=_0x358ef7[_0x5d070b(0x1c4)])==null?void 0x0:_0x5334e6['filter'](_0x111b5e=>_0x111b5e['rangeId']!==_0x416f06),_0x37da4d[_0x5d070b(0x1b9)]+_0x4a85db[_0x5d070b(0x1f2)];}function Ye(_0x505bb9,_0x3a4161,_0x278a91){const _0x443dd7=_0xb81d4c;_0x278a91&&(_0x505bb9['dataStream']=''+_0x505bb9['dataStream']['slice'](0x0,_0x3a4161)+_0x278a91+_0x505bb9[_0x443dd7(0x1cb)][_0x443dd7(0x1c6)](_0x3a4161),Ze(_0x505bb9,_0x3a4161,_0x278a91[_0x443dd7(0x1f2)]));}function Xe(_0x738ddd,_0x15963b,_0x2d1fb1){const _0x31610b=_0xb81d4c;let _0x5c12dd=_0x2d1fb1-_0x15963b;_0x738ddd['dataStream']=''+_0x738ddd[_0x31610b(0x1cb)]['slice'](0x0,_0x15963b)+_0x738ddd[_0x31610b(0x1cb)][_0x31610b(0x1c6)](_0x2d1fb1),Qe(_0x738ddd,_0x15963b,_0x5c12dd);}function Ze(_0x315792,_0x599bfe,_0x2596f0){const _0x336321=_0xb81d4c;_0x315792['paragraphs']=$e(_0x315792[_0x336321(0x1de)],_0x599bfe,_0x2596f0),_0x315792[_0x336321(0x194)]=$e(_0x315792[_0x336321(0x194)],_0x599bfe,_0x2596f0),_0x315792['customBlocks']=$e(_0x315792[_0x336321(0x1a8)],_0x599bfe,_0x2596f0),_0x315792[_0x336321(0x220)]=tt(_0x315792[_0x336321(0x220)],_0x599bfe,_0x2596f0),_0x315792[_0x336321(0x20d)]=nt(_0x315792[_0x336321(0x20d)],_0x599bfe,_0x2596f0),_0x315792[_0x336321(0x244)]=E(_0x315792[_0x336321(0x244)],_0x599bfe,_0x2596f0),_0x315792[_0x336321(0x1c4)]=E(_0x315792['customRanges'],_0x599bfe,_0x2596f0),_0x315792[_0x336321(0x245)]=E(_0x315792[_0x336321(0x245)],_0x599bfe,_0x2596f0),_0x315792[_0x336321(0x1c3)]=E(_0x315792['blockRanges'],_0x599bfe,_0x2596f0);}function Qe(_0x435349,_0x22f04c,_0x302aed){const _0x47806b=_0xb81d4c;var _0x512d60,_0x4c5d81;_0x435349[_0x47806b(0x1de)]=et(_0x435349['paragraphs'],_0x22f04c,_0x302aed),_0x435349[_0x47806b(0x194)]=et(_0x435349['sectionBreaks'],_0x22f04c,_0x302aed),_0x435349[_0x47806b(0x1a8)]=et(_0x435349['customBlocks'],_0x22f04c,_0x302aed),_0x435349[_0x47806b(0x220)]=(_0x512d60=rt((_0x4c5d81=_0x435349[_0x47806b(0x220)])==null?void 0x0:_0x4c5d81[_0x47806b(0x259)](_0x1284f9=>({..._0x1284f9,'startIndex':_0x1284f9['st'],'endIndex':_0x1284f9['ed']})),_0x22f04c,_0x302aed))==null?void 0x0:_0x512d60[_0x47806b(0x259)](_0x3953f7=>{let {startIndex:_0x16bdaa,endIndex:_0x4740da,..._0x3ed05c}=_0x3953f7;return{..._0x3ed05c,'st':_0x16bdaa,'ed':_0x4740da};}),_0x435349[_0x47806b(0x20d)]=rt(_0x435349[_0x47806b(0x20d)],_0x22f04c,_0x302aed),_0x435349[_0x47806b(0x244)]=D(_0x435349['columnGroups'],_0x22f04c,_0x302aed),_0x435349[_0x47806b(0x1c4)]=D(_0x435349[_0x47806b(0x1c4)],_0x22f04c,_0x302aed),_0x435349[_0x47806b(0x245)]=D(_0x435349['customDecorations'],_0x22f04c,_0x302aed),_0x435349['blockRanges']=D(_0x435349[_0x47806b(0x1c3)],_0x22f04c,_0x302aed);}function $e(_0x1c0d9e,_0x357c9e,_0xb6cd01){const _0x594658=_0xb81d4c;return _0x1c0d9e==null?void 0x0:_0x1c0d9e[_0x594658(0x259)](_0x2b1e62=>_0x2b1e62['startIndex']>=_0x357c9e?{..._0x2b1e62,'startIndex':_0x2b1e62['startIndex']+_0xb6cd01}:_0x2b1e62);}function et(_0x35c7ca,_0x4f3954,_0x19dd5f){const _0x484e0c=_0xb81d4c;let _0x2d4610=_0x4f3954+_0x19dd5f;return _0x35c7ca==null?void 0x0:_0x35c7ca[_0x484e0c(0x259)](_0x462a3b=>_0x462a3b[_0x484e0c(0x23b)]>=_0x4f3954&&_0x462a3b[_0x484e0c(0x23b)]<_0x2d4610?null:_0x462a3b[_0x484e0c(0x23b)]>=_0x2d4610?{..._0x462a3b,'startIndex':_0x462a3b[_0x484e0c(0x23b)]-_0x19dd5f}:_0x462a3b)[_0x484e0c(0x21d)](_0x32ff70=>_0x32ff70!=null);}function tt(_0xede946,_0x5ad772,_0x519a4a){return _0xede946==null?void 0x0:_0xede946['map'](_0x408d6f=>_0x408d6f['st']>=_0x5ad772?{..._0x408d6f,'st':_0x408d6f['st']+_0x519a4a,'ed':_0x408d6f['ed']+_0x519a4a}:_0x408d6f['ed']>_0x5ad772?{..._0x408d6f,'ed':_0x408d6f['ed']+_0x519a4a}:_0x408d6f);}function E(_0x3a7734,_0x2bde18,_0x480011){const _0x477aa4=_0xb81d4c;return _0x3a7734==null?void 0x0:_0x3a7734[_0x477aa4(0x259)](_0x549af3=>_0x21d172(_0x549af3,_0x2bde18,_0x480011));}function nt(_0x4c63cb,_0x4fb8,_0x236e1b){const _0x20ba95=_0xb81d4c;return _0x4c63cb==null?void 0x0:_0x4c63cb[_0x20ba95(0x259)](_0x38f569=>_0x190d1a(_0x38f569,_0x4fb8,_0x236e1b));}function D(_0x5e162c,_0x57bc7a,_0xa07f8d){const _0x20bb09=_0xb81d4c;return _0x5e162c==null?void 0x0:_0x5e162c['map'](_0x4e4111=>_0x4ab3ac(_0x4e4111,_0x57bc7a,_0xa07f8d))[_0x20bb09(0x21d)](_0x5a9d75=>_0x5a9d75!=null);}function rt(_0x2957d5,_0x4231ba,_0x5e0141){const _0x38e6b1=_0xb81d4c;return _0x2957d5==null?void 0x0:_0x2957d5[_0x38e6b1(0x259)](_0x2c24a5=>_0x463586(_0x2c24a5,_0x4231ba,_0x5e0141))[_0x38e6b1(0x21d)](_0xe282a=>_0xe282a!=null);}function O(_0x3fb3f4){const _0x49b8d6=_0xb81d4c;if(!_0x3fb3f4[_0x49b8d6(0x1c7)])throw Error(_0x49b8d6(0x192));return _0x3fb3f4[_0x49b8d6(0x1c7)];}function k(_0x49d5ba){'@babel/helpers - typeof';const _0x569560=_0xb81d4c;return k=typeof Symbol==_0x569560(0x1f9)&&typeof Symbol[_0x569560(0x1bf)]==_0x569560(0x17f)?function(_0x4f3f0d){return typeof _0x4f3f0d;}:function(_0x57823b){const _0x888a46=_0x569560;return _0x57823b&&typeof Symbol=='function'&&_0x57823b['constructor']===Symbol&&_0x57823b!==Symbol[_0x888a46(0x1d8)]?_0x888a46(0x17f):typeof _0x57823b;},k(_0x49d5ba);}function it(_0x2786f5,_0x258a9e){const _0x53ec01=_0xb81d4c;if(k(_0x2786f5)!=_0x53ec01(0x234)||!_0x2786f5)return _0x2786f5;var _0xe56c7e;if(typeof Symbol<'u'&&(_0xe56c7e=_0x2786f5[Symbol[_0x53ec01(0x233)]])!==void 0x0){var _0x55369e=_0xe56c7e['call'](_0x2786f5,_0x258a9e||'default');if(k(_0x55369e)!=_0x53ec01(0x234))return _0x55369e;throw TypeError(_0x53ec01(0x1bd));}return(_0x258a9e===_0x53ec01(0x1fc)?String:Number)(_0x2786f5);}function at(_0x6a4a1a){const _0x58d84d=_0xb81d4c;var _0xa1395=it(_0x6a4a1a,_0x58d84d(0x1fc));return k(_0xa1395)==_0x58d84d(0x17f)?_0xa1395:_0xa1395+'';}function A(_0x2e633d,_0x137df1,_0x1da17a){const _0x53a73e=_0xb81d4c;return(_0x137df1=at(_0x137df1))in _0x2e633d?Object[_0x53a73e(0x23a)](_0x2e633d,_0x137df1,{'value':_0x1da17a,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x2e633d[_0x137df1]=_0x1da17a,_0x2e633d;}var j=class extends _0xf99196{constructor(..._0x199dd4){const _0x5e8a35=_0xb81d4c;super(..._0x199dd4),A(this,_0x5e8a35(0x1c2),new Map()),A(this,_0x5e8a35(0x1b7),new Map()),A(this,'_loadErrors',new Map()),A(this,_0x5e8a35(0x223),new _0x45c46f()),A(this,_0x5e8a35(0x1ac),this[_0x5e8a35(0x223)][_0x5e8a35(0x1b8)]());}[_0xb81d4c(0x1d9)](_0x5a8645,_0xd5e0f6){const _0x435d9c=_0xb81d4c;var _0x36d223;let _0x290c31=(_0x36d223=this[_0x435d9c(0x1c2)][_0x435d9c(0x202)](_0x5a8645))==null?void 0x0:_0x36d223[_0x435d9c(0x18d)][_0xd5e0f6];return _0x290c31?_0x541130[_0x435d9c(0x211)](_0x290c31):void 0x0;}['getFormulas'](_0x556c20){const _0x31b166=_0xb81d4c;var _0x49dbae;return _0x541130[_0x31b166(0x211)](((_0x49dbae=this[_0x31b166(0x1c2)]['get'](_0x556c20))==null?void 0x0:_0x49dbae['formulas'])??{});}[_0xb81d4c(0x1db)](_0x38513f){const _0x4a52a0=_0xb81d4c;let _0x1929ab=this[_0x4a52a0(0x1c2)][_0x4a52a0(0x202)](_0x38513f);return _0x1929ab?_0x541130['deepClone'](_0x1929ab):void 0x0;}['setFormula'](_0x42b353,_0x4907ed,_0x1f8281){const _0x2aadfc=_0xb81d4c;return this[_0x2aadfc(0x20e)](_0x42b353,{[_0x4907ed]:_0x1f8281});}[_0xb81d4c(0x1b2)](_0x19cbe6,_0x243e2b){const _0x344b05=_0xb81d4c;return this[_0x344b05(0x25a)][_0x344b05(0x22f)](_0x19cbe6)||!x(_0x243e2b)?!0x1:(this[_0x344b05(0x1c2)][_0x344b05(0x232)](_0x19cbe6,{'formulas':_0x541130['deepClone'](_0x243e2b[_0x344b05(0x18d)])}),this[_0x344b05(0x223)][_0x344b05(0x1c8)]({'unitId':_0x19cbe6}),!0x0);}['setFormulas'](_0x29a05c,_0x58d572){const _0xc06b82=_0xb81d4c;if(this[_0xc06b82(0x25a)]['has'](_0x29a05c)||!Object['keys'](_0x58d572)[_0xc06b82(0x1f2)]||!x({'formulas':_0x58d572}))return!0x1;let _0x6807e4=this[_0xc06b82(0x1c2)][_0xc06b82(0x202)](_0x29a05c)??b(),_0x1ee37c=_0x541130[_0xc06b82(0x211)](_0x6807e4);return Object[_0xc06b82(0x183)](_0x1ee37c[_0xc06b82(0x18d)],_0x541130[_0xc06b82(0x211)](_0x58d572)),this[_0xc06b82(0x1c2)][_0xc06b82(0x232)](_0x29a05c,_0x1ee37c),this[_0xc06b82(0x223)]['next']({'unitId':_0x29a05c,'rangeIds':Object[_0xc06b82(0x1a6)](_0x58d572)}),!0x0;}[_0xb81d4c(0x1d0)](_0x2592e2,_0xe20e11){const _0x4b0976=_0xb81d4c;if(this[_0x4b0976(0x25a)][_0x4b0976(0x22f)](_0x2592e2))return!0x1;let _0x20a284=this['_resources']['get'](_0x2592e2);if(!(_0x20a284!=null&&_0x20a284[_0x4b0976(0x18d)][_0xe20e11]))return!0x1;let _0x2fc32a=_0x541130[_0x4b0976(0x211)](_0x20a284);return delete _0x2fc32a[_0x4b0976(0x18d)][_0xe20e11],this[_0x4b0976(0x1c2)]['set'](_0x2592e2,_0x2fc32a),this['_change$'][_0x4b0976(0x1c8)]({'unitId':_0x2592e2,'rangeIds':[_0xe20e11]}),!0x0;}[_0xb81d4c(0x1bc)](_0x373bea,_0x2aa023){const _0xa9ca41=_0xb81d4c;return x(_0x2aa023)?(this[_0xa9ca41(0x1c2)][_0xa9ca41(0x232)](_0x373bea,{'formulas':_0x541130['deepClone'](_0x2aa023[_0xa9ca41(0x18d)])}),this['_rawResources'][_0xa9ca41(0x207)](_0x373bea),this[_0xa9ca41(0x25a)][_0xa9ca41(0x207)](_0x373bea),this[_0xa9ca41(0x223)][_0xa9ca41(0x1c8)]({'unitId':_0x373bea}),!0x0):(this[_0xa9ca41(0x221)](_0x373bea,_0x2aa023,_0xa9ca41(0x170)),!0x1);}['serialize'](_0x1a4ff4){const _0x39ede2=_0xb81d4c;let _0x674110=this[_0x39ede2(0x1c2)][_0x39ede2(0x202)](_0x1a4ff4);return _0x674110?_0x541130[_0x39ede2(0x211)](_0x674110):this[_0x39ede2(0x1b7)][_0x39ede2(0x22f)](_0x1a4ff4)?_0x541130[_0x39ede2(0x211)](this[_0x39ede2(0x1b7)][_0x39ede2(0x202)](_0x1a4ff4)):b();}[_0xb81d4c(0x20b)](_0xcd0641){const _0x1546d8=_0xb81d4c;return this[_0x1546d8(0x25a)]['get'](_0xcd0641);}[_0xb81d4c(0x241)](_0x1484a4){const _0x37ada4=_0xb81d4c;this[_0x37ada4(0x1c2)][_0x37ada4(0x207)](_0x1484a4),this[_0x37ada4(0x1b7)][_0x37ada4(0x207)](_0x1484a4),this[_0x37ada4(0x25a)][_0x37ada4(0x207)](_0x1484a4),this[_0x37ada4(0x223)][_0x37ada4(0x1c8)]({'unitId':_0x1484a4});}['dispose'](){const _0x3d6541=_0xb81d4c;this[_0x3d6541(0x1c2)][_0x3d6541(0x208)](),this[_0x3d6541(0x1b7)][_0x3d6541(0x208)](),this[_0x3d6541(0x25a)][_0x3d6541(0x208)](),this['_change$'][_0x3d6541(0x240)](),super[_0x3d6541(0x21f)]();}['_preserveInvalid'](_0x2b188f,_0x2b41ea,_0x289765){const _0x4cbce1=_0xb81d4c;this[_0x4cbce1(0x1c2)][_0x4cbce1(0x207)](_0x2b188f),this[_0x4cbce1(0x1b7)][_0x4cbce1(0x232)](_0x2b188f,_0x541130[_0x4cbce1(0x211)](_0x2b41ea)),this[_0x4cbce1(0x25a)][_0x4cbce1(0x232)](_0x2b188f,_0x289765),this['_change$'][_0x4cbce1(0x1c8)]({'unitId':_0x2b188f});}};let ot=function(_0x1e79df){const _0x57ce53=_0xb81d4c;return _0x1e79df[_0x57ce53(0x20c)]='empty',_0x1e79df[_0x57ce53(0x22c)]='pending',_0x1e79df[_0x57ce53(0x165)]=_0x57ce53(0x225),_0x1e79df['ERROR']=_0x57ce53(0x17c),_0x1e79df;}({});function M(_0x483d95,_0x11c4c2){return function(_0x10bef2,_0x5b66b9){_0x11c4c2(_0x10bef2,_0x5b66b9,_0x483d95);};}function N(_0x1b1c2d,_0x5c1815,_0x227afb,_0x3d816b){const _0x53728d=_0xb81d4c;var _0x3ed342=arguments[_0x53728d(0x1f2)],_0x11b751=_0x3ed342<0x3?_0x5c1815:_0x3d816b===null?_0x3d816b=Object[_0x53728d(0x1cf)](_0x5c1815,_0x227afb):_0x3d816b,_0x1fd928;if(typeof Reflect==_0x53728d(0x234)&&typeof Reflect['decorate']==_0x53728d(0x1f9))_0x11b751=Reflect['decorate'](_0x1b1c2d,_0x5c1815,_0x227afb,_0x3d816b);else{for(var _0xbe674d=_0x1b1c2d[_0x53728d(0x1f2)]-0x1;_0xbe674d>=0x0;_0xbe674d--)(_0x1fd928=_0x1b1c2d[_0xbe674d])&&(_0x11b751=(_0x3ed342<0x3?_0x1fd928(_0x11b751):_0x3ed342>0x3?_0x1fd928(_0x5c1815,_0x227afb,_0x11b751):_0x1fd928(_0x5c1815,_0x227afb))||_0x11b751);}return _0x3ed342>0x3&&_0x11b751&&Object[_0x53728d(0x23a)](_0x5c1815,_0x227afb,_0x11b751),_0x11b751;}let P=class extends _0xf99196{constructor(_0x53a403,_0x3c79e3,_0x26bf7f){const _0x5e24ef=_0xb81d4c;super(),this[_0x5e24ef(0x1b1)]=_0x53a403,this[_0x5e24ef(0x1e6)]=_0x3c79e3,this[_0x5e24ef(0x191)]=_0x26bf7f,A(this,_0x5e24ef(0x228),new Map()),A(this,_0x5e24ef(0x1e0),new Map()),A(this,_0x5e24ef(0x239),new _0x45c46f()),A(this,'presentationChanged$',this[_0x5e24ef(0x239)]['asObservable']()),this[_0x5e24ef(0x16e)](this[_0x5e24ef(0x1e6)][_0x5e24ef(0x174)][_0x5e24ef(0x204)](_0x4ebe76=>{const _0x508896=_0x5e24ef;for(let _0x278a36 of Object['values'](_0x4ebe76))for(let _0x558980 of Object[_0x508896(0x214)](_0x278a36))_0x558980[_0x508896(0x171)](_0x5479eb=>this['_updateFormulaResult'](_0x5479eb));}));}['syncUnit'](_0x45a940){const _0x533696=_0xb81d4c;var _0x54cab7;let _0x349a33=_0x45a940[_0x533696(0x22a)](),_0x19f1f3=((_0x54cab7=_0x45a940[_0x533696(0x1e5)]()['body'])==null||(_0x54cab7=_0x54cab7[_0x533696(0x1c4)])==null?void 0x0:_0x54cab7['filter'](w))??[],_0x310f8c=this[_0x533696(0x1b1)]['getFormulas'](_0x349a33),_0x10f5b6=new Set();for(let _0xa85a8f of _0x19f1f3){let _0x14648a=_0x310f8c[_0xa85a8f[_0x533696(0x1dd)]];_0x14648a&&(_0x10f5b6['add'](F(_0x349a33,_0xa85a8f[_0x533696(0x1dd)])),this[_0x533696(0x195)]({'unitId':_0x349a33,'rangeId':_0xa85a8f[_0x533696(0x1dd)]},_0x14648a));}for(let _0x3ed150 of Array['from'](this['_registrations']['values']()))_0x3ed150[_0x533696(0x1a1)]===_0x349a33&&!_0x10f5b6[_0x533696(0x22f)](F(_0x3ed150[_0x533696(0x1a1)],_0x3ed150[_0x533696(0x1dd)]))&&this[_0x533696(0x1f7)](_0x3ed150);}[_0xb81d4c(0x195)](_0x221098,_0x442d54){const _0x3e8559=_0xb81d4c;let _0x1b5499=F(_0x221098[_0x3e8559(0x1a1)],_0x221098['rangeId']),_0x4d9aa1=this[_0x3e8559(0x228)][_0x3e8559(0x202)](_0x1b5499),_0x35b757=this[_0x3e8559(0x191)][_0x3e8559(0x258)](_0x221098[_0x3e8559(0x1a1)]);if(_0x4d9aa1&&_0x4d9aa1[_0x3e8559(0x1c1)][_0x3e8559(0x1f0)]===_0x442d54[_0x3e8559(0x1f0)]&&_0x4d9aa1['referenceRevision']===_0x35b757){_0x4d9aa1['config']=_0x442d54;let _0x5f0606=_0x4d9aa1[_0x3e8559(0x184)]?this[_0x3e8559(0x1e6)]['getFormulaValueSync'](_0x4d9aa1[_0x3e8559(0x1a1)],_0x4d9aa1['unitId'],_0x4d9aa1[_0x3e8559(0x184)])??void 0x0:void 0x0;_0x4d9aa1['liveResult']=_0x5f0606,this[_0x3e8559(0x1f6)](_0x1b5499,st(_0x442d54,_0x5f0606));return;}_0x4d9aa1!=null&&_0x4d9aa1['formulaId']&&this['_deleteRegistration'](_0x4d9aa1);let _0x212fb6={..._0x221098,'config':_0x442d54,'referenceRevision':_0x35b757,'presentation':st(_0x442d54,void 0x0)};if(this[_0x3e8559(0x228)][_0x3e8559(0x232)](_0x1b5499,_0x212fb6),!_0x442d54[_0x3e8559(0x1f0)][_0x3e8559(0x24d)]())return;let _0x312f01=this['_registrationService'][_0x3e8559(0x243)](_0x221098[_0x3e8559(0x1a1)],_0x221098[_0x3e8559(0x1a1)],_0x442d54[_0x3e8559(0x1f0)],void 0x0,{'rangeId':_0x221098[_0x3e8559(0x1dd)]},_0x5593a7[_0x3e8559(0x217)],_0x221098[_0x3e8559(0x1dd)]);_0x212fb6[_0x3e8559(0x184)]=_0x312f01,this[_0x3e8559(0x1e0)][_0x3e8559(0x232)](_0x312f01,_0x1b5499);}[_0xb81d4c(0x1f7)](_0x18c02d){const _0x4129de=_0xb81d4c;let _0x47e2af=F(_0x18c02d[_0x4129de(0x1a1)],_0x18c02d[_0x4129de(0x1dd)]),_0x4792c2=this[_0x4129de(0x228)][_0x4129de(0x202)](_0x47e2af);_0x4792c2&&(this[_0x4129de(0x1ff)](_0x4792c2),this[_0x4129de(0x228)][_0x4129de(0x207)](_0x47e2af));}[_0xb81d4c(0x16c)](_0x488548){const _0x406cf8=_0xb81d4c;for(let _0x5dd8ed of Array[_0x406cf8(0x1a7)](this[_0x406cf8(0x228)][_0x406cf8(0x214)]()))_0x5dd8ed[_0x406cf8(0x1a1)]===_0x488548&&this['unregister'](_0x5dd8ed);}[_0xb81d4c(0x213)](_0x570e32){const _0x4b000d=_0xb81d4c;var _0x33ee7d;return(_0x33ee7d=this[_0x4b000d(0x228)][_0x4b000d(0x202)](F(_0x570e32[_0x4b000d(0x1a1)],_0x570e32[_0x4b000d(0x1dd)])))==null?void 0x0:_0x33ee7d[_0x4b000d(0x23c)];}[_0xb81d4c(0x227)](_0x44078b){const _0x21e32f=_0xb81d4c;let _0x33639f=this[_0x21e32f(0x228)]['get'](F(_0x44078b[_0x21e32f(0x1a1)],_0x44078b['rangeId']));return _0x33639f?I(_0x33639f):void 0x0;}['getRegisteredFormulas'](){const _0x573795=_0xb81d4c;return Array['from'](this[_0x573795(0x228)][_0x573795(0x214)](),_0x406a3e=>({'identity':{'unitId':_0x406a3e['unitId'],'rangeId':_0x406a3e['rangeId']},'config':_0x406a3e[_0x573795(0x1c1)],'referenceRevision':_0x406a3e[_0x573795(0x1a0)],..._0x406a3e[_0x573795(0x24a)]?{'liveResult':_0x406a3e['liveResult']}:null}));}[_0xb81d4c(0x21f)](){const _0x1b2b09=_0xb81d4c;for(let _0x352099 of this['_registrations']['values']())this['_deleteRegistration'](_0x352099);this[_0x1b2b09(0x228)]['clear'](),this[_0x1b2b09(0x1e0)][_0x1b2b09(0x208)](),this[_0x1b2b09(0x239)]['complete'](),super[_0x1b2b09(0x21f)]();}[_0xb81d4c(0x242)](_0x665f40){const _0x147fb7=_0xb81d4c;let _0x56db0c=this[_0x147fb7(0x1e0)][_0x147fb7(0x202)](_0x665f40[_0x147fb7(0x184)]),_0x412b97=_0x56db0c?this[_0x147fb7(0x228)][_0x147fb7(0x202)](_0x56db0c):void 0x0;_0x56db0c&&_0x412b97&&(_0x412b97[_0x147fb7(0x24a)]=_0x665f40,this[_0x147fb7(0x1f6)](_0x56db0c,st(_0x412b97[_0x147fb7(0x1c1)],_0x665f40)));}['_setPresentation'](_0x26cc11,_0x385169){const _0x270d6d=_0xb81d4c;var _0x23bfd0,_0x129b0b;let _0x598434=this[_0x270d6d(0x228)][_0x270d6d(0x202)](_0x26cc11);if(!_0x598434||ct(_0x598434[_0x270d6d(0x23c)],_0x385169))return;let _0x378708=_0x598434[_0x270d6d(0x23c)],_0x477f7a=I(_0x598434);_0x598434[_0x270d6d(0x23c)]=_0x385169,this[_0x270d6d(0x239)][_0x270d6d(0x1c8)]({'unitId':_0x598434[_0x270d6d(0x1a1)],'rangeId':_0x598434[_0x270d6d(0x1dd)],'presentation':_0x385169,'previousPresentation':_0x378708,'result':I(_0x598434),'previousResult':{..._0x477f7a,..._0x378708,'value':(_0x23bfd0=_0x378708[_0x270d6d(0x20a)])==null?void 0x0:_0x23bfd0['v'],'valueType':((_0x129b0b=_0x378708['cell'])==null?void 0x0:_0x129b0b['t'])??void 0x0}});}[_0xb81d4c(0x1ff)](_0x3c4204){const _0x2e9203=_0xb81d4c;_0x3c4204[_0x2e9203(0x184)]&&(this['_registrationService'][_0x2e9203(0x212)](_0x3c4204[_0x2e9203(0x1a1)],_0x3c4204[_0x2e9203(0x1a1)],[_0x3c4204[_0x2e9203(0x184)]]),this['_formulaKeys'][_0x2e9203(0x207)](_0x3c4204[_0x2e9203(0x184)]));}};P=N([M(0x0,_0x3abf00(j)),M(0x1,_0x3abf00(_0x3b74c8)),M(0x2,_0x3abf00(_0x2be22c))],P);function F(_0x1a5cae,_0x7d250){return _0x1a5cae+'\x00'+_0x7d250;}function st(_0x31402a,_0xcfc749){const _0x3fbbf0=_0xb81d4c;return _0x157ca0({'numberFormat':_0x31402a[_0x3fbbf0(0x19e)],'lastValue':_0x31402a[_0x3fbbf0(0x1ed)],'result':_0xcfc749});}function I(_0x31b3a2){const _0x271cf5=_0xb81d4c;var _0x57ebaf,_0x508093,_0x5674b9;let _0x126091=_0x31b3a2[_0x271cf5(0x23c)],_0x2de832=_0x31b3a2[_0x271cf5(0x1c1)][_0x271cf5(0x1f0)][_0x271cf5(0x24d)]()?_0x126091['stale']||_0x126091[_0x271cf5(0x20a)]==null?_0x271cf5(0x1a5):((_0x57ebaf=_0x31b3a2[_0x271cf5(0x24a)])==null?void 0x0:_0x57ebaf[_0x271cf5(0x16f)])===_0xd61d8b['ERROR']?'error':_0x271cf5(0x225):_0x271cf5(0x25b);return{..._0x126091,'status':_0x2de832,'value':(_0x508093=_0x126091[_0x271cf5(0x20a)])==null?void 0x0:_0x508093['v'],'valueType':((_0x5674b9=_0x126091[_0x271cf5(0x20a)])==null?void 0x0:_0x5674b9['t'])??void 0x0};}function ct(_0x2bb7a7,_0x455e94){const _0x116f58=_0xb81d4c;var _0x1cd48d,_0x3112c5,_0x1ad937,_0x16f10b;return _0x2bb7a7[_0x116f58(0x24e)]===_0x455e94[_0x116f58(0x24e)]&&_0x2bb7a7[_0x116f58(0x22b)]===_0x455e94[_0x116f58(0x22b)]&&_0x2bb7a7['pattern']===_0x455e94['pattern']&&_0x2bb7a7[_0x116f58(0x193)]===_0x455e94[_0x116f58(0x193)]&&_0x2bb7a7[_0x116f58(0x252)]===_0x455e94['stale']&&((_0x1cd48d=_0x2bb7a7[_0x116f58(0x20a)])==null?void 0x0:_0x1cd48d['t'])===((_0x3112c5=_0x455e94[_0x116f58(0x20a)])==null?void 0x0:_0x3112c5['t'])&&Object['is']((_0x1ad937=_0x2bb7a7[_0x116f58(0x20a)])==null?void 0x0:_0x1ad937['v'],(_0x16f10b=_0x455e94[_0x116f58(0x20a)])==null?void 0x0:_0x16f10b['v']);}const lt={'id':_0xb81d4c(0x17a),'type':_0x599208[_0xb81d4c(0x255)],'handler':(_0x2d7335,_0x4f8636)=>!(_0x4f8636!=null&&_0x4f8636['unitId'])||!_0x4f8636[_0xb81d4c(0x1dd)]||!_0x4f8636[_0xb81d4c(0x1c1)]?!0x1:_0x2d7335[_0xb81d4c(0x202)](j)['setFormula'](_0x4f8636['unitId'],_0x4f8636[_0xb81d4c(0x1dd)],_0x4f8636['config'])},ut={'id':_0xb81d4c(0x1f8),'type':_0x599208['MUTATION'],'handler':(_0x153242,_0x5c3073)=>!(_0x5c3073!=null&&_0x5c3073[_0xb81d4c(0x1a1)])||!_0x5c3073['rangeId']?!0x1:_0x153242[_0xb81d4c(0x202)](j)[_0xb81d4c(0x1d0)](_0x5c3073[_0xb81d4c(0x1a1)],_0x5c3073[_0xb81d4c(0x1dd)])},L={'id':_0xb81d4c(0x1cd),'type':_0x599208[_0xb81d4c(0x255)],'handler':(_0x3b672b,_0x1db447)=>!(_0x1db447!=null&&_0x1db447[_0xb81d4c(0x1a1)])||!_0x1db447[_0xb81d4c(0x1e3)]?!0x1:_0x3b672b['get'](j)[_0xb81d4c(0x1b2)](_0x1db447[_0xb81d4c(0x1a1)],_0x1db447['resource'])},R={'id':_0xb81d4c(0x1d1),'type':_0x599208['MUTATION'],'handler':(_0x17f836,_0x43ebe7)=>{const _0x3fa37c=_0xb81d4c;if(!(_0x43ebe7!=null&&_0x43ebe7['unitId'])||!_0x43ebe7['updates'][_0x3fa37c(0x1f2)])return!0x1;let _0x5bc5a1=_0x17f836[_0x3fa37c(0x202)](j),_0x3f0f0a=_0x17f836[_0x3fa37c(0x202)](_0x2be22c),_0x3978f9=_0x5bc5a1[_0x3fa37c(0x1db)](_0x43ebe7[_0x3fa37c(0x1a1)]);if(!_0x3978f9)return!0x1;let _0x3bdff3=_0x541130[_0x3fa37c(0x211)](_0x3978f9),_0x3d7541=!0x1;for(let _0x446995 of _0x43ebe7['updates']){var _0x587c3f,_0x2ec82a,_0x4c477a,_0x38e441;let _0x110b6a=_0x3bdff3[_0x3fa37c(0x18d)][_0x446995[_0x3fa37c(0x1dd)]];_0x110b6a&&_0x110b6a[_0x3fa37c(0x1f0)]===_0x446995[_0x3fa37c(0x248)]&&((_0x587c3f=_0x110b6a[_0x3fa37c(0x19e)])==null?void 0x0:_0x587c3f[_0x3fa37c(0x168)])===_0x446995[_0x3fa37c(0x20f)]&&_0x3f0f0a[_0x3fa37c(0x258)](_0x43ebe7[_0x3fa37c(0x1a1)])===_0x446995[_0x3fa37c(0x229)]&&(((_0x2ec82a=_0x110b6a[_0x3fa37c(0x1ed)])==null?void 0x0:_0x2ec82a['v'])!==_0x446995['lastValue']['v']||((_0x4c477a=_0x110b6a[_0x3fa37c(0x1ed)])==null?void 0x0:_0x4c477a['t'])!==_0x446995[_0x3fa37c(0x1ed)]['t']||((_0x38e441=_0x110b6a['lastValue'])==null?void 0x0:_0x38e441[_0x3fa37c(0x168)])!==_0x446995[_0x3fa37c(0x1ed)][_0x3fa37c(0x168)])&&(_0x110b6a[_0x3fa37c(0x1ed)]=_0x541130[_0x3fa37c(0x211)](_0x446995['lastValue']),_0x3d7541=!0x0);}return!_0x3d7541||_0x5bc5a1[_0x3fa37c(0x1b2)](_0x43ebe7[_0x3fa37c(0x1a1)],_0x3bdff3);}},z={'id':_0xb81d4c(0x1af),'type':_0x599208[_0xb81d4c(0x237)],'handler':(_0x1094f5,_0x5b3ba8)=>{const _0x3951eb=_0xb81d4c;if(!(_0x5b3ba8!=null&&_0x5b3ba8[_0x3951eb(0x1f0)][_0x3951eb(0x24d)]()))return!0x1;let _0x9220f6=K(_0x1094f5,_0x5b3ba8[_0x3951eb(0x1a1)],'');if(!_0x9220f6)return!0x1;let _0x46f302=ft(_0x5b3ba8[_0x3951eb(0x24c)],_0x9220f6[_0x3951eb(0x1c7)],dt(_0x1094f5,_0x9220f6[_0x3951eb(0x1a1)]));if(!_0x46f302)return!0x1;let _0x433bd6=pt(_0x1094f5,_0x9220f6[_0x3951eb(0x1a1)],_0x5b3ba8[_0x3951eb(0x1f0)],_0x5b3ba8[_0x3951eb(0x176)]??[]);if(!_0x433bd6)return!0x1;let _0xd5f0f=mt(_0x9220f6[_0x3951eb(0x1c7)],_0x9220f6[_0x3951eb(0x230)],_0x9220f6[_0x3951eb(0x1a1)]),_0x22f9bb=ht({'documentData':_0x9220f6[_0x3951eb(0x1ba)],'resource':_0x9220f6[_0x3951eb(0x1e3)],'rangeId':_0xd5f0f,'config':{'formula':_0x5b3ba8['formula'],..._0x5b3ba8[_0x3951eb(0x19e)]?{'numberFormat':_0x5b3ba8[_0x3951eb(0x19e)]}:null},'startOffset':_0x46f302[_0x3951eb(0x1b9)],'endOffset':_0x46f302['endOffset']});if(!_0x22f9bb)return!0x1;let _0x54df7f=_0x5f5499(_0x1094f5,_0x9220f6['unitId'],_0x433bd6);return!_0x54df7f||!q({'accessor':_0x1094f5,'document':_0x9220f6[_0x3951eb(0x1d6)],'unitId':_0x9220f6['unitId'],'trigger':z['id'],'rangeId':_0xd5f0f,'previousResource':_0x9220f6[_0x3951eb(0x1e3)],'nextResource':_0x22f9bb[_0x3951eb(0x1ec)],'previousDocumentData':_0x9220f6['documentData'],'nextDocumentData':_0x22f9bb[_0x3951eb(0x200)],'cursorOffset':_0x22f9bb[_0x3951eb(0x173)],'externalMutations':_0x54df7f})?!0x1:{'rangeId':_0xd5f0f,'startOffset':_0x22f9bb['cursorOffset']-0x1,'endOffset':_0x22f9bb[_0x3951eb(0x173)]};}},B={'id':'docs-formula.command.update','type':_0x599208[_0xb81d4c(0x237)],'handler':(_0x6de73,_0x41ef41)=>{const _0x44f417=_0xb81d4c;if(!(_0x41ef41!=null&&_0x41ef41[_0x44f417(0x1dd)])||!_0x41ef41[_0x44f417(0x1f0)][_0x44f417(0x24d)]())return!0x1;let _0xab7eb=K(_0x6de73,_0x41ef41[_0x44f417(0x1a1)],''),_0x34569a=_0xab7eb==null?void 0x0:_0xab7eb['model']['getFormula'](_0xab7eb[_0x44f417(0x1a1)],_0x41ef41[_0x44f417(0x1dd)]),_0x55c09f=_0xab7eb?T(_0xab7eb[_0x44f417(0x1ba)][_0x44f417(0x1c7)],_0x41ef41[_0x44f417(0x1dd)]):void 0x0;if(!_0xab7eb||!_0x34569a||!_0x55c09f)return!0x1;let _0x2ceccc=pt(_0x6de73,_0xab7eb[_0x44f417(0x1a1)],_0x41ef41['formula'],_0x41ef41['externalReferences']??[]);if(!_0x2ceccc)return!0x1;let _0x2d8d91=_0x5f5499(_0x6de73,_0xab7eb[_0x44f417(0x1a1)],_0x2ceccc);if(!_0x2d8d91)return!0x1;let _0x477b8d=St(_0xab7eb[_0x44f417(0x1e3)]);return _0x477b8d[_0x44f417(0x18d)][_0x41ef41[_0x44f417(0x1dd)]]={'formula':_0x41ef41['formula'],..._0x41ef41[_0x44f417(0x19e)]?{'numberFormat':_0x41ef41[_0x44f417(0x19e)]}:_0x34569a['numberFormat']?{'numberFormat':_0x34569a['numberFormat']}:null},q({'accessor':_0x6de73,'document':_0xab7eb['document'],'unitId':_0xab7eb[_0x44f417(0x1a1)],'trigger':B['id'],'rangeId':_0x41ef41['rangeId'],'previousResource':_0xab7eb[_0x44f417(0x1e3)],'nextResource':_0x477b8d,'cursorOffset':_0x55c09f[_0x44f417(0x218)]+0x1,'externalMutations':_0x2d8d91});}},V={'id':'docs-formula.command.set-number-format','type':_0x599208[_0xb81d4c(0x237)],'handler':(_0x220b6e,_0x1e5374)=>{const _0x4016bf=_0xb81d4c;if(!(_0x1e5374!=null&&_0x1e5374[_0x4016bf(0x1dd)]))return!0x1;let _0x2bcae1=K(_0x220b6e,_0x1e5374[_0x4016bf(0x1a1)],''),_0x428977=_0x2bcae1==null?void 0x0:_0x2bcae1[_0x4016bf(0x230)][_0x4016bf(0x1d9)](_0x2bcae1[_0x4016bf(0x1a1)],_0x1e5374[_0x4016bf(0x1dd)]),_0x3a4079=_0x2bcae1?T(_0x2bcae1[_0x4016bf(0x1ba)][_0x4016bf(0x1c7)],_0x1e5374[_0x4016bf(0x1dd)]):void 0x0;if(!_0x2bcae1||!_0x428977||!_0x3a4079)return!0x1;let _0x143eb7=St(_0x2bcae1[_0x4016bf(0x1e3)]);return _0x143eb7[_0x4016bf(0x18d)][_0x1e5374[_0x4016bf(0x1dd)]]={..._0x428977,..._0x1e5374[_0x4016bf(0x19e)]?{'numberFormat':_0x1e5374[_0x4016bf(0x19e)]}:null},_0x1e5374[_0x4016bf(0x19e)]||delete _0x143eb7[_0x4016bf(0x18d)][_0x1e5374[_0x4016bf(0x1dd)]][_0x4016bf(0x19e)],q({'accessor':_0x220b6e,'document':_0x2bcae1[_0x4016bf(0x1d6)],'unitId':_0x2bcae1[_0x4016bf(0x1a1)],'trigger':V['id'],'rangeId':_0x1e5374[_0x4016bf(0x1dd)],'previousResource':_0x2bcae1[_0x4016bf(0x1e3)],'nextResource':_0x143eb7,'cursorOffset':_0x3a4079[_0x4016bf(0x218)]+0x1,'externalMutations':{}});}},H={'id':_0xb81d4c(0x1d2),'type':_0x599208[_0xb81d4c(0x237)],'handler':(_0x29ac9a,_0x589338)=>G(_0x29ac9a,_0x589338,'',H['id'])},U={'id':'docs-formula.command.replace-with-text','type':_0x599208[_0xb81d4c(0x237)],'handler':(_0x3d550d,_0x3f60a5)=>G(_0x3d550d,_0x3f60a5,(_0x3f60a5==null?void 0x0:_0x3f60a5[_0xb81d4c(0x24e)])??'',U['id'])},W={'id':_0xb81d4c(0x1f1),'type':_0x599208[_0xb81d4c(0x237)],'handler':(_0x4a7557,_0x599aba)=>{const _0x58e830=_0xb81d4c;if(!(_0x599aba!=null&&_0x599aba[_0x58e830(0x1dd)]))return!0x1;let _0x473bc8=K(_0x4a7557,_0x599aba[_0x58e830(0x1a1)],'');if(!_0x473bc8)return!0x1;let _0x32bf70=_0x4a7557[_0x58e830(0x202)](P)[_0x58e830(0x227)]({'unitId':_0x473bc8['unitId'],'rangeId':_0x599aba[_0x58e830(0x1dd)]});return _0x32bf70?G(_0x4a7557,_0x599aba,_0x32bf70[_0x58e830(0x24e)],W['id']):!0x1;}};function G(_0x43e2ec,_0x54b02d,_0x527baa,_0x1b8b90){const _0x50eb7b=_0xb81d4c;if(!(_0x54b02d!=null&&_0x54b02d[_0x50eb7b(0x1dd)]))return!0x1;let _0x4ee9b3=K(_0x43e2ec,_0x54b02d[_0x50eb7b(0x1a1)],'');if(!_0x4ee9b3)return!0x1;let _0x231770=ze({'documentData':_0x4ee9b3[_0x50eb7b(0x1ba)],'resource':_0x4ee9b3[_0x50eb7b(0x1e3)],'rangeId':_0x54b02d[_0x50eb7b(0x1dd)],'text':_0x527baa});return _0x231770?q({'accessor':_0x43e2ec,'document':_0x4ee9b3[_0x50eb7b(0x1d6)],'unitId':_0x4ee9b3[_0x50eb7b(0x1a1)],'trigger':_0x1b8b90,'rangeId':_0x54b02d[_0x50eb7b(0x1dd)],'previousResource':_0x4ee9b3['resource'],'nextResource':_0x231770[_0x50eb7b(0x1ec)],'previousDocumentData':_0x4ee9b3[_0x50eb7b(0x1ba)],'nextDocumentData':_0x231770[_0x50eb7b(0x200)],'cursorOffset':_0x231770[_0x50eb7b(0x173)],'externalMutations':{}}):!0x1;}function K(_0x32e53e,_0xb502f3,_0x1388b6){const _0x3a0124=_0xb81d4c;if(_0x1388b6)return null;let _0x18ac5f=_0x32e53e[_0x3a0124(0x202)](_0x1616da),_0x2c75ea=(_0xb502f3?_0x18ac5f[_0x3a0124(0x17d)](_0xb502f3,_0x19d9b2[_0x3a0124(0x1e7)]):_0x18ac5f['getCurrentUnitOfType'](_0x19d9b2['UNIVER_DOC']))??null;if(!_0x2c75ea)return null;let _0x33de2a=_0x2c75ea[_0x3a0124(0x1e5)](),_0x32978c=_0x33de2a['body'];if(_0x33de2a[_0x3a0124(0x201)]||!_0x32978c)return null;let _0x2acddf=_0x32e53e[_0x3a0124(0x202)](j);return _0x2acddf[_0x3a0124(0x20b)](_0x2c75ea[_0x3a0124(0x22a)]())?null:{'document':_0x2c75ea,'body':_0x32978c,'documentData':_0x33de2a,'model':_0x2acddf,'resource':_0x2acddf[_0x3a0124(0x1db)](_0x2c75ea[_0x3a0124(0x22a)]())??b(),'unitId':_0x2c75ea[_0x3a0124(0x22a)]()};}function dt(_0x4bb60a,_0x8ebef4){const _0x2f5d8b=_0xb81d4c;var _0x26dbe2;return(_0x26dbe2=_0x4bb60a[_0x2f5d8b(0x202)](_0x3e1e9b)[_0x2f5d8b(0x179)]({'subUnitId':_0x8ebef4,'unitId':_0x8ebef4}))==null?void 0x0:_0x26dbe2[0x0];}function ft(_0x2b9bff,_0x20e555,_0x333c11){const _0x2ef887=_0xb81d4c;if((_0x2b9bff==null?void 0x0:_0x2b9bff[_0x2ef887(0x178)])===_0x2ef887(0x1fb)){var _0x4d2b6c;let _0x4feb8d=((_0x4d2b6c=_0x20e555[_0x2ef887(0x1de)])==null?void 0x0:_0x4d2b6c['filter'](_0x273f5b=>_0x273f5b[_0x2ef887(0x1b5)]===_0x2b9bff[_0x2ef887(0x1b5)]))??[];if(_0x4feb8d['length']!==0x1)return null;let _0x59505c=_0x4feb8d[0x0],_0x1f63f8=_0x13c716(_0x20e555,_0x59505c),_0x509174=_0x59505c['startIndex']-_0x1f63f8,_0xbdf274=_0x2b9bff[_0x2ef887(0x17b)]===_0x2ef887(0x205)?_0x509174:_0x2b9bff[_0x2ef887(0x17b)];if(!Number[_0x2ef887(0x197)](_0xbdf274)||_0xbdf274<0x0||_0xbdf274>_0x509174)return null;let _0x2e5e44=_0x1f63f8+_0xbdf274;return{'startOffset':_0x2e5e44,'endOffset':_0x2e5e44};}if((_0x2b9bff==null?void 0x0:_0x2b9bff[_0x2ef887(0x178)])==='range')return!Number[_0x2ef887(0x197)](_0x2b9bff[_0x2ef887(0x1b9)])||!Number[_0x2ef887(0x197)](_0x2b9bff[_0x2ef887(0x253)])?null:{'startOffset':Math[_0x2ef887(0x1aa)](_0x2b9bff[_0x2ef887(0x1b9)],_0x2b9bff[_0x2ef887(0x253)]),'endOffset':Math['max'](_0x2b9bff[_0x2ef887(0x1b9)],_0x2b9bff['endOffset'])};let _0x35133e=(_0x2b9bff==null?void 0x0:_0x2b9bff['type'])===_0x2ef887(0x1e4)?_0x2b9bff[_0x2ef887(0x1e4)]:_0x333c11;return!_0x35133e||_0x35133e[_0x2ef887(0x256)]?null:{'startOffset':Math[_0x2ef887(0x1aa)](_0x35133e[_0x2ef887(0x1b9)],_0x35133e['endOffset']),'endOffset':Math['max'](_0x35133e[_0x2ef887(0x1b9)],_0x35133e[_0x2ef887(0x253)])};}function pt(_0xaa7eb1,_0x433895,_0x3774ff,_0x5e0386){const _0x2d59df=_0xb81d4c;let _0x49bc2e=_0xaa7eb1['get'](_0x276a14),_0x233cf7=_0x3774ff[_0x2d59df(0x246)]('=')?_0x3774ff['slice'](0x1):_0x3774ff,_0x529c02=_0x49bc2e[_0x2d59df(0x1da)](_0x233cf7);if(!_0x529c02)return null;let _0xcba271=_0xaa7eb1[_0x2d59df(0x202)](_0x2be22c),_0xb07ebf=_0x1fc472({'qualifiers':_0x1bd1bb(_0x529c02),'explicitReferences':_0x5e0386??[],'resolveBinding':_0x19f523=>_0xcba271[_0x2d59df(0x16d)](_0x433895,_0x19f523)});return _0xb07ebf[_0x2d59df(0x16f)]===_0x2d59df(0x19b)?_0xb07ebf[_0x2d59df(0x190)]:null;}function mt(_0x20eb7f,_0x4c0947,_0x42ad43){const _0x20fd64=_0xb81d4c;var _0x7ad084;let _0x138a90=_0x5d3298(0x6);for(;_0x20eb7f!=null&&(_0x7ad084=_0x20eb7f['customRanges'])!=null&&_0x7ad084['some'](_0x5671b4=>_0x5671b4[_0x20fd64(0x1dd)]===_0x138a90)||_0x4c0947[_0x20fd64(0x1d9)](_0x42ad43,_0x138a90);)_0x138a90=_0x5d3298(0x6);return _0x138a90;}function ht(_0x31bc57){try{return Le(_0x31bc57);}catch(_0x4d477c){if(_0x4d477c instanceof C)return null;throw _0x4d477c;}}function gt(_0xaa4a08){const _0x180734=_0xb81d4c;let _0x227f62=_0xaa4a08[_0x180734(0x16a)]&&_0xaa4a08[_0x180734(0x200)]?vt(_0xaa4a08[_0x180734(0x1d6)],_0xaa4a08[_0x180734(0x1a1)],_0xaa4a08['previousDocumentData'],_0xaa4a08['nextDocumentData'],_0xaa4a08['cursorOffset'],_0xaa4a08[_0x180734(0x22d)]):null;return _0xaa4a08[_0x180734(0x16a)]&&_0xaa4a08[_0x180734(0x200)]&&!_0x227f62?null:{'documentRedo':_0x227f62,'resourceRedo':{'id':L['id'],'params':{'unitId':_0xaa4a08['unitId'],'resource':_0xaa4a08['nextResource']}},'resourceUndo':{'id':L['id'],'params':{'unitId':_0xaa4a08['unitId'],'resource':_0xaa4a08[_0x180734(0x210)]}}};}function _t(_0x2125ee,_0xeb1641,_0x2c64d2,_0x4d0128){const _0x245032=_0xb81d4c;_0x4d0128['pushUndoRedo']({'id':_0x2125ee[_0x245032(0x22d)]+':'+_0x2125ee['rangeId'],'unitID':_0x2125ee['unitId'],'redoMutations':[..._0x2125ee['externalMutations'][_0x245032(0x1b3)]?[_0x2125ee[_0x245032(0x1dc)][_0x245032(0x1b3)]]:[],..._0xeb1641[_0x245032(0x21e)]?[_0xeb1641['documentRedo']]:[],_0xeb1641[_0x245032(0x1ea)]],'undoMutations':[_0xeb1641[_0x245032(0x235)],..._0x2c64d2?[_0x2c64d2]:[],..._0x2125ee[_0x245032(0x1dc)]['undoMutation']?[_0x2125ee[_0x245032(0x1dc)]['undoMutation']]:[]]});}function q(_0x41ea6f){const _0x5bcade=_0xb81d4c;let _0x437d28=_0x41ea6f[_0x5bcade(0x1a3)][_0x5bcade(0x202)](_0x41ce44),_0x213c04=_0x41ea6f['accessor'][_0x5bcade(0x202)](_0x5273cf),_0x12c581=_0x41ea6f[_0x5bcade(0x1a3)]['get'](_0x3e1e9b),_0xeffec4=gt(_0x41ea6f);if(!_0xeffec4)return!0x1;let _0x43c927=!0x1,_0x217c2a=null,_0x25b60d=!0x1;try{if(_0x41ea6f[_0x5bcade(0x1dc)][_0x5bcade(0x1b3)]){if(!_0x437d28['syncExecuteCommand'](_0x41ea6f['externalMutations'][_0x5bcade(0x1b3)]['id'],_0x41ea6f[_0x5bcade(0x1dc)][_0x5bcade(0x1b3)][_0x5bcade(0x1fe)]))return!0x1;_0x43c927=!0x0;}if(_0xeffec4['documentRedo']){let _0x2b6d28=_0x437d28[_0x5bcade(0x162)](_0xeffec4[_0x5bcade(0x21e)]['id'],_0xeffec4[_0x5bcade(0x21e)][_0x5bcade(0x1fe)]);if(!_0x2b6d28)return J(_0x437d28,_0x41ea6f[_0x5bcade(0x1dc)],_0x43c927),!0x1;_0x217c2a={'id':_0x3ff622['id'],'params':{..._0x2b6d28,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0x437d28[_0x5bcade(0x162)](_0xeffec4[_0x5bcade(0x1ea)]['id'],_0xeffec4[_0x5bcade(0x1ea)][_0x5bcade(0x1fe)]))return yt(_0x437d28,_0x217c2a),J(_0x437d28,_0x41ea6f['externalMutations'],_0x43c927),!0x1;_0x25b60d=!0x0,_t(_0x41ea6f,_0xeffec4,_0x217c2a,_0x213c04);}catch(_0x4c527c){throw _0x25b60d&&_0x437d28[_0x5bcade(0x162)](_0xeffec4[_0x5bcade(0x235)]['id'],_0xeffec4[_0x5bcade(0x235)][_0x5bcade(0x1fe)]),yt(_0x437d28,_0x217c2a),J(_0x437d28,_0x41ea6f[_0x5bcade(0x1dc)],_0x43c927),_0x4c527c;}return _0x12c581[_0x5bcade(0x1f5)]([{'startOffset':_0x41ea6f[_0x5bcade(0x173)],'endOffset':_0x41ea6f['cursorOffset'],'segmentId':''}],{'unitId':_0x41ea6f[_0x5bcade(0x1a1)],'subUnitId':_0x41ea6f[_0x5bcade(0x1a1)]},!0x1,{[_0x507f67]:!0x0}),!0x0;}function vt(_0x4178dc,_0x595ebb,_0x2c72dd,_0x5e0dcb,_0x3026c5,_0x3aeb31){let _0x50468b=bt(_0x2c72dd,_0x5e0dcb,_0x197963(_0x4178dc,''));return _0x50468b?{'id':_0x3ff622['id'],'params':{'unitId':_0x595ebb,'actions':_0x50468b,'segmentId':'','textRanges':[{'startOffset':_0x3026c5,'endOffset':_0x3026c5,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0x3aeb31}}:null;}function yt(_0x4c8cd5,_0x58cb31){const _0x3ba71a=_0xb81d4c;_0x58cb31&&_0x4c8cd5[_0x3ba71a(0x162)](_0x58cb31['id'],_0x58cb31[_0x3ba71a(0x1fe)]);}function J(_0x1e1c3e,_0x90ee72,_0x37cd79){const _0x424323=_0xb81d4c;_0x37cd79&&_0x90ee72['undoMutation']&&_0x1e1c3e[_0x424323(0x162)](_0x90ee72[_0x424323(0x224)]['id'],_0x90ee72[_0x424323(0x224)][_0x424323(0x1fe)]);}function bt(_0x52a999,_0x2f59b3,_0x120365){const _0x39924e=_0xb81d4c;let _0x2441bc=_0x52a999[_0x39924e(0x1c7)],_0x2db7f3=_0x2f59b3['body'],_0x4fa2cf=xt(_0x2441bc==null?void 0x0:_0x2441bc[_0x39924e(0x1cb)],_0x2db7f3==null?void 0x0:_0x2db7f3[_0x39924e(0x1cb)]);if(!_0x4fa2cf||!_0x2db7f3)return null;let _0xd58b1a=new _0x7ff3ce();return _0xd58b1a[_0x39924e(0x180)](_0x4fa2cf[_0x39924e(0x206)]),_0x4fa2cf[_0x39924e(0x177)]>0x0&&_0xd58b1a[_0x39924e(0x188)](_0x4fa2cf[_0x39924e(0x177)],_0x312eb6(_0x2db7f3,_0x4fa2cf[_0x39924e(0x206)],_0x4fa2cf[_0x39924e(0x206)]+_0x4fa2cf['insertLength'],!0x1)),_0x4fa2cf['deleteLength']>0x0&&_0xd58b1a[_0x39924e(0x207)](_0x4fa2cf['deleteLength']),_0x5b1be5[_0x39924e(0x1f3)]()[_0x39924e(0x1fd)](_0xd58b1a[_0x39924e(0x185)](),_0x120365);}function xt(_0xafd00e,_0x3c0d71){const _0x251ee8=_0xb81d4c;if(_0xafd00e==null||_0x3c0d71==null||_0xafd00e===_0x3c0d71)return null;let _0x8f1c1d=0x0;for(;_0x8f1c1d<_0xafd00e[_0x251ee8(0x1f2)]&&_0x8f1c1d<_0x3c0d71['length']&&_0xafd00e[_0x8f1c1d]===_0x3c0d71[_0x8f1c1d];)_0x8f1c1d+=0x1;let _0x5b59bb=_0xafd00e[_0x251ee8(0x1f2)],_0xf85c47=_0x3c0d71[_0x251ee8(0x1f2)];for(;_0x5b59bb>_0x8f1c1d&&_0xf85c47>_0x8f1c1d&&_0xafd00e[_0x5b59bb-0x1]===_0x3c0d71[_0xf85c47-0x1];)--_0x5b59bb,--_0xf85c47;return{'start':_0x8f1c1d,'deleteLength':_0x5b59bb-_0x8f1c1d,'insertLength':_0xf85c47-_0x8f1c1d};}function _0x43e1(_0x1d453b,_0x3f404c){_0x1d453b=_0x1d453b-0x161;const _0x3d4ac1=_0x3d4a();let _0x43e1c8=_0x3d4ac1[_0x1d453b];return _0x43e1c8;}function St(_0x1e5356){const _0xe85b52=_0xb81d4c;return{'formulas':Object['fromEntries'](Object[_0xe85b52(0x18e)](_0x1e5356[_0xe85b52(0x18d)])[_0xe85b52(0x259)](([_0x5785f3,_0x1368a8])=>[_0x5785f3,{..._0x1368a8,..._0x1368a8[_0xe85b52(0x19e)]?{'numberFormat':{..._0x1368a8[_0xe85b52(0x19e)]}}:null,..._0x1368a8[_0xe85b52(0x1ed)]?{'lastValue':{..._0x1368a8['lastValue']}}:null}]))};}let Y=class extends _0xf99196{constructor(_0x21f5ab,_0x3a53e4,_0x29fc29,_0x3ce3da){const _0x4ace72=_0xb81d4c;super(),this[_0x4ace72(0x166)]=_0x21f5ab,this['_commandService']=_0x3a53e4,this[_0x4ace72(0x1b1)]=_0x29fc29,this[_0x4ace72(0x1df)]=_0x3ce3da,A(this,'_pendingUnitIds',new Set()),A(this,_0x4ace72(0x1a2),!0x1),A(this,_0x4ace72(0x163),!0x1),this[_0x4ace72(0x166)][_0x4ace72(0x1ca)](_0x19d9b2[_0x4ace72(0x1e7)])[_0x4ace72(0x171)](_0x50f8e3=>this[_0x4ace72(0x1df)][_0x4ace72(0x182)](_0x50f8e3)),this[_0x4ace72(0x16e)](this[_0x4ace72(0x1b1)][_0x4ace72(0x1ac)][_0x4ace72(0x204)](({unitId:_0x4a9667})=>this[_0x4ace72(0x1ad)](_0x4a9667))),this[_0x4ace72(0x16e)](this[_0x4ace72(0x166)][_0x4ace72(0x24b)][_0x4ace72(0x204)](({unit:_0x82e290})=>{const _0x4b7ddd=_0x4ace72;_0x82e290[_0x4b7ddd(0x178)]===_0x19d9b2[_0x4b7ddd(0x1e7)]&&this[_0x4b7ddd(0x1e2)](_0x82e290[_0x4b7ddd(0x22a)]());})),this[_0x4ace72(0x16e)](this[_0x4ace72(0x166)][_0x4ace72(0x24f)][_0x4ace72(0x204)](_0x883489=>{const _0x4f143e=_0x4ace72;this[_0x4f143e(0x1df)]['unregisterUnit'](_0x883489[_0x4f143e(0x22a)]());})),this[_0x4ace72(0x16e)](this[_0x4ace72(0x23d)][_0x4ace72(0x231)](_0x98b949=>{const _0x35fc93=_0x4ace72;if(_0x98b949['id']===_0x3ff622['id']&&Ct(_0x98b949[_0x35fc93(0x1fe)])){let _0x374fcf=_0x98b949[_0x35fc93(0x1fe)];_0x374fcf[_0x35fc93(0x256)]||this[_0x35fc93(0x1ad)](_0x374fcf[_0x35fc93(0x1a1)]);}}));}[_0xb81d4c(0x21f)](){const _0x52d1b7=_0xb81d4c;this[_0x52d1b7(0x163)]=!0x0,super['dispose']();}[_0xb81d4c(0x1e2)](_0x5cff1f){const _0x10f508=_0xb81d4c;this['_pendingUnitIds'][_0x10f508(0x1d3)](_0x5cff1f),this[_0x10f508(0x1a2)]||(this['_syncScheduled']=!0x0,queueMicrotask(()=>{const _0x54a297=_0x10f508;if(this['_syncScheduled']=!0x1,this[_0x54a297(0x163)])return;let _0x250e54=Array[_0x54a297(0x1a7)](this['_pendingUnitIds']);this['_pendingUnitIds'][_0x54a297(0x208)](),_0x250e54['forEach'](_0x45c2d0=>this['_syncUnit'](_0x45c2d0));}));}['_syncUnit'](_0x2682af){const _0x202a3f=_0xb81d4c;let _0x8514d7=this[_0x202a3f(0x166)]['getUnit'](_0x2682af,_0x19d9b2['UNIVER_DOC']);_0x8514d7&&this[_0x202a3f(0x1df)][_0x202a3f(0x182)](_0x8514d7);}};Y=N([M(0x0,_0x1616da),M(0x1,_0x41ce44),M(0x2,_0x3abf00(j)),M(0x3,_0x3abf00(P))],Y);function Ct(_0x13dd71){const _0x5e65a1=_0xb81d4c;return typeof _0x13dd71==_0x5e65a1(0x234)&&!!_0x13dd71&&'unitId'in _0x13dd71&&typeof _0x13dd71['unitId']==_0x5e65a1(0x1fc)&&(!(_0x5e65a1(0x256)in _0x13dd71)||_0x13dd71[_0x5e65a1(0x256)]===void 0x0||typeof _0x13dd71[_0x5e65a1(0x256)]==_0x5e65a1(0x1fc));}let X=class extends _0xf99196{constructor(_0x1e3aa9,_0x1685e1){const _0x108c41=_0xb81d4c;super(),this[_0x108c41(0x172)]=_0x1e3aa9,this[_0x108c41(0x254)]=_0x1685e1,this[_0x108c41(0x16e)](this[_0x108c41(0x172)][_0x108c41(0x236)]({'pluginName':y,'businesses':[_0x19d9b2['UNIVER_DOC']],'toJson':_0x42accb=>JSON[_0x108c41(0x1ab)](this['_docFormulaModel']['serialize'](_0x42accb)),'parseJson':_0x32ce26=>JSON[_0x108c41(0x1ae)](_0x32ce26),'onLoad':(_0x4eef6,_0x40d82b)=>{const _0x518ddb=_0x108c41;this[_0x518ddb(0x254)][_0x518ddb(0x1bc)](_0x4eef6,_0x40d82b);},'onUnLoad':_0x351220=>this[_0x108c41(0x254)][_0x108c41(0x241)](_0x351220)}));}};X=N([M(0x0,_0x85b6e7),M(0x1,_0x3abf00(j))],X);var wt='@univerjs-pro/docs-formula',Tt=_0xb81d4c(0x196);const Et={};let Z=class extends _0xf99196{constructor(_0x5bc09d,_0x1ebd7c,_0x95644e){const _0x2e883d=_0xb81d4c;super(),this[_0x2e883d(0x186)]=_0x5bc09d,this['_formulaService']=_0x1ebd7c,this[_0x2e883d(0x16e)](_0x95644e[_0x2e883d(0x195)]({'resolve':(_0x3231ac,_0x477fe9)=>{const _0x11c9c7=_0x2e883d;var _0x3cee8e;return((_0x3cee8e=_0x477fe9[_0x11c9c7(0x1c4)])==null?void 0x0:_0x3cee8e[_0x11c9c7(0x21d)](w)[_0x11c9c7(0x259)](_0x51c626=>({'startOffset':_0x51c626['startIndex'],'endOffset':_0x51c626[_0x11c9c7(0x218)]+0x1,'text':this['resolveFormula'](_0x3231ac,_0x51c626[_0x11c9c7(0x1dd)])})))??[];}})),this[_0x2e883d(0x16e)](this[_0x2e883d(0x219)][_0x2e883d(0x18c)][_0x2e883d(0x204)](({unitId:_0x3ed933})=>{const _0xa55c5d=_0x2e883d;_0x95644e[_0xa55c5d(0x21a)](_0x3ed933);}));}[_0xb81d4c(0x161)](_0x40966f,_0x439f2d){const _0x415ee4=_0xb81d4c;var _0x4778dc;return((_0x4778dc=this[_0x415ee4(0x219)][_0x415ee4(0x227)]({'unitId':_0x40966f,'rangeId':_0x439f2d}))==null?void 0x0:_0x4778dc[_0x415ee4(0x24e)])??'';}[_0xb81d4c(0x1d4)](_0x394249,_0x5413cc,_0x34a0ff){const _0x2e2e9a=_0xb81d4c;var _0x199d8a;let _0x57b282=this['_univerInstanceService'][_0x2e2e9a(0x17d)](_0x394249,_0x19d9b2[_0x2e2e9a(0x1e7)]),_0x3cc96e=_0x57b282==null?void 0x0:_0x57b282[_0x2e2e9a(0x1d7)]();if(!_0x3cc96e)return'';let _0x225777=_0x3cc96e[_0x2e2e9a(0x1cb)][_0x2e2e9a(0x1c6)](_0x5413cc,_0x34a0ff),_0x3dc6a5=((_0x199d8a=_0x3cc96e[_0x2e2e9a(0x1c4)])==null?void 0x0:_0x199d8a[_0x2e2e9a(0x21d)](_0xa98203=>w(_0xa98203)&&_0xa98203[_0x2e2e9a(0x23b)]>=_0x5413cc&&_0xa98203[_0x2e2e9a(0x218)]<_0x34a0ff)[_0x2e2e9a(0x18f)]((_0x4041d4,_0x10de0e)=>_0x10de0e[_0x2e2e9a(0x23b)]-_0x4041d4[_0x2e2e9a(0x23b)]))??[];for(let _0x4fc340 of _0x3dc6a5){let _0x5af6c8=_0x4fc340[_0x2e2e9a(0x23b)]-_0x5413cc,_0x1a9bc0=_0x4fc340['endIndex']-_0x5413cc+0x1;_0x225777=''+_0x225777[_0x2e2e9a(0x1c6)](0x0,_0x5af6c8)+this[_0x2e2e9a(0x161)](_0x394249,_0x4fc340['rangeId'])+_0x225777[_0x2e2e9a(0x1c6)](_0x1a9bc0);}return _0x225777;}[_0xb81d4c(0x1c5)](_0x17f789){return Dt(_0x17f789);}[_0xb81d4c(0x1e8)](_0x3b24af,_0x35dd14,_0x1e014f={}){const _0x2320e5=_0xb81d4c;var _0x239e75;return Be({'id':_0x3b24af,'body':_0x35dd14,'documentStyle':{}},(((_0x239e75=_0x35dd14['customRanges'])==null?void 0x0:_0x239e75[_0x2320e5(0x21d)](w))??[])[_0x2320e5(0x259)](_0x1305ea=>({'rangeId':_0x1305ea[_0x2320e5(0x1dd)],'text':_0x1e014f[_0x1305ea['rangeId']]??this[_0x2320e5(0x161)](_0x3b24af,_0x1305ea['rangeId'])})))[_0x2320e5(0x1c7)]??{'dataStream':''};}};Z=N([M(0x0,_0x1616da),M(0x1,_0x3abf00(P)),M(0x2,_0x3abf00(_0x5a38c7))],Z);function Dt(_0x5a268e){const _0x201547=_0xb81d4c;var _0x4303e3,_0x40490a;let _0x5a7219=Ot(_0x5a268e),_0x522474=Be(_0x5a268e,(((_0x4303e3=_0x5a268e[_0x201547(0x1c7)])==null||(_0x4303e3=_0x4303e3[_0x201547(0x1c4)])==null?void 0x0:_0x4303e3[_0x201547(0x21d)](w))??[])[_0x201547(0x259)](_0x224d40=>({'rangeId':_0x224d40[_0x201547(0x1dd)],'text':kt(_0x5a7219==null?void 0x0:_0x5a7219['formulas'][_0x224d40['rangeId']])})));return _0x522474[_0x201547(0x1a9)]=(_0x40490a=_0x522474[_0x201547(0x1a9)])==null?void 0x0:_0x40490a[_0x201547(0x21d)](_0x26675e=>_0x26675e[_0x201547(0x19a)]!==y),_0x522474;}function Ot(_0x577a6c){const _0x3468dd=_0xb81d4c;var _0x2c1450;let _0x59c4c5=(_0x2c1450=_0x577a6c[_0x3468dd(0x1a9)])==null||(_0x2c1450=_0x2c1450['find'](_0xedaa2e=>_0xedaa2e[_0x3468dd(0x19a)]===_0x3468dd(0x164)))==null?void 0x0:_0x2c1450[_0x3468dd(0x199)];if(_0x59c4c5)try{let _0x56a1a4=JSON['parse'](_0x59c4c5);return x(_0x56a1a4)?_0x56a1a4:void 0x0;}catch{return;}}function kt(_0x401f70){const _0x84940d=_0xb81d4c;return _0x401f70?_0x157ca0({'lastValue':_0x401f70[_0x84940d(0x1ed)],'numberFormat':_0x401f70[_0x84940d(0x19e)]})[_0x84940d(0x24e)]:'';}let Q=class extends _0xf99196{constructor(_0x2433e0,_0x5cb1a0,_0x122ca0){const _0x91d1ce=_0xb81d4c;super(),this['_formulaService']=_0x2433e0,this[_0x91d1ce(0x1fa)]=_0x5cb1a0,this[_0x91d1ce(0x16e)](_0x122ca0[_0x91d1ce(0x257)](this));}[_0xb81d4c(0x21c)](_0x14c541){const _0x5dc97c=_0xb81d4c;let _0x5e47ad=new Map();for(let _0x4f0119 of this[_0x5dc97c(0x219)][_0x5dc97c(0x1cc)]()){var _0x11494a;if(!this[_0x5dc97c(0x1fa)][_0x5dc97c(0x167)](_0x4f0119[_0x5dc97c(0x1c1)][_0x5dc97c(0x1f0)],_0x4f0119[_0x5dc97c(0x24a)])['eligible'])continue;let _0x20f099=_0xfa1663(_0x4f0119[_0x5dc97c(0x24a)]),_0xb65aec=_0x20f099?_0x4884df(_0x20f099):null;if(!_0xb65aec||At(_0x4f0119['config'][_0x5dc97c(0x1ed)],_0xb65aec))continue;let _0x59d293=_0x5e47ad['get'](_0x4f0119['identity'][_0x5dc97c(0x1a1)])??[];_0x59d293[_0x5dc97c(0x18b)]({'rangeId':_0x4f0119[_0x5dc97c(0x1c0)][_0x5dc97c(0x1dd)],'expectedFormula':_0x4f0119[_0x5dc97c(0x1c1)][_0x5dc97c(0x1f0)],'expectedNumberFormat':(_0x11494a=_0x4f0119['config'][_0x5dc97c(0x19e)])==null?void 0x0:_0x11494a[_0x5dc97c(0x168)],'expectedReferenceRevision':_0x4f0119[_0x5dc97c(0x1a0)],'lastValue':_0xb65aec}),_0x5e47ad['set'](_0x4f0119[_0x5dc97c(0x1c0)][_0x5dc97c(0x1a1)],_0x59d293);}return Array[_0x5dc97c(0x1a7)](_0x5e47ad,([_0x582a94,_0x61e498])=>({'id':R['id'],'params':{'unitId':_0x582a94,'updates':_0x61e498}}));}};Q=N([M(0x0,_0x3abf00(P)),M(0x1,_0x3abf00(_0x5bfff4)),M(0x2,_0x3abf00(_0x21c0ca))],Q);function At(_0x40955e,_0x39d32a){const _0x254e8c=_0xb81d4c;return(_0x40955e==null?void 0x0:_0x40955e['v'])===_0x39d32a['v']&&(_0x40955e==null?void 0x0:_0x40955e['t'])===_0x39d32a['t']&&(_0x40955e==null?void 0x0:_0x40955e[_0x254e8c(0x168)])===_0x39d32a[_0x254e8c(0x168)];}let $=class extends _0x4cfe43{constructor(_0xa8a5a3=Et,_0x12c8bb,_0x1933e7,_0x3aa101){const _0x42078c=_0xb81d4c;super(),this[_0x42078c(0x189)]=_0xa8a5a3,this[_0x42078c(0x1c9)]=_0x12c8bb,this[_0x42078c(0x23d)]=_0x1933e7,this[_0x42078c(0x22e)]=_0x3aa101;let {..._0x8a0417}=_0x57fe01({},Et,this[_0x42078c(0x189)]);this[_0x42078c(0x22e)][_0x42078c(0x19d)](_0x42078c(0x23f),_0x8a0417);}[_0xb81d4c(0x250)](){const _0x4a1151=_0xb81d4c;this[_0x4a1151(0x1c9)][_0x4a1151(0x1d3)]([j]),this['_injector'][_0x4a1151(0x1d3)]([P]),this[_0x4a1151(0x1c9)][_0x4a1151(0x1d3)]([X]),this[_0x4a1151(0x1c9)][_0x4a1151(0x1d3)]([Y]),this[_0x4a1151(0x1c9)][_0x4a1151(0x1d3)]([Q]),this[_0x4a1151(0x1c9)][_0x4a1151(0x1d3)]([Z]),_0x59a954(this[_0x4a1151(0x1c9)],[[j],[X],[Y],[Q],[Z]]),[lt,ut,L,R,z,B,V,H,U,W][_0x4a1151(0x171)](_0x334343=>this['disposeWithMe'](this[_0x4a1151(0x23d)][_0x4a1151(0x19f)](_0x334343)));}};A($,_0xb81d4c(0x18a),y),A($,_0xb81d4c(0x169),wt),A($,'version',Tt),A($,_0xb81d4c(0x178),_0x19d9b2[_0xb81d4c(0x1e7)]),$=N([_0x415d13(_0x46999f,_0x3c9e4a,_0x59ac81),M(0x1,_0x3abf00(_0x38221f)),M(0x2,_0x41ce44),M(0x3,_0x212f05)],$);export{W as ConvertDocFormulaToTextCommand,je as DOC_FORMULA_CUSTOM_RANGE_KIND,Me as DOC_FORMULA_OBJECT_REPLACEMENT,y as DOC_FORMULA_PLUGIN,Z as DocFormulaDisplayTextService,Y as DocFormulaLifecycleController,j as DocFormulaModel,X as DocFormulaResourceController,ot as DocFormulaResultStatus,P as DocFormulaService,z as InsertDocFormulaCommand,C as InvalidDocFormulaInsertRangeError,H as RemoveDocFormulaCommand,ut as RemoveDocFormulaMutation,U as ReplaceDocFormulaWithTextCommand,R as SetDocFormulaLastValuesMutation,lt as SetDocFormulaMutation,V as SetDocFormulaNumberFormatCommand,L as SetDocFormulaResourceMutation,$ as UniverDocsFormulaPlugin,B as UpdateDocFormulaCommand,Ve as assertSafeDocFormulaInsertRange,Le as buildInsertDocFormulaActions,ze as buildRemoveDocFormulaActions,Re as buildUpdateDocFormulaActions,b as createEmptyDocFormulaResource,Dt as degradeDocFormulaDocumentData,T as findDocFormulaRange,Ne as isDocFormulaConfig,w as isDocFormulaRange,x as isDocFormulaResource,Pe as isFormulaLastValue};
|
package/lib/umd/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x56ee(_0xfc1433,_0xb38213){_0xfc1433=_0xfc1433-0xf9;var _0x26a440=_0x26a4();var _0x56eebe=_0x26a440[_0xfc1433];return _0x56eebe;}(function(_0x808e79,_0x1c2a8e){var _0x14d4e1=_0x56ee,_0x3a7717=_0x808e79();while(!![]){try{var _0x5576c6=-parseInt(_0x14d4e1(0x154))/0x1*(parseInt(_0x14d4e1(0xfa))/0x2)+parseInt(_0x14d4e1(0x119))/0x3*(parseInt(_0x14d4e1(0xfd))/0x4)+parseInt(_0x14d4e1(0x123))/0x5*(parseInt(_0x14d4e1(0x14c))/0x6)+parseInt(_0x14d4e1(0x12f))/0x7*(-parseInt(_0x14d4e1(0x145))/0x8)+parseInt(_0x14d4e1(0x105))/0x9*(-parseInt(_0x14d4e1(0x11b))/0xa)+-parseInt(_0x14d4e1(0x13c))/0xb+-parseInt(_0x14d4e1(0x141))/0xc*(-parseInt(_0x14d4e1(0x11a))/0xd);if(_0x5576c6===_0x1c2a8e)break;else _0x3a7717['push'](_0x3a7717['shift']());}catch(_0x4837ea){_0x3a7717['push'](_0x3a7717['shift']());}}}(_0x26a4,0x53043),function(_0x3bea65,_0x303dd8){var _0x32d848=_0x56ee;typeof exports=='object'&&typeof module<'u'?_0x303dd8(exports,require('@univerjs-pro/docs-formula'),require('@univerjs/core'),require('@univerjs/docs/facade')):typeof define=='function'&&define[_0x32d848(0x115)]?define([_0x32d848(0x14b),_0x32d848(0x12b),_0x32d848(0x159),_0x32d848(0x10d)],_0x303dd8):(_0x3bea65=typeof globalThis<'u'?globalThis:_0x3bea65||self,_0x303dd8(_0x3bea65[_0x32d848(0x113)]={},_0x3bea65[_0x32d848(0x106)],_0x3bea65[_0x32d848(0x164)],_0x3bea65[_0x32d848(0x11e)]));}(this,function(_0x468e00,_0x11b651,_0x4b7a43,_0x136af6){var _0x774c45=_0x56ee;Object[_0x774c45(0x10e)](_0x468e00,Symbol[_0x774c45(0x10b)],{'value':_0x774c45(0xfb)});function _0x509c48(_0x26797a,_0x4a13e6){return function(_0x489d91,_0x581ff8){_0x4a13e6(_0x489d91,_0x581ff8,_0x26797a);};}function _0x7c7a44(_0x202c46,_0xe77528,_0x4aead7,_0x688a24){var _0x58e445=_0x774c45,_0x40639c=arguments[_0x58e445(0x107)],_0x1d9ea0=_0x40639c<0x3?_0xe77528:_0x688a24===null?_0x688a24=Object[_0x58e445(0x14a)](_0xe77528,_0x4aead7):_0x688a24,_0x267a2c;if(typeof Reflect=='object'&&typeof Reflect[_0x58e445(0x102)]==_0x58e445(0xf9))_0x1d9ea0=Reflect[_0x58e445(0x102)](_0x202c46,_0xe77528,_0x4aead7,_0x688a24);else{for(var _0x403c9c=_0x202c46[_0x58e445(0x107)]-0x1;_0x403c9c>=0x0;_0x403c9c--)(_0x267a2c=_0x202c46[_0x403c9c])&&(_0x1d9ea0=(_0x40639c<0x3?_0x267a2c(_0x1d9ea0):_0x40639c>0x3?_0x267a2c(_0xe77528,_0x4aead7,_0x1d9ea0):_0x267a2c(_0xe77528,_0x4aead7))||_0x1d9ea0);}return _0x40639c>0x3&&_0x1d9ea0&&Object[_0x58e445(0x10e)](_0xe77528,_0x4aead7,_0x1d9ea0),_0x1d9ea0;}let _0x48ed39=class{constructor(_0x7937c4,_0x32a44c,_0x534438,_0x26b114,_0x26c7bf,_0x57308f){var _0x4f7881=_0x774c45;this['_unitId']=_0x7937c4,this[_0x4f7881(0x14d)]=_0x32a44c,this[_0x4f7881(0x121)]=_0x534438,this[_0x4f7881(0x13f)]=_0x26b114,this[_0x4f7881(0x151)]=_0x26c7bf,this[_0x4f7881(0x10a)]=_0x57308f;}[_0x774c45(0x14f)](){return this['_rangeId'];}[_0x774c45(0x166)](){var _0x461c4b=_0x774c45;let _0x349ce5=this[_0x461c4b(0x150)]();return _0x349ce5?{'endOffset':_0x349ce5['endIndex']+0x1,'rangeId':_0x349ce5[_0x461c4b(0x109)],'startOffset':_0x349ce5[_0x461c4b(0x111)]}:null;}[_0x774c45(0x157)](){var _0x46056b=_0x774c45,_0x3af9dd;return((_0x3af9dd=this[_0x46056b(0x13f)]['getFormula'](this['_unitId'],this[_0x46056b(0x14d)]))==null?void 0x0:_0x3af9dd[_0x46056b(0x124)])??'';}[_0x774c45(0x122)](){var _0xc88dbd=_0x774c45;return this[_0xc88dbd(0x13f)]['getFormula'](this[_0xc88dbd(0x155)],this[_0xc88dbd(0x14d)])??null;}[_0x774c45(0x148)](){var _0x16216a=_0x774c45;return this['_service'][_0x16216a(0x148)]({'unitId':this['_unitId'],'rangeId':this[_0x16216a(0x14d)]})??null;}['describe'](){var _0x27b3e8=_0x774c45;let _0x47b85a=this[_0x27b3e8(0x166)](),_0x28906e=this[_0x27b3e8(0x122)](),_0x5d8e7b=this['getResult']();return!_0x47b85a||!_0x28906e||!_0x5d8e7b?null:{..._0x47b85a,'config':_0x28906e,'formula':_0x28906e['formula'],'result':_0x5d8e7b,'type':'formula'};}[_0x774c45(0x13d)](_0x3ab101){var _0x34a3a1=_0x774c45;return this[_0x34a3a1(0x121)][_0x34a3a1(0x12c)](_0x11b651[_0x34a3a1(0x120)]['id'],{'externalReferences':_0x3ab101[_0x34a3a1(0x160)],'formula':_0x3ab101['formula'],'numberFormat':_0x3ab101[_0x34a3a1(0x15e)],'rangeId':this['_rangeId'],'unitId':this[_0x34a3a1(0x155)]});}[_0x774c45(0x108)](_0x1b2bef){var _0xa542b6=_0x774c45;return this[_0xa542b6(0x121)]['syncExecuteCommand'](_0x11b651[_0xa542b6(0x12d)]['id'],{'numberFormat':_0x1b2bef,'rangeId':this[_0xa542b6(0x14d)],'unitId':this[_0xa542b6(0x155)]});}[_0x774c45(0x15a)](){var _0x5a9f15=_0x774c45;return this[_0x5a9f15(0x121)]['syncExecuteCommand'](_0x11b651[_0x5a9f15(0x10f)]['id'],{'rangeId':this[_0x5a9f15(0x14d)],'unitId':this['_unitId']});}[_0x774c45(0x11d)](_0x4c1095){var _0x2fdd27=_0x774c45;return this[_0x2fdd27(0x121)][_0x2fdd27(0x12c)](_0x11b651[_0x2fdd27(0x118)]['id'],{'rangeId':this[_0x2fdd27(0x14d)],'text':_0x4c1095,'unitId':this[_0x2fdd27(0x155)]});}[_0x774c45(0x139)](){var _0x10b068=_0x774c45;return this['_commandService']['syncExecuteCommand'](_0x11b651[_0x10b068(0x132)]['id'],{'rangeId':this[_0x10b068(0x14d)],'unitId':this[_0x10b068(0x155)]});}[_0x774c45(0x150)](){var _0x3cf7b9=_0x774c45,_0x427eb2;let _0x5cc528=this[_0x3cf7b9(0x10a)][_0x3cf7b9(0x15b)](this[_0x3cf7b9(0x155)],_0x4b7a43[_0x3cf7b9(0x156)][_0x3cf7b9(0x152)]);return _0x5cc528==null||(_0x427eb2=_0x5cc528[_0x3cf7b9(0x133)]()[_0x3cf7b9(0x135)])==null||(_0x427eb2=_0x427eb2[_0x3cf7b9(0x112)])==null?void 0x0:_0x427eb2[_0x3cf7b9(0x147)](_0x2a4e36=>_0x2a4e36[_0x3cf7b9(0x109)]===this[_0x3cf7b9(0x14d)]&&(0x0,_0x11b651[_0x3cf7b9(0x15f)])(_0x2a4e36));}};_0x48ed39=_0x7c7a44([_0x509c48(0x2,_0x4b7a43[_0x774c45(0x162)]),_0x509c48(0x3,(0x0,_0x4b7a43[_0x774c45(0x146)])(_0x11b651[_0x774c45(0x142)])),_0x509c48(0x4,(0x0,_0x4b7a43[_0x774c45(0x146)])(_0x11b651[_0x774c45(0x117)])),_0x509c48(0x5,_0x4b7a43[_0x774c45(0x114)])],_0x48ed39);function _0x5c30bb(_0x520fa7){'@babel/helpers - typeof';var _0x4704a2=_0x774c45;return _0x5c30bb=typeof Symbol==_0x4704a2(0xf9)&&typeof Symbol[_0x4704a2(0x144)]==_0x4704a2(0x140)?function(_0x3c8468){return typeof _0x3c8468;}:function(_0x398060){var _0x5da03a=_0x4704a2;return _0x398060&&typeof Symbol==_0x5da03a(0xf9)&&_0x398060[_0x5da03a(0x13a)]===Symbol&&_0x398060!==Symbol[_0x5da03a(0x13b)]?_0x5da03a(0x140):typeof _0x398060;},_0x5c30bb(_0x520fa7);}function _0x5bbabd(_0xaf2127,_0x43b841){var _0x515769=_0x774c45;if(_0x5c30bb(_0xaf2127)!=_0x515769(0xfc)||!_0xaf2127)return _0xaf2127;var _0x3c736b=_0xaf2127[Symbol[_0x515769(0x15d)]];if(_0x3c736b!==void 0x0){var _0x5eaea8=_0x3c736b[_0x515769(0x128)](_0xaf2127,_0x43b841||_0x515769(0x153));if(_0x5c30bb(_0x5eaea8)!=_0x515769(0xfc))return _0x5eaea8;throw TypeError(_0x515769(0x10c));}return(_0x43b841===_0x515769(0x110)?String:Number)(_0xaf2127);}function _0x50503b(_0x18263c){var _0xe7d41f=_0x774c45,_0x19effd=_0x5bbabd(_0x18263c,_0xe7d41f(0x110));return _0x5c30bb(_0x19effd)==_0xe7d41f(0x140)?_0x19effd:_0x19effd+'';}function _0x469ca1(_0x41bd04,_0x5c9fae,_0x1a4d78){var _0x525dbd=_0x774c45;return(_0x5c9fae=_0x50503b(_0x5c9fae))in _0x41bd04?Object[_0x525dbd(0x10e)](_0x41bd04,_0x5c9fae,{'value':_0x1a4d78,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x41bd04[_0x5c9fae]=_0x1a4d78,_0x41bd04;}var _0x5177a7=class extends _0x136af6['FDocument']{constructor(..._0x288814){var _0x1cf902=_0x774c45;super(..._0x288814),_0x469ca1(this,_0x1cf902(0x13e),void 0x0),_0x469ca1(this,_0x1cf902(0x134),void 0x0),_0x469ca1(this,_0x1cf902(0x11f),void 0x0),_0x469ca1(this,_0x1cf902(0x165),void 0x0);}['_initialize'](_0x6d10ad){var _0x495a01=_0x774c45;this[_0x495a01(0x13e)]=_0x6d10ad[_0x495a01(0x116)](_0x4b7a43[_0x495a01(0x162)]),this[_0x495a01(0x134)]=_0x6d10ad[_0x495a01(0x116)](_0x11b651['DocFormulaDisplayTextService']),this[_0x495a01(0x11f)]=_0x6d10ad[_0x495a01(0x116)](_0x11b651[_0x495a01(0x142)]),this[_0x495a01(0x165)]=_0x6d10ad['get'](_0x4b7a43['IResourceLoaderService']);}['getFormulas'](){var _0x13900e=_0x774c45;return this[_0x13900e(0x12e)]()['map'](_0x5255b1=>this['_createFormula'](_0x5255b1[_0x13900e(0x109)]));}[_0x774c45(0x157)](_0x3868e3){var _0x491f6c=_0x774c45;return this[_0x491f6c(0x12e)]()['some'](_0x4e1b12=>_0x4e1b12['rangeId']===_0x3868e3)?this[_0x491f6c(0x101)](_0x3868e3):null;}['getFormulaAt'](_0x4786d1){var _0x1b0f9b=_0x774c45;let _0x34289a=this['_getCompleteRanges']()[_0x1b0f9b(0x147)](_0x33fdc6=>_0x33fdc6[_0x1b0f9b(0x111)]<=_0x4786d1&&_0x4786d1<=_0x33fdc6[_0x1b0f9b(0x127)]);return _0x34289a?this[_0x1b0f9b(0x101)](_0x34289a[_0x1b0f9b(0x109)]):null;}[_0x774c45(0x136)](){var _0x4363a0=_0x774c45;let _0x5cad5f=this[_0x4363a0(0x165)]['saveUnit'](this['id']);if(!_0x5cad5f)throw Error('Document\x20'+this['id']+_0x4363a0(0x104));return this['_docsFormulaDisplayTextService'][_0x4363a0(0x137)](_0x5cad5f);}[_0x774c45(0x143)](_0x1450da){var _0x26826d=_0x774c45;return this[_0x26826d(0x11c)]({'externalReferences':_0x1450da['externalReferences'],'formula':_0x1450da['formula'],'numberFormat':_0x1450da['numberFormat'],'target':{'type':'range','startOffset':_0x1450da['startOffset'],'endOffset':_0x1450da['endOffset']},'unitId':this[_0x26826d(0x14f)]()});}[_0x774c45(0x11c)](_0x5808c9){var _0x13243c=_0x774c45;let _0x53a2a6=this[_0x13243c(0x13e)]['syncExecuteCommand'](_0x11b651[_0x13243c(0x12a)]['id'],_0x5808c9);return _0x53a2a6?this[_0x13243c(0x101)](_0x53a2a6[_0x13243c(0x109)]):null;}['_getCompleteRanges'](){var _0x25bdeb=_0x774c45,_0x81cd64;let _0x3be782=this[_0x25bdeb(0x11f)][_0x25bdeb(0x130)](this['getId']());return((_0x81cd64=this[_0x25bdeb(0xfe)]('')[_0x25bdeb(0x112)])==null?void 0x0:_0x81cd64[_0x25bdeb(0x149)](_0x39995c=>(0x0,_0x11b651[_0x25bdeb(0x15f)])(_0x39995c)&&_0x3be782[_0x39995c[_0x25bdeb(0x109)]]!=null))??[];}[_0x774c45(0x101)](_0x2e1a60){var _0x5dc60e=_0x774c45;return this[_0x5dc60e(0x125)][_0x5dc60e(0x158)](_0x48ed39,this['getId'](),_0x2e1a60);}};_0x136af6[_0x774c45(0x15c)][_0x774c45(0x138)](_0x5177a7);var _0x412d46=class extends _0x136af6[_0x774c45(0xff)]{constructor(..._0x4e550b){var _0x51cb34=_0x774c45;super(..._0x4e550b),_0x469ca1(this,_0x51cb34(0x13e),void 0x0);}['_initialize'](_0x29d284){var _0x35ee92=_0x774c45;this['_docsFormulaCommandService']=_0x29d284[_0x35ee92(0x116)](_0x4b7a43['ICommandService']);}[_0x774c45(0x143)](_0x2edfdf,_0x2cde56,_0x4bf05c={}){var _0x318590=_0x774c45;return this[_0x318590(0x11c)](_0x2edfdf,_0x2cde56,_0x4bf05c);}[_0x774c45(0x14e)](_0x1d9fd8,_0x4bced0={}){var _0x1a50b9=_0x774c45;return this[_0x1a50b9(0x11c)]('end',_0x1d9fd8,_0x4bced0);}[_0x774c45(0x11c)](_0x49c8bb,_0x23186e,_0x39b8f3){var _0x54bb0d=_0x774c45;if(this[_0x54bb0d(0x100)]())return null;let _0x5996dc={'externalReferences':_0x39b8f3['externalReferences'],'formula':_0x23186e,'numberFormat':_0x39b8f3[_0x54bb0d(0x15e)],'target':{'type':'paragraph','paragraphId':this[_0x54bb0d(0x14f)](),'position':_0x49c8bb},'unitId':this[_0x54bb0d(0x163)][_0x54bb0d(0x14f)]()},_0x479c36=this[_0x54bb0d(0x13e)]['syncExecuteCommand'](_0x11b651['InsertDocFormulaCommand']['id'],_0x5996dc);return _0x479c36?this[_0x54bb0d(0x125)][_0x54bb0d(0x158)](_0x48ed39,this[_0x54bb0d(0x163)]['getId'](),_0x479c36['rangeId']):null;}};_0x136af6[_0x774c45(0xff)][_0x774c45(0x138)](_0x412d46);var _0x1cfbe2=class extends _0x136af6['FDocumentTextRange']{constructor(..._0x4843d3){var _0x5155f8=_0x774c45;super(..._0x4843d3),_0x469ca1(this,_0x5155f8(0x13e),void 0x0);}[_0x774c45(0x126)](_0x28a091){var _0x2d413d=_0x774c45;this[_0x2d413d(0x13e)]=_0x28a091['get'](_0x4b7a43[_0x2d413d(0x162)]);}[_0x774c45(0x129)](_0x2618e5,_0x16db78={}){var _0xb281c1=_0x774c45;let {endOffset:_0x59adf5,segmentId:_0x2acae0,startOffset:_0x5ebe6f}=this[_0xb281c1(0x166)]();return _0x2acae0?null:this[_0xb281c1(0x11c)](_0x5ebe6f,_0x59adf5,_0x2618e5,_0x16db78);}[_0x774c45(0x11c)](_0x190e85,_0x18e361,_0x406b0f,_0x590844){var _0x3897d5=_0x774c45;let _0x4da95b={'externalReferences':_0x590844['externalReferences'],'formula':_0x406b0f,'numberFormat':_0x590844['numberFormat'],'target':{'type':_0x3897d5(0x131),'startOffset':_0x190e85,'endOffset':_0x18e361},'unitId':this[_0x3897d5(0x163)]['getId']()},_0x484923=this['_docsFormulaCommandService'][_0x3897d5(0x12c)](_0x11b651[_0x3897d5(0x12a)]['id'],_0x4da95b);return _0x484923?this[_0x3897d5(0x125)]['createInstance'](_0x48ed39,this['_document'][_0x3897d5(0x14f)](),_0x484923['rangeId']):null;}};_0x136af6[_0x774c45(0x161)]['extend'](_0x1cfbe2),Object[_0x774c45(0x10e)](_0x468e00,_0x774c45(0x103),{'enumerable':!0x0,'get':function(){return _0x48ed39;}});}));function _0x26a4(){var _0x59a306=['customRanges','UniverProDocsFormulaFacade','IUniverInstanceService','amd','get','DocFormulaService','ReplaceDocFormulaWithTextCommand','528975KNXgCr','13fRvDMY','110JSJbyq','_insert','replaceWithText','UniverDocsFacade','_docsFormulaModel','UpdateDocFormulaCommand','_commandService','getConfig','25115IxtrcI','formula','_injector','_initialize','endIndex','call','replaceWithFormula','InsertDocFormulaCommand','@univerjs-pro/docs-formula','syncExecuteCommand','SetDocFormulaNumberFormatCommand','_getCompleteRanges','7efjlri','getFormulas','range','ConvertDocFormulaToTextCommand','getSnapshot','_docsFormulaDisplayTextService','body','saveFormulaDisplayTextSnapshot','degradeDocumentData','extend','convertToText','constructor','prototype','4460148ksAQrJ','update','_docsFormulaCommandService','_model','symbol','14007804fDdjQh','DocFormulaModel','insertFormula','iterator','2485544TOOhlc','Inject','find','getResult','filter','getOwnPropertyDescriptor','exports','354Byghvr','_rangeId','appendFormula','getId','_getCustomRange','_service','UNIVER_DOC','default','1TJYoSP','_unitId','UniverInstanceType','getFormula','createInstance','@univerjs/core','remove','getUnit','FDocument','toPrimitive','numberFormat','isDocFormulaRange','externalReferences','FDocumentTextRange','ICommandService','_document','UniverCore','_docsFormulaResourceLoaderService','getRange','function','803034ffExWP','Module','object','8PrbHgk','getBody','FDocumentParagraph','getSegmentId','_createFormula','decorate','FDocumentFormula','\x20could\x20not\x20be\x20serialized.','293409XMUmDE','UniverProDocsFormula','length','setNumberFormat','rangeId','_univerInstanceService','toStringTag','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','@univerjs/docs/facade','defineProperty','RemoveDocFormulaCommand','string','startIndex'];_0x26a4=function(){return _0x59a306;};return _0x26a4();}
|
|
1
|
+
function _0x1a45(_0x262dec,_0x3668b9){_0x262dec=_0x262dec-0x89;var _0x675d45=_0x675d();var _0x1a45ad=_0x675d45[_0x262dec];return _0x1a45ad;}function _0x675d(){var _0xe8c955=['_document','defineProperty','_docsFormulaDisplayTextService','syncExecuteCommand','_initialize','16BzBKyH','body','getFormulaAt','UniverInstanceType','get','string','DocFormulaDisplayTextService','102330cpAJHM','getSnapshot','59735PdCUQm','_injector','SetDocFormulaNumberFormatCommand','_createFormula','@univerjs/core','ConvertDocFormulaToTextCommand','getOwnPropertyDescriptor','_unitId','symbol','FDocument','_getCompleteRanges','amd','1505126TFzpZj','describe','getRange','object','UniverProDocsFormula','2zPDXhd','InsertDocFormulaCommand','DocFormulaModel','UpdateDocFormulaCommand','6104PYidLR','228677QXmMbi','saveUnit','getId','appendFormula','startIndex','143gzwuxR','length','_model','remove','Inject','getUnit','Module','FDocumentFormula','default','_insert','UniverDocsFacade','replaceWithText','FDocumentParagraph','decorate','IResourceLoaderService','replaceWithFormula','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','FDocumentTextRange','range','357gDEEBg','toPrimitive','getConfig','iterator','_service','IUniverInstanceService','getFormula','_docsFormulaCommandService','convertToText','12PfaCyg','insertFormula','numberFormat','endOffset','createInstance','\x20could\x20not\x20be\x20serialized.','externalReferences','endIndex','rangeId','_docsFormulaResourceLoaderService','@univerjs-pro/docs-formula','map','some','_docsFormulaModel','find','formula','function','isDocFormulaRange','getSegmentId','filter','setNumberFormat','getResult','11107733xvgqSD','_rangeId','_univerInstanceService','673362inwhLx','customRanges','_getCustomRange','extend','_commandService','RemoveDocFormulaCommand','42pyNAuB','DocFormulaService','ICommandService','@univerjs/docs/facade'];_0x675d=function(){return _0xe8c955;};return _0x675d();}(function(_0x12a7d0,_0x108a2d){var _0x56c20b=_0x1a45,_0x21196e=_0x12a7d0();while(!![]){try{var _0x5288d5=-parseInt(_0x56c20b(0xe0))/0x1*(parseInt(_0x56c20b(0xdb))/0x2)+-parseInt(_0x56c20b(0x90))/0x3*(parseInt(_0x56c20b(0xdf))/0x4)+-parseInt(_0x56c20b(0xca))/0x5*(parseInt(_0x56c20b(0xb8))/0x6)+-parseInt(_0x56c20b(0xd6))/0x7+parseInt(_0x56c20b(0xc1))/0x8*(parseInt(_0x56c20b(0xb2))/0x9)+-parseInt(_0x56c20b(0xc8))/0xa*(parseInt(_0x56c20b(0xe5))/0xb)+parseInt(_0x56c20b(0x99))/0xc*(parseInt(_0x56c20b(0xaf))/0xd);if(_0x5288d5===_0x108a2d)break;else _0x21196e['push'](_0x21196e['shift']());}catch(_0x3b135d){_0x21196e['push'](_0x21196e['shift']());}}}(_0x675d,0x27952),function(_0x681579,_0x39aa66){var _0x522443=_0x1a45;typeof exports=='object'&&typeof module<'u'?_0x39aa66(exports,require('@univerjs-pro/docs-formula'),require('@univerjs/core'),require('@univerjs/docs/facade')):typeof define=='function'&&define[_0x522443(0xd5)]?define(['exports',_0x522443(0xa3),_0x522443(0xce),_0x522443(0xbb)],_0x39aa66):(_0x681579=typeof globalThis<'u'?globalThis:_0x681579||self,_0x39aa66(_0x681579['UniverProDocsFormulaFacade']={},_0x681579[_0x522443(0xda)],_0x681579['UniverCore'],_0x681579[_0x522443(0xef)]));}(this,function(_0xe157df,_0x5f3330,_0x334c14,_0x2dbc04){var _0xb43a8=_0x1a45;Object[_0xb43a8(0xbd)](_0xe157df,Symbol['toStringTag'],{'value':_0xb43a8(0xeb)});function _0x1ade55(_0x4f7643,_0x520929){return function(_0x2994ab,_0x417cd7){_0x520929(_0x2994ab,_0x417cd7,_0x4f7643);};}function _0x2b138d(_0x210a12,_0x5dc95a,_0x394010,_0x1d09ee){var _0x4d6739=_0xb43a8,_0x49fa24=arguments[_0x4d6739(0xe6)],_0x18fb3b=_0x49fa24<0x3?_0x5dc95a:_0x1d09ee===null?_0x1d09ee=Object[_0x4d6739(0xd0)](_0x5dc95a,_0x394010):_0x1d09ee,_0x5598a2;if(typeof Reflect=='object'&&typeof Reflect[_0x4d6739(0x8a)]==_0x4d6739(0xa9))_0x18fb3b=Reflect[_0x4d6739(0x8a)](_0x210a12,_0x5dc95a,_0x394010,_0x1d09ee);else{for(var _0x6b88=_0x210a12[_0x4d6739(0xe6)]-0x1;_0x6b88>=0x0;_0x6b88--)(_0x5598a2=_0x210a12[_0x6b88])&&(_0x18fb3b=(_0x49fa24<0x3?_0x5598a2(_0x18fb3b):_0x49fa24>0x3?_0x5598a2(_0x5dc95a,_0x394010,_0x18fb3b):_0x5598a2(_0x5dc95a,_0x394010))||_0x18fb3b);}return _0x49fa24>0x3&&_0x18fb3b&&Object[_0x4d6739(0xbd)](_0x5dc95a,_0x394010,_0x18fb3b),_0x18fb3b;}let _0x2e9911=class{constructor(_0x34e407,_0x19497a,_0x3fa634,_0xd04f1b,_0x491e93,_0x7fc52f){var _0x3fb78a=_0xb43a8;this[_0x3fb78a(0xd1)]=_0x34e407,this[_0x3fb78a(0xb0)]=_0x19497a,this[_0x3fb78a(0xb6)]=_0x3fa634,this[_0x3fb78a(0xe7)]=_0xd04f1b,this[_0x3fb78a(0x94)]=_0x491e93,this[_0x3fb78a(0xb1)]=_0x7fc52f;}[_0xb43a8(0xe2)](){var _0x243505=_0xb43a8;return this[_0x243505(0xb0)];}['getRange'](){let _0x2584fb=this['_getCustomRange']();return _0x2584fb?{'endOffset':_0x2584fb['endIndex']+0x1,'rangeId':_0x2584fb['rangeId'],'startOffset':_0x2584fb['startIndex']}:null;}[_0xb43a8(0x96)](){var _0x19a758=_0xb43a8,_0x4995fd;return((_0x4995fd=this[_0x19a758(0xe7)][_0x19a758(0x96)](this['_unitId'],this[_0x19a758(0xb0)]))==null?void 0x0:_0x4995fd['formula'])??'';}[_0xb43a8(0x92)](){var _0x9c37e=_0xb43a8;return this['_model'][_0x9c37e(0x96)](this[_0x9c37e(0xd1)],this[_0x9c37e(0xb0)])??null;}[_0xb43a8(0xae)](){var _0x3dfb4f=_0xb43a8;return this[_0x3dfb4f(0x94)][_0x3dfb4f(0xae)]({'unitId':this['_unitId'],'rangeId':this[_0x3dfb4f(0xb0)]})??null;}[_0xb43a8(0xd7)](){var _0x15d096=_0xb43a8;let _0x5e0c58=this['getRange'](),_0x308982=this[_0x15d096(0x92)](),_0x57cbcd=this[_0x15d096(0xae)]();return!_0x5e0c58||!_0x308982||!_0x57cbcd?null:{..._0x5e0c58,'config':_0x308982,'formula':_0x308982['formula'],'result':_0x57cbcd,'type':_0x15d096(0xa8)};}['update'](_0x276d2a){var _0x522124=_0xb43a8;return this[_0x522124(0xb6)][_0x522124(0xbf)](_0x5f3330[_0x522124(0xde)]['id'],{'externalReferences':_0x276d2a[_0x522124(0x9f)],'formula':_0x276d2a[_0x522124(0xa8)],'numberFormat':_0x276d2a[_0x522124(0x9b)],'rangeId':this['_rangeId'],'unitId':this[_0x522124(0xd1)]});}[_0xb43a8(0xad)](_0x357320){var _0x14258c=_0xb43a8;return this[_0x14258c(0xb6)][_0x14258c(0xbf)](_0x5f3330[_0x14258c(0xcc)]['id'],{'numberFormat':_0x357320,'rangeId':this[_0x14258c(0xb0)],'unitId':this[_0x14258c(0xd1)]});}[_0xb43a8(0xe8)](){var _0x1f48dc=_0xb43a8;return this[_0x1f48dc(0xb6)][_0x1f48dc(0xbf)](_0x5f3330[_0x1f48dc(0xb7)]['id'],{'rangeId':this[_0x1f48dc(0xb0)],'unitId':this['_unitId']});}[_0xb43a8(0xf0)](_0x346c54){var _0x25e6f6=_0xb43a8;return this[_0x25e6f6(0xb6)][_0x25e6f6(0xbf)](_0x5f3330['ReplaceDocFormulaWithTextCommand']['id'],{'rangeId':this[_0x25e6f6(0xb0)],'text':_0x346c54,'unitId':this[_0x25e6f6(0xd1)]});}[_0xb43a8(0x98)](){var _0x35d4ae=_0xb43a8;return this[_0x35d4ae(0xb6)][_0x35d4ae(0xbf)](_0x5f3330[_0x35d4ae(0xcf)]['id'],{'rangeId':this[_0x35d4ae(0xb0)],'unitId':this[_0x35d4ae(0xd1)]});}[_0xb43a8(0xb4)](){var _0x1a038f=_0xb43a8,_0x94f837;let _0x25c797=this[_0x1a038f(0xb1)][_0x1a038f(0xea)](this['_unitId'],_0x334c14[_0x1a038f(0xc4)]['UNIVER_DOC']);return _0x25c797==null||(_0x94f837=_0x25c797[_0x1a038f(0xc9)]()[_0x1a038f(0xc2)])==null||(_0x94f837=_0x94f837['customRanges'])==null?void 0x0:_0x94f837['find'](_0x23026d=>_0x23026d[_0x1a038f(0xa1)]===this['_rangeId']&&(0x0,_0x5f3330['isDocFormulaRange'])(_0x23026d));}};_0x2e9911=_0x2b138d([_0x1ade55(0x2,_0x334c14[_0xb43a8(0xba)]),_0x1ade55(0x3,(0x0,_0x334c14[_0xb43a8(0xe9)])(_0x5f3330[_0xb43a8(0xdd)])),_0x1ade55(0x4,(0x0,_0x334c14[_0xb43a8(0xe9)])(_0x5f3330[_0xb43a8(0xb9)])),_0x1ade55(0x5,_0x334c14[_0xb43a8(0x95)])],_0x2e9911);function _0x457216(_0x34df49){'@babel/helpers - typeof';var _0x3b2dbc=_0xb43a8;return _0x457216=typeof Symbol==_0x3b2dbc(0xa9)&&typeof Symbol[_0x3b2dbc(0x93)]=='symbol'?function(_0x4a8664){return typeof _0x4a8664;}:function(_0xb59963){var _0x36fbaf=_0x3b2dbc;return _0xb59963&&typeof Symbol=='function'&&_0xb59963['constructor']===Symbol&&_0xb59963!==Symbol['prototype']?_0x36fbaf(0xd2):typeof _0xb59963;},_0x457216(_0x34df49);}function _0x33382d(_0x25d40d,_0x3481fd){var _0x3260cf=_0xb43a8;if(_0x457216(_0x25d40d)!=_0x3260cf(0xd9)||!_0x25d40d)return _0x25d40d;var _0x52240b;if(typeof Symbol<'u'&&(_0x52240b=_0x25d40d[Symbol[_0x3260cf(0x91)]])!==void 0x0){var _0x58fc5e=_0x52240b['call'](_0x25d40d,_0x3481fd||_0x3260cf(0xed));if(_0x457216(_0x58fc5e)!=_0x3260cf(0xd9))return _0x58fc5e;throw TypeError(_0x3260cf(0x8d));}return(_0x3481fd===_0x3260cf(0xc6)?String:Number)(_0x25d40d);}function _0x5c1624(_0xeecdcf){var _0xdedab4=_0xb43a8,_0x46ebf1=_0x33382d(_0xeecdcf,_0xdedab4(0xc6));return _0x457216(_0x46ebf1)==_0xdedab4(0xd2)?_0x46ebf1:_0x46ebf1+'';}function _0x36bed2(_0x77035c,_0x479c57,_0x3c00a6){var _0x23232c=_0xb43a8;return(_0x479c57=_0x5c1624(_0x479c57))in _0x77035c?Object[_0x23232c(0xbd)](_0x77035c,_0x479c57,{'value':_0x3c00a6,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x77035c[_0x479c57]=_0x3c00a6,_0x77035c;}var _0x15f93a=class extends _0x2dbc04['FDocument']{constructor(..._0x207c61){var _0x25e481=_0xb43a8;super(..._0x207c61),_0x36bed2(this,_0x25e481(0x97),void 0x0),_0x36bed2(this,_0x25e481(0xbe),void 0x0),_0x36bed2(this,_0x25e481(0xa6),void 0x0),_0x36bed2(this,_0x25e481(0xa2),void 0x0);}['_initialize'](_0x5f54c9){var _0x58f8cd=_0xb43a8;this[_0x58f8cd(0x97)]=_0x5f54c9[_0x58f8cd(0xc5)](_0x334c14[_0x58f8cd(0xba)]),this[_0x58f8cd(0xbe)]=_0x5f54c9[_0x58f8cd(0xc5)](_0x5f3330[_0x58f8cd(0xc7)]),this[_0x58f8cd(0xa6)]=_0x5f54c9[_0x58f8cd(0xc5)](_0x5f3330[_0x58f8cd(0xdd)]),this[_0x58f8cd(0xa2)]=_0x5f54c9['get'](_0x334c14[_0x58f8cd(0x8b)]);}['getFormulas'](){var _0x5111ca=_0xb43a8;return this[_0x5111ca(0xd4)]()[_0x5111ca(0xa4)](_0x44d6cc=>this[_0x5111ca(0xcd)](_0x44d6cc[_0x5111ca(0xa1)]));}['getFormula'](_0x287563){var _0x357b72=_0xb43a8;return this[_0x357b72(0xd4)]()[_0x357b72(0xa5)](_0x5bbdcb=>_0x5bbdcb[_0x357b72(0xa1)]===_0x287563)?this[_0x357b72(0xcd)](_0x287563):null;}[_0xb43a8(0xc3)](_0x162205){var _0x42bc2b=_0xb43a8;let _0x363c6d=this[_0x42bc2b(0xd4)]()[_0x42bc2b(0xa7)](_0x4b6d42=>_0x4b6d42[_0x42bc2b(0xe4)]<=_0x162205&&_0x162205<=_0x4b6d42[_0x42bc2b(0xa0)]);return _0x363c6d?this[_0x42bc2b(0xcd)](_0x363c6d[_0x42bc2b(0xa1)]):null;}['saveFormulaDisplayTextSnapshot'](){var _0x1b8d7d=_0xb43a8;let _0x3db0f7=this[_0x1b8d7d(0xa2)][_0x1b8d7d(0xe1)](this['id']);if(!_0x3db0f7)throw Error('Document\x20'+this['id']+_0x1b8d7d(0x9e));return this[_0x1b8d7d(0xbe)]['degradeDocumentData'](_0x3db0f7);}[_0xb43a8(0x9a)](_0x1ae567){var _0x56ffb1=_0xb43a8;return this[_0x56ffb1(0xee)]({'externalReferences':_0x1ae567['externalReferences'],'formula':_0x1ae567[_0x56ffb1(0xa8)],'numberFormat':_0x1ae567[_0x56ffb1(0x9b)],'target':{'type':_0x56ffb1(0x8f),'startOffset':_0x1ae567['startOffset'],'endOffset':_0x1ae567[_0x56ffb1(0x9c)]},'unitId':this['getId']()});}['_insert'](_0x399813){var _0x2f3c71=_0xb43a8;let _0x52174c=this[_0x2f3c71(0x97)][_0x2f3c71(0xbf)](_0x5f3330[_0x2f3c71(0xdc)]['id'],_0x399813);return _0x52174c?this[_0x2f3c71(0xcd)](_0x52174c['rangeId']):null;}[_0xb43a8(0xd4)](){var _0x2b310c=_0xb43a8,_0x53d74b;let _0x3452a7=this['_docsFormulaModel']['getFormulas'](this[_0x2b310c(0xe2)]());return((_0x53d74b=this['getBody']('')[_0x2b310c(0xb3)])==null?void 0x0:_0x53d74b[_0x2b310c(0xac)](_0x3b183a=>(0x0,_0x5f3330[_0x2b310c(0xaa)])(_0x3b183a)&&_0x3452a7[_0x3b183a['rangeId']]!=null))??[];}[_0xb43a8(0xcd)](_0x2cc982){var _0x14172b=_0xb43a8;return this[_0x14172b(0xcb)][_0x14172b(0x9d)](_0x2e9911,this['getId'](),_0x2cc982);}};_0x2dbc04[_0xb43a8(0xd3)][_0xb43a8(0xb5)](_0x15f93a);var _0x7738d8=class extends _0x2dbc04[_0xb43a8(0x89)]{constructor(..._0x53a6e6){var _0x22f9c9=_0xb43a8;super(..._0x53a6e6),_0x36bed2(this,_0x22f9c9(0x97),void 0x0);}[_0xb43a8(0xc0)](_0x23289b){var _0x4df461=_0xb43a8;this[_0x4df461(0x97)]=_0x23289b[_0x4df461(0xc5)](_0x334c14[_0x4df461(0xba)]);}[_0xb43a8(0x9a)](_0x3f7d6b,_0x2b08d2,_0x93b881={}){var _0x11a8cb=_0xb43a8;return this[_0x11a8cb(0xee)](_0x3f7d6b,_0x2b08d2,_0x93b881);}[_0xb43a8(0xe3)](_0x357108,_0x196440={}){return this['_insert']('end',_0x357108,_0x196440);}[_0xb43a8(0xee)](_0x3046c7,_0x549945,_0x20a952){var _0x4c7983=_0xb43a8;if(this[_0x4c7983(0xab)]())return null;let _0x364ab9={'externalReferences':_0x20a952[_0x4c7983(0x9f)],'formula':_0x549945,'numberFormat':_0x20a952[_0x4c7983(0x9b)],'target':{'type':'paragraph','paragraphId':this[_0x4c7983(0xe2)](),'position':_0x3046c7},'unitId':this[_0x4c7983(0xbc)][_0x4c7983(0xe2)]()},_0x4aa95d=this[_0x4c7983(0x97)]['syncExecuteCommand'](_0x5f3330[_0x4c7983(0xdc)]['id'],_0x364ab9);return _0x4aa95d?this[_0x4c7983(0xcb)][_0x4c7983(0x9d)](_0x2e9911,this['_document'][_0x4c7983(0xe2)](),_0x4aa95d['rangeId']):null;}};_0x2dbc04[_0xb43a8(0x89)][_0xb43a8(0xb5)](_0x7738d8);var _0x400a36=class extends _0x2dbc04['FDocumentTextRange']{constructor(..._0x1b3b5c){var _0xb53303=_0xb43a8;super(..._0x1b3b5c),_0x36bed2(this,_0xb53303(0x97),void 0x0);}['_initialize'](_0x562169){var _0x22c375=_0xb43a8;this['_docsFormulaCommandService']=_0x562169[_0x22c375(0xc5)](_0x334c14['ICommandService']);}[_0xb43a8(0x8c)](_0x207fac,_0x3ac173={}){var _0x7c2ffa=_0xb43a8;let {endOffset:_0x23f786,segmentId:_0x4e78b9,startOffset:_0x574b73}=this[_0x7c2ffa(0xd8)]();return _0x4e78b9?null:this[_0x7c2ffa(0xee)](_0x574b73,_0x23f786,_0x207fac,_0x3ac173);}[_0xb43a8(0xee)](_0x4634a3,_0x118c38,_0x3ff066,_0x428f33){var _0x40eaef=_0xb43a8;let _0xf06810={'externalReferences':_0x428f33[_0x40eaef(0x9f)],'formula':_0x3ff066,'numberFormat':_0x428f33[_0x40eaef(0x9b)],'target':{'type':_0x40eaef(0x8f),'startOffset':_0x4634a3,'endOffset':_0x118c38},'unitId':this[_0x40eaef(0xbc)][_0x40eaef(0xe2)]()},_0x56be2d=this['_docsFormulaCommandService'][_0x40eaef(0xbf)](_0x5f3330[_0x40eaef(0xdc)]['id'],_0xf06810);return _0x56be2d?this['_injector'][_0x40eaef(0x9d)](_0x2e9911,this[_0x40eaef(0xbc)][_0x40eaef(0xe2)](),_0x56be2d[_0x40eaef(0xa1)]):null;}};_0x2dbc04[_0xb43a8(0x8e)][_0xb43a8(0xb5)](_0x400a36),Object[_0xb43a8(0xbd)](_0xe157df,_0xb43a8(0xec),{'enumerable':!0x0,'get':function(){return _0x2e9911;}});}));
|