@univerjs-pro/docs-formula 1.0.2 → 1.0.3

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/index.js CHANGED
@@ -1 +1 @@
1
- const _0x241cd9=_0x321c;(function(_0xc42f50,_0x21ee3d){const _0xdc73ed=_0x321c,_0xf9eed9=_0xc42f50();while(!![]){try{const _0x5e627e=-parseInt(_0xdc73ed(0x22f))/0x1+-parseInt(_0xdc73ed(0x1eb))/0x2+parseInt(_0xdc73ed(0x2ce))/0x3*(parseInt(_0xdc73ed(0x23a))/0x4)+-parseInt(_0xdc73ed(0x227))/0x5+parseInt(_0xdc73ed(0x234))/0x6+parseInt(_0xdc73ed(0x2af))/0x7*(parseInt(_0xdc73ed(0x2d5))/0x8)+-parseInt(_0xdc73ed(0x2b6))/0x9*(-parseInt(_0xdc73ed(0x222))/0xa);if(_0x5e627e===_0x21ee3d)break;else _0xf9eed9['push'](_0xf9eed9['shift']());}catch(_0x591fd3){_0xf9eed9['push'](_0xf9eed9['shift']());}}}(_0xe02e,0xdfabd));import{FormulaCacheEligibilityService as _0x144415,FormulaLastValuePersistenceService as _0xa4a93b,HostExternalReferenceModel as _0x2a643f,UniverProFormulaEnginePlugin as _0x48082c,buildUpsertHostExternalReferenceMutations as _0x3c6f60,collectFormulaExternalReferenceQualifiers as _0x2fe8c6,getScalarFormulaResultCell as _0x7be344,resolveFormulaResultPresentation as _0x3cb7d0,resolveHostFormulaExternalReferences as _0x1eb386,toFormulaLastValue as _0x241cf2}from'@univerjs-pro/engine-formula';import{CellValueType as _0x2a3989,CommandType as _0x503dba,CustomRangeType as _0x562d5a,DataStreamTreeTokenType as _0x308616,DependentOn as _0x3a925b,Disposable as _0x2c5b49,ICommandService as _0x583930,IConfigService as _0x4d1d27,IResourceManagerService as _0x1802be,IUndoRedoService as _0x196b7c,IUniverInstanceService as _0x6870f1,Inject as _0x199f03,Injector as _0x9a266a,JSONX as _0x59e127,Plugin as _0x2b54c9,TextX as _0x32b2df,Tools as _0x264f7b,UniverInstanceType as _0x46296f,generateRandomId as _0xd42773,getBodySliceForTextXAction as _0x2e6873,getCustomRangeInterval as _0xf4a334,getParagraphContentStartOffset as _0x2b5919,getRichTextEditPath as _0x5f4bdc,merge as _0x312ea2,shiftExclusiveRangeOnDelete as _0x2b93f6,shiftExclusiveRangeOnInsert as _0x4d5964,shiftInclusiveRangeOnDelete as _0x7460cf,shiftInclusiveRangeOnInsert as _0x3c2670,touchDependencies as _0x14182c}from'@univerjs/core';import{DOC_SELECTION_OPTION_PRESERVE_CARET as _0x39973e,DocSelectionManagerService as _0x4acac4,DocTextResolverService as _0x4f4dae,RichTextEditingMutation as _0x2acc6a,UniverDocsPlugin as _0xdd033b}from'@univerjs/docs';import{FormulaResultStatus as _0x41ab96,LexerTreeBuilder as _0x322ca6,OtherFormulaBizType as _0x342fcf,RegisterOtherFormulaService as _0x2ae365}from'@univerjs/engine-formula';import{Subject as _0x7c5dac}from'rxjs';import{UniverLicensePlugin as _0x14e208}from'@univerjs-pro/license';const y=_0x241cd9(0x24a),je=0x1,Me='univer-docs-formula',Ne='';function b(){return{'schemaVersion':0x1,'formulas':{}};}function x(_0x13af5b){const _0x1b07be=_0x241cd9;return!_0x13af5b||typeof _0x13af5b!='object'||!S(_0x13af5b,[_0x1b07be(0x244),_0x1b07be(0x290)])||!(_0x1b07be(0x244)in _0x13af5b)||_0x13af5b[_0x1b07be(0x244)]!==0x1||!('formulas'in _0x13af5b)||!_0x13af5b[_0x1b07be(0x290)]||typeof _0x13af5b['formulas']!=_0x1b07be(0x258)||Array[_0x1b07be(0x225)](_0x13af5b['formulas'])?!0x1:Object['entries'](_0x13af5b['formulas'])[_0x1b07be(0x24c)](([_0x17e7f2,_0x2cc592])=>_0x17e7f2[_0x1b07be(0x24b)]>0x0&&Pe(_0x2cc592));}function Pe(_0x24b159){const _0x280083=_0x241cd9;return!_0x24b159||typeof _0x24b159!=_0x280083(0x258)||!S(_0x24b159,[_0x280083(0x2d8),_0x280083(0x226),'lastValue'])||!(_0x280083(0x2d8)in _0x24b159)||typeof _0x24b159[_0x280083(0x2d8)]!=_0x280083(0x203)||!_0x24b159[_0x280083(0x2d8)][_0x280083(0x1e6)]()||_0x280083(0x226)in _0x24b159&&_0x24b159[_0x280083(0x226)]!=null&&(typeof _0x24b159[_0x280083(0x226)]!=_0x280083(0x258)||!S(_0x24b159[_0x280083(0x226)],[_0x280083(0x2d6)])||!(_0x280083(0x2d6)in _0x24b159[_0x280083(0x226)])||typeof _0x24b159['numberFormat']['pattern']!=_0x280083(0x203))?!0x1:!(_0x280083(0x266)in _0x24b159)||_0x24b159[_0x280083(0x266)]==null||Fe(_0x24b159[_0x280083(0x266)]);}function Fe(_0x52e060){const _0x5efde3=_0x241cd9;return!_0x52e060||typeof _0x52e060!=_0x5efde3(0x258)||!S(_0x52e060,['v','t',_0x5efde3(0x2d6)])||!('v'in _0x52e060)||_0x52e060['v']!==null&&typeof _0x52e060['v']!=_0x5efde3(0x203)&&typeof _0x52e060['v']!=_0x5efde3(0x27e)&&typeof _0x52e060['v']!=_0x5efde3(0x25c)||'t'in _0x52e060&&_0x52e060['t']!=null&&!Ie(_0x52e060['t'])?!0x1:!(_0x5efde3(0x2d6)in _0x52e060)||_0x52e060[_0x5efde3(0x2d6)]==null||typeof _0x52e060[_0x5efde3(0x2d6)]==_0x5efde3(0x203);}function S(_0x3da30d,_0x5e8295){const _0x56cd6d=_0x241cd9;let _0xac594a=new Set(_0x5e8295);return Object[_0x56cd6d(0x25a)](_0x3da30d)[_0x56cd6d(0x24c)](_0x505be8=>_0xac594a[_0x56cd6d(0x2cf)](_0x505be8));}function Ie(_0xaff01e){const _0x53fd8c=_0x241cd9;return typeof _0xaff01e==_0x53fd8c(0x27e)&&Object[_0x53fd8c(0x296)](_0x2a3989)[_0x53fd8c(0x298)](_0xaff01e);}const Le=new Set([_0x308616[_0x241cd9(0x2cb)],_0x308616[_0x241cd9(0x249)],_0x308616[_0x241cd9(0x1e1)],_0x308616[_0x241cd9(0x241)],_0x308616[_0x241cd9(0x268)],_0x308616[_0x241cd9(0x200)],_0x308616['TABLE_END'],_0x308616[_0x241cd9(0x237)],_0x308616[_0x241cd9(0x261)],_0x308616[_0x241cd9(0x23d)],_0x308616[_0x241cd9(0x2d9)],_0x308616[_0x241cd9(0x218)],_0x308616['BLOCK_END'],_0x308616[_0x241cd9(0x2c8)]]);var C=class extends Error{constructor(){super('Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries');}};function Re(_0x3530ab){const _0xf7e740=_0x241cd9;var _0x1eb3f3,_0x2fdbe6;let _0x35e4b6=_0x264f7b[_0xf7e740(0x269)](_0x3530ab[_0xf7e740(0x1e0)]),_0x3fcf86=j(_0x35e4b6),{startOffset:_0x23ebc6,endOffset:_0x147e62}=We(_0x3fcf86,_0x3530ab[_0xf7e740(0x2b4)],_0x3530ab['endOffset']);He(_0x3fcf86,_0x23ebc6,_0x147e62);let _0x574204=((_0x1eb3f3=_0x3fcf86['customRanges'])==null?void 0x0:_0x1eb3f3['filter'](_0x301ba4=>{const _0x20bcb1=_0xf7e740;if(!w(_0x301ba4))return!0x1;let _0x524db7=_0xf4a334(_0x301ba4);return _0x524db7[_0x20bcb1(0x2c1)]>_0x23ebc6&&_0x524db7[_0x20bcb1(0x2b4)]<_0x147e62;})[_0xf7e740(0x289)](_0x5cbc32=>_0x5cbc32[_0xf7e740(0x2ba)]))??[];qe(_0x3fcf86,_0x23ebc6,_0x147e62,''),_0x3fcf86[_0xf7e740(0x2a3)]=[...((_0x2fdbe6=_0x3fcf86['customRanges'])==null?void 0x0:_0x2fdbe6[_0xf7e740(0x1fd)](_0x595a34=>!_0x574204['includes'](_0x595a34[_0xf7e740(0x2ba)])&&_0x595a34[_0xf7e740(0x2ba)]!==_0x3530ab[_0xf7e740(0x2ba)]))??[],Ue(_0x3530ab[_0xf7e740(0x2ba)],_0x23ebc6)][_0xf7e740(0x1e3)]((_0x19214b,_0x18d410)=>_0x19214b['startIndex']-_0x18d410[_0xf7e740(0x27a)]);let _0x39806b=E(_0x3530ab[_0xf7e740(0x2de)]);return _0x574204['forEach'](_0x406f48=>{const _0x10a72c=_0xf7e740;delete _0x39806b[_0x10a72c(0x290)][_0x406f48];}),_0x39806b[_0xf7e740(0x290)][_0x3530ab['rangeId']]=_0x264f7b[_0xf7e740(0x269)](_0x3530ab[_0xf7e740(0x24d)]),{'nextDocumentData':_0x35e4b6,'nextResource':_0x39806b,'cursorOffset':_0x23ebc6+0x1};}function ze(_0x53ffa6){const _0x5544f6=_0x241cd9;var _0x3dc1cb,_0x43b4d5;let _0x2db390=_0x264f7b[_0x5544f6(0x269)](_0x53ffa6[_0x5544f6(0x1e0)]),_0x3dc277=(_0x3dc1cb=j(_0x2db390)[_0x5544f6(0x2a3)])==null?void 0x0:_0x3dc1cb[_0x5544f6(0x2b5)](_0x4c07ac=>_0x4c07ac[_0x5544f6(0x2ba)]===_0x53ffa6[_0x5544f6(0x2ba)]&&w(_0x4c07ac));if(!_0x3dc277||!((_0x43b4d5=_0x53ffa6['resource'])!=null&&_0x43b4d5[_0x5544f6(0x290)][_0x53ffa6['rangeId']]))return null;let _0x575ebe=E(_0x53ffa6[_0x5544f6(0x2de)]);return _0x575ebe[_0x5544f6(0x290)][_0x53ffa6['rangeId']]=_0x264f7b[_0x5544f6(0x269)](_0x53ffa6[_0x5544f6(0x24d)]),{'nextDocumentData':_0x2db390,'nextResource':_0x575ebe,'cursorOffset':_0x3dc277[_0x5544f6(0x21a)]+0x1};}function Be(_0x39ed92){const _0x3abb55=_0x241cd9;let _0x1955af=_0x264f7b[_0x3abb55(0x269)](_0x39ed92['documentData']),_0x14c74b=Je(_0x1955af,_0x39ed92[_0x3abb55(0x2ba)],_0x39ed92[_0x3abb55(0x2a0)]??'');if(_0x14c74b==null)return null;let _0x39ef06=E(_0x39ed92[_0x3abb55(0x2de)]);return delete _0x39ef06['formulas'][_0x39ed92['rangeId']],{'nextDocumentData':_0x1955af,'nextResource':_0x39ef06,'cursorOffset':_0x14c74b};}function Ve(_0x30ce73,_0xae1a0a){const _0x3e1d6d=_0x241cd9;var _0x2aef18;let _0x2eaefd=_0x264f7b['deepClone'](_0x30ce73),_0x238236=_0x2eaefd[_0x3e1d6d(0x27f)];if(!_0x238236)return _0x2eaefd;let _0x442ea9=new Map(_0xae1a0a['map'](_0x1e1acf=>[_0x1e1acf['rangeId'],_0x1e1acf[_0x3e1d6d(0x2a0)]])),_0x21c5a0=((_0x2aef18=_0x238236[_0x3e1d6d(0x2a3)])==null?void 0x0:_0x2aef18[_0x3e1d6d(0x1fd)](_0x1d4864=>w(_0x1d4864)&&_0x442ea9[_0x3e1d6d(0x2cf)](_0x1d4864[_0x3e1d6d(0x2ba)]))[_0x3e1d6d(0x1e3)]((_0x440807,_0x4716de)=>_0x4716de['startIndex']-_0x440807[_0x3e1d6d(0x27a)]))??[];for(let _0x50d8e0 of _0x21c5a0)Je(_0x2eaefd,_0x50d8e0[_0x3e1d6d(0x2ba)],_0x442ea9['get'](_0x50d8e0[_0x3e1d6d(0x2ba)])??'');return _0x2eaefd;}function w(_0x7b965c){const _0x353555=_0x241cd9;var _0x3bffe2;return(_0x7b965c==null?void 0x0:_0x7b965c[_0x353555(0x25b)])===_0x562d5a[_0x353555(0x255)]&&_0x7b965c['wholeEntity']===!0x0&&((_0x3bffe2=_0x7b965c[_0x353555(0x1ef)])==null?void 0x0:_0x3bffe2[_0x353555(0x21f)])===_0x353555(0x28a);}function T(_0x287c98,_0x40fd8d){const _0x17721e=_0x241cd9;var _0x30833b;return _0x287c98==null||(_0x30833b=_0x287c98[_0x17721e(0x2a3)])==null?void 0x0:_0x30833b[_0x17721e(0x2b5)](_0x282180=>_0x282180[_0x17721e(0x2ba)]===_0x40fd8d&&w(_0x282180));}function He(_0x5792f4,_0x295295,_0x53fdd6){const _0x279793=_0x241cd9;if(_0x295295===_0x53fdd6){if(Le[_0x279793(0x2cf)](_0x5792f4[_0x279793(0x236)][_0x295295]))throw new C();return;}for(let _0x4899c4=_0x295295;_0x4899c4<_0x53fdd6;_0x4899c4++)if(_0x5792f4[_0x279793(0x236)][_0x4899c4]===_0x308616['PARAGRAPH']||Le[_0x279793(0x2cf)](_0x5792f4[_0x279793(0x236)][_0x4899c4]))throw new C();}function Ue(_0x52a1ec,_0xaf84a7){return{'startIndex':_0xaf84a7,'endIndex':_0xaf84a7,'rangeId':_0x52a1ec,'rangeType':_0x562d5a['CUSTOM'],'wholeEntity':!0x0,'properties':{'kind':Me}};}function E(_0x17c4e9){const _0x265848=_0x241cd9;return _0x17c4e9?_0x264f7b[_0x265848(0x269)](_0x17c4e9):b();}function We(_0x42ae55,_0x44e07a,_0x3b0077){const _0x302f3e=_0x241cd9;let _0x5c6bdf=Ke(_0x42ae55),_0x43dea8=_0x44e07a??_0x5c6bdf,_0x31edfe=_0x3b0077??_0x43dea8;return{'startOffset':Ge(Math[_0x302f3e(0x271)](_0x43dea8,_0x31edfe),_0x5c6bdf),'endOffset':Ge(Math[_0x302f3e(0x26a)](_0x43dea8,_0x31edfe),_0x5c6bdf)};}function Ge(_0x19afb9,_0x1e0118){const _0x4d42a8=_0x241cd9;return Math[_0x4d42a8(0x26a)](0x0,Math['min'](_0x19afb9,_0x1e0118));}function Ke(_0x3307f6){const _0xc7fe6e=_0x241cd9;return _0x3307f6[_0xc7fe6e(0x236)][_0xc7fe6e(0x2c0)](''+_0x308616[_0xc7fe6e(0x2ac)]+_0x308616['SECTION_BREAK'])?Math[_0xc7fe6e(0x26a)](0x0,_0x3307f6[_0xc7fe6e(0x236)]['length']-0x2):_0x3307f6[_0xc7fe6e(0x236)][_0xc7fe6e(0x2c0)](_0x308616[_0xc7fe6e(0x2cb)])?Math[_0xc7fe6e(0x26a)](0x0,_0x3307f6[_0xc7fe6e(0x236)][_0xc7fe6e(0x24b)]-0x1):_0x3307f6[_0xc7fe6e(0x236)]['length'];}function qe(_0x206f65,_0x33109c,_0x4bf276,_0x52cf55){_0x4bf276>_0x33109c&&Xe(_0x206f65,_0x33109c,_0x4bf276),Ye(_0x206f65,_0x33109c,_0x52cf55);}function Je(_0x11a254,_0x236f57,_0x325ac7){const _0x144819=_0x241cd9;var _0xff64c2,_0x184e0a;let _0x125f3f=j(_0x11a254),_0x5bfe97=(_0xff64c2=_0x125f3f[_0x144819(0x2a3)])==null?void 0x0:_0xff64c2[_0x144819(0x2b5)](_0x251939=>_0x251939[_0x144819(0x2ba)]===_0x236f57&&w(_0x251939));if(!_0x5bfe97)return null;let _0x28d678=_0xf4a334(_0x5bfe97);return qe(_0x125f3f,_0x28d678[_0x144819(0x2b4)],_0x28d678[_0x144819(0x2c1)],_0x325ac7),_0x125f3f[_0x144819(0x2a3)]=(_0x184e0a=_0x125f3f[_0x144819(0x2a3)])==null?void 0x0:_0x184e0a[_0x144819(0x1fd)](_0x3a5c70=>_0x3a5c70[_0x144819(0x2ba)]!==_0x236f57),_0x28d678[_0x144819(0x2b4)]+_0x325ac7[_0x144819(0x24b)];}function Ye(_0x410df2,_0x18fd0d,_0x1a1566){const _0x3c5ae6=_0x241cd9;_0x1a1566&&(_0x410df2[_0x3c5ae6(0x236)]=''+_0x410df2[_0x3c5ae6(0x236)][_0x3c5ae6(0x294)](0x0,_0x18fd0d)+_0x1a1566+_0x410df2[_0x3c5ae6(0x236)][_0x3c5ae6(0x294)](_0x18fd0d),Ze(_0x410df2,_0x18fd0d,_0x1a1566[_0x3c5ae6(0x24b)]));}function Xe(_0x1b19dc,_0x1a3ff3,_0x8d5556){const _0x53ac2d=_0x241cd9;let _0x401c8d=_0x8d5556-_0x1a3ff3;_0x1b19dc[_0x53ac2d(0x236)]=''+_0x1b19dc[_0x53ac2d(0x236)][_0x53ac2d(0x294)](0x0,_0x1a3ff3)+_0x1b19dc[_0x53ac2d(0x236)][_0x53ac2d(0x294)](_0x8d5556),Qe(_0x1b19dc,_0x1a3ff3,_0x401c8d);}function Ze(_0x7fa63b,_0x48da56,_0x4c1404){const _0x162bc0=_0x241cd9;_0x7fa63b['paragraphs']=D(_0x7fa63b['paragraphs'],_0x48da56,_0x4c1404),_0x7fa63b[_0x162bc0(0x1ec)]=D(_0x7fa63b[_0x162bc0(0x1ec)],_0x48da56,_0x4c1404),_0x7fa63b['customBlocks']=D(_0x7fa63b[_0x162bc0(0x2b9)],_0x48da56,_0x4c1404),_0x7fa63b['textRuns']=$e(_0x7fa63b[_0x162bc0(0x28c)],_0x48da56,_0x4c1404),_0x7fa63b[_0x162bc0(0x2c5)]=et(_0x7fa63b[_0x162bc0(0x2c5)],_0x48da56,_0x4c1404),_0x7fa63b['columnGroups']=k(_0x7fa63b[_0x162bc0(0x1f5)],_0x48da56,_0x4c1404),_0x7fa63b['customRanges']=k(_0x7fa63b[_0x162bc0(0x2a3)],_0x48da56,_0x4c1404),_0x7fa63b[_0x162bc0(0x25e)]=k(_0x7fa63b[_0x162bc0(0x25e)],_0x48da56,_0x4c1404),_0x7fa63b[_0x162bc0(0x1f7)]=k(_0x7fa63b[_0x162bc0(0x1f7)],_0x48da56,_0x4c1404);}function Qe(_0x582fd9,_0x2b366e,_0xa86abd){const _0xd5a6b3=_0x241cd9;var _0x44187e,_0x3354de;_0x582fd9[_0xd5a6b3(0x208)]=O(_0x582fd9['paragraphs'],_0x2b366e,_0xa86abd),_0x582fd9[_0xd5a6b3(0x1ec)]=O(_0x582fd9[_0xd5a6b3(0x1ec)],_0x2b366e,_0xa86abd),_0x582fd9['customBlocks']=O(_0x582fd9[_0xd5a6b3(0x2b9)],_0x2b366e,_0xa86abd),_0x582fd9['textRuns']=(_0x44187e=tt((_0x3354de=_0x582fd9[_0xd5a6b3(0x28c)])==null?void 0x0:_0x3354de[_0xd5a6b3(0x289)](_0x24a92a=>({..._0x24a92a,'startIndex':_0x24a92a['st'],'endIndex':_0x24a92a['ed']})),_0x2b366e,_0xa86abd))==null?void 0x0:_0x44187e[_0xd5a6b3(0x289)](_0x4cd86a=>{let {startIndex:_0x36bed2,endIndex:_0x394e88,..._0x22ae45}=_0x4cd86a;return{..._0x22ae45,'st':_0x36bed2,'ed':_0x394e88};}),_0x582fd9['tables']=tt(_0x582fd9[_0xd5a6b3(0x2c5)],_0x2b366e,_0xa86abd),_0x582fd9[_0xd5a6b3(0x1f5)]=A(_0x582fd9[_0xd5a6b3(0x1f5)],_0x2b366e,_0xa86abd),_0x582fd9[_0xd5a6b3(0x2a3)]=A(_0x582fd9['customRanges'],_0x2b366e,_0xa86abd),_0x582fd9['customDecorations']=A(_0x582fd9[_0xd5a6b3(0x25e)],_0x2b366e,_0xa86abd),_0x582fd9[_0xd5a6b3(0x1f7)]=A(_0x582fd9['blockRanges'],_0x2b366e,_0xa86abd);}function D(_0x162b96,_0x22d293,_0x11cfc2){const _0x2b6715=_0x241cd9;return _0x162b96==null?void 0x0:_0x162b96['map'](_0x3ebf27=>_0x3ebf27[_0x2b6715(0x27a)]>=_0x22d293?{..._0x3ebf27,'startIndex':_0x3ebf27[_0x2b6715(0x27a)]+_0x11cfc2}:_0x3ebf27);}function O(_0x315014,_0x52ed1f,_0x1c4ab2){const _0x3eb5b8=_0x241cd9;let _0x579056=_0x52ed1f+_0x1c4ab2;return _0x315014==null?void 0x0:_0x315014[_0x3eb5b8(0x289)](_0x138433=>_0x138433[_0x3eb5b8(0x27a)]>=_0x52ed1f&&_0x138433[_0x3eb5b8(0x27a)]<_0x579056?null:_0x138433[_0x3eb5b8(0x27a)]>=_0x579056?{..._0x138433,'startIndex':_0x138433[_0x3eb5b8(0x27a)]-_0x1c4ab2}:_0x138433)[_0x3eb5b8(0x1fd)](_0x5291e0=>_0x5291e0!=null);}function $e(_0x2ef4dd,_0x347e4d,_0x27927b){const _0x19610d=_0x241cd9;return _0x2ef4dd==null?void 0x0:_0x2ef4dd[_0x19610d(0x289)](_0x37cc18=>_0x37cc18['st']>=_0x347e4d?{..._0x37cc18,'st':_0x37cc18['st']+_0x27927b,'ed':_0x37cc18['ed']+_0x27927b}:_0x37cc18['ed']>_0x347e4d?{..._0x37cc18,'ed':_0x37cc18['ed']+_0x27927b}:_0x37cc18);}function k(_0x15eae7,_0x28dd81,_0x569524){const _0x4c521f=_0x241cd9;return _0x15eae7==null?void 0x0:_0x15eae7[_0x4c521f(0x289)](_0xdfd738=>_0x3c2670(_0xdfd738,_0x28dd81,_0x569524));}function et(_0x2d2da2,_0x4be51b,_0x2326fa){return _0x2d2da2==null?void 0x0:_0x2d2da2['map'](_0x5523f8=>_0x4d5964(_0x5523f8,_0x4be51b,_0x2326fa));}function A(_0x22fe80,_0x5a18c3,_0x4a112f){const _0x171c21=_0x241cd9;return _0x22fe80==null?void 0x0:_0x22fe80[_0x171c21(0x289)](_0x78ec4b=>_0x7460cf(_0x78ec4b,_0x5a18c3,_0x4a112f))[_0x171c21(0x1fd)](_0x4870a0=>_0x4870a0!=null);}function tt(_0xf50b37,_0x20d1cb,_0x3e82fc){const _0x3e4705=_0x241cd9;return _0xf50b37==null?void 0x0:_0xf50b37[_0x3e4705(0x289)](_0x3381af=>_0x2b93f6(_0x3381af,_0x20d1cb,_0x3e82fc))['filter'](_0x25dcc9=>_0x25dcc9!=null);}function j(_0x453d7f){const _0x4368a0=_0x241cd9;if(!_0x453d7f['body'])throw Error(_0x4368a0(0x29e));return _0x453d7f[_0x4368a0(0x27f)];}function M(_0x4ca6e0){'@babel/helpers - typeof';const _0x4406ce=_0x241cd9;return M=typeof Symbol==_0x4406ce(0x1f6)&&typeof Symbol[_0x4406ce(0x283)]=='symbol'?function(_0x47504f){return typeof _0x47504f;}:function(_0x3b145c){const _0x492a57=_0x4406ce;return _0x3b145c&&typeof Symbol=='function'&&_0x3b145c[_0x492a57(0x252)]===Symbol&&_0x3b145c!==Symbol[_0x492a57(0x280)]?'symbol':typeof _0x3b145c;},M(_0x4ca6e0);}function nt(_0x41d771,_0x524a26){const _0x1ce3c8=_0x241cd9;if(M(_0x41d771)!=_0x1ce3c8(0x258)||!_0x41d771)return _0x41d771;var _0x51d72f=_0x41d771[Symbol[_0x1ce3c8(0x250)]];if(_0x51d72f!==void 0x0){var _0x131fa3=_0x51d72f[_0x1ce3c8(0x211)](_0x41d771,_0x524a26||_0x1ce3c8(0x230));if(M(_0x131fa3)!=_0x1ce3c8(0x258))return _0x131fa3;throw TypeError(_0x1ce3c8(0x2aa));}return(_0x524a26===_0x1ce3c8(0x203)?String:Number)(_0x41d771);}function rt(_0x216246){const _0x4d7ade=_0x241cd9;var _0x442ffb=nt(_0x216246,_0x4d7ade(0x203));return M(_0x442ffb)==_0x4d7ade(0x22a)?_0x442ffb:_0x442ffb+'';}function N(_0x4f6618,_0x10bb95,_0x49bdbc){return(_0x10bb95=rt(_0x10bb95))in _0x4f6618?Object['defineProperty'](_0x4f6618,_0x10bb95,{'value':_0x49bdbc,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4f6618[_0x10bb95]=_0x49bdbc,_0x4f6618;}var P=class extends _0x2c5b49{constructor(..._0x1d8de9){const _0x343a9b=_0x241cd9;super(..._0x1d8de9),N(this,_0x343a9b(0x2c9),new Map()),N(this,_0x343a9b(0x2b1),new Map()),N(this,_0x343a9b(0x270),new Map()),N(this,_0x343a9b(0x247),new _0x7c5dac()),N(this,_0x343a9b(0x1e4),this[_0x343a9b(0x247)][_0x343a9b(0x2c3)]());}[_0x241cd9(0x2e3)](_0x52bf6e,_0x176c19){const _0x14e94b=_0x241cd9;var _0x598cb6;let _0x59508d=(_0x598cb6=this[_0x14e94b(0x2c9)][_0x14e94b(0x217)](_0x52bf6e))==null?void 0x0:_0x598cb6[_0x14e94b(0x290)][_0x176c19];return _0x59508d?_0x264f7b[_0x14e94b(0x269)](_0x59508d):void 0x0;}[_0x241cd9(0x2e2)](_0x39b10c){const _0x1eda53=_0x241cd9;var _0x56cb5a;return _0x264f7b[_0x1eda53(0x269)](((_0x56cb5a=this[_0x1eda53(0x2c9)][_0x1eda53(0x217)](_0x39b10c))==null?void 0x0:_0x56cb5a['formulas'])??{});}[_0x241cd9(0x248)](_0x2e5179){const _0x45cf1c=_0x241cd9;let _0x31b99a=this[_0x45cf1c(0x2c9)][_0x45cf1c(0x217)](_0x2e5179);return _0x31b99a?_0x264f7b[_0x45cf1c(0x269)](_0x31b99a):void 0x0;}[_0x241cd9(0x2c7)](_0x5e355f,_0x2b5d6c,_0x17004d){const _0x2e8234=_0x241cd9;return this[_0x2e8234(0x213)](_0x5e355f,{[_0x2b5d6c]:_0x17004d});}[_0x241cd9(0x228)](_0x5666a9,_0x1ae509){const _0x51fed3=_0x241cd9;return this[_0x51fed3(0x270)]['has'](_0x5666a9)||!x(_0x1ae509)?!0x1:(this['_resources'][_0x51fed3(0x216)](_0x5666a9,_0x264f7b['deepClone'](_0x1ae509)),this[_0x51fed3(0x247)][_0x51fed3(0x1fc)]({'unitId':_0x5666a9}),!0x0);}[_0x241cd9(0x213)](_0x5b96ea,_0x585686){const _0xcb26c6=_0x241cd9;if(this['_loadErrors']['has'](_0x5b96ea)||!Object[_0xcb26c6(0x25a)](_0x585686)['length']||!x({'schemaVersion':0x1,'formulas':_0x585686}))return!0x1;let _0x53daf0=this[_0xcb26c6(0x2c9)][_0xcb26c6(0x217)](_0x5b96ea)??b(),_0x19a1d0=_0x264f7b[_0xcb26c6(0x269)](_0x53daf0);return Object[_0xcb26c6(0x21b)](_0x19a1d0[_0xcb26c6(0x290)],_0x264f7b[_0xcb26c6(0x269)](_0x585686)),this[_0xcb26c6(0x2c9)][_0xcb26c6(0x216)](_0x5b96ea,_0x19a1d0),this[_0xcb26c6(0x247)][_0xcb26c6(0x1fc)]({'unitId':_0x5b96ea,'rangeIds':Object[_0xcb26c6(0x25a)](_0x585686)}),!0x0;}[_0x241cd9(0x22c)](_0x4ef7ea,_0x330c57){const _0x4a5ab2=_0x241cd9;if(this['_loadErrors'][_0x4a5ab2(0x2cf)](_0x4ef7ea))return!0x1;let _0x1539bf=this[_0x4a5ab2(0x2c9)]['get'](_0x4ef7ea);if(!(_0x1539bf!=null&&_0x1539bf[_0x4a5ab2(0x290)][_0x330c57]))return!0x1;let _0x39bb57=_0x264f7b[_0x4a5ab2(0x269)](_0x1539bf);return delete _0x39bb57[_0x4a5ab2(0x290)][_0x330c57],this[_0x4a5ab2(0x2c9)][_0x4a5ab2(0x216)](_0x4ef7ea,_0x39bb57),this[_0x4a5ab2(0x247)][_0x4a5ab2(0x1fc)]({'unitId':_0x4ef7ea,'rangeIds':[_0x330c57]}),!0x0;}[_0x241cd9(0x2a2)](_0x5de2bf,_0x220ae2){const _0x504ae7=_0x241cd9;return _0x220ae2&&typeof _0x220ae2==_0x504ae7(0x258)&&'schemaVersion'in _0x220ae2&&_0x220ae2['schemaVersion']!==0x1?(this[_0x504ae7(0x219)](_0x5de2bf,_0x220ae2,_0x504ae7(0x29d)),!0x1):x(_0x220ae2)?(this[_0x504ae7(0x2c9)]['set'](_0x5de2bf,_0x264f7b[_0x504ae7(0x269)](_0x220ae2)),this['_rawResources'][_0x504ae7(0x1ff)](_0x5de2bf),this[_0x504ae7(0x270)][_0x504ae7(0x1ff)](_0x5de2bf),this['_change$']['next']({'unitId':_0x5de2bf}),!0x0):(this['_preserveInvalid'](_0x5de2bf,_0x220ae2,'invalid-resource'),!0x1);}[_0x241cd9(0x2cd)](_0x16215b){const _0x11b107=_0x241cd9;let _0x371d17=this[_0x11b107(0x2c9)][_0x11b107(0x217)](_0x16215b);return _0x371d17?_0x264f7b[_0x11b107(0x269)](_0x371d17):this[_0x11b107(0x2b1)][_0x11b107(0x2cf)](_0x16215b)?_0x264f7b[_0x11b107(0x269)](this[_0x11b107(0x2b1)][_0x11b107(0x217)](_0x16215b)):b();}['getLoadError'](_0x363af0){const _0x5889bb=_0x241cd9;return this[_0x5889bb(0x270)][_0x5889bb(0x217)](_0x363af0);}['removeUnit'](_0x3c806b){const _0x87790a=_0x241cd9;this[_0x87790a(0x2c9)][_0x87790a(0x1ff)](_0x3c806b),this[_0x87790a(0x2b1)]['delete'](_0x3c806b),this[_0x87790a(0x270)][_0x87790a(0x1ff)](_0x3c806b),this['_change$']['next']({'unitId':_0x3c806b});}[_0x241cd9(0x26f)](){const _0x39ed28=_0x241cd9;this['_resources']['clear'](),this['_rawResources'][_0x39ed28(0x299)](),this[_0x39ed28(0x270)]['clear'](),this[_0x39ed28(0x247)][_0x39ed28(0x1fa)](),super['dispose']();}[_0x241cd9(0x219)](_0xe1d2b8,_0x3376b6,_0x55e563){const _0x53b89a=_0x241cd9;this[_0x53b89a(0x2c9)]['delete'](_0xe1d2b8),this[_0x53b89a(0x2b1)][_0x53b89a(0x216)](_0xe1d2b8,_0x264f7b['deepClone'](_0x3376b6)),this[_0x53b89a(0x270)]['set'](_0xe1d2b8,_0x55e563),this[_0x53b89a(0x247)]['next']({'unitId':_0xe1d2b8});}};let it=function(_0xdeaca3){const _0x5ceaeb=_0x241cd9;return _0xdeaca3[_0x5ceaeb(0x256)]=_0x5ceaeb(0x231),_0xdeaca3['PENDING']=_0x5ceaeb(0x242),_0xdeaca3[_0x5ceaeb(0x1f4)]=_0x5ceaeb(0x21c),_0xdeaca3[_0x5ceaeb(0x1e7)]=_0x5ceaeb(0x2b3),_0xdeaca3;}({});function F(_0x1cf537,_0x5e11fd){return function(_0x52562b,_0x567103){_0x5e11fd(_0x52562b,_0x567103,_0x1cf537);};}function I(_0x29c8a5,_0x5a5f77,_0x32598e,_0x3fa215){const _0x1a47ba=_0x241cd9;var _0xd9bcd5=arguments[_0x1a47ba(0x24b)],_0x245da9=_0xd9bcd5<0x3?_0x5a5f77:_0x3fa215===null?_0x3fa215=Object[_0x1a47ba(0x2c6)](_0x5a5f77,_0x32598e):_0x3fa215,_0x1c3d7d;if(typeof Reflect==_0x1a47ba(0x258)&&typeof Reflect[_0x1a47ba(0x21e)]==_0x1a47ba(0x1f6))_0x245da9=Reflect[_0x1a47ba(0x21e)](_0x29c8a5,_0x5a5f77,_0x32598e,_0x3fa215);else{for(var _0x35fb4f=_0x29c8a5[_0x1a47ba(0x24b)]-0x1;_0x35fb4f>=0x0;_0x35fb4f--)(_0x1c3d7d=_0x29c8a5[_0x35fb4f])&&(_0x245da9=(_0xd9bcd5<0x3?_0x1c3d7d(_0x245da9):_0xd9bcd5>0x3?_0x1c3d7d(_0x5a5f77,_0x32598e,_0x245da9):_0x1c3d7d(_0x5a5f77,_0x32598e))||_0x245da9);}return _0xd9bcd5>0x3&&_0x245da9&&Object[_0x1a47ba(0x1f8)](_0x5a5f77,_0x32598e,_0x245da9),_0x245da9;}let L=class extends _0x2c5b49{constructor(_0x371df1,_0xdce38f,_0x110e04){const _0x2eae64=_0x241cd9;super(),this[_0x2eae64(0x2ca)]=_0x371df1,this[_0x2eae64(0x263)]=_0xdce38f,this[_0x2eae64(0x28f)]=_0x110e04,N(this,_0x2eae64(0x20e),new Map()),N(this,_0x2eae64(0x253),new Map()),N(this,_0x2eae64(0x27d),new _0x7c5dac()),N(this,_0x2eae64(0x1f3),this[_0x2eae64(0x27d)][_0x2eae64(0x2c3)]()),this['disposeWithMe'](this['_registrationService']['formulaResult$'][_0x2eae64(0x235)](_0x501b43=>{const _0x5045b2=_0x2eae64;for(let _0x1e6eb5 of Object[_0x5045b2(0x296)](_0x501b43))for(let _0x38ad9b of Object[_0x5045b2(0x296)](_0x1e6eb5))_0x38ad9b[_0x5045b2(0x25d)](_0xea2d08=>this[_0x5045b2(0x26c)](_0xea2d08));}));}[_0x241cd9(0x2a9)](_0x5ebe43){const _0x2ec63b=_0x241cd9;var _0x43ce6f;let _0x2a5285=_0x5ebe43[_0x2ec63b(0x1e2)](),_0x7257de=((_0x43ce6f=_0x5ebe43[_0x2ec63b(0x24f)]()[_0x2ec63b(0x27f)])==null||(_0x43ce6f=_0x43ce6f[_0x2ec63b(0x2a3)])==null?void 0x0:_0x43ce6f[_0x2ec63b(0x1fd)](w))??[],_0x27208d=this[_0x2ec63b(0x2ca)][_0x2ec63b(0x2e2)](_0x2a5285),_0x4ff790=new Set();for(let _0x13bb7f of _0x7257de){let _0x225025=_0x27208d[_0x13bb7f[_0x2ec63b(0x2ba)]];_0x225025&&(_0x4ff790[_0x2ec63b(0x26d)](R(_0x2a5285,_0x13bb7f['rangeId'])),this['register']({'unitId':_0x2a5285,'rangeId':_0x13bb7f['rangeId']},_0x225025));}for(let _0x21ecee of Array[_0x2ec63b(0x201)](this[_0x2ec63b(0x20e)][_0x2ec63b(0x296)]()))_0x21ecee['unitId']===_0x2a5285&&!_0x4ff790[_0x2ec63b(0x2cf)](R(_0x21ecee[_0x2ec63b(0x2bd)],_0x21ecee[_0x2ec63b(0x2ba)]))&&this['unregister'](_0x21ecee);}['register'](_0x40e62f,_0x4fa0b7){const _0x2a154e=_0x241cd9;let _0x5bcebf=R(_0x40e62f[_0x2a154e(0x2bd)],_0x40e62f[_0x2a154e(0x2ba)]),_0x47f477=this['_registrations'][_0x2a154e(0x217)](_0x5bcebf),_0x57fb91=this[_0x2a154e(0x28f)][_0x2a154e(0x20a)](_0x40e62f[_0x2a154e(0x2bd)]);if(_0x47f477&&_0x47f477[_0x2a154e(0x24d)][_0x2a154e(0x2d8)]===_0x4fa0b7[_0x2a154e(0x2d8)]&&_0x47f477[_0x2a154e(0x2d0)]===_0x57fb91){_0x47f477[_0x2a154e(0x24d)]=_0x4fa0b7;let _0x5aacb8=_0x47f477[_0x2a154e(0x1e8)]?this['_registrationService'][_0x2a154e(0x2be)](_0x47f477[_0x2a154e(0x2bd)],_0x47f477[_0x2a154e(0x2bd)],_0x47f477[_0x2a154e(0x1e8)])??void 0x0:void 0x0;_0x47f477[_0x2a154e(0x297)]=_0x5aacb8,this['_setPresentation'](_0x5bcebf,z(_0x4fa0b7,_0x5aacb8));return;}_0x47f477!=null&&_0x47f477['formulaId']&&this[_0x2a154e(0x2d1)](_0x47f477);let _0x2717de={..._0x40e62f,'config':_0x4fa0b7,'referenceRevision':_0x57fb91,'presentation':z(_0x4fa0b7,void 0x0)};if(this[_0x2a154e(0x20e)][_0x2a154e(0x216)](_0x5bcebf,_0x2717de),!_0x4fa0b7[_0x2a154e(0x2d8)]['trim']())return;let _0x266fb4=this[_0x2a154e(0x263)]['registerFormulaWithRange'](_0x40e62f['unitId'],_0x40e62f['unitId'],_0x4fa0b7[_0x2a154e(0x2d8)],void 0x0,{'rangeId':_0x40e62f[_0x2a154e(0x2ba)]},_0x342fcf[_0x2a154e(0x1e5)],_0x40e62f['rangeId']);_0x2717de[_0x2a154e(0x1e8)]=_0x266fb4,this[_0x2a154e(0x253)][_0x2a154e(0x216)](_0x266fb4,_0x5bcebf);}[_0x241cd9(0x2b2)](_0x40a869){const _0x2275d0=_0x241cd9;let _0x14caba=R(_0x40a869[_0x2275d0(0x2bd)],_0x40a869[_0x2275d0(0x2ba)]),_0x13e767=this[_0x2275d0(0x20e)][_0x2275d0(0x217)](_0x14caba);_0x13e767&&(this[_0x2275d0(0x2d1)](_0x13e767),this[_0x2275d0(0x20e)]['delete'](_0x14caba));}[_0x241cd9(0x202)](_0x152f49){const _0x1a0bcb=_0x241cd9;for(let _0x4a6fb3 of Array['from'](this[_0x1a0bcb(0x20e)][_0x1a0bcb(0x296)]()))_0x4a6fb3[_0x1a0bcb(0x2bd)]===_0x152f49&&this['unregister'](_0x4a6fb3);}[_0x241cd9(0x2a1)](_0x2d8f5b){const _0x126079=_0x241cd9;var _0x358746;return(_0x358746=this['_registrations'][_0x126079(0x217)](R(_0x2d8f5b[_0x126079(0x2bd)],_0x2d8f5b[_0x126079(0x2ba)])))==null?void 0x0:_0x358746['presentation'];}[_0x241cd9(0x27c)](_0x341605){const _0x2e4d8e=_0x241cd9;let _0x5842de=this[_0x2e4d8e(0x20e)][_0x2e4d8e(0x217)](R(_0x341605['unitId'],_0x341605[_0x2e4d8e(0x2ba)]));return _0x5842de?B(_0x5842de):void 0x0;}[_0x241cd9(0x29b)](){const _0x10b615=_0x241cd9;return Array[_0x10b615(0x201)](this[_0x10b615(0x20e)][_0x10b615(0x296)](),_0x555697=>({'identity':{'unitId':_0x555697['unitId'],'rangeId':_0x555697[_0x10b615(0x2ba)]},'config':_0x555697['config'],'referenceRevision':_0x555697[_0x10b615(0x2d0)],..._0x555697['liveResult']?{'liveResult':_0x555697[_0x10b615(0x297)]}:null}));}[_0x241cd9(0x26f)](){const _0x1b1748=_0x241cd9;for(let _0x317112 of this['_registrations'][_0x1b1748(0x296)]())this[_0x1b1748(0x2d1)](_0x317112);this['_registrations'][_0x1b1748(0x299)](),this[_0x1b1748(0x253)]['clear'](),this['_presentationChanged$'][_0x1b1748(0x1fa)](),super[_0x1b1748(0x26f)]();}[_0x241cd9(0x26c)](_0x3505dd){const _0x456f1e=_0x241cd9;let _0x2e5700=this['_formulaKeys'][_0x456f1e(0x217)](_0x3505dd[_0x456f1e(0x1e8)]),_0x3e0e3e=_0x2e5700?this[_0x456f1e(0x20e)][_0x456f1e(0x217)](_0x2e5700):void 0x0;_0x2e5700&&_0x3e0e3e&&(_0x3e0e3e[_0x456f1e(0x297)]=_0x3505dd,this[_0x456f1e(0x214)](_0x2e5700,z(_0x3e0e3e[_0x456f1e(0x24d)],_0x3505dd)));}[_0x241cd9(0x214)](_0x6bfc6e,_0x378661){const _0x12d972=_0x241cd9;var _0x19aa7e,_0x18a33c;let _0x46d81c=this['_registrations'][_0x12d972(0x217)](_0x6bfc6e);if(!_0x46d81c||at(_0x46d81c[_0x12d972(0x267)],_0x378661))return;let _0x422f41=_0x46d81c[_0x12d972(0x267)],_0x13196d=B(_0x46d81c);_0x46d81c[_0x12d972(0x267)]=_0x378661,this['_presentationChanged$'][_0x12d972(0x1fc)]({'unitId':_0x46d81c[_0x12d972(0x2bd)],'rangeId':_0x46d81c[_0x12d972(0x2ba)],'presentation':_0x378661,'previousPresentation':_0x422f41,'result':B(_0x46d81c),'previousResult':{..._0x13196d,..._0x422f41,'value':(_0x19aa7e=_0x422f41[_0x12d972(0x2a6)])==null?void 0x0:_0x19aa7e['v'],'valueType':((_0x18a33c=_0x422f41['cell'])==null?void 0x0:_0x18a33c['t'])??void 0x0}});}[_0x241cd9(0x2d1)](_0x1167dc){const _0x246087=_0x241cd9;_0x1167dc[_0x246087(0x1e8)]&&(this[_0x246087(0x263)]['deleteFormula'](_0x1167dc['unitId'],_0x1167dc['unitId'],[_0x1167dc[_0x246087(0x1e8)]]),this[_0x246087(0x253)][_0x246087(0x1ff)](_0x1167dc['formulaId']));}};L=I([F(0x0,_0x199f03(P)),F(0x1,_0x199f03(_0x2ae365)),F(0x2,_0x199f03(_0x2a643f))],L);function R(_0x4f0534,_0x264480){return _0x4f0534+'\x00'+_0x264480;}function z(_0x579ef1,_0x4f5611){const _0x1c38a8=_0x241cd9;return _0x3cb7d0({'numberFormat':_0x579ef1[_0x1c38a8(0x226)],'lastValue':_0x579ef1[_0x1c38a8(0x266)],'result':_0x4f5611});}function B(_0x4e4840){const _0x49603d=_0x241cd9;var _0x4f3d56,_0x42ea84,_0x2bafc1;let _0x438890=_0x4e4840[_0x49603d(0x267)],_0x1d04e4=_0x4e4840[_0x49603d(0x24d)][_0x49603d(0x2d8)][_0x49603d(0x1e6)]()?_0x438890[_0x49603d(0x274)]||_0x438890['cell']==null?_0x49603d(0x242):((_0x4f3d56=_0x4e4840[_0x49603d(0x297)])==null?void 0x0:_0x4f3d56[_0x49603d(0x292)])===_0x41ab96[_0x49603d(0x1e7)]?_0x49603d(0x2b3):_0x49603d(0x21c):_0x49603d(0x231);return{..._0x438890,'status':_0x1d04e4,'value':(_0x42ea84=_0x438890[_0x49603d(0x2a6)])==null?void 0x0:_0x42ea84['v'],'valueType':((_0x2bafc1=_0x438890[_0x49603d(0x2a6)])==null?void 0x0:_0x2bafc1['t'])??void 0x0};}function at(_0x2da642,_0xb6b50e){const _0x4ee45b=_0x241cd9;var _0x590741,_0x438a9e,_0x1b4f2a,_0x423a6e;return _0x2da642[_0x4ee45b(0x2a0)]===_0xb6b50e[_0x4ee45b(0x2a0)]&&_0x2da642[_0x4ee45b(0x206)]===_0xb6b50e[_0x4ee45b(0x206)]&&_0x2da642[_0x4ee45b(0x2d6)]===_0xb6b50e[_0x4ee45b(0x2d6)]&&_0x2da642[_0x4ee45b(0x278)]===_0xb6b50e[_0x4ee45b(0x278)]&&_0x2da642[_0x4ee45b(0x274)]===_0xb6b50e[_0x4ee45b(0x274)]&&((_0x590741=_0x2da642['cell'])==null?void 0x0:_0x590741['t'])===((_0x438a9e=_0xb6b50e['cell'])==null?void 0x0:_0x438a9e['t'])&&Object['is']((_0x1b4f2a=_0x2da642[_0x4ee45b(0x2a6)])==null?void 0x0:_0x1b4f2a['v'],(_0x423a6e=_0xb6b50e[_0x4ee45b(0x2a6)])==null?void 0x0:_0x423a6e['v']);}const ot={'id':_0x241cd9(0x1ed),'type':_0x503dba[_0x241cd9(0x2bc)],'handler':(_0x5a1f5f,_0x42ad4a)=>!(_0x42ad4a!=null&&_0x42ad4a[_0x241cd9(0x2bd)])||!_0x42ad4a['rangeId']||!_0x42ad4a['config']?!0x1:_0x5a1f5f[_0x241cd9(0x217)](P)[_0x241cd9(0x2c7)](_0x42ad4a[_0x241cd9(0x2bd)],_0x42ad4a[_0x241cd9(0x2ba)],_0x42ad4a[_0x241cd9(0x24d)])},st={'id':_0x241cd9(0x2ad),'type':_0x503dba['MUTATION'],'handler':(_0x3b6ef9,_0x1ec747)=>!(_0x1ec747!=null&&_0x1ec747[_0x241cd9(0x2bd)])||!_0x1ec747['rangeId']?!0x1:_0x3b6ef9['get'](P)['removeFormula'](_0x1ec747[_0x241cd9(0x2bd)],_0x1ec747[_0x241cd9(0x2ba)])},V={'id':_0x241cd9(0x27b),'type':_0x503dba[_0x241cd9(0x2bc)],'handler':(_0x6c6004,_0x38130a)=>!(_0x38130a!=null&&_0x38130a[_0x241cd9(0x2bd)])||!_0x38130a['resource']?!0x1:_0x6c6004[_0x241cd9(0x217)](P)['setResource'](_0x38130a[_0x241cd9(0x2bd)],_0x38130a[_0x241cd9(0x2de)])},H={'id':_0x241cd9(0x232),'type':_0x503dba[_0x241cd9(0x2bc)],'handler':(_0x349241,_0x23d64a)=>{const _0x23ac93=_0x241cd9;if(!(_0x23d64a!=null&&_0x23d64a[_0x23ac93(0x2bd)])||!_0x23d64a[_0x23ac93(0x26e)][_0x23ac93(0x24b)])return!0x1;let _0x51f713=_0x349241[_0x23ac93(0x217)](P),_0x1c1f07=_0x349241[_0x23ac93(0x217)](_0x2a643f),_0x1b90c7=_0x51f713[_0x23ac93(0x248)](_0x23d64a[_0x23ac93(0x2bd)]);if(!_0x1b90c7)return!0x1;let _0xe23166=_0x264f7b[_0x23ac93(0x269)](_0x1b90c7),_0x52f4e9=!0x1;for(let _0x6e07c1 of _0x23d64a[_0x23ac93(0x26e)]){var _0x35cc06,_0x3edab0,_0xdf22a9,_0x2855fe;let _0x1a8620=_0xe23166[_0x23ac93(0x290)][_0x6e07c1['rangeId']];_0x1a8620&&_0x1a8620['formula']===_0x6e07c1[_0x23ac93(0x28d)]&&((_0x35cc06=_0x1a8620[_0x23ac93(0x226)])==null?void 0x0:_0x35cc06[_0x23ac93(0x2d6)])===_0x6e07c1['expectedNumberFormat']&&_0x1c1f07['getRevision'](_0x23d64a[_0x23ac93(0x2bd)])===_0x6e07c1[_0x23ac93(0x264)]&&(((_0x3edab0=_0x1a8620['lastValue'])==null?void 0x0:_0x3edab0['v'])!==_0x6e07c1[_0x23ac93(0x266)]['v']||((_0xdf22a9=_0x1a8620['lastValue'])==null?void 0x0:_0xdf22a9['t'])!==_0x6e07c1['lastValue']['t']||((_0x2855fe=_0x1a8620[_0x23ac93(0x266)])==null?void 0x0:_0x2855fe[_0x23ac93(0x2d6)])!==_0x6e07c1[_0x23ac93(0x266)][_0x23ac93(0x2d6)])&&(_0x1a8620[_0x23ac93(0x266)]=_0x264f7b[_0x23ac93(0x269)](_0x6e07c1[_0x23ac93(0x266)]),_0x52f4e9=!0x0);}return!_0x52f4e9||_0x51f713['setResource'](_0x23d64a[_0x23ac93(0x2bd)],_0xe23166);}},U={'id':_0x241cd9(0x29a),'type':_0x503dba[_0x241cd9(0x221)],'handler':(_0x1ede6e,_0x4ce06b)=>{const _0x1c675d=_0x241cd9;if(!(_0x4ce06b!=null&&_0x4ce06b[_0x1c675d(0x2d8)][_0x1c675d(0x1e6)]()))return!0x1;let _0x3991fa=q(_0x1ede6e,_0x4ce06b[_0x1c675d(0x2bd)],'');if(!_0x3991fa)return!0x1;let _0x184187=ft(_0x4ce06b[_0x1c675d(0x2d2)],_0x3991fa['body'],dt(_0x1ede6e,_0x3991fa[_0x1c675d(0x2bd)]));if(!_0x184187)return!0x1;let _0x3da5cb=pt(_0x1ede6e,_0x3991fa[_0x1c675d(0x2bd)],_0x4ce06b[_0x1c675d(0x2d8)],_0x4ce06b[_0x1c675d(0x223)]??[]);if(!_0x3da5cb)return!0x1;let _0x4932ad=mt(_0x3991fa[_0x1c675d(0x27f)],_0x3991fa[_0x1c675d(0x277)],_0x3991fa[_0x1c675d(0x2bd)]),_0x211a67=ht({'documentData':_0x3991fa['documentData'],'resource':_0x3991fa[_0x1c675d(0x2de)],'rangeId':_0x4932ad,'config':{'formula':_0x4ce06b['formula'],..._0x4ce06b[_0x1c675d(0x226)]?{'numberFormat':_0x4ce06b[_0x1c675d(0x226)]}:null},'startOffset':_0x184187['startOffset'],'endOffset':_0x184187['endOffset']});if(!_0x211a67)return!0x1;let _0x55090b=_0x3c6f60(_0x1ede6e,_0x3991fa[_0x1c675d(0x2bd)],_0x3da5cb);return!_0x55090b||!J({'accessor':_0x1ede6e,'document':_0x3991fa['document'],'unitId':_0x3991fa[_0x1c675d(0x2bd)],'trigger':U['id'],'rangeId':_0x4932ad,'previousResource':_0x3991fa[_0x1c675d(0x2de)],'nextResource':_0x211a67[_0x1c675d(0x284)],'previousDocumentData':_0x3991fa[_0x1c675d(0x1e0)],'nextDocumentData':_0x211a67['nextDocumentData'],'cursorOffset':_0x211a67[_0x1c675d(0x28e)],'externalMutations':_0x55090b})?!0x1:{'rangeId':_0x4932ad,'startOffset':_0x211a67['cursorOffset']-0x1,'endOffset':_0x211a67['cursorOffset']};}},W={'id':_0x241cd9(0x207),'type':_0x503dba[_0x241cd9(0x221)],'handler':(_0x1c28b5,_0x1c1311)=>{const _0x5480d7=_0x241cd9;if(!(_0x1c1311!=null&&_0x1c1311['rangeId'])||!_0x1c1311[_0x5480d7(0x2d8)][_0x5480d7(0x1e6)]())return!0x1;let _0x12d612=q(_0x1c28b5,_0x1c1311['unitId'],''),_0x55676c=_0x12d612==null?void 0x0:_0x12d612[_0x5480d7(0x277)][_0x5480d7(0x2e3)](_0x12d612[_0x5480d7(0x2bd)],_0x1c1311[_0x5480d7(0x2ba)]),_0x2bdcb4=_0x12d612?T(_0x12d612[_0x5480d7(0x1e0)]['body'],_0x1c1311[_0x5480d7(0x2ba)]):void 0x0;if(!_0x12d612||!_0x55676c||!_0x2bdcb4)return!0x1;let _0x2c169e=pt(_0x1c28b5,_0x12d612[_0x5480d7(0x2bd)],_0x1c1311[_0x5480d7(0x2d8)],_0x1c1311['externalReferences']??[]);if(!_0x2c169e)return!0x1;let _0x5eba9b=_0x3c6f60(_0x1c28b5,_0x12d612['unitId'],_0x2c169e);if(!_0x5eba9b)return!0x1;let _0x230370=Ct(_0x12d612[_0x5480d7(0x2de)]);return _0x230370[_0x5480d7(0x290)][_0x1c1311[_0x5480d7(0x2ba)]]={'formula':_0x1c1311[_0x5480d7(0x2d8)],..._0x1c1311[_0x5480d7(0x226)]?{'numberFormat':_0x1c1311['numberFormat']}:_0x55676c[_0x5480d7(0x226)]?{'numberFormat':_0x55676c[_0x5480d7(0x226)]}:null},J({'accessor':_0x1c28b5,'document':_0x12d612[_0x5480d7(0x282)],'unitId':_0x12d612[_0x5480d7(0x2bd)],'trigger':W['id'],'rangeId':_0x1c1311['rangeId'],'previousResource':_0x12d612[_0x5480d7(0x2de)],'nextResource':_0x230370,'cursorOffset':_0x2bdcb4[_0x5480d7(0x21a)]+0x1,'externalMutations':_0x5eba9b});}},G={'id':_0x241cd9(0x260),'type':_0x503dba[_0x241cd9(0x221)],'handler':(_0x4778e9,_0x16c132)=>{const _0x1346eb=_0x241cd9;if(!(_0x16c132!=null&&_0x16c132[_0x1346eb(0x2ba)]))return!0x1;let _0x247fa9=q(_0x4778e9,_0x16c132['unitId'],''),_0x4e5736=_0x247fa9==null?void 0x0:_0x247fa9[_0x1346eb(0x277)][_0x1346eb(0x2e3)](_0x247fa9['unitId'],_0x16c132['rangeId']),_0x562f72=_0x247fa9?T(_0x247fa9[_0x1346eb(0x1e0)][_0x1346eb(0x27f)],_0x16c132[_0x1346eb(0x2ba)]):void 0x0;if(!_0x247fa9||!_0x4e5736||!_0x562f72)return!0x1;let _0x2c4058=Ct(_0x247fa9['resource']);return _0x2c4058[_0x1346eb(0x290)][_0x16c132['rangeId']]={..._0x4e5736,..._0x16c132['numberFormat']?{'numberFormat':_0x16c132[_0x1346eb(0x226)]}:null},_0x16c132[_0x1346eb(0x226)]||delete _0x2c4058['formulas'][_0x16c132[_0x1346eb(0x2ba)]]['numberFormat'],J({'accessor':_0x4778e9,'document':_0x247fa9[_0x1346eb(0x282)],'unitId':_0x247fa9[_0x1346eb(0x2bd)],'trigger':G['id'],'rangeId':_0x16c132[_0x1346eb(0x2ba)],'previousResource':_0x247fa9[_0x1346eb(0x2de)],'nextResource':_0x2c4058,'cursorOffset':_0x562f72['endIndex']+0x1,'externalMutations':{}});}},K={'id':_0x241cd9(0x2ab),'type':_0x503dba[_0x241cd9(0x221)],'handler':(_0x4545a4,_0x5458be)=>ut(_0x4545a4,_0x5458be,'',K['id'])},ct={'id':_0x241cd9(0x2c2),'type':_0x503dba[_0x241cd9(0x221)],'handler':(_0x332469,_0x2237c7)=>ut(_0x332469,_0x2237c7,(_0x2237c7==null?void 0x0:_0x2237c7['text'])??'',ct['id'])},lt={'id':_0x241cd9(0x204),'type':_0x503dba['COMMAND'],'handler':(_0x2084dc,_0x409c4a)=>{const _0x4bfc5f=_0x241cd9;if(!(_0x409c4a!=null&&_0x409c4a['rangeId']))return!0x1;let _0x42a04e=q(_0x2084dc,_0x409c4a['unitId'],'');if(!_0x42a04e)return!0x1;let _0x1b38eb=_0x2084dc[_0x4bfc5f(0x217)](L)['getResult']({'unitId':_0x42a04e[_0x4bfc5f(0x2bd)],'rangeId':_0x409c4a['rangeId']});return _0x1b38eb?ut(_0x2084dc,_0x409c4a,_0x1b38eb['text'],lt['id']):!0x1;}};function ut(_0x97df17,_0x1bab8c,_0x365f45,_0x1a5b9b){const _0x30d911=_0x241cd9;if(!(_0x1bab8c!=null&&_0x1bab8c['rangeId']))return!0x1;let _0x4b9e55=q(_0x97df17,_0x1bab8c[_0x30d911(0x2bd)],'');if(!_0x4b9e55)return!0x1;let _0x2bdddb=Be({'documentData':_0x4b9e55['documentData'],'resource':_0x4b9e55['resource'],'rangeId':_0x1bab8c[_0x30d911(0x2ba)],'text':_0x365f45});return _0x2bdddb?J({'accessor':_0x97df17,'document':_0x4b9e55[_0x30d911(0x282)],'unitId':_0x4b9e55[_0x30d911(0x2bd)],'trigger':_0x1a5b9b,'rangeId':_0x1bab8c[_0x30d911(0x2ba)],'previousResource':_0x4b9e55[_0x30d911(0x2de)],'nextResource':_0x2bdddb[_0x30d911(0x284)],'previousDocumentData':_0x4b9e55['documentData'],'nextDocumentData':_0x2bdddb[_0x30d911(0x2dc)],'cursorOffset':_0x2bdddb[_0x30d911(0x28e)],'externalMutations':{}}):!0x1;}function q(_0x46ae7c,_0x572cf1,_0x53b2ca){const _0x100c17=_0x241cd9;if(_0x53b2ca)return null;let _0x50bcb7=_0x46ae7c[_0x100c17(0x217)](_0x6870f1),_0x4700a3=(_0x572cf1?_0x50bcb7[_0x100c17(0x23b)](_0x572cf1,_0x46296f[_0x100c17(0x20c)]):_0x50bcb7[_0x100c17(0x262)](_0x46296f[_0x100c17(0x20c)]))??null;if(!_0x4700a3)return null;let _0x33f258=_0x4700a3[_0x100c17(0x24f)](),_0x21c5e3=_0x33f258[_0x100c17(0x27f)];if(_0x33f258[_0x100c17(0x1dc)]||!_0x21c5e3)return null;let _0x230347=_0x46ae7c['get'](P);return _0x230347['getLoadError'](_0x4700a3[_0x100c17(0x1e2)]())?null:{'document':_0x4700a3,'body':_0x21c5e3,'documentData':_0x33f258,'model':_0x230347,'resource':_0x230347[_0x100c17(0x248)](_0x4700a3['getUnitId']())??b(),'unitId':_0x4700a3[_0x100c17(0x1e2)]()};}function dt(_0x15d40c,_0x38a7ee){const _0x36d3d3=_0x241cd9;var _0x17af3e;return(_0x17af3e=_0x15d40c[_0x36d3d3(0x217)](_0x4acac4)[_0x36d3d3(0x210)]({'subUnitId':_0x38a7ee,'unitId':_0x38a7ee}))==null?void 0x0:_0x17af3e[0x0];}function ft(_0x3f9800,_0x40eaa4,_0x4e5ab5){const _0x429c4d=_0x241cd9;if((_0x3f9800==null?void 0x0:_0x3f9800[_0x429c4d(0x22b)])===_0x429c4d(0x288)){var _0x975837;let _0x2620a4=((_0x975837=_0x40eaa4['paragraphs'])==null?void 0x0:_0x975837[_0x429c4d(0x1fd)](_0x1a1d5f=>_0x1a1d5f['paragraphId']===_0x3f9800[_0x429c4d(0x20b)]))??[];if(_0x2620a4[_0x429c4d(0x24b)]!==0x1)return null;let _0xe349a=_0x2620a4[0x0],_0x4f6e91=_0x2b5919(_0x40eaa4,_0xe349a),_0x3cfca7=_0xe349a[_0x429c4d(0x27a)]-_0x4f6e91,_0x257b27=_0x3f9800[_0x429c4d(0x2a7)]===_0x429c4d(0x21d)?_0x3cfca7:_0x3f9800[_0x429c4d(0x2a7)];if(!Number[_0x429c4d(0x276)](_0x257b27)||_0x257b27<0x0||_0x257b27>_0x3cfca7)return null;let _0x5e86cd=_0x4f6e91+_0x257b27;return{'startOffset':_0x5e86cd,'endOffset':_0x5e86cd};}if((_0x3f9800==null?void 0x0:_0x3f9800[_0x429c4d(0x22b)])==='range')return!Number[_0x429c4d(0x276)](_0x3f9800[_0x429c4d(0x2b4)])||!Number[_0x429c4d(0x276)](_0x3f9800['endOffset'])?null:{'startOffset':Math[_0x429c4d(0x271)](_0x3f9800['startOffset'],_0x3f9800[_0x429c4d(0x2c1)]),'endOffset':Math[_0x429c4d(0x26a)](_0x3f9800[_0x429c4d(0x2b4)],_0x3f9800[_0x429c4d(0x2c1)])};let _0x200c08=(_0x3f9800==null?void 0x0:_0x3f9800[_0x429c4d(0x22b)])==='selection'?_0x3f9800[_0x429c4d(0x2cc)]:_0x4e5ab5;return!_0x200c08||_0x200c08[_0x429c4d(0x22d)]?null:{'startOffset':Math[_0x429c4d(0x271)](_0x200c08['startOffset'],_0x200c08[_0x429c4d(0x2c1)]),'endOffset':Math[_0x429c4d(0x26a)](_0x200c08[_0x429c4d(0x2b4)],_0x200c08[_0x429c4d(0x2c1)])};}function pt(_0x208d1e,_0x4eb5c5,_0x1743ea,_0x11792e){const _0x236cd3=_0x241cd9;let _0x4977cb=_0x208d1e['get'](_0x322ca6),_0x4c50f7=_0x1743ea[_0x236cd3(0x22e)]('=')?_0x1743ea[_0x236cd3(0x294)](0x1):_0x1743ea,_0x261fc7=_0x4977cb[_0x236cd3(0x2bb)](_0x4c50f7);if(!_0x261fc7)return null;let _0x2f6353=_0x208d1e[_0x236cd3(0x217)](_0x2a643f),_0x9c7ea=_0x1eb386({'qualifiers':_0x2fe8c6(_0x261fc7),'explicitReferences':_0x11792e??[],'resolveBinding':_0x32ba9f=>_0x2f6353[_0x236cd3(0x240)](_0x4eb5c5,_0x32ba9f)});return _0x9c7ea[_0x236cd3(0x292)]===_0x236cd3(0x254)?_0x9c7ea[_0x236cd3(0x291)]:null;}function _0x321c(_0x2ac760,_0x1d88f6){_0x2ac760=_0x2ac760-0x1dc;const _0xe02e4e=_0xe02e();let _0x321cdb=_0xe02e4e[_0x2ac760];return _0x321cdb;}function mt(_0x830e14,_0x525dab,_0x10f77f){const _0x2de45b=_0x241cd9;var _0xa622de;let _0x55c1fa=_0xd42773(0x6);for(;_0x830e14!=null&&(_0xa622de=_0x830e14['customRanges'])!=null&&_0xa622de[_0x2de45b(0x23f)](_0x2cbbf5=>_0x2cbbf5['rangeId']===_0x55c1fa)||_0x525dab['getFormula'](_0x10f77f,_0x55c1fa);)_0x55c1fa=_0xd42773(0x6);return _0x55c1fa;}function ht(_0x330b37){try{return Re(_0x330b37);}catch(_0x4e24b0){if(_0x4e24b0 instanceof C)return null;throw _0x4e24b0;}}function gt(_0x54cc7b){const _0x39633e=_0x241cd9;let _0xc93bdc=_0x54cc7b[_0x39633e(0x281)]&&_0x54cc7b['nextDocumentData']?vt(_0x54cc7b[_0x39633e(0x282)],_0x54cc7b['unitId'],_0x54cc7b['previousDocumentData'],_0x54cc7b[_0x39633e(0x2dc)],_0x54cc7b[_0x39633e(0x28e)],_0x54cc7b[_0x39633e(0x275)]):null;return _0x54cc7b[_0x39633e(0x281)]&&_0x54cc7b[_0x39633e(0x2dc)]&&!_0xc93bdc?null:{'documentRedo':_0xc93bdc,'resourceRedo':{'id':V['id'],'params':{'unitId':_0x54cc7b['unitId'],'resource':_0x54cc7b[_0x39633e(0x284)]}},'resourceUndo':{'id':V['id'],'params':{'unitId':_0x54cc7b[_0x39633e(0x2bd)],'resource':_0x54cc7b[_0x39633e(0x1ea)]}}};}function _t(_0x240770,_0xe27edc,_0x122d6a,_0x5b441b){const _0x44a304=_0x241cd9;_0x5b441b[_0x44a304(0x285)]({'id':_0x240770[_0x44a304(0x275)]+':'+_0x240770['rangeId'],'unitID':_0x240770[_0x44a304(0x2bd)],'redoMutations':[..._0x240770['externalMutations']['redoMutation']?[_0x240770['externalMutations'][_0x44a304(0x287)]]:[],..._0xe27edc[_0x44a304(0x1fb)]?[_0xe27edc[_0x44a304(0x1fb)]]:[],_0xe27edc[_0x44a304(0x2a5)]],'undoMutations':[_0xe27edc[_0x44a304(0x286)],..._0x122d6a?[_0x122d6a]:[],..._0x240770[_0x44a304(0x20f)]['undoMutation']?[_0x240770['externalMutations'][_0x44a304(0x1df)]]:[]]});}function J(_0x35f36f){const _0x1f78f9=_0x241cd9;let _0x460c30=_0x35f36f[_0x1f78f9(0x220)][_0x1f78f9(0x217)](_0x583930),_0x3feb29=_0x35f36f[_0x1f78f9(0x220)]['get'](_0x196b7c),_0x547363=_0x35f36f[_0x1f78f9(0x220)][_0x1f78f9(0x217)](_0x4acac4),_0x51ca81=gt(_0x35f36f);if(!_0x51ca81)return!0x1;let _0x37a1c0=!0x1,_0x10e87b=null,_0x16527c=!0x1;try{if(_0x35f36f['externalMutations'][_0x1f78f9(0x287)]){if(!_0x460c30['syncExecuteCommand'](_0x35f36f[_0x1f78f9(0x20f)]['redoMutation']['id'],_0x35f36f[_0x1f78f9(0x20f)][_0x1f78f9(0x287)][_0x1f78f9(0x293)]))return!0x1;_0x37a1c0=!0x0;}if(_0x51ca81[_0x1f78f9(0x1fb)]){let _0x2c3cba=_0x460c30[_0x1f78f9(0x2b0)](_0x51ca81[_0x1f78f9(0x1fb)]['id'],_0x51ca81[_0x1f78f9(0x1fb)]['params']);if(!_0x2c3cba)return bt(_0x460c30,_0x35f36f[_0x1f78f9(0x20f)],_0x37a1c0),!0x1;_0x10e87b={'id':_0x2acc6a['id'],'params':{..._0x2c3cba,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0x460c30[_0x1f78f9(0x2b0)](_0x51ca81['resourceRedo']['id'],_0x51ca81['resourceRedo']['params']))return yt(_0x460c30,_0x10e87b),bt(_0x460c30,_0x35f36f[_0x1f78f9(0x20f)],_0x37a1c0),!0x1;_0x16527c=!0x0,_t(_0x35f36f,_0x51ca81,_0x10e87b,_0x3feb29);}catch(_0x5d3e90){throw _0x16527c&&_0x460c30[_0x1f78f9(0x2b0)](_0x51ca81[_0x1f78f9(0x286)]['id'],_0x51ca81[_0x1f78f9(0x286)]['params']),yt(_0x460c30,_0x10e87b),bt(_0x460c30,_0x35f36f['externalMutations'],_0x37a1c0),_0x5d3e90;}return _0x547363[_0x1f78f9(0x20d)]([{'startOffset':_0x35f36f[_0x1f78f9(0x28e)],'endOffset':_0x35f36f[_0x1f78f9(0x28e)],'segmentId':''}],{'unitId':_0x35f36f[_0x1f78f9(0x2bd)],'subUnitId':_0x35f36f[_0x1f78f9(0x2bd)]},!0x1,{[_0x39973e]:!0x0}),!0x0;}function vt(_0x3e50d1,_0x429497,_0x283926,_0x58eea4,_0x38d281,_0x27132a){let _0x3e3488=xt(_0x283926,_0x58eea4,_0x5f4bdc(_0x3e50d1,''));return _0x3e3488?{'id':_0x2acc6a['id'],'params':{'unitId':_0x429497,'actions':_0x3e3488,'segmentId':'','textRanges':[{'startOffset':_0x38d281,'endOffset':_0x38d281,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0x27132a}}:null;}function yt(_0x28d03d,_0x28db29){const _0x2ec835=_0x241cd9;_0x28db29&&_0x28d03d[_0x2ec835(0x2b0)](_0x28db29['id'],_0x28db29[_0x2ec835(0x293)]);}function bt(_0x22ab82,_0x26902c,_0x56b29d){const _0x24bc6e=_0x241cd9;_0x56b29d&&_0x26902c[_0x24bc6e(0x1df)]&&_0x22ab82[_0x24bc6e(0x2b0)](_0x26902c['undoMutation']['id'],_0x26902c[_0x24bc6e(0x1df)][_0x24bc6e(0x293)]);}function xt(_0x56d472,_0x468f09,_0x22a118){const _0x54b72b=_0x241cd9;let _0x5cfa31=_0x56d472[_0x54b72b(0x27f)],_0x15c6c1=_0x468f09[_0x54b72b(0x27f)],_0x568eaf=St(_0x5cfa31==null?void 0x0:_0x5cfa31[_0x54b72b(0x236)],_0x15c6c1==null?void 0x0:_0x15c6c1[_0x54b72b(0x236)]);if(!_0x568eaf||!_0x15c6c1)return null;let _0x2bc087=new _0x32b2df();return _0x2bc087[_0x54b72b(0x243)](_0x568eaf['start']),_0x568eaf[_0x54b72b(0x2da)]>0x0&&_0x2bc087[_0x54b72b(0x2d3)](_0x568eaf['insertLength'],_0x2e6873(_0x15c6c1,_0x568eaf[_0x54b72b(0x2e0)],_0x568eaf['start']+_0x568eaf[_0x54b72b(0x2da)],!0x1)),_0x568eaf[_0x54b72b(0x279)]>0x0&&_0x2bc087[_0x54b72b(0x1ff)](_0x568eaf[_0x54b72b(0x279)]),_0x59e127[_0x54b72b(0x26b)]()[_0x54b72b(0x251)](_0x2bc087[_0x54b72b(0x2cd)](),_0x22a118);}function St(_0x7ec52a,_0x2fe3aa){const _0x7c65de=_0x241cd9;if(_0x7ec52a==null||_0x2fe3aa==null||_0x7ec52a===_0x2fe3aa)return null;let _0x20e751=0x0;for(;_0x20e751<_0x7ec52a[_0x7c65de(0x24b)]&&_0x20e751<_0x2fe3aa['length']&&_0x7ec52a[_0x20e751]===_0x2fe3aa[_0x20e751];)_0x20e751+=0x1;let _0x288b66=_0x7ec52a[_0x7c65de(0x24b)],_0x5da84f=_0x2fe3aa['length'];for(;_0x288b66>_0x20e751&&_0x5da84f>_0x20e751&&_0x7ec52a[_0x288b66-0x1]===_0x2fe3aa[_0x5da84f-0x1];)--_0x288b66,--_0x5da84f;return{'start':_0x20e751,'deleteLength':_0x288b66-_0x20e751,'insertLength':_0x5da84f-_0x20e751};}function Ct(_0x2b0af2){const _0x36e41a=_0x241cd9;return{'schemaVersion':0x1,'formulas':Object[_0x36e41a(0x2ae)](Object[_0x36e41a(0x205)](_0x2b0af2[_0x36e41a(0x290)])[_0x36e41a(0x289)](([_0x11a2df,_0x112915])=>[_0x11a2df,{..._0x112915,..._0x112915[_0x36e41a(0x226)]?{'numberFormat':{..._0x112915['numberFormat']}}:null,..._0x112915[_0x36e41a(0x266)]?{'lastValue':{..._0x112915[_0x36e41a(0x266)]}}:null}]))};}function _0xe02e(){const _0x1caff9=['UNIVER_DOC','replaceDocRanges','_registrations','externalMutations','getTextRanges','call','_syncScheduled','setFormulas','_setPresentation','_isDisposed','set','get','BLOCK_START','_preserveInvalid','endIndex','assign','success','end','decorate','kind','accessor','COMMAND','10QLsKIr','externalReferences','_instanceService','isArray','numberFormat','8160530aqRKbi','setResource','onStarting','symbol','type','removeFormula','segmentId','startsWith','719351JBysYJ','default','empty','docs-formula.mutation.set-last-values','assess','3957516wjzLCr','subscribe','dataStream','COLUMN_GROUP_START','unitAdded$','_service','3688gwfEOJ','getUnit','1.0.2','COLUMN_END','setConfig','some','resolveBinding','TABLE_CELL_START','pending','retain','schemaVersion','name','_configService','_change$','getResource','TABLE_START','DOC_FORMULA_PLUGIN','length','every','config','identity','getSnapshot','toPrimitive','editOp','constructor','_formulaKeys','resolved','CUSTOM','EMPTY','resolveFormula','object','registerCommand','keys','rangeType','boolean','forEach','customDecorations','_univerInstanceService','docs-formula.command.set-number-format','COLUMN_START','getCurrentUnitOfType','_registrationService','expectedReferenceRevision','_cacheEligibilityService','lastValue','presentation','TABLE_CELL_END','deepClone','max','getInstance','_updateFormulaResult','add','updates','dispose','_loadErrors','min','eligible','data','stale','trigger','isInteger','model','source','deleteLength','startIndex','docs-formula.mutation.set-resource','getResult','_presentationChanged$','number','body','prototype','previousDocumentData','document','iterator','nextResource','pushUndoRedo','resourceUndo','redoMutation','paragraph','map','univer-docs-formula','pluginName','textRuns','expectedFormula','cursorOffset','_hostExternalReferenceModel','formulas','references','status','params','slice','_formulaService','values','liveResult','includes','clear','docs-formula.command.insert','getRegisteredFormulas','version','unsupported-version','Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.','collectMutations','text','getPresentation','load','customRanges','unitDisposed$','resourceRedo','cell','position','registerPluginResource','syncUnit','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','docs-formula.command.remove','PARAGRAPH','docs-formula.mutation.remove-formula','fromEntries','7uSYgdw','syncExecuteCommand','_rawResources','unregister','error','startOffset','find','7307757pNHqga','degradeBody','parse','customBlocks','rangeId','sequenceNodesBuilder','MUTATION','unitId','getFormulaValueSync','disposeWithMe','endsWith','endOffset','docs-formula.command.replace-with-text','asObservable','degradeDocumentData','tables','getOwnPropertyDescriptor','setFormula','CUSTOM_BLOCK','_resources','_model','SECTION_BREAK','selection','serialize','3813YPNtOn','has','referenceRevision','_deleteRegistration','target','insert','_resourceManagerService','5082592WUXRvq','pattern','onCommandExecuted','formula','COLUMN_GROUP_END','insertLength','_config','nextDocumentData','packageName','resource','register','start','registerProvider','getFormulas','getFormula','disabled','_docFormulaModel','notifyTextChanged','undoMutation','documentData','TABLE_ROW_START','getUnitId','sort','change$','DOC','trim','ERROR','formulaId','_syncUnit','previousResource','22262dPZmpO','sectionBreaks','docs-formula.mutation.set-formula','docs-formula.config','properties','removeUnit','stringify','_pendingUnitIds','presentationChanged$','SUCCESS','columnGroups','function','blockRanges','defineProperty','_injector','complete','documentRedo','next','filter','_commandService','delete','TABLE_ROW_END','from','unregisterUnit','string','docs-formula.command.convert-to-text','entries','color','docs-formula.command.update','paragraphs','resolveText','getRevision','paragraphId'];_0xe02e=function(){return _0x1caff9;};return _0xe02e();}let Y=class extends _0x2c5b49{constructor(_0x1c026d,_0x2e5637,_0xa6db22,_0x3d0032){const _0xa6f052=_0x241cd9;super(),this[_0xa6f052(0x224)]=_0x1c026d,this[_0xa6f052(0x1fe)]=_0x2e5637,this[_0xa6f052(0x2ca)]=_0xa6db22,this[_0xa6f052(0x239)]=_0x3d0032,N(this,'_pendingUnitIds',new Set()),N(this,'_syncScheduled',!0x1),N(this,_0xa6f052(0x215),!0x1),this['_instanceService']['getAllUnitsForType'](_0x46296f['UNIVER_DOC'])[_0xa6f052(0x25d)](_0xc9e02e=>this[_0xa6f052(0x239)][_0xa6f052(0x2a9)](_0xc9e02e)),this[_0xa6f052(0x2bf)](this['_model'][_0xa6f052(0x1e4)][_0xa6f052(0x235)](({unitId:_0x430397})=>this[_0xa6f052(0x1e9)](_0x430397))),this[_0xa6f052(0x2bf)](this[_0xa6f052(0x224)][_0xa6f052(0x238)][_0xa6f052(0x235)](({unit:_0x2e8324})=>{const _0x1b9a9f=_0xa6f052;_0x2e8324[_0x1b9a9f(0x22b)]===_0x46296f['UNIVER_DOC']&&this['_queueSync'](_0x2e8324[_0x1b9a9f(0x1e2)]());})),this[_0xa6f052(0x2bf)](this[_0xa6f052(0x224)][_0xa6f052(0x2a4)][_0xa6f052(0x235)](_0x2bfdba=>{const _0x2881af=_0xa6f052;this[_0x2881af(0x239)][_0x2881af(0x202)](_0x2bfdba['getUnitId']());})),this[_0xa6f052(0x2bf)](this[_0xa6f052(0x1fe)][_0xa6f052(0x2d7)](_0x829424=>{const _0x1f93d5=_0xa6f052;if(_0x829424['id']===_0x2acc6a['id']&&wt(_0x829424[_0x1f93d5(0x293)])){let _0x5ad16a=_0x829424[_0x1f93d5(0x293)];_0x5ad16a[_0x1f93d5(0x22d)]||this[_0x1f93d5(0x1e9)](_0x5ad16a['unitId']);}}));}[_0x241cd9(0x26f)](){const _0x135fca=_0x241cd9;this['_isDisposed']=!0x0,super[_0x135fca(0x26f)]();}['_queueSync'](_0x511dd9){const _0x160cbc=_0x241cd9;this[_0x160cbc(0x1f2)][_0x160cbc(0x26d)](_0x511dd9),!this['_syncScheduled']&&(this[_0x160cbc(0x212)]=!0x0,queueMicrotask(()=>{const _0x46582a=_0x160cbc;if(this[_0x46582a(0x212)]=!0x1,this[_0x46582a(0x215)])return;let _0x61e701=Array[_0x46582a(0x201)](this[_0x46582a(0x1f2)]);this['_pendingUnitIds'][_0x46582a(0x299)](),_0x61e701[_0x46582a(0x25d)](_0x64cca8=>this[_0x46582a(0x1e9)](_0x64cca8));}));}[_0x241cd9(0x1e9)](_0xcb5ebb){const _0x1f8312=_0x241cd9;let _0x17fde4=this[_0x1f8312(0x224)][_0x1f8312(0x23b)](_0xcb5ebb,_0x46296f[_0x1f8312(0x20c)]);_0x17fde4&&this[_0x1f8312(0x239)][_0x1f8312(0x2a9)](_0x17fde4);}};Y=I([F(0x0,_0x6870f1),F(0x1,_0x583930),F(0x2,_0x199f03(P)),F(0x3,_0x199f03(L))],Y);function wt(_0x387e8b){const _0x4e505a=_0x241cd9;return typeof _0x387e8b=='object'&&!!_0x387e8b&&_0x4e505a(0x2bd)in _0x387e8b&&typeof _0x387e8b['unitId']=='string'&&(!(_0x4e505a(0x22d)in _0x387e8b)||_0x387e8b['segmentId']===void 0x0||typeof _0x387e8b['segmentId']==_0x4e505a(0x203));}let X=class extends _0x2c5b49{constructor(_0x48706f,_0x37c8ca){const _0x103da4=_0x241cd9;super(),this['_resourceManagerService']=_0x48706f,this[_0x103da4(0x1dd)]=_0x37c8ca,this['disposeWithMe'](this[_0x103da4(0x2d4)][_0x103da4(0x2a8)]({'pluginName':y,'businesses':[_0x46296f[_0x103da4(0x20c)]],'toJson':_0x3dce18=>JSON[_0x103da4(0x1f1)](this[_0x103da4(0x1dd)]['serialize'](_0x3dce18)),'parseJson':_0x3dc502=>JSON[_0x103da4(0x2b8)](_0x3dc502),'onLoad':(_0xa1392,_0x3e6945)=>{const _0x326ed4=_0x103da4;this[_0x326ed4(0x1dd)][_0x326ed4(0x2a2)](_0xa1392,_0x3e6945);},'onUnLoad':_0x1a29b1=>this[_0x103da4(0x1dd)][_0x103da4(0x1f0)](_0x1a29b1)}));}};X=I([F(0x0,_0x1802be),F(0x1,_0x199f03(P))],X);var Tt='@univerjs-pro/docs-formula',Et=_0x241cd9(0x23c);const Dt={};let Z=class extends _0x2c5b49{constructor(_0x4877c0,_0x377999,_0x4c260e){const _0x3eed28=_0x241cd9;super(),this[_0x3eed28(0x25f)]=_0x4877c0,this[_0x3eed28(0x295)]=_0x377999,this['disposeWithMe'](_0x4c260e[_0x3eed28(0x2df)]({'resolve':(_0xbb416c,_0x5e9042)=>{const _0x2fd9d7=_0x3eed28;var _0x229b6e;return((_0x229b6e=_0x5e9042[_0x2fd9d7(0x2a3)])==null?void 0x0:_0x229b6e[_0x2fd9d7(0x1fd)](w)['map'](_0x3930e7=>({'startOffset':_0x3930e7[_0x2fd9d7(0x27a)],'endOffset':_0x3930e7[_0x2fd9d7(0x21a)]+0x1,'text':this[_0x2fd9d7(0x257)](_0xbb416c,_0x3930e7[_0x2fd9d7(0x2ba)])})))??[];}})),this[_0x3eed28(0x2bf)](this[_0x3eed28(0x295)][_0x3eed28(0x1f3)][_0x3eed28(0x235)](({unitId:_0x537b6})=>{const _0x1de0b5=_0x3eed28;_0x4c260e[_0x1de0b5(0x1de)](_0x537b6);}));}[_0x241cd9(0x257)](_0x30c6a8,_0x1b4a63){const _0x1e3bd9=_0x241cd9;var _0xae0104;return((_0xae0104=this[_0x1e3bd9(0x295)][_0x1e3bd9(0x27c)]({'unitId':_0x30c6a8,'rangeId':_0x1b4a63}))==null?void 0x0:_0xae0104[_0x1e3bd9(0x2a0)])??'';}[_0x241cd9(0x209)](_0x4c8f44,_0xd026be,_0x63d114){const _0x34b390=_0x241cd9;var _0x3bf673;let _0x4ed9a0=this[_0x34b390(0x25f)][_0x34b390(0x23b)](_0x4c8f44,_0x46296f['UNIVER_DOC']),_0x18c672=_0x4ed9a0==null?void 0x0:_0x4ed9a0['getBody']();if(!_0x18c672)return'';let _0xe23689=_0x18c672[_0x34b390(0x236)][_0x34b390(0x294)](_0xd026be,_0x63d114),_0x4e3b32=((_0x3bf673=_0x18c672[_0x34b390(0x2a3)])==null?void 0x0:_0x3bf673[_0x34b390(0x1fd)](_0x266fcd=>w(_0x266fcd)&&_0x266fcd['startIndex']>=_0xd026be&&_0x266fcd[_0x34b390(0x21a)]<_0x63d114)['sort']((_0x223500,_0x3232df)=>_0x3232df[_0x34b390(0x27a)]-_0x223500[_0x34b390(0x27a)]))??[];for(let _0x5657c9 of _0x4e3b32){let _0x5b4372=_0x5657c9[_0x34b390(0x27a)]-_0xd026be,_0x760427=_0x5657c9['endIndex']-_0xd026be+0x1;_0xe23689=''+_0xe23689[_0x34b390(0x294)](0x0,_0x5b4372)+this[_0x34b390(0x257)](_0x4c8f44,_0x5657c9['rangeId'])+_0xe23689[_0x34b390(0x294)](_0x760427);}return _0xe23689;}[_0x241cd9(0x2c4)](_0x20af26){return Ot(_0x20af26);}[_0x241cd9(0x2b7)](_0x48dc1a,_0x186c3f,_0x943d95={}){const _0x387458=_0x241cd9;var _0x162f62;return Ve({'id':_0x48dc1a,'body':_0x186c3f,'documentStyle':{}},(((_0x162f62=_0x186c3f['customRanges'])==null?void 0x0:_0x162f62['filter'](w))??[])[_0x387458(0x289)](_0x1cdfd7=>({'rangeId':_0x1cdfd7[_0x387458(0x2ba)],'text':_0x943d95[_0x1cdfd7[_0x387458(0x2ba)]]??this['resolveFormula'](_0x48dc1a,_0x1cdfd7['rangeId'])})))['body']??{'dataStream':''};}};Z=I([F(0x0,_0x6870f1),F(0x1,_0x199f03(L)),F(0x2,_0x199f03(_0x4f4dae))],Z);function Ot(_0x3e8fef){const _0x126a2f=_0x241cd9;var _0x4e1656,_0x32ae5c;let _0x341213=kt(_0x3e8fef),_0x2feacc=Ve(_0x3e8fef,(((_0x4e1656=_0x3e8fef[_0x126a2f(0x27f)])==null||(_0x4e1656=_0x4e1656['customRanges'])==null?void 0x0:_0x4e1656[_0x126a2f(0x1fd)](w))??[])[_0x126a2f(0x289)](_0x377e45=>({'rangeId':_0x377e45[_0x126a2f(0x2ba)],'text':At(_0x341213==null?void 0x0:_0x341213['formulas'][_0x377e45[_0x126a2f(0x2ba)]])})));return _0x2feacc['resources']=(_0x32ae5c=_0x2feacc['resources'])==null?void 0x0:_0x32ae5c[_0x126a2f(0x1fd)](_0x5b7da4=>_0x5b7da4[_0x126a2f(0x245)]!==y),_0x2feacc;}function kt(_0x21943e){const _0x26b2b7=_0x241cd9;var _0x3a8c8a;let _0x5da591=(_0x3a8c8a=_0x21943e['resources'])==null||(_0x3a8c8a=_0x3a8c8a[_0x26b2b7(0x2b5)](_0xfe7a33=>_0xfe7a33[_0x26b2b7(0x245)]===_0x26b2b7(0x24a)))==null?void 0x0:_0x3a8c8a[_0x26b2b7(0x273)];if(_0x5da591)try{let _0x44e335=JSON[_0x26b2b7(0x2b8)](_0x5da591);return x(_0x44e335)?_0x44e335:void 0x0;}catch{return;}}function At(_0x377385){const _0x1a2c93=_0x241cd9;return _0x377385?_0x3cb7d0({'lastValue':_0x377385[_0x1a2c93(0x266)],'numberFormat':_0x377385[_0x1a2c93(0x226)]})['text']:'';}let Q=class extends _0x2c5b49{constructor(_0x192c30,_0x2c9f19,_0x512781){const _0xcc0fc4=_0x241cd9;super(),this[_0xcc0fc4(0x295)]=_0x192c30,this[_0xcc0fc4(0x265)]=_0x2c9f19,this[_0xcc0fc4(0x2bf)](_0x512781[_0xcc0fc4(0x2e1)](this));}[_0x241cd9(0x29f)](_0x45b994){const _0x3dee7d=_0x241cd9;let _0x4ffcc9=new Map();for(let _0x3f6ec3 of this['_formulaService'][_0x3dee7d(0x29b)]()){var _0x39c37f;if(!this[_0x3dee7d(0x265)][_0x3dee7d(0x233)](_0x3f6ec3[_0x3dee7d(0x24d)][_0x3dee7d(0x2d8)],_0x3f6ec3['liveResult'])[_0x3dee7d(0x272)])continue;let _0x4ea19d=_0x7be344(_0x3f6ec3[_0x3dee7d(0x297)]),_0x53c4fc=_0x4ea19d?_0x241cf2(_0x4ea19d):null;if(!_0x53c4fc||jt(_0x3f6ec3['config'][_0x3dee7d(0x266)],_0x53c4fc))continue;let _0xcd800e=_0x4ffcc9['get'](_0x3f6ec3[_0x3dee7d(0x24e)][_0x3dee7d(0x2bd)])??[];_0xcd800e['push']({'rangeId':_0x3f6ec3[_0x3dee7d(0x24e)][_0x3dee7d(0x2ba)],'expectedFormula':_0x3f6ec3[_0x3dee7d(0x24d)]['formula'],'expectedNumberFormat':(_0x39c37f=_0x3f6ec3[_0x3dee7d(0x24d)][_0x3dee7d(0x226)])==null?void 0x0:_0x39c37f[_0x3dee7d(0x2d6)],'expectedReferenceRevision':_0x3f6ec3[_0x3dee7d(0x2d0)],'lastValue':_0x53c4fc}),_0x4ffcc9[_0x3dee7d(0x216)](_0x3f6ec3[_0x3dee7d(0x24e)][_0x3dee7d(0x2bd)],_0xcd800e);}return Array['from'](_0x4ffcc9,([_0x439a5b,_0x3382ee])=>({'id':H['id'],'params':{'unitId':_0x439a5b,'updates':_0x3382ee}}));}};Q=I([F(0x0,_0x199f03(L)),F(0x1,_0x199f03(_0x144415)),F(0x2,_0x199f03(_0xa4a93b))],Q);function jt(_0x4b1c75,_0x72795e){const _0x5edf9b=_0x241cd9;return(_0x4b1c75==null?void 0x0:_0x4b1c75['v'])===_0x72795e['v']&&(_0x4b1c75==null?void 0x0:_0x4b1c75['t'])===_0x72795e['t']&&(_0x4b1c75==null?void 0x0:_0x4b1c75['pattern'])===_0x72795e[_0x5edf9b(0x2d6)];}let $=class extends _0x2b54c9{constructor(_0x59de14=Dt,_0x33f4f8,_0x342bbc,_0x4984d8){const _0x58ddff=_0x241cd9;super(),this[_0x58ddff(0x2db)]=_0x59de14,this['_injector']=_0x33f4f8,this[_0x58ddff(0x1fe)]=_0x342bbc,this[_0x58ddff(0x246)]=_0x4984d8;let {..._0x20770}=_0x312ea2({},Dt,this[_0x58ddff(0x2db)]);this[_0x58ddff(0x246)][_0x58ddff(0x23e)](_0x58ddff(0x1ee),_0x20770);}[_0x241cd9(0x229)](){const _0x2abee0=_0x241cd9;this['_injector']['add']([P]),this[_0x2abee0(0x1f9)][_0x2abee0(0x26d)]([L]),this[_0x2abee0(0x1f9)][_0x2abee0(0x26d)]([X]),this[_0x2abee0(0x1f9)][_0x2abee0(0x26d)]([Y]),this[_0x2abee0(0x1f9)]['add']([Q]),this[_0x2abee0(0x1f9)][_0x2abee0(0x26d)]([Z]),_0x14182c(this[_0x2abee0(0x1f9)],[[P],[X],[Y],[Q],[Z]]),[ot,st,V,H,U,W,G,K,ct,lt][_0x2abee0(0x25d)](_0x4dd0c3=>this[_0x2abee0(0x2bf)](this[_0x2abee0(0x1fe)][_0x2abee0(0x259)](_0x4dd0c3)));}};N($,_0x241cd9(0x28b),y),N($,_0x241cd9(0x2dd),Tt),N($,_0x241cd9(0x29c),Et),N($,_0x241cd9(0x22b),_0x46296f[_0x241cd9(0x20c)]),$=I([_0x3a925b(_0x14e208,_0x48082c,_0xdd033b),F(0x1,_0x199f03(_0x9a266a)),F(0x2,_0x583930),F(0x3,_0x4d1d27)],$);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 _0x34c9f2=_0x9a42;(function(_0x3fd348,_0x4d1222){const _0x426d50=_0x9a42,_0x5d915b=_0x3fd348();while(!![]){try{const _0x493f60=parseInt(_0x426d50(0x23b))/0x1*(-parseInt(_0x426d50(0x1ee))/0x2)+-parseInt(_0x426d50(0x29e))/0x3+-parseInt(_0x426d50(0x1fc))/0x4*(-parseInt(_0x426d50(0x22a))/0x5)+-parseInt(_0x426d50(0x1ea))/0x6*(parseInt(_0x426d50(0x2c0))/0x7)+-parseInt(_0x426d50(0x1f7))/0x8+parseInt(_0x426d50(0x2c5))/0x9+parseInt(_0x426d50(0x22d))/0xa;if(_0x493f60===_0x4d1222)break;else _0x5d915b['push'](_0x5d915b['shift']());}catch(_0x19bf52){_0x5d915b['push'](_0x5d915b['shift']());}}}(_0x35ee,0x5d711));import{FormulaCacheEligibilityService as _0x168d95,FormulaLastValuePersistenceService as _0x442e83,HostExternalReferenceModel as _0x598fe,UniverProFormulaEnginePlugin as _0x4266a3,buildUpsertHostExternalReferenceMutations as _0x64c5d3,collectFormulaExternalReferenceQualifiers as _0x51ffff,getScalarFormulaResultCell as _0x477060,resolveFormulaResultPresentation as _0x44276e,resolveHostFormulaExternalReferences as _0xc8a733,toFormulaLastValue as _0x16967c}from'@univerjs-pro/engine-formula';import{CellValueType as _0xcdd757,CommandType as _0x3d8c4d,CustomRangeType as _0xe8be5b,DataStreamTreeTokenType as _0x1a4e6c,DependentOn as _0x962570,Disposable as _0x49a82f,ICommandService as _0x1fba3b,IConfigService as _0x4eefec,IResourceManagerService as _0x674a1c,IUndoRedoService as _0x6bc219,IUniverInstanceService as _0x35f474,Inject as _0x5c5393,Injector as _0x57c044,JSONX as _0x42e010,Plugin as _0x530da8,TextX as _0x283512,Tools as _0x5e88d9,UniverInstanceType as _0x9cc7bc,generateRandomId as _0x23fed8,getBodySliceForTextXAction as _0x2ffd0f,getCustomRangeInterval as _0x3c5aee,getParagraphContentStartOffset as _0x44d00,getRichTextEditPath as _0x38047f,merge as _0x2e4085,shiftExclusiveRangeOnDelete as _0x4483d1,shiftExclusiveRangeOnInsert as _0x5e2c6d,shiftInclusiveRangeOnDelete as _0x16ca5b,shiftInclusiveRangeOnInsert as _0x2a05e1,touchDependencies as _0x6f29f6}from'@univerjs/core';import{DOC_SELECTION_OPTION_PRESERVE_CARET as _0x291f0f,DocSelectionManagerService as _0x1841de,DocTextResolverService as _0x557df1,RichTextEditingMutation as _0x26272f,UniverDocsPlugin as _0x4c3072}from'@univerjs/docs';import{FormulaResultStatus as _0x51281a,LexerTreeBuilder as _0x2ea0aa,OtherFormulaBizType as _0x20565b,RegisterOtherFormulaService as _0x2bd31f}from'@univerjs/engine-formula';import{Subject as _0x2c9ea2}from'rxjs';import{UniverLicensePlugin as _0x16ebc7}from'@univerjs-pro/license';const y=_0x34c9f2(0x26b),je=0x1,Me=_0x34c9f2(0x25e),Ne='';function b(){return{'schemaVersion':0x1,'formulas':{}};}function x(_0x811692){const _0x34b868=_0x34c9f2;return!_0x811692||typeof _0x811692!=_0x34b868(0x224)||!S(_0x811692,[_0x34b868(0x1f8),_0x34b868(0x214)])||!(_0x34b868(0x1f8)in _0x811692)||_0x811692[_0x34b868(0x1f8)]!==0x1||!(_0x34b868(0x214)in _0x811692)||!_0x811692[_0x34b868(0x214)]||typeof _0x811692[_0x34b868(0x214)]!=_0x34b868(0x224)||Array[_0x34b868(0x2a8)](_0x811692['formulas'])?!0x1:Object[_0x34b868(0x2ad)](_0x811692[_0x34b868(0x214)])[_0x34b868(0x2bb)](([_0xeaf602,_0x440282])=>_0xeaf602[_0x34b868(0x2c1)]>0x0&&Pe(_0x440282));}function Pe(_0xd26335){const _0x28aab0=_0x34c9f2;return!_0xd26335||typeof _0xd26335!=_0x28aab0(0x224)||!S(_0xd26335,['formula',_0x28aab0(0x271),_0x28aab0(0x21f)])||!(_0x28aab0(0x20f)in _0xd26335)||typeof _0xd26335[_0x28aab0(0x20f)]!=_0x28aab0(0x1d5)||!_0xd26335[_0x28aab0(0x20f)][_0x28aab0(0x27c)]()||_0x28aab0(0x271)in _0xd26335&&_0xd26335[_0x28aab0(0x271)]!=null&&(typeof _0xd26335[_0x28aab0(0x271)]!=_0x28aab0(0x224)||!S(_0xd26335[_0x28aab0(0x271)],[_0x28aab0(0x244)])||!(_0x28aab0(0x244)in _0xd26335['numberFormat'])||typeof _0xd26335['numberFormat'][_0x28aab0(0x244)]!=_0x28aab0(0x1d5))?!0x1:!(_0x28aab0(0x21f)in _0xd26335)||_0xd26335[_0x28aab0(0x21f)]==null||Fe(_0xd26335[_0x28aab0(0x21f)]);}function Fe(_0x5062cd){const _0x42133e=_0x34c9f2;return!_0x5062cd||typeof _0x5062cd!=_0x42133e(0x224)||!S(_0x5062cd,['v','t',_0x42133e(0x244)])||!('v'in _0x5062cd)||_0x5062cd['v']!==null&&typeof _0x5062cd['v']!=_0x42133e(0x1d5)&&typeof _0x5062cd['v']!=_0x42133e(0x1dd)&&typeof _0x5062cd['v']!='boolean'||'t'in _0x5062cd&&_0x5062cd['t']!=null&&!Ie(_0x5062cd['t'])?!0x1:!(_0x42133e(0x244)in _0x5062cd)||_0x5062cd[_0x42133e(0x244)]==null||typeof _0x5062cd[_0x42133e(0x244)]==_0x42133e(0x1d5);}function S(_0x58961a,_0x20376b){const _0x2772ea=_0x34c9f2;let _0x15783b=new Set(_0x20376b);return Object[_0x2772ea(0x24a)](_0x58961a)[_0x2772ea(0x2bb)](_0xcd09d7=>_0x15783b[_0x2772ea(0x253)](_0xcd09d7));}function Ie(_0x38487a){const _0x51fa00=_0x34c9f2;return typeof _0x38487a==_0x51fa00(0x1dd)&&Object[_0x51fa00(0x2a5)](_0xcdd757)['includes'](_0x38487a);}const Le=new Set([_0x1a4e6c[_0x34c9f2(0x26e)],_0x1a4e6c['TABLE_START'],_0x1a4e6c[_0x34c9f2(0x266)],_0x1a4e6c['TABLE_CELL_START'],_0x1a4e6c[_0x34c9f2(0x1e1)],_0x1a4e6c['TABLE_ROW_END'],_0x1a4e6c['TABLE_END'],_0x1a4e6c[_0x34c9f2(0x213)],_0x1a4e6c[_0x34c9f2(0x1e5)],_0x1a4e6c[_0x34c9f2(0x1da)],_0x1a4e6c[_0x34c9f2(0x2aa)],_0x1a4e6c[_0x34c9f2(0x205)],_0x1a4e6c[_0x34c9f2(0x288)],_0x1a4e6c[_0x34c9f2(0x23d)]]);var C=class extends Error{constructor(){super('Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries');}};function Re(_0x4367e2){const _0x14cac0=_0x34c9f2;var _0x1f8799,_0x49d0f5;let _0x597e9c=_0x5e88d9['deepClone'](_0x4367e2[_0x14cac0(0x2a7)]),_0x2d3efb=j(_0x597e9c),{startOffset:_0x42c351,endOffset:_0x2f2aa1}=We(_0x2d3efb,_0x4367e2[_0x14cac0(0x262)],_0x4367e2[_0x14cac0(0x251)]);He(_0x2d3efb,_0x42c351,_0x2f2aa1);let _0x319100=((_0x1f8799=_0x2d3efb[_0x14cac0(0x2b7)])==null?void 0x0:_0x1f8799[_0x14cac0(0x229)](_0x358f49=>{const _0xcc7983=_0x14cac0;if(!w(_0x358f49))return!0x1;let _0x55efdd=_0x3c5aee(_0x358f49);return _0x55efdd[_0xcc7983(0x251)]>_0x42c351&&_0x55efdd['startOffset']<_0x2f2aa1;})[_0x14cac0(0x26d)](_0x4be67c=>_0x4be67c[_0x14cac0(0x212)]))??[];qe(_0x2d3efb,_0x42c351,_0x2f2aa1,''),_0x2d3efb[_0x14cac0(0x2b7)]=[...((_0x49d0f5=_0x2d3efb[_0x14cac0(0x2b7)])==null?void 0x0:_0x49d0f5[_0x14cac0(0x229)](_0x5a712f=>!_0x319100[_0x14cac0(0x279)](_0x5a712f[_0x14cac0(0x212)])&&_0x5a712f['rangeId']!==_0x4367e2[_0x14cac0(0x212)]))??[],Ue(_0x4367e2[_0x14cac0(0x212)],_0x42c351)]['sort']((_0x6ca7f0,_0x4bcd7f)=>_0x6ca7f0[_0x14cac0(0x25c)]-_0x4bcd7f[_0x14cac0(0x25c)]);let _0xf4a77c=E(_0x4367e2[_0x14cac0(0x1d4)]);return _0x319100[_0x14cac0(0x230)](_0x12ef5f=>{delete _0xf4a77c['formulas'][_0x12ef5f];}),_0xf4a77c['formulas'][_0x4367e2['rangeId']]=_0x5e88d9['deepClone'](_0x4367e2[_0x14cac0(0x1ef)]),{'nextDocumentData':_0x597e9c,'nextResource':_0xf4a77c,'cursorOffset':_0x42c351+0x1};}function ze(_0x51d67e){const _0x493497=_0x34c9f2;var _0x13b35f,_0x822e52;let _0x215297=_0x5e88d9['deepClone'](_0x51d67e[_0x493497(0x2a7)]),_0x3933f3=(_0x13b35f=j(_0x215297)[_0x493497(0x2b7)])==null?void 0x0:_0x13b35f[_0x493497(0x206)](_0x24c774=>_0x24c774[_0x493497(0x212)]===_0x51d67e[_0x493497(0x212)]&&w(_0x24c774));if(!_0x3933f3||!((_0x822e52=_0x51d67e['resource'])!=null&&_0x822e52[_0x493497(0x214)][_0x51d67e[_0x493497(0x212)]]))return null;let _0x484aa5=E(_0x51d67e[_0x493497(0x1d4)]);return _0x484aa5[_0x493497(0x214)][_0x51d67e['rangeId']]=_0x5e88d9[_0x493497(0x261)](_0x51d67e[_0x493497(0x1ef)]),{'nextDocumentData':_0x215297,'nextResource':_0x484aa5,'cursorOffset':_0x3933f3[_0x493497(0x285)]+0x1};}function Be(_0x4cd673){const _0x64d2a9=_0x34c9f2;let _0x5ea050=_0x5e88d9['deepClone'](_0x4cd673[_0x64d2a9(0x2a7)]),_0x3afff3=Je(_0x5ea050,_0x4cd673[_0x64d2a9(0x212)],_0x4cd673[_0x64d2a9(0x282)]??'');if(_0x3afff3==null)return null;let _0x398717=E(_0x4cd673['resource']);return delete _0x398717[_0x64d2a9(0x214)][_0x4cd673['rangeId']],{'nextDocumentData':_0x5ea050,'nextResource':_0x398717,'cursorOffset':_0x3afff3};}function Ve(_0x4e3475,_0x10d93a){const _0x48aa78=_0x34c9f2;var _0x4e0665;let _0x300331=_0x5e88d9['deepClone'](_0x4e3475),_0x1b9d3f=_0x300331[_0x48aa78(0x2ab)];if(!_0x1b9d3f)return _0x300331;let _0x4e6966=new Map(_0x10d93a[_0x48aa78(0x26d)](_0x333848=>[_0x333848[_0x48aa78(0x212)],_0x333848[_0x48aa78(0x282)]])),_0x342f78=((_0x4e0665=_0x1b9d3f[_0x48aa78(0x2b7)])==null?void 0x0:_0x4e0665['filter'](_0x850d77=>w(_0x850d77)&&_0x4e6966[_0x48aa78(0x253)](_0x850d77[_0x48aa78(0x212)]))[_0x48aa78(0x26f)]((_0x1d5bba,_0x3fcda6)=>_0x3fcda6[_0x48aa78(0x25c)]-_0x1d5bba[_0x48aa78(0x25c)]))??[];for(let _0x35edd5 of _0x342f78)Je(_0x300331,_0x35edd5[_0x48aa78(0x212)],_0x4e6966[_0x48aa78(0x1ff)](_0x35edd5[_0x48aa78(0x212)])??'');return _0x300331;}function w(_0x7fc17e){const _0x3b9d05=_0x34c9f2;var _0x120ec7;return(_0x7fc17e==null?void 0x0:_0x7fc17e['rangeType'])===_0xe8be5b[_0x3b9d05(0x245)]&&_0x7fc17e[_0x3b9d05(0x28e)]===!0x0&&((_0x120ec7=_0x7fc17e[_0x3b9d05(0x233)])==null?void 0x0:_0x120ec7[_0x3b9d05(0x1e2)])===_0x3b9d05(0x25e);}function T(_0x32ea0d,_0x25a674){const _0x24a3b9=_0x34c9f2;var _0x208f0a;return _0x32ea0d==null||(_0x208f0a=_0x32ea0d[_0x24a3b9(0x2b7)])==null?void 0x0:_0x208f0a[_0x24a3b9(0x206)](_0x1e0af3=>_0x1e0af3[_0x24a3b9(0x212)]===_0x25a674&&w(_0x1e0af3));}function He(_0x49cfb3,_0x7620,_0x46e0a1){const _0x19928e=_0x34c9f2;if(_0x7620===_0x46e0a1){if(Le[_0x19928e(0x253)](_0x49cfb3['dataStream'][_0x7620]))throw new C();return;}for(let _0x10e200=_0x7620;_0x10e200<_0x46e0a1;_0x10e200++)if(_0x49cfb3['dataStream'][_0x10e200]===_0x1a4e6c['PARAGRAPH']||Le[_0x19928e(0x253)](_0x49cfb3[_0x19928e(0x1de)][_0x10e200]))throw new C();}function Ue(_0x21b2c2,_0x4c36dc){const _0x3ca4be=_0x34c9f2;return{'startIndex':_0x4c36dc,'endIndex':_0x4c36dc,'rangeId':_0x21b2c2,'rangeType':_0xe8be5b[_0x3ca4be(0x245)],'wholeEntity':!0x0,'properties':{'kind':Me}};}function E(_0x10e67e){const _0x5ed176=_0x34c9f2;return _0x10e67e?_0x5e88d9[_0x5ed176(0x261)](_0x10e67e):b();}function We(_0xf05af,_0xd903f0,_0x5a7f7e){const _0x288a45=_0x34c9f2;let _0x463342=Ke(_0xf05af),_0x25c77f=_0xd903f0??_0x463342,_0x51d137=_0x5a7f7e??_0x25c77f;return{'startOffset':Ge(Math['min'](_0x25c77f,_0x51d137),_0x463342),'endOffset':Ge(Math[_0x288a45(0x241)](_0x25c77f,_0x51d137),_0x463342)};}function Ge(_0x2b0f63,_0x33eaae){const _0x21bc12=_0x34c9f2;return Math[_0x21bc12(0x241)](0x0,Math[_0x21bc12(0x232)](_0x2b0f63,_0x33eaae));}function Ke(_0x4d72cc){const _0x133c96=_0x34c9f2;return _0x4d72cc[_0x133c96(0x1de)][_0x133c96(0x1ed)](''+_0x1a4e6c[_0x133c96(0x2b3)]+_0x1a4e6c[_0x133c96(0x26e)])?Math['max'](0x0,_0x4d72cc[_0x133c96(0x1de)][_0x133c96(0x2c1)]-0x2):_0x4d72cc[_0x133c96(0x1de)][_0x133c96(0x1ed)](_0x1a4e6c[_0x133c96(0x26e)])?Math['max'](0x0,_0x4d72cc[_0x133c96(0x1de)][_0x133c96(0x2c1)]-0x1):_0x4d72cc['dataStream'][_0x133c96(0x2c1)];}function qe(_0x599212,_0xbeefc4,_0x19a7de,_0x598c4f){_0x19a7de>_0xbeefc4&&Xe(_0x599212,_0xbeefc4,_0x19a7de),Ye(_0x599212,_0xbeefc4,_0x598c4f);}function Je(_0x3875c9,_0x4bfec1,_0x359174){const _0x209b98=_0x34c9f2;var _0x25be50,_0x27c44c;let _0x3c3f09=j(_0x3875c9),_0xf6b51b=(_0x25be50=_0x3c3f09[_0x209b98(0x2b7)])==null?void 0x0:_0x25be50[_0x209b98(0x206)](_0x185825=>_0x185825[_0x209b98(0x212)]===_0x4bfec1&&w(_0x185825));if(!_0xf6b51b)return null;let _0x4f65d0=_0x3c5aee(_0xf6b51b);return qe(_0x3c3f09,_0x4f65d0[_0x209b98(0x262)],_0x4f65d0[_0x209b98(0x251)],_0x359174),_0x3c3f09[_0x209b98(0x2b7)]=(_0x27c44c=_0x3c3f09[_0x209b98(0x2b7)])==null?void 0x0:_0x27c44c[_0x209b98(0x229)](_0x366a58=>_0x366a58[_0x209b98(0x212)]!==_0x4bfec1),_0x4f65d0['startOffset']+_0x359174[_0x209b98(0x2c1)];}function Ye(_0x3093d3,_0x424786,_0x2df869){const _0x5f4dd0=_0x34c9f2;_0x2df869&&(_0x3093d3[_0x5f4dd0(0x1de)]=''+_0x3093d3['dataStream']['slice'](0x0,_0x424786)+_0x2df869+_0x3093d3[_0x5f4dd0(0x1de)][_0x5f4dd0(0x23c)](_0x424786),Ze(_0x3093d3,_0x424786,_0x2df869['length']));}function Xe(_0x765c62,_0x524822,_0x3366d1){const _0x21f5fb=_0x34c9f2;let _0x5bddea=_0x3366d1-_0x524822;_0x765c62['dataStream']=''+_0x765c62[_0x21f5fb(0x1de)]['slice'](0x0,_0x524822)+_0x765c62[_0x21f5fb(0x1de)][_0x21f5fb(0x23c)](_0x3366d1),Qe(_0x765c62,_0x524822,_0x5bddea);}function Ze(_0x406e40,_0x58b2c1,_0x3cc0af){const _0x18c5eb=_0x34c9f2;_0x406e40['paragraphs']=D(_0x406e40[_0x18c5eb(0x27f)],_0x58b2c1,_0x3cc0af),_0x406e40[_0x18c5eb(0x23e)]=D(_0x406e40[_0x18c5eb(0x23e)],_0x58b2c1,_0x3cc0af),_0x406e40[_0x18c5eb(0x27d)]=D(_0x406e40['customBlocks'],_0x58b2c1,_0x3cc0af),_0x406e40[_0x18c5eb(0x20b)]=$e(_0x406e40[_0x18c5eb(0x20b)],_0x58b2c1,_0x3cc0af),_0x406e40[_0x18c5eb(0x221)]=et(_0x406e40[_0x18c5eb(0x221)],_0x58b2c1,_0x3cc0af),_0x406e40['columnGroups']=k(_0x406e40[_0x18c5eb(0x246)],_0x58b2c1,_0x3cc0af),_0x406e40[_0x18c5eb(0x2b7)]=k(_0x406e40[_0x18c5eb(0x2b7)],_0x58b2c1,_0x3cc0af),_0x406e40['customDecorations']=k(_0x406e40[_0x18c5eb(0x2ac)],_0x58b2c1,_0x3cc0af),_0x406e40[_0x18c5eb(0x20c)]=k(_0x406e40[_0x18c5eb(0x20c)],_0x58b2c1,_0x3cc0af);}function Qe(_0x538499,_0x443f2f,_0x2a98e2){const _0x2c1b57=_0x34c9f2;var _0x4456a5,_0x560fd2;_0x538499[_0x2c1b57(0x27f)]=O(_0x538499['paragraphs'],_0x443f2f,_0x2a98e2),_0x538499[_0x2c1b57(0x23e)]=O(_0x538499['sectionBreaks'],_0x443f2f,_0x2a98e2),_0x538499[_0x2c1b57(0x27d)]=O(_0x538499[_0x2c1b57(0x27d)],_0x443f2f,_0x2a98e2),_0x538499[_0x2c1b57(0x20b)]=(_0x4456a5=tt((_0x560fd2=_0x538499[_0x2c1b57(0x20b)])==null?void 0x0:_0x560fd2[_0x2c1b57(0x26d)](_0xbdc334=>({..._0xbdc334,'startIndex':_0xbdc334['st'],'endIndex':_0xbdc334['ed']})),_0x443f2f,_0x2a98e2))==null?void 0x0:_0x4456a5['map'](_0x49762b=>{let {startIndex:_0x44cd3f,endIndex:_0x30d028,..._0x4f1961}=_0x49762b;return{..._0x4f1961,'st':_0x44cd3f,'ed':_0x30d028};}),_0x538499[_0x2c1b57(0x221)]=tt(_0x538499[_0x2c1b57(0x221)],_0x443f2f,_0x2a98e2),_0x538499['columnGroups']=A(_0x538499[_0x2c1b57(0x246)],_0x443f2f,_0x2a98e2),_0x538499[_0x2c1b57(0x2b7)]=A(_0x538499[_0x2c1b57(0x2b7)],_0x443f2f,_0x2a98e2),_0x538499['customDecorations']=A(_0x538499[_0x2c1b57(0x2ac)],_0x443f2f,_0x2a98e2),_0x538499[_0x2c1b57(0x20c)]=A(_0x538499['blockRanges'],_0x443f2f,_0x2a98e2);}function D(_0x3880f9,_0xc03d8e,_0x924146){const _0x4c7631=_0x34c9f2;return _0x3880f9==null?void 0x0:_0x3880f9[_0x4c7631(0x26d)](_0x5a25fc=>_0x5a25fc[_0x4c7631(0x25c)]>=_0xc03d8e?{..._0x5a25fc,'startIndex':_0x5a25fc[_0x4c7631(0x25c)]+_0x924146}:_0x5a25fc);}function O(_0x2b6001,_0x21b2c4,_0x545c3e){const _0x4ab09b=_0x34c9f2;let _0x52bdac=_0x21b2c4+_0x545c3e;return _0x2b6001==null?void 0x0:_0x2b6001[_0x4ab09b(0x26d)](_0x4352b4=>_0x4352b4[_0x4ab09b(0x25c)]>=_0x21b2c4&&_0x4352b4[_0x4ab09b(0x25c)]<_0x52bdac?null:_0x4352b4['startIndex']>=_0x52bdac?{..._0x4352b4,'startIndex':_0x4352b4['startIndex']-_0x545c3e}:_0x4352b4)[_0x4ab09b(0x229)](_0x1a459c=>_0x1a459c!=null);}function $e(_0x4b1b10,_0x16fd65,_0x1511a0){return _0x4b1b10==null?void 0x0:_0x4b1b10['map'](_0x25846d=>_0x25846d['st']>=_0x16fd65?{..._0x25846d,'st':_0x25846d['st']+_0x1511a0,'ed':_0x25846d['ed']+_0x1511a0}:_0x25846d['ed']>_0x16fd65?{..._0x25846d,'ed':_0x25846d['ed']+_0x1511a0}:_0x25846d);}function _0x9a42(_0xf4c610,_0x5919e4){_0xf4c610=_0xf4c610-0x1ce;const _0x35eef1=_0x35ee();let _0x9a4267=_0x35eef1[_0xf4c610];return _0x9a4267;}function k(_0x4a56f3,_0x35e381,_0x4ee161){const _0x3f295a=_0x34c9f2;return _0x4a56f3==null?void 0x0:_0x4a56f3[_0x3f295a(0x26d)](_0x2dc9cf=>_0x2a05e1(_0x2dc9cf,_0x35e381,_0x4ee161));}function et(_0x291657,_0x26c671,_0x1402e7){const _0xc8b6ff=_0x34c9f2;return _0x291657==null?void 0x0:_0x291657[_0xc8b6ff(0x26d)](_0x9112c2=>_0x5e2c6d(_0x9112c2,_0x26c671,_0x1402e7));}function A(_0x528756,_0x4bc962,_0x46dbd2){return _0x528756==null?void 0x0:_0x528756['map'](_0x3c7cdb=>_0x16ca5b(_0x3c7cdb,_0x4bc962,_0x46dbd2))['filter'](_0xb02150=>_0xb02150!=null);}function tt(_0x2ab2ca,_0x1fe1ac,_0x3888da){const _0x34a89a=_0x34c9f2;return _0x2ab2ca==null?void 0x0:_0x2ab2ca[_0x34a89a(0x26d)](_0x58df2a=>_0x4483d1(_0x58df2a,_0x1fe1ac,_0x3888da))[_0x34a89a(0x229)](_0x33d38a=>_0x33d38a!=null);}function j(_0xb4cdcd){const _0x43acd3=_0x34c9f2;if(!_0xb4cdcd[_0x43acd3(0x2ab)])throw Error(_0x43acd3(0x1d7));return _0xb4cdcd[_0x43acd3(0x2ab)];}function M(_0x279f26){'@babel/helpers - typeof';const _0x4831a8=_0x34c9f2;return M=typeof Symbol=='function'&&typeof Symbol[_0x4831a8(0x20e)]==_0x4831a8(0x200)?function(_0x16fce7){return typeof _0x16fce7;}:function(_0x1f3b53){const _0x389e86=_0x4831a8;return _0x1f3b53&&typeof Symbol=='function'&&_0x1f3b53['constructor']===Symbol&&_0x1f3b53!==Symbol[_0x389e86(0x28a)]?'symbol':typeof _0x1f3b53;},M(_0x279f26);}function nt(_0x1f7a0c,_0x75a7e){const _0x44e143=_0x34c9f2;if(M(_0x1f7a0c)!='object'||!_0x1f7a0c)return _0x1f7a0c;var _0x3f359d=_0x1f7a0c[Symbol[_0x44e143(0x21d)]];if(_0x3f359d!==void 0x0){var _0x3cae03=_0x3f359d['call'](_0x1f7a0c,_0x75a7e||_0x44e143(0x25b));if(M(_0x3cae03)!='object')return _0x3cae03;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x75a7e==='string'?String:Number)(_0x1f7a0c);}function rt(_0xfc529a){const _0x3f4ac7=_0x34c9f2;var _0x47906b=nt(_0xfc529a,'string');return M(_0x47906b)==_0x3f4ac7(0x200)?_0x47906b:_0x47906b+'';}function N(_0x116ce8,_0x552aa6,_0x269d6a){const _0x25dcb4=_0x34c9f2;return(_0x552aa6=rt(_0x552aa6))in _0x116ce8?Object[_0x25dcb4(0x207)](_0x116ce8,_0x552aa6,{'value':_0x269d6a,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x116ce8[_0x552aa6]=_0x269d6a,_0x116ce8;}var P=class extends _0x49a82f{constructor(..._0x29f506){const _0x228f14=_0x34c9f2;super(..._0x29f506),N(this,_0x228f14(0x24f),new Map()),N(this,_0x228f14(0x21e),new Map()),N(this,_0x228f14(0x2b5),new Map()),N(this,_0x228f14(0x204),new _0x2c9ea2()),N(this,_0x228f14(0x2ba),this[_0x228f14(0x204)]['asObservable']());}[_0x34c9f2(0x2a3)](_0x50e9d3,_0x53287c){const _0x3159e5=_0x34c9f2;var _0xf98001;let _0x2d30b5=(_0xf98001=this[_0x3159e5(0x24f)][_0x3159e5(0x1ff)](_0x50e9d3))==null?void 0x0:_0xf98001[_0x3159e5(0x214)][_0x53287c];return _0x2d30b5?_0x5e88d9[_0x3159e5(0x261)](_0x2d30b5):void 0x0;}['getFormulas'](_0x357214){const _0x22ec8b=_0x34c9f2;var _0x234184;return _0x5e88d9['deepClone'](((_0x234184=this[_0x22ec8b(0x24f)][_0x22ec8b(0x1ff)](_0x357214))==null?void 0x0:_0x234184['formulas'])??{});}['getResource'](_0x116e08){const _0x2cd050=_0x34c9f2;let _0x250eb8=this[_0x2cd050(0x24f)][_0x2cd050(0x1ff)](_0x116e08);return _0x250eb8?_0x5e88d9[_0x2cd050(0x261)](_0x250eb8):void 0x0;}[_0x34c9f2(0x26a)](_0x5d376c,_0x3fd416,_0x16a52a){const _0x39a52d=_0x34c9f2;return this[_0x39a52d(0x28f)](_0x5d376c,{[_0x3fd416]:_0x16a52a});}[_0x34c9f2(0x295)](_0x1256be,_0x3274c0){const _0x16c6e4=_0x34c9f2;return this[_0x16c6e4(0x2b5)][_0x16c6e4(0x253)](_0x1256be)||!x(_0x3274c0)?!0x1:(this[_0x16c6e4(0x24f)][_0x16c6e4(0x252)](_0x1256be,_0x5e88d9[_0x16c6e4(0x261)](_0x3274c0)),this[_0x16c6e4(0x204)][_0x16c6e4(0x22b)]({'unitId':_0x1256be}),!0x0);}[_0x34c9f2(0x28f)](_0x2f985c,_0x2da324){const _0x257fb4=_0x34c9f2;if(this[_0x257fb4(0x2b5)]['has'](_0x2f985c)||!Object[_0x257fb4(0x24a)](_0x2da324)[_0x257fb4(0x2c1)]||!x({'schemaVersion':0x1,'formulas':_0x2da324}))return!0x1;let _0x20c10a=this[_0x257fb4(0x24f)][_0x257fb4(0x1ff)](_0x2f985c)??b(),_0x355138=_0x5e88d9[_0x257fb4(0x261)](_0x20c10a);return Object['assign'](_0x355138[_0x257fb4(0x214)],_0x5e88d9[_0x257fb4(0x261)](_0x2da324)),this[_0x257fb4(0x24f)][_0x257fb4(0x252)](_0x2f985c,_0x355138),this[_0x257fb4(0x204)][_0x257fb4(0x22b)]({'unitId':_0x2f985c,'rangeIds':Object[_0x257fb4(0x24a)](_0x2da324)}),!0x0;}[_0x34c9f2(0x21a)](_0x5bbdcd,_0x2443ee){const _0x1ff973=_0x34c9f2;if(this[_0x1ff973(0x2b5)][_0x1ff973(0x253)](_0x5bbdcd))return!0x1;let _0x7ca67=this[_0x1ff973(0x24f)][_0x1ff973(0x1ff)](_0x5bbdcd);if(!(_0x7ca67!=null&&_0x7ca67[_0x1ff973(0x214)][_0x2443ee]))return!0x1;let _0x996ad4=_0x5e88d9[_0x1ff973(0x261)](_0x7ca67);return delete _0x996ad4[_0x1ff973(0x214)][_0x2443ee],this[_0x1ff973(0x24f)]['set'](_0x5bbdcd,_0x996ad4),this[_0x1ff973(0x204)][_0x1ff973(0x22b)]({'unitId':_0x5bbdcd,'rangeIds':[_0x2443ee]}),!0x0;}['load'](_0x5074d3,_0x7d6a95){const _0x438ab1=_0x34c9f2;return _0x7d6a95&&typeof _0x7d6a95==_0x438ab1(0x224)&&_0x438ab1(0x1f8)in _0x7d6a95&&_0x7d6a95[_0x438ab1(0x1f8)]!==0x1?(this['_preserveInvalid'](_0x5074d3,_0x7d6a95,_0x438ab1(0x243)),!0x1):x(_0x7d6a95)?(this[_0x438ab1(0x24f)][_0x438ab1(0x252)](_0x5074d3,_0x5e88d9[_0x438ab1(0x261)](_0x7d6a95)),this[_0x438ab1(0x21e)][_0x438ab1(0x287)](_0x5074d3),this[_0x438ab1(0x2b5)][_0x438ab1(0x287)](_0x5074d3),this[_0x438ab1(0x204)][_0x438ab1(0x22b)]({'unitId':_0x5074d3}),!0x0):(this[_0x438ab1(0x24d)](_0x5074d3,_0x7d6a95,_0x438ab1(0x273)),!0x1);}[_0x34c9f2(0x27e)](_0x4640ac){const _0x3f3a59=_0x34c9f2;let _0x586efa=this[_0x3f3a59(0x24f)][_0x3f3a59(0x1ff)](_0x4640ac);return _0x586efa?_0x5e88d9[_0x3f3a59(0x261)](_0x586efa):this[_0x3f3a59(0x21e)][_0x3f3a59(0x253)](_0x4640ac)?_0x5e88d9[_0x3f3a59(0x261)](this[_0x3f3a59(0x21e)][_0x3f3a59(0x1ff)](_0x4640ac)):b();}[_0x34c9f2(0x1d3)](_0x1a6678){const _0x54e3ed=_0x34c9f2;return this[_0x54e3ed(0x2b5)][_0x54e3ed(0x1ff)](_0x1a6678);}[_0x34c9f2(0x2c3)](_0x5f5217){const _0x6793e8=_0x34c9f2;this[_0x6793e8(0x24f)][_0x6793e8(0x287)](_0x5f5217),this[_0x6793e8(0x21e)][_0x6793e8(0x287)](_0x5f5217),this[_0x6793e8(0x2b5)][_0x6793e8(0x287)](_0x5f5217),this['_change$'][_0x6793e8(0x22b)]({'unitId':_0x5f5217});}[_0x34c9f2(0x1d1)](){const _0x5a2c84=_0x34c9f2;this[_0x5a2c84(0x24f)]['clear'](),this['_rawResources'][_0x5a2c84(0x26c)](),this[_0x5a2c84(0x2b5)][_0x5a2c84(0x26c)](),this[_0x5a2c84(0x204)][_0x5a2c84(0x294)](),super[_0x5a2c84(0x1d1)]();}[_0x34c9f2(0x24d)](_0x417c16,_0x188661,_0x5c1ce4){const _0x56b595=_0x34c9f2;this[_0x56b595(0x24f)][_0x56b595(0x287)](_0x417c16),this[_0x56b595(0x21e)][_0x56b595(0x252)](_0x417c16,_0x5e88d9['deepClone'](_0x188661)),this[_0x56b595(0x2b5)]['set'](_0x417c16,_0x5c1ce4),this[_0x56b595(0x204)]['next']({'unitId':_0x417c16});}};let it=function(_0x457909){const _0x55caeb=_0x34c9f2;return _0x457909[_0x55caeb(0x21c)]='empty',_0x457909['PENDING']='pending',_0x457909['SUCCESS']=_0x55caeb(0x217),_0x457909[_0x55caeb(0x250)]=_0x55caeb(0x2c7),_0x457909;}({});function F(_0x3b4f2f,_0x218320){return function(_0x52f7ca,_0x5ee1eb){_0x218320(_0x52f7ca,_0x5ee1eb,_0x3b4f2f);};}function I(_0x7110f2,_0x273d5e,_0x5cc3cf,_0x2688f9){const _0x2829c9=_0x34c9f2;var _0x387439=arguments[_0x2829c9(0x2c1)],_0x5d4902=_0x387439<0x3?_0x273d5e:_0x2688f9===null?_0x2688f9=Object[_0x2829c9(0x1ce)](_0x273d5e,_0x5cc3cf):_0x2688f9,_0x573103;if(typeof Reflect==_0x2829c9(0x224)&&typeof Reflect[_0x2829c9(0x2c4)]=='function')_0x5d4902=Reflect[_0x2829c9(0x2c4)](_0x7110f2,_0x273d5e,_0x5cc3cf,_0x2688f9);else{for(var _0x3c9bb5=_0x7110f2['length']-0x1;_0x3c9bb5>=0x0;_0x3c9bb5--)(_0x573103=_0x7110f2[_0x3c9bb5])&&(_0x5d4902=(_0x387439<0x3?_0x573103(_0x5d4902):_0x387439>0x3?_0x573103(_0x273d5e,_0x5cc3cf,_0x5d4902):_0x573103(_0x273d5e,_0x5cc3cf))||_0x5d4902);}return _0x387439>0x3&&_0x5d4902&&Object[_0x2829c9(0x207)](_0x273d5e,_0x5cc3cf,_0x5d4902),_0x5d4902;}let L=class extends _0x49a82f{constructor(_0x1d9b31,_0x81eb5c,_0x141e68){const _0x580bbf=_0x34c9f2;super(),this['_model']=_0x1d9b31,this[_0x580bbf(0x27b)]=_0x81eb5c,this[_0x580bbf(0x23f)]=_0x141e68,N(this,_0x580bbf(0x1df),new Map()),N(this,_0x580bbf(0x1e9),new Map()),N(this,'_presentationChanged$',new _0x2c9ea2()),N(this,_0x580bbf(0x268),this[_0x580bbf(0x280)][_0x580bbf(0x2b2)]()),this[_0x580bbf(0x249)](this[_0x580bbf(0x27b)][_0x580bbf(0x2bc)][_0x580bbf(0x283)](_0x2743d1=>{const _0x31b610=_0x580bbf;for(let _0x29004a of Object['values'](_0x2743d1))for(let _0x11f271 of Object[_0x31b610(0x2a5)](_0x29004a))_0x11f271['forEach'](_0x38e2d7=>this[_0x31b610(0x1f1)](_0x38e2d7));}));}[_0x34c9f2(0x234)](_0x513a3e){const _0x37c924=_0x34c9f2;var _0x315ae8;let _0x598a60=_0x513a3e[_0x37c924(0x1f2)](),_0x4e3b9e=((_0x315ae8=_0x513a3e[_0x37c924(0x281)]()[_0x37c924(0x2ab)])==null||(_0x315ae8=_0x315ae8[_0x37c924(0x2b7)])==null?void 0x0:_0x315ae8[_0x37c924(0x229)](w))??[],_0x4aa1c2=this['_model'][_0x37c924(0x22e)](_0x598a60),_0x1626ff=new Set();for(let _0x34e59b of _0x4e3b9e){let _0x5a729c=_0x4aa1c2[_0x34e59b[_0x37c924(0x212)]];_0x5a729c&&(_0x1626ff[_0x37c924(0x21b)](R(_0x598a60,_0x34e59b['rangeId'])),this[_0x37c924(0x2a4)]({'unitId':_0x598a60,'rangeId':_0x34e59b[_0x37c924(0x212)]},_0x5a729c));}for(let _0x191d4e of Array[_0x37c924(0x1f4)](this['_registrations'][_0x37c924(0x2a5)]()))_0x191d4e['unitId']===_0x598a60&&!_0x1626ff[_0x37c924(0x253)](R(_0x191d4e['unitId'],_0x191d4e['rangeId']))&&this['unregister'](_0x191d4e);}[_0x34c9f2(0x2a4)](_0x3033f3,_0x1f544b){const _0xdc32c8=_0x34c9f2;let _0x5e8dbe=R(_0x3033f3['unitId'],_0x3033f3[_0xdc32c8(0x212)]),_0x22485b=this[_0xdc32c8(0x1df)][_0xdc32c8(0x1ff)](_0x5e8dbe),_0x57bae9=this[_0xdc32c8(0x23f)][_0xdc32c8(0x277)](_0x3033f3['unitId']);if(_0x22485b&&_0x22485b['config'][_0xdc32c8(0x20f)]===_0x1f544b[_0xdc32c8(0x20f)]&&_0x22485b[_0xdc32c8(0x2bd)]===_0x57bae9){_0x22485b[_0xdc32c8(0x1ef)]=_0x1f544b;let _0x66b01a=_0x22485b['formulaId']?this[_0xdc32c8(0x27b)][_0xdc32c8(0x263)](_0x22485b[_0xdc32c8(0x24b)],_0x22485b[_0xdc32c8(0x24b)],_0x22485b[_0xdc32c8(0x20a)])??void 0x0:void 0x0;_0x22485b[_0xdc32c8(0x2a1)]=_0x66b01a,this[_0xdc32c8(0x254)](_0x5e8dbe,z(_0x1f544b,_0x66b01a));return;}_0x22485b!=null&&_0x22485b[_0xdc32c8(0x20a)]&&this[_0xdc32c8(0x1eb)](_0x22485b);let _0x2ee832={..._0x3033f3,'config':_0x1f544b,'referenceRevision':_0x57bae9,'presentation':z(_0x1f544b,void 0x0)};if(this['_registrations']['set'](_0x5e8dbe,_0x2ee832),!_0x1f544b['formula'][_0xdc32c8(0x27c)]())return;let _0x5a8fbf=this[_0xdc32c8(0x27b)]['registerFormulaWithRange'](_0x3033f3[_0xdc32c8(0x24b)],_0x3033f3[_0xdc32c8(0x24b)],_0x1f544b[_0xdc32c8(0x20f)],void 0x0,{'rangeId':_0x3033f3[_0xdc32c8(0x212)]},_0x20565b[_0xdc32c8(0x239)],_0x3033f3[_0xdc32c8(0x212)]);_0x2ee832[_0xdc32c8(0x20a)]=_0x5a8fbf,this[_0xdc32c8(0x1e9)][_0xdc32c8(0x252)](_0x5a8fbf,_0x5e8dbe);}[_0x34c9f2(0x270)](_0x226e95){const _0x2c27c9=_0x34c9f2;let _0x327668=R(_0x226e95[_0x2c27c9(0x24b)],_0x226e95['rangeId']),_0x3648db=this[_0x2c27c9(0x1df)][_0x2c27c9(0x1ff)](_0x327668);_0x3648db&&(this[_0x2c27c9(0x1eb)](_0x3648db),this[_0x2c27c9(0x1df)][_0x2c27c9(0x287)](_0x327668));}[_0x34c9f2(0x28c)](_0x39c1f2){const _0x14ccf3=_0x34c9f2;for(let _0x19bbe8 of Array[_0x14ccf3(0x1f4)](this[_0x14ccf3(0x1df)]['values']()))_0x19bbe8[_0x14ccf3(0x24b)]===_0x39c1f2&&this[_0x14ccf3(0x270)](_0x19bbe8);}[_0x34c9f2(0x1cf)](_0x2ef0aa){const _0x522896=_0x34c9f2;var _0x1763c0;return(_0x1763c0=this[_0x522896(0x1df)]['get'](R(_0x2ef0aa[_0x522896(0x24b)],_0x2ef0aa['rangeId'])))==null?void 0x0:_0x1763c0[_0x522896(0x29f)];}[_0x34c9f2(0x25a)](_0x1250b3){const _0x52a6d4=_0x34c9f2;let _0x4d246b=this[_0x52a6d4(0x1df)]['get'](R(_0x1250b3['unitId'],_0x1250b3[_0x52a6d4(0x212)]));return _0x4d246b?B(_0x4d246b):void 0x0;}[_0x34c9f2(0x209)](){const _0x33b7a4=_0x34c9f2;return Array[_0x33b7a4(0x1f4)](this[_0x33b7a4(0x1df)][_0x33b7a4(0x2a5)](),_0x5ec8e7=>({'identity':{'unitId':_0x5ec8e7[_0x33b7a4(0x24b)],'rangeId':_0x5ec8e7[_0x33b7a4(0x212)]},'config':_0x5ec8e7[_0x33b7a4(0x1ef)],'referenceRevision':_0x5ec8e7[_0x33b7a4(0x2bd)],..._0x5ec8e7[_0x33b7a4(0x2a1)]?{'liveResult':_0x5ec8e7[_0x33b7a4(0x2a1)]}:null}));}['dispose'](){const _0x494455=_0x34c9f2;for(let _0x5d7551 of this['_registrations'][_0x494455(0x2a5)]())this[_0x494455(0x1eb)](_0x5d7551);this[_0x494455(0x1df)][_0x494455(0x26c)](),this['_formulaKeys']['clear'](),this[_0x494455(0x280)]['complete'](),super[_0x494455(0x1d1)]();}[_0x34c9f2(0x1f1)](_0x425333){const _0x2f3376=_0x34c9f2;let _0x15d9d9=this[_0x2f3376(0x1e9)]['get'](_0x425333[_0x2f3376(0x20a)]),_0xf2fed=_0x15d9d9?this['_registrations'][_0x2f3376(0x1ff)](_0x15d9d9):void 0x0;_0x15d9d9&&_0xf2fed&&(_0xf2fed[_0x2f3376(0x2a1)]=_0x425333,this['_setPresentation'](_0x15d9d9,z(_0xf2fed[_0x2f3376(0x1ef)],_0x425333)));}['_setPresentation'](_0x1cef04,_0x4ea0ba){const _0x1be4bd=_0x34c9f2;var _0x3de0be,_0x5768b2;let _0x339c05=this[_0x1be4bd(0x1df)]['get'](_0x1cef04);if(!_0x339c05||at(_0x339c05[_0x1be4bd(0x29f)],_0x4ea0ba))return;let _0x256739=_0x339c05['presentation'],_0x1b7389=B(_0x339c05);_0x339c05[_0x1be4bd(0x29f)]=_0x4ea0ba,this[_0x1be4bd(0x280)][_0x1be4bd(0x22b)]({'unitId':_0x339c05[_0x1be4bd(0x24b)],'rangeId':_0x339c05[_0x1be4bd(0x212)],'presentation':_0x4ea0ba,'previousPresentation':_0x256739,'result':B(_0x339c05),'previousResult':{..._0x1b7389,..._0x256739,'value':(_0x3de0be=_0x256739[_0x1be4bd(0x236)])==null?void 0x0:_0x3de0be['v'],'valueType':((_0x5768b2=_0x256739[_0x1be4bd(0x236)])==null?void 0x0:_0x5768b2['t'])??void 0x0}});}[_0x34c9f2(0x1eb)](_0x3a2f98){const _0x1a4077=_0x34c9f2;_0x3a2f98['formulaId']&&(this['_registrationService']['deleteFormula'](_0x3a2f98[_0x1a4077(0x24b)],_0x3a2f98['unitId'],[_0x3a2f98['formulaId']]),this[_0x1a4077(0x1e9)][_0x1a4077(0x287)](_0x3a2f98['formulaId']));}};L=I([F(0x0,_0x5c5393(P)),F(0x1,_0x5c5393(_0x2bd31f)),F(0x2,_0x5c5393(_0x598fe))],L);function R(_0x53e74d,_0x16d5d2){return _0x53e74d+'\x00'+_0x16d5d2;}function z(_0x4781b1,_0x476ead){const _0x3ae270=_0x34c9f2;return _0x44276e({'numberFormat':_0x4781b1['numberFormat'],'lastValue':_0x4781b1[_0x3ae270(0x21f)],'result':_0x476ead});}function B(_0x15b0c7){const _0x29c9b9=_0x34c9f2;var _0x566370,_0x471e10,_0x4139fb;let _0x31532b=_0x15b0c7['presentation'],_0x3ed5b6=_0x15b0c7[_0x29c9b9(0x1ef)]['formula']['trim']()?_0x31532b[_0x29c9b9(0x1fd)]||_0x31532b[_0x29c9b9(0x236)]==null?_0x29c9b9(0x2b1):((_0x566370=_0x15b0c7[_0x29c9b9(0x2a1)])==null?void 0x0:_0x566370[_0x29c9b9(0x216)])===_0x51281a['ERROR']?_0x29c9b9(0x2c7):_0x29c9b9(0x217):_0x29c9b9(0x2bf);return{..._0x31532b,'status':_0x3ed5b6,'value':(_0x471e10=_0x31532b['cell'])==null?void 0x0:_0x471e10['v'],'valueType':((_0x4139fb=_0x31532b['cell'])==null?void 0x0:_0x4139fb['t'])??void 0x0};}function at(_0x336c71,_0x1abc89){const _0x2b0358=_0x34c9f2;var _0x2089c1,_0x5f0168,_0x28bf52,_0xaf302a;return _0x336c71[_0x2b0358(0x282)]===_0x1abc89[_0x2b0358(0x282)]&&_0x336c71[_0x2b0358(0x231)]===_0x1abc89[_0x2b0358(0x231)]&&_0x336c71['pattern']===_0x1abc89[_0x2b0358(0x244)]&&_0x336c71[_0x2b0358(0x218)]===_0x1abc89['source']&&_0x336c71[_0x2b0358(0x1fd)]===_0x1abc89[_0x2b0358(0x1fd)]&&((_0x2089c1=_0x336c71[_0x2b0358(0x236)])==null?void 0x0:_0x2089c1['t'])===((_0x5f0168=_0x1abc89[_0x2b0358(0x236)])==null?void 0x0:_0x5f0168['t'])&&Object['is']((_0x28bf52=_0x336c71[_0x2b0358(0x236)])==null?void 0x0:_0x28bf52['v'],(_0xaf302a=_0x1abc89[_0x2b0358(0x236)])==null?void 0x0:_0xaf302a['v']);}const ot={'id':_0x34c9f2(0x203),'type':_0x3d8c4d[_0x34c9f2(0x2b6)],'handler':(_0x3c4786,_0x3e7cd0)=>!(_0x3e7cd0!=null&&_0x3e7cd0['unitId'])||!_0x3e7cd0[_0x34c9f2(0x212)]||!_0x3e7cd0[_0x34c9f2(0x1ef)]?!0x1:_0x3c4786['get'](P)['setFormula'](_0x3e7cd0[_0x34c9f2(0x24b)],_0x3e7cd0[_0x34c9f2(0x212)],_0x3e7cd0[_0x34c9f2(0x1ef)])},st={'id':_0x34c9f2(0x2be),'type':_0x3d8c4d[_0x34c9f2(0x2b6)],'handler':(_0x51b61e,_0x36e172)=>!(_0x36e172!=null&&_0x36e172[_0x34c9f2(0x24b)])||!_0x36e172[_0x34c9f2(0x212)]?!0x1:_0x51b61e[_0x34c9f2(0x1ff)](P)[_0x34c9f2(0x21a)](_0x36e172['unitId'],_0x36e172[_0x34c9f2(0x212)])},V={'id':_0x34c9f2(0x2c6),'type':_0x3d8c4d[_0x34c9f2(0x2b6)],'handler':(_0x420b11,_0x40f4a1)=>!(_0x40f4a1!=null&&_0x40f4a1['unitId'])||!_0x40f4a1['resource']?!0x1:_0x420b11[_0x34c9f2(0x1ff)](P)['setResource'](_0x40f4a1[_0x34c9f2(0x24b)],_0x40f4a1[_0x34c9f2(0x1d4)])},H={'id':_0x34c9f2(0x291),'type':_0x3d8c4d['MUTATION'],'handler':(_0x113afa,_0x305bbe)=>{const _0x24c86d=_0x34c9f2;if(!(_0x305bbe!=null&&_0x305bbe['unitId'])||!_0x305bbe[_0x24c86d(0x276)][_0x24c86d(0x2c1)])return!0x1;let _0x56dbcc=_0x113afa['get'](P),_0x10ea08=_0x113afa[_0x24c86d(0x1ff)](_0x598fe),_0x254226=_0x56dbcc[_0x24c86d(0x284)](_0x305bbe[_0x24c86d(0x24b)]);if(!_0x254226)return!0x1;let _0x546e80=_0x5e88d9[_0x24c86d(0x261)](_0x254226),_0x550af7=!0x1;for(let _0x3f6fb8 of _0x305bbe[_0x24c86d(0x276)]){var _0x39b2be,_0x2538fa,_0x36f142,_0x360341;let _0x14614a=_0x546e80[_0x24c86d(0x214)][_0x3f6fb8['rangeId']];_0x14614a&&_0x14614a[_0x24c86d(0x20f)]===_0x3f6fb8['expectedFormula']&&((_0x39b2be=_0x14614a[_0x24c86d(0x271)])==null?void 0x0:_0x39b2be[_0x24c86d(0x244)])===_0x3f6fb8['expectedNumberFormat']&&_0x10ea08[_0x24c86d(0x277)](_0x305bbe[_0x24c86d(0x24b)])===_0x3f6fb8['expectedReferenceRevision']&&(((_0x2538fa=_0x14614a[_0x24c86d(0x21f)])==null?void 0x0:_0x2538fa['v'])!==_0x3f6fb8[_0x24c86d(0x21f)]['v']||((_0x36f142=_0x14614a[_0x24c86d(0x21f)])==null?void 0x0:_0x36f142['t'])!==_0x3f6fb8[_0x24c86d(0x21f)]['t']||((_0x360341=_0x14614a['lastValue'])==null?void 0x0:_0x360341[_0x24c86d(0x244)])!==_0x3f6fb8[_0x24c86d(0x21f)][_0x24c86d(0x244)])&&(_0x14614a['lastValue']=_0x5e88d9[_0x24c86d(0x261)](_0x3f6fb8[_0x24c86d(0x21f)]),_0x550af7=!0x0);}return!_0x550af7||_0x56dbcc[_0x24c86d(0x295)](_0x305bbe[_0x24c86d(0x24b)],_0x546e80);}},U={'id':_0x34c9f2(0x1fb),'type':_0x3d8c4d['COMMAND'],'handler':(_0x17e9eb,_0x54120e)=>{const _0x51e4d9=_0x34c9f2;if(!(_0x54120e!=null&&_0x54120e[_0x51e4d9(0x20f)]['trim']()))return!0x1;let _0x41b37a=q(_0x17e9eb,_0x54120e[_0x51e4d9(0x24b)],'');if(!_0x41b37a)return!0x1;let _0x4395b7=ft(_0x54120e[_0x51e4d9(0x255)],_0x41b37a[_0x51e4d9(0x2ab)],dt(_0x17e9eb,_0x41b37a[_0x51e4d9(0x24b)]));if(!_0x4395b7)return!0x1;let _0x570138=pt(_0x17e9eb,_0x41b37a['unitId'],_0x54120e['formula'],_0x54120e[_0x51e4d9(0x223)]??[]);if(!_0x570138)return!0x1;let _0x51f5d7=mt(_0x41b37a[_0x51e4d9(0x2ab)],_0x41b37a[_0x51e4d9(0x22c)],_0x41b37a['unitId']),_0x52ed4f=ht({'documentData':_0x41b37a['documentData'],'resource':_0x41b37a[_0x51e4d9(0x1d4)],'rangeId':_0x51f5d7,'config':{'formula':_0x54120e['formula'],..._0x54120e['numberFormat']?{'numberFormat':_0x54120e[_0x51e4d9(0x271)]}:null},'startOffset':_0x4395b7[_0x51e4d9(0x262)],'endOffset':_0x4395b7['endOffset']});if(!_0x52ed4f)return!0x1;let _0x41c52b=_0x64c5d3(_0x17e9eb,_0x41b37a[_0x51e4d9(0x24b)],_0x570138);return!_0x41c52b||!J({'accessor':_0x17e9eb,'document':_0x41b37a['document'],'unitId':_0x41b37a[_0x51e4d9(0x24b)],'trigger':U['id'],'rangeId':_0x51f5d7,'previousResource':_0x41b37a['resource'],'nextResource':_0x52ed4f[_0x51e4d9(0x2c8)],'previousDocumentData':_0x41b37a[_0x51e4d9(0x2a7)],'nextDocumentData':_0x52ed4f[_0x51e4d9(0x247)],'cursorOffset':_0x52ed4f['cursorOffset'],'externalMutations':_0x41c52b})?!0x1:{'rangeId':_0x51f5d7,'startOffset':_0x52ed4f['cursorOffset']-0x1,'endOffset':_0x52ed4f[_0x51e4d9(0x256)]};}},W={'id':_0x34c9f2(0x222),'type':_0x3d8c4d[_0x34c9f2(0x2a0)],'handler':(_0x52be58,_0x444b30)=>{const _0x2b7c6a=_0x34c9f2;if(!(_0x444b30!=null&&_0x444b30['rangeId'])||!_0x444b30[_0x2b7c6a(0x20f)][_0x2b7c6a(0x27c)]())return!0x1;let _0x5bc2ad=q(_0x52be58,_0x444b30[_0x2b7c6a(0x24b)],''),_0x2782ef=_0x5bc2ad==null?void 0x0:_0x5bc2ad[_0x2b7c6a(0x22c)][_0x2b7c6a(0x2a3)](_0x5bc2ad[_0x2b7c6a(0x24b)],_0x444b30[_0x2b7c6a(0x212)]),_0x14c5df=_0x5bc2ad?T(_0x5bc2ad[_0x2b7c6a(0x2a7)][_0x2b7c6a(0x2ab)],_0x444b30[_0x2b7c6a(0x212)]):void 0x0;if(!_0x5bc2ad||!_0x2782ef||!_0x14c5df)return!0x1;let _0x5ddfc0=pt(_0x52be58,_0x5bc2ad['unitId'],_0x444b30[_0x2b7c6a(0x20f)],_0x444b30['externalReferences']??[]);if(!_0x5ddfc0)return!0x1;let _0x1f8c8b=_0x64c5d3(_0x52be58,_0x5bc2ad[_0x2b7c6a(0x24b)],_0x5ddfc0);if(!_0x1f8c8b)return!0x1;let _0x1624c2=Ct(_0x5bc2ad[_0x2b7c6a(0x1d4)]);return _0x1624c2[_0x2b7c6a(0x214)][_0x444b30[_0x2b7c6a(0x212)]]={'formula':_0x444b30[_0x2b7c6a(0x20f)],..._0x444b30[_0x2b7c6a(0x271)]?{'numberFormat':_0x444b30[_0x2b7c6a(0x271)]}:_0x2782ef[_0x2b7c6a(0x271)]?{'numberFormat':_0x2782ef['numberFormat']}:null},J({'accessor':_0x52be58,'document':_0x5bc2ad[_0x2b7c6a(0x289)],'unitId':_0x5bc2ad[_0x2b7c6a(0x24b)],'trigger':W['id'],'rangeId':_0x444b30['rangeId'],'previousResource':_0x5bc2ad[_0x2b7c6a(0x1d4)],'nextResource':_0x1624c2,'cursorOffset':_0x14c5df[_0x2b7c6a(0x285)]+0x1,'externalMutations':_0x1f8c8b});}},G={'id':_0x34c9f2(0x2ae),'type':_0x3d8c4d[_0x34c9f2(0x2a0)],'handler':(_0x484798,_0x40b4e6)=>{const _0x1da246=_0x34c9f2;if(!(_0x40b4e6!=null&&_0x40b4e6['rangeId']))return!0x1;let _0x3b0dea=q(_0x484798,_0x40b4e6[_0x1da246(0x24b)],''),_0x29a759=_0x3b0dea==null?void 0x0:_0x3b0dea[_0x1da246(0x22c)]['getFormula'](_0x3b0dea[_0x1da246(0x24b)],_0x40b4e6[_0x1da246(0x212)]),_0x128c09=_0x3b0dea?T(_0x3b0dea['documentData'][_0x1da246(0x2ab)],_0x40b4e6[_0x1da246(0x212)]):void 0x0;if(!_0x3b0dea||!_0x29a759||!_0x128c09)return!0x1;let _0x50694c=Ct(_0x3b0dea['resource']);return _0x50694c[_0x1da246(0x214)][_0x40b4e6[_0x1da246(0x212)]]={..._0x29a759,..._0x40b4e6[_0x1da246(0x271)]?{'numberFormat':_0x40b4e6[_0x1da246(0x271)]}:null},_0x40b4e6[_0x1da246(0x271)]||delete _0x50694c[_0x1da246(0x214)][_0x40b4e6['rangeId']][_0x1da246(0x271)],J({'accessor':_0x484798,'document':_0x3b0dea[_0x1da246(0x289)],'unitId':_0x3b0dea['unitId'],'trigger':G['id'],'rangeId':_0x40b4e6[_0x1da246(0x212)],'previousResource':_0x3b0dea[_0x1da246(0x1d4)],'nextResource':_0x50694c,'cursorOffset':_0x128c09[_0x1da246(0x285)]+0x1,'externalMutations':{}});}},K={'id':_0x34c9f2(0x1e3),'type':_0x3d8c4d[_0x34c9f2(0x2a0)],'handler':(_0x2a4240,_0x328bf6)=>ut(_0x2a4240,_0x328bf6,'',K['id'])},ct={'id':'docs-formula.command.replace-with-text','type':_0x3d8c4d[_0x34c9f2(0x2a0)],'handler':(_0x2b4a2e,_0x5f51c2)=>ut(_0x2b4a2e,_0x5f51c2,(_0x5f51c2==null?void 0x0:_0x5f51c2['text'])??'',ct['id'])},lt={'id':_0x34c9f2(0x29d),'type':_0x3d8c4d[_0x34c9f2(0x2a0)],'handler':(_0x5a3d76,_0x136fc2)=>{const _0x450364=_0x34c9f2;if(!(_0x136fc2!=null&&_0x136fc2['rangeId']))return!0x1;let _0x4ff79f=q(_0x5a3d76,_0x136fc2[_0x450364(0x24b)],'');if(!_0x4ff79f)return!0x1;let _0x345678=_0x5a3d76[_0x450364(0x1ff)](L)[_0x450364(0x25a)]({'unitId':_0x4ff79f['unitId'],'rangeId':_0x136fc2[_0x450364(0x212)]});return _0x345678?ut(_0x5a3d76,_0x136fc2,_0x345678[_0x450364(0x282)],lt['id']):!0x1;}};function ut(_0x1c7aeb,_0x5ed69c,_0x1572b5,_0xac1785){const _0x1b1302=_0x34c9f2;if(!(_0x5ed69c!=null&&_0x5ed69c[_0x1b1302(0x212)]))return!0x1;let _0x33ae45=q(_0x1c7aeb,_0x5ed69c[_0x1b1302(0x24b)],'');if(!_0x33ae45)return!0x1;let _0x1f6714=Be({'documentData':_0x33ae45[_0x1b1302(0x2a7)],'resource':_0x33ae45[_0x1b1302(0x1d4)],'rangeId':_0x5ed69c[_0x1b1302(0x212)],'text':_0x1572b5});return _0x1f6714?J({'accessor':_0x1c7aeb,'document':_0x33ae45['document'],'unitId':_0x33ae45[_0x1b1302(0x24b)],'trigger':_0xac1785,'rangeId':_0x5ed69c['rangeId'],'previousResource':_0x33ae45['resource'],'nextResource':_0x1f6714['nextResource'],'previousDocumentData':_0x33ae45[_0x1b1302(0x2a7)],'nextDocumentData':_0x1f6714['nextDocumentData'],'cursorOffset':_0x1f6714[_0x1b1302(0x256)],'externalMutations':{}}):!0x1;}function q(_0x2e0241,_0x5b8b2e,_0x721619){const _0x1f5ccf=_0x34c9f2;if(_0x721619)return null;let _0x3c61c9=_0x2e0241[_0x1f5ccf(0x1ff)](_0x35f474),_0x44ec47=(_0x5b8b2e?_0x3c61c9[_0x1f5ccf(0x1e4)](_0x5b8b2e,_0x9cc7bc[_0x1f5ccf(0x259)]):_0x3c61c9[_0x1f5ccf(0x2c2)](_0x9cc7bc['UNIVER_DOC']))??null;if(!_0x44ec47)return null;let _0x3138f5=_0x44ec47[_0x1f5ccf(0x281)](),_0x2a6252=_0x3138f5[_0x1f5ccf(0x2ab)];if(_0x3138f5[_0x1f5ccf(0x226)]||!_0x2a6252)return null;let _0x1ec377=_0x2e0241[_0x1f5ccf(0x1ff)](P);return _0x1ec377['getLoadError'](_0x44ec47[_0x1f5ccf(0x1f2)]())?null:{'document':_0x44ec47,'body':_0x2a6252,'documentData':_0x3138f5,'model':_0x1ec377,'resource':_0x1ec377[_0x1f5ccf(0x284)](_0x44ec47['getUnitId']())??b(),'unitId':_0x44ec47[_0x1f5ccf(0x1f2)]()};}function dt(_0x24d41f,_0x5314c5){const _0x301c83=_0x34c9f2;var _0x57fb6f;return(_0x57fb6f=_0x24d41f[_0x301c83(0x1ff)](_0x1841de)[_0x301c83(0x1d8)]({'subUnitId':_0x5314c5,'unitId':_0x5314c5}))==null?void 0x0:_0x57fb6f[0x0];}function ft(_0x3a81b8,_0x254d1f,_0x5c9e40){const _0x2c569c=_0x34c9f2;if((_0x3a81b8==null?void 0x0:_0x3a81b8['type'])===_0x2c569c(0x286)){var _0x326a5f;let _0x7b68b5=((_0x326a5f=_0x254d1f[_0x2c569c(0x27f)])==null?void 0x0:_0x326a5f[_0x2c569c(0x229)](_0x19a101=>_0x19a101['paragraphId']===_0x3a81b8[_0x2c569c(0x1d0)]))??[];if(_0x7b68b5[_0x2c569c(0x2c1)]!==0x1)return null;let _0x3640fd=_0x7b68b5[0x0],_0x34d96f=_0x44d00(_0x254d1f,_0x3640fd),_0x388779=_0x3640fd[_0x2c569c(0x25c)]-_0x34d96f,_0x4d9aa0=_0x3a81b8[_0x2c569c(0x296)]===_0x2c569c(0x297)?_0x388779:_0x3a81b8[_0x2c569c(0x296)];if(!Number['isInteger'](_0x4d9aa0)||_0x4d9aa0<0x0||_0x4d9aa0>_0x388779)return null;let _0x3543f8=_0x34d96f+_0x4d9aa0;return{'startOffset':_0x3543f8,'endOffset':_0x3543f8};}if((_0x3a81b8==null?void 0x0:_0x3a81b8[_0x2c569c(0x278)])===_0x2c569c(0x210))return!Number[_0x2c569c(0x1fa)](_0x3a81b8[_0x2c569c(0x262)])||!Number[_0x2c569c(0x1fa)](_0x3a81b8[_0x2c569c(0x251)])?null:{'startOffset':Math[_0x2c569c(0x232)](_0x3a81b8[_0x2c569c(0x262)],_0x3a81b8['endOffset']),'endOffset':Math[_0x2c569c(0x241)](_0x3a81b8[_0x2c569c(0x262)],_0x3a81b8[_0x2c569c(0x251)])};let _0x1ef499=(_0x3a81b8==null?void 0x0:_0x3a81b8[_0x2c569c(0x278)])===_0x2c569c(0x272)?_0x3a81b8['selection']:_0x5c9e40;return!_0x1ef499||_0x1ef499[_0x2c569c(0x1f0)]?null:{'startOffset':Math[_0x2c569c(0x232)](_0x1ef499[_0x2c569c(0x262)],_0x1ef499[_0x2c569c(0x251)]),'endOffset':Math['max'](_0x1ef499[_0x2c569c(0x262)],_0x1ef499[_0x2c569c(0x251)])};}function pt(_0x3e6850,_0x5f579d,_0x5ad614,_0x79382){const _0x3e0385=_0x34c9f2;let _0x5036a7=_0x3e6850['get'](_0x2ea0aa),_0x5f10a4=_0x5ad614[_0x3e0385(0x274)]('=')?_0x5ad614[_0x3e0385(0x23c)](0x1):_0x5ad614,_0x195fe0=_0x5036a7[_0x3e0385(0x1db)](_0x5f10a4);if(!_0x195fe0)return null;let _0x503568=_0x3e6850[_0x3e0385(0x1ff)](_0x598fe),_0x409e25=_0xc8a733({'qualifiers':_0x51ffff(_0x195fe0),'explicitReferences':_0x79382??[],'resolveBinding':_0x4f881b=>_0x503568[_0x3e0385(0x25f)](_0x5f579d,_0x4f881b)});return _0x409e25[_0x3e0385(0x216)]===_0x3e0385(0x1f5)?_0x409e25[_0x3e0385(0x227)]:null;}function mt(_0x4b6f34,_0x10a56b,_0x1a7bae){const _0xdf7525=_0x34c9f2;var _0x19c741;let _0x1ee56e=_0x23fed8(0x6);for(;_0x4b6f34!=null&&(_0x19c741=_0x4b6f34[_0xdf7525(0x2b7)])!=null&&_0x19c741[_0xdf7525(0x23a)](_0x1d40d8=>_0x1d40d8['rangeId']===_0x1ee56e)||_0x10a56b['getFormula'](_0x1a7bae,_0x1ee56e);)_0x1ee56e=_0x23fed8(0x6);return _0x1ee56e;}function ht(_0x29c252){try{return Re(_0x29c252);}catch(_0x293e10){if(_0x293e10 instanceof C)return null;throw _0x293e10;}}function gt(_0x43f515){const _0x20ecf7=_0x34c9f2;let _0x4a8589=_0x43f515[_0x20ecf7(0x1e6)]&&_0x43f515[_0x20ecf7(0x247)]?vt(_0x43f515[_0x20ecf7(0x289)],_0x43f515['unitId'],_0x43f515[_0x20ecf7(0x1e6)],_0x43f515['nextDocumentData'],_0x43f515[_0x20ecf7(0x256)],_0x43f515[_0x20ecf7(0x225)]):null;return _0x43f515[_0x20ecf7(0x1e6)]&&_0x43f515[_0x20ecf7(0x247)]&&!_0x4a8589?null:{'documentRedo':_0x4a8589,'resourceRedo':{'id':V['id'],'params':{'unitId':_0x43f515[_0x20ecf7(0x24b)],'resource':_0x43f515[_0x20ecf7(0x2c8)]}},'resourceUndo':{'id':V['id'],'params':{'unitId':_0x43f515[_0x20ecf7(0x24b)],'resource':_0x43f515['previousResource']}}};}function _t(_0x686c56,_0x5cf636,_0x59c45a,_0x2c1feb){const _0x31dc43=_0x34c9f2;_0x2c1feb[_0x31dc43(0x29b)]({'id':_0x686c56[_0x31dc43(0x225)]+':'+_0x686c56[_0x31dc43(0x212)],'unitID':_0x686c56['unitId'],'redoMutations':[..._0x686c56[_0x31dc43(0x248)]['redoMutation']?[_0x686c56[_0x31dc43(0x248)][_0x31dc43(0x215)]]:[],..._0x5cf636[_0x31dc43(0x264)]?[_0x5cf636[_0x31dc43(0x264)]]:[],_0x5cf636[_0x31dc43(0x2a9)]],'undoMutations':[_0x5cf636[_0x31dc43(0x202)],..._0x59c45a?[_0x59c45a]:[],..._0x686c56['externalMutations'][_0x31dc43(0x2a2)]?[_0x686c56[_0x31dc43(0x248)]['undoMutation']]:[]]});}function J(_0x4e1a85){const _0x32a94d=_0x34c9f2;let _0x4f1779=_0x4e1a85['accessor'][_0x32a94d(0x1ff)](_0x1fba3b),_0x6cc367=_0x4e1a85[_0x32a94d(0x267)][_0x32a94d(0x1ff)](_0x6bc219),_0x4f8127=_0x4e1a85[_0x32a94d(0x267)][_0x32a94d(0x1ff)](_0x1841de),_0x83d72b=gt(_0x4e1a85);if(!_0x83d72b)return!0x1;let _0x313e89=!0x1,_0x1ec61d=null,_0x1f2b2f=!0x1;try{if(_0x4e1a85[_0x32a94d(0x248)][_0x32a94d(0x215)]){if(!_0x4f1779[_0x32a94d(0x242)](_0x4e1a85[_0x32a94d(0x248)][_0x32a94d(0x215)]['id'],_0x4e1a85[_0x32a94d(0x248)][_0x32a94d(0x215)][_0x32a94d(0x1f6)]))return!0x1;_0x313e89=!0x0;}if(_0x83d72b[_0x32a94d(0x264)]){let _0xca81f3=_0x4f1779[_0x32a94d(0x242)](_0x83d72b['documentRedo']['id'],_0x83d72b['documentRedo']['params']);if(!_0xca81f3)return bt(_0x4f1779,_0x4e1a85['externalMutations'],_0x313e89),!0x1;_0x1ec61d={'id':_0x26272f['id'],'params':{..._0xca81f3,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0x4f1779[_0x32a94d(0x242)](_0x83d72b['resourceRedo']['id'],_0x83d72b[_0x32a94d(0x2a9)][_0x32a94d(0x1f6)]))return yt(_0x4f1779,_0x1ec61d),bt(_0x4f1779,_0x4e1a85[_0x32a94d(0x248)],_0x313e89),!0x1;_0x1f2b2f=!0x0,_t(_0x4e1a85,_0x83d72b,_0x1ec61d,_0x6cc367);}catch(_0x4dccb4){throw _0x1f2b2f&&_0x4f1779['syncExecuteCommand'](_0x83d72b[_0x32a94d(0x202)]['id'],_0x83d72b[_0x32a94d(0x202)][_0x32a94d(0x1f6)]),yt(_0x4f1779,_0x1ec61d),bt(_0x4f1779,_0x4e1a85[_0x32a94d(0x248)],_0x313e89),_0x4dccb4;}return _0x4f8127[_0x32a94d(0x20d)]([{'startOffset':_0x4e1a85[_0x32a94d(0x256)],'endOffset':_0x4e1a85[_0x32a94d(0x256)],'segmentId':''}],{'unitId':_0x4e1a85['unitId'],'subUnitId':_0x4e1a85[_0x32a94d(0x24b)]},!0x1,{[_0x291f0f]:!0x0}),!0x0;}function vt(_0x58e0e5,_0x170e0a,_0x55e688,_0x5f402,_0x346ed0,_0x7647ae){let _0x2124af=xt(_0x55e688,_0x5f402,_0x38047f(_0x58e0e5,''));return _0x2124af?{'id':_0x26272f['id'],'params':{'unitId':_0x170e0a,'actions':_0x2124af,'segmentId':'','textRanges':[{'startOffset':_0x346ed0,'endOffset':_0x346ed0,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0x7647ae}}:null;}function yt(_0x1a4287,_0x46fa67){const _0x26ab8a=_0x34c9f2;_0x46fa67&&_0x1a4287[_0x26ab8a(0x242)](_0x46fa67['id'],_0x46fa67['params']);}function bt(_0x2680ee,_0x3ae5e9,_0xa7024c){const _0x170c0d=_0x34c9f2;_0xa7024c&&_0x3ae5e9[_0x170c0d(0x2a2)]&&_0x2680ee[_0x170c0d(0x242)](_0x3ae5e9[_0x170c0d(0x2a2)]['id'],_0x3ae5e9['undoMutation'][_0x170c0d(0x1f6)]);}function xt(_0x2b54a6,_0x3cbd5c,_0x4a1590){const _0x51fad9=_0x34c9f2;let _0x2344aa=_0x2b54a6[_0x51fad9(0x2ab)],_0x5dfe35=_0x3cbd5c[_0x51fad9(0x2ab)],_0x20e1e6=St(_0x2344aa==null?void 0x0:_0x2344aa[_0x51fad9(0x1de)],_0x5dfe35==null?void 0x0:_0x5dfe35[_0x51fad9(0x1de)]);if(!_0x20e1e6||!_0x5dfe35)return null;let _0x9074ac=new _0x283512();return _0x9074ac[_0x51fad9(0x299)](_0x20e1e6['start']),_0x20e1e6[_0x51fad9(0x29c)]>0x0&&_0x9074ac[_0x51fad9(0x25d)](_0x20e1e6[_0x51fad9(0x29c)],_0x2ffd0f(_0x5dfe35,_0x20e1e6['start'],_0x20e1e6[_0x51fad9(0x22f)]+_0x20e1e6[_0x51fad9(0x29c)],!0x1)),_0x20e1e6[_0x51fad9(0x208)]>0x0&&_0x9074ac[_0x51fad9(0x287)](_0x20e1e6[_0x51fad9(0x208)]),_0x42e010['getInstance']()[_0x51fad9(0x201)](_0x9074ac['serialize'](),_0x4a1590);}function St(_0x3eb6ce,_0x568f33){const _0x19e2fd=_0x34c9f2;if(_0x3eb6ce==null||_0x568f33==null||_0x3eb6ce===_0x568f33)return null;let _0x69a4e7=0x0;for(;_0x69a4e7<_0x3eb6ce[_0x19e2fd(0x2c1)]&&_0x69a4e7<_0x568f33[_0x19e2fd(0x2c1)]&&_0x3eb6ce[_0x69a4e7]===_0x568f33[_0x69a4e7];)_0x69a4e7+=0x1;let _0x16a404=_0x3eb6ce['length'],_0x590359=_0x568f33[_0x19e2fd(0x2c1)];for(;_0x16a404>_0x69a4e7&&_0x590359>_0x69a4e7&&_0x3eb6ce[_0x16a404-0x1]===_0x568f33[_0x590359-0x1];)--_0x16a404,--_0x590359;return{'start':_0x69a4e7,'deleteLength':_0x16a404-_0x69a4e7,'insertLength':_0x590359-_0x69a4e7};}function Ct(_0xd5a7fd){const _0x3c05b5=_0x34c9f2;return{'schemaVersion':0x1,'formulas':Object['fromEntries'](Object[_0x3c05b5(0x2ad)](_0xd5a7fd[_0x3c05b5(0x214)])[_0x3c05b5(0x26d)](([_0x553824,_0x3cbab0])=>[_0x553824,{..._0x3cbab0,..._0x3cbab0[_0x3c05b5(0x271)]?{'numberFormat':{..._0x3cbab0[_0x3c05b5(0x271)]}}:null,..._0x3cbab0[_0x3c05b5(0x21f)]?{'lastValue':{..._0x3cbab0[_0x3c05b5(0x21f)]}}:null}]))};}let Y=class extends _0x49a82f{constructor(_0x280f00,_0x4820ec,_0xb233fe,_0x331b89){const _0x22723e=_0x34c9f2;super(),this[_0x22723e(0x298)]=_0x280f00,this[_0x22723e(0x2b8)]=_0x4820ec,this['_model']=_0xb233fe,this[_0x22723e(0x27a)]=_0x331b89,N(this,_0x22723e(0x1ec),new Set()),N(this,_0x22723e(0x1e8),!0x1),N(this,'_isDisposed',!0x1),this['_instanceService'][_0x22723e(0x290)](_0x9cc7bc[_0x22723e(0x259)])[_0x22723e(0x230)](_0x1390d4=>this[_0x22723e(0x27a)]['syncUnit'](_0x1390d4)),this[_0x22723e(0x249)](this[_0x22723e(0x1f3)][_0x22723e(0x2ba)][_0x22723e(0x283)](({unitId:_0x22f4a2})=>this[_0x22723e(0x260)](_0x22f4a2))),this[_0x22723e(0x249)](this[_0x22723e(0x298)]['unitAdded$']['subscribe'](({unit:_0x423dd2})=>{const _0x582255=_0x22723e;_0x423dd2[_0x582255(0x278)]===_0x9cc7bc[_0x582255(0x259)]&&this[_0x582255(0x240)](_0x423dd2[_0x582255(0x1f2)]());})),this['disposeWithMe'](this[_0x22723e(0x298)]['unitDisposed$'][_0x22723e(0x283)](_0x359dc6=>{const _0x352a26=_0x22723e;this['_service']['unregisterUnit'](_0x359dc6[_0x352a26(0x1f2)]());})),this['disposeWithMe'](this[_0x22723e(0x2b8)][_0x22723e(0x29a)](_0x2ed073=>{const _0xac8161=_0x22723e;if(_0x2ed073['id']===_0x26272f['id']&&wt(_0x2ed073[_0xac8161(0x1f6)])){let _0x18c9bf=_0x2ed073['params'];_0x18c9bf[_0xac8161(0x1f0)]||this[_0xac8161(0x260)](_0x18c9bf[_0xac8161(0x24b)]);}}));}[_0x34c9f2(0x1d1)](){const _0xc47545=_0x34c9f2;this[_0xc47545(0x292)]=!0x0,super[_0xc47545(0x1d1)]();}[_0x34c9f2(0x240)](_0x392403){const _0x897751=_0x34c9f2;this[_0x897751(0x1ec)][_0x897751(0x21b)](_0x392403),!this[_0x897751(0x1e8)]&&(this[_0x897751(0x1e8)]=!0x0,queueMicrotask(()=>{const _0x3f46f8=_0x897751;if(this['_syncScheduled']=!0x1,this[_0x3f46f8(0x292)])return;let _0x29e46d=Array[_0x3f46f8(0x1f4)](this['_pendingUnitIds']);this[_0x3f46f8(0x1ec)][_0x3f46f8(0x26c)](),_0x29e46d[_0x3f46f8(0x230)](_0x1e6e88=>this[_0x3f46f8(0x260)](_0x1e6e88));}));}['_syncUnit'](_0x2976fc){const _0xdf46c5=_0x34c9f2;let _0x579fbf=this['_instanceService'][_0xdf46c5(0x1e4)](_0x2976fc,_0x9cc7bc[_0xdf46c5(0x259)]);_0x579fbf&&this[_0xdf46c5(0x27a)][_0xdf46c5(0x234)](_0x579fbf);}};Y=I([F(0x0,_0x35f474),F(0x1,_0x1fba3b),F(0x2,_0x5c5393(P)),F(0x3,_0x5c5393(L))],Y);function wt(_0x227a8f){const _0x2d4c3f=_0x34c9f2;return typeof _0x227a8f=='object'&&!!_0x227a8f&&_0x2d4c3f(0x24b)in _0x227a8f&&typeof _0x227a8f[_0x2d4c3f(0x24b)]==_0x2d4c3f(0x1d5)&&(!(_0x2d4c3f(0x1f0)in _0x227a8f)||_0x227a8f[_0x2d4c3f(0x1f0)]===void 0x0||typeof _0x227a8f[_0x2d4c3f(0x1f0)]==_0x2d4c3f(0x1d5));}let X=class extends _0x49a82f{constructor(_0x778ade,_0x1075b2){const _0x43b250=_0x34c9f2;super(),this[_0x43b250(0x1d6)]=_0x778ade,this[_0x43b250(0x219)]=_0x1075b2,this[_0x43b250(0x249)](this['_resourceManagerService']['registerPluginResource']({'pluginName':y,'businesses':[_0x9cc7bc[_0x43b250(0x259)]],'toJson':_0x140ada=>JSON[_0x43b250(0x275)](this[_0x43b250(0x219)][_0x43b250(0x27e)](_0x140ada)),'parseJson':_0x4b7256=>JSON[_0x43b250(0x237)](_0x4b7256),'onLoad':(_0x316212,_0x340225)=>{const _0x343109=_0x43b250;this[_0x343109(0x219)][_0x343109(0x2a6)](_0x316212,_0x340225);},'onUnLoad':_0x3a11de=>this[_0x43b250(0x219)]['removeUnit'](_0x3a11de)}));}};X=I([F(0x0,_0x674a1c),F(0x1,_0x5c5393(P))],X);var Tt='@univerjs-pro/docs-formula',Et=_0x34c9f2(0x1e7);const Dt={};let Z=class extends _0x49a82f{constructor(_0x2472f5,_0xd16fc2,_0x38ee2d){const _0x205c08=_0x34c9f2;super(),this[_0x205c08(0x28b)]=_0x2472f5,this[_0x205c08(0x238)]=_0xd16fc2,this[_0x205c08(0x249)](_0x38ee2d[_0x205c08(0x2a4)]({'resolve':(_0x540fa3,_0x377245)=>{const _0x4400b1=_0x205c08;var _0x532f47;return((_0x532f47=_0x377245['customRanges'])==null?void 0x0:_0x532f47[_0x4400b1(0x229)](w)['map'](_0x1d05ad=>({'startOffset':_0x1d05ad['startIndex'],'endOffset':_0x1d05ad[_0x4400b1(0x285)]+0x1,'text':this[_0x4400b1(0x28d)](_0x540fa3,_0x1d05ad[_0x4400b1(0x212)])})))??[];}})),this[_0x205c08(0x249)](this[_0x205c08(0x238)][_0x205c08(0x268)][_0x205c08(0x283)](({unitId:_0x1161f4})=>{const _0x1b0c8c=_0x205c08;_0x38ee2d[_0x1b0c8c(0x2b9)](_0x1161f4);}));}[_0x34c9f2(0x28d)](_0x23ff72,_0xb5750d){const _0x41a43a=_0x34c9f2;var _0x177ff0;return((_0x177ff0=this[_0x41a43a(0x238)][_0x41a43a(0x25a)]({'unitId':_0x23ff72,'rangeId':_0xb5750d}))==null?void 0x0:_0x177ff0['text'])??'';}[_0x34c9f2(0x211)](_0x18af5b,_0x36a2bb,_0x5ca176){const _0x58d10=_0x34c9f2;var _0x5bf26b;let _0x218d2a=this['_univerInstanceService'][_0x58d10(0x1e4)](_0x18af5b,_0x9cc7bc[_0x58d10(0x259)]),_0x576fb3=_0x218d2a==null?void 0x0:_0x218d2a['getBody']();if(!_0x576fb3)return'';let _0x111d5a=_0x576fb3[_0x58d10(0x1de)][_0x58d10(0x23c)](_0x36a2bb,_0x5ca176),_0x2b1c45=((_0x5bf26b=_0x576fb3['customRanges'])==null?void 0x0:_0x5bf26b[_0x58d10(0x229)](_0x235467=>w(_0x235467)&&_0x235467['startIndex']>=_0x36a2bb&&_0x235467[_0x58d10(0x285)]<_0x5ca176)[_0x58d10(0x26f)]((_0x504d07,_0x553e6e)=>_0x553e6e[_0x58d10(0x25c)]-_0x504d07[_0x58d10(0x25c)]))??[];for(let _0x461f6a of _0x2b1c45){let _0x374092=_0x461f6a['startIndex']-_0x36a2bb,_0x29609b=_0x461f6a[_0x58d10(0x285)]-_0x36a2bb+0x1;_0x111d5a=''+_0x111d5a[_0x58d10(0x23c)](0x0,_0x374092)+this[_0x58d10(0x28d)](_0x18af5b,_0x461f6a['rangeId'])+_0x111d5a[_0x58d10(0x23c)](_0x29609b);}return _0x111d5a;}[_0x34c9f2(0x257)](_0x43c0f8){return Ot(_0x43c0f8);}[_0x34c9f2(0x2b0)](_0x5f4c20,_0x268d63,_0x5f4f4f={}){const _0x55baae=_0x34c9f2;var _0x5908ca;return Ve({'id':_0x5f4c20,'body':_0x268d63,'documentStyle':{}},(((_0x5908ca=_0x268d63[_0x55baae(0x2b7)])==null?void 0x0:_0x5908ca['filter'](w))??[])['map'](_0xd5b6f5=>({'rangeId':_0xd5b6f5[_0x55baae(0x212)],'text':_0x5f4f4f[_0xd5b6f5[_0x55baae(0x212)]]??this[_0x55baae(0x28d)](_0x5f4c20,_0xd5b6f5[_0x55baae(0x212)])})))['body']??{'dataStream':''};}};Z=I([F(0x0,_0x35f474),F(0x1,_0x5c5393(L)),F(0x2,_0x5c5393(_0x557df1))],Z);function Ot(_0x503517){const _0x20a230=_0x34c9f2;var _0x35edca,_0x3bbbaa;let _0x1cbb04=kt(_0x503517),_0x4af208=Ve(_0x503517,(((_0x35edca=_0x503517[_0x20a230(0x2ab)])==null||(_0x35edca=_0x35edca[_0x20a230(0x2b7)])==null?void 0x0:_0x35edca[_0x20a230(0x229)](w))??[])[_0x20a230(0x26d)](_0x289ef1=>({'rangeId':_0x289ef1[_0x20a230(0x212)],'text':At(_0x1cbb04==null?void 0x0:_0x1cbb04[_0x20a230(0x214)][_0x289ef1[_0x20a230(0x212)]])})));return _0x4af208[_0x20a230(0x265)]=(_0x3bbbaa=_0x4af208['resources'])==null?void 0x0:_0x3bbbaa[_0x20a230(0x229)](_0xe5d3ea=>_0xe5d3ea[_0x20a230(0x220)]!==y),_0x4af208;}function kt(_0x40f534){const _0x3d1b75=_0x34c9f2;var _0x1d23c7;let _0x44a313=(_0x1d23c7=_0x40f534[_0x3d1b75(0x265)])==null||(_0x1d23c7=_0x1d23c7['find'](_0x1b4957=>_0x1b4957[_0x3d1b75(0x220)]===_0x3d1b75(0x26b)))==null?void 0x0:_0x1d23c7[_0x3d1b75(0x24c)];if(_0x44a313)try{let _0x396568=JSON[_0x3d1b75(0x237)](_0x44a313);return x(_0x396568)?_0x396568:void 0x0;}catch{return;}}function At(_0x2ac03b){const _0x438b01=_0x34c9f2;return _0x2ac03b?_0x44276e({'lastValue':_0x2ac03b['lastValue'],'numberFormat':_0x2ac03b[_0x438b01(0x271)]})[_0x438b01(0x282)]:'';}let Q=class extends _0x49a82f{constructor(_0x21e517,_0x3a79ff,_0x48ca5b){const _0x607f01=_0x34c9f2;super(),this[_0x607f01(0x238)]=_0x21e517,this[_0x607f01(0x1d2)]=_0x3a79ff,this[_0x607f01(0x249)](_0x48ca5b['registerProvider'](this));}[_0x34c9f2(0x1d9)](_0x5cfc53){const _0x3a073f=_0x34c9f2;let _0x117375=new Map();for(let _0x84fce6 of this['_formulaService']['getRegisteredFormulas']()){var _0x837586;if(!this[_0x3a073f(0x1d2)][_0x3a073f(0x24e)](_0x84fce6[_0x3a073f(0x1ef)][_0x3a073f(0x20f)],_0x84fce6[_0x3a073f(0x2a1)])['eligible'])continue;let _0x3b4d43=_0x477060(_0x84fce6[_0x3a073f(0x2a1)]),_0x28aa71=_0x3b4d43?_0x16967c(_0x3b4d43):null;if(!_0x28aa71||jt(_0x84fce6[_0x3a073f(0x1ef)]['lastValue'],_0x28aa71))continue;let _0x17a49e=_0x117375[_0x3a073f(0x1ff)](_0x84fce6[_0x3a073f(0x228)]['unitId'])??[];_0x17a49e[_0x3a073f(0x2af)]({'rangeId':_0x84fce6[_0x3a073f(0x228)][_0x3a073f(0x212)],'expectedFormula':_0x84fce6[_0x3a073f(0x1ef)]['formula'],'expectedNumberFormat':(_0x837586=_0x84fce6['config'][_0x3a073f(0x271)])==null?void 0x0:_0x837586['pattern'],'expectedReferenceRevision':_0x84fce6[_0x3a073f(0x2bd)],'lastValue':_0x28aa71}),_0x117375[_0x3a073f(0x252)](_0x84fce6[_0x3a073f(0x228)]['unitId'],_0x17a49e);}return Array[_0x3a073f(0x1f4)](_0x117375,([_0x4117f6,_0x5d1d3a])=>({'id':H['id'],'params':{'unitId':_0x4117f6,'updates':_0x5d1d3a}}));}};Q=I([F(0x0,_0x5c5393(L)),F(0x1,_0x5c5393(_0x168d95)),F(0x2,_0x5c5393(_0x442e83))],Q);function jt(_0x47cf81,_0x4b0dad){const _0x2c0178=_0x34c9f2;return(_0x47cf81==null?void 0x0:_0x47cf81['v'])===_0x4b0dad['v']&&(_0x47cf81==null?void 0x0:_0x47cf81['t'])===_0x4b0dad['t']&&(_0x47cf81==null?void 0x0:_0x47cf81[_0x2c0178(0x244)])===_0x4b0dad[_0x2c0178(0x244)];}let $=class extends _0x530da8{constructor(_0x4ed583=Dt,_0x4fad2c,_0x12bee5,_0x303e59){const _0x5a9665=_0x34c9f2;super(),this[_0x5a9665(0x1e0)]=_0x4ed583,this[_0x5a9665(0x258)]=_0x4fad2c,this[_0x5a9665(0x2b8)]=_0x12bee5,this['_configService']=_0x303e59;let {..._0x341519}=_0x2e4085({},Dt,this[_0x5a9665(0x1e0)]);this[_0x5a9665(0x1fe)][_0x5a9665(0x1dc)](_0x5a9665(0x293),_0x341519);}[_0x34c9f2(0x269)](){const _0x46442d=_0x34c9f2;this[_0x46442d(0x258)]['add']([P]),this[_0x46442d(0x258)][_0x46442d(0x21b)]([L]),this[_0x46442d(0x258)]['add']([X]),this['_injector'][_0x46442d(0x21b)]([Y]),this[_0x46442d(0x258)][_0x46442d(0x21b)]([Q]),this[_0x46442d(0x258)][_0x46442d(0x21b)]([Z]),_0x6f29f6(this['_injector'],[[P],[X],[Y],[Q],[Z]]),[ot,st,V,H,U,W,G,K,ct,lt][_0x46442d(0x230)](_0x2ed1ef=>this[_0x46442d(0x249)](this[_0x46442d(0x2b8)][_0x46442d(0x2b4)](_0x2ed1ef)));}};N($,_0x34c9f2(0x1f9),y),N($,'packageName',Tt),N($,_0x34c9f2(0x235),Et),N($,_0x34c9f2(0x278),_0x9cc7bc['UNIVER_DOC']),$=I([_0x962570(_0x16ebc7,_0x4266a3,_0x4c3072),F(0x1,_0x5c5393(_0x57c044)),F(0x2,_0x1fba3b),F(0x3,_0x4eefec)],$);function _0x35ee(){const _0x4f783d=['end','_instanceService','retain','onCommandExecuted','pushUndoRedo','insertLength','docs-formula.command.convert-to-text','870816XWeFIR','presentation','COMMAND','liveResult','undoMutation','getFormula','register','values','load','documentData','isArray','resourceRedo','COLUMN_GROUP_END','body','customDecorations','entries','docs-formula.command.set-number-format','push','degradeBody','pending','asObservable','PARAGRAPH','registerCommand','_loadErrors','MUTATION','customRanges','_commandService','notifyTextChanged','change$','every','formulaResult$','referenceRevision','docs-formula.mutation.remove-formula','empty','4795nPPyms','length','getCurrentUnitOfType','removeUnit','decorate','1669752CIXeqq','docs-formula.mutation.set-resource','error','nextResource','getOwnPropertyDescriptor','getPresentation','paragraphId','dispose','_cacheEligibilityService','getLoadError','resource','string','_resourceManagerService','Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.','getTextRanges','collectMutations','COLUMN_END','sequenceNodesBuilder','setConfig','number','dataStream','_registrations','_config','TABLE_CELL_END','kind','docs-formula.command.remove','getUnit','COLUMN_START','previousDocumentData','1.0.3','_syncScheduled','_formulaKeys','750djySEq','_deleteRegistration','_pendingUnitIds','endsWith','43006RwjXnG','config','segmentId','_updateFormulaResult','getUnitId','_model','from','resolved','params','2248944klvGRE','schemaVersion','pluginName','isInteger','docs-formula.command.insert','4BXuSrP','stale','_configService','get','symbol','editOp','resourceUndo','docs-formula.mutation.set-formula','_change$','BLOCK_START','find','defineProperty','deleteLength','getRegisteredFormulas','formulaId','textRuns','blockRanges','replaceDocRanges','iterator','formula','range','resolveText','rangeId','COLUMN_GROUP_START','formulas','redoMutation','status','success','source','_docFormulaModel','removeFormula','add','EMPTY','toPrimitive','_rawResources','lastValue','name','tables','docs-formula.command.update','externalReferences','object','trigger','disabled','references','identity','filter','19025QOxAzn','next','model','13449880sXIaBd','getFormulas','start','forEach','color','min','properties','syncUnit','version','cell','parse','_formulaService','DOC','some','23umGGwg','slice','CUSTOM_BLOCK','sectionBreaks','_hostExternalReferenceModel','_queueSync','max','syncExecuteCommand','unsupported-version','pattern','CUSTOM','columnGroups','nextDocumentData','externalMutations','disposeWithMe','keys','unitId','data','_preserveInvalid','assess','_resources','ERROR','endOffset','set','has','_setPresentation','target','cursorOffset','degradeDocumentData','_injector','UNIVER_DOC','getResult','default','startIndex','insert','univer-docs-formula','resolveBinding','_syncUnit','deepClone','startOffset','getFormulaValueSync','documentRedo','resources','TABLE_ROW_START','accessor','presentationChanged$','onStarting','setFormula','DOC_FORMULA_PLUGIN','clear','map','SECTION_BREAK','sort','unregister','numberFormat','selection','invalid-resource','startsWith','stringify','updates','getRevision','type','includes','_service','_registrationService','trim','customBlocks','serialize','paragraphs','_presentationChanged$','getSnapshot','text','subscribe','getResource','endIndex','paragraph','delete','BLOCK_END','document','prototype','_univerInstanceService','unregisterUnit','resolveFormula','wholeEntity','setFormulas','getAllUnitsForType','docs-formula.mutation.set-last-values','_isDisposed','docs-formula.config','complete','setResource','position'];_0x35ee=function(){return _0x4f783d;};return _0x35ee();}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 _0x835b(_0x544b63,_0x185d88){_0x544b63=_0x544b63-0x138;var _0x522ad8=_0x522a();var _0x835b4=_0x522ad8[_0x544b63];return _0x835b4;}function _0x522a(){var _0x55fb53=['@univerjs-pro/docs-formula','3026335tACCzn','rangeId','_docsFormulaResourceLoaderService','extend','createInstance','length','ICommandService','string','defineProperty','IUniverInstanceService','48iuRlVS','getId','_document','body','FDocument','_model','get','_injector','call','getFormulaAt','_unitId','DocFormulaService','toStringTag','syncExecuteCommand','filter','numberFormat','getOwnPropertyDescriptor','update','_commandService','endOffset','getUnit','_rangeId','getFormulas','externalReferences','UniverDocsFacade','saveFormulaDisplayTextSnapshot','InsertDocFormulaCommand','object','166220XzLzDv','_docsFormulaDisplayTextService','ConvertDocFormulaToTextCommand','startOffset','_service','_createFormula','418306qkWYyG','degradeDocumentData','getRange','_docsFormulaCommandService','_getCompleteRanges','_initialize','end','map','getConfig','getResult','getBody','_getCustomRange','constructor','FDocumentTextRange','endIndex','UNIVER_DOC','UniverProDocsFormula','find','getSegmentId','6144fLWBfi','FDocumentFormula','isDocFormulaRange','insertFormula','2393KEsCbA','paragraph','getSnapshot','setNumberFormat','406PZjcFR','decorate','symbol','startIndex','SetDocFormulaNumberFormatCommand','iterator','getFormula','_docsFormulaModel','range','13530qYQWxY','DocFormulaModel','appendFormula','Inject','remove','saveUnit','customRanges','4265433KXRGcK','Module','UniverInstanceType','@univerjs/core','replaceWithFormula','function','exports','toPrimitive','2008260NXTGSv','convertToText','formula','IResourceLoaderService','UniverCore','6kLetHA','_univerInstanceService','3yULjGW','describe','UpdateDocFormulaCommand','_insert'];_0x522a=function(){return _0x55fb53;};return _0x522a();}(function(_0x1a319f,_0x138b7a){var _0x4cdb03=_0x835b,_0x3622e2=_0x1a319f();while(!![]){try{var _0x124398=-parseInt(_0x4cdb03(0x18c))/0x1*(-parseInt(_0x4cdb03(0x190))/0x2)+-parseInt(_0x4cdb03(0x144))/0x3*(parseInt(_0x4cdb03(0x16f))/0x4)+parseInt(_0x4cdb03(0x149))/0x5*(parseInt(_0x4cdb03(0x142))/0x6)+-parseInt(_0x4cdb03(0x175))/0x7*(parseInt(_0x4cdb03(0x153))/0x8)+parseInt(_0x4cdb03(0x1a0))/0x9+-parseInt(_0x4cdb03(0x13d))/0xa+-parseInt(_0x4cdb03(0x199))/0xb*(parseInt(_0x4cdb03(0x188))/0xc);if(_0x124398===_0x138b7a)break;else _0x3622e2['push'](_0x3622e2['shift']());}catch(_0x5e96fc){_0x3622e2['push'](_0x3622e2['shift']());}}}(_0x522a,0x519d6),function(_0xec9df5,_0x890dec){var _0x1efbd0=_0x835b;typeof exports==_0x1efbd0(0x16e)&&typeof module<'u'?_0x890dec(exports,require('@univerjs-pro/docs-formula'),require('@univerjs/core'),require('@univerjs/docs/facade')):typeof define=='function'&&define['amd']?define([_0x1efbd0(0x13b),_0x1efbd0(0x148),_0x1efbd0(0x138),'@univerjs/docs/facade'],_0x890dec):(_0xec9df5=typeof globalThis<'u'?globalThis:_0xec9df5||self,_0x890dec(_0xec9df5['UniverProDocsFormulaFacade']={},_0xec9df5[_0x1efbd0(0x185)],_0xec9df5[_0x1efbd0(0x141)],_0xec9df5[_0x1efbd0(0x16b)]));}(this,function(_0x24d214,_0x4e9bb1,_0x2d50a6,_0x21c7c4){var _0xfafe69=_0x835b;Object[_0xfafe69(0x151)](_0x24d214,Symbol[_0xfafe69(0x15f)],{'value':_0xfafe69(0x1a1)});function _0x171a71(_0x1e496f,_0x3fc976){return function(_0x48dc0f,_0x39cfa4){_0x3fc976(_0x48dc0f,_0x39cfa4,_0x1e496f);};}function _0xe4c0ca(_0xf207c9,_0x2a8105,_0x143219,_0x5971bf){var _0x42a0a6=_0xfafe69,_0x2da23b=arguments[_0x42a0a6(0x14e)],_0x28c589=_0x2da23b<0x3?_0x2a8105:_0x5971bf===null?_0x5971bf=Object[_0x42a0a6(0x163)](_0x2a8105,_0x143219):_0x5971bf,_0x3724dd;if(typeof Reflect=='object'&&typeof Reflect[_0x42a0a6(0x191)]==_0x42a0a6(0x13a))_0x28c589=Reflect[_0x42a0a6(0x191)](_0xf207c9,_0x2a8105,_0x143219,_0x5971bf);else{for(var _0x172a07=_0xf207c9[_0x42a0a6(0x14e)]-0x1;_0x172a07>=0x0;_0x172a07--)(_0x3724dd=_0xf207c9[_0x172a07])&&(_0x28c589=(_0x2da23b<0x3?_0x3724dd(_0x28c589):_0x2da23b>0x3?_0x3724dd(_0x2a8105,_0x143219,_0x28c589):_0x3724dd(_0x2a8105,_0x143219))||_0x28c589);}return _0x2da23b>0x3&&_0x28c589&&Object['defineProperty'](_0x2a8105,_0x143219,_0x28c589),_0x28c589;}let _0x323e96=class{constructor(_0x249e3b,_0x3b6042,_0x68d74,_0x200eb1,_0x2877e4,_0x3134ba){var _0x209dfd=_0xfafe69;this['_unitId']=_0x249e3b,this['_rangeId']=_0x3b6042,this[_0x209dfd(0x165)]=_0x68d74,this[_0x209dfd(0x158)]=_0x200eb1,this[_0x209dfd(0x173)]=_0x2877e4,this[_0x209dfd(0x143)]=_0x3134ba;}[_0xfafe69(0x154)](){var _0x2d9873=_0xfafe69;return this[_0x2d9873(0x168)];}['getRange'](){var _0x15a067=_0xfafe69;let _0x5e1f3a=this[_0x15a067(0x180)]();return _0x5e1f3a?{'endOffset':_0x5e1f3a[_0x15a067(0x183)]+0x1,'rangeId':_0x5e1f3a[_0x15a067(0x14a)],'startOffset':_0x5e1f3a[_0x15a067(0x193)]}:null;}['getFormula'](){var _0x4a8876=_0xfafe69,_0x20d69d;return((_0x20d69d=this[_0x4a8876(0x158)][_0x4a8876(0x196)](this[_0x4a8876(0x15d)],this[_0x4a8876(0x168)]))==null?void 0x0:_0x20d69d[_0x4a8876(0x13f)])??'';}[_0xfafe69(0x17d)](){var _0x12ae76=_0xfafe69;return this[_0x12ae76(0x158)][_0x12ae76(0x196)](this[_0x12ae76(0x15d)],this[_0x12ae76(0x168)])??null;}['getResult'](){var _0x3d5cc2=_0xfafe69;return this[_0x3d5cc2(0x173)][_0x3d5cc2(0x17e)]({'unitId':this[_0x3d5cc2(0x15d)],'rangeId':this[_0x3d5cc2(0x168)]})??null;}[_0xfafe69(0x145)](){var _0x5390d9=_0xfafe69;let _0x7002ec=this[_0x5390d9(0x177)](),_0x2fbbde=this[_0x5390d9(0x17d)](),_0x105f06=this[_0x5390d9(0x17e)]();return!_0x7002ec||!_0x2fbbde||!_0x105f06?null:{..._0x7002ec,'config':_0x2fbbde,'formula':_0x2fbbde[_0x5390d9(0x13f)],'result':_0x105f06,'type':_0x5390d9(0x13f)};}[_0xfafe69(0x164)](_0x3107d3){var _0x533da0=_0xfafe69;return this[_0x533da0(0x165)][_0x533da0(0x160)](_0x4e9bb1[_0x533da0(0x146)]['id'],{'externalReferences':_0x3107d3[_0x533da0(0x16a)],'formula':_0x3107d3[_0x533da0(0x13f)],'numberFormat':_0x3107d3[_0x533da0(0x162)],'rangeId':this[_0x533da0(0x168)],'unitId':this[_0x533da0(0x15d)]});}[_0xfafe69(0x18f)](_0x299db9){var _0x42ee24=_0xfafe69;return this[_0x42ee24(0x165)][_0x42ee24(0x160)](_0x4e9bb1[_0x42ee24(0x194)]['id'],{'numberFormat':_0x299db9,'rangeId':this[_0x42ee24(0x168)],'unitId':this[_0x42ee24(0x15d)]});}[_0xfafe69(0x19d)](){var _0x5095db=_0xfafe69;return this[_0x5095db(0x165)][_0x5095db(0x160)](_0x4e9bb1['RemoveDocFormulaCommand']['id'],{'rangeId':this[_0x5095db(0x168)],'unitId':this[_0x5095db(0x15d)]});}['replaceWithText'](_0x51f907){var _0x4c8dde=_0xfafe69;return this[_0x4c8dde(0x165)][_0x4c8dde(0x160)](_0x4e9bb1['ReplaceDocFormulaWithTextCommand']['id'],{'rangeId':this[_0x4c8dde(0x168)],'text':_0x51f907,'unitId':this['_unitId']});}[_0xfafe69(0x13e)](){var _0x27ae0a=_0xfafe69;return this[_0x27ae0a(0x165)][_0x27ae0a(0x160)](_0x4e9bb1[_0x27ae0a(0x171)]['id'],{'rangeId':this[_0x27ae0a(0x168)],'unitId':this[_0x27ae0a(0x15d)]});}[_0xfafe69(0x180)](){var _0x101862=_0xfafe69,_0x234af3;let _0x5b597c=this[_0x101862(0x143)][_0x101862(0x167)](this[_0x101862(0x15d)],_0x2d50a6[_0x101862(0x1a2)][_0x101862(0x184)]);return _0x5b597c==null||(_0x234af3=_0x5b597c[_0x101862(0x18e)]()[_0x101862(0x156)])==null||(_0x234af3=_0x234af3[_0x101862(0x19f)])==null?void 0x0:_0x234af3[_0x101862(0x186)](_0x3771df=>_0x3771df[_0x101862(0x14a)]===this[_0x101862(0x168)]&&(0x0,_0x4e9bb1[_0x101862(0x18a)])(_0x3771df));}};_0x323e96=_0xe4c0ca([_0x171a71(0x2,_0x2d50a6[_0xfafe69(0x14f)]),_0x171a71(0x3,(0x0,_0x2d50a6[_0xfafe69(0x19c)])(_0x4e9bb1['DocFormulaModel'])),_0x171a71(0x4,(0x0,_0x2d50a6['Inject'])(_0x4e9bb1[_0xfafe69(0x15e)])),_0x171a71(0x5,_0x2d50a6[_0xfafe69(0x152)])],_0x323e96);function _0x261570(_0x1c69ec){'@babel/helpers - typeof';var _0x301130=_0xfafe69;return _0x261570=typeof Symbol==_0x301130(0x13a)&&typeof Symbol[_0x301130(0x195)]==_0x301130(0x192)?function(_0x2e3d4e){return typeof _0x2e3d4e;}:function(_0x5b487e){var _0x1aaef4=_0x301130;return _0x5b487e&&typeof Symbol==_0x1aaef4(0x13a)&&_0x5b487e[_0x1aaef4(0x181)]===Symbol&&_0x5b487e!==Symbol['prototype']?_0x1aaef4(0x192):typeof _0x5b487e;},_0x261570(_0x1c69ec);}function _0x3e48b9(_0x38cb28,_0x188415){var _0x366717=_0xfafe69;if(_0x261570(_0x38cb28)!=_0x366717(0x16e)||!_0x38cb28)return _0x38cb28;var _0x3c40e9=_0x38cb28[Symbol[_0x366717(0x13c)]];if(_0x3c40e9!==void 0x0){var _0xd36cab=_0x3c40e9[_0x366717(0x15b)](_0x38cb28,_0x188415||'default');if(_0x261570(_0xd36cab)!=_0x366717(0x16e))return _0xd36cab;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x188415===_0x366717(0x150)?String:Number)(_0x38cb28);}function _0x16efab(_0x46be26){var _0x3c0a49=_0xfafe69,_0x1ab4cc=_0x3e48b9(_0x46be26,_0x3c0a49(0x150));return _0x261570(_0x1ab4cc)==_0x3c0a49(0x192)?_0x1ab4cc:_0x1ab4cc+'';}function _0x3dd66a(_0x29db3d,_0xd0ff7e,_0xdb13d){return(_0xd0ff7e=_0x16efab(_0xd0ff7e))in _0x29db3d?Object['defineProperty'](_0x29db3d,_0xd0ff7e,{'value':_0xdb13d,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x29db3d[_0xd0ff7e]=_0xdb13d,_0x29db3d;}var _0x559f69=class extends _0x21c7c4[_0xfafe69(0x157)]{constructor(..._0x1470e7){var _0x32f9ef=_0xfafe69;super(..._0x1470e7),_0x3dd66a(this,'_docsFormulaCommandService',void 0x0),_0x3dd66a(this,'_docsFormulaDisplayTextService',void 0x0),_0x3dd66a(this,_0x32f9ef(0x197),void 0x0),_0x3dd66a(this,_0x32f9ef(0x14b),void 0x0);}[_0xfafe69(0x17a)](_0x13f88b){var _0x1585fb=_0xfafe69;this[_0x1585fb(0x178)]=_0x13f88b[_0x1585fb(0x159)](_0x2d50a6[_0x1585fb(0x14f)]),this[_0x1585fb(0x170)]=_0x13f88b[_0x1585fb(0x159)](_0x4e9bb1['DocFormulaDisplayTextService']),this['_docsFormulaModel']=_0x13f88b[_0x1585fb(0x159)](_0x4e9bb1[_0x1585fb(0x19a)]),this[_0x1585fb(0x14b)]=_0x13f88b[_0x1585fb(0x159)](_0x2d50a6[_0x1585fb(0x140)]);}[_0xfafe69(0x169)](){var _0x507895=_0xfafe69;return this[_0x507895(0x179)]()[_0x507895(0x17c)](_0xafe7aa=>this['_createFormula'](_0xafe7aa[_0x507895(0x14a)]));}[_0xfafe69(0x196)](_0x36aa9f){var _0x2a77ed=_0xfafe69;return this[_0x2a77ed(0x179)]()['some'](_0x1f16eb=>_0x1f16eb[_0x2a77ed(0x14a)]===_0x36aa9f)?this[_0x2a77ed(0x174)](_0x36aa9f):null;}[_0xfafe69(0x15c)](_0x17ca22){var _0x4df485=_0xfafe69;let _0x5c2744=this[_0x4df485(0x179)]()[_0x4df485(0x186)](_0x4d7e3c=>_0x4d7e3c[_0x4df485(0x193)]<=_0x17ca22&&_0x17ca22<=_0x4d7e3c[_0x4df485(0x183)]);return _0x5c2744?this[_0x4df485(0x174)](_0x5c2744[_0x4df485(0x14a)]):null;}[_0xfafe69(0x16c)](){var _0x496f3b=_0xfafe69;let _0x15aefc=this[_0x496f3b(0x14b)][_0x496f3b(0x19e)](this['id']);if(!_0x15aefc)throw Error('Document\x20'+this['id']+'\x20could\x20not\x20be\x20serialized.');return this[_0x496f3b(0x170)][_0x496f3b(0x176)](_0x15aefc);}[_0xfafe69(0x18b)](_0x47b364){var _0x314ea0=_0xfafe69;return this[_0x314ea0(0x147)]({'externalReferences':_0x47b364[_0x314ea0(0x16a)],'formula':_0x47b364['formula'],'numberFormat':_0x47b364[_0x314ea0(0x162)],'target':{'type':_0x314ea0(0x198),'startOffset':_0x47b364[_0x314ea0(0x172)],'endOffset':_0x47b364[_0x314ea0(0x166)]},'unitId':this[_0x314ea0(0x154)]()});}[_0xfafe69(0x147)](_0x1b4372){var _0x40daf3=_0xfafe69;let _0xed3cd1=this[_0x40daf3(0x178)][_0x40daf3(0x160)](_0x4e9bb1[_0x40daf3(0x16d)]['id'],_0x1b4372);return _0xed3cd1?this['_createFormula'](_0xed3cd1[_0x40daf3(0x14a)]):null;}[_0xfafe69(0x179)](){var _0x3217c9=_0xfafe69,_0x59e78e;let _0x201166=this['_docsFormulaModel']['getFormulas'](this[_0x3217c9(0x154)]());return((_0x59e78e=this[_0x3217c9(0x17f)]('')[_0x3217c9(0x19f)])==null?void 0x0:_0x59e78e[_0x3217c9(0x161)](_0x21e0e6=>(0x0,_0x4e9bb1['isDocFormulaRange'])(_0x21e0e6)&&_0x201166[_0x21e0e6[_0x3217c9(0x14a)]]!=null))??[];}[_0xfafe69(0x174)](_0xc9e9df){var _0x248714=_0xfafe69;return this[_0x248714(0x15a)]['createInstance'](_0x323e96,this['getId'](),_0xc9e9df);}};_0x21c7c4['FDocument'][_0xfafe69(0x14c)](_0x559f69);var _0x456db2=class extends _0x21c7c4['FDocumentParagraph']{constructor(..._0x61f11d){super(..._0x61f11d),_0x3dd66a(this,'_docsFormulaCommandService',void 0x0);}[_0xfafe69(0x17a)](_0x3ff264){var _0x1a8afe=_0xfafe69;this[_0x1a8afe(0x178)]=_0x3ff264[_0x1a8afe(0x159)](_0x2d50a6[_0x1a8afe(0x14f)]);}['insertFormula'](_0x168a72,_0x3103fc,_0x246e47={}){var _0x5a6067=_0xfafe69;return this[_0x5a6067(0x147)](_0x168a72,_0x3103fc,_0x246e47);}[_0xfafe69(0x19b)](_0x544828,_0x3ac5c8={}){var _0x49bab2=_0xfafe69;return this[_0x49bab2(0x147)](_0x49bab2(0x17b),_0x544828,_0x3ac5c8);}[_0xfafe69(0x147)](_0x18f0d8,_0x44890c,_0x29f440){var _0xe812a5=_0xfafe69;if(this[_0xe812a5(0x187)]())return null;let _0x2ccc2d={'externalReferences':_0x29f440[_0xe812a5(0x16a)],'formula':_0x44890c,'numberFormat':_0x29f440[_0xe812a5(0x162)],'target':{'type':_0xe812a5(0x18d),'paragraphId':this[_0xe812a5(0x154)](),'position':_0x18f0d8},'unitId':this[_0xe812a5(0x155)]['getId']()},_0x24f179=this[_0xe812a5(0x178)][_0xe812a5(0x160)](_0x4e9bb1[_0xe812a5(0x16d)]['id'],_0x2ccc2d);return _0x24f179?this[_0xe812a5(0x15a)][_0xe812a5(0x14d)](_0x323e96,this[_0xe812a5(0x155)]['getId'](),_0x24f179['rangeId']):null;}};_0x21c7c4['FDocumentParagraph'][_0xfafe69(0x14c)](_0x456db2);var _0x16c1a9=class extends _0x21c7c4[_0xfafe69(0x182)]{constructor(..._0x5830d8){var _0x6ab9fd=_0xfafe69;super(..._0x5830d8),_0x3dd66a(this,_0x6ab9fd(0x178),void 0x0);}[_0xfafe69(0x17a)](_0x14e310){var _0xf99811=_0xfafe69;this[_0xf99811(0x178)]=_0x14e310['get'](_0x2d50a6[_0xf99811(0x14f)]);}[_0xfafe69(0x139)](_0x18cd20,_0x23a1e9={}){var _0x16c164=_0xfafe69;let {endOffset:_0x3c14b8,segmentId:_0xb07f74,startOffset:_0x3a9442}=this['getRange']();return _0xb07f74?null:this[_0x16c164(0x147)](_0x3a9442,_0x3c14b8,_0x18cd20,_0x23a1e9);}[_0xfafe69(0x147)](_0x5215fb,_0x5ae852,_0x30cfb1,_0x2c4130){var _0x147618=_0xfafe69;let _0x2f7a8d={'externalReferences':_0x2c4130[_0x147618(0x16a)],'formula':_0x30cfb1,'numberFormat':_0x2c4130[_0x147618(0x162)],'target':{'type':_0x147618(0x198),'startOffset':_0x5215fb,'endOffset':_0x5ae852},'unitId':this[_0x147618(0x155)][_0x147618(0x154)]()},_0x27e9d2=this[_0x147618(0x178)]['syncExecuteCommand'](_0x4e9bb1[_0x147618(0x16d)]['id'],_0x2f7a8d);return _0x27e9d2?this[_0x147618(0x15a)][_0x147618(0x14d)](_0x323e96,this[_0x147618(0x155)][_0x147618(0x154)](),_0x27e9d2[_0x147618(0x14a)]):null;}};_0x21c7c4[_0xfafe69(0x182)][_0xfafe69(0x14c)](_0x16c1a9),Object[_0xfafe69(0x151)](_0x24d214,_0xfafe69(0x189),{'enumerable':!0x0,'get':function(){return _0x323e96;}});}));
1
+ (function(_0x4a16be,_0x255019){var _0x6086ec=_0x5993,_0x4c7374=_0x4a16be();while(!![]){try{var _0x5289c7=parseInt(_0x6086ec(0x1c3))/0x1+-parseInt(_0x6086ec(0x1b6))/0x2+parseInt(_0x6086ec(0x1d0))/0x3*(-parseInt(_0x6086ec(0x1ce))/0x4)+parseInt(_0x6086ec(0x1b0))/0x5*(-parseInt(_0x6086ec(0x1ba))/0x6)+parseInt(_0x6086ec(0x19c))/0x7*(-parseInt(_0x6086ec(0x1dc))/0x8)+-parseInt(_0x6086ec(0x182))/0x9*(-parseInt(_0x6086ec(0x1e0))/0xa)+parseInt(_0x6086ec(0x1da))/0xb;if(_0x5289c7===_0x255019)break;else _0x4c7374['push'](_0x4c7374['shift']());}catch(_0x2541d5){_0x4c7374['push'](_0x4c7374['shift']());}}}(_0x43c2,0xda6b8),function(_0x39cc3e,_0x510822){var _0x158378=_0x5993;typeof exports==_0x158378(0x1b9)&&typeof module<'u'?_0x510822(exports,require('@univerjs-pro/docs-formula'),require('@univerjs/core'),require('@univerjs/docs/facade')):typeof define==_0x158378(0x1ad)&&define[_0x158378(0x1a5)]?define([_0x158378(0x1af),_0x158378(0x1d6),_0x158378(0x188),_0x158378(0x19f)],_0x510822):(_0x39cc3e=typeof globalThis<'u'?globalThis:_0x39cc3e||self,_0x510822(_0x39cc3e['UniverProDocsFormulaFacade']={},_0x39cc3e[_0x158378(0x17f)],_0x39cc3e['UniverCore'],_0x39cc3e[_0x158378(0x1ab)]));}(this,function(_0x3450d4,_0x3d42bb,_0xa08dd3,_0x22bf3b){var _0x2a5a97=_0x5993;Object['defineProperty'](_0x3450d4,Symbol[_0x2a5a97(0x198)],{'value':'Module'});function _0x42d631(_0x39fc70,_0x3d8556){return function(_0x1217ec,_0x39b440){_0x3d8556(_0x1217ec,_0x39b440,_0x39fc70);};}function _0x57a263(_0x115801,_0x3215ef,_0x215a5c,_0x34f7e2){var _0x21c2af=_0x2a5a97,_0xb16976=arguments[_0x21c2af(0x1b7)],_0x332a0d=_0xb16976<0x3?_0x3215ef:_0x34f7e2===null?_0x34f7e2=Object['getOwnPropertyDescriptor'](_0x3215ef,_0x215a5c):_0x34f7e2,_0x111817;if(typeof Reflect==_0x21c2af(0x1b9)&&typeof Reflect[_0x21c2af(0x1c2)]=='function')_0x332a0d=Reflect[_0x21c2af(0x1c2)](_0x115801,_0x3215ef,_0x215a5c,_0x34f7e2);else{for(var _0x5ce0f8=_0x115801['length']-0x1;_0x5ce0f8>=0x0;_0x5ce0f8--)(_0x111817=_0x115801[_0x5ce0f8])&&(_0x332a0d=(_0xb16976<0x3?_0x111817(_0x332a0d):_0xb16976>0x3?_0x111817(_0x3215ef,_0x215a5c,_0x332a0d):_0x111817(_0x3215ef,_0x215a5c))||_0x332a0d);}return _0xb16976>0x3&&_0x332a0d&&Object[_0x21c2af(0x196)](_0x3215ef,_0x215a5c,_0x332a0d),_0x332a0d;}let _0x44d8c0=class{constructor(_0x557c94,_0x456443,_0x17ae7d,_0x1b8bf3,_0x4007aa,_0x13162f){var _0x54af9e=_0x2a5a97;this[_0x54af9e(0x1cc)]=_0x557c94,this[_0x54af9e(0x1a0)]=_0x456443,this[_0x54af9e(0x19e)]=_0x17ae7d,this[_0x54af9e(0x197)]=_0x1b8bf3,this[_0x54af9e(0x190)]=_0x4007aa,this[_0x54af9e(0x1cb)]=_0x13162f;}[_0x2a5a97(0x1be)](){var _0x4b3b53=_0x2a5a97;return this[_0x4b3b53(0x1a0)];}[_0x2a5a97(0x1d2)](){var _0x313ce5=_0x2a5a97;let _0x2d362a=this[_0x313ce5(0x19a)]();return _0x2d362a?{'endOffset':_0x2d362a[_0x313ce5(0x1b4)]+0x1,'rangeId':_0x2d362a[_0x313ce5(0x17e)],'startOffset':_0x2d362a[_0x313ce5(0x181)]}:null;}[_0x2a5a97(0x1de)](){var _0x2e0f37=_0x2a5a97,_0x194356;return((_0x194356=this[_0x2e0f37(0x197)]['getFormula'](this[_0x2e0f37(0x1cc)],this[_0x2e0f37(0x1a0)]))==null?void 0x0:_0x194356[_0x2e0f37(0x1ca)])??'';}['getConfig'](){var _0x37fe0d=_0x2a5a97;return this[_0x37fe0d(0x197)][_0x37fe0d(0x1de)](this[_0x37fe0d(0x1cc)],this[_0x37fe0d(0x1a0)])??null;}[_0x2a5a97(0x1b2)](){var _0x393c55=_0x2a5a97;return this[_0x393c55(0x190)][_0x393c55(0x1b2)]({'unitId':this[_0x393c55(0x1cc)],'rangeId':this[_0x393c55(0x1a0)]})??null;}['describe'](){var _0x2065fc=_0x2a5a97;let _0x9a29c5=this[_0x2065fc(0x1d2)](),_0x120089=this[_0x2065fc(0x1db)](),_0x52e6c3=this[_0x2065fc(0x1b2)]();return!_0x9a29c5||!_0x120089||!_0x52e6c3?null:{..._0x9a29c5,'config':_0x120089,'formula':_0x120089['formula'],'result':_0x52e6c3,'type':_0x2065fc(0x1ca)};}[_0x2a5a97(0x1bd)](_0x3a64e4){var _0x52ae65=_0x2a5a97;return this[_0x52ae65(0x19e)][_0x52ae65(0x1cd)](_0x3d42bb[_0x52ae65(0x1a2)]['id'],{'externalReferences':_0x3a64e4['externalReferences'],'formula':_0x3a64e4[_0x52ae65(0x1ca)],'numberFormat':_0x3a64e4['numberFormat'],'rangeId':this['_rangeId'],'unitId':this[_0x52ae65(0x1cc)]});}['setNumberFormat'](_0x3c0bcc){var _0x211806=_0x2a5a97;return this[_0x211806(0x19e)][_0x211806(0x1cd)](_0x3d42bb[_0x211806(0x18e)]['id'],{'numberFormat':_0x3c0bcc,'rangeId':this[_0x211806(0x1a0)],'unitId':this[_0x211806(0x1cc)]});}[_0x2a5a97(0x185)](){var _0x50b398=_0x2a5a97;return this[_0x50b398(0x19e)]['syncExecuteCommand'](_0x3d42bb[_0x50b398(0x199)]['id'],{'rangeId':this[_0x50b398(0x1a0)],'unitId':this[_0x50b398(0x1cc)]});}[_0x2a5a97(0x1d5)](_0x15ac1e){var _0x1caf2b=_0x2a5a97;return this[_0x1caf2b(0x19e)][_0x1caf2b(0x1cd)](_0x3d42bb[_0x1caf2b(0x18d)]['id'],{'rangeId':this['_rangeId'],'text':_0x15ac1e,'unitId':this['_unitId']});}[_0x2a5a97(0x1b5)](){var _0x211009=_0x2a5a97;return this[_0x211009(0x19e)]['syncExecuteCommand'](_0x3d42bb['ConvertDocFormulaToTextCommand']['id'],{'rangeId':this['_rangeId'],'unitId':this[_0x211009(0x1cc)]});}['_getCustomRange'](){var _0x54e0be=_0x2a5a97,_0x347f76;let _0x4b2970=this[_0x54e0be(0x1cb)]['getUnit'](this[_0x54e0be(0x1cc)],_0xa08dd3[_0x54e0be(0x1a8)]['UNIVER_DOC']);return _0x4b2970==null||(_0x347f76=_0x4b2970['getSnapshot']()[_0x54e0be(0x18b)])==null||(_0x347f76=_0x347f76['customRanges'])==null?void 0x0:_0x347f76[_0x54e0be(0x1a1)](_0x277605=>_0x277605[_0x54e0be(0x17e)]===this[_0x54e0be(0x1a0)]&&(0x0,_0x3d42bb[_0x54e0be(0x1c4)])(_0x277605));}};_0x44d8c0=_0x57a263([_0x42d631(0x2,_0xa08dd3[_0x2a5a97(0x1c5)]),_0x42d631(0x3,(0x0,_0xa08dd3[_0x2a5a97(0x1cf)])(_0x3d42bb[_0x2a5a97(0x17b)])),_0x42d631(0x4,(0x0,_0xa08dd3[_0x2a5a97(0x1cf)])(_0x3d42bb[_0x2a5a97(0x1b8)])),_0x42d631(0x5,_0xa08dd3[_0x2a5a97(0x193)])],_0x44d8c0);function _0x56a9f0(_0x2a73b9){'@babel/helpers - typeof';var _0x348b4f=_0x2a5a97;return _0x56a9f0=typeof Symbol==_0x348b4f(0x1ad)&&typeof Symbol[_0x348b4f(0x1d3)]==_0x348b4f(0x18c)?function(_0x5cfac2){return typeof _0x5cfac2;}:function(_0x2dde8c){var _0x11ae24=_0x348b4f;return _0x2dde8c&&typeof Symbol==_0x11ae24(0x1ad)&&_0x2dde8c['constructor']===Symbol&&_0x2dde8c!==Symbol[_0x11ae24(0x1bf)]?_0x11ae24(0x18c):typeof _0x2dde8c;},_0x56a9f0(_0x2a73b9);}function _0x18608b(_0x112691,_0x4dbe19){var _0x20908a=_0x2a5a97;if(_0x56a9f0(_0x112691)!=_0x20908a(0x1b9)||!_0x112691)return _0x112691;var _0x2e0e=_0x112691[Symbol[_0x20908a(0x1b1)]];if(_0x2e0e!==void 0x0){var _0x1d52e0=_0x2e0e[_0x20908a(0x1a6)](_0x112691,_0x4dbe19||_0x20908a(0x1c0));if(_0x56a9f0(_0x1d52e0)!='object')return _0x1d52e0;throw TypeError(_0x20908a(0x1dd));}return(_0x4dbe19===_0x20908a(0x1aa)?String:Number)(_0x112691);}function _0x36fc7e(_0x408472){var _0x311fb7=_0x2a5a97,_0x29d2aa=_0x18608b(_0x408472,'string');return _0x56a9f0(_0x29d2aa)==_0x311fb7(0x18c)?_0x29d2aa:_0x29d2aa+'';}function _0x3df14f(_0x260311,_0x18ab2c,_0x56fded){var _0x4e4cea=_0x2a5a97;return(_0x18ab2c=_0x36fc7e(_0x18ab2c))in _0x260311?Object[_0x4e4cea(0x196)](_0x260311,_0x18ab2c,{'value':_0x56fded,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x260311[_0x18ab2c]=_0x56fded,_0x260311;}var _0x278f09=class extends _0x22bf3b[_0x2a5a97(0x1d4)]{constructor(..._0x1a5890){var _0x100a53=_0x2a5a97;super(..._0x1a5890),_0x3df14f(this,_0x100a53(0x183),void 0x0),_0x3df14f(this,_0x100a53(0x1d9),void 0x0),_0x3df14f(this,'_docsFormulaModel',void 0x0),_0x3df14f(this,_0x100a53(0x19d),void 0x0);}[_0x2a5a97(0x191)](_0x44c8d6){var _0xe6f12f=_0x2a5a97;this[_0xe6f12f(0x183)]=_0x44c8d6[_0xe6f12f(0x1bc)](_0xa08dd3[_0xe6f12f(0x1c5)]),this[_0xe6f12f(0x1d9)]=_0x44c8d6['get'](_0x3d42bb[_0xe6f12f(0x1d7)]),this[_0xe6f12f(0x194)]=_0x44c8d6[_0xe6f12f(0x1bc)](_0x3d42bb['DocFormulaModel']),this[_0xe6f12f(0x19d)]=_0x44c8d6['get'](_0xa08dd3[_0xe6f12f(0x1c1)]);}[_0x2a5a97(0x1b3)](){var _0x275a6a=_0x2a5a97;return this[_0x275a6a(0x1a4)]()[_0x275a6a(0x1ac)](_0x5921af=>this['_createFormula'](_0x5921af['rangeId']));}[_0x2a5a97(0x1de)](_0x12ec9b){var _0x29e7eb=_0x2a5a97;return this['_getCompleteRanges']()[_0x29e7eb(0x186)](_0x194aa2=>_0x194aa2['rangeId']===_0x12ec9b)?this[_0x29e7eb(0x1c9)](_0x12ec9b):null;}[_0x2a5a97(0x1a9)](_0x39eda8){var _0x1f1d80=_0x2a5a97;let _0x36c225=this[_0x1f1d80(0x1a4)]()[_0x1f1d80(0x1a1)](_0x5f1826=>_0x5f1826[_0x1f1d80(0x181)]<=_0x39eda8&&_0x39eda8<=_0x5f1826['endIndex']);return _0x36c225?this[_0x1f1d80(0x1c9)](_0x36c225[_0x1f1d80(0x17e)]):null;}[_0x2a5a97(0x1c6)](){var _0x544a13=_0x2a5a97;let _0xde9fe8=this[_0x544a13(0x19d)][_0x544a13(0x180)](this['id']);if(!_0xde9fe8)throw Error(_0x544a13(0x1c7)+this['id']+_0x544a13(0x1df));return this[_0x544a13(0x1d9)][_0x544a13(0x1a7)](_0xde9fe8);}[_0x2a5a97(0x1d8)](_0x34b15c){var _0x5ce13c=_0x2a5a97;return this[_0x5ce13c(0x195)]({'externalReferences':_0x34b15c['externalReferences'],'formula':_0x34b15c[_0x5ce13c(0x1ca)],'numberFormat':_0x34b15c[_0x5ce13c(0x192)],'target':{'type':_0x5ce13c(0x1d1),'startOffset':_0x34b15c[_0x5ce13c(0x187)],'endOffset':_0x34b15c[_0x5ce13c(0x19b)]},'unitId':this[_0x5ce13c(0x1be)]()});}[_0x2a5a97(0x195)](_0x351d65){var _0x1186d0=_0x2a5a97;let _0x232f42=this[_0x1186d0(0x183)][_0x1186d0(0x1cd)](_0x3d42bb[_0x1186d0(0x1ae)]['id'],_0x351d65);return _0x232f42?this[_0x1186d0(0x1c9)](_0x232f42['rangeId']):null;}[_0x2a5a97(0x1a4)](){var _0x5470da=_0x2a5a97,_0x2a8510;let _0x5674c2=this[_0x5470da(0x194)][_0x5470da(0x1b3)](this[_0x5470da(0x1be)]());return((_0x2a8510=this[_0x5470da(0x18a)]('')['customRanges'])==null?void 0x0:_0x2a8510['filter'](_0x1a672b=>(0x0,_0x3d42bb[_0x5470da(0x1c4)])(_0x1a672b)&&_0x5674c2[_0x1a672b[_0x5470da(0x17e)]]!=null))??[];}[_0x2a5a97(0x1c9)](_0x4b3b2d){var _0x1ca907=_0x2a5a97;return this[_0x1ca907(0x1c8)][_0x1ca907(0x189)](_0x44d8c0,this[_0x1ca907(0x1be)](),_0x4b3b2d);}};_0x22bf3b['FDocument'][_0x2a5a97(0x1a3)](_0x278f09);var _0x707824=class extends _0x22bf3b['FDocumentParagraph']{constructor(..._0x4158a4){super(..._0x4158a4),_0x3df14f(this,'_docsFormulaCommandService',void 0x0);}['_initialize'](_0x8a3f51){var _0x2e630e=_0x2a5a97;this[_0x2e630e(0x183)]=_0x8a3f51[_0x2e630e(0x1bc)](_0xa08dd3[_0x2e630e(0x1c5)]);}[_0x2a5a97(0x1d8)](_0x491b4b,_0x5cdeab,_0x211682={}){var _0x339549=_0x2a5a97;return this[_0x339549(0x195)](_0x491b4b,_0x5cdeab,_0x211682);}[_0x2a5a97(0x1bb)](_0x1e7d45,_0x594c59={}){var _0x4d8a95=_0x2a5a97;return this[_0x4d8a95(0x195)]('end',_0x1e7d45,_0x594c59);}[_0x2a5a97(0x195)](_0x23307f,_0xc5c9c3,_0x6352fe){var _0x48c745=_0x2a5a97;if(this['getSegmentId']())return null;let _0x3c1b0c={'externalReferences':_0x6352fe[_0x48c745(0x17c)],'formula':_0xc5c9c3,'numberFormat':_0x6352fe[_0x48c745(0x192)],'target':{'type':'paragraph','paragraphId':this[_0x48c745(0x1be)](),'position':_0x23307f},'unitId':this[_0x48c745(0x17d)][_0x48c745(0x1be)]()},_0x5109fb=this[_0x48c745(0x183)]['syncExecuteCommand'](_0x3d42bb['InsertDocFormulaCommand']['id'],_0x3c1b0c);return _0x5109fb?this[_0x48c745(0x1c8)]['createInstance'](_0x44d8c0,this[_0x48c745(0x17d)]['getId'](),_0x5109fb[_0x48c745(0x17e)]):null;}};_0x22bf3b['FDocumentParagraph'][_0x2a5a97(0x1a3)](_0x707824);var _0x468a2b=class extends _0x22bf3b[_0x2a5a97(0x18f)]{constructor(..._0xde82dd){var _0x5da032=_0x2a5a97;super(..._0xde82dd),_0x3df14f(this,_0x5da032(0x183),void 0x0);}[_0x2a5a97(0x191)](_0x5c3b12){var _0x25140e=_0x2a5a97;this[_0x25140e(0x183)]=_0x5c3b12[_0x25140e(0x1bc)](_0xa08dd3[_0x25140e(0x1c5)]);}['replaceWithFormula'](_0x2514d7,_0x5df20d={}){var _0x3066f8=_0x2a5a97;let {endOffset:_0x561005,segmentId:_0x561cf4,startOffset:_0x1761f2}=this[_0x3066f8(0x1d2)]();return _0x561cf4?null:this[_0x3066f8(0x195)](_0x1761f2,_0x561005,_0x2514d7,_0x5df20d);}[_0x2a5a97(0x195)](_0x342f71,_0xba273d,_0x6af3f7,_0x1b2bca){var _0xe0fb49=_0x2a5a97;let _0x2baba2={'externalReferences':_0x1b2bca[_0xe0fb49(0x17c)],'formula':_0x6af3f7,'numberFormat':_0x1b2bca[_0xe0fb49(0x192)],'target':{'type':_0xe0fb49(0x1d1),'startOffset':_0x342f71,'endOffset':_0xba273d},'unitId':this[_0xe0fb49(0x17d)][_0xe0fb49(0x1be)]()},_0x2f6a55=this[_0xe0fb49(0x183)][_0xe0fb49(0x1cd)](_0x3d42bb[_0xe0fb49(0x1ae)]['id'],_0x2baba2);return _0x2f6a55?this[_0xe0fb49(0x1c8)]['createInstance'](_0x44d8c0,this[_0xe0fb49(0x17d)][_0xe0fb49(0x1be)](),_0x2f6a55[_0xe0fb49(0x17e)]):null;}};_0x22bf3b[_0x2a5a97(0x18f)]['extend'](_0x468a2b),Object[_0x2a5a97(0x196)](_0x3450d4,_0x2a5a97(0x184),{'enumerable':!0x0,'get':function(){return _0x44d8c0;}});}));function _0x5993(_0x3171f3,_0x1e69f6){_0x3171f3=_0x3171f3-0x17b;var _0x43c203=_0x43c2();var _0x5993cd=_0x43c203[_0x3171f3];return _0x5993cd;}function _0x43c2(){var _0xe3105c=['UpdateDocFormulaCommand','extend','_getCompleteRanges','amd','call','degradeDocumentData','UniverInstanceType','getFormulaAt','string','UniverDocsFacade','map','function','InsertDocFormulaCommand','exports','7555YzLzsB','toPrimitive','getResult','getFormulas','endIndex','convertToText','2685972bAzmzE','length','DocFormulaService','object','2634dxzcmn','appendFormula','get','update','getId','prototype','default','IResourceLoaderService','decorate','826190LEOlXO','isDocFormulaRange','ICommandService','saveFormulaDisplayTextSnapshot','Document\x20','_injector','_createFormula','formula','_univerInstanceService','_unitId','syncExecuteCommand','13956IoqazZ','Inject','654Ngvvvj','range','getRange','iterator','FDocument','replaceWithText','@univerjs-pro/docs-formula','DocFormulaDisplayTextService','insertFormula','_docsFormulaDisplayTextService','48315135wScbKt','getConfig','8zEelyL','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','getFormula','\x20could\x20not\x20be\x20serialized.','2159290SIBpDc','DocFormulaModel','externalReferences','_document','rangeId','UniverProDocsFormula','saveUnit','startIndex','9IEtysH','_docsFormulaCommandService','FDocumentFormula','remove','some','startOffset','@univerjs/core','createInstance','getBody','body','symbol','ReplaceDocFormulaWithTextCommand','SetDocFormulaNumberFormatCommand','FDocumentTextRange','_service','_initialize','numberFormat','IUniverInstanceService','_docsFormulaModel','_insert','defineProperty','_model','toStringTag','RemoveDocFormulaCommand','_getCustomRange','endOffset','12409873wyDfdB','_docsFormulaResourceLoaderService','_commandService','@univerjs/docs/facade','_rangeId','find'];_0x43c2=function(){return _0xe3105c;};return _0x43c2();}