@univerjs-pro/docs-formula 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x18accd=_0x7514;(function(_0x273c35,_0x52e647){const _0x4aa040=_0x7514,_0x43da88=_0x273c35();while(!![]){try{const _0x21cc0c=-parseInt(_0x4aa040(0x1e1))/0x1*(parseInt(_0x4aa040(0x216))/0x2)+parseInt(_0x4aa040(0x24c))/0x3+-parseInt(_0x4aa040(0x1fc))/0x4*(parseInt(_0x4aa040(0x262))/0x5)+parseInt(_0x4aa040(0x243))/0x6*(parseInt(_0x4aa040(0x1c7))/0x7)+-parseInt(_0x4aa040(0x219))/0x8*(-parseInt(_0x4aa040(0x22e))/0x9)+parseInt(_0x4aa040(0x273))/0xa+-parseInt(_0x4aa040(0x256))/0xb*(parseInt(_0x4aa040(0x17b))/0xc);if(_0x21cc0c===_0x52e647)break;else _0x43da88['push'](_0x43da88['shift']());}catch(_0x564810){_0x43da88['push'](_0x43da88['shift']());}}}(_0x5397,0x9962a));import{FormulaCacheEligibilityService as _0x562e65,FormulaLastValuePersistenceService as _0x29a8c7,HostExternalReferenceModel as _0x39d327,UniverProFormulaEnginePlugin as _0x351eb2,buildUpsertHostExternalReferenceMutations as _0x52d94b,collectFormulaExternalReferenceQualifiers as _0x32274e,getScalarFormulaResultCell as _0x1f7dc0,resolveFormulaResultPresentation as _0x3cd2e8,resolveHostFormulaExternalReferences as _0x4ac795,toFormulaLastValue as _0x1d1d0a}from'@univerjs-pro/engine-formula';import{CellValueType as _0x3666f9,CommandType as _0x2c4aaa,CustomRangeType as _0x5034d1,DataStreamTreeTokenType as _0x2170ed,DependentOn as _0x2a626f,Disposable as _0x474e08,ICommandService as _0x222411,IConfigService as _0x2701f4,IResourceManagerService as _0x3b184b,IUndoRedoService as _0x513fde,IUniverInstanceService as _0x478f5d,Inject as _0x2bb8ca,Injector as _0x21727e,JSONX as _0x25fe93,Plugin as _0x2ed24f,TextX as _0x4c112a,Tools as _0x240c37,UniverInstanceType as _0x50d692,generateRandomId as _0x13e167,getBodySliceForTextXAction as _0x4d9adf,getCustomRangeInterval as _0x150f27,getParagraphContentStartOffset as _0x1c8c1a,getRichTextEditPath as _0x27773c,merge as _0x350a4c,shiftExclusiveRangeOnDelete as _0x1f2bf4,shiftExclusiveRangeOnInsert as _0x577f8f,shiftInclusiveRangeOnDelete as _0x594244,shiftInclusiveRangeOnInsert as _0x31a096,touchDependencies as _0x2ca687}from'@univerjs/core';import{DOC_SELECTION_OPTION_PRESERVE_CARET as _0x3ef325,DocSelectionManagerService as _0x32a2c9,DocTextResolverService as _0x329faf,RichTextEditingMutation as _0x2fe09d,UniverDocsPlugin as _0x5b3025}from'@univerjs/docs';import{FormulaResultStatus as _0x1f2db9,LexerTreeBuilder as _0x4914fd,OtherFormulaBizType as _0x2ec085,RegisterOtherFormulaService as _0x1a621d}from'@univerjs/engine-formula';import{Subject as _0x1ec16e}from'rxjs';import{UniverLicensePlugin as _0x3c3fb2}from'@univerjs-pro/license';const y='DOC_FORMULA_PLUGIN',je=0x1,Me=_0x18accd(0x1dd),Ne='';function b(){return{'schemaVersion':0x1,'formulas':{}};}function x(_0x344097){const _0x3c82e6=_0x18accd;return!_0x344097||typeof _0x344097!=_0x3c82e6(0x224)||!S(_0x344097,[_0x3c82e6(0x1b6),_0x3c82e6(0x1b9)])||!(_0x3c82e6(0x1b6)in _0x344097)||_0x344097[_0x3c82e6(0x1b6)]!==0x1||!(_0x3c82e6(0x1b9)in _0x344097)||!_0x344097[_0x3c82e6(0x1b9)]||typeof _0x344097['formulas']!=_0x3c82e6(0x224)||Array['isArray'](_0x344097[_0x3c82e6(0x1b9)])?!0x1:Object[_0x3c82e6(0x1c5)](_0x344097['formulas'])[_0x3c82e6(0x197)](([_0x2ca7ad,_0x288a19])=>_0x2ca7ad[_0x3c82e6(0x230)]>0x0&&Pe(_0x288a19));}function Pe(_0x3f5b06){const _0x5430b8=_0x18accd;return!_0x3f5b06||typeof _0x3f5b06!=_0x5430b8(0x224)||!S(_0x3f5b06,['formula',_0x5430b8(0x255),'lastValue'])||!('formula'in _0x3f5b06)||typeof _0x3f5b06[_0x5430b8(0x193)]!=_0x5430b8(0x218)||!_0x3f5b06[_0x5430b8(0x193)][_0x5430b8(0x272)]()||_0x5430b8(0x255)in _0x3f5b06&&_0x3f5b06[_0x5430b8(0x255)]!=null&&(typeof _0x3f5b06['numberFormat']!=_0x5430b8(0x224)||!S(_0x3f5b06[_0x5430b8(0x255)],[_0x5430b8(0x1f9)])||!(_0x5430b8(0x1f9)in _0x3f5b06[_0x5430b8(0x255)])||typeof _0x3f5b06[_0x5430b8(0x255)][_0x5430b8(0x1f9)]!=_0x5430b8(0x218))?!0x1:!(_0x5430b8(0x191)in _0x3f5b06)||_0x3f5b06[_0x5430b8(0x191)]==null||Fe(_0x3f5b06[_0x5430b8(0x191)]);}function Fe(_0x5eb3da){const _0x3fa065=_0x18accd;return!_0x5eb3da||typeof _0x5eb3da!=_0x3fa065(0x224)||!S(_0x5eb3da,['v','t',_0x3fa065(0x1f9)])||!('v'in _0x5eb3da)||_0x5eb3da['v']!==null&&typeof _0x5eb3da['v']!=_0x3fa065(0x218)&&typeof _0x5eb3da['v']!=_0x3fa065(0x232)&&typeof _0x5eb3da['v']!=_0x3fa065(0x26c)||'t'in _0x5eb3da&&_0x5eb3da['t']!=null&&!Ie(_0x5eb3da['t'])?!0x1:!(_0x3fa065(0x1f9)in _0x5eb3da)||_0x5eb3da['pattern']==null||typeof _0x5eb3da['pattern']==_0x3fa065(0x218);}function S(_0x2169c6,_0x2b70a2){const _0x5c6840=_0x18accd;let _0x2efa87=new Set(_0x2b70a2);return Object[_0x5c6840(0x1c9)](_0x2169c6)[_0x5c6840(0x197)](_0x5d4a45=>_0x2efa87[_0x5c6840(0x1f5)](_0x5d4a45));}function Ie(_0x4d834f){const _0x2e85bd=_0x18accd;return typeof _0x4d834f==_0x2e85bd(0x232)&&Object[_0x2e85bd(0x269)](_0x3666f9)[_0x2e85bd(0x258)](_0x4d834f);}const Le=new Set([_0x2170ed[_0x18accd(0x1b7)],_0x2170ed[_0x18accd(0x174)],_0x2170ed[_0x18accd(0x1c4)],_0x2170ed[_0x18accd(0x1d1)],_0x2170ed['TABLE_CELL_END'],_0x2170ed[_0x18accd(0x206)],_0x2170ed['TABLE_END'],_0x2170ed[_0x18accd(0x1d4)],_0x2170ed[_0x18accd(0x22c)],_0x2170ed[_0x18accd(0x17c)],_0x2170ed[_0x18accd(0x245)],_0x2170ed[_0x18accd(0x19d)],_0x2170ed[_0x18accd(0x214)],_0x2170ed[_0x18accd(0x1ef)]]);var C=class extends Error{constructor(){const _0x15c723=_0x18accd;super(_0x15c723(0x1e5));}};function Re(_0x54cee4){const _0x4a1aa7=_0x18accd;var _0x7803a7,_0x4d47a9;let _0x4ca420=_0x240c37[_0x4a1aa7(0x1a4)](_0x54cee4['documentData']),_0x3b7cb2=j(_0x4ca420),{startOffset:_0x4b9650,endOffset:_0x1e7fa8}=We(_0x3b7cb2,_0x54cee4[_0x4a1aa7(0x23d)],_0x54cee4[_0x4a1aa7(0x200)]);He(_0x3b7cb2,_0x4b9650,_0x1e7fa8);let _0xf41f6b=((_0x7803a7=_0x3b7cb2[_0x4a1aa7(0x1a6)])==null?void 0x0:_0x7803a7['filter'](_0x4463b7=>{const _0x59a358=_0x4a1aa7;if(!w(_0x4463b7))return!0x1;let _0x5bffdb=_0x150f27(_0x4463b7);return _0x5bffdb[_0x59a358(0x200)]>_0x4b9650&&_0x5bffdb[_0x59a358(0x23d)]<_0x1e7fa8;})[_0x4a1aa7(0x1f3)](_0x3f52ba=>_0x3f52ba[_0x4a1aa7(0x251)]))??[];qe(_0x3b7cb2,_0x4b9650,_0x1e7fa8,''),_0x3b7cb2[_0x4a1aa7(0x1a6)]=[...((_0x4d47a9=_0x3b7cb2['customRanges'])==null?void 0x0:_0x4d47a9[_0x4a1aa7(0x252)](_0x5e9681=>!_0xf41f6b[_0x4a1aa7(0x258)](_0x5e9681['rangeId'])&&_0x5e9681[_0x4a1aa7(0x251)]!==_0x54cee4[_0x4a1aa7(0x251)]))??[],Ue(_0x54cee4['rangeId'],_0x4b9650)][_0x4a1aa7(0x1dc)]((_0x200734,_0x2388ab)=>_0x200734[_0x4a1aa7(0x24f)]-_0x2388ab[_0x4a1aa7(0x24f)]);let _0x1261da=E(_0x54cee4[_0x4a1aa7(0x192)]);return _0xf41f6b['forEach'](_0x110c5d=>{const _0x5bf302=_0x4a1aa7;delete _0x1261da[_0x5bf302(0x1b9)][_0x110c5d];}),_0x1261da[_0x4a1aa7(0x1b9)][_0x54cee4[_0x4a1aa7(0x251)]]=_0x240c37['deepClone'](_0x54cee4['config']),{'nextDocumentData':_0x4ca420,'nextResource':_0x1261da,'cursorOffset':_0x4b9650+0x1};}function ze(_0x2a4391){const _0xa6368f=_0x18accd;var _0x39a7ce,_0x250a9d;let _0x20c2cc=_0x240c37[_0xa6368f(0x1a4)](_0x2a4391[_0xa6368f(0x17e)]),_0x4c2a4f=(_0x39a7ce=j(_0x20c2cc)['customRanges'])==null?void 0x0:_0x39a7ce['find'](_0x1f4ce3=>_0x1f4ce3[_0xa6368f(0x251)]===_0x2a4391[_0xa6368f(0x251)]&&w(_0x1f4ce3));if(!_0x4c2a4f||!((_0x250a9d=_0x2a4391['resource'])!=null&&_0x250a9d[_0xa6368f(0x1b9)][_0x2a4391[_0xa6368f(0x251)]]))return null;let _0x3c1b47=E(_0x2a4391[_0xa6368f(0x192)]);return _0x3c1b47[_0xa6368f(0x1b9)][_0x2a4391[_0xa6368f(0x251)]]=_0x240c37['deepClone'](_0x2a4391[_0xa6368f(0x1ba)]),{'nextDocumentData':_0x20c2cc,'nextResource':_0x3c1b47,'cursorOffset':_0x4c2a4f['endIndex']+0x1};}function Be(_0x1cead2){const _0x4ac730=_0x18accd;let _0x195b93=_0x240c37['deepClone'](_0x1cead2['documentData']),_0x3c2a90=Je(_0x195b93,_0x1cead2[_0x4ac730(0x251)],_0x1cead2['text']??'');if(_0x3c2a90==null)return null;let _0x24e595=E(_0x1cead2[_0x4ac730(0x192)]);return delete _0x24e595[_0x4ac730(0x1b9)][_0x1cead2[_0x4ac730(0x251)]],{'nextDocumentData':_0x195b93,'nextResource':_0x24e595,'cursorOffset':_0x3c2a90};}function Ve(_0x53e3f1,_0x395441){const _0x3f424e=_0x18accd;var _0x1119bf;let _0x124bee=_0x240c37['deepClone'](_0x53e3f1),_0x3b4054=_0x124bee[_0x3f424e(0x212)];if(!_0x3b4054)return _0x124bee;let _0x5b2344=new Map(_0x395441[_0x3f424e(0x1f3)](_0xb317c9=>[_0xb317c9[_0x3f424e(0x251)],_0xb317c9['text']])),_0x5abc6e=((_0x1119bf=_0x3b4054[_0x3f424e(0x1a6)])==null?void 0x0:_0x1119bf[_0x3f424e(0x252)](_0x2fc614=>w(_0x2fc614)&&_0x5b2344[_0x3f424e(0x1f5)](_0x2fc614['rangeId']))[_0x3f424e(0x1dc)]((_0x522338,_0x14dfe9)=>_0x14dfe9[_0x3f424e(0x24f)]-_0x522338['startIndex']))??[];for(let _0x5dee21 of _0x5abc6e)Je(_0x124bee,_0x5dee21[_0x3f424e(0x251)],_0x5b2344[_0x3f424e(0x1ab)](_0x5dee21['rangeId'])??'');return _0x124bee;}function w(_0x484d73){const _0x32ab81=_0x18accd;var _0x5c91ac;return(_0x484d73==null?void 0x0:_0x484d73[_0x32ab81(0x176)])===_0x5034d1[_0x32ab81(0x231)]&&_0x484d73[_0x32ab81(0x240)]===!0x0&&((_0x5c91ac=_0x484d73[_0x32ab81(0x20f)])==null?void 0x0:_0x5c91ac[_0x32ab81(0x268)])===_0x32ab81(0x1dd);}function T(_0x56a2d3,_0x3e5208){const _0x30ab57=_0x18accd;var _0x1feebd;return _0x56a2d3==null||(_0x1feebd=_0x56a2d3[_0x30ab57(0x1a6)])==null?void 0x0:_0x1feebd[_0x30ab57(0x20a)](_0x511678=>_0x511678[_0x30ab57(0x251)]===_0x3e5208&&w(_0x511678));}function He(_0x3be2be,_0x1efa2a,_0x7f8b40){const _0x5884a0=_0x18accd;if(_0x1efa2a===_0x7f8b40){if(Le[_0x5884a0(0x1f5)](_0x3be2be['dataStream'][_0x1efa2a]))throw new C();}else{for(let _0x84ed1f=_0x1efa2a;_0x84ed1f<_0x7f8b40;_0x84ed1f++)if(_0x3be2be[_0x5884a0(0x1d2)][_0x84ed1f]===_0x2170ed['PARAGRAPH']||Le[_0x5884a0(0x1f5)](_0x3be2be[_0x5884a0(0x1d2)][_0x84ed1f]))throw new C();}}function Ue(_0xb20bc5,_0x2c5561){const _0x5ccaa9=_0x18accd;return{'startIndex':_0x2c5561,'endIndex':_0x2c5561,'rangeId':_0xb20bc5,'rangeType':_0x5034d1[_0x5ccaa9(0x231)],'wholeEntity':!0x0,'properties':{'kind':Me}};}function E(_0x2e474f){const _0x501889=_0x18accd;return _0x2e474f?_0x240c37[_0x501889(0x1a4)](_0x2e474f):b();}function We(_0x1ae661,_0x58700e,_0x2a8704){const _0x12cdb8=_0x18accd;let _0x363931=Ke(_0x1ae661),_0x142722=_0x58700e??_0x363931,_0x35ed94=_0x2a8704??_0x142722;return{'startOffset':Ge(Math[_0x12cdb8(0x1da)](_0x142722,_0x35ed94),_0x363931),'endOffset':Ge(Math[_0x12cdb8(0x1d6)](_0x142722,_0x35ed94),_0x363931)};}function Ge(_0x58958b,_0x2e2cd4){const _0x315b4e=_0x18accd;return Math[_0x315b4e(0x1d6)](0x0,Math['min'](_0x58958b,_0x2e2cd4));}function Ke(_0x18ce3d){const _0x1222c1=_0x18accd;return _0x18ce3d[_0x1222c1(0x1d2)][_0x1222c1(0x1b3)](''+_0x2170ed[_0x1222c1(0x1fd)]+_0x2170ed[_0x1222c1(0x1b7)])?Math[_0x1222c1(0x1d6)](0x0,_0x18ce3d[_0x1222c1(0x1d2)][_0x1222c1(0x230)]-0x2):_0x18ce3d[_0x1222c1(0x1d2)][_0x1222c1(0x1b3)](_0x2170ed[_0x1222c1(0x1b7)])?Math[_0x1222c1(0x1d6)](0x0,_0x18ce3d['dataStream']['length']-0x1):_0x18ce3d[_0x1222c1(0x1d2)]['length'];}function qe(_0x110ad0,_0x23c137,_0x24a03f,_0x347c6c){_0x24a03f>_0x23c137&&Xe(_0x110ad0,_0x23c137,_0x24a03f),Ye(_0x110ad0,_0x23c137,_0x347c6c);}function Je(_0x2a8b40,_0x433896,_0x45b4d5){const _0x2b04fe=_0x18accd;var _0x325f85,_0x4bd112;let _0x46c205=j(_0x2a8b40),_0x415d15=(_0x325f85=_0x46c205[_0x2b04fe(0x1a6)])==null?void 0x0:_0x325f85[_0x2b04fe(0x20a)](_0x55b043=>_0x55b043['rangeId']===_0x433896&&w(_0x55b043));if(!_0x415d15)return null;let _0x1e8069=_0x150f27(_0x415d15);return qe(_0x46c205,_0x1e8069['startOffset'],_0x1e8069[_0x2b04fe(0x200)],_0x45b4d5),_0x46c205['customRanges']=(_0x4bd112=_0x46c205['customRanges'])==null?void 0x0:_0x4bd112['filter'](_0x162182=>_0x162182[_0x2b04fe(0x251)]!==_0x433896),_0x1e8069[_0x2b04fe(0x23d)]+_0x45b4d5[_0x2b04fe(0x230)];}function Ye(_0x1cafbc,_0x22c125,_0x7db800){const _0xca0d75=_0x18accd;_0x7db800&&(_0x1cafbc[_0xca0d75(0x1d2)]=''+_0x1cafbc[_0xca0d75(0x1d2)][_0xca0d75(0x22a)](0x0,_0x22c125)+_0x7db800+_0x1cafbc['dataStream'][_0xca0d75(0x22a)](_0x22c125),Ze(_0x1cafbc,_0x22c125,_0x7db800[_0xca0d75(0x230)]));}function Xe(_0xdd9274,_0x4e2b9f,_0x4696aa){const _0x5e9033=_0x18accd;let _0x20d945=_0x4696aa-_0x4e2b9f;_0xdd9274[_0x5e9033(0x1d2)]=''+_0xdd9274[_0x5e9033(0x1d2)][_0x5e9033(0x22a)](0x0,_0x4e2b9f)+_0xdd9274[_0x5e9033(0x1d2)][_0x5e9033(0x22a)](_0x4696aa),Qe(_0xdd9274,_0x4e2b9f,_0x20d945);}function Ze(_0x1a1957,_0x19ca08,_0x45af4c){const _0x378a35=_0x18accd;_0x1a1957[_0x378a35(0x18d)]=D(_0x1a1957[_0x378a35(0x18d)],_0x19ca08,_0x45af4c),_0x1a1957[_0x378a35(0x20e)]=D(_0x1a1957[_0x378a35(0x20e)],_0x19ca08,_0x45af4c),_0x1a1957[_0x378a35(0x18c)]=D(_0x1a1957['customBlocks'],_0x19ca08,_0x45af4c),_0x1a1957['textRuns']=$e(_0x1a1957[_0x378a35(0x1e4)],_0x19ca08,_0x45af4c),_0x1a1957[_0x378a35(0x20b)]=et(_0x1a1957['tables'],_0x19ca08,_0x45af4c),_0x1a1957[_0x378a35(0x270)]=k(_0x1a1957[_0x378a35(0x270)],_0x19ca08,_0x45af4c),_0x1a1957[_0x378a35(0x1a6)]=k(_0x1a1957['customRanges'],_0x19ca08,_0x45af4c),_0x1a1957[_0x378a35(0x1cd)]=k(_0x1a1957['customDecorations'],_0x19ca08,_0x45af4c),_0x1a1957['blockRanges']=k(_0x1a1957['blockRanges'],_0x19ca08,_0x45af4c);}function _0x5397(){const _0x2b8957=['formulaId','paragraph','pattern','startsWith','EMPTY','132esgrMo','PARAGRAPH','model','_formulaKeys','endOffset','deleteFormula','trigger','unsupported-version','registerFormulaWithRange','pushUndoRedo','TABLE_ROW_END','range','parse','decorate','find','tables','docs-formula.command.remove','_presentationChanged$','sectionBreaks','properties','insertLength','_hostExternalReferenceModel','body','invalid-resource','BLOCK_END','registerPluginResource','1097396tEbydu','documentRedo','string','8LZBHpj','_deleteRegistration','docs-formula.command.replace-with-text','cell','setFormula','defineProperty','redoMutation','expectedNumberFormat','blockRanges','getBody','disposeWithMe','object','some','_rawResources','_commandService','_univerInstanceService','resourceRedo','slice','replaceDocRanges','COLUMN_START','docs-formula.mutation.set-formula','10342791tomNcH','docs-formula.config','length','CUSTOM','number','function','sequenceNodesBuilder','empty','selection','serialize','_queueSync','isInteger','nextResource','resourceUndo','docs-formula.command.insert','startOffset','symbol','_syncUnit','wholeEntity','getResult','text','1014YJGGnd','color','COLUMN_GROUP_END','externalMutations','liveResult','setResource','setFormulas','cursorOffset','_cacheEligibilityService','450867DfRcBS','UNIVER_DOC','externalReferences','startIndex','type','rangeId','filter','push','document','numberFormat','11ttnRiE','getUnit','includes','resolveText','getFormula','delete','change$','docs-formula.command.set-number-format','assign','default','eligible','getLoadError','73195LmCjnD','resources','updates','_updateFormulaResult','getUnitId','clear','kind','values','getResource','getFormulas','boolean','getRevision','_change$','referenceRevision','columnGroups','resolveFormula','trim','234590MUUdJC','_loadErrors','TABLE_START','identity','rangeType','docs-formula.command.update','nextDocumentData','_configService','version','5380896YrmuEk','COLUMN_END','DOC_FORMULA_PLUGIN','documentData','_model','deleteLength','_service','call','removeFormula','stringify','expectedFormula','dispose','editOp','next','presentation','asObservable','data','customBlocks','paragraphs','status','getTextRanges','MUTATION','lastValue','resource','formula','_setPresentation','getCurrentUnitOfType','accessor','every','unregister','retain','load','_config','forEach','BLOCK_START','references','endIndex','getPresentation','segmentId','unregisterUnit','_isDisposed','deepClone','success','customRanges','_pendingUnitIds','register','ERROR','start','get','_resources','unitId','unitDisposed$','add','resolved','getSnapshot','syncUnit','endsWith','_instanceService','degradeDocumentData','schemaVersion','SECTION_BREAK','syncExecuteCommand','formulas','config','removeUnit','_registrationService','complete','error','_registrations','prototype','target','presentationChanged$','onCommandExecuted','TABLE_ROW_START','entries','resolveBinding','32536JmBRsu','name','keys','getOwnPropertyDescriptor','stale','setConfig','customDecorations','_formulaService','Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.','PENDING','TABLE_CELL_START','dataStream','subscribe','COLUMN_GROUP_START','set','max','onStarting','SUCCESS','_preserveInvalid','min','iterator','sort','univer-docs-formula','pluginName','params','_docFormulaModel','1PpzLRN','position','_injector','textRuns','Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries','source','registerCommand','getFormulaValueSync','pending','formulaResult$','_syncScheduled','from','insert','previousDocumentData','CUSTOM_BLOCK','COMMAND','undoMutation','getRegisteredFormulas','map','getInstance','has','getAllUnitsForType'];_0x5397=function(){return _0x2b8957;};return _0x5397();}function Qe(_0x1eddb0,_0x814e3f,_0x51e098){const _0xd7baac=_0x18accd;var _0x3adf4e,_0xe627d5;_0x1eddb0[_0xd7baac(0x18d)]=O(_0x1eddb0['paragraphs'],_0x814e3f,_0x51e098),_0x1eddb0[_0xd7baac(0x20e)]=O(_0x1eddb0[_0xd7baac(0x20e)],_0x814e3f,_0x51e098),_0x1eddb0[_0xd7baac(0x18c)]=O(_0x1eddb0[_0xd7baac(0x18c)],_0x814e3f,_0x51e098),_0x1eddb0['textRuns']=(_0x3adf4e=tt((_0xe627d5=_0x1eddb0['textRuns'])==null?void 0x0:_0xe627d5['map'](_0x414ef8=>({..._0x414ef8,'startIndex':_0x414ef8['st'],'endIndex':_0x414ef8['ed']})),_0x814e3f,_0x51e098))==null?void 0x0:_0x3adf4e[_0xd7baac(0x1f3)](_0x5c77cc=>{let {startIndex:_0x4b55bc,endIndex:_0x552e87,..._0x353b1f}=_0x5c77cc;return{..._0x353b1f,'st':_0x4b55bc,'ed':_0x552e87};}),_0x1eddb0[_0xd7baac(0x20b)]=tt(_0x1eddb0['tables'],_0x814e3f,_0x51e098),_0x1eddb0['columnGroups']=A(_0x1eddb0['columnGroups'],_0x814e3f,_0x51e098),_0x1eddb0['customRanges']=A(_0x1eddb0[_0xd7baac(0x1a6)],_0x814e3f,_0x51e098),_0x1eddb0[_0xd7baac(0x1cd)]=A(_0x1eddb0[_0xd7baac(0x1cd)],_0x814e3f,_0x51e098),_0x1eddb0[_0xd7baac(0x221)]=A(_0x1eddb0[_0xd7baac(0x221)],_0x814e3f,_0x51e098);}function D(_0x2bb4e4,_0x3c3e72,_0x4beb38){const _0x3c4b66=_0x18accd;return _0x2bb4e4==null?void 0x0:_0x2bb4e4[_0x3c4b66(0x1f3)](_0x5ba4a9=>_0x5ba4a9[_0x3c4b66(0x24f)]>=_0x3c3e72?{..._0x5ba4a9,'startIndex':_0x5ba4a9[_0x3c4b66(0x24f)]+_0x4beb38}:_0x5ba4a9);}function O(_0x5dcd7f,_0x2011c0,_0x16deca){const _0x3b5e55=_0x18accd;let _0x599e09=_0x2011c0+_0x16deca;return _0x5dcd7f==null?void 0x0:_0x5dcd7f[_0x3b5e55(0x1f3)](_0x487c1c=>_0x487c1c[_0x3b5e55(0x24f)]>=_0x2011c0&&_0x487c1c[_0x3b5e55(0x24f)]<_0x599e09?null:_0x487c1c['startIndex']>=_0x599e09?{..._0x487c1c,'startIndex':_0x487c1c[_0x3b5e55(0x24f)]-_0x16deca}:_0x487c1c)[_0x3b5e55(0x252)](_0x57267b=>_0x57267b!=null);}function $e(_0x305acd,_0x3e4312,_0x405c18){const _0x5995f8=_0x18accd;return _0x305acd==null?void 0x0:_0x305acd[_0x5995f8(0x1f3)](_0xc71178=>_0xc71178['st']>=_0x3e4312?{..._0xc71178,'st':_0xc71178['st']+_0x405c18,'ed':_0xc71178['ed']+_0x405c18}:_0xc71178['ed']>_0x3e4312?{..._0xc71178,'ed':_0xc71178['ed']+_0x405c18}:_0xc71178);}function k(_0x4e97e1,_0x2c2e32,_0x5ce83c){return _0x4e97e1==null?void 0x0:_0x4e97e1['map'](_0x160fea=>_0x31a096(_0x160fea,_0x2c2e32,_0x5ce83c));}function et(_0x5f5d3e,_0x283588,_0x565763){const _0x299c01=_0x18accd;return _0x5f5d3e==null?void 0x0:_0x5f5d3e[_0x299c01(0x1f3)](_0x1262ba=>_0x577f8f(_0x1262ba,_0x283588,_0x565763));}function A(_0x3469f0,_0x2a3403,_0x34a708){const _0x283fe6=_0x18accd;return _0x3469f0==null?void 0x0:_0x3469f0[_0x283fe6(0x1f3)](_0x5bada8=>_0x594244(_0x5bada8,_0x2a3403,_0x34a708))[_0x283fe6(0x252)](_0x276490=>_0x276490!=null);}function tt(_0x6cd74a,_0x6f48fc,_0x344e9a){const _0xf72a5c=_0x18accd;return _0x6cd74a==null?void 0x0:_0x6cd74a['map'](_0xf7ad2a=>_0x1f2bf4(_0xf7ad2a,_0x6f48fc,_0x344e9a))[_0xf72a5c(0x252)](_0x107c21=>_0x107c21!=null);}function j(_0x30eed3){const _0x35f2df=_0x18accd;if(!_0x30eed3['body'])throw Error(_0x35f2df(0x1cf));return _0x30eed3['body'];}function M(_0xdbd6e4){'@babel/helpers - typeof';const _0x476da2=_0x18accd;return M=typeof Symbol==_0x476da2(0x233)&&typeof Symbol[_0x476da2(0x1db)]==_0x476da2(0x23e)?function(_0x106f38){return typeof _0x106f38;}:function(_0x15d522){const _0x898968=_0x476da2;return _0x15d522&&typeof Symbol==_0x898968(0x233)&&_0x15d522['constructor']===Symbol&&_0x15d522!==Symbol[_0x898968(0x1c0)]?_0x898968(0x23e):typeof _0x15d522;},M(_0xdbd6e4);}function nt(_0x404754,_0x335bbc){const _0x2be563=_0x18accd;if(M(_0x404754)!='object'||!_0x404754)return _0x404754;var _0x2d6f32=_0x404754[Symbol['toPrimitive']];if(_0x2d6f32!==void 0x0){var _0xbe45f3=_0x2d6f32[_0x2be563(0x182)](_0x404754,_0x335bbc||_0x2be563(0x25f));if(M(_0xbe45f3)!='object')return _0xbe45f3;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x335bbc===_0x2be563(0x218)?String:Number)(_0x404754);}function rt(_0x347a2e){const _0x1c34eb=_0x18accd;var _0x1aafee=nt(_0x347a2e,_0x1c34eb(0x218));return M(_0x1aafee)=='symbol'?_0x1aafee:_0x1aafee+'';}function N(_0x290c0b,_0x4219a2,_0x48620b){return(_0x4219a2=rt(_0x4219a2))in _0x290c0b?Object['defineProperty'](_0x290c0b,_0x4219a2,{'value':_0x48620b,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x290c0b[_0x4219a2]=_0x48620b,_0x290c0b;}var P=class extends _0x474e08{constructor(..._0x297f4d){const _0x2b6ca4=_0x18accd;super(..._0x297f4d),N(this,_0x2b6ca4(0x1ac),new Map()),N(this,'_rawResources',new Map()),N(this,_0x2b6ca4(0x173),new Map()),N(this,'_change$',new _0x1ec16e()),N(this,_0x2b6ca4(0x25c),this['_change$'][_0x2b6ca4(0x18a)]());}[_0x18accd(0x25a)](_0x560461,_0x1cf4ed){const _0x29ebf1=_0x18accd;var _0x3fd025;let _0x5429e2=(_0x3fd025=this['_resources'][_0x29ebf1(0x1ab)](_0x560461))==null?void 0x0:_0x3fd025[_0x29ebf1(0x1b9)][_0x1cf4ed];return _0x5429e2?_0x240c37['deepClone'](_0x5429e2):void 0x0;}['getFormulas'](_0x437ed2){const _0x4c3e33=_0x18accd;var _0x2d8c1e;return _0x240c37[_0x4c3e33(0x1a4)](((_0x2d8c1e=this['_resources'][_0x4c3e33(0x1ab)](_0x437ed2))==null?void 0x0:_0x2d8c1e['formulas'])??{});}['getResource'](_0x1fe717){const _0xbfa4ee=_0x18accd;let _0x349b5d=this[_0xbfa4ee(0x1ac)][_0xbfa4ee(0x1ab)](_0x1fe717);return _0x349b5d?_0x240c37[_0xbfa4ee(0x1a4)](_0x349b5d):void 0x0;}[_0x18accd(0x21d)](_0x354d50,_0x21273c,_0x1db87d){const _0x7d6ad4=_0x18accd;return this[_0x7d6ad4(0x249)](_0x354d50,{[_0x21273c]:_0x1db87d});}[_0x18accd(0x248)](_0x42b792,_0x5ec5f7){const _0x4ae753=_0x18accd;return this['_loadErrors']['has'](_0x42b792)||!x(_0x5ec5f7)?!0x1:(this[_0x4ae753(0x1ac)]['set'](_0x42b792,_0x240c37['deepClone'](_0x5ec5f7)),this[_0x4ae753(0x26e)][_0x4ae753(0x188)]({'unitId':_0x42b792}),!0x0);}[_0x18accd(0x249)](_0xa0343b,_0x16ce1d){const _0x2f5142=_0x18accd;if(this[_0x2f5142(0x173)][_0x2f5142(0x1f5)](_0xa0343b)||!Object[_0x2f5142(0x1c9)](_0x16ce1d)[_0x2f5142(0x230)]||!x({'schemaVersion':0x1,'formulas':_0x16ce1d}))return!0x1;let _0x238d2a=this[_0x2f5142(0x1ac)][_0x2f5142(0x1ab)](_0xa0343b)??b(),_0xbfe465=_0x240c37[_0x2f5142(0x1a4)](_0x238d2a);return Object[_0x2f5142(0x25e)](_0xbfe465[_0x2f5142(0x1b9)],_0x240c37['deepClone'](_0x16ce1d)),this[_0x2f5142(0x1ac)][_0x2f5142(0x1d5)](_0xa0343b,_0xbfe465),this[_0x2f5142(0x26e)][_0x2f5142(0x188)]({'unitId':_0xa0343b,'rangeIds':Object[_0x2f5142(0x1c9)](_0x16ce1d)}),!0x0;}[_0x18accd(0x183)](_0x56bd93,_0x5054b7){const _0x1336b3=_0x18accd;if(this[_0x1336b3(0x173)][_0x1336b3(0x1f5)](_0x56bd93))return!0x1;let _0x632cd=this['_resources'][_0x1336b3(0x1ab)](_0x56bd93);if(!(_0x632cd!=null&&_0x632cd['formulas'][_0x5054b7]))return!0x1;let _0x52c554=_0x240c37[_0x1336b3(0x1a4)](_0x632cd);return delete _0x52c554['formulas'][_0x5054b7],this['_resources'][_0x1336b3(0x1d5)](_0x56bd93,_0x52c554),this['_change$'][_0x1336b3(0x188)]({'unitId':_0x56bd93,'rangeIds':[_0x5054b7]}),!0x0;}['load'](_0x3c93e5,_0x1dd4eb){const _0x44cfed=_0x18accd;return _0x1dd4eb&&typeof _0x1dd4eb=='object'&&_0x44cfed(0x1b6)in _0x1dd4eb&&_0x1dd4eb[_0x44cfed(0x1b6)]!==0x1?(this[_0x44cfed(0x1d9)](_0x3c93e5,_0x1dd4eb,_0x44cfed(0x203)),!0x1):x(_0x1dd4eb)?(this[_0x44cfed(0x1ac)][_0x44cfed(0x1d5)](_0x3c93e5,_0x240c37[_0x44cfed(0x1a4)](_0x1dd4eb)),this['_rawResources']['delete'](_0x3c93e5),this[_0x44cfed(0x173)]['delete'](_0x3c93e5),this[_0x44cfed(0x26e)]['next']({'unitId':_0x3c93e5}),!0x0):(this['_preserveInvalid'](_0x3c93e5,_0x1dd4eb,_0x44cfed(0x213)),!0x1);}['serialize'](_0x23ed9a){const _0x5e5110=_0x18accd;let _0x56a937=this[_0x5e5110(0x1ac)][_0x5e5110(0x1ab)](_0x23ed9a);return _0x56a937?_0x240c37[_0x5e5110(0x1a4)](_0x56a937):this[_0x5e5110(0x226)]['has'](_0x23ed9a)?_0x240c37[_0x5e5110(0x1a4)](this[_0x5e5110(0x226)][_0x5e5110(0x1ab)](_0x23ed9a)):b();}[_0x18accd(0x261)](_0x531c9b){const _0x3e3611=_0x18accd;return this[_0x3e3611(0x173)][_0x3e3611(0x1ab)](_0x531c9b);}[_0x18accd(0x1bb)](_0x43ec4b){const _0x5e47e6=_0x18accd;this[_0x5e47e6(0x1ac)][_0x5e47e6(0x25b)](_0x43ec4b),this[_0x5e47e6(0x226)][_0x5e47e6(0x25b)](_0x43ec4b),this['_loadErrors']['delete'](_0x43ec4b),this[_0x5e47e6(0x26e)][_0x5e47e6(0x188)]({'unitId':_0x43ec4b});}[_0x18accd(0x186)](){const _0x125b47=_0x18accd;this[_0x125b47(0x1ac)][_0x125b47(0x267)](),this['_rawResources'][_0x125b47(0x267)](),this[_0x125b47(0x173)][_0x125b47(0x267)](),this[_0x125b47(0x26e)][_0x125b47(0x1bd)](),super['dispose']();}[_0x18accd(0x1d9)](_0x1ffdd6,_0x230dc4,_0x3287a1){const _0x595e8b=_0x18accd;this['_resources']['delete'](_0x1ffdd6),this[_0x595e8b(0x226)][_0x595e8b(0x1d5)](_0x1ffdd6,_0x240c37[_0x595e8b(0x1a4)](_0x230dc4)),this[_0x595e8b(0x173)][_0x595e8b(0x1d5)](_0x1ffdd6,_0x3287a1),this['_change$']['next']({'unitId':_0x1ffdd6});}};let it=function(_0x3db238){const _0x43d3f4=_0x18accd;return _0x3db238[_0x43d3f4(0x1fb)]=_0x43d3f4(0x235),_0x3db238[_0x43d3f4(0x1d0)]=_0x43d3f4(0x1e9),_0x3db238[_0x43d3f4(0x1d8)]=_0x43d3f4(0x1a5),_0x3db238[_0x43d3f4(0x1a9)]=_0x43d3f4(0x1be),_0x3db238;}({});function F(_0x144c97,_0x4a343b){return function(_0x8dd12a,_0x5a5b8d){_0x4a343b(_0x8dd12a,_0x5a5b8d,_0x144c97);};}function I(_0xe6873f,_0x2d73d9,_0x5d5587,_0x5bba90){const _0x2d14c9=_0x18accd;var _0x399f21=arguments[_0x2d14c9(0x230)],_0x2468eb=_0x399f21<0x3?_0x2d73d9:_0x5bba90===null?_0x5bba90=Object[_0x2d14c9(0x1ca)](_0x2d73d9,_0x5d5587):_0x5bba90,_0x3cbae7;if(typeof Reflect==_0x2d14c9(0x224)&&typeof Reflect['decorate']=='function')_0x2468eb=Reflect[_0x2d14c9(0x209)](_0xe6873f,_0x2d73d9,_0x5d5587,_0x5bba90);else{for(var _0x100a5f=_0xe6873f[_0x2d14c9(0x230)]-0x1;_0x100a5f>=0x0;_0x100a5f--)(_0x3cbae7=_0xe6873f[_0x100a5f])&&(_0x2468eb=(_0x399f21<0x3?_0x3cbae7(_0x2468eb):_0x399f21>0x3?_0x3cbae7(_0x2d73d9,_0x5d5587,_0x2468eb):_0x3cbae7(_0x2d73d9,_0x5d5587))||_0x2468eb);}return _0x399f21>0x3&&_0x2468eb&&Object[_0x2d14c9(0x21e)](_0x2d73d9,_0x5d5587,_0x2468eb),_0x2468eb;}let L=class extends _0x474e08{constructor(_0x228b77,_0x46ebfa,_0x34c280){const _0x34263f=_0x18accd;super(),this['_model']=_0x228b77,this[_0x34263f(0x1bc)]=_0x46ebfa,this['_hostExternalReferenceModel']=_0x34c280,N(this,_0x34263f(0x1bf),new Map()),N(this,'_formulaKeys',new Map()),N(this,_0x34263f(0x20d),new _0x1ec16e()),N(this,_0x34263f(0x1c2),this[_0x34263f(0x20d)][_0x34263f(0x18a)]()),this[_0x34263f(0x223)](this[_0x34263f(0x1bc)][_0x34263f(0x1ea)]['subscribe'](_0xa9c5a9=>{const _0x4edb87=_0x34263f;for(let _0x44903d of Object[_0x4edb87(0x269)](_0xa9c5a9))for(let _0x1455a9 of Object[_0x4edb87(0x269)](_0x44903d))_0x1455a9['forEach'](_0x1635ce=>this[_0x4edb87(0x265)](_0x1635ce));}));}['syncUnit'](_0x493679){const _0xcaf973=_0x18accd;var _0x17a5c2;let _0x898cbe=_0x493679['getUnitId'](),_0x39fc89=((_0x17a5c2=_0x493679[_0xcaf973(0x1b1)]()[_0xcaf973(0x212)])==null||(_0x17a5c2=_0x17a5c2[_0xcaf973(0x1a6)])==null?void 0x0:_0x17a5c2[_0xcaf973(0x252)](w))??[],_0x51612f=this[_0xcaf973(0x17f)][_0xcaf973(0x26b)](_0x898cbe),_0x409e41=new Set();for(let _0x574b01 of _0x39fc89){let _0x3e3645=_0x51612f[_0x574b01[_0xcaf973(0x251)]];_0x3e3645&&(_0x409e41[_0xcaf973(0x1af)](R(_0x898cbe,_0x574b01[_0xcaf973(0x251)])),this['register']({'unitId':_0x898cbe,'rangeId':_0x574b01[_0xcaf973(0x251)]},_0x3e3645));}for(let _0xfb8e5e of Array[_0xcaf973(0x1ec)](this[_0xcaf973(0x1bf)][_0xcaf973(0x269)]()))_0xfb8e5e[_0xcaf973(0x1ad)]===_0x898cbe&&!_0x409e41[_0xcaf973(0x1f5)](R(_0xfb8e5e[_0xcaf973(0x1ad)],_0xfb8e5e[_0xcaf973(0x251)]))&&this[_0xcaf973(0x198)](_0xfb8e5e);}[_0x18accd(0x1a8)](_0x59256b,_0x203d10){const _0x50b16d=_0x18accd;let _0x495cf9=R(_0x59256b['unitId'],_0x59256b[_0x50b16d(0x251)]),_0x433eb2=this[_0x50b16d(0x1bf)][_0x50b16d(0x1ab)](_0x495cf9),_0xd6e365=this[_0x50b16d(0x211)][_0x50b16d(0x26d)](_0x59256b[_0x50b16d(0x1ad)]);if(_0x433eb2&&_0x433eb2['config']['formula']===_0x203d10['formula']&&_0x433eb2[_0x50b16d(0x26f)]===_0xd6e365){_0x433eb2['config']=_0x203d10;let _0x330802=_0x433eb2['formulaId']?this[_0x50b16d(0x1bc)][_0x50b16d(0x1e8)](_0x433eb2[_0x50b16d(0x1ad)],_0x433eb2[_0x50b16d(0x1ad)],_0x433eb2[_0x50b16d(0x1f7)])??void 0x0:void 0x0;_0x433eb2[_0x50b16d(0x247)]=_0x330802,this[_0x50b16d(0x194)](_0x495cf9,z(_0x203d10,_0x330802));return;}_0x433eb2!=null&&_0x433eb2[_0x50b16d(0x1f7)]&&this['_deleteRegistration'](_0x433eb2);let _0x74c8fc={..._0x59256b,'config':_0x203d10,'referenceRevision':_0xd6e365,'presentation':z(_0x203d10,void 0x0)};if(this[_0x50b16d(0x1bf)][_0x50b16d(0x1d5)](_0x495cf9,_0x74c8fc),!_0x203d10[_0x50b16d(0x193)]['trim']())return;let _0x90be99=this['_registrationService'][_0x50b16d(0x204)](_0x59256b[_0x50b16d(0x1ad)],_0x59256b[_0x50b16d(0x1ad)],_0x203d10[_0x50b16d(0x193)],void 0x0,{'rangeId':_0x59256b[_0x50b16d(0x251)]},_0x2ec085['DOC'],_0x59256b[_0x50b16d(0x251)]);_0x74c8fc['formulaId']=_0x90be99,this[_0x50b16d(0x1ff)][_0x50b16d(0x1d5)](_0x90be99,_0x495cf9);}[_0x18accd(0x198)](_0x3ce936){const _0x49c7f6=_0x18accd;let _0xd51455=R(_0x3ce936[_0x49c7f6(0x1ad)],_0x3ce936[_0x49c7f6(0x251)]),_0x24ea07=this[_0x49c7f6(0x1bf)]['get'](_0xd51455);_0x24ea07&&(this[_0x49c7f6(0x21a)](_0x24ea07),this[_0x49c7f6(0x1bf)]['delete'](_0xd51455));}[_0x18accd(0x1a2)](_0x369e49){const _0x556cc4=_0x18accd;for(let _0x24a586 of Array['from'](this[_0x556cc4(0x1bf)][_0x556cc4(0x269)]()))_0x24a586[_0x556cc4(0x1ad)]===_0x369e49&&this[_0x556cc4(0x198)](_0x24a586);}[_0x18accd(0x1a0)](_0x5e4d65){const _0x1bb8b5=_0x18accd;var _0x1952e0;return(_0x1952e0=this['_registrations'][_0x1bb8b5(0x1ab)](R(_0x5e4d65['unitId'],_0x5e4d65[_0x1bb8b5(0x251)])))==null?void 0x0:_0x1952e0[_0x1bb8b5(0x189)];}[_0x18accd(0x241)](_0x59975e){const _0x37447b=_0x18accd;let _0x38cc95=this[_0x37447b(0x1bf)][_0x37447b(0x1ab)](R(_0x59975e[_0x37447b(0x1ad)],_0x59975e[_0x37447b(0x251)]));return _0x38cc95?B(_0x38cc95):void 0x0;}['getRegisteredFormulas'](){const _0x1db8e8=_0x18accd;return Array[_0x1db8e8(0x1ec)](this[_0x1db8e8(0x1bf)]['values'](),_0x878ebe=>({'identity':{'unitId':_0x878ebe[_0x1db8e8(0x1ad)],'rangeId':_0x878ebe[_0x1db8e8(0x251)]},'config':_0x878ebe[_0x1db8e8(0x1ba)],'referenceRevision':_0x878ebe['referenceRevision'],..._0x878ebe[_0x1db8e8(0x247)]?{'liveResult':_0x878ebe[_0x1db8e8(0x247)]}:null}));}['dispose'](){const _0x3d7a66=_0x18accd;for(let _0x5371a9 of this[_0x3d7a66(0x1bf)][_0x3d7a66(0x269)]())this[_0x3d7a66(0x21a)](_0x5371a9);this[_0x3d7a66(0x1bf)][_0x3d7a66(0x267)](),this[_0x3d7a66(0x1ff)][_0x3d7a66(0x267)](),this['_presentationChanged$'][_0x3d7a66(0x1bd)](),super[_0x3d7a66(0x186)]();}[_0x18accd(0x265)](_0x41a9f6){const _0x27ac94=_0x18accd;let _0x27fd4b=this['_formulaKeys'][_0x27ac94(0x1ab)](_0x41a9f6[_0x27ac94(0x1f7)]),_0x24c6dd=_0x27fd4b?this['_registrations']['get'](_0x27fd4b):void 0x0;_0x27fd4b&&_0x24c6dd&&(_0x24c6dd[_0x27ac94(0x247)]=_0x41a9f6,this[_0x27ac94(0x194)](_0x27fd4b,z(_0x24c6dd[_0x27ac94(0x1ba)],_0x41a9f6)));}[_0x18accd(0x194)](_0x55ad56,_0x33ff8b){const _0x1e5490=_0x18accd;var _0xed896,_0x1fbe14;let _0x5c92ab=this['_registrations']['get'](_0x55ad56);if(!_0x5c92ab||at(_0x5c92ab['presentation'],_0x33ff8b))return;let _0x5437ee=_0x5c92ab[_0x1e5490(0x189)],_0x201675=B(_0x5c92ab);_0x5c92ab[_0x1e5490(0x189)]=_0x33ff8b,this[_0x1e5490(0x20d)][_0x1e5490(0x188)]({'unitId':_0x5c92ab[_0x1e5490(0x1ad)],'rangeId':_0x5c92ab[_0x1e5490(0x251)],'presentation':_0x33ff8b,'previousPresentation':_0x5437ee,'result':B(_0x5c92ab),'previousResult':{..._0x201675,..._0x5437ee,'value':(_0xed896=_0x5437ee[_0x1e5490(0x21c)])==null?void 0x0:_0xed896['v'],'valueType':((_0x1fbe14=_0x5437ee[_0x1e5490(0x21c)])==null?void 0x0:_0x1fbe14['t'])??void 0x0}});}[_0x18accd(0x21a)](_0x4d96be){const _0x5dd8f0=_0x18accd;_0x4d96be[_0x5dd8f0(0x1f7)]&&(this[_0x5dd8f0(0x1bc)][_0x5dd8f0(0x201)](_0x4d96be['unitId'],_0x4d96be[_0x5dd8f0(0x1ad)],[_0x4d96be['formulaId']]),this[_0x5dd8f0(0x1ff)]['delete'](_0x4d96be['formulaId']));}};L=I([F(0x0,_0x2bb8ca(P)),F(0x1,_0x2bb8ca(_0x1a621d)),F(0x2,_0x2bb8ca(_0x39d327))],L);function R(_0x26b788,_0x3d919e){return _0x26b788+'\x00'+_0x3d919e;}function z(_0x44d3ca,_0x27e098){const _0x30fbf8=_0x18accd;return _0x3cd2e8({'numberFormat':_0x44d3ca[_0x30fbf8(0x255)],'lastValue':_0x44d3ca['lastValue'],'result':_0x27e098});}function B(_0x46e0bf){const _0x3d2927=_0x18accd;var _0x45339c,_0x2cf29c,_0xf4550;let _0x21751a=_0x46e0bf['presentation'],_0x54a4e8=_0x46e0bf[_0x3d2927(0x1ba)][_0x3d2927(0x193)][_0x3d2927(0x272)]()?_0x21751a['stale']||_0x21751a['cell']==null?_0x3d2927(0x1e9):((_0x45339c=_0x46e0bf[_0x3d2927(0x247)])==null?void 0x0:_0x45339c[_0x3d2927(0x18e)])===_0x1f2db9['ERROR']?_0x3d2927(0x1be):_0x3d2927(0x1a5):_0x3d2927(0x235);return{..._0x21751a,'status':_0x54a4e8,'value':(_0x2cf29c=_0x21751a['cell'])==null?void 0x0:_0x2cf29c['v'],'valueType':((_0xf4550=_0x21751a[_0x3d2927(0x21c)])==null?void 0x0:_0xf4550['t'])??void 0x0};}function at(_0x41f5c1,_0x21cfe5){const _0x3dbf03=_0x18accd;var _0x33bef3,_0x285c12,_0x2194cd,_0x500a52;return _0x41f5c1[_0x3dbf03(0x242)]===_0x21cfe5[_0x3dbf03(0x242)]&&_0x41f5c1[_0x3dbf03(0x244)]===_0x21cfe5['color']&&_0x41f5c1['pattern']===_0x21cfe5[_0x3dbf03(0x1f9)]&&_0x41f5c1[_0x3dbf03(0x1e6)]===_0x21cfe5[_0x3dbf03(0x1e6)]&&_0x41f5c1['stale']===_0x21cfe5[_0x3dbf03(0x1cb)]&&((_0x33bef3=_0x41f5c1['cell'])==null?void 0x0:_0x33bef3['t'])===((_0x285c12=_0x21cfe5[_0x3dbf03(0x21c)])==null?void 0x0:_0x285c12['t'])&&Object['is']((_0x2194cd=_0x41f5c1[_0x3dbf03(0x21c)])==null?void 0x0:_0x2194cd['v'],(_0x500a52=_0x21cfe5['cell'])==null?void 0x0:_0x500a52['v']);}const ot={'id':_0x18accd(0x22d),'type':_0x2c4aaa[_0x18accd(0x190)],'handler':(_0x5aca49,_0x56ea38)=>!(_0x56ea38!=null&&_0x56ea38[_0x18accd(0x1ad)])||!_0x56ea38[_0x18accd(0x251)]||!_0x56ea38['config']?!0x1:_0x5aca49['get'](P)[_0x18accd(0x21d)](_0x56ea38[_0x18accd(0x1ad)],_0x56ea38['rangeId'],_0x56ea38[_0x18accd(0x1ba)])},st={'id':'docs-formula.mutation.remove-formula','type':_0x2c4aaa['MUTATION'],'handler':(_0x431e20,_0x3645e9)=>!(_0x3645e9!=null&&_0x3645e9[_0x18accd(0x1ad)])||!_0x3645e9[_0x18accd(0x251)]?!0x1:_0x431e20[_0x18accd(0x1ab)](P)[_0x18accd(0x183)](_0x3645e9[_0x18accd(0x1ad)],_0x3645e9[_0x18accd(0x251)])},V={'id':'docs-formula.mutation.set-resource','type':_0x2c4aaa[_0x18accd(0x190)],'handler':(_0x141e5c,_0x513c53)=>!(_0x513c53!=null&&_0x513c53[_0x18accd(0x1ad)])||!_0x513c53[_0x18accd(0x192)]?!0x1:_0x141e5c[_0x18accd(0x1ab)](P)[_0x18accd(0x248)](_0x513c53[_0x18accd(0x1ad)],_0x513c53[_0x18accd(0x192)])},H={'id':'docs-formula.mutation.set-last-values','type':_0x2c4aaa[_0x18accd(0x190)],'handler':(_0x35ad68,_0x29f30e)=>{const _0x51a4ec=_0x18accd;if(!(_0x29f30e!=null&&_0x29f30e[_0x51a4ec(0x1ad)])||!_0x29f30e[_0x51a4ec(0x264)][_0x51a4ec(0x230)])return!0x1;let _0x497aaf=_0x35ad68['get'](P),_0x1fc407=_0x35ad68[_0x51a4ec(0x1ab)](_0x39d327),_0xa78566=_0x497aaf[_0x51a4ec(0x26a)](_0x29f30e[_0x51a4ec(0x1ad)]);if(!_0xa78566)return!0x1;let _0x2489ca=_0x240c37[_0x51a4ec(0x1a4)](_0xa78566),_0xfa7dec=!0x1;for(let _0x23c22a of _0x29f30e[_0x51a4ec(0x264)]){var _0x4ea899,_0x8c4193,_0x578921,_0x5acd89;let _0x8e4cf1=_0x2489ca[_0x51a4ec(0x1b9)][_0x23c22a[_0x51a4ec(0x251)]];_0x8e4cf1&&_0x8e4cf1[_0x51a4ec(0x193)]===_0x23c22a[_0x51a4ec(0x185)]&&((_0x4ea899=_0x8e4cf1['numberFormat'])==null?void 0x0:_0x4ea899[_0x51a4ec(0x1f9)])===_0x23c22a[_0x51a4ec(0x220)]&&_0x1fc407['getRevision'](_0x29f30e['unitId'])===_0x23c22a['expectedReferenceRevision']&&(((_0x8c4193=_0x8e4cf1[_0x51a4ec(0x191)])==null?void 0x0:_0x8c4193['v'])!==_0x23c22a[_0x51a4ec(0x191)]['v']||((_0x578921=_0x8e4cf1['lastValue'])==null?void 0x0:_0x578921['t'])!==_0x23c22a[_0x51a4ec(0x191)]['t']||((_0x5acd89=_0x8e4cf1[_0x51a4ec(0x191)])==null?void 0x0:_0x5acd89[_0x51a4ec(0x1f9)])!==_0x23c22a[_0x51a4ec(0x191)][_0x51a4ec(0x1f9)])&&(_0x8e4cf1[_0x51a4ec(0x191)]=_0x240c37[_0x51a4ec(0x1a4)](_0x23c22a['lastValue']),_0xfa7dec=!0x0);}return!_0xfa7dec||_0x497aaf['setResource'](_0x29f30e[_0x51a4ec(0x1ad)],_0x2489ca);}},U={'id':_0x18accd(0x23c),'type':_0x2c4aaa[_0x18accd(0x1f0)],'handler':(_0x2909e0,_0xb97ce7)=>{const _0x72a918=_0x18accd;if(!(_0xb97ce7!=null&&_0xb97ce7[_0x72a918(0x193)]['trim']()))return!0x1;let _0x32ec77=q(_0x2909e0,_0xb97ce7[_0x72a918(0x1ad)],'');if(!_0x32ec77)return!0x1;let _0x47b7cd=ft(_0xb97ce7[_0x72a918(0x1c1)],_0x32ec77[_0x72a918(0x212)],dt(_0x2909e0,_0x32ec77[_0x72a918(0x1ad)]));if(!_0x47b7cd)return!0x1;let _0x2defab=pt(_0x2909e0,_0x32ec77[_0x72a918(0x1ad)],_0xb97ce7[_0x72a918(0x193)],_0xb97ce7[_0x72a918(0x24e)]??[]);if(!_0x2defab)return!0x1;let _0x2a883f=mt(_0x32ec77[_0x72a918(0x212)],_0x32ec77['model'],_0x32ec77[_0x72a918(0x1ad)]),_0x4e4fc8=ht({'documentData':_0x32ec77['documentData'],'resource':_0x32ec77[_0x72a918(0x192)],'rangeId':_0x2a883f,'config':{'formula':_0xb97ce7[_0x72a918(0x193)],..._0xb97ce7[_0x72a918(0x255)]?{'numberFormat':_0xb97ce7['numberFormat']}:null},'startOffset':_0x47b7cd[_0x72a918(0x23d)],'endOffset':_0x47b7cd['endOffset']});if(!_0x4e4fc8)return!0x1;let _0x74ee53=_0x52d94b(_0x2909e0,_0x32ec77[_0x72a918(0x1ad)],_0x2defab);return!_0x74ee53||!J({'accessor':_0x2909e0,'document':_0x32ec77[_0x72a918(0x254)],'unitId':_0x32ec77[_0x72a918(0x1ad)],'trigger':U['id'],'rangeId':_0x2a883f,'previousResource':_0x32ec77['resource'],'nextResource':_0x4e4fc8[_0x72a918(0x23a)],'previousDocumentData':_0x32ec77['documentData'],'nextDocumentData':_0x4e4fc8[_0x72a918(0x178)],'cursorOffset':_0x4e4fc8[_0x72a918(0x24a)],'externalMutations':_0x74ee53})?!0x1:{'rangeId':_0x2a883f,'startOffset':_0x4e4fc8[_0x72a918(0x24a)]-0x1,'endOffset':_0x4e4fc8[_0x72a918(0x24a)]};}},W={'id':_0x18accd(0x177),'type':_0x2c4aaa[_0x18accd(0x1f0)],'handler':(_0x1d8218,_0x381f30)=>{const _0x29e015=_0x18accd;if(!(_0x381f30!=null&&_0x381f30[_0x29e015(0x251)])||!_0x381f30[_0x29e015(0x193)]['trim']())return!0x1;let _0x1cdc7e=q(_0x1d8218,_0x381f30[_0x29e015(0x1ad)],''),_0x4e2360=_0x1cdc7e==null?void 0x0:_0x1cdc7e['model'][_0x29e015(0x25a)](_0x1cdc7e[_0x29e015(0x1ad)],_0x381f30['rangeId']),_0x3304ff=_0x1cdc7e?T(_0x1cdc7e[_0x29e015(0x17e)][_0x29e015(0x212)],_0x381f30['rangeId']):void 0x0;if(!_0x1cdc7e||!_0x4e2360||!_0x3304ff)return!0x1;let _0x4289e0=pt(_0x1d8218,_0x1cdc7e[_0x29e015(0x1ad)],_0x381f30['formula'],_0x381f30[_0x29e015(0x24e)]??[]);if(!_0x4289e0)return!0x1;let _0x5ef1cc=_0x52d94b(_0x1d8218,_0x1cdc7e[_0x29e015(0x1ad)],_0x4289e0);if(!_0x5ef1cc)return!0x1;let _0xa88029=Ct(_0x1cdc7e[_0x29e015(0x192)]);return _0xa88029[_0x29e015(0x1b9)][_0x381f30[_0x29e015(0x251)]]={'formula':_0x381f30[_0x29e015(0x193)],..._0x381f30[_0x29e015(0x255)]?{'numberFormat':_0x381f30[_0x29e015(0x255)]}:_0x4e2360[_0x29e015(0x255)]?{'numberFormat':_0x4e2360['numberFormat']}:null},J({'accessor':_0x1d8218,'document':_0x1cdc7e[_0x29e015(0x254)],'unitId':_0x1cdc7e[_0x29e015(0x1ad)],'trigger':W['id'],'rangeId':_0x381f30[_0x29e015(0x251)],'previousResource':_0x1cdc7e[_0x29e015(0x192)],'nextResource':_0xa88029,'cursorOffset':_0x3304ff[_0x29e015(0x19f)]+0x1,'externalMutations':_0x5ef1cc});}},G={'id':_0x18accd(0x25d),'type':_0x2c4aaa[_0x18accd(0x1f0)],'handler':(_0x2ccdad,_0x5cd2bb)=>{const _0x9d8e02=_0x18accd;if(!(_0x5cd2bb!=null&&_0x5cd2bb[_0x9d8e02(0x251)]))return!0x1;let _0x22f0ab=q(_0x2ccdad,_0x5cd2bb['unitId'],''),_0x7c950c=_0x22f0ab==null?void 0x0:_0x22f0ab[_0x9d8e02(0x1fe)][_0x9d8e02(0x25a)](_0x22f0ab[_0x9d8e02(0x1ad)],_0x5cd2bb[_0x9d8e02(0x251)]),_0x7ccf90=_0x22f0ab?T(_0x22f0ab[_0x9d8e02(0x17e)][_0x9d8e02(0x212)],_0x5cd2bb[_0x9d8e02(0x251)]):void 0x0;if(!_0x22f0ab||!_0x7c950c||!_0x7ccf90)return!0x1;let _0x26105a=Ct(_0x22f0ab[_0x9d8e02(0x192)]);return _0x26105a[_0x9d8e02(0x1b9)][_0x5cd2bb[_0x9d8e02(0x251)]]={..._0x7c950c,..._0x5cd2bb[_0x9d8e02(0x255)]?{'numberFormat':_0x5cd2bb[_0x9d8e02(0x255)]}:null},_0x5cd2bb[_0x9d8e02(0x255)]||delete _0x26105a['formulas'][_0x5cd2bb[_0x9d8e02(0x251)]][_0x9d8e02(0x255)],J({'accessor':_0x2ccdad,'document':_0x22f0ab[_0x9d8e02(0x254)],'unitId':_0x22f0ab[_0x9d8e02(0x1ad)],'trigger':G['id'],'rangeId':_0x5cd2bb[_0x9d8e02(0x251)],'previousResource':_0x22f0ab[_0x9d8e02(0x192)],'nextResource':_0x26105a,'cursorOffset':_0x7ccf90[_0x9d8e02(0x19f)]+0x1,'externalMutations':{}});}},K={'id':_0x18accd(0x20c),'type':_0x2c4aaa[_0x18accd(0x1f0)],'handler':(_0x493641,_0x36054a)=>ut(_0x493641,_0x36054a,'',K['id'])},ct={'id':_0x18accd(0x21b),'type':_0x2c4aaa[_0x18accd(0x1f0)],'handler':(_0xddedeb,_0x594bd1)=>ut(_0xddedeb,_0x594bd1,(_0x594bd1==null?void 0x0:_0x594bd1['text'])??'',ct['id'])},lt={'id':'docs-formula.command.convert-to-text','type':_0x2c4aaa['COMMAND'],'handler':(_0x343533,_0xd97716)=>{const _0x670c65=_0x18accd;if(!(_0xd97716!=null&&_0xd97716[_0x670c65(0x251)]))return!0x1;let _0x4d7fdc=q(_0x343533,_0xd97716[_0x670c65(0x1ad)],'');if(!_0x4d7fdc)return!0x1;let _0x52030b=_0x343533[_0x670c65(0x1ab)](L)[_0x670c65(0x241)]({'unitId':_0x4d7fdc[_0x670c65(0x1ad)],'rangeId':_0xd97716['rangeId']});return _0x52030b?ut(_0x343533,_0xd97716,_0x52030b['text'],lt['id']):!0x1;}};function ut(_0x52bd0b,_0x59d1ce,_0xf49d80,_0x1f3930){const _0xb5f590=_0x18accd;if(!(_0x59d1ce!=null&&_0x59d1ce['rangeId']))return!0x1;let _0x3ec354=q(_0x52bd0b,_0x59d1ce[_0xb5f590(0x1ad)],'');if(!_0x3ec354)return!0x1;let _0x43fbee=Be({'documentData':_0x3ec354['documentData'],'resource':_0x3ec354[_0xb5f590(0x192)],'rangeId':_0x59d1ce[_0xb5f590(0x251)],'text':_0xf49d80});return _0x43fbee?J({'accessor':_0x52bd0b,'document':_0x3ec354[_0xb5f590(0x254)],'unitId':_0x3ec354[_0xb5f590(0x1ad)],'trigger':_0x1f3930,'rangeId':_0x59d1ce[_0xb5f590(0x251)],'previousResource':_0x3ec354[_0xb5f590(0x192)],'nextResource':_0x43fbee[_0xb5f590(0x23a)],'previousDocumentData':_0x3ec354[_0xb5f590(0x17e)],'nextDocumentData':_0x43fbee[_0xb5f590(0x178)],'cursorOffset':_0x43fbee[_0xb5f590(0x24a)],'externalMutations':{}}):!0x1;}function q(_0x214c8c,_0x57d408,_0x42eb13){const _0x5b6bd0=_0x18accd;if(_0x42eb13)return null;let _0x3c054a=_0x214c8c[_0x5b6bd0(0x1ab)](_0x478f5d),_0x4e69b=(_0x57d408?_0x3c054a['getUnit'](_0x57d408,_0x50d692[_0x5b6bd0(0x24d)]):_0x3c054a[_0x5b6bd0(0x195)](_0x50d692['UNIVER_DOC']))??null;if(!_0x4e69b)return null;let _0x2350a7=_0x4e69b[_0x5b6bd0(0x1b1)](),_0xa7be59=_0x2350a7[_0x5b6bd0(0x212)];if(_0x2350a7['disabled']||!_0xa7be59)return null;let _0x24e8e1=_0x214c8c['get'](P);return _0x24e8e1[_0x5b6bd0(0x261)](_0x4e69b[_0x5b6bd0(0x266)]())?null:{'document':_0x4e69b,'body':_0xa7be59,'documentData':_0x2350a7,'model':_0x24e8e1,'resource':_0x24e8e1[_0x5b6bd0(0x26a)](_0x4e69b[_0x5b6bd0(0x266)]())??b(),'unitId':_0x4e69b[_0x5b6bd0(0x266)]()};}function dt(_0x3333b1,_0x24070c){const _0x36986a=_0x18accd;var _0x50d3e7;return(_0x50d3e7=_0x3333b1[_0x36986a(0x1ab)](_0x32a2c9)[_0x36986a(0x18f)]({'subUnitId':_0x24070c,'unitId':_0x24070c}))==null?void 0x0:_0x50d3e7[0x0];}function ft(_0x3c11fe,_0x5c8a4b,_0x5280f7){const _0x15085e=_0x18accd;if((_0x3c11fe==null?void 0x0:_0x3c11fe['type'])===_0x15085e(0x1f8)){var _0x3547a2;let _0x3eb268=((_0x3547a2=_0x5c8a4b[_0x15085e(0x18d)])==null?void 0x0:_0x3547a2[_0x15085e(0x252)](_0x1ff9ed=>_0x1ff9ed['paragraphId']===_0x3c11fe['paragraphId']))??[];if(_0x3eb268[_0x15085e(0x230)]!==0x1)return null;let _0x426adc=_0x3eb268[0x0],_0x2729b4=_0x1c8c1a(_0x5c8a4b,_0x426adc),_0x46bf4b=_0x426adc['startIndex']-_0x2729b4,_0x787cbb=_0x3c11fe[_0x15085e(0x1e2)]==='end'?_0x46bf4b:_0x3c11fe['position'];if(!Number[_0x15085e(0x239)](_0x787cbb)||_0x787cbb<0x0||_0x787cbb>_0x46bf4b)return null;let _0x2f19c0=_0x2729b4+_0x787cbb;return{'startOffset':_0x2f19c0,'endOffset':_0x2f19c0};}if((_0x3c11fe==null?void 0x0:_0x3c11fe[_0x15085e(0x250)])===_0x15085e(0x207))return!Number[_0x15085e(0x239)](_0x3c11fe[_0x15085e(0x23d)])||!Number[_0x15085e(0x239)](_0x3c11fe[_0x15085e(0x200)])?null:{'startOffset':Math[_0x15085e(0x1da)](_0x3c11fe[_0x15085e(0x23d)],_0x3c11fe[_0x15085e(0x200)]),'endOffset':Math['max'](_0x3c11fe[_0x15085e(0x23d)],_0x3c11fe[_0x15085e(0x200)])};let _0x485507=(_0x3c11fe==null?void 0x0:_0x3c11fe[_0x15085e(0x250)])===_0x15085e(0x236)?_0x3c11fe[_0x15085e(0x236)]:_0x5280f7;return!_0x485507||_0x485507['segmentId']?null:{'startOffset':Math['min'](_0x485507[_0x15085e(0x23d)],_0x485507['endOffset']),'endOffset':Math['max'](_0x485507[_0x15085e(0x23d)],_0x485507['endOffset'])};}function pt(_0x404c43,_0x18b445,_0x2d2a8f,_0x1183a6){const _0x5852b3=_0x18accd;let _0x5af88c=_0x404c43['get'](_0x4914fd),_0x31e731=_0x2d2a8f[_0x5852b3(0x1fa)]('=')?_0x2d2a8f[_0x5852b3(0x22a)](0x1):_0x2d2a8f,_0x3a2960=_0x5af88c[_0x5852b3(0x234)](_0x31e731);if(!_0x3a2960)return null;let _0x23b2dd=_0x404c43[_0x5852b3(0x1ab)](_0x39d327),_0x55c62c=_0x4ac795({'qualifiers':_0x32274e(_0x3a2960),'explicitReferences':_0x1183a6??[],'resolveBinding':_0x5e1018=>_0x23b2dd[_0x5852b3(0x1c6)](_0x18b445,_0x5e1018)});return _0x55c62c[_0x5852b3(0x18e)]===_0x5852b3(0x1b0)?_0x55c62c[_0x5852b3(0x19e)]:null;}function mt(_0x2dce01,_0x3d0ec2,_0x228151){const _0x5c3253=_0x18accd;var _0x1418fb;let _0x1b07af=_0x13e167(0x6);for(;_0x2dce01!=null&&(_0x1418fb=_0x2dce01[_0x5c3253(0x1a6)])!=null&&_0x1418fb[_0x5c3253(0x225)](_0x459f89=>_0x459f89[_0x5c3253(0x251)]===_0x1b07af)||_0x3d0ec2[_0x5c3253(0x25a)](_0x228151,_0x1b07af);)_0x1b07af=_0x13e167(0x6);return _0x1b07af;}function ht(_0x1236a2){try{return Re(_0x1236a2);}catch(_0x33830a){if(_0x33830a instanceof C)return null;throw _0x33830a;}}function gt(_0x1315c2){const _0x487ee4=_0x18accd;let _0x52265e=_0x1315c2[_0x487ee4(0x1ee)]&&_0x1315c2['nextDocumentData']?vt(_0x1315c2['document'],_0x1315c2[_0x487ee4(0x1ad)],_0x1315c2['previousDocumentData'],_0x1315c2[_0x487ee4(0x178)],_0x1315c2[_0x487ee4(0x24a)],_0x1315c2[_0x487ee4(0x202)]):null;return _0x1315c2[_0x487ee4(0x1ee)]&&_0x1315c2[_0x487ee4(0x178)]&&!_0x52265e?null:{'documentRedo':_0x52265e,'resourceRedo':{'id':V['id'],'params':{'unitId':_0x1315c2[_0x487ee4(0x1ad)],'resource':_0x1315c2['nextResource']}},'resourceUndo':{'id':V['id'],'params':{'unitId':_0x1315c2['unitId'],'resource':_0x1315c2['previousResource']}}};}function _t(_0x13d32d,_0x2af97d,_0x380244,_0x32dad1){const _0x580c41=_0x18accd;_0x32dad1[_0x580c41(0x205)]({'id':_0x13d32d[_0x580c41(0x202)]+':'+_0x13d32d[_0x580c41(0x251)],'unitID':_0x13d32d[_0x580c41(0x1ad)],'redoMutations':[..._0x13d32d[_0x580c41(0x246)][_0x580c41(0x21f)]?[_0x13d32d[_0x580c41(0x246)][_0x580c41(0x21f)]]:[],..._0x2af97d[_0x580c41(0x217)]?[_0x2af97d[_0x580c41(0x217)]]:[],_0x2af97d[_0x580c41(0x229)]],'undoMutations':[_0x2af97d[_0x580c41(0x23b)],..._0x380244?[_0x380244]:[],..._0x13d32d[_0x580c41(0x246)]['undoMutation']?[_0x13d32d['externalMutations'][_0x580c41(0x1f1)]]:[]]});}function J(_0x3fd200){const _0x3c3671=_0x18accd;let _0x4d36ba=_0x3fd200[_0x3c3671(0x196)][_0x3c3671(0x1ab)](_0x222411),_0xb9a5f=_0x3fd200[_0x3c3671(0x196)][_0x3c3671(0x1ab)](_0x513fde),_0x37a637=_0x3fd200[_0x3c3671(0x196)]['get'](_0x32a2c9),_0x4a67a2=gt(_0x3fd200);if(!_0x4a67a2)return!0x1;let _0x275205=!0x1,_0x398a5d=null,_0x3b5a56=!0x1;try{if(_0x3fd200[_0x3c3671(0x246)][_0x3c3671(0x21f)]){if(!_0x4d36ba[_0x3c3671(0x1b8)](_0x3fd200[_0x3c3671(0x246)][_0x3c3671(0x21f)]['id'],_0x3fd200[_0x3c3671(0x246)][_0x3c3671(0x21f)][_0x3c3671(0x1df)]))return!0x1;_0x275205=!0x0;}if(_0x4a67a2[_0x3c3671(0x217)]){let _0x5559de=_0x4d36ba[_0x3c3671(0x1b8)](_0x4a67a2[_0x3c3671(0x217)]['id'],_0x4a67a2[_0x3c3671(0x217)][_0x3c3671(0x1df)]);if(!_0x5559de)return bt(_0x4d36ba,_0x3fd200[_0x3c3671(0x246)],_0x275205),!0x1;_0x398a5d={'id':_0x2fe09d['id'],'params':{..._0x5559de,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0x4d36ba['syncExecuteCommand'](_0x4a67a2[_0x3c3671(0x229)]['id'],_0x4a67a2['resourceRedo']['params']))return yt(_0x4d36ba,_0x398a5d),bt(_0x4d36ba,_0x3fd200[_0x3c3671(0x246)],_0x275205),!0x1;_0x3b5a56=!0x0,_t(_0x3fd200,_0x4a67a2,_0x398a5d,_0xb9a5f);}catch(_0xa7bd89){throw _0x3b5a56&&_0x4d36ba[_0x3c3671(0x1b8)](_0x4a67a2[_0x3c3671(0x23b)]['id'],_0x4a67a2['resourceUndo']['params']),yt(_0x4d36ba,_0x398a5d),bt(_0x4d36ba,_0x3fd200[_0x3c3671(0x246)],_0x275205),_0xa7bd89;}return _0x37a637[_0x3c3671(0x22b)]([{'startOffset':_0x3fd200[_0x3c3671(0x24a)],'endOffset':_0x3fd200[_0x3c3671(0x24a)],'segmentId':''}],{'unitId':_0x3fd200['unitId'],'subUnitId':_0x3fd200['unitId']},!0x1,{[_0x3ef325]:!0x0}),!0x0;}function vt(_0x54d06e,_0x18e626,_0x2b7e8e,_0x6d3d69,_0x54ac33,_0x2deb31){let _0x2d0068=xt(_0x2b7e8e,_0x6d3d69,_0x27773c(_0x54d06e,''));return _0x2d0068?{'id':_0x2fe09d['id'],'params':{'unitId':_0x18e626,'actions':_0x2d0068,'segmentId':'','textRanges':[{'startOffset':_0x54ac33,'endOffset':_0x54ac33,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0x2deb31}}:null;}function yt(_0x3a9c10,_0x127405){const _0x4c2d68=_0x18accd;_0x127405&&_0x3a9c10['syncExecuteCommand'](_0x127405['id'],_0x127405[_0x4c2d68(0x1df)]);}function bt(_0x3db208,_0x33a259,_0x17a015){const _0x1b150e=_0x18accd;_0x17a015&&_0x33a259['undoMutation']&&_0x3db208[_0x1b150e(0x1b8)](_0x33a259[_0x1b150e(0x1f1)]['id'],_0x33a259['undoMutation']['params']);}function xt(_0x4943fd,_0x56c0b0,_0x4115ba){const _0x4a7ab1=_0x18accd;let _0x27060e=_0x4943fd[_0x4a7ab1(0x212)],_0x44f47d=_0x56c0b0['body'],_0xf97d2a=St(_0x27060e==null?void 0x0:_0x27060e[_0x4a7ab1(0x1d2)],_0x44f47d==null?void 0x0:_0x44f47d['dataStream']);if(!_0xf97d2a||!_0x44f47d)return null;let _0x183e46=new _0x4c112a();return _0x183e46[_0x4a7ab1(0x199)](_0xf97d2a['start']),_0xf97d2a[_0x4a7ab1(0x210)]>0x0&&_0x183e46[_0x4a7ab1(0x1ed)](_0xf97d2a[_0x4a7ab1(0x210)],_0x4d9adf(_0x44f47d,_0xf97d2a['start'],_0xf97d2a[_0x4a7ab1(0x1aa)]+_0xf97d2a['insertLength'],!0x1)),_0xf97d2a[_0x4a7ab1(0x180)]>0x0&&_0x183e46['delete'](_0xf97d2a[_0x4a7ab1(0x180)]),_0x25fe93[_0x4a7ab1(0x1f4)]()[_0x4a7ab1(0x187)](_0x183e46[_0x4a7ab1(0x237)](),_0x4115ba);}function St(_0x24849d,_0x238537){const _0x3c75e2=_0x18accd;if(_0x24849d==null||_0x238537==null||_0x24849d===_0x238537)return null;let _0x3103fd=0x0;for(;_0x3103fd<_0x24849d[_0x3c75e2(0x230)]&&_0x3103fd<_0x238537[_0x3c75e2(0x230)]&&_0x24849d[_0x3103fd]===_0x238537[_0x3103fd];)_0x3103fd+=0x1;let _0x5ee6dc=_0x24849d[_0x3c75e2(0x230)],_0x11ab9f=_0x238537[_0x3c75e2(0x230)];for(;_0x5ee6dc>_0x3103fd&&_0x11ab9f>_0x3103fd&&_0x24849d[_0x5ee6dc-0x1]===_0x238537[_0x11ab9f-0x1];)--_0x5ee6dc,--_0x11ab9f;return{'start':_0x3103fd,'deleteLength':_0x5ee6dc-_0x3103fd,'insertLength':_0x11ab9f-_0x3103fd};}function Ct(_0x165f53){const _0x432bdc=_0x18accd;return{'schemaVersion':0x1,'formulas':Object['fromEntries'](Object[_0x432bdc(0x1c5)](_0x165f53[_0x432bdc(0x1b9)])[_0x432bdc(0x1f3)](([_0x28f86d,_0x44656e])=>[_0x28f86d,{..._0x44656e,..._0x44656e[_0x432bdc(0x255)]?{'numberFormat':{..._0x44656e[_0x432bdc(0x255)]}}:null,..._0x44656e[_0x432bdc(0x191)]?{'lastValue':{..._0x44656e[_0x432bdc(0x191)]}}:null}]))};}let Y=class extends _0x474e08{constructor(_0xee1db6,_0x286c47,_0x77250e,_0xab6b21){const _0x51ed8a=_0x18accd;super(),this[_0x51ed8a(0x1b4)]=_0xee1db6,this['_commandService']=_0x286c47,this['_model']=_0x77250e,this[_0x51ed8a(0x181)]=_0xab6b21,N(this,_0x51ed8a(0x1a7),new Set()),N(this,_0x51ed8a(0x1eb),!0x1),N(this,_0x51ed8a(0x1a3),!0x1),this[_0x51ed8a(0x1b4)][_0x51ed8a(0x1f6)](_0x50d692[_0x51ed8a(0x24d)])[_0x51ed8a(0x19c)](_0x5dc60e=>this[_0x51ed8a(0x181)][_0x51ed8a(0x1b2)](_0x5dc60e)),this[_0x51ed8a(0x223)](this[_0x51ed8a(0x17f)][_0x51ed8a(0x25c)][_0x51ed8a(0x1d3)](({unitId:_0x16d7db})=>this[_0x51ed8a(0x23f)](_0x16d7db))),this[_0x51ed8a(0x223)](this[_0x51ed8a(0x1b4)]['unitAdded$'][_0x51ed8a(0x1d3)](({unit:_0x1aea35})=>{const _0x2b7d1b=_0x51ed8a;_0x1aea35[_0x2b7d1b(0x250)]===_0x50d692[_0x2b7d1b(0x24d)]&&this['_queueSync'](_0x1aea35[_0x2b7d1b(0x266)]());})),this[_0x51ed8a(0x223)](this[_0x51ed8a(0x1b4)][_0x51ed8a(0x1ae)][_0x51ed8a(0x1d3)](_0x119909=>{const _0x3bc23c=_0x51ed8a;this['_service'][_0x3bc23c(0x1a2)](_0x119909[_0x3bc23c(0x266)]());})),this[_0x51ed8a(0x223)](this['_commandService'][_0x51ed8a(0x1c3)](_0x50fb88=>{const _0x37f38b=_0x51ed8a;if(_0x50fb88['id']===_0x2fe09d['id']&&wt(_0x50fb88[_0x37f38b(0x1df)])){let _0x123cb6=_0x50fb88[_0x37f38b(0x1df)];_0x123cb6[_0x37f38b(0x1a1)]||this[_0x37f38b(0x23f)](_0x123cb6[_0x37f38b(0x1ad)]);}}));}[_0x18accd(0x186)](){const _0x2bdedc=_0x18accd;this[_0x2bdedc(0x1a3)]=!0x0,super[_0x2bdedc(0x186)]();}[_0x18accd(0x238)](_0x1fbbf7){const _0x378d84=_0x18accd;this['_pendingUnitIds'][_0x378d84(0x1af)](_0x1fbbf7),!this[_0x378d84(0x1eb)]&&(this[_0x378d84(0x1eb)]=!0x0,queueMicrotask(()=>{const _0x2bb039=_0x378d84;if(this[_0x2bb039(0x1eb)]=!0x1,this[_0x2bb039(0x1a3)])return;let _0x4c5875=Array[_0x2bb039(0x1ec)](this[_0x2bb039(0x1a7)]);this[_0x2bb039(0x1a7)][_0x2bb039(0x267)](),_0x4c5875['forEach'](_0x2e8ce7=>this['_syncUnit'](_0x2e8ce7));}));}['_syncUnit'](_0x535414){const _0x598413=_0x18accd;let _0x31e807=this[_0x598413(0x1b4)][_0x598413(0x257)](_0x535414,_0x50d692[_0x598413(0x24d)]);_0x31e807&&this[_0x598413(0x181)]['syncUnit'](_0x31e807);}};Y=I([F(0x0,_0x478f5d),F(0x1,_0x222411),F(0x2,_0x2bb8ca(P)),F(0x3,_0x2bb8ca(L))],Y);function wt(_0x1fcf8e){const _0x554f22=_0x18accd;return typeof _0x1fcf8e==_0x554f22(0x224)&&!!_0x1fcf8e&&'unitId'in _0x1fcf8e&&typeof _0x1fcf8e[_0x554f22(0x1ad)]=='string'&&(!(_0x554f22(0x1a1)in _0x1fcf8e)||_0x1fcf8e[_0x554f22(0x1a1)]===void 0x0||typeof _0x1fcf8e['segmentId']==_0x554f22(0x218));}function _0x7514(_0x5bfad8,_0x5b277d){_0x5bfad8=_0x5bfad8-0x173;const _0x539718=_0x5397();let _0x7514b0=_0x539718[_0x5bfad8];return _0x7514b0;}let X=class extends _0x474e08{constructor(_0x443fc3,_0x410605){const _0x380cd6=_0x18accd;super(),this['_resourceManagerService']=_0x443fc3,this['_docFormulaModel']=_0x410605,this[_0x380cd6(0x223)](this['_resourceManagerService'][_0x380cd6(0x215)]({'pluginName':y,'businesses':[_0x50d692[_0x380cd6(0x24d)]],'toJson':_0x1c7113=>JSON[_0x380cd6(0x184)](this['_docFormulaModel']['serialize'](_0x1c7113)),'parseJson':_0x2435b9=>JSON[_0x380cd6(0x208)](_0x2435b9),'onLoad':(_0x1905dc,_0x501a4a)=>{const _0x517ebd=_0x380cd6;this[_0x517ebd(0x1e0)][_0x517ebd(0x19a)](_0x1905dc,_0x501a4a);},'onUnLoad':_0x4cc5a3=>this[_0x380cd6(0x1e0)][_0x380cd6(0x1bb)](_0x4cc5a3)}));}};X=I([F(0x0,_0x3b184b),F(0x1,_0x2bb8ca(P))],X);var Tt='@univerjs-pro/docs-formula',Et='1.1.0';const Dt={};let Z=class extends _0x474e08{constructor(_0x47ab21,_0x5a4bb3,_0x5efd96){const _0x302647=_0x18accd;super(),this[_0x302647(0x228)]=_0x47ab21,this[_0x302647(0x1ce)]=_0x5a4bb3,this[_0x302647(0x223)](_0x5efd96[_0x302647(0x1a8)]({'resolve':(_0x3f64a7,_0x5291fc)=>{const _0x569bd0=_0x302647;var _0xb3871d;return((_0xb3871d=_0x5291fc[_0x569bd0(0x1a6)])==null?void 0x0:_0xb3871d[_0x569bd0(0x252)](w)[_0x569bd0(0x1f3)](_0x3bbf2a=>({'startOffset':_0x3bbf2a['startIndex'],'endOffset':_0x3bbf2a[_0x569bd0(0x19f)]+0x1,'text':this[_0x569bd0(0x271)](_0x3f64a7,_0x3bbf2a[_0x569bd0(0x251)])})))??[];}})),this[_0x302647(0x223)](this[_0x302647(0x1ce)][_0x302647(0x1c2)]['subscribe'](({unitId:_0x40d711})=>{_0x5efd96['notifyTextChanged'](_0x40d711);}));}[_0x18accd(0x271)](_0x1764c3,_0x4d4bec){const _0x4fb140=_0x18accd;var _0x13ef5a;return((_0x13ef5a=this[_0x4fb140(0x1ce)]['getResult']({'unitId':_0x1764c3,'rangeId':_0x4d4bec}))==null?void 0x0:_0x13ef5a['text'])??'';}[_0x18accd(0x259)](_0x3effef,_0x8a8a6f,_0xd752ed){const _0x1385aa=_0x18accd;var _0xd0c458;let _0x1a1adb=this[_0x1385aa(0x228)][_0x1385aa(0x257)](_0x3effef,_0x50d692[_0x1385aa(0x24d)]),_0x20d992=_0x1a1adb==null?void 0x0:_0x1a1adb[_0x1385aa(0x222)]();if(!_0x20d992)return'';let _0x2f7fae=_0x20d992[_0x1385aa(0x1d2)][_0x1385aa(0x22a)](_0x8a8a6f,_0xd752ed),_0x4e9ae2=((_0xd0c458=_0x20d992[_0x1385aa(0x1a6)])==null?void 0x0:_0xd0c458['filter'](_0x4e46bc=>w(_0x4e46bc)&&_0x4e46bc[_0x1385aa(0x24f)]>=_0x8a8a6f&&_0x4e46bc[_0x1385aa(0x19f)]<_0xd752ed)[_0x1385aa(0x1dc)]((_0x3ccd61,_0x5addfc)=>_0x5addfc[_0x1385aa(0x24f)]-_0x3ccd61['startIndex']))??[];for(let _0x1f51b0 of _0x4e9ae2){let _0x4880ff=_0x1f51b0['startIndex']-_0x8a8a6f,_0xde8e51=_0x1f51b0[_0x1385aa(0x19f)]-_0x8a8a6f+0x1;_0x2f7fae=''+_0x2f7fae['slice'](0x0,_0x4880ff)+this[_0x1385aa(0x271)](_0x3effef,_0x1f51b0[_0x1385aa(0x251)])+_0x2f7fae[_0x1385aa(0x22a)](_0xde8e51);}return _0x2f7fae;}[_0x18accd(0x1b5)](_0x3b2503){return Ot(_0x3b2503);}['degradeBody'](_0x4562d9,_0x8fe63c,_0x399404={}){const _0x57cb6a=_0x18accd;var _0x1b3de1;return Ve({'id':_0x4562d9,'body':_0x8fe63c,'documentStyle':{}},(((_0x1b3de1=_0x8fe63c[_0x57cb6a(0x1a6)])==null?void 0x0:_0x1b3de1[_0x57cb6a(0x252)](w))??[])[_0x57cb6a(0x1f3)](_0x5c3098=>({'rangeId':_0x5c3098[_0x57cb6a(0x251)],'text':_0x399404[_0x5c3098[_0x57cb6a(0x251)]]??this[_0x57cb6a(0x271)](_0x4562d9,_0x5c3098[_0x57cb6a(0x251)])})))[_0x57cb6a(0x212)]??{'dataStream':''};}};Z=I([F(0x0,_0x478f5d),F(0x1,_0x2bb8ca(L)),F(0x2,_0x2bb8ca(_0x329faf))],Z);function Ot(_0x49a637){const _0x4bb4f2=_0x18accd;var _0x5197ed,_0x281917;let _0x589687=kt(_0x49a637),_0x23905e=Ve(_0x49a637,(((_0x5197ed=_0x49a637[_0x4bb4f2(0x212)])==null||(_0x5197ed=_0x5197ed[_0x4bb4f2(0x1a6)])==null?void 0x0:_0x5197ed['filter'](w))??[])[_0x4bb4f2(0x1f3)](_0x1e5546=>({'rangeId':_0x1e5546[_0x4bb4f2(0x251)],'text':At(_0x589687==null?void 0x0:_0x589687[_0x4bb4f2(0x1b9)][_0x1e5546[_0x4bb4f2(0x251)]])})));return _0x23905e[_0x4bb4f2(0x263)]=(_0x281917=_0x23905e[_0x4bb4f2(0x263)])==null?void 0x0:_0x281917[_0x4bb4f2(0x252)](_0x300316=>_0x300316[_0x4bb4f2(0x1c8)]!==y),_0x23905e;}function kt(_0x1d20a0){const _0x358ffc=_0x18accd;var _0x5cffd8;let _0x404e62=(_0x5cffd8=_0x1d20a0['resources'])==null||(_0x5cffd8=_0x5cffd8['find'](_0x2c9d48=>_0x2c9d48['name']===_0x358ffc(0x17d)))==null?void 0x0:_0x5cffd8[_0x358ffc(0x18b)];if(_0x404e62)try{let _0x77e541=JSON['parse'](_0x404e62);return x(_0x77e541)?_0x77e541:void 0x0;}catch{return;}}function At(_0x2eafb1){const _0x5c27e0=_0x18accd;return _0x2eafb1?_0x3cd2e8({'lastValue':_0x2eafb1['lastValue'],'numberFormat':_0x2eafb1[_0x5c27e0(0x255)]})[_0x5c27e0(0x242)]:'';}let Q=class extends _0x474e08{constructor(_0x28b65b,_0x16f87b,_0x14b4e9){const _0x5e1efb=_0x18accd;super(),this[_0x5e1efb(0x1ce)]=_0x28b65b,this['_cacheEligibilityService']=_0x16f87b,this['disposeWithMe'](_0x14b4e9['registerProvider'](this));}['collectMutations'](_0x42246f){const _0x3f7173=_0x18accd;let _0x549a79=new Map();for(let _0x460fe4 of this[_0x3f7173(0x1ce)][_0x3f7173(0x1f2)]()){var _0x31cc08;if(!this[_0x3f7173(0x24b)]['assess'](_0x460fe4[_0x3f7173(0x1ba)][_0x3f7173(0x193)],_0x460fe4['liveResult'])[_0x3f7173(0x260)])continue;let _0x3146c8=_0x1f7dc0(_0x460fe4['liveResult']),_0x3c2063=_0x3146c8?_0x1d1d0a(_0x3146c8):null;if(!_0x3c2063||jt(_0x460fe4[_0x3f7173(0x1ba)]['lastValue'],_0x3c2063))continue;let _0x530b09=_0x549a79[_0x3f7173(0x1ab)](_0x460fe4[_0x3f7173(0x175)][_0x3f7173(0x1ad)])??[];_0x530b09[_0x3f7173(0x253)]({'rangeId':_0x460fe4['identity'][_0x3f7173(0x251)],'expectedFormula':_0x460fe4['config'][_0x3f7173(0x193)],'expectedNumberFormat':(_0x31cc08=_0x460fe4[_0x3f7173(0x1ba)][_0x3f7173(0x255)])==null?void 0x0:_0x31cc08[_0x3f7173(0x1f9)],'expectedReferenceRevision':_0x460fe4[_0x3f7173(0x26f)],'lastValue':_0x3c2063}),_0x549a79['set'](_0x460fe4[_0x3f7173(0x175)][_0x3f7173(0x1ad)],_0x530b09);}return Array[_0x3f7173(0x1ec)](_0x549a79,([_0x46ccfa,_0x3b726b])=>({'id':H['id'],'params':{'unitId':_0x46ccfa,'updates':_0x3b726b}}));}};Q=I([F(0x0,_0x2bb8ca(L)),F(0x1,_0x2bb8ca(_0x562e65)),F(0x2,_0x2bb8ca(_0x29a8c7))],Q);function jt(_0x409a31,_0x4bb678){const _0x263e89=_0x18accd;return(_0x409a31==null?void 0x0:_0x409a31['v'])===_0x4bb678['v']&&(_0x409a31==null?void 0x0:_0x409a31['t'])===_0x4bb678['t']&&(_0x409a31==null?void 0x0:_0x409a31[_0x263e89(0x1f9)])===_0x4bb678[_0x263e89(0x1f9)];}let $=class extends _0x2ed24f{constructor(_0xf0cfa7=Dt,_0x50b363,_0x1d0177,_0x5d89f4){const _0x111037=_0x18accd;super(),this[_0x111037(0x19b)]=_0xf0cfa7,this[_0x111037(0x1e3)]=_0x50b363,this[_0x111037(0x227)]=_0x1d0177,this[_0x111037(0x179)]=_0x5d89f4;let {..._0x2e2ba8}=_0x350a4c({},Dt,this[_0x111037(0x19b)]);this[_0x111037(0x179)][_0x111037(0x1cc)](_0x111037(0x22f),_0x2e2ba8);}[_0x18accd(0x1d7)](){const _0x5a6701=_0x18accd;this['_injector'][_0x5a6701(0x1af)]([P]),this[_0x5a6701(0x1e3)][_0x5a6701(0x1af)]([L]),this['_injector'][_0x5a6701(0x1af)]([X]),this[_0x5a6701(0x1e3)][_0x5a6701(0x1af)]([Y]),this[_0x5a6701(0x1e3)][_0x5a6701(0x1af)]([Q]),this[_0x5a6701(0x1e3)][_0x5a6701(0x1af)]([Z]),_0x2ca687(this['_injector'],[[P],[X],[Y],[Q],[Z]]),[ot,st,V,H,U,W,G,K,ct,lt][_0x5a6701(0x19c)](_0x357689=>this[_0x5a6701(0x223)](this[_0x5a6701(0x227)][_0x5a6701(0x1e7)](_0x357689)));}};N($,_0x18accd(0x1de),y),N($,'packageName',Tt),N($,_0x18accd(0x17a),Et),N($,_0x18accd(0x250),_0x50d692['UNIVER_DOC']),$=I([_0x2a626f(_0x3c3fb2,_0x351eb2,_0x5b3025),F(0x1,_0x2bb8ca(_0x21727e)),F(0x2,_0x222411),F(0x3,_0x2701f4)],$);export{lt as ConvertDocFormulaToTextCommand,Me as DOC_FORMULA_CUSTOM_RANGE_KIND,Ne as DOC_FORMULA_OBJECT_REPLACEMENT,y as DOC_FORMULA_PLUGIN,je as DOC_FORMULA_SCHEMA_VERSION,Z as DocFormulaDisplayTextService,Y as DocFormulaLifecycleController,P as DocFormulaModel,X as DocFormulaResourceController,it as DocFormulaResultStatus,L as DocFormulaService,U as InsertDocFormulaCommand,C as InvalidDocFormulaInsertRangeError,K as RemoveDocFormulaCommand,st as RemoveDocFormulaMutation,ct as ReplaceDocFormulaWithTextCommand,H as SetDocFormulaLastValuesMutation,ot as SetDocFormulaMutation,G as SetDocFormulaNumberFormatCommand,V as SetDocFormulaResourceMutation,$ as UniverDocsFormulaPlugin,W as UpdateDocFormulaCommand,He as assertSafeDocFormulaInsertRange,Re as buildInsertDocFormulaActions,Be as buildRemoveDocFormulaActions,ze as buildUpdateDocFormulaActions,b as createEmptyDocFormulaResource,Ot as degradeDocFormulaDocumentData,T as findDocFormulaRange,Pe as isDocFormulaConfig,w as isDocFormulaRange,x as isDocFormulaResource,Fe as isFormulaLastValue};
1
+ const _0x1173d9=_0x24c4;(function(_0x1054ab,_0x3047dc){const _0x37a0f7=_0x24c4,_0x47b29e=_0x1054ab();while(!![]){try{const _0x247168=-parseInt(_0x37a0f7(0x1ec))/0x1+-parseInt(_0x37a0f7(0x1b9))/0x2+parseInt(_0x37a0f7(0x1a0))/0x3+parseInt(_0x37a0f7(0x13c))/0x4+parseInt(_0x37a0f7(0x127))/0x5*(parseInt(_0x37a0f7(0x166))/0x6)+-parseInt(_0x37a0f7(0x194))/0x7*(parseInt(_0x37a0f7(0x154))/0x8)+parseInt(_0x37a0f7(0x128))/0x9*(-parseInt(_0x37a0f7(0x205))/0xa);if(_0x247168===_0x3047dc)break;else _0x47b29e['push'](_0x47b29e['shift']());}catch(_0x30db35){_0x47b29e['push'](_0x47b29e['shift']());}}}(_0x3422,0x90f2e));import{FormulaCacheEligibilityService as _0x4ef013,FormulaLastValuePersistenceService as _0x29264c,HostExternalReferenceModel as _0x4e7a8f,UniverProFormulaEnginePlugin as _0x2ac530,buildUpsertHostExternalReferenceMutations as _0x18f854,collectFormulaExternalReferenceQualifiers as _0x40128b,getScalarFormulaResultCell as _0x3d55cd,resolveFormulaResultPresentation as _0x32521a,resolveHostFormulaExternalReferences as _0x3d2466,toFormulaLastValue as _0x24052f}from'@univerjs-pro/engine-formula';import{CellValueType as _0x144c98,CommandType as _0x2e2ecf,CustomRangeType as _0x14b828,DataStreamTreeTokenType as _0x5a972a,DependentOn as _0x192577,Disposable as _0x487bea,ICommandService as _0x170d7c,IConfigService as _0x335e00,IResourceManagerService as _0x39a957,IUndoRedoService as _0x4c8196,IUniverInstanceService as _0x1cb79e,Inject as _0x41fe0f,Injector as _0x4a690a,JSONX as _0x534e11,Plugin as _0x31da3e,TextX as _0x2dfabc,Tools as _0x13c34f,UniverInstanceType as _0xe966be,generateRandomId as _0x7ffdf2,getBodySliceForTextXAction as _0x4b0522,getCustomRangeInterval as _0x1c5e95,getParagraphContentStartOffset as _0x882200,getRichTextEditPath as _0x2a5420,merge as _0x1b50a3,shiftExclusiveRangeOnDelete as _0x324bcb,shiftExclusiveRangeOnInsert as _0x127e50,shiftInclusiveRangeOnDelete as _0x2e67c7,shiftInclusiveRangeOnInsert as _0xae953e,touchDependencies as _0x218854}from'@univerjs/core';import{DOC_SELECTION_OPTION_PRESERVE_CARET as _0xc6b882,DocSelectionManagerService as _0x764d00,DocTextResolverService as _0x325458,RichTextEditingMutation as _0x3f9ca3,UniverDocsPlugin as _0x48ceb4}from'@univerjs/docs';import{FormulaResultStatus as _0x208399,LexerTreeBuilder as _0x26af78,OtherFormulaBizType as _0xca11f,RegisterOtherFormulaService as _0x78c724}from'@univerjs/engine-formula';import{Subject as _0x11a859}from'rxjs';import{UniverLicensePlugin as _0x221e8d}from'@univerjs-pro/license';const y='DOC_FORMULA_PLUGIN',je=0x1,Me=_0x1173d9(0x12d),Ne='';function _0x24c4(_0x44fd83,_0x3adc5b){_0x44fd83=_0x44fd83-0x124;const _0x3422a8=_0x3422();let _0x24c4df=_0x3422a8[_0x44fd83];return _0x24c4df;}function b(){return{'schemaVersion':0x1,'formulas':{}};}function x(_0x29c68e){const _0x3e88e1=_0x1173d9;return!_0x29c68e||typeof _0x29c68e!=_0x3e88e1(0x21d)||!S(_0x29c68e,[_0x3e88e1(0x17e),_0x3e88e1(0x183)])||!(_0x3e88e1(0x17e)in _0x29c68e)||_0x29c68e['schemaVersion']!==0x1||!(_0x3e88e1(0x183)in _0x29c68e)||!_0x29c68e[_0x3e88e1(0x183)]||typeof _0x29c68e[_0x3e88e1(0x183)]!=_0x3e88e1(0x21d)||Array[_0x3e88e1(0x1c5)](_0x29c68e[_0x3e88e1(0x183)])?!0x1:Object[_0x3e88e1(0x188)](_0x29c68e['formulas'])[_0x3e88e1(0x153)](([_0x2eb237,_0x330c42])=>_0x2eb237[_0x3e88e1(0x1e6)]>0x0&&Pe(_0x330c42));}function Pe(_0x23299e){const _0xf12bb4=_0x1173d9;return!_0x23299e||typeof _0x23299e!=_0xf12bb4(0x21d)||!S(_0x23299e,[_0xf12bb4(0x1de),_0xf12bb4(0x1ae),_0xf12bb4(0x1b4)])||!(_0xf12bb4(0x1de)in _0x23299e)||typeof _0x23299e[_0xf12bb4(0x1de)]!='string'||!_0x23299e['formula'][_0xf12bb4(0x1bf)]()||_0xf12bb4(0x1ae)in _0x23299e&&_0x23299e['numberFormat']!=null&&(typeof _0x23299e[_0xf12bb4(0x1ae)]!='object'||!S(_0x23299e[_0xf12bb4(0x1ae)],['pattern'])||!(_0xf12bb4(0x1b6)in _0x23299e[_0xf12bb4(0x1ae)])||typeof _0x23299e[_0xf12bb4(0x1ae)]['pattern']!='string')?!0x1:!(_0xf12bb4(0x1b4)in _0x23299e)||_0x23299e['lastValue']==null||Fe(_0x23299e[_0xf12bb4(0x1b4)]);}function Fe(_0x51295c){const _0x47b459=_0x1173d9;return!_0x51295c||typeof _0x51295c!=_0x47b459(0x21d)||!S(_0x51295c,['v','t',_0x47b459(0x1b6)])||!('v'in _0x51295c)||_0x51295c['v']!==null&&typeof _0x51295c['v']!=_0x47b459(0x1b7)&&typeof _0x51295c['v']!=_0x47b459(0x1ba)&&typeof _0x51295c['v']!=_0x47b459(0x202)||'t'in _0x51295c&&_0x51295c['t']!=null&&!Ie(_0x51295c['t'])?!0x1:!(_0x47b459(0x1b6)in _0x51295c)||_0x51295c[_0x47b459(0x1b6)]==null||typeof _0x51295c[_0x47b459(0x1b6)]==_0x47b459(0x1b7);}function S(_0x21e426,_0x4d2b57){const _0x1a3eef=_0x1173d9;let _0x5b7e81=new Set(_0x4d2b57);return Object[_0x1a3eef(0x16c)](_0x21e426)[_0x1a3eef(0x153)](_0x265261=>_0x5b7e81['has'](_0x265261));}function Ie(_0x2986cb){const _0xffe6a2=_0x1173d9;return typeof _0x2986cb==_0xffe6a2(0x1ba)&&Object['values'](_0x144c98)[_0xffe6a2(0x1c2)](_0x2986cb);}const Le=new Set([_0x5a972a[_0x1173d9(0x181)],_0x5a972a['TABLE_START'],_0x5a972a[_0x1173d9(0x16e)],_0x5a972a[_0x1173d9(0x1c6)],_0x5a972a[_0x1173d9(0x14d)],_0x5a972a['TABLE_ROW_END'],_0x5a972a[_0x1173d9(0x1df)],_0x5a972a[_0x1173d9(0x21f)],_0x5a972a[_0x1173d9(0x1ef)],_0x5a972a[_0x1173d9(0x21b)],_0x5a972a['COLUMN_GROUP_END'],_0x5a972a[_0x1173d9(0x143)],_0x5a972a[_0x1173d9(0x1d4)],_0x5a972a[_0x1173d9(0x18e)]]);var C=class extends Error{constructor(){super('Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries');}};function Re(_0x52ccf1){const _0x2ff303=_0x1173d9;var _0xf22a04,_0xfd92e4;let _0x297c81=_0x13c34f[_0x2ff303(0x168)](_0x52ccf1[_0x2ff303(0x150)]),_0x391bbd=j(_0x297c81),{startOffset:_0xd7b251,endOffset:_0x27cbd9}=We(_0x391bbd,_0x52ccf1[_0x2ff303(0x185)],_0x52ccf1[_0x2ff303(0x186)]);He(_0x391bbd,_0xd7b251,_0x27cbd9);let _0x5bb1c9=((_0xf22a04=_0x391bbd[_0x2ff303(0x1c9)])==null?void 0x0:_0xf22a04[_0x2ff303(0x1a8)](_0xe74ebe=>{const _0x558db4=_0x2ff303;if(!w(_0xe74ebe))return!0x1;let _0x3b5521=_0x1c5e95(_0xe74ebe);return _0x3b5521[_0x558db4(0x186)]>_0xd7b251&&_0x3b5521['startOffset']<_0x27cbd9;})[_0x2ff303(0x17f)](_0x1e2229=>_0x1e2229[_0x2ff303(0x217)]))??[];qe(_0x391bbd,_0xd7b251,_0x27cbd9,''),_0x391bbd['customRanges']=[...((_0xfd92e4=_0x391bbd[_0x2ff303(0x1c9)])==null?void 0x0:_0xfd92e4['filter'](_0x3d564b=>!_0x5bb1c9[_0x2ff303(0x1c2)](_0x3d564b['rangeId'])&&_0x3d564b[_0x2ff303(0x217)]!==_0x52ccf1['rangeId']))??[],Ue(_0x52ccf1['rangeId'],_0xd7b251)][_0x2ff303(0x1c1)]((_0x4843fd,_0x10eabe)=>_0x4843fd[_0x2ff303(0x1f9)]-_0x10eabe['startIndex']);let _0x4257f7=E(_0x52ccf1[_0x2ff303(0x1e7)]);return _0x5bb1c9['forEach'](_0x1a51e7=>{const _0x2fc0cd=_0x2ff303;delete _0x4257f7[_0x2fc0cd(0x183)][_0x1a51e7];}),_0x4257f7['formulas'][_0x52ccf1[_0x2ff303(0x217)]]=_0x13c34f[_0x2ff303(0x168)](_0x52ccf1['config']),{'nextDocumentData':_0x297c81,'nextResource':_0x4257f7,'cursorOffset':_0xd7b251+0x1};}function ze(_0x2bab12){const _0x2a4af6=_0x1173d9;var _0x91564c,_0x28f6f8;let _0x1b6eb5=_0x13c34f['deepClone'](_0x2bab12[_0x2a4af6(0x150)]),_0xaacf8a=(_0x91564c=j(_0x1b6eb5)[_0x2a4af6(0x1c9)])==null?void 0x0:_0x91564c['find'](_0x1ca4e2=>_0x1ca4e2[_0x2a4af6(0x217)]===_0x2bab12[_0x2a4af6(0x217)]&&w(_0x1ca4e2));if(!_0xaacf8a||!((_0x28f6f8=_0x2bab12[_0x2a4af6(0x1e7)])!=null&&_0x28f6f8[_0x2a4af6(0x183)][_0x2bab12['rangeId']]))return null;let _0x5e6d38=E(_0x2bab12[_0x2a4af6(0x1e7)]);return _0x5e6d38['formulas'][_0x2bab12[_0x2a4af6(0x217)]]=_0x13c34f[_0x2a4af6(0x168)](_0x2bab12[_0x2a4af6(0x216)]),{'nextDocumentData':_0x1b6eb5,'nextResource':_0x5e6d38,'cursorOffset':_0xaacf8a[_0x2a4af6(0x15e)]+0x1};}function Be(_0x4baa3c){const _0x141623=_0x1173d9;let _0xabe635=_0x13c34f[_0x141623(0x168)](_0x4baa3c[_0x141623(0x150)]),_0x7b7226=Je(_0xabe635,_0x4baa3c[_0x141623(0x217)],_0x4baa3c[_0x141623(0x204)]??'');if(_0x7b7226==null)return null;let _0x38c3a2=E(_0x4baa3c[_0x141623(0x1e7)]);return delete _0x38c3a2[_0x141623(0x183)][_0x4baa3c[_0x141623(0x217)]],{'nextDocumentData':_0xabe635,'nextResource':_0x38c3a2,'cursorOffset':_0x7b7226};}function Ve(_0x16a79b,_0x55591f){const _0x2e525b=_0x1173d9;var _0x58e65e;let _0x23819b=_0x13c34f[_0x2e525b(0x168)](_0x16a79b),_0x2de3ea=_0x23819b[_0x2e525b(0x1e1)];if(!_0x2de3ea)return _0x23819b;let _0x1cc7a5=new Map(_0x55591f[_0x2e525b(0x17f)](_0xa52142=>[_0xa52142[_0x2e525b(0x217)],_0xa52142[_0x2e525b(0x204)]])),_0x30fd31=((_0x58e65e=_0x2de3ea['customRanges'])==null?void 0x0:_0x58e65e[_0x2e525b(0x1a8)](_0x13cf27=>w(_0x13cf27)&&_0x1cc7a5[_0x2e525b(0x130)](_0x13cf27[_0x2e525b(0x217)]))[_0x2e525b(0x1c1)]((_0x97cc5a,_0x2f7ef7)=>_0x2f7ef7[_0x2e525b(0x1f9)]-_0x97cc5a[_0x2e525b(0x1f9)]))??[];for(let _0x3f0e0a of _0x30fd31)Je(_0x23819b,_0x3f0e0a[_0x2e525b(0x217)],_0x1cc7a5[_0x2e525b(0x137)](_0x3f0e0a[_0x2e525b(0x217)])??'');return _0x23819b;}function w(_0x2546b3){const _0x9a3531=_0x1173d9;var _0x416999;return(_0x2546b3==null?void 0x0:_0x2546b3[_0x9a3531(0x1a5)])===_0x14b828[_0x9a3531(0x19b)]&&_0x2546b3[_0x9a3531(0x1ac)]===!0x0&&((_0x416999=_0x2546b3[_0x9a3531(0x1b2)])==null?void 0x0:_0x416999['kind'])===_0x9a3531(0x12d);}function T(_0x35e79c,_0x134953){const _0x2cb2a5=_0x1173d9;var _0x1a42ee;return _0x35e79c==null||(_0x1a42ee=_0x35e79c[_0x2cb2a5(0x1c9)])==null?void 0x0:_0x1a42ee[_0x2cb2a5(0x1c3)](_0x8d3c9=>_0x8d3c9[_0x2cb2a5(0x217)]===_0x134953&&w(_0x8d3c9));}function He(_0x595b96,_0x43574a,_0x5c3094){const _0x139cf0=_0x1173d9;if(_0x43574a===_0x5c3094){if(Le[_0x139cf0(0x130)](_0x595b96[_0x139cf0(0x16d)][_0x43574a]))throw new C();}else{for(let _0xad2637=_0x43574a;_0xad2637<_0x5c3094;_0xad2637++)if(_0x595b96['dataStream'][_0xad2637]===_0x5a972a[_0x139cf0(0x132)]||Le[_0x139cf0(0x130)](_0x595b96['dataStream'][_0xad2637]))throw new C();}}function Ue(_0x20ecb1,_0x3f6faa){return{'startIndex':_0x3f6faa,'endIndex':_0x3f6faa,'rangeId':_0x20ecb1,'rangeType':_0x14b828['CUSTOM'],'wholeEntity':!0x0,'properties':{'kind':Me}};}function E(_0x4688ae){const _0x266f86=_0x1173d9;return _0x4688ae?_0x13c34f[_0x266f86(0x168)](_0x4688ae):b();}function We(_0x2dfbda,_0x616eb0,_0x5c678e){const _0x2bd236=_0x1173d9;let _0x297f69=Ke(_0x2dfbda),_0x394e81=_0x616eb0??_0x297f69,_0xba4cab=_0x5c678e??_0x394e81;return{'startOffset':Ge(Math['min'](_0x394e81,_0xba4cab),_0x297f69),'endOffset':Ge(Math[_0x2bd236(0x221)](_0x394e81,_0xba4cab),_0x297f69)};}function Ge(_0x4892f0,_0x2bb1c2){const _0x4975c6=_0x1173d9;return Math[_0x4975c6(0x221)](0x0,Math[_0x4975c6(0x1f2)](_0x4892f0,_0x2bb1c2));}function Ke(_0x11174f){const _0x40a7b0=_0x1173d9;return _0x11174f['dataStream'][_0x40a7b0(0x1fc)](''+_0x5a972a[_0x40a7b0(0x132)]+_0x5a972a[_0x40a7b0(0x181)])?Math[_0x40a7b0(0x221)](0x0,_0x11174f['dataStream'][_0x40a7b0(0x1e6)]-0x2):_0x11174f[_0x40a7b0(0x16d)][_0x40a7b0(0x1fc)](_0x5a972a[_0x40a7b0(0x181)])?Math['max'](0x0,_0x11174f[_0x40a7b0(0x16d)][_0x40a7b0(0x1e6)]-0x1):_0x11174f['dataStream'][_0x40a7b0(0x1e6)];}function qe(_0x5a55e7,_0x294af2,_0x318e32,_0x4b6e5b){_0x318e32>_0x294af2&&Xe(_0x5a55e7,_0x294af2,_0x318e32),Ye(_0x5a55e7,_0x294af2,_0x4b6e5b);}function Je(_0x1941aa,_0x27a7b9,_0x16a66b){const _0x4a61da=_0x1173d9;var _0x113c56,_0x775c43;let _0x468627=j(_0x1941aa),_0x406041=(_0x113c56=_0x468627[_0x4a61da(0x1c9)])==null?void 0x0:_0x113c56['find'](_0x191395=>_0x191395[_0x4a61da(0x217)]===_0x27a7b9&&w(_0x191395));if(!_0x406041)return null;let _0x5c764f=_0x1c5e95(_0x406041);return qe(_0x468627,_0x5c764f['startOffset'],_0x5c764f[_0x4a61da(0x186)],_0x16a66b),_0x468627[_0x4a61da(0x1c9)]=(_0x775c43=_0x468627['customRanges'])==null?void 0x0:_0x775c43[_0x4a61da(0x1a8)](_0x24f0e0=>_0x24f0e0[_0x4a61da(0x217)]!==_0x27a7b9),_0x5c764f[_0x4a61da(0x185)]+_0x16a66b[_0x4a61da(0x1e6)];}function Ye(_0x5000c0,_0x57c2e5,_0x371b15){const _0x165096=_0x1173d9;_0x371b15&&(_0x5000c0[_0x165096(0x16d)]=''+_0x5000c0[_0x165096(0x16d)]['slice'](0x0,_0x57c2e5)+_0x371b15+_0x5000c0[_0x165096(0x16d)][_0x165096(0x12a)](_0x57c2e5),Ze(_0x5000c0,_0x57c2e5,_0x371b15['length']));}function Xe(_0x27c549,_0x140dd1,_0xdfd73c){const _0x2843bd=_0x1173d9;let _0x4a5feb=_0xdfd73c-_0x140dd1;_0x27c549[_0x2843bd(0x16d)]=''+_0x27c549['dataStream'][_0x2843bd(0x12a)](0x0,_0x140dd1)+_0x27c549['dataStream'][_0x2843bd(0x12a)](_0xdfd73c),Qe(_0x27c549,_0x140dd1,_0x4a5feb);}function Ze(_0xcdbf53,_0x4b7e3b,_0x1b2890){const _0x447fe2=_0x1173d9;_0xcdbf53[_0x447fe2(0x1e9)]=D(_0xcdbf53['paragraphs'],_0x4b7e3b,_0x1b2890),_0xcdbf53['sectionBreaks']=D(_0xcdbf53[_0x447fe2(0x1b3)],_0x4b7e3b,_0x1b2890),_0xcdbf53[_0x447fe2(0x12c)]=D(_0xcdbf53['customBlocks'],_0x4b7e3b,_0x1b2890),_0xcdbf53[_0x447fe2(0x1e2)]=$e(_0xcdbf53['textRuns'],_0x4b7e3b,_0x1b2890),_0xcdbf53['tables']=et(_0xcdbf53[_0x447fe2(0x1d8)],_0x4b7e3b,_0x1b2890),_0xcdbf53[_0x447fe2(0x199)]=k(_0xcdbf53[_0x447fe2(0x199)],_0x4b7e3b,_0x1b2890),_0xcdbf53['customRanges']=k(_0xcdbf53['customRanges'],_0x4b7e3b,_0x1b2890),_0xcdbf53[_0x447fe2(0x17c)]=k(_0xcdbf53['customDecorations'],_0x4b7e3b,_0x1b2890),_0xcdbf53[_0x447fe2(0x192)]=k(_0xcdbf53[_0x447fe2(0x192)],_0x4b7e3b,_0x1b2890);}function Qe(_0x422cd4,_0x5dd154,_0x5c5091){const _0x47899e=_0x1173d9;var _0x325dd1,_0x4850f4;_0x422cd4[_0x47899e(0x1e9)]=O(_0x422cd4['paragraphs'],_0x5dd154,_0x5c5091),_0x422cd4[_0x47899e(0x1b3)]=O(_0x422cd4[_0x47899e(0x1b3)],_0x5dd154,_0x5c5091),_0x422cd4[_0x47899e(0x12c)]=O(_0x422cd4[_0x47899e(0x12c)],_0x5dd154,_0x5c5091),_0x422cd4[_0x47899e(0x1e2)]=(_0x325dd1=tt((_0x4850f4=_0x422cd4[_0x47899e(0x1e2)])==null?void 0x0:_0x4850f4[_0x47899e(0x17f)](_0x4340d9=>({..._0x4340d9,'startIndex':_0x4340d9['st'],'endIndex':_0x4340d9['ed']})),_0x5dd154,_0x5c5091))==null?void 0x0:_0x325dd1[_0x47899e(0x17f)](_0x385276=>{let {startIndex:_0x1fb084,endIndex:_0x22bedd,..._0x512ff3}=_0x385276;return{..._0x512ff3,'st':_0x1fb084,'ed':_0x22bedd};}),_0x422cd4[_0x47899e(0x1d8)]=tt(_0x422cd4[_0x47899e(0x1d8)],_0x5dd154,_0x5c5091),_0x422cd4[_0x47899e(0x199)]=A(_0x422cd4['columnGroups'],_0x5dd154,_0x5c5091),_0x422cd4[_0x47899e(0x1c9)]=A(_0x422cd4[_0x47899e(0x1c9)],_0x5dd154,_0x5c5091),_0x422cd4[_0x47899e(0x17c)]=A(_0x422cd4[_0x47899e(0x17c)],_0x5dd154,_0x5c5091),_0x422cd4[_0x47899e(0x192)]=A(_0x422cd4[_0x47899e(0x192)],_0x5dd154,_0x5c5091);}function D(_0x51b1dc,_0x38d7e2,_0x45e38e){const _0x1bb1f2=_0x1173d9;return _0x51b1dc==null?void 0x0:_0x51b1dc['map'](_0x53f9e7=>_0x53f9e7[_0x1bb1f2(0x1f9)]>=_0x38d7e2?{..._0x53f9e7,'startIndex':_0x53f9e7[_0x1bb1f2(0x1f9)]+_0x45e38e}:_0x53f9e7);}function O(_0x131e32,_0x5459e0,_0x5b5409){const _0x4a72a3=_0x1173d9;let _0x1b91a2=_0x5459e0+_0x5b5409;return _0x131e32==null?void 0x0:_0x131e32[_0x4a72a3(0x17f)](_0xeb4f8d=>_0xeb4f8d[_0x4a72a3(0x1f9)]>=_0x5459e0&&_0xeb4f8d[_0x4a72a3(0x1f9)]<_0x1b91a2?null:_0xeb4f8d[_0x4a72a3(0x1f9)]>=_0x1b91a2?{..._0xeb4f8d,'startIndex':_0xeb4f8d[_0x4a72a3(0x1f9)]-_0x5b5409}:_0xeb4f8d)[_0x4a72a3(0x1a8)](_0xc61ba8=>_0xc61ba8!=null);}function $e(_0x24f305,_0x2ca265,_0x204a1d){const _0xb6f4eb=_0x1173d9;return _0x24f305==null?void 0x0:_0x24f305[_0xb6f4eb(0x17f)](_0x461e67=>_0x461e67['st']>=_0x2ca265?{..._0x461e67,'st':_0x461e67['st']+_0x204a1d,'ed':_0x461e67['ed']+_0x204a1d}:_0x461e67['ed']>_0x2ca265?{..._0x461e67,'ed':_0x461e67['ed']+_0x204a1d}:_0x461e67);}function k(_0x990d75,_0x3b5bdd,_0x4f6626){const _0x255b89=_0x1173d9;return _0x990d75==null?void 0x0:_0x990d75[_0x255b89(0x17f)](_0x7ddaee=>_0xae953e(_0x7ddaee,_0x3b5bdd,_0x4f6626));}function et(_0x343fdc,_0x7fc0b9,_0x27cc79){const _0x3c0a90=_0x1173d9;return _0x343fdc==null?void 0x0:_0x343fdc[_0x3c0a90(0x17f)](_0x26cc98=>_0x127e50(_0x26cc98,_0x7fc0b9,_0x27cc79));}function A(_0xdcc80,_0x1a3421,_0x3e549c){const _0x783992=_0x1173d9;return _0xdcc80==null?void 0x0:_0xdcc80[_0x783992(0x17f)](_0x4f795d=>_0x2e67c7(_0x4f795d,_0x1a3421,_0x3e549c))[_0x783992(0x1a8)](_0x428ea3=>_0x428ea3!=null);}function tt(_0x4adf07,_0x164afe,_0x5caa79){const _0x2fe41e=_0x1173d9;return _0x4adf07==null?void 0x0:_0x4adf07[_0x2fe41e(0x17f)](_0x1e7b83=>_0x324bcb(_0x1e7b83,_0x164afe,_0x5caa79))['filter'](_0x93fa2f=>_0x93fa2f!=null);}function j(_0x155967){const _0x5210a5=_0x1173d9;if(!_0x155967[_0x5210a5(0x1e1)])throw Error(_0x5210a5(0x223));return _0x155967[_0x5210a5(0x1e1)];}function M(_0x102f28){'@babel/helpers - typeof';const _0x447a14=_0x1173d9;return M=typeof Symbol==_0x447a14(0x1a3)&&typeof Symbol[_0x447a14(0x139)]==_0x447a14(0x1d9)?function(_0x364345){return typeof _0x364345;}:function(_0x4dafc9){const _0x427e0f=_0x447a14;return _0x4dafc9&&typeof Symbol==_0x427e0f(0x1a3)&&_0x4dafc9[_0x427e0f(0x14c)]===Symbol&&_0x4dafc9!==Symbol[_0x427e0f(0x175)]?'symbol':typeof _0x4dafc9;},M(_0x102f28);}function nt(_0x28d37c,_0x11ee35){const _0x5d2cdc=_0x1173d9;if(M(_0x28d37c)!=_0x5d2cdc(0x21d)||!_0x28d37c)return _0x28d37c;var _0x19216a=_0x28d37c[Symbol[_0x5d2cdc(0x18c)]];if(_0x19216a!==void 0x0){var _0x49a564=_0x19216a[_0x5d2cdc(0x15d)](_0x28d37c,_0x11ee35||_0x5d2cdc(0x145));if(M(_0x49a564)!='object')return _0x49a564;throw TypeError(_0x5d2cdc(0x16a));}return(_0x11ee35===_0x5d2cdc(0x1b7)?String:Number)(_0x28d37c);}function rt(_0x240fa9){const _0x2b5023=_0x1173d9;var _0x51f7e0=nt(_0x240fa9,'string');return M(_0x51f7e0)==_0x2b5023(0x1d9)?_0x51f7e0:_0x51f7e0+'';}function N(_0x4f3624,_0x463a71,_0x534c3){const _0xa9bdf5=_0x1173d9;return(_0x463a71=rt(_0x463a71))in _0x4f3624?Object[_0xa9bdf5(0x13e)](_0x4f3624,_0x463a71,{'value':_0x534c3,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4f3624[_0x463a71]=_0x534c3,_0x4f3624;}var P=class extends _0x487bea{constructor(..._0x20d47f){const _0x20db20=_0x1173d9;super(..._0x20d47f),N(this,_0x20db20(0x1a1),new Map()),N(this,'_rawResources',new Map()),N(this,_0x20db20(0x148),new Map()),N(this,_0x20db20(0x1f4),new _0x11a859()),N(this,_0x20db20(0x15f),this[_0x20db20(0x1f4)]['asObservable']());}[_0x1173d9(0x215)](_0x40724a,_0x1adf40){const _0x4d28fb=_0x1173d9;var _0x1ee1d9;let _0x26eacf=(_0x1ee1d9=this[_0x4d28fb(0x1a1)][_0x4d28fb(0x137)](_0x40724a))==null?void 0x0:_0x1ee1d9[_0x4d28fb(0x183)][_0x1adf40];return _0x26eacf?_0x13c34f['deepClone'](_0x26eacf):void 0x0;}['getFormulas'](_0x4bd826){const _0x512965=_0x1173d9;var _0x188c85;return _0x13c34f[_0x512965(0x168)](((_0x188c85=this[_0x512965(0x1a1)][_0x512965(0x137)](_0x4bd826))==null?void 0x0:_0x188c85['formulas'])??{});}[_0x1173d9(0x1ce)](_0x2776b7){const _0x3abab9=_0x1173d9;let _0x2b9d23=this[_0x3abab9(0x1a1)][_0x3abab9(0x137)](_0x2776b7);return _0x2b9d23?_0x13c34f[_0x3abab9(0x168)](_0x2b9d23):void 0x0;}[_0x1173d9(0x20e)](_0xc645b1,_0x1a4e50,_0x1ff1ef){const _0x8e7686=_0x1173d9;return this[_0x8e7686(0x169)](_0xc645b1,{[_0x1a4e50]:_0x1ff1ef});}['setResource'](_0x9c3e3e,_0x34b978){const _0xaacac2=_0x1173d9;return this[_0xaacac2(0x148)][_0xaacac2(0x130)](_0x9c3e3e)||!x(_0x34b978)?!0x1:(this[_0xaacac2(0x1a1)]['set'](_0x9c3e3e,_0x13c34f[_0xaacac2(0x168)](_0x34b978)),this[_0xaacac2(0x1f4)][_0xaacac2(0x1d3)]({'unitId':_0x9c3e3e}),!0x0);}[_0x1173d9(0x169)](_0x223608,_0x5f4f83){const _0x576537=_0x1173d9;if(this[_0x576537(0x148)]['has'](_0x223608)||!Object[_0x576537(0x16c)](_0x5f4f83)[_0x576537(0x1e6)]||!x({'schemaVersion':0x1,'formulas':_0x5f4f83}))return!0x1;let _0x3c4b17=this[_0x576537(0x1a1)][_0x576537(0x137)](_0x223608)??b(),_0x3817b3=_0x13c34f['deepClone'](_0x3c4b17);return Object[_0x576537(0x17a)](_0x3817b3[_0x576537(0x183)],_0x13c34f['deepClone'](_0x5f4f83)),this[_0x576537(0x1a1)][_0x576537(0x1be)](_0x223608,_0x3817b3),this['_change$']['next']({'unitId':_0x223608,'rangeIds':Object[_0x576537(0x16c)](_0x5f4f83)}),!0x0;}[_0x1173d9(0x126)](_0x13a24a,_0x68741){const _0x5b2577=_0x1173d9;if(this[_0x5b2577(0x148)][_0x5b2577(0x130)](_0x13a24a))return!0x1;let _0x5bdea0=this[_0x5b2577(0x1a1)][_0x5b2577(0x137)](_0x13a24a);if(!(_0x5bdea0!=null&&_0x5bdea0[_0x5b2577(0x183)][_0x68741]))return!0x1;let _0x48488e=_0x13c34f[_0x5b2577(0x168)](_0x5bdea0);return delete _0x48488e[_0x5b2577(0x183)][_0x68741],this['_resources'][_0x5b2577(0x1be)](_0x13a24a,_0x48488e),this['_change$'][_0x5b2577(0x1d3)]({'unitId':_0x13a24a,'rangeIds':[_0x68741]}),!0x0;}['load'](_0x434b6d,_0x10133d){const _0x294d4b=_0x1173d9;return _0x10133d&&typeof _0x10133d=='object'&&_0x294d4b(0x17e)in _0x10133d&&_0x10133d[_0x294d4b(0x17e)]!==0x1?(this[_0x294d4b(0x17d)](_0x434b6d,_0x10133d,_0x294d4b(0x155)),!0x1):x(_0x10133d)?(this[_0x294d4b(0x1a1)][_0x294d4b(0x1be)](_0x434b6d,_0x13c34f[_0x294d4b(0x168)](_0x10133d)),this['_rawResources']['delete'](_0x434b6d),this[_0x294d4b(0x148)][_0x294d4b(0x18d)](_0x434b6d),this[_0x294d4b(0x1f4)]['next']({'unitId':_0x434b6d}),!0x0):(this[_0x294d4b(0x17d)](_0x434b6d,_0x10133d,_0x294d4b(0x177)),!0x1);}[_0x1173d9(0x1b8)](_0x3bcca9){const _0x2ab0ca=_0x1173d9;let _0x384f69=this[_0x2ab0ca(0x1a1)][_0x2ab0ca(0x137)](_0x3bcca9);return _0x384f69?_0x13c34f['deepClone'](_0x384f69):this[_0x2ab0ca(0x12e)][_0x2ab0ca(0x130)](_0x3bcca9)?_0x13c34f[_0x2ab0ca(0x168)](this[_0x2ab0ca(0x12e)][_0x2ab0ca(0x137)](_0x3bcca9)):b();}['getLoadError'](_0x5b2391){const _0x592b18=_0x1173d9;return this[_0x592b18(0x148)][_0x592b18(0x137)](_0x5b2391);}[_0x1173d9(0x179)](_0x414efb){const _0x287c25=_0x1173d9;this[_0x287c25(0x1a1)][_0x287c25(0x18d)](_0x414efb),this[_0x287c25(0x12e)][_0x287c25(0x18d)](_0x414efb),this[_0x287c25(0x148)][_0x287c25(0x18d)](_0x414efb),this[_0x287c25(0x1f4)][_0x287c25(0x1d3)]({'unitId':_0x414efb});}['dispose'](){const _0x46b309=_0x1173d9;this[_0x46b309(0x1a1)][_0x46b309(0x1db)](),this[_0x46b309(0x12e)][_0x46b309(0x1db)](),this[_0x46b309(0x148)][_0x46b309(0x1db)](),this[_0x46b309(0x1f4)][_0x46b309(0x167)](),super['dispose']();}[_0x1173d9(0x17d)](_0x482e80,_0x1f43d9,_0x52316a){const _0x590f97=_0x1173d9;this['_resources'][_0x590f97(0x18d)](_0x482e80),this[_0x590f97(0x12e)]['set'](_0x482e80,_0x13c34f['deepClone'](_0x1f43d9)),this['_loadErrors'][_0x590f97(0x1be)](_0x482e80,_0x52316a),this[_0x590f97(0x1f4)][_0x590f97(0x1d3)]({'unitId':_0x482e80});}};let it=function(_0x15b801){const _0x4d2126=_0x1173d9;return _0x15b801[_0x4d2126(0x189)]=_0x4d2126(0x13a),_0x15b801[_0x4d2126(0x1d1)]=_0x4d2126(0x1b1),_0x15b801[_0x4d2126(0x197)]=_0x4d2126(0x135),_0x15b801['ERROR']=_0x4d2126(0x15b),_0x15b801;}({});function F(_0x5569f7,_0x51a7c9){return function(_0x3741db,_0x1f9740){_0x51a7c9(_0x3741db,_0x1f9740,_0x5569f7);};}function I(_0x549cd2,_0x6884cd,_0x397a42,_0x3d9818){const _0x39391=_0x1173d9;var _0x1deec1=arguments[_0x39391(0x1e6)],_0x15f210=_0x1deec1<0x3?_0x6884cd:_0x3d9818===null?_0x3d9818=Object[_0x39391(0x180)](_0x6884cd,_0x397a42):_0x3d9818,_0x3dc2c7;if(typeof Reflect==_0x39391(0x21d)&&typeof Reflect[_0x39391(0x18f)]==_0x39391(0x1a3))_0x15f210=Reflect[_0x39391(0x18f)](_0x549cd2,_0x6884cd,_0x397a42,_0x3d9818);else{for(var _0x38af3b=_0x549cd2[_0x39391(0x1e6)]-0x1;_0x38af3b>=0x0;_0x38af3b--)(_0x3dc2c7=_0x549cd2[_0x38af3b])&&(_0x15f210=(_0x1deec1<0x3?_0x3dc2c7(_0x15f210):_0x1deec1>0x3?_0x3dc2c7(_0x6884cd,_0x397a42,_0x15f210):_0x3dc2c7(_0x6884cd,_0x397a42))||_0x15f210);}return _0x1deec1>0x3&&_0x15f210&&Object[_0x39391(0x13e)](_0x6884cd,_0x397a42,_0x15f210),_0x15f210;}let L=class extends _0x487bea{constructor(_0x58380e,_0x5d1fb0,_0x304b61){const _0x331478=_0x1173d9;super(),this[_0x331478(0x20f)]=_0x58380e,this[_0x331478(0x14b)]=_0x5d1fb0,this[_0x331478(0x207)]=_0x304b61,N(this,_0x331478(0x1e3),new Map()),N(this,_0x331478(0x1bc),new Map()),N(this,_0x331478(0x142),new _0x11a859()),N(this,'presentationChanged$',this[_0x331478(0x142)][_0x331478(0x190)]()),this[_0x331478(0x140)](this[_0x331478(0x14b)][_0x331478(0x1cd)][_0x331478(0x1f7)](_0x27b466=>{const _0x2e9f9b=_0x331478;for(let _0x291ecf of Object[_0x2e9f9b(0x1f3)](_0x27b466))for(let _0x436ce1 of Object[_0x2e9f9b(0x1f3)](_0x291ecf))_0x436ce1[_0x2e9f9b(0x146)](_0x2e998c=>this[_0x2e9f9b(0x1f6)](_0x2e998c));}));}[_0x1173d9(0x1fb)](_0x1378f7){const _0x55429c=_0x1173d9;var _0x123b38;let _0xa479cc=_0x1378f7['getUnitId'](),_0x59a805=((_0x123b38=_0x1378f7[_0x55429c(0x160)]()[_0x55429c(0x1e1)])==null||(_0x123b38=_0x123b38[_0x55429c(0x1c9)])==null?void 0x0:_0x123b38[_0x55429c(0x1a8)](w))??[],_0x399e3b=this[_0x55429c(0x20f)]['getFormulas'](_0xa479cc),_0x3cc44e=new Set();for(let _0xb0652 of _0x59a805){let _0x5a3e4e=_0x399e3b[_0xb0652[_0x55429c(0x217)]];_0x5a3e4e&&(_0x3cc44e['add'](R(_0xa479cc,_0xb0652[_0x55429c(0x217)])),this['register']({'unitId':_0xa479cc,'rangeId':_0xb0652[_0x55429c(0x217)]},_0x5a3e4e));}for(let _0x46075c of Array[_0x55429c(0x16f)](this[_0x55429c(0x1e3)][_0x55429c(0x1f3)]()))_0x46075c[_0x55429c(0x224)]===_0xa479cc&&!_0x3cc44e[_0x55429c(0x130)](R(_0x46075c[_0x55429c(0x224)],_0x46075c[_0x55429c(0x217)]))&&this['unregister'](_0x46075c);}[_0x1173d9(0x218)](_0x103abb,_0x4dd879){const _0xe26a40=_0x1173d9;let _0x5abb0a=R(_0x103abb[_0xe26a40(0x224)],_0x103abb[_0xe26a40(0x217)]),_0x79c917=this[_0xe26a40(0x1e3)][_0xe26a40(0x137)](_0x5abb0a),_0x1751be=this['_hostExternalReferenceModel'][_0xe26a40(0x1f0)](_0x103abb[_0xe26a40(0x224)]);if(_0x79c917&&_0x79c917[_0xe26a40(0x216)]['formula']===_0x4dd879['formula']&&_0x79c917[_0xe26a40(0x210)]===_0x1751be){_0x79c917['config']=_0x4dd879;let _0xd24928=_0x79c917[_0xe26a40(0x20c)]?this[_0xe26a40(0x14b)][_0xe26a40(0x1c0)](_0x79c917[_0xe26a40(0x224)],_0x79c917[_0xe26a40(0x224)],_0x79c917[_0xe26a40(0x20c)])??void 0x0:void 0x0;_0x79c917[_0xe26a40(0x208)]=_0xd24928,this[_0xe26a40(0x1bd)](_0x5abb0a,z(_0x4dd879,_0xd24928));return;}_0x79c917!=null&&_0x79c917[_0xe26a40(0x20c)]&&this[_0xe26a40(0x18b)](_0x79c917);let _0x55f8f6={..._0x103abb,'config':_0x4dd879,'referenceRevision':_0x1751be,'presentation':z(_0x4dd879,void 0x0)};if(this['_registrations'][_0xe26a40(0x1be)](_0x5abb0a,_0x55f8f6),!_0x4dd879[_0xe26a40(0x1de)][_0xe26a40(0x1bf)]())return;let _0x3f8b83=this[_0xe26a40(0x14b)]['registerFormulaWithRange'](_0x103abb[_0xe26a40(0x224)],_0x103abb[_0xe26a40(0x224)],_0x4dd879[_0xe26a40(0x1de)],void 0x0,{'rangeId':_0x103abb[_0xe26a40(0x217)]},_0xca11f['DOC'],_0x103abb[_0xe26a40(0x217)]);_0x55f8f6[_0xe26a40(0x20c)]=_0x3f8b83,this[_0xe26a40(0x1bc)][_0xe26a40(0x1be)](_0x3f8b83,_0x5abb0a);}[_0x1173d9(0x13d)](_0x188b01){const _0x17fbdc=_0x1173d9;let _0x2cd7ed=R(_0x188b01[_0x17fbdc(0x224)],_0x188b01['rangeId']),_0x47854c=this[_0x17fbdc(0x1e3)][_0x17fbdc(0x137)](_0x2cd7ed);_0x47854c&&(this[_0x17fbdc(0x18b)](_0x47854c),this[_0x17fbdc(0x1e3)][_0x17fbdc(0x18d)](_0x2cd7ed));}[_0x1173d9(0x191)](_0x22b81e){const _0x32816e=_0x1173d9;for(let _0x4e8676 of Array[_0x32816e(0x16f)](this[_0x32816e(0x1e3)]['values']()))_0x4e8676[_0x32816e(0x224)]===_0x22b81e&&this['unregister'](_0x4e8676);}[_0x1173d9(0x157)](_0x27f04f){const _0x30768e=_0x1173d9;var _0xf21568;return(_0xf21568=this[_0x30768e(0x1e3)][_0x30768e(0x137)](R(_0x27f04f[_0x30768e(0x224)],_0x27f04f[_0x30768e(0x217)])))==null?void 0x0:_0xf21568[_0x30768e(0x18a)];}[_0x1173d9(0x1d6)](_0x5c9362){const _0x489b21=_0x1173d9;let _0x1acd5d=this[_0x489b21(0x1e3)][_0x489b21(0x137)](R(_0x5c9362[_0x489b21(0x224)],_0x5c9362[_0x489b21(0x217)]));return _0x1acd5d?B(_0x1acd5d):void 0x0;}['getRegisteredFormulas'](){const _0xe7678d=_0x1173d9;return Array[_0xe7678d(0x16f)](this[_0xe7678d(0x1e3)][_0xe7678d(0x1f3)](),_0x5d79e4=>({'identity':{'unitId':_0x5d79e4['unitId'],'rangeId':_0x5d79e4[_0xe7678d(0x217)]},'config':_0x5d79e4[_0xe7678d(0x216)],'referenceRevision':_0x5d79e4['referenceRevision'],..._0x5d79e4['liveResult']?{'liveResult':_0x5d79e4['liveResult']}:null}));}[_0x1173d9(0x20b)](){const _0x40bb75=_0x1173d9;for(let _0x10b4f0 of this[_0x40bb75(0x1e3)][_0x40bb75(0x1f3)]())this['_deleteRegistration'](_0x10b4f0);this[_0x40bb75(0x1e3)][_0x40bb75(0x1db)](),this[_0x40bb75(0x1bc)][_0x40bb75(0x1db)](),this[_0x40bb75(0x142)][_0x40bb75(0x167)](),super[_0x40bb75(0x20b)]();}[_0x1173d9(0x1f6)](_0x396c3f){const _0x2e158b=_0x1173d9;let _0x3f0e84=this[_0x2e158b(0x1bc)]['get'](_0x396c3f[_0x2e158b(0x20c)]),_0x5d0da8=_0x3f0e84?this[_0x2e158b(0x1e3)][_0x2e158b(0x137)](_0x3f0e84):void 0x0;_0x3f0e84&&_0x5d0da8&&(_0x5d0da8[_0x2e158b(0x208)]=_0x396c3f,this[_0x2e158b(0x1bd)](_0x3f0e84,z(_0x5d0da8['config'],_0x396c3f)));}[_0x1173d9(0x1bd)](_0x1dfee1,_0x37eb7b){const _0x49ea67=_0x1173d9;var _0x2df312,_0x4589ca;let _0x1d4d8a=this[_0x49ea67(0x1e3)][_0x49ea67(0x137)](_0x1dfee1);if(!_0x1d4d8a||at(_0x1d4d8a[_0x49ea67(0x18a)],_0x37eb7b))return;let _0x3a4b62=_0x1d4d8a[_0x49ea67(0x18a)],_0x38c241=B(_0x1d4d8a);_0x1d4d8a['presentation']=_0x37eb7b,this[_0x49ea67(0x142)][_0x49ea67(0x1d3)]({'unitId':_0x1d4d8a[_0x49ea67(0x224)],'rangeId':_0x1d4d8a[_0x49ea67(0x217)],'presentation':_0x37eb7b,'previousPresentation':_0x3a4b62,'result':B(_0x1d4d8a),'previousResult':{..._0x38c241,..._0x3a4b62,'value':(_0x2df312=_0x3a4b62[_0x49ea67(0x172)])==null?void 0x0:_0x2df312['v'],'valueType':((_0x4589ca=_0x3a4b62[_0x49ea67(0x172)])==null?void 0x0:_0x4589ca['t'])??void 0x0}});}[_0x1173d9(0x18b)](_0x5cd675){const _0x1b216c=_0x1173d9;_0x5cd675[_0x1b216c(0x20c)]&&(this[_0x1b216c(0x14b)]['deleteFormula'](_0x5cd675['unitId'],_0x5cd675[_0x1b216c(0x224)],[_0x5cd675['formulaId']]),this[_0x1b216c(0x1bc)][_0x1b216c(0x18d)](_0x5cd675[_0x1b216c(0x20c)]));}};L=I([F(0x0,_0x41fe0f(P)),F(0x1,_0x41fe0f(_0x78c724)),F(0x2,_0x41fe0f(_0x4e7a8f))],L);function R(_0x754910,_0x1be1cc){return _0x754910+'\x00'+_0x1be1cc;}function z(_0x48ecae,_0x3b7395){const _0x26d181=_0x1173d9;return _0x32521a({'numberFormat':_0x48ecae[_0x26d181(0x1ae)],'lastValue':_0x48ecae['lastValue'],'result':_0x3b7395});}function B(_0x124cfe){const _0x29b190=_0x1173d9;var _0x108f1c,_0x5493c8,_0x4f935c;let _0x64a3a1=_0x124cfe[_0x29b190(0x18a)],_0x1b592c=_0x124cfe[_0x29b190(0x216)]['formula']['trim']()?_0x64a3a1['stale']||_0x64a3a1[_0x29b190(0x172)]==null?_0x29b190(0x1b1):((_0x108f1c=_0x124cfe[_0x29b190(0x208)])==null?void 0x0:_0x108f1c['status'])===_0x208399['ERROR']?_0x29b190(0x15b):_0x29b190(0x135):_0x29b190(0x13a);return{..._0x64a3a1,'status':_0x1b592c,'value':(_0x5493c8=_0x64a3a1[_0x29b190(0x172)])==null?void 0x0:_0x5493c8['v'],'valueType':((_0x4f935c=_0x64a3a1[_0x29b190(0x172)])==null?void 0x0:_0x4f935c['t'])??void 0x0};}function at(_0x34f96f,_0x5963f7){const _0x1a4138=_0x1173d9;var _0x4d411b,_0x3c38c0,_0x1d54ec,_0xae7138;return _0x34f96f[_0x1a4138(0x204)]===_0x5963f7[_0x1a4138(0x204)]&&_0x34f96f[_0x1a4138(0x1f1)]===_0x5963f7[_0x1a4138(0x1f1)]&&_0x34f96f['pattern']===_0x5963f7[_0x1a4138(0x1b6)]&&_0x34f96f['source']===_0x5963f7[_0x1a4138(0x1c4)]&&_0x34f96f['stale']===_0x5963f7[_0x1a4138(0x1bb)]&&((_0x4d411b=_0x34f96f[_0x1a4138(0x172)])==null?void 0x0:_0x4d411b['t'])===((_0x3c38c0=_0x5963f7[_0x1a4138(0x172)])==null?void 0x0:_0x3c38c0['t'])&&Object['is']((_0x1d54ec=_0x34f96f[_0x1a4138(0x172)])==null?void 0x0:_0x1d54ec['v'],(_0xae7138=_0x5963f7[_0x1a4138(0x172)])==null?void 0x0:_0xae7138['v']);}const ot={'id':_0x1173d9(0x1cb),'type':_0x2e2ecf[_0x1173d9(0x1ff)],'handler':(_0x16e684,_0x3a8c76)=>!(_0x3a8c76!=null&&_0x3a8c76[_0x1173d9(0x224)])||!_0x3a8c76['rangeId']||!_0x3a8c76[_0x1173d9(0x216)]?!0x1:_0x16e684[_0x1173d9(0x137)](P)['setFormula'](_0x3a8c76[_0x1173d9(0x224)],_0x3a8c76[_0x1173d9(0x217)],_0x3a8c76[_0x1173d9(0x216)])},st={'id':'docs-formula.mutation.remove-formula','type':_0x2e2ecf['MUTATION'],'handler':(_0x2e6573,_0x36a4be)=>!(_0x36a4be!=null&&_0x36a4be[_0x1173d9(0x224)])||!_0x36a4be['rangeId']?!0x1:_0x2e6573[_0x1173d9(0x137)](P)[_0x1173d9(0x126)](_0x36a4be[_0x1173d9(0x224)],_0x36a4be['rangeId'])},V={'id':'docs-formula.mutation.set-resource','type':_0x2e2ecf[_0x1173d9(0x1ff)],'handler':(_0x38735e,_0x44b450)=>!(_0x44b450!=null&&_0x44b450[_0x1173d9(0x224)])||!_0x44b450['resource']?!0x1:_0x38735e[_0x1173d9(0x137)](P)[_0x1173d9(0x1fe)](_0x44b450[_0x1173d9(0x224)],_0x44b450[_0x1173d9(0x1e7)])},H={'id':_0x1173d9(0x1b5),'type':_0x2e2ecf[_0x1173d9(0x1ff)],'handler':(_0x370656,_0x2dd87f)=>{const _0x30a76b=_0x1173d9;if(!(_0x2dd87f!=null&&_0x2dd87f[_0x30a76b(0x224)])||!_0x2dd87f[_0x30a76b(0x14e)][_0x30a76b(0x1e6)])return!0x1;let _0x1d8d3f=_0x370656['get'](P),_0x5222cf=_0x370656[_0x30a76b(0x137)](_0x4e7a8f),_0x1c9e11=_0x1d8d3f[_0x30a76b(0x1ce)](_0x2dd87f[_0x30a76b(0x224)]);if(!_0x1c9e11)return!0x1;let _0x2b6d31=_0x13c34f[_0x30a76b(0x168)](_0x1c9e11),_0x357efe=!0x1;for(let _0x24441e of _0x2dd87f[_0x30a76b(0x14e)]){var _0x307c47,_0x467736,_0x15b486,_0x547db0;let _0x2d5fba=_0x2b6d31[_0x30a76b(0x183)][_0x24441e['rangeId']];_0x2d5fba&&_0x2d5fba[_0x30a76b(0x1de)]===_0x24441e[_0x30a76b(0x206)]&&((_0x307c47=_0x2d5fba[_0x30a76b(0x1ae)])==null?void 0x0:_0x307c47['pattern'])===_0x24441e[_0x30a76b(0x159)]&&_0x5222cf['getRevision'](_0x2dd87f[_0x30a76b(0x224)])===_0x24441e[_0x30a76b(0x19e)]&&(((_0x467736=_0x2d5fba[_0x30a76b(0x1b4)])==null?void 0x0:_0x467736['v'])!==_0x24441e[_0x30a76b(0x1b4)]['v']||((_0x15b486=_0x2d5fba[_0x30a76b(0x1b4)])==null?void 0x0:_0x15b486['t'])!==_0x24441e[_0x30a76b(0x1b4)]['t']||((_0x547db0=_0x2d5fba[_0x30a76b(0x1b4)])==null?void 0x0:_0x547db0[_0x30a76b(0x1b6)])!==_0x24441e['lastValue']['pattern'])&&(_0x2d5fba[_0x30a76b(0x1b4)]=_0x13c34f['deepClone'](_0x24441e[_0x30a76b(0x1b4)]),_0x357efe=!0x0);}return!_0x357efe||_0x1d8d3f[_0x30a76b(0x1fe)](_0x2dd87f['unitId'],_0x2b6d31);}},U={'id':_0x1173d9(0x1fd),'type':_0x2e2ecf[_0x1173d9(0x226)],'handler':(_0x55e508,_0x30b44e)=>{const _0x1e707f=_0x1173d9;if(!(_0x30b44e!=null&&_0x30b44e['formula']['trim']()))return!0x1;let _0xb72be2=q(_0x55e508,_0x30b44e[_0x1e707f(0x224)],'');if(!_0xb72be2)return!0x1;let _0x1d9be1=ft(_0x30b44e[_0x1e707f(0x193)],_0xb72be2[_0x1e707f(0x1e1)],dt(_0x55e508,_0xb72be2[_0x1e707f(0x224)]));if(!_0x1d9be1)return!0x1;let _0x1cf13b=pt(_0x55e508,_0xb72be2[_0x1e707f(0x224)],_0x30b44e[_0x1e707f(0x1de)],_0x30b44e[_0x1e707f(0x195)]??[]);if(!_0x1cf13b)return!0x1;let _0x5dcfc2=mt(_0xb72be2[_0x1e707f(0x1e1)],_0xb72be2[_0x1e707f(0x1a6)],_0xb72be2[_0x1e707f(0x224)]),_0x5c9355=ht({'documentData':_0xb72be2[_0x1e707f(0x150)],'resource':_0xb72be2[_0x1e707f(0x1e7)],'rangeId':_0x5dcfc2,'config':{'formula':_0x30b44e['formula'],..._0x30b44e['numberFormat']?{'numberFormat':_0x30b44e[_0x1e707f(0x1ae)]}:null},'startOffset':_0x1d9be1[_0x1e707f(0x185)],'endOffset':_0x1d9be1[_0x1e707f(0x186)]});if(!_0x5c9355)return!0x1;let _0x5ed055=_0x18f854(_0x55e508,_0xb72be2[_0x1e707f(0x224)],_0x1cf13b);return!_0x5ed055||!J({'accessor':_0x55e508,'document':_0xb72be2[_0x1e707f(0x133)],'unitId':_0xb72be2['unitId'],'trigger':U['id'],'rangeId':_0x5dcfc2,'previousResource':_0xb72be2[_0x1e707f(0x1e7)],'nextResource':_0x5c9355[_0x1e707f(0x170)],'previousDocumentData':_0xb72be2[_0x1e707f(0x150)],'nextDocumentData':_0x5c9355[_0x1e707f(0x131)],'cursorOffset':_0x5c9355[_0x1e707f(0x1f5)],'externalMutations':_0x5ed055})?!0x1:{'rangeId':_0x5dcfc2,'startOffset':_0x5c9355[_0x1e707f(0x1f5)]-0x1,'endOffset':_0x5c9355[_0x1e707f(0x1f5)]};}},W={'id':'docs-formula.command.update','type':_0x2e2ecf[_0x1173d9(0x226)],'handler':(_0x2e5aa8,_0x46a55f)=>{const _0x5a939c=_0x1173d9;if(!(_0x46a55f!=null&&_0x46a55f['rangeId'])||!_0x46a55f[_0x5a939c(0x1de)][_0x5a939c(0x1bf)]())return!0x1;let _0x1e6ca5=q(_0x2e5aa8,_0x46a55f[_0x5a939c(0x224)],''),_0x5dc827=_0x1e6ca5==null?void 0x0:_0x1e6ca5[_0x5a939c(0x1a6)][_0x5a939c(0x215)](_0x1e6ca5[_0x5a939c(0x224)],_0x46a55f[_0x5a939c(0x217)]),_0x44526d=_0x1e6ca5?T(_0x1e6ca5['documentData'][_0x5a939c(0x1e1)],_0x46a55f[_0x5a939c(0x217)]):void 0x0;if(!_0x1e6ca5||!_0x5dc827||!_0x44526d)return!0x1;let _0x5a42df=pt(_0x2e5aa8,_0x1e6ca5['unitId'],_0x46a55f['formula'],_0x46a55f['externalReferences']??[]);if(!_0x5a42df)return!0x1;let _0x374ac9=_0x18f854(_0x2e5aa8,_0x1e6ca5[_0x5a939c(0x224)],_0x5a42df);if(!_0x374ac9)return!0x1;let _0x4b3431=Ct(_0x1e6ca5[_0x5a939c(0x1e7)]);return _0x4b3431[_0x5a939c(0x183)][_0x46a55f[_0x5a939c(0x217)]]={'formula':_0x46a55f[_0x5a939c(0x1de)],..._0x46a55f['numberFormat']?{'numberFormat':_0x46a55f[_0x5a939c(0x1ae)]}:_0x5dc827['numberFormat']?{'numberFormat':_0x5dc827[_0x5a939c(0x1ae)]}:null},J({'accessor':_0x2e5aa8,'document':_0x1e6ca5[_0x5a939c(0x133)],'unitId':_0x1e6ca5['unitId'],'trigger':W['id'],'rangeId':_0x46a55f[_0x5a939c(0x217)],'previousResource':_0x1e6ca5[_0x5a939c(0x1e7)],'nextResource':_0x4b3431,'cursorOffset':_0x44526d['endIndex']+0x1,'externalMutations':_0x374ac9});}},G={'id':_0x1173d9(0x211),'type':_0x2e2ecf[_0x1173d9(0x226)],'handler':(_0x5235ca,_0xf03935)=>{const _0x1e30d9=_0x1173d9;if(!(_0xf03935!=null&&_0xf03935[_0x1e30d9(0x217)]))return!0x1;let _0x3affbb=q(_0x5235ca,_0xf03935[_0x1e30d9(0x224)],''),_0x4ba2be=_0x3affbb==null?void 0x0:_0x3affbb[_0x1e30d9(0x1a6)][_0x1e30d9(0x215)](_0x3affbb[_0x1e30d9(0x224)],_0xf03935[_0x1e30d9(0x217)]),_0x36e032=_0x3affbb?T(_0x3affbb[_0x1e30d9(0x150)][_0x1e30d9(0x1e1)],_0xf03935[_0x1e30d9(0x217)]):void 0x0;if(!_0x3affbb||!_0x4ba2be||!_0x36e032)return!0x1;let _0x1051b7=Ct(_0x3affbb[_0x1e30d9(0x1e7)]);return _0x1051b7['formulas'][_0xf03935[_0x1e30d9(0x217)]]={..._0x4ba2be,..._0xf03935['numberFormat']?{'numberFormat':_0xf03935[_0x1e30d9(0x1ae)]}:null},_0xf03935[_0x1e30d9(0x1ae)]||delete _0x1051b7['formulas'][_0xf03935[_0x1e30d9(0x217)]][_0x1e30d9(0x1ae)],J({'accessor':_0x5235ca,'document':_0x3affbb[_0x1e30d9(0x133)],'unitId':_0x3affbb[_0x1e30d9(0x224)],'trigger':G['id'],'rangeId':_0xf03935[_0x1e30d9(0x217)],'previousResource':_0x3affbb[_0x1e30d9(0x1e7)],'nextResource':_0x1051b7,'cursorOffset':_0x36e032[_0x1e30d9(0x15e)]+0x1,'externalMutations':{}});}},K={'id':_0x1173d9(0x147),'type':_0x2e2ecf[_0x1173d9(0x226)],'handler':(_0x4c2f6a,_0xe80b8)=>ut(_0x4c2f6a,_0xe80b8,'',K['id'])},ct={'id':_0x1173d9(0x219),'type':_0x2e2ecf[_0x1173d9(0x226)],'handler':(_0x32cbb0,_0x1a5e15)=>ut(_0x32cbb0,_0x1a5e15,(_0x1a5e15==null?void 0x0:_0x1a5e15[_0x1173d9(0x204)])??'',ct['id'])},lt={'id':_0x1173d9(0x1cf),'type':_0x2e2ecf[_0x1173d9(0x226)],'handler':(_0x3463fd,_0x3911c9)=>{const _0x3f37f4=_0x1173d9;if(!(_0x3911c9!=null&&_0x3911c9[_0x3f37f4(0x217)]))return!0x1;let _0x255d2e=q(_0x3463fd,_0x3911c9['unitId'],'');if(!_0x255d2e)return!0x1;let _0x3a9fca=_0x3463fd[_0x3f37f4(0x137)](L)['getResult']({'unitId':_0x255d2e[_0x3f37f4(0x224)],'rangeId':_0x3911c9[_0x3f37f4(0x217)]});return _0x3a9fca?ut(_0x3463fd,_0x3911c9,_0x3a9fca[_0x3f37f4(0x204)],lt['id']):!0x1;}};function ut(_0x32453d,_0x4c8662,_0x43dd8b,_0x577bf6){const _0x5043a2=_0x1173d9;if(!(_0x4c8662!=null&&_0x4c8662[_0x5043a2(0x217)]))return!0x1;let _0x5125f9=q(_0x32453d,_0x4c8662[_0x5043a2(0x224)],'');if(!_0x5125f9)return!0x1;let _0x54c46a=Be({'documentData':_0x5125f9[_0x5043a2(0x150)],'resource':_0x5125f9['resource'],'rangeId':_0x4c8662[_0x5043a2(0x217)],'text':_0x43dd8b});return _0x54c46a?J({'accessor':_0x32453d,'document':_0x5125f9['document'],'unitId':_0x5125f9[_0x5043a2(0x224)],'trigger':_0x577bf6,'rangeId':_0x4c8662['rangeId'],'previousResource':_0x5125f9[_0x5043a2(0x1e7)],'nextResource':_0x54c46a['nextResource'],'previousDocumentData':_0x5125f9[_0x5043a2(0x150)],'nextDocumentData':_0x54c46a['nextDocumentData'],'cursorOffset':_0x54c46a[_0x5043a2(0x1f5)],'externalMutations':{}}):!0x1;}function q(_0x253581,_0x202b1e,_0x19f38c){const _0x259a07=_0x1173d9;if(_0x19f38c)return null;let _0x3a8297=_0x253581['get'](_0x1cb79e),_0x491270=(_0x202b1e?_0x3a8297[_0x259a07(0x171)](_0x202b1e,_0xe966be[_0x259a07(0x129)]):_0x3a8297[_0x259a07(0x19f)](_0xe966be[_0x259a07(0x129)]))??null;if(!_0x491270)return null;let _0x32e89b=_0x491270[_0x259a07(0x160)](),_0x367e6f=_0x32e89b['body'];if(_0x32e89b['disabled']||!_0x367e6f)return null;let _0x255e85=_0x253581['get'](P);return _0x255e85[_0x259a07(0x1a4)](_0x491270[_0x259a07(0x1b0)]())?null:{'document':_0x491270,'body':_0x367e6f,'documentData':_0x32e89b,'model':_0x255e85,'resource':_0x255e85[_0x259a07(0x1ce)](_0x491270[_0x259a07(0x1b0)]())??b(),'unitId':_0x491270[_0x259a07(0x1b0)]()};}function dt(_0x3302e7,_0x421c26){const _0x1bae45=_0x1173d9;var _0x49e753;return(_0x49e753=_0x3302e7[_0x1bae45(0x137)](_0x764d00)[_0x1bae45(0x165)]({'subUnitId':_0x421c26,'unitId':_0x421c26}))==null?void 0x0:_0x49e753[0x0];}function ft(_0x2ab36d,_0x103876,_0x2d3863){const _0x5847b6=_0x1173d9;if((_0x2ab36d==null?void 0x0:_0x2ab36d[_0x5847b6(0x19c)])===_0x5847b6(0x203)){var _0x3b0dd9;let _0x3f0fc3=((_0x3b0dd9=_0x103876[_0x5847b6(0x1e9)])==null?void 0x0:_0x3b0dd9[_0x5847b6(0x1a8)](_0x2d652e=>_0x2d652e[_0x5847b6(0x16b)]===_0x2ab36d[_0x5847b6(0x16b)]))??[];if(_0x3f0fc3[_0x5847b6(0x1e6)]!==0x1)return null;let _0xfef491=_0x3f0fc3[0x0],_0x21a685=_0x882200(_0x103876,_0xfef491),_0x215936=_0xfef491['startIndex']-_0x21a685,_0x33e759=_0x2ab36d[_0x5847b6(0x201)]===_0x5847b6(0x1ed)?_0x215936:_0x2ab36d[_0x5847b6(0x201)];if(!Number[_0x5847b6(0x222)](_0x33e759)||_0x33e759<0x0||_0x33e759>_0x215936)return null;let _0x4794bc=_0x21a685+_0x33e759;return{'startOffset':_0x4794bc,'endOffset':_0x4794bc};}if((_0x2ab36d==null?void 0x0:_0x2ab36d[_0x5847b6(0x19c)])===_0x5847b6(0x1ee))return!Number[_0x5847b6(0x222)](_0x2ab36d[_0x5847b6(0x185)])||!Number['isInteger'](_0x2ab36d[_0x5847b6(0x186)])?null:{'startOffset':Math[_0x5847b6(0x1f2)](_0x2ab36d['startOffset'],_0x2ab36d[_0x5847b6(0x186)]),'endOffset':Math[_0x5847b6(0x221)](_0x2ab36d[_0x5847b6(0x185)],_0x2ab36d[_0x5847b6(0x186)])};let _0x38bde5=(_0x2ab36d==null?void 0x0:_0x2ab36d[_0x5847b6(0x19c)])==='selection'?_0x2ab36d['selection']:_0x2d3863;return!_0x38bde5||_0x38bde5[_0x5847b6(0x209)]?null:{'startOffset':Math['min'](_0x38bde5[_0x5847b6(0x185)],_0x38bde5['endOffset']),'endOffset':Math[_0x5847b6(0x221)](_0x38bde5[_0x5847b6(0x185)],_0x38bde5['endOffset'])};}function pt(_0xe9e5cc,_0x37b34d,_0x15b127,_0x535d94){const _0x1c6340=_0x1173d9;let _0x2eb26f=_0xe9e5cc[_0x1c6340(0x137)](_0x26af78),_0x5a300c=_0x15b127[_0x1c6340(0x1ca)]('=')?_0x15b127[_0x1c6340(0x12a)](0x1):_0x15b127,_0xa8f069=_0x2eb26f[_0x1c6340(0x1aa)](_0x5a300c);if(!_0xa8f069)return null;let _0x48a275=_0xe9e5cc['get'](_0x4e7a8f),_0x9b580b=_0x3d2466({'qualifiers':_0x40128b(_0xa8f069),'explicitReferences':_0x535d94??[],'resolveBinding':_0x54360e=>_0x48a275[_0x1c6340(0x156)](_0x37b34d,_0x54360e)});return _0x9b580b[_0x1c6340(0x15c)]===_0x1c6340(0x1c8)?_0x9b580b[_0x1c6340(0x1e0)]:null;}function mt(_0x306d50,_0x4ceb69,_0x23ab78){const _0x5153a6=_0x1173d9;var _0x4a442f;let _0x4a2756=_0x7ffdf2(0x6);for(;_0x306d50!=null&&(_0x4a442f=_0x306d50[_0x5153a6(0x1c9)])!=null&&_0x4a442f[_0x5153a6(0x184)](_0x3a0bb3=>_0x3a0bb3[_0x5153a6(0x217)]===_0x4a2756)||_0x4ceb69[_0x5153a6(0x215)](_0x23ab78,_0x4a2756);)_0x4a2756=_0x7ffdf2(0x6);return _0x4a2756;}function ht(_0x5393e7){try{return Re(_0x5393e7);}catch(_0x3488ca){if(_0x3488ca instanceof C)return null;throw _0x3488ca;}}function gt(_0x5cb735){const _0x3d4d8e=_0x1173d9;let _0x44714a=_0x5cb735['previousDocumentData']&&_0x5cb735[_0x3d4d8e(0x131)]?vt(_0x5cb735[_0x3d4d8e(0x133)],_0x5cb735[_0x3d4d8e(0x224)],_0x5cb735['previousDocumentData'],_0x5cb735[_0x3d4d8e(0x131)],_0x5cb735[_0x3d4d8e(0x1f5)],_0x5cb735[_0x3d4d8e(0x124)]):null;return _0x5cb735[_0x3d4d8e(0x1ea)]&&_0x5cb735[_0x3d4d8e(0x131)]&&!_0x44714a?null:{'documentRedo':_0x44714a,'resourceRedo':{'id':V['id'],'params':{'unitId':_0x5cb735[_0x3d4d8e(0x224)],'resource':_0x5cb735[_0x3d4d8e(0x170)]}},'resourceUndo':{'id':V['id'],'params':{'unitId':_0x5cb735[_0x3d4d8e(0x224)],'resource':_0x5cb735[_0x3d4d8e(0x227)]}}};}function _0x3422(){const _0x4c8776=['resource','_injector','paragraphs','previousDocumentData','load','604IGoPaU','end','range','COLUMN_START','getRevision','color','min','values','_change$','cursorOffset','_updateFormulaResult','subscribe','start','startIndex','deleteLength','syncUnit','endsWith','docs-formula.command.insert','setResource','MUTATION','externalMutations','position','boolean','paragraph','text','321260wxvMYA','expectedFormula','_hostExternalReferenceModel','liveResult','segmentId','accessor','dispose','formulaId','onStarting','setFormula','_model','referenceRevision','docs-formula.command.set-number-format','identity','add','_univerInstanceService','getFormula','config','rangeId','register','docs-formula.command.replace-with-text','pushUndoRedo','COLUMN_END','_queueSync','object','getRegisteredFormulas','COLUMN_GROUP_START','unitAdded$','max','isInteger','Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.','unitId','insert','COMMAND','previousResource','trigger','_cacheEligibilityService','removeFormula','5XWvdZH','18ccDtFV','UNIVER_DOC','slice','editOp','customBlocks','univer-docs-formula','_rawResources','_instanceService','has','nextDocumentData','PARAGRAPH','document','parse','success','getBody','get','resources','iterator','empty','DOC_FORMULA_PLUGIN','3095308ZRfaor','unregister','defineProperty','packageName','disposeWithMe','pluginName','_presentationChanged$','BLOCK_START','_configService','default','forEach','docs-formula.command.remove','_loadErrors','_syncUnit','degradeDocumentData','_registrationService','constructor','TABLE_CELL_END','updates','presentationChanged$','documentData','retain','version','every','95896UGqfyy','unsupported-version','resolveBinding','getPresentation','_docFormulaModel','expectedNumberFormat','notifyTextChanged','error','status','call','endIndex','change$','getSnapshot','insertLength','eligible','_pendingUnitIds','syncExecuteCommand','getTextRanges','5951874BvbDxb','complete','deepClone','setFormulas','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','paragraphId','keys','dataStream','TABLE_ROW_START','from','nextResource','getUnit','cell','_service','_config','prototype','collectMutations','invalid-resource','documentRedo','removeUnit','assign','1.2.0','customDecorations','_preserveInvalid','schemaVersion','map','getOwnPropertyDescriptor','SECTION_BREAK','_isDisposed','formulas','some','startOffset','endOffset','params','entries','EMPTY','presentation','_deleteRegistration','toPrimitive','delete','CUSTOM_BLOCK','decorate','asObservable','unregisterUnit','blockRanges','target','7NzuLnk','externalReferences','getAllUnitsForType','SUCCESS','name','columnGroups','replaceDocRanges','CUSTOM','type','data','expectedReferenceRevision','getCurrentUnitOfType','83076JxeGFL','_resources','onCommandExecuted','function','getLoadError','rangeType','model','undoMutation','filter','redoMutation','sequenceNodesBuilder','stringify','wholeEntity','setConfig','numberFormat','_formulaService','getUnitId','pending','properties','sectionBreaks','lastValue','docs-formula.mutation.set-last-values','pattern','string','serialize','2245890TewPuD','number','stale','_formulaKeys','_setPresentation','set','trim','getFormulaValueSync','sort','includes','find','source','isArray','TABLE_CELL_START','@univerjs-pro/docs-formula','resolved','customRanges','startsWith','docs-formula.mutation.set-formula','_commandService','formulaResult$','getResource','docs-formula.command.convert-to-text','resolveFormula','PENDING','registerCommand','next','BLOCK_END','resourceUndo','getResult','registerProvider','tables','symbol','degradeBody','clear','_resourceManagerService','assess','formula','TABLE_END','references','body','textRuns','_registrations','resourceRedo','_syncScheduled','length'];_0x3422=function(){return _0x4c8776;};return _0x3422();}function _t(_0x3d0297,_0x3369da,_0x24997c,_0x2103d8){const _0x3bcb88=_0x1173d9;_0x2103d8[_0x3bcb88(0x21a)]({'id':_0x3d0297[_0x3bcb88(0x124)]+':'+_0x3d0297[_0x3bcb88(0x217)],'unitID':_0x3d0297[_0x3bcb88(0x224)],'redoMutations':[..._0x3d0297[_0x3bcb88(0x200)][_0x3bcb88(0x1a9)]?[_0x3d0297[_0x3bcb88(0x200)][_0x3bcb88(0x1a9)]]:[],..._0x3369da[_0x3bcb88(0x178)]?[_0x3369da[_0x3bcb88(0x178)]]:[],_0x3369da[_0x3bcb88(0x1e4)]],'undoMutations':[_0x3369da[_0x3bcb88(0x1d5)],..._0x24997c?[_0x24997c]:[],..._0x3d0297['externalMutations'][_0x3bcb88(0x1a7)]?[_0x3d0297[_0x3bcb88(0x200)][_0x3bcb88(0x1a7)]]:[]]});}function J(_0x4eb009){const _0x554d12=_0x1173d9;let _0x34b177=_0x4eb009[_0x554d12(0x20a)][_0x554d12(0x137)](_0x170d7c),_0x92f7af=_0x4eb009[_0x554d12(0x20a)][_0x554d12(0x137)](_0x4c8196),_0x478d64=_0x4eb009['accessor']['get'](_0x764d00),_0x46886c=gt(_0x4eb009);if(!_0x46886c)return!0x1;let _0x1e10b1=!0x1,_0x4884ae=null,_0x26678b=!0x1;try{if(_0x4eb009['externalMutations'][_0x554d12(0x1a9)]){if(!_0x34b177['syncExecuteCommand'](_0x4eb009[_0x554d12(0x200)]['redoMutation']['id'],_0x4eb009[_0x554d12(0x200)]['redoMutation'][_0x554d12(0x187)]))return!0x1;_0x1e10b1=!0x0;}if(_0x46886c['documentRedo']){let _0x2d0fec=_0x34b177[_0x554d12(0x164)](_0x46886c[_0x554d12(0x178)]['id'],_0x46886c[_0x554d12(0x178)][_0x554d12(0x187)]);if(!_0x2d0fec)return bt(_0x34b177,_0x4eb009[_0x554d12(0x200)],_0x1e10b1),!0x1;_0x4884ae={'id':_0x3f9ca3['id'],'params':{..._0x2d0fec,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0x34b177['syncExecuteCommand'](_0x46886c['resourceRedo']['id'],_0x46886c['resourceRedo']['params']))return yt(_0x34b177,_0x4884ae),bt(_0x34b177,_0x4eb009[_0x554d12(0x200)],_0x1e10b1),!0x1;_0x26678b=!0x0,_t(_0x4eb009,_0x46886c,_0x4884ae,_0x92f7af);}catch(_0x3000ee){throw _0x26678b&&_0x34b177[_0x554d12(0x164)](_0x46886c[_0x554d12(0x1d5)]['id'],_0x46886c['resourceUndo'][_0x554d12(0x187)]),yt(_0x34b177,_0x4884ae),bt(_0x34b177,_0x4eb009['externalMutations'],_0x1e10b1),_0x3000ee;}return _0x478d64[_0x554d12(0x19a)]([{'startOffset':_0x4eb009['cursorOffset'],'endOffset':_0x4eb009['cursorOffset'],'segmentId':''}],{'unitId':_0x4eb009[_0x554d12(0x224)],'subUnitId':_0x4eb009['unitId']},!0x1,{[_0xc6b882]:!0x0}),!0x0;}function vt(_0x48bf7d,_0x3a5a37,_0xa8e896,_0x5bf202,_0x4edb62,_0xabe66a){let _0x39ea09=xt(_0xa8e896,_0x5bf202,_0x2a5420(_0x48bf7d,''));return _0x39ea09?{'id':_0x3f9ca3['id'],'params':{'unitId':_0x3a5a37,'actions':_0x39ea09,'segmentId':'','textRanges':[{'startOffset':_0x4edb62,'endOffset':_0x4edb62,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0xabe66a}}:null;}function yt(_0x4758ea,_0x118db2){const _0x4f8120=_0x1173d9;_0x118db2&&_0x4758ea[_0x4f8120(0x164)](_0x118db2['id'],_0x118db2[_0x4f8120(0x187)]);}function bt(_0x1205c7,_0x8e95d3,_0xc43223){const _0x4ac44b=_0x1173d9;_0xc43223&&_0x8e95d3[_0x4ac44b(0x1a7)]&&_0x1205c7['syncExecuteCommand'](_0x8e95d3[_0x4ac44b(0x1a7)]['id'],_0x8e95d3[_0x4ac44b(0x1a7)]['params']);}function xt(_0x15049e,_0x18f579,_0x18d815){const _0x3eb0ca=_0x1173d9;let _0x4d4c35=_0x15049e[_0x3eb0ca(0x1e1)],_0x2d3188=_0x18f579[_0x3eb0ca(0x1e1)],_0x20c769=St(_0x4d4c35==null?void 0x0:_0x4d4c35[_0x3eb0ca(0x16d)],_0x2d3188==null?void 0x0:_0x2d3188[_0x3eb0ca(0x16d)]);if(!_0x20c769||!_0x2d3188)return null;let _0xa4a2ff=new _0x2dfabc();return _0xa4a2ff[_0x3eb0ca(0x151)](_0x20c769[_0x3eb0ca(0x1f8)]),_0x20c769['insertLength']>0x0&&_0xa4a2ff[_0x3eb0ca(0x225)](_0x20c769[_0x3eb0ca(0x161)],_0x4b0522(_0x2d3188,_0x20c769[_0x3eb0ca(0x1f8)],_0x20c769[_0x3eb0ca(0x1f8)]+_0x20c769[_0x3eb0ca(0x161)],!0x1)),_0x20c769[_0x3eb0ca(0x1fa)]>0x0&&_0xa4a2ff[_0x3eb0ca(0x18d)](_0x20c769[_0x3eb0ca(0x1fa)]),_0x534e11['getInstance']()[_0x3eb0ca(0x12b)](_0xa4a2ff[_0x3eb0ca(0x1b8)](),_0x18d815);}function St(_0x2da270,_0x5677aa){const _0x79a244=_0x1173d9;if(_0x2da270==null||_0x5677aa==null||_0x2da270===_0x5677aa)return null;let _0x51af1e=0x0;for(;_0x51af1e<_0x2da270[_0x79a244(0x1e6)]&&_0x51af1e<_0x5677aa[_0x79a244(0x1e6)]&&_0x2da270[_0x51af1e]===_0x5677aa[_0x51af1e];)_0x51af1e+=0x1;let _0x1ce552=_0x2da270[_0x79a244(0x1e6)],_0x54d8ff=_0x5677aa[_0x79a244(0x1e6)];for(;_0x1ce552>_0x51af1e&&_0x54d8ff>_0x51af1e&&_0x2da270[_0x1ce552-0x1]===_0x5677aa[_0x54d8ff-0x1];)--_0x1ce552,--_0x54d8ff;return{'start':_0x51af1e,'deleteLength':_0x1ce552-_0x51af1e,'insertLength':_0x54d8ff-_0x51af1e};}function Ct(_0x254afd){const _0x15ada6=_0x1173d9;return{'schemaVersion':0x1,'formulas':Object['fromEntries'](Object[_0x15ada6(0x188)](_0x254afd[_0x15ada6(0x183)])['map'](([_0x136fb5,_0x3244f0])=>[_0x136fb5,{..._0x3244f0,..._0x3244f0[_0x15ada6(0x1ae)]?{'numberFormat':{..._0x3244f0['numberFormat']}}:null,..._0x3244f0[_0x15ada6(0x1b4)]?{'lastValue':{..._0x3244f0[_0x15ada6(0x1b4)]}}:null}]))};}let Y=class extends _0x487bea{constructor(_0x3cfcc8,_0x28010e,_0x395821,_0x310242){const _0x2e64a6=_0x1173d9;super(),this['_instanceService']=_0x3cfcc8,this[_0x2e64a6(0x1cc)]=_0x28010e,this[_0x2e64a6(0x20f)]=_0x395821,this[_0x2e64a6(0x173)]=_0x310242,N(this,_0x2e64a6(0x163),new Set()),N(this,_0x2e64a6(0x1e5),!0x1),N(this,_0x2e64a6(0x182),!0x1),this[_0x2e64a6(0x12f)][_0x2e64a6(0x196)](_0xe966be[_0x2e64a6(0x129)])[_0x2e64a6(0x146)](_0x4c8f31=>this[_0x2e64a6(0x173)]['syncUnit'](_0x4c8f31)),this[_0x2e64a6(0x140)](this[_0x2e64a6(0x20f)]['change$'][_0x2e64a6(0x1f7)](({unitId:_0xdb5f91})=>this[_0x2e64a6(0x149)](_0xdb5f91))),this['disposeWithMe'](this[_0x2e64a6(0x12f)][_0x2e64a6(0x220)][_0x2e64a6(0x1f7)](({unit:_0x661d02})=>{const _0x11b60b=_0x2e64a6;_0x661d02[_0x11b60b(0x19c)]===_0xe966be[_0x11b60b(0x129)]&&this[_0x11b60b(0x21c)](_0x661d02[_0x11b60b(0x1b0)]());})),this['disposeWithMe'](this[_0x2e64a6(0x12f)]['unitDisposed$'][_0x2e64a6(0x1f7)](_0x11c08d=>{const _0x1e715b=_0x2e64a6;this[_0x1e715b(0x173)][_0x1e715b(0x191)](_0x11c08d[_0x1e715b(0x1b0)]());})),this[_0x2e64a6(0x140)](this[_0x2e64a6(0x1cc)][_0x2e64a6(0x1a2)](_0x1d52f7=>{const _0x56a7e2=_0x2e64a6;if(_0x1d52f7['id']===_0x3f9ca3['id']&&wt(_0x1d52f7[_0x56a7e2(0x187)])){let _0xe7b0d3=_0x1d52f7['params'];_0xe7b0d3[_0x56a7e2(0x209)]||this['_syncUnit'](_0xe7b0d3[_0x56a7e2(0x224)]);}}));}[_0x1173d9(0x20b)](){const _0x406e13=_0x1173d9;this[_0x406e13(0x182)]=!0x0,super[_0x406e13(0x20b)]();}['_queueSync'](_0x5dff50){const _0x4dc032=_0x1173d9;this[_0x4dc032(0x163)][_0x4dc032(0x213)](_0x5dff50),!this[_0x4dc032(0x1e5)]&&(this['_syncScheduled']=!0x0,queueMicrotask(()=>{const _0xbca49c=_0x4dc032;if(this[_0xbca49c(0x1e5)]=!0x1,this[_0xbca49c(0x182)])return;let _0x4682ee=Array[_0xbca49c(0x16f)](this[_0xbca49c(0x163)]);this[_0xbca49c(0x163)][_0xbca49c(0x1db)](),_0x4682ee[_0xbca49c(0x146)](_0x3dd17c=>this['_syncUnit'](_0x3dd17c));}));}[_0x1173d9(0x149)](_0x14351a){const _0x2834dc=_0x1173d9;let _0x2b6464=this['_instanceService'][_0x2834dc(0x171)](_0x14351a,_0xe966be[_0x2834dc(0x129)]);_0x2b6464&&this[_0x2834dc(0x173)][_0x2834dc(0x1fb)](_0x2b6464);}};Y=I([F(0x0,_0x1cb79e),F(0x1,_0x170d7c),F(0x2,_0x41fe0f(P)),F(0x3,_0x41fe0f(L))],Y);function wt(_0x54ac4b){const _0x2945b7=_0x1173d9;return typeof _0x54ac4b==_0x2945b7(0x21d)&&!!_0x54ac4b&&_0x2945b7(0x224)in _0x54ac4b&&typeof _0x54ac4b[_0x2945b7(0x224)]=='string'&&(!('segmentId'in _0x54ac4b)||_0x54ac4b['segmentId']===void 0x0||typeof _0x54ac4b[_0x2945b7(0x209)]==_0x2945b7(0x1b7));}let X=class extends _0x487bea{constructor(_0x1911a1,_0x2c27cd){const _0x350c54=_0x1173d9;super(),this[_0x350c54(0x1dc)]=_0x1911a1,this[_0x350c54(0x158)]=_0x2c27cd,this[_0x350c54(0x140)](this['_resourceManagerService']['registerPluginResource']({'pluginName':y,'businesses':[_0xe966be[_0x350c54(0x129)]],'toJson':_0x14d3ec=>JSON[_0x350c54(0x1ab)](this['_docFormulaModel'][_0x350c54(0x1b8)](_0x14d3ec)),'parseJson':_0x149cdf=>JSON[_0x350c54(0x134)](_0x149cdf),'onLoad':(_0x43465b,_0x563f6c)=>{const _0x3cb6af=_0x350c54;this[_0x3cb6af(0x158)][_0x3cb6af(0x1eb)](_0x43465b,_0x563f6c);},'onUnLoad':_0x343176=>this['_docFormulaModel']['removeUnit'](_0x343176)}));}};X=I([F(0x0,_0x39a957),F(0x1,_0x41fe0f(P))],X);var Tt=_0x1173d9(0x1c7),Et=_0x1173d9(0x17b);const Dt={};let Z=class extends _0x487bea{constructor(_0x40b010,_0x530121,_0x2e5301){const _0x293eeb=_0x1173d9;super(),this[_0x293eeb(0x214)]=_0x40b010,this['_formulaService']=_0x530121,this[_0x293eeb(0x140)](_0x2e5301[_0x293eeb(0x218)]({'resolve':(_0x4bca58,_0x14c198)=>{const _0x7b010f=_0x293eeb;var _0x46d525;return((_0x46d525=_0x14c198[_0x7b010f(0x1c9)])==null?void 0x0:_0x46d525[_0x7b010f(0x1a8)](w)[_0x7b010f(0x17f)](_0x2b0310=>({'startOffset':_0x2b0310[_0x7b010f(0x1f9)],'endOffset':_0x2b0310[_0x7b010f(0x15e)]+0x1,'text':this[_0x7b010f(0x1d0)](_0x4bca58,_0x2b0310[_0x7b010f(0x217)])})))??[];}})),this[_0x293eeb(0x140)](this['_formulaService'][_0x293eeb(0x14f)]['subscribe'](({unitId:_0x203a35})=>{const _0x24f01f=_0x293eeb;_0x2e5301[_0x24f01f(0x15a)](_0x203a35);}));}[_0x1173d9(0x1d0)](_0x258f71,_0x5af4c2){const _0xd28414=_0x1173d9;var _0x32d4f3;return((_0x32d4f3=this[_0xd28414(0x1af)][_0xd28414(0x1d6)]({'unitId':_0x258f71,'rangeId':_0x5af4c2}))==null?void 0x0:_0x32d4f3[_0xd28414(0x204)])??'';}['resolveText'](_0x3b4b3c,_0x2f656c,_0x4c264e){const _0x4cdc2f=_0x1173d9;var _0x2351bc;let _0x3fcec0=this[_0x4cdc2f(0x214)][_0x4cdc2f(0x171)](_0x3b4b3c,_0xe966be[_0x4cdc2f(0x129)]),_0x4b2e5e=_0x3fcec0==null?void 0x0:_0x3fcec0[_0x4cdc2f(0x136)]();if(!_0x4b2e5e)return'';let _0x1ba27d=_0x4b2e5e[_0x4cdc2f(0x16d)][_0x4cdc2f(0x12a)](_0x2f656c,_0x4c264e),_0x50c4a2=((_0x2351bc=_0x4b2e5e[_0x4cdc2f(0x1c9)])==null?void 0x0:_0x2351bc['filter'](_0xae838b=>w(_0xae838b)&&_0xae838b[_0x4cdc2f(0x1f9)]>=_0x2f656c&&_0xae838b[_0x4cdc2f(0x15e)]<_0x4c264e)[_0x4cdc2f(0x1c1)]((_0x2cb657,_0x53ea5d)=>_0x53ea5d[_0x4cdc2f(0x1f9)]-_0x2cb657['startIndex']))??[];for(let _0x2b28bc of _0x50c4a2){let _0x4ccd6e=_0x2b28bc[_0x4cdc2f(0x1f9)]-_0x2f656c,_0xce07b9=_0x2b28bc[_0x4cdc2f(0x15e)]-_0x2f656c+0x1;_0x1ba27d=''+_0x1ba27d[_0x4cdc2f(0x12a)](0x0,_0x4ccd6e)+this[_0x4cdc2f(0x1d0)](_0x3b4b3c,_0x2b28bc[_0x4cdc2f(0x217)])+_0x1ba27d[_0x4cdc2f(0x12a)](_0xce07b9);}return _0x1ba27d;}[_0x1173d9(0x14a)](_0x4881a3){return Ot(_0x4881a3);}[_0x1173d9(0x1da)](_0x97f622,_0x20c977,_0x1fd7cf={}){const _0x2d6d64=_0x1173d9;var _0x4b4994;return Ve({'id':_0x97f622,'body':_0x20c977,'documentStyle':{}},(((_0x4b4994=_0x20c977[_0x2d6d64(0x1c9)])==null?void 0x0:_0x4b4994[_0x2d6d64(0x1a8)](w))??[])[_0x2d6d64(0x17f)](_0x196365=>({'rangeId':_0x196365[_0x2d6d64(0x217)],'text':_0x1fd7cf[_0x196365[_0x2d6d64(0x217)]]??this[_0x2d6d64(0x1d0)](_0x97f622,_0x196365[_0x2d6d64(0x217)])})))['body']??{'dataStream':''};}};Z=I([F(0x0,_0x1cb79e),F(0x1,_0x41fe0f(L)),F(0x2,_0x41fe0f(_0x325458))],Z);function Ot(_0x519f12){const _0x380a87=_0x1173d9;var _0x49b484,_0x37d529;let _0xa28baf=kt(_0x519f12),_0x107ce3=Ve(_0x519f12,(((_0x49b484=_0x519f12[_0x380a87(0x1e1)])==null||(_0x49b484=_0x49b484[_0x380a87(0x1c9)])==null?void 0x0:_0x49b484['filter'](w))??[])[_0x380a87(0x17f)](_0x1f06ad=>({'rangeId':_0x1f06ad[_0x380a87(0x217)],'text':At(_0xa28baf==null?void 0x0:_0xa28baf[_0x380a87(0x183)][_0x1f06ad[_0x380a87(0x217)]])})));return _0x107ce3['resources']=(_0x37d529=_0x107ce3[_0x380a87(0x138)])==null?void 0x0:_0x37d529[_0x380a87(0x1a8)](_0x139adf=>_0x139adf[_0x380a87(0x198)]!==y),_0x107ce3;}function kt(_0x39a30a){const _0x2795f6=_0x1173d9;var _0x2ef6b8;let _0x477e3d=(_0x2ef6b8=_0x39a30a[_0x2795f6(0x138)])==null||(_0x2ef6b8=_0x2ef6b8[_0x2795f6(0x1c3)](_0x572050=>_0x572050[_0x2795f6(0x198)]===_0x2795f6(0x13b)))==null?void 0x0:_0x2ef6b8[_0x2795f6(0x19d)];if(_0x477e3d)try{let _0x58517f=JSON[_0x2795f6(0x134)](_0x477e3d);return x(_0x58517f)?_0x58517f:void 0x0;}catch{return;}}function At(_0x31d04c){const _0x11e419=_0x1173d9;return _0x31d04c?_0x32521a({'lastValue':_0x31d04c[_0x11e419(0x1b4)],'numberFormat':_0x31d04c[_0x11e419(0x1ae)]})[_0x11e419(0x204)]:'';}let Q=class extends _0x487bea{constructor(_0x3dbb03,_0x49c850,_0x23d8c8){const _0x5dae5d=_0x1173d9;super(),this[_0x5dae5d(0x1af)]=_0x3dbb03,this[_0x5dae5d(0x125)]=_0x49c850,this['disposeWithMe'](_0x23d8c8[_0x5dae5d(0x1d7)](this));}[_0x1173d9(0x176)](_0x3387a5){const _0x2cd3ba=_0x1173d9;let _0x511e21=new Map();for(let _0x3a8e50 of this[_0x2cd3ba(0x1af)][_0x2cd3ba(0x21e)]()){var _0x3fbb0d;if(!this[_0x2cd3ba(0x125)][_0x2cd3ba(0x1dd)](_0x3a8e50[_0x2cd3ba(0x216)]['formula'],_0x3a8e50[_0x2cd3ba(0x208)])[_0x2cd3ba(0x162)])continue;let _0x11c2b1=_0x3d55cd(_0x3a8e50['liveResult']),_0x419ecb=_0x11c2b1?_0x24052f(_0x11c2b1):null;if(!_0x419ecb||jt(_0x3a8e50[_0x2cd3ba(0x216)][_0x2cd3ba(0x1b4)],_0x419ecb))continue;let _0x23dffa=_0x511e21[_0x2cd3ba(0x137)](_0x3a8e50[_0x2cd3ba(0x212)][_0x2cd3ba(0x224)])??[];_0x23dffa['push']({'rangeId':_0x3a8e50[_0x2cd3ba(0x212)]['rangeId'],'expectedFormula':_0x3a8e50[_0x2cd3ba(0x216)][_0x2cd3ba(0x1de)],'expectedNumberFormat':(_0x3fbb0d=_0x3a8e50[_0x2cd3ba(0x216)]['numberFormat'])==null?void 0x0:_0x3fbb0d[_0x2cd3ba(0x1b6)],'expectedReferenceRevision':_0x3a8e50['referenceRevision'],'lastValue':_0x419ecb}),_0x511e21['set'](_0x3a8e50['identity'][_0x2cd3ba(0x224)],_0x23dffa);}return Array['from'](_0x511e21,([_0x26ed44,_0x48b95e])=>({'id':H['id'],'params':{'unitId':_0x26ed44,'updates':_0x48b95e}}));}};Q=I([F(0x0,_0x41fe0f(L)),F(0x1,_0x41fe0f(_0x4ef013)),F(0x2,_0x41fe0f(_0x29264c))],Q);function jt(_0x49249a,_0x5412fd){const _0x497c30=_0x1173d9;return(_0x49249a==null?void 0x0:_0x49249a['v'])===_0x5412fd['v']&&(_0x49249a==null?void 0x0:_0x49249a['t'])===_0x5412fd['t']&&(_0x49249a==null?void 0x0:_0x49249a[_0x497c30(0x1b6)])===_0x5412fd[_0x497c30(0x1b6)];}let $=class extends _0x31da3e{constructor(_0x349e75=Dt,_0x2a4852,_0x2d7a28,_0x42a1b3){const _0x587a79=_0x1173d9;super(),this[_0x587a79(0x174)]=_0x349e75,this[_0x587a79(0x1e8)]=_0x2a4852,this[_0x587a79(0x1cc)]=_0x2d7a28,this[_0x587a79(0x144)]=_0x42a1b3;let {..._0x53be4e}=_0x1b50a3({},Dt,this[_0x587a79(0x174)]);this['_configService'][_0x587a79(0x1ad)]('docs-formula.config',_0x53be4e);}[_0x1173d9(0x20d)](){const _0x17f315=_0x1173d9;this[_0x17f315(0x1e8)][_0x17f315(0x213)]([P]),this[_0x17f315(0x1e8)][_0x17f315(0x213)]([L]),this[_0x17f315(0x1e8)][_0x17f315(0x213)]([X]),this[_0x17f315(0x1e8)][_0x17f315(0x213)]([Y]),this[_0x17f315(0x1e8)][_0x17f315(0x213)]([Q]),this[_0x17f315(0x1e8)][_0x17f315(0x213)]([Z]),_0x218854(this[_0x17f315(0x1e8)],[[P],[X],[Y],[Q],[Z]]),[ot,st,V,H,U,W,G,K,ct,lt]['forEach'](_0x1bff6f=>this[_0x17f315(0x140)](this[_0x17f315(0x1cc)][_0x17f315(0x1d2)](_0x1bff6f)));}};N($,_0x1173d9(0x141),y),N($,_0x1173d9(0x13f),Tt),N($,_0x1173d9(0x152),Et),N($,'type',_0xe966be[_0x1173d9(0x129)]),$=I([_0x192577(_0x221e8d,_0x2ac530,_0x48ceb4),F(0x1,_0x41fe0f(_0x4a690a)),F(0x2,_0x170d7c),F(0x3,_0x335e00)],$);export{lt as ConvertDocFormulaToTextCommand,Me as DOC_FORMULA_CUSTOM_RANGE_KIND,Ne as DOC_FORMULA_OBJECT_REPLACEMENT,y as DOC_FORMULA_PLUGIN,je as DOC_FORMULA_SCHEMA_VERSION,Z as DocFormulaDisplayTextService,Y as DocFormulaLifecycleController,P as DocFormulaModel,X as DocFormulaResourceController,it as DocFormulaResultStatus,L as DocFormulaService,U as InsertDocFormulaCommand,C as InvalidDocFormulaInsertRangeError,K as RemoveDocFormulaCommand,st as RemoveDocFormulaMutation,ct as ReplaceDocFormulaWithTextCommand,H as SetDocFormulaLastValuesMutation,ot as SetDocFormulaMutation,G as SetDocFormulaNumberFormatCommand,V as SetDocFormulaResourceMutation,$ as UniverDocsFormulaPlugin,W as UpdateDocFormulaCommand,He as assertSafeDocFormulaInsertRange,Re as buildInsertDocFormulaActions,Be as buildRemoveDocFormulaActions,ze as buildUpdateDocFormulaActions,b as createEmptyDocFormulaResource,Ot as degradeDocFormulaDocumentData,T as findDocFormulaRange,Pe as isDocFormulaConfig,w as isDocFormulaRange,x as isDocFormulaResource,Fe as isFormulaLastValue};
package/lib/facade.js CHANGED
@@ -1 +1 @@
1
- var _0x5d57b4=_0x1963;(function(_0x1b3cab,_0x2e81f7){var _0x50e2ed=_0x1963,_0x1082e3=_0x1b3cab();while(!![]){try{var _0x29f1af=parseInt(_0x50e2ed(0x1c7))/0x1+-parseInt(_0x50e2ed(0x1cb))/0x2+-parseInt(_0x50e2ed(0x19c))/0x3+parseInt(_0x50e2ed(0x1bd))/0x4+-parseInt(_0x50e2ed(0x1a2))/0x5+-parseInt(_0x50e2ed(0x1c5))/0x6*(parseInt(_0x50e2ed(0x1b0))/0x7)+parseInt(_0x50e2ed(0x1a4))/0x8;if(_0x29f1af===_0x2e81f7)break;else _0x1082e3['push'](_0x1082e3['shift']());}catch(_0x58b34d){_0x1082e3['push'](_0x1082e3['shift']());}}}(_0x4518,0xe4c56));import{ConvertDocFormulaToTextCommand as _0x75c1fa,DocFormulaDisplayTextService as _0x515404,DocFormulaModel as _0x28e2b2,DocFormulaService as _0x5786f1,InsertDocFormulaCommand as _0x34e369,RemoveDocFormulaCommand as _0x46c0d2,ReplaceDocFormulaWithTextCommand as _0xd88033,SetDocFormulaNumberFormatCommand as _0x55a52b,UpdateDocFormulaCommand as _0x23c539,isDocFormulaRange as _0x45ace4}from'@univerjs-pro/docs-formula';import{ICommandService as _0x59cbd8,IResourceLoaderService as _0x547241,IUniverInstanceService as _0x4db722,Inject as _0x6db6f9,UniverInstanceType as _0x5a957e}from'@univerjs/core';import{FDocument as _0x52274f,FDocumentParagraph as _0x41def4,FDocumentTextRange as _0x16f6e2}from'@univerjs/docs/facade';function v(_0x2ce1d0,_0x53502a){return function(_0x42a6b5,_0x13acab){_0x53502a(_0x42a6b5,_0x13acab,_0x2ce1d0);};}function y(_0x18067f,_0x5c5b4c,_0x3bd0cc,_0x3b50e8){var _0x53ce8b=_0x1963,_0x4c03da=arguments[_0x53ce8b(0x1a6)],_0x2a532c=_0x4c03da<0x3?_0x5c5b4c:_0x3b50e8===null?_0x3b50e8=Object[_0x53ce8b(0x1ac)](_0x5c5b4c,_0x3bd0cc):_0x3b50e8,_0x155aab;if(typeof Reflect==_0x53ce8b(0x1bb)&&typeof Reflect[_0x53ce8b(0x1b9)]==_0x53ce8b(0x1d6))_0x2a532c=Reflect[_0x53ce8b(0x1b9)](_0x18067f,_0x5c5b4c,_0x3bd0cc,_0x3b50e8);else{for(var _0x4ddaec=_0x18067f[_0x53ce8b(0x1a6)]-0x1;_0x4ddaec>=0x0;_0x4ddaec--)(_0x155aab=_0x18067f[_0x4ddaec])&&(_0x2a532c=(_0x4c03da<0x3?_0x155aab(_0x2a532c):_0x4c03da>0x3?_0x155aab(_0x5c5b4c,_0x3bd0cc,_0x2a532c):_0x155aab(_0x5c5b4c,_0x3bd0cc))||_0x2a532c);}return _0x4c03da>0x3&&_0x2a532c&&Object['defineProperty'](_0x5c5b4c,_0x3bd0cc,_0x2a532c),_0x2a532c;}let b=class{constructor(_0x53787e,_0x1ddb36,_0x3c14e1,_0x84701f,_0x539f22,_0x53e79f){var _0x4d1aa0=_0x1963;this[_0x4d1aa0(0x194)]=_0x53787e,this[_0x4d1aa0(0x193)]=_0x1ddb36,this['_commandService']=_0x3c14e1,this['_model']=_0x84701f,this[_0x4d1aa0(0x1cd)]=_0x539f22,this[_0x4d1aa0(0x1a3)]=_0x53e79f;}[_0x5d57b4(0x1a5)](){var _0x49a100=_0x5d57b4;return this[_0x49a100(0x193)];}['getRange'](){var _0x4f5447=_0x5d57b4;let _0x2bb025=this[_0x4f5447(0x197)]();return _0x2bb025?{'endOffset':_0x2bb025[_0x4f5447(0x1bc)]+0x1,'rangeId':_0x2bb025[_0x4f5447(0x1a8)],'startOffset':_0x2bb025[_0x4f5447(0x1b6)]}:null;}[_0x5d57b4(0x1d8)](){var _0x5d45a9=_0x5d57b4,_0x1a0349;return((_0x1a0349=this[_0x5d45a9(0x1db)][_0x5d45a9(0x1d8)](this['_unitId'],this[_0x5d45a9(0x193)]))==null?void 0x0:_0x1a0349['formula'])??'';}[_0x5d57b4(0x1be)](){var _0x3bd94b=_0x5d57b4;return this['_model'][_0x3bd94b(0x1d8)](this[_0x3bd94b(0x194)],this['_rangeId'])??null;}[_0x5d57b4(0x1dc)](){var _0x68ca8e=_0x5d57b4;return this[_0x68ca8e(0x1cd)][_0x68ca8e(0x1dc)]({'unitId':this[_0x68ca8e(0x194)],'rangeId':this['_rangeId']})??null;}['describe'](){var _0x304515=_0x5d57b4;let _0x9695f9=this[_0x304515(0x1af)](),_0x5858d4=this['getConfig'](),_0x5a2e1c=this['getResult']();return!_0x9695f9||!_0x5858d4||!_0x5a2e1c?null:{..._0x9695f9,'config':_0x5858d4,'formula':_0x5858d4[_0x304515(0x1b4)],'result':_0x5a2e1c,'type':_0x304515(0x1b4)};}[_0x5d57b4(0x1d9)](_0x46b97d){var _0x377e9a=_0x5d57b4;return this['_commandService'][_0x377e9a(0x198)](_0x23c539['id'],{'externalReferences':_0x46b97d[_0x377e9a(0x1ab)],'formula':_0x46b97d[_0x377e9a(0x1b4)],'numberFormat':_0x46b97d[_0x377e9a(0x19a)],'rangeId':this[_0x377e9a(0x193)],'unitId':this['_unitId']});}['setNumberFormat'](_0x48168c){var _0x4dab7c=_0x5d57b4;return this[_0x4dab7c(0x1b8)][_0x4dab7c(0x198)](_0x55a52b['id'],{'numberFormat':_0x48168c,'rangeId':this[_0x4dab7c(0x193)],'unitId':this['_unitId']});}[_0x5d57b4(0x1de)](){var _0x1810ea=_0x5d57b4;return this[_0x1810ea(0x1b8)]['syncExecuteCommand'](_0x46c0d2['id'],{'rangeId':this[_0x1810ea(0x193)],'unitId':this['_unitId']});}[_0x5d57b4(0x1c1)](_0x10e875){var _0x515413=_0x5d57b4;return this[_0x515413(0x1b8)][_0x515413(0x198)](_0xd88033['id'],{'rangeId':this['_rangeId'],'text':_0x10e875,'unitId':this[_0x515413(0x194)]});}['convertToText'](){var _0x1f6219=_0x5d57b4;return this[_0x1f6219(0x1b8)][_0x1f6219(0x198)](_0x75c1fa['id'],{'rangeId':this[_0x1f6219(0x193)],'unitId':this[_0x1f6219(0x194)]});}[_0x5d57b4(0x197)](){var _0x272173=_0x5d57b4,_0x3d942;let _0x153aa0=this[_0x272173(0x1a3)][_0x272173(0x1a7)](this['_unitId'],_0x5a957e[_0x272173(0x19d)]);return _0x153aa0==null||(_0x3d942=_0x153aa0[_0x272173(0x1aa)]()['body'])==null||(_0x3d942=_0x3d942['customRanges'])==null?void 0x0:_0x3d942[_0x272173(0x1a9)](_0x153ee3=>_0x153ee3[_0x272173(0x1a8)]===this[_0x272173(0x193)]&&_0x45ace4(_0x153ee3));}};b=y([v(0x2,_0x59cbd8),v(0x3,_0x6db6f9(_0x28e2b2)),v(0x4,_0x6db6f9(_0x5786f1)),v(0x5,_0x4db722)],b);function x(_0x534e2b){'@babel/helpers - typeof';var _0x4263ce=_0x5d57b4;return x=typeof Symbol==_0x4263ce(0x1d6)&&typeof Symbol[_0x4263ce(0x19e)]=='symbol'?function(_0x712503){return typeof _0x712503;}:function(_0x1ea102){var _0x598169=_0x4263ce;return _0x1ea102&&typeof Symbol==_0x598169(0x1d6)&&_0x1ea102[_0x598169(0x1d2)]===Symbol&&_0x1ea102!==Symbol[_0x598169(0x1c4)]?'symbol':typeof _0x1ea102;},x(_0x534e2b);}function _0x1963(_0x4e07d3,_0x4f0c9f){_0x4e07d3=_0x4e07d3-0x193;var _0x451819=_0x4518();var _0x1963b1=_0x451819[_0x4e07d3];return _0x1963b1;}function S(_0x17feaf,_0x80c196){var _0x1abbc8=_0x5d57b4;if(x(_0x17feaf)!=_0x1abbc8(0x1bb)||!_0x17feaf)return _0x17feaf;var _0x289f0e=_0x17feaf[Symbol['toPrimitive']];if(_0x289f0e!==void 0x0){var _0x4565e8=_0x289f0e[_0x1abbc8(0x1ae)](_0x17feaf,_0x80c196||_0x1abbc8(0x196));if(x(_0x4565e8)!=_0x1abbc8(0x1bb))return _0x4565e8;throw TypeError(_0x1abbc8(0x1b7));}return(_0x80c196==='string'?String:Number)(_0x17feaf);}function C(_0x582b65){var _0xe32d27=_0x5d57b4,_0x2beafc=S(_0x582b65,_0xe32d27(0x1b1));return x(_0x2beafc)==_0xe32d27(0x1df)?_0x2beafc:_0x2beafc+'';}function w(_0x4d6902,_0xc70968,_0x2eea7f){var _0x59e956=_0x5d57b4;return(_0xc70968=C(_0xc70968))in _0x4d6902?Object[_0x59e956(0x1c6)](_0x4d6902,_0xc70968,{'value':_0x2eea7f,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4d6902[_0xc70968]=_0x2eea7f,_0x4d6902;}var T=class extends _0x52274f{constructor(..._0x268497){var _0x536a34=_0x5d57b4;super(..._0x268497),w(this,'_docsFormulaCommandService',void 0x0),w(this,_0x536a34(0x1d5),void 0x0),w(this,_0x536a34(0x1a1),void 0x0),w(this,'_docsFormulaResourceLoaderService',void 0x0);}['_initialize'](_0x54d07d){var _0x2893d8=_0x5d57b4;this[_0x2893d8(0x1a0)]=_0x54d07d['get'](_0x59cbd8),this[_0x2893d8(0x1d5)]=_0x54d07d[_0x2893d8(0x1ba)](_0x515404),this['_docsFormulaModel']=_0x54d07d['get'](_0x28e2b2),this[_0x2893d8(0x1b5)]=_0x54d07d['get'](_0x547241);}[_0x5d57b4(0x1ca)](){var _0x517859=_0x5d57b4;return this['_getCompleteRanges']()[_0x517859(0x1da)](_0x237faf=>this[_0x517859(0x1b3)](_0x237faf[_0x517859(0x1a8)]));}[_0x5d57b4(0x1d8)](_0x262fb3){var _0x404c4e=_0x5d57b4;return this[_0x404c4e(0x1d0)]()[_0x404c4e(0x1ce)](_0x11ee78=>_0x11ee78[_0x404c4e(0x1a8)]===_0x262fb3)?this[_0x404c4e(0x1b3)](_0x262fb3):null;}['getFormulaAt'](_0x399b7a){var _0x4703a3=_0x5d57b4;let _0x3dc992=this['_getCompleteRanges']()[_0x4703a3(0x1a9)](_0x3f9a5e=>_0x3f9a5e[_0x4703a3(0x1b6)]<=_0x399b7a&&_0x399b7a<=_0x3f9a5e[_0x4703a3(0x1bc)]);return _0x3dc992?this[_0x4703a3(0x1b3)](_0x3dc992['rangeId']):null;}['saveFormulaDisplayTextSnapshot'](){var _0x30190c=_0x5d57b4;let _0x5f4948=this['_docsFormulaResourceLoaderService'][_0x30190c(0x1dd)](this['id']);if(!_0x5f4948)throw Error(_0x30190c(0x1c8)+this['id']+_0x30190c(0x19f));return this[_0x30190c(0x1d5)][_0x30190c(0x1d1)](_0x5f4948);}[_0x5d57b4(0x1ad)](_0x2b6e96){var _0x345889=_0x5d57b4;return this[_0x345889(0x1c9)]({'externalReferences':_0x2b6e96[_0x345889(0x1ab)],'formula':_0x2b6e96[_0x345889(0x1b4)],'numberFormat':_0x2b6e96[_0x345889(0x19a)],'target':{'type':'range','startOffset':_0x2b6e96[_0x345889(0x1cf)],'endOffset':_0x2b6e96[_0x345889(0x1d3)]},'unitId':this['getId']()});}[_0x5d57b4(0x1c9)](_0x1777cc){var _0x54fc2a=_0x5d57b4;let _0x3657e6=this[_0x54fc2a(0x1a0)][_0x54fc2a(0x198)](_0x34e369['id'],_0x1777cc);return _0x3657e6?this[_0x54fc2a(0x1b3)](_0x3657e6[_0x54fc2a(0x1a8)]):null;}['_getCompleteRanges'](){var _0x472825=_0x5d57b4,_0x34e2b0;let _0x53be54=this[_0x472825(0x1a1)]['getFormulas'](this['getId']());return((_0x34e2b0=this[_0x472825(0x19b)]('')['customRanges'])==null?void 0x0:_0x34e2b0[_0x472825(0x1c0)](_0x1bb8fa=>_0x45ace4(_0x1bb8fa)&&_0x53be54[_0x1bb8fa[_0x472825(0x1a8)]]!=null))??[];}[_0x5d57b4(0x1b3)](_0x57477c){var _0x48daac=_0x5d57b4;return this['_injector'][_0x48daac(0x1c2)](b,this[_0x48daac(0x1a5)](),_0x57477c);}};function _0x4518(){var _0x303e97=['_createFormula','formula','_docsFormulaResourceLoaderService','startIndex','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_commandService','decorate','get','object','endIndex','6717788CIeGFT','getConfig','paragraph','filter','replaceWithText','createInstance','_document','prototype','6vgMwjJ','defineProperty','1563659TcSili','Document\x20','_insert','getFormulas','2789530DvWApG','_initialize','_service','some','startOffset','_getCompleteRanges','degradeDocumentData','constructor','endOffset','_injector','_docsFormulaDisplayTextService','function','end','getFormula','update','map','_model','getResult','saveUnit','remove','symbol','_rangeId','_unitId','extend','default','_getCustomRange','syncExecuteCommand','replaceWithFormula','numberFormat','getBody','1002327qNmzgs','UNIVER_DOC','iterator','\x20could\x20not\x20be\x20serialized.','_docsFormulaCommandService','_docsFormulaModel','602045VgLlpK','_univerInstanceService','5408536jJwRLS','getId','length','getUnit','rangeId','find','getSnapshot','externalReferences','getOwnPropertyDescriptor','insertFormula','call','getRange','7929908GOTXjC','string','appendFormula'];_0x4518=function(){return _0x303e97;};return _0x4518();}_0x52274f['extend'](T);var E=class extends _0x41def4{constructor(..._0x301a4a){var _0x14dd70=_0x5d57b4;super(..._0x301a4a),w(this,_0x14dd70(0x1a0),void 0x0);}[_0x5d57b4(0x1cc)](_0x2faa00){var _0x359d23=_0x5d57b4;this[_0x359d23(0x1a0)]=_0x2faa00['get'](_0x59cbd8);}['insertFormula'](_0x1a7599,_0xc36d8f,_0x273087={}){var _0x4cd2d7=_0x5d57b4;return this[_0x4cd2d7(0x1c9)](_0x1a7599,_0xc36d8f,_0x273087);}[_0x5d57b4(0x1b2)](_0x1d7c49,_0x586f47={}){var _0x5111cb=_0x5d57b4;return this[_0x5111cb(0x1c9)](_0x5111cb(0x1d7),_0x1d7c49,_0x586f47);}[_0x5d57b4(0x1c9)](_0x587682,_0x3ba007,_0x5424c4){var _0x5d5e1e=_0x5d57b4;if(this['getSegmentId']())return null;let _0x1dc49e={'externalReferences':_0x5424c4[_0x5d5e1e(0x1ab)],'formula':_0x3ba007,'numberFormat':_0x5424c4['numberFormat'],'target':{'type':_0x5d5e1e(0x1bf),'paragraphId':this['getId'](),'position':_0x587682},'unitId':this[_0x5d5e1e(0x1c3)]['getId']()},_0x4e39be=this[_0x5d5e1e(0x1a0)][_0x5d5e1e(0x198)](_0x34e369['id'],_0x1dc49e);return _0x4e39be?this[_0x5d5e1e(0x1d4)]['createInstance'](b,this['_document'][_0x5d5e1e(0x1a5)](),_0x4e39be['rangeId']):null;}};_0x41def4['extend'](E);var D=class extends _0x16f6e2{constructor(..._0x25ea9d){var _0x380f17=_0x5d57b4;super(..._0x25ea9d),w(this,_0x380f17(0x1a0),void 0x0);}[_0x5d57b4(0x1cc)](_0x3c4d83){var _0x4f3993=_0x5d57b4;this['_docsFormulaCommandService']=_0x3c4d83[_0x4f3993(0x1ba)](_0x59cbd8);}[_0x5d57b4(0x199)](_0x5aa9ae,_0x2457cf={}){var _0x2dac1c=_0x5d57b4;let {endOffset:_0x37c9bc,segmentId:_0x4bf19b,startOffset:_0x13202e}=this[_0x2dac1c(0x1af)]();return _0x4bf19b?null:this[_0x2dac1c(0x1c9)](_0x13202e,_0x37c9bc,_0x5aa9ae,_0x2457cf);}[_0x5d57b4(0x1c9)](_0x71818f,_0x3304ad,_0x1e57e7,_0x128fdd){var _0x4cf90a=_0x5d57b4;let _0x204f24={'externalReferences':_0x128fdd[_0x4cf90a(0x1ab)],'formula':_0x1e57e7,'numberFormat':_0x128fdd['numberFormat'],'target':{'type':'range','startOffset':_0x71818f,'endOffset':_0x3304ad},'unitId':this[_0x4cf90a(0x1c3)][_0x4cf90a(0x1a5)]()},_0x5c67fb=this[_0x4cf90a(0x1a0)][_0x4cf90a(0x198)](_0x34e369['id'],_0x204f24);return _0x5c67fb?this[_0x4cf90a(0x1d4)][_0x4cf90a(0x1c2)](b,this[_0x4cf90a(0x1c3)][_0x4cf90a(0x1a5)](),_0x5c67fb[_0x4cf90a(0x1a8)]):null;}};_0x16f6e2[_0x5d57b4(0x195)](D);export{b as FDocumentFormula};
1
+ var _0x3a3a0c=_0x5a9d;(function(_0x36e180,_0x4e5afb){var _0x2e221c=_0x5a9d,_0x406648=_0x36e180();while(!![]){try{var _0x56043d=parseInt(_0x2e221c(0xeb))/0x1+-parseInt(_0x2e221c(0xef))/0x2+parseInt(_0x2e221c(0x127))/0x3+-parseInt(_0x2e221c(0x130))/0x4+-parseInt(_0x2e221c(0x11b))/0x5*(-parseInt(_0x2e221c(0x101))/0x6)+parseInt(_0x2e221c(0xf1))/0x7*(parseInt(_0x2e221c(0x133))/0x8)+parseInt(_0x2e221c(0x10d))/0x9*(-parseInt(_0x2e221c(0x12d))/0xa);if(_0x56043d===_0x4e5afb)break;else _0x406648['push'](_0x406648['shift']());}catch(_0x1fef7f){_0x406648['push'](_0x406648['shift']());}}}(_0x5938,0xd995f));import{ConvertDocFormulaToTextCommand as _0x2322c8,DocFormulaDisplayTextService as _0x153131,DocFormulaModel as _0x3de5b9,DocFormulaService as _0x5853dc,InsertDocFormulaCommand as _0x1dca28,RemoveDocFormulaCommand as _0x218400,ReplaceDocFormulaWithTextCommand as _0x1ecc26,SetDocFormulaNumberFormatCommand as _0x5f0249,UpdateDocFormulaCommand as _0x449523,isDocFormulaRange as _0x386fc6}from'@univerjs-pro/docs-formula';import{ICommandService as _0x24b4b7,IResourceLoaderService as _0x35fc3b,IUniverInstanceService as _0x462ecd,Inject as _0x54ace0,UniverInstanceType as _0x4e1ebb}from'@univerjs/core';import{FDocument as _0x4e2d9c,FDocumentParagraph as _0x524dda,FDocumentTextRange as _0x5ab49e}from'@univerjs/docs/facade';function v(_0x30c4b5,_0x515b4f){return function(_0x3d7031,_0xd0de41){_0x515b4f(_0x3d7031,_0xd0de41,_0x30c4b5);};}function y(_0x200c5c,_0x3db804,_0x141a83,_0x2ea822){var _0x505e78=_0x5a9d,_0x1d383d=arguments[_0x505e78(0xfa)],_0x3c969f=_0x1d383d<0x3?_0x3db804:_0x2ea822===null?_0x2ea822=Object[_0x505e78(0x129)](_0x3db804,_0x141a83):_0x2ea822,_0x55c476;if(typeof Reflect==_0x505e78(0xf2)&&typeof Reflect[_0x505e78(0x107)]==_0x505e78(0xf4))_0x3c969f=Reflect['decorate'](_0x200c5c,_0x3db804,_0x141a83,_0x2ea822);else{for(var _0x1c27d6=_0x200c5c[_0x505e78(0xfa)]-0x1;_0x1c27d6>=0x0;_0x1c27d6--)(_0x55c476=_0x200c5c[_0x1c27d6])&&(_0x3c969f=(_0x1d383d<0x3?_0x55c476(_0x3c969f):_0x1d383d>0x3?_0x55c476(_0x3db804,_0x141a83,_0x3c969f):_0x55c476(_0x3db804,_0x141a83))||_0x3c969f);}return _0x1d383d>0x3&&_0x3c969f&&Object['defineProperty'](_0x3db804,_0x141a83,_0x3c969f),_0x3c969f;}let b=class{constructor(_0x5c2f94,_0xbd171,_0xa7dfef,_0x3bb6a8,_0x5e9939,_0x1f1dcd){var _0x9dd27d=_0x5a9d;this[_0x9dd27d(0x10f)]=_0x5c2f94,this['_rangeId']=_0xbd171,this[_0x9dd27d(0x110)]=_0xa7dfef,this[_0x9dd27d(0x132)]=_0x3bb6a8,this[_0x9dd27d(0x116)]=_0x5e9939,this[_0x9dd27d(0x123)]=_0x1f1dcd;}[_0x3a3a0c(0x12b)](){var _0x595cea=_0x3a3a0c;return this[_0x595cea(0x105)];}[_0x3a3a0c(0x134)](){var _0x35a2b6=_0x3a3a0c;let _0x4c41ab=this['_getCustomRange']();return _0x4c41ab?{'endOffset':_0x4c41ab[_0x35a2b6(0x119)]+0x1,'rangeId':_0x4c41ab[_0x35a2b6(0x135)],'startOffset':_0x4c41ab[_0x35a2b6(0xfe)]}:null;}[_0x3a3a0c(0xed)](){var _0x3a9f67=_0x3a3a0c,_0x12743e;return((_0x12743e=this[_0x3a9f67(0x132)][_0x3a9f67(0xed)](this['_unitId'],this[_0x3a9f67(0x105)]))==null?void 0x0:_0x12743e['formula'])??'';}[_0x3a3a0c(0x11f)](){var _0x35a435=_0x3a3a0c;return this[_0x35a435(0x132)][_0x35a435(0xed)](this[_0x35a435(0x10f)],this[_0x35a435(0x105)])??null;}['getResult'](){var _0xf5afc2=_0x3a3a0c;return this[_0xf5afc2(0x116)][_0xf5afc2(0x112)]({'unitId':this['_unitId'],'rangeId':this['_rangeId']})??null;}['describe'](){var _0x1708a8=_0x3a3a0c;let _0x25e384=this[_0x1708a8(0x134)](),_0x138f39=this[_0x1708a8(0x11f)](),_0x348359=this[_0x1708a8(0x112)]();return!_0x25e384||!_0x138f39||!_0x348359?null:{..._0x25e384,'config':_0x138f39,'formula':_0x138f39[_0x1708a8(0x118)],'result':_0x348359,'type':_0x1708a8(0x118)};}[_0x3a3a0c(0xf9)](_0x187582){var _0x580aaf=_0x3a3a0c;return this[_0x580aaf(0x110)][_0x580aaf(0xf6)](_0x449523['id'],{'externalReferences':_0x187582['externalReferences'],'formula':_0x187582['formula'],'numberFormat':_0x187582[_0x580aaf(0xfc)],'rangeId':this[_0x580aaf(0x105)],'unitId':this[_0x580aaf(0x10f)]});}[_0x3a3a0c(0x113)](_0x52457e){var _0x1da569=_0x3a3a0c;return this[_0x1da569(0x110)][_0x1da569(0xf6)](_0x5f0249['id'],{'numberFormat':_0x52457e,'rangeId':this[_0x1da569(0x105)],'unitId':this[_0x1da569(0x10f)]});}[_0x3a3a0c(0x128)](){var _0x476d4d=_0x3a3a0c;return this[_0x476d4d(0x110)][_0x476d4d(0xf6)](_0x218400['id'],{'rangeId':this[_0x476d4d(0x105)],'unitId':this[_0x476d4d(0x10f)]});}['replaceWithText'](_0x4b5eb1){var _0x3e03f3=_0x3a3a0c;return this[_0x3e03f3(0x110)][_0x3e03f3(0xf6)](_0x1ecc26['id'],{'rangeId':this[_0x3e03f3(0x105)],'text':_0x4b5eb1,'unitId':this[_0x3e03f3(0x10f)]});}[_0x3a3a0c(0x102)](){var _0xe685ff=_0x3a3a0c;return this['_commandService'][_0xe685ff(0xf6)](_0x2322c8['id'],{'rangeId':this[_0xe685ff(0x105)],'unitId':this[_0xe685ff(0x10f)]});}[_0x3a3a0c(0x136)](){var _0x1f6817=_0x3a3a0c,_0x4faa91;let _0x1c8157=this[_0x1f6817(0x123)]['getUnit'](this[_0x1f6817(0x10f)],_0x4e1ebb[_0x1f6817(0x12e)]);return _0x1c8157==null||(_0x4faa91=_0x1c8157[_0x1f6817(0x12c)]()[_0x1f6817(0xfd)])==null||(_0x4faa91=_0x4faa91[_0x1f6817(0x121)])==null?void 0x0:_0x4faa91[_0x1f6817(0x114)](_0xb1f0f7=>_0xb1f0f7[_0x1f6817(0x135)]===this[_0x1f6817(0x105)]&&_0x386fc6(_0xb1f0f7));}};b=y([v(0x2,_0x24b4b7),v(0x3,_0x54ace0(_0x3de5b9)),v(0x4,_0x54ace0(_0x5853dc)),v(0x5,_0x462ecd)],b);function x(_0x39507f){'@babel/helpers - typeof';var _0x59360d=_0x3a3a0c;return x=typeof Symbol==_0x59360d(0xf4)&&typeof Symbol['iterator']=='symbol'?function(_0x4bec02){return typeof _0x4bec02;}:function(_0x4a66dc){var _0xc0f842=_0x59360d;return _0x4a66dc&&typeof Symbol=='function'&&_0x4a66dc[_0xc0f842(0x11c)]===Symbol&&_0x4a66dc!==Symbol[_0xc0f842(0x10b)]?_0xc0f842(0x100):typeof _0x4a66dc;},x(_0x39507f);}function S(_0x42e7de,_0x498698){var _0x596524=_0x3a3a0c;if(x(_0x42e7de)!='object'||!_0x42e7de)return _0x42e7de;var _0x2bb725=_0x42e7de[Symbol[_0x596524(0x10a)]];if(_0x2bb725!==void 0x0){var _0x69ea43=_0x2bb725[_0x596524(0x138)](_0x42e7de,_0x498698||'default');if(x(_0x69ea43)!=_0x596524(0xf2))return _0x69ea43;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x498698===_0x596524(0x111)?String:Number)(_0x42e7de);}function C(_0x46b597){var _0x1339a9=_0x3a3a0c,_0x106307=S(_0x46b597,_0x1339a9(0x111));return x(_0x106307)==_0x1339a9(0x100)?_0x106307:_0x106307+'';}function w(_0x5351c6,_0x4ab59d,_0x58a9af){var _0x3750d5=_0x3a3a0c;return(_0x4ab59d=C(_0x4ab59d))in _0x5351c6?Object[_0x3750d5(0xff)](_0x5351c6,_0x4ab59d,{'value':_0x58a9af,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x5351c6[_0x4ab59d]=_0x58a9af,_0x5351c6;}var T=class extends _0x4e2d9c{constructor(..._0x519d1d){var _0x381b60=_0x3a3a0c;super(..._0x519d1d),w(this,_0x381b60(0x10c),void 0x0),w(this,'_docsFormulaDisplayTextService',void 0x0),w(this,_0x381b60(0xea),void 0x0),w(this,_0x381b60(0x137),void 0x0);}[_0x3a3a0c(0xf3)](_0x14110c){var _0x161599=_0x3a3a0c;this[_0x161599(0x10c)]=_0x14110c[_0x161599(0x117)](_0x24b4b7),this[_0x161599(0x10e)]=_0x14110c[_0x161599(0x117)](_0x153131),this[_0x161599(0xea)]=_0x14110c['get'](_0x3de5b9),this['_docsFormulaResourceLoaderService']=_0x14110c[_0x161599(0x117)](_0x35fc3b);}[_0x3a3a0c(0x131)](){var _0x2de62f=_0x3a3a0c;return this['_getCompleteRanges']()[_0x2de62f(0x11e)](_0x2e09e4=>this[_0x2de62f(0x12f)](_0x2e09e4['rangeId']));}['getFormula'](_0x1e03e0){var _0x5b5fcc=_0x3a3a0c;return this[_0x5b5fcc(0x12a)]()[_0x5b5fcc(0xee)](_0x4fd12e=>_0x4fd12e[_0x5b5fcc(0x135)]===_0x1e03e0)?this[_0x5b5fcc(0x12f)](_0x1e03e0):null;}[_0x3a3a0c(0xf5)](_0x3efc31){var _0xed2d0a=_0x3a3a0c;let _0x3d58b0=this['_getCompleteRanges']()[_0xed2d0a(0x114)](_0x1dd3ca=>_0x1dd3ca[_0xed2d0a(0xfe)]<=_0x3efc31&&_0x3efc31<=_0x1dd3ca[_0xed2d0a(0x119)]);return _0x3d58b0?this[_0xed2d0a(0x12f)](_0x3d58b0[_0xed2d0a(0x135)]):null;}[_0x3a3a0c(0x122)](){var _0x598db9=_0x3a3a0c;let _0x3aac3f=this[_0x598db9(0x137)][_0x598db9(0x124)](this['id']);if(!_0x3aac3f)throw Error(_0x598db9(0xec)+this['id']+'\x20could\x20not\x20be\x20serialized.');return this[_0x598db9(0x10e)][_0x598db9(0x126)](_0x3aac3f);}['insertFormula'](_0xadf386){var _0x13cccc=_0x3a3a0c;return this[_0x13cccc(0x108)]({'externalReferences':_0xadf386[_0x13cccc(0xfb)],'formula':_0xadf386[_0x13cccc(0x118)],'numberFormat':_0xadf386[_0x13cccc(0xfc)],'target':{'type':_0x13cccc(0x109),'startOffset':_0xadf386[_0x13cccc(0xf8)],'endOffset':_0xadf386[_0x13cccc(0x125)]},'unitId':this['getId']()});}[_0x3a3a0c(0x108)](_0x2ada71){var _0x471c21=_0x3a3a0c;let _0x30a7bc=this[_0x471c21(0x10c)][_0x471c21(0xf6)](_0x1dca28['id'],_0x2ada71);return _0x30a7bc?this[_0x471c21(0x12f)](_0x30a7bc[_0x471c21(0x135)]):null;}[_0x3a3a0c(0x12a)](){var _0x12c68b=_0x3a3a0c,_0x2839cc;let _0x12db94=this[_0x12c68b(0xea)]['getFormulas'](this[_0x12c68b(0x12b)]());return((_0x2839cc=this['getBody']('')['customRanges'])==null?void 0x0:_0x2839cc['filter'](_0x5e4ed8=>_0x386fc6(_0x5e4ed8)&&_0x12db94[_0x5e4ed8[_0x12c68b(0x135)]]!=null))??[];}['_createFormula'](_0x55e4e7){var _0x4942b3=_0x3a3a0c;return this[_0x4942b3(0x106)][_0x4942b3(0x104)](b,this[_0x4942b3(0x12b)](),_0x55e4e7);}};_0x4e2d9c[_0x3a3a0c(0x11d)](T);var E=class extends _0x524dda{constructor(..._0x4da8dd){var _0x78e132=_0x3a3a0c;super(..._0x4da8dd),w(this,_0x78e132(0x10c),void 0x0);}[_0x3a3a0c(0xf3)](_0x1e136c){var _0x4a2492=_0x3a3a0c;this['_docsFormulaCommandService']=_0x1e136c[_0x4a2492(0x117)](_0x24b4b7);}['insertFormula'](_0x5d1465,_0xcee93e,_0x1ac3d2={}){var _0x4506d0=_0x3a3a0c;return this[_0x4506d0(0x108)](_0x5d1465,_0xcee93e,_0x1ac3d2);}[_0x3a3a0c(0x120)](_0x76880d,_0x3972d4={}){var _0x17b82f=_0x3a3a0c;return this['_insert'](_0x17b82f(0xf7),_0x76880d,_0x3972d4);}['_insert'](_0xa0174f,_0x2a0762,_0x4ac866){var _0x2425db=_0x3a3a0c;if(this[_0x2425db(0x103)]())return null;let _0xfaf39={'externalReferences':_0x4ac866[_0x2425db(0xfb)],'formula':_0x2a0762,'numberFormat':_0x4ac866[_0x2425db(0xfc)],'target':{'type':_0x2425db(0xf0),'paragraphId':this['getId'](),'position':_0xa0174f},'unitId':this['_document'][_0x2425db(0x12b)]()},_0x4dee5d=this[_0x2425db(0x10c)]['syncExecuteCommand'](_0x1dca28['id'],_0xfaf39);return _0x4dee5d?this[_0x2425db(0x106)][_0x2425db(0x104)](b,this[_0x2425db(0x115)]['getId'](),_0x4dee5d[_0x2425db(0x135)]):null;}};function _0x5a9d(_0x3d0754,_0xbcd0a1){_0x3d0754=_0x3d0754-0xea;var _0x59387b=_0x5938();var _0x5a9d30=_0x59387b[_0x3d0754];return _0x5a9d30;}_0x524dda['extend'](E);var D=class extends _0x5ab49e{constructor(..._0x509171){var _0x429823=_0x3a3a0c;super(..._0x509171),w(this,_0x429823(0x10c),void 0x0);}['_initialize'](_0x3b0f88){var _0x21cc68=_0x3a3a0c;this[_0x21cc68(0x10c)]=_0x3b0f88[_0x21cc68(0x117)](_0x24b4b7);}[_0x3a3a0c(0x11a)](_0x46f00f,_0x1c0f9d={}){var _0x2cde12=_0x3a3a0c;let {endOffset:_0x4114bc,segmentId:_0x24f099,startOffset:_0x18c376}=this[_0x2cde12(0x134)]();return _0x24f099?null:this[_0x2cde12(0x108)](_0x18c376,_0x4114bc,_0x46f00f,_0x1c0f9d);}['_insert'](_0x40ac33,_0x2e214a,_0x49c249,_0x48f604){var _0x28ee33=_0x3a3a0c;let _0x2b44c9={'externalReferences':_0x48f604['externalReferences'],'formula':_0x49c249,'numberFormat':_0x48f604['numberFormat'],'target':{'type':_0x28ee33(0x109),'startOffset':_0x40ac33,'endOffset':_0x2e214a},'unitId':this[_0x28ee33(0x115)][_0x28ee33(0x12b)]()},_0x2ac913=this[_0x28ee33(0x10c)][_0x28ee33(0xf6)](_0x1dca28['id'],_0x2b44c9);return _0x2ac913?this[_0x28ee33(0x106)]['createInstance'](b,this[_0x28ee33(0x115)][_0x28ee33(0x12b)](),_0x2ac913[_0x28ee33(0x135)]):null;}};_0x5ab49e[_0x3a3a0c(0x11d)](D);function _0x5938(){var _0x2b9a87=['appendFormula','customRanges','saveFormulaDisplayTextSnapshot','_univerInstanceService','saveUnit','endOffset','degradeDocumentData','2837700ssPvpG','remove','getOwnPropertyDescriptor','_getCompleteRanges','getId','getSnapshot','100QMwxIK','UNIVER_DOC','_createFormula','2074308ZmAWtD','getFormulas','_model','8mBaJdj','getRange','rangeId','_getCustomRange','_docsFormulaResourceLoaderService','call','_docsFormulaModel','956527KKRstw','Document\x20','getFormula','some','3115372zQRPhj','paragraph','4236372RLCIDe','object','_initialize','function','getFormulaAt','syncExecuteCommand','end','startOffset','update','length','externalReferences','numberFormat','body','startIndex','defineProperty','symbol','54942UOneVJ','convertToText','getSegmentId','createInstance','_rangeId','_injector','decorate','_insert','range','toPrimitive','prototype','_docsFormulaCommandService','1094274AgEvBx','_docsFormulaDisplayTextService','_unitId','_commandService','string','getResult','setNumberFormat','find','_document','_service','get','formula','endIndex','replaceWithFormula','915JlzEyY','constructor','extend','map','getConfig'];_0x5938=function(){return _0x2b9a87;};return _0x5938();}export{b as FDocumentFormula};