@univerjs/find-replace 0.3.0-alpha.0 → 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.
@@ -1,5 +1,5 @@
1
- import { IConfigService, Plugin, Injector } from '@univerjs/core';
2
1
  import { IUniverFindReplaceConfig } from './controllers/config.schema';
2
+ import { IConfigService, Plugin, Injector } from '@univerjs/core';
3
3
  export declare class UniverFindReplacePlugin extends Plugin {
4
4
  private readonly _config;
5
5
  readonly _injector: Injector;
@@ -7,4 +7,5 @@ export declare class UniverFindReplacePlugin extends Plugin {
7
7
  static pluginName: string;
8
8
  constructor(_config: Partial<IUniverFindReplaceConfig> | undefined, _injector: Injector, _configService: IConfigService);
9
9
  onStarting(): void;
10
+ onRendered(): void;
10
11
  }
package/lib/umd/index.js CHANGED
@@ -1,9 +1 @@
1
- (function(global,factory){typeof exports=="object"&&typeof module<"u"?factory(exports,require("@univerjs/core"),require("@univerjs/ui"),require("rxjs"),require("@univerjs/engine-render"),require("react"),require("@univerjs/design")):typeof define=="function"&&define.amd?define(["exports","@univerjs/core","@univerjs/ui","rxjs","@univerjs/engine-render","react","@univerjs/design"],factory):(global=typeof globalThis<"u"?globalThis:global||self,factory(global.UniverFindReplace={},global.UniverCore,global.UniverUi,global.rxjs,global.UniverEngineRender,global.React,global.UniverDesign))})(this,function(exports2,core,ui,rxjs,engineRender,require$$0,design){"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,_d;var __assign=function(){return __assign=Object.assign||function(t){for(var s,i=1,n2=arguments.length;i<n2;i++){s=arguments[i];for(var p2 in s)Object.prototype.hasOwnProperty.call(s,p2)&&(t[p2]=s[p2])}return t},__assign.apply(this,arguments)},__rest=function(s,e){var t={};for(var p2 in s)Object.prototype.hasOwnProperty.call(s,p2)&&e.indexOf(p2)<0&&(t[p2]=s[p2]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p2=Object.getOwnPropertySymbols(s);i<p2.length;i++)e.indexOf(p2[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p2[i])&&(t[p2[i]]=s[p2[i]]);return t},IconBase=require$$0.forwardRef(function(props,ref){var icon=props.icon,id=props.id,className=props.className,extend=props.extend,restProps=__rest(props,["icon","id","className","extend"]),cls="univerjs-icon univerjs-icon-".concat(id," ").concat(className||"").trim(),idSuffix=require$$0.useRef("_".concat(generateShortUuid()));return render(icon,"".concat(id),{defIds:icon.defIds,idSuffix:idSuffix.current},__assign({ref,className:cls},restProps),extend)});function render(node,id,runtimeProps,rootProps,extend){return require$$0.createElement(node.tag,__assign(__assign({key:id},replaceRuntimeIdsAndExtInAttrs(node,runtimeProps,extend)),rootProps),(replaceRuntimeIdsInDefs(node,runtimeProps).children||[]).map(function(child,index){return render(child,"".concat(id,"-").concat(node.tag,"-").concat(index),runtimeProps,void 0,extend)}))}__name(render,"render");function replaceRuntimeIdsAndExtInAttrs(node,runtimeProps,extend){var attrs=__assign({},node.attrs);extend!=null&&extend.colorChannel1&&attrs.fill==="colorChannel1"&&(attrs.fill=extend.colorChannel1);var defIds=runtimeProps.defIds;return!defIds||defIds.length===0||(node.tag==="use"&&attrs["xlink:href"]&&(attrs["xlink:href"]=attrs["xlink:href"]+runtimeProps.idSuffix),Object.entries(attrs).forEach(function(_a2){var key=_a2[0],value=_a2[1];typeof value=="string"&&(attrs[key]=value.replace(/url\(#(.*)\)/,"url(#$1".concat(runtimeProps.idSuffix,")")))})),attrs}__name(replaceRuntimeIdsAndExtInAttrs,"replaceRuntimeIdsAndExtInAttrs");function replaceRuntimeIdsInDefs(node,runtimeProps){var _a2,defIds=runtimeProps.defIds;return!defIds||defIds.length===0?node:node.tag==="defs"&&(!((_a2=node.children)===null||_a2===void 0)&&_a2.length)?__assign(__assign({},node),{children:node.children.map(function(child){return typeof child.attrs.id=="string"&&defIds&&defIds.indexOf(child.attrs.id)>-1?__assign(__assign({},child),{attrs:__assign(__assign({},child.attrs),{id:child.attrs.id+runtimeProps.idSuffix})}):child})}):node}__name(replaceRuntimeIdsInDefs,"replaceRuntimeIdsInDefs");function generateShortUuid(){return Math.random().toString(36).substring(2,8)}__name(generateShortUuid,"generateShortUuid"),IconBase.displayName="UniverIcon";var element={tag:"svg",attrs:{fill:"none",viewBox:"0 0 17 17",width:"1em",height:"1em"},children:[{tag:"mask",attrs:{id:"mask0_217_40",style:{maskType:"alpha"},width:17,height:17,x:0,y:0,maskUnits:"userSpaceOnUse"},children:[{tag:"path",attrs:{fill:"#D9D9D9",d:"M0.9 0.09H16.9V16.09H0.9z"}}]},{tag:"g",attrs:{mask:"url(#mask0_217_40)"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2.39551 7.37266C2.39551 4.18105 4.98281 1.59375 8.17441 1.59375C11.366 1.59375 13.9533 4.18105 13.9533 7.37266C13.9533 8.72342 13.4898 9.96603 12.7133 10.95L15.1964 13.4331C15.4619 13.6986 15.4619 14.1291 15.1964 14.3946C14.9309 14.6601 14.5004 14.6601 14.2349 14.3946L11.7518 11.9115C10.7678 12.6881 9.52525 13.1516 8.17441 13.1516C4.98281 13.1516 2.39551 10.5642 2.39551 7.37266ZM8.17441 2.95349C5.73378 2.95349 3.75525 4.93202 3.75525 7.37266C3.75525 9.81333 5.73378 11.7918 8.17441 11.7918C10.6151 11.7918 12.5936 9.81333 12.5936 7.37266C12.5936 4.93202 10.6151 2.95349 8.17441 2.95349Z",fillRule:"evenodd",clipRule:"evenodd"}}]}]},SearchSingle16=require$$0.forwardRef(function(props,ref){return require$$0.createElement(IconBase,Object.assign({},props,{id:"search-single-16",ref,icon:element}))});SearchSingle16.displayName="SearchSingle16";const FIND_REPLACE_INPUT_FOCUS="FIND_REPLACE_INPUT_FOCUS",FIND_REPLACE_DIALOG_FOCUS="FIND_REPLACE_DIALOG_FOCUS",FIND_REPLACE_REPLACE_REVEALED="FIND_REPLACE_REPLACE_REVEALED";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 _FindModel=class _FindModel extends core.Disposable{};__name(_FindModel,"FindModel");let FindModel=_FindModel;const IFindReplaceService=core.createIdentifier("find-replace.service");function shouldStateUpdateTriggerResearch(statusUpdate){return typeof statusUpdate.findString<"u"||typeof statusUpdate.inputtingFindString<"u"||typeof statusUpdate.findDirection<"u"||typeof statusUpdate.matchesTheWholeCell<"u"||typeof statusUpdate.caseSensitive<"u"||typeof statusUpdate.findScope<"u"||typeof statusUpdate.findBy<"u"}__name(shouldStateUpdateTriggerResearch,"shouldStateUpdateTriggerResearch");let FindReplaceModel=(_a=class extends core.Disposable{constructor(_state,_providers,_univerInstanceService){super();__publicField(this,"currentMatch$",new rxjs.BehaviorSubject(null));__publicField(this,"replaceables$",new rxjs.BehaviorSubject([]));__publicField(this,"_findModels",[]);__publicField(this,"_matchingModel",null);__publicField(this,"_matches",[]);__publicField(this,"_currentSearchingDisposables",null);this._state=_state,this._providers=_providers,this._univerInstanceService=_univerInstanceService,this.disposeWithMe(this._state.stateUpdates$.pipe(rxjs.throttleTime(200,void 0,{leading:!0,trailing:!0})).subscribe(async stateUpdate=>{const state=this._state.state;shouldStateUpdateTriggerResearch(stateUpdate)&&(state.findString!==""&&!state.replaceRevealed?(await this._startSearching(),this._state.changeState({findCompleted:!0})):stateUpdate.replaceRevealed!==!0&&this._stopSearching())}))}get searched(){return this._findModels.length>0}dispose(){super.dispose(),this._stopSearching(),this.currentMatch$.complete(),this.replaceables$.complete(),this._state.changeState({...createInitFindReplaceState(),revealed:!1})}async start(){if(!this._state.findString)return{results:[]};const complete=await this._startSearching();return this._state.changeState({findCompleted:!0}),complete}async _startSearching(){if(!this._state.findString)return{results:[]};const providers=Array.from(this._providers),findModels=this._findModels=(await Promise.all(providers.map(provider=>provider.find({findString:this._state.findString,findDirection:this._state.findDirection,findScope:this._state.findScope,findBy:this._state.findBy,replaceRevealed:this._state.replaceRevealed,caseSensitive:this._state.caseSensitive,matchesTheWholeCell:this._state.matchesTheWholeCell})))).flat();this._subscribeToModelsChanges(findModels);const newMatches=this._matches=findModels.map(c=>c.getMatches()).flat();return this.replaceables$.next(newMatches.filter(m2=>m2.replaceable)),newMatches.length?(this._moveToInitialMatch(findModels),this._state.changeState({matchesCount:newMatches.length}),{results:newMatches}):(this._state.changeState({matchesCount:0,matchesPosition:0}),{results:[]})}_stopSearching(){var _a2;this._providers.forEach(provider=>provider.terminate()),this._findModels=[],this._matches=[],this._matchingModel=null,(_a2=this._currentSearchingDisposables)==null||_a2.dispose(),this._currentSearchingDisposables=null,this.currentMatch$.next(null),this.replaceables$.next([]),this._state.changeState({findCompleted:!1,matchesCount:0,matchesPosition:0})}_subscribeToModelsChanges(models){const disposables=this._currentSearchingDisposables=new core.DisposableCollection,matchesUpdateSubscription=rxjs.combineLatest(models.map(model=>model.matchesUpdate$)).pipe(rxjs.debounceTime(220)).subscribe(([...allMatches])=>{const newMatches=this._matches=allMatches.flat();newMatches.length?(this._moveToInitialMatch(this._findModels,!0),this._state.changeState({matchesCount:newMatches.length}),this.replaceables$.next(newMatches.filter(m2=>m2.replaceable))):(this._state.changeState({matchesCount:0,matchesPosition:0}),this.replaceables$.next([]))});models.forEach(model=>disposables.add(core.toDisposable(model.activelyChangingMatch$.subscribe(match=>{const index=this._matches.findIndex(m2=>m2===match);this._state.changeState({matchesPosition:index+1})})))),disposables.add(core.toDisposable(matchesUpdateSubscription))}async replace(){return this._matchingModel?this._matchingModel.replace(this._state.replaceString):!1}async replaceAll(){const result=await Promise.all(this._findModels.map(m2=>m2.replaceAll(this._state.replaceString))).then(results=>results.reduce((acc,cur)=>(acc.success+=cur.success,acc.failure+=cur.failure,acc),{success:0,failure:0}));return result.failure===0&&this._stopSearching(),result}getCurrentMatch(){return this._state.matchesPosition>0?this._matches[this._state.matchesPosition-1]:null}_markMatch(match){const index=this._matches.findIndex(value=>value===match);this.currentMatch$.next(match),this._state.changeState({matchesPosition:index+1})}moveToNextMatch(){if(!this._matchingModel)return;const loopInCurrentUnit=this._findModels.length===1,nextMatch=this._matchingModel.moveToNextMatch({loop:loopInCurrentUnit});if(nextMatch)this._markMatch(nextMatch);else{const currentModelIndex=this._findModels.findIndex(m2=>m2===this._matchingModel);this._moveToNextUnitMatch(currentModelIndex)}}_moveToNextUnitMatch(startingIndex){const l2=this._findModels.length;for(let i=(startingIndex+1)%l2;i!==startingIndex;){const nextPositionModel=this._findModels[i],nextMatch=nextPositionModel.moveToNextMatch({ignoreSelection:!0});if(nextMatch){this._matchingModel=nextPositionModel,this._markMatch(nextMatch);return}i=(i+1)%l2}if(this._matchingModel){const nextMatch=this._matchingModel.moveToNextMatch({ignoreSelection:!0});nextMatch&&this._markMatch(nextMatch)}}moveToPreviousMatch(){if(!this._matchingModel)return;const loopInCurrentUnit=this._findModels.length===1,nextMatch=this._matchingModel.moveToPreviousMatch({loop:loopInCurrentUnit});if(nextMatch){const index=this._matches.findIndex(value=>value===nextMatch);this.currentMatch$.next(nextMatch),this._state.changeState({matchesPosition:index+1})}else{const l2=this._findModels.length,currentModelIndex=this._findModels.findIndex(m2=>m2===this._matchingModel);for(let i=(currentModelIndex-1+l2)%l2;i!==currentModelIndex;){const nextPositionModel=this._findModels[i],nextMatch3=nextPositionModel.moveToPreviousMatch({ignoreSelection:!0});if(nextMatch3){this._matchingModel=nextPositionModel,this._markMatch(nextMatch3);return}i=(i-1)%l2}const nextMatch2=this._matchingModel.moveToPreviousMatch({ignoreSelection:!0});nextMatch2&&this._markMatch(nextMatch2)}}_moveToInitialMatch(findModels,noFocus=!1){var _a2;const focusedUnitId=(_a2=this._univerInstanceService.getFocusedUnit())==null?void 0:_a2.getUnitId();if(!focusedUnitId)return-1;const i=findModels.findIndex(model=>model.unitId===focusedUnitId);if(i!==-1){this._matchingModel=findModels[i];const nextMatch=this._matchingModel.moveToNextMatch({stayIfOnMatch:!0,noFocus});if(nextMatch)return this._markMatch(nextMatch),i}return this._moveToNextUnitMatch(i),0}},__name(_a,"FindReplaceModel"),_a);FindReplaceModel=__decorateClass$2([__decorateParam$2(2,core.IUniverInstanceService)],FindReplaceModel);var FindDirection=(FindDirection2=>(FindDirection2.ROW="row",FindDirection2.COLUMN="column",FindDirection2))(FindDirection||{}),FindBy=(FindBy2=>(FindBy2.VALUE="value",FindBy2.FORMULA="formula",FindBy2))(FindBy||{}),FindScope=(FindScope2=>(FindScope2.SUBUNIT="subunit",FindScope2.UNIT="unit",FindScope2))(FindScope||{});function createInitFindReplaceState(){return{caseSensitive:!1,findBy:"value",findCompleted:!1,findDirection:"row",findScope:"subunit",findString:"",inputtingFindString:"",matchesCount:0,matchesPosition:0,matchesTheWholeCell:!1,replaceRevealed:!1,replaceString:"",revealed:!0}}__name(createInitFindReplaceState,"createInitFindReplaceState");const _FindReplaceState=class _FindReplaceState{constructor(){__publicField(this,"_stateUpdates$",new rxjs.Subject);__publicField(this,"stateUpdates$",this._stateUpdates$.asObservable());__publicField(this,"_state$",new rxjs.BehaviorSubject(createInitFindReplaceState()));__publicField(this,"state$",this._state$.asObservable());__publicField(this,"_findString","");__publicField(this,"_inputtingFindString","");__publicField(this,"_replaceString","");__publicField(this,"_revealed",!1);__publicField(this,"_replaceRevealed",!1);__publicField(this,"_matchesPosition",0);__publicField(this,"_matchesCount",0);__publicField(this,"_caseSensitive",!0);__publicField(this,"_matchesTheWholeCell",!1);__publicField(this,"_findDirection","row");__publicField(this,"_findScope","subunit");__publicField(this,"_findBy","value");__publicField(this,"_findCompleted",!1)}get state(){return this._state$.getValue()}get inputtingFindString(){return this._inputtingFindString}get findString(){return this._findString}get revealed(){return this._revealed}get replaceRevealed(){return this._replaceRevealed}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get replaceString(){return this._replaceString}get caseSensitive(){return this._caseSensitive}get matchesTheWholeCell(){return this._matchesTheWholeCell}get findDirection(){return this._findDirection}get findScope(){return this._findScope}get findBy(){return this._findBy}get findCompleted(){return this._findCompleted}changeState(changes){let changed=!1;const changedState={};typeof changes.findString<"u"&&changes.findString!==this._findString&&(this._findString=changes.findString,changedState.findString=this._findString,changed=!0),typeof changes.revealed<"u"&&changes.revealed!==this._revealed&&(this._revealed=changes.revealed,changedState.revealed=changes.revealed,changed=!0),typeof changes.replaceRevealed<"u"&&changes.replaceRevealed!==this._replaceRevealed&&(this._replaceRevealed=changes.replaceRevealed,changedState.replaceRevealed=changes.replaceRevealed,changed=!0),typeof changes.replaceString<"u"&&changes.replaceString!==this._replaceString&&(this._replaceString=changes.replaceString,changedState.replaceString=changes.replaceString,changed=!0),typeof changes.matchesCount<"u"&&changes.matchesCount!==this._matchesCount&&(this._matchesCount=changes.matchesCount,changedState.matchesCount=changes.matchesCount,changed=!0),typeof changes.matchesPosition<"u"&&changes.matchesPosition!==this._matchesPosition&&(this._matchesPosition=changes.matchesPosition,changedState.matchesPosition=changes.matchesPosition,changed=!0),typeof changes.findBy<"u"&&changes.findBy!==this._findBy&&(this._findBy=changes.findBy,changedState.findBy=changes.findBy,changed=!0),typeof changes.findScope<"u"&&changes.findScope!==this._findScope&&(this._findScope=changes.findScope,changedState.findScope=changes.findScope,changed=!0),typeof changes.findDirection<"u"&&changes.findDirection!==this._findDirection&&(this._findDirection=changes.findDirection,changedState.findDirection=changes.findDirection,changed=!0),typeof changes.caseSensitive<"u"&&changes.caseSensitive!==this._caseSensitive&&(this._caseSensitive=changes.caseSensitive,changedState.caseSensitive=changes.caseSensitive,changed=!0),typeof changes.matchesTheWholeCell<"u"&&changes.matchesTheWholeCell!==this._matchesTheWholeCell&&(this._matchesTheWholeCell=changes.matchesTheWholeCell,changedState.matchesTheWholeCell=changes.matchesTheWholeCell,changed=!0),typeof changes.inputtingFindString<"u"&&changes.inputtingFindString!==this._inputtingFindString&&(this._inputtingFindString=changes.inputtingFindString,changedState.inputtingFindString=changes.inputtingFindString,changed=!0),typeof changes.findCompleted<"u"&&changes.findCompleted!==this._findCompleted&&(this._findCompleted=changes.findCompleted,changedState.findCompleted=changes.findCompleted,changed=!0),changed&&(this._state$.next({caseSensitive:this._caseSensitive,findBy:this._findBy,findCompleted:this._findCompleted,findDirection:this._findDirection,findScope:this._findScope,findString:this._findString,inputtingFindString:this._inputtingFindString,matchesCount:this._matchesCount,matchesPosition:this._matchesPosition,matchesTheWholeCell:this._matchesTheWholeCell,replaceRevealed:this._replaceRevealed,revealed:this._revealed}),this._stateUpdates$.next(changedState))}};__name(_FindReplaceState,"FindReplaceState");let FindReplaceState=_FindReplaceState,FindReplaceService=(_b=class extends core.Disposable{constructor(_injector,_contextService){super();__publicField(this,"_providers",new Set);__publicField(this,"_state",new FindReplaceState);__publicField(this,"_model");__publicField(this,"_currentMatch$",new rxjs.BehaviorSubject(null));__publicField(this,"currentMatch$",this._currentMatch$.asObservable());__publicField(this,"_replaceables$",new rxjs.BehaviorSubject([]));__publicField(this,"replaceables$",this._replaceables$.asObservable());__publicField(this,"_focusSignal$",new rxjs.Subject);__publicField(this,"focusSignal$",this._focusSignal$.asObservable());this._injector=_injector,this._contextService=_contextService}get stateUpdates$(){return this._state.stateUpdates$}get state$(){return this._state.state$}get revealed(){return this._state.revealed}get replaceRevealed(){return this._state.replaceRevealed}dispose(){super.dispose(),this._currentMatch$.next(null),this._currentMatch$.complete(),this._replaceables$.next([]),this._replaceables$.complete(),this._focusSignal$.complete()}getCurrentMatch(){var _a2;return(_a2=this._model)==null?void 0:_a2.getCurrentMatch()}getFindString(){return this._state.findString}changeFindString(findString){this._state.changeState({findString})}focusFindInput(){this._focusSignal$.next()}changeInputtingFindString(value){value?this._state.changeState({inputtingFindString:value}):this._state.changeState({inputtingFindString:"",findString:""})}changeReplaceString(replaceString){this._state.changeState({replaceString})}changeMatchesTheWholeCell(matchesTheWholeCell){this._state.changeState({matchesTheWholeCell})}changeCaseSensitive(caseSensitive){this._state.changeState({caseSensitive})}changeFindBy(findBy){this._state.changeState({findBy}),this._toggleDisplayRawFormula(findBy==="formula")}changeFindScope(scope){this._state.changeState({findScope:scope})}changeFindDirection(direction){this._state.changeState({findDirection:direction})}moveToNextMatch(){this._model&&(this._state.replaceRevealed&&!this._model.searched?(this._state.changeState({findString:this._state.inputtingFindString}),this._model.start()):this._model.moveToNextMatch(),this._focusSignal$.next())}moveToPreviousMatch(){this._model&&(this._state.replaceRevealed&&!this._model.searched?(this._state.changeState({findString:this._state.inputtingFindString}),this._model.start()):this._model.moveToPreviousMatch(),this._focusSignal$.next())}async replace(){return this._model?this._model.replace():!1}async replaceAll(){if(!this._model)throw new Error("[FindReplaceService] replaceAll: model is not initialized!");return this._model.replaceAll()}revealReplace(){this._state.changeState({replaceRevealed:!0,inputtingFindString:this._state.findString}),this._toggleRevealReplace(!0)}start(revealReplace=!1){if(this._providers.size===0)return!1;this._model=this._injector.createInstance(FindReplaceModel,this._state,this._providers),this._model.currentMatch$.subscribe(match=>this._currentMatch$.next(match)),this._model.replaceables$.subscribe(replaceables=>this._replaceables$.next(replaceables));const newState=createInitFindReplaceState();return revealReplace&&(newState.replaceRevealed=!0),this._state.changeState(newState),this._toggleRevealReplace(revealReplace),!0}find(){var _a2;(_a2=this._model)==null||_a2.start()}terminate(){var _a2;(_a2=this._model)==null||_a2.dispose(),this._model=null,this._toggleDisplayRawFormula(!1),this._toggleRevealReplace(!1)}registerFindReplaceProvider(provider){return this._providers.add(provider),core.toDisposable(()=>this._providers.delete(provider))}_toggleRevealReplace(revealReplace){this._contextService.setContextValue(FIND_REPLACE_REPLACE_REVEALED,revealReplace)}_toggleDisplayRawFormula(force){this._contextService.setContextValue(engineRender.RENDER_RAW_FORMULA_KEY,force)}},__name(_b,"FindReplaceService"),_b);FindReplaceService=__decorateClass$2([__decorateParam$2(0,core.Inject(core.Injector)),__decorateParam$2(1,core.IContextService)],FindReplaceService);const OpenFindDialogOperation={id:"ui.operation.open-find-dialog",type:core.CommandType.OPERATION,handler:__name(accessor=>{const findReplaceService=accessor.get(IFindReplaceService);return findReplaceService.revealed?findReplaceService.focusFindInput():findReplaceService.start(),!0},"handler")},OpenReplaceDialogOperation={id:"ui.operation.open-replace-dialog",type:core.CommandType.OPERATION,handler:__name(accessor=>{const findReplaceService=accessor.get(IFindReplaceService);return findReplaceService.revealed?findReplaceService.replaceRevealed?findReplaceService.focusFindInput():findReplaceService.revealReplace():findReplaceService.start(!0),!0},"handler")},GoToNextMatchOperation={type:core.CommandType.OPERATION,id:"ui.operation.go-to-next-match",handler:__name(accessor=>(accessor.get(IFindReplaceService).moveToNextMatch(),!0),"handler")},GoToPreviousMatchOperation={type:core.CommandType.OPERATION,id:"ui.operation.go-to-previous-match",handler:__name(accessor=>(accessor.get(IFindReplaceService).moveToPreviousMatch(),!0),"handler")};var jsxRuntime={exports:{}},reactJsxRuntime_production_min={};/**
2
- * @license React
3
- * react-jsx-runtime.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var f=require$$0,k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function q(c,a,g){var b,d={},e=null,h=null;g!==void 0&&(e=""+g),a.key!==void 0&&(e=""+a.key),a.ref!==void 0&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)d[b]===void 0&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}__name(q,"q"),reactJsxRuntime_production_min.Fragment=l,reactJsxRuntime_production_min.jsx=q,reactJsxRuntime_production_min.jsxs=q,jsxRuntime.exports=reactJsxRuntime_production_min;var jsxRuntimeExports=jsxRuntime.exports;const ReplaceCurrentMatchCommand={id:"ui.command.replace-current-match",type:core.CommandType.COMMAND,handler:__name(accessor=>accessor.get(IFindReplaceService).replace(),"handler")},CONFIRM_REPLACE_ALL_ID="CONFIRM_REPLACE_ALL",ReplaceAllMatchesCommand={id:"ui.command.replace-all-matches",type:core.CommandType.COMMAND,handler:__name(async accessor=>{const confirmService=accessor.get(ui.IConfirmService),localeService=accessor.get(core.LocaleService),messageService=accessor.get(ui.IMessageService);if(!await confirmService.confirm({id:CONFIRM_REPLACE_ALL_ID,title:{title:localeService.t("find-replace.replace.confirm.title")},cancelText:localeService.t("button.cancel"),confirmText:localeService.t("button.confirm")}))return!1;const result=await accessor.get(IFindReplaceService).replaceAll(),{success,failure}=result;return failure>0?(success===0?messageService.show({type:design.MessageType.Error,content:localeService.t("find-replace.replace.all-failure")}):messageService.show({type:design.MessageType.Warning,content:localeService.t("find-replace.replace.partial-success",`${success}`,`${failure}`)}),!1):(messageService.show({type:design.MessageType.Success,content:localeService.t("find-replace.replace.all-success",`${success}`)}),!0)},"handler")};function SearchInput(props){const{findCompleted:findComplete,localeService,matchesCount,matchesPosition,findString,findReplaceService,onChange,...rest}=props,text=findComplete&&matchesCount===0?localeService.t("find-replace.dialog.no-result"):matchesCount===0?" ":void 0;return jsxRuntimeExports.jsx(design.InputWithSlot,{autoFocus:!0,placeholder:localeService.t("find-replace.dialog.find-placeholder"),slot:jsxRuntimeExports.jsx(design.Pager,{loop:!0,text,value:matchesPosition,total:matchesCount,onChange:__name(newIndex=>{matchesPosition===matchesCount&&newIndex===1?findReplaceService.moveToNextMatch():matchesPosition===1&&newIndex===matchesCount||newIndex<matchesPosition?findReplaceService.moveToPreviousMatch():findReplaceService.moveToNextMatch()},"onChange")}),value:findString,onChange:__name(value=>onChange==null?void 0:onChange(value),"onChange"),...rest})}__name(SearchInput,"SearchInput");const styles={findReplaceDialogContainer:"univer-find-replace-dialog-container",findReplaceExpandContainer:"univer-find-replace-expand-container",buttonText:"univer-button-text",findReplaceButtonsGroup:"univer-find-replace-buttons-group",findReplaceButtonsGroupRight:"univer-find-replace-buttons-group-right"};function useFindInputFocus(findReplaceService,ref){const focus=require$$0.useCallback(()=>{var _a2;(_a2=document.querySelector(".univer-find-input input"))==null||_a2.focus()},[]),selectHasFocus=require$$0.useCallback(()=>{const allInputs=document.querySelectorAll(".univer-find-replace-dialog-container .univer-select-selection-search-input");return Array.from(allInputs).some(input=>input===document.activeElement)},[]);return require$$0.useImperativeHandle(ref,()=>({focus,selectHasFocus})),require$$0.useEffect(()=>{const subscription=findReplaceService.focusSignal$.subscribe(()=>focus());return()=>subscription.unsubscribe()},[findReplaceService,focus]),{focus,selectHasFocus}}__name(useFindInputFocus,"useFindInputFocus");const FindDialog=require$$0.forwardRef(__name(function(_props,ref){const localeService=core.useDependency(core.LocaleService),findReplaceService=core.useDependency(IFindReplaceService),commandService=core.useDependency(core.ICommandService),state=ui.useObservable(findReplaceService.state$,void 0,!0),{findCompleted,findString,matchesCount,matchesPosition}=state,revealReplace=require$$0.useCallback(()=>{commandService.executeCommand(OpenReplaceDialogOperation.id)},[commandService]),onFindStringChange=require$$0.useCallback(findString2=>findReplaceService.changeFindString(findString2),[findReplaceService]);return useFindInputFocus(findReplaceService,ref),jsxRuntimeExports.jsxs(require$$0.Fragment,{children:[jsxRuntimeExports.jsx(SearchInput,{findCompleted,className:"univer-find-input",matchesCount,matchesPosition,findReplaceService,localeService,findString,onChange:onFindStringChange}),jsxRuntimeExports.jsx("div",{className:styles.findReplaceExpandContainer,children:jsxRuntimeExports.jsx(design.Button,{type:"text",size:"small",onClick:revealReplace,children:localeService.t("find-replace.dialog.advanced-finding")})})]})},"FindDialogImpl")),ReplaceDialog=require$$0.forwardRef(__name(function(_props,ref){const findReplaceService=core.useDependency(IFindReplaceService),localeService=core.useDependency(core.LocaleService),commandService=core.useDependency(core.ICommandService),messageService=core.useDependency(ui.IMessageService),currentMatch=ui.useObservable(findReplaceService.currentMatch$,void 0,!0),replaceables=ui.useObservable(findReplaceService.replaceables$,void 0,!0),state=ui.useObservable(findReplaceService.state$,void 0,!0),{matchesCount,matchesPosition,findString,inputtingFindString,replaceString,caseSensitive,matchesTheWholeCell,findDirection,findScope,findBy,findCompleted}=state,findDisabled=inputtingFindString.length===0,replaceDisabled=matchesCount===0||!(currentMatch!=null&&currentMatch.replaceable),replaceAllDisabled=replaceables.length===0,onFindStringChange=require$$0.useCallback(newValue=>findReplaceService.changeInputtingFindString(newValue),[findReplaceService]),onReplaceStringChange=require$$0.useCallback(replaceString2=>findReplaceService.changeReplaceString(replaceString2),[findReplaceService]),{focus}=useFindInputFocus(findReplaceService,ref),onClickFindButton=require$$0.useCallback(()=>{findString===inputtingFindString?findReplaceService.moveToNextMatch():(findReplaceService.changeFindString(inputtingFindString),findReplaceService.find())},[findString,inputtingFindString,findReplaceService]),onClickReplaceButton=require$$0.useCallback(()=>commandService.executeCommand(ReplaceCurrentMatchCommand.id),[commandService]),onClickReplaceAllButton=require$$0.useCallback(async()=>{await commandService.executeCommand(ReplaceAllMatchesCommand.id),focus()},[commandService]),onChangeFindDirection=require$$0.useCallback(findDirection2=>{findReplaceService.changeFindDirection(findDirection2)},[findReplaceService]),onChangeFindScope=require$$0.useCallback(findScope2=>{findReplaceService.changeFindScope(findScope2)},[findReplaceService]),onChangeFindBy=require$$0.useCallback(findBy2=>{findReplaceService.changeFindBy(findBy2)},[findReplaceService]),findScopeOptions=useFindScopeOptions(localeService),findDirectionOptions=useFindDirectionOptions(localeService),findByOptions=useFindByOptions(localeService);return require$$0.useEffect(()=>{const shouldDisplayNoMatchInfo=findCompleted&&matchesCount===0;let messageDisposable=null;return shouldDisplayNoMatchInfo&&(messageDisposable=messageService.show({content:localeService.t("find-replace.dialog.no-match"),type:design.MessageType.Warning,duration:5e3})),()=>messageDisposable==null?void 0:messageDisposable.dispose()},[findCompleted,matchesCount,messageService,localeService]),jsxRuntimeExports.jsxs(require$$0.Fragment,{children:[jsxRuntimeExports.jsx(design.FormLayout,{label:localeService.t("find-replace.dialog.find"),children:jsxRuntimeExports.jsx(SearchInput,{findCompleted,className:"univer-find-input",matchesCount,matchesPosition,findReplaceService,localeService,findString:inputtingFindString,onChange:onFindStringChange})}),jsxRuntimeExports.jsx(design.FormLayout,{label:localeService.t("find-replace.dialog.replace"),children:jsxRuntimeExports.jsx(design.Input,{placeholder:localeService.t("find-replace.dialog.replace-placeholder"),value:replaceString,onChange:__name(value=>onReplaceStringChange(value),"onChange")})}),jsxRuntimeExports.jsx(design.FormLayout,{label:localeService.t("find-replace.dialog.find-direction.title"),children:jsxRuntimeExports.jsx(design.Select,{value:findDirection,options:findDirectionOptions,onChange:onChangeFindDirection})}),jsxRuntimeExports.jsx(design.FormDualColumnLayout,{children:jsxRuntimeExports.jsxs(require$$0.Fragment,{children:[jsxRuntimeExports.jsx(design.FormLayout,{label:localeService.t("find-replace.dialog.find-scope.title"),children:jsxRuntimeExports.jsx(design.Select,{value:findScope,options:findScopeOptions,onChange:onChangeFindScope})}),jsxRuntimeExports.jsx(design.FormLayout,{label:localeService.t("find-replace.dialog.find-by.title"),children:jsxRuntimeExports.jsx(design.Select,{value:findBy,options:findByOptions,onChange:onChangeFindBy})})]})}),jsxRuntimeExports.jsx(design.FormDualColumnLayout,{children:jsxRuntimeExports.jsxs(require$$0.Fragment,{children:[jsxRuntimeExports.jsx(design.FormLayout,{children:jsxRuntimeExports.jsx(design.Checkbox,{checked:caseSensitive,onChange:__name(checked=>{findReplaceService.changeCaseSensitive(checked)},"onChange"),children:localeService.t("find-replace.dialog.case-sensitive")})}),jsxRuntimeExports.jsx(design.FormLayout,{children:jsxRuntimeExports.jsx(design.Checkbox,{checked:matchesTheWholeCell,onChange:__name(checked=>{findReplaceService.changeMatchesTheWholeCell(checked)},"onChange"),children:localeService.t("find-replace.dialog.match-the-whole-cell")})})]})}),jsxRuntimeExports.jsxs("div",{className:styles.findReplaceButtonsGroup,children:[jsxRuntimeExports.jsx(design.Button,{type:"primary",onClick:onClickFindButton,disabled:findDisabled,children:localeService.t("find-replace.dialog.find")}),jsxRuntimeExports.jsxs("span",{className:styles.findReplaceButtonsGroupRight,children:[jsxRuntimeExports.jsx(design.Button,{disabled:replaceDisabled,onClick:onClickReplaceButton,children:localeService.t("find-replace.dialog.replace")}),jsxRuntimeExports.jsx(design.Button,{disabled:replaceAllDisabled,onClick:onClickReplaceAllButton,children:localeService.t("find-replace.dialog.replace-all")})]})]})]})},"ReplaceDIalogImpl"));function FindReplaceDialog(){const findReplaceService=core.useDependency(IFindReplaceService),layoutService=core.useDependency(ui.ILayoutService),contextService=core.useDependency(core.IContextService),state=ui.useObservable(findReplaceService.state$,void 0,!0),dialogContainerRef=require$$0.useRef(null);require$$0.useEffect(()=>{let disposable;return dialogContainerRef.current&&(disposable=layoutService.registerContainerElement(dialogContainerRef.current)),()=>disposable==null?void 0:disposable.dispose()},[layoutService]);const focusRef=require$$0.useRef(null),setDialogContainerFocus=require$$0.useCallback(focused=>contextService.setContextValue(FIND_REPLACE_DIALOG_FOCUS,focused),[contextService]),setDialogInputFocus=require$$0.useCallback(focused=>contextService.setContextValue(FIND_REPLACE_INPUT_FOCUS,focused),[contextService]);return require$$0.useEffect(()=>{var _a2;const focusSubscription=rxjs.fromEvent(document,"focusin").subscribe(event=>{var _a3;event.target&&((_a3=dialogContainerRef.current)!=null&&_a3.contains(event.target))?setDialogContainerFocus(!0):setDialogContainerFocus(!1),!focusRef.current||!focusRef.current.selectHasFocus()?setDialogInputFocus(!0):setDialogInputFocus(!1)});return(_a2=focusRef.current)==null||_a2.focus(),setDialogContainerFocus(!0),setDialogInputFocus(!0),()=>{focusSubscription.unsubscribe(),setDialogContainerFocus(!1)}},[setDialogContainerFocus,setDialogInputFocus]),jsxRuntimeExports.jsx("div",{className:styles.findReplaceDialogContainer,ref:dialogContainerRef,children:state.replaceRevealed?jsxRuntimeExports.jsx(ReplaceDialog,{ref:focusRef}):jsxRuntimeExports.jsx(FindDialog,{ref:focusRef})})}__name(FindReplaceDialog,"FindReplaceDialog");function useFindScopeOptions(localeService){const locale=localeService.getCurrentLocale();return require$$0.useMemo(()=>[{label:localeService.t("find-replace.dialog.find-scope.current-sheet"),value:FindScope.SUBUNIT},{label:localeService.t("find-replace.dialog.find-scope.workbook"),value:FindScope.UNIT}],[locale])}__name(useFindScopeOptions,"useFindScopeOptions");function useFindDirectionOptions(localeService){const locale=localeService.getCurrentLocale();return require$$0.useMemo(()=>[{label:localeService.t("find-replace.dialog.find-direction.row"),value:FindDirection.ROW},{label:localeService.t("find-replace.dialog.find-direction.column"),value:FindDirection.COLUMN}],[locale])}__name(useFindDirectionOptions,"useFindDirectionOptions");function useFindByOptions(localeService){const locale=localeService.getCurrentLocale();return require$$0.useMemo(()=>[{label:localeService.t("find-replace.dialog.find-by.value"),value:FindBy.VALUE},{label:localeService.t("find-replace.dialog.find-by.formula"),value:FindBy.FORMULA}],[locale])}__name(useFindByOptions,"useFindByOptions");function whenFindReplaceDialogFocused(contextService){return contextService.getContextValue(FIND_REPLACE_DIALOG_FOCUS)}__name(whenFindReplaceDialogFocused,"whenFindReplaceDialogFocused");function whenReplaceRevealed(contextService){return contextService.getContextValue(FIND_REPLACE_REPLACE_REVEALED)}__name(whenReplaceRevealed,"whenReplaceRevealed");function whenFindReplaceInputFocused(contextService){return contextService.getContextValue(FIND_REPLACE_INPUT_FOCUS)}__name(whenFindReplaceInputFocused,"whenFindReplaceInputFocused");const FIND_REPLACE_SHORTCUT_GROUP="7_find-replace-shortcuts";function whenSheetFocused(contextService){return contextService.getContextValue(core.FOCUSING_SHEET)}__name(whenSheetFocused,"whenSheetFocused");function whenEditorNotActivated(contextService){return!contextService.getContextValue(core.EDITOR_ACTIVATED)}__name(whenEditorNotActivated,"whenEditorNotActivated");const OpenFindDialogShortcutItem={id:OpenFindDialogOperation.id,description:"find-replace.shortcut.open-find-dialog",binding:ui.KeyCode.F|ui.MetaKeys.CTRL_COMMAND,group:FIND_REPLACE_SHORTCUT_GROUP,preconditions(contextService){return!whenFindReplaceDialogFocused(contextService)&&whenSheetFocused(contextService)&&whenEditorNotActivated(contextService)}},MacOpenFindDialogShortcutItem={id:OpenFindDialogOperation.id,description:"find-replace.shortcut.open-find-dialog",binding:ui.KeyCode.F|ui.MetaKeys.CTRL_COMMAND,mac:ui.KeyCode.F|ui.MetaKeys.MAC_CTRL,preconditions(contextService){return!whenFindReplaceDialogFocused(contextService)&&whenSheetFocused(contextService)&&whenEditorNotActivated(contextService)}},OpenReplaceDialogShortcutItem={id:OpenReplaceDialogOperation.id,description:"find-replace.shortcut.open-replace-dialog",binding:ui.KeyCode.H|ui.MetaKeys.CTRL_COMMAND,mac:ui.KeyCode.H|ui.MetaKeys.MAC_CTRL,group:FIND_REPLACE_SHORTCUT_GROUP,preconditions(contextService){return whenSheetFocused(contextService)&&whenEditorNotActivated(contextService)&&(!whenFindReplaceDialogFocused(contextService)||!whenReplaceRevealed(contextService))}},GoToNextFindMatchShortcutItem={id:GoToNextMatchOperation.id,description:"find-replace.shortcut.go-to-next-match",binding:ui.KeyCode.ENTER,group:FIND_REPLACE_SHORTCUT_GROUP,priority:1e3,preconditions(contextService){return whenFindReplaceInputFocused(contextService)&&whenFindReplaceDialogFocused(contextService)}},GoToPreviousFindMatchShortcutItem={id:GoToPreviousMatchOperation.id,description:"find-replace.shortcut.go-to-previous-match",binding:ui.KeyCode.ENTER|ui.MetaKeys.SHIFT,group:FIND_REPLACE_SHORTCUT_GROUP,priority:1e3,preconditions(contextService){return whenFindReplaceInputFocused(contextService)&&whenFindReplaceDialogFocused(contextService)}};function FindReplaceMenuItemFactory(accessor){const contextService=accessor.get(core.IContextService);return{id:OpenFindDialogOperation.id,icon:"SearchIcon",tooltip:"find-replace.toolbar",type:ui.MenuItemType.BUTTON,hidden$:ui.getMenuHiddenObservable(accessor,core.UniverInstanceType.UNIVER_SHEET),disabled$:rxjs.combineLatest([contextService.subscribeContextValue$(core.EDITOR_ACTIVATED),contextService.subscribeContextValue$(core.FOCUSING_SHEET)]).pipe(rxjs.map(([editorActivated,focusingSheet])=>editorActivated||!focusingSheet))}}__name(FindReplaceMenuItemFactory,"FindReplaceMenuItemFactory");const menuSchema={[ui.RibbonStartGroup.OTHERS]:{[OpenFindDialogOperation.id]:{order:2,menuItemFactory:FindReplaceMenuItemFactory}}};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");const FIND_REPLACE_DIALOG_ID="DESKTOP_FIND_REPLACE_DIALOG",FIND_REPLACE_PANEL_WIDTH=350,FIND_REPLACE_PANEL_RIGHT_PADDING=20,FIND_REPLACE_PANEL_TOP_PADDING=-90;exports2.FindReplaceController=(_c=class extends core.RxDisposable{constructor(_univerInstanceService,_menuManagerService,_shortcutService,_commandService,_findReplaceService,_dialogService,_layoutService,_localeService,_componentManager,_injector){super();__publicField(this,"_closingListenerDisposable");this._univerInstanceService=_univerInstanceService,this._menuManagerService=_menuManagerService,this._shortcutService=_shortcutService,this._commandService=_commandService,this._findReplaceService=_findReplaceService,this._dialogService=_dialogService,this._layoutService=_layoutService,this._localeService=_localeService,this._componentManager=_componentManager,this._injector=_injector,this._initCommands(),this._initUI(),this._initShortcuts()}dispose(){var _a2;super.dispose(),(_a2=this._closingListenerDisposable)==null||_a2.dispose(),this._closingListenerDisposable=null}_initCommands(){[OpenFindDialogOperation,OpenReplaceDialogOperation,GoToNextMatchOperation,GoToPreviousMatchOperation,ReplaceAllMatchesCommand,ReplaceCurrentMatchCommand].forEach(c=>{this.disposeWithMe(this._commandService.registerCommand(c))})}_initShortcuts(){[OpenReplaceDialogShortcutItem,OpenFindDialogShortcutItem,MacOpenFindDialogShortcutItem,GoToPreviousFindMatchShortcutItem,GoToNextFindMatchShortcutItem].forEach(s=>this.disposeWithMe(this._shortcutService.registerShortcut(s)))}_initUI(){this.disposeWithMe(this._componentManager.register("FindReplaceDialog",FindReplaceDialog)),this.disposeWithMe(this._componentManager.register("SearchIcon",SearchSingle16)),this._menuManagerService.mergeMenu(menuSchema),this._findReplaceService.stateUpdates$.pipe(rxjs.takeUntil(this.dispose$)).subscribe(newState=>{newState.revealed===!0&&this._openPanel()})}_openPanel(){this._dialogService.open({id:FIND_REPLACE_DIALOG_ID,draggable:!0,width:FIND_REPLACE_PANEL_WIDTH,title:{title:this._localeService.t("find-replace.dialog.title")},children:{label:"FindReplaceDialog"},destroyOnClose:!0,defaultPosition:getFindReplaceDialogDefaultPosition(),preservePositionOnDestroy:!0,onClose:__name(()=>this.closePanel(),"onClose")}),this._closingListenerDisposable=core.toDisposable(this._univerInstanceService.focused$.pipe(rxjs.takeUntil(this.dispose$)).subscribe(focused=>{(!focused||!this._univerInstanceService.getUniverSheetInstance(focused))&&this.closePanel()}))}closePanel(){this._closingListenerDisposable&&(this._closingListenerDisposable.dispose(),this._closingListenerDisposable=null,this._dialogService.close(FIND_REPLACE_DIALOG_ID),this._findReplaceService.terminate(),queueMicrotask(()=>this._layoutService.focus()))}},__name(_c,"FindReplaceController"),_c),exports2.FindReplaceController=__decorateClass$1([core.OnLifecycle(core.LifecycleStages.Rendered,exports2.FindReplaceController),__decorateParam$1(0,core.IUniverInstanceService),__decorateParam$1(1,ui.IMenuManagerService),__decorateParam$1(2,ui.IShortcutService),__decorateParam$1(3,core.ICommandService),__decorateParam$1(4,IFindReplaceService),__decorateParam$1(5,ui.IDialogService),__decorateParam$1(6,ui.ILayoutService),__decorateParam$1(7,core.Inject(core.LocaleService)),__decorateParam$1(8,core.Inject(ui.ComponentManager)),__decorateParam$1(9,core.Inject(core.Injector))],exports2.FindReplaceController);function getFindReplaceDialogDefaultPosition(){const{innerWidth}=window;return{x:(innerWidth-FIND_REPLACE_PANEL_WIDTH)/2-FIND_REPLACE_PANEL_RIGHT_PADDING,y:FIND_REPLACE_PANEL_TOP_PADDING}}__name(getFindReplaceDialogDefaultPosition,"getFindReplaceDialogDefaultPosition");const PLUGIN_CONFIG_KEY="find-replace.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");const PLUGIN_NAME="UNIVER_FIND_REPLACE_PLUGIN";exports2.UniverFindReplacePlugin=(_d=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.FindReplaceController],[IFindReplaceService,{useClass:FindReplaceService}]].forEach(d=>{this._injector.add(d)})}},__name(_d,"UniverFindReplacePlugin"),__publicField(_d,"pluginName",PLUGIN_NAME),_d),exports2.UniverFindReplacePlugin=__decorateClass([__decorateParam(1,core.Inject(core.Injector)),__decorateParam(2,core.IConfigService)],exports2.UniverFindReplacePlugin),exports2.FindBy=FindBy,exports2.FindDirection=FindDirection,exports2.FindModel=FindModel,exports2.FindScope=FindScope,exports2.GoToNextMatchOperation=GoToNextMatchOperation,exports2.GoToPreviousMatchOperation=GoToPreviousMatchOperation,exports2.IFindReplaceService=IFindReplaceService,exports2.OpenFindDialogOperation=OpenFindDialogOperation,exports2.OpenReplaceDialogOperation=OpenReplaceDialogOperation,exports2.ReplaceAllMatchesCommand=ReplaceAllMatchesCommand,exports2.ReplaceCurrentMatchCommand=ReplaceCurrentMatchCommand,Object.defineProperty(exports2,Symbol.toStringTag,{value:"Module"})});
1
+ (function(_0x3ac3bd,_0x51dc4b){const _0x383ddb=_0x3161,_0x33da18=_0x3ac3bd();while(!![]){try{const _0x17d8b9=-parseInt(_0x383ddb(0x27b))/0x1*(parseInt(_0x383ddb(0x1fd))/0x2)+parseInt(_0x383ddb(0x25f))/0x3+parseInt(_0x383ddb(0x1dc))/0x4+parseInt(_0x383ddb(0x205))/0x5+-parseInt(_0x383ddb(0x1a9))/0x6*(-parseInt(_0x383ddb(0x17a))/0x7)+-parseInt(_0x383ddb(0x23a))/0x8+parseInt(_0x383ddb(0x1e3))/0x9*(-parseInt(_0x383ddb(0x1f5))/0xa);if(_0x17d8b9===_0x51dc4b)break;else _0x33da18['push'](_0x33da18['shift']());}catch(_0x58ee13){_0x33da18['push'](_0x33da18['shift']());}}}(_0x8523,0x6b72c),function(_0x56ded1,_0x3a5db1){const _0x43a837=_0x3161;typeof exports==_0x43a837(0x1cd)&&typeof module<'u'?_0x3a5db1(exports,require(_0x43a837(0x25c)),require(_0x43a837(0x1e1)),require(_0x43a837(0x286)),require(_0x43a837(0x1a6)),require(_0x43a837(0x1aa)),require(_0x43a837(0x273))):typeof define==_0x43a837(0x1da)&&define[_0x43a837(0x1e2)]?define([_0x43a837(0x2a6),_0x43a837(0x25c),'@univerjs/ui',_0x43a837(0x286),'@univerjs/design','@univerjs/engine-render',_0x43a837(0x273)],_0x3a5db1):(_0x56ded1=typeof globalThis<'u'?globalThis:_0x56ded1||self,_0x3a5db1(_0x56ded1[_0x43a837(0x285)]={},_0x56ded1[_0x43a837(0x1bd)],_0x56ded1[_0x43a837(0x1a2)],_0x56ded1[_0x43a837(0x286)],_0x56ded1[_0x43a837(0x1ce)],_0x56ded1[_0x43a837(0x28e)],_0x56ded1[_0x43a837(0x275)]));}(this,function(_0x391c53,_0x3df125,_0x136642,_0x247e3b,_0x4810f5,_0x45a359,_0x18172c){'use strict';const _0x36fa75=_0x3161;var _0xdf987a=Object[_0x36fa75(0x28c)],_0x52f629=(_0x2a47ec,_0x3be285,_0x5670b2)=>_0x3be285 in _0x2a47ec?_0xdf987a(_0x2a47ec,_0x3be285,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5670b2}):_0x2a47ec[_0x3be285]=_0x5670b2,_0x30fa37=(_0x36a09d,_0x396e33)=>_0xdf987a(_0x36a09d,_0x36fa75(0x152),{'value':_0x396e33,'configurable':!0x0}),_0x265c3b=(_0x1d385b,_0x2b1d8c,_0x3d57f2)=>_0x52f629(_0x1d385b,typeof _0x2b1d8c!=_0x36fa75(0x161)?_0x2b1d8c+'':_0x2b1d8c,_0x3d57f2),_0x277107,_0x3fc222,_0x4a2426,_0x169696;const _0x5db77e=_0x36fa75(0x23f),_0x4bb47d={};var _0x2d0958=function(){const _0x5a2d3b=_0x36fa75;return _0x2d0958=Object[_0x5a2d3b(0x221)]||function(_0x36621f){const _0x13e03e=_0x5a2d3b;for(var _0xc5d070,_0x56220f=0x1,_0x44fa46=arguments[_0x13e03e(0x23c)];_0x56220f<_0x44fa46;_0x56220f++){_0xc5d070=arguments[_0x56220f];for(var _0x2d39ed in _0xc5d070)Object[_0x13e03e(0x1ae)][_0x13e03e(0x178)][_0x13e03e(0x177)](_0xc5d070,_0x2d39ed)&&(_0x36621f[_0x2d39ed]=_0xc5d070[_0x2d39ed]);}return _0x36621f;},_0x2d0958['apply'](this,arguments);},_0x37e1ff=function(_0x2284bb,_0x216bc2){const _0x23e2e3=_0x36fa75;var _0x283b97={};for(var _0x3ec0e3 in _0x2284bb)Object[_0x23e2e3(0x1ae)][_0x23e2e3(0x178)][_0x23e2e3(0x177)](_0x2284bb,_0x3ec0e3)&&_0x216bc2['indexOf'](_0x3ec0e3)<0x0&&(_0x283b97[_0x3ec0e3]=_0x2284bb[_0x3ec0e3]);if(_0x2284bb!=null&&typeof Object['getOwnPropertySymbols']==_0x23e2e3(0x1da)){for(var _0x112961=0x0,_0x3ec0e3=Object['getOwnPropertySymbols'](_0x2284bb);_0x112961<_0x3ec0e3[_0x23e2e3(0x23c)];_0x112961++)_0x216bc2[_0x23e2e3(0x141)](_0x3ec0e3[_0x112961])<0x0&&Object[_0x23e2e3(0x1ae)][_0x23e2e3(0x17b)]['call'](_0x2284bb,_0x3ec0e3[_0x112961])&&(_0x283b97[_0x3ec0e3[_0x112961]]=_0x2284bb[_0x3ec0e3[_0x112961]]);}return _0x283b97;},_0x456d9d=_0x18172c[_0x36fa75(0x20d)](function(_0x3a7958,_0xf0af6f){const _0x1f8984=_0x36fa75;var _0x488a63=_0x3a7958[_0x1f8984(0x2a3)],_0xf93633=_0x3a7958['id'],_0xb2451c=_0x3a7958[_0x1f8984(0x158)],_0x30d25f=_0x3a7958['extend'],_0x28467d=_0x37e1ff(_0x3a7958,['icon','id',_0x1f8984(0x158),_0x1f8984(0x272)]),_0x25ad21=_0x1f8984(0x220)['concat'](_0xf93633,'\x20')['concat'](_0xb2451c||'')[_0x1f8984(0x1b7)](),_0x5512f7=_0x18172c[_0x1f8984(0x1cf)]('_'[_0x1f8984(0x171)](_0x163e91()));return _0x41cfaa(_0x488a63,''[_0x1f8984(0x171)](_0xf93633),{'defIds':_0x488a63['defIds'],'idSuffix':_0x5512f7[_0x1f8984(0x196)]},_0x2d0958({'ref':_0xf0af6f,'className':_0x25ad21},_0x28467d),_0x30d25f);});function _0x41cfaa(_0x32669c,_0xbf7caf,_0x2de81f,_0x221946,_0x50366b){const _0x57b966=_0x36fa75;return _0x18172c[_0x57b966(0x154)](_0x32669c[_0x57b966(0x252)],_0x2d0958(_0x2d0958({'key':_0xbf7caf},_0x3c5aa6(_0x32669c,_0x2de81f,_0x50366b)),_0x221946),(_0x2ee44e(_0x32669c,_0x2de81f)[_0x57b966(0x210)]||[])[_0x57b966(0x18a)](function(_0x2349ba,_0x488085){const _0x236ff6=_0x57b966;return _0x41cfaa(_0x2349ba,''['concat'](_0xbf7caf,'-')[_0x236ff6(0x171)](_0x32669c['tag'],'-')[_0x236ff6(0x171)](_0x488085),_0x2de81f,void 0x0,_0x50366b);}));}_0x30fa37(_0x41cfaa,_0x36fa75(0x1a8));function _0x3c5aa6(_0x5ad99b,_0x5265b2,_0x583e01){const _0x32a879=_0x36fa75;var _0xbf154a=_0x2d0958({},_0x5ad99b[_0x32a879(0x188)]);_0x583e01!=null&&_0x583e01['colorChannel1']&&_0xbf154a['fill']===_0x32a879(0x26d)&&(_0xbf154a[_0x32a879(0x17c)]=_0x583e01[_0x32a879(0x26d)]);var _0x549ca3=_0x5265b2['defIds'];return!_0x549ca3||_0x549ca3[_0x32a879(0x23c)]===0x0||(_0x5ad99b[_0x32a879(0x252)]===_0x32a879(0x27d)&&_0xbf154a[_0x32a879(0x22f)]&&(_0xbf154a['xlink:href']=_0xbf154a[_0x32a879(0x22f)]+_0x5265b2[_0x32a879(0x1d6)]),Object[_0x32a879(0x1ef)](_0xbf154a)[_0x32a879(0x293)](function(_0x30796e){const _0x38627a=_0x32a879;var _0x1c3097=_0x30796e[0x0],_0x268ed4=_0x30796e[0x1];typeof _0x268ed4==_0x38627a(0x186)&&(_0xbf154a[_0x1c3097]=_0x268ed4['replace'](/url\(#(.*)\)/,'url(#$1'[_0x38627a(0x171)](_0x5265b2[_0x38627a(0x1d6)],')')));})),_0xbf154a;}_0x30fa37(_0x3c5aa6,'replaceRuntimeIdsAndExtInAttrs');function _0x2ee44e(_0x4fcbf2,_0x41f66f){const _0x2239c8=_0x36fa75;var _0x423dc6,_0x3070c7=_0x41f66f[_0x2239c8(0x13c)];return!_0x3070c7||_0x3070c7[_0x2239c8(0x23c)]===0x0?_0x4fcbf2:_0x4fcbf2['tag']===_0x2239c8(0x231)&&(!((_0x423dc6=_0x4fcbf2['children'])===null||_0x423dc6===void 0x0)&&_0x423dc6[_0x2239c8(0x23c)])?_0x2d0958(_0x2d0958({},_0x4fcbf2),{'children':_0x4fcbf2['children'][_0x2239c8(0x18a)](function(_0x336abd){const _0x3ab894=_0x2239c8;return typeof _0x336abd[_0x3ab894(0x188)]['id']==_0x3ab894(0x186)&&_0x3070c7&&_0x3070c7['indexOf'](_0x336abd[_0x3ab894(0x188)]['id'])>-0x1?_0x2d0958(_0x2d0958({},_0x336abd),{'attrs':_0x2d0958(_0x2d0958({},_0x336abd[_0x3ab894(0x188)]),{'id':_0x336abd[_0x3ab894(0x188)]['id']+_0x41f66f['idSuffix']})}):_0x336abd;})}):_0x4fcbf2;}_0x30fa37(_0x2ee44e,'replaceRuntimeIdsInDefs');function _0x163e91(){const _0x417e78=_0x36fa75;return Math[_0x417e78(0x1fb)]()[_0x417e78(0x16b)](0x24)[_0x417e78(0x183)](0x2,0x8);}_0x30fa37(_0x163e91,_0x36fa75(0x239)),_0x456d9d[_0x36fa75(0x243)]='UniverIcon';var _0x5a408c={'tag':'svg','attrs':{'fill':'none','viewBox':_0x36fa75(0x2a2),'width':_0x36fa75(0x29f),'height':_0x36fa75(0x29f)},'children':[{'tag':_0x36fa75(0x1b2),'attrs':{'id':_0x36fa75(0x1b5),'style':{'maskType':_0x36fa75(0x216)},'width':0x11,'height':0x11,'x':0x0,'y':0x0,'maskUnits':'userSpaceOnUse'},'children':[{'tag':_0x36fa75(0x1b8),'attrs':{'fill':_0x36fa75(0x14e),'d':_0x36fa75(0x299)}}]},{'tag':'g','attrs':{'mask':'url(#mask0_217_40)'},'children':[{'tag':_0x36fa75(0x1b8),'attrs':{'fill':_0x36fa75(0x207),'d':_0x36fa75(0x2ab),'fillRule':'evenodd','clipRule':_0x36fa75(0x237)}}]}]},_0x1c9cae=_0x18172c[_0x36fa75(0x20d)](function(_0xac227,_0x113a27){const _0x70b0f0=_0x36fa75;return _0x18172c[_0x70b0f0(0x154)](_0x456d9d,Object[_0x70b0f0(0x221)]({},_0xac227,{'id':_0x70b0f0(0x1ed),'ref':_0x113a27,'icon':_0x5a408c}));});_0x1c9cae[_0x36fa75(0x243)]=_0x36fa75(0x24c);const _0x530b03=_0x36fa75(0x267),_0x2fd148='FIND_REPLACE_DIALOG_FOCUS',_0x1a0800='FIND_REPLACE_REPLACE_REVEALED';var _0x29693e=Object['defineProperty'],_0x144094=Object[_0x36fa75(0x279)],_0x3f60b2=_0x30fa37((_0x3f0dcb,_0x32484c,_0x37cb8b,_0x40c2d5)=>{const _0x139c13=_0x36fa75;for(var _0x3708f1=_0x40c2d5>0x1?void 0x0:_0x40c2d5?_0x144094(_0x32484c,_0x37cb8b):_0x32484c,_0x5609b4=_0x3f0dcb[_0x139c13(0x23c)]-0x1,_0x3d52d4;_0x5609b4>=0x0;_0x5609b4--)(_0x3d52d4=_0x3f0dcb[_0x5609b4])&&(_0x3708f1=(_0x40c2d5?_0x3d52d4(_0x32484c,_0x37cb8b,_0x3708f1):_0x3d52d4(_0x3708f1))||_0x3708f1);return _0x40c2d5&&_0x3708f1&&_0x29693e(_0x32484c,_0x37cb8b,_0x3708f1),_0x3708f1;},'__decorateClass$2'),_0x47f0a=_0x30fa37((_0x41121f,_0x23f324)=>(_0x4a7883,_0x3a3aed)=>_0x23f324(_0x4a7883,_0x3a3aed,_0x41121f),_0x36fa75(0x27e));const _0x2a9705=class _0x36b96d extends _0x3df125[_0x36fa75(0x13d)]{};_0x30fa37(_0x2a9705,'FindModel');let _0x3d9f7c=_0x2a9705;const _0x37084e=_0x3df125[_0x36fa75(0x1f6)](_0x36fa75(0x169));function _0x442e21(_0x211f7c){const _0x1bbc8c=_0x36fa75;return typeof _0x211f7c[_0x1bbc8c(0x1c9)]<'u'||typeof _0x211f7c[_0x1bbc8c(0x277)]<'u'||typeof _0x211f7c[_0x1bbc8c(0x248)]<'u'||typeof _0x211f7c[_0x1bbc8c(0x1af)]<'u'||typeof _0x211f7c[_0x1bbc8c(0x18e)]<'u'||typeof _0x211f7c[_0x1bbc8c(0x282)]<'u'||typeof _0x211f7c[_0x1bbc8c(0x19c)]<'u';}_0x30fa37(_0x442e21,_0x36fa75(0x1a7));let _0xe25e54=(_0x277107=class extends _0x3df125[_0x36fa75(0x13d)]{constructor(_0x4976e5,_0x48996a,_0x25386a){const _0x1732a4=_0x36fa75;super(),_0x265c3b(this,_0x1732a4(0x1f3),new _0x247e3b['BehaviorSubject'](null)),_0x265c3b(this,_0x1732a4(0x1e7),new _0x247e3b[(_0x1732a4(0x21a))]([])),_0x265c3b(this,_0x1732a4(0x1fe),[]),_0x265c3b(this,'_matchingModel',null),_0x265c3b(this,'_matches',[]),_0x265c3b(this,'_currentSearchingDisposables',null),(this[_0x1732a4(0x14a)]=_0x4976e5,this['_providers']=_0x48996a,this[_0x1732a4(0x157)]=_0x25386a,this['disposeWithMe'](this[_0x1732a4(0x14a)][_0x1732a4(0x283)]['pipe'](_0x247e3b[_0x1732a4(0x1f1)](0xc8,void 0x0,{'leading':!0x0,'trailing':!0x0}))[_0x1732a4(0x261)](async _0x5f54df=>{const _0x3f3ec2=_0x1732a4,_0x4fd964=this['_state']['state'];_0x442e21(_0x5f54df)&&(_0x4fd964['findString']!==''&&!_0x4fd964[_0x3f3ec2(0x215)]?(await this[_0x3f3ec2(0x198)](),this['_state'][_0x3f3ec2(0x15a)]({'findCompleted':!0x0})):_0x5f54df[_0x3f3ec2(0x215)]!==!0x0&&this['_stopSearching']());})));}get[_0x36fa75(0x1fa)](){const _0x206ef9=_0x36fa75;return this[_0x206ef9(0x1fe)][_0x206ef9(0x23c)]>0x0;}[_0x36fa75(0x225)](){const _0x167f3c=_0x36fa75;super[_0x167f3c(0x225)](),this[_0x167f3c(0x21d)](),this[_0x167f3c(0x1f3)]['complete'](),this[_0x167f3c(0x1e7)][_0x167f3c(0x1b0)](),this['_state'][_0x167f3c(0x15a)]({..._0x179935(),'revealed':!0x1});}async[_0x36fa75(0x233)](){const _0x332c14=_0x36fa75;if(!this['_state'][_0x332c14(0x1c9)])return{'results':[]};const _0x54221d=await this[_0x332c14(0x198)]();return this[_0x332c14(0x14a)][_0x332c14(0x15a)]({'findCompleted':!0x0}),_0x54221d;}async['_startSearching'](){const _0x113a95=_0x36fa75;if(!this[_0x113a95(0x14a)][_0x113a95(0x1c9)])return{'results':[]};const _0x244350=Array[_0x113a95(0x1ad)](this[_0x113a95(0x159)]),_0x323643=this['_findModels']=(await Promise[_0x113a95(0x246)](_0x244350['map'](_0x477c38=>_0x477c38[_0x113a95(0x24b)]({'findString':this[_0x113a95(0x14a)][_0x113a95(0x1c9)],'findDirection':this[_0x113a95(0x14a)][_0x113a95(0x248)],'findScope':this[_0x113a95(0x14a)][_0x113a95(0x282)],'findBy':this[_0x113a95(0x14a)]['findBy'],'replaceRevealed':this[_0x113a95(0x14a)][_0x113a95(0x215)],'caseSensitive':this[_0x113a95(0x14a)][_0x113a95(0x18e)],'matchesTheWholeCell':this[_0x113a95(0x14a)][_0x113a95(0x1af)]}))))[_0x113a95(0x150)]();this['_subscribeToModelsChanges'](_0x323643);const _0x5c0011=this[_0x113a95(0x26c)]=_0x323643[_0x113a95(0x18a)](_0x4ae337=>_0x4ae337[_0x113a95(0x2a0)]())['flat']();return this[_0x113a95(0x1e7)][_0x113a95(0x1cb)](_0x5c0011['filter'](_0x39cc96=>_0x39cc96['replaceable'])),_0x5c0011[_0x113a95(0x23c)]?(this['_moveToInitialMatch'](_0x323643),this[_0x113a95(0x14a)][_0x113a95(0x15a)]({'matchesCount':_0x5c0011['length']}),{'results':_0x5c0011}):(this['_state']['changeState']({'matchesCount':0x0,'matchesPosition':0x0}),{'results':[]});}[_0x36fa75(0x21d)](){const _0x1a71e2=_0x36fa75;var _0x2f75ed;this[_0x1a71e2(0x159)]['forEach'](_0x3e7d25=>_0x3e7d25[_0x1a71e2(0x1a1)]()),this[_0x1a71e2(0x1fe)]=[],this[_0x1a71e2(0x26c)]=[],this['_matchingModel']=null,(_0x2f75ed=this[_0x1a71e2(0x292)])==null||_0x2f75ed[_0x1a71e2(0x225)](),this[_0x1a71e2(0x292)]=null,this[_0x1a71e2(0x1f3)][_0x1a71e2(0x1cb)](null),this[_0x1a71e2(0x1e7)]['next']([]),this[_0x1a71e2(0x14a)][_0x1a71e2(0x15a)]({'findCompleted':!0x1,'matchesCount':0x0,'matchesPosition':0x0});}[_0x36fa75(0x28b)](_0x48a29b){const _0x152f2f=_0x36fa75,_0x2076f1=this[_0x152f2f(0x292)]=new _0x3df125[(_0x152f2f(0x211))](),_0x254f51=_0x247e3b[_0x152f2f(0x1db)](_0x48a29b[_0x152f2f(0x18a)](_0x37fdd7=>_0x37fdd7['matchesUpdate$']))['pipe'](_0x247e3b[_0x152f2f(0x20e)](0xdc))[_0x152f2f(0x261)](([..._0x37f395])=>{const _0x51c6bf=_0x152f2f,_0x54ce20=this[_0x51c6bf(0x26c)]=_0x37f395[_0x51c6bf(0x150)]();_0x54ce20[_0x51c6bf(0x23c)]?(this[_0x51c6bf(0x149)](this[_0x51c6bf(0x1fe)],!0x0),this[_0x51c6bf(0x14a)][_0x51c6bf(0x15a)]({'matchesCount':_0x54ce20[_0x51c6bf(0x23c)]}),this[_0x51c6bf(0x1e7)][_0x51c6bf(0x1cb)](_0x54ce20[_0x51c6bf(0x165)](_0x89f9d2=>_0x89f9d2[_0x51c6bf(0x245)]))):(this[_0x51c6bf(0x14a)][_0x51c6bf(0x15a)]({'matchesCount':0x0,'matchesPosition':0x0}),this[_0x51c6bf(0x1e7)][_0x51c6bf(0x1cb)]([]));});_0x48a29b['forEach'](_0x279d94=>_0x2076f1['add'](_0x3df125['toDisposable'](_0x279d94[_0x152f2f(0x153)][_0x152f2f(0x261)](_0x5c0c47=>{const _0x23b806=_0x152f2f,_0x554b9b=this[_0x23b806(0x26c)][_0x23b806(0x1b4)](_0x27d13d=>_0x27d13d===_0x5c0c47);this['_state'][_0x23b806(0x15a)]({'matchesPosition':_0x554b9b+0x1});})))),_0x2076f1['add'](_0x3df125['toDisposable'](_0x254f51));}async[_0x36fa75(0x204)](){const _0x5c5595=_0x36fa75;return this['_matchingModel']?this[_0x5c5595(0x22c)][_0x5c5595(0x204)](this['_state']['replaceString']):!0x1;}async[_0x36fa75(0x25b)](){const _0x548020=_0x36fa75,_0x41990b=await Promise[_0x548020(0x246)](this[_0x548020(0x1fe)][_0x548020(0x18a)](_0x2a5837=>_0x2a5837['replaceAll'](this[_0x548020(0x14a)][_0x548020(0x27c)])))[_0x548020(0x22b)](_0xf462d9=>_0xf462d9[_0x548020(0x268)]((_0x1dd30e,_0x204d26)=>(_0x1dd30e[_0x548020(0x21e)]+=_0x204d26[_0x548020(0x21e)],_0x1dd30e['failure']+=_0x204d26['failure'],_0x1dd30e),{'success':0x0,'failure':0x0}));return _0x41990b[_0x548020(0x197)]===0x0&&this[_0x548020(0x21d)](),_0x41990b;}[_0x36fa75(0x22a)](){const _0x18aa2d=_0x36fa75;return this['_state'][_0x18aa2d(0x180)]>0x0?this['_matches'][this[_0x18aa2d(0x14a)]['matchesPosition']-0x1]:null;}[_0x36fa75(0x173)](_0x37e3db){const _0x3d8591=_0x36fa75,_0x434813=this['_matches'][_0x3d8591(0x1b4)](_0x2d30a6=>_0x2d30a6===_0x37e3db);this[_0x3d8591(0x1f3)]['next'](_0x37e3db),this[_0x3d8591(0x14a)][_0x3d8591(0x15a)]({'matchesPosition':_0x434813+0x1});}[_0x36fa75(0x16d)](){const _0x575295=_0x36fa75;if(!this[_0x575295(0x22c)])return;const _0xe56bea=this[_0x575295(0x1fe)][_0x575295(0x23c)]===0x1,_0xdfc4a8=this[_0x575295(0x22c)][_0x575295(0x16d)]({'loop':_0xe56bea});if(_0xdfc4a8)this[_0x575295(0x173)](_0xdfc4a8);else{const _0xfdb336=this[_0x575295(0x1fe)][_0x575295(0x1b4)](_0x27b10c=>_0x27b10c===this[_0x575295(0x22c)]);this[_0x575295(0x13f)](_0xfdb336);}}[_0x36fa75(0x13f)](_0x12228a){const _0x58e5b3=_0x36fa75,_0x36410f=this['_findModels'][_0x58e5b3(0x23c)];for(let _0x29cc78=(_0x12228a+0x1)%_0x36410f;_0x29cc78!==_0x12228a;){const _0x3fc536=this[_0x58e5b3(0x1fe)][_0x29cc78],_0x5a9fbd=_0x3fc536[_0x58e5b3(0x16d)]({'ignoreSelection':!0x0});if(_0x5a9fbd){this[_0x58e5b3(0x22c)]=_0x3fc536,this[_0x58e5b3(0x173)](_0x5a9fbd);return;}_0x29cc78=(_0x29cc78+0x1)%_0x36410f;}if(this[_0x58e5b3(0x22c)]){const _0x2d6ce9=this['_matchingModel'][_0x58e5b3(0x16d)]({'ignoreSelection':!0x0});_0x2d6ce9&&this[_0x58e5b3(0x173)](_0x2d6ce9);}}[_0x36fa75(0x1c6)](){const _0x3c00c5=_0x36fa75;if(!this[_0x3c00c5(0x22c)])return;const _0xc4cec5=this[_0x3c00c5(0x1fe)][_0x3c00c5(0x23c)]===0x1,_0x1bf184=this[_0x3c00c5(0x22c)][_0x3c00c5(0x1c6)]({'loop':_0xc4cec5});if(_0x1bf184){const _0x1a5fe4=this[_0x3c00c5(0x26c)]['findIndex'](_0x2978db=>_0x2978db===_0x1bf184);this[_0x3c00c5(0x1f3)][_0x3c00c5(0x1cb)](_0x1bf184),this[_0x3c00c5(0x14a)][_0x3c00c5(0x15a)]({'matchesPosition':_0x1a5fe4+0x1});}else{const _0x456fca=this[_0x3c00c5(0x1fe)][_0x3c00c5(0x23c)],_0x14fd97=this[_0x3c00c5(0x1fe)][_0x3c00c5(0x1b4)](_0x4ca454=>_0x4ca454===this[_0x3c00c5(0x22c)]);for(let _0x32fceb=(_0x14fd97-0x1+_0x456fca)%_0x456fca;_0x32fceb!==_0x14fd97;){const _0x411f08=this[_0x3c00c5(0x1fe)][_0x32fceb],_0x830e0e=_0x411f08['moveToPreviousMatch']({'ignoreSelection':!0x0});if(_0x830e0e){this['_matchingModel']=_0x411f08,this['_markMatch'](_0x830e0e);return;}_0x32fceb=(_0x32fceb-0x1)%_0x456fca;}const _0x3e8c05=this[_0x3c00c5(0x22c)]['moveToPreviousMatch']({'ignoreSelection':!0x0});_0x3e8c05&&this[_0x3c00c5(0x173)](_0x3e8c05);}}[_0x36fa75(0x149)](_0x29dcfd,_0x160c3f=!0x1){const _0x1f2c3c=_0x36fa75;var _0x1bf5ab;const _0x4335e9=(_0x1bf5ab=this[_0x1f2c3c(0x157)][_0x1f2c3c(0x1e6)]())==null?void 0x0:_0x1bf5ab[_0x1f2c3c(0x25a)]();if(!_0x4335e9)return-0x1;const _0x5471e3=_0x29dcfd[_0x1f2c3c(0x1b4)](_0x3fd314=>_0x3fd314[_0x1f2c3c(0x187)]===_0x4335e9);if(_0x5471e3!==-0x1){this['_matchingModel']=_0x29dcfd[_0x5471e3];const _0x1d31b8=this[_0x1f2c3c(0x22c)][_0x1f2c3c(0x16d)]({'stayIfOnMatch':!0x0,'noFocus':_0x160c3f});if(_0x1d31b8)return this['_markMatch'](_0x1d31b8),_0x5471e3;}return this[_0x1f2c3c(0x13f)](_0x5471e3),0x0;}},_0x30fa37(_0x277107,'FindReplaceModel'),_0x277107);_0xe25e54=_0x3f60b2([_0x47f0a(0x2,_0x3df125[_0x36fa75(0x2b1)])],_0xe25e54);var _0x3860b5=(_0xbb938e=>(_0xbb938e['ROW']=_0x36fa75(0x29c),_0xbb938e[_0x36fa75(0x191)]=_0x36fa75(0x199),_0xbb938e))(_0x3860b5||{}),_0x2a2b00=(_0x32a7e6=>(_0x32a7e6['VALUE']=_0x36fa75(0x1c0),_0x32a7e6['FORMULA']=_0x36fa75(0x15e),_0x32a7e6))(_0x2a2b00||{}),_0x57da8d=(_0x45e47c=>(_0x45e47c[_0x36fa75(0x1b6)]=_0x36fa75(0x168),_0x45e47c[_0x36fa75(0x2a1)]=_0x36fa75(0x18c),_0x45e47c))(_0x57da8d||{});function _0x179935(){const _0x5d5713=_0x36fa75;return{'caseSensitive':!0x1,'findBy':_0x5d5713(0x1c0),'findCompleted':!0x1,'findDirection':_0x5d5713(0x29c),'findScope':_0x5d5713(0x168),'findString':'','inputtingFindString':'','matchesCount':0x0,'matchesPosition':0x0,'matchesTheWholeCell':!0x1,'replaceRevealed':!0x1,'replaceString':'','revealed':!0x0};}_0x30fa37(_0x179935,_0x36fa75(0x2a4));const _0x9aeba1=class _0x3d77c7{constructor(){const _0x5d6bf8=_0x36fa75;_0x265c3b(this,'_stateUpdates$',new _0x247e3b['Subject']()),_0x265c3b(this,'stateUpdates$',this[_0x5d6bf8(0x217)]['asObservable']()),_0x265c3b(this,_0x5d6bf8(0x20c),new _0x247e3b[(_0x5d6bf8(0x21a))](_0x179935())),_0x265c3b(this,_0x5d6bf8(0x266),this[_0x5d6bf8(0x20c)][_0x5d6bf8(0x2a5)]()),_0x265c3b(this,_0x5d6bf8(0x192),''),_0x265c3b(this,'_inputtingFindString',''),_0x265c3b(this,_0x5d6bf8(0x2aa),''),_0x265c3b(this,_0x5d6bf8(0x184),!0x1),_0x265c3b(this,_0x5d6bf8(0x176),!0x1),_0x265c3b(this,'_matchesPosition',0x0),_0x265c3b(this,_0x5d6bf8(0x148),0x0),_0x265c3b(this,_0x5d6bf8(0x291),!0x0),_0x265c3b(this,_0x5d6bf8(0x193),!0x1),_0x265c3b(this,_0x5d6bf8(0x19b),_0x5d6bf8(0x29c)),_0x265c3b(this,_0x5d6bf8(0x206),_0x5d6bf8(0x168)),_0x265c3b(this,_0x5d6bf8(0x222),_0x5d6bf8(0x1c0)),_0x265c3b(this,_0x5d6bf8(0x20a),!0x1);}get[_0x36fa75(0x145)](){const _0x318ed5=_0x36fa75;return this[_0x318ed5(0x20c)][_0x318ed5(0x140)]();}get[_0x36fa75(0x277)](){const _0x1db33e=_0x36fa75;return this[_0x1db33e(0x218)];}get[_0x36fa75(0x1c9)](){const _0x44aae8=_0x36fa75;return this[_0x44aae8(0x192)];}get[_0x36fa75(0x2a9)](){const _0x2d09ad=_0x36fa75;return this[_0x2d09ad(0x184)];}get[_0x36fa75(0x215)](){const _0x34b5e8=_0x36fa75;return this[_0x34b5e8(0x176)];}get[_0x36fa75(0x180)](){const _0x3ac66d=_0x36fa75;return this[_0x3ac66d(0x18b)];}get[_0x36fa75(0x1d7)](){const _0x1f2007=_0x36fa75;return this[_0x1f2007(0x148)];}get[_0x36fa75(0x27c)](){const _0x5c8003=_0x36fa75;return this[_0x5c8003(0x2aa)];}get[_0x36fa75(0x18e)](){return this['_caseSensitive'];}get[_0x36fa75(0x1af)](){return this['_matchesTheWholeCell'];}get['findDirection'](){const _0x25fe6c=_0x36fa75;return this[_0x25fe6c(0x19b)];}get['findScope'](){const _0x20d272=_0x36fa75;return this[_0x20d272(0x206)];}get[_0x36fa75(0x19c)](){return this['_findBy'];}get[_0x36fa75(0x2a7)](){const _0x254845=_0x36fa75;return this[_0x254845(0x20a)];}[_0x36fa75(0x15a)](_0x19fc51){const _0xceddc8=_0x36fa75;let _0x378edd=!0x1;const _0x1aff81={};typeof _0x19fc51[_0xceddc8(0x1c9)]<'u'&&_0x19fc51[_0xceddc8(0x1c9)]!==this['_findString']&&(this['_findString']=_0x19fc51[_0xceddc8(0x1c9)],_0x1aff81[_0xceddc8(0x1c9)]=this['_findString'],_0x378edd=!0x0),typeof _0x19fc51[_0xceddc8(0x2a9)]<'u'&&_0x19fc51['revealed']!==this[_0xceddc8(0x184)]&&(this['_revealed']=_0x19fc51[_0xceddc8(0x2a9)],_0x1aff81['revealed']=_0x19fc51['revealed'],_0x378edd=!0x0),typeof _0x19fc51[_0xceddc8(0x215)]<'u'&&_0x19fc51['replaceRevealed']!==this[_0xceddc8(0x176)]&&(this[_0xceddc8(0x176)]=_0x19fc51[_0xceddc8(0x215)],_0x1aff81[_0xceddc8(0x215)]=_0x19fc51[_0xceddc8(0x215)],_0x378edd=!0x0),typeof _0x19fc51['replaceString']<'u'&&_0x19fc51[_0xceddc8(0x27c)]!==this['_replaceString']&&(this[_0xceddc8(0x2aa)]=_0x19fc51[_0xceddc8(0x27c)],_0x1aff81[_0xceddc8(0x27c)]=_0x19fc51[_0xceddc8(0x27c)],_0x378edd=!0x0),typeof _0x19fc51[_0xceddc8(0x1d7)]<'u'&&_0x19fc51[_0xceddc8(0x1d7)]!==this[_0xceddc8(0x148)]&&(this[_0xceddc8(0x148)]=_0x19fc51[_0xceddc8(0x1d7)],_0x1aff81[_0xceddc8(0x1d7)]=_0x19fc51['matchesCount'],_0x378edd=!0x0),typeof _0x19fc51[_0xceddc8(0x180)]<'u'&&_0x19fc51['matchesPosition']!==this[_0xceddc8(0x18b)]&&(this[_0xceddc8(0x18b)]=_0x19fc51[_0xceddc8(0x180)],_0x1aff81[_0xceddc8(0x180)]=_0x19fc51[_0xceddc8(0x180)],_0x378edd=!0x0),typeof _0x19fc51[_0xceddc8(0x19c)]<'u'&&_0x19fc51[_0xceddc8(0x19c)]!==this['_findBy']&&(this['_findBy']=_0x19fc51['findBy'],_0x1aff81[_0xceddc8(0x19c)]=_0x19fc51['findBy'],_0x378edd=!0x0),typeof _0x19fc51[_0xceddc8(0x282)]<'u'&&_0x19fc51[_0xceddc8(0x282)]!==this[_0xceddc8(0x206)]&&(this[_0xceddc8(0x206)]=_0x19fc51['findScope'],_0x1aff81['findScope']=_0x19fc51[_0xceddc8(0x282)],_0x378edd=!0x0),typeof _0x19fc51[_0xceddc8(0x248)]<'u'&&_0x19fc51[_0xceddc8(0x248)]!==this[_0xceddc8(0x19b)]&&(this[_0xceddc8(0x19b)]=_0x19fc51[_0xceddc8(0x248)],_0x1aff81['findDirection']=_0x19fc51['findDirection'],_0x378edd=!0x0),typeof _0x19fc51[_0xceddc8(0x18e)]<'u'&&_0x19fc51['caseSensitive']!==this['_caseSensitive']&&(this[_0xceddc8(0x291)]=_0x19fc51['caseSensitive'],_0x1aff81[_0xceddc8(0x18e)]=_0x19fc51[_0xceddc8(0x18e)],_0x378edd=!0x0),typeof _0x19fc51[_0xceddc8(0x1af)]<'u'&&_0x19fc51['matchesTheWholeCell']!==this[_0xceddc8(0x193)]&&(this['_matchesTheWholeCell']=_0x19fc51['matchesTheWholeCell'],_0x1aff81[_0xceddc8(0x1af)]=_0x19fc51[_0xceddc8(0x1af)],_0x378edd=!0x0),typeof _0x19fc51[_0xceddc8(0x277)]<'u'&&_0x19fc51[_0xceddc8(0x277)]!==this[_0xceddc8(0x218)]&&(this[_0xceddc8(0x218)]=_0x19fc51[_0xceddc8(0x277)],_0x1aff81[_0xceddc8(0x277)]=_0x19fc51[_0xceddc8(0x277)],_0x378edd=!0x0),typeof _0x19fc51[_0xceddc8(0x2a7)]<'u'&&_0x19fc51[_0xceddc8(0x2a7)]!==this[_0xceddc8(0x20a)]&&(this[_0xceddc8(0x20a)]=_0x19fc51[_0xceddc8(0x2a7)],_0x1aff81['findCompleted']=_0x19fc51[_0xceddc8(0x2a7)],_0x378edd=!0x0),_0x378edd&&(this['_state$']['next']({'caseSensitive':this[_0xceddc8(0x291)],'findBy':this[_0xceddc8(0x222)],'findCompleted':this[_0xceddc8(0x20a)],'findDirection':this[_0xceddc8(0x19b)],'findScope':this['_findScope'],'findString':this[_0xceddc8(0x192)],'inputtingFindString':this[_0xceddc8(0x218)],'matchesCount':this[_0xceddc8(0x148)],'matchesPosition':this[_0xceddc8(0x18b)],'matchesTheWholeCell':this[_0xceddc8(0x193)],'replaceRevealed':this['_replaceRevealed'],'revealed':this[_0xceddc8(0x184)]}),this[_0xceddc8(0x217)]['next'](_0x1aff81));}};_0x30fa37(_0x9aeba1,'FindReplaceState');let _0x1c23cf=_0x9aeba1,_0x48e3f7=(_0x3fc222=class extends _0x3df125[_0x36fa75(0x13d)]{constructor(_0xf57812,_0x160183){const _0x3afae6=_0x36fa75;super(),_0x265c3b(this,'_providers',new Set()),_0x265c3b(this,_0x3afae6(0x14a),new _0x1c23cf()),_0x265c3b(this,_0x3afae6(0x1eb)),_0x265c3b(this,_0x3afae6(0x29b),new _0x247e3b[(_0x3afae6(0x21a))](null)),_0x265c3b(this,'currentMatch$',this[_0x3afae6(0x29b)][_0x3afae6(0x2a5)]()),_0x265c3b(this,'_replaceables$',new _0x247e3b['BehaviorSubject']([])),_0x265c3b(this,'replaceables$',this[_0x3afae6(0x1d0)][_0x3afae6(0x2a5)]()),_0x265c3b(this,_0x3afae6(0x14f),new _0x247e3b[(_0x3afae6(0x25d))]()),_0x265c3b(this,'focusSignal$',this[_0x3afae6(0x14f)]['asObservable']()),(this[_0x3afae6(0x1ee)]=_0xf57812,this[_0x3afae6(0x1e0)]=_0x160183);}get[_0x36fa75(0x283)](){const _0x4cb651=_0x36fa75;return this[_0x4cb651(0x14a)][_0x4cb651(0x283)];}get['state$'](){const _0x52994e=_0x36fa75;return this['_state'][_0x52994e(0x266)];}get[_0x36fa75(0x2a9)](){const _0x1acfd5=_0x36fa75;return this[_0x1acfd5(0x14a)][_0x1acfd5(0x2a9)];}get[_0x36fa75(0x215)](){const _0x505a61=_0x36fa75;return this[_0x505a61(0x14a)][_0x505a61(0x215)];}[_0x36fa75(0x225)](){const _0x43e037=_0x36fa75;super[_0x43e037(0x225)](),this[_0x43e037(0x29b)][_0x43e037(0x1cb)](null),this[_0x43e037(0x29b)][_0x43e037(0x1b0)](),this[_0x43e037(0x1d0)][_0x43e037(0x1cb)]([]),this[_0x43e037(0x1d0)][_0x43e037(0x1b0)](),this[_0x43e037(0x14f)][_0x43e037(0x1b0)]();}[_0x36fa75(0x22a)](){const _0x52a13f=_0x36fa75;var _0x2c45d0;return(_0x2c45d0=this['_model'])==null?void 0x0:_0x2c45d0[_0x52a13f(0x22a)]();}[_0x36fa75(0x254)](){const _0x36bcfc=_0x36fa75;return this['_state'][_0x36bcfc(0x1c9)];}[_0x36fa75(0x14b)](_0x528ad7){this['_state']['changeState']({'findString':_0x528ad7});}[_0x36fa75(0x26e)](){const _0x5e3ca3=_0x36fa75;this['_focusSignal$'][_0x5e3ca3(0x1cb)]();}[_0x36fa75(0x15d)](_0x2e08cb){const _0xbff2ef=_0x36fa75;_0x2e08cb?this['_state'][_0xbff2ef(0x15a)]({'inputtingFindString':_0x2e08cb}):this['_state'][_0xbff2ef(0x15a)]({'inputtingFindString':'','findString':''});}[_0x36fa75(0x21f)](_0x56b1cf){const _0x5a87f6=_0x36fa75;this[_0x5a87f6(0x14a)]['changeState']({'replaceString':_0x56b1cf});}[_0x36fa75(0x232)](_0x5e63c5){this['_state']['changeState']({'matchesTheWholeCell':_0x5e63c5});}['changeCaseSensitive'](_0x350698){const _0x82bc10=_0x36fa75;this[_0x82bc10(0x14a)]['changeState']({'caseSensitive':_0x350698});}[_0x36fa75(0x247)](_0x1823b9){const _0x5ece74=_0x36fa75;this[_0x5ece74(0x14a)][_0x5ece74(0x15a)]({'findBy':_0x1823b9}),this[_0x5ece74(0x1ab)](_0x1823b9===_0x5ece74(0x15e));}[_0x36fa75(0x290)](_0xc3297c){const _0x343f2d=_0x36fa75;this[_0x343f2d(0x14a)][_0x343f2d(0x15a)]({'findScope':_0xc3297c});}[_0x36fa75(0x166)](_0x8716b0){const _0x27d2f0=_0x36fa75;this['_state'][_0x27d2f0(0x15a)]({'findDirection':_0x8716b0});}[_0x36fa75(0x16d)](){const _0x18ea66=_0x36fa75;this['_model']&&(this[_0x18ea66(0x14a)][_0x18ea66(0x215)]&&!this[_0x18ea66(0x1eb)]['searched']?(this[_0x18ea66(0x14a)][_0x18ea66(0x15a)]({'findString':this[_0x18ea66(0x14a)][_0x18ea66(0x277)]}),this['_model'][_0x18ea66(0x233)]()):this[_0x18ea66(0x1eb)]['moveToNextMatch'](),this[_0x18ea66(0x14f)]['next']());}[_0x36fa75(0x1c6)](){const _0x56e155=_0x36fa75;this[_0x56e155(0x1eb)]&&(this[_0x56e155(0x14a)][_0x56e155(0x215)]&&!this[_0x56e155(0x1eb)][_0x56e155(0x1fa)]?(this[_0x56e155(0x14a)][_0x56e155(0x15a)]({'findString':this[_0x56e155(0x14a)]['inputtingFindString']}),this[_0x56e155(0x1eb)]['start']()):this[_0x56e155(0x1eb)][_0x56e155(0x1c6)](),this[_0x56e155(0x14f)][_0x56e155(0x1cb)]());}async[_0x36fa75(0x204)](){const _0x5ef67f=_0x36fa75;return this['_model']?this[_0x5ef67f(0x1eb)]['replace']():!0x1;}async[_0x36fa75(0x25b)](){const _0x4ec5c7=_0x36fa75;if(!this[_0x4ec5c7(0x1eb)])throw new Error(_0x4ec5c7(0x28d));return this['_model']['replaceAll']();}[_0x36fa75(0x202)](){const _0x4a8725=_0x36fa75;this['_state'][_0x4a8725(0x15a)]({'replaceRevealed':!0x0,'inputtingFindString':this[_0x4a8725(0x14a)]['findString']}),this[_0x4a8725(0x22d)](!0x0);}[_0x36fa75(0x233)](_0x5331f7=!0x1){const _0x2d64d3=_0x36fa75;if(this[_0x2d64d3(0x159)]['size']===0x0)return!0x1;this[_0x2d64d3(0x1eb)]=this['_injector']['createInstance'](_0xe25e54,this[_0x2d64d3(0x14a)],this[_0x2d64d3(0x159)]),this['_model']['currentMatch$'][_0x2d64d3(0x261)](_0x4cfec5=>this['_currentMatch$']['next'](_0x4cfec5)),this[_0x2d64d3(0x1eb)][_0x2d64d3(0x1e7)][_0x2d64d3(0x261)](_0x3d60ba=>this[_0x2d64d3(0x1d0)]['next'](_0x3d60ba));const _0x42a3de=_0x179935();return _0x5331f7&&(_0x42a3de[_0x2d64d3(0x215)]=!0x0),this[_0x2d64d3(0x14a)][_0x2d64d3(0x15a)](_0x42a3de),this[_0x2d64d3(0x22d)](_0x5331f7),!0x0;}[_0x36fa75(0x24b)](){const _0x49b21b=_0x36fa75;var _0x3a4a2d;(_0x3a4a2d=this[_0x49b21b(0x1eb)])==null||_0x3a4a2d['start']();}['terminate'](){const _0x3ad6f0=_0x36fa75;var _0x51b222;(_0x51b222=this[_0x3ad6f0(0x1eb)])==null||_0x51b222[_0x3ad6f0(0x225)](),this[_0x3ad6f0(0x1eb)]=null,this['_toggleDisplayRawFormula'](!0x1),this['_toggleRevealReplace'](!0x1);}['registerFindReplaceProvider'](_0x276e1d){const _0x1a6e54=_0x36fa75;return this[_0x1a6e54(0x159)][_0x1a6e54(0x1d2)](_0x276e1d),_0x3df125[_0x1a6e54(0x295)](()=>this[_0x1a6e54(0x159)]['delete'](_0x276e1d));}[_0x36fa75(0x22d)](_0xbe9f39){const _0x3d7abd=_0x36fa75;this[_0x3d7abd(0x1e0)][_0x3d7abd(0x263)](_0x1a0800,_0xbe9f39);}[_0x36fa75(0x1ab)](_0x394f80){const _0x5a7650=_0x36fa75;this[_0x5a7650(0x1e0)][_0x5a7650(0x263)](_0x45a359[_0x5a7650(0x14c)],_0x394f80);}},_0x30fa37(_0x3fc222,_0x36fa75(0x1de)),_0x3fc222);_0x48e3f7=_0x3f60b2([_0x47f0a(0x0,_0x3df125[_0x36fa75(0x226)](_0x3df125[_0x36fa75(0x162)])),_0x47f0a(0x1,_0x3df125['IContextService'])],_0x48e3f7);const _0x97c447={'id':_0x36fa75(0x1c7),'type':_0x3df125[_0x36fa75(0x1d5)][_0x36fa75(0x17f)],'handler':_0x30fa37(_0x1d34f5=>_0x1d34f5['get'](_0x37084e)[_0x36fa75(0x204)](),_0x36fa75(0x214))},_0x52a3f2=_0x36fa75(0x294),_0x51c628={'id':_0x36fa75(0x298),'type':_0x3df125['CommandType']['COMMAND'],'handler':_0x30fa37(async _0x4bd092=>{const _0x13495d=_0x36fa75,_0x47c9e5=_0x4bd092[_0x13495d(0x265)](_0x136642[_0x13495d(0x260)]),_0x962004=_0x4bd092[_0x13495d(0x265)](_0x3df125[_0x13495d(0x142)]),_0x46e966=_0x4bd092[_0x13495d(0x265)](_0x136642[_0x13495d(0x1f9)]);if(!await _0x47c9e5[_0x13495d(0x238)]({'id':_0x52a3f2,'title':{'title':_0x962004['t'](_0x13495d(0x29d))},'cancelText':_0x962004['t'](_0x13495d(0x21c)),'confirmText':_0x962004['t'](_0x13495d(0x16e))}))return!0x1;const _0x4935bf=await _0x4bd092[_0x13495d(0x265)](_0x37084e)[_0x13495d(0x25b)](),{success:_0x5b4571,failure:_0x42965c}=_0x4935bf;return _0x42965c>0x0?(_0x5b4571===0x0?_0x46e966['show']({'type':_0x4810f5['MessageType']['Error'],'content':_0x962004['t']('find-replace.replace.all-failure')}):_0x46e966[_0x13495d(0x15f)]({'type':_0x4810f5[_0x13495d(0x1c4)][_0x13495d(0x209)],'content':_0x962004['t'](_0x13495d(0x1dd),''+_0x5b4571,''+_0x42965c)}),!0x1):(_0x46e966[_0x13495d(0x15f)]({'type':_0x4810f5['MessageType'][_0x13495d(0x20f)],'content':_0x962004['t']('find-replace.replace.all-success',''+_0x5b4571)}),!0x0);},_0x36fa75(0x214))},_0x1dbe1c={'id':'ui.operation.open-find-dialog','type':_0x3df125[_0x36fa75(0x1d5)][_0x36fa75(0x284)],'handler':_0x30fa37(_0x4e190f=>{const _0x354336=_0x36fa75,_0x42913b=_0x4e190f[_0x354336(0x265)](_0x37084e);return _0x42913b[_0x354336(0x2a9)]?_0x42913b['focusFindInput']():_0x42913b[_0x354336(0x233)](),!0x0;},_0x36fa75(0x214))},_0x5b0650={'id':_0x36fa75(0x1e8),'type':_0x3df125[_0x36fa75(0x1d5)][_0x36fa75(0x284)],'handler':_0x30fa37(_0x1471b9=>{const _0x3ebbdc=_0x36fa75,_0xaacf52=_0x1471b9[_0x3ebbdc(0x265)](_0x37084e);return _0xaacf52['revealed']?_0xaacf52['replaceRevealed']?_0xaacf52['focusFindInput']():_0xaacf52['revealReplace']():_0xaacf52[_0x3ebbdc(0x233)](!0x0),!0x0;},_0x36fa75(0x214))},_0x35530d={'type':_0x3df125[_0x36fa75(0x1d5)][_0x36fa75(0x284)],'id':_0x36fa75(0x236),'handler':_0x30fa37(_0x3df02a=>(_0x3df02a[_0x36fa75(0x265)](_0x37084e)['moveToNextMatch'](),!0x0),_0x36fa75(0x214))},_0x592b90={'type':_0x3df125[_0x36fa75(0x1d5)]['OPERATION'],'id':_0x36fa75(0x15c),'handler':_0x30fa37(_0x55f39f=>(_0x55f39f[_0x36fa75(0x265)](_0x37084e)[_0x36fa75(0x1c6)](),!0x0),_0x36fa75(0x214))};var _0x441914={'exports':{}},_0x3a517d={},_0x2ec442=_0x18172c,_0x3b3161=Symbol[_0x36fa75(0x26f)]('react.element'),_0x5567cc=Symbol[_0x36fa75(0x26f)](_0x36fa75(0x258)),_0x55d1b1=Object[_0x36fa75(0x1ae)][_0x36fa75(0x178)],_0x276e4b=_0x2ec442[_0x36fa75(0x20b)][_0x36fa75(0x270)],_0x3b39cb={'key':!0x0,'ref':!0x0,'__self':!0x0,'__source':!0x0};function _0xdcd5be(_0x1ca006,_0x13fdaa,_0x2147e4){const _0xaebc01=_0x36fa75;var _0x4b7625,_0x1f05ae={},_0x5bbbb9=null,_0x448844=null;_0x2147e4!==void 0x0&&(_0x5bbbb9=''+_0x2147e4),_0x13fdaa[_0xaebc01(0x288)]!==void 0x0&&(_0x5bbbb9=''+_0x13fdaa[_0xaebc01(0x288)]),_0x13fdaa['ref']!==void 0x0&&(_0x448844=_0x13fdaa[_0xaebc01(0x1fc)]);for(_0x4b7625 in _0x13fdaa)_0x55d1b1['call'](_0x13fdaa,_0x4b7625)&&!_0x3b39cb[_0xaebc01(0x178)](_0x4b7625)&&(_0x1f05ae[_0x4b7625]=_0x13fdaa[_0x4b7625]);if(_0x1ca006&&_0x1ca006[_0xaebc01(0x27f)]){for(_0x4b7625 in(_0x13fdaa=_0x1ca006['defaultProps'],_0x13fdaa))_0x1f05ae[_0x4b7625]===void 0x0&&(_0x1f05ae[_0x4b7625]=_0x13fdaa[_0x4b7625]);}return{'$$typeof':_0x3b3161,'type':_0x1ca006,'key':_0x5bbbb9,'ref':_0x448844,'props':_0x1f05ae,'_owner':_0x276e4b[_0xaebc01(0x196)]};}_0x30fa37(_0xdcd5be,'q'),_0x3a517d[_0x36fa75(0x1b3)]=_0x5567cc,_0x3a517d['jsx']=_0xdcd5be,_0x3a517d[_0x36fa75(0x194)]=_0xdcd5be,_0x441914[_0x36fa75(0x2a6)]=_0x3a517d;var _0x4ecebe=_0x441914[_0x36fa75(0x2a6)];function _0x4dfaf7(_0x2728e5){const _0x578dc3=_0x36fa75,{findCompleted:_0x1b7da0,localeService:_0x35a851,matchesCount:_0x36ae55,matchesPosition:_0x211f73,findString:_0x5572c0,findReplaceService:_0x402c13,onChange:_0x33ca5e,..._0x11648e}=_0x2728e5,_0x13ffb3=_0x1b7da0&&_0x36ae55===0x0?_0x35a851['t'](_0x578dc3(0x24e)):_0x36ae55===0x0?'\x20':void 0x0;return _0x4ecebe['jsx'](_0x4810f5['InputWithSlot'],{'autoFocus':!0x0,'placeholder':_0x35a851['t'](_0x578dc3(0x17d)),'slot':_0x4ecebe[_0x578dc3(0x213)](_0x4810f5[_0x578dc3(0x174)],{'loop':!0x0,'text':_0x13ffb3,'value':_0x211f73,'total':_0x36ae55,'onChange':_0x30fa37(_0x317f31=>{const _0x4c9bf2=_0x578dc3;_0x211f73===_0x36ae55&&_0x317f31===0x1?_0x402c13[_0x4c9bf2(0x16d)]():_0x211f73===0x1&&_0x317f31===_0x36ae55||_0x317f31<_0x211f73?_0x402c13[_0x4c9bf2(0x1c6)]():_0x402c13[_0x4c9bf2(0x16d)]();},'onChange')}),'value':_0x5572c0,'onChange':_0x30fa37(_0x18dcad=>_0x33ca5e==null?void 0x0:_0x33ca5e(_0x18dcad),'onChange'),..._0x11648e});}_0x30fa37(_0x4dfaf7,_0x36fa75(0x14d));const _0x39b76a={'findReplaceDialogContainer':'univer-find-replace-dialog-container','findReplaceExpandContainer':'univer-find-replace-expand-container','buttonText':'univer-button-text','findReplaceButtonsGroup':'univer-find-replace-buttons-group','findReplaceButtonsGroupRight':'univer-find-replace-buttons-group-right'};function _0x593bd2(_0x1ecb3e,_0x60f245){const _0x3ccc66=_0x36fa75,_0x5b422d=_0x18172c['useCallback'](()=>{const _0x2b3e36=_0x3161;var _0x9295ec;(_0x9295ec=document[_0x2b3e36(0x269)](_0x2b3e36(0x2af)))==null||_0x9295ec['focus']();},[]),_0x5230a0=_0x18172c[_0x3ccc66(0x179)](()=>{const _0x9c9d76=_0x3ccc66,_0x332ed7=document[_0x9c9d76(0x289)]('.univer-find-replace-dialog-container\x20.univer-select-selection-search-input');return Array[_0x9c9d76(0x1ad)](_0x332ed7)[_0x9c9d76(0x235)](_0x329f4b=>_0x329f4b===document['activeElement']);},[]);return _0x18172c['useImperativeHandle'](_0x60f245,()=>({'focus':_0x5b422d,'selectHasFocus':_0x5230a0})),_0x18172c['useEffect'](()=>{const _0x57075b=_0x3ccc66,_0xa4b016=_0x1ecb3e[_0x57075b(0x1e5)]['subscribe'](()=>_0x5b422d());return()=>_0xa4b016[_0x57075b(0x1a0)]();},[_0x1ecb3e,_0x5b422d]),{'focus':_0x5b422d,'selectHasFocus':_0x5230a0};}_0x30fa37(_0x593bd2,_0x36fa75(0x28a));const _0x449239=_0x18172c[_0x36fa75(0x20d)](_0x30fa37(function(_0x118a77,_0x1ac14a){const _0x5612af=_0x36fa75,_0x5087d4=_0x3df125['useDependency'](_0x3df125[_0x5612af(0x142)]),_0x211e3e=_0x3df125['useDependency'](_0x37084e),_0x53fa3b=_0x3df125[_0x5612af(0x25e)](_0x3df125[_0x5612af(0x185)]),_0x247762=_0x136642[_0x5612af(0x280)](_0x211e3e[_0x5612af(0x266)],void 0x0,!0x0),{findCompleted:_0x2ca661,findString:_0x5e0f72,matchesCount:_0x55a4a0,matchesPosition:_0x20369f}=_0x247762,_0x222293=_0x18172c[_0x5612af(0x179)](()=>{const _0x3ad690=_0x5612af;_0x53fa3b[_0x3ad690(0x29a)](_0x5b0650['id']);},[_0x53fa3b]),_0x420f32=_0x18172c[_0x5612af(0x179)](_0x1ed69e=>_0x211e3e['changeFindString'](_0x1ed69e),[_0x211e3e]);return _0x593bd2(_0x211e3e,_0x1ac14a),_0x4ecebe[_0x5612af(0x194)](_0x18172c['Fragment'],{'children':[_0x4ecebe[_0x5612af(0x213)](_0x4dfaf7,{'findCompleted':_0x2ca661,'className':_0x5612af(0x19a),'matchesCount':_0x55a4a0,'matchesPosition':_0x20369f,'findReplaceService':_0x211e3e,'localeService':_0x5087d4,'findString':_0x5e0f72,'onChange':_0x420f32}),_0x4ecebe['jsx'](_0x5612af(0x144),{'className':_0x39b76a[_0x5612af(0x1f0)],'children':_0x4ecebe[_0x5612af(0x213)](_0x4810f5[_0x5612af(0x262)],{'type':'text','size':'small','onClick':_0x222293,'children':_0x5087d4['t'](_0x5612af(0x1bf))})})]});},'FindDialogImpl')),_0xfafaf=_0x18172c[_0x36fa75(0x20d)](_0x30fa37(function(_0x3adadc,_0x20613a){const _0x5dc528=_0x36fa75,_0x31a5f3=_0x3df125[_0x5dc528(0x25e)](_0x37084e),_0x3a682b=_0x3df125[_0x5dc528(0x25e)](_0x3df125[_0x5dc528(0x142)]),_0x1f8a7a=_0x3df125[_0x5dc528(0x25e)](_0x3df125[_0x5dc528(0x185)]),_0x156628=_0x3df125[_0x5dc528(0x25e)](_0x136642[_0x5dc528(0x1f9)]),_0x196c99=_0x136642[_0x5dc528(0x280)](_0x31a5f3['currentMatch$'],void 0x0,!0x0),_0x1fab73=_0x136642[_0x5dc528(0x280)](_0x31a5f3['replaceables$'],void 0x0,!0x0),_0x462b6c=_0x136642[_0x5dc528(0x280)](_0x31a5f3['state$'],void 0x0,!0x0),{matchesCount:_0x194eca,matchesPosition:_0x4ef5ca,findString:_0x3c21be,inputtingFindString:_0x1c3260,replaceString:_0x3c55e0,caseSensitive:_0x517f72,matchesTheWholeCell:_0x13e596,findDirection:_0x3bdcb8,findScope:_0x25e5b4,findBy:_0x1e2738,findCompleted:_0x3efea7}=_0x462b6c,_0x1014a5=_0x1c3260[_0x5dc528(0x23c)]===0x0,_0xa2e08c=_0x194eca===0x0||!(_0x196c99!=null&&_0x196c99[_0x5dc528(0x245)]),_0x36b5b6=_0x1fab73['length']===0x0,_0x2a96e3=_0x18172c[_0x5dc528(0x179)](_0x3178a3=>_0x31a5f3[_0x5dc528(0x15d)](_0x3178a3),[_0x31a5f3]),_0x4e4006=_0x18172c['useCallback'](_0x2ac7f2=>_0x31a5f3[_0x5dc528(0x21f)](_0x2ac7f2),[_0x31a5f3]),{focus:_0x1c9d6d}=_0x593bd2(_0x31a5f3,_0x20613a),_0x1696fc=_0x18172c[_0x5dc528(0x179)](()=>{const _0x21ed40=_0x5dc528;_0x3c21be===_0x1c3260?_0x31a5f3['moveToNextMatch']():(_0x31a5f3[_0x21ed40(0x14b)](_0x1c3260),_0x31a5f3[_0x21ed40(0x24b)]());},[_0x3c21be,_0x1c3260,_0x31a5f3]),_0x822d5b=_0x18172c[_0x5dc528(0x179)](()=>_0x1f8a7a[_0x5dc528(0x29a)](_0x97c447['id']),[_0x1f8a7a]),_0x42b580=_0x18172c['useCallback'](async()=>{await _0x1f8a7a['executeCommand'](_0x51c628['id']),_0x1c9d6d();},[_0x1f8a7a]),_0x4614f1=_0x18172c[_0x5dc528(0x179)](_0x323463=>{const _0x44471c=_0x5dc528;_0x31a5f3[_0x44471c(0x166)](_0x323463);},[_0x31a5f3]),_0x157332=_0x18172c[_0x5dc528(0x179)](_0x452806=>{const _0x40e0a8=_0x5dc528;_0x31a5f3[_0x40e0a8(0x290)](_0x452806);},[_0x31a5f3]),_0x5af355=_0x18172c['useCallback'](_0x48ac98=>{const _0x850194=_0x5dc528;_0x31a5f3[_0x850194(0x247)](_0x48ac98);},[_0x31a5f3]),_0x319566=_0x5d0c32(_0x3a682b),_0x245718=_0x3e17c2(_0x3a682b),_0x2f0e56=_0x345729(_0x3a682b);return _0x18172c[_0x5dc528(0x18d)](()=>{const _0x398f1b=_0x5dc528,_0x5a5dff=_0x3efea7&&_0x194eca===0x0;let _0x5848fd=null;return _0x5a5dff&&(_0x5848fd=_0x156628['show']({'content':_0x3a682b['t'](_0x398f1b(0x18f)),'type':_0x4810f5[_0x398f1b(0x1c4)]['Warning'],'duration':0x1388})),()=>_0x5848fd==null?void 0x0:_0x5848fd[_0x398f1b(0x225)]();},[_0x3efea7,_0x194eca,_0x156628,_0x3a682b]),_0x4ecebe[_0x5dc528(0x194)](_0x18172c[_0x5dc528(0x1b3)],{'children':[_0x4ecebe[_0x5dc528(0x213)](_0x4810f5[_0x5dc528(0x170)],{'label':_0x3a682b['t'](_0x5dc528(0x16c)),'children':_0x4ecebe[_0x5dc528(0x213)](_0x4dfaf7,{'findCompleted':_0x3efea7,'className':'univer-find-input','matchesCount':_0x194eca,'matchesPosition':_0x4ef5ca,'findReplaceService':_0x31a5f3,'localeService':_0x3a682b,'findString':_0x1c3260,'onChange':_0x2a96e3})}),_0x4ecebe[_0x5dc528(0x213)](_0x4810f5[_0x5dc528(0x170)],{'label':_0x3a682b['t'](_0x5dc528(0x228)),'children':_0x4ecebe[_0x5dc528(0x213)](_0x4810f5[_0x5dc528(0x147)],{'placeholder':_0x3a682b['t']('find-replace.dialog.replace-placeholder'),'value':_0x3c55e0,'onChange':_0x30fa37(_0x27a31f=>_0x4e4006(_0x27a31f),_0x5dc528(0x1d1))})}),_0x4ecebe[_0x5dc528(0x213)](_0x4810f5['FormLayout'],{'label':_0x3a682b['t'](_0x5dc528(0x1ca)),'children':_0x4ecebe[_0x5dc528(0x213)](_0x4810f5[_0x5dc528(0x143)],{'value':_0x3bdcb8,'options':_0x245718,'onChange':_0x4614f1})}),_0x4ecebe[_0x5dc528(0x213)](_0x4810f5['FormDualColumnLayout'],{'children':_0x4ecebe[_0x5dc528(0x194)](_0x18172c[_0x5dc528(0x1b3)],{'children':[_0x4ecebe[_0x5dc528(0x213)](_0x4810f5['FormLayout'],{'label':_0x3a682b['t']('find-replace.dialog.find-scope.title'),'children':_0x4ecebe['jsx'](_0x4810f5[_0x5dc528(0x143)],{'value':_0x25e5b4,'options':_0x319566,'onChange':_0x157332})}),_0x4ecebe[_0x5dc528(0x213)](_0x4810f5[_0x5dc528(0x170)],{'label':_0x3a682b['t'](_0x5dc528(0x255)),'children':_0x4ecebe[_0x5dc528(0x213)](_0x4810f5['Select'],{'value':_0x1e2738,'options':_0x2f0e56,'onChange':_0x5af355})})]})}),_0x4ecebe[_0x5dc528(0x213)](_0x4810f5[_0x5dc528(0x242)],{'children':_0x4ecebe[_0x5dc528(0x194)](_0x18172c['Fragment'],{'children':[_0x4ecebe['jsx'](_0x4810f5[_0x5dc528(0x170)],{'children':_0x4ecebe['jsx'](_0x4810f5[_0x5dc528(0x257)],{'checked':_0x517f72,'onChange':_0x30fa37(_0x363b1f=>{const _0x20ade5=_0x5dc528;_0x31a5f3[_0x20ade5(0x19d)](_0x363b1f);},_0x5dc528(0x1d1)),'children':_0x3a682b['t'](_0x5dc528(0x22e))})}),_0x4ecebe[_0x5dc528(0x213)](_0x4810f5[_0x5dc528(0x170)],{'children':_0x4ecebe[_0x5dc528(0x213)](_0x4810f5[_0x5dc528(0x257)],{'checked':_0x13e596,'onChange':_0x30fa37(_0x1fff62=>{_0x31a5f3['changeMatchesTheWholeCell'](_0x1fff62);},_0x5dc528(0x1d1)),'children':_0x3a682b['t'](_0x5dc528(0x227))})})]})}),_0x4ecebe[_0x5dc528(0x194)](_0x5dc528(0x144),{'className':_0x39b76a[_0x5dc528(0x2ad)],'children':[_0x4ecebe[_0x5dc528(0x213)](_0x4810f5[_0x5dc528(0x262)],{'type':_0x5dc528(0x271),'onClick':_0x1696fc,'disabled':_0x1014a5,'children':_0x3a682b['t'](_0x5dc528(0x16c))}),_0x4ecebe[_0x5dc528(0x194)]('span',{'className':_0x39b76a[_0x5dc528(0x256)],'children':[_0x4ecebe['jsx'](_0x4810f5['Button'],{'disabled':_0xa2e08c,'onClick':_0x822d5b,'children':_0x3a682b['t'](_0x5dc528(0x228))}),_0x4ecebe['jsx'](_0x4810f5[_0x5dc528(0x262)],{'disabled':_0x36b5b6,'onClick':_0x42b580,'children':_0x3a682b['t'](_0x5dc528(0x251))})]})]})]});},_0x36fa75(0x26a)));function _0x588d48(){const _0x57cece=_0x36fa75,_0xe9a626=_0x3df125[_0x57cece(0x25e)](_0x37084e),_0x5d1ae6=_0x3df125['useDependency'](_0x136642[_0x57cece(0x276)]),_0xdf33d=_0x3df125['useDependency'](_0x3df125[_0x57cece(0x1bc)]),_0x55dd1a=_0x136642[_0x57cece(0x280)](_0xe9a626[_0x57cece(0x266)],void 0x0,!0x0),_0x1da2bf=_0x18172c[_0x57cece(0x1cf)](null);_0x18172c[_0x57cece(0x18d)](()=>{const _0x348cf9=_0x57cece;let _0xe6efe4;return _0x1da2bf['current']&&(_0xe6efe4=_0x5d1ae6[_0x348cf9(0x259)](_0x1da2bf['current'])),()=>_0xe6efe4==null?void 0x0:_0xe6efe4['dispose']();},[_0x5d1ae6]);const _0x53df24=_0x18172c[_0x57cece(0x1cf)](null),_0x4d3d4e=_0x18172c[_0x57cece(0x179)](_0x25e401=>_0xdf33d[_0x57cece(0x263)](_0x2fd148,_0x25e401),[_0xdf33d]),_0x33c915=_0x18172c[_0x57cece(0x179)](_0x3f8699=>_0xdf33d[_0x57cece(0x263)](_0x530b03,_0x3f8699),[_0xdf33d]);return _0x18172c[_0x57cece(0x18d)](()=>{const _0x171219=_0x57cece;var _0x5b3328;const _0x48f9db=_0x247e3b[_0x171219(0x287)](document,'focusin')[_0x171219(0x261)](_0x4b27cd=>{const _0x4b4664=_0x171219;var _0x3628fd;_0x4b27cd[_0x4b4664(0x264)]&&((_0x3628fd=_0x1da2bf[_0x4b4664(0x196)])!=null&&_0x3628fd[_0x4b4664(0x160)](_0x4b27cd[_0x4b4664(0x264)]))?_0x4d3d4e(!0x0):_0x4d3d4e(!0x1),!_0x53df24[_0x4b4664(0x196)]||!_0x53df24['current'][_0x4b4664(0x1bb)]()?_0x33c915(!0x0):_0x33c915(!0x1);});return(_0x5b3328=_0x53df24['current'])==null||_0x5b3328[_0x171219(0x2b0)](),_0x4d3d4e(!0x0),_0x33c915(!0x0),()=>{const _0x58e505=_0x171219;_0x48f9db[_0x58e505(0x1a0)](),_0x4d3d4e(!0x1);};},[_0x4d3d4e,_0x33c915]),_0x4ecebe[_0x57cece(0x213)](_0x57cece(0x144),{'className':_0x39b76a[_0x57cece(0x19f)],'ref':_0x1da2bf,'children':_0x55dd1a[_0x57cece(0x215)]?_0x4ecebe[_0x57cece(0x213)](_0xfafaf,{'ref':_0x53df24}):_0x4ecebe['jsx'](_0x449239,{'ref':_0x53df24})});}_0x30fa37(_0x588d48,_0x36fa75(0x164));function _0x5d0c32(_0x5d4d3c){const _0x21b6f1=_0x36fa75,_0x1aaee5=_0x5d4d3c[_0x21b6f1(0x200)]();return _0x18172c[_0x21b6f1(0x224)](()=>[{'label':_0x5d4d3c['t'](_0x21b6f1(0x15b)),'value':_0x57da8d[_0x21b6f1(0x1b6)]},{'label':_0x5d4d3c['t'](_0x21b6f1(0x1a4)),'value':_0x57da8d[_0x21b6f1(0x2a1)]}],[_0x1aaee5]);}_0x30fa37(_0x5d0c32,_0x36fa75(0x167));function _0x3e17c2(_0x2fc77b){const _0x405092=_0x36fa75,_0xa6a8b5=_0x2fc77b['getCurrentLocale']();return _0x18172c[_0x405092(0x224)](()=>[{'label':_0x2fc77b['t'](_0x405092(0x28f)),'value':_0x3860b5['ROW']},{'label':_0x2fc77b['t'](_0x405092(0x1ec)),'value':_0x3860b5[_0x405092(0x191)]}],[_0xa6a8b5]);}_0x30fa37(_0x3e17c2,_0x36fa75(0x1e9));function _0x345729(_0x597234){const _0x5675f0=_0x36fa75,_0x7e31f6=_0x597234[_0x5675f0(0x200)]();return _0x18172c['useMemo'](()=>[{'label':_0x597234['t']('find-replace.dialog.find-by.value'),'value':_0x2a2b00['VALUE']},{'label':_0x597234['t'](_0x5675f0(0x1be)),'value':_0x2a2b00['FORMULA']}],[_0x7e31f6]);}_0x30fa37(_0x345729,'useFindByOptions');function _0x4d80a8(_0x2b0be1){const _0x989107=_0x36fa75;return _0x2b0be1[_0x989107(0x24f)](_0x2fd148);}_0x30fa37(_0x4d80a8,_0x36fa75(0x1c5));function _0x31b2ac(_0x4f119d){const _0x5a8909=_0x36fa75;return _0x4f119d[_0x5a8909(0x24f)](_0x1a0800);}_0x30fa37(_0x31b2ac,'whenReplaceRevealed');function _0x110bec(_0x1863b9){const _0x4adeab=_0x36fa75;return _0x1863b9[_0x4adeab(0x24f)](_0x530b03);}_0x30fa37(_0x110bec,_0x36fa75(0x208));const _0x4c4fd8=_0x36fa75(0x1c2);function _0x5781bd(_0x3b34d0){const _0x46a782=_0x36fa75;return _0x3b34d0[_0x46a782(0x24f)](_0x3df125[_0x46a782(0x146)]);}_0x30fa37(_0x5781bd,'whenSheetFocused');function _0x5e2310(_0x1bbdd3){const _0x180757=_0x36fa75;return!_0x1bbdd3[_0x180757(0x24f)](_0x3df125[_0x180757(0x274)]);}_0x30fa37(_0x5e2310,_0x36fa75(0x23e));const _0x4ebbc5={'id':_0x1dbe1c['id'],'description':'find-replace.shortcut.open-find-dialog','binding':_0x136642['KeyCode']['F']|_0x136642['MetaKeys'][_0x36fa75(0x1c8)],'group':_0x4c4fd8,'preconditions'(_0x3f921f){return!_0x4d80a8(_0x3f921f)&&_0x5781bd(_0x3f921f)&&_0x5e2310(_0x3f921f);}},_0x3a6202={'id':_0x1dbe1c['id'],'description':_0x36fa75(0x1d4),'binding':_0x136642[_0x36fa75(0x241)]['F']|_0x136642[_0x36fa75(0x1df)]['CTRL_COMMAND'],'mac':_0x136642[_0x36fa75(0x241)]['F']|_0x136642['MetaKeys']['MAC_CTRL'],'preconditions'(_0x3c972d){return!_0x4d80a8(_0x3c972d)&&_0x5781bd(_0x3c972d)&&_0x5e2310(_0x3c972d);}},_0x147dd8={'id':_0x5b0650['id'],'description':_0x36fa75(0x278),'binding':_0x136642[_0x36fa75(0x241)]['H']|_0x136642[_0x36fa75(0x1df)][_0x36fa75(0x1c8)],'mac':_0x136642[_0x36fa75(0x241)]['H']|_0x136642[_0x36fa75(0x1df)]['MAC_CTRL'],'group':_0x4c4fd8,'preconditions'(_0x11c4da){return _0x5781bd(_0x11c4da)&&_0x5e2310(_0x11c4da)&&(!_0x4d80a8(_0x11c4da)||!_0x31b2ac(_0x11c4da));}},_0x3f24e1={'id':_0x35530d['id'],'description':_0x36fa75(0x1a3),'binding':_0x136642['KeyCode'][_0x36fa75(0x24d)],'group':_0x4c4fd8,'priority':0x3e8,'preconditions'(_0x3ee929){return _0x110bec(_0x3ee929)&&_0x4d80a8(_0x3ee929);}},_0x94a81e={'id':_0x592b90['id'],'description':_0x36fa75(0x297),'binding':_0x136642['KeyCode'][_0x36fa75(0x24d)]|_0x136642['MetaKeys'][_0x36fa75(0x24a)],'group':_0x4c4fd8,'priority':0x3e8,'preconditions'(_0x3b19c1){return _0x110bec(_0x3b19c1)&&_0x4d80a8(_0x3b19c1);}};function _0x21bbee(_0x53cfa3){const _0x1f60e4=_0x36fa75,_0xbed4ac=_0x53cfa3[_0x1f60e4(0x265)](_0x3df125[_0x1f60e4(0x1bc)]);return{'id':_0x1dbe1c['id'],'icon':'SearchIcon','tooltip':_0x1f60e4(0x201),'type':_0x136642[_0x1f60e4(0x155)][_0x1f60e4(0x21b)],'hidden$':_0x136642[_0x1f60e4(0x190)](_0x53cfa3,_0x3df125['UniverInstanceType'][_0x1f60e4(0x16a)]),'disabled$':_0x247e3b[_0x1f60e4(0x1db)]([_0xbed4ac[_0x1f60e4(0x1c3)](_0x3df125[_0x1f60e4(0x274)]),_0xbed4ac[_0x1f60e4(0x1c3)](_0x3df125[_0x1f60e4(0x146)])])['pipe'](_0x247e3b[_0x1f60e4(0x18a)](([_0x97c5e0,_0x428d52])=>_0x97c5e0||!_0x428d52))};}_0x30fa37(_0x21bbee,_0x36fa75(0x2ac));const _0x3d08be={[_0x136642[_0x36fa75(0x17e)]['OTHERS']]:{[_0x1dbe1c['id']]:{'order':0x2,'menuItemFactory':_0x21bbee}}};var _0x26eed4=Object['defineProperty'],_0x12029a=Object[_0x36fa75(0x279)],_0x8ec74e=_0x30fa37((_0x5c292e,_0x1c1142,_0x5d43c4,_0x442b08)=>{for(var _0x5409b2=_0x442b08>0x1?void 0x0:_0x442b08?_0x12029a(_0x1c1142,_0x5d43c4):_0x1c1142,_0x5d81ca=_0x5c292e['length']-0x1,_0x54b7eb;_0x5d81ca>=0x0;_0x5d81ca--)(_0x54b7eb=_0x5c292e[_0x5d81ca])&&(_0x5409b2=(_0x442b08?_0x54b7eb(_0x1c1142,_0x5d43c4,_0x5409b2):_0x54b7eb(_0x5409b2))||_0x5409b2);return _0x442b08&&_0x5409b2&&_0x26eed4(_0x1c1142,_0x5d43c4,_0x5409b2),_0x5409b2;},_0x36fa75(0x219)),_0x192b52=_0x30fa37((_0x3c2113,_0x2b78d1)=>(_0x1018f5,_0x292d74)=>_0x2b78d1(_0x1018f5,_0x292d74,_0x3c2113),_0x36fa75(0x1a5));const _0x4c76e3=_0x36fa75(0x203),_0x2257b5=0x15e,_0x36b4fd=0x14,_0x260e2e=-0x5a;_0x391c53[_0x36fa75(0x2a8)]=(_0x4a2426=class extends _0x3df125[_0x36fa75(0x244)]{constructor(_0x4b0446,_0x1409c6,_0xc59418,_0x23fba8,_0x9e81e6,_0x186c93,_0x5a406d,_0x486cb5,_0x22e087,_0x4f498d){const _0x4646f9=_0x36fa75;super(),_0x265c3b(this,'_closingListenerDisposable'),(this[_0x4646f9(0x157)]=_0x4b0446,this[_0x4646f9(0x182)]=_0x1409c6,this[_0x4646f9(0x212)]=_0xc59418,this[_0x4646f9(0x1f8)]=_0x23fba8,this[_0x4646f9(0x2ae)]=_0x9e81e6,this['_dialogService']=_0x186c93,this[_0x4646f9(0x19e)]=_0x5a406d,this[_0x4646f9(0x1c1)]=_0x486cb5,this[_0x4646f9(0x230)]=_0x22e087,this['_injector']=_0x4f498d,this[_0x4646f9(0x23b)](),this[_0x4646f9(0x29e)](),this[_0x4646f9(0x156)]());}['dispose'](){const _0x3289de=_0x36fa75;var _0x401e91;super[_0x3289de(0x225)](),(_0x401e91=this[_0x3289de(0x195)])==null||_0x401e91[_0x3289de(0x225)](),this[_0x3289de(0x195)]=null;}[_0x36fa75(0x23b)](){const _0x1640f2=_0x36fa75;[_0x1dbe1c,_0x5b0650,_0x35530d,_0x592b90,_0x51c628,_0x97c447][_0x1640f2(0x293)](_0x4a8d39=>{const _0x10c424=_0x1640f2;this[_0x10c424(0x240)](this[_0x10c424(0x1f8)]['registerCommand'](_0x4a8d39));});}[_0x36fa75(0x156)](){const _0x1664c5=_0x36fa75;[_0x147dd8,_0x4ebbc5,_0x3a6202,_0x94a81e,_0x3f24e1][_0x1664c5(0x293)](_0x5e37b0=>this['disposeWithMe'](this[_0x1664c5(0x212)][_0x1664c5(0x281)](_0x5e37b0)));}[_0x36fa75(0x29e)](){const _0x3ee177=_0x36fa75;this[_0x3ee177(0x240)](this[_0x3ee177(0x230)][_0x3ee177(0x223)](_0x3ee177(0x164),_0x588d48)),this[_0x3ee177(0x240)](this[_0x3ee177(0x230)][_0x3ee177(0x223)](_0x3ee177(0x1ba),_0x1c9cae)),this[_0x3ee177(0x182)][_0x3ee177(0x249)](_0x3d08be),this[_0x3ee177(0x2ae)][_0x3ee177(0x283)][_0x3ee177(0x13e)](_0x247e3b[_0x3ee177(0x189)](this[_0x3ee177(0x172)]))['subscribe'](_0x4b6a5f=>{const _0x8ec47b=_0x3ee177;_0x4b6a5f[_0x8ec47b(0x2a9)]===!0x0&&this[_0x8ec47b(0x234)]();});}[_0x36fa75(0x234)](){const _0x1be0c3=_0x36fa75;this[_0x1be0c3(0x1b1)][_0x1be0c3(0x16f)]({'id':_0x4c76e3,'draggable':!0x0,'width':_0x2257b5,'title':{'title':this[_0x1be0c3(0x1c1)]['t']('find-replace.dialog.title')},'children':{'label':_0x1be0c3(0x164)},'destroyOnClose':!0x0,'defaultPosition':_0x296144(),'preservePositionOnDestroy':!0x0,'onClose':_0x30fa37(()=>this[_0x1be0c3(0x1f4)](),'onClose')}),this[_0x1be0c3(0x195)]=_0x3df125[_0x1be0c3(0x295)](this[_0x1be0c3(0x157)][_0x1be0c3(0x253)][_0x1be0c3(0x13e)](_0x247e3b['takeUntil'](this['dispose$']))[_0x1be0c3(0x261)](_0xbdc348=>{const _0x20ca72=_0x1be0c3;(!_0xbdc348||!this[_0x20ca72(0x157)][_0x20ca72(0x1cc)](_0xbdc348))&&this['closePanel']();}));}[_0x36fa75(0x1f4)](){const _0x12599d=_0x36fa75;this[_0x12599d(0x195)]&&(this[_0x12599d(0x195)][_0x12599d(0x225)](),this[_0x12599d(0x195)]=null,this[_0x12599d(0x1b1)][_0x12599d(0x1d3)](_0x4c76e3),this['_findReplaceService'][_0x12599d(0x1a1)](),queueMicrotask(()=>this[_0x12599d(0x19e)]['focus']()));}},_0x30fa37(_0x4a2426,_0x36fa75(0x2a8)),_0x4a2426),_0x391c53[_0x36fa75(0x2a8)]=_0x8ec74e([_0x192b52(0x0,_0x3df125['IUniverInstanceService']),_0x192b52(0x1,_0x136642[_0x36fa75(0x229)]),_0x192b52(0x2,_0x136642[_0x36fa75(0x1ea)]),_0x192b52(0x3,_0x3df125[_0x36fa75(0x185)]),_0x192b52(0x4,_0x37084e),_0x192b52(0x5,_0x136642[_0x36fa75(0x296)]),_0x192b52(0x6,_0x136642[_0x36fa75(0x276)]),_0x192b52(0x7,_0x3df125[_0x36fa75(0x226)](_0x3df125[_0x36fa75(0x142)])),_0x192b52(0x8,_0x3df125[_0x36fa75(0x226)](_0x136642[_0x36fa75(0x175)])),_0x192b52(0x9,_0x3df125[_0x36fa75(0x226)](_0x3df125[_0x36fa75(0x162)]))],_0x391c53[_0x36fa75(0x2a8)]);function _0x296144(){const {innerWidth:_0x10478f}=window;return{'x':(_0x10478f-_0x2257b5)/0x2-_0x36b4fd,'y':_0x260e2e};}_0x30fa37(_0x296144,_0x36fa75(0x26b));var _0x4de56b=Object['defineProperty'],_0x582e6a=Object[_0x36fa75(0x279)],_0x6b6ef5=_0x30fa37((_0x24c55f,_0x466a59,_0x787b31,_0x4d492a)=>{const _0x2559e6=_0x36fa75;for(var _0x403a26=_0x4d492a>0x1?void 0x0:_0x4d492a?_0x582e6a(_0x466a59,_0x787b31):_0x466a59,_0x40f3e8=_0x24c55f[_0x2559e6(0x23c)]-0x1,_0x14fece;_0x40f3e8>=0x0;_0x40f3e8--)(_0x14fece=_0x24c55f[_0x40f3e8])&&(_0x403a26=(_0x4d492a?_0x14fece(_0x466a59,_0x787b31,_0x403a26):_0x14fece(_0x403a26))||_0x403a26);return _0x4d492a&&_0x403a26&&_0x4de56b(_0x466a59,_0x787b31,_0x403a26),_0x403a26;},_0x36fa75(0x1d9)),_0x29411c=_0x30fa37((_0x23c9e4,_0x4a9ede)=>(_0xf156f8,_0x3706b7)=>_0x4a9ede(_0xf156f8,_0x3706b7,_0x23c9e4),'__decorateParam');const _0x456261=_0x36fa75(0x1d8);_0x391c53[_0x36fa75(0x163)]=(_0x169696=class extends _0x3df125[_0x36fa75(0x27a)]{constructor(_0x5ddbe5=_0x4bb47d,_0x5e7259,_0x4ca7f0){const _0x16412c=_0x36fa75;super(),this[_0x16412c(0x1f2)]=_0x5ddbe5,this[_0x16412c(0x1ee)]=_0x5e7259,this[_0x16412c(0x250)]=_0x4ca7f0;const {..._0x35fd56}=this[_0x16412c(0x1f2)];this[_0x16412c(0x250)][_0x16412c(0x23d)](_0x5db77e,_0x35fd56);}[_0x36fa75(0x13b)](){const _0x5a2a0d=_0x36fa75;[[_0x391c53[_0x5a2a0d(0x2a8)]],[_0x37084e,{'useClass':_0x48e3f7}]][_0x5a2a0d(0x293)](_0x56ecdf=>this[_0x5a2a0d(0x1ee)]['add'](_0x56ecdf));}[_0x36fa75(0x151)](){const _0x4d9e3d=_0x36fa75;this[_0x4d9e3d(0x1ee)][_0x4d9e3d(0x265)](_0x391c53[_0x4d9e3d(0x2a8)]);}},_0x30fa37(_0x169696,_0x36fa75(0x163)),_0x265c3b(_0x169696,_0x36fa75(0x1ac),_0x456261),_0x169696),_0x391c53[_0x36fa75(0x163)]=_0x6b6ef5([_0x29411c(0x1,_0x3df125['Inject'](_0x3df125[_0x36fa75(0x162)])),_0x29411c(0x2,_0x3df125[_0x36fa75(0x1b9)])],_0x391c53[_0x36fa75(0x163)]),_0x391c53[_0x36fa75(0x1f7)]=_0x2a2b00,_0x391c53[_0x36fa75(0x181)]=_0x3860b5,_0x391c53['FindModel']=_0x3d9f7c,_0x391c53['FindScope']=_0x57da8d,_0x391c53['GoToNextMatchOperation']=_0x35530d,_0x391c53[_0x36fa75(0x1ff)]=_0x592b90,_0x391c53['IFindReplaceService']=_0x37084e,_0x391c53['OpenFindDialogOperation']=_0x1dbe1c,_0x391c53['OpenReplaceDialogOperation']=_0x5b0650,_0x391c53['ReplaceAllMatchesCommand']=_0x51c628,_0x391c53['ReplaceCurrentMatchCommand']=_0x97c447,Object[_0x36fa75(0x28c)](_0x391c53,Symbol['toStringTag'],{'value':_0x36fa75(0x1e4)});}));function _0x3161(_0x4dc47e,_0x5bf026){const _0x85235e=_0x8523();return _0x3161=function(_0x31612e,_0x33d89d){_0x31612e=_0x31612e-0x13b;let _0x23a475=_0x85235e[_0x31612e];return _0x23a475;},_0x3161(_0x4dc47e,_0x5bf026);}function _0x8523(){const _0x5190ae=['throttleTime','_config','currentMatch$','closePanel','1570AczLMO','createIdentifier','FindBy','_commandService','IMessageService','searched','random','ref','244CBLzya','_findModels','GoToPreviousMatchOperation','getCurrentLocale','find-replace.toolbar','revealReplace','DESKTOP_FIND_REPLACE_DIALOG','replace','2016520byPZbQ','_findScope','currentColor','whenFindReplaceInputFocused','Warning','_findCompleted','__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED','_state$','forwardRef','debounceTime','Success','children','DisposableCollection','_shortcutService','jsx','handler','replaceRevealed','alpha','_stateUpdates$','_inputtingFindString','__decorateClass$1','BehaviorSubject','BUTTON','button.cancel','_stopSearching','success','changeReplaceString','univerjs-icon\x20univerjs-icon-','assign','_findBy','register','useMemo','dispose','Inject','find-replace.dialog.match-the-whole-cell','find-replace.dialog.replace','IMenuManagerService','getCurrentMatch','then','_matchingModel','_toggleRevealReplace','find-replace.dialog.case-sensitive','xlink:href','_componentManager','defs','changeMatchesTheWholeCell','start','_openPanel','some','ui.operation.go-to-next-match','evenodd','confirm','generateShortUuid','6082840SYhsHW','_initCommands','length','setConfig','whenEditorNotActivated','find-replace.config','disposeWithMe','KeyCode','FormDualColumnLayout','displayName','RxDisposable','replaceable','all','changeFindBy','findDirection','mergeMenu','SHIFT','find','SearchSingle16','ENTER','find-replace.dialog.no-result','getContextValue','_configService','find-replace.dialog.replace-all','tag','focused$','getFindString','find-replace.dialog.find-by.title','findReplaceButtonsGroupRight','Checkbox','react.fragment','registerContainerElement','getUnitId','replaceAll','@univerjs/core','Subject','useDependency','436956eFudJJ','IConfirmService','subscribe','Button','setContextValue','target','get','state$','FIND_REPLACE_INPUT_FOCUS','reduce','querySelector','ReplaceDIalogImpl','getFindReplaceDialogDefaultPosition','_matches','colorChannel1','focusFindInput','for','ReactCurrentOwner','primary','extend','react','EDITOR_ACTIVATED','React','ILayoutService','inputtingFindString','find-replace.shortcut.open-replace-dialog','getOwnPropertyDescriptor','Plugin','38qDdWZO','replaceString','use','__decorateParam$2','defaultProps','useObservable','registerShortcut','findScope','stateUpdates$','OPERATION','UniverFindReplace','rxjs','fromEvent','key','querySelectorAll','useFindInputFocus','_subscribeToModelsChanges','defineProperty','[FindReplaceService]\x20replaceAll:\x20model\x20is\x20not\x20initialized!','UniverEngineRender','find-replace.dialog.find-direction.row','changeFindScope','_caseSensitive','_currentSearchingDisposables','forEach','CONFIRM_REPLACE_ALL','toDisposable','IDialogService','find-replace.shortcut.go-to-previous-match','ui.command.replace-all-matches','M0.9\x200.09H16.9V16.09H0.9z','executeCommand','_currentMatch$','row','find-replace.replace.confirm.title','_initUI','1em','getMatches','UNIT','0\x200\x2017\x2017','icon','createInitFindReplaceState','asObservable','exports','findCompleted','FindReplaceController','revealed','_replaceString','M2.39551\x207.37266C2.39551\x204.18105\x204.98281\x201.59375\x208.17441\x201.59375C11.366\x201.59375\x2013.9533\x204.18105\x2013.9533\x207.37266C13.9533\x208.72342\x2013.4898\x209.96603\x2012.7133\x2010.95L15.1964\x2013.4331C15.4619\x2013.6986\x2015.4619\x2014.1291\x2015.1964\x2014.3946C14.9309\x2014.6601\x2014.5004\x2014.6601\x2014.2349\x2014.3946L11.7518\x2011.9115C10.7678\x2012.6881\x209.52525\x2013.1516\x208.17441\x2013.1516C4.98281\x2013.1516\x202.39551\x2010.5642\x202.39551\x207.37266ZM8.17441\x202.95349C5.73378\x202.95349\x203.75525\x204.93202\x203.75525\x207.37266C3.75525\x209.81333\x205.73378\x2011.7918\x208.17441\x2011.7918C10.6151\x2011.7918\x2012.5936\x209.81333\x2012.5936\x207.37266C12.5936\x204.93202\x2010.6151\x202.95349\x208.17441\x202.95349Z','FindReplaceMenuItemFactory','findReplaceButtonsGroup','_findReplaceService','.univer-find-input\x20input','focus','IUniverInstanceService','onStarting','defIds','Disposable','pipe','_moveToNextUnitMatch','getValue','indexOf','LocaleService','Select','div','state','FOCUSING_SHEET','Input','_matchesCount','_moveToInitialMatch','_state','changeFindString','RENDER_RAW_FORMULA_KEY','SearchInput','#D9D9D9','_focusSignal$','flat','onRendered','name','activelyChangingMatch$','createElement','MenuItemType','_initShortcuts','_univerInstanceService','className','_providers','changeState','find-replace.dialog.find-scope.current-sheet','ui.operation.go-to-previous-match','changeInputtingFindString','formula','show','contains','symbol','Injector','UniverFindReplacePlugin','FindReplaceDialog','filter','changeFindDirection','useFindScopeOptions','subunit','find-replace.service','UNIVER_SHEET','toString','find-replace.dialog.find','moveToNextMatch','button.confirm','open','FormLayout','concat','dispose$','_markMatch','Pager','ComponentManager','_replaceRevealed','call','hasOwnProperty','useCallback','49DceBEc','propertyIsEnumerable','fill','find-replace.dialog.find-placeholder','RibbonStartGroup','COMMAND','matchesPosition','FindDirection','_menuManagerService','substring','_revealed','ICommandService','string','unitId','attrs','takeUntil','map','_matchesPosition','unit','useEffect','caseSensitive','find-replace.dialog.no-match','getMenuHiddenObservable','COLUMN','_findString','_matchesTheWholeCell','jsxs','_closingListenerDisposable','current','failure','_startSearching','column','univer-find-input','_findDirection','findBy','changeCaseSensitive','_layoutService','findReplaceDialogContainer','unsubscribe','terminate','UniverUi','find-replace.shortcut.go-to-next-match','find-replace.dialog.find-scope.workbook','__decorateParam$1','@univerjs/design','shouldStateUpdateTriggerResearch','render','647604dpIoLt','@univerjs/engine-render','_toggleDisplayRawFormula','pluginName','from','prototype','matchesTheWholeCell','complete','_dialogService','mask','Fragment','findIndex','mask0_217_40','SUBUNIT','trim','path','IConfigService','SearchIcon','selectHasFocus','IContextService','UniverCore','find-replace.dialog.find-by.formula','find-replace.dialog.advanced-finding','value','_localeService','7_find-replace-shortcuts','subscribeContextValue$','MessageType','whenFindReplaceDialogFocused','moveToPreviousMatch','ui.command.replace-current-match','CTRL_COMMAND','findString','find-replace.dialog.find-direction.title','next','getUniverSheetInstance','object','UniverDesign','useRef','_replaceables$','onChange','add','close','find-replace.shortcut.open-find-dialog','CommandType','idSuffix','matchesCount','UNIVER_FIND_REPLACE_PLUGIN','__decorateClass','function','combineLatest','2738024jLKzXC','find-replace.replace.partial-success','FindReplaceService','MetaKeys','_contextService','@univerjs/ui','amd','44937kkrrNN','Module','focusSignal$','getFocusedUnit','replaceables$','ui.operation.open-replace-dialog','useFindDirectionOptions','IShortcutService','_model','find-replace.dialog.find-direction.column','search-single-16','_injector','entries','findReplaceExpandContainer'];_0x8523=function(){return _0x5190ae;};return _0x8523();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs/find-replace",
3
- "version": "0.3.0-alpha.0",
3
+ "version": "0.3.0-nightly.202410101606",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -49,18 +49,18 @@
49
49
  "peerDependencies": {
50
50
  "react": "^16.9.0 || ^17.0.0 || ^18.0.0",
51
51
  "rxjs": ">=7.0.0",
52
- "@univerjs/core": "0.3.0-alpha.0",
53
- "@univerjs/design": "0.3.0-alpha.0",
54
- "@univerjs/ui": "0.3.0-alpha.0",
55
- "@univerjs/engine-render": "0.3.0-alpha.0"
52
+ "@univerjs/core": "0.3.0-nightly.202410101606",
53
+ "@univerjs/design": "0.3.0-nightly.202410101606",
54
+ "@univerjs/engine-render": "0.3.0-nightly.202410101606",
55
+ "@univerjs/ui": "0.3.0-nightly.202410101606"
56
56
  },
57
57
  "dependencies": {
58
58
  "@univerjs/icons": "^0.1.78",
59
- "@univerjs/core": "0.3.0-alpha.0",
60
- "@univerjs/design": "0.3.0-alpha.0",
61
- "@univerjs/engine-formula": "0.3.0-alpha.0",
62
- "@univerjs/engine-render": "0.3.0-alpha.0",
63
- "@univerjs/ui": "0.3.0-alpha.0"
59
+ "@univerjs/core": "0.3.0-nightly.202410101606",
60
+ "@univerjs/design": "0.3.0-nightly.202410101606",
61
+ "@univerjs/engine-render": "0.3.0-nightly.202410101606",
62
+ "@univerjs/ui": "0.3.0-nightly.202410101606",
63
+ "@univerjs/engine-formula": "0.3.0-nightly.202410101606"
64
64
  },
65
65
  "devDependencies": {
66
66
  "less": "^4.2.0",
@@ -69,7 +69,7 @@
69
69
  "typescript": "^5.6.2",
70
70
  "vite": "^5.4.8",
71
71
  "vitest": "^2.1.1",
72
- "@univerjs-infra/shared": "0.3.0-alpha.0"
72
+ "@univerjs-infra/shared": "0.3.0"
73
73
  },
74
74
  "univerSpace": {
75
75
  ".": {
@@ -90,7 +90,6 @@
90
90
  "test:watch": "vitest",
91
91
  "coverage": "vitest run --coverage",
92
92
  "lint:types": "tsc --noEmit",
93
- "build": "tsc && vite build",
94
- "sync:cnpm": "cnpm sync"
93
+ "build": "tsc && vite build"
95
94
  }
96
95
  }
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