mlform 0.1.18 → 0.1.20

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.
Files changed (112) hide show
  1. package/README.md +2 -2
  2. package/dist/{builtins-STiTwaH9.js → builtins-CUN_bP93.js} +8 -10
  3. package/dist/mlform/builtins.mjs +1 -1
  4. package/dist/mlform/kit.mjs +15 -15
  5. package/dist/mlform/primitives.mjs +1 -1
  6. package/dist/mlform/runtime.mjs +3 -3
  7. package/dist/mlform/schema.mjs +2 -2
  8. package/dist/mlform/transport.mjs +2 -2
  9. package/dist/{primitives-BcXt2QWI.js → primitives-CgFaSmAm.js} +320 -306
  10. package/dist/{runtime-Eo_q4pgg.js → runtime-zS0p2589.js} +369 -637
  11. package/dist/schema-CYsf2AFP.js +303 -0
  12. package/dist/transport-KUB3zfW9.js +65 -0
  13. package/dist/types/src/kit/constants.d.ts +0 -1
  14. package/dist/types/src/kit/index.d.ts +1 -1
  15. package/dist/types/src/kit/kinds/define-report-kind.d.ts +8 -4
  16. package/dist/types/src/kit/kinds/index.d.ts +1 -1
  17. package/dist/types/src/primitives/components/form-root-state.d.ts +0 -4
  18. package/dist/types/src/primitives/components/mounted-report.d.ts +15 -0
  19. package/dist/types/src/primitives/components/submit-button.d.ts +0 -4
  20. package/dist/types/src/primitives/constants.d.ts +1 -0
  21. package/dist/types/src/primitives/controller-types.d.ts +1 -7
  22. package/dist/types/src/runtime/errors.d.ts +0 -1
  23. package/dist/types/src/runtime/index.d.ts +1 -2
  24. package/dist/types/src/runtime/reports/controller.d.ts +1 -2
  25. package/dist/types/src/runtime/state/engine.d.ts +1 -5
  26. package/dist/types/src/runtime/submission/create-submitter.d.ts +1 -1
  27. package/dist/types/src/runtime/submission/index.d.ts +1 -0
  28. package/dist/types/src/runtime/submission/reports.d.ts +1 -2
  29. package/dist/types/src/runtime/submission/request.d.ts +2 -14
  30. package/dist/types/src/runtime/submission/transport-response.d.ts +2 -0
  31. package/dist/types/src/runtime/submission/types.d.ts +2 -23
  32. package/dist/types/src/runtime/types/behavior.d.ts +1 -3
  33. package/dist/types/src/runtime/types/form.d.ts +1 -14
  34. package/dist/types/src/runtime/types/report.d.ts +1 -1
  35. package/dist/types/src/runtime/types/transport.d.ts +5 -4
  36. package/dist/types/src/schema/index.d.ts +1 -0
  37. package/dist/types/src/schema/mapped-to.d.ts +8 -1
  38. package/dist/types/src/schema/types/report.d.ts +1 -3
  39. package/dist/types/src/schema/types/submit.d.ts +24 -3
  40. package/dist/types/src/schema/validation.d.ts +25 -0
  41. package/dist/types/src/transport/errors.d.ts +1 -28
  42. package/dist/types/src/transport/fanout.d.ts +17 -0
  43. package/dist/types/src/transport/index.d.ts +4 -10
  44. package/dist/types/src/transport/request-runner.d.ts +3 -2
  45. package/dist/types/src/transport/types.d.ts +22 -0
  46. package/package.json +2 -2
  47. package/dist/schema-CNKKJZRx.js +0 -173
  48. package/dist/transport-Cloa_erk.js +0 -2154
  49. package/dist/types/src/runtime/submission/field-updates.d.ts +0 -14
  50. package/dist/types/src/runtime/submission/pending-patches.d.ts +0 -2
  51. package/dist/types/src/runtime/submission/report-updates.d.ts +0 -16
  52. package/dist/types/src/runtime/submission/stream-events.d.ts +0 -13
  53. package/dist/types/src/runtime/submission/stream-progress.d.ts +0 -4
  54. package/dist/types/src/transport/capabilities.d.ts +0 -7
  55. package/dist/types/src/transport/clone.d.ts +0 -6
  56. package/dist/types/src/transport/composition/fallback.d.ts +0 -2
  57. package/dist/types/src/transport/composition/fanout-helpers.d.ts +0 -2
  58. package/dist/types/src/transport/composition/fanout-options.d.ts +0 -9
  59. package/dist/types/src/transport/composition/fanout.d.ts +0 -2
  60. package/dist/types/src/transport/composition/hedged.d.ts +0 -2
  61. package/dist/types/src/transport/composition/index.d.ts +0 -8
  62. package/dist/types/src/transport/composition/load-balancing.d.ts +0 -2
  63. package/dist/types/src/transport/composition/pipeline.d.ts +0 -2
  64. package/dist/types/src/transport/composition/quorum-fanout.d.ts +0 -2
  65. package/dist/types/src/transport/composition/racing.d.ts +0 -2
  66. package/dist/types/src/transport/composition/routing.d.ts +0 -3
  67. package/dist/types/src/transport/constants.d.ts +0 -34
  68. package/dist/types/src/transport/internal-core.d.ts +0 -21
  69. package/dist/types/src/transport/internal-errors.d.ts +0 -21
  70. package/dist/types/src/transport/internal-request.d.ts +0 -21
  71. package/dist/types/src/transport/internal-routing.d.ts +0 -25
  72. package/dist/types/src/transport/internal-sse.d.ts +0 -14
  73. package/dist/types/src/transport/internal-stream.d.ts +0 -13
  74. package/dist/types/src/transport/internal.d.ts +0 -6
  75. package/dist/types/src/transport/middleware/auth.d.ts +0 -2
  76. package/dist/types/src/transport/middleware/cache.d.ts +0 -2
  77. package/dist/types/src/transport/middleware/circuit-breaker.d.ts +0 -2
  78. package/dist/types/src/transport/middleware/dedup.d.ts +0 -2
  79. package/dist/types/src/transport/middleware/index.d.ts +0 -12
  80. package/dist/types/src/transport/middleware/logging.d.ts +0 -2
  81. package/dist/types/src/transport/middleware/metrics.d.ts +0 -2
  82. package/dist/types/src/transport/middleware/pipe.d.ts +0 -2
  83. package/dist/types/src/transport/middleware/rate-limit.d.ts +0 -2
  84. package/dist/types/src/transport/middleware/retry.d.ts +0 -2
  85. package/dist/types/src/transport/middleware/timeout.d.ts +0 -2
  86. package/dist/types/src/transport/middleware/tracing.d.ts +0 -2
  87. package/dist/types/src/transport/middleware/transform.d.ts +0 -3
  88. package/dist/types/src/transport/policy-context.d.ts +0 -3
  89. package/dist/types/src/transport/protocols/graphql.d.ts +0 -2
  90. package/dist/types/src/transport/protocols/grpc.d.ts +0 -5
  91. package/dist/types/src/transport/protocols/index.d.ts +0 -5
  92. package/dist/types/src/transport/protocols/json.d.ts +0 -2
  93. package/dist/types/src/transport/protocols/sse.d.ts +0 -2
  94. package/dist/types/src/transport/protocols/websocket.d.ts +0 -2
  95. package/dist/types/src/transport/runtime.d.ts +0 -4
  96. package/dist/types/src/transport/state/cache-store.d.ts +0 -2
  97. package/dist/types/src/transport/state/circuit-breaker.d.ts +0 -2
  98. package/dist/types/src/transport/state/health.d.ts +0 -2
  99. package/dist/types/src/transport/state/index.d.ts +0 -5
  100. package/dist/types/src/transport/state/rate-limiter.d.ts +0 -2
  101. package/dist/types/src/transport/state/session.d.ts +0 -2
  102. package/dist/types/src/transport/types/capabilities.d.ts +0 -35
  103. package/dist/types/src/transport/types/core.d.ts +0 -74
  104. package/dist/types/src/transport/types/events.d.ts +0 -50
  105. package/dist/types/src/transport/types/index.d.ts +0 -7
  106. package/dist/types/src/transport/types/middleware.d.ts +0 -3
  107. package/dist/types/src/transport/types/options-http.d.ts +0 -85
  108. package/dist/types/src/transport/types/options-middleware.d.ts +0 -96
  109. package/dist/types/src/transport/types/options-routing.d.ts +0 -82
  110. package/dist/types/src/transport/types/options.d.ts +0 -3
  111. package/dist/types/src/transport/types/session.d.ts +0 -48
  112. package/dist/types/src/transport/types/state.d.ts +0 -46
@@ -1,10 +1,10 @@
1
1
  import { LitElement as e, css as t, html as n, nothing as r } from "lit";
2
- import { customElement as i, property as a, state as o } from "lit/decorators.js";
3
- import { repeat as s } from "lit/directives/repeat.js";
4
- import { html as c, unsafeStatic as l } from "lit/static-html.js";
5
- import { ifDefined as u } from "lit/directives/if-defined.js";
2
+ import { customElement as i, property as a, query as o, state as s } from "lit/decorators.js";
3
+ import { repeat as c } from "lit/directives/repeat.js";
4
+ import { html as l, unsafeStatic as u } from "lit/static-html.js";
5
+ import { ifDefined as d } from "lit/directives/if-defined.js";
6
6
  //#region src/primitives/constants.ts
