@univerjs-pro/docs-formula 1.0.4 → 1.2.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/cjs/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +9 -9
package/lib/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 _0x1173d9=_0x24c4;(function(_0x1054ab,_0x3047dc){const _0x37a0f7=_0x24c4,_0x47b29e=_0x1054ab();while(!![]){try{const _0x247168=-parseInt(_0x37a0f7(0x1ec))/0x1+-parseInt(_0x37a0f7(0x1b9))/0x2+parseInt(_0x37a0f7(0x1a0))/0x3+parseInt(_0x37a0f7(0x13c))/0x4+parseInt(_0x37a0f7(0x127))/0x5*(parseInt(_0x37a0f7(0x166))/0x6)+-parseInt(_0x37a0f7(0x194))/0x7*(parseInt(_0x37a0f7(0x154))/0x8)+parseInt(_0x37a0f7(0x128))/0x9*(-parseInt(_0x37a0f7(0x205))/0xa);if(_0x247168===_0x3047dc)break;else _0x47b29e['push'](_0x47b29e['shift']());}catch(_0x30db35){_0x47b29e['push'](_0x47b29e['shift']());}}}(_0x3422,0x90f2e));import{FormulaCacheEligibilityService as _0x4ef013,FormulaLastValuePersistenceService as _0x29264c,HostExternalReferenceModel as _0x4e7a8f,UniverProFormulaEnginePlugin as _0x2ac530,buildUpsertHostExternalReferenceMutations as _0x18f854,collectFormulaExternalReferenceQualifiers as _0x40128b,getScalarFormulaResultCell as _0x3d55cd,resolveFormulaResultPresentation as _0x32521a,resolveHostFormulaExternalReferences as _0x3d2466,toFormulaLastValue as _0x24052f}from'@univerjs-pro/engine-formula';import{CellValueType as _0x144c98,CommandType as _0x2e2ecf,CustomRangeType as _0x14b828,DataStreamTreeTokenType as _0x5a972a,DependentOn as _0x192577,Disposable as _0x487bea,ICommandService as _0x170d7c,IConfigService as _0x335e00,IResourceManagerService as _0x39a957,IUndoRedoService as _0x4c8196,IUniverInstanceService as _0x1cb79e,Inject as _0x41fe0f,Injector as _0x4a690a,JSONX as _0x534e11,Plugin as _0x31da3e,TextX as _0x2dfabc,Tools as _0x13c34f,UniverInstanceType as _0xe966be,generateRandomId as _0x7ffdf2,getBodySliceForTextXAction as _0x4b0522,getCustomRangeInterval as _0x1c5e95,getParagraphContentStartOffset as _0x882200,getRichTextEditPath as _0x2a5420,merge as _0x1b50a3,shiftExclusiveRangeOnDelete as _0x324bcb,shiftExclusiveRangeOnInsert as _0x127e50,shiftInclusiveRangeOnDelete as _0x2e67c7,shiftInclusiveRangeOnInsert as _0xae953e,touchDependencies as _0x218854}from'@univerjs/core';import{DOC_SELECTION_OPTION_PRESERVE_CARET as _0xc6b882,DocSelectionManagerService as _0x764d00,DocTextResolverService as _0x325458,RichTextEditingMutation as _0x3f9ca3,UniverDocsPlugin as _0x48ceb4}from'@univerjs/docs';import{FormulaResultStatus as _0x208399,LexerTreeBuilder as _0x26af78,OtherFormulaBizType as _0xca11f,RegisterOtherFormulaService as _0x78c724}from'@univerjs/engine-formula';import{Subject as _0x11a859}from'rxjs';import{UniverLicensePlugin as _0x221e8d}from'@univerjs-pro/license';const y='DOC_FORMULA_PLUGIN',je=0x1,Me=_0x1173d9(0x12d),Ne='';function _0x24c4(_0x44fd83,_0x3adc5b){_0x44fd83=_0x44fd83-0x124;const _0x3422a8=_0x3422();let _0x24c4df=_0x3422a8[_0x44fd83];return _0x24c4df;}function b(){return{'schemaVersion':0x1,'formulas':{}};}function x(_0x29c68e){const _0x3e88e1=_0x1173d9;return!_0x29c68e||typeof _0x29c68e!=_0x3e88e1(0x21d)||!S(_0x29c68e,[_0x3e88e1(0x17e),_0x3e88e1(0x183)])||!(_0x3e88e1(0x17e)in _0x29c68e)||_0x29c68e['schemaVersion']!==0x1||!(_0x3e88e1(0x183)in _0x29c68e)||!_0x29c68e[_0x3e88e1(0x183)]||typeof _0x29c68e[_0x3e88e1(0x183)]!=_0x3e88e1(0x21d)||Array[_0x3e88e1(0x1c5)](_0x29c68e[_0x3e88e1(0x183)])?!0x1:Object[_0x3e88e1(0x188)](_0x29c68e['formulas'])[_0x3e88e1(0x153)](([_0x2eb237,_0x330c42])=>_0x2eb237[_0x3e88e1(0x1e6)]>0x0&&Pe(_0x330c42));}function Pe(_0x23299e){const _0xf12bb4=_0x1173d9;return!_0x23299e||typeof _0x23299e!=_0xf12bb4(0x21d)||!S(_0x23299e,[_0xf12bb4(0x1de),_0xf12bb4(0x1ae),_0xf12bb4(0x1b4)])||!(_0xf12bb4(0x1de)in _0x23299e)||typeof _0x23299e[_0xf12bb4(0x1de)]!='string'||!_0x23299e['formula'][_0xf12bb4(0x1bf)]()||_0xf12bb4(0x1ae)in _0x23299e&&_0x23299e['numberFormat']!=null&&(typeof _0x23299e[_0xf12bb4(0x1ae)]!='object'||!S(_0x23299e[_0xf12bb4(0x1ae)],['pattern'])||!(_0xf12bb4(0x1b6)in _0x23299e[_0xf12bb4(0x1ae)])||typeof _0x23299e[_0xf12bb4(0x1ae)]['pattern']!='string')?!0x1:!(_0xf12bb4(0x1b4)in _0x23299e)||_0x23299e['lastValue']==null||Fe(_0x23299e[_0xf12bb4(0x1b4)]);}function Fe(_0x51295c){const _0x47b459=_0x1173d9;return!_0x51295c||typeof _0x51295c!=_0x47b459(0x21d)||!S(_0x51295c,['v','t',_0x47b459(0x1b6)])||!('v'in _0x51295c)||_0x51295c['v']!==null&&typeof _0x51295c['v']!=_0x47b459(0x1b7)&&typeof _0x51295c['v']!=_0x47b459(0x1ba)&&typeof _0x51295c['v']!=_0x47b459(0x202)||'t'in _0x51295c&&_0x51295c['t']!=null&&!Ie(_0x51295c['t'])?!0x1:!(_0x47b459(0x1b6)in _0x51295c)||_0x51295c[_0x47b459(0x1b6)]==null||typeof _0x51295c[_0x47b459(0x1b6)]==_0x47b459(0x1b7);}function S(_0x21e426,_0x4d2b57){const _0x1a3eef=_0x1173d9;let _0x5b7e81=new Set(_0x4d2b57);return Object[_0x1a3eef(0x16c)](_0x21e426)[_0x1a3eef(0x153)](_0x265261=>_0x5b7e81['has'](_0x265261));}function Ie(_0x2986cb){const _0xffe6a2=_0x1173d9;return typeof _0x2986cb==_0xffe6a2(0x1ba)&&Object['values'](_0x144c98)[_0xffe6a2(0x1c2)](_0x2986cb);}const Le=new Set([_0x5a972a[_0x1173d9(0x181)],_0x5a972a['TABLE_START'],_0x5a972a[_0x1173d9(0x16e)],_0x5a972a[_0x1173d9(0x1c6)],_0x5a972a[_0x1173d9(0x14d)],_0x5a972a['TABLE_ROW_END'],_0x5a972a[_0x1173d9(0x1df)],_0x5a972a[_0x1173d9(0x21f)],_0x5a972a[_0x1173d9(0x1ef)],_0x5a972a[_0x1173d9(0x21b)],_0x5a972a['COLUMN_GROUP_END'],_0x5a972a[_0x1173d9(0x143)],_0x5a972a[_0x1173d9(0x1d4)],_0x5a972a[_0x1173d9(0x18e)]]);var C=class extends Error{constructor(){super('Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries');}};function Re(_0x52ccf1){const _0x2ff303=_0x1173d9;var _0xf22a04,_0xfd92e4;let _0x297c81=_0x13c34f[_0x2ff303(0x168)](_0x52ccf1[_0x2ff303(0x150)]),_0x391bbd=j(_0x297c81),{startOffset:_0xd7b251,endOffset:_0x27cbd9}=We(_0x391bbd,_0x52ccf1[_0x2ff303(0x185)],_0x52ccf1[_0x2ff303(0x186)]);He(_0x391bbd,_0xd7b251,_0x27cbd9);let _0x5bb1c9=((_0xf22a04=_0x391bbd[_0x2ff303(0x1c9)])==null?void 0x0:_0xf22a04[_0x2ff303(0x1a8)](_0xe74ebe=>{const _0x558db4=_0x2ff303;if(!w(_0xe74ebe))return!0x1;let _0x3b5521=_0x1c5e95(_0xe74ebe);return _0x3b5521[_0x558db4(0x186)]>_0xd7b251&&_0x3b5521['startOffset']<_0x27cbd9;})[_0x2ff303(0x17f)](_0x1e2229=>_0x1e2229[_0x2ff303(0x217)]))??[];qe(_0x391bbd,_0xd7b251,_0x27cbd9,''),_0x391bbd['customRanges']=[...((_0xfd92e4=_0x391bbd[_0x2ff303(0x1c9)])==null?void 0x0:_0xfd92e4['filter'](_0x3d564b=>!_0x5bb1c9[_0x2ff303(0x1c2)](_0x3d564b['rangeId'])&&_0x3d564b[_0x2ff303(0x217)]!==_0x52ccf1['rangeId']))??[],Ue(_0x52ccf1['rangeId'],_0xd7b251)][_0x2ff303(0x1c1)]((_0x4843fd,_0x10eabe)=>_0x4843fd[_0x2ff303(0x1f9)]-_0x10eabe['startIndex']);let _0x4257f7=E(_0x52ccf1[_0x2ff303(0x1e7)]);return _0x5bb1c9['forEach'](_0x1a51e7=>{const _0x2fc0cd=_0x2ff303;delete _0x4257f7[_0x2fc0cd(0x183)][_0x1a51e7];}),_0x4257f7['formulas'][_0x52ccf1[_0x2ff303(0x217)]]=_0x13c34f[_0x2ff303(0x168)](_0x52ccf1['config']),{'nextDocumentData':_0x297c81,'nextResource':_0x4257f7,'cursorOffset':_0xd7b251+0x1};}function ze(_0x2bab12){const _0x2a4af6=_0x1173d9;var _0x91564c,_0x28f6f8;let _0x1b6eb5=_0x13c34f['deepClone'](_0x2bab12[_0x2a4af6(0x150)]),_0xaacf8a=(_0x91564c=j(_0x1b6eb5)[_0x2a4af6(0x1c9)])==null?void 0x0:_0x91564c['find'](_0x1ca4e2=>_0x1ca4e2[_0x2a4af6(0x217)]===_0x2bab12[_0x2a4af6(0x217)]&&w(_0x1ca4e2));if(!_0xaacf8a||!((_0x28f6f8=_0x2bab12[_0x2a4af6(0x1e7)])!=null&&_0x28f6f8[_0x2a4af6(0x183)][_0x2bab12['rangeId']]))return null;let _0x5e6d38=E(_0x2bab12[_0x2a4af6(0x1e7)]);return _0x5e6d38['formulas'][_0x2bab12[_0x2a4af6(0x217)]]=_0x13c34f[_0x2a4af6(0x168)](_0x2bab12[_0x2a4af6(0x216)]),{'nextDocumentData':_0x1b6eb5,'nextResource':_0x5e6d38,'cursorOffset':_0xaacf8a[_0x2a4af6(0x15e)]+0x1};}function Be(_0x4baa3c){const _0x141623=_0x1173d9;let _0xabe635=_0x13c34f[_0x141623(0x168)](_0x4baa3c[_0x141623(0x150)]),_0x7b7226=Je(_0xabe635,_0x4baa3c[_0x141623(0x217)],_0x4baa3c[_0x141623(0x204)]??'');if(_0x7b7226==null)return null;let _0x38c3a2=E(_0x4baa3c[_0x141623(0x1e7)]);return delete _0x38c3a2[_0x141623(0x183)][_0x4baa3c[_0x141623(0x217)]],{'nextDocumentData':_0xabe635,'nextResource':_0x38c3a2,'cursorOffset':_0x7b7226};}function Ve(_0x16a79b,_0x55591f){const _0x2e525b=_0x1173d9;var _0x58e65e;let _0x23819b=_0x13c34f[_0x2e525b(0x168)](_0x16a79b),_0x2de3ea=_0x23819b[_0x2e525b(0x1e1)];if(!_0x2de3ea)return _0x23819b;let _0x1cc7a5=new Map(_0x55591f[_0x2e525b(0x17f)](_0xa52142=>[_0xa52142[_0x2e525b(0x217)],_0xa52142[_0x2e525b(0x204)]])),_0x30fd31=((_0x58e65e=_0x2de3ea['customRanges'])==null?void 0x0:_0x58e65e[_0x2e525b(0x1a8)](_0x13cf27=>w(_0x13cf27)&&_0x1cc7a5[_0x2e525b(0x130)](_0x13cf27[_0x2e525b(0x217)]))[_0x2e525b(0x1c1)]((_0x97cc5a,_0x2f7ef7)=>_0x2f7ef7[_0x2e525b(0x1f9)]-_0x97cc5a[_0x2e525b(0x1f9)]))??[];for(let _0x3f0e0a of _0x30fd31)Je(_0x23819b,_0x3f0e0a[_0x2e525b(0x217)],_0x1cc7a5[_0x2e525b(0x137)](_0x3f0e0a[_0x2e525b(0x217)])??'');return _0x23819b;}function w(_0x2546b3){const _0x9a3531=_0x1173d9;var _0x416999;return(_0x2546b3==null?void 0x0:_0x2546b3[_0x9a3531(0x1a5)])===_0x14b828[_0x9a3531(0x19b)]&&_0x2546b3[_0x9a3531(0x1ac)]===!0x0&&((_0x416999=_0x2546b3[_0x9a3531(0x1b2)])==null?void 0x0:_0x416999['kind'])===_0x9a3531(0x12d);}function T(_0x35e79c,_0x134953){const _0x2cb2a5=_0x1173d9;var _0x1a42ee;return _0x35e79c==null||(_0x1a42ee=_0x35e79c[_0x2cb2a5(0x1c9)])==null?void 0x0:_0x1a42ee[_0x2cb2a5(0x1c3)](_0x8d3c9=>_0x8d3c9[_0x2cb2a5(0x217)]===_0x134953&&w(_0x8d3c9));}function He(_0x595b96,_0x43574a,_0x5c3094){const _0x139cf0=_0x1173d9;if(_0x43574a===_0x5c3094){if(Le[_0x139cf0(0x130)](_0x595b96[_0x139cf0(0x16d)][_0x43574a]))throw new C();}else{for(let _0xad2637=_0x43574a;_0xad2637<_0x5c3094;_0xad2637++)if(_0x595b96['dataStream'][_0xad2637]===_0x5a972a[_0x139cf0(0x132)]||Le[_0x139cf0(0x130)](_0x595b96['dataStream'][_0xad2637]))throw new C();}}function Ue(_0x20ecb1,_0x3f6faa){return{'startIndex':_0x3f6faa,'endIndex':_0x3f6faa,'rangeId':_0x20ecb1,'rangeType':_0x14b828['CUSTOM'],'wholeEntity':!0x0,'properties':{'kind':Me}};}function E(_0x4688ae){const _0x266f86=_0x1173d9;return _0x4688ae?_0x13c34f[_0x266f86(0x168)](_0x4688ae):b();}function We(_0x2dfbda,_0x616eb0,_0x5c678e){const _0x2bd236=_0x1173d9;let _0x297f69=Ke(_0x2dfbda),_0x394e81=_0x616eb0??_0x297f69,_0xba4cab=_0x5c678e??_0x394e81;return{'startOffset':Ge(Math['min'](_0x394e81,_0xba4cab),_0x297f69),'endOffset':Ge(Math[_0x2bd236(0x221)](_0x394e81,_0xba4cab),_0x297f69)};}function Ge(_0x4892f0,_0x2bb1c2){const _0x4975c6=_0x1173d9;return Math[_0x4975c6(0x221)](0x0,Math[_0x4975c6(0x1f2)](_0x4892f0,_0x2bb1c2));}function Ke(_0x11174f){const _0x40a7b0=_0x1173d9;return _0x11174f['dataStream'][_0x40a7b0(0x1fc)](''+_0x5a972a[_0x40a7b0(0x132)]+_0x5a972a[_0x40a7b0(0x181)])?Math[_0x40a7b0(0x221)](0x0,_0x11174f['dataStream'][_0x40a7b0(0x1e6)]-0x2):_0x11174f[_0x40a7b0(0x16d)][_0x40a7b0(0x1fc)](_0x5a972a[_0x40a7b0(0x181)])?Math['max'](0x0,_0x11174f[_0x40a7b0(0x16d)][_0x40a7b0(0x1e6)]-0x1):_0x11174f['dataStream'][_0x40a7b0(0x1e6)];}function qe(_0x5a55e7,_0x294af2,_0x318e32,_0x4b6e5b){_0x318e32>_0x294af2&&Xe(_0x5a55e7,_0x294af2,_0x318e32),Ye(_0x5a55e7,_0x294af2,_0x4b6e5b);}function Je(_0x1941aa,_0x27a7b9,_0x16a66b){const _0x4a61da=_0x1173d9;var _0x113c56,_0x775c43;let _0x468627=j(_0x1941aa),_0x406041=(_0x113c56=_0x468627[_0x4a61da(0x1c9)])==null?void 0x0:_0x113c56['find'](_0x191395=>_0x191395[_0x4a61da(0x217)]===_0x27a7b9&&w(_0x191395));if(!_0x406041)return null;let _0x5c764f=_0x1c5e95(_0x406041);return qe(_0x468627,_0x5c764f['startOffset'],_0x5c764f[_0x4a61da(0x186)],_0x16a66b),_0x468627[_0x4a61da(0x1c9)]=(_0x775c43=_0x468627['customRanges'])==null?void 0x0:_0x775c43[_0x4a61da(0x1a8)](_0x24f0e0=>_0x24f0e0[_0x4a61da(0x217)]!==_0x27a7b9),_0x5c764f[_0x4a61da(0x185)]+_0x16a66b[_0x4a61da(0x1e6)];}function Ye(_0x5000c0,_0x57c2e5,_0x371b15){const _0x165096=_0x1173d9;_0x371b15&&(_0x5000c0[_0x165096(0x16d)]=''+_0x5000c0[_0x165096(0x16d)]['slice'](0x0,_0x57c2e5)+_0x371b15+_0x5000c0[_0x165096(0x16d)][_0x165096(0x12a)](_0x57c2e5),Ze(_0x5000c0,_0x57c2e5,_0x371b15['length']));}function Xe(_0x27c549,_0x140dd1,_0xdfd73c){const _0x2843bd=_0x1173d9;let _0x4a5feb=_0xdfd73c-_0x140dd1;_0x27c549[_0x2843bd(0x16d)]=''+_0x27c549['dataStream'][_0x2843bd(0x12a)](0x0,_0x140dd1)+_0x27c549['dataStream'][_0x2843bd(0x12a)](_0xdfd73c),Qe(_0x27c549,_0x140dd1,_0x4a5feb);}function Ze(_0xcdbf53,_0x4b7e3b,_0x1b2890){const _0x447fe2=_0x1173d9;_0xcdbf53[_0x447fe2(0x1e9)]=D(_0xcdbf53['paragraphs'],_0x4b7e3b,_0x1b2890),_0xcdbf53['sectionBreaks']=D(_0xcdbf53[_0x447fe2(0x1b3)],_0x4b7e3b,_0x1b2890),_0xcdbf53[_0x447fe2(0x12c)]=D(_0xcdbf53['customBlocks'],_0x4b7e3b,_0x1b2890),_0xcdbf53[_0x447fe2(0x1e2)]=$e(_0xcdbf53['textRuns'],_0x4b7e3b,_0x1b2890),_0xcdbf53['tables']=et(_0xcdbf53[_0x447fe2(0x1d8)],_0x4b7e3b,_0x1b2890),_0xcdbf53[_0x447fe2(0x199)]=k(_0xcdbf53[_0x447fe2(0x199)],_0x4b7e3b,_0x1b2890),_0xcdbf53['customRanges']=k(_0xcdbf53['customRanges'],_0x4b7e3b,_0x1b2890),_0xcdbf53[_0x447fe2(0x17c)]=k(_0xcdbf53['customDecorations'],_0x4b7e3b,_0x1b2890),_0xcdbf53[_0x447fe2(0x192)]=k(_0xcdbf53[_0x447fe2(0x192)],_0x4b7e3b,_0x1b2890);}function Qe(_0x422cd4,_0x5dd154,_0x5c5091){const _0x47899e=_0x1173d9;var _0x325dd1,_0x4850f4;_0x422cd4[_0x47899e(0x1e9)]=O(_0x422cd4['paragraphs'],_0x5dd154,_0x5c5091),_0x422cd4[_0x47899e(0x1b3)]=O(_0x422cd4[_0x47899e(0x1b3)],_0x5dd154,_0x5c5091),_0x422cd4[_0x47899e(0x12c)]=O(_0x422cd4[_0x47899e(0x12c)],_0x5dd154,_0x5c5091),_0x422cd4[_0x47899e(0x1e2)]=(_0x325dd1=tt((_0x4850f4=_0x422cd4[_0x47899e(0x1e2)])==null?void 0x0:_0x4850f4[_0x47899e(0x17f)](_0x4340d9=>({..._0x4340d9,'startIndex':_0x4340d9['st'],'endIndex':_0x4340d9['ed']})),_0x5dd154,_0x5c5091))==null?void 0x0:_0x325dd1[_0x47899e(0x17f)](_0x385276=>{let {startIndex:_0x1fb084,endIndex:_0x22bedd,..._0x512ff3}=_0x385276;return{..._0x512ff3,'st':_0x1fb084,'ed':_0x22bedd};}),_0x422cd4[_0x47899e(0x1d8)]=tt(_0x422cd4[_0x47899e(0x1d8)],_0x5dd154,_0x5c5091),_0x422cd4[_0x47899e(0x199)]=A(_0x422cd4['columnGroups'],_0x5dd154,_0x5c5091),_0x422cd4[_0x47899e(0x1c9)]=A(_0x422cd4[_0x47899e(0x1c9)],_0x5dd154,_0x5c5091),_0x422cd4[_0x47899e(0x17c)]=A(_0x422cd4[_0x47899e(0x17c)],_0x5dd154,_0x5c5091),_0x422cd4[_0x47899e(0x192)]=A(_0x422cd4[_0x47899e(0x192)],_0x5dd154,_0x5c5091);}function D(_0x51b1dc,_0x38d7e2,_0x45e38e){const _0x1bb1f2=_0x1173d9;return _0x51b1dc==null?void 0x0:_0x51b1dc['map'](_0x53f9e7=>_0x53f9e7[_0x1bb1f2(0x1f9)]>=_0x38d7e2?{..._0x53f9e7,'startIndex':_0x53f9e7[_0x1bb1f2(0x1f9)]+_0x45e38e}:_0x53f9e7);}function O(_0x131e32,_0x5459e0,_0x5b5409){const _0x4a72a3=_0x1173d9;let _0x1b91a2=_0x5459e0+_0x5b5409;return _0x131e32==null?void 0x0:_0x131e32[_0x4a72a3(0x17f)](_0xeb4f8d=>_0xeb4f8d[_0x4a72a3(0x1f9)]>=_0x5459e0&&_0xeb4f8d[_0x4a72a3(0x1f9)]<_0x1b91a2?null:_0xeb4f8d[_0x4a72a3(0x1f9)]>=_0x1b91a2?{..._0xeb4f8d,'startIndex':_0xeb4f8d[_0x4a72a3(0x1f9)]-_0x5b5409}:_0xeb4f8d)[_0x4a72a3(0x1a8)](_0xc61ba8=>_0xc61ba8!=null);}function $e(_0x24f305,_0x2ca265,_0x204a1d){const _0xb6f4eb=_0x1173d9;return _0x24f305==null?void 0x0:_0x24f305[_0xb6f4eb(0x17f)](_0x461e67=>_0x461e67['st']>=_0x2ca265?{..._0x461e67,'st':_0x461e67['st']+_0x204a1d,'ed':_0x461e67['ed']+_0x204a1d}:_0x461e67['ed']>_0x2ca265?{..._0x461e67,'ed':_0x461e67['ed']+_0x204a1d}:_0x461e67);}function k(_0x990d75,_0x3b5bdd,_0x4f6626){const _0x255b89=_0x1173d9;return _0x990d75==null?void 0x0:_0x990d75[_0x255b89(0x17f)](_0x7ddaee=>_0xae953e(_0x7ddaee,_0x3b5bdd,_0x4f6626));}function et(_0x343fdc,_0x7fc0b9,_0x27cc79){const _0x3c0a90=_0x1173d9;return _0x343fdc==null?void 0x0:_0x343fdc[_0x3c0a90(0x17f)](_0x26cc98=>_0x127e50(_0x26cc98,_0x7fc0b9,_0x27cc79));}function A(_0xdcc80,_0x1a3421,_0x3e549c){const _0x783992=_0x1173d9;return _0xdcc80==null?void 0x0:_0xdcc80[_0x783992(0x17f)](_0x4f795d=>_0x2e67c7(_0x4f795d,_0x1a3421,_0x3e549c))[_0x783992(0x1a8)](_0x428ea3=>_0x428ea3!=null);}function tt(_0x4adf07,_0x164afe,_0x5caa79){const _0x2fe41e=_0x1173d9;return _0x4adf07==null?void 0x0:_0x4adf07[_0x2fe41e(0x17f)](_0x1e7b83=>_0x324bcb(_0x1e7b83,_0x164afe,_0x5caa79))['filter'](_0x93fa2f=>_0x93fa2f!=null);}function j(_0x155967){const _0x5210a5=_0x1173d9;if(!_0x155967[_0x5210a5(0x1e1)])throw Error(_0x5210a5(0x223));return _0x155967[_0x5210a5(0x1e1)];}function M(_0x102f28){'@babel/helpers - typeof';const _0x447a14=_0x1173d9;return M=typeof Symbol==_0x447a14(0x1a3)&&typeof Symbol[_0x447a14(0x139)]==_0x447a14(0x1d9)?function(_0x364345){return typeof _0x364345;}:function(_0x4dafc9){const _0x427e0f=_0x447a14;return _0x4dafc9&&typeof Symbol==_0x427e0f(0x1a3)&&_0x4dafc9[_0x427e0f(0x14c)]===Symbol&&_0x4dafc9!==Symbol[_0x427e0f(0x175)]?'symbol':typeof _0x4dafc9;},M(_0x102f28);}function nt(_0x28d37c,_0x11ee35){const _0x5d2cdc=_0x1173d9;if(M(_0x28d37c)!=_0x5d2cdc(0x21d)||!_0x28d37c)return _0x28d37c;var _0x19216a=_0x28d37c[Symbol[_0x5d2cdc(0x18c)]];if(_0x19216a!==void 0x0){var _0x49a564=_0x19216a[_0x5d2cdc(0x15d)](_0x28d37c,_0x11ee35||_0x5d2cdc(0x145));if(M(_0x49a564)!='object')return _0x49a564;throw TypeError(_0x5d2cdc(0x16a));}return(_0x11ee35===_0x5d2cdc(0x1b7)?String:Number)(_0x28d37c);}function rt(_0x240fa9){const _0x2b5023=_0x1173d9;var _0x51f7e0=nt(_0x240fa9,'string');return M(_0x51f7e0)==_0x2b5023(0x1d9)?_0x51f7e0:_0x51f7e0+'';}function N(_0x4f3624,_0x463a71,_0x534c3){const _0xa9bdf5=_0x1173d9;return(_0x463a71=rt(_0x463a71))in _0x4f3624?Object[_0xa9bdf5(0x13e)](_0x4f3624,_0x463a71,{'value':_0x534c3,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4f3624[_0x463a71]=_0x534c3,_0x4f3624;}var P=class extends _0x487bea{constructor(..._0x20d47f){const _0x20db20=_0x1173d9;super(..._0x20d47f),N(this,_0x20db20(0x1a1),new Map()),N(this,'_rawResources',new Map()),N(this,_0x20db20(0x148),new Map()),N(this,_0x20db20(0x1f4),new _0x11a859()),N(this,_0x20db20(0x15f),this[_0x20db20(0x1f4)]['asObservable']());}[_0x1173d9(0x215)](_0x40724a,_0x1adf40){const _0x4d28fb=_0x1173d9;var _0x1ee1d9;let _0x26eacf=(_0x1ee1d9=this[_0x4d28fb(0x1a1)][_0x4d28fb(0x137)](_0x40724a))==null?void 0x0:_0x1ee1d9[_0x4d28fb(0x183)][_0x1adf40];return _0x26eacf?_0x13c34f['deepClone'](_0x26eacf):void 0x0;}['getFormulas'](_0x4bd826){const _0x512965=_0x1173d9;var _0x188c85;return _0x13c34f[_0x512965(0x168)](((_0x188c85=this[_0x512965(0x1a1)][_0x512965(0x137)](_0x4bd826))==null?void 0x0:_0x188c85['formulas'])??{});}[_0x1173d9(0x1ce)](_0x2776b7){const _0x3abab9=_0x1173d9;let _0x2b9d23=this[_0x3abab9(0x1a1)][_0x3abab9(0x137)](_0x2776b7);return _0x2b9d23?_0x13c34f[_0x3abab9(0x168)](_0x2b9d23):void 0x0;}[_0x1173d9(0x20e)](_0xc645b1,_0x1a4e50,_0x1ff1ef){const _0x8e7686=_0x1173d9;return this[_0x8e7686(0x169)](_0xc645b1,{[_0x1a4e50]:_0x1ff1ef});}['setResource'](_0x9c3e3e,_0x34b978){const _0xaacac2=_0x1173d9;return this[_0xaacac2(0x148)][_0xaacac2(0x130)](_0x9c3e3e)||!x(_0x34b978)?!0x1:(this[_0xaacac2(0x1a1)]['set'](_0x9c3e3e,_0x13c34f[_0xaacac2(0x168)](_0x34b978)),this[_0xaacac2(0x1f4)][_0xaacac2(0x1d3)]({'unitId':_0x9c3e3e}),!0x0);}[_0x1173d9(0x169)](_0x223608,_0x5f4f83){const _0x576537=_0x1173d9;if(this[_0x576537(0x148)]['has'](_0x223608)||!Object[_0x576537(0x16c)](_0x5f4f83)[_0x576537(0x1e6)]||!x({'schemaVersion':0x1,'formulas':_0x5f4f83}))return!0x1;let _0x3c4b17=this[_0x576537(0x1a1)][_0x576537(0x137)](_0x223608)??b(),_0x3817b3=_0x13c34f['deepClone'](_0x3c4b17);return Object[_0x576537(0x17a)](_0x3817b3[_0x576537(0x183)],_0x13c34f['deepClone'](_0x5f4f83)),this[_0x576537(0x1a1)][_0x576537(0x1be)](_0x223608,_0x3817b3),this['_change$']['next']({'unitId':_0x223608,'rangeIds':Object[_0x576537(0x16c)](_0x5f4f83)}),!0x0;}[_0x1173d9(0x126)](_0x13a24a,_0x68741){const _0x5b2577=_0x1173d9;if(this[_0x5b2577(0x148)][_0x5b2577(0x130)](_0x13a24a))return!0x1;let _0x5bdea0=this[_0x5b2577(0x1a1)][_0x5b2577(0x137)](_0x13a24a);if(!(_0x5bdea0!=null&&_0x5bdea0[_0x5b2577(0x183)][_0x68741]))return!0x1;let _0x48488e=_0x13c34f[_0x5b2577(0x168)](_0x5bdea0);return delete _0x48488e[_0x5b2577(0x183)][_0x68741],this['_resources'][_0x5b2577(0x1be)](_0x13a24a,_0x48488e),this['_change$'][_0x5b2577(0x1d3)]({'unitId':_0x13a24a,'rangeIds':[_0x68741]}),!0x0;}['load'](_0x434b6d,_0x10133d){const _0x294d4b=_0x1173d9;return _0x10133d&&typeof _0x10133d=='object'&&_0x294d4b(0x17e)in _0x10133d&&_0x10133d[_0x294d4b(0x17e)]!==0x1?(this[_0x294d4b(0x17d)](_0x434b6d,_0x10133d,_0x294d4b(0x155)),!0x1):x(_0x10133d)?(this[_0x294d4b(0x1a1)][_0x294d4b(0x1be)](_0x434b6d,_0x13c34f[_0x294d4b(0x168)](_0x10133d)),this['_rawResources']['delete'](_0x434b6d),this[_0x294d4b(0x148)][_0x294d4b(0x18d)](_0x434b6d),this[_0x294d4b(0x1f4)]['next']({'unitId':_0x434b6d}),!0x0):(this[_0x294d4b(0x17d)](_0x434b6d,_0x10133d,_0x294d4b(0x177)),!0x1);}[_0x1173d9(0x1b8)](_0x3bcca9){const _0x2ab0ca=_0x1173d9;let _0x384f69=this[_0x2ab0ca(0x1a1)][_0x2ab0ca(0x137)](_0x3bcca9);return _0x384f69?_0x13c34f['deepClone'](_0x384f69):this[_0x2ab0ca(0x12e)][_0x2ab0ca(0x130)](_0x3bcca9)?_0x13c34f[_0x2ab0ca(0x168)](this[_0x2ab0ca(0x12e)][_0x2ab0ca(0x137)](_0x3bcca9)):b();}['getLoadError'](_0x5b2391){const _0x592b18=_0x1173d9;return this[_0x592b18(0x148)][_0x592b18(0x137)](_0x5b2391);}[_0x1173d9(0x179)](_0x414efb){const _0x287c25=_0x1173d9;this[_0x287c25(0x1a1)][_0x287c25(0x18d)](_0x414efb),this[_0x287c25(0x12e)][_0x287c25(0x18d)](_0x414efb),this[_0x287c25(0x148)][_0x287c25(0x18d)](_0x414efb),this[_0x287c25(0x1f4)][_0x287c25(0x1d3)]({'unitId':_0x414efb});}['dispose'](){const _0x46b309=_0x1173d9;this[_0x46b309(0x1a1)][_0x46b309(0x1db)](),this[_0x46b309(0x12e)][_0x46b309(0x1db)](),this[_0x46b309(0x148)][_0x46b309(0x1db)](),this[_0x46b309(0x1f4)][_0x46b309(0x167)](),super['dispose']();}[_0x1173d9(0x17d)](_0x482e80,_0x1f43d9,_0x52316a){const _0x590f97=_0x1173d9;this['_resources'][_0x590f97(0x18d)](_0x482e80),this[_0x590f97(0x12e)]['set'](_0x482e80,_0x13c34f['deepClone'](_0x1f43d9)),this['_loadErrors'][_0x590f97(0x1be)](_0x482e80,_0x52316a),this[_0x590f97(0x1f4)][_0x590f97(0x1d3)]({'unitId':_0x482e80});}};let it=function(_0x15b801){const _0x4d2126=_0x1173d9;return _0x15b801[_0x4d2126(0x189)]=_0x4d2126(0x13a),_0x15b801[_0x4d2126(0x1d1)]=_0x4d2126(0x1b1),_0x15b801[_0x4d2126(0x197)]=_0x4d2126(0x135),_0x15b801['ERROR']=_0x4d2126(0x15b),_0x15b801;}({});function F(_0x5569f7,_0x51a7c9){return function(_0x3741db,_0x1f9740){_0x51a7c9(_0x3741db,_0x1f9740,_0x5569f7);};}function I(_0x549cd2,_0x6884cd,_0x397a42,_0x3d9818){const _0x39391=_0x1173d9;var _0x1deec1=arguments[_0x39391(0x1e6)],_0x15f210=_0x1deec1<0x3?_0x6884cd:_0x3d9818===null?_0x3d9818=Object[_0x39391(0x180)](_0x6884cd,_0x397a42):_0x3d9818,_0x3dc2c7;if(typeof Reflect==_0x39391(0x21d)&&typeof Reflect[_0x39391(0x18f)]==_0x39391(0x1a3))_0x15f210=Reflect[_0x39391(0x18f)](_0x549cd2,_0x6884cd,_0x397a42,_0x3d9818);else{for(var _0x38af3b=_0x549cd2[_0x39391(0x1e6)]-0x1;_0x38af3b>=0x0;_0x38af3b--)(_0x3dc2c7=_0x549cd2[_0x38af3b])&&(_0x15f210=(_0x1deec1<0x3?_0x3dc2c7(_0x15f210):_0x1deec1>0x3?_0x3dc2c7(_0x6884cd,_0x397a42,_0x15f210):_0x3dc2c7(_0x6884cd,_0x397a42))||_0x15f210);}return _0x1deec1>0x3&&_0x15f210&&Object[_0x39391(0x13e)](_0x6884cd,_0x397a42,_0x15f210),_0x15f210;}let L=class extends _0x487bea{constructor(_0x58380e,_0x5d1fb0,_0x304b61){const _0x331478=_0x1173d9;super(),this[_0x331478(0x20f)]=_0x58380e,this[_0x331478(0x14b)]=_0x5d1fb0,this[_0x331478(0x207)]=_0x304b61,N(this,_0x331478(0x1e3),new Map()),N(this,_0x331478(0x1bc),new Map()),N(this,_0x331478(0x142),new _0x11a859()),N(this,'presentationChanged$',this[_0x331478(0x142)][_0x331478(0x190)]()),this[_0x331478(0x140)](this[_0x331478(0x14b)][_0x331478(0x1cd)][_0x331478(0x1f7)](_0x27b466=>{const _0x2e9f9b=_0x331478;for(let _0x291ecf of Object[_0x2e9f9b(0x1f3)](_0x27b466))for(let _0x436ce1 of Object[_0x2e9f9b(0x1f3)](_0x291ecf))_0x436ce1[_0x2e9f9b(0x146)](_0x2e998c=>this[_0x2e9f9b(0x1f6)](_0x2e998c));}));}[_0x1173d9(0x1fb)](_0x1378f7){const _0x55429c=_0x1173d9;var _0x123b38;let _0xa479cc=_0x1378f7['getUnitId'](),_0x59a805=((_0x123b38=_0x1378f7[_0x55429c(0x160)]()[_0x55429c(0x1e1)])==null||(_0x123b38=_0x123b38[_0x55429c(0x1c9)])==null?void 0x0:_0x123b38[_0x55429c(0x1a8)](w))??[],_0x399e3b=this[_0x55429c(0x20f)]['getFormulas'](_0xa479cc),_0x3cc44e=new Set();for(let _0xb0652 of _0x59a805){let _0x5a3e4e=_0x399e3b[_0xb0652[_0x55429c(0x217)]];_0x5a3e4e&&(_0x3cc44e['add'](R(_0xa479cc,_0xb0652[_0x55429c(0x217)])),this['register']({'unitId':_0xa479cc,'rangeId':_0xb0652[_0x55429c(0x217)]},_0x5a3e4e));}for(let _0x46075c of Array[_0x55429c(0x16f)](this[_0x55429c(0x1e3)][_0x55429c(0x1f3)]()))_0x46075c[_0x55429c(0x224)]===_0xa479cc&&!_0x3cc44e[_0x55429c(0x130)](R(_0x46075c[_0x55429c(0x224)],_0x46075c[_0x55429c(0x217)]))&&this['unregister'](_0x46075c);}[_0x1173d9(0x218)](_0x103abb,_0x4dd879){const _0xe26a40=_0x1173d9;let _0x5abb0a=R(_0x103abb[_0xe26a40(0x224)],_0x103abb[_0xe26a40(0x217)]),_0x79c917=this[_0xe26a40(0x1e3)][_0xe26a40(0x137)](_0x5abb0a),_0x1751be=this['_hostExternalReferenceModel'][_0xe26a40(0x1f0)](_0x103abb[_0xe26a40(0x224)]);if(_0x79c917&&_0x79c917[_0xe26a40(0x216)]['formula']===_0x4dd879['formula']&&_0x79c917[_0xe26a40(0x210)]===_0x1751be){_0x79c917['config']=_0x4dd879;let _0xd24928=_0x79c917[_0xe26a40(0x20c)]?this[_0xe26a40(0x14b)][_0xe26a40(0x1c0)](_0x79c917[_0xe26a40(0x224)],_0x79c917[_0xe26a40(0x224)],_0x79c917[_0xe26a40(0x20c)])??void 0x0:void 0x0;_0x79c917[_0xe26a40(0x208)]=_0xd24928,this[_0xe26a40(0x1bd)](_0x5abb0a,z(_0x4dd879,_0xd24928));return;}_0x79c917!=null&&_0x79c917[_0xe26a40(0x20c)]&&this[_0xe26a40(0x18b)](_0x79c917);let _0x55f8f6={..._0x103abb,'config':_0x4dd879,'referenceRevision':_0x1751be,'presentation':z(_0x4dd879,void 0x0)};if(this['_registrations'][_0xe26a40(0x1be)](_0x5abb0a,_0x55f8f6),!_0x4dd879[_0xe26a40(0x1de)][_0xe26a40(0x1bf)]())return;let _0x3f8b83=this[_0xe26a40(0x14b)]['registerFormulaWithRange'](_0x103abb[_0xe26a40(0x224)],_0x103abb[_0xe26a40(0x224)],_0x4dd879[_0xe26a40(0x1de)],void 0x0,{'rangeId':_0x103abb[_0xe26a40(0x217)]},_0xca11f['DOC'],_0x103abb[_0xe26a40(0x217)]);_0x55f8f6[_0xe26a40(0x20c)]=_0x3f8b83,this[_0xe26a40(0x1bc)][_0xe26a40(0x1be)](_0x3f8b83,_0x5abb0a);}[_0x1173d9(0x13d)](_0x188b01){const _0x17fbdc=_0x1173d9;let _0x2cd7ed=R(_0x188b01[_0x17fbdc(0x224)],_0x188b01['rangeId']),_0x47854c=this[_0x17fbdc(0x1e3)][_0x17fbdc(0x137)](_0x2cd7ed);_0x47854c&&(this[_0x17fbdc(0x18b)](_0x47854c),this[_0x17fbdc(0x1e3)][_0x17fbdc(0x18d)](_0x2cd7ed));}[_0x1173d9(0x191)](_0x22b81e){const _0x32816e=_0x1173d9;for(let _0x4e8676 of Array[_0x32816e(0x16f)](this[_0x32816e(0x1e3)]['values']()))_0x4e8676[_0x32816e(0x224)]===_0x22b81e&&this['unregister'](_0x4e8676);}[_0x1173d9(0x157)](_0x27f04f){const _0x30768e=_0x1173d9;var _0xf21568;return(_0xf21568=this[_0x30768e(0x1e3)][_0x30768e(0x137)](R(_0x27f04f[_0x30768e(0x224)],_0x27f04f[_0x30768e(0x217)])))==null?void 0x0:_0xf21568[_0x30768e(0x18a)];}[_0x1173d9(0x1d6)](_0x5c9362){const _0x489b21=_0x1173d9;let _0x1acd5d=this[_0x489b21(0x1e3)][_0x489b21(0x137)](R(_0x5c9362[_0x489b21(0x224)],_0x5c9362[_0x489b21(0x217)]));return _0x1acd5d?B(_0x1acd5d):void 0x0;}['getRegisteredFormulas'](){const _0xe7678d=_0x1173d9;return Array[_0xe7678d(0x16f)](this[_0xe7678d(0x1e3)][_0xe7678d(0x1f3)](),_0x5d79e4=>({'identity':{'unitId':_0x5d79e4['unitId'],'rangeId':_0x5d79e4[_0xe7678d(0x217)]},'config':_0x5d79e4[_0xe7678d(0x216)],'referenceRevision':_0x5d79e4['referenceRevision'],..._0x5d79e4['liveResult']?{'liveResult':_0x5d79e4['liveResult']}:null}));}[_0x1173d9(0x20b)](){const _0x40bb75=_0x1173d9;for(let _0x10b4f0 of this[_0x40bb75(0x1e3)][_0x40bb75(0x1f3)]())this['_deleteRegistration'](_0x10b4f0);this[_0x40bb75(0x1e3)][_0x40bb75(0x1db)](),this[_0x40bb75(0x1bc)][_0x40bb75(0x1db)](),this[_0x40bb75(0x142)][_0x40bb75(0x167)](),super[_0x40bb75(0x20b)]();}[_0x1173d9(0x1f6)](_0x396c3f){const _0x2e158b=_0x1173d9;let _0x3f0e84=this[_0x2e158b(0x1bc)]['get'](_0x396c3f[_0x2e158b(0x20c)]),_0x5d0da8=_0x3f0e84?this[_0x2e158b(0x1e3)][_0x2e158b(0x137)](_0x3f0e84):void 0x0;_0x3f0e84&&_0x5d0da8&&(_0x5d0da8[_0x2e158b(0x208)]=_0x396c3f,this[_0x2e158b(0x1bd)](_0x3f0e84,z(_0x5d0da8['config'],_0x396c3f)));}[_0x1173d9(0x1bd)](_0x1dfee1,_0x37eb7b){const _0x49ea67=_0x1173d9;var _0x2df312,_0x4589ca;let _0x1d4d8a=this[_0x49ea67(0x1e3)][_0x49ea67(0x137)](_0x1dfee1);if(!_0x1d4d8a||at(_0x1d4d8a[_0x49ea67(0x18a)],_0x37eb7b))return;let _0x3a4b62=_0x1d4d8a[_0x49ea67(0x18a)],_0x38c241=B(_0x1d4d8a);_0x1d4d8a['presentation']=_0x37eb7b,this[_0x49ea67(0x142)][_0x49ea67(0x1d3)]({'unitId':_0x1d4d8a[_0x49ea67(0x224)],'rangeId':_0x1d4d8a[_0x49ea67(0x217)],'presentation':_0x37eb7b,'previousPresentation':_0x3a4b62,'result':B(_0x1d4d8a),'previousResult':{..._0x38c241,..._0x3a4b62,'value':(_0x2df312=_0x3a4b62[_0x49ea67(0x172)])==null?void 0x0:_0x2df312['v'],'valueType':((_0x4589ca=_0x3a4b62[_0x49ea67(0x172)])==null?void 0x0:_0x4589ca['t'])??void 0x0}});}[_0x1173d9(0x18b)](_0x5cd675){const _0x1b216c=_0x1173d9;_0x5cd675[_0x1b216c(0x20c)]&&(this[_0x1b216c(0x14b)]['deleteFormula'](_0x5cd675['unitId'],_0x5cd675[_0x1b216c(0x224)],[_0x5cd675['formulaId']]),this[_0x1b216c(0x1bc)][_0x1b216c(0x18d)](_0x5cd675[_0x1b216c(0x20c)]));}};L=I([F(0x0,_0x41fe0f(P)),F(0x1,_0x41fe0f(_0x78c724)),F(0x2,_0x41fe0f(_0x4e7a8f))],L);function R(_0x754910,_0x1be1cc){return _0x754910+'\x00'+_0x1be1cc;}function z(_0x48ecae,_0x3b7395){const _0x26d181=_0x1173d9;return _0x32521a({'numberFormat':_0x48ecae[_0x26d181(0x1ae)],'lastValue':_0x48ecae['lastValue'],'result':_0x3b7395});}function B(_0x124cfe){const _0x29b190=_0x1173d9;var _0x108f1c,_0x5493c8,_0x4f935c;let _0x64a3a1=_0x124cfe[_0x29b190(0x18a)],_0x1b592c=_0x124cfe[_0x29b190(0x216)]['formula']['trim']()?_0x64a3a1['stale']||_0x64a3a1[_0x29b190(0x172)]==null?_0x29b190(0x1b1):((_0x108f1c=_0x124cfe[_0x29b190(0x208)])==null?void 0x0:_0x108f1c['status'])===_0x208399['ERROR']?_0x29b190(0x15b):_0x29b190(0x135):_0x29b190(0x13a);return{..._0x64a3a1,'status':_0x1b592c,'value':(_0x5493c8=_0x64a3a1[_0x29b190(0x172)])==null?void 0x0:_0x5493c8['v'],'valueType':((_0x4f935c=_0x64a3a1[_0x29b190(0x172)])==null?void 0x0:_0x4f935c['t'])??void 0x0};}function at(_0x34f96f,_0x5963f7){const _0x1a4138=_0x1173d9;var _0x4d411b,_0x3c38c0,_0x1d54ec,_0xae7138;return _0x34f96f[_0x1a4138(0x204)]===_0x5963f7[_0x1a4138(0x204)]&&_0x34f96f[_0x1a4138(0x1f1)]===_0x5963f7[_0x1a4138(0x1f1)]&&_0x34f96f['pattern']===_0x5963f7[_0x1a4138(0x1b6)]&&_0x34f96f['source']===_0x5963f7[_0x1a4138(0x1c4)]&&_0x34f96f['stale']===_0x5963f7[_0x1a4138(0x1bb)]&&((_0x4d411b=_0x34f96f[_0x1a4138(0x172)])==null?void 0x0:_0x4d411b['t'])===((_0x3c38c0=_0x5963f7[_0x1a4138(0x172)])==null?void 0x0:_0x3c38c0['t'])&&Object['is']((_0x1d54ec=_0x34f96f[_0x1a4138(0x172)])==null?void 0x0:_0x1d54ec['v'],(_0xae7138=_0x5963f7[_0x1a4138(0x172)])==null?void 0x0:_0xae7138['v']);}const ot={'id':_0x1173d9(0x1cb),'type':_0x2e2ecf[_0x1173d9(0x1ff)],'handler':(_0x16e684,_0x3a8c76)=>!(_0x3a8c76!=null&&_0x3a8c76[_0x1173d9(0x224)])||!_0x3a8c76['rangeId']||!_0x3a8c76[_0x1173d9(0x216)]?!0x1:_0x16e684[_0x1173d9(0x137)](P)['setFormula'](_0x3a8c76[_0x1173d9(0x224)],_0x3a8c76[_0x1173d9(0x217)],_0x3a8c76[_0x1173d9(0x216)])},st={'id':'docs-formula.mutation.remove-formula','type':_0x2e2ecf['MUTATION'],'handler':(_0x2e6573,_0x36a4be)=>!(_0x36a4be!=null&&_0x36a4be[_0x1173d9(0x224)])||!_0x36a4be['rangeId']?!0x1:_0x2e6573[_0x1173d9(0x137)](P)[_0x1173d9(0x126)](_0x36a4be[_0x1173d9(0x224)],_0x36a4be['rangeId'])},V={'id':'docs-formula.mutation.set-resource','type':_0x2e2ecf[_0x1173d9(0x1ff)],'handler':(_0x38735e,_0x44b450)=>!(_0x44b450!=null&&_0x44b450[_0x1173d9(0x224)])||!_0x44b450['resource']?!0x1:_0x38735e[_0x1173d9(0x137)](P)[_0x1173d9(0x1fe)](_0x44b450[_0x1173d9(0x224)],_0x44b450[_0x1173d9(0x1e7)])},H={'id':_0x1173d9(0x1b5),'type':_0x2e2ecf[_0x1173d9(0x1ff)],'handler':(_0x370656,_0x2dd87f)=>{const _0x30a76b=_0x1173d9;if(!(_0x2dd87f!=null&&_0x2dd87f[_0x30a76b(0x224)])||!_0x2dd87f[_0x30a76b(0x14e)][_0x30a76b(0x1e6)])return!0x1;let _0x1d8d3f=_0x370656['get'](P),_0x5222cf=_0x370656[_0x30a76b(0x137)](_0x4e7a8f),_0x1c9e11=_0x1d8d3f[_0x30a76b(0x1ce)](_0x2dd87f[_0x30a76b(0x224)]);if(!_0x1c9e11)return!0x1;let _0x2b6d31=_0x13c34f[_0x30a76b(0x168)](_0x1c9e11),_0x357efe=!0x1;for(let _0x24441e of _0x2dd87f[_0x30a76b(0x14e)]){var _0x307c47,_0x467736,_0x15b486,_0x547db0;let _0x2d5fba=_0x2b6d31[_0x30a76b(0x183)][_0x24441e['rangeId']];_0x2d5fba&&_0x2d5fba[_0x30a76b(0x1de)]===_0x24441e[_0x30a76b(0x206)]&&((_0x307c47=_0x2d5fba[_0x30a76b(0x1ae)])==null?void 0x0:_0x307c47['pattern'])===_0x24441e[_0x30a76b(0x159)]&&_0x5222cf['getRevision'](_0x2dd87f[_0x30a76b(0x224)])===_0x24441e[_0x30a76b(0x19e)]&&(((_0x467736=_0x2d5fba[_0x30a76b(0x1b4)])==null?void 0x0:_0x467736['v'])!==_0x24441e[_0x30a76b(0x1b4)]['v']||((_0x15b486=_0x2d5fba[_0x30a76b(0x1b4)])==null?void 0x0:_0x15b486['t'])!==_0x24441e[_0x30a76b(0x1b4)]['t']||((_0x547db0=_0x2d5fba[_0x30a76b(0x1b4)])==null?void 0x0:_0x547db0[_0x30a76b(0x1b6)])!==_0x24441e['lastValue']['pattern'])&&(_0x2d5fba[_0x30a76b(0x1b4)]=_0x13c34f['deepClone'](_0x24441e[_0x30a76b(0x1b4)]),_0x357efe=!0x0);}return!_0x357efe||_0x1d8d3f[_0x30a76b(0x1fe)](_0x2dd87f['unitId'],_0x2b6d31);}},U={'id':_0x1173d9(0x1fd),'type':_0x2e2ecf[_0x1173d9(0x226)],'handler':(_0x55e508,_0x30b44e)=>{const _0x1e707f=_0x1173d9;if(!(_0x30b44e!=null&&_0x30b44e['formula']['trim']()))return!0x1;let _0xb72be2=q(_0x55e508,_0x30b44e[_0x1e707f(0x224)],'');if(!_0xb72be2)return!0x1;let _0x1d9be1=ft(_0x30b44e[_0x1e707f(0x193)],_0xb72be2[_0x1e707f(0x1e1)],dt(_0x55e508,_0xb72be2[_0x1e707f(0x224)]));if(!_0x1d9be1)return!0x1;let _0x1cf13b=pt(_0x55e508,_0xb72be2[_0x1e707f(0x224)],_0x30b44e[_0x1e707f(0x1de)],_0x30b44e[_0x1e707f(0x195)]??[]);if(!_0x1cf13b)return!0x1;let _0x5dcfc2=mt(_0xb72be2[_0x1e707f(0x1e1)],_0xb72be2[_0x1e707f(0x1a6)],_0xb72be2[_0x1e707f(0x224)]),_0x5c9355=ht({'documentData':_0xb72be2[_0x1e707f(0x150)],'resource':_0xb72be2[_0x1e707f(0x1e7)],'rangeId':_0x5dcfc2,'config':{'formula':_0x30b44e['formula'],..._0x30b44e['numberFormat']?{'numberFormat':_0x30b44e[_0x1e707f(0x1ae)]}:null},'startOffset':_0x1d9be1[_0x1e707f(0x185)],'endOffset':_0x1d9be1[_0x1e707f(0x186)]});if(!_0x5c9355)return!0x1;let _0x5ed055=_0x18f854(_0x55e508,_0xb72be2[_0x1e707f(0x224)],_0x1cf13b);return!_0x5ed055||!J({'accessor':_0x55e508,'document':_0xb72be2[_0x1e707f(0x133)],'unitId':_0xb72be2['unitId'],'trigger':U['id'],'rangeId':_0x5dcfc2,'previousResource':_0xb72be2[_0x1e707f(0x1e7)],'nextResource':_0x5c9355[_0x1e707f(0x170)],'previousDocumentData':_0xb72be2[_0x1e707f(0x150)],'nextDocumentData':_0x5c9355[_0x1e707f(0x131)],'cursorOffset':_0x5c9355[_0x1e707f(0x1f5)],'externalMutations':_0x5ed055})?!0x1:{'rangeId':_0x5dcfc2,'startOffset':_0x5c9355[_0x1e707f(0x1f5)]-0x1,'endOffset':_0x5c9355[_0x1e707f(0x1f5)]};}},W={'id':'docs-formula.command.update','type':_0x2e2ecf[_0x1173d9(0x226)],'handler':(_0x2e5aa8,_0x46a55f)=>{const _0x5a939c=_0x1173d9;if(!(_0x46a55f!=null&&_0x46a55f['rangeId'])||!_0x46a55f[_0x5a939c(0x1de)][_0x5a939c(0x1bf)]())return!0x1;let _0x1e6ca5=q(_0x2e5aa8,_0x46a55f[_0x5a939c(0x224)],''),_0x5dc827=_0x1e6ca5==null?void 0x0:_0x1e6ca5[_0x5a939c(0x1a6)][_0x5a939c(0x215)](_0x1e6ca5[_0x5a939c(0x224)],_0x46a55f[_0x5a939c(0x217)]),_0x44526d=_0x1e6ca5?T(_0x1e6ca5['documentData'][_0x5a939c(0x1e1)],_0x46a55f[_0x5a939c(0x217)]):void 0x0;if(!_0x1e6ca5||!_0x5dc827||!_0x44526d)return!0x1;let _0x5a42df=pt(_0x2e5aa8,_0x1e6ca5['unitId'],_0x46a55f['formula'],_0x46a55f['externalReferences']??[]);if(!_0x5a42df)return!0x1;let _0x374ac9=_0x18f854(_0x2e5aa8,_0x1e6ca5[_0x5a939c(0x224)],_0x5a42df);if(!_0x374ac9)return!0x1;let _0x4b3431=Ct(_0x1e6ca5[_0x5a939c(0x1e7)]);return _0x4b3431[_0x5a939c(0x183)][_0x46a55f[_0x5a939c(0x217)]]={'formula':_0x46a55f[_0x5a939c(0x1de)],..._0x46a55f['numberFormat']?{'numberFormat':_0x46a55f[_0x5a939c(0x1ae)]}:_0x5dc827['numberFormat']?{'numberFormat':_0x5dc827[_0x5a939c(0x1ae)]}:null},J({'accessor':_0x2e5aa8,'document':_0x1e6ca5[_0x5a939c(0x133)],'unitId':_0x1e6ca5['unitId'],'trigger':W['id'],'rangeId':_0x46a55f[_0x5a939c(0x217)],'previousResource':_0x1e6ca5[_0x5a939c(0x1e7)],'nextResource':_0x4b3431,'cursorOffset':_0x44526d['endIndex']+0x1,'externalMutations':_0x374ac9});}},G={'id':_0x1173d9(0x211),'type':_0x2e2ecf[_0x1173d9(0x226)],'handler':(_0x5235ca,_0xf03935)=>{const _0x1e30d9=_0x1173d9;if(!(_0xf03935!=null&&_0xf03935[_0x1e30d9(0x217)]))return!0x1;let _0x3affbb=q(_0x5235ca,_0xf03935[_0x1e30d9(0x224)],''),_0x4ba2be=_0x3affbb==null?void 0x0:_0x3affbb[_0x1e30d9(0x1a6)][_0x1e30d9(0x215)](_0x3affbb[_0x1e30d9(0x224)],_0xf03935[_0x1e30d9(0x217)]),_0x36e032=_0x3affbb?T(_0x3affbb[_0x1e30d9(0x150)][_0x1e30d9(0x1e1)],_0xf03935[_0x1e30d9(0x217)]):void 0x0;if(!_0x3affbb||!_0x4ba2be||!_0x36e032)return!0x1;let _0x1051b7=Ct(_0x3affbb[_0x1e30d9(0x1e7)]);return _0x1051b7['formulas'][_0xf03935[_0x1e30d9(0x217)]]={..._0x4ba2be,..._0xf03935['numberFormat']?{'numberFormat':_0xf03935[_0x1e30d9(0x1ae)]}:null},_0xf03935[_0x1e30d9(0x1ae)]||delete _0x1051b7['formulas'][_0xf03935[_0x1e30d9(0x217)]][_0x1e30d9(0x1ae)],J({'accessor':_0x5235ca,'document':_0x3affbb[_0x1e30d9(0x133)],'unitId':_0x3affbb[_0x1e30d9(0x224)],'trigger':G['id'],'rangeId':_0xf03935[_0x1e30d9(0x217)],'previousResource':_0x3affbb[_0x1e30d9(0x1e7)],'nextResource':_0x1051b7,'cursorOffset':_0x36e032[_0x1e30d9(0x15e)]+0x1,'externalMutations':{}});}},K={'id':_0x1173d9(0x147),'type':_0x2e2ecf[_0x1173d9(0x226)],'handler':(_0x4c2f6a,_0xe80b8)=>ut(_0x4c2f6a,_0xe80b8,'',K['id'])},ct={'id':_0x1173d9(0x219),'type':_0x2e2ecf[_0x1173d9(0x226)],'handler':(_0x32cbb0,_0x1a5e15)=>ut(_0x32cbb0,_0x1a5e15,(_0x1a5e15==null?void 0x0:_0x1a5e15[_0x1173d9(0x204)])??'',ct['id'])},lt={'id':_0x1173d9(0x1cf),'type':_0x2e2ecf[_0x1173d9(0x226)],'handler':(_0x3463fd,_0x3911c9)=>{const _0x3f37f4=_0x1173d9;if(!(_0x3911c9!=null&&_0x3911c9[_0x3f37f4(0x217)]))return!0x1;let _0x255d2e=q(_0x3463fd,_0x3911c9['unitId'],'');if(!_0x255d2e)return!0x1;let _0x3a9fca=_0x3463fd[_0x3f37f4(0x137)](L)['getResult']({'unitId':_0x255d2e[_0x3f37f4(0x224)],'rangeId':_0x3911c9[_0x3f37f4(0x217)]});return _0x3a9fca?ut(_0x3463fd,_0x3911c9,_0x3a9fca[_0x3f37f4(0x204)],lt['id']):!0x1;}};function ut(_0x32453d,_0x4c8662,_0x43dd8b,_0x577bf6){const _0x5043a2=_0x1173d9;if(!(_0x4c8662!=null&&_0x4c8662[_0x5043a2(0x217)]))return!0x1;let _0x5125f9=q(_0x32453d,_0x4c8662[_0x5043a2(0x224)],'');if(!_0x5125f9)return!0x1;let _0x54c46a=Be({'documentData':_0x5125f9[_0x5043a2(0x150)],'resource':_0x5125f9['resource'],'rangeId':_0x4c8662[_0x5043a2(0x217)],'text':_0x43dd8b});return _0x54c46a?J({'accessor':_0x32453d,'document':_0x5125f9['document'],'unitId':_0x5125f9[_0x5043a2(0x224)],'trigger':_0x577bf6,'rangeId':_0x4c8662['rangeId'],'previousResource':_0x5125f9[_0x5043a2(0x1e7)],'nextResource':_0x54c46a['nextResource'],'previousDocumentData':_0x5125f9[_0x5043a2(0x150)],'nextDocumentData':_0x54c46a['nextDocumentData'],'cursorOffset':_0x54c46a[_0x5043a2(0x1f5)],'externalMutations':{}}):!0x1;}function q(_0x253581,_0x202b1e,_0x19f38c){const _0x259a07=_0x1173d9;if(_0x19f38c)return null;let _0x3a8297=_0x253581['get'](_0x1cb79e),_0x491270=(_0x202b1e?_0x3a8297[_0x259a07(0x171)](_0x202b1e,_0xe966be[_0x259a07(0x129)]):_0x3a8297[_0x259a07(0x19f)](_0xe966be[_0x259a07(0x129)]))??null;if(!_0x491270)return null;let _0x32e89b=_0x491270[_0x259a07(0x160)](),_0x367e6f=_0x32e89b['body'];if(_0x32e89b['disabled']||!_0x367e6f)return null;let _0x255e85=_0x253581['get'](P);return _0x255e85[_0x259a07(0x1a4)](_0x491270[_0x259a07(0x1b0)]())?null:{'document':_0x491270,'body':_0x367e6f,'documentData':_0x32e89b,'model':_0x255e85,'resource':_0x255e85[_0x259a07(0x1ce)](_0x491270[_0x259a07(0x1b0)]())??b(),'unitId':_0x491270[_0x259a07(0x1b0)]()};}function dt(_0x3302e7,_0x421c26){const _0x1bae45=_0x1173d9;var _0x49e753;return(_0x49e753=_0x3302e7[_0x1bae45(0x137)](_0x764d00)[_0x1bae45(0x165)]({'subUnitId':_0x421c26,'unitId':_0x421c26}))==null?void 0x0:_0x49e753[0x0];}function ft(_0x2ab36d,_0x103876,_0x2d3863){const _0x5847b6=_0x1173d9;if((_0x2ab36d==null?void 0x0:_0x2ab36d[_0x5847b6(0x19c)])===_0x5847b6(0x203)){var _0x3b0dd9;let _0x3f0fc3=((_0x3b0dd9=_0x103876[_0x5847b6(0x1e9)])==null?void 0x0:_0x3b0dd9[_0x5847b6(0x1a8)](_0x2d652e=>_0x2d652e[_0x5847b6(0x16b)]===_0x2ab36d[_0x5847b6(0x16b)]))??[];if(_0x3f0fc3[_0x5847b6(0x1e6)]!==0x1)return null;let _0xfef491=_0x3f0fc3[0x0],_0x21a685=_0x882200(_0x103876,_0xfef491),_0x215936=_0xfef491['startIndex']-_0x21a685,_0x33e759=_0x2ab36d[_0x5847b6(0x201)]===_0x5847b6(0x1ed)?_0x215936:_0x2ab36d[_0x5847b6(0x201)];if(!Number[_0x5847b6(0x222)](_0x33e759)||_0x33e759<0x0||_0x33e759>_0x215936)return null;let _0x4794bc=_0x21a685+_0x33e759;return{'startOffset':_0x4794bc,'endOffset':_0x4794bc};}if((_0x2ab36d==null?void 0x0:_0x2ab36d[_0x5847b6(0x19c)])===_0x5847b6(0x1ee))return!Number[_0x5847b6(0x222)](_0x2ab36d[_0x5847b6(0x185)])||!Number['isInteger'](_0x2ab36d[_0x5847b6(0x186)])?null:{'startOffset':Math[_0x5847b6(0x1f2)](_0x2ab36d['startOffset'],_0x2ab36d[_0x5847b6(0x186)]),'endOffset':Math[_0x5847b6(0x221)](_0x2ab36d[_0x5847b6(0x185)],_0x2ab36d[_0x5847b6(0x186)])};let _0x38bde5=(_0x2ab36d==null?void 0x0:_0x2ab36d[_0x5847b6(0x19c)])==='selection'?_0x2ab36d['selection']:_0x2d3863;return!_0x38bde5||_0x38bde5[_0x5847b6(0x209)]?null:{'startOffset':Math['min'](_0x38bde5[_0x5847b6(0x185)],_0x38bde5['endOffset']),'endOffset':Math[_0x5847b6(0x221)](_0x38bde5[_0x5847b6(0x185)],_0x38bde5['endOffset'])};}function pt(_0xe9e5cc,_0x37b34d,_0x15b127,_0x535d94){const _0x1c6340=_0x1173d9;let _0x2eb26f=_0xe9e5cc[_0x1c6340(0x137)](_0x26af78),_0x5a300c=_0x15b127[_0x1c6340(0x1ca)]('=')?_0x15b127[_0x1c6340(0x12a)](0x1):_0x15b127,_0xa8f069=_0x2eb26f[_0x1c6340(0x1aa)](_0x5a300c);if(!_0xa8f069)return null;let _0x48a275=_0xe9e5cc['get'](_0x4e7a8f),_0x9b580b=_0x3d2466({'qualifiers':_0x40128b(_0xa8f069),'explicitReferences':_0x535d94??[],'resolveBinding':_0x54360e=>_0x48a275[_0x1c6340(0x156)](_0x37b34d,_0x54360e)});return _0x9b580b[_0x1c6340(0x15c)]===_0x1c6340(0x1c8)?_0x9b580b[_0x1c6340(0x1e0)]:null;}function mt(_0x306d50,_0x4ceb69,_0x23ab78){const _0x5153a6=_0x1173d9;var _0x4a442f;let _0x4a2756=_0x7ffdf2(0x6);for(;_0x306d50!=null&&(_0x4a442f=_0x306d50[_0x5153a6(0x1c9)])!=null&&_0x4a442f[_0x5153a6(0x184)](_0x3a0bb3=>_0x3a0bb3[_0x5153a6(0x217)]===_0x4a2756)||_0x4ceb69[_0x5153a6(0x215)](_0x23ab78,_0x4a2756);)_0x4a2756=_0x7ffdf2(0x6);return _0x4a2756;}function ht(_0x5393e7){try{return Re(_0x5393e7);}catch(_0x3488ca){if(_0x3488ca instanceof C)return null;throw _0x3488ca;}}function gt(_0x5cb735){const _0x3d4d8e=_0x1173d9;let _0x44714a=_0x5cb735['previousDocumentData']&&_0x5cb735[_0x3d4d8e(0x131)]?vt(_0x5cb735[_0x3d4d8e(0x133)],_0x5cb735[_0x3d4d8e(0x224)],_0x5cb735['previousDocumentData'],_0x5cb735[_0x3d4d8e(0x131)],_0x5cb735[_0x3d4d8e(0x1f5)],_0x5cb735[_0x3d4d8e(0x124)]):null;return _0x5cb735[_0x3d4d8e(0x1ea)]&&_0x5cb735[_0x3d4d8e(0x131)]&&!_0x44714a?null:{'documentRedo':_0x44714a,'resourceRedo':{'id':V['id'],'params':{'unitId':_0x5cb735[_0x3d4d8e(0x224)],'resource':_0x5cb735[_0x3d4d8e(0x170)]}},'resourceUndo':{'id':V['id'],'params':{'unitId':_0x5cb735[_0x3d4d8e(0x224)],'resource':_0x5cb735[_0x3d4d8e(0x227)]}}};}function _0x3422(){const _0x4c8776=['resource','_injector','paragraphs','previousDocumentData','load','604IGoPaU','end','range','COLUMN_START','getRevision','color','min','values','_change$','cursorOffset','_updateFormulaResult','subscribe','start','startIndex','deleteLength','syncUnit','endsWith','docs-formula.command.insert','setResource','MUTATION','externalMutations','position','boolean','paragraph','text','321260wxvMYA','expectedFormula','_hostExternalReferenceModel','liveResult','segmentId','accessor','dispose','formulaId','onStarting','setFormula','_model','referenceRevision','docs-formula.command.set-number-format','identity','add','_univerInstanceService','getFormula','config','rangeId','register','docs-formula.command.replace-with-text','pushUndoRedo','COLUMN_END','_queueSync','object','getRegisteredFormulas','COLUMN_GROUP_START','unitAdded$','max','isInteger','Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.','unitId','insert','COMMAND','previousResource','trigger','_cacheEligibilityService','removeFormula','5XWvdZH','18ccDtFV','UNIVER_DOC','slice','editOp','customBlocks','univer-docs-formula','_rawResources','_instanceService','has','nextDocumentData','PARAGRAPH','document','parse','success','getBody','get','resources','iterator','empty','DOC_FORMULA_PLUGIN','3095308ZRfaor','unregister','defineProperty','packageName','disposeWithMe','pluginName','_presentationChanged$','BLOCK_START','_configService','default','forEach','docs-formula.command.remove','_loadErrors','_syncUnit','degradeDocumentData','_registrationService','constructor','TABLE_CELL_END','updates','presentationChanged$','documentData','retain','version','every','95896UGqfyy','unsupported-version','resolveBinding','getPresentation','_docFormulaModel','expectedNumberFormat','notifyTextChanged','error','status','call','endIndex','change$','getSnapshot','insertLength','eligible','_pendingUnitIds','syncExecuteCommand','getTextRanges','5951874BvbDxb','complete','deepClone','setFormulas','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','paragraphId','keys','dataStream','TABLE_ROW_START','from','nextResource','getUnit','cell','_service','_config','prototype','collectMutations','invalid-resource','documentRedo','removeUnit','assign','1.2.0','customDecorations','_preserveInvalid','schemaVersion','map','getOwnPropertyDescriptor','SECTION_BREAK','_isDisposed','formulas','some','startOffset','endOffset','params','entries','EMPTY','presentation','_deleteRegistration','toPrimitive','delete','CUSTOM_BLOCK','decorate','asObservable','unregisterUnit','blockRanges','target','7NzuLnk','externalReferences','getAllUnitsForType','SUCCESS','name','columnGroups','replaceDocRanges','CUSTOM','type','data','expectedReferenceRevision','getCurrentUnitOfType','83076JxeGFL','_resources','onCommandExecuted','function','getLoadError','rangeType','model','undoMutation','filter','redoMutation','sequenceNodesBuilder','stringify','wholeEntity','setConfig','numberFormat','_formulaService','getUnitId','pending','properties','sectionBreaks','lastValue','docs-formula.mutation.set-last-values','pattern','string','serialize','2245890TewPuD','number','stale','_formulaKeys','_setPresentation','set','trim','getFormulaValueSync','sort','includes','find','source','isArray','TABLE_CELL_START','@univerjs-pro/docs-formula','resolved','customRanges','startsWith','docs-formula.mutation.set-formula','_commandService','formulaResult$','getResource','docs-formula.command.convert-to-text','resolveFormula','PENDING','registerCommand','next','BLOCK_END','resourceUndo','getResult','registerProvider','tables','symbol','degradeBody','clear','_resourceManagerService','assess','formula','TABLE_END','references','body','textRuns','_registrations','resourceRedo','_syncScheduled','length'];_0x3422=function(){return _0x4c8776;};return _0x3422();}function _t(_0x3d0297,_0x3369da,_0x24997c,_0x2103d8){const _0x3bcb88=_0x1173d9;_0x2103d8[_0x3bcb88(0x21a)]({'id':_0x3d0297[_0x3bcb88(0x124)]+':'+_0x3d0297[_0x3bcb88(0x217)],'unitID':_0x3d0297[_0x3bcb88(0x224)],'redoMutations':[..._0x3d0297[_0x3bcb88(0x200)][_0x3bcb88(0x1a9)]?[_0x3d0297[_0x3bcb88(0x200)][_0x3bcb88(0x1a9)]]:[],..._0x3369da[_0x3bcb88(0x178)]?[_0x3369da[_0x3bcb88(0x178)]]:[],_0x3369da[_0x3bcb88(0x1e4)]],'undoMutations':[_0x3369da[_0x3bcb88(0x1d5)],..._0x24997c?[_0x24997c]:[],..._0x3d0297['externalMutations'][_0x3bcb88(0x1a7)]?[_0x3d0297[_0x3bcb88(0x200)][_0x3bcb88(0x1a7)]]:[]]});}function J(_0x4eb009){const _0x554d12=_0x1173d9;let _0x34b177=_0x4eb009[_0x554d12(0x20a)][_0x554d12(0x137)](_0x170d7c),_0x92f7af=_0x4eb009[_0x554d12(0x20a)][_0x554d12(0x137)](_0x4c8196),_0x478d64=_0x4eb009['accessor']['get'](_0x764d00),_0x46886c=gt(_0x4eb009);if(!_0x46886c)return!0x1;let _0x1e10b1=!0x1,_0x4884ae=null,_0x26678b=!0x1;try{if(_0x4eb009['externalMutations'][_0x554d12(0x1a9)]){if(!_0x34b177['syncExecuteCommand'](_0x4eb009[_0x554d12(0x200)]['redoMutation']['id'],_0x4eb009[_0x554d12(0x200)]['redoMutation'][_0x554d12(0x187)]))return!0x1;_0x1e10b1=!0x0;}if(_0x46886c['documentRedo']){let _0x2d0fec=_0x34b177[_0x554d12(0x164)](_0x46886c[_0x554d12(0x178)]['id'],_0x46886c[_0x554d12(0x178)][_0x554d12(0x187)]);if(!_0x2d0fec)return bt(_0x34b177,_0x4eb009[_0x554d12(0x200)],_0x1e10b1),!0x1;_0x4884ae={'id':_0x3f9ca3['id'],'params':{..._0x2d0fec,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0x34b177['syncExecuteCommand'](_0x46886c['resourceRedo']['id'],_0x46886c['resourceRedo']['params']))return yt(_0x34b177,_0x4884ae),bt(_0x34b177,_0x4eb009[_0x554d12(0x200)],_0x1e10b1),!0x1;_0x26678b=!0x0,_t(_0x4eb009,_0x46886c,_0x4884ae,_0x92f7af);}catch(_0x3000ee){throw _0x26678b&&_0x34b177[_0x554d12(0x164)](_0x46886c[_0x554d12(0x1d5)]['id'],_0x46886c['resourceUndo'][_0x554d12(0x187)]),yt(_0x34b177,_0x4884ae),bt(_0x34b177,_0x4eb009['externalMutations'],_0x1e10b1),_0x3000ee;}return _0x478d64[_0x554d12(0x19a)]([{'startOffset':_0x4eb009['cursorOffset'],'endOffset':_0x4eb009['cursorOffset'],'segmentId':''}],{'unitId':_0x4eb009[_0x554d12(0x224)],'subUnitId':_0x4eb009['unitId']},!0x1,{[_0xc6b882]:!0x0}),!0x0;}function vt(_0x48bf7d,_0x3a5a37,_0xa8e896,_0x5bf202,_0x4edb62,_0xabe66a){let _0x39ea09=xt(_0xa8e896,_0x5bf202,_0x2a5420(_0x48bf7d,''));return _0x39ea09?{'id':_0x3f9ca3['id'],'params':{'unitId':_0x3a5a37,'actions':_0x39ea09,'segmentId':'','textRanges':[{'startOffset':_0x4edb62,'endOffset':_0x4edb62,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0xabe66a}}:null;}function yt(_0x4758ea,_0x118db2){const _0x4f8120=_0x1173d9;_0x118db2&&_0x4758ea[_0x4f8120(0x164)](_0x118db2['id'],_0x118db2[_0x4f8120(0x187)]);}function bt(_0x1205c7,_0x8e95d3,_0xc43223){const _0x4ac44b=_0x1173d9;_0xc43223&&_0x8e95d3[_0x4ac44b(0x1a7)]&&_0x1205c7['syncExecuteCommand'](_0x8e95d3[_0x4ac44b(0x1a7)]['id'],_0x8e95d3[_0x4ac44b(0x1a7)]['params']);}function xt(_0x15049e,_0x18f579,_0x18d815){const _0x3eb0ca=_0x1173d9;let _0x4d4c35=_0x15049e[_0x3eb0ca(0x1e1)],_0x2d3188=_0x18f579[_0x3eb0ca(0x1e1)],_0x20c769=St(_0x4d4c35==null?void 0x0:_0x4d4c35[_0x3eb0ca(0x16d)],_0x2d3188==null?void 0x0:_0x2d3188[_0x3eb0ca(0x16d)]);if(!_0x20c769||!_0x2d3188)return null;let _0xa4a2ff=new _0x2dfabc();return _0xa4a2ff[_0x3eb0ca(0x151)](_0x20c769[_0x3eb0ca(0x1f8)]),_0x20c769['insertLength']>0x0&&_0xa4a2ff[_0x3eb0ca(0x225)](_0x20c769[_0x3eb0ca(0x161)],_0x4b0522(_0x2d3188,_0x20c769[_0x3eb0ca(0x1f8)],_0x20c769[_0x3eb0ca(0x1f8)]+_0x20c769[_0x3eb0ca(0x161)],!0x1)),_0x20c769[_0x3eb0ca(0x1fa)]>0x0&&_0xa4a2ff[_0x3eb0ca(0x18d)](_0x20c769[_0x3eb0ca(0x1fa)]),_0x534e11['getInstance']()[_0x3eb0ca(0x12b)](_0xa4a2ff[_0x3eb0ca(0x1b8)](),_0x18d815);}function St(_0x2da270,_0x5677aa){const _0x79a244=_0x1173d9;if(_0x2da270==null||_0x5677aa==null||_0x2da270===_0x5677aa)return null;let _0x51af1e=0x0;for(;_0x51af1e<_0x2da270[_0x79a244(0x1e6)]&&_0x51af1e<_0x5677aa[_0x79a244(0x1e6)]&&_0x2da270[_0x51af1e]===_0x5677aa[_0x51af1e];)_0x51af1e+=0x1;let _0x1ce552=_0x2da270[_0x79a244(0x1e6)],_0x54d8ff=_0x5677aa[_0x79a244(0x1e6)];for(;_0x1ce552>_0x51af1e&&_0x54d8ff>_0x51af1e&&_0x2da270[_0x1ce552-0x1]===_0x5677aa[_0x54d8ff-0x1];)--_0x1ce552,--_0x54d8ff;return{'start':_0x51af1e,'deleteLength':_0x1ce552-_0x51af1e,'insertLength':_0x54d8ff-_0x51af1e};}function Ct(_0x254afd){const _0x15ada6=_0x1173d9;return{'schemaVersion':0x1,'formulas':Object['fromEntries'](Object[_0x15ada6(0x188)](_0x254afd[_0x15ada6(0x183)])['map'](([_0x136fb5,_0x3244f0])=>[_0x136fb5,{..._0x3244f0,..._0x3244f0[_0x15ada6(0x1ae)]?{'numberFormat':{..._0x3244f0['numberFormat']}}:null,..._0x3244f0[_0x15ada6(0x1b4)]?{'lastValue':{..._0x3244f0[_0x15ada6(0x1b4)]}}:null}]))};}let Y=class extends _0x487bea{constructor(_0x3cfcc8,_0x28010e,_0x395821,_0x310242){const _0x2e64a6=_0x1173d9;super(),this['_instanceService']=_0x3cfcc8,this[_0x2e64a6(0x1cc)]=_0x28010e,this[_0x2e64a6(0x20f)]=_0x395821,this[_0x2e64a6(0x173)]=_0x310242,N(this,_0x2e64a6(0x163),new Set()),N(this,_0x2e64a6(0x1e5),!0x1),N(this,_0x2e64a6(0x182),!0x1),this[_0x2e64a6(0x12f)][_0x2e64a6(0x196)](_0xe966be[_0x2e64a6(0x129)])[_0x2e64a6(0x146)](_0x4c8f31=>this[_0x2e64a6(0x173)]['syncUnit'](_0x4c8f31)),this[_0x2e64a6(0x140)](this[_0x2e64a6(0x20f)]['change$'][_0x2e64a6(0x1f7)](({unitId:_0xdb5f91})=>this[_0x2e64a6(0x149)](_0xdb5f91))),this['disposeWithMe'](this[_0x2e64a6(0x12f)][_0x2e64a6(0x220)][_0x2e64a6(0x1f7)](({unit:_0x661d02})=>{const _0x11b60b=_0x2e64a6;_0x661d02[_0x11b60b(0x19c)]===_0xe966be[_0x11b60b(0x129)]&&this[_0x11b60b(0x21c)](_0x661d02[_0x11b60b(0x1b0)]());})),this['disposeWithMe'](this[_0x2e64a6(0x12f)]['unitDisposed$'][_0x2e64a6(0x1f7)](_0x11c08d=>{const _0x1e715b=_0x2e64a6;this[_0x1e715b(0x173)][_0x1e715b(0x191)](_0x11c08d[_0x1e715b(0x1b0)]());})),this[_0x2e64a6(0x140)](this[_0x2e64a6(0x1cc)][_0x2e64a6(0x1a2)](_0x1d52f7=>{const _0x56a7e2=_0x2e64a6;if(_0x1d52f7['id']===_0x3f9ca3['id']&&wt(_0x1d52f7[_0x56a7e2(0x187)])){let _0xe7b0d3=_0x1d52f7['params'];_0xe7b0d3[_0x56a7e2(0x209)]||this['_syncUnit'](_0xe7b0d3[_0x56a7e2(0x224)]);}}));}[_0x1173d9(0x20b)](){const _0x406e13=_0x1173d9;this[_0x406e13(0x182)]=!0x0,super[_0x406e13(0x20b)]();}['_queueSync'](_0x5dff50){const _0x4dc032=_0x1173d9;this[_0x4dc032(0x163)][_0x4dc032(0x213)](_0x5dff50),!this[_0x4dc032(0x1e5)]&&(this['_syncScheduled']=!0x0,queueMicrotask(()=>{const _0xbca49c=_0x4dc032;if(this[_0xbca49c(0x1e5)]=!0x1,this[_0xbca49c(0x182)])return;let _0x4682ee=Array[_0xbca49c(0x16f)](this[_0xbca49c(0x163)]);this[_0xbca49c(0x163)][_0xbca49c(0x1db)](),_0x4682ee[_0xbca49c(0x146)](_0x3dd17c=>this['_syncUnit'](_0x3dd17c));}));}[_0x1173d9(0x149)](_0x14351a){const _0x2834dc=_0x1173d9;let _0x2b6464=this['_instanceService'][_0x2834dc(0x171)](_0x14351a,_0xe966be[_0x2834dc(0x129)]);_0x2b6464&&this[_0x2834dc(0x173)][_0x2834dc(0x1fb)](_0x2b6464);}};Y=I([F(0x0,_0x1cb79e),F(0x1,_0x170d7c),F(0x2,_0x41fe0f(P)),F(0x3,_0x41fe0f(L))],Y);function wt(_0x54ac4b){const _0x2945b7=_0x1173d9;return typeof _0x54ac4b==_0x2945b7(0x21d)&&!!_0x54ac4b&&_0x2945b7(0x224)in _0x54ac4b&&typeof _0x54ac4b[_0x2945b7(0x224)]=='string'&&(!('segmentId'in _0x54ac4b)||_0x54ac4b['segmentId']===void 0x0||typeof _0x54ac4b[_0x2945b7(0x209)]==_0x2945b7(0x1b7));}let X=class extends _0x487bea{constructor(_0x1911a1,_0x2c27cd){const _0x350c54=_0x1173d9;super(),this[_0x350c54(0x1dc)]=_0x1911a1,this[_0x350c54(0x158)]=_0x2c27cd,this[_0x350c54(0x140)](this['_resourceManagerService']['registerPluginResource']({'pluginName':y,'businesses':[_0xe966be[_0x350c54(0x129)]],'toJson':_0x14d3ec=>JSON[_0x350c54(0x1ab)](this['_docFormulaModel'][_0x350c54(0x1b8)](_0x14d3ec)),'parseJson':_0x149cdf=>JSON[_0x350c54(0x134)](_0x149cdf),'onLoad':(_0x43465b,_0x563f6c)=>{const _0x3cb6af=_0x350c54;this[_0x3cb6af(0x158)][_0x3cb6af(0x1eb)](_0x43465b,_0x563f6c);},'onUnLoad':_0x343176=>this['_docFormulaModel']['removeUnit'](_0x343176)}));}};X=I([F(0x0,_0x39a957),F(0x1,_0x41fe0f(P))],X);var Tt=_0x1173d9(0x1c7),Et=_0x1173d9(0x17b);const Dt={};let Z=class extends _0x487bea{constructor(_0x40b010,_0x530121,_0x2e5301){const _0x293eeb=_0x1173d9;super(),this[_0x293eeb(0x214)]=_0x40b010,this['_formulaService']=_0x530121,this[_0x293eeb(0x140)](_0x2e5301[_0x293eeb(0x218)]({'resolve':(_0x4bca58,_0x14c198)=>{const _0x7b010f=_0x293eeb;var _0x46d525;return((_0x46d525=_0x14c198[_0x7b010f(0x1c9)])==null?void 0x0:_0x46d525[_0x7b010f(0x1a8)](w)[_0x7b010f(0x17f)](_0x2b0310=>({'startOffset':_0x2b0310[_0x7b010f(0x1f9)],'endOffset':_0x2b0310[_0x7b010f(0x15e)]+0x1,'text':this[_0x7b010f(0x1d0)](_0x4bca58,_0x2b0310[_0x7b010f(0x217)])})))??[];}})),this[_0x293eeb(0x140)](this['_formulaService'][_0x293eeb(0x14f)]['subscribe'](({unitId:_0x203a35})=>{const _0x24f01f=_0x293eeb;_0x2e5301[_0x24f01f(0x15a)](_0x203a35);}));}[_0x1173d9(0x1d0)](_0x258f71,_0x5af4c2){const _0xd28414=_0x1173d9;var _0x32d4f3;return((_0x32d4f3=this[_0xd28414(0x1af)][_0xd28414(0x1d6)]({'unitId':_0x258f71,'rangeId':_0x5af4c2}))==null?void 0x0:_0x32d4f3[_0xd28414(0x204)])??'';}['resolveText'](_0x3b4b3c,_0x2f656c,_0x4c264e){const _0x4cdc2f=_0x1173d9;var _0x2351bc;let _0x3fcec0=this[_0x4cdc2f(0x214)][_0x4cdc2f(0x171)](_0x3b4b3c,_0xe966be[_0x4cdc2f(0x129)]),_0x4b2e5e=_0x3fcec0==null?void 0x0:_0x3fcec0[_0x4cdc2f(0x136)]();if(!_0x4b2e5e)return'';let _0x1ba27d=_0x4b2e5e[_0x4cdc2f(0x16d)][_0x4cdc2f(0x12a)](_0x2f656c,_0x4c264e),_0x50c4a2=((_0x2351bc=_0x4b2e5e[_0x4cdc2f(0x1c9)])==null?void 0x0:_0x2351bc['filter'](_0xae838b=>w(_0xae838b)&&_0xae838b[_0x4cdc2f(0x1f9)]>=_0x2f656c&&_0xae838b[_0x4cdc2f(0x15e)]<_0x4c264e)[_0x4cdc2f(0x1c1)]((_0x2cb657,_0x53ea5d)=>_0x53ea5d[_0x4cdc2f(0x1f9)]-_0x2cb657['startIndex']))??[];for(let _0x2b28bc of _0x50c4a2){let _0x4ccd6e=_0x2b28bc[_0x4cdc2f(0x1f9)]-_0x2f656c,_0xce07b9=_0x2b28bc[_0x4cdc2f(0x15e)]-_0x2f656c+0x1;_0x1ba27d=''+_0x1ba27d[_0x4cdc2f(0x12a)](0x0,_0x4ccd6e)+this[_0x4cdc2f(0x1d0)](_0x3b4b3c,_0x2b28bc[_0x4cdc2f(0x217)])+_0x1ba27d[_0x4cdc2f(0x12a)](_0xce07b9);}return _0x1ba27d;}[_0x1173d9(0x14a)](_0x4881a3){return Ot(_0x4881a3);}[_0x1173d9(0x1da)](_0x97f622,_0x20c977,_0x1fd7cf={}){const _0x2d6d64=_0x1173d9;var _0x4b4994;return Ve({'id':_0x97f622,'body':_0x20c977,'documentStyle':{}},(((_0x4b4994=_0x20c977[_0x2d6d64(0x1c9)])==null?void 0x0:_0x4b4994[_0x2d6d64(0x1a8)](w))??[])[_0x2d6d64(0x17f)](_0x196365=>({'rangeId':_0x196365[_0x2d6d64(0x217)],'text':_0x1fd7cf[_0x196365[_0x2d6d64(0x217)]]??this[_0x2d6d64(0x1d0)](_0x97f622,_0x196365[_0x2d6d64(0x217)])})))['body']??{'dataStream':''};}};Z=I([F(0x0,_0x1cb79e),F(0x1,_0x41fe0f(L)),F(0x2,_0x41fe0f(_0x325458))],Z);function Ot(_0x519f12){const _0x380a87=_0x1173d9;var _0x49b484,_0x37d529;let _0xa28baf=kt(_0x519f12),_0x107ce3=Ve(_0x519f12,(((_0x49b484=_0x519f12[_0x380a87(0x1e1)])==null||(_0x49b484=_0x49b484[_0x380a87(0x1c9)])==null?void 0x0:_0x49b484['filter'](w))??[])[_0x380a87(0x17f)](_0x1f06ad=>({'rangeId':_0x1f06ad[_0x380a87(0x217)],'text':At(_0xa28baf==null?void 0x0:_0xa28baf[_0x380a87(0x183)][_0x1f06ad[_0x380a87(0x217)]])})));return _0x107ce3['resources']=(_0x37d529=_0x107ce3[_0x380a87(0x138)])==null?void 0x0:_0x37d529[_0x380a87(0x1a8)](_0x139adf=>_0x139adf[_0x380a87(0x198)]!==y),_0x107ce3;}function kt(_0x39a30a){const _0x2795f6=_0x1173d9;var _0x2ef6b8;let _0x477e3d=(_0x2ef6b8=_0x39a30a[_0x2795f6(0x138)])==null||(_0x2ef6b8=_0x2ef6b8[_0x2795f6(0x1c3)](_0x572050=>_0x572050[_0x2795f6(0x198)]===_0x2795f6(0x13b)))==null?void 0x0:_0x2ef6b8[_0x2795f6(0x19d)];if(_0x477e3d)try{let _0x58517f=JSON[_0x2795f6(0x134)](_0x477e3d);return x(_0x58517f)?_0x58517f:void 0x0;}catch{return;}}function At(_0x31d04c){const _0x11e419=_0x1173d9;return _0x31d04c?_0x32521a({'lastValue':_0x31d04c[_0x11e419(0x1b4)],'numberFormat':_0x31d04c[_0x11e419(0x1ae)]})[_0x11e419(0x204)]:'';}let Q=class extends _0x487bea{constructor(_0x3dbb03,_0x49c850,_0x23d8c8){const _0x5dae5d=_0x1173d9;super(),this[_0x5dae5d(0x1af)]=_0x3dbb03,this[_0x5dae5d(0x125)]=_0x49c850,this['disposeWithMe'](_0x23d8c8[_0x5dae5d(0x1d7)](this));}[_0x1173d9(0x176)](_0x3387a5){const _0x2cd3ba=_0x1173d9;let _0x511e21=new Map();for(let _0x3a8e50 of this[_0x2cd3ba(0x1af)][_0x2cd3ba(0x21e)]()){var _0x3fbb0d;if(!this[_0x2cd3ba(0x125)][_0x2cd3ba(0x1dd)](_0x3a8e50[_0x2cd3ba(0x216)]['formula'],_0x3a8e50[_0x2cd3ba(0x208)])[_0x2cd3ba(0x162)])continue;let _0x11c2b1=_0x3d55cd(_0x3a8e50['liveResult']),_0x419ecb=_0x11c2b1?_0x24052f(_0x11c2b1):null;if(!_0x419ecb||jt(_0x3a8e50[_0x2cd3ba(0x216)][_0x2cd3ba(0x1b4)],_0x419ecb))continue;let _0x23dffa=_0x511e21[_0x2cd3ba(0x137)](_0x3a8e50[_0x2cd3ba(0x212)][_0x2cd3ba(0x224)])??[];_0x23dffa['push']({'rangeId':_0x3a8e50[_0x2cd3ba(0x212)]['rangeId'],'expectedFormula':_0x3a8e50[_0x2cd3ba(0x216)][_0x2cd3ba(0x1de)],'expectedNumberFormat':(_0x3fbb0d=_0x3a8e50[_0x2cd3ba(0x216)]['numberFormat'])==null?void 0x0:_0x3fbb0d[_0x2cd3ba(0x1b6)],'expectedReferenceRevision':_0x3a8e50['referenceRevision'],'lastValue':_0x419ecb}),_0x511e21['set'](_0x3a8e50['identity'][_0x2cd3ba(0x224)],_0x23dffa);}return Array['from'](_0x511e21,([_0x26ed44,_0x48b95e])=>({'id':H['id'],'params':{'unitId':_0x26ed44,'updates':_0x48b95e}}));}};Q=I([F(0x0,_0x41fe0f(L)),F(0x1,_0x41fe0f(_0x4ef013)),F(0x2,_0x41fe0f(_0x29264c))],Q);function jt(_0x49249a,_0x5412fd){const _0x497c30=_0x1173d9;return(_0x49249a==null?void 0x0:_0x49249a['v'])===_0x5412fd['v']&&(_0x49249a==null?void 0x0:_0x49249a['t'])===_0x5412fd['t']&&(_0x49249a==null?void 0x0:_0x49249a[_0x497c30(0x1b6)])===_0x5412fd[_0x497c30(0x1b6)];}let $=class extends _0x31da3e{constructor(_0x349e75=Dt,_0x2a4852,_0x2d7a28,_0x42a1b3){const _0x587a79=_0x1173d9;super(),this[_0x587a79(0x174)]=_0x349e75,this[_0x587a79(0x1e8)]=_0x2a4852,this[_0x587a79(0x1cc)]=_0x2d7a28,this[_0x587a79(0x144)]=_0x42a1b3;let {..._0x53be4e}=_0x1b50a3({},Dt,this[_0x587a79(0x174)]);this['_configService'][_0x587a79(0x1ad)]('docs-formula.config',_0x53be4e);}[_0x1173d9(0x20d)](){const _0x17f315=_0x1173d9;this[_0x17f315(0x1e8)][_0x17f315(0x213)]([P]),this[_0x17f315(0x1e8)][_0x17f315(0x213)]([L]),this[_0x17f315(0x1e8)][_0x17f315(0x213)]([X]),this[_0x17f315(0x1e8)][_0x17f315(0x213)]([Y]),this[_0x17f315(0x1e8)][_0x17f315(0x213)]([Q]),this[_0x17f315(0x1e8)][_0x17f315(0x213)]([Z]),_0x218854(this[_0x17f315(0x1e8)],[[P],[X],[Y],[Q],[Z]]),[ot,st,V,H,U,W,G,K,ct,lt]['forEach'](_0x1bff6f=>this[_0x17f315(0x140)](this[_0x17f315(0x1cc)][_0x17f315(0x1d2)](_0x1bff6f)));}};N($,_0x1173d9(0x141),y),N($,_0x1173d9(0x13f),Tt),N($,_0x1173d9(0x152),Et),N($,'type',_0xe966be[_0x1173d9(0x129)]),$=I([_0x192577(_0x221e8d,_0x2ac530,_0x48ceb4),F(0x1,_0x41fe0f(_0x4a690a)),F(0x2,_0x170d7c),F(0x3,_0x335e00)],$);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/umd/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x419c(_0x2a0b32,_0x512560){_0x2a0b32=_0x2a0b32-0x150;var _0xd3d84b=_0xd3d8();var _0x419cd0=_0xd3d84b[_0x2a0b32];return _0x419cd0;}(function(_0x2d307f,_0x549103){var _0x2ed234=_0x419c,_0x278d59=_0x2d307f();while(!![]){try{var _0x46282c=-parseInt(_0x2ed234(0x183))/0x1+-parseInt(_0x2ed234(0x154))/0x2*(-parseInt(_0x2ed234(0x1b3))/0x3)+parseInt(_0x2ed234(0x19c))/0x4*(parseInt(_0x2ed234(0x187))/0x5)+-parseInt(_0x2ed234(0x1b1))/0x6+parseInt(_0x2ed234(0x189))/0x7+-parseInt(_0x2ed234(0x18b))/0x8+parseInt(_0x2ed234(0x1a3))/0x9*(parseInt(_0x2ed234(0x16c))/0xa);if(_0x46282c===_0x549103)break;else _0x278d59['push'](_0x278d59['shift']());}catch(_0x14a08b){_0x278d59['push'](_0x278d59['shift']());}}}(_0xd3d8,0xb3775),function(_0x298e19,_0x1a7796){var _0x111c65=_0x419c;typeof exports=='object'&&typeof module<'u'?_0x1a7796(exports,require('@univerjs-pro/docs-formula'),require('@univerjs/core'),require('@univerjs/docs/facade')):typeof define==_0x111c65(0x16b)&&define[_0x111c65(0x17d)]?define([_0x111c65(0x178),_0x111c65(0x17e),_0x111c65(0x188),_0x111c65(0x1b2)],_0x1a7796):(_0x298e19=typeof globalThis<'u'?globalThis:_0x298e19||self,_0x1a7796(_0x298e19[_0x111c65(0x1ad)]={},_0x298e19[_0x111c65(0x164)],_0x298e19[_0x111c65(0x170)],_0x298e19['UniverDocsFacade']));}(this,function(_0x5b7d60,_0x2fe1f7,_0x441308,_0x4108d7){var _0x3252f4=_0x419c;Object[_0x3252f4(0x175)](_0x5b7d60,Symbol[_0x3252f4(0x16a)],{'value':_0x3252f4(0x161)});function _0x1b212e(_0x5b7da8,_0x32908f){return function(_0x46b322,_0x22ebfd){_0x32908f(_0x46b322,_0x22ebfd,_0x5b7da8);};}function _0x2cd8c0(_0xd0bd6e,_0x2a443,_0x3bbcb9,_0x30fa3c){var _0x542cc3=_0x3252f4,_0x231160=arguments[_0x542cc3(0x1a4)],_0x76f38e=_0x231160<0x3?_0x2a443:_0x30fa3c===null?_0x30fa3c=Object[_0x542cc3(0x163)](_0x2a443,_0x3bbcb9):_0x30fa3c,_0x473495;if(typeof Reflect=='object'&&typeof Reflect[_0x542cc3(0x18f)]==_0x542cc3(0x16b))_0x76f38e=Reflect[_0x542cc3(0x18f)](_0xd0bd6e,_0x2a443,_0x3bbcb9,_0x30fa3c);else{for(var _0x346ca5=_0xd0bd6e[_0x542cc3(0x1a4)]-0x1;_0x346ca5>=0x0;_0x346ca5--)(_0x473495=_0xd0bd6e[_0x346ca5])&&(_0x76f38e=(_0x231160<0x3?_0x473495(_0x76f38e):_0x231160>0x3?_0x473495(_0x2a443,_0x3bbcb9,_0x76f38e):_0x473495(_0x2a443,_0x3bbcb9))||_0x76f38e);}return _0x231160>0x3&&_0x76f38e&&Object[_0x542cc3(0x175)](_0x2a443,_0x3bbcb9,_0x76f38e),_0x76f38e;}let _0x3e9ac5=class{constructor(_0x63b2bd,_0x140738,_0x364b99,_0x11d501,_0x3c40fe,_0x378522){var _0x15b137=_0x3252f4;this['_unitId']=_0x63b2bd,this['_rangeId']=_0x140738,this[_0x15b137(0x168)]=_0x364b99,this[_0x15b137(0x153)]=_0x11d501,this[_0x15b137(0x1a7)]=_0x3c40fe,this[_0x15b137(0x184)]=_0x378522;}['getId'](){var _0x52db65=_0x3252f4;return this[_0x52db65(0x1a6)];}[_0x3252f4(0x177)](){var _0x33c9b4=_0x3252f4;let _0x37bc41=this['_getCustomRange']();return _0x37bc41?{'endOffset':_0x37bc41[_0x33c9b4(0x198)]+0x1,'rangeId':_0x37bc41[_0x33c9b4(0x18e)],'startOffset':_0x37bc41[_0x33c9b4(0x18d)]}:null;}[_0x3252f4(0x1a5)](){var _0x2c4e76=_0x3252f4,_0x255e97;return((_0x255e97=this['_model'][_0x2c4e76(0x1a5)](this[_0x2c4e76(0x17b)],this[_0x2c4e76(0x1a6)]))==null?void 0x0:_0x255e97[_0x2c4e76(0x191)])??'';}[_0x3252f4(0x192)](){var _0x39116d=_0x3252f4;return this[_0x39116d(0x153)][_0x39116d(0x1a5)](this['_unitId'],this[_0x39116d(0x1a6)])??null;}[_0x3252f4(0x15f)](){var _0x476732=_0x3252f4;return this[_0x476732(0x1a7)][_0x476732(0x15f)]({'unitId':this['_unitId'],'rangeId':this[_0x476732(0x1a6)]})??null;}['describe'](){var _0x2722e2=_0x3252f4;let _0xe5f993=this[_0x2722e2(0x177)](),_0x4ca038=this['getConfig'](),_0x295526=this['getResult']();return!_0xe5f993||!_0x4ca038||!_0x295526?null:{..._0xe5f993,'config':_0x4ca038,'formula':_0x4ca038[_0x2722e2(0x191)],'result':_0x295526,'type':_0x2722e2(0x191)};}[_0x3252f4(0x190)](_0x2904a8){var _0x431f99=_0x3252f4;return this['_commandService'][_0x431f99(0x174)](_0x2fe1f7['UpdateDocFormulaCommand']['id'],{'externalReferences':_0x2904a8['externalReferences'],'formula':_0x2904a8['formula'],'numberFormat':_0x2904a8[_0x431f99(0x151)],'rangeId':this[_0x431f99(0x1a6)],'unitId':this[_0x431f99(0x17b)]});}[_0x3252f4(0x195)](_0x4f72da){var _0x12a04c=_0x3252f4;return this['_commandService'][_0x12a04c(0x174)](_0x2fe1f7['SetDocFormulaNumberFormatCommand']['id'],{'numberFormat':_0x4f72da,'rangeId':this['_rangeId'],'unitId':this[_0x12a04c(0x17b)]});}[_0x3252f4(0x15d)](){var _0x11fcc4=_0x3252f4;return this[_0x11fcc4(0x168)][_0x11fcc4(0x174)](_0x2fe1f7[_0x11fcc4(0x166)]['id'],{'rangeId':this[_0x11fcc4(0x1a6)],'unitId':this[_0x11fcc4(0x17b)]});}[_0x3252f4(0x16e)](_0x461c4b){var _0x3ba7a2=_0x3252f4;return this[_0x3ba7a2(0x168)][_0x3ba7a2(0x174)](_0x2fe1f7['ReplaceDocFormulaWithTextCommand']['id'],{'rangeId':this[_0x3ba7a2(0x1a6)],'text':_0x461c4b,'unitId':this[_0x3ba7a2(0x17b)]});}['convertToText'](){var _0x19131b=_0x3252f4;return this['_commandService']['syncExecuteCommand'](_0x2fe1f7[_0x19131b(0x173)]['id'],{'rangeId':this[_0x19131b(0x1a6)],'unitId':this[_0x19131b(0x17b)]});}[_0x3252f4(0x1ae)](){var _0x5503ff=_0x3252f4,_0x56d861;let _0xa1b5b=this['_univerInstanceService'][_0x5503ff(0x199)](this['_unitId'],_0x441308['UniverInstanceType'][_0x5503ff(0x159)]);return _0xa1b5b==null||(_0x56d861=_0xa1b5b['getSnapshot']()[_0x5503ff(0x1af)])==null||(_0x56d861=_0x56d861[_0x5503ff(0x18c)])==null?void 0x0:_0x56d861[_0x5503ff(0x1ac)](_0x2fdfa7=>_0x2fdfa7[_0x5503ff(0x18e)]===this[_0x5503ff(0x1a6)]&&(0x0,_0x2fe1f7[_0x5503ff(0x172)])(_0x2fdfa7));}};_0x3e9ac5=_0x2cd8c0([_0x1b212e(0x2,_0x441308['ICommandService']),_0x1b212e(0x3,(0x0,_0x441308[_0x3252f4(0x193)])(_0x2fe1f7['DocFormulaModel'])),_0x1b212e(0x4,(0x0,_0x441308['Inject'])(_0x2fe1f7[_0x3252f4(0x1aa)])),_0x1b212e(0x5,_0x441308['IUniverInstanceService'])],_0x3e9ac5);function _0x2cef9e(_0x4069ec){'@babel/helpers - typeof';var _0x4ddc0e=_0x3252f4;return _0x2cef9e=typeof Symbol==_0x4ddc0e(0x16b)&&typeof Symbol[_0x4ddc0e(0x179)]==_0x4ddc0e(0x15a)?function(_0x2070e3){return typeof _0x2070e3;}:function(_0x419956){var _0x3238a6=_0x4ddc0e;return _0x419956&&typeof Symbol==_0x3238a6(0x16b)&&_0x419956['constructor']===Symbol&&_0x419956!==Symbol['prototype']?_0x3238a6(0x15a):typeof _0x419956;},_0x2cef9e(_0x4069ec);}function _0x47c7ad(_0x44ba95,_0x56fa38){var _0x1d72ee=_0x3252f4;if(_0x2cef9e(_0x44ba95)!=_0x1d72ee(0x19d)||!_0x44ba95)return _0x44ba95;var _0x586a22=_0x44ba95[Symbol[_0x1d72ee(0x152)]];if(_0x586a22!==void 0x0){var _0x50f7cd=_0x586a22[_0x1d72ee(0x186)](_0x44ba95,_0x56fa38||'default');if(_0x2cef9e(_0x50f7cd)!=_0x1d72ee(0x19d))return _0x50f7cd;throw TypeError(_0x1d72ee(0x1a0));}return(_0x56fa38===_0x1d72ee(0x1ab)?String:Number)(_0x44ba95);}function _0x45c2dc(_0x124069){var _0x354079=_0x3252f4,_0x5661d1=_0x47c7ad(_0x124069,_0x354079(0x1ab));return _0x2cef9e(_0x5661d1)==_0x354079(0x15a)?_0x5661d1:_0x5661d1+'';}function _0x417c3c(_0x51894c,_0x308807,_0x7620a1){var _0x421cd9=_0x3252f4;return(_0x308807=_0x45c2dc(_0x308807))in _0x51894c?Object[_0x421cd9(0x175)](_0x51894c,_0x308807,{'value':_0x7620a1,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x51894c[_0x308807]=_0x7620a1,_0x51894c;}var _0x4b28ea=class extends _0x4108d7[_0x3252f4(0x19f)]{constructor(..._0x2d8f53){var _0x4ef210=_0x3252f4;super(..._0x2d8f53),_0x417c3c(this,'_docsFormulaCommandService',void 0x0),_0x417c3c(this,_0x4ef210(0x155),void 0x0),_0x417c3c(this,_0x4ef210(0x1a1),void 0x0),_0x417c3c(this,_0x4ef210(0x162),void 0x0);}[_0x3252f4(0x15c)](_0x685f0){var _0x1ee3e0=_0x3252f4;this['_docsFormulaCommandService']=_0x685f0[_0x1ee3e0(0x182)](_0x441308['ICommandService']),this['_docsFormulaDisplayTextService']=_0x685f0[_0x1ee3e0(0x182)](_0x2fe1f7[_0x1ee3e0(0x157)]),this[_0x1ee3e0(0x1a1)]=_0x685f0['get'](_0x2fe1f7[_0x1ee3e0(0x196)]),this[_0x1ee3e0(0x162)]=_0x685f0['get'](_0x441308[_0x1ee3e0(0x185)]);}[_0x3252f4(0x194)](){var _0x5ba7e6=_0x3252f4;return this['_getCompleteRanges']()['map'](_0x4ccd43=>this[_0x5ba7e6(0x176)](_0x4ccd43[_0x5ba7e6(0x18e)]));}['getFormula'](_0x865a11){var _0x25272f=_0x3252f4;return this['_getCompleteRanges']()[_0x25272f(0x17a)](_0x1af4a0=>_0x1af4a0[_0x25272f(0x18e)]===_0x865a11)?this[_0x25272f(0x176)](_0x865a11):null;}[_0x3252f4(0x18a)](_0x11ee0e){var _0x1aba1e=_0x3252f4;let _0xaeb250=this[_0x1aba1e(0x165)]()[_0x1aba1e(0x1ac)](_0x14d7f1=>_0x14d7f1[_0x1aba1e(0x18d)]<=_0x11ee0e&&_0x11ee0e<=_0x14d7f1[_0x1aba1e(0x198)]);return _0xaeb250?this['_createFormula'](_0xaeb250[_0x1aba1e(0x18e)]):null;}[_0x3252f4(0x19e)](){var _0x1f7c4d=_0x3252f4;let _0x8039fd=this[_0x1f7c4d(0x162)][_0x1f7c4d(0x16d)](this['id']);if(!_0x8039fd)throw Error(_0x1f7c4d(0x15b)+this['id']+_0x1f7c4d(0x1a9));return this[_0x1f7c4d(0x155)][_0x1f7c4d(0x19a)](_0x8039fd);}[_0x3252f4(0x1b0)](_0x11eb4a){var _0x1cb9a3=_0x3252f4;return this['_insert']({'externalReferences':_0x11eb4a[_0x1cb9a3(0x160)],'formula':_0x11eb4a[_0x1cb9a3(0x191)],'numberFormat':_0x11eb4a[_0x1cb9a3(0x151)],'target':{'type':'range','startOffset':_0x11eb4a['startOffset'],'endOffset':_0x11eb4a[_0x1cb9a3(0x171)]},'unitId':this[_0x1cb9a3(0x17c)]()});}[_0x3252f4(0x167)](_0x3a57c5){var _0x4fdfaf=_0x3252f4;let _0x129bd2=this[_0x4fdfaf(0x1a8)]['syncExecuteCommand'](_0x2fe1f7[_0x4fdfaf(0x1a2)]['id'],_0x3a57c5);return _0x129bd2?this['_createFormula'](_0x129bd2[_0x4fdfaf(0x18e)]):null;}[_0x3252f4(0x165)](){var _0x25b50e=_0x3252f4,_0x189eae;let _0x43f32c=this['_docsFormulaModel']['getFormulas'](this['getId']());return((_0x189eae=this['getBody']('')[_0x25b50e(0x18c)])==null?void 0x0:_0x189eae[_0x25b50e(0x158)](_0x52677c=>(0x0,_0x2fe1f7[_0x25b50e(0x172)])(_0x52677c)&&_0x43f32c[_0x52677c[_0x25b50e(0x18e)]]!=null))??[];}['_createFormula'](_0x11a10d){var _0x4e89d7=_0x3252f4;return this[_0x4e89d7(0x16f)][_0x4e89d7(0x197)](_0x3e9ac5,this['getId'](),_0x11a10d);}};_0x4108d7[_0x3252f4(0x19f)]['extend'](_0x4b28ea);var _0x321beb=class extends _0x4108d7[_0x3252f4(0x15e)]{constructor(..._0x5b7525){var _0x1b6933=_0x3252f4;super(..._0x5b7525),_0x417c3c(this,_0x1b6933(0x1a8),void 0x0);}['_initialize'](_0x37a851){var _0x1655ae=_0x3252f4;this[_0x1655ae(0x1a8)]=_0x37a851[_0x1655ae(0x182)](_0x441308[_0x1655ae(0x17f)]);}[_0x3252f4(0x1b0)](_0x55f5f6,_0x42e2a1,_0x45941d={}){var _0x16af19=_0x3252f4;return this[_0x16af19(0x167)](_0x55f5f6,_0x42e2a1,_0x45941d);}['appendFormula'](_0x1d9d7f,_0x592152={}){var _0x2cad57=_0x3252f4;return this[_0x2cad57(0x167)]('end',_0x1d9d7f,_0x592152);}[_0x3252f4(0x167)](_0x328e69,_0xa10919,_0x539c7e){var _0x1cf530=_0x3252f4;if(this[_0x1cf530(0x19b)]())return null;let _0x439cde={'externalReferences':_0x539c7e['externalReferences'],'formula':_0xa10919,'numberFormat':_0x539c7e[_0x1cf530(0x151)],'target':{'type':_0x1cf530(0x181),'paragraphId':this['getId'](),'position':_0x328e69},'unitId':this[_0x1cf530(0x156)][_0x1cf530(0x17c)]()},_0x199354=this['_docsFormulaCommandService']['syncExecuteCommand'](_0x2fe1f7[_0x1cf530(0x1a2)]['id'],_0x439cde);return _0x199354?this[_0x1cf530(0x16f)][_0x1cf530(0x197)](_0x3e9ac5,this[_0x1cf530(0x156)]['getId'](),_0x199354['rangeId']):null;}};_0x4108d7['FDocumentParagraph'][_0x3252f4(0x180)](_0x321beb);var _0x56f618=class extends _0x4108d7[_0x3252f4(0x150)]{constructor(..._0x35cdf2){var _0x3227cc=_0x3252f4;super(..._0x35cdf2),_0x417c3c(this,_0x3227cc(0x1a8),void 0x0);}[_0x3252f4(0x15c)](_0x500b80){var _0x4cbe95=_0x3252f4;this[_0x4cbe95(0x1a8)]=_0x500b80[_0x4cbe95(0x182)](_0x441308[_0x4cbe95(0x17f)]);}[_0x3252f4(0x169)](_0x145e18,_0x5d54d3={}){var _0x3cfee5=_0x3252f4;let {endOffset:_0x1e8f2e,segmentId:_0x31902e,startOffset:_0x306ed4}=this[_0x3cfee5(0x177)]();return _0x31902e?null:this[_0x3cfee5(0x167)](_0x306ed4,_0x1e8f2e,_0x145e18,_0x5d54d3);}['_insert'](_0x2a9d44,_0xdfb0cf,_0x17418f,_0x1d0a4d){var _0x5d1c71=_0x3252f4;let _0x31ad38={'externalReferences':_0x1d0a4d[_0x5d1c71(0x160)],'formula':_0x17418f,'numberFormat':_0x1d0a4d[_0x5d1c71(0x151)],'target':{'type':'range','startOffset':_0x2a9d44,'endOffset':_0xdfb0cf},'unitId':this[_0x5d1c71(0x156)][_0x5d1c71(0x17c)]()},_0x2be412=this[_0x5d1c71(0x1a8)][_0x5d1c71(0x174)](_0x2fe1f7[_0x5d1c71(0x1a2)]['id'],_0x31ad38);return _0x2be412?this[_0x5d1c71(0x16f)]['createInstance'](_0x3e9ac5,this['_document'][_0x5d1c71(0x17c)](),_0x2be412[_0x5d1c71(0x18e)]):null;}};_0x4108d7[_0x3252f4(0x150)][_0x3252f4(0x180)](_0x56f618),Object[_0x3252f4(0x175)](_0x5b7d60,'FDocumentFormula',{'enumerable':!0x0,'get':function(){return _0x3e9ac5;}});}));function _0xd3d8(){var _0x14b1bd=['RemoveDocFormulaCommand','_insert','_commandService','replaceWithFormula','toStringTag','function','14510qMOifQ','saveUnit','replaceWithText','_injector','UniverCore','endOffset','isDocFormulaRange','ConvertDocFormulaToTextCommand','syncExecuteCommand','defineProperty','_createFormula','getRange','exports','iterator','some','_unitId','getId','amd','@univerjs-pro/docs-formula','ICommandService','extend','paragraph','get','1456146eVIieS','_univerInstanceService','IResourceLoaderService','call','10XuUWyb','@univerjs/core','3955112HGVPYJ','getFormulaAt','11163776ZsXjRS','customRanges','startIndex','rangeId','decorate','update','formula','getConfig','Inject','getFormulas','setNumberFormat','DocFormulaModel','createInstance','endIndex','getUnit','degradeDocumentData','getSegmentId','2927044nTuRvC','object','saveFormulaDisplayTextSnapshot','FDocument','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_docsFormulaModel','InsertDocFormulaCommand','16668fHMuhE','length','getFormula','_rangeId','_service','_docsFormulaCommandService','\x20could\x20not\x20be\x20serialized.','DocFormulaService','string','find','UniverProDocsFormulaFacade','_getCustomRange','body','insertFormula','7494816CTEUoi','@univerjs/docs/facade','360171wMfQTW','FDocumentTextRange','numberFormat','toPrimitive','_model','2YvDDNd','_docsFormulaDisplayTextService','_document','DocFormulaDisplayTextService','filter','UNIVER_DOC','symbol','Document\x20','_initialize','remove','FDocumentParagraph','getResult','externalReferences','Module','_docsFormulaResourceLoaderService','getOwnPropertyDescriptor','UniverProDocsFormula','_getCompleteRanges'];_0xd3d8=function(){return _0x14b1bd;};return _0xd3d8();}
|
|
1
|
+
function _0x4167(_0x4f2dd8,_0x356c08){_0x4f2dd8=_0x4f2dd8-0x1df;var _0x28f8b4=_0x28f8();var _0x4167c6=_0x28f8b4[_0x4f2dd8];return _0x4167c6;}(function(_0x2626ec,_0x480aff){var _0x150a1a=_0x4167,_0xbc3f5b=_0x2626ec();while(!![]){try{var _0x483d56=-parseInt(_0x150a1a(0x1ef))/0x1*(parseInt(_0x150a1a(0x206))/0x2)+-parseInt(_0x150a1a(0x1e6))/0x3*(-parseInt(_0x150a1a(0x23e))/0x4)+-parseInt(_0x150a1a(0x235))/0x5+parseInt(_0x150a1a(0x229))/0x6*(parseInt(_0x150a1a(0x209))/0x7)+-parseInt(_0x150a1a(0x223))/0x8+-parseInt(_0x150a1a(0x1f0))/0x9*(-parseInt(_0x150a1a(0x211))/0xa)+parseInt(_0x150a1a(0x1ee))/0xb*(parseInt(_0x150a1a(0x21f))/0xc);if(_0x483d56===_0x480aff)break;else _0xbc3f5b['push'](_0xbc3f5b['shift']());}catch(_0xcfa317){_0xbc3f5b['push'](_0xbc3f5b['shift']());}}}(_0x28f8,0xc51f5),function(_0x3dad24,_0x3764cb){var _0x2fef92=_0x4167;typeof exports=='object'&&typeof module<'u'?_0x3764cb(exports,require('@univerjs-pro/docs-formula'),require('@univerjs/core'),require('@univerjs/docs/facade')):typeof define==_0x2fef92(0x221)&&define[_0x2fef92(0x246)]?define([_0x2fef92(0x224),'@univerjs-pro/docs-formula','@univerjs/core',_0x2fef92(0x236)],_0x3764cb):(_0x3dad24=typeof globalThis<'u'?globalThis:_0x3dad24||self,_0x3764cb(_0x3dad24[_0x2fef92(0x204)]={},_0x3dad24[_0x2fef92(0x22d)],_0x3dad24[_0x2fef92(0x23b)],_0x3dad24[_0x2fef92(0x222)]));}(this,function(_0x326a45,_0x5f16d0,_0x457a97,_0x5e2456){var _0x5a2f2d=_0x4167;Object['defineProperty'](_0x326a45,Symbol[_0x5a2f2d(0x1f7)],{'value':_0x5a2f2d(0x1e8)});function _0x41b620(_0x25a8cb,_0x4d16e9){return function(_0x1d9f05,_0x1e24f9){_0x4d16e9(_0x1d9f05,_0x1e24f9,_0x25a8cb);};}function _0x170467(_0x5bd71f,_0x11f2d0,_0xfced28,_0x34b068){var _0x3546f6=_0x5a2f2d,_0x71b998=arguments['length'],_0x259cad=_0x71b998<0x3?_0x11f2d0:_0x34b068===null?_0x34b068=Object[_0x3546f6(0x23a)](_0x11f2d0,_0xfced28):_0x34b068,_0x345238;if(typeof Reflect=='object'&&typeof Reflect['decorate']==_0x3546f6(0x221))_0x259cad=Reflect[_0x3546f6(0x1e7)](_0x5bd71f,_0x11f2d0,_0xfced28,_0x34b068);else{for(var _0x534d1e=_0x5bd71f[_0x3546f6(0x1e0)]-0x1;_0x534d1e>=0x0;_0x534d1e--)(_0x345238=_0x5bd71f[_0x534d1e])&&(_0x259cad=(_0x71b998<0x3?_0x345238(_0x259cad):_0x71b998>0x3?_0x345238(_0x11f2d0,_0xfced28,_0x259cad):_0x345238(_0x11f2d0,_0xfced28))||_0x259cad);}return _0x71b998>0x3&&_0x259cad&&Object[_0x3546f6(0x226)](_0x11f2d0,_0xfced28,_0x259cad),_0x259cad;}let _0x53625=class{constructor(_0x5c3837,_0x24697e,_0x1da3dc,_0x413623,_0x2bdd7b,_0xdf15bc){var _0x273a83=_0x5a2f2d;this[_0x273a83(0x1e2)]=_0x5c3837,this['_rangeId']=_0x24697e,this[_0x273a83(0x1fb)]=_0x1da3dc,this[_0x273a83(0x20b)]=_0x413623,this[_0x273a83(0x216)]=_0x2bdd7b,this[_0x273a83(0x23d)]=_0xdf15bc;}[_0x5a2f2d(0x200)](){var _0x2e93e0=_0x5a2f2d;return this[_0x2e93e0(0x1f6)];}[_0x5a2f2d(0x242)](){var _0x12133f=_0x5a2f2d;let _0x4af952=this[_0x12133f(0x20a)]();return _0x4af952?{'endOffset':_0x4af952[_0x12133f(0x22c)]+0x1,'rangeId':_0x4af952[_0x12133f(0x20f)],'startOffset':_0x4af952['startIndex']}:null;}[_0x5a2f2d(0x215)](){var _0x58eaca=_0x5a2f2d,_0x998234;return((_0x998234=this[_0x58eaca(0x20b)][_0x58eaca(0x215)](this[_0x58eaca(0x1e2)],this[_0x58eaca(0x1f6)]))==null?void 0x0:_0x998234[_0x58eaca(0x205)])??'';}[_0x5a2f2d(0x21b)](){var _0x397ab8=_0x5a2f2d;return this[_0x397ab8(0x20b)][_0x397ab8(0x215)](this[_0x397ab8(0x1e2)],this[_0x397ab8(0x1f6)])??null;}[_0x5a2f2d(0x219)](){var _0x5ae3ef=_0x5a2f2d;return this[_0x5ae3ef(0x216)][_0x5ae3ef(0x219)]({'unitId':this[_0x5ae3ef(0x1e2)],'rangeId':this[_0x5ae3ef(0x1f6)]})??null;}[_0x5a2f2d(0x234)](){var _0x2da57c=_0x5a2f2d;let _0x2c7c0f=this[_0x2da57c(0x242)](),_0x4ce947=this[_0x2da57c(0x21b)](),_0x5a2841=this[_0x2da57c(0x219)]();return!_0x2c7c0f||!_0x4ce947||!_0x5a2841?null:{..._0x2c7c0f,'config':_0x4ce947,'formula':_0x4ce947[_0x2da57c(0x205)],'result':_0x5a2841,'type':_0x2da57c(0x205)};}[_0x5a2f2d(0x203)](_0x114871){var _0x233184=_0x5a2f2d;return this[_0x233184(0x1fb)][_0x233184(0x1e9)](_0x5f16d0[_0x233184(0x23c)]['id'],{'externalReferences':_0x114871[_0x233184(0x1eb)],'formula':_0x114871[_0x233184(0x205)],'numberFormat':_0x114871[_0x233184(0x213)],'rangeId':this[_0x233184(0x1f6)],'unitId':this[_0x233184(0x1e2)]});}[_0x5a2f2d(0x1f9)](_0x25f052){var _0x266a8c=_0x5a2f2d;return this['_commandService'][_0x266a8c(0x1e9)](_0x5f16d0[_0x266a8c(0x21e)]['id'],{'numberFormat':_0x25f052,'rangeId':this[_0x266a8c(0x1f6)],'unitId':this[_0x266a8c(0x1e2)]});}[_0x5a2f2d(0x1f2)](){var _0x1d9170=_0x5a2f2d;return this['_commandService'][_0x1d9170(0x1e9)](_0x5f16d0[_0x1d9170(0x237)]['id'],{'rangeId':this[_0x1d9170(0x1f6)],'unitId':this[_0x1d9170(0x1e2)]});}[_0x5a2f2d(0x1fa)](_0x3e7d54){var _0x20f354=_0x5a2f2d;return this[_0x20f354(0x1fb)][_0x20f354(0x1e9)](_0x5f16d0[_0x20f354(0x21a)]['id'],{'rangeId':this[_0x20f354(0x1f6)],'text':_0x3e7d54,'unitId':this[_0x20f354(0x1e2)]});}[_0x5a2f2d(0x1f5)](){var _0x15d78c=_0x5a2f2d;return this[_0x15d78c(0x1fb)]['syncExecuteCommand'](_0x5f16d0[_0x15d78c(0x230)]['id'],{'rangeId':this[_0x15d78c(0x1f6)],'unitId':this[_0x15d78c(0x1e2)]});}['_getCustomRange'](){var _0x4f39db=_0x5a2f2d,_0x15ceaf;let _0xc6936e=this['_univerInstanceService']['getUnit'](this[_0x4f39db(0x1e2)],_0x457a97[_0x4f39db(0x245)][_0x4f39db(0x1fc)]);return _0xc6936e==null||(_0x15ceaf=_0xc6936e['getSnapshot']()['body'])==null||(_0x15ceaf=_0x15ceaf[_0x4f39db(0x228)])==null?void 0x0:_0x15ceaf[_0x4f39db(0x201)](_0x2b842c=>_0x2b842c[_0x4f39db(0x20f)]===this['_rangeId']&&(0x0,_0x5f16d0[_0x4f39db(0x248)])(_0x2b842c));}};_0x53625=_0x170467([_0x41b620(0x2,_0x457a97[_0x5a2f2d(0x1e1)]),_0x41b620(0x3,(0x0,_0x457a97[_0x5a2f2d(0x238)])(_0x5f16d0[_0x5a2f2d(0x21d)])),_0x41b620(0x4,(0x0,_0x457a97[_0x5a2f2d(0x238)])(_0x5f16d0[_0x5a2f2d(0x244)])),_0x41b620(0x5,_0x457a97[_0x5a2f2d(0x1ea)])],_0x53625);function _0x24ce1a(_0xe386a7){'@babel/helpers - typeof';var _0x5bd403=_0x5a2f2d;return _0x24ce1a=typeof Symbol==_0x5bd403(0x221)&&typeof Symbol[_0x5bd403(0x247)]==_0x5bd403(0x239)?function(_0x1ba0c0){return typeof _0x1ba0c0;}:function(_0x27f59c){var _0x5bc666=_0x5bd403;return _0x27f59c&&typeof Symbol=='function'&&_0x27f59c[_0x5bc666(0x21c)]===Symbol&&_0x27f59c!==Symbol[_0x5bc666(0x1ed)]?_0x5bc666(0x239):typeof _0x27f59c;},_0x24ce1a(_0xe386a7);}function _0x474385(_0x2f0840,_0x488499){var _0x4e7c09=_0x5a2f2d;if(_0x24ce1a(_0x2f0840)!=_0x4e7c09(0x210)||!_0x2f0840)return _0x2f0840;var _0x24a485=_0x2f0840[Symbol['toPrimitive']];if(_0x24a485!==void 0x0){var _0x24baef=_0x24a485['call'](_0x2f0840,_0x488499||'default');if(_0x24ce1a(_0x24baef)!=_0x4e7c09(0x210))return _0x24baef;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x488499===_0x4e7c09(0x1ff)?String:Number)(_0x2f0840);}function _0x5bd914(_0x3d7a5a){var _0x4ba779=_0x5a2f2d,_0x50bc17=_0x474385(_0x3d7a5a,_0x4ba779(0x1ff));return _0x24ce1a(_0x50bc17)==_0x4ba779(0x239)?_0x50bc17:_0x50bc17+'';}function _0x5f4f02(_0x595634,_0x31df30,_0x244cb4){return(_0x31df30=_0x5bd914(_0x31df30))in _0x595634?Object['defineProperty'](_0x595634,_0x31df30,{'value':_0x244cb4,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x595634[_0x31df30]=_0x244cb4,_0x595634;}var _0xc37571=class extends _0x5e2456[_0x5a2f2d(0x220)]{constructor(..._0x4cdb37){var _0x35366f=_0x5a2f2d;super(..._0x4cdb37),_0x5f4f02(this,_0x35366f(0x217),void 0x0),_0x5f4f02(this,_0x35366f(0x22f),void 0x0),_0x5f4f02(this,_0x35366f(0x22a),void 0x0),_0x5f4f02(this,_0x35366f(0x20c),void 0x0);}[_0x5a2f2d(0x227)](_0x542eaa){var _0x2fed60=_0x5a2f2d;this[_0x2fed60(0x217)]=_0x542eaa[_0x2fed60(0x241)](_0x457a97[_0x2fed60(0x1e1)]),this[_0x2fed60(0x22f)]=_0x542eaa[_0x2fed60(0x241)](_0x5f16d0[_0x2fed60(0x1fe)]),this['_docsFormulaModel']=_0x542eaa['get'](_0x5f16d0[_0x2fed60(0x21d)]),this[_0x2fed60(0x20c)]=_0x542eaa[_0x2fed60(0x241)](_0x457a97[_0x2fed60(0x233)]);}[_0x5a2f2d(0x207)](){var _0x18aa31=_0x5a2f2d;return this[_0x18aa31(0x1fd)]()[_0x18aa31(0x23f)](_0x1bf717=>this[_0x18aa31(0x1ec)](_0x1bf717[_0x18aa31(0x20f)]));}['getFormula'](_0x4f3491){var _0x4692b2=_0x5a2f2d;return this[_0x4692b2(0x1fd)]()[_0x4692b2(0x1e4)](_0x202295=>_0x202295[_0x4692b2(0x20f)]===_0x4f3491)?this[_0x4692b2(0x1ec)](_0x4f3491):null;}['getFormulaAt'](_0xf5b451){var _0x5ba18c=_0x5a2f2d;let _0x5633a3=this['_getCompleteRanges']()[_0x5ba18c(0x201)](_0xc1b5db=>_0xc1b5db['startIndex']<=_0xf5b451&&_0xf5b451<=_0xc1b5db['endIndex']);return _0x5633a3?this[_0x5ba18c(0x1ec)](_0x5633a3[_0x5ba18c(0x20f)]):null;}[_0x5a2f2d(0x1f1)](){var _0x3d107f=_0x5a2f2d;let _0x1faf2b=this[_0x3d107f(0x20c)][_0x3d107f(0x20e)](this['id']);if(!_0x1faf2b)throw Error(_0x3d107f(0x1f4)+this['id']+'\x20could\x20not\x20be\x20serialized.');return this['_docsFormulaDisplayTextService'][_0x3d107f(0x225)](_0x1faf2b);}['insertFormula'](_0x449d3f){var _0x179979=_0x5a2f2d;return this['_insert']({'externalReferences':_0x449d3f[_0x179979(0x1eb)],'formula':_0x449d3f[_0x179979(0x205)],'numberFormat':_0x449d3f[_0x179979(0x213)],'target':{'type':'range','startOffset':_0x449d3f['startOffset'],'endOffset':_0x449d3f[_0x179979(0x231)]},'unitId':this[_0x179979(0x200)]()});}[_0x5a2f2d(0x22e)](_0x5d6cc3){var _0x48529d=_0x5a2f2d;let _0x351515=this[_0x48529d(0x217)]['syncExecuteCommand'](_0x5f16d0[_0x48529d(0x1f3)]['id'],_0x5d6cc3);return _0x351515?this[_0x48529d(0x1ec)](_0x351515[_0x48529d(0x20f)]):null;}[_0x5a2f2d(0x1fd)](){var _0x5c5f5e=_0x5a2f2d,_0x256f34;let _0x5c9ef7=this[_0x5c5f5e(0x22a)][_0x5c5f5e(0x207)](this[_0x5c5f5e(0x200)]());return((_0x256f34=this[_0x5c5f5e(0x208)]('')[_0x5c5f5e(0x228)])==null?void 0x0:_0x256f34[_0x5c5f5e(0x1f8)](_0x25174d=>(0x0,_0x5f16d0[_0x5c5f5e(0x248)])(_0x25174d)&&_0x5c9ef7[_0x25174d[_0x5c5f5e(0x20f)]]!=null))??[];}['_createFormula'](_0x4f7c9f){var _0x2ce703=_0x5a2f2d;return this[_0x2ce703(0x22b)][_0x2ce703(0x240)](_0x53625,this[_0x2ce703(0x200)](),_0x4f7c9f);}};_0x5e2456[_0x5a2f2d(0x220)]['extend'](_0xc37571);var _0x45bbf4=class extends _0x5e2456[_0x5a2f2d(0x20d)]{constructor(..._0x12285c){var _0x52e5a1=_0x5a2f2d;super(..._0x12285c),_0x5f4f02(this,_0x52e5a1(0x217),void 0x0);}['_initialize'](_0xb16085){var _0x1197b9=_0x5a2f2d;this[_0x1197b9(0x217)]=_0xb16085['get'](_0x457a97[_0x1197b9(0x1e1)]);}['insertFormula'](_0xeb8580,_0x397954,_0xc46931={}){var _0x1d10f8=_0x5a2f2d;return this[_0x1d10f8(0x22e)](_0xeb8580,_0x397954,_0xc46931);}[_0x5a2f2d(0x202)](_0x10c6b1,_0x4d8684={}){var _0x1ce48d=_0x5a2f2d;return this[_0x1ce48d(0x22e)](_0x1ce48d(0x214),_0x10c6b1,_0x4d8684);}['_insert'](_0x14d47e,_0x3b89f2,_0x5155fe){var _0x4e4e04=_0x5a2f2d;if(this[_0x4e4e04(0x1e3)]())return null;let _0x2dac3f={'externalReferences':_0x5155fe[_0x4e4e04(0x1eb)],'formula':_0x3b89f2,'numberFormat':_0x5155fe[_0x4e4e04(0x213)],'target':{'type':_0x4e4e04(0x1df),'paragraphId':this[_0x4e4e04(0x200)](),'position':_0x14d47e},'unitId':this[_0x4e4e04(0x218)]['getId']()},_0x136346=this[_0x4e4e04(0x217)]['syncExecuteCommand'](_0x5f16d0['InsertDocFormulaCommand']['id'],_0x2dac3f);return _0x136346?this[_0x4e4e04(0x22b)][_0x4e4e04(0x240)](_0x53625,this[_0x4e4e04(0x218)][_0x4e4e04(0x200)](),_0x136346[_0x4e4e04(0x20f)]):null;}};_0x5e2456[_0x5a2f2d(0x20d)][_0x5a2f2d(0x212)](_0x45bbf4);var _0x2f88d9=class extends _0x5e2456['FDocumentTextRange']{constructor(..._0x49a7c2){var _0x56b8e4=_0x5a2f2d;super(..._0x49a7c2),_0x5f4f02(this,_0x56b8e4(0x217),void 0x0);}[_0x5a2f2d(0x227)](_0x4391fc){var _0x356557=_0x5a2f2d;this['_docsFormulaCommandService']=_0x4391fc[_0x356557(0x241)](_0x457a97[_0x356557(0x1e1)]);}[_0x5a2f2d(0x232)](_0x185648,_0x1799de={}){var _0x5f3aa1=_0x5a2f2d;let {endOffset:_0x58c9dd,segmentId:_0x2470d2,startOffset:_0x4b56a4}=this[_0x5f3aa1(0x242)]();return _0x2470d2?null:this[_0x5f3aa1(0x22e)](_0x4b56a4,_0x58c9dd,_0x185648,_0x1799de);}['_insert'](_0x275a67,_0x5a0cb5,_0x2be3e9,_0x44d05f){var _0x277c62=_0x5a2f2d;let _0x4c69a0={'externalReferences':_0x44d05f[_0x277c62(0x1eb)],'formula':_0x2be3e9,'numberFormat':_0x44d05f[_0x277c62(0x213)],'target':{'type':'range','startOffset':_0x275a67,'endOffset':_0x5a0cb5},'unitId':this[_0x277c62(0x218)]['getId']()},_0x4bef1d=this[_0x277c62(0x217)][_0x277c62(0x1e9)](_0x5f16d0['InsertDocFormulaCommand']['id'],_0x4c69a0);return _0x4bef1d?this[_0x277c62(0x22b)][_0x277c62(0x240)](_0x53625,this['_document'][_0x277c62(0x200)](),_0x4bef1d[_0x277c62(0x20f)]):null;}};_0x5e2456[_0x5a2f2d(0x243)]['extend'](_0x2f88d9),Object[_0x5a2f2d(0x226)](_0x326a45,_0x5a2f2d(0x1e5),{'enumerable':!0x0,'get':function(){return _0x53625;}});}));function _0x28f8(){var _0x993a26=['toStringTag','filter','setNumberFormat','replaceWithText','_commandService','UNIVER_DOC','_getCompleteRanges','DocFormulaDisplayTextService','string','getId','find','appendFormula','update','UniverProDocsFormulaFacade','formula','25826sVcyjH','getFormulas','getBody','4974767LwgnJf','_getCustomRange','_model','_docsFormulaResourceLoaderService','FDocumentParagraph','saveUnit','rangeId','object','20eSjwlu','extend','numberFormat','end','getFormula','_service','_docsFormulaCommandService','_document','getResult','ReplaceDocFormulaWithTextCommand','getConfig','constructor','DocFormulaModel','SetDocFormulaNumberFormatCommand','12VPfMlX','FDocument','function','UniverDocsFacade','3881568FIubDd','exports','degradeDocumentData','defineProperty','_initialize','customRanges','12siesuS','_docsFormulaModel','_injector','endIndex','UniverProDocsFormula','_insert','_docsFormulaDisplayTextService','ConvertDocFormulaToTextCommand','endOffset','replaceWithFormula','IResourceLoaderService','describe','7070745xDnvKq','@univerjs/docs/facade','RemoveDocFormulaCommand','Inject','symbol','getOwnPropertyDescriptor','UniverCore','UpdateDocFormulaCommand','_univerInstanceService','4vrKxQK','map','createInstance','get','getRange','FDocumentTextRange','DocFormulaService','UniverInstanceType','amd','iterator','isDocFormulaRange','paragraph','length','ICommandService','_unitId','getSegmentId','some','FDocumentFormula','4155123XyiLwF','decorate','Module','syncExecuteCommand','IUniverInstanceService','externalReferences','_createFormula','prototype','1391137cMXcKN','122folziq','6071733OxGpye','saveFormulaDisplayTextSnapshot','remove','InsertDocFormulaCommand','Document\x20','convertToText','_rangeId'];_0x28f8=function(){return _0x993a26;};return _0x28f8();}
|