@univerjs/sheets-sort-ui 0.3.0-alpha.1 → 0.3.0-nightly.202410101606

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- "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);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const core=require("@univerjs/core"),sheetsSort=require("@univerjs/sheets-sort"),sheets=require("@univerjs/sheets"),React=require("react"),ui=require("@univerjs/ui"),rxjs=require("rxjs"),design=require("@univerjs/design"),engineFormula=require("@univerjs/engine-formula"),sheetsUi=require("@univerjs/sheets-ui"),extendConfirmContent="univer-extend-confirm-content",extendConfirmRadioGroup="univer-extend-confirm-radio-group",customSortPanelContainer="univer-custom-sort-panel-container",customSortPanelExt="univer-custom-sort-panel-ext",addCondition="univer-add-condition",addConditionText="univer-add-condition-text",addConditionDisable="univer-add-condition-disable",customSortPanelFooter="univer-custom-sort-panel-footer",customSortPanelFooterBtn="univer-custom-sort-panel-footer-btn",customSortPanelItem="univer-custom-sort-panel-item",customSortPanelItemHead="univer-custom-sort-panel-item-head",customSortPanelItemHandler="univer-custom-sort-panel-item-handler",customSortPanelItemRemove="univer-custom-sort-panel-item-remove",customSortPanelItemColumnInput="univer-custom-sort-panel-item-column-input",customSortPanelItemColumnInputDropdown="univer-custom-sort-panel-item-column-input-dropdown",customSortPanelItemColumnInputText="univer-custom-sort-panel-item-column-input-text",customSortPanelItemOrderRadio="univer-custom-sort-panel-item-order-radio",customSortPanelItemOrderRadioCn="univer-custom-sort-panel-item-order-radio-cn",conditionList="univer-condition-list",embedSortBtnContainer="univer-embed-sort-btn-container",embedSortBtn="univer-embed-sort-btn",embedSortBtnAsc="univer-embed-sort-btn-asc",embedSortBtnDesc="univer-embed-sort-btn-desc",embedSortBtnIcon="univer-embed-sort-btn-icon",customSortColMenu="univer-custom-sort-col-menu",customSortColMenuItem="univer-custom-sort-col-menu-item",customSortColMenuItemDesc="univer-custom-sort-col-menu-item-desc",styles={extendConfirmContent,extendConfirmRadioGroup,customSortPanelContainer,customSortPanelExt,addCondition,addConditionText,addConditionDisable,customSortPanelFooter,customSortPanelFooterBtn,customSortPanelItem,customSortPanelItemHead,customSortPanelItemHandler,customSortPanelItemRemove,customSortPanelItemColumnInput,customSortPanelItemColumnInputDropdown,customSortPanelItemColumnInputText,customSortPanelItemOrderRadio,customSortPanelItemOrderRadioCn,conditionList,embedSortBtnContainer,embedSortBtn,embedSortBtnAsc,embedSortBtnDesc,embedSortBtnIcon,customSortColMenu,customSortColMenuItem,customSortColMenuItemDesc},ExtendConfirm=__name(props=>{const[extend,setExtend]=React.useState("0"),localeService=core.useDependency(core.LocaleService);return React.createElement("div",{className:styles.extendConfirmContent},React.createElement("div",{className:"extend-confirm-desc"},localeService.t("sheets-sort.dialog.sort-reminder-desc")),React.createElement(design.RadioGroup,{className:styles.extendConfirmRadioGroup,value:extend,direction:"vertical",onChange:__name(value=>{setExtend(value),props.onChange(value)},"onChange")},React.createElement(design.Radio,{value:"0"},localeService.t("sheets-sort.dialog.sort-reminder-no")),React.createElement(design.Radio,{value:"1"},localeService.t("sheets-sort.dialog.sort-reminder-ext"))))},"ExtendConfirm");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 SORT_ERROR_MESSAGE={MERGE_ERROR:"sheets-sort.error.merge-size",EMPTY_ERROR:"sheets-sort.error.empty",SINGLE_ERROR:"sheets-sort.error.single",FORMULA_ARRAY:"sheets-sort.error.formula-array"};var _a;let SheetsSortUIService=(_a=class extends core.Disposable{constructor(_univerInstanceService,_confirmService,_logService,_selectionManagerService,_sheetsSortService,_localeService,_commandService){super();__publicField(this,"_customSortState$",new rxjs.BehaviorSubject(null));__publicField(this,"customSortState$",this._customSortState$.asObservable());this._univerInstanceService=_univerInstanceService,this._confirmService=_confirmService,this._logService=_logService,this._selectionManagerService=_selectionManagerService,this._sheetsSortService=_sheetsSortService,this._localeService=_localeService,this._commandService=_commandService}async triggerSortDirectly(asc,extend,sheetRangeLocation){const location=sheetRangeLocation||await this._detectSortLocation(extend);if(!location||!this._check(location))return!1;const sortOption={orderRules:[{type:asc?sheetsSort.SortType.ASC:sheetsSort.SortType.DESC,colIndex:location.colIndex}],range:location.range};return this._sheetsSortService.applySort(sortOption,location.unitId,location.subUnitId),!0}async triggerSortCustomize(){const location=await this._detectSortLocation();return!location||!this._check(location)?!1:(this.showCustomSortPanel(location),!0)}customSortState(){return this._customSortState$.getValue()}getTitles(hasTitle){var _a4,_b;const location=(_a4=this.customSortState())==null?void 0:_a4.location;if(!location)return[];const{unitId,subUnitId,range}=location,worksheet=(_b=this._univerInstanceService.getUnit(unitId))==null?void 0:_b.getSheetBySheetId(subUnitId);if(!worksheet)return[];const colTranslator=colIndexTranslator(this._localeService);return Array.from({length:range.endColumn-range.startColumn+1},(_,i)=>{var _a5;const cellValue=(_a5=worksheet.getCell(range.startRow,i+range.startColumn))==null?void 0:_a5.v;return{index:i+range.startColumn,label:hasTitle?`${cellValue!=null?cellValue:colTranslator(i+range.startColumn)}`:colTranslator(i+range.startColumn)}})}setSelection(unitId,subUnitId,range){var _a4;const worksheet=(_a4=this._univerInstanceService.getUnit(unitId))==null?void 0:_a4.getSheetBySheetId(subUnitId);if(!worksheet)return;const setSelectionsOperationParams={unitId,subUnitId,selections:[{range,primary:sheets.getPrimaryForRange(range,worksheet),style:null}]};this._commandService.executeCommand(sheets.SetSelectionsOperation.id,setSelectionsOperationParams)}async showCheckError(content){return await this._confirmService.confirm({id:"sort-range-check-error",title:{title:this._localeService.t("info.tooltip")},children:{title:React.createElement("div",null,this._localeService.t(content))}})}async showExtendConfirm(){let shouldExtend=!1;return await this._confirmService.confirm({id:"extend-sort-range-dialog",title:{title:this._localeService.t("sheets-sort.dialog.sort-reminder")},children:{title:React.createElement(ExtendConfirm,{onChange:__name(value=>{shouldExtend=value==="1"},"onChange")})},width:400})?shouldExtend?"extend":"keep":"cancel"}showCustomSortPanel(location){this._customSortState$.next({location,show:!0})}closeCustomSortPanel(){this._customSortState$.next({show:!1})}_check(location){return this._sheetsSortService.singleCheck(location)?this._sheetsSortService.mergeCheck(location)?this._sheetsSortService.formulaCheck(location)?this._sheetsSortService.emptyCheck(location)?!0:(this.showCheckError(SORT_ERROR_MESSAGE.EMPTY_ERROR),!1):(this.showCheckError(SORT_ERROR_MESSAGE.FORMULA_ARRAY),!1):(this.showCheckError(SORT_ERROR_MESSAGE.MERGE_ERROR),!1):(this.showCheckError(SORT_ERROR_MESSAGE.SINGLE_ERROR),!1)}async _detectSortLocation(extend){const workbook=this._univerInstanceService.getCurrentUnitForType(core.UniverInstanceType.UNIVER_SHEET),worksheet=workbook.getActiveSheet(),unitId=workbook.getUnitId(),subUnitId=worksheet.getSheetId(),selection=this._selectionManagerService.getCurrentLastSelection();if(!selection)return null;let range;if(extend===!0)range=sheets.expandToContinuousRange(selection.range,{up:!0,down:!0,left:!0,right:!0},worksheet),this.setSelection(unitId,subUnitId,range);else if(extend===!1)range=selection.range;else{const confirmRes=await this.showExtendConfirm();if(confirmRes==="cancel")return null;confirmRes==="keep"?range=selection.range:(range=sheets.expandToContinuousRange(selection.range,{up:!0,down:!0,left:!0,right:!0},worksheet),this.setSelection(unitId,subUnitId,range))}return{range,unitId,subUnitId,colIndex:selection.primary.actualColumn}}},__name(_a,"SheetsSortUIService"),_a);SheetsSortUIService=__decorateClass$2([core.OnLifecycle(core.LifecycleStages.Ready,sheetsSort.SheetsSortService),__decorateParam$2(0,core.IUniverInstanceService),__decorateParam$2(1,ui.IConfirmService),__decorateParam$2(2,core.ILogService),__decorateParam$2(3,core.Inject(sheets.SheetsSelectionsService)),__decorateParam$2(4,core.Inject(sheetsSort.SheetsSortService)),__decorateParam$2(5,core.Inject(core.LocaleService)),__decorateParam$2(6,core.ICommandService)],SheetsSortUIService);function colIndexTranslator(localeService){return colIndex=>{const colName=core.Tools.chatAtABC(colIndex);switch(localeService.getCurrentLocale()){case core.LocaleType.ZH_CN:return`"${colName}"列`;case core.LocaleType.EN_US:return`Column "${colName}"`;default:return`Column "${colName}"`}}}__name(colIndexTranslator,"colIndexTranslator");var __assign=function(){return __assign=Object.assign||function(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&(t[p]=s[p])}return t},__assign.apply(this,arguments)},__rest=function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t},IconBase=React.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=React.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 React.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(_a4){var key=_a4[0],value=_a4[1];typeof value=="string"&&(attrs[key]=value.replace(/url\(#(.*)\)/,"url(#$1".concat(runtimeProps.idSuffix,")")))})),attrs}__name(replaceRuntimeIdsAndExtInAttrs,"replaceRuntimeIdsAndExtInAttrs");function replaceRuntimeIdsInDefs(node,runtimeProps){var _a4,defIds=runtimeProps.defIds;return!defIds||defIds.length===0?node:node.tag==="defs"&&(!((_a4=node.children)===null||_a4===void 0)&&_a4.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$9={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M12.4208 14.4667C12.4208 14.798 12.1522 15.0667 11.8208 15.0667C11.4895 15.0667 11.2208 14.798 11.2208 14.4667V2.98193L9.97861 4.22417C9.7443 4.45848 9.3644 4.45848 9.13008 4.22417C8.89577 3.98985 8.89577 3.60995 9.13008 3.37564L11.3967 1.10897C11.6311 0.874657 12.011 0.874657 12.2453 1.10897L14.5119 3.37564C14.7463 3.60995 14.7463 3.98985 14.5119 4.22417C14.2776 4.45848 13.8977 4.45848 13.6634 4.22417L12.4208 2.9816V14.4667Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M1.98967 10.2798C1.6583 10.2798 1.38967 10.0112 1.38967 9.67983 1.38967 9.34846 1.6583 9.07983 1.98967 9.07983H6.50138C6.74406 9.07983 6.96284 9.22602 7.05571 9.45022 7.14858 9.67443 7.09725 9.9325 6.92565 10.1041L3.43819 13.5916H6.50138C6.83276 13.5916 7.10138 13.8602 7.10138 14.1916 7.10138 14.5229 6.83276 14.7916 6.50138 14.7916H1.98967C1.74699 14.7916 1.52821 14.6454 1.43534 14.4212 1.34247 14.197 1.3938 13.9389 1.5654 13.7673L5.05286 10.2798H1.98967zM5.1846 1.86439C4.8641.989866 3.62725.989866 3.30674 1.86439L1.34882 7.20672C1.23479 7.51786 1.39458 7.86252 1.70571 7.97655 2.01684 8.09058 2.3615 7.93079 2.47553 7.61966L3.06159 6.02055 3.06338 6.02056H5.42975L6.01581 7.61966C6.12984 7.93079 6.4745 8.09058 6.78563 7.97655 7.09677 7.86252 7.25655 7.51786 7.14252 7.20672L5.1846 1.86439zM4.98996 4.82056L4.24567 2.78971 3.50138 4.82056H4.98996z",fillRule:"evenodd",clipRule:"evenodd"}}]},AscendingSingle=React.forwardRef(function(props,ref){return React.createElement(IconBase,Object.assign({},props,{id:"ascending- single",ref,icon:element$9}))});AscendingSingle.displayName="AscendingSingle";var element$8={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M14.1544 3.75557C14.3887 3.98988 14.3887 4.36978 14.1544 4.6041L6.51409 12.2444C6.40157 12.3569 6.24896 12.4201 6.08983 12.4201C5.9307 12.4201 5.77808 12.3569 5.66556 12.2444L1.84541 8.42425C1.6111 8.18993 1.6111 7.81003 1.84541 7.57572C2.07973 7.34141 2.45963 7.34141 2.69394 7.57572L6.08983 10.9716L13.3059 3.75557C13.5402 3.52126 13.9201 3.52126 14.1544 3.75557Z",fillRule:"evenodd",clipRule:"evenodd"}}]},CheckMarkSingle=React.forwardRef(function(props,ref){return React.createElement(IconBase,Object.assign({},props,{id:"check-mark-single",ref,icon:element$8}))});CheckMarkSingle.displayName="CheckMarkSingle";var element$7={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M9.77445 9.24306L9.77457 11.9573C9.77458 12.2887 9.50597 12.5574 9.17459 12.5574 8.84322 12.5574 8.57458 12.2888 8.57457 11.9574L8.57439 7.79509C8.57438 7.46372 8.84299 7.19508 9.17436 7.19507 9.3281 7.19493 9.48196 7.25351 9.59925 7.3708L11.3465 9.11808C11.5808 9.3524 11.5808 9.7323 11.3465 9.96661 11.1122 10.2009 10.7323 10.2009 10.498 9.96661L9.77445 9.24306zM6.22584 10.5094L6.22572 7.79514C6.22571 7.46377 6.49433 7.19513 6.8257 7.19512 7.15707 7.1951 7.42571 7.46372 7.42572 7.79509L7.4259 11.9574C7.42592 12.2888 7.1573 12.5574 6.82593 12.5574 6.67228 12.5575 6.51828 12.4989 6.40104 12.3817L4.65376 10.6344C4.41945 10.4001 4.41945 10.0202 4.65376 9.78588 4.88808 9.55156 5.26798 9.55156 5.50229 9.78588L6.22584 10.5094z"}},{tag:"path",attrs:{fill:"currentColor",d:"M1.14014 3.73989C1.14014 2.30396 2.3042 1.13989 3.74014 1.13989H12.2601C13.6961 1.13989 14.8601 2.30395 14.8601 3.73989V12.2599C14.8601 13.6958 13.6961 14.8599 12.2601 14.8599H3.74014C2.3042 14.8599 1.14014 13.6958 1.14014 12.2599V3.73989ZM2.34014 5.86724V12.2599C2.34014 13.0331 2.96694 13.6599 3.74014 13.6599H12.2601C13.0333 13.6599 13.6601 13.0331 13.6601 12.2599V5.86724H2.34014ZM13.6601 4.66724H2.34014V3.73989C2.34014 2.9667 2.96694 2.33989 3.74014 2.33989H12.2601C13.0333 2.33989 13.6601 2.96669 13.6601 3.73989V4.66724Z",fillRule:"evenodd",clipRule:"evenodd"}}]},CustomSortSingle=React.forwardRef(function(props,ref){return React.createElement(IconBase,Object.assign({},props,{id:"custom-sort-single",ref,icon:element$7}))});CustomSortSingle.displayName="CustomSortSingle";var element$6={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M5.3313 1.4667C5.3313 1.13533 5.59993.866699 5.9313.866699H10.069C10.4004.866699 10.669 1.13533 10.669 1.4667 10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667zM1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443 14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443z"}},{tag:"path",attrs:{fill:"currentColor",d:"M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V13.1332C3.15332 14.2377 4.04875 15.1332 5.15332 15.1332H10.8465C11.9511 15.1332 12.8465 14.2377 12.8465 13.1331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V13.1331C11.6465 13.575 11.2884 13.9331 10.8465 13.9331H5.15332C4.71149 13.9331 4.35332 13.575 4.35332 13.1332V6.82217Z",fillRule:"evenodd",clipRule:"evenodd"}}]},DeleteEmptySingle=React.forwardRef(function(props,ref){return React.createElement(IconBase,Object.assign({},props,{id:"delete-empty-single",ref,icon:element$6}))});DeleteEmptySingle.displayName="DeleteEmptySingle";var element$5={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M12.4208 1.53335C12.4208 1.20198 12.1522 0.93335 11.8208 0.93335C11.4895 0.93335 11.2208 1.20198 11.2208 1.53335V13.0181L9.97861 11.7758C9.7443 11.5415 9.3644 11.5415 9.13008 11.7758C8.89577 12.0101 8.89577 12.39 9.13008 12.6244L11.3967 14.891C11.6311 15.1253 12.011 15.1253 12.2453 14.891L14.5119 12.6244C14.7463 12.39 14.7463 12.0101 14.5119 11.7758C14.2776 11.5415 13.8977 11.5415 13.6634 11.7758L12.4208 13.0184V1.53335Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M1.98967 10.2798C1.6583 10.2798 1.38967 10.0112 1.38967 9.67983 1.38967 9.34846 1.6583 9.07983 1.98967 9.07983H6.50138C6.74406 9.07983 6.96284 9.22602 7.05571 9.45022 7.14858 9.67443 7.09725 9.9325 6.92565 10.1041L3.43819 13.5916H6.50138C6.83276 13.5916 7.10138 13.8602 7.10138 14.1916 7.10138 14.5229 6.83276 14.7916 6.50138 14.7916H1.98967C1.74699 14.7916 1.52821 14.6454 1.43534 14.4212 1.34247 14.197 1.3938 13.9389 1.5654 13.7673L5.05286 10.2798H1.98967zM5.1846 1.86439C4.8641.989866 3.62725.989866 3.30674 1.86439L1.34882 7.20672C1.23479 7.51786 1.39458 7.86252 1.70571 7.97655 2.01684 8.09058 2.3615 7.93079 2.47553 7.61966L3.06159 6.02055 3.06338 6.02056H5.42975L6.01581 7.61966C6.12984 7.93079 6.4745 8.09058 6.78563 7.97655 7.09677 7.86252 7.25655 7.51786 7.14252 7.20672L5.1846 1.86439zM4.98996 4.82056L4.24567 2.78971 3.50138 4.82056H4.98996z",fillRule:"evenodd",clipRule:"evenodd"}}]},DescendingSingle=React.forwardRef(function(props,ref){return React.createElement(IconBase,Object.assign({},props,{id:"descending-single",ref,icon:element$5}))});DescendingSingle.displayName="DescendingSingle";var element$4={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M1.9064 3.20024C1.57503 3.20024 1.3064 2.93161 1.3064 2.60024C1.3064 2.26887 1.57503 2.00024 1.9064 2.00024H4.57306C4.90443 2.00024 5.17306 2.26887 5.17306 2.60024C5.17306 2.93161 4.90443 3.20024 4.57306 3.20024H1.9064ZM1.3064 6.19985C1.3064 6.53122 1.57503 6.79985 1.9064 6.79985H5.9064C6.23777 6.79985 6.5064 6.53122 6.5064 6.19985C6.5064 5.86848 6.23777 5.59985 5.9064 5.59985H1.9064C1.57503 5.59985 1.3064 5.86848 1.3064 6.19985ZM1.9064 10.3997C1.57503 10.3997 1.3064 10.1311 1.3064 9.79971C1.3064 9.46834 1.57503 9.19971 1.9064 9.19971H7.23973C7.5711 9.19971 7.83973 9.46834 7.83973 9.79971C7.83973 10.1311 7.5711 10.3997 7.23973 10.3997H1.9064ZM1.9064 13.9996C1.57503 13.9996 1.3064 13.7309 1.3064 13.3996C1.3064 13.0682 1.57503 12.7996 1.9064 12.7996H8.57306C8.90443 12.7996 9.17306 13.0682 9.17306 13.3996C9.17306 13.7309 8.90443 13.9996 8.57306 13.9996H1.9064Z",fillRule:"evenodd",clipRule:"evenodd"}},{tag:"path",attrs:{fill:"currentColor",d:"M12.4267 14.2667C12.4267 14.5981 12.1581 14.8667 11.8267 14.8667C11.4953 14.8667 11.2267 14.5981 11.2267 14.2667V3.18198L9.98447 4.42422C9.75015 4.65853 9.37026 4.65853 9.13594 4.42422C8.90163 4.1899 8.90163 3.81 9.13594 3.57569L11.4026 1.30902C11.6369 1.07471 12.0168 1.07471 12.2511 1.30902L14.5178 3.57569C14.7521 3.81 14.7521 4.1899 14.5178 4.42422C14.2835 4.65853 13.9036 4.65853 13.6693 4.42422L12.4267 3.18165V14.2667Z"}}]},ExpandAscendingSingle=React.forwardRef(function(props,ref){return React.createElement(IconBase,Object.assign({},props,{id:"expand-ascending-single",ref,icon:element$4}))});ExpandAscendingSingle.displayName="ExpandAscendingSingle";var element$3={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M1.9064 12.7998C1.57503 12.7998 1.3064 13.0684 1.3064 13.3998C1.3064 13.7311 1.57503 13.9998 1.9064 13.9998H4.57306C4.90443 13.9998 5.17306 13.7311 5.17306 13.3998C5.17306 13.0684 4.90443 12.7998 4.57306 12.7998H1.9064ZM1.3064 9.80015C1.3064 9.46878 1.57503 9.20015 1.9064 9.20015H5.9064C6.23777 9.20015 6.5064 9.46878 6.5064 9.80015C6.5064 10.1315 6.23777 10.4001 5.9064 10.4001H1.9064C1.57503 10.4001 1.3064 10.1315 1.3064 9.80015ZM1.9064 5.60029C1.57503 5.60029 1.3064 5.86892 1.3064 6.20029C1.3064 6.53166 1.57503 6.80029 1.9064 6.80029H7.23973C7.5711 6.80029 7.83973 6.53166 7.83973 6.20029C7.83973 5.86892 7.5711 5.60029 7.23973 5.60029H1.9064ZM1.9064 2.00044C1.57503 2.00044 1.3064 2.26907 1.3064 2.60044C1.3064 2.93181 1.57503 3.20044 1.9064 3.20044H8.57306C8.90443 3.20044 9.17306 2.93181 9.17306 2.60044C9.17306 2.26907 8.90443 2.00044 8.57306 2.00044H1.9064Z",fillRule:"evenodd",clipRule:"evenodd"}},{tag:"path",attrs:{fill:"currentColor",d:"M12.4267 1.7333C12.4267 1.40193 12.1581 1.1333 11.8267 1.1333C11.4953 1.1333 11.2267 1.40193 11.2267 1.7333V12.818L9.98447 11.5758C9.75015 11.3415 9.37026 11.3415 9.13594 11.5758C8.90163 11.8101 8.90163 12.19 9.13594 12.4243L11.4026 14.691C11.6369 14.9253 12.0168 14.9253 12.2511 14.691L14.5178 12.4243C14.7521 12.19 14.7521 11.8101 14.5178 11.5758C14.2835 11.3415 13.9036 11.3415 13.6693 11.5758L12.4267 12.8183V1.7333Z"}}]},ExpandDescendingSingle=React.forwardRef(function(props,ref){return React.createElement(IconBase,Object.assign({},props,{id:"expand-descending-single",ref,icon:element$3}))});ExpandDescendingSingle.displayName="ExpandDescendingSingle";var element$2={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z"}}]},IncreaseSingle=React.forwardRef(function(props,ref){return React.createElement(IconBase,Object.assign({},props,{id:"increase-single",ref,icon:element$2}))});IncreaseSingle.displayName="IncreaseSingle";var element$1={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z",fillRule:"evenodd",clipRule:"evenodd"}}]},MoreDownSingle=React.forwardRef(function(props,ref){return React.createElement(IconBase,Object.assign({},props,{id:"more-down-single",ref,icon:element$1}))});MoreDownSingle.displayName="MoreDownSingle";var element={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"mask",attrs:{id:"mask0_622_8",style:{maskType:"alpha"},width:16,height:16,x:0,y:0,maskUnits:"userSpaceOnUse"},children:[{tag:"path",attrs:{fill:"#D9D9D9",d:"M0 0H16V16H0z"}}]},{tag:"g",attrs:{fill:"currentColor",mask:"url(#mask0_622_8)"},children:[{tag:"path",attrs:{d:"M6 5C6.55228 5 7 4.55228 7 4 7 3.44772 6.55228 3 6 3 5.44772 3 5 3.44772 5 4 5 4.55228 5.44772 5 6 5zM6 9C6.55228 9 7 8.55229 7 8 7 7.44772 6.55228 7 6 7 5.44772 7 5 7.44772 5 8 5 8.55229 5.44772 9 6 9zM7 12C7 12.5523 6.55228 13 6 13 5.44772 13 5 12.5523 5 12 5 11.4477 5.44772 11 6 11 6.55228 11 7 11.4477 7 12zM10 5C10.5523 5 11 4.55228 11 4 11 3.44772 10.5523 3 10 3 9.44771 3 9 3.44772 9 4 9 4.55228 9.44771 5 10 5zM11 8C11 8.55229 10.5523 9 10 9 9.44771 9 9 8.55229 9 8 9 7.44772 9.44771 7 10 7 10.5523 7 11 7.44772 11 8zM10 13C10.5523 13 11 12.5523 11 12 11 11.4477 10.5523 11 10 11 9.44771 11 9 11.4477 9 12 9 12.5523 9.44771 13 10 13z"}}]}]},SequenceSingle=React.forwardRef(function(props,ref){return React.createElement(IconBase,Object.assign({},props,{id:"sequence-single",ref,icon:element}))});SequenceSingle.displayName="SequenceSingle";const SortRangeAscCommand={id:"sheet.command.sort-range-asc",type:core.CommandType.COMMAND,handler:__name(async accessor=>await accessor.get(SheetsSortUIService).triggerSortDirectly(!0,!1),"handler")},SortRangeAscExtCommand={id:"sheet.command.sort-range-asc-ext",type:core.CommandType.COMMAND,handler:__name(async accessor=>await accessor.get(SheetsSortUIService).triggerSortDirectly(!0,!0),"handler")},SortRangeDescCommand={id:"sheet.command.sort-range-desc",type:core.CommandType.COMMAND,handler:__name(async accessor=>await accessor.get(SheetsSortUIService).triggerSortDirectly(!1,!1),"handler")},SortRangeDescExtCommand={id:"sheet.command.sort-range-desc-ext",type:core.CommandType.COMMAND,handler:__name(async accessor=>await accessor.get(SheetsSortUIService).triggerSortDirectly(!1,!0),"handler")},SortRangeCustomCommand={id:"sheet.command.sort-range-custom",type:core.CommandType.COMMAND,handler:__name(async accessor=>await accessor.get(SheetsSortUIService).triggerSortCustomize(),"handler")},SortRangeAscInCtxMenuCommand={id:"sheet.command.sort-range-asc-ctx",type:core.CommandType.COMMAND,handler:__name(async accessor=>await accessor.get(SheetsSortUIService).triggerSortDirectly(!0,!1),"handler")},SortRangeAscExtInCtxMenuCommand={id:"sheet.command.sort-range-asc-ext-ctx",type:core.CommandType.COMMAND,handler:__name(async accessor=>await accessor.get(SheetsSortUIService).triggerSortDirectly(!0,!0),"handler")},SortRangeDescInCtxMenuCommand={id:"sheet.command.sort-range-desc-ctx",type:core.CommandType.COMMAND,handler:__name(async accessor=>await accessor.get(SheetsSortUIService).triggerSortDirectly(!1,!1),"handler")},SortRangeDescExtInCtxMenuCommand={id:"sheet.command.sort-range-desc-ext-ctx",type:core.CommandType.COMMAND,handler:__name(async accessor=>await accessor.get(SheetsSortUIService).triggerSortDirectly(!1,!0),"handler")},SortRangeCustomInCtxMenuCommand={id:"sheet.command.sort-range-custom-ctx",type:core.CommandType.COMMAND,handler:__name(async accessor=>await accessor.get(SheetsSortUIService).triggerSortCustomize(),"handler")};function CustomSortPanel(){const sheetsSortUIService=core.useDependency(SheetsSortUIService),sheetsSortService=core.useDependency(sheetsSort.SheetsSortService),localeService=core.useDependency(core.LocaleService),[hasTitle,setHasTitle]=React.useState(!1),[scrollPosition,setScrollPosition]=React.useState(0),listEndRef=React.useRef(null),state=sheetsSortUIService.customSortState();if(!state||!state.location)return null;const{range,unitId,subUnitId}=state.location,titles=sheetsSortUIService.getTitles(hasTitle),[list,setList]=React.useState([{type:sheetsSort.SortType.ASC,colIndex:range.startColumn}]),onItemChange=React.useCallback((index,value)=>{const newList=[...list];value===null?newList.splice(index,1):newList[index]=value,setList(newList)},[list]),newItem=React.useCallback(core.throttle(()=>{const newList=[...list],nextColIndex=findNextColIndex(range,list);nextColIndex!==null&&(newList.push({type:sheetsSort.SortType.ASC,colIndex:nextColIndex}),setList(newList))},200),[list,range]),apply=React.useCallback((orderRules,hasTitle2)=>{sheetsSortService.applySort({range,orderRules,hasTitle:hasTitle2}),sheetsSortUIService.closeCustomSortPanel()},[sheetsSortService,sheetsSortUIService,range]),cancel=React.useCallback(()=>{sheetsSortUIService.closeCustomSortPanel()},[sheetsSortUIService]),setTitle=React.useCallback(value=>{setHasTitle(value),value?sheetsSortUIService.setSelection(unitId,subUnitId,{...range,startRow:range.startRow+1}):sheetsSortUIService.setSelection(unitId,subUnitId,range)},[sheetsSortUIService,range,subUnitId,unitId]);React.useEffect(()=>{listEndRef.current&&list.length>5&&(listEndRef.current.scrollTop=listEndRef.current.scrollHeight)},[list]);const canNew=list.length<titles.length,dragList=list.map(item=>({...item,id:`${item.colIndex}`}));return React.createElement("div",{className:styles.customSortPanelContainer},React.createElement("div",{className:styles.customSortPanelContent,onMouseDown:__name(e=>{e.stopPropagation()},"onMouseDown")},React.createElement("div",{className:styles.customSortPanelExt},React.createElement("div",{className:styles.firstRowCheck},React.createElement(design.Checkbox,{checked:hasTitle,onChange:__name(value=>setTitle(!!value),"onChange")},localeService.t("sheets-sort.dialog.first-row-check"))),canNew?React.createElement("div",{className:styles.addCondition,onClick:newItem},React.createElement(IncreaseSingle,null),React.createElement("span",{className:styles.addConditionText},localeService.t("sheets-sort.dialog.add-condition"))):React.createElement("div",{className:`${styles.addCondition} ${styles.addConditionDisable}`},React.createElement(IncreaseSingle,null),React.createElement("span",{className:styles.addConditionText},localeService.t("sheets-sort.dialog.add-condition")))),React.createElement("div",{className:styles.conditionList,onScroll:__name(e=>{const position=e.currentTarget.scrollTop;setScrollPosition(position)},"onScroll"),ref:listEndRef},React.createElement(design.DraggableList,{list:dragList,onListChange:setList,idKey:"id",draggableHandle:`.${styles.customSortPanelItemHandler}`,itemRender:__name(item=>React.createElement(SortOptionItem,{titles,list:dragList,item,onChange:__name((value,index)=>onItemChange(index,value),"onChange"),scrollPosition}),"itemRender"),rowHeight:32,margin:[0,12]}))),React.createElement("div",{className:styles.customSortPanelFooter},React.createElement(design.Button,{className:styles.customSortPanelFooterBtn,type:"default",onClick:__name(()=>cancel(),"onClick")},localeService.t("sheets-sort.dialog.cancel")),React.createElement(design.Button,{className:styles.customSortPanelFooterBtn,type:"primary",onClick:__name(()=>apply(list,hasTitle),"onClick")},localeService.t("sheets-sort.dialog.confirm"))))}__name(CustomSortPanel,"CustomSortPanel");function SortOptionItem(props){var _a4;const{list,item,titles,onChange,scrollPosition}=props,localeService=core.useDependency(core.LocaleService),availableMenu=titles.filter(title=>!list.some(item2=>item2.colIndex===title.index)||title.index===item.colIndex),currentIndex=list.findIndex(listItem=>listItem.colIndex===item.colIndex),handleChangeColIndex=React.useCallback(menuItem=>{onChange({...item,colIndex:menuItem.index},currentIndex),setVisible(!1)},[currentIndex,item,onChange]),[visible,setVisible]=React.useState(!1),onVisibleChange=__name(visible2=>{setVisible(visible2)},"onVisibleChange");React.useEffect(()=>{setVisible(!1)},[scrollPosition]);const showDelete=list.length>1,itemLabel=(_a4=titles.find(title=>title.index===item.colIndex))==null?void 0:_a4.label,radioClass=localeService.getCurrentLocale()===core.LocaleType.ZH_CN?styles.customSortPanelItemOrderRadioCn:styles.customSortPanelItemOrderRadio;return React.createElement("div",{className:styles.customSortPanelItem},React.createElement("div",{className:styles.customSortPanelItemHead},React.createElement("div",{className:styles.customSortPanelItemHandler},React.createElement(SequenceSingle,null)),React.createElement("div",{className:styles.customSortPanelItemColumn},React.createElement(design.Dropdown,{placement:"bottomLeft",trigger:["click"],visible,onVisibleChange,overlay:React.createElement("ul",{className:styles.customSortColMenu},availableMenu.map(menuItem=>React.createElement("li",{key:menuItem.index,onClick:__name(()=>handleChangeColIndex(menuItem),"onClick"),className:styles.customSortColMenuItem},React.createElement("span",{className:styles.customSortColMenuItemDesc},menuItem.label),React.createElement("span",{className:styles.customSortColMenuItemCheck},menuItem.index===item.colIndex&&React.createElement(CheckMarkSingle,null)))))},React.createElement("div",{className:styles.customSortPanelItemColumnInput},React.createElement("span",{className:styles.customSortPanelItemColumnInputText},itemLabel),React.createElement(MoreDownSingle,{className:styles.customSortPanelItemColumnInputDropdown}))))),React.createElement("div",{className:styles.customSortPanelItemOrder},React.createElement(design.RadioGroup,{className:radioClass,value:item.type,onChange:__name(value=>{onChange({...item,type:value},currentIndex)},"onChange")},React.createElement(design.Radio,{value:sheetsSort.SortType.ASC},localeService.t("sheets-sort.general.sort-asc")),React.createElement(design.Radio,{value:sheetsSort.SortType.DESC},localeService.t("sheets-sort.general.sort-desc")))),React.createElement("div",{className:styles.customSortPanelItemRemove},showDelete&&React.createElement(DeleteEmptySingle,{onClick:__name(()=>onChange(null,currentIndex),"onClick")})))}__name(SortOptionItem,"SortOptionItem");function findNextColIndex(range,list){const{startColumn,endColumn}=range,used=new Set(list.map(item=>item==null?void 0:item.colIndex));for(let i=startColumn;i<=endColumn;i++)if(!used.has(i))return i;return null}__name(findNextColIndex,"findNextColIndex");function EmbedSortBtn(props){const{range,colIndex,onClose}=props,sheetsSortUIService=core.useDependency(SheetsSortUIService),univerInstanceService=core.useDependency(core.IUniverInstanceService),localeService=core.useDependency(core.LocaleService),apply=React.useCallback(asc=>{const{unitId,subUnitId}=sheets.getSheetCommandTarget(univerInstanceService)||{};if(range&&unitId&&subUnitId){const noTitleRange={...range,startRow:range.startRow+1};sheetsSortUIService.triggerSortDirectly(asc,!1,{unitId,subUnitId,range:noTitleRange,colIndex})}else console.warn(`Cannot find the target to sort. unitId: ${unitId}, subUnitId: ${subUnitId}, range: ${range}, colIndex: ${colIndex}`);onClose()},[range,colIndex,sheetsSortUIService,univerInstanceService,onClose]);return React.createElement("div",{className:styles.embedSortBtnContainer},React.createElement("div",{className:`${styles.embedSortBtn} ${styles.embedSortBtnAsc}`,onClick:__name(()=>apply(!0),"onClick")},React.createElement(AscendingSingle,{className:styles.embedSortBtnIcon}),localeService.t("sheets-sort.general.sort-asc")),React.createElement("div",{className:`${styles.embedSortBtn} ${styles.embedSortBtnDesc}`,onClick:__name(()=>apply(!1),"onClick")},React.createElement(DescendingSingle,{className:styles.embedSortBtnIcon}),localeService.t("sheets-sort.general.sort-desc")))}__name(EmbedSortBtn,"EmbedSortBtn");const SHEETS_SORT_MENU_ID="sheet.menu.sheets-sort",SHEETS_SORT_CTX_MENU_ID="sheet.menu.sheets-sort-ctx",SHEETS_SORT_ASC_ICON="AscendingSingle",SHEETS_SORT_ASC_EXT_ICON="ExpandAscendingSingle",SHEETS_SORT_DESC_ICON="DescendingSingle",SHEETS_SORT_DESC_EXT_ICON="ExpandDescendingSingle",SHEETS_SORT_CUSTOM_ICON="CustomSortSingle";function sortRangeMenuFactory(accessor){return{id:SHEETS_SORT_MENU_ID,type:ui.MenuItemType.SUBITEMS,icon:SHEETS_SORT_ASC_ICON,tooltip:"sheets-sort.general.sort",hidden$:ui.getMenuHiddenObservable(accessor,core.UniverInstanceType.UNIVER_SHEET),disabled$:sheetsUi.getCurrentRangeDisable$(accessor,{workbookTypes:[sheets.WorkbookEditablePermission],worksheetTypes:[sheets.WorksheetSortPermission,sheets.WorksheetEditPermission],rangeTypes:[sheets.RangeProtectionPermissionEditPoint]})}}__name(sortRangeMenuFactory,"sortRangeMenuFactory");function sortRangeAscMenuFactory(_accessor){return{id:SortRangeAscCommand.id,icon:SHEETS_SORT_ASC_ICON,title:"sheets-sort.general.sort-asc-cur",type:ui.MenuItemType.BUTTON,hidden$:sheetsUi.getCurrentExclusiveRangeInterest$(_accessor)}}__name(sortRangeAscMenuFactory,"sortRangeAscMenuFactory");function sortRangeAscExtMenuFactory(_accessor){return{id:SortRangeAscExtCommand.id,title:"sheets-sort.general.sort-asc-ext",icon:SHEETS_SORT_ASC_EXT_ICON,type:ui.MenuItemType.BUTTON}}__name(sortRangeAscExtMenuFactory,"sortRangeAscExtMenuFactory");function sortRangeDescMenuFactory(_accessor){return{id:SortRangeDescCommand.id,title:"sheets-sort.general.sort-desc-cur",icon:SHEETS_SORT_DESC_ICON,type:ui.MenuItemType.BUTTON}}__name(sortRangeDescMenuFactory,"sortRangeDescMenuFactory");function sortRangeDescExtMenuFactory(_accessor){return{id:SortRangeDescExtCommand.id,title:"sheets-sort.general.sort-desc-ext",icon:SHEETS_SORT_DESC_EXT_ICON,type:ui.MenuItemType.BUTTON}}__name(sortRangeDescExtMenuFactory,"sortRangeDescExtMenuFactory");function sortRangeCustomMenuFactory(_accessor){return{id:SortRangeCustomCommand.id,title:"sheets-sort.general.sort-custom",type:ui.MenuItemType.BUTTON,icon:SHEETS_SORT_CUSTOM_ICON}}__name(sortRangeCustomMenuFactory,"sortRangeCustomMenuFactory");function sortRangeCtxMenuFactory(accessor){return{id:SHEETS_SORT_CTX_MENU_ID,title:"sheets-sort.general.sort",type:ui.MenuItemType.SUBITEMS,icon:SHEETS_SORT_ASC_ICON,hidden$:ui.getMenuHiddenObservable(accessor,core.UniverInstanceType.UNIVER_SHEET),disabled$:sheetsUi.getCurrentRangeDisable$(accessor,{workbookTypes:[sheets.WorkbookEditablePermission],worksheetTypes:[sheets.WorksheetSortPermission,sheets.WorksheetEditPermission],rangeTypes:[sheets.RangeProtectionPermissionEditPoint]})}}__name(sortRangeCtxMenuFactory,"sortRangeCtxMenuFactory");function sortRangeAscCtxMenuFactory(_accessor){return{id:SortRangeAscInCtxMenuCommand.id,title:"sheets-sort.general.sort-asc-cur",type:ui.MenuItemType.BUTTON,icon:SHEETS_SORT_ASC_ICON,disabled$:sheetsUi.getCurrentRangeDisable$(_accessor,{workbookTypes:[sheets.WorkbookEditablePermission],worksheetTypes:[sheets.WorksheetSortPermission,sheets.WorksheetEditPermission],rangeTypes:[sheets.RangeProtectionPermissionEditPoint]})}}__name(sortRangeAscCtxMenuFactory,"sortRangeAscCtxMenuFactory");function sortRangeAscExtCtxMenuFactory(_accessor){return{id:SortRangeAscExtInCtxMenuCommand.id,title:"sheets-sort.general.sort-asc-ext",type:ui.MenuItemType.BUTTON,icon:SHEETS_SORT_ASC_EXT_ICON,disabled$:sheetsUi.getCurrentRangeDisable$(_accessor,{workbookTypes:[sheets.WorkbookEditablePermission],worksheetTypes:[sheets.WorksheetSortPermission,sheets.WorksheetEditPermission],rangeTypes:[sheets.RangeProtectionPermissionEditPoint]})}}__name(sortRangeAscExtCtxMenuFactory,"sortRangeAscExtCtxMenuFactory");function sortRangeDescCtxMenuFactory(_accessor){return{id:SortRangeDescInCtxMenuCommand.id,title:"sheets-sort.general.sort-desc-cur",type:ui.MenuItemType.BUTTON,icon:SHEETS_SORT_DESC_ICON,disabled$:sheetsUi.getCurrentRangeDisable$(_accessor,{workbookTypes:[sheets.WorkbookEditablePermission],worksheetTypes:[sheets.WorksheetSortPermission,sheets.WorksheetEditPermission],rangeTypes:[sheets.RangeProtectionPermissionEditPoint]})}}__name(sortRangeDescCtxMenuFactory,"sortRangeDescCtxMenuFactory");function sortRangeDescExtCtxMenuFactory(_accessor){return{id:SortRangeDescExtInCtxMenuCommand.id,title:"sheets-sort.general.sort-desc-ext",type:ui.MenuItemType.BUTTON,icon:SHEETS_SORT_DESC_EXT_ICON,disabled$:sheetsUi.getCurrentRangeDisable$(_accessor,{workbookTypes:[sheets.WorkbookEditablePermission],worksheetTypes:[sheets.WorksheetSortPermission,sheets.WorksheetEditPermission],rangeTypes:[sheets.RangeProtectionPermissionEditPoint]})}}__name(sortRangeDescExtCtxMenuFactory,"sortRangeDescExtCtxMenuFactory");function sortRangeCustomCtxMenuFactory(_accessor){return{id:SortRangeCustomInCtxMenuCommand.id,title:"sheets-sort.general.sort-custom",type:ui.MenuItemType.BUTTON,icon:SHEETS_SORT_CUSTOM_ICON,disabled$:sheetsUi.getCurrentRangeDisable$(_accessor,{workbookTypes:[sheets.WorkbookEditablePermission],worksheetTypes:[sheets.WorksheetSortPermission,sheets.WorksheetEditPermission],rangeTypes:[sheets.RangeProtectionPermissionEditPoint]})}}__name(sortRangeCustomCtxMenuFactory,"sortRangeCustomCtxMenuFactory");const menuSchema={[ui.RibbonStartGroup.FORMULAS_INSERT]:{[SHEETS_SORT_MENU_ID]:{order:2,menuItemFactory:sortRangeMenuFactory,[SortRangeAscCommand.id]:{order:0,menuItemFactory:sortRangeAscMenuFactory},[SortRangeAscExtCommand.id]:{order:1,menuItemFactory:sortRangeAscExtMenuFactory},[SortRangeDescCommand.id]:{order:2,menuItemFactory:sortRangeDescMenuFactory},[SortRangeDescExtCommand.id]:{order:3,menuItemFactory:sortRangeDescExtMenuFactory},[SortRangeCustomCommand.id]:{order:4,menuItemFactory:sortRangeCustomMenuFactory}}},[ui.ContextMenuPosition.MAIN_AREA]:{[ui.ContextMenuGroup.DATA]:{[SHEETS_SORT_CTX_MENU_ID]:{order:0,menuItemFactory:sortRangeCtxMenuFactory,[SortRangeAscInCtxMenuCommand.id]:{order:0,menuItemFactory:sortRangeAscCtxMenuFactory},[SortRangeAscExtInCtxMenuCommand.id]:{order:1,menuItemFactory:sortRangeAscExtCtxMenuFactory},[SortRangeDescInCtxMenuCommand.id]:{order:2,menuItemFactory:sortRangeDescCtxMenuFactory},[SortRangeDescExtInCtxMenuCommand.id]:{order:3,menuItemFactory:sortRangeDescExtCtxMenuFactory},[SortRangeCustomInCtxMenuCommand.id]:{order:4,menuItemFactory:sortRangeCustomCtxMenuFactory}}}}};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 CUSTOM_SORT_DIALOG_ID="custom-sort-dialog",CUSTOM_SORT_PANEL_WIDTH=560;var _a2;let SheetsSortUIController=(_a2=class extends core.RxDisposable{constructor(_commandService,_menuManagerService,_dialogService,_layoutService,_uiPartsService,_sheetRenderService,_localeService,_sheetsSortUIService,_injector,_componentManager){super(),this._commandService=_commandService,this._menuManagerService=_menuManagerService,this._dialogService=_dialogService,this._layoutService=_layoutService,this._uiPartsService=_uiPartsService,this._sheetRenderService=_sheetRenderService,this._localeService=_localeService,this._sheetsSortUIService=_sheetsSortUIService,this._injector=_injector,this._componentManager=_componentManager,this._initCommands(),this._initMenu(),this._initUI()}_initMenu(){this._menuManagerService.mergeMenu(menuSchema)}_initCommands(){[SortRangeAscCommand,SortRangeAscExtCommand,SortRangeDescCommand,SortRangeDescExtCommand,SortRangeCustomCommand,SortRangeAscInCtxMenuCommand,SortRangeAscExtInCtxMenuCommand,SortRangeDescInCtxMenuCommand,SortRangeDescExtInCtxMenuCommand,SortRangeCustomInCtxMenuCommand].forEach(command=>this.disposeWithMe(this._commandService.registerCommand(command))),this.disposeWithMe(this._sheetRenderService.registerSkeletonChangingMutations(sheetsSort.SortRangeCommand.id))}_initUI(){this.disposeWithMe(this._componentManager.register("CustomSortPanel",CustomSortPanel)),this.disposeWithMe(this._uiPartsService.registerComponent(sheetsUi.SheetsUIPart.FILTER_PANEL_EMBED_POINT,()=>core.connectInjector(EmbedSortBtn,this._injector))),this.disposeWithMe(this._componentManager.register(SHEETS_SORT_ASC_ICON,AscendingSingle)),this.disposeWithMe(this._componentManager.register(SHEETS_SORT_ASC_EXT_ICON,ExpandAscendingSingle)),this.disposeWithMe(this._componentManager.register(SHEETS_SORT_DESC_ICON,DescendingSingle)),this.disposeWithMe(this._componentManager.register(SHEETS_SORT_DESC_EXT_ICON,ExpandDescendingSingle)),this.disposeWithMe(this._componentManager.register(SHEETS_SORT_CUSTOM_ICON,CustomSortSingle)),this._sheetsSortUIService.customSortState$.pipe(rxjs.takeUntil(this.dispose$)).subscribe(newState=>{newState&&newState.show&&newState.location?this._openCustomSortPanel(newState.location):newState&&!(newState!=null&&newState.show)&&this._closePanel()})}_openCustomSortPanel(location){this._dialogService.open({id:CUSTOM_SORT_DIALOG_ID,draggable:!0,width:CUSTOM_SORT_PANEL_WIDTH,title:{title:`${this._localeService.t("sheets-sort.general.sort-custom")}: ${engineFormula.serializeRange(location.range)}`},children:{label:"CustomSortPanel"},destroyOnClose:!0,defaultPosition:getCustomSortDialogDefaultPosition(),preservePositionOnDestroy:!1,onClose:__name(()=>this._closePanel(),"onClose"),mask:!0})}_closePanel(){this._dialogService.close(CUSTOM_SORT_DIALOG_ID),queueMicrotask(()=>this._layoutService.focus())}},__name(_a2,"SheetsSortUIController"),_a2);SheetsSortUIController=__decorateClass$1([core.OnLifecycle(core.LifecycleStages.Ready,SheetsSortUIController),__decorateParam$1(0,core.ICommandService),__decorateParam$1(1,ui.IMenuManagerService),__decorateParam$1(2,ui.IDialogService),__decorateParam$1(3,ui.ILayoutService),__decorateParam$1(4,ui.IUIPartsService),__decorateParam$1(5,core.Inject(sheetsUi.SheetsRenderService)),__decorateParam$1(6,core.Inject(core.LocaleService)),__decorateParam$1(7,core.Inject(SheetsSortUIService)),__decorateParam$1(8,core.Inject(core.Injector)),__decorateParam$1(9,core.Inject(ui.ComponentManager))],SheetsSortUIController);function getCustomSortDialogDefaultPosition(){return{x:0,y:0}}__name(getCustomSortDialogDefaultPosition,"getCustomSortDialogDefaultPosition");const PLUGIN_CONFIG_KEY="sheets-sort-ui.config",defaultPluginConfig={};var __defProp2=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__defNormalProp2=__name((obj,key,value)=>key in obj?__defProp2(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value,"__defNormalProp"),__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"),__publicField2=__name((obj,key,value)=>__defNormalProp2(obj,typeof key!="symbol"?key+"":key,value),"__publicField");const NAME="SHEET_SORT_UI_PLUGIN";var _a3;exports.UniverSheetsSortUIPlugin=(_a3=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(){[[SheetsSortUIService],[SheetsSortUIController]].forEach(d=>this._injector.add(d))}},__name(_a3,"UniverSheetsSortUIPlugin"),_a3);__publicField2(exports.UniverSheetsSortUIPlugin,"type",core.UniverInstanceType.UNIVER_SHEET);__publicField2(exports.UniverSheetsSortUIPlugin,"pluginName",NAME);exports.UniverSheetsSortUIPlugin=__decorateClass([core.DependentOn(sheetsSort.UniverSheetsSortPlugin),__decorateParam(1,core.Inject(core.Injector)),__decorateParam(2,core.IConfigService)],exports.UniverSheetsSortUIPlugin);exports.SortRangeAscCommand=SortRangeAscCommand;exports.SortRangeAscExtCommand=SortRangeAscExtCommand;exports.SortRangeAscExtInCtxMenuCommand=SortRangeAscExtInCtxMenuCommand;exports.SortRangeAscInCtxMenuCommand=SortRangeAscInCtxMenuCommand;exports.SortRangeCustomCommand=SortRangeCustomCommand;exports.SortRangeCustomInCtxMenuCommand=SortRangeCustomInCtxMenuCommand;exports.SortRangeDescCommand=SortRangeDescCommand;exports.SortRangeDescExtCommand=SortRangeDescExtCommand;exports.SortRangeDescExtInCtxMenuCommand=SortRangeDescExtInCtxMenuCommand;exports.SortRangeDescInCtxMenuCommand=SortRangeDescInCtxMenuCommand;
1
+ 'use strict';var _0x1318a4=_0x24f9;(function(_0x2a0f24,_0x44c970){var _0x2099aa=_0x24f9,_0x4e8df8=_0x2a0f24();while(!![]){try{var _0x94eeb7=-parseInt(_0x2099aa(0x305))/0x1*(-parseInt(_0x2099aa(0x29f))/0x2)+-parseInt(_0x2099aa(0x354))/0x3*(parseInt(_0x2099aa(0x2b9))/0x4)+parseInt(_0x2099aa(0x1e7))/0x5*(parseInt(_0x2099aa(0x33f))/0x6)+-parseInt(_0x2099aa(0x2c5))/0x7*(parseInt(_0x2099aa(0x201))/0x8)+parseInt(_0x2099aa(0x2c3))/0x9+parseInt(_0x2099aa(0x283))/0xa*(-parseInt(_0x2099aa(0x23a))/0xb)+-parseInt(_0x2099aa(0x2ec))/0xc*(-parseInt(_0x2099aa(0x304))/0xd);if(_0x94eeb7===_0x44c970)break;else _0x4e8df8['push'](_0x4e8df8['shift']());}catch(_0x4cdad4){_0x4e8df8['push'](_0x4e8df8['shift']());}}}(_0x1542,0x747bc));var __defProp=Object[_0x1318a4(0x341)],__defNormalProp=(_0x4022c6,_0x10094e,_0x232f4c)=>_0x10094e in _0x4022c6?__defProp(_0x4022c6,_0x10094e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x232f4c}):_0x4022c6[_0x10094e]=_0x232f4c,__name=(_0x5b6137,_0x444d9a)=>__defProp(_0x5b6137,_0x1318a4(0x34b),{'value':_0x444d9a,'configurable':!0x0}),__publicField=(_0x186f23,_0x3bd39b,_0x30492f)=>__defNormalProp(_0x186f23,typeof _0x3bd39b!=_0x1318a4(0x35e)?_0x3bd39b+'':_0x3bd39b,_0x30492f);Object[_0x1318a4(0x341)](exports,Symbol['toStringTag'],{'value':'Module'});const core=require(_0x1318a4(0x227)),sheetsSort=require('@univerjs/sheets-sort'),engineFormula=require(_0x1318a4(0x287)),sheetsUi=require(_0x1318a4(0x277)),ui=require(_0x1318a4(0x208)),rxjs=require(_0x1318a4(0x2ac)),sheets=require(_0x1318a4(0x325)),React=require('react'),design=require(_0x1318a4(0x262)),PLUGIN_CONFIG_KEY=_0x1318a4(0x2cc),defaultPluginConfig={};var __assign=function(){var _0x32b3bb=_0x1318a4;return __assign=Object[_0x32b3bb(0x334)]||function(_0x3ff26e){var _0x1ac334=_0x32b3bb;for(var _0xa0b7d9,_0x575cb3=0x1,_0x390183=arguments[_0x1ac334(0x21f)];_0x575cb3<_0x390183;_0x575cb3++){_0xa0b7d9=arguments[_0x575cb3];for(var _0x4d7cf5 in _0xa0b7d9)Object[_0x1ac334(0x2bf)]['hasOwnProperty'][_0x1ac334(0x294)](_0xa0b7d9,_0x4d7cf5)&&(_0x3ff26e[_0x4d7cf5]=_0xa0b7d9[_0x4d7cf5]);}return _0x3ff26e;},__assign['apply'](this,arguments);},__rest=function(_0x1a97c4,_0x3f8c67){var _0x310339=_0x1318a4,_0x16cd73={};for(var _0x1724bb in _0x1a97c4)Object['prototype'][_0x310339(0x24f)][_0x310339(0x294)](_0x1a97c4,_0x1724bb)&&_0x3f8c67[_0x310339(0x27b)](_0x1724bb)<0x0&&(_0x16cd73[_0x1724bb]=_0x1a97c4[_0x1724bb]);if(_0x1a97c4!=null&&typeof Object[_0x310339(0x1f0)]==_0x310339(0x26c)){for(var _0x1fe5a4=0x0,_0x1724bb=Object[_0x310339(0x1f0)](_0x1a97c4);_0x1fe5a4<_0x1724bb['length'];_0x1fe5a4++)_0x3f8c67['indexOf'](_0x1724bb[_0x1fe5a4])<0x0&&Object[_0x310339(0x2bf)]['propertyIsEnumerable'][_0x310339(0x294)](_0x1a97c4,_0x1724bb[_0x1fe5a4])&&(_0x16cd73[_0x1724bb[_0x1fe5a4]]=_0x1a97c4[_0x1724bb[_0x1fe5a4]]);}return _0x16cd73;},IconBase=React[_0x1318a4(0x349)](function(_0x8dc63f,_0x18f98e){var _0x4c6d95=_0x1318a4,_0x5f56f4=_0x8dc63f[_0x4c6d95(0x2d5)],_0x28bc7d=_0x8dc63f['id'],_0x4dd156=_0x8dc63f[_0x4c6d95(0x32a)],_0x484c77=_0x8dc63f[_0x4c6d95(0x2d8)],_0x2d22a9=__rest(_0x8dc63f,[_0x4c6d95(0x2d5),'id',_0x4c6d95(0x32a),'extend']),_0x142fed=_0x4c6d95(0x346)[_0x4c6d95(0x264)](_0x28bc7d,'\x20')[_0x4c6d95(0x264)](_0x4dd156||'')[_0x4c6d95(0x364)](),_0x1d40d0=React['useRef']('_'['concat'](generateShortUuid()));return render(_0x5f56f4,''[_0x4c6d95(0x264)](_0x28bc7d),{'defIds':_0x5f56f4[_0x4c6d95(0x2ca)],'idSuffix':_0x1d40d0[_0x4c6d95(0x1ec)]},__assign({'ref':_0x18f98e,'className':_0x142fed},_0x2d22a9),_0x484c77);});function render(_0x3f7bb5,_0x4329f8,_0x5c30eb,_0x3dfa06,_0x5e6345){var _0x2243a7=_0x1318a4;return React[_0x2243a7(0x2da)](_0x3f7bb5['tag'],__assign(__assign({'key':_0x4329f8},replaceRuntimeIdsAndExtInAttrs(_0x3f7bb5,_0x5c30eb,_0x5e6345)),_0x3dfa06),(replaceRuntimeIdsInDefs(_0x3f7bb5,_0x5c30eb)[_0x2243a7(0x1fe)]||[])['map'](function(_0x5de797,_0x4638b6){var _0x250e55=_0x2243a7;return render(_0x5de797,''[_0x250e55(0x264)](_0x4329f8,'-')['concat'](_0x3f7bb5[_0x250e55(0x21b)],'-')[_0x250e55(0x264)](_0x4638b6),_0x5c30eb,void 0x0,_0x5e6345);}));}__name(render,_0x1318a4(0x296));function replaceRuntimeIdsAndExtInAttrs(_0x3787e0,_0x52016c,_0x45d55a){var _0x1e5e07=_0x1318a4,_0x568ea5=__assign({},_0x3787e0[_0x1e5e07(0x203)]);_0x45d55a!=null&&_0x45d55a[_0x1e5e07(0x20a)]&&_0x568ea5['fill']===_0x1e5e07(0x20a)&&(_0x568ea5[_0x1e5e07(0x339)]=_0x45d55a[_0x1e5e07(0x20a)]);var _0x41d13e=_0x52016c['defIds'];return!_0x41d13e||_0x41d13e[_0x1e5e07(0x21f)]===0x0||(_0x3787e0[_0x1e5e07(0x21b)]===_0x1e5e07(0x292)&&_0x568ea5['xlink:href']&&(_0x568ea5[_0x1e5e07(0x333)]=_0x568ea5[_0x1e5e07(0x333)]+_0x52016c[_0x1e5e07(0x301)]),Object[_0x1e5e07(0x252)](_0x568ea5)[_0x1e5e07(0x318)](function(_0x12493d){var _0x113d83=_0x1e5e07,_0x139211=_0x12493d[0x0],_0x20254f=_0x12493d[0x1];typeof _0x20254f=='string'&&(_0x568ea5[_0x139211]=_0x20254f[_0x113d83(0x360)](/url\(#(.*)\)/,_0x113d83(0x257)[_0x113d83(0x264)](_0x52016c[_0x113d83(0x301)],')')));})),_0x568ea5;}__name(replaceRuntimeIdsAndExtInAttrs,_0x1318a4(0x213));function replaceRuntimeIdsInDefs(_0x1dde17,_0x9490c6){var _0x103647=_0x1318a4,_0x334bbc,_0xa32b2b=_0x9490c6[_0x103647(0x2ca)];return!_0xa32b2b||_0xa32b2b[_0x103647(0x21f)]===0x0?_0x1dde17:_0x1dde17[_0x103647(0x21b)]==='defs'&&(!((_0x334bbc=_0x1dde17['children'])===null||_0x334bbc===void 0x0)&&_0x334bbc[_0x103647(0x21f)])?__assign(__assign({},_0x1dde17),{'children':_0x1dde17[_0x103647(0x1fe)][_0x103647(0x2fc)](function(_0x345916){var _0x3c5301=_0x103647;return typeof _0x345916['attrs']['id']==_0x3c5301(0x331)&&_0xa32b2b&&_0xa32b2b[_0x3c5301(0x27b)](_0x345916[_0x3c5301(0x203)]['id'])>-0x1?__assign(__assign({},_0x345916),{'attrs':__assign(__assign({},_0x345916['attrs']),{'id':_0x345916[_0x3c5301(0x203)]['id']+_0x9490c6[_0x3c5301(0x301)]})}):_0x345916;})}):_0x1dde17;}__name(replaceRuntimeIdsInDefs,_0x1318a4(0x258));function generateShortUuid(){var _0x925b37=_0x1318a4;return Math[_0x925b37(0x28c)]()[_0x925b37(0x2ea)](0x24)['substring'](0x2,0x8);}__name(generateShortUuid,_0x1318a4(0x29a)),IconBase['displayName']='UniverIcon';var element$9={'tag':_0x1318a4(0x211),'attrs':{'fill':_0x1318a4(0x269),'viewBox':'0\x200\x2016\x2016','width':_0x1318a4(0x31b),'height':_0x1318a4(0x31b)},'children':[{'tag':_0x1318a4(0x2d1),'attrs':{'fill':_0x1318a4(0x27e),'d':_0x1318a4(0x2b1)}},{'tag':_0x1318a4(0x2d1),'attrs':{'fill':_0x1318a4(0x27e),'d':'M1.98967\x2010.2798C1.6583\x2010.2798\x201.38967\x2010.0112\x201.38967\x209.67983\x201.38967\x209.34846\x201.6583\x209.07983\x201.98967\x209.07983H6.50138C6.74406\x209.07983\x206.96284\x209.22602\x207.05571\x209.45022\x207.14858\x209.67443\x207.09725\x209.9325\x206.92565\x2010.1041L3.43819\x2013.5916H6.50138C6.83276\x2013.5916\x207.10138\x2013.8602\x207.10138\x2014.1916\x207.10138\x2014.5229\x206.83276\x2014.7916\x206.50138\x2014.7916H1.98967C1.74699\x2014.7916\x201.52821\x2014.6454\x201.43534\x2014.4212\x201.34247\x2014.197\x201.3938\x2013.9389\x201.5654\x2013.7673L5.05286\x2010.2798H1.98967zM5.1846\x201.86439C4.8641.989866\x203.62725.989866\x203.30674\x201.86439L1.34882\x207.20672C1.23479\x207.51786\x201.39458\x207.86252\x201.70571\x207.97655\x202.01684\x208.09058\x202.3615\x207.93079\x202.47553\x207.61966L3.06159\x206.02055\x203.06338\x206.02056H5.42975L6.01581\x207.61966C6.12984\x207.93079\x206.4745\x208.09058\x206.78563\x207.97655\x207.09677\x207.86252\x207.25655\x207.51786\x207.14252\x207.20672L5.1846\x201.86439zM4.98996\x204.82056L4.24567\x202.78971\x203.50138\x204.82056H4.98996z','fillRule':_0x1318a4(0x246),'clipRule':_0x1318a4(0x246)}}]},AscendingSingle=React['forwardRef'](function(_0x3d866c,_0x470b8c){var _0x5d22fe=_0x1318a4;return React['createElement'](IconBase,Object[_0x5d22fe(0x334)]({},_0x3d866c,{'id':_0x5d22fe(0x204),'ref':_0x470b8c,'icon':element$9}));});function _0x1542(){var _0xdc6f0e=['onClick','SortType','univer-custom-sort-panel-item','random','customSortPanelContainer','getTitles','DESC','CustomSortPanel','onMouseDown','use','univer-custom-sort-panel-item-handler','call','M8.6\x201.99991C8.60001\x201.66854\x208.33138\x201.39991\x208.00001\x201.3999C7.66864\x201.3999\x207.40001\x201.66853\x207.4\x201.9999L7.39996\x207.3999H1.9999C1.66853\x207.3999\x201.3999\x207.66853\x201.3999\x207.9999C1.3999\x208.33127\x201.66853\x208.5999\x201.9999\x208.5999H7.39995L7.3999\x2013.9999C7.3999\x2014.3313\x207.66853\x2014.5999\x207.9999\x2014.5999C8.33127\x2014.5999\x208.5999\x2014.3313\x208.5999\x2013.9999L8.59995\x208.5999H13.9999C14.3313\x208.5999\x2014.5999\x208.33127\x2014.5999\x207.9999C14.5999\x207.66853\x2014.3313\x207.3999\x2013.9999\x207.3999H8.59996L8.6\x201.99991Z','render','sortRangeDescCtxMenuFactory','WorksheetEditPermission','univer-custom-sort-panel-footer','generateShortUuid','MAIN_AREA','univer-embed-sort-btn-container','customSortColMenu','warn','34UqFyoM','sheet.menu.sheets-sort','Plugin','endColumn','DescendingSingle','disposeWithMe','findNextColIndex','univer-extend-confirm-content','RxDisposable','_logService','_sheetRenderService','#D9D9D9','_commandService','rxjs','colIndexTranslator','univer-custom-sort-panel-item-column-input-dropdown','M6\x205C6.55228\x205\x207\x204.55228\x207\x204\x207\x203.44772\x206.55228\x203\x206\x203\x205.44772\x203\x205\x203.44772\x205\x204\x205\x204.55228\x205.44772\x205\x206\x205zM6\x209C6.55228\x209\x207\x208.55229\x207\x208\x207\x207.44772\x206.55228\x207\x206\x207\x205.44772\x207\x205\x207.44772\x205\x208\x205\x208.55229\x205.44772\x209\x206\x209zM7\x2012C7\x2012.5523\x206.55228\x2013\x206\x2013\x205.44772\x2013\x205\x2012.5523\x205\x2012\x205\x2011.4477\x205.44772\x2011\x206\x2011\x206.55228\x2011\x207\x2011.4477\x207\x2012zM10\x205C10.5523\x205\x2011\x204.55228\x2011\x204\x2011\x203.44772\x2010.5523\x203\x2010\x203\x209.44771\x203\x209\x203.44772\x209\x204\x209\x204.55228\x209.44771\x205\x2010\x205zM11\x208C11\x208.55229\x2010.5523\x209\x2010\x209\x209.44771\x209\x209\x208.55229\x209\x208\x209\x207.44772\x209.44771\x207\x2010\x207\x2010.5523\x207\x2011\x207.44772\x2011\x208zM10\x2013C10.5523\x2013\x2011\x2012.5523\x2011\x2012\x2011\x2011.4477\x2010.5523\x2011\x2010\x2011\x209.44771\x2011\x209\x2011.4477\x209\x2012\x209\x2012.5523\x209.44771\x2013\x2010\x2013z','takeUntil','M12.4208\x2014.4667C12.4208\x2014.798\x2012.1522\x2015.0667\x2011.8208\x2015.0667C11.4895\x2015.0667\x2011.2208\x2014.798\x2011.2208\x2014.4667V2.98193L9.97861\x204.22417C9.7443\x204.45848\x209.3644\x204.45848\x209.13008\x204.22417C8.89577\x203.98985\x208.89577\x203.60995\x209.13008\x203.37564L11.3967\x201.10897C11.6311\x200.874657\x2012.011\x200.874657\x2012.2453\x201.10897L14.5119\x203.37564C14.7463\x203.60995\x2014.7463\x203.98985\x2014.5119\x204.22417C14.2776\x204.45848\x2013.8977\x204.45848\x2013.6634\x204.22417L12.4208\x202.9816V14.4667Z','currentTarget','_confirmService','SortRangeDescCommand','sortRangeAscExtCtxMenuFactory','colIndex','displayName','expand-ascending-single','112iAFMJQ','mergeCheck','_sheetsSortUIService','ILogService','sheets-sort.general.sort-desc-ext','_componentManager','prototype','univer-embed-sort-btn','ComponentManager','expand-descending-single','7512489ngymOw','sheets-sort.general.sort-desc','168rHfvKm','triggerSortDirectly','M1.9064\x203.20024C1.57503\x203.20024\x201.3064\x202.93161\x201.3064\x202.60024C1.3064\x202.26887\x201.57503\x202.00024\x201.9064\x202.00024H4.57306C4.90443\x202.00024\x205.17306\x202.26887\x205.17306\x202.60024C5.17306\x202.93161\x204.90443\x203.20024\x204.57306\x203.20024H1.9064ZM1.3064\x206.19985C1.3064\x206.53122\x201.57503\x206.79985\x201.9064\x206.79985H5.9064C6.23777\x206.79985\x206.5064\x206.53122\x206.5064\x206.19985C6.5064\x205.86848\x206.23777\x205.59985\x205.9064\x205.59985H1.9064C1.57503\x205.59985\x201.3064\x205.86848\x201.3064\x206.19985ZM1.9064\x2010.3997C1.57503\x2010.3997\x201.3064\x2010.1311\x201.3064\x209.79971C1.3064\x209.46834\x201.57503\x209.19971\x201.9064\x209.19971H7.23973C7.5711\x209.19971\x207.83973\x209.46834\x207.83973\x209.79971C7.83973\x2010.1311\x207.5711\x2010.3997\x207.23973\x2010.3997H1.9064ZM1.9064\x2013.9996C1.57503\x2013.9996\x201.3064\x2013.7309\x201.3064\x2013.3996C1.3064\x2013.0682\x201.57503\x2012.7996\x201.9064\x2012.7996H8.57306C8.90443\x2012.7996\x209.17306\x2013.0682\x209.17306\x2013.3996C9.17306\x2013.7309\x208.90443\x2013.9996\x208.57306\x2013.9996H1.9064Z',',\x20range:\x20','SetSelectionsOperation','defIds','SortRangeAscExtInCtxMenuCommand','sheets-sort-ui.config','getCurrentExclusiveRangeInterest$','showCustomSortPanel','pipe','useState','path','sheets-sort.dialog.first-row-check','addConditionText','_localeService','icon','_initMenu','sheet.command.sort-range-desc','extend','CustomSortSingle','createElement','SequenceSingle','univer-custom-sort-panel-container','setSelection','sortRangeCustomMenuFactory','sheets-sort.general.sort-asc','LocaleType','sheets-sort.error.formula-array','FORMULAS_INSERT','__defNormalProp',',\x20colIndex:\x20','COMMAND','customSortPanelItemColumnInput','sheet.command.sort-range-desc-ctx','get','0\x200\x2016\x2016','toString','customSortState','1752YLiRhg','from','__publicField','SheetsSortUIService','ZH_CN','connectInjector','IUniverInstanceService','alpha','customSortPanelItemOrder','CommandType','useCallback','M1.98967\x2010.2798C1.6583\x2010.2798\x201.38967\x2010.0112\x201.38967\x209.67983\x201.38967\x209.34846\x201.6583\x209.07983\x201.98967\x209.07983H6.50138C6.74406\x209.07983\x206.96284\x209.22602\x207.05571\x209.45022\x207.14858\x209.67443\x207.09725\x209.9325\x206.92565\x2010.1041L3.43819\x2013.5916H6.50138C6.83276\x2013.5916\x207.10138\x2013.8602\x207.10138\x2014.1916\x207.10138\x2014.5229\x206.83276\x2014.7916\x206.50138\x2014.7916H1.98967C1.74699\x2014.7916\x201.52821\x2014.6454\x201.43534\x2014.4212\x201.34247\x2014.197\x201.3938\x2013.9389\x201.5654\x2013.7673L5.05286\x2010.2798H1.98967zM5.1846\x201.86439C4.8641.989866\x203.62725.989866\x203.30674\x201.86439L1.34882\x207.20672C1.23479\x207.51786\x201.39458\x207.86252\x201.70571\x207.97655\x202.01684\x208.09058\x202.3615\x207.93079\x202.47553\x207.61966L3.06159\x206.02055\x203.06338\x206.02056H5.42975L6.01581\x207.61966C6.12984\x207.93079\x206.4745\x208.09058\x206.78563\x207.97655\x207.09677\x207.86252\x207.25655\x207.51786\x207.14252\x207.20672L5.1846\x201.86439zM4.98996\x204.82056L4.24567\x202.78971\x203.50138\x204.82056H4.98996z','customSortPanelItemColumn','M1.9064\x2012.7998C1.57503\x2012.7998\x201.3064\x2013.0684\x201.3064\x2013.3998C1.3064\x2013.7311\x201.57503\x2013.9998\x201.9064\x2013.9998H4.57306C4.90443\x2013.9998\x205.17306\x2013.7311\x205.17306\x2013.3998C5.17306\x2013.0684\x204.90443\x2012.7998\x204.57306\x2012.7998H1.9064ZM1.3064\x209.80015C1.3064\x209.46878\x201.57503\x209.20015\x201.9064\x209.20015H5.9064C6.23777\x209.20015\x206.5064\x209.46878\x206.5064\x209.80015C6.5064\x2010.1315\x206.23777\x2010.4001\x205.9064\x2010.4001H1.9064C1.57503\x2010.4001\x201.3064\x2010.1315\x201.3064\x209.80015ZM1.9064\x205.60029C1.57503\x205.60029\x201.3064\x205.86892\x201.3064\x206.20029C1.3064\x206.53166\x201.57503\x206.80029\x201.9064\x206.80029H7.23973C7.5711\x206.80029\x207.83973\x206.53166\x207.83973\x206.20029C7.83973\x205.86892\x207.5711\x205.60029\x207.23973\x205.60029H1.9064ZM1.9064\x202.00044C1.57503\x202.00044\x201.3064\x202.26907\x201.3064\x202.60044C1.3064\x202.93181\x201.57503\x203.20044\x201.9064\x203.20044H8.57306C8.90443\x203.20044\x209.17306\x202.93181\x209.17306\x202.60044C9.17306\x202.26907\x208.90443\x202.00044\x208.57306\x202.00044H1.9064Z','FORMULA_ARRAY','_dialogService','map','confirm','mask0_622_8','stopPropagation','conditionList','idSuffix','_sheetsSortService','ExpandAscendingSingle','69485liGrDn','50746YcLiCc',',\x20subUnitId:\x20','ContextMenuGroup','getUnitId','SortRangeAscExtCommand','__decorateClass$2','univer-embed-sort-btn-icon','_layoutService','_check','dispose$','emptyCheck','embedSortBtnContainer','_injector','M1.14014\x203.73989C1.14014\x202.30396\x202.3042\x201.13989\x203.74014\x201.13989H12.2601C13.6961\x201.13989\x2014.8601\x202.30395\x2014.8601\x203.73989V12.2599C14.8601\x2013.6958\x2013.6961\x2014.8599\x2012.2601\x2014.8599H3.74014C2.3042\x2014.8599\x201.14014\x2013.6958\x201.14014\x2012.2599V3.73989ZM2.34014\x205.86724V12.2599C2.34014\x2013.0331\x202.96694\x2013.6599\x203.74014\x2013.6599H12.2601C13.0333\x2013.6599\x2013.6601\x2013.0331\x2013.6601\x2012.2599V5.86724H2.34014ZM13.6601\x204.66724H2.34014V3.73989C2.34014\x202.9667\x202.96694\x202.33989\x203.74014\x202.33989H12.2601C13.0333\x202.33989\x2013.6601\x202.96669\x2013.6601\x203.73989V4.66724Z','MERGE_ERROR','_initUI','embedSortBtnDesc','extend-sort-range-dialog','push','forEach','ASC','sortRangeDescMenuFactory','1em','UniverSheetsSortPlugin','sheets-sort.general.sort-custom','UniverSheetsSortUIPlugin','getValue','formulaCheck','MenuItemType','embedSortBtnIcon','WorksheetSortPermission','sortRangeAscCtxMenuFactory','@univerjs/sheets','_configService','sortRangeCustomCtxMenuFactory','IConfirmService','getCurrentRangeDisable$','className','FILTER_PANEL_EMBED_POINT','increase-single','SUBITEMS','SortRangeCustomInCtxMenuCommand','useDependency','pluginName','string','AscendingSingle','xlink:href','assign','univer-custom-sort-panel-item-order-radio','singleCheck','customSortPanelExt','chatAtABC','fill','customSortPanelItemOrderRadio','sheets-sort.dialog.add-condition','BUTTON','onChange','getActiveSheet','366pmxFsU','sheets-sort.general.sort-asc-ext','defineProperty','_openCustomSortPanel','getCurrentLocale','SortRangeAscCommand','BehaviorSubject','univerjs-icon\x20univerjs-icon-','EMPTY_ERROR','customSortState$','forwardRef','firstRowCheck','name','Checkbox','register','SheetsSortService','index','customSortPanelItemColumnInputDropdown','customSortPanelItemOrderRadioCn','check-mark-single','sheets-sort.dialog.sort-reminder','81399HvbmXS','custom-sort-single','SheetsSelectionsService','show','_customSortState$','getMenuHiddenObservable','univer-add-condition-text','M12.4208\x201.53335C12.4208\x201.20198\x2012.1522\x200.93335\x2011.8208\x200.93335C11.4895\x200.93335\x2011.2208\x201.20198\x2011.2208\x201.53335V13.0181L9.97861\x2011.7758C9.7443\x2011.5415\x209.3644\x2011.5415\x209.13008\x2011.7758C8.89577\x2012.0101\x208.89577\x2012.39\x209.13008\x2012.6244L11.3967\x2014.891C11.6311\x2015.1253\x2012.011\x2015.1253\x2012.2453\x2014.891L14.5119\x2012.6244C14.7463\x2012.39\x2014.7463\x2012.0101\x2014.5119\x2011.7758C14.2776\x2011.5415\x2013.8977\x2011.5415\x2013.6634\x2011.7758L12.4208\x2013.0184V1.53335Z','SheetsRenderService','Dropdown','symbol','M4.75332\x205.22217C3.86966\x205.22217\x203.15332\x205.93851\x203.15332\x206.82217V13.1332C3.15332\x2014.2377\x204.04875\x2015.1332\x205.15332\x2015.1332H10.8465C11.9511\x2015.1332\x2012.8465\x2014.2377\x2012.8465\x2013.1331V6.82217C12.8465\x205.93851\x2012.1302\x205.22217\x2011.2465\x205.22217H4.75332ZM4.35332\x206.82217C4.35332\x206.60125\x204.53241\x206.42217\x204.75332\x206.42217H11.2465C11.4674\x206.42217\x2011.6465\x206.60125\x2011.6465\x206.82217V13.1331C11.6465\x2013.575\x2011.2884\x2013.9331\x2010.8465\x2013.9331H5.15332C4.71149\x2013.9331\x204.35332\x2013.575\x204.35332\x2013.1332V6.82217Z','replace','applySort','triggerSortCustomize','_config','trim','descending-single','34955nUwwVG','mergeMenu','EN_US','div','_detectSortLocation','current','sheets-sort.general.sort-asc-cur','sheets-sort.general.sort-desc-cur','SINGLE_ERROR','getOwnPropertySymbols','sequence-single','scrollTop','showCheckError','_closePanel','DependentOn','onScroll','sheet.command.sort-range-asc','MoreDownSingle','startColumn','Injector','Tools','WorkbookEditablePermission','Cannot\x20find\x20the\x20target\x20to\x20sort.\x20unitId:\x20','children','Radio','click','267656dNjkLa','ContextMenuPosition','attrs','ascending-\x20single','next','embedSortBtnAsc','getCurrentUnitForType','@univerjs/ui','_univerInstanceService','colorChannel1','DraggableList','RibbonStartGroup','delete-empty-single','univer-embed-sort-btn-desc','useEffect','getCurrentLastSelection','svg','ExpandDescendingSingle','replaceRuntimeIdsAndExtInAttrs','univer-custom-sort-col-menu','registerSkeletonChangingMutations','custom-sort-dialog','closeCustomSortPanel','subscribe','extendConfirmRadioGroup','SortOptionItem','tag','DATA','sort-range-check-error','Inject','length','univer-add-condition','keep','sheet.command.sort-range-custom-ctx','type','getCell','sortRangeDescExtMenuFactory','addConditionDisable','@univerjs/core','_initCommands','sortRangeAscMenuFactory','showExtendConfirm','span','CheckMarkSingle','getSheetCommandTarget','univer-custom-sort-panel-item-column-input','onRendered','__decorateParam','sheets-sort.dialog.sort-reminder-desc','getPrimaryForRange','sheets-sort.dialog.sort-reminder-no','sortRangeCtxMenuFactory','__decorateClass$1','sheet.command.sort-range-asc-ext','onVisibleChange','customSortPanelItemRemove','univer-custom-sort-panel-footer-btn','88gVVGJa','RangeProtectionPermissionEditPoint','__decorateParam$2','IMenuManagerService','range','SortRangeDescInCtxMenuCommand','location','serializeRange','sheets-sort.dialog.confirm','customSortPanelContent','sheet.command.sort-range-desc-ext-ctx','ICommandService','evenodd','extendConfirmContent','registerCommand','sheets-sort.general.sort','getSheetBySheetId','onStarting','subUnitId','UNIVER_SHEET','univer-condition-list','hasOwnProperty','splice','extend-confirm-desc','entries','_selectionManagerService','customSortPanelItemHandler','userSpaceOnUse','primary','url(#$1','replaceRuntimeIdsInDefs','customSortPanelItemColumnInputText','getUnit','embedSortBtn','customSortColMenuItemDesc','M11.3536\x206.14645C11.5488\x206.34171\x2011.5488\x206.65829\x2011.3536\x206.85355L8.35355\x209.85355C8.15829\x2010.0488\x207.84171\x2010.0488\x207.64645\x209.85355L4.64645\x206.85355C4.45118\x206.65829\x204.45118\x206.34171\x204.64645\x206.14645C4.84171\x205.95118\x205.15829\x205.95118\x205.35355\x206.14645L8\x208.79289L10.6464\x206.14645C10.8417\x205.95118\x2011.1583\x205.95118\x2011.3536\x206.14645Z','registerComponent','IncreaseSingle','scrollHeight','sortRangeMenuFactory','@univerjs/design','SortRangeDescExtInCtxMenuCommand','concat','IDialogService','has','open','getOwnPropertyDescriptor','none','findIndex','sheets-sort.error.empty','function','default','Column\x20\x22','more-down-single','UniverInstanceType','expandToContinuousRange','add','label','cancel','LocaleService','customSortPanelFooterBtn','@univerjs/sheets-ui','handler','sheet.command.sort-range-asc-ext-ctx','customSortPanelItemHead','indexOf','_uiPartsService','_menuManagerService','currentColor','actualColumn','filter','univer-custom-sort-panel-ext','M12.4267\x2014.2667C12.4267\x2014.5981\x2012.1581\x2014.8667\x2011.8267\x2014.8667C11.4953\x2014.8667\x2011.2267\x2014.5981\x2011.2267\x2014.2667V3.18198L9.98447\x204.42422C9.75015\x204.65853\x209.37026\x204.65853\x209.13594\x204.42422C8.90163\x204.1899\x208.90163\x203.81\x209.13594\x203.57569L11.4026\x201.30902C11.6369\x201.07471\x2012.0168\x201.07471\x2012.2511\x201.30902L14.5178\x203.57569C14.7521\x203.81\x2014.7521\x204.1899\x2014.5178\x204.42422C14.2835\x204.65853\x2013.9036\x204.65853\x2013.6693\x204.42422L12.4267\x203.18165V14.2667Z','1080520nAKIpV','sheet.command.sort-range-desc-ext','throttle','IConfigService','@univerjs/engine-formula','startRow'];_0x1542=function(){return _0xdc6f0e;};return _0x1542();}AscendingSingle[_0x1318a4(0x2b7)]=_0x1318a4(0x332);var element$8={'tag':_0x1318a4(0x211),'attrs':{'fill':_0x1318a4(0x269),'viewBox':_0x1318a4(0x2e9),'width':_0x1318a4(0x31b),'height':_0x1318a4(0x31b)},'children':[{'tag':_0x1318a4(0x2d1),'attrs':{'fill':'currentColor','d':'M14.1544\x203.75557C14.3887\x203.98988\x2014.3887\x204.36978\x2014.1544\x204.6041L6.51409\x2012.2444C6.40157\x2012.3569\x206.24896\x2012.4201\x206.08983\x2012.4201C5.9307\x2012.4201\x205.77808\x2012.3569\x205.66556\x2012.2444L1.84541\x208.42425C1.6111\x208.18993\x201.6111\x207.81003\x201.84541\x207.57572C2.07973\x207.34141\x202.45963\x207.34141\x202.69394\x207.57572L6.08983\x2010.9716L13.3059\x203.75557C13.5402\x203.52126\x2013.9201\x203.52126\x2014.1544\x203.75557Z','fillRule':'evenodd','clipRule':'evenodd'}}]},CheckMarkSingle=React[_0x1318a4(0x349)](function(_0x5e8f31,_0x47bae0){var _0x112639=_0x1318a4;return React['createElement'](IconBase,Object[_0x112639(0x334)]({},_0x5e8f31,{'id':_0x112639(0x352),'ref':_0x47bae0,'icon':element$8}));});CheckMarkSingle['displayName']=_0x1318a4(0x22c);var element$7={'tag':_0x1318a4(0x211),'attrs':{'fill':_0x1318a4(0x269),'viewBox':_0x1318a4(0x2e9),'width':_0x1318a4(0x31b),'height':_0x1318a4(0x31b)},'children':[{'tag':_0x1318a4(0x2d1),'attrs':{'fill':_0x1318a4(0x27e),'d':'M9.77445\x209.24306L9.77457\x2011.9573C9.77458\x2012.2887\x209.50597\x2012.5574\x209.17459\x2012.5574\x208.84322\x2012.5574\x208.57458\x2012.2888\x208.57457\x2011.9574L8.57439\x207.79509C8.57438\x207.46372\x208.84299\x207.19508\x209.17436\x207.19507\x209.3281\x207.19493\x209.48196\x207.25351\x209.59925\x207.3708L11.3465\x209.11808C11.5808\x209.3524\x2011.5808\x209.7323\x2011.3465\x209.96661\x2011.1122\x2010.2009\x2010.7323\x2010.2009\x2010.498\x209.96661L9.77445\x209.24306zM6.22584\x2010.5094L6.22572\x207.79514C6.22571\x207.46377\x206.49433\x207.19513\x206.8257\x207.19512\x207.15707\x207.1951\x207.42571\x207.46372\x207.42572\x207.79509L7.4259\x2011.9574C7.42592\x2012.2888\x207.1573\x2012.5574\x206.82593\x2012.5574\x206.67228\x2012.5575\x206.51828\x2012.4989\x206.40104\x2012.3817L4.65376\x2010.6344C4.41945\x2010.4001\x204.41945\x2010.0202\x204.65376\x209.78588\x204.88808\x209.55156\x205.26798\x209.55156\x205.50229\x209.78588L6.22584\x2010.5094z'}},{'tag':_0x1318a4(0x2d1),'attrs':{'fill':_0x1318a4(0x27e),'d':_0x1318a4(0x312),'fillRule':_0x1318a4(0x246),'clipRule':'evenodd'}}]},CustomSortSingle=React[_0x1318a4(0x349)](function(_0x2522b2,_0x48b924){var _0x40b307=_0x1318a4;return React['createElement'](IconBase,Object['assign']({},_0x2522b2,{'id':_0x40b307(0x355),'ref':_0x48b924,'icon':element$7}));});CustomSortSingle[_0x1318a4(0x2b7)]=_0x1318a4(0x2d9);var element$6={'tag':'svg','attrs':{'fill':_0x1318a4(0x269),'viewBox':_0x1318a4(0x2e9),'width':_0x1318a4(0x31b),'height':_0x1318a4(0x31b)},'children':[{'tag':_0x1318a4(0x2d1),'attrs':{'fill':_0x1318a4(0x27e),'d':'M5.3313\x201.4667C5.3313\x201.13533\x205.59993.866699\x205.9313.866699H10.069C10.4004.866699\x2010.669\x201.13533\x2010.669\x201.4667\x2010.669\x201.79807\x2010.4004\x202.0667\x2010.069\x202.0667H5.9313C5.59993\x202.0667\x205.3313\x201.79807\x205.3313\x201.4667zM1.09985\x203.64443C1.09985\x203.31306\x201.36848\x203.04443\x201.69985\x203.04443H14.2999C14.6312\x203.04443\x2014.8999\x203.31306\x2014.8999\x203.64443\x2014.8999\x203.9758\x2014.6312\x204.24443\x2014.2999\x204.24443H1.69985C1.36848\x204.24443\x201.09985\x203.9758\x201.09985\x203.64443z'}},{'tag':_0x1318a4(0x2d1),'attrs':{'fill':'currentColor','d':_0x1318a4(0x35f),'fillRule':_0x1318a4(0x246),'clipRule':_0x1318a4(0x246)}}]},DeleteEmptySingle=React[_0x1318a4(0x349)](function(_0x51ea2e,_0x3b2ec8){var _0x417c13=_0x1318a4;return React[_0x417c13(0x2da)](IconBase,Object['assign']({},_0x51ea2e,{'id':_0x417c13(0x20d),'ref':_0x3b2ec8,'icon':element$6}));});DeleteEmptySingle[_0x1318a4(0x2b7)]='DeleteEmptySingle';var element$5={'tag':'svg','attrs':{'fill':_0x1318a4(0x269),'viewBox':_0x1318a4(0x2e9),'width':_0x1318a4(0x31b),'height':_0x1318a4(0x31b)},'children':[{'tag':_0x1318a4(0x2d1),'attrs':{'fill':_0x1318a4(0x27e),'d':_0x1318a4(0x35b)}},{'tag':_0x1318a4(0x2d1),'attrs':{'fill':_0x1318a4(0x27e),'d':_0x1318a4(0x2f7),'fillRule':_0x1318a4(0x246),'clipRule':_0x1318a4(0x246)}}]},DescendingSingle=React[_0x1318a4(0x349)](function(_0x496f53,_0x54030f){var _0x10683e=_0x1318a4;return React[_0x10683e(0x2da)](IconBase,Object[_0x10683e(0x334)]({},_0x496f53,{'id':_0x10683e(0x365),'ref':_0x54030f,'icon':element$5}));});DescendingSingle[_0x1318a4(0x2b7)]=_0x1318a4(0x2a3);function _0x24f9(_0x3137a5,_0x5ad26f){var _0x15425e=_0x1542();return _0x24f9=function(_0x24f9c6,_0x111144){_0x24f9c6=_0x24f9c6-0x1e7;var _0x14bd4b=_0x15425e[_0x24f9c6];return _0x14bd4b;},_0x24f9(_0x3137a5,_0x5ad26f);}var element$4={'tag':_0x1318a4(0x211),'attrs':{'fill':'none','viewBox':_0x1318a4(0x2e9),'width':_0x1318a4(0x31b),'height':_0x1318a4(0x31b)},'children':[{'tag':_0x1318a4(0x2d1),'attrs':{'fill':_0x1318a4(0x27e),'d':_0x1318a4(0x2c7),'fillRule':_0x1318a4(0x246),'clipRule':_0x1318a4(0x246)}},{'tag':_0x1318a4(0x2d1),'attrs':{'fill':_0x1318a4(0x27e),'d':_0x1318a4(0x282)}}]},ExpandAscendingSingle=React[_0x1318a4(0x349)](function(_0x21de04,_0x160dec){var _0x3d618e=_0x1318a4;return React[_0x3d618e(0x2da)](IconBase,Object[_0x3d618e(0x334)]({},_0x21de04,{'id':_0x3d618e(0x2b8),'ref':_0x160dec,'icon':element$4}));});ExpandAscendingSingle[_0x1318a4(0x2b7)]=_0x1318a4(0x303);var element$3={'tag':_0x1318a4(0x211),'attrs':{'fill':'none','viewBox':_0x1318a4(0x2e9),'width':_0x1318a4(0x31b),'height':_0x1318a4(0x31b)},'children':[{'tag':_0x1318a4(0x2d1),'attrs':{'fill':'currentColor','d':_0x1318a4(0x2f9),'fillRule':'evenodd','clipRule':_0x1318a4(0x246)}},{'tag':'path','attrs':{'fill':'currentColor','d':'M12.4267\x201.7333C12.4267\x201.40193\x2012.1581\x201.1333\x2011.8267\x201.1333C11.4953\x201.1333\x2011.2267\x201.40193\x2011.2267\x201.7333V12.818L9.98447\x2011.5758C9.75015\x2011.3415\x209.37026\x2011.3415\x209.13594\x2011.5758C8.90163\x2011.8101\x208.90163\x2012.19\x209.13594\x2012.4243L11.4026\x2014.691C11.6369\x2014.9253\x2012.0168\x2014.9253\x2012.2511\x2014.691L14.5178\x2012.4243C14.7521\x2012.19\x2014.7521\x2011.8101\x2014.5178\x2011.5758C14.2835\x2011.3415\x2013.9036\x2011.3415\x2013.6693\x2011.5758L12.4267\x2012.8183V1.7333Z'}}]},ExpandDescendingSingle=React[_0x1318a4(0x349)](function(_0x9e2a97,_0x2fd3b9){var _0x4a4577=_0x1318a4;return React[_0x4a4577(0x2da)](IconBase,Object[_0x4a4577(0x334)]({},_0x9e2a97,{'id':_0x4a4577(0x2c2),'ref':_0x2fd3b9,'icon':element$3}));});ExpandDescendingSingle[_0x1318a4(0x2b7)]=_0x1318a4(0x212);var element$2={'tag':'svg','attrs':{'fill':_0x1318a4(0x269),'viewBox':_0x1318a4(0x2e9),'width':_0x1318a4(0x31b),'height':_0x1318a4(0x31b)},'children':[{'tag':_0x1318a4(0x2d1),'attrs':{'fill':_0x1318a4(0x27e),'d':_0x1318a4(0x295)}}]},IncreaseSingle=React[_0x1318a4(0x349)](function(_0x58f17f,_0x44f0c4){var _0x3f0384=_0x1318a4;return React[_0x3f0384(0x2da)](IconBase,Object['assign']({},_0x58f17f,{'id':_0x3f0384(0x32c),'ref':_0x44f0c4,'icon':element$2}));});IncreaseSingle[_0x1318a4(0x2b7)]=_0x1318a4(0x25f);var element$1={'tag':_0x1318a4(0x211),'attrs':{'fill':_0x1318a4(0x269),'viewBox':_0x1318a4(0x2e9),'width':_0x1318a4(0x31b),'height':_0x1318a4(0x31b)},'children':[{'tag':'path','attrs':{'fill':_0x1318a4(0x27e),'d':_0x1318a4(0x25d),'fillRule':'evenodd','clipRule':_0x1318a4(0x246)}}]},MoreDownSingle=React[_0x1318a4(0x349)](function(_0xcd40af,_0x4aab0d){var _0x369a7e=_0x1318a4;return React[_0x369a7e(0x2da)](IconBase,Object['assign']({},_0xcd40af,{'id':_0x369a7e(0x26f),'ref':_0x4aab0d,'icon':element$1}));});MoreDownSingle[_0x1318a4(0x2b7)]=_0x1318a4(0x1f8);var element={'tag':_0x1318a4(0x211),'attrs':{'fill':_0x1318a4(0x269),'viewBox':_0x1318a4(0x2e9),'width':_0x1318a4(0x31b),'height':'1em'},'children':[{'tag':'mask','attrs':{'id':_0x1318a4(0x2fe),'style':{'maskType':_0x1318a4(0x2f3)},'width':0x10,'height':0x10,'x':0x0,'y':0x0,'maskUnits':_0x1318a4(0x255)},'children':[{'tag':_0x1318a4(0x2d1),'attrs':{'fill':_0x1318a4(0x2aa),'d':'M0\x200H16V16H0z'}}]},{'tag':'g','attrs':{'fill':_0x1318a4(0x27e),'mask':'url(#mask0_622_8)'},'children':[{'tag':'path','attrs':{'d':_0x1318a4(0x2af)}}]}]},SequenceSingle=React[_0x1318a4(0x349)](function(_0x336091,_0x37bef1){var _0x400c38=_0x1318a4;return React[_0x400c38(0x2da)](IconBase,Object[_0x400c38(0x334)]({},_0x336091,{'id':_0x400c38(0x1f1),'ref':_0x37bef1,'icon':element}));});SequenceSingle[_0x1318a4(0x2b7)]=_0x1318a4(0x2db);const extendConfirmContent=_0x1318a4(0x2a6),extendConfirmRadioGroup='univer-extend-confirm-radio-group',customSortPanelContainer=_0x1318a4(0x2dc),customSortPanelExt=_0x1318a4(0x281),addCondition=_0x1318a4(0x220),addConditionText=_0x1318a4(0x35a),addConditionDisable='univer-add-condition-disable',customSortPanelFooter=_0x1318a4(0x299),customSortPanelFooterBtn=_0x1318a4(0x239),customSortPanelItem=_0x1318a4(0x28b),customSortPanelItemHead='univer-custom-sort-panel-item-head',customSortPanelItemHandler=_0x1318a4(0x293),customSortPanelItemRemove='univer-custom-sort-panel-item-remove',customSortPanelItemColumnInput=_0x1318a4(0x22e),customSortPanelItemColumnInputDropdown=_0x1318a4(0x2ae),customSortPanelItemColumnInputText='univer-custom-sort-panel-item-column-input-text',customSortPanelItemOrderRadio=_0x1318a4(0x335),customSortPanelItemOrderRadioCn='univer-custom-sort-panel-item-order-radio-cn',conditionList=_0x1318a4(0x24e),embedSortBtnContainer=_0x1318a4(0x29c),embedSortBtn=_0x1318a4(0x2c0),embedSortBtnAsc='univer-embed-sort-btn-asc',embedSortBtnDesc=_0x1318a4(0x20e),embedSortBtnIcon=_0x1318a4(0x30b),customSortColMenu=_0x1318a4(0x214),customSortColMenuItem='univer-custom-sort-col-menu-item',customSortColMenuItemDesc='univer-custom-sort-col-menu-item-desc',styles={'extendConfirmContent':extendConfirmContent,'extendConfirmRadioGroup':extendConfirmRadioGroup,'customSortPanelContainer':customSortPanelContainer,'customSortPanelExt':customSortPanelExt,'addCondition':addCondition,'addConditionText':addConditionText,'addConditionDisable':addConditionDisable,'customSortPanelFooter':customSortPanelFooter,'customSortPanelFooterBtn':customSortPanelFooterBtn,'customSortPanelItem':customSortPanelItem,'customSortPanelItemHead':customSortPanelItemHead,'customSortPanelItemHandler':customSortPanelItemHandler,'customSortPanelItemRemove':customSortPanelItemRemove,'customSortPanelItemColumnInput':customSortPanelItemColumnInput,'customSortPanelItemColumnInputDropdown':customSortPanelItemColumnInputDropdown,'customSortPanelItemColumnInputText':customSortPanelItemColumnInputText,'customSortPanelItemOrderRadio':customSortPanelItemOrderRadio,'customSortPanelItemOrderRadioCn':customSortPanelItemOrderRadioCn,'conditionList':conditionList,'embedSortBtnContainer':embedSortBtnContainer,'embedSortBtn':embedSortBtn,'embedSortBtnAsc':embedSortBtnAsc,'embedSortBtnDesc':embedSortBtnDesc,'embedSortBtnIcon':embedSortBtnIcon,'customSortColMenu':customSortColMenu,'customSortColMenuItem':customSortColMenuItem,'customSortColMenuItemDesc':customSortColMenuItemDesc},ExtendConfirm=__name(_0x481522=>{var _0x4f95a2=_0x1318a4;const [_0x297e46,_0x5e2496]=React['useState']('0'),_0x2e9e0b=core['useDependency'](core[_0x4f95a2(0x275)]);return React[_0x4f95a2(0x2da)](_0x4f95a2(0x1ea),{'className':styles[_0x4f95a2(0x247)]},React['createElement']('div',{'className':_0x4f95a2(0x251)},_0x2e9e0b['t'](_0x4f95a2(0x231))),React['createElement'](design['RadioGroup'],{'className':styles[_0x4f95a2(0x219)],'value':_0x297e46,'direction':'vertical','onChange':__name(_0x4e41cf=>{var _0x238ef7=_0x4f95a2;_0x5e2496(_0x4e41cf),_0x481522[_0x238ef7(0x33d)](_0x4e41cf);},_0x4f95a2(0x33d))},React[_0x4f95a2(0x2da)](design[_0x4f95a2(0x1ff)],{'value':'0'},_0x2e9e0b['t'](_0x4f95a2(0x233))),React[_0x4f95a2(0x2da)](design[_0x4f95a2(0x1ff)],{'value':'1'},_0x2e9e0b['t']('sheets-sort.dialog.sort-reminder-ext'))));},'ExtendConfirm');var __defProp$2=Object[_0x1318a4(0x341)],__getOwnPropDesc$2=Object[_0x1318a4(0x268)],__decorateClass$2=__name((_0x132cee,_0x1ce44,_0x52ccdc,_0x31b1ff)=>{var _0x7559c2=_0x1318a4;for(var _0x287fb3=_0x31b1ff>0x1?void 0x0:_0x31b1ff?__getOwnPropDesc$2(_0x1ce44,_0x52ccdc):_0x1ce44,_0x18df95=_0x132cee[_0x7559c2(0x21f)]-0x1,_0x538723;_0x18df95>=0x0;_0x18df95--)(_0x538723=_0x132cee[_0x18df95])&&(_0x287fb3=(_0x31b1ff?_0x538723(_0x1ce44,_0x52ccdc,_0x287fb3):_0x538723(_0x287fb3))||_0x287fb3);return _0x31b1ff&&_0x287fb3&&__defProp$2(_0x1ce44,_0x52ccdc,_0x287fb3),_0x287fb3;},_0x1318a4(0x30a)),__decorateParam$2=__name((_0x273131,_0xac744e)=>(_0x3022f4,_0x15bfee)=>_0xac744e(_0x3022f4,_0x15bfee,_0x273131),_0x1318a4(0x23c));const SORT_ERROR_MESSAGE={'MERGE_ERROR':'sheets-sort.error.merge-size','EMPTY_ERROR':_0x1318a4(0x26b),'SINGLE_ERROR':'sheets-sort.error.single','FORMULA_ARRAY':_0x1318a4(0x2e1)};var _a;let SheetsSortUIService=(_a=class extends core['Disposable']{constructor(_0x5daa61,_0x57de0f,_0x9c85bd,_0x3a02e3,_0x2afffd,_0x304785,_0x3f5012){var _0x455596=_0x1318a4;super(),__publicField(this,_0x455596(0x358),new rxjs[(_0x455596(0x345))](null)),__publicField(this,_0x455596(0x348),this['_customSortState$']['asObservable']()),(this[_0x455596(0x209)]=_0x5daa61,this[_0x455596(0x2b3)]=_0x57de0f,this[_0x455596(0x2a8)]=_0x9c85bd,this['_selectionManagerService']=_0x3a02e3,this[_0x455596(0x302)]=_0x2afffd,this['_localeService']=_0x304785,this['_commandService']=_0x3f5012);}async[_0x1318a4(0x2c6)](_0x2a1c55,_0x7bff90,_0x5a97bb){var _0x597939=_0x1318a4;const _0x58e0c4=_0x5a97bb||await this[_0x597939(0x1eb)](_0x7bff90);if(!_0x58e0c4||!this[_0x597939(0x30d)](_0x58e0c4))return!0x1;const _0x4a7841={'orderRules':[{'type':_0x2a1c55?sheetsSort[_0x597939(0x28a)][_0x597939(0x319)]:sheetsSort[_0x597939(0x28a)][_0x597939(0x28f)],'colIndex':_0x58e0c4[_0x597939(0x2b6)]}],'range':_0x58e0c4[_0x597939(0x23e)]};return this[_0x597939(0x302)][_0x597939(0x361)](_0x4a7841,_0x58e0c4['unitId'],_0x58e0c4[_0x597939(0x24c)]),!0x0;}async[_0x1318a4(0x362)](){var _0x5b1335=_0x1318a4;const _0x401409=await this[_0x5b1335(0x1eb)]();return!_0x401409||!this['_check'](_0x401409)?!0x1:(this[_0x5b1335(0x2ce)](_0x401409),!0x0);}[_0x1318a4(0x2eb)](){var _0x3f6b26=_0x1318a4;return this['_customSortState$'][_0x3f6b26(0x31f)]();}[_0x1318a4(0x28e)](_0x16773a){var _0x3bdb27=_0x1318a4,_0x489bb1,_0xb80ae3;const _0x1ccdc0=(_0x489bb1=this[_0x3bdb27(0x2eb)]())==null?void 0x0:_0x489bb1[_0x3bdb27(0x240)];if(!_0x1ccdc0)return[];const {unitId:_0x403629,subUnitId:_0x2eeed7,range:_0x186c05}=_0x1ccdc0,_0x4e9722=(_0xb80ae3=this[_0x3bdb27(0x209)][_0x3bdb27(0x25a)](_0x403629))==null?void 0x0:_0xb80ae3['getSheetBySheetId'](_0x2eeed7);if(!_0x4e9722)return[];const _0x481e43=colIndexTranslator(this['_localeService']);return Array[_0x3bdb27(0x2ed)]({'length':_0x186c05[_0x3bdb27(0x2a2)]-_0x186c05[_0x3bdb27(0x1f9)]+0x1},(_0x24c975,_0x1266ce)=>{var _0x55f4b8=_0x3bdb27,_0x4b02da;const _0x2a392d=(_0x4b02da=_0x4e9722[_0x55f4b8(0x224)](_0x186c05[_0x55f4b8(0x288)],_0x1266ce+_0x186c05[_0x55f4b8(0x1f9)]))==null?void 0x0:_0x4b02da['v'];return{'index':_0x1266ce+_0x186c05[_0x55f4b8(0x1f9)],'label':_0x16773a?''+(_0x2a392d!=null?_0x2a392d:_0x481e43(_0x1266ce+_0x186c05[_0x55f4b8(0x1f9)])):_0x481e43(_0x1266ce+_0x186c05[_0x55f4b8(0x1f9)])};});}[_0x1318a4(0x2dd)](_0x1dfeb5,_0x21b1ad,_0x5b31a5){var _0x1845ba=_0x1318a4,_0x4cafb1;const _0x588852=(_0x4cafb1=this['_univerInstanceService']['getUnit'](_0x1dfeb5))==null?void 0x0:_0x4cafb1[_0x1845ba(0x24a)](_0x21b1ad);if(!_0x588852)return;const _0x3d040a={'unitId':_0x1dfeb5,'subUnitId':_0x21b1ad,'selections':[{'range':_0x5b31a5,'primary':sheets[_0x1845ba(0x232)](_0x5b31a5,_0x588852),'style':null}]};this['_commandService']['executeCommand'](sheets[_0x1845ba(0x2c9)]['id'],_0x3d040a);}async[_0x1318a4(0x1f3)](_0x258f2e){var _0x2cb897=_0x1318a4;return await this[_0x2cb897(0x2b3)][_0x2cb897(0x2fd)]({'id':_0x2cb897(0x21d),'title':{'title':this['_localeService']['t']('info.tooltip')},'children':{'title':React['createElement'](_0x2cb897(0x1ea),null,this[_0x2cb897(0x2d4)]['t'](_0x258f2e))}});}async[_0x1318a4(0x22a)](){var _0x1edeba=_0x1318a4;let _0x20ea24=!0x1;return await this['_confirmService'][_0x1edeba(0x2fd)]({'id':_0x1edeba(0x316),'title':{'title':this[_0x1edeba(0x2d4)]['t'](_0x1edeba(0x353))},'children':{'title':React['createElement'](ExtendConfirm,{'onChange':__name(_0x2fbf27=>{_0x20ea24=_0x2fbf27==='1';},'onChange')})},'width':0x190})?_0x20ea24?_0x1edeba(0x2d8):_0x1edeba(0x221):_0x1edeba(0x274);}[_0x1318a4(0x2ce)](_0x559f31){var _0x2649ab=_0x1318a4;this[_0x2649ab(0x358)]['next']({'location':_0x559f31,'show':!0x0});}[_0x1318a4(0x217)](){var _0x230555=_0x1318a4;this[_0x230555(0x358)][_0x230555(0x205)]({'show':!0x1});}['_check'](_0x551f67){var _0x4f1e33=_0x1318a4;return this['_sheetsSortService'][_0x4f1e33(0x336)](_0x551f67)?this[_0x4f1e33(0x302)][_0x4f1e33(0x2ba)](_0x551f67)?this[_0x4f1e33(0x302)][_0x4f1e33(0x320)](_0x551f67)?this[_0x4f1e33(0x302)][_0x4f1e33(0x30f)](_0x551f67)?!0x0:(this[_0x4f1e33(0x1f3)](SORT_ERROR_MESSAGE[_0x4f1e33(0x347)]),!0x1):(this['showCheckError'](SORT_ERROR_MESSAGE[_0x4f1e33(0x2fa)]),!0x1):(this[_0x4f1e33(0x1f3)](SORT_ERROR_MESSAGE[_0x4f1e33(0x313)]),!0x1):(this[_0x4f1e33(0x1f3)](SORT_ERROR_MESSAGE[_0x4f1e33(0x1ef)]),!0x1);}async[_0x1318a4(0x1eb)](_0x2821e5){var _0x190f77=_0x1318a4;const _0x3d5384=this['_univerInstanceService'][_0x190f77(0x207)](core['UniverInstanceType'][_0x190f77(0x24d)]),_0x2fe9b0=_0x3d5384[_0x190f77(0x33e)](),_0x14aa8c=_0x3d5384[_0x190f77(0x308)](),_0x379f59=_0x2fe9b0['getSheetId'](),_0x2f78ec=this[_0x190f77(0x253)][_0x190f77(0x210)]();if(!_0x2f78ec)return null;let _0x467a03;if(_0x2821e5===!0x0)_0x467a03=sheets[_0x190f77(0x271)](_0x2f78ec['range'],{'up':!0x0,'down':!0x0,'left':!0x0,'right':!0x0},_0x2fe9b0),this['setSelection'](_0x14aa8c,_0x379f59,_0x467a03);else{if(_0x2821e5===!0x1)_0x467a03=_0x2f78ec['range'];else{const _0x495a72=await this[_0x190f77(0x22a)]();if(_0x495a72===_0x190f77(0x274))return null;_0x495a72===_0x190f77(0x221)?_0x467a03=_0x2f78ec['range']:(_0x467a03=sheets[_0x190f77(0x271)](_0x2f78ec['range'],{'up':!0x0,'down':!0x0,'left':!0x0,'right':!0x0},_0x2fe9b0),this[_0x190f77(0x2dd)](_0x14aa8c,_0x379f59,_0x467a03));}}return{'range':_0x467a03,'unitId':_0x14aa8c,'subUnitId':_0x379f59,'colIndex':_0x2f78ec[_0x190f77(0x256)][_0x190f77(0x27f)]};}},__name(_a,_0x1318a4(0x2ef)),_a);SheetsSortUIService=__decorateClass$2([__decorateParam$2(0x0,core['IUniverInstanceService']),__decorateParam$2(0x1,ui[_0x1318a4(0x328)]),__decorateParam$2(0x2,core[_0x1318a4(0x2bc)]),__decorateParam$2(0x3,core['Inject'](sheets[_0x1318a4(0x356)])),__decorateParam$2(0x4,core[_0x1318a4(0x21e)](sheetsSort[_0x1318a4(0x34e)])),__decorateParam$2(0x5,core[_0x1318a4(0x21e)](core[_0x1318a4(0x275)])),__decorateParam$2(0x6,core[_0x1318a4(0x245)])],SheetsSortUIService);function colIndexTranslator(_0x130d18){return _0x377c5e=>{var _0x5056be=_0x24f9;const _0x6313ea=core[_0x5056be(0x1fb)][_0x5056be(0x338)](_0x377c5e);switch(_0x130d18[_0x5056be(0x343)]()){case core[_0x5056be(0x2e0)][_0x5056be(0x2f0)]:return'\x22'+_0x6313ea+'\x22列';case core['LocaleType'][_0x5056be(0x1e9)]:return'Column\x20\x22'+_0x6313ea+'\x22';default:return _0x5056be(0x26e)+_0x6313ea+'\x22';}};}__name(colIndexTranslator,_0x1318a4(0x2ad));const SortRangeAscCommand={'id':_0x1318a4(0x1f7),'type':core[_0x1318a4(0x2f5)][_0x1318a4(0x2e5)],'handler':__name(async _0x4ad709=>await _0x4ad709[_0x1318a4(0x2e8)](SheetsSortUIService)[_0x1318a4(0x2c6)](!0x0,!0x1),_0x1318a4(0x278))},SortRangeAscExtCommand={'id':_0x1318a4(0x236),'type':core[_0x1318a4(0x2f5)][_0x1318a4(0x2e5)],'handler':__name(async _0x2ffc49=>await _0x2ffc49[_0x1318a4(0x2e8)](SheetsSortUIService)['triggerSortDirectly'](!0x0,!0x0),_0x1318a4(0x278))},SortRangeDescCommand={'id':_0x1318a4(0x2d7),'type':core[_0x1318a4(0x2f5)][_0x1318a4(0x2e5)],'handler':__name(async _0x165610=>await _0x165610[_0x1318a4(0x2e8)](SheetsSortUIService)['triggerSortDirectly'](!0x1,!0x1),_0x1318a4(0x278))},SortRangeDescExtCommand={'id':_0x1318a4(0x284),'type':core['CommandType']['COMMAND'],'handler':__name(async _0x2eea08=>await _0x2eea08['get'](SheetsSortUIService)[_0x1318a4(0x2c6)](!0x1,!0x0),_0x1318a4(0x278))},SortRangeCustomCommand={'id':'sheet.command.sort-range-custom','type':core[_0x1318a4(0x2f5)][_0x1318a4(0x2e5)],'handler':__name(async _0x5a9f92=>await _0x5a9f92[_0x1318a4(0x2e8)](SheetsSortUIService)[_0x1318a4(0x362)](),_0x1318a4(0x278))},SortRangeAscInCtxMenuCommand={'id':'sheet.command.sort-range-asc-ctx','type':core[_0x1318a4(0x2f5)][_0x1318a4(0x2e5)],'handler':__name(async _0x163693=>await _0x163693['get'](SheetsSortUIService)[_0x1318a4(0x2c6)](!0x0,!0x1),_0x1318a4(0x278))},SortRangeAscExtInCtxMenuCommand={'id':_0x1318a4(0x279),'type':core[_0x1318a4(0x2f5)]['COMMAND'],'handler':__name(async _0xcb62c7=>await _0xcb62c7[_0x1318a4(0x2e8)](SheetsSortUIService)['triggerSortDirectly'](!0x0,!0x0),_0x1318a4(0x278))},SortRangeDescInCtxMenuCommand={'id':_0x1318a4(0x2e7),'type':core['CommandType'][_0x1318a4(0x2e5)],'handler':__name(async _0x1c9195=>await _0x1c9195[_0x1318a4(0x2e8)](SheetsSortUIService)[_0x1318a4(0x2c6)](!0x1,!0x1),_0x1318a4(0x278))},SortRangeDescExtInCtxMenuCommand={'id':_0x1318a4(0x244),'type':core[_0x1318a4(0x2f5)][_0x1318a4(0x2e5)],'handler':__name(async _0x316861=>await _0x316861[_0x1318a4(0x2e8)](SheetsSortUIService)[_0x1318a4(0x2c6)](!0x1,!0x0),_0x1318a4(0x278))},SortRangeCustomInCtxMenuCommand={'id':_0x1318a4(0x222),'type':core[_0x1318a4(0x2f5)][_0x1318a4(0x2e5)],'handler':__name(async _0x45c1fc=>await _0x45c1fc['get'](SheetsSortUIService)[_0x1318a4(0x362)](),'handler')};function CustomSortPanel(){var _0x4604ad=_0x1318a4;const _0x5a8eee=core['useDependency'](SheetsSortUIService),_0x2be7d1=core[_0x4604ad(0x32f)](sheetsSort[_0x4604ad(0x34e)]),_0x18605d=core[_0x4604ad(0x32f)](core[_0x4604ad(0x275)]),[_0xf3eb89,_0x4c108a]=React[_0x4604ad(0x2d0)](!0x1),[_0x2702c7,_0x1013ba]=React[_0x4604ad(0x2d0)](0x0),_0x49ea44=React['useRef'](null),_0x19b5fd=_0x5a8eee[_0x4604ad(0x2eb)]();if(!_0x19b5fd||!_0x19b5fd[_0x4604ad(0x240)])return null;const {range:_0x3f51d0,unitId:_0x1625aa,subUnitId:_0x5eb364}=_0x19b5fd[_0x4604ad(0x240)],_0x364546=_0x5a8eee[_0x4604ad(0x28e)](_0xf3eb89),[_0x2588da,_0x16d2b7]=React[_0x4604ad(0x2d0)]([{'type':sheetsSort[_0x4604ad(0x28a)][_0x4604ad(0x319)],'colIndex':_0x3f51d0[_0x4604ad(0x1f9)]}]),_0x286274=React[_0x4604ad(0x2f6)]((_0x57f2b5,_0x2317d0)=>{var _0x2ff56c=_0x4604ad;const _0x470326=[..._0x2588da];_0x2317d0===null?_0x470326[_0x2ff56c(0x250)](_0x57f2b5,0x1):_0x470326[_0x57f2b5]=_0x2317d0,_0x16d2b7(_0x470326);},[_0x2588da]),_0x3f65fa=React[_0x4604ad(0x2f6)](core[_0x4604ad(0x285)](()=>{var _0x4db47e=_0x4604ad;const _0x525b09=[..._0x2588da],_0x12eebd=findNextColIndex(_0x3f51d0,_0x2588da);_0x12eebd!==null&&(_0x525b09[_0x4db47e(0x317)]({'type':sheetsSort[_0x4db47e(0x28a)][_0x4db47e(0x319)],'colIndex':_0x12eebd}),_0x16d2b7(_0x525b09));},0xc8),[_0x2588da,_0x3f51d0]),_0x3368e4=React[_0x4604ad(0x2f6)]((_0x143dec,_0x24857c)=>{var _0x4f2f53=_0x4604ad;_0x2be7d1[_0x4f2f53(0x361)]({'range':_0x3f51d0,'orderRules':_0x143dec,'hasTitle':_0x24857c}),_0x5a8eee[_0x4f2f53(0x217)]();},[_0x2be7d1,_0x5a8eee,_0x3f51d0]),_0x4ca95a=React[_0x4604ad(0x2f6)](()=>{_0x5a8eee['closeCustomSortPanel']();},[_0x5a8eee]),_0x12f516=React[_0x4604ad(0x2f6)](_0xb0487e=>{var _0x35ddd8=_0x4604ad;_0x4c108a(_0xb0487e),_0xb0487e?_0x5a8eee[_0x35ddd8(0x2dd)](_0x1625aa,_0x5eb364,{..._0x3f51d0,'startRow':_0x3f51d0[_0x35ddd8(0x288)]+0x1}):_0x5a8eee[_0x35ddd8(0x2dd)](_0x1625aa,_0x5eb364,_0x3f51d0);},[_0x5a8eee,_0x3f51d0,_0x5eb364,_0x1625aa]);React[_0x4604ad(0x20f)](()=>{var _0x50f21e=_0x4604ad;_0x49ea44[_0x50f21e(0x1ec)]&&_0x2588da[_0x50f21e(0x21f)]>0x5&&(_0x49ea44[_0x50f21e(0x1ec)][_0x50f21e(0x1f2)]=_0x49ea44[_0x50f21e(0x1ec)][_0x50f21e(0x260)]);},[_0x2588da]);const _0x4ce3e7=_0x2588da[_0x4604ad(0x21f)]<_0x364546[_0x4604ad(0x21f)],_0x4fcfc6=_0x2588da[_0x4604ad(0x2fc)](_0x3e0abf=>({..._0x3e0abf,'id':''+_0x3e0abf[_0x4604ad(0x2b6)]}));return React[_0x4604ad(0x2da)]('div',{'className':styles[_0x4604ad(0x28d)]},React[_0x4604ad(0x2da)](_0x4604ad(0x1ea),{'className':styles[_0x4604ad(0x243)],'onMouseDown':__name(_0x19ae48=>{var _0x432709=_0x4604ad;_0x19ae48[_0x432709(0x2ff)]();},_0x4604ad(0x291))},React['createElement'](_0x4604ad(0x1ea),{'className':styles[_0x4604ad(0x337)]},React[_0x4604ad(0x2da)](_0x4604ad(0x1ea),{'className':styles[_0x4604ad(0x34a)]},React[_0x4604ad(0x2da)](design[_0x4604ad(0x34c)],{'checked':_0xf3eb89,'onChange':__name(_0x5534ae=>_0x12f516(!!_0x5534ae),_0x4604ad(0x33d))},_0x18605d['t'](_0x4604ad(0x2d2)))),_0x4ce3e7?React['createElement'](_0x4604ad(0x1ea),{'className':styles['addCondition'],'onClick':_0x3f65fa},React[_0x4604ad(0x2da)](IncreaseSingle,null),React[_0x4604ad(0x2da)](_0x4604ad(0x22b),{'className':styles[_0x4604ad(0x2d3)]},_0x18605d['t'](_0x4604ad(0x33b)))):React[_0x4604ad(0x2da)](_0x4604ad(0x1ea),{'className':styles['addCondition']+'\x20'+styles[_0x4604ad(0x226)]},React['createElement'](IncreaseSingle,null),React[_0x4604ad(0x2da)](_0x4604ad(0x22b),{'className':styles[_0x4604ad(0x2d3)]},_0x18605d['t'](_0x4604ad(0x33b))))),React[_0x4604ad(0x2da)](_0x4604ad(0x1ea),{'className':styles[_0x4604ad(0x300)],'onScroll':__name(_0x3dcecf=>{var _0x4149c1=_0x4604ad;const _0x14e576=_0x3dcecf[_0x4149c1(0x2b2)]['scrollTop'];_0x1013ba(_0x14e576);},_0x4604ad(0x1f6)),'ref':_0x49ea44},React['createElement'](design[_0x4604ad(0x20b)],{'list':_0x4fcfc6,'onListChange':_0x16d2b7,'idKey':'id','draggableHandle':'.'+styles[_0x4604ad(0x254)],'itemRender':__name(_0x2ac3ed=>React['createElement'](SortOptionItem,{'titles':_0x364546,'list':_0x4fcfc6,'item':_0x2ac3ed,'onChange':__name((_0x2bf8c2,_0x5c8fcc)=>_0x286274(_0x5c8fcc,_0x2bf8c2),'onChange'),'scrollPosition':_0x2702c7}),'itemRender'),'rowHeight':0x20,'margin':[0x0,0xc]}))),React[_0x4604ad(0x2da)]('div',{'className':styles['customSortPanelFooter']},React[_0x4604ad(0x2da)](design['Button'],{'className':styles[_0x4604ad(0x276)],'type':_0x4604ad(0x26d),'onClick':__name(()=>_0x4ca95a(),_0x4604ad(0x289))},_0x18605d['t']('sheets-sort.dialog.cancel')),React[_0x4604ad(0x2da)](design['Button'],{'className':styles[_0x4604ad(0x276)],'type':'primary','onClick':__name(()=>_0x3368e4(_0x2588da,_0xf3eb89),_0x4604ad(0x289))},_0x18605d['t'](_0x4604ad(0x242)))));}__name(CustomSortPanel,_0x1318a4(0x290));function SortOptionItem(_0x9ff00){var _0x83b56=_0x1318a4,_0x35e2fb;const {list:_0x16836d,item:_0x3c9e3c,titles:_0x36d3cf,onChange:_0x502591,scrollPosition:_0x3febd0}=_0x9ff00,_0x157dd1=core[_0x83b56(0x32f)](core['LocaleService']),_0xea3d9c=_0x36d3cf[_0x83b56(0x280)](_0x465ff3=>!_0x16836d['some'](_0x379dd5=>_0x379dd5['colIndex']===_0x465ff3[_0x83b56(0x34f)])||_0x465ff3[_0x83b56(0x34f)]===_0x3c9e3c[_0x83b56(0x2b6)]),_0x2d8bf1=_0x16836d[_0x83b56(0x26a)](_0x4958b4=>_0x4958b4[_0x83b56(0x2b6)]===_0x3c9e3c['colIndex']),_0x5de315=React[_0x83b56(0x2f6)](_0x43ba3d=>{var _0x28292f=_0x83b56;_0x502591({..._0x3c9e3c,'colIndex':_0x43ba3d[_0x28292f(0x34f)]},_0x2d8bf1),_0x46d289(!0x1);},[_0x2d8bf1,_0x3c9e3c,_0x502591]),[_0x38748a,_0x46d289]=React[_0x83b56(0x2d0)](!0x1),_0x3a1884=__name(_0x48ebe2=>{_0x46d289(_0x48ebe2);},_0x83b56(0x237));React[_0x83b56(0x20f)](()=>{_0x46d289(!0x1);},[_0x3febd0]);const _0x5c22b5=_0x16836d[_0x83b56(0x21f)]>0x1,_0x3fab9e=(_0x35e2fb=_0x36d3cf['find'](_0x47ac7b=>_0x47ac7b[_0x83b56(0x34f)]===_0x3c9e3c[_0x83b56(0x2b6)]))==null?void 0x0:_0x35e2fb[_0x83b56(0x273)],_0x263598=_0x157dd1[_0x83b56(0x343)]()===core[_0x83b56(0x2e0)][_0x83b56(0x2f0)]?styles[_0x83b56(0x351)]:styles[_0x83b56(0x33a)];return React['createElement'](_0x83b56(0x1ea),{'className':styles['customSortPanelItem']},React[_0x83b56(0x2da)]('div',{'className':styles[_0x83b56(0x27a)]},React[_0x83b56(0x2da)](_0x83b56(0x1ea),{'className':styles[_0x83b56(0x254)]},React['createElement'](SequenceSingle,null)),React[_0x83b56(0x2da)](_0x83b56(0x1ea),{'className':styles[_0x83b56(0x2f8)]},React[_0x83b56(0x2da)](design[_0x83b56(0x35d)],{'placement':'bottomLeft','trigger':[_0x83b56(0x200)],'visible':_0x38748a,'onVisibleChange':_0x3a1884,'overlay':React[_0x83b56(0x2da)]('ul',{'className':styles[_0x83b56(0x29d)]},_0xea3d9c[_0x83b56(0x2fc)](_0x7fdb1a=>React[_0x83b56(0x2da)]('li',{'key':_0x7fdb1a[_0x83b56(0x34f)],'onClick':__name(()=>_0x5de315(_0x7fdb1a),_0x83b56(0x289)),'className':styles['customSortColMenuItem']},React[_0x83b56(0x2da)](_0x83b56(0x22b),{'className':styles[_0x83b56(0x25c)]},_0x7fdb1a[_0x83b56(0x273)]),React[_0x83b56(0x2da)](_0x83b56(0x22b),{'className':styles['customSortColMenuItemCheck']},_0x7fdb1a['index']===_0x3c9e3c['colIndex']&&React[_0x83b56(0x2da)](CheckMarkSingle,null)))))},React['createElement'](_0x83b56(0x1ea),{'className':styles[_0x83b56(0x2e6)]},React[_0x83b56(0x2da)]('span',{'className':styles[_0x83b56(0x259)]},_0x3fab9e),React['createElement'](MoreDownSingle,{'className':styles[_0x83b56(0x350)]}))))),React[_0x83b56(0x2da)]('div',{'className':styles[_0x83b56(0x2f4)]},React[_0x83b56(0x2da)](design['RadioGroup'],{'className':_0x263598,'value':_0x3c9e3c[_0x83b56(0x223)],'onChange':__name(_0x5464d4=>{_0x502591({..._0x3c9e3c,'type':_0x5464d4},_0x2d8bf1);},_0x83b56(0x33d))},React[_0x83b56(0x2da)](design['Radio'],{'value':sheetsSort[_0x83b56(0x28a)][_0x83b56(0x319)]},_0x157dd1['t'](_0x83b56(0x2df))),React[_0x83b56(0x2da)](design['Radio'],{'value':sheetsSort[_0x83b56(0x28a)][_0x83b56(0x28f)]},_0x157dd1['t'](_0x83b56(0x2c4))))),React[_0x83b56(0x2da)](_0x83b56(0x1ea),{'className':styles[_0x83b56(0x238)]},_0x5c22b5&&React[_0x83b56(0x2da)](DeleteEmptySingle,{'onClick':__name(()=>_0x502591(null,_0x2d8bf1),'onClick')})));}__name(SortOptionItem,_0x1318a4(0x21a));function findNextColIndex(_0x4cc0c0,_0x42a140){var _0x94d84a=_0x1318a4;const {startColumn:_0x311f03,endColumn:_0x55b220}=_0x4cc0c0,_0x33e787=new Set(_0x42a140['map'](_0x30c7ba=>_0x30c7ba==null?void 0x0:_0x30c7ba[_0x94d84a(0x2b6)]));for(let _0x3b3636=_0x311f03;_0x3b3636<=_0x55b220;_0x3b3636++)if(!_0x33e787[_0x94d84a(0x266)](_0x3b3636))return _0x3b3636;return null;}__name(findNextColIndex,_0x1318a4(0x2a5));function EmbedSortBtn(_0x36a6e8){var _0x56d8f8=_0x1318a4;const {range:_0x239949,colIndex:_0x308256,onClose:_0x1c0aee}=_0x36a6e8,_0x32a5cf=core['useDependency'](SheetsSortUIService),_0x1d44d2=core[_0x56d8f8(0x32f)](core[_0x56d8f8(0x2f2)]),_0x1a510a=core[_0x56d8f8(0x32f)](core[_0x56d8f8(0x275)]),_0x4b0d57=React[_0x56d8f8(0x2f6)](_0x4190ca=>{var _0x674267=_0x56d8f8;const {unitId:_0x1fb33e,subUnitId:_0x136bc3}=sheets[_0x674267(0x22d)](_0x1d44d2)||{};if(_0x239949&&_0x1fb33e&&_0x136bc3){const _0x51ae9b={..._0x239949,'startRow':_0x239949[_0x674267(0x288)]+0x1};_0x32a5cf[_0x674267(0x2c6)](_0x4190ca,!0x1,{'unitId':_0x1fb33e,'subUnitId':_0x136bc3,'range':_0x51ae9b,'colIndex':_0x308256});}else console[_0x674267(0x29e)](_0x674267(0x1fd)+_0x1fb33e+_0x674267(0x306)+_0x136bc3+_0x674267(0x2c8)+_0x239949+_0x674267(0x2e4)+_0x308256);_0x1c0aee();},[_0x239949,_0x308256,_0x32a5cf,_0x1d44d2,_0x1c0aee]);return React[_0x56d8f8(0x2da)](_0x56d8f8(0x1ea),{'className':styles[_0x56d8f8(0x310)]},React[_0x56d8f8(0x2da)](_0x56d8f8(0x1ea),{'className':styles[_0x56d8f8(0x25b)]+'\x20'+styles[_0x56d8f8(0x206)],'onClick':__name(()=>_0x4b0d57(!0x0),_0x56d8f8(0x289))},React['createElement'](AscendingSingle,{'className':styles[_0x56d8f8(0x322)]}),_0x1a510a['t'](_0x56d8f8(0x2df))),React[_0x56d8f8(0x2da)](_0x56d8f8(0x1ea),{'className':styles[_0x56d8f8(0x25b)]+'\x20'+styles[_0x56d8f8(0x315)],'onClick':__name(()=>_0x4b0d57(!0x1),'onClick')},React[_0x56d8f8(0x2da)](DescendingSingle,{'className':styles['embedSortBtnIcon']}),_0x1a510a['t'](_0x56d8f8(0x2c4))));}__name(EmbedSortBtn,'EmbedSortBtn');const SHEETS_SORT_MENU_ID=_0x1318a4(0x2a0),SHEETS_SORT_CTX_MENU_ID='sheet.menu.sheets-sort-ctx',SHEETS_SORT_ASC_ICON=_0x1318a4(0x332),SHEETS_SORT_ASC_EXT_ICON=_0x1318a4(0x303),SHEETS_SORT_DESC_ICON='DescendingSingle',SHEETS_SORT_DESC_EXT_ICON=_0x1318a4(0x212),SHEETS_SORT_CUSTOM_ICON=_0x1318a4(0x2d9);function sortRangeMenuFactory(_0x1ef6fd){var _0xc481ba=_0x1318a4;return{'id':SHEETS_SORT_MENU_ID,'type':ui[_0xc481ba(0x321)][_0xc481ba(0x32d)],'icon':SHEETS_SORT_ASC_ICON,'tooltip':_0xc481ba(0x249),'hidden$':ui[_0xc481ba(0x359)](_0x1ef6fd,core[_0xc481ba(0x270)][_0xc481ba(0x24d)]),'disabled$':sheetsUi[_0xc481ba(0x329)](_0x1ef6fd,{'workbookTypes':[sheets[_0xc481ba(0x1fc)]],'worksheetTypes':[sheets['WorksheetSortPermission'],sheets[_0xc481ba(0x298)]],'rangeTypes':[sheets[_0xc481ba(0x23b)]]})};}__name(sortRangeMenuFactory,_0x1318a4(0x261));function sortRangeAscMenuFactory(_0x3dde2d){var _0x54c0e6=_0x1318a4;return{'id':SortRangeAscCommand['id'],'icon':SHEETS_SORT_ASC_ICON,'title':_0x54c0e6(0x1ed),'type':ui[_0x54c0e6(0x321)]['BUTTON'],'hidden$':sheetsUi[_0x54c0e6(0x2cd)](_0x3dde2d)};}__name(sortRangeAscMenuFactory,_0x1318a4(0x229));function sortRangeAscExtMenuFactory(_0x4e1ebf){var _0x47fcd6=_0x1318a4;return{'id':SortRangeAscExtCommand['id'],'title':_0x47fcd6(0x340),'icon':SHEETS_SORT_ASC_EXT_ICON,'type':ui['MenuItemType'][_0x47fcd6(0x33c)]};}__name(sortRangeAscExtMenuFactory,'sortRangeAscExtMenuFactory');function sortRangeDescMenuFactory(_0x40858e){var _0x84f24f=_0x1318a4;return{'id':SortRangeDescCommand['id'],'title':_0x84f24f(0x1ee),'icon':SHEETS_SORT_DESC_ICON,'type':ui[_0x84f24f(0x321)][_0x84f24f(0x33c)]};}__name(sortRangeDescMenuFactory,_0x1318a4(0x31a));function sortRangeDescExtMenuFactory(_0x5af23a){var _0x5f23c3=_0x1318a4;return{'id':SortRangeDescExtCommand['id'],'title':_0x5f23c3(0x2bd),'icon':SHEETS_SORT_DESC_EXT_ICON,'type':ui[_0x5f23c3(0x321)][_0x5f23c3(0x33c)]};}__name(sortRangeDescExtMenuFactory,_0x1318a4(0x225));function sortRangeCustomMenuFactory(_0x2161b6){var _0x224f82=_0x1318a4;return{'id':SortRangeCustomCommand['id'],'title':_0x224f82(0x31d),'type':ui[_0x224f82(0x321)][_0x224f82(0x33c)],'icon':SHEETS_SORT_CUSTOM_ICON};}__name(sortRangeCustomMenuFactory,_0x1318a4(0x2de));function sortRangeCtxMenuFactory(_0x401f67){var _0x1235d3=_0x1318a4;return{'id':SHEETS_SORT_CTX_MENU_ID,'title':_0x1235d3(0x249),'type':ui[_0x1235d3(0x321)]['SUBITEMS'],'icon':SHEETS_SORT_ASC_ICON,'hidden$':ui[_0x1235d3(0x359)](_0x401f67,core[_0x1235d3(0x270)][_0x1235d3(0x24d)]),'disabled$':sheetsUi[_0x1235d3(0x329)](_0x401f67,{'workbookTypes':[sheets['WorkbookEditablePermission']],'worksheetTypes':[sheets[_0x1235d3(0x323)],sheets[_0x1235d3(0x298)]],'rangeTypes':[sheets[_0x1235d3(0x23b)]]})};}__name(sortRangeCtxMenuFactory,_0x1318a4(0x234));function sortRangeAscCtxMenuFactory(_0x5904b4){var _0x1c598c=_0x1318a4;return{'id':SortRangeAscInCtxMenuCommand['id'],'title':_0x1c598c(0x1ed),'type':ui[_0x1c598c(0x321)][_0x1c598c(0x33c)],'icon':SHEETS_SORT_ASC_ICON,'disabled$':sheetsUi['getCurrentRangeDisable$'](_0x5904b4,{'workbookTypes':[sheets[_0x1c598c(0x1fc)]],'worksheetTypes':[sheets[_0x1c598c(0x323)],sheets[_0x1c598c(0x298)]],'rangeTypes':[sheets['RangeProtectionPermissionEditPoint']]})};}__name(sortRangeAscCtxMenuFactory,_0x1318a4(0x324));function sortRangeAscExtCtxMenuFactory(_0x3d3f1d){var _0x6b994e=_0x1318a4;return{'id':SortRangeAscExtInCtxMenuCommand['id'],'title':_0x6b994e(0x340),'type':ui[_0x6b994e(0x321)][_0x6b994e(0x33c)],'icon':SHEETS_SORT_ASC_EXT_ICON,'disabled$':sheetsUi[_0x6b994e(0x329)](_0x3d3f1d,{'workbookTypes':[sheets[_0x6b994e(0x1fc)]],'worksheetTypes':[sheets[_0x6b994e(0x323)],sheets['WorksheetEditPermission']],'rangeTypes':[sheets[_0x6b994e(0x23b)]]})};}__name(sortRangeAscExtCtxMenuFactory,_0x1318a4(0x2b5));function sortRangeDescCtxMenuFactory(_0x2bc66c){var _0x1d0de0=_0x1318a4;return{'id':SortRangeDescInCtxMenuCommand['id'],'title':_0x1d0de0(0x1ee),'type':ui['MenuItemType'][_0x1d0de0(0x33c)],'icon':SHEETS_SORT_DESC_ICON,'disabled$':sheetsUi[_0x1d0de0(0x329)](_0x2bc66c,{'workbookTypes':[sheets['WorkbookEditablePermission']],'worksheetTypes':[sheets[_0x1d0de0(0x323)],sheets[_0x1d0de0(0x298)]],'rangeTypes':[sheets['RangeProtectionPermissionEditPoint']]})};}__name(sortRangeDescCtxMenuFactory,_0x1318a4(0x297));function sortRangeDescExtCtxMenuFactory(_0x445b8c){var _0xbdd6ee=_0x1318a4;return{'id':SortRangeDescExtInCtxMenuCommand['id'],'title':_0xbdd6ee(0x2bd),'type':ui['MenuItemType']['BUTTON'],'icon':SHEETS_SORT_DESC_EXT_ICON,'disabled$':sheetsUi[_0xbdd6ee(0x329)](_0x445b8c,{'workbookTypes':[sheets[_0xbdd6ee(0x1fc)]],'worksheetTypes':[sheets['WorksheetSortPermission'],sheets[_0xbdd6ee(0x298)]],'rangeTypes':[sheets[_0xbdd6ee(0x23b)]]})};}__name(sortRangeDescExtCtxMenuFactory,'sortRangeDescExtCtxMenuFactory');function sortRangeCustomCtxMenuFactory(_0x10b1aa){var _0x4e207a=_0x1318a4;return{'id':SortRangeCustomInCtxMenuCommand['id'],'title':_0x4e207a(0x31d),'type':ui['MenuItemType'][_0x4e207a(0x33c)],'icon':SHEETS_SORT_CUSTOM_ICON,'disabled$':sheetsUi[_0x4e207a(0x329)](_0x10b1aa,{'workbookTypes':[sheets[_0x4e207a(0x1fc)]],'worksheetTypes':[sheets[_0x4e207a(0x323)],sheets[_0x4e207a(0x298)]],'rangeTypes':[sheets[_0x4e207a(0x23b)]]})};}__name(sortRangeCustomCtxMenuFactory,_0x1318a4(0x327));const menuSchema={[ui[_0x1318a4(0x20c)][_0x1318a4(0x2e2)]]:{[SHEETS_SORT_MENU_ID]:{'order':0x2,'menuItemFactory':sortRangeMenuFactory,[SortRangeAscCommand['id']]:{'order':0x0,'menuItemFactory':sortRangeAscMenuFactory},[SortRangeAscExtCommand['id']]:{'order':0x1,'menuItemFactory':sortRangeAscExtMenuFactory},[SortRangeDescCommand['id']]:{'order':0x2,'menuItemFactory':sortRangeDescMenuFactory},[SortRangeDescExtCommand['id']]:{'order':0x3,'menuItemFactory':sortRangeDescExtMenuFactory},[SortRangeCustomCommand['id']]:{'order':0x4,'menuItemFactory':sortRangeCustomMenuFactory}}},[ui[_0x1318a4(0x202)][_0x1318a4(0x29b)]]:{[ui[_0x1318a4(0x307)][_0x1318a4(0x21c)]]:{[SHEETS_SORT_CTX_MENU_ID]:{'order':0x0,'menuItemFactory':sortRangeCtxMenuFactory,[SortRangeAscInCtxMenuCommand['id']]:{'order':0x0,'menuItemFactory':sortRangeAscCtxMenuFactory},[SortRangeAscExtInCtxMenuCommand['id']]:{'order':0x1,'menuItemFactory':sortRangeAscExtCtxMenuFactory},[SortRangeDescInCtxMenuCommand['id']]:{'order':0x2,'menuItemFactory':sortRangeDescCtxMenuFactory},[SortRangeDescExtInCtxMenuCommand['id']]:{'order':0x3,'menuItemFactory':sortRangeDescExtCtxMenuFactory},[SortRangeCustomInCtxMenuCommand['id']]:{'order':0x4,'menuItemFactory':sortRangeCustomCtxMenuFactory}}}}};var __defProp$1=Object[_0x1318a4(0x341)],__getOwnPropDesc$1=Object[_0x1318a4(0x268)],__decorateClass$1=__name((_0x5e83af,_0x5112ed,_0x5ac9ce,_0x2bb453)=>{var _0x25d45f=_0x1318a4;for(var _0x7cc1eb=_0x2bb453>0x1?void 0x0:_0x2bb453?__getOwnPropDesc$1(_0x5112ed,_0x5ac9ce):_0x5112ed,_0x26f7bc=_0x5e83af[_0x25d45f(0x21f)]-0x1,_0x173569;_0x26f7bc>=0x0;_0x26f7bc--)(_0x173569=_0x5e83af[_0x26f7bc])&&(_0x7cc1eb=(_0x2bb453?_0x173569(_0x5112ed,_0x5ac9ce,_0x7cc1eb):_0x173569(_0x7cc1eb))||_0x7cc1eb);return _0x2bb453&&_0x7cc1eb&&__defProp$1(_0x5112ed,_0x5ac9ce,_0x7cc1eb),_0x7cc1eb;},_0x1318a4(0x235)),__decorateParam$1=__name((_0x478f05,_0x560ca7)=>(_0x4d110d,_0x3b1848)=>_0x560ca7(_0x4d110d,_0x3b1848,_0x478f05),'__decorateParam$1');const CUSTOM_SORT_DIALOG_ID=_0x1318a4(0x216),CUSTOM_SORT_PANEL_WIDTH=0x230;var _a2;let SheetsSortUIController=(_a2=class extends core[_0x1318a4(0x2a7)]{constructor(_0x4a554a,_0x1c1a7f,_0x5469d0,_0x32277f,_0x7beb69,_0x19d256,_0x4fb168,_0x3362aa,_0x4bc2b6,_0x5c5fc4){var _0x2f2ab5=_0x1318a4;super(),this[_0x2f2ab5(0x2ab)]=_0x4a554a,this[_0x2f2ab5(0x27d)]=_0x1c1a7f,this[_0x2f2ab5(0x2fb)]=_0x5469d0,this[_0x2f2ab5(0x30c)]=_0x32277f,this[_0x2f2ab5(0x27c)]=_0x7beb69,this[_0x2f2ab5(0x2a9)]=_0x19d256,this[_0x2f2ab5(0x2d4)]=_0x4fb168,this[_0x2f2ab5(0x2bb)]=_0x3362aa,this[_0x2f2ab5(0x311)]=_0x4bc2b6,this[_0x2f2ab5(0x2be)]=_0x5c5fc4,this[_0x2f2ab5(0x228)](),this[_0x2f2ab5(0x2d6)](),this[_0x2f2ab5(0x314)]();}['_initMenu'](){var _0x2d9d9c=_0x1318a4;this[_0x2d9d9c(0x27d)][_0x2d9d9c(0x1e8)](menuSchema);}[_0x1318a4(0x228)](){var _0x596663=_0x1318a4;[SortRangeAscCommand,SortRangeAscExtCommand,SortRangeDescCommand,SortRangeDescExtCommand,SortRangeCustomCommand,SortRangeAscInCtxMenuCommand,SortRangeAscExtInCtxMenuCommand,SortRangeDescInCtxMenuCommand,SortRangeDescExtInCtxMenuCommand,SortRangeCustomInCtxMenuCommand][_0x596663(0x318)](_0x3056bb=>this['disposeWithMe'](this[_0x596663(0x2ab)][_0x596663(0x248)](_0x3056bb))),this[_0x596663(0x2a4)](this[_0x596663(0x2a9)][_0x596663(0x215)](sheetsSort['SortRangeCommand']['id']));}[_0x1318a4(0x314)](){var _0x534df4=_0x1318a4;this[_0x534df4(0x2a4)](this[_0x534df4(0x2be)][_0x534df4(0x34d)](_0x534df4(0x290),CustomSortPanel)),this[_0x534df4(0x2a4)](this['_uiPartsService'][_0x534df4(0x25e)](sheetsUi['SheetsUIPart'][_0x534df4(0x32b)],()=>core[_0x534df4(0x2f1)](EmbedSortBtn,this[_0x534df4(0x311)]))),this[_0x534df4(0x2a4)](this[_0x534df4(0x2be)][_0x534df4(0x34d)](SHEETS_SORT_ASC_ICON,AscendingSingle)),this['disposeWithMe'](this[_0x534df4(0x2be)][_0x534df4(0x34d)](SHEETS_SORT_ASC_EXT_ICON,ExpandAscendingSingle)),this[_0x534df4(0x2a4)](this[_0x534df4(0x2be)][_0x534df4(0x34d)](SHEETS_SORT_DESC_ICON,DescendingSingle)),this[_0x534df4(0x2a4)](this['_componentManager'][_0x534df4(0x34d)](SHEETS_SORT_DESC_EXT_ICON,ExpandDescendingSingle)),this['disposeWithMe'](this[_0x534df4(0x2be)][_0x534df4(0x34d)](SHEETS_SORT_CUSTOM_ICON,CustomSortSingle)),this[_0x534df4(0x2bb)][_0x534df4(0x348)][_0x534df4(0x2cf)](rxjs[_0x534df4(0x2b0)](this[_0x534df4(0x30e)]))[_0x534df4(0x218)](_0x3c65d9=>{var _0x3529a7=_0x534df4;_0x3c65d9&&_0x3c65d9[_0x3529a7(0x357)]&&_0x3c65d9[_0x3529a7(0x240)]?this[_0x3529a7(0x342)](_0x3c65d9[_0x3529a7(0x240)]):_0x3c65d9&&!(_0x3c65d9!=null&&_0x3c65d9[_0x3529a7(0x357)])&&this[_0x3529a7(0x1f4)]();});}[_0x1318a4(0x342)](_0x597ed1){var _0x1af0f0=_0x1318a4;this['_dialogService'][_0x1af0f0(0x267)]({'id':CUSTOM_SORT_DIALOG_ID,'draggable':!0x0,'width':CUSTOM_SORT_PANEL_WIDTH,'title':{'title':this[_0x1af0f0(0x2d4)]['t'](_0x1af0f0(0x31d))+':\x20'+engineFormula[_0x1af0f0(0x241)](_0x597ed1[_0x1af0f0(0x23e)])},'children':{'label':_0x1af0f0(0x290)},'destroyOnClose':!0x0,'defaultPosition':getCustomSortDialogDefaultPosition(),'preservePositionOnDestroy':!0x1,'onClose':__name(()=>this[_0x1af0f0(0x1f4)](),'onClose'),'mask':!0x0});}['_closePanel'](){var _0x5d4008=_0x1318a4;this[_0x5d4008(0x2fb)]['close'](CUSTOM_SORT_DIALOG_ID),queueMicrotask(()=>this[_0x5d4008(0x30c)]['focus']());}},__name(_a2,'SheetsSortUIController'),_a2);SheetsSortUIController=__decorateClass$1([__decorateParam$1(0x0,core[_0x1318a4(0x245)]),__decorateParam$1(0x1,ui[_0x1318a4(0x23d)]),__decorateParam$1(0x2,ui[_0x1318a4(0x265)]),__decorateParam$1(0x3,ui['ILayoutService']),__decorateParam$1(0x4,ui['IUIPartsService']),__decorateParam$1(0x5,core[_0x1318a4(0x21e)](sheetsUi[_0x1318a4(0x35c)])),__decorateParam$1(0x6,core[_0x1318a4(0x21e)](core['LocaleService'])),__decorateParam$1(0x7,core[_0x1318a4(0x21e)](SheetsSortUIService)),__decorateParam$1(0x8,core[_0x1318a4(0x21e)](core['Injector'])),__decorateParam$1(0x9,core[_0x1318a4(0x21e)](ui[_0x1318a4(0x2c1)]))],SheetsSortUIController);function getCustomSortDialogDefaultPosition(){return{'x':0x0,'y':0x0};}__name(getCustomSortDialogDefaultPosition,'getCustomSortDialogDefaultPosition');var __defProp2=Object['defineProperty'],__getOwnPropDesc=Object[_0x1318a4(0x268)],__defNormalProp2=__name((_0x117b6b,_0xad1adb,_0x38554c)=>_0xad1adb in _0x117b6b?__defProp2(_0x117b6b,_0xad1adb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x38554c}):_0x117b6b[_0xad1adb]=_0x38554c,_0x1318a4(0x2e3)),__decorateClass=__name((_0x4ceaee,_0xf3913c,_0x108cb2,_0x4f8df0)=>{var _0x34a7bd=_0x1318a4;for(var _0x21812d=_0x4f8df0>0x1?void 0x0:_0x4f8df0?__getOwnPropDesc(_0xf3913c,_0x108cb2):_0xf3913c,_0x427f3e=_0x4ceaee[_0x34a7bd(0x21f)]-0x1,_0x58b1d7;_0x427f3e>=0x0;_0x427f3e--)(_0x58b1d7=_0x4ceaee[_0x427f3e])&&(_0x21812d=(_0x4f8df0?_0x58b1d7(_0xf3913c,_0x108cb2,_0x21812d):_0x58b1d7(_0x21812d))||_0x21812d);return _0x4f8df0&&_0x21812d&&__defProp2(_0xf3913c,_0x108cb2,_0x21812d),_0x21812d;},'__decorateClass'),__decorateParam=__name((_0x48741c,_0x25e203)=>(_0x2f99fa,_0x39f8ce)=>_0x25e203(_0x2f99fa,_0x39f8ce,_0x48741c),_0x1318a4(0x230)),__publicField2=__name((_0x24e2f6,_0x2ec1d3,_0x412e04)=>__defNormalProp2(_0x24e2f6,typeof _0x2ec1d3!='symbol'?_0x2ec1d3+'':_0x2ec1d3,_0x412e04),_0x1318a4(0x2ee));const NAME='SHEET_SORT_UI_PLUGIN';var _a3;exports['UniverSheetsSortUIPlugin']=(_a3=class extends core[_0x1318a4(0x2a1)]{constructor(_0x2a450d=defaultPluginConfig,_0x422229,_0x2ebdca){var _0x5f1bb0=_0x1318a4;super(),this[_0x5f1bb0(0x363)]=_0x2a450d,this['_injector']=_0x422229,this[_0x5f1bb0(0x326)]=_0x2ebdca;const {..._0x23b5e0}=this[_0x5f1bb0(0x363)];this[_0x5f1bb0(0x326)]['setConfig'](PLUGIN_CONFIG_KEY,_0x23b5e0);}[_0x1318a4(0x24b)](){var _0x1d2c23=_0x1318a4;[[SheetsSortUIService],[SheetsSortUIController]]['forEach'](_0x39a438=>this[_0x1d2c23(0x311)][_0x1d2c23(0x272)](_0x39a438));}[_0x1318a4(0x22f)](){var _0x2fec36=_0x1318a4;this[_0x2fec36(0x311)][_0x2fec36(0x2e8)](SheetsSortUIController);}},__name(_a3,_0x1318a4(0x31e)),_a3),__publicField2(exports[_0x1318a4(0x31e)],_0x1318a4(0x223),core[_0x1318a4(0x270)][_0x1318a4(0x24d)]),__publicField2(exports['UniverSheetsSortUIPlugin'],_0x1318a4(0x330),NAME),exports['UniverSheetsSortUIPlugin']=__decorateClass([core[_0x1318a4(0x1f5)](sheetsSort[_0x1318a4(0x31c)]),__decorateParam(0x1,core[_0x1318a4(0x21e)](core[_0x1318a4(0x1fa)])),__decorateParam(0x2,core[_0x1318a4(0x286)])],exports[_0x1318a4(0x31e)]),exports[_0x1318a4(0x344)]=SortRangeAscCommand,exports[_0x1318a4(0x309)]=SortRangeAscExtCommand,exports[_0x1318a4(0x2cb)]=SortRangeAscExtInCtxMenuCommand,exports['SortRangeAscInCtxMenuCommand']=SortRangeAscInCtxMenuCommand,exports['SortRangeCustomCommand']=SortRangeCustomCommand,exports[_0x1318a4(0x32e)]=SortRangeCustomInCtxMenuCommand,exports[_0x1318a4(0x2b4)]=SortRangeDescCommand,exports['SortRangeDescExtCommand']=SortRangeDescExtCommand,exports[_0x1318a4(0x263)]=SortRangeDescExtInCtxMenuCommand,exports[_0x1318a4(0x23f)]=SortRangeDescInCtxMenuCommand;