7
- var d = {
7
+ var f = {
8
8
  form: "mlf-form",
9
9
  formErrors: "mlf-form-errors",
10
10
  submitButton: "mlf-submit-button",
@@ -13,6 +13,7 @@ var d = {
13
13
  reportFrame: "mlf-report-frame",
14
14
  declarativeField: "mlf-declarative-field",
15
15
  declarativeReport: "mlf-declarative-report",
16
+ mountedReport: "mlf-mounted-report",
16
17
  textField: "mlf-text-field",
17
18
  numberField: "mlf-number-field",
18
19
  booleanField: "mlf-boolean-field",
@@ -25,19 +26,19 @@ var d = {
25
26
  singleChoiceField: "mlf-single-choice-field",
26
27
  multiChoiceField: "mlf-multi-choice-field",
27
28
  ratingField: "mlf-rating-field"
28
- }, f = {
29
+ }, p = {
29
30
  submitRequest: "mlf-submit-request",
30
31
  submitStart: "mlf-submit-start",
31
32
  submitSuccess: "mlf-submit-success",
32
33
  submitAbort: "mlf-submit-abort",
33
34
  submitError: "mlf-submit-error"
34
- }, p = {
35
+ }, m = {
35
36
  form: "Inputs",
36
37
  reports: "Reports",
37
38
  submit: "Submit",
38
39
  validating: "Validating...",
39
40
  submitting: "Submitting..."
40
- }, m = Object.freeze({
41
+ }, h = Object.freeze({
41
42
  formEyebrow: "Form",
42
43
  reportEyebrow: "Report",
43
44
  formErrorsTitle: "Form errors",
@@ -89,15 +90,16 @@ var d = {
89
90
  case "idle": return "Idle";
90
91
  case "loading": return "Loading";
91
92
  case "ready": return "Ready";
93
+ case "skipped": return "Skipped";
92
94
  case "error": return "Error";
93
95
  }
94
96
  },
95
97
  reportsEmptyTitle: "Results",
96
98
  reportsEmptyBody: "Reports will appear here after the form is submitted."
97
- }), h = (e) => e ? Object.freeze({
98
- ...m,
99
+ }), g = (e) => e ? Object.freeze({
100
+ ...h,
99
101
  ...e
100
- }) : m, g = {
102
+ }) : h, _ = {
101
103
  booleanGroup: "mlf-boolean",
102
104
  fieldDescription: "mlf-field-description",
103
105
  fieldErrors: "mlf-field-errors",
@@ -105,8 +107,8 @@ var d = {
105
107
  reportRegion: "mlf-report-region"
106
108
  };
107
109
  //#endregion
108
- //#region \0@oxc-project+runtime@0.133.0/helpers/esm/decorate.js
109
- function _(e, t, n, r) {
110
+ //#region \0@oxc-project+runtime@0.135.0/helpers/esm/decorate.js
111
+ function v(e, t, n, r) {
110
112
  var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
111
113
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
112
114
  else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
@@ -114,7 +116,7 @@ function _(e, t, n, r) {
114
116
  }
115
117
  //#endregion
116
118
  //#region src/primitives/base-field-element.ts
117
- var v = class extends e {
119
+ var y = class extends e {
118
120
  static styles = t`
119
121
  :host {
120
122
  display: block;
@@ -201,7 +203,7 @@ var v = class extends e {
201
203
  set context(e) {
202
204
  this.#n = e;
203
205
  }
204
- #r = m;
206
+ #r = h;
205
207
  get text() {
206
208
  return this.#r;
207
209
  }
@@ -240,10 +242,10 @@ var v = class extends e {
240
242
  };
241
243
  }
242
244
  };
243
- _([a({ attribute: !1 })], v.prototype, "controller", null), _([a({ attribute: !1 })], v.prototype, "descriptor", null), _([a({ attribute: !1 })], v.prototype, "context", null), _([a({ attribute: !1 })], v.prototype, "text", null);
245
+ v([a({ attribute: !1 })], y.prototype, "controller", null), v([a({ attribute: !1 })], y.prototype, "descriptor", null), v([a({ attribute: !1 })], y.prototype, "context", null), v([a({ attribute: !1 })], y.prototype, "text", null);
244
246
  //#endregion
245
247
  //#region src/primitives/base-report-element.ts
246
- var y = class extends e {
248
+ var b = class extends e {
247
249
  static styles = t`
248
250
  :host {
249
251
  display: block;
@@ -281,7 +283,7 @@ var y = class extends e {
281
283
  set context(e) {
282
284
  this.#n = e;
283
285
  }
284
- #r = m;
286
+ #r = h;
285
287
  get text() {
286
288
  return this.#r;
287
289
  }
@@ -309,7 +311,7 @@ var y = class extends e {
309
311
  return this.context;
310
312
  }
311
313
  };
312
- _([a({ attribute: !1 })], y.prototype, "controller", null), _([a({ attribute: !1 })], y.prototype, "descriptor", null), _([a({ attribute: !1 })], y.prototype, "context", null), _([a({ attribute: !1 })], y.prototype, "text", null), _([a({ attribute: !1 })], y.prototype, "transport", null), _([a({ attribute: !1 })], y.prototype, "request", null);
314
+ v([a({ attribute: !1 })], b.prototype, "controller", null), v([a({ attribute: !1 })], b.prototype, "descriptor", null), v([a({ attribute: !1 })], b.prototype, "context", null), v([a({ attribute: !1 })], b.prototype, "text", null), v([a({ attribute: !1 })], b.prototype, "transport", null), v([a({ attribute: !1 })], b.prototype, "request", null);
313
315
  //#endregion
314
316
  //#region src/primitives/request-runner.ts
315
317
  var ee = (e) => e instanceof Error ? e.message : String(e), te = () => {
@@ -344,8 +346,8 @@ var ee = (e) => e instanceof Error ? e.message : String(e), te = () => {
344
346
  } catch {
345
347
  return String(e);
346
348
  }
347
- }, b = class extends y {
348
- static styles = [y.styles, t`
349
+ }, x = class extends b {
350
+ static styles = [b.styles, t`
349
351
  .transport-divider {
350
352
  border: none;
351
353
  border-top: var(--mlf-border-width, 1px) solid
@@ -518,25 +520,25 @@ ${ne(this.transportResult)}</pre
518
520
  }
519
521
  }
520
522
  };
521
- _([o()], b.prototype, "transportStatus", null), _([o()], b.prototype, "transportResultValue", null), _([o()], b.prototype, "transportErrorValue", null);
523
+ v([s()], x.prototype, "transportStatus", null), v([s()], x.prototype, "transportResultValue", null), v([s()], x.prototype, "transportErrorValue", null);
522
524
  //#endregion
523
525
  //#region src/primitives/components/error-focus.ts
524
526
  var re = () => new Promise((e) => {
525
527
  window.setTimeout(e, 0);
526
- }), ie = (e) => e instanceof HTMLElement && (e.matches("input, select, textarea, button, [tabindex]") || e.getAttribute("role") === "textbox"), x = (e) => {
528
+ }), ie = (e) => e instanceof HTMLElement && (e.matches("input, select, textarea, button, [tabindex]") || e.getAttribute("role") === "textbox"), S = (e) => {
527
529
  for (let t of e.querySelectorAll("*")) {
528
530
  if (ie(t)) return t;
529
531
  if (t instanceof HTMLElement && t.shadowRoot) {
530
- let e = x(t.shadowRoot);
532
+ let e = S(t.shadowRoot);
531
533
  if (e) return e;
532
534
  }
533
535
  }
534
536
  return null;
535
- }, S = (e, t) => Array.from(e.querySelectorAll("mlf-field-frame")).find((e) => e.dataset.fieldId === t) ?? null, C = async (e) => e ? (e.scrollIntoView?.({
537
+ }, C = (e, t) => Array.from(e.querySelectorAll("mlf-field-frame")).find((e) => e.dataset.fieldId === t) ?? null, ae = async (e) => e ? (e.scrollIntoView?.({
536
538
  behavior: "smooth",
537
539
  block: "center",
538
540
  inline: "nearest"
539
- }), await re(), x(e.shadowRoot ?? e)?.focus(), !0) : !1, ae = async (e, t) => C(S(e.shadowRoot ?? e, t)), oe = (e) => e.find((e) => e.state.visible && e.state.errors.length > 0) ?? null, se = t`
541
+ }), await re(), S(e.shadowRoot ?? e)?.focus(), !0) : !1, oe = async (e, t) => ae(C(e.shadowRoot ?? e, t)), se = (e) => e.find((e) => e.state.visible && e.state.errors.length > 0) ?? null, ce = t`
540
542
  :host {
541
543
  display: block;
542
544
  flex: 1 1 auto;
@@ -839,14 +841,14 @@ var re = () => new Promise((e) => {
839
841
  }
840
842
  }
841
843
  `}
842
- `, ce = (e) => ({
844
+ `, le = (e) => ({
843
845
  component: "unsupported-field",
844
846
  props: { label: e.config.label ?? e.id }
845
847
  }), w = (e, t) => t?.getField(e.kind)?.describe(e.config, {
846
848
  fieldId: e.id,
847
849
  state: e.state,
848
850
  value: e.state.value
849
- }) ?? ce(e), le = (e, t, n) => {
851
+ }) ?? le(e), ue = (e, t, n) => {
850
852
  let r = n?.getReport(e.kind);
851
853
  return r ? r.describe(e.config, {
852
854
  reportId: e.id,
@@ -854,15 +856,15 @@ var re = () => new Promise((e) => {
854
856
  payload: e.state.payload,
855
857
  result: t.state.lastResult
856
858
  }) : null;
857
- }, ue = (e, t, n) => t.map((t) => e.getField(t)).filter((e) => e !== void 0).map((e) => ({
859
+ }, de = (e, t, n) => t.map((t) => e.getField(t)).filter((e) => e !== void 0).map((e) => ({
858
860
  controller: e,
859
861
  descriptor: w(e, n)
860
- })), de = (e, t, n, r) => (n === "always" ? e.reports : t.map((t) => e.getReport(t)).filter((e) => e !== void 0)).map((t) => ({
862
+ })), fe = (e, t, n, r) => (n === "always" ? e.reports : t.map((t) => e.getReport(t)).filter((e) => e !== void 0)).map((t) => ({
861
863
  controller: t,
862
- descriptor: le(t, e, r)
863
- })).filter((e) => e.descriptor !== null), fe = (e, t, r, i) => n`
864
+ descriptor: ue(t, e, r)
865
+ })).filter((e) => e.descriptor !== null), T = (e, t, r, i) => n`
864
866
  <div class="collection" part="field-list">
865
- ${s(e, (e) => e.controller.id, (e) => n`
867
+ ${c(e, (e) => e.controller.id, (e) => n`
866
868
  <mlf-field-frame
867
869
  data-field-id=${e.controller.id}
868
870
  .controller=${e.controller}
@@ -875,7 +877,7 @@ var re = () => new Promise((e) => {
875
877
  </div>
876
878
  `, pe = (e, t, r, i, a, o) => n`
877
879
  <div class="collection" part="report-list">
878
- ${s(e, (e) => e.controller.id, (e) => n`
880
+ ${c(e, (e) => e.controller.id, (e) => n`
879
881
  <mlf-report-frame
880
882
  .controller=${e.controller}
881
883
  .descriptor=${e.descriptor}
@@ -906,7 +908,7 @@ var re = () => new Promise((e) => {
906
908
  </div>
907
909
 
908
910
  <mlf-form-errors .form=${e.form} .text=${e.text}></mlf-form-errors>
909
- ${fe(e.visibleFields, e.registry, e.descriptorRegistry, e.text)}
911
+ ${T(e.visibleFields, e.registry, e.descriptorRegistry, e.text)}
910
912
  </div>
911
913
 
912
914
  <div class="actions" part="actions">
@@ -915,10 +917,6 @@ var re = () => new Promise((e) => {
915
917
  .idleLabel=${e.submitLabel}
916
918
  .validatingLabel=${e.validatingLabel}
917
919
  .submittingLabel=${e.submittingLabel}
918
- .loaded=${e.state.submissionLoaded}
919
- .total=${e.state.submissionTotal}
920
- .progressMessage=${e.state.submissionMessage}
921
- .sessionMessageCount=${e.state.submissionSessionMessageCount}
922
920
  @mlf-submit-request=${e.onSubmitRequest}
923
921
  ></mlf-submit-button>
924
922
  </div>
@@ -958,7 +956,7 @@ var re = () => new Promise((e) => {
958
956
  </div>
959
957
 
960
958
  <mlf-form-errors .form=${e.form} .text=${e.text}></mlf-form-errors>
961
- ${fe(e.visibleFields, e.registry, e.descriptorRegistry, e.text)}
959
+ ${T(e.visibleFields, e.registry, e.descriptorRegistry, e.text)}
962
960
  </div>
963
961
  </div>
964
962
 
@@ -968,10 +966,6 @@ var re = () => new Promise((e) => {
968
966
  .idleLabel=${e.submitLabel}
969
967
  .validatingLabel=${e.validatingLabel}
970
968
  .submittingLabel=${e.submittingLabel}
971
- .loaded=${e.state.submissionLoaded}
972
- .total=${e.state.submissionTotal}
973
- .progressMessage=${e.state.submissionMessage}
974
- .sessionMessageCount=${e.state.submissionSessionMessageCount}
975
969
  @mlf-submit-request=${e.onSubmitRequest}
976
970
  ></mlf-submit-button>
977
971
  </div>
@@ -998,23 +992,19 @@ var re = () => new Promise((e) => {
998
992
  ` : r}
999
993
  </div>
1000
994
  </div>
1001
- `, T = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]), ge = (e, t) => e.status === t.status && e.submitCount === t.submitCount && e.hasFormErrors === t.hasFormErrors && e.hasLastResult === t.hasLastResult && e.submissionLoaded === t.submissionLoaded && e.submissionTotal === t.submissionTotal && e.submissionMessage === t.submissionMessage && e.submissionSessionMessageCount === t.submissionSessionMessageCount && T(e.visibleFieldIds, t.visibleFieldIds) && T(e.visibleReportIds, t.visibleReportIds) && T(e.reportStateKeys, t.reportStateKeys), E = (e) => {
995
+ `, E = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]), ge = (e, t) => e.status === t.status && e.submitCount === t.submitCount && e.hasFormErrors === t.hasFormErrors && e.hasLastResult === t.hasLastResult && E(e.visibleFieldIds, t.visibleFieldIds) && E(e.visibleReportIds, t.visibleReportIds) && E(e.reportStateKeys, t.reportStateKeys), D = (e) => {
1002
996
  let t = e.state;
1003
997
  return {
1004
998
  status: t.status,
1005
999
  submitCount: t.submitCount,
1006
1000
  hasFormErrors: t.errors.form.length > 0,
1007
1001
  hasLastResult: t.lastResult !== null,
1008
- submissionLoaded: t.submissionProgress?.loaded,
1009
- submissionTotal: t.submissionProgress?.total,
1010
- submissionMessage: t.submissionProgress?.message,
1011
- submissionSessionMessageCount: t.submissionProgress?.sessionMessageCount,
1012
1002
  visibleFieldIds: e.fields.filter((e) => e.state.visible).map((e) => e.id),
1013
1003
  visibleReportIds: e.reports.map((e) => e.id),
1014
1004
  reportStateKeys: e.reports.map((e) => `${e.id}:${e.state.status}:${e.state.payload === void 0}:${e.state.error === null}`)
1015
1005
  };
1016
- }, D = class extends e {
1017
- static styles = se;
1006
+ }, O = class extends e {
1007
+ static styles = ce;
1018
1008
  #e;
1019
1009
  get form() {
1020
1010
  return this.#e;
@@ -1043,35 +1033,35 @@ var re = () => new Promise((e) => {
1043
1033
  set layout(e) {
1044
1034
  this.#r = e;
1045
1035
  }
1046
- #i = p.form;
1036
+ #i = m.form;
1047
1037
  get formLabel() {
1048
1038
  return this.#i;
1049
1039
  }
1050
1040
  set formLabel(e) {
1051
1041
  this.#i = e;
1052
1042
  }
1053
- #a = p.reports;
1043
+ #a = m.reports;
1054
1044
  get reportsLabel() {
1055
1045
  return this.#a;
1056
1046
  }
1057
1047
  set reportsLabel(e) {
1058
1048
  this.#a = e;
1059
1049
  }
1060
- #o = p.submit;
1050
+ #o = m.submit;
1061
1051
  get submitLabel() {
1062
1052
  return this.#o;
1063
1053
  }
1064
1054
  set submitLabel(e) {
1065
1055
  this.#o = e;
1066
1056
  }
1067
- #s = p.validating;
1057
+ #s = m.validating;
1068
1058
  get validatingLabel() {
1069
1059
  return this.#s;
1070
1060
  }
1071
1061
  set validatingLabel(e) {
1072
1062
  this.#s = e;
1073
1063
  }
1074
- #c = p.submitting;
1064
+ #c = m.submitting;
1075
1065
  get submittingLabel() {
1076
1066
  return this.#c;
1077
1067
  }
@@ -1085,7 +1075,7 @@ var re = () => new Promise((e) => {
1085
1075
  set reportPane(e) {
1086
1076
  this.#l = e;
1087
1077
  }
1088
- #u = m;
1078
+ #u = h;
1089
1079
  get text() {
1090
1080
  return this.#u;
1091
1081
  }
@@ -1134,7 +1124,7 @@ var re = () => new Promise((e) => {
1134
1124
  render() {
1135
1125
  let e = this.form, t = this.formState;
1136
1126
  if (!e || !t) return n``;
1137
- let r = this.text, i = ue(e, t.visibleFieldIds, this.descriptorRegistry), a = de(e, t.visibleReportIds, this.reportPane, this.descriptorRegistry), o = this.reportPane !== "hidden" && (e.reports.length > 0 || t.hasFormErrors), s = this.layout === "split" ? o : this.reportPane === "always" ? e.reports.length > 0 : this.reportPane === "auto" ? a.length > 0 : !1;
1127
+ let r = this.text, i = de(e, t.visibleFieldIds, this.descriptorRegistry), a = fe(e, t.visibleReportIds, this.reportPane, this.descriptorRegistry), o = this.reportPane !== "hidden" && (e.reports.length > 0 || t.hasFormErrors), s = this.layout === "split" ? o : this.reportPane === "always" ? e.reports.length > 0 : this.reportPane === "auto" ? a.length > 0 : !1;
1138
1128
  return this.layout === "split" ? he({
1139
1129
  form: e,
1140
1130
  state: t,
@@ -1173,7 +1163,7 @@ var re = () => new Promise((e) => {
1173
1163
  }
1174
1164
  #_ = async () => {
1175
1165
  if (this.form) {
1176
- this.dispatchEvent(new CustomEvent(f.submitStart, {
1166
+ this.dispatchEvent(new CustomEvent(p.submitStart, {
1177
1167
  detail: {
1178
1168
  form: this.form,
1179
1169
  state: this.form.state
@@ -1183,7 +1173,7 @@ var re = () => new Promise((e) => {
1183
1173
  }));
1184
1174
  try {
1185
1175
  let e = this.submitHandler ? await this.submitHandler() : { result: await this.form.submit() };
1186
- this.dispatchEvent(new CustomEvent(f.submitSuccess, {
1176
+ this.dispatchEvent(new CustomEvent(p.submitSuccess, {
1187
1177
  detail: {
1188
1178
  form: this.form,
1189
1179
  state: this.form.state,
@@ -1194,8 +1184,8 @@ var re = () => new Promise((e) => {
1194
1184
  composed: !0
1195
1185
  }));
1196
1186
  } catch (e) {
1197
- let t = this.form ? oe(this.form.fields) : null;
1198
- t && await C(S(this.shadowRoot ?? this, t.id)), this.dispatchEvent(new CustomEvent(_e(e) ? f.submitAbort : f.submitError, {
1187
+ let t = this.form ? se(this.form.fields) : null;
1188
+ t && await ae(C(this.shadowRoot ?? this, t.id)), this.dispatchEvent(new CustomEvent(_e(e) ? p.submitAbort : p.submitError, {
1199
1189
  detail: {
1200
1190
  form: this.form,
1201
1191
  state: this.form.state,
@@ -1211,36 +1201,36 @@ var re = () => new Promise((e) => {
1211
1201
  #v() {
1212
1202
  if (!this.isConnected) return;
1213
1203
  if (this.#g === this.form) {
1214
- this.formState = this.form ? E(this.form) : null;
1204
+ this.formState = this.form ? D(this.form) : null;
1215
1205
  return;
1216
1206
  }
1217
- if (this.#h?.(), this.#h = null, this.#g = this.form, this.formState = this.form ? E(this.form) : null, !this.form) return;
1207
+ if (this.#h?.(), this.#h = null, this.#g = this.form, this.formState = this.form ? D(this.form) : null, !this.form) return;
1218
1208
  let e = this.form;
1219
- this.#h = e.subscribeSelector(() => E(e), (e) => {
1209
+ this.#h = e.subscribeSelector(() => D(e), (e) => {
1220
1210
  this.formState = e;
1221
1211
  }, { equality: ge });
1222
1212
  }
1223
1213
  };
1224
- _([a({ attribute: !1 })], D.prototype, "form", null), _([a({ attribute: !1 })], D.prototype, "registry", null), _([a({ attribute: !1 })], D.prototype, "descriptorRegistry", null), _([a({ type: String })], D.prototype, "layout", null), _([a({
1214
+ v([a({ attribute: !1 })], O.prototype, "form", null), v([a({ attribute: !1 })], O.prototype, "registry", null), v([a({ attribute: !1 })], O.prototype, "descriptorRegistry", null), v([a({ type: String })], O.prototype, "layout", null), v([a({
1225
1215
  type: String,
1226
1216
  attribute: "form-label"
1227
- })], D.prototype, "formLabel", null), _([a({
1217
+ })], O.prototype, "formLabel", null), v([a({
1228
1218
  type: String,
1229
1219
  attribute: "reports-label"
1230
- })], D.prototype, "reportsLabel", null), _([a({
1220
+ })], O.prototype, "reportsLabel", null), v([a({
1231
1221
  type: String,
1232
1222
  attribute: "submit-label"
1233
- })], D.prototype, "submitLabel", null), _([a({
1223
+ })], O.prototype, "submitLabel", null), v([a({
1234
1224
  type: String,
1235
1225
  attribute: "validating-label"
1236
- })], D.prototype, "validatingLabel", null), _([a({
1226
+ })], O.prototype, "validatingLabel", null), v([a({
1237
1227
  type: String,
1238
1228
  attribute: "submitting-label"
1239
- })], D.prototype, "submittingLabel", null), _([a({
1229
+ })], O.prototype, "submittingLabel", null), v([a({
1240
1230
  type: String,
1241
1231
  attribute: "report-pane"
1242
- })], D.prototype, "reportPane", null), _([a({ attribute: !1 })], D.prototype, "text", null), _([a({ attribute: !1 })], D.prototype, "reportTransport", null), _([a({ attribute: !1 })], D.prototype, "reportFetchMode", null), _([a({ attribute: !1 })], D.prototype, "submitHandler", null), _([o()], D.prototype, "formState", null), D = _([i(d.form)], D);
1243
- var _e = (e) => e instanceof Error && e.name === "SubmissionAbortedError", O = class e {
1232
+ })], O.prototype, "reportPane", null), v([a({ attribute: !1 })], O.prototype, "text", null), v([a({ attribute: !1 })], O.prototype, "reportTransport", null), v([a({ attribute: !1 })], O.prototype, "reportFetchMode", null), v([a({ attribute: !1 })], O.prototype, "submitHandler", null), v([s()], O.prototype, "formState", null), O = v([i(f.form)], O);
1233
+ var _e = (e) => e instanceof Error && e.name === "SubmissionAbortedError", ve = class e {
1244
1234
  fieldPresenters = /* @__PURE__ */ new Map();
1245
1235
  reportPresenters = /* @__PURE__ */ new Map();
1246
1236
  registerField(e) {
@@ -1263,7 +1253,7 @@ var _e = (e) => e instanceof Error && e.name === "SubmissionAbortedError", O = c
1263
1253
  for (let e of this.reportPresenters.values()) t.registerReport(e);
1264
1254
  return t;
1265
1255
  }
1266
- }, k = () => new O(), ve = (e) => e ? Array.isArray(e) ? e : [e] : [], A = class extends e {
1256
+ }, k = () => new ve(), ye = (e) => e ? Array.isArray(e) ? e : [e] : [], A = class extends e {
1267
1257
  static styles = t`
1268
1258
  :host {
1269
1259
  display: block;
@@ -1304,7 +1294,7 @@ var _e = (e) => e instanceof Error && e.name === "SubmissionAbortedError", O = c
1304
1294
  set form(e) {
1305
1295
  this.#e = e;
1306
1296
  }
1307
- #t = m;
1297
+ #t = h;
1308
1298
  get text() {
1309
1299
  return this.#t;
1310
1300
  }
@@ -1352,7 +1342,7 @@ var _e = (e) => e instanceof Error && e.name === "SubmissionAbortedError", O = c
1352
1342
  }
1353
1343
  }
1354
1344
  };
1355
- _([a({ attribute: !1 })], A.prototype, "form", null), _([a({ attribute: !1 })], A.prototype, "text", null), _([o()], A.prototype, "formErrors", null), A = _([i(d.formErrors)], A);
1345
+ v([a({ attribute: !1 })], A.prototype, "form", null), v([a({ attribute: !1 })], A.prototype, "text", null), v([s()], A.prototype, "formErrors", null), A = v([i(f.formErrors)], A);
1356
1346
  //#endregion
1357
1347
  //#region src/primitives/components/submit-button.ts
1358
1348
  var j = class extends e {
@@ -1406,76 +1396,48 @@ var j = class extends e {
1406
1396
  set status(e) {
1407
1397
  this.#e = e;
1408
1398
  }
1409
- #t = p.submit;
1399
+ #t = m.submit;
1410
1400
  get idleLabel() {
1411
1401
  return this.#t;
1412
1402
  }
1413
1403
  set idleLabel(e) {
1414
1404
  this.#t = e;
1415
1405
  }
1416
- #n = p.validating;
1406
+ #n = m.validating;
1417
1407
  get validatingLabel() {
1418
1408
  return this.#n;
1419
1409
  }
1420
1410
  set validatingLabel(e) {
1421
1411
  this.#n = e;
1422
1412
  }
1423
- #r = p.submitting;
1413
+ #r = m.submitting;
1424
1414
  get submittingLabel() {
1425
1415
  return this.#r;
1426
1416
  }
1427
1417
  set submittingLabel(e) {
1428
1418
  this.#r = e;
1429
1419
  }
1430
- #i = void 0;
1431
- get loaded() {
1432
- return this.#i;
1433
- }
1434
- set loaded(e) {
1435
- this.#i = e;
1436
- }
1437
- #a = void 0;
1438
- get total() {
1439
- return this.#a;
1440
- }
1441
- set total(e) {
1442
- this.#a = e;
1443
- }
1444
- #o = void 0;
1445
- get progressMessage() {
1446
- return this.#o;
1447
- }
1448
- set progressMessage(e) {
1449
- this.#o = e;
1450
- }
1451
- #s = void 0;
1452
- get sessionMessageCount() {
1453
- return this.#s;
1454
- }
1455
- set sessionMessageCount(e) {
1456
- this.#s = e;
1457
- }
1458
1420
  render() {
1459
- let e = this.progressMessage ?? (typeof this.loaded == "number" && typeof this.total == "number" && this.total > 0 ? `${Math.round(this.loaded / this.total * 100)}%` : typeof this.sessionMessageCount == "number" && this.sessionMessageCount > 0 ? `${this.sessionMessageCount} msgs` : void 0), t = this.status === "validating" ? this.validatingLabel : this.status === "submitting" ? e ? `${this.submittingLabel} ${e}` : this.submittingLabel : this.idleLabel;
1421
+ let e = this.status === "validating" ? this.validatingLabel : this.status === "submitting" ? this.submittingLabel : this.idleLabel;
1460
1422
  return n`
1461
1423
  <button
1462
1424
  type="button"
1463
1425
  ?disabled=${this.status === "validating" || this.status === "submitting"}
1464
1426
  aria-busy=${String(this.status === "validating" || this.status === "submitting")}
1465
- @click=${this.#c}
1427
+ @click=${this.#i}
1466
1428
  >
1467
- ${t}
1429
+ ${e}
1468
1430
  </button>
1469
1431
  `;
1470
1432
  }
1471
- #c = () => {
1472
- this.dispatchEvent(new CustomEvent(f.submitRequest, {
1433
+ #i = () => {
1434
+ this.dispatchEvent(new CustomEvent(p.submitRequest, {
1473
1435
  bubbles: !0,
1474
1436
  composed: !0
1475
1437
  }));
1476
1438
  };
1477
1439
  };
1478
- _([a({ type: String })], j.prototype, "status", null), _([a({ type: String })], j.prototype, "idleLabel", null), _([a({ type: String })], j.prototype, "validatingLabel", null), _([a({ type: String })], j.prototype, "submittingLabel", null), _([a({ type: Number })], j.prototype, "loaded", null), _([a({ type: Number })], j.prototype, "total", null), _([a({ type: String })], j.prototype, "progressMessage", null), _([a({ type: Number })], j.prototype, "sessionMessageCount", null), j = _([i(d.submitButton)], j);
1440
+ v([a({ type: String })], j.prototype, "status", null), v([a({ type: String })], j.prototype, "idleLabel", null), v([a({ type: String })], j.prototype, "validatingLabel", null), v([a({ type: String })], j.prototype, "submittingLabel", null), j = v([i(f.submitButton)], j);
1479
1441
  //#endregion
1480
1442
  //#region src/primitives/components/unsupported-component.ts
1481
1443
  var M = class extends e {
@@ -1516,7 +1478,7 @@ var M = class extends e {
1516
1478
  set role(e) {
1517
1479
  this.#t = e;
1518
1480
  }
1519
- #n = m;
1481
+ #n = h;
1520
1482
  get text() {
1521
1483
  return this.#n;
1522
1484
  }
@@ -1532,7 +1494,7 @@ var M = class extends e {
1532
1494
  `;
1533
1495
  }
1534
1496
  };
1535
- _([a({ type: String })], M.prototype, "component", null), _([a({ type: String })], M.prototype, "role", null), _([a({ attribute: !1 })], M.prototype, "text", null), M = _([i(d.unsupportedComponent)], M);
1497
+ v([a({ type: String })], M.prototype, "component", null), v([a({ type: String })], M.prototype, "role", null), v([a({ attribute: !1 })], M.prototype, "text", null), M = v([i(f.unsupportedComponent)], M);
1536
1498
  //#endregion
1537
1499
  //#region src/primitives/controller-binding.ts
1538
1500
  var N = class {
@@ -1561,7 +1523,7 @@ var N = class {
1561
1523
  hostDisconnected() {
1562
1524
  this.#r?.(), this.#r = null;
1563
1525
  }
1564
- }, P = (e) => typeof e == "object" && !!e, ye = (e) => e.join(" "), F = (e, t = "") => typeof e == "string" ? e : typeof e == "number" || typeof e == "boolean" ? String(e) : t, be = t`
1526
+ }, P = (e) => typeof e == "object" && !!e, be = (e) => e.join(" "), F = (e, t = "") => typeof e == "string" ? e : typeof e == "number" || typeof e == "boolean" ? String(e) : t, xe = t`
1565
1527
  :host {
1566
1528
  display: block;
1567
1529
  }
@@ -1684,7 +1646,7 @@ var N = class {
1684
1646
  .feedback.error {
1685
1647
  color: var(--mlf-field-feedback-error, var(--mlf-color-danger, #dc2626));
1686
1648
  }
1687
- `, xe = (e) => typeof e == "string" ? {
1649
+ `, Se = (e) => typeof e == "string" ? {
1688
1650
  label: e,
1689
1651
  value: e
1690
1652
  } : e, I = (e, t) => {
@@ -1698,7 +1660,7 @@ var N = class {
1698
1660
  case "series": return "series-field";
1699
1661
  default: return e;
1700
1662
  }
1701
- }, L = (e, t) => typeof t != "string" || t.length === 0 ? null : (Array.isArray(e.options) ? e.options : []).map(xe).find((e) => e.value === t) ?? null, Se = (e, t, n, r) => {
1663
+ }, L = (e, t) => typeof t != "string" || t.length === 0 ? null : (Array.isArray(e.options) ? e.options : []).map(Se).find((e) => e.value === t) ?? null, Ce = (e, t, n, r) => {
1702
1664
  switch (I(e, t)) {
1703
1665
  case "text-field": return typeof n.value == "string" && n.value.trim().length > 0;
1704
1666
  case "date-field": return typeof t.value == "string" && t.value.trim().length > 0;
@@ -1708,7 +1670,7 @@ var N = class {
1708
1670
  case "series-field": return Array.isArray(t.value) && t.value.length > 0;
1709
1671
  default: return n.value !== null && n.value !== void 0 && n.value !== "";
1710
1672
  }
1711
- }, Ce = (e, t, n, r) => {
1673
+ }, we = (e, t, n, r) => {
1712
1674
  switch (I(e, t)) {
1713
1675
  case "text-field": {
1714
1676
  let e = typeof t.value == "string" ? t.value : "";
@@ -1736,8 +1698,8 @@ var N = class {
1736
1698
  }
1737
1699
  default: return r.fieldReady;
1738
1700
  }
1739
- }, we = 0, R = class extends e {
1740
- static styles = be;
1701
+ }, Te = 0, R = class extends e {
1702
+ static styles = xe;
1741
1703
  #e;
1742
1704
  get controller() {
1743
1705
  return this.#e;
@@ -1766,7 +1728,7 @@ var N = class {
1766
1728
  set registry(e) {
1767
1729
  this.#r = e;
1768
1730
  }
1769
- #i = m;
1731
+ #i = h;
1770
1732
  get text() {
1771
1733
  return this.#i;
1772
1734
  }
@@ -1794,7 +1756,7 @@ var N = class {
1794
1756
  set descriptionVisibilityOverride(e) {
1795
1757
  this.#s = e;
1796
1758
  }
1797
- #c = ++we;
1759
+ #c = ++Te;
1798
1760
  #l;
1799
1761
  #u = null;
1800
1762
  #d = null;
@@ -1808,15 +1770,15 @@ var N = class {
1808
1770
  }
1809
1771
  render() {
1810
1772
  let e = this.resolvedDescriptor, t = this.fieldState;
1811
- if (!e || !t || !t.visible) return c``;
1812
- let n = e.props, r = this.registry?.resolveField(e.component), i = F(n.label, this.controller?.config.label ?? ""), a = F(n.description), o = this.#b(a), s = Se(e.component, n, t, this.controller?.config.defaultValue), l = ye(t.errors), u = Ce(e.component, n, t, this.text), d = l.length > 0 && (t.touched || s), f = d ? {
1773
+ if (!e || !t || !t.visible) return l``;
1774
+ let n = e.props, r = this.registry?.resolveField(e.component), i = F(n.label, this.controller?.config.label ?? ""), a = F(n.description), o = this.#b(a), s = Ce(e.component, n, t, this.controller?.config.defaultValue), c = be(t.errors), u = we(e.component, n, t, this.text), d = c.length > 0 && (t.touched || s), f = d ? {
1813
1775
  tone: "error",
1814
- message: l
1776
+ message: c
1815
1777
  } : s && t.valid ? {
1816
1778
  tone: "success",
1817
1779
  message: u
1818
- } : null, p = d ? "error" : s && t.valid ? "success" : "", m = `${g.fieldControl}-${this.controller?.id}-${this.#c}`, h = `${g.fieldErrors}-${this.controller?.id}-${this.#c}`, _ = `${g.fieldDescription}-${this.controller?.id}-${this.#c}-details`;
1819
- return c`
1780
+ } : null, p = d ? "error" : s && t.valid ? "success" : "", m = `${_.fieldControl}-${this.controller?.id}-${this.#c}`, h = `${_.fieldErrors}-${this.controller?.id}-${this.#c}`, g = `${_.fieldDescription}-${this.controller?.id}-${this.#c}-details`;
1781
+ return l`
1820
1782
  <section
1821
1783
  class="tile ${p}"
1822
1784
  aria-busy=${String(t.status === "validating")}
@@ -1829,7 +1791,7 @@ var N = class {
1829
1791
  type="button"
1830
1792
  aria-label=${this.text.helpActionLabel}
1831
1793
  aria-expanded=${String(o)}
1832
- aria-controls=${_}
1794
+ aria-controls=${g}
1833
1795
  ?disabled=${a.length === 0}
1834
1796
  @click=${this.#y}
1835
1797
  >
@@ -1837,14 +1799,14 @@ var N = class {
1837
1799
  </button>
1838
1800
  </div>
1839
1801
 
1840
- ${a ? c`
1841
- <div id=${_} class="description ${o ? "show" : ""}">
1802
+ ${a ? l`
1803
+ <div id=${g} class="description ${o ? "show" : ""}">
1842
1804
  ${a}
1843
1805
  </div>
1844
- ` : c``}
1806
+ ` : l``}
1845
1807
 
1846
1808
  <div class="control-slot">
1847
- ${r ? this.#h(r, m, h) : c`
1809
+ ${r ? this.#h(r, m, h) : l`
1848
1810
  <mlf-unsupported-component
1849
1811
  role="field"
1850
1812
  component=${e.component}
@@ -1853,7 +1815,7 @@ var N = class {
1853
1815
  `}
1854
1816
  </div>
1855
1817
 
1856
- ${f ? c`
1818
+ ${f ? l`
1857
1819
  <div
1858
1820
  class="feedback ${f.tone}"
1859
1821
  role=${f.tone === "error" ? "alert" : "status"}
@@ -1861,13 +1823,13 @@ var N = class {
1861
1823
  >
1862
1824
  ${f.message}
1863
1825
  </div>
1864
- ` : c``}
1826
+ ` : l``}
1865
1827
  </section>
1866
1828
  `;
1867
1829
  }
1868
1830
  #h(e, t, n) {
1869
- let r = l(e), i = this.#_(t, n), a = this.resolvedDescriptor;
1870
- return c`
1831
+ let r = u(e), i = this.#_(t, n), a = this.resolvedDescriptor;
1832
+ return l`
1871
1833
  <${r}
1872
1834
  .controller=${this.controller}
1873
1835
  .descriptor=${a}
@@ -1886,7 +1848,7 @@ var N = class {
1886
1848
  }
1887
1849
  #v(e, t, n, r) {
1888
1850
  if (!this.controller || !t) return;
1889
- let i = typeof e.description == "string" && e.description.length > 0 ? e.description : void 0, a = i ? `${g.fieldDescription}-${this.controller.id}-${this.#c}` : void 0, o = [a, r].filter(Boolean).join(" ") || void 0;
1851
+ let i = typeof e.description == "string" && e.description.length > 0 ? e.description : void 0, a = i ? `${_.fieldDescription}-${this.controller.id}-${this.#c}` : void 0, o = [a, r].filter(Boolean).join(" ") || void 0;
1890
1852
  return {
1891
1853
  controlId: n,
1892
1854
  label: F(e.label, this.controller.config.label),
@@ -1908,10 +1870,10 @@ var N = class {
1908
1870
  return e.length === 0 ? !1 : this.descriptionVisibilityOverride ?? this.resolvedDescriptor?.props.showDescriptionInline === !0;
1909
1871
  }
1910
1872
  };
1911
- _([a({ attribute: !1 })], R.prototype, "controller", null), _([a({ attribute: !1 })], R.prototype, "descriptor", null), _([a({ attribute: !1 })], R.prototype, "descriptorRegistry", null), _([a({ attribute: !1 })], R.prototype, "registry", null), _([a({ attribute: !1 })], R.prototype, "text", null), _([o()], R.prototype, "resolvedDescriptor", null), _([o()], R.prototype, "fieldState", null), _([o()], R.prototype, "descriptionVisibilityOverride", null), R = _([i(d.fieldFrame)], R);
1873
+ v([a({ attribute: !1 })], R.prototype, "controller", null), v([a({ attribute: !1 })], R.prototype, "descriptor", null), v([a({ attribute: !1 })], R.prototype, "descriptorRegistry", null), v([a({ attribute: !1 })], R.prototype, "registry", null), v([a({ attribute: !1 })], R.prototype, "text", null), v([s()], R.prototype, "resolvedDescriptor", null), v([s()], R.prototype, "fieldState", null), v([s()], R.prototype, "descriptionVisibilityOverride", null), R = v([i(f.fieldFrame)], R);
1912
1874
  //#endregion
1913
1875
  //#region src/primitives/controller-types.ts
1914
- var Te = (e, t = {}) => ({
1876
+ var Ee = (e, t = {}) => ({
1915
1877
  reportId: t.reportId ?? "",
1916
1878
  backend: e.backend,
1917
1879
  inputs: e.inputs ?? [],
@@ -1927,7 +1889,7 @@ var Te = (e, t = {}) => ({
1927
1889
  meta: e.meta,
1928
1890
  raw: e.raw,
1929
1891
  signal: t.signal
1930
- }), Ee = 0, z = class extends e {
1892
+ }), De = 0, z = class extends e {
1931
1893
  static styles = t`
1932
1894
  :host {
1933
1895
  display: block;
@@ -2011,7 +1973,7 @@ var Te = (e, t = {}) => ({
2011
1973
  set registry(e) {
2012
1974
  this.#t = e;
2013
1975
  }
2014
- #n = m;
1976
+ #n = h;
2015
1977
  get text() {
2016
1978
  return this.#n;
2017
1979
  }
@@ -2060,7 +2022,7 @@ var Te = (e, t = {}) => ({
2060
2022
  set reportState(e) {
2061
2023
  this.#c = e;
2062
2024
  }
2063
- #l = ++Ee;
2025
+ #l = ++De;
2064
2026
  #u;
2065
2027
  #d;
2066
2028
  #f = null;
@@ -2074,19 +2036,19 @@ var Te = (e, t = {}) => ({
2074
2036
  }
2075
2037
  render() {
2076
2038
  let e = this.resolvedDescriptor, t = this.reportState;
2077
- if (!e || !t) return c``;
2039
+ if (!e || !t) return l``;
2078
2040
  let n = e.props, r = this.registry?.resolveReport(e.component);
2079
- return c`
2041
+ return l`
2080
2042
  <section class="report">
2081
2043
  <div class="header">
2082
2044
  <div class="copy">
2083
2045
  <p class="label">${F(n.label, this.controller?.config.label ?? "")}</p>
2084
- ${n.description ? c`<p class="description">${F(n.description)}</p>` : c``}
2046
+ ${n.description ? l`<p class="description">${F(n.description)}</p>` : l``}
2085
2047
  </div>
2086
2048
  <span class="meta">${this.text.reportStatusLabel(t.status)}</span>
2087
2049
  </div>
2088
2050
 
2089
- ${r ? this.#g(r) : c`
2051
+ ${r ? this.#g(r) : l`
2090
2052
  <mlf-unsupported-component
2091
2053
  role="report"
2092
2054
  component=${e.component}
@@ -2097,8 +2059,8 @@ var Te = (e, t = {}) => ({
2097
2059
  `;
2098
2060
  }
2099
2061
  #g(e) {
2100
- let t = l(e), n = this.#_(), r = this.transport, i = this.#y(), a = this.resolvedDescriptor;
2101
- return c`
2062
+ let t = u(e), n = this.#_(), r = this.transport, i = this.#y(), a = this.resolvedDescriptor;
2063
+ return l`
2102
2064
  <${t}
2103
2065
  .controller=${this.controller}
2104
2066
  .descriptor=${a}
@@ -2116,7 +2078,7 @@ var Te = (e, t = {}) => ({
2116
2078
  }
2117
2079
  #v(e) {
2118
2080
  if (this.controller) return {
2119
- regionId: `${g.reportRegion}-${this.controller.id}-${this.#l}`,
2081
+ regionId: `${_.reportRegion}-${this.controller.id}-${this.#l}`,
2120
2082
  label: F(e.label, this.controller.config.label ?? this.controller.id),
2121
2083
  description: typeof e.description == "string" && e.description.length > 0 ? e.description : void 0
2122
2084
  };
@@ -2125,7 +2087,7 @@ var Te = (e, t = {}) => ({
2125
2087
  let e = this.lastResult;
2126
2088
  if (!e || !this.controller) return null;
2127
2089
  if (e === this.#p && this.#m?.reportId === this.controller.id) return this.#m;
2128
- let t = Te(e, { reportId: this.controller.id });
2090
+ let t = Ee(e, { reportId: this.controller.id });
2129
2091
  return this.#p = e, this.#m = t, t;
2130
2092
  }
2131
2093
  #b() {
@@ -2133,36 +2095,36 @@ var Te = (e, t = {}) => ({
2133
2095
  this.fetchMode !== "lazy" || !e?.canFetch || !t || e.state.status !== "idle" || e.fetch(t);
2134
2096
  }
2135
2097
  };
2136
- _([a({ attribute: !1 })], z.prototype, "controller", null), _([a({ attribute: !1 })], z.prototype, "registry", null), _([a({ attribute: !1 })], z.prototype, "text", null), _([a({ attribute: !1 })], z.prototype, "transport", null), _([a({ attribute: !1 })], z.prototype, "fetchMode", null), _([a({ attribute: !1 })], z.prototype, "lastResult", null), _([a({ attribute: !1 })], z.prototype, "descriptor", null), _([o()], z.prototype, "resolvedDescriptor", null), _([o()], z.prototype, "reportState", null), z = _([i(d.reportFrame)], z);
2098
+ v([a({ attribute: !1 })], z.prototype, "controller", null), v([a({ attribute: !1 })], z.prototype, "registry", null), v([a({ attribute: !1 })], z.prototype, "text", null), v([a({ attribute: !1 })], z.prototype, "transport", null), v([a({ attribute: !1 })], z.prototype, "fetchMode", null), v([a({ attribute: !1 })], z.prototype, "lastResult", null), v([a({ attribute: !1 })], z.prototype, "descriptor", null), v([s()], z.prototype, "resolvedDescriptor", null), v([s()], z.prototype, "reportState", null), z = v([i(f.reportFrame)], z);
2137
2099
  //#endregion
2138
2100
  //#region src/primitives/components/declarative-field.ts
2139
2101
  var B = {
2140
2102
  text: {
2141
2103
  component: "text-field",
2142
- tagName: d.textField
2104
+ tagName: f.textField
2143
2105
  },
2144
2106
  number: {
2145
2107
  component: "number-field",
2146
- tagName: d.numberField
2108
+ tagName: f.numberField
2147
2109
  },
2148
2110
  boolean: {
2149
2111
  component: "boolean-field",
2150
- tagName: d.booleanField
2112
+ tagName: f.booleanField
2151
2113
  },
2152
2114
  select: {
2153
2115
  component: "category-field",
2154
- tagName: d.categoryField
2116
+ tagName: f.categoryField
2155
2117
  },
2156
2118
  date: {
2157
2119
  component: "date-field",
2158
- tagName: d.dateField
2120
+ tagName: f.dateField
2159
2121
  },
2160
2122
  series: {
2161
2123
  component: "series-field",
2162
- tagName: d.seriesField
2124
+ tagName: f.seriesField
2163
2125
  }
2164
- }, V = class extends v {
2165
- static styles = [v.styles, t`
2126
+ }, V = class extends y {
2127
+ static styles = [y.styles, t`
2166
2128
  :host {
2167
2129
  display: block;
2168
2130
  }
@@ -2170,11 +2132,11 @@ var B = {
2170
2132
  render() {
2171
2133
  let e = this.#e();
2172
2134
  if (!e) return this.renderAssistiveText();
2173
- let t = B[e], n = l(t.tagName), r = {
2135
+ let t = B[e], n = u(t.tagName), r = {
2174
2136
  component: t.component,
2175
2137
  props: this.#t(e)
2176
2138
  };
2177
- return c`
2139
+ return l`
2178
2140
  <${n}
2179
2141
  .controller=${this.controller}
2180
2142
  .descriptor=${r}
@@ -2192,7 +2154,7 @@ var B = {
2192
2154
  return delete t.widget, e === "boolean" && (t.checked = t.value === !0 ? !0 : t.value === !1 ? !1 : null), t;
2193
2155
  }
2194
2156
  };
2195
- V = _([i(d.declarativeField)], V);
2157
+ V = v([i(f.declarativeField)], V);
2196
2158
  //#endregion
2197
2159
  //#region src/primitives/components/descriptor-content.ts
2198
2160
  var H = (e) => typeof e == "string" && e.length > 0 ? `tone-${e}` : "tone-neutral", U = (e) => {
@@ -2204,10 +2166,10 @@ var H = (e) => typeof e == "string" && e.length > 0 ? `tone-${e}` : "tone-neutra
2204
2166
  } catch {
2205
2167
  return Object.prototype.toString.call(e);
2206
2168
  }
2207
- }, De = (e) => Array.isArray(e) ? e : Object.entries(e).map(([e, t]) => ({
2169
+ }, Oe = (e) => Array.isArray(e) ? e : Object.entries(e).map(([e, t]) => ({
2208
2170
  label: e,
2209
2171
  value: t
2210
- })), Oe = (e) => n`<span>${U(e)}</span>`, ke = (e, t) => {
2172
+ })), ke = (e) => n`<span>${U(e)}</span>`, Ae = (e, t) => {
2211
2173
  switch (e.type) {
2212
2174
  case "text": return typeof e.value == "string" && e.value.includes("\n") ? n`
2213
2175
  <section class="node text ${H(e.tone)}" data-node-index=${t}>
@@ -2231,7 +2193,7 @@ var H = (e) => typeof e == "string" && e.length > 0 ? `tone-${e}` : "tone-neutra
2231
2193
  <section class="node kv" data-node-index=${t}>
2232
2194
  ${e.label ? n`<p class="node-label">${e.label}</p>` : r}
2233
2195
  <dl class="kv-list">
2234
- ${De(e.entries).map((e) => n`
2196
+ ${Oe(e.entries).map((e) => n`
2235
2197
  <div class="kv-row">
2236
2198
  <dt>${e.label}</dt>
2237
2199
  <dd>${U(e.value)}</dd>
@@ -2266,7 +2228,7 @@ var H = (e) => typeof e == "string" && e.length > 0 ? `tone-${e}` : "tone-neutra
2266
2228
  <tbody>
2267
2229
  ${e.rows.map((t) => n`
2268
2230
  <tr>
2269
- ${(Array.isArray(t) ? t : e.columns.map((e) => t[e])).map((e) => n`<td>${Oe(e)}</td>`)}
2231
+ ${(Array.isArray(t) ? t : e.columns.map((e) => t[e])).map((e) => n`<td>${ke(e)}</td>`)}
2270
2232
  </tr>
2271
2233
  `)}
2272
2234
  </tbody>
@@ -2292,7 +2254,7 @@ var H = (e) => typeof e == "string" && e.length > 0 ? `tone-${e}` : "tone-neutra
2292
2254
  </section>
2293
2255
  `;
2294
2256
  }
2295
- }, Ae = (e, t) => {
2257
+ }, je = (e, t) => {
2296
2258
  if (!e && !t) return r;
2297
2259
  let i = F(e?.title, t ?? ""), a = F(e?.description), o = e?.value, s = F(e?.badge);
2298
2260
  return n`
@@ -2307,8 +2269,8 @@ var H = (e) => typeof e == "string" && e.length > 0 ? `tone-${e}` : "tone-neutra
2307
2269
  </div>
2308
2270
  </section>
2309
2271
  `;
2310
- }, je = (e) => e.length === 0 ? r : n`<div class="Descriptor">${e.map((e, t) => ke(e, t))}</div>`, W = class extends y {
2311
- static styles = [y.styles, t`
2272
+ }, Me = (e) => e.length === 0 ? r : n`<div class="Descriptor">${e.map((e, t) => Ae(e, t))}</div>`, W = class extends b {
2273
+ static styles = [b.styles, t`
2312
2274
  :host {
2313
2275
  display: block;
2314
2276
  }
@@ -2456,15 +2418,67 @@ var H = (e) => typeof e == "string" && e.length > 0 ? `tone-${e}` : "tone-neutra
2456
2418
  render() {
2457
2419
  let e = this.props, t = Array.isArray(e.content) ? e.content : [];
2458
2420
  return n`
2459
- ${Ae(e.summary && typeof e.summary == "object" ? e.summary : null, this.reportContext?.label)} ${je(t)}
2421
+ ${je(e.summary && typeof e.summary == "object" ? e.summary : null, this.reportContext?.label)} ${Me(t)}
2460
2422
  `;
2461
2423
  }
2462
2424
  };
2463
- W = _([i(d.declarativeReport)], W);
2425
+ W = v([i(f.declarativeReport)], W);
2426
+ //#endregion
2427
+ //#region src/primitives/components/mounted-report.ts
2428
+ var Ne = (e) => e instanceof Error ? e.message : String(e), G = class extends b {
2429
+ static styles = [b.styles, t`
2430
+ :host {
2431
+ display: block;
2432
+ }
2433
+
2434
+ .mount-host {
2435
+ display: block;
2436
+ min-width: 0;
2437
+ }
2438
+ `];
2439
+ #e;
2440
+ get mountHost() {
2441
+ return this.#e;
2442
+ }
2443
+ set mountHost(e) {
2444
+ this.#e = e;
2445
+ }
2446
+ #t = null;
2447
+ #n = null;
2448
+ #r = null;
2449
+ updated() {
2450
+ if (this.descriptor === this.#n) return;
2451
+ this.#i(), this.#n = this.descriptor, this.mountHost.replaceChildren();
2452
+ let e = this.props.mount, t = this.props.mountContext;
2453
+ if (!(typeof e != "function" || !t)) {
2454
+ this.#r = new AbortController();
2455
+ try {
2456
+ let n = e({
2457
+ ...t,
2458
+ element: this.mountHost,
2459
+ signal: this.#r.signal
2460
+ });
2461
+ this.#t = typeof n == "function" ? n : null;
2462
+ } catch (e) {
2463
+ this.mountHost.textContent = `Report render failed: ${Ne(e)}`;
2464
+ }
2465
+ }
2466
+ }
2467
+ disconnectedCallback() {
2468
+ this.#i(), super.disconnectedCallback();
2469
+ }
2470
+ #i() {
2471
+ this.#r?.abort(), this.#r = null, this.#t?.(), this.#t = null;
2472
+ }
2473
+ render() {
2474
+ return n`<div class="mount-host" part="mount-host"></div>`;
2475
+ }
2476
+ };
2477
+ v([o(".mount-host")], G.prototype, "mountHost", null), G = v([i(f.mountedReport)], G);
2464
2478
  //#endregion
2465
2479
  //#region src/primitives/fields/text-field.ts
2466
- var G = class extends v {
2467
- static styles = [v.styles, t`
2480
+ var K = class extends y {
2481
+ static styles = [y.styles, t`
2468
2482
  input {
2469
2483
  min-height: var(--mlf-control-height, 3rem);
2470
2484
  }
@@ -2478,15 +2492,15 @@ var G = class extends v {
2478
2492
  id=${t?.controlId ?? ""}
2479
2493
  .value=${r}
2480
2494
  aria-label=${t?.label ?? F(e.label)}
2481
- aria-describedby=${u(t?.describedBy)}
2495
+ aria-describedby=${d(t?.describedBy)}
2482
2496
  aria-invalid=${String(t?.invalid ?? !1)}
2483
2497
  placeholder=${F(e.placeholder)}
2484
2498
  ?required=${!!e.required}
2485
2499
  ?disabled=${!!this.fieldContext?.disabled}
2486
2500
  ?readonly=${!!this.fieldContext?.readOnly}
2487
- minlength=${u(typeof e.minLength == "number" ? String(e.minLength) : void 0)}
2488
- maxlength=${u(typeof e.maxLength == "number" ? String(e.maxLength) : void 0)}
2489
- pattern=${u(typeof e.pattern == "string" ? e.pattern : void 0)}
2501
+ minlength=${d(typeof e.minLength == "number" ? String(e.minLength) : void 0)}
2502
+ maxlength=${d(typeof e.maxLength == "number" ? String(e.maxLength) : void 0)}
2503
+ pattern=${d(typeof e.pattern == "string" ? e.pattern : void 0)}
2490
2504
  @input=${this.#e}
2491
2505
  @blur=${this.#t}
2492
2506
  />
@@ -2500,11 +2514,11 @@ var G = class extends v {
2500
2514
  this.commitBlur();
2501
2515
  };
2502
2516
  };
2503
- G = _([i(d.textField)], G);
2517
+ K = v([i(f.textField)], K);
2504
2518
  //#endregion
2505
2519
  //#region src/primitives/fields/number-field.ts
2506
- var K = class extends v {
2507
- static styles = [v.styles, t`
2520
+ var q = class extends y {
2521
+ static styles = [y.styles, t`
2508
2522
  .input-wrapper {
2509
2523
  position: relative;
2510
2524
  min-width: 0;
@@ -2660,7 +2674,7 @@ var K = class extends v {
2660
2674
  this.#t = e;
2661
2675
  }
2662
2676
  render() {
2663
- let e = this.props, t = this.fieldContext, r = e.input === "range" ? "range" : "text", i = typeof e.value == "number" ? String(e.value) : e.value === null || e.value === void 0 ? "" : F(e.value), a = this.focused && this.draftValue !== null ? this.draftValue : i, o = typeof e.unit == "string" ? e.unit : "", s = `${Math.max(o.length * .56 + .8, 2.2)}rem`, c = this.fieldContext?.disabled ? "input-wrapper is-disabled" : this.fieldContext?.readOnly ? "input-wrapper is-readonly" : "input-wrapper", l = typeof e.value == "number" ? e.value : void 0, d = typeof e.min == "number" ? e.min : void 0, f = typeof e.max == "number" ? e.max : void 0, p = a.length > 0 ? a : i;
2677
+ let e = this.props, t = this.fieldContext, r = e.input === "range" ? "range" : "text", i = typeof e.value == "number" ? String(e.value) : e.value === null || e.value === void 0 ? "" : F(e.value), a = this.focused && this.draftValue !== null ? this.draftValue : i, o = typeof e.unit == "string" ? e.unit : "", s = `${Math.max(o.length * .56 + .8, 2.2)}rem`, c = this.fieldContext?.disabled ? "input-wrapper is-disabled" : this.fieldContext?.readOnly ? "input-wrapper is-readonly" : "input-wrapper", l = typeof e.value == "number" ? e.value : void 0, u = typeof e.min == "number" ? e.min : void 0, f = typeof e.max == "number" ? e.max : void 0, p = a.length > 0 ? a : i;
2664
2678
  return r === "range" ? n`
2665
2679
  <div class="range-wrapper">
2666
2680
  <div class="range-header">
@@ -2671,15 +2685,15 @@ var K = class extends v {
2671
2685
  type="range"
2672
2686
  id=${t?.controlId ?? ""}
2673
2687
  .value=${p}
2674
- min=${u(d)}
2675
- max=${u(f)}
2676
- step=${u(typeof e.step == "number" ? String(e.step) : void 0)}
2688
+ min=${d(u)}
2689
+ max=${d(f)}
2690
+ step=${d(typeof e.step == "number" ? String(e.step) : void 0)}
2677
2691
  aria-label=${t?.label ?? F(e.label)}
2678
- aria-describedby=${u(t?.describedBy)}
2692
+ aria-describedby=${d(t?.describedBy)}
2679
2693
  aria-invalid=${String(t?.invalid ?? !1)}
2680
- aria-valuenow=${u(l)}
2681
- aria-valuemin=${u(d)}
2682
- aria-valuemax=${u(f)}
2694
+ aria-valuenow=${d(l)}
2695
+ aria-valuemin=${d(u)}
2696
+ aria-valuemax=${d(f)}
2683
2697
  ?required=${!!e.required}
2684
2698
  ?disabled=${!!this.fieldContext?.disabled}
2685
2699
  ?readonly=${!!this.fieldContext?.readOnly}
@@ -2700,11 +2714,11 @@ var K = class extends v {
2700
2714
  .value=${a}
2701
2715
  placeholder=${F(e.placeholder)}
2702
2716
  aria-label=${t?.label ?? F(e.label)}
2703
- aria-describedby=${u(t?.describedBy)}
2717
+ aria-describedby=${d(t?.describedBy)}
2704
2718
  aria-invalid=${String(t?.invalid ?? !1)}
2705
- aria-valuenow=${u(l)}
2706
- aria-valuemin=${u(d)}
2707
- aria-valuemax=${u(f)}
2719
+ aria-valuenow=${d(l)}
2720
+ aria-valuemin=${d(u)}
2721
+ aria-valuemax=${d(f)}
2708
2722
  ?required=${!!e.required}
2709
2723
  ?disabled=${!!this.fieldContext?.disabled}
2710
2724
  ?readonly=${!!this.fieldContext?.readOnly}
@@ -2741,11 +2755,11 @@ var K = class extends v {
2741
2755
  return e;
2742
2756
  }
2743
2757
  };
2744
- _([o()], K.prototype, "draftValue", null), _([o()], K.prototype, "focused", null), K = _([i(d.numberField)], K);
2758
+ v([s()], q.prototype, "draftValue", null), v([s()], q.prototype, "focused", null), q = v([i(f.numberField)], q);
2745
2759
  //#endregion
2746
2760
  //#region src/primitives/fields/boolean-field.ts
2747
- var q = class extends v {
2748
- static styles = [v.styles, t`
2761
+ var J = class extends y {
2762
+ static styles = [y.styles, t`
2749
2763
  fieldset {
2750
2764
  display: flex;
2751
2765
  width: 100%;
@@ -2812,12 +2826,12 @@ var q = class extends v {
2812
2826
  }
2813
2827
  `];
2814
2828
  render() {
2815
- let e = this.props, t = this.fieldContext, r = e.checked === !0 ? !0 : e.checked === !1 ? !1 : null, i = this.text, a = g.booleanGroup, o = `${t?.controlId ?? a}-true`, s = `${t?.controlId ?? a}-false`, c = F(e.trueLabel, i.booleanTrue), l = F(e.falseLabel, i.booleanFalse), d = !!(this.fieldContext?.disabled || this.fieldContext?.readOnly);
2829
+ let e = this.props, t = this.fieldContext, r = e.checked === !0 ? !0 : e.checked === !1 ? !1 : null, i = this.text, a = _.booleanGroup, o = `${t?.controlId ?? a}-true`, s = `${t?.controlId ?? a}-false`, c = F(e.trueLabel, i.booleanTrue), l = F(e.falseLabel, i.booleanFalse), u = !!(this.fieldContext?.disabled || this.fieldContext?.readOnly);
2816
2830
  return n`
2817
2831
  <fieldset
2818
2832
  role="radiogroup"
2819
2833
  aria-label=${t?.label ?? F(e.label)}
2820
- aria-describedby=${u(t?.describedBy)}
2834
+ aria-describedby=${d(t?.describedBy)}
2821
2835
  aria-invalid=${String(t?.invalid ?? !1)}
2822
2836
  aria-readonly=${String(!!this.fieldContext?.readOnly)}
2823
2837
  >
@@ -2827,7 +2841,7 @@ var q = class extends v {
2827
2841
  name=${t?.controlId ?? a}
2828
2842
  value="true"
2829
2843
  .checked=${r === !0}
2830
- ?disabled=${d}
2844
+ ?disabled=${u}
2831
2845
  @change=${this.#e}
2832
2846
  @blur=${this.#t}
2833
2847
  />
@@ -2839,7 +2853,7 @@ var q = class extends v {
2839
2853
  name=${t?.controlId ?? a}
2840
2854
  value="false"
2841
2855
  .checked=${r === !1}
2842
- ?disabled=${d}
2856
+ ?disabled=${u}
2843
2857
  @change=${this.#e}
2844
2858
  @blur=${this.#t}
2845
2859
  />
@@ -2855,14 +2869,14 @@ var q = class extends v {
2855
2869
  this.commitBlur();
2856
2870
  };
2857
2871
  };
2858
- q = _([i(d.booleanField)], q);
2872
+ J = v([i(f.booleanField)], J);
2859
2873
  //#endregion
2860
2874
  //#region src/primitives/fields/category-field.ts
2861
- var J = (e) => typeof e == "string" ? {
2875
+ var Y = (e) => typeof e == "string" ? {
2862
2876
  label: e,
2863
2877
  value: e
2864
- } : e, Me = (e, t) => typeof e != "string" || e.length === 0 ? "" : t.some((t) => J(t).value === e) ? e : "", Ne = class extends v {
2865
- static styles = [v.styles, t`
2878
+ } : e, Pe = (e, t) => typeof e != "string" || e.length === 0 ? "" : t.some((t) => Y(t).value === e) ? e : "", X = class extends y {
2879
+ static styles = [y.styles, t`
2866
2880
  .select-wrap {
2867
2881
  position: relative;
2868
2882
  min-width: 0;
@@ -2892,14 +2906,14 @@ var J = (e) => typeof e == "string" ? {
2892
2906
  }
2893
2907
  `];
2894
2908
  render() {
2895
- let e = this.props, t = this.fieldContext, r = typeof e.value == "string" ? e.value : "", i = Array.isArray(e.options) ? e.options : [], a = Me(r, i), o = this.text;
2909
+ let e = this.props, t = this.fieldContext, r = typeof e.value == "string" ? e.value : "", i = Array.isArray(e.options) ? e.options : [], a = Pe(r, i), o = this.text;
2896
2910
  return n`
2897
2911
  <div class="select-wrap">
2898
2912
  <select
2899
2913
  class="control"
2900
2914
  id=${t?.controlId ?? ""}
2901
2915
  aria-label=${t?.label ?? F(e.label)}
2902
- aria-describedby=${u(t?.describedBy)}
2916
+ aria-describedby=${d(t?.describedBy)}
2903
2917
  aria-invalid=${String(t?.invalid ?? !1)}
2904
2918
  aria-readonly=${String(!!this.fieldContext?.readOnly)}
2905
2919
  ?required=${!!e.required}
@@ -2911,7 +2925,7 @@ var J = (e) => typeof e == "string" ? {
2911
2925
  &#8212; ${o.categoryPlaceholder} &#8212;
2912
2926
  </option>
2913
2927
  ${i.map((e) => {
2914
- let t = J(e);
2928
+ let t = Y(e);
2915
2929
  return n`
2916
2930
  <option value=${t.value} ?selected=${t.value === a}>
2917
2931
  ${t.label}
@@ -2938,11 +2952,11 @@ var J = (e) => typeof e == "string" ? {
2938
2952
  this.commitBlur();
2939
2953
  };
2940
2954
  };
2941
- Ne = _([i(d.categoryField)], Ne);
2955
+ X = v([i(f.categoryField)], X);
2942
2956
  //#endregion
2943
2957
  //#region src/primitives/fields/date-field.ts
2944
- var Pe = class extends v {
2945
- static styles = [v.styles, t`
2958
+ var Fe = class extends y {
2959
+ static styles = [y.styles, t`
2946
2960
  input {
2947
2961
  min-height: var(--mlf-control-height, 3rem);
2948
2962
  }
@@ -2960,14 +2974,14 @@ var Pe = class extends v {
2960
2974
  id=${t?.controlId ?? ""}
2961
2975
  .value=${r}
2962
2976
  aria-label=${t?.label ?? F(e.label)}
2963
- aria-describedby=${u(t?.describedBy)}
2977
+ aria-describedby=${d(t?.describedBy)}
2964
2978
  aria-invalid=${String(t?.invalid ?? !1)}
2965
2979
  ?required=${!!e.required}
2966
2980
  ?disabled=${!!this.fieldContext?.disabled}
2967
2981
  ?readonly=${!!this.fieldContext?.readOnly}
2968
- min=${u(typeof e.min == "string" ? e.min : void 0)}
2969
- max=${u(typeof e.max == "string" ? e.max : void 0)}
2970
- step=${u(typeof e.step == "number" ? String(e.step) : void 0)}
2982
+ min=${d(typeof e.min == "string" ? e.min : void 0)}
2983
+ max=${d(typeof e.max == "string" ? e.max : void 0)}
2984
+ step=${d(typeof e.step == "number" ? String(e.step) : void 0)}
2971
2985
  @input=${this.#e}
2972
2986
  @blur=${this.#t}
2973
2987
  />
@@ -2982,26 +2996,26 @@ var Pe = class extends v {
2982
2996
  this.commitBlur();
2983
2997
  };
2984
2998
  };
2985
- Pe = _([i(d.dateField)], Pe);
2999
+ Fe = v([i(f.dateField)], Fe);
2986
3000
  //#endregion
2987
3001
  //#region src/primitives/fields/series-field-helpers.ts
2988
- var Fe = 0, Ie = () => `series-row-${++Fe}`, Le = (e) => e === !0 || e === !1 ? e : e === "true" ? !0 : e === "false" ? !1 : "", Re = (e, t) => {
3002
+ var Ie = 0, Le = () => `series-row-${++Ie}`, Re = (e) => e === !0 || e === !1 ? e : e === "true" ? !0 : e === "false" ? !1 : "", ze = (e, t) => {
2989
3003
  switch (e.kind) {
2990
3004
  case "number": return typeof t == "number" ? String(t) : typeof t == "string" ? t : "";
2991
3005
  case "date": return typeof t == "string" ? t : "";
2992
3006
  case "category":
2993
3007
  case "text": return typeof t == "string" ? t : "";
2994
- case "boolean": return Le(t);
3008
+ case "boolean": return Re(t);
2995
3009
  default: return typeof t == "string" ? t : t ?? "";
2996
3010
  }
2997
- }, ze = (e, t, n) => Array.isArray(e) ? e.map((e) => {
3011
+ }, Be = (e, t, n) => Array.isArray(e) ? e.map((e) => {
2998
3012
  let r = e;
2999
3013
  return {
3000
- key: Ie(),
3001
- field1: Re(t, r.field1),
3002
- field2: Re(n, r.field2)
3014
+ key: Le(),
3015
+ field1: ze(t, r.field1),
3016
+ field2: ze(n, r.field2)
3003
3017
  };
3004
- }) : [], Be = (e, t) => {
3018
+ }) : [], Ve = (e, t) => {
3005
3019
  switch (e.kind) {
3006
3020
  case "number":
3007
3021
  case "date":
@@ -3010,7 +3024,7 @@ var Fe = 0, Ie = () => `series-row-${++Fe}`, Le = (e) => e === !0 || e === !1 ?
3010
3024
  case "boolean": return t === "" ? null : t;
3011
3025
  default: return t === "" ? null : t;
3012
3026
  }
3013
- }, Ve = (e) => typeof e.unit == "string" ? e.unit : "", He = (e, t) => {
3027
+ }, He = (e) => typeof e.unit == "string" ? e.unit : "", Ue = (e, t) => {
3014
3028
  let r = typeof e == "string" ? {
3015
3029
  label: e,
3016
3030
  value: e
@@ -3022,7 +3036,7 @@ var Fe = 0, Ie = () => `series-row-${++Fe}`, Le = (e) => e === !0 || e === !1 ?
3022
3036
  ${String(i.label)}
3023
3037
  </option>
3024
3038
  `;
3025
- }, Ue = (e) => typeof e == "string" ? e : typeof e == "number" || typeof e == "boolean" || typeof e == "bigint" ? `${e}` : "", We = ({ config: e, value: t, index: r, id: i, disabled: a, readOnly: o, field: s, context: c, text: l, onInput: d, onBlur: f, label: p }) => {
3039
+ }, We = (e) => typeof e == "string" ? e : typeof e == "number" || typeof e == "boolean" || typeof e == "bigint" ? `${e}` : "", Ge = ({ config: e, value: t, index: r, id: i, disabled: a, readOnly: o, field: s, context: c, text: l, onInput: u, onBlur: f, label: p }) => {
3026
3040
  let m = !!e.required;
3027
3041
  switch (e.kind) {
3028
3042
  case "date": return n`
@@ -3032,14 +3046,14 @@ var Fe = 0, Ie = () => `series-row-${++Fe}`, Le = (e) => e === !0 || e === !1 ?
3032
3046
  type="date"
3033
3047
  .value=${typeof t == "string" ? t : ""}
3034
3048
  aria-label=${p}
3035
- aria-describedby=${u(c?.describedBy)}
3049
+ aria-describedby=${d(c?.describedBy)}
3036
3050
  aria-invalid=${String(c?.invalid ?? !1)}
3037
3051
  ?required=${m}
3038
3052
  ?disabled=${a}
3039
3053
  ?readonly=${o}
3040
- min=${u(typeof e.min == "string" ? e.min : void 0)}
3041
- max=${u(typeof e.max == "string" ? e.max : void 0)}
3042
- @input=${(e) => d(r, s, e.target.value)}
3054
+ min=${d(typeof e.min == "string" ? e.min : void 0)}
3055
+ max=${d(typeof e.max == "string" ? e.max : void 0)}
3056
+ @input=${(e) => u(r, s, e.target.value)}
3043
3057
  @blur=${f}
3044
3058
  />
3045
3059
  `;
@@ -3050,17 +3064,17 @@ var Fe = 0, Ie = () => `series-row-${++Fe}`, Le = (e) => e === !0 || e === !1 ?
3050
3064
  class="control"
3051
3065
  id=${i}
3052
3066
  aria-label=${p}
3053
- aria-describedby=${u(c?.describedBy)}
3067
+ aria-describedby=${d(c?.describedBy)}
3054
3068
  aria-invalid=${String(c?.invalid ?? !1)}
3055
3069
  ?required=${m}
3056
3070
  ?disabled=${!!(a || o)}
3057
- @change=${(e) => d(r, s, e.target.value)}
3071
+ @change=${(e) => u(r, s, e.target.value)}
3058
3072
  @blur=${f}
3059
3073
  >
3060
3074
  <option value="" ?selected=${g === ""}>
3061
3075
  &#8212; ${l.categoryPlaceholder} &#8212;
3062
3076
  </option>
3063
- ${h.map((e) => He(e, g))}
3077
+ ${h.map((e) => Ue(e, g))}
3064
3078
  </select>
3065
3079
  `;
3066
3080
  }
@@ -3071,13 +3085,13 @@ var Fe = 0, Ie = () => `series-row-${++Fe}`, Le = (e) => e === !0 || e === !1 ?
3071
3085
  class="control"
3072
3086
  id=${i}
3073
3087
  aria-label=${p}
3074
- aria-describedby=${u(c?.describedBy)}
3088
+ aria-describedby=${d(c?.describedBy)}
3075
3089
  aria-invalid=${String(c?.invalid ?? !1)}
3076
3090
  ?required=${m}
3077
3091
  ?disabled=${!!(a || o)}
3078
3092
  @change=${(e) => {
3079
3093
  let t = e.target.value;
3080
- d(r, s, t === "" ? "" : t === "true");
3094
+ u(r, s, t === "" ? "" : t === "true");
3081
3095
  }}
3082
3096
  @blur=${f}
3083
3097
  >
@@ -3088,7 +3102,7 @@ var Fe = 0, Ie = () => `series-row-${++Fe}`, Le = (e) => e === !0 || e === !1 ?
3088
3102
  `;
3089
3103
  }
3090
3104
  case "number": {
3091
- let l = Ve(e);
3105
+ let l = He(e);
3092
3106
  return n`
3093
3107
  <div class="value-wrap">
3094
3108
  <input
@@ -3101,14 +3115,14 @@ var Fe = 0, Ie = () => `series-row-${++Fe}`, Le = (e) => e === !0 || e === !1 ?
3101
3115
  .value=${typeof t == "string" ? t : ""}
3102
3116
  placeholder=${F(e.placeholder)}
3103
3117
  aria-label=${p}
3104
- aria-describedby=${u(c?.describedBy)}
3118
+ aria-describedby=${d(c?.describedBy)}
3105
3119
  aria-invalid=${String(c?.invalid ?? !1)}
3106
- aria-valuemin=${u(typeof e.min == "number" ? e.min : void 0)}
3107
- aria-valuemax=${u(typeof e.max == "number" ? e.max : void 0)}
3120
+ aria-valuemin=${d(typeof e.min == "number" ? e.min : void 0)}
3121
+ aria-valuemax=${d(typeof e.max == "number" ? e.max : void 0)}
3108
3122
  ?required=${m}
3109
3123
  ?disabled=${a}
3110
3124
  ?readonly=${o}
3111
- @input=${(e) => d(r, s, e.target.value)}
3125
+ @input=${(e) => u(r, s, e.target.value)}
3112
3126
  @blur=${f}
3113
3127
  />
3114
3128
  <span class="unit" aria-hidden="true">${l}</span>
@@ -3120,20 +3134,20 @@ var Fe = 0, Ie = () => `series-row-${++Fe}`, Le = (e) => e === !0 || e === !1 ?
3120
3134
  class="control"
3121
3135
  id=${i}
3122
3136
  type="text"
3123
- .value=${Ue(t)}
3137
+ .value=${We(t)}
3124
3138
  placeholder=${F(e.placeholder)}
3125
3139
  aria-label=${p}
3126
- aria-describedby=${u(c?.describedBy)}
3140
+ aria-describedby=${d(c?.describedBy)}
3127
3141
  aria-invalid=${String(c?.invalid ?? !1)}
3128
3142
  ?required=${m}
3129
3143
  ?disabled=${a}
3130
3144
  ?readonly=${o}
3131
- @input=${(e) => d(r, s, e.target.value)}
3145
+ @input=${(e) => u(r, s, e.target.value)}
3132
3146
  @blur=${f}
3133
3147
  />
3134
3148
  `;
3135
3149
  }
3136
- }, Ge = t`
3150
+ }, Ke = t`
3137
3151
  .series {
3138
3152
  display: grid;
3139
3153
  gap: 0.9rem;
@@ -3287,8 +3301,8 @@ var Fe = 0, Ie = () => `series-row-${++Fe}`, Le = (e) => e === !0 || e === !1 ?
3287
3301
  justify-self: end;
3288
3302
  }
3289
3303
  }
3290
- `, Y = class extends v {
3291
- static styles = [v.styles, Ge];
3304
+ `, Z = class extends y {
3305
+ static styles = [y.styles, Ke];
3292
3306
  #e = [];
3293
3307
  get rows() {
3294
3308
  return this.#e;
@@ -3301,7 +3315,7 @@ var Fe = 0, Ie = () => `series-row-${++Fe}`, Le = (e) => e === !0 || e === !1 ?
3301
3315
  super.willUpdate(e), e.has("descriptor") && this.#i();
3302
3316
  }
3303
3317
  render() {
3304
- let e = this.fieldContext, t = !!this.fieldContext?.disabled, r = !!this.fieldContext?.readOnly, i = t || r, a = this.#n, o = this.#r, s = `${Math.max(Ve(o).length * .56 + .8, 2.3)}rem`, c = this.text;
3318
+ let e = this.fieldContext, t = !!this.fieldContext?.disabled, r = !!this.fieldContext?.readOnly, i = t || r, a = this.#n, o = this.#r, s = `${Math.max(He(o).length * .56 + .8, 2.3)}rem`, c = this.text;
3305
3319
  return n`
3306
3320
  <div class="series" style=${`--mlf-series-unit-width: ${s};`}>
3307
3321
  <div class="toolbar">
@@ -3358,11 +3372,11 @@ var Fe = 0, Ie = () => `series-row-${++Fe}`, Le = (e) => e === !0 || e === !1 ?
3358
3372
  return this.props.field2 ?? {};
3359
3373
  }
3360
3374
  #i() {
3361
- this.rows = ze(this.props.value, this.#n, this.#r), this.#t = !1;
3375
+ this.rows = Be(this.props.value, this.#n, this.#r), this.#t = !1;
3362
3376
  }
3363
3377
  #a = () => {
3364
3378
  this.rows = [...this.rows, {
3365
- key: Ie(),
3379
+ key: Le(),
3366
3380
  field1: "",
3367
3381
  field2: ""
3368
3382
  }], this.#t = !0, this.#l();
@@ -3381,13 +3395,13 @@ var Fe = 0, Ie = () => `series-row-${++Fe}`, Le = (e) => e === !0 || e === !1 ?
3381
3395
  };
3382
3396
  #l() {
3383
3397
  this.#t &&= (this.commitValue(this.rows.map((e) => ({
3384
- field1: Be(this.#n, e.field1),
3385
- field2: Be(this.#r, e.field2)
3398
+ field1: Ve(this.#n, e.field1),
3399
+ field2: Ve(this.#r, e.field2)
3386
3400
  }))), !1);
3387
3401
  }
3388
3402
  #u(e, t, n, r, i, a, o) {
3389
3403
  let s = this.fieldContext, c = `${s?.label ?? F(this.props.label)} ${F(e.label, `field${o}`)} ${n + 1}`;
3390
- return We({
3404
+ return Ge({
3391
3405
  config: e,
3392
3406
  value: t,
3393
3407
  index: n,
@@ -3403,11 +3417,11 @@ var Fe = 0, Ie = () => `series-row-${++Fe}`, Le = (e) => e === !0 || e === !1 ?
3403
3417
  });
3404
3418
  }
3405
3419
  };
3406
- _([o()], Y.prototype, "rows", null), Y = _([i(d.seriesField)], Y);
3420
+ v([s()], Z.prototype, "rows", null), Z = v([i(f.seriesField)], Z);
3407
3421
  //#endregion
3408
3422
  //#region src/primitives/fields/long-text-field.ts
3409
- var Ke = class extends v {
3410
- static styles = [v.styles, t`
3423
+ var qe = class extends y {
3424
+ static styles = [y.styles, t`
3411
3425
  textarea.control {
3412
3426
  resize: vertical;
3413
3427
  min-height: 6rem;
@@ -3424,7 +3438,7 @@ var Ke = class extends v {
3424
3438
  placeholder=${F(e.placeholder)}
3425
3439
  rows=${i}
3426
3440
  aria-label=${t?.label ?? F(e.label)}
3427
- aria-describedby=${u(t?.describedBy)}
3441
+ aria-describedby=${d(t?.describedBy)}
3428
3442
  aria-invalid=${String(t?.invalid ?? !1)}
3429
3443
  ?required=${!!e.required}
3430
3444
  ?disabled=${!!t?.disabled}
@@ -3442,14 +3456,14 @@ var Ke = class extends v {
3442
3456
  this.commitBlur();
3443
3457
  };
3444
3458
  };
3445
- Ke = _([i(d.longTextField)], Ke);
3459
+ qe = v([i(f.longTextField)], qe);
3446
3460
  //#endregion
3447
3461
  //#region src/primitives/fields/single-choice-field.ts
3448
- var qe = (e) => typeof e == "string" ? {
3462
+ var Je = (e) => typeof e == "string" ? {
3449
3463
  label: e,
3450
3464
  value: e
3451
- } : e, Je = class extends v {
3452
- static styles = [v.styles, t`
3465
+ } : e, Ye = class extends y {
3466
+ static styles = [y.styles, t`
3453
3467
  fieldset {
3454
3468
  border: none;
3455
3469
  padding: 0;
@@ -3518,12 +3532,12 @@ var qe = (e) => typeof e == "string" ? {
3518
3532
  class="options ${a}"
3519
3533
  role="radiogroup"
3520
3534
  aria-label=${o}
3521
- aria-describedby=${u(t?.describedBy)}
3535
+ aria-describedby=${d(t?.describedBy)}
3522
3536
  aria-invalid=${String(t?.invalid ?? !1)}
3523
3537
  aria-required=${String(!!e.required)}
3524
3538
  >
3525
3539
  ${i.map((e) => {
3526
- let { label: i, value: a } = qe(e), o = `${t?.controlId ?? "sc"}-${a}`;
3540
+ let { label: i, value: a } = Je(e), o = `${t?.controlId ?? "sc"}-${a}`;
3527
3541
  return n`
3528
3542
  <label class=${s ? "disabled" : ""} for=${o}>
3529
3543
  <input
@@ -3552,14 +3566,14 @@ var qe = (e) => typeof e == "string" ? {
3552
3566
  this.commitBlur();
3553
3567
  };
3554
3568
  };
3555
- Je = _([i(d.singleChoiceField)], Je);
3569
+ Ye = v([i(f.singleChoiceField)], Ye);
3556
3570
  //#endregion
3557
3571
  //#region src/primitives/fields/multi-choice-field.ts
3558
- var Ye = (e) => typeof e == "string" ? {
3572
+ var Xe = (e) => typeof e == "string" ? {
3559
3573
  label: e,
3560
3574
  value: e
3561
- } : e, Xe = class extends v {
3562
- static styles = [v.styles, t`
3575
+ } : e, Ze = class extends y {
3576
+ static styles = [y.styles, t`
3563
3577
  fieldset {
3564
3578
  border: none;
3565
3579
  padding: 0;
@@ -3629,12 +3643,12 @@ var Ye = (e) => typeof e == "string" ? {
3629
3643
  class="options ${a}"
3630
3644
  role="group"
3631
3645
  aria-label=${o}
3632
- aria-describedby=${u(t?.describedBy)}
3646
+ aria-describedby=${d(t?.describedBy)}
3633
3647
  aria-invalid=${String(t?.invalid ?? !1)}
3634
3648
  aria-required=${String(!!e.required)}
3635
3649
  >
3636
3650
  ${i.map((e) => {
3637
- let { label: i, value: a } = Ye(e), o = `${t?.controlId ?? "mc"}-${a}`;
3651
+ let { label: i, value: a } = Xe(e), o = `${t?.controlId ?? "mc"}-${a}`;
3638
3652
  return n`
3639
3653
  <label class=${s ? "disabled" : ""} for=${o}>
3640
3654
  <input
@@ -3663,11 +3677,11 @@ var Ye = (e) => typeof e == "string" ? {
3663
3677
  this.commitBlur();
3664
3678
  };
3665
3679
  };
3666
- Xe = _([i(d.multiChoiceField)], Xe);
3680
+ Ze = v([i(f.multiChoiceField)], Ze);
3667
3681
  //#endregion
3668
3682
  //#region src/primitives/fields/rating-field.ts
3669
- var Ze = class extends v {
3670
- static styles = [v.styles, t`
3683
+ var Qe = class extends y {
3684
+ static styles = [y.styles, t`
3671
3685
  .rating-container {
3672
3686
  display: inline-flex;
3673
3687
  gap: 0.25rem;
@@ -3726,12 +3740,12 @@ var Ze = class extends v {
3726
3740
  <div
3727
3741
  role="slider"
3728
3742
  aria-label=${c}
3729
- aria-valuenow=${u(r === null ? void 0 : r)}
3743
+ aria-valuenow=${d(r === null ? void 0 : r)}
3730
3744
  aria-valuemin=${i}
3731
3745
  aria-valuemax=${a}
3732
3746
  aria-invalid=${String(t?.invalid ?? !1)}
3733
3747
  aria-required=${String(!!e.required)}
3734
- aria-describedby=${u(t?.describedBy)}
3748
+ aria-describedby=${d(t?.describedBy)}
3735
3749
  aria-disabled=${String(s)}
3736
3750
  tabindex="-1"
3737
3751
  >
@@ -3774,10 +3788,10 @@ var Ze = class extends v {
3774
3788
  }
3775
3789
  };
3776
3790
  };
3777
- Ze = _([i(d.ratingField)], Ze);
3791
+ Qe = v([i(f.ratingField)], Qe);
3778
3792
  //#endregion
3779
3793
  //#region src/primitives/reports/classifier-report.ts
3780
- var Qe = (e, t, n) => {
3794
+ var $e = (e, t, n) => {
3781
3795
  if (!P(e) || !Array.isArray(e.probabilities)) return [];
3782
3796
  let r = Array.isArray(t) ? t : e.labels, i = Array.isArray(r) ? r : [];
3783
3797
  return e.probabilities.map((e, t) => {
@@ -3787,8 +3801,8 @@ var Qe = (e, t, n) => {
3787
3801
  value: r
3788
3802
  };
3789
3803
  }).filter((e) => e !== null);
3790
- }, $e = class extends b {
3791
- static styles = [b.styles, t`
3804
+ }, et = class extends x {
3805
+ static styles = [x.styles, t`
3792
3806
  .rows {
3793
3807
  display: grid;
3794
3808
  gap: 0.5rem;
@@ -3859,7 +3873,7 @@ var Qe = (e, t, n) => {
3859
3873
  let e = this.props.payload, t = typeof this.props.error == "string" ? this.props.error : null, r = this.reportContext, i = this.props.showClassProbabilities !== !1, a = this.text;
3860
3874
  if (t) return n`<div class="error">${t}</div>`;
3861
3875
  if (e == null) return n`<div class="empty">${a.classifierEmpty}</div>`;
3862
- let o = P(e) ? e.prediction ?? e.className ?? e.label ?? a.classifierUnknownPrediction : e, s = Qe(e, this.props.labels, a.classifierClassLabel);
3876
+ let o = P(e) ? e.prediction ?? e.className ?? e.label ?? a.classifierUnknownPrediction : e, s = $e(e, this.props.labels, a.classifierClassLabel);
3863
3877
  return n`
3864
3878
  <section
3865
3879
  part="classifier-report"
@@ -3887,14 +3901,14 @@ var Qe = (e, t, n) => {
3887
3901
  `;
3888
3902
  }
3889
3903
  };
3890
- $e = _([i(d.classifierReport)], $e);
3904
+ et = v([i(f.classifierReport)], et);
3891
3905
  //#endregion
3892
3906
  //#region src/primitives/reports/regressor-report.ts
3893
- var X = (e, t, n) => {
3907
+ var Q = (e, t, n) => {
3894
3908
  if (typeof e == "number") return `${e.toFixed(t)}${n ? ` ${n}` : ""}`;
3895
3909
  let r = Number(e);
3896
3910
  return Number.isNaN(r) ? String(e) : `${r.toFixed(t)}${n ? ` ${n}` : ""}`;
3897
- }, et = (e) => {
3911
+ }, tt = (e) => {
3898
3912
  if (P(e) && Array.isArray(e.values)) return e.values.map((e) => Number(e)).filter((e) => !Number.isNaN(e));
3899
3913
  if (P(e) && "value" in e) {
3900
3914
  let t = Number(e.value);
@@ -3902,13 +3916,13 @@ var X = (e, t, n) => {
3902
3916
  }
3903
3917
  let t = Number(e);
3904
3918
  return Number.isNaN(t) ? [] : [t];
3905
- }, tt = (e) => {
3919
+ }, nt = (e) => {
3906
3920
  if (P(e) && Array.isArray(e.interval) && e.interval.length === 2) {
3907
3921
  let t = Number(e.interval[0]), n = Number(e.interval[1]);
3908
3922
  if (!Number.isNaN(t) && !Number.isNaN(n)) return [t, n];
3909
3923
  }
3910
3924
  return P(e) && typeof e.min == "number" && typeof e.max == "number" ? [e.min, e.max] : null;
3911
- }, nt = (e, t) => {
3925
+ }, rt = (e, t) => {
3912
3926
  if (t <= e) return "linear-gradient(to right, #ffea00 0%, #00c853 50%, #ffea00 100%)";
3913
3927
  let n = t - e, r = e - n, i = t + n, a = (e) => (e - r) / (i - r) * 100, o = a(e), s = a(t), c = a((e + t) / 2);
3914
3928
  return `linear-gradient(to right,
@@ -3919,12 +3933,12 @@ var X = (e, t, n) => {
3919
3933
  #ffea00 ${s}%,
3920
3934
  #ff6d00 ${Math.min(s + 10, 100)}%,
3921
3935
  #c62828 100%)`;
3922
- }, Z = (e, t, n) => {
3936
+ }, $ = (e, t, n) => {
3923
3937
  if (n <= t) return 49;
3924
3938
  let r = n - t, i = t - r, a = n + r;
3925
3939
  return Math.min(Math.max((e - i) / (a - i) * 100, 0), 98.45);
3926
- }, Q = class extends b {
3927
- static styles = [b.styles, t`
3940
+ }, it = class extends x {
3941
+ static styles = [x.styles, t`
3928
3942
  :host {
3929
3943
  --marker-size: 14px;
3930
3944
  --limit-line-width: 3px;
@@ -4003,7 +4017,7 @@ var X = (e, t, n) => {
4003
4017
  let e = this.props.payload, t = typeof this.props.error == "string" ? this.props.error : null, r = this.reportContext, i = this.text;
4004
4018
  if (t) return n`<div class="error">${t}</div>`;
4005
4019
  if (e == null) return n`<div class="empty">${i.regressorEmpty}</div>`;
4006
- let a = typeof this.props.unit == "string" ? this.props.unit : "", o = typeof this.props.precision == "number" && this.props.precision >= 0 ? this.props.precision : 2, s = et(e), c = tt(e), l = P(e) && typeof e.execution_time == "number" ? `${e.execution_time} ms` : null;
4020
+ let a = typeof this.props.unit == "string" ? this.props.unit : "", o = typeof this.props.precision == "number" && this.props.precision >= 0 ? this.props.precision : 2, s = tt(e), c = nt(e), l = P(e) && typeof e.execution_time == "number" ? `${e.execution_time} ms` : null;
4007
4021
  return n`
4008
4022
  <section
4009
4023
  part="regressor-report"
@@ -4012,51 +4026,51 @@ var X = (e, t, n) => {
4012
4026
  >
4013
4027
  ${s.length > 0 ? s.map((e) => n`
4014
4028
  <div class="item">
4015
- <div class="value">${X(e, o, a)}</div>
4029
+ <div class="value">${Q(e, o, a)}</div>
4016
4030
 
4017
4031
  ${c ? n`
4018
4032
  <div
4019
4033
  class="bar-wrapper"
4020
- style=${`background: ${nt(c[0], c[1])};`}
4034
+ style=${`background: ${rt(c[0], c[1])};`}
4021
4035
  >
4022
4036
  <div
4023
4037
  class="limit-wrapper"
4024
- style=${`left: ${Z(c[0], c[0], c[1])}%;`}
4038
+ style=${`left: ${$(c[0], c[0], c[1])}%;`}
4025
4039
  >
4026
4040
  <div class="limit-line"></div>
4027
4041
  <div class="limit-label">
4028
- ${X(c[0], o, a)}
4042
+ ${Q(c[0], o, a)}
4029
4043
  </div>
4030
4044
  </div>
4031
4045
 
4032
4046
  <div
4033
4047
  class="limit-wrapper"
4034
- style=${`left: ${Z(c[1], c[0], c[1])}%;`}
4048
+ style=${`left: ${$(c[1], c[0], c[1])}%;`}
4035
4049
  >
4036
4050
  <div class="limit-line"></div>
4037
4051
  <div class="limit-label">
4038
- ${X(c[1], o, a)}
4052
+ ${Q(c[1], o, a)}
4039
4053
  </div>
4040
4054
  </div>
4041
4055
 
4042
4056
  <span
4043
4057
  class="value-marker"
4044
- style=${`left: ${Z(e, c[0], c[1])}%;`}
4058
+ style=${`left: ${$(e, c[0], c[1])}%;`}
4045
4059
  ></span>
4046
4060
  </div>
4047
4061
  ` : n``}
4048
4062
  </div>
4049
- `) : n`<div class="value">${X(e, o, a)}</div>`}
4063
+ `) : n`<div class="value">${Q(e, o, a)}</div>`}
4050
4064
  ${l ? n`<div class="meta">${i.regressorExecutionTime(l)}</div>` : n``}
4051
4065
  ${this.renderTransportPanel(i)}
4052
4066
  </section>
4053
4067
  `;
4054
4068
  }
4055
4069
  };
4056
- Q = _([i(d.regressorReport)], Q);
4070
+ it = v([i(f.regressorReport)], it);
4057
4071
  //#endregion
4058
4072
  //#region src/primitives/registry.ts
4059
- var rt = new Set([
4073
+ var at = new Set([
4060
4074
  "annotation-xml",
4061
4075
  "color-profile",
4062
4076
  "font-face",
@@ -4065,19 +4079,19 @@ var rt = new Set([
4065
4079
  "font-face-format",
4066
4080
  "font-face-name",
4067
4081
  "missing-glyph"
4068
- ]), it = (e) => /^[a-z][-.0-9_a-z]*-[-.0-9_a-z]*[a-z0-9]$/.test(e) && !rt.has(e), at = (e) => {
4069
- if (!it(e)) throw TypeError(`Invalid primitive renderer tag name "${e}". Expected a valid custom element name.`);
4070
- }, ot = class e {
4082
+ ]), ot = (e) => /^[a-z][-.0-9_a-z]*-[-.0-9_a-z]*[a-z0-9]$/.test(e) && !at.has(e), st = (e) => {
4083
+ if (!ot(e)) throw TypeError(`Invalid primitive renderer tag name "${e}". Expected a valid custom element name.`);
4084
+ }, ct = class e {
4071
4085
  #e = /* @__PURE__ */ new Map();
4072
4086
  #t = /* @__PURE__ */ new Map();
4073
4087
  registerField(e, t) {
4074
- return at(t), this.#e.set(e, t), this;
4088
+ return st(t), this.#e.set(e, t), this;
4075
4089
  }
4076
4090
  unregisterField(e) {
4077
4091
  return this.#e.delete(e), this;
4078
4092
  }
4079
4093
  registerReport(e, t) {
4080
- return at(t), this.#t.set(e, t), this;
4094
+ return st(t), this.#t.set(e, t), this;
4081
4095
  }
4082
4096
  unregisterReport(e) {
4083
4097
  return this.#t.delete(e), this;
@@ -4094,11 +4108,11 @@ var rt = new Set([
4094
4108
  for (let [e, n] of this.#t) t.registerReport(e, n);
4095
4109
  return t;
4096
4110
  }
4097
- }, st = () => new ot(), $ = () => st().registerField("declarative-field", d.declarativeField).registerField("text-field", d.textField).registerField("number-field", d.numberField).registerField("boolean-field", d.booleanField).registerField("category-field", d.categoryField).registerField("date-field", d.dateField).registerField("series-field", d.seriesField).registerField("long-text-field", d.longTextField).registerField("single-choice-field", d.singleChoiceField).registerField("multi-choice-field", d.multiChoiceField).registerField("rating-field", d.ratingField).registerReport("declarative-report", d.declarativeReport).registerReport("classifier-report", d.classifierReport).registerReport("regressor-report", d.regressorReport), ct = (e, t) => {
4111
+ }, lt = () => new ct(), ut = () => lt().registerField("declarative-field", f.declarativeField).registerField("text-field", f.textField).registerField("number-field", f.numberField).registerField("boolean-field", f.booleanField).registerField("category-field", f.categoryField).registerField("date-field", f.dateField).registerField("series-field", f.seriesField).registerField("long-text-field", f.longTextField).registerField("single-choice-field", f.singleChoiceField).registerField("multi-choice-field", f.multiChoiceField).registerField("rating-field", f.ratingField).registerReport("declarative-report", f.declarativeReport).registerReport("mounted-report", f.mountedReport).registerReport("classifier-report", f.classifierReport).registerReport("regressor-report", f.regressorReport), dt = (e, t) => {
4098
4112
  if (e.childNodes.length > 0 && t !== "replace") throw TypeError("Mount into an empty container or pass `containerStrategy: \"replace\"`.");
4099
- }, lt = (e) => e ? e.clone() : $(), ut = (e) => e?.clone() ?? k(), dt = (e, t, n = {}) => {
4100
- let r = document.createElement(d.form), i = lt(n.registry), a = ut(n.descriptorRegistry), o = h(n.text), s = n.containerStrategy ?? "error", c = s === "replace" ? Array.from(e.childNodes) : [];
4101
- ct(e, s), r.form = t, r.registry = i, r.descriptorRegistry = a, r.layout = n.layout ?? "stacked", r.formLabel = n.formLabel ?? p.form, r.reportsLabel = n.reportsLabel ?? p.reports, r.submitLabel = n.submitLabel ?? p.submit, r.validatingLabel = n.validatingLabel ?? p.validating, r.submittingLabel = n.submittingLabel ?? p.submitting, r.reportPane = n.reportPane ?? "auto", r.text = o, r.reportTransport = n.reportTransport, r.reportFetchMode = n.reportFetchMode ?? "lazy", r.submitHandler = n.submitHandler, e.replaceChildren(r);
4113
+ }, ft = (e) => e ? e.clone() : ut(), pt = (e) => e?.clone() ?? k(), mt = (e, t, n = {}) => {
4114
+ let r = document.createElement(f.form), i = ft(n.registry), a = pt(n.descriptorRegistry), o = g(n.text), s = n.containerStrategy ?? "error", c = s === "replace" ? Array.from(e.childNodes) : [];
4115
+ dt(e, s), r.form = t, r.registry = i, r.descriptorRegistry = a, r.layout = n.layout ?? "stacked", r.formLabel = n.formLabel ?? m.form, r.reportsLabel = n.reportsLabel ?? m.reports, r.submitLabel = n.submitLabel ?? m.submit, r.validatingLabel = n.validatingLabel ?? m.validating, r.submittingLabel = n.submittingLabel ?? m.submitting, r.reportPane = n.reportPane ?? "auto", r.text = o, r.reportTransport = n.reportTransport, r.reportFetchMode = n.reportFetchMode ?? "lazy", r.submitHandler = n.submitHandler, e.replaceChildren(r);
4102
4116
  let l = !1;
4103
4117
  return Object.freeze({
4104
4118
  form: t,
@@ -4110,8 +4124,8 @@ var rt = new Set([
4110
4124
  l || (l = !0, r.parentNode === e ? s === "replace" && c.length > 0 ? e.replaceChildren(...c) : e.removeChild(r) : (r.remove(), s === "replace" && c.length > 0 && e.childNodes.length === 0 && e.replaceChildren(...c)));
4111
4125
  }
4112
4126
  });
4113
- }, ft = (e) => {
4127
+ }, ht = (e) => {
4114
4128
  e.unmount();
4115
4129
  };
4116
4130
  //#endregion
4117
- export { h as _, ve as a, D as c, y as d, v as f, d as g, m as h, st as i, ae as l, p as m, ft as n, O as o, _ as p, $ as r, k as s, dt as t, b as u };
4131
+ export { g as _, ye as a, O as c, b as d, y as f, f as g, h, lt as i, oe as l, m, ht as n, ve as o, v as p, ut as r, k as s, mt as t, x as u };