@univerjs/sheets-filter 0.3.0-alpha.1 → 0.3.0-nightly.202410101606
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/index.js +1 -1
- package/lib/es/index.js +1 -1160
- package/lib/umd/index.js +1 -1
- package/package.json +7 -8
- package/LICENSE +0 -176
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(global,factory){typeof exports=="object"&&typeof module<"u"?factory(exports,require("@univerjs/core"),require("rxjs"),require("@univerjs/sheets")):typeof define=="function"&&define.amd?define(["exports","@univerjs/core","rxjs","@univerjs/sheets"],factory):(global=typeof globalThis<"u"?globalThis:global||self,factory(global.UniverSheetsFilter={},global.UniverCore,global.rxjs,global.UniverSheets))})(this,function(exports2,core,rxjs,sheets){"use strict";var __defProp=Object.defineProperty;var __defNormalProp=(obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value;var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __publicField=(obj,key,value)=>__defNormalProp(obj,typeof key!="symbol"?key+"":key,value);var _a,_b,_c;const SetSheetsFilterRangeMutation={id:"sheet.mutation.set-filter-range",type:core.CommandType.MUTATION,handler:__name((accessor,params)=>{const{subUnitId,unitId,range}=params;return accessor.get(exports2.SheetsFilterService).ensureFilterModel(unitId,subUnitId).setRange(range),!0},"handler")},SetSheetsFilterCriteriaMutation={id:"sheet.mutation.set-filter-criteria",type:core.CommandType.MUTATION,handler:__name((accessor,params)=>{const{subUnitId,unitId,criteria,col,reCalc=!0}=params,filterModel=accessor.get(exports2.SheetsFilterService).getFilterModel(unitId,subUnitId);return filterModel?(filterModel.setCriteria(col,criteria,reCalc),!0):!1},"handler")},RemoveSheetsFilterMutation={id:"sheet.mutation.remove-filter",type:core.CommandType.MUTATION,handler:__name((accessor,params)=>{const{unitId,subUnitId}=params;return accessor.get(exports2.SheetsFilterService).removeFilterModel(unitId,subUnitId)},"handler")},ReCalcSheetsFilterMutation={id:"sheet.mutation.re-calc-filter",type:core.CommandType.MUTATION,handler:__name((accessor,params)=>{const{unitId,subUnitId}=params,filterModel=accessor.get(exports2.SheetsFilterService).getFilterModel(unitId,subUnitId);return filterModel?(filterModel.reCalc(),!0):!1},"handler")};var CustomFilterOperator=(CustomFilterOperator2=>(CustomFilterOperator2.EQUAL="equal",CustomFilterOperator2.GREATER_THAN="greaterThan",CustomFilterOperator2.GREATER_THAN_OR_EQUAL="greaterThanOrEqual",CustomFilterOperator2.LESS_THAN="lessThan",CustomFilterOperator2.LESS_THAN_OR_EQUAL="lessThanOrEqual",CustomFilterOperator2.NOT_EQUALS="notEqual",CustomFilterOperator2))(CustomFilterOperator||{});const greaterThan={operator:CustomFilterOperator.GREATER_THAN,fn:__name((value,compare)=>ensureNumber(value)?value>compare:!1,"fn")},greaterThanOrEqualTo={operator:CustomFilterOperator.GREATER_THAN_OR_EQUAL,fn:__name((value,compare)=>ensureNumber(value)?value>=compare:!1,"fn")},lessThan={operator:CustomFilterOperator.LESS_THAN,fn:__name((value,compare)=>ensureNumber(value)?value<compare:!1,"fn")},lessThanOrEqualTo={operator:CustomFilterOperator.LESS_THAN_OR_EQUAL,fn:__name((value,compare)=>ensureNumber(value)?value<=compare:!1,"fn")},equals={operator:CustomFilterOperator.EQUAL,fn:__name((value,compare)=>ensureNumber(value)?value===compare:!1,"fn")},notEquals={operator:CustomFilterOperator.NOT_EQUALS,fn:__name((value,compare)=>{if(typeof compare=="string"){if(compare===" ")return value!=null;const ensuredString=ensureString(value);return ensuredString&&isWildCardString(compare)?!createREGEXFromWildChar(compare).test(ensuredString):ensuredString!==compare}return ensureNumber(value)?value!==compare:!0},"fn")},CustomFilterFnRegistry=new Map([]);[greaterThan,greaterThanOrEqualTo,lessThan,lessThanOrEqualTo,equals,notEquals].forEach(fn=>{CustomFilterFnRegistry.set(fn.operator,fn)});function isNumericFilterFn(operator){return!!operator}__name(isNumericFilterFn,"isNumericFilterFn");const textMatch={fn:__name((value,compare)=>{const ensured=ensureString(value);return ensured===null?compare==="":createREGEXFromWildChar(compare).test(ensured)},"fn")};function getCustomFilterFn(operator){return operator?CustomFilterFnRegistry.get(operator):textMatch}__name(getCustomFilterFn,"getCustomFilterFn");function ensureNumber(value){return typeof value=="number"}__name(ensureNumber,"ensureNumber");function ensureNumeric(value){return!!(typeof value=="number"||typeof value=="string"&&core.isNumeric(value))}__name(ensureNumeric,"ensureNumeric");function ensureString(value){return typeof value=="boolean"||value==null?null:typeof value=="string"?value:value.toString()}__name(ensureString,"ensureString");function isWildCardString(str){return typeof str=="number"?!1:str.indexOf("*")!==-1||str.indexOf("?")!==-1}__name(isWildCardString,"isWildCardString");function createREGEXFromWildChar(wildChar){const regexpStr=wildChar.replace(/[.+^${}()|[\]\\]/g,"\\$&").replaceAll("?",".").replace(/[*]/g,".$&");return new RegExp(`^${regexpStr}$`)}__name(createREGEXFromWildChar,"createREGEXFromWildChar");const EMPTY=__name(()=>new Set,"EMPTY"),_FilterModel=class _FilterModel extends core.Disposable{constructor(unitId,subUnitId,_worksheet){super();__publicField(this,"_filteredOutRows$",new rxjs.BehaviorSubject(EMPTY()));__publicField(this,"filteredOutRows$",this._filteredOutRows$.asObservable());__publicField(this,"_hasCriteria$",new rxjs.BehaviorSubject(!1));__publicField(this,"hasCriteria$",this._hasCriteria$.asObservable());__publicField(this,"_filterColumnByIndex",new Map);__publicField(this,"_alreadyFilteredOutRows",EMPTY());__publicField(this,"_range");this.unitId=unitId,this.subUnitId=subUnitId,this._worksheet=_worksheet}get filteredOutRows(){return this._filteredOutRows$.getValue()}set filteredOutRows(rows){this._alreadyFilteredOutRows=rows,this._filteredOutRows$.next(rows)}dispose(){super.dispose(),this._filteredOutRows$.complete(),this._hasCriteria$.complete()}serialize(){const result={ref:core.Rectangle.clone(this._range),filterColumns:this._getAllFilterColumns(!0).sort(([offset1],[offset2])=>offset1-offset2).map(([_,filterColumn])=>filterColumn.serialize())};return this._alreadyFilteredOutRows&&(result.cachedFilteredOut=Array.from(this._alreadyFilteredOutRows).sort()),result}static deserialize(unitId,subUnitId,worksheet,autoFilter){const filterModel=new _FilterModel(unitId,subUnitId,worksheet);return filterModel._dump(autoFilter),filterModel}_dump(autoFilter){var _a2;this.setRange(autoFilter.ref),(_a2=autoFilter.filterColumns)==null||_a2.forEach(filterColumn=>this._setCriteriaWithoutReCalc(filterColumn.colId,filterColumn)),autoFilter.cachedFilteredOut&&(this._alreadyFilteredOutRows=new Set(autoFilter.cachedFilteredOut),this._emit()),this._emitHasCriteria()}isRowFiltered(row){return this._alreadyFilteredOutRows.has(row)}getRange(){if(!this._range)throw new Error("[FilterModel] could not get range before a range is set!");return this._range}getFilteredOutRowsExceptCol(col){return this._getAllFilterColumns(!0).filter(([colOffset])=>colOffset!==col).reduce((acc,[,filterColumn])=>{const newResult=filterColumn.calc({getAlreadyFilteredOutRows:__name(()=>acc,"getAlreadyFilteredOutRows")});return newResult?core.mergeSets(acc,newResult):acc},new Set)}setRange(range){this._range=range,this._getAllFilterColumns(!0).forEach(([col,filterColumn])=>{filterColumn.setRangeAndColumn({startRow:range.startRow,endRow:range.endRow,startColumn:col,endColumn:col},col)})}setCriteria(col,criteria,reCalc=!1){if(!this._range)throw new Error("[FilterModel] could not set criteria before a range is set!");if(!criteria){this._removeCriteria(col),this._rebuildAlreadyFilteredOutRowsWithCache(),reCalc&&this._reCalcAllColumns(),this._emit(),this._emitHasCriteria();return}this._setCriteriaWithoutReCalc(col,criteria),reCalc&&(this._rebuildAlreadyFilteredOutRowsWithCache(),this._reCalcWithNoCacheColumns(),this._emit(),this._emitHasCriteria())}getAllFilterColumns(){return this._getAllFilterColumns(!0)}getFilterColumn(index){var _a2;return(_a2=this._filterColumnByIndex.get(index))!=null?_a2:null}reCalc(){this._reCalcAllColumns(),this._emit()}_getAllFilterColumns(withCol=!1){const columns=Array.from(this._filterColumnByIndex.entries());return withCol?columns:columns.map(([_,filterColumn])=>filterColumn)}_reCalcAllColumns(){this._alreadyFilteredOutRows=EMPTY(),this._getAllFilterColumns().forEach(filterColumn=>filterColumn.__clearCache()),this._reCalcWithNoCacheColumns()}_setCriteriaWithoutReCalc(col,criteria){const range=this._range;if(!range)throw new Error("[FilterModel] could not set criteria before a range is set!");const{startColumn,endColumn}=range;if(col>endColumn||col<startColumn)throw new Error(`[FilterModel] could not set criteria on column ${col} which is out of range!`);let filterColumn;this._filterColumnByIndex.has(col)?filterColumn=this._filterColumnByIndex.get(col):(filterColumn=new FilterColumn(this.unitId,this.subUnitId,this._worksheet,criteria,{getAlreadyFilteredOutRows:__name(()=>this._alreadyFilteredOutRows,"getAlreadyFilteredOutRows")}),filterColumn.setRangeAndColumn(range,col),this._filterColumnByIndex.set(col,filterColumn)),filterColumn.setCriteria(criteria)}_removeCriteria(col){const filterColumn=this._filterColumnByIndex.get(col);filterColumn&&(filterColumn.dispose(),this._filterColumnByIndex.delete(col))}_emit(){this._filteredOutRows$.next(this._alreadyFilteredOutRows)}_emitHasCriteria(){this._hasCriteria$.next(this._filterColumnByIndex.size>0)}_rebuildAlreadyFilteredOutRowsWithCache(){const newFilteredOutRows=this._getAllFilterColumns().filter(filterColumn=>filterColumn.hasCache()).reduce((acc,filterColumn)=>core.mergeSets(acc,filterColumn.filteredOutRows),new Set);this._alreadyFilteredOutRows=newFilteredOutRows}_reCalcWithNoCacheColumns(){const noCacheFilteredOutRows=this._getAllFilterColumns().filter(filterColumn=>!filterColumn.hasCache());for(const filterColumn of noCacheFilteredOutRows){const filteredRows=filterColumn.reCalc();filteredRows&&(this._alreadyFilteredOutRows=core.mergeSets(this._alreadyFilteredOutRows,filteredRows))}}};__name(_FilterModel,"FilterModel");let FilterModel=_FilterModel;const _FilterColumn=class _FilterColumn extends core.Disposable{constructor(unitId,subUnitId,_worksheet,_criteria,_filterColumnContext){super();__publicField(this,"_filteredOutRows",null);__publicField(this,"_filterFn",null);__publicField(this,"_range",null);__publicField(this,"_column",0);__publicField(this,"_filterByValues",!1);this.unitId=unitId,this.subUnitId=subUnitId,this._worksheet=_worksheet,this._criteria=_criteria,this._filterColumnContext=_filterColumnContext}get filteredOutRows(){return this._filteredOutRows}dispose(){super.dispose(),this._filteredOutRows=null}__clearCache(){this._filteredOutRows=null}serialize(){if(!this._criteria)throw new Error("[FilterColumn]: could not serialize without a filter column!");return core.Tools.deepClone({...this._criteria,colId:this._column})}hasCache(){return this._filteredOutRows!==null}setRangeAndColumn(range,column){this._range=range,this._column=column}setCriteria(criteria){this._criteria=criteria,this._generateFilterFn(),this._filteredOutRows=null}getColumnData(){return core.Tools.deepClone(this._criteria)}reCalc(){return this._filteredOutRows=this.calc(this._filterColumnContext),this._filteredOutRows}calc(context){if(!this._filterFn)throw new Error("[FilterColumn] cannot calculate without a filter fn!");if(!this._range)throw new Error("[FilterColumn] cannot calculate without a range!");if(typeof this._column!="number")throw new TypeError("[FilterColumn] cannot calculate without a column offset!");const column=this._column,iterateRange={startColumn:column,endColumn:column,startRow:this._range.startRow+1,endRow:this._range.endRow},filteredOutRows=new Set,filteredOutByOthers=context.getAlreadyFilteredOutRows();for(const range of this._worksheet.iterateByColumn(iterateRange,!1,!1)){const{row,rowSpan,col}=range;if(filteredOutByOthers.has(row)&&(!rowSpan||rowSpan===1))continue;const value=this._filterByValues?core.extractPureTextFromCell(this._worksheet.getCell(row,col)):getFilterValueForConditionalFiltering(this._worksheet,row,col);if(!this._filterFn(value)&&(filteredOutRows.add(row),rowSpan))for(let i=1;i<rowSpan;i++)filteredOutRows.add(row+i)}return filteredOutRows}_generateFilterFn(){this._criteria&&(this._filterFn=generateFilterFn(this._criteria),this._filterByValues=!!this._criteria.filters)}};__name(_FilterColumn,"FilterColumn");let FilterColumn=_FilterColumn;function generateFilterFn(column){if(column.filters)return filterByValuesFnFactory(column.filters);if(column.customFilters)return customFilterFnFactory(column.customFilters);throw new Error("[FilterModel]: other types of filters are not supported yet.")}__name(generateFilterFn,"generateFilterFn");function filterByValuesFnFactory(values){const includeBlank=!!values.blank,valuesSet=new Set(values.filters);return value=>value===void 0||value===""?includeBlank:valuesSet.has(typeof value=="string"?value:`${value}`)}__name(filterByValuesFnFactory,"filterByValuesFnFactory");function customFilterFnFactory(customFilters){const customFilterFns=customFilters.customFilters.map(filter=>generateCustomFilterFn(filter));return isCompoundCustomFilter(customFilterFns)?customFilters.and?AND(customFilterFns):OR(customFilterFns):customFilterFns[0]}__name(customFilterFnFactory,"customFilterFnFactory");function AND(filterFns){const[fn1,fn2]=filterFns;return value=>fn1(value)&&fn2(value)}__name(AND,"AND");function OR(filterFns){const[fn1,fn2]=filterFns;return value=>fn1(value)||fn2(value)}__name(OR,"OR");function isCompoundCustomFilter(filter){return filter.length===2}__name(isCompoundCustomFilter,"isCompoundCustomFilter");function generateCustomFilterFn(filter){const compare=filter.val;if(filter.operator===CustomFilterOperator.NOT_EQUALS&&!ensureNumeric(compare))return value=>notEquals.fn(value,compare);if(isNumericFilterFn(filter.operator)){if(!ensureNumeric(compare))return()=>!1;const customFilterFn2=getCustomFilterFn(filter.operator),ensuredNumber=Number(compare);return value=>customFilterFn2.fn(value,ensuredNumber)}const customFilterFn=getCustomFilterFn(filter.operator);return value=>customFilterFn.fn(value,compare)}__name(generateCustomFilterFn,"generateCustomFilterFn");function getFilterValueForConditionalFiltering(worksheet,row,col){const interceptedCell=worksheet.getCell(row,col);if(!interceptedCell)return null;const rawCell=worksheet.getCellRaw(row,col);return interceptedCell&&!rawCell?extractFilterValueFromCell(interceptedCell):rawCell?interceptedCell.t===core.CellValueType.NUMBER&&typeof interceptedCell.v=="string"?rawCell.v:extractFilterValueFromCell(rawCell):null}__name(getFilterValueForConditionalFiltering,"getFilterValueForConditionalFiltering");function extractFilterValueFromCell(cell){var _a2,_b2;const richTextValue=(_b2=(_a2=cell.p)==null?void 0:_a2.body)==null?void 0:_b2.dataStream;if(richTextValue)return richTextValue.trimEnd();const rawValue=cell.v;return typeof rawValue=="string"?cell.t===core.CellValueType.BOOLEAN?rawValue.toUpperCase():rawValue:typeof rawValue=="number"?cell.t===core.CellValueType.BOOLEAN?rawValue?"TRUE":"FALSE":rawValue:typeof rawValue=="boolean"?rawValue?"TRUE":"FALSE":""}__name(extractFilterValueFromCell,"extractFilterValueFromCell");var __defProp$2=Object.defineProperty,__getOwnPropDesc$2=Object.getOwnPropertyDescriptor,__decorateClass$2=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc$2(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp$2(target,key,result),result},"__decorateClass$2"),__decorateParam$2=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam$2");const FILTER_MUTATIONS=new Set([SetSheetsFilterRangeMutation.id,SetSheetsFilterCriteriaMutation.id,RemoveSheetsFilterMutation.id,ReCalcSheetsFilterMutation.id]),SHEET_FILTER_SNAPSHOT_ID="SHEET_FILTER_PLUGIN";exports2.SheetsFilterService=(_a=class extends core.Disposable{constructor(_resourcesManagerService,_univerInstanceService,_commandService){super();__publicField(this,"_filterModels",new Map);__publicField(this,"_loadedUnitId$",new rxjs.BehaviorSubject(null));__publicField(this,"loadedUnitId$",this._loadedUnitId$.asObservable());__publicField(this,"_errorMsg$",new rxjs.BehaviorSubject(null));__publicField(this,"errorMsg$",this._errorMsg$.asObservable());__publicField(this,"_activeFilterModel$",new rxjs.BehaviorSubject(null));__publicField(this,"activeFilterModel$",this._activeFilterModel$.asObservable());this._resourcesManagerService=_resourcesManagerService,this._univerInstanceService=_univerInstanceService,this._commandService=_commandService,this._initModel(),this._initActiveFilterModel()}get activeFilterModel(){return this._activeFilterModel$.getValue()}ensureFilterModel(unitId,subUnitId){const already=this.getFilterModel(unitId,subUnitId);if(already)return already;const workbook=this._univerInstanceService.getUniverSheetInstance(unitId);if(!workbook)throw new Error(`[SheetsFilterService]: could not create "FilterModel" on a non-existing workbook ${unitId}!`);const worksheet=workbook.getSheetBySheetId(subUnitId);if(!worksheet)throw new Error(`[SheetsFilterService]: could not create "FilterModel" on a non-existing worksheet ${subUnitId}!`);const filterModel=new FilterModel(unitId,subUnitId,worksheet);return this._cacheFilterModel(unitId,subUnitId,filterModel),filterModel}getFilterModel(unitId,subUnitId){var _a2,_b2;return(_b2=(_a2=this._filterModels.get(unitId))==null?void 0:_a2.get(subUnitId))!=null?_b2:null}removeFilterModel(unitId,subUnitId){const already=this.getFilterModel(unitId,subUnitId);return already?(already.dispose(),this._filterModels.get(unitId).delete(subUnitId),!0):!1}setFilterErrorMsg(content){this._errorMsg$.next(content)}_updateActiveFilterModel(){let workbook;try{if(workbook=this._univerInstanceService.getCurrentUnitForType(core.UniverInstanceType.UNIVER_SHEET),!workbook){this._activeFilterModel$.next(null);return}}catch(err){console.error("[SheetsFilterService]: could not get active workbook!",err);return}const activeSheet=workbook.getActiveSheet(!0);if(!activeSheet){this._activeFilterModel$.next(null);return}const unitId=activeSheet.getUnitId(),subUnitId=activeSheet.getSheetId(),filterModel=this.getFilterModel(unitId,subUnitId);this._activeFilterModel$.next(filterModel)}_initActiveFilterModel(){this.disposeWithMe(rxjs.merge(core.fromCallback(this._commandService.onCommandExecuted.bind(this._commandService)).pipe(rxjs.filter(([command])=>command.type===core.CommandType.MUTATION&&FILTER_MUTATIONS.has(command.id))),this._univerInstanceService.getCurrentTypeOfUnit$(core.UniverInstanceType.UNIVER_SHEET).pipe(rxjs.switchMap(workbook=>{var _a2;return(_a2=workbook==null?void 0:workbook.activeSheet$)!=null?_a2:rxjs.of(null)}))).subscribe(()=>this._updateActiveFilterModel()))}_serializeAutoFiltersForUnit(unitId){const allFilterModels=this._filterModels.get(unitId);if(!allFilterModels)return"{}";const json={};return allFilterModels.forEach((model,worksheetId)=>{json[worksheetId]=model.serialize()}),JSON.stringify(json)}_deserializeAutoFiltersForUnit(unitId,json){const workbook=this._univerInstanceService.getUniverSheetInstance(unitId);Object.keys(json).forEach(worksheetId=>{const autoFilter=json[worksheetId],filterModel=FilterModel.deserialize(unitId,worksheetId,workbook.getSheetBySheetId(worksheetId),autoFilter);this._cacheFilterModel(unitId,worksheetId,filterModel)})}_initModel(){this._resourcesManagerService.registerPluginResource({pluginName:SHEET_FILTER_SNAPSHOT_ID,businesses:[core.UniverInstanceType.UNIVER_SHEET],toJson:__name(id=>this._serializeAutoFiltersForUnit(id),"toJson"),parseJson:__name(json=>JSON.parse(json),"parseJson"),onLoad:__name((unitId,value)=>{this._deserializeAutoFiltersForUnit(unitId,value),this._loadedUnitId$.next(unitId),this._updateActiveFilterModel()},"onLoad"),onUnLoad:__name(unitId=>{const allFilterModels=this._filterModels.get(unitId);allFilterModels&&(allFilterModels.forEach(model=>model.dispose()),this._filterModels.delete(unitId))},"onUnLoad")})}_cacheFilterModel(unitId,subUnitId,filterModel){this._filterModels.has(unitId)||this._filterModels.set(unitId,new Map),this._filterModels.get(unitId).set(subUnitId,filterModel)}},__name(_a,"SheetsFilterService"),_a),exports2.SheetsFilterService=__decorateClass$2([__decorateParam$2(0,core.IResourceManagerService),__decorateParam$2(1,core.IUniverInstanceService),__decorateParam$2(2,core.ICommandService)],exports2.SheetsFilterService);function objectsShaker(target,isEqual){for(let i=0;i<target.length;i++){let cur=i;if(target[i])for(let j=i+1;j<target.length;j++)target[cur]&&target[j]&&isEqual(target[cur],target[j])&&(target[cur]=null,cur=j)}return target.filter(o=>o!==null)}__name(objectsShaker,"objectsShaker");function mergeSetFilterCriteria(mutations){return objectsShaker(mutations,(o1,o2)=>o1.id===SetSheetsFilterCriteriaMutation.id&&o2.id===SetSheetsFilterCriteriaMutation.id&&o1.params.unitId===o2.params.unitId&&o1.params.subUnitId===o2.params.subUnitId&&o1.params.col===o2.params.col)}__name(mergeSetFilterCriteria,"mergeSetFilterCriteria");var __defProp$1=Object.defineProperty,__getOwnPropDesc$1=Object.getOwnPropertyDescriptor,__decorateClass$1=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc$1(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp$1(target,key,result),result},"__decorateClass$1"),__decorateParam$1=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam$1");let SheetsFilterController=(_b=class extends core.Disposable{constructor(_commandService,_sheetInterceptorService,_sheetsFilterService,_univerInstanceService,_refRangeService){super();__publicField(this,"_disposableCollection",new core.DisposableCollection);this._commandService=_commandService,this._sheetInterceptorService=_sheetInterceptorService,this._sheetsFilterService=_sheetsFilterService,this._univerInstanceService=_univerInstanceService,this._refRangeService=_refRangeService,this._initCommands(),this._initRowFilteredInterceptor(),this._initInterceptors(),this._commandExecutedListener(),this._initErrorHandling()}_initCommands(){[SetSheetsFilterCriteriaMutation,SetSheetsFilterRangeMutation,ReCalcSheetsFilterMutation,RemoveSheetsFilterMutation].forEach(command=>this.disposeWithMe(this._commandService.registerCommand(command)))}_initInterceptors(){this.disposeWithMe(this._sheetInterceptorService.interceptCommand({getMutations:__name(command=>this._getUpdateFilter(command),"getMutations")})),this.disposeWithMe(this._commandService.onCommandExecuted(commandInfo=>{if(commandInfo.id===sheets.SetWorksheetActiveOperation.id){const params=commandInfo.params,sheetId=params.subUnitId,unitId=params.unitId;if(!sheetId||!unitId)return;this._registerRefRange(unitId,sheetId)}if(commandInfo.id===SetSheetsFilterRangeMutation.id){const params=commandInfo.params,sheetId=params.subUnitId,unitId=params.unitId;if(!sheetId||!unitId)return;this._registerRefRange(params.unitId,params.subUnitId)}})),this.disposeWithMe(this._sheetsFilterService.loadedUnitId$.subscribe(unitId=>{if(unitId){const workbook=this._univerInstanceService.getUniverSheetInstance(unitId),sheet=workbook==null?void 0:workbook.getActiveSheet();sheet&&this._registerRefRange(unitId,sheet.getSheetId())}}))}_registerRefRange(unitId,subUnitId){var _a2;this._disposableCollection.dispose();const workbook=this._univerInstanceService.getUniverSheetInstance(unitId),workSheet=workbook==null?void 0:workbook.getSheetBySheetId(subUnitId);if(!workbook||!workSheet)return;const range=(_a2=this._sheetsFilterService.getFilterModel(unitId,subUnitId))==null?void 0:_a2.getRange(),handler=__name(config=>{switch(config.id){case sheets.InsertRowCommand.id:{const params=config.params,_unitId=params.unitId||unitId,_subUnitId=params.subUnitId||subUnitId;return this._handleInsertRowCommand(params,_unitId,_subUnitId)}case sheets.InsertColCommand.id:{const params=config.params,_unitId=params.unitId||unitId,_subUnitId=params.subUnitId||subUnitId;return this._handleInsertColCommand(params,_unitId,_subUnitId)}case sheets.RemoveColCommand.id:{const params=config.params;return this._handleRemoveColCommand(params,unitId,subUnitId)}case sheets.RemoveRowCommand.id:{const params=config.params;return this._handleRemoveRowCommand(params,unitId,subUnitId)}case sheets.EffectRefRangId.MoveColsCommandId:{const params=config.params;return this._handleMoveColsCommand(params,unitId,subUnitId)}case sheets.EffectRefRangId.MoveRowsCommandId:{const params=config.params;return this._handleMoveRowsCommand(params,unitId,subUnitId)}case sheets.MoveRangeCommand.id:{const params=config.params;return this._handleMoveRangeCommand(params,unitId,subUnitId)}}return{redos:[],undos:[]}},"handler");range&&this._disposableCollection.add(this._refRangeService.registerRefRange(range,handler,unitId,subUnitId))}_getUpdateFilter(command){const{id}=command;switch(id){case sheets.RemoveSheetCommand.id:{const params=command.params;return this._handleRemoveSheetCommand(params,params.unitId,params.subUnitId)}case sheets.CopySheetCommand.id:{const params=command.params,{targetSubUnitId,unitId,subUnitId}=params;return!unitId||!subUnitId||!targetSubUnitId?this._handleNull():this._handleCopySheetCommand(unitId,subUnitId,targetSubUnitId)}}return{redos:[],undos:[]}}_handleInsertColCommand(config,unitId,subUnitId){var _a2;const filterModel=this._sheetsFilterService.getFilterModel(unitId,subUnitId),filterRange=(_a2=filterModel==null?void 0:filterModel.getRange())!=null?_a2:null;if(!filterModel||!filterRange)return this._handleNull();const{startColumn,endColumn}=filterRange,{startColumn:insertStartColumn,endColumn:insertEndColumn}=config.range,count=insertEndColumn-insertStartColumn+1;if(insertEndColumn>endColumn)return this._handleNull();const redos=[],undos=[],anchor=insertStartColumn,setFilterRangeMutationParams={unitId,subUnitId,range:{...filterRange,startColumn:insertStartColumn<=startColumn?startColumn+count:startColumn,endColumn:endColumn+count}},undoSetFilterRangeMutationParams={unitId,subUnitId,range:filterRange};redos.push({id:SetSheetsFilterRangeMutation.id,params:setFilterRangeMutationParams}),undos.push({id:SetSheetsFilterRangeMutation.id,params:undoSetFilterRangeMutationParams});const effected=filterModel.getAllFilterColumns().filter(column=>column[0]>=anchor);if(effected.length!==0){const{newRange,oldRange}=this.moveCriteria(unitId,subUnitId,effected,count);redos.push(...newRange.redos,...oldRange.redos),undos.push(...newRange.undos,...oldRange.undos)}return{redos:mergeSetFilterCriteria(redos),undos:mergeSetFilterCriteria(undos)}}_handleInsertRowCommand(config,unitId,subUnitId){var _a2;const filterModel=this._sheetsFilterService.getFilterModel(unitId,subUnitId),filterRange=(_a2=filterModel==null?void 0:filterModel.getRange())!=null?_a2:null;if(!filterModel||!filterRange)return this._handleNull();const{startRow,endRow}=filterRange,{startRow:insertStartRow,endRow:insertEndRow}=config.range,rowCount=insertEndRow-insertStartRow+1;if(insertEndRow>endRow)return this._handleNull();const redos=[],undos=[],setFilterRangeParams={unitId,subUnitId,range:{...filterRange,startRow:insertStartRow<=startRow?startRow+rowCount:startRow,endRow:endRow+rowCount}},undoSetFilterRangeMutationParams={unitId,subUnitId,range:filterRange};return redos.push({id:SetSheetsFilterRangeMutation.id,params:setFilterRangeParams}),undos.push({id:SetSheetsFilterRangeMutation.id,params:undoSetFilterRangeMutationParams}),{redos:mergeSetFilterCriteria(redos),undos:mergeSetFilterCriteria(undos)}}_handleRemoveColCommand(config,unitId,subUnitId){var _a2;const filterModel=this._sheetsFilterService.getFilterModel(unitId,subUnitId),filterRange=(_a2=filterModel==null?void 0:filterModel.getRange())!=null?_a2:null;if(!filterModel||!filterRange)return this._handleNull();const{startColumn,endColumn}=filterRange,{startColumn:removeStartColumn,endColumn:removeEndColumn}=config.range;if(removeStartColumn>endColumn)return this._handleNull();const redos=[],undos=[],rangeRemoveCount=removeEndColumn<startColumn?0:Math.min(removeEndColumn,endColumn)-Math.max(removeStartColumn,startColumn)+1,removeCount=removeEndColumn-removeStartColumn+1,filterColumn=filterModel.getAllFilterColumns();filterColumn.forEach(column=>{const[col,filter]=column;col<=removeEndColumn&&col>=removeStartColumn&&(redos.push({id:SetSheetsFilterCriteriaMutation.id,params:{unitId,subUnitId,col,criteria:null}}),undos.push({id:SetSheetsFilterCriteriaMutation.id,params:{unitId,subUnitId,col,criteria:{...filter.serialize(),colId:col}}}))});const shifted=filterColumn.filter(column=>{const[col,_]=column;return col>removeEndColumn});let newRangeCriteria={undos:[],redos:[]};if(shifted.length>0){const{oldRange,newRange}=this.moveCriteria(unitId,subUnitId,shifted,-removeCount);newRangeCriteria=newRange,redos.push(...oldRange.redos),undos.unshift(...oldRange.undos)}if(rangeRemoveCount===endColumn-startColumn+1){const removeFilterRangeMutationParams={unitId,subUnitId};redos.push({id:RemoveSheetsFilterMutation.id,params:removeFilterRangeMutationParams}),undos.unshift({id:SetSheetsFilterRangeMutation.id,params:{range:filterRange,unitId,subUnitId}})}else{const newStartColumn=startColumn<=removeStartColumn?startColumn:rangeRemoveCount===0?startColumn-removeCount:removeStartColumn,newEndColumn=startColumn<=removeStartColumn?endColumn-rangeRemoveCount:endColumn-removeCount,setFilterRangeMutationParams={unitId,subUnitId,range:{...filterRange,startColumn:newStartColumn,endColumn:newEndColumn}};redos.push({id:SetSheetsFilterRangeMutation.id,params:setFilterRangeMutationParams}),undos.unshift({id:SetSheetsFilterRangeMutation.id,params:{range:filterRange,unitId,subUnitId}}),redos.push(...newRangeCriteria.redos),undos.unshift(...newRangeCriteria.undos)}return{undos,redos}}_handleRemoveRowCommand(config,unitId,subUnitId){var _a2;const filterModel=this._sheetsFilterService.getFilterModel(unitId,subUnitId);if(!filterModel)return this._handleNull();const filterRange=filterModel.getRange(),{startRow,endRow}=filterRange,{startRow:removeStartRow,endRow:removeEndRow}=config.range;if(removeStartRow>endRow)return this._handleNull();if(removeEndRow<startRow)return{undos:[{id:SetSheetsFilterRangeMutation.id,params:{range:filterRange,unitId,subUnitId}}],redos:[{id:SetSheetsFilterRangeMutation.id,params:{range:{...filterRange,startRow:startRow-(removeEndRow-removeStartRow+1),endRow:endRow-(removeEndRow-removeStartRow+1)},unitId,subUnitId}}]};const redos=[],undos=[],filterColumn=filterModel.getAllFilterColumns(),filterHeaderIsRemoved=startRow<=removeEndRow&&startRow>=removeStartRow;undos.push({id:SetSheetsFilterRangeMutation.id,params:{range:filterRange,unitId,subUnitId}});const count=Math.min(removeEndRow,endRow)-Math.max(removeStartRow,startRow)+1;if(count===endRow-startRow+1||filterHeaderIsRemoved){const removeFilterRangeMutationParams={unitId,subUnitId};redos.push({id:RemoveSheetsFilterMutation.id,params:removeFilterRangeMutationParams}),filterColumn.forEach(column=>{const[offset,filter]=column,setCriteriaMutationParams={unitId,subUnitId,col:offset,criteria:{...filter.serialize(),colId:offset}};undos.push({id:SetSheetsFilterCriteriaMutation.id,params:setCriteriaMutationParams})})}else{const worksheet=(_a2=this._univerInstanceService.getUniverSheetInstance(unitId))==null?void 0:_a2.getSheetBySheetId(subUnitId);if(!worksheet)return this._handleNull();const hiddenRows=[];for(let r=removeStartRow;r<=removeEndRow;r++)worksheet.getRowFiltered(r)&&hiddenRows.push(r);const afterStartRow=Math.min(startRow,removeStartRow),afterEndRow=afterStartRow+(endRow-startRow)-count+hiddenRows.length,setFilterRangeMutationParams={unitId,subUnitId,range:{...filterRange,startRow:afterStartRow,endRow:afterEndRow}};redos.push({id:SetSheetsFilterRangeMutation.id,params:setFilterRangeMutationParams})}return{undos:mergeSetFilterCriteria(undos),redos:mergeSetFilterCriteria(redos)}}_handleMoveColsCommand(config,unitId,subUnitId){var _a2;const filterModel=this._sheetsFilterService.getFilterModel(unitId,subUnitId),filterRange=(_a2=filterModel==null?void 0:filterModel.getRange())!=null?_a2:null;if(!filterModel||!filterRange)return this._handleNull();const{startColumn,endColumn}=filterRange,{fromRange,toRange}=config;if(fromRange.endColumn<startColumn&&toRange.startColumn<=startColumn||fromRange.startColumn>endColumn&&toRange.endColumn>endColumn)return this._handleNull();const redos=[],undos=[],filterCol={};for(let col=startColumn;col<=endColumn;col++)filterCol[col]={colIndex:col,filter:filterModel.getFilterColumn(col)};core.moveMatrixArray(fromRange.startColumn,fromRange.endColumn-fromRange.startColumn+1,toRange.startColumn,filterCol);let startBorder=filterRange.startColumn,endBorder=filterRange.endColumn;startColumn>=fromRange.startColumn&&startColumn<=fromRange.endColumn&&toRange.startColumn>fromRange.startColumn&&fromRange.endColumn<endColumn&&(startBorder=fromRange.endColumn+1),endColumn>=fromRange.startColumn&&endColumn<=fromRange.endColumn&&toRange.startColumn<fromRange.startColumn&&fromRange.startColumn>startColumn&&(endBorder=fromRange.startColumn-1);const numberCols=Object.keys(filterCol).map(col=>Number(col)),newEnd=numberCols.find(col=>filterCol[col].colIndex===endBorder),newStart=numberCols.find(col=>filterCol[col].colIndex===startBorder);if(numberCols.forEach(col=>{var _a3,_b2;const{colIndex:oldColIndex,filter}=filterCol[col],newColIndex=col;if(filter){if(newColIndex>=newStart&&newColIndex<=newEnd){const setCriteriaMutationParams={unitId,subUnitId,col:newColIndex,criteria:{...filter.serialize(),colId:newColIndex}},undoSetCriteriaMutationParams={unitId,subUnitId,col:newColIndex,criteria:filterModel.getFilterColumn(newColIndex)?{...(_a3=filterModel.getFilterColumn(newColIndex))==null?void 0:_a3.serialize(),colId:newColIndex}:null};redos.push({id:SetSheetsFilterCriteriaMutation.id,params:setCriteriaMutationParams}),undos.push({id:SetSheetsFilterCriteriaMutation.id,params:undoSetCriteriaMutationParams})}if(!((_b2=filterCol[oldColIndex])!=null&&_b2.filter)){const setCriteriaMutationParams={unitId,subUnitId,col:oldColIndex,criteria:null};redos.push({id:SetSheetsFilterCriteriaMutation.id,params:setCriteriaMutationParams}),undos.push({id:SetSheetsFilterCriteriaMutation.id,params:{unitId,subUnitId,col:oldColIndex,criteria:{...filter.serialize(),colId:oldColIndex}}})}}}),startColumn!==newStart||endColumn!==newEnd){const setFilterRangeMutationParams={unitId,subUnitId,range:{...filterRange,startColumn:newStart,endColumn:newEnd}};redos.unshift({id:SetSheetsFilterRangeMutation.id,params:setFilterRangeMutationParams}),undos.unshift({id:SetSheetsFilterRangeMutation.id,params:{range:filterRange,unitId,subUnitId}})}return{undos,redos}}_handleMoveRowsCommand(config,unitId,subUnitId){var _a2;const filterModel=this._sheetsFilterService.getFilterModel(unitId,subUnitId),filterRange=(_a2=filterModel==null?void 0:filterModel.getRange())!=null?_a2:null;if(!filterModel||!filterRange)return this._handleNull();const{startRow,endRow}=filterRange,{fromRange,toRange}=config;if(fromRange.endRow<startRow&&toRange.startRow<=startRow||fromRange.startRow>endRow&&toRange.endRow>endRow)return this._handleNull();const redos=[],undos=[],filterRow={};for(let row=startRow;row<=endRow;row++)filterRow[row]={oldIndex:row};const startBorder=startRow;let endBorder=endRow;endRow>=fromRange.startRow&&endRow<=fromRange.endRow&&toRange.startRow<fromRange.startRow&&fromRange.startRow>startRow&&(endBorder=fromRange.startRow-1),core.moveMatrixArray(fromRange.startRow,fromRange.endRow-fromRange.startRow+1,toRange.startRow,filterRow);const numberRows=Object.keys(filterRow).map(row=>Number(row)),newEnd=numberRows.find(row=>filterRow[row].oldIndex===endBorder),newStart=numberRows.find(row=>filterRow[row].oldIndex===startBorder);if(startRow!==newStart||endRow!==newEnd){const setFilterRangeMutationParams={unitId,subUnitId,range:{...filterRange,startRow:newStart,endRow:newEnd}};redos.push({id:SetSheetsFilterRangeMutation.id,params:setFilterRangeMutationParams},{id:ReCalcSheetsFilterMutation.id,params:{unitId,subUnitId}}),undos.push({id:SetSheetsFilterRangeMutation.id,params:{range:filterRange,unitId,subUnitId}},{id:ReCalcSheetsFilterMutation.id,params:{unitId,subUnitId}})}return{redos,undos}}_handleMoveRangeCommand(config,unitId,subUnitId){const{fromRange,toRange}=config,filterModel=this._sheetsFilterService.getFilterModel(unitId,subUnitId);if(!filterModel)return this._handleNull();const filterRange=filterModel.getRange();if(!filterRange)return this._handleNull();const redos=[],undos=[];if(core.Rectangle.contains(fromRange,filterRange)){const rowOffset=filterRange.startRow-fromRange.startRow,colOffset=filterRange.startColumn-fromRange.startColumn,newFilterRange={startRow:toRange.startRow+rowOffset,startColumn:toRange.startColumn+colOffset,endRow:toRange.startRow+rowOffset+(filterRange.endRow-filterRange.startRow),endColumn:toRange.startColumn+colOffset+(filterRange.endColumn-filterRange.startColumn)},removeFilter={id:RemoveSheetsFilterMutation.id,params:{unitId,subUnitId}},setNewFilterRange={id:SetSheetsFilterRangeMutation.id,params:{unitId,subUnitId,range:newFilterRange}},setOldFilterRange={id:SetSheetsFilterRangeMutation.id,params:{unitId,subUnitId,range:filterRange}};redos.push(removeFilter,setNewFilterRange),undos.push(removeFilter,setOldFilterRange);const filterColumn=filterModel.getAllFilterColumns(),moveColDelta=toRange.startColumn-fromRange.startColumn;filterColumn.forEach(column=>{const[col,criteria]=column;criteria&&(redos.push({id:SetSheetsFilterCriteriaMutation.id,params:{unitId,subUnitId,col:col+moveColDelta,criteria:{...criteria.serialize(),colId:col+moveColDelta}}}),undos.push({id:SetSheetsFilterCriteriaMutation.id,params:{unitId,subUnitId,col,criteria:{...criteria.serialize(),colId:col}}}))})}return{redos,undos}}_handleRemoveSheetCommand(config,unitId,subUnitId){const filterModel=this._sheetsFilterService.getFilterModel(unitId,subUnitId);if(!filterModel)return this._handleNull();const filterRange=filterModel.getRange();if(!filterRange)return this._handleNull();const redos=[],undos=[];return filterModel.getAllFilterColumns().forEach(([col,filter])=>{undos.push({id:SetSheetsFilterCriteriaMutation.id,params:{unitId,subUnitId,col,criteria:{...filter.serialize(),colId:col}}})}),redos.push({id:RemoveSheetsFilterMutation.id,params:{unitId,subUnitId,range:filterRange}}),undos.unshift({id:SetSheetsFilterRangeMutation.id,params:{range:filterRange,unitId,subUnitId}}),{undos,redos}}_handleCopySheetCommand(unitId,subUnitId,targetSubUnitId){const filterModel=this._sheetsFilterService.getFilterModel(unitId,subUnitId);if(!filterModel)return this._handleNull();const filterRange=filterModel.getRange();if(!filterRange)return this._handleNull();const redos=[],undos=[],preUndos=[],preRedos=[];return filterModel.getAllFilterColumns().forEach(([col,filter])=>{redos.push({id:SetSheetsFilterCriteriaMutation.id,params:{unitId,subUnitId:targetSubUnitId,col,criteria:{...filter.serialize(),colId:col}}}),preUndos.push({id:SetSheetsFilterCriteriaMutation.id,params:{unitId,subUnitId:targetSubUnitId,col,criteria:null}})}),preUndos.push({id:RemoveSheetsFilterMutation.id,params:{unitId,subUnitId:targetSubUnitId,range:filterRange}}),redos.unshift({id:SetSheetsFilterRangeMutation.id,params:{range:filterRange,unitId,subUnitId:targetSubUnitId}}),{undos,redos,preUndos,preRedos}}_handleNull(){return{redos:[],undos:[]}}_initRowFilteredInterceptor(){this.disposeWithMe(this._sheetInterceptorService.intercept(sheets.INTERCEPTOR_POINT.ROW_FILTERED,{handler:__name((filtered,rowLocation)=>{var _a2,_b2;return filtered?!0:(_b2=(_a2=this._sheetsFilterService.getFilterModel(rowLocation.unitId,rowLocation.subUnitId))==null?void 0:_a2.isRowFiltered(rowLocation.row))!=null?_b2:!1},"handler")}))}moveCriteria(unitId,subUnitId,target,step){const defaultSetCriteriaMutationParams={unitId,subUnitId,criteria:null,col:-1},oldUndos=[],oldRedos=[],newUndos=[],newRedos=[];return target.forEach(column=>{const[offset,filter]=column;oldRedos.push({id:SetSheetsFilterCriteriaMutation.id,params:{...defaultSetCriteriaMutationParams,col:offset}}),oldUndos.push({id:SetSheetsFilterCriteriaMutation.id,params:{...defaultSetCriteriaMutationParams,col:offset,criteria:{...filter.serialize(),colId:offset}}})}),target.forEach(column=>{const[offset,filter]=column;newRedos.push({id:SetSheetsFilterCriteriaMutation.id,params:{...defaultSetCriteriaMutationParams,col:offset+step,criteria:{...filter.serialize(),colId:offset+step}}}),newUndos.push({id:SetSheetsFilterCriteriaMutation.id,params:{...defaultSetCriteriaMutationParams,col:offset+step,criteria:null}})}),{newRange:{redos:newRedos,undos:newUndos},oldRange:{redos:oldRedos,undos:oldUndos}}}_commandExecutedListener(){this.disposeWithMe(this._commandService.onCommandExecuted((command,options)=>{var _a2,_b2;const{unitId,subUnitId}=command.params||{},filterModel=this._sheetsFilterService.getFilterModel(unitId,subUnitId);if(!filterModel)return;const filteredOutRows=Array.from(filterModel.filteredOutRows).sort((a,b)=>a-b),newFilteredOutRows=[];let changed=!1;if(command.id===sheets.RemoveRowMutation.id){const{startRow,endRow}=command.params.range,filterOutInRemove=filteredOutRows.filter(row=>row>=startRow&&row<=endRow);filteredOutRows.forEach(row=>{if(row<startRow)newFilteredOutRows.push(row);else if(changed=!0,row<=endRow){const newIndex=Math.max(startRow,newFilteredOutRows.length?newFilteredOutRows[newFilteredOutRows.length-1]+1:startRow);newFilteredOutRows.push(newIndex)}else newFilteredOutRows.push(row-(endRow-startRow+1-filterOutInRemove.length))})}if(command.id===sheets.InsertRowMutation.id){const{startRow,endRow}=command.params.range;filteredOutRows.forEach(row=>{row>=startRow?(changed=!0,newFilteredOutRows.push(row+(endRow-startRow+1))):newFilteredOutRows.push(row)})}if(changed&&(filterModel.filteredOutRows=new Set(newFilteredOutRows)),command.id===sheets.SetRangeValuesMutation.id&&!(options!=null&&options.onlyLocal)){const extendRegion=this._getExtendRegion(unitId,subUnitId);if(extendRegion){const cellValue=command.params.cellValue;if(cellValue)for(let col=extendRegion.startColumn;col<=extendRegion.endColumn;col++){const cell=(_a2=cellValue==null?void 0:cellValue[extendRegion.startRow])==null?void 0:_a2[col];if(cell&&this._cellHasValue(cell)){const worksheet=(_b2=this._univerInstanceService.getUnit(unitId))==null?void 0:_b2.getSheetBySheetId(subUnitId);if(worksheet){const extendedRange=sheets.expandToContinuousRange(extendRegion,{down:!0},worksheet),filterModel2=this._sheetsFilterService.getFilterModel(unitId,subUnitId),filterRange=filterModel2.getRange();filterModel2.setRange({...filterRange,endRow:extendedRange.endRow}),this._registerRefRange(unitId,subUnitId)}}}}}}))}_getExtendRegion(unitId,subUnitId){var _a2;const filterModel=this._sheetsFilterService.getFilterModel(unitId,subUnitId);if(!filterModel)return null;const worksheet=(_a2=this._univerInstanceService.getUnit(unitId))==null?void 0:_a2.getSheetBySheetId(subUnitId);if(!worksheet)return null;const filterRange=filterModel.getRange();if(!filterRange)return null;const maxRowIndex=worksheet.getRowCount()-1,rowManager=worksheet.getRowManager();for(let row=filterRange.endRow+1;row<=maxRowIndex;row++)if(rowManager.getRowRawVisible(row))return{startRow:row,endRow:row,startColumn:filterRange.startColumn,endColumn:filterRange.endColumn};return null}_initErrorHandling(){this.disposeWithMe(this._commandService.beforeCommandExecuted(command=>{const params=command.params,target=sheets.getSheetCommandTarget(this._univerInstanceService);if(!target)return;const{subUnitId,unitId}=target,filterModel=this._sheetsFilterService.getFilterModel(unitId,subUnitId);if(!filterModel)return;const filterRange=filterModel.getRange();if(command.id===sheets.MoveRowsCommand.id&¶ms.fromRange.startRow<=filterRange.startRow&¶ms.fromRange.endRow<filterRange.endRow&¶ms.fromRange.endRow>=filterRange.startRow)throw this._sheetsFilterService.setFilterErrorMsg("sheets-filter.msg.filter-header-forbidden"),new Error("[SheetsFilterController]: Cannot move header row of filter")}))}_cellHasValue(cell){const values=Object.values(cell);return!(values.length===0||values.every(v=>v==null))}},__name(_b,"SheetsFilterController"),_b);SheetsFilterController=__decorateClass$1([__decorateParam$1(0,core.ICommandService),__decorateParam$1(1,core.Inject(sheets.SheetInterceptorService)),__decorateParam$1(2,core.Inject(exports2.SheetsFilterService)),__decorateParam$1(3,core.IUniverInstanceService),__decorateParam$1(4,core.Inject(sheets.RefRangeService))],SheetsFilterController);const PLUGIN_CONFIG_KEY="sheets-filter.config",defaultPluginConfig={};var __defProp2=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__decorateClass=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp2(target,key,result),result},"__decorateClass"),__decorateParam=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam");exports2.UniverSheetsFilterPlugin=(_c=class extends core.Plugin{constructor(_config=defaultPluginConfig,_injector,_configService){super(),this._config=_config,this._injector=_injector,this._configService=_configService;const{...rest}=this._config;this._configService.setConfig(PLUGIN_CONFIG_KEY,rest)}onStarting(){[[exports2.SheetsFilterService],[SheetsFilterController]].forEach(d=>this._injector.add(d))}onReady(){this._injector.get(SheetsFilterController)}},__name(_c,"UniverSheetsFilterPlugin"),__publicField(_c,"type",core.UniverInstanceType.UNIVER_SHEET),__publicField(_c,"pluginName",SHEET_FILTER_SNAPSHOT_ID),_c),exports2.UniverSheetsFilterPlugin=__decorateClass([__decorateParam(1,core.Inject(core.Injector)),__decorateParam(2,core.IConfigService)],exports2.UniverSheetsFilterPlugin),exports2.CustomFilterOperator=CustomFilterOperator,exports2.FILTER_MUTATIONS=FILTER_MUTATIONS,exports2.FilterColumn=FilterColumn,exports2.FilterModel=FilterModel,exports2.ReCalcSheetsFilterMutation=ReCalcSheetsFilterMutation,exports2.RemoveSheetsFilterMutation=RemoveSheetsFilterMutation,exports2.SHEET_FILTER_SNAPSHOT_ID=SHEET_FILTER_SNAPSHOT_ID,exports2.SetSheetsFilterCriteriaMutation=SetSheetsFilterCriteriaMutation,exports2.SetSheetsFilterRangeMutation=SetSheetsFilterRangeMutation,exports2.equals=equals,exports2.getCustomFilterFn=getCustomFilterFn,exports2.greaterThan=greaterThan,exports2.greaterThanOrEqualTo=greaterThanOrEqualTo,exports2.lessThan=lessThan,exports2.lessThanOrEqualTo=lessThanOrEqualTo,exports2.notEquals=notEquals,Object.defineProperty(exports2,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
function _0xd579(_0x480d00,_0x468393){const _0x57652c=_0x5765();return _0xd579=function(_0xd579c1,_0x8d5858){_0xd579c1=_0xd579c1-0x68;let _0x18f9b3=_0x57652c[_0xd579c1];return _0x18f9b3;},_0xd579(_0x480d00,_0x468393);}function _0x5765(){const _0xaa9dd6=['getCellRaw','setCriteria','[FilterModel]\x20could\x20not\x20set\x20criteria\x20before\x20a\x20range\x20is\x20set!','SetSheetsFilterCriteriaMutation','reCalc','_dump','setFilterErrorMsg','setRangeAndColumn','GREATER_THAN','SetRangeValuesMutation','object','getRowFiltered','_initErrorHandling','ReCalcSheetsFilterMutation','customFilterFnFactory','delete','CopySheetCommand','INTERCEPTOR_POINT','CommandType','_handleMoveRowsCommand','_handleMoveRangeCommand','redos','_hasCriteria$','getValue','filter','registerPluginResource','onStarting','MoveRowsCommandId','_criteria','customFilters','getSheetBySheetId','getFilterColumn','@univerjs/sheets','_getAllFilterColumns','_filterColumnByIndex','filteredOutRows','subscribe','extractFilterValueFromCell','ROW_FILTERED','Disposable','_handleRemoveSheetCommand','test','_range','__decorateParam','sheet.mutation.set-filter-criteria','_handleCopySheetCommand','EMPTY','getActiveSheet','DisposableCollection','colIndex','_column','calc','amd','find','_configService','MUTATION','setConfig','notEqual','Tools','SetSheetsFilterRangeMutation','_loadedUnitId$','filteredOutRows$','[FilterModel]:\x20other\x20types\x20of\x20filters\x20are\x20not\x20supported\x20yet.','MoveRowsCommand','[SheetsFilterService]:\x20could\x20not\x20create\x20\x22FilterModel\x22\x20on\x20a\x20non-existing\x20worksheet\x20','_filterFn','removeFilterModel','isRowFiltered','greaterThanOrEqualTo','disposeWithMe','moveMatrixArray','11597427nPQiVK','string','_initActiveFilterModel','getUniverSheetInstance','UniverSheets','contains','_commandService','AND','_handleMoveColsCommand','getFilterValueForConditionalFiltering','RefRangeService','_sheetsFilterService','toJson','add','sheet.mutation.re-calc-filter','range','moveCriteria','forEach','lessThanOrEqualTo','[FilterModel]\x20could\x20not\x20set\x20criteria\x20on\x20column\x20','1068IHtZcd','has','_initInterceptors','_deserializeAutoFiltersForUnit','unitId','InsertRowMutation','getRange','getCurrentTypeOfUnit$','stringify','interceptCommand','_getUpdateFilter','equal','BOOLEAN','_filterModels','greaterThanOrEqual','trimEnd','name','deserialize','asObservable','val','activeFilterModel$','clone','colId','_disposableCollection','mergeSets','onLoad','10dwmEZN','filterByValuesFnFactory','col','_reCalcAllColumns','ref','_registerRefRange','undos','40YuRGFY','body','getOwnPropertyDescriptor','UniverSheetsFilterPlugin','endColumn','getAlreadyFilteredOutRows','next','\x20which\x20is\x20out\x20of\x20range!','merge','_commandExecutedListener','NOT_EQUALS','isNumeric','UNIVER_SHEET','parse','IUniverInstanceService','_removeCriteria','onlyLocal','UniverSheetsFilter','_updateActiveFilterModel','getUnitId','endRow','isCompoundCustomFilter','_setCriteriaWithoutReCalc','UniverInstanceType','_refRangeService','37987037Dyzqek','startRow','getRowCount','number','_reCalcWithNoCacheColumns','Module','[FilterColumn]:\x20could\x20not\x20serialize\x20without\x20a\x20filter\x20column!','onUnLoad','_filterColumnContext','RemoveSheetCommand','_errorMsg$','[FilterColumn]\x20cannot\x20calculate\x20without\x20a\x20range!','SheetsFilterService','switchMap','Plugin','cachedFilteredOut','createREGEXFromWildChar','CustomFilterOperator','reduce','min','_emitHasCriteria','UniverCore','TRUE','_sheetInterceptorService','set','extractPureTextFromCell','_cellHasValue','sheet.mutation.remove-filter','getColumnData','defineProperty','unshift','activeFilterModel','MoveColsCommandId','max','notEquals','filters','loadedUnitId$','Rectangle','push','_injector','intersects','ensureNumeric','fromCallback','registerRefRange','boolean','_resourcesManagerService','ensureFilterModel','keys','@univerjs/core','SheetsFilterController','getCell','getSheetId','toUpperCase','operator','getMutations','[FilterColumn]\x20cannot\x20calculate\x20without\x20a\x20column\x20offset!','_filteredOutRows$','FILTER_MUTATIONS','hasCache','every','LESS_THAN','serialize','dataStream','parseJson','_handleRemoveRowCommand','__decorateParam$2','generateCustomFilterFn','_handleInsertColCommand','RemoveRowMutation','cellValue','SHEET_FILTER_PLUGIN','FALSE','_worksheet','params','_emit','3549cRZioN','sheets-filter.msg.filter-header-forbidden','filterColumns','registerCommand','equals','InsertRowCommand','bind','pluginName','greaterThan','getAllFilterColumns','ICommandService','ensureNumber','startColumn','_filteredOutRows','exports','getRowManager','toStringTag','lessThanOrEqual','dispose','errorMsg$','fromRange','type','_cacheFilterModel','GREATER_THAN_OR_EQUAL','__decorateClass$1','_filterByValues','CellValueType','onCommandExecuted','_getExtendRegion','EffectRefRangId','_handleRemoveColCommand','__clearCache','__decorateClass$2','generateFilterFn','[FilterModel]\x20could\x20not\x20get\x20range\x20before\x20a\x20range\x20is\x20set!','_initModel','deepClone','rxjs','EQUAL','pipe','sheets-filter.config','676977UZCdjl','SHEET_FILTER_SNAPSHOT_ID','BehaviorSubject','_handleNull','InsertColCommand','_initCommands','getRowRawVisible','getUnit','lessThan','_generateFilterFn','row','toString','getFilterModel','_activeFilterModel$','5116fnYSGn','_config','subUnitId','symbol','972518QIJjiG','function','_univerInstanceService','and','_initRowFilteredInterceptor','LESS_THAN_OR_EQUAL','RemoveRowCommand','oldIndex','[FilterColumn]\x20cannot\x20calculate\x20without\x20a\x20filter\x20fn!','indexOf','from','getCurrentUnitForType','[SheetsFilterService]:\x20could\x20not\x20get\x20active\x20workbook!','__decorateParam$1','Inject','FilterModel','_alreadyFilteredOutRows','get','replace','mergeSetFilterCriteria','RemoveColCommand','length','305700kvNtsF','map','_serializeAutoFiltersForUnit','handler','ensureString','setRange','30540WkNWtb','_rebuildAlreadyFilteredOutRowsWithCache'];_0x5765=function(){return _0xaa9dd6;};return _0x5765();}(function(_0x5e072a,_0x227d10){const _0x4ad2e8=_0xd579,_0x2b7244=_0x5e072a();while(!![]){try{const _0x48c44d=-parseInt(_0x4ad2e8(0xe8))/0x1+parseInt(_0x4ad2e8(0xfe))/0x2+parseInt(_0x4ad2e8(0xad))/0x3*(-parseInt(_0x4ad2e8(0xe4))/0x4)+-parseInt(_0x4ad2e8(0x104))/0x5*(parseInt(_0x4ad2e8(0x161))/0x6)+-parseInt(_0x4ad2e8(0xd6))/0x7*(parseInt(_0x4ad2e8(0x182))/0x8)+parseInt(_0x4ad2e8(0x14d))/0x9*(parseInt(_0x4ad2e8(0x17b))/0xa)+parseInt(_0x4ad2e8(0x19b))/0xb;if(_0x48c44d===_0x227d10)break;else _0x2b7244['push'](_0x2b7244['shift']());}catch(_0x28a334){_0x2b7244['push'](_0x2b7244['shift']());}}}(_0x5765,0xccb42),function(_0x5d67a3,_0x5ca8e2){const _0x4c9893=_0xd579;typeof exports==_0x4c9893(0x110)&&typeof module<'u'?_0x5ca8e2(exports,require(_0x4c9893(0x92)),require(_0x4c9893(0xd2)),require(_0x4c9893(0x126))):typeof define==_0x4c9893(0xe9)&&define[_0x4c9893(0x13a)]?define([_0x4c9893(0xbb),'@univerjs/core','rxjs','@univerjs/sheets'],_0x5ca8e2):(_0x5d67a3=typeof globalThis<'u'?globalThis:_0x5d67a3||self,_0x5ca8e2(_0x5d67a3[_0x4c9893(0x193)]={},_0x5d67a3[_0x4c9893(0x77)],_0x5d67a3['rxjs'],_0x5d67a3[_0x4c9893(0x151)]));}(this,function(_0x58ae90,_0x384542,_0x451cbf,_0x1fa105){'use strict';const _0x124e1b=_0xd579;var _0x4b5552=Object[_0x124e1b(0x7f)],_0x7f36e4=(_0x2e8c8d,_0x4d9baa,_0x1f0b8c)=>_0x4d9baa in _0x2e8c8d?_0x4b5552(_0x2e8c8d,_0x4d9baa,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1f0b8c}):_0x2e8c8d[_0x4d9baa]=_0x1f0b8c,_0x52b190=(_0x19982c,_0x370620)=>_0x4b5552(_0x19982c,_0x124e1b(0x171),{'value':_0x370620,'configurable':!0x0}),_0x4bbf1d=(_0x63d732,_0x3537b1,_0x42a1c6)=>_0x7f36e4(_0x63d732,typeof _0x3537b1!=_0x124e1b(0xe7)?_0x3537b1+'':_0x3537b1,_0x42a1c6),_0x1df16,_0x44a502,_0x13298d;const _0x1502d0={'id':'sheet.mutation.set-filter-range','type':_0x384542[_0x124e1b(0x118)][_0x124e1b(0x13d)],'handler':_0x52b190((_0x31f2a6,_0x25cb88)=>{const _0x434f43=_0x124e1b,{subUnitId:_0x2ba3ff,unitId:_0x15bb35,range:_0x1aaae6}=_0x25cb88;return _0x31f2a6['get'](_0x58ae90[_0x434f43(0x6e)])[_0x434f43(0x90)](_0x15bb35,_0x2ba3ff)['setRange'](_0x1aaae6),!0x0;},_0x124e1b(0x101))},_0x4fad8b={'id':_0x124e1b(0x132),'type':_0x384542[_0x124e1b(0x118)][_0x124e1b(0x13d)],'handler':_0x52b190((_0x378cd4,_0x1e50f3)=>{const _0x45ee6c=_0x124e1b,{subUnitId:_0x5afc27,unitId:_0x49b12e,criteria:_0x45c43b,col:_0x40b46f,reCalc:reCalc=!0x0}=_0x1e50f3,_0x31115e=_0x378cd4[_0x45ee6c(0xf9)](_0x58ae90[_0x45ee6c(0x6e)])[_0x45ee6c(0xe2)](_0x49b12e,_0x5afc27);return _0x31115e?(_0x31115e[_0x45ee6c(0x107)](_0x40b46f,_0x45c43b,reCalc),!0x0):!0x1;},_0x124e1b(0x101))},_0x100dac={'id':_0x124e1b(0x7d),'type':_0x384542['CommandType']['MUTATION'],'handler':_0x52b190((_0x46f295,_0x48d53c)=>{const _0x5cdaf1=_0x124e1b,{unitId:_0x2cb86e,subUnitId:_0x330ba8}=_0x48d53c;return _0x46f295[_0x5cdaf1(0xf9)](_0x58ae90[_0x5cdaf1(0x6e)])[_0x5cdaf1(0x148)](_0x2cb86e,_0x330ba8);},_0x124e1b(0x101))},_0x1f121f={'id':_0x124e1b(0x15b),'type':_0x384542[_0x124e1b(0x118)][_0x124e1b(0x13d)],'handler':_0x52b190((_0x40b49a,_0x37581b)=>{const _0x1e5371=_0x124e1b,{unitId:_0x396ecb,subUnitId:_0x315828}=_0x37581b,_0x408a3c=_0x40b49a[_0x1e5371(0xf9)](_0x58ae90['SheetsFilterService'])[_0x1e5371(0xe2)](_0x396ecb,_0x315828);return _0x408a3c?(_0x408a3c[_0x1e5371(0x10a)](),!0x0):!0x1;},_0x124e1b(0x101))};var _0x3adef4=(_0x2e8efd=>(_0x2e8efd[_0x124e1b(0xd3)]=_0x124e1b(0x16c),_0x2e8efd['GREATER_THAN']=_0x124e1b(0xb5),_0x2e8efd['GREATER_THAN_OR_EQUAL']=_0x124e1b(0x16f),_0x2e8efd[_0x124e1b(0x9e)]=_0x124e1b(0xde),_0x2e8efd[_0x124e1b(0xed)]=_0x124e1b(0xbe),_0x2e8efd[_0x124e1b(0x18c)]=_0x124e1b(0x13f),_0x2e8efd))(_0x3adef4||{});const _0x1f6c5c={'operator':_0x3adef4[_0x124e1b(0x10e)],'fn':_0x52b190((_0x1694c8,_0x8ffbe)=>_0x1abc27(_0x1694c8)?_0x1694c8>_0x8ffbe:!0x1,'fn')},_0x5d92f6={'operator':_0x3adef4[_0x124e1b(0xc4)],'fn':_0x52b190((_0xadc4ad,_0x183948)=>_0x1abc27(_0xadc4ad)?_0xadc4ad>=_0x183948:!0x1,'fn')},_0x4239b4={'operator':_0x3adef4[_0x124e1b(0x9e)],'fn':_0x52b190((_0x56a434,_0x41d63c)=>_0x1abc27(_0x56a434)?_0x56a434<_0x41d63c:!0x1,'fn')},_0x59493b={'operator':_0x3adef4['LESS_THAN_OR_EQUAL'],'fn':_0x52b190((_0x3a821f,_0x5f1700)=>_0x1abc27(_0x3a821f)?_0x3a821f<=_0x5f1700:!0x1,'fn')},_0x2bfd62={'operator':_0x3adef4[_0x124e1b(0xd3)],'fn':_0x52b190((_0xee8449,_0x853be8)=>_0x1abc27(_0xee8449)?_0xee8449===_0x853be8:!0x1,'fn')},_0x15800b={'operator':_0x3adef4[_0x124e1b(0x18c)],'fn':_0x52b190((_0x5e6e41,_0x33e6ec)=>{const _0x3e65d1=_0x124e1b;if(typeof _0x33e6ec==_0x3e65d1(0x14e)){if(_0x33e6ec==='\x20')return _0x5e6e41!=null;const _0x1809b5=_0x56e8e6(_0x5e6e41);return _0x1809b5&&_0xee5dbe(_0x33e6ec)?!_0x557517(_0x33e6ec)['test'](_0x1809b5):_0x1809b5!==_0x33e6ec;}return _0x1abc27(_0x5e6e41)?_0x5e6e41!==_0x33e6ec:!0x0;},'fn')},_0x16a07e=new Map([]);[_0x1f6c5c,_0x5d92f6,_0x4239b4,_0x59493b,_0x2bfd62,_0x15800b][_0x124e1b(0x15e)](_0x508eb1=>{const _0x2f3a21=_0x124e1b;_0x16a07e[_0x2f3a21(0x7a)](_0x508eb1[_0x2f3a21(0x97)],_0x508eb1);});function _0x5ea7fb(_0xe8e357){return!!_0xe8e357;}_0x52b190(_0x5ea7fb,'isNumericFilterFn');const _0x5e04e0={'fn':_0x52b190((_0x3354e9,_0x505c5f)=>{const _0xbbeb0b=_0x124e1b,_0x213e22=_0x56e8e6(_0x3354e9);return _0x213e22===null?_0x505c5f==='':_0x557517(_0x505c5f)[_0xbbeb0b(0x12f)](_0x213e22);},'fn')};function _0x18b787(_0x3fe64f){const _0x1cd795=_0x124e1b;return _0x3fe64f?_0x16a07e[_0x1cd795(0xf9)](_0x3fe64f):_0x5e04e0;}_0x52b190(_0x18b787,'getCustomFilterFn');function _0x1abc27(_0x3c4ac4){const _0xb89b1e=_0x124e1b;return typeof _0x3c4ac4==_0xb89b1e(0x19e);}_0x52b190(_0x1abc27,_0x124e1b(0xb8));function _0x27af5d(_0x3896a7){const _0x23bb3b=_0x124e1b;return!!(typeof _0x3896a7=='number'||typeof _0x3896a7==_0x23bb3b(0x14e)&&_0x384542[_0x23bb3b(0x18d)](_0x3896a7));}_0x52b190(_0x27af5d,_0x124e1b(0x8b));function _0x56e8e6(_0x51abd7){const _0x59a9c7=_0x124e1b;return typeof _0x51abd7==_0x59a9c7(0x8e)||_0x51abd7==null?null:typeof _0x51abd7=='string'?_0x51abd7:_0x51abd7[_0x59a9c7(0xe1)]();}_0x52b190(_0x56e8e6,_0x124e1b(0x102));function _0xee5dbe(_0x3539f1){const _0x21754b=_0x124e1b;return typeof _0x3539f1==_0x21754b(0x19e)?!0x1:_0x3539f1[_0x21754b(0xf1)]('*')!==-0x1||_0x3539f1['indexOf']('?')!==-0x1;}_0x52b190(_0xee5dbe,'isWildCardString');function _0x557517(_0x4fd42e){const _0xe79500=_0x124e1b,_0xcf44ec=_0x4fd42e[_0xe79500(0xfa)](/[.+^${}()|[\]\\]/g,'\x5c$&')['replaceAll']('?','.')['replace'](/[*]/g,'.$&');return new RegExp('^'+_0xcf44ec+'$');}_0x52b190(_0x557517,_0x124e1b(0x72));const _0x281064=_0x52b190(()=>new Set(),_0x124e1b(0x134)),_0x551aec=class _0x42c19d extends _0x384542[_0x124e1b(0x12d)]{constructor(_0x2b1272,_0x12cf2c,_0x1909b6){const _0x1c5265=_0x124e1b;super(),_0x4bbf1d(this,'_filteredOutRows$',new _0x451cbf[(_0x1c5265(0xd8))](_0x281064())),_0x4bbf1d(this,_0x1c5265(0x143),this[_0x1c5265(0x9a)][_0x1c5265(0x173)]()),_0x4bbf1d(this,_0x1c5265(0x11c),new _0x451cbf['BehaviorSubject'](!0x1)),_0x4bbf1d(this,'hasCriteria$',this[_0x1c5265(0x11c)][_0x1c5265(0x173)]()),_0x4bbf1d(this,'_filterColumnByIndex',new Map()),_0x4bbf1d(this,'_alreadyFilteredOutRows',_0x281064()),_0x4bbf1d(this,'_range'),(this[_0x1c5265(0x165)]=_0x2b1272,this[_0x1c5265(0xe6)]=_0x12cf2c,this[_0x1c5265(0xaa)]=_0x1909b6);}get[_0x124e1b(0x129)](){const _0x95de6=_0x124e1b;return this[_0x95de6(0x9a)][_0x95de6(0x11d)]();}set['filteredOutRows'](_0x398745){const _0x37c8c6=_0x124e1b;this[_0x37c8c6(0xf8)]=_0x398745,this[_0x37c8c6(0x9a)][_0x37c8c6(0x188)](_0x398745);}[_0x124e1b(0xbf)](){const _0x21175d=_0x124e1b;super['dispose'](),this['_filteredOutRows$']['complete'](),this[_0x21175d(0x11c)]['complete']();}['serialize'](){const _0x44c193=_0x124e1b,_0x5a9113={'ref':_0x384542[_0x44c193(0x87)][_0x44c193(0x176)](this[_0x44c193(0x130)]),'filterColumns':this[_0x44c193(0x127)](!0x0)['sort'](([_0x44d959],[_0x2c52f0])=>_0x44d959-_0x2c52f0)['map'](([_0x42522c,_0x2de051])=>_0x2de051[_0x44c193(0x9f)]())};return this[_0x44c193(0xf8)]&&(_0x5a9113[_0x44c193(0x71)]=Array[_0x44c193(0xf2)](this[_0x44c193(0xf8)])['sort']()),_0x5a9113;}static[_0x124e1b(0x172)](_0x5a07df,_0x37c5b8,_0x78a422,_0x1e15df){const _0xafd0fd=_0x124e1b,_0x3abb26=new _0x42c19d(_0x5a07df,_0x37c5b8,_0x78a422);return _0x3abb26[_0xafd0fd(0x10b)](_0x1e15df),_0x3abb26;}[_0x124e1b(0x10b)](_0x1f7210){const _0x2d9bb4=_0x124e1b;var _0x44c03f;this['setRange'](_0x1f7210[_0x2d9bb4(0x17f)]),(_0x44c03f=_0x1f7210[_0x2d9bb4(0xaf)])==null||_0x44c03f[_0x2d9bb4(0x15e)](_0x253598=>this[_0x2d9bb4(0x198)](_0x253598[_0x2d9bb4(0x177)],_0x253598)),_0x1f7210['cachedFilteredOut']&&(this[_0x2d9bb4(0xf8)]=new Set(_0x1f7210['cachedFilteredOut']),this[_0x2d9bb4(0xac)]()),this[_0x2d9bb4(0x76)]();}[_0x124e1b(0x149)](_0x5a5ce7){const _0x475764=_0x124e1b;return this[_0x475764(0xf8)][_0x475764(0x162)](_0x5a5ce7);}[_0x124e1b(0x167)](){const _0x243039=_0x124e1b;if(!this[_0x243039(0x130)])throw new Error(_0x243039(0xcf));return this['_range'];}['getFilteredOutRowsExceptCol'](_0x2b12a2){const _0x4541ef=_0x124e1b;return this['_getAllFilterColumns'](!0x0)[_0x4541ef(0x11e)](([_0x135847])=>_0x135847!==_0x2b12a2)['reduce']((_0x4937db,[,_0x374033])=>{const _0x5630a4=_0x4541ef,_0x21d846=_0x374033[_0x5630a4(0x139)]({'getAlreadyFilteredOutRows':_0x52b190(()=>_0x4937db,_0x5630a4(0x187))});return _0x21d846?_0x384542[_0x5630a4(0x179)](_0x4937db,_0x21d846):_0x4937db;},new Set());}[_0x124e1b(0x103)](_0x523169){const _0x594ad3=_0x124e1b;this[_0x594ad3(0x130)]=_0x523169,this['_getAllFilterColumns'](!0x0)[_0x594ad3(0x15e)](([_0x1c6210,_0x451850])=>{const _0xec61b=_0x594ad3;_0x451850[_0xec61b(0x10d)]({'startRow':_0x523169[_0xec61b(0x19c)],'endRow':_0x523169[_0xec61b(0x196)],'startColumn':_0x1c6210,'endColumn':_0x1c6210},_0x1c6210);});}['setCriteria'](_0x308e29,_0x606a28,_0x24fecd=!0x1){const _0x4e040f=_0x124e1b;if(!this['_range'])throw new Error(_0x4e040f(0x108));if(!_0x606a28){this[_0x4e040f(0x191)](_0x308e29),this[_0x4e040f(0x105)](),_0x24fecd&&this[_0x4e040f(0x17e)](),this['_emit'](),this[_0x4e040f(0x76)]();return;}this[_0x4e040f(0x198)](_0x308e29,_0x606a28),_0x24fecd&&(this[_0x4e040f(0x105)](),this[_0x4e040f(0x19f)](),this['_emit'](),this[_0x4e040f(0x76)]());}[_0x124e1b(0xb6)](){const _0x561475=_0x124e1b;return this[_0x561475(0x127)](!0x0);}['getFilterColumn'](_0x1fc47e){const _0x315d0d=_0x124e1b;var _0x3d3ad7;return(_0x3d3ad7=this[_0x315d0d(0x128)]['get'](_0x1fc47e))!=null?_0x3d3ad7:null;}[_0x124e1b(0x10a)](){const _0xbc00e8=_0x124e1b;this[_0xbc00e8(0x17e)](),this[_0xbc00e8(0xac)]();}['_getAllFilterColumns'](_0x6f6ed2=!0x1){const _0x24437d=_0x124e1b,_0x311603=Array[_0x24437d(0xf2)](this[_0x24437d(0x128)]['entries']());return _0x6f6ed2?_0x311603:_0x311603[_0x24437d(0xff)](([_0x32a060,_0x589f93])=>_0x589f93);}[_0x124e1b(0x17e)](){const _0x4dcc9b=_0x124e1b;this[_0x4dcc9b(0xf8)]=_0x281064(),this[_0x4dcc9b(0x127)]()[_0x4dcc9b(0x15e)](_0x3e15b0=>_0x3e15b0[_0x4dcc9b(0xcc)]()),this[_0x4dcc9b(0x19f)]();}['_setCriteriaWithoutReCalc'](_0x410989,_0x1e7529){const _0x5a3fff=_0x124e1b,_0x48ac37=this[_0x5a3fff(0x130)];if(!_0x48ac37)throw new Error(_0x5a3fff(0x108));const {startColumn:_0x1218de,endColumn:_0xd05cad}=_0x48ac37;if(_0x410989>_0xd05cad||_0x410989<_0x1218de)throw new Error(_0x5a3fff(0x160)+_0x410989+_0x5a3fff(0x189));let _0x50eb89;this[_0x5a3fff(0x128)][_0x5a3fff(0x162)](_0x410989)?_0x50eb89=this['_filterColumnByIndex'][_0x5a3fff(0xf9)](_0x410989):(_0x50eb89=new _0x5ced87(this['unitId'],this[_0x5a3fff(0xe6)],this[_0x5a3fff(0xaa)],_0x1e7529,{'getAlreadyFilteredOutRows':_0x52b190(()=>this[_0x5a3fff(0xf8)],_0x5a3fff(0x187))}),_0x50eb89['setRangeAndColumn'](_0x48ac37,_0x410989),this['_filterColumnByIndex'][_0x5a3fff(0x7a)](_0x410989,_0x50eb89)),_0x50eb89['setCriteria'](_0x1e7529);}[_0x124e1b(0x191)](_0x29d0b2){const _0x2681fa=_0x124e1b,_0x4113a2=this[_0x2681fa(0x128)]['get'](_0x29d0b2);_0x4113a2&&(_0x4113a2[_0x2681fa(0xbf)](),this['_filterColumnByIndex'][_0x2681fa(0x115)](_0x29d0b2));}[_0x124e1b(0xac)](){const _0x4a39c0=_0x124e1b;this['_filteredOutRows$'][_0x4a39c0(0x188)](this[_0x4a39c0(0xf8)]);}[_0x124e1b(0x76)](){const _0x1f322c=_0x124e1b;this['_hasCriteria$'][_0x1f322c(0x188)](this['_filterColumnByIndex']['size']>0x0);}[_0x124e1b(0x105)](){const _0x4ecc8f=_0x124e1b,_0x4fd7d2=this[_0x4ecc8f(0x127)]()['filter'](_0x3933df=>_0x3933df[_0x4ecc8f(0x9c)]())[_0x4ecc8f(0x74)]((_0x41e1e7,_0x5eb6cb)=>_0x384542['mergeSets'](_0x41e1e7,_0x5eb6cb[_0x4ecc8f(0x129)]),new Set());this['_alreadyFilteredOutRows']=_0x4fd7d2;}[_0x124e1b(0x19f)](){const _0x2f7ecf=_0x124e1b,_0x7dc3a2=this[_0x2f7ecf(0x127)]()[_0x2f7ecf(0x11e)](_0xa3980a=>!_0xa3980a['hasCache']());for(const _0x3b36d6 of _0x7dc3a2){const _0x1da8ed=_0x3b36d6[_0x2f7ecf(0x10a)]();_0x1da8ed&&(this[_0x2f7ecf(0xf8)]=_0x384542['mergeSets'](this[_0x2f7ecf(0xf8)],_0x1da8ed));}}};_0x52b190(_0x551aec,_0x124e1b(0xf7));let _0xfcd57b=_0x551aec;const _0x15e90b=class _0x46f4fa extends _0x384542[_0x124e1b(0x12d)]{constructor(_0x70b509,_0x2328d6,_0x2c4eab,_0x4b6a7b,_0x3acfaf){const _0x21566e=_0x124e1b;super(),_0x4bbf1d(this,_0x21566e(0xba),null),_0x4bbf1d(this,_0x21566e(0x147),null),_0x4bbf1d(this,_0x21566e(0x130),null),_0x4bbf1d(this,_0x21566e(0x138),0x0),_0x4bbf1d(this,_0x21566e(0xc6),!0x1),(this[_0x21566e(0x165)]=_0x70b509,this[_0x21566e(0xe6)]=_0x2328d6,this[_0x21566e(0xaa)]=_0x2c4eab,this['_criteria']=_0x4b6a7b,this[_0x21566e(0x6a)]=_0x3acfaf);}get[_0x124e1b(0x129)](){const _0x275b89=_0x124e1b;return this[_0x275b89(0xba)];}[_0x124e1b(0xbf)](){const _0xf51b31=_0x124e1b;super['dispose'](),this[_0xf51b31(0xba)]=null;}[_0x124e1b(0xcc)](){const _0x2c0edc=_0x124e1b;this[_0x2c0edc(0xba)]=null;}[_0x124e1b(0x9f)](){const _0x5b94b6=_0x124e1b;if(!this[_0x5b94b6(0x122)])throw new Error(_0x5b94b6(0x68));return _0x384542[_0x5b94b6(0x140)]['deepClone']({...this[_0x5b94b6(0x122)],'colId':this['_column']});}[_0x124e1b(0x9c)](){const _0x53f859=_0x124e1b;return this[_0x53f859(0xba)]!==null;}[_0x124e1b(0x10d)](_0x389887,_0x39ca57){const _0x29d3f5=_0x124e1b;this[_0x29d3f5(0x130)]=_0x389887,this[_0x29d3f5(0x138)]=_0x39ca57;}[_0x124e1b(0x107)](_0x17d096){const _0x1e9d8d=_0x124e1b;this[_0x1e9d8d(0x122)]=_0x17d096,this[_0x1e9d8d(0xdf)](),this[_0x1e9d8d(0xba)]=null;}[_0x124e1b(0x7e)](){const _0x539c09=_0x124e1b;return _0x384542[_0x539c09(0x140)][_0x539c09(0xd1)](this[_0x539c09(0x122)]);}[_0x124e1b(0x10a)](){const _0x58b0ca=_0x124e1b;return this[_0x58b0ca(0xba)]=this['calc'](this[_0x58b0ca(0x6a)]),this[_0x58b0ca(0xba)];}[_0x124e1b(0x139)](_0x5f3b8f){const _0x1f148d=_0x124e1b;if(!this[_0x1f148d(0x147)])throw new Error(_0x1f148d(0xf0));if(!this[_0x1f148d(0x130)])throw new Error(_0x1f148d(0x6d));if(typeof this[_0x1f148d(0x138)]!='number')throw new TypeError(_0x1f148d(0x99));const _0xf082c9=this[_0x1f148d(0x138)],_0x542acc={'startColumn':_0xf082c9,'endColumn':_0xf082c9,'startRow':this[_0x1f148d(0x130)][_0x1f148d(0x19c)]+0x1,'endRow':this[_0x1f148d(0x130)][_0x1f148d(0x196)]},_0x1b9e76=new Set(),_0x2ff967=_0x5f3b8f[_0x1f148d(0x187)]();for(const _0x47a7fb of this['_worksheet']['iterateByColumn'](_0x542acc,!0x1,!0x1)){const {row:_0x40ce0f,rowSpan:_0x5a7ffd,col:_0x1a585b}=_0x47a7fb;if(_0x2ff967[_0x1f148d(0x162)](_0x40ce0f)&&(!_0x5a7ffd||_0x5a7ffd===0x1))continue;const _0x1afe1f=this[_0x1f148d(0xc6)]?_0x384542[_0x1f148d(0x7b)](this[_0x1f148d(0xaa)]['getCell'](_0x40ce0f,_0x1a585b)):_0x686a8d(this[_0x1f148d(0xaa)],_0x40ce0f,_0x1a585b);if(!this[_0x1f148d(0x147)](_0x1afe1f)&&(_0x1b9e76['add'](_0x40ce0f),_0x5a7ffd)){for(let _0x276be8=0x1;_0x276be8<_0x5a7ffd;_0x276be8++)_0x1b9e76[_0x1f148d(0x15a)](_0x40ce0f+_0x276be8);}}return _0x1b9e76;}[_0x124e1b(0xdf)](){const _0x1c6fdf=_0x124e1b;this[_0x1c6fdf(0x122)]&&(this[_0x1c6fdf(0x147)]=_0x1da7ea(this[_0x1c6fdf(0x122)]),this['_filterByValues']=!!this[_0x1c6fdf(0x122)][_0x1c6fdf(0x85)]);}};_0x52b190(_0x15e90b,'FilterColumn');let _0x5ced87=_0x15e90b;function _0x1da7ea(_0x7d2a9a){const _0x5cabad=_0x124e1b;if(_0x7d2a9a[_0x5cabad(0x85)])return _0x50fe1f(_0x7d2a9a[_0x5cabad(0x85)]);if(_0x7d2a9a[_0x5cabad(0x123)])return _0x3d2fa1(_0x7d2a9a[_0x5cabad(0x123)]);throw new Error(_0x5cabad(0x144));}_0x52b190(_0x1da7ea,_0x124e1b(0xce));function _0x50fe1f(_0x23178d){const _0x57d9e5=_0x124e1b,_0xc56ec1=!!_0x23178d['blank'],_0x2ff705=new Set(_0x23178d[_0x57d9e5(0x85)]);return _0x230a97=>_0x230a97===void 0x0||_0x230a97===''?_0xc56ec1:_0x2ff705[_0x57d9e5(0x162)](typeof _0x230a97==_0x57d9e5(0x14e)?_0x230a97:''+_0x230a97);}_0x52b190(_0x50fe1f,_0x124e1b(0x17c));function _0x3d2fa1(_0x19d207){const _0x2e749a=_0x124e1b,_0x5f24aa=_0x19d207['customFilters']['map'](_0x2f9185=>_0x2b3533(_0x2f9185));return _0x313b26(_0x5f24aa)?_0x19d207[_0x2e749a(0xeb)]?_0x430653(_0x5f24aa):_0x4bb536(_0x5f24aa):_0x5f24aa[0x0];}_0x52b190(_0x3d2fa1,_0x124e1b(0x114));function _0x430653(_0xbc21ff){const [_0x13c2dc,_0x5bdc29]=_0xbc21ff;return _0x55121e=>_0x13c2dc(_0x55121e)&&_0x5bdc29(_0x55121e);}_0x52b190(_0x430653,_0x124e1b(0x154));function _0x4bb536(_0x266e7a){const [_0x1e175a,_0x3c2d56]=_0x266e7a;return _0x3f5be4=>_0x1e175a(_0x3f5be4)||_0x3c2d56(_0x3f5be4);}_0x52b190(_0x4bb536,'OR');function _0x313b26(_0x296cc7){const _0x86e14e=_0x124e1b;return _0x296cc7[_0x86e14e(0xfd)]===0x2;}_0x52b190(_0x313b26,_0x124e1b(0x197));function _0x2b3533(_0x287ac5){const _0x344fc4=_0x124e1b,_0x414780=_0x287ac5[_0x344fc4(0x174)];if(_0x287ac5['operator']===_0x3adef4[_0x344fc4(0x18c)]&&!_0x27af5d(_0x414780))return _0x343a27=>_0x15800b['fn'](_0x343a27,_0x414780);if(_0x5ea7fb(_0x287ac5[_0x344fc4(0x97)])){if(!_0x27af5d(_0x414780))return()=>!0x1;const _0x13841e=_0x18b787(_0x287ac5['operator']),_0x52bdaa=Number(_0x414780);return _0x4b92e4=>_0x13841e['fn'](_0x4b92e4,_0x52bdaa);}const _0x3742a9=_0x18b787(_0x287ac5[_0x344fc4(0x97)]);return _0x58f2e0=>_0x3742a9['fn'](_0x58f2e0,_0x414780);}_0x52b190(_0x2b3533,_0x124e1b(0xa4));function _0x686a8d(_0x33dc01,_0x278f44,_0xbbe22e){const _0x43bf81=_0x124e1b,_0x1bdb38=_0x33dc01[_0x43bf81(0x94)](_0x278f44,_0xbbe22e);if(!_0x1bdb38)return null;const _0x395d4b=_0x33dc01[_0x43bf81(0x106)](_0x278f44,_0xbbe22e);return _0x1bdb38&&!_0x395d4b?_0x1dc4c3(_0x1bdb38):_0x395d4b?_0x1bdb38['t']===_0x384542[_0x43bf81(0xc7)]['NUMBER']&&typeof _0x1bdb38['v']==_0x43bf81(0x14e)?_0x395d4b['v']:_0x1dc4c3(_0x395d4b):null;}_0x52b190(_0x686a8d,_0x124e1b(0x156));function _0x1dc4c3(_0x148f05){const _0x13d472=_0x124e1b;var _0x3b8ca8,_0x3b876d;const _0x400357=(_0x3b876d=(_0x3b8ca8=_0x148f05['p'])==null?void 0x0:_0x3b8ca8[_0x13d472(0x183)])==null?void 0x0:_0x3b876d[_0x13d472(0xa0)];if(_0x400357)return _0x400357[_0x13d472(0x170)]();const _0x130a23=_0x148f05['v'];return typeof _0x130a23==_0x13d472(0x14e)?_0x148f05['t']===_0x384542[_0x13d472(0xc7)][_0x13d472(0x16d)]?_0x130a23[_0x13d472(0x96)]():_0x130a23:typeof _0x130a23==_0x13d472(0x19e)?_0x148f05['t']===_0x384542['CellValueType']['BOOLEAN']?_0x130a23?_0x13d472(0x78):_0x13d472(0xa9):_0x130a23:typeof _0x130a23==_0x13d472(0x8e)?_0x130a23?_0x13d472(0x78):_0x13d472(0xa9):'';}_0x52b190(_0x1dc4c3,_0x124e1b(0x12b));var _0x37255c=Object[_0x124e1b(0x7f)],_0x167b25=Object[_0x124e1b(0x184)],_0x49c2ec=_0x52b190((_0x15aac3,_0x20ce68,_0x286f2d,_0x1eea4c)=>{const _0xd92a2a=_0x124e1b;for(var _0xe72295=_0x1eea4c>0x1?void 0x0:_0x1eea4c?_0x167b25(_0x20ce68,_0x286f2d):_0x20ce68,_0xddcf29=_0x15aac3[_0xd92a2a(0xfd)]-0x1,_0x2e28f7;_0xddcf29>=0x0;_0xddcf29--)(_0x2e28f7=_0x15aac3[_0xddcf29])&&(_0xe72295=(_0x1eea4c?_0x2e28f7(_0x20ce68,_0x286f2d,_0xe72295):_0x2e28f7(_0xe72295))||_0xe72295);return _0x1eea4c&&_0xe72295&&_0x37255c(_0x20ce68,_0x286f2d,_0xe72295),_0xe72295;},_0x124e1b(0xcd)),_0x200a29=_0x52b190((_0x529b63,_0x2613ae)=>(_0x3334ef,_0x568f6b)=>_0x2613ae(_0x3334ef,_0x568f6b,_0x529b63),_0x124e1b(0xa3));const _0x4e7eaa=new Set([_0x1502d0['id'],_0x4fad8b['id'],_0x100dac['id'],_0x1f121f['id']]),_0x368871=_0x124e1b(0xa8);_0x58ae90[_0x124e1b(0x6e)]=(_0x1df16=class extends _0x384542[_0x124e1b(0x12d)]{constructor(_0x5bbf17,_0x5981e1,_0x55aaf5){const _0x4e3a56=_0x124e1b;super(),_0x4bbf1d(this,'_filterModels',new Map()),_0x4bbf1d(this,_0x4e3a56(0x142),new _0x451cbf['BehaviorSubject'](null)),_0x4bbf1d(this,_0x4e3a56(0x86),this['_loadedUnitId$'][_0x4e3a56(0x173)]()),_0x4bbf1d(this,_0x4e3a56(0x6c),new _0x451cbf[(_0x4e3a56(0xd8))](null)),_0x4bbf1d(this,_0x4e3a56(0xc0),this[_0x4e3a56(0x6c)][_0x4e3a56(0x173)]()),_0x4bbf1d(this,_0x4e3a56(0xe3),new _0x451cbf[(_0x4e3a56(0xd8))](null)),_0x4bbf1d(this,_0x4e3a56(0x175),this['_activeFilterModel$']['asObservable']()),(this[_0x4e3a56(0x8f)]=_0x5bbf17,this[_0x4e3a56(0xea)]=_0x5981e1,this['_commandService']=_0x55aaf5,this[_0x4e3a56(0xd0)](),this[_0x4e3a56(0x14f)]());}get[_0x124e1b(0x81)](){const _0x2ed612=_0x124e1b;return this[_0x2ed612(0xe3)]['getValue']();}[_0x124e1b(0x90)](_0x3e9dc5,_0x4615e2){const _0x665e14=_0x124e1b,_0x3e0700=this[_0x665e14(0xe2)](_0x3e9dc5,_0x4615e2);if(_0x3e0700)return _0x3e0700;const _0x502c86=this[_0x665e14(0xea)][_0x665e14(0x150)](_0x3e9dc5);if(!_0x502c86)throw new Error('[SheetsFilterService]:\x20could\x20not\x20create\x20\x22FilterModel\x22\x20on\x20a\x20non-existing\x20workbook\x20'+_0x3e9dc5+'!');const _0x4ed022=_0x502c86[_0x665e14(0x124)](_0x4615e2);if(!_0x4ed022)throw new Error(_0x665e14(0x146)+_0x4615e2+'!');const _0x1472ed=new _0xfcd57b(_0x3e9dc5,_0x4615e2,_0x4ed022);return this['_cacheFilterModel'](_0x3e9dc5,_0x4615e2,_0x1472ed),_0x1472ed;}['getFilterModel'](_0x1c0257,_0x25302b){const _0x2a936e=_0x124e1b;var _0x447072,_0x5abe87;return(_0x5abe87=(_0x447072=this['_filterModels'][_0x2a936e(0xf9)](_0x1c0257))==null?void 0x0:_0x447072[_0x2a936e(0xf9)](_0x25302b))!=null?_0x5abe87:null;}[_0x124e1b(0x148)](_0x44fdb6,_0x328572){const _0x5cd05a=_0x124e1b,_0x33bf42=this[_0x5cd05a(0xe2)](_0x44fdb6,_0x328572);return _0x33bf42?(_0x33bf42[_0x5cd05a(0xbf)](),this['_filterModels']['get'](_0x44fdb6)[_0x5cd05a(0x115)](_0x328572),!0x0):!0x1;}[_0x124e1b(0x10c)](_0x90468b){const _0x1a7dae=_0x124e1b;this[_0x1a7dae(0x6c)][_0x1a7dae(0x188)](_0x90468b);}['_updateActiveFilterModel'](){const _0x463f78=_0x124e1b;let _0x3eb234;try{if(_0x3eb234=this[_0x463f78(0xea)][_0x463f78(0xf3)](_0x384542[_0x463f78(0x199)][_0x463f78(0x18e)]),!_0x3eb234){this[_0x463f78(0xe3)]['next'](null);return;}}catch(_0x23a9e4){console['error'](_0x463f78(0xf4),_0x23a9e4);return;}const _0x251fe4=_0x3eb234['getActiveSheet'](!0x0);if(!_0x251fe4){this[_0x463f78(0xe3)]['next'](null);return;}const _0x188743=_0x251fe4[_0x463f78(0x195)](),_0x5b35d5=_0x251fe4[_0x463f78(0x95)](),_0x59b8a7=this['getFilterModel'](_0x188743,_0x5b35d5);this[_0x463f78(0xe3)][_0x463f78(0x188)](_0x59b8a7);}[_0x124e1b(0x14f)](){const _0x188660=_0x124e1b;this[_0x188660(0x14b)](_0x451cbf[_0x188660(0x18a)](_0x384542[_0x188660(0x8c)](this[_0x188660(0x153)][_0x188660(0xc8)][_0x188660(0xb3)](this['_commandService']))[_0x188660(0xd4)](_0x451cbf[_0x188660(0x11e)](([_0x34d080])=>_0x34d080['type']===_0x384542[_0x188660(0x118)]['MUTATION']&&_0x4e7eaa[_0x188660(0x162)](_0x34d080['id']))),this['_univerInstanceService'][_0x188660(0x168)](_0x384542[_0x188660(0x199)][_0x188660(0x18e)])[_0x188660(0xd4)](_0x451cbf[_0x188660(0x6f)](_0x542369=>{var _0x19a7b3;return(_0x19a7b3=_0x542369==null?void 0x0:_0x542369['activeSheet$'])!=null?_0x19a7b3:_0x451cbf['of'](null);})))[_0x188660(0x12a)](()=>this[_0x188660(0x194)]()));}[_0x124e1b(0x100)](_0x254a5a){const _0x4b4f62=_0x124e1b,_0x40daf4=this[_0x4b4f62(0x16e)]['get'](_0x254a5a);if(!_0x40daf4)return'{}';const _0x23407a={};return _0x40daf4[_0x4b4f62(0x15e)]((_0x3db525,_0x561b9a)=>{const _0x2c73f3=_0x4b4f62;_0x23407a[_0x561b9a]=_0x3db525[_0x2c73f3(0x9f)]();}),JSON[_0x4b4f62(0x169)](_0x23407a);}[_0x124e1b(0x164)](_0x44f723,_0x5d8e46){const _0x4d681c=_0x124e1b,_0x12df8e=this[_0x4d681c(0xea)][_0x4d681c(0x150)](_0x44f723);Object[_0x4d681c(0x91)](_0x5d8e46)[_0x4d681c(0x15e)](_0x285495=>{const _0x5abb89=_0x4d681c,_0x4afe0c=_0x5d8e46[_0x285495],_0xa728d2=_0xfcd57b[_0x5abb89(0x172)](_0x44f723,_0x285495,_0x12df8e[_0x5abb89(0x124)](_0x285495),_0x4afe0c);this[_0x5abb89(0xc3)](_0x44f723,_0x285495,_0xa728d2);});}[_0x124e1b(0xd0)](){const _0x20a990=_0x124e1b;this['_resourcesManagerService'][_0x20a990(0x11f)]({'pluginName':_0x368871,'businesses':[_0x384542['UniverInstanceType']['UNIVER_SHEET']],'toJson':_0x52b190(_0x59d671=>this[_0x20a990(0x100)](_0x59d671),_0x20a990(0x159)),'parseJson':_0x52b190(_0x387e03=>JSON[_0x20a990(0x18f)](_0x387e03),_0x20a990(0xa1)),'onLoad':_0x52b190((_0x447517,_0x52c467)=>{const _0x3314a0=_0x20a990;this[_0x3314a0(0x164)](_0x447517,_0x52c467),this[_0x3314a0(0x142)][_0x3314a0(0x188)](_0x447517),this[_0x3314a0(0x194)]();},_0x20a990(0x17a)),'onUnLoad':_0x52b190(_0x5cb47a=>{const _0x127675=_0x20a990,_0x1fc042=this[_0x127675(0x16e)][_0x127675(0xf9)](_0x5cb47a);_0x1fc042&&(_0x1fc042[_0x127675(0x15e)](_0x302b75=>_0x302b75[_0x127675(0xbf)]()),this[_0x127675(0x16e)][_0x127675(0x115)](_0x5cb47a));},_0x20a990(0x69))});}[_0x124e1b(0xc3)](_0x14ed8c,_0xa12278,_0x18be09){const _0x263f07=_0x124e1b;this['_filterModels'][_0x263f07(0x162)](_0x14ed8c)||this[_0x263f07(0x16e)][_0x263f07(0x7a)](_0x14ed8c,new Map()),this[_0x263f07(0x16e)][_0x263f07(0xf9)](_0x14ed8c)['set'](_0xa12278,_0x18be09);}},_0x52b190(_0x1df16,_0x124e1b(0x6e)),_0x1df16),_0x58ae90[_0x124e1b(0x6e)]=_0x49c2ec([_0x200a29(0x0,_0x384542['IResourceManagerService']),_0x200a29(0x1,_0x384542[_0x124e1b(0x190)]),_0x200a29(0x2,_0x384542[_0x124e1b(0xb7)])],_0x58ae90[_0x124e1b(0x6e)]);function _0x59e26f(_0xa740a6,_0x564d4a){const _0x556f48=_0x124e1b;for(let _0x5aa738=0x0;_0x5aa738<_0xa740a6[_0x556f48(0xfd)];_0x5aa738++){let _0x4e5063=_0x5aa738;if(_0xa740a6[_0x5aa738]){for(let _0x2d84a7=_0x5aa738+0x1;_0x2d84a7<_0xa740a6['length'];_0x2d84a7++)_0xa740a6[_0x4e5063]&&_0xa740a6[_0x2d84a7]&&_0x564d4a(_0xa740a6[_0x4e5063],_0xa740a6[_0x2d84a7])&&(_0xa740a6[_0x4e5063]=null,_0x4e5063=_0x2d84a7);}}return _0xa740a6['filter'](_0xce3f07=>_0xce3f07!==null);}_0x52b190(_0x59e26f,'objectsShaker');function _0x8e19bc(_0xdadbad){const _0x3f88f4=_0x124e1b;return _0x59e26f(_0xdadbad,(_0x121222,_0x3db9e4)=>_0x121222['id']===_0x4fad8b['id']&&_0x3db9e4['id']===_0x4fad8b['id']&&_0x121222[_0x3f88f4(0xab)]['unitId']===_0x3db9e4[_0x3f88f4(0xab)][_0x3f88f4(0x165)]&&_0x121222[_0x3f88f4(0xab)][_0x3f88f4(0xe6)]===_0x3db9e4[_0x3f88f4(0xab)][_0x3f88f4(0xe6)]&&_0x121222[_0x3f88f4(0xab)][_0x3f88f4(0x17d)]===_0x3db9e4[_0x3f88f4(0xab)][_0x3f88f4(0x17d)]);}_0x52b190(_0x8e19bc,_0x124e1b(0xfb));var _0x308886=Object[_0x124e1b(0x7f)],_0x586fff=Object['getOwnPropertyDescriptor'],_0xafa7ba=_0x52b190((_0x2dbe7f,_0x250849,_0x2f3bad,_0x19a62d)=>{const _0x1b73c4=_0x124e1b;for(var _0x14ada9=_0x19a62d>0x1?void 0x0:_0x19a62d?_0x586fff(_0x250849,_0x2f3bad):_0x250849,_0xbe7420=_0x2dbe7f[_0x1b73c4(0xfd)]-0x1,_0x1c14af;_0xbe7420>=0x0;_0xbe7420--)(_0x1c14af=_0x2dbe7f[_0xbe7420])&&(_0x14ada9=(_0x19a62d?_0x1c14af(_0x250849,_0x2f3bad,_0x14ada9):_0x1c14af(_0x14ada9))||_0x14ada9);return _0x19a62d&&_0x14ada9&&_0x308886(_0x250849,_0x2f3bad,_0x14ada9),_0x14ada9;},_0x124e1b(0xc5)),_0x3b9a9f=_0x52b190((_0x41de0c,_0x45cca9)=>(_0xb76911,_0x49ee83)=>_0x45cca9(_0xb76911,_0x49ee83,_0x41de0c),_0x124e1b(0xf5));let _0x41866b=(_0x44a502=class extends _0x384542[_0x124e1b(0x12d)]{constructor(_0x450951,_0x54e0ea,_0x58f6bf,_0x25469d,_0x433c9e){const _0x3ff73f=_0x124e1b;super(),_0x4bbf1d(this,_0x3ff73f(0x178),new _0x384542[(_0x3ff73f(0x136))]()),(this['_commandService']=_0x450951,this[_0x3ff73f(0x79)]=_0x54e0ea,this[_0x3ff73f(0x158)]=_0x58f6bf,this[_0x3ff73f(0xea)]=_0x25469d,this[_0x3ff73f(0x19a)]=_0x433c9e,this[_0x3ff73f(0xdb)](),this[_0x3ff73f(0xec)](),this[_0x3ff73f(0x163)](),this[_0x3ff73f(0x18b)](),this[_0x3ff73f(0x112)]());}[_0x124e1b(0xdb)](){const _0x195ff7=_0x124e1b;[_0x4fad8b,_0x1502d0,_0x1f121f,_0x100dac][_0x195ff7(0x15e)](_0x2d09bc=>this[_0x195ff7(0x14b)](this[_0x195ff7(0x153)][_0x195ff7(0xb0)](_0x2d09bc)));}['_initInterceptors'](){const _0x55bfa3=_0x124e1b;this[_0x55bfa3(0x14b)](this[_0x55bfa3(0x79)][_0x55bfa3(0x16a)]({'getMutations':_0x52b190(_0x106469=>this[_0x55bfa3(0x16b)](_0x106469),_0x55bfa3(0x98))})),this[_0x55bfa3(0x14b)](this[_0x55bfa3(0x153)][_0x55bfa3(0xc8)](_0x5dbc5a=>{const _0x2195ad=_0x55bfa3;if(_0x5dbc5a['id']===_0x1fa105['SetWorksheetActiveOperation']['id']){const _0x5459ff=_0x5dbc5a[_0x2195ad(0xab)],_0x366842=_0x5459ff[_0x2195ad(0xe6)],_0x290b9b=_0x5459ff[_0x2195ad(0x165)];if(!_0x366842||!_0x290b9b)return;this[_0x2195ad(0x180)](_0x290b9b,_0x366842);}if(_0x5dbc5a['id']===_0x1502d0['id']){const _0x38ed77=_0x5dbc5a[_0x2195ad(0xab)],_0x19a626=_0x38ed77[_0x2195ad(0xe6)],_0x325690=_0x38ed77[_0x2195ad(0x165)];if(!_0x19a626||!_0x325690)return;this[_0x2195ad(0x180)](_0x38ed77[_0x2195ad(0x165)],_0x38ed77[_0x2195ad(0xe6)]);}})),this[_0x55bfa3(0x14b)](this[_0x55bfa3(0x158)][_0x55bfa3(0x86)][_0x55bfa3(0x12a)](_0x158902=>{const _0x5d95c3=_0x55bfa3;if(_0x158902){const _0x4aeb76=this[_0x5d95c3(0xea)][_0x5d95c3(0x150)](_0x158902),_0x250393=_0x4aeb76==null?void 0x0:_0x4aeb76[_0x5d95c3(0x135)]();_0x250393&&this[_0x5d95c3(0x180)](_0x158902,_0x250393['getSheetId']());}}));}[_0x124e1b(0x180)](_0x550226,_0x56200e){const _0x37eca0=_0x124e1b;var _0x24e4e2;this[_0x37eca0(0x178)]['dispose']();const _0x39d8b1=this[_0x37eca0(0xea)][_0x37eca0(0x150)](_0x550226),_0x250c6f=_0x39d8b1==null?void 0x0:_0x39d8b1[_0x37eca0(0x124)](_0x56200e);if(!_0x39d8b1||!_0x250c6f)return;const _0x56221a=(_0x24e4e2=this[_0x37eca0(0x158)][_0x37eca0(0xe2)](_0x550226,_0x56200e))==null?void 0x0:_0x24e4e2[_0x37eca0(0x167)](),_0x4572ce=_0x52b190(_0x448c21=>{const _0x5b217c=_0x37eca0;switch(_0x448c21['id']){case _0x1fa105[_0x5b217c(0xb2)]['id']:{const _0x4bf434=_0x448c21['params'],_0x1912f1=_0x4bf434[_0x5b217c(0x165)]||_0x550226,_0x5d8016=_0x4bf434['subUnitId']||_0x56200e;return this['_handleInsertRowCommand'](_0x4bf434,_0x1912f1,_0x5d8016);}case _0x1fa105[_0x5b217c(0xda)]['id']:{const _0x275d76=_0x448c21[_0x5b217c(0xab)],_0x17f88b=_0x275d76[_0x5b217c(0x165)]||_0x550226,_0x375b1b=_0x275d76['subUnitId']||_0x56200e;return this[_0x5b217c(0xa5)](_0x275d76,_0x17f88b,_0x375b1b);}case _0x1fa105[_0x5b217c(0xfc)]['id']:{const _0x3b791c=_0x448c21[_0x5b217c(0xab)];return this[_0x5b217c(0xcb)](_0x3b791c,_0x550226,_0x56200e);}case _0x1fa105[_0x5b217c(0xee)]['id']:{const _0x34a15f=_0x448c21[_0x5b217c(0xab)];return this[_0x5b217c(0xa2)](_0x34a15f,_0x550226,_0x56200e);}case _0x1fa105['EffectRefRangId'][_0x5b217c(0x82)]:{const _0x213a66=_0x448c21[_0x5b217c(0xab)];return this[_0x5b217c(0x155)](_0x213a66,_0x550226,_0x56200e);}case _0x1fa105[_0x5b217c(0xca)][_0x5b217c(0x121)]:{const _0x4c0750=_0x448c21[_0x5b217c(0xab)];return this[_0x5b217c(0x119)](_0x4c0750,_0x550226,_0x56200e);}case _0x1fa105['MoveRangeCommand']['id']:{const _0x56b0df=_0x448c21[_0x5b217c(0xab)];return this[_0x5b217c(0x11a)](_0x56b0df,_0x550226,_0x56200e);}}return{'redos':[],'undos':[]};},_0x37eca0(0x101));_0x56221a&&this[_0x37eca0(0x178)][_0x37eca0(0x15a)](this['_refRangeService'][_0x37eca0(0x8d)](_0x56221a,_0x4572ce,_0x550226,_0x56200e));}[_0x124e1b(0x16b)](_0x271ddf){const _0x14ea2b=_0x124e1b,{id:_0x1957ff}=_0x271ddf;switch(_0x1957ff){case _0x1fa105[_0x14ea2b(0x6b)]['id']:{const _0x5a7234=_0x271ddf['params'];return this[_0x14ea2b(0x12e)](_0x5a7234,_0x5a7234[_0x14ea2b(0x165)],_0x5a7234[_0x14ea2b(0xe6)]);}case _0x1fa105[_0x14ea2b(0x116)]['id']:{const _0x2256ae=_0x271ddf['params'],{targetSubUnitId:_0x6e7dfd,unitId:_0x1b4e02,subUnitId:_0x383a26}=_0x2256ae;return!_0x1b4e02||!_0x383a26||!_0x6e7dfd?this['_handleNull']():this['_handleCopySheetCommand'](_0x1b4e02,_0x383a26,_0x6e7dfd);}}return{'redos':[],'undos':[]};}[_0x124e1b(0xa5)](_0x2fef6f,_0x1f84f4,_0x3c3b16){const _0x11e1cc=_0x124e1b;var _0x40bffc;const _0x2c18d0=this[_0x11e1cc(0x158)][_0x11e1cc(0xe2)](_0x1f84f4,_0x3c3b16),_0x4f7c66=(_0x40bffc=_0x2c18d0==null?void 0x0:_0x2c18d0['getRange']())!=null?_0x40bffc:null;if(!_0x2c18d0||!_0x4f7c66)return this[_0x11e1cc(0xd9)]();const {startColumn:_0xb65ad8,endColumn:_0x5bda0a}=_0x4f7c66,{startColumn:_0xddf0dc,endColumn:_0x42c742}=_0x2fef6f[_0x11e1cc(0x15c)],_0x1263e7=_0x42c742-_0xddf0dc+0x1;if(_0x42c742>_0x5bda0a)return this[_0x11e1cc(0xd9)]();const _0x194c89=[],_0xb99d23=[],_0x5207d2=_0xddf0dc,_0x1382e1={'unitId':_0x1f84f4,'subUnitId':_0x3c3b16,'range':{..._0x4f7c66,'startColumn':_0xddf0dc<=_0xb65ad8?_0xb65ad8+_0x1263e7:_0xb65ad8,'endColumn':_0x5bda0a+_0x1263e7}},_0xc4cc80={'unitId':_0x1f84f4,'subUnitId':_0x3c3b16,'range':_0x4f7c66};_0x194c89[_0x11e1cc(0x88)]({'id':_0x1502d0['id'],'params':_0x1382e1}),_0xb99d23[_0x11e1cc(0x88)]({'id':_0x1502d0['id'],'params':_0xc4cc80});const _0x287a5f=_0x2c18d0[_0x11e1cc(0xb6)]()[_0x11e1cc(0x11e)](_0x559c27=>_0x559c27[0x0]>=_0x5207d2);if(_0x287a5f[_0x11e1cc(0xfd)]!==0x0){const {newRange:_0x1c6833,oldRange:_0x4bd9b3}=this[_0x11e1cc(0x15d)](_0x1f84f4,_0x3c3b16,_0x287a5f,_0x1263e7);_0x194c89[_0x11e1cc(0x88)](..._0x1c6833[_0x11e1cc(0x11b)],..._0x4bd9b3[_0x11e1cc(0x11b)]),_0xb99d23['push'](..._0x1c6833[_0x11e1cc(0x181)],..._0x4bd9b3[_0x11e1cc(0x181)]);}return{'redos':_0x8e19bc(_0x194c89),'undos':_0x8e19bc(_0xb99d23)};}['_handleInsertRowCommand'](_0x181419,_0x4b88b9,_0x1f6c9d){const _0x37431e=_0x124e1b;var _0x112471;const _0x325d0f=this[_0x37431e(0x158)][_0x37431e(0xe2)](_0x4b88b9,_0x1f6c9d),_0x1be7c0=(_0x112471=_0x325d0f==null?void 0x0:_0x325d0f[_0x37431e(0x167)]())!=null?_0x112471:null;if(!_0x325d0f||!_0x1be7c0)return this[_0x37431e(0xd9)]();const {startRow:_0x34a917,endRow:_0x28f6dd}=_0x1be7c0,{startRow:_0x1deb26,endRow:_0x3650f9}=_0x181419[_0x37431e(0x15c)],_0x17e0b5=_0x3650f9-_0x1deb26+0x1;if(_0x3650f9>_0x28f6dd)return this[_0x37431e(0xd9)]();const _0x50a26a=[],_0x1e4599=[],_0x602e8f={'unitId':_0x4b88b9,'subUnitId':_0x1f6c9d,'range':{..._0x1be7c0,'startRow':_0x1deb26<=_0x34a917?_0x34a917+_0x17e0b5:_0x34a917,'endRow':_0x28f6dd+_0x17e0b5}},_0x561624={'unitId':_0x4b88b9,'subUnitId':_0x1f6c9d,'range':_0x1be7c0};return _0x50a26a[_0x37431e(0x88)]({'id':_0x1502d0['id'],'params':_0x602e8f}),_0x1e4599[_0x37431e(0x88)]({'id':_0x1502d0['id'],'params':_0x561624}),{'redos':_0x8e19bc(_0x50a26a),'undos':_0x8e19bc(_0x1e4599)};}['_handleRemoveColCommand'](_0x164b8c,_0x2a8bd9,_0x9aabfb){const _0x275d79=_0x124e1b;var _0xbd2e84;const _0x32ea59=this['_sheetsFilterService'][_0x275d79(0xe2)](_0x2a8bd9,_0x9aabfb),_0x82f306=(_0xbd2e84=_0x32ea59==null?void 0x0:_0x32ea59[_0x275d79(0x167)]())!=null?_0xbd2e84:null;if(!_0x32ea59||!_0x82f306)return this[_0x275d79(0xd9)]();const {startColumn:_0x3d03ee,endColumn:_0x15f2c9}=_0x82f306,{startColumn:_0x2968be,endColumn:_0x3e2044}=_0x164b8c[_0x275d79(0x15c)];if(_0x2968be>_0x15f2c9)return this[_0x275d79(0xd9)]();const _0x1284e7=[],_0x380dc3=[],_0xb3ade1=_0x3e2044<_0x3d03ee?0x0:Math[_0x275d79(0x75)](_0x3e2044,_0x15f2c9)-Math[_0x275d79(0x83)](_0x2968be,_0x3d03ee)+0x1,_0x4fac5c=_0x3e2044-_0x2968be+0x1,_0x4ff704=_0x32ea59['getAllFilterColumns']();_0x4ff704['forEach'](_0x469d29=>{const _0x34c633=_0x275d79,[_0x31c56e,_0x27dc97]=_0x469d29;_0x31c56e<=_0x3e2044&&_0x31c56e>=_0x2968be&&(_0x1284e7[_0x34c633(0x88)]({'id':_0x4fad8b['id'],'params':{'unitId':_0x2a8bd9,'subUnitId':_0x9aabfb,'col':_0x31c56e,'criteria':null}}),_0x380dc3[_0x34c633(0x88)]({'id':_0x4fad8b['id'],'params':{'unitId':_0x2a8bd9,'subUnitId':_0x9aabfb,'col':_0x31c56e,'criteria':{..._0x27dc97['serialize'](),'colId':_0x31c56e}}}));});const _0xfc47e0=_0x4ff704[_0x275d79(0x11e)](_0xa0b242=>{const [_0x322f6e,_0x226fc4]=_0xa0b242;return _0x322f6e>_0x3e2044;});let _0x2f9e69={'undos':[],'redos':[]};if(_0xfc47e0[_0x275d79(0xfd)]>0x0){const {oldRange:_0x4eba2c,newRange:_0x4db552}=this[_0x275d79(0x15d)](_0x2a8bd9,_0x9aabfb,_0xfc47e0,-_0x4fac5c);_0x2f9e69=_0x4db552,_0x1284e7[_0x275d79(0x88)](..._0x4eba2c['redos']),_0x380dc3[_0x275d79(0x80)](..._0x4eba2c[_0x275d79(0x181)]);}if(_0xb3ade1===_0x15f2c9-_0x3d03ee+0x1){const _0x5b817a={'unitId':_0x2a8bd9,'subUnitId':_0x9aabfb};_0x1284e7[_0x275d79(0x88)]({'id':_0x100dac['id'],'params':_0x5b817a}),_0x380dc3[_0x275d79(0x80)]({'id':_0x1502d0['id'],'params':{'range':_0x82f306,'unitId':_0x2a8bd9,'subUnitId':_0x9aabfb}});}else{const _0x276e84=_0x3d03ee<=_0x2968be?_0x3d03ee:_0xb3ade1===0x0?_0x3d03ee-_0x4fac5c:_0x2968be,_0x5487b4=_0x3d03ee<=_0x2968be?_0x15f2c9-_0xb3ade1:_0x15f2c9-_0x4fac5c,_0x21398f={'unitId':_0x2a8bd9,'subUnitId':_0x9aabfb,'range':{..._0x82f306,'startColumn':_0x276e84,'endColumn':_0x5487b4}};_0x1284e7['push']({'id':_0x1502d0['id'],'params':_0x21398f}),_0x380dc3['unshift']({'id':_0x1502d0['id'],'params':{'range':_0x82f306,'unitId':_0x2a8bd9,'subUnitId':_0x9aabfb}}),_0x1284e7['push'](..._0x2f9e69['redos']),_0x380dc3['unshift'](..._0x2f9e69[_0x275d79(0x181)]);}return{'undos':_0x380dc3,'redos':_0x1284e7};}[_0x124e1b(0xa2)](_0x269112,_0xb4b2b1,_0x30abbc){const _0x51b7b4=_0x124e1b;var _0x174323;const _0x3656e2=this[_0x51b7b4(0x158)][_0x51b7b4(0xe2)](_0xb4b2b1,_0x30abbc);if(!_0x3656e2)return this['_handleNull']();const _0x45dfdc=_0x3656e2[_0x51b7b4(0x167)](),{startRow:_0x48114e,endRow:_0x147a31}=_0x45dfdc,{startRow:_0x415e73,endRow:_0x1f9c5b}=_0x269112[_0x51b7b4(0x15c)];if(_0x415e73>_0x147a31)return this['_handleNull']();if(_0x1f9c5b<_0x48114e)return{'undos':[{'id':_0x1502d0['id'],'params':{'range':_0x45dfdc,'unitId':_0xb4b2b1,'subUnitId':_0x30abbc}}],'redos':[{'id':_0x1502d0['id'],'params':{'range':{..._0x45dfdc,'startRow':_0x48114e-(_0x1f9c5b-_0x415e73+0x1),'endRow':_0x147a31-(_0x1f9c5b-_0x415e73+0x1)},'unitId':_0xb4b2b1,'subUnitId':_0x30abbc}}]};const _0x1d3d2f=[],_0x5d9dc0=[],_0x4cca55=_0x3656e2[_0x51b7b4(0xb6)](),_0x1b7c3f=_0x48114e<=_0x1f9c5b&&_0x48114e>=_0x415e73;_0x5d9dc0[_0x51b7b4(0x88)]({'id':_0x1502d0['id'],'params':{'range':_0x45dfdc,'unitId':_0xb4b2b1,'subUnitId':_0x30abbc}});const _0x52af33=Math[_0x51b7b4(0x75)](_0x1f9c5b,_0x147a31)-Math[_0x51b7b4(0x83)](_0x415e73,_0x48114e)+0x1;if(_0x52af33===_0x147a31-_0x48114e+0x1||_0x1b7c3f){const _0x29f54e={'unitId':_0xb4b2b1,'subUnitId':_0x30abbc};_0x1d3d2f[_0x51b7b4(0x88)]({'id':_0x100dac['id'],'params':_0x29f54e}),_0x4cca55['forEach'](_0x195847=>{const _0x336554=_0x51b7b4,[_0x5a5e59,_0x5906bc]=_0x195847,_0x156ffc={'unitId':_0xb4b2b1,'subUnitId':_0x30abbc,'col':_0x5a5e59,'criteria':{..._0x5906bc[_0x336554(0x9f)](),'colId':_0x5a5e59}};_0x5d9dc0[_0x336554(0x88)]({'id':_0x4fad8b['id'],'params':_0x156ffc});});}else{const _0x519d28=(_0x174323=this[_0x51b7b4(0xea)]['getUniverSheetInstance'](_0xb4b2b1))==null?void 0x0:_0x174323[_0x51b7b4(0x124)](_0x30abbc);if(!_0x519d28)return this['_handleNull']();const _0x1d904a=[];for(let _0x3f6df8=_0x415e73;_0x3f6df8<=_0x1f9c5b;_0x3f6df8++)_0x519d28[_0x51b7b4(0x111)](_0x3f6df8)&&_0x1d904a[_0x51b7b4(0x88)](_0x3f6df8);const _0x2a1664=Math[_0x51b7b4(0x75)](_0x48114e,_0x415e73),_0x25e83d=_0x2a1664+(_0x147a31-_0x48114e)-_0x52af33+_0x1d904a['length'],_0x39c367={'unitId':_0xb4b2b1,'subUnitId':_0x30abbc,'range':{..._0x45dfdc,'startRow':_0x2a1664,'endRow':_0x25e83d}};_0x1d3d2f[_0x51b7b4(0x88)]({'id':_0x1502d0['id'],'params':_0x39c367});}return{'undos':_0x8e19bc(_0x5d9dc0),'redos':_0x8e19bc(_0x1d3d2f)};}[_0x124e1b(0x155)](_0x4ab5fb,_0x55bc80,_0x22c893){const _0x278e20=_0x124e1b;var _0x3cf547;const _0xa64ae7=this[_0x278e20(0x158)][_0x278e20(0xe2)](_0x55bc80,_0x22c893),_0x18ad2d=(_0x3cf547=_0xa64ae7==null?void 0x0:_0xa64ae7['getRange']())!=null?_0x3cf547:null;if(!_0xa64ae7||!_0x18ad2d)return this['_handleNull']();const {startColumn:_0x4a2f9a,endColumn:_0x570690}=_0x18ad2d,{fromRange:_0x1c521e,toRange:_0x52a2d4}=_0x4ab5fb;if(_0x1c521e['endColumn']<_0x4a2f9a&&_0x52a2d4[_0x278e20(0xb9)]<=_0x4a2f9a||_0x1c521e[_0x278e20(0xb9)]>_0x570690&&_0x52a2d4[_0x278e20(0x186)]>_0x570690)return this[_0x278e20(0xd9)]();const _0x3a3156=[],_0x47e54b=[],_0x14d11d={};for(let _0x2079b3=_0x4a2f9a;_0x2079b3<=_0x570690;_0x2079b3++)_0x14d11d[_0x2079b3]={'colIndex':_0x2079b3,'filter':_0xa64ae7['getFilterColumn'](_0x2079b3)};_0x384542['moveMatrixArray'](_0x1c521e[_0x278e20(0xb9)],_0x1c521e[_0x278e20(0x186)]-_0x1c521e[_0x278e20(0xb9)]+0x1,_0x52a2d4[_0x278e20(0xb9)],_0x14d11d);let _0x2d011c=_0x18ad2d[_0x278e20(0xb9)],_0x1ce987=_0x18ad2d[_0x278e20(0x186)];_0x4a2f9a>=_0x1c521e[_0x278e20(0xb9)]&&_0x4a2f9a<=_0x1c521e[_0x278e20(0x186)]&&_0x52a2d4[_0x278e20(0xb9)]>_0x1c521e[_0x278e20(0xb9)]&&_0x1c521e[_0x278e20(0x186)]<_0x570690&&(_0x2d011c=_0x1c521e[_0x278e20(0x186)]+0x1),_0x570690>=_0x1c521e[_0x278e20(0xb9)]&&_0x570690<=_0x1c521e[_0x278e20(0x186)]&&_0x52a2d4[_0x278e20(0xb9)]<_0x1c521e['startColumn']&&_0x1c521e[_0x278e20(0xb9)]>_0x4a2f9a&&(_0x1ce987=_0x1c521e[_0x278e20(0xb9)]-0x1);const _0x1502c7=Object[_0x278e20(0x91)](_0x14d11d)[_0x278e20(0xff)](_0x1bb7a7=>Number(_0x1bb7a7)),_0x143658=_0x1502c7[_0x278e20(0x13b)](_0x22ef57=>_0x14d11d[_0x22ef57][_0x278e20(0x137)]===_0x1ce987),_0x484ffa=_0x1502c7['find'](_0x5cddc=>_0x14d11d[_0x5cddc][_0x278e20(0x137)]===_0x2d011c);if(_0x1502c7[_0x278e20(0x15e)](_0xdc2d82=>{const _0x22a2e9=_0x278e20;var _0x3fc946,_0x58c08e;const {colIndex:_0x1d6e31,filter:_0x199bb6}=_0x14d11d[_0xdc2d82],_0x20b8d2=_0xdc2d82;if(_0x199bb6){if(_0x20b8d2>=_0x484ffa&&_0x20b8d2<=_0x143658){const _0x4c94d8={'unitId':_0x55bc80,'subUnitId':_0x22c893,'col':_0x20b8d2,'criteria':{..._0x199bb6['serialize'](),'colId':_0x20b8d2}},_0x4e53b7={'unitId':_0x55bc80,'subUnitId':_0x22c893,'col':_0x20b8d2,'criteria':_0xa64ae7[_0x22a2e9(0x125)](_0x20b8d2)?{...(_0x3fc946=_0xa64ae7[_0x22a2e9(0x125)](_0x20b8d2))==null?void 0x0:_0x3fc946[_0x22a2e9(0x9f)](),'colId':_0x20b8d2}:null};_0x3a3156['push']({'id':_0x4fad8b['id'],'params':_0x4c94d8}),_0x47e54b[_0x22a2e9(0x88)]({'id':_0x4fad8b['id'],'params':_0x4e53b7});}if(!((_0x58c08e=_0x14d11d[_0x1d6e31])!=null&&_0x58c08e['filter'])){const _0x23c6d6={'unitId':_0x55bc80,'subUnitId':_0x22c893,'col':_0x1d6e31,'criteria':null};_0x3a3156[_0x22a2e9(0x88)]({'id':_0x4fad8b['id'],'params':_0x23c6d6}),_0x47e54b[_0x22a2e9(0x88)]({'id':_0x4fad8b['id'],'params':{'unitId':_0x55bc80,'subUnitId':_0x22c893,'col':_0x1d6e31,'criteria':{..._0x199bb6['serialize'](),'colId':_0x1d6e31}}});}}}),_0x4a2f9a!==_0x484ffa||_0x570690!==_0x143658){const _0x5d6d8c={'unitId':_0x55bc80,'subUnitId':_0x22c893,'range':{..._0x18ad2d,'startColumn':_0x484ffa,'endColumn':_0x143658}};_0x3a3156['unshift']({'id':_0x1502d0['id'],'params':_0x5d6d8c}),_0x47e54b[_0x278e20(0x80)]({'id':_0x1502d0['id'],'params':{'range':_0x18ad2d,'unitId':_0x55bc80,'subUnitId':_0x22c893}});}return{'undos':_0x47e54b,'redos':_0x3a3156};}[_0x124e1b(0x119)](_0x975a4b,_0x15a320,_0x344c2c){const _0x46e580=_0x124e1b;var _0x45fb50;const _0x3c1390=this['_sheetsFilterService'][_0x46e580(0xe2)](_0x15a320,_0x344c2c),_0x92dbbc=(_0x45fb50=_0x3c1390==null?void 0x0:_0x3c1390['getRange']())!=null?_0x45fb50:null;if(!_0x3c1390||!_0x92dbbc)return this[_0x46e580(0xd9)]();const {startRow:_0x409a0f,endRow:_0x4b2d48}=_0x92dbbc,{fromRange:_0x225e24,toRange:_0x3a0c79}=_0x975a4b;if(_0x225e24['endRow']<_0x409a0f&&_0x3a0c79[_0x46e580(0x19c)]<=_0x409a0f||_0x225e24[_0x46e580(0x19c)]>_0x4b2d48&&_0x3a0c79[_0x46e580(0x196)]>_0x4b2d48)return this['_handleNull']();const _0x531b44=[],_0x2b018e=[],_0x4bc4c2={};for(let _0x2a0106=_0x409a0f;_0x2a0106<=_0x4b2d48;_0x2a0106++)_0x4bc4c2[_0x2a0106]={'oldIndex':_0x2a0106};const _0x21bdb3=_0x409a0f;let _0x4b9015=_0x4b2d48;_0x4b2d48>=_0x225e24[_0x46e580(0x19c)]&&_0x4b2d48<=_0x225e24[_0x46e580(0x196)]&&_0x3a0c79[_0x46e580(0x19c)]<_0x225e24['startRow']&&_0x225e24[_0x46e580(0x19c)]>_0x409a0f&&(_0x4b9015=_0x225e24[_0x46e580(0x19c)]-0x1),_0x384542[_0x46e580(0x14c)](_0x225e24[_0x46e580(0x19c)],_0x225e24['endRow']-_0x225e24[_0x46e580(0x19c)]+0x1,_0x3a0c79['startRow'],_0x4bc4c2);const _0x194ff5=Object[_0x46e580(0x91)](_0x4bc4c2)[_0x46e580(0xff)](_0x42e234=>Number(_0x42e234)),_0x3d6ca2=_0x194ff5[_0x46e580(0x13b)](_0x3c3bad=>_0x4bc4c2[_0x3c3bad][_0x46e580(0xef)]===_0x4b9015),_0x207b62=_0x194ff5[_0x46e580(0x13b)](_0x5c920f=>_0x4bc4c2[_0x5c920f][_0x46e580(0xef)]===_0x21bdb3);if(_0x409a0f!==_0x207b62||_0x4b2d48!==_0x3d6ca2){const _0x2ec2ef={'unitId':_0x15a320,'subUnitId':_0x344c2c,'range':{..._0x92dbbc,'startRow':_0x207b62,'endRow':_0x3d6ca2}};_0x531b44['push']({'id':_0x1502d0['id'],'params':_0x2ec2ef},{'id':_0x1f121f['id'],'params':{'unitId':_0x15a320,'subUnitId':_0x344c2c}}),_0x2b018e['push']({'id':_0x1502d0['id'],'params':{'range':_0x92dbbc,'unitId':_0x15a320,'subUnitId':_0x344c2c}},{'id':_0x1f121f['id'],'params':{'unitId':_0x15a320,'subUnitId':_0x344c2c}});}return{'redos':_0x531b44,'undos':_0x2b018e};}[_0x124e1b(0x11a)](_0x4c4926,_0x4b9fec,_0xd6680){const _0xa8d6ca=_0x124e1b,{fromRange:_0x423698,toRange:_0x5b011c}=_0x4c4926,_0x4a1a05=this[_0xa8d6ca(0x158)][_0xa8d6ca(0xe2)](_0x4b9fec,_0xd6680);if(!_0x4a1a05)return this[_0xa8d6ca(0xd9)]();const _0x32c4a7=_0x4a1a05[_0xa8d6ca(0x167)]();if(!_0x32c4a7)return this[_0xa8d6ca(0xd9)]();const _0x24d2fa=[],_0x1f2168=[];if(_0x384542['Rectangle'][_0xa8d6ca(0x152)](_0x423698,_0x32c4a7)){const _0x5dece0=_0x32c4a7['startRow']-_0x423698[_0xa8d6ca(0x19c)],_0x4bf9e8=_0x32c4a7[_0xa8d6ca(0xb9)]-_0x423698[_0xa8d6ca(0xb9)],_0x7bb8c0={'startRow':_0x5b011c[_0xa8d6ca(0x19c)]+_0x5dece0,'startColumn':_0x5b011c[_0xa8d6ca(0xb9)]+_0x4bf9e8,'endRow':_0x5b011c['startRow']+_0x5dece0+(_0x32c4a7[_0xa8d6ca(0x196)]-_0x32c4a7['startRow']),'endColumn':_0x5b011c['startColumn']+_0x4bf9e8+(_0x32c4a7[_0xa8d6ca(0x186)]-_0x32c4a7[_0xa8d6ca(0xb9)])},_0x28e5b6={'id':_0x100dac['id'],'params':{'unitId':_0x4b9fec,'subUnitId':_0xd6680}},_0x41a931={'id':_0x1502d0['id'],'params':{'unitId':_0x4b9fec,'subUnitId':_0xd6680,'range':_0x7bb8c0}},_0x4ca007={'id':_0x1502d0['id'],'params':{'unitId':_0x4b9fec,'subUnitId':_0xd6680,'range':_0x32c4a7}};_0x24d2fa[_0xa8d6ca(0x88)](_0x28e5b6,_0x41a931),_0x1f2168[_0xa8d6ca(0x88)](_0x28e5b6,_0x4ca007);const _0x2f5cec=_0x4a1a05[_0xa8d6ca(0xb6)](),_0x22bf70=_0x5b011c[_0xa8d6ca(0xb9)]-_0x423698['startColumn'];_0x2f5cec[_0xa8d6ca(0x15e)](_0x104183=>{const _0x5757d8=_0xa8d6ca,[_0x495dc2,_0x1542de]=_0x104183;_0x1542de&&(_0x24d2fa['push']({'id':_0x4fad8b['id'],'params':{'unitId':_0x4b9fec,'subUnitId':_0xd6680,'col':_0x495dc2+_0x22bf70,'criteria':{..._0x1542de[_0x5757d8(0x9f)](),'colId':_0x495dc2+_0x22bf70}}}),_0x1f2168[_0x5757d8(0x88)]({'id':_0x4fad8b['id'],'params':{'unitId':_0x4b9fec,'subUnitId':_0xd6680,'col':_0x495dc2,'criteria':{..._0x1542de['serialize'](),'colId':_0x495dc2}}}));});}else{if(_0x384542[_0xa8d6ca(0x87)][_0xa8d6ca(0x8a)](_0x5b011c,_0x32c4a7)){const _0x2f2ec2={..._0x32c4a7,'endRow':Math[_0xa8d6ca(0x83)](_0x32c4a7['endRow'],_0x5b011c['endRow'])};_0x24d2fa[_0xa8d6ca(0x88)]({'id':_0x1502d0['id'],'params':{'unitId':_0x4b9fec,'subUnitId':_0xd6680,'range':_0x2f2ec2}}),_0x1f2168[_0xa8d6ca(0x88)]({'id':_0x1502d0['id'],'params':{'unitId':_0x4b9fec,'subUnitId':_0xd6680,'range':_0x32c4a7}});}}return{'redos':_0x24d2fa,'undos':_0x1f2168};}[_0x124e1b(0x12e)](_0x58e491,_0x32429d,_0x100d3b){const _0x43d5a0=_0x124e1b,_0x32ab09=this['_sheetsFilterService']['getFilterModel'](_0x32429d,_0x100d3b);if(!_0x32ab09)return this[_0x43d5a0(0xd9)]();const _0x1effec=_0x32ab09['getRange']();if(!_0x1effec)return this['_handleNull']();const _0x4e2276=[],_0x339d76=[];return _0x32ab09[_0x43d5a0(0xb6)]()[_0x43d5a0(0x15e)](([_0x5040e3,_0x4e4f86])=>{const _0x433a67=_0x43d5a0;_0x339d76[_0x433a67(0x88)]({'id':_0x4fad8b['id'],'params':{'unitId':_0x32429d,'subUnitId':_0x100d3b,'col':_0x5040e3,'criteria':{..._0x4e4f86['serialize'](),'colId':_0x5040e3}}});}),_0x4e2276[_0x43d5a0(0x88)]({'id':_0x100dac['id'],'params':{'unitId':_0x32429d,'subUnitId':_0x100d3b,'range':_0x1effec}}),_0x339d76[_0x43d5a0(0x80)]({'id':_0x1502d0['id'],'params':{'range':_0x1effec,'unitId':_0x32429d,'subUnitId':_0x100d3b}}),{'undos':_0x339d76,'redos':_0x4e2276};}[_0x124e1b(0x133)](_0x127659,_0x5141ea,_0x3f7741){const _0x34644f=_0x124e1b,_0x1dc841=this[_0x34644f(0x158)][_0x34644f(0xe2)](_0x127659,_0x5141ea);if(!_0x1dc841)return this['_handleNull']();const _0x55a770=_0x1dc841[_0x34644f(0x167)]();if(!_0x55a770)return this[_0x34644f(0xd9)]();const _0x5d948b=[],_0x8cbe21=[],_0x1be5e5=[],_0x53c072=[];return _0x1dc841[_0x34644f(0xb6)]()[_0x34644f(0x15e)](([_0x1e561c,_0x51b180])=>{const _0x9950c7=_0x34644f;_0x5d948b[_0x9950c7(0x88)]({'id':_0x4fad8b['id'],'params':{'unitId':_0x127659,'subUnitId':_0x3f7741,'col':_0x1e561c,'criteria':{..._0x51b180[_0x9950c7(0x9f)](),'colId':_0x1e561c}}}),_0x1be5e5[_0x9950c7(0x88)]({'id':_0x4fad8b['id'],'params':{'unitId':_0x127659,'subUnitId':_0x3f7741,'col':_0x1e561c,'criteria':null}});}),_0x1be5e5[_0x34644f(0x88)]({'id':_0x100dac['id'],'params':{'unitId':_0x127659,'subUnitId':_0x3f7741,'range':_0x55a770}}),_0x5d948b[_0x34644f(0x80)]({'id':_0x1502d0['id'],'params':{'range':_0x55a770,'unitId':_0x127659,'subUnitId':_0x3f7741}}),{'undos':_0x8cbe21,'redos':_0x5d948b,'preUndos':_0x1be5e5,'preRedos':_0x53c072};}[_0x124e1b(0xd9)](){return{'redos':[],'undos':[]};}[_0x124e1b(0xec)](){const _0x3b5f0b=_0x124e1b;this[_0x3b5f0b(0x14b)](this[_0x3b5f0b(0x79)]['intercept'](_0x1fa105[_0x3b5f0b(0x117)][_0x3b5f0b(0x12c)],{'handler':_0x52b190((_0x451477,_0x4b31cd)=>{const _0x18d2e5=_0x3b5f0b;var _0x8617d4,_0x38da33;return _0x451477?!0x0:(_0x38da33=(_0x8617d4=this[_0x18d2e5(0x158)][_0x18d2e5(0xe2)](_0x4b31cd['unitId'],_0x4b31cd[_0x18d2e5(0xe6)]))==null?void 0x0:_0x8617d4[_0x18d2e5(0x149)](_0x4b31cd[_0x18d2e5(0xe0)]))!=null?_0x38da33:!0x1;},_0x3b5f0b(0x101))}));}['moveCriteria'](_0x158bcb,_0x3ffd6f,_0x47f4f9,_0x482d62){const _0x38b951=_0x124e1b,_0x17d996={'unitId':_0x158bcb,'subUnitId':_0x3ffd6f,'criteria':null,'col':-0x1},_0x4755d6=[],_0x7d8840=[],_0x482560=[],_0xb6e8f3=[];return _0x47f4f9[_0x38b951(0x15e)](_0x57a2e0=>{const _0x219d46=_0x38b951,[_0x55f284,_0x7f44c7]=_0x57a2e0;_0x7d8840[_0x219d46(0x88)]({'id':_0x4fad8b['id'],'params':{..._0x17d996,'col':_0x55f284}}),_0x4755d6['push']({'id':_0x4fad8b['id'],'params':{..._0x17d996,'col':_0x55f284,'criteria':{..._0x7f44c7['serialize'](),'colId':_0x55f284}}});}),_0x47f4f9[_0x38b951(0x15e)](_0x383ae3=>{const _0x3a0874=_0x38b951,[_0x13509b,_0x2b02d0]=_0x383ae3;_0xb6e8f3[_0x3a0874(0x88)]({'id':_0x4fad8b['id'],'params':{..._0x17d996,'col':_0x13509b+_0x482d62,'criteria':{..._0x2b02d0[_0x3a0874(0x9f)](),'colId':_0x13509b+_0x482d62}}}),_0x482560['push']({'id':_0x4fad8b['id'],'params':{..._0x17d996,'col':_0x13509b+_0x482d62,'criteria':null}});}),{'newRange':{'redos':_0xb6e8f3,'undos':_0x482560},'oldRange':{'redos':_0x7d8840,'undos':_0x4755d6}};}['_commandExecutedListener'](){const _0x152b43=_0x124e1b;this[_0x152b43(0x14b)](this[_0x152b43(0x153)]['onCommandExecuted']((_0x1b8cc8,_0x3259fe)=>{const _0x560cde=_0x152b43;var _0x5755fd,_0x6a62a6;const {unitId:_0x5c2bf8,subUnitId:_0x2b6588}=_0x1b8cc8['params']||{},_0x4e0de7=this[_0x560cde(0x158)][_0x560cde(0xe2)](_0x5c2bf8,_0x2b6588);if(!_0x4e0de7)return;const _0x3dffea=Array[_0x560cde(0xf2)](_0x4e0de7['filteredOutRows'])['sort']((_0x349212,_0x46ef68)=>_0x349212-_0x46ef68),_0x2e72e1=[];let _0x1181eb=!0x1;if(_0x1b8cc8['id']===_0x1fa105[_0x560cde(0xa6)]['id']){const {startRow:_0x5c978f,endRow:_0x540e26}=_0x1b8cc8[_0x560cde(0xab)][_0x560cde(0x15c)],_0x2d452f=_0x3dffea[_0x560cde(0x11e)](_0x52b7fa=>_0x52b7fa>=_0x5c978f&&_0x52b7fa<=_0x540e26);_0x3dffea[_0x560cde(0x15e)](_0x11ebbb=>{const _0x1c8ec1=_0x560cde;if(_0x11ebbb<_0x5c978f)_0x2e72e1[_0x1c8ec1(0x88)](_0x11ebbb);else{if(_0x1181eb=!0x0,_0x11ebbb<=_0x540e26){const _0x5348df=Math[_0x1c8ec1(0x83)](_0x5c978f,_0x2e72e1[_0x1c8ec1(0xfd)]?_0x2e72e1[_0x2e72e1[_0x1c8ec1(0xfd)]-0x1]+0x1:_0x5c978f);_0x2e72e1[_0x1c8ec1(0x88)](_0x5348df);}else _0x2e72e1['push'](_0x11ebbb-(_0x540e26-_0x5c978f+0x1-_0x2d452f[_0x1c8ec1(0xfd)]));}});}if(_0x1b8cc8['id']===_0x1fa105[_0x560cde(0x166)]['id']){const {startRow:_0x2882f1,endRow:_0x4d7a8c}=_0x1b8cc8[_0x560cde(0xab)]['range'];_0x3dffea[_0x560cde(0x15e)](_0x3f9a37=>{const _0x5f115b=_0x560cde;_0x3f9a37>=_0x2882f1?(_0x1181eb=!0x0,_0x2e72e1[_0x5f115b(0x88)](_0x3f9a37+(_0x4d7a8c-_0x2882f1+0x1))):_0x2e72e1[_0x5f115b(0x88)](_0x3f9a37);});}if(_0x1181eb&&(_0x4e0de7[_0x560cde(0x129)]=new Set(_0x2e72e1)),_0x1b8cc8['id']===_0x1fa105[_0x560cde(0x10f)]['id']&&!(_0x3259fe!=null&&_0x3259fe[_0x560cde(0x192)])){const _0x37a5fc=this[_0x560cde(0xc9)](_0x5c2bf8,_0x2b6588);if(_0x37a5fc){const _0x44dd7c=_0x1b8cc8[_0x560cde(0xab)][_0x560cde(0xa7)];if(_0x44dd7c)for(let _0x529886=_0x37a5fc[_0x560cde(0xb9)];_0x529886<=_0x37a5fc[_0x560cde(0x186)];_0x529886++){const _0x389929=(_0x5755fd=_0x44dd7c==null?void 0x0:_0x44dd7c[_0x37a5fc['startRow']])==null?void 0x0:_0x5755fd[_0x529886];if(_0x389929&&this[_0x560cde(0x7c)](_0x389929)){const _0x14e786=(_0x6a62a6=this[_0x560cde(0xea)]['getUnit'](_0x5c2bf8))==null?void 0x0:_0x6a62a6[_0x560cde(0x124)](_0x2b6588);if(_0x14e786){const _0x39483f=_0x1fa105['expandToContinuousRange'](_0x37a5fc,{'down':!0x0},_0x14e786),_0x3ec3a6=this[_0x560cde(0x158)]['getFilterModel'](_0x5c2bf8,_0x2b6588),_0x4d0a5e=_0x3ec3a6['getRange']();_0x3ec3a6['setRange']({..._0x4d0a5e,'endRow':_0x39483f[_0x560cde(0x196)]}),this['_registerRefRange'](_0x5c2bf8,_0x2b6588);}}}}}}));}[_0x124e1b(0xc9)](_0x4ca74d,_0x3de9cd){const _0x200f27=_0x124e1b;var _0x2ab03e;const _0x3dad3a=this[_0x200f27(0x158)][_0x200f27(0xe2)](_0x4ca74d,_0x3de9cd);if(!_0x3dad3a)return null;const _0x2d913a=(_0x2ab03e=this[_0x200f27(0xea)][_0x200f27(0xdd)](_0x4ca74d))==null?void 0x0:_0x2ab03e[_0x200f27(0x124)](_0x3de9cd);if(!_0x2d913a)return null;const _0x59f225=_0x3dad3a[_0x200f27(0x167)]();if(!_0x59f225)return null;const _0x436aa0=_0x2d913a[_0x200f27(0x19d)]()-0x1,_0x27d6d9=_0x2d913a[_0x200f27(0xbc)]();for(let _0x77c250=_0x59f225[_0x200f27(0x196)]+0x1;_0x77c250<=_0x436aa0;_0x77c250++)if(_0x27d6d9[_0x200f27(0xdc)](_0x77c250))return{'startRow':_0x77c250,'endRow':_0x77c250,'startColumn':_0x59f225[_0x200f27(0xb9)],'endColumn':_0x59f225[_0x200f27(0x186)]};return null;}['_initErrorHandling'](){const _0x11a307=_0x124e1b;this[_0x11a307(0x14b)](this[_0x11a307(0x153)]['beforeCommandExecuted'](_0x1c42d8=>{const _0x32a8ea=_0x11a307,_0x174687=_0x1c42d8[_0x32a8ea(0xab)],_0x18bf54=_0x1fa105['getSheetCommandTarget'](this['_univerInstanceService']);if(!_0x18bf54)return;const {subUnitId:_0x37dad7,unitId:_0x47fe83}=_0x18bf54,_0x14ae1e=this[_0x32a8ea(0x158)]['getFilterModel'](_0x47fe83,_0x37dad7);if(!_0x14ae1e)return;const _0x1f61b1=_0x14ae1e['getRange']();if(_0x1c42d8['id']===_0x1fa105[_0x32a8ea(0x145)]['id']&&_0x174687[_0x32a8ea(0xc1)][_0x32a8ea(0x19c)]<=_0x1f61b1['startRow']&&_0x174687[_0x32a8ea(0xc1)]['endRow']<_0x1f61b1[_0x32a8ea(0x196)]&&_0x174687[_0x32a8ea(0xc1)]['endRow']>=_0x1f61b1[_0x32a8ea(0x19c)])throw this[_0x32a8ea(0x158)][_0x32a8ea(0x10c)](_0x32a8ea(0xae)),new Error('[SheetsFilterController]:\x20Cannot\x20move\x20header\x20row\x20of\x20filter');}));}[_0x124e1b(0x7c)](_0x3214fa){const _0x55df88=_0x124e1b,_0x27e14c=Object['values'](_0x3214fa);return!(_0x27e14c[_0x55df88(0xfd)]===0x0||_0x27e14c[_0x55df88(0x9d)](_0xd982b8=>_0xd982b8==null));}},_0x52b190(_0x44a502,_0x124e1b(0x93)),_0x44a502);_0x41866b=_0xafa7ba([_0x3b9a9f(0x0,_0x384542[_0x124e1b(0xb7)]),_0x3b9a9f(0x1,_0x384542[_0x124e1b(0xf6)](_0x1fa105['SheetInterceptorService'])),_0x3b9a9f(0x2,_0x384542[_0x124e1b(0xf6)](_0x58ae90[_0x124e1b(0x6e)])),_0x3b9a9f(0x3,_0x384542[_0x124e1b(0x190)]),_0x3b9a9f(0x4,_0x384542[_0x124e1b(0xf6)](_0x1fa105[_0x124e1b(0x157)]))],_0x41866b);const _0x3434a3=_0x124e1b(0xd5),_0x463b33={};var _0x411a61=Object[_0x124e1b(0x7f)],_0x368403=Object[_0x124e1b(0x184)],_0x540eb1=_0x52b190((_0xce476d,_0x5d9e9b,_0x520c7b,_0x239228)=>{const _0x3d8c35=_0x124e1b;for(var _0x14fec2=_0x239228>0x1?void 0x0:_0x239228?_0x368403(_0x5d9e9b,_0x520c7b):_0x5d9e9b,_0x13d897=_0xce476d[_0x3d8c35(0xfd)]-0x1,_0x5e526c;_0x13d897>=0x0;_0x13d897--)(_0x5e526c=_0xce476d[_0x13d897])&&(_0x14fec2=(_0x239228?_0x5e526c(_0x5d9e9b,_0x520c7b,_0x14fec2):_0x5e526c(_0x14fec2))||_0x14fec2);return _0x239228&&_0x14fec2&&_0x411a61(_0x5d9e9b,_0x520c7b,_0x14fec2),_0x14fec2;},'__decorateClass'),_0x51fa5e=_0x52b190((_0x5f2b3e,_0x4efceb)=>(_0x26c3e5,_0x134257)=>_0x4efceb(_0x26c3e5,_0x134257,_0x5f2b3e),_0x124e1b(0x131));_0x58ae90[_0x124e1b(0x185)]=(_0x13298d=class extends _0x384542[_0x124e1b(0x70)]{constructor(_0x4b46bd=_0x463b33,_0x2fc82c,_0x281196){const _0xc8426=_0x124e1b;super(),this[_0xc8426(0xe5)]=_0x4b46bd,this[_0xc8426(0x89)]=_0x2fc82c,this['_configService']=_0x281196;const {..._0x55aa80}=this[_0xc8426(0xe5)];this[_0xc8426(0x13c)][_0xc8426(0x13e)](_0x3434a3,_0x55aa80);}[_0x124e1b(0x120)](){const _0x5c86a0=_0x124e1b;[[_0x58ae90[_0x5c86a0(0x6e)]],[_0x41866b]][_0x5c86a0(0x15e)](_0x48ee40=>this[_0x5c86a0(0x89)][_0x5c86a0(0x15a)](_0x48ee40));}['onReady'](){const _0x1a5bd1=_0x124e1b;this[_0x1a5bd1(0x89)][_0x1a5bd1(0xf9)](_0x41866b);}},_0x52b190(_0x13298d,_0x124e1b(0x185)),_0x4bbf1d(_0x13298d,_0x124e1b(0xc2),_0x384542[_0x124e1b(0x199)][_0x124e1b(0x18e)]),_0x4bbf1d(_0x13298d,_0x124e1b(0xb4),_0x368871),_0x13298d),_0x58ae90[_0x124e1b(0x185)]=_0x540eb1([_0x51fa5e(0x1,_0x384542[_0x124e1b(0xf6)](_0x384542['Injector'])),_0x51fa5e(0x2,_0x384542['IConfigService'])],_0x58ae90['UniverSheetsFilterPlugin']),_0x58ae90[_0x124e1b(0x73)]=_0x3adef4,_0x58ae90[_0x124e1b(0x9b)]=_0x4e7eaa,_0x58ae90['FilterColumn']=_0x5ced87,_0x58ae90[_0x124e1b(0xf7)]=_0xfcd57b,_0x58ae90[_0x124e1b(0x113)]=_0x1f121f,_0x58ae90['RemoveSheetsFilterMutation']=_0x100dac,_0x58ae90[_0x124e1b(0xd7)]=_0x368871,_0x58ae90[_0x124e1b(0x109)]=_0x4fad8b,_0x58ae90[_0x124e1b(0x141)]=_0x1502d0,_0x58ae90[_0x124e1b(0xb1)]=_0x2bfd62,_0x58ae90['getCustomFilterFn']=_0x18b787,_0x58ae90[_0x124e1b(0xb5)]=_0x1f6c5c,_0x58ae90[_0x124e1b(0x14a)]=_0x5d92f6,_0x58ae90[_0x124e1b(0xde)]=_0x4239b4,_0x58ae90[_0x124e1b(0x15f)]=_0x59493b,_0x58ae90[_0x124e1b(0x84)]=_0x15800b,Object[_0x124e1b(0x7f)](_0x58ae90,Symbol[_0x124e1b(0xbd)],{'value':_0x124e1b(0x1a0)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs/sheets-filter",
|
|
3
|
-
"version": "0.3.0-
|
|
3
|
+
"version": "0.3.0-nightly.202410101606",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A library for filtering data in Univer Sheet",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,19 +45,19 @@
|
|
|
45
45
|
],
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"rxjs": ">=7.0.0",
|
|
48
|
-
"@univerjs/core": "0.3.0-
|
|
49
|
-
"@univerjs/sheets": "0.3.0-
|
|
48
|
+
"@univerjs/core": "0.3.0-nightly.202410101606",
|
|
49
|
+
"@univerjs/sheets": "0.3.0-nightly.202410101606"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@univerjs/core": "0.3.0-
|
|
53
|
-
"@univerjs/sheets": "0.3.0-
|
|
52
|
+
"@univerjs/core": "0.3.0-nightly.202410101606",
|
|
53
|
+
"@univerjs/sheets": "0.3.0-nightly.202410101606"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"rxjs": "^7.8.1",
|
|
57
57
|
"typescript": "^5.6.2",
|
|
58
58
|
"vite": "^5.4.8",
|
|
59
59
|
"vitest": "^2.1.1",
|
|
60
|
-
"@univerjs-infra/shared": "0.3.0
|
|
60
|
+
"@univerjs-infra/shared": "0.3.0"
|
|
61
61
|
},
|
|
62
62
|
"univerSpace": {
|
|
63
63
|
".": {
|
|
@@ -77,7 +77,6 @@
|
|
|
77
77
|
"test:watch": "vitest",
|
|
78
78
|
"coverage": "vitest run --coverage",
|
|
79
79
|
"lint:types": "tsc --noEmit",
|
|
80
|
-
"build": "tsc && vite build"
|
|
81
|
-
"sync:cnpm": "cnpm sync"
|
|
80
|
+
"build": "tsc && vite build"
|
|
82
81
|
}
|
|
83
82
|
}
|
package/LICENSE
DELETED
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
-
|
|
12
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
-
the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
-
other entities that control, are controlled by, or are under common
|
|
17
|
-
control with that entity. For the purposes of this definition,
|
|
18
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
-
direction or management of such entity, whether by contract or
|
|
20
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
-
Object form, made available under the License, as indicated by a
|
|
37
|
-
copyright notice that is included in or attached to the work
|
|
38
|
-
(an example is provided in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
-
of this License, Derivative Works shall not include works that remain
|
|
45
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
-
the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean any work of authorship, including
|
|
49
|
-
the original version of the Work and any modifications or additions
|
|
50
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
-
means any form of electronic, verbal, or written communication sent
|
|
55
|
-
to the Licensor or its representatives, including but not limited to
|
|
56
|
-
communication on electronic mailing lists, source code control systems,
|
|
57
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
-
excluding communication that is conspicuously marked or otherwise
|
|
60
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
-
|
|
62
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
-
subsequently incorporated within the Work.
|
|
65
|
-
|
|
66
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
-
Work and such Derivative Works in Source or Object form.
|
|
72
|
-
|
|
73
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or
|
|
95
|
-
Derivative Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for reasonable and customary use in describing the
|
|
141
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
-
or other liability obligations and/or rights consistent with this
|
|
169
|
-
License. However, in accepting such obligations, You may act only
|
|
170
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
-
defend, and hold each Contributor harmless for any liability
|
|
173
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
-
of your accepting any such warranty or additional liability.
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|