@univerjs/sheets-conditional-formatting-ui 0.10.4 → 0.10.5

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/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(D,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("@univerjs/core"),require("@univerjs/sheets"),require("@univerjs/sheets-conditional-formatting"),require("@univerjs/ui"),require("react/jsx-runtime"),require("react"),require("@univerjs/design"),require("@univerjs/engine-formula"),require("@univerjs/sheets-formula-ui"),require("@univerjs/sheets-ui"),require("rxjs"),require("@univerjs/engine-render"),require("rxjs/operators")):typeof define=="function"&&define.amd?define(["exports","@univerjs/core","@univerjs/sheets","@univerjs/sheets-conditional-formatting","@univerjs/ui","react/jsx-runtime","react","@univerjs/design","@univerjs/engine-formula","@univerjs/sheets-formula-ui","@univerjs/sheets-ui","rxjs","@univerjs/engine-render","rxjs/operators"],i):(D=typeof globalThis<"u"?globalThis:D||self,i(D.UniverSheetsConditionalFormattingUi={},D.UniverCore,D.UniverSheets,D.UniverSheetsConditionalFormatting,D.UniverUi,D.React,D.React,D.UniverDesign,D.UniverEngineFormula,D.UniverSheetsFormulaUi,D.UniverSheetsUi,D.rxjs,D.UniverEngineRender,D.rxjs.operators))})(this,function(D,i,U,t,j,c,m,O,$e,pe,W,J,ar,fe){"use strict";var Wt=Object.defineProperty;var qt=(D,i,U)=>i in D?Wt(D,i,{enumerable:!0,configurable:!0,writable:!0,value:U}):D[i]=U;var re=(D,i,U)=>qt(D,typeof i!="symbol"?i+"":i,U);const He={type:i.CommandType.COMMAND,id:"sheet.command.add-average-conditional-rule",handler(r,e){if(!e)return!1;const{ranges:l,style:n,stopIfTrue:a,operator:u}=e,s=r.get(t.ConditionalFormattingRuleModel),v=r.get(i.ICommandService),o=r.get(i.IUniverInstanceService),f=U.getSheetCommandTarget(o);if(!f)return!1;const{unitId:d,subUnitId:p}=f,h=s.createCfId(d,p),b={ranges:l,cfId:h,stopIfTrue:!!a,rule:{type:t.CFRuleType.highlightCell,subType:t.CFSubRuleType.average,operator:u,style:n}};return v.executeCommand(t.AddConditionalRuleMutation.id,{unitId:d,subUnitId:p,rule:b})}},Be={type:i.CommandType.COMMAND,id:"sheet.command.add-color-scale-conditional-rule",handler(r,e){if(!e)return!1;const{ranges:l,config:n,stopIfTrue:a}=e,u=r.get(t.ConditionalFormattingRuleModel),s=r.get(i.ICommandService),v=r.get(i.IUniverInstanceService),o=U.getSheetCommandTarget(v);if(!o)return!1;const{unitId:f,subUnitId:d}=o,p=u.createCfId(f,d),h={ranges:l,cfId:p,stopIfTrue:!!a,rule:{type:t.CFRuleType.colorScale,config:n}};return s.executeCommand(t.AddConditionalRuleMutation.id,{unitId:f,subUnitId:d,rule:h})}},We={type:i.CommandType.COMMAND,id:"sheet.command.add-data-bar-conditional-rule",handler(r,e){if(!e)return!1;const{ranges:l,min:n,max:a,nativeColor:u,positiveColor:s,isGradient:v,stopIfTrue:o,isShowValue:f}=e,d=r.get(t.ConditionalFormattingRuleModel),p=r.get(i.IUniverInstanceService),h=U.getSheetCommandTarget(p);if(!h)return!1;const{unitId:b,subUnitId:S}=h,C=r.get(i.ICommandService),N=d.createCfId(b,S),_={ranges:l,cfId:N,stopIfTrue:!!o,rule:{type:t.CFRuleType.dataBar,isShowValue:f,config:{min:n,max:a,nativeColor:u,positiveColor:s,isGradient:v}}};return C.executeCommand(t.AddConditionalRuleMutation.id,{unitId:b,subUnitId:S,rule:_})}},qe={type:i.CommandType.COMMAND,id:"sheet.command.add-duplicate-values-conditional-rule",handler(r,e){if(!e)return!1;const{ranges:l,style:n,stopIfTrue:a}=e,u=r.get(t.ConditionalFormattingRuleModel),s=r.get(i.ICommandService),v=r.get(i.IUniverInstanceService),o=U.getSheetCommandTarget(v);if(!o)return!1;const{unitId:f,subUnitId:d}=o,p=u.createCfId(f,d),h={ranges:l,cfId:p,stopIfTrue:!!a,rule:{type:t.CFRuleType.highlightCell,subType:t.CFSubRuleType.duplicateValues,style:n}};return s.executeCommand(t.AddConditionalRuleMutation.id,{unitId:f,subUnitId:d,rule:h})}},Ge={type:i.CommandType.COMMAND,id:"sheet.command.add-number-conditional-rule",handler(r,e){if(!e)return!1;const{ranges:l,style:n,stopIfTrue:a,operator:u,value:s}=e,v=r.get(t.ConditionalFormattingRuleModel),o=r.get(i.ICommandService),f=r.get(i.IUniverInstanceService),d=U.getSheetCommandTarget(f);if(!d)return!1;const{unitId:p,subUnitId:h}=d,b=v.createCfId(p,h);let S;if([t.CFNumberOperator.between,t.CFNumberOperator.notBetween].includes(u)){const C=s;if(C.length!==2||!Array.isArray(C))return!1;S={ranges:l,cfId:b,stopIfTrue:!!a,rule:{type:t.CFRuleType.highlightCell,subType:t.CFSubRuleType.number,operator:u,style:n,value:C}}}else{const C=s;if(typeof C!="number")return!1;S={ranges:l,cfId:b,stopIfTrue:!!a,rule:{type:t.CFRuleType.highlightCell,subType:t.CFSubRuleType.number,operator:u,style:n,value:C}}}return o.executeCommand(t.AddConditionalRuleMutation.id,{unitId:p,subUnitId:h,rule:S})}},Ze={type:i.CommandType.COMMAND,id:"sheet.command.add-rank-conditional-rule",handler(r,e){if(!e)return!1;const{ranges:l,style:n,stopIfTrue:a,isPercent:u,isBottom:s,value:v}=e,o=r.get(t.ConditionalFormattingRuleModel),f=r.get(i.IUniverInstanceService),d=r.get(i.ICommandService),p=U.getSheetCommandTarget(f);if(!p)return!1;const{unitId:h,subUnitId:b}=p,S=o.createCfId(h,b),C={ranges:l,cfId:S,stopIfTrue:!!a,rule:{type:t.CFRuleType.highlightCell,subType:t.CFSubRuleType.rank,isPercent:u,isBottom:s,style:n,value:v}};return d.executeCommand(t.AddConditionalRuleMutation.id,{unitId:h,subUnitId:b,rule:C})}},ze={type:i.CommandType.COMMAND,id:"sheet.command.add-text-conditional-rule",handler(r,e){if(!e)return!1;const{ranges:l,style:n,stopIfTrue:a,operator:u,value:s}=e,v=r.get(t.ConditionalFormattingRuleModel),o=r.get(i.IUniverInstanceService),f=U.getSheetCommandTarget(o);if(!f)return!1;const{unitId:d,subUnitId:p}=f,h=r.get(i.ICommandService),b=v.createCfId(d,p),S={ranges:l,cfId:b,stopIfTrue:!!a,rule:{type:t.CFRuleType.highlightCell,subType:t.CFSubRuleType.text,operator:u,style:n,value:s}};return h.executeCommand(t.AddConditionalRuleMutation.id,{unitId:d,subUnitId:p,rule:S})}},Ye={type:i.CommandType.COMMAND,id:"sheet.command.add-time-period-conditional-rule",handler(r,e){if(!e)return!1;const{ranges:l,style:n,stopIfTrue:a,operator:u}=e,s=r.get(t.ConditionalFormattingRuleModel),v=r.get(i.IUniverInstanceService),o=r.get(i.ICommandService),f=U.getSheetCommandTarget(v);if(!f)return!1;const{unitId:d,subUnitId:p}=f,h=s.createCfId(d,p),b={ranges:l,cfId:h,stopIfTrue:!!a,rule:{type:t.CFRuleType.highlightCell,subType:t.CFSubRuleType.timePeriod,operator:u,style:n}};return o.executeCommand(t.AddConditionalRuleMutation.id,{unitId:d,subUnitId:p,rule:b})}},Ke={type:i.CommandType.COMMAND,id:"sheet.command.add-uniqueValues-conditional-rule",handler(r,e){if(!e)return!1;const{ranges:l,style:n,stopIfTrue:a}=e,u=r.get(t.ConditionalFormattingRuleModel),s=r.get(i.IUniverInstanceService),v=r.get(i.ICommandService),o=U.getSheetCommandTarget(s);if(!o)return!1;const{unitId:f,subUnitId:d}=o,p=u.createCfId(f,d),h={ranges:l,cfId:p,stopIfTrue:!!a,rule:{type:t.CFRuleType.highlightCell,subType:t.CFSubRuleType.uniqueValues,style:n}};return v.executeCommand(t.AddConditionalRuleMutation.id,{unitId:f,subUnitId:d,rule:h})}};var K=function(){return K=Object.assign||function(r){for(var e,l=1,n=arguments.length;l<n;l++){e=arguments[l];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a])}return r},K.apply(this,arguments)},Rr=function(r,e){var l={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(l[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(r);a<n.length;a++)e.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(r,n[a])&&(l[n[a]]=r[n[a]]);return l},X=m.forwardRef(function(r,e){var l=r.icon,n=r.id,a=r.className,u=r.extend,s=Rr(r,["icon","id","className","extend"]),v="univerjs-icon univerjs-icon-".concat(n," ").concat(a||"").trim(),o=m.useRef("_".concat(Or()));return lr(l,"".concat(n),{defIds:l.defIds,idSuffix:o.current},K({ref:e,className:v},s),u)});function lr(r,e,l,n,a){return m.createElement(r.tag,K(K({key:e},Mr(r,l,a)),n),(Vr(r,l).children||[]).map(function(u,s){return lr(u,"".concat(e,"-").concat(r.tag,"-").concat(s),l,void 0,a)}))}function Mr(r,e,l){var n=K({},r.attrs);l!=null&&l.colorChannel1&&n.fill==="colorChannel1"&&(n.fill=l.colorChannel1),r.tag==="mask"&&n.id&&(n.id=n.id+e.idSuffix),Object.entries(n).forEach(function(u){var s=u[0],v=u[1];s==="mask"&&typeof v=="string"&&(n[s]=v.replace(/url\(#(.*)\)/,"url(#$1".concat(e.idSuffix,")")))});var a=e.defIds;return!a||a.length===0||(r.tag==="use"&&n["xlink:href"]&&(n["xlink:href"]=n["xlink:href"]+e.idSuffix),Object.entries(n).forEach(function(u){var s=u[0],v=u[1];typeof v=="string"&&(n[s]=v.replace(/url\(#(.*)\)/,"url(#$1".concat(e.idSuffix,")")))})),n}function Vr(r,e){var l,n=e.defIds;return!n||n.length===0?r:r.tag==="defs"&&(!((l=r.children)===null||l===void 0)&&l.length)?K(K({},r),{children:r.children.map(function(a){return typeof a.attrs.id=="string"&&n&&n.includes(a.attrs.id)?K(K({},a),{attrs:K(K({},a.attrs),{id:a.attrs.id+e.idSuffix})}):a})}):r}function Or(){return Math.random().toString(36).substring(2,8)}X.displayName="UniverIcon";var Ur={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M4.65791 1.30005C3.77355 1.30005 3.05664 2.01696 3.05664 2.90132V12.8588C3.05664 13.8755 3.88086 14.6998 4.89759 14.6998H9.1016C11.2233 14.6998 12.9433 12.9798 12.9433 10.8581C12.9433 9.13925 11.8145 7.68407 10.2578 7.1934C10.8806 6.56856 11.2655 5.70659 11.2655 4.75472C11.2655 2.84676 9.71883 1.30005 7.81087 1.30005H4.65791ZM4.25664 2.90132C4.25664 2.6797 4.4363 2.50005 4.65791 2.50005H7.81087C9.05609 2.50005 10.0655 3.5095 10.0655 4.75472C10.0655 5.99993 9.05609 7.00938 7.81087 7.00938H4.25664V2.90132ZM4.25664 12.8588V8.21636H9.1016C10.5606 8.21636 11.7433 9.39909 11.7433 10.8581C11.7433 12.317 10.5606 13.4998 9.1016 13.4998H4.89759C4.5436 13.4998 4.25664 13.2128 4.25664 12.8588Z",fillRule:"evenodd",clipRule:"evenodd"}}]},ur=m.forwardRef(function(r,e){return m.createElement(X,Object.assign({},r,{id:"bold-icon",ref:e,icon:Ur}))});ur.displayName="BoldIcon";var kr={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",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 0.866699 5.9313 0.866699H10.069C10.4004 0.866699 10.669 1.13533 10.669 1.4667C10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M1.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.64443C14.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:"M6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928L9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171C10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778L9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539C9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263L6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539C5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778L6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.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.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z",fillRule:"evenodd",clipRule:"evenodd"}}]},Ee=m.forwardRef(function(r,e){return m.createElement(X,Object.assign({},r,{id:"delete-icon",ref:e,icon:kr}))});Ee.displayName="DeleteIcon";var Pr={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 17 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"colorChannel1",d:"M1.98682 13.4992C1.98682 12.5603 2.74793 11.7992 3.68682 11.7992H14.2868C15.2257 11.7992 15.9868 12.5603 15.9868 13.4992V13.4992C15.9868 14.4381 15.2257 15.1992 14.2868 15.1992H3.68682C2.74793 15.1992 1.98682 14.4381 1.98682 13.4992V13.4992Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M10.3014 1.70389C9.85268 0.479568 8.12109 0.479557 7.67238 1.70389L4.72235 9.75326C4.60832 10.0644 4.76811 10.4091 5.07924 10.5231C5.39038 10.6371 5.73504 10.4773 5.84907 10.1662L6.99975 7.02646C7.03588 7.03324 7.07314 7.03679 7.11123 7.03679H10.9778L12.1247 10.1662C12.2387 10.4773 12.5834 10.6371 12.8945 10.5231C13.2057 10.4091 13.3654 10.0644 13.2514 9.75326L10.3014 1.70389ZM10.538 5.83679L9.17467 2.11682C9.11057 1.94192 8.8632 1.94192 8.7991 2.11682L7.43576 5.83679H10.538Z",fillRule:"evenodd",clipRule:"evenodd"}}]},ir=m.forwardRef(function(r,e){return m.createElement(X,Object.assign({},r,{id:"font-color-double-icon",ref:e,icon:Pr}))});ir.displayName="FontColorDoubleIcon";var Dr={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",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"}}]},sr=m.forwardRef(function(r,e){return m.createElement(X,Object.assign({},r,{id:"increase-icon",ref:e,icon:Dr}))});sr.displayName="IncreaseIcon";var Lr={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M9.80385 1.40005H11.9997C12.3311 1.40005 12.5997 1.66868 12.5997 2.00005C12.5997 2.33143 12.3311 2.60005 11.9997 2.60005H10.1185L7.12251 13.4001H9.33324C9.66461 13.4001 9.93324 13.6687 9.93324 14.0001C9.93324 14.3314 9.66461 14.6001 9.33324 14.6001H6.34785C6.33847 14.6003 6.32905 14.6003 6.31962 14.6001H3.9999C3.66853 14.6001 3.3999 14.3314 3.3999 14.0001C3.3999 13.6687 3.66853 13.4001 3.9999 13.4001H5.87719L8.87322 2.60005H6.66641C6.33504 2.60005 6.06641 2.33143 6.06641 2.00005C6.06641 1.66868 6.33504 1.40005 6.66641 1.40005H9.52916C9.61698 1.37929 9.71064 1.3781 9.80385 1.40005Z"}}]},cr=m.forwardRef(function(r,e){return m.createElement(X,Object.assign({},r,{id:"italic-icon",ref:e,icon:Lr}))});cr.displayName="ItalicIcon";var jr={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",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"}}]},Xe=m.forwardRef(function(r,e){return m.createElement(X,Object.assign({},r,{id:"more-down-icon",ref:e,icon:jr}))});Xe.displayName="MoreDownIcon";var Ar={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 17 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M8.01281 1.36643C8.79386 0.585377 10.0602 0.585378 10.8412 1.36643L12.9223 3.44752C13.7034 4.22857 13.7034 5.4949 12.9223 6.27595L9.36445 9.83383C8.5834 10.6149 7.31707 10.6149 6.53602 9.83383L4.45493 7.75273C3.67388 6.97168 3.67388 5.70535 4.45493 4.9243L8.01281 1.36643ZM9.9927 2.21495C9.68028 1.90253 9.17375 1.90253 8.86133 2.21495L5.30346 5.77283L5.29671 5.77966L10.839 6.66224L12.0738 5.42742C12.3862 5.115 12.3862 4.60847 12.0738 4.29605L9.9927 2.21495Z",fillRule:"evenodd",clipRule:"evenodd"}},{tag:"path",attrs:{fill:"currentColor",d:"M14.5179 9.48875C14.5179 9.99175 14.1101 10.3995 13.607 10.3995C13.1041 10.3995 12.6963 9.99175 12.6963 9.48875C12.6963 9.1773 13.0455 8.59966 13.3114 8.20487C13.4549 7.99177 13.7591 7.99177 13.9027 8.20486C14.1687 8.59965 14.5179 9.1773 14.5179 9.48875Z"}},{tag:"path",attrs:{fill:"colorChannel1",d:"M1.98682 13.4992C1.98682 12.5603 2.74793 11.7992 3.68682 11.7992H14.2868C15.2257 11.7992 15.9868 12.5603 15.9868 13.4992V13.4992C15.9868 14.4381 15.2257 15.1992 14.2868 15.1992H3.68682C2.74793 15.1992 1.98682 14.4381 1.98682 13.4992V13.4992Z"}}]},or=m.forwardRef(function(r,e){return m.createElement(X,Object.assign({},r,{id:"paint-bucket-double-icon",ref:e,icon:Ar}))});or.displayName="PaintBucketDoubleIcon";var Fr={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"mask",attrs:{id:"mask0_622_8",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 4C7 3.44772 6.55228 3 6 3C5.44772 3 5 3.44772 5 4C5 4.55228 5.44772 5 6 5Z"}},{tag:"path",attrs:{d:"M6 9C6.55228 9 7 8.55229 7 8C7 7.44772 6.55228 7 6 7C5.44772 7 5 7.44772 5 8C5 8.55229 5.44772 9 6 9Z"}},{tag:"path",attrs:{d:"M7 12C7 12.5523 6.55228 13 6 13C5.44772 13 5 12.5523 5 12C5 11.4477 5.44772 11 6 11C6.55228 11 7 11.4477 7 12Z"}},{tag:"path",attrs:{d:"M10 5C10.5523 5 11 4.55228 11 4C11 3.44772 10.5523 3 10 3C9.44771 3 9 3.44772 9 4C9 4.55228 9.44771 5 10 5Z"}},{tag:"path",attrs:{d:"M11 8C11 8.55229 10.5523 9 10 9C9.44771 9 9 8.55229 9 8C9 7.44772 9.44771 7 10 7C10.5523 7 11 7.44772 11 8Z"}},{tag:"path",attrs:{d:"M10 13C10.5523 13 11 12.5523 11 12C11 11.4477 10.5523 11 10 11C9.44771 11 9 11.4477 9 12C9 12.5523 9.44771 13 10 13Z"}}]}]},dr=m.forwardRef(function(r,e){return m.createElement(X,Object.assign({},r,{id:"sequence-icon",ref:e,icon:Fr}))});dr.displayName="SequenceIcon";var $r={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 17 17",width:"1em",height:"1em"},children:[{tag:"mask",attrs:{id:"mask0_436_41",width:17,height:17,x:0,y:0,maskUnits:"userSpaceOnUse"},children:[{tag:"path",attrs:{fill:"#D9D9D9",d:"M.35.48H16.35V16.48H.35z"}}]},{tag:"g",attrs:{mask:"url(#mask0_436_41)",fillRule:"evenodd",clipRule:"evenodd"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2.27177 13.714L13.5855 2.40025L14.434 3.24878L3.1203 14.5625L2.27177 13.714Z"}},{tag:"path",attrs:{fill:"#E5E5E5",d:"M4.2603 1.82495L2.89617 1.82495C2.23343 1.82495 1.69617 2.36221 1.69617 3.02495L1.69617 4.38908L3.02617 4.38908L3.02617 3.15495L4.2603 3.15495L4.2603 1.82495ZM15.0092 4.38908L15.0092 3.02495C15.0092 2.36221 14.4719 1.82495 13.8092 1.82495L12.4451 1.82495L12.4451 3.15495L13.6792 3.15495L13.6792 4.38908L15.0092 4.38908ZM6.98856 1.82495L6.98856 3.15495L9.71681 3.15495L9.71681 1.82495L6.98856 1.82495ZM15.0092 7.11734L13.6792 7.11734L13.6792 9.84559L15.0092 9.84559L15.0092 7.11734ZM15.0092 12.5739L13.6792 12.5739L13.6792 13.808L12.4451 13.808L12.4451 15.138L13.8092 15.138C14.4719 15.138 15.0092 14.6007 15.0092 13.938L15.0092 12.5739ZM9.71681 15.138L9.71681 13.808L6.98856 13.808L6.98856 15.138L9.71681 15.138ZM4.2603 15.138L4.2603 13.808L3.02617 13.808L3.02617 12.5739L1.69617 12.5739L1.69617 13.938C1.69617 14.6007 2.23343 15.138 2.89617 15.138L4.2603 15.138ZM1.69617 9.8456L3.02617 9.8456L3.02617 7.11734L1.69617 7.11734L1.69617 9.8456Z"}}]}]},he=m.forwardRef(function(r,e){return m.createElement(X,Object.assign({},r,{id:"slash-icon",ref:e,icon:$r}))});he.displayName="SlashIcon";var Hr={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M8.00033 1.20996C6.43345 1.20996 5.23596 1.88077 4.64804 2.94304C4.06338 3.99943 4.15123 5.32084 4.90099 6.47062C5.08199 6.7482 5.45374 6.82648 5.73131 6.64548C6.00888 6.46448 6.08716 6.09273 5.90616 5.81516C5.36418 4.98402 5.35768 4.13897 5.69797 3.52412C6.035 2.91515 6.78176 2.40996 8.00033 2.40996C9.19423 2.40996 10.0017 2.93409 10.5236 3.46755C10.7871 3.73682 10.9756 4.00712 11.0974 4.20903C11.158 4.30951 11.2013 4.39164 11.2284 4.44625C11.2419 4.47351 11.2514 4.49377 11.2568 4.50588L11.2621 4.51771C11.3901 4.82216 11.7407 4.96686 12.046 4.83992C12.3519 4.71267 12.4968 4.36149 12.3695 4.05552L11.8231 4.28278C12.3695 4.05552 12.3697 4.0558 12.3695 4.05552L12.3691 4.05437L12.3685 4.05298L12.367 4.04953L12.3629 4.03993L12.3498 4.01036C12.3388 3.98619 12.3234 3.95326 12.3033 3.91282C12.2632 3.83203 12.2043 3.72072 12.1249 3.58908C11.9666 3.32674 11.7235 2.97805 11.3814 2.62834C10.6921 1.92381 9.59192 1.20996 8.00033 1.20996Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M2.11953 8.5999H7.88935C10.1109 9.46549 10.5895 10.7649 10.4268 11.6869C10.2475 12.703 9.26939 13.5898 8.00009 13.5898C6.63323 13.5898 5.77631 13.0502 5.25534 12.528C4.99021 12.2623 4.80823 11.9965 4.69365 11.7993C4.63659 11.7011 4.59698 11.6211 4.5727 11.5686C4.56059 11.5424 4.55236 11.5231 4.54774 11.512L4.54352 11.5016C4.4267 11.193 4.0823 11.0363 3.77279 11.1516C3.46228 11.2673 3.30438 11.6129 3.4201 11.9234L3.9649 11.7203C3.4201 11.9234 3.41998 11.9231 3.4201 11.9234L3.4206 11.9247L3.42118 11.9263L3.42262 11.9301L3.42661 11.9403C3.42977 11.9484 3.43394 11.9588 3.43914 11.9713C3.44956 11.9965 3.46418 12.0304 3.48334 12.0719C3.52161 12.1547 3.57828 12.2682 3.65608 12.4021C3.81124 12.6692 4.0534 13.0223 4.40584 13.3756C5.12 14.0914 6.27196 14.7898 8.00009 14.7898C9.82574 14.7898 11.3236 13.5101 11.6085 11.8955C11.812 10.7422 11.3901 9.55402 10.2665 8.5999H13.8804C14.2117 8.5999 14.4803 8.33127 14.4803 7.9999C14.4803 7.66853 14.2117 7.3999 13.8804 7.3999H8.01411C8.0048 7.39968 7.99551 7.39969 7.98625 7.3999H2.11953C1.78816 7.3999 1.51953 7.66853 1.51953 7.9999C1.51953 8.33127 1.78816 8.5999 2.11953 8.5999Z"}}]},vr=m.forwardRef(function(r,e){return m.createElement(X,Object.assign({},r,{id:"strikethrough-icon",ref:e,icon:Hr}))});vr.displayName="StrikethroughIcon";var Br={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M4.46416 2.03237C4.46416 1.701 4.19553 1.43237 3.86416 1.43237C3.53279 1.43237 3.26416 1.701 3.26416 2.03237V7.33338C3.26416 10.0313 5.35834 12.2667 7.9999 12.2667C10.6415 12.2667 12.7356 10.0313 12.7356 7.33338V2.03237C12.7356 1.701 12.467 1.43237 12.1356 1.43237C11.8043 1.43237 11.5356 1.701 11.5356 2.03237V7.33338C11.5356 9.42194 9.92656 11.0667 7.9999 11.0667C6.07325 11.0667 4.46416 9.42194 4.46416 7.33338V2.03237Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M2.66641 13.4663C2.33504 13.4663 2.06641 13.7349 2.06641 14.0663C2.06641 14.3977 2.33504 14.6663 2.66641 14.6663H13.3331C13.6644 14.6663 13.9331 14.3977 13.9331 14.0663C13.9331 13.7349 13.6644 13.4663 13.3331 13.4663H2.66641Z"}}]},pr=m.forwardRef(function(r,e){return m.createElement(X,Object.assign({},r,{id:"underline-icon",ref:e,icon:Br}))});pr.displayName="UnderlineIcon";const te=r=>{const{color:e,onChange:l,disable:n=!1,Icon:a=or,className:u}=r,s=m.useMemo(()=>new i.ColorKit(e),[e]),v=()=>{const o={className:O.clsx("univer-fill-primary-600",n&&u),extend:{colorChannel1:s.isValid?e:""}};return c.jsx(a,{...o})};return n?v():c.jsx(O.Dropdown,{overlay:c.jsx("div",{className:"univer-rounded-lg univer-p-4",children:c.jsx(O.ColorPicker,{value:e,onChange:l})}),children:c.jsx("span",{className:O.clsx("univer-flex univer-cursor-pointer univer-items-center univer-rounded univer-p-1 hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-700",u),children:v()})})},ue=r=>{var u,s,v,o,f;const e=r.rule;if(!e)return null;const l=m.useMemo(()=>{if(e.type===t.CFRuleType.colorScale){const d=e.config.map((b,S)=>({color:new i.ColorKit(b.color),value:S})),p=d.length-1;return new Array(5).fill("").map((b,S,C)=>S*p/(C.length-1)).map(b=>t.getColorScaleFromValue(d,b))}return null},[e]),n=m.useMemo(()=>{if(e.type===t.CFRuleType.iconSet)return e.config.map(d=>{const p=t.iconMap[d.iconType];return p&&p[Number(d.iconId)]})},[e]),a="univer-pointer-events-none univer-flex univer-h-5 univer-min-w-[72px] univer-items-center univer-justify-center univer-text-xs";switch(e.type){case t.CFRuleType.dataBar:{const{isGradient:d}=e.config,p=d?`linear-gradient(to right, ${e.config.positiveColor||t.defaultDataBarPositiveColor}, rgb(255 255 255))`:e.config.positiveColor,h=d?`linear-gradient(to right, rgb(255 255 255),${e.config.nativeColor||t.defaultDataBarNativeColor})`:e.config.nativeColor;return c.jsxs("div",{className:a,children:[c.jsx("div",{className:"univer-h-full univer-w-1/2 univer-border univer-border-solid",style:{background:h,borderColor:(u=e.config.nativeColor)!=null?u:t.defaultDataBarNativeColor}}),c.jsx("div",{className:"univer-h-full univer-w-1/2 univer-border univer-border-solid",style:{background:p,borderColor:(s=e.config.positiveColor)!=null?s:t.defaultDataBarPositiveColor}})]})}case t.CFRuleType.colorScale:return l&&c.jsx("div",{className:a,children:l.map((d,p)=>c.jsx("div",{className:"univer-h-full",style:{width:`${100/l.length}%`,background:d}},p))});case t.CFRuleType.iconSet:return n&&c.jsx("div",{className:a,children:n.map((d,p)=>d?c.jsx("img",{className:"univer-h-full",src:d,draggable:!1},p):c.jsx(he,{},p))});case t.CFRuleType.highlightCell:{const{ul:d,st:p,it:h,bl:b,bg:S,cl:C}=e.style,N=(d==null?void 0:d.s)===i.BooleanNumber.TRUE,_=(p==null?void 0:p.s)===i.BooleanNumber.TRUE,E=h===i.BooleanNumber.TRUE,M=b===i.BooleanNumber.TRUE,R=(v=S==null?void 0:S.rgb)!=null?v:t.DEFAULT_BG_COLOR,g=(o=C==null?void 0:C.rgb)!=null?o:t.DEFAULT_FONT_COLOR,T={textDecoration:(f=`${N?"underline":""} ${_?"line-through":""}`.replace(/^ /,""))!=null?f:void 0,backgroundColor:R,color:g};return c.jsx("div",{className:O.clsx(a,{"univer-font-bold":M,"univer-italic":E}),style:T,children:"123"})}}},ge=O.clsx("univer-mt-5 univer-px-1 univer-py-2 univer-rounded",O.borderClassName),ne=(r,e)=>({label:e.t(`sheet.cf.valueType.${r}`),value:r}),Je=r=>{var S;const{type:e,className:l,onChange:n,id:a,value:u}=r,s=j.useDependency(i.IUniverInstanceService),v=s.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET).getUnitId(),o=(S=s.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET).getActiveSheet())==null?void 0:S.getSheetId(),f=m.useMemo(()=>String(u).startsWith("=")?String(u):"=",[u]),d=m.useMemo(()=>[t.CFValueType.max,t.CFValueType.min,"none"].includes(e)?{disabled:!0}:[t.CFValueType.percent,t.CFValueType.percentile].includes(e)?{min:0,max:100}:{min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER},[e]),p=m.useRef(null),[h,b]=m.useState(!1);return j.useSidebarClick(C=>{var _;((_=p.current)==null?void 0:_.isClickOutSide(C))&&b(!1)}),e===t.CFValueType.formula?c.jsx("div",{className:"univer-ml-1 univer-w-full",children:c.jsx(pe.FormulaEditor,{ref:p,className:O.clsx("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent",O.borderClassName),initValue:f,unitId:v,subUnitId:o,isFocus:h,onChange:(C="")=>{n(C||"")},onFocus:()=>b(!0)})}):c.jsx(O.InputNumber,{className:l,value:Number(r.value)||0,onChange:C=>r.onChange(C||0),...d})},Wr=r=>{var L;const{interceptorManager:e}=r,l=j.useDependency(i.LocaleService),n=((L=r.rule)==null?void 0:L.type)===t.CFRuleType.colorScale?r.rule:void 0,a=[ne(t.CFValueType.num,l),ne(t.CFValueType.percent,l),ne(t.CFValueType.percentile,l),ne(t.CFValueType.formula,l)],u=[ne(t.CFValueType.min,l),...a],s=[ne("none",l),...a],v=[ne(t.CFValueType.max,l),...a],[o,f]=m.useState(()=>{var x;const y=t.CFValueType.min;return n&&((x=n.config[0])==null?void 0:x.value.type)||y}),[d,p]=m.useState(()=>{var x;const y="none";return!n||n.config.length!==3?y:((x=n.config[1])==null?void 0:x.value.type)||y}),[h,b]=m.useState(()=>{var x;const y=t.CFValueType.max;return n&&((x=n.config[n.config.length-1])==null?void 0:x.value.type)||y}),[S,C]=m.useState(()=>{if(!n)return 10;const x=n.config[0];return(x==null?void 0:x.value.value)===void 0?10:x==null?void 0:x.value.value}),[N,_]=m.useState(()=>{var F;if(!n||n.config.length!==3)return 50;const x=(F=n.config[1])==null?void 0:F.value.value;return x===void 0?50:x}),[E,M]=m.useState(()=>{var F;if(!n)return 90;const x=(F=n.config[n.config.length-1])==null?void 0:F.value.value;return x===void 0?90:x}),[R,g]=m.useState(()=>{var x;const y="#d0d9fb";return n&&((x=n.config[0])==null?void 0:x.color)||y}),[T,w]=m.useState(()=>{var x;const y="#7790f3";return!n||n.config.length!==3?y:((x=n.config[1])==null?void 0:x.color)||y}),[I,k]=m.useState(()=>{var x;const y="#2e55ef";return n&&((x=n.config[n.config.length-1])==null?void 0:x.color)||y}),V=m.useMemo(()=>y=>{const{minType:x,medianType:F,maxType:G,minValue:Q,medianValue:ee,maxValue:de,minColor:ve,medianColor:A,maxColor:$}=y,B=[];return B.push({color:ve,value:{type:x,value:Q}}),F!=="none"&&B.push({color:A,value:{type:F,value:ee}}),B.push({color:$,value:{type:G,value:de}}),{config:B.map((Z,z)=>({...Z,index:z})),type:t.CFRuleType.colorScale}},[]);m.useEffect(()=>e.intercept(e.getInterceptPoints().submit,{handler(){return V({minType:o,medianType:d,maxType:h,minValue:S,medianValue:N,maxValue:E,minColor:R,medianColor:T,maxColor:I})}}),[V,o,d,h,S,N,E,R,T,I,e]);const P=y=>{r.onChange(V(y))};return c.jsxs("div",{children:[c.jsx("div",{className:"univer-mt-4 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",children:l.t("sheet.cf.panel.styleRule")}),c.jsx("div",{className:ge,children:c.jsx(ue,{rule:V({minType:o,medianType:d,maxType:h,minValue:S,medianValue:N,maxValue:E,minColor:R,medianColor:T,maxColor:I})})}),c.jsx("div",{className:"univer-mt-3 univer-text-xs univer-text-gray-600 dark:!univer-text-gray-200",children:l.t("sheet.cf.valueType.min")}),c.jsxs("div",{className:"univer-mt-3 univer-flex univer-h-8 univer-items-center",children:[c.jsx(O.Select,{className:"univer-flex-shrink-0",options:u,value:o,onChange:y=>{f(y);const x=t.createDefaultValueByValueType(y,10);C(x),P({minType:y,medianType:d,maxType:h,minValue:x,medianValue:N,maxValue:E,minColor:R,medianColor:T,maxColor:I})}}),c.jsx(Je,{id:"min",className:"univer-ml-1",value:S,type:o,onChange:y=>{C(y),P({minType:o,medianType:d,maxType:h,minValue:y,medianValue:N,maxValue:E,minColor:R,medianColor:T,maxColor:I})}}),c.jsx(te,{className:"univer-ml-1",color:R,onChange:y=>{g(y),P({minType:o,medianType:d,maxType:h,minValue:S,medianValue:N,maxValue:E,minColor:y,medianColor:T,maxColor:I})}})]}),c.jsx("div",{className:"univer-text-gray-600dark:!univer-text-gray-200 univer-mt-3 univer-text-xs",children:l.t("sheet.cf.panel.medianValue")}),c.jsxs("div",{className:"univer-mt-3 univer-flex univer-h-8 univer-items-center",children:[c.jsx(O.Select,{className:"univer-flex-shrink-0",options:s,value:d,onChange:y=>{p(y);const x=t.createDefaultValueByValueType(y,50);_(x),P({minType:o,medianType:y,maxType:h,minValue:S,medianValue:x,maxValue:E,minColor:R,medianColor:T,maxColor:I})}}),c.jsx(Je,{id:"median",className:"univer-ml-1",value:N,type:d,onChange:y=>{_(y),P({minType:o,medianType:d,maxType:h,minValue:S,medianValue:y,maxValue:E,minColor:R,medianColor:T,maxColor:I})}}),d!=="none"&&c.jsx(te,{className:"univer-ml-1",color:T,onChange:y=>{w(y),P({minType:o,medianType:d,maxType:h,minValue:S,medianValue:N,maxValue:E,minColor:R,medianColor:y,maxColor:I})}})]}),c.jsx("div",{className:"univer-mt-3 univer-text-xs univer-text-gray-600 dark:!univer-text-gray-200",children:l.t("sheet.cf.valueType.max")}),c.jsxs("div",{className:"univer-mt-3 univer-flex univer-h-8 univer-items-center",children:[c.jsx(O.Select,{className:"univer-flex-shrink-0",options:v,value:h,onChange:y=>{b(y);const x=t.createDefaultValueByValueType(y,90);M(x),P({minType:o,medianType:d,maxType:y,minValue:S,medianValue:N,maxValue:x,minColor:R,medianColor:T,maxColor:I})}}),c.jsx(Je,{id:"max",className:"univer-ml-1",value:E,type:h,onChange:y=>{M(y),P({minType:o,medianType:d,maxType:h,minValue:S,medianValue:N,maxValue:y,minColor:R,medianColor:T,maxColor:I})}}),c.jsx(te,{className:"univer-ml-1",color:I,onChange:y=>{k(y),P({minType:o,medianType:d,maxType:h,minValue:S,medianValue:N,maxValue:E,minColor:R,medianColor:T,maxColor:y})}})]})]})},ie=(r,e)=>({label:e.t(`sheet.cf.valueType.${r}`),value:r}),fr=r=>{var C;const{onChange:e,className:l,value:n,type:a,id:u,disabled:s=!1}=r,v=j.useDependency(i.IUniverInstanceService),o=v.getCurrentUnitOfType(i.UniverInstanceType.UNIVER_SHEET).getUnitId(),f=(C=v.getCurrentUnitOfType(i.UniverInstanceType.UNIVER_SHEET).getActiveSheet())==null?void 0:C.getSheetId(),d=m.useRef(null),[p,h]=m.useState(!1);j.useSidebarClick(N=>{var E;((E=d.current)==null?void 0:E.isClickOutSide(N))&&h(!1)});const b=m.useRef(n),S=m.useMemo(()=>[t.CFValueType.percentile,t.CFValueType.percent].includes(a)?{max:100,min:0}:{min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER},[a]);if(a===t.CFValueType.formula){const N=String(b.current).startsWith("=")?String(b.current)||"":"=";return c.jsx("div",{className:"univer-ml-3 univer-w-full",children:c.jsx(pe.FormulaEditor,{ref:d,className:O.clsx("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent",O.borderClassName),initValue:N,unitId:o,subUnitId:f,isFocus:p,onChange:(_="")=>{e(_||"")},onFocus:()=>h(!0)})})}return c.jsx(O.InputNumber,{className:l,value:Number(n)||0,disabled:s,onChange:N=>{e(N||0)},...S})},qr=r=>{var L;const{interceptorManager:e}=r,l=j.useDependency(i.LocaleService),n=((L=r.rule)==null?void 0:L.type)===t.CFRuleType.dataBar?r.rule:void 0,[a,u]=m.useState(()=>{var x;return n&&(x=n.config)!=null&&x.isGradient?"1":"0"}),[s,v]=m.useState(()=>{var y;return n&&((y=n.config)==null?void 0:y.positiveColor)||t.defaultDataBarPositiveColor}),[o,f]=m.useState(()=>{var y;return n&&((y=n.config)==null?void 0:y.nativeColor)||t.defaultDataBarNativeColor}),d=[ie(t.CFValueType.num,l),ie(t.CFValueType.percent,l),ie(t.CFValueType.percentile,l),ie(t.CFValueType.formula,l)],p=[ie(t.CFValueType.min,l),...d],h=[ie(t.CFValueType.max,l),...d],[b,S]=m.useState(()=>{var x;const y=p[0].value;return n&&((x=n.config)==null?void 0:x.min.type)||y}),[C,N]=m.useState(()=>{var x;const y=h[0].value;return n&&((x=n.config)==null?void 0:x.max.type)||y}),[_,E]=m.useState(()=>{var F;if(!n)return 0;const x=((F=n.config)==null?void 0:F.min)||{};return x.type===t.CFValueType.formula?x.value||"=":x.value||0}),[M,R]=m.useState(()=>{var F;if(!n)return 100;const x=((F=n.config)==null?void 0:F.max)||{};return x.type===t.CFValueType.formula?x.value||"=":x.value===void 0?100:x.value}),[g,T]=m.useState(()=>n?n.isShowValue===void 0?!0:!!n.isShowValue:!0),w=y=>({config:{min:{type:y.minValueType,value:y.minValue},max:{type:y.maxValueType,value:y.maxValue},isGradient:y.isGradient==="1",positiveColor:y.positiveColor||t.defaultDataBarPositiveColor,nativeColor:y.nativeColor||t.defaultDataBarNativeColor},type:t.CFRuleType.dataBar,isShowValue:y.isShowValue});m.useEffect(()=>e.intercept(e.getInterceptPoints().submit,{handler(){return w({isGradient:a,minValue:_,minValueType:b,maxValue:M,maxValueType:C,positiveColor:s,nativeColor:o,isShowValue:g})}}),[a,_,b,M,C,s,o,e,g]);const I=y=>{r.onChange(w(y))},k=y=>{v(y),I({isGradient:a,minValue:_,minValueType:b,maxValue:M,maxValueType:C,positiveColor:y,nativeColor:o,isShowValue:g})},V=y=>{f(y),I({isGradient:a,minValue:_,minValueType:b,maxValue:M,maxValueType:C,positiveColor:s,nativeColor:y,isShowValue:g})},P=y=>d.map(x=>x.value).includes(y);return c.jsxs("div",{children:[c.jsx("div",{className:"univer-mt-4 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",children:l.t("sheet.cf.panel.styleRule")}),c.jsx("div",{className:ge,children:c.jsx(ue,{rule:w({isGradient:a,minValue:_,minValueType:b,maxValue:M,maxValueType:C,positiveColor:s,nativeColor:o,isShowValue:g})})}),c.jsxs("div",{children:[c.jsx("div",{className:"univer-mt-3 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",children:l.t("sheet.cf.panel.fillType")}),c.jsxs("div",{className:"univer-ml-1 univer-mt-3 univer-flex univer-items-center",children:[c.jsxs(O.RadioGroup,{value:a,onChange:y=>{u(y),I({isGradient:y,minValue:_,minValueType:b,maxValue:M,maxValueType:C,positiveColor:s,nativeColor:o,isShowValue:g})},children:[c.jsx(O.Radio,{value:"0",children:c.jsx("span",{className:"univer-text-xs",children:l.t("sheet.cf.panel.pureColor")})}),c.jsx(O.Radio,{value:"1",children:c.jsx("span",{className:"univer-text-xs",children:l.t("sheet.cf.panel.gradient")})})]}),c.jsxs("div",{className:"univer-ml-6 univer-flex univer-items-center univer-text-xs",children:[c.jsx(O.Checkbox,{checked:!g,onChange:y=>{T(!y),I({isGradient:y,minValue:_,minValueType:b,maxValue:M,maxValueType:C,positiveColor:s,nativeColor:o,isShowValue:!y})}}),l.t("sheet.cf.panel.onlyShowDataBar")]})]})]}),c.jsxs("div",{children:[c.jsx("div",{className:"univer-mt-3 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",children:l.t("sheet.cf.panel.colorSet")}),c.jsxs("div",{className:"univer-ml-1 univer-mt-3 univer-flex univer-items-center",children:[c.jsxs("div",{className:"univer-flex univer-items-center",children:[c.jsx("div",{className:"univer-text-xs",children:l.t("sheet.cf.panel.native")}),c.jsx(te,{color:o,onChange:V})]}),c.jsxs("div",{className:"univer-ml-3 univer-flex univer-items-center",children:[c.jsx("div",{className:"univer-text-xs",children:l.t("sheet.cf.panel.positive")}),c.jsx(te,{color:s,onChange:k})]})]})]}),c.jsxs("div",{children:[c.jsx("div",{className:"univer-mt-3 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",children:l.t("sheet.cf.valueType.min")}),c.jsxs("div",{className:"univer-mt-3 univer-flex univer-items-center",children:[c.jsx(O.Select,{className:"univer-w-1/2 univer-flex-shrink-0",options:p,value:b,onChange:y=>{S(y);const x=t.createDefaultValueByValueType(y,10);E(x),I({isGradient:a,minValue:x,minValueType:y,maxValue:M,maxValueType:C,positiveColor:s,nativeColor:o,isShowValue:g})}}),c.jsx(fr,{id:"min",className:"univer-ml-3",disabled:!P(b),type:b,value:_,onChange:y=>{E(y||0),I({isGradient:a,minValue:y||0,minValueType:b,maxValue:M,maxValueType:C,positiveColor:s,nativeColor:o,isShowValue:g})}})]}),c.jsx("div",{className:"univer-mt-3 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",children:l.t("sheet.cf.valueType.max")}),c.jsxs("div",{className:"univer-mt-3 univer-flex univer-items-center",children:[c.jsx(O.Select,{className:"univer-w-1/2 univer-flex-shrink-0",options:h,value:C,onChange:y=>{N(y);const x=t.createDefaultValueByValueType(y,90);R(x),I({isGradient:a,minValue:_,minValueType:b,maxValue:x,maxValueType:y,positiveColor:s,nativeColor:o,isShowValue:g})}}),c.jsx(fr,{className:"univer-ml-3",disabled:!P(C),id:"max",type:C,value:M,onChange:y=>{R(y||0),I({isGradient:a,minValue:_,minValueType:b,maxValue:y||0,maxValueType:C,positiveColor:s,nativeColor:o,isShowValue:g})}})]})]})]})},Re=r=>[i.BooleanNumber.FALSE,void 0].includes(r)?i.BooleanNumber.TRUE:i.BooleanNumber.FALSE,Me=r=>r!==i.BooleanNumber.FALSE,Qe=r=>{const{style:e,onChange:l,className:n}=r,[a,u]=m.useState(()=>{if(e!=null&&e.bl)return e.bl}),[s,v]=m.useState(()=>{if(e!=null&&e.it)return e.it}),[o,f]=m.useState(()=>{if(e!=null&&e.ul)return e.ul.s}),[d,p]=m.useState(()=>{if(e!=null&&e.st)return e.st.s}),[h,b]=m.useState(()=>{var E;const _="#2f56ef";return(E=e==null?void 0:e.cl)!=null&&E.rgb?e.cl.rgb:_}),[S,C]=m.useState(()=>{var E;const _="#e8ecfc";return(E=e==null?void 0:e.bg)!=null&&E.rgb?e.bg.rgb:_});m.useEffect(()=>{const _={bl:a,it:s};h!==void 0&&(_.cl={rgb:h}),S!==void 0&&(_.bg={rgb:S}),d!==void 0&&(_.st={s:d}),o!==void 0&&(_.ul={s:o}),l(t.removeUndefinedAttr(_))},[a,s,o,d,h,S]);const N="univer-flex univer-cursor-pointer univer-items-center univer-rounded univer-px-1";return c.jsxs("div",{className:O.clsx("univer-my-2.5 univer-flex univer-justify-between",n),children:[c.jsx("div",{className:O.clsx(N,{"univer-bg-gray-100 dark:!univer-bg-gray-700":Me(a||i.BooleanNumber.FALSE)}),onClick:()=>u(Re(a)),children:c.jsx(ur,{})}),c.jsx("div",{className:O.clsx(N,{"univer-bg-gray-100 dark:!univer-bg-gray-700":Me(s||i.BooleanNumber.FALSE)}),onClick:()=>v(Re(s)),children:c.jsx(cr,{})}),c.jsx("div",{className:O.clsx(N,{"univer-bg-gray-100 dark:!univer-bg-gray-700":Me(o||i.BooleanNumber.FALSE)}),onClick:()=>f(Re(o)),children:c.jsx(pr,{})}),c.jsx("div",{className:O.clsx(N,{"univer-bg-gray-100 dark:!univer-bg-gray-700":Me(d||i.BooleanNumber.FALSE)}),onClick:()=>p(Re(d)),children:c.jsx(vr,{})}),c.jsx(te,{color:h,onChange:b,Icon:ir}),c.jsx(te,{color:S,onChange:C})]})},Gr=r=>{var R;const{onChange:e,interceptorManager:l}=r,n=j.useDependency(i.LocaleService),u=j.useDependency(i.IUniverInstanceService).getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET),s=u.getActiveSheet(),v=((R=r.rule)==null?void 0:R.type)===t.CFRuleType.highlightCell?r.rule:void 0,o=m.useRef(null),[f,d]=m.useState(!1),p=m.useRef(null),[h,b]=m.useState({}),[S,C]=m.useState(()=>(v==null?void 0:v.subType)===t.CFSubRuleType.formula?v.value:"="),[N,_]=m.useState(void 0),E=g=>({style:g.style,value:S,type:t.CFRuleType.highlightCell,subType:t.CFSubRuleType.formula});m.useEffect(()=>l.intercept(l.getInterceptPoints().submit,{handler(){return E({style:h})}}),[h,S,l]),m.useEffect(()=>l.intercept(l.getInterceptPoints().beforeSubmit,{handler:(T,w,I)=>N||S.length===1||!S.startsWith("=")?(_(n.t("sheet.cf.errorMessage.formulaError")),!1):I(T)}),[N,S]);const M=g=>{e(E(g))};return j.useSidebarClick(g=>{var w;((w=p.current)==null?void 0:w.isClickOutSide(g))&&d(!1)}),c.jsxs("div",{ref:o,children:[c.jsx("div",{className:"univer-mt-4 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",children:n.t("sheet.cf.panel.styleRule")}),c.jsx("div",{className:"univer-mt-3",children:c.jsx(pe.FormulaEditor,{ref:p,className:O.clsx("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent",O.borderClassName),errorText:N,isFocus:f,initValue:S,unitId:u.getUnitId(),subUnitId:s==null?void 0:s.getSheetId(),onFocus:()=>{d(!0)},onChange:g=>{C(g),M({style:h})},onVerify:(g,T)=>{!g||T.length===1?_(n.t("sheet.cf.errorMessage.formulaError")):_(void 0)}})}),c.jsx("div",{className:ge,children:c.jsx(ue,{rule:E({style:h})})}),c.jsx(Qe,{style:v==null?void 0:v.style,className:"univer-mt-3",onChange:g=>{b(g),M({style:g})}})]})},Ve=r=>c.jsxs("div",{className:"univer-relative",children:[c.jsx("div",{className:"univer-absolute univer-bottom-[-13px] univer-z-[999] univer-text-[10px] univer-text-red-500",children:r.errorText}),r.children]}),H=(r,e)=>({label:e.t(`sheet.cf.operator.${r}`),value:r}),Zr=r=>{const{type:e,operator:l,onChange:n,value:a,interceptorManager:u}=r,s=j.useDependency(i.LocaleService),[v,o]=m.useState(()=>typeof a=="number"?a:0),[f,d]=m.useState(""),[p,h]=m.useState(()=>typeof a=="string"?a:""),[b,S]=m.useState(""),[C,N]=m.useState(()=>Array.isArray(a)?a[0]===void 0?0:a[0]:0),[_,E]=m.useState(""),[M,R]=m.useState(()=>Array.isArray(a)?a[1]===void 0?100:a[1]:100),[g,T]=m.useState("");switch(m.useEffect(()=>{switch(e){case t.CFSubRuleType.text:{[t.CFTextOperator.beginsWith,t.CFTextOperator.endsWith,t.CFTextOperator.containsText,t.CFTextOperator.notContainsText,t.CFTextOperator.equal,t.CFTextOperator.notEqual].includes(l)&&n(p);break}case t.CFSubRuleType.number:{[t.CFNumberOperator.equal,t.CFNumberOperator.notEqual,t.CFNumberOperator.greaterThan,t.CFNumberOperator.greaterThanOrEqual,t.CFNumberOperator.lessThan,t.CFNumberOperator.lessThanOrEqual].includes(l)&&n(v),[t.CFNumberOperator.between,t.CFNumberOperator.notBetween].includes(l)&&n([C,M]);break}}},[e]),m.useEffect(()=>{const w=u.intercept(u.getInterceptPoints().beforeSubmit,{handler:(I,k,V)=>{switch(e){case t.CFSubRuleType.text:if([t.CFTextOperator.beginsWith,t.CFTextOperator.containsText,t.CFTextOperator.endsWith,t.CFTextOperator.notEqual,t.CFTextOperator.notContainsText,t.CFTextOperator.equal].includes(l))return p?V(I):(S(s.t("sheet.cf.errorMessage.notBlank")),!1)}return V(I)}});return()=>{w()}},[e,v,p,l]),e){case t.CFSubRuleType.text:{if([t.CFTextOperator.beginsWith,t.CFTextOperator.endsWith,t.CFTextOperator.containsText,t.CFTextOperator.notContainsText,t.CFTextOperator.equal,t.CFTextOperator.notEqual].includes(l)){const w=I=>{h(I),n(I)};return c.jsx("div",{className:"univer-mt-3",children:c.jsx(Ve,{errorText:b,children:c.jsx(O.Input,{value:p,onChange:I=>{S(""),w(I)}})})})}break}case t.CFSubRuleType.number:{if([t.CFNumberOperator.equal,t.CFNumberOperator.notEqual,t.CFNumberOperator.greaterThan,t.CFNumberOperator.greaterThanOrEqual,t.CFNumberOperator.lessThan,t.CFNumberOperator.lessThanOrEqual].includes(l)){const w=I=>{o(I||0),n(I||0),d("")};return c.jsx("div",{className:"univer-mt-3",children:c.jsx(Ve,{errorText:f,children:c.jsx(O.InputNumber,{className:"univer-w-full",min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,value:v,onChange:w})})})}if([t.CFNumberOperator.between,t.CFNumberOperator.notBetween].includes(l)){const w=k=>{N(k||0),n([k||0,M]),E("")},I=k=>{R(k||0),n([C,k||0]),T("")};return c.jsxs("div",{className:"univer-mt-3 univer-flex univer-items-center",children:[c.jsx(Ve,{errorText:_,children:c.jsx(O.InputNumber,{min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,value:C,onChange:w})}),c.jsx(Ve,{errorText:g,children:c.jsx(O.InputNumber,{className:"univer-ml-3",min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,value:M,onChange:I})})]})}}}return null},hr=(r,e)=>{switch(r){case t.CFSubRuleType.text:return[H(t.CFTextOperator.containsText,e),H(t.CFTextOperator.notContainsText,e),H(t.CFTextOperator.beginsWith,e),H(t.CFTextOperator.endsWith,e),H(t.CFTextOperator.equal,e),H(t.CFTextOperator.notEqual,e),H(t.CFTextOperator.containsBlanks,e),H(t.CFTextOperator.notContainsBlanks,e),H(t.CFTextOperator.containsErrors,e),H(t.CFTextOperator.notContainsErrors,e)];case t.CFSubRuleType.number:return[H(t.CFNumberOperator.between,e),H(t.CFNumberOperator.notBetween,e),H(t.CFNumberOperator.equal,e),H(t.CFNumberOperator.notEqual,e),H(t.CFNumberOperator.greaterThan,e),H(t.CFNumberOperator.greaterThanOrEqual,e),H(t.CFNumberOperator.lessThan,e),H(t.CFNumberOperator.lessThanOrEqual,e)];case t.CFSubRuleType.timePeriod:return[H(t.CFTimePeriodOperator.yesterday,e),H(t.CFTimePeriodOperator.today,e),H(t.CFTimePeriodOperator.tomorrow,e),H(t.CFTimePeriodOperator.last7Days,e),H(t.CFTimePeriodOperator.lastWeek,e),H(t.CFTimePeriodOperator.thisWeek,e),H(t.CFTimePeriodOperator.nextWeek,e),H(t.CFTimePeriodOperator.lastMonth,e),H(t.CFTimePeriodOperator.thisMonth,e),H(t.CFTimePeriodOperator.nextMonth,e)]}},gr=r=>{var R;const{interceptorManager:e,onChange:l}=r,n=j.useDependency(i.LocaleService),a=((R=r.rule)==null?void 0:R.type)===t.CFRuleType.highlightCell?r.rule:void 0,[u,s]=m.useState(()=>{const g=t.CFSubRuleType.text;return a&&a.subType||g}),v=[{value:t.CFSubRuleType.text,label:n.t("sheet.cf.subRuleType.text")},{value:t.CFSubRuleType.number,label:n.t("sheet.cf.subRuleType.number")},{value:t.CFSubRuleType.timePeriod,label:n.t("sheet.cf.subRuleType.timePeriod")},{value:t.CFSubRuleType.duplicateValues,label:n.t("sheet.cf.subRuleType.duplicateValues")},{value:t.CFSubRuleType.uniqueValues,label:n.t("sheet.cf.subRuleType.uniqueValues")}],o=m.useMemo(()=>hr(u,n),[u]),[f,d]=m.useState(()=>{const g=o?o[0].value:void 0;return a&&a.operator||g}),[p,h]=m.useState(()=>{var w;return a?(w=a.value)!=null?w:t.createDefaultValue(a.subType,a.operator):""}),[b,S]=m.useState({}),C=m.useMemo(()=>g=>{var T,w,I,k,V,P,L,y,x,F,G,Q,ee,de,ve;switch(g.subType||u){case t.CFSubRuleType.text:{if([t.CFTextOperator.beginsWith,t.CFTextOperator.endsWith,t.CFTextOperator.containsText,t.CFTextOperator.notContainsText,t.CFTextOperator.equal,t.CFTextOperator.notEqual].includes(f))return{type:t.CFRuleType.highlightCell,subType:(T=g.subType)!=null?T:u,operator:(w=g.operator)!=null?w:f,style:(I=g.style)!=null?I:b,value:(k=g.value)!=null?k:p};break}case t.CFSubRuleType.number:{if([t.CFNumberOperator.equal,t.CFNumberOperator.notEqual,t.CFNumberOperator.greaterThan,t.CFNumberOperator.greaterThanOrEqual,t.CFNumberOperator.lessThan,t.CFNumberOperator.lessThanOrEqual].includes(f))return{type:t.CFRuleType.highlightCell,subType:(V=g.subType)!=null?V:u,operator:(P=g.operator)!=null?P:f,style:(L=g.style)!=null?L:b,value:(y=g.value)!=null?y:p};if([t.CFNumberOperator.between,t.CFNumberOperator.notBetween].includes(f))return{type:t.CFRuleType.highlightCell,subType:(x=g.subType)!=null?x:u,operator:(F=g.operator)!=null?F:f,style:(G=g.style)!=null?G:b,value:(Q=g.value)!=null?Q:p};break}}return{type:t.CFRuleType.highlightCell,subType:(ee=g.subType)!=null?ee:u,operator:(de=g.operator)!=null?de:f,style:(ve=g.style)!=null?ve:b}},[u,f,p,b]);m.useEffect(()=>e.intercept(e.getInterceptPoints().submit,{handler(){return C({})}}),[C,e]),m.useEffect(()=>{v.some(g=>g.value===u)||s(v[0].value)},[v]);const N=g=>{const T=g,w=hr(T,n),I=w&&w[0].value;s(T),d(I),I&&h(t.createDefaultValue(T,I)),l(C({subType:T,operator:I}))},_=g=>{const T=g;d(T),l(C({operator:T}))},E=g=>{h(g),l(C({value:g}))},M=m.useMemo(()=>`${u}_${f}_${Math.random()}`,[u,f]);return c.jsxs("div",{children:[c.jsx("div",{className:"univer-mt-4 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",children:n.t("sheet.cf.panel.styleRule")}),c.jsxs("div",{className:"univer-flex univer-justify-between univer-gap-4",children:[c.jsx(O.Select,{className:"univer-mt-3 univer-w-full",onChange:N,value:u,options:v}),(o==null?void 0:o.length)&&c.jsx(O.Select,{className:"univer-mt-3 univer-w-full",onChange:_,value:f||"",options:o})]}),c.jsx(Zr,{value:p,interceptorManager:e,type:u,operator:f,rule:a,onChange:E},M),c.jsx("div",{className:ge,children:c.jsx(ue,{rule:C({})})}),c.jsx(Qe,{style:a==null?void 0:a.style,className:"univer-ml-1",onChange:g=>{S(g),l(C({style:g}))}})]})},yr=(r,e)=>(t.iconMap[r]||[])[Number(e)]||"",zr=r=>{var d;const{error:e,type:l,onChange:n}=r,a=j.useDependency(i.IUniverInstanceService),u=a.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET).getUnitId(),s=(d=a.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET).getActiveSheet())==null?void 0:d.getSheetId(),v=m.useRef(null),[o,f]=m.useState(!1);return j.useSidebarClick(p=>{var b;((b=v.current)==null?void 0:b.isClickOutSide(p))&&f(!1)}),c.jsx("div",{className:"univer-relative",children:l!==t.CFValueType.formula?c.jsxs(c.Fragment,{children:[c.jsx(O.InputNumber,{className:O.clsx({"univer-border-red-500":e}),value:Number(r.value)||0,onChange:p=>n(p!=null?p:0)}),e&&c.jsx("div",{className:"univer-absolute univer-text-xs univer-text-red-500",children:e})]}):c.jsx("div",{className:"univer-w-full",children:c.jsx(pe.FormulaEditor,{ref:v,className:O.clsx("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent",O.borderClassName),initValue:String(r.value),unitId:u,subUnitId:s,isFocus:o,onChange:(p="")=>{n(p||"")},onFocus:()=>f(!0)})})})},mr=(r,e,l)=>({operator:t.CFNumberOperator.greaterThan,value:{type:t.CFValueType.num,value:(l.length-1-e)*10},iconType:r,iconId:String(e)}),Yr=m.forwardRef((r,e)=>{const{onClick:l}=r,n=j.useDependency(i.LocaleService),a=u=>{l(u)};return c.jsx("div",{ref:e,className:"univer-w-80",children:t.iconGroup.map((u,s)=>c.jsxs("div",{className:"univer-mb-3",children:[c.jsx("div",{className:"univer-mb-1 univer-text-sm",children:n.t(u.title)}),c.jsx("div",{className:"univer-flex univer-flex-wrap",children:u.group.map(v=>c.jsx("div",{className:"univer-mb-1 univer-flex univer-w-1/2 univer-items-center",onClick:()=>{a(v.name)},children:c.jsx("a",{className:"univer-cursor-pointer univer-rounded hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-700",children:v.list.map((o,f)=>c.jsx("img",{className:"univer-size-5",src:o,draggable:!1},f))})},v.name))})]},s))})}),Kr=r=>{const{onClick:e}=r,l=m.useMemo(()=>{const a=[];for(const u in t.iconMap){const s=t.iconMap[u],v=u;s.forEach((o,f)=>{a.push({iconType:v,base64:o,iconId:String(f)})})}return a},[]),n=a=>{e(a.iconType,a.iconId)};return c.jsxs("div",{children:[c.jsxs("div",{className:"univer-mb-2.5 univer-flex univer-cursor-pointer univer-items-center univer-pl-1",onClick:()=>n({iconType:t.EMPTY_ICON_TYPE,iconId:""}),children:[c.jsx(he,{className:"univer-size-5"}),c.jsx("span",{className:"univer-ml-2",children:"无单元格图标"})]}),c.jsx("div",{className:"univer-flex univer-w-64 univer-flex-wrap",children:l.map(a=>c.jsx("div",{className:"univer-mb-2 univer-mr-2 univer-flex univer-cursor-pointer univer-items-center univer-justify-center univer-rounded hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-700",children:c.jsx("img",{className:"univer-size-5",src:a.base64,draggable:!1,onClick:()=>n(a)})},`${a.iconType}_${a.iconId}`))})]})},Xr=r=>{const{onChange:e,configList:l,errorMap:n={}}=r,a=j.useDependency(i.LocaleService),u=[{label:a.t(`sheet.cf.symbol.${t.CFNumberOperator.greaterThan}`),value:t.CFNumberOperator.greaterThan},{label:a.t(`sheet.cf.symbol.${t.CFNumberOperator.greaterThanOrEqual}`),value:t.CFNumberOperator.greaterThanOrEqual}],s=[{label:a.t(`sheet.cf.valueType.${t.CFValueType.num}`),value:t.CFValueType.num},{label:a.t(`sheet.cf.valueType.${t.CFValueType.percent}`),value:t.CFValueType.percent},{label:a.t(`sheet.cf.valueType.${t.CFValueType.percentile}`),value:t.CFValueType.percentile},{label:a.t(`sheet.cf.valueType.${t.CFValueType.formula}`),value:t.CFValueType.formula}],v=(p,h)=>{e([String(h),"value","value"],p)},o=(p,h)=>{e([String(h),"operator"],p);const b=t.createDefaultValue(t.CFSubRuleType.number,p);v(b,h)},f=(p,h)=>{e([String(h),"value","type"],p);const b=l[h],S=t.createDefaultValue(t.CFSubRuleType.number,b.operator);v(S,h)};return m.useMemo(()=>l.map((p,h)=>{const b=n[h],S=yr(p.iconType,p.iconId),C=h===l.length-1,N=h===0,_=l[h-1],E=(_==null?void 0:_.value.type)===t.CFValueType.formula?a.t("sheet.cf.valueType.formula"):_==null?void 0:_.value.value,M=(R,g)=>{const T={...p,iconId:g,iconType:R};e([String(h)],T)};return c.jsxs("div",{className:h?"univer-mt-6":"univer-mt-3",children:[c.jsxs("div",{className:"univer-mt-3 univer-flex univer-items-center univer-justify-between univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",children:[c.jsxs("div",{className:"univer-w-[45%]",children:[a.t("sheet.cf.iconSet.icon"),h+1]}),c.jsx("div",{className:"univer-w-[45%]",children:c.jsxs(c.Fragment,{children:[!N&&!C&&a.t("sheet.cf.iconSet.rule"),!N&&!C&&c.jsxs("span",{className:"univer-font-medium univer-text-gray-600 dark:!univer-text-gray-200",children:[a.t("sheet.cf.iconSet.when"),a.t(`sheet.cf.symbol.${t.getOppositeOperator(_.operator)}`),E,C?"":` ${a.t("sheet.cf.iconSet.and")} `]})]})})]}),c.jsxs("div",{className:"univer-mt-3 univer-grid univer-grid-cols-2 univer-gap-4",children:[c.jsx("div",{className:"univer-flex univer-items-center",children:c.jsx(O.Dropdown,{overlay:c.jsx("div",{className:"univer-rounded-lg univer-p-4",children:c.jsx(Kr,{onClick:M,iconId:p.iconId,iconType:p.iconType})}),children:c.jsxs("div",{className:O.clsx("univer-box-border univer-flex univer-h-8 univer-w-full univer-items-center univer-justify-between univer-rounded-md univer-bg-white univer-px-4 univer-py-2 univer-text-xs univer-text-gray-600 univer-transition-all hover:univer-border-primary-600 dark:!univer-text-gray-200",O.borderClassName),children:[S?c.jsx("img",{src:S,className:"univer-size-4",draggable:!1}):c.jsx(he,{className:"univer-size-4"}),c.jsx(Xe,{})]})})}),C?c.jsxs("div",{className:"univer-mt-0 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",children:[a.t("sheet.cf.iconSet.rule"),c.jsxs("span",{className:"univer-font-medium",children:[a.t("sheet.cf.iconSet.when"),a.t(`sheet.cf.symbol.${t.getOppositeOperator(_.operator)}`),E,C?"":` ${a.t("sheet.cf.iconSet.and")} `]})]}):c.jsx(O.Select,{options:u,value:p.operator,onChange:R=>{o(R,h)}})]}),C?c.jsx("div",{}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"univer-mt-3 univer-grid univer-grid-cols-2 univer-gap-4 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",children:[c.jsx("div",{children:a.t("sheet.cf.iconSet.type")}),c.jsx("div",{children:a.t("sheet.cf.iconSet.value")})]}),c.jsxs("div",{className:"univer-mt-3 univer-grid univer-grid-cols-2 univer-gap-4",children:[c.jsx(O.Select,{options:s,value:p.value.type,onChange:R=>{f(R,h)}}),c.jsx(zr,{id:h,type:p.value.type,error:b,value:p.value.value||"",onChange:R=>{v(R,h)}})]})]})]},h)}),[l,n])},Jr=r=>{var R;const{interceptorManager:e}=r,l=((R=r.rule)==null?void 0:R.type)===t.CFRuleType.iconSet?r.rule:void 0,n=j.useDependency(i.LocaleService),[a,u]=m.useState({}),[s,v]=m.useState(()=>{const g=Object.keys(t.iconMap)[0];if(l&&l.config.length){const T=l.config[0].iconType;if(!l.config.some(I=>I.iconType!==T))return T}return g}),[o,f]=m.useState(()=>{if(l&&l.config.length)return i.Tools.deepClone(l==null?void 0:l.config);const g=t.iconMap[s]||[];return new Array(g.length).fill("").map((T,w,I)=>w===I.length-1?{operator:t.CFNumberOperator.lessThanOrEqual,value:{type:t.CFValueType.num,value:Number.MAX_SAFE_INTEGER},iconType:s,iconId:String(w)}:mr(s,w,I))}),[d,p]=m.useState(()=>l?!!l.isShowValue:!0),h=m.useMemo(()=>{const g=o.map(T=>yr(T.iconType,T.iconId));return c.jsx("div",{className:"univer-flex univer-items-center",children:g.map((T,w)=>T?c.jsx("img",{className:"univer-size-5",src:T},w):c.jsx(he,{className:"univer-size-5"},w))})},[o]),b=g=>{if(g.reduce((w,I,k)=>w.preType&&!w.result||g.length-1===k?w:I.value.type===t.CFValueType.formula?{preType:t.CFValueType.formula,result:!1}:w.preType?{result:w.preType===I.value.type,preType:I.value.type}:{result:!0,preType:I.value.type},{result:!0,preType:""}).result&&[t.CFValueType.num,t.CFValueType.percent,t.CFValueType.percentile].includes(g[0].value.type)){const w={};return g.forEach((I,k,V)=>{if(k-1<0||k===V.length-1)return;const L=g[k-1],y=t.getOppositeOperator(L.operator);t.compareWithNumber({operator:y,value:L.value.value},I.value.value)||(w[k]=`${n.t(`sheet.cf.form.${y}`,String(L.value.value))} `)}),w}return{}},S=(g,T)=>{i.get(o,g)!==T&&(i.set(o,g,T),f([...o]),u(b(o)))},C=g=>{v(g);const T=t.iconMap[g]||[],w=new Array(T.length).fill("").map((I,k,V)=>mr(g,k,V));f(w),u(b(w))};m.useEffect(()=>{const g=e.intercept(e.getInterceptPoints().submit,{handler(){return{type:t.CFRuleType.iconSet,isShowValue:d,config:o}}});return()=>{g()}},[d,o,e]),m.useEffect(()=>{const g=e.intercept(e.getInterceptPoints().beforeSubmit,{handler(){return Object.keys(a).length===0}});return()=>{g()}},[d,o,e,a]);const N=()=>{const g=o.map(T=>({...T}));o.forEach((T,w)=>{const I=o.length-1-w,k=g[I];T.iconId=k.iconId,T.iconType=k.iconType}),f([...o])},_=j.useDependency(j.ILayoutService),[E,M]=m.useState();return j.useScrollYOverContainer(E,_.rootContainerElement),c.jsxs("div",{children:[c.jsx("div",{className:"univer-mt-4 univer-text-sm univer-text-gray-600",children:n.t("sheet.cf.panel.styleRule")}),c.jsx("div",{className:"univer-mt-3",children:c.jsx(O.Dropdown,{overlay:c.jsx("div",{className:"univer-rounded-lg univer-p-4",children:c.jsx(Yr,{ref:g=>{!E&&g&&M(g)},iconType:s,onClick:C})}),children:c.jsxs("div",{className:O.clsx("univer-box-border univer-flex univer-h-8 univer-w-full univer-items-center univer-justify-between univer-rounded-md univer-bg-white univer-px-4 univer-py-2 univer-text-xs univer-text-gray-600 univer-transition-all hover:univer-border-primary-600",O.borderClassName),children:[h,c.jsx(Xe,{})]})})}),c.jsxs("div",{className:"univer-mt-3 univer-flex univer-items-center univer-text-xs",children:[c.jsxs("div",{className:"univer-flex univer-items-center univer-text-xs",children:[c.jsx(O.Checkbox,{onChange:N}),n.t("sheet.cf.iconSet.reverseIconOrder")]}),c.jsxs("div",{className:"univer-ml-6 univer-flex univer-items-center univer-text-xs",children:[c.jsx(O.Checkbox,{checked:!d,onChange:g=>{p(!g)}}),n.t("sheet.cf.iconSet.onlyShowIcon")]})]}),c.jsx(Xr,{errorMap:a,onChange:S,configList:o})]})},Qr=r=>{var N;const{onChange:e,interceptorManager:l}=r,n=j.useDependency(i.LocaleService),a=((N=r.rule)==null?void 0:N.type)===t.CFRuleType.highlightCell?r.rule:void 0,u=[{label:n.t("sheet.cf.panel.isNotBottom"),value:"isNotBottom"},{label:n.t("sheet.cf.panel.isBottom"),value:"isBottom"},{label:n.t("sheet.cf.panel.greaterThanAverage"),value:"greaterThanAverage"},{label:n.t("sheet.cf.panel.lessThanAverage"),value:"lessThanAverage"}],[s,v]=m.useState(()=>{const _=u[0].value,E=a==null?void 0:a.type;if(!a)return _;switch(E){case t.CFRuleType.highlightCell:switch(a.subType){case t.CFSubRuleType.average:return[t.CFNumberOperator.greaterThan,t.CFNumberOperator.greaterThanOrEqual].includes(a.operator)?"greaterThanAverage":[t.CFNumberOperator.lessThan,t.CFNumberOperator.lessThanOrEqual].includes(a.operator)?"lessThanAverage":_;case t.CFSubRuleType.rank:return a.isBottom?"isBottom":"isNotBottom"}}return _}),[o,f]=m.useState(()=>{const E=a==null?void 0:a.type;if(!a)return 10;switch(E){case t.CFRuleType.highlightCell:switch(a.subType){case t.CFSubRuleType.rank:return a.value||10}}return 10}),[d,p]=m.useState(()=>{const E=a==null?void 0:a.type;if(!a)return!1;switch(E){case t.CFRuleType.highlightCell:switch(a.subType){case t.CFSubRuleType.rank:return a.isPercent||!1}}return!1}),[h,b]=m.useState({}),S=_=>{const{type:E,isPercent:M,value:R,style:g}=_;if(E==="isNotBottom")return{type:t.CFRuleType.highlightCell,subType:t.CFSubRuleType.rank,isPercent:M,isBottom:!1,value:R,style:g};if(E==="isBottom")return{type:t.CFRuleType.highlightCell,subType:t.CFSubRuleType.rank,isPercent:M,isBottom:!0,value:R,style:g};if(E==="greaterThanAverage")return{type:t.CFRuleType.highlightCell,subType:t.CFSubRuleType.average,operator:t.CFNumberOperator.greaterThan,style:g};if(E==="lessThanAverage")return{type:t.CFRuleType.highlightCell,subType:t.CFSubRuleType.average,operator:t.CFNumberOperator.lessThan,style:g}};m.useEffect(()=>l.intercept(l.getInterceptPoints().submit,{handler(){return S({type:s,isPercent:d,value:o,style:h})}}),[s,d,o,h,l]);const C=_=>{e(S(_))};return c.jsxs("div",{children:[c.jsx("div",{className:"univer-mt-4 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",children:n.t("sheet.cf.panel.styleRule")}),c.jsx(O.Select,{className:"univer-mt-3 univer-w-full",value:s,options:u,onChange:_=>{v(_),C({type:_,isPercent:d,value:o,style:h})}}),["isNotBottom","isBottom"].includes(s)&&c.jsxs("div",{className:"univer-mt-3 univer-flex univer-items-center",children:[c.jsx(O.InputNumber,{min:1,max:1e3,value:o,onChange:_=>{const E=_||0;f(E),C({type:s,isPercent:d,value:E,style:h})}}),c.jsxs("div",{className:"univer-ml-3 univer-flex univer-items-center univer-text-xs",children:[c.jsx(O.Checkbox,{checked:d,onChange:_=>{p(!!_),C({type:s,isPercent:!!_,value:o,style:h})}}),n.t("sheet.cf.valueType.percent")]})]}),c.jsx("div",{className:ge,children:c.jsx(ue,{rule:S({type:s,isPercent:d,value:o,style:h})})}),c.jsx(Qe,{style:a==null?void 0:a.style,className:"univer-mt-3",onChange:_=>{b(_),C({type:s,isPercent:d,value:o,style:_})}})]})},et=i.createInterceptorKey("beforeSubmit"),rt=i.createInterceptorKey("submit"),Cr=r=>r.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET).getUnitId(),br=r=>{var e;return(e=r.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET).getActiveSheet())==null?void 0:e.getSheetId()},tt=r=>{var w,I,k;const e=j.useDependency(i.LocaleService),l=j.useDependency(i.ICommandService),n=j.useDependency(i.IUniverInstanceService),a=j.useDependency(t.ConditionalFormattingRuleModel),u=j.useDependency(U.SheetsSelectionsService),s=Cr(n),v=br(n),[o,f]=m.useState(void 0),d=m.useRef((I=(w=r.rule)==null?void 0:w.ranges)!=null?I:[]),p=m.useMemo(()=>{var P,L,y;let V=(P=r.rule)==null?void 0:P.ranges;return V!=null&&V.length||(V=(y=(L=u.getCurrentSelections())==null?void 0:L.map(x=>x.range))!=null?y:[]),d.current=V,V!=null&&V.length?V.map(x=>{const F=$e.serializeRange(x);return F==="NaN"?"":F}).filter(x=>!!x).join(","):""},[r.rule]),h=[{label:e.t("sheet.cf.ruleType.highlightCell"),value:"1"},{label:e.t("sheet.cf.panel.rankAndAverage"),value:"2"},{label:e.t("sheet.cf.ruleType.dataBar"),value:"3"},{label:e.t("sheet.cf.ruleType.colorScale"),value:"4"},{label:e.t("sheet.cf.ruleType.formula"),value:"5"},{label:e.t("sheet.cf.ruleType.iconSet"),value:"6"}],[b,S]=m.useState(()=>{var L,y;const V=(L=r.rule)==null?void 0:L.rule.type,P=h[0].value;if(!V)return P;switch(V){case t.CFRuleType.highlightCell:{switch((y=r.rule)==null?void 0:y.rule.subType){case t.CFSubRuleType.number:case t.CFSubRuleType.text:case t.CFSubRuleType.duplicateValues:case t.CFSubRuleType.uniqueValues:case t.CFSubRuleType.timePeriod:return"1";case t.CFSubRuleType.average:case t.CFSubRuleType.rank:return"2";case t.CFSubRuleType.formula:return"5"}break}case t.CFRuleType.dataBar:return"3";case t.CFRuleType.colorScale:return"4";case t.CFRuleType.iconSet:return"6"}return P}),C=m.useRef(void 0),N=m.useMemo(()=>new i.InterceptorManager({beforeSubmit:et,submit:rt}),[]),_=m.useMemo(()=>{switch(b){case"1":return gr;case"2":return Qr;case"3":return qr;case"4":return Wr;case"5":return Gr;case"6":return Jr;default:return gr}},[b]);m.useEffect(()=>{const V=l.onCommandExecuted(P=>{if(P.id===U.RemoveSheetMutation.id){const L=P.params;L.subUnitId===v&&L.unitId===s&&r.onCancel()}P.id===U.SetWorksheetActiveOperation.id&&r.onCancel()});return()=>V.dispose()},[]);const E=V=>{C.current=V},M=V=>{const P=V.split(",").filter(L=>!!L).map($e.deserializeRangeWithSheet).map(L=>L.range);d.current=P},R=()=>{if(o)return;const P=(()=>{const y=n.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET).getActiveSheet();if(!y)throw new Error("No active sheet found");return d.current.map(G=>U.setEndForRange(G,y.getRowCount(),y.getColumnCount())).filter(G=>!(Number.isNaN(G.startRow)||Number.isNaN(G.startColumn)))})();if(N.fetchThroughInterceptors(N.getInterceptPoints().beforeSubmit)(!0,null)){const y=N.fetchThroughInterceptors(N.getInterceptPoints().submit)(null,null);if(y){const x=Cr(n),F=br(n);if(!x||!F)throw new Error("No active sheet found");let G={};r.rule&&r.rule.cfId?(G={...r.rule,ranges:P,rule:y},l.executeCommand(t.SetCfCommand.id,{unitId:x,subUnitId:F,rule:G}),r.onCancel()):(G={cfId:a.createCfId(x,F),ranges:P,rule:y,stopIfTrue:!1},l.executeCommand(t.AddCfCommand.id,{unitId:x,subUnitId:F,rule:G}),r.onCancel())}}},g=()=>{r.onCancel()},T=(V,P)=>{V?P.length<1?f(e.t("sheet.cf.errorMessage.rangeError")):f(void 0):f(e.t("sheet.cf.errorMessage.rangeError"))};return c.jsxs("div",{children:[c.jsx("div",{className:"univer-mt-4 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",children:e.t("sheet.cf.panel.range")}),c.jsxs("div",{className:"univer-mt-4",children:[c.jsx(pe.RangeSelector,{unitId:s,subUnitId:v,initialValue:p,onChange:(V,P)=>M(P),onVerify:T}),o&&c.jsx("div",{className:"univer-mt-1 univer-text-xs univer-text-red-500",children:o})]}),c.jsx("div",{className:"univer-mt-4 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",children:e.t("sheet.cf.panel.styleType")}),c.jsx(O.Select,{className:"univer-mt-4 univer-w-full",value:b,options:h,onChange:V=>S(V)}),c.jsx(_,{interceptorManager:N,rule:(k=r.rule)==null?void 0:k.rule,onChange:E}),c.jsxs("div",{className:"univer-mt-4 univer-flex univer-justify-end",children:[c.jsx(O.Button,{onClick:g,children:e.t("sheet.cf.panel.cancel")}),c.jsx(O.Button,{className:"univer-ml-3",variant:"primary",onClick:R,children:e.t("sheet.cf.panel.submit")})]})]})};var nt=Object.getOwnPropertyDescriptor,at=(r,e,l,n)=>{for(var a=n>1?void 0:n?nt(e,l):e,u=r.length-1,s;u>=0;u--)(s=r[u])&&(a=s(a)||a);return a},lt=(r,e)=>(l,n)=>e(l,n,r);let se=class extends i.Disposable{constructor(e){super();re(this,"_initLocal",()=>{});re(this,"_findReplaceIndex",e=>{const l=/\{([^}]+)?\}/g,n=[];let a=l.exec(e);for(;a;)n.push({startIndex:a.index,key:Number(a[1]),endIndex:a.index+a[0].length-1}),a=l.exec(e);return n});this._localeService=e,this._initLocal()}tWithReactNode(e,...l){const n=this._localeService.getLocales(),a=e.split("."),u=n&&this._localeService.resolveKeyPath(n,a);if(typeof u=="string"){const s=[];return this._findReplaceIndex(u).forEach((v,o,f)=>{const d=f[o-1]||{endIndex:-1};if(d.endIndex+1<v.startIndex){const p=u.slice(d.endIndex+1,v.startIndex);p&&s.push(p)}if(l[v.key]&&s.push(l[v.key]),o===f.length-1){const p=u.slice(v.endIndex+1);p&&s.push(p)}}),s}return[]}};se=at([lt(0,i.Inject(i.LocaleService))],se);const ut=(r,e)=>{const l=r.rule;switch(l.type){case t.CFRuleType.colorScale:return e.t("sheet.cf.ruleType.colorScale");case t.CFRuleType.dataBar:return e.t("sheet.cf.ruleType.dataBar");case t.CFRuleType.iconSet:return e.t("sheet.cf.ruleType.iconSet");case t.CFRuleType.highlightCell:switch(l.subType){case t.CFSubRuleType.average:{const n=l.operator;return e.t(`sheet.cf.preview.describe.${n}`,e.t("sheet.cf.subRuleType.average"))}case t.CFSubRuleType.duplicateValues:return e.t("sheet.cf.subRuleType.duplicateValues");case t.CFSubRuleType.uniqueValues:return e.t("sheet.cf.subRuleType.uniqueValues");case t.CFSubRuleType.number:{const n=l.operator;return e.t(`sheet.cf.preview.describe.${n}`,...Array.isArray(l.value)?l.value.map(a=>String(a)):[String(l.value||"")])}case t.CFSubRuleType.text:{const n=l.operator;return e.t(`sheet.cf.preview.describe.${n}`,l.value||"")}case t.CFSubRuleType.timePeriod:{const n=l.operator;return e.t(`sheet.cf.preview.describe.${n}`)}case t.CFSubRuleType.rank:return l.isPercent?l.isBottom?e.t("sheet.cf.preview.describe.bottomNPercent",String(l.value)):e.t("sheet.cf.preview.describe.topNPercent",String(l.value)):l.isBottom?e.t("sheet.cf.preview.describe.bottomN",String(l.value)):e.t("sheet.cf.preview.describe.topN",String(l.value));case t.CFSubRuleType.formula:return e.t("sheet.cf.ruleType.formula")}}};let Ir=0;const it=r=>{const{onClick:e}=r,l=j.useDependency(t.ConditionalFormattingRuleModel),n=j.useDependency(i.IUniverInstanceService),a=j.useDependency(U.SheetsSelectionsService),u=j.useDependency(i.ICommandService),s=j.useDependency(i.LocaleService),v=j.useDependency(i.Injector),o=j.useDependency(j.ISidebarService),f=j.useDependency(se),d=j.useObservable(()=>n.getCurrentTypeOfUnit$(i.UniverInstanceType.UNIVER_SHEET),void 0,void 0,[]),p=d.getUnitId(),h=d.getActiveSheet();if(!h)throw new Error("No active sheet found");const b=h.getSheetId(),[S,C]=m.useState([]),[N,_]=m.useState("2"),[E,M]=m.useState(0),[R,g]=m.useState(-1),[T,w]=m.useState(Ir),I=m.useRef(null),k=[{label:s.t("sheet.cf.panel.workSheet"),value:"2"},{label:s.t("sheet.cf.panel.selectedRange"),value:"1"}],V=()=>{const A=l.getSubunitRules(p,b);if(!A||!A.length)return[];if(N==="1"){const $=a.getCurrentLastSelection();if(!$)return[];const B=$.range;return A.filter(Z=>Z.ranges.some(z=>i.Rectangle.intersects(z,B)))}else if(N==="2")return[...A];return[]},[P,L]=m.useState(V);W.useHighlightRange(S),m.useEffect(()=>{const A=u.onCommandExecuted($=>{$.id===U.SetWorksheetActiveOperation.id&&M(Math.random())});return()=>A.dispose()}),m.useEffect(()=>{L(V)},[N,E,p,b]),m.useEffect(()=>{if(N==="2")return;const A=new J.Observable($=>{const B=[U.SetSelectionsOperation.id,t.AddConditionalRuleMutation.id,t.SetConditionalRuleMutation.id,t.DeleteConditionalRuleMutation.id,t.MoveConditionalRuleMutation.id],q=u.onCommandExecuted(Z=>{const{id:z,params:ae}=Z,le=n.getCurrentUnitOfType(i.UniverInstanceType.UNIVER_SHEET).getUnitId();B.includes(z)&&ae.unitId===le&&$.next(null)});return()=>q.dispose()}).pipe(J.debounceTime(16)).subscribe(()=>{L(V)});return()=>{A.unsubscribe()}},[n,N,p,b]),m.useEffect(()=>{const A=l.$ruleChange.subscribe(()=>{M(Math.random())});return()=>A.unsubscribe()},[l]),m.useEffect(()=>{const A=()=>{var Z,z;const q=Math.max(0,((z=(Z=I.current)==null?void 0:Z.getBoundingClientRect().width)!=null?z:0)-8);return Ir=q,q},B=new J.Observable(q=>{const Z=o.getContainer();if(Z){let z=setTimeout(()=>{q.next(void 0)},150);const ae=()=>{z&&clearTimeout(z),z=null},le=Fe=>{Fe.propertyName==="width"&&(ae(),q.next(void 0))};return Z.addEventListener("transitionend",le),()=>{ae(),Z.removeEventListener("transitionend",le)}}}).pipe(J.debounceTime(16)).subscribe(()=>{w(A())});return()=>{B.unsubscribe()}},[]);const y=A=>{var q;const $=n.getCurrentUnitOfType(i.UniverInstanceType.UNIVER_SHEET).getUnitId(),B=(q=n.getCurrentUnitOfType(i.UniverInstanceType.UNIVER_SHEET).getActiveSheet())==null?void 0:q.getSheetId();if(!$||!B)throw new Error("No active sheet found");u.executeCommand(t.DeleteCfCommand.id,{unitId:$,subUnitId:B,cfId:A.cfId})},x=(A,$)=>{g($.y)},F=(A,$,B)=>{var Fe;g(-1);const q=n.getCurrentUnitOfType(i.UniverInstanceType.UNIVER_SHEET).getUnitId(),Z=(Fe=n.getCurrentUnitOfType(i.UniverInstanceType.UNIVER_SHEET).getActiveSheet())==null?void 0:Fe.getSheetId();if(!q||!Z)throw new Error("No active sheet found");const z=Ht=>{const Bt=P.length;return Math.min(Bt-1,Math.max(0,Ht))},ae=P[z($.y)].cfId,le=P[z(B.y)].cfId;ae!==le&&u.executeCommand(t.MoveCfCommand.id,{unitId:q,subUnitId:Z,start:{id:ae,type:"self"},end:{id:le,type:B.y>$.y?"after":"before"}})},G=()=>{r.onCreate()},Q=()=>{N==="2"?u.executeCommand(t.ClearWorksheetCfCommand.id):N==="1"&&P.map($=>({unitId:p,subUnitId:b,cfId:$.cfId})).forEach($=>{u.executeCommand(t.DeleteCfCommand.id,$)})},ee=m.useMemo(()=>{const A=n.getCurrentUnitOfType(i.UniverInstanceType.UNIVER_SHEET),$=A.getActiveSheet();return P.filter(B=>{const q=B.ranges;return U.checkRangesEditablePermission(v,A.getUnitId(),$.getSheetId(),q)})},[P]),de=ee.map((A,$)=>({i:A.cfId,x:0,w:12,y:$,h:1,isResizable:!1})),ve=m.useMemo(()=>{const A=n.getCurrentUnitOfType(i.UniverInstanceType.UNIVER_SHEET),$=A.getActiveSheet();return P.every(B=>{const q=B.ranges;return U.checkRangesEditablePermission(v,A.getUnitId(),$.getSheetId(),q)})},[P]);return c.jsxs("div",{children:[c.jsxs("div",{className:"univer-flex univer-items-center univer-justify-between univer-gap-2 univer-text-sm",children:[c.jsx("div",{className:"univer-flex univer-items-center univer-gap-2",children:f.tWithReactNode("sheet.cf.panel.managerRuleSelect",c.jsx(O.Select,{className:"univer-w-36",options:k,value:N,onChange:A=>{_(A)}})).map((A,$)=>c.jsx("span",{children:A},$))}),c.jsxs("div",{className:"univer-flex univer-justify-end",children:[c.jsx(O.Tooltip,{title:s.t("sheet.cf.panel.createRule"),placement:"bottom",children:c.jsx("a",{className:"univer-size-5 univer-cursor-pointer",onClick:G,children:c.jsx(sr,{})})}),P.length&&ve?c.jsx(O.Tooltip,{title:s.t("sheet.cf.panel.clear"),placement:"bottom",children:c.jsx("a",{className:"univer-size-5 univer-cursor-pointer",onClick:Q,children:c.jsx(Ee,{className:"univer-text-red-500"})})}):c.jsx("div",{children:c.jsx(Ee,{className:"univer-text-gray-300"})})]})]}),c.jsx("div",{ref:I,children:T>0&&c.jsx(O.ReactGridLayout,{className:"[&_.react-grid-item]:univer-transition-none [&_.react-grid-placeholder]:univer-rounded [&_.react-grid-placeholder]:!univer-bg-gray-200",draggableHandle:".draggableHandle",layout:de,cols:12,rowHeight:60,width:T,margin:[0,10],onDragStop:F,onDragStart:x,children:ee==null?void 0:ee.map((A,$)=>c.jsx("div",{children:c.jsxs("div",{className:O.clsx("univer-group univer-relative univer-flex univer-items-center univer-justify-between univer-rounded univer-py-2 univer-pl-5 univer-pr-8 hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-700",{"univer-bg-gray-100 dark:!univer-bg-gray-700":R===$}),onMouseMove:()=>{A.ranges!==S&&C(A.ranges)},onMouseLeave:()=>C([]),onClick:()=>{e(A)},children:[c.jsx("div",{className:O.clsx("univer-absolute univer-left-0 univer-hidden univer-size-5 univer-cursor-grab univer-items-center univer-justify-center univer-rounded group-hover:univer-flex","draggableHandle"),onClick:B=>B.stopPropagation(),children:c.jsx(dr,{})}),c.jsxs("div",{className:"univer-min-w-0 univer-max-w-full univer-flex-shrink univer-overflow-hidden",children:[c.jsx("div",{className:"univer-text-sm univer-text-gray-900 dark:!univer-text-white",children:ut(A,s)}),c.jsx("div",{className:"univer-text-xs univer-text-gray-400",children:A.ranges.map(B=>$e.serializeRange(B)).join(",")})]}),c.jsx("div",{children:c.jsx(ue,{rule:A.rule})}),c.jsx("div",{className:O.clsx("univer-absolute univer-right-1 univer-hidden univer-size-6 univer-cursor-pointer univer-items-center univer-justify-center univer-rounded hover:univer-bg-gray-200 group-hover:univer-flex",{"univer-flex univer-items-center univer-justify-center":R===$}),onClick:B=>{B.stopPropagation(),y(A),C([])},children:c.jsx(Ee,{})})]})},`${A.cfId}`))})})]})},st=r=>{const[e,l]=m.useState(r.rule),[n,a]=m.useState(!!r.rule),u=()=>{a(!0)},s=()=>{a(!1),l(void 0)},v=o=>{l(o),a(!0)};return c.jsx("div",{className:"univer-flex univer-h-full univer-flex-col univer-justify-between univer-py-4",children:n?c.jsx(tt,{onCancel:s,rule:e}):c.jsx(it,{onClick:v,onCreate:u})})};var ct=Object.getOwnPropertyDescriptor,ot=(r,e,l,n)=>{for(var a=n>1?void 0:n?ct(e,l):e,u=r.length-1,s;u>=0;u--)(s=r[u])&&(a=s(a)||a);return a},ye=(r,e)=>(l,n)=>e(l,n,r);const Oe="sheet.conditional.formatting.panel";let me=class extends i.Disposable{constructor(e,l,n,a,u){super();re(this,"_sidebarDisposable",null);this._univerInstanceService=e,this._injector=l,this._componentManager=n,this._sidebarService=a,this._localeService=u,this._initPanel(),this.disposeWithMe(this._univerInstanceService.getCurrentTypeOfUnit$(i.UniverInstanceType.UNIVER_SHEET).subscribe(s=>{var v;s||(v=this._sidebarDisposable)==null||v.dispose()})),this.disposeWithMe(this._sidebarService.sidebarOptions$.subscribe(s=>{s.id===Oe&&(s.visible||setTimeout(()=>{this._sidebarService.sidebarOptions$.next({visible:!1})}))}))}openPanel(e){const l={id:Oe,header:{title:this._localeService.t("sheet.cf.title")},children:{label:Oe,rule:e,key:i.generateRandomId(4)},onClose:()=>this._sidebarDisposable=null};this._sidebarDisposable=this._sidebarService.open(l)}_initPanel(){this.disposeWithMe(this._componentManager.register(Oe,st))}};me=ot([ye(0,i.IUniverInstanceService),ye(1,i.Inject(i.Injector)),ye(2,i.Inject(j.ComponentManager)),ye(3,i.Inject(j.ISidebarService)),ye(4,i.Inject(i.LocaleService))],me);var Y=(r=>(r[r.createRule=1]="createRule",r[r.viewRule=2]="viewRule",r[r.highlightCell=3]="highlightCell",r[r.rank=4]="rank",r[r.formula=5]="formula",r[r.colorScale=6]="colorScale",r[r.dataBar=7]="dataBar",r[r.icon=8]="icon",r[r.clearRangeRules=9]="clearRangeRules",r[r.clearWorkSheetRules=10]="clearWorkSheetRules",r))(Y||{});const Ce={id:"sheet.operation.open.conditional.formatting.panel",type:i.CommandType.OPERATION,handler:(r,e)=>{var v;const l=r.get(me),n=r.get(U.SheetsSelectionsService),a=r.get(i.ICommandService),u=((v=n.getCurrentSelections())==null?void 0:v.map(o=>o.range))||[];switch(e.value){case 3:{l.openPanel({...t.createDefaultRule(),ranges:u});break}case 4:{const o={...t.createDefaultRule,ranges:u,rule:{type:t.CFRuleType.highlightCell,subType:t.CFSubRuleType.rank}};l.openPanel(o);break}case 5:{const o={...t.createDefaultRule,ranges:u,rule:{type:t.CFRuleType.highlightCell,subType:t.CFSubRuleType.formula,value:"="}};l.openPanel(o);break}case 6:{const o={...t.createDefaultRule,ranges:u,rule:{type:t.CFRuleType.colorScale,config:[]}};l.openPanel(o);break}case 7:{const o={...t.createDefaultRule,ranges:u,rule:{type:t.CFRuleType.dataBar,isShowValue:!0}};l.openPanel(o);break}case 8:{const o={...t.createDefaultRule,ranges:u,rule:{type:t.CFRuleType.iconSet,config:[],isShowValue:!0}};l.openPanel(o);break}case 2:{l.openPanel();break}case 1:{l.openPanel({...t.createDefaultRule(),ranges:u});break}case 9:{a.executeCommand(t.ClearRangeCfCommand.id,{ranges:u});break}case 10:{a.executeCommand(t.ClearWorksheetCfCommand.id);break}}return!0}};var dt=Object.getOwnPropertyDescriptor,vt=(r,e,l,n)=>{for(var a=n>1?void 0:n?dt(e,l):e,u=r.length-1,s;u>=0;u--)(s=r[u])&&(a=s(a)||a);return a},be=(r,e)=>(l,n)=>e(l,n,r);D.ConditionalFormattingClearController=class extends i.Disposable{constructor(e,l,n,a,u){super(),this._injector=e,this._univerInstanceService=l,this._sheetInterceptorService=n,this._selectionManagerService=a,this._conditionalFormattingRuleModel=u,this._init()}_init(){this.disposeWithMe(this._sheetInterceptorService.interceptCommand({getMutations:e=>{var u;const l=[],n=[],a={redos:l,undos:n};if([U.ClearSelectionFormatCommand.id,U.ClearSelectionAllCommand.id].includes(e.id)){const s=(u=this._selectionManagerService.getCurrentSelections())==null?void 0:u.map(S=>S.range);if(!s)return a;const v=this._univerInstanceService.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET),o=v.getActiveSheet();if(!o)return a;const f=v.getUnitId(),d=o.getSheetId(),p=this._conditionalFormattingRuleModel.getSubunitRules(f,d);if(!p||!p.length)return a;const{redos:h,undos:b}=Sr(this._injector,p,s,f,d);l.push(...h),n.push(...b)}return a}})),this.disposeWithMe(this._sheetInterceptorService.interceptRanges({getMutations:({unitId:e,subUnitId:l,ranges:n})=>{const a=[],u=[],s={redos:a,undos:u};if(!n||!n.length)return s;const v=this._conditionalFormattingRuleModel.getSubunitRules(e,l);if(!v||!v.length)return s;const{redos:o,undos:f}=Sr(this._injector,v,n,e,l);return a.push(...o),u.push(...f),s}}))}},D.ConditionalFormattingClearController=vt([be(0,i.Inject(i.Injector)),be(1,i.Inject(i.IUniverInstanceService)),be(2,i.Inject(U.SheetInterceptorService)),be(3,i.Inject(U.SheetsSelectionsService)),be(4,i.Inject(t.ConditionalFormattingRuleModel))],D.ConditionalFormattingClearController);function Sr(r,e,l,n,a){const u=[],s=[];return e.filter(v=>l.some(o=>v.ranges.some(f=>i.Rectangle.getIntersects(f,o)))).forEach(v=>{const f=new U.RangeMergeUtil().add(...v.ranges).subtract(...l).merge();if(f.length){const d={id:t.SetConditionalRuleMutation.id,params:{unitId:n,subUnitId:a,rule:{...v,ranges:f}}},p=t.setConditionalRuleMutationUndoFactory(r,d.params);u.push(d),s.push(...p)}else{const d={id:t.DeleteConditionalRuleMutation.id,params:{unitId:n,subUnitId:a,cfId:v.cfId}},p=t.DeleteConditionalRuleMutationUndoFactory(r,d.params);u.push(d),s.push(...p)}}),{redos:u,undos:s}}var pt=Object.getOwnPropertyDescriptor,ft=(r,e,l,n)=>{for(var a=n>1?void 0:n?pt(e,l):e,u=r.length-1,s;u>=0;u--)(s=r[u])&&(a=s(a)||a);return a},Ie=(r,e)=>(l,n)=>e(l,n,r);let Se=class extends i.Disposable{constructor(e,l,n,a,u){super();re(this,"_copyInfo");this._sheetClipboardService=e,this._conditionalFormattingRuleModel=l,this._injector=n,this._conditionalFormattingViewModel=a,this._univerInstanceService=u,this._initClipboardHook()}_initClipboardHook(){this.disposeWithMe(this._sheetClipboardService.addClipboardHook({id:t.SHEET_CONDITIONAL_FORMATTING_PLUGIN,onBeforeCopy:(e,l,n)=>this._collectConditionalRule(e,l,n),onPasteCells:(e,l,n,a)=>{const{copyType:u=W.COPY_TYPE.COPY,pasteType:s}=a,{range:v}=e||{},{range:o}=l;return this._generateConditionalFormattingMutations(o,{copyType:u,pasteType:s,copyRange:v})}}))}_collectConditionalRule(e,l,n){const a=new i.ObjectMatrix,u={};this._copyInfo={matrix:a,info:{unitId:e,subUnitId:l,cfMap:u}};const s=this._injector.invoke(d=>U.rangeToDiscreteRange(n,d,e,l));if(!s)return;const{rows:v,cols:o}=s,f=new Set;v.forEach((d,p)=>{o.forEach((h,b)=>{const S=this._conditionalFormattingViewModel.getCellCfs(e,l,d,h);S&&(S.forEach(C=>f.add(C.cfId)),a.setValue(p,b,S.map(C=>C.cfId)))})}),f.forEach(d=>{const p=this._conditionalFormattingRuleModel.getRule(e,l,d);p&&(u[d]=p.rule)})}_generateConditionalFormattingMutations(e,l){const n=this._univerInstanceService.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET),a=n.getActiveSheet(),u=n.getUnitId();if(!a)return{redos:[],undos:[]};const s=a.getSheetId();if(l.copyType===W.COPY_TYPE.CUT)return this._copyInfo=null,{redos:[],undos:[]};if(!this._copyInfo||!l.copyRange)return{redos:[],undos:[]};if(![W.PREDEFINED_HOOK_NAME.SPECIAL_PASTE_FORMAT,W.PREDEFINED_HOOK_NAME.DEFAULT_PASTE,W.PREDEFINED_HOOK_NAME.SPECIAL_PASTE_BESIDES_BORDER].includes(l.pasteType))return{redos:[],undos:[]};const{ranges:[o,f],mapFunc:d}=W.virtualizeDiscreteRanges([l.copyRange,e]),p=W.getRepeatRange(o,f,!0),h={};i.Range.foreach(f,(g,T)=>{const{row:w,col:I}=d(g,T),k=this._conditionalFormattingViewModel.getCellCfs(u,s,w,I);k&&k.forEach(V=>{if(!h[V.cfId]){const P=new i.ObjectMatrix;h[V.cfId]=P;const L=this._conditionalFormattingRuleModel.getRule(u,s,V.cfId);L==null||L.ranges.forEach(y=>{i.Range.foreach(y,(x,F)=>{P.setValue(x,F,1)})})}h[V.cfId].realDeleteValue(w,I)})});const{matrix:b,info:S}=this._copyInfo,C=[];let N=this._conditionalFormattingRuleModel.createCfId(u,s);const _={},E=g=>{if(_[g])return _[g];const T=S==null?void 0:S.cfMap[g],w=[...this._conditionalFormattingRuleModel.getSubunitRules(u,s)||[],...C].find(I=>i.Tools.diffValue(I.rule,T));if(w)return _[g]=w,w;{const I={rule:T,cfId:N,ranges:[],stopIfTrue:!1};return _[g]=I,C.push(I),N=`${Number(N)+1}`,I}};p.forEach(g=>{b&&b.forValue((T,w,I)=>{const k=i.Rectangle.getPositionRange({startRow:T,endRow:T,startColumn:w,endColumn:w},g.startRange),{row:V,col:P}=d(k.startRow,k.startColumn);I.forEach(L=>{if(!h[L]){const y=E(L),x=new i.ObjectMatrix;h[L]=x,y.ranges.forEach(F=>{i.Range.foreach(F,(G,Q)=>{x.setValue(G,Q,1)})})}h[L].setValue(V,P,1)})})});const M=[],R=[];for(const g in h){const T=h[g],w=U.findAllRectangle(U.createTopMatrixFromMatrix(T));if(!w.length){const I={unitId:u,subUnitId:s,cfId:g};M.push({id:t.DeleteConditionalRuleMutation.id,params:I}),R.push(...t.DeleteConditionalRuleMutationUndoFactory(this._injector,I))}if(C.some(I=>I.cfId===g)){const I=E(g),k={unitId:u,subUnitId:s,rule:{...I,ranges:w}};M.push({id:t.AddConditionalRuleMutation.id,params:k}),R.push(t.AddConditionalRuleMutationUndoFactory(this._injector,k))}else{const I=this._conditionalFormattingRuleModel.getRule(u,s,g);if(!I)continue;const k={unitId:u,subUnitId:s,rule:{...I,ranges:w}};M.push({id:t.SetConditionalRuleMutation.id,params:k}),R.push(...t.setConditionalRuleMutationUndoFactory(this._injector,k))}}return{redos:M,undos:R}}};Se=ft([Ie(0,i.Inject(W.ISheetClipboardService)),Ie(1,i.Inject(t.ConditionalFormattingRuleModel)),Ie(2,i.Inject(i.Injector)),Ie(3,i.Inject(t.ConditionalFormattingViewModel)),Ie(4,i.Inject(i.IUniverInstanceService))],Se);var ht=Object.getOwnPropertyDescriptor,gt=(r,e,l,n)=>{for(var a=n>1?void 0:n?ht(e,l):e,u=r.length-1,s;u>=0;u--)(s=r[u])&&(a=s(a)||a);return a},er=(r,e)=>(l,n)=>e(l,n,r);let Te=class extends i.Disposable{constructor(r,e,l){super(),this._localeService=r,this._commandService=e,this._sheetPermissionCheckController=l,this._commandExecutedListener()}_commandExecutedListener(){this.disposeWithMe(this._commandService.beforeCommandExecuted(r=>{r.id===t.AddCfCommand.id&&(this._sheetPermissionCheckController.permissionCheckWithRanges({workbookTypes:[U.WorkbookEditablePermission],rangeTypes:[U.RangeProtectionPermissionEditPoint],worksheetTypes:[U.WorksheetEditPermission,U.WorksheetSetCellStylePermission]},r.params.rule.ranges)||this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr")))}))}};Te=gt([er(0,i.Inject(i.LocaleService)),er(1,i.ICommandService),er(2,i.Inject(U.SheetPermissionCheckController))],Te);var yt=Object.getOwnPropertyDescriptor,mt=(r,e,l,n)=>{for(var a=n>1?void 0:n?yt(e,l):e,u=r.length-1,s;u>=0;u--)(s=r[u])&&(a=s(a)||a);return a},Ue=(r,e)=>(l,n)=>e(l,n,r);let _e=class extends i.Disposable{constructor(r,e,l,n){super(),this._conditionalFormattingRuleModel=r,this._univerInstanceService=e,this._injector=l,this._refRangeService=n,this._initRefRange()}_initRefRange(){const r=new Map,e=(n,a,u)=>`${n}_${a}_${u}`,l=(n,a,u)=>{const s=o=>{const f=[...u.ranges],d=f.map(h=>U.handleDefaultRangeChangeWithEffectRefCommands(h,o)).filter(h=>!!h);if(t.isRangesEqual(d,f))return{redos:[],undos:[]};if(d.length){const h={unitId:n,subUnitId:a,rule:{...u,ranges:d}},b=[{id:t.SetConditionalRuleMutation.id,params:h}],S=t.setConditionalRuleMutationUndoFactory(this._injector,h);return{redos:b,undos:S}}else{const h={unitId:n,subUnitId:a,cfId:u.cfId},b=[{id:t.DeleteConditionalRuleMutation.id,params:h}],S=t.DeleteConditionalRuleMutationUndoFactory(this._injector,h);return{redos:b,undos:S}}},v=[];u.ranges.forEach(o=>{const f=this._refRangeService.registerRefRange(o,s);v.push(()=>f.dispose())}),r.set(e(n,a,u.cfId),()=>v.forEach(o=>o()))};this.disposeWithMe(this._conditionalFormattingRuleModel.$ruleChange.subscribe(n=>{const{unitId:a,subUnitId:u,rule:s}=n,v=this._univerInstanceService.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET),o=v.getActiveSheet();if(!(n.unitId!==v.getUnitId()||n.subUnitId!==(o==null?void 0:o.getSheetId())))switch(n.type){case"add":{l(n.unitId,n.subUnitId,n.rule);break}case"delete":{const f=r.get(e(a,u,s.cfId));f&&f();break}case"set":{const f=r.get(e(a,u,s.cfId));f&&f(),l(n.unitId,n.subUnitId,n.rule)}}})),this.disposeWithMe(i.toDisposable(()=>{r.forEach(n=>{n()}),r.clear()}))}};_e=mt([Ue(0,i.Inject(t.ConditionalFormattingRuleModel)),Ue(1,i.Inject(i.IUniverInstanceService)),Ue(2,i.Inject(i.Injector)),Ue(3,i.Inject(U.RefRangeService))],_e);var Ct=Object.getOwnPropertyDescriptor,bt=(r,e,l,n)=>{for(var a=n>1?void 0:n?Ct(e,l):e,u=r.length-1,s;u>=0;u--)(s=r[u])&&(a=s(a)||a);return a},ce=(r,e)=>(l,n)=>e(l,n,r);let we=class extends i.Disposable{constructor(e,l,n,a,u,s){super();re(this,"_ruleChangeCacheMap",new Map);this._sheetInterceptorService=e,this._conditionalFormattingService=l,this._univerInstanceService=n,this._renderManagerService=a,this._conditionalFormattingViewModel=u,this._conditionalFormattingRuleModel=s,this._initViewModelInterceptor(),this._initSkeleton(),this.disposeWithMe(()=>{this._ruleChangeCacheMap.clear()})}_markDirtySkeleton(){var l,n,a;const e=this._univerInstanceService.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET).getUnitId();(l=this._renderManagerService.getRenderById(e))==null||l.with(W.SheetSkeletonManagerService).reCalculate(),(a=(n=this._renderManagerService.getRenderById(e))==null?void 0:n.mainComponent)==null||a.makeDirty()}_initSkeleton(){this.disposeWithMe(J.merge(this._conditionalFormattingRuleModel.$ruleChange,this._conditionalFormattingViewModel.markDirty$).pipe(fe.bufferTime(16),fe.filter(e=>!!e.length),fe.filter(e=>{const l=this._univerInstanceService.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET);if(!l)return!1;const n=l.getActiveSheet();return n?e.filter(a=>a.unitId===l.getUnitId()&&a.subUnitId===n.getSheetId()).length>0:!1})).subscribe(()=>this._markDirtySkeleton()))}_initViewModelInterceptor(){this.disposeWithMe(this._sheetInterceptorService.intercept(U.INTERCEPTOR_POINT.CELL_CONTENT,{effect:i.InterceptorEffectEnum.Style,handler:(e,l,n)=>{const a=this._conditionalFormattingService.composeStyle(l.unitId,l.subUnitId,l.row,l.col);if(!a)return n(e);const u=l.workbook.getStyles(),s=(typeof(e==null?void 0:e.s)=="string"?u.get(e==null?void 0:e.s):e==null?void 0:e.s)||{},v=e===l.rawData?{...l.rawData}:e;if(a.style){const o={...s,...a.style};Object.assign(v,{s:o})}return v.fontRenderExtension||(v.fontRenderExtension={},a.isShowValue!==void 0&&(v.fontRenderExtension.isSkip=!a.isShowValue)),a.dataBar&&(v.dataBar=a.dataBar),a.iconSet&&(v.iconSet=a.iconSet,v.fontRenderExtension.leftOffset=t.DEFAULT_PADDING+t.DEFAULT_WIDTH),n(v)},priority:10}))}};we=bt([ce(0,i.Inject(U.SheetInterceptorService)),ce(1,i.Inject(t.ConditionalFormattingService)),ce(2,i.Inject(i.IUniverInstanceService)),ce(3,i.Inject(ar.IRenderManagerService)),ce(4,i.Inject(t.ConditionalFormattingViewModel)),ce(5,i.Inject(t.ConditionalFormattingRuleModel))],we);const Tr="sheets-conditional-formatting-ui.config",ke={};var It=Object.defineProperty,St=Object.getOwnPropertyDescriptor,Tt=(r,e,l)=>e in r?It(r,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[e]=l,_t=(r,e,l,n)=>{for(var a=n>1?void 0:n?St(e,l):e,u=r.length-1,s;u>=0;u--)(s=r[u])&&(a=s(a)||a);return a},rr=(r,e)=>(l,n)=>e(l,n,r),_r=(r,e,l)=>Tt(r,typeof e!="symbol"?e+"":e,l);D.UniverSheetsConditionalFormattingMobileUIPlugin=class extends i.Plugin{constructor(e=ke,l,n,a){super(),this._config=e,this._injector=l,this._commandService=n,this._configService=a;const{menu:u,...s}=i.merge({},ke,this._config);u&&this._configService.setConfig("menu",u,{merge:!0}),this._configService.setConfig(Tr,s),this._initCommand(),this._injector.add([we]),this._injector.add([_e]),this._injector.add([Se]),this._injector.add([Te]),this._injector.add([se])}_initCommand(){[He,Be,We,qe,Ge,Ze,ze,Ye,Ke,Ce].forEach(e=>{this._commandService.registerCommand(e)})}},_r(D.UniverSheetsConditionalFormattingMobileUIPlugin,"pluginName",`${t.SHEET_CONDITIONAL_FORMATTING_PLUGIN}_MOBILE_UI_PLUGIN`),_r(D.UniverSheetsConditionalFormattingMobileUIPlugin,"type",i.UniverInstanceType.UNIVER_SHEET),D.UniverSheetsConditionalFormattingMobileUIPlugin=_t([i.DependentOn(t.UniverSheetsConditionalFormattingPlugin),rr(1,i.Inject(i.Injector)),rr(2,i.Inject(i.ICommandService)),rr(3,i.IConfigService)],D.UniverSheetsConditionalFormattingMobileUIPlugin);var wt=Object.getOwnPropertyDescriptor,xt=(r,e,l,n)=>{for(var a=n>1?void 0:n?wt(e,l):e,u=r.length-1,s;u>=0;u--)(s=r[u])&&(a=s(a)||a);return a},xe=(r,e)=>(l,n)=>e(l,n,r);let Pe=class extends i.Disposable{constructor(r,e,l,n,a){super(),this._injector=r,this._univerInstanceService=e,this._autoFillService=l,this._conditionalFormattingRuleModel=n,this._conditionalFormattingViewModel=a,this._initAutoFill()}_initAutoFill(){const r=()=>({redos:[],undos:[]}),e=(a,u,s,v,o)=>{var b;const f=this._univerInstanceService.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET).getUnitId(),d=(b=this._univerInstanceService.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET).getActiveSheet())==null?void 0:b.getSheetId();if(!f||!d)return;const p={startRow:a.row,startColumn:a.col,endColumn:a.col,endRow:a.row},h={startRow:u.row,startColumn:u.col,endColumn:u.col,endRow:u.row};i.Range.foreach(s,(S,C)=>{const N=i.Rectangle.getPositionRange({startRow:S,startColumn:C,endColumn:C,endRow:S},p),_=i.Rectangle.getPositionRange({startRow:S,startColumn:C,endColumn:C,endRow:S},h),{row:E,col:M}=o(N.startRow,N.startColumn),R=this._conditionalFormattingViewModel.getCellCfs(f,d,E,M),{row:g,col:T}=o(_.startRow,_.startColumn),w=this._conditionalFormattingViewModel.getCellCfs(f,d,g,T);w&&w.forEach(I=>{let k=v.get(I.cfId);if(!v.get(I.cfId)){const V=this._conditionalFormattingRuleModel.getRule(f,d,I.cfId);if(!V)return;k=new i.ObjectMatrix,V.ranges.forEach(P=>{i.Range.foreach(P,(L,y)=>{k.setValue(L,y,1)})}),v.set(I.cfId,k)}k.realDeleteValue(g,T)}),R&&R.forEach(I=>{let k=v.get(I.cfId);if(!v.get(I.cfId)){const V=this._conditionalFormattingRuleModel.getRule(f,d,I.cfId);if(!V)return;k=new i.ObjectMatrix,V.ranges.forEach(P=>{i.Range.foreach(P,(L,y)=>{k.setValue(L,y,1)})}),v.set(I.cfId,k)}k.setValue(g,T,1)})})},l=(a,u)=>{var _,E,M;const s=(_=this._univerInstanceService.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET))==null?void 0:_.getUnitId(),v=(M=(E=this._univerInstanceService.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET))==null?void 0:E.getActiveSheet())==null?void 0:M.getSheetId(),o=new Map,f=[],d=[];if(!s||!v)return r();const p=W.virtualizeDiscreteRanges([a,u]),[h,b]=p.ranges,{mapFunc:S}=p,C={row:h.startRow,col:h.startColumn};return W.getAutoFillRepeatRange(h,b).forEach(R=>{e(C,R.repeatStartCell,R.relativeRange,o,S)}),o.forEach((R,g)=>{const T=this._conditionalFormattingRuleModel.getRule(s,v,g);if(!T)return;const w=U.findAllRectangle(U.createTopMatrixFromMatrix(R));if(w.length){const I={unitId:s,subUnitId:v,rule:{...T,ranges:w}};f.push({id:t.SetConditionalRuleMutation.id,params:I}),d.push(...t.setConditionalRuleMutationUndoFactory(this._injector,I))}else{const I={unitId:s,subUnitId:v,cfId:T.cfId};f.push({id:t.DeleteConditionalRuleMutation.id,params:I}),d.push(...t.DeleteConditionalRuleMutationUndoFactory(this._injector,I))}}),{undos:d,redos:f}},n={id:t.SHEET_CONDITIONAL_FORMATTING_PLUGIN,onFillData:(a,u,s)=>{if(s===W.APPLY_TYPE.COPY||s===W.APPLY_TYPE.ONLY_FORMAT||s===W.APPLY_TYPE.SERIES){const{source:v,target:o}=a;return l(v,o)}return r()}};this.disposeWithMe(this._autoFillService.addHook(n))}};Pe=xt([xe(0,i.Inject(i.Injector)),xe(1,i.Inject(i.IUniverInstanceService)),xe(2,i.Inject(W.IAutoFillService)),xe(3,i.Inject(t.ConditionalFormattingRuleModel)),xe(4,i.Inject(t.ConditionalFormattingViewModel))],Pe);var Nt=Object.getOwnPropertyDescriptor,Et=(r,e,l,n)=>{for(var a=n>1?void 0:n?Nt(e,l):e,u=r.length-1,s;u>=0;u--)(s=r[u])&&(a=s(a)||a);return a},wr=(r,e)=>(l,n)=>e(l,n,r);let De=class extends i.Disposable{constructor(r,e){super(),this._sheetInterceptorService=r,this._conditionalFormattingService=e,this._initInterceptorEditorEnd()}_initInterceptorEditorEnd(){this.disposeWithMe(i.toDisposable(this._sheetInterceptorService.writeCellInterceptor.intercept(U.AFTER_CELL_EDIT,{handler:(r,e,l)=>{var s,v,o;r||l(r);const n=this._conditionalFormattingService.composeStyle(e.unitId,e.subUnitId,e.row,e.col),a=(s=n==null?void 0:n.style)!=null?s:{},u=Object.keys(a);if(r!=null&&r.p)return(o=(v=r.p.body)==null?void 0:v.textRuns)==null||o.forEach(f=>{f.ts&&u.forEach(d=>{var p;(p=f.ts)==null||delete p[d]})}),l(r);{const f={...(typeof(r==null?void 0:r.s)=="string"?e.workbook.getStyles().get(r.s):r==null?void 0:r.s)||{}};u.forEach(p=>{delete f[p]});const d={...r,s:{...f}};return l(d)}}})))}};De=Et([wr(0,i.Inject(U.SheetInterceptorService)),wr(1,i.Inject(t.ConditionalFormattingService))],De);const xr=[U.SetWorksheetActiveOperation.id,t.AddConditionalRuleMutation.id,t.SetConditionalRuleMutation.id,t.DeleteConditionalRuleMutation.id,t.MoveConditionalRuleMutation.id],Ne=[{label:{name:"sheet.cf.ruleType.highlightCell",selectable:!1},value:Y.highlightCell},{label:{name:"sheet.cf.panel.rankAndAverage",selectable:!1},value:Y.rank},{label:{name:"sheet.cf.ruleType.formula",selectable:!1},value:Y.formula},{label:{name:"sheet.cf.ruleType.colorScale",selectable:!1},value:Y.colorScale},{label:{name:"sheet.cf.ruleType.dataBar",selectable:!1},value:Y.dataBar},{label:{name:"sheet.cf.ruleType.iconSet",selectable:!1},value:Y.icon},{label:{name:"sheet.cf.menu.manageConditionalFormatting",selectable:!1},value:Y.viewRule},{label:{name:"sheet.cf.menu.createConditionalFormatting",selectable:!1},value:Y.createRule},{label:{name:"sheet.cf.menu.clearRangeRules",selectable:!1},value:Y.clearRangeRules,disabled:!1},{label:{name:"sheet.cf.menu.clearWorkSheetRules",selectable:!1},value:Y.clearWorkSheetRules}],Rt=r=>{const e=r.get(U.SheetsSelectionsService),l=r.get(i.ICommandService),n=r.get(i.IUniverInstanceService),a=r.get(t.ConditionalFormattingRuleModel),u=new J.Observable(o=>J.merge(e.selectionMoveEnd$,e.selectionSet$,new J.Observable(f=>{const d=l.onCommandExecuted(p=>{var C;const{id:h,params:b}=p,S=(C=n.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET))==null?void 0:C.getUnitId();xr.includes(h)&&b.unitId===S&&f.next(null)});return()=>d.dispose()})).pipe(fe.debounceTime(16)).subscribe(()=>{var C;const f=((C=e.getCurrentSelections())==null?void 0:C.map(N=>N.range))||[],d=n.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET);if(!d)return;const p=d.getActiveSheet();if(!p)return;const S=(a.getSubunitRules(d.getUnitId(),p.getSheetId())||[]).filter(N=>N.ranges.some(_=>f.some(E=>i.Rectangle.intersects(E,_)))).map(N=>N.ranges).every(N=>U.checkRangesEditablePermission(r,d.getUnitId(),p.getSheetId(),N));o.next(S)})),s=new J.Observable(o=>new J.Observable(f=>{const d=l.onCommandExecuted(p=>{var C;const{id:h,params:b}=p,S=(C=n.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET))==null?void 0:C.getUnitId();xr.includes(h)&&b.unitId===S&&f.next(null)});return()=>d.dispose()}).pipe(fe.debounceTime(16)).subscribe(()=>{const f=n.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET);if(!f)return;const d=f.getActiveSheet();if(!d)return;const p=a.getSubunitRules(f.getUnitId(),d.getSheetId())||[];if(!p.length)return o.next(!1),!1;const h=p.map(b=>b.ranges).every(b=>U.checkRangesEditablePermission(r,f.getUnitId(),d.getSheetId(),b));o.next(h)})),v=new J.Observable(o=>{u.subscribe(f=>{const d=Ne.find(p=>p.value===Y.clearRangeRules);d&&(d.disabled=!f,o.next(Ne))}),s.subscribe(f=>{const d=Ne.find(p=>p.value===Y.clearWorkSheetRules);d&&(d.disabled=!f,o.next(Ne))}),o.next(Ne)});return{id:Ce.id,type:j.MenuItemType.SELECTOR,icon:"ConditionsDoubleIcon",tooltip:"sheet.cf.title",selections:v,hidden$:j.getMenuHiddenObservable(r,i.UniverInstanceType.UNIVER_SHEET),disabled$:W.getCurrentRangeDisable$(r,{workbookTypes:[U.WorkbookEditablePermission],worksheetTypes:[U.WorksheetSetCellStylePermission,U.WorksheetEditPermission],rangeTypes:[U.RangeProtectionPermissionEditPoint]})}},Mt={[j.RibbonDataGroup.RULES]:{[Ce.id]:{order:1,menuItemFactory:Rt}}};var Vt=Object.getOwnPropertyDescriptor,Ot=(r,e,l,n)=>{for(var a=n>1?void 0:n?Vt(e,l):e,u=r.length-1,s;u>=0;u--)(s=r[u])&&(a=s(a)||a);return a},Nr=(r,e)=>(l,n)=>e(l,n,r);let Le=class extends i.Disposable{constructor(e,l){super();re(this,"_sidebarDisposable",null);this._injector=e,this._menuManagerService=l,this._menuManagerService.mergeMenu(Mt)}};Le=Ot([Nr(0,i.Inject(i.Injector)),Nr(1,j.IMenuManagerService)],Le);var Ut=Object.getOwnPropertyDescriptor,kt=(r,e,l,n)=>{for(var a=n>1?void 0:n?Ut(e,l):e,u=r.length-1,s;u>=0;u--)(s=r[u])&&(a=s(a)||a);return a},oe=(r,e)=>(l,n)=>e(l,n,r);const Pt=(r,e)=>{const l=d=>d.endRow-d.startRow+1,n=d=>d.endColumn-d.startColumn+1,a=l(e)%l(r),u=n(e)%n(r),s=Math.floor(l(e)/l(r)),v=Math.floor(n(e)/n(r)),o=[],f={startRow:0,endRow:l(r)-1,startColumn:0,endColumn:n(r)-1};if(l(e)===1&&n(e)===1){const d={startRow:e.startRow,endRow:e.startRow,startColumn:e.startColumn,endColumn:e.startColumn};return o.push({repeatRelativeRange:f,startRange:d}),o}for(let d=0;d<s+(a?.1:0);d++)for(let p=0;p<v+(u?.1:0);p++){const h=l(r)*d,b=n(r)*p,S={startRow:h+e.startRow,endRow:h+e.startRow,startColumn:b+e.startColumn,endColumn:b+e.startColumn};let C=f;d===s&&a&&(C={...C},C.endRow=C.endRow-(l(r)-a)),p===v&&u&&(C={...C},C.endColumn=C.endColumn-(n(r)-u)),o.push({repeatRelativeRange:C,startRange:S})}return o};let je=class extends i.Disposable{constructor(e,l,n,a,u,s){super();re(this,"_painterConfig",null);this._injector=e,this._univerInstanceService=l,this._formatPainterService=n,this._sheetsSelectionsService=a,this._conditionalFormattingRuleModel=u,this._conditionalFormattingViewModel=s,this._initFormattingPainter()}_initFormattingPainter(){const e=()=>({redos:[],undos:[]}),l=(u,s,v,o,f)=>{const{unitId:d,subUnitId:p}=this._painterConfig,{targetUnitId:h,targetSubUnitId:b}=f,S={startRow:u.row,startColumn:u.col,endColumn:u.col,endRow:u.row},C={startRow:s.row,startColumn:s.col,endColumn:s.col,endRow:s.row};i.Range.foreach(v,(N,_)=>{const E=i.Rectangle.getPositionRange({startRow:N,startColumn:_,endColumn:_,endRow:N},S),M=i.Rectangle.getPositionRange({startRow:N,startColumn:_,endColumn:_,endRow:N},C),R=this._conditionalFormattingViewModel.getCellCfs(d,p,E.startRow,E.startColumn),g=this._conditionalFormattingViewModel.getCellCfs(h,b,M.startRow,M.startColumn);g&&g.forEach(T=>{let w=o.get(T.cfId);if(!o.get(T.cfId)){const I=this._conditionalFormattingRuleModel.getRule(h,b,T.cfId);if(!I)return;w=new i.ObjectMatrix,I.ranges.forEach(k=>{i.Range.foreach(k,(V,P)=>{w.setValue(V,P,1)})}),o.set(T.cfId,w)}w.realDeleteValue(M.startRow,M.startColumn)}),R&&R.forEach(T=>{const w=o.get(T.cfId);w&&w.setValue(M.startRow,M.startColumn,1)})})},n=(u,s,v)=>{var E;const{range:o,unitId:f,subUnitId:d}=this._painterConfig,p=u!==f||d!==s,h=new Map,b=[],S=[];if(!u||!s||!f||!d)return e();const C=(E=this._conditionalFormattingRuleModel.getSubunitRules(f,d))!=null?E:[];C==null||C.forEach(M=>{const{ranges:R,cfId:g}=M;if(R.some(T=>i.Rectangle.intersects(o,T))){const T=new i.ObjectMatrix;p||R.forEach(w=>{i.Range.foreach(w,(I,k)=>{T.setValue(I,k,1)})}),h.set(g,T)}});const N={row:o.startRow,col:o.startColumn};return Pt(o,v).forEach(M=>{l(N,{row:M.startRange.startRow,col:M.startRange.startColumn},M.repeatRelativeRange,h,{targetUnitId:u,targetSubUnitId:s})}),h.forEach((M,R)=>{if(p){const g=this._conditionalFormattingRuleModel.getRule(u,s,R),T=U.findAllRectangle(U.createTopMatrixFromMatrix(M));if(g)if(T.length){const w={unitId:u,subUnitId:s,rule:{...g,ranges:T}};b.push({id:t.SetConditionalRuleMutation.id,params:w}),S.push(...t.setConditionalRuleMutationUndoFactory(this._injector,w))}else{const w={unitId:u,subUnitId:s,cfId:g.cfId};b.push({id:t.DeleteConditionalRuleMutation.id,params:w}),S.push(...t.DeleteConditionalRuleMutationUndoFactory(this._injector,w))}else if(T.length){const w=this._conditionalFormattingRuleModel.getRule(f,d,R);if(w){const I={unitId:u,subUnitId:s,rule:{...i.Tools.deepClone(w),cfId:this._conditionalFormattingRuleModel.createCfId(u,s),ranges:T}};b.push({id:t.AddConditionalRuleMutation.id,params:I}),S.push(t.AddConditionalRuleMutationUndoFactory(this._injector,I))}}}else{const g=this._conditionalFormattingRuleModel.getRule(f,d,R);if(!g)return;const T=U.findAllRectangle(U.createTopMatrixFromMatrix(M));if(T.length){const w={unitId:f,subUnitId:d,rule:{...g,ranges:T}};b.push({id:t.SetConditionalRuleMutation.id,params:w}),S.push(...t.setConditionalRuleMutationUndoFactory(this._injector,w))}else{const w={unitId:f,subUnitId:d,cfId:g.cfId};b.push({id:t.DeleteConditionalRuleMutation.id,params:w}),S.push(...t.DeleteConditionalRuleMutationUndoFactory(this._injector,w))}}}),{undos:S,redos:b}},a={id:t.SHEET_CONDITIONAL_FORMATTING_PLUGIN,onStatusChange:u=>{var s,v,o;switch(u){case W.FormatPainterStatus.INFINITE:case W.FormatPainterStatus.ONCE:{const f=(s=this._univerInstanceService.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET))==null?void 0:s.getUnitId(),d=(o=(v=this._univerInstanceService.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET))==null?void 0:v.getActiveSheet())==null?void 0:o.getSheetId(),p=this._sheetsSelectionsService.getCurrentLastSelection(),h=p==null?void 0:p.range;f&&d&&h&&(this._painterConfig={unitId:f,subUnitId:d,range:h});break}case W.FormatPainterStatus.OFF:{this._painterConfig=null;break}}},onApply:(u,s,v)=>this._painterConfig?n(u,s,v):{redos:[],undos:[]}};this._formatPainterService.addHook(a)}};je=kt([oe(0,i.Inject(i.Injector)),oe(1,i.Inject(i.IUniverInstanceService)),oe(2,i.Inject(W.IFormatPainterService)),oe(3,i.Inject(U.SheetsSelectionsService)),oe(4,i.Inject(t.ConditionalFormattingRuleModel)),oe(5,i.Inject(t.ConditionalFormattingViewModel))],je);var Dt=Object.getOwnPropertyDescriptor,Lt=(r,e,l,n)=>{for(var a=n>1?void 0:n?Dt(e,l):e,u=r.length-1,s;u>=0;u--)(s=r[u])&&(a=s(a)||a);return a},tr=(r,e)=>(l,n)=>e(l,n,r);let Ae=class extends i.Disposable{constructor(r,e,l){super(),this._conditionalFormattingViewModel=r,this._univerInstanceService=e,this._renderManagerService=l,this._init()}_init(){const r=this._univerInstanceService.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET),e=l=>{const n=l.getUnitId(),a=this._renderManagerService.getRenderById(n);if(!a)return;const u=a.with(W.SheetSkeletonManagerService);this.disposeWithMe(u.currentSkeleton$.subscribe(s=>{if(s){const v=s.skeleton.rowColumnSegment,o=v.endColumn-v.startColumn+1,d=(v.endRow-v.startRow+1)*o*9,p=Math.max(t.CONDITIONAL_FORMATTING_VIEWPORT_CACHE_LENGTH,d);this._conditionalFormattingViewModel.setCacheLength(p)}}))};r&&e(r),this._univerInstanceService.getCurrentTypeOfUnit$(i.UniverInstanceType.UNIVER_SHEET).subscribe(l=>{l&&e(l)})}};Ae=Lt([tr(0,i.Inject(t.ConditionalFormattingViewModel)),tr(1,i.IUniverInstanceService),tr(2,ar.IRenderManagerService)],Ae);var jt=Object.defineProperty,At=Object.getOwnPropertyDescriptor,Ft=(r,e,l)=>e in r?jt(r,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[e]=l,$t=(r,e,l,n)=>{for(var a=n>1?void 0:n?At(e,l):e,u=r.length-1,s;u>=0;u--)(s=r[u])&&(a=s(a)||a);return a},nr=(r,e)=>(l,n)=>e(l,n,r),Er=(r,e,l)=>Ft(r,typeof e!="symbol"?e+"":e,l);D.UniverSheetsConditionalFormattingUIPlugin=class extends i.Plugin{constructor(e=ke,l,n,a){super(),this._config=e,this._injector=l,this._commandService=n,this._configService=a;const{menu:u,...s}=i.merge({},ke,this._config);u&&this._configService.setConfig("menu",u,{merge:!0}),this._configService.setConfig(Tr,s),this._initCommand()}onStarting(){i.registerDependencies(this._injector,[[we],[_e],[Se],[Pe],[Te],[me],[Le],[se],[De],[D.ConditionalFormattingClearController],[je],[Ae]]),i.touchDependencies(this._injector,[[we]])}onReady(){i.touchDependencies(this._injector,[[Le],[me]])}onRendered(){i.touchDependencies(this._injector,[[Pe],[D.ConditionalFormattingClearController],[Se],[De],[se],[je],[Te],[_e],[Ae]])}_initCommand(){[He,Be,We,qe,Ge,Ze,ze,Ye,Ke,Ce].forEach(e=>{this._commandService.registerCommand(e)})}},Er(D.UniverSheetsConditionalFormattingUIPlugin,"pluginName",`${t.SHEET_CONDITIONAL_FORMATTING_PLUGIN}_UI_PLUGIN`),Er(D.UniverSheetsConditionalFormattingUIPlugin,"type",i.UniverInstanceType.UNIVER_SHEET),D.UniverSheetsConditionalFormattingUIPlugin=$t([i.DependentOn(t.UniverSheetsConditionalFormattingPlugin),nr(1,i.Inject(i.Injector)),nr(2,i.Inject(i.ICommandService)),nr(3,i.IConfigService)],D.UniverSheetsConditionalFormattingUIPlugin),D.AddAverageCfCommand=He,D.AddColorScaleConditionalRuleCommand=Be,D.AddDataBarConditionalRuleCommand=We,D.AddDuplicateValuesCfCommand=qe,D.AddNumberCfCommand=Ge,D.AddRankCfCommand=Ze,D.AddTextCfCommand=ze,D.AddTimePeriodCfCommand=Ye,D.AddUniqueValuesCfCommand=Ke,D.OpenConditionalFormattingOperator=Ce,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})});
1
+ (function(D,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("@univerjs/core"),require("@univerjs/sheets"),require("@univerjs/sheets-conditional-formatting"),require("@univerjs/ui"),require("react/jsx-runtime"),require("react"),require("@univerjs/design"),require("@univerjs/engine-formula"),require("@univerjs/sheets-formula-ui"),require("@univerjs/sheets-ui"),require("rxjs"),require("@univerjs/engine-render"),require("rxjs/operators")):typeof define=="function"&&define.amd?define(["exports","@univerjs/core","@univerjs/sheets","@univerjs/sheets-conditional-formatting","@univerjs/ui","react/jsx-runtime","react","@univerjs/design","@univerjs/engine-formula","@univerjs/sheets-formula-ui","@univerjs/sheets-ui","rxjs","@univerjs/engine-render","rxjs/operators"],i):(D=typeof globalThis<"u"?globalThis:D||self,i(D.UniverSheetsConditionalFormattingUi={},D.UniverCore,D.UniverSheets,D.UniverSheetsConditionalFormatting,D.UniverUi,D.React,D.React,D.UniverDesign,D.UniverEngineFormula,D.UniverSheetsFormulaUi,D.UniverSheetsUi,D.rxjs,D.UniverEngineRender,D.rxjs.operators))})(this,(function(D,i,U,t,j,c,m,O,$e,pe,W,J,ar,fe){"use strict";var Wt=Object.defineProperty;var qt=(D,i,U)=>i in D?Wt(D,i,{enumerable:!0,configurable:!0,writable:!0,value:U}):D[i]=U;var re=(D,i,U)=>qt(D,typeof i!="symbol"?i+"":i,U);const He={type:i.CommandType.COMMAND,id:"sheet.command.add-average-conditional-rule",handler(r,e){if(!e)return!1;const{ranges:l,style:n,stopIfTrue:a,operator:u}=e,s=r.get(t.ConditionalFormattingRuleModel),v=r.get(i.ICommandService),o=r.get(i.IUniverInstanceService),f=U.getSheetCommandTarget(o);if(!f)return!1;const{unitId:d,subUnitId:p}=f,h=s.createCfId(d,p),b={ranges:l,cfId:h,stopIfTrue:!!a,rule:{type:t.CFRuleType.highlightCell,subType:t.CFSubRuleType.average,operator:u,style:n}};return v.executeCommand(t.AddConditionalRuleMutation.id,{unitId:d,subUnitId:p,rule:b})}},Be={type:i.CommandType.COMMAND,id:"sheet.command.add-color-scale-conditional-rule",handler(r,e){if(!e)return!1;const{ranges:l,config:n,stopIfTrue:a}=e,u=r.get(t.ConditionalFormattingRuleModel),s=r.get(i.ICommandService),v=r.get(i.IUniverInstanceService),o=U.getSheetCommandTarget(v);if(!o)return!1;const{unitId:f,subUnitId:d}=o,p=u.createCfId(f,d),h={ranges:l,cfId:p,stopIfTrue:!!a,rule:{type:t.CFRuleType.colorScale,config:n}};return s.executeCommand(t.AddConditionalRuleMutation.id,{unitId:f,subUnitId:d,rule:h})}},We={type:i.CommandType.COMMAND,id:"sheet.command.add-data-bar-conditional-rule",handler(r,e){if(!e)return!1;const{ranges:l,min:n,max:a,nativeColor:u,positiveColor:s,isGradient:v,stopIfTrue:o,isShowValue:f}=e,d=r.get(t.ConditionalFormattingRuleModel),p=r.get(i.IUniverInstanceService),h=U.getSheetCommandTarget(p);if(!h)return!1;const{unitId:b,subUnitId:S}=h,C=r.get(i.ICommandService),N=d.createCfId(b,S),_={ranges:l,cfId:N,stopIfTrue:!!o,rule:{type:t.CFRuleType.dataBar,isShowValue:f,config:{min:n,max:a,nativeColor:u,positiveColor:s,isGradient:v}}};return C.executeCommand(t.AddConditionalRuleMutation.id,{unitId:b,subUnitId:S,rule:_})}},qe={type:i.CommandType.COMMAND,id:"sheet.command.add-duplicate-values-conditional-rule",handler(r,e){if(!e)return!1;const{ranges:l,style:n,stopIfTrue:a}=e,u=r.get(t.ConditionalFormattingRuleModel),s=r.get(i.ICommandService),v=r.get(i.IUniverInstanceService),o=U.getSheetCommandTarget(v);if(!o)return!1;const{unitId:f,subUnitId:d}=o,p=u.createCfId(f,d),h={ranges:l,cfId:p,stopIfTrue:!!a,rule:{type:t.CFRuleType.highlightCell,subType:t.CFSubRuleType.duplicateValues,style:n}};return s.executeCommand(t.AddConditionalRuleMutation.id,{unitId:f,subUnitId:d,rule:h})}},Ge={type:i.CommandType.COMMAND,id:"sheet.command.add-number-conditional-rule",handler(r,e){if(!e)return!1;const{ranges:l,style:n,stopIfTrue:a,operator:u,value:s}=e,v=r.get(t.ConditionalFormattingRuleModel),o=r.get(i.ICommandService),f=r.get(i.IUniverInstanceService),d=U.getSheetCommandTarget(f);if(!d)return!1;const{unitId:p,subUnitId:h}=d,b=v.createCfId(p,h);let S;if([t.CFNumberOperator.between,t.CFNumberOperator.notBetween].includes(u)){const C=s;if(C.length!==2||!Array.isArray(C))return!1;S={ranges:l,cfId:b,stopIfTrue:!!a,rule:{type:t.CFRuleType.highlightCell,subType:t.CFSubRuleType.number,operator:u,style:n,value:C}}}else{const C=s;if(typeof C!="number")return!1;S={ranges:l,cfId:b,stopIfTrue:!!a,rule:{type:t.CFRuleType.highlightCell,subType:t.CFSubRuleType.number,operator:u,style:n,value:C}}}return o.executeCommand(t.AddConditionalRuleMutation.id,{unitId:p,subUnitId:h,rule:S})}},Ze={type:i.CommandType.COMMAND,id:"sheet.command.add-rank-conditional-rule",handler(r,e){if(!e)return!1;const{ranges:l,style:n,stopIfTrue:a,isPercent:u,isBottom:s,value:v}=e,o=r.get(t.ConditionalFormattingRuleModel),f=r.get(i.IUniverInstanceService),d=r.get(i.ICommandService),p=U.getSheetCommandTarget(f);if(!p)return!1;const{unitId:h,subUnitId:b}=p,S=o.createCfId(h,b),C={ranges:l,cfId:S,stopIfTrue:!!a,rule:{type:t.CFRuleType.highlightCell,subType:t.CFSubRuleType.rank,isPercent:u,isBottom:s,style:n,value:v}};return d.executeCommand(t.AddConditionalRuleMutation.id,{unitId:h,subUnitId:b,rule:C})}},ze={type:i.CommandType.COMMAND,id:"sheet.command.add-text-conditional-rule",handler(r,e){if(!e)return!1;const{ranges:l,style:n,stopIfTrue:a,operator:u,value:s}=e,v=r.get(t.ConditionalFormattingRuleModel),o=r.get(i.IUniverInstanceService),f=U.getSheetCommandTarget(o);if(!f)return!1;const{unitId:d,subUnitId:p}=f,h=r.get(i.ICommandService),b=v.createCfId(d,p),S={ranges:l,cfId:b,stopIfTrue:!!a,rule:{type:t.CFRuleType.highlightCell,subType:t.CFSubRuleType.text,operator:u,style:n,value:s}};return h.executeCommand(t.AddConditionalRuleMutation.id,{unitId:d,subUnitId:p,rule:S})}},Ye={type:i.CommandType.COMMAND,id:"sheet.command.add-time-period-conditional-rule",handler(r,e){if(!e)return!1;const{ranges:l,style:n,stopIfTrue:a,operator:u}=e,s=r.get(t.ConditionalFormattingRuleModel),v=r.get(i.IUniverInstanceService),o=r.get(i.ICommandService),f=U.getSheetCommandTarget(v);if(!f)return!1;const{unitId:d,subUnitId:p}=f,h=s.createCfId(d,p),b={ranges:l,cfId:h,stopIfTrue:!!a,rule:{type:t.CFRuleType.highlightCell,subType:t.CFSubRuleType.timePeriod,operator:u,style:n}};return o.executeCommand(t.AddConditionalRuleMutation.id,{unitId:d,subUnitId:p,rule:b})}},Ke={type:i.CommandType.COMMAND,id:"sheet.command.add-uniqueValues-conditional-rule",handler(r,e){if(!e)return!1;const{ranges:l,style:n,stopIfTrue:a}=e,u=r.get(t.ConditionalFormattingRuleModel),s=r.get(i.IUniverInstanceService),v=r.get(i.ICommandService),o=U.getSheetCommandTarget(s);if(!o)return!1;const{unitId:f,subUnitId:d}=o,p=u.createCfId(f,d),h={ranges:l,cfId:p,stopIfTrue:!!a,rule:{type:t.CFRuleType.highlightCell,subType:t.CFSubRuleType.uniqueValues,style:n}};return v.executeCommand(t.AddConditionalRuleMutation.id,{unitId:f,subUnitId:d,rule:h})}};var K=function(){return K=Object.assign||function(r){for(var e,l=1,n=arguments.length;l<n;l++){e=arguments[l];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a])}return r},K.apply(this,arguments)},Rr=function(r,e){var l={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(l[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(r);a<n.length;a++)e.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(r,n[a])&&(l[n[a]]=r[n[a]]);return l},X=m.forwardRef(function(r,e){var l=r.icon,n=r.id,a=r.className,u=r.extend,s=Rr(r,["icon","id","className","extend"]),v="univerjs-icon univerjs-icon-".concat(n," ").concat(a||"").trim(),o=m.useRef("_".concat(Or()));return lr(l,"".concat(n),{defIds:l.defIds,idSuffix:o.current},K({ref:e,className:v},s),u)});function lr(r,e,l,n,a){return m.createElement(r.tag,K(K({key:e},Mr(r,l,a)),n),(Vr(r,l).children||[]).map(function(u,s){return lr(u,"".concat(e,"-").concat(r.tag,"-").concat(s),l,void 0,a)}))}function Mr(r,e,l){var n=K({},r.attrs);l!=null&&l.colorChannel1&&n.fill==="colorChannel1"&&(n.fill=l.colorChannel1),r.tag==="mask"&&n.id&&(n.id=n.id+e.idSuffix),Object.entries(n).forEach(function(u){var s=u[0],v=u[1];s==="mask"&&typeof v=="string"&&(n[s]=v.replace(/url\(#(.*)\)/,"url(#$1".concat(e.idSuffix,")")))});var a=e.defIds;return!a||a.length===0||(r.tag==="use"&&n["xlink:href"]&&(n["xlink:href"]=n["xlink:href"]+e.idSuffix),Object.entries(n).forEach(function(u){var s=u[0],v=u[1];typeof v=="string"&&(n[s]=v.replace(/url\(#(.*)\)/,"url(#$1".concat(e.idSuffix,")")))})),n}function Vr(r,e){var l,n=e.defIds;return!n||n.length===0?r:r.tag==="defs"&&(!((l=r.children)===null||l===void 0)&&l.length)?K(K({},r),{children:r.children.map(function(a){return typeof a.attrs.id=="string"&&n&&n.includes(a.attrs.id)?K(K({},a),{attrs:K(K({},a.attrs),{id:a.attrs.id+e.idSuffix})}):a})}):r}function Or(){return Math.random().toString(36).substring(2,8)}X.displayName="UniverIcon";var Ur={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M4.65791 1.30005C3.77355 1.30005 3.05664 2.01696 3.05664 2.90132V12.8588C3.05664 13.8755 3.88086 14.6998 4.89759 14.6998H9.1016C11.2233 14.6998 12.9433 12.9798 12.9433 10.8581C12.9433 9.13925 11.8145 7.68407 10.2578 7.1934C10.8806 6.56856 11.2655 5.70659 11.2655 4.75472C11.2655 2.84676 9.71883 1.30005 7.81087 1.30005H4.65791ZM4.25664 2.90132C4.25664 2.6797 4.4363 2.50005 4.65791 2.50005H7.81087C9.05609 2.50005 10.0655 3.5095 10.0655 4.75472C10.0655 5.99993 9.05609 7.00938 7.81087 7.00938H4.25664V2.90132ZM4.25664 12.8588V8.21636H9.1016C10.5606 8.21636 11.7433 9.39909 11.7433 10.8581C11.7433 12.317 10.5606 13.4998 9.1016 13.4998H4.89759C4.5436 13.4998 4.25664 13.2128 4.25664 12.8588Z",fillRule:"evenodd",clipRule:"evenodd"}}]},ur=m.forwardRef(function(r,e){return m.createElement(X,Object.assign({},r,{id:"bold-icon",ref:e,icon:Ur}))});ur.displayName="BoldIcon";var kr={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",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 0.866699 5.9313 0.866699H10.069C10.4004 0.866699 10.669 1.13533 10.669 1.4667C10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M1.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.64443C14.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:"M6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928L9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171C10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778L9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539C9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263L6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539C5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778L6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.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.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z",fillRule:"evenodd",clipRule:"evenodd"}}]},Ee=m.forwardRef(function(r,e){return m.createElement(X,Object.assign({},r,{id:"delete-icon",ref:e,icon:kr}))});Ee.displayName="DeleteIcon";var Pr={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 17 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"colorChannel1",d:"M1.98682 13.4992C1.98682 12.5603 2.74793 11.7992 3.68682 11.7992H14.2868C15.2257 11.7992 15.9868 12.5603 15.9868 13.4992V13.4992C15.9868 14.4381 15.2257 15.1992 14.2868 15.1992H3.68682C2.74793 15.1992 1.98682 14.4381 1.98682 13.4992V13.4992Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M10.3014 1.70389C9.85268 0.479568 8.12109 0.479557 7.67238 1.70389L4.72235 9.75326C4.60832 10.0644 4.76811 10.4091 5.07924 10.5231C5.39038 10.6371 5.73504 10.4773 5.84907 10.1662L6.99975 7.02646C7.03588 7.03324 7.07314 7.03679 7.11123 7.03679H10.9778L12.1247 10.1662C12.2387 10.4773 12.5834 10.6371 12.8945 10.5231C13.2057 10.4091 13.3654 10.0644 13.2514 9.75326L10.3014 1.70389ZM10.538 5.83679L9.17467 2.11682C9.11057 1.94192 8.8632 1.94192 8.7991 2.11682L7.43576 5.83679H10.538Z",fillRule:"evenodd",clipRule:"evenodd"}}]},ir=m.forwardRef(function(r,e){return m.createElement(X,Object.assign({},r,{id:"font-color-double-icon",ref:e,icon:Pr}))});ir.displayName="FontColorDoubleIcon";var Dr={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",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"}}]},sr=m.forwardRef(function(r,e){return m.createElement(X,Object.assign({},r,{id:"increase-icon",ref:e,icon:Dr}))});sr.displayName="IncreaseIcon";var Lr={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M9.80385 1.40005H11.9997C12.3311 1.40005 12.5997 1.66868 12.5997 2.00005C12.5997 2.33143 12.3311 2.60005 11.9997 2.60005H10.1185L7.12251 13.4001H9.33324C9.66461 13.4001 9.93324 13.6687 9.93324 14.0001C9.93324 14.3314 9.66461 14.6001 9.33324 14.6001H6.34785C6.33847 14.6003 6.32905 14.6003 6.31962 14.6001H3.9999C3.66853 14.6001 3.3999 14.3314 3.3999 14.0001C3.3999 13.6687 3.66853 13.4001 3.9999 13.4001H5.87719L8.87322 2.60005H6.66641C6.33504 2.60005 6.06641 2.33143 6.06641 2.00005C6.06641 1.66868 6.33504 1.40005 6.66641 1.40005H9.52916C9.61698 1.37929 9.71064 1.3781 9.80385 1.40005Z"}}]},cr=m.forwardRef(function(r,e){return m.createElement(X,Object.assign({},r,{id:"italic-icon",ref:e,icon:Lr}))});cr.displayName="ItalicIcon";var jr={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",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"}}]},Xe=m.forwardRef(function(r,e){return m.createElement(X,Object.assign({},r,{id:"more-down-icon",ref:e,icon:jr}))});Xe.displayName="MoreDownIcon";var Ar={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 17 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M8.01281 1.36643C8.79386 0.585377 10.0602 0.585378 10.8412 1.36643L12.9223 3.44752C13.7034 4.22857 13.7034 5.4949 12.9223 6.27595L9.36445 9.83383C8.5834 10.6149 7.31707 10.6149 6.53602 9.83383L4.45493 7.75273C3.67388 6.97168 3.67388 5.70535 4.45493 4.9243L8.01281 1.36643ZM9.9927 2.21495C9.68028 1.90253 9.17375 1.90253 8.86133 2.21495L5.30346 5.77283L5.29671 5.77966L10.839 6.66224L12.0738 5.42742C12.3862 5.115 12.3862 4.60847 12.0738 4.29605L9.9927 2.21495Z",fillRule:"evenodd",clipRule:"evenodd"}},{tag:"path",attrs:{fill:"currentColor",d:"M14.5179 9.48875C14.5179 9.99175 14.1101 10.3995 13.607 10.3995C13.1041 10.3995 12.6963 9.99175 12.6963 9.48875C12.6963 9.1773 13.0455 8.59966 13.3114 8.20487C13.4549 7.99177 13.7591 7.99177 13.9027 8.20486C14.1687 8.59965 14.5179 9.1773 14.5179 9.48875Z"}},{tag:"path",attrs:{fill:"colorChannel1",d:"M1.98682 13.4992C1.98682 12.5603 2.74793 11.7992 3.68682 11.7992H14.2868C15.2257 11.7992 15.9868 12.5603 15.9868 13.4992V13.4992C15.9868 14.4381 15.2257 15.1992 14.2868 15.1992H3.68682C2.74793 15.1992 1.98682 14.4381 1.98682 13.4992V13.4992Z"}}]},or=m.forwardRef(function(r,e){return m.createElement(X,Object.assign({},r,{id:"paint-bucket-double-icon",ref:e,icon:Ar}))});or.displayName="PaintBucketDoubleIcon";var Fr={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"mask",attrs:{id:"mask0_622_8",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 4C7 3.44772 6.55228 3 6 3C5.44772 3 5 3.44772 5 4C5 4.55228 5.44772 5 6 5Z"}},{tag:"path",attrs:{d:"M6 9C6.55228 9 7 8.55229 7 8C7 7.44772 6.55228 7 6 7C5.44772 7 5 7.44772 5 8C5 8.55229 5.44772 9 6 9Z"}},{tag:"path",attrs:{d:"M7 12C7 12.5523 6.55228 13 6 13C5.44772 13 5 12.5523 5 12C5 11.4477 5.44772 11 6 11C6.55228 11 7 11.4477 7 12Z"}},{tag:"path",attrs:{d:"M10 5C10.5523 5 11 4.55228 11 4C11 3.44772 10.5523 3 10 3C9.44771 3 9 3.44772 9 4C9 4.55228 9.44771 5 10 5Z"}},{tag:"path",attrs:{d:"M11 8C11 8.55229 10.5523 9 10 9C9.44771 9 9 8.55229 9 8C9 7.44772 9.44771 7 10 7C10.5523 7 11 7.44772 11 8Z"}},{tag:"path",attrs:{d:"M10 13C10.5523 13 11 12.5523 11 12C11 11.4477 10.5523 11 10 11C9.44771 11 9 11.4477 9 12C9 12.5523 9.44771 13 10 13Z"}}]}]},dr=m.forwardRef(function(r,e){return m.createElement(X,Object.assign({},r,{id:"sequence-icon",ref:e,icon:Fr}))});dr.displayName="SequenceIcon";var $r={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 17 17",width:"1em",height:"1em"},children:[{tag:"mask",attrs:{id:"mask0_436_41",width:17,height:17,x:0,y:0,maskUnits:"userSpaceOnUse"},children:[{tag:"path",attrs:{fill:"#D9D9D9",d:"M.35.48H16.35V16.48H.35z"}}]},{tag:"g",attrs:{mask:"url(#mask0_436_41)",fillRule:"evenodd",clipRule:"evenodd"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2.27177 13.714L13.5855 2.40025L14.434 3.24878L3.1203 14.5625L2.27177 13.714Z"}},{tag:"path",attrs:{fill:"#E5E5E5",d:"M4.2603 1.82495L2.89617 1.82495C2.23343 1.82495 1.69617 2.36221 1.69617 3.02495L1.69617 4.38908L3.02617 4.38908L3.02617 3.15495L4.2603 3.15495L4.2603 1.82495ZM15.0092 4.38908L15.0092 3.02495C15.0092 2.36221 14.4719 1.82495 13.8092 1.82495L12.4451 1.82495L12.4451 3.15495L13.6792 3.15495L13.6792 4.38908L15.0092 4.38908ZM6.98856 1.82495L6.98856 3.15495L9.71681 3.15495L9.71681 1.82495L6.98856 1.82495ZM15.0092 7.11734L13.6792 7.11734L13.6792 9.84559L15.0092 9.84559L15.0092 7.11734ZM15.0092 12.5739L13.6792 12.5739L13.6792 13.808L12.4451 13.808L12.4451 15.138L13.8092 15.138C14.4719 15.138 15.0092 14.6007 15.0092 13.938L15.0092 12.5739ZM9.71681 15.138L9.71681 13.808L6.98856 13.808L6.98856 15.138L9.71681 15.138ZM4.2603 15.138L4.2603 13.808L3.02617 13.808L3.02617 12.5739L1.69617 12.5739L1.69617 13.938C1.69617 14.6007 2.23343 15.138 2.89617 15.138L4.2603 15.138ZM1.69617 9.8456L3.02617 9.8456L3.02617 7.11734L1.69617 7.11734L1.69617 9.8456Z"}}]}]},he=m.forwardRef(function(r,e){return m.createElement(X,Object.assign({},r,{id:"slash-icon",ref:e,icon:$r}))});he.displayName="SlashIcon";var Hr={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M8.00033 1.20996C6.43345 1.20996 5.23596 1.88077 4.64804 2.94304C4.06338 3.99943 4.15123 5.32084 4.90099 6.47062C5.08199 6.7482 5.45374 6.82648 5.73131 6.64548C6.00888 6.46448 6.08716 6.09273 5.90616 5.81516C5.36418 4.98402 5.35768 4.13897 5.69797 3.52412C6.035 2.91515 6.78176 2.40996 8.00033 2.40996C9.19423 2.40996 10.0017 2.93409 10.5236 3.46755C10.7871 3.73682 10.9756 4.00712 11.0974 4.20903C11.158 4.30951 11.2013 4.39164 11.2284 4.44625C11.2419 4.47351 11.2514 4.49377 11.2568 4.50588L11.2621 4.51771C11.3901 4.82216 11.7407 4.96686 12.046 4.83992C12.3519 4.71267 12.4968 4.36149 12.3695 4.05552L11.8231 4.28278C12.3695 4.05552 12.3697 4.0558 12.3695 4.05552L12.3691 4.05437L12.3685 4.05298L12.367 4.04953L12.3629 4.03993L12.3498 4.01036C12.3388 3.98619 12.3234 3.95326 12.3033 3.91282C12.2632 3.83203 12.2043 3.72072 12.1249 3.58908C11.9666 3.32674 11.7235 2.97805 11.3814 2.62834C10.6921 1.92381 9.59192 1.20996 8.00033 1.20996Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M2.11953 8.5999H7.88935C10.1109 9.46549 10.5895 10.7649 10.4268 11.6869C10.2475 12.703 9.26939 13.5898 8.00009 13.5898C6.63323 13.5898 5.77631 13.0502 5.25534 12.528C4.99021 12.2623 4.80823 11.9965 4.69365 11.7993C4.63659 11.7011 4.59698 11.6211 4.5727 11.5686C4.56059 11.5424 4.55236 11.5231 4.54774 11.512L4.54352 11.5016C4.4267 11.193 4.0823 11.0363 3.77279 11.1516C3.46228 11.2673 3.30438 11.6129 3.4201 11.9234L3.9649 11.7203C3.4201 11.9234 3.41998 11.9231 3.4201 11.9234L3.4206 11.9247L3.42118 11.9263L3.42262 11.9301L3.42661 11.9403C3.42977 11.9484 3.43394 11.9588 3.43914 11.9713C3.44956 11.9965 3.46418 12.0304 3.48334 12.0719C3.52161 12.1547 3.57828 12.2682 3.65608 12.4021C3.81124 12.6692 4.0534 13.0223 4.40584 13.3756C5.12 14.0914 6.27196 14.7898 8.00009 14.7898C9.82574 14.7898 11.3236 13.5101 11.6085 11.8955C11.812 10.7422 11.3901 9.55402 10.2665 8.5999H13.8804C14.2117 8.5999 14.4803 8.33127 14.4803 7.9999C14.4803 7.66853 14.2117 7.3999 13.8804 7.3999H8.01411C8.0048 7.39968 7.99551 7.39969 7.98625 7.3999H2.11953C1.78816 7.3999 1.51953 7.66853 1.51953 7.9999C1.51953 8.33127 1.78816 8.5999 2.11953 8.5999Z"}}]},vr=m.forwardRef(function(r,e){return m.createElement(X,Object.assign({},r,{id:"strikethrough-icon",ref:e,icon:Hr}))});vr.displayName="StrikethroughIcon";var Br={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M4.46416 2.03237C4.46416 1.701 4.19553 1.43237 3.86416 1.43237C3.53279 1.43237 3.26416 1.701 3.26416 2.03237V7.33338C3.26416 10.0313 5.35834 12.2667 7.9999 12.2667C10.6415 12.2667 12.7356 10.0313 12.7356 7.33338V2.03237C12.7356 1.701 12.467 1.43237 12.1356 1.43237C11.8043 1.43237 11.5356 1.701 11.5356 2.03237V7.33338C11.5356 9.42194 9.92656 11.0667 7.9999 11.0667C6.07325 11.0667 4.46416 9.42194 4.46416 7.33338V2.03237Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M2.66641 13.4663C2.33504 13.4663 2.06641 13.7349 2.06641 14.0663C2.06641 14.3977 2.33504 14.6663 2.66641 14.6663H13.3331C13.6644 14.6663 13.9331 14.3977 13.9331 14.0663C13.9331 13.7349 13.6644 13.4663 13.3331 13.4663H2.66641Z"}}]},pr=m.forwardRef(function(r,e){return m.createElement(X,Object.assign({},r,{id:"underline-icon",ref:e,icon:Br}))});pr.displayName="UnderlineIcon";const te=r=>{const{color:e,onChange:l,disable:n=!1,Icon:a=or,className:u}=r,s=m.useMemo(()=>new i.ColorKit(e),[e]),v=()=>{const o={className:O.clsx("univer-fill-primary-600",n&&u),extend:{colorChannel1:s.isValid?e:""}};return c.jsx(a,{...o})};return n?v():c.jsx(O.Dropdown,{overlay:c.jsx("div",{className:"univer-rounded-lg univer-p-4",children:c.jsx(O.ColorPicker,{value:e,onChange:l})}),children:c.jsx("span",{className:O.clsx("univer-flex univer-cursor-pointer univer-items-center univer-rounded univer-p-1 hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-700",u),children:v()})})},ue=r=>{var u,s,v,o,f;const e=r.rule;if(!e)return null;const l=m.useMemo(()=>{if(e.type===t.CFRuleType.colorScale){const d=e.config.map((b,S)=>({color:new i.ColorKit(b.color),value:S})),p=d.length-1;return new Array(5).fill("").map((b,S,C)=>S*p/(C.length-1)).map(b=>t.getColorScaleFromValue(d,b))}return null},[e]),n=m.useMemo(()=>{if(e.type===t.CFRuleType.iconSet)return e.config.map(d=>{const p=t.iconMap[d.iconType];return p&&p[Number(d.iconId)]})},[e]),a="univer-pointer-events-none univer-flex univer-h-5 univer-min-w-[72px] univer-items-center univer-justify-center univer-text-xs";switch(e.type){case t.CFRuleType.dataBar:{const{isGradient:d}=e.config,p=d?`linear-gradient(to right, ${e.config.positiveColor||t.defaultDataBarPositiveColor}, rgb(255 255 255))`:e.config.positiveColor,h=d?`linear-gradient(to right, rgb(255 255 255),${e.config.nativeColor||t.defaultDataBarNativeColor})`:e.config.nativeColor;return c.jsxs("div",{className:a,children:[c.jsx("div",{className:"univer-h-full univer-w-1/2 univer-border univer-border-solid",style:{background:h,borderColor:(u=e.config.nativeColor)!=null?u:t.defaultDataBarNativeColor}}),c.jsx("div",{className:"univer-h-full univer-w-1/2 univer-border univer-border-solid",style:{background:p,borderColor:(s=e.config.positiveColor)!=null?s:t.defaultDataBarPositiveColor}})]})}case t.CFRuleType.colorScale:return l&&c.jsx("div",{className:a,children:l.map((d,p)=>c.jsx("div",{className:"univer-h-full",style:{width:`${100/l.length}%`,background:d}},p))});case t.CFRuleType.iconSet:return n&&c.jsx("div",{className:a,children:n.map((d,p)=>d?c.jsx("img",{className:"univer-h-full",src:d,draggable:!1},p):c.jsx(he,{},p))});case t.CFRuleType.highlightCell:{const{ul:d,st:p,it:h,bl:b,bg:S,cl:C}=e.style,N=(d==null?void 0:d.s)===i.BooleanNumber.TRUE,_=(p==null?void 0:p.s)===i.BooleanNumber.TRUE,E=h===i.BooleanNumber.TRUE,M=b===i.BooleanNumber.TRUE,R=(v=S==null?void 0:S.rgb)!=null?v:t.DEFAULT_BG_COLOR,g=(o=C==null?void 0:C.rgb)!=null?o:t.DEFAULT_FONT_COLOR,T={textDecoration:(f=`${N?"underline":""} ${_?"line-through":""}`.replace(/^ /,""))!=null?f:void 0,backgroundColor:R,color:g};return c.jsx("div",{className:O.clsx(a,{"univer-font-bold":M,"univer-italic":E}),style:T,children:"123"})}}},ge=O.clsx("univer-mt-5 univer-px-1 univer-py-2 univer-rounded",O.borderClassName),ne=(r,e)=>({label:e.t(`sheet.cf.valueType.${r}`),value:r}),Je=r=>{var S;const{type:e,className:l,onChange:n,id:a,value:u}=r,s=j.useDependency(i.IUniverInstanceService),v=s.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET).getUnitId(),o=(S=s.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET).getActiveSheet())==null?void 0:S.getSheetId(),f=m.useMemo(()=>String(u).startsWith("=")?String(u):"=",[u]),d=m.useMemo(()=>[t.CFValueType.max,t.CFValueType.min,"none"].includes(e)?{disabled:!0}:[t.CFValueType.percent,t.CFValueType.percentile].includes(e)?{min:0,max:100}:{min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER},[e]),p=m.useRef(null),[h,b]=m.useState(!1);return j.useSidebarClick(C=>{var _;((_=p.current)==null?void 0:_.isClickOutSide(C))&&b(!1)}),e===t.CFValueType.formula?c.jsx("div",{className:"univer-ml-1 univer-w-full",children:c.jsx(pe.FormulaEditor,{ref:p,className:O.clsx("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent",O.borderClassName),initValue:f,unitId:v,subUnitId:o,isFocus:h,onChange:(C="")=>{n(C||"")},onFocus:()=>b(!0)})}):c.jsx(O.InputNumber,{className:l,value:Number(r.value)||0,onChange:C=>r.onChange(C||0),...d})},Wr=r=>{var L;const{interceptorManager:e}=r,l=j.useDependency(i.LocaleService),n=((L=r.rule)==null?void 0:L.type)===t.CFRuleType.colorScale?r.rule:void 0,a=[ne(t.CFValueType.num,l),ne(t.CFValueType.percent,l),ne(t.CFValueType.percentile,l),ne(t.CFValueType.formula,l)],u=[ne(t.CFValueType.min,l),...a],s=[ne("none",l),...a],v=[ne(t.CFValueType.max,l),...a],[o,f]=m.useState(()=>{var x;const y=t.CFValueType.min;return n&&((x=n.config[0])==null?void 0:x.value.type)||y}),[d,p]=m.useState(()=>{var x;const y="none";return!n||n.config.length!==3?y:((x=n.config[1])==null?void 0:x.value.type)||y}),[h,b]=m.useState(()=>{var x;const y=t.CFValueType.max;return n&&((x=n.config[n.config.length-1])==null?void 0:x.value.type)||y}),[S,C]=m.useState(()=>{if(!n)return 10;const x=n.config[0];return(x==null?void 0:x.value.value)===void 0?10:x==null?void 0:x.value.value}),[N,_]=m.useState(()=>{var F;if(!n||n.config.length!==3)return 50;const x=(F=n.config[1])==null?void 0:F.value.value;return x===void 0?50:x}),[E,M]=m.useState(()=>{var F;if(!n)return 90;const x=(F=n.config[n.config.length-1])==null?void 0:F.value.value;return x===void 0?90:x}),[R,g]=m.useState(()=>{var x;const y="#d0d9fb";return n&&((x=n.config[0])==null?void 0:x.color)||y}),[T,w]=m.useState(()=>{var x;const y="#7790f3";return!n||n.config.length!==3?y:((x=n.config[1])==null?void 0:x.color)||y}),[I,k]=m.useState(()=>{var x;const y="#2e55ef";return n&&((x=n.config[n.config.length-1])==null?void 0:x.color)||y}),V=m.useMemo(()=>y=>{const{minType:x,medianType:F,maxType:G,minValue:Q,medianValue:ee,maxValue:de,minColor:ve,medianColor:A,maxColor:$}=y,B=[];return B.push({color:ve,value:{type:x,value:Q}}),F!=="none"&&B.push({color:A,value:{type:F,value:ee}}),B.push({color:$,value:{type:G,value:de}}),{config:B.map((Z,z)=>({...Z,index:z})),type:t.CFRuleType.colorScale}},[]);m.useEffect(()=>e.intercept(e.getInterceptPoints().submit,{handler(){return V({minType:o,medianType:d,maxType:h,minValue:S,medianValue:N,maxValue:E,minColor:R,medianColor:T,maxColor:I})}}),[V,o,d,h,S,N,E,R,T,I,e]);const P=y=>{r.onChange(V(y))};return c.jsxs("div",{children:[c.jsx("div",{className:"univer-mt-4 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",children:l.t("sheet.cf.panel.styleRule")}),c.jsx("div",{className:ge,children:c.jsx(ue,{rule:V({minType:o,medianType:d,maxType:h,minValue:S,medianValue:N,maxValue:E,minColor:R,medianColor:T,maxColor:I})})}),c.jsx("div",{className:"univer-mt-3 univer-text-xs univer-text-gray-600 dark:!univer-text-gray-200",children:l.t("sheet.cf.valueType.min")}),c.jsxs("div",{className:"univer-mt-3 univer-flex univer-h-8 univer-items-center",children:[c.jsx(O.Select,{className:"univer-flex-shrink-0",options:u,value:o,onChange:y=>{f(y);const x=t.createDefaultValueByValueType(y,10);C(x),P({minType:y,medianType:d,maxType:h,minValue:x,medianValue:N,maxValue:E,minColor:R,medianColor:T,maxColor:I})}}),c.jsx(Je,{id:"min",className:"univer-ml-1",value:S,type:o,onChange:y=>{C(y),P({minType:o,medianType:d,maxType:h,minValue:y,medianValue:N,maxValue:E,minColor:R,medianColor:T,maxColor:I})}}),c.jsx(te,{className:"univer-ml-1",color:R,onChange:y=>{g(y),P({minType:o,medianType:d,maxType:h,minValue:S,medianValue:N,maxValue:E,minColor:y,medianColor:T,maxColor:I})}})]}),c.jsx("div",{className:"univer-text-gray-600dark:!univer-text-gray-200 univer-mt-3 univer-text-xs",children:l.t("sheet.cf.panel.medianValue")}),c.jsxs("div",{className:"univer-mt-3 univer-flex univer-h-8 univer-items-center",children:[c.jsx(O.Select,{className:"univer-flex-shrink-0",options:s,value:d,onChange:y=>{p(y);const x=t.createDefaultValueByValueType(y,50);_(x),P({minType:o,medianType:y,maxType:h,minValue:S,medianValue:x,maxValue:E,minColor:R,medianColor:T,maxColor:I})}}),c.jsx(Je,{id:"median",className:"univer-ml-1",value:N,type:d,onChange:y=>{_(y),P({minType:o,medianType:d,maxType:h,minValue:S,medianValue:y,maxValue:E,minColor:R,medianColor:T,maxColor:I})}}),d!=="none"&&c.jsx(te,{className:"univer-ml-1",color:T,onChange:y=>{w(y),P({minType:o,medianType:d,maxType:h,minValue:S,medianValue:N,maxValue:E,minColor:R,medianColor:y,maxColor:I})}})]}),c.jsx("div",{className:"univer-mt-3 univer-text-xs univer-text-gray-600 dark:!univer-text-gray-200",children:l.t("sheet.cf.valueType.max")}),c.jsxs("div",{className:"univer-mt-3 univer-flex univer-h-8 univer-items-center",children:[c.jsx(O.Select,{className:"univer-flex-shrink-0",options:v,value:h,onChange:y=>{b(y);const x=t.createDefaultValueByValueType(y,90);M(x),P({minType:o,medianType:d,maxType:y,minValue:S,medianValue:N,maxValue:x,minColor:R,medianColor:T,maxColor:I})}}),c.jsx(Je,{id:"max",className:"univer-ml-1",value:E,type:h,onChange:y=>{M(y),P({minType:o,medianType:d,maxType:h,minValue:S,medianValue:N,maxValue:y,minColor:R,medianColor:T,maxColor:I})}}),c.jsx(te,{className:"univer-ml-1",color:I,onChange:y=>{k(y),P({minType:o,medianType:d,maxType:h,minValue:S,medianValue:N,maxValue:E,minColor:R,medianColor:T,maxColor:y})}})]})]})},ie=(r,e)=>({label:e.t(`sheet.cf.valueType.${r}`),value:r}),fr=r=>{var C;const{onChange:e,className:l,value:n,type:a,id:u,disabled:s=!1}=r,v=j.useDependency(i.IUniverInstanceService),o=v.getCurrentUnitOfType(i.UniverInstanceType.UNIVER_SHEET).getUnitId(),f=(C=v.getCurrentUnitOfType(i.UniverInstanceType.UNIVER_SHEET).getActiveSheet())==null?void 0:C.getSheetId(),d=m.useRef(null),[p,h]=m.useState(!1);j.useSidebarClick(N=>{var E;((E=d.current)==null?void 0:E.isClickOutSide(N))&&h(!1)});const b=m.useRef(n),S=m.useMemo(()=>[t.CFValueType.percentile,t.CFValueType.percent].includes(a)?{max:100,min:0}:{min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER},[a]);if(a===t.CFValueType.formula){const N=String(b.current).startsWith("=")?String(b.current)||"":"=";return c.jsx("div",{className:"univer-ml-3 univer-w-full",children:c.jsx(pe.FormulaEditor,{ref:d,className:O.clsx("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent",O.borderClassName),initValue:N,unitId:o,subUnitId:f,isFocus:p,onChange:(_="")=>{e(_||"")},onFocus:()=>h(!0)})})}return c.jsx(O.InputNumber,{className:l,value:Number(n)||0,disabled:s,onChange:N=>{e(N||0)},...S})},qr=r=>{var L;const{interceptorManager:e}=r,l=j.useDependency(i.LocaleService),n=((L=r.rule)==null?void 0:L.type)===t.CFRuleType.dataBar?r.rule:void 0,[a,u]=m.useState(()=>{var x;return n&&(x=n.config)!=null&&x.isGradient?"1":"0"}),[s,v]=m.useState(()=>{var y;return n&&((y=n.config)==null?void 0:y.positiveColor)||t.defaultDataBarPositiveColor}),[o,f]=m.useState(()=>{var y;return n&&((y=n.config)==null?void 0:y.nativeColor)||t.defaultDataBarNativeColor}),d=[ie(t.CFValueType.num,l),ie(t.CFValueType.percent,l),ie(t.CFValueType.percentile,l),ie(t.CFValueType.formula,l)],p=[ie(t.CFValueType.min,l),...d],h=[ie(t.CFValueType.max,l),...d],[b,S]=m.useState(()=>{var x;const y=p[0].value;return n&&((x=n.config)==null?void 0:x.min.type)||y}),[C,N]=m.useState(()=>{var x;const y=h[0].value;return n&&((x=n.config)==null?void 0:x.max.type)||y}),[_,E]=m.useState(()=>{var F;if(!n)return 0;const x=((F=n.config)==null?void 0:F.min)||{};return x.type===t.CFValueType.formula?x.value||"=":x.value||0}),[M,R]=m.useState(()=>{var F;if(!n)return 100;const x=((F=n.config)==null?void 0:F.max)||{};return x.type===t.CFValueType.formula?x.value||"=":x.value===void 0?100:x.value}),[g,T]=m.useState(()=>n?n.isShowValue===void 0?!0:!!n.isShowValue:!0),w=y=>({config:{min:{type:y.minValueType,value:y.minValue},max:{type:y.maxValueType,value:y.maxValue},isGradient:y.isGradient==="1",positiveColor:y.positiveColor||t.defaultDataBarPositiveColor,nativeColor:y.nativeColor||t.defaultDataBarNativeColor},type:t.CFRuleType.dataBar,isShowValue:y.isShowValue});m.useEffect(()=>e.intercept(e.getInterceptPoints().submit,{handler(){return w({isGradient:a,minValue:_,minValueType:b,maxValue:M,maxValueType:C,positiveColor:s,nativeColor:o,isShowValue:g})}}),[a,_,b,M,C,s,o,e,g]);const I=y=>{r.onChange(w(y))},k=y=>{v(y),I({isGradient:a,minValue:_,minValueType:b,maxValue:M,maxValueType:C,positiveColor:y,nativeColor:o,isShowValue:g})},V=y=>{f(y),I({isGradient:a,minValue:_,minValueType:b,maxValue:M,maxValueType:C,positiveColor:s,nativeColor:y,isShowValue:g})},P=y=>d.map(x=>x.value).includes(y);return c.jsxs("div",{children:[c.jsx("div",{className:"univer-mt-4 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",children:l.t("sheet.cf.panel.styleRule")}),c.jsx("div",{className:ge,children:c.jsx(ue,{rule:w({isGradient:a,minValue:_,minValueType:b,maxValue:M,maxValueType:C,positiveColor:s,nativeColor:o,isShowValue:g})})}),c.jsxs("div",{children:[c.jsx("div",{className:"univer-mt-3 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",children:l.t("sheet.cf.panel.fillType")}),c.jsxs("div",{className:"univer-ml-1 univer-mt-3 univer-flex univer-items-center",children:[c.jsxs(O.RadioGroup,{value:a,onChange:y=>{u(y),I({isGradient:y,minValue:_,minValueType:b,maxValue:M,maxValueType:C,positiveColor:s,nativeColor:o,isShowValue:g})},children:[c.jsx(O.Radio,{value:"0",children:c.jsx("span",{className:"univer-text-xs",children:l.t("sheet.cf.panel.pureColor")})}),c.jsx(O.Radio,{value:"1",children:c.jsx("span",{className:"univer-text-xs",children:l.t("sheet.cf.panel.gradient")})})]}),c.jsxs("div",{className:"univer-ml-6 univer-flex univer-items-center univer-text-xs",children:[c.jsx(O.Checkbox,{checked:!g,onChange:y=>{T(!y),I({isGradient:y,minValue:_,minValueType:b,maxValue:M,maxValueType:C,positiveColor:s,nativeColor:o,isShowValue:!y})}}),l.t("sheet.cf.panel.onlyShowDataBar")]})]})]}),c.jsxs("div",{children:[c.jsx("div",{className:"univer-mt-3 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",children:l.t("sheet.cf.panel.colorSet")}),c.jsxs("div",{className:"univer-ml-1 univer-mt-3 univer-flex univer-items-center",children:[c.jsxs("div",{className:"univer-flex univer-items-center",children:[c.jsx("div",{className:"univer-text-xs",children:l.t("sheet.cf.panel.native")}),c.jsx(te,{color:o,onChange:V})]}),c.jsxs("div",{className:"univer-ml-3 univer-flex univer-items-center",children:[c.jsx("div",{className:"univer-text-xs",children:l.t("sheet.cf.panel.positive")}),c.jsx(te,{color:s,onChange:k})]})]})]}),c.jsxs("div",{children:[c.jsx("div",{className:"univer-mt-3 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",children:l.t("sheet.cf.valueType.min")}),c.jsxs("div",{className:"univer-mt-3 univer-flex univer-items-center",children:[c.jsx(O.Select,{className:"univer-w-1/2 univer-flex-shrink-0",options:p,value:b,onChange:y=>{S(y);const x=t.createDefaultValueByValueType(y,10);E(x),I({isGradient:a,minValue:x,minValueType:y,maxValue:M,maxValueType:C,positiveColor:s,nativeColor:o,isShowValue:g})}}),c.jsx(fr,{id:"min",className:"univer-ml-3",disabled:!P(b),type:b,value:_,onChange:y=>{E(y||0),I({isGradient:a,minValue:y||0,minValueType:b,maxValue:M,maxValueType:C,positiveColor:s,nativeColor:o,isShowValue:g})}})]}),c.jsx("div",{className:"univer-mt-3 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",children:l.t("sheet.cf.valueType.max")}),c.jsxs("div",{className:"univer-mt-3 univer-flex univer-items-center",children:[c.jsx(O.Select,{className:"univer-w-1/2 univer-flex-shrink-0",options:h,value:C,onChange:y=>{N(y);const x=t.createDefaultValueByValueType(y,90);R(x),I({isGradient:a,minValue:_,minValueType:b,maxValue:x,maxValueType:y,positiveColor:s,nativeColor:o,isShowValue:g})}}),c.jsx(fr,{className:"univer-ml-3",disabled:!P(C),id:"max",type:C,value:M,onChange:y=>{R(y||0),I({isGradient:a,minValue:_,minValueType:b,maxValue:y||0,maxValueType:C,positiveColor:s,nativeColor:o,isShowValue:g})}})]})]})]})},Re=r=>[i.BooleanNumber.FALSE,void 0].includes(r)?i.BooleanNumber.TRUE:i.BooleanNumber.FALSE,Me=r=>r!==i.BooleanNumber.FALSE,Qe=r=>{const{style:e,onChange:l,className:n}=r,[a,u]=m.useState(()=>{if(e!=null&&e.bl)return e.bl}),[s,v]=m.useState(()=>{if(e!=null&&e.it)return e.it}),[o,f]=m.useState(()=>{if(e!=null&&e.ul)return e.ul.s}),[d,p]=m.useState(()=>{if(e!=null&&e.st)return e.st.s}),[h,b]=m.useState(()=>{var E;const _="#2f56ef";return(E=e==null?void 0:e.cl)!=null&&E.rgb?e.cl.rgb:_}),[S,C]=m.useState(()=>{var E;const _="#e8ecfc";return(E=e==null?void 0:e.bg)!=null&&E.rgb?e.bg.rgb:_});m.useEffect(()=>{const _={bl:a,it:s};h!==void 0&&(_.cl={rgb:h}),S!==void 0&&(_.bg={rgb:S}),d!==void 0&&(_.st={s:d}),o!==void 0&&(_.ul={s:o}),l(t.removeUndefinedAttr(_))},[a,s,o,d,h,S]);const N="univer-flex univer-cursor-pointer univer-items-center univer-rounded univer-px-1";return c.jsxs("div",{className:O.clsx("univer-my-2.5 univer-flex univer-justify-between",n),children:[c.jsx("div",{className:O.clsx(N,{"univer-bg-gray-100 dark:!univer-bg-gray-700":Me(a||i.BooleanNumber.FALSE)}),onClick:()=>u(Re(a)),children:c.jsx(ur,{})}),c.jsx("div",{className:O.clsx(N,{"univer-bg-gray-100 dark:!univer-bg-gray-700":Me(s||i.BooleanNumber.FALSE)}),onClick:()=>v(Re(s)),children:c.jsx(cr,{})}),c.jsx("div",{className:O.clsx(N,{"univer-bg-gray-100 dark:!univer-bg-gray-700":Me(o||i.BooleanNumber.FALSE)}),onClick:()=>f(Re(o)),children:c.jsx(pr,{})}),c.jsx("div",{className:O.clsx(N,{"univer-bg-gray-100 dark:!univer-bg-gray-700":Me(d||i.BooleanNumber.FALSE)}),onClick:()=>p(Re(d)),children:c.jsx(vr,{})}),c.jsx(te,{color:h,onChange:b,Icon:ir}),c.jsx(te,{color:S,onChange:C})]})},Gr=r=>{var R;const{onChange:e,interceptorManager:l}=r,n=j.useDependency(i.LocaleService),u=j.useDependency(i.IUniverInstanceService).getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET),s=u.getActiveSheet(),v=((R=r.rule)==null?void 0:R.type)===t.CFRuleType.highlightCell?r.rule:void 0,o=m.useRef(null),[f,d]=m.useState(!1),p=m.useRef(null),[h,b]=m.useState({}),[S,C]=m.useState(()=>(v==null?void 0:v.subType)===t.CFSubRuleType.formula?v.value:"="),[N,_]=m.useState(void 0),E=g=>({style:g.style,value:S,type:t.CFRuleType.highlightCell,subType:t.CFSubRuleType.formula});m.useEffect(()=>l.intercept(l.getInterceptPoints().submit,{handler(){return E({style:h})}}),[h,S,l]),m.useEffect(()=>l.intercept(l.getInterceptPoints().beforeSubmit,{handler:(T,w,I)=>N||S.length===1||!S.startsWith("=")?(_(n.t("sheet.cf.errorMessage.formulaError")),!1):I(T)}),[N,S]);const M=g=>{e(E(g))};return j.useSidebarClick(g=>{var w;((w=p.current)==null?void 0:w.isClickOutSide(g))&&d(!1)}),c.jsxs("div",{ref:o,children:[c.jsx("div",{className:"univer-mt-4 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",children:n.t("sheet.cf.panel.styleRule")}),c.jsx("div",{className:"univer-mt-3",children:c.jsx(pe.FormulaEditor,{ref:p,className:O.clsx("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent",O.borderClassName),errorText:N,isFocus:f,initValue:S,unitId:u.getUnitId(),subUnitId:s==null?void 0:s.getSheetId(),onFocus:()=>{d(!0)},onChange:g=>{C(g),M({style:h})},onVerify:(g,T)=>{!g||T.length===1?_(n.t("sheet.cf.errorMessage.formulaError")):_(void 0)}})}),c.jsx("div",{className:ge,children:c.jsx(ue,{rule:E({style:h})})}),c.jsx(Qe,{style:v==null?void 0:v.style,className:"univer-mt-3",onChange:g=>{b(g),M({style:g})}})]})},Ve=r=>c.jsxs("div",{className:"univer-relative",children:[c.jsx("div",{className:"univer-absolute univer-bottom-[-13px] univer-z-[999] univer-text-[10px] univer-text-red-500",children:r.errorText}),r.children]}),H=(r,e)=>({label:e.t(`sheet.cf.operator.${r}`),value:r}),Zr=r=>{const{type:e,operator:l,onChange:n,value:a,interceptorManager:u}=r,s=j.useDependency(i.LocaleService),[v,o]=m.useState(()=>typeof a=="number"?a:0),[f,d]=m.useState(""),[p,h]=m.useState(()=>typeof a=="string"?a:""),[b,S]=m.useState(""),[C,N]=m.useState(()=>Array.isArray(a)?a[0]===void 0?0:a[0]:0),[_,E]=m.useState(""),[M,R]=m.useState(()=>Array.isArray(a)?a[1]===void 0?100:a[1]:100),[g,T]=m.useState("");switch(m.useEffect(()=>{switch(e){case t.CFSubRuleType.text:{[t.CFTextOperator.beginsWith,t.CFTextOperator.endsWith,t.CFTextOperator.containsText,t.CFTextOperator.notContainsText,t.CFTextOperator.equal,t.CFTextOperator.notEqual].includes(l)&&n(p);break}case t.CFSubRuleType.number:{[t.CFNumberOperator.equal,t.CFNumberOperator.notEqual,t.CFNumberOperator.greaterThan,t.CFNumberOperator.greaterThanOrEqual,t.CFNumberOperator.lessThan,t.CFNumberOperator.lessThanOrEqual].includes(l)&&n(v),[t.CFNumberOperator.between,t.CFNumberOperator.notBetween].includes(l)&&n([C,M]);break}}},[e]),m.useEffect(()=>{const w=u.intercept(u.getInterceptPoints().beforeSubmit,{handler:(I,k,V)=>{switch(e){case t.CFSubRuleType.text:if([t.CFTextOperator.beginsWith,t.CFTextOperator.containsText,t.CFTextOperator.endsWith,t.CFTextOperator.notEqual,t.CFTextOperator.notContainsText,t.CFTextOperator.equal].includes(l))return p?V(I):(S(s.t("sheet.cf.errorMessage.notBlank")),!1)}return V(I)}});return()=>{w()}},[e,v,p,l]),e){case t.CFSubRuleType.text:{if([t.CFTextOperator.beginsWith,t.CFTextOperator.endsWith,t.CFTextOperator.containsText,t.CFTextOperator.notContainsText,t.CFTextOperator.equal,t.CFTextOperator.notEqual].includes(l)){const w=I=>{h(I),n(I)};return c.jsx("div",{className:"univer-mt-3",children:c.jsx(Ve,{errorText:b,children:c.jsx(O.Input,{value:p,onChange:I=>{S(""),w(I)}})})})}break}case t.CFSubRuleType.number:{if([t.CFNumberOperator.equal,t.CFNumberOperator.notEqual,t.CFNumberOperator.greaterThan,t.CFNumberOperator.greaterThanOrEqual,t.CFNumberOperator.lessThan,t.CFNumberOperator.lessThanOrEqual].includes(l)){const w=I=>{o(I||0),n(I||0),d("")};return c.jsx("div",{className:"univer-mt-3",children:c.jsx(Ve,{errorText:f,children:c.jsx(O.InputNumber,{className:"univer-w-full",min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,value:v,onChange:w})})})}if([t.CFNumberOperator.between,t.CFNumberOperator.notBetween].includes(l)){const w=k=>{N(k||0),n([k||0,M]),E("")},I=k=>{R(k||0),n([C,k||0]),T("")};return c.jsxs("div",{className:"univer-mt-3 univer-flex univer-items-center",children:[c.jsx(Ve,{errorText:_,children:c.jsx(O.InputNumber,{min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,value:C,onChange:w})}),c.jsx(Ve,{errorText:g,children:c.jsx(O.InputNumber,{className:"univer-ml-3",min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,value:M,onChange:I})})]})}}}return null},hr=(r,e)=>{switch(r){case t.CFSubRuleType.text:return[H(t.CFTextOperator.containsText,e),H(t.CFTextOperator.notContainsText,e),H(t.CFTextOperator.beginsWith,e),H(t.CFTextOperator.endsWith,e),H(t.CFTextOperator.equal,e),H(t.CFTextOperator.notEqual,e),H(t.CFTextOperator.containsBlanks,e),H(t.CFTextOperator.notContainsBlanks,e),H(t.CFTextOperator.containsErrors,e),H(t.CFTextOperator.notContainsErrors,e)];case t.CFSubRuleType.number:return[H(t.CFNumberOperator.between,e),H(t.CFNumberOperator.notBetween,e),H(t.CFNumberOperator.equal,e),H(t.CFNumberOperator.notEqual,e),H(t.CFNumberOperator.greaterThan,e),H(t.CFNumberOperator.greaterThanOrEqual,e),H(t.CFNumberOperator.lessThan,e),H(t.CFNumberOperator.lessThanOrEqual,e)];case t.CFSubRuleType.timePeriod:return[H(t.CFTimePeriodOperator.yesterday,e),H(t.CFTimePeriodOperator.today,e),H(t.CFTimePeriodOperator.tomorrow,e),H(t.CFTimePeriodOperator.last7Days,e),H(t.CFTimePeriodOperator.lastWeek,e),H(t.CFTimePeriodOperator.thisWeek,e),H(t.CFTimePeriodOperator.nextWeek,e),H(t.CFTimePeriodOperator.lastMonth,e),H(t.CFTimePeriodOperator.thisMonth,e),H(t.CFTimePeriodOperator.nextMonth,e)]}},gr=r=>{var R;const{interceptorManager:e,onChange:l}=r,n=j.useDependency(i.LocaleService),a=((R=r.rule)==null?void 0:R.type)===t.CFRuleType.highlightCell?r.rule:void 0,[u,s]=m.useState(()=>{const g=t.CFSubRuleType.text;return a&&a.subType||g}),v=[{value:t.CFSubRuleType.text,label:n.t("sheet.cf.subRuleType.text")},{value:t.CFSubRuleType.number,label:n.t("sheet.cf.subRuleType.number")},{value:t.CFSubRuleType.timePeriod,label:n.t("sheet.cf.subRuleType.timePeriod")},{value:t.CFSubRuleType.duplicateValues,label:n.t("sheet.cf.subRuleType.duplicateValues")},{value:t.CFSubRuleType.uniqueValues,label:n.t("sheet.cf.subRuleType.uniqueValues")}],o=m.useMemo(()=>hr(u,n),[u]),[f,d]=m.useState(()=>{const g=o?o[0].value:void 0;return a&&a.operator||g}),[p,h]=m.useState(()=>{var w;return a?(w=a.value)!=null?w:t.createDefaultValue(a.subType,a.operator):""}),[b,S]=m.useState({}),C=m.useMemo(()=>g=>{var T,w,I,k,V,P,L,y,x,F,G,Q,ee,de,ve;switch(g.subType||u){case t.CFSubRuleType.text:{if([t.CFTextOperator.beginsWith,t.CFTextOperator.endsWith,t.CFTextOperator.containsText,t.CFTextOperator.notContainsText,t.CFTextOperator.equal,t.CFTextOperator.notEqual].includes(f))return{type:t.CFRuleType.highlightCell,subType:(T=g.subType)!=null?T:u,operator:(w=g.operator)!=null?w:f,style:(I=g.style)!=null?I:b,value:(k=g.value)!=null?k:p};break}case t.CFSubRuleType.number:{if([t.CFNumberOperator.equal,t.CFNumberOperator.notEqual,t.CFNumberOperator.greaterThan,t.CFNumberOperator.greaterThanOrEqual,t.CFNumberOperator.lessThan,t.CFNumberOperator.lessThanOrEqual].includes(f))return{type:t.CFRuleType.highlightCell,subType:(V=g.subType)!=null?V:u,operator:(P=g.operator)!=null?P:f,style:(L=g.style)!=null?L:b,value:(y=g.value)!=null?y:p};if([t.CFNumberOperator.between,t.CFNumberOperator.notBetween].includes(f))return{type:t.CFRuleType.highlightCell,subType:(x=g.subType)!=null?x:u,operator:(F=g.operator)!=null?F:f,style:(G=g.style)!=null?G:b,value:(Q=g.value)!=null?Q:p};break}}return{type:t.CFRuleType.highlightCell,subType:(ee=g.subType)!=null?ee:u,operator:(de=g.operator)!=null?de:f,style:(ve=g.style)!=null?ve:b}},[u,f,p,b]);m.useEffect(()=>e.intercept(e.getInterceptPoints().submit,{handler(){return C({})}}),[C,e]),m.useEffect(()=>{v.some(g=>g.value===u)||s(v[0].value)},[v]);const N=g=>{const T=g,w=hr(T,n),I=w&&w[0].value;s(T),d(I),I&&h(t.createDefaultValue(T,I)),l(C({subType:T,operator:I}))},_=g=>{const T=g;d(T),l(C({operator:T}))},E=g=>{h(g),l(C({value:g}))},M=m.useMemo(()=>`${u}_${f}_${Math.random()}`,[u,f]);return c.jsxs("div",{children:[c.jsx("div",{className:"univer-mt-4 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",children:n.t("sheet.cf.panel.styleRule")}),c.jsxs("div",{className:"univer-flex univer-justify-between univer-gap-4",children:[c.jsx(O.Select,{className:"univer-mt-3 univer-w-full",onChange:N,value:u,options:v}),(o==null?void 0:o.length)&&c.jsx(O.Select,{className:"univer-mt-3 univer-w-full",onChange:_,value:f||"",options:o})]}),c.jsx(Zr,{value:p,interceptorManager:e,type:u,operator:f,rule:a,onChange:E},M),c.jsx("div",{className:ge,children:c.jsx(ue,{rule:C({})})}),c.jsx(Qe,{style:a==null?void 0:a.style,className:"univer-ml-1",onChange:g=>{S(g),l(C({style:g}))}})]})},yr=(r,e)=>(t.iconMap[r]||[])[Number(e)]||"",zr=r=>{var d;const{error:e,type:l,onChange:n}=r,a=j.useDependency(i.IUniverInstanceService),u=a.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET).getUnitId(),s=(d=a.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET).getActiveSheet())==null?void 0:d.getSheetId(),v=m.useRef(null),[o,f]=m.useState(!1);return j.useSidebarClick(p=>{var b;((b=v.current)==null?void 0:b.isClickOutSide(p))&&f(!1)}),c.jsx("div",{className:"univer-relative",children:l!==t.CFValueType.formula?c.jsxs(c.Fragment,{children:[c.jsx(O.InputNumber,{className:O.clsx({"univer-border-red-500":e}),value:Number(r.value)||0,onChange:p=>n(p!=null?p:0)}),e&&c.jsx("div",{className:"univer-absolute univer-text-xs univer-text-red-500",children:e})]}):c.jsx("div",{className:"univer-w-full",children:c.jsx(pe.FormulaEditor,{ref:v,className:O.clsx("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent",O.borderClassName),initValue:String(r.value),unitId:u,subUnitId:s,isFocus:o,onChange:(p="")=>{n(p||"")},onFocus:()=>f(!0)})})})},mr=(r,e,l)=>({operator:t.CFNumberOperator.greaterThan,value:{type:t.CFValueType.num,value:(l.length-1-e)*10},iconType:r,iconId:String(e)}),Yr=m.forwardRef((r,e)=>{const{onClick:l}=r,n=j.useDependency(i.LocaleService),a=u=>{l(u)};return c.jsx("div",{ref:e,className:"univer-w-80",children:t.iconGroup.map((u,s)=>c.jsxs("div",{className:"univer-mb-3",children:[c.jsx("div",{className:"univer-mb-1 univer-text-sm",children:n.t(u.title)}),c.jsx("div",{className:"univer-flex univer-flex-wrap",children:u.group.map(v=>c.jsx("div",{className:"univer-mb-1 univer-flex univer-w-1/2 univer-items-center",onClick:()=>{a(v.name)},children:c.jsx("a",{className:"univer-cursor-pointer univer-rounded hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-700",children:v.list.map((o,f)=>c.jsx("img",{className:"univer-size-5",src:o,draggable:!1},f))})},v.name))})]},s))})}),Kr=r=>{const{onClick:e}=r,l=m.useMemo(()=>{const a=[];for(const u in t.iconMap){const s=t.iconMap[u],v=u;s.forEach((o,f)=>{a.push({iconType:v,base64:o,iconId:String(f)})})}return a},[]),n=a=>{e(a.iconType,a.iconId)};return c.jsxs("div",{children:[c.jsxs("div",{className:"univer-mb-2.5 univer-flex univer-cursor-pointer univer-items-center univer-pl-1",onClick:()=>n({iconType:t.EMPTY_ICON_TYPE,iconId:""}),children:[c.jsx(he,{className:"univer-size-5"}),c.jsx("span",{className:"univer-ml-2",children:"无单元格图标"})]}),c.jsx("div",{className:"univer-flex univer-w-64 univer-flex-wrap",children:l.map(a=>c.jsx("div",{className:"univer-mb-2 univer-mr-2 univer-flex univer-cursor-pointer univer-items-center univer-justify-center univer-rounded hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-700",children:c.jsx("img",{className:"univer-size-5",src:a.base64,draggable:!1,onClick:()=>n(a)})},`${a.iconType}_${a.iconId}`))})]})},Xr=r=>{const{onChange:e,configList:l,errorMap:n={}}=r,a=j.useDependency(i.LocaleService),u=[{label:a.t(`sheet.cf.symbol.${t.CFNumberOperator.greaterThan}`),value:t.CFNumberOperator.greaterThan},{label:a.t(`sheet.cf.symbol.${t.CFNumberOperator.greaterThanOrEqual}`),value:t.CFNumberOperator.greaterThanOrEqual}],s=[{label:a.t(`sheet.cf.valueType.${t.CFValueType.num}`),value:t.CFValueType.num},{label:a.t(`sheet.cf.valueType.${t.CFValueType.percent}`),value:t.CFValueType.percent},{label:a.t(`sheet.cf.valueType.${t.CFValueType.percentile}`),value:t.CFValueType.percentile},{label:a.t(`sheet.cf.valueType.${t.CFValueType.formula}`),value:t.CFValueType.formula}],v=(p,h)=>{e([String(h),"value","value"],p)},o=(p,h)=>{e([String(h),"operator"],p);const b=t.createDefaultValue(t.CFSubRuleType.number,p);v(b,h)},f=(p,h)=>{e([String(h),"value","type"],p);const b=l[h],S=t.createDefaultValue(t.CFSubRuleType.number,b.operator);v(S,h)};return m.useMemo(()=>l.map((p,h)=>{const b=n[h],S=yr(p.iconType,p.iconId),C=h===l.length-1,N=h===0,_=l[h-1],E=(_==null?void 0:_.value.type)===t.CFValueType.formula?a.t("sheet.cf.valueType.formula"):_==null?void 0:_.value.value,M=(R,g)=>{const T={...p,iconId:g,iconType:R};e([String(h)],T)};return c.jsxs("div",{className:h?"univer-mt-6":"univer-mt-3",children:[c.jsxs("div",{className:"univer-mt-3 univer-flex univer-items-center univer-justify-between univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",children:[c.jsxs("div",{className:"univer-w-[45%]",children:[a.t("sheet.cf.iconSet.icon"),h+1]}),c.jsx("div",{className:"univer-w-[45%]",children:c.jsxs(c.Fragment,{children:[!N&&!C&&a.t("sheet.cf.iconSet.rule"),!N&&!C&&c.jsxs("span",{className:"univer-font-medium univer-text-gray-600 dark:!univer-text-gray-200",children:[a.t("sheet.cf.iconSet.when"),a.t(`sheet.cf.symbol.${t.getOppositeOperator(_.operator)}`),E,C?"":` ${a.t("sheet.cf.iconSet.and")} `]})]})})]}),c.jsxs("div",{className:"univer-mt-3 univer-grid univer-grid-cols-2 univer-gap-4",children:[c.jsx("div",{className:"univer-flex univer-items-center",children:c.jsx(O.Dropdown,{overlay:c.jsx("div",{className:"univer-rounded-lg univer-p-4",children:c.jsx(Kr,{onClick:M,iconId:p.iconId,iconType:p.iconType})}),children:c.jsxs("div",{className:O.clsx("univer-box-border univer-flex univer-h-8 univer-w-full univer-items-center univer-justify-between univer-rounded-md univer-bg-white univer-px-4 univer-py-2 univer-text-xs univer-text-gray-600 univer-transition-all hover:univer-border-primary-600 dark:!univer-text-gray-200",O.borderClassName),children:[S?c.jsx("img",{src:S,className:"univer-size-4",draggable:!1}):c.jsx(he,{className:"univer-size-4"}),c.jsx(Xe,{})]})})}),C?c.jsxs("div",{className:"univer-mt-0 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",children:[a.t("sheet.cf.iconSet.rule"),c.jsxs("span",{className:"univer-font-medium",children:[a.t("sheet.cf.iconSet.when"),a.t(`sheet.cf.symbol.${t.getOppositeOperator(_.operator)}`),E,C?"":` ${a.t("sheet.cf.iconSet.and")} `]})]}):c.jsx(O.Select,{options:u,value:p.operator,onChange:R=>{o(R,h)}})]}),C?c.jsx("div",{}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"univer-mt-3 univer-grid univer-grid-cols-2 univer-gap-4 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",children:[c.jsx("div",{children:a.t("sheet.cf.iconSet.type")}),c.jsx("div",{children:a.t("sheet.cf.iconSet.value")})]}),c.jsxs("div",{className:"univer-mt-3 univer-grid univer-grid-cols-2 univer-gap-4",children:[c.jsx(O.Select,{options:s,value:p.value.type,onChange:R=>{f(R,h)}}),c.jsx(zr,{id:h,type:p.value.type,error:b,value:p.value.value||"",onChange:R=>{v(R,h)}})]})]})]},h)}),[l,n])},Jr=r=>{var R;const{interceptorManager:e}=r,l=((R=r.rule)==null?void 0:R.type)===t.CFRuleType.iconSet?r.rule:void 0,n=j.useDependency(i.LocaleService),[a,u]=m.useState({}),[s,v]=m.useState(()=>{const g=Object.keys(t.iconMap)[0];if(l&&l.config.length){const T=l.config[0].iconType;if(!l.config.some(I=>I.iconType!==T))return T}return g}),[o,f]=m.useState(()=>{if(l&&l.config.length)return i.Tools.deepClone(l==null?void 0:l.config);const g=t.iconMap[s]||[];return new Array(g.length).fill("").map((T,w,I)=>w===I.length-1?{operator:t.CFNumberOperator.lessThanOrEqual,value:{type:t.CFValueType.num,value:Number.MAX_SAFE_INTEGER},iconType:s,iconId:String(w)}:mr(s,w,I))}),[d,p]=m.useState(()=>l?!!l.isShowValue:!0),h=m.useMemo(()=>{const g=o.map(T=>yr(T.iconType,T.iconId));return c.jsx("div",{className:"univer-flex univer-items-center",children:g.map((T,w)=>T?c.jsx("img",{className:"univer-size-5",src:T},w):c.jsx(he,{className:"univer-size-5"},w))})},[o]),b=g=>{if(g.reduce((w,I,k)=>w.preType&&!w.result||g.length-1===k?w:I.value.type===t.CFValueType.formula?{preType:t.CFValueType.formula,result:!1}:w.preType?{result:w.preType===I.value.type,preType:I.value.type}:{result:!0,preType:I.value.type},{result:!0,preType:""}).result&&[t.CFValueType.num,t.CFValueType.percent,t.CFValueType.percentile].includes(g[0].value.type)){const w={};return g.forEach((I,k,V)=>{if(k-1<0||k===V.length-1)return;const L=g[k-1],y=t.getOppositeOperator(L.operator);t.compareWithNumber({operator:y,value:L.value.value},I.value.value)||(w[k]=`${n.t(`sheet.cf.form.${y}`,String(L.value.value))} `)}),w}return{}},S=(g,T)=>{i.get(o,g)!==T&&(i.set(o,g,T),f([...o]),u(b(o)))},C=g=>{v(g);const T=t.iconMap[g]||[],w=new Array(T.length).fill("").map((I,k,V)=>mr(g,k,V));f(w),u(b(w))};m.useEffect(()=>{const g=e.intercept(e.getInterceptPoints().submit,{handler(){return{type:t.CFRuleType.iconSet,isShowValue:d,config:o}}});return()=>{g()}},[d,o,e]),m.useEffect(()=>{const g=e.intercept(e.getInterceptPoints().beforeSubmit,{handler(){return Object.keys(a).length===0}});return()=>{g()}},[d,o,e,a]);const N=()=>{const g=o.map(T=>({...T}));o.forEach((T,w)=>{const I=o.length-1-w,k=g[I];T.iconId=k.iconId,T.iconType=k.iconType}),f([...o])},_=j.useDependency(j.ILayoutService),[E,M]=m.useState();return j.useScrollYOverContainer(E,_.rootContainerElement),c.jsxs("div",{children:[c.jsx("div",{className:"univer-mt-4 univer-text-sm univer-text-gray-600",children:n.t("sheet.cf.panel.styleRule")}),c.jsx("div",{className:"univer-mt-3",children:c.jsx(O.Dropdown,{overlay:c.jsx("div",{className:"univer-rounded-lg univer-p-4",children:c.jsx(Yr,{ref:g=>{!E&&g&&M(g)},iconType:s,onClick:C})}),children:c.jsxs("div",{className:O.clsx("univer-box-border univer-flex univer-h-8 univer-w-full univer-items-center univer-justify-between univer-rounded-md univer-bg-white univer-px-4 univer-py-2 univer-text-xs univer-text-gray-600 univer-transition-all hover:univer-border-primary-600",O.borderClassName),children:[h,c.jsx(Xe,{})]})})}),c.jsxs("div",{className:"univer-mt-3 univer-flex univer-items-center univer-text-xs",children:[c.jsxs("div",{className:"univer-flex univer-items-center univer-text-xs",children:[c.jsx(O.Checkbox,{onChange:N}),n.t("sheet.cf.iconSet.reverseIconOrder")]}),c.jsxs("div",{className:"univer-ml-6 univer-flex univer-items-center univer-text-xs",children:[c.jsx(O.Checkbox,{checked:!d,onChange:g=>{p(!g)}}),n.t("sheet.cf.iconSet.onlyShowIcon")]})]}),c.jsx(Xr,{errorMap:a,onChange:S,configList:o})]})},Qr=r=>{var N;const{onChange:e,interceptorManager:l}=r,n=j.useDependency(i.LocaleService),a=((N=r.rule)==null?void 0:N.type)===t.CFRuleType.highlightCell?r.rule:void 0,u=[{label:n.t("sheet.cf.panel.isNotBottom"),value:"isNotBottom"},{label:n.t("sheet.cf.panel.isBottom"),value:"isBottom"},{label:n.t("sheet.cf.panel.greaterThanAverage"),value:"greaterThanAverage"},{label:n.t("sheet.cf.panel.lessThanAverage"),value:"lessThanAverage"}],[s,v]=m.useState(()=>{const _=u[0].value,E=a==null?void 0:a.type;if(!a)return _;switch(E){case t.CFRuleType.highlightCell:switch(a.subType){case t.CFSubRuleType.average:return[t.CFNumberOperator.greaterThan,t.CFNumberOperator.greaterThanOrEqual].includes(a.operator)?"greaterThanAverage":[t.CFNumberOperator.lessThan,t.CFNumberOperator.lessThanOrEqual].includes(a.operator)?"lessThanAverage":_;case t.CFSubRuleType.rank:return a.isBottom?"isBottom":"isNotBottom"}}return _}),[o,f]=m.useState(()=>{const E=a==null?void 0:a.type;if(!a)return 10;switch(E){case t.CFRuleType.highlightCell:switch(a.subType){case t.CFSubRuleType.rank:return a.value||10}}return 10}),[d,p]=m.useState(()=>{const E=a==null?void 0:a.type;if(!a)return!1;switch(E){case t.CFRuleType.highlightCell:switch(a.subType){case t.CFSubRuleType.rank:return a.isPercent||!1}}return!1}),[h,b]=m.useState({}),S=_=>{const{type:E,isPercent:M,value:R,style:g}=_;if(E==="isNotBottom")return{type:t.CFRuleType.highlightCell,subType:t.CFSubRuleType.rank,isPercent:M,isBottom:!1,value:R,style:g};if(E==="isBottom")return{type:t.CFRuleType.highlightCell,subType:t.CFSubRuleType.rank,isPercent:M,isBottom:!0,value:R,style:g};if(E==="greaterThanAverage")return{type:t.CFRuleType.highlightCell,subType:t.CFSubRuleType.average,operator:t.CFNumberOperator.greaterThan,style:g};if(E==="lessThanAverage")return{type:t.CFRuleType.highlightCell,subType:t.CFSubRuleType.average,operator:t.CFNumberOperator.lessThan,style:g}};m.useEffect(()=>l.intercept(l.getInterceptPoints().submit,{handler(){return S({type:s,isPercent:d,value:o,style:h})}}),[s,d,o,h,l]);const C=_=>{e(S(_))};return c.jsxs("div",{children:[c.jsx("div",{className:"univer-mt-4 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",children:n.t("sheet.cf.panel.styleRule")}),c.jsx(O.Select,{className:"univer-mt-3 univer-w-full",value:s,options:u,onChange:_=>{v(_),C({type:_,isPercent:d,value:o,style:h})}}),["isNotBottom","isBottom"].includes(s)&&c.jsxs("div",{className:"univer-mt-3 univer-flex univer-items-center",children:[c.jsx(O.InputNumber,{min:1,max:1e3,value:o,onChange:_=>{const E=_||0;f(E),C({type:s,isPercent:d,value:E,style:h})}}),c.jsxs("div",{className:"univer-ml-3 univer-flex univer-items-center univer-text-xs",children:[c.jsx(O.Checkbox,{checked:d,onChange:_=>{p(!!_),C({type:s,isPercent:!!_,value:o,style:h})}}),n.t("sheet.cf.valueType.percent")]})]}),c.jsx("div",{className:ge,children:c.jsx(ue,{rule:S({type:s,isPercent:d,value:o,style:h})})}),c.jsx(Qe,{style:a==null?void 0:a.style,className:"univer-mt-3",onChange:_=>{b(_),C({type:s,isPercent:d,value:o,style:_})}})]})},et=i.createInterceptorKey("beforeSubmit"),rt=i.createInterceptorKey("submit"),Cr=r=>r.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET).getUnitId(),br=r=>{var e;return(e=r.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET).getActiveSheet())==null?void 0:e.getSheetId()},tt=r=>{var w,I,k;const e=j.useDependency(i.LocaleService),l=j.useDependency(i.ICommandService),n=j.useDependency(i.IUniverInstanceService),a=j.useDependency(t.ConditionalFormattingRuleModel),u=j.useDependency(U.SheetsSelectionsService),s=Cr(n),v=br(n),[o,f]=m.useState(void 0),d=m.useRef((I=(w=r.rule)==null?void 0:w.ranges)!=null?I:[]),p=m.useMemo(()=>{var P,L,y;let V=(P=r.rule)==null?void 0:P.ranges;return V!=null&&V.length||(V=(y=(L=u.getCurrentSelections())==null?void 0:L.map(x=>x.range))!=null?y:[]),d.current=V,V!=null&&V.length?V.map(x=>{const F=$e.serializeRange(x);return F==="NaN"?"":F}).filter(x=>!!x).join(","):""},[r.rule]),h=[{label:e.t("sheet.cf.ruleType.highlightCell"),value:"1"},{label:e.t("sheet.cf.panel.rankAndAverage"),value:"2"},{label:e.t("sheet.cf.ruleType.dataBar"),value:"3"},{label:e.t("sheet.cf.ruleType.colorScale"),value:"4"},{label:e.t("sheet.cf.ruleType.formula"),value:"5"},{label:e.t("sheet.cf.ruleType.iconSet"),value:"6"}],[b,S]=m.useState(()=>{var L,y;const V=(L=r.rule)==null?void 0:L.rule.type,P=h[0].value;if(!V)return P;switch(V){case t.CFRuleType.highlightCell:{switch((y=r.rule)==null?void 0:y.rule.subType){case t.CFSubRuleType.number:case t.CFSubRuleType.text:case t.CFSubRuleType.duplicateValues:case t.CFSubRuleType.uniqueValues:case t.CFSubRuleType.timePeriod:return"1";case t.CFSubRuleType.average:case t.CFSubRuleType.rank:return"2";case t.CFSubRuleType.formula:return"5"}break}case t.CFRuleType.dataBar:return"3";case t.CFRuleType.colorScale:return"4";case t.CFRuleType.iconSet:return"6"}return P}),C=m.useRef(void 0),N=m.useMemo(()=>new i.InterceptorManager({beforeSubmit:et,submit:rt}),[]),_=m.useMemo(()=>{switch(b){case"1":return gr;case"2":return Qr;case"3":return qr;case"4":return Wr;case"5":return Gr;case"6":return Jr;default:return gr}},[b]);m.useEffect(()=>{const V=l.onCommandExecuted(P=>{if(P.id===U.RemoveSheetMutation.id){const L=P.params;L.subUnitId===v&&L.unitId===s&&r.onCancel()}P.id===U.SetWorksheetActiveOperation.id&&r.onCancel()});return()=>V.dispose()},[]);const E=V=>{C.current=V},M=V=>{const P=V.split(",").filter(L=>!!L).map($e.deserializeRangeWithSheet).map(L=>L.range);d.current=P},R=()=>{if(o)return;const P=(()=>{const y=n.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET).getActiveSheet();if(!y)throw new Error("No active sheet found");return d.current.map(G=>U.setEndForRange(G,y.getRowCount(),y.getColumnCount())).filter(G=>!(Number.isNaN(G.startRow)||Number.isNaN(G.startColumn)))})();if(N.fetchThroughInterceptors(N.getInterceptPoints().beforeSubmit)(!0,null)){const y=N.fetchThroughInterceptors(N.getInterceptPoints().submit)(null,null);if(y){const x=Cr(n),F=br(n);if(!x||!F)throw new Error("No active sheet found");let G={};r.rule&&r.rule.cfId?(G={...r.rule,ranges:P,rule:y},l.executeCommand(t.SetCfCommand.id,{unitId:x,subUnitId:F,rule:G}),r.onCancel()):(G={cfId:a.createCfId(x,F),ranges:P,rule:y,stopIfTrue:!1},l.executeCommand(t.AddCfCommand.id,{unitId:x,subUnitId:F,rule:G}),r.onCancel())}}},g=()=>{r.onCancel()},T=(V,P)=>{V?P.length<1?f(e.t("sheet.cf.errorMessage.rangeError")):f(void 0):f(e.t("sheet.cf.errorMessage.rangeError"))};return c.jsxs("div",{children:[c.jsx("div",{className:"univer-mt-4 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",children:e.t("sheet.cf.panel.range")}),c.jsxs("div",{className:"univer-mt-4",children:[c.jsx(pe.RangeSelector,{unitId:s,subUnitId:v,initialValue:p,onChange:(V,P)=>M(P),onVerify:T}),o&&c.jsx("div",{className:"univer-mt-1 univer-text-xs univer-text-red-500",children:o})]}),c.jsx("div",{className:"univer-mt-4 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",children:e.t("sheet.cf.panel.styleType")}),c.jsx(O.Select,{className:"univer-mt-4 univer-w-full",value:b,options:h,onChange:V=>S(V)}),c.jsx(_,{interceptorManager:N,rule:(k=r.rule)==null?void 0:k.rule,onChange:E}),c.jsxs("div",{className:"univer-mt-4 univer-flex univer-justify-end",children:[c.jsx(O.Button,{onClick:g,children:e.t("sheet.cf.panel.cancel")}),c.jsx(O.Button,{className:"univer-ml-3",variant:"primary",onClick:R,children:e.t("sheet.cf.panel.submit")})]})]})};var nt=Object.getOwnPropertyDescriptor,at=(r,e,l,n)=>{for(var a=n>1?void 0:n?nt(e,l):e,u=r.length-1,s;u>=0;u--)(s=r[u])&&(a=s(a)||a);return a},lt=(r,e)=>(l,n)=>e(l,n,r);let se=class extends i.Disposable{constructor(e){super();re(this,"_initLocal",()=>{});re(this,"_findReplaceIndex",e=>{const l=/\{([^}]+)?\}/g,n=[];let a=l.exec(e);for(;a;)n.push({startIndex:a.index,key:Number(a[1]),endIndex:a.index+a[0].length-1}),a=l.exec(e);return n});this._localeService=e,this._initLocal()}tWithReactNode(e,...l){const n=this._localeService.getLocales(),a=e.split("."),u=n&&this._localeService.resolveKeyPath(n,a);if(typeof u=="string"){const s=[];return this._findReplaceIndex(u).forEach((v,o,f)=>{const d=f[o-1]||{endIndex:-1};if(d.endIndex+1<v.startIndex){const p=u.slice(d.endIndex+1,v.startIndex);p&&s.push(p)}if(l[v.key]&&s.push(l[v.key]),o===f.length-1){const p=u.slice(v.endIndex+1);p&&s.push(p)}}),s}return[]}};se=at([lt(0,i.Inject(i.LocaleService))],se);const ut=(r,e)=>{const l=r.rule;switch(l.type){case t.CFRuleType.colorScale:return e.t("sheet.cf.ruleType.colorScale");case t.CFRuleType.dataBar:return e.t("sheet.cf.ruleType.dataBar");case t.CFRuleType.iconSet:return e.t("sheet.cf.ruleType.iconSet");case t.CFRuleType.highlightCell:switch(l.subType){case t.CFSubRuleType.average:{const n=l.operator;return e.t(`sheet.cf.preview.describe.${n}`,e.t("sheet.cf.subRuleType.average"))}case t.CFSubRuleType.duplicateValues:return e.t("sheet.cf.subRuleType.duplicateValues");case t.CFSubRuleType.uniqueValues:return e.t("sheet.cf.subRuleType.uniqueValues");case t.CFSubRuleType.number:{const n=l.operator;return e.t(`sheet.cf.preview.describe.${n}`,...Array.isArray(l.value)?l.value.map(a=>String(a)):[String(l.value||"")])}case t.CFSubRuleType.text:{const n=l.operator;return e.t(`sheet.cf.preview.describe.${n}`,l.value||"")}case t.CFSubRuleType.timePeriod:{const n=l.operator;return e.t(`sheet.cf.preview.describe.${n}`)}case t.CFSubRuleType.rank:return l.isPercent?l.isBottom?e.t("sheet.cf.preview.describe.bottomNPercent",String(l.value)):e.t("sheet.cf.preview.describe.topNPercent",String(l.value)):l.isBottom?e.t("sheet.cf.preview.describe.bottomN",String(l.value)):e.t("sheet.cf.preview.describe.topN",String(l.value));case t.CFSubRuleType.formula:return e.t("sheet.cf.ruleType.formula")}}};let Ir=0;const it=r=>{const{onClick:e}=r,l=j.useDependency(t.ConditionalFormattingRuleModel),n=j.useDependency(i.IUniverInstanceService),a=j.useDependency(U.SheetsSelectionsService),u=j.useDependency(i.ICommandService),s=j.useDependency(i.LocaleService),v=j.useDependency(i.Injector),o=j.useDependency(j.ISidebarService),f=j.useDependency(se),d=j.useObservable(()=>n.getCurrentTypeOfUnit$(i.UniverInstanceType.UNIVER_SHEET),void 0,void 0,[]),p=d.getUnitId(),h=d.getActiveSheet();if(!h)throw new Error("No active sheet found");const b=h.getSheetId(),[S,C]=m.useState([]),[N,_]=m.useState("2"),[E,M]=m.useState(0),[R,g]=m.useState(-1),[T,w]=m.useState(Ir),I=m.useRef(null),k=[{label:s.t("sheet.cf.panel.workSheet"),value:"2"},{label:s.t("sheet.cf.panel.selectedRange"),value:"1"}],V=()=>{const A=l.getSubunitRules(p,b);if(!A||!A.length)return[];if(N==="1"){const $=a.getCurrentLastSelection();if(!$)return[];const B=$.range;return A.filter(Z=>Z.ranges.some(z=>i.Rectangle.intersects(z,B)))}else if(N==="2")return[...A];return[]},[P,L]=m.useState(V);W.useHighlightRange(S),m.useEffect(()=>{const A=u.onCommandExecuted($=>{$.id===U.SetWorksheetActiveOperation.id&&M(Math.random())});return()=>A.dispose()}),m.useEffect(()=>{L(V)},[N,E,p,b]),m.useEffect(()=>{if(N==="2")return;const A=new J.Observable($=>{const B=[U.SetSelectionsOperation.id,t.AddConditionalRuleMutation.id,t.SetConditionalRuleMutation.id,t.DeleteConditionalRuleMutation.id,t.MoveConditionalRuleMutation.id],q=u.onCommandExecuted(Z=>{const{id:z,params:ae}=Z,le=n.getCurrentUnitOfType(i.UniverInstanceType.UNIVER_SHEET).getUnitId();B.includes(z)&&ae.unitId===le&&$.next(null)});return()=>q.dispose()}).pipe(J.debounceTime(16)).subscribe(()=>{L(V)});return()=>{A.unsubscribe()}},[n,N,p,b]),m.useEffect(()=>{const A=l.$ruleChange.subscribe(()=>{M(Math.random())});return()=>A.unsubscribe()},[l]),m.useEffect(()=>{const A=()=>{var Z,z;const q=Math.max(0,((z=(Z=I.current)==null?void 0:Z.getBoundingClientRect().width)!=null?z:0)-8);return Ir=q,q},B=new J.Observable(q=>{const Z=o.getContainer();if(Z){let z=setTimeout(()=>{q.next(void 0)},150);const ae=()=>{z&&clearTimeout(z),z=null},le=Fe=>{Fe.propertyName==="width"&&(ae(),q.next(void 0))};return Z.addEventListener("transitionend",le),()=>{ae(),Z.removeEventListener("transitionend",le)}}}).pipe(J.debounceTime(16)).subscribe(()=>{w(A())});return()=>{B.unsubscribe()}},[]);const y=A=>{var q;const $=n.getCurrentUnitOfType(i.UniverInstanceType.UNIVER_SHEET).getUnitId(),B=(q=n.getCurrentUnitOfType(i.UniverInstanceType.UNIVER_SHEET).getActiveSheet())==null?void 0:q.getSheetId();if(!$||!B)throw new Error("No active sheet found");u.executeCommand(t.DeleteCfCommand.id,{unitId:$,subUnitId:B,cfId:A.cfId})},x=(A,$)=>{g($.y)},F=(A,$,B)=>{var Fe;g(-1);const q=n.getCurrentUnitOfType(i.UniverInstanceType.UNIVER_SHEET).getUnitId(),Z=(Fe=n.getCurrentUnitOfType(i.UniverInstanceType.UNIVER_SHEET).getActiveSheet())==null?void 0:Fe.getSheetId();if(!q||!Z)throw new Error("No active sheet found");const z=Ht=>{const Bt=P.length;return Math.min(Bt-1,Math.max(0,Ht))},ae=P[z($.y)].cfId,le=P[z(B.y)].cfId;ae!==le&&u.executeCommand(t.MoveCfCommand.id,{unitId:q,subUnitId:Z,start:{id:ae,type:"self"},end:{id:le,type:B.y>$.y?"after":"before"}})},G=()=>{r.onCreate()},Q=()=>{N==="2"?u.executeCommand(t.ClearWorksheetCfCommand.id):N==="1"&&P.map($=>({unitId:p,subUnitId:b,cfId:$.cfId})).forEach($=>{u.executeCommand(t.DeleteCfCommand.id,$)})},ee=m.useMemo(()=>{const A=n.getCurrentUnitOfType(i.UniverInstanceType.UNIVER_SHEET),$=A.getActiveSheet();return P.filter(B=>{const q=B.ranges;return U.checkRangesEditablePermission(v,A.getUnitId(),$.getSheetId(),q)})},[P]),de=ee.map((A,$)=>({i:A.cfId,x:0,w:12,y:$,h:1,isResizable:!1})),ve=m.useMemo(()=>{const A=n.getCurrentUnitOfType(i.UniverInstanceType.UNIVER_SHEET),$=A.getActiveSheet();return P.every(B=>{const q=B.ranges;return U.checkRangesEditablePermission(v,A.getUnitId(),$.getSheetId(),q)})},[P]);return c.jsxs("div",{children:[c.jsxs("div",{className:"univer-flex univer-items-center univer-justify-between univer-gap-2 univer-text-sm",children:[c.jsx("div",{className:"univer-flex univer-items-center univer-gap-2",children:f.tWithReactNode("sheet.cf.panel.managerRuleSelect",c.jsx(O.Select,{className:"univer-w-36",options:k,value:N,onChange:A=>{_(A)}})).map((A,$)=>c.jsx("span",{children:A},$))}),c.jsxs("div",{className:"univer-flex univer-justify-end",children:[c.jsx(O.Tooltip,{title:s.t("sheet.cf.panel.createRule"),placement:"bottom",children:c.jsx("a",{className:"univer-size-5 univer-cursor-pointer",onClick:G,children:c.jsx(sr,{})})}),P.length&&ve?c.jsx(O.Tooltip,{title:s.t("sheet.cf.panel.clear"),placement:"bottom",children:c.jsx("a",{className:"univer-size-5 univer-cursor-pointer",onClick:Q,children:c.jsx(Ee,{className:"univer-text-red-500"})})}):c.jsx("div",{children:c.jsx(Ee,{className:"univer-text-gray-300"})})]})]}),c.jsx("div",{ref:I,children:T>0&&c.jsx(O.ReactGridLayout,{className:"[&_.react-grid-item]:univer-transition-none [&_.react-grid-placeholder]:univer-rounded [&_.react-grid-placeholder]:!univer-bg-gray-200",draggableHandle:".draggableHandle",layout:de,cols:12,rowHeight:60,width:T,margin:[0,10],onDragStop:F,onDragStart:x,children:ee==null?void 0:ee.map((A,$)=>c.jsx("div",{children:c.jsxs("div",{className:O.clsx("univer-group univer-relative univer-flex univer-items-center univer-justify-between univer-rounded univer-py-2 univer-pl-5 univer-pr-8 hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-700",{"univer-bg-gray-100 dark:!univer-bg-gray-700":R===$}),onMouseMove:()=>{A.ranges!==S&&C(A.ranges)},onMouseLeave:()=>C([]),onClick:()=>{e(A)},children:[c.jsx("div",{className:O.clsx("univer-absolute univer-left-0 univer-hidden univer-size-5 univer-cursor-grab univer-items-center univer-justify-center univer-rounded group-hover:univer-flex","draggableHandle"),onClick:B=>B.stopPropagation(),children:c.jsx(dr,{})}),c.jsxs("div",{className:"univer-min-w-0 univer-max-w-full univer-flex-shrink univer-overflow-hidden",children:[c.jsx("div",{className:"univer-text-sm univer-text-gray-900 dark:!univer-text-white",children:ut(A,s)}),c.jsx("div",{className:"univer-text-xs univer-text-gray-400",children:A.ranges.map(B=>$e.serializeRange(B)).join(",")})]}),c.jsx("div",{children:c.jsx(ue,{rule:A.rule})}),c.jsx("div",{className:O.clsx("univer-absolute univer-right-1 univer-hidden univer-size-6 univer-cursor-pointer univer-items-center univer-justify-center univer-rounded hover:univer-bg-gray-200 group-hover:univer-flex",{"univer-flex univer-items-center univer-justify-center":R===$}),onClick:B=>{B.stopPropagation(),y(A),C([])},children:c.jsx(Ee,{})})]})},`${A.cfId}`))})})]})},st=r=>{const[e,l]=m.useState(r.rule),[n,a]=m.useState(!!r.rule),u=()=>{a(!0)},s=()=>{a(!1),l(void 0)},v=o=>{l(o),a(!0)};return c.jsx("div",{className:"univer-flex univer-h-full univer-flex-col univer-justify-between univer-py-4",children:n?c.jsx(tt,{onCancel:s,rule:e}):c.jsx(it,{onClick:v,onCreate:u})})};var ct=Object.getOwnPropertyDescriptor,ot=(r,e,l,n)=>{for(var a=n>1?void 0:n?ct(e,l):e,u=r.length-1,s;u>=0;u--)(s=r[u])&&(a=s(a)||a);return a},ye=(r,e)=>(l,n)=>e(l,n,r);const Oe="sheet.conditional.formatting.panel";let me=class extends i.Disposable{constructor(e,l,n,a,u){super();re(this,"_sidebarDisposable",null);this._univerInstanceService=e,this._injector=l,this._componentManager=n,this._sidebarService=a,this._localeService=u,this._initPanel(),this.disposeWithMe(this._univerInstanceService.getCurrentTypeOfUnit$(i.UniverInstanceType.UNIVER_SHEET).subscribe(s=>{var v;s||(v=this._sidebarDisposable)==null||v.dispose()})),this.disposeWithMe(this._sidebarService.sidebarOptions$.subscribe(s=>{s.id===Oe&&(s.visible||setTimeout(()=>{this._sidebarService.sidebarOptions$.next({visible:!1})}))}))}openPanel(e){const l={id:Oe,header:{title:this._localeService.t("sheet.cf.title")},children:{label:Oe,rule:e,key:i.generateRandomId(4)},onClose:()=>this._sidebarDisposable=null};this._sidebarDisposable=this._sidebarService.open(l)}_initPanel(){this.disposeWithMe(this._componentManager.register(Oe,st))}};me=ot([ye(0,i.IUniverInstanceService),ye(1,i.Inject(i.Injector)),ye(2,i.Inject(j.ComponentManager)),ye(3,i.Inject(j.ISidebarService)),ye(4,i.Inject(i.LocaleService))],me);var Y=(r=>(r[r.createRule=1]="createRule",r[r.viewRule=2]="viewRule",r[r.highlightCell=3]="highlightCell",r[r.rank=4]="rank",r[r.formula=5]="formula",r[r.colorScale=6]="colorScale",r[r.dataBar=7]="dataBar",r[r.icon=8]="icon",r[r.clearRangeRules=9]="clearRangeRules",r[r.clearWorkSheetRules=10]="clearWorkSheetRules",r))(Y||{});const Ce={id:"sheet.operation.open.conditional.formatting.panel",type:i.CommandType.OPERATION,handler:(r,e)=>{var v;const l=r.get(me),n=r.get(U.SheetsSelectionsService),a=r.get(i.ICommandService),u=((v=n.getCurrentSelections())==null?void 0:v.map(o=>o.range))||[];switch(e.value){case 3:{l.openPanel({...t.createDefaultRule(),ranges:u});break}case 4:{const o={...t.createDefaultRule,ranges:u,rule:{type:t.CFRuleType.highlightCell,subType:t.CFSubRuleType.rank}};l.openPanel(o);break}case 5:{const o={...t.createDefaultRule,ranges:u,rule:{type:t.CFRuleType.highlightCell,subType:t.CFSubRuleType.formula,value:"="}};l.openPanel(o);break}case 6:{const o={...t.createDefaultRule,ranges:u,rule:{type:t.CFRuleType.colorScale,config:[]}};l.openPanel(o);break}case 7:{const o={...t.createDefaultRule,ranges:u,rule:{type:t.CFRuleType.dataBar,isShowValue:!0}};l.openPanel(o);break}case 8:{const o={...t.createDefaultRule,ranges:u,rule:{type:t.CFRuleType.iconSet,config:[],isShowValue:!0}};l.openPanel(o);break}case 2:{l.openPanel();break}case 1:{l.openPanel({...t.createDefaultRule(),ranges:u});break}case 9:{a.executeCommand(t.ClearRangeCfCommand.id,{ranges:u});break}case 10:{a.executeCommand(t.ClearWorksheetCfCommand.id);break}}return!0}};var dt=Object.getOwnPropertyDescriptor,vt=(r,e,l,n)=>{for(var a=n>1?void 0:n?dt(e,l):e,u=r.length-1,s;u>=0;u--)(s=r[u])&&(a=s(a)||a);return a},be=(r,e)=>(l,n)=>e(l,n,r);D.ConditionalFormattingClearController=class extends i.Disposable{constructor(e,l,n,a,u){super(),this._injector=e,this._univerInstanceService=l,this._sheetInterceptorService=n,this._selectionManagerService=a,this._conditionalFormattingRuleModel=u,this._init()}_init(){this.disposeWithMe(this._sheetInterceptorService.interceptCommand({getMutations:e=>{var u;const l=[],n=[],a={redos:l,undos:n};if([U.ClearSelectionFormatCommand.id,U.ClearSelectionAllCommand.id].includes(e.id)){const s=(u=this._selectionManagerService.getCurrentSelections())==null?void 0:u.map(S=>S.range);if(!s)return a;const v=this._univerInstanceService.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET),o=v.getActiveSheet();if(!o)return a;const f=v.getUnitId(),d=o.getSheetId(),p=this._conditionalFormattingRuleModel.getSubunitRules(f,d);if(!p||!p.length)return a;const{redos:h,undos:b}=Sr(this._injector,p,s,f,d);l.push(...h),n.push(...b)}return a}})),this.disposeWithMe(this._sheetInterceptorService.interceptRanges({getMutations:({unitId:e,subUnitId:l,ranges:n})=>{const a=[],u=[],s={redos:a,undos:u};if(!n||!n.length)return s;const v=this._conditionalFormattingRuleModel.getSubunitRules(e,l);if(!v||!v.length)return s;const{redos:o,undos:f}=Sr(this._injector,v,n,e,l);return a.push(...o),u.push(...f),s}}))}},D.ConditionalFormattingClearController=vt([be(0,i.Inject(i.Injector)),be(1,i.Inject(i.IUniverInstanceService)),be(2,i.Inject(U.SheetInterceptorService)),be(3,i.Inject(U.SheetsSelectionsService)),be(4,i.Inject(t.ConditionalFormattingRuleModel))],D.ConditionalFormattingClearController);function Sr(r,e,l,n,a){const u=[],s=[];return e.filter(v=>l.some(o=>v.ranges.some(f=>i.Rectangle.getIntersects(f,o)))).forEach(v=>{const f=new U.RangeMergeUtil().add(...v.ranges).subtract(...l).merge();if(f.length){const d={id:t.SetConditionalRuleMutation.id,params:{unitId:n,subUnitId:a,rule:{...v,ranges:f}}},p=t.setConditionalRuleMutationUndoFactory(r,d.params);u.push(d),s.push(...p)}else{const d={id:t.DeleteConditionalRuleMutation.id,params:{unitId:n,subUnitId:a,cfId:v.cfId}},p=t.DeleteConditionalRuleMutationUndoFactory(r,d.params);u.push(d),s.push(...p)}}),{redos:u,undos:s}}var pt=Object.getOwnPropertyDescriptor,ft=(r,e,l,n)=>{for(var a=n>1?void 0:n?pt(e,l):e,u=r.length-1,s;u>=0;u--)(s=r[u])&&(a=s(a)||a);return a},Ie=(r,e)=>(l,n)=>e(l,n,r);let Se=class extends i.Disposable{constructor(e,l,n,a,u){super();re(this,"_copyInfo");this._sheetClipboardService=e,this._conditionalFormattingRuleModel=l,this._injector=n,this._conditionalFormattingViewModel=a,this._univerInstanceService=u,this._initClipboardHook()}_initClipboardHook(){this.disposeWithMe(this._sheetClipboardService.addClipboardHook({id:t.SHEET_CONDITIONAL_FORMATTING_PLUGIN,onBeforeCopy:(e,l,n)=>this._collectConditionalRule(e,l,n),onPasteCells:(e,l,n,a)=>{const{copyType:u=W.COPY_TYPE.COPY,pasteType:s}=a,{range:v}=e||{},{range:o}=l;return this._generateConditionalFormattingMutations(o,{copyType:u,pasteType:s,copyRange:v})}}))}_collectConditionalRule(e,l,n){const a=new i.ObjectMatrix,u={};this._copyInfo={matrix:a,info:{unitId:e,subUnitId:l,cfMap:u}};const s=this._injector.invoke(d=>U.rangeToDiscreteRange(n,d,e,l));if(!s)return;const{rows:v,cols:o}=s,f=new Set;v.forEach((d,p)=>{o.forEach((h,b)=>{const S=this._conditionalFormattingViewModel.getCellCfs(e,l,d,h);S&&(S.forEach(C=>f.add(C.cfId)),a.setValue(p,b,S.map(C=>C.cfId)))})}),f.forEach(d=>{const p=this._conditionalFormattingRuleModel.getRule(e,l,d);p&&(u[d]=p.rule)})}_generateConditionalFormattingMutations(e,l){const n=this._univerInstanceService.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET),a=n.getActiveSheet(),u=n.getUnitId();if(!a)return{redos:[],undos:[]};const s=a.getSheetId();if(l.copyType===W.COPY_TYPE.CUT)return this._copyInfo=null,{redos:[],undos:[]};if(!this._copyInfo||!l.copyRange)return{redos:[],undos:[]};if(![W.PREDEFINED_HOOK_NAME.SPECIAL_PASTE_FORMAT,W.PREDEFINED_HOOK_NAME.DEFAULT_PASTE,W.PREDEFINED_HOOK_NAME.SPECIAL_PASTE_BESIDES_BORDER].includes(l.pasteType))return{redos:[],undos:[]};const{ranges:[o,f],mapFunc:d}=W.virtualizeDiscreteRanges([l.copyRange,e]),p=W.getRepeatRange(o,f,!0),h={};i.Range.foreach(f,(g,T)=>{const{row:w,col:I}=d(g,T),k=this._conditionalFormattingViewModel.getCellCfs(u,s,w,I);k&&k.forEach(V=>{if(!h[V.cfId]){const P=new i.ObjectMatrix;h[V.cfId]=P;const L=this._conditionalFormattingRuleModel.getRule(u,s,V.cfId);L==null||L.ranges.forEach(y=>{i.Range.foreach(y,(x,F)=>{P.setValue(x,F,1)})})}h[V.cfId].realDeleteValue(w,I)})});const{matrix:b,info:S}=this._copyInfo,C=[];let N=this._conditionalFormattingRuleModel.createCfId(u,s);const _={},E=g=>{if(_[g])return _[g];const T=S==null?void 0:S.cfMap[g],w=[...this._conditionalFormattingRuleModel.getSubunitRules(u,s)||[],...C].find(I=>i.Tools.diffValue(I.rule,T));if(w)return _[g]=w,w;{const I={rule:T,cfId:N,ranges:[],stopIfTrue:!1};return _[g]=I,C.push(I),N=`${Number(N)+1}`,I}};p.forEach(g=>{b&&b.forValue((T,w,I)=>{const k=i.Rectangle.getPositionRange({startRow:T,endRow:T,startColumn:w,endColumn:w},g.startRange),{row:V,col:P}=d(k.startRow,k.startColumn);I.forEach(L=>{if(!h[L]){const y=E(L),x=new i.ObjectMatrix;h[L]=x,y.ranges.forEach(F=>{i.Range.foreach(F,(G,Q)=>{x.setValue(G,Q,1)})})}h[L].setValue(V,P,1)})})});const M=[],R=[];for(const g in h){const T=h[g],w=U.findAllRectangle(U.createTopMatrixFromMatrix(T));if(!w.length){const I={unitId:u,subUnitId:s,cfId:g};M.push({id:t.DeleteConditionalRuleMutation.id,params:I}),R.push(...t.DeleteConditionalRuleMutationUndoFactory(this._injector,I))}if(C.some(I=>I.cfId===g)){const I=E(g),k={unitId:u,subUnitId:s,rule:{...I,ranges:w}};M.push({id:t.AddConditionalRuleMutation.id,params:k}),R.push(t.AddConditionalRuleMutationUndoFactory(this._injector,k))}else{const I=this._conditionalFormattingRuleModel.getRule(u,s,g);if(!I)continue;const k={unitId:u,subUnitId:s,rule:{...I,ranges:w}};M.push({id:t.SetConditionalRuleMutation.id,params:k}),R.push(...t.setConditionalRuleMutationUndoFactory(this._injector,k))}}return{redos:M,undos:R}}};Se=ft([Ie(0,i.Inject(W.ISheetClipboardService)),Ie(1,i.Inject(t.ConditionalFormattingRuleModel)),Ie(2,i.Inject(i.Injector)),Ie(3,i.Inject(t.ConditionalFormattingViewModel)),Ie(4,i.Inject(i.IUniverInstanceService))],Se);var ht=Object.getOwnPropertyDescriptor,gt=(r,e,l,n)=>{for(var a=n>1?void 0:n?ht(e,l):e,u=r.length-1,s;u>=0;u--)(s=r[u])&&(a=s(a)||a);return a},er=(r,e)=>(l,n)=>e(l,n,r);let Te=class extends i.Disposable{constructor(r,e,l){super(),this._localeService=r,this._commandService=e,this._sheetPermissionCheckController=l,this._commandExecutedListener()}_commandExecutedListener(){this.disposeWithMe(this._commandService.beforeCommandExecuted(r=>{r.id===t.AddCfCommand.id&&(this._sheetPermissionCheckController.permissionCheckWithRanges({workbookTypes:[U.WorkbookEditablePermission],rangeTypes:[U.RangeProtectionPermissionEditPoint],worksheetTypes:[U.WorksheetEditPermission,U.WorksheetSetCellStylePermission]},r.params.rule.ranges)||this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr")))}))}};Te=gt([er(0,i.Inject(i.LocaleService)),er(1,i.ICommandService),er(2,i.Inject(U.SheetPermissionCheckController))],Te);var yt=Object.getOwnPropertyDescriptor,mt=(r,e,l,n)=>{for(var a=n>1?void 0:n?yt(e,l):e,u=r.length-1,s;u>=0;u--)(s=r[u])&&(a=s(a)||a);return a},Ue=(r,e)=>(l,n)=>e(l,n,r);let _e=class extends i.Disposable{constructor(r,e,l,n){super(),this._conditionalFormattingRuleModel=r,this._univerInstanceService=e,this._injector=l,this._refRangeService=n,this._initRefRange()}_initRefRange(){const r=new Map,e=(n,a,u)=>`${n}_${a}_${u}`,l=(n,a,u)=>{const s=o=>{const f=[...u.ranges],d=f.map(h=>U.handleDefaultRangeChangeWithEffectRefCommands(h,o)).filter(h=>!!h);if(t.isRangesEqual(d,f))return{redos:[],undos:[]};if(d.length){const h={unitId:n,subUnitId:a,rule:{...u,ranges:d}},b=[{id:t.SetConditionalRuleMutation.id,params:h}],S=t.setConditionalRuleMutationUndoFactory(this._injector,h);return{redos:b,undos:S}}else{const h={unitId:n,subUnitId:a,cfId:u.cfId},b=[{id:t.DeleteConditionalRuleMutation.id,params:h}],S=t.DeleteConditionalRuleMutationUndoFactory(this._injector,h);return{redos:b,undos:S}}},v=[];u.ranges.forEach(o=>{const f=this._refRangeService.registerRefRange(o,s);v.push(()=>f.dispose())}),r.set(e(n,a,u.cfId),()=>v.forEach(o=>o()))};this.disposeWithMe(this._conditionalFormattingRuleModel.$ruleChange.subscribe(n=>{const{unitId:a,subUnitId:u,rule:s}=n,v=this._univerInstanceService.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET),o=v.getActiveSheet();if(!(n.unitId!==v.getUnitId()||n.subUnitId!==(o==null?void 0:o.getSheetId())))switch(n.type){case"add":{l(n.unitId,n.subUnitId,n.rule);break}case"delete":{const f=r.get(e(a,u,s.cfId));f&&f();break}case"set":{const f=r.get(e(a,u,s.cfId));f&&f(),l(n.unitId,n.subUnitId,n.rule)}}})),this.disposeWithMe(i.toDisposable(()=>{r.forEach(n=>{n()}),r.clear()}))}};_e=mt([Ue(0,i.Inject(t.ConditionalFormattingRuleModel)),Ue(1,i.Inject(i.IUniverInstanceService)),Ue(2,i.Inject(i.Injector)),Ue(3,i.Inject(U.RefRangeService))],_e);var Ct=Object.getOwnPropertyDescriptor,bt=(r,e,l,n)=>{for(var a=n>1?void 0:n?Ct(e,l):e,u=r.length-1,s;u>=0;u--)(s=r[u])&&(a=s(a)||a);return a},ce=(r,e)=>(l,n)=>e(l,n,r);let we=class extends i.Disposable{constructor(e,l,n,a,u,s){super();re(this,"_ruleChangeCacheMap",new Map);this._sheetInterceptorService=e,this._conditionalFormattingService=l,this._univerInstanceService=n,this._renderManagerService=a,this._conditionalFormattingViewModel=u,this._conditionalFormattingRuleModel=s,this._initViewModelInterceptor(),this._initSkeleton(),this.disposeWithMe(()=>{this._ruleChangeCacheMap.clear()})}_markDirtySkeleton(){var l,n,a;const e=this._univerInstanceService.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET).getUnitId();(l=this._renderManagerService.getRenderById(e))==null||l.with(W.SheetSkeletonManagerService).reCalculate(),(a=(n=this._renderManagerService.getRenderById(e))==null?void 0:n.mainComponent)==null||a.makeDirty()}_initSkeleton(){this.disposeWithMe(J.merge(this._conditionalFormattingRuleModel.$ruleChange,this._conditionalFormattingViewModel.markDirty$).pipe(fe.bufferTime(16),fe.filter(e=>!!e.length),fe.filter(e=>{const l=this._univerInstanceService.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET);if(!l)return!1;const n=l.getActiveSheet();return n?e.filter(a=>a.unitId===l.getUnitId()&&a.subUnitId===n.getSheetId()).length>0:!1})).subscribe(()=>this._markDirtySkeleton()))}_initViewModelInterceptor(){this.disposeWithMe(this._sheetInterceptorService.intercept(U.INTERCEPTOR_POINT.CELL_CONTENT,{effect:i.InterceptorEffectEnum.Style,handler:(e,l,n)=>{const a=this._conditionalFormattingService.composeStyle(l.unitId,l.subUnitId,l.row,l.col);if(!a)return n(e);const u=l.workbook.getStyles(),s=(typeof(e==null?void 0:e.s)=="string"?u.get(e==null?void 0:e.s):e==null?void 0:e.s)||{},v=e===l.rawData?{...l.rawData}:e;if(a.style){const o={...s,...a.style};Object.assign(v,{s:o})}return v.fontRenderExtension||(v.fontRenderExtension={},a.isShowValue!==void 0&&(v.fontRenderExtension.isSkip=!a.isShowValue)),a.dataBar&&(v.dataBar=a.dataBar),a.iconSet&&(v.iconSet=a.iconSet,v.fontRenderExtension.leftOffset=t.DEFAULT_PADDING+t.DEFAULT_WIDTH),n(v)},priority:10}))}};we=bt([ce(0,i.Inject(U.SheetInterceptorService)),ce(1,i.Inject(t.ConditionalFormattingService)),ce(2,i.Inject(i.IUniverInstanceService)),ce(3,i.Inject(ar.IRenderManagerService)),ce(4,i.Inject(t.ConditionalFormattingViewModel)),ce(5,i.Inject(t.ConditionalFormattingRuleModel))],we);const Tr="sheets-conditional-formatting-ui.config",ke={};var It=Object.defineProperty,St=Object.getOwnPropertyDescriptor,Tt=(r,e,l)=>e in r?It(r,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[e]=l,_t=(r,e,l,n)=>{for(var a=n>1?void 0:n?St(e,l):e,u=r.length-1,s;u>=0;u--)(s=r[u])&&(a=s(a)||a);return a},rr=(r,e)=>(l,n)=>e(l,n,r),_r=(r,e,l)=>Tt(r,typeof e!="symbol"?e+"":e,l);D.UniverSheetsConditionalFormattingMobileUIPlugin=class extends i.Plugin{constructor(e=ke,l,n,a){super(),this._config=e,this._injector=l,this._commandService=n,this._configService=a;const{menu:u,...s}=i.merge({},ke,this._config);u&&this._configService.setConfig("menu",u,{merge:!0}),this._configService.setConfig(Tr,s),this._initCommand(),this._injector.add([we]),this._injector.add([_e]),this._injector.add([Se]),this._injector.add([Te]),this._injector.add([se])}_initCommand(){[He,Be,We,qe,Ge,Ze,ze,Ye,Ke,Ce].forEach(e=>{this._commandService.registerCommand(e)})}},_r(D.UniverSheetsConditionalFormattingMobileUIPlugin,"pluginName",`${t.SHEET_CONDITIONAL_FORMATTING_PLUGIN}_MOBILE_UI_PLUGIN`),_r(D.UniverSheetsConditionalFormattingMobileUIPlugin,"type",i.UniverInstanceType.UNIVER_SHEET),D.UniverSheetsConditionalFormattingMobileUIPlugin=_t([i.DependentOn(t.UniverSheetsConditionalFormattingPlugin),rr(1,i.Inject(i.Injector)),rr(2,i.Inject(i.ICommandService)),rr(3,i.IConfigService)],D.UniverSheetsConditionalFormattingMobileUIPlugin);var wt=Object.getOwnPropertyDescriptor,xt=(r,e,l,n)=>{for(var a=n>1?void 0:n?wt(e,l):e,u=r.length-1,s;u>=0;u--)(s=r[u])&&(a=s(a)||a);return a},xe=(r,e)=>(l,n)=>e(l,n,r);let Pe=class extends i.Disposable{constructor(r,e,l,n,a){super(),this._injector=r,this._univerInstanceService=e,this._autoFillService=l,this._conditionalFormattingRuleModel=n,this._conditionalFormattingViewModel=a,this._initAutoFill()}_initAutoFill(){const r=()=>({redos:[],undos:[]}),e=(a,u,s,v,o)=>{var b;const f=this._univerInstanceService.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET).getUnitId(),d=(b=this._univerInstanceService.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET).getActiveSheet())==null?void 0:b.getSheetId();if(!f||!d)return;const p={startRow:a.row,startColumn:a.col,endColumn:a.col,endRow:a.row},h={startRow:u.row,startColumn:u.col,endColumn:u.col,endRow:u.row};i.Range.foreach(s,(S,C)=>{const N=i.Rectangle.getPositionRange({startRow:S,startColumn:C,endColumn:C,endRow:S},p),_=i.Rectangle.getPositionRange({startRow:S,startColumn:C,endColumn:C,endRow:S},h),{row:E,col:M}=o(N.startRow,N.startColumn),R=this._conditionalFormattingViewModel.getCellCfs(f,d,E,M),{row:g,col:T}=o(_.startRow,_.startColumn),w=this._conditionalFormattingViewModel.getCellCfs(f,d,g,T);w&&w.forEach(I=>{let k=v.get(I.cfId);if(!v.get(I.cfId)){const V=this._conditionalFormattingRuleModel.getRule(f,d,I.cfId);if(!V)return;k=new i.ObjectMatrix,V.ranges.forEach(P=>{i.Range.foreach(P,(L,y)=>{k.setValue(L,y,1)})}),v.set(I.cfId,k)}k.realDeleteValue(g,T)}),R&&R.forEach(I=>{let k=v.get(I.cfId);if(!v.get(I.cfId)){const V=this._conditionalFormattingRuleModel.getRule(f,d,I.cfId);if(!V)return;k=new i.ObjectMatrix,V.ranges.forEach(P=>{i.Range.foreach(P,(L,y)=>{k.setValue(L,y,1)})}),v.set(I.cfId,k)}k.setValue(g,T,1)})})},l=(a,u)=>{var _,E,M;const s=(_=this._univerInstanceService.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET))==null?void 0:_.getUnitId(),v=(M=(E=this._univerInstanceService.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET))==null?void 0:E.getActiveSheet())==null?void 0:M.getSheetId(),o=new Map,f=[],d=[];if(!s||!v)return r();const p=W.virtualizeDiscreteRanges([a,u]),[h,b]=p.ranges,{mapFunc:S}=p,C={row:h.startRow,col:h.startColumn};return W.getAutoFillRepeatRange(h,b).forEach(R=>{e(C,R.repeatStartCell,R.relativeRange,o,S)}),o.forEach((R,g)=>{const T=this._conditionalFormattingRuleModel.getRule(s,v,g);if(!T)return;const w=U.findAllRectangle(U.createTopMatrixFromMatrix(R));if(w.length){const I={unitId:s,subUnitId:v,rule:{...T,ranges:w}};f.push({id:t.SetConditionalRuleMutation.id,params:I}),d.push(...t.setConditionalRuleMutationUndoFactory(this._injector,I))}else{const I={unitId:s,subUnitId:v,cfId:T.cfId};f.push({id:t.DeleteConditionalRuleMutation.id,params:I}),d.push(...t.DeleteConditionalRuleMutationUndoFactory(this._injector,I))}}),{undos:d,redos:f}},n={id:t.SHEET_CONDITIONAL_FORMATTING_PLUGIN,onFillData:(a,u,s)=>{if(s===W.APPLY_TYPE.COPY||s===W.APPLY_TYPE.ONLY_FORMAT||s===W.APPLY_TYPE.SERIES){const{source:v,target:o}=a;return l(v,o)}return r()}};this.disposeWithMe(this._autoFillService.addHook(n))}};Pe=xt([xe(0,i.Inject(i.Injector)),xe(1,i.Inject(i.IUniverInstanceService)),xe(2,i.Inject(W.IAutoFillService)),xe(3,i.Inject(t.ConditionalFormattingRuleModel)),xe(4,i.Inject(t.ConditionalFormattingViewModel))],Pe);var Nt=Object.getOwnPropertyDescriptor,Et=(r,e,l,n)=>{for(var a=n>1?void 0:n?Nt(e,l):e,u=r.length-1,s;u>=0;u--)(s=r[u])&&(a=s(a)||a);return a},wr=(r,e)=>(l,n)=>e(l,n,r);let De=class extends i.Disposable{constructor(r,e){super(),this._sheetInterceptorService=r,this._conditionalFormattingService=e,this._initInterceptorEditorEnd()}_initInterceptorEditorEnd(){this.disposeWithMe(i.toDisposable(this._sheetInterceptorService.writeCellInterceptor.intercept(U.AFTER_CELL_EDIT,{handler:(r,e,l)=>{var s,v,o;r||l(r);const n=this._conditionalFormattingService.composeStyle(e.unitId,e.subUnitId,e.row,e.col),a=(s=n==null?void 0:n.style)!=null?s:{},u=Object.keys(a);if(r!=null&&r.p)return(o=(v=r.p.body)==null?void 0:v.textRuns)==null||o.forEach(f=>{f.ts&&u.forEach(d=>{var p;(p=f.ts)==null||delete p[d]})}),l(r);{const f={...(typeof(r==null?void 0:r.s)=="string"?e.workbook.getStyles().get(r.s):r==null?void 0:r.s)||{}};u.forEach(p=>{delete f[p]});const d={...r,s:{...f}};return l(d)}}})))}};De=Et([wr(0,i.Inject(U.SheetInterceptorService)),wr(1,i.Inject(t.ConditionalFormattingService))],De);const xr=[U.SetWorksheetActiveOperation.id,t.AddConditionalRuleMutation.id,t.SetConditionalRuleMutation.id,t.DeleteConditionalRuleMutation.id,t.MoveConditionalRuleMutation.id],Ne=[{label:{name:"sheet.cf.ruleType.highlightCell",selectable:!1},value:Y.highlightCell},{label:{name:"sheet.cf.panel.rankAndAverage",selectable:!1},value:Y.rank},{label:{name:"sheet.cf.ruleType.formula",selectable:!1},value:Y.formula},{label:{name:"sheet.cf.ruleType.colorScale",selectable:!1},value:Y.colorScale},{label:{name:"sheet.cf.ruleType.dataBar",selectable:!1},value:Y.dataBar},{label:{name:"sheet.cf.ruleType.iconSet",selectable:!1},value:Y.icon},{label:{name:"sheet.cf.menu.manageConditionalFormatting",selectable:!1},value:Y.viewRule},{label:{name:"sheet.cf.menu.createConditionalFormatting",selectable:!1},value:Y.createRule},{label:{name:"sheet.cf.menu.clearRangeRules",selectable:!1},value:Y.clearRangeRules,disabled:!1},{label:{name:"sheet.cf.menu.clearWorkSheetRules",selectable:!1},value:Y.clearWorkSheetRules}],Rt=r=>{const e=r.get(U.SheetsSelectionsService),l=r.get(i.ICommandService),n=r.get(i.IUniverInstanceService),a=r.get(t.ConditionalFormattingRuleModel),u=new J.Observable(o=>J.merge(e.selectionMoveEnd$,e.selectionSet$,new J.Observable(f=>{const d=l.onCommandExecuted(p=>{var C;const{id:h,params:b}=p,S=(C=n.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET))==null?void 0:C.getUnitId();xr.includes(h)&&b.unitId===S&&f.next(null)});return()=>d.dispose()})).pipe(fe.debounceTime(16)).subscribe(()=>{var C;const f=((C=e.getCurrentSelections())==null?void 0:C.map(N=>N.range))||[],d=n.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET);if(!d)return;const p=d.getActiveSheet();if(!p)return;const S=(a.getSubunitRules(d.getUnitId(),p.getSheetId())||[]).filter(N=>N.ranges.some(_=>f.some(E=>i.Rectangle.intersects(E,_)))).map(N=>N.ranges).every(N=>U.checkRangesEditablePermission(r,d.getUnitId(),p.getSheetId(),N));o.next(S)})),s=new J.Observable(o=>new J.Observable(f=>{const d=l.onCommandExecuted(p=>{var C;const{id:h,params:b}=p,S=(C=n.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET))==null?void 0:C.getUnitId();xr.includes(h)&&b.unitId===S&&f.next(null)});return()=>d.dispose()}).pipe(fe.debounceTime(16)).subscribe(()=>{const f=n.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET);if(!f)return;const d=f.getActiveSheet();if(!d)return;const p=a.getSubunitRules(f.getUnitId(),d.getSheetId())||[];if(!p.length)return o.next(!1),!1;const h=p.map(b=>b.ranges).every(b=>U.checkRangesEditablePermission(r,f.getUnitId(),d.getSheetId(),b));o.next(h)})),v=new J.Observable(o=>{u.subscribe(f=>{const d=Ne.find(p=>p.value===Y.clearRangeRules);d&&(d.disabled=!f,o.next(Ne))}),s.subscribe(f=>{const d=Ne.find(p=>p.value===Y.clearWorkSheetRules);d&&(d.disabled=!f,o.next(Ne))}),o.next(Ne)});return{id:Ce.id,type:j.MenuItemType.SELECTOR,icon:"ConditionsDoubleIcon",tooltip:"sheet.cf.title",selections:v,hidden$:j.getMenuHiddenObservable(r,i.UniverInstanceType.UNIVER_SHEET),disabled$:W.getCurrentRangeDisable$(r,{workbookTypes:[U.WorkbookEditablePermission],worksheetTypes:[U.WorksheetSetCellStylePermission,U.WorksheetEditPermission],rangeTypes:[U.RangeProtectionPermissionEditPoint]})}},Mt={[j.RibbonDataGroup.RULES]:{[Ce.id]:{order:1,menuItemFactory:Rt}}};var Vt=Object.getOwnPropertyDescriptor,Ot=(r,e,l,n)=>{for(var a=n>1?void 0:n?Vt(e,l):e,u=r.length-1,s;u>=0;u--)(s=r[u])&&(a=s(a)||a);return a},Nr=(r,e)=>(l,n)=>e(l,n,r);let Le=class extends i.Disposable{constructor(e,l){super();re(this,"_sidebarDisposable",null);this._injector=e,this._menuManagerService=l,this._menuManagerService.mergeMenu(Mt)}};Le=Ot([Nr(0,i.Inject(i.Injector)),Nr(1,j.IMenuManagerService)],Le);var Ut=Object.getOwnPropertyDescriptor,kt=(r,e,l,n)=>{for(var a=n>1?void 0:n?Ut(e,l):e,u=r.length-1,s;u>=0;u--)(s=r[u])&&(a=s(a)||a);return a},oe=(r,e)=>(l,n)=>e(l,n,r);const Pt=(r,e)=>{const l=d=>d.endRow-d.startRow+1,n=d=>d.endColumn-d.startColumn+1,a=l(e)%l(r),u=n(e)%n(r),s=Math.floor(l(e)/l(r)),v=Math.floor(n(e)/n(r)),o=[],f={startRow:0,endRow:l(r)-1,startColumn:0,endColumn:n(r)-1};if(l(e)===1&&n(e)===1){const d={startRow:e.startRow,endRow:e.startRow,startColumn:e.startColumn,endColumn:e.startColumn};return o.push({repeatRelativeRange:f,startRange:d}),o}for(let d=0;d<s+(a?.1:0);d++)for(let p=0;p<v+(u?.1:0);p++){const h=l(r)*d,b=n(r)*p,S={startRow:h+e.startRow,endRow:h+e.startRow,startColumn:b+e.startColumn,endColumn:b+e.startColumn};let C=f;d===s&&a&&(C={...C},C.endRow=C.endRow-(l(r)-a)),p===v&&u&&(C={...C},C.endColumn=C.endColumn-(n(r)-u)),o.push({repeatRelativeRange:C,startRange:S})}return o};let je=class extends i.Disposable{constructor(e,l,n,a,u,s){super();re(this,"_painterConfig",null);this._injector=e,this._univerInstanceService=l,this._formatPainterService=n,this._sheetsSelectionsService=a,this._conditionalFormattingRuleModel=u,this._conditionalFormattingViewModel=s,this._initFormattingPainter()}_initFormattingPainter(){const e=()=>({redos:[],undos:[]}),l=(u,s,v,o,f)=>{const{unitId:d,subUnitId:p}=this._painterConfig,{targetUnitId:h,targetSubUnitId:b}=f,S={startRow:u.row,startColumn:u.col,endColumn:u.col,endRow:u.row},C={startRow:s.row,startColumn:s.col,endColumn:s.col,endRow:s.row};i.Range.foreach(v,(N,_)=>{const E=i.Rectangle.getPositionRange({startRow:N,startColumn:_,endColumn:_,endRow:N},S),M=i.Rectangle.getPositionRange({startRow:N,startColumn:_,endColumn:_,endRow:N},C),R=this._conditionalFormattingViewModel.getCellCfs(d,p,E.startRow,E.startColumn),g=this._conditionalFormattingViewModel.getCellCfs(h,b,M.startRow,M.startColumn);g&&g.forEach(T=>{let w=o.get(T.cfId);if(!o.get(T.cfId)){const I=this._conditionalFormattingRuleModel.getRule(h,b,T.cfId);if(!I)return;w=new i.ObjectMatrix,I.ranges.forEach(k=>{i.Range.foreach(k,(V,P)=>{w.setValue(V,P,1)})}),o.set(T.cfId,w)}w.realDeleteValue(M.startRow,M.startColumn)}),R&&R.forEach(T=>{const w=o.get(T.cfId);w&&w.setValue(M.startRow,M.startColumn,1)})})},n=(u,s,v)=>{var E;const{range:o,unitId:f,subUnitId:d}=this._painterConfig,p=u!==f||d!==s,h=new Map,b=[],S=[];if(!u||!s||!f||!d)return e();const C=(E=this._conditionalFormattingRuleModel.getSubunitRules(f,d))!=null?E:[];C==null||C.forEach(M=>{const{ranges:R,cfId:g}=M;if(R.some(T=>i.Rectangle.intersects(o,T))){const T=new i.ObjectMatrix;p||R.forEach(w=>{i.Range.foreach(w,(I,k)=>{T.setValue(I,k,1)})}),h.set(g,T)}});const N={row:o.startRow,col:o.startColumn};return Pt(o,v).forEach(M=>{l(N,{row:M.startRange.startRow,col:M.startRange.startColumn},M.repeatRelativeRange,h,{targetUnitId:u,targetSubUnitId:s})}),h.forEach((M,R)=>{if(p){const g=this._conditionalFormattingRuleModel.getRule(u,s,R),T=U.findAllRectangle(U.createTopMatrixFromMatrix(M));if(g)if(T.length){const w={unitId:u,subUnitId:s,rule:{...g,ranges:T}};b.push({id:t.SetConditionalRuleMutation.id,params:w}),S.push(...t.setConditionalRuleMutationUndoFactory(this._injector,w))}else{const w={unitId:u,subUnitId:s,cfId:g.cfId};b.push({id:t.DeleteConditionalRuleMutation.id,params:w}),S.push(...t.DeleteConditionalRuleMutationUndoFactory(this._injector,w))}else if(T.length){const w=this._conditionalFormattingRuleModel.getRule(f,d,R);if(w){const I={unitId:u,subUnitId:s,rule:{...i.Tools.deepClone(w),cfId:this._conditionalFormattingRuleModel.createCfId(u,s),ranges:T}};b.push({id:t.AddConditionalRuleMutation.id,params:I}),S.push(t.AddConditionalRuleMutationUndoFactory(this._injector,I))}}}else{const g=this._conditionalFormattingRuleModel.getRule(f,d,R);if(!g)return;const T=U.findAllRectangle(U.createTopMatrixFromMatrix(M));if(T.length){const w={unitId:f,subUnitId:d,rule:{...g,ranges:T}};b.push({id:t.SetConditionalRuleMutation.id,params:w}),S.push(...t.setConditionalRuleMutationUndoFactory(this._injector,w))}else{const w={unitId:f,subUnitId:d,cfId:g.cfId};b.push({id:t.DeleteConditionalRuleMutation.id,params:w}),S.push(...t.DeleteConditionalRuleMutationUndoFactory(this._injector,w))}}}),{undos:S,redos:b}},a={id:t.SHEET_CONDITIONAL_FORMATTING_PLUGIN,onStatusChange:u=>{var s,v,o;switch(u){case W.FormatPainterStatus.INFINITE:case W.FormatPainterStatus.ONCE:{const f=(s=this._univerInstanceService.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET))==null?void 0:s.getUnitId(),d=(o=(v=this._univerInstanceService.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET))==null?void 0:v.getActiveSheet())==null?void 0:o.getSheetId(),p=this._sheetsSelectionsService.getCurrentLastSelection(),h=p==null?void 0:p.range;f&&d&&h&&(this._painterConfig={unitId:f,subUnitId:d,range:h});break}case W.FormatPainterStatus.OFF:{this._painterConfig=null;break}}},onApply:(u,s,v)=>this._painterConfig?n(u,s,v):{redos:[],undos:[]}};this._formatPainterService.addHook(a)}};je=kt([oe(0,i.Inject(i.Injector)),oe(1,i.Inject(i.IUniverInstanceService)),oe(2,i.Inject(W.IFormatPainterService)),oe(3,i.Inject(U.SheetsSelectionsService)),oe(4,i.Inject(t.ConditionalFormattingRuleModel)),oe(5,i.Inject(t.ConditionalFormattingViewModel))],je);var Dt=Object.getOwnPropertyDescriptor,Lt=(r,e,l,n)=>{for(var a=n>1?void 0:n?Dt(e,l):e,u=r.length-1,s;u>=0;u--)(s=r[u])&&(a=s(a)||a);return a},tr=(r,e)=>(l,n)=>e(l,n,r);let Ae=class extends i.Disposable{constructor(r,e,l){super(),this._conditionalFormattingViewModel=r,this._univerInstanceService=e,this._renderManagerService=l,this._init()}_init(){const r=this._univerInstanceService.getCurrentUnitForType(i.UniverInstanceType.UNIVER_SHEET),e=l=>{const n=l.getUnitId(),a=this._renderManagerService.getRenderById(n);if(!a)return;const u=a.with(W.SheetSkeletonManagerService);this.disposeWithMe(u.currentSkeleton$.subscribe(s=>{if(s){const v=s.skeleton.rowColumnSegment,o=v.endColumn-v.startColumn+1,d=(v.endRow-v.startRow+1)*o*9,p=Math.max(t.CONDITIONAL_FORMATTING_VIEWPORT_CACHE_LENGTH,d);this._conditionalFormattingViewModel.setCacheLength(p)}}))};r&&e(r),this._univerInstanceService.getCurrentTypeOfUnit$(i.UniverInstanceType.UNIVER_SHEET).subscribe(l=>{l&&e(l)})}};Ae=Lt([tr(0,i.Inject(t.ConditionalFormattingViewModel)),tr(1,i.IUniverInstanceService),tr(2,ar.IRenderManagerService)],Ae);var jt=Object.defineProperty,At=Object.getOwnPropertyDescriptor,Ft=(r,e,l)=>e in r?jt(r,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[e]=l,$t=(r,e,l,n)=>{for(var a=n>1?void 0:n?At(e,l):e,u=r.length-1,s;u>=0;u--)(s=r[u])&&(a=s(a)||a);return a},nr=(r,e)=>(l,n)=>e(l,n,r),Er=(r,e,l)=>Ft(r,typeof e!="symbol"?e+"":e,l);D.UniverSheetsConditionalFormattingUIPlugin=class extends i.Plugin{constructor(e=ke,l,n,a){super(),this._config=e,this._injector=l,this._commandService=n,this._configService=a;const{menu:u,...s}=i.merge({},ke,this._config);u&&this._configService.setConfig("menu",u,{merge:!0}),this._configService.setConfig(Tr,s),this._initCommand()}onStarting(){i.registerDependencies(this._injector,[[we],[_e],[Se],[Pe],[Te],[me],[Le],[se],[De],[D.ConditionalFormattingClearController],[je],[Ae]]),i.touchDependencies(this._injector,[[we]])}onReady(){i.touchDependencies(this._injector,[[Le],[me]])}onRendered(){i.touchDependencies(this._injector,[[Pe],[D.ConditionalFormattingClearController],[Se],[De],[se],[je],[Te],[_e],[Ae]])}_initCommand(){[He,Be,We,qe,Ge,Ze,ze,Ye,Ke,Ce].forEach(e=>{this._commandService.registerCommand(e)})}},Er(D.UniverSheetsConditionalFormattingUIPlugin,"pluginName",`${t.SHEET_CONDITIONAL_FORMATTING_PLUGIN}_UI_PLUGIN`),Er(D.UniverSheetsConditionalFormattingUIPlugin,"type",i.UniverInstanceType.UNIVER_SHEET),D.UniverSheetsConditionalFormattingUIPlugin=$t([i.DependentOn(t.UniverSheetsConditionalFormattingPlugin),nr(1,i.Inject(i.Injector)),nr(2,i.Inject(i.ICommandService)),nr(3,i.IConfigService)],D.UniverSheetsConditionalFormattingUIPlugin),D.AddAverageCfCommand=He,D.AddColorScaleConditionalRuleCommand=Be,D.AddDataBarConditionalRuleCommand=We,D.AddDuplicateValuesCfCommand=qe,D.AddNumberCfCommand=Ge,D.AddRankCfCommand=Ze,D.AddTextCfCommand=ze,D.AddTimePeriodCfCommand=Ye,D.AddUniqueValuesCfCommand=Ke,D.OpenConditionalFormattingOperator=Ce,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})}));
@@ -1 +1 @@
1
- (function(e,a){typeof exports=="object"&&typeof module<"u"?module.exports=a():typeof define=="function"&&define.amd?define(a):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsConditionalFormattingUiCaES=a())})(this,function(){"use strict";return{sheet:{cf:{title:"Format condicional",menu:{manageConditionalFormatting:"Gestiona el format condicional",createConditionalFormatting:"Crea format condicional",clearRangeRules:"Esborra les regles del rang seleccionat",clearWorkSheetRules:"Esborra les regles de tota la fulla"},form:{lessThan:"El valor ha de ser menor que {0}",lessThanOrEqual:"El valor ha de ser menor o igual que {0}",greaterThan:"El valor ha de ser més gran que {0}",greaterThanOrEqual:"El valor ha de ser més gran o igual que {0}",rangeSelector:"Selecciona un rang o introdueix un valor"},iconSet:{direction:"Direcció",shape:"Forma",mark:"Marca",rank:"Rang",rule:"Regla",icon:"Icona",type:"Tipus",value:"Valor",reverseIconOrder:"Inverteix l'ordre de les icones",and:"I",when:"Quan",onlyShowIcon:"Mostra només la icona"},symbol:{greaterThan:">",greaterThanOrEqual:">=",lessThan:"<",lessThanOrEqual:"<="},panel:{createRule:"Crea regla",clear:"Esborra totes les regles",range:"Aplica rang",styleType:"Tipus d'estil",submit:"Envia",cancel:"Cancel·la",rankAndAverage:"Superior/Inferior/Mitjana",styleRule:"Regla d'estil",isNotBottom:"Superior",isBottom:"Inferior",greaterThanAverage:"Més gran que la mitjana",lessThanAverage:"Menys que la mitjana",medianValue:"Valor mitjà",fillType:"Tipus d'emplenat",pureColor:"Color sòlid",gradient:"Gradient",colorSet:"Conjunt de colors",positive:"Positiu",native:"Negatiu",workSheet:"Tota la fulla",selectedRange:"Rang seleccionat",managerRuleSelect:"Gestiona les regles de {0}",onlyShowDataBar:"Mostra només les barres de dades"},preview:{describe:{beginsWith:"Comença amb {0}",endsWith:"Acaba amb {0}",containsText:"El text conté {0}",notContainsText:"El text no conté {0}",equal:"Igual a {0}",notEqual:"Diferent de {0}",containsBlanks:"Conté espais en blanc",notContainsBlanks:"No conté espais en blanc",containsErrors:"Conté errors",notContainsErrors:"No conté errors",greaterThan:"Més gran que {0}",greaterThanOrEqual:"Més gran o igual que {0}",lessThan:"Menys que {0}",lessThanOrEqual:"Menys o igual que {0}",notBetween:"No està entre {0} i {1}",between:"Entre {0} i {1}",yesterday:"Ahir",tomorrow:"Demà",last7Days:"Últims 7 dies",thisMonth:"Aquest mes",lastMonth:"Mes passat",nextMonth:"Mes següent",thisWeek:"Aquesta setmana",lastWeek:"Setmana passada",nextWeek:"Setmana següent",today:"Avui",topN:"Superior {0}",bottomN:"Inferior {0}",topNPercent:"Superior {0}%",bottomNPercent:"Inferior {0}%"}},operator:{beginsWith:"Comença amb",endsWith:"Acaba amb",containsText:"El text conté",notContainsText:"El text no conté",equal:"Igual a",notEqual:"Diferent de",containsBlanks:"Conté espais en blanc",notContainsBlanks:"No conté espais en blanc",containsErrors:"Conté errors",notContainsErrors:"No conté errors",greaterThan:"Més gran que",greaterThanOrEqual:"Més gran o igual que",lessThan:"Menys que",lessThanOrEqual:"Menys o igual que",notBetween:"No està entre",between:"Entre",yesterday:"Ahir",tomorrow:"Demà",last7Days:"Últims 7 dies",thisMonth:"Aquest mes",lastMonth:"Mes passat",nextMonth:"Mes següent",thisWeek:"Aquesta setmana",lastWeek:"Setmana passada",nextWeek:"Setmana següent",today:"Avui"},ruleType:{highlightCell:"Ressalta la cel·la",dataBar:"Barra de dades",colorScale:"Escala de colors",formula:"Fórmula personalitzada",iconSet:"Conjunt d'icones",duplicateValues:"Valors duplicats",uniqueValues:"Valors únics"},subRuleType:{uniqueValues:"Valors únics",duplicateValues:"Valors duplicats",rank:"Rang",text:"Text",timePeriod:"Període de temps",number:"Número",average:"Mitjana"},valueType:{num:"Número",min:"Mínim",max:"Màxim",percent:"Percentatge",percentile:"Percentil",formula:"Fórmula",none:"Cap"},errorMessage:{notBlank:"La condició no pot estar buida",formulaError:"Fórmula incorrecta",rangeError:"Selecció incorrecta"}}}}});
1
+ (function(e,a){typeof exports=="object"&&typeof module<"u"?module.exports=a():typeof define=="function"&&define.amd?define(a):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsConditionalFormattingUiCaES=a())})(this,(function(){"use strict";return{sheet:{cf:{title:"Format condicional",menu:{manageConditionalFormatting:"Gestiona el format condicional",createConditionalFormatting:"Crea format condicional",clearRangeRules:"Esborra les regles del rang seleccionat",clearWorkSheetRules:"Esborra les regles de tota la fulla"},form:{lessThan:"El valor ha de ser menor que {0}",lessThanOrEqual:"El valor ha de ser menor o igual que {0}",greaterThan:"El valor ha de ser més gran que {0}",greaterThanOrEqual:"El valor ha de ser més gran o igual que {0}",rangeSelector:"Selecciona un rang o introdueix un valor"},iconSet:{direction:"Direcció",shape:"Forma",mark:"Marca",rank:"Rang",rule:"Regla",icon:"Icona",type:"Tipus",value:"Valor",reverseIconOrder:"Inverteix l'ordre de les icones",and:"I",when:"Quan",onlyShowIcon:"Mostra només la icona"},symbol:{greaterThan:">",greaterThanOrEqual:">=",lessThan:"<",lessThanOrEqual:"<="},panel:{createRule:"Crea regla",clear:"Esborra totes les regles",range:"Aplica rang",styleType:"Tipus d'estil",submit:"Envia",cancel:"Cancel·la",rankAndAverage:"Superior/Inferior/Mitjana",styleRule:"Regla d'estil",isNotBottom:"Superior",isBottom:"Inferior",greaterThanAverage:"Més gran que la mitjana",lessThanAverage:"Menys que la mitjana",medianValue:"Valor mitjà",fillType:"Tipus d'emplenat",pureColor:"Color sòlid",gradient:"Gradient",colorSet:"Conjunt de colors",positive:"Positiu",native:"Negatiu",workSheet:"Tota la fulla",selectedRange:"Rang seleccionat",managerRuleSelect:"Gestiona les regles de {0}",onlyShowDataBar:"Mostra només les barres de dades"},preview:{describe:{beginsWith:"Comença amb {0}",endsWith:"Acaba amb {0}",containsText:"El text conté {0}",notContainsText:"El text no conté {0}",equal:"Igual a {0}",notEqual:"Diferent de {0}",containsBlanks:"Conté espais en blanc",notContainsBlanks:"No conté espais en blanc",containsErrors:"Conté errors",notContainsErrors:"No conté errors",greaterThan:"Més gran que {0}",greaterThanOrEqual:"Més gran o igual que {0}",lessThan:"Menys que {0}",lessThanOrEqual:"Menys o igual que {0}",notBetween:"No està entre {0} i {1}",between:"Entre {0} i {1}",yesterday:"Ahir",tomorrow:"Demà",last7Days:"Últims 7 dies",thisMonth:"Aquest mes",lastMonth:"Mes passat",nextMonth:"Mes següent",thisWeek:"Aquesta setmana",lastWeek:"Setmana passada",nextWeek:"Setmana següent",today:"Avui",topN:"Superior {0}",bottomN:"Inferior {0}",topNPercent:"Superior {0}%",bottomNPercent:"Inferior {0}%"}},operator:{beginsWith:"Comença amb",endsWith:"Acaba amb",containsText:"El text conté",notContainsText:"El text no conté",equal:"Igual a",notEqual:"Diferent de",containsBlanks:"Conté espais en blanc",notContainsBlanks:"No conté espais en blanc",containsErrors:"Conté errors",notContainsErrors:"No conté errors",greaterThan:"Més gran que",greaterThanOrEqual:"Més gran o igual que",lessThan:"Menys que",lessThanOrEqual:"Menys o igual que",notBetween:"No està entre",between:"Entre",yesterday:"Ahir",tomorrow:"Demà",last7Days:"Últims 7 dies",thisMonth:"Aquest mes",lastMonth:"Mes passat",nextMonth:"Mes següent",thisWeek:"Aquesta setmana",lastWeek:"Setmana passada",nextWeek:"Setmana següent",today:"Avui"},ruleType:{highlightCell:"Ressalta la cel·la",dataBar:"Barra de dades",colorScale:"Escala de colors",formula:"Fórmula personalitzada",iconSet:"Conjunt d'icones",duplicateValues:"Valors duplicats",uniqueValues:"Valors únics"},subRuleType:{uniqueValues:"Valors únics",duplicateValues:"Valors duplicats",rank:"Rang",text:"Text",timePeriod:"Període de temps",number:"Número",average:"Mitjana"},valueType:{num:"Número",min:"Mínim",max:"Màxim",percent:"Percentatge",percentile:"Percentil",formula:"Fórmula",none:"Cap"},errorMessage:{notBlank:"La condició no pot estar buida",formulaError:"Fórmula incorrecta",rangeError:"Selecció incorrecta"}}}}}));
@@ -1 +1 @@
1
- (function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsConditionalFormattingUiEnUS=t())})(this,function(){"use strict";return{sheet:{cf:{title:"Conditional Formatting",menu:{manageConditionalFormatting:"Manage Conditional Formatting",createConditionalFormatting:"Create Conditional Formatting",clearRangeRules:"Clear Rules for Selected Range",clearWorkSheetRules:"Clear Rules for Entire Sheet"},form:{lessThan:"The value must be less than {0}",lessThanOrEqual:"The value must be less than or equal to {0}",greaterThan:"The value must be greater than {0}",greaterThanOrEqual:"The value must be greater than or equal to {0}",rangeSelector:"Select Range or Enter Value"},iconSet:{direction:"Direction",shape:"Shape",mark:"Mark",rank:"Rank",rule:"Rule",icon:"Icon",type:"Type",value:"Value",reverseIconOrder:"Reverse Icon Order",and:"And",when:"When",onlyShowIcon:"Only Show Icon"},symbol:{greaterThan:">",greaterThanOrEqual:">=",lessThan:"<",lessThanOrEqual:"<="},panel:{createRule:"Create Rule",clear:"Clear All Rules",range:"Apply Range",styleType:"Style Type",submit:"Submit",cancel:"Cancel",rankAndAverage:"Top/Bottom/Average",styleRule:"Style Rule",isNotBottom:"Top",isBottom:"Bottom",greaterThanAverage:"Greater Than Average",lessThanAverage:"Less Than Average",medianValue:"Median Value",fillType:"Fill Type",pureColor:"Solid Color",gradient:"Gradient",colorSet:"Color Set",positive:"Positive",native:"Negative",workSheet:"Entire Sheet",selectedRange:"Selected Range",managerRuleSelect:"Manage {0} Rules",onlyShowDataBar:"Only Show Data Bars"},preview:{describe:{beginsWith:"Begins with {0}",endsWith:"Ends with {0}",containsText:"Text contains {0}",notContainsText:"Text does not contain {0}",equal:"Equal to {0}",notEqual:"Not equal to {0}",containsBlanks:"Contains Blanks",notContainsBlanks:"Does not contain Blanks",containsErrors:"Contains Errors",notContainsErrors:"Does not contain Errors",greaterThan:"Greater than {0}",greaterThanOrEqual:"Greater than or equal to {0}",lessThan:"Less than {0}",lessThanOrEqual:"Less than or equal to {0}",notBetween:"Not between {0} and {1}",between:"Between {0} and {1}",yesterday:"Yesterday",tomorrow:"Tomorrow",last7Days:"Last 7 Days",thisMonth:"This Month",lastMonth:"Last Month",nextMonth:"Next Month",thisWeek:"This Week",lastWeek:"Last Week",nextWeek:"Next Week",today:"Today",topN:"Top {0}",bottomN:"Bottom {0}",topNPercent:"Top {0}%",bottomNPercent:"Bottom {0}%"}},operator:{beginsWith:"Begins with",endsWith:"Ends with",containsText:"Text contains",notContainsText:"Text does not contain",equal:"Equal to",notEqual:"Not equal to",containsBlanks:"Contains Blanks",notContainsBlanks:"Does not contain Blanks",containsErrors:"Contains Errors",notContainsErrors:"Does not contain Errors",greaterThan:"Greater than",greaterThanOrEqual:"Greater than or equal to",lessThan:"Less than",lessThanOrEqual:"Less than or equal to",notBetween:"Not between",between:"Between",yesterday:"Yesterday",tomorrow:"Tomorrow",last7Days:"Last 7 Days",thisMonth:"This Month",lastMonth:"Last Month",nextMonth:"Next Month",thisWeek:"This Week",lastWeek:"Last Week",nextWeek:"Next Week",today:"Today"},ruleType:{highlightCell:"Highlight Cell",dataBar:"Data Bar",colorScale:"Color Scale",formula:"Custom Formula",iconSet:"Icon Set",duplicateValues:"Duplicate Values",uniqueValues:"Unique Values"},subRuleType:{uniqueValues:"Unique Values",duplicateValues:"Duplicate Values",rank:"Rank",text:"Text",timePeriod:"Time Period",number:"Number",average:"Average"},valueType:{num:"Number",min:"Minimum",max:"Maximum",percent:"Percentage",percentile:"Percentile",formula:"Formula",none:"None"},errorMessage:{notBlank:"Condition can not be empty",formulaError:"Wrong formula",rangeError:"Bad selection"}}}}});
1
+ (function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsConditionalFormattingUiEnUS=t())})(this,(function(){"use strict";return{sheet:{cf:{title:"Conditional Formatting",menu:{manageConditionalFormatting:"Manage Conditional Formatting",createConditionalFormatting:"Create Conditional Formatting",clearRangeRules:"Clear Rules for Selected Range",clearWorkSheetRules:"Clear Rules for Entire Sheet"},form:{lessThan:"The value must be less than {0}",lessThanOrEqual:"The value must be less than or equal to {0}",greaterThan:"The value must be greater than {0}",greaterThanOrEqual:"The value must be greater than or equal to {0}",rangeSelector:"Select Range or Enter Value"},iconSet:{direction:"Direction",shape:"Shape",mark:"Mark",rank:"Rank",rule:"Rule",icon:"Icon",type:"Type",value:"Value",reverseIconOrder:"Reverse Icon Order",and:"And",when:"When",onlyShowIcon:"Only Show Icon"},symbol:{greaterThan:">",greaterThanOrEqual:">=",lessThan:"<",lessThanOrEqual:"<="},panel:{createRule:"Create Rule",clear:"Clear All Rules",range:"Apply Range",styleType:"Style Type",submit:"Submit",cancel:"Cancel",rankAndAverage:"Top/Bottom/Average",styleRule:"Style Rule",isNotBottom:"Top",isBottom:"Bottom",greaterThanAverage:"Greater Than Average",lessThanAverage:"Less Than Average",medianValue:"Median Value",fillType:"Fill Type",pureColor:"Solid Color",gradient:"Gradient",colorSet:"Color Set",positive:"Positive",native:"Negative",workSheet:"Entire Sheet",selectedRange:"Selected Range",managerRuleSelect:"Manage {0} Rules",onlyShowDataBar:"Only Show Data Bars"},preview:{describe:{beginsWith:"Begins with {0}",endsWith:"Ends with {0}",containsText:"Text contains {0}",notContainsText:"Text does not contain {0}",equal:"Equal to {0}",notEqual:"Not equal to {0}",containsBlanks:"Contains Blanks",notContainsBlanks:"Does not contain Blanks",containsErrors:"Contains Errors",notContainsErrors:"Does not contain Errors",greaterThan:"Greater than {0}",greaterThanOrEqual:"Greater than or equal to {0}",lessThan:"Less than {0}",lessThanOrEqual:"Less than or equal to {0}",notBetween:"Not between {0} and {1}",between:"Between {0} and {1}",yesterday:"Yesterday",tomorrow:"Tomorrow",last7Days:"Last 7 Days",thisMonth:"This Month",lastMonth:"Last Month",nextMonth:"Next Month",thisWeek:"This Week",lastWeek:"Last Week",nextWeek:"Next Week",today:"Today",topN:"Top {0}",bottomN:"Bottom {0}",topNPercent:"Top {0}%",bottomNPercent:"Bottom {0}%"}},operator:{beginsWith:"Begins with",endsWith:"Ends with",containsText:"Text contains",notContainsText:"Text does not contain",equal:"Equal to",notEqual:"Not equal to",containsBlanks:"Contains Blanks",notContainsBlanks:"Does not contain Blanks",containsErrors:"Contains Errors",notContainsErrors:"Does not contain Errors",greaterThan:"Greater than",greaterThanOrEqual:"Greater than or equal to",lessThan:"Less than",lessThanOrEqual:"Less than or equal to",notBetween:"Not between",between:"Between",yesterday:"Yesterday",tomorrow:"Tomorrow",last7Days:"Last 7 Days",thisMonth:"This Month",lastMonth:"Last Month",nextMonth:"Next Month",thisWeek:"This Week",lastWeek:"Last Week",nextWeek:"Next Week",today:"Today"},ruleType:{highlightCell:"Highlight Cell",dataBar:"Data Bar",colorScale:"Color Scale",formula:"Custom Formula",iconSet:"Icon Set",duplicateValues:"Duplicate Values",uniqueValues:"Unique Values"},subRuleType:{uniqueValues:"Unique Values",duplicateValues:"Duplicate Values",rank:"Rank",text:"Text",timePeriod:"Time Period",number:"Number",average:"Average"},valueType:{num:"Number",min:"Minimum",max:"Maximum",percent:"Percentage",percentile:"Percentile",formula:"Formula",none:"None"},errorMessage:{notBlank:"Condition can not be empty",formulaError:"Wrong formula",rangeError:"Bad selection"}}}}}));
@@ -1 +1 @@
1
- (function(e,o){typeof exports=="object"&&typeof module<"u"?module.exports=o():typeof define=="function"&&define.amd?define(o):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsConditionalFormattingUiEsES=o())})(this,function(){"use strict";return{sheet:{cf:{title:"Formato condicional",menu:{manageConditionalFormatting:"Gestionar formato condicional",createConditionalFormatting:"Crear formato condicional",clearRangeRules:"Borrar reglas del rango seleccionado",clearWorkSheetRules:"Borrar reglas de toda la hoja"},form:{lessThan:"El valor debe ser menor que {0}",lessThanOrEqual:"El valor debe ser menor o igual que {0}",greaterThan:"El valor debe ser mayor que {0}",greaterThanOrEqual:"El valor debe ser mayor o igual que {0}",rangeSelector:"Selecciona un rango o introduce un valor"},iconSet:{direction:"Dirección",shape:"Forma",mark:"Marca",rank:"Rango",rule:"Regla",icon:"Icono",type:"Tipo",value:"Valor",reverseIconOrder:"Invertir orden de iconos",and:"Y",when:"Cuando",onlyShowIcon:"Mostrar solo icono"},symbol:{greaterThan:">",greaterThanOrEqual:">=",lessThan:"<",lessThanOrEqual:"<="},panel:{createRule:"Crear regla",clear:"Borrar todas las reglas",range:"Aplicar rango",styleType:"Tipo de estilo",submit:"Enviar",cancel:"Cancelar",rankAndAverage:"Superior/Inferior/Promedio",styleRule:"Regla de estilo",isNotBottom:"Superior",isBottom:"Inferior",greaterThanAverage:"Mayor que el promedio",lessThanAverage:"Menor que el promedio",medianValue:"Valor mediano",fillType:"Tipo de relleno",pureColor:"Color sólido",gradient:"Gradiente",colorSet:"Conjunto de colores",positive:"Positivo",native:"Negativo",workSheet:"Toda la hoja",selectedRange:"Rango seleccionado",managerRuleSelect:"Gestionar reglas de {0}",onlyShowDataBar:"Mostrar solo barras de datos"},preview:{describe:{beginsWith:"Empieza con {0}",endsWith:"Termina con {0}",containsText:"El texto contiene {0}",notContainsText:"El texto no contiene {0}",equal:"Igual a {0}",notEqual:"Distinto de {0}",containsBlanks:"Contiene espacios en blanco",notContainsBlanks:"No contiene espacios en blanco",containsErrors:"Contiene errores",notContainsErrors:"No contiene errores",greaterThan:"Mayor que {0}",greaterThanOrEqual:"Mayor o igual que {0}",lessThan:"Menor que {0}",lessThanOrEqual:"Menor o igual que {0}",notBetween:"No está entre {0} y {1}",between:"Entre {0} y {1}",yesterday:"Ayer",tomorrow:"Mañana",last7Days:"Últimos 7 días",thisMonth:"Este mes",lastMonth:"Mes pasado",nextMonth:"Mes siguiente",thisWeek:"Esta semana",lastWeek:"Semana pasada",nextWeek:"Semana siguiente",today:"Hoy",topN:"Top {0}",bottomN:"Inferior {0}",topNPercent:"Top {0}%",bottomNPercent:"Inferior {0}%"}},operator:{beginsWith:"Empieza con",endsWith:"Termina con",containsText:"El texto contiene",notContainsText:"El texto no contiene",equal:"Igual a",notEqual:"Distinto de",containsBlanks:"Contiene espacios en blanco",notContainsBlanks:"No contiene espacios en blanco",containsErrors:"Contiene errores",notContainsErrors:"No contiene errores",greaterThan:"Mayor que",greaterThanOrEqual:"Mayor o igual que",lessThan:"Menor que",lessThanOrEqual:"Menor o igual que",notBetween:"No está entre",between:"Entre",yesterday:"Ayer",tomorrow:"Mañana",last7Days:"Últimos 7 días",thisMonth:"Este mes",lastMonth:"Mes pasado",nextMonth:"Mes siguiente",thisWeek:"Esta semana",lastWeek:"Semana pasada",nextWeek:"Semana siguiente",today:"Hoy"},ruleType:{highlightCell:"Resaltar celda",dataBar:"Barra de datos",colorScale:"Escala de colores",formula:"Fórmula personalizada",iconSet:"Conjunto de iconos",duplicateValues:"Valores duplicados",uniqueValues:"Valores únicos"},subRuleType:{uniqueValues:"Valores únicos",duplicateValues:"Valores duplicados",rank:"Rango",text:"Texto",timePeriod:"Periodo de tiempo",number:"Número",average:"Promedio"},valueType:{num:"Número",min:"Mínimo",max:"Máximo",percent:"Porcentaje",percentile:"Percentil",formula:"Fórmula",none:"Ninguno"},errorMessage:{notBlank:"La condición no puede estar vacía",formulaError:"Fórmula incorrecta",rangeError:"Selección incorrecta"}}}}});
1
+ (function(e,o){typeof exports=="object"&&typeof module<"u"?module.exports=o():typeof define=="function"&&define.amd?define(o):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsConditionalFormattingUiEsES=o())})(this,(function(){"use strict";return{sheet:{cf:{title:"Formato condicional",menu:{manageConditionalFormatting:"Gestionar formato condicional",createConditionalFormatting:"Crear formato condicional",clearRangeRules:"Borrar reglas del rango seleccionado",clearWorkSheetRules:"Borrar reglas de toda la hoja"},form:{lessThan:"El valor debe ser menor que {0}",lessThanOrEqual:"El valor debe ser menor o igual que {0}",greaterThan:"El valor debe ser mayor que {0}",greaterThanOrEqual:"El valor debe ser mayor o igual que {0}",rangeSelector:"Selecciona un rango o introduce un valor"},iconSet:{direction:"Dirección",shape:"Forma",mark:"Marca",rank:"Rango",rule:"Regla",icon:"Icono",type:"Tipo",value:"Valor",reverseIconOrder:"Invertir orden de iconos",and:"Y",when:"Cuando",onlyShowIcon:"Mostrar solo icono"},symbol:{greaterThan:">",greaterThanOrEqual:">=",lessThan:"<",lessThanOrEqual:"<="},panel:{createRule:"Crear regla",clear:"Borrar todas las reglas",range:"Aplicar rango",styleType:"Tipo de estilo",submit:"Enviar",cancel:"Cancelar",rankAndAverage:"Superior/Inferior/Promedio",styleRule:"Regla de estilo",isNotBottom:"Superior",isBottom:"Inferior",greaterThanAverage:"Mayor que el promedio",lessThanAverage:"Menor que el promedio",medianValue:"Valor mediano",fillType:"Tipo de relleno",pureColor:"Color sólido",gradient:"Gradiente",colorSet:"Conjunto de colores",positive:"Positivo",native:"Negativo",workSheet:"Toda la hoja",selectedRange:"Rango seleccionado",managerRuleSelect:"Gestionar reglas de {0}",onlyShowDataBar:"Mostrar solo barras de datos"},preview:{describe:{beginsWith:"Empieza con {0}",endsWith:"Termina con {0}",containsText:"El texto contiene {0}",notContainsText:"El texto no contiene {0}",equal:"Igual a {0}",notEqual:"Distinto de {0}",containsBlanks:"Contiene espacios en blanco",notContainsBlanks:"No contiene espacios en blanco",containsErrors:"Contiene errores",notContainsErrors:"No contiene errores",greaterThan:"Mayor que {0}",greaterThanOrEqual:"Mayor o igual que {0}",lessThan:"Menor que {0}",lessThanOrEqual:"Menor o igual que {0}",notBetween:"No está entre {0} y {1}",between:"Entre {0} y {1}",yesterday:"Ayer",tomorrow:"Mañana",last7Days:"Últimos 7 días",thisMonth:"Este mes",lastMonth:"Mes pasado",nextMonth:"Mes siguiente",thisWeek:"Esta semana",lastWeek:"Semana pasada",nextWeek:"Semana siguiente",today:"Hoy",topN:"Top {0}",bottomN:"Inferior {0}",topNPercent:"Top {0}%",bottomNPercent:"Inferior {0}%"}},operator:{beginsWith:"Empieza con",endsWith:"Termina con",containsText:"El texto contiene",notContainsText:"El texto no contiene",equal:"Igual a",notEqual:"Distinto de",containsBlanks:"Contiene espacios en blanco",notContainsBlanks:"No contiene espacios en blanco",containsErrors:"Contiene errores",notContainsErrors:"No contiene errores",greaterThan:"Mayor que",greaterThanOrEqual:"Mayor o igual que",lessThan:"Menor que",lessThanOrEqual:"Menor o igual que",notBetween:"No está entre",between:"Entre",yesterday:"Ayer",tomorrow:"Mañana",last7Days:"Últimos 7 días",thisMonth:"Este mes",lastMonth:"Mes pasado",nextMonth:"Mes siguiente",thisWeek:"Esta semana",lastWeek:"Semana pasada",nextWeek:"Semana siguiente",today:"Hoy"},ruleType:{highlightCell:"Resaltar celda",dataBar:"Barra de datos",colorScale:"Escala de colores",formula:"Fórmula personalizada",iconSet:"Conjunto de iconos",duplicateValues:"Valores duplicados",uniqueValues:"Valores únicos"},subRuleType:{uniqueValues:"Valores únicos",duplicateValues:"Valores duplicados",rank:"Rango",text:"Texto",timePeriod:"Periodo de tiempo",number:"Número",average:"Promedio"},valueType:{num:"Número",min:"Mínimo",max:"Máximo",percent:"Porcentaje",percentile:"Percentil",formula:"Fórmula",none:"Ninguno"},errorMessage:{notBlank:"La condición no puede estar vacía",formulaError:"Fórmula incorrecta",rangeError:"Selección incorrecta"}}}}}));
@@ -1 +1 @@
1
- (function(e,n){typeof exports=="object"&&typeof module<"u"?module.exports=n():typeof define=="function"&&define.amd?define(n):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsConditionalFormattingUiFaIR=n())})(this,function(){"use strict";return{sheet:{cf:{title:"قالب‌بندی شرطی",menu:{manageConditionalFormatting:"مدیریت قالب‌بندی شرطی",createConditionalFormatting:"ایجاد قالب‌بندی شرطی",clearRangeRules:"پاک کردن قوانین برای محدوده انتخاب شده",clearWorkSheetRules:"پاک کردن قوانین برای کل برگ"},form:{lessThan:"مقدار باید کمتر از {0} باشد",lessThanOrEqual:"مقدار باید کمتر از یا برابر با {0} باشد",greaterThan:"مقدار باید بزرگتر از {0} باشد",greaterThanOrEqual:"مقدار باید بزرگتر از یا برابر با {0} باشد",rangeSelector:"انتخاب محدوده یا وارد کردن مقدار"},iconSet:{direction:"جهت",shape:"شکل",mark:"علامت",rank:"رتبه",rule:"قانون",icon:"آیکون",type:"نوع",value:"مقدار",reverseIconOrder:"معکوس کردن ترتیب آیکون",and:"و",when:"هنگامی که",onlyShowIcon:"فقط نمایش آیکون"},symbol:{greaterThan:">",greaterThanOrEqual:">=",lessThan:"<",lessThanOrEqual:"<="},panel:{createRule:"ایجاد قانون",clear:"پاک کردن همه قوانین",range:"اعمال محدوده",styleType:"نوع سبک",submit:"ارسال",cancel:"انصراف",rankAndAverage:"بالا/پایین/میانگین",styleRule:"قانون سبک",isNotBottom:"بالا",isBottom:"پایین",greaterThanAverage:"بزرگتر از میانگین",lessThanAverage:"کوچکتر از میانگین",medianValue:"مقدار میانه",fillType:"نوع پر کردن",pureColor:"رنگ جامد",gradient:"شیب رنگی",colorSet:"مجموعه رنگ",positive:"مثبت",native:"منفی",workSheet:"کل برگ",selectedRange:"محدوده انتخاب شده",managerRuleSelect:"مدیریت {0} قوانین",onlyShowDataBar:"فقط نمایش نوار داده"},preview:{describe:{beginsWith:"با {0} شروع می‌شود",endsWith:"با {0} پایان می‌یابد",containsText:"شامل متن {0} است",notContainsText:"شامل متن {0} نیست",equal:"برابر است با {0}",notEqual:"برابر نیست با {0}",containsBlanks:"شامل مقادیر خالی است",notContainsBlanks:"شامل مقادیر خالی نیست",containsErrors:"شامل خطاها است",notContainsErrors:"شامل خطاها نیست",greaterThan:"بزرگتر از {0}",greaterThanOrEqual:"بزرگتر از یا برابر با {0}",lessThan:"کوچکتر از {0}",lessThanOrEqual:"کوچکتر از یا برابر با {0}",notBetween:"بین {0} و {1} نیست",between:"بین {0} و {1}",yesterday:"دیروز",tomorrow:"فردا",last7Days:"7 روز گذشته",thisMonth:"این ماه",lastMonth:"ماه گذشته",nextMonth:"ماه آینده",thisWeek:"این هفته",lastWeek:"هفته گذشته",nextWeek:"هفته آینده",today:"امروز",topN:"{0} برتر",bottomN:"{0} پایین‌تر",topNPercent:"{0}% برتر",bottomNPercent:"{0}% پایین‌تر"}},operator:{beginsWith:"با ... شروع می‌شود",endsWith:"با ... پایان می‌یابد",containsText:"شامل متن ... است",notContainsText:"شامل متن ... نیست",equal:"برابر است با",notEqual:"برابر نیست با",containsBlanks:"شامل مقادیر خالی است",notContainsBlanks:"شامل مقادیر خالی نیست",containsErrors:"شامل خطاها است",notContainsErrors:"شامل خطاها نیست",greaterThan:"بزرگتر از",greaterThanOrEqual:"بزرگتر از یا برابر با",lessThan:"کوچکتر از",lessThanOrEqual:"کوچکتر از یا برابر با",notBetween:"بین ... و ... نیست",between:"بین ... و ...",yesterday:"دیروز",tomorrow:"فردا",last7Days:"7 روز گذشته",thisMonth:"این ماه",lastMonth:"ماه گذشته",nextMonth:"ماه آینده",thisWeek:"این هفته",lastWeek:"هفته گذشته",nextWeek:"هفته آینده",today:"امروز"},ruleType:{highlightCell:"برجسته کردن سلول",dataBar:"نوار داده",colorScale:"مقیاس رنگی",formula:"فرمول سفارشی",iconSet:"مجموعه آیکون",duplicateValues:"مقادیر تکراری",uniqueValues:"مقادیر منحصربه‌فرد"},subRuleType:{uniqueValues:"مقادیر منحصربه‌فرد",duplicateValues:"مقادیر تکراری",rank:"رتبه",text:"متن",timePeriod:"دوره زمانی",number:"عدد",average:"میانگین"},valueType:{num:"عدد",min:"حداقل",max:"حداکثر",percent:"درصد",percentile:"درصد صدک",formula:"فرمول",none:"هیچ کدام"},errorMessage:{notBlank:"شرط نمی‌تواند خالی باشد",formulaError:"فرمول اشتباه",rangeError:"Bad selection"}}}}});
1
+ (function(e,n){typeof exports=="object"&&typeof module<"u"?module.exports=n():typeof define=="function"&&define.amd?define(n):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsConditionalFormattingUiFaIR=n())})(this,(function(){"use strict";return{sheet:{cf:{title:"قالب‌بندی شرطی",menu:{manageConditionalFormatting:"مدیریت قالب‌بندی شرطی",createConditionalFormatting:"ایجاد قالب‌بندی شرطی",clearRangeRules:"پاک کردن قوانین برای محدوده انتخاب شده",clearWorkSheetRules:"پاک کردن قوانین برای کل برگ"},form:{lessThan:"مقدار باید کمتر از {0} باشد",lessThanOrEqual:"مقدار باید کمتر از یا برابر با {0} باشد",greaterThan:"مقدار باید بزرگتر از {0} باشد",greaterThanOrEqual:"مقدار باید بزرگتر از یا برابر با {0} باشد",rangeSelector:"انتخاب محدوده یا وارد کردن مقدار"},iconSet:{direction:"جهت",shape:"شکل",mark:"علامت",rank:"رتبه",rule:"قانون",icon:"آیکون",type:"نوع",value:"مقدار",reverseIconOrder:"معکوس کردن ترتیب آیکون",and:"و",when:"هنگامی که",onlyShowIcon:"فقط نمایش آیکون"},symbol:{greaterThan:">",greaterThanOrEqual:">=",lessThan:"<",lessThanOrEqual:"<="},panel:{createRule:"ایجاد قانون",clear:"پاک کردن همه قوانین",range:"اعمال محدوده",styleType:"نوع سبک",submit:"ارسال",cancel:"انصراف",rankAndAverage:"بالا/پایین/میانگین",styleRule:"قانون سبک",isNotBottom:"بالا",isBottom:"پایین",greaterThanAverage:"بزرگتر از میانگین",lessThanAverage:"کوچکتر از میانگین",medianValue:"مقدار میانه",fillType:"نوع پر کردن",pureColor:"رنگ جامد",gradient:"شیب رنگی",colorSet:"مجموعه رنگ",positive:"مثبت",native:"منفی",workSheet:"کل برگ",selectedRange:"محدوده انتخاب شده",managerRuleSelect:"مدیریت {0} قوانین",onlyShowDataBar:"فقط نمایش نوار داده"},preview:{describe:{beginsWith:"با {0} شروع می‌شود",endsWith:"با {0} پایان می‌یابد",containsText:"شامل متن {0} است",notContainsText:"شامل متن {0} نیست",equal:"برابر است با {0}",notEqual:"برابر نیست با {0}",containsBlanks:"شامل مقادیر خالی است",notContainsBlanks:"شامل مقادیر خالی نیست",containsErrors:"شامل خطاها است",notContainsErrors:"شامل خطاها نیست",greaterThan:"بزرگتر از {0}",greaterThanOrEqual:"بزرگتر از یا برابر با {0}",lessThan:"کوچکتر از {0}",lessThanOrEqual:"کوچکتر از یا برابر با {0}",notBetween:"بین {0} و {1} نیست",between:"بین {0} و {1}",yesterday:"دیروز",tomorrow:"فردا",last7Days:"7 روز گذشته",thisMonth:"این ماه",lastMonth:"ماه گذشته",nextMonth:"ماه آینده",thisWeek:"این هفته",lastWeek:"هفته گذشته",nextWeek:"هفته آینده",today:"امروز",topN:"{0} برتر",bottomN:"{0} پایین‌تر",topNPercent:"{0}% برتر",bottomNPercent:"{0}% پایین‌تر"}},operator:{beginsWith:"با ... شروع می‌شود",endsWith:"با ... پایان می‌یابد",containsText:"شامل متن ... است",notContainsText:"شامل متن ... نیست",equal:"برابر است با",notEqual:"برابر نیست با",containsBlanks:"شامل مقادیر خالی است",notContainsBlanks:"شامل مقادیر خالی نیست",containsErrors:"شامل خطاها است",notContainsErrors:"شامل خطاها نیست",greaterThan:"بزرگتر از",greaterThanOrEqual:"بزرگتر از یا برابر با",lessThan:"کوچکتر از",lessThanOrEqual:"کوچکتر از یا برابر با",notBetween:"بین ... و ... نیست",between:"بین ... و ...",yesterday:"دیروز",tomorrow:"فردا",last7Days:"7 روز گذشته",thisMonth:"این ماه",lastMonth:"ماه گذشته",nextMonth:"ماه آینده",thisWeek:"این هفته",lastWeek:"هفته گذشته",nextWeek:"هفته آینده",today:"امروز"},ruleType:{highlightCell:"برجسته کردن سلول",dataBar:"نوار داده",colorScale:"مقیاس رنگی",formula:"فرمول سفارشی",iconSet:"مجموعه آیکون",duplicateValues:"مقادیر تکراری",uniqueValues:"مقادیر منحصربه‌فرد"},subRuleType:{uniqueValues:"مقادیر منحصربه‌فرد",duplicateValues:"مقادیر تکراری",rank:"رتبه",text:"متن",timePeriod:"دوره زمانی",number:"عدد",average:"میانگین"},valueType:{num:"عدد",min:"حداقل",max:"حداکثر",percent:"درصد",percentile:"درصد صدک",formula:"فرمول",none:"هیچ کدام"},errorMessage:{notBlank:"شرط نمی‌تواند خالی باشد",formulaError:"فرمول اشتباه",rangeError:"Bad selection"}}}}}));
@@ -1 +1 @@
1
- (function(e,n){typeof exports=="object"&&typeof module<"u"?module.exports=n():typeof define=="function"&&define.amd?define(n):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsConditionalFormattingUiFrFR=n())})(this,function(){"use strict";return{sheet:{cf:{title:"Mise en forme conditionnelle",menu:{manageConditionalFormatting:"Gérer la mise en forme conditionnelle",createConditionalFormatting:"Créer une mise en forme conditionnelle",clearRangeRules:"Effacer les règles pour la plage sélectionnée",clearWorkSheetRules:"Effacer les règles pour toute la feuille"},form:{lessThan:"La valeur doit être inférieure à {0}",lessThanOrEqual:"La valeur doit être inférieure ou égale à {0}",greaterThan:"La valeur doit être supérieure à {0}",greaterThanOrEqual:"La valeur doit être supérieure ou égale à {0}",rangeSelector:"Sélectionner une plage ou entrer une valeur"},iconSet:{direction:"Direction",shape:"Forme",mark:"Marque",rank:"Rang",rule:"Règle",icon:"Icône",type:"Type",value:"Valeur",reverseIconOrder:"Inverser l'ordre des icônes",and:"Et",when:"Quand",onlyShowIcon:"Afficher uniquement l'icône"},symbol:{greaterThan:">",greaterThanOrEqual:">=",lessThan:"<",lessThanOrEqual:"<="},panel:{createRule:"Créer une règle",clear:"Effacer toutes les règles",range:"Appliquer la plage",styleType:"Type de style",submit:"Soumettre",cancel:"Annuler",rankAndAverage:"Haut/Bas/Moyenne",styleRule:"Règle de style",isNotBottom:"Haut",isBottom:"Bas",greaterThanAverage:"Supérieur à la moyenne",lessThanAverage:"Inférieur à la moyenne",medianValue:"Valeur médiane",fillType:"Type de remplissage",pureColor:"Couleur unie",gradient:"Dégradé",colorSet:"Ensemble de couleurs",positive:"Positif",native:"Négatif",workSheet:"Toute la feuille",selectedRange:"Plage sélectionnée",managerRuleSelect:"Gérer les règles de {0}",onlyShowDataBar:"Afficher uniquement les barres de données"},preview:{describe:{beginsWith:"Commence par {0}",endsWith:"Se termine par {0}",containsText:"Le texte contient {0}",notContainsText:"Le texte ne contient pas {0}",equal:"Égal à {0}",notEqual:"Différent de {0}",containsBlanks:"Contient des blancs",notContainsBlanks:"Ne contient pas de blancs",containsErrors:"Contient des erreurs",notContainsErrors:"Ne contient pas d'erreurs",greaterThan:"Supérieur à {0}",greaterThanOrEqual:"Supérieur ou égal à {0}",lessThan:"Inférieur à {0}",lessThanOrEqual:"Inférieur ou égal à {0}",notBetween:"Pas entre {0} et {1}",between:"Entre {0} et {1}",yesterday:"Hier",tomorrow:"Demain",last7Days:"Les 7 derniers jours",thisMonth:"Ce mois-ci",lastMonth:"Le mois dernier",nextMonth:"Le mois prochain",thisWeek:"Cette semaine",lastWeek:"La semaine dernière",nextWeek:"La semaine prochaine",today:"Aujourd'hui",topN:"Top {0}",bottomN:"Bas {0}",topNPercent:"Top {0}%",bottomNPercent:"Bas {0}%"}},operator:{beginsWith:"Commence par",endsWith:"Se termine par",containsText:"Le texte contient",notContainsText:"Le texte ne contient pas",equal:"Égal à",notEqual:"Différent de",containsBlanks:"Contient des blancs",notContainsBlanks:"Ne contient pas de blancs",containsErrors:"Contient des erreurs",notContainsErrors:"Ne contient pas d'erreurs",greaterThan:"Supérieur à",greaterThanOrEqual:"Supérieur ou égal à",lessThan:"Inférieur à",lessThanOrEqual:"Inférieur ou égal à",notBetween:"Pas entre",between:"Entre",yesterday:"Hier",tomorrow:"Demain",last7Days:"Les 7 derniers jours",thisMonth:"Ce mois-ci",lastMonth:"Le mois dernier",nextMonth:"Le mois prochain",thisWeek:"Cette semaine",lastWeek:"La semaine dernière",nextWeek:"La semaine prochaine",today:"Aujourd'hui"},ruleType:{highlightCell:"Mettre en surbrillance la cellule",dataBar:"Barre de données",colorScale:"Échelle de couleurs",formula:"Formule personnalisée",iconSet:"Jeu d'icônes",duplicateValues:"Valeurs en double",uniqueValues:"Valeurs uniques"},subRuleType:{uniqueValues:"Valeurs uniques",duplicateValues:"Valeurs en double",rank:"Rang",text:"Texte",timePeriod:"Période",number:"Nombre",average:"Moyenne"},valueType:{num:"Nombre",min:"Minimum",max:"Maximum",percent:"Pourcentage",percentile:"Percentile",formula:"Formule",none:"Aucun"},errorMessage:{notBlank:"La condition ne peut pas être vide",rangeError:"Plage invalide",formulaError:"Formule incorrecte"}}}}});
1
+ (function(e,n){typeof exports=="object"&&typeof module<"u"?module.exports=n():typeof define=="function"&&define.amd?define(n):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsConditionalFormattingUiFrFR=n())})(this,(function(){"use strict";return{sheet:{cf:{title:"Mise en forme conditionnelle",menu:{manageConditionalFormatting:"Gérer la mise en forme conditionnelle",createConditionalFormatting:"Créer une mise en forme conditionnelle",clearRangeRules:"Effacer les règles pour la plage sélectionnée",clearWorkSheetRules:"Effacer les règles pour toute la feuille"},form:{lessThan:"La valeur doit être inférieure à {0}",lessThanOrEqual:"La valeur doit être inférieure ou égale à {0}",greaterThan:"La valeur doit être supérieure à {0}",greaterThanOrEqual:"La valeur doit être supérieure ou égale à {0}",rangeSelector:"Sélectionner une plage ou entrer une valeur"},iconSet:{direction:"Direction",shape:"Forme",mark:"Marque",rank:"Rang",rule:"Règle",icon:"Icône",type:"Type",value:"Valeur",reverseIconOrder:"Inverser l'ordre des icônes",and:"Et",when:"Quand",onlyShowIcon:"Afficher uniquement l'icône"},symbol:{greaterThan:">",greaterThanOrEqual:">=",lessThan:"<",lessThanOrEqual:"<="},panel:{createRule:"Créer une règle",clear:"Effacer toutes les règles",range:"Appliquer la plage",styleType:"Type de style",submit:"Soumettre",cancel:"Annuler",rankAndAverage:"Haut/Bas/Moyenne",styleRule:"Règle de style",isNotBottom:"Haut",isBottom:"Bas",greaterThanAverage:"Supérieur à la moyenne",lessThanAverage:"Inférieur à la moyenne",medianValue:"Valeur médiane",fillType:"Type de remplissage",pureColor:"Couleur unie",gradient:"Dégradé",colorSet:"Ensemble de couleurs",positive:"Positif",native:"Négatif",workSheet:"Toute la feuille",selectedRange:"Plage sélectionnée",managerRuleSelect:"Gérer les règles de {0}",onlyShowDataBar:"Afficher uniquement les barres de données"},preview:{describe:{beginsWith:"Commence par {0}",endsWith:"Se termine par {0}",containsText:"Le texte contient {0}",notContainsText:"Le texte ne contient pas {0}",equal:"Égal à {0}",notEqual:"Différent de {0}",containsBlanks:"Contient des blancs",notContainsBlanks:"Ne contient pas de blancs",containsErrors:"Contient des erreurs",notContainsErrors:"Ne contient pas d'erreurs",greaterThan:"Supérieur à {0}",greaterThanOrEqual:"Supérieur ou égal à {0}",lessThan:"Inférieur à {0}",lessThanOrEqual:"Inférieur ou égal à {0}",notBetween:"Pas entre {0} et {1}",between:"Entre {0} et {1}",yesterday:"Hier",tomorrow:"Demain",last7Days:"Les 7 derniers jours",thisMonth:"Ce mois-ci",lastMonth:"Le mois dernier",nextMonth:"Le mois prochain",thisWeek:"Cette semaine",lastWeek:"La semaine dernière",nextWeek:"La semaine prochaine",today:"Aujourd'hui",topN:"Top {0}",bottomN:"Bas {0}",topNPercent:"Top {0}%",bottomNPercent:"Bas {0}%"}},operator:{beginsWith:"Commence par",endsWith:"Se termine par",containsText:"Le texte contient",notContainsText:"Le texte ne contient pas",equal:"Égal à",notEqual:"Différent de",containsBlanks:"Contient des blancs",notContainsBlanks:"Ne contient pas de blancs",containsErrors:"Contient des erreurs",notContainsErrors:"Ne contient pas d'erreurs",greaterThan:"Supérieur à",greaterThanOrEqual:"Supérieur ou égal à",lessThan:"Inférieur à",lessThanOrEqual:"Inférieur ou égal à",notBetween:"Pas entre",between:"Entre",yesterday:"Hier",tomorrow:"Demain",last7Days:"Les 7 derniers jours",thisMonth:"Ce mois-ci",lastMonth:"Le mois dernier",nextMonth:"Le mois prochain",thisWeek:"Cette semaine",lastWeek:"La semaine dernière",nextWeek:"La semaine prochaine",today:"Aujourd'hui"},ruleType:{highlightCell:"Mettre en surbrillance la cellule",dataBar:"Barre de données",colorScale:"Échelle de couleurs",formula:"Formule personnalisée",iconSet:"Jeu d'icônes",duplicateValues:"Valeurs en double",uniqueValues:"Valeurs uniques"},subRuleType:{uniqueValues:"Valeurs uniques",duplicateValues:"Valeurs en double",rank:"Rang",text:"Texte",timePeriod:"Période",number:"Nombre",average:"Moyenne"},valueType:{num:"Nombre",min:"Minimum",max:"Maximum",percent:"Pourcentage",percentile:"Percentile",formula:"Formule",none:"Aucun"},errorMessage:{notBlank:"La condition ne peut pas être vide",rangeError:"Plage invalide",formulaError:"Formule incorrecte"}}}}}));
@@ -1 +1 @@
1
- (function(e,n){typeof exports=="object"&&typeof module<"u"?module.exports=n():typeof define=="function"&&define.amd?define(n):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsConditionalFormattingUiKoKR=n())})(this,function(){"use strict";return{sheet:{cf:{title:"조건부 서식",menu:{manageConditionalFormatting:"조건부 서식 관리",createConditionalFormatting:"조건부 서식 만들기",clearRangeRules:"선택 영역 규칙 지우기",clearWorkSheetRules:"시트 전체 규칙 지우기"},form:{lessThan:"{0}보다 작음",lessThanOrEqual:"{0} 이하",greaterThan:"{0}보다 큼",greaterThanOrEqual:"{0} 이상",rangeSelector:"범위 선택 또는 값 입력"},iconSet:{direction:"방향",shape:"모양",mark:"표식",rank:"순위",rule:"규칙",icon:"아이콘",type:"유형",value:"값",reverseIconOrder:"아이콘 순서 반대로",and:"그리고",when:"조건",onlyShowIcon:"아이콘만 표시"},symbol:{greaterThan:">",greaterThanOrEqual:"≥",lessThan:"<",lessThanOrEqual:"≤"},panel:{createRule:"규칙 만들기",clear:"모든 규칙 지우기",range:"적용 범위",styleType:"스타일 유형",submit:"확인",cancel:"취소",rankAndAverage:"상위/하위/평균",styleRule:"스타일 규칙",isNotBottom:"상위",isBottom:"하위",greaterThanAverage:"평균 초과",lessThanAverage:"평균 미만",medianValue:"중앙값",fillType:"채우기 유형",pureColor:"단색",gradient:"그라데이션",colorSet:"색상 세트",positive:"양수",native:"음수",workSheet:"시트 전체",selectedRange:"선택 영역",managerRuleSelect:"{0} 규칙 관리",onlyShowDataBar:"데이터 막대만 표시"},preview:{describe:{beginsWith:"{0}로 시작",endsWith:"{0}로 끝남",containsText:"{0} 포함",notContainsText:"{0} 미포함",equal:"{0}와 같음",notEqual:"{0}와 다름",containsBlanks:"빈 셀 포함",notContainsBlanks:"빈 셀 미포함",containsErrors:"오류 포함",notContainsErrors:"오류 미포함",greaterThan:"{0}보다 큼",greaterThanOrEqual:"{0} 이상",lessThan:"{0}보다 작음",lessThanOrEqual:"{0} 이하",notBetween:"{0}와 {1} 사이 아님",between:"{0}와 {1} 사이",yesterday:"어제",tomorrow:"내일",last7Days:"최근 7일",thisMonth:"이번 달",lastMonth:"지난 달",nextMonth:"다음 달",thisWeek:"이번 주",lastWeek:"지난 주",nextWeek:"다음 주",today:"오늘",topN:"상위 {0}개",bottomN:"하위 {0}개",topNPercent:"상위 {0}%",bottomNPercent:"하위 {0}%"}},operator:{beginsWith:"로 시작",endsWith:"로 끝남",containsText:"포함",notContainsText:"미포함",equal:"같음",notEqual:"다름",containsBlanks:"빈 셀 포함",notContainsBlanks:"빈 셀 미포함",containsErrors:"오류 포함",notContainsErrors:"오류 미포함",greaterThan:"보다 큼",greaterThanOrEqual:"이상",lessThan:"보다 작음",lessThanOrEqual:"이하",notBetween:"사이 아님",between:"사이",yesterday:"어제",tomorrow:"내일",last7Days:"최근 7일",thisMonth:"이번 달",lastMonth:"지난 달",nextMonth:"다음 달",thisWeek:"이번 주",lastWeek:"지난 주",nextWeek:"다음 주",today:"오늘"},ruleType:{highlightCell:"셀 강조",dataBar:"데이터 막대",colorScale:"색상 눈금",formula:"사용자 지정 수식",iconSet:"아이콘 집합",duplicateValues:"중복 값",uniqueValues:"고유 값"},subRuleType:{uniqueValues:"고유 값",duplicateValues:"중복 값",rank:"순위",text:"텍스트",timePeriod:"기간",number:"숫자",average:"평균"},valueType:{num:"숫자",min:"최소값",max:"최대값",percent:"백분율",percentile:"백분위수",formula:"수식",none:"없음"},errorMessage:{notBlank:"조건을 비울 수 없습니다.",formulaError:"잘못된 수식입니다.",rangeError:"잘못된 선택 영역입니다."}}}}});
1
+ (function(e,n){typeof exports=="object"&&typeof module<"u"?module.exports=n():typeof define=="function"&&define.amd?define(n):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsConditionalFormattingUiKoKR=n())})(this,(function(){"use strict";return{sheet:{cf:{title:"조건부 서식",menu:{manageConditionalFormatting:"조건부 서식 관리",createConditionalFormatting:"조건부 서식 만들기",clearRangeRules:"선택 영역 규칙 지우기",clearWorkSheetRules:"시트 전체 규칙 지우기"},form:{lessThan:"{0}보다 작음",lessThanOrEqual:"{0} 이하",greaterThan:"{0}보다 큼",greaterThanOrEqual:"{0} 이상",rangeSelector:"범위 선택 또는 값 입력"},iconSet:{direction:"방향",shape:"모양",mark:"표식",rank:"순위",rule:"규칙",icon:"아이콘",type:"유형",value:"값",reverseIconOrder:"아이콘 순서 반대로",and:"그리고",when:"조건",onlyShowIcon:"아이콘만 표시"},symbol:{greaterThan:">",greaterThanOrEqual:"≥",lessThan:"<",lessThanOrEqual:"≤"},panel:{createRule:"규칙 만들기",clear:"모든 규칙 지우기",range:"적용 범위",styleType:"스타일 유형",submit:"확인",cancel:"취소",rankAndAverage:"상위/하위/평균",styleRule:"스타일 규칙",isNotBottom:"상위",isBottom:"하위",greaterThanAverage:"평균 초과",lessThanAverage:"평균 미만",medianValue:"중앙값",fillType:"채우기 유형",pureColor:"단색",gradient:"그라데이션",colorSet:"색상 세트",positive:"양수",native:"음수",workSheet:"시트 전체",selectedRange:"선택 영역",managerRuleSelect:"{0} 규칙 관리",onlyShowDataBar:"데이터 막대만 표시"},preview:{describe:{beginsWith:"{0}로 시작",endsWith:"{0}로 끝남",containsText:"{0} 포함",notContainsText:"{0} 미포함",equal:"{0}와 같음",notEqual:"{0}와 다름",containsBlanks:"빈 셀 포함",notContainsBlanks:"빈 셀 미포함",containsErrors:"오류 포함",notContainsErrors:"오류 미포함",greaterThan:"{0}보다 큼",greaterThanOrEqual:"{0} 이상",lessThan:"{0}보다 작음",lessThanOrEqual:"{0} 이하",notBetween:"{0}와 {1} 사이 아님",between:"{0}와 {1} 사이",yesterday:"어제",tomorrow:"내일",last7Days:"최근 7일",thisMonth:"이번 달",lastMonth:"지난 달",nextMonth:"다음 달",thisWeek:"이번 주",lastWeek:"지난 주",nextWeek:"다음 주",today:"오늘",topN:"상위 {0}개",bottomN:"하위 {0}개",topNPercent:"상위 {0}%",bottomNPercent:"하위 {0}%"}},operator:{beginsWith:"로 시작",endsWith:"로 끝남",containsText:"포함",notContainsText:"미포함",equal:"같음",notEqual:"다름",containsBlanks:"빈 셀 포함",notContainsBlanks:"빈 셀 미포함",containsErrors:"오류 포함",notContainsErrors:"오류 미포함",greaterThan:"보다 큼",greaterThanOrEqual:"이상",lessThan:"보다 작음",lessThanOrEqual:"이하",notBetween:"사이 아님",between:"사이",yesterday:"어제",tomorrow:"내일",last7Days:"최근 7일",thisMonth:"이번 달",lastMonth:"지난 달",nextMonth:"다음 달",thisWeek:"이번 주",lastWeek:"지난 주",nextWeek:"다음 주",today:"오늘"},ruleType:{highlightCell:"셀 강조",dataBar:"데이터 막대",colorScale:"색상 눈금",formula:"사용자 지정 수식",iconSet:"아이콘 집합",duplicateValues:"중복 값",uniqueValues:"고유 값"},subRuleType:{uniqueValues:"고유 값",duplicateValues:"중복 값",rank:"순위",text:"텍스트",timePeriod:"기간",number:"숫자",average:"평균"},valueType:{num:"숫자",min:"최소값",max:"최대값",percent:"백분율",percentile:"백분위수",formula:"수식",none:"없음"},errorMessage:{notBlank:"조건을 비울 수 없습니다.",formulaError:"잘못된 수식입니다.",rangeError:"잘못된 선택 영역입니다."}}}}}));
@@ -1 +1 @@
1
- (function(e,n){typeof exports=="object"&&typeof module<"u"?module.exports=n():typeof define=="function"&&define.amd?define(n):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsConditionalFormattingUiRuRU=n())})(this,function(){"use strict";return{sheet:{cf:{title:"Условное форматирование",menu:{manageConditionalFormatting:"Управление условным форматированием",createConditionalFormatting:"Создание условного форматирования",clearRangeRules:"Очистить правила для выбранного диапазона",clearWorkSheetRules:"Очистить правила для всего листа"},form:{lessThan:"Значение должно быть меньше {0}",lessThanOrEqual:"Значение должно быть меньше или равно {0}",greaterThan:"Значение должно быть больше {0}",greaterThanOrEqual:"Значение должно быть больше или равно {0}",rangeSelector:"Выберите диапазон или введите значение"},iconSet:{direction:"Направление",shape:"Форма",mark:"Знак",rank:"Ранг",rule:"Правило",icon:"Иконка",type:"Тип",value:"Значение",reverseIconOrder:"Обратный порядок иконок",and:"И",when:"Когда",onlyShowIcon:"Показывать только иконку"},symbol:{greaterThan:">",greaterThanOrEqual:">=",lessThan:"<",lessThanOrEqual:"<="},panel:{createRule:"Создать правило",clear:"Очистить все правила",range:"Применить диапазон",styleType:"Тип стиля",submit:"Подтвердить",cancel:"Отменить",rankAndAverage:"Верх/Низ/Среднее",styleRule:"Правило стиля",isNotBottom:"Верх",isBottom:"Низ",greaterThanAverage:"Больше среднего",lessThanAverage:"Меньше среднего",medianValue:"Медианное значение",fillType:"Тип заполнения",pureColor:"Сплошной цвет",gradient:"Градиент",colorSet:"Набор цветов",positive:"Положительный",native:"Отрицательный",workSheet:"Весь лист",selectedRange:"Выбранный диапазон",managerRuleSelect:"Управление правилами {0}",onlyShowDataBar:"Показывать только гистограммы данных"},preview:{describe:{beginsWith:"Начинается с {0}",endsWith:"Заканчивается на {0}",containsText:"Содержит текст {0}",notContainsText:"Не содержит текст {0}",equal:"Равно {0}",notEqual:"Не равно {0}",containsBlanks:"Содержит пустые ячейки",notContainsBlanks:"Не содержит пустых ячеек",containsErrors:"Содержит ошибки",notContainsErrors:"Не содержит ошибок",greaterThan:"Больше чем {0}",greaterThanOrEqual:"Больше или равно {0}",lessThan:"Меньше чем {0}",lessThanOrEqual:"Меньше или равно {0}",notBetween:"Не между {0} и {1}",between:"Между {0} и {1}",yesterday:"Вчера",tomorrow:"Завтра",last7Days:"Последние 7 дней",thisMonth:"Этот месяц",lastMonth:"Прошлый месяц",nextMonth:"Следующий месяц",thisWeek:"Эта неделя",lastWeek:"Прошлая неделя",nextWeek:"Следующая неделя",today:"Сегодня",topN:"Топ {0}",bottomN:"Низ {0}",topNPercent:"Топ {0}%",bottomNPercent:"Низ {0}%"}},operator:{beginsWith:"Начинается с",endsWith:"Заканчивается на",containsText:"Содержит текст",notContainsText:"Не содержит текст",equal:"Равно",notEqual:"Не равно",containsBlanks:"Содержит пустые ячейки",notContainsBlanks:"Не содержит пустых ячеек",containsErrors:"Содержит ошибки",notContainsErrors:"Не содержит ошибок",greaterThan:"Больше чем",greaterThanOrEqual:"Больше или равно",lessThan:"Меньше чем",lessThanOrEqual:"Меньше или равно",notBetween:"Не между",between:"Между",yesterday:"Вчера",tomorrow:"Завтра",last7Days:"Последние 7 дней",thisMonth:"Этот месяц",lastMonth:"Прошлый месяц",nextMonth:"Следующий месяц",thisWeek:"Эта неделя",lastWeek:"Прошлая неделя",nextWeek:"Следующая неделя",today:"Сегодня"},ruleType:{highlightCell:"Выделение ячеек",dataBar:"Гистограмма данных",colorScale:"Цветовая шкала",formula:"Пользовательская формула",iconSet:"Набор иконок",duplicateValues:"Дублирующиеся значения",uniqueValues:"Уникальные значения"},subRuleType:{uniqueValues:"Уникальные значения",duplicateValues:"Дублирующиеся значения",rank:"Ранг",text:"Текст",timePeriod:"Период времени",number:"Число",average:"Среднее"},valueType:{num:"Число",min:"Минимум",max:"Максимум",percent:"Процент",percentile:"Процентиль",formula:"Формула",none:"Нет"},errorMessage:{notBlank:"Условие не может быть пустым",formulaError:"Ошибка формулы",rangeError:"Bad selection"}}}}});
1
+ (function(e,n){typeof exports=="object"&&typeof module<"u"?module.exports=n():typeof define=="function"&&define.amd?define(n):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsConditionalFormattingUiRuRU=n())})(this,(function(){"use strict";return{sheet:{cf:{title:"Условное форматирование",menu:{manageConditionalFormatting:"Управление условным форматированием",createConditionalFormatting:"Создание условного форматирования",clearRangeRules:"Очистить правила для выбранного диапазона",clearWorkSheetRules:"Очистить правила для всего листа"},form:{lessThan:"Значение должно быть меньше {0}",lessThanOrEqual:"Значение должно быть меньше или равно {0}",greaterThan:"Значение должно быть больше {0}",greaterThanOrEqual:"Значение должно быть больше или равно {0}",rangeSelector:"Выберите диапазон или введите значение"},iconSet:{direction:"Направление",shape:"Форма",mark:"Знак",rank:"Ранг",rule:"Правило",icon:"Иконка",type:"Тип",value:"Значение",reverseIconOrder:"Обратный порядок иконок",and:"И",when:"Когда",onlyShowIcon:"Показывать только иконку"},symbol:{greaterThan:">",greaterThanOrEqual:">=",lessThan:"<",lessThanOrEqual:"<="},panel:{createRule:"Создать правило",clear:"Очистить все правила",range:"Применить диапазон",styleType:"Тип стиля",submit:"Подтвердить",cancel:"Отменить",rankAndAverage:"Верх/Низ/Среднее",styleRule:"Правило стиля",isNotBottom:"Верх",isBottom:"Низ",greaterThanAverage:"Больше среднего",lessThanAverage:"Меньше среднего",medianValue:"Медианное значение",fillType:"Тип заполнения",pureColor:"Сплошной цвет",gradient:"Градиент",colorSet:"Набор цветов",positive:"Положительный",native:"Отрицательный",workSheet:"Весь лист",selectedRange:"Выбранный диапазон",managerRuleSelect:"Управление правилами {0}",onlyShowDataBar:"Показывать только гистограммы данных"},preview:{describe:{beginsWith:"Начинается с {0}",endsWith:"Заканчивается на {0}",containsText:"Содержит текст {0}",notContainsText:"Не содержит текст {0}",equal:"Равно {0}",notEqual:"Не равно {0}",containsBlanks:"Содержит пустые ячейки",notContainsBlanks:"Не содержит пустых ячеек",containsErrors:"Содержит ошибки",notContainsErrors:"Не содержит ошибок",greaterThan:"Больше чем {0}",greaterThanOrEqual:"Больше или равно {0}",lessThan:"Меньше чем {0}",lessThanOrEqual:"Меньше или равно {0}",notBetween:"Не между {0} и {1}",between:"Между {0} и {1}",yesterday:"Вчера",tomorrow:"Завтра",last7Days:"Последние 7 дней",thisMonth:"Этот месяц",lastMonth:"Прошлый месяц",nextMonth:"Следующий месяц",thisWeek:"Эта неделя",lastWeek:"Прошлая неделя",nextWeek:"Следующая неделя",today:"Сегодня",topN:"Топ {0}",bottomN:"Низ {0}",topNPercent:"Топ {0}%",bottomNPercent:"Низ {0}%"}},operator:{beginsWith:"Начинается с",endsWith:"Заканчивается на",containsText:"Содержит текст",notContainsText:"Не содержит текст",equal:"Равно",notEqual:"Не равно",containsBlanks:"Содержит пустые ячейки",notContainsBlanks:"Не содержит пустых ячеек",containsErrors:"Содержит ошибки",notContainsErrors:"Не содержит ошибок",greaterThan:"Больше чем",greaterThanOrEqual:"Больше или равно",lessThan:"Меньше чем",lessThanOrEqual:"Меньше или равно",notBetween:"Не между",between:"Между",yesterday:"Вчера",tomorrow:"Завтра",last7Days:"Последние 7 дней",thisMonth:"Этот месяц",lastMonth:"Прошлый месяц",nextMonth:"Следующий месяц",thisWeek:"Эта неделя",lastWeek:"Прошлая неделя",nextWeek:"Следующая неделя",today:"Сегодня"},ruleType:{highlightCell:"Выделение ячеек",dataBar:"Гистограмма данных",colorScale:"Цветовая шкала",formula:"Пользовательская формула",iconSet:"Набор иконок",duplicateValues:"Дублирующиеся значения",uniqueValues:"Уникальные значения"},subRuleType:{uniqueValues:"Уникальные значения",duplicateValues:"Дублирующиеся значения",rank:"Ранг",text:"Текст",timePeriod:"Период времени",number:"Число",average:"Среднее"},valueType:{num:"Число",min:"Минимум",max:"Максимум",percent:"Процент",percentile:"Процентиль",formula:"Формула",none:"Нет"},errorMessage:{notBlank:"Условие не может быть пустым",formulaError:"Ошибка формулы",rangeError:"Bad selection"}}}}}));
@@ -1 +1 @@
1
- (function(n,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis<"u"?globalThis:n||self,n.UniverSheetsConditionalFormattingUiViVN=t())})(this,function(){"use strict";return{sheet:{cf:{title:"Định dạng có điều kiện",menu:{manageConditionalFormatting:"Quản lý định dạng có điều kiện",createConditionalFormatting:"Tạo định dạng có điều kiện mới",clearRangeRules:"Xóa quy tắc cho vùng chọn",clearWorkSheetRules:"Xóa quy tắc cho toàn bộ bảng tính"},form:{lessThan:"Giá trị phải nhỏ hơn {0}",lessThanOrEqual:"Giá trị phải nhỏ hơn hoặc bằng {0}",greaterThan:"Giá trị phải lớn hơn {0}",greaterThanOrEqual:"Giá trị phải lớn hơn hoặc bằng {0}",rangeSelector:"Chọn phạm vi hoặc nhập giá trị"},iconSet:{direction:"Hướng",shape:"Hình dạng",mark:"Dấu",rank:"Hạng",rule:"Quy tắc",icon:"Biểu tượng",type:"Loại",value:"Giá trị",reverseIconOrder:"Đảo ngược thứ tự biểu tượng",and:"Và",when:"Khi giá trị",onlyShowIcon:"Chỉ hiển thị biểu tượng"},symbol:{greaterThan:">",greaterThanOrEqual:">=",lessThan:"<",lessThanOrEqual:"<="},panel:{createRule:"Tạo quy tắc mới",clear:"Xóa tất cả quy tắc",range:"Phạm vi áp dụng",styleType:"Loại kiểu",submit:"Xác nhận",cancel:"Hủy bỏ",rankAndAverage:"Đầu / Cuối / Giá trị trung bình",styleRule:"Quy tắc kiểu",isNotBottom:"Đầu",isBottom:"Cuối",greaterThanAverage:"Lớn hơn giá trị trung bình",lessThanAverage:"Nhỏ hơn giá trị trung bình",medianValue:"Giá trị trung vị",fillType:"Cách thức điền",pureColor:"Màu thuần",gradient:"Chuyển màu",colorSet:"Thiết lập màu sắc",positive:"Giá trị dương",native:"Giá trị âm",workSheet:"Toàn bộ bảng tính",selectedRange:"Vùng chọn",managerRuleSelect:"Quản lý quy tắc của {0}",onlyShowDataBar:"Chỉ hiển thị thanh dữ liệu"},preview:{describe:{beginsWith:"Bắt đầu với {0}",endsWith:"Kết thúc với {0}",containsText:"Chứa văn bản {0}",notContainsText:"Không chứa văn bản {0}",equal:"Bằng {0}",notEqual:"Không bằng {0}",containsBlanks:"Rỗng",notContainsBlanks:"Không rỗng",containsErrors:"Lỗi",notContainsErrors:"Không lỗi",greaterThan:"Lớn hơn {0}",greaterThanOrEqual:"Lớn hơn hoặc bằng {0}",lessThan:"Nhỏ hơn {0}",lessThanOrEqual:"Nhỏ hơn hoặc bằng {0}",notBetween:"Không nằm giữa {0} và {1}",between:"Nằm giữa {0} và {1}",yesterday:"Hôm qua",tomorrow:"Ngày mai",last7Days:"7 ngày qua",thisMonth:"Tháng này",lastMonth:"Tháng trước",nextMonth:"Tháng sau",thisWeek:"Tuần này",lastWeek:"Tuần trước",nextWeek:"Tuần sau",today:"Hôm nay",topN:"Top {0}",bottomN:"Cuối {0}",topNPercent:"Top {0}%",bottomNPercent:"Cuối {0}%"}},operator:{beginsWith:"Bắt đầu với",endsWith:"Kết thúc với",containsText:"Chứa văn bản",notContainsText:"Không chứa văn bản",equal:"Bằng",notEqual:"Không bằng",containsBlanks:"Rỗng",notContainsBlanks:"Không rỗng",containsErrors:"Lỗi",notContainsErrors:"Không lỗi",greaterThan:"Lớn hơn",greaterThanOrEqual:"Lớn hơn hoặc bằng",lessThan:"Nhỏ hơn",lessThanOrEqual:"Nhỏ hơn hoặc bằng",notBetween:"Không nằm giữa",between:"Nằm giữa",yesterday:"Hôm qua",tomorrow:"Ngày mai",last7Days:"7 ngày qua",thisMonth:"Tháng này",lastMonth:"Tháng trước",nextMonth:"Tháng sau",thisWeek:"Tuần này",lastWeek:"Tuần trước",nextWeek:"Tuần sau",today:"Hôm nay"},ruleType:{highlightCell:"Làm nổi bật ô",dataBar:"Thanh dữ liệu",colorScale:"Thang màu",formula:"Công thức tùy chỉnh",iconSet:"Tập hợp biểu tượng",duplicateValues:"Giá trị trùng lặp",uniqueValues:"Giá trị duy nhất"},subRuleType:{uniqueValues:"Giá trị duy nhất",duplicateValues:"Giá trị trùng lặp",rank:"Đầu cuối",text:"Văn bản",timePeriod:"Thời gian",number:"Giá trị số",average:"Giá trị trung bình"},valueType:{num:"Giá trị số",min:"Giá trị nhỏ nhất",max:"Giá trị lớn nhất",percent:"Phần trăm",percentile:"Phần trăm điểm",formula:"Công thức",none:"Không"},errorMessage:{notBlank:"Điều kiện không được để trống",formulaError:"Lỗi công thức",rangeError:"Bad selection"}}}}});
1
+ (function(n,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis<"u"?globalThis:n||self,n.UniverSheetsConditionalFormattingUiViVN=t())})(this,(function(){"use strict";return{sheet:{cf:{title:"Định dạng có điều kiện",menu:{manageConditionalFormatting:"Quản lý định dạng có điều kiện",createConditionalFormatting:"Tạo định dạng có điều kiện mới",clearRangeRules:"Xóa quy tắc cho vùng chọn",clearWorkSheetRules:"Xóa quy tắc cho toàn bộ bảng tính"},form:{lessThan:"Giá trị phải nhỏ hơn {0}",lessThanOrEqual:"Giá trị phải nhỏ hơn hoặc bằng {0}",greaterThan:"Giá trị phải lớn hơn {0}",greaterThanOrEqual:"Giá trị phải lớn hơn hoặc bằng {0}",rangeSelector:"Chọn phạm vi hoặc nhập giá trị"},iconSet:{direction:"Hướng",shape:"Hình dạng",mark:"Dấu",rank:"Hạng",rule:"Quy tắc",icon:"Biểu tượng",type:"Loại",value:"Giá trị",reverseIconOrder:"Đảo ngược thứ tự biểu tượng",and:"Và",when:"Khi giá trị",onlyShowIcon:"Chỉ hiển thị biểu tượng"},symbol:{greaterThan:">",greaterThanOrEqual:">=",lessThan:"<",lessThanOrEqual:"<="},panel:{createRule:"Tạo quy tắc mới",clear:"Xóa tất cả quy tắc",range:"Phạm vi áp dụng",styleType:"Loại kiểu",submit:"Xác nhận",cancel:"Hủy bỏ",rankAndAverage:"Đầu / Cuối / Giá trị trung bình",styleRule:"Quy tắc kiểu",isNotBottom:"Đầu",isBottom:"Cuối",greaterThanAverage:"Lớn hơn giá trị trung bình",lessThanAverage:"Nhỏ hơn giá trị trung bình",medianValue:"Giá trị trung vị",fillType:"Cách thức điền",pureColor:"Màu thuần",gradient:"Chuyển màu",colorSet:"Thiết lập màu sắc",positive:"Giá trị dương",native:"Giá trị âm",workSheet:"Toàn bộ bảng tính",selectedRange:"Vùng chọn",managerRuleSelect:"Quản lý quy tắc của {0}",onlyShowDataBar:"Chỉ hiển thị thanh dữ liệu"},preview:{describe:{beginsWith:"Bắt đầu với {0}",endsWith:"Kết thúc với {0}",containsText:"Chứa văn bản {0}",notContainsText:"Không chứa văn bản {0}",equal:"Bằng {0}",notEqual:"Không bằng {0}",containsBlanks:"Rỗng",notContainsBlanks:"Không rỗng",containsErrors:"Lỗi",notContainsErrors:"Không lỗi",greaterThan:"Lớn hơn {0}",greaterThanOrEqual:"Lớn hơn hoặc bằng {0}",lessThan:"Nhỏ hơn {0}",lessThanOrEqual:"Nhỏ hơn hoặc bằng {0}",notBetween:"Không nằm giữa {0} và {1}",between:"Nằm giữa {0} và {1}",yesterday:"Hôm qua",tomorrow:"Ngày mai",last7Days:"7 ngày qua",thisMonth:"Tháng này",lastMonth:"Tháng trước",nextMonth:"Tháng sau",thisWeek:"Tuần này",lastWeek:"Tuần trước",nextWeek:"Tuần sau",today:"Hôm nay",topN:"Top {0}",bottomN:"Cuối {0}",topNPercent:"Top {0}%",bottomNPercent:"Cuối {0}%"}},operator:{beginsWith:"Bắt đầu với",endsWith:"Kết thúc với",containsText:"Chứa văn bản",notContainsText:"Không chứa văn bản",equal:"Bằng",notEqual:"Không bằng",containsBlanks:"Rỗng",notContainsBlanks:"Không rỗng",containsErrors:"Lỗi",notContainsErrors:"Không lỗi",greaterThan:"Lớn hơn",greaterThanOrEqual:"Lớn hơn hoặc bằng",lessThan:"Nhỏ hơn",lessThanOrEqual:"Nhỏ hơn hoặc bằng",notBetween:"Không nằm giữa",between:"Nằm giữa",yesterday:"Hôm qua",tomorrow:"Ngày mai",last7Days:"7 ngày qua",thisMonth:"Tháng này",lastMonth:"Tháng trước",nextMonth:"Tháng sau",thisWeek:"Tuần này",lastWeek:"Tuần trước",nextWeek:"Tuần sau",today:"Hôm nay"},ruleType:{highlightCell:"Làm nổi bật ô",dataBar:"Thanh dữ liệu",colorScale:"Thang màu",formula:"Công thức tùy chỉnh",iconSet:"Tập hợp biểu tượng",duplicateValues:"Giá trị trùng lặp",uniqueValues:"Giá trị duy nhất"},subRuleType:{uniqueValues:"Giá trị duy nhất",duplicateValues:"Giá trị trùng lặp",rank:"Đầu cuối",text:"Văn bản",timePeriod:"Thời gian",number:"Giá trị số",average:"Giá trị trung bình"},valueType:{num:"Giá trị số",min:"Giá trị nhỏ nhất",max:"Giá trị lớn nhất",percent:"Phần trăm",percentile:"Phần trăm điểm",formula:"Công thức",none:"Không"},errorMessage:{notBlank:"Điều kiện không được để trống",formulaError:"Lỗi công thức",rangeError:"Bad selection"}}}}}));
@@ -1 +1 @@
1
- (function(e,n){typeof exports=="object"&&typeof module<"u"?module.exports=n():typeof define=="function"&&define.amd?define(n):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsConditionalFormattingUiZhCN=n())})(this,function(){"use strict";return{sheet:{cf:{title:"条件格式",menu:{manageConditionalFormatting:"管理条件格式",createConditionalFormatting:"新建条件格式",clearRangeRules:"清除所选区域的规则",clearWorkSheetRules:"清除整个工作表的规则"},form:{lessThan:"该值必须小于 {0}",lessThanOrEqual:"该值必须小于等于 {0}",greaterThan:"该值必大于 {0}",greaterThanOrEqual:"该值必大于等于 {0}",rangeSelector:"选择范围或者输入值"},iconSet:{direction:"方向",shape:"形状",mark:"标记",rank:"等级",rule:"规则",icon:"图标",type:"类型",value:"值",reverseIconOrder:"反转图标次序",and:"且",when:"当值",onlyShowIcon:"仅显示图标"},symbol:{greaterThan:">",greaterThanOrEqual:">=",lessThan:"<",lessThanOrEqual:"<="},panel:{createRule:"新增规则",clear:"清空所有规则",range:"应用范围",styleType:"样式类型",submit:"确认",cancel:"取消",rankAndAverage:"最前/最后/平均值",styleRule:"样式规则",isNotBottom:"最前",isBottom:"最后",greaterThanAverage:"大于平均值",lessThanAverage:"小于平均值",medianValue:"中间值",fillType:"填充方式",pureColor:"纯色",gradient:"渐变",colorSet:"颜色设置",positive:"正值",native:"负值",workSheet:"整张工作表",selectedRange:"所选单元格",managerRuleSelect:"管理 {0} 的规则",onlyShowDataBar:"仅显示数据条"},preview:{describe:{beginsWith:"开头为{0}",endsWith:"结尾为{0}",containsText:"文本包含{0}",notContainsText:"文本不包含{0}",equal:"等于{0}",notEqual:"不等于{0}",containsBlanks:"为空",notContainsBlanks:"不为空",containsErrors:"错误",notContainsErrors:"非错误",greaterThan:"大于{0}",greaterThanOrEqual:"大于等于{0}",lessThan:"小于{0}",lessThanOrEqual:"小于等于{0}",notBetween:"不介于{0}和{1}之间",between:"介于{0}和{1}之间",yesterday:"昨日",tomorrow:"明日",last7Days:"最近7天",thisMonth:"本月",lastMonth:"上个月",nextMonth:"下个月",thisWeek:"本周",lastWeek:"上周",nextWeek:"下周",today:"今日",topN:"前{0}项",bottomN:"后{0}项",topNPercent:"前{0}%",bottomNPercent:"后{0}%"}},operator:{beginsWith:"开头为",endsWith:"结尾为",containsText:"文本包含",notContainsText:"文本不包含",equal:"等于",notEqual:"不等于",containsBlanks:"为空",notContainsBlanks:"不为空",containsErrors:"错误",notContainsErrors:"非错误",greaterThan:"大于",greaterThanOrEqual:"大于等于",lessThan:"小于",lessThanOrEqual:"小于等于",notBetween:"不介于",between:"介于",yesterday:"昨日",tomorrow:"明日",last7Days:"最近 7 天",thisMonth:"本月",lastMonth:"上个月",nextMonth:"下个月",thisWeek:"本周",lastWeek:"上周",nextWeek:"下周",today:"今日"},ruleType:{highlightCell:"突出显示单元格",dataBar:"数据条",colorScale:"色阶",formula:"自定义公式",iconSet:"图标集",duplicateValues:"重复值",uniqueValues:"唯一值"},subRuleType:{uniqueValues:"唯一值",duplicateValues:"重复值",rank:"最前最后",text:"文本",timePeriod:"时间日期",number:"数值",average:"平均值"},valueType:{num:"数值",min:"最小值",max:"最大值",percent:"百分比",percentile:"百分点",formula:"公式",none:"无"},errorMessage:{notBlank:"条件不能为空",rangeError:"选区错误",formulaError:"公式错误"}}}}});
1
+ (function(e,n){typeof exports=="object"&&typeof module<"u"?module.exports=n():typeof define=="function"&&define.amd?define(n):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsConditionalFormattingUiZhCN=n())})(this,(function(){"use strict";return{sheet:{cf:{title:"条件格式",menu:{manageConditionalFormatting:"管理条件格式",createConditionalFormatting:"新建条件格式",clearRangeRules:"清除所选区域的规则",clearWorkSheetRules:"清除整个工作表的规则"},form:{lessThan:"该值必须小于 {0}",lessThanOrEqual:"该值必须小于等于 {0}",greaterThan:"该值必大于 {0}",greaterThanOrEqual:"该值必大于等于 {0}",rangeSelector:"选择范围或者输入值"},iconSet:{direction:"方向",shape:"形状",mark:"标记",rank:"等级",rule:"规则",icon:"图标",type:"类型",value:"值",reverseIconOrder:"反转图标次序",and:"且",when:"当值",onlyShowIcon:"仅显示图标"},symbol:{greaterThan:">",greaterThanOrEqual:">=",lessThan:"<",lessThanOrEqual:"<="},panel:{createRule:"新增规则",clear:"清空所有规则",range:"应用范围",styleType:"样式类型",submit:"确认",cancel:"取消",rankAndAverage:"最前/最后/平均值",styleRule:"样式规则",isNotBottom:"最前",isBottom:"最后",greaterThanAverage:"大于平均值",lessThanAverage:"小于平均值",medianValue:"中间值",fillType:"填充方式",pureColor:"纯色",gradient:"渐变",colorSet:"颜色设置",positive:"正值",native:"负值",workSheet:"整张工作表",selectedRange:"所选单元格",managerRuleSelect:"管理 {0} 的规则",onlyShowDataBar:"仅显示数据条"},preview:{describe:{beginsWith:"开头为{0}",endsWith:"结尾为{0}",containsText:"文本包含{0}",notContainsText:"文本不包含{0}",equal:"等于{0}",notEqual:"不等于{0}",containsBlanks:"为空",notContainsBlanks:"不为空",containsErrors:"错误",notContainsErrors:"非错误",greaterThan:"大于{0}",greaterThanOrEqual:"大于等于{0}",lessThan:"小于{0}",lessThanOrEqual:"小于等于{0}",notBetween:"不介于{0}和{1}之间",between:"介于{0}和{1}之间",yesterday:"昨日",tomorrow:"明日",last7Days:"最近7天",thisMonth:"本月",lastMonth:"上个月",nextMonth:"下个月",thisWeek:"本周",lastWeek:"上周",nextWeek:"下周",today:"今日",topN:"前{0}项",bottomN:"后{0}项",topNPercent:"前{0}%",bottomNPercent:"后{0}%"}},operator:{beginsWith:"开头为",endsWith:"结尾为",containsText:"文本包含",notContainsText:"文本不包含",equal:"等于",notEqual:"不等于",containsBlanks:"为空",notContainsBlanks:"不为空",containsErrors:"错误",notContainsErrors:"非错误",greaterThan:"大于",greaterThanOrEqual:"大于等于",lessThan:"小于",lessThanOrEqual:"小于等于",notBetween:"不介于",between:"介于",yesterday:"昨日",tomorrow:"明日",last7Days:"最近 7 天",thisMonth:"本月",lastMonth:"上个月",nextMonth:"下个月",thisWeek:"本周",lastWeek:"上周",nextWeek:"下周",today:"今日"},ruleType:{highlightCell:"突出显示单元格",dataBar:"数据条",colorScale:"色阶",formula:"自定义公式",iconSet:"图标集",duplicateValues:"重复值",uniqueValues:"唯一值"},subRuleType:{uniqueValues:"唯一值",duplicateValues:"重复值",rank:"最前最后",text:"文本",timePeriod:"时间日期",number:"数值",average:"平均值"},valueType:{num:"数值",min:"最小值",max:"最大值",percent:"百分比",percentile:"百分点",formula:"公式",none:"无"},errorMessage:{notBlank:"条件不能为空",rangeError:"选区错误",formulaError:"公式错误"}}}}}));
@@ -1 +1 @@
1
- (function(e,n){typeof exports=="object"&&typeof module<"u"?module.exports=n():typeof define=="function"&&define.amd?define(n):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsConditionalFormattingUiZhTW=n())})(this,function(){"use strict";return{sheet:{cf:{title:"條件格式",menu:{manageConditionalFormatting:"管理條件格式",createConditionalFormatting:"新建條件格式",clearRangeRules:"清除所選區域的規則",clearWorkSheetRules:"清除整個工作表的規則"},form:{lessThan:"該值必須小於 {0}",lessThanOrEqual:"該值必須小於等於 {0}",greaterThan:"該值必大於 {0}",greaterThanOrEqual:"該值必大於等於 {0}",rangeSelector:"選擇範圍或輸入值"},iconSet:{direction:"方向",shape:"形狀",mark:"標記",rank:"等級",rule:"規則",icon:"圖示",type:"類型",value:"值",reverseIconOrder:"反轉圖示次序",and:"且",when:"當值",onlyShowIcon:"僅顯示圖示"},symbol:{greaterThan:">",greaterThanOrEqual:">=",lessThan:"<",lessThanOrEqual:"<="},panel:{createRule:"新增規則",clear:"清空所有規則",range:"應用範圍",styleType:"樣式類型",submit:"確認",cancel:"取消",rankAndAverage:"最前/最後/平均",styleRule:"樣式規則",isNotBottom:"最前面",isBottom:"最後",greaterThanAverage:"大於平均值",lessThanAverage:"小於平均值",medianValue:"中間值",fillType:"填滿方式",pureColor:"純色",gradient:"漸層",colorSet:"顏色設定",positive:"正值",native:"負值",workSheet:"整張工作表",selectedRange:"所選儲存格",managerRuleSelect:"管理 {0} 的規則",onlyShowDataBar:"僅顯示資料條"},preview:{describe:{beginsWith:"開頭為{0}",endsWith:"結尾為{0}",containsText:"文字包含{0}",notContainsText:"文字不包含{0}",equal:"等於{0}",notEqual:"不等於{0}",containsBlanks:"為空",notContainsBlanks:"不為空",containsErrors:"錯誤",notContainsErrors:"非錯誤",greaterThan:"大於{0}",greaterThanOrEqual:"大於等於{0}",lessThan:"小於{0}",lessThanOrEqual:"小於等於{0}",notBetween:"不介於{0}和{1}之間",between:"介於{0}和{1}之間",yesterday:"昨日",tomorrow:"明日",last7Days:"最近7天",thisMonth:"本月",lastMonth:"上個月",nextMonth:"下個月",thisWeek:"本週",lastWeek:"上週",nextWeek:"下週",today:"今日",topN:"前{0}項",bottomN:"後{0}項",topNPercent:"前{0}%",bottomNPercent:"後{0}%"}},operator:{beginsWith:"開頭為",endsWith:"結尾為",containsText:"文字包含",notContainsText:"文字不包含",equal:"等於",notEqual:"不等於",containsBlanks:"為空",notContainsBlanks:"不為空",containsErrors:"錯誤",notContainsErrors:"非錯誤",greaterThan:"大於",greaterThanOrEqual:"大於等於",lessThan:"小於",lessThanOrEqual:"小於等於",notBetween:"不介於",between:"介於",yesterday:"昨日",tomorrow:"明日",last7Days:"最近 7 天",thisMonth:"本月",lastMonth:"上個月",nextMonth:"下個月",thisWeek:"本週",lastWeek:"上週",nextWeek:"下週",today:"今日"},ruleType:{highlightCell:"突出顯示單元格",dataBar:"資料條",colorScale:"色階",formula:"自訂公式",iconSet:"圖標集",duplicateValues:"重複值",uniqueValues:"唯一值"},subRuleType:{uniqueValues:"唯一值",duplicateValues:"重複值",rank:"最前最後",text:"文字",timePeriod:"時間日期",number:"數值",average:"平均值"},valueType:{num:"數值",min:"最小值",max:"最大值",percent:"百分比",percentile:"百分點",formula:"公式",none:"無"},errorMessage:{notBlank:"條件不能為空",rangeError:"選區錯誤",formulaError:"公式錯誤"}}}}});
1
+ (function(e,n){typeof exports=="object"&&typeof module<"u"?module.exports=n():typeof define=="function"&&define.amd?define(n):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsConditionalFormattingUiZhTW=n())})(this,(function(){"use strict";return{sheet:{cf:{title:"條件格式",menu:{manageConditionalFormatting:"管理條件格式",createConditionalFormatting:"新建條件格式",clearRangeRules:"清除所選區域的規則",clearWorkSheetRules:"清除整個工作表的規則"},form:{lessThan:"該值必須小於 {0}",lessThanOrEqual:"該值必須小於等於 {0}",greaterThan:"該值必大於 {0}",greaterThanOrEqual:"該值必大於等於 {0}",rangeSelector:"選擇範圍或輸入值"},iconSet:{direction:"方向",shape:"形狀",mark:"標記",rank:"等級",rule:"規則",icon:"圖示",type:"類型",value:"值",reverseIconOrder:"反轉圖示次序",and:"且",when:"當值",onlyShowIcon:"僅顯示圖示"},symbol:{greaterThan:">",greaterThanOrEqual:">=",lessThan:"<",lessThanOrEqual:"<="},panel:{createRule:"新增規則",clear:"清空所有規則",range:"應用範圍",styleType:"樣式類型",submit:"確認",cancel:"取消",rankAndAverage:"最前/最後/平均",styleRule:"樣式規則",isNotBottom:"最前面",isBottom:"最後",greaterThanAverage:"大於平均值",lessThanAverage:"小於平均值",medianValue:"中間值",fillType:"填滿方式",pureColor:"純色",gradient:"漸層",colorSet:"顏色設定",positive:"正值",native:"負值",workSheet:"整張工作表",selectedRange:"所選儲存格",managerRuleSelect:"管理 {0} 的規則",onlyShowDataBar:"僅顯示資料條"},preview:{describe:{beginsWith:"開頭為{0}",endsWith:"結尾為{0}",containsText:"文字包含{0}",notContainsText:"文字不包含{0}",equal:"等於{0}",notEqual:"不等於{0}",containsBlanks:"為空",notContainsBlanks:"不為空",containsErrors:"錯誤",notContainsErrors:"非錯誤",greaterThan:"大於{0}",greaterThanOrEqual:"大於等於{0}",lessThan:"小於{0}",lessThanOrEqual:"小於等於{0}",notBetween:"不介於{0}和{1}之間",between:"介於{0}和{1}之間",yesterday:"昨日",tomorrow:"明日",last7Days:"最近7天",thisMonth:"本月",lastMonth:"上個月",nextMonth:"下個月",thisWeek:"本週",lastWeek:"上週",nextWeek:"下週",today:"今日",topN:"前{0}項",bottomN:"後{0}項",topNPercent:"前{0}%",bottomNPercent:"後{0}%"}},operator:{beginsWith:"開頭為",endsWith:"結尾為",containsText:"文字包含",notContainsText:"文字不包含",equal:"等於",notEqual:"不等於",containsBlanks:"為空",notContainsBlanks:"不為空",containsErrors:"錯誤",notContainsErrors:"非錯誤",greaterThan:"大於",greaterThanOrEqual:"大於等於",lessThan:"小於",lessThanOrEqual:"小於等於",notBetween:"不介於",between:"介於",yesterday:"昨日",tomorrow:"明日",last7Days:"最近 7 天",thisMonth:"本月",lastMonth:"上個月",nextMonth:"下個月",thisWeek:"本週",lastWeek:"上週",nextWeek:"下週",today:"今日"},ruleType:{highlightCell:"突出顯示單元格",dataBar:"資料條",colorScale:"色階",formula:"自訂公式",iconSet:"圖標集",duplicateValues:"重複值",uniqueValues:"唯一值"},subRuleType:{uniqueValues:"唯一值",duplicateValues:"重複值",rank:"最前最後",text:"文字",timePeriod:"時間日期",number:"數值",average:"平均值"},valueType:{num:"數值",min:"最小值",max:"最大值",percent:"百分比",percentile:"百分點",formula:"公式",none:"無"},errorMessage:{notBlank:"條件不能為空",rangeError:"選區錯誤",formulaError:"公式錯誤"}}}}}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs/sheets-conditional-formatting-ui",
3
- "version": "0.10.4",
3
+ "version": "0.10.5",
4
4
  "private": false,
5
5
  "description": "Conditional formatting plugin for Univer Sheets",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -55,25 +55,25 @@
55
55
  },
56
56
  "dependencies": {
57
57
  "@univerjs/icons": "^0.4.6",
58
- "@univerjs/core": "0.10.4",
59
- "@univerjs/design": "0.10.4",
60
- "@univerjs/engine-formula": "0.10.4",
61
- "@univerjs/engine-render": "0.10.4",
62
- "@univerjs/sheets": "0.10.4",
63
- "@univerjs/sheets-conditional-formatting": "0.10.4",
64
- "@univerjs/sheets-formula-ui": "0.10.4",
65
- "@univerjs/ui": "0.10.4",
66
- "@univerjs/sheets-ui": "0.10.4"
58
+ "@univerjs/core": "0.10.5",
59
+ "@univerjs/design": "0.10.5",
60
+ "@univerjs/engine-formula": "0.10.5",
61
+ "@univerjs/engine-render": "0.10.5",
62
+ "@univerjs/sheets": "0.10.5",
63
+ "@univerjs/sheets-formula-ui": "0.10.5",
64
+ "@univerjs/ui": "0.10.5",
65
+ "@univerjs/sheets-conditional-formatting": "0.10.5",
66
+ "@univerjs/sheets-ui": "0.10.5"
67
67
  },
68
68
  "devDependencies": {
69
69
  "postcss": "^8.5.6",
70
70
  "react": "18.3.1",
71
71
  "rxjs": "^7.8.2",
72
72
  "tailwindcss": "3.4.17",
73
- "typescript": "^5.8.3",
74
- "vite": "^7.0.6",
73
+ "typescript": "^5.9.2",
74
+ "vite": "^7.1.3",
75
75
  "vitest": "^3.2.4",
76
- "@univerjs-infra/shared": "0.10.4"
76
+ "@univerjs-infra/shared": "0.10.5"
77
77
  },
78
78
  "scripts": {
79
79
  "test": "vitest run",