chunk-S77UFTYM.js 120 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944
  1. import {
  2. Be,
  3. De,
  4. In,
  5. Q,
  6. V,
  7. dt,
  8. je,
  9. ko,
  10. ot as ot2,
  11. qe,
  12. st
  13. } from "./chunk-BW43Z7N3.js";
  14. import {
  15. Ji,
  16. Sb,
  17. er,
  18. oa,
  19. ua,
  20. yr
  21. } from "./chunk-QRYBFJ3R.js";
  22. import {
  23. $3,
  24. o2,
  25. uS,
  26. y3
  27. } from "./chunk-2MK3Q52E.js";
  28. import {
  29. $R,
  30. BehaviorSubject,
  31. Bi,
  32. Fe,
  33. Mf,
  34. Nt,
  35. Ot,
  36. Pt,
  37. Qr,
  38. Ra,
  39. SE,
  40. Subject,
  41. _n,
  42. ar,
  43. bufferTime,
  44. distinctUntilChanged,
  45. dn,
  46. en,
  47. filter,
  48. kt,
  49. map,
  50. nt,
  51. nu,
  52. ot,
  53. re,
  54. rn,
  55. tr,
  56. we,
  57. zC
  58. } from "./chunk-23V3HWTR.js";
  59. // node_modules/.pnpm/@univerjs+sheets-conditional-formatting@0.5.5_@grpc+grpc-js@1.13.4_react@18.3.1_rxjs@7.8.1/node_modules/@univerjs/sheets-conditional-formatting/lib/es/index.js
  60. var V2 = Object.defineProperty;
  61. var O2 = (s, r, t) => r in s ? V2(s, r, { enumerable: true, configurable: true, writable: true, value: t }) : s[r] = t;
  62. var m = (s, r, t) => O2(s, typeof r != "symbol" ? r + "" : r, t);
  63. var N2 = "SHEET_CONDITIONAL_FORMATTING_PLUGIN";
  64. var M = ((s) => (s.beginsWith = "beginsWith", s.endsWith = "endsWith", s.containsText = "containsText", s.notContainsText = "notContainsText", s.equal = "equal", s.notEqual = "notEqual", s.containsBlanks = "containsBlanks", s.notContainsBlanks = "notContainsBlanks", s.containsErrors = "containsErrors", s.notContainsErrors = "notContainsErrors", s))(M || {});
  65. var R = ((s) => (s.today = "today", s.yesterday = "yesterday", s.tomorrow = "tomorrow", s.last7Days = "last7Days", s.thisMonth = "thisMonth", s.lastMonth = "lastMonth", s.nextMonth = "nextMonth", s.thisWeek = "thisWeek", s.lastWeek = "lastWeek", s.nextWeek = "nextWeek", s))(R || {});
  66. var w = ((s) => (s.greaterThan = "greaterThan", s.greaterThanOrEqual = "greaterThanOrEqual", s.lessThan = "lessThan", s.lessThanOrEqual = "lessThanOrEqual", s.notBetween = "notBetween", s.between = "between", s.equal = "equal", s.notEqual = "notEqual", s))(w || {});
  67. var y = ((s) => (s.highlightCell = "highlightCell", s.dataBar = "dataBar", s.colorScale = "colorScale", s.iconSet = "iconSet", s))(y || {});
  68. var E = ((s) => (s.uniqueValues = "uniqueValues", s.duplicateValues = "duplicateValues", s.rank = "rank", s.text = "text", s.timePeriod = "timePeriod", s.number = "number", s.average = "average", s.formula = "formula", s))(E || {});
  69. var x = ((s) => (s.num = "num", s.min = "min", s.max = "max", s.percent = "percent", s.percentile = "percentile", s.formula = "formula", s))(x || {});
  70. var E1 = "#fff";
  71. var p1 = "#000000";
  72. var A1 = () => ({
  73. cfId: void 0,
  74. ranges: [],
  75. stopIfTrue: false,
  76. rule: {
  77. type: "highlightCell",
  78. subType: "text",
  79. operator: "containsText"
  80. /* containsText */
  81. }
  82. });
  83. var _1 = (s, r) => {
  84. switch (s) {
  85. case "text": {
  86. if ([
  87. "beginsWith",
  88. "containsText",
  89. "endsWith",
  90. "equal",
  91. "notContainsText",
  92. "notEqual"
  93. /* notEqual */
  94. ].includes(r))
  95. return "";
  96. break;
  97. }
  98. case "number":
  99. return [
  100. "between",
  101. "notBetween"
  102. /* notBetween */
  103. ].includes(r) ? [10, 100] : 10;
  104. }
  105. return "";
  106. };
  107. var x1 = (s, r) => {
  108. switch (s) {
  109. case "formula":
  110. return "=";
  111. case "max":
  112. case "min":
  113. return "";
  114. case "percent":
  115. case "percentile":
  116. case "num":
  117. return r !== void 0 ? r : 10;
  118. }
  119. return "";
  120. };
  121. var W = (s, r, t) => {
  122. if (!r)
  123. return null;
  124. const e = r.findIndex((n) => t(n) === s.id);
  125. if (e < 0)
  126. return null;
  127. switch (s.type) {
  128. case "after":
  129. return e + 1;
  130. case "before":
  131. return e - 1;
  132. case "self":
  133. return e;
  134. }
  135. };
  136. var D0 = (s, r, t, e) => {
  137. if (!t)
  138. return null;
  139. const n = W(s, t, e);
  140. let i = W(r, t, e);
  141. if (n === null || i === null || n === i)
  142. return;
  143. const a = t.splice(n, 1)[0];
  144. switch (n < i && (i = W(r, t, e)), r.type) {
  145. case "before": {
  146. t.splice(i + 1, 0, a);
  147. break;
  148. }
  149. case "self":
  150. case "after": {
  151. t.splice(i, 0, a);
  152. break;
  153. }
  154. }
  155. };
  156. var f0 = (s, r, t, e) => {
  157. if (s.type === "after" && ["after", "before"].includes(r.type))
  158. return [s, r];
  159. const n = { ...s }, i = { ...r };
  160. if (n.type !== "after") {
  161. const a = W(n, t, e);
  162. if (a === null)
  163. return null;
  164. if (a - 1 < 0) {
  165. const u = t[a + 1];
  166. if (u)
  167. n.id = e(u), n.type = "before";
  168. else
  169. return null;
  170. } else {
  171. const u = e(t[a - 1]);
  172. n.id = u, n.type = "after";
  173. }
  174. }
  175. if (!["after", "before"].includes(i.type)) {
  176. const a = W(i, t, e);
  177. if (a === null)
  178. return null;
  179. if (a === 0)
  180. i.type = "before";
  181. else if (a - 1 >= 0) {
  182. const u = e(t[a - 1]);
  183. i.id = u, i.type = "after";
  184. } else if (a + 1 <= t.length - 1) {
  185. const u = e(t[a + 1]);
  186. i.id = u, i.type = "before";
  187. } else
  188. return null;
  189. }
  190. return n.id === i.id && n.type === i.type ? null : [n, i];
  191. };
  192. var m0 = (s, r) => {
  193. if (["after", "before"].includes(r.type)) {
  194. if (s.type === "after")
  195. return [r, s];
  196. if (s.type === "before")
  197. return [r, { ...s, type: "self" }];
  198. }
  199. return null;
  200. };
  201. var y1 = (s, r) => s.id === r.id && s.type === r.type;
  202. var F0 = () => `${re.generateRandomId(8)}`;
  203. var B = class {
  204. constructor() {
  205. m(this, "_model", /* @__PURE__ */ new Map());
  206. m(this, "_ruleChange$", new Subject());
  207. m(this, "$ruleChange", this._ruleChange$.asObservable());
  208. }
  209. _ensureList(r, t) {
  210. let e = this.getSubunitRules(r, t);
  211. if (!e) {
  212. e = [];
  213. let n = this._model.get(r);
  214. n || (n = /* @__PURE__ */ new Map(), this._model.set(r, n)), n.set(t, e);
  215. }
  216. return e;
  217. }
  218. getRule(r, t, e) {
  219. const n = this.getSubunitRules(r, t);
  220. return n ? n.find((i) => i.cfId === e) : null;
  221. }
  222. getUnitRules(r) {
  223. return this._model.get(r) || null;
  224. }
  225. getSubunitRules(r, t) {
  226. var n;
  227. return ((n = this._model.get(r)) == null ? void 0 : n.get(t)) || null;
  228. }
  229. deleteRule(r, t, e) {
  230. const n = this.getSubunitRules(r, t);
  231. if (n) {
  232. const i = n.findIndex((u) => u.cfId === e), a = n[i];
  233. a && (n.splice(i, 1), this._ruleChange$.next({ rule: a, subUnitId: t, unitId: r, type: "delete" }));
  234. }
  235. }
  236. setRule(r, t, e, n) {
  237. const a = this._ensureList(r, t).find((u) => u.cfId === n);
  238. if (a) {
  239. const u = re.deepClone(a);
  240. Object.assign(a, e), this._ruleChange$.next({ rule: a, subUnitId: t, unitId: r, type: "set", oldRule: u });
  241. }
  242. }
  243. addRule(r, t, e) {
  244. const n = this._ensureList(r, t);
  245. n.find((a) => a.cfId === e.cfId) || n.unshift(e), this._ruleChange$.next({ rule: e, subUnitId: t, unitId: r, type: "add" });
  246. }
  247. /**
  248. * example [1,2,3,4,5,6],if you move behind 5 to 2, then cfId=5,targetId=2.
  249. * if targetId does not exist, it defaults to top
  250. */
  251. moveRulePriority(r, t, e, n) {
  252. const i = this._ensureList(r, t), a = W(e, i, (o) => o.cfId), u = W(n, i, (o) => o.cfId);
  253. if (u === null || a === null || u === a)
  254. return;
  255. const l = i[a];
  256. l && (D0(e, n, i, (o) => o.cfId), this._ruleChange$.next({ rule: l, subUnitId: t, unitId: r, type: "sort" }));
  257. }
  258. createCfId(r, t) {
  259. return F0();
  260. }
  261. deleteUnitId(r) {
  262. this._model.delete(r);
  263. }
  264. };
  265. var s2 = {
  266. type: ar.MUTATION,
  267. id: "sheet.mutation.conditional-formatting-formula-mark-dirty",
  268. handler() {
  269. return true;
  270. }
  271. };
  272. var w0 = Object.defineProperty;
  273. var v0 = Object.getOwnPropertyDescriptor;
  274. var E0 = (s, r, t, e) => {
  275. for (var n = e > 1 ? void 0 : e ? v0(r, t) : r, i = s.length - 1, a; i >= 0; i--)
  276. (a = s[i]) && (n = (e ? a(r, t, n) : a(n)) || n);
  277. return e && n && w0(r, t, n), n;
  278. };
  279. var d2 = (s, r) => (t, e) => r(t, e, s);
  280. var b = ((s) => (s[s.NOT_REGISTER = 1] = "NOT_REGISTER", s[s.SUCCESS = 2] = "SUCCESS", s[s.WAIT = 3] = "WAIT", s[s.ERROR = 4] = "ERROR", s))(b || {});
  281. var p0 = (s) => {
  282. const r = s && s[0] && s[0][0];
  283. return (r == null ? void 0 : r.t) === dn.BOOLEAN ? r.v === we.TRUE || r.v === true : r ? r.v : false;
  284. };
  285. var G = class extends nt {
  286. constructor(r, t, e) {
  287. super();
  288. m(this, "_formulaMap", /* @__PURE__ */ new Map());
  289. m(this, "_result$", new Subject());
  290. m(this, "result$", this._result$.asObservable());
  291. this._commandService = r, this._activeDirtyManagerService = t, this._conditionalFormattingRuleModel = e, this._initFormulaCalculationResultChange(), this._initRuleChange();
  292. }
  293. _initRuleChange() {
  294. const r = (t) => {
  295. switch (t.type) {
  296. case y.colorScale:
  297. return t.config.some((e) => e.value.type === x.formula);
  298. case y.dataBar:
  299. return [t.config.max, t.config.min].some((e) => e.type === x.formula);
  300. case y.iconSet:
  301. return t.config.some((e) => e.value.type === x.formula);
  302. }
  303. };
  304. this.disposeWithMe(this._conditionalFormattingRuleModel.$ruleChange.subscribe((t) => {
  305. const { unitId: e, subUnitId: n, rule: i, oldRule: a } = t;
  306. t.type === "delete" && this._removeFormulaByCfId(e, n, i.cfId), t.type === "set" && (r(i.rule) || a && r(a.rule)) && this._removeFormulaByCfId(e, n, i.cfId);
  307. }));
  308. }
  309. _initFormulaCalculationResultChange() {
  310. this.disposeWithMe(this._commandService.onCommandExecuted((r) => {
  311. if (r.id === Ji.id) {
  312. const t = r.params;
  313. for (const e in t.unitOtherData)
  314. for (const n in t.unitOtherData[e])
  315. for (const i in t.unitOtherData[e][n]) {
  316. const a = new kt(t.unitOtherData[e][n][i]), u = this._ensureSubunitFormulaMap(e, n).getValue(i, ["formulaId"]);
  317. if (!u)
  318. continue;
  319. const l = u.ranges;
  320. if (!l)
  321. continue;
  322. const o = u.result, h = l[0].startRow, c = l[0].startColumn;
  323. a.forValue((D, f, F) => {
  324. o.setValue(h + D, c + f, p0(F));
  325. }), u.status = 2;
  326. const C = this._getAllFormulaResultByCfId(e, n, u.cfId).every(
  327. (D) => D.status === 2
  328. /* SUCCESS */
  329. );
  330. this._result$.next({ ...u, isAllFinished: C });
  331. }
  332. }
  333. })), this._activeDirtyManagerService.register(
  334. s2.id,
  335. {
  336. commandId: s2.id,
  337. getDirtyData(r) {
  338. return {
  339. dirtyUnitOtherFormulaMap: r.params
  340. };
  341. }
  342. }
  343. );
  344. }
  345. _ensureSubunitFormulaMap(r, t) {
  346. let e = this._formulaMap.get(r);
  347. e || (e = /* @__PURE__ */ new Map(), this._formulaMap.set(r, e));
  348. let n = e.get(t);
  349. return n || (n = new zC([], ["formulaId", "id"]), e.set(t, n)), n;
  350. }
  351. getSubUnitFormulaMap(r, t) {
  352. var e;
  353. return (e = this._formulaMap.get(r)) == null ? void 0 : e.get(t);
  354. }
  355. registerFormulaWithRange(r, t, e, n, i = [{ startRow: 0, endRow: 0, startColumn: 0, endColumn: 0 }]) {
  356. const a = this._ensureSubunitFormulaMap(r, t), u = this.createCFormulaId(e, n);
  357. if (a.getValue(u, ["id"]))
  358. return;
  359. const l = this._createFormulaId(r, t);
  360. a.addValue({
  361. formulaText: n,
  362. unitId: r,
  363. subUnitId: t,
  364. cfId: e,
  365. id: u,
  366. ranges: i,
  367. formulaId: l,
  368. status: 3,
  369. result: new kt()
  370. });
  371. const o = {
  372. unitId: r,
  373. subUnitId: t,
  374. formulaMap: {
  375. [l]: {
  376. f: n,
  377. ranges: i
  378. }
  379. }
  380. };
  381. this._commandService.executeCommand(oa.id, o, { onlyLocal: true }).then(() => {
  382. this._commandService.executeCommand(
  383. s2.id,
  384. { [r]: { [t]: { [l]: true } } },
  385. { onlyLocal: true }
  386. );
  387. });
  388. }
  389. _removeFormulaByCfId(r, t, e) {
  390. const i = this.deleteCache(r, t, e).map((a) => a.formulaId);
  391. this._commandService.executeCommand(ua.id, { unitId: r, subUnitId: t, formulaIdList: i }, { onlyLocal: true });
  392. }
  393. getFormulaResultWithCoords(r, t, e, n, i = 0, a = 0) {
  394. const u = this.getSubUnitFormulaMap(r, t);
  395. if (!u)
  396. return {
  397. status: 1
  398. /* NOT_REGISTER */
  399. };
  400. const l = u.getValue(this.createCFormulaId(e, n), ["id"]);
  401. return l ? l.status === 2 && l.result ? {
  402. result: l.result.getValue(i, a),
  403. status: 2
  404. /* SUCCESS */
  405. } : l.status === 3 ? {
  406. status: 3
  407. /* WAIT */
  408. } : {
  409. status: 4
  410. /* ERROR */
  411. } : {
  412. status: 1
  413. /* NOT_REGISTER */
  414. };
  415. }
  416. getFormulaMatrix(r, t, e, n) {
  417. const i = this.getSubUnitFormulaMap(r, t);
  418. if (!i)
  419. return {
  420. status: 1
  421. /* NOT_REGISTER */
  422. };
  423. const a = i.getValue(this.createCFormulaId(e, n), ["id"]);
  424. if (!a)
  425. return {
  426. status: 1
  427. /* NOT_REGISTER */
  428. };
  429. if (a.status === 2 && a.result)
  430. return {
  431. result: a.result,
  432. status: 2
  433. /* SUCCESS */
  434. };
  435. }
  436. /**
  437. * If `formulaText` is not provided, then all caches related to `cfId` will be deleted.
  438. */
  439. deleteCache(r, t, e, n) {
  440. const i = this.getSubUnitFormulaMap(r, t);
  441. if (!i)
  442. return [];
  443. if (n) {
  444. const a = this.createCFormulaId(e, n);
  445. return i.deleteValue(a, ["id"]), [];
  446. } else {
  447. const a = i.getValues().filter((u) => u.cfId === e);
  448. return a.forEach((u) => {
  449. i.deleteValue(u.formulaId, ["formulaId"]);
  450. }), a;
  451. }
  452. }
  453. _getAllFormulaResultByCfId(r, t, e) {
  454. const n = this.getSubUnitFormulaMap(r, t);
  455. return n ? n.getValues().filter((a) => a.cfId === e) : [];
  456. }
  457. /**
  458. * The external environment is not aware of`formulaId`;it communicates internally with the formula engine.
  459. */
  460. _createFormulaId(r, t) {
  461. return `sheet.cf_${r}_${t}_${re.generateRandomId(8)}`;
  462. }
  463. /**
  464. * A conditional formatting may have multiple formulas;if the formulas are identical,then the results will be consistent.
  465. */
  466. createCFormulaId(r, t) {
  467. return `${r}_${t}`;
  468. }
  469. };
  470. G = E0([
  471. d2(0, ot(Pt)),
  472. d2(1, ot(Sb)),
  473. d2(2, ot(B))
  474. ], G);
  475. var S = ((s) => (s.preComputingStart = "preComputingStart", s.preComputing = "preComputing", s.preComputingEnd = "preComputingEnd", s.preComputingError = "preComputingError", s))(S || {});
  476. var u2 = class {
  477. constructor(r) {
  478. m(this, "_cache");
  479. m(this, "_preComputingStatus$", new BehaviorSubject(
  480. "preComputingStart"
  481. /* preComputingStart */
  482. ));
  483. m(this, "preComputingStatus$", this._preComputingStatus$.asObservable().pipe(distinctUntilChanged()));
  484. m(this, "_preComputingCache");
  485. m(this, "_rule");
  486. this._context = r, this._cache = new Qr(r.limit), this._rule = r.rule, this._preComputingCache = null, this._initClearCacheListener();
  487. }
  488. setCacheLength(r) {
  489. this._cache.limit = r;
  490. }
  491. clearCache() {
  492. this._cache.clear();
  493. }
  494. resetPreComputingCache() {
  495. this._preComputingStatus$.next(
  496. "preComputingStart"
  497. /* preComputingStart */
  498. ), this._preComputingCache = null;
  499. }
  500. updateRule(r) {
  501. this._rule = r, this.resetPreComputingCache();
  502. }
  503. getCell(r, t) {
  504. const e = this._createKey(r, t);
  505. if (this._preComputingStatus$.getValue() === "preComputing")
  506. return this._cache.get(e);
  507. let n = this.getPreComputingResult(r, t);
  508. if (n === null && (this._preComputingStatus$.next(
  509. "preComputingStart"
  510. /* preComputingStart */
  511. ), this.preComputing(r, t, this._getContext()), n = this.getPreComputingResult(r, t), n === null))
  512. return this._cache.get(e);
  513. if (this._preComputingStatus$.next(
  514. "preComputingEnd"
  515. /* preComputingEnd */
  516. ), this._cache.has(e))
  517. return this._cache.get(e);
  518. const i = this.getCellResult(r, t, n, this._getContext());
  519. return i !== null && this._setCache(r, t, i), i;
  520. }
  521. setPreComputingCache(r) {
  522. this._preComputingCache = r;
  523. }
  524. getPreComputingResult(r, t) {
  525. return this._preComputingCache;
  526. }
  527. _createKey(r, t) {
  528. return `${r}_${t}`;
  529. }
  530. _setCache(r, t, e) {
  531. const n = this._createKey(r, t);
  532. this._cache.set(n, e);
  533. }
  534. _getContext() {
  535. return { ...this._context, rule: this._rule };
  536. }
  537. _initClearCacheListener() {
  538. this.preComputingStatus$.subscribe((r) => {
  539. r === "preComputingEnd" && this.clearCache();
  540. });
  541. }
  542. };
  543. function a2(s, r) {
  544. return Math.abs(s - r) < Number.EPSILON;
  545. }
  546. var I = (s) => [void 0, null].includes(s);
  547. var U = (s) => {
  548. var e, n;
  549. if (!s)
  550. return null;
  551. if (s.t === dn.BOOLEAN)
  552. return s.v === we.TRUE ? er.TRUE : er.FALSE;
  553. const r = s.v, t = (n = (e = s.p) == null ? void 0 : e.body) == null ? void 0 : n.dataStream.replace(/\r\n$/, "");
  554. return I(r) ? I(t) ? null : t : r;
  555. };
  556. var g2 = 86400;
  557. function A0(s, r = true) {
  558. if (r && s >= 0) {
  559. if (s === 0)
  560. return [1900, 1, 0];
  561. if (s === 60)
  562. return [1900, 2, 29];
  563. if (s < 60)
  564. return [1900, s < 32 ? 1 : 2, (s - 1) % 31 + 1];
  565. }
  566. let t = s + 68569 + 2415019;
  567. const e = Math.floor(4 * t / 146097);
  568. t = t - Math.floor((146097 * e + 3) / 4);
  569. const n = Math.floor(4e3 * (t + 1) / 1461001);
  570. t = t - Math.floor(1461 * n / 4) + 31;
  571. const i = Math.floor(80 * t / 2447), a = t - Math.floor(2447 * i / 80);
  572. t = Math.floor(i / 11);
  573. const u = i + 2 - 12 * t;
  574. return [100 * (e - 49) + n + t | 0, u | 0, a | 0];
  575. }
  576. var _0 = (s) => {
  577. let r = s | 0;
  578. const t = g2 * (s - r);
  579. let e = Math.floor(t);
  580. t - e > 0.9999 && (e += 1, e === g2 && (e = 0, r += 1));
  581. const n = e < 0 ? g2 + e : e, [i, a, u] = A0(s, true), l = Math.floor(n / 60 / 60) % 60, o = Math.floor(n / 60) % 60, h = Math.floor(n) % 60;
  582. return rn(`${i}/${a}/${u} ${l}:${o}:${h}`).valueOf();
  583. };
  584. var l2 = (s, r, t) => {
  585. switch (s.type) {
  586. case x.max: {
  587. let e = 0;
  588. return r.forValue((n, i, a) => {
  589. a > e && (e = a);
  590. }), {
  591. status: b.SUCCESS,
  592. result: e
  593. };
  594. }
  595. case x.min: {
  596. let e;
  597. return r.forValue((n, i, a) => {
  598. e === void 0 && (e = a), a < e && (e = a);
  599. }), {
  600. status: b.SUCCESS,
  601. result: e
  602. };
  603. }
  604. case x.percent: {
  605. let e, n;
  606. r.forValue((u, l, o) => {
  607. (e === void 0 || n === void 0) && (e = o, n = o), o > e && (e = o), o < n && (n = o);
  608. });
  609. const i = (e || 0) - (n || 0), a = Math.max(Math.min(Number(s.value) || 0, 100), 0);
  610. return {
  611. status: b.SUCCESS,
  612. result: i * (a / 100) + (n || 0)
  613. };
  614. }
  615. case x.percentile: {
  616. const e = r.toNativeArray().sort((o, h) => o - h), n = Math.max(Math.min(Number(s.value) || 0, 100), 0), i = (e.length - 1) * n / 100, a = Math.floor(i), u = i - a, l = e[a] + (e[Math.min(a + 1, e.length - 1)] - e[a]) * u;
  617. return {
  618. status: b.SUCCESS,
  619. result: l
  620. };
  621. }
  622. case x.formula: {
  623. const { accessor: e, unitId: n, subUnitId: i, cfId: a } = t, u = String(s.value), l = e.get(G);
  624. return l.registerFormulaWithRange(n, i, a, u), l.getFormulaResultWithCoords(n, i, a, u);
  625. }
  626. case x.num: {
  627. const e = Number(s.value);
  628. return {
  629. status: b.SUCCESS,
  630. result: Number.isNaN(e) ? 0 : e
  631. };
  632. }
  633. }
  634. };
  635. var M1 = (s, r, t, e) => {
  636. const { accessor: n } = e, i = n.get(j), a = new kt();
  637. return t.ranges.forEach((u) => {
  638. tr.foreach(u, (l, o) => {
  639. const h = i.getCellCfs(s, r, l, o);
  640. if (h) {
  641. const c = h.find((d) => d.cfId === t.cfId);
  642. c != null && c.result && a.setValue(l, o, c.result);
  643. }
  644. });
  645. }), a;
  646. };
  647. var Y = (s, r) => {
  648. switch (s.operator) {
  649. case w.between: {
  650. if (typeof s.value != "object" || !s.value.length)
  651. return;
  652. const t = Math.min(...s.value), e = Math.max(...s.value);
  653. return r >= t && r <= e;
  654. }
  655. case w.notBetween: {
  656. if (typeof s.value != "object" || !s.value.length)
  657. return;
  658. const t = Math.min(...s.value), e = Math.max(...s.value);
  659. return !(r >= t && r <= e);
  660. }
  661. case w.equal: {
  662. const t = s.value || 0;
  663. return a2(t, r);
  664. }
  665. case w.notEqual: {
  666. const t = s.value || 0;
  667. return !a2(t, r);
  668. }
  669. case w.greaterThan: {
  670. const t = s.value || 0;
  671. return r > t;
  672. }
  673. case w.greaterThanOrEqual: {
  674. const t = s.value || 0;
  675. return r >= t;
  676. }
  677. case w.lessThan: {
  678. const t = s.value || 0;
  679. return r < t;
  680. }
  681. case w.lessThanOrEqual: {
  682. const t = s.value || 0;
  683. return r <= t;
  684. }
  685. default:
  686. return false;
  687. }
  688. };
  689. var x0 = (s) => {
  690. switch (s) {
  691. case w.greaterThan:
  692. return w.lessThanOrEqual;
  693. case w.greaterThanOrEqual:
  694. return w.lessThan;
  695. case w.lessThan:
  696. return w.greaterThanOrEqual;
  697. case w.lessThanOrEqual:
  698. return w.greaterThan;
  699. }
  700. return s;
  701. };
  702. var y0 = (s, r) => {
  703. const t = (i) => i.a !== void 0 ? i : { ...i, a: 1 }, e = s.findIndex((i) => i.value >= r), n = e - 1;
  704. if (e === 0)
  705. return s[0].color.toRgbString();
  706. if (n >= 0) {
  707. const i = s[n], a = s[e];
  708. if (i.color.isValid && a.color.isValid) {
  709. const u = t(i.color.toRgb()), l = t(a.color.toRgb()), o = a.value - i.value, h = (r - i.value) / o, c = ["r", "g", "b", "a"].reduce((C, D) => {
  710. const f = u[D];
  711. return C[D] = (l[D] - f) * h + f, C;
  712. }, {});
  713. return new Nt(c).toRgbString();
  714. }
  715. } else
  716. return s[s.length - 1].color.toRgbString();
  717. };
  718. var w2 = (s, r, t) => s.map((e) => {
  719. if (e.startColumn > t || e.startRow > r)
  720. return null;
  721. const n = { ...e };
  722. return n.endRow = Math.min(n.endRow, r), n.endColumn = Math.min(n.endColumn, t), n;
  723. }).filter((e) => !!e);
  724. function R1(s) {
  725. let r = 0;
  726. return new kt(s).forValue((t, e, n) => {
  727. r = Math.max(Number.isNaN(r) ? 0 : r, Number(n));
  728. }), r;
  729. }
  730. var M0 = class extends u2 {
  731. preComputing(r, t, e) {
  732. const n = e.rule, i = e.worksheet, a = new kt();
  733. !n.rule.config.every((h) => h.value.type === x.num) && w2(n.ranges, i.getMaxRows() - 1, i.getMaxColumns() - 1).forEach((c) => {
  734. tr.foreach(c, (d, C) => {
  735. const D = e.getCellValue(d, C), f = D && D.v;
  736. if (!I(f) && (D == null ? void 0 : D.t) === dn.NUMBER) {
  737. const F = Number(f);
  738. !Number.isNaN(F) && a.setValue(d, C, F);
  739. }
  740. });
  741. });
  742. const l = [...n.rule.config].sort((h, c) => h.index - c.index).map((h) => ({
  743. value: l2(h.value, a, {
  744. ...e,
  745. cfId: n.cfId
  746. }),
  747. color: new Nt(h.color)
  748. }));
  749. if (!l.some((h) => uS(h.value) ? h.value.status !== b.SUCCESS : false)) {
  750. const h = l.map((c) => c.color).reduce((c, d, C) => (c.result.push({ color: d, value: c.sortValue[C] }), c), {
  751. result: [],
  752. sortValue: l.map((c) => c.value.result).sort((c, d) => c - d)
  753. }).result;
  754. this.setPreComputingCache(h), this._preComputingStatus$.next(S.preComputingEnd);
  755. return;
  756. }
  757. this._preComputingStatus$.next(S.preComputing);
  758. }
  759. getCellResult(r, t, e, n) {
  760. if (!e)
  761. return null;
  762. const i = n.getCellValue(r, t);
  763. if (i.t === dn.NUMBER) {
  764. const a = Number(i.v);
  765. if (!Number.isNaN(a))
  766. return y0(e, a);
  767. }
  768. }
  769. };
  770. var R0 = "sheet-conditional-rule-data-bar";
  771. var x2 = "#ffbe38";
  772. var y2 = "#abd91a";
  773. var I0 = "#000";
  774. var b0 = 34;
  775. var L0 = class extends y3 {
  776. constructor() {
  777. super(...arguments);
  778. m(this, "_paddingRightAndLeft", 2);
  779. m(this, "_paddingTopAndBottom", 2);
  780. m(this, "uKey", R0);
  781. m(this, "Z_INDEX", b0);
  782. m(this, "_radius", 1);
  783. }
  784. // eslint-disable-next-line max-lines-per-function
  785. draw(t, e, n, i) {
  786. const { worksheet: a } = n;
  787. if (!a)
  788. return false;
  789. t.save(), tr.foreach(n.rowColumnSegment, (u, l) => {
  790. if (!a.getRowVisible(u) || !a.getColVisible(l))
  791. return;
  792. const o = a.getCell(u, l);
  793. if (o && o.dataBar) {
  794. const { color: h, value: c, startPoint: d, isGradient: C } = o.dataBar, D = n.getCellWithCoordByIndex(u, l, false);
  795. let { isMerged: f, isMergedMainCell: F, mergeInfo: p, startY: L, endY: k, startX: V3, endX: z } = D;
  796. if (f || (F && (L = p.startY, k = p.endY, V3 = p.startX, z = p.endX), !this.isRenderDiffRangesByCell(p, i)))
  797. return;
  798. const Q2 = z - V3, h2 = k + o2 - L, e2 = Q2 - this._paddingRightAndLeft * 2, p2 = h2 - this._paddingTopAndBottom * 2;
  799. if (c > 0) {
  800. const Z = Math.max(e2 * (1 - d / 100) * c / 100, 1), O = V3 + this._paddingRightAndLeft + d / 100 * e2, $ = L + this._paddingTopAndBottom;
  801. if (C) {
  802. const P = t.createLinearGradient(O, $, O + Z, $);
  803. P.addColorStop(0, h), P.addColorStop(1, "rgb(255 255 255)"), t.fillStyle = P, t.strokeStyle = h, t.lineWidth = 1;
  804. } else
  805. t.fillStyle = h;
  806. this._drawRectWithRoundedCorner(t, O, $, Z, p2, false, true, true, false), C && t.stroke();
  807. } else {
  808. const Z = Math.max(e2 * d / 100 * Math.abs(c) / 100, 1), O = V3 + this._paddingRightAndLeft + d / 100 * e2 - Z, $ = L + this._paddingTopAndBottom;
  809. if (C) {
  810. const P = t.createLinearGradient(O, $, O + Z, $);
  811. P.addColorStop(0, "rgb(255 255 255)"), P.addColorStop(1, h), t.fillStyle = P, t.strokeStyle = h, t.lineWidth = 1;
  812. } else
  813. t.fillStyle = h;
  814. this._drawRectWithRoundedCorner(t, O, $, Z, p2, true, false, false, true), C && t.stroke();
  815. }
  816. }
  817. }), t.restore();
  818. }
  819. _drawRectWithRoundedCorner(t, e, n, i, a, u, l, o, h) {
  820. const c = this._radius;
  821. !a || !i || (t.beginPath(), t.moveTo(e + c, n), t.lineTo(e + i - c, n), l ? t.arcTo(e + i, n, e + i, n + c, c) : t.lineTo(e + i, n), t.lineTo(e + i, n + a - c), o ? t.arcTo(e + i, n + a, e + i - c, n + a, c) : t.lineTo(e + i, n + a), t.lineTo(e + c, n + a), h ? t.arcTo(e, n + a, e, n + a - c, c) : t.lineTo(e, n + a), t.lineTo(e, n + c), u ? t.arcTo(e, n, e + c, n, c) : t.lineTo(e, n), t.closePath(), t.fill());
  822. }
  823. };
  824. $3.add(L0);
  825. var t2 = (s) => Math.max(Math.min(100, s), 0);
  826. var S0 = (s, r, t) => {
  827. const e = t(s, r);
  828. if (e && e.t === dn.NUMBER) {
  829. const n = Number(e.v);
  830. return Number.isNaN(n) ? null : n;
  831. }
  832. return null;
  833. };
  834. var B0 = class extends u2 {
  835. preComputing(r, t, e) {
  836. const n = e.rule, i = n.rule, a = e.worksheet, u = new kt();
  837. ![n.rule.config.max, n.rule.config.min].every((C) => C.type === x.num) && w2(n.ranges, a.getMaxRows() - 1, a.getMaxColumns() - 1).forEach((D) => {
  838. tr.foreach(D, (f, F) => {
  839. const p = e.getCellValue(f, F), L = p && p.v;
  840. if (!I(L) && (p == null ? void 0 : p.t) === dn.NUMBER) {
  841. const k = Number(L);
  842. !Number.isNaN(k) && u.setValue(f, F, k);
  843. }
  844. });
  845. });
  846. const o = l2(i.config.min, u, { ...e, cfId: n.cfId }), h = l2(i.config.max, u, { ...e, cfId: n.cfId });
  847. let c = 0, d = 0;
  848. if (o.status === b.SUCCESS) {
  849. const C = Number(o.result);
  850. c = Number.isNaN(C) ? 0 : C;
  851. } else {
  852. this._preComputingStatus$.next(S.preComputing);
  853. return;
  854. }
  855. if (h.status === b.SUCCESS) {
  856. const C = Number(h.result), D = Number.isNaN(C) ? 0 : C;
  857. d = Math.max(D, c), c = Math.min(D, c);
  858. let f = 50;
  859. if (c < 0 && d <= 0)
  860. f = 100;
  861. else if (c < 0 && d > 0) {
  862. const F = Math.abs(d) + Math.abs(c);
  863. f = Math.abs(c) / F * 100;
  864. } else
  865. c >= 0 && d > 0 && (f = 0);
  866. this.setPreComputingCache({ min: c, max: d, startPoint: f }), this._preComputingStatus$.next(S.preComputingEnd);
  867. return;
  868. }
  869. this._preComputingStatus$.next(S.preComputing);
  870. }
  871. // eslint-disable-next-line complexity
  872. getCellResult(r, t, e, n) {
  873. const { min: i, max: a, startPoint: u } = e, o = n.rule.rule, h = o.isShowValue, c = o.config.isGradient, d = S0(r, t, n.getCellValue);
  874. if (!(d === null || d < i || i === a || a < i)) {
  875. if (d === 0)
  876. return { color: I0, startPoint: u, value: 0, isGradient: c, isShowValue: h };
  877. if (i < 0 && a <= 0) {
  878. const C = a - i, D = t2((a - d) / C * 100);
  879. return D === 0 ? void 0 : { color: o.config.nativeColor || y2, startPoint: u, value: -D, isGradient: c, isShowValue: h };
  880. } else if (i < 0 && a > 0)
  881. if (d > 0) {
  882. const C = t2(Math.min(d / a, 1) * 100);
  883. return C === 0 ? void 0 : { color: o.config.positiveColor || x2, startPoint: u, value: C, isGradient: c, isShowValue: h };
  884. } else {
  885. const C = t2(Math.min(Math.abs(d) / Math.abs(i), 1) * 100);
  886. return C === 0 ? void 0 : { color: o.config.nativeColor || y2, startPoint: u, value: -C, isGradient: c, isShowValue: h };
  887. }
  888. else if (i >= 0 && a > 0) {
  889. const C = a - i, D = 0, f = t2((1 - (a - d) / C) * 100);
  890. return f === 0 ? void 0 : { color: o.config.positiveColor || x2, startPoint: D, value: f, isGradient: c, isShowValue: h };
  891. }
  892. }
  893. }
  894. };
  895. var k0 = class extends u2 {
  896. // eslint-disable-next-line max-lines-per-function
  897. preComputing(r, t, e) {
  898. const n = e.rule.rule, i = e.rule.ranges, u = (() => {
  899. switch (n.subType) {
  900. case E.average: {
  901. let l = 0, o = 0;
  902. return i.forEach((h) => {
  903. tr.foreach(h, (c, d) => {
  904. const C = e.getCellValue(c, d), D = U(C || void 0);
  905. C && C.t === dn.NUMBER && D !== void 0 && (l += Number(D) || 0, o++);
  906. });
  907. }), { value: l / o, type: n.subType };
  908. }
  909. case E.uniqueValues:
  910. case E.duplicateValues: {
  911. const l = /* @__PURE__ */ new Map();
  912. return i.forEach((o) => {
  913. tr.foreach(o, (h, c) => {
  914. const d = e.getCellValue(h, c), C = U(d || void 0);
  915. if (C !== void 0) {
  916. const D = l.get(C);
  917. D ? l.set(C, D + 1) : l.set(C, 1);
  918. }
  919. });
  920. }), { value: l, type: n.subType };
  921. }
  922. case E.rank: {
  923. const l = [];
  924. i.forEach((c) => {
  925. tr.foreach(c, (d, C) => {
  926. const D = e.getCellValue(d, C), f = U(D || void 0);
  927. D && D.t === dn.NUMBER && f !== void 0 && l.push(Number(f) || 0);
  928. });
  929. }), l.sort((c, d) => d - c);
  930. const o = e.rule.rule, h = o.isPercent ? Math.floor(Math.max(Math.min(o.value, 100), 0) / 100 * l.length) : Math.floor(Math.max(Math.min(o.isBottom ? o.value - 1 : o.value, l.length), 0));
  931. return o.isBottom ? { value: l[l.length - h - 1], type: n.subType } : { value: l[Math.max(h - 1, 0)], type: n.subType };
  932. }
  933. case E.formula: {
  934. const l = n, o = e.accessor.get(G);
  935. o.registerFormulaWithRange(e.unitId, e.subUnitId, e.rule.cfId, l.value, e.rule.ranges);
  936. const h = o.getFormulaMatrix(e.unitId, e.subUnitId, e.rule.cfId, l.value);
  937. return h && h.status === b.SUCCESS ? (this._preComputingStatus$.next(S.preComputingEnd), {
  938. value: h.result,
  939. type: n.subType
  940. }) : (this._preComputingStatus$.next(S.preComputing), null);
  941. }
  942. case E.timePeriod:
  943. switch (n.operator) {
  944. case R.last7Days:
  945. return {
  946. value: {
  947. start: rn().subtract(7, "day").valueOf(),
  948. end: rn().valueOf()
  949. },
  950. type: n.subType
  951. };
  952. case R.lastMonth:
  953. return {
  954. value: {
  955. start: rn().startOf("month").subtract(1, "month").valueOf(),
  956. end: rn().endOf("month").subtract(1, "month").valueOf()
  957. },
  958. type: n.subType
  959. };
  960. case R.lastWeek:
  961. return {
  962. value: {
  963. start: rn().startOf("week").subtract(1, "week").valueOf(),
  964. end: rn().endOf("week").subtract(1, "week").valueOf()
  965. },
  966. type: n.subType
  967. };
  968. case R.nextMonth:
  969. return {
  970. value: {
  971. start: rn().startOf("month").add(1, "month").valueOf(),
  972. end: rn().endOf("month").add(1, "month").valueOf()
  973. },
  974. type: n.subType
  975. };
  976. case R.nextWeek:
  977. return {
  978. value: {
  979. start: rn().startOf("week").add(1, "week").valueOf(),
  980. end: rn().endOf("week").add(1, "week").valueOf()
  981. },
  982. type: n.subType
  983. };
  984. case R.thisMonth:
  985. return {
  986. value: {
  987. start: rn().startOf("month").valueOf(),
  988. end: rn().endOf("month").valueOf()
  989. },
  990. type: n.subType
  991. };
  992. case R.thisWeek:
  993. return {
  994. value: {
  995. start: rn().startOf("week").valueOf(),
  996. end: rn().endOf("week").valueOf()
  997. },
  998. type: n.subType
  999. };
  1000. case R.today:
  1001. return {
  1002. value: {
  1003. start: rn().startOf("day").valueOf(),
  1004. end: rn().endOf("day").valueOf()
  1005. },
  1006. type: n.subType
  1007. };
  1008. case R.tomorrow:
  1009. return {
  1010. value: {
  1011. start: rn().startOf("day").add(1, "day").valueOf(),
  1012. end: rn().endOf("day").add(1, "day").valueOf()
  1013. },
  1014. type: n.subType
  1015. };
  1016. case R.yesterday:
  1017. return {
  1018. value: {
  1019. start: rn().startOf("day").subtract(1, "day").valueOf(),
  1020. end: rn().endOf("day").subtract(1, "day").valueOf()
  1021. },
  1022. type: n.subType
  1023. };
  1024. }
  1025. }
  1026. })();
  1027. this.setPreComputingCache(u);
  1028. }
  1029. // eslint-disable-next-line max-lines-per-function
  1030. getCellResult(r, t, e, n) {
  1031. const i = n.getCellValue(r, t), a = n.rule.rule;
  1032. return (() => {
  1033. switch (a.subType) {
  1034. case E.number: {
  1035. const o = i && Number(i.v);
  1036. if (I(o) || Number.isNaN(o) || (i == null ? void 0 : i.t) !== dn.NUMBER)
  1037. return;
  1038. const h = a;
  1039. return Y({ operator: h.operator, value: h.value || 0 }, o || 0);
  1040. }
  1041. case E.text: {
  1042. const o = a, h = U(i), c = h === null ? "" : String(h), d = o.value || "";
  1043. switch (o.operator) {
  1044. case M.beginsWith:
  1045. return c.startsWith(d);
  1046. case M.containsBlanks:
  1047. return /^\s*$/.test(c);
  1048. case M.notContainsBlanks:
  1049. return !/^\s*$/.test(c);
  1050. case M.containsErrors:
  1051. return yr.has(c);
  1052. case M.notContainsErrors:
  1053. return !yr.has(c);
  1054. case M.containsText:
  1055. return c.indexOf(d) > -1;
  1056. case M.notContainsText:
  1057. return c.indexOf(d) === -1;
  1058. case M.endsWith:
  1059. return c.endsWith(d);
  1060. case M.equal:
  1061. return c === d;
  1062. case M.notEqual:
  1063. return c !== d;
  1064. default:
  1065. return false;
  1066. }
  1067. }
  1068. case E.timePeriod: {
  1069. const o = U(i);
  1070. if (I(o) || Number.isNaN(Number(o)) || (i == null ? void 0 : i.t) !== dn.NUMBER || !e)
  1071. return;
  1072. const h = _0(Number(o)), { start: c, end: d } = e.value;
  1073. return h >= c && h <= d;
  1074. }
  1075. case E.average: {
  1076. const o = i && i.v, h = Number(o);
  1077. if (I(o) || Number.isNaN(h) || (i == null ? void 0 : i.t) !== dn.NUMBER || !e)
  1078. return false;
  1079. const c = a, d = e.value;
  1080. switch (c.operator) {
  1081. case w.greaterThan:
  1082. return h > d;
  1083. case w.greaterThanOrEqual:
  1084. return h >= d;
  1085. case w.lessThan:
  1086. return h < d;
  1087. case w.lessThanOrEqual:
  1088. return h <= d;
  1089. case w.equal:
  1090. return a2(h, d);
  1091. case w.notEqual:
  1092. return !a2(h, d);
  1093. default:
  1094. return false;
  1095. }
  1096. }
  1097. case E.rank: {
  1098. const o = U(i), h = Number(o);
  1099. if (I(o) || Number.isNaN(h) || (i == null ? void 0 : i.t) !== dn.NUMBER || !e)
  1100. return false;
  1101. const c = e.value;
  1102. return a.isBottom ? h <= c : h >= c;
  1103. }
  1104. case E.uniqueValues: {
  1105. const o = U(i);
  1106. return I(o) || !e ? false : e.value.get(o) === 1;
  1107. }
  1108. case E.duplicateValues: {
  1109. const o = U(i);
  1110. return I(o) || !e ? false : e.value.get(o) !== 1;
  1111. }
  1112. case E.formula: {
  1113. const o = e == null ? void 0 : e.value;
  1114. return o ? o.getValue(r, t) === true : false;
  1115. }
  1116. }
  1117. })() ? a.style : {};
  1118. }
  1119. };
  1120. var N0 = (s, r, t) => {
  1121. const e = t(s, r);
  1122. if (e && e.t === dn.NUMBER) {
  1123. const n = Number(e.v);
  1124. return Number.isNaN(n) ? null : n;
  1125. }
  1126. return null;
  1127. };
  1128. var T0 = class extends u2 {
  1129. preComputing(r, t, e) {
  1130. const n = e.rule.rule, i = e.worksheet, a = new kt();
  1131. !n.config.every((h) => h.value.type === x.num) && w2(e.rule.ranges, i.getMaxRows() - 1, i.getMaxColumns() - 1).forEach((c) => {
  1132. tr.foreach(c, (d, C) => {
  1133. const D = e.getCellValue(d, C), f = D && D.v;
  1134. if (!I(f) && (D == null ? void 0 : D.t) === dn.NUMBER) {
  1135. const F = Number(f);
  1136. !Number.isNaN(F) && a.setValue(d, C, F);
  1137. }
  1138. });
  1139. });
  1140. const l = n.config.map((h) => l2(h.value, a, { ...e, cfId: e.rule.cfId }));
  1141. if (!l.some((h) => h.status !== b.SUCCESS)) {
  1142. const h = l.map((c, d) => ({
  1143. operator: n.config[d].operator,
  1144. value: Number(c.result) || 0
  1145. })).reduce((c, d, C, D) => {
  1146. const f = n.config[C];
  1147. if (!C || C === D.length - 1)
  1148. c.push({ ...d, iconId: f.iconId, iconType: f.iconType });
  1149. else {
  1150. const F = D[C - 1];
  1151. Y(F, d.value) || c.push({ ...d, iconId: f.iconId, iconType: f.iconType });
  1152. }
  1153. return c;
  1154. }, []);
  1155. this.setPreComputingCache(h), this._preComputingStatus$.next(S.preComputingEnd);
  1156. return;
  1157. }
  1158. this._preComputingStatus$.next(S.preComputing);
  1159. }
  1160. getCellResult(r, t, e, n) {
  1161. if (!e)
  1162. return null;
  1163. const i = N0(r, t, n.getCellValue);
  1164. if (i === null)
  1165. return;
  1166. const a = n.rule.rule, u = a.isShowValue === void 0 ? true : !!a.isShowValue;
  1167. for (let l = 0; l < e.length; l++) {
  1168. const o = e[l], h = { ...o }, c = { ...o }, { iconId: d, iconType: C } = o;
  1169. if (l === 0) {
  1170. if (Y(o, i))
  1171. return { iconId: d, iconType: C, isShowValue: u };
  1172. } else {
  1173. if (l === e.length - 1)
  1174. return { iconId: d, iconType: C, isShowValue: u };
  1175. {
  1176. const D = e[l - 1];
  1177. if (c.operator = x0(D.operator), c.value = D.value, Y(h, i) && Y(c, i))
  1178. return { iconId: d, iconType: C, isShowValue: u };
  1179. }
  1180. }
  1181. }
  1182. }
  1183. };
  1184. var U0 = Object.defineProperty;
  1185. var V0 = Object.getOwnPropertyDescriptor;
  1186. var O0 = (s, r, t, e) => {
  1187. for (var n = e > 1 ? void 0 : e ? V0(r, t) : r, i = s.length - 1, a; i >= 0; i--)
  1188. (a = s[i]) && (n = (e ? a(r, t, n) : a(n)) || n);
  1189. return e && n && U0(r, t, n), n;
  1190. };
  1191. var n2 = (s, r) => (t, e) => r(t, e, s);
  1192. var C2 = 50 * 20 * 3 * 3;
  1193. var j = class extends nt {
  1194. constructor(r, t, e, n) {
  1195. super();
  1196. m(this, "_calculateUnitManagers", /* @__PURE__ */ new Map());
  1197. m(this, "_rTreeManager", new $R());
  1198. m(this, "_cellCache", new Qr(C2));
  1199. m(this, "_markDirty$", new Subject());
  1200. m(this, "markDirty$", this._markDirty$.asObservable());
  1201. m(this, "_markRuleDirtyAtOnce", (r3, t3, e2, n3 = true) => {
  1202. if (this._cellCache.clear(), n3) {
  1203. const a = this._ensureCalculateUnitManager(r3, t3).get(e2);
  1204. a && a.resetPreComputingCache();
  1205. }
  1206. this._markDirty$.next({
  1207. unitId: r3,
  1208. subUnitId: t3,
  1209. cfId: e2
  1210. });
  1211. });
  1212. m(this, "markRuleDirty", (() => {
  1213. const r3 = new Subject();
  1214. return this.disposeWithMe(r3.pipe(bufferTime(100), filter((t3) => !!t3.length), map((t3) => {
  1215. const e2 = /* @__PURE__ */ new Set(), n3 = [];
  1216. return t3.forEach((i) => {
  1217. const a = `${i.unitId}_${i.subUnitId}_${i.cfId}`;
  1218. if (e2.has(a)) {
  1219. if (i.isNeedResetPreComputingCache) {
  1220. const u = n3.find((l) => l.cfId === i.cfId);
  1221. u.isNeedResetPreComputingCache = true;
  1222. }
  1223. return;
  1224. }
  1225. e2.add(a), n3.push({ ...i });
  1226. }), n3;
  1227. })).subscribe((t3) => {
  1228. t3.forEach((e2) => {
  1229. this._markRuleDirtyAtOnce(e2.unitId, e2.subUnitId, e2.cfId, e2.isNeedResetPreComputingCache);
  1230. });
  1231. })), (t3, e2, n3, i = true) => {
  1232. r3.next({ unitId: t3, subUnitId: e2, cfId: n3, isNeedResetPreComputingCache: i });
  1233. };
  1234. })());
  1235. this._injector = r, this._conditionalFormattingRuleModel = t, this._conditionalFormattingFormulaService = e, this._univerInstanceService = n, this._initRuleListener(), this._handleCustomFormulasSeparately(), this._initCFFormulaListener();
  1236. }
  1237. _initCFFormulaListener() {
  1238. this.disposeWithMe(
  1239. this._conditionalFormattingFormulaService.result$.subscribe(({ unitId: r, subUnitId: t, cfId: e, isAllFinished: n }) => {
  1240. n && this._markRuleDirtyAtOnce(r, t, e, n);
  1241. })
  1242. );
  1243. }
  1244. getCellCfs(r, t, e, n) {
  1245. const i = this._createCacheKey(r, t, e, n);
  1246. if (this._cellCache.has(i))
  1247. return this._cellCache.get(i);
  1248. const a = this._getCellCfs(r, t, e, n);
  1249. return a.length && this._cellCache.set(i, a), a;
  1250. }
  1251. _getCellCfs(r, t, e, n) {
  1252. var h;
  1253. const i = (h = this._conditionalFormattingRuleModel.getSubunitRules(r, t)) != null ? h : [], a = this._ensureCalculateUnitManager(r, t), u = this._rTreeManager.bulkSearch([{ unitId: r, sheetId: t, range: { startColumn: n, endColumn: n, startRow: e, endRow: e } }]), l = i.filter((c) => u.has(c.cfId));
  1254. return l.length ? l.map((c) => {
  1255. const d = a.get(c.cfId);
  1256. return d ? {
  1257. cfId: c.cfId,
  1258. result: d.getCell(e, n)
  1259. } : null;
  1260. }).filter((c) => !!c).map((c, d) => ({ ...c, priority: d })) : [];
  1261. }
  1262. _handleCustomFormulasSeparately() {
  1263. this.disposeWithMe(
  1264. this._conditionalFormattingRuleModel.$ruleChange.subscribe((r) => {
  1265. if (r.type === "set") {
  1266. const { unitId: t, subUnitId: e } = r, n = r.oldRule;
  1267. n.rule.type === y.highlightCell && n.rule.subType === E.formula && this._conditionalFormattingFormulaService.deleteCache(t, e, n.cfId);
  1268. }
  1269. })
  1270. );
  1271. }
  1272. _initRuleListener() {
  1273. this.disposeWithMe(
  1274. this._conditionalFormattingRuleModel.$ruleChange.subscribe((r) => {
  1275. const { unitId: t, subUnitId: e, rule: n } = r, { cfId: i, ranges: a } = n, u = this._ensureCalculateUnitManager(t, e);
  1276. switch (this.markRuleDirty(t, e, i), r.type) {
  1277. case "add": {
  1278. this._rTreeManager.bulkInsert(a.map((o) => ({ unitId: t, sheetId: e, id: i, range: o })));
  1279. const l = this._createRuleCalculateUnitInstance(t, e, n);
  1280. if (!l)
  1281. return;
  1282. u.set(n.cfId, l);
  1283. break;
  1284. }
  1285. case "delete": {
  1286. this._rTreeManager.bulkRemove(a.map((l) => ({ unitId: t, sheetId: e, id: i, range: l }))), u.delete(n.cfId);
  1287. break;
  1288. }
  1289. case "set": {
  1290. const l = r.oldRule;
  1291. if (this._rTreeManager.bulkRemove(l.ranges.map((o) => ({ unitId: t, sheetId: e, id: l.cfId, range: o }))), this._rTreeManager.bulkInsert(a.map((o) => ({ unitId: t, sheetId: e, id: i, range: o }))), l.rule.type !== n.rule.type) {
  1292. const o = this._createRuleCalculateUnitInstance(t, e, n);
  1293. if (!o)
  1294. return;
  1295. u.delete(l.cfId), u.set(n.cfId, o);
  1296. } else {
  1297. const o = u.get(l.cfId);
  1298. if (!o)
  1299. return;
  1300. o.updateRule(n);
  1301. }
  1302. }
  1303. }
  1304. })
  1305. );
  1306. }
  1307. _ensureCalculateUnitManager(r, t) {
  1308. let e = this._calculateUnitManagers.get(r);
  1309. e || (e = /* @__PURE__ */ new Map(), this._calculateUnitManagers.set(r, e));
  1310. let n = e.get(t);
  1311. return n || (n = /* @__PURE__ */ new Map(), e.set(t, n)), n;
  1312. }
  1313. _createRuleCalculateUnitInstance(r, t, e) {
  1314. const n = this._univerInstanceService.getUnit(r), i = n == null ? void 0 : n.getSheetBySheetId(t);
  1315. if (!n || !i)
  1316. return;
  1317. const a = {
  1318. workbook: n,
  1319. worksheet: i,
  1320. unitId: r,
  1321. subUnitId: t,
  1322. accessor: this._injector,
  1323. rule: e,
  1324. limit: C2,
  1325. getCellValue: (u, l) => i.getCellRaw(u, l) || {}
  1326. };
  1327. switch (e.rule.type) {
  1328. case y.colorScale:
  1329. return new M0(a);
  1330. case y.dataBar:
  1331. return new B0(a);
  1332. case y.highlightCell:
  1333. return new k0(a);
  1334. case y.iconSet:
  1335. return new T0(a);
  1336. }
  1337. }
  1338. _createCacheKey(r, t, e, n) {
  1339. return `${r}_${t}_${e}_${n}`;
  1340. }
  1341. setCacheLength(r = C2) {
  1342. this._cellCache.limit !== r && (this._cellCache.limit = r, this._calculateUnitManagers.forEach((t) => {
  1343. t.forEach((e) => {
  1344. e.forEach((n) => {
  1345. n.setCacheLength(r);
  1346. });
  1347. });
  1348. }));
  1349. }
  1350. };
  1351. j = O0([
  1352. n2(0, ot(Ot)),
  1353. n2(1, ot(B)),
  1354. n2(2, ot(G)),
  1355. n2(3, _n)
  1356. ], j);
  1357. var $0 = { mistake: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%229.99999%22%20cy%3D%2210%22%20r%3D%227.03704%22%20fill%3D%22%23FE4B4B%22%2F%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6.87359%206.87332C6.6146%207.13231%206.6146%207.55221%206.87359%207.8112L9.062%209.99961L6.87356%2012.188C6.61457%2012.447%206.61457%2012.8669%206.87356%2013.1259C7.13255%2013.3849%207.55245%2013.3849%207.81144%2013.1259L9.99987%2010.9375L12.1882%2013.1258C12.4472%2013.3848%2012.8671%2013.3848%2013.1261%2013.1258C13.3851%2012.8669%2013.3851%2012.447%2013.1261%2012.188L10.9378%209.99961L13.1261%207.81127C13.3851%207.55228%2013.3851%207.13238%2013.1261%206.87339C12.8671%206.61441%2012.4472%206.61441%2012.1882%206.87339L9.99987%209.06173L7.81147%206.87332C7.55248%206.61433%207.13257%206.61433%206.87359%206.87332Z%22%20fill%3D%22%23FFFFFF%22%2F%3E%0A%3C%2Fsvg%3E%0A", warn: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%229.99999%22%20cy%3D%2210%22%20r%3D%227.03704%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3Cpath%20d%3D%22M9.16817%206.67735C9.16646%206.61745%209.1656%206.5875%209.16653%206.56236C9.18103%206.16817%209.49136%205.84883%209.88497%205.82306C9.91008%205.82141%209.94004%205.82141%209.99996%205.82141V5.82141C10.0599%205.82141%2010.0899%205.82141%2010.115%205.82306C10.5086%205.84883%2010.8189%206.16817%2010.8334%206.56236C10.8343%206.5875%2010.8335%206.61745%2010.8318%206.67735L10.7043%2011.131C10.6934%2011.5121%2010.3812%2011.8154%209.99995%2011.8154V11.8154C9.61866%2011.8154%209.30655%2011.5121%209.29564%2011.131L9.16817%206.67735Z%22%20fill%3D%22%23FFFFFF%22%2F%3E%0A%3Crect%20x%3D%229.31488%22%20y%3D%2212.8086%22%20width%3D%221.37006%22%20height%3D%221.37006%22%20rx%3D%220.685032%22%20fill%3D%22%23FFFFFF%22%2F%3E%0A%3C%2Fsvg%3E%0A", correct: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M17.037%2010C17.037%2013.8865%2013.8864%2017.0371%209.99999%2017.0371C6.11354%2017.0371%202.96295%2013.8865%202.96295%2010C2.96295%206.1136%206.11354%202.96301%209.99999%202.96301C13.8864%202.96301%2017.037%206.1136%2017.037%2010Z%22%20fill%3D%22%2359D01E%22%2F%3E%0A%3Cpath%20d%3D%22M13.9239%207.17477C13.6638%206.91472%2013.2422%206.91472%2012.9821%207.17477L8.74433%2011.4126L7.01786%209.6861C6.75781%209.42606%206.33619%209.42606%206.07614%209.6861C5.81609%209.94615%205.81609%2010.3678%206.07614%2010.6278L8.27349%2012.8252C8.53354%2013.0852%208.95516%2013.0852%209.21521%2012.8252L9.2195%2012.8209L13.9239%208.1165C14.1839%207.85645%2014.1839%207.43482%2013.9239%207.17477Z%22%20fill%3D%22%23FFFFFF%22%2F%3E%0A%3C%2Fsvg%3E%0A" };
  1358. var P0 = { starEmpty: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M10.3437%203.3312L11.6861%206.67412C11.8451%207.0699%2012.2165%207.33978%2012.6421%207.36863L16.2362%207.61233C16.5693%207.63492%2016.7048%208.05202%2016.4486%208.26608L13.6841%2010.5758C13.3568%2010.8493%2013.215%2011.2859%2013.319%2011.6996L14.1979%2015.1931C14.2793%2015.5168%2013.9245%2015.7746%2013.6418%2015.5971L10.5908%2013.6817C10.2296%2013.4549%209.77045%2013.4549%209.40924%2013.6817L6.35828%2015.5971C6.07553%2015.7746%205.72072%2015.5168%205.80217%2015.1931L6.68105%2011.6996C6.7851%2011.2859%206.64322%2010.8493%206.31592%2010.5758L3.55145%208.26607C3.29525%208.05202%203.43078%207.63492%203.76386%207.61233L7.358%207.36863C7.78352%207.33978%208.15498%207.0699%208.31391%206.67412L9.65633%203.3312C9.78074%203.0214%2010.2193%203.0214%2010.3437%203.3312Z%22%20fill%3D%22%23fff%22%20stroke%3D%22%23FFBD37%22%20stroke-width%3D%220.740741%22%2F%3E%0A%3C%2Fsvg%3E%0A", starIncomplete: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cg%20clip-path%3D%22url(%23clip0_613_177)%22%3E%0A%3Cmask%20id%3D%22mask0_613_177%22%20style%3D%22mask-type%3Aalpha%22%20maskUnits%3D%22userSpaceOnUse%22%20x%3D%2210%22%20y%3D%220%22%20width%3D%2210%22%20height%3D%2220%22%3E%0A%3Crect%20x%3D%2210.3704%22%20y%3D%220.37037%22%20width%3D%229.25926%22%20height%3D%2219.2593%22%20fill%3D%22%23C4C4C4%22%20stroke%3D%22%23F7D564%22%20stroke-width%3D%220.740741%22%2F%3E%0A%3C%2Fmask%3E%0A%3Cg%20mask%3D%22url(%23mask0_613_177)%22%3E%0A%3Cpath%20d%3D%22M10.3437%203.3312L11.6861%206.67412C11.845%207.0699%2012.2165%207.33978%2012.642%207.36863L16.2361%207.61233C16.5692%207.63492%2016.7047%208.05202%2016.4485%208.26608L13.6841%2010.5758C13.3568%2010.8493%2013.2149%2011.2859%2013.3189%2011.6996L14.1978%2015.1931C14.2793%2015.5168%2013.9245%2015.7746%2013.6417%2015.5971L10.5908%2013.6817C10.2295%2013.4549%209.77039%2013.4549%209.40918%2013.6817L6.35822%2015.5971C6.07547%2015.7746%205.72066%2015.5168%205.80211%2015.1931L6.68098%2011.6996C6.78504%2011.2859%206.64316%2010.8493%206.31586%2010.5758L3.55139%208.26607C3.29519%208.05202%203.43072%207.63492%203.7638%207.61233L7.35793%207.36863C7.78346%207.33978%208.15491%207.0699%208.31385%206.67412L9.65627%203.3312C9.78068%203.0214%2010.2192%203.0214%2010.3437%203.3312Z%22%20fill%3D%22%23fff%22%20stroke%3D%22%23FFBD37%22%20stroke-width%3D%220.740741%22%2F%3E%0A%3C%2Fg%3E%0A%3Cmask%20id%3D%22mask1_613_177%22%20style%3D%22mask-type%3Aalpha%22%20maskUnits%3D%22userSpaceOnUse%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2210%22%20height%3D%2220%22%3E%0A%3Crect%20width%3D%2210%22%20height%3D%2220%22%20fill%3D%22%23C4C4C4%22%2F%3E%0A%3C%2Fmask%3E%0A%3Cg%20mask%3D%22url(%23mask1_613_177)%22%3E%0A%3Cpath%20d%3D%22M10.3437%203.3312L11.6861%206.67412C11.845%207.0699%2012.2165%207.33978%2012.642%207.36863L16.2361%207.61233C16.5692%207.63492%2016.7047%208.05202%2016.4485%208.26608L13.6841%2010.5758C13.3568%2010.8493%2013.2149%2011.2859%2013.3189%2011.6996L14.1978%2015.1931C14.2793%2015.5168%2013.9245%2015.7746%2013.6417%2015.5971L10.5908%2013.6817C10.2295%2013.4549%209.77039%2013.4549%209.40918%2013.6817L6.35822%2015.5971C6.07547%2015.7746%205.72066%2015.5168%205.80211%2015.1931L6.68098%2011.6996C6.78504%2011.2859%206.64316%2010.8493%206.31586%2010.5758L3.55139%208.26607C3.29519%208.05202%203.43072%207.63492%203.7638%207.61233L7.35793%207.36863C7.78346%207.33978%208.15491%207.0699%208.31385%206.67412L9.65627%203.3312C9.78068%203.0214%2010.2192%203.0214%2010.3437%203.3312Z%22%20fill%3D%22%23FFBD37%22%20stroke%3D%22%23FFBD37%22%20stroke-width%3D%220.740741%22%2F%3E%0A%3C%2Fg%3E%0A%3C%2Fg%3E%0A%3Cdefs%3E%0A%3CclipPath%20id%3D%22clip0_613_177%22%3E%0A%3Crect%20width%3D%2220%22%20height%3D%2220%22%20fill%3D%22white%22%2F%3E%0A%3C%2FclipPath%3E%0A%3C%2Fdefs%3E%0A%3C%2Fsvg%3E%0A", starFull: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M10.3437%203.3312L11.6861%206.67412C11.8451%207.0699%2012.2165%207.33978%2012.6421%207.36863L16.2362%207.61233C16.5693%207.63492%2016.7048%208.05202%2016.4486%208.26608L13.6841%2010.5758C13.3568%2010.8493%2013.215%2011.2859%2013.319%2011.6996L14.1979%2015.1931C14.2793%2015.5168%2013.9245%2015.7746%2013.6418%2015.5971L10.5908%2013.6817C10.2296%2013.4549%209.77045%2013.4549%209.40924%2013.6817L6.35828%2015.5971C6.07553%2015.7746%205.72072%2015.5168%205.80217%2015.1931L6.68105%2011.6996C6.7851%2011.2859%206.64322%2010.8493%206.31592%2010.5758L3.55145%208.26607C3.29525%208.05202%203.43078%207.63492%203.76386%207.61233L7.358%207.36863C7.78352%207.33978%208.15498%207.0699%208.31391%206.67412L9.65633%203.3312C9.78074%203.0214%2010.2193%203.0214%2010.3437%203.3312Z%22%20fill%3D%22%23FFBD37%22%20stroke%3D%22%23FFBD37%22%20stroke-width%3D%220.740741%22%2F%3E%0A%3C%2Fsvg%3E%0A" };
  1359. var W0 = { progress0: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%2210%22%20cy%3D%229.99993%22%20r%3D%226.66667%22%20stroke%3D%22%237A7A7A%22%20stroke-width%3D%220.740741%22%2F%3E%0A%3C%2Fsvg%3E%0A", progress25: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%2210%22%20cy%3D%229.99993%22%20r%3D%226.66667%22%20stroke%3D%22%237A7A7A%22%20stroke-width%3D%220.740741%22%2F%3E%0A%3Cpath%20d%3D%22M16.2963%209.99991C16.2963%209.17307%2016.1335%208.35432%2015.8171%207.59042C15.5006%206.82652%2015.0369%206.13242%2014.4522%205.54776C13.8675%204.96309%2013.1734%204.49931%2012.4095%204.18289C11.6456%203.86647%2010.8269%203.70361%2010%203.70361L10%209.99991H16.2963Z%22%20fill%3D%22%237A7A7A%22%2F%3E%0A%3C%2Fsvg%3E%0A", progress50: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%2210%22%20cy%3D%229.99993%22%20r%3D%226.66667%22%20stroke%3D%22%237A7A7A%22%20stroke-width%3D%220.740741%22%2F%3E%0A%3Cpath%20d%3D%22M10%2016.2962C11.6699%2016.2962%2013.2714%2015.6328%2014.4522%2014.4521C15.633%2013.2713%2016.2963%2011.6698%2016.2963%209.99991C16.2963%208.33003%2015.633%206.72854%2014.4522%205.54776C13.2714%204.36697%2011.6699%203.70361%2010%203.70361L10%209.99991L10%2016.2962Z%22%20fill%3D%22%237A7A7A%22%2F%3E%0A%3C%2Fsvg%3E%0A", progress75: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%2210%22%20cy%3D%229.99993%22%20r%3D%226.66667%22%20stroke%3D%22%237A7A7A%22%20stroke-width%3D%220.740741%22%2F%3E%0A%3Cpath%20d%3D%22M3.70374%209.99991C3.70374%2011.2452%204.07301%2012.4625%204.76485%2013.4979C5.4567%2014.5334%206.44005%2015.3404%207.59054%2015.8169C8.74104%2016.2935%2010.007%2016.4182%2011.2284%2016.1752C12.4497%2015.9323%2013.5716%2015.3326%2014.4522%2014.4521C15.3327%2013.5715%2015.9324%2012.4496%2016.1753%2011.2283C16.4183%2010.0069%2016.2936%208.74092%2015.8171%207.59042C15.3405%206.43992%2014.5335%205.45658%2013.4981%204.76473C12.4626%204.07288%2011.2453%203.70361%2010%203.70361L10%209.99991L3.70374%209.99991Z%22%20fill%3D%22%237A7A7A%22%2F%3E%0A%3C%2Fsvg%3E%0A", progress100: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%2210%22%20cy%3D%229.99993%22%20r%3D%226.66667%22%20stroke%3D%22%237A7A7A%22%20stroke-width%3D%220.740741%22%2F%3E%0A%3Ccircle%20cx%3D%2210%22%20cy%3D%229.99991%22%20r%3D%226.2963%22%20fill%3D%22%237A7A7A%22%2F%3E%0A%3C%2Fsvg%3E%0A" };
  1360. var Z0 = { signal0: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%2214.4764%22%20y%3D%222.98926%22%20width%3D%222.3%22%20height%3D%2214.0597%22%20rx%3D%220.5%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%2210.7255%22%20y%3D%225.93921%22%20width%3D%222.3%22%20height%3D%2211.1096%22%20rx%3D%220.5%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%226.97455%22%20y%3D%229.70435%22%20width%3D%222.3%22%20height%3D%227.3443%22%20rx%3D%220.5%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%223.22363%22%20y%3D%2213.3302%22%20width%3D%222.3%22%20height%3D%223.71851%22%20rx%3D%220.5%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3C%2Fsvg%3E%0A", signal25: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%2214.4764%22%20y%3D%222.98926%22%20width%3D%222.3%22%20height%3D%2214.0597%22%20rx%3D%220.5%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%2210.7255%22%20y%3D%225.93921%22%20width%3D%222.3%22%20height%3D%2211.1096%22%20rx%3D%220.5%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%226.97455%22%20y%3D%229.70435%22%20width%3D%222.3%22%20height%3D%227.3443%22%20rx%3D%220.5%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%223.22363%22%20y%3D%2213.3302%22%20width%3D%222.3%22%20height%3D%223.71851%22%20rx%3D%220.5%22%20fill%3D%22%230493EE%22%2F%3E%0A%3C%2Fsvg%3E%0A", signal50: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%2214.4764%22%20y%3D%222.98926%22%20width%3D%222.3%22%20height%3D%2214.0597%22%20rx%3D%220.5%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%2210.7255%22%20y%3D%225.93921%22%20width%3D%222.3%22%20height%3D%2211.1096%22%20rx%3D%220.5%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%226.97455%22%20y%3D%229.70435%22%20width%3D%222.3%22%20height%3D%227.3443%22%20rx%3D%220.5%22%20fill%3D%22%230493EE%22%2F%3E%0A%3Crect%20x%3D%223.22363%22%20y%3D%2213.3302%22%20width%3D%222.3%22%20height%3D%223.71851%22%20rx%3D%220.5%22%20fill%3D%22%230493EE%22%2F%3E%0A%3C%2Fsvg%3E%0A", signal75: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%2214.4764%22%20y%3D%222.98926%22%20width%3D%222.3%22%20height%3D%2214.0597%22%20rx%3D%220.5%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%2210.7255%22%20y%3D%225.93921%22%20width%3D%222.3%22%20height%3D%2211.1096%22%20rx%3D%220.5%22%20fill%3D%22%230493EE%22%2F%3E%0A%3Crect%20x%3D%226.97455%22%20y%3D%229.70435%22%20width%3D%222.3%22%20height%3D%227.3443%22%20rx%3D%220.5%22%20fill%3D%22%230493EE%22%2F%3E%0A%3Crect%20x%3D%223.22363%22%20y%3D%2213.3302%22%20width%3D%222.3%22%20height%3D%223.71851%22%20rx%3D%220.5%22%20fill%3D%22%230493EE%22%2F%3E%0A%3C%2Fsvg%3E%0A", signal100: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%2214.4764%22%20y%3D%222.98926%22%20width%3D%222.3%22%20height%3D%2214.0597%22%20rx%3D%220.5%22%20fill%3D%22%230493EE%22%2F%3E%0A%3Crect%20x%3D%2210.7255%22%20y%3D%225.93933%22%20width%3D%222.3%22%20height%3D%2211.1096%22%20rx%3D%220.5%22%20fill%3D%22%230493EE%22%2F%3E%0A%3Crect%20x%3D%226.97455%22%20y%3D%229.70447%22%20width%3D%222.3%22%20height%3D%227.3443%22%20rx%3D%220.5%22%20fill%3D%22%230493EE%22%2F%3E%0A%3Crect%20x%3D%223.22363%22%20y%3D%2213.3302%22%20width%3D%222.3%22%20height%3D%223.71851%22%20rx%3D%220.5%22%20fill%3D%22%230493EE%22%2F%3E%0A%3C%2Fsvg%3E%0A" };
  1361. var q0 = { guffaw: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M16.887%2010C16.887%2013.8037%2013.8036%2016.8871%209.99999%2016.8871C6.19638%2016.8871%203.11295%2013.8037%203.11295%2010C3.11295%206.19644%206.19638%203.11301%209.99999%203.11301C13.8036%203.11301%2016.887%206.19644%2016.887%2010Z%22%20fill%3D%22%23FFBD37%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%220.3%22%2F%3E%0A%3Crect%20x%3D%227.40741%22%20y%3D%227.40735%22%20width%3D%221.48148%22%20height%3D%221.48148%22%20rx%3D%220.740741%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Crect%20x%3D%2211.1111%22%20y%3D%227.40735%22%20width%3D%221.48148%22%20height%3D%221.48148%22%20rx%3D%220.740741%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Cpath%20d%3D%22M12.5355%2013.5821C13.0482%2013.1841%2013.3951%2012.6107%2013.5405%2012.0327C13.5934%2011.8226%2013.5051%2011.6349%2013.3518%2011.5331C13.2036%2011.4346%2013.0031%2011.4203%2012.8265%2011.5131C11.0615%2012.4407%208.94609%2012.4427%207.1828%2011.513C7.00629%2011.4199%206.80602%2011.4343%206.65798%2011.5329C6.50518%2011.6346%206.41701%2011.8217%206.46844%2012.0312C6.61029%2012.609%206.95079%2013.1833%207.46449%2013.5821C8.14361%2014.1093%209.05608%2014.3999%2010%2014.3999C10.9439%2014.3999%2011.8564%2014.1093%2012.5355%2013.5821Z%22%20fill%3D%22white%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%220.4%22%2F%3E%0A%3C%2Fsvg%3E%0A", smile: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%229.99999%22%20cy%3D%2210%22%20r%3D%226.88704%22%20fill%3D%22%23FFBD37%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%220.3%22%2F%3E%0A%3Crect%20x%3D%227.40741%22%20y%3D%227.40735%22%20width%3D%221.48148%22%20height%3D%221.48148%22%20rx%3D%220.740741%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Crect%20x%3D%2211.1111%22%20y%3D%227.40735%22%20width%3D%221.48148%22%20height%3D%221.48148%22%20rx%3D%220.740741%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Cpath%20d%3D%22M7.03705%2011.8518C7.03705%2011.8518%207.77779%2013.7037%2010%2013.7037C12.2222%2013.7037%2012.963%2011.8518%2012.963%2011.8518%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%220.962963%22%20stroke-linecap%3D%22round%22%2F%3E%0A%3C%2Fsvg%3E%0A", noninductive: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%229.99999%22%20cy%3D%2210%22%20r%3D%226.88704%22%20fill%3D%22%23FFBD37%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%220.3%22%2F%3E%0A%3Crect%20x%3D%227.40741%22%20y%3D%227.9259%22%20width%3D%221.48148%22%20height%3D%221.11111%22%20rx%3D%220.555556%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Crect%20x%3D%2211.1111%22%20y%3D%227.9259%22%20width%3D%221.48148%22%20height%3D%221.11111%22%20rx%3D%220.555556%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Cpath%20d%3D%22M7.03705%2012.5927C7.03705%2012.5927%208.14816%2012.5927%2010.3704%2012.5927C12.5926%2012.5927%2012.963%2012.5927%2012.963%2012.5927%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%220.962963%22%20stroke-linecap%3D%22round%22%2F%3E%0A%3C%2Fsvg%3E%0A", dissatisfied: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%229.99999%22%20cy%3D%2210%22%20r%3D%226.88704%22%20fill%3D%22%23FFBD37%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%220.3%22%2F%3E%0A%3Crect%20x%3D%227.40741%22%20y%3D%227.40735%22%20width%3D%221.48148%22%20height%3D%221.48148%22%20rx%3D%220.740741%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Crect%20x%3D%2211.1111%22%20y%3D%227.40735%22%20width%3D%221.48148%22%20height%3D%221.48148%22%20rx%3D%220.740741%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Cpath%20d%3D%22M7.03705%2013.7037C7.03705%2013.7037%207.77779%2011.8519%2010%2011.8519C12.2222%2011.8519%2012.963%2013.7037%2012.963%2013.7037%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%220.962963%22%20stroke-linecap%3D%22round%22%2F%3E%0A%3C%2Fsvg%3E%0A", impatient: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%229.99999%22%20cy%3D%2210%22%20r%3D%226.88704%22%20fill%3D%22%23FFBD37%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%220.3%22%2F%3E%0A%3Crect%20x%3D%227.40741%22%20y%3D%227.40735%22%20width%3D%221.48148%22%20height%3D%221.48148%22%20rx%3D%220.740741%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Crect%20x%3D%2211.1111%22%20y%3D%227.40735%22%20width%3D%221.48148%22%20height%3D%221.48148%22%20rx%3D%220.740741%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Cpath%20d%3D%22M7.47573%2011.731C6.96306%2012.129%206.61613%2012.7024%206.47071%2013.2804C6.41784%2013.4905%206.50617%2013.6782%206.65942%2013.78C6.80761%2013.8785%207.00813%2013.8928%207.18477%2013.8C8.9498%2012.8724%2011.0652%2012.8704%2012.8285%2013.8002C13.005%2013.8932%2013.2052%2013.8788%2013.3533%2013.7802C13.5061%2013.6785%2013.5942%2013.4914%2013.5428%2013.2819C13.401%2012.7041%2013.0605%2012.1298%2012.5468%2011.731C11.8676%2011.2038%2010.9552%2010.9132%2010.0112%2010.9132C9.06732%2010.9132%208.15485%2011.2038%207.47573%2011.731Z%22%20fill%3D%22white%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%220.4%22%2F%3E%0A%3C%2Fsvg%3E%0A" };
  1362. var G0 = JSON.parse('{"down-red":"data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M8.90467%203.99244C8.84611%204.1338%208.84611%204.31301%208.84611%204.67143V13.716L5.92068%2010.7906C5.66724%2010.5371%205.54052%2010.4104%205.39916%2010.3519C5.21067%2010.2738%204.9989%2010.2738%204.81041%2010.3519C4.66905%2010.4104%204.54233%2010.5371%204.28889%2010.7906C4.03545%2011.044%203.90873%2011.1707%203.85018%2011.3121C3.77211%2011.5006%203.77211%2011.7124%203.85018%2011.9008C3.90873%2012.0422%204.03545%2012.1689%204.28889%2012.4224L9.03476%2017.1682C9.07839%2017.2127%209.12737%2017.2617%209.18231%2017.3166L9.18239%2017.3167L9.18241%2017.3167C9.40545%2017.5398%209.53035%2017.6647%209.65346%2017.7313C9.67085%2017.7408%209.6882%2017.7492%209.70577%2017.7564C9.89425%2017.8345%2010.106%2017.8345%2010.2945%2017.7564C10.4359%2017.6979%2010.5626%2017.5712%2010.816%2017.3177C10.8986%2017.2352%2010.9677%2017.1661%2011.0253%2017.1056L15.7095%2012.4214L15.7095%2012.4213C15.963%2012.1679%2016.0897%2012.0412%2016.1482%2011.8998C16.2263%2011.7114%2016.2263%2011.4996%2016.1482%2011.3111C16.0897%2011.1697%2015.963%2011.043%2015.7095%2010.7896C15.4561%2010.5361%2015.3294%2010.4094%2015.188%2010.3509C14.9995%2010.2728%2014.7878%2010.2728%2014.5993%2010.3509C14.4579%2010.4094%2014.3312%2010.5361%2014.0778%2010.7896L14.0777%2010.7896L11.1538%2013.7135V4.67142C11.1538%204.31301%2011.1538%204.1338%2011.0953%203.99244C11.0172%203.80395%2010.8674%203.6542%2010.6789%203.57613C10.5376%203.51758%2010.3584%203.51758%209.99996%203.51758C9.64154%203.51758%209.46233%203.51758%209.32097%203.57613C9.13249%203.6542%208.98274%203.80395%208.90467%203.99244Z%22%20fill%3D%22%23FE4B4B%22%2F%3E%0A%3C%2Fsvg%3E%0A","right-gold":"data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.32508%2011.7609C3.46644%2011.8194%203.64565%2011.8194%204.00407%2011.8194H13.049L10.1235%2014.745C9.87002%2014.9984%209.7433%2015.1251%209.68475%2015.2665C9.60668%2015.455%209.60668%2015.6668%209.68475%2015.8552C9.7433%2015.9966%209.87002%2016.1233%2010.1235%2016.3768C10.3769%2016.6302%2010.5036%2016.7569%2010.645%2016.8155C10.8335%2016.8935%2011.0452%2016.8935%2011.2337%2016.8155C11.3751%2016.7569%2011.5018%2016.6302%2011.7552%2016.3768L16.5105%2011.6215C16.5524%2011.5803%2016.5983%2011.5344%2016.6493%2011.4834L16.6495%2011.4831C16.8561%2011.2765%2016.9785%2011.1542%2017.0484%2011.0394C17.0648%2011.0128%2017.0782%2010.9866%2017.0893%2010.9599C17.1674%2010.7714%2017.1674%2010.5596%2017.0893%2010.3711C17.0308%2010.2298%2016.904%2010.1031%2016.6506%209.84962C16.5685%209.76752%2016.4997%209.69872%2016.4394%209.64123L11.7542%204.95601C11.5007%204.70257%2011.374%204.57585%2011.2327%204.5173C11.0442%204.43923%2010.8324%204.43923%2010.6439%204.5173C10.5026%204.57585%2010.3758%204.70257%2010.1224%204.95601L10.1224%204.95601C9.86895%205.20945%209.74223%205.33617%209.68368%205.47753C9.60561%205.66601%209.60561%205.87779%209.68368%206.06627C9.74223%206.20764%209.86895%206.33436%2010.1224%206.5878L13.0463%209.51175H4.00407C3.64565%209.51175%203.46644%209.51175%203.32508%209.5703C3.1366%209.64837%202.98685%209.79812%202.90877%209.98661C2.85022%2010.128%202.85022%2010.3072%202.85022%2010.6656C2.85022%2011.024%202.85022%2011.2032%202.90877%2011.3446C2.98685%2011.5331%203.1366%2011.6828%203.32508%2011.7609Z%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fsvg%3E%0A","up-green":"data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M11.0936%2017.3406C11.1522%2017.1992%2011.1522%2017.02%2011.1522%2016.6616V7.61701L14.0776%2010.5424C14.3311%2010.7959%2014.4578%2010.9226%2014.5991%2010.9811C14.7876%2011.0592%2014.9994%2011.0592%2015.1879%2010.9811C15.3292%2010.9226%2015.456%2010.7959%2015.7094%2010.5424C15.9628%2010.289%2016.0896%2010.1623%2016.1481%2010.0209C16.2262%209.83243%2016.2262%209.62066%2016.1481%209.43217C16.0896%209.29081%2015.9628%209.16409%2015.7094%208.91065L10.9645%204.16576C10.9207%204.12105%2010.8714%204.07178%2010.8161%204.01648L10.8159%204.0163C10.5916%203.792%2010.4666%203.66696%2010.3428%203.60058C10.3261%203.59154%2010.3094%203.58358%2010.2925%203.57658C10.104%203.49851%209.89226%203.49851%209.70378%203.57658C9.56242%203.63514%209.4357%203.76186%209.18226%204.0153C9.09955%204.09801%209.03034%204.16722%208.97258%204.22785L4.28878%208.91166C4.03534%209.1651%203.90862%209.29182%203.85006%209.43318C3.77199%209.62166%203.77199%209.83344%203.85006%2010.0219C3.90862%2010.1633%204.03534%2010.29%204.28878%2010.5434C4.54221%2010.7969%204.66893%2010.9236%204.8103%2010.9822C4.99878%2011.0602%205.21056%2011.0602%205.39904%2010.9822C5.5404%2010.9236%205.66712%2010.7969%205.92056%2010.5434L5.92056%2010.5434L8.84449%207.61951V16.6616C8.84449%2017.02%208.84449%2017.1992%208.90305%2017.3406C8.98112%2017.5291%209.13087%2017.6788%209.31935%2017.7569C9.46072%2017.8154%209.63992%2017.8154%209.99834%2017.8154C10.3568%2017.8154%2010.536%2017.8154%2010.6773%2017.7569C10.8658%2017.6788%2011.0156%2017.5291%2011.0936%2017.3406Z%22%20fill%3D%22%2359D01E%22%2F%3E%0A%3C%2Fsvg%3E%0A","rightAndDown-gold":"data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M4.5062%206.72126C4.56476%206.86262%204.69148%206.98934%204.94492%207.24278L11.3404%2013.6382L7.20313%2013.6382C6.84471%2013.6382%206.66551%2013.6382%206.52414%2013.6968C6.33566%2013.7749%206.18591%2013.9246%206.10784%2014.1131C6.04928%2014.2545%206.04928%2014.4337%206.04928%2014.7921C6.04928%2015.1505%206.04928%2015.3297%206.10784%2015.4711C6.18591%2015.6596%206.33566%2015.8093%206.52414%2015.8874C6.66551%2015.9459%206.84471%2015.9459%207.20313%2015.9459L13.9194%2015.9459C13.9805%2015.9465%2014.0484%2015.9465%2014.1243%2015.9465H14.1243C14.4353%2015.9465%2014.6114%2015.9465%2014.7449%2015.9082C14.7659%2015.9023%2014.7859%2015.8954%2014.8052%2015.8874C14.9937%2015.8093%2015.1434%2015.6596%2015.2215%2015.4711C15.2801%2015.3297%2015.2801%2015.1505%2015.2801%2014.7921C15.2801%2014.6767%2015.2801%2014.5799%2015.2781%2014.497L15.2781%207.86957C15.2781%207.51115%2015.2781%207.33194%2015.2195%207.19058C15.1415%207.0021%2014.9917%206.85235%2014.8032%206.77428C14.6619%206.71572%2014.4827%206.71572%2014.1243%206.71572C13.7658%206.71572%2013.5866%206.71572%2013.4453%206.77428C13.2568%206.85235%2013.107%207.0021%2013.029%207.19058C12.9704%207.33194%2012.9704%207.51115%2012.9704%207.86957L12.9704%2012.0047L6.5767%205.61099C6.32326%205.35755%206.19654%205.23083%206.05518%205.17228C5.8667%205.09421%205.65492%205.09421%205.46644%205.17228C5.32508%205.23083%205.19836%205.35755%204.94492%205.61099C4.69148%205.86443%204.56476%205.99115%204.5062%206.13251C4.42813%206.32099%204.42813%206.53277%204.5062%206.72126Z%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fsvg%3E%0A","rightAndUp-gold":"data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6.05431%2016.1597C6.19567%2016.1012%206.32239%2015.9745%206.57583%2015.721L12.9712%209.32568L12.9712%2013.4626C12.9712%2013.821%2012.9712%2014.0002%2013.0297%2014.1416C13.1078%2014.3301%2013.2576%2014.4798%2013.446%2014.5579C13.5874%2014.6164%2013.7666%2014.6164%2014.125%2014.6164C14.4834%2014.6164%2014.6626%2014.6164%2014.804%2014.5579C14.9925%2014.4798%2015.1422%2014.3301%2015.2203%2014.1416C15.2789%2014.0002%2015.2789%2013.821%2015.2789%2013.4626L15.2789%206.75233C15.2795%206.68972%2015.2795%206.62004%2015.2795%206.54182L15.2795%206.54157C15.2795%206.22585%2015.2795%206.04918%2015.2395%205.91495C15.2339%205.89605%2015.2276%205.878%2015.2203%205.86053C15.1422%205.67204%2014.9925%205.52229%2014.804%205.44422C14.6626%205.38567%2014.4834%205.38567%2014.125%205.38567L14.125%205.38567C14.0075%205.38567%2013.9093%205.38567%2013.8254%205.38773L7.20256%205.38773C6.84414%205.38773%206.66493%205.38773%206.52357%205.44628C6.33509%205.52436%206.18534%205.6741%206.10727%205.86259C6.04871%206.00395%206.04871%206.18315%206.04871%206.54156V6.54157L6.04871%206.54159C6.04871%206.9%206.04871%207.0792%206.10727%207.22056C6.18534%207.40905%206.33509%207.55879%206.52357%207.63687C6.66493%207.69542%206.84414%207.69542%207.20256%207.69542H11.3379L4.94405%2014.0892C4.69061%2014.3427%204.56389%2014.4694%204.50533%2014.6108C4.42726%2014.7992%204.42726%2015.011%204.50533%2015.1995C4.56389%2015.3409%204.69061%2015.4676%204.94405%2015.721C5.19749%2015.9745%205.32421%2016.1012%205.46557%2016.1597C5.65405%2016.2378%205.86583%2016.2378%206.05431%2016.1597Z%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fsvg%3E%0A","down-gray":"data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M8.90467%203.99244C8.84611%204.1338%208.84611%204.31301%208.84611%204.67143V13.716L5.92068%2010.7906C5.66724%2010.5371%205.54052%2010.4104%205.39916%2010.3519C5.21067%2010.2738%204.9989%2010.2738%204.81041%2010.3519C4.66905%2010.4104%204.54233%2010.5371%204.28889%2010.7906C4.03545%2011.044%203.90873%2011.1707%203.85018%2011.3121C3.77211%2011.5006%203.77211%2011.7124%203.85018%2011.9008C3.90873%2012.0422%204.03545%2012.1689%204.28889%2012.4224L9.03476%2017.1682C9.07839%2017.2127%209.12737%2017.2617%209.18231%2017.3166L9.18239%2017.3167L9.18241%2017.3167C9.40545%2017.5398%209.53035%2017.6647%209.65346%2017.7313C9.67085%2017.7408%209.6882%2017.7492%209.70577%2017.7564C9.89425%2017.8345%2010.106%2017.8345%2010.2945%2017.7564C10.4359%2017.6979%2010.5626%2017.5712%2010.816%2017.3177C10.8986%2017.2352%2010.9677%2017.1661%2011.0253%2017.1056L15.7095%2012.4214L15.7095%2012.4213C15.963%2012.1679%2016.0897%2012.0412%2016.1482%2011.8998C16.2263%2011.7114%2016.2263%2011.4996%2016.1482%2011.3111C16.0897%2011.1697%2015.963%2011.043%2015.7095%2010.7896C15.4561%2010.5361%2015.3294%2010.4094%2015.188%2010.3509C14.9995%2010.2728%2014.7878%2010.2728%2014.5993%2010.3509C14.4579%2010.4094%2014.3312%2010.5361%2014.0778%2010.7896L14.0777%2010.7896L11.1538%2013.7135V4.67142C11.1538%204.31301%2011.1538%204.1338%2011.0953%203.99244C11.0172%203.80395%2010.8674%203.6542%2010.6789%203.57613C10.5376%203.51758%2010.3584%203.51758%209.99996%203.51758C9.64154%203.51758%209.46233%203.51758%209.32097%203.57613C9.13249%203.6542%208.98274%203.80395%208.90467%203.99244Z%22%20fill%3D%22%23999999%22%2F%3E%0A%3C%2Fsvg%3E%0A","right-gray":"data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.32508%2011.7609C3.46644%2011.8194%203.64565%2011.8194%204.00407%2011.8194H13.049L10.1235%2014.745C9.87002%2014.9984%209.7433%2015.1251%209.68475%2015.2665C9.60668%2015.455%209.60668%2015.6668%209.68475%2015.8552C9.7433%2015.9966%209.87002%2016.1233%2010.1235%2016.3768C10.3769%2016.6302%2010.5036%2016.7569%2010.645%2016.8155C10.8335%2016.8935%2011.0452%2016.8935%2011.2337%2016.8155C11.3751%2016.7569%2011.5018%2016.6302%2011.7552%2016.3768L16.5105%2011.6215C16.5524%2011.5803%2016.5983%2011.5344%2016.6493%2011.4834L16.6495%2011.4831C16.8561%2011.2765%2016.9785%2011.1542%2017.0484%2011.0394C17.0648%2011.0128%2017.0782%2010.9866%2017.0893%2010.9599C17.1674%2010.7714%2017.1674%2010.5596%2017.0893%2010.3711C17.0308%2010.2298%2016.904%2010.1031%2016.6506%209.84962C16.5685%209.76752%2016.4997%209.69872%2016.4394%209.64123L11.7542%204.95601C11.5007%204.70257%2011.374%204.57585%2011.2327%204.5173C11.0442%204.43923%2010.8324%204.43923%2010.6439%204.5173C10.5026%204.57585%2010.3758%204.70257%2010.1224%204.95601L10.1224%204.95601C9.86895%205.20945%209.74223%205.33617%209.68368%205.47753C9.60561%205.66601%209.60561%205.87779%209.68368%206.06627C9.74223%206.20764%209.86895%206.33436%2010.1224%206.5878L13.0463%209.51175H4.00407C3.64565%209.51175%203.46644%209.51175%203.32508%209.5703C3.1366%209.64837%202.98685%209.79812%202.90877%209.98661C2.85022%2010.128%202.85022%2010.3072%202.85022%2010.6656C2.85022%2011.024%202.85022%2011.2032%202.90877%2011.3446C2.98685%2011.5331%203.1366%2011.6828%203.32508%2011.7609Z%22%20fill%3D%22%23999999%22%2F%3E%0A%3C%2Fsvg%3E%0A","up-gray":"data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M11.0936%2017.3406C11.1522%2017.1992%2011.1522%2017.02%2011.1522%2016.6616V7.61701L14.0776%2010.5424C14.3311%2010.7959%2014.4578%2010.9226%2014.5991%2010.9811C14.7876%2011.0592%2014.9994%2011.0592%2015.1879%2010.9811C15.3292%2010.9226%2015.456%2010.7959%2015.7094%2010.5424C15.9628%2010.289%2016.0896%2010.1623%2016.1481%2010.0209C16.2262%209.83243%2016.2262%209.62066%2016.1481%209.43217C16.0896%209.29081%2015.9628%209.16409%2015.7094%208.91065L10.9645%204.16576C10.9207%204.12105%2010.8714%204.07178%2010.8161%204.01648L10.8159%204.0163C10.5916%203.792%2010.4666%203.66696%2010.3428%203.60058C10.3261%203.59154%2010.3094%203.58358%2010.2925%203.57658C10.104%203.49851%209.89226%203.49851%209.70378%203.57658C9.56242%203.63514%209.4357%203.76186%209.18226%204.0153C9.09955%204.09801%209.03034%204.16722%208.97258%204.22785L4.28878%208.91166C4.03534%209.1651%203.90862%209.29182%203.85006%209.43318C3.77199%209.62166%203.77199%209.83344%203.85006%2010.0219C3.90862%2010.1633%204.03534%2010.29%204.28878%2010.5434C4.54221%2010.7969%204.66893%2010.9236%204.8103%2010.9822C4.99878%2011.0602%205.21056%2011.0602%205.39904%2010.9822C5.5404%2010.9236%205.66712%2010.7969%205.92056%2010.5434L5.92056%2010.5434L8.84449%207.61951V16.6616C8.84449%2017.02%208.84449%2017.1992%208.90305%2017.3406C8.98112%2017.5291%209.13087%2017.6788%209.31935%2017.7569C9.46072%2017.8154%209.63992%2017.8154%209.99834%2017.8154C10.3568%2017.8154%2010.536%2017.8154%2010.6773%2017.7569C10.8658%2017.6788%2011.0156%2017.5291%2011.0936%2017.3406Z%22%20fill%3D%22%23999999%22%2F%3E%0A%3C%2Fsvg%3E%0A","rightAndDown-gray":"data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M4.5062%206.72126C4.56476%206.86262%204.69148%206.98934%204.94492%207.24278L11.3404%2013.6382L7.20313%2013.6382C6.84471%2013.6382%206.66551%2013.6382%206.52414%2013.6968C6.33566%2013.7749%206.18591%2013.9246%206.10784%2014.1131C6.04928%2014.2545%206.04928%2014.4337%206.04928%2014.7921C6.04928%2015.1505%206.04928%2015.3297%206.10784%2015.4711C6.18591%2015.6596%206.33566%2015.8093%206.52414%2015.8874C6.66551%2015.9459%206.84471%2015.9459%207.20313%2015.9459L13.9194%2015.9459C13.9805%2015.9465%2014.0484%2015.9465%2014.1243%2015.9465H14.1243C14.4353%2015.9465%2014.6114%2015.9465%2014.7449%2015.9082C14.7659%2015.9023%2014.7859%2015.8954%2014.8052%2015.8874C14.9937%2015.8093%2015.1434%2015.6596%2015.2215%2015.4711C15.2801%2015.3297%2015.2801%2015.1505%2015.2801%2014.7921C15.2801%2014.6767%2015.2801%2014.5799%2015.2781%2014.497L15.2781%207.86957C15.2781%207.51115%2015.2781%207.33194%2015.2195%207.19058C15.1415%207.0021%2014.9917%206.85235%2014.8032%206.77428C14.6619%206.71572%2014.4827%206.71572%2014.1243%206.71572C13.7658%206.71572%2013.5866%206.71572%2013.4453%206.77428C13.2568%206.85235%2013.107%207.0021%2013.029%207.19058C12.9704%207.33194%2012.9704%207.51115%2012.9704%207.86957L12.9704%2012.0047L6.5767%205.61099C6.32326%205.35755%206.19654%205.23083%206.05518%205.17228C5.8667%205.09421%205.65492%205.09421%205.46644%205.17228C5.32508%205.23083%205.19836%205.35755%204.94492%205.61099C4.69148%205.86443%204.56476%205.99115%204.5062%206.13251C4.42813%206.32099%204.42813%206.53277%204.5062%206.72126Z%22%20fill%3D%22%23999999%22%2F%3E%0A%3C%2Fsvg%3E%0A","rightAndUp-gray":"data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6.05431%2016.1597C6.19567%2016.1012%206.32239%2015.9745%206.57583%2015.721L12.9712%209.32568L12.9712%2013.4626C12.9712%2013.821%2012.9712%2014.0002%2013.0297%2014.1416C13.1078%2014.3301%2013.2576%2014.4798%2013.446%2014.5579C13.5874%2014.6164%2013.7666%2014.6164%2014.125%2014.6164C14.4834%2014.6164%2014.6626%2014.6164%2014.804%2014.5579C14.9925%2014.4798%2015.1422%2014.3301%2015.2203%2014.1416C15.2789%2014.0002%2015.2789%2013.821%2015.2789%2013.4626L15.2789%206.75233C15.2795%206.68972%2015.2795%206.62004%2015.2795%206.54182L15.2795%206.54157C15.2795%206.22585%2015.2795%206.04918%2015.2395%205.91495C15.2339%205.89605%2015.2276%205.878%2015.2203%205.86053C15.1422%205.67204%2014.9925%205.52229%2014.804%205.44422C14.6626%205.38567%2014.4834%205.38567%2014.125%205.38567L14.125%205.38567C14.0075%205.38567%2013.9093%205.38567%2013.8254%205.38773L7.20256%205.38773C6.84414%205.38773%206.66493%205.38773%206.52357%205.44628C6.33509%205.52436%206.18534%205.6741%206.10727%205.86259C6.04871%206.00395%206.04871%206.18315%206.04871%206.54156V6.54157L6.04871%206.54159C6.04871%206.9%206.04871%207.0792%206.10727%207.22056C6.18534%207.40905%206.33509%207.55879%206.52357%207.63687C6.66493%207.69542%206.84414%207.69542%207.20256%207.69542H11.3379L4.94405%2014.0892C4.69061%2014.3427%204.56389%2014.4694%204.50533%2014.6108C4.42726%2014.7992%204.42726%2015.011%204.50533%2015.1995C4.56389%2015.3409%204.69061%2015.4676%204.94405%2015.721C5.19749%2015.9745%205.32421%2016.1012%205.46557%2016.1597C5.65405%2016.2378%205.86583%2016.2378%206.05431%2016.1597Z%22%20fill%3D%22%23999999%22%2F%3E%0A%3C%2Fsvg%3E%0A"}');
  1363. var j0 = { cross: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%223.70374%22%20y%3D%228.14795%22%20width%3D%2212.5926%22%20height%3D%223.7037%22%20rx%3D%220.740741%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fsvg%3E%0A", up: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M9.44533%205.81157C9.74012%205.47858%2010.2598%205.47858%2010.5546%205.81157L16.2868%2012.2867C16.71%2012.7647%2016.3706%2013.5184%2015.7322%2013.5184H4.26776C3.62933%2013.5184%203.28995%2012.7647%203.71313%2012.2867L9.44533%205.81157Z%22%20fill%3D%22%2359D01E%22%2F%3E%0A%3C%2Fsvg%3E%0A", down: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M10.5547%2014.1884C10.2599%2014.5214%209.74019%2014.5214%209.4454%2014.1884L3.71321%207.71335C3.29002%207.23532%203.6294%206.48161%204.26784%206.48161L15.7322%206.48161C16.3707%206.48161%2016.7101%207.23532%2016.2869%207.71335L10.5547%2014.1884Z%22%20fill%3D%22%23FE4B4B%22%2F%3E%0A%3C%2Fsvg%3E%0A", "rhomboid-red": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M2.1415%2011.1984C1.8412%2010.9074%201.8412%2010.4256%202.1415%2010.1346L9.48467%203.01785C9.77196%202.73942%2010.2284%202.73942%2010.5157%203.01786L17.8586%2010.1346C18.1589%2010.4256%2018.1589%2010.9074%2017.8586%2011.1984L10.5157%2018.3151C10.2284%2018.5936%209.77196%2018.5936%209.48467%2018.3152L2.1415%2011.1984Z%22%20fill%3D%22%23FE4B4B%22%2F%3E%0A%3C%2Fsvg%3E%0A", "rhomboid-gold": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M2.1415%2011.1984C1.8412%2010.9074%201.8412%2010.4256%202.1415%2010.1346L9.48467%203.01785C9.77196%202.73942%2010.2284%202.73942%2010.5157%203.01786L17.8586%2010.1346C18.1589%2010.4256%2018.1589%2010.9074%2017.8586%2011.1984L10.5157%2018.3151C10.2284%2018.5936%209.77196%2018.5936%209.48467%2018.3152L2.1415%2011.1984Z%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fsvg%3E%0A", "roundness-greed": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%2210%22%20cy%3D%2210.6664%22%20r%3D%227.03704%22%20fill%3D%22%2359D01E%22%2F%3E%0A%3C%2Fsvg%3E%0A", "roundness-gold": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%2210%22%20cy%3D%2210.6664%22%20r%3D%227.03704%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fsvg%3E%0A", "roundness-red": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%2210%22%20cy%3D%2210.6664%22%20r%3D%227.03704%22%20fill%3D%22%23FE4B4B%22%2F%3E%0A%3C%2Fsvg%3E%0A", "roundness-pink": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%2210%22%20cy%3D%2210.6664%22%20r%3D%227.03704%22%20fill%3D%22%23FB9D9D%22%2F%3E%0A%3C%2Fsvg%3E%0A", "roundness-gray": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%2210%22%20cy%3D%2210.6664%22%20r%3D%227.03704%22%20fill%3D%22%23999999%22%2F%3E%0A%3C%2Fsvg%3E%0A", "roundness-black": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%2210%22%20cy%3D%2210.6664%22%20r%3D%227.03704%22%20fill%3D%22black%22%2F%3E%0A%3C%2Fsvg%3E%0A", "triangle-gold": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cg%20clip-path%3D%22url(%23clip0_613_237)%22%3E%0A%3Cpath%20d%3D%22M9.32308%204.41301C9.58368%203.82623%2010.4164%203.82623%2010.677%204.413L15.9526%2016.2917C16.1701%2016.7815%2015.8115%2017.3331%2015.2756%2017.3331H4.72454C4.18858%2017.3331%203.83002%2016.7815%204.04756%2016.2917L9.32308%204.41301Z%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fg%3E%0A%3Cdefs%3E%0A%3CclipPath%20id%3D%22clip0_613_237%22%3E%0A%3Crect%20width%3D%2220%22%20height%3D%2220%22%20fill%3D%22white%22%20transform%3D%22translate(0%200.666504)%22%2F%3E%0A%3C%2FclipPath%3E%0A%3C%2Fdefs%3E%0A%3C%2Fsvg%3E%0A", "indicate-greed": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%222.76941%22%20y%3D%222.76941%22%20width%3D%2214.4612%22%20height%3D%2214.4612%22%20rx%3D%223%22%20fill%3D%22black%22%2F%3E%0A%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%224.5%22%20fill%3D%22%2359D01E%22%2F%3E%0A%3C%2Fsvg%3E%0A", "indicate-gold": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%222.76941%22%20y%3D%222.76941%22%20width%3D%2214.4612%22%20height%3D%2214.4612%22%20rx%3D%223%22%20fill%3D%22black%22%2F%3E%0A%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%224.5%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fsvg%3E%0A", "indicate-red": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%222.76941%22%20y%3D%222.76941%22%20width%3D%2214.4612%22%20height%3D%2214.4612%22%20rx%3D%223%22%20fill%3D%22black%22%2F%3E%0A%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%224.5%22%20fill%3D%22%23FE4B4B%22%2F%3E%0A%3C%2Fsvg%3E%0A" };
  1364. var H0 = { mistake2: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M4.12194%206.33702C4.1805%206.47839%204.30722%206.6051%204.56066%206.85854L8.36822%2010.6661L4.56062%2014.4737C4.30718%2014.7272%204.18046%2014.8539%204.12191%2014.9952C4.04384%2015.1837%204.04384%2015.3955%204.12191%2015.584C4.18046%2015.7253%204.30718%2015.8521%204.56062%2016.1055C4.81406%2016.3589%204.94078%2016.4857%205.08214%2016.5442C5.27062%2016.6223%205.4824%2016.6223%205.67089%2016.5442C5.81225%2016.4857%205.93897%2016.3589%206.19241%2016.1055L10%2012.2979L13.8074%2016.1053C14.0609%2016.3588%2014.1876%2016.4855%2014.329%2016.544C14.5174%2016.6221%2014.7292%2016.6221%2014.9177%2016.544C15.0591%2016.4855%2015.1858%2016.3588%2015.4392%2016.1053L15.4392%2016.1053C15.6927%2015.8519%2015.8194%2015.7252%2015.8779%2015.5838C15.956%2015.3953%2015.956%2015.1835%2015.8779%2014.9951C15.8194%2014.8537%2015.6927%2014.727%2015.4392%2014.4735L15.4392%2014.4735L11.6318%2010.6661L15.4392%206.85872C15.6926%206.60528%2015.8193%206.47856%2015.8779%206.3372C15.956%206.14871%2015.956%205.93694%2015.8779%205.74845C15.8193%205.60709%2015.6926%205.48037%2015.4392%205.22693C15.1857%204.97349%2015.059%204.84677%2014.9177%204.78822C14.7292%204.71015%2014.5174%204.71015%2014.3289%204.78822C14.1876%204.84677%2014.0608%204.97349%2013.8074%205.22693L10%209.03433L6.19244%205.22676C5.939%204.97332%205.81228%204.8466%205.67092%204.78805C5.48244%204.70997%205.27066%204.70997%205.08218%204.78805C4.94082%204.8466%204.8141%204.97332%204.56066%205.22676L4.56066%205.22676C4.30722%205.4802%204.1805%205.60692%204.12194%205.74828C4.04387%205.93676%204.04387%206.14854%204.12194%206.33702Z%22%20fill%3D%22%23FE4B4B%22%2F%3E%0A%3C%2Fsvg%3E%0A", warn2: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M8.49778%205.00963C8.48513%204.56774%208.47881%204.3468%208.56086%204.17746C8.63301%204.02856%208.75124%203.90689%208.89802%203.83052C9.06494%203.74365%209.28597%203.74365%209.72805%203.74365H10.272C10.714%203.74365%2010.9351%203.74365%2011.102%203.83052C11.2488%203.9069%2011.367%204.02856%2011.4392%204.17746C11.5212%204.3468%2011.5149%204.56775%2011.5022%205.00964L11.2644%2013.3173C11.2524%2013.737%2011.2464%2013.9468%2011.1609%2014.1065C11.0857%2014.2471%2010.9687%2014.3609%2010.826%2014.432C10.6639%2014.5129%2010.454%2014.5129%2010.0342%2014.5129H9.96582C9.54601%2014.5129%209.33611%2014.5129%209.17397%2014.432C9.0313%2014.3609%208.91426%2014.2471%208.83904%2014.1065C8.75357%2013.9468%208.74756%2013.737%208.73555%2013.3173L8.49778%205.00963Z%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3Crect%20x%3D%228.76917%22%20y%3D%2215.2817%22%20width%3D%222.46154%22%20height%3D%222.46154%22%20rx%3D%220.769231%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fsvg%3E%0A", correct2: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cg%20clip-path%3D%22url(%23clip0_613_248)%22%3E%0A%3Cpath%20d%3D%22M15.689%205.69723C15.5476%205.75578%2015.4209%205.8825%2015.1675%206.13594L7.82436%2013.4791L4.83279%2010.4875C4.57935%2010.2341%204.45263%2010.1073%204.31127%2010.0488C4.12278%209.97071%203.91101%209.97071%203.72252%2010.0488C3.58116%2010.1073%203.45444%2010.2341%203.201%2010.4875C2.94756%2010.7409%202.82084%2010.8676%202.76229%2011.009C2.68422%2011.1975%202.68422%2011.4093%202.76229%2011.5978C2.82084%2011.7391%202.94756%2011.8658%203.201%2012.1193L7.0085%2015.9268C7.26194%2016.1802%207.38866%2016.3069%207.53002%2016.3655C7.7185%2016.4436%207.93028%2016.4436%208.11876%2016.3655C8.26013%2016.3069%208.38685%2016.1802%208.64028%2015.9268C8.66387%2015.9032%208.68636%2015.8807%208.7078%2015.8592L16.7993%207.76772C17.0527%207.51428%2017.1794%207.38756%2017.238%207.2462C17.3161%207.05772%2017.3161%206.84594%2017.238%206.65746C17.1794%206.5161%2017.0527%206.38938%2016.7993%206.13594C16.5458%205.8825%2016.4191%205.75578%2016.2777%205.69723C16.0893%205.61915%2015.8775%205.61915%2015.689%205.69723Z%22%20fill%3D%22%2359D01E%22%2F%3E%0A%3C%2Fg%3E%0A%3Cdefs%3E%0A%3CclipPath%20id%3D%22clip0_613_248%22%3E%0A%3Crect%20width%3D%2220%22%20height%3D%2220%22%20fill%3D%22white%22%20transform%3D%22translate(0%200.666504)%22%2F%3E%0A%3C%2FclipPath%3E%0A%3C%2Fdefs%3E%0A%3C%2Fsvg%3E%0A" };
  1365. var X0 = { "flag-green": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M15.4274%204.74935C14.0982%205.1012%2013.1363%205.13675%2012.3604%205.03379C11.5776%204.93009%2010.9487%204.68342%2010.2456%204.40416L10.2246%204.39527C9.53411%204.1212%208.76945%203.8175%207.81312%203.69157C6.84279%203.56268%205.71016%203.61898%204.24802%204.0049C4.09343%204.04217%203.95538%204.13393%203.85649%204.26515C3.7576%204.39636%203.70374%204.55925%203.70374%204.72712V17.3197C3.70374%2017.5162%203.79534%2017.7046%203.92654%2017.8435C4.05773%2017.9824%204.25893%2018.0605%204.44448%2018.0605C4.63002%2018.0605%204.84911%2017.9824%204.98031%2017.8435C5.11151%2017.7046%205.18522%2017.5162%205.18522%2017.3197V14.9123V12.5049C6.24649%2012.2738%206.97081%2012.2605%207.63962%2012.3486C8.42246%2012.4523%209.05139%2012.699%209.75448%2012.9782L9.77546%2012.9871C10.466%2013.2612%2011.2306%2013.5649%2012.1869%2013.6908C13.1601%2013.8197%2014.2976%2013.7627%2015.7667%2013.3738C15.8866%2013.3421%2016.0727%2013.2135%2016.1483%2013.111C16.2238%2013.0084%2016.2963%2012.8204%2016.2963%2012.6553V5.46787C16.2963%205.35535%2016.2721%205.24432%2016.2255%205.1432C16.1788%205.04208%2016.1111%204.95353%2016.0274%204.88428C15.9436%204.81502%2015.846%204.76688%2015.7421%204.7435C15.6382%204.72012%2015.494%204.73173%2015.4274%204.74935Z%22%20fill%3D%22%2359D01E%22%2F%3E%0A%3C%2Fsvg%3E%0A", "flag-gold": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M15.4274%204.74935C14.0982%205.1012%2013.1363%205.13675%2012.3604%205.03379C11.5776%204.93009%2010.9487%204.68342%2010.2456%204.40416L10.2246%204.39527C9.53411%204.1212%208.76945%203.8175%207.81312%203.69157C6.84279%203.56268%205.71016%203.61898%204.24802%204.0049C4.09343%204.04217%203.95538%204.13393%203.85649%204.26515C3.7576%204.39636%203.70374%204.55925%203.70374%204.72712V17.3197C3.70374%2017.5162%203.79534%2017.7046%203.92654%2017.8435C4.05773%2017.9824%204.25893%2018.0605%204.44448%2018.0605C4.63002%2018.0605%204.84911%2017.9824%204.98031%2017.8435C5.11151%2017.7046%205.18522%2017.5162%205.18522%2017.3197V14.9123V12.5049C6.24649%2012.2738%206.97081%2012.2605%207.63962%2012.3486C8.42246%2012.4523%209.05139%2012.699%209.75448%2012.9782L9.77546%2012.9871C10.466%2013.2612%2011.2306%2013.5649%2012.1869%2013.6908C13.1601%2013.8197%2014.2976%2013.7627%2015.7667%2013.3738C15.8866%2013.3421%2016.0727%2013.2135%2016.1483%2013.111C16.2238%2013.0084%2016.2963%2012.8204%2016.2963%2012.6553V5.46787C16.2963%205.35535%2016.2721%205.24432%2016.2255%205.1432C16.1788%205.04208%2016.1111%204.95353%2016.0274%204.88428C15.9436%204.81502%2015.846%204.76688%2015.7421%204.7435C15.6382%204.72012%2015.494%204.73173%2015.4274%204.74935Z%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fsvg%3E%0A", "flag-red": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M15.4274%204.74935C14.0982%205.1012%2013.1363%205.13675%2012.3604%205.03379C11.5776%204.93009%2010.9487%204.68342%2010.2456%204.40416L10.2246%204.39527C9.53411%204.1212%208.76945%203.8175%207.81312%203.69157C6.84279%203.56268%205.71016%203.61898%204.24802%204.0049C4.09343%204.04217%203.95538%204.13393%203.85649%204.26515C3.7576%204.39636%203.70374%204.55925%203.70374%204.72712V17.3197C3.70374%2017.5162%203.79534%2017.7046%203.92654%2017.8435C4.05773%2017.9824%204.25893%2018.0605%204.44448%2018.0605C4.63002%2018.0605%204.84911%2017.9824%204.98031%2017.8435C5.11151%2017.7046%205.18522%2017.5162%205.18522%2017.3197V14.9123V12.5049C6.24649%2012.2738%206.97081%2012.2605%207.63962%2012.3486C8.42246%2012.4523%209.05139%2012.699%209.75448%2012.9782L9.77546%2012.9871C10.466%2013.2612%2011.2306%2013.5649%2012.1869%2013.6908C13.1601%2013.8197%2014.2976%2013.7627%2015.7667%2013.3738C15.8866%2013.3421%2016.0727%2013.2135%2016.1483%2013.111C16.2238%2013.0084%2016.2963%2012.8204%2016.2963%2012.6553V5.46787C16.2963%205.35535%2016.2721%205.24432%2016.2255%205.1432C16.1788%205.04208%2016.1111%204.95353%2016.0274%204.88428C15.9436%204.81502%2015.846%204.76688%2015.7421%204.7435C15.6382%204.72012%2015.494%204.73173%2015.4274%204.74935Z%22%20fill%3D%22%23FE4B4B%22%2F%3E%0A%3C%2Fsvg%3E%0A" };
  1366. var Y0 = { "cell-0": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%224%22%20y%3D%2211.001%22%20width%3D%225%22%20height%3D%225%22%20rx%3D%221%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%2211%22%20y%3D%2211.001%22%20width%3D%225%22%20height%3D%225%22%20rx%3D%221%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%224%22%20y%3D%224.00098%22%20width%3D%225%22%20height%3D%225%22%20rx%3D%221%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%2211%22%20y%3D%224.00098%22%20width%3D%225%22%20height%3D%225%22%20rx%3D%221%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3C%2Fsvg%3E%0A", "cell-25": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%224%22%20y%3D%2211.001%22%20width%3D%225%22%20height%3D%225%22%20rx%3D%221%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%2211%22%20y%3D%2211.001%22%20width%3D%225%22%20height%3D%225%22%20rx%3D%221%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%224.25%22%20y%3D%224.25098%22%20width%3D%224.5%22%20height%3D%224.5%22%20rx%3D%220.75%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.5%22%2F%3E%0A%3Crect%20x%3D%2211%22%20y%3D%224.00098%22%20width%3D%225%22%20height%3D%225%22%20rx%3D%221%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3C%2Fsvg%3E%0A", "cell-50": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%224%22%20y%3D%2211.001%22%20width%3D%225%22%20height%3D%225%22%20rx%3D%221%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%2211%22%20y%3D%2211.001%22%20width%3D%225%22%20height%3D%225%22%20rx%3D%221%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%224.25%22%20y%3D%224.25098%22%20width%3D%224.5%22%20height%3D%224.5%22%20rx%3D%220.75%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.5%22%2F%3E%0A%3Crect%20x%3D%2211.25%22%20y%3D%224.25098%22%20width%3D%224.5%22%20height%3D%224.5%22%20rx%3D%220.75%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.5%22%2F%3E%0A%3C%2Fsvg%3E%0A", "cell-75": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%224.25%22%20y%3D%2211.251%22%20width%3D%224.5%22%20height%3D%224.5%22%20rx%3D%220.75%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.5%22%2F%3E%0A%3Crect%20x%3D%2211%22%20y%3D%2211.001%22%20width%3D%225%22%20height%3D%225%22%20rx%3D%221%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%224.25%22%20y%3D%224.25098%22%20width%3D%224.5%22%20height%3D%224.5%22%20rx%3D%220.75%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.5%22%2F%3E%0A%3Crect%20x%3D%2211.25%22%20y%3D%224.25098%22%20width%3D%224.5%22%20height%3D%224.5%22%20rx%3D%220.75%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.5%22%2F%3E%0A%3C%2Fsvg%3E%0A", "cell-100": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%224.25%22%20y%3D%2211.251%22%20width%3D%224.5%22%20height%3D%224.5%22%20rx%3D%220.75%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.5%22%2F%3E%0A%3Crect%20x%3D%2211.25%22%20y%3D%2211.251%22%20width%3D%224.5%22%20height%3D%224.5%22%20rx%3D%220.75%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.5%22%2F%3E%0A%3Crect%20x%3D%224.25%22%20y%3D%224.25098%22%20width%3D%224.5%22%20height%3D%224.5%22%20rx%3D%220.75%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.5%22%2F%3E%0A%3Crect%20x%3D%2211.25%22%20y%3D%224.25098%22%20width%3D%224.5%22%20height%3D%224.5%22%20rx%3D%220.75%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.5%22%2F%3E%0A%3C%2Fsvg%3E%0A" };
  1367. var g = {
  1368. feedback: $0,
  1369. star: P0,
  1370. progress: W0,
  1371. signal: Z0,
  1372. feeling: q0,
  1373. arrow: G0,
  1374. shape: j0,
  1375. feedback2: H0,
  1376. flag: X0,
  1377. cell: Y0
  1378. };
  1379. var K0 = [
  1380. {
  1381. title: "sheet.cf.iconSet.direction",
  1382. group: [
  1383. { name: "3Arrows", list: [g.arrow["up-green"], g.arrow["right-gold"], g.arrow["down-red"]] },
  1384. { name: "3ArrowsGray", list: [g.arrow["up-gray"], g.arrow["right-gray"], g.arrow["down-gray"]] },
  1385. { name: "4Arrows", list: [g.arrow["up-green"], g.arrow["rightAndUp-gold"], g.arrow["rightAndDown-gold"], g.arrow["down-red"]] },
  1386. { name: "4ArrowsGray", list: [g.arrow["up-gray"], g.arrow["rightAndUp-gray"], g.arrow["rightAndDown-gray"], g.arrow["down-gray"]] },
  1387. { name: "5Arrows", list: [g.arrow["up-green"], g.arrow["rightAndUp-gold"], g.arrow["right-gold"], g.arrow["rightAndDown-gold"], g.arrow["down-red"]] },
  1388. { name: "5ArrowsGray", list: [g.arrow["up-gray"], g.arrow["rightAndUp-gray"], g.arrow["right-gray"], g.arrow["rightAndDown-gray"], g.arrow["down-gray"]] },
  1389. { name: "3Triangles", list: [g.shape.up, g.shape.cross, g.shape.down] }
  1390. ]
  1391. },
  1392. {
  1393. title: "sheet.cf.iconSet.shape",
  1394. group: [
  1395. {
  1396. name: "3TrafficLights1",
  1397. list: [g.shape["roundness-greed"], g.shape["roundness-gold"], g.shape["roundness-red"]]
  1398. },
  1399. {
  1400. name: "3Signs",
  1401. list: [g.shape["roundness-greed"], g.shape["triangle-gold"], g.shape["rhomboid-red"]]
  1402. },
  1403. { name: "3TrafficLights2", list: [g.shape["indicate-greed"], g.shape["indicate-gold"], g.shape["indicate-red"]] },
  1404. {
  1405. name: "4RedToBlack",
  1406. list: [g.shape["roundness-red"], g.shape["roundness-pink"], g.shape["roundness-gray"], g.shape["roundness-black"]]
  1407. },
  1408. {
  1409. name: "4TrafficLights",
  1410. list: [g.shape["roundness-greed"], g.shape["roundness-gold"], g.shape["roundness-red"], g.shape["roundness-black"]]
  1411. }
  1412. ]
  1413. },
  1414. {
  1415. title: "sheet.cf.iconSet.mark",
  1416. group: [
  1417. {
  1418. name: "3Symbols",
  1419. list: [g.feedback.correct, g.feedback.warn, g.feedback.mistake]
  1420. },
  1421. {
  1422. name: "3Symbols2",
  1423. list: [g.feedback2.correct2, g.feedback2.warn2, g.feedback2.mistake2]
  1424. },
  1425. {
  1426. name: "3Flags",
  1427. list: [g.flag["flag-green"], g.flag["flag-gold"], g.flag["flag-red"]]
  1428. }
  1429. ]
  1430. },
  1431. {
  1432. title: "sheet.cf.iconSet.rank",
  1433. group: [
  1434. {
  1435. name: "4Rating",
  1436. list: [g.signal.signal25, g.signal.signal50, g.signal.signal75, g.signal.signal100]
  1437. },
  1438. {
  1439. name: "5Rating",
  1440. list: [g.signal.signal0, g.signal.signal25, g.signal.signal50, g.signal.signal75, g.signal.signal100]
  1441. },
  1442. {
  1443. name: "5Quarters",
  1444. list: [g.progress.progress100, g.progress.progress75, g.progress.progress50, g.progress.progress25, g.progress.progress0]
  1445. },
  1446. {
  1447. name: "_5Felling",
  1448. list: [g.feeling.guffaw, g.feeling.smile, g.feeling.noninductive, g.feeling.dissatisfied, g.feeling.impatient]
  1449. },
  1450. {
  1451. name: "5Boxes",
  1452. list: [g.cell["cell-100"], g.cell["cell-75"], g.cell["cell-50"], g.cell["cell-25"], g.cell["cell-0"]]
  1453. },
  1454. {
  1455. name: "3Stars",
  1456. list: [g.star.starFull, g.star.starIncomplete, g.star.starEmpty]
  1457. }
  1458. ]
  1459. }
  1460. ];
  1461. var o22 = K0.reduce((s, r) => {
  1462. const { group: t } = r;
  1463. for (const e of t)
  1464. s[e.name] = e.list;
  1465. return s;
  1466. }, {});
  1467. for (const s in o22) {
  1468. const r = o22[s];
  1469. Object.freeze(r);
  1470. }
  1471. var J0 = "EMPTY_ICON_TYPE";
  1472. var v2 = {
  1473. type: ar.MUTATION,
  1474. id: "sheet.mutation.move-conditional-rule",
  1475. handler(s, r) {
  1476. if (!r)
  1477. return false;
  1478. const { unitId: t, subUnitId: e, start: n, end: i } = r;
  1479. return s.get(B).moveRulePriority(t, e, n, i), true;
  1480. }
  1481. };
  1482. var I1 = (s) => {
  1483. const { unitId: r, subUnitId: t } = s, e = m0(s.start, s.end);
  1484. if (!e)
  1485. return [];
  1486. const [n, i] = e;
  1487. return [
  1488. {
  1489. id: v2.id,
  1490. params: { unitId: r, subUnitId: t, start: n, end: i }
  1491. }
  1492. ];
  1493. };
  1494. var z0 = (s, r) => {
  1495. const t = s.get(B), { unitId: e, subUnitId: n, cfId: i } = r, a = [...t.getSubunitRules(e, n) || []], u = a.findIndex((o) => o.cfId === i), l = a[u - 1];
  1496. if (u > -1) {
  1497. const o = a[u], h = [{
  1498. id: T2.id,
  1499. params: { unitId: e, subUnitId: n, rule: re.deepClone(o) }
  1500. }];
  1501. if (a.splice(u, 1), u !== 0) {
  1502. const c = a[0];
  1503. if (c) {
  1504. const d = f0({ id: c.cfId, type: "before" }, { id: l.cfId, type: "after" }, a, (F) => F.cfId);
  1505. if (!d)
  1506. return h;
  1507. const [C, D] = d, f = {
  1508. unitId: e,
  1509. subUnitId: n,
  1510. start: C,
  1511. end: D
  1512. };
  1513. h.push({ id: v2.id, params: f });
  1514. }
  1515. }
  1516. return h;
  1517. }
  1518. return [];
  1519. };
  1520. var E2 = {
  1521. type: ar.MUTATION,
  1522. id: "sheet.mutation.delete-conditional-rule",
  1523. handler(s, r) {
  1524. if (!r)
  1525. return false;
  1526. const { unitId: t, subUnitId: e, cfId: n } = r;
  1527. return s.get(B).deleteRule(t, e, n), true;
  1528. }
  1529. };
  1530. var b1 = (s, r) => ({ id: E2.id, params: { unitId: r.unitId, subUnitId: r.subUnitId, cfId: r.rule.cfId } });
  1531. var T2 = {
  1532. type: ar.MUTATION,
  1533. id: "sheet.mutation.add-conditional-rule",
  1534. handler(s, r) {
  1535. if (!r)
  1536. return false;
  1537. const { unitId: t, subUnitId: e, rule: n } = r;
  1538. return s.get(B).addRule(t, e, n), true;
  1539. }
  1540. };
  1541. var U2 = {
  1542. type: ar.MUTATION,
  1543. id: "sheet.mutation.set-conditional-rule",
  1544. handler(s, r) {
  1545. if (!r)
  1546. return false;
  1547. const { unitId: t, subUnitId: e, rule: n } = r, i = r.cfId || r.rule.cfId;
  1548. return s.get(B).setRule(t, e, n, i), true;
  1549. }
  1550. };
  1551. var L1 = (s, r) => {
  1552. const t = s.get(B), { unitId: e, subUnitId: n } = r, i = r.cfId || r.rule.cfId, a = t.getRule(e, n, i);
  1553. return a ? [
  1554. {
  1555. id: U2.id,
  1556. params: {
  1557. unitId: e,
  1558. subUnitId: n,
  1559. cfId: i,
  1560. rule: re.deepClone(a)
  1561. }
  1562. }
  1563. ] : [];
  1564. };
  1565. var Q0 = "ssheets-conditional-formatting.config";
  1566. var M2 = {};
  1567. var e1 = Object.defineProperty;
  1568. var t1 = Object.getOwnPropertyDescriptor;
  1569. var n1 = (s, r, t, e) => {
  1570. for (var n = e > 1 ? void 0 : e ? t1(r, t) : r, i = s.length - 1, a; i >= 0; i--)
  1571. (a = s[i]) && (n = (e ? a(r, t, n) : a(n)) || n);
  1572. return e && n && e1(r, t, n), n;
  1573. };
  1574. var q = (s, r) => (t, e) => r(t, e, s);
  1575. var K = class extends nt {
  1576. constructor(s, r, t, e, n, i) {
  1577. super(), this._conditionalFormattingRuleModel = s, this._injector = r, this._univerInstanceService = t, this._resourceManagerService = e, this._sheetInterceptorService = n, this._commandService = i, this._initCellChange(), this._initSnapshot(), this._initSheetChange();
  1578. }
  1579. get _conditionalFormattingViewModelV2() {
  1580. return this._injector.get(j);
  1581. }
  1582. composeStyle(s, r, t, e) {
  1583. const n = this._conditionalFormattingViewModelV2.getCellCfs(s, r, t, e);
  1584. if (n && (n != null && n.length)) {
  1585. const i = n.map((l) => this._conditionalFormattingRuleModel.getRule(s, r, l.cfId)).filter((l) => !!l).reverse(), a = i.findIndex((l) => l == null ? void 0 : l.stopIfTrue);
  1586. return a > -1 && i.splice(a + 1), i.reduce((l, o) => {
  1587. var d;
  1588. const h = o.rule.type, c = n.find((C) => C.cfId === o.cfId);
  1589. if (h === y.highlightCell)
  1590. c.result && re.deepMerge(l, { style: c.result });
  1591. else if (h === y.colorScale) {
  1592. const C = c == null ? void 0 : c.result;
  1593. C && typeof C == "string" && (l.style = { ...(d = l.style) != null ? d : {}, bg: { rgb: C } });
  1594. } else if (h === y.dataBar) {
  1595. const C = c == null ? void 0 : c.result;
  1596. C && (l.dataBar = C, l.isShowValue = C.isShowValue);
  1597. } else if (h === y.iconSet) {
  1598. const C = c == null ? void 0 : c.result;
  1599. C && (l.iconSet = C, l.isShowValue = C.isShowValue);
  1600. }
  1601. return l;
  1602. }, {});
  1603. }
  1604. return null;
  1605. }
  1606. _initSnapshot() {
  1607. const s = (t) => {
  1608. const e = this._conditionalFormattingRuleModel.getUnitRules(t), n = {};
  1609. return e ? (e.forEach((i, a) => {
  1610. n[a] = i;
  1611. }), JSON.stringify(n)) : "";
  1612. }, r = (t) => {
  1613. if (!t)
  1614. return {};
  1615. try {
  1616. return JSON.parse(t);
  1617. } catch {
  1618. return {};
  1619. }
  1620. };
  1621. this.disposeWithMe(
  1622. this._resourceManagerService.registerPluginResource({
  1623. pluginName: N2,
  1624. businesses: [Fe.UNIVER_SHEET],
  1625. toJson: (t) => s(t),
  1626. parseJson: (t) => r(t),
  1627. onUnLoad: (t) => {
  1628. this._conditionalFormattingRuleModel.deleteUnitId(t);
  1629. },
  1630. onLoad: (t, e) => {
  1631. Object.keys(e).forEach((n) => {
  1632. [...e[n]].reverse().forEach((a) => {
  1633. this._conditionalFormattingRuleModel.addRule(t, n, a);
  1634. });
  1635. });
  1636. }
  1637. })
  1638. );
  1639. }
  1640. _initSheetChange() {
  1641. this.disposeWithMe(
  1642. this._sheetInterceptorService.interceptCommand({
  1643. getMutations: (s) => {
  1644. if (s.id === ko.id) {
  1645. const r = s.params, t = r.unitId || r1(this._univerInstanceService), e = r.subUnitId || s1(this._univerInstanceService);
  1646. if (!e)
  1647. return { redos: [], undos: [] };
  1648. const n = this._conditionalFormattingRuleModel.getSubunitRules(t, e);
  1649. if (!n)
  1650. return { redos: [], undos: [] };
  1651. const i = [], a = [];
  1652. return n.forEach((u) => {
  1653. const l = {
  1654. unitId: t,
  1655. subUnitId: e,
  1656. cfId: u.cfId
  1657. };
  1658. i.push({
  1659. id: E2.id,
  1660. params: l
  1661. }), a.push(...z0(this._injector, l));
  1662. }), {
  1663. redos: i,
  1664. undos: a
  1665. };
  1666. }
  1667. return { redos: [], undos: [] };
  1668. }
  1669. })
  1670. );
  1671. }
  1672. // eslint-disable-next-line max-lines-per-function
  1673. _initCellChange() {
  1674. this.disposeWithMe(
  1675. // eslint-disable-next-line max-lines-per-function
  1676. this._commandService.onCommandExecuted((s) => {
  1677. const r = (t, e, n) => {
  1678. const i = /* @__PURE__ */ new Set();
  1679. return n.forEach(([a, u]) => {
  1680. const l = this._conditionalFormattingViewModelV2.getCellCfs(t, e, a, u);
  1681. l == null || l.forEach((o) => i.add(o.cfId));
  1682. }), [...i].map((a) => this._conditionalFormattingRuleModel.getRule(t, e, a)).filter((a) => !!a);
  1683. };
  1684. switch (s.id) {
  1685. case Q.id: {
  1686. const t = s.params, { subUnitId: e, unitId: n, cellValue: i } = t, a = [];
  1687. new kt(i).forValue((l, o, h) => {
  1688. h && Object.keys(h).some((d) => ["p", "v"].includes(d)) && a.push([l, o]);
  1689. }), r(n, e, a).forEach((l) => {
  1690. this._conditionalFormattingViewModelV2.markRuleDirty(n, e, l.cfId);
  1691. });
  1692. break;
  1693. }
  1694. case je.id:
  1695. case De.id: {
  1696. const { range: t, unitId: e, subUnitId: n } = s.params, i = this._conditionalFormattingRuleModel.getSubunitRules(e, n), a = { ...t, endColumn: Number.MAX_SAFE_INTEGER };
  1697. i && i.filter((l) => l.ranges.some((o) => en.intersects(o, a))).forEach((l) => {
  1698. this._conditionalFormattingViewModelV2.markRuleDirty(e, n, l.cfId);
  1699. });
  1700. break;
  1701. }
  1702. case Be.id:
  1703. case qe.id: {
  1704. const { range: t, unitId: e, subUnitId: n } = s.params, i = this._conditionalFormattingRuleModel.getSubunitRules(e, n), a = { ...t, endRow: Number.MAX_SAFE_INTEGER };
  1705. i && i.filter((l) => l.ranges.some((o) => en.intersects(o, a))).forEach((l) => {
  1706. this._conditionalFormattingViewModelV2.markRuleDirty(e, n, l.cfId);
  1707. });
  1708. break;
  1709. }
  1710. case ot2.id: {
  1711. const { sourceRange: t, targetRange: e, unitId: n, subUnitId: i } = s.params, a = this._conditionalFormattingRuleModel.getSubunitRules(n, i), u = {
  1712. startRow: Math.min(t.startRow, e.startRow),
  1713. endRow: Number.MAX_SAFE_INTEGER,
  1714. startColumn: 0,
  1715. endColumn: Number.MAX_SAFE_INTEGER
  1716. };
  1717. a && a.filter((o) => o.ranges.some((h) => en.intersects(h, u))).forEach((o) => {
  1718. this._conditionalFormattingViewModelV2.markRuleDirty(n, i, o.cfId);
  1719. });
  1720. break;
  1721. }
  1722. case st.id: {
  1723. const { sourceRange: t, targetRange: e, unitId: n, subUnitId: i } = s.params, a = this._conditionalFormattingRuleModel.getSubunitRules(n, i), u = {
  1724. startRow: 0,
  1725. endRow: Number.MAX_SAFE_INTEGER,
  1726. startColumn: Math.min(t.startColumn, e.startColumn),
  1727. endColumn: Number.MAX_SAFE_INTEGER
  1728. };
  1729. a && a.filter((o) => o.ranges.some((h) => en.intersects(h, u))).forEach((o) => {
  1730. this._conditionalFormattingViewModelV2.markRuleDirty(n, i, o.cfId);
  1731. });
  1732. break;
  1733. }
  1734. case dt.id: {
  1735. const { unitId: t, to: e, from: n } = s.params, i = (a) => {
  1736. const u = [];
  1737. new kt(a.value).forValue((o, h) => {
  1738. u.push([o, h]);
  1739. }), r(t, a.subUnitId, u).forEach((o) => {
  1740. this._conditionalFormattingViewModelV2.markRuleDirty(t, a.subUnitId, o.cfId);
  1741. });
  1742. };
  1743. i(e), i(n);
  1744. break;
  1745. }
  1746. case In.id: {
  1747. const { range: t, unitId: e, subUnitId: n } = s.params, i = this._conditionalFormattingRuleModel.getSubunitRules(e, n);
  1748. i && i.filter((u) => u.ranges.some((l) => en.intersects(l, t))).forEach((u) => {
  1749. this._conditionalFormattingViewModelV2.markRuleDirty(e, n, u.cfId);
  1750. });
  1751. break;
  1752. }
  1753. }
  1754. })
  1755. );
  1756. }
  1757. };
  1758. K = n1([
  1759. q(0, ot(B)),
  1760. q(1, ot(Ot)),
  1761. q(2, ot(_n)),
  1762. q(3, ot(Bi)),
  1763. q(4, ot(V)),
  1764. q(5, ot(Pt))
  1765. ], K);
  1766. var r1 = (s) => s.getCurrentUnitForType(Fe.UNIVER_SHEET).getUnitId();
  1767. var s1 = (s) => {
  1768. var r;
  1769. return (r = s.getCurrentUnitForType(Fe.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : r.getSheetId();
  1770. };
  1771. var i1 = Object.defineProperty;
  1772. var a1 = Object.getOwnPropertyDescriptor;
  1773. var l1 = (s, r, t, e) => {
  1774. for (var n = e > 1 ? void 0 : e ? a1(r, t) : r, i = s.length - 1, a; i >= 0; i--)
  1775. (a = s[i]) && (n = (e ? a(r, t, n) : a(n)) || n);
  1776. return e && n && i1(r, t, n), n;
  1777. };
  1778. var D2 = (s, r) => (t, e) => r(t, e, s);
  1779. var r2;
  1780. var R2 = (r2 = class extends Ra {
  1781. constructor(s = M2, r, t, e) {
  1782. super(), this._config = s, this._injector = r, this._commandService = t, this._configService = e;
  1783. const { ...n } = nu(
  1784. {},
  1785. M2,
  1786. this._config
  1787. );
  1788. this._configService.setConfig(Q0, n), [
  1789. [K],
  1790. [G],
  1791. [B],
  1792. [j]
  1793. ].forEach((i) => {
  1794. this._injector.add(i);
  1795. }), [
  1796. T2,
  1797. E2,
  1798. U2,
  1799. v2,
  1800. s2
  1801. ].forEach((i) => {
  1802. this._commandService.registerCommand(i);
  1803. });
  1804. }
  1805. onStarting() {
  1806. this._injector.get(K), Mf(this._injector, [[K], [j]]);
  1807. }
  1808. }, m(r2, "pluginName", N2), m(r2, "type", Fe.UNIVER_SHEET), r2);
  1809. R2 = l1([
  1810. D2(1, ot(Ot)),
  1811. D2(2, ot(Pt)),
  1812. D2(3, SE)
  1813. ], R2);
  1814. var o1 = "sheet-conditional-rule-icon";
  1815. var c1 = 35;
  1816. var u1 = 15;
  1817. var h1 = 2;
  1818. var d1 = class extends y3 {
  1819. constructor() {
  1820. super();
  1821. m(this, "_paddingRightAndLeft", h1);
  1822. m(this, "_width", u1);
  1823. m(this, "_imageMap", /* @__PURE__ */ new Map());
  1824. m(this, "uKey", o1);
  1825. m(this, "Z_INDEX", c1);
  1826. m(this, "_radius", 1);
  1827. this._init();
  1828. }
  1829. draw(t, e, n, i) {
  1830. const { worksheet: a } = n;
  1831. if (!a)
  1832. return false;
  1833. t.save(), tr.foreach(n.rowColumnSegment, (u, l) => {
  1834. if (!a.getRowVisible(u) || !a.getColVisible(l))
  1835. return;
  1836. const o = a.getCell(u, l);
  1837. if (o != null && o.iconSet) {
  1838. const { iconType: h, iconId: c } = o.iconSet;
  1839. if (h === J0)
  1840. return;
  1841. const d = this._imageMap.get(this._createKey(h, c));
  1842. if (!d)
  1843. return;
  1844. const C = n.getCellWithCoordByIndex(u, l, false);
  1845. let { isMerged: D, isMergedMainCell: f, mergeInfo: F, startY: p, endY: L, startX: k, endX: V3 } = C;
  1846. if (D || (f && (p = F.startY, L = F.endY, k = F.startX, V3 = F.endX), !this.isRenderDiffRangesByCell(F, i)))
  1847. return;
  1848. const z = V3 - k, Q2 = L - p;
  1849. if (this._width > Q2 || this._width > z + this._paddingRightAndLeft * 2)
  1850. return;
  1851. const h2 = (Q2 - this._width) / 2 + p;
  1852. t.drawImage(d, k + this._paddingRightAndLeft, h2, this._width, this._width);
  1853. }
  1854. }), t.restore();
  1855. }
  1856. _init() {
  1857. for (const t in o22)
  1858. o22[t].forEach((n, i) => {
  1859. const a = this._createKey(t, String(i)), u = new Image();
  1860. u.onload = () => {
  1861. this._imageMap.set(a, u);
  1862. }, u.src = n;
  1863. });
  1864. }
  1865. _createKey(t, e) {
  1866. return `${t}_${e}`;
  1867. }
  1868. };
  1869. $3.add(d1);
  1870. function g1(s) {
  1871. if (typeof s != "object" || s === null)
  1872. return s;
  1873. const r = {};
  1874. for (const t in s)
  1875. if (s.hasOwnProperty(t)) {
  1876. const e = g1(s[t]);
  1877. e !== void 0 && (r[t] = e);
  1878. }
  1879. return r;
  1880. }
  1881. export {
  1882. N2,
  1883. M,
  1884. R,
  1885. w,
  1886. y,
  1887. E,
  1888. x,
  1889. E1,
  1890. p1,
  1891. A1,
  1892. _1,
  1893. x1,
  1894. W,
  1895. D0,
  1896. f0,
  1897. m0,
  1898. y1,
  1899. F0,
  1900. B,
  1901. s2,
  1902. b,
  1903. G,
  1904. a2,
  1905. I,
  1906. U,
  1907. A0,
  1908. _0,
  1909. l2,
  1910. M1,
  1911. Y,
  1912. x0,
  1913. y0,
  1914. w2,
  1915. R1,
  1916. R0,
  1917. x2,
  1918. y2,
  1919. I0,
  1920. L0,
  1921. C2,
  1922. j,
  1923. K0,
  1924. o22 as o2,
  1925. J0,
  1926. v2,
  1927. I1,
  1928. z0,
  1929. E2,
  1930. b1,
  1931. T2,
  1932. U2,
  1933. L1,
  1934. K,
  1935. R2,
  1936. o1,
  1937. u1,
  1938. h1,
  1939. d1,
  1940. g1
  1941. };
  1942. //# sourceMappingURL=chunk-S77UFTYM.js.map