@univerjs-pro/docs-formula 1.2.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/facade.js CHANGED
@@ -1 +1 @@
1
- const _0x24903e=_0x54c1;(function(_0x415dbb,_0x2c6c4e){const _0x9ff481=_0x54c1,_0x3fd3bf=_0x415dbb();while(!![]){try{const _0x3919ff=parseInt(_0x9ff481(0x176))/0x1+-parseInt(_0x9ff481(0x191))/0x2+-parseInt(_0x9ff481(0x18c))/0x3+parseInt(_0x9ff481(0x168))/0x4+-parseInt(_0x9ff481(0x1a7))/0x5+-parseInt(_0x9ff481(0x1aa))/0x6*(-parseInt(_0x9ff481(0x1ab))/0x7)+parseInt(_0x9ff481(0x1ae))/0x8;if(_0x3919ff===_0x2c6c4e)break;else _0x3fd3bf['push'](_0x3fd3bf['shift']());}catch(_0x4369fc){_0x3fd3bf['push'](_0x3fd3bf['shift']());}}}(_0x4c32,0x866a5),Object[_0x24903e(0x1ad)](exports,Symbol[_0x24903e(0x180)],{'value':'Module'}));let e=require('@univerjs-pro/docs-formula'),t=require('@univerjs/core'),n=require('@univerjs/docs/facade');function _0x4c32(){const _0x19362a=['_commandService','Document\x20','ReplaceDocFormulaWithTextCommand','getSegmentId','825660fgsETl','get','range','getSnapshot','isDocFormulaRange','IUniverInstanceService','some','_initialize','prototype','FDocumentFormula','toStringTag','syncExecuteCommand','_model','find','remove','formula','filter','getConfig','_docsFormulaCommandService','IResourceLoaderService','iterator','symbol','2470101gAwmFf','saveFormulaDisplayTextSnapshot','endIndex','getUnit','saveUnit','795458vhuBUC','string','object','convertToText','externalReferences','default','_injector','numberFormat','getOwnPropertyDescriptor','endOffset','getRange','_docsFormulaDisplayTextService','setNumberFormat','decorate','_docsFormulaResourceLoaderService','end','_univerInstanceService','paragraph','_createFormula','constructor','customRanges','_docsFormulaModel','2893305cpgxmN','RemoveDocFormulaCommand','extend','12wgFleL','420875nyPukR','getBody','defineProperty','2614072KvkVKI','getFormulas','_service','_getCompleteRanges','length','startOffset','_document','DocFormulaService','createInstance','ICommandService','getId','FDocumentParagraph','_insert','DocFormulaModel','replaceWithFormula','startIndex','replaceWithText','rangeId','FDocumentTextRange','InsertDocFormulaCommand','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','Inject','map','4310612wAspHc','DocFormulaDisplayTextService','toPrimitive','_unitId','function','insertFormula','_rangeId','_getCustomRange','getResult','getFormula'];_0x4c32=function(){return _0x19362a;};return _0x4c32();}function r(_0x229734,_0x306ce4){return function(_0x33b85f,_0x586f7c){_0x306ce4(_0x33b85f,_0x586f7c,_0x229734);};}function i(_0x489dbb,_0x179388,_0x4ea6b8,_0x188528){const _0x5611f9=_0x24903e;var _0x155353=arguments['length'],_0x5bcfe9=_0x155353<0x3?_0x179388:_0x188528===null?_0x188528=Object[_0x5611f9(0x199)](_0x179388,_0x4ea6b8):_0x188528,_0x2bc02c;if(typeof Reflect==_0x5611f9(0x193)&&typeof Reflect[_0x5611f9(0x19e)]==_0x5611f9(0x16c))_0x5bcfe9=Reflect[_0x5611f9(0x19e)](_0x489dbb,_0x179388,_0x4ea6b8,_0x188528);else{for(var _0x2bd1e8=_0x489dbb[_0x5611f9(0x155)]-0x1;_0x2bd1e8>=0x0;_0x2bd1e8--)(_0x2bc02c=_0x489dbb[_0x2bd1e8])&&(_0x5bcfe9=(_0x155353<0x3?_0x2bc02c(_0x5bcfe9):_0x155353>0x3?_0x2bc02c(_0x179388,_0x4ea6b8,_0x5bcfe9):_0x2bc02c(_0x179388,_0x4ea6b8))||_0x5bcfe9);}return _0x155353>0x3&&_0x5bcfe9&&Object[_0x5611f9(0x1ad)](_0x179388,_0x4ea6b8,_0x5bcfe9),_0x5bcfe9;}let a=class{constructor(_0x587841,_0x1ad007,_0x903bda,_0x5c7e42,_0x547709,_0x1721ae){const _0x491408=_0x24903e;this[_0x491408(0x16b)]=_0x587841,this['_rangeId']=_0x1ad007,this['_commandService']=_0x903bda,this[_0x491408(0x182)]=_0x5c7e42,this[_0x491408(0x1b0)]=_0x547709,this[_0x491408(0x1a1)]=_0x1721ae;}[_0x24903e(0x15b)](){const _0x59bb2e=_0x24903e;return this[_0x59bb2e(0x16e)];}[_0x24903e(0x19b)](){const _0x90f017=_0x24903e;let _0x934e50=this[_0x90f017(0x16f)]();return _0x934e50?{'endOffset':_0x934e50[_0x90f017(0x18e)]+0x1,'rangeId':_0x934e50[_0x90f017(0x162)],'startOffset':_0x934e50['startIndex']}:null;}[_0x24903e(0x171)](){const _0x35e927=_0x24903e;var _0xa9d1e8;return((_0xa9d1e8=this[_0x35e927(0x182)][_0x35e927(0x171)](this[_0x35e927(0x16b)],this[_0x35e927(0x16e)]))==null?void 0x0:_0xa9d1e8['formula'])??'';}['getConfig'](){const _0x27b2e3=_0x24903e;return this[_0x27b2e3(0x182)][_0x27b2e3(0x171)](this['_unitId'],this[_0x27b2e3(0x16e)])??null;}[_0x24903e(0x170)](){const _0x3547af=_0x24903e;return this['_service'][_0x3547af(0x170)]({'unitId':this[_0x3547af(0x16b)],'rangeId':this[_0x3547af(0x16e)]})??null;}['describe'](){const _0x2209e3=_0x24903e;let _0x50d0a2=this['getRange'](),_0x2ff235=this[_0x2209e3(0x187)](),_0x5510c4=this[_0x2209e3(0x170)]();return!_0x50d0a2||!_0x2ff235||!_0x5510c4?null:{..._0x50d0a2,'config':_0x2ff235,'formula':_0x2ff235[_0x2209e3(0x185)],'result':_0x5510c4,'type':'formula'};}['update'](_0x42a70f){const _0x1548a0=_0x24903e;return this[_0x1548a0(0x172)][_0x1548a0(0x181)](e['UpdateDocFormulaCommand']['id'],{'externalReferences':_0x42a70f[_0x1548a0(0x195)],'formula':_0x42a70f[_0x1548a0(0x185)],'numberFormat':_0x42a70f['numberFormat'],'rangeId':this['_rangeId'],'unitId':this[_0x1548a0(0x16b)]});}[_0x24903e(0x19d)](_0x4f2156){const _0x6e1e17=_0x24903e;return this[_0x6e1e17(0x172)][_0x6e1e17(0x181)](e['SetDocFormulaNumberFormatCommand']['id'],{'numberFormat':_0x4f2156,'rangeId':this[_0x6e1e17(0x16e)],'unitId':this[_0x6e1e17(0x16b)]});}[_0x24903e(0x184)](){const _0x2bec5b=_0x24903e;return this[_0x2bec5b(0x172)][_0x2bec5b(0x181)](e[_0x2bec5b(0x1a8)]['id'],{'rangeId':this['_rangeId'],'unitId':this[_0x2bec5b(0x16b)]});}[_0x24903e(0x161)](_0x54d238){const _0x3c9b77=_0x24903e;return this[_0x3c9b77(0x172)][_0x3c9b77(0x181)](e[_0x3c9b77(0x174)]['id'],{'rangeId':this[_0x3c9b77(0x16e)],'text':_0x54d238,'unitId':this[_0x3c9b77(0x16b)]});}[_0x24903e(0x194)](){const _0x359c76=_0x24903e;return this[_0x359c76(0x172)][_0x359c76(0x181)](e['ConvertDocFormulaToTextCommand']['id'],{'rangeId':this[_0x359c76(0x16e)],'unitId':this[_0x359c76(0x16b)]});}[_0x24903e(0x16f)](){const _0x77d440=_0x24903e;var _0x4a2139;let _0x4165f9=this[_0x77d440(0x1a1)][_0x77d440(0x18f)](this[_0x77d440(0x16b)],t['UniverInstanceType']['UNIVER_DOC']);return _0x4165f9==null||(_0x4a2139=_0x4165f9[_0x77d440(0x179)]()['body'])==null||(_0x4a2139=_0x4a2139[_0x77d440(0x1a5)])==null?void 0x0:_0x4a2139[_0x77d440(0x183)](_0x56495f=>_0x56495f['rangeId']===this['_rangeId']&&(0x0,e[_0x77d440(0x17a)])(_0x56495f));}};a=i([r(0x2,t[_0x24903e(0x15a)]),r(0x3,(0x0,t[_0x24903e(0x166)])(e[_0x24903e(0x15e)])),r(0x4,(0x0,t[_0x24903e(0x166)])(e[_0x24903e(0x158)])),r(0x5,t[_0x24903e(0x17b)])],a);function o(_0x492787){'@babel/helpers - typeof';const _0x445a7b=_0x24903e;return o=typeof Symbol==_0x445a7b(0x16c)&&typeof Symbol[_0x445a7b(0x18a)]==_0x445a7b(0x18b)?function(_0x1d1600){return typeof _0x1d1600;}:function(_0x1dddf8){const _0x17f7f1=_0x445a7b;return _0x1dddf8&&typeof Symbol==_0x17f7f1(0x16c)&&_0x1dddf8[_0x17f7f1(0x1a4)]===Symbol&&_0x1dddf8!==Symbol[_0x17f7f1(0x17e)]?_0x17f7f1(0x18b):typeof _0x1dddf8;},o(_0x492787);}function s(_0x36a205,_0x4cf1c8){const _0x45f555=_0x24903e;if(o(_0x36a205)!='object'||!_0x36a205)return _0x36a205;var _0x5670bf=_0x36a205[Symbol[_0x45f555(0x16a)]];if(_0x5670bf!==void 0x0){var _0x4bba93=_0x5670bf['call'](_0x36a205,_0x4cf1c8||_0x45f555(0x196));if(o(_0x4bba93)!='object')return _0x4bba93;throw TypeError(_0x45f555(0x165));}return(_0x4cf1c8===_0x45f555(0x192)?String:Number)(_0x36a205);}function c(_0x4f62a9){var _0x1e7102=s(_0x4f62a9,'string');return o(_0x1e7102)=='symbol'?_0x1e7102:_0x1e7102+'';}function l(_0x54fb38,_0x1db326,_0x4d361b){const _0x5eb75a=_0x24903e;return(_0x1db326=c(_0x1db326))in _0x54fb38?Object[_0x5eb75a(0x1ad)](_0x54fb38,_0x1db326,{'value':_0x4d361b,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x54fb38[_0x1db326]=_0x4d361b,_0x54fb38;}var u=class extends n['FDocument']{constructor(..._0x14dd42){const _0x1393f1=_0x24903e;super(..._0x14dd42),l(this,_0x1393f1(0x188),void 0x0),l(this,_0x1393f1(0x19c),void 0x0),l(this,'_docsFormulaModel',void 0x0),l(this,_0x1393f1(0x19f),void 0x0);}[_0x24903e(0x17d)](_0x4d09ae){const _0x38efdd=_0x24903e;this[_0x38efdd(0x188)]=_0x4d09ae['get'](t[_0x38efdd(0x15a)]),this[_0x38efdd(0x19c)]=_0x4d09ae[_0x38efdd(0x177)](e[_0x38efdd(0x169)]),this[_0x38efdd(0x1a6)]=_0x4d09ae['get'](e[_0x38efdd(0x15e)]),this['_docsFormulaResourceLoaderService']=_0x4d09ae[_0x38efdd(0x177)](t[_0x38efdd(0x189)]);}[_0x24903e(0x1af)](){const _0x4f1ee8=_0x24903e;return this['_getCompleteRanges']()[_0x4f1ee8(0x167)](_0x21151b=>this[_0x4f1ee8(0x1a3)](_0x21151b[_0x4f1ee8(0x162)]));}[_0x24903e(0x171)](_0x2917b4){const _0x274dcf=_0x24903e;return this[_0x274dcf(0x154)]()[_0x274dcf(0x17c)](_0x133212=>_0x133212['rangeId']===_0x2917b4)?this[_0x274dcf(0x1a3)](_0x2917b4):null;}['getFormulaAt'](_0x15120f){const _0xea02cb=_0x24903e;let _0x108659=this[_0xea02cb(0x154)]()[_0xea02cb(0x183)](_0x122cd9=>_0x122cd9[_0xea02cb(0x160)]<=_0x15120f&&_0x15120f<=_0x122cd9[_0xea02cb(0x18e)]);return _0x108659?this[_0xea02cb(0x1a3)](_0x108659['rangeId']):null;}[_0x24903e(0x18d)](){const _0x24f9a1=_0x24903e;let _0x36c77f=this[_0x24f9a1(0x19f)][_0x24f9a1(0x190)](this['id']);if(!_0x36c77f)throw Error(_0x24f9a1(0x173)+this['id']+'\x20could\x20not\x20be\x20serialized.');return this[_0x24f9a1(0x19c)]['degradeDocumentData'](_0x36c77f);}[_0x24903e(0x16d)](_0x58ca1a){const _0x2a328d=_0x24903e;return this[_0x2a328d(0x15d)]({'externalReferences':_0x58ca1a[_0x2a328d(0x195)],'formula':_0x58ca1a[_0x2a328d(0x185)],'numberFormat':_0x58ca1a[_0x2a328d(0x198)],'target':{'type':'range','startOffset':_0x58ca1a[_0x2a328d(0x156)],'endOffset':_0x58ca1a[_0x2a328d(0x19a)]},'unitId':this[_0x2a328d(0x15b)]()});}[_0x24903e(0x15d)](_0x37fa7b){const _0x46f3ef=_0x24903e;let _0x1bb3c0=this['_docsFormulaCommandService'][_0x46f3ef(0x181)](e[_0x46f3ef(0x164)]['id'],_0x37fa7b);return _0x1bb3c0?this[_0x46f3ef(0x1a3)](_0x1bb3c0[_0x46f3ef(0x162)]):null;}[_0x24903e(0x154)](){const _0xa878b2=_0x24903e;var _0x38100d;let _0x12e213=this[_0xa878b2(0x1a6)][_0xa878b2(0x1af)](this[_0xa878b2(0x15b)]());return((_0x38100d=this[_0xa878b2(0x1ac)]('')[_0xa878b2(0x1a5)])==null?void 0x0:_0x38100d[_0xa878b2(0x186)](_0x443298=>(0x0,e['isDocFormulaRange'])(_0x443298)&&_0x12e213[_0x443298['rangeId']]!=null))??[];}[_0x24903e(0x1a3)](_0x13b817){const _0x2bf08a=_0x24903e;return this[_0x2bf08a(0x197)]['createInstance'](a,this['getId'](),_0x13b817);}};n['FDocument'][_0x24903e(0x1a9)](u);var d=class extends n[_0x24903e(0x15c)]{constructor(..._0xd2b29f){super(..._0xd2b29f),l(this,'_docsFormulaCommandService',void 0x0);}['_initialize'](_0x782ded){const _0x1a7c3b=_0x24903e;this[_0x1a7c3b(0x188)]=_0x782ded[_0x1a7c3b(0x177)](t['ICommandService']);}[_0x24903e(0x16d)](_0x39a040,_0xf1d665,_0xc3d07f={}){return this['_insert'](_0x39a040,_0xf1d665,_0xc3d07f);}['appendFormula'](_0x1f6028,_0x14b553={}){const _0x585f19=_0x24903e;return this[_0x585f19(0x15d)](_0x585f19(0x1a0),_0x1f6028,_0x14b553);}[_0x24903e(0x15d)](_0xbc931b,_0x4639b6,_0x5efe3b){const _0x1621c0=_0x24903e;if(this[_0x1621c0(0x175)]())return null;let _0x488fc8={'externalReferences':_0x5efe3b['externalReferences'],'formula':_0x4639b6,'numberFormat':_0x5efe3b['numberFormat'],'target':{'type':_0x1621c0(0x1a2),'paragraphId':this[_0x1621c0(0x15b)](),'position':_0xbc931b},'unitId':this[_0x1621c0(0x157)]['getId']()},_0x27328b=this[_0x1621c0(0x188)][_0x1621c0(0x181)](e[_0x1621c0(0x164)]['id'],_0x488fc8);return _0x27328b?this['_injector']['createInstance'](a,this[_0x1621c0(0x157)]['getId'](),_0x27328b[_0x1621c0(0x162)]):null;}};n[_0x24903e(0x15c)][_0x24903e(0x1a9)](d);var f=class extends n[_0x24903e(0x163)]{constructor(..._0x34b9ac){const _0x21a311=_0x24903e;super(..._0x34b9ac),l(this,_0x21a311(0x188),void 0x0);}[_0x24903e(0x17d)](_0x2f8de4){this['_docsFormulaCommandService']=_0x2f8de4['get'](t['ICommandService']);}[_0x24903e(0x15f)](_0x1294ad,_0x2b6779={}){const _0x795b34=_0x24903e;let {endOffset:_0x1bd6e2,segmentId:_0x1d30cf,startOffset:_0x57a99b}=this[_0x795b34(0x19b)]();return _0x1d30cf?null:this[_0x795b34(0x15d)](_0x57a99b,_0x1bd6e2,_0x1294ad,_0x2b6779);}['_insert'](_0x2ed22c,_0x216498,_0x1e36bb,_0x45c8a4){const _0x2a4056=_0x24903e;let _0x20c008={'externalReferences':_0x45c8a4['externalReferences'],'formula':_0x1e36bb,'numberFormat':_0x45c8a4[_0x2a4056(0x198)],'target':{'type':_0x2a4056(0x178),'startOffset':_0x2ed22c,'endOffset':_0x216498},'unitId':this[_0x2a4056(0x157)][_0x2a4056(0x15b)]()},_0x43bbb4=this[_0x2a4056(0x188)][_0x2a4056(0x181)](e[_0x2a4056(0x164)]['id'],_0x20c008);return _0x43bbb4?this['_injector'][_0x2a4056(0x159)](a,this[_0x2a4056(0x157)][_0x2a4056(0x15b)](),_0x43bbb4[_0x2a4056(0x162)]):null;}};function _0x54c1(_0x554669,_0x589bf7){_0x554669=_0x554669-0x154;const _0x4c32b2=_0x4c32();let _0x54c160=_0x4c32b2[_0x554669];return _0x54c160;}n[_0x24903e(0x163)]['extend'](f),Object[_0x24903e(0x1ad)](exports,_0x24903e(0x17f),{'enumerable':!0x0,'get':function(){return a;}});
1
+ const _0x3617b1=_0x864f;(function(_0x55025d,_0x252a1a){const _0x424668=_0x864f,_0x15fec7=_0x55025d();while(!![]){try{const _0x36db13=parseInt(_0x424668(0x1d6))/0x1+parseInt(_0x424668(0x1c2))/0x2+parseInt(_0x424668(0x1b7))/0x3*(parseInt(_0x424668(0x1a9))/0x4)+-parseInt(_0x424668(0x1a3))/0x5+parseInt(_0x424668(0x1b2))/0x6+-parseInt(_0x424668(0x19d))/0x7*(parseInt(_0x424668(0x1cf))/0x8)+-parseInt(_0x424668(0x1dc))/0x9;if(_0x36db13===_0x252a1a)break;else _0x15fec7['push'](_0x15fec7['shift']());}catch(_0x478d86){_0x15fec7['push'](_0x15fec7['shift']());}}}(_0x5da3,0xa9e91),Object[_0x3617b1(0x1ac)](exports,Symbol[_0x3617b1(0x1bc)],{'value':_0x3617b1(0x193)}));let e=require('@univerjs-pro/docs-formula'),t=require('@univerjs/core'),n=require('@univerjs/docs/facade');function _0x864f(_0x106c79,_0x3e3d0c){_0x106c79=_0x106c79-0x18a;const _0x5da3b5=_0x5da3();let _0x864f2b=_0x5da3b5[_0x106c79];return _0x864f2b;}function r(_0x329875,_0x3e7810){return function(_0x3eb7ed,_0x228124){_0x3e7810(_0x3eb7ed,_0x228124,_0x329875);};}function i(_0x14a0bf,_0x1ab442,_0x548fbf,_0x110c19){const _0x3e8fc1=_0x3617b1;var _0x1aee8c=arguments[_0x3e8fc1(0x1e2)],_0x31b1c3=_0x1aee8c<0x3?_0x1ab442:_0x110c19===null?_0x110c19=Object['getOwnPropertyDescriptor'](_0x1ab442,_0x548fbf):_0x110c19,_0x2ed32f;if(typeof Reflect==_0x3e8fc1(0x192)&&typeof Reflect[_0x3e8fc1(0x1c9)]==_0x3e8fc1(0x19e))_0x31b1c3=Reflect['decorate'](_0x14a0bf,_0x1ab442,_0x548fbf,_0x110c19);else{for(var _0x50d1f7=_0x14a0bf[_0x3e8fc1(0x1e2)]-0x1;_0x50d1f7>=0x0;_0x50d1f7--)(_0x2ed32f=_0x14a0bf[_0x50d1f7])&&(_0x31b1c3=(_0x1aee8c<0x3?_0x2ed32f(_0x31b1c3):_0x1aee8c>0x3?_0x2ed32f(_0x1ab442,_0x548fbf,_0x31b1c3):_0x2ed32f(_0x1ab442,_0x548fbf))||_0x31b1c3);}return _0x1aee8c>0x3&&_0x31b1c3&&Object[_0x3e8fc1(0x1ac)](_0x1ab442,_0x548fbf,_0x31b1c3),_0x31b1c3;}let a=class{constructor(_0x16a283,_0xa8f61f,_0x18d708,_0x11d7d3,_0x2dc8b8,_0x59a17c){const _0x5e6fe8=_0x3617b1;this['_unitId']=_0x16a283,this['_rangeId']=_0xa8f61f,this[_0x5e6fe8(0x197)]=_0x18d708,this[_0x5e6fe8(0x1a6)]=_0x11d7d3,this['_service']=_0x2dc8b8,this[_0x5e6fe8(0x1c6)]=_0x59a17c;}['getId'](){const _0x21a1d0=_0x3617b1;return this[_0x21a1d0(0x1cd)];}[_0x3617b1(0x1a8)](){const _0x45f24d=_0x3617b1;let _0x1ce2e7=this[_0x45f24d(0x1d2)]();return _0x1ce2e7?{'endOffset':_0x1ce2e7[_0x45f24d(0x1a2)]+0x1,'rangeId':_0x1ce2e7[_0x45f24d(0x1e0)],'startOffset':_0x1ce2e7[_0x45f24d(0x1c0)]}:null;}['getFormula'](){const _0x363ceb=_0x3617b1;var _0x1da745;return((_0x1da745=this[_0x363ceb(0x1a6)][_0x363ceb(0x1b9)](this['_unitId'],this[_0x363ceb(0x1cd)]))==null?void 0x0:_0x1da745['formula'])??'';}[_0x3617b1(0x1c5)](){const _0xab2613=_0x3617b1;return this[_0xab2613(0x1a6)][_0xab2613(0x1b9)](this['_unitId'],this[_0xab2613(0x1cd)])??null;}['getResult'](){const _0x5ca197=_0x3617b1;return this[_0x5ca197(0x1ab)][_0x5ca197(0x1a7)]({'unitId':this['_unitId'],'rangeId':this[_0x5ca197(0x1cd)]})??null;}[_0x3617b1(0x1df)](){const _0x332b2b=_0x3617b1;let _0x33bba2=this[_0x332b2b(0x1a8)](),_0x170e30=this[_0x332b2b(0x1c5)](),_0xb81b4d=this[_0x332b2b(0x1a7)]();return!_0x33bba2||!_0x170e30||!_0xb81b4d?null:{..._0x33bba2,'config':_0x170e30,'formula':_0x170e30['formula'],'result':_0xb81b4d,'type':_0x332b2b(0x1db)};}['update'](_0x40ec96){const _0x8384c4=_0x3617b1;return this[_0x8384c4(0x197)][_0x8384c4(0x1c8)](e[_0x8384c4(0x1ae)]['id'],{'externalReferences':_0x40ec96['externalReferences'],'formula':_0x40ec96[_0x8384c4(0x1db)],'numberFormat':_0x40ec96[_0x8384c4(0x1ce)],'rangeId':this[_0x8384c4(0x1cd)],'unitId':this[_0x8384c4(0x1a0)]});}[_0x3617b1(0x1ad)](_0x4c516f){const _0x1c4bfd=_0x3617b1;return this[_0x1c4bfd(0x197)]['syncExecuteCommand'](e[_0x1c4bfd(0x1c4)]['id'],{'numberFormat':_0x4c516f,'rangeId':this['_rangeId'],'unitId':this[_0x1c4bfd(0x1a0)]});}[_0x3617b1(0x1b1)](){const _0x379059=_0x3617b1;return this[_0x379059(0x197)][_0x379059(0x1c8)](e[_0x379059(0x199)]['id'],{'rangeId':this['_rangeId'],'unitId':this[_0x379059(0x1a0)]});}['replaceWithText'](_0x16de30){const _0x49b723=_0x3617b1;return this[_0x49b723(0x197)][_0x49b723(0x1c8)](e[_0x49b723(0x1ca)]['id'],{'rangeId':this[_0x49b723(0x1cd)],'text':_0x16de30,'unitId':this['_unitId']});}[_0x3617b1(0x1d8)](){const _0x42abf4=_0x3617b1;return this[_0x42abf4(0x197)][_0x42abf4(0x1c8)](e[_0x42abf4(0x1d4)]['id'],{'rangeId':this[_0x42abf4(0x1cd)],'unitId':this['_unitId']});}[_0x3617b1(0x1d2)](){const _0x36fc41=_0x3617b1;var _0x101c79;let _0x28681=this[_0x36fc41(0x1c6)][_0x36fc41(0x1b3)](this[_0x36fc41(0x1a0)],t['UniverInstanceType']['UNIVER_DOC']);return _0x28681==null||(_0x101c79=_0x28681[_0x36fc41(0x1d1)]()[_0x36fc41(0x1d5)])==null||(_0x101c79=_0x101c79['customRanges'])==null?void 0x0:_0x101c79[_0x36fc41(0x1be)](_0x150fe9=>_0x150fe9[_0x36fc41(0x1e0)]===this[_0x36fc41(0x1cd)]&&(0x0,e[_0x36fc41(0x1dd)])(_0x150fe9));}};a=i([r(0x2,t[_0x3617b1(0x1aa)]),r(0x3,(0x0,t['Inject'])(e[_0x3617b1(0x1b4)])),r(0x4,(0x0,t[_0x3617b1(0x191)])(e[_0x3617b1(0x19a)])),r(0x5,t[_0x3617b1(0x1d3)])],a);function o(_0x14a26b){'@babel/helpers - typeof';const _0x538487=_0x3617b1;return o=typeof Symbol==_0x538487(0x19e)&&typeof Symbol[_0x538487(0x1af)]==_0x538487(0x190)?function(_0x2c8783){return typeof _0x2c8783;}:function(_0x1e04cc){const _0x5c8584=_0x538487;return _0x1e04cc&&typeof Symbol==_0x5c8584(0x19e)&&_0x1e04cc[_0x5c8584(0x1a4)]===Symbol&&_0x1e04cc!==Symbol[_0x5c8584(0x19c)]?_0x5c8584(0x190):typeof _0x1e04cc;},o(_0x14a26b);}function s(_0x20813e,_0x46d305){const _0x33625a=_0x3617b1;if(o(_0x20813e)!=_0x33625a(0x192)||!_0x20813e)return _0x20813e;var _0x6b3902=_0x20813e[Symbol['toPrimitive']];if(_0x6b3902!==void 0x0){var _0x35f7a8=_0x6b3902['call'](_0x20813e,_0x46d305||_0x33625a(0x1b6));if(o(_0x35f7a8)!=_0x33625a(0x192))return _0x35f7a8;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x46d305===_0x33625a(0x1ba)?String:Number)(_0x20813e);}function c(_0x11762f){const _0x2dc5d5=_0x3617b1;var _0x2cae8e=s(_0x11762f,'string');return o(_0x2cae8e)==_0x2dc5d5(0x190)?_0x2cae8e:_0x2cae8e+'';}function l(_0x2c248e,_0x535a47,_0x5be253){const _0x2ad50f=_0x3617b1;return(_0x535a47=c(_0x535a47))in _0x2c248e?Object[_0x2ad50f(0x1ac)](_0x2c248e,_0x535a47,{'value':_0x5be253,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x2c248e[_0x535a47]=_0x5be253,_0x2c248e;}var u=class extends n[_0x3617b1(0x1bf)]{constructor(..._0x2f585c){const _0x57eba2=_0x3617b1;super(..._0x2f585c),l(this,_0x57eba2(0x196),void 0x0),l(this,'_docsFormulaDisplayTextService',void 0x0),l(this,'_docsFormulaModel',void 0x0),l(this,'_docsFormulaResourceLoaderService',void 0x0);}[_0x3617b1(0x198)](_0x44bb84){const _0x40c20d=_0x3617b1;this[_0x40c20d(0x196)]=_0x44bb84['get'](t['ICommandService']),this['_docsFormulaDisplayTextService']=_0x44bb84[_0x40c20d(0x1da)](e[_0x40c20d(0x1e3)]),this[_0x40c20d(0x1a5)]=_0x44bb84[_0x40c20d(0x1da)](e[_0x40c20d(0x1b4)]),this[_0x40c20d(0x1a1)]=_0x44bb84[_0x40c20d(0x1da)](t['IResourceLoaderService']);}[_0x3617b1(0x19f)](){const _0x33a947=_0x3617b1;return this[_0x33a947(0x1bb)]()[_0x33a947(0x1e1)](_0x59a18f=>this[_0x33a947(0x18f)](_0x59a18f[_0x33a947(0x1e0)]));}[_0x3617b1(0x1b9)](_0x5a11cf){const _0xef22f1=_0x3617b1;return this[_0xef22f1(0x1bb)]()[_0xef22f1(0x1e5)](_0x4e53f3=>_0x4e53f3['rangeId']===_0x5a11cf)?this[_0xef22f1(0x18f)](_0x5a11cf):null;}['getFormulaAt'](_0x1020d9){const _0x9928a2=_0x3617b1;let _0x4ffa4e=this[_0x9928a2(0x1bb)]()['find'](_0x524f67=>_0x524f67['startIndex']<=_0x1020d9&&_0x1020d9<=_0x524f67[_0x9928a2(0x1a2)]);return _0x4ffa4e?this[_0x9928a2(0x18f)](_0x4ffa4e[_0x9928a2(0x1e0)]):null;}['saveFormulaDisplayTextSnapshot'](){const _0x3d3dc8=_0x3617b1;let _0x2ca50f=this[_0x3d3dc8(0x1a1)]['saveUnit'](this['id']);if(!_0x2ca50f)throw Error(_0x3d3dc8(0x1e4)+this['id']+_0x3d3dc8(0x18c));return this[_0x3d3dc8(0x18d)][_0x3d3dc8(0x1de)](_0x2ca50f);}['insertFormula'](_0x9c0d42){const _0x3f69c4=_0x3617b1;return this[_0x3f69c4(0x1d0)]({'externalReferences':_0x9c0d42['externalReferences'],'formula':_0x9c0d42[_0x3f69c4(0x1db)],'numberFormat':_0x9c0d42[_0x3f69c4(0x1ce)],'target':{'type':'range','startOffset':_0x9c0d42['startOffset'],'endOffset':_0x9c0d42[_0x3f69c4(0x1cc)]},'unitId':this[_0x3f69c4(0x1c7)]()});}[_0x3617b1(0x1d0)](_0x329841){const _0x37017e=_0x3617b1;let _0x2a9d70=this[_0x37017e(0x196)]['syncExecuteCommand'](e[_0x37017e(0x1c3)]['id'],_0x329841);return _0x2a9d70?this[_0x37017e(0x18f)](_0x2a9d70['rangeId']):null;}[_0x3617b1(0x1bb)](){const _0x4cb166=_0x3617b1;var _0x30c8b2;let _0x3e5f71=this['_docsFormulaModel'][_0x4cb166(0x19f)](this[_0x4cb166(0x1c7)]());return((_0x30c8b2=this[_0x4cb166(0x1b5)]('')['customRanges'])==null?void 0x0:_0x30c8b2[_0x4cb166(0x1b8)](_0x3902c2=>(0x0,e[_0x4cb166(0x1dd)])(_0x3902c2)&&_0x3e5f71[_0x3902c2['rangeId']]!=null))??[];}[_0x3617b1(0x18f)](_0x252c95){const _0xcd600a=_0x3617b1;return this[_0xcd600a(0x1c1)][_0xcd600a(0x1cb)](a,this[_0xcd600a(0x1c7)](),_0x252c95);}};n[_0x3617b1(0x1bf)][_0x3617b1(0x1b0)](u);var d=class extends n[_0x3617b1(0x18e)]{constructor(..._0x57a73f){const _0x5b3d85=_0x3617b1;super(..._0x57a73f),l(this,_0x5b3d85(0x196),void 0x0);}[_0x3617b1(0x198)](_0x208a65){const _0x24749d=_0x3617b1;this[_0x24749d(0x196)]=_0x208a65[_0x24749d(0x1da)](t[_0x24749d(0x1aa)]);}[_0x3617b1(0x1bd)](_0x5a1269,_0x5030e6,_0x2deb8e={}){const _0x1ae5b9=_0x3617b1;return this[_0x1ae5b9(0x1d0)](_0x5a1269,_0x5030e6,_0x2deb8e);}[_0x3617b1(0x195)](_0x2aa429,_0x5f1748={}){const _0x154e68=_0x3617b1;return this[_0x154e68(0x1d0)](_0x154e68(0x1d9),_0x2aa429,_0x5f1748);}[_0x3617b1(0x1d0)](_0xbcf0b8,_0x1064f1,_0x2af73a){const _0xc88842=_0x3617b1;if(this[_0xc88842(0x194)]())return null;let _0xb6b11a={'externalReferences':_0x2af73a[_0xc88842(0x18b)],'formula':_0x1064f1,'numberFormat':_0x2af73a['numberFormat'],'target':{'type':'paragraph','paragraphId':this[_0xc88842(0x1c7)](),'position':_0xbcf0b8},'unitId':this['_document'][_0xc88842(0x1c7)]()},_0x263918=this[_0xc88842(0x196)][_0xc88842(0x1c8)](e[_0xc88842(0x1c3)]['id'],_0xb6b11a);return _0x263918?this['_injector'][_0xc88842(0x1cb)](a,this[_0xc88842(0x1d7)]['getId'](),_0x263918[_0xc88842(0x1e0)]):null;}};n[_0x3617b1(0x18e)][_0x3617b1(0x1b0)](d);var f=class extends n[_0x3617b1(0x19b)]{constructor(..._0xcf07ac){super(..._0xcf07ac),l(this,'_docsFormulaCommandService',void 0x0);}[_0x3617b1(0x198)](_0x1f3680){const _0x3995b1=_0x3617b1;this[_0x3995b1(0x196)]=_0x1f3680[_0x3995b1(0x1da)](t[_0x3995b1(0x1aa)]);}[_0x3617b1(0x18a)](_0x28dea5,_0x514ddb={}){const _0x30535a=_0x3617b1;let {endOffset:_0x268b7f,segmentId:_0x21945e,startOffset:_0x15b996}=this[_0x30535a(0x1a8)]();return _0x21945e?null:this['_insert'](_0x15b996,_0x268b7f,_0x28dea5,_0x514ddb);}[_0x3617b1(0x1d0)](_0x5a3526,_0x433ba6,_0x33aff0,_0x1044ce){const _0x1d44e8=_0x3617b1;let _0x57a768={'externalReferences':_0x1044ce[_0x1d44e8(0x18b)],'formula':_0x33aff0,'numberFormat':_0x1044ce[_0x1d44e8(0x1ce)],'target':{'type':'range','startOffset':_0x5a3526,'endOffset':_0x433ba6},'unitId':this['_document'][_0x1d44e8(0x1c7)]()},_0x358b98=this[_0x1d44e8(0x196)][_0x1d44e8(0x1c8)](e[_0x1d44e8(0x1c3)]['id'],_0x57a768);return _0x358b98?this[_0x1d44e8(0x1c1)][_0x1d44e8(0x1cb)](a,this[_0x1d44e8(0x1d7)][_0x1d44e8(0x1c7)](),_0x358b98[_0x1d44e8(0x1e0)]):null;}};function _0x5da3(){const _0x48a75b=['_getCustomRange','IUniverInstanceService','ConvertDocFormulaToTextCommand','body','764458oFuijQ','_document','convertToText','end','get','formula','9921537mODWpM','isDocFormulaRange','degradeDocumentData','describe','rangeId','map','length','DocFormulaDisplayTextService','Document\x20','some','replaceWithFormula','externalReferences','\x20could\x20not\x20be\x20serialized.','_docsFormulaDisplayTextService','FDocumentParagraph','_createFormula','symbol','Inject','object','Module','getSegmentId','appendFormula','_docsFormulaCommandService','_commandService','_initialize','RemoveDocFormulaCommand','DocFormulaService','FDocumentTextRange','prototype','228557FMKfXb','function','getFormulas','_unitId','_docsFormulaResourceLoaderService','endIndex','4326880HIWirr','constructor','_docsFormulaModel','_model','getResult','getRange','427436NTEYzw','ICommandService','_service','defineProperty','setNumberFormat','UpdateDocFormulaCommand','iterator','extend','remove','7218504pukdhv','getUnit','DocFormulaModel','getBody','default','30oAaGHV','filter','getFormula','string','_getCompleteRanges','toStringTag','insertFormula','find','FDocument','startIndex','_injector','365314MmXufg','InsertDocFormulaCommand','SetDocFormulaNumberFormatCommand','getConfig','_univerInstanceService','getId','syncExecuteCommand','decorate','ReplaceDocFormulaWithTextCommand','createInstance','endOffset','_rangeId','numberFormat','136aQsIZx','_insert','getSnapshot'];_0x5da3=function(){return _0x48a75b;};return _0x5da3();}n[_0x3617b1(0x19b)][_0x3617b1(0x1b0)](f),Object[_0x3617b1(0x1ac)](exports,'FDocumentFormula',{'enumerable':!0x0,'get':function(){return a;}});
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- const _0x540782=_0x16e3;(function(_0x216fec,_0x5be140){const _0x32d33d=_0x16e3,_0x35fb6d=_0x216fec();while(!![]){try{const _0x3ec216=parseInt(_0x32d33d(0x30a))/0x1+-parseInt(_0x32d33d(0x2ef))/0x2+-parseInt(_0x32d33d(0x1ee))/0x3+-parseInt(_0x32d33d(0x25d))/0x4*(parseInt(_0x32d33d(0x2ce))/0x5)+parseInt(_0x32d33d(0x2ad))/0x6+-parseInt(_0x32d33d(0x1f4))/0x7+parseInt(_0x32d33d(0x265))/0x8;if(_0x3ec216===_0x5be140)break;else _0x35fb6d['push'](_0x35fb6d['shift']());}catch(_0x45d9e0){_0x35fb6d['push'](_0x35fb6d['shift']());}}}(_0x5127,0x73f4e),Object[_0x540782(0x2bc)](exports,Symbol['toStringTag'],{'value':'Module'}));let e=require('@univerjs-pro/engine-formula'),t=require('@univerjs/core'),n=require('@univerjs/docs'),r=require('@univerjs/engine-formula'),i=require('rxjs'),a=require('@univerjs-pro/license');const o=_0x540782(0x310),s=_0x540782(0x29a);function c(){return{'schemaVersion':0x1,'formulas':{}};}function l(_0x324917){const _0x1aaae7=_0x540782;return!_0x324917||typeof _0x324917!=_0x1aaae7(0x23f)||!f(_0x324917,[_0x1aaae7(0x328),_0x1aaae7(0x2c9)])||!(_0x1aaae7(0x328)in _0x324917)||_0x324917[_0x1aaae7(0x328)]!==0x1||!(_0x1aaae7(0x2c9)in _0x324917)||!_0x324917[_0x1aaae7(0x2c9)]||typeof _0x324917['formulas']!=_0x1aaae7(0x23f)||Array[_0x1aaae7(0x231)](_0x324917[_0x1aaae7(0x2c9)])?!0x1:Object['entries'](_0x324917[_0x1aaae7(0x2c9)])[_0x1aaae7(0x22b)](([_0x516697,_0x3f85ca])=>_0x516697[_0x1aaae7(0x1eb)]>0x0&&u(_0x3f85ca));}function u(_0x4fc1a1){const _0x8c88ad=_0x540782;return!_0x4fc1a1||typeof _0x4fc1a1!='object'||!f(_0x4fc1a1,[_0x8c88ad(0x315),_0x8c88ad(0x281),_0x8c88ad(0x28e)])||!(_0x8c88ad(0x315)in _0x4fc1a1)||typeof _0x4fc1a1['formula']!=_0x8c88ad(0x298)||!_0x4fc1a1['formula'][_0x8c88ad(0x271)]()||_0x8c88ad(0x281)in _0x4fc1a1&&_0x4fc1a1['numberFormat']!=null&&(typeof _0x4fc1a1[_0x8c88ad(0x281)]!=_0x8c88ad(0x23f)||!f(_0x4fc1a1[_0x8c88ad(0x281)],[_0x8c88ad(0x2a1)])||!(_0x8c88ad(0x2a1)in _0x4fc1a1[_0x8c88ad(0x281)])||typeof _0x4fc1a1['numberFormat']['pattern']!=_0x8c88ad(0x298))?!0x1:!(_0x8c88ad(0x28e)in _0x4fc1a1)||_0x4fc1a1[_0x8c88ad(0x28e)]==null||d(_0x4fc1a1[_0x8c88ad(0x28e)]);}function d(_0x10d67e){const _0x582902=_0x540782;return!_0x10d67e||typeof _0x10d67e!=_0x582902(0x23f)||!f(_0x10d67e,['v','t',_0x582902(0x2a1)])||!('v'in _0x10d67e)||_0x10d67e['v']!==null&&typeof _0x10d67e['v']!='string'&&typeof _0x10d67e['v']!=_0x582902(0x313)&&typeof _0x10d67e['v']!=_0x582902(0x2f1)||'t'in _0x10d67e&&_0x10d67e['t']!=null&&!ee(_0x10d67e['t'])?!0x1:!(_0x582902(0x2a1)in _0x10d67e)||_0x10d67e['pattern']==null||typeof _0x10d67e['pattern']=='string';}function f(_0x14d0f9,_0x1fb5f3){const _0x2de963=_0x540782;let _0x1c35c4=new Set(_0x1fb5f3);return Object['keys'](_0x14d0f9)[_0x2de963(0x22b)](_0x40c7ea=>_0x1c35c4[_0x2de963(0x2c2)](_0x40c7ea));}function ee(_0x552164){const _0x24267f=_0x540782;return typeof _0x552164==_0x24267f(0x313)&&Object[_0x24267f(0x317)](t[_0x24267f(0x2f8)])[_0x24267f(0x31d)](_0x552164);}const p=new Set([t['DataStreamTreeTokenType'][_0x540782(0x244)],t[_0x540782(0x32a)][_0x540782(0x227)],t[_0x540782(0x32a)]['TABLE_ROW_START'],t[_0x540782(0x32a)][_0x540782(0x20f)],t[_0x540782(0x32a)][_0x540782(0x26f)],t[_0x540782(0x32a)][_0x540782(0x285)],t[_0x540782(0x32a)]['TABLE_END'],t['DataStreamTreeTokenType'][_0x540782(0x278)],t[_0x540782(0x32a)][_0x540782(0x2af)],t[_0x540782(0x32a)][_0x540782(0x2ea)],t[_0x540782(0x32a)][_0x540782(0x329)],t[_0x540782(0x32a)][_0x540782(0x255)],t[_0x540782(0x32a)][_0x540782(0x252)],t[_0x540782(0x32a)][_0x540782(0x2fd)]]);var m=class extends Error{constructor(){const _0x3856bf=_0x540782;super(_0x3856bf(0x2b6));}};function te(_0x578374){const _0x3a7ad4=_0x540782;var _0x18ada5,_0x566bdf;let _0x567599=t[_0x3a7ad4(0x309)][_0x3a7ad4(0x259)](_0x578374['documentData']),_0x5b96d5=T(_0x567599),{startOffset:_0x30edfe,endOffset:_0x2cd19e}=oe(_0x5b96d5,_0x578374[_0x3a7ad4(0x23d)],_0x578374[_0x3a7ad4(0x275)]);ie(_0x5b96d5,_0x30edfe,_0x2cd19e);let _0x55ffee=((_0x18ada5=_0x5b96d5[_0x3a7ad4(0x21d)])==null?void 0x0:_0x18ada5[_0x3a7ad4(0x2a9)](_0x54947f=>{const _0x23736a=_0x3a7ad4;if(!g(_0x54947f))return!0x1;let _0x520e59=(0x0,t['getCustomRangeInterval'])(_0x54947f);return _0x520e59['endOffset']>_0x30edfe&&_0x520e59[_0x23736a(0x23d)]<_0x2cd19e;})[_0x3a7ad4(0x1f3)](_0x277c0f=>_0x277c0f[_0x3a7ad4(0x270)]))??[];ce(_0x5b96d5,_0x30edfe,_0x2cd19e,''),_0x5b96d5[_0x3a7ad4(0x21d)]=[...((_0x566bdf=_0x5b96d5[_0x3a7ad4(0x21d)])==null?void 0x0:_0x566bdf[_0x3a7ad4(0x2a9)](_0x51298b=>!_0x55ffee[_0x3a7ad4(0x31d)](_0x51298b['rangeId'])&&_0x51298b['rangeId']!==_0x578374[_0x3a7ad4(0x270)]))??[],ae(_0x578374[_0x3a7ad4(0x270)],_0x30edfe)][_0x3a7ad4(0x2f3)]((_0x4612a9,_0x4ca24c)=>_0x4612a9[_0x3a7ad4(0x312)]-_0x4ca24c['startIndex']);let _0x16008f=v(_0x578374[_0x3a7ad4(0x2cf)]);return _0x55ffee[_0x3a7ad4(0x32f)](_0x2eb714=>{const _0x2d0201=_0x3a7ad4;delete _0x16008f[_0x2d0201(0x2c9)][_0x2eb714];}),_0x16008f[_0x3a7ad4(0x2c9)][_0x578374[_0x3a7ad4(0x270)]]=t[_0x3a7ad4(0x309)][_0x3a7ad4(0x259)](_0x578374[_0x3a7ad4(0x273)]),{'nextDocumentData':_0x567599,'nextResource':_0x16008f,'cursorOffset':_0x30edfe+0x1};}function ne(_0x19a1cd){const _0x4466de=_0x540782;var _0x6d9f87,_0x583fe4;let _0x3a9577=t[_0x4466de(0x309)]['deepClone'](_0x19a1cd[_0x4466de(0x2cb)]),_0x2a552f=(_0x6d9f87=T(_0x3a9577)[_0x4466de(0x21d)])==null?void 0x0:_0x6d9f87[_0x4466de(0x217)](_0x195972=>_0x195972[_0x4466de(0x270)]===_0x19a1cd[_0x4466de(0x270)]&&g(_0x195972));if(!_0x2a552f||!((_0x583fe4=_0x19a1cd[_0x4466de(0x2cf)])!=null&&_0x583fe4[_0x4466de(0x2c9)][_0x19a1cd[_0x4466de(0x270)]]))return null;let _0x1e0522=v(_0x19a1cd[_0x4466de(0x2cf)]);return _0x1e0522[_0x4466de(0x2c9)][_0x19a1cd['rangeId']]=t[_0x4466de(0x309)][_0x4466de(0x259)](_0x19a1cd['config']),{'nextDocumentData':_0x3a9577,'nextResource':_0x1e0522,'cursorOffset':_0x2a552f[_0x4466de(0x29f)]+0x1};}function h(_0x33615b){const _0x30a851=_0x540782;let _0x579a10=t[_0x30a851(0x309)]['deepClone'](_0x33615b[_0x30a851(0x2cb)]),_0x5d6e65=le(_0x579a10,_0x33615b[_0x30a851(0x270)],_0x33615b['text']??'');if(_0x5d6e65==null)return null;let _0x431bd0=v(_0x33615b[_0x30a851(0x2cf)]);return delete _0x431bd0[_0x30a851(0x2c9)][_0x33615b[_0x30a851(0x270)]],{'nextDocumentData':_0x579a10,'nextResource':_0x431bd0,'cursorOffset':_0x5d6e65};}function re(_0x5c5889,_0x124ed5){const _0x2b96f3=_0x540782;var _0x30f751;let _0x229a12=t[_0x2b96f3(0x309)]['deepClone'](_0x5c5889),_0x169393=_0x229a12[_0x2b96f3(0x2b7)];if(!_0x169393)return _0x229a12;let _0x17053b=new Map(_0x124ed5[_0x2b96f3(0x1f3)](_0x4e4c1f=>[_0x4e4c1f[_0x2b96f3(0x270)],_0x4e4c1f[_0x2b96f3(0x24a)]])),_0x47ba2f=((_0x30f751=_0x169393[_0x2b96f3(0x21d)])==null?void 0x0:_0x30f751[_0x2b96f3(0x2a9)](_0x39f297=>g(_0x39f297)&&_0x17053b[_0x2b96f3(0x2c2)](_0x39f297[_0x2b96f3(0x270)]))[_0x2b96f3(0x2f3)]((_0x2749b8,_0x48279c)=>_0x48279c[_0x2b96f3(0x312)]-_0x2749b8['startIndex']))??[];for(let _0x10840d of _0x47ba2f)le(_0x229a12,_0x10840d[_0x2b96f3(0x270)],_0x17053b[_0x2b96f3(0x291)](_0x10840d['rangeId'])??'');return _0x229a12;}function g(_0x45bf5d){const _0x7b9a2d=_0x540782;var _0x410eb9;return(_0x45bf5d==null?void 0x0:_0x45bf5d[_0x7b9a2d(0x224)])===t[_0x7b9a2d(0x22d)]['CUSTOM']&&_0x45bf5d[_0x7b9a2d(0x2ba)]===!0x0&&((_0x410eb9=_0x45bf5d[_0x7b9a2d(0x27a)])==null?void 0x0:_0x410eb9[_0x7b9a2d(0x210)])===_0x7b9a2d(0x29a);}function _0x5127(){const _0x1cbe35=['clear','ERROR','docs-formula.command.insert','call','Disposable','FormulaLastValuePersistenceService','getResource','textRuns','insert','Tools','162348qxYjjs','status','degradeDocumentData','range','redoMutation','start','DOC_FORMULA_PLUGIN','registerFormulaWithRange','startIndex','number','createEmptyDocFormulaResource','formula','docs-formula.command.set-number-format','values','ConvertDocFormulaToTextCommand','getScalarFormulaResultCell','DocFormulaDisplayTextService','SetDocFormulaMutation','load','includes','syncUnit','_docFormulaModel','ReplaceDocFormulaWithTextCommand','SetDocFormulaResourceMutation','from','_rawResources','toPrimitive','getSnapshot','DependentOn','source','schemaVersion','COLUMN_GROUP_END','DataStreamTreeTokenType','MUTATION','type','isDocFormulaResource','_syncScheduled','forEach','max','length','Injector','externalMutations','1841517ZuDbSP','referenceRevision','symbol','RemoveDocFormulaCommand','CommandType','map','3947601pUbIOm','getPresentation','_config','startsWith','docs-formula.config','IConfigService','eligible','getCurrentUnitOfType','complete','_loadErrors','onStarting','expectedFormula','invalid-resource','getUnitId','name','DOC_FORMULA_CUSTOM_RANGE_KIND','dispose','stale','columnGroups','stringify','nextDocumentData','collectFormulaExternalReferenceQualifiers','docs-formula.command.update','function','serialize','DocFormulaModel','buildUpsertHostExternalReferenceMutations','TABLE_CELL_START','kind','DocFormulaResourceController','references','delete','shiftInclusiveRangeOnDelete','JSONX','isInteger','find','Inject','docs-formula.command.convert-to-text','subscribe','UniverLicensePlugin','_deleteRegistration','customRanges','nextResource','DOC','docs-formula.command.remove','isFormulaLastValue','target','shiftInclusiveRangeOnInsert','rangeType','InvalidDocFormulaInsertRangeError','updates','TABLE_START','IUniverInstanceService','cursorOffset','shiftExclusiveRangeOnInsert','every','getRevision','CustomRangeType','getParagraphContentStartOffset','deleteLength','_cacheEligibilityService','isArray','UniverInstanceType','empty','decorate','unregisterUnit','resolveFormula','_commandService','1.2.0','expectedNumberFormat','resolved','slice','_model','startOffset','setConfig','object','_resources','iterator','UniverDocsPlugin','_resourceManagerService','SECTION_BREAK','EMPTY','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','HostExternalReferenceModel','_hostExternalReferenceModel','unitId','text','endsWith','add','DocSelectionManagerService','documentRedo','_univerInstanceService','previousDocumentData','_setPresentation','BLOCK_END','assess','end','BLOCK_START','externalReferences','getAllUnitsForType','entries','deepClone','docs-formula.mutation.set-last-values','change$','generateRandomId','3194372mKCKvX','getResult','editOp','identity','presentationChanged$','RichTextEditingMutation','formulaId','_updateFormulaResult','20068744vtTuUH','some','Plugin','_instanceService','UpdateDocFormulaCommand','color','notifyTextChanged','insertLength','pushUndoRedo','ICommandService','TABLE_CELL_END','rangeId','trim','SetDocFormulaNumberFormatCommand','config','setResource','endOffset','parse','DOC_FORMULA_SCHEMA_VERSION','COLUMN_GROUP_START','_configService','properties','liveResult','previousResource','constructor','_change$','docs-formula.mutation.remove-formula','shiftExclusiveRangeOnDelete','numberFormat','docs-formula.mutation.set-formula','blockRanges','resources','TABLE_ROW_END','isDocFormulaRange','RemoveDocFormulaMutation','paragraphId','LexerTreeBuilder','CUSTOM','DOC_FORMULA_OBJECT_REPLACEMENT','replaceDocRanges','params','lastValue','model','undoMutation','get','version','FormulaCacheEligibilityService','cell','getInstance','paragraphs','COMMAND','string','_pendingUnitIds','univer-docs-formula','sectionBreaks','syncExecuteCommand','IUndoRedoService','deleteFormula','endIndex','unregister','pattern','getFormula','paragraph','set','accessor','error','toFormulaLastValue','dataStream','filter','DOC_SELECTION_OPTION_PRESERVE_CARET','_service','removeFormula','3143892erMVvF','pending','COLUMN_START','_formulaService','DocFormulaResultStatus','disposeWithMe','presentation','docs-formula.command.replace-with-text','collectMutations','Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries','body','setFormula','packageName','wholeEntity','register','defineProperty','customDecorations','DocFormulaLifecycleController','UNIVER_DOC','touchDependencies','selection','has','getFormulas','onCommandExecuted','resolveHostFormulaExternalReferences','resourceUndo','document','_injector','formulas','InsertDocFormulaCommand','documentData','getUnit','Subject','5lnygyT','resource','findDocFormulaRange','keys','position','segmentId','pluginName','push','assign','FormulaResultStatus','_preserveInvalid','unsupported-version','_queueSync','_isDisposed','IResourceManagerService','trigger','_syncUnit','resolveText','registerCommand','asObservable','customBlocks','setFormulas','success','min','buildInsertDocFormulaActions','data','next','_registrations','COLUMN_END','getTextRanges','getRegisteredFormulas','registerProvider','isDocFormulaConfig','1487180LqKXsM','_registrationService','boolean','_formulaKeys','sort','_presentationChanged$','tables','TextX','buildRemoveDocFormulaActions','CellValueType','DocTextResolverService','formulaResult$','removeUnit','UniverDocsFormulaPlugin','CUSTOM_BLOCK','prototype','resourceRedo'];_0x5127=function(){return _0x1cbe35;};return _0x5127();}function _(_0x5a3fef,_0x25908b){const _0x3fa406=_0x540782;var _0x3540ac;return _0x5a3fef==null||(_0x3540ac=_0x5a3fef['customRanges'])==null?void 0x0:_0x3540ac[_0x3fa406(0x217)](_0x125155=>_0x125155['rangeId']===_0x25908b&&g(_0x125155));}function ie(_0x28c712,_0x29cd75,_0x2530c5){const _0x2f2c8d=_0x540782;if(_0x29cd75===_0x2530c5){if(p['has'](_0x28c712['dataStream'][_0x29cd75]))throw new m();}else{for(let _0x51301b=_0x29cd75;_0x51301b<_0x2530c5;_0x51301b++)if(_0x28c712[_0x2f2c8d(0x2a8)][_0x51301b]===t[_0x2f2c8d(0x32a)]['PARAGRAPH']||p[_0x2f2c8d(0x2c2)](_0x28c712['dataStream'][_0x51301b]))throw new m();}}function ae(_0x1d9f46,_0x5e236c){const _0x19d32b=_0x540782;return{'startIndex':_0x5e236c,'endIndex':_0x5e236c,'rangeId':_0x1d9f46,'rangeType':t['CustomRangeType'][_0x19d32b(0x28a)],'wholeEntity':!0x0,'properties':{'kind':s}};}function v(_0x4042e9){const _0x1c113f=_0x540782;return _0x4042e9?t[_0x1c113f(0x309)][_0x1c113f(0x259)](_0x4042e9):c();}function oe(_0x201cd8,_0xab9cc2,_0xcde9bb){const _0x56de80=_0x540782;let _0x3aa149=se(_0x201cd8),_0x2c6843=_0xab9cc2??_0x3aa149,_0x25101e=_0xcde9bb??_0x2c6843;return{'startOffset':y(Math[_0x56de80(0x2e5)](_0x2c6843,_0x25101e),_0x3aa149),'endOffset':y(Math[_0x56de80(0x1ea)](_0x2c6843,_0x25101e),_0x3aa149)};}function y(_0x4a0210,_0xc9f764){const _0x357a32=_0x540782;return Math['max'](0x0,Math[_0x357a32(0x2e5)](_0x4a0210,_0xc9f764));}function se(_0x1f43b4){const _0x4809af=_0x540782;return _0x1f43b4[_0x4809af(0x2a8)][_0x4809af(0x24b)](''+t[_0x4809af(0x32a)]['PARAGRAPH']+t['DataStreamTreeTokenType'][_0x4809af(0x244)])?Math[_0x4809af(0x1ea)](0x0,_0x1f43b4[_0x4809af(0x2a8)][_0x4809af(0x1eb)]-0x2):_0x1f43b4[_0x4809af(0x2a8)]['endsWith'](t[_0x4809af(0x32a)][_0x4809af(0x244)])?Math['max'](0x0,_0x1f43b4[_0x4809af(0x2a8)][_0x4809af(0x1eb)]-0x1):_0x1f43b4[_0x4809af(0x2a8)][_0x4809af(0x1eb)];}function ce(_0x117821,_0x4b302b,_0x1f16ec,_0x3d337a){_0x1f16ec>_0x4b302b&&de(_0x117821,_0x4b302b,_0x1f16ec),ue(_0x117821,_0x4b302b,_0x3d337a);}function le(_0x42e32a,_0x257d24,_0x2d872b){const _0x250ed8=_0x540782;var _0x3d5c9f,_0x26a2f6;let _0x4672e3=T(_0x42e32a),_0x1e0997=(_0x3d5c9f=_0x4672e3[_0x250ed8(0x21d)])==null?void 0x0:_0x3d5c9f[_0x250ed8(0x217)](_0x2a9178=>_0x2a9178[_0x250ed8(0x270)]===_0x257d24&&g(_0x2a9178));if(!_0x1e0997)return null;let _0x3aca92=(0x0,t['getCustomRangeInterval'])(_0x1e0997);return ce(_0x4672e3,_0x3aca92[_0x250ed8(0x23d)],_0x3aca92['endOffset'],_0x2d872b),_0x4672e3[_0x250ed8(0x21d)]=(_0x26a2f6=_0x4672e3[_0x250ed8(0x21d)])==null?void 0x0:_0x26a2f6['filter'](_0x1152ff=>_0x1152ff[_0x250ed8(0x270)]!==_0x257d24),_0x3aca92[_0x250ed8(0x23d)]+_0x2d872b['length'];}function ue(_0x42825a,_0x5817c9,_0x1c7526){const _0x2a027a=_0x540782;_0x1c7526&&(_0x42825a[_0x2a027a(0x2a8)]=''+_0x42825a[_0x2a027a(0x2a8)][_0x2a027a(0x23b)](0x0,_0x5817c9)+_0x1c7526+_0x42825a[_0x2a027a(0x2a8)]['slice'](_0x5817c9),fe(_0x42825a,_0x5817c9,_0x1c7526['length']));}function de(_0x310c9a,_0x455d17,_0x2b7645){const _0x1fae72=_0x540782;let _0x131a53=_0x2b7645-_0x455d17;_0x310c9a[_0x1fae72(0x2a8)]=''+_0x310c9a[_0x1fae72(0x2a8)][_0x1fae72(0x23b)](0x0,_0x455d17)+_0x310c9a[_0x1fae72(0x2a8)][_0x1fae72(0x23b)](_0x2b7645),pe(_0x310c9a,_0x455d17,_0x131a53);}function fe(_0x2aa1e8,_0x23afa9,_0xecc93c){const _0xfd63aa=_0x540782;_0x2aa1e8[_0xfd63aa(0x296)]=b(_0x2aa1e8[_0xfd63aa(0x296)],_0x23afa9,_0xecc93c),_0x2aa1e8[_0xfd63aa(0x29b)]=b(_0x2aa1e8['sectionBreaks'],_0x23afa9,_0xecc93c),_0x2aa1e8[_0xfd63aa(0x2e2)]=b(_0x2aa1e8[_0xfd63aa(0x2e2)],_0x23afa9,_0xecc93c),_0x2aa1e8[_0xfd63aa(0x307)]=me(_0x2aa1e8['textRuns'],_0x23afa9,_0xecc93c),_0x2aa1e8[_0xfd63aa(0x2f5)]=he(_0x2aa1e8['tables'],_0x23afa9,_0xecc93c),_0x2aa1e8['columnGroups']=S(_0x2aa1e8[_0xfd63aa(0x206)],_0x23afa9,_0xecc93c),_0x2aa1e8['customRanges']=S(_0x2aa1e8[_0xfd63aa(0x21d)],_0x23afa9,_0xecc93c),_0x2aa1e8['customDecorations']=S(_0x2aa1e8[_0xfd63aa(0x2bd)],_0x23afa9,_0xecc93c),_0x2aa1e8[_0xfd63aa(0x283)]=S(_0x2aa1e8[_0xfd63aa(0x283)],_0x23afa9,_0xecc93c);}function pe(_0x24364a,_0x3dc94d,_0x270342){const _0x351950=_0x540782;var _0x3a8f0f,_0x365caa;_0x24364a[_0x351950(0x296)]=x(_0x24364a[_0x351950(0x296)],_0x3dc94d,_0x270342),_0x24364a['sectionBreaks']=x(_0x24364a[_0x351950(0x29b)],_0x3dc94d,_0x270342),_0x24364a[_0x351950(0x2e2)]=x(_0x24364a[_0x351950(0x2e2)],_0x3dc94d,_0x270342),_0x24364a['textRuns']=(_0x3a8f0f=w((_0x365caa=_0x24364a['textRuns'])==null?void 0x0:_0x365caa['map'](_0x1fc997=>({..._0x1fc997,'startIndex':_0x1fc997['st'],'endIndex':_0x1fc997['ed']})),_0x3dc94d,_0x270342))==null?void 0x0:_0x3a8f0f['map'](_0x4107d2=>{let {startIndex:_0x536535,endIndex:_0x227cca,..._0x18245f}=_0x4107d2;return{..._0x18245f,'st':_0x536535,'ed':_0x227cca};}),_0x24364a[_0x351950(0x2f5)]=w(_0x24364a[_0x351950(0x2f5)],_0x3dc94d,_0x270342),_0x24364a[_0x351950(0x206)]=C(_0x24364a['columnGroups'],_0x3dc94d,_0x270342),_0x24364a[_0x351950(0x21d)]=C(_0x24364a[_0x351950(0x21d)],_0x3dc94d,_0x270342),_0x24364a['customDecorations']=C(_0x24364a[_0x351950(0x2bd)],_0x3dc94d,_0x270342),_0x24364a[_0x351950(0x283)]=C(_0x24364a[_0x351950(0x283)],_0x3dc94d,_0x270342);}function b(_0x4bb274,_0x42e576,_0x1f7068){const _0x4d3ef1=_0x540782;return _0x4bb274==null?void 0x0:_0x4bb274[_0x4d3ef1(0x1f3)](_0x4577f3=>_0x4577f3[_0x4d3ef1(0x312)]>=_0x42e576?{..._0x4577f3,'startIndex':_0x4577f3[_0x4d3ef1(0x312)]+_0x1f7068}:_0x4577f3);}function x(_0x2869c0,_0x14d210,_0xd26f23){const _0x36717c=_0x540782;let _0x70ee0a=_0x14d210+_0xd26f23;return _0x2869c0==null?void 0x0:_0x2869c0[_0x36717c(0x1f3)](_0x3cbfe6=>_0x3cbfe6[_0x36717c(0x312)]>=_0x14d210&&_0x3cbfe6[_0x36717c(0x312)]<_0x70ee0a?null:_0x3cbfe6['startIndex']>=_0x70ee0a?{..._0x3cbfe6,'startIndex':_0x3cbfe6[_0x36717c(0x312)]-_0xd26f23}:_0x3cbfe6)[_0x36717c(0x2a9)](_0x555b9d=>_0x555b9d!=null);}function me(_0x4a6afe,_0x142abc,_0x26eba9){const _0x121e48=_0x540782;return _0x4a6afe==null?void 0x0:_0x4a6afe[_0x121e48(0x1f3)](_0x320734=>_0x320734['st']>=_0x142abc?{..._0x320734,'st':_0x320734['st']+_0x26eba9,'ed':_0x320734['ed']+_0x26eba9}:_0x320734['ed']>_0x142abc?{..._0x320734,'ed':_0x320734['ed']+_0x26eba9}:_0x320734);}function S(_0x4e83e9,_0x501b82,_0x1672fa){const _0x2f17b6=_0x540782;return _0x4e83e9==null?void 0x0:_0x4e83e9[_0x2f17b6(0x1f3)](_0x3d8bff=>(0x0,t[_0x2f17b6(0x223)])(_0x3d8bff,_0x501b82,_0x1672fa));}function he(_0x473b0e,_0x3db800,_0x370c76){const _0x15f745=_0x540782;return _0x473b0e==null?void 0x0:_0x473b0e['map'](_0x2163d2=>(0x0,t[_0x15f745(0x22a)])(_0x2163d2,_0x3db800,_0x370c76));}function C(_0x53ff92,_0x3b60ff,_0x2147a8){const _0x381c07=_0x540782;return _0x53ff92==null?void 0x0:_0x53ff92[_0x381c07(0x1f3)](_0x2b7e7e=>(0x0,t[_0x381c07(0x214)])(_0x2b7e7e,_0x3b60ff,_0x2147a8))['filter'](_0x3e10ee=>_0x3e10ee!=null);}function w(_0x4337f2,_0x2618e3,_0x34adea){const _0x55517a=_0x540782;return _0x4337f2==null?void 0x0:_0x4337f2['map'](_0x1d8725=>(0x0,t[_0x55517a(0x280)])(_0x1d8725,_0x2618e3,_0x34adea))[_0x55517a(0x2a9)](_0x86adad=>_0x86adad!=null);}function T(_0x3c332b){const _0x44fe17=_0x540782;if(!_0x3c332b['body'])throw Error('Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.');return _0x3c332b[_0x44fe17(0x2b7)];}function E(_0x364f14){'@babel/helpers - typeof';const _0x5c3e47=_0x540782;return E=typeof Symbol=='function'&&typeof Symbol[_0x5c3e47(0x241)]==_0x5c3e47(0x1f0)?function(_0x5bc892){return typeof _0x5bc892;}:function(_0x24933b){const _0x35799a=_0x5c3e47;return _0x24933b&&typeof Symbol==_0x35799a(0x20b)&&_0x24933b[_0x35799a(0x27d)]===Symbol&&_0x24933b!==Symbol[_0x35799a(0x2fe)]?'symbol':typeof _0x24933b;},E(_0x364f14);}function ge(_0x118362,_0x33b3c6){const _0x4bdffc=_0x540782;if(E(_0x118362)!=_0x4bdffc(0x23f)||!_0x118362)return _0x118362;var _0x3eaf46=_0x118362[Symbol[_0x4bdffc(0x324)]];if(_0x3eaf46!==void 0x0){var _0x1b50c8=_0x3eaf46[_0x4bdffc(0x303)](_0x118362,_0x33b3c6||'default');if(E(_0x1b50c8)!='object')return _0x1b50c8;throw TypeError(_0x4bdffc(0x246));}return(_0x33b3c6===_0x4bdffc(0x298)?String:Number)(_0x118362);}function _e(_0x165160){const _0x361b0b=_0x540782;var _0x183269=ge(_0x165160,_0x361b0b(0x298));return E(_0x183269)==_0x361b0b(0x1f0)?_0x183269:_0x183269+'';}function D(_0x3a2054,_0x2075a5,_0x45084e){const _0x5d4631=_0x540782;return(_0x2075a5=_e(_0x2075a5))in _0x3a2054?Object[_0x5d4631(0x2bc)](_0x3a2054,_0x2075a5,{'value':_0x45084e,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3a2054[_0x2075a5]=_0x45084e,_0x3a2054;}var O=class extends t['Disposable']{constructor(..._0x12e871){const _0x2ce54c=_0x540782;super(..._0x12e871),D(this,_0x2ce54c(0x240),new Map()),D(this,_0x2ce54c(0x323),new Map()),D(this,'_loadErrors',new Map()),D(this,_0x2ce54c(0x27e),new i[(_0x2ce54c(0x2cd))]()),D(this,_0x2ce54c(0x25b),this[_0x2ce54c(0x27e)][_0x2ce54c(0x2e1)]());}['getFormula'](_0x580b10,_0x2359fe){const _0x5f5857=_0x540782;var _0x184a03;let _0x2e52fa=(_0x184a03=this['_resources'][_0x5f5857(0x291)](_0x580b10))==null?void 0x0:_0x184a03[_0x5f5857(0x2c9)][_0x2359fe];return _0x2e52fa?t[_0x5f5857(0x309)][_0x5f5857(0x259)](_0x2e52fa):void 0x0;}[_0x540782(0x2c3)](_0x5defd7){const _0x156cb0=_0x540782;var _0x494c3c;return t[_0x156cb0(0x309)][_0x156cb0(0x259)](((_0x494c3c=this[_0x156cb0(0x240)][_0x156cb0(0x291)](_0x5defd7))==null?void 0x0:_0x494c3c[_0x156cb0(0x2c9)])??{});}[_0x540782(0x306)](_0x3190ce){const _0x57da99=_0x540782;let _0x3fc761=this[_0x57da99(0x240)][_0x57da99(0x291)](_0x3190ce);return _0x3fc761?t[_0x57da99(0x309)][_0x57da99(0x259)](_0x3fc761):void 0x0;}[_0x540782(0x2b8)](_0x1e726d,_0x5f0aa0,_0x578994){const _0x5b4f61=_0x540782;return this[_0x5b4f61(0x2e3)](_0x1e726d,{[_0x5f0aa0]:_0x578994});}[_0x540782(0x274)](_0x1f6152,_0x234b4e){const _0x30ef58=_0x540782;return this['_loadErrors'][_0x30ef58(0x2c2)](_0x1f6152)||!l(_0x234b4e)?!0x1:(this[_0x30ef58(0x240)][_0x30ef58(0x2a4)](_0x1f6152,t['Tools'][_0x30ef58(0x259)](_0x234b4e)),this['_change$'][_0x30ef58(0x2e8)]({'unitId':_0x1f6152}),!0x0);}[_0x540782(0x2e3)](_0x1b407e,_0x203f4){const _0xbd7f3f=_0x540782;if(this[_0xbd7f3f(0x1fd)][_0xbd7f3f(0x2c2)](_0x1b407e)||!Object['keys'](_0x203f4)[_0xbd7f3f(0x1eb)]||!l({'schemaVersion':0x1,'formulas':_0x203f4}))return!0x1;let _0x367444=this[_0xbd7f3f(0x240)]['get'](_0x1b407e)??c(),_0x359aa0=t[_0xbd7f3f(0x309)]['deepClone'](_0x367444);return Object[_0xbd7f3f(0x2d6)](_0x359aa0[_0xbd7f3f(0x2c9)],t[_0xbd7f3f(0x309)]['deepClone'](_0x203f4)),this[_0xbd7f3f(0x240)][_0xbd7f3f(0x2a4)](_0x1b407e,_0x359aa0),this[_0xbd7f3f(0x27e)]['next']({'unitId':_0x1b407e,'rangeIds':Object[_0xbd7f3f(0x2d1)](_0x203f4)}),!0x0;}['removeFormula'](_0x27ca1b,_0xa4fb62){const _0x359dad=_0x540782;if(this[_0x359dad(0x1fd)][_0x359dad(0x2c2)](_0x27ca1b))return!0x1;let _0xffb8d5=this[_0x359dad(0x240)][_0x359dad(0x291)](_0x27ca1b);if(!(_0xffb8d5!=null&&_0xffb8d5[_0x359dad(0x2c9)][_0xa4fb62]))return!0x1;let _0x586c69=t[_0x359dad(0x309)][_0x359dad(0x259)](_0xffb8d5);return delete _0x586c69['formulas'][_0xa4fb62],this[_0x359dad(0x240)]['set'](_0x27ca1b,_0x586c69),this['_change$'][_0x359dad(0x2e8)]({'unitId':_0x27ca1b,'rangeIds':[_0xa4fb62]}),!0x0;}[_0x540782(0x31c)](_0x10f2b9,_0x5e5435){const _0x44f4a0=_0x540782;return _0x5e5435&&typeof _0x5e5435==_0x44f4a0(0x23f)&&_0x44f4a0(0x328)in _0x5e5435&&_0x5e5435[_0x44f4a0(0x328)]!==0x1?(this[_0x44f4a0(0x2d8)](_0x10f2b9,_0x5e5435,_0x44f4a0(0x2d9)),!0x1):l(_0x5e5435)?(this[_0x44f4a0(0x240)][_0x44f4a0(0x2a4)](_0x10f2b9,t[_0x44f4a0(0x309)]['deepClone'](_0x5e5435)),this[_0x44f4a0(0x323)][_0x44f4a0(0x213)](_0x10f2b9),this[_0x44f4a0(0x1fd)][_0x44f4a0(0x213)](_0x10f2b9),this[_0x44f4a0(0x27e)][_0x44f4a0(0x2e8)]({'unitId':_0x10f2b9}),!0x0):(this[_0x44f4a0(0x2d8)](_0x10f2b9,_0x5e5435,_0x44f4a0(0x200)),!0x1);}[_0x540782(0x20c)](_0x5c65a4){const _0x54c177=_0x540782;let _0x544f88=this[_0x54c177(0x240)][_0x54c177(0x291)](_0x5c65a4);return _0x544f88?t['Tools']['deepClone'](_0x544f88):this[_0x54c177(0x323)][_0x54c177(0x2c2)](_0x5c65a4)?t[_0x54c177(0x309)]['deepClone'](this[_0x54c177(0x323)][_0x54c177(0x291)](_0x5c65a4)):c();}['getLoadError'](_0x3b8be4){return this['_loadErrors']['get'](_0x3b8be4);}[_0x540782(0x2fb)](_0x1192aa){const _0x1c5146=_0x540782;this[_0x1c5146(0x240)][_0x1c5146(0x213)](_0x1192aa),this[_0x1c5146(0x323)]['delete'](_0x1192aa),this[_0x1c5146(0x1fd)][_0x1c5146(0x213)](_0x1192aa),this['_change$'][_0x1c5146(0x2e8)]({'unitId':_0x1192aa});}[_0x540782(0x204)](){const _0xa7dcbf=_0x540782;this['_resources']['clear'](),this[_0xa7dcbf(0x323)][_0xa7dcbf(0x300)](),this['_loadErrors'][_0xa7dcbf(0x300)](),this['_change$'][_0xa7dcbf(0x1fc)](),super[_0xa7dcbf(0x204)]();}[_0x540782(0x2d8)](_0x132dea,_0x1cbe18,_0x7dc762){const _0x3150b8=_0x540782;this[_0x3150b8(0x240)][_0x3150b8(0x213)](_0x132dea),this[_0x3150b8(0x323)][_0x3150b8(0x2a4)](_0x132dea,t['Tools'][_0x3150b8(0x259)](_0x1cbe18)),this[_0x3150b8(0x1fd)][_0x3150b8(0x2a4)](_0x132dea,_0x7dc762),this[_0x3150b8(0x27e)][_0x3150b8(0x2e8)]({'unitId':_0x132dea});}};let ve=function(_0x461fb4){const _0x2971fc=_0x540782;return _0x461fb4[_0x2971fc(0x245)]=_0x2971fc(0x233),_0x461fb4['PENDING']=_0x2971fc(0x2ae),_0x461fb4['SUCCESS']=_0x2971fc(0x2e4),_0x461fb4[_0x2971fc(0x301)]=_0x2971fc(0x2a6),_0x461fb4;}({});function k(_0x5b7953,_0x537480){return function(_0x2cd45d,_0x3860bc){_0x537480(_0x2cd45d,_0x3860bc,_0x5b7953);};}function A(_0x5df0a2,_0x4b0b7d,_0x571e03,_0x1619a9){const _0x4ff5b6=_0x540782;var _0x5c6394=arguments[_0x4ff5b6(0x1eb)],_0x47cddb=_0x5c6394<0x3?_0x4b0b7d:_0x1619a9===null?_0x1619a9=Object['getOwnPropertyDescriptor'](_0x4b0b7d,_0x571e03):_0x1619a9,_0x27e4ba;if(typeof Reflect==_0x4ff5b6(0x23f)&&typeof Reflect[_0x4ff5b6(0x234)]==_0x4ff5b6(0x20b))_0x47cddb=Reflect[_0x4ff5b6(0x234)](_0x5df0a2,_0x4b0b7d,_0x571e03,_0x1619a9);else{for(var _0x20bbd8=_0x5df0a2[_0x4ff5b6(0x1eb)]-0x1;_0x20bbd8>=0x0;_0x20bbd8--)(_0x27e4ba=_0x5df0a2[_0x20bbd8])&&(_0x47cddb=(_0x5c6394<0x3?_0x27e4ba(_0x47cddb):_0x5c6394>0x3?_0x27e4ba(_0x4b0b7d,_0x571e03,_0x47cddb):_0x27e4ba(_0x4b0b7d,_0x571e03))||_0x47cddb);}return _0x5c6394>0x3&&_0x47cddb&&Object[_0x4ff5b6(0x2bc)](_0x4b0b7d,_0x571e03,_0x47cddb),_0x47cddb;}let j=class extends t['Disposable']{constructor(_0x1d634e,_0x481181,_0x374cc5){const _0x4b133e=_0x540782;super(),this['_model']=_0x1d634e,this['_registrationService']=_0x481181,this['_hostExternalReferenceModel']=_0x374cc5,D(this,_0x4b133e(0x2e9),new Map()),D(this,_0x4b133e(0x2f2),new Map()),D(this,_0x4b133e(0x2f4),new i[(_0x4b133e(0x2cd))]()),D(this,_0x4b133e(0x261),this[_0x4b133e(0x2f4)][_0x4b133e(0x2e1)]()),this[_0x4b133e(0x2b2)](this[_0x4b133e(0x2f0)][_0x4b133e(0x2fa)][_0x4b133e(0x21a)](_0xa4952e=>{const _0x3bde39=_0x4b133e;for(let _0x2c2ee6 of Object[_0x3bde39(0x317)](_0xa4952e))for(let _0x3cf987 of Object[_0x3bde39(0x317)](_0x2c2ee6))_0x3cf987[_0x3bde39(0x32f)](_0x279a87=>this['_updateFormulaResult'](_0x279a87));}));}[_0x540782(0x31e)](_0x1bc78c){const _0x2ecb0a=_0x540782;var _0x1cc93c;let _0x3ea494=_0x1bc78c[_0x2ecb0a(0x201)](),_0x1af45c=((_0x1cc93c=_0x1bc78c['getSnapshot']()['body'])==null||(_0x1cc93c=_0x1cc93c[_0x2ecb0a(0x21d)])==null?void 0x0:_0x1cc93c['filter'](g))??[],_0x54b5d3=this['_model'][_0x2ecb0a(0x2c3)](_0x3ea494),_0x579697=new Set();for(let _0x33fb7b of _0x1af45c){let _0x1f6d13=_0x54b5d3[_0x33fb7b[_0x2ecb0a(0x270)]];_0x1f6d13&&(_0x579697[_0x2ecb0a(0x24c)](M(_0x3ea494,_0x33fb7b[_0x2ecb0a(0x270)])),this[_0x2ecb0a(0x2bb)]({'unitId':_0x3ea494,'rangeId':_0x33fb7b[_0x2ecb0a(0x270)]},_0x1f6d13));}for(let _0x365276 of Array[_0x2ecb0a(0x322)](this[_0x2ecb0a(0x2e9)][_0x2ecb0a(0x317)]()))_0x365276[_0x2ecb0a(0x249)]===_0x3ea494&&!_0x579697[_0x2ecb0a(0x2c2)](M(_0x365276[_0x2ecb0a(0x249)],_0x365276[_0x2ecb0a(0x270)]))&&this['unregister'](_0x365276);}['register'](_0x55518a,_0x504359){const _0x57e07a=_0x540782;let _0x25c2a7=M(_0x55518a[_0x57e07a(0x249)],_0x55518a[_0x57e07a(0x270)]),_0x2e3413=this['_registrations'][_0x57e07a(0x291)](_0x25c2a7),_0x265f47=this[_0x57e07a(0x248)][_0x57e07a(0x22c)](_0x55518a[_0x57e07a(0x249)]);if(_0x2e3413&&_0x2e3413[_0x57e07a(0x273)][_0x57e07a(0x315)]===_0x504359['formula']&&_0x2e3413['referenceRevision']===_0x265f47){_0x2e3413['config']=_0x504359;let _0xb98b28=_0x2e3413['formulaId']?this['_registrationService']['getFormulaValueSync'](_0x2e3413['unitId'],_0x2e3413[_0x57e07a(0x249)],_0x2e3413[_0x57e07a(0x263)])??void 0x0:void 0x0;_0x2e3413[_0x57e07a(0x27b)]=_0xb98b28,this[_0x57e07a(0x251)](_0x25c2a7,N(_0x504359,_0xb98b28));return;}_0x2e3413!=null&&_0x2e3413['formulaId']&&this['_deleteRegistration'](_0x2e3413);let _0x1b5062={..._0x55518a,'config':_0x504359,'referenceRevision':_0x265f47,'presentation':N(_0x504359,void 0x0)};if(this[_0x57e07a(0x2e9)][_0x57e07a(0x2a4)](_0x25c2a7,_0x1b5062),!_0x504359[_0x57e07a(0x315)][_0x57e07a(0x271)]())return;let _0xd7f271=this['_registrationService'][_0x57e07a(0x311)](_0x55518a[_0x57e07a(0x249)],_0x55518a[_0x57e07a(0x249)],_0x504359['formula'],void 0x0,{'rangeId':_0x55518a[_0x57e07a(0x270)]},r['OtherFormulaBizType'][_0x57e07a(0x21f)],_0x55518a[_0x57e07a(0x270)]);_0x1b5062[_0x57e07a(0x263)]=_0xd7f271,this[_0x57e07a(0x2f2)][_0x57e07a(0x2a4)](_0xd7f271,_0x25c2a7);}['unregister'](_0x27278b){const _0x3bf5fe=_0x540782;let _0x5156cd=M(_0x27278b[_0x3bf5fe(0x249)],_0x27278b[_0x3bf5fe(0x270)]),_0x285dee=this[_0x3bf5fe(0x2e9)][_0x3bf5fe(0x291)](_0x5156cd);_0x285dee&&(this['_deleteRegistration'](_0x285dee),this['_registrations'][_0x3bf5fe(0x213)](_0x5156cd));}[_0x540782(0x235)](_0x3a0cde){const _0x48312a=_0x540782;for(let _0x4ef5a6 of Array[_0x48312a(0x322)](this[_0x48312a(0x2e9)][_0x48312a(0x317)]()))_0x4ef5a6[_0x48312a(0x249)]===_0x3a0cde&&this[_0x48312a(0x2a0)](_0x4ef5a6);}[_0x540782(0x1f5)](_0x9eb779){const _0x2be1c1=_0x540782;var _0x2609f7;return(_0x2609f7=this['_registrations']['get'](M(_0x9eb779[_0x2be1c1(0x249)],_0x9eb779[_0x2be1c1(0x270)])))==null?void 0x0:_0x2609f7[_0x2be1c1(0x2b3)];}[_0x540782(0x25e)](_0x23b882){const _0xb74475=_0x540782;let _0x49cf59=this[_0xb74475(0x2e9)]['get'](M(_0x23b882[_0xb74475(0x249)],_0x23b882['rangeId']));return _0x49cf59?P(_0x49cf59):void 0x0;}['getRegisteredFormulas'](){const _0x36ea06=_0x540782;return Array['from'](this['_registrations'][_0x36ea06(0x317)](),_0x15e2b1=>({'identity':{'unitId':_0x15e2b1['unitId'],'rangeId':_0x15e2b1['rangeId']},'config':_0x15e2b1[_0x36ea06(0x273)],'referenceRevision':_0x15e2b1[_0x36ea06(0x1ef)],..._0x15e2b1['liveResult']?{'liveResult':_0x15e2b1['liveResult']}:null}));}[_0x540782(0x204)](){const _0x3707dc=_0x540782;for(let _0x5d67bc of this[_0x3707dc(0x2e9)][_0x3707dc(0x317)]())this['_deleteRegistration'](_0x5d67bc);this[_0x3707dc(0x2e9)][_0x3707dc(0x300)](),this[_0x3707dc(0x2f2)]['clear'](),this[_0x3707dc(0x2f4)][_0x3707dc(0x1fc)](),super[_0x3707dc(0x204)]();}[_0x540782(0x264)](_0x3ec40c){const _0x3fa5d3=_0x540782;let _0x584882=this[_0x3fa5d3(0x2f2)][_0x3fa5d3(0x291)](_0x3ec40c['formulaId']),_0x3ebf23=_0x584882?this[_0x3fa5d3(0x2e9)][_0x3fa5d3(0x291)](_0x584882):void 0x0;_0x584882&&_0x3ebf23&&(_0x3ebf23[_0x3fa5d3(0x27b)]=_0x3ec40c,this['_setPresentation'](_0x584882,N(_0x3ebf23[_0x3fa5d3(0x273)],_0x3ec40c)));}[_0x540782(0x251)](_0x2d8538,_0x79b4d1){const _0x3368d5=_0x540782;var _0x496c28,_0x35c92d;let _0x360b0e=this['_registrations'][_0x3368d5(0x291)](_0x2d8538);if(!_0x360b0e||ye(_0x360b0e[_0x3368d5(0x2b3)],_0x79b4d1))return;let _0x236524=_0x360b0e[_0x3368d5(0x2b3)],_0x57f07f=P(_0x360b0e);_0x360b0e[_0x3368d5(0x2b3)]=_0x79b4d1,this[_0x3368d5(0x2f4)]['next']({'unitId':_0x360b0e[_0x3368d5(0x249)],'rangeId':_0x360b0e[_0x3368d5(0x270)],'presentation':_0x79b4d1,'previousPresentation':_0x236524,'result':P(_0x360b0e),'previousResult':{..._0x57f07f,..._0x236524,'value':(_0x496c28=_0x236524['cell'])==null?void 0x0:_0x496c28['v'],'valueType':((_0x35c92d=_0x236524[_0x3368d5(0x294)])==null?void 0x0:_0x35c92d['t'])??void 0x0}});}[_0x540782(0x21c)](_0x3ee8c3){const _0x8a737c=_0x540782;_0x3ee8c3[_0x8a737c(0x263)]&&(this[_0x8a737c(0x2f0)][_0x8a737c(0x29e)](_0x3ee8c3[_0x8a737c(0x249)],_0x3ee8c3[_0x8a737c(0x249)],[_0x3ee8c3['formulaId']]),this[_0x8a737c(0x2f2)][_0x8a737c(0x213)](_0x3ee8c3[_0x8a737c(0x263)]));}};j=A([k(0x0,(0x0,t[_0x540782(0x218)])(O)),k(0x1,(0x0,t[_0x540782(0x218)])(r['RegisterOtherFormulaService'])),k(0x2,(0x0,t[_0x540782(0x218)])(e['HostExternalReferenceModel']))],j);function M(_0x1ad65a,_0x1a9256){return _0x1ad65a+'\x00'+_0x1a9256;}function N(_0xae2fc4,_0x5bfc92){const _0x185c63=_0x540782;return(0x0,e['resolveFormulaResultPresentation'])({'numberFormat':_0xae2fc4[_0x185c63(0x281)],'lastValue':_0xae2fc4[_0x185c63(0x28e)],'result':_0x5bfc92});}function P(_0x32516a){const _0x181203=_0x540782;var _0x18c4e4,_0x45c93e,_0x5e93c1;let _0x237863=_0x32516a['presentation'],_0x5216ba=_0x32516a[_0x181203(0x273)][_0x181203(0x315)]['trim']()?_0x237863[_0x181203(0x205)]||_0x237863[_0x181203(0x294)]==null?_0x181203(0x2ae):((_0x18c4e4=_0x32516a[_0x181203(0x27b)])==null?void 0x0:_0x18c4e4[_0x181203(0x30b)])===r[_0x181203(0x2d7)]['ERROR']?_0x181203(0x2a6):_0x181203(0x2e4):_0x181203(0x233);return{..._0x237863,'status':_0x5216ba,'value':(_0x45c93e=_0x237863[_0x181203(0x294)])==null?void 0x0:_0x45c93e['v'],'valueType':((_0x5e93c1=_0x237863['cell'])==null?void 0x0:_0x5e93c1['t'])??void 0x0};}function ye(_0x544ee5,_0x5b6a30){const _0x25917d=_0x540782;var _0x1f72c6,_0x44702a,_0x2da62d,_0x5dd14d;return _0x544ee5[_0x25917d(0x24a)]===_0x5b6a30['text']&&_0x544ee5[_0x25917d(0x26a)]===_0x5b6a30[_0x25917d(0x26a)]&&_0x544ee5['pattern']===_0x5b6a30[_0x25917d(0x2a1)]&&_0x544ee5[_0x25917d(0x327)]===_0x5b6a30[_0x25917d(0x327)]&&_0x544ee5[_0x25917d(0x205)]===_0x5b6a30['stale']&&((_0x1f72c6=_0x544ee5[_0x25917d(0x294)])==null?void 0x0:_0x1f72c6['t'])===((_0x44702a=_0x5b6a30[_0x25917d(0x294)])==null?void 0x0:_0x44702a['t'])&&Object['is']((_0x2da62d=_0x544ee5[_0x25917d(0x294)])==null?void 0x0:_0x2da62d['v'],(_0x5dd14d=_0x5b6a30[_0x25917d(0x294)])==null?void 0x0:_0x5dd14d['v']);}const F={'id':_0x540782(0x282),'type':t[_0x540782(0x1f2)]['MUTATION'],'handler':(_0x4ebacb,_0x5af727)=>!(_0x5af727!=null&&_0x5af727[_0x540782(0x249)])||!_0x5af727[_0x540782(0x270)]||!_0x5af727[_0x540782(0x273)]?!0x1:_0x4ebacb[_0x540782(0x291)](O)[_0x540782(0x2b8)](_0x5af727[_0x540782(0x249)],_0x5af727[_0x540782(0x270)],_0x5af727[_0x540782(0x273)])},I={'id':_0x540782(0x27f),'type':t['CommandType']['MUTATION'],'handler':(_0x36787e,_0x10c8c9)=>!(_0x10c8c9!=null&&_0x10c8c9['unitId'])||!_0x10c8c9['rangeId']?!0x1:_0x36787e['get'](O)[_0x540782(0x2ac)](_0x10c8c9[_0x540782(0x249)],_0x10c8c9[_0x540782(0x270)])},L={'id':'docs-formula.mutation.set-resource','type':t[_0x540782(0x1f2)][_0x540782(0x32b)],'handler':(_0x5240e9,_0x5c7bb6)=>!(_0x5c7bb6!=null&&_0x5c7bb6[_0x540782(0x249)])||!_0x5c7bb6['resource']?!0x1:_0x5240e9[_0x540782(0x291)](O)[_0x540782(0x274)](_0x5c7bb6['unitId'],_0x5c7bb6[_0x540782(0x2cf)])},R={'id':_0x540782(0x25a),'type':t[_0x540782(0x1f2)][_0x540782(0x32b)],'handler':(_0x118abc,_0x1175d7)=>{const _0xff469b=_0x540782;if(!(_0x1175d7!=null&&_0x1175d7['unitId'])||!_0x1175d7[_0xff469b(0x226)]['length'])return!0x1;let _0x7ef0bd=_0x118abc[_0xff469b(0x291)](O),_0x3fa88b=_0x118abc['get'](e[_0xff469b(0x247)]),_0x5afa04=_0x7ef0bd['getResource'](_0x1175d7[_0xff469b(0x249)]);if(!_0x5afa04)return!0x1;let _0x1ddff0=t['Tools'][_0xff469b(0x259)](_0x5afa04),_0x32d7fb=!0x1;for(let _0x4fc460 of _0x1175d7['updates']){var _0x413796,_0x22e9a9,_0x5dec23,_0x2bd546;let _0x58f72d=_0x1ddff0[_0xff469b(0x2c9)][_0x4fc460['rangeId']];_0x58f72d&&_0x58f72d[_0xff469b(0x315)]===_0x4fc460[_0xff469b(0x1ff)]&&((_0x413796=_0x58f72d[_0xff469b(0x281)])==null?void 0x0:_0x413796[_0xff469b(0x2a1)])===_0x4fc460[_0xff469b(0x239)]&&_0x3fa88b[_0xff469b(0x22c)](_0x1175d7['unitId'])===_0x4fc460['expectedReferenceRevision']&&(((_0x22e9a9=_0x58f72d[_0xff469b(0x28e)])==null?void 0x0:_0x22e9a9['v'])!==_0x4fc460[_0xff469b(0x28e)]['v']||((_0x5dec23=_0x58f72d[_0xff469b(0x28e)])==null?void 0x0:_0x5dec23['t'])!==_0x4fc460[_0xff469b(0x28e)]['t']||((_0x2bd546=_0x58f72d[_0xff469b(0x28e)])==null?void 0x0:_0x2bd546[_0xff469b(0x2a1)])!==_0x4fc460[_0xff469b(0x28e)][_0xff469b(0x2a1)])&&(_0x58f72d['lastValue']=t['Tools']['deepClone'](_0x4fc460[_0xff469b(0x28e)]),_0x32d7fb=!0x0);}return!_0x32d7fb||_0x7ef0bd[_0xff469b(0x274)](_0x1175d7['unitId'],_0x1ddff0);}},z={'id':_0x540782(0x302),'type':t['CommandType'][_0x540782(0x297)],'handler':(_0x370717,_0x148b3b)=>{const _0x423275=_0x540782;if(!(_0x148b3b!=null&&_0x148b3b['formula'][_0x423275(0x271)]()))return!0x1;let _0xd4b79e=K(_0x370717,_0x148b3b[_0x423275(0x249)],'');if(!_0xd4b79e)return!0x1;let _0x31379c=xe(_0x148b3b[_0x423275(0x222)],_0xd4b79e[_0x423275(0x2b7)],be(_0x370717,_0xd4b79e['unitId']));if(!_0x31379c)return!0x1;let _0x5e8bdb=Se(_0x370717,_0xd4b79e[_0x423275(0x249)],_0x148b3b[_0x423275(0x315)],_0x148b3b[_0x423275(0x256)]??[]);if(!_0x5e8bdb)return!0x1;let _0x4cd089=Ce(_0xd4b79e[_0x423275(0x2b7)],_0xd4b79e[_0x423275(0x28f)],_0xd4b79e[_0x423275(0x249)]),_0x1c092c=we({'documentData':_0xd4b79e[_0x423275(0x2cb)],'resource':_0xd4b79e['resource'],'rangeId':_0x4cd089,'config':{'formula':_0x148b3b[_0x423275(0x315)],..._0x148b3b[_0x423275(0x281)]?{'numberFormat':_0x148b3b[_0x423275(0x281)]}:null},'startOffset':_0x31379c[_0x423275(0x23d)],'endOffset':_0x31379c[_0x423275(0x275)]});if(!_0x1c092c)return!0x1;let _0x3031b7=(0x0,e[_0x423275(0x20e)])(_0x370717,_0xd4b79e[_0x423275(0x249)],_0x5e8bdb);return!_0x3031b7||!q({'accessor':_0x370717,'document':_0xd4b79e['document'],'unitId':_0xd4b79e[_0x423275(0x249)],'trigger':z['id'],'rangeId':_0x4cd089,'previousResource':_0xd4b79e[_0x423275(0x2cf)],'nextResource':_0x1c092c[_0x423275(0x21e)],'previousDocumentData':_0xd4b79e['documentData'],'nextDocumentData':_0x1c092c[_0x423275(0x208)],'cursorOffset':_0x1c092c['cursorOffset'],'externalMutations':_0x3031b7})?!0x1:{'rangeId':_0x4cd089,'startOffset':_0x1c092c[_0x423275(0x229)]-0x1,'endOffset':_0x1c092c[_0x423275(0x229)]};}},B={'id':_0x540782(0x20a),'type':t[_0x540782(0x1f2)]['COMMAND'],'handler':(_0x257d57,_0x449da8)=>{const _0x58ea07=_0x540782;if(!(_0x449da8!=null&&_0x449da8[_0x58ea07(0x270)])||!_0x449da8[_0x58ea07(0x315)][_0x58ea07(0x271)]())return!0x1;let _0x16cb12=K(_0x257d57,_0x449da8[_0x58ea07(0x249)],''),_0x1d3aca=_0x16cb12==null?void 0x0:_0x16cb12[_0x58ea07(0x28f)][_0x58ea07(0x2a2)](_0x16cb12[_0x58ea07(0x249)],_0x449da8[_0x58ea07(0x270)]),_0x501c8e=_0x16cb12?_(_0x16cb12[_0x58ea07(0x2cb)][_0x58ea07(0x2b7)],_0x449da8['rangeId']):void 0x0;if(!_0x16cb12||!_0x1d3aca||!_0x501c8e)return!0x1;let _0x3724d6=Se(_0x257d57,_0x16cb12[_0x58ea07(0x249)],_0x449da8[_0x58ea07(0x315)],_0x449da8[_0x58ea07(0x256)]??[]);if(!_0x3724d6)return!0x1;let _0x441073=(0x0,e['buildUpsertHostExternalReferenceMutations'])(_0x257d57,_0x16cb12[_0x58ea07(0x249)],_0x3724d6);if(!_0x441073)return!0x1;let _0x146a1c=je(_0x16cb12[_0x58ea07(0x2cf)]);return _0x146a1c[_0x58ea07(0x2c9)][_0x449da8[_0x58ea07(0x270)]]={'formula':_0x449da8[_0x58ea07(0x315)],..._0x449da8[_0x58ea07(0x281)]?{'numberFormat':_0x449da8[_0x58ea07(0x281)]}:_0x1d3aca[_0x58ea07(0x281)]?{'numberFormat':_0x1d3aca['numberFormat']}:null},q({'accessor':_0x257d57,'document':_0x16cb12[_0x58ea07(0x2c7)],'unitId':_0x16cb12[_0x58ea07(0x249)],'trigger':B['id'],'rangeId':_0x449da8[_0x58ea07(0x270)],'previousResource':_0x16cb12['resource'],'nextResource':_0x146a1c,'cursorOffset':_0x501c8e[_0x58ea07(0x29f)]+0x1,'externalMutations':_0x441073});}},V={'id':_0x540782(0x316),'type':t['CommandType'][_0x540782(0x297)],'handler':(_0x3f8b8f,_0x685240)=>{const _0x510995=_0x540782;if(!(_0x685240!=null&&_0x685240[_0x510995(0x270)]))return!0x1;let _0x205c56=K(_0x3f8b8f,_0x685240[_0x510995(0x249)],''),_0x51d68a=_0x205c56==null?void 0x0:_0x205c56[_0x510995(0x28f)][_0x510995(0x2a2)](_0x205c56[_0x510995(0x249)],_0x685240['rangeId']),_0x29a2f9=_0x205c56?_(_0x205c56[_0x510995(0x2cb)][_0x510995(0x2b7)],_0x685240[_0x510995(0x270)]):void 0x0;if(!_0x205c56||!_0x51d68a||!_0x29a2f9)return!0x1;let _0x13627c=je(_0x205c56[_0x510995(0x2cf)]);return _0x13627c[_0x510995(0x2c9)][_0x685240['rangeId']]={..._0x51d68a,..._0x685240[_0x510995(0x281)]?{'numberFormat':_0x685240[_0x510995(0x281)]}:null},_0x685240['numberFormat']||delete _0x13627c['formulas'][_0x685240['rangeId']]['numberFormat'],q({'accessor':_0x3f8b8f,'document':_0x205c56[_0x510995(0x2c7)],'unitId':_0x205c56[_0x510995(0x249)],'trigger':V['id'],'rangeId':_0x685240[_0x510995(0x270)],'previousResource':_0x205c56[_0x510995(0x2cf)],'nextResource':_0x13627c,'cursorOffset':_0x29a2f9[_0x510995(0x29f)]+0x1,'externalMutations':{}});}},H={'id':_0x540782(0x220),'type':t[_0x540782(0x1f2)][_0x540782(0x297)],'handler':(_0x284bc1,_0x13b352)=>G(_0x284bc1,_0x13b352,'',H['id'])},U={'id':_0x540782(0x2b4),'type':t[_0x540782(0x1f2)][_0x540782(0x297)],'handler':(_0x34c73d,_0x48151a)=>G(_0x34c73d,_0x48151a,(_0x48151a==null?void 0x0:_0x48151a[_0x540782(0x24a)])??'',U['id'])},W={'id':_0x540782(0x219),'type':t[_0x540782(0x1f2)][_0x540782(0x297)],'handler':(_0x1e9a3f,_0x46426e)=>{const _0x3ad12a=_0x540782;if(!(_0x46426e!=null&&_0x46426e[_0x3ad12a(0x270)]))return!0x1;let _0x18e21d=K(_0x1e9a3f,_0x46426e[_0x3ad12a(0x249)],'');if(!_0x18e21d)return!0x1;let _0x2f38cc=_0x1e9a3f[_0x3ad12a(0x291)](j)[_0x3ad12a(0x25e)]({'unitId':_0x18e21d[_0x3ad12a(0x249)],'rangeId':_0x46426e['rangeId']});return _0x2f38cc?G(_0x1e9a3f,_0x46426e,_0x2f38cc['text'],W['id']):!0x1;}};function G(_0x9b02c3,_0x30a0e0,_0x522990,_0x43c4ca){const _0x15ba91=_0x540782;if(!(_0x30a0e0!=null&&_0x30a0e0[_0x15ba91(0x270)]))return!0x1;let _0x47890f=K(_0x9b02c3,_0x30a0e0[_0x15ba91(0x249)],'');if(!_0x47890f)return!0x1;let _0x334dd7=h({'documentData':_0x47890f[_0x15ba91(0x2cb)],'resource':_0x47890f[_0x15ba91(0x2cf)],'rangeId':_0x30a0e0[_0x15ba91(0x270)],'text':_0x522990});return _0x334dd7?q({'accessor':_0x9b02c3,'document':_0x47890f[_0x15ba91(0x2c7)],'unitId':_0x47890f[_0x15ba91(0x249)],'trigger':_0x43c4ca,'rangeId':_0x30a0e0[_0x15ba91(0x270)],'previousResource':_0x47890f[_0x15ba91(0x2cf)],'nextResource':_0x334dd7[_0x15ba91(0x21e)],'previousDocumentData':_0x47890f[_0x15ba91(0x2cb)],'nextDocumentData':_0x334dd7['nextDocumentData'],'cursorOffset':_0x334dd7[_0x15ba91(0x229)],'externalMutations':{}}):!0x1;}function K(_0xb08e8b,_0x26babf,_0x33c199){const _0xd1118=_0x540782;if(_0x33c199)return null;let _0x3d4620=_0xb08e8b[_0xd1118(0x291)](t['IUniverInstanceService']),_0x3f6d44=(_0x26babf?_0x3d4620[_0xd1118(0x2cc)](_0x26babf,t['UniverInstanceType'][_0xd1118(0x2bf)]):_0x3d4620[_0xd1118(0x1fb)](t[_0xd1118(0x232)][_0xd1118(0x2bf)]))??null;if(!_0x3f6d44)return null;let _0x5f4bdd=_0x3f6d44[_0xd1118(0x325)](),_0x90477c=_0x5f4bdd[_0xd1118(0x2b7)];if(_0x5f4bdd['disabled']||!_0x90477c)return null;let _0x2fcd2b=_0xb08e8b[_0xd1118(0x291)](O);return _0x2fcd2b['getLoadError'](_0x3f6d44[_0xd1118(0x201)]())?null:{'document':_0x3f6d44,'body':_0x90477c,'documentData':_0x5f4bdd,'model':_0x2fcd2b,'resource':_0x2fcd2b['getResource'](_0x3f6d44[_0xd1118(0x201)]())??c(),'unitId':_0x3f6d44[_0xd1118(0x201)]()};}function be(_0x31852d,_0x306507){const _0x3471c4=_0x540782;var _0x6c431;return(_0x6c431=_0x31852d[_0x3471c4(0x291)](n['DocSelectionManagerService'])[_0x3471c4(0x2eb)]({'subUnitId':_0x306507,'unitId':_0x306507}))==null?void 0x0:_0x6c431[0x0];}function xe(_0x577610,_0xb42688,_0x2de726){const _0x28bfcc=_0x540782;if((_0x577610==null?void 0x0:_0x577610[_0x28bfcc(0x32c)])===_0x28bfcc(0x2a3)){var _0x18f6a1;let _0x55d509=((_0x18f6a1=_0xb42688['paragraphs'])==null?void 0x0:_0x18f6a1[_0x28bfcc(0x2a9)](_0x191d73=>_0x191d73[_0x28bfcc(0x288)]===_0x577610[_0x28bfcc(0x288)]))??[];if(_0x55d509[_0x28bfcc(0x1eb)]!==0x1)return null;let _0x138976=_0x55d509[0x0],_0x230899=(0x0,t[_0x28bfcc(0x22e)])(_0xb42688,_0x138976),_0x16f964=_0x138976[_0x28bfcc(0x312)]-_0x230899,_0x47ecfb=_0x577610[_0x28bfcc(0x2d2)]===_0x28bfcc(0x254)?_0x16f964:_0x577610[_0x28bfcc(0x2d2)];if(!Number[_0x28bfcc(0x216)](_0x47ecfb)||_0x47ecfb<0x0||_0x47ecfb>_0x16f964)return null;let _0xb9f925=_0x230899+_0x47ecfb;return{'startOffset':_0xb9f925,'endOffset':_0xb9f925};}if((_0x577610==null?void 0x0:_0x577610[_0x28bfcc(0x32c)])===_0x28bfcc(0x30d))return!Number[_0x28bfcc(0x216)](_0x577610[_0x28bfcc(0x23d)])||!Number['isInteger'](_0x577610[_0x28bfcc(0x275)])?null:{'startOffset':Math['min'](_0x577610[_0x28bfcc(0x23d)],_0x577610[_0x28bfcc(0x275)]),'endOffset':Math[_0x28bfcc(0x1ea)](_0x577610[_0x28bfcc(0x23d)],_0x577610[_0x28bfcc(0x275)])};let _0x29046a=(_0x577610==null?void 0x0:_0x577610['type'])==='selection'?_0x577610[_0x28bfcc(0x2c1)]:_0x2de726;return!_0x29046a||_0x29046a[_0x28bfcc(0x2d3)]?null:{'startOffset':Math[_0x28bfcc(0x2e5)](_0x29046a['startOffset'],_0x29046a[_0x28bfcc(0x275)]),'endOffset':Math[_0x28bfcc(0x1ea)](_0x29046a[_0x28bfcc(0x23d)],_0x29046a[_0x28bfcc(0x275)])};}function Se(_0x1a4137,_0x191d57,_0x322c11,_0x5ab56e){const _0x1b0c5c=_0x540782;let _0x32eb22=_0x1a4137['get'](r[_0x1b0c5c(0x289)]),_0x1c95a2=_0x322c11[_0x1b0c5c(0x1f7)]('=')?_0x322c11[_0x1b0c5c(0x23b)](0x1):_0x322c11,_0x26fec4=_0x32eb22['sequenceNodesBuilder'](_0x1c95a2);if(!_0x26fec4)return null;let _0x5d0fc5=_0x1a4137['get'](e[_0x1b0c5c(0x247)]),_0x4a9c68=(0x0,e[_0x1b0c5c(0x2c5)])({'qualifiers':(0x0,e[_0x1b0c5c(0x209)])(_0x26fec4),'explicitReferences':_0x5ab56e??[],'resolveBinding':_0x11eeaf=>_0x5d0fc5['resolveBinding'](_0x191d57,_0x11eeaf)});return _0x4a9c68[_0x1b0c5c(0x30b)]===_0x1b0c5c(0x23a)?_0x4a9c68[_0x1b0c5c(0x212)]:null;}function Ce(_0x3fb577,_0x40a6b4,_0x5dd1c2){const _0x4b13a3=_0x540782;var _0x5e2024;let _0x539229=(0x0,t[_0x4b13a3(0x25c)])(0x6);for(;_0x3fb577!=null&&(_0x5e2024=_0x3fb577[_0x4b13a3(0x21d)])!=null&&_0x5e2024[_0x4b13a3(0x266)](_0x43563c=>_0x43563c['rangeId']===_0x539229)||_0x40a6b4[_0x4b13a3(0x2a2)](_0x5dd1c2,_0x539229);)_0x539229=(0x0,t[_0x4b13a3(0x25c)])(0x6);return _0x539229;}function we(_0x4ae887){try{return te(_0x4ae887);}catch(_0x4fe070){if(_0x4fe070 instanceof m)return null;throw _0x4fe070;}}function Te(_0x7954de){const _0x24e617=_0x540782;let _0x3320d3=_0x7954de[_0x24e617(0x250)]&&_0x7954de[_0x24e617(0x208)]?De(_0x7954de[_0x24e617(0x2c7)],_0x7954de[_0x24e617(0x249)],_0x7954de[_0x24e617(0x250)],_0x7954de['nextDocumentData'],_0x7954de[_0x24e617(0x229)],_0x7954de[_0x24e617(0x2dd)]):null;return _0x7954de[_0x24e617(0x250)]&&_0x7954de[_0x24e617(0x208)]&&!_0x3320d3?null:{'documentRedo':_0x3320d3,'resourceRedo':{'id':L['id'],'params':{'unitId':_0x7954de[_0x24e617(0x249)],'resource':_0x7954de[_0x24e617(0x21e)]}},'resourceUndo':{'id':L['id'],'params':{'unitId':_0x7954de[_0x24e617(0x249)],'resource':_0x7954de[_0x24e617(0x27c)]}}};}function Ee(_0x33780e,_0x2c0927,_0x528379,_0x448cd2){const _0x3fc973=_0x540782;_0x448cd2[_0x3fc973(0x26d)]({'id':_0x33780e[_0x3fc973(0x2dd)]+':'+_0x33780e['rangeId'],'unitID':_0x33780e[_0x3fc973(0x249)],'redoMutations':[..._0x33780e['externalMutations'][_0x3fc973(0x30e)]?[_0x33780e[_0x3fc973(0x1ed)][_0x3fc973(0x30e)]]:[],..._0x2c0927['documentRedo']?[_0x2c0927['documentRedo']]:[],_0x2c0927['resourceRedo']],'undoMutations':[_0x2c0927[_0x3fc973(0x2c6)],..._0x528379?[_0x528379]:[],..._0x33780e[_0x3fc973(0x1ed)][_0x3fc973(0x290)]?[_0x33780e[_0x3fc973(0x1ed)]['undoMutation']]:[]]});}function q(_0x1982af){const _0x414caa=_0x540782;let _0x2e7bc4=_0x1982af[_0x414caa(0x2a5)]['get'](t[_0x414caa(0x26e)]),_0x590863=_0x1982af[_0x414caa(0x2a5)][_0x414caa(0x291)](t[_0x414caa(0x29d)]),_0x560b40=_0x1982af[_0x414caa(0x2a5)][_0x414caa(0x291)](n[_0x414caa(0x24d)]),_0x287dd5=Te(_0x1982af);if(!_0x287dd5)return!0x1;let _0x58f75a=!0x1,_0x391ba8=null,_0x6f7fc5=!0x1;try{if(_0x1982af[_0x414caa(0x1ed)]['redoMutation']){if(!_0x2e7bc4[_0x414caa(0x29c)](_0x1982af[_0x414caa(0x1ed)][_0x414caa(0x30e)]['id'],_0x1982af[_0x414caa(0x1ed)][_0x414caa(0x30e)][_0x414caa(0x28d)]))return!0x1;_0x58f75a=!0x0;}if(_0x287dd5[_0x414caa(0x24e)]){let _0x432fb7=_0x2e7bc4['syncExecuteCommand'](_0x287dd5['documentRedo']['id'],_0x287dd5[_0x414caa(0x24e)][_0x414caa(0x28d)]);if(!_0x432fb7)return J(_0x2e7bc4,_0x1982af['externalMutations'],_0x58f75a),!0x1;_0x391ba8={'id':n['RichTextEditingMutation']['id'],'params':{..._0x432fb7,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0x2e7bc4['syncExecuteCommand'](_0x287dd5['resourceRedo']['id'],_0x287dd5[_0x414caa(0x2ff)][_0x414caa(0x28d)]))return Oe(_0x2e7bc4,_0x391ba8),J(_0x2e7bc4,_0x1982af['externalMutations'],_0x58f75a),!0x1;_0x6f7fc5=!0x0,Ee(_0x1982af,_0x287dd5,_0x391ba8,_0x590863);}catch(_0x18ed9a){throw _0x6f7fc5&&_0x2e7bc4[_0x414caa(0x29c)](_0x287dd5[_0x414caa(0x2c6)]['id'],_0x287dd5[_0x414caa(0x2c6)][_0x414caa(0x28d)]),Oe(_0x2e7bc4,_0x391ba8),J(_0x2e7bc4,_0x1982af[_0x414caa(0x1ed)],_0x58f75a),_0x18ed9a;}return _0x560b40[_0x414caa(0x28c)]([{'startOffset':_0x1982af['cursorOffset'],'endOffset':_0x1982af['cursorOffset'],'segmentId':''}],{'unitId':_0x1982af['unitId'],'subUnitId':_0x1982af[_0x414caa(0x249)]},!0x1,{[n[_0x414caa(0x2aa)]]:!0x0}),!0x0;}function De(_0x2616a6,_0x245386,_0x2fd015,_0x9dcf5d,_0x259359,_0x49d4eb){const _0x23dc67=_0x540782;let _0x40d719=ke(_0x2fd015,_0x9dcf5d,(0x0,t['getRichTextEditPath'])(_0x2616a6,''));return _0x40d719?{'id':n[_0x23dc67(0x262)]['id'],'params':{'unitId':_0x245386,'actions':_0x40d719,'segmentId':'','textRanges':[{'startOffset':_0x259359,'endOffset':_0x259359,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0x49d4eb}}:null;}function Oe(_0x7217e7,_0x56fa51){const _0x4c64f2=_0x540782;_0x56fa51&&_0x7217e7[_0x4c64f2(0x29c)](_0x56fa51['id'],_0x56fa51['params']);}function J(_0x3d974c,_0x508b2b,_0xcf8670){const _0x4f9dd8=_0x540782;_0xcf8670&&_0x508b2b['undoMutation']&&_0x3d974c[_0x4f9dd8(0x29c)](_0x508b2b['undoMutation']['id'],_0x508b2b[_0x4f9dd8(0x290)][_0x4f9dd8(0x28d)]);}function ke(_0x43a39f,_0x264b45,_0xbfa0a5){const _0x1f0872=_0x540782;let _0x5c62a1=_0x43a39f[_0x1f0872(0x2b7)],_0x311913=_0x264b45['body'],_0x553f16=Ae(_0x5c62a1==null?void 0x0:_0x5c62a1[_0x1f0872(0x2a8)],_0x311913==null?void 0x0:_0x311913[_0x1f0872(0x2a8)]);if(!_0x553f16||!_0x311913)return null;let _0xcf9274=new t[(_0x1f0872(0x2f6))]();return _0xcf9274['retain'](_0x553f16[_0x1f0872(0x30f)]),_0x553f16['insertLength']>0x0&&_0xcf9274[_0x1f0872(0x308)](_0x553f16[_0x1f0872(0x26c)],(0x0,t['getBodySliceForTextXAction'])(_0x311913,_0x553f16[_0x1f0872(0x30f)],_0x553f16['start']+_0x553f16[_0x1f0872(0x26c)],!0x1)),_0x553f16[_0x1f0872(0x22f)]>0x0&&_0xcf9274['delete'](_0x553f16['deleteLength']),t[_0x1f0872(0x215)][_0x1f0872(0x295)]()[_0x1f0872(0x25f)](_0xcf9274[_0x1f0872(0x20c)](),_0xbfa0a5);}function Ae(_0x13f79b,_0x2fc63a){const _0x3bb5b6=_0x540782;if(_0x13f79b==null||_0x2fc63a==null||_0x13f79b===_0x2fc63a)return null;let _0x29d1ba=0x0;for(;_0x29d1ba<_0x13f79b[_0x3bb5b6(0x1eb)]&&_0x29d1ba<_0x2fc63a[_0x3bb5b6(0x1eb)]&&_0x13f79b[_0x29d1ba]===_0x2fc63a[_0x29d1ba];)_0x29d1ba+=0x1;let _0x449d9f=_0x13f79b[_0x3bb5b6(0x1eb)],_0x3a2a7a=_0x2fc63a[_0x3bb5b6(0x1eb)];for(;_0x449d9f>_0x29d1ba&&_0x3a2a7a>_0x29d1ba&&_0x13f79b[_0x449d9f-0x1]===_0x2fc63a[_0x3a2a7a-0x1];)--_0x449d9f,--_0x3a2a7a;return{'start':_0x29d1ba,'deleteLength':_0x449d9f-_0x29d1ba,'insertLength':_0x3a2a7a-_0x29d1ba};}function je(_0x150810){const _0x4cc08e=_0x540782;return{'schemaVersion':0x1,'formulas':Object['fromEntries'](Object[_0x4cc08e(0x258)](_0x150810[_0x4cc08e(0x2c9)])[_0x4cc08e(0x1f3)](([_0x2a8a63,_0x15000c])=>[_0x2a8a63,{..._0x15000c,..._0x15000c[_0x4cc08e(0x281)]?{'numberFormat':{..._0x15000c[_0x4cc08e(0x281)]}}:null,..._0x15000c['lastValue']?{'lastValue':{..._0x15000c[_0x4cc08e(0x28e)]}}:null}]))};}let Y=class extends t['Disposable']{constructor(_0x9474d2,_0x571a77,_0x4d56cd,_0x208b12){const _0x3b96de=_0x540782;super(),this[_0x3b96de(0x268)]=_0x9474d2,this['_commandService']=_0x571a77,this[_0x3b96de(0x23c)]=_0x4d56cd,this[_0x3b96de(0x2ab)]=_0x208b12,D(this,'_pendingUnitIds',new Set()),D(this,_0x3b96de(0x32e),!0x1),D(this,_0x3b96de(0x2db),!0x1),this[_0x3b96de(0x268)][_0x3b96de(0x257)](t[_0x3b96de(0x232)]['UNIVER_DOC'])[_0x3b96de(0x32f)](_0x5aba81=>this[_0x3b96de(0x2ab)][_0x3b96de(0x31e)](_0x5aba81)),this[_0x3b96de(0x2b2)](this['_model'][_0x3b96de(0x25b)]['subscribe'](({unitId:_0x5279e8})=>this[_0x3b96de(0x2de)](_0x5279e8))),this[_0x3b96de(0x2b2)](this[_0x3b96de(0x268)]['unitAdded$'][_0x3b96de(0x21a)](({unit:_0x500fec})=>{const _0x29fc7f=_0x3b96de;_0x500fec[_0x29fc7f(0x32c)]===t['UniverInstanceType'][_0x29fc7f(0x2bf)]&&this['_queueSync'](_0x500fec[_0x29fc7f(0x201)]());})),this[_0x3b96de(0x2b2)](this[_0x3b96de(0x268)]['unitDisposed$'][_0x3b96de(0x21a)](_0x57a681=>{const _0x36e616=_0x3b96de;this[_0x36e616(0x2ab)]['unregisterUnit'](_0x57a681[_0x36e616(0x201)]());})),this['disposeWithMe'](this[_0x3b96de(0x237)][_0x3b96de(0x2c4)](_0x285e4a=>{const _0x37c1c8=_0x3b96de;if(_0x285e4a['id']===n[_0x37c1c8(0x262)]['id']&&Me(_0x285e4a['params'])){let _0x4133e4=_0x285e4a[_0x37c1c8(0x28d)];_0x4133e4[_0x37c1c8(0x2d3)]||this['_syncUnit'](_0x4133e4[_0x37c1c8(0x249)]);}}));}[_0x540782(0x204)](){const _0x48450b=_0x540782;this['_isDisposed']=!0x0,super[_0x48450b(0x204)]();}[_0x540782(0x2da)](_0x456d83){const _0x35afa7=_0x540782;this[_0x35afa7(0x299)]['add'](_0x456d83),!this['_syncScheduled']&&(this[_0x35afa7(0x32e)]=!0x0,queueMicrotask(()=>{const _0x214cf4=_0x35afa7;if(this[_0x214cf4(0x32e)]=!0x1,this[_0x214cf4(0x2db)])return;let _0x3d3912=Array[_0x214cf4(0x322)](this[_0x214cf4(0x299)]);this[_0x214cf4(0x299)][_0x214cf4(0x300)](),_0x3d3912[_0x214cf4(0x32f)](_0xd87fcf=>this[_0x214cf4(0x2de)](_0xd87fcf));}));}[_0x540782(0x2de)](_0x1671bf){const _0x1f0585=_0x540782;let _0x5d8a8f=this['_instanceService'][_0x1f0585(0x2cc)](_0x1671bf,t[_0x1f0585(0x232)][_0x1f0585(0x2bf)]);_0x5d8a8f&&this[_0x1f0585(0x2ab)][_0x1f0585(0x31e)](_0x5d8a8f);}};Y=A([k(0x0,t[_0x540782(0x228)]),k(0x1,t[_0x540782(0x26e)]),k(0x2,(0x0,t[_0x540782(0x218)])(O)),k(0x3,(0x0,t['Inject'])(j))],Y);function Me(_0x2a0ad7){const _0x1a2569=_0x540782;return typeof _0x2a0ad7==_0x1a2569(0x23f)&&!!_0x2a0ad7&&_0x1a2569(0x249)in _0x2a0ad7&&typeof _0x2a0ad7[_0x1a2569(0x249)]=='string'&&(!(_0x1a2569(0x2d3)in _0x2a0ad7)||_0x2a0ad7['segmentId']===void 0x0||typeof _0x2a0ad7[_0x1a2569(0x2d3)]=='string');}let X=class extends t['Disposable']{constructor(_0x4a49f0,_0x23b8df){const _0x1f9bc5=_0x540782;super(),this[_0x1f9bc5(0x243)]=_0x4a49f0,this[_0x1f9bc5(0x31f)]=_0x23b8df,this[_0x1f9bc5(0x2b2)](this[_0x1f9bc5(0x243)]['registerPluginResource']({'pluginName':o,'businesses':[t['UniverInstanceType'][_0x1f9bc5(0x2bf)]],'toJson':_0x5d75b5=>JSON[_0x1f9bc5(0x207)](this[_0x1f9bc5(0x31f)][_0x1f9bc5(0x20c)](_0x5d75b5)),'parseJson':_0x2f9886=>JSON[_0x1f9bc5(0x276)](_0x2f9886),'onLoad':(_0xcb1673,_0x885266)=>{const _0x55f2ca=_0x1f9bc5;this[_0x55f2ca(0x31f)]['load'](_0xcb1673,_0x885266);},'onUnLoad':_0x1af2c9=>this['_docFormulaModel']['removeUnit'](_0x1af2c9)}));}};X=A([k(0x0,t[_0x540782(0x2dc)]),k(0x1,(0x0,t[_0x540782(0x218)])(O))],X);var Ne='@univerjs-pro/docs-formula',Pe=_0x540782(0x238);const Fe={};let Z=class extends t[_0x540782(0x304)]{constructor(_0x185d31,_0x1ab98e,_0x107e2d){const _0x1af00a=_0x540782;super(),this[_0x1af00a(0x24f)]=_0x185d31,this[_0x1af00a(0x2b0)]=_0x1ab98e,this[_0x1af00a(0x2b2)](_0x107e2d[_0x1af00a(0x2bb)]({'resolve':(_0x525007,_0x362ffa)=>{const _0x20d3a1=_0x1af00a;var _0x22f2ff;return((_0x22f2ff=_0x362ffa[_0x20d3a1(0x21d)])==null?void 0x0:_0x22f2ff[_0x20d3a1(0x2a9)](g)[_0x20d3a1(0x1f3)](_0x3bd099=>({'startOffset':_0x3bd099[_0x20d3a1(0x312)],'endOffset':_0x3bd099[_0x20d3a1(0x29f)]+0x1,'text':this['resolveFormula'](_0x525007,_0x3bd099[_0x20d3a1(0x270)])})))??[];}})),this[_0x1af00a(0x2b2)](this[_0x1af00a(0x2b0)]['presentationChanged$']['subscribe'](({unitId:_0x3b12d2})=>{const _0x135aa6=_0x1af00a;_0x107e2d[_0x135aa6(0x26b)](_0x3b12d2);}));}[_0x540782(0x236)](_0x4a9fd8,_0x56d37d){const _0x303c13=_0x540782;var _0x1022e6;return((_0x1022e6=this['_formulaService'][_0x303c13(0x25e)]({'unitId':_0x4a9fd8,'rangeId':_0x56d37d}))==null?void 0x0:_0x1022e6[_0x303c13(0x24a)])??'';}[_0x540782(0x2df)](_0x3c994c,_0x38021d,_0x20f468){const _0x478afe=_0x540782;var _0x52d779;let _0x392360=this[_0x478afe(0x24f)][_0x478afe(0x2cc)](_0x3c994c,t['UniverInstanceType'][_0x478afe(0x2bf)]),_0x2703f2=_0x392360==null?void 0x0:_0x392360['getBody']();if(!_0x2703f2)return'';let _0x12f919=_0x2703f2[_0x478afe(0x2a8)][_0x478afe(0x23b)](_0x38021d,_0x20f468),_0x6abca2=((_0x52d779=_0x2703f2[_0x478afe(0x21d)])==null?void 0x0:_0x52d779['filter'](_0x1093b2=>g(_0x1093b2)&&_0x1093b2[_0x478afe(0x312)]>=_0x38021d&&_0x1093b2['endIndex']<_0x20f468)[_0x478afe(0x2f3)]((_0x139c63,_0x275d72)=>_0x275d72[_0x478afe(0x312)]-_0x139c63[_0x478afe(0x312)]))??[];for(let _0x34b022 of _0x6abca2){let _0x59955d=_0x34b022['startIndex']-_0x38021d,_0x5e9256=_0x34b022[_0x478afe(0x29f)]-_0x38021d+0x1;_0x12f919=''+_0x12f919[_0x478afe(0x23b)](0x0,_0x59955d)+this[_0x478afe(0x236)](_0x3c994c,_0x34b022[_0x478afe(0x270)])+_0x12f919[_0x478afe(0x23b)](_0x5e9256);}return _0x12f919;}[_0x540782(0x30c)](_0x79188d){return Ie(_0x79188d);}['degradeBody'](_0x570da7,_0x5930db,_0x2623c8={}){const _0xe62e8b=_0x540782;var _0x2a2c0e;return re({'id':_0x570da7,'body':_0x5930db,'documentStyle':{}},(((_0x2a2c0e=_0x5930db[_0xe62e8b(0x21d)])==null?void 0x0:_0x2a2c0e[_0xe62e8b(0x2a9)](g))??[])['map'](_0x97cb08=>({'rangeId':_0x97cb08[_0xe62e8b(0x270)],'text':_0x2623c8[_0x97cb08['rangeId']]??this[_0xe62e8b(0x236)](_0x570da7,_0x97cb08['rangeId'])})))['body']??{'dataStream':''};}};Z=A([k(0x0,t[_0x540782(0x228)]),k(0x1,(0x0,t[_0x540782(0x218)])(j)),k(0x2,(0x0,t['Inject'])(n[_0x540782(0x2f9)]))],Z);function Ie(_0x3bebe0){const _0x334842=_0x540782;var _0x74a204,_0x51ca1b;let _0x4cac7e=Le(_0x3bebe0),_0x412321=re(_0x3bebe0,(((_0x74a204=_0x3bebe0[_0x334842(0x2b7)])==null||(_0x74a204=_0x74a204[_0x334842(0x21d)])==null?void 0x0:_0x74a204[_0x334842(0x2a9)](g))??[])[_0x334842(0x1f3)](_0x431dc0=>({'rangeId':_0x431dc0[_0x334842(0x270)],'text':Re(_0x4cac7e==null?void 0x0:_0x4cac7e[_0x334842(0x2c9)][_0x431dc0[_0x334842(0x270)]])})));return _0x412321[_0x334842(0x284)]=(_0x51ca1b=_0x412321['resources'])==null?void 0x0:_0x51ca1b[_0x334842(0x2a9)](_0x3970ec=>_0x3970ec[_0x334842(0x202)]!==o),_0x412321;}function _0x16e3(_0xad8e43,_0x398561){_0xad8e43=_0xad8e43-0x1ea;const _0x51278d=_0x5127();let _0x16e3da=_0x51278d[_0xad8e43];return _0x16e3da;}function Le(_0x3e3927){const _0x43c023=_0x540782;var _0x182f8f;let _0x7c935e=(_0x182f8f=_0x3e3927['resources'])==null||(_0x182f8f=_0x182f8f[_0x43c023(0x217)](_0x3af401=>_0x3af401['name']===_0x43c023(0x310)))==null?void 0x0:_0x182f8f[_0x43c023(0x2e7)];if(_0x7c935e)try{let _0x55ddee=JSON[_0x43c023(0x276)](_0x7c935e);return l(_0x55ddee)?_0x55ddee:void 0x0;}catch{return;}}function Re(_0x3bc2ab){const _0x32abc8=_0x540782;return _0x3bc2ab?(0x0,e['resolveFormulaResultPresentation'])({'lastValue':_0x3bc2ab[_0x32abc8(0x28e)],'numberFormat':_0x3bc2ab['numberFormat']})[_0x32abc8(0x24a)]:'';}let Q=class extends t['Disposable']{constructor(_0x18d423,_0x287226,_0x208c29){const _0x5d00db=_0x540782;super(),this[_0x5d00db(0x2b0)]=_0x18d423,this[_0x5d00db(0x230)]=_0x287226,this[_0x5d00db(0x2b2)](_0x208c29[_0x5d00db(0x2ed)](this));}[_0x540782(0x2b5)](_0x3fcc2c){const _0x67f18e=_0x540782;let _0x20c1bc=new Map();for(let _0x3d3666 of this[_0x67f18e(0x2b0)][_0x67f18e(0x2ec)]()){var _0xddf800;if(!this[_0x67f18e(0x230)][_0x67f18e(0x253)](_0x3d3666[_0x67f18e(0x273)][_0x67f18e(0x315)],_0x3d3666['liveResult'])[_0x67f18e(0x1fa)])continue;let _0x30abd0=(0x0,e[_0x67f18e(0x319)])(_0x3d3666[_0x67f18e(0x27b)]),_0x24c925=_0x30abd0?(0x0,e[_0x67f18e(0x2a7)])(_0x30abd0):null;if(!_0x24c925||ze(_0x3d3666[_0x67f18e(0x273)][_0x67f18e(0x28e)],_0x24c925))continue;let _0xcc532a=_0x20c1bc[_0x67f18e(0x291)](_0x3d3666['identity'][_0x67f18e(0x249)])??[];_0xcc532a[_0x67f18e(0x2d5)]({'rangeId':_0x3d3666['identity'][_0x67f18e(0x270)],'expectedFormula':_0x3d3666['config'][_0x67f18e(0x315)],'expectedNumberFormat':(_0xddf800=_0x3d3666[_0x67f18e(0x273)][_0x67f18e(0x281)])==null?void 0x0:_0xddf800[_0x67f18e(0x2a1)],'expectedReferenceRevision':_0x3d3666[_0x67f18e(0x1ef)],'lastValue':_0x24c925}),_0x20c1bc[_0x67f18e(0x2a4)](_0x3d3666[_0x67f18e(0x260)]['unitId'],_0xcc532a);}return Array[_0x67f18e(0x322)](_0x20c1bc,([_0x1a139c,_0x4c2a15])=>({'id':R['id'],'params':{'unitId':_0x1a139c,'updates':_0x4c2a15}}));}};Q=A([k(0x0,(0x0,t['Inject'])(j)),k(0x1,(0x0,t[_0x540782(0x218)])(e[_0x540782(0x293)])),k(0x2,(0x0,t[_0x540782(0x218)])(e[_0x540782(0x305)]))],Q);function ze(_0x129ff6,_0x1d5ca8){const _0x5eb414=_0x540782;return(_0x129ff6==null?void 0x0:_0x129ff6['v'])===_0x1d5ca8['v']&&(_0x129ff6==null?void 0x0:_0x129ff6['t'])===_0x1d5ca8['t']&&(_0x129ff6==null?void 0x0:_0x129ff6[_0x5eb414(0x2a1)])===_0x1d5ca8[_0x5eb414(0x2a1)];}let $=class extends t[_0x540782(0x267)]{constructor(_0x1b238b=Fe,_0x395709,_0x3ad13c,_0x3dba50){const _0x43470d=_0x540782;super(),this[_0x43470d(0x1f6)]=_0x1b238b,this[_0x43470d(0x2c8)]=_0x395709,this[_0x43470d(0x237)]=_0x3ad13c,this['_configService']=_0x3dba50;let {..._0x340070}=(0x0,t['merge'])({},Fe,this[_0x43470d(0x1f6)]);this[_0x43470d(0x279)][_0x43470d(0x23e)](_0x43470d(0x1f8),_0x340070);}[_0x540782(0x1fe)](){const _0x36a1da=_0x540782;this['_injector']['add']([O]),this[_0x36a1da(0x2c8)][_0x36a1da(0x24c)]([j]),this['_injector'][_0x36a1da(0x24c)]([X]),this['_injector']['add']([Y]),this['_injector']['add']([Q]),this[_0x36a1da(0x2c8)][_0x36a1da(0x24c)]([Z]),(0x0,t[_0x36a1da(0x2c0)])(this[_0x36a1da(0x2c8)],[[O],[X],[Y],[Q],[Z]]),[F,I,L,R,z,B,V,H,U,W][_0x36a1da(0x32f)](_0x36901b=>this['disposeWithMe'](this[_0x36a1da(0x237)][_0x36a1da(0x2e0)](_0x36901b)));}};D($,_0x540782(0x2d4),o),D($,_0x540782(0x2b9),Ne),D($,_0x540782(0x292),Pe),D($,_0x540782(0x32c),t[_0x540782(0x232)]['UNIVER_DOC']),$=A([(0x0,t[_0x540782(0x326)])(a[_0x540782(0x21b)],e['UniverProFormulaEnginePlugin'],n[_0x540782(0x242)]),k(0x1,(0x0,t[_0x540782(0x218)])(t[_0x540782(0x1ec)])),k(0x2,t[_0x540782(0x26e)]),k(0x3,t[_0x540782(0x1f9)])],$),exports[_0x540782(0x318)]=W,exports[_0x540782(0x203)]=s,exports[_0x540782(0x28b)]='',exports[_0x540782(0x310)]=o,exports[_0x540782(0x277)]=0x1,Object[_0x540782(0x2bc)](exports,_0x540782(0x31a),{'enumerable':!0x0,'get':function(){return Z;}}),Object['defineProperty'](exports,_0x540782(0x2be),{'enumerable':!0x0,'get':function(){return Y;}}),exports[_0x540782(0x20d)]=O,Object[_0x540782(0x2bc)](exports,_0x540782(0x211),{'enumerable':!0x0,'get':function(){return X;}}),exports[_0x540782(0x2b1)]=ve,Object[_0x540782(0x2bc)](exports,'DocFormulaService',{'enumerable':!0x0,'get':function(){return j;}}),exports[_0x540782(0x2ca)]=z,exports[_0x540782(0x225)]=m,exports[_0x540782(0x1f1)]=H,exports[_0x540782(0x287)]=I,exports[_0x540782(0x320)]=U,exports['SetDocFormulaLastValuesMutation']=R,exports[_0x540782(0x31b)]=F,exports[_0x540782(0x272)]=V,exports[_0x540782(0x321)]=L,Object[_0x540782(0x2bc)](exports,_0x540782(0x2fc),{'enumerable':!0x0,'get':function(){return $;}}),exports[_0x540782(0x269)]=B,exports['assertSafeDocFormulaInsertRange']=ie,exports[_0x540782(0x2e6)]=te,exports[_0x540782(0x2f7)]=h,exports['buildUpdateDocFormulaActions']=ne,exports[_0x540782(0x314)]=c,exports['degradeDocFormulaDocumentData']=Ie,exports[_0x540782(0x2d0)]=_,exports[_0x540782(0x2ee)]=u,exports[_0x540782(0x286)]=g,exports[_0x540782(0x32d)]=l,exports[_0x540782(0x221)]=d;
1
+ const _0x4136c9=_0x44d8;(function(_0x3e5984,_0x38f9f5){const _0x22882d=_0x44d8,_0x14de2f=_0x3e5984();while(!![]){try{const _0x1d7ed1=parseInt(_0x22882d(0x10f))/0x1*(-parseInt(_0x22882d(0x184))/0x2)+parseInt(_0x22882d(0x1b6))/0x3+parseInt(_0x22882d(0x12d))/0x4*(-parseInt(_0x22882d(0x1b2))/0x5)+parseInt(_0x22882d(0x17a))/0x6+parseInt(_0x22882d(0x22d))/0x7+-parseInt(_0x22882d(0x15b))/0x8+parseInt(_0x22882d(0x158))/0x9;if(_0x1d7ed1===_0x38f9f5)break;else _0x14de2f['push'](_0x14de2f['shift']());}catch(_0x501898){_0x14de2f['push'](_0x14de2f['shift']());}}}(_0xa4cb,0xc8069),Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x4136c9(0x119)}));let e=require('@univerjs-pro/engine-formula'),t=require('@univerjs/core'),n=require('@univerjs/docs'),r=require('@univerjs/engine-formula'),i=require('rxjs'),a=require('@univerjs-pro/license');const o=_0x4136c9(0x116),s=_0x4136c9(0x111);function c(){return{'schemaVersion':0x1,'formulas':{}};}function l(_0x48aa19){const _0x431d20=_0x4136c9;return!_0x48aa19||typeof _0x48aa19!='object'||!f(_0x48aa19,['schemaVersion','formulas'])||!('schemaVersion'in _0x48aa19)||_0x48aa19[_0x431d20(0x13f)]!==0x1||!(_0x431d20(0x1e2)in _0x48aa19)||!_0x48aa19[_0x431d20(0x1e2)]||typeof _0x48aa19['formulas']!=_0x431d20(0x217)||Array[_0x431d20(0x139)](_0x48aa19[_0x431d20(0x1e2)])?!0x1:Object[_0x431d20(0x176)](_0x48aa19[_0x431d20(0x1e2)])[_0x431d20(0x123)](([_0x2c0f29,_0x1f87e2])=>_0x2c0f29[_0x431d20(0x13a)]>0x0&&u(_0x1f87e2));}function u(_0x4722b4){const _0x161dbb=_0x4136c9;return!_0x4722b4||typeof _0x4722b4!='object'||!f(_0x4722b4,[_0x161dbb(0x220),_0x161dbb(0x20b),_0x161dbb(0x145)])||!('formula'in _0x4722b4)||typeof _0x4722b4[_0x161dbb(0x220)]!='string'||!_0x4722b4['formula']['trim']()||'numberFormat'in _0x4722b4&&_0x4722b4[_0x161dbb(0x20b)]!=null&&(typeof _0x4722b4[_0x161dbb(0x20b)]!=_0x161dbb(0x217)||!f(_0x4722b4[_0x161dbb(0x20b)],[_0x161dbb(0x168)])||!(_0x161dbb(0x168)in _0x4722b4[_0x161dbb(0x20b)])||typeof _0x4722b4[_0x161dbb(0x20b)][_0x161dbb(0x168)]!=_0x161dbb(0x122))?!0x1:!(_0x161dbb(0x145)in _0x4722b4)||_0x4722b4[_0x161dbb(0x145)]==null||d(_0x4722b4[_0x161dbb(0x145)]);}function d(_0x2d63d3){const _0x2a56ff=_0x4136c9;return!_0x2d63d3||typeof _0x2d63d3!='object'||!f(_0x2d63d3,['v','t',_0x2a56ff(0x168)])||!('v'in _0x2d63d3)||_0x2d63d3['v']!==null&&typeof _0x2d63d3['v']!=_0x2a56ff(0x122)&&typeof _0x2d63d3['v']!=_0x2a56ff(0x12e)&&typeof _0x2d63d3['v']!=_0x2a56ff(0x199)||'t'in _0x2d63d3&&_0x2d63d3['t']!=null&&!ee(_0x2d63d3['t'])?!0x1:!('pattern'in _0x2d63d3)||_0x2d63d3[_0x2a56ff(0x168)]==null||typeof _0x2d63d3[_0x2a56ff(0x168)]==_0x2a56ff(0x122);}function f(_0x1db214,_0x5a53b7){const _0x1d578f=_0x4136c9;let _0x42d851=new Set(_0x5a53b7);return Object['keys'](_0x1db214)[_0x1d578f(0x123)](_0x5e5070=>_0x42d851[_0x1d578f(0x156)](_0x5e5070));}function ee(_0x205d1f){const _0x1df62a=_0x4136c9;return typeof _0x205d1f==_0x1df62a(0x12e)&&Object[_0x1df62a(0x14d)](t[_0x1df62a(0x204)])['includes'](_0x205d1f);}const p=new Set([t[_0x4136c9(0x1a8)][_0x4136c9(0x104)],t[_0x4136c9(0x1a8)][_0x4136c9(0x142)],t[_0x4136c9(0x1a8)][_0x4136c9(0x170)],t[_0x4136c9(0x1a8)][_0x4136c9(0x130)],t[_0x4136c9(0x1a8)]['TABLE_CELL_END'],t[_0x4136c9(0x1a8)][_0x4136c9(0x140)],t['DataStreamTreeTokenType'][_0x4136c9(0x102)],t['DataStreamTreeTokenType'][_0x4136c9(0x18a)],t[_0x4136c9(0x1a8)][_0x4136c9(0x214)],t[_0x4136c9(0x1a8)][_0x4136c9(0xf6)],t['DataStreamTreeTokenType']['COLUMN_GROUP_END'],t[_0x4136c9(0x1a8)][_0x4136c9(0x118)],t['DataStreamTreeTokenType'][_0x4136c9(0x10a)],t[_0x4136c9(0x1a8)][_0x4136c9(0x1b0)]]);var m=class extends Error{constructor(){const _0x20dd4a=_0x4136c9;super(_0x20dd4a(0x162));}};function te(_0x4f3603){const _0x1d859d=_0x4136c9;var _0x4ff60d,_0x123cf3;let _0x2230c7=t[_0x1d859d(0x21e)][_0x1d859d(0x187)](_0x4f3603[_0x1d859d(0x1bd)]),_0x184c70=T(_0x2230c7),{startOffset:_0x532163,endOffset:_0x18bce5}=oe(_0x184c70,_0x4f3603[_0x1d859d(0x16f)],_0x4f3603['endOffset']);ie(_0x184c70,_0x532163,_0x18bce5);let _0x429675=((_0x4ff60d=_0x184c70['customRanges'])==null?void 0x0:_0x4ff60d[_0x1d859d(0x1e1)](_0x2593cc=>{const _0x283782=_0x1d859d;if(!g(_0x2593cc))return!0x1;let _0x32963b=(0x0,t[_0x283782(0x1d7)])(_0x2593cc);return _0x32963b[_0x283782(0x22e)]>_0x532163&&_0x32963b['startOffset']<_0x18bce5;})['map'](_0x386667=>_0x386667['rangeId']))??[];ce(_0x184c70,_0x532163,_0x18bce5,''),_0x184c70[_0x1d859d(0x103)]=[...((_0x123cf3=_0x184c70[_0x1d859d(0x103)])==null?void 0x0:_0x123cf3['filter'](_0x145b56=>!_0x429675[_0x1d859d(0x18d)](_0x145b56[_0x1d859d(0xf3)])&&_0x145b56[_0x1d859d(0xf3)]!==_0x4f3603[_0x1d859d(0xf3)]))??[],ae(_0x4f3603[_0x1d859d(0xf3)],_0x532163)][_0x1d859d(0x1e4)]((_0xe409bd,_0x7049ad)=>_0xe409bd[_0x1d859d(0x1fe)]-_0x7049ad['startIndex']);let _0x29776a=v(_0x4f3603[_0x1d859d(0x148)]);return _0x429675['forEach'](_0x265f99=>{const _0x462d16=_0x1d859d;delete _0x29776a[_0x462d16(0x1e2)][_0x265f99];}),_0x29776a[_0x1d859d(0x1e2)][_0x4f3603[_0x1d859d(0xf3)]]=t[_0x1d859d(0x21e)][_0x1d859d(0x187)](_0x4f3603['config']),{'nextDocumentData':_0x2230c7,'nextResource':_0x29776a,'cursorOffset':_0x532163+0x1};}function ne(_0x7771c7){const _0x18145c=_0x4136c9;var _0x4a619e,_0x401c8a;let _0x787051=t[_0x18145c(0x21e)][_0x18145c(0x187)](_0x7771c7[_0x18145c(0x1bd)]),_0x27618b=(_0x4a619e=T(_0x787051)['customRanges'])==null?void 0x0:_0x4a619e[_0x18145c(0x124)](_0x5beaa8=>_0x5beaa8[_0x18145c(0xf3)]===_0x7771c7[_0x18145c(0xf3)]&&g(_0x5beaa8));if(!_0x27618b||!((_0x401c8a=_0x7771c7[_0x18145c(0x148)])!=null&&_0x401c8a[_0x18145c(0x1e2)][_0x7771c7[_0x18145c(0xf3)]]))return null;let _0x1813e7=v(_0x7771c7[_0x18145c(0x148)]);return _0x1813e7[_0x18145c(0x1e2)][_0x7771c7[_0x18145c(0xf3)]]=t[_0x18145c(0x21e)][_0x18145c(0x187)](_0x7771c7[_0x18145c(0x1ab)]),{'nextDocumentData':_0x787051,'nextResource':_0x1813e7,'cursorOffset':_0x27618b['endIndex']+0x1};}function h(_0x171fa9){const _0x23d607=_0x4136c9;let _0x182109=t['Tools'][_0x23d607(0x187)](_0x171fa9[_0x23d607(0x1bd)]),_0x304647=le(_0x182109,_0x171fa9['rangeId'],_0x171fa9['text']??'');if(_0x304647==null)return null;let _0x565ff7=v(_0x171fa9[_0x23d607(0x148)]);return delete _0x565ff7[_0x23d607(0x1e2)][_0x171fa9[_0x23d607(0xf3)]],{'nextDocumentData':_0x182109,'nextResource':_0x565ff7,'cursorOffset':_0x304647};}function re(_0x6313b4,_0x4d82de){const _0x4554a8=_0x4136c9;var _0x5b0461;let _0x15b81a=t[_0x4554a8(0x21e)]['deepClone'](_0x6313b4),_0x22e464=_0x15b81a[_0x4554a8(0x1f5)];if(!_0x22e464)return _0x15b81a;let _0x1be1d9=new Map(_0x4d82de['map'](_0x5db669=>[_0x5db669[_0x4554a8(0xf3)],_0x5db669[_0x4554a8(0x137)]])),_0x7bfa42=((_0x5b0461=_0x22e464[_0x4554a8(0x103)])==null?void 0x0:_0x5b0461[_0x4554a8(0x1e1)](_0x264c02=>g(_0x264c02)&&_0x1be1d9[_0x4554a8(0x156)](_0x264c02['rangeId']))[_0x4554a8(0x1e4)]((_0x29e20e,_0x368894)=>_0x368894[_0x4554a8(0x1fe)]-_0x29e20e[_0x4554a8(0x1fe)]))??[];for(let _0x5d0feb of _0x7bfa42)le(_0x15b81a,_0x5d0feb[_0x4554a8(0xf3)],_0x1be1d9[_0x4554a8(0xfc)](_0x5d0feb['rangeId'])??'');return _0x15b81a;}function g(_0x3b6627){const _0x371d0f=_0x4136c9;var _0x17a584;return(_0x3b6627==null?void 0x0:_0x3b6627[_0x371d0f(0x1b8)])===t['CustomRangeType'][_0x371d0f(0x1c0)]&&_0x3b6627[_0x371d0f(0x117)]===!0x0&&((_0x17a584=_0x3b6627[_0x371d0f(0x19e)])==null?void 0x0:_0x17a584[_0x371d0f(0x164)])===_0x371d0f(0x111);}function _(_0x4a1284,_0x574b0c){const _0x4a4713=_0x4136c9;var _0x2f952b;return _0x4a1284==null||(_0x2f952b=_0x4a1284[_0x4a4713(0x103)])==null?void 0x0:_0x2f952b[_0x4a4713(0x124)](_0x5ea98c=>_0x5ea98c['rangeId']===_0x574b0c&&g(_0x5ea98c));}function _0xa4cb(){const _0xe8d34b=['default','previousResource','decorate','replaceDocRanges','registerProvider','accessor','getRevision','name','deleteLength','referenceRevision','createEmptyDocFormulaResource','_docFormulaModel','invalid-resource','onCommandExecuted','empty','set','unregister','resources','pending','min','getFormula','error','getCustomRangeInterval','eligible','constructor','presentationChanged$','disabled','CommandType','data','DOC_SELECTION_OPTION_PRESERVE_CARET','UniverProFormulaEnginePlugin','trim','filter','formulas','identity','sort','_commandService','HostExternalReferenceModel','asObservable','SetDocFormulaResourceMutation','_univerInstanceService','resolveFormula','getSnapshot','RichTextEditingMutation','ConvertDocFormulaToTextCommand','paragraph','Subject','getParagraphContentStartOffset','touchDependencies','docs-formula.config','pluginName','SetDocFormulaNumberFormatCommand','body','undoMutation','ReplaceDocFormulaWithTextCommand','SUCCESS','docs-formula.command.remove','complete','document','dispose','_hostExternalReferenceModel','startIndex','type','slice','buildUpdateDocFormulaActions','_service','assign','CellValueType','delete','serialize','expectedReferenceRevision','Disposable','fromEntries','docs-formula.command.replace-with-text','numberFormat','_setPresentation','docs-formula.mutation.set-formula','presentation','endIndex','getRegisteredFormulas','defineProperty','getPresentation','clear','COLUMN_START','color','DocTextResolverService','object','redoMutation','unregisterUnit','subscribe','from','cell','parse','Tools','getScalarFormulaResultCell','formula','success','registerFormulaWithRange','DependentOn','UniverLicensePlugin','unsupported-version','trigger','_change$','docs-formula.mutation.remove-formula','degradeDocFormulaDocumentData','SetDocFormulaMutation','nextResource','removeUnit','1201284NGmlhx','endOffset','insertLength','dataStream','assertSafeDocFormulaInsertRange','_model','rangeId','syncUnit','previousDocumentData','COLUMN_END','FormulaResultStatus','model','getTextRanges','degradeDocumentData','_preserveInvalid','get','LexerTreeBuilder','liveResult','COMMAND','_formulaKeys','IUndoRedoService','TABLE_END','customRanges','SECTION_BREAK','source','call','degradeBody','UniverDocsPlugin','getResource','BLOCK_END','add','resolveBinding','RemoveDocFormulaCommand','resolveFormulaResultPresentation','14533uNSvxe','UniverInstanceType','univer-docs-formula','EMPTY','_deleteRegistration','externalMutations','DocFormulaService','DOC_FORMULA_PLUGIN','wholeEntity','BLOCK_START','Module','getBody','getRichTextEditPath','_cacheEligibilityService','docs-formula.command.insert','isFormulaLastValue','keys','_rawResources','columnGroups','string','every','find','range','formulaId','buildUpsertHostExternalReferenceMutations','InvalidDocFormulaInsertRangeError','_resources','change$','PARAGRAPH','setResource','650472kSdXUh','number','CustomRangeType','TABLE_CELL_START','_injector','MUTATION','_isDisposed','expectedFormula','shiftExclusiveRangeOnDelete','PENDING','text','load','isArray','length','docs-formula.mutation.set-resource','docs-formula.command.convert-to-text','tables','getLoadError','schemaVersion','TABLE_ROW_END','version','TABLE_START','_registrations','IUniverInstanceService','lastValue','shiftInclusiveRangeOnDelete','end','resource','nextDocumentData','getFormulas','DocFormulaDisplayTextService','getUnitId','values','_syncUnit','1.3.1','segmentId','documentRedo','buildInsertDocFormulaActions','JSONX','SetDocFormulaLastValuesMutation','UpdateDocFormulaCommand','has','blockRanges','2848005UQDdwR','_configService','updates','2057552kDIbqF','toPrimitive','unitId','Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.','_loadErrors','merge','function','Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries','UNIVER_DOC','kind','notifyTextChanged','map','isInteger','pattern','docs-formula.command.set-number-format','position','getUnit','isDocFormulaResource','resolveText','resourceRedo','startOffset','TABLE_ROW_START','iterator','Inject','DocSelectionManagerService','DocFormulaLifecycleController','_presentationChanged$','entries','toFormulaLastValue','prototype','insert','3194172lhhEsG','_registrationService','max','UniverDocsFormulaPlugin','unitDisposed$','paragraphId','endsWith','resolved','symbol','ERROR','2cCBZYu','Plugin','start','deepClone','customBlocks','_resourceManagerService','COLUMN_GROUP_START','getResult','push','includes','findDocFormulaRange','InsertDocFormulaCommand','DocFormulaResultStatus','paragraphs','ICommandService','stale','setFormula','customDecorations','getFormulaValueSync','RegisterOtherFormulaService','_syncScheduled','boolean','_instanceService','docs-formula.mutation.set-last-values','assess','resolveHostFormulaExternalReferences','properties','references','_queueSync','forEach','resourceUndo','FormulaCacheEligibilityService','retain','_pendingUnitIds','registerPluginResource','sectionBreaks','DataStreamTreeTokenType','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','syncExecuteCommand','config','packageName','next','DOC_FORMULA_CUSTOM_RANGE_KIND','removeFormula','CUSTOM_BLOCK','register','20wiMDeT','_formulaService','status','generateRandomId','2163255ZkMLbX','cursorOffset','rangeType','externalReferences','selection','disposeWithMe','textRuns','documentData','params','startsWith','CUSTOM'];_0xa4cb=function(){return _0xe8d34b;};return _0xa4cb();}function ie(_0x419752,_0x1f6cdd,_0x45fce8){const _0x152432=_0x4136c9;if(_0x1f6cdd===_0x45fce8){if(p['has'](_0x419752['dataStream'][_0x1f6cdd]))throw new m();}else{for(let _0x7edd6e=_0x1f6cdd;_0x7edd6e<_0x45fce8;_0x7edd6e++)if(_0x419752['dataStream'][_0x7edd6e]===t[_0x152432(0x1a8)][_0x152432(0x12b)]||p[_0x152432(0x156)](_0x419752[_0x152432(0xf0)][_0x7edd6e]))throw new m();}}function ae(_0x186ad7,_0x4fc158){const _0xbb9349=_0x4136c9;return{'startIndex':_0x4fc158,'endIndex':_0x4fc158,'rangeId':_0x186ad7,'rangeType':t[_0xbb9349(0x12f)][_0xbb9349(0x1c0)],'wholeEntity':!0x0,'properties':{'kind':s}};}function v(_0x1c888a){const _0xb0612d=_0x4136c9;return _0x1c888a?t[_0xb0612d(0x21e)][_0xb0612d(0x187)](_0x1c888a):c();}function oe(_0x5b8508,_0x2b9c9d,_0x4b38db){const _0x4be517=_0x4136c9;let _0x44153c=se(_0x5b8508),_0x480bec=_0x2b9c9d??_0x44153c,_0x2fdf0e=_0x4b38db??_0x480bec;return{'startOffset':y(Math[_0x4be517(0x1d4)](_0x480bec,_0x2fdf0e),_0x44153c),'endOffset':y(Math[_0x4be517(0x17c)](_0x480bec,_0x2fdf0e),_0x44153c)};}function y(_0x189425,_0x3332c3){const _0x68b0ce=_0x4136c9;return Math[_0x68b0ce(0x17c)](0x0,Math[_0x68b0ce(0x1d4)](_0x189425,_0x3332c3));}function _0x44d8(_0x32ff33,_0x3c9752){_0x32ff33=_0x32ff33-0xf0;const _0xa4cb44=_0xa4cb();let _0x44d83c=_0xa4cb44[_0x32ff33];return _0x44d83c;}function se(_0x2eb1ff){const _0x4d2058=_0x4136c9;return _0x2eb1ff[_0x4d2058(0xf0)][_0x4d2058(0x180)](''+t[_0x4d2058(0x1a8)]['PARAGRAPH']+t[_0x4d2058(0x1a8)]['SECTION_BREAK'])?Math[_0x4d2058(0x17c)](0x0,_0x2eb1ff[_0x4d2058(0xf0)][_0x4d2058(0x13a)]-0x2):_0x2eb1ff[_0x4d2058(0xf0)][_0x4d2058(0x180)](t[_0x4d2058(0x1a8)][_0x4d2058(0x104)])?Math[_0x4d2058(0x17c)](0x0,_0x2eb1ff[_0x4d2058(0xf0)][_0x4d2058(0x13a)]-0x1):_0x2eb1ff[_0x4d2058(0xf0)][_0x4d2058(0x13a)];}function ce(_0x200f19,_0x257676,_0x278ad8,_0x513db6){_0x278ad8>_0x257676&&de(_0x200f19,_0x257676,_0x278ad8),ue(_0x200f19,_0x257676,_0x513db6);}function le(_0x4b03e0,_0x450b36,_0xb695c2){const _0x198b7f=_0x4136c9;var _0x4447d5,_0x2e1dbb;let _0x15e690=T(_0x4b03e0),_0x32d0db=(_0x4447d5=_0x15e690[_0x198b7f(0x103)])==null?void 0x0:_0x4447d5['find'](_0x140d40=>_0x140d40[_0x198b7f(0xf3)]===_0x450b36&&g(_0x140d40));if(!_0x32d0db)return null;let _0x5ac8ae=(0x0,t[_0x198b7f(0x1d7)])(_0x32d0db);return ce(_0x15e690,_0x5ac8ae[_0x198b7f(0x16f)],_0x5ac8ae[_0x198b7f(0x22e)],_0xb695c2),_0x15e690[_0x198b7f(0x103)]=(_0x2e1dbb=_0x15e690[_0x198b7f(0x103)])==null?void 0x0:_0x2e1dbb[_0x198b7f(0x1e1)](_0x40e9ce=>_0x40e9ce['rangeId']!==_0x450b36),_0x5ac8ae[_0x198b7f(0x16f)]+_0xb695c2['length'];}function ue(_0x4a996d,_0x56e7c8,_0x3edf38){const _0x28b539=_0x4136c9;_0x3edf38&&(_0x4a996d[_0x28b539(0xf0)]=''+_0x4a996d[_0x28b539(0xf0)][_0x28b539(0x200)](0x0,_0x56e7c8)+_0x3edf38+_0x4a996d[_0x28b539(0xf0)][_0x28b539(0x200)](_0x56e7c8),fe(_0x4a996d,_0x56e7c8,_0x3edf38[_0x28b539(0x13a)]));}function de(_0xba8461,_0x189a7e,_0x47a98e){const _0x577423=_0x4136c9;let _0x17e1e9=_0x47a98e-_0x189a7e;_0xba8461[_0x577423(0xf0)]=''+_0xba8461[_0x577423(0xf0)][_0x577423(0x200)](0x0,_0x189a7e)+_0xba8461['dataStream'][_0x577423(0x200)](_0x47a98e),pe(_0xba8461,_0x189a7e,_0x17e1e9);}function fe(_0x53d7a3,_0x5afe9d,_0x18f427){const _0x414032=_0x4136c9;_0x53d7a3[_0x414032(0x191)]=b(_0x53d7a3[_0x414032(0x191)],_0x5afe9d,_0x18f427),_0x53d7a3[_0x414032(0x1a7)]=b(_0x53d7a3[_0x414032(0x1a7)],_0x5afe9d,_0x18f427),_0x53d7a3[_0x414032(0x188)]=b(_0x53d7a3['customBlocks'],_0x5afe9d,_0x18f427),_0x53d7a3[_0x414032(0x1bc)]=me(_0x53d7a3['textRuns'],_0x5afe9d,_0x18f427),_0x53d7a3[_0x414032(0x13d)]=he(_0x53d7a3[_0x414032(0x13d)],_0x5afe9d,_0x18f427),_0x53d7a3[_0x414032(0x121)]=S(_0x53d7a3[_0x414032(0x121)],_0x5afe9d,_0x18f427),_0x53d7a3[_0x414032(0x103)]=S(_0x53d7a3[_0x414032(0x103)],_0x5afe9d,_0x18f427),_0x53d7a3[_0x414032(0x195)]=S(_0x53d7a3[_0x414032(0x195)],_0x5afe9d,_0x18f427),_0x53d7a3[_0x414032(0x157)]=S(_0x53d7a3['blockRanges'],_0x5afe9d,_0x18f427);}function pe(_0x58d4c7,_0x13abb0,_0x27aead){const _0x48fcaf=_0x4136c9;var _0xe34f0d,_0x21d36d;_0x58d4c7[_0x48fcaf(0x191)]=x(_0x58d4c7['paragraphs'],_0x13abb0,_0x27aead),_0x58d4c7[_0x48fcaf(0x1a7)]=x(_0x58d4c7['sectionBreaks'],_0x13abb0,_0x27aead),_0x58d4c7[_0x48fcaf(0x188)]=x(_0x58d4c7[_0x48fcaf(0x188)],_0x13abb0,_0x27aead),_0x58d4c7['textRuns']=(_0xe34f0d=w((_0x21d36d=_0x58d4c7[_0x48fcaf(0x1bc)])==null?void 0x0:_0x21d36d[_0x48fcaf(0x166)](_0x119060=>({..._0x119060,'startIndex':_0x119060['st'],'endIndex':_0x119060['ed']})),_0x13abb0,_0x27aead))==null?void 0x0:_0xe34f0d[_0x48fcaf(0x166)](_0x54191a=>{let {startIndex:_0xb8775f,endIndex:_0xb6a0d,..._0x38ddde}=_0x54191a;return{..._0x38ddde,'st':_0xb8775f,'ed':_0xb6a0d};}),_0x58d4c7[_0x48fcaf(0x13d)]=w(_0x58d4c7['tables'],_0x13abb0,_0x27aead),_0x58d4c7[_0x48fcaf(0x121)]=C(_0x58d4c7['columnGroups'],_0x13abb0,_0x27aead),_0x58d4c7['customRanges']=C(_0x58d4c7[_0x48fcaf(0x103)],_0x13abb0,_0x27aead),_0x58d4c7['customDecorations']=C(_0x58d4c7[_0x48fcaf(0x195)],_0x13abb0,_0x27aead),_0x58d4c7[_0x48fcaf(0x157)]=C(_0x58d4c7[_0x48fcaf(0x157)],_0x13abb0,_0x27aead);}function b(_0x59a7df,_0x3d0377,_0x293006){const _0x14035f=_0x4136c9;return _0x59a7df==null?void 0x0:_0x59a7df['map'](_0xccb6ca=>_0xccb6ca[_0x14035f(0x1fe)]>=_0x3d0377?{..._0xccb6ca,'startIndex':_0xccb6ca[_0x14035f(0x1fe)]+_0x293006}:_0xccb6ca);}function x(_0x1f134a,_0x2b2b72,_0x48a445){const _0x36c38d=_0x4136c9;let _0x3aa001=_0x2b2b72+_0x48a445;return _0x1f134a==null?void 0x0:_0x1f134a[_0x36c38d(0x166)](_0x28b69e=>_0x28b69e[_0x36c38d(0x1fe)]>=_0x2b2b72&&_0x28b69e[_0x36c38d(0x1fe)]<_0x3aa001?null:_0x28b69e[_0x36c38d(0x1fe)]>=_0x3aa001?{..._0x28b69e,'startIndex':_0x28b69e[_0x36c38d(0x1fe)]-_0x48a445}:_0x28b69e)['filter'](_0x3f023f=>_0x3f023f!=null);}function me(_0x1f3a81,_0x433aae,_0x39d0c1){const _0x52d4c7=_0x4136c9;return _0x1f3a81==null?void 0x0:_0x1f3a81[_0x52d4c7(0x166)](_0x2ccd6e=>_0x2ccd6e['st']>=_0x433aae?{..._0x2ccd6e,'st':_0x2ccd6e['st']+_0x39d0c1,'ed':_0x2ccd6e['ed']+_0x39d0c1}:_0x2ccd6e['ed']>_0x433aae?{..._0x2ccd6e,'ed':_0x2ccd6e['ed']+_0x39d0c1}:_0x2ccd6e);}function S(_0x28eeb6,_0x1cc37e,_0x18d218){const _0x1ffcfd=_0x4136c9;return _0x28eeb6==null?void 0x0:_0x28eeb6[_0x1ffcfd(0x166)](_0x3675d7=>(0x0,t['shiftInclusiveRangeOnInsert'])(_0x3675d7,_0x1cc37e,_0x18d218));}function he(_0x5760e4,_0xc05fb7,_0x3ff06){const _0x242ec8=_0x4136c9;return _0x5760e4==null?void 0x0:_0x5760e4[_0x242ec8(0x166)](_0x17da42=>(0x0,t['shiftExclusiveRangeOnInsert'])(_0x17da42,_0xc05fb7,_0x3ff06));}function C(_0x5e3fca,_0x4f25a3,_0xab582a){const _0x4f466a=_0x4136c9;return _0x5e3fca==null?void 0x0:_0x5e3fca['map'](_0x5dacba=>(0x0,t[_0x4f466a(0x146)])(_0x5dacba,_0x4f25a3,_0xab582a))[_0x4f466a(0x1e1)](_0xd1df59=>_0xd1df59!=null);}function w(_0xd6cc10,_0x33e713,_0x556778){const _0x1b5842=_0x4136c9;return _0xd6cc10==null?void 0x0:_0xd6cc10['map'](_0x20c2fb=>(0x0,t[_0x1b5842(0x135)])(_0x20c2fb,_0x33e713,_0x556778))[_0x1b5842(0x1e1)](_0x29a542=>_0x29a542!=null);}function T(_0x420b23){const _0x3df3eb=_0x4136c9;if(!_0x420b23[_0x3df3eb(0x1f5)])throw Error(_0x3df3eb(0x15e));return _0x420b23[_0x3df3eb(0x1f5)];}function E(_0x5079ff){'@babel/helpers - typeof';const _0x541b47=_0x4136c9;return E=typeof Symbol==_0x541b47(0x161)&&typeof Symbol[_0x541b47(0x171)]==_0x541b47(0x182)?function(_0x52e7c8){return typeof _0x52e7c8;}:function(_0x364c4f){const _0x3c1da2=_0x541b47;return _0x364c4f&&typeof Symbol==_0x3c1da2(0x161)&&_0x364c4f[_0x3c1da2(0x1d9)]===Symbol&&_0x364c4f!==Symbol[_0x3c1da2(0x178)]?_0x3c1da2(0x182):typeof _0x364c4f;},E(_0x5079ff);}function ge(_0x2fc47e,_0x1d45b2){const _0x564cb7=_0x4136c9;if(E(_0x2fc47e)!=_0x564cb7(0x217)||!_0x2fc47e)return _0x2fc47e;var _0x23d968=_0x2fc47e[Symbol[_0x564cb7(0x15c)]];if(_0x23d968!==void 0x0){var _0x3037ef=_0x23d968[_0x564cb7(0x106)](_0x2fc47e,_0x1d45b2||_0x564cb7(0x1c1));if(E(_0x3037ef)!=_0x564cb7(0x217))return _0x3037ef;throw TypeError(_0x564cb7(0x1a9));}return(_0x1d45b2===_0x564cb7(0x122)?String:Number)(_0x2fc47e);}function _e(_0x1764fe){const _0x449fe4=_0x4136c9;var _0x4a6c5c=ge(_0x1764fe,_0x449fe4(0x122));return E(_0x4a6c5c)==_0x449fe4(0x182)?_0x4a6c5c:_0x4a6c5c+'';}function D(_0x4c59eb,_0x134003,_0x5a2562){const _0x1d77cb=_0x4136c9;return(_0x134003=_e(_0x134003))in _0x4c59eb?Object[_0x1d77cb(0x211)](_0x4c59eb,_0x134003,{'value':_0x5a2562,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4c59eb[_0x134003]=_0x5a2562,_0x4c59eb;}var O=class extends t[_0x4136c9(0x208)]{constructor(..._0x5703ca){const _0x2faeb1=_0x4136c9;super(..._0x5703ca),D(this,_0x2faeb1(0x129),new Map()),D(this,_0x2faeb1(0x120),new Map()),D(this,'_loadErrors',new Map()),D(this,_0x2faeb1(0x227),new i[(_0x2faeb1(0x1ef))]()),D(this,'change$',this['_change$'][_0x2faeb1(0x1e7)]());}[_0x4136c9(0x1d5)](_0x397915,_0x1f0f9a){const _0x249ad2=_0x4136c9;var _0x8e77c1;let _0x1cdb50=(_0x8e77c1=this['_resources'][_0x249ad2(0xfc)](_0x397915))==null?void 0x0:_0x8e77c1[_0x249ad2(0x1e2)][_0x1f0f9a];return _0x1cdb50?t[_0x249ad2(0x21e)][_0x249ad2(0x187)](_0x1cdb50):void 0x0;}[_0x4136c9(0x14a)](_0x348d75){const _0x2be6a5=_0x4136c9;var _0x2819de;return t[_0x2be6a5(0x21e)][_0x2be6a5(0x187)](((_0x2819de=this[_0x2be6a5(0x129)]['get'](_0x348d75))==null?void 0x0:_0x2819de[_0x2be6a5(0x1e2)])??{});}[_0x4136c9(0x109)](_0xbafebd){const _0x40683b=_0x4136c9;let _0x3d56a7=this[_0x40683b(0x129)][_0x40683b(0xfc)](_0xbafebd);return _0x3d56a7?t['Tools'][_0x40683b(0x187)](_0x3d56a7):void 0x0;}[_0x4136c9(0x194)](_0x583367,_0xddfc86,_0x1b3e0d){return this['setFormulas'](_0x583367,{[_0xddfc86]:_0x1b3e0d});}[_0x4136c9(0x12c)](_0x3e546d,_0x37f16f){const _0x2525c3=_0x4136c9;return this[_0x2525c3(0x15f)]['has'](_0x3e546d)||!l(_0x37f16f)?!0x1:(this[_0x2525c3(0x129)][_0x2525c3(0x1d0)](_0x3e546d,t[_0x2525c3(0x21e)][_0x2525c3(0x187)](_0x37f16f)),this[_0x2525c3(0x227)][_0x2525c3(0x1ad)]({'unitId':_0x3e546d}),!0x0);}['setFormulas'](_0x1b9e03,_0x4e115b){const _0xe065dc=_0x4136c9;if(this[_0xe065dc(0x15f)][_0xe065dc(0x156)](_0x1b9e03)||!Object[_0xe065dc(0x11f)](_0x4e115b)[_0xe065dc(0x13a)]||!l({'schemaVersion':0x1,'formulas':_0x4e115b}))return!0x1;let _0xb3346f=this[_0xe065dc(0x129)][_0xe065dc(0xfc)](_0x1b9e03)??c(),_0x1a2cf9=t['Tools'][_0xe065dc(0x187)](_0xb3346f);return Object[_0xe065dc(0x203)](_0x1a2cf9[_0xe065dc(0x1e2)],t['Tools']['deepClone'](_0x4e115b)),this[_0xe065dc(0x129)][_0xe065dc(0x1d0)](_0x1b9e03,_0x1a2cf9),this[_0xe065dc(0x227)][_0xe065dc(0x1ad)]({'unitId':_0x1b9e03,'rangeIds':Object[_0xe065dc(0x11f)](_0x4e115b)}),!0x0;}[_0x4136c9(0x1af)](_0x109a83,_0x5e4d92){const _0x31dc67=_0x4136c9;if(this[_0x31dc67(0x15f)][_0x31dc67(0x156)](_0x109a83))return!0x1;let _0x2f09fb=this[_0x31dc67(0x129)]['get'](_0x109a83);if(!(_0x2f09fb!=null&&_0x2f09fb[_0x31dc67(0x1e2)][_0x5e4d92]))return!0x1;let _0x3a223d=t[_0x31dc67(0x21e)][_0x31dc67(0x187)](_0x2f09fb);return delete _0x3a223d['formulas'][_0x5e4d92],this['_resources'][_0x31dc67(0x1d0)](_0x109a83,_0x3a223d),this[_0x31dc67(0x227)][_0x31dc67(0x1ad)]({'unitId':_0x109a83,'rangeIds':[_0x5e4d92]}),!0x0;}[_0x4136c9(0x138)](_0x2bfef3,_0x2671b0){const _0x235b38=_0x4136c9;return _0x2671b0&&typeof _0x2671b0==_0x235b38(0x217)&&_0x235b38(0x13f)in _0x2671b0&&_0x2671b0[_0x235b38(0x13f)]!==0x1?(this[_0x235b38(0xfb)](_0x2bfef3,_0x2671b0,_0x235b38(0x225)),!0x1):l(_0x2671b0)?(this['_resources']['set'](_0x2bfef3,t[_0x235b38(0x21e)][_0x235b38(0x187)](_0x2671b0)),this[_0x235b38(0x120)][_0x235b38(0x205)](_0x2bfef3),this['_loadErrors'][_0x235b38(0x205)](_0x2bfef3),this[_0x235b38(0x227)][_0x235b38(0x1ad)]({'unitId':_0x2bfef3}),!0x0):(this[_0x235b38(0xfb)](_0x2bfef3,_0x2671b0,_0x235b38(0x1cd)),!0x1);}[_0x4136c9(0x206)](_0x5762b7){const _0x4f66eb=_0x4136c9;let _0x41879b=this[_0x4f66eb(0x129)][_0x4f66eb(0xfc)](_0x5762b7);return _0x41879b?t[_0x4f66eb(0x21e)][_0x4f66eb(0x187)](_0x41879b):this[_0x4f66eb(0x120)]['has'](_0x5762b7)?t['Tools']['deepClone'](this['_rawResources'][_0x4f66eb(0xfc)](_0x5762b7)):c();}[_0x4136c9(0x13e)](_0x379775){const _0x128f18=_0x4136c9;return this[_0x128f18(0x15f)][_0x128f18(0xfc)](_0x379775);}[_0x4136c9(0x22c)](_0x16ed3a){const _0x53f0d5=_0x4136c9;this[_0x53f0d5(0x129)][_0x53f0d5(0x205)](_0x16ed3a),this[_0x53f0d5(0x120)]['delete'](_0x16ed3a),this[_0x53f0d5(0x15f)][_0x53f0d5(0x205)](_0x16ed3a),this[_0x53f0d5(0x227)]['next']({'unitId':_0x16ed3a});}['dispose'](){const _0x2d58cc=_0x4136c9;this[_0x2d58cc(0x129)]['clear'](),this[_0x2d58cc(0x120)]['clear'](),this[_0x2d58cc(0x15f)][_0x2d58cc(0x213)](),this[_0x2d58cc(0x227)][_0x2d58cc(0x1fa)](),super[_0x2d58cc(0x1fc)]();}[_0x4136c9(0xfb)](_0x1993c7,_0x174f0f,_0x1dadea){const _0x1e7233=_0x4136c9;this[_0x1e7233(0x129)]['delete'](_0x1993c7),this['_rawResources'][_0x1e7233(0x1d0)](_0x1993c7,t['Tools'][_0x1e7233(0x187)](_0x174f0f)),this[_0x1e7233(0x15f)][_0x1e7233(0x1d0)](_0x1993c7,_0x1dadea),this[_0x1e7233(0x227)][_0x1e7233(0x1ad)]({'unitId':_0x1993c7});}};let ve=function(_0x1ab16c){const _0x108bf1=_0x4136c9;return _0x1ab16c[_0x108bf1(0x112)]='empty',_0x1ab16c[_0x108bf1(0x136)]=_0x108bf1(0x1d3),_0x1ab16c[_0x108bf1(0x1f8)]=_0x108bf1(0x221),_0x1ab16c[_0x108bf1(0x183)]=_0x108bf1(0x1d6),_0x1ab16c;}({});function k(_0xfd9171,_0x590f97){return function(_0x3141b0,_0x3498e3){_0x590f97(_0x3141b0,_0x3498e3,_0xfd9171);};}function A(_0xb28121,_0x35677b,_0x17a412,_0x115b5e){const _0x540f56=_0x4136c9;var _0x245e88=arguments[_0x540f56(0x13a)],_0x329a14=_0x245e88<0x3?_0x35677b:_0x115b5e===null?_0x115b5e=Object['getOwnPropertyDescriptor'](_0x35677b,_0x17a412):_0x115b5e,_0xbd9777;if(typeof Reflect==_0x540f56(0x217)&&typeof Reflect['decorate']==_0x540f56(0x161))_0x329a14=Reflect[_0x540f56(0x1c3)](_0xb28121,_0x35677b,_0x17a412,_0x115b5e);else{for(var _0xed2bba=_0xb28121[_0x540f56(0x13a)]-0x1;_0xed2bba>=0x0;_0xed2bba--)(_0xbd9777=_0xb28121[_0xed2bba])&&(_0x329a14=(_0x245e88<0x3?_0xbd9777(_0x329a14):_0x245e88>0x3?_0xbd9777(_0x35677b,_0x17a412,_0x329a14):_0xbd9777(_0x35677b,_0x17a412))||_0x329a14);}return _0x245e88>0x3&&_0x329a14&&Object[_0x540f56(0x211)](_0x35677b,_0x17a412,_0x329a14),_0x329a14;}let j=class extends t[_0x4136c9(0x208)]{constructor(_0x455dd1,_0x1ca43e,_0x3722f2){const _0x4e1798=_0x4136c9;super(),this[_0x4e1798(0xf2)]=_0x455dd1,this[_0x4e1798(0x17b)]=_0x1ca43e,this[_0x4e1798(0x1fd)]=_0x3722f2,D(this,_0x4e1798(0x143),new Map()),D(this,'_formulaKeys',new Map()),D(this,_0x4e1798(0x175),new i['Subject']()),D(this,_0x4e1798(0x1da),this['_presentationChanged$']['asObservable']()),this[_0x4e1798(0x1bb)](this[_0x4e1798(0x17b)]['formulaResult$'][_0x4e1798(0x21a)](_0x4b5afc=>{const _0x1f87df=_0x4e1798;for(let _0xf6092b of Object[_0x1f87df(0x14d)](_0x4b5afc))for(let _0x38c703 of Object[_0x1f87df(0x14d)](_0xf6092b))_0x38c703['forEach'](_0x370874=>this['_updateFormulaResult'](_0x370874));}));}[_0x4136c9(0xf4)](_0x3cf136){const _0x9993a1=_0x4136c9;var _0x84b361;let _0x286558=_0x3cf136[_0x9993a1(0x14c)](),_0x306c2b=((_0x84b361=_0x3cf136[_0x9993a1(0x1eb)]()[_0x9993a1(0x1f5)])==null||(_0x84b361=_0x84b361[_0x9993a1(0x103)])==null?void 0x0:_0x84b361[_0x9993a1(0x1e1)](g))??[],_0x1de419=this[_0x9993a1(0xf2)]['getFormulas'](_0x286558),_0x1dee00=new Set();for(let _0x230d03 of _0x306c2b){let _0x54ed58=_0x1de419[_0x230d03['rangeId']];_0x54ed58&&(_0x1dee00[_0x9993a1(0x10b)](M(_0x286558,_0x230d03[_0x9993a1(0xf3)])),this['register']({'unitId':_0x286558,'rangeId':_0x230d03[_0x9993a1(0xf3)]},_0x54ed58));}for(let _0x4a2578 of Array[_0x9993a1(0x21b)](this[_0x9993a1(0x143)][_0x9993a1(0x14d)]()))_0x4a2578[_0x9993a1(0x15d)]===_0x286558&&!_0x1dee00[_0x9993a1(0x156)](M(_0x4a2578[_0x9993a1(0x15d)],_0x4a2578['rangeId']))&&this[_0x9993a1(0x1d1)](_0x4a2578);}['register'](_0x529387,_0x3765e9){const _0x5dbb02=_0x4136c9;let _0x2157b9=M(_0x529387[_0x5dbb02(0x15d)],_0x529387['rangeId']),_0x3b6fd9=this[_0x5dbb02(0x143)][_0x5dbb02(0xfc)](_0x2157b9),_0x5d25c0=this[_0x5dbb02(0x1fd)]['getRevision'](_0x529387['unitId']);if(_0x3b6fd9&&_0x3b6fd9[_0x5dbb02(0x1ab)][_0x5dbb02(0x220)]===_0x3765e9[_0x5dbb02(0x220)]&&_0x3b6fd9[_0x5dbb02(0x1ca)]===_0x5d25c0){_0x3b6fd9['config']=_0x3765e9;let _0x53bf6d=_0x3b6fd9[_0x5dbb02(0x126)]?this['_registrationService'][_0x5dbb02(0x196)](_0x3b6fd9['unitId'],_0x3b6fd9[_0x5dbb02(0x15d)],_0x3b6fd9[_0x5dbb02(0x126)])??void 0x0:void 0x0;_0x3b6fd9[_0x5dbb02(0xfe)]=_0x53bf6d,this['_setPresentation'](_0x2157b9,N(_0x3765e9,_0x53bf6d));return;}_0x3b6fd9!=null&&_0x3b6fd9['formulaId']&&this[_0x5dbb02(0x113)](_0x3b6fd9);let _0x4ebee0={..._0x529387,'config':_0x3765e9,'referenceRevision':_0x5d25c0,'presentation':N(_0x3765e9,void 0x0)};if(this[_0x5dbb02(0x143)][_0x5dbb02(0x1d0)](_0x2157b9,_0x4ebee0),!_0x3765e9[_0x5dbb02(0x220)][_0x5dbb02(0x1e0)]())return;let _0x554119=this[_0x5dbb02(0x17b)][_0x5dbb02(0x222)](_0x529387['unitId'],_0x529387[_0x5dbb02(0x15d)],_0x3765e9[_0x5dbb02(0x220)],void 0x0,{'rangeId':_0x529387[_0x5dbb02(0xf3)]},r['OtherFormulaBizType']['DOC'],_0x529387[_0x5dbb02(0xf3)]);_0x4ebee0[_0x5dbb02(0x126)]=_0x554119,this[_0x5dbb02(0x100)][_0x5dbb02(0x1d0)](_0x554119,_0x2157b9);}['unregister'](_0xd81a4f){const _0x2a8f21=_0x4136c9;let _0x1d82bd=M(_0xd81a4f[_0x2a8f21(0x15d)],_0xd81a4f[_0x2a8f21(0xf3)]),_0xb29512=this[_0x2a8f21(0x143)][_0x2a8f21(0xfc)](_0x1d82bd);_0xb29512&&(this['_deleteRegistration'](_0xb29512),this[_0x2a8f21(0x143)]['delete'](_0x1d82bd));}[_0x4136c9(0x219)](_0xfa4e82){const _0x3917db=_0x4136c9;for(let _0x53cf90 of Array[_0x3917db(0x21b)](this[_0x3917db(0x143)][_0x3917db(0x14d)]()))_0x53cf90[_0x3917db(0x15d)]===_0xfa4e82&&this[_0x3917db(0x1d1)](_0x53cf90);}[_0x4136c9(0x212)](_0x56f1a9){const _0x223f25=_0x4136c9;var _0x31d2f2;return(_0x31d2f2=this[_0x223f25(0x143)][_0x223f25(0xfc)](M(_0x56f1a9['unitId'],_0x56f1a9[_0x223f25(0xf3)])))==null?void 0x0:_0x31d2f2[_0x223f25(0x20e)];}[_0x4136c9(0x18b)](_0x1f3f73){const _0x16f5c0=_0x4136c9;let _0xfe70b9=this[_0x16f5c0(0x143)]['get'](M(_0x1f3f73[_0x16f5c0(0x15d)],_0x1f3f73[_0x16f5c0(0xf3)]));return _0xfe70b9?P(_0xfe70b9):void 0x0;}[_0x4136c9(0x210)](){const _0x22953e=_0x4136c9;return Array['from'](this[_0x22953e(0x143)][_0x22953e(0x14d)](),_0x2b8812=>({'identity':{'unitId':_0x2b8812[_0x22953e(0x15d)],'rangeId':_0x2b8812['rangeId']},'config':_0x2b8812['config'],'referenceRevision':_0x2b8812[_0x22953e(0x1ca)],..._0x2b8812[_0x22953e(0xfe)]?{'liveResult':_0x2b8812['liveResult']}:null}));}['dispose'](){const _0x4fb51c=_0x4136c9;for(let _0x37ef8d of this[_0x4fb51c(0x143)][_0x4fb51c(0x14d)]())this[_0x4fb51c(0x113)](_0x37ef8d);this[_0x4fb51c(0x143)]['clear'](),this[_0x4fb51c(0x100)][_0x4fb51c(0x213)](),this[_0x4fb51c(0x175)][_0x4fb51c(0x1fa)](),super[_0x4fb51c(0x1fc)]();}['_updateFormulaResult'](_0x3f31f0){const _0x10336e=_0x4136c9;let _0x5682ff=this[_0x10336e(0x100)][_0x10336e(0xfc)](_0x3f31f0['formulaId']),_0x1b4a8e=_0x5682ff?this[_0x10336e(0x143)][_0x10336e(0xfc)](_0x5682ff):void 0x0;_0x5682ff&&_0x1b4a8e&&(_0x1b4a8e['liveResult']=_0x3f31f0,this[_0x10336e(0x20c)](_0x5682ff,N(_0x1b4a8e[_0x10336e(0x1ab)],_0x3f31f0)));}[_0x4136c9(0x20c)](_0x5f447e,_0x5ba95a){const _0x57760f=_0x4136c9;var _0x1efbaf,_0x82c6cc;let _0x21d875=this[_0x57760f(0x143)][_0x57760f(0xfc)](_0x5f447e);if(!_0x21d875||ye(_0x21d875[_0x57760f(0x20e)],_0x5ba95a))return;let _0x4205b3=_0x21d875[_0x57760f(0x20e)],_0x56f037=P(_0x21d875);_0x21d875[_0x57760f(0x20e)]=_0x5ba95a,this[_0x57760f(0x175)][_0x57760f(0x1ad)]({'unitId':_0x21d875[_0x57760f(0x15d)],'rangeId':_0x21d875['rangeId'],'presentation':_0x5ba95a,'previousPresentation':_0x4205b3,'result':P(_0x21d875),'previousResult':{..._0x56f037,..._0x4205b3,'value':(_0x1efbaf=_0x4205b3['cell'])==null?void 0x0:_0x1efbaf['v'],'valueType':((_0x82c6cc=_0x4205b3['cell'])==null?void 0x0:_0x82c6cc['t'])??void 0x0}});}['_deleteRegistration'](_0x17cd7d){const _0x36f21e=_0x4136c9;_0x17cd7d['formulaId']&&(this[_0x36f21e(0x17b)]['deleteFormula'](_0x17cd7d[_0x36f21e(0x15d)],_0x17cd7d['unitId'],[_0x17cd7d['formulaId']]),this[_0x36f21e(0x100)][_0x36f21e(0x205)](_0x17cd7d[_0x36f21e(0x126)]));}};j=A([k(0x0,(0x0,t[_0x4136c9(0x172)])(O)),k(0x1,(0x0,t['Inject'])(r[_0x4136c9(0x197)])),k(0x2,(0x0,t[_0x4136c9(0x172)])(e[_0x4136c9(0x1e6)]))],j);function M(_0x42b4e5,_0x4dd9f1){return _0x42b4e5+'\x00'+_0x4dd9f1;}function N(_0x5a9378,_0x509cf0){const _0x1fcc46=_0x4136c9;return(0x0,e['resolveFormulaResultPresentation'])({'numberFormat':_0x5a9378['numberFormat'],'lastValue':_0x5a9378[_0x1fcc46(0x145)],'result':_0x509cf0});}function P(_0x19a063){const _0x5ce060=_0x4136c9;var _0x18e637,_0x451c99,_0x41091b;let _0x589fe1=_0x19a063[_0x5ce060(0x20e)],_0x1a6feb=_0x19a063[_0x5ce060(0x1ab)]['formula'][_0x5ce060(0x1e0)]()?_0x589fe1[_0x5ce060(0x193)]||_0x589fe1[_0x5ce060(0x21c)]==null?'pending':((_0x18e637=_0x19a063[_0x5ce060(0xfe)])==null?void 0x0:_0x18e637['status'])===r[_0x5ce060(0xf7)][_0x5ce060(0x183)]?_0x5ce060(0x1d6):_0x5ce060(0x221):_0x5ce060(0x1cf);return{..._0x589fe1,'status':_0x1a6feb,'value':(_0x451c99=_0x589fe1[_0x5ce060(0x21c)])==null?void 0x0:_0x451c99['v'],'valueType':((_0x41091b=_0x589fe1[_0x5ce060(0x21c)])==null?void 0x0:_0x41091b['t'])??void 0x0};}function ye(_0x522e9f,_0xab45f8){const _0x599d32=_0x4136c9;var _0x4e23a5,_0x350cc1,_0x358783,_0x5f1115;return _0x522e9f['text']===_0xab45f8[_0x599d32(0x137)]&&_0x522e9f['color']===_0xab45f8[_0x599d32(0x215)]&&_0x522e9f[_0x599d32(0x168)]===_0xab45f8['pattern']&&_0x522e9f[_0x599d32(0x105)]===_0xab45f8[_0x599d32(0x105)]&&_0x522e9f[_0x599d32(0x193)]===_0xab45f8[_0x599d32(0x193)]&&((_0x4e23a5=_0x522e9f['cell'])==null?void 0x0:_0x4e23a5['t'])===((_0x350cc1=_0xab45f8[_0x599d32(0x21c)])==null?void 0x0:_0x350cc1['t'])&&Object['is']((_0x358783=_0x522e9f[_0x599d32(0x21c)])==null?void 0x0:_0x358783['v'],(_0x5f1115=_0xab45f8[_0x599d32(0x21c)])==null?void 0x0:_0x5f1115['v']);}const F={'id':_0x4136c9(0x20d),'type':t[_0x4136c9(0x1dc)][_0x4136c9(0x132)],'handler':(_0x2c1f8a,_0x55197a)=>!(_0x55197a!=null&&_0x55197a[_0x4136c9(0x15d)])||!_0x55197a[_0x4136c9(0xf3)]||!_0x55197a['config']?!0x1:_0x2c1f8a['get'](O)[_0x4136c9(0x194)](_0x55197a[_0x4136c9(0x15d)],_0x55197a[_0x4136c9(0xf3)],_0x55197a['config'])},I={'id':_0x4136c9(0x228),'type':t[_0x4136c9(0x1dc)]['MUTATION'],'handler':(_0x29345f,_0x455f48)=>!(_0x455f48!=null&&_0x455f48[_0x4136c9(0x15d)])||!_0x455f48[_0x4136c9(0xf3)]?!0x1:_0x29345f[_0x4136c9(0xfc)](O)[_0x4136c9(0x1af)](_0x455f48['unitId'],_0x455f48[_0x4136c9(0xf3)])},L={'id':_0x4136c9(0x13b),'type':t[_0x4136c9(0x1dc)][_0x4136c9(0x132)],'handler':(_0x5f0216,_0x34ed4a)=>!(_0x34ed4a!=null&&_0x34ed4a[_0x4136c9(0x15d)])||!_0x34ed4a[_0x4136c9(0x148)]?!0x1:_0x5f0216[_0x4136c9(0xfc)](O)[_0x4136c9(0x12c)](_0x34ed4a['unitId'],_0x34ed4a[_0x4136c9(0x148)])},R={'id':_0x4136c9(0x19b),'type':t['CommandType']['MUTATION'],'handler':(_0x3a278c,_0x644878)=>{const _0x4c7d40=_0x4136c9;if(!(_0x644878!=null&&_0x644878[_0x4c7d40(0x15d)])||!_0x644878[_0x4c7d40(0x15a)][_0x4c7d40(0x13a)])return!0x1;let _0x5859c7=_0x3a278c[_0x4c7d40(0xfc)](O),_0x14a26a=_0x3a278c[_0x4c7d40(0xfc)](e[_0x4c7d40(0x1e6)]),_0x3a4a61=_0x5859c7['getResource'](_0x644878[_0x4c7d40(0x15d)]);if(!_0x3a4a61)return!0x1;let _0x307728=t[_0x4c7d40(0x21e)][_0x4c7d40(0x187)](_0x3a4a61),_0x4c0829=!0x1;for(let _0x1c958b of _0x644878[_0x4c7d40(0x15a)]){var _0xc9a8eb,_0x28b28e,_0x1654dd,_0x12cd1c;let _0x3a2f18=_0x307728[_0x4c7d40(0x1e2)][_0x1c958b[_0x4c7d40(0xf3)]];_0x3a2f18&&_0x3a2f18[_0x4c7d40(0x220)]===_0x1c958b[_0x4c7d40(0x134)]&&((_0xc9a8eb=_0x3a2f18[_0x4c7d40(0x20b)])==null?void 0x0:_0xc9a8eb[_0x4c7d40(0x168)])===_0x1c958b['expectedNumberFormat']&&_0x14a26a[_0x4c7d40(0x1c7)](_0x644878[_0x4c7d40(0x15d)])===_0x1c958b[_0x4c7d40(0x207)]&&(((_0x28b28e=_0x3a2f18[_0x4c7d40(0x145)])==null?void 0x0:_0x28b28e['v'])!==_0x1c958b[_0x4c7d40(0x145)]['v']||((_0x1654dd=_0x3a2f18[_0x4c7d40(0x145)])==null?void 0x0:_0x1654dd['t'])!==_0x1c958b['lastValue']['t']||((_0x12cd1c=_0x3a2f18[_0x4c7d40(0x145)])==null?void 0x0:_0x12cd1c[_0x4c7d40(0x168)])!==_0x1c958b[_0x4c7d40(0x145)][_0x4c7d40(0x168)])&&(_0x3a2f18[_0x4c7d40(0x145)]=t['Tools'][_0x4c7d40(0x187)](_0x1c958b[_0x4c7d40(0x145)]),_0x4c0829=!0x0);}return!_0x4c0829||_0x5859c7['setResource'](_0x644878['unitId'],_0x307728);}},z={'id':_0x4136c9(0x11d),'type':t[_0x4136c9(0x1dc)][_0x4136c9(0xff)],'handler':(_0x1525f8,_0x20155b)=>{const _0x599377=_0x4136c9;if(!(_0x20155b!=null&&_0x20155b[_0x599377(0x220)][_0x599377(0x1e0)]()))return!0x1;let _0x218d2f=K(_0x1525f8,_0x20155b['unitId'],'');if(!_0x218d2f)return!0x1;let _0x44e536=xe(_0x20155b['target'],_0x218d2f['body'],be(_0x1525f8,_0x218d2f[_0x599377(0x15d)]));if(!_0x44e536)return!0x1;let _0x1e3d18=Se(_0x1525f8,_0x218d2f['unitId'],_0x20155b['formula'],_0x20155b[_0x599377(0x1b9)]??[]);if(!_0x1e3d18)return!0x1;let _0x29979a=Ce(_0x218d2f[_0x599377(0x1f5)],_0x218d2f['model'],_0x218d2f['unitId']),_0x1f33c4=we({'documentData':_0x218d2f['documentData'],'resource':_0x218d2f[_0x599377(0x148)],'rangeId':_0x29979a,'config':{'formula':_0x20155b[_0x599377(0x220)],..._0x20155b['numberFormat']?{'numberFormat':_0x20155b[_0x599377(0x20b)]}:null},'startOffset':_0x44e536[_0x599377(0x16f)],'endOffset':_0x44e536['endOffset']});if(!_0x1f33c4)return!0x1;let _0x19f95c=(0x0,e[_0x599377(0x127)])(_0x1525f8,_0x218d2f[_0x599377(0x15d)],_0x1e3d18);return!_0x19f95c||!q({'accessor':_0x1525f8,'document':_0x218d2f[_0x599377(0x1fb)],'unitId':_0x218d2f[_0x599377(0x15d)],'trigger':z['id'],'rangeId':_0x29979a,'previousResource':_0x218d2f[_0x599377(0x148)],'nextResource':_0x1f33c4[_0x599377(0x22b)],'previousDocumentData':_0x218d2f[_0x599377(0x1bd)],'nextDocumentData':_0x1f33c4[_0x599377(0x149)],'cursorOffset':_0x1f33c4[_0x599377(0x1b7)],'externalMutations':_0x19f95c})?!0x1:{'rangeId':_0x29979a,'startOffset':_0x1f33c4[_0x599377(0x1b7)]-0x1,'endOffset':_0x1f33c4[_0x599377(0x1b7)]};}},B={'id':'docs-formula.command.update','type':t[_0x4136c9(0x1dc)][_0x4136c9(0xff)],'handler':(_0x171447,_0x51c6d8)=>{const _0x40d10d=_0x4136c9;if(!(_0x51c6d8!=null&&_0x51c6d8['rangeId'])||!_0x51c6d8[_0x40d10d(0x220)]['trim']())return!0x1;let _0x2d64a5=K(_0x171447,_0x51c6d8['unitId'],''),_0x3cc3bf=_0x2d64a5==null?void 0x0:_0x2d64a5['model'][_0x40d10d(0x1d5)](_0x2d64a5[_0x40d10d(0x15d)],_0x51c6d8[_0x40d10d(0xf3)]),_0x1140ec=_0x2d64a5?_(_0x2d64a5[_0x40d10d(0x1bd)]['body'],_0x51c6d8[_0x40d10d(0xf3)]):void 0x0;if(!_0x2d64a5||!_0x3cc3bf||!_0x1140ec)return!0x1;let _0x2f0908=Se(_0x171447,_0x2d64a5[_0x40d10d(0x15d)],_0x51c6d8[_0x40d10d(0x220)],_0x51c6d8[_0x40d10d(0x1b9)]??[]);if(!_0x2f0908)return!0x1;let _0x365b2c=(0x0,e[_0x40d10d(0x127)])(_0x171447,_0x2d64a5[_0x40d10d(0x15d)],_0x2f0908);if(!_0x365b2c)return!0x1;let _0x186c01=je(_0x2d64a5['resource']);return _0x186c01[_0x40d10d(0x1e2)][_0x51c6d8[_0x40d10d(0xf3)]]={'formula':_0x51c6d8[_0x40d10d(0x220)],..._0x51c6d8[_0x40d10d(0x20b)]?{'numberFormat':_0x51c6d8[_0x40d10d(0x20b)]}:_0x3cc3bf[_0x40d10d(0x20b)]?{'numberFormat':_0x3cc3bf[_0x40d10d(0x20b)]}:null},q({'accessor':_0x171447,'document':_0x2d64a5[_0x40d10d(0x1fb)],'unitId':_0x2d64a5[_0x40d10d(0x15d)],'trigger':B['id'],'rangeId':_0x51c6d8['rangeId'],'previousResource':_0x2d64a5[_0x40d10d(0x148)],'nextResource':_0x186c01,'cursorOffset':_0x1140ec[_0x40d10d(0x20f)]+0x1,'externalMutations':_0x365b2c});}},V={'id':_0x4136c9(0x169),'type':t[_0x4136c9(0x1dc)]['COMMAND'],'handler':(_0x5c12f,_0x5afc6f)=>{const _0x2a4f35=_0x4136c9;if(!(_0x5afc6f!=null&&_0x5afc6f[_0x2a4f35(0xf3)]))return!0x1;let _0x3ed5c6=K(_0x5c12f,_0x5afc6f[_0x2a4f35(0x15d)],''),_0x5b7929=_0x3ed5c6==null?void 0x0:_0x3ed5c6[_0x2a4f35(0xf8)][_0x2a4f35(0x1d5)](_0x3ed5c6[_0x2a4f35(0x15d)],_0x5afc6f[_0x2a4f35(0xf3)]),_0x44d3ed=_0x3ed5c6?_(_0x3ed5c6[_0x2a4f35(0x1bd)][_0x2a4f35(0x1f5)],_0x5afc6f[_0x2a4f35(0xf3)]):void 0x0;if(!_0x3ed5c6||!_0x5b7929||!_0x44d3ed)return!0x1;let _0x36a215=je(_0x3ed5c6[_0x2a4f35(0x148)]);return _0x36a215[_0x2a4f35(0x1e2)][_0x5afc6f[_0x2a4f35(0xf3)]]={..._0x5b7929,..._0x5afc6f[_0x2a4f35(0x20b)]?{'numberFormat':_0x5afc6f['numberFormat']}:null},_0x5afc6f[_0x2a4f35(0x20b)]||delete _0x36a215[_0x2a4f35(0x1e2)][_0x5afc6f[_0x2a4f35(0xf3)]][_0x2a4f35(0x20b)],q({'accessor':_0x5c12f,'document':_0x3ed5c6[_0x2a4f35(0x1fb)],'unitId':_0x3ed5c6[_0x2a4f35(0x15d)],'trigger':V['id'],'rangeId':_0x5afc6f[_0x2a4f35(0xf3)],'previousResource':_0x3ed5c6[_0x2a4f35(0x148)],'nextResource':_0x36a215,'cursorOffset':_0x44d3ed['endIndex']+0x1,'externalMutations':{}});}},H={'id':_0x4136c9(0x1f9),'type':t[_0x4136c9(0x1dc)][_0x4136c9(0xff)],'handler':(_0x518ca0,_0x2782f1)=>G(_0x518ca0,_0x2782f1,'',H['id'])},U={'id':_0x4136c9(0x20a),'type':t['CommandType'][_0x4136c9(0xff)],'handler':(_0x19e0c0,_0x144f6f)=>G(_0x19e0c0,_0x144f6f,(_0x144f6f==null?void 0x0:_0x144f6f[_0x4136c9(0x137)])??'',U['id'])},W={'id':_0x4136c9(0x13c),'type':t[_0x4136c9(0x1dc)][_0x4136c9(0xff)],'handler':(_0x32dcb8,_0x38e17d)=>{const _0x3f9184=_0x4136c9;if(!(_0x38e17d!=null&&_0x38e17d['rangeId']))return!0x1;let _0x16623e=K(_0x32dcb8,_0x38e17d[_0x3f9184(0x15d)],'');if(!_0x16623e)return!0x1;let _0x48c49c=_0x32dcb8['get'](j)[_0x3f9184(0x18b)]({'unitId':_0x16623e[_0x3f9184(0x15d)],'rangeId':_0x38e17d[_0x3f9184(0xf3)]});return _0x48c49c?G(_0x32dcb8,_0x38e17d,_0x48c49c[_0x3f9184(0x137)],W['id']):!0x1;}};function G(_0x1d3fd6,_0x33d2b0,_0x5d23c1,_0x576f5d){const _0x353db2=_0x4136c9;if(!(_0x33d2b0!=null&&_0x33d2b0[_0x353db2(0xf3)]))return!0x1;let _0x3d0c66=K(_0x1d3fd6,_0x33d2b0[_0x353db2(0x15d)],'');if(!_0x3d0c66)return!0x1;let _0x3c3a0d=h({'documentData':_0x3d0c66[_0x353db2(0x1bd)],'resource':_0x3d0c66['resource'],'rangeId':_0x33d2b0[_0x353db2(0xf3)],'text':_0x5d23c1});return _0x3c3a0d?q({'accessor':_0x1d3fd6,'document':_0x3d0c66[_0x353db2(0x1fb)],'unitId':_0x3d0c66[_0x353db2(0x15d)],'trigger':_0x576f5d,'rangeId':_0x33d2b0[_0x353db2(0xf3)],'previousResource':_0x3d0c66[_0x353db2(0x148)],'nextResource':_0x3c3a0d[_0x353db2(0x22b)],'previousDocumentData':_0x3d0c66[_0x353db2(0x1bd)],'nextDocumentData':_0x3c3a0d[_0x353db2(0x149)],'cursorOffset':_0x3c3a0d[_0x353db2(0x1b7)],'externalMutations':{}}):!0x1;}function K(_0x238528,_0x1eeb4d,_0x4c4141){const _0x54cde0=_0x4136c9;if(_0x4c4141)return null;let _0x22c8ee=_0x238528['get'](t['IUniverInstanceService']),_0x38f689=(_0x1eeb4d?_0x22c8ee[_0x54cde0(0x16b)](_0x1eeb4d,t['UniverInstanceType'][_0x54cde0(0x163)]):_0x22c8ee['getCurrentUnitOfType'](t[_0x54cde0(0x110)][_0x54cde0(0x163)]))??null;if(!_0x38f689)return null;let _0x2251ee=_0x38f689[_0x54cde0(0x1eb)](),_0x3d2d37=_0x2251ee[_0x54cde0(0x1f5)];if(_0x2251ee[_0x54cde0(0x1db)]||!_0x3d2d37)return null;let _0x1cd282=_0x238528[_0x54cde0(0xfc)](O);return _0x1cd282[_0x54cde0(0x13e)](_0x38f689[_0x54cde0(0x14c)]())?null:{'document':_0x38f689,'body':_0x3d2d37,'documentData':_0x2251ee,'model':_0x1cd282,'resource':_0x1cd282[_0x54cde0(0x109)](_0x38f689[_0x54cde0(0x14c)]())??c(),'unitId':_0x38f689[_0x54cde0(0x14c)]()};}function be(_0x1b3364,_0x1e9c6a){const _0x5c658c=_0x4136c9;var _0x57a419;return(_0x57a419=_0x1b3364[_0x5c658c(0xfc)](n[_0x5c658c(0x173)])[_0x5c658c(0xf9)]({'subUnitId':_0x1e9c6a,'unitId':_0x1e9c6a}))==null?void 0x0:_0x57a419[0x0];}function xe(_0x44f283,_0xfb75ce,_0x5a87e7){const _0x50084b=_0x4136c9;if((_0x44f283==null?void 0x0:_0x44f283['type'])===_0x50084b(0x1ee)){var _0x1df23a;let _0xa17099=((_0x1df23a=_0xfb75ce[_0x50084b(0x191)])==null?void 0x0:_0x1df23a[_0x50084b(0x1e1)](_0x349a75=>_0x349a75['paragraphId']===_0x44f283[_0x50084b(0x17f)]))??[];if(_0xa17099[_0x50084b(0x13a)]!==0x1)return null;let _0x1735a4=_0xa17099[0x0],_0x4fa515=(0x0,t[_0x50084b(0x1f0)])(_0xfb75ce,_0x1735a4),_0x578f23=_0x1735a4['startIndex']-_0x4fa515,_0x3e9e19=_0x44f283[_0x50084b(0x16a)]===_0x50084b(0x147)?_0x578f23:_0x44f283[_0x50084b(0x16a)];if(!Number['isInteger'](_0x3e9e19)||_0x3e9e19<0x0||_0x3e9e19>_0x578f23)return null;let _0x95e009=_0x4fa515+_0x3e9e19;return{'startOffset':_0x95e009,'endOffset':_0x95e009};}if((_0x44f283==null?void 0x0:_0x44f283['type'])===_0x50084b(0x125))return!Number[_0x50084b(0x167)](_0x44f283[_0x50084b(0x16f)])||!Number['isInteger'](_0x44f283[_0x50084b(0x22e)])?null:{'startOffset':Math[_0x50084b(0x1d4)](_0x44f283['startOffset'],_0x44f283[_0x50084b(0x22e)]),'endOffset':Math[_0x50084b(0x17c)](_0x44f283[_0x50084b(0x16f)],_0x44f283[_0x50084b(0x22e)])};let _0x497772=(_0x44f283==null?void 0x0:_0x44f283[_0x50084b(0x1ff)])===_0x50084b(0x1ba)?_0x44f283[_0x50084b(0x1ba)]:_0x5a87e7;return!_0x497772||_0x497772[_0x50084b(0x150)]?null:{'startOffset':Math[_0x50084b(0x1d4)](_0x497772[_0x50084b(0x16f)],_0x497772['endOffset']),'endOffset':Math[_0x50084b(0x17c)](_0x497772[_0x50084b(0x16f)],_0x497772[_0x50084b(0x22e)])};}function Se(_0x4f9074,_0x49b196,_0x3aeadb,_0x252683){const _0x4abcfc=_0x4136c9;let _0x45144a=_0x4f9074[_0x4abcfc(0xfc)](r[_0x4abcfc(0xfd)]),_0xa17bbe=_0x3aeadb[_0x4abcfc(0x1bf)]('=')?_0x3aeadb[_0x4abcfc(0x200)](0x1):_0x3aeadb,_0x1af408=_0x45144a['sequenceNodesBuilder'](_0xa17bbe);if(!_0x1af408)return null;let _0x3a2065=_0x4f9074[_0x4abcfc(0xfc)](e['HostExternalReferenceModel']),_0x3d4a61=(0x0,e[_0x4abcfc(0x19d)])({'qualifiers':(0x0,e['collectFormulaExternalReferenceQualifiers'])(_0x1af408),'explicitReferences':_0x252683??[],'resolveBinding':_0xf321ed=>_0x3a2065[_0x4abcfc(0x10c)](_0x49b196,_0xf321ed)});return _0x3d4a61[_0x4abcfc(0x1b4)]===_0x4abcfc(0x181)?_0x3d4a61[_0x4abcfc(0x19f)]:null;}function Ce(_0x9f8668,_0x489570,_0xaf196d){const _0x5bfb81=_0x4136c9;var _0xb90fef;let _0x57cf1f=(0x0,t[_0x5bfb81(0x1b5)])(0x6);for(;_0x9f8668!=null&&(_0xb90fef=_0x9f8668[_0x5bfb81(0x103)])!=null&&_0xb90fef['some'](_0x48dd82=>_0x48dd82[_0x5bfb81(0xf3)]===_0x57cf1f)||_0x489570[_0x5bfb81(0x1d5)](_0xaf196d,_0x57cf1f);)_0x57cf1f=(0x0,t['generateRandomId'])(0x6);return _0x57cf1f;}function we(_0x940fd4){try{return te(_0x940fd4);}catch(_0x35a542){if(_0x35a542 instanceof m)return null;throw _0x35a542;}}function Te(_0x32b8a8){const _0x4938c4=_0x4136c9;let _0x29e9fa=_0x32b8a8['previousDocumentData']&&_0x32b8a8[_0x4938c4(0x149)]?De(_0x32b8a8[_0x4938c4(0x1fb)],_0x32b8a8['unitId'],_0x32b8a8[_0x4938c4(0xf5)],_0x32b8a8[_0x4938c4(0x149)],_0x32b8a8[_0x4938c4(0x1b7)],_0x32b8a8[_0x4938c4(0x226)]):null;return _0x32b8a8[_0x4938c4(0xf5)]&&_0x32b8a8['nextDocumentData']&&!_0x29e9fa?null:{'documentRedo':_0x29e9fa,'resourceRedo':{'id':L['id'],'params':{'unitId':_0x32b8a8[_0x4938c4(0x15d)],'resource':_0x32b8a8[_0x4938c4(0x22b)]}},'resourceUndo':{'id':L['id'],'params':{'unitId':_0x32b8a8[_0x4938c4(0x15d)],'resource':_0x32b8a8[_0x4938c4(0x1c2)]}}};}function Ee(_0x2e2d18,_0x54164e,_0xfa144e,_0x19f9b7){const _0x20747=_0x4136c9;_0x19f9b7['pushUndoRedo']({'id':_0x2e2d18[_0x20747(0x226)]+':'+_0x2e2d18['rangeId'],'unitID':_0x2e2d18[_0x20747(0x15d)],'redoMutations':[..._0x2e2d18['externalMutations'][_0x20747(0x218)]?[_0x2e2d18['externalMutations']['redoMutation']]:[],..._0x54164e[_0x20747(0x151)]?[_0x54164e[_0x20747(0x151)]]:[],_0x54164e[_0x20747(0x16e)]],'undoMutations':[_0x54164e[_0x20747(0x1a2)],..._0xfa144e?[_0xfa144e]:[],..._0x2e2d18[_0x20747(0x114)][_0x20747(0x1f6)]?[_0x2e2d18[_0x20747(0x114)]['undoMutation']]:[]]});}function q(_0xce4ebf){const _0x4308ef=_0x4136c9;let _0xff7027=_0xce4ebf[_0x4308ef(0x1c6)]['get'](t[_0x4308ef(0x192)]),_0x7d8434=_0xce4ebf[_0x4308ef(0x1c6)][_0x4308ef(0xfc)](t[_0x4308ef(0x101)]),_0x22041e=_0xce4ebf[_0x4308ef(0x1c6)]['get'](n['DocSelectionManagerService']),_0x2262b0=Te(_0xce4ebf);if(!_0x2262b0)return!0x1;let _0x66684=!0x1,_0x46e40a=null,_0x5360a9=!0x1;try{if(_0xce4ebf['externalMutations'][_0x4308ef(0x218)]){if(!_0xff7027[_0x4308ef(0x1aa)](_0xce4ebf[_0x4308ef(0x114)][_0x4308ef(0x218)]['id'],_0xce4ebf['externalMutations'][_0x4308ef(0x218)][_0x4308ef(0x1be)]))return!0x1;_0x66684=!0x0;}if(_0x2262b0['documentRedo']){let _0x257469=_0xff7027[_0x4308ef(0x1aa)](_0x2262b0['documentRedo']['id'],_0x2262b0['documentRedo'][_0x4308ef(0x1be)]);if(!_0x257469)return J(_0xff7027,_0xce4ebf[_0x4308ef(0x114)],_0x66684),!0x1;_0x46e40a={'id':n['RichTextEditingMutation']['id'],'params':{..._0x257469,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0xff7027[_0x4308ef(0x1aa)](_0x2262b0[_0x4308ef(0x16e)]['id'],_0x2262b0[_0x4308ef(0x16e)][_0x4308ef(0x1be)]))return Oe(_0xff7027,_0x46e40a),J(_0xff7027,_0xce4ebf[_0x4308ef(0x114)],_0x66684),!0x1;_0x5360a9=!0x0,Ee(_0xce4ebf,_0x2262b0,_0x46e40a,_0x7d8434);}catch(_0x210e00){throw _0x5360a9&&_0xff7027[_0x4308ef(0x1aa)](_0x2262b0[_0x4308ef(0x1a2)]['id'],_0x2262b0[_0x4308ef(0x1a2)][_0x4308ef(0x1be)]),Oe(_0xff7027,_0x46e40a),J(_0xff7027,_0xce4ebf[_0x4308ef(0x114)],_0x66684),_0x210e00;}return _0x22041e[_0x4308ef(0x1c4)]([{'startOffset':_0xce4ebf['cursorOffset'],'endOffset':_0xce4ebf['cursorOffset'],'segmentId':''}],{'unitId':_0xce4ebf[_0x4308ef(0x15d)],'subUnitId':_0xce4ebf[_0x4308ef(0x15d)]},!0x1,{[n[_0x4308ef(0x1de)]]:!0x0}),!0x0;}function De(_0x321e03,_0x32b96d,_0x5cd652,_0x348d18,_0x140365,_0x1fd783){const _0x5c8f30=_0x4136c9;let _0x4ef001=ke(_0x5cd652,_0x348d18,(0x0,t[_0x5c8f30(0x11b)])(_0x321e03,''));return _0x4ef001?{'id':n[_0x5c8f30(0x1ec)]['id'],'params':{'unitId':_0x32b96d,'actions':_0x4ef001,'segmentId':'','textRanges':[{'startOffset':_0x140365,'endOffset':_0x140365,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0x1fd783}}:null;}function Oe(_0x3e6a9d,_0x107345){const _0x3865ff=_0x4136c9;_0x107345&&_0x3e6a9d[_0x3865ff(0x1aa)](_0x107345['id'],_0x107345[_0x3865ff(0x1be)]);}function J(_0x584c4a,_0x56bb66,_0x4e3c6f){const _0x3cbca1=_0x4136c9;_0x4e3c6f&&_0x56bb66[_0x3cbca1(0x1f6)]&&_0x584c4a[_0x3cbca1(0x1aa)](_0x56bb66[_0x3cbca1(0x1f6)]['id'],_0x56bb66[_0x3cbca1(0x1f6)]['params']);}function ke(_0xb2dea5,_0x284eba,_0x1f8932){const _0x2f21b9=_0x4136c9;let _0x46e83f=_0xb2dea5['body'],_0x51df84=_0x284eba[_0x2f21b9(0x1f5)],_0x58a87f=Ae(_0x46e83f==null?void 0x0:_0x46e83f[_0x2f21b9(0xf0)],_0x51df84==null?void 0x0:_0x51df84[_0x2f21b9(0xf0)]);if(!_0x58a87f||!_0x51df84)return null;let _0x5adb7c=new t['TextX']();return _0x5adb7c[_0x2f21b9(0x1a4)](_0x58a87f[_0x2f21b9(0x186)]),_0x58a87f[_0x2f21b9(0x22f)]>0x0&&_0x5adb7c[_0x2f21b9(0x179)](_0x58a87f[_0x2f21b9(0x22f)],(0x0,t['getBodySliceForTextXAction'])(_0x51df84,_0x58a87f[_0x2f21b9(0x186)],_0x58a87f[_0x2f21b9(0x186)]+_0x58a87f['insertLength'],!0x1)),_0x58a87f[_0x2f21b9(0x1c9)]>0x0&&_0x5adb7c['delete'](_0x58a87f[_0x2f21b9(0x1c9)]),t[_0x2f21b9(0x153)]['getInstance']()['editOp'](_0x5adb7c[_0x2f21b9(0x206)](),_0x1f8932);}function Ae(_0x2780b6,_0x312fd3){const _0x2675a3=_0x4136c9;if(_0x2780b6==null||_0x312fd3==null||_0x2780b6===_0x312fd3)return null;let _0x40eb16=0x0;for(;_0x40eb16<_0x2780b6[_0x2675a3(0x13a)]&&_0x40eb16<_0x312fd3[_0x2675a3(0x13a)]&&_0x2780b6[_0x40eb16]===_0x312fd3[_0x40eb16];)_0x40eb16+=0x1;let _0x1a2f15=_0x2780b6[_0x2675a3(0x13a)],_0x513fd8=_0x312fd3[_0x2675a3(0x13a)];for(;_0x1a2f15>_0x40eb16&&_0x513fd8>_0x40eb16&&_0x2780b6[_0x1a2f15-0x1]===_0x312fd3[_0x513fd8-0x1];)--_0x1a2f15,--_0x513fd8;return{'start':_0x40eb16,'deleteLength':_0x1a2f15-_0x40eb16,'insertLength':_0x513fd8-_0x40eb16};}function je(_0x161713){const _0x26904f=_0x4136c9;return{'schemaVersion':0x1,'formulas':Object[_0x26904f(0x209)](Object[_0x26904f(0x176)](_0x161713[_0x26904f(0x1e2)])[_0x26904f(0x166)](([_0x2686a6,_0x414fff])=>[_0x2686a6,{..._0x414fff,..._0x414fff[_0x26904f(0x20b)]?{'numberFormat':{..._0x414fff[_0x26904f(0x20b)]}}:null,..._0x414fff['lastValue']?{'lastValue':{..._0x414fff[_0x26904f(0x145)]}}:null}]))};}let Y=class extends t['Disposable']{constructor(_0x3df394,_0x16d376,_0x537328,_0x34aee8){const _0x1c2cf5=_0x4136c9;super(),this[_0x1c2cf5(0x19a)]=_0x3df394,this[_0x1c2cf5(0x1e5)]=_0x16d376,this[_0x1c2cf5(0xf2)]=_0x537328,this[_0x1c2cf5(0x202)]=_0x34aee8,D(this,_0x1c2cf5(0x1a5),new Set()),D(this,'_syncScheduled',!0x1),D(this,_0x1c2cf5(0x133),!0x1),this[_0x1c2cf5(0x19a)]['getAllUnitsForType'](t[_0x1c2cf5(0x110)][_0x1c2cf5(0x163)])[_0x1c2cf5(0x1a1)](_0x44d67a=>this[_0x1c2cf5(0x202)][_0x1c2cf5(0xf4)](_0x44d67a)),this[_0x1c2cf5(0x1bb)](this[_0x1c2cf5(0xf2)][_0x1c2cf5(0x12a)][_0x1c2cf5(0x21a)](({unitId:_0x50b220})=>this[_0x1c2cf5(0x14e)](_0x50b220))),this['disposeWithMe'](this[_0x1c2cf5(0x19a)]['unitAdded$'][_0x1c2cf5(0x21a)](({unit:_0x43a644})=>{const _0x559b2b=_0x1c2cf5;_0x43a644['type']===t[_0x559b2b(0x110)][_0x559b2b(0x163)]&&this[_0x559b2b(0x1a0)](_0x43a644['getUnitId']());})),this[_0x1c2cf5(0x1bb)](this[_0x1c2cf5(0x19a)][_0x1c2cf5(0x17e)]['subscribe'](_0x58c6aa=>{const _0x1c77e7=_0x1c2cf5;this[_0x1c77e7(0x202)][_0x1c77e7(0x219)](_0x58c6aa[_0x1c77e7(0x14c)]());})),this[_0x1c2cf5(0x1bb)](this[_0x1c2cf5(0x1e5)][_0x1c2cf5(0x1ce)](_0x14a8c1=>{const _0x2ce598=_0x1c2cf5;if(_0x14a8c1['id']===n['RichTextEditingMutation']['id']&&Me(_0x14a8c1[_0x2ce598(0x1be)])){let _0x241738=_0x14a8c1[_0x2ce598(0x1be)];_0x241738[_0x2ce598(0x150)]||this[_0x2ce598(0x14e)](_0x241738['unitId']);}}));}[_0x4136c9(0x1fc)](){const _0x5c2a17=_0x4136c9;this['_isDisposed']=!0x0,super[_0x5c2a17(0x1fc)]();}[_0x4136c9(0x1a0)](_0x2d1038){const _0x238633=_0x4136c9;this[_0x238633(0x1a5)][_0x238633(0x10b)](_0x2d1038),!this[_0x238633(0x198)]&&(this[_0x238633(0x198)]=!0x0,queueMicrotask(()=>{const _0x461301=_0x238633;if(this[_0x461301(0x198)]=!0x1,this['_isDisposed'])return;let _0x5770b2=Array[_0x461301(0x21b)](this[_0x461301(0x1a5)]);this['_pendingUnitIds'][_0x461301(0x213)](),_0x5770b2[_0x461301(0x1a1)](_0x2aef85=>this['_syncUnit'](_0x2aef85));}));}[_0x4136c9(0x14e)](_0x1f16e5){const _0x4e9d3f=_0x4136c9;let _0x4f6b43=this[_0x4e9d3f(0x19a)][_0x4e9d3f(0x16b)](_0x1f16e5,t['UniverInstanceType'][_0x4e9d3f(0x163)]);_0x4f6b43&&this[_0x4e9d3f(0x202)][_0x4e9d3f(0xf4)](_0x4f6b43);}};Y=A([k(0x0,t['IUniverInstanceService']),k(0x1,t[_0x4136c9(0x192)]),k(0x2,(0x0,t[_0x4136c9(0x172)])(O)),k(0x3,(0x0,t[_0x4136c9(0x172)])(j))],Y);function Me(_0x32d9cb){const _0x1355ed=_0x4136c9;return typeof _0x32d9cb==_0x1355ed(0x217)&&!!_0x32d9cb&&_0x1355ed(0x15d)in _0x32d9cb&&typeof _0x32d9cb[_0x1355ed(0x15d)]==_0x1355ed(0x122)&&(!(_0x1355ed(0x150)in _0x32d9cb)||_0x32d9cb[_0x1355ed(0x150)]===void 0x0||typeof _0x32d9cb[_0x1355ed(0x150)]==_0x1355ed(0x122));}let X=class extends t[_0x4136c9(0x208)]{constructor(_0x192be5,_0x33c170){const _0xf190e4=_0x4136c9;super(),this[_0xf190e4(0x189)]=_0x192be5,this['_docFormulaModel']=_0x33c170,this[_0xf190e4(0x1bb)](this[_0xf190e4(0x189)][_0xf190e4(0x1a6)]({'pluginName':o,'businesses':[t[_0xf190e4(0x110)][_0xf190e4(0x163)]],'toJson':_0x57c662=>JSON['stringify'](this[_0xf190e4(0x1cc)][_0xf190e4(0x206)](_0x57c662)),'parseJson':_0x36a906=>JSON[_0xf190e4(0x21d)](_0x36a906),'onLoad':(_0x45d560,_0x26328b)=>{const _0xb9c2a0=_0xf190e4;this[_0xb9c2a0(0x1cc)]['load'](_0x45d560,_0x26328b);},'onUnLoad':_0x34ffde=>this[_0xf190e4(0x1cc)]['removeUnit'](_0x34ffde)}));}};X=A([k(0x0,t['IResourceManagerService']),k(0x1,(0x0,t[_0x4136c9(0x172)])(O))],X);var Ne='@univerjs-pro/docs-formula',Pe=_0x4136c9(0x14f);const Fe={};let Z=class extends t[_0x4136c9(0x208)]{constructor(_0x103a66,_0x21ab71,_0x49291f){const _0x29b623=_0x4136c9;super(),this[_0x29b623(0x1e9)]=_0x103a66,this['_formulaService']=_0x21ab71,this[_0x29b623(0x1bb)](_0x49291f[_0x29b623(0x1b1)]({'resolve':(_0x3f7cd8,_0x21e500)=>{const _0x434c9f=_0x29b623;var _0x112eb6;return((_0x112eb6=_0x21e500[_0x434c9f(0x103)])==null?void 0x0:_0x112eb6['filter'](g)[_0x434c9f(0x166)](_0x5d904c=>({'startOffset':_0x5d904c[_0x434c9f(0x1fe)],'endOffset':_0x5d904c['endIndex']+0x1,'text':this['resolveFormula'](_0x3f7cd8,_0x5d904c[_0x434c9f(0xf3)])})))??[];}})),this[_0x29b623(0x1bb)](this[_0x29b623(0x1b3)][_0x29b623(0x1da)][_0x29b623(0x21a)](({unitId:_0x2b8fd7})=>{const _0x2927df=_0x29b623;_0x49291f[_0x2927df(0x165)](_0x2b8fd7);}));}[_0x4136c9(0x1ea)](_0x3b2fb5,_0xeab22f){const _0x1f8efd=_0x4136c9;var _0x71aefd;return((_0x71aefd=this[_0x1f8efd(0x1b3)][_0x1f8efd(0x18b)]({'unitId':_0x3b2fb5,'rangeId':_0xeab22f}))==null?void 0x0:_0x71aefd[_0x1f8efd(0x137)])??'';}[_0x4136c9(0x16d)](_0x19cd77,_0x2ca7d2,_0xfa185b){const _0x29e26b=_0x4136c9;var _0x19d577;let _0x6f54b3=this['_univerInstanceService'][_0x29e26b(0x16b)](_0x19cd77,t[_0x29e26b(0x110)][_0x29e26b(0x163)]),_0x124251=_0x6f54b3==null?void 0x0:_0x6f54b3[_0x29e26b(0x11a)]();if(!_0x124251)return'';let _0x16d5f4=_0x124251['dataStream'][_0x29e26b(0x200)](_0x2ca7d2,_0xfa185b),_0x3143bb=((_0x19d577=_0x124251[_0x29e26b(0x103)])==null?void 0x0:_0x19d577[_0x29e26b(0x1e1)](_0x44bf06=>g(_0x44bf06)&&_0x44bf06[_0x29e26b(0x1fe)]>=_0x2ca7d2&&_0x44bf06[_0x29e26b(0x20f)]<_0xfa185b)[_0x29e26b(0x1e4)]((_0x4f9b94,_0x3a9025)=>_0x3a9025[_0x29e26b(0x1fe)]-_0x4f9b94[_0x29e26b(0x1fe)]))??[];for(let _0x53113a of _0x3143bb){let _0x47a57b=_0x53113a[_0x29e26b(0x1fe)]-_0x2ca7d2,_0x107300=_0x53113a['endIndex']-_0x2ca7d2+0x1;_0x16d5f4=''+_0x16d5f4[_0x29e26b(0x200)](0x0,_0x47a57b)+this[_0x29e26b(0x1ea)](_0x19cd77,_0x53113a[_0x29e26b(0xf3)])+_0x16d5f4[_0x29e26b(0x200)](_0x107300);}return _0x16d5f4;}[_0x4136c9(0xfa)](_0x382dba){return Ie(_0x382dba);}[_0x4136c9(0x107)](_0x1077fa,_0x3f8a67,_0x523294={}){const _0x2f9798=_0x4136c9;var _0x1eb81b;return re({'id':_0x1077fa,'body':_0x3f8a67,'documentStyle':{}},(((_0x1eb81b=_0x3f8a67['customRanges'])==null?void 0x0:_0x1eb81b[_0x2f9798(0x1e1)](g))??[])['map'](_0x1adec7=>({'rangeId':_0x1adec7['rangeId'],'text':_0x523294[_0x1adec7[_0x2f9798(0xf3)]]??this[_0x2f9798(0x1ea)](_0x1077fa,_0x1adec7[_0x2f9798(0xf3)])})))[_0x2f9798(0x1f5)]??{'dataStream':''};}};Z=A([k(0x0,t[_0x4136c9(0x144)]),k(0x1,(0x0,t[_0x4136c9(0x172)])(j)),k(0x2,(0x0,t['Inject'])(n[_0x4136c9(0x216)]))],Z);function Ie(_0x7c15ae){const _0x6ad3e2=_0x4136c9;var _0x3ccb43,_0x55ef02;let _0x5df77d=Le(_0x7c15ae),_0xefeb35=re(_0x7c15ae,(((_0x3ccb43=_0x7c15ae[_0x6ad3e2(0x1f5)])==null||(_0x3ccb43=_0x3ccb43['customRanges'])==null?void 0x0:_0x3ccb43['filter'](g))??[])[_0x6ad3e2(0x166)](_0x16326c=>({'rangeId':_0x16326c['rangeId'],'text':Re(_0x5df77d==null?void 0x0:_0x5df77d[_0x6ad3e2(0x1e2)][_0x16326c[_0x6ad3e2(0xf3)]])})));return _0xefeb35[_0x6ad3e2(0x1d2)]=(_0x55ef02=_0xefeb35['resources'])==null?void 0x0:_0x55ef02[_0x6ad3e2(0x1e1)](_0x39bfda=>_0x39bfda['name']!==o),_0xefeb35;}function Le(_0x28b1d1){const _0x3e9459=_0x4136c9;var _0x3fe929;let _0xd5029f=(_0x3fe929=_0x28b1d1[_0x3e9459(0x1d2)])==null||(_0x3fe929=_0x3fe929[_0x3e9459(0x124)](_0x44ab29=>_0x44ab29[_0x3e9459(0x1c8)]===_0x3e9459(0x116)))==null?void 0x0:_0x3fe929[_0x3e9459(0x1dd)];if(_0xd5029f)try{let _0x4af4a7=JSON[_0x3e9459(0x21d)](_0xd5029f);return l(_0x4af4a7)?_0x4af4a7:void 0x0;}catch{return;}}function Re(_0x2494fb){const _0xa07cb3=_0x4136c9;return _0x2494fb?(0x0,e[_0xa07cb3(0x10e)])({'lastValue':_0x2494fb[_0xa07cb3(0x145)],'numberFormat':_0x2494fb[_0xa07cb3(0x20b)]})[_0xa07cb3(0x137)]:'';}let Q=class extends t['Disposable']{constructor(_0x4cb7d4,_0x5a799f,_0x4355de){const _0x120a06=_0x4136c9;super(),this[_0x120a06(0x1b3)]=_0x4cb7d4,this[_0x120a06(0x11c)]=_0x5a799f,this[_0x120a06(0x1bb)](_0x4355de[_0x120a06(0x1c5)](this));}['collectMutations'](_0x40ce32){const _0x564847=_0x4136c9;let _0x272cbc=new Map();for(let _0x29296f of this['_formulaService'][_0x564847(0x210)]()){var _0x2215b0;if(!this[_0x564847(0x11c)][_0x564847(0x19c)](_0x29296f['config'][_0x564847(0x220)],_0x29296f[_0x564847(0xfe)])[_0x564847(0x1d8)])continue;let _0xf492ec=(0x0,e[_0x564847(0x21f)])(_0x29296f[_0x564847(0xfe)]),_0x32e529=_0xf492ec?(0x0,e[_0x564847(0x177)])(_0xf492ec):null;if(!_0x32e529||ze(_0x29296f[_0x564847(0x1ab)][_0x564847(0x145)],_0x32e529))continue;let _0x5866d6=_0x272cbc[_0x564847(0xfc)](_0x29296f[_0x564847(0x1e3)][_0x564847(0x15d)])??[];_0x5866d6[_0x564847(0x18c)]({'rangeId':_0x29296f[_0x564847(0x1e3)][_0x564847(0xf3)],'expectedFormula':_0x29296f[_0x564847(0x1ab)][_0x564847(0x220)],'expectedNumberFormat':(_0x2215b0=_0x29296f[_0x564847(0x1ab)][_0x564847(0x20b)])==null?void 0x0:_0x2215b0['pattern'],'expectedReferenceRevision':_0x29296f['referenceRevision'],'lastValue':_0x32e529}),_0x272cbc[_0x564847(0x1d0)](_0x29296f[_0x564847(0x1e3)][_0x564847(0x15d)],_0x5866d6);}return Array[_0x564847(0x21b)](_0x272cbc,([_0x26fd66,_0x47d124])=>({'id':R['id'],'params':{'unitId':_0x26fd66,'updates':_0x47d124}}));}};Q=A([k(0x0,(0x0,t[_0x4136c9(0x172)])(j)),k(0x1,(0x0,t[_0x4136c9(0x172)])(e[_0x4136c9(0x1a3)])),k(0x2,(0x0,t[_0x4136c9(0x172)])(e['FormulaLastValuePersistenceService']))],Q);function ze(_0x480a9e,_0x85b674){const _0x46ee50=_0x4136c9;return(_0x480a9e==null?void 0x0:_0x480a9e['v'])===_0x85b674['v']&&(_0x480a9e==null?void 0x0:_0x480a9e['t'])===_0x85b674['t']&&(_0x480a9e==null?void 0x0:_0x480a9e[_0x46ee50(0x168)])===_0x85b674[_0x46ee50(0x168)];}let $=class extends t[_0x4136c9(0x185)]{constructor(_0x35655f=Fe,_0x59b549,_0x41fc24,_0x40e3c8){const _0x26f9ae=_0x4136c9;super(),this['_config']=_0x35655f,this[_0x26f9ae(0x131)]=_0x59b549,this['_commandService']=_0x41fc24,this[_0x26f9ae(0x159)]=_0x40e3c8;let {..._0x1e8557}=(0x0,t[_0x26f9ae(0x160)])({},Fe,this['_config']);this[_0x26f9ae(0x159)]['setConfig'](_0x26f9ae(0x1f2),_0x1e8557);}['onStarting'](){const _0x4fccd0=_0x4136c9;this[_0x4fccd0(0x131)]['add']([O]),this[_0x4fccd0(0x131)]['add']([j]),this[_0x4fccd0(0x131)][_0x4fccd0(0x10b)]([X]),this[_0x4fccd0(0x131)][_0x4fccd0(0x10b)]([Y]),this[_0x4fccd0(0x131)][_0x4fccd0(0x10b)]([Q]),this['_injector'][_0x4fccd0(0x10b)]([Z]),(0x0,t[_0x4fccd0(0x1f1)])(this[_0x4fccd0(0x131)],[[O],[X],[Y],[Q],[Z]]),[F,I,L,R,z,B,V,H,U,W]['forEach'](_0x18aecb=>this['disposeWithMe'](this[_0x4fccd0(0x1e5)]['registerCommand'](_0x18aecb)));}};D($,_0x4136c9(0x1f3),o),D($,_0x4136c9(0x1ac),Ne),D($,_0x4136c9(0x141),Pe),D($,'type',t[_0x4136c9(0x110)][_0x4136c9(0x163)]),$=A([(0x0,t[_0x4136c9(0x223)])(a[_0x4136c9(0x224)],e[_0x4136c9(0x1df)],n[_0x4136c9(0x108)]),k(0x1,(0x0,t[_0x4136c9(0x172)])(t['Injector'])),k(0x2,t[_0x4136c9(0x192)]),k(0x3,t['IConfigService'])],$),exports[_0x4136c9(0x1ed)]=W,exports[_0x4136c9(0x1ae)]=s,exports['DOC_FORMULA_OBJECT_REPLACEMENT']='',exports[_0x4136c9(0x116)]=o,exports['DOC_FORMULA_SCHEMA_VERSION']=0x1,Object['defineProperty'](exports,_0x4136c9(0x14b),{'enumerable':!0x0,'get':function(){return Z;}}),Object[_0x4136c9(0x211)](exports,_0x4136c9(0x174),{'enumerable':!0x0,'get':function(){return Y;}}),exports['DocFormulaModel']=O,Object[_0x4136c9(0x211)](exports,'DocFormulaResourceController',{'enumerable':!0x0,'get':function(){return X;}}),exports[_0x4136c9(0x190)]=ve,Object[_0x4136c9(0x211)](exports,_0x4136c9(0x115),{'enumerable':!0x0,'get':function(){return j;}}),exports[_0x4136c9(0x18f)]=z,exports[_0x4136c9(0x128)]=m,exports[_0x4136c9(0x10d)]=H,exports['RemoveDocFormulaMutation']=I,exports[_0x4136c9(0x1f7)]=U,exports[_0x4136c9(0x154)]=R,exports[_0x4136c9(0x22a)]=F,exports[_0x4136c9(0x1f4)]=V,exports[_0x4136c9(0x1e8)]=L,Object[_0x4136c9(0x211)](exports,_0x4136c9(0x17d),{'enumerable':!0x0,'get':function(){return $;}}),exports[_0x4136c9(0x155)]=B,exports[_0x4136c9(0xf1)]=ie,exports[_0x4136c9(0x152)]=te,exports['buildRemoveDocFormulaActions']=h,exports[_0x4136c9(0x201)]=ne,exports[_0x4136c9(0x1cb)]=c,exports[_0x4136c9(0x229)]=Ie,exports[_0x4136c9(0x18e)]=_,exports['isDocFormulaConfig']=u,exports['isDocFormulaRange']=g,exports[_0x4136c9(0x16c)]=l,exports[_0x4136c9(0x11e)]=d;
package/lib/es/facade.js CHANGED
@@ -1 +1 @@
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};
1
+ var _0x2b355b=_0x3a44;(function(_0x3b99bc,_0x4a9c94){var _0x205c82=_0x3a44,_0x4bf381=_0x3b99bc();while(!![]){try{var _0x3785b0=-parseInt(_0x205c82(0x1d2))/0x1*(-parseInt(_0x205c82(0x190))/0x2)+-parseInt(_0x205c82(0x19f))/0x3+parseInt(_0x205c82(0x1ac))/0x4+-parseInt(_0x205c82(0x18a))/0x5+parseInt(_0x205c82(0x1b3))/0x6+parseInt(_0x205c82(0x192))/0x7+-parseInt(_0x205c82(0x193))/0x8;if(_0x3785b0===_0x4a9c94)break;else _0x4bf381['push'](_0x4bf381['shift']());}catch(_0x4d233e){_0x4bf381['push'](_0x4bf381['shift']());}}}(_0x3b5e,0x58081));import{ConvertDocFormulaToTextCommand as _0x2d4520,DocFormulaDisplayTextService as _0xb17991,DocFormulaModel as _0x32fc45,DocFormulaService as _0x5bf394,InsertDocFormulaCommand as _0x3e5dad,RemoveDocFormulaCommand as _0x3eeb8c,ReplaceDocFormulaWithTextCommand as _0x497f52,SetDocFormulaNumberFormatCommand as _0x5dba3c,UpdateDocFormulaCommand as _0x9bf949,isDocFormulaRange as _0x3a1bb9}from'@univerjs-pro/docs-formula';import{ICommandService as _0x128e28,IResourceLoaderService as _0xcfcf25,IUniverInstanceService as _0x23abd6,Inject as _0x2f2ecf,UniverInstanceType as _0x5a4427}from'@univerjs/core';import{FDocument as _0x1cb9b3,FDocumentParagraph as _0x477006,FDocumentTextRange as _0xe94339}from'@univerjs/docs/facade';function v(_0x558cab,_0x40a1cc){return function(_0x4af14b,_0x55fda7){_0x40a1cc(_0x4af14b,_0x55fda7,_0x558cab);};}function y(_0x3795b2,_0x507c35,_0x2038e8,_0x1aaa30){var _0xef8a6c=_0x3a44,_0x3016e6=arguments['length'],_0x36f69a=_0x3016e6<0x3?_0x507c35:_0x1aaa30===null?_0x1aaa30=Object['getOwnPropertyDescriptor'](_0x507c35,_0x2038e8):_0x1aaa30,_0x217356;if(typeof Reflect==_0xef8a6c(0x1b1)&&typeof Reflect[_0xef8a6c(0x1c7)]==_0xef8a6c(0x1bf))_0x36f69a=Reflect['decorate'](_0x3795b2,_0x507c35,_0x2038e8,_0x1aaa30);else{for(var _0x48fc6d=_0x3795b2[_0xef8a6c(0x1c5)]-0x1;_0x48fc6d>=0x0;_0x48fc6d--)(_0x217356=_0x3795b2[_0x48fc6d])&&(_0x36f69a=(_0x3016e6<0x3?_0x217356(_0x36f69a):_0x3016e6>0x3?_0x217356(_0x507c35,_0x2038e8,_0x36f69a):_0x217356(_0x507c35,_0x2038e8))||_0x36f69a);}return _0x3016e6>0x3&&_0x36f69a&&Object[_0xef8a6c(0x1a3)](_0x507c35,_0x2038e8,_0x36f69a),_0x36f69a;}let b=class{constructor(_0x533d09,_0x2d879f,_0x2451b0,_0x3272f3,_0x280091,_0x1d3e0e){var _0x2e43d7=_0x3a44;this[_0x2e43d7(0x1a8)]=_0x533d09,this[_0x2e43d7(0x1c1)]=_0x2d879f,this[_0x2e43d7(0x1ab)]=_0x2451b0,this['_model']=_0x3272f3,this['_service']=_0x280091,this[_0x2e43d7(0x1b9)]=_0x1d3e0e;}[_0x2b355b(0x1b2)](){var _0x524c58=_0x2b355b;return this[_0x524c58(0x1c1)];}[_0x2b355b(0x19c)](){var _0x59abd3=_0x2b355b;let _0x321151=this[_0x59abd3(0x18b)]();return _0x321151?{'endOffset':_0x321151['endIndex']+0x1,'rangeId':_0x321151[_0x59abd3(0x195)],'startOffset':_0x321151[_0x59abd3(0x199)]}:null;}[_0x2b355b(0x1b8)](){var _0x2e643a=_0x2b355b,_0x1b162e;return((_0x1b162e=this[_0x2e643a(0x1cf)][_0x2e643a(0x1b8)](this[_0x2e643a(0x1a8)],this[_0x2e643a(0x1c1)]))==null?void 0x0:_0x1b162e[_0x2e643a(0x19e)])??'';}[_0x2b355b(0x197)](){var _0x351545=_0x2b355b;return this[_0x351545(0x1cf)][_0x351545(0x1b8)](this[_0x351545(0x1a8)],this[_0x351545(0x1c1)])??null;}['getResult'](){var _0x469f77=_0x2b355b;return this['_service'][_0x469f77(0x1ae)]({'unitId':this[_0x469f77(0x1a8)],'rangeId':this['_rangeId']})??null;}['describe'](){var _0x42f651=_0x2b355b;let _0x147ae0=this[_0x42f651(0x19c)](),_0x187639=this[_0x42f651(0x197)](),_0x3f2874=this['getResult']();return!_0x147ae0||!_0x187639||!_0x3f2874?null:{..._0x147ae0,'config':_0x187639,'formula':_0x187639[_0x42f651(0x19e)],'result':_0x3f2874,'type':_0x42f651(0x19e)};}['update'](_0x45ecf7){var _0x23646f=_0x2b355b;return this['_commandService'][_0x23646f(0x18c)](_0x9bf949['id'],{'externalReferences':_0x45ecf7['externalReferences'],'formula':_0x45ecf7[_0x23646f(0x19e)],'numberFormat':_0x45ecf7['numberFormat'],'rangeId':this[_0x23646f(0x1c1)],'unitId':this[_0x23646f(0x1a8)]});}[_0x2b355b(0x1a5)](_0x2ae9e6){var _0x1acf0f=_0x2b355b;return this[_0x1acf0f(0x1ab)][_0x1acf0f(0x18c)](_0x5dba3c['id'],{'numberFormat':_0x2ae9e6,'rangeId':this['_rangeId'],'unitId':this['_unitId']});}[_0x2b355b(0x19a)](){var _0x349c08=_0x2b355b;return this[_0x349c08(0x1ab)]['syncExecuteCommand'](_0x3eeb8c['id'],{'rangeId':this[_0x349c08(0x1c1)],'unitId':this[_0x349c08(0x1a8)]});}[_0x2b355b(0x1c9)](_0x3d05f6){var _0x55f668=_0x2b355b;return this[_0x55f668(0x1ab)][_0x55f668(0x18c)](_0x497f52['id'],{'rangeId':this[_0x55f668(0x1c1)],'text':_0x3d05f6,'unitId':this[_0x55f668(0x1a8)]});}[_0x2b355b(0x1cc)](){var _0x4a2b0a=_0x2b355b;return this[_0x4a2b0a(0x1ab)]['syncExecuteCommand'](_0x2d4520['id'],{'rangeId':this[_0x4a2b0a(0x1c1)],'unitId':this[_0x4a2b0a(0x1a8)]});}['_getCustomRange'](){var _0x4b8c6e=_0x2b355b,_0x18a5d5;let _0x161d28=this[_0x4b8c6e(0x1b9)][_0x4b8c6e(0x1c2)](this[_0x4b8c6e(0x1a8)],_0x5a4427[_0x4b8c6e(0x1b4)]);return _0x161d28==null||(_0x18a5d5=_0x161d28['getSnapshot']()['body'])==null||(_0x18a5d5=_0x18a5d5[_0x4b8c6e(0x1cd)])==null?void 0x0:_0x18a5d5[_0x4b8c6e(0x1d1)](_0x1f7d5e=>_0x1f7d5e[_0x4b8c6e(0x195)]===this[_0x4b8c6e(0x1c1)]&&_0x3a1bb9(_0x1f7d5e));}};b=y([v(0x2,_0x128e28),v(0x3,_0x2f2ecf(_0x32fc45)),v(0x4,_0x2f2ecf(_0x5bf394)),v(0x5,_0x23abd6)],b);function x(_0x32b2e8){'@babel/helpers - typeof';var _0x2b02d8=_0x2b355b;return x=typeof Symbol=='function'&&typeof Symbol[_0x2b02d8(0x1a1)]=='symbol'?function(_0x396b3e){return typeof _0x396b3e;}:function(_0x504d0f){var _0x12042d=_0x2b02d8;return _0x504d0f&&typeof Symbol==_0x12042d(0x1bf)&&_0x504d0f[_0x12042d(0x1b7)]===Symbol&&_0x504d0f!==Symbol[_0x12042d(0x18f)]?_0x12042d(0x1a6):typeof _0x504d0f;},x(_0x32b2e8);}function S(_0x395844,_0x4f7aa0){var _0x8dafe9=_0x2b355b;if(x(_0x395844)!=_0x8dafe9(0x1b1)||!_0x395844)return _0x395844;var _0x5d5e5e=_0x395844[Symbol[_0x8dafe9(0x198)]];if(_0x5d5e5e!==void 0x0){var _0x59d213=_0x5d5e5e[_0x8dafe9(0x1ce)](_0x395844,_0x4f7aa0||_0x8dafe9(0x191));if(x(_0x59d213)!='object')return _0x59d213;throw TypeError(_0x8dafe9(0x1c6));}return(_0x4f7aa0===_0x8dafe9(0x1c0)?String:Number)(_0x395844);}function C(_0x38fd36){var _0x3fff0d=_0x2b355b,_0x3e2604=S(_0x38fd36,_0x3fff0d(0x1c0));return x(_0x3e2604)==_0x3fff0d(0x1a6)?_0x3e2604:_0x3e2604+'';}function w(_0x1313de,_0x2c3e53,_0x5b5c4f){var _0x27a84d=_0x2b355b;return(_0x2c3e53=C(_0x2c3e53))in _0x1313de?Object[_0x27a84d(0x1a3)](_0x1313de,_0x2c3e53,{'value':_0x5b5c4f,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1313de[_0x2c3e53]=_0x5b5c4f,_0x1313de;}var T=class extends _0x1cb9b3{constructor(..._0x2d01d5){var _0x77f48a=_0x2b355b;super(..._0x2d01d5),w(this,_0x77f48a(0x1bd),void 0x0),w(this,_0x77f48a(0x1b6),void 0x0),w(this,_0x77f48a(0x1ca),void 0x0),w(this,_0x77f48a(0x18e),void 0x0);}['_initialize'](_0x1bc0b6){var _0x6493a8=_0x2b355b;this[_0x6493a8(0x1bd)]=_0x1bc0b6[_0x6493a8(0x196)](_0x128e28),this[_0x6493a8(0x1b6)]=_0x1bc0b6[_0x6493a8(0x196)](_0xb17991),this[_0x6493a8(0x1ca)]=_0x1bc0b6[_0x6493a8(0x196)](_0x32fc45),this['_docsFormulaResourceLoaderService']=_0x1bc0b6[_0x6493a8(0x196)](_0xcfcf25);}[_0x2b355b(0x1b0)](){var _0x488e46=_0x2b355b;return this[_0x488e46(0x1d0)]()[_0x488e46(0x1c4)](_0x3cdc72=>this[_0x488e46(0x1aa)](_0x3cdc72['rangeId']));}[_0x2b355b(0x1b8)](_0x2efd01){var _0x38170d=_0x2b355b;return this[_0x38170d(0x1d0)]()[_0x38170d(0x1a9)](_0x29dc0d=>_0x29dc0d[_0x38170d(0x195)]===_0x2efd01)?this[_0x38170d(0x1aa)](_0x2efd01):null;}[_0x2b355b(0x19b)](_0x3febe2){var _0x167dad=_0x2b355b;let _0x431509=this[_0x167dad(0x1d0)]()['find'](_0x560648=>_0x560648['startIndex']<=_0x3febe2&&_0x3febe2<=_0x560648['endIndex']);return _0x431509?this[_0x167dad(0x1aa)](_0x431509[_0x167dad(0x195)]):null;}[_0x2b355b(0x1be)](){var _0x4aa8c1=_0x2b355b;let _0x28a557=this[_0x4aa8c1(0x18e)][_0x4aa8c1(0x1d4)](this['id']);if(!_0x28a557)throw Error(_0x4aa8c1(0x18d)+this['id']+_0x4aa8c1(0x1d5));return this['_docsFormulaDisplayTextService'][_0x4aa8c1(0x1af)](_0x28a557);}[_0x2b355b(0x1c8)](_0x41d33d){var _0x191160=_0x2b355b;return this[_0x191160(0x1a2)]({'externalReferences':_0x41d33d[_0x191160(0x1bb)],'formula':_0x41d33d['formula'],'numberFormat':_0x41d33d[_0x191160(0x1b5)],'target':{'type':_0x191160(0x1a7),'startOffset':_0x41d33d[_0x191160(0x1ba)],'endOffset':_0x41d33d['endOffset']},'unitId':this[_0x191160(0x1b2)]()});}[_0x2b355b(0x1a2)](_0x46ed4e){var _0x120a7d=_0x2b355b;let _0x132226=this['_docsFormulaCommandService'][_0x120a7d(0x18c)](_0x3e5dad['id'],_0x46ed4e);return _0x132226?this[_0x120a7d(0x1aa)](_0x132226['rangeId']):null;}[_0x2b355b(0x1d0)](){var _0x1d58c3=_0x2b355b,_0x116043;let _0xb34047=this[_0x1d58c3(0x1ca)]['getFormulas'](this[_0x1d58c3(0x1b2)]());return((_0x116043=this[_0x1d58c3(0x1c3)]('')[_0x1d58c3(0x1cd)])==null?void 0x0:_0x116043['filter'](_0x258602=>_0x3a1bb9(_0x258602)&&_0xb34047[_0x258602[_0x1d58c3(0x195)]]!=null))??[];}['_createFormula'](_0x3cadc1){var _0x59c9da=_0x2b355b;return this[_0x59c9da(0x1a0)]['createInstance'](b,this[_0x59c9da(0x1b2)](),_0x3cadc1);}};_0x1cb9b3['extend'](T);function _0x3b5e(){var _0x290e25=['_insert','defineProperty','createInstance','setNumberFormat','symbol','range','_unitId','some','_createFormula','_commandService','2256652GmuLhb','end','getResult','degradeDocumentData','getFormulas','object','getId','794124FRKoMV','UNIVER_DOC','numberFormat','_docsFormulaDisplayTextService','constructor','getFormula','_univerInstanceService','startOffset','externalReferences','_document','_docsFormulaCommandService','saveFormulaDisplayTextSnapshot','function','string','_rangeId','getUnit','getBody','map','length','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','decorate','insertFormula','replaceWithText','_docsFormulaModel','getSegmentId','convertToText','customRanges','call','_model','_getCompleteRanges','find','5VqnOuw','replaceWithFormula','saveUnit','\x20could\x20not\x20be\x20serialized.','365840jGNHzE','_getCustomRange','syncExecuteCommand','Document\x20','_docsFormulaResourceLoaderService','prototype','106250feYDGj','default','2654498EkXvZH','6966968rLuuwy','_initialize','rangeId','get','getConfig','toPrimitive','startIndex','remove','getFormulaAt','getRange','extend','formula','110220RQLZiJ','_injector','iterator'];_0x3b5e=function(){return _0x290e25;};return _0x3b5e();}var E=class extends _0x477006{constructor(..._0x13cc1b){var _0x23ef8e=_0x2b355b;super(..._0x13cc1b),w(this,_0x23ef8e(0x1bd),void 0x0);}['_initialize'](_0x374214){var _0x5e1903=_0x2b355b;this[_0x5e1903(0x1bd)]=_0x374214[_0x5e1903(0x196)](_0x128e28);}[_0x2b355b(0x1c8)](_0x4ddb55,_0x1026ca,_0x1c34e6={}){return this['_insert'](_0x4ddb55,_0x1026ca,_0x1c34e6);}['appendFormula'](_0x560153,_0x1392d0={}){var _0x40d68b=_0x2b355b;return this['_insert'](_0x40d68b(0x1ad),_0x560153,_0x1392d0);}[_0x2b355b(0x1a2)](_0x1b3211,_0x5a92bb,_0x22039c){var _0x11d99d=_0x2b355b;if(this[_0x11d99d(0x1cb)]())return null;let _0x1f8ec8={'externalReferences':_0x22039c[_0x11d99d(0x1bb)],'formula':_0x5a92bb,'numberFormat':_0x22039c[_0x11d99d(0x1b5)],'target':{'type':'paragraph','paragraphId':this['getId'](),'position':_0x1b3211},'unitId':this['_document']['getId']()},_0x33cff7=this[_0x11d99d(0x1bd)][_0x11d99d(0x18c)](_0x3e5dad['id'],_0x1f8ec8);return _0x33cff7?this['_injector'][_0x11d99d(0x1a4)](b,this[_0x11d99d(0x1bc)][_0x11d99d(0x1b2)](),_0x33cff7[_0x11d99d(0x195)]):null;}};function _0x3a44(_0x3dbffd,_0xdf1336){_0x3dbffd=_0x3dbffd-0x18a;var _0x3b5e39=_0x3b5e();var _0x3a44fe=_0x3b5e39[_0x3dbffd];return _0x3a44fe;}_0x477006[_0x2b355b(0x19d)](E);var D=class extends _0xe94339{constructor(..._0x4a40e1){var _0x610aa9=_0x2b355b;super(..._0x4a40e1),w(this,_0x610aa9(0x1bd),void 0x0);}[_0x2b355b(0x194)](_0x280f5d){var _0x37780b=_0x2b355b;this[_0x37780b(0x1bd)]=_0x280f5d['get'](_0x128e28);}[_0x2b355b(0x1d3)](_0x36cb09,_0x40b437={}){var _0x6b855b=_0x2b355b;let {endOffset:_0x32b929,segmentId:_0x353e47,startOffset:_0x2d07d4}=this[_0x6b855b(0x19c)]();return _0x353e47?null:this[_0x6b855b(0x1a2)](_0x2d07d4,_0x32b929,_0x36cb09,_0x40b437);}[_0x2b355b(0x1a2)](_0x5c1fcd,_0xac1fe0,_0x121cff,_0x1afa9a){var _0x1306de=_0x2b355b;let _0x8edbb6={'externalReferences':_0x1afa9a[_0x1306de(0x1bb)],'formula':_0x121cff,'numberFormat':_0x1afa9a[_0x1306de(0x1b5)],'target':{'type':_0x1306de(0x1a7),'startOffset':_0x5c1fcd,'endOffset':_0xac1fe0},'unitId':this[_0x1306de(0x1bc)]['getId']()},_0x3b6c94=this[_0x1306de(0x1bd)][_0x1306de(0x18c)](_0x3e5dad['id'],_0x8edbb6);return _0x3b6c94?this[_0x1306de(0x1a0)][_0x1306de(0x1a4)](b,this[_0x1306de(0x1bc)][_0x1306de(0x1b2)](),_0x3b6c94['rangeId']):null;}};_0xe94339[_0x2b355b(0x19d)](D);export{b as FDocumentFormula};