@univerjs-pro/docs-formula 1.0.4 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x3074bd=_0x1bc5;(function(_0x1bd644,_0x411508){const _0x49da13=_0x1bc5,_0x7c39f0=_0x1bd644();while(!![]){try{const _0x1d90b4=parseInt(_0x49da13(0xe9))/0x1+parseInt(_0x49da13(0x135))/0x2*(-parseInt(_0x49da13(0x119))/0x3)+parseInt(_0x49da13(0x174))/0x4+parseInt(_0x49da13(0x1c0))/0x5*(parseInt(_0x49da13(0x176))/0x6)+-parseInt(_0x49da13(0x197))/0x7+-parseInt(_0x49da13(0xf3))/0x8*(-parseInt(_0x49da13(0x167))/0x9)+parseInt(_0x49da13(0x110))/0xa*(-parseInt(_0x49da13(0x1d4))/0xb);if(_0x1d90b4===_0x411508)break;else _0x7c39f0['push'](_0x7c39f0['shift']());}catch(_0x949826){_0x7c39f0['push'](_0x7c39f0['shift']());}}}(_0x200b,0xca008));import{FormulaCacheEligibilityService as _0x142c68,FormulaLastValuePersistenceService as _0xdccf24,HostExternalReferenceModel as _0x51c26f,UniverProFormulaEnginePlugin as _0x1a7798,buildUpsertHostExternalReferenceMutations as _0x4bd97f,collectFormulaExternalReferenceQualifiers as _0x239d3f,getScalarFormulaResultCell as _0x329bd2,resolveFormulaResultPresentation as _0x43dcf8,resolveHostFormulaExternalReferences as _0x26b6bd,toFormulaLastValue as _0x2dfe02}from'@univerjs-pro/engine-formula';import{CellValueType as _0x235b15,CommandType as _0x49f619,CustomRangeType as _0x542b54,DataStreamTreeTokenType as _0x484270,DependentOn as _0x21eda0,Disposable as _0x5dc02b,ICommandService as _0x78f14b,IConfigService as _0x111e6a,IResourceManagerService as _0x3f723c,IUndoRedoService as _0x3e3a50,IUniverInstanceService as _0x5a1b75,Inject as _0x34e393,Injector as _0x37a854,JSONX as _0x4ed544,Plugin as _0x497bd3,TextX as _0x1b1246,Tools as _0x942fba,UniverInstanceType as _0x56d504,generateRandomId as _0x260a9d,getBodySliceForTextXAction as _0x27439c,getCustomRangeInterval as _0x528474,getParagraphContentStartOffset as _0x403d2a,getRichTextEditPath as _0x1d4096,merge as _0x5be025,shiftExclusiveRangeOnDelete as _0x2ee3d6,shiftExclusiveRangeOnInsert as _0x37b9bc,shiftInclusiveRangeOnDelete as _0x2bd672,shiftInclusiveRangeOnInsert as _0x528ea5,touchDependencies as _0x2d40f1}from'@univerjs/core';import{DOC_SELECTION_OPTION_PRESERVE_CARET as _0x169a9f,DocSelectionManagerService as _0x2711a1,DocTextResolverService as _0x572c95,RichTextEditingMutation as _0x40b755,UniverDocsPlugin as _0x515868}from'@univerjs/docs';import{FormulaResultStatus as _0x11c47e,LexerTreeBuilder as _0x3874f6,OtherFormulaBizType as _0x350834,RegisterOtherFormulaService as _0x3391af}from'@univerjs/engine-formula';import{Subject as _0x581576}from'rxjs';import{UniverLicensePlugin as _0x4342e7}from'@univerjs-pro/license';const y='DOC_FORMULA_PLUGIN',je=0x1,Me='univer-docs-formula',Ne='';function b(){return{'schemaVersion':0x1,'formulas':{}};}function x(_0x37ae32){const _0x4f5034=_0x1bc5;return!_0x37ae32||typeof _0x37ae32!=_0x4f5034(0x195)||!S(_0x37ae32,[_0x4f5034(0x102),_0x4f5034(0x151)])||!(_0x4f5034(0x102)in _0x37ae32)||_0x37ae32[_0x4f5034(0x102)]!==0x1||!(_0x4f5034(0x151)in _0x37ae32)||!_0x37ae32[_0x4f5034(0x151)]||typeof _0x37ae32[_0x4f5034(0x151)]!=_0x4f5034(0x195)||Array[_0x4f5034(0x11d)](_0x37ae32[_0x4f5034(0x151)])?!0x1:Object[_0x4f5034(0x1e1)](_0x37ae32[_0x4f5034(0x151)])['every'](([_0x1beef8,_0x3d04df])=>_0x1beef8[_0x4f5034(0x177)]>0x0&&Pe(_0x3d04df));}function Pe(_0x4c0c1e){const _0x2859c7=_0x1bc5;return!_0x4c0c1e||typeof _0x4c0c1e!=_0x2859c7(0x195)||!S(_0x4c0c1e,[_0x2859c7(0x1ce),_0x2859c7(0x1ba),'lastValue'])||!(_0x2859c7(0x1ce)in _0x4c0c1e)||typeof _0x4c0c1e[_0x2859c7(0x1ce)]!=_0x2859c7(0x165)||!_0x4c0c1e[_0x2859c7(0x1ce)]['trim']()||_0x2859c7(0x1ba)in _0x4c0c1e&&_0x4c0c1e[_0x2859c7(0x1ba)]!=null&&(typeof _0x4c0c1e[_0x2859c7(0x1ba)]!='object'||!S(_0x4c0c1e[_0x2859c7(0x1ba)],[_0x2859c7(0x128)])||!(_0x2859c7(0x128)in _0x4c0c1e[_0x2859c7(0x1ba)])||typeof _0x4c0c1e[_0x2859c7(0x1ba)][_0x2859c7(0x128)]!=_0x2859c7(0x165))?!0x1:!(_0x2859c7(0x13e)in _0x4c0c1e)||_0x4c0c1e[_0x2859c7(0x13e)]==null||Fe(_0x4c0c1e[_0x2859c7(0x13e)]);}function Fe(_0xa25a08){const _0x5d2dbb=_0x1bc5;return!_0xa25a08||typeof _0xa25a08!=_0x5d2dbb(0x195)||!S(_0xa25a08,['v','t',_0x5d2dbb(0x128)])||!('v'in _0xa25a08)||_0xa25a08['v']!==null&&typeof _0xa25a08['v']!=_0x5d2dbb(0x165)&&typeof _0xa25a08['v']!=_0x5d2dbb(0x193)&&typeof _0xa25a08['v']!=_0x5d2dbb(0x1bf)||'t'in _0xa25a08&&_0xa25a08['t']!=null&&!Ie(_0xa25a08['t'])?!0x1:!(_0x5d2dbb(0x128)in _0xa25a08)||_0xa25a08[_0x5d2dbb(0x128)]==null||typeof _0xa25a08[_0x5d2dbb(0x128)]=='string';}function S(_0x109870,_0x31cfb4){const _0x59f0f4=_0x1bc5;let _0x36eee1=new Set(_0x31cfb4);return Object[_0x59f0f4(0xf6)](_0x109870)['every'](_0x2b1b68=>_0x36eee1['has'](_0x2b1b68));}function Ie(_0x33c2e1){const _0x3573b3=_0x1bc5;return typeof _0x33c2e1=='number'&&Object[_0x3573b3(0x1d3)](_0x235b15)[_0x3573b3(0x1aa)](_0x33c2e1);}const Le=new Set([_0x484270[_0x3074bd(0x16c)],_0x484270[_0x3074bd(0xee)],_0x484270[_0x3074bd(0x13b)],_0x484270['TABLE_CELL_START'],_0x484270[_0x3074bd(0x186)],_0x484270[_0x3074bd(0x1d7)],_0x484270[_0x3074bd(0x1c2)],_0x484270[_0x3074bd(0x182)],_0x484270[_0x3074bd(0x14e)],_0x484270[_0x3074bd(0x188)],_0x484270[_0x3074bd(0xfa)],_0x484270['BLOCK_START'],_0x484270[_0x3074bd(0x1a5)],_0x484270[_0x3074bd(0x146)]]);var C=class extends Error{constructor(){const _0x132166=_0x3074bd;super(_0x132166(0x1a4));}};function Re(_0x1a3405){const _0x5f1a4d=_0x3074bd;var _0x1af2ac,_0x34409d;let _0x515d6e=_0x942fba['deepClone'](_0x1a3405['documentData']),_0xa2599c=j(_0x515d6e),{startOffset:_0x1df447,endOffset:_0x56e4bd}=We(_0xa2599c,_0x1a3405['startOffset'],_0x1a3405[_0x5f1a4d(0x172)]);He(_0xa2599c,_0x1df447,_0x56e4bd);let _0x3c937f=((_0x1af2ac=_0xa2599c[_0x5f1a4d(0x122)])==null?void 0x0:_0x1af2ac['filter'](_0x48a413=>{const _0x3c1478=_0x5f1a4d;if(!w(_0x48a413))return!0x1;let _0x4c11b7=_0x528474(_0x48a413);return _0x4c11b7[_0x3c1478(0x172)]>_0x1df447&&_0x4c11b7['startOffset']<_0x56e4bd;})[_0x5f1a4d(0xfd)](_0x3130df=>_0x3130df['rangeId']))??[];qe(_0xa2599c,_0x1df447,_0x56e4bd,''),_0xa2599c['customRanges']=[...((_0x34409d=_0xa2599c[_0x5f1a4d(0x122)])==null?void 0x0:_0x34409d[_0x5f1a4d(0x180)](_0x49f6a6=>!_0x3c937f[_0x5f1a4d(0x1aa)](_0x49f6a6[_0x5f1a4d(0x1b3)])&&_0x49f6a6['rangeId']!==_0x1a3405[_0x5f1a4d(0x1b3)]))??[],Ue(_0x1a3405['rangeId'],_0x1df447)][_0x5f1a4d(0x133)]((_0x4085d3,_0x2d7c2b)=>_0x4085d3['startIndex']-_0x2d7c2b[_0x5f1a4d(0x1ab)]);let _0xcf935b=E(_0x1a3405[_0x5f1a4d(0x19d)]);return _0x3c937f['forEach'](_0x56e737=>{delete _0xcf935b['formulas'][_0x56e737];}),_0xcf935b[_0x5f1a4d(0x151)][_0x1a3405['rangeId']]=_0x942fba['deepClone'](_0x1a3405[_0x5f1a4d(0x1b6)]),{'nextDocumentData':_0x515d6e,'nextResource':_0xcf935b,'cursorOffset':_0x1df447+0x1};}function ze(_0x20a608){const _0x40ce91=_0x3074bd;var _0x1de896,_0x2120f5;let _0x408198=_0x942fba[_0x40ce91(0x189)](_0x20a608[_0x40ce91(0x194)]),_0xd3695e=(_0x1de896=j(_0x408198)[_0x40ce91(0x122)])==null?void 0x0:_0x1de896[_0x40ce91(0x129)](_0x630d20=>_0x630d20['rangeId']===_0x20a608[_0x40ce91(0x1b3)]&&w(_0x630d20));if(!_0xd3695e||!((_0x2120f5=_0x20a608['resource'])!=null&&_0x2120f5['formulas'][_0x20a608[_0x40ce91(0x1b3)]]))return null;let _0x4ad25f=E(_0x20a608['resource']);return _0x4ad25f[_0x40ce91(0x151)][_0x20a608['rangeId']]=_0x942fba['deepClone'](_0x20a608[_0x40ce91(0x1b6)]),{'nextDocumentData':_0x408198,'nextResource':_0x4ad25f,'cursorOffset':_0xd3695e[_0x40ce91(0xf2)]+0x1};}function Be(_0xd12696){const _0x9d120=_0x3074bd;let _0x495b6d=_0x942fba[_0x9d120(0x189)](_0xd12696[_0x9d120(0x194)]),_0x493d3f=Je(_0x495b6d,_0xd12696[_0x9d120(0x1b3)],_0xd12696[_0x9d120(0x18c)]??'');if(_0x493d3f==null)return null;let _0x140ff3=E(_0xd12696[_0x9d120(0x19d)]);return delete _0x140ff3[_0x9d120(0x151)][_0xd12696[_0x9d120(0x1b3)]],{'nextDocumentData':_0x495b6d,'nextResource':_0x140ff3,'cursorOffset':_0x493d3f};}function Ve(_0x447fbf,_0x174fdc){const _0x3c6ab5=_0x3074bd;var _0x3333e9;let _0x4bc832=_0x942fba[_0x3c6ab5(0x189)](_0x447fbf),_0x46d734=_0x4bc832[_0x3c6ab5(0x11f)];if(!_0x46d734)return _0x4bc832;let _0x56d961=new Map(_0x174fdc[_0x3c6ab5(0xfd)](_0x23285d=>[_0x23285d[_0x3c6ab5(0x1b3)],_0x23285d['text']])),_0x4550ae=((_0x3333e9=_0x46d734[_0x3c6ab5(0x122)])==null?void 0x0:_0x3333e9[_0x3c6ab5(0x180)](_0x5c6625=>w(_0x5c6625)&&_0x56d961['has'](_0x5c6625[_0x3c6ab5(0x1b3)]))['sort']((_0xd95b96,_0x43270e)=>_0x43270e['startIndex']-_0xd95b96[_0x3c6ab5(0x1ab)]))??[];for(let _0x461dd8 of _0x4550ae)Je(_0x4bc832,_0x461dd8[_0x3c6ab5(0x1b3)],_0x56d961[_0x3c6ab5(0x104)](_0x461dd8[_0x3c6ab5(0x1b3)])??'');return _0x4bc832;}function w(_0x4f2681){const _0x29b6b1=_0x3074bd;var _0x3c314c;return(_0x4f2681==null?void 0x0:_0x4f2681[_0x29b6b1(0x1d6)])===_0x542b54[_0x29b6b1(0x154)]&&_0x4f2681[_0x29b6b1(0x155)]===!0x0&&((_0x3c314c=_0x4f2681[_0x29b6b1(0x10c)])==null?void 0x0:_0x3c314c[_0x29b6b1(0x11a)])===_0x29b6b1(0x1cc);}function T(_0x1e9d0b,_0x4a62b1){const _0x4f969e=_0x3074bd;var _0x47f5ad;return _0x1e9d0b==null||(_0x47f5ad=_0x1e9d0b[_0x4f969e(0x122)])==null?void 0x0:_0x47f5ad[_0x4f969e(0x129)](_0x2ef00c=>_0x2ef00c[_0x4f969e(0x1b3)]===_0x4a62b1&&w(_0x2ef00c));}function He(_0x3977b5,_0xe2e628,_0x286e40){const _0x50373d=_0x3074bd;if(_0xe2e628===_0x286e40){if(Le[_0x50373d(0x1b9)](_0x3977b5[_0x50373d(0x1d5)][_0xe2e628]))throw new C();return;}for(let _0x2d4c98=_0xe2e628;_0x2d4c98<_0x286e40;_0x2d4c98++)if(_0x3977b5['dataStream'][_0x2d4c98]===_0x484270[_0x50373d(0x138)]||Le[_0x50373d(0x1b9)](_0x3977b5[_0x50373d(0x1d5)][_0x2d4c98]))throw new C();}function Ue(_0x19b31b,_0x3ec4be){const _0x24d91d=_0x3074bd;return{'startIndex':_0x3ec4be,'endIndex':_0x3ec4be,'rangeId':_0x19b31b,'rangeType':_0x542b54[_0x24d91d(0x154)],'wholeEntity':!0x0,'properties':{'kind':Me}};}function E(_0x44c32b){const _0x1a8544=_0x3074bd;return _0x44c32b?_0x942fba[_0x1a8544(0x189)](_0x44c32b):b();}function We(_0xf1308f,_0x15b26f,_0x5d9e78){const _0x2b25f5=_0x3074bd;let _0x1ed63e=Ke(_0xf1308f),_0x45089b=_0x15b26f??_0x1ed63e,_0x4af214=_0x5d9e78??_0x45089b;return{'startOffset':Ge(Math[_0x2b25f5(0x15f)](_0x45089b,_0x4af214),_0x1ed63e),'endOffset':Ge(Math['max'](_0x45089b,_0x4af214),_0x1ed63e)};}function Ge(_0x4cea99,_0x564828){const _0x1f0b71=_0x3074bd;return Math[_0x1f0b71(0x1cb)](0x0,Math[_0x1f0b71(0x15f)](_0x4cea99,_0x564828));}function Ke(_0x558c1e){const _0x53b182=_0x3074bd;return _0x558c1e[_0x53b182(0x1d5)][_0x53b182(0x199)](''+_0x484270[_0x53b182(0x138)]+_0x484270[_0x53b182(0x16c)])?Math['max'](0x0,_0x558c1e[_0x53b182(0x1d5)][_0x53b182(0x177)]-0x2):_0x558c1e[_0x53b182(0x1d5)][_0x53b182(0x199)](_0x484270[_0x53b182(0x16c)])?Math['max'](0x0,_0x558c1e[_0x53b182(0x1d5)][_0x53b182(0x177)]-0x1):_0x558c1e['dataStream']['length'];}function qe(_0x5b88a8,_0x29a56b,_0x4f912c,_0x2598e0){_0x4f912c>_0x29a56b&&Xe(_0x5b88a8,_0x29a56b,_0x4f912c),Ye(_0x5b88a8,_0x29a56b,_0x2598e0);}function Je(_0x5d71e3,_0x38ae96,_0x279624){const _0x319d25=_0x3074bd;var _0x3338cf,_0x3446f7;let _0x49aac3=j(_0x5d71e3),_0x2a1a75=(_0x3338cf=_0x49aac3['customRanges'])==null?void 0x0:_0x3338cf[_0x319d25(0x129)](_0x37973f=>_0x37973f[_0x319d25(0x1b3)]===_0x38ae96&&w(_0x37973f));if(!_0x2a1a75)return null;let _0x420004=_0x528474(_0x2a1a75);return qe(_0x49aac3,_0x420004[_0x319d25(0x15d)],_0x420004[_0x319d25(0x172)],_0x279624),_0x49aac3[_0x319d25(0x122)]=(_0x3446f7=_0x49aac3['customRanges'])==null?void 0x0:_0x3446f7['filter'](_0x24ed6b=>_0x24ed6b['rangeId']!==_0x38ae96),_0x420004[_0x319d25(0x15d)]+_0x279624['length'];}function Ye(_0x4767dd,_0x26f628,_0x1d2eae){const _0x425f79=_0x3074bd;_0x1d2eae&&(_0x4767dd[_0x425f79(0x1d5)]=''+_0x4767dd[_0x425f79(0x1d5)][_0x425f79(0x178)](0x0,_0x26f628)+_0x1d2eae+_0x4767dd['dataStream'][_0x425f79(0x178)](_0x26f628),Ze(_0x4767dd,_0x26f628,_0x1d2eae[_0x425f79(0x177)]));}function Xe(_0x22cd9f,_0x3c632b,_0x771a80){const _0x210c43=_0x3074bd;let _0x2210e4=_0x771a80-_0x3c632b;_0x22cd9f['dataStream']=''+_0x22cd9f[_0x210c43(0x1d5)]['slice'](0x0,_0x3c632b)+_0x22cd9f[_0x210c43(0x1d5)][_0x210c43(0x178)](_0x771a80),Qe(_0x22cd9f,_0x3c632b,_0x2210e4);}function Ze(_0x56eaee,_0x19b552,_0x37be49){const _0x478eb3=_0x3074bd;_0x56eaee['paragraphs']=D(_0x56eaee[_0x478eb3(0x12b)],_0x19b552,_0x37be49),_0x56eaee['sectionBreaks']=D(_0x56eaee[_0x478eb3(0x1cf)],_0x19b552,_0x37be49),_0x56eaee[_0x478eb3(0x116)]=D(_0x56eaee[_0x478eb3(0x116)],_0x19b552,_0x37be49),_0x56eaee[_0x478eb3(0x1b7)]=$e(_0x56eaee['textRuns'],_0x19b552,_0x37be49),_0x56eaee[_0x478eb3(0xfc)]=et(_0x56eaee[_0x478eb3(0xfc)],_0x19b552,_0x37be49),_0x56eaee['columnGroups']=k(_0x56eaee[_0x478eb3(0xf4)],_0x19b552,_0x37be49),_0x56eaee[_0x478eb3(0x122)]=k(_0x56eaee[_0x478eb3(0x122)],_0x19b552,_0x37be49),_0x56eaee['customDecorations']=k(_0x56eaee['customDecorations'],_0x19b552,_0x37be49),_0x56eaee[_0x478eb3(0xf0)]=k(_0x56eaee[_0x478eb3(0xf0)],_0x19b552,_0x37be49);}function Qe(_0x5b7914,_0x150067,_0x5e1d6d){const _0x3e0b83=_0x3074bd;var _0x37bfff,_0x5ae0e4;_0x5b7914['paragraphs']=O(_0x5b7914[_0x3e0b83(0x12b)],_0x150067,_0x5e1d6d),_0x5b7914[_0x3e0b83(0x1cf)]=O(_0x5b7914[_0x3e0b83(0x1cf)],_0x150067,_0x5e1d6d),_0x5b7914[_0x3e0b83(0x116)]=O(_0x5b7914[_0x3e0b83(0x116)],_0x150067,_0x5e1d6d),_0x5b7914[_0x3e0b83(0x1b7)]=(_0x37bfff=tt((_0x5ae0e4=_0x5b7914[_0x3e0b83(0x1b7)])==null?void 0x0:_0x5ae0e4[_0x3e0b83(0xfd)](_0x436148=>({..._0x436148,'startIndex':_0x436148['st'],'endIndex':_0x436148['ed']})),_0x150067,_0x5e1d6d))==null?void 0x0:_0x37bfff[_0x3e0b83(0xfd)](_0x5020b4=>{let {startIndex:_0x51daa9,endIndex:_0x48e1af,..._0x56a490}=_0x5020b4;return{..._0x56a490,'st':_0x51daa9,'ed':_0x48e1af};}),_0x5b7914[_0x3e0b83(0xfc)]=tt(_0x5b7914[_0x3e0b83(0xfc)],_0x150067,_0x5e1d6d),_0x5b7914[_0x3e0b83(0xf4)]=A(_0x5b7914['columnGroups'],_0x150067,_0x5e1d6d),_0x5b7914[_0x3e0b83(0x122)]=A(_0x5b7914[_0x3e0b83(0x122)],_0x150067,_0x5e1d6d),_0x5b7914[_0x3e0b83(0x13a)]=A(_0x5b7914['customDecorations'],_0x150067,_0x5e1d6d),_0x5b7914['blockRanges']=A(_0x5b7914[_0x3e0b83(0xf0)],_0x150067,_0x5e1d6d);}function D(_0x5a728f,_0x11b6ec,_0x1f3109){const _0x3b8c6f=_0x3074bd;return _0x5a728f==null?void 0x0:_0x5a728f['map'](_0x3a7b18=>_0x3a7b18[_0x3b8c6f(0x1ab)]>=_0x11b6ec?{..._0x3a7b18,'startIndex':_0x3a7b18[_0x3b8c6f(0x1ab)]+_0x1f3109}:_0x3a7b18);}function O(_0x30470f,_0x444252,_0xcc48ae){const _0x465ed4=_0x3074bd;let _0x5cc75d=_0x444252+_0xcc48ae;return _0x30470f==null?void 0x0:_0x30470f[_0x465ed4(0xfd)](_0x4a1604=>_0x4a1604[_0x465ed4(0x1ab)]>=_0x444252&&_0x4a1604[_0x465ed4(0x1ab)]<_0x5cc75d?null:_0x4a1604[_0x465ed4(0x1ab)]>=_0x5cc75d?{..._0x4a1604,'startIndex':_0x4a1604['startIndex']-_0xcc48ae}:_0x4a1604)[_0x465ed4(0x180)](_0x3e22ad=>_0x3e22ad!=null);}function _0x200b(){const _0x5c633b=['_deleteRegistration','schemaVersion','registerProvider','get','insert','cell','call','docs-formula.mutation.set-resource','toPrimitive','getLoadError','presentationChanged$','properties','_change$','ERROR','getResult','170cEtTSh','docs-formula.mutation.set-last-values','_setPresentation','getUnitId','paragraphId','_syncScheduled','customBlocks','params','registerFormulaWithRange','705918QaVGnS','kind','resourceUndo','function','isArray','resolveFormula','body','complete','clear','customRanges','undoMutation','serialize','_injector','identity','_hostExternalReferenceModel','pattern','find','range','paragraphs','expectedNumberFormat','subscribe','eligible','externalMutations','default','docs-formula.command.convert-to-text','setFormula','sort','selection','8aPJrXC','@univerjs-pro/docs-formula','_updateFormulaResult','PARAGRAPH','accessor','customDecorations','TABLE_ROW_START','syncUnit','_instanceService','lastValue','from','disabled','pluginName','sequenceNodesBuilder','presentation','defineProperty','dispose','CUSTOM_BLOCK','externalReferences','_resourceManagerService','getUnit','unregister','getCurrentUnitOfType','onStarting','previousDocumentData','COLUMN_START','UNIVER_DOC','getInstance','formulas','change$','type','CUSTOM','wholeEntity','source','_pendingUnitIds','COMMAND','formulaResult$','trigger','deleteFormula','assign','startOffset','expectedReferenceRevision','min','DOC_FORMULA_PLUGIN','version','assess','resourceRedo','setFormulas','string','degradeBody','156969lACQYZ','retain','color','SUCCESS','symbol','SECTION_BREAK','_registrationService','_loadErrors','_commandService','references','setResource','endOffset','getFormulaValueSync','4683992DovckP','_rawResources','9185322JuawfS','length','slice','_isDisposed','forEach','some','_model','docs-formula.command.insert','parse','documentRedo','filter','_syncUnit','COLUMN_GROUP_START','add','registerPluginResource','getResource','TABLE_CELL_END','set','COLUMN_END','deepClone','segmentId','empty','text','isInteger','error','_docFormulaModel','_queueSync','Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.','_service','number','documentData','object','asObservable','2268763OxdpKs','_univerInstanceService','endsWith','position','unregisterUnit','getRevision','resource','invalid-resource','removeFormula','next','unitId','docs-formula.mutation.remove-formula','docs-formula.command.set-number-format','Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries','BLOCK_END','MUTATION','resources','formulaId','constructor','includes','startIndex','packageName','syncExecuteCommand','deleteLength','model','data','delete','trim','rangeId','stringify','name','config','textRuns','getFormula','has','numberFormat','target','getSnapshot','_presentationChanged$','prototype','boolean','5TwyUYd','redoMutation','TABLE_END','_registrations','stale','degradeDocumentData','_formulaKeys','_resources','getRegisteredFormulas','removeUnit','resolved','max','univer-docs-formula','unsupported-version','formula','sectionBreaks','nextDocumentData','1.0.4','collectMutations','values','1537261HzUEQw','dataStream','rangeType','TABLE_ROW_END','liveResult','nextResource','onCommandExecuted','disposeWithMe','unitAdded$','getTextRanges','replaceDocRanges','getFormulas','_configService','entries','_config','getOwnPropertyDescriptor','notifyTextChanged','598068okvLCx','referenceRevision','cursorOffset','fromEntries','load','TABLE_START','_preserveInvalid','blockRanges','document','endIndex','536xDvacr','columnGroups','decorate','keys','updates','success','insertLength','COLUMN_GROUP_END','register','tables','map','status','docs-formula.command.update','_formulaService'];_0x200b=function(){return _0x5c633b;};return _0x200b();}function $e(_0xbab213,_0x205a72,_0xce6be0){const _0x4c641e=_0x3074bd;return _0xbab213==null?void 0x0:_0xbab213[_0x4c641e(0xfd)](_0x58f37f=>_0x58f37f['st']>=_0x205a72?{..._0x58f37f,'st':_0x58f37f['st']+_0xce6be0,'ed':_0x58f37f['ed']+_0xce6be0}:_0x58f37f['ed']>_0x205a72?{..._0x58f37f,'ed':_0x58f37f['ed']+_0xce6be0}:_0x58f37f);}function k(_0xb56eae,_0x59869e,_0x156800){const _0x317341=_0x3074bd;return _0xb56eae==null?void 0x0:_0xb56eae[_0x317341(0xfd)](_0x43817d=>_0x528ea5(_0x43817d,_0x59869e,_0x156800));}function et(_0x3355b8,_0x5603ab,_0x7676ac){const _0x4cac9f=_0x3074bd;return _0x3355b8==null?void 0x0:_0x3355b8[_0x4cac9f(0xfd)](_0x1ad8e1=>_0x37b9bc(_0x1ad8e1,_0x5603ab,_0x7676ac));}function A(_0x508d46,_0x467425,_0x4e3ce3){const _0x51b844=_0x3074bd;return _0x508d46==null?void 0x0:_0x508d46['map'](_0x361ff5=>_0x2bd672(_0x361ff5,_0x467425,_0x4e3ce3))[_0x51b844(0x180)](_0x23ee1b=>_0x23ee1b!=null);}function tt(_0x5a6ecb,_0x142c79,_0x5b48ea){const _0x13b96b=_0x3074bd;return _0x5a6ecb==null?void 0x0:_0x5a6ecb[_0x13b96b(0xfd)](_0x152f19=>_0x2ee3d6(_0x152f19,_0x142c79,_0x5b48ea))[_0x13b96b(0x180)](_0x110575=>_0x110575!=null);}function _0x1bc5(_0x3613e1,_0x5cdc8d){_0x3613e1=_0x3613e1-0xe7;const _0x200b67=_0x200b();let _0x1bc588=_0x200b67[_0x3613e1];return _0x1bc588;}function j(_0x49a883){const _0x268836=_0x3074bd;if(!_0x49a883[_0x268836(0x11f)])throw Error(_0x268836(0x191));return _0x49a883[_0x268836(0x11f)];}function M(_0x523ce2){'@babel/helpers - typeof';const _0x1d5593=_0x3074bd;return M=typeof Symbol==_0x1d5593(0x11c)&&typeof Symbol['iterator']=='symbol'?function(_0x134558){return typeof _0x134558;}:function(_0x232539){const _0x2db687=_0x1d5593;return _0x232539&&typeof Symbol==_0x2db687(0x11c)&&_0x232539[_0x2db687(0x1a9)]===Symbol&&_0x232539!==Symbol[_0x2db687(0x1be)]?_0x2db687(0x16b):typeof _0x232539;},M(_0x523ce2);}function nt(_0x5c0dc4,_0x2fbcd1){const _0x44c758=_0x3074bd;if(M(_0x5c0dc4)!='object'||!_0x5c0dc4)return _0x5c0dc4;var _0x4ba59f=_0x5c0dc4[Symbol[_0x44c758(0x109)]];if(_0x4ba59f!==void 0x0){var _0x3dd079=_0x4ba59f[_0x44c758(0x107)](_0x5c0dc4,_0x2fbcd1||_0x44c758(0x130));if(M(_0x3dd079)!=_0x44c758(0x195))return _0x3dd079;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x2fbcd1==='string'?String:Number)(_0x5c0dc4);}function rt(_0x305c5d){const _0x5b8ffa=_0x3074bd;var _0x209066=nt(_0x305c5d,_0x5b8ffa(0x165));return M(_0x209066)==_0x5b8ffa(0x16b)?_0x209066:_0x209066+'';}function N(_0x85a486,_0x3ebbc8,_0x5b83fa){const _0x36c8b1=_0x3074bd;return(_0x3ebbc8=rt(_0x3ebbc8))in _0x85a486?Object[_0x36c8b1(0x144)](_0x85a486,_0x3ebbc8,{'value':_0x5b83fa,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x85a486[_0x3ebbc8]=_0x5b83fa,_0x85a486;}var P=class extends _0x5dc02b{constructor(..._0x1fd400){const _0x11b270=_0x3074bd;super(..._0x1fd400),N(this,'_resources',new Map()),N(this,'_rawResources',new Map()),N(this,'_loadErrors',new Map()),N(this,_0x11b270(0x10d),new _0x581576()),N(this,_0x11b270(0x152),this[_0x11b270(0x10d)][_0x11b270(0x196)]());}[_0x3074bd(0x1b8)](_0x884bf,_0xb898e2){const _0x24b38b=_0x3074bd;var _0x26322f;let _0x212788=(_0x26322f=this['_resources'][_0x24b38b(0x104)](_0x884bf))==null?void 0x0:_0x26322f[_0x24b38b(0x151)][_0xb898e2];return _0x212788?_0x942fba[_0x24b38b(0x189)](_0x212788):void 0x0;}['getFormulas'](_0x507dbb){const _0xdbd199=_0x3074bd;var _0x394d1b;return _0x942fba[_0xdbd199(0x189)](((_0x394d1b=this[_0xdbd199(0x1c7)]['get'](_0x507dbb))==null?void 0x0:_0x394d1b[_0xdbd199(0x151)])??{});}['getResource'](_0x423dc4){const _0x164cc4=_0x3074bd;let _0x496e2c=this[_0x164cc4(0x1c7)][_0x164cc4(0x104)](_0x423dc4);return _0x496e2c?_0x942fba[_0x164cc4(0x189)](_0x496e2c):void 0x0;}[_0x3074bd(0x132)](_0x2ee1b0,_0xa46798,_0x4b49bd){const _0x5a9524=_0x3074bd;return this[_0x5a9524(0x164)](_0x2ee1b0,{[_0xa46798]:_0x4b49bd});}['setResource'](_0x50545f,_0x5e26bc){const _0x4ffe48=_0x3074bd;return this[_0x4ffe48(0x16e)][_0x4ffe48(0x1b9)](_0x50545f)||!x(_0x5e26bc)?!0x1:(this[_0x4ffe48(0x1c7)][_0x4ffe48(0x187)](_0x50545f,_0x942fba['deepClone'](_0x5e26bc)),this[_0x4ffe48(0x10d)][_0x4ffe48(0x1a0)]({'unitId':_0x50545f}),!0x0);}[_0x3074bd(0x164)](_0x30bcac,_0x5515cd){const _0x4c7406=_0x3074bd;if(this[_0x4c7406(0x16e)][_0x4c7406(0x1b9)](_0x30bcac)||!Object[_0x4c7406(0xf6)](_0x5515cd)[_0x4c7406(0x177)]||!x({'schemaVersion':0x1,'formulas':_0x5515cd}))return!0x1;let _0x42dd08=this['_resources'][_0x4c7406(0x104)](_0x30bcac)??b(),_0x2b6d83=_0x942fba[_0x4c7406(0x189)](_0x42dd08);return Object[_0x4c7406(0x15c)](_0x2b6d83[_0x4c7406(0x151)],_0x942fba[_0x4c7406(0x189)](_0x5515cd)),this[_0x4c7406(0x1c7)][_0x4c7406(0x187)](_0x30bcac,_0x2b6d83),this[_0x4c7406(0x10d)][_0x4c7406(0x1a0)]({'unitId':_0x30bcac,'rangeIds':Object[_0x4c7406(0xf6)](_0x5515cd)}),!0x0;}[_0x3074bd(0x19f)](_0x377cae,_0x57fa8a){const _0xfb3ca4=_0x3074bd;if(this['_loadErrors'][_0xfb3ca4(0x1b9)](_0x377cae))return!0x1;let _0x334808=this[_0xfb3ca4(0x1c7)][_0xfb3ca4(0x104)](_0x377cae);if(!(_0x334808!=null&&_0x334808[_0xfb3ca4(0x151)][_0x57fa8a]))return!0x1;let _0xfb75f5=_0x942fba[_0xfb3ca4(0x189)](_0x334808);return delete _0xfb75f5[_0xfb3ca4(0x151)][_0x57fa8a],this[_0xfb3ca4(0x1c7)]['set'](_0x377cae,_0xfb75f5),this[_0xfb3ca4(0x10d)][_0xfb3ca4(0x1a0)]({'unitId':_0x377cae,'rangeIds':[_0x57fa8a]}),!0x0;}['load'](_0x492a87,_0x30478c){const _0x5d90bf=_0x3074bd;return _0x30478c&&typeof _0x30478c==_0x5d90bf(0x195)&&_0x5d90bf(0x102)in _0x30478c&&_0x30478c[_0x5d90bf(0x102)]!==0x1?(this[_0x5d90bf(0xef)](_0x492a87,_0x30478c,_0x5d90bf(0x1cd)),!0x1):x(_0x30478c)?(this[_0x5d90bf(0x1c7)][_0x5d90bf(0x187)](_0x492a87,_0x942fba[_0x5d90bf(0x189)](_0x30478c)),this[_0x5d90bf(0x175)]['delete'](_0x492a87),this[_0x5d90bf(0x16e)][_0x5d90bf(0x1b1)](_0x492a87),this[_0x5d90bf(0x10d)]['next']({'unitId':_0x492a87}),!0x0):(this[_0x5d90bf(0xef)](_0x492a87,_0x30478c,_0x5d90bf(0x19e)),!0x1);}[_0x3074bd(0x124)](_0x4ec572){const _0x1271ac=_0x3074bd;let _0x4758d7=this['_resources'][_0x1271ac(0x104)](_0x4ec572);return _0x4758d7?_0x942fba[_0x1271ac(0x189)](_0x4758d7):this['_rawResources'][_0x1271ac(0x1b9)](_0x4ec572)?_0x942fba[_0x1271ac(0x189)](this[_0x1271ac(0x175)][_0x1271ac(0x104)](_0x4ec572)):b();}[_0x3074bd(0x10a)](_0x105201){const _0x390791=_0x3074bd;return this['_loadErrors'][_0x390791(0x104)](_0x105201);}[_0x3074bd(0x1c9)](_0x353371){const _0x5e8048=_0x3074bd;this[_0x5e8048(0x1c7)][_0x5e8048(0x1b1)](_0x353371),this[_0x5e8048(0x175)][_0x5e8048(0x1b1)](_0x353371),this[_0x5e8048(0x16e)][_0x5e8048(0x1b1)](_0x353371),this[_0x5e8048(0x10d)][_0x5e8048(0x1a0)]({'unitId':_0x353371});}[_0x3074bd(0x145)](){const _0x3b0dd3=_0x3074bd;this['_resources']['clear'](),this['_rawResources'][_0x3b0dd3(0x121)](),this[_0x3b0dd3(0x16e)]['clear'](),this[_0x3b0dd3(0x10d)]['complete'](),super[_0x3b0dd3(0x145)]();}['_preserveInvalid'](_0x1bcbac,_0x595829,_0x3759fd){const _0x5aebf1=_0x3074bd;this[_0x5aebf1(0x1c7)]['delete'](_0x1bcbac),this[_0x5aebf1(0x175)][_0x5aebf1(0x187)](_0x1bcbac,_0x942fba[_0x5aebf1(0x189)](_0x595829)),this['_loadErrors']['set'](_0x1bcbac,_0x3759fd),this[_0x5aebf1(0x10d)][_0x5aebf1(0x1a0)]({'unitId':_0x1bcbac});}};let it=function(_0x37291c){const _0x3b5333=_0x3074bd;return _0x37291c['EMPTY']=_0x3b5333(0x18b),_0x37291c['PENDING']='pending',_0x37291c[_0x3b5333(0x16a)]='success',_0x37291c[_0x3b5333(0x10e)]=_0x3b5333(0x18e),_0x37291c;}({});function F(_0x495bf4,_0x4ce0ae){return function(_0x5bbffe,_0x4f3e7e){_0x4ce0ae(_0x5bbffe,_0x4f3e7e,_0x495bf4);};}function I(_0xf62371,_0x373098,_0x55e3c2,_0x39ae02){const _0x1ac38e=_0x3074bd;var _0x3c4f03=arguments[_0x1ac38e(0x177)],_0xa1db56=_0x3c4f03<0x3?_0x373098:_0x39ae02===null?_0x39ae02=Object[_0x1ac38e(0xe7)](_0x373098,_0x55e3c2):_0x39ae02,_0x18b8e8;if(typeof Reflect==_0x1ac38e(0x195)&&typeof Reflect[_0x1ac38e(0xf5)]==_0x1ac38e(0x11c))_0xa1db56=Reflect[_0x1ac38e(0xf5)](_0xf62371,_0x373098,_0x55e3c2,_0x39ae02);else{for(var _0x13b319=_0xf62371['length']-0x1;_0x13b319>=0x0;_0x13b319--)(_0x18b8e8=_0xf62371[_0x13b319])&&(_0xa1db56=(_0x3c4f03<0x3?_0x18b8e8(_0xa1db56):_0x3c4f03>0x3?_0x18b8e8(_0x373098,_0x55e3c2,_0xa1db56):_0x18b8e8(_0x373098,_0x55e3c2))||_0xa1db56);}return _0x3c4f03>0x3&&_0xa1db56&&Object[_0x1ac38e(0x144)](_0x373098,_0x55e3c2,_0xa1db56),_0xa1db56;}let L=class extends _0x5dc02b{constructor(_0x58126f,_0x55bea2,_0xe0c9c){const _0x1229bb=_0x3074bd;super(),this[_0x1229bb(0x17c)]=_0x58126f,this[_0x1229bb(0x16d)]=_0x55bea2,this[_0x1229bb(0x127)]=_0xe0c9c,N(this,_0x1229bb(0x1c3),new Map()),N(this,_0x1229bb(0x1c6),new Map()),N(this,_0x1229bb(0x1bd),new _0x581576()),N(this,_0x1229bb(0x10b),this[_0x1229bb(0x1bd)][_0x1229bb(0x196)]()),this['disposeWithMe'](this[_0x1229bb(0x16d)][_0x1229bb(0x159)][_0x1229bb(0x12d)](_0x109df7=>{const _0x1fe394=_0x1229bb;for(let _0x3fadf3 of Object[_0x1fe394(0x1d3)](_0x109df7))for(let _0x2bcba6 of Object['values'](_0x3fadf3))_0x2bcba6[_0x1fe394(0x17a)](_0x3d9fd7=>this['_updateFormulaResult'](_0x3d9fd7));}));}[_0x3074bd(0x13c)](_0x3394f7){const _0x5c5884=_0x3074bd;var _0x10a038;let _0xa4d8e1=_0x3394f7['getUnitId'](),_0x102c8e=((_0x10a038=_0x3394f7[_0x5c5884(0x1bc)]()['body'])==null||(_0x10a038=_0x10a038['customRanges'])==null?void 0x0:_0x10a038['filter'](w))??[],_0x1f8c42=this[_0x5c5884(0x17c)][_0x5c5884(0x1df)](_0xa4d8e1),_0x3ebcd1=new Set();for(let _0x2a64f2 of _0x102c8e){let _0x178e27=_0x1f8c42[_0x2a64f2[_0x5c5884(0x1b3)]];_0x178e27&&(_0x3ebcd1[_0x5c5884(0x183)](R(_0xa4d8e1,_0x2a64f2['rangeId'])),this['register']({'unitId':_0xa4d8e1,'rangeId':_0x2a64f2[_0x5c5884(0x1b3)]},_0x178e27));}for(let _0x3cf181 of Array['from'](this[_0x5c5884(0x1c3)][_0x5c5884(0x1d3)]()))_0x3cf181[_0x5c5884(0x1a1)]===_0xa4d8e1&&!_0x3ebcd1[_0x5c5884(0x1b9)](R(_0x3cf181[_0x5c5884(0x1a1)],_0x3cf181[_0x5c5884(0x1b3)]))&&this[_0x5c5884(0x14a)](_0x3cf181);}['register'](_0x2b2aee,_0x4820e4){const _0x3d0e7d=_0x3074bd;let _0x5a73f6=R(_0x2b2aee['unitId'],_0x2b2aee[_0x3d0e7d(0x1b3)]),_0x198639=this['_registrations']['get'](_0x5a73f6),_0x43baa4=this[_0x3d0e7d(0x127)]['getRevision'](_0x2b2aee[_0x3d0e7d(0x1a1)]);if(_0x198639&&_0x198639[_0x3d0e7d(0x1b6)][_0x3d0e7d(0x1ce)]===_0x4820e4[_0x3d0e7d(0x1ce)]&&_0x198639[_0x3d0e7d(0xea)]===_0x43baa4){_0x198639[_0x3d0e7d(0x1b6)]=_0x4820e4;let _0x44a556=_0x198639['formulaId']?this['_registrationService'][_0x3d0e7d(0x173)](_0x198639[_0x3d0e7d(0x1a1)],_0x198639[_0x3d0e7d(0x1a1)],_0x198639['formulaId'])??void 0x0:void 0x0;_0x198639['liveResult']=_0x44a556,this['_setPresentation'](_0x5a73f6,z(_0x4820e4,_0x44a556));return;}_0x198639!=null&&_0x198639[_0x3d0e7d(0x1a8)]&&this[_0x3d0e7d(0x101)](_0x198639);let _0x4e6e50={..._0x2b2aee,'config':_0x4820e4,'referenceRevision':_0x43baa4,'presentation':z(_0x4820e4,void 0x0)};if(this[_0x3d0e7d(0x1c3)][_0x3d0e7d(0x187)](_0x5a73f6,_0x4e6e50),!_0x4820e4[_0x3d0e7d(0x1ce)]['trim']())return;let _0x3eeaca=this[_0x3d0e7d(0x16d)][_0x3d0e7d(0x118)](_0x2b2aee[_0x3d0e7d(0x1a1)],_0x2b2aee[_0x3d0e7d(0x1a1)],_0x4820e4[_0x3d0e7d(0x1ce)],void 0x0,{'rangeId':_0x2b2aee[_0x3d0e7d(0x1b3)]},_0x350834['DOC'],_0x2b2aee[_0x3d0e7d(0x1b3)]);_0x4e6e50['formulaId']=_0x3eeaca,this[_0x3d0e7d(0x1c6)][_0x3d0e7d(0x187)](_0x3eeaca,_0x5a73f6);}[_0x3074bd(0x14a)](_0x4eca57){const _0x3aefc4=_0x3074bd;let _0x41ca30=R(_0x4eca57[_0x3aefc4(0x1a1)],_0x4eca57[_0x3aefc4(0x1b3)]),_0x2228c4=this['_registrations'][_0x3aefc4(0x104)](_0x41ca30);_0x2228c4&&(this[_0x3aefc4(0x101)](_0x2228c4),this['_registrations'][_0x3aefc4(0x1b1)](_0x41ca30));}[_0x3074bd(0x19b)](_0x45d1b5){const _0x2b02c7=_0x3074bd;for(let _0x389206 of Array[_0x2b02c7(0x13f)](this[_0x2b02c7(0x1c3)][_0x2b02c7(0x1d3)]()))_0x389206[_0x2b02c7(0x1a1)]===_0x45d1b5&&this[_0x2b02c7(0x14a)](_0x389206);}['getPresentation'](_0x191f9a){const _0x3295f8=_0x3074bd;var _0x48cbc7;return(_0x48cbc7=this[_0x3295f8(0x1c3)]['get'](R(_0x191f9a[_0x3295f8(0x1a1)],_0x191f9a[_0x3295f8(0x1b3)])))==null?void 0x0:_0x48cbc7[_0x3295f8(0x143)];}[_0x3074bd(0x10f)](_0x181c23){const _0x13c798=_0x3074bd;let _0x16b260=this[_0x13c798(0x1c3)]['get'](R(_0x181c23[_0x13c798(0x1a1)],_0x181c23['rangeId']));return _0x16b260?B(_0x16b260):void 0x0;}[_0x3074bd(0x1c8)](){const _0x20556f=_0x3074bd;return Array['from'](this[_0x20556f(0x1c3)][_0x20556f(0x1d3)](),_0x3abd24=>({'identity':{'unitId':_0x3abd24[_0x20556f(0x1a1)],'rangeId':_0x3abd24[_0x20556f(0x1b3)]},'config':_0x3abd24[_0x20556f(0x1b6)],'referenceRevision':_0x3abd24['referenceRevision'],..._0x3abd24['liveResult']?{'liveResult':_0x3abd24[_0x20556f(0x1d8)]}:null}));}['dispose'](){const _0x1e7ca0=_0x3074bd;for(let _0x30ba54 of this[_0x1e7ca0(0x1c3)][_0x1e7ca0(0x1d3)]())this[_0x1e7ca0(0x101)](_0x30ba54);this[_0x1e7ca0(0x1c3)][_0x1e7ca0(0x121)](),this[_0x1e7ca0(0x1c6)][_0x1e7ca0(0x121)](),this[_0x1e7ca0(0x1bd)][_0x1e7ca0(0x120)](),super[_0x1e7ca0(0x145)]();}[_0x3074bd(0x137)](_0x1dec87){const _0x63c0c0=_0x3074bd;let _0x1ce3b0=this[_0x63c0c0(0x1c6)][_0x63c0c0(0x104)](_0x1dec87[_0x63c0c0(0x1a8)]),_0x4a92ff=_0x1ce3b0?this[_0x63c0c0(0x1c3)]['get'](_0x1ce3b0):void 0x0;_0x1ce3b0&&_0x4a92ff&&(_0x4a92ff[_0x63c0c0(0x1d8)]=_0x1dec87,this[_0x63c0c0(0x112)](_0x1ce3b0,z(_0x4a92ff[_0x63c0c0(0x1b6)],_0x1dec87)));}[_0x3074bd(0x112)](_0x5df354,_0x3ea006){const _0x3c6296=_0x3074bd;var _0x53f4fa,_0x5bb6e9;let _0x4311d9=this[_0x3c6296(0x1c3)]['get'](_0x5df354);if(!_0x4311d9||at(_0x4311d9[_0x3c6296(0x143)],_0x3ea006))return;let _0x24d2a3=_0x4311d9['presentation'],_0x197c6a=B(_0x4311d9);_0x4311d9['presentation']=_0x3ea006,this['_presentationChanged$'][_0x3c6296(0x1a0)]({'unitId':_0x4311d9['unitId'],'rangeId':_0x4311d9[_0x3c6296(0x1b3)],'presentation':_0x3ea006,'previousPresentation':_0x24d2a3,'result':B(_0x4311d9),'previousResult':{..._0x197c6a,..._0x24d2a3,'value':(_0x53f4fa=_0x24d2a3[_0x3c6296(0x106)])==null?void 0x0:_0x53f4fa['v'],'valueType':((_0x5bb6e9=_0x24d2a3[_0x3c6296(0x106)])==null?void 0x0:_0x5bb6e9['t'])??void 0x0}});}[_0x3074bd(0x101)](_0xbb3d18){const _0x13bd5b=_0x3074bd;_0xbb3d18[_0x13bd5b(0x1a8)]&&(this[_0x13bd5b(0x16d)][_0x13bd5b(0x15b)](_0xbb3d18[_0x13bd5b(0x1a1)],_0xbb3d18[_0x13bd5b(0x1a1)],[_0xbb3d18[_0x13bd5b(0x1a8)]]),this[_0x13bd5b(0x1c6)][_0x13bd5b(0x1b1)](_0xbb3d18[_0x13bd5b(0x1a8)]));}};L=I([F(0x0,_0x34e393(P)),F(0x1,_0x34e393(_0x3391af)),F(0x2,_0x34e393(_0x51c26f))],L);function R(_0x391ef6,_0x2fee02){return _0x391ef6+'\x00'+_0x2fee02;}function z(_0x12c868,_0x418d32){const _0x1e5454=_0x3074bd;return _0x43dcf8({'numberFormat':_0x12c868[_0x1e5454(0x1ba)],'lastValue':_0x12c868['lastValue'],'result':_0x418d32});}function B(_0xd9619){const _0x4c9c04=_0x3074bd;var _0x2c4a0f,_0x3b4dee,_0x80a505;let _0x1b602b=_0xd9619[_0x4c9c04(0x143)],_0x212be7=_0xd9619[_0x4c9c04(0x1b6)][_0x4c9c04(0x1ce)][_0x4c9c04(0x1b2)]()?_0x1b602b[_0x4c9c04(0x1c4)]||_0x1b602b[_0x4c9c04(0x106)]==null?'pending':((_0x2c4a0f=_0xd9619['liveResult'])==null?void 0x0:_0x2c4a0f[_0x4c9c04(0xfe)])===_0x11c47e[_0x4c9c04(0x10e)]?_0x4c9c04(0x18e):_0x4c9c04(0xf8):_0x4c9c04(0x18b);return{..._0x1b602b,'status':_0x212be7,'value':(_0x3b4dee=_0x1b602b[_0x4c9c04(0x106)])==null?void 0x0:_0x3b4dee['v'],'valueType':((_0x80a505=_0x1b602b['cell'])==null?void 0x0:_0x80a505['t'])??void 0x0};}function at(_0x472185,_0xb33955){const _0x5d825e=_0x3074bd;var _0x5acd3b,_0x22566c,_0x54eada,_0x273188;return _0x472185[_0x5d825e(0x18c)]===_0xb33955[_0x5d825e(0x18c)]&&_0x472185[_0x5d825e(0x169)]===_0xb33955[_0x5d825e(0x169)]&&_0x472185['pattern']===_0xb33955[_0x5d825e(0x128)]&&_0x472185['source']===_0xb33955[_0x5d825e(0x156)]&&_0x472185[_0x5d825e(0x1c4)]===_0xb33955[_0x5d825e(0x1c4)]&&((_0x5acd3b=_0x472185[_0x5d825e(0x106)])==null?void 0x0:_0x5acd3b['t'])===((_0x22566c=_0xb33955[_0x5d825e(0x106)])==null?void 0x0:_0x22566c['t'])&&Object['is']((_0x54eada=_0x472185[_0x5d825e(0x106)])==null?void 0x0:_0x54eada['v'],(_0x273188=_0xb33955['cell'])==null?void 0x0:_0x273188['v']);}const ot={'id':'docs-formula.mutation.set-formula','type':_0x49f619[_0x3074bd(0x1a6)],'handler':(_0x126a4f,_0x18d94e)=>!(_0x18d94e!=null&&_0x18d94e['unitId'])||!_0x18d94e['rangeId']||!_0x18d94e['config']?!0x1:_0x126a4f['get'](P)[_0x3074bd(0x132)](_0x18d94e[_0x3074bd(0x1a1)],_0x18d94e['rangeId'],_0x18d94e['config'])},st={'id':_0x3074bd(0x1a2),'type':_0x49f619[_0x3074bd(0x1a6)],'handler':(_0x40f165,_0x228941)=>!(_0x228941!=null&&_0x228941['unitId'])||!_0x228941[_0x3074bd(0x1b3)]?!0x1:_0x40f165['get'](P)[_0x3074bd(0x19f)](_0x228941[_0x3074bd(0x1a1)],_0x228941[_0x3074bd(0x1b3)])},V={'id':_0x3074bd(0x108),'type':_0x49f619['MUTATION'],'handler':(_0x254588,_0x5d91b4)=>!(_0x5d91b4!=null&&_0x5d91b4[_0x3074bd(0x1a1)])||!_0x5d91b4[_0x3074bd(0x19d)]?!0x1:_0x254588[_0x3074bd(0x104)](P)[_0x3074bd(0x171)](_0x5d91b4['unitId'],_0x5d91b4[_0x3074bd(0x19d)])},H={'id':_0x3074bd(0x111),'type':_0x49f619[_0x3074bd(0x1a6)],'handler':(_0x1d3b74,_0x465571)=>{const _0x146a8a=_0x3074bd;if(!(_0x465571!=null&&_0x465571['unitId'])||!_0x465571['updates'][_0x146a8a(0x177)])return!0x1;let _0x1f1955=_0x1d3b74[_0x146a8a(0x104)](P),_0x3e564c=_0x1d3b74[_0x146a8a(0x104)](_0x51c26f),_0xd5841b=_0x1f1955[_0x146a8a(0x185)](_0x465571[_0x146a8a(0x1a1)]);if(!_0xd5841b)return!0x1;let _0x2c99ad=_0x942fba[_0x146a8a(0x189)](_0xd5841b),_0x2c3837=!0x1;for(let _0x2258cd of _0x465571[_0x146a8a(0xf7)]){var _0x13f328,_0x596f82,_0x2988db,_0x5eb532;let _0x254d24=_0x2c99ad['formulas'][_0x2258cd[_0x146a8a(0x1b3)]];_0x254d24&&_0x254d24[_0x146a8a(0x1ce)]===_0x2258cd['expectedFormula']&&((_0x13f328=_0x254d24[_0x146a8a(0x1ba)])==null?void 0x0:_0x13f328[_0x146a8a(0x128)])===_0x2258cd[_0x146a8a(0x12c)]&&_0x3e564c[_0x146a8a(0x19c)](_0x465571[_0x146a8a(0x1a1)])===_0x2258cd[_0x146a8a(0x15e)]&&(((_0x596f82=_0x254d24[_0x146a8a(0x13e)])==null?void 0x0:_0x596f82['v'])!==_0x2258cd['lastValue']['v']||((_0x2988db=_0x254d24[_0x146a8a(0x13e)])==null?void 0x0:_0x2988db['t'])!==_0x2258cd[_0x146a8a(0x13e)]['t']||((_0x5eb532=_0x254d24['lastValue'])==null?void 0x0:_0x5eb532['pattern'])!==_0x2258cd[_0x146a8a(0x13e)][_0x146a8a(0x128)])&&(_0x254d24['lastValue']=_0x942fba[_0x146a8a(0x189)](_0x2258cd['lastValue']),_0x2c3837=!0x0);}return!_0x2c3837||_0x1f1955['setResource'](_0x465571['unitId'],_0x2c99ad);}},U={'id':_0x3074bd(0x17d),'type':_0x49f619[_0x3074bd(0x158)],'handler':(_0x2099cb,_0x491dd7)=>{const _0x4d5241=_0x3074bd;if(!(_0x491dd7!=null&&_0x491dd7[_0x4d5241(0x1ce)][_0x4d5241(0x1b2)]()))return!0x1;let _0x34cf8b=q(_0x2099cb,_0x491dd7[_0x4d5241(0x1a1)],'');if(!_0x34cf8b)return!0x1;let _0x2b079b=ft(_0x491dd7[_0x4d5241(0x1bb)],_0x34cf8b[_0x4d5241(0x11f)],dt(_0x2099cb,_0x34cf8b[_0x4d5241(0x1a1)]));if(!_0x2b079b)return!0x1;let _0x53d61f=pt(_0x2099cb,_0x34cf8b[_0x4d5241(0x1a1)],_0x491dd7[_0x4d5241(0x1ce)],_0x491dd7[_0x4d5241(0x147)]??[]);if(!_0x53d61f)return!0x1;let _0xe9f69b=mt(_0x34cf8b[_0x4d5241(0x11f)],_0x34cf8b['model'],_0x34cf8b['unitId']),_0x1ff475=ht({'documentData':_0x34cf8b[_0x4d5241(0x194)],'resource':_0x34cf8b['resource'],'rangeId':_0xe9f69b,'config':{'formula':_0x491dd7['formula'],..._0x491dd7[_0x4d5241(0x1ba)]?{'numberFormat':_0x491dd7['numberFormat']}:null},'startOffset':_0x2b079b['startOffset'],'endOffset':_0x2b079b[_0x4d5241(0x172)]});if(!_0x1ff475)return!0x1;let _0x157f73=_0x4bd97f(_0x2099cb,_0x34cf8b['unitId'],_0x53d61f);return!_0x157f73||!J({'accessor':_0x2099cb,'document':_0x34cf8b[_0x4d5241(0xf1)],'unitId':_0x34cf8b[_0x4d5241(0x1a1)],'trigger':U['id'],'rangeId':_0xe9f69b,'previousResource':_0x34cf8b[_0x4d5241(0x19d)],'nextResource':_0x1ff475['nextResource'],'previousDocumentData':_0x34cf8b[_0x4d5241(0x194)],'nextDocumentData':_0x1ff475[_0x4d5241(0x1d0)],'cursorOffset':_0x1ff475['cursorOffset'],'externalMutations':_0x157f73})?!0x1:{'rangeId':_0xe9f69b,'startOffset':_0x1ff475['cursorOffset']-0x1,'endOffset':_0x1ff475['cursorOffset']};}},W={'id':_0x3074bd(0xff),'type':_0x49f619[_0x3074bd(0x158)],'handler':(_0x41d3ca,_0x1f074a)=>{const _0x108922=_0x3074bd;if(!(_0x1f074a!=null&&_0x1f074a['rangeId'])||!_0x1f074a[_0x108922(0x1ce)][_0x108922(0x1b2)]())return!0x1;let _0x4f6756=q(_0x41d3ca,_0x1f074a[_0x108922(0x1a1)],''),_0x428f0f=_0x4f6756==null?void 0x0:_0x4f6756[_0x108922(0x1af)]['getFormula'](_0x4f6756[_0x108922(0x1a1)],_0x1f074a['rangeId']),_0x464d76=_0x4f6756?T(_0x4f6756[_0x108922(0x194)][_0x108922(0x11f)],_0x1f074a[_0x108922(0x1b3)]):void 0x0;if(!_0x4f6756||!_0x428f0f||!_0x464d76)return!0x1;let _0x25d714=pt(_0x41d3ca,_0x4f6756[_0x108922(0x1a1)],_0x1f074a['formula'],_0x1f074a[_0x108922(0x147)]??[]);if(!_0x25d714)return!0x1;let _0x2ab4b4=_0x4bd97f(_0x41d3ca,_0x4f6756['unitId'],_0x25d714);if(!_0x2ab4b4)return!0x1;let _0x4c5f00=Ct(_0x4f6756[_0x108922(0x19d)]);return _0x4c5f00[_0x108922(0x151)][_0x1f074a['rangeId']]={'formula':_0x1f074a[_0x108922(0x1ce)],..._0x1f074a['numberFormat']?{'numberFormat':_0x1f074a[_0x108922(0x1ba)]}:_0x428f0f['numberFormat']?{'numberFormat':_0x428f0f[_0x108922(0x1ba)]}:null},J({'accessor':_0x41d3ca,'document':_0x4f6756[_0x108922(0xf1)],'unitId':_0x4f6756['unitId'],'trigger':W['id'],'rangeId':_0x1f074a[_0x108922(0x1b3)],'previousResource':_0x4f6756['resource'],'nextResource':_0x4c5f00,'cursorOffset':_0x464d76['endIndex']+0x1,'externalMutations':_0x2ab4b4});}},G={'id':_0x3074bd(0x1a3),'type':_0x49f619[_0x3074bd(0x158)],'handler':(_0x397733,_0x2e5413)=>{const _0x1f0046=_0x3074bd;if(!(_0x2e5413!=null&&_0x2e5413[_0x1f0046(0x1b3)]))return!0x1;let _0xed3c6d=q(_0x397733,_0x2e5413[_0x1f0046(0x1a1)],''),_0x3955b4=_0xed3c6d==null?void 0x0:_0xed3c6d[_0x1f0046(0x1af)][_0x1f0046(0x1b8)](_0xed3c6d[_0x1f0046(0x1a1)],_0x2e5413['rangeId']),_0x19a39e=_0xed3c6d?T(_0xed3c6d['documentData'][_0x1f0046(0x11f)],_0x2e5413[_0x1f0046(0x1b3)]):void 0x0;if(!_0xed3c6d||!_0x3955b4||!_0x19a39e)return!0x1;let _0x4006cd=Ct(_0xed3c6d[_0x1f0046(0x19d)]);return _0x4006cd[_0x1f0046(0x151)][_0x2e5413[_0x1f0046(0x1b3)]]={..._0x3955b4,..._0x2e5413[_0x1f0046(0x1ba)]?{'numberFormat':_0x2e5413[_0x1f0046(0x1ba)]}:null},_0x2e5413[_0x1f0046(0x1ba)]||delete _0x4006cd[_0x1f0046(0x151)][_0x2e5413[_0x1f0046(0x1b3)]]['numberFormat'],J({'accessor':_0x397733,'document':_0xed3c6d[_0x1f0046(0xf1)],'unitId':_0xed3c6d[_0x1f0046(0x1a1)],'trigger':G['id'],'rangeId':_0x2e5413['rangeId'],'previousResource':_0xed3c6d['resource'],'nextResource':_0x4006cd,'cursorOffset':_0x19a39e[_0x1f0046(0xf2)]+0x1,'externalMutations':{}});}},K={'id':'docs-formula.command.remove','type':_0x49f619[_0x3074bd(0x158)],'handler':(_0xd5e60c,_0x18ef04)=>ut(_0xd5e60c,_0x18ef04,'',K['id'])},ct={'id':'docs-formula.command.replace-with-text','type':_0x49f619[_0x3074bd(0x158)],'handler':(_0x533af6,_0x574a35)=>ut(_0x533af6,_0x574a35,(_0x574a35==null?void 0x0:_0x574a35[_0x3074bd(0x18c)])??'',ct['id'])},lt={'id':_0x3074bd(0x131),'type':_0x49f619[_0x3074bd(0x158)],'handler':(_0x2661fa,_0x1146fd)=>{const _0x408a17=_0x3074bd;if(!(_0x1146fd!=null&&_0x1146fd[_0x408a17(0x1b3)]))return!0x1;let _0x37fe51=q(_0x2661fa,_0x1146fd[_0x408a17(0x1a1)],'');if(!_0x37fe51)return!0x1;let _0x3bd7c8=_0x2661fa[_0x408a17(0x104)](L)[_0x408a17(0x10f)]({'unitId':_0x37fe51['unitId'],'rangeId':_0x1146fd[_0x408a17(0x1b3)]});return _0x3bd7c8?ut(_0x2661fa,_0x1146fd,_0x3bd7c8[_0x408a17(0x18c)],lt['id']):!0x1;}};function ut(_0x57669c,_0x426beb,_0x46c36e,_0x5b69e7){const _0x107cde=_0x3074bd;if(!(_0x426beb!=null&&_0x426beb[_0x107cde(0x1b3)]))return!0x1;let _0x451971=q(_0x57669c,_0x426beb['unitId'],'');if(!_0x451971)return!0x1;let _0x496c65=Be({'documentData':_0x451971[_0x107cde(0x194)],'resource':_0x451971[_0x107cde(0x19d)],'rangeId':_0x426beb['rangeId'],'text':_0x46c36e});return _0x496c65?J({'accessor':_0x57669c,'document':_0x451971[_0x107cde(0xf1)],'unitId':_0x451971[_0x107cde(0x1a1)],'trigger':_0x5b69e7,'rangeId':_0x426beb[_0x107cde(0x1b3)],'previousResource':_0x451971['resource'],'nextResource':_0x496c65[_0x107cde(0x1d9)],'previousDocumentData':_0x451971[_0x107cde(0x194)],'nextDocumentData':_0x496c65[_0x107cde(0x1d0)],'cursorOffset':_0x496c65[_0x107cde(0xeb)],'externalMutations':{}}):!0x1;}function q(_0x81bb81,_0xb336e3,_0x35c32f){const _0x4545cf=_0x3074bd;if(_0x35c32f)return null;let _0x31f8f3=_0x81bb81[_0x4545cf(0x104)](_0x5a1b75),_0x24fbd=(_0xb336e3?_0x31f8f3['getUnit'](_0xb336e3,_0x56d504[_0x4545cf(0x14f)]):_0x31f8f3[_0x4545cf(0x14b)](_0x56d504[_0x4545cf(0x14f)]))??null;if(!_0x24fbd)return null;let _0x5462dc=_0x24fbd['getSnapshot'](),_0x143f05=_0x5462dc[_0x4545cf(0x11f)];if(_0x5462dc[_0x4545cf(0x140)]||!_0x143f05)return null;let _0x5e2a42=_0x81bb81['get'](P);return _0x5e2a42[_0x4545cf(0x10a)](_0x24fbd['getUnitId']())?null:{'document':_0x24fbd,'body':_0x143f05,'documentData':_0x5462dc,'model':_0x5e2a42,'resource':_0x5e2a42[_0x4545cf(0x185)](_0x24fbd[_0x4545cf(0x113)]())??b(),'unitId':_0x24fbd[_0x4545cf(0x113)]()};}function dt(_0x46af4f,_0x326fd3){const _0x496760=_0x3074bd;var _0xbad62c;return(_0xbad62c=_0x46af4f[_0x496760(0x104)](_0x2711a1)[_0x496760(0x1dd)]({'subUnitId':_0x326fd3,'unitId':_0x326fd3}))==null?void 0x0:_0xbad62c[0x0];}function ft(_0x4f47a5,_0x1fc99e,_0x4d2a6c){const _0x2cea14=_0x3074bd;if((_0x4f47a5==null?void 0x0:_0x4f47a5['type'])==='paragraph'){var _0x1b82cd;let _0x3dffa4=((_0x1b82cd=_0x1fc99e[_0x2cea14(0x12b)])==null?void 0x0:_0x1b82cd[_0x2cea14(0x180)](_0x5ba3b2=>_0x5ba3b2[_0x2cea14(0x114)]===_0x4f47a5['paragraphId']))??[];if(_0x3dffa4[_0x2cea14(0x177)]!==0x1)return null;let _0x43a12f=_0x3dffa4[0x0],_0x24ce83=_0x403d2a(_0x1fc99e,_0x43a12f),_0x3c0f55=_0x43a12f[_0x2cea14(0x1ab)]-_0x24ce83,_0x570667=_0x4f47a5[_0x2cea14(0x19a)]==='end'?_0x3c0f55:_0x4f47a5[_0x2cea14(0x19a)];if(!Number['isInteger'](_0x570667)||_0x570667<0x0||_0x570667>_0x3c0f55)return null;let _0x39a125=_0x24ce83+_0x570667;return{'startOffset':_0x39a125,'endOffset':_0x39a125};}if((_0x4f47a5==null?void 0x0:_0x4f47a5[_0x2cea14(0x153)])===_0x2cea14(0x12a))return!Number['isInteger'](_0x4f47a5[_0x2cea14(0x15d)])||!Number[_0x2cea14(0x18d)](_0x4f47a5['endOffset'])?null:{'startOffset':Math[_0x2cea14(0x15f)](_0x4f47a5['startOffset'],_0x4f47a5[_0x2cea14(0x172)]),'endOffset':Math['max'](_0x4f47a5['startOffset'],_0x4f47a5[_0x2cea14(0x172)])};let _0x3ca6bf=(_0x4f47a5==null?void 0x0:_0x4f47a5['type'])===_0x2cea14(0x134)?_0x4f47a5['selection']:_0x4d2a6c;return!_0x3ca6bf||_0x3ca6bf[_0x2cea14(0x18a)]?null:{'startOffset':Math[_0x2cea14(0x15f)](_0x3ca6bf['startOffset'],_0x3ca6bf[_0x2cea14(0x172)]),'endOffset':Math[_0x2cea14(0x1cb)](_0x3ca6bf[_0x2cea14(0x15d)],_0x3ca6bf[_0x2cea14(0x172)])};}function pt(_0x10caae,_0x3935ad,_0x37674e,_0x419cce){const _0x5e4776=_0x3074bd;let _0x457b88=_0x10caae[_0x5e4776(0x104)](_0x3874f6),_0x38d283=_0x37674e['startsWith']('=')?_0x37674e[_0x5e4776(0x178)](0x1):_0x37674e,_0x476613=_0x457b88[_0x5e4776(0x142)](_0x38d283);if(!_0x476613)return null;let _0x3e0a6e=_0x10caae[_0x5e4776(0x104)](_0x51c26f),_0x22cd0c=_0x26b6bd({'qualifiers':_0x239d3f(_0x476613),'explicitReferences':_0x419cce??[],'resolveBinding':_0x844b7=>_0x3e0a6e['resolveBinding'](_0x3935ad,_0x844b7)});return _0x22cd0c[_0x5e4776(0xfe)]===_0x5e4776(0x1ca)?_0x22cd0c[_0x5e4776(0x170)]:null;}function mt(_0x83caec,_0x384e6c,_0x5b9ff5){const _0x566c39=_0x3074bd;var _0x9603d9;let _0x2e50bc=_0x260a9d(0x6);for(;_0x83caec!=null&&(_0x9603d9=_0x83caec[_0x566c39(0x122)])!=null&&_0x9603d9[_0x566c39(0x17b)](_0x3d0a4f=>_0x3d0a4f[_0x566c39(0x1b3)]===_0x2e50bc)||_0x384e6c[_0x566c39(0x1b8)](_0x5b9ff5,_0x2e50bc);)_0x2e50bc=_0x260a9d(0x6);return _0x2e50bc;}function ht(_0x4d03db){try{return Re(_0x4d03db);}catch(_0x58b084){if(_0x58b084 instanceof C)return null;throw _0x58b084;}}function gt(_0x4fb62f){const _0x30b63e=_0x3074bd;let _0x16e6b7=_0x4fb62f[_0x30b63e(0x14d)]&&_0x4fb62f['nextDocumentData']?vt(_0x4fb62f[_0x30b63e(0xf1)],_0x4fb62f['unitId'],_0x4fb62f['previousDocumentData'],_0x4fb62f['nextDocumentData'],_0x4fb62f[_0x30b63e(0xeb)],_0x4fb62f[_0x30b63e(0x15a)]):null;return _0x4fb62f[_0x30b63e(0x14d)]&&_0x4fb62f[_0x30b63e(0x1d0)]&&!_0x16e6b7?null:{'documentRedo':_0x16e6b7,'resourceRedo':{'id':V['id'],'params':{'unitId':_0x4fb62f[_0x30b63e(0x1a1)],'resource':_0x4fb62f[_0x30b63e(0x1d9)]}},'resourceUndo':{'id':V['id'],'params':{'unitId':_0x4fb62f[_0x30b63e(0x1a1)],'resource':_0x4fb62f['previousResource']}}};}function _t(_0xa67574,_0x2ce36d,_0x572fd1,_0x49766a){const _0x3871f8=_0x3074bd;_0x49766a['pushUndoRedo']({'id':_0xa67574['trigger']+':'+_0xa67574[_0x3871f8(0x1b3)],'unitID':_0xa67574[_0x3871f8(0x1a1)],'redoMutations':[..._0xa67574[_0x3871f8(0x12f)][_0x3871f8(0x1c1)]?[_0xa67574[_0x3871f8(0x12f)][_0x3871f8(0x1c1)]]:[],..._0x2ce36d['documentRedo']?[_0x2ce36d['documentRedo']]:[],_0x2ce36d['resourceRedo']],'undoMutations':[_0x2ce36d[_0x3871f8(0x11b)],..._0x572fd1?[_0x572fd1]:[],..._0xa67574[_0x3871f8(0x12f)][_0x3871f8(0x123)]?[_0xa67574[_0x3871f8(0x12f)]['undoMutation']]:[]]});}function J(_0x407de1){const _0x207627=_0x3074bd;let _0x2b1462=_0x407de1['accessor']['get'](_0x78f14b),_0x2203e3=_0x407de1['accessor'][_0x207627(0x104)](_0x3e3a50),_0x1fa48b=_0x407de1[_0x207627(0x139)]['get'](_0x2711a1),_0x1b7eb4=gt(_0x407de1);if(!_0x1b7eb4)return!0x1;let _0x32f231=!0x1,_0x15d24a=null,_0x1ad0c9=!0x1;try{if(_0x407de1['externalMutations'][_0x207627(0x1c1)]){if(!_0x2b1462[_0x207627(0x1ad)](_0x407de1[_0x207627(0x12f)][_0x207627(0x1c1)]['id'],_0x407de1[_0x207627(0x12f)][_0x207627(0x1c1)][_0x207627(0x117)]))return!0x1;_0x32f231=!0x0;}if(_0x1b7eb4[_0x207627(0x17f)]){let _0x563b0c=_0x2b1462['syncExecuteCommand'](_0x1b7eb4[_0x207627(0x17f)]['id'],_0x1b7eb4[_0x207627(0x17f)]['params']);if(!_0x563b0c)return bt(_0x2b1462,_0x407de1['externalMutations'],_0x32f231),!0x1;_0x15d24a={'id':_0x40b755['id'],'params':{..._0x563b0c,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0x2b1462[_0x207627(0x1ad)](_0x1b7eb4[_0x207627(0x163)]['id'],_0x1b7eb4[_0x207627(0x163)][_0x207627(0x117)]))return yt(_0x2b1462,_0x15d24a),bt(_0x2b1462,_0x407de1[_0x207627(0x12f)],_0x32f231),!0x1;_0x1ad0c9=!0x0,_t(_0x407de1,_0x1b7eb4,_0x15d24a,_0x2203e3);}catch(_0x3d803b){throw _0x1ad0c9&&_0x2b1462[_0x207627(0x1ad)](_0x1b7eb4['resourceUndo']['id'],_0x1b7eb4['resourceUndo'][_0x207627(0x117)]),yt(_0x2b1462,_0x15d24a),bt(_0x2b1462,_0x407de1[_0x207627(0x12f)],_0x32f231),_0x3d803b;}return _0x1fa48b[_0x207627(0x1de)]([{'startOffset':_0x407de1['cursorOffset'],'endOffset':_0x407de1[_0x207627(0xeb)],'segmentId':''}],{'unitId':_0x407de1[_0x207627(0x1a1)],'subUnitId':_0x407de1[_0x207627(0x1a1)]},!0x1,{[_0x169a9f]:!0x0}),!0x0;}function vt(_0xdcaadd,_0x1db5fd,_0xc294ac,_0x4197aa,_0x253379,_0x71cfb0){let _0x602615=xt(_0xc294ac,_0x4197aa,_0x1d4096(_0xdcaadd,''));return _0x602615?{'id':_0x40b755['id'],'params':{'unitId':_0x1db5fd,'actions':_0x602615,'segmentId':'','textRanges':[{'startOffset':_0x253379,'endOffset':_0x253379,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0x71cfb0}}:null;}function yt(_0x201721,_0x429785){const _0x1a19f5=_0x3074bd;_0x429785&&_0x201721[_0x1a19f5(0x1ad)](_0x429785['id'],_0x429785[_0x1a19f5(0x117)]);}function bt(_0x311c67,_0x1b9aca,_0x270378){const _0x1c3e39=_0x3074bd;_0x270378&&_0x1b9aca[_0x1c3e39(0x123)]&&_0x311c67['syncExecuteCommand'](_0x1b9aca[_0x1c3e39(0x123)]['id'],_0x1b9aca['undoMutation'][_0x1c3e39(0x117)]);}function xt(_0xe9087c,_0x4f094c,_0x44e2f4){const _0x54969c=_0x3074bd;let _0x328d2c=_0xe9087c[_0x54969c(0x11f)],_0x247632=_0x4f094c[_0x54969c(0x11f)],_0x4fb0a9=St(_0x328d2c==null?void 0x0:_0x328d2c[_0x54969c(0x1d5)],_0x247632==null?void 0x0:_0x247632[_0x54969c(0x1d5)]);if(!_0x4fb0a9||!_0x247632)return null;let _0x1097ce=new _0x1b1246();return _0x1097ce[_0x54969c(0x168)](_0x4fb0a9['start']),_0x4fb0a9[_0x54969c(0xf9)]>0x0&&_0x1097ce[_0x54969c(0x105)](_0x4fb0a9[_0x54969c(0xf9)],_0x27439c(_0x247632,_0x4fb0a9['start'],_0x4fb0a9['start']+_0x4fb0a9[_0x54969c(0xf9)],!0x1)),_0x4fb0a9[_0x54969c(0x1ae)]>0x0&&_0x1097ce[_0x54969c(0x1b1)](_0x4fb0a9[_0x54969c(0x1ae)]),_0x4ed544[_0x54969c(0x150)]()['editOp'](_0x1097ce[_0x54969c(0x124)](),_0x44e2f4);}function St(_0x407080,_0x48f6f5){const _0x2ba6e9=_0x3074bd;if(_0x407080==null||_0x48f6f5==null||_0x407080===_0x48f6f5)return null;let _0x55743a=0x0;for(;_0x55743a<_0x407080['length']&&_0x55743a<_0x48f6f5[_0x2ba6e9(0x177)]&&_0x407080[_0x55743a]===_0x48f6f5[_0x55743a];)_0x55743a+=0x1;let _0x4dde57=_0x407080[_0x2ba6e9(0x177)],_0x5356f7=_0x48f6f5[_0x2ba6e9(0x177)];for(;_0x4dde57>_0x55743a&&_0x5356f7>_0x55743a&&_0x407080[_0x4dde57-0x1]===_0x48f6f5[_0x5356f7-0x1];)--_0x4dde57,--_0x5356f7;return{'start':_0x55743a,'deleteLength':_0x4dde57-_0x55743a,'insertLength':_0x5356f7-_0x55743a};}function Ct(_0x266bea){const _0x2ca54b=_0x3074bd;return{'schemaVersion':0x1,'formulas':Object[_0x2ca54b(0xec)](Object[_0x2ca54b(0x1e1)](_0x266bea['formulas'])[_0x2ca54b(0xfd)](([_0x3c5300,_0x2f3f57])=>[_0x3c5300,{..._0x2f3f57,..._0x2f3f57['numberFormat']?{'numberFormat':{..._0x2f3f57[_0x2ca54b(0x1ba)]}}:null,..._0x2f3f57[_0x2ca54b(0x13e)]?{'lastValue':{..._0x2f3f57['lastValue']}}:null}]))};}let Y=class extends _0x5dc02b{constructor(_0x51c4c4,_0x4a6557,_0x137d5b,_0x3874a8){const _0x42b5fd=_0x3074bd;super(),this['_instanceService']=_0x51c4c4,this[_0x42b5fd(0x16f)]=_0x4a6557,this[_0x42b5fd(0x17c)]=_0x137d5b,this[_0x42b5fd(0x192)]=_0x3874a8,N(this,'_pendingUnitIds',new Set()),N(this,_0x42b5fd(0x115),!0x1),N(this,_0x42b5fd(0x179),!0x1),this[_0x42b5fd(0x13d)]['getAllUnitsForType'](_0x56d504[_0x42b5fd(0x14f)])[_0x42b5fd(0x17a)](_0x4898aa=>this[_0x42b5fd(0x192)][_0x42b5fd(0x13c)](_0x4898aa)),this['disposeWithMe'](this['_model'][_0x42b5fd(0x152)]['subscribe'](({unitId:_0x50752d})=>this[_0x42b5fd(0x181)](_0x50752d))),this[_0x42b5fd(0x1db)](this[_0x42b5fd(0x13d)][_0x42b5fd(0x1dc)][_0x42b5fd(0x12d)](({unit:_0x11a544})=>{const _0x4bea6d=_0x42b5fd;_0x11a544[_0x4bea6d(0x153)]===_0x56d504[_0x4bea6d(0x14f)]&&this[_0x4bea6d(0x190)](_0x11a544[_0x4bea6d(0x113)]());})),this[_0x42b5fd(0x1db)](this[_0x42b5fd(0x13d)]['unitDisposed$'][_0x42b5fd(0x12d)](_0x43c2f7=>{const _0x16fbf6=_0x42b5fd;this['_service'][_0x16fbf6(0x19b)](_0x43c2f7[_0x16fbf6(0x113)]());})),this['disposeWithMe'](this[_0x42b5fd(0x16f)][_0x42b5fd(0x1da)](_0x1299d7=>{const _0xb05ac0=_0x42b5fd;if(_0x1299d7['id']===_0x40b755['id']&&wt(_0x1299d7[_0xb05ac0(0x117)])){let _0x161e5c=_0x1299d7[_0xb05ac0(0x117)];_0x161e5c[_0xb05ac0(0x18a)]||this['_syncUnit'](_0x161e5c[_0xb05ac0(0x1a1)]);}}));}['dispose'](){const _0x2a7cd1=_0x3074bd;this[_0x2a7cd1(0x179)]=!0x0,super[_0x2a7cd1(0x145)]();}[_0x3074bd(0x190)](_0x5da4f2){const _0x200252=_0x3074bd;this['_pendingUnitIds'][_0x200252(0x183)](_0x5da4f2),!this[_0x200252(0x115)]&&(this[_0x200252(0x115)]=!0x0,queueMicrotask(()=>{const _0x2592aa=_0x200252;if(this[_0x2592aa(0x115)]=!0x1,this[_0x2592aa(0x179)])return;let _0x5082e5=Array[_0x2592aa(0x13f)](this[_0x2592aa(0x157)]);this[_0x2592aa(0x157)][_0x2592aa(0x121)](),_0x5082e5['forEach'](_0x577885=>this[_0x2592aa(0x181)](_0x577885));}));}[_0x3074bd(0x181)](_0x5a818a){const _0x43fc44=_0x3074bd;let _0x47f6ac=this[_0x43fc44(0x13d)]['getUnit'](_0x5a818a,_0x56d504[_0x43fc44(0x14f)]);_0x47f6ac&&this[_0x43fc44(0x192)]['syncUnit'](_0x47f6ac);}};Y=I([F(0x0,_0x5a1b75),F(0x1,_0x78f14b),F(0x2,_0x34e393(P)),F(0x3,_0x34e393(L))],Y);function wt(_0x3cb370){const _0x1167f3=_0x3074bd;return typeof _0x3cb370==_0x1167f3(0x195)&&!!_0x3cb370&&_0x1167f3(0x1a1)in _0x3cb370&&typeof _0x3cb370[_0x1167f3(0x1a1)]==_0x1167f3(0x165)&&(!(_0x1167f3(0x18a)in _0x3cb370)||_0x3cb370[_0x1167f3(0x18a)]===void 0x0||typeof _0x3cb370[_0x1167f3(0x18a)]=='string');}let X=class extends _0x5dc02b{constructor(_0x1924a1,_0xe959fd){const _0x43e54b=_0x3074bd;super(),this[_0x43e54b(0x148)]=_0x1924a1,this[_0x43e54b(0x18f)]=_0xe959fd,this[_0x43e54b(0x1db)](this[_0x43e54b(0x148)][_0x43e54b(0x184)]({'pluginName':y,'businesses':[_0x56d504[_0x43e54b(0x14f)]],'toJson':_0x430e2c=>JSON[_0x43e54b(0x1b4)](this[_0x43e54b(0x18f)]['serialize'](_0x430e2c)),'parseJson':_0x25af78=>JSON[_0x43e54b(0x17e)](_0x25af78),'onLoad':(_0x27bbe1,_0x2d1130)=>{const _0x5aa99f=_0x43e54b;this['_docFormulaModel'][_0x5aa99f(0xed)](_0x27bbe1,_0x2d1130);},'onUnLoad':_0x4de3d8=>this[_0x43e54b(0x18f)][_0x43e54b(0x1c9)](_0x4de3d8)}));}};X=I([F(0x0,_0x3f723c),F(0x1,_0x34e393(P))],X);var Tt=_0x3074bd(0x136),Et=_0x3074bd(0x1d1);const Dt={};let Z=class extends _0x5dc02b{constructor(_0x4a8847,_0x48037b,_0x2299f8){const _0x18c3e7=_0x3074bd;super(),this[_0x18c3e7(0x198)]=_0x4a8847,this[_0x18c3e7(0x100)]=_0x48037b,this[_0x18c3e7(0x1db)](_0x2299f8[_0x18c3e7(0xfb)]({'resolve':(_0x4e0ff5,_0x3cd840)=>{const _0xbefd60=_0x18c3e7;var _0x1a243d;return((_0x1a243d=_0x3cd840['customRanges'])==null?void 0x0:_0x1a243d[_0xbefd60(0x180)](w)['map'](_0x13885e=>({'startOffset':_0x13885e[_0xbefd60(0x1ab)],'endOffset':_0x13885e[_0xbefd60(0xf2)]+0x1,'text':this[_0xbefd60(0x11e)](_0x4e0ff5,_0x13885e[_0xbefd60(0x1b3)])})))??[];}})),this['disposeWithMe'](this[_0x18c3e7(0x100)][_0x18c3e7(0x10b)][_0x18c3e7(0x12d)](({unitId:_0xaa6ca})=>{const _0x167648=_0x18c3e7;_0x2299f8[_0x167648(0xe8)](_0xaa6ca);}));}[_0x3074bd(0x11e)](_0x2c5bf9,_0x225411){const _0x449518=_0x3074bd;var _0x3692bd;return((_0x3692bd=this['_formulaService'][_0x449518(0x10f)]({'unitId':_0x2c5bf9,'rangeId':_0x225411}))==null?void 0x0:_0x3692bd[_0x449518(0x18c)])??'';}['resolveText'](_0x40b513,_0xf1624,_0x329977){const _0x112194=_0x3074bd;var _0x5191cf;let _0x33ae39=this[_0x112194(0x198)][_0x112194(0x149)](_0x40b513,_0x56d504[_0x112194(0x14f)]),_0x179216=_0x33ae39==null?void 0x0:_0x33ae39['getBody']();if(!_0x179216)return'';let _0x2edad3=_0x179216[_0x112194(0x1d5)][_0x112194(0x178)](_0xf1624,_0x329977),_0x826430=((_0x5191cf=_0x179216[_0x112194(0x122)])==null?void 0x0:_0x5191cf[_0x112194(0x180)](_0x319bb7=>w(_0x319bb7)&&_0x319bb7['startIndex']>=_0xf1624&&_0x319bb7[_0x112194(0xf2)]<_0x329977)[_0x112194(0x133)]((_0x4bcc5e,_0xb827a8)=>_0xb827a8[_0x112194(0x1ab)]-_0x4bcc5e['startIndex']))??[];for(let _0x34ac62 of _0x826430){let _0x400e0b=_0x34ac62[_0x112194(0x1ab)]-_0xf1624,_0x44ac0b=_0x34ac62[_0x112194(0xf2)]-_0xf1624+0x1;_0x2edad3=''+_0x2edad3['slice'](0x0,_0x400e0b)+this['resolveFormula'](_0x40b513,_0x34ac62['rangeId'])+_0x2edad3[_0x112194(0x178)](_0x44ac0b);}return _0x2edad3;}[_0x3074bd(0x1c5)](_0x3c68cf){return Ot(_0x3c68cf);}[_0x3074bd(0x166)](_0x4b1b82,_0x1c578e,_0x2ed5c7={}){const _0x418e8f=_0x3074bd;var _0x5c302b;return Ve({'id':_0x4b1b82,'body':_0x1c578e,'documentStyle':{}},(((_0x5c302b=_0x1c578e[_0x418e8f(0x122)])==null?void 0x0:_0x5c302b[_0x418e8f(0x180)](w))??[])['map'](_0x8f9139=>({'rangeId':_0x8f9139['rangeId'],'text':_0x2ed5c7[_0x8f9139['rangeId']]??this[_0x418e8f(0x11e)](_0x4b1b82,_0x8f9139[_0x418e8f(0x1b3)])})))['body']??{'dataStream':''};}};Z=I([F(0x0,_0x5a1b75),F(0x1,_0x34e393(L)),F(0x2,_0x34e393(_0x572c95))],Z);function Ot(_0x21ac83){const _0x313bfd=_0x3074bd;var _0x2a4f7d,_0x50f110;let _0x2f7841=kt(_0x21ac83),_0x274901=Ve(_0x21ac83,(((_0x2a4f7d=_0x21ac83[_0x313bfd(0x11f)])==null||(_0x2a4f7d=_0x2a4f7d[_0x313bfd(0x122)])==null?void 0x0:_0x2a4f7d[_0x313bfd(0x180)](w))??[])[_0x313bfd(0xfd)](_0x26956b=>({'rangeId':_0x26956b[_0x313bfd(0x1b3)],'text':At(_0x2f7841==null?void 0x0:_0x2f7841['formulas'][_0x26956b[_0x313bfd(0x1b3)]])})));return _0x274901[_0x313bfd(0x1a7)]=(_0x50f110=_0x274901[_0x313bfd(0x1a7)])==null?void 0x0:_0x50f110[_0x313bfd(0x180)](_0x2cb911=>_0x2cb911['name']!==y),_0x274901;}function kt(_0x151c7d){const _0x34c06d=_0x3074bd;var _0x2caa98;let _0x3b5313=(_0x2caa98=_0x151c7d['resources'])==null||(_0x2caa98=_0x2caa98[_0x34c06d(0x129)](_0x411c73=>_0x411c73[_0x34c06d(0x1b5)]===_0x34c06d(0x160)))==null?void 0x0:_0x2caa98[_0x34c06d(0x1b0)];if(_0x3b5313)try{let _0x1b0173=JSON[_0x34c06d(0x17e)](_0x3b5313);return x(_0x1b0173)?_0x1b0173:void 0x0;}catch{return;}}function At(_0x330030){const _0x194572=_0x3074bd;return _0x330030?_0x43dcf8({'lastValue':_0x330030[_0x194572(0x13e)],'numberFormat':_0x330030[_0x194572(0x1ba)]})[_0x194572(0x18c)]:'';}let Q=class extends _0x5dc02b{constructor(_0xc14e92,_0x1b33af,_0x186623){const _0x2bd20d=_0x3074bd;super(),this[_0x2bd20d(0x100)]=_0xc14e92,this['_cacheEligibilityService']=_0x1b33af,this[_0x2bd20d(0x1db)](_0x186623[_0x2bd20d(0x103)](this));}[_0x3074bd(0x1d2)](_0x3e8ebd){const _0x39d0bb=_0x3074bd;let _0x166b29=new Map();for(let _0x350baf of this['_formulaService']['getRegisteredFormulas']()){var _0x28882c;if(!this['_cacheEligibilityService'][_0x39d0bb(0x162)](_0x350baf['config'][_0x39d0bb(0x1ce)],_0x350baf[_0x39d0bb(0x1d8)])[_0x39d0bb(0x12e)])continue;let _0x2746c9=_0x329bd2(_0x350baf[_0x39d0bb(0x1d8)]),_0x1cef38=_0x2746c9?_0x2dfe02(_0x2746c9):null;if(!_0x1cef38||jt(_0x350baf[_0x39d0bb(0x1b6)]['lastValue'],_0x1cef38))continue;let _0x2746e9=_0x166b29[_0x39d0bb(0x104)](_0x350baf[_0x39d0bb(0x126)][_0x39d0bb(0x1a1)])??[];_0x2746e9['push']({'rangeId':_0x350baf['identity'][_0x39d0bb(0x1b3)],'expectedFormula':_0x350baf['config'][_0x39d0bb(0x1ce)],'expectedNumberFormat':(_0x28882c=_0x350baf['config'][_0x39d0bb(0x1ba)])==null?void 0x0:_0x28882c['pattern'],'expectedReferenceRevision':_0x350baf['referenceRevision'],'lastValue':_0x1cef38}),_0x166b29[_0x39d0bb(0x187)](_0x350baf[_0x39d0bb(0x126)][_0x39d0bb(0x1a1)],_0x2746e9);}return Array[_0x39d0bb(0x13f)](_0x166b29,([_0x18166b,_0x286e3d])=>({'id':H['id'],'params':{'unitId':_0x18166b,'updates':_0x286e3d}}));}};Q=I([F(0x0,_0x34e393(L)),F(0x1,_0x34e393(_0x142c68)),F(0x2,_0x34e393(_0xdccf24))],Q);function jt(_0x28132f,_0x3e8a8b){const _0x15a7a2=_0x3074bd;return(_0x28132f==null?void 0x0:_0x28132f['v'])===_0x3e8a8b['v']&&(_0x28132f==null?void 0x0:_0x28132f['t'])===_0x3e8a8b['t']&&(_0x28132f==null?void 0x0:_0x28132f[_0x15a7a2(0x128)])===_0x3e8a8b[_0x15a7a2(0x128)];}let $=class extends _0x497bd3{constructor(_0x4b70ab=Dt,_0x49b31c,_0xe6831c,_0x11975c){const _0x1bda44=_0x3074bd;super(),this[_0x1bda44(0x1e2)]=_0x4b70ab,this['_injector']=_0x49b31c,this[_0x1bda44(0x16f)]=_0xe6831c,this[_0x1bda44(0x1e0)]=_0x11975c;let {..._0x2c11fa}=_0x5be025({},Dt,this[_0x1bda44(0x1e2)]);this['_configService']['setConfig']('docs-formula.config',_0x2c11fa);}[_0x3074bd(0x14c)](){const _0x3dd1f1=_0x3074bd;this[_0x3dd1f1(0x125)][_0x3dd1f1(0x183)]([P]),this[_0x3dd1f1(0x125)]['add']([L]),this[_0x3dd1f1(0x125)][_0x3dd1f1(0x183)]([X]),this['_injector'][_0x3dd1f1(0x183)]([Y]),this[_0x3dd1f1(0x125)][_0x3dd1f1(0x183)]([Q]),this['_injector'][_0x3dd1f1(0x183)]([Z]),_0x2d40f1(this[_0x3dd1f1(0x125)],[[P],[X],[Y],[Q],[Z]]),[ot,st,V,H,U,W,G,K,ct,lt][_0x3dd1f1(0x17a)](_0x1cb259=>this['disposeWithMe'](this[_0x3dd1f1(0x16f)]['registerCommand'](_0x1cb259)));}};N($,_0x3074bd(0x141),y),N($,_0x3074bd(0x1ac),Tt),N($,_0x3074bd(0x161),Et),N($,_0x3074bd(0x153),_0x56d504[_0x3074bd(0x14f)]),$=I([_0x21eda0(_0x4342e7,_0x1a7798,_0x515868),F(0x1,_0x34e393(_0x37a854)),F(0x2,_0x78f14b),F(0x3,_0x111e6a)],$);export{lt as ConvertDocFormulaToTextCommand,Me as DOC_FORMULA_CUSTOM_RANGE_KIND,Ne as DOC_FORMULA_OBJECT_REPLACEMENT,y as DOC_FORMULA_PLUGIN,je as DOC_FORMULA_SCHEMA_VERSION,Z as DocFormulaDisplayTextService,Y as DocFormulaLifecycleController,P as DocFormulaModel,X as DocFormulaResourceController,it as DocFormulaResultStatus,L as DocFormulaService,U as InsertDocFormulaCommand,C as InvalidDocFormulaInsertRangeError,K as RemoveDocFormulaCommand,st as RemoveDocFormulaMutation,ct as ReplaceDocFormulaWithTextCommand,H as SetDocFormulaLastValuesMutation,ot as SetDocFormulaMutation,G as SetDocFormulaNumberFormatCommand,V as SetDocFormulaResourceMutation,$ as UniverDocsFormulaPlugin,W as UpdateDocFormulaCommand,He as assertSafeDocFormulaInsertRange,Re as buildInsertDocFormulaActions,Be as buildRemoveDocFormulaActions,ze as buildUpdateDocFormulaActions,b as createEmptyDocFormulaResource,Ot as degradeDocFormulaDocumentData,T as findDocFormulaRange,Pe as isDocFormulaConfig,w as isDocFormulaRange,x as isDocFormulaResource,Fe as isFormulaLastValue};
1
+ const _0x18accd=_0x7514;(function(_0x273c35,_0x52e647){const _0x4aa040=_0x7514,_0x43da88=_0x273c35();while(!![]){try{const _0x21cc0c=-parseInt(_0x4aa040(0x1e1))/0x1*(parseInt(_0x4aa040(0x216))/0x2)+parseInt(_0x4aa040(0x24c))/0x3+-parseInt(_0x4aa040(0x1fc))/0x4*(parseInt(_0x4aa040(0x262))/0x5)+parseInt(_0x4aa040(0x243))/0x6*(parseInt(_0x4aa040(0x1c7))/0x7)+-parseInt(_0x4aa040(0x219))/0x8*(-parseInt(_0x4aa040(0x22e))/0x9)+parseInt(_0x4aa040(0x273))/0xa+-parseInt(_0x4aa040(0x256))/0xb*(parseInt(_0x4aa040(0x17b))/0xc);if(_0x21cc0c===_0x52e647)break;else _0x43da88['push'](_0x43da88['shift']());}catch(_0x564810){_0x43da88['push'](_0x43da88['shift']());}}}(_0x5397,0x9962a));import{FormulaCacheEligibilityService as _0x562e65,FormulaLastValuePersistenceService as _0x29a8c7,HostExternalReferenceModel as _0x39d327,UniverProFormulaEnginePlugin as _0x351eb2,buildUpsertHostExternalReferenceMutations as _0x52d94b,collectFormulaExternalReferenceQualifiers as _0x32274e,getScalarFormulaResultCell as _0x1f7dc0,resolveFormulaResultPresentation as _0x3cd2e8,resolveHostFormulaExternalReferences as _0x4ac795,toFormulaLastValue as _0x1d1d0a}from'@univerjs-pro/engine-formula';import{CellValueType as _0x3666f9,CommandType as _0x2c4aaa,CustomRangeType as _0x5034d1,DataStreamTreeTokenType as _0x2170ed,DependentOn as _0x2a626f,Disposable as _0x474e08,ICommandService as _0x222411,IConfigService as _0x2701f4,IResourceManagerService as _0x3b184b,IUndoRedoService as _0x513fde,IUniverInstanceService as _0x478f5d,Inject as _0x2bb8ca,Injector as _0x21727e,JSONX as _0x25fe93,Plugin as _0x2ed24f,TextX as _0x4c112a,Tools as _0x240c37,UniverInstanceType as _0x50d692,generateRandomId as _0x13e167,getBodySliceForTextXAction as _0x4d9adf,getCustomRangeInterval as _0x150f27,getParagraphContentStartOffset as _0x1c8c1a,getRichTextEditPath as _0x27773c,merge as _0x350a4c,shiftExclusiveRangeOnDelete as _0x1f2bf4,shiftExclusiveRangeOnInsert as _0x577f8f,shiftInclusiveRangeOnDelete as _0x594244,shiftInclusiveRangeOnInsert as _0x31a096,touchDependencies as _0x2ca687}from'@univerjs/core';import{DOC_SELECTION_OPTION_PRESERVE_CARET as _0x3ef325,DocSelectionManagerService as _0x32a2c9,DocTextResolverService as _0x329faf,RichTextEditingMutation as _0x2fe09d,UniverDocsPlugin as _0x5b3025}from'@univerjs/docs';import{FormulaResultStatus as _0x1f2db9,LexerTreeBuilder as _0x4914fd,OtherFormulaBizType as _0x2ec085,RegisterOtherFormulaService as _0x1a621d}from'@univerjs/engine-formula';import{Subject as _0x1ec16e}from'rxjs';import{UniverLicensePlugin as _0x3c3fb2}from'@univerjs-pro/license';const y='DOC_FORMULA_PLUGIN',je=0x1,Me=_0x18accd(0x1dd),Ne='';function b(){return{'schemaVersion':0x1,'formulas':{}};}function x(_0x344097){const _0x3c82e6=_0x18accd;return!_0x344097||typeof _0x344097!=_0x3c82e6(0x224)||!S(_0x344097,[_0x3c82e6(0x1b6),_0x3c82e6(0x1b9)])||!(_0x3c82e6(0x1b6)in _0x344097)||_0x344097[_0x3c82e6(0x1b6)]!==0x1||!(_0x3c82e6(0x1b9)in _0x344097)||!_0x344097[_0x3c82e6(0x1b9)]||typeof _0x344097['formulas']!=_0x3c82e6(0x224)||Array['isArray'](_0x344097[_0x3c82e6(0x1b9)])?!0x1:Object[_0x3c82e6(0x1c5)](_0x344097['formulas'])[_0x3c82e6(0x197)](([_0x2ca7ad,_0x288a19])=>_0x2ca7ad[_0x3c82e6(0x230)]>0x0&&Pe(_0x288a19));}function Pe(_0x3f5b06){const _0x5430b8=_0x18accd;return!_0x3f5b06||typeof _0x3f5b06!=_0x5430b8(0x224)||!S(_0x3f5b06,['formula',_0x5430b8(0x255),'lastValue'])||!('formula'in _0x3f5b06)||typeof _0x3f5b06[_0x5430b8(0x193)]!=_0x5430b8(0x218)||!_0x3f5b06[_0x5430b8(0x193)][_0x5430b8(0x272)]()||_0x5430b8(0x255)in _0x3f5b06&&_0x3f5b06[_0x5430b8(0x255)]!=null&&(typeof _0x3f5b06['numberFormat']!=_0x5430b8(0x224)||!S(_0x3f5b06[_0x5430b8(0x255)],[_0x5430b8(0x1f9)])||!(_0x5430b8(0x1f9)in _0x3f5b06[_0x5430b8(0x255)])||typeof _0x3f5b06[_0x5430b8(0x255)][_0x5430b8(0x1f9)]!=_0x5430b8(0x218))?!0x1:!(_0x5430b8(0x191)in _0x3f5b06)||_0x3f5b06[_0x5430b8(0x191)]==null||Fe(_0x3f5b06[_0x5430b8(0x191)]);}function Fe(_0x5eb3da){const _0x3fa065=_0x18accd;return!_0x5eb3da||typeof _0x5eb3da!=_0x3fa065(0x224)||!S(_0x5eb3da,['v','t',_0x3fa065(0x1f9)])||!('v'in _0x5eb3da)||_0x5eb3da['v']!==null&&typeof _0x5eb3da['v']!=_0x3fa065(0x218)&&typeof _0x5eb3da['v']!=_0x3fa065(0x232)&&typeof _0x5eb3da['v']!=_0x3fa065(0x26c)||'t'in _0x5eb3da&&_0x5eb3da['t']!=null&&!Ie(_0x5eb3da['t'])?!0x1:!(_0x3fa065(0x1f9)in _0x5eb3da)||_0x5eb3da['pattern']==null||typeof _0x5eb3da['pattern']==_0x3fa065(0x218);}function S(_0x2169c6,_0x2b70a2){const _0x5c6840=_0x18accd;let _0x2efa87=new Set(_0x2b70a2);return Object[_0x5c6840(0x1c9)](_0x2169c6)[_0x5c6840(0x197)](_0x5d4a45=>_0x2efa87[_0x5c6840(0x1f5)](_0x5d4a45));}function Ie(_0x4d834f){const _0x2e85bd=_0x18accd;return typeof _0x4d834f==_0x2e85bd(0x232)&&Object[_0x2e85bd(0x269)](_0x3666f9)[_0x2e85bd(0x258)](_0x4d834f);}const Le=new Set([_0x2170ed[_0x18accd(0x1b7)],_0x2170ed[_0x18accd(0x174)],_0x2170ed[_0x18accd(0x1c4)],_0x2170ed[_0x18accd(0x1d1)],_0x2170ed['TABLE_CELL_END'],_0x2170ed[_0x18accd(0x206)],_0x2170ed['TABLE_END'],_0x2170ed[_0x18accd(0x1d4)],_0x2170ed[_0x18accd(0x22c)],_0x2170ed[_0x18accd(0x17c)],_0x2170ed[_0x18accd(0x245)],_0x2170ed[_0x18accd(0x19d)],_0x2170ed[_0x18accd(0x214)],_0x2170ed[_0x18accd(0x1ef)]]);var C=class extends Error{constructor(){const _0x15c723=_0x18accd;super(_0x15c723(0x1e5));}};function Re(_0x54cee4){const _0x4a1aa7=_0x18accd;var _0x7803a7,_0x4d47a9;let _0x4ca420=_0x240c37[_0x4a1aa7(0x1a4)](_0x54cee4['documentData']),_0x3b7cb2=j(_0x4ca420),{startOffset:_0x4b9650,endOffset:_0x1e7fa8}=We(_0x3b7cb2,_0x54cee4[_0x4a1aa7(0x23d)],_0x54cee4[_0x4a1aa7(0x200)]);He(_0x3b7cb2,_0x4b9650,_0x1e7fa8);let _0xf41f6b=((_0x7803a7=_0x3b7cb2[_0x4a1aa7(0x1a6)])==null?void 0x0:_0x7803a7['filter'](_0x4463b7=>{const _0x59a358=_0x4a1aa7;if(!w(_0x4463b7))return!0x1;let _0x5bffdb=_0x150f27(_0x4463b7);return _0x5bffdb[_0x59a358(0x200)]>_0x4b9650&&_0x5bffdb[_0x59a358(0x23d)]<_0x1e7fa8;})[_0x4a1aa7(0x1f3)](_0x3f52ba=>_0x3f52ba[_0x4a1aa7(0x251)]))??[];qe(_0x3b7cb2,_0x4b9650,_0x1e7fa8,''),_0x3b7cb2[_0x4a1aa7(0x1a6)]=[...((_0x4d47a9=_0x3b7cb2['customRanges'])==null?void 0x0:_0x4d47a9[_0x4a1aa7(0x252)](_0x5e9681=>!_0xf41f6b[_0x4a1aa7(0x258)](_0x5e9681['rangeId'])&&_0x5e9681[_0x4a1aa7(0x251)]!==_0x54cee4[_0x4a1aa7(0x251)]))??[],Ue(_0x54cee4['rangeId'],_0x4b9650)][_0x4a1aa7(0x1dc)]((_0x200734,_0x2388ab)=>_0x200734[_0x4a1aa7(0x24f)]-_0x2388ab[_0x4a1aa7(0x24f)]);let _0x1261da=E(_0x54cee4[_0x4a1aa7(0x192)]);return _0xf41f6b['forEach'](_0x110c5d=>{const _0x5bf302=_0x4a1aa7;delete _0x1261da[_0x5bf302(0x1b9)][_0x110c5d];}),_0x1261da[_0x4a1aa7(0x1b9)][_0x54cee4[_0x4a1aa7(0x251)]]=_0x240c37['deepClone'](_0x54cee4['config']),{'nextDocumentData':_0x4ca420,'nextResource':_0x1261da,'cursorOffset':_0x4b9650+0x1};}function ze(_0x2a4391){const _0xa6368f=_0x18accd;var _0x39a7ce,_0x250a9d;let _0x20c2cc=_0x240c37[_0xa6368f(0x1a4)](_0x2a4391[_0xa6368f(0x17e)]),_0x4c2a4f=(_0x39a7ce=j(_0x20c2cc)['customRanges'])==null?void 0x0:_0x39a7ce['find'](_0x1f4ce3=>_0x1f4ce3[_0xa6368f(0x251)]===_0x2a4391[_0xa6368f(0x251)]&&w(_0x1f4ce3));if(!_0x4c2a4f||!((_0x250a9d=_0x2a4391['resource'])!=null&&_0x250a9d[_0xa6368f(0x1b9)][_0x2a4391[_0xa6368f(0x251)]]))return null;let _0x3c1b47=E(_0x2a4391[_0xa6368f(0x192)]);return _0x3c1b47[_0xa6368f(0x1b9)][_0x2a4391[_0xa6368f(0x251)]]=_0x240c37['deepClone'](_0x2a4391[_0xa6368f(0x1ba)]),{'nextDocumentData':_0x20c2cc,'nextResource':_0x3c1b47,'cursorOffset':_0x4c2a4f['endIndex']+0x1};}function Be(_0x1cead2){const _0x4ac730=_0x18accd;let _0x195b93=_0x240c37['deepClone'](_0x1cead2['documentData']),_0x3c2a90=Je(_0x195b93,_0x1cead2[_0x4ac730(0x251)],_0x1cead2['text']??'');if(_0x3c2a90==null)return null;let _0x24e595=E(_0x1cead2[_0x4ac730(0x192)]);return delete _0x24e595[_0x4ac730(0x1b9)][_0x1cead2[_0x4ac730(0x251)]],{'nextDocumentData':_0x195b93,'nextResource':_0x24e595,'cursorOffset':_0x3c2a90};}function Ve(_0x53e3f1,_0x395441){const _0x3f424e=_0x18accd;var _0x1119bf;let _0x124bee=_0x240c37['deepClone'](_0x53e3f1),_0x3b4054=_0x124bee[_0x3f424e(0x212)];if(!_0x3b4054)return _0x124bee;let _0x5b2344=new Map(_0x395441[_0x3f424e(0x1f3)](_0xb317c9=>[_0xb317c9[_0x3f424e(0x251)],_0xb317c9['text']])),_0x5abc6e=((_0x1119bf=_0x3b4054[_0x3f424e(0x1a6)])==null?void 0x0:_0x1119bf[_0x3f424e(0x252)](_0x2fc614=>w(_0x2fc614)&&_0x5b2344[_0x3f424e(0x1f5)](_0x2fc614['rangeId']))[_0x3f424e(0x1dc)]((_0x522338,_0x14dfe9)=>_0x14dfe9[_0x3f424e(0x24f)]-_0x522338['startIndex']))??[];for(let _0x5dee21 of _0x5abc6e)Je(_0x124bee,_0x5dee21[_0x3f424e(0x251)],_0x5b2344[_0x3f424e(0x1ab)](_0x5dee21['rangeId'])??'');return _0x124bee;}function w(_0x484d73){const _0x32ab81=_0x18accd;var _0x5c91ac;return(_0x484d73==null?void 0x0:_0x484d73[_0x32ab81(0x176)])===_0x5034d1[_0x32ab81(0x231)]&&_0x484d73[_0x32ab81(0x240)]===!0x0&&((_0x5c91ac=_0x484d73[_0x32ab81(0x20f)])==null?void 0x0:_0x5c91ac[_0x32ab81(0x268)])===_0x32ab81(0x1dd);}function T(_0x56a2d3,_0x3e5208){const _0x30ab57=_0x18accd;var _0x1feebd;return _0x56a2d3==null||(_0x1feebd=_0x56a2d3[_0x30ab57(0x1a6)])==null?void 0x0:_0x1feebd[_0x30ab57(0x20a)](_0x511678=>_0x511678[_0x30ab57(0x251)]===_0x3e5208&&w(_0x511678));}function He(_0x3be2be,_0x1efa2a,_0x7f8b40){const _0x5884a0=_0x18accd;if(_0x1efa2a===_0x7f8b40){if(Le[_0x5884a0(0x1f5)](_0x3be2be['dataStream'][_0x1efa2a]))throw new C();}else{for(let _0x84ed1f=_0x1efa2a;_0x84ed1f<_0x7f8b40;_0x84ed1f++)if(_0x3be2be[_0x5884a0(0x1d2)][_0x84ed1f]===_0x2170ed['PARAGRAPH']||Le[_0x5884a0(0x1f5)](_0x3be2be[_0x5884a0(0x1d2)][_0x84ed1f]))throw new C();}}function Ue(_0xb20bc5,_0x2c5561){const _0x5ccaa9=_0x18accd;return{'startIndex':_0x2c5561,'endIndex':_0x2c5561,'rangeId':_0xb20bc5,'rangeType':_0x5034d1[_0x5ccaa9(0x231)],'wholeEntity':!0x0,'properties':{'kind':Me}};}function E(_0x2e474f){const _0x501889=_0x18accd;return _0x2e474f?_0x240c37[_0x501889(0x1a4)](_0x2e474f):b();}function We(_0x1ae661,_0x58700e,_0x2a8704){const _0x12cdb8=_0x18accd;let _0x363931=Ke(_0x1ae661),_0x142722=_0x58700e??_0x363931,_0x35ed94=_0x2a8704??_0x142722;return{'startOffset':Ge(Math[_0x12cdb8(0x1da)](_0x142722,_0x35ed94),_0x363931),'endOffset':Ge(Math[_0x12cdb8(0x1d6)](_0x142722,_0x35ed94),_0x363931)};}function Ge(_0x58958b,_0x2e2cd4){const _0x315b4e=_0x18accd;return Math[_0x315b4e(0x1d6)](0x0,Math['min'](_0x58958b,_0x2e2cd4));}function Ke(_0x18ce3d){const _0x1222c1=_0x18accd;return _0x18ce3d[_0x1222c1(0x1d2)][_0x1222c1(0x1b3)](''+_0x2170ed[_0x1222c1(0x1fd)]+_0x2170ed[_0x1222c1(0x1b7)])?Math[_0x1222c1(0x1d6)](0x0,_0x18ce3d[_0x1222c1(0x1d2)][_0x1222c1(0x230)]-0x2):_0x18ce3d[_0x1222c1(0x1d2)][_0x1222c1(0x1b3)](_0x2170ed[_0x1222c1(0x1b7)])?Math[_0x1222c1(0x1d6)](0x0,_0x18ce3d['dataStream']['length']-0x1):_0x18ce3d[_0x1222c1(0x1d2)]['length'];}function qe(_0x110ad0,_0x23c137,_0x24a03f,_0x347c6c){_0x24a03f>_0x23c137&&Xe(_0x110ad0,_0x23c137,_0x24a03f),Ye(_0x110ad0,_0x23c137,_0x347c6c);}function Je(_0x2a8b40,_0x433896,_0x45b4d5){const _0x2b04fe=_0x18accd;var _0x325f85,_0x4bd112;let _0x46c205=j(_0x2a8b40),_0x415d15=(_0x325f85=_0x46c205[_0x2b04fe(0x1a6)])==null?void 0x0:_0x325f85[_0x2b04fe(0x20a)](_0x55b043=>_0x55b043['rangeId']===_0x433896&&w(_0x55b043));if(!_0x415d15)return null;let _0x1e8069=_0x150f27(_0x415d15);return qe(_0x46c205,_0x1e8069['startOffset'],_0x1e8069[_0x2b04fe(0x200)],_0x45b4d5),_0x46c205['customRanges']=(_0x4bd112=_0x46c205['customRanges'])==null?void 0x0:_0x4bd112['filter'](_0x162182=>_0x162182[_0x2b04fe(0x251)]!==_0x433896),_0x1e8069[_0x2b04fe(0x23d)]+_0x45b4d5[_0x2b04fe(0x230)];}function Ye(_0x1cafbc,_0x22c125,_0x7db800){const _0xca0d75=_0x18accd;_0x7db800&&(_0x1cafbc[_0xca0d75(0x1d2)]=''+_0x1cafbc[_0xca0d75(0x1d2)][_0xca0d75(0x22a)](0x0,_0x22c125)+_0x7db800+_0x1cafbc['dataStream'][_0xca0d75(0x22a)](_0x22c125),Ze(_0x1cafbc,_0x22c125,_0x7db800[_0xca0d75(0x230)]));}function Xe(_0xdd9274,_0x4e2b9f,_0x4696aa){const _0x5e9033=_0x18accd;let _0x20d945=_0x4696aa-_0x4e2b9f;_0xdd9274[_0x5e9033(0x1d2)]=''+_0xdd9274[_0x5e9033(0x1d2)][_0x5e9033(0x22a)](0x0,_0x4e2b9f)+_0xdd9274[_0x5e9033(0x1d2)][_0x5e9033(0x22a)](_0x4696aa),Qe(_0xdd9274,_0x4e2b9f,_0x20d945);}function Ze(_0x1a1957,_0x19ca08,_0x45af4c){const _0x378a35=_0x18accd;_0x1a1957[_0x378a35(0x18d)]=D(_0x1a1957[_0x378a35(0x18d)],_0x19ca08,_0x45af4c),_0x1a1957[_0x378a35(0x20e)]=D(_0x1a1957[_0x378a35(0x20e)],_0x19ca08,_0x45af4c),_0x1a1957[_0x378a35(0x18c)]=D(_0x1a1957['customBlocks'],_0x19ca08,_0x45af4c),_0x1a1957['textRuns']=$e(_0x1a1957[_0x378a35(0x1e4)],_0x19ca08,_0x45af4c),_0x1a1957[_0x378a35(0x20b)]=et(_0x1a1957['tables'],_0x19ca08,_0x45af4c),_0x1a1957[_0x378a35(0x270)]=k(_0x1a1957[_0x378a35(0x270)],_0x19ca08,_0x45af4c),_0x1a1957[_0x378a35(0x1a6)]=k(_0x1a1957['customRanges'],_0x19ca08,_0x45af4c),_0x1a1957[_0x378a35(0x1cd)]=k(_0x1a1957['customDecorations'],_0x19ca08,_0x45af4c),_0x1a1957['blockRanges']=k(_0x1a1957['blockRanges'],_0x19ca08,_0x45af4c);}function _0x5397(){const _0x2b8957=['formulaId','paragraph','pattern','startsWith','EMPTY','132esgrMo','PARAGRAPH','model','_formulaKeys','endOffset','deleteFormula','trigger','unsupported-version','registerFormulaWithRange','pushUndoRedo','TABLE_ROW_END','range','parse','decorate','find','tables','docs-formula.command.remove','_presentationChanged$','sectionBreaks','properties','insertLength','_hostExternalReferenceModel','body','invalid-resource','BLOCK_END','registerPluginResource','1097396tEbydu','documentRedo','string','8LZBHpj','_deleteRegistration','docs-formula.command.replace-with-text','cell','setFormula','defineProperty','redoMutation','expectedNumberFormat','blockRanges','getBody','disposeWithMe','object','some','_rawResources','_commandService','_univerInstanceService','resourceRedo','slice','replaceDocRanges','COLUMN_START','docs-formula.mutation.set-formula','10342791tomNcH','docs-formula.config','length','CUSTOM','number','function','sequenceNodesBuilder','empty','selection','serialize','_queueSync','isInteger','nextResource','resourceUndo','docs-formula.command.insert','startOffset','symbol','_syncUnit','wholeEntity','getResult','text','1014YJGGnd','color','COLUMN_GROUP_END','externalMutations','liveResult','setResource','setFormulas','cursorOffset','_cacheEligibilityService','450867DfRcBS','UNIVER_DOC','externalReferences','startIndex','type','rangeId','filter','push','document','numberFormat','11ttnRiE','getUnit','includes','resolveText','getFormula','delete','change$','docs-formula.command.set-number-format','assign','default','eligible','getLoadError','73195LmCjnD','resources','updates','_updateFormulaResult','getUnitId','clear','kind','values','getResource','getFormulas','boolean','getRevision','_change$','referenceRevision','columnGroups','resolveFormula','trim','234590MUUdJC','_loadErrors','TABLE_START','identity','rangeType','docs-formula.command.update','nextDocumentData','_configService','version','5380896YrmuEk','COLUMN_END','DOC_FORMULA_PLUGIN','documentData','_model','deleteLength','_service','call','removeFormula','stringify','expectedFormula','dispose','editOp','next','presentation','asObservable','data','customBlocks','paragraphs','status','getTextRanges','MUTATION','lastValue','resource','formula','_setPresentation','getCurrentUnitOfType','accessor','every','unregister','retain','load','_config','forEach','BLOCK_START','references','endIndex','getPresentation','segmentId','unregisterUnit','_isDisposed','deepClone','success','customRanges','_pendingUnitIds','register','ERROR','start','get','_resources','unitId','unitDisposed$','add','resolved','getSnapshot','syncUnit','endsWith','_instanceService','degradeDocumentData','schemaVersion','SECTION_BREAK','syncExecuteCommand','formulas','config','removeUnit','_registrationService','complete','error','_registrations','prototype','target','presentationChanged$','onCommandExecuted','TABLE_ROW_START','entries','resolveBinding','32536JmBRsu','name','keys','getOwnPropertyDescriptor','stale','setConfig','customDecorations','_formulaService','Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.','PENDING','TABLE_CELL_START','dataStream','subscribe','COLUMN_GROUP_START','set','max','onStarting','SUCCESS','_preserveInvalid','min','iterator','sort','univer-docs-formula','pluginName','params','_docFormulaModel','1PpzLRN','position','_injector','textRuns','Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries','source','registerCommand','getFormulaValueSync','pending','formulaResult$','_syncScheduled','from','insert','previousDocumentData','CUSTOM_BLOCK','COMMAND','undoMutation','getRegisteredFormulas','map','getInstance','has','getAllUnitsForType'];_0x5397=function(){return _0x2b8957;};return _0x5397();}function Qe(_0x1eddb0,_0x814e3f,_0x51e098){const _0xd7baac=_0x18accd;var _0x3adf4e,_0xe627d5;_0x1eddb0[_0xd7baac(0x18d)]=O(_0x1eddb0['paragraphs'],_0x814e3f,_0x51e098),_0x1eddb0[_0xd7baac(0x20e)]=O(_0x1eddb0[_0xd7baac(0x20e)],_0x814e3f,_0x51e098),_0x1eddb0[_0xd7baac(0x18c)]=O(_0x1eddb0[_0xd7baac(0x18c)],_0x814e3f,_0x51e098),_0x1eddb0['textRuns']=(_0x3adf4e=tt((_0xe627d5=_0x1eddb0['textRuns'])==null?void 0x0:_0xe627d5['map'](_0x414ef8=>({..._0x414ef8,'startIndex':_0x414ef8['st'],'endIndex':_0x414ef8['ed']})),_0x814e3f,_0x51e098))==null?void 0x0:_0x3adf4e[_0xd7baac(0x1f3)](_0x5c77cc=>{let {startIndex:_0x4b55bc,endIndex:_0x552e87,..._0x353b1f}=_0x5c77cc;return{..._0x353b1f,'st':_0x4b55bc,'ed':_0x552e87};}),_0x1eddb0[_0xd7baac(0x20b)]=tt(_0x1eddb0['tables'],_0x814e3f,_0x51e098),_0x1eddb0['columnGroups']=A(_0x1eddb0['columnGroups'],_0x814e3f,_0x51e098),_0x1eddb0['customRanges']=A(_0x1eddb0[_0xd7baac(0x1a6)],_0x814e3f,_0x51e098),_0x1eddb0[_0xd7baac(0x1cd)]=A(_0x1eddb0[_0xd7baac(0x1cd)],_0x814e3f,_0x51e098),_0x1eddb0[_0xd7baac(0x221)]=A(_0x1eddb0[_0xd7baac(0x221)],_0x814e3f,_0x51e098);}function D(_0x2bb4e4,_0x3c3e72,_0x4beb38){const _0x3c4b66=_0x18accd;return _0x2bb4e4==null?void 0x0:_0x2bb4e4[_0x3c4b66(0x1f3)](_0x5ba4a9=>_0x5ba4a9[_0x3c4b66(0x24f)]>=_0x3c3e72?{..._0x5ba4a9,'startIndex':_0x5ba4a9[_0x3c4b66(0x24f)]+_0x4beb38}:_0x5ba4a9);}function O(_0x5dcd7f,_0x2011c0,_0x16deca){const _0x3b5e55=_0x18accd;let _0x599e09=_0x2011c0+_0x16deca;return _0x5dcd7f==null?void 0x0:_0x5dcd7f[_0x3b5e55(0x1f3)](_0x487c1c=>_0x487c1c[_0x3b5e55(0x24f)]>=_0x2011c0&&_0x487c1c[_0x3b5e55(0x24f)]<_0x599e09?null:_0x487c1c['startIndex']>=_0x599e09?{..._0x487c1c,'startIndex':_0x487c1c[_0x3b5e55(0x24f)]-_0x16deca}:_0x487c1c)[_0x3b5e55(0x252)](_0x57267b=>_0x57267b!=null);}function $e(_0x305acd,_0x3e4312,_0x405c18){const _0x5995f8=_0x18accd;return _0x305acd==null?void 0x0:_0x305acd[_0x5995f8(0x1f3)](_0xc71178=>_0xc71178['st']>=_0x3e4312?{..._0xc71178,'st':_0xc71178['st']+_0x405c18,'ed':_0xc71178['ed']+_0x405c18}:_0xc71178['ed']>_0x3e4312?{..._0xc71178,'ed':_0xc71178['ed']+_0x405c18}:_0xc71178);}function k(_0x4e97e1,_0x2c2e32,_0x5ce83c){return _0x4e97e1==null?void 0x0:_0x4e97e1['map'](_0x160fea=>_0x31a096(_0x160fea,_0x2c2e32,_0x5ce83c));}function et(_0x5f5d3e,_0x283588,_0x565763){const _0x299c01=_0x18accd;return _0x5f5d3e==null?void 0x0:_0x5f5d3e[_0x299c01(0x1f3)](_0x1262ba=>_0x577f8f(_0x1262ba,_0x283588,_0x565763));}function A(_0x3469f0,_0x2a3403,_0x34a708){const _0x283fe6=_0x18accd;return _0x3469f0==null?void 0x0:_0x3469f0[_0x283fe6(0x1f3)](_0x5bada8=>_0x594244(_0x5bada8,_0x2a3403,_0x34a708))[_0x283fe6(0x252)](_0x276490=>_0x276490!=null);}function tt(_0x6cd74a,_0x6f48fc,_0x344e9a){const _0xf72a5c=_0x18accd;return _0x6cd74a==null?void 0x0:_0x6cd74a['map'](_0xf7ad2a=>_0x1f2bf4(_0xf7ad2a,_0x6f48fc,_0x344e9a))[_0xf72a5c(0x252)](_0x107c21=>_0x107c21!=null);}function j(_0x30eed3){const _0x35f2df=_0x18accd;if(!_0x30eed3['body'])throw Error(_0x35f2df(0x1cf));return _0x30eed3['body'];}function M(_0xdbd6e4){'@babel/helpers - typeof';const _0x476da2=_0x18accd;return M=typeof Symbol==_0x476da2(0x233)&&typeof Symbol[_0x476da2(0x1db)]==_0x476da2(0x23e)?function(_0x106f38){return typeof _0x106f38;}:function(_0x15d522){const _0x898968=_0x476da2;return _0x15d522&&typeof Symbol==_0x898968(0x233)&&_0x15d522['constructor']===Symbol&&_0x15d522!==Symbol[_0x898968(0x1c0)]?_0x898968(0x23e):typeof _0x15d522;},M(_0xdbd6e4);}function nt(_0x404754,_0x335bbc){const _0x2be563=_0x18accd;if(M(_0x404754)!='object'||!_0x404754)return _0x404754;var _0x2d6f32=_0x404754[Symbol['toPrimitive']];if(_0x2d6f32!==void 0x0){var _0xbe45f3=_0x2d6f32[_0x2be563(0x182)](_0x404754,_0x335bbc||_0x2be563(0x25f));if(M(_0xbe45f3)!='object')return _0xbe45f3;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x335bbc===_0x2be563(0x218)?String:Number)(_0x404754);}function rt(_0x347a2e){const _0x1c34eb=_0x18accd;var _0x1aafee=nt(_0x347a2e,_0x1c34eb(0x218));return M(_0x1aafee)=='symbol'?_0x1aafee:_0x1aafee+'';}function N(_0x290c0b,_0x4219a2,_0x48620b){return(_0x4219a2=rt(_0x4219a2))in _0x290c0b?Object['defineProperty'](_0x290c0b,_0x4219a2,{'value':_0x48620b,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x290c0b[_0x4219a2]=_0x48620b,_0x290c0b;}var P=class extends _0x474e08{constructor(..._0x297f4d){const _0x2b6ca4=_0x18accd;super(..._0x297f4d),N(this,_0x2b6ca4(0x1ac),new Map()),N(this,'_rawResources',new Map()),N(this,_0x2b6ca4(0x173),new Map()),N(this,'_change$',new _0x1ec16e()),N(this,_0x2b6ca4(0x25c),this['_change$'][_0x2b6ca4(0x18a)]());}[_0x18accd(0x25a)](_0x560461,_0x1cf4ed){const _0x29ebf1=_0x18accd;var _0x3fd025;let _0x5429e2=(_0x3fd025=this['_resources'][_0x29ebf1(0x1ab)](_0x560461))==null?void 0x0:_0x3fd025[_0x29ebf1(0x1b9)][_0x1cf4ed];return _0x5429e2?_0x240c37['deepClone'](_0x5429e2):void 0x0;}['getFormulas'](_0x437ed2){const _0x4c3e33=_0x18accd;var _0x2d8c1e;return _0x240c37[_0x4c3e33(0x1a4)](((_0x2d8c1e=this['_resources'][_0x4c3e33(0x1ab)](_0x437ed2))==null?void 0x0:_0x2d8c1e['formulas'])??{});}['getResource'](_0x1fe717){const _0xbfa4ee=_0x18accd;let _0x349b5d=this[_0xbfa4ee(0x1ac)][_0xbfa4ee(0x1ab)](_0x1fe717);return _0x349b5d?_0x240c37[_0xbfa4ee(0x1a4)](_0x349b5d):void 0x0;}[_0x18accd(0x21d)](_0x354d50,_0x21273c,_0x1db87d){const _0x7d6ad4=_0x18accd;return this[_0x7d6ad4(0x249)](_0x354d50,{[_0x21273c]:_0x1db87d});}[_0x18accd(0x248)](_0x42b792,_0x5ec5f7){const _0x4ae753=_0x18accd;return this['_loadErrors']['has'](_0x42b792)||!x(_0x5ec5f7)?!0x1:(this[_0x4ae753(0x1ac)]['set'](_0x42b792,_0x240c37['deepClone'](_0x5ec5f7)),this[_0x4ae753(0x26e)][_0x4ae753(0x188)]({'unitId':_0x42b792}),!0x0);}[_0x18accd(0x249)](_0xa0343b,_0x16ce1d){const _0x2f5142=_0x18accd;if(this[_0x2f5142(0x173)][_0x2f5142(0x1f5)](_0xa0343b)||!Object[_0x2f5142(0x1c9)](_0x16ce1d)[_0x2f5142(0x230)]||!x({'schemaVersion':0x1,'formulas':_0x16ce1d}))return!0x1;let _0x238d2a=this[_0x2f5142(0x1ac)][_0x2f5142(0x1ab)](_0xa0343b)??b(),_0xbfe465=_0x240c37[_0x2f5142(0x1a4)](_0x238d2a);return Object[_0x2f5142(0x25e)](_0xbfe465[_0x2f5142(0x1b9)],_0x240c37['deepClone'](_0x16ce1d)),this[_0x2f5142(0x1ac)][_0x2f5142(0x1d5)](_0xa0343b,_0xbfe465),this[_0x2f5142(0x26e)][_0x2f5142(0x188)]({'unitId':_0xa0343b,'rangeIds':Object[_0x2f5142(0x1c9)](_0x16ce1d)}),!0x0;}[_0x18accd(0x183)](_0x56bd93,_0x5054b7){const _0x1336b3=_0x18accd;if(this[_0x1336b3(0x173)][_0x1336b3(0x1f5)](_0x56bd93))return!0x1;let _0x632cd=this['_resources'][_0x1336b3(0x1ab)](_0x56bd93);if(!(_0x632cd!=null&&_0x632cd['formulas'][_0x5054b7]))return!0x1;let _0x52c554=_0x240c37[_0x1336b3(0x1a4)](_0x632cd);return delete _0x52c554['formulas'][_0x5054b7],this['_resources'][_0x1336b3(0x1d5)](_0x56bd93,_0x52c554),this['_change$'][_0x1336b3(0x188)]({'unitId':_0x56bd93,'rangeIds':[_0x5054b7]}),!0x0;}['load'](_0x3c93e5,_0x1dd4eb){const _0x44cfed=_0x18accd;return _0x1dd4eb&&typeof _0x1dd4eb=='object'&&_0x44cfed(0x1b6)in _0x1dd4eb&&_0x1dd4eb[_0x44cfed(0x1b6)]!==0x1?(this[_0x44cfed(0x1d9)](_0x3c93e5,_0x1dd4eb,_0x44cfed(0x203)),!0x1):x(_0x1dd4eb)?(this[_0x44cfed(0x1ac)][_0x44cfed(0x1d5)](_0x3c93e5,_0x240c37[_0x44cfed(0x1a4)](_0x1dd4eb)),this['_rawResources']['delete'](_0x3c93e5),this[_0x44cfed(0x173)]['delete'](_0x3c93e5),this[_0x44cfed(0x26e)]['next']({'unitId':_0x3c93e5}),!0x0):(this['_preserveInvalid'](_0x3c93e5,_0x1dd4eb,_0x44cfed(0x213)),!0x1);}['serialize'](_0x23ed9a){const _0x5e5110=_0x18accd;let _0x56a937=this[_0x5e5110(0x1ac)][_0x5e5110(0x1ab)](_0x23ed9a);return _0x56a937?_0x240c37[_0x5e5110(0x1a4)](_0x56a937):this[_0x5e5110(0x226)]['has'](_0x23ed9a)?_0x240c37[_0x5e5110(0x1a4)](this[_0x5e5110(0x226)][_0x5e5110(0x1ab)](_0x23ed9a)):b();}[_0x18accd(0x261)](_0x531c9b){const _0x3e3611=_0x18accd;return this[_0x3e3611(0x173)][_0x3e3611(0x1ab)](_0x531c9b);}[_0x18accd(0x1bb)](_0x43ec4b){const _0x5e47e6=_0x18accd;this[_0x5e47e6(0x1ac)][_0x5e47e6(0x25b)](_0x43ec4b),this[_0x5e47e6(0x226)][_0x5e47e6(0x25b)](_0x43ec4b),this['_loadErrors']['delete'](_0x43ec4b),this[_0x5e47e6(0x26e)][_0x5e47e6(0x188)]({'unitId':_0x43ec4b});}[_0x18accd(0x186)](){const _0x125b47=_0x18accd;this[_0x125b47(0x1ac)][_0x125b47(0x267)](),this['_rawResources'][_0x125b47(0x267)](),this[_0x125b47(0x173)][_0x125b47(0x267)](),this[_0x125b47(0x26e)][_0x125b47(0x1bd)](),super['dispose']();}[_0x18accd(0x1d9)](_0x1ffdd6,_0x230dc4,_0x3287a1){const _0x595e8b=_0x18accd;this['_resources']['delete'](_0x1ffdd6),this[_0x595e8b(0x226)][_0x595e8b(0x1d5)](_0x1ffdd6,_0x240c37[_0x595e8b(0x1a4)](_0x230dc4)),this[_0x595e8b(0x173)][_0x595e8b(0x1d5)](_0x1ffdd6,_0x3287a1),this['_change$']['next']({'unitId':_0x1ffdd6});}};let it=function(_0x3db238){const _0x43d3f4=_0x18accd;return _0x3db238[_0x43d3f4(0x1fb)]=_0x43d3f4(0x235),_0x3db238[_0x43d3f4(0x1d0)]=_0x43d3f4(0x1e9),_0x3db238[_0x43d3f4(0x1d8)]=_0x43d3f4(0x1a5),_0x3db238[_0x43d3f4(0x1a9)]=_0x43d3f4(0x1be),_0x3db238;}({});function F(_0x144c97,_0x4a343b){return function(_0x8dd12a,_0x5a5b8d){_0x4a343b(_0x8dd12a,_0x5a5b8d,_0x144c97);};}function I(_0xe6873f,_0x2d73d9,_0x5d5587,_0x5bba90){const _0x2d14c9=_0x18accd;var _0x399f21=arguments[_0x2d14c9(0x230)],_0x2468eb=_0x399f21<0x3?_0x2d73d9:_0x5bba90===null?_0x5bba90=Object[_0x2d14c9(0x1ca)](_0x2d73d9,_0x5d5587):_0x5bba90,_0x3cbae7;if(typeof Reflect==_0x2d14c9(0x224)&&typeof Reflect['decorate']=='function')_0x2468eb=Reflect[_0x2d14c9(0x209)](_0xe6873f,_0x2d73d9,_0x5d5587,_0x5bba90);else{for(var _0x100a5f=_0xe6873f[_0x2d14c9(0x230)]-0x1;_0x100a5f>=0x0;_0x100a5f--)(_0x3cbae7=_0xe6873f[_0x100a5f])&&(_0x2468eb=(_0x399f21<0x3?_0x3cbae7(_0x2468eb):_0x399f21>0x3?_0x3cbae7(_0x2d73d9,_0x5d5587,_0x2468eb):_0x3cbae7(_0x2d73d9,_0x5d5587))||_0x2468eb);}return _0x399f21>0x3&&_0x2468eb&&Object[_0x2d14c9(0x21e)](_0x2d73d9,_0x5d5587,_0x2468eb),_0x2468eb;}let L=class extends _0x474e08{constructor(_0x228b77,_0x46ebfa,_0x34c280){const _0x34263f=_0x18accd;super(),this['_model']=_0x228b77,this[_0x34263f(0x1bc)]=_0x46ebfa,this['_hostExternalReferenceModel']=_0x34c280,N(this,_0x34263f(0x1bf),new Map()),N(this,'_formulaKeys',new Map()),N(this,_0x34263f(0x20d),new _0x1ec16e()),N(this,_0x34263f(0x1c2),this[_0x34263f(0x20d)][_0x34263f(0x18a)]()),this[_0x34263f(0x223)](this[_0x34263f(0x1bc)][_0x34263f(0x1ea)]['subscribe'](_0xa9c5a9=>{const _0x4edb87=_0x34263f;for(let _0x44903d of Object[_0x4edb87(0x269)](_0xa9c5a9))for(let _0x1455a9 of Object[_0x4edb87(0x269)](_0x44903d))_0x1455a9['forEach'](_0x1635ce=>this[_0x4edb87(0x265)](_0x1635ce));}));}['syncUnit'](_0x493679){const _0xcaf973=_0x18accd;var _0x17a5c2;let _0x898cbe=_0x493679['getUnitId'](),_0x39fc89=((_0x17a5c2=_0x493679[_0xcaf973(0x1b1)]()[_0xcaf973(0x212)])==null||(_0x17a5c2=_0x17a5c2[_0xcaf973(0x1a6)])==null?void 0x0:_0x17a5c2[_0xcaf973(0x252)](w))??[],_0x51612f=this[_0xcaf973(0x17f)][_0xcaf973(0x26b)](_0x898cbe),_0x409e41=new Set();for(let _0x574b01 of _0x39fc89){let _0x3e3645=_0x51612f[_0x574b01[_0xcaf973(0x251)]];_0x3e3645&&(_0x409e41[_0xcaf973(0x1af)](R(_0x898cbe,_0x574b01[_0xcaf973(0x251)])),this['register']({'unitId':_0x898cbe,'rangeId':_0x574b01[_0xcaf973(0x251)]},_0x3e3645));}for(let _0xfb8e5e of Array[_0xcaf973(0x1ec)](this[_0xcaf973(0x1bf)][_0xcaf973(0x269)]()))_0xfb8e5e[_0xcaf973(0x1ad)]===_0x898cbe&&!_0x409e41[_0xcaf973(0x1f5)](R(_0xfb8e5e[_0xcaf973(0x1ad)],_0xfb8e5e[_0xcaf973(0x251)]))&&this[_0xcaf973(0x198)](_0xfb8e5e);}[_0x18accd(0x1a8)](_0x59256b,_0x203d10){const _0x50b16d=_0x18accd;let _0x495cf9=R(_0x59256b['unitId'],_0x59256b[_0x50b16d(0x251)]),_0x433eb2=this[_0x50b16d(0x1bf)][_0x50b16d(0x1ab)](_0x495cf9),_0xd6e365=this[_0x50b16d(0x211)][_0x50b16d(0x26d)](_0x59256b[_0x50b16d(0x1ad)]);if(_0x433eb2&&_0x433eb2['config']['formula']===_0x203d10['formula']&&_0x433eb2[_0x50b16d(0x26f)]===_0xd6e365){_0x433eb2['config']=_0x203d10;let _0x330802=_0x433eb2['formulaId']?this[_0x50b16d(0x1bc)][_0x50b16d(0x1e8)](_0x433eb2[_0x50b16d(0x1ad)],_0x433eb2[_0x50b16d(0x1ad)],_0x433eb2[_0x50b16d(0x1f7)])??void 0x0:void 0x0;_0x433eb2[_0x50b16d(0x247)]=_0x330802,this[_0x50b16d(0x194)](_0x495cf9,z(_0x203d10,_0x330802));return;}_0x433eb2!=null&&_0x433eb2[_0x50b16d(0x1f7)]&&this['_deleteRegistration'](_0x433eb2);let _0x74c8fc={..._0x59256b,'config':_0x203d10,'referenceRevision':_0xd6e365,'presentation':z(_0x203d10,void 0x0)};if(this[_0x50b16d(0x1bf)][_0x50b16d(0x1d5)](_0x495cf9,_0x74c8fc),!_0x203d10[_0x50b16d(0x193)]['trim']())return;let _0x90be99=this['_registrationService'][_0x50b16d(0x204)](_0x59256b[_0x50b16d(0x1ad)],_0x59256b[_0x50b16d(0x1ad)],_0x203d10[_0x50b16d(0x193)],void 0x0,{'rangeId':_0x59256b[_0x50b16d(0x251)]},_0x2ec085['DOC'],_0x59256b[_0x50b16d(0x251)]);_0x74c8fc['formulaId']=_0x90be99,this[_0x50b16d(0x1ff)][_0x50b16d(0x1d5)](_0x90be99,_0x495cf9);}[_0x18accd(0x198)](_0x3ce936){const _0x49c7f6=_0x18accd;let _0xd51455=R(_0x3ce936[_0x49c7f6(0x1ad)],_0x3ce936[_0x49c7f6(0x251)]),_0x24ea07=this[_0x49c7f6(0x1bf)]['get'](_0xd51455);_0x24ea07&&(this[_0x49c7f6(0x21a)](_0x24ea07),this[_0x49c7f6(0x1bf)]['delete'](_0xd51455));}[_0x18accd(0x1a2)](_0x369e49){const _0x556cc4=_0x18accd;for(let _0x24a586 of Array['from'](this[_0x556cc4(0x1bf)][_0x556cc4(0x269)]()))_0x24a586[_0x556cc4(0x1ad)]===_0x369e49&&this[_0x556cc4(0x198)](_0x24a586);}[_0x18accd(0x1a0)](_0x5e4d65){const _0x1bb8b5=_0x18accd;var _0x1952e0;return(_0x1952e0=this['_registrations'][_0x1bb8b5(0x1ab)](R(_0x5e4d65['unitId'],_0x5e4d65[_0x1bb8b5(0x251)])))==null?void 0x0:_0x1952e0[_0x1bb8b5(0x189)];}[_0x18accd(0x241)](_0x59975e){const _0x37447b=_0x18accd;let _0x38cc95=this[_0x37447b(0x1bf)][_0x37447b(0x1ab)](R(_0x59975e[_0x37447b(0x1ad)],_0x59975e[_0x37447b(0x251)]));return _0x38cc95?B(_0x38cc95):void 0x0;}['getRegisteredFormulas'](){const _0x1db8e8=_0x18accd;return Array[_0x1db8e8(0x1ec)](this[_0x1db8e8(0x1bf)]['values'](),_0x878ebe=>({'identity':{'unitId':_0x878ebe[_0x1db8e8(0x1ad)],'rangeId':_0x878ebe[_0x1db8e8(0x251)]},'config':_0x878ebe[_0x1db8e8(0x1ba)],'referenceRevision':_0x878ebe['referenceRevision'],..._0x878ebe[_0x1db8e8(0x247)]?{'liveResult':_0x878ebe[_0x1db8e8(0x247)]}:null}));}['dispose'](){const _0x3d7a66=_0x18accd;for(let _0x5371a9 of this[_0x3d7a66(0x1bf)][_0x3d7a66(0x269)]())this[_0x3d7a66(0x21a)](_0x5371a9);this[_0x3d7a66(0x1bf)][_0x3d7a66(0x267)](),this[_0x3d7a66(0x1ff)][_0x3d7a66(0x267)](),this['_presentationChanged$'][_0x3d7a66(0x1bd)](),super[_0x3d7a66(0x186)]();}[_0x18accd(0x265)](_0x41a9f6){const _0x27ac94=_0x18accd;let _0x27fd4b=this['_formulaKeys'][_0x27ac94(0x1ab)](_0x41a9f6[_0x27ac94(0x1f7)]),_0x24c6dd=_0x27fd4b?this['_registrations']['get'](_0x27fd4b):void 0x0;_0x27fd4b&&_0x24c6dd&&(_0x24c6dd[_0x27ac94(0x247)]=_0x41a9f6,this[_0x27ac94(0x194)](_0x27fd4b,z(_0x24c6dd[_0x27ac94(0x1ba)],_0x41a9f6)));}[_0x18accd(0x194)](_0x55ad56,_0x33ff8b){const _0x1e5490=_0x18accd;var _0xed896,_0x1fbe14;let _0x5c92ab=this['_registrations']['get'](_0x55ad56);if(!_0x5c92ab||at(_0x5c92ab['presentation'],_0x33ff8b))return;let _0x5437ee=_0x5c92ab[_0x1e5490(0x189)],_0x201675=B(_0x5c92ab);_0x5c92ab[_0x1e5490(0x189)]=_0x33ff8b,this[_0x1e5490(0x20d)][_0x1e5490(0x188)]({'unitId':_0x5c92ab[_0x1e5490(0x1ad)],'rangeId':_0x5c92ab[_0x1e5490(0x251)],'presentation':_0x33ff8b,'previousPresentation':_0x5437ee,'result':B(_0x5c92ab),'previousResult':{..._0x201675,..._0x5437ee,'value':(_0xed896=_0x5437ee[_0x1e5490(0x21c)])==null?void 0x0:_0xed896['v'],'valueType':((_0x1fbe14=_0x5437ee[_0x1e5490(0x21c)])==null?void 0x0:_0x1fbe14['t'])??void 0x0}});}[_0x18accd(0x21a)](_0x4d96be){const _0x5dd8f0=_0x18accd;_0x4d96be[_0x5dd8f0(0x1f7)]&&(this[_0x5dd8f0(0x1bc)][_0x5dd8f0(0x201)](_0x4d96be['unitId'],_0x4d96be[_0x5dd8f0(0x1ad)],[_0x4d96be['formulaId']]),this[_0x5dd8f0(0x1ff)]['delete'](_0x4d96be['formulaId']));}};L=I([F(0x0,_0x2bb8ca(P)),F(0x1,_0x2bb8ca(_0x1a621d)),F(0x2,_0x2bb8ca(_0x39d327))],L);function R(_0x26b788,_0x3d919e){return _0x26b788+'\x00'+_0x3d919e;}function z(_0x44d3ca,_0x27e098){const _0x30fbf8=_0x18accd;return _0x3cd2e8({'numberFormat':_0x44d3ca[_0x30fbf8(0x255)],'lastValue':_0x44d3ca['lastValue'],'result':_0x27e098});}function B(_0x46e0bf){const _0x3d2927=_0x18accd;var _0x45339c,_0x2cf29c,_0xf4550;let _0x21751a=_0x46e0bf['presentation'],_0x54a4e8=_0x46e0bf[_0x3d2927(0x1ba)][_0x3d2927(0x193)][_0x3d2927(0x272)]()?_0x21751a['stale']||_0x21751a['cell']==null?_0x3d2927(0x1e9):((_0x45339c=_0x46e0bf[_0x3d2927(0x247)])==null?void 0x0:_0x45339c[_0x3d2927(0x18e)])===_0x1f2db9['ERROR']?_0x3d2927(0x1be):_0x3d2927(0x1a5):_0x3d2927(0x235);return{..._0x21751a,'status':_0x54a4e8,'value':(_0x2cf29c=_0x21751a['cell'])==null?void 0x0:_0x2cf29c['v'],'valueType':((_0xf4550=_0x21751a[_0x3d2927(0x21c)])==null?void 0x0:_0xf4550['t'])??void 0x0};}function at(_0x41f5c1,_0x21cfe5){const _0x3dbf03=_0x18accd;var _0x33bef3,_0x285c12,_0x2194cd,_0x500a52;return _0x41f5c1[_0x3dbf03(0x242)]===_0x21cfe5[_0x3dbf03(0x242)]&&_0x41f5c1[_0x3dbf03(0x244)]===_0x21cfe5['color']&&_0x41f5c1['pattern']===_0x21cfe5[_0x3dbf03(0x1f9)]&&_0x41f5c1[_0x3dbf03(0x1e6)]===_0x21cfe5[_0x3dbf03(0x1e6)]&&_0x41f5c1['stale']===_0x21cfe5[_0x3dbf03(0x1cb)]&&((_0x33bef3=_0x41f5c1['cell'])==null?void 0x0:_0x33bef3['t'])===((_0x285c12=_0x21cfe5[_0x3dbf03(0x21c)])==null?void 0x0:_0x285c12['t'])&&Object['is']((_0x2194cd=_0x41f5c1[_0x3dbf03(0x21c)])==null?void 0x0:_0x2194cd['v'],(_0x500a52=_0x21cfe5['cell'])==null?void 0x0:_0x500a52['v']);}const ot={'id':_0x18accd(0x22d),'type':_0x2c4aaa[_0x18accd(0x190)],'handler':(_0x5aca49,_0x56ea38)=>!(_0x56ea38!=null&&_0x56ea38[_0x18accd(0x1ad)])||!_0x56ea38[_0x18accd(0x251)]||!_0x56ea38['config']?!0x1:_0x5aca49['get'](P)[_0x18accd(0x21d)](_0x56ea38[_0x18accd(0x1ad)],_0x56ea38['rangeId'],_0x56ea38[_0x18accd(0x1ba)])},st={'id':'docs-formula.mutation.remove-formula','type':_0x2c4aaa['MUTATION'],'handler':(_0x431e20,_0x3645e9)=>!(_0x3645e9!=null&&_0x3645e9[_0x18accd(0x1ad)])||!_0x3645e9[_0x18accd(0x251)]?!0x1:_0x431e20[_0x18accd(0x1ab)](P)[_0x18accd(0x183)](_0x3645e9[_0x18accd(0x1ad)],_0x3645e9[_0x18accd(0x251)])},V={'id':'docs-formula.mutation.set-resource','type':_0x2c4aaa[_0x18accd(0x190)],'handler':(_0x141e5c,_0x513c53)=>!(_0x513c53!=null&&_0x513c53[_0x18accd(0x1ad)])||!_0x513c53[_0x18accd(0x192)]?!0x1:_0x141e5c[_0x18accd(0x1ab)](P)[_0x18accd(0x248)](_0x513c53[_0x18accd(0x1ad)],_0x513c53[_0x18accd(0x192)])},H={'id':'docs-formula.mutation.set-last-values','type':_0x2c4aaa[_0x18accd(0x190)],'handler':(_0x35ad68,_0x29f30e)=>{const _0x51a4ec=_0x18accd;if(!(_0x29f30e!=null&&_0x29f30e[_0x51a4ec(0x1ad)])||!_0x29f30e[_0x51a4ec(0x264)][_0x51a4ec(0x230)])return!0x1;let _0x497aaf=_0x35ad68['get'](P),_0x1fc407=_0x35ad68[_0x51a4ec(0x1ab)](_0x39d327),_0xa78566=_0x497aaf[_0x51a4ec(0x26a)](_0x29f30e[_0x51a4ec(0x1ad)]);if(!_0xa78566)return!0x1;let _0x2489ca=_0x240c37[_0x51a4ec(0x1a4)](_0xa78566),_0xfa7dec=!0x1;for(let _0x23c22a of _0x29f30e[_0x51a4ec(0x264)]){var _0x4ea899,_0x8c4193,_0x578921,_0x5acd89;let _0x8e4cf1=_0x2489ca[_0x51a4ec(0x1b9)][_0x23c22a[_0x51a4ec(0x251)]];_0x8e4cf1&&_0x8e4cf1[_0x51a4ec(0x193)]===_0x23c22a[_0x51a4ec(0x185)]&&((_0x4ea899=_0x8e4cf1['numberFormat'])==null?void 0x0:_0x4ea899[_0x51a4ec(0x1f9)])===_0x23c22a[_0x51a4ec(0x220)]&&_0x1fc407['getRevision'](_0x29f30e['unitId'])===_0x23c22a['expectedReferenceRevision']&&(((_0x8c4193=_0x8e4cf1[_0x51a4ec(0x191)])==null?void 0x0:_0x8c4193['v'])!==_0x23c22a[_0x51a4ec(0x191)]['v']||((_0x578921=_0x8e4cf1['lastValue'])==null?void 0x0:_0x578921['t'])!==_0x23c22a[_0x51a4ec(0x191)]['t']||((_0x5acd89=_0x8e4cf1[_0x51a4ec(0x191)])==null?void 0x0:_0x5acd89[_0x51a4ec(0x1f9)])!==_0x23c22a[_0x51a4ec(0x191)][_0x51a4ec(0x1f9)])&&(_0x8e4cf1[_0x51a4ec(0x191)]=_0x240c37[_0x51a4ec(0x1a4)](_0x23c22a['lastValue']),_0xfa7dec=!0x0);}return!_0xfa7dec||_0x497aaf['setResource'](_0x29f30e[_0x51a4ec(0x1ad)],_0x2489ca);}},U={'id':_0x18accd(0x23c),'type':_0x2c4aaa[_0x18accd(0x1f0)],'handler':(_0x2909e0,_0xb97ce7)=>{const _0x72a918=_0x18accd;if(!(_0xb97ce7!=null&&_0xb97ce7[_0x72a918(0x193)]['trim']()))return!0x1;let _0x32ec77=q(_0x2909e0,_0xb97ce7[_0x72a918(0x1ad)],'');if(!_0x32ec77)return!0x1;let _0x47b7cd=ft(_0xb97ce7[_0x72a918(0x1c1)],_0x32ec77[_0x72a918(0x212)],dt(_0x2909e0,_0x32ec77[_0x72a918(0x1ad)]));if(!_0x47b7cd)return!0x1;let _0x2defab=pt(_0x2909e0,_0x32ec77[_0x72a918(0x1ad)],_0xb97ce7[_0x72a918(0x193)],_0xb97ce7[_0x72a918(0x24e)]??[]);if(!_0x2defab)return!0x1;let _0x2a883f=mt(_0x32ec77[_0x72a918(0x212)],_0x32ec77['model'],_0x32ec77[_0x72a918(0x1ad)]),_0x4e4fc8=ht({'documentData':_0x32ec77['documentData'],'resource':_0x32ec77[_0x72a918(0x192)],'rangeId':_0x2a883f,'config':{'formula':_0xb97ce7[_0x72a918(0x193)],..._0xb97ce7[_0x72a918(0x255)]?{'numberFormat':_0xb97ce7['numberFormat']}:null},'startOffset':_0x47b7cd[_0x72a918(0x23d)],'endOffset':_0x47b7cd['endOffset']});if(!_0x4e4fc8)return!0x1;let _0x74ee53=_0x52d94b(_0x2909e0,_0x32ec77[_0x72a918(0x1ad)],_0x2defab);return!_0x74ee53||!J({'accessor':_0x2909e0,'document':_0x32ec77[_0x72a918(0x254)],'unitId':_0x32ec77[_0x72a918(0x1ad)],'trigger':U['id'],'rangeId':_0x2a883f,'previousResource':_0x32ec77['resource'],'nextResource':_0x4e4fc8[_0x72a918(0x23a)],'previousDocumentData':_0x32ec77['documentData'],'nextDocumentData':_0x4e4fc8[_0x72a918(0x178)],'cursorOffset':_0x4e4fc8[_0x72a918(0x24a)],'externalMutations':_0x74ee53})?!0x1:{'rangeId':_0x2a883f,'startOffset':_0x4e4fc8[_0x72a918(0x24a)]-0x1,'endOffset':_0x4e4fc8[_0x72a918(0x24a)]};}},W={'id':_0x18accd(0x177),'type':_0x2c4aaa[_0x18accd(0x1f0)],'handler':(_0x1d8218,_0x381f30)=>{const _0x29e015=_0x18accd;if(!(_0x381f30!=null&&_0x381f30[_0x29e015(0x251)])||!_0x381f30[_0x29e015(0x193)]['trim']())return!0x1;let _0x1cdc7e=q(_0x1d8218,_0x381f30[_0x29e015(0x1ad)],''),_0x4e2360=_0x1cdc7e==null?void 0x0:_0x1cdc7e['model'][_0x29e015(0x25a)](_0x1cdc7e[_0x29e015(0x1ad)],_0x381f30['rangeId']),_0x3304ff=_0x1cdc7e?T(_0x1cdc7e[_0x29e015(0x17e)][_0x29e015(0x212)],_0x381f30['rangeId']):void 0x0;if(!_0x1cdc7e||!_0x4e2360||!_0x3304ff)return!0x1;let _0x4289e0=pt(_0x1d8218,_0x1cdc7e[_0x29e015(0x1ad)],_0x381f30['formula'],_0x381f30[_0x29e015(0x24e)]??[]);if(!_0x4289e0)return!0x1;let _0x5ef1cc=_0x52d94b(_0x1d8218,_0x1cdc7e[_0x29e015(0x1ad)],_0x4289e0);if(!_0x5ef1cc)return!0x1;let _0xa88029=Ct(_0x1cdc7e[_0x29e015(0x192)]);return _0xa88029[_0x29e015(0x1b9)][_0x381f30[_0x29e015(0x251)]]={'formula':_0x381f30[_0x29e015(0x193)],..._0x381f30[_0x29e015(0x255)]?{'numberFormat':_0x381f30[_0x29e015(0x255)]}:_0x4e2360[_0x29e015(0x255)]?{'numberFormat':_0x4e2360['numberFormat']}:null},J({'accessor':_0x1d8218,'document':_0x1cdc7e[_0x29e015(0x254)],'unitId':_0x1cdc7e[_0x29e015(0x1ad)],'trigger':W['id'],'rangeId':_0x381f30[_0x29e015(0x251)],'previousResource':_0x1cdc7e[_0x29e015(0x192)],'nextResource':_0xa88029,'cursorOffset':_0x3304ff[_0x29e015(0x19f)]+0x1,'externalMutations':_0x5ef1cc});}},G={'id':_0x18accd(0x25d),'type':_0x2c4aaa[_0x18accd(0x1f0)],'handler':(_0x2ccdad,_0x5cd2bb)=>{const _0x9d8e02=_0x18accd;if(!(_0x5cd2bb!=null&&_0x5cd2bb[_0x9d8e02(0x251)]))return!0x1;let _0x22f0ab=q(_0x2ccdad,_0x5cd2bb['unitId'],''),_0x7c950c=_0x22f0ab==null?void 0x0:_0x22f0ab[_0x9d8e02(0x1fe)][_0x9d8e02(0x25a)](_0x22f0ab[_0x9d8e02(0x1ad)],_0x5cd2bb[_0x9d8e02(0x251)]),_0x7ccf90=_0x22f0ab?T(_0x22f0ab[_0x9d8e02(0x17e)][_0x9d8e02(0x212)],_0x5cd2bb[_0x9d8e02(0x251)]):void 0x0;if(!_0x22f0ab||!_0x7c950c||!_0x7ccf90)return!0x1;let _0x26105a=Ct(_0x22f0ab[_0x9d8e02(0x192)]);return _0x26105a[_0x9d8e02(0x1b9)][_0x5cd2bb[_0x9d8e02(0x251)]]={..._0x7c950c,..._0x5cd2bb[_0x9d8e02(0x255)]?{'numberFormat':_0x5cd2bb[_0x9d8e02(0x255)]}:null},_0x5cd2bb[_0x9d8e02(0x255)]||delete _0x26105a['formulas'][_0x5cd2bb[_0x9d8e02(0x251)]][_0x9d8e02(0x255)],J({'accessor':_0x2ccdad,'document':_0x22f0ab[_0x9d8e02(0x254)],'unitId':_0x22f0ab[_0x9d8e02(0x1ad)],'trigger':G['id'],'rangeId':_0x5cd2bb[_0x9d8e02(0x251)],'previousResource':_0x22f0ab[_0x9d8e02(0x192)],'nextResource':_0x26105a,'cursorOffset':_0x7ccf90[_0x9d8e02(0x19f)]+0x1,'externalMutations':{}});}},K={'id':_0x18accd(0x20c),'type':_0x2c4aaa[_0x18accd(0x1f0)],'handler':(_0x493641,_0x36054a)=>ut(_0x493641,_0x36054a,'',K['id'])},ct={'id':_0x18accd(0x21b),'type':_0x2c4aaa[_0x18accd(0x1f0)],'handler':(_0xddedeb,_0x594bd1)=>ut(_0xddedeb,_0x594bd1,(_0x594bd1==null?void 0x0:_0x594bd1['text'])??'',ct['id'])},lt={'id':'docs-formula.command.convert-to-text','type':_0x2c4aaa['COMMAND'],'handler':(_0x343533,_0xd97716)=>{const _0x670c65=_0x18accd;if(!(_0xd97716!=null&&_0xd97716[_0x670c65(0x251)]))return!0x1;let _0x4d7fdc=q(_0x343533,_0xd97716[_0x670c65(0x1ad)],'');if(!_0x4d7fdc)return!0x1;let _0x52030b=_0x343533[_0x670c65(0x1ab)](L)[_0x670c65(0x241)]({'unitId':_0x4d7fdc[_0x670c65(0x1ad)],'rangeId':_0xd97716['rangeId']});return _0x52030b?ut(_0x343533,_0xd97716,_0x52030b['text'],lt['id']):!0x1;}};function ut(_0x52bd0b,_0x59d1ce,_0xf49d80,_0x1f3930){const _0xb5f590=_0x18accd;if(!(_0x59d1ce!=null&&_0x59d1ce['rangeId']))return!0x1;let _0x3ec354=q(_0x52bd0b,_0x59d1ce[_0xb5f590(0x1ad)],'');if(!_0x3ec354)return!0x1;let _0x43fbee=Be({'documentData':_0x3ec354['documentData'],'resource':_0x3ec354[_0xb5f590(0x192)],'rangeId':_0x59d1ce[_0xb5f590(0x251)],'text':_0xf49d80});return _0x43fbee?J({'accessor':_0x52bd0b,'document':_0x3ec354[_0xb5f590(0x254)],'unitId':_0x3ec354[_0xb5f590(0x1ad)],'trigger':_0x1f3930,'rangeId':_0x59d1ce[_0xb5f590(0x251)],'previousResource':_0x3ec354[_0xb5f590(0x192)],'nextResource':_0x43fbee[_0xb5f590(0x23a)],'previousDocumentData':_0x3ec354[_0xb5f590(0x17e)],'nextDocumentData':_0x43fbee[_0xb5f590(0x178)],'cursorOffset':_0x43fbee[_0xb5f590(0x24a)],'externalMutations':{}}):!0x1;}function q(_0x214c8c,_0x57d408,_0x42eb13){const _0x5b6bd0=_0x18accd;if(_0x42eb13)return null;let _0x3c054a=_0x214c8c[_0x5b6bd0(0x1ab)](_0x478f5d),_0x4e69b=(_0x57d408?_0x3c054a['getUnit'](_0x57d408,_0x50d692[_0x5b6bd0(0x24d)]):_0x3c054a[_0x5b6bd0(0x195)](_0x50d692['UNIVER_DOC']))??null;if(!_0x4e69b)return null;let _0x2350a7=_0x4e69b[_0x5b6bd0(0x1b1)](),_0xa7be59=_0x2350a7[_0x5b6bd0(0x212)];if(_0x2350a7['disabled']||!_0xa7be59)return null;let _0x24e8e1=_0x214c8c['get'](P);return _0x24e8e1[_0x5b6bd0(0x261)](_0x4e69b[_0x5b6bd0(0x266)]())?null:{'document':_0x4e69b,'body':_0xa7be59,'documentData':_0x2350a7,'model':_0x24e8e1,'resource':_0x24e8e1[_0x5b6bd0(0x26a)](_0x4e69b[_0x5b6bd0(0x266)]())??b(),'unitId':_0x4e69b[_0x5b6bd0(0x266)]()};}function dt(_0x3333b1,_0x24070c){const _0x36986a=_0x18accd;var _0x50d3e7;return(_0x50d3e7=_0x3333b1[_0x36986a(0x1ab)](_0x32a2c9)[_0x36986a(0x18f)]({'subUnitId':_0x24070c,'unitId':_0x24070c}))==null?void 0x0:_0x50d3e7[0x0];}function ft(_0x3c11fe,_0x5c8a4b,_0x5280f7){const _0x15085e=_0x18accd;if((_0x3c11fe==null?void 0x0:_0x3c11fe['type'])===_0x15085e(0x1f8)){var _0x3547a2;let _0x3eb268=((_0x3547a2=_0x5c8a4b[_0x15085e(0x18d)])==null?void 0x0:_0x3547a2[_0x15085e(0x252)](_0x1ff9ed=>_0x1ff9ed['paragraphId']===_0x3c11fe['paragraphId']))??[];if(_0x3eb268[_0x15085e(0x230)]!==0x1)return null;let _0x426adc=_0x3eb268[0x0],_0x2729b4=_0x1c8c1a(_0x5c8a4b,_0x426adc),_0x46bf4b=_0x426adc['startIndex']-_0x2729b4,_0x787cbb=_0x3c11fe[_0x15085e(0x1e2)]==='end'?_0x46bf4b:_0x3c11fe['position'];if(!Number[_0x15085e(0x239)](_0x787cbb)||_0x787cbb<0x0||_0x787cbb>_0x46bf4b)return null;let _0x2f19c0=_0x2729b4+_0x787cbb;return{'startOffset':_0x2f19c0,'endOffset':_0x2f19c0};}if((_0x3c11fe==null?void 0x0:_0x3c11fe[_0x15085e(0x250)])===_0x15085e(0x207))return!Number[_0x15085e(0x239)](_0x3c11fe[_0x15085e(0x23d)])||!Number[_0x15085e(0x239)](_0x3c11fe[_0x15085e(0x200)])?null:{'startOffset':Math[_0x15085e(0x1da)](_0x3c11fe[_0x15085e(0x23d)],_0x3c11fe[_0x15085e(0x200)]),'endOffset':Math['max'](_0x3c11fe[_0x15085e(0x23d)],_0x3c11fe[_0x15085e(0x200)])};let _0x485507=(_0x3c11fe==null?void 0x0:_0x3c11fe[_0x15085e(0x250)])===_0x15085e(0x236)?_0x3c11fe[_0x15085e(0x236)]:_0x5280f7;return!_0x485507||_0x485507['segmentId']?null:{'startOffset':Math['min'](_0x485507[_0x15085e(0x23d)],_0x485507['endOffset']),'endOffset':Math['max'](_0x485507[_0x15085e(0x23d)],_0x485507['endOffset'])};}function pt(_0x404c43,_0x18b445,_0x2d2a8f,_0x1183a6){const _0x5852b3=_0x18accd;let _0x5af88c=_0x404c43['get'](_0x4914fd),_0x31e731=_0x2d2a8f[_0x5852b3(0x1fa)]('=')?_0x2d2a8f[_0x5852b3(0x22a)](0x1):_0x2d2a8f,_0x3a2960=_0x5af88c[_0x5852b3(0x234)](_0x31e731);if(!_0x3a2960)return null;let _0x23b2dd=_0x404c43[_0x5852b3(0x1ab)](_0x39d327),_0x55c62c=_0x4ac795({'qualifiers':_0x32274e(_0x3a2960),'explicitReferences':_0x1183a6??[],'resolveBinding':_0x5e1018=>_0x23b2dd[_0x5852b3(0x1c6)](_0x18b445,_0x5e1018)});return _0x55c62c[_0x5852b3(0x18e)]===_0x5852b3(0x1b0)?_0x55c62c[_0x5852b3(0x19e)]:null;}function mt(_0x2dce01,_0x3d0ec2,_0x228151){const _0x5c3253=_0x18accd;var _0x1418fb;let _0x1b07af=_0x13e167(0x6);for(;_0x2dce01!=null&&(_0x1418fb=_0x2dce01[_0x5c3253(0x1a6)])!=null&&_0x1418fb[_0x5c3253(0x225)](_0x459f89=>_0x459f89[_0x5c3253(0x251)]===_0x1b07af)||_0x3d0ec2[_0x5c3253(0x25a)](_0x228151,_0x1b07af);)_0x1b07af=_0x13e167(0x6);return _0x1b07af;}function ht(_0x1236a2){try{return Re(_0x1236a2);}catch(_0x33830a){if(_0x33830a instanceof C)return null;throw _0x33830a;}}function gt(_0x1315c2){const _0x487ee4=_0x18accd;let _0x52265e=_0x1315c2[_0x487ee4(0x1ee)]&&_0x1315c2['nextDocumentData']?vt(_0x1315c2['document'],_0x1315c2[_0x487ee4(0x1ad)],_0x1315c2['previousDocumentData'],_0x1315c2[_0x487ee4(0x178)],_0x1315c2[_0x487ee4(0x24a)],_0x1315c2[_0x487ee4(0x202)]):null;return _0x1315c2[_0x487ee4(0x1ee)]&&_0x1315c2[_0x487ee4(0x178)]&&!_0x52265e?null:{'documentRedo':_0x52265e,'resourceRedo':{'id':V['id'],'params':{'unitId':_0x1315c2[_0x487ee4(0x1ad)],'resource':_0x1315c2['nextResource']}},'resourceUndo':{'id':V['id'],'params':{'unitId':_0x1315c2['unitId'],'resource':_0x1315c2['previousResource']}}};}function _t(_0x13d32d,_0x2af97d,_0x380244,_0x32dad1){const _0x580c41=_0x18accd;_0x32dad1[_0x580c41(0x205)]({'id':_0x13d32d[_0x580c41(0x202)]+':'+_0x13d32d[_0x580c41(0x251)],'unitID':_0x13d32d[_0x580c41(0x1ad)],'redoMutations':[..._0x13d32d[_0x580c41(0x246)][_0x580c41(0x21f)]?[_0x13d32d[_0x580c41(0x246)][_0x580c41(0x21f)]]:[],..._0x2af97d[_0x580c41(0x217)]?[_0x2af97d[_0x580c41(0x217)]]:[],_0x2af97d[_0x580c41(0x229)]],'undoMutations':[_0x2af97d[_0x580c41(0x23b)],..._0x380244?[_0x380244]:[],..._0x13d32d[_0x580c41(0x246)]['undoMutation']?[_0x13d32d['externalMutations'][_0x580c41(0x1f1)]]:[]]});}function J(_0x3fd200){const _0x3c3671=_0x18accd;let _0x4d36ba=_0x3fd200[_0x3c3671(0x196)][_0x3c3671(0x1ab)](_0x222411),_0xb9a5f=_0x3fd200[_0x3c3671(0x196)][_0x3c3671(0x1ab)](_0x513fde),_0x37a637=_0x3fd200[_0x3c3671(0x196)]['get'](_0x32a2c9),_0x4a67a2=gt(_0x3fd200);if(!_0x4a67a2)return!0x1;let _0x275205=!0x1,_0x398a5d=null,_0x3b5a56=!0x1;try{if(_0x3fd200[_0x3c3671(0x246)][_0x3c3671(0x21f)]){if(!_0x4d36ba[_0x3c3671(0x1b8)](_0x3fd200[_0x3c3671(0x246)][_0x3c3671(0x21f)]['id'],_0x3fd200[_0x3c3671(0x246)][_0x3c3671(0x21f)][_0x3c3671(0x1df)]))return!0x1;_0x275205=!0x0;}if(_0x4a67a2[_0x3c3671(0x217)]){let _0x5559de=_0x4d36ba[_0x3c3671(0x1b8)](_0x4a67a2[_0x3c3671(0x217)]['id'],_0x4a67a2[_0x3c3671(0x217)][_0x3c3671(0x1df)]);if(!_0x5559de)return bt(_0x4d36ba,_0x3fd200[_0x3c3671(0x246)],_0x275205),!0x1;_0x398a5d={'id':_0x2fe09d['id'],'params':{..._0x5559de,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0x4d36ba['syncExecuteCommand'](_0x4a67a2[_0x3c3671(0x229)]['id'],_0x4a67a2['resourceRedo']['params']))return yt(_0x4d36ba,_0x398a5d),bt(_0x4d36ba,_0x3fd200[_0x3c3671(0x246)],_0x275205),!0x1;_0x3b5a56=!0x0,_t(_0x3fd200,_0x4a67a2,_0x398a5d,_0xb9a5f);}catch(_0xa7bd89){throw _0x3b5a56&&_0x4d36ba[_0x3c3671(0x1b8)](_0x4a67a2[_0x3c3671(0x23b)]['id'],_0x4a67a2['resourceUndo']['params']),yt(_0x4d36ba,_0x398a5d),bt(_0x4d36ba,_0x3fd200[_0x3c3671(0x246)],_0x275205),_0xa7bd89;}return _0x37a637[_0x3c3671(0x22b)]([{'startOffset':_0x3fd200[_0x3c3671(0x24a)],'endOffset':_0x3fd200[_0x3c3671(0x24a)],'segmentId':''}],{'unitId':_0x3fd200['unitId'],'subUnitId':_0x3fd200['unitId']},!0x1,{[_0x3ef325]:!0x0}),!0x0;}function vt(_0x54d06e,_0x18e626,_0x2b7e8e,_0x6d3d69,_0x54ac33,_0x2deb31){let _0x2d0068=xt(_0x2b7e8e,_0x6d3d69,_0x27773c(_0x54d06e,''));return _0x2d0068?{'id':_0x2fe09d['id'],'params':{'unitId':_0x18e626,'actions':_0x2d0068,'segmentId':'','textRanges':[{'startOffset':_0x54ac33,'endOffset':_0x54ac33,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0x2deb31}}:null;}function yt(_0x3a9c10,_0x127405){const _0x4c2d68=_0x18accd;_0x127405&&_0x3a9c10['syncExecuteCommand'](_0x127405['id'],_0x127405[_0x4c2d68(0x1df)]);}function bt(_0x3db208,_0x33a259,_0x17a015){const _0x1b150e=_0x18accd;_0x17a015&&_0x33a259['undoMutation']&&_0x3db208[_0x1b150e(0x1b8)](_0x33a259[_0x1b150e(0x1f1)]['id'],_0x33a259['undoMutation']['params']);}function xt(_0x4943fd,_0x56c0b0,_0x4115ba){const _0x4a7ab1=_0x18accd;let _0x27060e=_0x4943fd[_0x4a7ab1(0x212)],_0x44f47d=_0x56c0b0['body'],_0xf97d2a=St(_0x27060e==null?void 0x0:_0x27060e[_0x4a7ab1(0x1d2)],_0x44f47d==null?void 0x0:_0x44f47d['dataStream']);if(!_0xf97d2a||!_0x44f47d)return null;let _0x183e46=new _0x4c112a();return _0x183e46[_0x4a7ab1(0x199)](_0xf97d2a['start']),_0xf97d2a[_0x4a7ab1(0x210)]>0x0&&_0x183e46[_0x4a7ab1(0x1ed)](_0xf97d2a[_0x4a7ab1(0x210)],_0x4d9adf(_0x44f47d,_0xf97d2a['start'],_0xf97d2a[_0x4a7ab1(0x1aa)]+_0xf97d2a['insertLength'],!0x1)),_0xf97d2a[_0x4a7ab1(0x180)]>0x0&&_0x183e46['delete'](_0xf97d2a[_0x4a7ab1(0x180)]),_0x25fe93[_0x4a7ab1(0x1f4)]()[_0x4a7ab1(0x187)](_0x183e46[_0x4a7ab1(0x237)](),_0x4115ba);}function St(_0x24849d,_0x238537){const _0x3c75e2=_0x18accd;if(_0x24849d==null||_0x238537==null||_0x24849d===_0x238537)return null;let _0x3103fd=0x0;for(;_0x3103fd<_0x24849d[_0x3c75e2(0x230)]&&_0x3103fd<_0x238537[_0x3c75e2(0x230)]&&_0x24849d[_0x3103fd]===_0x238537[_0x3103fd];)_0x3103fd+=0x1;let _0x5ee6dc=_0x24849d[_0x3c75e2(0x230)],_0x11ab9f=_0x238537[_0x3c75e2(0x230)];for(;_0x5ee6dc>_0x3103fd&&_0x11ab9f>_0x3103fd&&_0x24849d[_0x5ee6dc-0x1]===_0x238537[_0x11ab9f-0x1];)--_0x5ee6dc,--_0x11ab9f;return{'start':_0x3103fd,'deleteLength':_0x5ee6dc-_0x3103fd,'insertLength':_0x11ab9f-_0x3103fd};}function Ct(_0x165f53){const _0x432bdc=_0x18accd;return{'schemaVersion':0x1,'formulas':Object['fromEntries'](Object[_0x432bdc(0x1c5)](_0x165f53[_0x432bdc(0x1b9)])[_0x432bdc(0x1f3)](([_0x28f86d,_0x44656e])=>[_0x28f86d,{..._0x44656e,..._0x44656e[_0x432bdc(0x255)]?{'numberFormat':{..._0x44656e[_0x432bdc(0x255)]}}:null,..._0x44656e[_0x432bdc(0x191)]?{'lastValue':{..._0x44656e[_0x432bdc(0x191)]}}:null}]))};}let Y=class extends _0x474e08{constructor(_0xee1db6,_0x286c47,_0x77250e,_0xab6b21){const _0x51ed8a=_0x18accd;super(),this[_0x51ed8a(0x1b4)]=_0xee1db6,this['_commandService']=_0x286c47,this['_model']=_0x77250e,this[_0x51ed8a(0x181)]=_0xab6b21,N(this,_0x51ed8a(0x1a7),new Set()),N(this,_0x51ed8a(0x1eb),!0x1),N(this,_0x51ed8a(0x1a3),!0x1),this[_0x51ed8a(0x1b4)][_0x51ed8a(0x1f6)](_0x50d692[_0x51ed8a(0x24d)])[_0x51ed8a(0x19c)](_0x5dc60e=>this[_0x51ed8a(0x181)][_0x51ed8a(0x1b2)](_0x5dc60e)),this[_0x51ed8a(0x223)](this[_0x51ed8a(0x17f)][_0x51ed8a(0x25c)][_0x51ed8a(0x1d3)](({unitId:_0x16d7db})=>this[_0x51ed8a(0x23f)](_0x16d7db))),this[_0x51ed8a(0x223)](this[_0x51ed8a(0x1b4)]['unitAdded$'][_0x51ed8a(0x1d3)](({unit:_0x1aea35})=>{const _0x2b7d1b=_0x51ed8a;_0x1aea35[_0x2b7d1b(0x250)]===_0x50d692[_0x2b7d1b(0x24d)]&&this['_queueSync'](_0x1aea35[_0x2b7d1b(0x266)]());})),this[_0x51ed8a(0x223)](this[_0x51ed8a(0x1b4)][_0x51ed8a(0x1ae)][_0x51ed8a(0x1d3)](_0x119909=>{const _0x3bc23c=_0x51ed8a;this['_service'][_0x3bc23c(0x1a2)](_0x119909[_0x3bc23c(0x266)]());})),this[_0x51ed8a(0x223)](this['_commandService'][_0x51ed8a(0x1c3)](_0x50fb88=>{const _0x37f38b=_0x51ed8a;if(_0x50fb88['id']===_0x2fe09d['id']&&wt(_0x50fb88[_0x37f38b(0x1df)])){let _0x123cb6=_0x50fb88[_0x37f38b(0x1df)];_0x123cb6[_0x37f38b(0x1a1)]||this[_0x37f38b(0x23f)](_0x123cb6[_0x37f38b(0x1ad)]);}}));}[_0x18accd(0x186)](){const _0x2bdedc=_0x18accd;this[_0x2bdedc(0x1a3)]=!0x0,super[_0x2bdedc(0x186)]();}[_0x18accd(0x238)](_0x1fbbf7){const _0x378d84=_0x18accd;this['_pendingUnitIds'][_0x378d84(0x1af)](_0x1fbbf7),!this[_0x378d84(0x1eb)]&&(this[_0x378d84(0x1eb)]=!0x0,queueMicrotask(()=>{const _0x2bb039=_0x378d84;if(this[_0x2bb039(0x1eb)]=!0x1,this[_0x2bb039(0x1a3)])return;let _0x4c5875=Array[_0x2bb039(0x1ec)](this[_0x2bb039(0x1a7)]);this[_0x2bb039(0x1a7)][_0x2bb039(0x267)](),_0x4c5875['forEach'](_0x2e8ce7=>this['_syncUnit'](_0x2e8ce7));}));}['_syncUnit'](_0x535414){const _0x598413=_0x18accd;let _0x31e807=this[_0x598413(0x1b4)][_0x598413(0x257)](_0x535414,_0x50d692[_0x598413(0x24d)]);_0x31e807&&this[_0x598413(0x181)]['syncUnit'](_0x31e807);}};Y=I([F(0x0,_0x478f5d),F(0x1,_0x222411),F(0x2,_0x2bb8ca(P)),F(0x3,_0x2bb8ca(L))],Y);function wt(_0x1fcf8e){const _0x554f22=_0x18accd;return typeof _0x1fcf8e==_0x554f22(0x224)&&!!_0x1fcf8e&&'unitId'in _0x1fcf8e&&typeof _0x1fcf8e[_0x554f22(0x1ad)]=='string'&&(!(_0x554f22(0x1a1)in _0x1fcf8e)||_0x1fcf8e[_0x554f22(0x1a1)]===void 0x0||typeof _0x1fcf8e['segmentId']==_0x554f22(0x218));}function _0x7514(_0x5bfad8,_0x5b277d){_0x5bfad8=_0x5bfad8-0x173;const _0x539718=_0x5397();let _0x7514b0=_0x539718[_0x5bfad8];return _0x7514b0;}let X=class extends _0x474e08{constructor(_0x443fc3,_0x410605){const _0x380cd6=_0x18accd;super(),this['_resourceManagerService']=_0x443fc3,this['_docFormulaModel']=_0x410605,this[_0x380cd6(0x223)](this['_resourceManagerService'][_0x380cd6(0x215)]({'pluginName':y,'businesses':[_0x50d692[_0x380cd6(0x24d)]],'toJson':_0x1c7113=>JSON[_0x380cd6(0x184)](this['_docFormulaModel']['serialize'](_0x1c7113)),'parseJson':_0x2435b9=>JSON[_0x380cd6(0x208)](_0x2435b9),'onLoad':(_0x1905dc,_0x501a4a)=>{const _0x517ebd=_0x380cd6;this[_0x517ebd(0x1e0)][_0x517ebd(0x19a)](_0x1905dc,_0x501a4a);},'onUnLoad':_0x4cc5a3=>this[_0x380cd6(0x1e0)][_0x380cd6(0x1bb)](_0x4cc5a3)}));}};X=I([F(0x0,_0x3b184b),F(0x1,_0x2bb8ca(P))],X);var Tt='@univerjs-pro/docs-formula',Et='1.1.0';const Dt={};let Z=class extends _0x474e08{constructor(_0x47ab21,_0x5a4bb3,_0x5efd96){const _0x302647=_0x18accd;super(),this[_0x302647(0x228)]=_0x47ab21,this[_0x302647(0x1ce)]=_0x5a4bb3,this[_0x302647(0x223)](_0x5efd96[_0x302647(0x1a8)]({'resolve':(_0x3f64a7,_0x5291fc)=>{const _0x569bd0=_0x302647;var _0xb3871d;return((_0xb3871d=_0x5291fc[_0x569bd0(0x1a6)])==null?void 0x0:_0xb3871d[_0x569bd0(0x252)](w)[_0x569bd0(0x1f3)](_0x3bbf2a=>({'startOffset':_0x3bbf2a['startIndex'],'endOffset':_0x3bbf2a[_0x569bd0(0x19f)]+0x1,'text':this[_0x569bd0(0x271)](_0x3f64a7,_0x3bbf2a[_0x569bd0(0x251)])})))??[];}})),this[_0x302647(0x223)](this[_0x302647(0x1ce)][_0x302647(0x1c2)]['subscribe'](({unitId:_0x40d711})=>{_0x5efd96['notifyTextChanged'](_0x40d711);}));}[_0x18accd(0x271)](_0x1764c3,_0x4d4bec){const _0x4fb140=_0x18accd;var _0x13ef5a;return((_0x13ef5a=this[_0x4fb140(0x1ce)]['getResult']({'unitId':_0x1764c3,'rangeId':_0x4d4bec}))==null?void 0x0:_0x13ef5a['text'])??'';}[_0x18accd(0x259)](_0x3effef,_0x8a8a6f,_0xd752ed){const _0x1385aa=_0x18accd;var _0xd0c458;let _0x1a1adb=this[_0x1385aa(0x228)][_0x1385aa(0x257)](_0x3effef,_0x50d692[_0x1385aa(0x24d)]),_0x20d992=_0x1a1adb==null?void 0x0:_0x1a1adb[_0x1385aa(0x222)]();if(!_0x20d992)return'';let _0x2f7fae=_0x20d992[_0x1385aa(0x1d2)][_0x1385aa(0x22a)](_0x8a8a6f,_0xd752ed),_0x4e9ae2=((_0xd0c458=_0x20d992[_0x1385aa(0x1a6)])==null?void 0x0:_0xd0c458['filter'](_0x4e46bc=>w(_0x4e46bc)&&_0x4e46bc[_0x1385aa(0x24f)]>=_0x8a8a6f&&_0x4e46bc[_0x1385aa(0x19f)]<_0xd752ed)[_0x1385aa(0x1dc)]((_0x3ccd61,_0x5addfc)=>_0x5addfc[_0x1385aa(0x24f)]-_0x3ccd61['startIndex']))??[];for(let _0x1f51b0 of _0x4e9ae2){let _0x4880ff=_0x1f51b0['startIndex']-_0x8a8a6f,_0xde8e51=_0x1f51b0[_0x1385aa(0x19f)]-_0x8a8a6f+0x1;_0x2f7fae=''+_0x2f7fae['slice'](0x0,_0x4880ff)+this[_0x1385aa(0x271)](_0x3effef,_0x1f51b0[_0x1385aa(0x251)])+_0x2f7fae[_0x1385aa(0x22a)](_0xde8e51);}return _0x2f7fae;}[_0x18accd(0x1b5)](_0x3b2503){return Ot(_0x3b2503);}['degradeBody'](_0x4562d9,_0x8fe63c,_0x399404={}){const _0x57cb6a=_0x18accd;var _0x1b3de1;return Ve({'id':_0x4562d9,'body':_0x8fe63c,'documentStyle':{}},(((_0x1b3de1=_0x8fe63c[_0x57cb6a(0x1a6)])==null?void 0x0:_0x1b3de1[_0x57cb6a(0x252)](w))??[])[_0x57cb6a(0x1f3)](_0x5c3098=>({'rangeId':_0x5c3098[_0x57cb6a(0x251)],'text':_0x399404[_0x5c3098[_0x57cb6a(0x251)]]??this[_0x57cb6a(0x271)](_0x4562d9,_0x5c3098[_0x57cb6a(0x251)])})))[_0x57cb6a(0x212)]??{'dataStream':''};}};Z=I([F(0x0,_0x478f5d),F(0x1,_0x2bb8ca(L)),F(0x2,_0x2bb8ca(_0x329faf))],Z);function Ot(_0x49a637){const _0x4bb4f2=_0x18accd;var _0x5197ed,_0x281917;let _0x589687=kt(_0x49a637),_0x23905e=Ve(_0x49a637,(((_0x5197ed=_0x49a637[_0x4bb4f2(0x212)])==null||(_0x5197ed=_0x5197ed[_0x4bb4f2(0x1a6)])==null?void 0x0:_0x5197ed['filter'](w))??[])[_0x4bb4f2(0x1f3)](_0x1e5546=>({'rangeId':_0x1e5546[_0x4bb4f2(0x251)],'text':At(_0x589687==null?void 0x0:_0x589687[_0x4bb4f2(0x1b9)][_0x1e5546[_0x4bb4f2(0x251)]])})));return _0x23905e[_0x4bb4f2(0x263)]=(_0x281917=_0x23905e[_0x4bb4f2(0x263)])==null?void 0x0:_0x281917[_0x4bb4f2(0x252)](_0x300316=>_0x300316[_0x4bb4f2(0x1c8)]!==y),_0x23905e;}function kt(_0x1d20a0){const _0x358ffc=_0x18accd;var _0x5cffd8;let _0x404e62=(_0x5cffd8=_0x1d20a0['resources'])==null||(_0x5cffd8=_0x5cffd8['find'](_0x2c9d48=>_0x2c9d48['name']===_0x358ffc(0x17d)))==null?void 0x0:_0x5cffd8[_0x358ffc(0x18b)];if(_0x404e62)try{let _0x77e541=JSON['parse'](_0x404e62);return x(_0x77e541)?_0x77e541:void 0x0;}catch{return;}}function At(_0x2eafb1){const _0x5c27e0=_0x18accd;return _0x2eafb1?_0x3cd2e8({'lastValue':_0x2eafb1['lastValue'],'numberFormat':_0x2eafb1[_0x5c27e0(0x255)]})[_0x5c27e0(0x242)]:'';}let Q=class extends _0x474e08{constructor(_0x28b65b,_0x16f87b,_0x14b4e9){const _0x5e1efb=_0x18accd;super(),this[_0x5e1efb(0x1ce)]=_0x28b65b,this['_cacheEligibilityService']=_0x16f87b,this['disposeWithMe'](_0x14b4e9['registerProvider'](this));}['collectMutations'](_0x42246f){const _0x3f7173=_0x18accd;let _0x549a79=new Map();for(let _0x460fe4 of this[_0x3f7173(0x1ce)][_0x3f7173(0x1f2)]()){var _0x31cc08;if(!this[_0x3f7173(0x24b)]['assess'](_0x460fe4[_0x3f7173(0x1ba)][_0x3f7173(0x193)],_0x460fe4['liveResult'])[_0x3f7173(0x260)])continue;let _0x3146c8=_0x1f7dc0(_0x460fe4['liveResult']),_0x3c2063=_0x3146c8?_0x1d1d0a(_0x3146c8):null;if(!_0x3c2063||jt(_0x460fe4[_0x3f7173(0x1ba)]['lastValue'],_0x3c2063))continue;let _0x530b09=_0x549a79[_0x3f7173(0x1ab)](_0x460fe4[_0x3f7173(0x175)][_0x3f7173(0x1ad)])??[];_0x530b09[_0x3f7173(0x253)]({'rangeId':_0x460fe4['identity'][_0x3f7173(0x251)],'expectedFormula':_0x460fe4['config'][_0x3f7173(0x193)],'expectedNumberFormat':(_0x31cc08=_0x460fe4[_0x3f7173(0x1ba)][_0x3f7173(0x255)])==null?void 0x0:_0x31cc08[_0x3f7173(0x1f9)],'expectedReferenceRevision':_0x460fe4[_0x3f7173(0x26f)],'lastValue':_0x3c2063}),_0x549a79['set'](_0x460fe4[_0x3f7173(0x175)][_0x3f7173(0x1ad)],_0x530b09);}return Array[_0x3f7173(0x1ec)](_0x549a79,([_0x46ccfa,_0x3b726b])=>({'id':H['id'],'params':{'unitId':_0x46ccfa,'updates':_0x3b726b}}));}};Q=I([F(0x0,_0x2bb8ca(L)),F(0x1,_0x2bb8ca(_0x562e65)),F(0x2,_0x2bb8ca(_0x29a8c7))],Q);function jt(_0x409a31,_0x4bb678){const _0x263e89=_0x18accd;return(_0x409a31==null?void 0x0:_0x409a31['v'])===_0x4bb678['v']&&(_0x409a31==null?void 0x0:_0x409a31['t'])===_0x4bb678['t']&&(_0x409a31==null?void 0x0:_0x409a31[_0x263e89(0x1f9)])===_0x4bb678[_0x263e89(0x1f9)];}let $=class extends _0x2ed24f{constructor(_0xf0cfa7=Dt,_0x50b363,_0x1d0177,_0x5d89f4){const _0x111037=_0x18accd;super(),this[_0x111037(0x19b)]=_0xf0cfa7,this[_0x111037(0x1e3)]=_0x50b363,this[_0x111037(0x227)]=_0x1d0177,this[_0x111037(0x179)]=_0x5d89f4;let {..._0x2e2ba8}=_0x350a4c({},Dt,this[_0x111037(0x19b)]);this[_0x111037(0x179)][_0x111037(0x1cc)](_0x111037(0x22f),_0x2e2ba8);}[_0x18accd(0x1d7)](){const _0x5a6701=_0x18accd;this['_injector'][_0x5a6701(0x1af)]([P]),this[_0x5a6701(0x1e3)][_0x5a6701(0x1af)]([L]),this['_injector'][_0x5a6701(0x1af)]([X]),this[_0x5a6701(0x1e3)][_0x5a6701(0x1af)]([Y]),this[_0x5a6701(0x1e3)][_0x5a6701(0x1af)]([Q]),this[_0x5a6701(0x1e3)][_0x5a6701(0x1af)]([Z]),_0x2ca687(this['_injector'],[[P],[X],[Y],[Q],[Z]]),[ot,st,V,H,U,W,G,K,ct,lt][_0x5a6701(0x19c)](_0x357689=>this[_0x5a6701(0x223)](this[_0x5a6701(0x227)][_0x5a6701(0x1e7)](_0x357689)));}};N($,_0x18accd(0x1de),y),N($,'packageName',Tt),N($,_0x18accd(0x17a),Et),N($,_0x18accd(0x250),_0x50d692['UNIVER_DOC']),$=I([_0x2a626f(_0x3c3fb2,_0x351eb2,_0x5b3025),F(0x1,_0x2bb8ca(_0x21727e)),F(0x2,_0x222411),F(0x3,_0x2701f4)],$);export{lt as ConvertDocFormulaToTextCommand,Me as DOC_FORMULA_CUSTOM_RANGE_KIND,Ne as DOC_FORMULA_OBJECT_REPLACEMENT,y as DOC_FORMULA_PLUGIN,je as DOC_FORMULA_SCHEMA_VERSION,Z as DocFormulaDisplayTextService,Y as DocFormulaLifecycleController,P as DocFormulaModel,X as DocFormulaResourceController,it as DocFormulaResultStatus,L as DocFormulaService,U as InsertDocFormulaCommand,C as InvalidDocFormulaInsertRangeError,K as RemoveDocFormulaCommand,st as RemoveDocFormulaMutation,ct as ReplaceDocFormulaWithTextCommand,H as SetDocFormulaLastValuesMutation,ot as SetDocFormulaMutation,G as SetDocFormulaNumberFormatCommand,V as SetDocFormulaResourceMutation,$ as UniverDocsFormulaPlugin,W as UpdateDocFormulaCommand,He as assertSafeDocFormulaInsertRange,Re as buildInsertDocFormulaActions,Be as buildRemoveDocFormulaActions,ze as buildUpdateDocFormulaActions,b as createEmptyDocFormulaResource,Ot as degradeDocFormulaDocumentData,T as findDocFormulaRange,Pe as isDocFormulaConfig,w as isDocFormulaRange,x as isDocFormulaResource,Fe as isFormulaLastValue};
package/lib/facade.js CHANGED
@@ -1 +1 @@
1
- var _0x5eab3b=_0x14c4;(function(_0x2344fa,_0x519f97){var _0x2cc35e=_0x14c4,_0x4eaffe=_0x2344fa();while(!![]){try{var _0x135cc6=parseInt(_0x2cc35e(0x12e))/0x1*(parseInt(_0x2cc35e(0x128))/0x2)+-parseInt(_0x2cc35e(0x14f))/0x3+parseInt(_0x2cc35e(0x13c))/0x4+-parseInt(_0x2cc35e(0x117))/0x5*(parseInt(_0x2cc35e(0x113))/0x6)+-parseInt(_0x2cc35e(0x155))/0x7*(parseInt(_0x2cc35e(0x134))/0x8)+-parseInt(_0x2cc35e(0x149))/0x9+parseInt(_0x2cc35e(0x12c))/0xa*(parseInt(_0x2cc35e(0x10e))/0xb);if(_0x135cc6===_0x519f97)break;else _0x4eaffe['push'](_0x4eaffe['shift']());}catch(_0x1ed5f7){_0x4eaffe['push'](_0x4eaffe['shift']());}}}(_0x4003,0xe5cea));import{ConvertDocFormulaToTextCommand as _0x3729b5,DocFormulaDisplayTextService as _0x5cb9d,DocFormulaModel as _0x50eb99,DocFormulaService as _0x4268ea,InsertDocFormulaCommand as _0xe5f011,RemoveDocFormulaCommand as _0x2db552,ReplaceDocFormulaWithTextCommand as _0x551dca,SetDocFormulaNumberFormatCommand as _0x4fb839,UpdateDocFormulaCommand as _0x1ca540,isDocFormulaRange as _0x3001cb}from'@univerjs-pro/docs-formula';import{ICommandService as _0x271a18,IResourceLoaderService as _0x33f5f6,IUniverInstanceService as _0x30e07a,Inject as _0x56df00,UniverInstanceType as _0x4f4b56}from'@univerjs/core';import{FDocument as _0x433c8c,FDocumentParagraph as _0x7791d5,FDocumentTextRange as _0x239d8a}from'@univerjs/docs/facade';function v(_0x29b9b2,_0x452a58){return function(_0xfaa003,_0xe2ab61){_0x452a58(_0xfaa003,_0xe2ab61,_0x29b9b2);};}function y(_0x44971a,_0x111c7e,_0x36ff77,_0x9b9dc0){var _0x5f1588=_0x14c4,_0x2c4c29=arguments['length'],_0x57fa97=_0x2c4c29<0x3?_0x111c7e:_0x9b9dc0===null?_0x9b9dc0=Object[_0x5f1588(0x147)](_0x111c7e,_0x36ff77):_0x9b9dc0,_0x211fb8;if(typeof Reflect==_0x5f1588(0x141)&&typeof Reflect[_0x5f1588(0x12b)]=='function')_0x57fa97=Reflect[_0x5f1588(0x12b)](_0x44971a,_0x111c7e,_0x36ff77,_0x9b9dc0);else{for(var _0x53ca9e=_0x44971a[_0x5f1588(0x10b)]-0x1;_0x53ca9e>=0x0;_0x53ca9e--)(_0x211fb8=_0x44971a[_0x53ca9e])&&(_0x57fa97=(_0x2c4c29<0x3?_0x211fb8(_0x57fa97):_0x2c4c29>0x3?_0x211fb8(_0x111c7e,_0x36ff77,_0x57fa97):_0x211fb8(_0x111c7e,_0x36ff77))||_0x57fa97);}return _0x2c4c29>0x3&&_0x57fa97&&Object[_0x5f1588(0x115)](_0x111c7e,_0x36ff77,_0x57fa97),_0x57fa97;}function _0x4003(){var _0x33e69b=['constructor','startOffset','length','map','_injector','1423774wCYvjs','startIndex','numberFormat','getResult','_model','12SWiAvI','_unitId','defineProperty','_insert','3664165MUUCWl','insertFormula','getFormula','body','_docsFormulaCommandService','filter','saveUnit','function','saveFormulaDisplayTextSnapshot','range','_docsFormulaModel','end','get','getSegmentId','update','_initialize','appendFormula','314qMuard','formula','default','decorate','330pVMxpT','_rangeId','2199RETkjD','_docsFormulaDisplayTextService','prototype','getFormulas','endOffset','getId','111256JCSaEI','_docsFormulaResourceLoaderService','externalReferences','customRanges','Document\x20','iterator','_getCompleteRanges','_document','3306488sVsCUZ','syncExecuteCommand','symbol','toPrimitive','extend','object','_service','_commandService','getConfig','replaceWithFormula','\x20could\x20not\x20be\x20serialized.','getOwnPropertyDescriptor','getBody','13322259RiwJpl','string','endIndex','convertToText','UNIVER_DOC','_createFormula','454119jBTFgJ','_univerInstanceService','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','createInstance','describe','getSnapshot','707YAGDlF','_getCustomRange','rangeId','getRange','find','degradeDocumentData','remove'];_0x4003=function(){return _0x33e69b;};return _0x4003();}let b=class{constructor(_0x50536c,_0x59ee35,_0x6e16ee,_0x569703,_0x25d1c3,_0x524dc2){var _0x3699c3=_0x14c4;this['_unitId']=_0x50536c,this[_0x3699c3(0x12d)]=_0x59ee35,this[_0x3699c3(0x143)]=_0x6e16ee,this['_model']=_0x569703,this[_0x3699c3(0x142)]=_0x25d1c3,this[_0x3699c3(0x150)]=_0x524dc2;}['getId'](){var _0x25bc2d=_0x14c4;return this[_0x25bc2d(0x12d)];}[_0x5eab3b(0x105)](){var _0x16c618=_0x5eab3b;let _0x150ff6=this[_0x16c618(0x103)]();return _0x150ff6?{'endOffset':_0x150ff6[_0x16c618(0x14b)]+0x1,'rangeId':_0x150ff6['rangeId'],'startOffset':_0x150ff6[_0x16c618(0x10f)]}:null;}[_0x5eab3b(0x119)](){var _0x3f1d9c=_0x5eab3b,_0x10fd55;return((_0x10fd55=this[_0x3f1d9c(0x112)][_0x3f1d9c(0x119)](this[_0x3f1d9c(0x114)],this[_0x3f1d9c(0x12d)]))==null?void 0x0:_0x10fd55['formula'])??'';}['getConfig'](){var _0xb6b5fd=_0x5eab3b;return this['_model']['getFormula'](this[_0xb6b5fd(0x114)],this[_0xb6b5fd(0x12d)])??null;}[_0x5eab3b(0x111)](){var _0x3dc902=_0x5eab3b;return this[_0x3dc902(0x142)][_0x3dc902(0x111)]({'unitId':this['_unitId'],'rangeId':this[_0x3dc902(0x12d)]})??null;}[_0x5eab3b(0x153)](){var _0x1e4c8b=_0x5eab3b;let _0x18eaff=this[_0x1e4c8b(0x105)](),_0x25f61e=this[_0x1e4c8b(0x144)](),_0x230625=this[_0x1e4c8b(0x111)]();return!_0x18eaff||!_0x25f61e||!_0x230625?null:{..._0x18eaff,'config':_0x25f61e,'formula':_0x25f61e[_0x1e4c8b(0x129)],'result':_0x230625,'type':_0x1e4c8b(0x129)};}[_0x5eab3b(0x125)](_0x1480f4){var _0x25a761=_0x5eab3b;return this[_0x25a761(0x143)]['syncExecuteCommand'](_0x1ca540['id'],{'externalReferences':_0x1480f4[_0x25a761(0x136)],'formula':_0x1480f4[_0x25a761(0x129)],'numberFormat':_0x1480f4[_0x25a761(0x110)],'rangeId':this['_rangeId'],'unitId':this[_0x25a761(0x114)]});}['setNumberFormat'](_0x47134d){var _0x1583ad=_0x5eab3b;return this[_0x1583ad(0x143)]['syncExecuteCommand'](_0x4fb839['id'],{'numberFormat':_0x47134d,'rangeId':this[_0x1583ad(0x12d)],'unitId':this[_0x1583ad(0x114)]});}[_0x5eab3b(0x108)](){var _0x5446aa=_0x5eab3b;return this[_0x5446aa(0x143)][_0x5446aa(0x13d)](_0x2db552['id'],{'rangeId':this[_0x5446aa(0x12d)],'unitId':this[_0x5446aa(0x114)]});}['replaceWithText'](_0x365293){var _0x4ff429=_0x5eab3b;return this[_0x4ff429(0x143)][_0x4ff429(0x13d)](_0x551dca['id'],{'rangeId':this['_rangeId'],'text':_0x365293,'unitId':this[_0x4ff429(0x114)]});}[_0x5eab3b(0x14c)](){var _0x30611b=_0x5eab3b;return this[_0x30611b(0x143)][_0x30611b(0x13d)](_0x3729b5['id'],{'rangeId':this[_0x30611b(0x12d)],'unitId':this[_0x30611b(0x114)]});}[_0x5eab3b(0x103)](){var _0x449863=_0x5eab3b,_0x348329;let _0x4a0a26=this[_0x449863(0x150)]['getUnit'](this[_0x449863(0x114)],_0x4f4b56[_0x449863(0x14d)]);return _0x4a0a26==null||(_0x348329=_0x4a0a26[_0x449863(0x154)]()[_0x449863(0x11a)])==null||(_0x348329=_0x348329[_0x449863(0x137)])==null?void 0x0:_0x348329[_0x449863(0x106)](_0x2223b4=>_0x2223b4[_0x449863(0x104)]===this[_0x449863(0x12d)]&&_0x3001cb(_0x2223b4));}};b=y([v(0x2,_0x271a18),v(0x3,_0x56df00(_0x50eb99)),v(0x4,_0x56df00(_0x4268ea)),v(0x5,_0x30e07a)],b);function x(_0x5d5385){'@babel/helpers - typeof';var _0x1abaa9=_0x5eab3b;return x=typeof Symbol==_0x1abaa9(0x11e)&&typeof Symbol[_0x1abaa9(0x139)]==_0x1abaa9(0x13e)?function(_0x112426){return typeof _0x112426;}:function(_0x20804a){var _0x1a75ee=_0x1abaa9;return _0x20804a&&typeof Symbol==_0x1a75ee(0x11e)&&_0x20804a[_0x1a75ee(0x109)]===Symbol&&_0x20804a!==Symbol[_0x1a75ee(0x130)]?_0x1a75ee(0x13e):typeof _0x20804a;},x(_0x5d5385);}function S(_0x1cff83,_0x6db545){var _0x1a405a=_0x5eab3b;if(x(_0x1cff83)!=_0x1a405a(0x141)||!_0x1cff83)return _0x1cff83;var _0x51ef9c=_0x1cff83[Symbol[_0x1a405a(0x13f)]];if(_0x51ef9c!==void 0x0){var _0x5b95f1=_0x51ef9c['call'](_0x1cff83,_0x6db545||_0x1a405a(0x12a));if(x(_0x5b95f1)!=_0x1a405a(0x141))return _0x5b95f1;throw TypeError(_0x1a405a(0x151));}return(_0x6db545==='string'?String:Number)(_0x1cff83);}function C(_0x5bd62d){var _0xc564ee=_0x5eab3b,_0x2caec7=S(_0x5bd62d,_0xc564ee(0x14a));return x(_0x2caec7)==_0xc564ee(0x13e)?_0x2caec7:_0x2caec7+'';}function w(_0x32fb27,_0xec8368,_0x286dee){var _0x2145b8=_0x5eab3b;return(_0xec8368=C(_0xec8368))in _0x32fb27?Object[_0x2145b8(0x115)](_0x32fb27,_0xec8368,{'value':_0x286dee,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x32fb27[_0xec8368]=_0x286dee,_0x32fb27;}var T=class extends _0x433c8c{constructor(..._0x2f4ef7){var _0x326c88=_0x5eab3b;super(..._0x2f4ef7),w(this,_0x326c88(0x11b),void 0x0),w(this,_0x326c88(0x12f),void 0x0),w(this,_0x326c88(0x121),void 0x0),w(this,_0x326c88(0x135),void 0x0);}['_initialize'](_0x3d9784){var _0x5aa9b6=_0x5eab3b;this['_docsFormulaCommandService']=_0x3d9784[_0x5aa9b6(0x123)](_0x271a18),this[_0x5aa9b6(0x12f)]=_0x3d9784[_0x5aa9b6(0x123)](_0x5cb9d),this[_0x5aa9b6(0x121)]=_0x3d9784[_0x5aa9b6(0x123)](_0x50eb99),this['_docsFormulaResourceLoaderService']=_0x3d9784['get'](_0x33f5f6);}[_0x5eab3b(0x131)](){var _0xb4dd96=_0x5eab3b;return this['_getCompleteRanges']()[_0xb4dd96(0x10c)](_0x4ae9ef=>this[_0xb4dd96(0x14e)](_0x4ae9ef[_0xb4dd96(0x104)]));}[_0x5eab3b(0x119)](_0x23ed2c){var _0x46062a=_0x5eab3b;return this[_0x46062a(0x13a)]()['some'](_0x45a132=>_0x45a132[_0x46062a(0x104)]===_0x23ed2c)?this['_createFormula'](_0x23ed2c):null;}['getFormulaAt'](_0xc06cce){var _0x58e2e5=_0x5eab3b;let _0x6921df=this['_getCompleteRanges']()['find'](_0x1eb374=>_0x1eb374[_0x58e2e5(0x10f)]<=_0xc06cce&&_0xc06cce<=_0x1eb374[_0x58e2e5(0x14b)]);return _0x6921df?this[_0x58e2e5(0x14e)](_0x6921df[_0x58e2e5(0x104)]):null;}[_0x5eab3b(0x11f)](){var _0x2a0e20=_0x5eab3b;let _0x3b2837=this[_0x2a0e20(0x135)][_0x2a0e20(0x11d)](this['id']);if(!_0x3b2837)throw Error(_0x2a0e20(0x138)+this['id']+_0x2a0e20(0x146));return this['_docsFormulaDisplayTextService'][_0x2a0e20(0x107)](_0x3b2837);}[_0x5eab3b(0x118)](_0x28de0c){var _0x4c7425=_0x5eab3b;return this[_0x4c7425(0x116)]({'externalReferences':_0x28de0c['externalReferences'],'formula':_0x28de0c[_0x4c7425(0x129)],'numberFormat':_0x28de0c[_0x4c7425(0x110)],'target':{'type':_0x4c7425(0x120),'startOffset':_0x28de0c[_0x4c7425(0x10a)],'endOffset':_0x28de0c[_0x4c7425(0x132)]},'unitId':this[_0x4c7425(0x133)]()});}[_0x5eab3b(0x116)](_0x272008){var _0x47db9a=_0x5eab3b;let _0x46b158=this[_0x47db9a(0x11b)][_0x47db9a(0x13d)](_0xe5f011['id'],_0x272008);return _0x46b158?this[_0x47db9a(0x14e)](_0x46b158['rangeId']):null;}['_getCompleteRanges'](){var _0x59635c=_0x5eab3b,_0x1ec87f;let _0x10faef=this[_0x59635c(0x121)][_0x59635c(0x131)](this[_0x59635c(0x133)]());return((_0x1ec87f=this[_0x59635c(0x148)]('')[_0x59635c(0x137)])==null?void 0x0:_0x1ec87f[_0x59635c(0x11c)](_0x3ac858=>_0x3001cb(_0x3ac858)&&_0x10faef[_0x3ac858['rangeId']]!=null))??[];}[_0x5eab3b(0x14e)](_0x2bb0e7){var _0x4457d7=_0x5eab3b;return this[_0x4457d7(0x10d)][_0x4457d7(0x152)](b,this['getId'](),_0x2bb0e7);}};_0x433c8c[_0x5eab3b(0x140)](T);var E=class extends _0x7791d5{constructor(..._0x16eaae){var _0x247165=_0x5eab3b;super(..._0x16eaae),w(this,_0x247165(0x11b),void 0x0);}[_0x5eab3b(0x126)](_0x2a4c3d){var _0x1a6361=_0x5eab3b;this[_0x1a6361(0x11b)]=_0x2a4c3d[_0x1a6361(0x123)](_0x271a18);}['insertFormula'](_0x2e75ed,_0x57cb23,_0x566d8c={}){var _0x20e679=_0x5eab3b;return this[_0x20e679(0x116)](_0x2e75ed,_0x57cb23,_0x566d8c);}[_0x5eab3b(0x127)](_0x5373f9,_0x3b43d4={}){var _0x23d8d6=_0x5eab3b;return this[_0x23d8d6(0x116)](_0x23d8d6(0x122),_0x5373f9,_0x3b43d4);}['_insert'](_0x296283,_0x3bdf17,_0x5ae7ad){var _0x3bccc1=_0x5eab3b;if(this[_0x3bccc1(0x124)]())return null;let _0x3c8406={'externalReferences':_0x5ae7ad[_0x3bccc1(0x136)],'formula':_0x3bdf17,'numberFormat':_0x5ae7ad[_0x3bccc1(0x110)],'target':{'type':'paragraph','paragraphId':this['getId'](),'position':_0x296283},'unitId':this[_0x3bccc1(0x13b)][_0x3bccc1(0x133)]()},_0x5b3c1d=this[_0x3bccc1(0x11b)]['syncExecuteCommand'](_0xe5f011['id'],_0x3c8406);return _0x5b3c1d?this[_0x3bccc1(0x10d)][_0x3bccc1(0x152)](b,this['_document'][_0x3bccc1(0x133)](),_0x5b3c1d['rangeId']):null;}};function _0x14c4(_0x50e161,_0x114d83){_0x50e161=_0x50e161-0x103;var _0x40039a=_0x4003();var _0x14c446=_0x40039a[_0x50e161];return _0x14c446;}_0x7791d5[_0x5eab3b(0x140)](E);var D=class extends _0x239d8a{constructor(..._0x24fc59){var _0xc9bc5b=_0x5eab3b;super(..._0x24fc59),w(this,_0xc9bc5b(0x11b),void 0x0);}[_0x5eab3b(0x126)](_0x670c8a){var _0x2b9d32=_0x5eab3b;this[_0x2b9d32(0x11b)]=_0x670c8a[_0x2b9d32(0x123)](_0x271a18);}[_0x5eab3b(0x145)](_0x15a459,_0x29dcfd={}){var _0x25dab9=_0x5eab3b;let {endOffset:_0x5506cb,segmentId:_0x92d378,startOffset:_0x2c03c3}=this[_0x25dab9(0x105)]();return _0x92d378?null:this['_insert'](_0x2c03c3,_0x5506cb,_0x15a459,_0x29dcfd);}['_insert'](_0x2a2d58,_0x45d689,_0x1b36ec,_0x1a8975){var _0x42ea32=_0x5eab3b;let _0x2283d5={'externalReferences':_0x1a8975[_0x42ea32(0x136)],'formula':_0x1b36ec,'numberFormat':_0x1a8975[_0x42ea32(0x110)],'target':{'type':_0x42ea32(0x120),'startOffset':_0x2a2d58,'endOffset':_0x45d689},'unitId':this[_0x42ea32(0x13b)]['getId']()},_0x26d599=this[_0x42ea32(0x11b)][_0x42ea32(0x13d)](_0xe5f011['id'],_0x2283d5);return _0x26d599?this[_0x42ea32(0x10d)][_0x42ea32(0x152)](b,this['_document'][_0x42ea32(0x133)](),_0x26d599[_0x42ea32(0x104)]):null;}};_0x239d8a['extend'](D);export{b as FDocumentFormula};
1
+ var _0x5d57b4=_0x1963;(function(_0x1b3cab,_0x2e81f7){var _0x50e2ed=_0x1963,_0x1082e3=_0x1b3cab();while(!![]){try{var _0x29f1af=parseInt(_0x50e2ed(0x1c7))/0x1+-parseInt(_0x50e2ed(0x1cb))/0x2+-parseInt(_0x50e2ed(0x19c))/0x3+parseInt(_0x50e2ed(0x1bd))/0x4+-parseInt(_0x50e2ed(0x1a2))/0x5+-parseInt(_0x50e2ed(0x1c5))/0x6*(parseInt(_0x50e2ed(0x1b0))/0x7)+parseInt(_0x50e2ed(0x1a4))/0x8;if(_0x29f1af===_0x2e81f7)break;else _0x1082e3['push'](_0x1082e3['shift']());}catch(_0x58b34d){_0x1082e3['push'](_0x1082e3['shift']());}}}(_0x4518,0xe4c56));import{ConvertDocFormulaToTextCommand as _0x75c1fa,DocFormulaDisplayTextService as _0x515404,DocFormulaModel as _0x28e2b2,DocFormulaService as _0x5786f1,InsertDocFormulaCommand as _0x34e369,RemoveDocFormulaCommand as _0x46c0d2,ReplaceDocFormulaWithTextCommand as _0xd88033,SetDocFormulaNumberFormatCommand as _0x55a52b,UpdateDocFormulaCommand as _0x23c539,isDocFormulaRange as _0x45ace4}from'@univerjs-pro/docs-formula';import{ICommandService as _0x59cbd8,IResourceLoaderService as _0x547241,IUniverInstanceService as _0x4db722,Inject as _0x6db6f9,UniverInstanceType as _0x5a957e}from'@univerjs/core';import{FDocument as _0x52274f,FDocumentParagraph as _0x41def4,FDocumentTextRange as _0x16f6e2}from'@univerjs/docs/facade';function v(_0x2ce1d0,_0x53502a){return function(_0x42a6b5,_0x13acab){_0x53502a(_0x42a6b5,_0x13acab,_0x2ce1d0);};}function y(_0x18067f,_0x5c5b4c,_0x3bd0cc,_0x3b50e8){var _0x53ce8b=_0x1963,_0x4c03da=arguments[_0x53ce8b(0x1a6)],_0x2a532c=_0x4c03da<0x3?_0x5c5b4c:_0x3b50e8===null?_0x3b50e8=Object[_0x53ce8b(0x1ac)](_0x5c5b4c,_0x3bd0cc):_0x3b50e8,_0x155aab;if(typeof Reflect==_0x53ce8b(0x1bb)&&typeof Reflect[_0x53ce8b(0x1b9)]==_0x53ce8b(0x1d6))_0x2a532c=Reflect[_0x53ce8b(0x1b9)](_0x18067f,_0x5c5b4c,_0x3bd0cc,_0x3b50e8);else{for(var _0x4ddaec=_0x18067f[_0x53ce8b(0x1a6)]-0x1;_0x4ddaec>=0x0;_0x4ddaec--)(_0x155aab=_0x18067f[_0x4ddaec])&&(_0x2a532c=(_0x4c03da<0x3?_0x155aab(_0x2a532c):_0x4c03da>0x3?_0x155aab(_0x5c5b4c,_0x3bd0cc,_0x2a532c):_0x155aab(_0x5c5b4c,_0x3bd0cc))||_0x2a532c);}return _0x4c03da>0x3&&_0x2a532c&&Object['defineProperty'](_0x5c5b4c,_0x3bd0cc,_0x2a532c),_0x2a532c;}let b=class{constructor(_0x53787e,_0x1ddb36,_0x3c14e1,_0x84701f,_0x539f22,_0x53e79f){var _0x4d1aa0=_0x1963;this[_0x4d1aa0(0x194)]=_0x53787e,this[_0x4d1aa0(0x193)]=_0x1ddb36,this['_commandService']=_0x3c14e1,this['_model']=_0x84701f,this[_0x4d1aa0(0x1cd)]=_0x539f22,this[_0x4d1aa0(0x1a3)]=_0x53e79f;}[_0x5d57b4(0x1a5)](){var _0x49a100=_0x5d57b4;return this[_0x49a100(0x193)];}['getRange'](){var _0x4f5447=_0x5d57b4;let _0x2bb025=this[_0x4f5447(0x197)]();return _0x2bb025?{'endOffset':_0x2bb025[_0x4f5447(0x1bc)]+0x1,'rangeId':_0x2bb025[_0x4f5447(0x1a8)],'startOffset':_0x2bb025[_0x4f5447(0x1b6)]}:null;}[_0x5d57b4(0x1d8)](){var _0x5d45a9=_0x5d57b4,_0x1a0349;return((_0x1a0349=this[_0x5d45a9(0x1db)][_0x5d45a9(0x1d8)](this['_unitId'],this[_0x5d45a9(0x193)]))==null?void 0x0:_0x1a0349['formula'])??'';}[_0x5d57b4(0x1be)](){var _0x3bd94b=_0x5d57b4;return this['_model'][_0x3bd94b(0x1d8)](this[_0x3bd94b(0x194)],this['_rangeId'])??null;}[_0x5d57b4(0x1dc)](){var _0x68ca8e=_0x5d57b4;return this[_0x68ca8e(0x1cd)][_0x68ca8e(0x1dc)]({'unitId':this[_0x68ca8e(0x194)],'rangeId':this['_rangeId']})??null;}['describe'](){var _0x304515=_0x5d57b4;let _0x9695f9=this[_0x304515(0x1af)](),_0x5858d4=this['getConfig'](),_0x5a2e1c=this['getResult']();return!_0x9695f9||!_0x5858d4||!_0x5a2e1c?null:{..._0x9695f9,'config':_0x5858d4,'formula':_0x5858d4[_0x304515(0x1b4)],'result':_0x5a2e1c,'type':_0x304515(0x1b4)};}[_0x5d57b4(0x1d9)](_0x46b97d){var _0x377e9a=_0x5d57b4;return this['_commandService'][_0x377e9a(0x198)](_0x23c539['id'],{'externalReferences':_0x46b97d[_0x377e9a(0x1ab)],'formula':_0x46b97d[_0x377e9a(0x1b4)],'numberFormat':_0x46b97d[_0x377e9a(0x19a)],'rangeId':this[_0x377e9a(0x193)],'unitId':this['_unitId']});}['setNumberFormat'](_0x48168c){var _0x4dab7c=_0x5d57b4;return this[_0x4dab7c(0x1b8)][_0x4dab7c(0x198)](_0x55a52b['id'],{'numberFormat':_0x48168c,'rangeId':this[_0x4dab7c(0x193)],'unitId':this['_unitId']});}[_0x5d57b4(0x1de)](){var _0x1810ea=_0x5d57b4;return this[_0x1810ea(0x1b8)]['syncExecuteCommand'](_0x46c0d2['id'],{'rangeId':this[_0x1810ea(0x193)],'unitId':this['_unitId']});}[_0x5d57b4(0x1c1)](_0x10e875){var _0x515413=_0x5d57b4;return this[_0x515413(0x1b8)][_0x515413(0x198)](_0xd88033['id'],{'rangeId':this['_rangeId'],'text':_0x10e875,'unitId':this[_0x515413(0x194)]});}['convertToText'](){var _0x1f6219=_0x5d57b4;return this[_0x1f6219(0x1b8)][_0x1f6219(0x198)](_0x75c1fa['id'],{'rangeId':this[_0x1f6219(0x193)],'unitId':this[_0x1f6219(0x194)]});}[_0x5d57b4(0x197)](){var _0x272173=_0x5d57b4,_0x3d942;let _0x153aa0=this[_0x272173(0x1a3)][_0x272173(0x1a7)](this['_unitId'],_0x5a957e[_0x272173(0x19d)]);return _0x153aa0==null||(_0x3d942=_0x153aa0[_0x272173(0x1aa)]()['body'])==null||(_0x3d942=_0x3d942['customRanges'])==null?void 0x0:_0x3d942[_0x272173(0x1a9)](_0x153ee3=>_0x153ee3[_0x272173(0x1a8)]===this[_0x272173(0x193)]&&_0x45ace4(_0x153ee3));}};b=y([v(0x2,_0x59cbd8),v(0x3,_0x6db6f9(_0x28e2b2)),v(0x4,_0x6db6f9(_0x5786f1)),v(0x5,_0x4db722)],b);function x(_0x534e2b){'@babel/helpers - typeof';var _0x4263ce=_0x5d57b4;return x=typeof Symbol==_0x4263ce(0x1d6)&&typeof Symbol[_0x4263ce(0x19e)]=='symbol'?function(_0x712503){return typeof _0x712503;}:function(_0x1ea102){var _0x598169=_0x4263ce;return _0x1ea102&&typeof Symbol==_0x598169(0x1d6)&&_0x1ea102[_0x598169(0x1d2)]===Symbol&&_0x1ea102!==Symbol[_0x598169(0x1c4)]?'symbol':typeof _0x1ea102;},x(_0x534e2b);}function _0x1963(_0x4e07d3,_0x4f0c9f){_0x4e07d3=_0x4e07d3-0x193;var _0x451819=_0x4518();var _0x1963b1=_0x451819[_0x4e07d3];return _0x1963b1;}function S(_0x17feaf,_0x80c196){var _0x1abbc8=_0x5d57b4;if(x(_0x17feaf)!=_0x1abbc8(0x1bb)||!_0x17feaf)return _0x17feaf;var _0x289f0e=_0x17feaf[Symbol['toPrimitive']];if(_0x289f0e!==void 0x0){var _0x4565e8=_0x289f0e[_0x1abbc8(0x1ae)](_0x17feaf,_0x80c196||_0x1abbc8(0x196));if(x(_0x4565e8)!=_0x1abbc8(0x1bb))return _0x4565e8;throw TypeError(_0x1abbc8(0x1b7));}return(_0x80c196==='string'?String:Number)(_0x17feaf);}function C(_0x582b65){var _0xe32d27=_0x5d57b4,_0x2beafc=S(_0x582b65,_0xe32d27(0x1b1));return x(_0x2beafc)==_0xe32d27(0x1df)?_0x2beafc:_0x2beafc+'';}function w(_0x4d6902,_0xc70968,_0x2eea7f){var _0x59e956=_0x5d57b4;return(_0xc70968=C(_0xc70968))in _0x4d6902?Object[_0x59e956(0x1c6)](_0x4d6902,_0xc70968,{'value':_0x2eea7f,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4d6902[_0xc70968]=_0x2eea7f,_0x4d6902;}var T=class extends _0x52274f{constructor(..._0x268497){var _0x536a34=_0x5d57b4;super(..._0x268497),w(this,'_docsFormulaCommandService',void 0x0),w(this,_0x536a34(0x1d5),void 0x0),w(this,_0x536a34(0x1a1),void 0x0),w(this,'_docsFormulaResourceLoaderService',void 0x0);}['_initialize'](_0x54d07d){var _0x2893d8=_0x5d57b4;this[_0x2893d8(0x1a0)]=_0x54d07d['get'](_0x59cbd8),this[_0x2893d8(0x1d5)]=_0x54d07d[_0x2893d8(0x1ba)](_0x515404),this['_docsFormulaModel']=_0x54d07d['get'](_0x28e2b2),this[_0x2893d8(0x1b5)]=_0x54d07d['get'](_0x547241);}[_0x5d57b4(0x1ca)](){var _0x517859=_0x5d57b4;return this['_getCompleteRanges']()[_0x517859(0x1da)](_0x237faf=>this[_0x517859(0x1b3)](_0x237faf[_0x517859(0x1a8)]));}[_0x5d57b4(0x1d8)](_0x262fb3){var _0x404c4e=_0x5d57b4;return this[_0x404c4e(0x1d0)]()[_0x404c4e(0x1ce)](_0x11ee78=>_0x11ee78[_0x404c4e(0x1a8)]===_0x262fb3)?this[_0x404c4e(0x1b3)](_0x262fb3):null;}['getFormulaAt'](_0x399b7a){var _0x4703a3=_0x5d57b4;let _0x3dc992=this['_getCompleteRanges']()[_0x4703a3(0x1a9)](_0x3f9a5e=>_0x3f9a5e[_0x4703a3(0x1b6)]<=_0x399b7a&&_0x399b7a<=_0x3f9a5e[_0x4703a3(0x1bc)]);return _0x3dc992?this[_0x4703a3(0x1b3)](_0x3dc992['rangeId']):null;}['saveFormulaDisplayTextSnapshot'](){var _0x30190c=_0x5d57b4;let _0x5f4948=this['_docsFormulaResourceLoaderService'][_0x30190c(0x1dd)](this['id']);if(!_0x5f4948)throw Error(_0x30190c(0x1c8)+this['id']+_0x30190c(0x19f));return this[_0x30190c(0x1d5)][_0x30190c(0x1d1)](_0x5f4948);}[_0x5d57b4(0x1ad)](_0x2b6e96){var _0x345889=_0x5d57b4;return this[_0x345889(0x1c9)]({'externalReferences':_0x2b6e96[_0x345889(0x1ab)],'formula':_0x2b6e96[_0x345889(0x1b4)],'numberFormat':_0x2b6e96[_0x345889(0x19a)],'target':{'type':'range','startOffset':_0x2b6e96[_0x345889(0x1cf)],'endOffset':_0x2b6e96[_0x345889(0x1d3)]},'unitId':this['getId']()});}[_0x5d57b4(0x1c9)](_0x1777cc){var _0x54fc2a=_0x5d57b4;let _0x3657e6=this[_0x54fc2a(0x1a0)][_0x54fc2a(0x198)](_0x34e369['id'],_0x1777cc);return _0x3657e6?this[_0x54fc2a(0x1b3)](_0x3657e6[_0x54fc2a(0x1a8)]):null;}['_getCompleteRanges'](){var _0x472825=_0x5d57b4,_0x34e2b0;let _0x53be54=this[_0x472825(0x1a1)]['getFormulas'](this['getId']());return((_0x34e2b0=this[_0x472825(0x19b)]('')['customRanges'])==null?void 0x0:_0x34e2b0[_0x472825(0x1c0)](_0x1bb8fa=>_0x45ace4(_0x1bb8fa)&&_0x53be54[_0x1bb8fa[_0x472825(0x1a8)]]!=null))??[];}[_0x5d57b4(0x1b3)](_0x57477c){var _0x48daac=_0x5d57b4;return this['_injector'][_0x48daac(0x1c2)](b,this[_0x48daac(0x1a5)](),_0x57477c);}};function _0x4518(){var _0x303e97=['_createFormula','formula','_docsFormulaResourceLoaderService','startIndex','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_commandService','decorate','get','object','endIndex','6717788CIeGFT','getConfig','paragraph','filter','replaceWithText','createInstance','_document','prototype','6vgMwjJ','defineProperty','1563659TcSili','Document\x20','_insert','getFormulas','2789530DvWApG','_initialize','_service','some','startOffset','_getCompleteRanges','degradeDocumentData','constructor','endOffset','_injector','_docsFormulaDisplayTextService','function','end','getFormula','update','map','_model','getResult','saveUnit','remove','symbol','_rangeId','_unitId','extend','default','_getCustomRange','syncExecuteCommand','replaceWithFormula','numberFormat','getBody','1002327qNmzgs','UNIVER_DOC','iterator','\x20could\x20not\x20be\x20serialized.','_docsFormulaCommandService','_docsFormulaModel','602045VgLlpK','_univerInstanceService','5408536jJwRLS','getId','length','getUnit','rangeId','find','getSnapshot','externalReferences','getOwnPropertyDescriptor','insertFormula','call','getRange','7929908GOTXjC','string','appendFormula'];_0x4518=function(){return _0x303e97;};return _0x4518();}_0x52274f['extend'](T);var E=class extends _0x41def4{constructor(..._0x301a4a){var _0x14dd70=_0x5d57b4;super(..._0x301a4a),w(this,_0x14dd70(0x1a0),void 0x0);}[_0x5d57b4(0x1cc)](_0x2faa00){var _0x359d23=_0x5d57b4;this[_0x359d23(0x1a0)]=_0x2faa00['get'](_0x59cbd8);}['insertFormula'](_0x1a7599,_0xc36d8f,_0x273087={}){var _0x4cd2d7=_0x5d57b4;return this[_0x4cd2d7(0x1c9)](_0x1a7599,_0xc36d8f,_0x273087);}[_0x5d57b4(0x1b2)](_0x1d7c49,_0x586f47={}){var _0x5111cb=_0x5d57b4;return this[_0x5111cb(0x1c9)](_0x5111cb(0x1d7),_0x1d7c49,_0x586f47);}[_0x5d57b4(0x1c9)](_0x587682,_0x3ba007,_0x5424c4){var _0x5d5e1e=_0x5d57b4;if(this['getSegmentId']())return null;let _0x1dc49e={'externalReferences':_0x5424c4[_0x5d5e1e(0x1ab)],'formula':_0x3ba007,'numberFormat':_0x5424c4['numberFormat'],'target':{'type':_0x5d5e1e(0x1bf),'paragraphId':this['getId'](),'position':_0x587682},'unitId':this[_0x5d5e1e(0x1c3)]['getId']()},_0x4e39be=this[_0x5d5e1e(0x1a0)][_0x5d5e1e(0x198)](_0x34e369['id'],_0x1dc49e);return _0x4e39be?this[_0x5d5e1e(0x1d4)]['createInstance'](b,this['_document'][_0x5d5e1e(0x1a5)](),_0x4e39be['rangeId']):null;}};_0x41def4['extend'](E);var D=class extends _0x16f6e2{constructor(..._0x25ea9d){var _0x380f17=_0x5d57b4;super(..._0x25ea9d),w(this,_0x380f17(0x1a0),void 0x0);}[_0x5d57b4(0x1cc)](_0x3c4d83){var _0x4f3993=_0x5d57b4;this['_docsFormulaCommandService']=_0x3c4d83[_0x4f3993(0x1ba)](_0x59cbd8);}[_0x5d57b4(0x199)](_0x5aa9ae,_0x2457cf={}){var _0x2dac1c=_0x5d57b4;let {endOffset:_0x37c9bc,segmentId:_0x4bf19b,startOffset:_0x13202e}=this[_0x2dac1c(0x1af)]();return _0x4bf19b?null:this[_0x2dac1c(0x1c9)](_0x13202e,_0x37c9bc,_0x5aa9ae,_0x2457cf);}[_0x5d57b4(0x1c9)](_0x71818f,_0x3304ad,_0x1e57e7,_0x128fdd){var _0x4cf90a=_0x5d57b4;let _0x204f24={'externalReferences':_0x128fdd[_0x4cf90a(0x1ab)],'formula':_0x1e57e7,'numberFormat':_0x128fdd['numberFormat'],'target':{'type':'range','startOffset':_0x71818f,'endOffset':_0x3304ad},'unitId':this[_0x4cf90a(0x1c3)][_0x4cf90a(0x1a5)]()},_0x5c67fb=this[_0x4cf90a(0x1a0)][_0x4cf90a(0x198)](_0x34e369['id'],_0x204f24);return _0x5c67fb?this[_0x4cf90a(0x1d4)][_0x4cf90a(0x1c2)](b,this[_0x4cf90a(0x1c3)][_0x4cf90a(0x1a5)](),_0x5c67fb[_0x4cf90a(0x1a8)]):null;}};_0x16f6e2[_0x5d57b4(0x195)](D);export{b as FDocumentFormula};