@univerjs-pro/docs-formula 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +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 _0x3a7f13=_0x53b8;(function(_0x9328e1,_0x131692){const _0x1e12e8=_0x53b8,_0x5c827a=_0x9328e1();while(!![]){try{const _0x31ada3=-parseInt(_0x1e12e8(0x187))/0x1*(-parseInt(_0x1e12e8(0x1c3))/0x2)+parseInt(_0x1e12e8(0x22d))/0x3+parseInt(_0x1e12e8(0x196))/0x4*(-parseInt(_0x1e12e8(0x1e3))/0x5)+parseInt(_0x1e12e8(0x1c8))/0x6*(-parseInt(_0x1e12e8(0x263))/0x7)+parseInt(_0x1e12e8(0x1f2))/0x8*(-parseInt(_0x1e12e8(0x26b))/0x9)+-parseInt(_0x1e12e8(0x24c))/0xa*(-parseInt(_0x1e12e8(0x19b))/0xb)+parseInt(_0x1e12e8(0x1b8))/0xc;if(_0x31ada3===_0x131692)break;else _0x5c827a['push'](_0x5c827a['shift']());}catch(_0x2dfca3){_0x5c827a['push'](_0x5c827a['shift']());}}}(_0x52b2,0x5549a));import{FormulaCacheEligibilityService as _0x13ac3a,FormulaLastValuePersistenceService as _0x416b1f,HostExternalReferenceModel as _0xceeb38,UniverProFormulaEnginePlugin as _0x513513,buildUpsertHostExternalReferenceMutations as _0x3b0f43,collectFormulaExternalReferenceQualifiers as _0x48d68a,getScalarFormulaResultCell as _0x3ee924,resolveFormulaResultPresentation as _0x12221e,resolveHostFormulaExternalReferences as _0x5d5293,toFormulaLastValue as _0x5a1b13}from'@univerjs-pro/engine-formula';import{CellValueType as _0x320583,CommandType as _0x16d163,CustomRangeType as _0x38abe7,DataStreamTreeTokenType as _0x3c59f5,DependentOn as _0x37da81,Disposable as _0x533030,ICommandService as _0x9a0954,IConfigService as _0x4226f8,IResourceManagerService as _0x164b3f,IUndoRedoService as _0x16e8d6,IUniverInstanceService as _0x2629d5,Inject as _0x5d6038,Injector as _0x2a8248,JSONX as _0x5e930b,Plugin as _0x26195d,TextX as _0x556769,Tools as _0x5a1e4f,UniverInstanceType as _0x4aa394,generateRandomId as _0x32ab18,getBodySliceForTextXAction as _0x282876,getCustomRangeInterval as _0x4f97d4,getParagraphContentStartOffset as _0x19d939,getRichTextEditPath as _0x410a7f,merge as _0x4e3800,shiftExclusiveRangeOnDelete as _0x422036,shiftExclusiveRangeOnInsert as _0x514d4f,shiftInclusiveRangeOnDelete as _0x433aa0,shiftInclusiveRangeOnInsert as _0x4b4cb7,touchDependencies as _0xddcf97}from'@univerjs/core';import{DOC_SELECTION_OPTION_PRESERVE_CARET as _0x5393de,DocSelectionManagerService as _0x3d26b2,DocTextResolverService as _0x2459b3,RichTextEditingMutation as _0xd26f03,UniverDocsPlugin as _0x46761e}from'@univerjs/docs';import{FormulaResultStatus as _0x2c8d51,LexerTreeBuilder as _0x9fae86,OtherFormulaBizType as _0x2b96ca,RegisterOtherFormulaService as _0x16b5f1}from'@univerjs/engine-formula';import{Subject as _0x52ee64}from'rxjs';import{UniverLicensePlugin as _0x3344bd}from'@univerjs-pro/license';const y=_0x3a7f13(0x232),je=_0x3a7f13(0x1b3),Me='';function b(){return{'formulas':{}};}function x(_0x468856){const _0x21a001=_0x3a7f13;return!_0x468856||typeof _0x468856!='object'||!(_0x21a001(0x264)in _0x468856)||!_0x468856['formulas']||typeof _0x468856[_0x21a001(0x264)]!='object'||Array['isArray'](_0x468856[_0x21a001(0x264)])?!0x1:Object[_0x21a001(0x249)](_0x468856[_0x21a001(0x264)])[_0x21a001(0x186)](([_0x5bc57c,_0x5bb470])=>_0x5bc57c[_0x21a001(0x218)]>0x0&&Ne(_0x5bb470));}function _0x53b8(_0x2201e4,_0x55d4b0){_0x2201e4=_0x2201e4-0x180;const _0x52b22e=_0x52b2();let _0x53b8d2=_0x52b22e[_0x2201e4];return _0x53b8d2;}function Ne(_0x3b9f52){const _0x1751a0=_0x3a7f13;return!_0x3b9f52||typeof _0x3b9f52!='object'||!S(_0x3b9f52,[_0x1751a0(0x24d),_0x1751a0(0x230),_0x1751a0(0x1ff)])||!('formula'in _0x3b9f52)||typeof _0x3b9f52['formula']!='string'||!_0x3b9f52[_0x1751a0(0x24d)]['trim']()||_0x1751a0(0x230)in _0x3b9f52&&_0x3b9f52['numberFormat']!=null&&(typeof _0x3b9f52['numberFormat']!='object'||!S(_0x3b9f52[_0x1751a0(0x230)],[_0x1751a0(0x229)])||!(_0x1751a0(0x229)in _0x3b9f52[_0x1751a0(0x230)])||typeof _0x3b9f52[_0x1751a0(0x230)][_0x1751a0(0x229)]!='string')?!0x1:!('lastValue'in _0x3b9f52)||_0x3b9f52[_0x1751a0(0x1ff)]==null||Pe(_0x3b9f52[_0x1751a0(0x1ff)]);}function Pe(_0x2df729){const _0x43ed20=_0x3a7f13;return!_0x2df729||typeof _0x2df729!=_0x43ed20(0x247)||!S(_0x2df729,['v','t',_0x43ed20(0x229)])||!('v'in _0x2df729)||_0x2df729['v']!==null&&typeof _0x2df729['v']!=_0x43ed20(0x25f)&&typeof _0x2df729['v']!='number'&&typeof _0x2df729['v']!=_0x43ed20(0x1a2)||'t'in _0x2df729&&_0x2df729['t']!=null&&!Fe(_0x2df729['t'])?!0x1:!(_0x43ed20(0x229)in _0x2df729)||_0x2df729[_0x43ed20(0x229)]==null||typeof _0x2df729[_0x43ed20(0x229)]==_0x43ed20(0x25f);}function S(_0x4f7174,_0x249d11){const _0x22d68f=_0x3a7f13;let _0x5076cd=new Set(_0x249d11);return Object[_0x22d68f(0x241)](_0x4f7174)['every'](_0x1b71e1=>_0x5076cd[_0x22d68f(0x260)](_0x1b71e1));}function Fe(_0x25cf79){const _0x3c817f=_0x3a7f13;return typeof _0x25cf79=='number'&&Object['values'](_0x320583)[_0x3c817f(0x21f)](_0x25cf79);}const Ie=new Set([_0x3c59f5[_0x3a7f13(0x1d5)],_0x3c59f5[_0x3a7f13(0x1dd)],_0x3c59f5[_0x3a7f13(0x22c)],_0x3c59f5[_0x3a7f13(0x1ec)],_0x3c59f5[_0x3a7f13(0x279)],_0x3c59f5[_0x3a7f13(0x246)],_0x3c59f5[_0x3a7f13(0x185)],_0x3c59f5[_0x3a7f13(0x1ba)],_0x3c59f5['COLUMN_START'],_0x3c59f5[_0x3a7f13(0x18b)],_0x3c59f5[_0x3a7f13(0x1bb)],_0x3c59f5[_0x3a7f13(0x1c2)],_0x3c59f5[_0x3a7f13(0x1fa)],_0x3c59f5['CUSTOM_BLOCK']]);var C=class extends Error{constructor(){super('Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries');}};function Le(_0x3cff8b){const _0x178960=_0x3a7f13;var _0x4f1467,_0x3c367c;let _0x3ffeab=_0x5a1e4f[_0x178960(0x201)](_0x3cff8b[_0x178960(0x1c6)]),_0x2c9849=O(_0x3ffeab),{startOffset:_0x5842c4,endOffset:_0x2617a6}=We(_0x2c9849,_0x3cff8b[_0x178960(0x23e)],_0x3cff8b[_0x178960(0x21d)]);Ve(_0x2c9849,_0x5842c4,_0x2617a6);let _0x23bc8c=((_0x4f1467=_0x2c9849['customRanges'])==null?void 0x0:_0x4f1467['filter'](_0x31d1ca=>{const _0x3a3cb6=_0x178960;if(!w(_0x31d1ca))return!0x1;let _0x576375=_0x4f97d4(_0x31d1ca);return _0x576375[_0x3a3cb6(0x21d)]>_0x5842c4&&_0x576375[_0x3a3cb6(0x23e)]<_0x2617a6;})[_0x178960(0x266)](_0x1af40c=>_0x1af40c[_0x178960(0x23f)]))??[];qe(_0x2c9849,_0x5842c4,_0x2617a6,''),_0x2c9849[_0x178960(0x182)]=[...((_0x3c367c=_0x2c9849[_0x178960(0x182)])==null?void 0x0:_0x3c367c[_0x178960(0x280)](_0x2d4851=>!_0x23bc8c['includes'](_0x2d4851['rangeId'])&&_0x2d4851['rangeId']!==_0x3cff8b[_0x178960(0x23f)]))??[],He(_0x3cff8b[_0x178960(0x23f)],_0x5842c4)][_0x178960(0x20e)]((_0x26a2ab,_0x3d3052)=>_0x26a2ab['startIndex']-_0x3d3052[_0x178960(0x254)]);let _0x251d51=Ue(_0x3cff8b[_0x178960(0x1a5)]);return _0x23bc8c['forEach'](_0x52de0e=>{delete _0x251d51['formulas'][_0x52de0e];}),_0x251d51[_0x178960(0x264)][_0x3cff8b['rangeId']]=_0x5a1e4f['deepClone'](_0x3cff8b[_0x178960(0x270)]),{'nextDocumentData':_0x3ffeab,'nextResource':_0x251d51,'cursorOffset':_0x5842c4+0x1};}function Re(_0x9e9209){const _0x66310b=_0x3a7f13;var _0x2c6cd7,_0x5bf3d5;let _0x5d9611=_0x5a1e4f['deepClone'](_0x9e9209[_0x66310b(0x1c6)]),_0x5d175e=(_0x2c6cd7=O(_0x5d9611)['customRanges'])==null?void 0x0:_0x2c6cd7[_0x66310b(0x19d)](_0x5adfc2=>_0x5adfc2[_0x66310b(0x23f)]===_0x9e9209[_0x66310b(0x23f)]&&w(_0x5adfc2));if(!_0x5d175e||!((_0x5bf3d5=_0x9e9209[_0x66310b(0x1a5)])!=null&&_0x5bf3d5[_0x66310b(0x264)][_0x9e9209[_0x66310b(0x23f)]]))return null;let _0x3f9a1d=Ue(_0x9e9209['resource']);return _0x3f9a1d[_0x66310b(0x264)][_0x9e9209[_0x66310b(0x23f)]]=_0x5a1e4f[_0x66310b(0x201)](_0x9e9209[_0x66310b(0x270)]),{'nextDocumentData':_0x5d9611,'nextResource':_0x3f9a1d,'cursorOffset':_0x5d175e[_0x66310b(0x221)]+0x1};}function ze(_0x8008f9){const _0x5ab265=_0x3a7f13;let _0x5e6d1c=_0x5a1e4f[_0x5ab265(0x201)](_0x8008f9[_0x5ab265(0x1c6)]),_0x5a7e08=Je(_0x5e6d1c,_0x8008f9[_0x5ab265(0x23f)],_0x8008f9['text']??'');if(_0x5a7e08==null)return null;let _0x2f32cc=Ue(_0x8008f9[_0x5ab265(0x1a5)]);return delete _0x2f32cc['formulas'][_0x8008f9[_0x5ab265(0x23f)]],{'nextDocumentData':_0x5e6d1c,'nextResource':_0x2f32cc,'cursorOffset':_0x5a7e08};}function Be(_0x112710,_0x28abb6){const _0x447d65=_0x3a7f13;var _0x3ef21c;let _0x5dfc4a=_0x5a1e4f[_0x447d65(0x201)](_0x112710),_0x4268a4=_0x5dfc4a[_0x447d65(0x1b4)];if(!_0x4268a4)return _0x5dfc4a;let _0x134355=new Map(_0x28abb6[_0x447d65(0x266)](_0x40f755=>[_0x40f755['rangeId'],_0x40f755[_0x447d65(0x192)]])),_0x171177=((_0x3ef21c=_0x4268a4[_0x447d65(0x182)])==null?void 0x0:_0x3ef21c[_0x447d65(0x280)](_0x4445a2=>w(_0x4445a2)&&_0x134355[_0x447d65(0x260)](_0x4445a2['rangeId']))[_0x447d65(0x20e)]((_0x26c3ff,_0x219773)=>_0x219773[_0x447d65(0x254)]-_0x26c3ff['startIndex']))??[];for(let _0x229a8a of _0x171177)Je(_0x5dfc4a,_0x229a8a[_0x447d65(0x23f)],_0x134355[_0x447d65(0x1b1)](_0x229a8a[_0x447d65(0x23f)])??'');return _0x5dfc4a;}function w(_0x3fc54e){const _0x4d30ae=_0x3a7f13;var _0x394916;return(_0x3fc54e==null?void 0x0:_0x3fc54e[_0x4d30ae(0x213)])===_0x38abe7[_0x4d30ae(0x1cc)]&&_0x3fc54e[_0x4d30ae(0x20d)]===!0x0&&((_0x394916=_0x3fc54e[_0x4d30ae(0x1a0)])==null?void 0x0:_0x394916['kind'])===_0x4d30ae(0x1b3);}function T(_0x2361f6,_0x5a3446){const _0x328429=_0x3a7f13;var _0x5e8934;return _0x2361f6==null||(_0x5e8934=_0x2361f6[_0x328429(0x182)])==null?void 0x0:_0x5e8934[_0x328429(0x19d)](_0x552181=>_0x552181[_0x328429(0x23f)]===_0x5a3446&&w(_0x552181));}function Ve(_0x3dcf85,_0x315322,_0x1cc193){const _0x1a283c=_0x3a7f13;if(_0x315322===_0x1cc193){if(Ie[_0x1a283c(0x260)](_0x3dcf85['dataStream'][_0x315322]))throw new C();}else{for(let _0x2e763c=_0x315322;_0x2e763c<_0x1cc193;_0x2e763c++)if(_0x3dcf85[_0x1a283c(0x1f4)][_0x2e763c]===_0x3c59f5[_0x1a283c(0x18c)]||Ie[_0x1a283c(0x260)](_0x3dcf85['dataStream'][_0x2e763c]))throw new C();}}function He(_0x5c2062,_0xe42fc7){return{'startIndex':_0xe42fc7,'endIndex':_0xe42fc7,'rangeId':_0x5c2062,'rangeType':_0x38abe7['CUSTOM'],'wholeEntity':!0x0,'properties':{'kind':je}};}function Ue(_0x37ebe4){const _0x53b378=_0x3a7f13;return _0x37ebe4?_0x5a1e4f[_0x53b378(0x201)](_0x37ebe4):b();}function We(_0x19cd40,_0xe0eefd,_0x5bd9f9){const _0xcc8a8a=_0x3a7f13;let _0x17ca85=Ke(_0x19cd40),_0xd8f963=_0xe0eefd??_0x17ca85,_0x17ee48=_0x5bd9f9??_0xd8f963;return{'startOffset':Ge(Math[_0xcc8a8a(0x211)](_0xd8f963,_0x17ee48),_0x17ca85),'endOffset':Ge(Math[_0xcc8a8a(0x222)](_0xd8f963,_0x17ee48),_0x17ca85)};}function Ge(_0x375055,_0x4718fa){const _0x31e305=_0x3a7f13;return Math[_0x31e305(0x222)](0x0,Math[_0x31e305(0x211)](_0x375055,_0x4718fa));}function Ke(_0xed0bce){const _0x1abdcc=_0x3a7f13;return _0xed0bce['dataStream'][_0x1abdcc(0x27a)](''+_0x3c59f5[_0x1abdcc(0x18c)]+_0x3c59f5[_0x1abdcc(0x1d5)])?Math['max'](0x0,_0xed0bce[_0x1abdcc(0x1f4)]['length']-0x2):_0xed0bce[_0x1abdcc(0x1f4)][_0x1abdcc(0x27a)](_0x3c59f5[_0x1abdcc(0x1d5)])?Math[_0x1abdcc(0x222)](0x0,_0xed0bce[_0x1abdcc(0x1f4)][_0x1abdcc(0x218)]-0x1):_0xed0bce['dataStream'][_0x1abdcc(0x218)];}function qe(_0x5cc2e5,_0x5271f2,_0x101cf0,_0x5079dc){_0x101cf0>_0x5271f2&&Xe(_0x5cc2e5,_0x5271f2,_0x101cf0),Ye(_0x5cc2e5,_0x5271f2,_0x5079dc);}function Je(_0x2694db,_0x20623e,_0x20552e){const _0x49e854=_0x3a7f13;var _0x37d030,_0x5a301e;let _0x519733=O(_0x2694db),_0x2d86a1=(_0x37d030=_0x519733[_0x49e854(0x182)])==null?void 0x0:_0x37d030[_0x49e854(0x19d)](_0x3c66de=>_0x3c66de[_0x49e854(0x23f)]===_0x20623e&&w(_0x3c66de));if(!_0x2d86a1)return null;let _0x124735=_0x4f97d4(_0x2d86a1);return qe(_0x519733,_0x124735[_0x49e854(0x23e)],_0x124735[_0x49e854(0x21d)],_0x20552e),_0x519733[_0x49e854(0x182)]=(_0x5a301e=_0x519733[_0x49e854(0x182)])==null?void 0x0:_0x5a301e[_0x49e854(0x280)](_0x93718f=>_0x93718f[_0x49e854(0x23f)]!==_0x20623e),_0x124735['startOffset']+_0x20552e[_0x49e854(0x218)];}function Ye(_0x215332,_0x1f4b18,_0x1ddf31){const _0x26c1d5=_0x3a7f13;_0x1ddf31&&(_0x215332[_0x26c1d5(0x1f4)]=''+_0x215332[_0x26c1d5(0x1f4)][_0x26c1d5(0x1f7)](0x0,_0x1f4b18)+_0x1ddf31+_0x215332[_0x26c1d5(0x1f4)][_0x26c1d5(0x1f7)](_0x1f4b18),Ze(_0x215332,_0x1f4b18,_0x1ddf31[_0x26c1d5(0x218)]));}function Xe(_0x23d4ee,_0x314c40,_0xff27ca){const _0x5216d9=_0x3a7f13;let _0x5ca488=_0xff27ca-_0x314c40;_0x23d4ee[_0x5216d9(0x1f4)]=''+_0x23d4ee[_0x5216d9(0x1f4)]['slice'](0x0,_0x314c40)+_0x23d4ee[_0x5216d9(0x1f4)][_0x5216d9(0x1f7)](_0xff27ca),Qe(_0x23d4ee,_0x314c40,_0x5ca488);}function Ze(_0x494cea,_0x2a682d,_0x1fff30){const _0x5a88d3=_0x3a7f13;_0x494cea[_0x5a88d3(0x23b)]=$e(_0x494cea[_0x5a88d3(0x23b)],_0x2a682d,_0x1fff30),_0x494cea[_0x5a88d3(0x188)]=$e(_0x494cea[_0x5a88d3(0x188)],_0x2a682d,_0x1fff30),_0x494cea[_0x5a88d3(0x281)]=$e(_0x494cea[_0x5a88d3(0x281)],_0x2a682d,_0x1fff30),_0x494cea['textRuns']=tt(_0x494cea[_0x5a88d3(0x267)],_0x2a682d,_0x1fff30),_0x494cea['tables']=nt(_0x494cea['tables'],_0x2a682d,_0x1fff30),_0x494cea[_0x5a88d3(0x1fb)]=E(_0x494cea[_0x5a88d3(0x1fb)],_0x2a682d,_0x1fff30),_0x494cea[_0x5a88d3(0x182)]=E(_0x494cea[_0x5a88d3(0x182)],_0x2a682d,_0x1fff30),_0x494cea['customDecorations']=E(_0x494cea[_0x5a88d3(0x21c)],_0x2a682d,_0x1fff30),_0x494cea['blockRanges']=E(_0x494cea['blockRanges'],_0x2a682d,_0x1fff30);}function Qe(_0x1c32c3,_0x4c0acc,_0x533786){const _0x4eee09=_0x3a7f13;var _0x2413c7,_0x39b461;_0x1c32c3[_0x4eee09(0x23b)]=et(_0x1c32c3['paragraphs'],_0x4c0acc,_0x533786),_0x1c32c3[_0x4eee09(0x188)]=et(_0x1c32c3[_0x4eee09(0x188)],_0x4c0acc,_0x533786),_0x1c32c3[_0x4eee09(0x281)]=et(_0x1c32c3[_0x4eee09(0x281)],_0x4c0acc,_0x533786),_0x1c32c3[_0x4eee09(0x267)]=(_0x2413c7=rt((_0x39b461=_0x1c32c3[_0x4eee09(0x267)])==null?void 0x0:_0x39b461[_0x4eee09(0x266)](_0x167081=>({..._0x167081,'startIndex':_0x167081['st'],'endIndex':_0x167081['ed']})),_0x4c0acc,_0x533786))==null?void 0x0:_0x2413c7[_0x4eee09(0x266)](_0x36fa90=>{let {startIndex:_0x150cbe,endIndex:_0x5c92c7,..._0x535f04}=_0x36fa90;return{..._0x535f04,'st':_0x150cbe,'ed':_0x5c92c7};}),_0x1c32c3[_0x4eee09(0x243)]=rt(_0x1c32c3[_0x4eee09(0x243)],_0x4c0acc,_0x533786),_0x1c32c3[_0x4eee09(0x1fb)]=D(_0x1c32c3[_0x4eee09(0x1fb)],_0x4c0acc,_0x533786),_0x1c32c3[_0x4eee09(0x182)]=D(_0x1c32c3[_0x4eee09(0x182)],_0x4c0acc,_0x533786),_0x1c32c3[_0x4eee09(0x21c)]=D(_0x1c32c3[_0x4eee09(0x21c)],_0x4c0acc,_0x533786),_0x1c32c3[_0x4eee09(0x1e4)]=D(_0x1c32c3[_0x4eee09(0x1e4)],_0x4c0acc,_0x533786);}function $e(_0xf83adb,_0x110626,_0x593862){const _0xb96096=_0x3a7f13;return _0xf83adb==null?void 0x0:_0xf83adb[_0xb96096(0x266)](_0x3bc5ce=>_0x3bc5ce[_0xb96096(0x254)]>=_0x110626?{..._0x3bc5ce,'startIndex':_0x3bc5ce[_0xb96096(0x254)]+_0x593862}:_0x3bc5ce);}function et(_0x45acd5,_0x39370c,_0x152a8f){const _0x156842=_0x3a7f13;let _0x49ec48=_0x39370c+_0x152a8f;return _0x45acd5==null?void 0x0:_0x45acd5['map'](_0x18e184=>_0x18e184['startIndex']>=_0x39370c&&_0x18e184[_0x156842(0x254)]<_0x49ec48?null:_0x18e184['startIndex']>=_0x49ec48?{..._0x18e184,'startIndex':_0x18e184[_0x156842(0x254)]-_0x152a8f}:_0x18e184)[_0x156842(0x280)](_0x3f34eb=>_0x3f34eb!=null);}function tt(_0x43e6c0,_0x5831a6,_0x55b2f1){const _0x5876cc=_0x3a7f13;return _0x43e6c0==null?void 0x0:_0x43e6c0[_0x5876cc(0x266)](_0x120e3b=>_0x120e3b['st']>=_0x5831a6?{..._0x120e3b,'st':_0x120e3b['st']+_0x55b2f1,'ed':_0x120e3b['ed']+_0x55b2f1}:_0x120e3b['ed']>_0x5831a6?{..._0x120e3b,'ed':_0x120e3b['ed']+_0x55b2f1}:_0x120e3b);}function E(_0x175ab9,_0x5c4fbd,_0x26c0f2){const _0x99762b=_0x3a7f13;return _0x175ab9==null?void 0x0:_0x175ab9[_0x99762b(0x266)](_0x4a7d94=>_0x4b4cb7(_0x4a7d94,_0x5c4fbd,_0x26c0f2));}function nt(_0x24643c,_0x398c06,_0x1728e8){const _0x42ed0a=_0x3a7f13;return _0x24643c==null?void 0x0:_0x24643c[_0x42ed0a(0x266)](_0x4956e1=>_0x514d4f(_0x4956e1,_0x398c06,_0x1728e8));}function D(_0x4d60be,_0x5ae3f2,_0x4bbc37){const _0x457a57=_0x3a7f13;return _0x4d60be==null?void 0x0:_0x4d60be[_0x457a57(0x266)](_0x547e2b=>_0x433aa0(_0x547e2b,_0x5ae3f2,_0x4bbc37))[_0x457a57(0x280)](_0x5e4d29=>_0x5e4d29!=null);}function rt(_0x21f9ba,_0x2322e7,_0x14a817){return _0x21f9ba==null?void 0x0:_0x21f9ba['map'](_0x21536f=>_0x422036(_0x21536f,_0x2322e7,_0x14a817))['filter'](_0x542859=>_0x542859!=null);}function O(_0x1059ad){const _0x20addd=_0x3a7f13;if(!_0x1059ad['body'])throw Error(_0x20addd(0x1f9));return _0x1059ad['body'];}function k(_0x1fbdd5){'@babel/helpers - typeof';const _0x337872=_0x3a7f13;return k=typeof Symbol==_0x337872(0x271)&&typeof Symbol['iterator']=='symbol'?function(_0x372c70){return typeof _0x372c70;}:function(_0x36bf6a){const _0x500d43=_0x337872;return _0x36bf6a&&typeof Symbol==_0x500d43(0x271)&&_0x36bf6a[_0x500d43(0x23c)]===Symbol&&_0x36bf6a!==Symbol['prototype']?'symbol':typeof _0x36bf6a;},k(_0x1fbdd5);}function it(_0x5e1b3c,_0x12ec0e){const _0x1cb036=_0x3a7f13;if(k(_0x5e1b3c)!=_0x1cb036(0x247)||!_0x5e1b3c)return _0x5e1b3c;var _0x1fec30;if(typeof Symbol<'u'&&(_0x1fec30=_0x5e1b3c[Symbol[_0x1cb036(0x18e)]])!==void 0x0){var _0x7cfe0a=_0x1fec30['call'](_0x5e1b3c,_0x12ec0e||_0x1cb036(0x1f1));if(k(_0x7cfe0a)!=_0x1cb036(0x247))return _0x7cfe0a;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x12ec0e===_0x1cb036(0x25f)?String:Number)(_0x5e1b3c);}function at(_0x1862cb){const _0x3125bb=_0x3a7f13;var _0x59373b=it(_0x1862cb,'string');return k(_0x59373b)==_0x3125bb(0x1fd)?_0x59373b:_0x59373b+'';}function A(_0x563bcb,_0x1e8ede,_0x280132){const _0x1cc6d6=_0x3a7f13;return(_0x1e8ede=at(_0x1e8ede))in _0x563bcb?Object[_0x1cc6d6(0x24f)](_0x563bcb,_0x1e8ede,{'value':_0x280132,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x563bcb[_0x1e8ede]=_0x280132,_0x563bcb;}var j=class extends _0x533030{constructor(..._0x10f52f){const _0x34b0c3=_0x3a7f13;super(..._0x10f52f),A(this,_0x34b0c3(0x1e8),new Map()),A(this,_0x34b0c3(0x216),new Map()),A(this,_0x34b0c3(0x235),new Map()),A(this,'_change$',new _0x52ee64()),A(this,_0x34b0c3(0x282),this[_0x34b0c3(0x245)][_0x34b0c3(0x200)]());}[_0x3a7f13(0x238)](_0x389a59,_0x4d0067){const _0x431714=_0x3a7f13;var _0x31c8ac;let _0x319ab7=(_0x31c8ac=this['_resources']['get'](_0x389a59))==null?void 0x0:_0x31c8ac['formulas'][_0x4d0067];return _0x319ab7?_0x5a1e4f[_0x431714(0x201)](_0x319ab7):void 0x0;}[_0x3a7f13(0x1c5)](_0x24562c){const _0x2ab601=_0x3a7f13;var _0x5114a3;return _0x5a1e4f[_0x2ab601(0x201)](((_0x5114a3=this[_0x2ab601(0x1e8)][_0x2ab601(0x1b1)](_0x24562c))==null?void 0x0:_0x5114a3['formulas'])??{});}[_0x3a7f13(0x239)](_0x2e6aff){const _0x1491e0=_0x3a7f13;let _0x372fd5=this[_0x1491e0(0x1e8)][_0x1491e0(0x1b1)](_0x2e6aff);return _0x372fd5?_0x5a1e4f[_0x1491e0(0x201)](_0x372fd5):void 0x0;}[_0x3a7f13(0x209)](_0x14dd5a,_0x133fef,_0x4f28fb){const _0x398aaa=_0x3a7f13;return this[_0x398aaa(0x1cf)](_0x14dd5a,{[_0x133fef]:_0x4f28fb});}[_0x3a7f13(0x226)](_0x6bf61e,_0x276d51){const _0x29f65a=_0x3a7f13;return this[_0x29f65a(0x235)]['has'](_0x6bf61e)||!x(_0x276d51)?!0x1:(this[_0x29f65a(0x1e8)][_0x29f65a(0x22f)](_0x6bf61e,{'formulas':_0x5a1e4f[_0x29f65a(0x201)](_0x276d51[_0x29f65a(0x264)])}),this[_0x29f65a(0x245)][_0x29f65a(0x27f)]({'unitId':_0x6bf61e}),!0x0);}[_0x3a7f13(0x1cf)](_0x5551fa,_0x1fbb64){const _0x34225b=_0x3a7f13;if(this['_loadErrors'][_0x34225b(0x260)](_0x5551fa)||!Object[_0x34225b(0x241)](_0x1fbb64)[_0x34225b(0x218)]||!x({'formulas':_0x1fbb64}))return!0x1;let _0x159bf1=this[_0x34225b(0x1e8)][_0x34225b(0x1b1)](_0x5551fa)??b(),_0x17bae8=_0x5a1e4f[_0x34225b(0x201)](_0x159bf1);return Object[_0x34225b(0x1da)](_0x17bae8['formulas'],_0x5a1e4f['deepClone'](_0x1fbb64)),this['_resources'][_0x34225b(0x22f)](_0x5551fa,_0x17bae8),this['_change$'][_0x34225b(0x27f)]({'unitId':_0x5551fa,'rangeIds':Object['keys'](_0x1fbb64)}),!0x0;}[_0x3a7f13(0x1f0)](_0xdb9045,_0x238171){const _0x423364=_0x3a7f13;if(this[_0x423364(0x235)]['has'](_0xdb9045))return!0x1;let _0x2f6dc9=this['_resources'][_0x423364(0x1b1)](_0xdb9045);if(!(_0x2f6dc9!=null&&_0x2f6dc9[_0x423364(0x264)][_0x238171]))return!0x1;let _0x260950=_0x5a1e4f[_0x423364(0x201)](_0x2f6dc9);return delete _0x260950[_0x423364(0x264)][_0x238171],this[_0x423364(0x1e8)]['set'](_0xdb9045,_0x260950),this[_0x423364(0x245)][_0x423364(0x27f)]({'unitId':_0xdb9045,'rangeIds':[_0x238171]}),!0x0;}[_0x3a7f13(0x283)](_0x559ebc,_0x1faafb){const _0x6bc25a=_0x3a7f13;return x(_0x1faafb)?(this[_0x6bc25a(0x1e8)][_0x6bc25a(0x22f)](_0x559ebc,{'formulas':_0x5a1e4f[_0x6bc25a(0x201)](_0x1faafb[_0x6bc25a(0x264)])}),this[_0x6bc25a(0x216)][_0x6bc25a(0x25c)](_0x559ebc),this['_loadErrors']['delete'](_0x559ebc),this[_0x6bc25a(0x245)]['next']({'unitId':_0x559ebc}),!0x0):(this['_preserveInvalid'](_0x559ebc,_0x1faafb,_0x6bc25a(0x223)),!0x1);}[_0x3a7f13(0x27e)](_0x213760){const _0x4ffc23=_0x3a7f13;let _0x1792e7=this[_0x4ffc23(0x1e8)]['get'](_0x213760);return _0x1792e7?_0x5a1e4f[_0x4ffc23(0x201)](_0x1792e7):this[_0x4ffc23(0x216)][_0x4ffc23(0x260)](_0x213760)?_0x5a1e4f[_0x4ffc23(0x201)](this[_0x4ffc23(0x216)][_0x4ffc23(0x1b1)](_0x213760)):b();}[_0x3a7f13(0x251)](_0x7f0ce7){const _0x58b5dd=_0x3a7f13;return this['_loadErrors'][_0x58b5dd(0x1b1)](_0x7f0ce7);}['removeUnit'](_0xeba3c8){const _0xce816a=_0x3a7f13;this[_0xce816a(0x1e8)]['delete'](_0xeba3c8),this[_0xce816a(0x216)][_0xce816a(0x25c)](_0xeba3c8),this[_0xce816a(0x235)][_0xce816a(0x25c)](_0xeba3c8),this[_0xce816a(0x245)][_0xce816a(0x27f)]({'unitId':_0xeba3c8});}['dispose'](){const _0x4ccb4d=_0x3a7f13;this['_resources'][_0x4ccb4d(0x220)](),this[_0x4ccb4d(0x216)]['clear'](),this['_loadErrors']['clear'](),this['_change$']['complete'](),super['dispose']();}[_0x3a7f13(0x1e2)](_0x3806d9,_0x11a1e0,_0x702353){const _0x38318c=_0x3a7f13;this[_0x38318c(0x1e8)][_0x38318c(0x25c)](_0x3806d9),this['_rawResources']['set'](_0x3806d9,_0x5a1e4f[_0x38318c(0x201)](_0x11a1e0)),this[_0x38318c(0x235)][_0x38318c(0x22f)](_0x3806d9,_0x702353),this[_0x38318c(0x245)]['next']({'unitId':_0x3806d9});}};let ot=function(_0x1fd8bb){const _0xee6cd8=_0x3a7f13;return _0x1fd8bb[_0xee6cd8(0x1dc)]=_0xee6cd8(0x269),_0x1fd8bb[_0xee6cd8(0x219)]=_0xee6cd8(0x203),_0x1fd8bb[_0xee6cd8(0x1c1)]=_0xee6cd8(0x1f3),_0x1fd8bb['ERROR']=_0xee6cd8(0x227),_0x1fd8bb;}({});function M(_0x4ca6b7,_0x5b1915){return function(_0x1ccec8,_0x148296){_0x5b1915(_0x1ccec8,_0x148296,_0x4ca6b7);};}function N(_0x1596fb,_0x5f0660,_0x3fbf81,_0x2901f2){const _0x31b3bb=_0x3a7f13;var _0x5a10cb=arguments[_0x31b3bb(0x218)],_0x1a8278=_0x5a10cb<0x3?_0x5f0660:_0x2901f2===null?_0x2901f2=Object['getOwnPropertyDescriptor'](_0x5f0660,_0x3fbf81):_0x2901f2,_0x315626;if(typeof Reflect==_0x31b3bb(0x247)&&typeof Reflect[_0x31b3bb(0x252)]==_0x31b3bb(0x271))_0x1a8278=Reflect[_0x31b3bb(0x252)](_0x1596fb,_0x5f0660,_0x3fbf81,_0x2901f2);else{for(var _0x43c37c=_0x1596fb[_0x31b3bb(0x218)]-0x1;_0x43c37c>=0x0;_0x43c37c--)(_0x315626=_0x1596fb[_0x43c37c])&&(_0x1a8278=(_0x5a10cb<0x3?_0x315626(_0x1a8278):_0x5a10cb>0x3?_0x315626(_0x5f0660,_0x3fbf81,_0x1a8278):_0x315626(_0x5f0660,_0x3fbf81))||_0x1a8278);}return _0x5a10cb>0x3&&_0x1a8278&&Object['defineProperty'](_0x5f0660,_0x3fbf81,_0x1a8278),_0x1a8278;}let P=class extends _0x533030{constructor(_0x1c3223,_0x19aa41,_0x39ad8c){const _0x4ae415=_0x3a7f13;super(),this['_model']=_0x1c3223,this[_0x4ae415(0x25d)]=_0x19aa41,this[_0x4ae415(0x199)]=_0x39ad8c,A(this,_0x4ae415(0x1d8),new Map()),A(this,'_formulaKeys',new Map()),A(this,_0x4ae415(0x1c0),new _0x52ee64()),A(this,_0x4ae415(0x197),this['_presentationChanged$'][_0x4ae415(0x200)]()),this[_0x4ae415(0x25a)](this[_0x4ae415(0x25d)]['formulaResult$'][_0x4ae415(0x1b0)](_0x59a15d=>{const _0x49c3e8=_0x4ae415;for(let _0x14c843 of Object['values'](_0x59a15d))for(let _0x412c7e of Object['values'](_0x14c843))_0x412c7e['forEach'](_0x589992=>this[_0x49c3e8(0x1e5)](_0x589992));}));}[_0x3a7f13(0x184)](_0x47c11f){const _0x10006c=_0x3a7f13;var _0x56ccfc;let _0x5b6070=_0x47c11f['getUnitId'](),_0x19f1f7=((_0x56ccfc=_0x47c11f[_0x10006c(0x1d2)]()['body'])==null||(_0x56ccfc=_0x56ccfc['customRanges'])==null?void 0x0:_0x56ccfc['filter'](w))??[],_0x2fdb00=this[_0x10006c(0x1f8)]['getFormulas'](_0x5b6070),_0x1331e6=new Set();for(let _0x213788 of _0x19f1f7){let _0x421708=_0x2fdb00[_0x213788[_0x10006c(0x23f)]];_0x421708&&(_0x1331e6[_0x10006c(0x1e0)](F(_0x5b6070,_0x213788[_0x10006c(0x23f)])),this['register']({'unitId':_0x5b6070,'rangeId':_0x213788['rangeId']},_0x421708));}for(let _0xf60416 of Array['from'](this['_registrations'][_0x10006c(0x1ea)]()))_0xf60416[_0x10006c(0x206)]===_0x5b6070&&!_0x1331e6[_0x10006c(0x260)](F(_0xf60416[_0x10006c(0x206)],_0xf60416[_0x10006c(0x23f)]))&&this['unregister'](_0xf60416);}['register'](_0x1a3460,_0x3d52f6){const _0x16bb10=_0x3a7f13;let _0x52e69b=F(_0x1a3460['unitId'],_0x1a3460[_0x16bb10(0x23f)]),_0x23e986=this['_registrations']['get'](_0x52e69b),_0x5f58c3=this['_hostExternalReferenceModel'][_0x16bb10(0x210)](_0x1a3460['unitId']);if(_0x23e986&&_0x23e986[_0x16bb10(0x270)][_0x16bb10(0x24d)]===_0x3d52f6[_0x16bb10(0x24d)]&&_0x23e986[_0x16bb10(0x1e7)]===_0x5f58c3){_0x23e986['config']=_0x3d52f6;let _0x41b795=_0x23e986[_0x16bb10(0x274)]?this[_0x16bb10(0x25d)][_0x16bb10(0x208)](_0x23e986['unitId'],_0x23e986['unitId'],_0x23e986[_0x16bb10(0x274)])??void 0x0:void 0x0;_0x23e986[_0x16bb10(0x1a3)]=_0x41b795,this[_0x16bb10(0x214)](_0x52e69b,st(_0x3d52f6,_0x41b795));return;}_0x23e986!=null&&_0x23e986[_0x16bb10(0x274)]&&this['_deleteRegistration'](_0x23e986);let _0x254961={..._0x1a3460,'config':_0x3d52f6,'referenceRevision':_0x5f58c3,'presentation':st(_0x3d52f6,void 0x0)};if(this[_0x16bb10(0x1d8)][_0x16bb10(0x22f)](_0x52e69b,_0x254961),!_0x3d52f6['formula'][_0x16bb10(0x1d7)]())return;let _0xb6d969=this['_registrationService'][_0x16bb10(0x26f)](_0x1a3460[_0x16bb10(0x206)],_0x1a3460[_0x16bb10(0x206)],_0x3d52f6['formula'],void 0x0,{'rangeId':_0x1a3460['rangeId']},_0x2b96ca[_0x16bb10(0x193)],_0x1a3460['rangeId']);_0x254961['formulaId']=_0xb6d969,this[_0x16bb10(0x27c)][_0x16bb10(0x22f)](_0xb6d969,_0x52e69b);}[_0x3a7f13(0x26a)](_0x4fadaf){const _0x5ad03a=_0x3a7f13;let _0x4413a0=F(_0x4fadaf[_0x5ad03a(0x206)],_0x4fadaf['rangeId']),_0x1b99d2=this[_0x5ad03a(0x1d8)]['get'](_0x4413a0);_0x1b99d2&&(this['_deleteRegistration'](_0x1b99d2),this['_registrations'][_0x5ad03a(0x25c)](_0x4413a0));}[_0x3a7f13(0x231)](_0x82cc37){const _0x2f037f=_0x3a7f13;for(let _0x1fe814 of Array[_0x2f037f(0x1d0)](this['_registrations'][_0x2f037f(0x1ea)]()))_0x1fe814[_0x2f037f(0x206)]===_0x82cc37&&this[_0x2f037f(0x26a)](_0x1fe814);}[_0x3a7f13(0x1df)](_0xbf4167){const _0x4c8692=_0x3a7f13;var _0x3e1ff7;return(_0x3e1ff7=this[_0x4c8692(0x1d8)]['get'](F(_0xbf4167[_0x4c8692(0x206)],_0xbf4167[_0x4c8692(0x23f)])))==null?void 0x0:_0x3e1ff7[_0x4c8692(0x225)];}[_0x3a7f13(0x244)](_0x595b1f){const _0x31d06e=_0x3a7f13;let _0x2a4b4b=this[_0x31d06e(0x1d8)][_0x31d06e(0x1b1)](F(_0x595b1f[_0x31d06e(0x206)],_0x595b1f[_0x31d06e(0x23f)]));return _0x2a4b4b?I(_0x2a4b4b):void 0x0;}[_0x3a7f13(0x255)](){const _0x1f8ed2=_0x3a7f13;return Array[_0x1f8ed2(0x1d0)](this[_0x1f8ed2(0x1d8)][_0x1f8ed2(0x1ea)](),_0x4e837e=>({'identity':{'unitId':_0x4e837e[_0x1f8ed2(0x206)],'rangeId':_0x4e837e[_0x1f8ed2(0x23f)]},'config':_0x4e837e[_0x1f8ed2(0x270)],'referenceRevision':_0x4e837e[_0x1f8ed2(0x1e7)],..._0x4e837e[_0x1f8ed2(0x1a3)]?{'liveResult':_0x4e837e[_0x1f8ed2(0x1a3)]}:null}));}[_0x3a7f13(0x1eb)](){const _0x109a97=_0x3a7f13;for(let _0x1d5f72 of this[_0x109a97(0x1d8)][_0x109a97(0x1ea)]())this[_0x109a97(0x261)](_0x1d5f72);this[_0x109a97(0x1d8)][_0x109a97(0x220)](),this[_0x109a97(0x27c)][_0x109a97(0x220)](),this[_0x109a97(0x1c0)][_0x109a97(0x19f)](),super[_0x109a97(0x1eb)]();}[_0x3a7f13(0x1e5)](_0x10f5ce){const _0x412a05=_0x3a7f13;let _0x5d6f3c=this['_formulaKeys'][_0x412a05(0x1b1)](_0x10f5ce[_0x412a05(0x274)]),_0x80fa5b=_0x5d6f3c?this[_0x412a05(0x1d8)][_0x412a05(0x1b1)](_0x5d6f3c):void 0x0;_0x5d6f3c&&_0x80fa5b&&(_0x80fa5b[_0x412a05(0x1a3)]=_0x10f5ce,this['_setPresentation'](_0x5d6f3c,st(_0x80fa5b[_0x412a05(0x270)],_0x10f5ce)));}[_0x3a7f13(0x214)](_0x3b1900,_0x2cc545){const _0x40dcd5=_0x3a7f13;var _0x33de5f,_0x20a68a;let _0x5c6da4=this[_0x40dcd5(0x1d8)][_0x40dcd5(0x1b1)](_0x3b1900);if(!_0x5c6da4||ct(_0x5c6da4['presentation'],_0x2cc545))return;let _0x160b0f=_0x5c6da4[_0x40dcd5(0x225)],_0x2b2520=I(_0x5c6da4);_0x5c6da4['presentation']=_0x2cc545,this[_0x40dcd5(0x1c0)][_0x40dcd5(0x27f)]({'unitId':_0x5c6da4[_0x40dcd5(0x206)],'rangeId':_0x5c6da4['rangeId'],'presentation':_0x2cc545,'previousPresentation':_0x160b0f,'result':I(_0x5c6da4),'previousResult':{..._0x2b2520,..._0x160b0f,'value':(_0x33de5f=_0x160b0f[_0x40dcd5(0x276)])==null?void 0x0:_0x33de5f['v'],'valueType':((_0x20a68a=_0x160b0f['cell'])==null?void 0x0:_0x20a68a['t'])??void 0x0}});}[_0x3a7f13(0x261)](_0xb7799e){const _0x7851e8=_0x3a7f13;_0xb7799e[_0x7851e8(0x274)]&&(this[_0x7851e8(0x25d)][_0x7851e8(0x248)](_0xb7799e['unitId'],_0xb7799e[_0x7851e8(0x206)],[_0xb7799e['formulaId']]),this[_0x7851e8(0x27c)][_0x7851e8(0x25c)](_0xb7799e[_0x7851e8(0x274)]));}};P=N([M(0x0,_0x5d6038(j)),M(0x1,_0x5d6038(_0x16b5f1)),M(0x2,_0x5d6038(_0xceeb38))],P);function F(_0x3bb3c6,_0x2e77eb){return _0x3bb3c6+'\x00'+_0x2e77eb;}function st(_0x5b4328,_0x321f1d){const _0x1fadda=_0x3a7f13;return _0x12221e({'numberFormat':_0x5b4328[_0x1fadda(0x230)],'lastValue':_0x5b4328[_0x1fadda(0x1ff)],'result':_0x321f1d});}function I(_0x244496){const _0x1cc26a=_0x3a7f13;var _0x110964,_0x344aae,_0x1c2e37;let _0x274407=_0x244496[_0x1cc26a(0x225)],_0x3a544e=_0x244496[_0x1cc26a(0x270)]['formula'][_0x1cc26a(0x1d7)]()?_0x274407['stale']||_0x274407[_0x1cc26a(0x276)]==null?_0x1cc26a(0x203):((_0x110964=_0x244496[_0x1cc26a(0x1a3)])==null?void 0x0:_0x110964['status'])===_0x2c8d51[_0x1cc26a(0x1b2)]?'error':_0x1cc26a(0x1f3):'empty';return{..._0x274407,'status':_0x3a544e,'value':(_0x344aae=_0x274407['cell'])==null?void 0x0:_0x344aae['v'],'valueType':((_0x1c2e37=_0x274407['cell'])==null?void 0x0:_0x1c2e37['t'])??void 0x0};}function ct(_0x43daef,_0x43594d){const _0x302905=_0x3a7f13;var _0x55679b,_0x30c3c9,_0x170459,_0x562ddd;return _0x43daef[_0x302905(0x192)]===_0x43594d[_0x302905(0x192)]&&_0x43daef[_0x302905(0x1b5)]===_0x43594d['color']&&_0x43daef[_0x302905(0x229)]===_0x43594d[_0x302905(0x229)]&&_0x43daef[_0x302905(0x224)]===_0x43594d['source']&&_0x43daef[_0x302905(0x19c)]===_0x43594d[_0x302905(0x19c)]&&((_0x55679b=_0x43daef['cell'])==null?void 0x0:_0x55679b['t'])===((_0x30c3c9=_0x43594d[_0x302905(0x276)])==null?void 0x0:_0x30c3c9['t'])&&Object['is']((_0x170459=_0x43daef[_0x302905(0x276)])==null?void 0x0:_0x170459['v'],(_0x562ddd=_0x43594d[_0x302905(0x276)])==null?void 0x0:_0x562ddd['v']);}const lt={'id':'docs-formula.mutation.set-formula','type':_0x16d163['MUTATION'],'handler':(_0x2ca9f2,_0x2e209d)=>!(_0x2e209d!=null&&_0x2e209d[_0x3a7f13(0x206)])||!_0x2e209d['rangeId']||!_0x2e209d[_0x3a7f13(0x270)]?!0x1:_0x2ca9f2[_0x3a7f13(0x1b1)](j)[_0x3a7f13(0x209)](_0x2e209d[_0x3a7f13(0x206)],_0x2e209d[_0x3a7f13(0x23f)],_0x2e209d['config'])},ut={'id':_0x3a7f13(0x259),'type':_0x16d163[_0x3a7f13(0x1a9)],'handler':(_0x5d840b,_0x3d969e)=>!(_0x3d969e!=null&&_0x3d969e['unitId'])||!_0x3d969e[_0x3a7f13(0x23f)]?!0x1:_0x5d840b[_0x3a7f13(0x1b1)](j)['removeFormula'](_0x3d969e[_0x3a7f13(0x206)],_0x3d969e[_0x3a7f13(0x23f)])},L={'id':_0x3a7f13(0x23a),'type':_0x16d163[_0x3a7f13(0x1a9)],'handler':(_0x61cf5a,_0x195145)=>!(_0x195145!=null&&_0x195145[_0x3a7f13(0x206)])||!_0x195145[_0x3a7f13(0x1a5)]?!0x1:_0x61cf5a['get'](j)[_0x3a7f13(0x226)](_0x195145[_0x3a7f13(0x206)],_0x195145[_0x3a7f13(0x1a5)])},R={'id':_0x3a7f13(0x1bc),'type':_0x16d163[_0x3a7f13(0x1a9)],'handler':(_0x39cf48,_0x53e433)=>{const _0x384ae3=_0x3a7f13;if(!(_0x53e433!=null&&_0x53e433[_0x384ae3(0x206)])||!_0x53e433[_0x384ae3(0x1a1)][_0x384ae3(0x218)])return!0x1;let _0x116d59=_0x39cf48[_0x384ae3(0x1b1)](j),_0x364837=_0x39cf48[_0x384ae3(0x1b1)](_0xceeb38),_0x1567cd=_0x116d59[_0x384ae3(0x239)](_0x53e433[_0x384ae3(0x206)]);if(!_0x1567cd)return!0x1;let _0x42f6d9=_0x5a1e4f[_0x384ae3(0x201)](_0x1567cd),_0x3a806c=!0x1;for(let _0x43365e of _0x53e433[_0x384ae3(0x1a1)]){var _0x290f58,_0x4904e1,_0x52f376,_0x248539;let _0x5bf630=_0x42f6d9[_0x384ae3(0x264)][_0x43365e['rangeId']];_0x5bf630&&_0x5bf630[_0x384ae3(0x24d)]===_0x43365e[_0x384ae3(0x25e)]&&((_0x290f58=_0x5bf630[_0x384ae3(0x230)])==null?void 0x0:_0x290f58[_0x384ae3(0x229)])===_0x43365e[_0x384ae3(0x265)]&&_0x364837[_0x384ae3(0x210)](_0x53e433[_0x384ae3(0x206)])===_0x43365e['expectedReferenceRevision']&&(((_0x4904e1=_0x5bf630[_0x384ae3(0x1ff)])==null?void 0x0:_0x4904e1['v'])!==_0x43365e['lastValue']['v']||((_0x52f376=_0x5bf630[_0x384ae3(0x1ff)])==null?void 0x0:_0x52f376['t'])!==_0x43365e[_0x384ae3(0x1ff)]['t']||((_0x248539=_0x5bf630[_0x384ae3(0x1ff)])==null?void 0x0:_0x248539[_0x384ae3(0x229)])!==_0x43365e[_0x384ae3(0x1ff)][_0x384ae3(0x229)])&&(_0x5bf630[_0x384ae3(0x1ff)]=_0x5a1e4f[_0x384ae3(0x201)](_0x43365e[_0x384ae3(0x1ff)]),_0x3a806c=!0x0);}return!_0x3a806c||_0x116d59['setResource'](_0x53e433[_0x384ae3(0x206)],_0x42f6d9);}},z={'id':_0x3a7f13(0x1bd),'type':_0x16d163[_0x3a7f13(0x1c4)],'handler':(_0x28c526,_0x1ea680)=>{const _0x2d4ec7=_0x3a7f13;if(!(_0x1ea680!=null&&_0x1ea680[_0x2d4ec7(0x24d)][_0x2d4ec7(0x1d7)]()))return!0x1;let _0x45232e=K(_0x28c526,_0x1ea680[_0x2d4ec7(0x206)],'');if(!_0x45232e)return!0x1;let _0x42d844=ft(_0x1ea680[_0x2d4ec7(0x181)],_0x45232e[_0x2d4ec7(0x1b4)],dt(_0x28c526,_0x45232e[_0x2d4ec7(0x206)]));if(!_0x42d844)return!0x1;let _0x167a52=pt(_0x28c526,_0x45232e['unitId'],_0x1ea680['formula'],_0x1ea680[_0x2d4ec7(0x204)]??[]);if(!_0x167a52)return!0x1;let _0x3af86e=mt(_0x45232e[_0x2d4ec7(0x1b4)],_0x45232e['model'],_0x45232e['unitId']),_0x342ecc=ht({'documentData':_0x45232e[_0x2d4ec7(0x1c6)],'resource':_0x45232e[_0x2d4ec7(0x1a5)],'rangeId':_0x3af86e,'config':{'formula':_0x1ea680['formula'],..._0x1ea680[_0x2d4ec7(0x230)]?{'numberFormat':_0x1ea680[_0x2d4ec7(0x230)]}:null},'startOffset':_0x42d844[_0x2d4ec7(0x23e)],'endOffset':_0x42d844['endOffset']});if(!_0x342ecc)return!0x1;let _0x5a255e=_0x3b0f43(_0x28c526,_0x45232e[_0x2d4ec7(0x206)],_0x167a52);return!_0x5a255e||!q({'accessor':_0x28c526,'document':_0x45232e[_0x2d4ec7(0x272)],'unitId':_0x45232e[_0x2d4ec7(0x206)],'trigger':z['id'],'rangeId':_0x3af86e,'previousResource':_0x45232e['resource'],'nextResource':_0x342ecc[_0x2d4ec7(0x22e)],'previousDocumentData':_0x45232e['documentData'],'nextDocumentData':_0x342ecc[_0x2d4ec7(0x180)],'cursorOffset':_0x342ecc[_0x2d4ec7(0x1aa)],'externalMutations':_0x5a255e})?!0x1:{'rangeId':_0x3af86e,'startOffset':_0x342ecc[_0x2d4ec7(0x1aa)]-0x1,'endOffset':_0x342ecc['cursorOffset']};}},B={'id':_0x3a7f13(0x1b7),'type':_0x16d163[_0x3a7f13(0x1c4)],'handler':(_0x4e34cb,_0x5adb8c)=>{const _0x27d748=_0x3a7f13;if(!(_0x5adb8c!=null&&_0x5adb8c[_0x27d748(0x23f)])||!_0x5adb8c['formula'][_0x27d748(0x1d7)]())return!0x1;let _0x23cccd=K(_0x4e34cb,_0x5adb8c[_0x27d748(0x206)],''),_0x58a798=_0x23cccd==null?void 0x0:_0x23cccd[_0x27d748(0x194)]['getFormula'](_0x23cccd[_0x27d748(0x206)],_0x5adb8c['rangeId']),_0xf6b006=_0x23cccd?T(_0x23cccd[_0x27d748(0x1c6)][_0x27d748(0x1b4)],_0x5adb8c[_0x27d748(0x23f)]):void 0x0;if(!_0x23cccd||!_0x58a798||!_0xf6b006)return!0x1;let _0x4a70b4=pt(_0x4e34cb,_0x23cccd[_0x27d748(0x206)],_0x5adb8c[_0x27d748(0x24d)],_0x5adb8c[_0x27d748(0x204)]??[]);if(!_0x4a70b4)return!0x1;let _0x3a835c=_0x3b0f43(_0x4e34cb,_0x23cccd[_0x27d748(0x206)],_0x4a70b4);if(!_0x3a835c)return!0x1;let _0x367c04=St(_0x23cccd[_0x27d748(0x1a5)]);return _0x367c04[_0x27d748(0x264)][_0x5adb8c[_0x27d748(0x23f)]]={'formula':_0x5adb8c[_0x27d748(0x24d)],..._0x5adb8c[_0x27d748(0x230)]?{'numberFormat':_0x5adb8c['numberFormat']}:_0x58a798[_0x27d748(0x230)]?{'numberFormat':_0x58a798[_0x27d748(0x230)]}:null},q({'accessor':_0x4e34cb,'document':_0x23cccd['document'],'unitId':_0x23cccd[_0x27d748(0x206)],'trigger':B['id'],'rangeId':_0x5adb8c['rangeId'],'previousResource':_0x23cccd[_0x27d748(0x1a5)],'nextResource':_0x367c04,'cursorOffset':_0xf6b006[_0x27d748(0x221)]+0x1,'externalMutations':_0x3a835c});}},V={'id':_0x3a7f13(0x1e9),'type':_0x16d163[_0x3a7f13(0x1c4)],'handler':(_0x337305,_0xc63fe1)=>{const _0x1f1371=_0x3a7f13;if(!(_0xc63fe1!=null&&_0xc63fe1['rangeId']))return!0x1;let _0x1bf27d=K(_0x337305,_0xc63fe1[_0x1f1371(0x206)],''),_0x47f81d=_0x1bf27d==null?void 0x0:_0x1bf27d[_0x1f1371(0x194)][_0x1f1371(0x238)](_0x1bf27d[_0x1f1371(0x206)],_0xc63fe1['rangeId']),_0x227120=_0x1bf27d?T(_0x1bf27d[_0x1f1371(0x1c6)][_0x1f1371(0x1b4)],_0xc63fe1[_0x1f1371(0x23f)]):void 0x0;if(!_0x1bf27d||!_0x47f81d||!_0x227120)return!0x1;let _0x5bc900=St(_0x1bf27d['resource']);return _0x5bc900[_0x1f1371(0x264)][_0xc63fe1[_0x1f1371(0x23f)]]={..._0x47f81d,..._0xc63fe1['numberFormat']?{'numberFormat':_0xc63fe1[_0x1f1371(0x230)]}:null},_0xc63fe1[_0x1f1371(0x230)]||delete _0x5bc900[_0x1f1371(0x264)][_0xc63fe1['rangeId']][_0x1f1371(0x230)],q({'accessor':_0x337305,'document':_0x1bf27d[_0x1f1371(0x272)],'unitId':_0x1bf27d['unitId'],'trigger':V['id'],'rangeId':_0xc63fe1[_0x1f1371(0x23f)],'previousResource':_0x1bf27d['resource'],'nextResource':_0x5bc900,'cursorOffset':_0x227120['endIndex']+0x1,'externalMutations':{}});}},H={'id':_0x3a7f13(0x22a),'type':_0x16d163[_0x3a7f13(0x1c4)],'handler':(_0x2dda94,_0x8fbc3b)=>G(_0x2dda94,_0x8fbc3b,'',H['id'])},U={'id':_0x3a7f13(0x212),'type':_0x16d163['COMMAND'],'handler':(_0x258b86,_0x251b4d)=>G(_0x258b86,_0x251b4d,(_0x251b4d==null?void 0x0:_0x251b4d[_0x3a7f13(0x192)])??'',U['id'])},W={'id':'docs-formula.command.convert-to-text','type':_0x16d163[_0x3a7f13(0x1c4)],'handler':(_0x72e575,_0x4cacbd)=>{const _0x5cdc72=_0x3a7f13;if(!(_0x4cacbd!=null&&_0x4cacbd[_0x5cdc72(0x23f)]))return!0x1;let _0x5b76a1=K(_0x72e575,_0x4cacbd[_0x5cdc72(0x206)],'');if(!_0x5b76a1)return!0x1;let _0x4e8698=_0x72e575['get'](P)[_0x5cdc72(0x244)]({'unitId':_0x5b76a1[_0x5cdc72(0x206)],'rangeId':_0x4cacbd[_0x5cdc72(0x23f)]});return _0x4e8698?G(_0x72e575,_0x4cacbd,_0x4e8698[_0x5cdc72(0x192)],W['id']):!0x1;}};function G(_0x45b525,_0x17e3e2,_0x3696ad,_0x2b91a8){const _0x54c800=_0x3a7f13;if(!(_0x17e3e2!=null&&_0x17e3e2[_0x54c800(0x23f)]))return!0x1;let _0x17fee3=K(_0x45b525,_0x17e3e2['unitId'],'');if(!_0x17fee3)return!0x1;let _0x18ed3d=ze({'documentData':_0x17fee3[_0x54c800(0x1c6)],'resource':_0x17fee3[_0x54c800(0x1a5)],'rangeId':_0x17e3e2['rangeId'],'text':_0x3696ad});return _0x18ed3d?q({'accessor':_0x45b525,'document':_0x17fee3['document'],'unitId':_0x17fee3[_0x54c800(0x206)],'trigger':_0x2b91a8,'rangeId':_0x17e3e2[_0x54c800(0x23f)],'previousResource':_0x17fee3[_0x54c800(0x1a5)],'nextResource':_0x18ed3d['nextResource'],'previousDocumentData':_0x17fee3[_0x54c800(0x1c6)],'nextDocumentData':_0x18ed3d[_0x54c800(0x180)],'cursorOffset':_0x18ed3d['cursorOffset'],'externalMutations':{}}):!0x1;}function K(_0x28f982,_0x2afc0e,_0x431aae){const _0x2b2b92=_0x3a7f13;if(_0x431aae)return null;let _0xbc0da2=_0x28f982['get'](_0x2629d5),_0x3055ed=(_0x2afc0e?_0xbc0da2[_0x2b2b92(0x1cb)](_0x2afc0e,_0x4aa394['UNIVER_DOC']):_0xbc0da2[_0x2b2b92(0x268)](_0x4aa394['UNIVER_DOC']))??null;if(!_0x3055ed)return null;let _0x11e464=_0x3055ed[_0x2b2b92(0x1d2)](),_0xd5a113=_0x11e464[_0x2b2b92(0x1b4)];if(_0x11e464[_0x2b2b92(0x1ac)]||!_0xd5a113)return null;let _0x4ed736=_0x28f982[_0x2b2b92(0x1b1)](j);return _0x4ed736[_0x2b2b92(0x251)](_0x3055ed[_0x2b2b92(0x1e6)]())?null:{'document':_0x3055ed,'body':_0xd5a113,'documentData':_0x11e464,'model':_0x4ed736,'resource':_0x4ed736['getResource'](_0x3055ed[_0x2b2b92(0x1e6)]())??b(),'unitId':_0x3055ed[_0x2b2b92(0x1e6)]()};}function dt(_0x405bac,_0xc1fa0e){const _0x1f9151=_0x3a7f13;var _0x5d71d5;return(_0x5d71d5=_0x405bac['get'](_0x3d26b2)[_0x1f9151(0x22b)]({'subUnitId':_0xc1fa0e,'unitId':_0xc1fa0e}))==null?void 0x0:_0x5d71d5[0x0];}function ft(_0x4e8538,_0xdf932e,_0x4902b3){const _0x522e23=_0x3a7f13;if((_0x4e8538==null?void 0x0:_0x4e8538[_0x522e23(0x256)])===_0x522e23(0x1ce)){var _0x53c8e9;let _0xa68ad5=((_0x53c8e9=_0xdf932e['paragraphs'])==null?void 0x0:_0x53c8e9[_0x522e23(0x280)](_0x30def1=>_0x30def1[_0x522e23(0x236)]===_0x4e8538[_0x522e23(0x236)]))??[];if(_0xa68ad5['length']!==0x1)return null;let _0x85c1fe=_0xa68ad5[0x0],_0xfbba6f=_0x19d939(_0xdf932e,_0x85c1fe),_0xe74219=_0x85c1fe['startIndex']-_0xfbba6f,_0x4138b6=_0x4e8538[_0x522e23(0x1b6)]===_0x522e23(0x20f)?_0xe74219:_0x4e8538[_0x522e23(0x1b6)];if(!Number[_0x522e23(0x240)](_0x4138b6)||_0x4138b6<0x0||_0x4138b6>_0xe74219)return null;let _0x5617c1=_0xfbba6f+_0x4138b6;return{'startOffset':_0x5617c1,'endOffset':_0x5617c1};}if((_0x4e8538==null?void 0x0:_0x4e8538[_0x522e23(0x256)])===_0x522e23(0x18d))return!Number[_0x522e23(0x240)](_0x4e8538[_0x522e23(0x23e)])||!Number['isInteger'](_0x4e8538[_0x522e23(0x21d)])?null:{'startOffset':Math[_0x522e23(0x211)](_0x4e8538[_0x522e23(0x23e)],_0x4e8538[_0x522e23(0x21d)]),'endOffset':Math['max'](_0x4e8538['startOffset'],_0x4e8538['endOffset'])};let _0x4f17d3=(_0x4e8538==null?void 0x0:_0x4e8538[_0x522e23(0x256)])==='selection'?_0x4e8538[_0x522e23(0x21a)]:_0x4902b3;return!_0x4f17d3||_0x4f17d3[_0x522e23(0x1fe)]?null:{'startOffset':Math[_0x522e23(0x211)](_0x4f17d3[_0x522e23(0x23e)],_0x4f17d3[_0x522e23(0x21d)]),'endOffset':Math[_0x522e23(0x222)](_0x4f17d3[_0x522e23(0x23e)],_0x4f17d3[_0x522e23(0x21d)])};}function pt(_0x156d4f,_0x5300a4,_0x314260,_0x2ed2b4){const _0x1e44a3=_0x3a7f13;let _0x1a5a24=_0x156d4f[_0x1e44a3(0x1b1)](_0x9fae86),_0x531966=_0x314260['startsWith']('=')?_0x314260['slice'](0x1):_0x314260,_0x56d72a=_0x1a5a24[_0x1e44a3(0x205)](_0x531966);if(!_0x56d72a)return null;let _0x5a84ba=_0x156d4f[_0x1e44a3(0x1b1)](_0xceeb38),_0x2e6c7a=_0x5d5293({'qualifiers':_0x48d68a(_0x56d72a),'explicitReferences':_0x2ed2b4??[],'resolveBinding':_0x2bea7a=>_0x5a84ba[_0x1e44a3(0x278)](_0x5300a4,_0x2bea7a)});return _0x2e6c7a['status']===_0x1e44a3(0x26c)?_0x2e6c7a[_0x1e44a3(0x1a8)]:null;}function mt(_0x515a1f,_0x542e13,_0x3ea200){const _0x336295=_0x3a7f13;var _0x26ff3b;let _0x55c654=_0x32ab18(0x6);for(;_0x515a1f!=null&&(_0x26ff3b=_0x515a1f[_0x336295(0x182)])!=null&&_0x26ff3b[_0x336295(0x1ee)](_0x5d939d=>_0x5d939d[_0x336295(0x23f)]===_0x55c654)||_0x542e13[_0x336295(0x238)](_0x3ea200,_0x55c654);)_0x55c654=_0x32ab18(0x6);return _0x55c654;}function ht(_0x4564f1){try{return Le(_0x4564f1);}catch(_0x3db6eb){if(_0x3db6eb instanceof C)return null;throw _0x3db6eb;}}function gt(_0x117061){const _0x4eb578=_0x3a7f13;let _0x485311=_0x117061['previousDocumentData']&&_0x117061[_0x4eb578(0x180)]?vt(_0x117061['document'],_0x117061['unitId'],_0x117061['previousDocumentData'],_0x117061[_0x4eb578(0x180)],_0x117061['cursorOffset'],_0x117061['trigger']):null;return _0x117061[_0x4eb578(0x1a6)]&&_0x117061[_0x4eb578(0x180)]&&!_0x485311?null:{'documentRedo':_0x485311,'resourceRedo':{'id':L['id'],'params':{'unitId':_0x117061[_0x4eb578(0x206)],'resource':_0x117061[_0x4eb578(0x22e)]}},'resourceUndo':{'id':L['id'],'params':{'unitId':_0x117061[_0x4eb578(0x206)],'resource':_0x117061['previousResource']}}};}function _0x52b2(){const _0x30d63c=['params','SECTION_BREAK','push','trim','_registrations','degradeDocumentData','assign','getInstance','EMPTY','TABLE_START','registerPluginResource','getPresentation','add','_instanceService','_preserveInvalid','165ALWzCP','blockRanges','_updateFormulaResult','getUnitId','referenceRevision','_resources','docs-formula.command.set-number-format','values','dispose','TABLE_CELL_START','1.5.0','some','degradeBody','removeFormula','default','80FgbGBK','success','dataStream','forEach','registerProvider','slice','_model','Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.','BLOCK_END','columnGroups','documentRedo','symbol','segmentId','lastValue','asObservable','deepClone','resources','pending','externalReferences','sequenceNodesBuilder','unitId','insertLength','getFormulaValueSync','setFormula','_commandService','trigger','identity','wholeEntity','sort','end','getRevision','min','docs-formula.command.replace-with-text','rangeType','_setPresentation','name','_rawResources','notifyTextChanged','length','PENDING','selection','resourceUndo','customDecorations','endOffset','unitDisposed$','includes','clear','endIndex','max','invalid-resource','source','presentation','setResource','error','_resourceManagerService','pattern','docs-formula.command.remove','getTextRanges','TABLE_ROW_START','563001LcmOIV','nextResource','set','numberFormat','unregisterUnit','DOC_FORMULA_PLUGIN','pluginName','resolveFormula','_loadErrors','paragraphId','@univerjs-pro/docs-formula','getFormula','getResource','docs-formula.mutation.set-resource','paragraphs','constructor','parse','startOffset','rangeId','isInteger','keys','externalMutations','tables','getResult','_change$','TABLE_ROW_END','object','deleteFormula','entries','_config','_queueSync','2837630TmjOji','formula','docs-formula.config','defineProperty','deleteLength','getLoadError','decorate','_syncUnit','startIndex','getRegisteredFormulas','type','_injector','_service','docs-formula.mutation.remove-formula','disposeWithMe','resourceRedo','delete','_registrationService','expectedFormula','string','has','_deleteRegistration','data','154kDYsyE','formulas','expectedNumberFormat','map','textRuns','getCurrentUnitOfType','empty','unregister','446031mfmjEB','resolved','_isDisposed','unitAdded$','registerFormulaWithRange','config','function','document','packageName','formulaId','_docFormulaModel','cell','setConfig','resolveBinding','TABLE_CELL_END','endsWith','stringify','_formulaKeys','_configService','serialize','next','filter','customBlocks','change$','load','nextDocumentData','target','customRanges','fromEntries','syncUnit','TABLE_END','every','370BUhnqR','sectionBreaks','version','getAllUnitsForType','COLUMN_END','PARAGRAPH','range','toPrimitive','start','UNIVER_DOC','accessor','text','DOC','model','register','72748ticsoS','presentationChanged$','getBody','_hostExternalReferenceModel','undoMutation','11XOCcEg','stale','find','insert','complete','properties','updates','boolean','liveResult','_formulaService','resource','previousDocumentData','_cacheEligibilityService','references','MUTATION','cursorOffset','redoMutation','disabled','registerCommand','syncExecuteCommand','pushUndoRedo','subscribe','get','ERROR','univer-docs-formula','body','color','position','docs-formula.command.update','6899604zhXAbo','onStarting','COLUMN_GROUP_START','COLUMN_GROUP_END','docs-formula.mutation.set-last-values','docs-formula.command.insert','_pendingUnitIds','editOp','_presentationChanged$','SUCCESS','BLOCK_START','3236nCsbXX','COMMAND','getFormulas','documentData','assess','54534fZstZX','resolveText','_univerInstanceService','getUnit','CUSTOM','collectMutations','paragraph','setFormulas','from','retain','getSnapshot','_syncScheduled'];_0x52b2=function(){return _0x30d63c;};return _0x52b2();}function _t(_0x431627,_0x30f6d3,_0x336e2f,_0x401707){const _0x894fcf=_0x3a7f13;_0x401707[_0x894fcf(0x1af)]({'id':_0x431627[_0x894fcf(0x20b)]+':'+_0x431627[_0x894fcf(0x23f)],'unitID':_0x431627['unitId'],'redoMutations':[..._0x431627[_0x894fcf(0x242)][_0x894fcf(0x1ab)]?[_0x431627[_0x894fcf(0x242)][_0x894fcf(0x1ab)]]:[],..._0x30f6d3[_0x894fcf(0x1fc)]?[_0x30f6d3[_0x894fcf(0x1fc)]]:[],_0x30f6d3[_0x894fcf(0x25b)]],'undoMutations':[_0x30f6d3['resourceUndo'],..._0x336e2f?[_0x336e2f]:[],..._0x431627[_0x894fcf(0x242)][_0x894fcf(0x19a)]?[_0x431627['externalMutations'][_0x894fcf(0x19a)]]:[]]});}function q(_0x3bd7cd){const _0x36aa96=_0x3a7f13;let _0x256ad9=_0x3bd7cd['accessor'][_0x36aa96(0x1b1)](_0x9a0954),_0x455749=_0x3bd7cd[_0x36aa96(0x191)]['get'](_0x16e8d6),_0x57df78=_0x3bd7cd['accessor'][_0x36aa96(0x1b1)](_0x3d26b2),_0x8c6220=gt(_0x3bd7cd);if(!_0x8c6220)return!0x1;let _0x5cf53f=!0x1,_0x5069f3=null,_0x59afb0=!0x1;try{if(_0x3bd7cd[_0x36aa96(0x242)][_0x36aa96(0x1ab)]){if(!_0x256ad9[_0x36aa96(0x1ae)](_0x3bd7cd['externalMutations'][_0x36aa96(0x1ab)]['id'],_0x3bd7cd[_0x36aa96(0x242)][_0x36aa96(0x1ab)][_0x36aa96(0x1d4)]))return!0x1;_0x5cf53f=!0x0;}if(_0x8c6220['documentRedo']){let _0x3bf014=_0x256ad9[_0x36aa96(0x1ae)](_0x8c6220[_0x36aa96(0x1fc)]['id'],_0x8c6220[_0x36aa96(0x1fc)][_0x36aa96(0x1d4)]);if(!_0x3bf014)return J(_0x256ad9,_0x3bd7cd[_0x36aa96(0x242)],_0x5cf53f),!0x1;_0x5069f3={'id':_0xd26f03['id'],'params':{..._0x3bf014,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0x256ad9['syncExecuteCommand'](_0x8c6220[_0x36aa96(0x25b)]['id'],_0x8c6220[_0x36aa96(0x25b)][_0x36aa96(0x1d4)]))return yt(_0x256ad9,_0x5069f3),J(_0x256ad9,_0x3bd7cd[_0x36aa96(0x242)],_0x5cf53f),!0x1;_0x59afb0=!0x0,_t(_0x3bd7cd,_0x8c6220,_0x5069f3,_0x455749);}catch(_0x39dd4b){throw _0x59afb0&&_0x256ad9[_0x36aa96(0x1ae)](_0x8c6220[_0x36aa96(0x21b)]['id'],_0x8c6220[_0x36aa96(0x21b)][_0x36aa96(0x1d4)]),yt(_0x256ad9,_0x5069f3),J(_0x256ad9,_0x3bd7cd[_0x36aa96(0x242)],_0x5cf53f),_0x39dd4b;}return _0x57df78['replaceDocRanges']([{'startOffset':_0x3bd7cd[_0x36aa96(0x1aa)],'endOffset':_0x3bd7cd[_0x36aa96(0x1aa)],'segmentId':''}],{'unitId':_0x3bd7cd[_0x36aa96(0x206)],'subUnitId':_0x3bd7cd[_0x36aa96(0x206)]},!0x1,{[_0x5393de]:!0x0}),!0x0;}function vt(_0x2ec114,_0x12cde7,_0x4ddc10,_0x18d255,_0x3c7af9,_0x196c3d){let _0x352fd4=bt(_0x4ddc10,_0x18d255,_0x410a7f(_0x2ec114,''));return _0x352fd4?{'id':_0xd26f03['id'],'params':{'unitId':_0x12cde7,'actions':_0x352fd4,'segmentId':'','textRanges':[{'startOffset':_0x3c7af9,'endOffset':_0x3c7af9,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0x196c3d}}:null;}function yt(_0x1fe23f,_0x58b3e1){const _0x5451d2=_0x3a7f13;_0x58b3e1&&_0x1fe23f[_0x5451d2(0x1ae)](_0x58b3e1['id'],_0x58b3e1['params']);}function J(_0x4a41c5,_0x1d20a0,_0x1f9c7f){const _0x2542bb=_0x3a7f13;_0x1f9c7f&&_0x1d20a0[_0x2542bb(0x19a)]&&_0x4a41c5[_0x2542bb(0x1ae)](_0x1d20a0['undoMutation']['id'],_0x1d20a0['undoMutation'][_0x2542bb(0x1d4)]);}function bt(_0x4d0b83,_0x15197b,_0x22ccc4){const _0x13ebd3=_0x3a7f13;let _0x11e4ae=_0x4d0b83[_0x13ebd3(0x1b4)],_0xecd30b=_0x15197b[_0x13ebd3(0x1b4)],_0x42bc2a=xt(_0x11e4ae==null?void 0x0:_0x11e4ae['dataStream'],_0xecd30b==null?void 0x0:_0xecd30b[_0x13ebd3(0x1f4)]);if(!_0x42bc2a||!_0xecd30b)return null;let _0x177fcb=new _0x556769();return _0x177fcb[_0x13ebd3(0x1d1)](_0x42bc2a[_0x13ebd3(0x18f)]),_0x42bc2a[_0x13ebd3(0x207)]>0x0&&_0x177fcb[_0x13ebd3(0x19e)](_0x42bc2a[_0x13ebd3(0x207)],_0x282876(_0xecd30b,_0x42bc2a['start'],_0x42bc2a['start']+_0x42bc2a[_0x13ebd3(0x207)],!0x1)),_0x42bc2a['deleteLength']>0x0&&_0x177fcb[_0x13ebd3(0x25c)](_0x42bc2a[_0x13ebd3(0x250)]),_0x5e930b[_0x13ebd3(0x1db)]()[_0x13ebd3(0x1bf)](_0x177fcb[_0x13ebd3(0x27e)](),_0x22ccc4);}function xt(_0x329017,_0x11208b){const _0x51bfe4=_0x3a7f13;if(_0x329017==null||_0x11208b==null||_0x329017===_0x11208b)return null;let _0x34df1a=0x0;for(;_0x34df1a<_0x329017['length']&&_0x34df1a<_0x11208b[_0x51bfe4(0x218)]&&_0x329017[_0x34df1a]===_0x11208b[_0x34df1a];)_0x34df1a+=0x1;let _0x4b47b9=_0x329017[_0x51bfe4(0x218)],_0x1b1f56=_0x11208b[_0x51bfe4(0x218)];for(;_0x4b47b9>_0x34df1a&&_0x1b1f56>_0x34df1a&&_0x329017[_0x4b47b9-0x1]===_0x11208b[_0x1b1f56-0x1];)--_0x4b47b9,--_0x1b1f56;return{'start':_0x34df1a,'deleteLength':_0x4b47b9-_0x34df1a,'insertLength':_0x1b1f56-_0x34df1a};}function St(_0x1c4e9f){const _0x31d240=_0x3a7f13;return{'formulas':Object[_0x31d240(0x183)](Object[_0x31d240(0x249)](_0x1c4e9f[_0x31d240(0x264)])[_0x31d240(0x266)](([_0x3cf782,_0x2e71d6])=>[_0x3cf782,{..._0x2e71d6,..._0x2e71d6[_0x31d240(0x230)]?{'numberFormat':{..._0x2e71d6[_0x31d240(0x230)]}}:null,..._0x2e71d6[_0x31d240(0x1ff)]?{'lastValue':{..._0x2e71d6[_0x31d240(0x1ff)]}}:null}]))};}let Y=class extends _0x533030{constructor(_0x26bee7,_0x41c06f,_0x6f9606,_0x36d6af){const _0xcca16b=_0x3a7f13;super(),this[_0xcca16b(0x1e1)]=_0x26bee7,this[_0xcca16b(0x20a)]=_0x41c06f,this[_0xcca16b(0x1f8)]=_0x6f9606,this[_0xcca16b(0x258)]=_0x36d6af,A(this,_0xcca16b(0x1be),new Set()),A(this,_0xcca16b(0x1d3),!0x1),A(this,_0xcca16b(0x26d),!0x1),this['_instanceService'][_0xcca16b(0x18a)](_0x4aa394['UNIVER_DOC'])[_0xcca16b(0x1f5)](_0x5da29b=>this[_0xcca16b(0x258)][_0xcca16b(0x184)](_0x5da29b)),this['disposeWithMe'](this[_0xcca16b(0x1f8)][_0xcca16b(0x282)][_0xcca16b(0x1b0)](({unitId:_0x1c7c1a})=>this['_syncUnit'](_0x1c7c1a))),this['disposeWithMe'](this[_0xcca16b(0x1e1)][_0xcca16b(0x26e)][_0xcca16b(0x1b0)](({unit:_0x2c442a})=>{const _0xc8e41f=_0xcca16b;_0x2c442a[_0xc8e41f(0x256)]===_0x4aa394[_0xc8e41f(0x190)]&&this[_0xc8e41f(0x24b)](_0x2c442a[_0xc8e41f(0x1e6)]());})),this[_0xcca16b(0x25a)](this['_instanceService'][_0xcca16b(0x21e)][_0xcca16b(0x1b0)](_0x3e6f8a=>{const _0xa9cf35=_0xcca16b;this[_0xa9cf35(0x258)][_0xa9cf35(0x231)](_0x3e6f8a['getUnitId']());})),this[_0xcca16b(0x25a)](this[_0xcca16b(0x20a)]['onCommandExecuted'](_0x301cf4=>{const _0x4f3d0e=_0xcca16b;if(_0x301cf4['id']===_0xd26f03['id']&&Ct(_0x301cf4[_0x4f3d0e(0x1d4)])){let _0x570046=_0x301cf4['params'];_0x570046[_0x4f3d0e(0x1fe)]||this[_0x4f3d0e(0x253)](_0x570046[_0x4f3d0e(0x206)]);}}));}[_0x3a7f13(0x1eb)](){const _0x19f2b4=_0x3a7f13;this['_isDisposed']=!0x0,super[_0x19f2b4(0x1eb)]();}['_queueSync'](_0x17afe2){const _0x4620df=_0x3a7f13;this[_0x4620df(0x1be)][_0x4620df(0x1e0)](_0x17afe2),this['_syncScheduled']||(this[_0x4620df(0x1d3)]=!0x0,queueMicrotask(()=>{const _0x30007d=_0x4620df;if(this['_syncScheduled']=!0x1,this[_0x30007d(0x26d)])return;let _0x929ec8=Array[_0x30007d(0x1d0)](this['_pendingUnitIds']);this[_0x30007d(0x1be)][_0x30007d(0x220)](),_0x929ec8[_0x30007d(0x1f5)](_0x3687cb=>this[_0x30007d(0x253)](_0x3687cb));}));}[_0x3a7f13(0x253)](_0x3a9813){const _0x5c1636=_0x3a7f13;let _0x286405=this[_0x5c1636(0x1e1)][_0x5c1636(0x1cb)](_0x3a9813,_0x4aa394['UNIVER_DOC']);_0x286405&&this[_0x5c1636(0x258)][_0x5c1636(0x184)](_0x286405);}};Y=N([M(0x0,_0x2629d5),M(0x1,_0x9a0954),M(0x2,_0x5d6038(j)),M(0x3,_0x5d6038(P))],Y);function Ct(_0x4a9f91){const _0x3df4d5=_0x3a7f13;return typeof _0x4a9f91==_0x3df4d5(0x247)&&!!_0x4a9f91&&'unitId'in _0x4a9f91&&typeof _0x4a9f91[_0x3df4d5(0x206)]==_0x3df4d5(0x25f)&&(!(_0x3df4d5(0x1fe)in _0x4a9f91)||_0x4a9f91[_0x3df4d5(0x1fe)]===void 0x0||typeof _0x4a9f91[_0x3df4d5(0x1fe)]==_0x3df4d5(0x25f));}let X=class extends _0x533030{constructor(_0x1ad25e,_0x47c758){const _0x5924f3=_0x3a7f13;super(),this[_0x5924f3(0x228)]=_0x1ad25e,this[_0x5924f3(0x275)]=_0x47c758,this[_0x5924f3(0x25a)](this['_resourceManagerService'][_0x5924f3(0x1de)]({'pluginName':y,'businesses':[_0x4aa394['UNIVER_DOC']],'toJson':_0x11ce79=>JSON[_0x5924f3(0x27b)](this[_0x5924f3(0x275)][_0x5924f3(0x27e)](_0x11ce79)),'parseJson':_0x5e42cb=>JSON[_0x5924f3(0x23d)](_0x5e42cb),'onLoad':(_0x70f3d0,_0x58efcd)=>{const _0x40de33=_0x5924f3;this[_0x40de33(0x275)][_0x40de33(0x283)](_0x70f3d0,_0x58efcd);},'onUnLoad':_0x1fe4e8=>this[_0x5924f3(0x275)]['removeUnit'](_0x1fe4e8)}));}};X=N([M(0x0,_0x164b3f),M(0x1,_0x5d6038(j))],X);var wt=_0x3a7f13(0x237),Tt=_0x3a7f13(0x1ed);const Et={};let Z=class extends _0x533030{constructor(_0xd158c5,_0x266105,_0x20383e){const _0x43b0cf=_0x3a7f13;super(),this[_0x43b0cf(0x1ca)]=_0xd158c5,this[_0x43b0cf(0x1a4)]=_0x266105,this[_0x43b0cf(0x25a)](_0x20383e[_0x43b0cf(0x195)]({'resolve':(_0xacd81d,_0x1d5d9d)=>{const _0x5b2e18=_0x43b0cf;var _0x504e8c;return((_0x504e8c=_0x1d5d9d[_0x5b2e18(0x182)])==null?void 0x0:_0x504e8c[_0x5b2e18(0x280)](w)[_0x5b2e18(0x266)](_0x3f5902=>({'startOffset':_0x3f5902[_0x5b2e18(0x254)],'endOffset':_0x3f5902[_0x5b2e18(0x221)]+0x1,'text':this['resolveFormula'](_0xacd81d,_0x3f5902[_0x5b2e18(0x23f)])})))??[];}})),this[_0x43b0cf(0x25a)](this[_0x43b0cf(0x1a4)]['presentationChanged$'][_0x43b0cf(0x1b0)](({unitId:_0x46eac9})=>{const _0x5c55b9=_0x43b0cf;_0x20383e[_0x5c55b9(0x217)](_0x46eac9);}));}[_0x3a7f13(0x234)](_0x3b91ad,_0x8c6a1c){const _0xe57e5c=_0x3a7f13;var _0x474428;return((_0x474428=this['_formulaService'][_0xe57e5c(0x244)]({'unitId':_0x3b91ad,'rangeId':_0x8c6a1c}))==null?void 0x0:_0x474428[_0xe57e5c(0x192)])??'';}[_0x3a7f13(0x1c9)](_0x54cad1,_0x2c003f,_0x307e62){const _0xf2a59d=_0x3a7f13;var _0x231baa;let _0x241966=this[_0xf2a59d(0x1ca)][_0xf2a59d(0x1cb)](_0x54cad1,_0x4aa394[_0xf2a59d(0x190)]),_0x712023=_0x241966==null?void 0x0:_0x241966[_0xf2a59d(0x198)]();if(!_0x712023)return'';let _0x1576f4=_0x712023['dataStream'][_0xf2a59d(0x1f7)](_0x2c003f,_0x307e62),_0x38849c=((_0x231baa=_0x712023[_0xf2a59d(0x182)])==null?void 0x0:_0x231baa[_0xf2a59d(0x280)](_0x499359=>w(_0x499359)&&_0x499359[_0xf2a59d(0x254)]>=_0x2c003f&&_0x499359['endIndex']<_0x307e62)['sort']((_0x35cf0e,_0x3e7b35)=>_0x3e7b35['startIndex']-_0x35cf0e[_0xf2a59d(0x254)]))??[];for(let _0x4323d5 of _0x38849c){let _0x172811=_0x4323d5[_0xf2a59d(0x254)]-_0x2c003f,_0xf51724=_0x4323d5[_0xf2a59d(0x221)]-_0x2c003f+0x1;_0x1576f4=''+_0x1576f4[_0xf2a59d(0x1f7)](0x0,_0x172811)+this[_0xf2a59d(0x234)](_0x54cad1,_0x4323d5[_0xf2a59d(0x23f)])+_0x1576f4[_0xf2a59d(0x1f7)](_0xf51724);}return _0x1576f4;}[_0x3a7f13(0x1d9)](_0x4a1ebe){return Dt(_0x4a1ebe);}[_0x3a7f13(0x1ef)](_0x49eed3,_0x45e9dd,_0x634093={}){const _0x2a6d37=_0x3a7f13;var _0x4e27b1;return Be({'id':_0x49eed3,'body':_0x45e9dd,'documentStyle':{}},(((_0x4e27b1=_0x45e9dd[_0x2a6d37(0x182)])==null?void 0x0:_0x4e27b1[_0x2a6d37(0x280)](w))??[])['map'](_0x1a0977=>({'rangeId':_0x1a0977['rangeId'],'text':_0x634093[_0x1a0977['rangeId']]??this[_0x2a6d37(0x234)](_0x49eed3,_0x1a0977[_0x2a6d37(0x23f)])})))[_0x2a6d37(0x1b4)]??{'dataStream':''};}};Z=N([M(0x0,_0x2629d5),M(0x1,_0x5d6038(P)),M(0x2,_0x5d6038(_0x2459b3))],Z);function Dt(_0x426647){const _0x18efad=_0x3a7f13;var _0x4ee8a6,_0x3de727;let _0x2a7704=Ot(_0x426647),_0x19d859=Be(_0x426647,(((_0x4ee8a6=_0x426647[_0x18efad(0x1b4)])==null||(_0x4ee8a6=_0x4ee8a6[_0x18efad(0x182)])==null?void 0x0:_0x4ee8a6['filter'](w))??[])[_0x18efad(0x266)](_0x2cecf1=>({'rangeId':_0x2cecf1['rangeId'],'text':kt(_0x2a7704==null?void 0x0:_0x2a7704[_0x18efad(0x264)][_0x2cecf1[_0x18efad(0x23f)]])})));return _0x19d859[_0x18efad(0x202)]=(_0x3de727=_0x19d859[_0x18efad(0x202)])==null?void 0x0:_0x3de727[_0x18efad(0x280)](_0x4689d2=>_0x4689d2[_0x18efad(0x215)]!==y),_0x19d859;}function Ot(_0x5c2187){const _0x4a282b=_0x3a7f13;var _0x2734a3;let _0x322ed5=(_0x2734a3=_0x5c2187[_0x4a282b(0x202)])==null||(_0x2734a3=_0x2734a3[_0x4a282b(0x19d)](_0x4c22ff=>_0x4c22ff[_0x4a282b(0x215)]===_0x4a282b(0x232)))==null?void 0x0:_0x2734a3[_0x4a282b(0x262)];if(_0x322ed5)try{let _0x5da19e=JSON[_0x4a282b(0x23d)](_0x322ed5);return x(_0x5da19e)?_0x5da19e:void 0x0;}catch{return;}}function kt(_0x13f512){const _0xc3c338=_0x3a7f13;return _0x13f512?_0x12221e({'lastValue':_0x13f512['lastValue'],'numberFormat':_0x13f512[_0xc3c338(0x230)]})[_0xc3c338(0x192)]:'';}let Q=class extends _0x533030{constructor(_0x67af32,_0x1ce97c,_0x26a5a0){const _0x1776a3=_0x3a7f13;super(),this[_0x1776a3(0x1a4)]=_0x67af32,this['_cacheEligibilityService']=_0x1ce97c,this[_0x1776a3(0x25a)](_0x26a5a0[_0x1776a3(0x1f6)](this));}[_0x3a7f13(0x1cd)](_0x71c7a3){const _0x15fd12=_0x3a7f13;let _0x5d2570=new Map();for(let _0x2c6b50 of this[_0x15fd12(0x1a4)]['getRegisteredFormulas']()){var _0x47912c;if(!this[_0x15fd12(0x1a7)][_0x15fd12(0x1c7)](_0x2c6b50['config'][_0x15fd12(0x24d)],_0x2c6b50[_0x15fd12(0x1a3)])['eligible'])continue;let _0x30e212=_0x3ee924(_0x2c6b50[_0x15fd12(0x1a3)]),_0x49e9f1=_0x30e212?_0x5a1b13(_0x30e212):null;if(!_0x49e9f1||At(_0x2c6b50[_0x15fd12(0x270)][_0x15fd12(0x1ff)],_0x49e9f1))continue;let _0xdbfeb8=_0x5d2570['get'](_0x2c6b50[_0x15fd12(0x20c)][_0x15fd12(0x206)])??[];_0xdbfeb8[_0x15fd12(0x1d6)]({'rangeId':_0x2c6b50[_0x15fd12(0x20c)][_0x15fd12(0x23f)],'expectedFormula':_0x2c6b50['config'][_0x15fd12(0x24d)],'expectedNumberFormat':(_0x47912c=_0x2c6b50[_0x15fd12(0x270)][_0x15fd12(0x230)])==null?void 0x0:_0x47912c[_0x15fd12(0x229)],'expectedReferenceRevision':_0x2c6b50[_0x15fd12(0x1e7)],'lastValue':_0x49e9f1}),_0x5d2570[_0x15fd12(0x22f)](_0x2c6b50[_0x15fd12(0x20c)][_0x15fd12(0x206)],_0xdbfeb8);}return Array[_0x15fd12(0x1d0)](_0x5d2570,([_0x96eb3e,_0x24f314])=>({'id':R['id'],'params':{'unitId':_0x96eb3e,'updates':_0x24f314}}));}};Q=N([M(0x0,_0x5d6038(P)),M(0x1,_0x5d6038(_0x13ac3a)),M(0x2,_0x5d6038(_0x416b1f))],Q);function At(_0xf0585,_0x5d1307){const _0xa18be=_0x3a7f13;return(_0xf0585==null?void 0x0:_0xf0585['v'])===_0x5d1307['v']&&(_0xf0585==null?void 0x0:_0xf0585['t'])===_0x5d1307['t']&&(_0xf0585==null?void 0x0:_0xf0585['pattern'])===_0x5d1307[_0xa18be(0x229)];}let $=class extends _0x26195d{constructor(_0x4f157c=Et,_0x17dac8,_0x2d617f,_0x4fe1d9){const _0x31b2c5=_0x3a7f13;super(),this[_0x31b2c5(0x24a)]=_0x4f157c,this['_injector']=_0x17dac8,this['_commandService']=_0x2d617f,this['_configService']=_0x4fe1d9;let {..._0x43a95a}=_0x4e3800({},Et,this[_0x31b2c5(0x24a)]);this[_0x31b2c5(0x27d)][_0x31b2c5(0x277)](_0x31b2c5(0x24e),_0x43a95a);}[_0x3a7f13(0x1b9)](){const _0x5218fd=_0x3a7f13;this[_0x5218fd(0x257)][_0x5218fd(0x1e0)]([j]),this[_0x5218fd(0x257)][_0x5218fd(0x1e0)]([P]),this[_0x5218fd(0x257)][_0x5218fd(0x1e0)]([X]),this[_0x5218fd(0x257)]['add']([Y]),this[_0x5218fd(0x257)][_0x5218fd(0x1e0)]([Q]),this[_0x5218fd(0x257)][_0x5218fd(0x1e0)]([Z]),_0xddcf97(this[_0x5218fd(0x257)],[[j],[X],[Y],[Q],[Z]]),[lt,ut,L,R,z,B,V,H,U,W]['forEach'](_0x399fbb=>this[_0x5218fd(0x25a)](this[_0x5218fd(0x20a)][_0x5218fd(0x1ad)](_0x399fbb)));}};A($,_0x3a7f13(0x233),y),A($,_0x3a7f13(0x273),wt),A($,_0x3a7f13(0x189),Tt),A($,_0x3a7f13(0x256),_0x4aa394[_0x3a7f13(0x190)]),$=N([_0x37da81(_0x3344bd,_0x513513,_0x46761e),M(0x1,_0x5d6038(_0x2a8248)),M(0x2,_0x9a0954),M(0x3,_0x4226f8)],$);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 _0x9d65(_0xeadeea,_0x2b10f3){_0xeadeea=_0xeadeea-0x19b;var _0x174b7d=_0x174b();var _0x9d6541=_0x174b7d[_0xeadeea];return _0x9d6541;}(function(_0x68b65a,_0x362da4){var _0x3f82e1=_0x9d65,_0x373ebc=_0x68b65a();while(!![]){try{var _0x3a685c=parseInt(_0x3f82e1(0x1f0))/0x1*(-parseInt(_0x3f82e1(0x1b2))/0x2)+-parseInt(_0x3f82e1(0x1e9))/0x3+parseInt(_0x3f82e1(0x1a4))/0x4*(-parseInt(_0x3f82e1(0x1d9))/0x5)+-parseInt(_0x3f82e1(0x1c8))/0x6*(parseInt(_0x3f82e1(0x1ce))/0x7)+-parseInt(_0x3f82e1(0x1ad))/0x8+-parseInt(_0x3f82e1(0x1ef))/0x9*(parseInt(_0x3f82e1(0x19e))/0xa)+parseInt(_0x3f82e1(0x1b1))/0xb;if(_0x3a685c===_0x362da4)break;else _0x373ebc['push'](_0x373ebc['shift']());}catch(_0x57b9c6){_0x373ebc['push'](_0x373ebc['shift']());}}}(_0x174b,0x94c59),function(_0x1de50f,_0x1b3f1e){var _0x5a9603=_0x9d65;typeof exports=='object'&&typeof module<'u'?_0x1b3f1e(exports,require('@univerjs-pro/docs-formula'),require('@univerjs/core'),require('@univerjs/docs/facade')):typeof define==_0x5a9603(0x1bd)&&define[_0x5a9603(0x1a8)]?define([_0x5a9603(0x1a2),'@univerjs-pro/docs-formula',_0x5a9603(0x1de),_0x5a9603(0x1c6)],_0x1b3f1e):(_0x1de50f=typeof globalThis<'u'?globalThis:_0x1de50f||self,_0x1b3f1e(_0x1de50f[_0x5a9603(0x1c7)]={},_0x1de50f['UniverProDocsFormula'],_0x1de50f['UniverCore'],_0x1de50f[_0x5a9603(0x1d2)]));}(this,function(_0x43838a,_0xf14625,_0x1977d8,_0x56ce29){var _0x58ab09=_0x9d65;Object[_0x58ab09(0x1a1)](_0x43838a,Symbol['toStringTag'],{'value':_0x58ab09(0x1a6)});function _0x177acf(_0x44c110,_0x2e1e21){return function(_0x44f224,_0x24ec64){_0x2e1e21(_0x44f224,_0x24ec64,_0x44c110);};}function _0x266900(_0x2ba033,_0x25caf2,_0x5ca426,_0x98986d){var _0x1a4d1a=_0x58ab09,_0x1da20f=arguments[_0x1a4d1a(0x1e4)],_0x1fc5a1=_0x1da20f<0x3?_0x25caf2:_0x98986d===null?_0x98986d=Object[_0x1a4d1a(0x1af)](_0x25caf2,_0x5ca426):_0x98986d,_0x26327d;if(typeof Reflect==_0x1a4d1a(0x1ab)&&typeof Reflect[_0x1a4d1a(0x1f5)]=='function')_0x1fc5a1=Reflect['decorate'](_0x2ba033,_0x25caf2,_0x5ca426,_0x98986d);else{for(var _0x2ba453=_0x2ba033[_0x1a4d1a(0x1e4)]-0x1;_0x2ba453>=0x0;_0x2ba453--)(_0x26327d=_0x2ba033[_0x2ba453])&&(_0x1fc5a1=(_0x1da20f<0x3?_0x26327d(_0x1fc5a1):_0x1da20f>0x3?_0x26327d(_0x25caf2,_0x5ca426,_0x1fc5a1):_0x26327d(_0x25caf2,_0x5ca426))||_0x1fc5a1);}return _0x1da20f>0x3&&_0x1fc5a1&&Object[_0x1a4d1a(0x1a1)](_0x25caf2,_0x5ca426,_0x1fc5a1),_0x1fc5a1;}let _0x4943ed=class{constructor(_0x448ac9,_0x364440,_0x5cbe1f,_0x5d38de,_0x2d24c1,_0x8b86ca){var _0x247212=_0x58ab09;this[_0x247212(0x1aa)]=_0x448ac9,this['_rangeId']=_0x364440,this[_0x247212(0x1e0)]=_0x5cbe1f,this[_0x247212(0x1d6)]=_0x5d38de,this[_0x247212(0x1e5)]=_0x2d24c1,this['_univerInstanceService']=_0x8b86ca;}['getId'](){return this['_rangeId'];}[_0x58ab09(0x1cd)](){var _0x232de2=_0x58ab09;let _0x588447=this[_0x232de2(0x1c9)]();return _0x588447?{'endOffset':_0x588447[_0x232de2(0x1fd)]+0x1,'rangeId':_0x588447[_0x232de2(0x1ea)],'startOffset':_0x588447['startIndex']}:null;}[_0x58ab09(0x1ac)](){var _0x2f0460=_0x58ab09,_0x656ea5;return((_0x656ea5=this['_model'][_0x2f0460(0x1ac)](this['_unitId'],this[_0x2f0460(0x1f1)]))==null?void 0x0:_0x656ea5['formula'])??'';}[_0x58ab09(0x1c3)](){var _0x5b6d24=_0x58ab09;return this['_model'][_0x5b6d24(0x1ac)](this['_unitId'],this[_0x5b6d24(0x1f1)])??null;}['getResult'](){var _0x1e923c=_0x58ab09;return this['_service'][_0x1e923c(0x1a0)]({'unitId':this[_0x1e923c(0x1aa)],'rangeId':this[_0x1e923c(0x1f1)]})??null;}[_0x58ab09(0x1b9)](){var _0x89808f=_0x58ab09;let _0x2d2d9c=this[_0x89808f(0x1cd)](),_0x339efc=this['getConfig'](),_0x143b26=this[_0x89808f(0x1a0)]();return!_0x2d2d9c||!_0x339efc||!_0x143b26?null:{..._0x2d2d9c,'config':_0x339efc,'formula':_0x339efc[_0x89808f(0x1a5)],'result':_0x143b26,'type':_0x89808f(0x1a5)};}[_0x58ab09(0x1cf)](_0x2f486b){var _0x5f4cbb=_0x58ab09;return this[_0x5f4cbb(0x1e0)][_0x5f4cbb(0x1f2)](_0xf14625[_0x5f4cbb(0x1b3)]['id'],{'externalReferences':_0x2f486b[_0x5f4cbb(0x1ca)],'formula':_0x2f486b[_0x5f4cbb(0x1a5)],'numberFormat':_0x2f486b[_0x5f4cbb(0x19c)],'rangeId':this[_0x5f4cbb(0x1f1)],'unitId':this[_0x5f4cbb(0x1aa)]});}[_0x58ab09(0x1b0)](_0x29fd19){var _0x24edb0=_0x58ab09;return this[_0x24edb0(0x1e0)]['syncExecuteCommand'](_0xf14625[_0x24edb0(0x19f)]['id'],{'numberFormat':_0x29fd19,'rangeId':this[_0x24edb0(0x1f1)],'unitId':this['_unitId']});}[_0x58ab09(0x1cc)](){var _0x46f3a3=_0x58ab09;return this[_0x46f3a3(0x1e0)]['syncExecuteCommand'](_0xf14625[_0x46f3a3(0x1df)]['id'],{'rangeId':this[_0x46f3a3(0x1f1)],'unitId':this[_0x46f3a3(0x1aa)]});}[_0x58ab09(0x1dd)](_0x409be4){var _0x1322bc=_0x58ab09;return this[_0x1322bc(0x1e0)][_0x1322bc(0x1f2)](_0xf14625[_0x1322bc(0x1f8)]['id'],{'rangeId':this[_0x1322bc(0x1f1)],'text':_0x409be4,'unitId':this['_unitId']});}[_0x58ab09(0x1f3)](){var _0x52c855=_0x58ab09;return this['_commandService'][_0x52c855(0x1f2)](_0xf14625[_0x52c855(0x1e1)]['id'],{'rangeId':this[_0x52c855(0x1f1)],'unitId':this[_0x52c855(0x1aa)]});}['_getCustomRange'](){var _0x18b694=_0x58ab09,_0x2a58ec;let _0x3747e4=this[_0x18b694(0x1be)][_0x18b694(0x1dc)](this[_0x18b694(0x1aa)],_0x1977d8[_0x18b694(0x1ec)]['UNIVER_DOC']);return _0x3747e4==null||(_0x2a58ec=_0x3747e4[_0x18b694(0x1fa)]()[_0x18b694(0x1c2)])==null||(_0x2a58ec=_0x2a58ec[_0x18b694(0x1ee)])==null?void 0x0:_0x2a58ec['find'](_0x2fa301=>_0x2fa301[_0x18b694(0x1ea)]===this[_0x18b694(0x1f1)]&&(0x0,_0xf14625[_0x18b694(0x1d0)])(_0x2fa301));}};_0x4943ed=_0x266900([_0x177acf(0x2,_0x1977d8['ICommandService']),_0x177acf(0x3,(0x0,_0x1977d8[_0x58ab09(0x1c1)])(_0xf14625['DocFormulaModel'])),_0x177acf(0x4,(0x0,_0x1977d8[_0x58ab09(0x1c1)])(_0xf14625['DocFormulaService'])),_0x177acf(0x5,_0x1977d8[_0x58ab09(0x1d4)])],_0x4943ed);function _0x4cdd18(_0x4b1b87){'@babel/helpers - typeof';var _0x1df1d1=_0x58ab09;return _0x4cdd18=typeof Symbol=='function'&&typeof Symbol[_0x1df1d1(0x1e2)]=='symbol'?function(_0x9bd9fa){return typeof _0x9bd9fa;}:function(_0x365d24){var _0x39b6e0=_0x1df1d1;return _0x365d24&&typeof Symbol==_0x39b6e0(0x1bd)&&_0x365d24[_0x39b6e0(0x1a3)]===Symbol&&_0x365d24!==Symbol[_0x39b6e0(0x1ed)]?_0x39b6e0(0x1d1):typeof _0x365d24;},_0x4cdd18(_0x4b1b87);}function _0x1c8abb(_0x15e9aa,_0x1c7d29){var _0x3f73f7=_0x58ab09;if(_0x4cdd18(_0x15e9aa)!='object'||!_0x15e9aa)return _0x15e9aa;var _0x2e9f06;if(typeof Symbol<'u'&&(_0x2e9f06=_0x15e9aa[Symbol[_0x3f73f7(0x1b7)]])!==void 0x0){var _0x505f4b=_0x2e9f06[_0x3f73f7(0x201)](_0x15e9aa,_0x1c7d29||_0x3f73f7(0x1d5));if(_0x4cdd18(_0x505f4b)!='object')return _0x505f4b;throw TypeError(_0x3f73f7(0x202));}return(_0x1c7d29==='string'?String:Number)(_0x15e9aa);}function _0x55d951(_0x166512){var _0x4b0910=_0x58ab09,_0x509e5a=_0x1c8abb(_0x166512,_0x4b0910(0x1bc));return _0x4cdd18(_0x509e5a)==_0x4b0910(0x1d1)?_0x509e5a:_0x509e5a+'';}function _0x9ea2c9(_0x347ded,_0x2cc58b,_0x207136){var _0x71ed1b=_0x58ab09;return(_0x2cc58b=_0x55d951(_0x2cc58b))in _0x347ded?Object[_0x71ed1b(0x1a1)](_0x347ded,_0x2cc58b,{'value':_0x207136,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x347ded[_0x2cc58b]=_0x207136,_0x347ded;}var _0x3726fe=class extends _0x56ce29[_0x58ab09(0x1e3)]{constructor(..._0x3c1fef){var _0x169453=_0x58ab09;super(..._0x3c1fef),_0x9ea2c9(this,_0x169453(0x1a9),void 0x0),_0x9ea2c9(this,_0x169453(0x1d7),void 0x0),_0x9ea2c9(this,_0x169453(0x1b6),void 0x0),_0x9ea2c9(this,_0x169453(0x1a7),void 0x0);}[_0x58ab09(0x1f7)](_0x5de2b0){var _0x584302=_0x58ab09;this['_docsFormulaCommandService']=_0x5de2b0[_0x584302(0x1bf)](_0x1977d8[_0x584302(0x1b8)]),this['_docsFormulaDisplayTextService']=_0x5de2b0[_0x584302(0x1bf)](_0xf14625[_0x584302(0x1e6)]),this[_0x584302(0x1b6)]=_0x5de2b0[_0x584302(0x1bf)](_0xf14625['DocFormulaModel']),this['_docsFormulaResourceLoaderService']=_0x5de2b0['get'](_0x1977d8[_0x584302(0x1d8)]);}[_0x58ab09(0x1f4)](){var _0x47a875=_0x58ab09;return this['_getCompleteRanges']()[_0x47a875(0x1b5)](_0x408793=>this[_0x47a875(0x1c0)](_0x408793['rangeId']));}[_0x58ab09(0x1ac)](_0x54b23d){var _0x14e8ba=_0x58ab09;return this[_0x14e8ba(0x203)]()[_0x14e8ba(0x1fc)](_0x2f2df0=>_0x2f2df0[_0x14e8ba(0x1ea)]===_0x54b23d)?this[_0x14e8ba(0x1c0)](_0x54b23d):null;}[_0x58ab09(0x1cb)](_0x2f5c55){var _0x597bd7=_0x58ab09;let _0x500431=this[_0x597bd7(0x203)]()[_0x597bd7(0x1ff)](_0x343f82=>_0x343f82[_0x597bd7(0x1e8)]<=_0x2f5c55&&_0x2f5c55<=_0x343f82[_0x597bd7(0x1fd)]);return _0x500431?this[_0x597bd7(0x1c0)](_0x500431[_0x597bd7(0x1ea)]):null;}['saveFormulaDisplayTextSnapshot'](){var _0x2d99e0=_0x58ab09;let _0x229b27=this[_0x2d99e0(0x1a7)][_0x2d99e0(0x1f9)](this['id']);if(!_0x229b27)throw Error('Document\x20'+this['id']+'\x20could\x20not\x20be\x20serialized.');return this['_docsFormulaDisplayTextService'][_0x2d99e0(0x19b)](_0x229b27);}['insertFormula'](_0x33781f){var _0x3b227f=_0x58ab09;return this[_0x3b227f(0x1fe)]({'externalReferences':_0x33781f[_0x3b227f(0x1ca)],'formula':_0x33781f[_0x3b227f(0x1a5)],'numberFormat':_0x33781f['numberFormat'],'target':{'type':'range','startOffset':_0x33781f['startOffset'],'endOffset':_0x33781f[_0x3b227f(0x1fb)]},'unitId':this[_0x3b227f(0x1f6)]()});}[_0x58ab09(0x1fe)](_0x3518b7){var _0x36b9d8=_0x58ab09;let _0x1f077c=this[_0x36b9d8(0x1a9)][_0x36b9d8(0x1f2)](_0xf14625['InsertDocFormulaCommand']['id'],_0x3518b7);return _0x1f077c?this[_0x36b9d8(0x1c0)](_0x1f077c[_0x36b9d8(0x1ea)]):null;}[_0x58ab09(0x203)](){var _0x116515=_0x58ab09,_0x3a81aa;let _0xeac36f=this[_0x116515(0x1b6)][_0x116515(0x1f4)](this[_0x116515(0x1f6)]());return((_0x3a81aa=this[_0x116515(0x200)]('')[_0x116515(0x1ee)])==null?void 0x0:_0x3a81aa[_0x116515(0x1eb)](_0x2430a3=>(0x0,_0xf14625['isDocFormulaRange'])(_0x2430a3)&&_0xeac36f[_0x2430a3[_0x116515(0x1ea)]]!=null))??[];}[_0x58ab09(0x1c0)](_0x18a1fe){var _0x2b676e=_0x58ab09;return this[_0x2b676e(0x1e7)]['createInstance'](_0x4943ed,this[_0x2b676e(0x1f6)](),_0x18a1fe);}};_0x56ce29[_0x58ab09(0x1e3)]['extend'](_0x3726fe);var _0x5c3320=class extends _0x56ce29['FDocumentParagraph']{constructor(..._0x56fdbe){var _0x4ae171=_0x58ab09;super(..._0x56fdbe),_0x9ea2c9(this,_0x4ae171(0x1a9),void 0x0);}[_0x58ab09(0x1f7)](_0x4e143c){var _0x394d09=_0x58ab09;this[_0x394d09(0x1a9)]=_0x4e143c['get'](_0x1977d8[_0x394d09(0x1b8)]);}[_0x58ab09(0x1da)](_0x4ad246,_0x2ae563,_0x12bf7f={}){var _0x2c9fc4=_0x58ab09;return this[_0x2c9fc4(0x1fe)](_0x4ad246,_0x2ae563,_0x12bf7f);}['appendFormula'](_0x22269f,_0x37a436={}){var _0x1a2e47=_0x58ab09;return this['_insert'](_0x1a2e47(0x1ae),_0x22269f,_0x37a436);}[_0x58ab09(0x1fe)](_0x2290c2,_0xd1971,_0x26d530){var _0x2173be=_0x58ab09;if(this['getSegmentId']())return null;let _0x10f2aa={'externalReferences':_0x26d530[_0x2173be(0x1ca)],'formula':_0xd1971,'numberFormat':_0x26d530[_0x2173be(0x19c)],'target':{'type':'paragraph','paragraphId':this['getId'](),'position':_0x2290c2},'unitId':this[_0x2173be(0x1bb)][_0x2173be(0x1f6)]()},_0xf4c5c3=this[_0x2173be(0x1a9)][_0x2173be(0x1f2)](_0xf14625[_0x2173be(0x1c5)]['id'],_0x10f2aa);return _0xf4c5c3?this[_0x2173be(0x1e7)]['createInstance'](_0x4943ed,this[_0x2173be(0x1bb)][_0x2173be(0x1f6)](),_0xf4c5c3[_0x2173be(0x1ea)]):null;}};_0x56ce29[_0x58ab09(0x1c4)][_0x58ab09(0x1b4)](_0x5c3320);var _0x4b6d01=class extends _0x56ce29[_0x58ab09(0x1db)]{constructor(..._0x25873c){var _0x5337de=_0x58ab09;super(..._0x25873c),_0x9ea2c9(this,_0x5337de(0x1a9),void 0x0);}[_0x58ab09(0x1f7)](_0xa3218){var _0xdfb257=_0x58ab09;this[_0xdfb257(0x1a9)]=_0xa3218['get'](_0x1977d8[_0xdfb257(0x1b8)]);}[_0x58ab09(0x1ba)](_0x20c1af,_0x2ec1a1={}){var _0x332f2f=_0x58ab09;let {endOffset:_0x451dd4,segmentId:_0x28c14a,startOffset:_0x434a12}=this['getRange']();return _0x28c14a?null:this[_0x332f2f(0x1fe)](_0x434a12,_0x451dd4,_0x20c1af,_0x2ec1a1);}[_0x58ab09(0x1fe)](_0x202737,_0x29f64f,_0x2575fe,_0x50e5dd){var _0x10d5b2=_0x58ab09;let _0x3e7ed2={'externalReferences':_0x50e5dd[_0x10d5b2(0x1ca)],'formula':_0x2575fe,'numberFormat':_0x50e5dd[_0x10d5b2(0x19c)],'target':{'type':'range','startOffset':_0x202737,'endOffset':_0x29f64f},'unitId':this[_0x10d5b2(0x1bb)][_0x10d5b2(0x1f6)]()},_0x2cb70d=this['_docsFormulaCommandService'][_0x10d5b2(0x1f2)](_0xf14625[_0x10d5b2(0x1c5)]['id'],_0x3e7ed2);return _0x2cb70d?this[_0x10d5b2(0x1e7)][_0x10d5b2(0x19d)](_0x4943ed,this[_0x10d5b2(0x1bb)][_0x10d5b2(0x1f6)](),_0x2cb70d[_0x10d5b2(0x1ea)]):null;}};_0x56ce29[_0x58ab09(0x1db)]['extend'](_0x4b6d01),Object[_0x58ab09(0x1a1)](_0x43838a,_0x58ab09(0x1d3),{'enumerable':!0x0,'get':function(){return _0x4943ed;}});}));function _0x174b(){var _0x1188c2=['_docsFormulaResourceLoaderService','amd','_docsFormulaCommandService','_unitId','object','getFormula','128000HoxtPn','end','getOwnPropertyDescriptor','setNumberFormat','49812323jJRKdi','2306qfIURT','UpdateDocFormulaCommand','extend','map','_docsFormulaModel','toPrimitive','ICommandService','describe','replaceWithFormula','_document','string','function','_univerInstanceService','get','_createFormula','Inject','body','getConfig','FDocumentParagraph','InsertDocFormulaCommand','@univerjs/docs/facade','UniverProDocsFormulaFacade','6hOLiYU','_getCustomRange','externalReferences','getFormulaAt','remove','getRange','5743213wPNwZv','update','isDocFormulaRange','symbol','UniverDocsFacade','FDocumentFormula','IUniverInstanceService','default','_model','_docsFormulaDisplayTextService','IResourceLoaderService','367295hNKSvL','insertFormula','FDocumentTextRange','getUnit','replaceWithText','@univerjs/core','RemoveDocFormulaCommand','_commandService','ConvertDocFormulaToTextCommand','iterator','FDocument','length','_service','DocFormulaDisplayTextService','_injector','startIndex','3482415ngExLC','rangeId','filter','UniverInstanceType','prototype','customRanges','808497jVilNS','746LaMxRg','_rangeId','syncExecuteCommand','convertToText','getFormulas','decorate','getId','_initialize','ReplaceDocFormulaWithTextCommand','saveUnit','getSnapshot','endOffset','some','endIndex','_insert','find','getBody','call','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_getCompleteRanges','degradeDocumentData','numberFormat','createInstance','110mPliOQ','SetDocFormulaNumberFormatCommand','getResult','defineProperty','exports','constructor','4RpUkxW','formula','Module'];_0x174b=function(){return _0x1188c2;};return _0x174b();}
|