cm-reporting 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2518,27 +2518,27 @@ const Yp = /* @__PURE__ */ A("$ZodObject", (e, t) => {
2518
2518
  a.value = {};
2519
2519
  const u = [], m = s.shape;
2520
2520
  for (const d of s.keys) {
2521
- const p = m[d], h = p._zod.optout === "optional", g = p._zod.run({ value: l[d], issues: [] }, c);
2522
- g instanceof Promise ? u.push(g.then((y) => Ao(y, a, d, l, h))) : Ao(g, a, d, l, h);
2521
+ const p = m[d], h = p._zod.optout === "optional", y = p._zod.run({ value: l[d], issues: [] }, c);
2522
+ y instanceof Promise ? u.push(y.then((g) => Ao(g, a, d, l, h))) : Ao(y, a, d, l, h);
2523
2523
  }
2524
2524
  return i ? Al(u, l, a, c, o.value, e) : u.length ? Promise.all(u).then(() => a) : a;
2525
2525
  };
2526
2526
  }), jp = /* @__PURE__ */ A("$ZodObjectJIT", (e, t) => {
2527
2527
  Yp.init(e, t);
2528
2528
  const n = e._zod.parse, o = yi(() => ql(t)), r = (d) => {
2529
- const p = new hp(["shape", "payload", "ctx"]), h = o.value, g = (b) => {
2529
+ const p = new hp(["shape", "payload", "ctx"]), h = o.value, y = (b) => {
2530
2530
  const S = Vi(b);
2531
2531
  return `shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`;
2532
2532
  };
2533
2533
  p.write("const input = payload.value;");
2534
- const y = /* @__PURE__ */ Object.create(null);
2534
+ const g = /* @__PURE__ */ Object.create(null);
2535
2535
  let w = 0;
2536
2536
  for (const b of h.keys)
2537
- y[b] = `key_${w++}`;
2537
+ g[b] = `key_${w++}`;
2538
2538
  p.write("const newResult = {};");
2539
2539
  for (const b of h.keys) {
2540
- const S = y[b], R = Vi(b), C = d[b]?._zod?.optout === "optional";
2541
- p.write(`const ${S} = ${g(b)};`), C ? p.write(`
2540
+ const S = g[b], R = Vi(b), C = d[b]?._zod?.optout === "optional";
2541
+ p.write(`const ${S} = ${y(b)};`), C ? p.write(`
2542
2542
  if (${S}.issues.length) {
2543
2543
  if (${R} in input) {
2544
2544
  payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
@@ -3575,11 +3575,11 @@ function Ol(e, t) {
3575
3575
  o(u);
3576
3576
  const d = e.seen.get(u), p = d.schema;
3577
3577
  if (p.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (c.allOf = c.allOf ?? [], c.allOf.push(p)) : Object.assign(c, p), Object.assign(c, l), s._zod.parent === u)
3578
- for (const g in c)
3579
- g === "$ref" || g === "allOf" || g in l || delete c[g];
3578
+ for (const y in c)
3579
+ y === "$ref" || y === "allOf" || y in l || delete c[y];
3580
3580
  if (p.$ref && d.def)
3581
- for (const g in c)
3582
- g === "$ref" || g === "allOf" || g in d.def && JSON.stringify(c[g]) === JSON.stringify(d.def[g]) && delete c[g];
3581
+ for (const y in c)
3582
+ y === "$ref" || y === "allOf" || y in d.def && JSON.stringify(c[y]) === JSON.stringify(d.def[y]) && delete c[y];
3583
3583
  }
3584
3584
  const m = s._zod.parent;
3585
3585
  if (m && m !== u) {
@@ -5491,21 +5491,21 @@ function Es(e, t, n, o) {
5491
5491
  function m(p, h) {
5492
5492
  u || (u = !0, queueMicrotask(() => {
5493
5493
  u = !1;
5494
- const g = h(), y = l(g);
5495
- y !== g.errors && p({ errors: y });
5494
+ const y = h(), g = l(y);
5495
+ g !== y.errors && p({ errors: g });
5496
5496
  }));
5497
5497
  }
5498
- function d(p, h, g, y, w) {
5498
+ function d(p, h, y, g, w) {
5499
5499
  if (h !== "Q1" && h !== "Q2") return;
5500
5500
  const v = { ...Mr(p).questions };
5501
- if (w.perMineral && g) {
5501
+ if (w.perMineral && y) {
5502
5502
  const C = typeof v[h] == "object" ? v[h] : {};
5503
- v[h] = { ...C, [g]: y };
5504
- } else w.perMineral || (v[h] = y);
5503
+ v[h] = { ...C, [y]: g };
5504
+ } else w.perMineral || (v[h] = g);
5505
5505
  const b = pl(
5506
5506
  r,
5507
5507
  v,
5508
- w.perMineral ? g ?? void 0 : void 0
5508
+ w.perMineral ? y ?? void 0 : void 0
5509
5509
  ), S = c.indexOf("Q2");
5510
5510
  if (S < 0) return;
5511
5511
  const R = c.slice(S + 1), M = (C, L) => {
@@ -5518,7 +5518,7 @@ function Es(e, t, n, o) {
5518
5518
  typeof E == "object" && (E[L] = "");
5519
5519
  } else P.perMineral || (p.questions[C] = "", p.questionComments[C] = "");
5520
5520
  };
5521
- b.q2Enabled ? b.laterQuestionsEnabled || R.forEach((C) => M(C, g)) : (M("Q2", g), R.forEach((C) => M(C, g)));
5521
+ b.q2Enabled ? b.laterQuestionsEnabled || R.forEach((C) => M(C, y)) : (M("Q2", y), R.forEach((C) => M(C, y)));
5522
5522
  }
5523
5523
  return Lg()(
5524
5524
  xg((p, h) => ({
@@ -5535,55 +5535,55 @@ function Es(e, t, n, o) {
5535
5535
  isDirty: !1,
5536
5536
  // ── Actions ──
5537
5537
  // 每个 action 仅调用一次 set(),校验通过 scheduleValidation 延迟到微任务。
5538
- setCompanyInfoField: (g, y) => {
5538
+ setCompanyInfoField: (y, g) => {
5539
5539
  h().readOnly || (p((w) => {
5540
- w.companyInfo[g] = y, w.isDirty = !0;
5540
+ w.companyInfo[y] = g, w.isDirty = !0;
5541
5541
  }), m(p, h));
5542
5542
  },
5543
- setSelectedMinerals: (g) => {
5544
- h().readOnly || (p((y) => {
5545
- y.selectedMinerals = g, y.isDirty = !0;
5543
+ setSelectedMinerals: (y) => {
5544
+ h().readOnly || (p((g) => {
5545
+ g.selectedMinerals = y, g.isDirty = !0;
5546
5546
  }), m(p, h));
5547
5547
  },
5548
- setCustomMinerals: (g) => {
5549
- h().readOnly || (p({ customMinerals: g, isDirty: !0 }), m(p, h));
5548
+ setCustomMinerals: (y) => {
5549
+ h().readOnly || (p({ customMinerals: y, isDirty: !0 }), m(p, h));
5550
5550
  },
5551
- setQuestionValue: (g, y, w) => {
5551
+ setQuestionValue: (y, g, w) => {
5552
5552
  h().readOnly || (p((v) => {
5553
- const b = a.get(g);
5554
- b && (qs(v.questions, b, g, y, w), v.isDirty = !0, d(v, g, y, w, b));
5553
+ const b = a.get(y);
5554
+ b && (qs(v.questions, b, y, g, w), v.isDirty = !0, d(v, y, g, w, b));
5555
5555
  }), m(p, h));
5556
5556
  },
5557
- setQuestionComment: (g, y, w) => {
5557
+ setQuestionComment: (y, g, w) => {
5558
5558
  h().readOnly || (p((v) => {
5559
- const b = a.get(g);
5560
- b && (qs(v.questionComments, b, g, y, w), v.isDirty = !0);
5559
+ const b = a.get(y);
5560
+ b && (qs(v.questionComments, b, y, g, w), v.isDirty = !0);
5561
5561
  }), m(p, h));
5562
5562
  },
5563
- setCompanyQuestionValue: (g, y, w) => {
5563
+ setCompanyQuestionValue: (y, g, w) => {
5564
5564
  h().readOnly || (p((v) => {
5565
- nc(v.companyQuestions, g, y, w), v.isDirty = !0;
5565
+ nc(v.companyQuestions, y, g, w), v.isDirty = !0;
5566
5566
  }), m(p, h));
5567
5567
  },
5568
- setMineralsScope: (g) => {
5569
- h().readOnly || (p({ mineralsScope: g, isDirty: !0 }), m(p, h));
5568
+ setMineralsScope: (y) => {
5569
+ h().readOnly || (p({ mineralsScope: y, isDirty: !0 }), m(p, h));
5570
5570
  },
5571
- setSmelterList: (g) => {
5572
- h().readOnly || (p({ smelterList: g, isDirty: !0 }), m(p, h));
5571
+ setSmelterList: (y) => {
5572
+ h().readOnly || (p({ smelterList: y, isDirty: !0 }), m(p, h));
5573
5573
  },
5574
- setMineList: (g) => {
5575
- h().readOnly || (p({ mineList: g, isDirty: !0 }), m(p, h));
5574
+ setMineList: (y) => {
5575
+ h().readOnly || (p({ mineList: y, isDirty: !0 }), m(p, h));
5576
5576
  },
5577
- setProductList: (g) => {
5578
- h().readOnly || (p({ productList: g, isDirty: !0 }), m(p, h));
5577
+ setProductList: (y) => {
5578
+ h().readOnly || (p({ productList: y, isDirty: !0 }), m(p, h));
5579
5579
  },
5580
- setFormData: (g) => {
5581
- p({ ...Pg(g), isDirty: !1 }), m(p, h);
5580
+ setFormData: (y) => {
5581
+ p({ ...Pg(y), isDirty: !1 }), m(p, h);
5582
5582
  },
5583
5583
  /** 同步全量校验(用于导出前确认),不走 scheduleValidation。 */
5584
5584
  validateForm: async () => {
5585
- const g = h(), y = s.safeParse(Mr(g));
5586
- return y.success ? (p({ errors: fo }), !0) : (p({ errors: As(y.error.issues) }), !1);
5585
+ const y = h(), g = s.safeParse(Mr(y));
5586
+ return g.success ? (p({ errors: fo }), !0) : (p({ errors: As(g.error.issues) }), !1);
5587
5587
  },
5588
5588
  resetForm: () => {
5589
5589
  p({
@@ -6261,11 +6261,11 @@ function Sc(e, t, n, o, r, i) {
6261
6261
  return l == t && u == e;
6262
6262
  var m = -1, d = !0, p = n & Nv ? new un() : void 0;
6263
6263
  for (i.set(e, t), i.set(t, e); ++m < a; ) {
6264
- var h = e[m], g = t[m];
6264
+ var h = e[m], y = t[m];
6265
6265
  if (o)
6266
- var y = s ? o(g, h, m, t, e, i) : o(h, g, m, e, t, i);
6267
- if (y !== void 0) {
6268
- if (y)
6266
+ var g = s ? o(y, h, m, t, e, i) : o(h, y, m, e, t, i);
6267
+ if (g !== void 0) {
6268
+ if (g)
6269
6269
  continue;
6270
6270
  d = !1;
6271
6271
  break;
@@ -6278,7 +6278,7 @@ function Sc(e, t, n, o, r, i) {
6278
6278
  d = !1;
6279
6279
  break;
6280
6280
  }
6281
- } else if (!(h === g || r(h, g, n, o, i))) {
6281
+ } else if (!(h === y || r(h, y, n, o, i))) {
6282
6282
  d = !1;
6283
6283
  break;
6284
6284
  }
@@ -6346,24 +6346,24 @@ function jv(e, t, n, o, r, i) {
6346
6346
  var p = i.get(e), h = i.get(t);
6347
6347
  if (p && h)
6348
6348
  return p == t && h == e;
6349
- var g = !0;
6349
+ var y = !0;
6350
6350
  i.set(e, t), i.set(t, e);
6351
- for (var y = s; ++m < c; ) {
6351
+ for (var g = s; ++m < c; ) {
6352
6352
  d = a[m];
6353
6353
  var w = e[d], v = t[d];
6354
6354
  if (o)
6355
6355
  var b = s ? o(v, w, d, t, e, i) : o(w, v, d, e, t, i);
6356
6356
  if (!(b === void 0 ? w === v || r(w, v, n, o, i) : b)) {
6357
- g = !1;
6357
+ y = !1;
6358
6358
  break;
6359
6359
  }
6360
- y || (y = d == "constructor");
6360
+ g || (g = d == "constructor");
6361
6361
  }
6362
- if (g && !y) {
6362
+ if (y && !g) {
6363
6363
  var S = e.constructor, R = t.constructor;
6364
- S != R && "constructor" in e && "constructor" in t && !(typeof S == "function" && S instanceof S && typeof R == "function" && R instanceof R) && (g = !1);
6364
+ S != R && "constructor" in e && "constructor" in t && !(typeof S == "function" && S instanceof S && typeof R == "function" && R instanceof R) && (y = !1);
6365
6365
  }
6366
- return i.delete(e), i.delete(t), g;
6366
+ return i.delete(e), i.delete(t), y;
6367
6367
  }
6368
6368
  var Zv = 1, na = "[object Arguments]", oa = "[object Array]", ho = "[object Object]", Hv = Object.prototype, ra = Hv.hasOwnProperty;
6369
6369
  function Vv(e, t, n, o, r, i) {
@@ -6380,8 +6380,8 @@ function Vv(e, t, n, o, r, i) {
6380
6380
  if (!(n & Zv)) {
6381
6381
  var p = u && ra.call(e, "__wrapped__"), h = m && ra.call(t, "__wrapped__");
6382
6382
  if (p || h) {
6383
- var g = p ? e.value() : e, y = h ? t.value() : t;
6384
- return i || (i = new ft()), r(g, y, n, o, i);
6383
+ var y = p ? e.value() : e, g = h ? t.value() : t;
6384
+ return i || (i = new ft()), r(y, g, n, o, i);
6385
6385
  }
6386
6386
  }
6387
6387
  return d ? (i || (i = new ft()), jv(e, t, n, o, r, i)) : !1;
@@ -6539,8 +6539,8 @@ function CS(e, t, n) {
6539
6539
  var p = u[m], h = t ? t(p) : p;
6540
6540
  if (p = p !== 0 ? p : 0, !(d ? Uo(d, h) : o(l, h))) {
6541
6541
  for (s = i; --s; ) {
6542
- var g = a[s];
6543
- if (!(g ? Uo(g, h) : o(e[s], h)))
6542
+ var y = a[s];
6543
+ if (!(y ? Uo(y, h) : o(e[s], h)))
6544
6544
  continue e;
6545
6545
  }
6546
6546
  d && d.push(h), l.push(p);
@@ -6739,8 +6739,8 @@ function Ac(e, t, n) {
6739
6739
  p.set(h, !1);
6740
6740
  continue;
6741
6741
  }
6742
- const g = o.get(h);
6743
- if (!g) {
6742
+ const y = o.get(h);
6743
+ if (!y) {
6744
6744
  p.set(h, !1);
6745
6745
  continue;
6746
6746
  }
@@ -6749,10 +6749,10 @@ function Ac(e, t, n) {
6749
6749
  continue;
6750
6750
  }
6751
6751
  if (d.key === "Q2") {
6752
- e.templateType === "amrt" ? p.set(h, !1) : p.set(h, g.q2Enabled);
6752
+ e.templateType === "amrt" ? p.set(h, !1) : p.set(h, y.q2Enabled);
6753
6753
  continue;
6754
6754
  }
6755
- p.set(h, g.laterQuestionsEnabled);
6755
+ p.set(h, y.laterQuestionsEnabled);
6756
6756
  }
6757
6757
  a.set(d.key, p);
6758
6758
  }
@@ -7072,7 +7072,7 @@ function YS(e, t, n, o) {
7072
7072
  let m = 0, d = 0;
7073
7073
  const p = [], h = (D, re, X) => {
7074
7074
  p.push({ key: D, label: re, location: X });
7075
- }, g = o("checker.groups.declaration"), y = o("checker.groups.smelter"), w = o("checker.groups.product"), v = Nc(e), b = oo(
7075
+ }, y = o("checker.groups.declaration"), g = o("checker.groups.smelter"), w = o("checker.groups.product"), v = Nc(e), b = oo(
7076
7076
  e,
7077
7077
  t.customMinerals ?? [],
7078
7078
  t.selectedMinerals ?? []
@@ -7080,13 +7080,13 @@ function YS(e, t, n, o) {
7080
7080
  let S = 0, R = 0;
7081
7081
  for (const D of e.companyInfoFields) {
7082
7082
  if (!(i.companyInfo.get(D.key) === !0)) continue;
7083
- m += 1, S += 1, (s[D.key] || "").trim() && (d += 1, R += 1, h(`companyInfo.${D.key}`, o(D.labelKey), g));
7083
+ m += 1, S += 1, (s[D.key] || "").trim() && (d += 1, R += 1, h(`companyInfo.${D.key}`, o(D.labelKey), y));
7084
7084
  }
7085
7085
  S > 0 && R === S && h(
7086
7086
  "summary.companyInfo",
7087
7087
  o("checker.sectionComplete", { section: o("sections.companyInfo") }),
7088
- g
7089
- ), (e.templateType === "emrt" || e.templateType === "amrt") && e.mineralScope.mode === "dynamic-dropdown" && (m += 1, (t.selectedMinerals ?? []).length > 0 && (d += 1, h("mineralsScope.selection", o("tabs.mineralsScope"), g)));
7088
+ y
7089
+ ), (e.templateType === "emrt" || e.templateType === "amrt") && e.mineralScope.mode === "dynamic-dropdown" && (m += 1, (t.selectedMinerals ?? []).length > 0 && (d += 1, h("mineralsScope.selection", o("tabs.mineralsScope"), y)));
7090
7090
  let C = 0, L = 0;
7091
7091
  for (const D of e.questions) {
7092
7092
  const re = i.questions.get(D.key);
@@ -7101,14 +7101,14 @@ function YS(e, t, n, o) {
7101
7101
  ).trim()) {
7102
7102
  d += 1, L += 1;
7103
7103
  const ie = v.get(X), $ = ie ? o(ie) : X;
7104
- h(`questions.${D.key}.${X}`, `${D.key} ${$}`, g);
7104
+ h(`questions.${D.key}.${X}`, `${D.key} ${$}`, y);
7105
7105
  }
7106
7106
  }
7107
7107
  }
7108
7108
  C > 0 && L === C && h(
7109
7109
  "summary.questionMatrix",
7110
7110
  o("checker.sectionComplete", { section: o("sections.questionMatrix") }),
7111
- g
7111
+ y
7112
7112
  );
7113
7113
  const P = vr(e, t), N = fn(e, t.questionAnswers, P);
7114
7114
  let E = 0, K = 0;
@@ -7124,7 +7124,7 @@ function YS(e, t, n, o) {
7124
7124
  h(
7125
7125
  `companyQuestions.${D.key}.${B}`,
7126
7126
  `${D.key}. ${o(D.labelKey)} (${ae})`,
7127
- g
7127
+ y
7128
7128
  );
7129
7129
  }
7130
7130
  if (D.hasCommentField) {
@@ -7138,7 +7138,7 @@ function YS(e, t, n, o) {
7138
7138
  h(
7139
7139
  `companyQuestions.${D.key}_comment.${B}`,
7140
7140
  `${o(D.commentLabelKey ?? D.labelKey)} (${ye})`,
7141
- g
7141
+ y
7142
7142
  );
7143
7143
  }
7144
7144
  }
@@ -7151,20 +7151,20 @@ function YS(e, t, n, o) {
7151
7151
  if (X.trim() && (d += 1, K += 1, h(
7152
7152
  `companyQuestions.${D.key}`,
7153
7153
  `${D.key}. ${o(D.labelKey)}`,
7154
- g
7154
+ y
7155
7155
  )), D.hasCommentField) {
7156
7156
  const B = D.commentRequiredWhen ?? [];
7157
7157
  B.length > 0 && B.includes(X) && (m += 1, E += 1, r(c[`${D.key}_comment`]).trim() && (d += 1, K += 1, h(
7158
7158
  `companyQuestions.${D.key}_comment`,
7159
7159
  o(D.commentLabelKey ?? D.labelKey),
7160
- g
7160
+ y
7161
7161
  )));
7162
7162
  }
7163
7163
  }
7164
7164
  E > 0 && K === E && h(
7165
7165
  "summary.companyQuestions",
7166
7166
  o("checker.sectionComplete", { section: o("sections.companyQuestions") }),
7167
- g
7167
+ y
7168
7168
  );
7169
7169
  const z = Mc({
7170
7170
  activeMinerals: P,
@@ -7178,7 +7178,7 @@ function YS(e, t, n, o) {
7178
7178
  h(
7179
7179
  `smelterList.${D}`,
7180
7180
  o("checker.passedSmelterForMineral", { mineral: se }),
7181
- y
7181
+ g
7182
7182
  );
7183
7183
  }
7184
7184
  }), I && e.smelterList.hasLookup && (e.templateType === "emrt" || e.templateType === "amrt") && l.forEach((D, re) => {
@@ -7186,23 +7186,23 @@ function YS(e, t, n, o) {
7186
7186
  m += 1, k += 1, (D.smelterLookup || "").trim() && (d += 1, q += 1, h(
7187
7187
  `smelterList.${re}.smelterLookup`,
7188
7188
  o("tables.smelterName"),
7189
- y
7189
+ g
7190
7190
  ));
7191
7191
  }), I && e.smelterList.hasLookup && e.smelterList.notListedRequireNameCountry && l.forEach((D, re) => {
7192
7192
  if (!ln(D.smelterLookup || "")) return;
7193
7193
  m += 1, k += 1, (D.smelterName || "").trim() && (d += 1, q += 1, h(
7194
7194
  `smelterList.${re}.smelterName`,
7195
7195
  o("tables.smelterName"),
7196
- y
7196
+ g
7197
7197
  )), m += 1, k += 1, (D.smelterCountry || "").trim() && (d += 1, q += 1, h(
7198
7198
  `smelterList.${re}.smelterCountry`,
7199
7199
  o("tables.country"),
7200
- y
7200
+ g
7201
7201
  ));
7202
7202
  }), k > 0 && q === k && h(
7203
7203
  "summary.smelterList",
7204
7204
  o("checker.sectionComplete", { section: o("tabs.smelterList") }),
7205
- y
7205
+ g
7206
7206
  );
7207
7207
  let F = 0, O = 0;
7208
7208
  t.scopeType === "B" && (m += 1, F += 1, u.length > 0 && (d += 1, O += 1, h("productList", o("checker.passedProductList"), w)), u.forEach((D, re) => {
@@ -7213,12 +7213,12 @@ function YS(e, t, n, o) {
7213
7213
  w
7214
7214
  ));
7215
7215
  const j = s.contactEmail || "";
7216
- j.trim() && jr(j) && h("companyInfo.contactEmail.valid", o("checker.validEmail", { field: o("fields.contactEmail") }), g);
7216
+ j.trim() && jr(j) && h("companyInfo.contactEmail.valid", o("checker.validEmail", { field: o("fields.contactEmail") }), y);
7217
7217
  const V = s.authorizerEmail || "";
7218
7218
  return V.trim() && jr(V) && h(
7219
7219
  "companyInfo.authorizerEmail.valid",
7220
7220
  o("checker.validEmail", { field: o("fields.authorizerEmail") }),
7221
- g
7221
+ y
7222
7222
  ), {
7223
7223
  summary: {
7224
7224
  completion: m > 0 ? Math.round(d / m * 100) : 100,
@@ -7315,14 +7315,14 @@ function WS({
7315
7315
  return i.forEach((p) => {
7316
7316
  const h = p.metal?.trim();
7317
7317
  if (!h) return;
7318
- const g = p.smelterName ? p.smelterName : p.smelterLookup && !ln(p.smelterLookup) && !Po(p.smelterLookup) ? p.smelterLookup : "";
7319
- if (!g) return;
7320
- const y = d.get(h) ?? /* @__PURE__ */ new Set();
7321
- y.add(g), d.set(h, y);
7318
+ const y = p.smelterName ? p.smelterName : p.smelterLookup && !ln(p.smelterLookup) && !Po(p.smelterLookup) ? p.smelterLookup : "";
7319
+ if (!y) return;
7320
+ const g = d.get(h) ?? /* @__PURE__ */ new Set();
7321
+ g.add(y), d.set(h, g);
7322
7322
  }), Object.fromEntries(
7323
7323
  Array.from(d.entries()).map(([p, h]) => [
7324
7324
  p,
7325
- Array.from(h).map((g) => ({ value: g, label: g }))
7325
+ Array.from(h).map((y) => ({ value: y, label: y }))
7326
7326
  ])
7327
7327
  );
7328
7328
  })();
@@ -7434,7 +7434,7 @@ function $c() {
7434
7434
  (function(n, o) {
7435
7435
  e.exports = o();
7436
7436
  })(nC, (function() {
7437
- var n = 1e3, o = 6e4, r = 36e5, i = "millisecond", s = "second", a = "minute", c = "hour", l = "day", u = "week", m = "month", d = "quarter", p = "year", h = "date", g = "Invalid Date", y = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, w = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, v = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(I) {
7437
+ var n = 1e3, o = 6e4, r = 36e5, i = "millisecond", s = "second", a = "minute", c = "hour", l = "day", u = "week", m = "month", d = "quarter", p = "year", h = "date", y = "Invalid Date", g = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, w = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, v = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(I) {
7438
7438
  var k = ["th", "st", "nd", "rd"], q = I % 100;
7439
7439
  return "[" + I + (k[(q - 20) % 10] || k[q] || k[0]) + "]";
7440
7440
  } }, b = function(I, k, q) {
@@ -7490,7 +7490,7 @@ function $c() {
7490
7490
  if (E.u(O)) return /* @__PURE__ */ new Date();
7491
7491
  if (O instanceof Date) return new Date(O);
7492
7492
  if (typeof O == "string" && !/Z$/i.test(O)) {
7493
- var V = O.match(y);
7493
+ var V = O.match(g);
7494
7494
  if (V) {
7495
7495
  var oe = V[2] - 1 || 0, D = (V[7] || "0").substring(0, 3);
7496
7496
  return j ? new Date(Date.UTC(V[1], oe, V[3] || 1, V[4] || 0, V[5] || 0, V[6] || 0, D)) : new Date(V[1], oe, V[3] || 1, V[4] || 0, V[5] || 0, V[6] || 0, D);
@@ -7504,7 +7504,7 @@ function $c() {
7504
7504
  }, k.$utils = function() {
7505
7505
  return E;
7506
7506
  }, k.isValid = function() {
7507
- return this.$d.toString() !== g;
7507
+ return this.$d.toString() !== y;
7508
7508
  }, k.isSame = function(q, F) {
7509
7509
  var O = N(q);
7510
7510
  return this.startOf(F) <= O && O <= this.endOf(F);
@@ -7575,7 +7575,7 @@ function $c() {
7575
7575
  return this.add(-1 * q, F);
7576
7576
  }, k.format = function(q) {
7577
7577
  var F = this, O = this.$locale();
7578
- if (!this.isValid()) return O.invalidDate || g;
7578
+ if (!this.isValid()) return O.invalidDate || y;
7579
7579
  var j = q || "YYYY-MM-DDTHH:mm:ssZ", V = E.z(this), oe = this.$H, D = this.$m, re = this.$M, X = O.weekdays, B = O.months, se = O.meridiem, ie = function(U, H, ae, ue) {
7580
7580
  return U && (U[H] || U(F, j)) || ae[H].slice(0, ue);
7581
7581
  }, $ = function(U) {
@@ -7798,7 +7798,7 @@ function jt() {
7798
7798
  customMinerals: t.customMinerals
7799
7799
  }),
7800
7800
  [e.templateType, e.versionDef, t.questions, t.selectedMinerals, t.customMinerals, o]
7801
- ), g = ne(
7801
+ ), y = ne(
7802
7802
  () => WS({
7803
7803
  templateType: e.templateType,
7804
7804
  versionDef: e.versionDef,
@@ -7828,7 +7828,7 @@ function jt() {
7828
7828
  viewModels: {
7829
7829
  declaration: p,
7830
7830
  smelterList: h,
7831
- mineList: g
7831
+ mineList: y
7832
7832
  }
7833
7833
  };
7834
7834
  }
@@ -7960,12 +7960,12 @@ function hC({
7960
7960
  [t, e]
7961
7961
  ), h = W((w) => {
7962
7962
  r?.(w);
7963
- }), g = Le(() => {
7963
+ }), y = Le(() => {
7964
7964
  const w = /* @__PURE__ */ new Map();
7965
7965
  return r && t.forEach((v) => {
7966
7966
  w.set(`${v.code}-${v.fieldPath}`, () => h(v));
7967
7967
  }), w;
7968
- }, [t, h, r]), y = c ? void 0 : { display: "none" };
7968
+ }, [t, h, r]), g = c ? void 0 : { display: "none" };
7969
7969
  return /* @__PURE__ */ Y(J, { vertical: !0, gap: 16, children: [
7970
7970
  /* @__PURE__ */ Y("div", { children: [
7971
7971
  /* @__PURE__ */ f(dC, { level: 5, style: { margin: 0 }, children: i("tabs.checker") }),
@@ -8006,7 +8006,7 @@ function hC({
8006
8006
  Ie,
8007
8007
  {
8008
8008
  type: "link",
8009
- onClick: g(`${v.code}-${v.fieldPath}`),
8009
+ onClick: y(`${v.code}-${v.fieldPath}`),
8010
8010
  className: "shrink-0",
8011
8011
  children: i("checker.goToField")
8012
8012
  }
@@ -8022,7 +8022,7 @@ function hC({
8022
8022
  De,
8023
8023
  {
8024
8024
  styles: {
8025
- body: y
8025
+ body: g
8026
8026
  },
8027
8027
  title: /* @__PURE__ */ Y(
8028
8028
  J,
@@ -8108,11 +8108,11 @@ function Ki({
8108
8108
  autoComplete: p,
8109
8109
  spellCheck: h
8110
8110
  }) {
8111
- const { t: g } = ke(), { componentDisabled: y } = Ze.useConfig(), w = s || y, v = o ?? g("placeholders.input"), b = W(
8111
+ const { t: y } = ke(), { componentDisabled: g } = Ze.useConfig(), w = s || g, v = o ?? y("placeholders.input"), b = W(
8112
8112
  (C) => {
8113
8113
  t?.(C.target.value);
8114
8114
  }
8115
- ), S = io(g, a), R = S ? "error" : void 0, M = i && !w && !e?.trim() ? "field-required-empty" : void 0;
8115
+ ), S = io(y, a), R = S ? "error" : void 0, M = i && !w && !e?.trim() ? "field-required-empty" : void 0;
8116
8116
  return /* @__PURE__ */ f(
8117
8117
  di.Item,
8118
8118
  {
@@ -8167,24 +8167,24 @@ function Bi({
8167
8167
  className: m,
8168
8168
  style: d
8169
8169
  }) {
8170
- const { t: p } = ke(), { componentDisabled: h } = Ze.useConfig(), g = s || h, y = io(p, a), w = y ? "error" : void 0, v = o ?? p("placeholders.select"), b = W((C) => {
8170
+ const { t: p } = ke(), { componentDisabled: h } = Ze.useConfig(), y = s || h, g = io(p, a), w = g ? "error" : void 0, v = o ?? p("placeholders.select"), b = W((C) => {
8171
8171
  t?.(C ?? "");
8172
8172
  }), S = W((C) => {
8173
- if (g) return;
8173
+ if (y) return;
8174
8174
  const L = C.key.toLowerCase();
8175
8175
  if (L !== "y" && L !== "n" && L !== "u") return;
8176
8176
  const P = c.find(
8177
8177
  (N) => N.value.toLowerCase().startsWith(L)
8178
8178
  );
8179
8179
  P && (C.preventDefault(), t?.(P.value));
8180
- }), R = e === "" ? void 0 : e, M = i && !g && !e ? "field-required-empty" : void 0;
8180
+ }), R = e === "" ? void 0 : e, M = i && !y && !e ? "field-required-empty" : void 0;
8181
8181
  return /* @__PURE__ */ f(
8182
8182
  di.Item,
8183
8183
  {
8184
8184
  label: n,
8185
8185
  required: i,
8186
8186
  validateStatus: w,
8187
- help: y,
8187
+ help: g,
8188
8188
  extra: r,
8189
8189
  layout: "vertical",
8190
8190
  "data-field-path": u,
@@ -8197,7 +8197,7 @@ function Bi({
8197
8197
  onChange: b,
8198
8198
  onKeyDown: S,
8199
8199
  placeholder: v,
8200
- disabled: g,
8200
+ disabled: y,
8201
8201
  options: c,
8202
8202
  allowClear: l,
8203
8203
  className: M
@@ -8212,62 +8212,62 @@ function bC() {
8212
8212
  (function(n, o) {
8213
8213
  e.exports = o();
8214
8214
  })(gC, (function() {
8215
- var n = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, o = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, r = /\d/, i = /\d\d/, s = /\d\d?/, a = /\d*[^-_:/,()\s\d]+/, c = {}, l = function(y) {
8216
- return (y = +y) + (y > 68 ? 1900 : 2e3);
8217
- }, u = function(y) {
8215
+ var n = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, o = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, r = /\d/, i = /\d\d/, s = /\d\d?/, a = /\d*[^-_:/,()\s\d]+/, c = {}, l = function(g) {
8216
+ return (g = +g) + (g > 68 ? 1900 : 2e3);
8217
+ }, u = function(g) {
8218
8218
  return function(w) {
8219
- this[y] = +w;
8219
+ this[g] = +w;
8220
8220
  };
8221
- }, m = [/[+-]\d\d:?(\d\d)?|Z/, function(y) {
8221
+ }, m = [/[+-]\d\d:?(\d\d)?|Z/, function(g) {
8222
8222
  (this.zone || (this.zone = {})).offset = (function(w) {
8223
8223
  if (!w || w === "Z") return 0;
8224
8224
  var v = w.match(/([+-]|\d\d)/g), b = 60 * v[1] + (+v[2] || 0);
8225
8225
  return b === 0 ? 0 : v[0] === "+" ? -b : b;
8226
- })(y);
8227
- }], d = function(y) {
8228
- var w = c[y];
8226
+ })(g);
8227
+ }], d = function(g) {
8228
+ var w = c[g];
8229
8229
  return w && (w.indexOf ? w : w.s.concat(w.f));
8230
- }, p = function(y, w) {
8230
+ }, p = function(g, w) {
8231
8231
  var v, b = c.meridiem;
8232
8232
  if (b) {
8233
- for (var S = 1; S <= 24; S += 1) if (y.indexOf(b(S, 0, w)) > -1) {
8233
+ for (var S = 1; S <= 24; S += 1) if (g.indexOf(b(S, 0, w)) > -1) {
8234
8234
  v = S > 12;
8235
8235
  break;
8236
8236
  }
8237
- } else v = y === (w ? "pm" : "PM");
8237
+ } else v = g === (w ? "pm" : "PM");
8238
8238
  return v;
8239
- }, h = { A: [a, function(y) {
8240
- this.afternoon = p(y, !1);
8241
- }], a: [a, function(y) {
8242
- this.afternoon = p(y, !0);
8243
- }], Q: [r, function(y) {
8244
- this.month = 3 * (y - 1) + 1;
8245
- }], S: [r, function(y) {
8246
- this.milliseconds = 100 * +y;
8247
- }], SS: [i, function(y) {
8248
- this.milliseconds = 10 * +y;
8249
- }], SSS: [/\d{3}/, function(y) {
8250
- this.milliseconds = +y;
8251
- }], s: [s, u("seconds")], ss: [s, u("seconds")], m: [s, u("minutes")], mm: [s, u("minutes")], H: [s, u("hours")], h: [s, u("hours")], HH: [s, u("hours")], hh: [s, u("hours")], D: [s, u("day")], DD: [i, u("day")], Do: [a, function(y) {
8252
- var w = c.ordinal, v = y.match(/\d+/);
8253
- if (this.day = v[0], w) for (var b = 1; b <= 31; b += 1) w(b).replace(/\[|\]/g, "") === y && (this.day = b);
8254
- }], w: [s, u("week")], ww: [i, u("week")], M: [s, u("month")], MM: [i, u("month")], MMM: [a, function(y) {
8239
+ }, h = { A: [a, function(g) {
8240
+ this.afternoon = p(g, !1);
8241
+ }], a: [a, function(g) {
8242
+ this.afternoon = p(g, !0);
8243
+ }], Q: [r, function(g) {
8244
+ this.month = 3 * (g - 1) + 1;
8245
+ }], S: [r, function(g) {
8246
+ this.milliseconds = 100 * +g;
8247
+ }], SS: [i, function(g) {
8248
+ this.milliseconds = 10 * +g;
8249
+ }], SSS: [/\d{3}/, function(g) {
8250
+ this.milliseconds = +g;
8251
+ }], s: [s, u("seconds")], ss: [s, u("seconds")], m: [s, u("minutes")], mm: [s, u("minutes")], H: [s, u("hours")], h: [s, u("hours")], HH: [s, u("hours")], hh: [s, u("hours")], D: [s, u("day")], DD: [i, u("day")], Do: [a, function(g) {
8252
+ var w = c.ordinal, v = g.match(/\d+/);
8253
+ if (this.day = v[0], w) for (var b = 1; b <= 31; b += 1) w(b).replace(/\[|\]/g, "") === g && (this.day = b);
8254
+ }], w: [s, u("week")], ww: [i, u("week")], M: [s, u("month")], MM: [i, u("month")], MMM: [a, function(g) {
8255
8255
  var w = d("months"), v = (d("monthsShort") || w.map((function(b) {
8256
8256
  return b.slice(0, 3);
8257
- }))).indexOf(y) + 1;
8257
+ }))).indexOf(g) + 1;
8258
8258
  if (v < 1) throw new Error();
8259
8259
  this.month = v % 12 || v;
8260
- }], MMMM: [a, function(y) {
8261
- var w = d("months").indexOf(y) + 1;
8260
+ }], MMMM: [a, function(g) {
8261
+ var w = d("months").indexOf(g) + 1;
8262
8262
  if (w < 1) throw new Error();
8263
8263
  this.month = w % 12 || w;
8264
- }], Y: [/[+-]?\d+/, u("year")], YY: [i, function(y) {
8265
- this.year = l(y);
8264
+ }], Y: [/[+-]?\d+/, u("year")], YY: [i, function(g) {
8265
+ this.year = l(g);
8266
8266
  }], YYYY: [/\d{4}/, u("year")], Z: m, ZZ: m };
8267
- function g(y) {
8267
+ function y(g) {
8268
8268
  var w, v;
8269
- w = y, v = c && c.formats;
8270
- for (var b = (y = w.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(N, E, K) {
8269
+ w = g, v = c && c.formats;
8270
+ for (var b = (g = w.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(N, E, K) {
8271
8271
  var z = K && K.toUpperCase();
8272
8272
  return E || v[K] || n[K] || v[z].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(I, k, q) {
8273
8273
  return k || q.slice(1);
@@ -8294,8 +8294,8 @@ function bC() {
8294
8294
  })(E), E;
8295
8295
  };
8296
8296
  }
8297
- return function(y, w, v) {
8298
- v.p.customParseFormat = !0, y && y.parseTwoDigitYear && (l = y.parseTwoDigitYear);
8297
+ return function(g, w, v) {
8298
+ v.p.customParseFormat = !0, g && g.parseTwoDigitYear && (l = g.parseTwoDigitYear);
8299
8299
  var b = w.prototype, S = b.parse;
8300
8300
  b.parse = function(R) {
8301
8301
  var M = R.date, C = R.utc, L = R.args;
@@ -8306,7 +8306,7 @@ function bC() {
8306
8306
  E && (z = L[2]), c = this.$locale(), !N && z && (c = v.Ls[z]), this.$d = (function(F, O, j, V) {
8307
8307
  try {
8308
8308
  if (["x", "X"].indexOf(O) > -1) return new Date((O === "X" ? 1e3 : 1) * F);
8309
- var oe = g(O)(F), D = oe.year, re = oe.month, X = oe.day, B = oe.hours, se = oe.minutes, ie = oe.seconds, $ = oe.milliseconds, x = oe.zone, U = oe.week, H = /* @__PURE__ */ new Date(), ae = X || (D || re ? 1 : H.getDate()), ue = D || H.getFullYear(), me = 0;
8309
+ var oe = y(O)(F), D = oe.year, re = oe.month, X = oe.day, B = oe.hours, se = oe.minutes, ie = oe.seconds, $ = oe.milliseconds, x = oe.zone, U = oe.week, H = /* @__PURE__ */ new Date(), ae = X || (D || re ? 1 : H.getDate()), ue = D || H.getFullYear(), me = 0;
8310
8310
  D && !re || (me = re > 0 ? re - 1 : H.getMonth());
8311
8311
  var be, ye = B || 0, Ue = se || 0, Ge = ie || 0, Q = $ || 0;
8312
8312
  return x ? new Date(Date.UTC(ue, me, ae, ye, Ue, Ge, Q + 60 * x.offset * 1e3)) : j ? new Date(Date.UTC(ue, me, ae, ye, Ue, Ge, Q)) : (be = new Date(ue, me, ae, ye, Ue, Ge, Q), U && (be = V(be).week(U).toDate()), be);
@@ -8340,12 +8340,12 @@ function CC() {
8340
8340
  return function(n, o, r) {
8341
8341
  var i = o.prototype, s = function(m) {
8342
8342
  return m && (m.indexOf ? m : m.s);
8343
- }, a = function(m, d, p, h, g) {
8344
- var y = m.name ? m : m.$locale(), w = s(y[d]), v = s(y[p]), b = w || v.map((function(R) {
8343
+ }, a = function(m, d, p, h, y) {
8344
+ var g = m.name ? m : m.$locale(), w = s(g[d]), v = s(g[p]), b = w || v.map((function(R) {
8345
8345
  return R.slice(0, h);
8346
8346
  }));
8347
- if (!g) return b;
8348
- var S = y.weekStart;
8347
+ if (!y) return b;
8348
+ var S = g.weekStart;
8349
8349
  return b.map((function(R, M) {
8350
8350
  return b[(M + (S || 0)) % 7];
8351
8351
  }));
@@ -8353,8 +8353,8 @@ function CC() {
8353
8353
  return r.Ls[r.locale()];
8354
8354
  }, l = function(m, d) {
8355
8355
  return m.formats[d] || (function(p) {
8356
- return p.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(h, g, y) {
8357
- return g || y.slice(1);
8356
+ return p.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(h, y, g) {
8357
+ return y || g.slice(1);
8358
8358
  }));
8359
8359
  })(m.formats[d.toUpperCase()]);
8360
8360
  }, u = function() {
@@ -8505,9 +8505,9 @@ function FC({
8505
8505
  className: d,
8506
8506
  style: p
8507
8507
  }) {
8508
- const { t: h } = ke(), { componentDisabled: g } = Ze.useConfig(), y = a || g, w = io(h, c), v = w ? "error" : void 0, b = zC(e), S = r ?? i, R = o ?? i ?? h("placeholders.date"), M = W((P) => {
8508
+ const { t: h } = ke(), { componentDisabled: y } = Ze.useConfig(), g = a || y, w = io(h, c), v = w ? "error" : void 0, b = zC(e), S = r ?? i, R = o ?? i ?? h("placeholders.date"), M = W((P) => {
8509
8509
  t?.(P ? P.format(zc) : "");
8510
- }), C = W((P) => P ? !!(l && P.isBefore(it(l), "day") || u && P.isAfter(it(u), "day")) : !1), L = s && !y && !e ? "field-required-empty" : void 0;
8510
+ }), C = W((P) => P ? !!(l && P.isBefore(it(l), "day") || u && P.isAfter(it(u), "day")) : !1), L = s && !g && !e ? "field-required-empty" : void 0;
8511
8511
  return /* @__PURE__ */ f(
8512
8512
  di.Item,
8513
8513
  {
@@ -8526,7 +8526,7 @@ function FC({
8526
8526
  value: b,
8527
8527
  onChange: M,
8528
8528
  placeholder: R,
8529
- disabled: y,
8529
+ disabled: g,
8530
8530
  disabledDate: C,
8531
8531
  format: Oc,
8532
8532
  className: L,
@@ -8657,7 +8657,7 @@ function HC({
8657
8657
  );
8658
8658
  })();
8659
8659
  return /* @__PURE__ */ f(Vt, { xs: 24, md: L, children: k }, C.key);
8660
- }, { companyFields: h, contactFields: g, authorizerFields: y } = ne(() => {
8660
+ }, { companyFields: h, contactFields: y, authorizerFields: g } = ne(() => {
8661
8661
  const C = _c(e.companyInfoFields, (N) => UC.has(N.key) ? "contact" : GC.has(N.key) ? "authorizer" : QC.has(N.key) ? "company" : "other"), L = C.company ?? [];
8662
8662
  return {
8663
8663
  companyFields: l === "C" ? L : L.filter((N) => N.key !== "scopeDescription"),
@@ -8686,11 +8686,11 @@ function HC({
8686
8686
  ] }),
8687
8687
  children: /* @__PURE__ */ Y(J, { vertical: !0, gap: 24, children: [
8688
8688
  /* @__PURE__ */ f(Pt, { gutter: [24, 0], children: h.map((C) => p(C, 12)) }),
8689
- g.length > 0 && /* @__PURE__ */ Y(zr, { children: [
8689
+ y.length > 0 && /* @__PURE__ */ Y(zr, { children: [
8690
8690
  /* @__PURE__ */ f("div", { className: "border-t border-gray-200 pt-4", children: /* @__PURE__ */ f(le.Text, { strong: !0, className: "text-gray-600 text-sm", children: s("sections.contact") }) }),
8691
- /* @__PURE__ */ f(Pt, { gutter: [24, 0], children: g.map((C) => p(C, 12)) })
8691
+ /* @__PURE__ */ f(Pt, { gutter: [24, 0], children: y.map((C) => p(C, 12)) })
8692
8692
  ] }),
8693
- y.length > 0 && /* @__PURE__ */ Y(zr, { children: [
8693
+ g.length > 0 && /* @__PURE__ */ Y(zr, { children: [
8694
8694
  /* @__PURE__ */ Y(
8695
8695
  J,
8696
8696
  {
@@ -8699,7 +8699,7 @@ function HC({
8699
8699
  className: "border-t border-gray-200 pt-4",
8700
8700
  children: [
8701
8701
  /* @__PURE__ */ f(le.Text, { strong: !0, className: "text-gray-600 text-sm", children: s("sections.authorizer") }),
8702
- g.length > 0 && !a && /* @__PURE__ */ f(
8702
+ y.length > 0 && !a && /* @__PURE__ */ f(
8703
8703
  Ie,
8704
8704
  {
8705
8705
  type: "link",
@@ -8713,7 +8713,7 @@ function HC({
8713
8713
  ]
8714
8714
  }
8715
8715
  ),
8716
- /* @__PURE__ */ f(Pt, { gutter: [24, 0], children: y.map((C) => p(C, 12)) })
8716
+ /* @__PURE__ */ f(Pt, { gutter: [24, 0], children: g.map((C) => p(C, 12)) })
8717
8717
  ] })
8718
8718
  ] })
8719
8719
  }
@@ -8746,9 +8746,9 @@ function VC({
8746
8746
  }, [t, u, l]), p = !(a ? Array.from(a.values()).some((M) => M) : i ? Array.from(i.values()).some((M) => M.companyQuestionsEnabled) : !1), h = ne(
8747
8747
  () => XC(l, s, m),
8748
8748
  [l, s, m]
8749
- ), g = e.map(
8749
+ ), y = e.map(
8750
8750
  (M) => `${M.key}:${M.perMineral ? 1 : 0}:${M.hasCommentField ? 1 : 0}:${M.options.map((C) => `${C.value}:${C.labelKey}`).join(",")}`
8751
- ).join("|"), y = ne(() => {
8751
+ ).join("|"), g = ne(() => {
8752
8752
  const M = /* @__PURE__ */ new Map();
8753
8753
  return e.forEach((C) => {
8754
8754
  M.set(
@@ -8761,14 +8761,14 @@ function VC({
8761
8761
  )
8762
8762
  );
8763
8763
  }), M;
8764
- }, [e, g, l]), w = W((M, C) => {
8764
+ }, [e, y, l]), w = W((M, C) => {
8765
8765
  o(M, C);
8766
8766
  }), v = Le(() => {
8767
8767
  const M = /* @__PURE__ */ new Map();
8768
8768
  return e.forEach((C) => {
8769
8769
  C.perMineral || M.set(C.key, (L) => w(C.key, L));
8770
8770
  }), M;
8771
- }, [e, g, w]), b = Le(() => {
8771
+ }, [e, y, w]), b = Le(() => {
8772
8772
  const M = /* @__PURE__ */ new Map();
8773
8773
  return e.forEach((C) => {
8774
8774
  C.perMineral && r.forEach((L) => {
@@ -8778,14 +8778,14 @@ function VC({
8778
8778
  );
8779
8779
  });
8780
8780
  }), M;
8781
- }, [e, r, o, g]), S = Le(() => {
8781
+ }, [e, r, o, y]), S = Le(() => {
8782
8782
  const M = /* @__PURE__ */ new Map();
8783
8783
  return e.forEach((C) => {
8784
8784
  if (!C.hasCommentField || C.perMineral) return;
8785
8785
  const L = `${C.key}_comment`;
8786
8786
  M.set(L, (P) => w(L, P));
8787
8787
  }), M;
8788
- }, [e, g, w]), R = Le(() => {
8788
+ }, [e, y, w]), R = Le(() => {
8789
8789
  const M = /* @__PURE__ */ new Map();
8790
8790
  return e.forEach((C) => {
8791
8791
  if (!C.hasCommentField || !C.perMineral) return;
@@ -8797,7 +8797,7 @@ function VC({
8797
8797
  );
8798
8798
  });
8799
8799
  }), M;
8800
- }, [e, r, o, g]);
8800
+ }, [e, r, o, y]);
8801
8801
  return e.length === 0 ? null : /* @__PURE__ */ f(
8802
8802
  De,
8803
8803
  {
@@ -8812,7 +8812,7 @@ function VC({
8812
8812
  values: n,
8813
8813
  errors: c,
8814
8814
  gatingByMineral: i,
8815
- options: y.get(M.key) ?? [],
8815
+ options: g.get(M.key) ?? [],
8816
8816
  getPerMineralHandler: b,
8817
8817
  getPerMineralCommentHandler: R,
8818
8818
  t: l
@@ -8822,7 +8822,7 @@ function VC({
8822
8822
  errors: c,
8823
8823
  isOptional: p,
8824
8824
  requiredByQuestion: a,
8825
- options: y.get(M.key) ?? [],
8825
+ options: g.get(M.key) ?? [],
8826
8826
  getSelectHandler: v,
8827
8827
  getCommentHandler: S,
8828
8828
  t: l
@@ -8842,7 +8842,7 @@ function WC({
8842
8842
  getCommentHandler: a,
8843
8843
  t: c
8844
8844
  }) {
8845
- const l = Fc(n, e.key, "", !1), u = `${e.key}_comment`, m = s(e.key), d = a(u), p = e.commentRequiredWhen ?? [], h = ci(t, e.key, "", !1), g = Bc(n, u, "", !1), y = r?.get(e.key) ?? !o, w = e.hasCommentField && p.includes(h || ""), v = y && w, b = Kc(t, u, "", !1);
8845
+ const l = Fc(n, e.key, "", !1), u = `${e.key}_comment`, m = s(e.key), d = a(u), p = e.commentRequiredWhen ?? [], h = ci(t, e.key, "", !1), y = Bc(n, u, "", !1), g = r?.get(e.key) ?? !o, w = e.hasCommentField && p.includes(h || ""), v = g && w, b = Kc(t, u, "", !1);
8846
8846
  return /* @__PURE__ */ f("div", { className: "company-question-row", children: /* @__PURE__ */ Y("div", { className: "company-question-grid", children: [
8847
8847
  /* @__PURE__ */ f(le.Text, { className: "company-question-label", children: c(e.labelKey) }),
8848
8848
  /* @__PURE__ */ f("div", { className: "company-question-answer", children: /* @__PURE__ */ f(
@@ -8852,7 +8852,7 @@ function WC({
8852
8852
  onChange: m,
8853
8853
  options: i,
8854
8854
  placeholder: c("placeholders.select"),
8855
- required: y,
8855
+ required: g,
8856
8856
  error: l,
8857
8857
  allowClear: !0,
8858
8858
  fieldPath: `companyQuestions.${e.key}`
@@ -8867,7 +8867,7 @@ function WC({
8867
8867
  required: v,
8868
8868
  multiline: !0,
8869
8869
  rows: 2,
8870
- error: g,
8870
+ error: y,
8871
8871
  fieldPath: `companyQuestions.${u}`
8872
8872
  }
8873
8873
  ) })
@@ -8889,7 +8889,7 @@ function JC({
8889
8889
  return /* @__PURE__ */ f("div", { className: "company-question-row", children: /* @__PURE__ */ Y("div", { className: "company-question-grid company-question-grid-per-mineral", children: [
8890
8890
  /* @__PURE__ */ f(le.Text, { className: "company-question-label company-question-label-full", strong: !0, children: c(e.labelKey) }),
8891
8891
  t.map((u) => {
8892
- const m = r?.get(u.key)?.companyQuestionsEnabled === !0, d = ci(n, e.key, u.key, !0), p = Fc(o, e.key, u.key, !0), h = s(`${e.key}:${u.key}`), g = Kc(n, l, u.key, !0), y = Bc(
8892
+ const m = r?.get(u.key)?.companyQuestionsEnabled === !0, d = ci(n, e.key, u.key, !0), p = Fc(o, e.key, u.key, !0), h = s(`${e.key}:${u.key}`), y = Kc(n, l, u.key, !0), g = Bc(
8893
8893
  o,
8894
8894
  l,
8895
8895
  u.key,
@@ -8915,13 +8915,13 @@ function JC({
8915
8915
  /* @__PURE__ */ f("div", { className: "company-question-comment", children: e.hasCommentField && /* @__PURE__ */ f(
8916
8916
  Ki,
8917
8917
  {
8918
- value: g,
8918
+ value: y,
8919
8919
  onChange: S,
8920
8920
  placeholder: e.commentLabelKey ? c(e.commentLabelKey) : c("placeholders.comments"),
8921
8921
  required: b,
8922
8922
  multiline: !0,
8923
8923
  rows: 2,
8924
- error: y,
8924
+ error: g,
8925
8925
  fieldPath: `companyQuestions.${l}.${u.key}`
8926
8926
  }
8927
8927
  ) })
@@ -9002,10 +9002,10 @@ function nk({
9002
9002
  customMinerals: r = [],
9003
9003
  onCustomMineralsChange: i
9004
9004
  }) {
9005
- const { t: s, locale: a, i18n: c } = ke(), { componentDisabled: l } = Ze.useConfig(), { mineralScope: u } = e, m = a.startsWith("zh"), d = u.mode !== "fixed", p = u.mode === "free-text" ? u.maxCount || 10 : 0, h = u.otherSlotCount ?? 0, g = ne(
9005
+ const { t: s, locale: a, i18n: c } = ke(), { componentDisabled: l } = Ze.useConfig(), { mineralScope: u } = e, m = a.startsWith("zh"), d = u.mode !== "fixed", p = u.mode === "free-text" ? u.maxCount || 10 : 0, h = u.otherSlotCount ?? 0, y = ne(
9006
9006
  () => p > 0 ? Array.from({ length: p }, (z, I) => I) : [],
9007
9007
  [p]
9008
- ), y = ne(
9008
+ ), g = ne(
9009
9009
  () => h > 0 ? Array.from({ length: h }, (z, I) => I) : [],
9010
9010
  [h]
9011
9011
  ), { maxCountHint: w, maxCountReachedHint: v } = ne(
@@ -9022,7 +9022,7 @@ function nk({
9022
9022
  }), M = W((z, I) => {
9023
9023
  const k = [...r];
9024
9024
  k[z] = I, i?.(k);
9025
- }), C = u.mode === "free-text" ? g : y, L = Le(() => {
9025
+ }), C = u.mode === "free-text" ? y : g, L = Le(() => {
9026
9026
  const z = /* @__PURE__ */ new Map();
9027
9027
  return u.minerals.forEach((I) => {
9028
9028
  z.set(I.key, (k) => R(I, k.target.checked));
@@ -9109,12 +9109,12 @@ function nk({
9109
9109
  return /* @__PURE__ */ f(Vt, { xs: 12, sm: 8, md: 6, children: q && v ? /* @__PURE__ */ f(Cu, { title: v, children: O }) : O }, I.key);
9110
9110
  }) }),
9111
9111
  w && /* @__PURE__ */ f(le.Text, { type: "secondary", className: "text-xs", children: w }),
9112
- z && y.length > 0 && /* @__PURE__ */ Y(J, { vertical: !0, gap: 8, children: [
9112
+ z && g.length > 0 && /* @__PURE__ */ Y(J, { vertical: !0, gap: 8, children: [
9113
9113
  /* @__PURE__ */ Y(J, { align: "center", gap: 4, children: [
9114
9114
  /* @__PURE__ */ f(le.Text, { type: "secondary", className: "text-xs", children: s("sections.mineralsOther") }),
9115
9115
  /* @__PURE__ */ f(le.Text, { type: "danger", children: "*" })
9116
9116
  ] }),
9117
- /* @__PURE__ */ f(Pt, { gutter: [8, 8], children: y.map((I) => /* @__PURE__ */ f(Vt, { xs: 12, md: 6, children: /* @__PURE__ */ f(
9117
+ /* @__PURE__ */ f(Pt, { gutter: [8, 8], children: g.map((I) => /* @__PURE__ */ f(Vt, { xs: 12, md: 6, children: /* @__PURE__ */ f(
9118
9118
  de,
9119
9119
  {
9120
9120
  value: r[I] || void 0,
@@ -9131,7 +9131,7 @@ function nk({
9131
9131
  }
9132
9132
  return u.mode === "free-text" ? /* @__PURE__ */ f(De, { title: K, children: /* @__PURE__ */ Y(J, { vertical: !0, gap: 12, children: [
9133
9133
  /* @__PURE__ */ f(le.Text, { type: "secondary", className: "text-xs", children: s("hints.mineralsMaxCount", { max: p }) }),
9134
- /* @__PURE__ */ f(Pt, { gutter: [8, 8], children: g.map((z) => /* @__PURE__ */ f(Vt, { xs: 12, md: 6, children: /* @__PURE__ */ f(
9134
+ /* @__PURE__ */ f(Pt, { gutter: [8, 8], children: y.map((z) => /* @__PURE__ */ f(Vt, { xs: 12, md: 6, children: /* @__PURE__ */ f(
9135
9135
  de,
9136
9136
  {
9137
9137
  value: r[z] || void 0,
@@ -9175,11 +9175,11 @@ function sk({
9175
9175
  requiredByQuestion: a,
9176
9176
  errors: c = {}
9177
9177
  }) {
9178
- const { t: l } = ke(), { componentDisabled: u } = Ze.useConfig(), { questions: m, mineralScope: d } = e, p = t ?? d.minerals, h = p.map((N) => `${N.key}:${N.labelKey ?? ""}`).join("|"), g = m.map(
9178
+ const { t: l } = ke(), { componentDisabled: u } = Ze.useConfig(), { questions: m, mineralScope: d } = e, p = t ?? d.minerals, h = p.map((N) => `${N.key}:${N.labelKey ?? ""}`).join("|"), y = m.map(
9179
9179
  (N) => `${N.key}:${N.perMineral ? 1 : 0}:${N.labelKey}:${Qc(
9180
9180
  N.options
9181
9181
  )}:${ik(N.optionsByMineral)}`
9182
- ).join("|"), y = ne(
9182
+ ).join("|"), g = ne(
9183
9183
  () => p.map((N) => ({ ...N })),
9184
9184
  [p, h]
9185
9185
  ), w = ne(() => {
@@ -9189,7 +9189,7 @@ function sk({
9189
9189
  }));
9190
9190
  return m.forEach((K) => {
9191
9191
  if (K.perMineral) {
9192
- y.forEach((z) => {
9192
+ g.forEach((z) => {
9193
9193
  const k = K.optionsByMineral?.[z.key] ?? K.options;
9194
9194
  N.set(`${K.key}:${z.key}`, E(k));
9195
9195
  });
@@ -9197,7 +9197,7 @@ function sk({
9197
9197
  }
9198
9198
  N.set(`${K.key}:__all`, E(K.options));
9199
9199
  }), N;
9200
- }, [m, y, h, g, l]), v = W(
9200
+ }, [m, g, h, y, l]), v = W(
9201
9201
  (N, E, K) => {
9202
9202
  r(N, E, K);
9203
9203
  }
@@ -9209,7 +9209,7 @@ function sk({
9209
9209
  const N = /* @__PURE__ */ new Map();
9210
9210
  return m.forEach((E) => {
9211
9211
  if (E.perMineral) {
9212
- y.forEach((K) => {
9212
+ g.forEach((K) => {
9213
9213
  N.set(
9214
9214
  `${E.key}:${K.key}`,
9215
9215
  (z) => v(E.key, K.key, z)
@@ -9219,11 +9219,11 @@ function sk({
9219
9219
  }
9220
9220
  N.set(`${E.key}:__all`, (K) => v(E.key, null, K));
9221
9221
  }), N;
9222
- }, [v, y, m, h, g]), R = Le(() => {
9222
+ }, [v, g, m, h, y]), R = Le(() => {
9223
9223
  const N = /* @__PURE__ */ new Map();
9224
9224
  return m.forEach((E) => {
9225
9225
  if (E.perMineral) {
9226
- y.forEach((K) => {
9226
+ g.forEach((K) => {
9227
9227
  N.set(
9228
9228
  `${E.key}:${K.key}`,
9229
9229
  (z) => b(E.key, K.key, z)
@@ -9233,7 +9233,7 @@ function sk({
9233
9233
  }
9234
9234
  N.set(`${E.key}:__all`, (K) => b(E.key, null, K));
9235
9235
  }), N;
9236
- }, [b, y, m, h, g]), M = W(
9236
+ }, [b, g, m, h, y]), M = W(
9237
9237
  (N, E, K) => {
9238
9238
  const z = K ? `${N}:${E ?? ""}` : `${N}:__all`;
9239
9239
  return S(z);
@@ -9249,7 +9249,7 @@ function sk({
9249
9249
  return w.get(z) ?? [];
9250
9250
  }
9251
9251
  ), P = W((N, E) => {
9252
- y.forEach((K) => {
9252
+ g.forEach((K) => {
9253
9253
  L(N, K.key, !0).some((I) => I.value === E) && r(N, K.key, E);
9254
9254
  });
9255
9255
  });
@@ -9267,7 +9267,7 @@ function sk({
9267
9267
  ak,
9268
9268
  {
9269
9269
  question: N,
9270
- minerals: y,
9270
+ minerals: g,
9271
9271
  values: n,
9272
9272
  commentValues: o,
9273
9273
  errors: c,
@@ -9301,32 +9301,32 @@ function ak({
9301
9301
  readOnly: d
9302
9302
  }) {
9303
9303
  let p = e.key !== "Q1";
9304
- for (const y of t) {
9305
- const w = i?.get(y.key);
9304
+ for (const g of t) {
9305
+ const w = i?.get(g.key);
9306
9306
  if (!ga(e.key, w)) {
9307
9307
  p = !1;
9308
9308
  break;
9309
9309
  }
9310
9310
  }
9311
- const h = e.perMineral && t.length > 1, g = ne(() => {
9311
+ const h = e.perMineral && t.length > 1, y = ne(() => {
9312
9312
  if (!h) return [];
9313
- const y = t.map(
9313
+ const g = t.map(
9314
9314
  (b) => new Set(a(e.key, b.key, !0).map((S) => S.value))
9315
- ), w = y.reduce(
9315
+ ), w = g.reduce(
9316
9316
  (b, S) => new Set([...b].filter((R) => S.has(R))),
9317
- y[0] ?? /* @__PURE__ */ new Set()
9317
+ g[0] ?? /* @__PURE__ */ new Set()
9318
9318
  );
9319
9319
  return a(e.key, t[0]?.key ?? null, !0).filter((b) => w.has(b.value));
9320
9320
  }, [h, e.key, t, a]);
9321
9321
  return /* @__PURE__ */ f("div", { className: `question-matrix-row ${p ? "question-row-disabled" : ""}`, children: /* @__PURE__ */ Y(J, { vertical: !0, gap: 12, children: [
9322
9322
  /* @__PURE__ */ Y(J, { align: "center", justify: "space-between", gap: 12, children: [
9323
9323
  /* @__PURE__ */ f(le.Text, { strong: !0, style: { fontSize: 14, flex: 1 }, children: m(e.labelKey) }),
9324
- h && g.length > 0 && !p && !d && /* @__PURE__ */ f(
9324
+ h && y.length > 0 && !p && !d && /* @__PURE__ */ f(
9325
9325
  tt,
9326
9326
  {
9327
9327
  placeholder: m("actions.setAllTo"),
9328
- options: g,
9329
- onChange: (y) => u(e.key, y),
9328
+ options: y,
9329
+ onChange: (g) => u(e.key, g),
9330
9330
  style: { width: 140 },
9331
9331
  size: "small",
9332
9332
  allowClear: !0,
@@ -9334,27 +9334,27 @@ function ak({
9334
9334
  }
9335
9335
  )
9336
9336
  ] }),
9337
- /* @__PURE__ */ f(J, { vertical: !0, gap: 8, children: t.map((y) => {
9338
- const w = i?.get(y.key), v = d || ga(e.key, w), b = ba(
9337
+ /* @__PURE__ */ f(J, { vertical: !0, gap: 8, children: t.map((g) => {
9338
+ const w = i?.get(g.key), v = d || ga(e.key, w), b = ba(
9339
9339
  n,
9340
9340
  e.key,
9341
- y.key,
9341
+ g.key,
9342
9342
  e.perMineral
9343
9343
  ), S = ba(
9344
9344
  o,
9345
9345
  e.key,
9346
- y.key,
9346
+ g.key,
9347
9347
  e.perMineral
9348
9348
  );
9349
- ck(r, e.key, y.key, e.perMineral);
9350
- const R = s?.get(e.key)?.get(y.key) === !0, M = !v && R && !b ? "field-required-empty" : void 0, C = c(e.key, y.key, e.perMineral), L = l(e.key, y.key, e.perMineral), P = a(e.key, y.key, e.perMineral);
9349
+ ck(r, e.key, g.key, e.perMineral);
9350
+ const R = s?.get(e.key)?.get(g.key) === !0, M = !v && R && !b ? "field-required-empty" : void 0, C = c(e.key, g.key, e.perMineral), L = l(e.key, g.key, e.perMineral), P = a(e.key, g.key, e.perMineral);
9351
9351
  return /* @__PURE__ */ Y("div", { className: "question-matrix-grid", children: [
9352
9352
  /* @__PURE__ */ f(
9353
9353
  le.Text,
9354
9354
  {
9355
9355
  className: "question-matrix-label",
9356
9356
  type: v ? "secondary" : void 0,
9357
- children: y.label ?? m(y.labelKey)
9357
+ children: g.label ?? m(g.labelKey)
9358
9358
  }
9359
9359
  ),
9360
9360
  /* @__PURE__ */ f("div", { className: "question-matrix-answer", children: /* @__PURE__ */ f(
@@ -9368,7 +9368,7 @@ function ak({
9368
9368
  disabled: v,
9369
9369
  allowClear: !0,
9370
9370
  className: M,
9371
- "data-field-path": e.perMineral ? `questions.${e.key}.${y.key}` : `questions.${e.key}`
9371
+ "data-field-path": e.perMineral ? `questions.${e.key}.${g.key}` : `questions.${e.key}`
9372
9372
  }
9373
9373
  ) }),
9374
9374
  /* @__PURE__ */ f("div", { className: "question-matrix-comment", children: /* @__PURE__ */ f(
@@ -9381,10 +9381,10 @@ function ak({
9381
9381
  autoSize: { minRows: 1, maxRows: 2 },
9382
9382
  rows: 1,
9383
9383
  style: { resize: "none" },
9384
- "data-field-path": e.perMineral ? `questionComments.${e.key}.${y.key}` : `questionComments.${e.key}`
9384
+ "data-field-path": e.perMineral ? `questionComments.${e.key}.${g.key}` : `questionComments.${e.key}`
9385
9385
  }
9386
9386
  ) })
9387
- ] }, y.key);
9387
+ ] }, g.key);
9388
9388
  }) })
9389
9389
  ] }) });
9390
9390
  }
@@ -9454,8 +9454,8 @@ function wa() {
9454
9454
  setCustomMinerals: d,
9455
9455
  setQuestionValue: p,
9456
9456
  setQuestionComment: h,
9457
- setCompanyQuestionValue: g
9458
- } = Ut(), { t: y } = ke(), { gatingByMineral: w, requiredFields: v, viewModels: b } = jt(), { displayMinerals: S } = b.declaration;
9457
+ setCompanyQuestionValue: y
9458
+ } = Ut(), { t: g } = ke(), { gatingByMineral: w, requiredFields: v, viewModels: b } = jt(), { displayMinerals: S } = b.declaration;
9459
9459
  return Sr(), /* @__PURE__ */ Y(J, { vertical: !0, gap: nt.sectionGap, children: [
9460
9460
  /* @__PURE__ */ f(
9461
9461
  HC,
@@ -9465,7 +9465,7 @@ function wa() {
9465
9465
  onChange: u,
9466
9466
  requiredFields: v.companyInfo,
9467
9467
  errors: l.companyInfo,
9468
- dateFormatHint: y("hints.authorizationDate")
9468
+ dateFormatHint: g("hints.authorizationDate")
9469
9469
  }
9470
9470
  ),
9471
9471
  /* @__PURE__ */ f(
@@ -9503,7 +9503,7 @@ function wa() {
9503
9503
  questionDefs: n.questions,
9504
9504
  minerals: S,
9505
9505
  values: c,
9506
- onChange: g,
9506
+ onChange: y,
9507
9507
  gatingByMineral: w,
9508
9508
  gatingCondition: n.gating.companyQuestionsGating,
9509
9509
  requiredByQuestion: v.companyQuestions,
@@ -9750,12 +9750,12 @@ function gk({
9750
9750
  b.set(`${S.id}:${R}`, (M) => d(S.id, R, M));
9751
9751
  });
9752
9752
  }), b;
9753
- }, [n, d]), g = Le(() => {
9753
+ }, [n, d]), y = Le(() => {
9754
9754
  const b = /* @__PURE__ */ new Map();
9755
9755
  return n.forEach((S) => {
9756
9756
  b.set(S.id, () => m(S.id));
9757
9757
  }), b;
9758
- }, [n, m]), y = ne(
9758
+ }, [n, m]), g = ne(
9759
9759
  () => t.map((b) => ({
9760
9760
  value: b.key,
9761
9761
  label: b.label ?? a(b.labelKey)
@@ -9776,7 +9776,7 @@ function gk({
9776
9776
  {
9777
9777
  value: b || void 0,
9778
9778
  onChange: h(`${S.id}:metal`),
9779
- options: y,
9779
+ options: g,
9780
9780
  placeholder: a("placeholders.select"),
9781
9781
  className: "w-full"
9782
9782
  }
@@ -10001,7 +10001,7 @@ function gk({
10001
10001
  type: "text",
10002
10002
  danger: !0,
10003
10003
  icon: /* @__PURE__ */ f(rn, {}),
10004
- onClick: g(S.id)
10004
+ onClick: y(S.id)
10005
10005
  }
10006
10006
  )
10007
10007
  }
@@ -10012,9 +10012,9 @@ function gk({
10012
10012
  r,
10013
10013
  w,
10014
10014
  p,
10015
- g,
10016
- h,
10017
10015
  y,
10016
+ h,
10017
+ g,
10018
10018
  i,
10019
10019
  a
10020
10020
  ]);
@@ -10070,34 +10070,34 @@ function wk({
10070
10070
  }) {
10071
10071
  const { t: s } = ke(), { componentDisabled: a } = Ze.useConfig(), c = ne(
10072
10072
  () => {
10073
- const y = Fi(e, n, o);
10074
- return (e.templateType === "amrt" ? [...y].sort((v, b) => {
10073
+ const g = Fi(e, n, o);
10074
+ return (e.templateType === "amrt" ? [...g].sort((v, b) => {
10075
10075
  const S = (v.label ?? s(v.labelKey)).trim(), R = (b.label ?? s(b.labelKey)).trim(), M = S.localeCompare(R);
10076
10076
  return M !== 0 ? M : v.key.localeCompare(b.key);
10077
- }) : y).map((v) => ({
10077
+ }) : g).map((v) => ({
10078
10078
  value: v.key,
10079
10079
  label: v.label ?? s(v.labelKey)
10080
10080
  }));
10081
10081
  },
10082
10082
  [e, n, o, s]
10083
10083
  ), l = ne(
10084
- () => new Map(t.map((y, w) => [y.id, w])),
10084
+ () => new Map(t.map((g, w) => [g.id, w])),
10085
10085
  [t]
10086
10086
  ), u = W(() => {
10087
- const y = {
10087
+ const g = {
10088
10088
  id: `minerals-scope-${Date.now()}`,
10089
10089
  mineral: "",
10090
10090
  reason: ""
10091
10091
  };
10092
- r([...t, y]);
10093
- }), m = W((y) => {
10094
- const w = l.get(y);
10092
+ r([...t, g]);
10093
+ }), m = W((g) => {
10094
+ const w = l.get(g);
10095
10095
  if (w === void 0) return;
10096
10096
  const v = t.slice();
10097
10097
  v.splice(w, 1), r(v);
10098
10098
  }), d = W(
10099
- (y, w, v) => {
10100
- const b = l.get(y);
10099
+ (g, w, v) => {
10100
+ const b = l.get(g);
10101
10101
  if (b === void 0) return;
10102
10102
  const S = t[b];
10103
10103
  if (!S || S[w] === v) return;
@@ -10105,33 +10105,33 @@ function wk({
10105
10105
  R[b] = { ...S, [w]: v }, r(R);
10106
10106
  }
10107
10107
  ), p = Le(() => {
10108
- const y = /* @__PURE__ */ new Map();
10108
+ const g = /* @__PURE__ */ new Map();
10109
10109
  return t.forEach((w) => {
10110
- y.set(
10110
+ g.set(
10111
10111
  w.id,
10112
10112
  (v) => d(w.id, "reason", v.target.value)
10113
10113
  );
10114
- }), y;
10114
+ }), g;
10115
10115
  }, [t, d]), h = Le(() => {
10116
- const y = /* @__PURE__ */ new Map();
10116
+ const g = /* @__PURE__ */ new Map();
10117
10117
  return t.forEach((w) => {
10118
- y.set(w.id, (v) => d(w.id, "mineral", v));
10119
- }), y;
10120
- }, [t, d]), g = ne(
10118
+ g.set(w.id, (v) => d(w.id, "mineral", v));
10119
+ }), g;
10120
+ }, [t, d]), y = ne(
10121
10121
  () => [
10122
10122
  {
10123
10123
  title: s("tables.metal"),
10124
10124
  dataIndex: "mineral",
10125
10125
  key: "mineral",
10126
10126
  width: 220,
10127
- render: (y, w) => {
10127
+ render: (g, w) => {
10128
10128
  const v = i[l.get(w.id) ?? -1]?.mineral;
10129
10129
  return We(
10130
10130
  !0,
10131
10131
  /* @__PURE__ */ f(
10132
10132
  tt,
10133
10133
  {
10134
- value: y || void 0,
10134
+ value: g || void 0,
10135
10135
  onChange: h(w.id),
10136
10136
  options: c,
10137
10137
  placeholder: s("placeholders.select"),
@@ -10148,14 +10148,14 @@ function wk({
10148
10148
  title: e.templateType === "amrt" ? s(e.version.id === "1.1" ? "tables.mineralsScopeReasonPrt" : "tables.mineralsScopeReasonAmrt") : s("tables.mineralsScopeReason"),
10149
10149
  dataIndex: "reason",
10150
10150
  key: "reason",
10151
- render: (y, w) => {
10151
+ render: (g, w) => {
10152
10152
  const v = i[l.get(w.id) ?? -1]?.reason;
10153
10153
  return We(
10154
10154
  !0,
10155
10155
  /* @__PURE__ */ f(
10156
10156
  de,
10157
10157
  {
10158
- value: y || void 0,
10158
+ value: g || void 0,
10159
10159
  onChange: p(w.id),
10160
10160
  placeholder: s("placeholders.mineralsScopeReason"),
10161
10161
  disabled: a,
@@ -10170,7 +10170,7 @@ function wk({
10170
10170
  title: "",
10171
10171
  key: "actions",
10172
10172
  width: 60,
10173
- render: (y, w) => a ? null : /* @__PURE__ */ f(
10173
+ render: (g, w) => a ? null : /* @__PURE__ */ f(
10174
10174
  Ie,
10175
10175
  {
10176
10176
  type: "text",
@@ -10203,7 +10203,7 @@ function wk({
10203
10203
  /* @__PURE__ */ f(
10204
10204
  Ho,
10205
10205
  {
10206
- columns: g,
10206
+ columns: y,
10207
10207
  dataSource: t,
10208
10208
  rowKey: "id",
10209
10209
  pagination: !1,
@@ -10245,7 +10245,7 @@ const Sk = [
10245
10245
  showRequesterColumns: c,
10246
10246
  integration: l
10247
10247
  }) {
10248
- const { t: u, locale: m } = ke(), { componentDisabled: d } = Ze.useConfig(), [p, h] = ht([]), [g, { setTrue: y, setFalse: w }] = Dc(), v = Pc(i), b = ne(() => {
10248
+ const { t: u, locale: m } = ke(), { componentDisabled: d } = Ze.useConfig(), [p, h] = ht([]), [y, { setTrue: g, setFalse: w }] = Dc(), v = Pc(i), b = ne(() => {
10249
10249
  const B = new Set(i.map((se) => se.id));
10250
10250
  return p.filter((se) => B.has(se));
10251
10251
  }, [i, p]), S = ne(() => new Map(i.map((B, se) => [B.id, se])), [i]), R = W(() => {
@@ -10271,7 +10271,7 @@ const Sk = [
10271
10271
  };
10272
10272
  }
10273
10273
  ), K = W(() => v.current.map((B) => ({ ...B }))), z = W(async () => {
10274
- if (d || !l || g) return;
10274
+ if (d || !l || y) return;
10275
10275
  const B = K(), se = {
10276
10276
  templateType: t,
10277
10277
  versionId: n,
@@ -10280,7 +10280,7 @@ const Sk = [
10280
10280
  config: r,
10281
10281
  currentRows: B
10282
10282
  };
10283
- y();
10283
+ g();
10284
10284
  try {
10285
10285
  const $ = (await l.onPickProducts(se))?.items ?? [];
10286
10286
  if ($.length === 0) return;
@@ -10455,7 +10455,7 @@ const Sk = [
10455
10455
  type: L ? "default" : "primary",
10456
10456
  icon: /* @__PURE__ */ f(Dt, {}),
10457
10457
  onClick: z,
10458
- loading: N && g,
10458
+ loading: N && y,
10459
10459
  children: P
10460
10460
  }
10461
10461
  )
@@ -10479,7 +10479,7 @@ const Sk = [
10479
10479
  type: L ? "default" : "primary",
10480
10480
  icon: /* @__PURE__ */ f(Dt, {}),
10481
10481
  onClick: z,
10482
- loading: N && g,
10482
+ loading: N && y,
10483
10483
  children: P
10484
10484
  }
10485
10485
  )
@@ -10693,10 +10693,10 @@ const Ak = [
10693
10693
  showNotYetIdentifiedCountryHint: m = !1,
10694
10694
  integration: d
10695
10695
  }) {
10696
- const { t: p, locale: h } = ke(), { componentDisabled: g } = Ze.useConfig(), [y, w] = ht([]), v = Pc(s), [b, S] = ht(null), R = ne(() => {
10696
+ const { t: p, locale: h } = ke(), { componentDisabled: y } = Ze.useConfig(), [g, w] = ht([]), v = Pc(s), [b, S] = ht(null), R = ne(() => {
10697
10697
  const Q = new Set(s.map((ee) => ee.id));
10698
- return y.filter((ee) => Q.has(ee));
10699
- }, [s, y]), M = ne(() => new Map(s.map((Q, ee) => [Q.id, ee])), [s]), C = (Q) => !!(u && ln(Q)), L = (Q) => !!(u && Po(Q)), P = (Q) => {
10698
+ return g.filter((ee) => Q.has(ee));
10699
+ }, [s, g]), M = ne(() => new Map(s.map((Q, ee) => [Q.id, ee])), [s]), C = (Q) => !!(u && ln(Q)), L = (Q) => !!(u && Po(Q)), P = (Q) => {
10700
10700
  if (!Q || C(Q) || L(Q)) return !1;
10701
10701
  const ee = Zr(Q);
10702
10702
  return !!l?.[ee];
@@ -10704,7 +10704,7 @@ const Ak = [
10704
10704
  const ee = r.notYetIdentifiedCountryByMetal?.[Q];
10705
10705
  return typeof ee == "string" ? ee : r.notYetIdentifiedCountryDefault ?? "Unknown";
10706
10706
  }, K = W(() => {
10707
- if (g) return;
10707
+ if (y) return;
10708
10708
  const Q = {
10709
10709
  id: Nk(),
10710
10710
  metal: "",
@@ -10757,7 +10757,7 @@ const Ak = [
10757
10757
  const ce = G.slice();
10758
10758
  ce[_] = ee, a(ce);
10759
10759
  }), j = W(async (Q) => {
10760
- if (g || !d?.onPickSmelterForRow || b) return;
10760
+ if (y || !d?.onPickSmelterForRow || b) return;
10761
10761
  const ee = v.current, G = ee.find((ce) => ce.id === Q);
10762
10762
  if (!G || !G.metal) return;
10763
10763
  const _ = {
@@ -10804,7 +10804,7 @@ const Ak = [
10804
10804
  S(null);
10805
10805
  }
10806
10806
  }), V = W((Q) => {
10807
- if (g) return;
10807
+ if (y) return;
10808
10808
  const ee = M.get(Q);
10809
10809
  if (ee === void 0) return;
10810
10810
  const G = s.slice();
@@ -10858,7 +10858,7 @@ const Ak = [
10858
10858
  smelterState: ce.state
10859
10859
  } : _;
10860
10860
  }, re = W((Q, ee, G) => {
10861
- if (g) return;
10861
+ if (y) return;
10862
10862
  const _ = M.get(Q);
10863
10863
  if (_ === void 0) return;
10864
10864
  const ce = s[_];
@@ -10905,7 +10905,7 @@ const Ak = [
10905
10905
  Q.set(ee.id, () => oe(ee.id));
10906
10906
  }), Q;
10907
10907
  }, [s, oe]), ie = W(() => {
10908
- g || R.length !== 0 && Wt.confirm({
10908
+ y || R.length !== 0 && Wt.confirm({
10909
10909
  title: p("confirm.batchDelete"),
10910
10910
  content: p("confirm.batchDeleteContent", { count: R.length }),
10911
10911
  okText: p("actions.batchDelete"),
@@ -10917,11 +10917,11 @@ const Ak = [
10917
10917
  }
10918
10918
  });
10919
10919
  }), $ = W(() => {
10920
- g || w([]);
10920
+ y || w([]);
10921
10921
  }), x = {
10922
10922
  selectedRowKeys: R,
10923
10923
  onChange: (Q) => w(Q)
10924
- }, U = !g, H = ne(
10924
+ }, U = !y, H = ne(
10925
10925
  () => i.map((Q) => ({
10926
10926
  value: Q.key,
10927
10927
  label: Q.label ?? p(Q.labelKey)
@@ -10962,7 +10962,7 @@ const Ak = [
10962
10962
  className: "w-full"
10963
10963
  }
10964
10964
  ),
10965
- g
10965
+ y
10966
10966
  )
10967
10967
  }), r.hasLookup && Q.push({
10968
10968
  title: p("tables.smelterName"),
@@ -11035,7 +11035,7 @@ const Ak = [
11035
11035
  }
11036
11036
  )
11037
11037
  ] }),
11038
- g
11038
+ y
11039
11039
  )
11040
11040
  }), r.hasIdColumn && Q.push({
11041
11041
  title: p("tables.smelterNumber"),
@@ -11058,7 +11058,7 @@ const Ak = [
11058
11058
  onChange: X(`${_.id}:smelterNumber`),
11059
11059
  placeholder: p("placeholders.smelterNumberInput"),
11060
11060
  className: "font-mono text-xs",
11061
- disabled: st
11061
+ disabled: y || st
11062
11062
  }
11063
11063
  );
11064
11064
  }
@@ -11083,10 +11083,10 @@ const Ak = [
11083
11083
  value: G || void 0,
11084
11084
  onChange: X(`${_.id}:smelterName`),
11085
11085
  placeholder: kr,
11086
- disabled: st
11086
+ disabled: y || st
11087
11087
  }
11088
11088
  ),
11089
- g
11089
+ y
11090
11090
  );
11091
11091
  }
11092
11092
  }), Q.push(
@@ -11116,12 +11116,12 @@ const Ak = [
11116
11116
  showSearch: !0,
11117
11117
  filterOption: be,
11118
11118
  className: "w-full",
11119
- disabled: st
11119
+ disabled: y || st
11120
11120
  }
11121
11121
  ),
11122
11122
  pu && /* @__PURE__ */ f(le.Text, { type: "secondary", style: { fontSize: 12 }, children: p("hints.smelterNotYetIdentifiedCountry") })
11123
11123
  ] }),
11124
- g
11124
+ y
11125
11125
  );
11126
11126
  }
11127
11127
  },
@@ -11136,7 +11136,7 @@ const Ak = [
11136
11136
  value: G || void 0,
11137
11137
  onChange: X(`${_.id}:smelterIdentification`),
11138
11138
  placeholder: p("placeholders.smelterIdentification"),
11139
- disabled: wt({
11139
+ disabled: y || wt({
11140
11140
  useExternalLookup: k,
11141
11141
  row: _,
11142
11142
  fromLookup: P(_.smelterLookup),
@@ -11157,7 +11157,7 @@ const Ak = [
11157
11157
  value: G || void 0,
11158
11158
  onChange: X(`${_.id}:sourceId`),
11159
11159
  placeholder: p("placeholders.smelterSourceId"),
11160
- disabled: wt({
11160
+ disabled: y || wt({
11161
11161
  useExternalLookup: k,
11162
11162
  row: _,
11163
11163
  fromLookup: P(_.smelterLookup),
@@ -11178,7 +11178,7 @@ const Ak = [
11178
11178
  value: G || void 0,
11179
11179
  onChange: X(`${_.id}:smelterStreet`),
11180
11180
  placeholder: p("placeholders.smelterStreet"),
11181
- disabled: wt({
11181
+ disabled: y || wt({
11182
11182
  useExternalLookup: k,
11183
11183
  row: _,
11184
11184
  fromLookup: P(_.smelterLookup),
@@ -11199,7 +11199,7 @@ const Ak = [
11199
11199
  value: G || void 0,
11200
11200
  onChange: X(`${_.id}:smelterCity`),
11201
11201
  placeholder: p("placeholders.smelterCity"),
11202
- disabled: wt({
11202
+ disabled: y || wt({
11203
11203
  useExternalLookup: k,
11204
11204
  row: _,
11205
11205
  fromLookup: P(_.smelterLookup),
@@ -11220,7 +11220,7 @@ const Ak = [
11220
11220
  value: G || void 0,
11221
11221
  onChange: X(`${_.id}:smelterState`),
11222
11222
  placeholder: p("placeholders.smelterState"),
11223
- disabled: wt({
11223
+ disabled: y || wt({
11224
11224
  useExternalLookup: k,
11225
11225
  row: _,
11226
11226
  fromLookup: P(_.smelterLookup),
@@ -11381,7 +11381,7 @@ const Ak = [
11381
11381
  }), Q;
11382
11382
  }, [
11383
11383
  r,
11384
- g,
11384
+ y,
11385
11385
  c,
11386
11386
  re,
11387
11387
  j,
@@ -11618,15 +11618,15 @@ function Qk({
11618
11618
  }) {
11619
11619
  const [d, p] = ht(!1), h = W((v) => {
11620
11620
  p(v);
11621
- }), g = !!(t && t.length > 0), y = !!(e && e.length > 0 && !g), w = l ? {
11621
+ }), y = !!(t && t.length > 0), g = !!(e && e.length > 0 && !y), w = l ? {
11622
11622
  ...m ?? {},
11623
11623
  "--cm-content-max-width": `${l}px`
11624
11624
  } : m;
11625
11625
  return /* @__PURE__ */ Y(Bn, { className: `h-full min-h-full bg-gray-100 ${u ?? ""}`, style: w, children: [
11626
- g && /* @__PURE__ */ f(Kk, { steps: t, currentKey: s, onChange: a }),
11626
+ y && /* @__PURE__ */ f(Kk, { steps: t, currentKey: s, onChange: a }),
11627
11627
  n,
11628
11628
  /* @__PURE__ */ Y(Bn, { children: [
11629
- y && /* @__PURE__ */ f(
11629
+ g && /* @__PURE__ */ f(
11630
11630
  Fk,
11631
11631
  {
11632
11632
  tabs: e,
@@ -11757,18 +11757,18 @@ function Zk({
11757
11757
  renderPage: r,
11758
11758
  maxContentWidth: i
11759
11759
  }) {
11760
- const { componentDisabled: s } = Ze.useConfig(), { meta: a } = Qe(), { versionDef: c } = a, { t: l, locale: u, i18n: m } = ke(), { checkerErrors: d, checkerSummary: p } = jt(), h = !!(s || e), g = W((L) => {
11760
+ const { componentDisabled: s } = Ze.useConfig(), { meta: a } = Qe(), { versionDef: c } = a, { t: l, locale: u, i18n: m } = ke(), { checkerErrors: d, checkerSummary: p } = jt(), h = !!(s || e), y = W((L) => {
11761
11761
  o(L);
11762
- }), y = ne(() => {
11762
+ }), g = ne(() => {
11763
11763
  const L = $k(c);
11764
11764
  return e ? L.filter((P) => P.key !== "checker") : L;
11765
11765
  }, [c, e]), w = ne(() => {
11766
11766
  if (!(!e || n !== "checker"))
11767
- return y[0]?.key;
11768
- }, [e, n, y]), v = w ?? n;
11767
+ return g[0]?.key;
11768
+ }, [e, n, g]), v = w ?? n;
11769
11769
  on(() => {
11770
- w && w !== n && g(w);
11771
- }, [w, n, g]);
11770
+ w && w !== n && y(w);
11771
+ }, [w, n, y]);
11772
11772
  const b = (L) => {
11773
11773
  const { sections: P } = p;
11774
11774
  switch (L) {
@@ -11785,19 +11785,19 @@ function Zk({
11785
11785
  return;
11786
11786
  }
11787
11787
  }, S = ne(
11788
- () => y.map((L) => ({
11788
+ () => g.map((L) => ({
11789
11789
  key: L.key,
11790
11790
  label: l(L.labelKey),
11791
11791
  progress: b(L.key)
11792
11792
  })),
11793
- [y, l, u, m.isInitialized, p]
11793
+ [g, l, u, m.isInitialized, p]
11794
11794
  ), R = ne(
11795
- () => y.map((L) => L.key),
11796
- [y]
11795
+ () => g.map((L) => L.key),
11796
+ [g]
11797
11797
  ), M = W((L) => {
11798
- Yk(L, R) && g(L);
11798
+ Yk(L, R) && y(L);
11799
11799
  }), C = W(() => {
11800
- e || g("checker");
11800
+ e || y("checker");
11801
11801
  });
11802
11802
  return /* @__PURE__ */ Y(
11803
11803
  Qk,
@@ -11810,8 +11810,8 @@ function Zk({
11810
11810
  Gk,
11811
11811
  {
11812
11812
  currentPageKey: v,
11813
- onNavigatePage: g,
11814
- pageOrder: y
11813
+ onNavigatePage: y,
11814
+ pageOrder: g
11815
11815
  }
11816
11816
  ),
11817
11817
  children: [
@@ -11844,7 +11844,7 @@ function Vk({
11844
11844
  i ? i(w) : u(w), d(new URLSearchParams());
11845
11845
  },
11846
11846
  [i]
11847
- ), g = St(() => ({
11847
+ ), y = St(() => ({
11848
11848
  state: {
11849
11849
  pathname: Lo({ template: e, version: t, page: p }),
11850
11850
  params: {
@@ -11860,7 +11860,7 @@ function Vk({
11860
11860
  h(S), d(new URLSearchParams(v.search));
11861
11861
  }
11862
11862
  }
11863
- }), [p, m, e, t, h]), y = Yi(
11863
+ }), [p, m, e, t, h]), g = Yi(
11864
11864
  (w) => {
11865
11865
  switch (w) {
11866
11866
  case "revision":
@@ -11896,7 +11896,7 @@ function Vk({
11896
11896
  },
11897
11897
  [h]
11898
11898
  );
11899
- return /* @__PURE__ */ f(Du, { value: g, children: /* @__PURE__ */ f(
11899
+ return /* @__PURE__ */ f(Du, { value: y, children: /* @__PURE__ */ f(
11900
11900
  jk,
11901
11901
  {
11902
11902
  templateType: e,
@@ -11905,7 +11905,7 @@ function Vk({
11905
11905
  showPageActions: o,
11906
11906
  pageKey: p,
11907
11907
  onNavigatePage: h,
11908
- renderPage: y,
11908
+ renderPage: g,
11909
11909
  maxContentWidth: s,
11910
11910
  integrations: a,
11911
11911
  children: c
@@ -13732,10 +13732,10 @@ function zT(e, t, n, o) {
13732
13732
  if (v < 0) break;
13733
13733
  d[v] = w, h += 1;
13734
13734
  }
13735
- let g = e;
13735
+ let y = e;
13736
13736
  return i.forEach((w, v) => {
13737
13737
  const b = d[v] ?? "", S = b ? r.get(b) ?? so(b) : "";
13738
- g = xe(g, w, S);
13738
+ y = xe(y, w, S);
13739
13739
  }), [
13740
13740
  "D15",
13741
13741
  "E15",
@@ -13751,8 +13751,8 @@ function zT(e, t, n, o) {
13751
13751
  "I16"
13752
13752
  ].forEach((w, v) => {
13753
13753
  const b = d[v] === "other" ? p[v] ?? "" : "";
13754
- g = xe(g, w, b);
13755
- }), g;
13754
+ y = xe(y, w, b);
13755
+ }), y;
13756
13756
  }
13757
13757
  function FT(e, t, n, o) {
13758
13758
  if (t.templateType === "amrt") return e;
@@ -13764,14 +13764,14 @@ function FT(e, t, n, o) {
13764
13764
  const p = o.questionHeaderRowByNumber[String(m)];
13765
13765
  if (p)
13766
13766
  if (d.perMineral) {
13767
- const h = t.mineralScope.minerals, g = o.questionSpanByNumber[String(m)] ?? 0, y = Math.max(0, g);
13768
- h.slice(0, y).forEach((w, v) => {
13767
+ const h = t.mineralScope.minerals, y = o.questionSpanByNumber[String(m)] ?? 0, g = Math.max(0, y);
13768
+ h.slice(0, g).forEach((w, v) => {
13769
13769
  const b = p + 1 + v, S = r[d.key], R = i[d.key], M = S && typeof S == "object" ? S[w.key] ?? "" : "", C = R && typeof R == "object" ? R[w.key] ?? "" : "";
13770
13770
  M && (l = xe(l, Ae(a, b), M)), C && (l = xe(l, Ae(c, b), C));
13771
13771
  });
13772
13772
  } else {
13773
- const h = r[d.key], g = i[d.key], y = typeof h == "string" ? h : "", w = typeof g == "string" ? g : "";
13774
- y && (l = xe(l, Ae(a, p + 1), y)), w && (l = xe(l, Ae(c, p + 1), w));
13773
+ const h = r[d.key], y = i[d.key], g = typeof h == "string" ? h : "", w = typeof y == "string" ? y : "";
13774
+ g && (l = xe(l, Ae(a, p + 1), g)), w && (l = xe(l, Ae(c, p + 1), w));
13775
13775
  }
13776
13776
  }
13777
13777
  const u = new Map(t.companyQuestions.map((m) => [m.key, m]));
@@ -13788,9 +13788,9 @@ function FT(e, t, n, o) {
13788
13788
  });
13789
13789
  continue;
13790
13790
  }
13791
- const h = s[m], g = typeof h == "string" ? h : "";
13792
- g && (l = xe(l, Ae(a, d), g));
13793
- const y = `${m}_comment`, w = s[y], v = typeof w == "string" ? w : "";
13791
+ const h = s[m], y = typeof h == "string" ? h : "";
13792
+ y && (l = xe(l, Ae(a, d), y));
13793
+ const g = `${m}_comment`, w = s[g], v = typeof w == "string" ? w : "";
13794
13794
  v && (l = xe(l, Ae(c, d), v));
13795
13795
  }
13796
13796
  return l;
@@ -13808,7 +13808,7 @@ function KT(e, t, n, o, r) {
13808
13808
  ].filter((b) => b.label.trim()).sort((b, S) => {
13809
13809
  const R = b.label.trim(), M = S.label.trim(), C = R.localeCompare(M);
13810
13810
  return C !== 0 ? C : b.key.localeCompare(S.key);
13811
- }).slice(0, 10), g = (b, S, R, M, C, L) => {
13811
+ }).slice(0, 10), y = (b, S, R, M, C, L) => {
13812
13812
  let P = b;
13813
13813
  const N = Math.min(h.length, Math.max(0, M - R + 1));
13814
13814
  for (let E = 0; E < N; E += 1) {
@@ -13820,10 +13820,10 @@ function KT(e, t, n, o, r) {
13820
13820
  }
13821
13821
  return P;
13822
13822
  };
13823
- let y = e;
13824
- y = g(y, "Q1", a + 1, c - 1, "D", "G");
13823
+ let g = e;
13824
+ g = y(g, "Q1", a + 1, c - 1, "D", "G");
13825
13825
  const w = r.amrtQ3Row, v = w ? w - 1 : c + 10;
13826
- return y = g(y, "Q2", c + 1, v, "D", "G"), y;
13826
+ return g = y(g, "Q2", c + 1, v, "D", "G"), g;
13827
13827
  }
13828
13828
  function Pn(e, t, n, o) {
13829
13829
  return n ? NT(e, t) ? o ? MT(e, t, n) : e : xe(e, t, n) : e;
@@ -13853,15 +13853,15 @@ function BT(e, t, n, o) {
13853
13853
  ["recycledScrap", "P"],
13854
13854
  ["comments", "Q"]
13855
13855
  ];
13856
- for (const [g, y] of h) {
13857
- const w = i[g]?.trim();
13858
- w && (r = Pn(r, Ae(y, a), w, m));
13856
+ for (const [y, g] of h) {
13857
+ const w = i[y]?.trim();
13858
+ w && (r = Pn(r, Ae(g, a), w, m));
13859
13859
  }
13860
13860
  if (t.smelterList.hasCombinedColumn) {
13861
- const g = i.combinedMetal?.trim();
13862
- g && (r = Pn(r, Ae("R", a), o(g), m));
13863
- const y = i.combinedSmelter?.trim();
13864
- y && (r = Pn(r, Ae("S", a), y, m));
13861
+ const y = i.combinedMetal?.trim();
13862
+ y && (r = Pn(r, Ae("R", a), o(y), m));
13863
+ const g = i.combinedSmelter?.trim();
13864
+ g && (r = Pn(r, Ae("S", a), g, m));
13865
13865
  }
13866
13866
  }), r;
13867
13867
  }
@@ -14067,10 +14067,10 @@ function t_({
14067
14067
  i,
14068
14068
  () => ({
14069
14069
  getSnapshot: () => h,
14070
- setSnapshot: (g) => {
14071
- if (g.templateType !== e || g.versionId !== t)
14070
+ setSnapshot: (y) => {
14071
+ if (y.templateType !== e || y.versionId !== t)
14072
14072
  throw new Error("snapshot does not match templateType/versionId");
14073
- l(g.data);
14073
+ l(y.data);
14074
14074
  },
14075
14075
  saveDraft: () => h,
14076
14076
  submit: () => su({
@@ -14081,7 +14081,7 @@ function t_({
14081
14081
  navigation: m
14082
14082
  }),
14083
14083
  exportJson: () => iu(h),
14084
- exportExcel: async (g) => ru({ ...g, snapshot: h }),
14084
+ exportExcel: async (y) => ru({ ...y, snapshot: h }),
14085
14085
  validate: () => u()
14086
14086
  }),
14087
14087
  [m, l, h, e, u, t]
@@ -14465,8 +14465,8 @@ function S_(e, t, n, o) {
14465
14465
  t.customMinerals ?? []
14466
14466
  ), l = new Set(c), u = /* @__PURE__ */ new Map();
14467
14467
  for (const [p, h] of n.mineralLabelByKey.entries()) {
14468
- const g = et(h);
14469
- !g || u.has(g) || u.set(g, p);
14468
+ const y = et(h);
14469
+ !y || u.has(y) || u.set(y, p);
14470
14470
  }
14471
14471
  const m = (p) => {
14472
14472
  const h = zi(p);
@@ -14474,15 +14474,15 @@ function S_(e, t, n, o) {
14474
14474
  const w = t.customMinerals?.[h]?.trim();
14475
14475
  if (w) return w;
14476
14476
  }
14477
- const g = n.mineralLabelByKey.get(p);
14478
- if (g) return g;
14479
- const y = r.preferredMineralLabelByKey.get(p);
14480
- return y || p;
14477
+ const y = n.mineralLabelByKey.get(p);
14478
+ if (y) return y;
14479
+ const g = r.preferredMineralLabelByKey.get(p);
14480
+ return g || p;
14481
14481
  }, d = () => (e.cmtRangeQuestions || (e.cmtRangeQuestions = []), e.cmtRangeQuestions);
14482
14482
  for (const [p, h] of r.questionKeyByType.entries()) {
14483
- const g = a.get(h);
14484
- if (!g) continue;
14485
- if (g.perMineral) {
14483
+ const y = a.get(h);
14484
+ if (!y) continue;
14485
+ if (y.perMineral) {
14486
14486
  for (const N of c) {
14487
14487
  const E = m(N), K = n.mineralLabelByKey.get(N) ?? E, z = `${p}|${K}`, I = n.rangeQuestionIndexByKey.get(z), k = Zo(t.questions, h, N), q = Zo(t.questionComments, h, N);
14488
14488
  if (I === void 0) {
@@ -14495,7 +14495,7 @@ function S_(e, t, n, o) {
14495
14495
  }
14496
14496
  continue;
14497
14497
  }
14498
- const y = Array.from(n.rangeQuestionIndexByKey.entries()).find(([N]) => N.startsWith(`${p}|`)), w = y ? y[1] : void 0, v = mn(t.questions[h]), b = mn(t.questionComments[h]);
14498
+ const g = Array.from(n.rangeQuestionIndexByKey.entries()).find(([N]) => N.startsWith(`${p}|`)), w = g ? g[1] : void 0, v = mn(t.questions[h]), b = mn(t.questionComments[h]);
14499
14499
  if (w === void 0) {
14500
14500
  if (we(v) && we(b)) continue;
14501
14501
  const N = d(), E = o.mineralScope.minerals[0]?.key ?? "", K = E ? n.mineralLabelByKey.get(E) ?? r.preferredMineralLabelByKey.get(E) ?? E : "";
@@ -14507,8 +14507,8 @@ function S_(e, t, n, o) {
14507
14507
  }
14508
14508
  if (!s && e.cmtRangeQuestions && e.cmtRangeQuestions.length === 0 && delete e.cmtRangeQuestions, e.cmtRangeQuestions) {
14509
14509
  const p = e.cmtRangeQuestions.filter((h) => {
14510
- const g = typeof h.type == "number" ? h.type : Number(h.type), y = Number.isFinite(g) ? r.questionKeyByType.get(g) : void 0;
14511
- if (!y || !a.get(y)?.perMineral) return !0;
14510
+ const y = typeof h.type == "number" ? h.type : Number(h.type), g = Number.isFinite(y) ? r.questionKeyByType.get(y) : void 0;
14511
+ if (!g || !a.get(g)?.perMineral) return !0;
14512
14512
  const v = typeof h.question == "string" ? h.question : String(h.question ?? ""), b = et(v), S = r.mineralKeyByLabel.get(b) ?? u.get(b);
14513
14513
  return S ? l.has(S) : !0;
14514
14514
  });
@@ -14528,13 +14528,13 @@ function C_(e, t, n, o) {
14528
14528
  const u = (d) => {
14529
14529
  const p = zi(d);
14530
14530
  if (p !== null) {
14531
- const y = t.customMinerals?.[p]?.trim();
14532
- if (y) return y;
14531
+ const g = t.customMinerals?.[p]?.trim();
14532
+ if (g) return g;
14533
14533
  }
14534
14534
  const h = n.mineralLabelByKey.get(d);
14535
14535
  if (h) return h;
14536
- const g = r.preferredMineralLabelByKey.get(d);
14537
- return g || d;
14536
+ const y = r.preferredMineralLabelByKey.get(d);
14537
+ return y || d;
14538
14538
  }, m = () => (e.cmtCompanyQuestions || (e.cmtCompanyQuestions = []), e.cmtCompanyQuestions);
14539
14539
  for (const d of o.companyQuestions) {
14540
14540
  if (d.perMineral) {
@@ -14550,20 +14550,20 @@ function C_(e, t, n, o) {
14550
14550
  }
14551
14551
  continue;
14552
14552
  }
14553
- const p = `${d.key}|`, h = n.companyQuestionIndexByKey.get(p), g = mn(t.companyQuestions[d.key]), y = mn(t.companyQuestions[`${d.key}_comment`]);
14553
+ const p = `${d.key}|`, h = n.companyQuestionIndexByKey.get(p), y = mn(t.companyQuestions[d.key]), g = mn(t.companyQuestions[`${d.key}_comment`]);
14554
14554
  if (h === void 0) {
14555
- if (we(g) && we(y)) continue;
14556
- m().push({ question: d.key, type: null, answer: g, remark: y });
14555
+ if (we(y) && we(g)) continue;
14556
+ m().push({ question: d.key, type: null, answer: y, remark: g });
14557
14557
  continue;
14558
14558
  }
14559
- const w = i[h], v = n.companyQuestionFieldStatesByIndex.get(h), b = v?.answer ?? { exists: !0, wasNull: !1 }, S = v?.remark ?? { exists: !0, wasNull: !1 }, R = lt(b, g), M = lt(S, y);
14559
+ const w = i[h], v = n.companyQuestionFieldStatesByIndex.get(h), b = v?.answer ?? { exists: !0, wasNull: !1 }, S = v?.remark ?? { exists: !0, wasNull: !1 }, R = lt(b, y), M = lt(S, g);
14560
14560
  R !== void 0 && (w.answer = R), M !== void 0 && (w.remark = M), w.question = d.key, "type" in w && (w.type = null);
14561
14561
  }
14562
14562
  if (!s && e.cmtCompanyQuestions && e.cmtCompanyQuestions.length === 0 && delete e.cmtCompanyQuestions, e.cmtCompanyQuestions) {
14563
14563
  const d = e.cmtCompanyQuestions.filter((p) => {
14564
14564
  const h = typeof p.question == "string" ? p.question : String(p.question ?? "");
14565
14565
  if (!o.companyQuestions.find((b) => b.key === h)?.perMineral) return !0;
14566
- const y = typeof p.type == "string" ? p.type : p.type == null ? "" : String(p.type), w = et(y), v = r.mineralKeyByLabel.get(w) ?? l.get(w);
14566
+ const g = typeof p.type == "string" ? p.type : p.type == null ? "" : String(p.type), w = et(g), v = r.mineralKeyByLabel.get(w) ?? l.get(w);
14567
14567
  return v ? c.has(v) : !0;
14568
14568
  });
14569
14569
  e.cmtCompanyQuestions = d, !s && d.length === 0 && delete e.cmtCompanyQuestions;
@@ -14574,7 +14574,7 @@ function k_(e, t, n, o) {
14574
14574
  for (const s of t.smelterList ?? []) {
14575
14575
  const a = n.smelterLegacyIndexByInternalId.get(s.id);
14576
14576
  if (a !== void 0) {
14577
- const d = yn(r[a] ?? {}), p = n.smelterFieldStatesByIndex.get(a) ?? /* @__PURE__ */ new Map(), h = (q, F) => Cr(d, p, q, F), g = r[a] ?? {}, y = Ht(g.smelterLookUp), w = Ht(g.smelterName), v = Ht(g.standardSmelterName), b = y || w || v, S = v || w, R = Ht(g.smelterNumber), M = Ht(g.smelterId), C = Ht(g.smelterIdentification), L = R || M, P = R || M, N = C, E = cu(g.isRecycle);
14577
+ const d = yn(r[a] ?? {}), p = n.smelterFieldStatesByIndex.get(a) ?? /* @__PURE__ */ new Map(), h = (q, F) => Cr(d, p, q, F), y = r[a] ?? {}, g = Ht(y.smelterLookUp), w = Ht(y.smelterName), v = Ht(y.standardSmelterName), b = g || w || v, S = v || w, R = Ht(y.smelterNumber), M = Ht(y.smelterId), C = Ht(y.smelterIdentification), L = R || M, P = R || M, N = C, E = cu(y.isRecycle);
14578
14578
  if (h("metal", dn(o, n, s.metal, t.customMinerals ?? [])), (s.smelterLookup ?? "") !== b && h("smelterLookUp", s.smelterLookup), (s.smelterName ?? "") !== S)
14579
14579
  if (v)
14580
14580
  h("standardSmelterName", s.smelterName);
@@ -14618,12 +14618,12 @@ function __(e, t, n) {
14618
14618
  for (const a of t.productList ?? []) {
14619
14619
  const c = n.productLegacyIndexByInternalId.get(a.id);
14620
14620
  if (c !== void 0) {
14621
- const y = yn(o[c] ?? {}), w = n.productFieldStatesByIndex.get(c) ?? /* @__PURE__ */ new Map(), v = n.productLegacyKeyByInternalKeyByIndex.get(c) ?? null, b = (S, R) => Cr(y, w, S, R);
14622
- b(s(v, "productNumber", "productNumber"), a.productNumber), b(s(v, "productName", "productName"), a.productName), b(s(v, "requesterNumber", "requesterNumber"), a.requesterNumber ?? ""), b(s(v, "requesterName", "requesterName"), a.requesterName ?? ""), b(s(v, "comments", "comments"), a.comments ?? ""), r.push(y);
14621
+ const g = yn(o[c] ?? {}), w = n.productFieldStatesByIndex.get(c) ?? /* @__PURE__ */ new Map(), v = n.productLegacyKeyByInternalKeyByIndex.get(c) ?? null, b = (S, R) => Cr(g, w, S, R);
14622
+ b(s(v, "productNumber", "productNumber"), a.productNumber), b(s(v, "productName", "productName"), a.productName), b(s(v, "requesterNumber", "requesterNumber"), a.requesterNumber ?? ""), b(s(v, "requesterName", "requesterName"), a.requesterName ?? ""), b(s(v, "comments", "comments"), a.comments ?? ""), r.push(g);
14623
14623
  continue;
14624
14624
  }
14625
- const l = { id: a.id }, u = i, m = s(u, "productNumber", "productNumber"), d = s(u, "productName", "productName"), p = s(u, "requesterNumber", "requesterNumber"), h = s(u, "requesterName", "requesterName"), g = s(u, "comments", "comments");
14626
- we(a.productNumber) || (l[m] = a.productNumber), we(a.productName) || (l[d] = a.productName), we(a.requesterNumber) || (l[p] = a.requesterNumber), we(a.requesterName) || (l[h] = a.requesterName), we(a.comments) || (l[g] = a.comments), r.push(l);
14625
+ const l = { id: a.id }, u = i, m = s(u, "productNumber", "productNumber"), d = s(u, "productName", "productName"), p = s(u, "requesterNumber", "requesterNumber"), h = s(u, "requesterName", "requesterName"), y = s(u, "comments", "comments");
14626
+ we(a.productNumber) || (l[m] = a.productNumber), we(a.productName) || (l[d] = a.productName), we(a.requesterNumber) || (l[p] = a.requesterNumber), we(a.requesterName) || (l[h] = a.requesterName), we(a.comments) || (l[y] = a.comments), r.push(l);
14627
14627
  }
14628
14628
  (e.cmtParts || r.length > 0) && (e.cmtParts = r);
14629
14629
  }
@@ -14706,15 +14706,15 @@ function du(e) {
14706
14706
  const U = a ? a[x] : void 0;
14707
14707
  d.companyInfo[$.key] = R_(U);
14708
14708
  }
14709
- const p = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map(), g = ($) => {
14709
+ const p = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map(), y = ($) => {
14710
14710
  const x = typeof $ == "string" ? $ : $ == null ? "" : String($);
14711
14711
  if (!x) return "";
14712
14712
  const U = et(x), H = n.mineralKeyByLabel.get(U) ?? h.get(U);
14713
14713
  return H && !p.has(H) && p.set(H, x), H ?? x;
14714
- }, y = r.cmtRangeQuestions ?? [];
14714
+ }, g = r.cmtRangeQuestions ?? [];
14715
14715
  if (o.mineralScope.mode !== "fixed") {
14716
14716
  const $ = o.mineralScope.mode, x = [];
14717
- for (const H of y) {
14717
+ for (const H of g) {
14718
14718
  if (!H || H.type !== 1) continue;
14719
14719
  const ae = typeof H.question == "string" ? H.question.trim() : "";
14720
14720
  ae && x.push(ae);
@@ -14745,8 +14745,8 @@ function du(e) {
14745
14745
  }
14746
14746
  }
14747
14747
  const w = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Map(), b = new Map(o.questions.map(($) => [$.key, $]));
14748
- for (let $ = 0; $ < y.length; $++) {
14749
- const x = y[$], U = n.questionKeyByType.get(x.type);
14748
+ for (let $ = 0; $ < g.length; $++) {
14749
+ const x = g[$], U = n.questionKeyByType.get(x.type);
14750
14750
  if (!U) continue;
14751
14751
  const H = b.get(U);
14752
14752
  if (!H) continue;
@@ -14795,7 +14795,7 @@ function du(e) {
14795
14795
  for (const _ of ["smelterName", "smelterLookUp", "smelterCountry", "smelterId", "remark", "isRecycle", "mineName", "mineCountry", "suggest"])
14796
14796
  H.set(_, at(x, _));
14797
14797
  P.set($, H);
14798
- const ae = g(x.metal), ue = x.smelterLookUp ?? "", me = x.smelterName ?? "", be = x.standardSmelterName ?? "", ye = ue || me || be, Ue = be || me;
14798
+ const ae = y(x.metal), ue = x.smelterLookUp ?? "", me = x.smelterName ?? "", be = x.standardSmelterName ?? "", ye = ue || me || be, Ue = be || me;
14799
14799
  x.smelterName === null && N.set($, be);
14800
14800
  const Ge = x.smelterCountry ?? "", Q = x.smelterNumber ?? "", ee = x.smelterId ?? "", G = x.smelterIdentification ?? "";
14801
14801
  K.push({
@@ -14830,7 +14830,7 @@ function du(e) {
14830
14830
  H.set(ae, at(x, ae));
14831
14831
  I.set($, H), q.push({
14832
14832
  id: U,
14833
- metal: g(x.metal),
14833
+ metal: y(x.metal),
14834
14834
  smelterName: x.smelterName ?? "",
14835
14835
  mineName: x.mineFacilityName ?? "",
14836
14836
  mineCountry: x.mineFacilityCountry ?? "",
@@ -14886,7 +14886,7 @@ function du(e) {
14886
14886
  const H = /* @__PURE__ */ new Map();
14887
14887
  for (const ae of ["metal", "reason"])
14888
14888
  H.set(ae, at(x, ae));
14889
- re.set($, H), B.push({ id: U, mineral: g(x.metal), reason: x.reason ?? "" });
14889
+ re.set($, H), B.push({ id: U, mineral: y(x.metal), reason: x.reason ?? "" });
14890
14890
  }
14891
14891
  d.mineralsScope = B;
14892
14892
  const se = {